diff --git a/com.twin.app.shoptime/assets/images/btn/btn-quantity-decrease-dim_new@3x.png b/com.twin.app.shoptime/assets/images/btn/btn-quantity-decrease-dim_new@3x.png new file mode 100644 index 00000000..30f39ab0 Binary files /dev/null and b/com.twin.app.shoptime/assets/images/btn/btn-quantity-decrease-dim_new@3x.png differ diff --git a/com.twin.app.shoptime/assets/images/ic-partners-qvc@3x.png b/com.twin.app.shoptime/assets/images/ic-partners-qvc@3x.png new file mode 100644 index 00000000..93600acd Binary files /dev/null and b/com.twin.app.shoptime/assets/images/ic-partners-qvc@3x.png differ diff --git a/com.twin.app.shoptime/src/components/TButton/TButton.module.less b/com.twin.app.shoptime/src/components/TButton/TButton.module.less index a1ecffda..b835c395 100644 --- a/com.twin.app.shoptime/src/components/TButton/TButton.module.less +++ b/com.twin.app.shoptime/src/components/TButton/TButton.module.less @@ -43,6 +43,17 @@ max-width: 650px; letter-spacing: -0.75px; } + + &.cartEa { + min-width: 90px; + max-width: 90px; + } + + &.cartTrash { + min-width: 60px; + max-width: 60px; + } + &.extra { min-width: 350px; max-width: 900px; @@ -145,7 +156,9 @@ border-radius: 10px; box-sizing: border-box; .flex(); - box-shadow: 0 5px 5px #003, 0 6px 7px #0000001a; + box-shadow: + 0 5px 5px #003, + 0 6px 7px #0000001a; line-height: normal; &:focus { @@ -165,7 +178,9 @@ border-radius: 10px; box-sizing: border-box; .flex(); - box-shadow: 0 5px 5px #003, 0 6px 7px #0000001a; + box-shadow: + 0 5px 5px #003, + 0 6px 7px #0000001a; line-height: normal; &:focus { diff --git a/com.twin.app.shoptime/src/components/THeader/THeader.jsx b/com.twin.app.shoptime/src/components/THeader/THeader.jsx index 4f0eb7c7..f99e4ed4 100644 --- a/com.twin.app.shoptime/src/components/THeader/THeader.jsx +++ b/com.twin.app.shoptime/src/components/THeader/THeader.jsx @@ -1,13 +1,17 @@ -import React, { useCallback, useMemo } from "react"; +import React, { + useCallback, + useMemo, +} from 'react'; -import classNames from "classnames"; +import classNames from 'classnames'; -import { Marquee } from "@enact/sandstone/Marquee"; -import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator"; -import Spottable from "@enact/spotlight/Spottable"; +import { Marquee } from '@enact/sandstone/Marquee'; +import SpotlightContainerDecorator + from '@enact/spotlight/SpotlightContainerDecorator'; +import Spottable from '@enact/spotlight/Spottable'; -import { $L } from "../../utils/helperMethods"; -import css from "./THeader.module.less"; +import { $L } from '../../utils/helperMethods'; +import css from './THeader.module.less'; const Container = SpotlightContainerDecorator( { enterTo: "last-focused" }, @@ -25,6 +29,7 @@ export default function THeader({ onClick, ariaLabel, children, + kind, ...rest }) { const convertedTitle = useMemo(() => { @@ -68,9 +73,10 @@ export default function THeader({ role="button" /> )} + @@ -78,6 +84,7 @@ export default function THeader({ )} + {children} ); diff --git a/com.twin.app.shoptime/src/components/THeader/THeader.module.less b/com.twin.app.shoptime/src/components/THeader/THeader.module.less index 20bc5c9b..a20c0167 100644 --- a/com.twin.app.shoptime/src/components/THeader/THeader.module.less +++ b/com.twin.app.shoptime/src/components/THeader/THeader.module.less @@ -19,6 +19,14 @@ letter-spacing: 1px; text-transform: uppercase; } + .cartTitle { + width: 1788px; + font-size: 42px; + padding-left: 12px; + font-weight: 600; + letter-spacing: 1px; + text-transform: uppercase; + } } .button { diff --git a/com.twin.app.shoptime/src/views/CartPanel/CartEmpty.jsx b/com.twin.app.shoptime/src/views/CartPanel/CartEmpty.jsx new file mode 100644 index 00000000..e8cebc81 --- /dev/null +++ b/com.twin.app.shoptime/src/views/CartPanel/CartEmpty.jsx @@ -0,0 +1,29 @@ +import React from 'react'; + +import SpotlightContainerDecorator + from '@enact/spotlight/SpotlightContainerDecorator'; + +import emptyImg from '../../../assets/images/img-cart-empty@3x.png'; +import CustomImage from '../../components/CustomImage/CustomImage'; +import BestSeller from '../HomePanel/BestSeller/BestSeller'; +import css from './CartEmpty.module.less'; + +const Container = SpotlightContainerDecorator("div"); +const CartEmpty = () => { + return ( + +
+ + YOUR CART IS EMPTY + + Add some items to make cart Full + +
+
+ +
+
+ ); +}; + +export default CartEmpty; diff --git a/com.twin.app.shoptime/src/views/CartPanel/CartEmpty.module.less b/com.twin.app.shoptime/src/views/CartPanel/CartEmpty.module.less new file mode 100644 index 00000000..7fcb7f86 --- /dev/null +++ b/com.twin.app.shoptime/src/views/CartPanel/CartEmpty.module.less @@ -0,0 +1,38 @@ +@import "../../style/CommonStyle.module.less"; +@import "../../style/utils.module.less"; + +.emptyBox { + width: 1320px; + height: 288px; + text-align: center; + display: flex; + flex-wrap: wrap; + justify-content: center; + align-content: center; + padding: 18px 300px; + .emptyImg { + width: 360px; + height: 168px; + } + .emptyTitle { + margin-top: 6px; + width: 377px; + height: 26px; + font-size: 36px; + font-weight: bold; + text-align: center; + color: #a3a3a3; + } + .emptySubTitle { + margin-top: 6px; + width: 350px; + height: 18px; + font-size: 23.5px; + font-weight: normal; + text-align: center; + color: #b5b5b5; + } +} +.bestSeller { + margin-top: 70px; +} diff --git a/com.twin.app.shoptime/src/views/CartPanel/CartPanel.jsx b/com.twin.app.shoptime/src/views/CartPanel/CartPanel.jsx index a1388655..6a786c80 100644 --- a/com.twin.app.shoptime/src/views/CartPanel/CartPanel.jsx +++ b/com.twin.app.shoptime/src/views/CartPanel/CartPanel.jsx @@ -1,30 +1,67 @@ -import React, { useCallback } from 'react'; -import { useDispatch } from 'react-redux'; +import React, { + useCallback, + useEffect, +} from 'react'; -import TPanel from '../../components/TPanel/TPanel'; +import { + useDispatch, + useSelector, +} from 'react-redux'; + +import { popPanel } from '../../actions/panelActions'; import TBody from '../../components/TBody/TBody'; import THeader from '../../components/THeader/THeader'; -import { popPanel } from '../../actions/panelActions'; +import TPanel from '../../components/TPanel/TPanel'; +import TScroller from '../../components/TScroller/TScroller'; +import useScrollTo from '../../hooks/useScrollTo'; +import CartEmpty from './CartEmpty'; +import css from './CartPanel.module.less'; +import CartProductBar from './CartProductBar'; import CartSidebar from './CartSidebar'; -import css from './CartPanel.module.less'; - -export default function CartPanel({ spotlightId }) { +export default function CartPanel({ spotlightId, scrollOptions = [] }) { + const cartData = useSelector((state) => state.cart.getMyinfoCartSearch); const dispatch = useDispatch(); const onBackClick = useCallback(() => { dispatch(popPanel()); }, [dispatch]); + useEffect(() => { + console.log("###cartData", cartData); + }, [cartData]); + + const { + getScrollTo, + getScrollTo: getScrollToBody, + scrollTop: scrollTopBody, + } = useScrollTo(); + return ( - +
-
{/* 오른쪽 상품 영역 */}
+
+ {/* 오른쪽 상품 영역 */} + {/* + + */} + +
diff --git a/com.twin.app.shoptime/src/views/CartPanel/CartPanel.module.less b/com.twin.app.shoptime/src/views/CartPanel/CartPanel.module.less index 01c2b0e8..a361e5f6 100644 --- a/com.twin.app.shoptime/src/views/CartPanel/CartPanel.module.less +++ b/com.twin.app.shoptime/src/views/CartPanel/CartPanel.module.less @@ -26,4 +26,7 @@ .rightSection { flex: 1; background-color: #ffffff; -} \ No newline at end of file + .tScroller { + height: 100%; + } +} diff --git a/com.twin.app.shoptime/src/views/CartPanel/CartProduct.jsx b/com.twin.app.shoptime/src/views/CartPanel/CartProduct.jsx new file mode 100644 index 00000000..292fba11 --- /dev/null +++ b/com.twin.app.shoptime/src/views/CartPanel/CartProduct.jsx @@ -0,0 +1,134 @@ +import React, { + useCallback, + useEffect, + useMemo, + useState, +} from 'react'; + +import classNames from 'classnames'; + +import Spotlight from '@enact/spotlight'; +import SpotlightContainerDecorator + from '@enact/spotlight/SpotlightContainerDecorator'; + +import logoImage from '../../../assets/images/ic-partners-qvc@3x.png'; +import defaultImage from '../../../assets/images/img-thumb-empty-144@3x.png'; +import CustomImage from '../../components/CustomImage/CustomImage'; +import TButton from '../../components/TButton/TButton'; +import TCheckBoxSquare from '../../components/TCheckBox/TCheckBoxSquare'; +import css from './CartProduct.module.less'; + +const Container = SpotlightContainerDecorator("div"); +const CartProduct = () => { + const randomCount = useMemo(() => Math.floor(Math.random() * 3) + 1, []); + + const [pdEa, setPdEa] = useState(1); + + const handleDecreseClick = useCallback(() => { + if (pdEa > 1) { + setPdEa(pdEa - 1); + } + }, [pdEa]); + const handleIncreseClick = useCallback(() => { + setPdEa(pdEa + 1); + }, [pdEa]); + + useEffect(() => { + if (pdEa === 1) { + Spotlight.focus("pd_ea_increse"); + } + }, [pdEa]); + return ( + +
+ {/* 장바구니에 담긴 상품의 회사정보 */} +
+ +
+ + Juvelirochka + (1 ITEM) + +
+
+ {/* 그 회사에 장바구니에 담긴 상품의 총합 */} +
+ Product Total $ 99,999.99 + Option $ 99,999.99 + S&H $ 99,999.9 +
+
+ Total + + $999,999,999 + +
+
+ {/* 상품 정보 반복가능 */} + {Array.from({ length: randomCount }, (_, index) => ( +
+
+
+ + ID : A565145 +
+
+
+ +
+
+
+ Farmer Jon`s 25-ct Mini Bags Of Microwave Popcorn in Flavor + Choice Area +
+
Sliver Metallic / XL
+
+ $38.09 +
+ $41.99 + OPTION : $5.50 + S&H: $5.50 +
+
+
+ +
{pdEa}
+ +
+
+
+
+
+ {/* 휴지통 */} + +
+
+ ))} +
+ ); +}; + +export default CartProduct; diff --git a/com.twin.app.shoptime/src/views/CartPanel/CartProduct.module.less b/com.twin.app.shoptime/src/views/CartPanel/CartProduct.module.less new file mode 100644 index 00000000..b0b3a094 --- /dev/null +++ b/com.twin.app.shoptime/src/views/CartPanel/CartProduct.module.less @@ -0,0 +1,214 @@ +@import "../../style/CommonStyle.module.less"; +@import "../../style/utils.module.less"; + +.productBox { + background: #fff; + width: 100%; + border: 1px solid #dadada; + border-radius: 12px; + box-sizing: border-box; + margin-bottom: 60px; + .productCompany { + height: 92px; + display: flex; + align-items: center; + padding: 20px 30px; + .logo { + width: 42px; + height: 42px; + border: 1px solid #dadada; + border-radius: 50%; + .img { + width: 100%; + } + } + .company { + margin-left: 6px; + font-size: 30px; + font-weight: bold; + color: #222; + .productEa { + margin-left: 6px; + color: #c70850; + } + } + } + .productPrice { + width: 1198px; + height: 81px; + padding: 20px 29px 20px 28px; + background-color: #f2f2f2; + display: flex; + justify-content: space-between; + border-top: 1px solid #dadada; + border-bottom: 1px solid #dadada; + box-sizing: border-box; + .leftSection { + font-size: 23.5px; + color: #555; + font-weight: normal; + } + .rightSection { + font-size: 30px; + color: #222; + font-weight: bold; + + .total { + margin-left: 10px; + color: #c70850; + font-weight: bold; + .totalAcc { + margin-left: 10px; + } + } + } + } + .product { + display: flex; + flex-wrap: nowrap; + border-bottom: 1px solid #dadada; + box-sizing: border-box; + height: 389px; + &:last-child { + border-bottom: none; + box-sizing: border-box; + } + .leftBox { + width: 940px; + padding: 30px; + .checkBox { + display: flex; + align-items: center; + margin-bottom: 20px; + .productId { + font-size: 30px; + font-weight: 600; + text-align: left; + color: #767676; + margin-left: 12px; + } + } + .productInfo { + display: flex; + .leftSection { + .productImage { + width: 200px; + height: 200px; + border: 1px solid #dadada; + box-sizing: border-box; + } + } + .rightSection { + margin-left: 20px; + .productNm { + width: 600px; + font-size: 24px; + font-weight: bold; + line-height: 1.33; + color: #333; + .elip(2); + } + .optionNm { + margin-top: 10px; + width: 600px; + height: 30px; + font-size: 24px; + font-weight: normal; + line-height: 1.17; + letter-spacing: normal; + color: #808080; + .elip(1); + } + .accountBox { + display: flex; + align-items: center; + margin-top: 15px; + .account { + font-size: 30px; + font-weight: bold; + line-height: 0.93; + color: #c70850; + } + .accountInfo { + > span { + font-size: 24px; + font-weight: normal; + color: #767676; + border-left: 2px solid #808080; + padding-left: 11px; + padding-right: 9px; + &:first-child { + border-left: none; + padding-left: 6px; + } + } + // 동일 코드로 인한 상위에서 공통 처리. + // .originalAcc { + // } + // .optionAcc { + // } + // .shippingAcc { + // } + } + } + .eaBox { + margin-top: 30px; + display: flex; + .minusBox { + width: 90px; + height: 90px; + background-size: contain; + background-image: url("../../../assets/images/btn/btn-quantity-decrease-nor@3x.png"); + &.dimm { + background-color: #fff; + background-image: url("../../../assets/images/btn/btn-quantity-decrease-dim_new@3x.png"); + } + &:focus { + background-image: url("../../../assets/images/btn/btn-quantity-decrease-foc@3x.png"); + } + } + .ea { + width: 210px; + height: 90px; + display: flex; + justify-content: center; + align-items: center; + font-size: 24px; + color: #808080; + font-weight: normal; + } + .plusBox { + width: 90px; + height: 90px; + background-size: contain; + background-image: url("../../../assets/images/btn/btn-quantity-increase-nor@3x.png"); + &.dimm { + background-image: url("../../../assets/images/btn/btn-quantity-increase-dim@3x.png"); + } + &:focus { + background-image: url("../../../assets/images/btn/btn-quantity-increase-foc@3x.png"); + } + } + } + } + } + } + .rightBox { + width: 260px; + display: flex; + justify-content: center; + align-items: center; + border-left: 1px solid #dadada; + box-sizing: border-box; + .trashImg { + width: 60px; + height: 60px; + background-color: #fff; + background-image: url("../../../assets/images/btn/btn-60-delete-nor.svg"); + &:focus { + background-image: url("../../../assets/images/btn/btn-60-delete-foc.svg"); + } + } + } + } +} diff --git a/com.twin.app.shoptime/src/views/CartPanel/CartProductBar.jsx b/com.twin.app.shoptime/src/views/CartPanel/CartProductBar.jsx new file mode 100644 index 00000000..d1a36cbf --- /dev/null +++ b/com.twin.app.shoptime/src/views/CartPanel/CartProductBar.jsx @@ -0,0 +1,23 @@ +import React, { useMemo } from 'react'; + +import SpotlightContainerDecorator + from '@enact/spotlight/SpotlightContainerDecorator'; + +import CartProduct from './CartProduct'; +import css from './CartProductBar.module.less'; + +const CartProductBar = ({ scrollOptions = {} }) => { + const Container = SpotlightContainerDecorator("div"); + + const randomCount = useMemo(() => Math.floor(Math.random() * 3) + 1, []); + + return ( + + {Array.from({ length: randomCount }, (_, index) => ( + + ))} + + ); +}; + +export default CartProductBar; diff --git a/com.twin.app.shoptime/src/views/CartPanel/CartProductBar.module.less b/com.twin.app.shoptime/src/views/CartPanel/CartProductBar.module.less new file mode 100644 index 00000000..d546c3be --- /dev/null +++ b/com.twin.app.shoptime/src/views/CartPanel/CartProductBar.module.less @@ -0,0 +1,13 @@ +@import "../../style/CommonStyle.module.less"; +@import "../../style/utils.module.less"; + +.productContainer { + background-color: #f8f8f8; + width: 1320px; + height: 100%; + padding: 60px; + .tScroller { + width: 100%; + height: 100%; + } +} diff --git a/com.twin.app.shoptime/src/views/CartPanel/CartSidebar.jsx b/com.twin.app.shoptime/src/views/CartPanel/CartSidebar.jsx index 2ba686db..53049efc 100644 --- a/com.twin.app.shoptime/src/views/CartPanel/CartSidebar.jsx +++ b/com.twin.app.shoptime/src/views/CartPanel/CartSidebar.jsx @@ -23,7 +23,7 @@ const CartSidebar = () => {
Subtotal
{mockData.itemCount} Items - +
Subtotal @@ -31,27 +31,38 @@ const CartSidebar = () => {
Option - {formatPrice(mockData.optionTotal)} + + {formatPrice(mockData.optionTotal)} +
S&H - {formatPrice(mockData.shippingHandling)} + + {formatPrice(mockData.shippingHandling)} +
- Order Total (Before Tax) - {formatPrice(mockData.orderTotalBeforeTax)} + + Order Total
+ (Before Tax) +
+ + {formatPrice(mockData.orderTotalBeforeTax)} +

- • Final costs will be available on your Order Review before you place order + • Final costs will be available on your Order Review before you place + order

- • By proceeding, you agree to ShopTime's General Terms of Use and acknowledge the Privacy - Statement + • By proceeding, you agree to ShopTime's + General Terms of Use and acknowledge the + Privacy Statement

@@ -59,7 +70,7 @@ const CartSidebar = () => { console.log('Checkout clicked')} + onClick={() => console.log("Checkout clicked")} > Checkout diff --git a/com.twin.app.shoptime/src/views/CartPanel/CartSidebar.module.less b/com.twin.app.shoptime/src/views/CartPanel/CartSidebar.module.less index c7fe6f79..60e64008 100644 --- a/com.twin.app.shoptime/src/views/CartPanel/CartSidebar.module.less +++ b/com.twin.app.shoptime/src/views/CartPanel/CartSidebar.module.less @@ -5,115 +5,141 @@ flex-direction: column; width: 100%; height: 100%; - padding: 60px; + // padding: 60px; + padding-top: 60px; color: #ffffff; } -.summarySection { - margin-bottom: 40px; -} - .header { width: 480px; height: 40px; margin: 0 60px 20px; - padding: 9px 0; + // padding: 9px 0; // background-color: #000; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + text-transform: uppercase; + .title { + width: 148px; + height: 22px; + font-family: LGSmartUI; + font-size: 30px; + font-weight: bold; + font-stretch: normal; + font-style: normal; + line-height: normal; + letter-spacing: normal; + text-align: left; + color: #fff; + } + + .itemCount { + width: 114px; + height: 22px; + font-family: LGSmartUI; + font-size: 30.5px; + font-weight: bold; + font-stretch: normal; + font-style: normal; + line-height: normal; + letter-spacing: normal; + text-align: right; + color: #e50459; + } } -.title { - width: 148px; - height: 22px; - margin: 0 218px 0 0; - font-family: LGSmartUI; - font-size: 30px; - font-weight: bold; - font-stretch: normal; - font-style: normal; - line-height: normal; - letter-spacing: normal; - text-align: left; - color: #fff; -} - -.itemCount { - font-size: 14px; - color: #cccccc; +.borderLine { + width: 480px; + height: 1px; + margin: 20px 60px; + opacity: 0.1; + background-color: #fff; } .priceList { - margin-bottom: 20px; -} + margin-bottom: 40px; + padding: 0 60px; + .priceItem { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 12px; + } -.priceItem { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 12px; -} + .priceItem:last-child { + margin-bottom: 0; + } -.priceItem:last-child { - margin-bottom: 0; -} + .label { + font-size: 24px; + color: #ccc; + } -.label { - font-size: 14px; - color: #cccccc; + .value { + font-size: 24px; + color: #ccc; + font-weight: 500; + } } - -.value { - font-size: 14px; - color: #ffffff; - font-weight: 500; -} - .totalRow { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; - border-top: 1px solid #4a5568; -} + padding: 20px 60px; + background-color: rgba(255, 255, 255, 0.1); + .totalLabel { + font-size: 30px; + font-weight: bold; + color: #ffffff; + text-transform: uppercase; + .totalLabelSub { + font-size: 24px; + color: #ccc; + font-weight: normal; + text-transform: none; + } + } -.totalLabel { - font-size: 16px; - font-weight: 600; - color: #ffffff; -} - -.totalValue { - font-size: 18px; - font-weight: 700; - color: #ffffff; + .totalValue { + font-size: 42px; + font-weight: bold; + color: #ffffff; + } } .notesSection { - margin-bottom: 40px; -} + margin-top: 306px; + padding: 0 60px; + .note { + font-size: 18px; + color: #ccc; + line-height: 1.22; + margin: 0; + margin-bottom: 12px; + > a { + margin-left: 4px; + } + } -.note { - font-size: 12px; - color: #999999; - line-height: 1.4; - margin: 0; - margin-bottom: 12px; -} - -.note:last-child { - margin-bottom: 0; + .note:last-child { + margin-bottom: 0; + } } .buttonSection { - margin-top: auto; + margin-top: 32px; + text-align: center; + .checkoutButton { + width: 480px; + height: 78px; + background-color: #c70850; + color: #ffffff; + border: none; + border-radius: 6px; + font-size: 30px; + font-weight: bold; + } } - -.checkoutButton { - width: 100%; - height: 50px; - background-color: #007bff; - color: #ffffff; - border: none; - border-radius: 6px; - font-size: 16px; - font-weight: 600; -} \ No newline at end of file