@customafk/lunas-ui 0.1.25 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{avatar-BaxX-xI9.mjs → avatar-DCbv3HzU.mjs} +1 -1
- package/dist/{avatar-BaxX-xI9.mjs.map → avatar-DCbv3HzU.mjs.map} +1 -1
- package/dist/{avatar-dAu1c0bC.cjs → avatar-aVxo69zP.cjs} +1 -1
- package/dist/{avatar-dAu1c0bC.cjs.map → avatar-aVxo69zP.cjs.map} +1 -1
- package/dist/badge-BncGz_13.mjs +2 -0
- package/dist/badge-BncGz_13.mjs.map +1 -0
- package/dist/badge-xKNC7uv3.cjs +2 -0
- package/dist/badge-xKNC7uv3.cjs.map +1 -0
- package/dist/{button-CPlyY35o.d.cts → button-B7vZ6hCr.d.cts} +3 -3
- package/dist/{button-CyABYH6s.d.mts → button-BHw0fbR9.d.mts} +3 -3
- package/dist/card-CWAdGhMr.mjs.map +1 -1
- package/dist/card-wGoU4Xiq.cjs.map +1 -1
- package/dist/cards/grid-product-card.cjs +1 -1
- package/dist/cards/grid-product-card.mjs +1 -1
- package/dist/cards/product-card.cjs +1 -1
- package/dist/cards/product-card.mjs +1 -1
- package/dist/{close-CGei_VQ6.mjs → close-BuQ2DHur.mjs} +1 -1
- package/dist/{close-CGei_VQ6.mjs.map → close-BuQ2DHur.mjs.map} +1 -1
- package/dist/{close-CXhpIVAZ.cjs → close-DvsVM8lM.cjs} +1 -1
- package/dist/{close-CXhpIVAZ.cjs.map → close-DvsVM8lM.cjs.map} +1 -1
- package/dist/{command-BLlJzBw9.mjs → command-BKiAU1oU.mjs} +2 -2
- package/dist/{command-BLlJzBw9.mjs.map → command-BKiAU1oU.mjs.map} +1 -1
- package/dist/{command-B8Tbe4oe.cjs → command-BqSzRw6j.cjs} +2 -2
- package/dist/{command-B8Tbe4oe.cjs.map → command-BqSzRw6j.cjs.map} +1 -1
- package/dist/data-display/country.d.mts +1 -1
- package/dist/data-display/date-tooltip.cjs +1 -1
- package/dist/data-display/date-tooltip.cjs.map +1 -1
- package/dist/data-display/date-tooltip.mjs +1 -1
- package/dist/data-display/date-tooltip.mjs.map +1 -1
- package/dist/data-display/empty.d.mts +2 -2
- package/dist/data-display/name.cjs +1 -1
- package/dist/data-display/name.mjs +1 -1
- package/dist/data-display/phone-number.cjs +1 -1
- package/dist/data-display/phone-number.mjs +1 -1
- package/dist/data-display/role-badge.cjs +1 -1
- package/dist/data-display/role-badge.cjs.map +1 -1
- package/dist/data-display/role-badge.d.mts +1 -1
- package/dist/data-display/role-badge.mjs +1 -1
- package/dist/data-display/role-badge.mjs.map +1 -1
- package/dist/data-display/statistic.cjs +1 -1
- package/dist/data-display/statistic.cjs.map +1 -1
- package/dist/data-display/statistic.d.mts +2 -2
- package/dist/data-display/statistic.mjs +1 -1
- package/dist/data-display/statistic.mjs.map +1 -1
- package/dist/data-display/user.cjs +1 -1
- package/dist/data-display/user.mjs +1 -1
- package/dist/{dialog-C1fYq5rO.d.cts → dialog-CJ6_Ub9h.d.cts} +12 -12
- package/dist/{dialog-eqSp0Cdp.d.mts → dialog-DCGh9rA6.d.mts} +12 -12
- package/dist/{dialog-DZ_gg6Ol.cjs → dialog-DVwvHuQB.cjs} +2 -2
- package/dist/{dialog-DZ_gg6Ol.cjs.map → dialog-DVwvHuQB.cjs.map} +1 -1
- package/dist/{dialog-DeZVOOmh.mjs → dialog-bd77jxcu.mjs} +2 -2
- package/dist/{dialog-DeZVOOmh.mjs.map → dialog-bd77jxcu.mjs.map} +1 -1
- package/dist/dialogs/detail-dialog/component/sidebar.cjs +1 -1
- package/dist/dialogs/detail-dialog/component/sidebar.d.cts +28 -28
- package/dist/dialogs/detail-dialog/component/sidebar.d.mts +4 -4
- package/dist/dialogs/detail-dialog/component/sidebar.mjs +1 -1
- package/dist/dialogs/detail-dialog/index.cjs +1 -1
- package/dist/dialogs/detail-dialog/index.mjs +1 -1
- package/dist/dialogs/loading-dialog.cjs +1 -1
- package/dist/dialogs/loading-dialog.mjs +1 -1
- package/dist/{drawer-272Fecsq.mjs → drawer-ClbO_Gt0.mjs} +1 -1
- package/dist/{drawer-272Fecsq.mjs.map → drawer-ClbO_Gt0.mjs.map} +1 -1
- package/dist/{drawer-y-Yrqskp.cjs → drawer-DluJOnDX.cjs} +1 -1
- package/dist/{drawer-y-Yrqskp.cjs.map → drawer-DluJOnDX.cjs.map} +1 -1
- package/dist/{dropdown-menu-CtU6oBI4.mjs → dropdown-menu-DPhbyDEo.mjs} +1 -1
- package/dist/{dropdown-menu-CtU6oBI4.mjs.map → dropdown-menu-DPhbyDEo.mjs.map} +1 -1
- package/dist/{dropdown-menu-C_dw8mro.cjs → dropdown-menu-DQs_Lvq7.cjs} +1 -1
- package/dist/{dropdown-menu-C_dw8mro.cjs.map → dropdown-menu-DQs_Lvq7.cjs.map} +1 -1
- package/dist/features/search-modal/index.cjs +1 -1
- package/dist/features/search-modal/index.d.mts +2 -2
- package/dist/features/search-modal/index.mjs +1 -1
- package/dist/features/tables/index.cjs +1 -1
- package/dist/features/tables/index.cjs.map +1 -1
- package/dist/features/tables/index.d.cts +36 -5
- package/dist/features/tables/index.d.mts +36 -5
- package/dist/features/tables/index.mjs +1 -1
- package/dist/features/tables/index.mjs.map +1 -1
- package/dist/features/tanstack-form/index.cjs +1 -1
- package/dist/features/tanstack-form/index.mjs +1 -1
- package/dist/{image-BwbAQRxx.mjs → image-CbKDFah7.mjs} +2 -2
- package/dist/{image-BwbAQRxx.mjs.map → image-CbKDFah7.mjs.map} +1 -1
- package/dist/{image-C-XEJWcw.cjs → image-D5vQS72z.cjs} +2 -2
- package/dist/{image-C-XEJWcw.cjs.map → image-D5vQS72z.cjs.map} +1 -1
- package/dist/{input-DhUevNkc.cjs → input-C1BXP8dd.cjs} +1 -1
- package/dist/{input-DhUevNkc.cjs.map → input-C1BXP8dd.cjs.map} +1 -1
- package/dist/{input-CC10BdKh.mjs → input-C1K2wbv1.mjs} +1 -1
- package/dist/{input-CC10BdKh.mjs.map → input-C1K2wbv1.mjs.map} +1 -1
- package/dist/{input-CsRVSfuH.d.cts → input-CI0cxzOK.d.cts} +3 -3
- package/dist/{input-B8fOADyL.d.mts → input-Cp8lUixC.d.mts} +3 -3
- package/dist/{label-CaBktIhh.cjs → label-CkTb259R.cjs} +1 -1
- package/dist/{label-CaBktIhh.cjs.map → label-CkTb259R.cjs.map} +1 -1
- package/dist/{label-DVfxfyG5.mjs → label-DwmJnk4H.mjs} +1 -1
- package/dist/{label-DVfxfyG5.mjs.map → label-DwmJnk4H.mjs.map} +1 -1
- package/dist/layouts/app-layout/index.cjs +1 -1
- package/dist/layouts/app-layout/index.d.cts +28 -28
- package/dist/layouts/app-layout/index.d.mts +26 -26
- package/dist/layouts/app-layout/index.mjs +1 -1
- package/dist/layouts/cms-layout/index.cjs +1 -1
- package/dist/layouts/cms-layout/index.mjs +1 -1
- package/dist/layouts/flex.d.cts +2 -2
- package/dist/layouts/flex.d.mts +2 -2
- package/dist/layouts/service-layout/index.cjs +1 -1
- package/dist/layouts/service-layout/index.d.cts +13 -13
- package/dist/layouts/service-layout/index.d.mts +3 -3
- package/dist/layouts/service-layout/index.mjs +1 -1
- package/dist/pages/FeatureDeveloping.d.cts +2 -2
- package/dist/pages/FeatureDeveloping.d.mts +2 -2
- package/dist/pages/FeatureFixing.d.mts +2 -2
- package/dist/pages/NotAuthorized.d.cts +2 -2
- package/dist/pages/NotFound.d.mts +2 -2
- package/dist/{resizable-D8XbQdj_.cjs → resizable-C2-dXaDM.cjs} +1 -1
- package/dist/{resizable-D8XbQdj_.cjs.map → resizable-C2-dXaDM.cjs.map} +1 -1
- package/dist/{resizable-B9HHrfKn.mjs → resizable-LConLbS6.mjs} +1 -1
- package/dist/{resizable-B9HHrfKn.mjs.map → resizable-LConLbS6.mjs.map} +1 -1
- package/dist/{scroll-area-CiMS2UY7.mjs → scroll-area-6xusEFm6.mjs} +1 -1
- package/dist/{scroll-area-CiMS2UY7.mjs.map → scroll-area-6xusEFm6.mjs.map} +1 -1
- package/dist/{scroll-area-qE6GqGkn.cjs → scroll-area-D61j6n8I.cjs} +1 -1
- package/dist/{scroll-area-qE6GqGkn.cjs.map → scroll-area-D61j6n8I.cjs.map} +1 -1
- package/dist/{separator-BlXmdu-p.d.cts → separator-BjY6jrIo.d.mts} +3 -3
- package/dist/{separator-D3CGKwyf.cjs → separator-Crr30ZHa.cjs} +1 -1
- package/dist/{separator-D3CGKwyf.cjs.map → separator-Crr30ZHa.cjs.map} +1 -1
- package/dist/{separator-DjuElvvp.d.mts → separator-egTcgvBz.d.cts} +3 -3
- package/dist/{separator-C2yOD6r_.mjs → separator-yTKDuMWb.mjs} +1 -1
- package/dist/{separator-C2yOD6r_.mjs.map → separator-yTKDuMWb.mjs.map} +1 -1
- package/dist/{sheet-DXLayspn.mjs → sheet-BSeiP8S8.mjs} +1 -1
- package/dist/{sheet-DXLayspn.mjs.map → sheet-BSeiP8S8.mjs.map} +1 -1
- package/dist/{sheet-DtWL6WcJ.cjs → sheet-BYKV6xT_.cjs} +1 -1
- package/dist/{sheet-DtWL6WcJ.cjs.map → sheet-BYKV6xT_.cjs.map} +1 -1
- package/dist/skeleton-C4suljHP.cjs.map +1 -1
- package/dist/skeleton-CvZncisJ.mjs.map +1 -1
- package/dist/{tabs-DSofRReg.cjs → tabs-DldSJjLy.cjs} +1 -1
- package/dist/{tabs-DSofRReg.cjs.map → tabs-DldSJjLy.cjs.map} +1 -1
- package/dist/{tabs-Cjh2jtUZ.mjs → tabs-XrUcxpL1.mjs} +1 -1
- package/dist/{tabs-Cjh2jtUZ.mjs.map → tabs-XrUcxpL1.mjs.map} +1 -1
- package/dist/{title-CMJS7QS7.mjs → title-BK1YcXjX.mjs} +1 -1
- package/dist/{title-CMJS7QS7.mjs.map → title-BK1YcXjX.mjs.map} +1 -1
- package/dist/{title-C4XNLXSe.cjs → title-BNv6aAfA.cjs} +1 -1
- package/dist/{title-C4XNLXSe.cjs.map → title-BNv6aAfA.cjs.map} +1 -1
- package/dist/{tooltip-D0XDvxqi.mjs → tooltip-BDaKTFKI.mjs} +1 -1
- package/dist/{tooltip-D0XDvxqi.mjs.map → tooltip-BDaKTFKI.mjs.map} +1 -1
- package/dist/{tooltip-zYWazsY5.cjs → tooltip-BimfNium.cjs} +1 -1
- package/dist/{tooltip-zYWazsY5.cjs.map → tooltip-BimfNium.cjs.map} +1 -1
- package/dist/{tooltip-BZ-lfeF_.d.mts → tooltip-BkSOfofW.d.cts} +6 -6
- package/dist/{tooltip-szcBtW8t.d.cts → tooltip-DCDdOvx6.d.mts} +6 -6
- package/dist/{types-D2kMOc_b.d.mts → types-DWnJKJ5r.d.mts} +1 -1
- package/dist/typography/paragraph.d.mts +2 -2
- package/dist/typography/title.cjs +1 -1
- package/dist/typography/title.d.cts +2 -2
- package/dist/typography/title.d.mts +2 -2
- package/dist/typography/title.mjs +1 -1
- package/dist/ui/alert-dialog.d.cts +12 -12
- package/dist/ui/alert-dialog.d.mts +12 -12
- package/dist/ui/alert.d.cts +4 -4
- package/dist/ui/aspect-ratio.d.cts +2 -2
- package/dist/ui/aspect-ratio.d.mts +2 -2
- package/dist/ui/avatar.cjs +1 -1
- package/dist/ui/avatar.d.cts +4 -4
- package/dist/ui/avatar.d.mts +4 -4
- package/dist/ui/avatar.mjs +1 -1
- package/dist/ui/badge.cjs +1 -2
- package/dist/ui/badge.d.cts +4 -4
- package/dist/ui/badge.d.mts +4 -4
- package/dist/ui/badge.mjs +1 -2
- package/dist/ui/breadcrumb.d.cts +8 -8
- package/dist/ui/breadcrumb.d.mts +8 -8
- package/dist/ui/button-group.cjs +1 -1
- package/dist/ui/button-group.d.cts +7 -7
- package/dist/ui/button-group.d.mts +5 -5
- package/dist/ui/button-group.mjs +1 -1
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.mts +1 -1
- package/dist/ui/calendar.d.cts +4 -4
- package/dist/ui/calendar.d.mts +4 -4
- package/dist/ui/card.d.cts +8 -8
- package/dist/ui/card.d.mts +8 -8
- package/dist/ui/carousel.d.cts +7 -7
- package/dist/ui/carousel.d.mts +7 -7
- package/dist/ui/collapsible.d.cts +4 -4
- package/dist/ui/collapsible.d.mts +4 -4
- package/dist/ui/command.cjs +1 -1
- package/dist/ui/command.d.cts +11 -11
- package/dist/ui/command.d.mts +11 -11
- package/dist/ui/command.mjs +1 -1
- package/dist/ui/context-menu.d.cts +16 -16
- package/dist/ui/context-menu.d.mts +16 -16
- package/dist/ui/dialog.cjs +1 -1
- package/dist/ui/dialog.d.cts +1 -1
- package/dist/ui/dialog.d.mts +1 -1
- package/dist/ui/dialog.mjs +1 -1
- package/dist/ui/drawer.cjs +1 -1
- package/dist/ui/drawer.d.cts +11 -11
- package/dist/ui/drawer.d.mts +11 -11
- package/dist/ui/drawer.mjs +1 -1
- package/dist/ui/dropdown-menu.cjs +1 -1
- package/dist/ui/dropdown-menu.d.cts +16 -16
- package/dist/ui/dropdown-menu.d.mts +16 -16
- package/dist/ui/dropdown-menu.mjs +1 -1
- package/dist/ui/empty.d.cts +7 -7
- package/dist/ui/empty.d.mts +9 -9
- package/dist/ui/field.cjs +1 -1
- package/dist/ui/field.d.cts +11 -11
- package/dist/ui/field.d.mts +13 -13
- package/dist/ui/field.mjs +1 -1
- package/dist/ui/file-uploader.d.cts +2 -2
- package/dist/ui/form.cjs +1 -1
- package/dist/ui/form.d.cts +7 -7
- package/dist/ui/form.d.mts +7 -7
- package/dist/ui/form.mjs +1 -1
- package/dist/ui/hover-card.d.cts +4 -4
- package/dist/ui/hover-card.d.mts +4 -4
- package/dist/ui/image.cjs +1 -1
- package/dist/ui/image.mjs +1 -1
- package/dist/ui/input-otp.d.cts +5 -5
- package/dist/ui/input-otp.d.mts +5 -5
- package/dist/ui/input.cjs +1 -1
- package/dist/ui/input.d.cts +1 -1
- package/dist/ui/input.d.mts +1 -1
- package/dist/ui/input.mjs +1 -1
- package/dist/ui/inputs/search-input.cjs +1 -1
- package/dist/ui/inputs/search-input.d.cts +3 -3
- package/dist/ui/inputs/search-input.d.mts +3 -3
- package/dist/ui/inputs/search-input.mjs +1 -1
- package/dist/ui/item.cjs +1 -1
- package/dist/ui/item.d.cts +12 -12
- package/dist/ui/item.d.mts +15 -15
- package/dist/ui/item.mjs +1 -1
- package/dist/ui/label.cjs +1 -1
- package/dist/ui/label.d.cts +2 -2
- package/dist/ui/label.mjs +1 -1
- package/dist/ui/menubar.d.cts +17 -17
- package/dist/ui/menubar.d.mts +17 -17
- package/dist/ui/multi-select.cjs +1 -1
- package/dist/ui/multi-select.d.mts +1 -1
- package/dist/ui/multi-select.mjs +1 -1
- package/dist/ui/navigation-menu.d.cts +9 -9
- package/dist/ui/navigation-menu.d.mts +9 -9
- package/dist/ui/pagination.d.cts +9 -9
- package/dist/ui/pagination.d.mts +9 -9
- package/dist/ui/popover.d.cts +5 -5
- package/dist/ui/popover.d.mts +5 -5
- package/dist/ui/progress.d.cts +2 -2
- package/dist/ui/progress.d.mts +2 -2
- package/dist/ui/radio-group.d.cts +3 -3
- package/dist/ui/radio-group.d.mts +3 -3
- package/dist/ui/resizable.cjs +1 -1
- package/dist/ui/resizable.d.cts +4 -4
- package/dist/ui/resizable.d.mts +4 -4
- package/dist/ui/resizable.mjs +1 -1
- package/dist/ui/scroll-area.cjs +1 -1
- package/dist/ui/scroll-area.d.cts +3 -3
- package/dist/ui/scroll-area.d.mts +3 -3
- package/dist/ui/scroll-area.mjs +1 -1
- package/dist/ui/select.d.cts +11 -11
- package/dist/ui/select.d.mts +11 -11
- package/dist/ui/separator.cjs +1 -1
- package/dist/ui/separator.d.cts +1 -1
- package/dist/ui/separator.d.mts +1 -1
- package/dist/ui/separator.mjs +1 -1
- package/dist/ui/sheet.cjs +1 -1
- package/dist/ui/sheet.d.cts +9 -9
- package/dist/ui/sheet.d.mts +9 -9
- package/dist/ui/sheet.mjs +1 -1
- package/dist/ui/sidebar.cjs +1 -1
- package/dist/ui/sidebar.d.cts +30 -30
- package/dist/ui/sidebar.d.mts +4 -4
- package/dist/ui/sidebar.mjs +1 -1
- package/dist/ui/skeleton.d.cts +2 -2
- package/dist/ui/skeleton.d.mts +2 -2
- package/dist/ui/slider.d.mts +2 -2
- package/dist/ui/sonner.d.cts +2 -2
- package/dist/ui/sonner.d.mts +2 -2
- package/dist/ui/spinner.d.cts +2 -2
- package/dist/ui/spinner.d.mts +2 -2
- package/dist/ui/switch.d.cts +2 -2
- package/dist/ui/switch.d.mts +2 -2
- package/dist/ui/table.d.cts +9 -9
- package/dist/ui/table.d.mts +9 -9
- package/dist/ui/tabs.cjs +1 -1
- package/dist/ui/tabs.d.cts +5 -5
- package/dist/ui/tabs.d.mts +5 -5
- package/dist/ui/tabs.mjs +1 -1
- package/dist/ui/textarea.d.cts +2 -2
- package/dist/ui/textarea.d.mts +2 -2
- package/dist/ui/toggle-group.d.cts +3 -3
- package/dist/ui/toggle-group.d.mts +3 -3
- package/dist/ui/toggle.d.cts +4 -4
- package/dist/ui/toggle.d.mts +2 -2
- package/dist/ui/tooltip.cjs +1 -1
- package/dist/ui/tooltip.d.cts +1 -1
- package/dist/ui/tooltip.d.mts +1 -1
- package/dist/ui/tooltip.mjs +1 -1
- package/package.json +1 -1
- package/dist/ui/badge.cjs.map +0 -1
- package/dist/ui/badge.mjs.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../card-wGoU4Xiq.cjs`);require(`../../button.variants-C--cfyfH.cjs`);const n=require(`../../button-DtFiUaY7.cjs`);require(`../../skeleton-C4suljHP.cjs`);const r=require(`../../image-C-XEJWcw.cjs`),i=require(`../../tooltip-zYWazsY5.cjs`),a=require(`../../avatar-dAu1c0bC.cjs`);require(`../../close-CXhpIVAZ.cjs`);const o=require(`../../dialog-DZ_gg6Ol.cjs`),s=require(`../../input-DhUevNkc.cjs`),c=require(`../../separator-D3CGKwyf.cjs`),l=require(`../../sheet-DtWL6WcJ.cjs`),u=require(`../../dropdown-menu-C_dw8mro.cjs`),d=require(`../../drawer-y-Yrqskp.cjs`),f=require(`../../tabs-DSofRReg.cjs`),p=require(`../../scroll-area-qE6GqGkn.cjs`);let m=require(`@customafk/react-toolkit/utils`),h=require(`react/jsx-runtime`),g=require(`lucide-react`),_=require(`react`),v=require(`class-variance-authority`),y=require(`radix-ui`),b=require(`@customafk/react-toolkit/hooks/useMobile`),x=require(`@customafk/react-toolkit/hooks/useMediaQuery`),S=require(`@react-oauth/google`),C=require(`@customafk/react-toolkit/hooks/useDebounceCallback`);const w=(0,_.createContext)(null),T=()=>{let e=(0,_.use)(w);if(!e)throw Error(`useServiceLayoutContext must be used within a ServiceLayoutProvider`);return e},E=({id:e,type:i,productName:a,imageUrl:o,quantity:c,price:l,options:u})=>{let{onDeletingCart:d,onUpdatingCart:f}=T(),[p,m]=(0,_.useState)(c),[v,y]=(0,_.useState)(!1),b=(0,C.useDebounceCallback)((0,_.useCallback)(()=>{f?.(e,p,i)},[f,e,p,i]),500),x=(0,_.useCallback)(e=>{e<1&&(e=1),e>99&&(e=99),m(e)},[]),S=(0,_.useCallback)(async()=>{y(!0),await d?.(e),y(!1)},[e,d]);return(0,_.useEffect)(()=>(p!==c&&b(),()=>{b.cancel()}),[p,c,b]),(0,h.jsxs)(t.t,{className:`border-border-weak relative mb-3 overflow-x-auto border p-4 shadow-none`,children:[v&&(0,h.jsx)(`div`,{className:`bg-muted-muted/80 absolute inset-0 z-10 flex items-center justify-center`,children:(0,h.jsx)(`div`,{className:`loader-dots`})}),(0,h.jsxs)(t.r,{className:`p-0`,children:[(0,h.jsxs)(n.t,{variant:`ghost`,size:`icon`,color:`muted`,disabled:v,className:`text-text-positive-weak absolute top-2 right-2 z-10`,onClick:S,children:[(0,h.jsx)(g.Trash2,{className:`h-4 w-4`}),(0,h.jsx)(`span`,{className:`sr-only`,children:`Remove item`})]}),(0,h.jsxs)(`div`,{className:`flex gap-3`,children:[(0,h.jsx)(`div`,{className:`relative size-20 flex-shrink-0`,children:o?(0,h.jsx)(r.t,{src:o,alt:a,className:`rounded-md border-none shadow-xs`,width:80,height:80}):(0,h.jsx)(`div`,{className:`bg-muted text-muted-foreground flex size-full items-center justify-center text-xs`,children:`No image`})}),(0,h.jsxs)(`div`,{className:`flex flex-1 flex-col`,children:[(0,h.jsx)(`div`,{className:`flex justify-between`,children:(0,h.jsx)(`h3`,{className:`text-text-positive line-clamp-1 text-sm font-medium`,children:a})}),(0,h.jsx)(`p`,{className:`text-text-positive-weak mb-1 text-xs`,children:u.map((e,t)=>(0,h.jsxs)(`span`,{children:[e.label,`: `,e.value,t<u.length-1&&`, `]},e.label))}),(0,h.jsxs)(`div`,{className:`mt-auto flex items-center justify-between`,children:[(0,h.jsxs)(`div`,{className:`flex items-center space-x-1`,children:[(0,h.jsx)(`button`,{disabled:p<=1,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>x(p-1),children:(0,h.jsx)(g.Minus,{size:12})}),(0,h.jsx)(s.t,{value:p,onChange:e=>x(parseInt(e.target.value||`1`)),className:`border-border h-6.5 w-14 rounded-md border p-1 text-center text-sm`,min:1}),(0,h.jsx)(`button`,{disabled:p>=99,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>x(p+1),children:(0,h.jsx)(g.Plus,{size:12})})]}),(0,h.jsxs)(`div`,{className:`text-sm font-semibold`,children:[(l*p).toLocaleString(),` ₫`]})]})]})]})]})]})},D=({items:e=[],cartType:t,className:r})=>{let i=e.reduce((e,t)=>e+t.price*t.quantity,0);return e.length===0?(0,h.jsxs)(`div`,{className:(0,m.cn)(`bg-muted-muted flex size-full max-h-80 flex-col items-center justify-center rounded-lg p-8`,r),children:[(0,h.jsx)(`div`,{className:`text-text-positive-weak bg-card shadow-card mb-4 flex size-20 items-center justify-center rounded-full text-5xl`,children:(0,h.jsx)(g.ShoppingBasketIcon,{size:42,strokeWidth:1})}),(0,h.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,h.jsx)(`p`,{className:`text-text-positive text-center text-base font-semibold`,children:`Giỏ hàng trống`}),(0,h.jsx)(`p`,{className:`text-text-positive-weak mb-4 text-center text-sm`,children:t===`in_stock`?`Thêm sản phẩm có sẵn vào giỏ hàng của bạn!`:`Thêm sản phẩm đặt trước vào giỏ hàng của bạn!`})]})]}):(0,h.jsxs)(`div`,{className:(0,m.cn)(`flex h-full flex-col space-y-4 overflow-y-auto`,r),children:[(0,h.jsx)(p.t,{className:`h-full flex-1`,children:e.map(e=>(0,h.jsx)(E,{...e,type:t},e.id))}),(0,h.jsxs)(`div`,{className:`flex-0 space-y-3`,children:[(0,h.jsxs)(`div`,{className:`flex justify-between`,children:[(0,h.jsx)(`span`,{className:`text-text-positive-weak text-sm`,children:`Tạm tính:`}),(0,h.jsxs)(`span`,{className:`text-sm`,children:[i.toLocaleString(),` ₫`]})]}),(0,h.jsx)(c.t,{}),(0,h.jsxs)(`div`,{className:`flex justify-between`,children:[(0,h.jsx)(`span`,{className:`text-text-positive font-medium`,children:`Tổng cộng:`}),(0,h.jsxs)(`span`,{className:`text-lg font-semibold`,children:[i.toLocaleString(),` ₫`]})]}),(0,h.jsx)(n.t,{className:`mt-2 w-full`,children:`Thanh toán ngay`}),t===`pre_order`&&(0,h.jsx)(`p`,{className:`text-text-positive-weak text-center text-xs italic`,children:`* Sản phẩm đặt trước sẽ được giao sau khi có hàng`})]})]})},O=(0,_.createContext)(null),k=()=>{let e=(0,_.use)(O);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e},ee=`sidebar_state`,te=3600*24*7,ne=`16rem`,re=`16rem`,ie=`3rem`,ae=`b`;function A({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...s}){let c=(0,b.useIsMobile)(),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(e),p=t??d,g=(0,_.useCallback)(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,p]),v=(0,_.useCallback)(()=>c?u(e=>!e):g(e=>!e),[c,g]);(0,_.useEffect)(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),v())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v]);let y=p?`expanded`:`collapsed`,x=(0,_.useMemo)(()=>({state:y,isMobile:c,toggleSidebar:v,open:p,setOpen:g,openMobile:l,setOpenMobile:u}),[y,p,g,c,l,v]);return(0,h.jsx)(O.Provider,{value:x,children:(0,h.jsx)(i.r,{delayDuration:0,children:(0,h.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...a},className:(0,m.cn)(`group/sidebar-wrapper`,`has-data-[variant=inset]:bg-sidebar`,`flex h-dvh w-full`,r),...s,children:o})})})}function j({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:s,openMobile:c,setOpenMobile:u}=k();return n===`none`?(0,h.jsx)(`aside`,{"data-slot":`sidebar`,className:(0,m.cn)(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...a,children:i}):o?(0,h.jsx)(l.t,{open:c,onOpenChange:u,children:(0,h.jsxs)(l.r,{side:`left`,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`16rem`},children:[(0,h.jsxs)(l.o,{className:`sr-only`,children:[(0,h.jsx)(l.s,{children:`Sidebar`}),(0,h.jsx)(l.i,{children:`Displays the mobile sidebar.`})]}),(0,h.jsxs)(`div`,{className:`flex size-full flex-col`,children:[(0,h.jsxs)(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[(0,h.jsx)(M,{}),(0,h.jsx)(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,h.jsx)(g.ShoppingCartIcon,{size:20})}),(0,h.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,h.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,h.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col p-2`,children:i})]})]})}):(0,h.jsxs)(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":s,"data-collapsible":s===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,h.jsx)(`div`,{"data-slot":`sidebar-gap`,className:(0,m.cn)(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,h.jsx)(`div`,{"data-slot":`sidebar-container`,className:(0,m.cn)(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:(0,h.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:(0,m.cn)(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:i})})]})}function M({className:e,onClick:t,...r}){let{toggleSidebar:i}=k();return(0,h.jsxs)(n.t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:(0,m.cn)(`size-10 rounded-full`,e),onClick:e=>{t?.(e),i()},...r,children:[(0,h.jsx)(g.MenuIcon,{className:`size-6!`}),(0,h.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function N({className:e,children:t,...n}){return(0,h.jsxs)(`main`,{"data-slot":`sidebar-inset`,className:(0,m.cn)(`relative flex w-full flex-1 flex-col`,e),...n,children:[(0,h.jsx)(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),(0,h.jsx)(`div`,{className:(0,m.cn)(`inset-shadow-sm flex-1`),children:t})]})}function P({className:e,children:t,...n}){let{open:r}=k(),{onLogout:i}=T();return(0,h.jsxs)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:(0,m.cn)(`flex flex-col gap-2`,e),...n,children:[t,(0,h.jsxs)(z,{children:[(0,h.jsx)(B,{children:(0,h.jsxs)(H,{className:`border border-border`,onClick:i,children:[(0,h.jsx)(g.LogOutIcon,{className:`text-text-positive-weak`}),`Đăng xuất`]})}),r&&(0,h.jsx)(B,{className:`mt-2 border-t border-t-border`,children:(0,h.jsx)(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})]})}function F({className:e,...t}){return(0,h.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:(0,m.cn)(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function I({className:e,...t}){return(0,h.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:(0,m.cn)(`relative flex w-full min-w-0 flex-col`,e),...t})}function L({className:e,asChild:t=!1,...n}){return(0,h.jsx)(t?y.Slot.Slot:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:(0,m.cn)(`flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-xs outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2`,`text-sidebar-foreground/70`,`ring-sidebar-ring`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8`,`group-data-[collapsible=icon]:opacity-0`,e),...n})}function R({className:e,...t}){return(0,h.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:(0,m.cn)(`w-full text-sm`,e),...t})}function z({className:e,...t}){return(0,h.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:(0,m.cn)(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function B({className:e,...t}){return(0,h.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:(0,m.cn)(`group/menu-item relative`,e),...t})}const V=(0,v.cva)(`peer/menu-button.cursor-pointer.flex w-full items-center gap-2.overflow-hidden rounded-md p-2 outline-hidden.truncate text-left.transition-[color,width,height,padding].hover:bg-sidebar-accent.hover:text-sidebar-accent-foreground.active:bg-sidebar-accent.active:text-sidebar-accent-foreground.disabled:pointer-events-none.disabled:opacity-50.group-has-data-[sidebar=menu-action]/menu-item:pr-8.aria-disabled:pointer-events-none.aria-disabled:opacity-50.data-[active=true]:bg-sidebar-primary-muted.data-[active=true]:font-medium.data-[active=true]:text-sidebar-primary.data-[state=open]:hover:bg-sidebar-accent.data-[state=open]:hover:text-sidebar-accent-foreground.group-data-[collapsible=icon]:size-12!.group-data-[collapsible=icon]:p-3!.group-data-[collapsible=icon]:gap-3!.[&>svg]:size-6.[&>svg]:shrink-0.[&>span:last-child]:truncate`.split(`.`),{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function H({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:a,className:o,...s}){let c=e?y.Slot.Slot:`button`,{isMobile:l,state:u}=k(),d=(0,h.jsx)(c,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:(0,m.cn)(V({variant:n,size:r}),o),...s});return a?(typeof a==`string`&&(a={children:a}),(0,h.jsxs)(i.t,{children:[(0,h.jsx)(i.i,{asChild:!0,children:d}),(0,h.jsx)(i.n,{side:`right`,align:`center`,hidden:u!==`collapsed`||l,...a})]})):d}const U=({isLoggedIn:e=!1,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c,children:l})=>(0,h.jsx)(w.Provider,{value:{isLoggedIn:e,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c},children:l}),W=({children:e})=>(0,h.jsx)(A,{children:e}),G=({userName:e=`Keith Kennedy`,userEmail:t=`k.kennedy@originui.com`,onLogout:r})=>(0,h.jsxs)(u.t,{children:[(0,h.jsx)(u.h,{asChild:!0,children:(0,h.jsx)(n.t,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-10 rounded-full`,children:(0,h.jsxs)(a.t,{className:`size-10`,children:[(0,h.jsx)(a.r,{}),(0,h.jsx)(a.n,{className:`size-full bg-muted-muted`,children:(0,h.jsx)(g.UserIcon,{})})]})})}),(0,h.jsxs)(u.r,{align:`end`,className:`max-w-64`,children:[(0,h.jsxs)(u.o,{className:`flex min-w-0 flex-col`,children:[(0,h.jsx)(`span`,{className:`truncate font-medium text-sm text-text-positive`,children:e}),(0,h.jsx)(`span`,{className:`truncate font-normal text-text-positive-weak text-xs`,children:t})]}),(0,h.jsx)(u.u,{}),(0,h.jsxs)(u.a,{onClick:r,children:[(0,h.jsx)(g.LogOutIcon,{size:16,"aria-hidden":`true`}),(0,h.jsx)(`span`,{className:`text-text-positive`,children:`Logout`})]})]})]}),K=()=>{let{inStockCarts:e=[],orderedCarts:t=[]}=T(),r=e.length,i=t.length,a=r+i;return(0,h.jsxs)(l.t,{children:[(0,h.jsx)(l.c,{asChild:!0,children:(0,h.jsx)(n.t,{size:`icon`,variant:`ghost`,color:`secondary`,className:`relative size-10 rounded-full`,children:(0,h.jsx)(g.ShoppingCartIcon,{})})}),(0,h.jsxs)(l.r,{className:`w-[95vw] sm:max-w-md`,children:[(0,h.jsx)(l.o,{className:`flex-0 border-border-weak border-b pb-3`,children:(0,h.jsxs)(l.s,{className:`flex items-center gap-2`,children:[(0,h.jsx)(g.ShoppingBag,{size:20}),(0,h.jsx)(`span`,{children:`Giỏ hàng của bạn`}),a>0&&(0,h.jsxs)(`span`,{className:`font-normal text-sm text-text-positive-weak`,children:[`(`,a,` sản phẩm)`]})]})}),(0,h.jsxs)(f.t,{defaultValue:i>0?`pre_order`:`in_stock`,className:`h-full flex-1 overflow-y-auto p-4 pt-0`,children:[(0,h.jsxs)(f.r,{className:`w-full flex-0`,children:[(0,h.jsxs)(f.i,{value:`in_stock`,className:`relative`,children:[`Có sẵn`,r>0&&(0,h.jsxs)(`span`,{children:[`(`,r,`)`]})]}),(0,h.jsxs)(f.i,{value:`pre_order`,className:`relative`,children:[`Đặt trước`,i>0&&(0,h.jsxs)(`span`,{children:[`(`,i,`)`]})]})]}),(0,h.jsx)(f.n,{value:`pre_order`,className:`flex-1 overflow-y-auto`,children:(0,h.jsx)(D,{items:t,cartType:`pre_order`})}),(0,h.jsx)(f.n,{value:`in_stock`,className:`flex-1 overflow-y-auto`,children:(0,h.jsx)(D,{items:e,cartType:`in_stock`})})]})]})]})},q=()=>{let{isLoggedIn:e,username:t,email:r,onGoogleLoginSuccess:i,onLogout:a}=T(),s=(0,x.useMediaQuery)(`(min-width: 640px)`),[l,u]=(0,_.useState)(!1);return(0,h.jsxs)(`header`,{className:(0,m.cn)(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[e&&(0,h.jsx)(M,{}),(0,h.jsxs)(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[(0,h.jsx)(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,h.jsx)(g.ShoppingCartIcon,{size:20})}),(0,h.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,h.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,h.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,h.jsxs)(`div`,{className:`flex flex-1 items-center justify-end gap-x-2`,children:[!e&&(0,h.jsxs)(n.t,{className:`w-8 sm:w-fit`,onClick:()=>u(!0),children:[(0,h.jsx)(g.LogInIcon,{}),(0,h.jsx)(`span`,{className:`sr-only sm:not-sr-only`,children:`Đăng nhập`})]}),e&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(G,{userName:t,userEmail:r,onLogout:a}),(0,h.jsx)(c.t,{orientation:`vertical`,className:`min-h-6 w-px`}),(0,h.jsx)(K,{})]})]}),s&&(0,h.jsx)(o.t,{open:l,onOpenChange:u,children:(0,h.jsxs)(o.r,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[(0,h.jsx)(o.o,{className:`flex-0 gap-2 p-6`,children:(0,h.jsx)(o.l,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),(0,h.jsx)(o.a,{className:`p-2`})]})}),!s&&(0,h.jsx)(d.t,{open:l,onOpenChange:u,children:(0,h.jsxs)(d.r,{children:[(0,h.jsx)(d.o,{className:`text-left`,children:(0,h.jsx)(d.l,{children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),(0,h.jsx)(d.a,{})]})})]})},J=({children:e,...t})=>{let{isLoggedIn:n}=T();return n?(0,h.jsx)(j,{variant:`inset`,collapsible:`icon`,...t,children:e}):null},Y=({children:e})=>{let{isLoggedIn:t,onGoogleLoginSuccess:r}=T(),i=(0,x.useMediaQuery)(`(min-width: 640px)`),[a,s]=(0,_.useState)(!1);return t?(0,h.jsx)(N,{children:(0,h.jsx)(`section`,{className:`relative size-full`,children:(0,h.jsx)(`div`,{className:`absolute inset-0 flex flex-col`,children:e})})}):(0,h.jsx)(`div`,{className:`size-full p-4 pt-[calc(var(--header-height)+1.5rem)]`,children:(0,h.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-center gap-6 rounded-lg bg-card p-8 text-center shadow-card`,children:[(0,h.jsx)(`div`,{className:`flex size-20 items-center justify-center rounded-full bg-muted-foreground/10`,children:(0,h.jsx)(g.LockIcon,{className:`size-10 text-primary`})}),(0,h.jsxs)(`div`,{className:`flex max-w-md flex-col gap-2`,children:[(0,h.jsx)(`h2`,{className:`font-semibold text-2xl`,children:`Bạn chưa đăng nhập`}),(0,h.jsx)(`p`,{className:`text-text-positive-weak`,children:`Đăng nhập để khám phá đầy đủ các tính năng của Lunas Store và truy cập vào tài khoản của bạn.`})]}),(0,h.jsxs)(n.t,{size:`lg`,className:`gap-2`,onClick:()=>s(!0),children:[(0,h.jsx)(g.LogInIcon,{size:18}),(0,h.jsx)(`span`,{children:`Đăng nhập ngay`})]}),i&&(0,h.jsx)(o.t,{open:a,onOpenChange:s,children:(0,h.jsxs)(o.r,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[(0,h.jsx)(o.o,{className:`flex-0 gap-2 p-6`,children:(0,h.jsx)(o.l,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),s(!1))}})]})})}),(0,h.jsx)(o.a,{className:`p-2`})]})}),!i&&(0,h.jsx)(d.t,{open:a,onOpenChange:s,children:(0,h.jsxs)(d.r,{children:[(0,h.jsx)(d.o,{className:`text-left`,children:(0,h.jsx)(d.l,{children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),s(!1))}})]})})}),(0,h.jsx)(d.a,{})]})})]})})},X=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-header`,className:(0,m.cn)(`flex-0 snap-start`,e),children:t}),Z=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-content`,className:(0,m.cn)(`flex w-full flex-1 flex-col gap-4 overflow-y-auto px-2 sm:px-4`,e),children:t}),Q=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-footer`,className:(0,m.cn)(`hidden w-full flex-0 border-border-weak border-t pt-2 sm:flex`,e),children:t}),$=({children:e,className:t})=>(0,h.jsx)(`div`,{"data-slot":`main-group`,className:(0,m.cn)(`flex size-full flex-col gap-4`,t),children:e}),oe=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-group-content`,className:(0,m.cn)(`size-full max-w-8xl flex-1 rounded-md bg-card p-4 shadow-card`,e),children:t});exports.ServiceLayoutCartInfo=K,exports.ServiceLayoutHeader=q,exports.ServiceLayoutMain=Y,exports.ServiceLayoutMainContent=Z,exports.ServiceLayoutMainFooter=Q,exports.ServiceLayoutMainGroup=$,exports.ServiceLayoutMainGroupContent=oe,exports.ServiceLayoutMainHeader=X,exports.ServiceLayoutProvider=U,exports.ServiceLayoutSidebar=J,exports.ServiceLayoutSidebarContent=F,exports.ServiceLayoutSidebarFooter=P,exports.ServiceLayoutSidebarGroup=I,exports.ServiceLayoutSidebarGroupContent=R,exports.ServiceLayoutSidebarGroupLabel=L,exports.ServiceLayoutSidebarMenu=z,exports.ServiceLayoutSidebarMenuButton=H,exports.ServiceLayoutSidebarMenuItem=B,exports.ServiceLayoutUserInfo=G,exports.ServiceLayoutWrapper=W;
|
|
1
|
+
const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../card-wGoU4Xiq.cjs`);require(`../../button.variants-C--cfyfH.cjs`);const n=require(`../../button-DtFiUaY7.cjs`);require(`../../skeleton-C4suljHP.cjs`);const r=require(`../../image-D5vQS72z.cjs`),i=require(`../../tooltip-BimfNium.cjs`),a=require(`../../avatar-aVxo69zP.cjs`);require(`../../close-DvsVM8lM.cjs`);const o=require(`../../dialog-DVwvHuQB.cjs`),s=require(`../../input-C1BXP8dd.cjs`),c=require(`../../separator-Crr30ZHa.cjs`),l=require(`../../sheet-BYKV6xT_.cjs`),u=require(`../../dropdown-menu-DQs_Lvq7.cjs`),d=require(`../../drawer-DluJOnDX.cjs`),f=require(`../../tabs-DldSJjLy.cjs`),p=require(`../../scroll-area-D61j6n8I.cjs`);let m=require(`@customafk/react-toolkit/utils`),h=require(`react/jsx-runtime`),g=require(`lucide-react`),_=require(`react`),v=require(`class-variance-authority`),y=require(`radix-ui`),b=require(`@customafk/react-toolkit/hooks/useMobile`),x=require(`@customafk/react-toolkit/hooks/useMediaQuery`),S=require(`@react-oauth/google`),C=require(`@customafk/react-toolkit/hooks/useDebounceCallback`);const w=(0,_.createContext)(null),T=()=>{let e=(0,_.use)(w);if(!e)throw Error(`useServiceLayoutContext must be used within a ServiceLayoutProvider`);return e},E=({id:e,type:i,productName:a,imageUrl:o,quantity:c,price:l,options:u})=>{let{onDeletingCart:d,onUpdatingCart:f}=T(),[p,m]=(0,_.useState)(c),[v,y]=(0,_.useState)(!1),b=(0,C.useDebounceCallback)((0,_.useCallback)(()=>{f?.(e,p,i)},[f,e,p,i]),500),x=(0,_.useCallback)(e=>{e<1&&(e=1),e>99&&(e=99),m(e)},[]),S=(0,_.useCallback)(async()=>{y(!0),await d?.(e),y(!1)},[e,d]);return(0,_.useEffect)(()=>(p!==c&&b(),()=>{b.cancel()}),[p,c,b]),(0,h.jsxs)(t.t,{className:`border-border-weak relative mb-3 overflow-x-auto border p-4 shadow-none`,children:[v&&(0,h.jsx)(`div`,{className:`bg-muted-muted/80 absolute inset-0 z-10 flex items-center justify-center`,children:(0,h.jsx)(`div`,{className:`loader-dots`})}),(0,h.jsxs)(t.r,{className:`p-0`,children:[(0,h.jsxs)(n.t,{variant:`ghost`,size:`icon`,color:`muted`,disabled:v,className:`text-text-positive-weak absolute top-2 right-2 z-10`,onClick:S,children:[(0,h.jsx)(g.Trash2,{className:`h-4 w-4`}),(0,h.jsx)(`span`,{className:`sr-only`,children:`Remove item`})]}),(0,h.jsxs)(`div`,{className:`flex gap-3`,children:[(0,h.jsx)(`div`,{className:`relative size-20 flex-shrink-0`,children:o?(0,h.jsx)(r.t,{src:o,alt:a,className:`rounded-md border-none shadow-xs`,width:80,height:80}):(0,h.jsx)(`div`,{className:`bg-muted text-muted-foreground flex size-full items-center justify-center text-xs`,children:`No image`})}),(0,h.jsxs)(`div`,{className:`flex flex-1 flex-col`,children:[(0,h.jsx)(`div`,{className:`flex justify-between`,children:(0,h.jsx)(`h3`,{className:`text-text-positive line-clamp-1 text-sm font-medium`,children:a})}),(0,h.jsx)(`p`,{className:`text-text-positive-weak mb-1 text-xs`,children:u.map((e,t)=>(0,h.jsxs)(`span`,{children:[e.label,`: `,e.value,t<u.length-1&&`, `]},e.label))}),(0,h.jsxs)(`div`,{className:`mt-auto flex items-center justify-between`,children:[(0,h.jsxs)(`div`,{className:`flex items-center space-x-1`,children:[(0,h.jsx)(`button`,{disabled:p<=1,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>x(p-1),children:(0,h.jsx)(g.Minus,{size:12})}),(0,h.jsx)(s.t,{value:p,onChange:e=>x(parseInt(e.target.value||`1`)),className:`border-border h-6.5 w-14 rounded-md border p-1 text-center text-sm`,min:1}),(0,h.jsx)(`button`,{disabled:p>=99,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>x(p+1),children:(0,h.jsx)(g.Plus,{size:12})})]}),(0,h.jsxs)(`div`,{className:`text-sm font-semibold`,children:[(l*p).toLocaleString(),` ₫`]})]})]})]})]})]})},D=({items:e=[],cartType:t,className:r})=>{let i=e.reduce((e,t)=>e+t.price*t.quantity,0);return e.length===0?(0,h.jsxs)(`div`,{className:(0,m.cn)(`bg-muted-muted flex size-full max-h-80 flex-col items-center justify-center rounded-lg p-8`,r),children:[(0,h.jsx)(`div`,{className:`text-text-positive-weak bg-card shadow-card mb-4 flex size-20 items-center justify-center rounded-full text-5xl`,children:(0,h.jsx)(g.ShoppingBasketIcon,{size:42,strokeWidth:1})}),(0,h.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,h.jsx)(`p`,{className:`text-text-positive text-center text-base font-semibold`,children:`Giỏ hàng trống`}),(0,h.jsx)(`p`,{className:`text-text-positive-weak mb-4 text-center text-sm`,children:t===`in_stock`?`Thêm sản phẩm có sẵn vào giỏ hàng của bạn!`:`Thêm sản phẩm đặt trước vào giỏ hàng của bạn!`})]})]}):(0,h.jsxs)(`div`,{className:(0,m.cn)(`flex h-full flex-col space-y-4 overflow-y-auto`,r),children:[(0,h.jsx)(p.t,{className:`h-full flex-1`,children:e.map(e=>(0,h.jsx)(E,{...e,type:t},e.id))}),(0,h.jsxs)(`div`,{className:`flex-0 space-y-3`,children:[(0,h.jsxs)(`div`,{className:`flex justify-between`,children:[(0,h.jsx)(`span`,{className:`text-text-positive-weak text-sm`,children:`Tạm tính:`}),(0,h.jsxs)(`span`,{className:`text-sm`,children:[i.toLocaleString(),` ₫`]})]}),(0,h.jsx)(c.t,{}),(0,h.jsxs)(`div`,{className:`flex justify-between`,children:[(0,h.jsx)(`span`,{className:`text-text-positive font-medium`,children:`Tổng cộng:`}),(0,h.jsxs)(`span`,{className:`text-lg font-semibold`,children:[i.toLocaleString(),` ₫`]})]}),(0,h.jsx)(n.t,{className:`mt-2 w-full`,children:`Thanh toán ngay`}),t===`pre_order`&&(0,h.jsx)(`p`,{className:`text-text-positive-weak text-center text-xs italic`,children:`* Sản phẩm đặt trước sẽ được giao sau khi có hàng`})]})]})},O=(0,_.createContext)(null),k=()=>{let e=(0,_.use)(O);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e},ee=`sidebar_state`,te=3600*24*7,ne=`16rem`,re=`16rem`,ie=`3rem`,ae=`b`;function A({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...s}){let c=(0,b.useIsMobile)(),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(e),p=t??d,g=(0,_.useCallback)(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,p]),v=(0,_.useCallback)(()=>c?u(e=>!e):g(e=>!e),[c,g]);(0,_.useEffect)(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),v())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v]);let y=p?`expanded`:`collapsed`,x=(0,_.useMemo)(()=>({state:y,isMobile:c,toggleSidebar:v,open:p,setOpen:g,openMobile:l,setOpenMobile:u}),[y,p,g,c,l,v]);return(0,h.jsx)(O.Provider,{value:x,children:(0,h.jsx)(i.r,{delayDuration:0,children:(0,h.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...a},className:(0,m.cn)(`group/sidebar-wrapper`,`has-data-[variant=inset]:bg-sidebar`,`flex h-dvh w-full`,r),...s,children:o})})})}function j({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:s,openMobile:c,setOpenMobile:u}=k();return n===`none`?(0,h.jsx)(`aside`,{"data-slot":`sidebar`,className:(0,m.cn)(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...a,children:i}):o?(0,h.jsx)(l.t,{open:c,onOpenChange:u,children:(0,h.jsxs)(l.r,{side:`left`,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`16rem`},children:[(0,h.jsxs)(l.o,{className:`sr-only`,children:[(0,h.jsx)(l.s,{children:`Sidebar`}),(0,h.jsx)(l.i,{children:`Displays the mobile sidebar.`})]}),(0,h.jsxs)(`div`,{className:`flex size-full flex-col`,children:[(0,h.jsxs)(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[(0,h.jsx)(M,{}),(0,h.jsx)(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,h.jsx)(g.ShoppingCartIcon,{size:20})}),(0,h.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,h.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,h.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col p-2`,children:i})]})]})}):(0,h.jsxs)(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":s,"data-collapsible":s===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,h.jsx)(`div`,{"data-slot":`sidebar-gap`,className:(0,m.cn)(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,h.jsx)(`div`,{"data-slot":`sidebar-container`,className:(0,m.cn)(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:(0,h.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:(0,m.cn)(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:i})})]})}function M({className:e,onClick:t,...r}){let{toggleSidebar:i}=k();return(0,h.jsxs)(n.t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:(0,m.cn)(`size-10 rounded-full`,e),onClick:e=>{t?.(e),i()},...r,children:[(0,h.jsx)(g.MenuIcon,{className:`size-6!`}),(0,h.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function N({className:e,children:t,...n}){return(0,h.jsxs)(`main`,{"data-slot":`sidebar-inset`,className:(0,m.cn)(`relative flex w-full flex-1 flex-col`,e),...n,children:[(0,h.jsx)(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),(0,h.jsx)(`div`,{className:(0,m.cn)(`inset-shadow-sm flex-1`),children:t})]})}function P({className:e,children:t,...n}){let{open:r}=k(),{onLogout:i}=T();return(0,h.jsxs)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:(0,m.cn)(`flex flex-col gap-2`,e),...n,children:[t,(0,h.jsxs)(z,{children:[(0,h.jsx)(B,{children:(0,h.jsxs)(H,{className:`border border-border`,onClick:i,children:[(0,h.jsx)(g.LogOutIcon,{className:`text-text-positive-weak`}),`Đăng xuất`]})}),r&&(0,h.jsx)(B,{className:`mt-2 border-t border-t-border`,children:(0,h.jsx)(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})]})}function F({className:e,...t}){return(0,h.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:(0,m.cn)(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function I({className:e,...t}){return(0,h.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:(0,m.cn)(`relative flex w-full min-w-0 flex-col`,e),...t})}function L({className:e,asChild:t=!1,...n}){return(0,h.jsx)(t?y.Slot.Slot:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:(0,m.cn)(`flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-xs outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2`,`text-sidebar-foreground/70`,`ring-sidebar-ring`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8`,`group-data-[collapsible=icon]:opacity-0`,e),...n})}function R({className:e,...t}){return(0,h.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:(0,m.cn)(`w-full text-sm`,e),...t})}function z({className:e,...t}){return(0,h.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:(0,m.cn)(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function B({className:e,...t}){return(0,h.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:(0,m.cn)(`group/menu-item relative`,e),...t})}const V=(0,v.cva)(`peer/menu-button.cursor-pointer.flex w-full items-center gap-2.overflow-hidden rounded-md p-2 outline-hidden.truncate text-left.transition-[color,width,height,padding].hover:bg-sidebar-accent.hover:text-sidebar-accent-foreground.active:bg-sidebar-accent.active:text-sidebar-accent-foreground.disabled:pointer-events-none.disabled:opacity-50.group-has-data-[sidebar=menu-action]/menu-item:pr-8.aria-disabled:pointer-events-none.aria-disabled:opacity-50.data-[active=true]:bg-sidebar-primary-muted.data-[active=true]:font-medium.data-[active=true]:text-sidebar-primary.data-[state=open]:hover:bg-sidebar-accent.data-[state=open]:hover:text-sidebar-accent-foreground.group-data-[collapsible=icon]:size-12!.group-data-[collapsible=icon]:p-3!.group-data-[collapsible=icon]:gap-3!.[&>svg]:size-6.[&>svg]:shrink-0.[&>span:last-child]:truncate`.split(`.`),{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function H({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:a,className:o,...s}){let c=e?y.Slot.Slot:`button`,{isMobile:l,state:u}=k(),d=(0,h.jsx)(c,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:(0,m.cn)(V({variant:n,size:r}),o),...s});return a?(typeof a==`string`&&(a={children:a}),(0,h.jsxs)(i.t,{children:[(0,h.jsx)(i.i,{asChild:!0,children:d}),(0,h.jsx)(i.n,{side:`right`,align:`center`,hidden:u!==`collapsed`||l,...a})]})):d}const U=({isLoggedIn:e=!1,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c,children:l})=>(0,h.jsx)(w.Provider,{value:{isLoggedIn:e,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c},children:l}),W=({children:e})=>(0,h.jsx)(A,{children:e}),G=({userName:e=`Keith Kennedy`,userEmail:t=`k.kennedy@originui.com`,onLogout:r})=>(0,h.jsxs)(u.t,{children:[(0,h.jsx)(u.h,{asChild:!0,children:(0,h.jsx)(n.t,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-10 rounded-full`,children:(0,h.jsxs)(a.t,{className:`size-10`,children:[(0,h.jsx)(a.r,{}),(0,h.jsx)(a.n,{className:`size-full bg-muted-muted`,children:(0,h.jsx)(g.UserIcon,{})})]})})}),(0,h.jsxs)(u.r,{align:`end`,className:`max-w-64`,children:[(0,h.jsxs)(u.o,{className:`flex min-w-0 flex-col`,children:[(0,h.jsx)(`span`,{className:`truncate font-medium text-sm text-text-positive`,children:e}),(0,h.jsx)(`span`,{className:`truncate font-normal text-text-positive-weak text-xs`,children:t})]}),(0,h.jsx)(u.u,{}),(0,h.jsxs)(u.a,{onClick:r,children:[(0,h.jsx)(g.LogOutIcon,{size:16,"aria-hidden":`true`}),(0,h.jsx)(`span`,{className:`text-text-positive`,children:`Logout`})]})]})]}),K=()=>{let{inStockCarts:e=[],orderedCarts:t=[]}=T(),r=e.length,i=t.length,a=r+i;return(0,h.jsxs)(l.t,{children:[(0,h.jsx)(l.c,{asChild:!0,children:(0,h.jsx)(n.t,{size:`icon`,variant:`ghost`,color:`secondary`,className:`relative size-10 rounded-full`,children:(0,h.jsx)(g.ShoppingCartIcon,{})})}),(0,h.jsxs)(l.r,{className:`w-[95vw] sm:max-w-md`,children:[(0,h.jsx)(l.o,{className:`flex-0 border-border-weak border-b pb-3`,children:(0,h.jsxs)(l.s,{className:`flex items-center gap-2`,children:[(0,h.jsx)(g.ShoppingBag,{size:20}),(0,h.jsx)(`span`,{children:`Giỏ hàng của bạn`}),a>0&&(0,h.jsxs)(`span`,{className:`font-normal text-sm text-text-positive-weak`,children:[`(`,a,` sản phẩm)`]})]})}),(0,h.jsxs)(f.t,{defaultValue:i>0?`pre_order`:`in_stock`,className:`h-full flex-1 overflow-y-auto p-4 pt-0`,children:[(0,h.jsxs)(f.r,{className:`w-full flex-0`,children:[(0,h.jsxs)(f.i,{value:`in_stock`,className:`relative`,children:[`Có sẵn`,r>0&&(0,h.jsxs)(`span`,{children:[`(`,r,`)`]})]}),(0,h.jsxs)(f.i,{value:`pre_order`,className:`relative`,children:[`Đặt trước`,i>0&&(0,h.jsxs)(`span`,{children:[`(`,i,`)`]})]})]}),(0,h.jsx)(f.n,{value:`pre_order`,className:`flex-1 overflow-y-auto`,children:(0,h.jsx)(D,{items:t,cartType:`pre_order`})}),(0,h.jsx)(f.n,{value:`in_stock`,className:`flex-1 overflow-y-auto`,children:(0,h.jsx)(D,{items:e,cartType:`in_stock`})})]})]})]})},q=()=>{let{isLoggedIn:e,username:t,email:r,onGoogleLoginSuccess:i,onLogout:a}=T(),s=(0,x.useMediaQuery)(`(min-width: 640px)`),[l,u]=(0,_.useState)(!1);return(0,h.jsxs)(`header`,{className:(0,m.cn)(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[e&&(0,h.jsx)(M,{}),(0,h.jsxs)(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[(0,h.jsx)(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,h.jsx)(g.ShoppingCartIcon,{size:20})}),(0,h.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,h.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,h.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,h.jsxs)(`div`,{className:`flex flex-1 items-center justify-end gap-x-2`,children:[!e&&(0,h.jsxs)(n.t,{className:`w-8 sm:w-fit`,onClick:()=>u(!0),children:[(0,h.jsx)(g.LogInIcon,{}),(0,h.jsx)(`span`,{className:`sr-only sm:not-sr-only`,children:`Đăng nhập`})]}),e&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(G,{userName:t,userEmail:r,onLogout:a}),(0,h.jsx)(c.t,{orientation:`vertical`,className:`min-h-6 w-px`}),(0,h.jsx)(K,{})]})]}),s&&(0,h.jsx)(o.t,{open:l,onOpenChange:u,children:(0,h.jsxs)(o.r,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[(0,h.jsx)(o.o,{className:`flex-0 gap-2 p-6`,children:(0,h.jsx)(o.l,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),(0,h.jsx)(o.a,{className:`p-2`})]})}),!s&&(0,h.jsx)(d.t,{open:l,onOpenChange:u,children:(0,h.jsxs)(d.r,{children:[(0,h.jsx)(d.o,{className:`text-left`,children:(0,h.jsx)(d.l,{children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),(0,h.jsx)(d.a,{})]})})]})},J=({children:e,...t})=>{let{isLoggedIn:n}=T();return n?(0,h.jsx)(j,{variant:`inset`,collapsible:`icon`,...t,children:e}):null},Y=({children:e})=>{let{isLoggedIn:t,onGoogleLoginSuccess:r}=T(),i=(0,x.useMediaQuery)(`(min-width: 640px)`),[a,s]=(0,_.useState)(!1);return t?(0,h.jsx)(N,{children:(0,h.jsx)(`section`,{className:`relative size-full`,children:(0,h.jsx)(`div`,{className:`absolute inset-0 flex flex-col`,children:e})})}):(0,h.jsx)(`div`,{className:`size-full p-4 pt-[calc(var(--header-height)+1.5rem)]`,children:(0,h.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-center gap-6 rounded-lg bg-card p-8 text-center shadow-card`,children:[(0,h.jsx)(`div`,{className:`flex size-20 items-center justify-center rounded-full bg-muted-foreground/10`,children:(0,h.jsx)(g.LockIcon,{className:`size-10 text-primary`})}),(0,h.jsxs)(`div`,{className:`flex max-w-md flex-col gap-2`,children:[(0,h.jsx)(`h2`,{className:`font-semibold text-2xl`,children:`Bạn chưa đăng nhập`}),(0,h.jsx)(`p`,{className:`text-text-positive-weak`,children:`Đăng nhập để khám phá đầy đủ các tính năng của Lunas Store và truy cập vào tài khoản của bạn.`})]}),(0,h.jsxs)(n.t,{size:`lg`,className:`gap-2`,onClick:()=>s(!0),children:[(0,h.jsx)(g.LogInIcon,{size:18}),(0,h.jsx)(`span`,{children:`Đăng nhập ngay`})]}),i&&(0,h.jsx)(o.t,{open:a,onOpenChange:s,children:(0,h.jsxs)(o.r,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[(0,h.jsx)(o.o,{className:`flex-0 gap-2 p-6`,children:(0,h.jsx)(o.l,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),s(!1))}})]})})}),(0,h.jsx)(o.a,{className:`p-2`})]})}),!i&&(0,h.jsx)(d.t,{open:a,onOpenChange:s,children:(0,h.jsxs)(d.r,{children:[(0,h.jsx)(d.o,{className:`text-left`,children:(0,h.jsx)(d.l,{children:`Chào mừng bạn đến với Lunas Store!`})}),(0,h.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,h.jsx)(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-y-1`,children:[(0,h.jsx)(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),(0,h.jsx)(S.GoogleLogin,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),s(!1))}})]})})}),(0,h.jsx)(d.a,{})]})})]})})},X=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-header`,className:(0,m.cn)(`flex-0 snap-start`,e),children:t}),Z=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-content`,className:(0,m.cn)(`flex w-full flex-1 flex-col gap-4 overflow-y-auto px-2 sm:px-4`,e),children:t}),Q=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-footer`,className:(0,m.cn)(`hidden w-full flex-0 border-border-weak border-t pt-2 sm:flex`,e),children:t}),$=({children:e,className:t})=>(0,h.jsx)(`div`,{"data-slot":`main-group`,className:(0,m.cn)(`flex size-full flex-col gap-4`,t),children:e}),oe=({className:e,children:t})=>(0,h.jsx)(`div`,{"data-slot":`main-group-content`,className:(0,m.cn)(`size-full max-w-8xl flex-1 rounded-md bg-card p-4 shadow-card`,e),children:t});exports.ServiceLayoutCartInfo=K,exports.ServiceLayoutHeader=q,exports.ServiceLayoutMain=Y,exports.ServiceLayoutMainContent=Z,exports.ServiceLayoutMainFooter=Q,exports.ServiceLayoutMainGroup=$,exports.ServiceLayoutMainGroupContent=oe,exports.ServiceLayoutMainHeader=X,exports.ServiceLayoutProvider=U,exports.ServiceLayoutSidebar=J,exports.ServiceLayoutSidebarContent=F,exports.ServiceLayoutSidebarFooter=P,exports.ServiceLayoutSidebarGroup=I,exports.ServiceLayoutSidebarGroupContent=R,exports.ServiceLayoutSidebarGroupLabel=L,exports.ServiceLayoutSidebarMenu=z,exports.ServiceLayoutSidebarMenuButton=H,exports.ServiceLayoutSidebarMenuItem=B,exports.ServiceLayoutUserInfo=G,exports.ServiceLayoutWrapper=W;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as TooltipContent } from "../../tooltip-
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
1
|
+
import { n as TooltipContent } from "../../tooltip-BkSOfofW.cjs";
|
|
2
|
+
import * as react_jsx_runtime292 from "react/jsx-runtime";
|
|
3
|
+
import * as class_variance_authority_types14 from "class-variance-authority/types";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
import { CredentialResponse } from "@react-oauth/google";
|
|
6
6
|
|
|
@@ -43,43 +43,43 @@ declare function ServiceLayoutSidebar$1({
|
|
|
43
43
|
side?: 'left' | 'right';
|
|
44
44
|
variant?: 'sidebar' | 'floating' | 'inset';
|
|
45
45
|
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
46
|
-
}):
|
|
46
|
+
}): react_jsx_runtime292.JSX.Element;
|
|
47
47
|
declare function ServiceLayoutSidebarFooter({
|
|
48
48
|
className,
|
|
49
49
|
children,
|
|
50
50
|
...props
|
|
51
|
-
}: React.ComponentProps<'div'>):
|
|
51
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime292.JSX.Element;
|
|
52
52
|
declare function ServiceLayoutSidebarContent({
|
|
53
53
|
className,
|
|
54
54
|
...props
|
|
55
|
-
}: React.ComponentProps<'div'>):
|
|
55
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime292.JSX.Element;
|
|
56
56
|
declare function ServiceLayoutSidebarGroup({
|
|
57
57
|
className,
|
|
58
58
|
...props
|
|
59
|
-
}: React.ComponentProps<'div'>):
|
|
59
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime292.JSX.Element;
|
|
60
60
|
declare function ServiceLayoutSidebarGroupLabel({
|
|
61
61
|
className,
|
|
62
62
|
asChild,
|
|
63
63
|
...props
|
|
64
64
|
}: React.ComponentProps<'div'> & {
|
|
65
65
|
asChild?: boolean;
|
|
66
|
-
}):
|
|
66
|
+
}): react_jsx_runtime292.JSX.Element;
|
|
67
67
|
declare function ServiceLayoutSidebarGroupContent({
|
|
68
68
|
className,
|
|
69
69
|
...props
|
|
70
|
-
}: React.ComponentProps<'div'>):
|
|
70
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime292.JSX.Element;
|
|
71
71
|
declare function ServiceLayoutSidebarMenu({
|
|
72
72
|
className,
|
|
73
73
|
...props
|
|
74
|
-
}: React.ComponentProps<'ul'>):
|
|
74
|
+
}: React.ComponentProps<'ul'>): react_jsx_runtime292.JSX.Element;
|
|
75
75
|
declare function ServiceLayoutSidebarMenuItem({
|
|
76
76
|
className,
|
|
77
77
|
...props
|
|
78
|
-
}: React.ComponentProps<'li'>):
|
|
78
|
+
}: React.ComponentProps<'li'>): react_jsx_runtime292.JSX.Element;
|
|
79
79
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
80
80
|
variant?: "default" | "outline" | null | undefined;
|
|
81
81
|
size?: "sm" | "lg" | "default" | null | undefined;
|
|
82
|
-
} &
|
|
82
|
+
} & class_variance_authority_types14.ClassProp) | undefined) => string;
|
|
83
83
|
declare function ServiceLayoutSidebarMenuButton({
|
|
84
84
|
asChild,
|
|
85
85
|
isActive,
|
|
@@ -92,7 +92,7 @@ declare function ServiceLayoutSidebarMenuButton({
|
|
|
92
92
|
asChild?: boolean;
|
|
93
93
|
isActive?: boolean;
|
|
94
94
|
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
95
|
-
} & VariantProps<typeof sidebarMenuButtonVariants>):
|
|
95
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime292.JSX.Element;
|
|
96
96
|
//#endregion
|
|
97
97
|
//#region packages/components/layouts/service-layout/service-layout.d.ts
|
|
98
98
|
declare const ServiceLayoutProvider: React.FC<React.PropsWithChildren<ServiceLayoutContextProps>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../../button-
|
|
2
|
-
import "../../separator-
|
|
3
|
-
import { n as TooltipContent } from "../../tooltip-
|
|
1
|
+
import "../../button-BHw0fbR9.mjs";
|
|
2
|
+
import "../../separator-BjY6jrIo.mjs";
|
|
3
|
+
import { n as TooltipContent } from "../../tooltip-DCDdOvx6.mjs";
|
|
4
4
|
import * as react_jsx_runtime292 from "react/jsx-runtime";
|
|
5
5
|
import "react";
|
|
6
6
|
import { VariantProps } from "class-variance-authority";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,t}from"../../card-CWAdGhMr.mjs";import"../../button.variants-DmUzMbB8.mjs";import{t as n}from"../../button-DIEXNBpi.mjs";import"../../skeleton-CvZncisJ.mjs";import{t as r}from"../../image-BwbAQRxx.mjs";import{i,n as a,r as o,t as s}from"../../tooltip-D0XDvxqi.mjs";import{n as c,r as l,t as u}from"../../avatar-BaxX-xI9.mjs";import"../../close-CGei_VQ6.mjs";import{a as d,l as f,o as p,r as m,t as h}from"../../dialog-DeZVOOmh.mjs";import{t as g}from"../../input-CC10BdKh.mjs";import{t as _}from"../../separator-C2yOD6r_.mjs";import{c as v,i as y,o as b,r as x,s as S,t as C}from"../../sheet-DXLayspn.mjs";import{a as ee,h as te,o as ne,r as re,t as ie,u as ae}from"../../dropdown-menu-CtU6oBI4.mjs";import{a as w,l as T,o as oe,r as E,t as D}from"../../drawer-272Fecsq.mjs";import{i as O,n as k,r as se,t as ce}from"../../tabs-Cjh2jtUZ.mjs";import{t as le}from"../../scroll-area-CiMS2UY7.mjs";import{cn as A}from"@customafk/react-toolkit/utils";import{Fragment as ue,jsx as j,jsxs as M}from"react/jsx-runtime";import{LockIcon as de,LogInIcon as N,LogOutIcon as P,MenuIcon as fe,Minus as pe,Plus as me,ShoppingBag as he,ShoppingBasketIcon as ge,ShoppingCartIcon as F,Trash2 as _e,UserIcon as ve}from"lucide-react";import{createContext as I,use as L,useCallback as R,useEffect as z,useMemo as ye,useState as B}from"react";import{cva as be}from"class-variance-authority";import{Slot as V}from"radix-ui";import{useIsMobile as xe}from"@customafk/react-toolkit/hooks/useMobile";import{useMediaQuery as H}from"@customafk/react-toolkit/hooks/useMediaQuery";import{GoogleLogin as U}from"@react-oauth/google";import{useDebounceCallback as Se}from"@customafk/react-toolkit/hooks/useDebounceCallback";const W=I(null),G=()=>{let e=L(W);if(!e)throw Error(`useServiceLayoutContext must be used within a ServiceLayoutProvider`);return e},Ce=({id:i,type:a,productName:o,imageUrl:s,quantity:c,price:l,options:u})=>{let{onDeletingCart:d,onUpdatingCart:f}=G(),[p,m]=B(c),[h,_]=B(!1),v=Se(R(()=>{f?.(i,p,a)},[f,i,p,a]),500),y=R(e=>{e<1&&(e=1),e>99&&(e=99),m(e)},[]),b=R(async()=>{_(!0),await d?.(i),_(!1)},[i,d]);return z(()=>(p!==c&&v(),()=>{v.cancel()}),[p,c,v]),M(t,{className:`border-border-weak relative mb-3 overflow-x-auto border p-4 shadow-none`,children:[h&&j(`div`,{className:`bg-muted-muted/80 absolute inset-0 z-10 flex items-center justify-center`,children:j(`div`,{className:`loader-dots`})}),M(e,{className:`p-0`,children:[M(n,{variant:`ghost`,size:`icon`,color:`muted`,disabled:h,className:`text-text-positive-weak absolute top-2 right-2 z-10`,onClick:b,children:[j(_e,{className:`h-4 w-4`}),j(`span`,{className:`sr-only`,children:`Remove item`})]}),M(`div`,{className:`flex gap-3`,children:[j(`div`,{className:`relative size-20 flex-shrink-0`,children:s?j(r,{src:s,alt:o,className:`rounded-md border-none shadow-xs`,width:80,height:80}):j(`div`,{className:`bg-muted text-muted-foreground flex size-full items-center justify-center text-xs`,children:`No image`})}),M(`div`,{className:`flex flex-1 flex-col`,children:[j(`div`,{className:`flex justify-between`,children:j(`h3`,{className:`text-text-positive line-clamp-1 text-sm font-medium`,children:o})}),j(`p`,{className:`text-text-positive-weak mb-1 text-xs`,children:u.map((e,t)=>M(`span`,{children:[e.label,`: `,e.value,t<u.length-1&&`, `]},e.label))}),M(`div`,{className:`mt-auto flex items-center justify-between`,children:[M(`div`,{className:`flex items-center space-x-1`,children:[j(`button`,{disabled:p<=1,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>y(p-1),children:j(pe,{size:12})}),j(g,{value:p,onChange:e=>y(parseInt(e.target.value||`1`)),className:`border-border h-6.5 w-14 rounded-md border p-1 text-center text-sm`,min:1}),j(`button`,{disabled:p>=99,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>y(p+1),children:j(me,{size:12})})]}),M(`div`,{className:`text-sm font-semibold`,children:[(l*p).toLocaleString(),` ₫`]})]})]})]})]})]})},K=({items:e=[],cartType:t,className:r})=>{let i=e.reduce((e,t)=>e+t.price*t.quantity,0);return e.length===0?M(`div`,{className:A(`bg-muted-muted flex size-full max-h-80 flex-col items-center justify-center rounded-lg p-8`,r),children:[j(`div`,{className:`text-text-positive-weak bg-card shadow-card mb-4 flex size-20 items-center justify-center rounded-full text-5xl`,children:j(ge,{size:42,strokeWidth:1})}),M(`div`,{className:`flex flex-col space-y-1`,children:[j(`p`,{className:`text-text-positive text-center text-base font-semibold`,children:`Giỏ hàng trống`}),j(`p`,{className:`text-text-positive-weak mb-4 text-center text-sm`,children:t===`in_stock`?`Thêm sản phẩm có sẵn vào giỏ hàng của bạn!`:`Thêm sản phẩm đặt trước vào giỏ hàng của bạn!`})]})]}):M(`div`,{className:A(`flex h-full flex-col space-y-4 overflow-y-auto`,r),children:[j(le,{className:`h-full flex-1`,children:e.map(e=>j(Ce,{...e,type:t},e.id))}),M(`div`,{className:`flex-0 space-y-3`,children:[M(`div`,{className:`flex justify-between`,children:[j(`span`,{className:`text-text-positive-weak text-sm`,children:`Tạm tính:`}),M(`span`,{className:`text-sm`,children:[i.toLocaleString(),` ₫`]})]}),j(_,{}),M(`div`,{className:`flex justify-between`,children:[j(`span`,{className:`text-text-positive font-medium`,children:`Tổng cộng:`}),M(`span`,{className:`text-lg font-semibold`,children:[i.toLocaleString(),` ₫`]})]}),j(n,{className:`mt-2 w-full`,children:`Thanh toán ngay`}),t===`pre_order`&&j(`p`,{className:`text-text-positive-weak text-center text-xs italic`,children:`* Sản phẩm đặt trước sẽ được giao sau khi có hàng`})]})]})},q=I(null),J=()=>{let e=L(q);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e};function we({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...s}){let c=xe(),[l,u]=B(!1),[d,f]=B(e),p=t??d,m=R(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,p]),h=R(()=>c?u(e=>!e):m(e=>!e),[c,m]);z(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h]);let g=p?`expanded`:`collapsed`,_=ye(()=>({state:g,isMobile:c,toggleSidebar:h,open:p,setOpen:m,openMobile:l,setOpenMobile:u}),[g,p,m,c,l,h]);return j(q.Provider,{value:_,children:j(o,{delayDuration:0,children:j(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...i},className:A(`group/sidebar-wrapper`,`has-data-[variant=inset]:bg-sidebar`,`flex h-dvh w-full`,r),...s,children:a})})})}function Te({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:s,openMobile:c,setOpenMobile:l}=J();return n===`none`?j(`aside`,{"data-slot":`sidebar`,className:A(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...a,children:i}):o?j(C,{open:c,onOpenChange:l,children:M(x,{side:`left`,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`16rem`},children:[M(b,{className:`sr-only`,children:[j(S,{children:`Sidebar`}),j(y,{children:`Displays the mobile sidebar.`})]}),M(`div`,{className:`flex size-full flex-col`,children:[M(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[j(Y,{}),j(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:j(F,{size:20})}),M(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[j(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),j(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),j(`div`,{className:`flex flex-1 flex-col p-2`,children:i})]})]})}):M(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":s,"data-collapsible":s===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[j(`div`,{"data-slot":`sidebar-gap`,className:A(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),j(`div`,{"data-slot":`sidebar-container`,className:A(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:j(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:A(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:i})})]})}function Y({className:e,onClick:t,...r}){let{toggleSidebar:i}=J();return M(n,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:A(`size-10 rounded-full`,e),onClick:e=>{t?.(e),i()},...r,children:[j(fe,{className:`size-6!`}),j(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function Ee({className:e,children:t,...n}){return M(`main`,{"data-slot":`sidebar-inset`,className:A(`relative flex w-full flex-1 flex-col`,e),...n,children:[j(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),j(`div`,{className:A(`inset-shadow-sm flex-1`),children:t})]})}function De({className:e,children:t,...n}){let{open:r}=J(),{onLogout:i}=G();return M(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:A(`flex flex-col gap-2`,e),...n,children:[t,M(X,{children:[j(Z,{children:M(Q,{className:`border border-border`,onClick:i,children:[j(P,{className:`text-text-positive-weak`}),`Đăng xuất`]})}),r&&j(Z,{className:`mt-2 border-t border-t-border`,children:j(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})]})}function Oe({className:e,...t}){return j(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:A(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function ke({className:e,...t}){return j(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:A(`relative flex w-full min-w-0 flex-col`,e),...t})}function Ae({className:e,asChild:t=!1,...n}){return j(t?V.Slot:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:A(`flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-xs outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2`,`text-sidebar-foreground/70`,`ring-sidebar-ring`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8`,`group-data-[collapsible=icon]:opacity-0`,e),...n})}function je({className:e,...t}){return j(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:A(`w-full text-sm`,e),...t})}function X({className:e,...t}){return j(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:A(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function Z({className:e,...t}){return j(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:A(`group/menu-item relative`,e),...t})}const Me=be(`peer/menu-button.cursor-pointer.flex w-full items-center gap-2.overflow-hidden rounded-md p-2 outline-hidden.truncate text-left.transition-[color,width,height,padding].hover:bg-sidebar-accent.hover:text-sidebar-accent-foreground.active:bg-sidebar-accent.active:text-sidebar-accent-foreground.disabled:pointer-events-none.disabled:opacity-50.group-has-data-[sidebar=menu-action]/menu-item:pr-8.aria-disabled:pointer-events-none.aria-disabled:opacity-50.data-[active=true]:bg-sidebar-primary-muted.data-[active=true]:font-medium.data-[active=true]:text-sidebar-primary.data-[state=open]:hover:bg-sidebar-accent.data-[state=open]:hover:text-sidebar-accent-foreground.group-data-[collapsible=icon]:size-12!.group-data-[collapsible=icon]:p-3!.group-data-[collapsible=icon]:gap-3!.[&>svg]:size-6.[&>svg]:shrink-0.[&>span:last-child]:truncate`.split(`.`),{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function Q({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:o,className:c,...l}){let u=e?V.Slot:`button`,{isMobile:d,state:f}=J(),p=j(u,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:A(Me({variant:n,size:r}),c),...l});return o?(typeof o==`string`&&(o={children:o}),M(s,{children:[j(i,{asChild:!0,children:p}),j(a,{side:`right`,align:`center`,hidden:f!==`collapsed`||d,...o})]})):p}const Ne=({isLoggedIn:e=!1,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c,children:l})=>j(W.Provider,{value:{isLoggedIn:e,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c},children:l}),Pe=({children:e})=>j(we,{children:e}),$=({userName:e=`Keith Kennedy`,userEmail:t=`k.kennedy@originui.com`,onLogout:r})=>M(ie,{children:[j(te,{asChild:!0,children:j(n,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-10 rounded-full`,children:M(u,{className:`size-10`,children:[j(l,{}),j(c,{className:`size-full bg-muted-muted`,children:j(ve,{})})]})})}),M(re,{align:`end`,className:`max-w-64`,children:[M(ne,{className:`flex min-w-0 flex-col`,children:[j(`span`,{className:`truncate font-medium text-sm text-text-positive`,children:e}),j(`span`,{className:`truncate font-normal text-text-positive-weak text-xs`,children:t})]}),j(ae,{}),M(ee,{onClick:r,children:[j(P,{size:16,"aria-hidden":`true`}),j(`span`,{className:`text-text-positive`,children:`Logout`})]})]})]}),Fe=()=>{let{inStockCarts:e=[],orderedCarts:t=[]}=G(),r=e.length,i=t.length,a=r+i;return M(C,{children:[j(v,{asChild:!0,children:j(n,{size:`icon`,variant:`ghost`,color:`secondary`,className:`relative size-10 rounded-full`,children:j(F,{})})}),M(x,{className:`w-[95vw] sm:max-w-md`,children:[j(b,{className:`flex-0 border-border-weak border-b pb-3`,children:M(S,{className:`flex items-center gap-2`,children:[j(he,{size:20}),j(`span`,{children:`Giỏ hàng của bạn`}),a>0&&M(`span`,{className:`font-normal text-sm text-text-positive-weak`,children:[`(`,a,` sản phẩm)`]})]})}),M(ce,{defaultValue:i>0?`pre_order`:`in_stock`,className:`h-full flex-1 overflow-y-auto p-4 pt-0`,children:[M(se,{className:`w-full flex-0`,children:[M(O,{value:`in_stock`,className:`relative`,children:[`Có sẵn`,r>0&&M(`span`,{children:[`(`,r,`)`]})]}),M(O,{value:`pre_order`,className:`relative`,children:[`Đặt trước`,i>0&&M(`span`,{children:[`(`,i,`)`]})]})]}),j(k,{value:`pre_order`,className:`flex-1 overflow-y-auto`,children:j(K,{items:t,cartType:`pre_order`})}),j(k,{value:`in_stock`,className:`flex-1 overflow-y-auto`,children:j(K,{items:e,cartType:`in_stock`})})]})]})]})},Ie=()=>{let{isLoggedIn:e,username:t,email:r,onGoogleLoginSuccess:i,onLogout:a}=G(),o=H(`(min-width: 640px)`),[s,c]=B(!1);return M(`header`,{className:A(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[e&&j(Y,{}),M(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[j(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:j(F,{size:20})}),M(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[j(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),j(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),M(`div`,{className:`flex flex-1 items-center justify-end gap-x-2`,children:[!e&&M(n,{className:`w-8 sm:w-fit`,onClick:()=>c(!0),children:[j(N,{}),j(`span`,{className:`sr-only sm:not-sr-only`,children:`Đăng nhập`})]}),e&&M(ue,{children:[j($,{userName:t,userEmail:r,onLogout:a}),j(_,{orientation:`vertical`,className:`min-h-6 w-px`}),j(Fe,{})]})]}),o&&j(h,{open:s,onOpenChange:c,children:M(m,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[j(p,{className:`flex-0 gap-2 p-6`,children:j(f,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),j(`div`,{className:`flex flex-1 flex-col`,children:j(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:M(`div`,{className:`flex flex-col items-center gap-y-1`,children:[j(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),j(U,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),j(d,{className:`p-2`})]})}),!o&&j(D,{open:s,onOpenChange:c,children:M(E,{children:[j(oe,{className:`text-left`,children:j(T,{children:`Chào mừng bạn đến với Lunas Store!`})}),j(`div`,{className:`flex flex-1 flex-col`,children:j(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:M(`div`,{className:`flex flex-col items-center gap-y-1`,children:[j(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),j(U,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),j(w,{})]})})]})},Le=({children:e,...t})=>{let{isLoggedIn:n}=G();return n?j(Te,{variant:`inset`,collapsible:`icon`,...t,children:e}):null},Re=({children:e})=>{let{isLoggedIn:t,onGoogleLoginSuccess:r}=G(),i=H(`(min-width: 640px)`),[a,o]=B(!1);return t?j(Ee,{children:j(`section`,{className:`relative size-full`,children:j(`div`,{className:`absolute inset-0 flex flex-col`,children:e})})}):j(`div`,{className:`size-full p-4 pt-[calc(var(--header-height)+1.5rem)]`,children:M(`div`,{className:`flex size-full flex-col items-center justify-center gap-6 rounded-lg bg-card p-8 text-center shadow-card`,children:[j(`div`,{className:`flex size-20 items-center justify-center rounded-full bg-muted-foreground/10`,children:j(de,{className:`size-10 text-primary`})}),M(`div`,{className:`flex max-w-md flex-col gap-2`,children:[j(`h2`,{className:`font-semibold text-2xl`,children:`Bạn chưa đăng nhập`}),j(`p`,{className:`text-text-positive-weak`,children:`Đăng nhập để khám phá đầy đủ các tính năng của Lunas Store và truy cập vào tài khoản của bạn.`})]}),M(n,{size:`lg`,className:`gap-2`,onClick:()=>o(!0),children:[j(N,{size:18}),j(`span`,{children:`Đăng nhập ngay`})]}),i&&j(h,{open:a,onOpenChange:o,children:M(m,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[j(p,{className:`flex-0 gap-2 p-6`,children:j(f,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),j(`div`,{className:`flex flex-1 flex-col`,children:j(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:M(`div`,{className:`flex flex-col items-center gap-y-1`,children:[j(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),j(U,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),o(!1))}})]})})}),j(d,{className:`p-2`})]})}),!i&&j(D,{open:a,onOpenChange:o,children:M(E,{children:[j(oe,{className:`text-left`,children:j(T,{children:`Chào mừng bạn đến với Lunas Store!`})}),j(`div`,{className:`flex flex-1 flex-col`,children:j(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:M(`div`,{className:`flex flex-col items-center gap-y-1`,children:[j(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),j(U,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),o(!1))}})]})})}),j(w,{})]})})]})})},ze=({className:e,children:t})=>j(`div`,{"data-slot":`main-header`,className:A(`flex-0 snap-start`,e),children:t}),Be=({className:e,children:t})=>j(`div`,{"data-slot":`main-content`,className:A(`flex w-full flex-1 flex-col gap-4 overflow-y-auto px-2 sm:px-4`,e),children:t}),Ve=({className:e,children:t})=>j(`div`,{"data-slot":`main-footer`,className:A(`hidden w-full flex-0 border-border-weak border-t pt-2 sm:flex`,e),children:t}),He=({children:e,className:t})=>j(`div`,{"data-slot":`main-group`,className:A(`flex size-full flex-col gap-4`,t),children:e}),Ue=({className:e,children:t})=>j(`div`,{"data-slot":`main-group-content`,className:A(`size-full max-w-8xl flex-1 rounded-md bg-card p-4 shadow-card`,e),children:t});export{Fe as ServiceLayoutCartInfo,Ie as ServiceLayoutHeader,Re as ServiceLayoutMain,Be as ServiceLayoutMainContent,Ve as ServiceLayoutMainFooter,He as ServiceLayoutMainGroup,Ue as ServiceLayoutMainGroupContent,ze as ServiceLayoutMainHeader,Ne as ServiceLayoutProvider,Le as ServiceLayoutSidebar,Oe as ServiceLayoutSidebarContent,De as ServiceLayoutSidebarFooter,ke as ServiceLayoutSidebarGroup,je as ServiceLayoutSidebarGroupContent,Ae as ServiceLayoutSidebarGroupLabel,X as ServiceLayoutSidebarMenu,Q as ServiceLayoutSidebarMenuButton,Z as ServiceLayoutSidebarMenuItem,$ as ServiceLayoutUserInfo,Pe as ServiceLayoutWrapper};
|
|
1
|
+
import{r as e,t}from"../../card-CWAdGhMr.mjs";import"../../button.variants-DmUzMbB8.mjs";import{t as n}from"../../button-DIEXNBpi.mjs";import"../../skeleton-CvZncisJ.mjs";import{t as r}from"../../image-CbKDFah7.mjs";import{i,n as a,r as o,t as s}from"../../tooltip-BDaKTFKI.mjs";import{n as c,r as l,t as u}from"../../avatar-DCbv3HzU.mjs";import"../../close-BuQ2DHur.mjs";import{a as d,l as f,o as p,r as m,t as h}from"../../dialog-bd77jxcu.mjs";import{t as g}from"../../input-C1K2wbv1.mjs";import{t as _}from"../../separator-yTKDuMWb.mjs";import{c as v,i as y,o as b,r as x,s as S,t as C}from"../../sheet-BSeiP8S8.mjs";import{a as ee,h as te,o as ne,r as re,t as ie,u as ae}from"../../dropdown-menu-DPhbyDEo.mjs";import{a as w,l as T,o as oe,r as E,t as D}from"../../drawer-ClbO_Gt0.mjs";import{i as O,n as k,r as se,t as ce}from"../../tabs-XrUcxpL1.mjs";import{t as le}from"../../scroll-area-6xusEFm6.mjs";import{cn as A}from"@customafk/react-toolkit/utils";import{Fragment as ue,jsx as j,jsxs as M}from"react/jsx-runtime";import{LockIcon as de,LogInIcon as N,LogOutIcon as P,MenuIcon as fe,Minus as pe,Plus as me,ShoppingBag as he,ShoppingBasketIcon as ge,ShoppingCartIcon as F,Trash2 as _e,UserIcon as ve}from"lucide-react";import{createContext as I,use as L,useCallback as R,useEffect as z,useMemo as ye,useState as B}from"react";import{cva as be}from"class-variance-authority";import{Slot as V}from"radix-ui";import{useIsMobile as xe}from"@customafk/react-toolkit/hooks/useMobile";import{useMediaQuery as H}from"@customafk/react-toolkit/hooks/useMediaQuery";import{GoogleLogin as U}from"@react-oauth/google";import{useDebounceCallback as Se}from"@customafk/react-toolkit/hooks/useDebounceCallback";const W=I(null),G=()=>{let e=L(W);if(!e)throw Error(`useServiceLayoutContext must be used within a ServiceLayoutProvider`);return e},Ce=({id:i,type:a,productName:o,imageUrl:s,quantity:c,price:l,options:u})=>{let{onDeletingCart:d,onUpdatingCart:f}=G(),[p,m]=B(c),[h,_]=B(!1),v=Se(R(()=>{f?.(i,p,a)},[f,i,p,a]),500),y=R(e=>{e<1&&(e=1),e>99&&(e=99),m(e)},[]),b=R(async()=>{_(!0),await d?.(i),_(!1)},[i,d]);return z(()=>(p!==c&&v(),()=>{v.cancel()}),[p,c,v]),M(t,{className:`border-border-weak relative mb-3 overflow-x-auto border p-4 shadow-none`,children:[h&&j(`div`,{className:`bg-muted-muted/80 absolute inset-0 z-10 flex items-center justify-center`,children:j(`div`,{className:`loader-dots`})}),M(e,{className:`p-0`,children:[M(n,{variant:`ghost`,size:`icon`,color:`muted`,disabled:h,className:`text-text-positive-weak absolute top-2 right-2 z-10`,onClick:b,children:[j(_e,{className:`h-4 w-4`}),j(`span`,{className:`sr-only`,children:`Remove item`})]}),M(`div`,{className:`flex gap-3`,children:[j(`div`,{className:`relative size-20 flex-shrink-0`,children:s?j(r,{src:s,alt:o,className:`rounded-md border-none shadow-xs`,width:80,height:80}):j(`div`,{className:`bg-muted text-muted-foreground flex size-full items-center justify-center text-xs`,children:`No image`})}),M(`div`,{className:`flex flex-1 flex-col`,children:[j(`div`,{className:`flex justify-between`,children:j(`h3`,{className:`text-text-positive line-clamp-1 text-sm font-medium`,children:o})}),j(`p`,{className:`text-text-positive-weak mb-1 text-xs`,children:u.map((e,t)=>M(`span`,{children:[e.label,`: `,e.value,t<u.length-1&&`, `]},e.label))}),M(`div`,{className:`mt-auto flex items-center justify-between`,children:[M(`div`,{className:`flex items-center space-x-1`,children:[j(`button`,{disabled:p<=1,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>y(p-1),children:j(pe,{size:12})}),j(g,{value:p,onChange:e=>y(parseInt(e.target.value||`1`)),className:`border-border h-6.5 w-14 rounded-md border p-1 text-center text-sm`,min:1}),j(`button`,{disabled:p>=99,className:`border-border active:bg-muted-muted flex size-6 cursor-pointer items-center justify-center rounded-full border transition-all disabled:opacity-60`,onClick:()=>y(p+1),children:j(me,{size:12})})]}),M(`div`,{className:`text-sm font-semibold`,children:[(l*p).toLocaleString(),` ₫`]})]})]})]})]})]})},K=({items:e=[],cartType:t,className:r})=>{let i=e.reduce((e,t)=>e+t.price*t.quantity,0);return e.length===0?M(`div`,{className:A(`bg-muted-muted flex size-full max-h-80 flex-col items-center justify-center rounded-lg p-8`,r),children:[j(`div`,{className:`text-text-positive-weak bg-card shadow-card mb-4 flex size-20 items-center justify-center rounded-full text-5xl`,children:j(ge,{size:42,strokeWidth:1})}),M(`div`,{className:`flex flex-col space-y-1`,children:[j(`p`,{className:`text-text-positive text-center text-base font-semibold`,children:`Giỏ hàng trống`}),j(`p`,{className:`text-text-positive-weak mb-4 text-center text-sm`,children:t===`in_stock`?`Thêm sản phẩm có sẵn vào giỏ hàng của bạn!`:`Thêm sản phẩm đặt trước vào giỏ hàng của bạn!`})]})]}):M(`div`,{className:A(`flex h-full flex-col space-y-4 overflow-y-auto`,r),children:[j(le,{className:`h-full flex-1`,children:e.map(e=>j(Ce,{...e,type:t},e.id))}),M(`div`,{className:`flex-0 space-y-3`,children:[M(`div`,{className:`flex justify-between`,children:[j(`span`,{className:`text-text-positive-weak text-sm`,children:`Tạm tính:`}),M(`span`,{className:`text-sm`,children:[i.toLocaleString(),` ₫`]})]}),j(_,{}),M(`div`,{className:`flex justify-between`,children:[j(`span`,{className:`text-text-positive font-medium`,children:`Tổng cộng:`}),M(`span`,{className:`text-lg font-semibold`,children:[i.toLocaleString(),` ₫`]})]}),j(n,{className:`mt-2 w-full`,children:`Thanh toán ngay`}),t===`pre_order`&&j(`p`,{className:`text-text-positive-weak text-center text-xs italic`,children:`* Sản phẩm đặt trước sẽ được giao sau khi có hàng`})]})]})},q=I(null),J=()=>{let e=L(q);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e};function we({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...s}){let c=xe(),[l,u]=B(!1),[d,f]=B(e),p=t??d,m=R(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,p]),h=R(()=>c?u(e=>!e):m(e=>!e),[c,m]);z(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h]);let g=p?`expanded`:`collapsed`,_=ye(()=>({state:g,isMobile:c,toggleSidebar:h,open:p,setOpen:m,openMobile:l,setOpenMobile:u}),[g,p,m,c,l,h]);return j(q.Provider,{value:_,children:j(o,{delayDuration:0,children:j(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...i},className:A(`group/sidebar-wrapper`,`has-data-[variant=inset]:bg-sidebar`,`flex h-dvh w-full`,r),...s,children:a})})})}function Te({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:s,openMobile:c,setOpenMobile:l}=J();return n===`none`?j(`aside`,{"data-slot":`sidebar`,className:A(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...a,children:i}):o?j(C,{open:c,onOpenChange:l,children:M(x,{side:`left`,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`16rem`},children:[M(b,{className:`sr-only`,children:[j(S,{children:`Sidebar`}),j(y,{children:`Displays the mobile sidebar.`})]}),M(`div`,{className:`flex size-full flex-col`,children:[M(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[j(Y,{}),j(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:j(F,{size:20})}),M(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[j(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),j(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),j(`div`,{className:`flex flex-1 flex-col p-2`,children:i})]})]})}):M(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":s,"data-collapsible":s===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[j(`div`,{"data-slot":`sidebar-gap`,className:A(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),j(`div`,{"data-slot":`sidebar-container`,className:A(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:j(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:A(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:i})})]})}function Y({className:e,onClick:t,...r}){let{toggleSidebar:i}=J();return M(n,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:A(`size-10 rounded-full`,e),onClick:e=>{t?.(e),i()},...r,children:[j(fe,{className:`size-6!`}),j(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function Ee({className:e,children:t,...n}){return M(`main`,{"data-slot":`sidebar-inset`,className:A(`relative flex w-full flex-1 flex-col`,e),...n,children:[j(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),j(`div`,{className:A(`inset-shadow-sm flex-1`),children:t})]})}function De({className:e,children:t,...n}){let{open:r}=J(),{onLogout:i}=G();return M(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:A(`flex flex-col gap-2`,e),...n,children:[t,M(X,{children:[j(Z,{children:M(Q,{className:`border border-border`,onClick:i,children:[j(P,{className:`text-text-positive-weak`}),`Đăng xuất`]})}),r&&j(Z,{className:`mt-2 border-t border-t-border`,children:j(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})]})}function Oe({className:e,...t}){return j(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:A(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function ke({className:e,...t}){return j(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:A(`relative flex w-full min-w-0 flex-col`,e),...t})}function Ae({className:e,asChild:t=!1,...n}){return j(t?V.Slot:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:A(`flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-xs outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2`,`text-sidebar-foreground/70`,`ring-sidebar-ring`,`[&>svg]:size-4`,`[&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8`,`group-data-[collapsible=icon]:opacity-0`,e),...n})}function je({className:e,...t}){return j(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:A(`w-full text-sm`,e),...t})}function X({className:e,...t}){return j(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:A(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function Z({className:e,...t}){return j(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:A(`group/menu-item relative`,e),...t})}const Me=be(`peer/menu-button.cursor-pointer.flex w-full items-center gap-2.overflow-hidden rounded-md p-2 outline-hidden.truncate text-left.transition-[color,width,height,padding].hover:bg-sidebar-accent.hover:text-sidebar-accent-foreground.active:bg-sidebar-accent.active:text-sidebar-accent-foreground.disabled:pointer-events-none.disabled:opacity-50.group-has-data-[sidebar=menu-action]/menu-item:pr-8.aria-disabled:pointer-events-none.aria-disabled:opacity-50.data-[active=true]:bg-sidebar-primary-muted.data-[active=true]:font-medium.data-[active=true]:text-sidebar-primary.data-[state=open]:hover:bg-sidebar-accent.data-[state=open]:hover:text-sidebar-accent-foreground.group-data-[collapsible=icon]:size-12!.group-data-[collapsible=icon]:p-3!.group-data-[collapsible=icon]:gap-3!.[&>svg]:size-6.[&>svg]:shrink-0.[&>span:last-child]:truncate`.split(`.`),{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function Q({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:o,className:c,...l}){let u=e?V.Slot:`button`,{isMobile:d,state:f}=J(),p=j(u,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:A(Me({variant:n,size:r}),c),...l});return o?(typeof o==`string`&&(o={children:o}),M(s,{children:[j(i,{asChild:!0,children:p}),j(a,{side:`right`,align:`center`,hidden:f!==`collapsed`||d,...o})]})):p}const Ne=({isLoggedIn:e=!1,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c,children:l})=>j(W.Provider,{value:{isLoggedIn:e,username:t,email:n,inStockCarts:r,orderedCarts:i,onGoogleLoginSuccess:a,onUpdatingCart:o,onDeletingCart:s,onLogout:c},children:l}),Pe=({children:e})=>j(we,{children:e}),$=({userName:e=`Keith Kennedy`,userEmail:t=`k.kennedy@originui.com`,onLogout:r})=>M(ie,{children:[j(te,{asChild:!0,children:j(n,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-10 rounded-full`,children:M(u,{className:`size-10`,children:[j(l,{}),j(c,{className:`size-full bg-muted-muted`,children:j(ve,{})})]})})}),M(re,{align:`end`,className:`max-w-64`,children:[M(ne,{className:`flex min-w-0 flex-col`,children:[j(`span`,{className:`truncate font-medium text-sm text-text-positive`,children:e}),j(`span`,{className:`truncate font-normal text-text-positive-weak text-xs`,children:t})]}),j(ae,{}),M(ee,{onClick:r,children:[j(P,{size:16,"aria-hidden":`true`}),j(`span`,{className:`text-text-positive`,children:`Logout`})]})]})]}),Fe=()=>{let{inStockCarts:e=[],orderedCarts:t=[]}=G(),r=e.length,i=t.length,a=r+i;return M(C,{children:[j(v,{asChild:!0,children:j(n,{size:`icon`,variant:`ghost`,color:`secondary`,className:`relative size-10 rounded-full`,children:j(F,{})})}),M(x,{className:`w-[95vw] sm:max-w-md`,children:[j(b,{className:`flex-0 border-border-weak border-b pb-3`,children:M(S,{className:`flex items-center gap-2`,children:[j(he,{size:20}),j(`span`,{children:`Giỏ hàng của bạn`}),a>0&&M(`span`,{className:`font-normal text-sm text-text-positive-weak`,children:[`(`,a,` sản phẩm)`]})]})}),M(ce,{defaultValue:i>0?`pre_order`:`in_stock`,className:`h-full flex-1 overflow-y-auto p-4 pt-0`,children:[M(se,{className:`w-full flex-0`,children:[M(O,{value:`in_stock`,className:`relative`,children:[`Có sẵn`,r>0&&M(`span`,{children:[`(`,r,`)`]})]}),M(O,{value:`pre_order`,className:`relative`,children:[`Đặt trước`,i>0&&M(`span`,{children:[`(`,i,`)`]})]})]}),j(k,{value:`pre_order`,className:`flex-1 overflow-y-auto`,children:j(K,{items:t,cartType:`pre_order`})}),j(k,{value:`in_stock`,className:`flex-1 overflow-y-auto`,children:j(K,{items:e,cartType:`in_stock`})})]})]})]})},Ie=()=>{let{isLoggedIn:e,username:t,email:r,onGoogleLoginSuccess:i,onLogout:a}=G(),o=H(`(min-width: 640px)`),[s,c]=B(!1);return M(`header`,{className:A(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[e&&j(Y,{}),M(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[j(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:j(F,{size:20})}),M(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[j(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),j(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),M(`div`,{className:`flex flex-1 items-center justify-end gap-x-2`,children:[!e&&M(n,{className:`w-8 sm:w-fit`,onClick:()=>c(!0),children:[j(N,{}),j(`span`,{className:`sr-only sm:not-sr-only`,children:`Đăng nhập`})]}),e&&M(ue,{children:[j($,{userName:t,userEmail:r,onLogout:a}),j(_,{orientation:`vertical`,className:`min-h-6 w-px`}),j(Fe,{})]})]}),o&&j(h,{open:s,onOpenChange:c,children:M(m,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[j(p,{className:`flex-0 gap-2 p-6`,children:j(f,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),j(`div`,{className:`flex flex-1 flex-col`,children:j(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:M(`div`,{className:`flex flex-col items-center gap-y-1`,children:[j(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),j(U,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),j(d,{className:`p-2`})]})}),!o&&j(D,{open:s,onOpenChange:c,children:M(E,{children:[j(oe,{className:`text-left`,children:j(T,{children:`Chào mừng bạn đến với Lunas Store!`})}),j(`div`,{className:`flex flex-1 flex-col`,children:j(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:M(`div`,{className:`flex flex-col items-center gap-y-1`,children:[j(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),j(U,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||await i?.(e)}})]})})}),j(w,{})]})})]})},Le=({children:e,...t})=>{let{isLoggedIn:n}=G();return n?j(Te,{variant:`inset`,collapsible:`icon`,...t,children:e}):null},Re=({children:e})=>{let{isLoggedIn:t,onGoogleLoginSuccess:r}=G(),i=H(`(min-width: 640px)`),[a,o]=B(!1);return t?j(Ee,{children:j(`section`,{className:`relative size-full`,children:j(`div`,{className:`absolute inset-0 flex flex-col`,children:e})})}):j(`div`,{className:`size-full p-4 pt-[calc(var(--header-height)+1.5rem)]`,children:M(`div`,{className:`flex size-full flex-col items-center justify-center gap-6 rounded-lg bg-card p-8 text-center shadow-card`,children:[j(`div`,{className:`flex size-20 items-center justify-center rounded-full bg-muted-foreground/10`,children:j(de,{className:`size-10 text-primary`})}),M(`div`,{className:`flex max-w-md flex-col gap-2`,children:[j(`h2`,{className:`font-semibold text-2xl`,children:`Bạn chưa đăng nhập`}),j(`p`,{className:`text-text-positive-weak`,children:`Đăng nhập để khám phá đầy đủ các tính năng của Lunas Store và truy cập vào tài khoản của bạn.`})]}),M(n,{size:`lg`,className:`gap-2`,onClick:()=>o(!0),children:[j(N,{size:18}),j(`span`,{children:`Đăng nhập ngay`})]}),i&&j(h,{open:a,onOpenChange:o,children:M(m,{showCloseButton:!1,className:`flex flex-col gap-0 border-none p-0 sm:max-w-sm`,children:[j(p,{className:`flex-0 gap-2 p-6`,children:j(f,{className:`text-center`,children:`Chào mừng bạn đến với Lunas Store!`})}),j(`div`,{className:`flex flex-1 flex-col`,children:j(`main`,{className:`size-full flex-1 bg-card p-4 pt-0`,children:M(`div`,{className:`flex flex-col items-center gap-y-1`,children:[j(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),j(U,{size:`large`,theme:`outline`,width:240,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),o(!1))}})]})})}),j(d,{className:`p-2`})]})}),!i&&j(D,{open:a,onOpenChange:o,children:M(E,{children:[j(oe,{className:`text-left`,children:j(T,{children:`Chào mừng bạn đến với Lunas Store!`})}),j(`div`,{className:`flex flex-1 flex-col`,children:j(`main`,{className:`flex size-full flex-1 flex-col p-4 pt-0`,children:M(`div`,{className:`flex flex-col items-center gap-y-1`,children:[j(`p`,{className:`text-sm text-text-positive-weak`,children:`Đăng nhập với Google`}),j(U,{size:`large`,theme:`outline`,onSuccess:async e=>{!e.clientId||!e.credential||!e.select_by||(await r?.(e),o(!1))}})]})})}),j(w,{})]})})]})})},ze=({className:e,children:t})=>j(`div`,{"data-slot":`main-header`,className:A(`flex-0 snap-start`,e),children:t}),Be=({className:e,children:t})=>j(`div`,{"data-slot":`main-content`,className:A(`flex w-full flex-1 flex-col gap-4 overflow-y-auto px-2 sm:px-4`,e),children:t}),Ve=({className:e,children:t})=>j(`div`,{"data-slot":`main-footer`,className:A(`hidden w-full flex-0 border-border-weak border-t pt-2 sm:flex`,e),children:t}),He=({children:e,className:t})=>j(`div`,{"data-slot":`main-group`,className:A(`flex size-full flex-col gap-4`,t),children:e}),Ue=({className:e,children:t})=>j(`div`,{"data-slot":`main-group-content`,className:A(`size-full max-w-8xl flex-1 rounded-md bg-card p-4 shadow-card`,e),children:t});export{Fe as ServiceLayoutCartInfo,Ie as ServiceLayoutHeader,Re as ServiceLayoutMain,Be as ServiceLayoutMainContent,Ve as ServiceLayoutMainFooter,He as ServiceLayoutMainGroup,Ue as ServiceLayoutMainGroupContent,ze as ServiceLayoutMainHeader,Ne as ServiceLayoutProvider,Le as ServiceLayoutSidebar,Oe as ServiceLayoutSidebarContent,De as ServiceLayoutSidebarFooter,ke as ServiceLayoutSidebarGroup,je as ServiceLayoutSidebarGroupContent,Ae as ServiceLayoutSidebarGroupLabel,X as ServiceLayoutSidebarMenu,Q as ServiceLayoutSidebarMenuButton,Z as ServiceLayoutSidebarMenuItem,$ as ServiceLayoutUserInfo,Pe as ServiceLayoutWrapper};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime29 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/pages/FeatureDeveloping.d.ts
|
|
4
4
|
interface FeatureDevelopingProps {
|
|
@@ -19,7 +19,7 @@ declare const FeatureDeveloping: ({
|
|
|
19
19
|
onButtonClick,
|
|
20
20
|
className,
|
|
21
21
|
iconClassName
|
|
22
|
-
}: FeatureDevelopingProps) =>
|
|
22
|
+
}: FeatureDevelopingProps) => react_jsx_runtime29.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { FeatureDeveloping, FeatureDeveloping as default, FeatureDevelopingProps };
|
|
25
25
|
//# sourceMappingURL=FeatureDeveloping.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/pages/FeatureDeveloping.d.ts
|
|
4
4
|
interface FeatureDevelopingProps {
|
|
@@ -19,7 +19,7 @@ declare const FeatureDeveloping: ({
|
|
|
19
19
|
onButtonClick,
|
|
20
20
|
className,
|
|
21
21
|
iconClassName
|
|
22
|
-
}: FeatureDevelopingProps) =>
|
|
22
|
+
}: FeatureDevelopingProps) => react_jsx_runtime5.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { FeatureDeveloping, FeatureDeveloping as default, FeatureDevelopingProps };
|
|
25
25
|
//# sourceMappingURL=FeatureDeveloping.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/pages/FeatureFixing.d.ts
|
|
4
4
|
interface FeatureFixingProps {
|
|
@@ -19,7 +19,7 @@ declare const FeatureFixing: ({
|
|
|
19
19
|
onButtonClick,
|
|
20
20
|
className,
|
|
21
21
|
iconClassName
|
|
22
|
-
}: FeatureFixingProps) =>
|
|
22
|
+
}: FeatureFixingProps) => react_jsx_runtime6.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { FeatureFixing, FeatureFixing as default, FeatureFixingProps };
|
|
25
25
|
//# sourceMappingURL=FeatureFixing.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime28 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/pages/NotAuthorized.d.ts
|
|
4
4
|
interface NotAuthorizedProps {
|
|
@@ -19,7 +19,7 @@ declare const NotAuthorized: ({
|
|
|
19
19
|
onButtonClick,
|
|
20
20
|
className,
|
|
21
21
|
iconClassName
|
|
22
|
-
}: NotAuthorizedProps) =>
|
|
22
|
+
}: NotAuthorizedProps) => react_jsx_runtime28.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { NotAuthorized, NotAuthorized as default, NotAuthorizedProps };
|
|
25
25
|
//# sourceMappingURL=NotAuthorized.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime30 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/pages/NotFound.d.ts
|
|
4
4
|
interface NotFoundProps {
|
|
@@ -19,7 +19,7 @@ declare const NotFound: ({
|
|
|
19
19
|
onButtonClick,
|
|
20
20
|
className,
|
|
21
21
|
iconClassName
|
|
22
|
-
}: NotFoundProps) =>
|
|
22
|
+
}: NotFoundProps) => react_jsx_runtime30.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { NotFound, NotFound as default, NotFoundProps };
|
|
25
25
|
//# sourceMappingURL=NotFound.d.mts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`@customafk/react-toolkit/utils`),n=require(`react/jsx-runtime`),r=require(`lucide-react`),i=require(`react-resizable-panels`);i=e.t(i);function a({className:e,...r}){return(0,n.jsx)(i.PanelGroup,{"data-slot":`resizable-panel-group`,className:(0,t.cn)(`flex h-full w-full data-[panel-group-direction=vertical]:flex-col`,e),...r})}function o({...e}){return(0,n.jsx)(i.Panel,{"data-slot":`resizable-panel`,...e})}function s({withHandle:e,className:a,...o}){return(0,n.jsx)(i.PanelResizeHandle,{"data-slot":`resizable-handle`,className:(0,t.cn)(`after:-translate-x-1/2 data-[panel-group-direction=vertical]:after:-translate-y-1/2 relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90`,a),...o,children:e&&(0,n.jsx)(`div`,{className:`z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border`,children:(0,n.jsx)(r.GripVerticalIcon,{className:`size-2.5`})})})}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
|
2
|
-
//# sourceMappingURL=resizable-
|
|
2
|
+
//# sourceMappingURL=resizable-C2-dXaDM.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable-
|
|
1
|
+
{"version":3,"file":"resizable-C2-dXaDM.cjs","names":["ResizablePrimitive","GripVerticalIcon"],"sources":["../packages/components/ui/resizable.tsx"],"sourcesContent":["'use client';\n\nimport { GripVerticalIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\nfunction ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {\n return (\n <ResizablePrimitive.PanelGroup\n data-slot=\"resizable-panel-group\"\n className={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}\n {...props}\n />\n );\n}\n\nfunction ResizablePanel({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n withHandle?: boolean;\n}) {\n return (\n <ResizablePrimitive.PanelResizeHandle\n data-slot=\"resizable-handle\"\n className={cn(\n 'after:-translate-x-1/2 data-[panel-group-direction=vertical]:after:-translate-y-1/2 relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90',\n className\n )}\n {...props}\n >\n {withHandle && (\n <div className=\"z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border\">\n <GripVerticalIcon className=\"size-2.5\" />\n </div>\n )}\n </ResizablePrimitive.PanelResizeHandle>\n );\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup };\n"],"mappings":"8LAQA,SAAS,EAAoB,CAAE,YAAW,GAAG,GAAqE,CAChH,OACE,EAAA,EAAA,KAACA,EAAmB,WAAA,CAClB,YAAU,wBACV,WAAA,EAAA,EAAA,IAAc,oEAAqE,EAAU,CAC7F,GAAI,GACJ,CAIN,SAAS,EAAe,CAAE,GAAG,GAAgE,CAC3F,OAAO,EAAA,EAAA,KAACA,EAAmB,MAAA,CAAM,YAAU,kBAAkB,GAAI,GAAS,CAG5E,SAAS,EAAgB,CACvB,aACA,YACA,GAAG,GAGF,CACD,OACE,EAAA,EAAA,KAACA,EAAmB,kBAAA,CAClB,YAAU,mBACV,WAAA,EAAA,EAAA,IACE,4oBACA,EACD,CACD,GAAI,WAEH,IACC,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,sFACb,EAAA,EAAA,KAACC,EAAAA,iBAAAA,CAAiB,UAAU,WAAA,CAAa,EACrC,EAE6B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{cn as e}from"@customafk/react-toolkit/utils";import{jsx as t}from"react/jsx-runtime";import{GripVerticalIcon as n}from"lucide-react";import*as r from"react-resizable-panels";function i({className:n,...i}){return t(r.PanelGroup,{"data-slot":`resizable-panel-group`,className:e(`flex h-full w-full data-[panel-group-direction=vertical]:flex-col`,n),...i})}function a({...e}){return t(r.Panel,{"data-slot":`resizable-panel`,...e})}function o({withHandle:i,className:a,...o}){return t(r.PanelResizeHandle,{"data-slot":`resizable-handle`,className:e(`after:-translate-x-1/2 data-[panel-group-direction=vertical]:after:-translate-y-1/2 relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90`,a),...o,children:i&&t(`div`,{className:`z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border`,children:t(n,{className:`size-2.5`})})})}export{a as n,i as r,o as t};
|
|
2
|
-
//# sourceMappingURL=resizable-
|
|
2
|
+
//# sourceMappingURL=resizable-LConLbS6.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable-
|
|
1
|
+
{"version":3,"file":"resizable-LConLbS6.mjs","names":[],"sources":["../packages/components/ui/resizable.tsx"],"sourcesContent":["'use client';\n\nimport { GripVerticalIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\nfunction ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {\n return (\n <ResizablePrimitive.PanelGroup\n data-slot=\"resizable-panel-group\"\n className={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}\n {...props}\n />\n );\n}\n\nfunction ResizablePanel({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n withHandle?: boolean;\n}) {\n return (\n <ResizablePrimitive.PanelResizeHandle\n data-slot=\"resizable-handle\"\n className={cn(\n 'after:-translate-x-1/2 data-[panel-group-direction=vertical]:after:-translate-y-1/2 relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90',\n className\n )}\n {...props}\n >\n {withHandle && (\n <div className=\"z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border\">\n <GripVerticalIcon className=\"size-2.5\" />\n </div>\n )}\n </ResizablePrimitive.PanelResizeHandle>\n );\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup };\n"],"mappings":"qLAQA,SAAS,EAAoB,CAAE,YAAW,GAAG,GAAqE,CAChH,OACE,EAAC,EAAmB,WAAA,CAClB,YAAU,wBACV,UAAW,EAAG,oEAAqE,EAAU,CAC7F,GAAI,GACJ,CAIN,SAAS,EAAe,CAAE,GAAG,GAAgE,CAC3F,OAAO,EAAC,EAAmB,MAAA,CAAM,YAAU,kBAAkB,GAAI,GAAS,CAG5E,SAAS,EAAgB,CACvB,aACA,YACA,GAAG,GAGF,CACD,OACE,EAAC,EAAmB,kBAAA,CAClB,YAAU,mBACV,UAAW,EACT,4oBACA,EACD,CACD,GAAI,WAEH,GACC,EAAC,MAAA,CAAI,UAAU,qFACb,EAAC,EAAA,CAAiB,UAAU,WAAA,CAAa,EACrC,EAE6B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{cn as e}from"@customafk/react-toolkit/utils";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{memo as r}from"react";import{ScrollArea as i}from"radix-ui";const a=r(({className:r,children:a,ref:s,onScroll:c,...l})=>n(i.Root,{"data-slot":`scroll-area`,className:e(`relative overflow-hidden`,r),...l,children:[t(i.Viewport,{ref:s,className:`size-full rounded-[inherit]`,onScroll:c,children:a}),t(o,{}),t(i.Corner,{})]}));a.displayName=`ScrollArea`;const o=r(({className:n,orientation:r=`vertical`,...a})=>t(i.ScrollAreaScrollbar,{"data-slot":`scroll-area-scrollbar`,orientation:r,className:e(`flex touch-none select-none border-border-weak p-px transition-colors`,r===`vertical`&&`h-full w-2.5 border-l border-l-transparent`,r===`horizontal`&&`h-2.5 flex-col border-t border-t-transparent`,n),...a,children:t(i.ScrollAreaThumb,{className:`relative flex-1 rounded-full bg-border-weak`})}));o.displayName=`ScrollBar`;export{o as n,a as t};
|
|
2
|
-
//# sourceMappingURL=scroll-area-
|
|
2
|
+
//# sourceMappingURL=scroll-area-6xusEFm6.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area-
|
|
1
|
+
{"version":3,"file":"scroll-area-6xusEFm6.mjs","names":["ScrollArea","ScrollAreaPrimitive"],"sources":["../packages/components/ui/scroll-area.tsx"],"sourcesContent":["'use client';\nimport { memo } from 'react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\n\nconst ScrollArea = memo(({ className, children, ref, onScroll, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) => {\n return (\n <ScrollAreaPrimitive.Root data-slot=\"scroll-area\" className={cn('relative overflow-hidden', className)} {...props}>\n <ScrollAreaPrimitive.Viewport ref={ref} className=\"size-full rounded-[inherit]\" onScroll={onScroll}>\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n});\nScrollArea.displayName = 'ScrollArea';\n\nconst ScrollBar = memo(({ className, orientation = 'vertical', ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) => {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n 'flex touch-none select-none border-border-weak p-px transition-colors',\n orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent',\n orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-border-weak\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n});\nScrollBar.displayName = 'ScrollBar';\n\nexport { ScrollArea, ScrollBar };\n"],"mappings":"yKAOA,MAAMA,EAAa,GAAM,CAAE,YAAW,WAAU,MAAK,WAAU,GAAG,KAE9D,EAACC,EAAoB,KAAA,CAAK,YAAU,cAAc,UAAW,EAAG,2BAA4B,EAAU,CAAE,GAAI,YAC1G,EAACA,EAAoB,SAAA,CAAc,MAAK,UAAU,8BAAwC,WACvF,YAC4B,CAC/B,EAAC,EAAA,EAAA,CAAY,CACb,EAACA,EAAoB,OAAA,EAAA,CAAS,GACL,CAE7B,CACF,EAAW,YAAc,aAEzB,MAAM,EAAY,GAAM,CAAE,YAAW,cAAc,WAAY,GAAG,KAE9D,EAACA,EAAoB,oBAAA,CACnB,YAAU,wBACG,cACb,UAAW,EACT,wEACA,IAAgB,YAAc,6CAC9B,IAAgB,cAAgB,+CAChC,EACD,CACD,GAAI,WAEJ,EAACA,EAAoB,gBAAA,CAAgB,UAAU,8CAAA,CAAgD,EACvD,CAE5C,CACF,EAAU,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`@customafk/react-toolkit/utils`),n=require(`react/jsx-runtime`),r=require(`react`),i=require(`radix-ui`);const a=(0,r.memo)(({className:e,children:r,ref:a,onScroll:s,...c})=>(0,n.jsxs)(i.ScrollArea.Root,{"data-slot":`scroll-area`,className:(0,t.cn)(`relative overflow-hidden`,e),...c,children:[(0,n.jsx)(i.ScrollArea.Viewport,{ref:a,className:`size-full rounded-[inherit]`,onScroll:s,children:r}),(0,n.jsx)(o,{}),(0,n.jsx)(i.ScrollArea.Corner,{})]}));a.displayName=`ScrollArea`;const o=(0,r.memo)(({className:e,orientation:r=`vertical`,...a})=>(0,n.jsx)(i.ScrollArea.ScrollAreaScrollbar,{"data-slot":`scroll-area-scrollbar`,orientation:r,className:(0,t.cn)(`flex touch-none select-none border-border-weak p-px transition-colors`,r===`vertical`&&`h-full w-2.5 border-l border-l-transparent`,r===`horizontal`&&`h-2.5 flex-col border-t border-t-transparent`,e),...a,children:(0,n.jsx)(i.ScrollArea.ScrollAreaThumb,{className:`relative flex-1 rounded-full bg-border-weak`})}));o.displayName=`ScrollBar`,Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
2
|
-
//# sourceMappingURL=scroll-area-
|
|
2
|
+
//# sourceMappingURL=scroll-area-D61j6n8I.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area-
|
|
1
|
+
{"version":3,"file":"scroll-area-D61j6n8I.cjs","names":["ScrollAreaPrimitive"],"sources":["../packages/components/ui/scroll-area.tsx"],"sourcesContent":["'use client';\nimport { memo } from 'react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\n\nconst ScrollArea = memo(({ className, children, ref, onScroll, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) => {\n return (\n <ScrollAreaPrimitive.Root data-slot=\"scroll-area\" className={cn('relative overflow-hidden', className)} {...props}>\n <ScrollAreaPrimitive.Viewport ref={ref} className=\"size-full rounded-[inherit]\" onScroll={onScroll}>\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n});\nScrollArea.displayName = 'ScrollArea';\n\nconst ScrollBar = memo(({ className, orientation = 'vertical', ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) => {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n 'flex touch-none select-none border-border-weak p-px transition-colors',\n orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent',\n orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-border-weak\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n});\nScrollBar.displayName = 'ScrollBar';\n\nexport { ScrollArea, ScrollBar };\n"],"mappings":"gKAOA,MAAM,GAAA,EAAA,EAAA,OAAmB,CAAE,YAAW,WAAU,MAAK,WAAU,GAAG,MAE9D,EAAA,EAAA,MAACA,EAAAA,WAAoB,KAAA,CAAK,YAAU,cAAc,WAAA,EAAA,EAAA,IAAc,2BAA4B,EAAU,CAAE,GAAI,aAC1G,EAAA,EAAA,KAACA,EAAAA,WAAoB,SAAA,CAAc,MAAK,UAAU,8BAAwC,WACvF,YAC4B,EAC/B,EAAA,EAAA,KAAC,EAAA,EAAA,CAAY,EACb,EAAA,EAAA,KAACA,EAAAA,WAAoB,OAAA,EAAA,CAAS,GACL,CAE7B,CACF,EAAW,YAAc,aAEzB,MAAM,GAAA,EAAA,EAAA,OAAkB,CAAE,YAAW,cAAc,WAAY,GAAG,MAE9D,EAAA,EAAA,KAACA,EAAAA,WAAoB,oBAAA,CACnB,YAAU,wBACG,cACb,WAAA,EAAA,EAAA,IACE,wEACA,IAAgB,YAAc,6CAC9B,IAAgB,cAAgB,+CAChC,EACD,CACD,GAAI,YAEJ,EAAA,EAAA,KAACA,EAAAA,WAAoB,gBAAA,CAAgB,UAAU,8CAAA,CAAgD,EACvD,CAE5C,CACF,EAAU,YAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime228 from "react/jsx-runtime";
|
|
2
2
|
import { Separator } from "radix-ui";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/ui/separator.d.ts
|
|
@@ -7,7 +7,7 @@ declare function Separator$1({
|
|
|
7
7
|
orientation,
|
|
8
8
|
decorative,
|
|
9
9
|
...props
|
|
10
|
-
}: React.ComponentProps<typeof Separator.Root>):
|
|
10
|
+
}: React.ComponentProps<typeof Separator.Root>): react_jsx_runtime228.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Separator$1 as t };
|
|
13
|
-
//# sourceMappingURL=separator-
|
|
13
|
+
//# sourceMappingURL=separator-BjY6jrIo.d.mts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`@customafk/react-toolkit/utils`),n=require(`react/jsx-runtime`),r=require(`radix-ui`);function i({className:e,orientation:i=`horizontal`,decorative:a=!0,...o}){return(0,n.jsx)(r.Separator.Root,{"data-slot":`separator`,decorative:a,orientation:i,className:(0,t.cn)(`bg-border-weak shrink-0`,`data-[orientation=horizontal]:h-px`,`data-[orientation=horizontal]:w-full`,`data-[orientation=vertical]:h-full`,`data-[orientation=vertical]:w-px`,e),...o})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
2
|
-
//# sourceMappingURL=separator-
|
|
2
|
+
//# sourceMappingURL=separator-Crr30ZHa.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator-
|
|
1
|
+
{"version":3,"file":"separator-Crr30ZHa.cjs","names":["SeparatorPrimitive"],"sources":["../packages/components/ui/separator.tsx"],"sourcesContent":["'use client';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Separator as SeparatorPrimitive } from 'radix-ui';\n\nfunction Separator({ className, orientation = 'horizontal', decorative = true, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border-weak shrink-0',\n 'data-[orientation=horizontal]:h-px',\n 'data-[orientation=horizontal]:w-full',\n 'data-[orientation=vertical]:h-full',\n 'data-[orientation=vertical]:w-px',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n"],"mappings":"6IAKA,SAAS,EAAU,CAAE,YAAW,cAAc,aAAc,aAAa,GAAM,GAAG,GAA+D,CAC/I,OACE,EAAA,EAAA,KAACA,EAAAA,UAAmB,KAAA,CAClB,YAAU,YACE,aACC,cACb,WAAA,EAAA,EAAA,IACE,0BACA,qCACA,uCACA,qCACA,mCACA,EACD,CACD,GAAI,GACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime225 from "react/jsx-runtime";
|
|
2
2
|
import { Separator } from "radix-ui";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/ui/separator.d.ts
|
|
@@ -7,7 +7,7 @@ declare function Separator$1({
|
|
|
7
7
|
orientation,
|
|
8
8
|
decorative,
|
|
9
9
|
...props
|
|
10
|
-
}: React.ComponentProps<typeof Separator.Root>):
|
|
10
|
+
}: React.ComponentProps<typeof Separator.Root>): react_jsx_runtime225.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Separator$1 as t };
|
|
13
|
-
//# sourceMappingURL=separator-
|
|
13
|
+
//# sourceMappingURL=separator-egTcgvBz.d.cts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{cn as e}from"@customafk/react-toolkit/utils";import{jsx as t}from"react/jsx-runtime";import{Separator as n}from"radix-ui";function r({className:r,orientation:i=`horizontal`,decorative:a=!0,...o}){return t(n.Root,{"data-slot":`separator`,decorative:a,orientation:i,className:e(`bg-border-weak shrink-0`,`data-[orientation=horizontal]:h-px`,`data-[orientation=horizontal]:w-full`,`data-[orientation=vertical]:h-full`,`data-[orientation=vertical]:w-px`,r),...o})}export{r as t};
|
|
2
|
-
//# sourceMappingURL=separator-
|
|
2
|
+
//# sourceMappingURL=separator-yTKDuMWb.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator-
|
|
1
|
+
{"version":3,"file":"separator-yTKDuMWb.mjs","names":["Separator","SeparatorPrimitive"],"sources":["../packages/components/ui/separator.tsx"],"sourcesContent":["'use client';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Separator as SeparatorPrimitive } from 'radix-ui';\n\nfunction Separator({ className, orientation = 'horizontal', decorative = true, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border-weak shrink-0',\n 'data-[orientation=horizontal]:h-px',\n 'data-[orientation=horizontal]:w-full',\n 'data-[orientation=vertical]:h-full',\n 'data-[orientation=vertical]:w-px',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n"],"mappings":"iIAKA,SAASA,EAAU,CAAE,YAAW,cAAc,aAAc,aAAa,GAAM,GAAG,GAA+D,CAC/I,OACE,EAACC,EAAmB,KAAA,CAClB,YAAU,YACE,aACC,cACb,UAAW,EACT,0BACA,qCACA,uCACA,qCACA,mCACA,EACD,CACD,GAAI,GACJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{cn as e}from"@customafk/react-toolkit/utils";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{XIcon as r}from"lucide-react";import{Dialog as i}from"radix-ui";function a({...e}){return t(i.Root,{"data-slot":`sheet`,...e})}function o({...e}){return t(i.Trigger,{"data-slot":`sheet-trigger`,...e})}function s({...e}){return t(i.Close,{"data-slot":`sheet-close`,...e})}function c({...e}){return t(i.Portal,{"data-slot":`sheet-portal`,...e})}function l({className:n,...r}){return t(i.Overlay,{"data-slot":`sheet-overlay`,className:e(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=open]:fade-in-0`,n),...r})}function u({className:a,children:o,side:s=`right`,...u}){return n(c,{children:[t(l,{}),n(i.Content,{"data-slot":`sheet-content`,className:e(`bg-background`,`fixed z-50 flex flex-col gap-4 border-border-weak shadow-dropdown transition ease-in-out`,`data-[state=open]:animate-in`,`data-[state=open]:duration-500`,`data-[state=closed]:animate-out`,`data-[state=closed]:duration-300`,s===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm`,s===`right`&&`data-[state=closed]:slide-out-to-right`,s===`right`&&`data-[state=open]:slide-in-from-right`,s===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm`,s===`left`&&`data-[state=closed]:slide-out-to-left`,s===`left`&&`data-[state=open]:slide-in-from-left`,s===`top`&&`inset-x-0 top-0 h-auto border-b`,s===`top`&&`data-[state=closed]:slide-out-to-top`,s===`top`&&`data-[state=open]:slide-in-from-top`,s===`bottom`&&`inset-x-0 bottom-0 h-auto border-t`,s===`bottom`&&`data-[state=closed]:slide-out-to-bottom`,s===`bottom`&&`data-[state=open]:slide-in-from-bottom`,a),...u,children:[o,n(i.Close,{className:e(`cursor-pointer p-2 ring-offset-background`,`absolute top-2 right-2 rounded-full opacity-70 transition-opacity`,`data-[state=open]:bg-secondary`,`disabled:pointer-events-none`,`hover:opacity-100`,`hover:bg-border-muted`,`focus:ring-border-weak`,`focus:ring-4`,`focus:outline-hidden`),children:[t(r,{className:`size-5`}),t(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function d({className:n,...r}){return t(`div`,{"data-slot":`sheet-header`,className:e(`flex flex-0 flex-col gap-1.5 p-4`,n),...r})}function f({className:n,...r}){return t(`div`,{"data-slot":`sheet-footer`,className:e(`mt-auto flex flex-0 flex-col gap-2 p-4`,n),...r})}function p({className:n,...r}){return t(i.Title,{"data-slot":`sheet-title`,className:e(`font-semibold text-text-positive-strong`,n),...r})}function m({className:n,...r}){return t(i.Description,{"data-slot":`sheet-description`,className:e(`text-sm text-text-positive-weak`,n),...r})}export{f as a,o as c,m as i,s as n,d as o,u as r,p as s,a as t};
|
|
2
|
-
//# sourceMappingURL=sheet-
|
|
2
|
+
//# sourceMappingURL=sheet-BSeiP8S8.mjs.map
|