@customafk/lunas-ui 0.2.8 → 0.2.10
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/{alert-DIC1_ymv.cjs → alert-BqJVf4wD.cjs} +1 -1
- package/dist/{alert-DIC1_ymv.cjs.map → alert-BqJVf4wD.cjs.map} +1 -1
- package/dist/{alert-VP3giy31.mjs → alert-DQHE-pdI.mjs} +1 -1
- package/dist/{alert-VP3giy31.mjs.map → alert-DQHE-pdI.mjs.map} +1 -1
- package/dist/{alert-DDL82_U3.d.mts → alert-Dt_GDCm5.d.mts} +8 -8
- package/dist/{alert-CA1RS1CG.d.cts → alert-LqhAi5XB.d.cts} +6 -6
- package/dist/{badge-Cg0e-djv.d.mts → badge-DaaGIpeV.d.mts} +7 -7
- package/dist/{badge-BFTGDsBm.d.cts → badge-Gsrn62XW.d.cts} +5 -5
- package/dist/{button-C76drZpd.d.mts → button-CjlinfYI.d.mts} +5 -5
- package/dist/{button-Bn54lPVz.d.cts → button-gKqh2psz.d.cts} +7 -7
- package/dist/{calendar-CyAPpT2m.cjs → calendar-B2V4Lv0T.cjs} +1 -1
- package/dist/{calendar-CyAPpT2m.cjs.map → calendar-B2V4Lv0T.cjs.map} +1 -1
- package/dist/{calendar-JKxWM6AF.mjs → calendar-Cw1G0sVL.mjs} +1 -1
- package/dist/{calendar-JKxWM6AF.mjs.map → calendar-Cw1G0sVL.mjs.map} +1 -1
- package/dist/cards/simple-card.d.mts +2 -2
- package/dist/{checkbox-RZrRNYP2.cjs → checkbox-Di7ACavC.cjs} +1 -1
- package/dist/{checkbox-RZrRNYP2.cjs.map → checkbox-Di7ACavC.cjs.map} +1 -1
- package/dist/{checkbox-DJEdYOjA.mjs → checkbox-Dzo6oI4y.mjs} +1 -1
- package/dist/{checkbox-DJEdYOjA.mjs.map → checkbox-Dzo6oI4y.mjs.map} +1 -1
- package/dist/{cms-layout-HfnOQS16.mjs → cms-layout-Bp6rU_of.mjs} +2 -2
- package/dist/{cms-layout-HfnOQS16.mjs.map → cms-layout-Bp6rU_of.mjs.map} +1 -1
- package/dist/{cms-layout-Dc4moos1.cjs → cms-layout-r9TmK6hi.cjs} +2 -2
- package/dist/{cms-layout-Dc4moos1.cjs.map → cms-layout-r9TmK6hi.cjs.map} +1 -1
- package/dist/data-display/country.d.mts +1 -1
- package/dist/data-display/role-badge.d.mts +1 -1
- package/dist/data-display/statistic.d.mts +2 -2
- package/dist/{dialog-D6ygAOSV.d.mts → dialog-Coe4g5Lp.d.cts} +12 -12
- package/dist/{dialog-CNhwBcEl.d.cts → dialog-DrJyRArf.d.mts} +12 -12
- package/dist/dialogs/detail-dialog/components/sidebar.cjs +1 -1
- package/dist/dialogs/detail-dialog/components/sidebar.d.cts +27 -27
- package/dist/dialogs/detail-dialog/components/sidebar.d.mts +27 -27
- package/dist/dialogs/detail-dialog/components/sidebar.mjs +1 -1
- package/dist/dialogs/detail-dialog/index.cjs +1 -1
- package/dist/dialogs/detail-dialog/index.cjs.map +1 -1
- package/dist/dialogs/detail-dialog/index.mjs +1 -1
- package/dist/dialogs/detail-dialog/index.mjs.map +1 -1
- package/dist/features/descriptions/index.cjs +1 -1
- package/dist/features/descriptions/index.cjs.map +1 -1
- package/dist/features/descriptions/index.d.cts +10 -1
- package/dist/features/descriptions/index.d.mts +10 -1
- package/dist/features/descriptions/index.mjs +1 -1
- package/dist/features/descriptions/index.mjs.map +1 -1
- package/dist/features/search-modal/index.d.cts +2 -2
- package/dist/features/search-modal/index.d.mts +2 -2
- package/dist/features/tables/index.cjs +1 -1
- package/dist/features/tables/index.d.cts +194 -27
- package/dist/features/tables/index.d.mts +174 -7
- package/dist/features/tables/index.mjs +1 -1
- package/dist/features/tanstack-form/index.cjs +1 -1
- package/dist/features/tanstack-form/index.d.cts +1 -1
- package/dist/features/tanstack-form/index.d.mts +1 -1
- package/dist/features/tanstack-form/index.mjs +1 -1
- package/dist/{field-CppNvoxV.cjs → field-C51eJ6QN.cjs} +2 -2
- package/dist/{field-CppNvoxV.cjs.map → field-C51eJ6QN.cjs.map} +1 -1
- package/dist/{field-CXVnw75a.mjs → field-DfsTE4Ie.mjs} +2 -2
- package/dist/{field-CXVnw75a.mjs.map → field-DfsTE4Ie.mjs.map} +1 -1
- package/dist/{index-75nSAiSe.d.mts → index-DzSTWYsk.d.mts} +173 -173
- package/dist/{index-aTMCQQms.d.cts → index-rnLTzTi7.d.cts} +358 -358
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.mts +8 -8
- package/dist/index.mjs +1 -1
- package/dist/{input-Cd0G5y-9.mjs → input-6f9JTc79.mjs} +1 -1
- package/dist/{input-Cd0G5y-9.mjs.map → input-6f9JTc79.mjs.map} +1 -1
- package/dist/{input-Cl5VkKQh.cjs → input-BMOYFJYM.cjs} +1 -1
- package/dist/{input-Cl5VkKQh.cjs.map → input-BMOYFJYM.cjs.map} +1 -1
- package/dist/{input-D5dtkW6g.d.mts → input-BRVTkuUg.d.cts} +6 -6
- package/dist/{input-t2hpPP2K.d.cts → input-DpaSVQ7H.d.mts} +6 -6
- package/dist/{label-OmlGaZ5h.mjs → label-3vAlNtF9.mjs} +1 -1
- package/dist/{label-OmlGaZ5h.mjs.map → label-3vAlNtF9.mjs.map} +1 -1
- package/dist/{label-DkMTQ3Ch.cjs → label-zyBJYydC.cjs} +1 -1
- package/dist/{label-DkMTQ3Ch.cjs.map → label-zyBJYydC.cjs.map} +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 +7 -7
- package/dist/layouts/flex.d.mts +9 -9
- package/dist/layouts/payment-layout/index.cjs +1 -1
- package/dist/layouts/payment-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.cts +2 -2
- package/dist/pages/FeatureFixing.d.mts +2 -2
- package/dist/pages/NotAuthorized.d.cts +2 -2
- package/dist/pages/NotAuthorized.d.mts +2 -2
- package/dist/pages/NotFound.d.cts +2 -2
- package/dist/pages/NotFound.d.mts +2 -2
- package/dist/{payment-layout-Da29dHJe.cjs → payment-layout-C9pP5HdT.cjs} +1 -1
- package/dist/{payment-layout-Da29dHJe.cjs.map → payment-layout-C9pP5HdT.cjs.map} +1 -1
- package/dist/{payment-layout-wN5c7MCM.mjs → payment-layout-D-69gOPJ.mjs} +1 -1
- package/dist/{payment-layout-wN5c7MCM.mjs.map → payment-layout-D-69gOPJ.mjs.map} +1 -1
- package/dist/{popover-OJXFbqJi.mjs → popover-BFJhuzW3.mjs} +1 -1
- package/dist/{popover-OJXFbqJi.mjs.map → popover-BFJhuzW3.mjs.map} +1 -1
- package/dist/{popover-AEt-aSy3.cjs → popover-CmoqhK17.cjs} +1 -1
- package/dist/{popover-AEt-aSy3.cjs.map → popover-CmoqhK17.cjs.map} +1 -1
- package/dist/progress-0cpDwgAJ.mjs +2 -0
- package/dist/progress-0cpDwgAJ.mjs.map +1 -0
- package/dist/progress-DE1FdQ1J.cjs +2 -0
- package/dist/progress-DE1FdQ1J.cjs.map +1 -0
- package/dist/{radio-group-CAgfOr7-.mjs → radio-group-D5OurBIG.mjs} +1 -1
- package/dist/{radio-group-CAgfOr7-.mjs.map → radio-group-D5OurBIG.mjs.map} +1 -1
- package/dist/{radio-group-BWLdQw7M.cjs → radio-group-DAv2EU3F.cjs} +1 -1
- package/dist/{radio-group-BWLdQw7M.cjs.map → radio-group-DAv2EU3F.cjs.map} +1 -1
- package/dist/{resizable-DWh_mp5P.mjs → resizable-C2Zl-iLF.mjs} +1 -1
- package/dist/{resizable-DWh_mp5P.mjs.map → resizable-C2Zl-iLF.mjs.map} +1 -1
- package/dist/{resizable-D6UKwvFa.cjs → resizable-DDPMwd28.cjs} +1 -1
- package/dist/{resizable-D6UKwvFa.cjs.map → resizable-DDPMwd28.cjs.map} +1 -1
- package/dist/{select-Ze8Fq88G.mjs → select-DRCKwnTV.mjs} +1 -1
- package/dist/{select-Ze8Fq88G.mjs.map → select-DRCKwnTV.mjs.map} +1 -1
- package/dist/{select-Py_t2nX1.cjs → select-DfvSMRUq.cjs} +1 -1
- package/dist/{select-Py_t2nX1.cjs.map → select-DfvSMRUq.cjs.map} +1 -1
- package/dist/{sidebar-C27_pwLR.cjs → sidebar-CcJCnqLb.cjs} +2 -2
- package/dist/{sidebar-C27_pwLR.cjs.map → sidebar-CcJCnqLb.cjs.map} +1 -1
- package/dist/{sidebar-meLttL0V.mjs → sidebar-QmCQFs8h.mjs} +2 -2
- package/dist/{sidebar-meLttL0V.mjs.map → sidebar-QmCQFs8h.mjs.map} +1 -1
- package/dist/{spinner-EgMJOaQi.mjs → spinner-B3F9W53l.mjs} +1 -1
- package/dist/{spinner-EgMJOaQi.mjs.map → spinner-B3F9W53l.mjs.map} +1 -1
- package/dist/{spinner-MKXqwF9G.cjs → spinner-rA8pMY6v.cjs} +1 -1
- package/dist/{spinner-MKXqwF9G.cjs.map → spinner-rA8pMY6v.cjs.map} +1 -1
- package/dist/tables-Chn2pQSc.cjs +4 -0
- package/dist/tables-Chn2pQSc.cjs.map +1 -0
- package/dist/tables-eLIhswqW.mjs +4 -0
- package/dist/tables-eLIhswqW.mjs.map +1 -0
- package/dist/{tanstack-form-BmV2BXDz.cjs → tanstack-form-Bb9JXuEq.cjs} +2 -2
- package/dist/{tanstack-form-BmV2BXDz.cjs.map → tanstack-form-Bb9JXuEq.cjs.map} +1 -1
- package/dist/{tanstack-form-CJ43hVb_.mjs → tanstack-form-BwyHENeF.mjs} +2 -2
- package/dist/{tanstack-form-CJ43hVb_.mjs.map → tanstack-form-BwyHENeF.mjs.map} +1 -1
- package/dist/{textarea-CdGSEkZB.mjs → textarea-5RD9ToTV.mjs} +1 -1
- package/dist/{textarea-CdGSEkZB.mjs.map → textarea-5RD9ToTV.mjs.map} +1 -1
- package/dist/{textarea-BsgmN4jy.cjs → textarea-CvoBIPlJ.cjs} +1 -1
- package/dist/{textarea-BsgmN4jy.cjs.map → textarea-CvoBIPlJ.cjs.map} +1 -1
- package/dist/{types-B_32Ieia.d.mts → types-CkRjAQZ2.d.mts} +1 -1
- package/dist/typography/paragraph.d.cts +5 -5
- package/dist/typography/paragraph.d.mts +5 -5
- package/dist/typography/title.d.cts +2 -2
- package/dist/typography/title.d.mts +2 -2
- package/dist/ui/alert-dialog.d.cts +12 -12
- package/dist/ui/alert-dialog.d.mts +12 -12
- package/dist/ui/alert.cjs +1 -1
- package/dist/ui/alert.d.cts +1 -1
- package/dist/ui/alert.d.mts +1 -1
- package/dist/ui/alert.mjs +1 -1
- package/dist/ui/aspect-ratio.d.cts +2 -2
- package/dist/ui/aspect-ratio.d.mts +2 -2
- package/dist/ui/avatar.d.cts +4 -4
- package/dist/ui/avatar.d.mts +4 -4
- package/dist/ui/badge.d.cts +1 -1
- package/dist/ui/badge.d.mts +1 -1
- package/dist/ui/breadcrumb.d.cts +8 -8
- package/dist/ui/breadcrumb.d.mts +8 -8
- package/dist/ui/button-group.d.cts +7 -7
- package/dist/ui/button-group.d.mts +7 -7
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.mts +1 -1
- package/dist/ui/calendar.cjs +1 -1
- package/dist/ui/calendar.d.cts +4 -4
- package/dist/ui/calendar.d.mts +4 -4
- package/dist/ui/calendar.mjs +1 -1
- 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/checkbox.cjs +1 -1
- package/dist/ui/checkbox.d.cts +2 -2
- package/dist/ui/checkbox.d.mts +2 -2
- package/dist/ui/checkbox.mjs +1 -1
- package/dist/ui/collapsible.d.cts +4 -4
- package/dist/ui/collapsible.d.mts +4 -4
- package/dist/ui/command.d.cts +11 -11
- package/dist/ui/command.d.mts +11 -11
- package/dist/ui/context-menu.d.cts +16 -16
- package/dist/ui/context-menu.d.mts +16 -16
- package/dist/ui/dialog.d.cts +1 -1
- package/dist/ui/dialog.d.mts +1 -1
- package/dist/ui/drawer.d.cts +11 -11
- package/dist/ui/drawer.d.mts +11 -11
- package/dist/ui/dropdown-menu.d.cts +16 -16
- package/dist/ui/dropdown-menu.d.mts +16 -16
- package/dist/ui/empty.d.cts +9 -9
- package/dist/ui/empty.d.mts +9 -9
- package/dist/ui/field.cjs +1 -1
- package/dist/ui/field.d.cts +25 -25
- package/dist/ui/field.d.mts +25 -25
- package/dist/ui/field.mjs +1 -1
- package/dist/ui/file-uploader.cjs +2 -2
- package/dist/ui/file-uploader.cjs.map +1 -1
- package/dist/ui/file-uploader.d.cts +2 -2
- package/dist/ui/file-uploader.d.mts +2 -2
- package/dist/ui/file-uploader.mjs +1 -1
- package/dist/ui/file-uploader.mjs.map +1 -1
- package/dist/ui/form.cjs +1 -1
- package/dist/ui/form.d.cts +11 -11
- 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/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.d.cts +16 -16
- package/dist/ui/item.d.mts +16 -16
- package/dist/ui/label.cjs +1 -1
- package/dist/ui/label.d.cts +2 -2
- package/dist/ui/label.d.mts +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.d.mts +3 -3
- package/dist/ui/navigation-menu.d.cts +11 -11
- package/dist/ui/navigation-menu.d.mts +11 -11
- package/dist/ui/pagination.d.cts +9 -9
- package/dist/ui/pagination.d.mts +9 -9
- package/dist/ui/popover.cjs +1 -1
- package/dist/ui/popover.d.cts +6 -6
- package/dist/ui/popover.d.mts +6 -6
- package/dist/ui/popover.mjs +1 -1
- package/dist/ui/progress.cjs +1 -2
- package/dist/ui/progress.d.cts +2 -2
- package/dist/ui/progress.d.mts +2 -2
- package/dist/ui/progress.mjs +1 -2
- package/dist/ui/radio-group.cjs +1 -1
- package/dist/ui/radio-group.d.cts +3 -3
- package/dist/ui/radio-group.d.mts +3 -3
- package/dist/ui/radio-group.mjs +1 -1
- package/dist/ui/resizable.cjs +1 -1
- package/dist/ui/resizable.d.cts +9 -9
- package/dist/ui/resizable.d.mts +9 -9
- package/dist/ui/resizable.mjs +1 -1
- package/dist/ui/scroll-area.d.cts +6 -6
- package/dist/ui/scroll-area.d.mts +6 -6
- package/dist/ui/select.cjs +1 -1
- package/dist/ui/select.d.cts +9 -9
- package/dist/ui/select.d.mts +9 -9
- package/dist/ui/select.mjs +1 -1
- package/dist/ui/separator.d.cts +2 -2
- package/dist/ui/separator.d.mts +2 -2
- package/dist/ui/sheet.d.cts +9 -9
- package/dist/ui/sheet.d.mts +9 -9
- package/dist/ui/sidebar.cjs +1 -1
- package/dist/ui/sidebar.d.cts +29 -29
- package/dist/ui/sidebar.d.mts +29 -29
- 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.cts +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.cjs +1 -1
- package/dist/ui/spinner.d.cts +2 -2
- package/dist/ui/spinner.d.mts +2 -2
- package/dist/ui/spinner.mjs +1 -1
- package/dist/ui/switch.d.cts +2 -2
- package/dist/ui/switch.d.mts +2 -2
- package/dist/ui/table.d.cts +18 -18
- package/dist/ui/table.d.mts +18 -18
- package/dist/ui/tabs.d.cts +5 -5
- package/dist/ui/tabs.d.mts +5 -5
- package/dist/ui/textarea.cjs +1 -1
- package/dist/ui/textarea.d.cts +2 -2
- package/dist/ui/textarea.d.mts +2 -2
- package/dist/ui/textarea.mjs +1 -1
- package/dist/ui/toggle-group.d.cts +3 -3
- package/dist/ui/toggle-group.d.mts +3 -3
- package/dist/ui/toggle.d.cts +5 -5
- package/dist/ui/toggle.d.mts +5 -5
- package/dist/ui/tooltip.d.cts +5 -5
- package/dist/ui/tooltip.d.mts +5 -5
- package/package.json +1 -1
- package/dist/tables-Cc3Wik4i.cjs +0 -2
- package/dist/tables-Cc3Wik4i.cjs.map +0 -1
- package/dist/tables-DrJKQPsT.mjs +0 -2
- package/dist/tables-DrJKQPsT.mjs.map +0 -1
- package/dist/ui/progress.cjs.map +0 -1
- package/dist/ui/progress.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-layout-wN5c7MCM.mjs","names":["open","PaymentLayout: React.FC<\n React.PropsWithChildren<{\n /** ID of the currently active navigation item; matched against each item's `id` to apply the active style. */\n activeNavItemId?: string;\n /** Sidebar navigation definition; omitting this prop renders an empty sidebar. */\n sidebar?: {\n groupcontent: {\n /** Unique identifier for the group, used as React key. */\n id: string;\n /** Optional section heading rendered above the group's items. */\n label?: string;\n items: {\n /** Unique identifier for the nav item, used as React key and for active-state comparison. */\n id: string;\n /** Human-readable label rendered inside the sidebar button. */\n label: string;\n /** Optional icon element rendered to the left of the label. */\n icon?: React.ReactNode;\n /** Callback fired when the sidebar button is clicked. */\n onClick?: () => void;\n }[];\n }[];\n };\n /** Reserved for a future logout action (currently unused in the rendered output). */\n onLogout?: () => void;\n }>\n>"],"sources":["../packages/components/layouts/payment-layout/components/sidebar.tsx","../packages/components/layouts/payment-layout/components/header.tsx","../packages/components/layouts/payment-layout/index.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';\n\nimport { MenuIcon, PanelLeftIcon, ShoppingCartIcon } from 'lucide-react';\n\nimport { useIsMobile } from '@customafk/react-toolkit/hooks/useMobile';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Button } from '@/components/ui/button';\nimport { Input } from '@/components/ui/input';\nimport { Separator } from '@/components/ui/separator';\nimport { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from '@/components/ui/sheet';\nimport { Skeleton } from '@/components/ui/skeleton';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar_state';\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;\nconst SIDEBAR_WIDTH = '16rem';\nconst SIDEBAR_WIDTH_MOBILE = '18rem';\nconst SIDEBAR_WIDTH_ICON = '3rem';\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b';\n\ntype SidebarContextProps = {\n state: 'expanded' | 'collapsed';\n open: boolean;\n setOpen: (open: boolean) => void;\n openMobile: boolean;\n setOpenMobile: (open: boolean) => void;\n isMobile: boolean;\n toggleSidebar: () => void;\n};\n\nconst SidebarContext = createContext<SidebarContextProps | null>(null);\n\nfunction useSidebar() {\n const context = useContext(SidebarContext);\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.');\n }\n\n return context;\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n}) {\n const isMobile = useIsMobile();\n const [openMobile, setOpenMobile] = useState(false);\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = useState(defaultOpen);\n const open = openProp ?? _open;\n const setOpen = useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === 'function' ? value(open) : value;\n if (setOpenProp) {\n setOpenProp(openState);\n } else {\n _setOpen(openState);\n }\n\n // This sets the cookie to keep the sidebar state.\n // biome-ignore lint/suspicious/noDocumentCookie: true\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;\n },\n [setOpenProp, open]\n );\n\n // Helper to toggle the sidebar.\n const toggleSidebar = useCallback(() => {\n return isMobile ? setOpenMobile(open => !open) : setOpen(open => !open);\n }, [isMobile, setOpen]);\n\n // Adds a keyboard shortcut to toggle the sidebar.\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault();\n toggleSidebar();\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, [toggleSidebar]);\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed';\n\n const contextValue = useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, toggleSidebar]\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n data-slot=\"sidebar-wrapper\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn('group/sidebar-wrapper flex h-dvh w-full', className)}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n );\n}\n\nfunction Sidebar({\n side = 'left',\n variant = 'sidebar',\n collapsible = 'offcanvas',\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n side?: 'left' | 'right';\n variant?: 'sidebar' | 'floating' | 'inset';\n collapsible?: 'offcanvas' | 'icon' | 'none';\n}) {\n const { isMobile, state, openMobile, setOpenMobile, toggleSidebar } = useSidebar();\n\n if (collapsible === 'none') {\n return (\n <aside data-slot=\"sidebar\" className={cn('flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground', className)} {...props}>\n {children}\n </aside>\n );\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex size-full flex-col\">\n <div className=\"flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4\">\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n color=\"muted\"\n size=\"icon\"\n className={cn('size-10 rounded-full', className)}\n onClick={event => {\n toggleSidebar();\n event.preventDefault();\n event.stopPropagation();\n }}\n >\n <MenuIcon className=\"size-6!\" />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n <div className=\"ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground\">\n <ShoppingCartIcon size={20} />\n </div>\n <div className=\"grid flex-1 text-left text-sm leading-tight\">\n <span className=\"truncate font-medium\">Lunas Store</span>\n <span className=\"truncate text-xs\">Established 2023</span>\n </div>\n </div>\n <div className=\"flex flex-1 flex-col p-2\">{children}</div>\n </div>\n </SheetContent>\n </Sheet>\n );\n }\n\n return (\n <aside\n className=\"group peer hidden bg-card text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n 'relative',\n 'bg-transparent',\n 'transition-[width] duration-200 ease-linear',\n 'h-(--header-height) w-(--sidebar-width)',\n 'sm:h-[calc(var(--header-height)+0.5rem)]',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating' || variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)'\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n className={cn(\n 'hidden md:flex',\n 'fixed inset-y-0 top-14 z-10 shadow-nav',\n 'h-[calc(100dvh-3.5rem)] w-(--sidebar-width)',\n 'transition-[left,right,width] duration-200 ease-linear',\n side === 'left' && 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]',\n side === 'right' && 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n // Adjust the padding for floating and inset variants.\n variant === 'floating' || variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className={cn(\n 'flex size-full flex-col',\n 'group-data-[variant=floating]:rounded-lg',\n 'group-data-[variant=floating]:border',\n 'group-data-[variant=floating]:border-sidebar-border',\n 'group-data-[variant=floating]:shadow-sm'\n )}\n >\n {children}\n </div>\n </div>\n </aside>\n );\n}\n\nfunction SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar();\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn('size-7', className)}\n onClick={event => {\n onClick?.(event);\n toggleSidebar();\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n );\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<'button'>) {\n const { toggleSidebar } = useSidebar();\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n 'absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-0.5 hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex',\n 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'group-data-[collapsible=offcanvas]:translate-x-0 hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:after:left-full',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarInset({ className, children, ...props }: React.ComponentProps<'main'>) {\n return (\n <main data-slot=\"sidebar-inset\" className={cn('relative flex w-full flex-1 flex-col', className)} {...props}>\n <div className=\"h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]\" />\n <div className=\"inset-shadow-sm flex-1\">{children}</div>\n </main>\n );\n}\n\nfunction SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>) {\n return <Input data-slot=\"sidebar-input\" data-sidebar=\"input\" className={cn('h-8 w-full bg-background shadow-none', className)} {...props} />;\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sidebar-header\" data-sidebar=\"header\" className={cn('flex flex-col gap-2 p-2', className)} {...props} />;\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sidebar-footer\" data-sidebar=\"footer\" className={cn('flex flex-col gap-2 p-2', className)} {...props} />;\n}\n\nfunction SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>) {\n return <Separator data-slot=\"sidebar-separator\" data-sidebar=\"separator\" className={cn('mx-2 w-auto bg-sidebar-border', className)} {...props} />;\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn('flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sidebar-group\" data-sidebar=\"group\" className={cn('relative flex w-full min-w-0 flex-col', className)} {...props} />;\n}\n\nfunction SidebarGroupLabel({ className, asChild = false, ...props }: React.ComponentProps<'div'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'div';\n\n return (\n <Comp\n data-slot=\"sidebar-group-label\"\n data-sidebar=\"group-label\"\n className={cn(\n 'flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarGroupAction({ className, asChild = false, ...props }: React.ComponentProps<'button'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot=\"sidebar-group-action\"\n data-sidebar=\"group-action\"\n className={cn(\n 'absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n 'focus-visible:ring-2',\n '[&>svg]:size-4',\n '[&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 md:after:hidden',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarGroupContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sidebar-group-content\" data-sidebar=\"group-content\" className={cn('w-full text-sm', className)} {...props} />;\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-slot=\"sidebar-menu\" data-sidebar=\"menu\" className={cn('flex w-full min-w-0 flex-col gap-1', className)} {...props} />;\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"sidebar-menu-item\" data-sidebar=\"menu-item\" className={cn('group/menu-item relative', className)} {...props} />;\n}\n\nconst sidebarMenuButtonVariants = cva(\n [\n 'peer/menu-button',\n 'cursor-pointer',\n 'flex w-full items-center gap-2',\n 'overflow-hidden rounded-md p-2 outline-hidden',\n 'truncate text-left font-normal',\n 'transition-[color,width,height,padding]',\n 'hover:bg-sidebar-accent',\n 'hover:text-sidebar-accent-foreground',\n 'active:bg-sidebar-accent',\n 'active:text-sidebar-accent-foreground',\n 'disabled:pointer-events-none',\n 'disabled:opacity-50',\n 'group-has-data-[sidebar=menu-action]/menu-item:pr-8',\n 'aria-disabled:pointer-events-none',\n 'aria-disabled:opacity-50',\n 'data-[active=true]:bg-sidebar-primary-muted',\n 'data-[active=true]:text-sidebar-primary',\n 'data-[state=open]:hover:bg-sidebar-accent',\n 'data-[state=open]:hover:text-sidebar-accent-foreground',\n 'group-data-[collapsible=icon]:size-12!',\n 'group-data-[collapsible=icon]:p-3!',\n 'group-data-[collapsible=icon]:gap-3!',\n '[&>svg]:size-6',\n '[&>svg]:shrink-0',\n '[&>span:last-child]:truncate',\n ],\n {\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80',\n outline:\n '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))]',\n },\n size: {\n default: 'h-10 text-sm',\n sm: 'h-7 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n);\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = 'default',\n size = 'default',\n tooltip,\n className,\n ...props\n}: React.ComponentProps<'button'> & {\n asChild?: boolean;\n isActive?: boolean;\n tooltip?: string | React.ComponentProps<typeof TooltipContent>;\n} & VariantProps<typeof sidebarMenuButtonVariants>) {\n const Comp = asChild ? Slot : 'button';\n const { isMobile, state } = useSidebar();\n\n const button = (\n <Comp\n data-slot=\"sidebar-menu-button\"\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n );\n\n if (!tooltip) {\n return button;\n }\n\n if (typeof tooltip === 'string') {\n tooltip = {\n children: tooltip,\n };\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent side=\"right\" align=\"center\" hidden={state !== 'collapsed' || isMobile} {...tooltip} />\n </Tooltip>\n );\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<'button'> & {\n asChild?: boolean;\n showOnHover?: boolean;\n}) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot=\"sidebar-menu-action\"\n data-sidebar=\"menu-action\"\n className={cn(\n 'absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 md:after:hidden',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover &&\n 'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuBadge({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-menu-badge\"\n data-sidebar=\"menu-badge\"\n className={cn(\n 'pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 font-medium text-sidebar-foreground text-xs tabular-nums',\n 'peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<'div'> & {\n showIcon?: boolean;\n}) {\n // Random width between 50 to 90%.\n const width = useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`;\n }, []);\n\n return (\n <div data-slot=\"sidebar-menu-skeleton\" data-sidebar=\"menu-skeleton\" className={cn('flex h-8 items-center gap-2 rounded-md px-2', className)} {...props}>\n {showIcon && <Skeleton className=\"size-4 rounded-md\" data-sidebar=\"menu-skeleton-icon\" />}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n '--skeleton-width': width,\n } as React.CSSProperties\n }\n />\n </div>\n );\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n 'mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l px-2.5 py-0.5',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSubItem({ className, ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"sidebar-menu-sub-item\" data-sidebar=\"menu-sub-item\" className={cn('group/menu-sub-item relative', className)} {...props} />;\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = 'md',\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<'a'> & {\n asChild?: boolean;\n size?: 'sm' | 'md';\n isActive?: boolean;\n}) {\n const Comp = asChild ? Slot : 'a';\n\n return (\n <Comp\n data-slot=\"sidebar-menu-sub-button\"\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n data-active={isActive}\n className={cn(\n 'flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground',\n 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground',\n size === 'sm' && 'text-xs',\n size === 'md' && 'text-sm',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n // biome-ignore lint/style/useComponentExportOnlyModules: true\n useSidebar,\n};\n","import { MenuIcon, ShoppingCartIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Button } from '@/components/ui/button';\n\nimport { useSidebar } from './sidebar';\n\nexport const PaymentLayoutHeader = () => {\n const { toggleSidebar } = useSidebar();\n return (\n <header\n data-slot=\"payment-layout-header\"\n className={cn(\n 'bg-card',\n 'h-(--header-height)',\n 'sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6',\n 'absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5',\n 'flex items-center shadow-nav',\n 'transition-[width,height] ease-linear'\n )}\n >\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n color=\"muted\"\n size=\"icon\"\n className=\"size-10 rounded-full transition-all hover:text-text-positive\"\n onClick={event => {\n event.preventDefault();\n event.stopPropagation();\n toggleSidebar();\n }}\n >\n <MenuIcon className=\"size-6!\" />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n\n <div className=\"flex gap-x-2 sm:ml-2.5\">\n <div className=\"flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground\">\n <ShoppingCartIcon size={20} />\n </div>\n <div className=\"grid flex-1 text-left text-sm leading-tight\">\n <span className=\"truncate font-medium\">Lunas Enterprise</span>\n <span className=\"truncate text-xs\">Established 2025</span>\n </div>\n </div>\n </header>\n );\n};\n","import { useMemo } from 'react';\n\nimport { PaymentLayoutHeader } from './components/header';\nimport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarInset,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarProvider,\n} from './components/sidebar';\n\n/**\n * Full-page payment application shell with a collapsible inset sidebar and a fixed header.\n *\n * @example\n * ```tsx\n * import { PaymentLayout } from '@customafk/lunas-ui/layouts/payment-layout';\n * import { CreditCardIcon } from 'lucide-react';\n *\n * <PaymentLayout\n * activeNavItemId=\"transactions\"\n * sidebar={{\n * groupcontent: [\n * {\n * id: 'payment',\n * label: 'Payment',\n * items: [\n * { id: 'transactions', label: 'Transactions', icon: <CreditCardIcon />, onClick: () => router.push('/transactions') },\n * ],\n * },\n * ],\n * }}\n * >\n * <TransactionsPage />\n * </PaymentLayout>\n * ```\n */\nexport const PaymentLayout: React.FC<\n React.PropsWithChildren<{\n /** ID of the currently active navigation item; matched against each item's `id` to apply the active style. */\n activeNavItemId?: string;\n /** Sidebar navigation definition; omitting this prop renders an empty sidebar. */\n sidebar?: {\n groupcontent: {\n /** Unique identifier for the group, used as React key. */\n id: string;\n /** Optional section heading rendered above the group's items. */\n label?: string;\n items: {\n /** Unique identifier for the nav item, used as React key and for active-state comparison. */\n id: string;\n /** Human-readable label rendered inside the sidebar button. */\n label: string;\n /** Optional icon element rendered to the left of the label. */\n icon?: React.ReactNode;\n /** Callback fired when the sidebar button is clicked. */\n onClick?: () => void;\n }[];\n }[];\n };\n /** Reserved for a future logout action (currently unused in the rendered output). */\n onLogout?: () => void;\n }>\n> = ({ activeNavItemId, sidebar, children }) => {\n const groupcontent = useMemo(() => {\n return sidebar?.groupcontent || [];\n }, [sidebar]);\n return (\n <SidebarProvider>\n <PaymentLayoutHeader />\n\n <Sidebar variant=\"inset\" collapsible=\"icon\">\n <SidebarContent>\n {groupcontent.map(group => {\n return (\n <SidebarGroup key={group.id}>\n <SidebarGroupLabel>{group.label}</SidebarGroupLabel>\n <SidebarGroupContent>\n <SidebarMenu>\n {group.items.map(item => {\n return (\n <SidebarMenuItem key={item.id}>\n <SidebarMenuButton\n isActive={item.id === activeNavItemId}\n onClick={event => {\n item.onClick?.();\n event.preventDefault();\n event.stopPropagation();\n }}\n >\n {item.icon}\n {item.label}\n </SidebarMenuButton>\n </SidebarMenuItem>\n );\n })}\n </SidebarMenu>\n </SidebarGroupContent>\n </SidebarGroup>\n );\n })}\n </SidebarContent>\n <SidebarFooter>\n <SidebarMenu>\n {/*<SidebarMenuItem>\n <SidebarMenuButton\n className=\"border border-border\"\n onClick={event => {\n onLogout?.();\n event.preventDefault();\n event.stopPropagation();\n }}\n >\n <LogOutIcon className=\"text-text-positive-weak\" />\n Đăng xuất\n </SidebarMenuButton>\n </SidebarMenuItem>*/}\n <SidebarMenuItem className=\"mt-2 border-t border-t-border\">\n <p className=\"pt-2 text-center text-muted-foreground text-xs\">Copyright © 2025, Lunas.</p>\n </SidebarMenuItem>\n </SidebarMenu>\n </SidebarFooter>\n </Sidebar>\n\n <SidebarInset>\n <section className=\"relative size-full\">\n <div className=\"absolute inset-0\">{children}</div>\n </section>\n </SidebarInset>\n </SidebarProvider>\n );\n};\n"],"mappings":"6lBAmBA,MAiBM,EAAiB,EAA0C,KAAK,CAEtE,SAAS,GAAa,CACpB,IAAM,EAAU,EAAW,EAAe,CAC1C,GAAI,CAAC,EACH,MAAU,MAAM,oDAAoD,CAGtE,OAAO,EAGT,SAAS,EAAgB,CACvB,cAAc,GACd,KAAM,EACN,aAAc,EACd,YACA,QACA,WACA,GAAG,GAKF,CACD,IAAM,EAAW,GAAa,CACxB,CAAC,EAAY,GAAiB,EAAS,GAAM,CAI7C,CAAC,EAAO,GAAY,EAAS,EAAY,CACzC,EAAO,GAAY,EACnB,EAAU,EACb,GAAmD,CAClD,IAAM,EAAY,OAAO,GAAU,WAAa,EAAM,EAAK,CAAG,EAC1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AAA,CAAA,SACC,EAAC,UAAA,CAAQ,UAAU,8BACjB,EAAC,MAAA,CAAI,UAAU,mBAAoB,YAAe,EAC1C,CAAA,CACG,GACC"}
|
|
1
|
+
{"version":3,"file":"payment-layout-D-69gOPJ.mjs","names":["open","PaymentLayout: React.FC<\n React.PropsWithChildren<{\n /** ID of the currently active navigation item; matched against each item's `id` to apply the active style. */\n activeNavItemId?: string;\n /** Sidebar navigation definition; omitting this prop renders an empty sidebar. */\n sidebar?: {\n groupcontent: {\n /** Unique identifier for the group, used as React key. */\n id: string;\n /** Optional section heading rendered above the group's items. */\n label?: string;\n items: {\n /** Unique identifier for the nav item, used as React key and for active-state comparison. */\n id: string;\n /** Human-readable label rendered inside the sidebar button. */\n label: string;\n /** Optional icon element rendered to the left of the label. */\n icon?: React.ReactNode;\n /** Callback fired when the sidebar button is clicked. */\n onClick?: () => void;\n }[];\n }[];\n };\n /** Reserved for a future logout action (currently unused in the rendered output). */\n onLogout?: () => void;\n }>\n>"],"sources":["../packages/components/layouts/payment-layout/components/sidebar.tsx","../packages/components/layouts/payment-layout/components/header.tsx","../packages/components/layouts/payment-layout/index.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';\n\nimport { MenuIcon, PanelLeftIcon, ShoppingCartIcon } from 'lucide-react';\n\nimport { useIsMobile } from '@customafk/react-toolkit/hooks/useMobile';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Button } from '@/components/ui/button';\nimport { Input } from '@/components/ui/input';\nimport { Separator } from '@/components/ui/separator';\nimport { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from '@/components/ui/sheet';\nimport { Skeleton } from '@/components/ui/skeleton';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar_state';\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;\nconst SIDEBAR_WIDTH = '16rem';\nconst SIDEBAR_WIDTH_MOBILE = '18rem';\nconst SIDEBAR_WIDTH_ICON = '3rem';\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b';\n\ntype SidebarContextProps = {\n state: 'expanded' | 'collapsed';\n open: boolean;\n setOpen: (open: boolean) => void;\n openMobile: boolean;\n setOpenMobile: (open: boolean) => void;\n isMobile: boolean;\n toggleSidebar: () => void;\n};\n\nconst SidebarContext = createContext<SidebarContextProps | null>(null);\n\nfunction useSidebar() {\n const context = useContext(SidebarContext);\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.');\n }\n\n return context;\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n}) {\n const isMobile = useIsMobile();\n const [openMobile, setOpenMobile] = useState(false);\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = useState(defaultOpen);\n const open = openProp ?? _open;\n const setOpen = useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === 'function' ? value(open) : value;\n if (setOpenProp) {\n setOpenProp(openState);\n } else {\n _setOpen(openState);\n }\n\n // This sets the cookie to keep the sidebar state.\n // biome-ignore lint/suspicious/noDocumentCookie: true\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;\n },\n [setOpenProp, open]\n );\n\n // Helper to toggle the sidebar.\n const toggleSidebar = useCallback(() => {\n return isMobile ? setOpenMobile(open => !open) : setOpen(open => !open);\n }, [isMobile, setOpen]);\n\n // Adds a keyboard shortcut to toggle the sidebar.\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault();\n toggleSidebar();\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, [toggleSidebar]);\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed';\n\n const contextValue = useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, toggleSidebar]\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n data-slot=\"sidebar-wrapper\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn('group/sidebar-wrapper flex h-dvh w-full', className)}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n );\n}\n\nfunction Sidebar({\n side = 'left',\n variant = 'sidebar',\n collapsible = 'offcanvas',\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n side?: 'left' | 'right';\n variant?: 'sidebar' | 'floating' | 'inset';\n collapsible?: 'offcanvas' | 'icon' | 'none';\n}) {\n const { isMobile, state, openMobile, setOpenMobile, toggleSidebar } = useSidebar();\n\n if (collapsible === 'none') {\n return (\n <aside data-slot=\"sidebar\" className={cn('flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground', className)} {...props}>\n {children}\n </aside>\n );\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex size-full flex-col\">\n <div className=\"flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4\">\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n color=\"muted\"\n size=\"icon\"\n className={cn('size-10 rounded-full', className)}\n onClick={event => {\n toggleSidebar();\n event.preventDefault();\n event.stopPropagation();\n }}\n >\n <MenuIcon className=\"size-6!\" />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n <div className=\"ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground\">\n <ShoppingCartIcon size={20} />\n </div>\n <div className=\"grid flex-1 text-left text-sm leading-tight\">\n <span className=\"truncate font-medium\">Lunas Store</span>\n <span className=\"truncate text-xs\">Established 2023</span>\n </div>\n </div>\n <div className=\"flex flex-1 flex-col p-2\">{children}</div>\n </div>\n </SheetContent>\n </Sheet>\n );\n }\n\n return (\n <aside\n className=\"group peer hidden bg-card text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n 'relative',\n 'bg-transparent',\n 'transition-[width] duration-200 ease-linear',\n 'h-(--header-height) w-(--sidebar-width)',\n 'sm:h-[calc(var(--header-height)+0.5rem)]',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating' || variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)'\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n className={cn(\n 'hidden md:flex',\n 'fixed inset-y-0 top-14 z-10 shadow-nav',\n 'h-[calc(100dvh-3.5rem)] w-(--sidebar-width)',\n 'transition-[left,right,width] duration-200 ease-linear',\n side === 'left' && 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]',\n side === 'right' && 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n // Adjust the padding for floating and inset variants.\n variant === 'floating' || variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className={cn(\n 'flex size-full flex-col',\n 'group-data-[variant=floating]:rounded-lg',\n 'group-data-[variant=floating]:border',\n 'group-data-[variant=floating]:border-sidebar-border',\n 'group-data-[variant=floating]:shadow-sm'\n )}\n >\n {children}\n </div>\n </div>\n </aside>\n );\n}\n\nfunction SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar();\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn('size-7', className)}\n onClick={event => {\n onClick?.(event);\n toggleSidebar();\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n );\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<'button'>) {\n const { toggleSidebar } = useSidebar();\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n 'absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-0.5 hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex',\n 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'group-data-[collapsible=offcanvas]:translate-x-0 hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:after:left-full',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarInset({ className, children, ...props }: React.ComponentProps<'main'>) {\n return (\n <main data-slot=\"sidebar-inset\" className={cn('relative flex w-full flex-1 flex-col', className)} {...props}>\n <div className=\"h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]\" />\n <div className=\"inset-shadow-sm flex-1\">{children}</div>\n </main>\n );\n}\n\nfunction SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>) {\n return <Input data-slot=\"sidebar-input\" data-sidebar=\"input\" className={cn('h-8 w-full bg-background shadow-none', className)} {...props} />;\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sidebar-header\" data-sidebar=\"header\" className={cn('flex flex-col gap-2 p-2', className)} {...props} />;\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sidebar-footer\" data-sidebar=\"footer\" className={cn('flex flex-col gap-2 p-2', className)} {...props} />;\n}\n\nfunction SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>) {\n return <Separator data-slot=\"sidebar-separator\" data-sidebar=\"separator\" className={cn('mx-2 w-auto bg-sidebar-border', className)} {...props} />;\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn('flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sidebar-group\" data-sidebar=\"group\" className={cn('relative flex w-full min-w-0 flex-col', className)} {...props} />;\n}\n\nfunction SidebarGroupLabel({ className, asChild = false, ...props }: React.ComponentProps<'div'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'div';\n\n return (\n <Comp\n data-slot=\"sidebar-group-label\"\n data-sidebar=\"group-label\"\n className={cn(\n 'flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarGroupAction({ className, asChild = false, ...props }: React.ComponentProps<'button'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot=\"sidebar-group-action\"\n data-sidebar=\"group-action\"\n className={cn(\n 'absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n 'focus-visible:ring-2',\n '[&>svg]:size-4',\n '[&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 md:after:hidden',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarGroupContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sidebar-group-content\" data-sidebar=\"group-content\" className={cn('w-full text-sm', className)} {...props} />;\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-slot=\"sidebar-menu\" data-sidebar=\"menu\" className={cn('flex w-full min-w-0 flex-col gap-1', className)} {...props} />;\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"sidebar-menu-item\" data-sidebar=\"menu-item\" className={cn('group/menu-item relative', className)} {...props} />;\n}\n\nconst sidebarMenuButtonVariants = cva(\n [\n 'peer/menu-button',\n 'cursor-pointer',\n 'flex w-full items-center gap-2',\n 'overflow-hidden rounded-md p-2 outline-hidden',\n 'truncate text-left font-normal',\n 'transition-[color,width,height,padding]',\n 'hover:bg-sidebar-accent',\n 'hover:text-sidebar-accent-foreground',\n 'active:bg-sidebar-accent',\n 'active:text-sidebar-accent-foreground',\n 'disabled:pointer-events-none',\n 'disabled:opacity-50',\n 'group-has-data-[sidebar=menu-action]/menu-item:pr-8',\n 'aria-disabled:pointer-events-none',\n 'aria-disabled:opacity-50',\n 'data-[active=true]:bg-sidebar-primary-muted',\n 'data-[active=true]:text-sidebar-primary',\n 'data-[state=open]:hover:bg-sidebar-accent',\n 'data-[state=open]:hover:text-sidebar-accent-foreground',\n 'group-data-[collapsible=icon]:size-12!',\n 'group-data-[collapsible=icon]:p-3!',\n 'group-data-[collapsible=icon]:gap-3!',\n '[&>svg]:size-6',\n '[&>svg]:shrink-0',\n '[&>span:last-child]:truncate',\n ],\n {\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80',\n outline:\n '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))]',\n },\n size: {\n default: 'h-10 text-sm',\n sm: 'h-7 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n);\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = 'default',\n size = 'default',\n tooltip,\n className,\n ...props\n}: React.ComponentProps<'button'> & {\n asChild?: boolean;\n isActive?: boolean;\n tooltip?: string | React.ComponentProps<typeof TooltipContent>;\n} & VariantProps<typeof sidebarMenuButtonVariants>) {\n const Comp = asChild ? Slot : 'button';\n const { isMobile, state } = useSidebar();\n\n const button = (\n <Comp\n data-slot=\"sidebar-menu-button\"\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n );\n\n if (!tooltip) {\n return button;\n }\n\n if (typeof tooltip === 'string') {\n tooltip = {\n children: tooltip,\n };\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent side=\"right\" align=\"center\" hidden={state !== 'collapsed' || isMobile} {...tooltip} />\n </Tooltip>\n );\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<'button'> & {\n asChild?: boolean;\n showOnHover?: boolean;\n}) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot=\"sidebar-menu-action\"\n data-sidebar=\"menu-action\"\n className={cn(\n 'absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 md:after:hidden',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover &&\n 'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuBadge({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-menu-badge\"\n data-sidebar=\"menu-badge\"\n className={cn(\n 'pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 font-medium text-sidebar-foreground text-xs tabular-nums',\n 'peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<'div'> & {\n showIcon?: boolean;\n}) {\n // Random width between 50 to 90%.\n const width = useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`;\n }, []);\n\n return (\n <div data-slot=\"sidebar-menu-skeleton\" data-sidebar=\"menu-skeleton\" className={cn('flex h-8 items-center gap-2 rounded-md px-2', className)} {...props}>\n {showIcon && <Skeleton className=\"size-4 rounded-md\" data-sidebar=\"menu-skeleton-icon\" />}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n '--skeleton-width': width,\n } as React.CSSProperties\n }\n />\n </div>\n );\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n 'mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l px-2.5 py-0.5',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSubItem({ className, ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"sidebar-menu-sub-item\" data-sidebar=\"menu-sub-item\" className={cn('group/menu-sub-item relative', className)} {...props} />;\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = 'md',\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<'a'> & {\n asChild?: boolean;\n size?: 'sm' | 'md';\n isActive?: boolean;\n}) {\n const Comp = asChild ? Slot : 'a';\n\n return (\n <Comp\n data-slot=\"sidebar-menu-sub-button\"\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n data-active={isActive}\n className={cn(\n 'flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground',\n 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground',\n size === 'sm' && 'text-xs',\n size === 'md' && 'text-sm',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n // biome-ignore lint/style/useComponentExportOnlyModules: true\n useSidebar,\n};\n","import { MenuIcon, ShoppingCartIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Button } from '@/components/ui/button';\n\nimport { useSidebar } from './sidebar';\n\nexport const PaymentLayoutHeader = () => {\n const { toggleSidebar } = useSidebar();\n return (\n <header\n data-slot=\"payment-layout-header\"\n className={cn(\n 'bg-card',\n 'h-(--header-height)',\n 'sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6',\n 'absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5',\n 'flex items-center shadow-nav',\n 'transition-[width,height] ease-linear'\n )}\n >\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n color=\"muted\"\n size=\"icon\"\n className=\"size-10 rounded-full transition-all hover:text-text-positive\"\n onClick={event => {\n event.preventDefault();\n event.stopPropagation();\n toggleSidebar();\n }}\n >\n <MenuIcon className=\"size-6!\" />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n\n <div className=\"flex gap-x-2 sm:ml-2.5\">\n <div className=\"flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground\">\n <ShoppingCartIcon size={20} />\n </div>\n <div className=\"grid flex-1 text-left text-sm leading-tight\">\n <span className=\"truncate font-medium\">Lunas Enterprise</span>\n <span className=\"truncate text-xs\">Established 2025</span>\n </div>\n </div>\n </header>\n );\n};\n","import { useMemo } from 'react';\n\nimport { PaymentLayoutHeader } from './components/header';\nimport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarInset,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarProvider,\n} from './components/sidebar';\n\n/**\n * Full-page payment application shell with a collapsible inset sidebar and a fixed header.\n *\n * @example\n * ```tsx\n * import { PaymentLayout } from '@customafk/lunas-ui/layouts/payment-layout';\n * import { CreditCardIcon } from 'lucide-react';\n *\n * <PaymentLayout\n * activeNavItemId=\"transactions\"\n * sidebar={{\n * groupcontent: [\n * {\n * id: 'payment',\n * label: 'Payment',\n * items: [\n * { id: 'transactions', label: 'Transactions', icon: <CreditCardIcon />, onClick: () => router.push('/transactions') },\n * ],\n * },\n * ],\n * }}\n * >\n * <TransactionsPage />\n * </PaymentLayout>\n * ```\n */\nexport const PaymentLayout: React.FC<\n React.PropsWithChildren<{\n /** ID of the currently active navigation item; matched against each item's `id` to apply the active style. */\n activeNavItemId?: string;\n /** Sidebar navigation definition; omitting this prop renders an empty sidebar. */\n sidebar?: {\n groupcontent: {\n /** Unique identifier for the group, used as React key. */\n id: string;\n /** Optional section heading rendered above the group's items. */\n label?: string;\n items: {\n /** Unique identifier for the nav item, used as React key and for active-state comparison. */\n id: string;\n /** Human-readable label rendered inside the sidebar button. */\n label: string;\n /** Optional icon element rendered to the left of the label. */\n icon?: React.ReactNode;\n /** Callback fired when the sidebar button is clicked. */\n onClick?: () => void;\n }[];\n }[];\n };\n /** Reserved for a future logout action (currently unused in the rendered output). */\n onLogout?: () => void;\n }>\n> = ({ activeNavItemId, sidebar, children }) => {\n const groupcontent = useMemo(() => {\n return sidebar?.groupcontent || [];\n }, [sidebar]);\n return (\n <SidebarProvider>\n <PaymentLayoutHeader />\n\n <Sidebar variant=\"inset\" collapsible=\"icon\">\n <SidebarContent>\n {groupcontent.map(group => {\n return (\n <SidebarGroup key={group.id}>\n <SidebarGroupLabel>{group.label}</SidebarGroupLabel>\n <SidebarGroupContent>\n <SidebarMenu>\n {group.items.map(item => {\n return (\n <SidebarMenuItem key={item.id}>\n <SidebarMenuButton\n isActive={item.id === activeNavItemId}\n onClick={event => {\n item.onClick?.();\n event.preventDefault();\n event.stopPropagation();\n }}\n >\n {item.icon}\n {item.label}\n </SidebarMenuButton>\n </SidebarMenuItem>\n );\n })}\n </SidebarMenu>\n </SidebarGroupContent>\n </SidebarGroup>\n );\n })}\n </SidebarContent>\n <SidebarFooter>\n <SidebarMenu>\n {/*<SidebarMenuItem>\n <SidebarMenuButton\n className=\"border border-border\"\n onClick={event => {\n onLogout?.();\n event.preventDefault();\n event.stopPropagation();\n }}\n >\n <LogOutIcon className=\"text-text-positive-weak\" />\n Đăng xuất\n </SidebarMenuButton>\n </SidebarMenuItem>*/}\n <SidebarMenuItem className=\"mt-2 border-t border-t-border\">\n <p className=\"pt-2 text-center text-muted-foreground text-xs\">Copyright © 2025, Lunas.</p>\n </SidebarMenuItem>\n </SidebarMenu>\n </SidebarFooter>\n </Sidebar>\n\n <SidebarInset>\n <section className=\"relative size-full\">\n <div className=\"absolute inset-0\">{children}</div>\n </section>\n </SidebarInset>\n </SidebarProvider>\n );\n};\n"],"mappings":"6lBAmBA,MAiBM,EAAiB,EAA0C,KAAK,CAEtE,SAAS,GAAa,CACpB,IAAM,EAAU,EAAW,EAAe,CAC1C,GAAI,CAAC,EACH,MAAU,MAAM,oDAAoD,CAGtE,OAAO,EAGT,SAAS,EAAgB,CACvB,cAAc,GACd,KAAM,EACN,aAAc,EACd,YACA,QACA,WACA,GAAG,GAKF,CACD,IAAM,EAAW,GAAa,CACxB,CAAC,EAAY,GAAiB,EAAS,GAAM,CAI7C,CAAC,EAAO,GAAY,EAAS,EAAY,CACzC,EAAO,GAAY,EACnB,EAAU,EACb,GAAmD,CAClD,IAAM,EAAY,OAAO,GAAU,WAAa,EAAM,EAAK,CAAG,EAC1D,EACF,EAAY,EAAU,CAEtB,EAAS,EAAU,CAKrB,SAAS,OAAS,iBAA0B,EAAU,2BAExD,CAAC,EAAa,EAAK,CACpB,CAGK,EAAgB,MACb,EAAW,EAAc,GAAQ,CAACA,EAAK,CAAG,EAAQ,GAAQ,CAACA,EAAK,CACtE,CAAC,EAAU,EAAQ,CAAC,CAGvB,MAAgB,CACd,IAAM,EAAiB,GAAyB,CAC1C,EAAM,MAAQ,MAA8B,EAAM,SAAW,EAAM,WACrE,EAAM,gBAAgB,CACtB,GAAe,GAKnB,OADA,OAAO,iBAAiB,UAAW,EAAc,KACpC,OAAO,oBAAoB,UAAW,EAAc,EAChE,CAAC,EAAc,CAAC,CAInB,IAAM,EAAQ,EAAO,WAAa,YAE5B,EAAe,OACZ,CAC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AAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,EAAA,CAAsB,CAEvB,EAAC,EAAA,CAAQ,QAAQ,QAAQ,YAAY,iBACnC,EAAC,EAAA,CAAA,SACE,EAAa,IAAI,GAEd,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAA,SAAmB,EAAM,MAAA,CAA0B,CACpD,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAA,SACE,EAAM,MAAM,IAAI,GAEb,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CACC,SAAU,EAAK,KAAO,EACtB,QAAS,GAAS,CAChB,EAAK,WAAW,CAChB,EAAM,gBAAgB,CACtB,EAAM,iBAAiB,YAGxB,EAAK,KACL,EAAK,MAAA,EACY,CAAA,CAXA,EAAK,GAYT,CAEpB,CAAA,CACU,CAAA,CACM,CAAA,CAAA,CAtBL,EAAM,GAuBV,CAEjB,CAAA,CACa,CACjB,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAA,SAcC,EAAC,EAAA,CAAgB,UAAU,yCACzB,EAAC,IAAA,CAAE,UAAU,0DAAiD,4BAA4B,EAC1E,CAAA,CACN,CAAA,CACA,CAAA,EACR,CAEV,EAAC,EAAA,CAAA,SACC,EAAC,UAAA,CAAQ,UAAU,8BACjB,EAAC,MAAA,CAAI,UAAU,mBAAoB,YAAe,EAC1C,CAAA,CACG,GACC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{t as e}from"./close-BU0kWRVo.mjs";import{jsx as t}from"react/jsx-runtime";import{cn as n}from"@customafk/react-toolkit/utils";import{Popover as r}from"radix-ui";function i({...e}){return t(r.Root,{"data-slot":`popover`,...e})}function a({...e}){return t(r.Trigger,{"data-slot":`popover-trigger`,...e})}function o({className:e,align:i=`start`,sideOffset:a=4,...o}){return t(r.Portal,{children:t(r.Content,{"data-slot":`popover-content`,align:i,sideOffset:a,className:n(`relative bg-popover`,`text-text-positive`,`z-50`,`min-w-(--radix-popover-trigger-width)`,`max-h-(--radix-popover-content-available-height)`,`origin-(--radix-popover-content-transform-origin)`,`rounded-md p-4 shadow-dropdown outline-none`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,e),...o})})}function s({...e}){return t(r.Anchor,{"data-slot":`popover-anchor`,...e})}function c({className:n,...i}){return t(r.Close,{"data-slot":`popover-close`,...i,asChild:!0,children:t(e,{className:`absolute top-2 right-2`})})}export{a,o as i,s as n,c as r,i as t};
|
|
2
|
-
//# sourceMappingURL=popover-
|
|
2
|
+
//# sourceMappingURL=popover-BFJhuzW3.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-
|
|
1
|
+
{"version":3,"file":"popover-BFJhuzW3.mjs","names":["Popover","PopoverPrimitive"],"sources":["../packages/components/ui/popover.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Popover as PopoverPrimitive } from 'radix-ui';\nimport { CloseButton } from './buttons/close';\n\n/**\n * Floating panel built on Radix UI's Popover primitives, anchored to a trigger element with animated open/close transitions.\n *\n * @example\n * ```tsx\n * import {\n * Popover, PopoverTrigger, PopoverContent, PopoverClose,\n * } from '@customafk/lunas-ui/ui/popover';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <Popover>\n * <PopoverTrigger asChild>\n * <Button variant=\"outline\">Open popover</Button>\n * </PopoverTrigger>\n * <PopoverContent>\n * <PopoverClose />\n * <p>Popover body content goes here.</p>\n * </PopoverContent>\n * </Popover>\n * ```\n */\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\n/** Element that opens or closes the popover on click; use `asChild` to render a custom trigger element. */\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\n/** Floating content panel rendered in a portal, matching the trigger width and animated on open/close. */\nfunction PopoverContent({ className, align = 'start', sideOffset = 4, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'relative bg-popover',\n 'text-text-positive',\n 'z-50',\n 'min-w-(--radix-popover-trigger-width)',\n 'max-h-(--radix-popover-content-available-height)',\n 'origin-(--radix-popover-content-transform-origin)',\n 'rounded-md p-4 shadow-dropdown outline-none',\n\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\n/** Optional anchor element that overrides the trigger as the popover's positioning reference point. */\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\n/** Close button pre-positioned at the top-right corner of `PopoverContent` using the shared `CloseButton` primitive. */\nfunction PopoverClose({ className, ...props }: React.ComponentProps<typeof PopoverPrimitive.Close>) {\n return (\n <PopoverPrimitive.Close data-slot=\"popover-close\" {...props} asChild>\n <CloseButton className=\"absolute top-2 right-2\" />\n </PopoverPrimitive.Close>\n );\n}\n\nexport { Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PopoverClose };\n"],"mappings":"wKA4BA,SAASA,EAAQ,CAAE,GAAG,GAA6D,CACjF,OAAO,EAACC,EAAiB,KAAA,CAAK,YAAU,UAAU,GAAI,GAAS,CAIjE,SAAS,EAAe,CAAE,GAAG,GAAgE,CAC3F,OAAO,EAACA,EAAiB,QAAA,CAAQ,YAAU,kBAAkB,GAAI,GAAS,CAI5E,SAAS,EAAe,CAAE,YAAW,QAAQ,QAAS,aAAa,EAAG,GAAG,GAAgE,CACvI,OACE,EAACA,EAAiB,OAAA,CAAA,SAChB,EAACA,EAAiB,QAAA,CAChB,YAAU,kBACH,QACK,aACZ,UAAW,EACT,sBACA,qBACA,OACA,wCACA,mDACA,oDACA,8CAEA,+BACA,8BACA,+BAEA,kCACA,iCACA,kCAEA,yCACA,yCACA,yCACA,yCACA,EACD,CACD,GAAI,GACJ,CAAA,CACsB,CAK9B,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAACA,EAAiB,OAAA,CAAO,YAAU,iBAAiB,GAAI,GAAS,CAI1E,SAAS,EAAa,CAAE,YAAW,GAAG,GAA8D,CAClG,OACE,EAACA,EAAiB,MAAA,CAAM,YAAU,gBAAgB,GAAI,EAAO,QAAA,YAC3D,EAAC,EAAA,CAAY,UAAU,yBAAA,CAA2B,EAC3B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./close-DXk_H3Gt.cjs`);let n=require(`react/jsx-runtime`),r=require(`@customafk/react-toolkit/utils`),i=require(`radix-ui`);function a({...e}){return(0,n.jsx)(i.Popover.Root,{"data-slot":`popover`,...e})}function o({...e}){return(0,n.jsx)(i.Popover.Trigger,{"data-slot":`popover-trigger`,...e})}function s({className:e,align:t=`start`,sideOffset:a=4,...o}){return(0,n.jsx)(i.Popover.Portal,{children:(0,n.jsx)(i.Popover.Content,{"data-slot":`popover-content`,align:t,sideOffset:a,className:(0,r.cn)(`relative bg-popover`,`text-text-positive`,`z-50`,`min-w-(--radix-popover-trigger-width)`,`max-h-(--radix-popover-content-available-height)`,`origin-(--radix-popover-content-transform-origin)`,`rounded-md p-4 shadow-dropdown outline-none`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in-0`,`data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,e),...o})})}function c({...e}){return(0,n.jsx)(i.Popover.Anchor,{"data-slot":`popover-anchor`,...e})}function l({className:e,...r}){return(0,n.jsx)(i.Popover.Close,{"data-slot":`popover-close`,...r,asChild:!0,children:(0,n.jsx)(t.t,{className:`absolute top-2 right-2`})})}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
2
|
-
//# sourceMappingURL=popover-
|
|
2
|
+
//# sourceMappingURL=popover-CmoqhK17.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-
|
|
1
|
+
{"version":3,"file":"popover-CmoqhK17.cjs","names":["PopoverPrimitive","CloseButton"],"sources":["../packages/components/ui/popover.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Popover as PopoverPrimitive } from 'radix-ui';\nimport { CloseButton } from './buttons/close';\n\n/**\n * Floating panel built on Radix UI's Popover primitives, anchored to a trigger element with animated open/close transitions.\n *\n * @example\n * ```tsx\n * import {\n * Popover, PopoverTrigger, PopoverContent, PopoverClose,\n * } from '@customafk/lunas-ui/ui/popover';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <Popover>\n * <PopoverTrigger asChild>\n * <Button variant=\"outline\">Open popover</Button>\n * </PopoverTrigger>\n * <PopoverContent>\n * <PopoverClose />\n * <p>Popover body content goes here.</p>\n * </PopoverContent>\n * </Popover>\n * ```\n */\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\n/** Element that opens or closes the popover on click; use `asChild` to render a custom trigger element. */\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\n/** Floating content panel rendered in a portal, matching the trigger width and animated on open/close. */\nfunction PopoverContent({ className, align = 'start', sideOffset = 4, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'relative bg-popover',\n 'text-text-positive',\n 'z-50',\n 'min-w-(--radix-popover-trigger-width)',\n 'max-h-(--radix-popover-content-available-height)',\n 'origin-(--radix-popover-content-transform-origin)',\n 'rounded-md p-4 shadow-dropdown outline-none',\n\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\n/** Optional anchor element that overrides the trigger as the popover's positioning reference point. */\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\n/** Close button pre-positioned at the top-right corner of `PopoverContent` using the shared `CloseButton` primitive. */\nfunction PopoverClose({ className, ...props }: React.ComponentProps<typeof PopoverPrimitive.Close>) {\n return (\n <PopoverPrimitive.Close data-slot=\"popover-close\" {...props} asChild>\n <CloseButton className=\"absolute top-2 right-2\" />\n </PopoverPrimitive.Close>\n );\n}\n\nexport { Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PopoverClose };\n"],"mappings":"+KA4BA,SAAS,EAAQ,CAAE,GAAG,GAA6D,CACjF,OAAO,EAAA,EAAA,KAACA,EAAAA,QAAiB,KAAA,CAAK,YAAU,UAAU,GAAI,GAAS,CAIjE,SAAS,EAAe,CAAE,GAAG,GAAgE,CAC3F,OAAO,EAAA,EAAA,KAACA,EAAAA,QAAiB,QAAA,CAAQ,YAAU,kBAAkB,GAAI,GAAS,CAI5E,SAAS,EAAe,CAAE,YAAW,QAAQ,QAAS,aAAa,EAAG,GAAG,GAAgE,CACvI,OACE,EAAA,EAAA,KAACA,EAAAA,QAAiB,OAAA,CAAA,UAChB,EAAA,EAAA,KAACA,EAAAA,QAAiB,QAAA,CAChB,YAAU,kBACH,QACK,aACZ,WAAA,EAAA,EAAA,IACE,sBACA,qBACA,OACA,wCACA,mDACA,oDACA,8CAEA,+BACA,8BACA,+BAEA,kCACA,iCACA,kCAEA,yCACA,yCACA,yCACA,yCACA,EACD,CACD,GAAI,GACJ,CAAA,CACsB,CAK9B,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAAA,EAAA,KAACA,EAAAA,QAAiB,OAAA,CAAO,YAAU,iBAAiB,GAAI,GAAS,CAI1E,SAAS,EAAa,CAAE,YAAW,GAAG,GAA8D,CAClG,OACE,EAAA,EAAA,KAACA,EAAAA,QAAiB,MAAA,CAAM,YAAU,gBAAgB,GAAI,EAAO,QAAA,aAC3D,EAAA,EAAA,KAACC,EAAAA,EAAAA,CAAY,UAAU,yBAAA,CAA2B,EAC3B"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{cn as t}from"@customafk/react-toolkit/utils";import{Progress as n}from"radix-ui";function r({className:r,value:i,...a}){return e(n.Root,{"data-slot":`progress`,className:t(`bg-primary-weak relative h-2 w-full overflow-hidden rounded-full`,r),...a,children:e(n.Indicator,{"data-slot":`progress-indicator`,className:`bg-primary size-full flex-1 transition-all`,style:{transform:`translateX(-${100-(i||0)}%)`}})})}export{r as t};
|
|
2
|
+
//# sourceMappingURL=progress-0cpDwgAJ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-0cpDwgAJ.mjs","names":["Progress","ProgressPrimitive"],"sources":["../packages/components/ui/progress.tsx"],"sourcesContent":["'use client';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Progress as ProgressPrimitive } from 'radix-ui';\n\n/**\n * A horizontal progress bar that visually represents a completion percentage.\n *\n * @example\n * ```tsx\n * import { Progress } from '@customafk/lunas-ui/ui/progress';\n *\n * <Progress value={65} />\n * ```\n */\nfunction Progress({ className, value, ...props }: React.ComponentProps<typeof ProgressPrimitive.Root>) {\n return (\n <ProgressPrimitive.Root data-slot=\"progress\" className={cn('bg-primary-weak relative h-2 w-full overflow-hidden rounded-full', className)} {...props}>\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"bg-primary size-full flex-1 transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n );\n}\n\nexport { Progress };\n"],"mappings":"gIAeA,SAASA,EAAS,CAAE,YAAW,QAAO,GAAG,GAA8D,CACrG,OACE,EAACC,EAAkB,KAAA,CAAK,YAAU,WAAW,UAAW,EAAG,mEAAoE,EAAU,CAAE,GAAI,WAC7I,EAACA,EAAkB,UAAA,CACjB,YAAU,qBACV,UAAU,6CACV,MAAO,CAAE,UAAW,eAAe,KAAO,GAAS,GAAG,IAAK,EAC3D,EACqB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`react/jsx-runtime`),n=require(`@customafk/react-toolkit/utils`),r=require(`radix-ui`);function i({className:e,value:i,...a}){return(0,t.jsx)(r.Progress.Root,{"data-slot":`progress`,className:(0,n.cn)(`bg-primary-weak relative h-2 w-full overflow-hidden rounded-full`,e),...a,children:(0,t.jsx)(r.Progress.Indicator,{"data-slot":`progress-indicator`,className:`bg-primary size-full flex-1 transition-all`,style:{transform:`translateX(-${100-(i||0)}%)`}})})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
2
|
+
//# sourceMappingURL=progress-DE1FdQ1J.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-DE1FdQ1J.cjs","names":["ProgressPrimitive"],"sources":["../packages/components/ui/progress.tsx"],"sourcesContent":["'use client';\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Progress as ProgressPrimitive } from 'radix-ui';\n\n/**\n * A horizontal progress bar that visually represents a completion percentage.\n *\n * @example\n * ```tsx\n * import { Progress } from '@customafk/lunas-ui/ui/progress';\n *\n * <Progress value={65} />\n * ```\n */\nfunction Progress({ className, value, ...props }: React.ComponentProps<typeof ProgressPrimitive.Root>) {\n return (\n <ProgressPrimitive.Root data-slot=\"progress\" className={cn('bg-primary-weak relative h-2 w-full overflow-hidden rounded-full', className)} {...props}>\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"bg-primary size-full flex-1 transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n );\n}\n\nexport { Progress };\n"],"mappings":"6IAeA,SAAS,EAAS,CAAE,YAAW,QAAO,GAAG,GAA8D,CACrG,OACE,EAAA,EAAA,KAACA,EAAAA,SAAkB,KAAA,CAAK,YAAU,WAAW,WAAA,EAAA,EAAA,IAAc,mEAAoE,EAAU,CAAE,GAAI,YAC7I,EAAA,EAAA,KAACA,EAAAA,SAAkB,UAAA,CACjB,YAAU,qBACV,UAAU,6CACV,MAAO,CAAE,UAAW,eAAe,KAAO,GAAS,GAAG,IAAK,EAC3D,EACqB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{CircleIcon as e}from"lucide-react";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{cn as r}from"@customafk/react-toolkit/utils";import{RadioGroup as i}from"radix-ui";function a({className:e,...n}){return t(i.Root,{"data-slot":`radio-group`,className:r(`grid gap-3`,e),...n})}function o({className:a,...o}){return t(i.Item,{"data-slot":`radio-group-item`,className:r(`aspect-square size-4 shrink-0 rounded-full border border-border shadow-xs outline-none transition-all`,`disabled:cursor-not-allowed disabled:opacity-50`,`focus:border-border focus:ring-4 focus:ring-primary-weak`,`aria-invalid:border-danger-strong aria-invalid:ring-danger-weak`,`aria-readonly:pointer-events-none`,`aria-readonly:[&_div]:bg-muted`,`aria-readonly:[&_svg]:fill-muted-weak`,`aria-readonly:[&_svg]:text-muted-weak`,a),...o,children:n(i.Indicator,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center bg-primary`,children:[t(`div`,{className:`absolute size-4 rounded-full bg-primary`}),t(e,{className:`-translate-1/2 absolute top-1/2 left-1/2 size-2 fill-text-negative-strong text-text-negative`})]})})}export{o as n,a as t};
|
|
2
|
-
//# sourceMappingURL=radio-group-
|
|
2
|
+
//# sourceMappingURL=radio-group-D5OurBIG.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group-
|
|
1
|
+
{"version":3,"file":"radio-group-D5OurBIG.mjs","names":["RadioGroup","RadioGroupPrimitive"],"sources":["../packages/components/ui/radio-group.tsx"],"sourcesContent":["'use client';\n\nimport { CircleIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\n\n/**\n * Accessible radio button group built on Radix UI's RadioGroup primitive, where only one option can be selected at a time.\n *\n * @example\n * ```tsx\n * import { RadioGroup, RadioGroupItem } from '@customafk/lunas-ui/ui/radio-group';\n * import { Label } from '@customafk/lunas-ui/ui/label';\n *\n * <RadioGroup defaultValue=\"monthly\">\n * <div className=\"flex items-center gap-2\">\n * <RadioGroupItem value=\"monthly\" id=\"monthly\" />\n * <Label htmlFor=\"monthly\">Monthly</Label>\n * </div>\n * <div className=\"flex items-center gap-2\">\n * <RadioGroupItem value=\"annually\" id=\"annually\" />\n * <Label htmlFor=\"annually\">Annually</Label>\n * </div>\n * </RadioGroup>\n * ```\n */\nfunction RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return <RadioGroupPrimitive.Root data-slot=\"radio-group\" className={cn('grid gap-3', className)} {...props} />;\n}\n\n/** Individual radio button within a `RadioGroup`; shows a filled circle indicator when selected. */\nfunction RadioGroupItem({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n 'aspect-square size-4 shrink-0 rounded-full border border-border shadow-xs outline-none transition-all',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'focus:border-border focus:ring-4 focus:ring-primary-weak',\n 'aria-invalid:border-danger-strong aria-invalid:ring-danger-weak',\n 'aria-readonly:pointer-events-none',\n 'aria-readonly:[&_div]:bg-muted',\n 'aria-readonly:[&_svg]:fill-muted-weak',\n 'aria-readonly:[&_svg]:text-muted-weak',\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator data-slot=\"radio-group-indicator\" className=\"relative flex items-center justify-center bg-primary\">\n <div className=\"absolute size-4 rounded-full bg-primary\" />\n <CircleIcon className=\"-translate-1/2 absolute top-1/2 left-1/2 size-2 fill-text-negative-strong text-text-negative\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n}\n\nexport { RadioGroup, RadioGroupItem };\n"],"mappings":"sLA4BA,SAASA,EAAW,CAAE,YAAW,GAAG,GAAgE,CAClG,OAAO,EAACC,EAAoB,KAAA,CAAK,YAAU,cAAc,UAAW,EAAG,aAAc,EAAU,CAAE,GAAI,GAAS,CAIhH,SAAS,EAAe,CAAE,YAAW,GAAG,GAAgE,CACtG,OACE,EAACA,EAAoB,KAAA,CACnB,YAAU,mBACV,UAAW,EACT,wGACA,kDACA,2DACA,kEACA,oCACA,iCACA,wCACA,wCACA,EACD,CACD,GAAI,WAEJ,EAACA,EAAoB,UAAA,CAAU,YAAU,wBAAwB,UAAU,iEACzE,EAAC,MAAA,CAAI,UAAU,0CAAA,CAA4C,CAC3D,EAAC,EAAA,CAAW,UAAU,+FAAA,CAAiG,CAAA,EACzF,EACP"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`lucide-react`),n=require(`react/jsx-runtime`),r=require(`@customafk/react-toolkit/utils`),i=require(`radix-ui`);function a({className:e,...t}){return(0,n.jsx)(i.RadioGroup.Root,{"data-slot":`radio-group`,className:(0,r.cn)(`grid gap-3`,e),...t})}function o({className:e,...a}){return(0,n.jsx)(i.RadioGroup.Item,{"data-slot":`radio-group-item`,className:(0,r.cn)(`aspect-square size-4 shrink-0 rounded-full border border-border shadow-xs outline-none transition-all`,`disabled:cursor-not-allowed disabled:opacity-50`,`focus:border-border focus:ring-4 focus:ring-primary-weak`,`aria-invalid:border-danger-strong aria-invalid:ring-danger-weak`,`aria-readonly:pointer-events-none`,`aria-readonly:[&_div]:bg-muted`,`aria-readonly:[&_svg]:fill-muted-weak`,`aria-readonly:[&_svg]:text-muted-weak`,e),...a,children:(0,n.jsxs)(i.RadioGroup.Indicator,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center bg-primary`,children:[(0,n.jsx)(`div`,{className:`absolute size-4 rounded-full bg-primary`}),(0,n.jsx)(t.CircleIcon,{className:`-translate-1/2 absolute top-1/2 left-1/2 size-2 fill-text-negative-strong text-text-negative`})]})})}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
2
|
-
//# sourceMappingURL=radio-group-
|
|
2
|
+
//# sourceMappingURL=radio-group-DAv2EU3F.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group-
|
|
1
|
+
{"version":3,"file":"radio-group-DAv2EU3F.cjs","names":["RadioGroupPrimitive","CircleIcon"],"sources":["../packages/components/ui/radio-group.tsx"],"sourcesContent":["'use client';\n\nimport { CircleIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\n\n/**\n * Accessible radio button group built on Radix UI's RadioGroup primitive, where only one option can be selected at a time.\n *\n * @example\n * ```tsx\n * import { RadioGroup, RadioGroupItem } from '@customafk/lunas-ui/ui/radio-group';\n * import { Label } from '@customafk/lunas-ui/ui/label';\n *\n * <RadioGroup defaultValue=\"monthly\">\n * <div className=\"flex items-center gap-2\">\n * <RadioGroupItem value=\"monthly\" id=\"monthly\" />\n * <Label htmlFor=\"monthly\">Monthly</Label>\n * </div>\n * <div className=\"flex items-center gap-2\">\n * <RadioGroupItem value=\"annually\" id=\"annually\" />\n * <Label htmlFor=\"annually\">Annually</Label>\n * </div>\n * </RadioGroup>\n * ```\n */\nfunction RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return <RadioGroupPrimitive.Root data-slot=\"radio-group\" className={cn('grid gap-3', className)} {...props} />;\n}\n\n/** Individual radio button within a `RadioGroup`; shows a filled circle indicator when selected. */\nfunction RadioGroupItem({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n 'aspect-square size-4 shrink-0 rounded-full border border-border shadow-xs outline-none transition-all',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'focus:border-border focus:ring-4 focus:ring-primary-weak',\n 'aria-invalid:border-danger-strong aria-invalid:ring-danger-weak',\n 'aria-readonly:pointer-events-none',\n 'aria-readonly:[&_div]:bg-muted',\n 'aria-readonly:[&_svg]:fill-muted-weak',\n 'aria-readonly:[&_svg]:text-muted-weak',\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator data-slot=\"radio-group-indicator\" className=\"relative flex items-center justify-center bg-primary\">\n <div className=\"absolute size-4 rounded-full bg-primary\" />\n <CircleIcon className=\"-translate-1/2 absolute top-1/2 left-1/2 size-2 fill-text-negative-strong text-text-negative\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n}\n\nexport { RadioGroup, RadioGroupItem };\n"],"mappings":"uKA4BA,SAAS,EAAW,CAAE,YAAW,GAAG,GAAgE,CAClG,OAAO,EAAA,EAAA,KAACA,EAAAA,WAAoB,KAAA,CAAK,YAAU,cAAc,WAAA,EAAA,EAAA,IAAc,aAAc,EAAU,CAAE,GAAI,GAAS,CAIhH,SAAS,EAAe,CAAE,YAAW,GAAG,GAAgE,CACtG,OACE,EAAA,EAAA,KAACA,EAAAA,WAAoB,KAAA,CACnB,YAAU,mBACV,WAAA,EAAA,EAAA,IACE,wGACA,kDACA,2DACA,kEACA,oCACA,iCACA,wCACA,wCACA,EACD,CACD,GAAI,YAEJ,EAAA,EAAA,MAACA,EAAAA,WAAoB,UAAA,CAAU,YAAU,wBAAwB,UAAU,kEACzE,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,0CAAA,CAA4C,EAC3D,EAAA,EAAA,KAACC,EAAAA,WAAAA,CAAW,UAAU,+FAAA,CAAiG,CAAA,EACzF,EACP"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{GripVerticalIcon as e}from"lucide-react";import{memo as t}from"react";import{jsx as n}from"react/jsx-runtime";import{cn as r}from"@customafk/react-toolkit/utils";import*as i from"react-resizable-panels";const a=t(({className:e,...t})=>n(i.PanelGroup,{"data-slot":`resizable-panel-group`,className:r(`flex h-full w-full data-[panel-group-direction=vertical]:flex-col`,e),...t}));a.displayName=`ResizablePanelGroup`;const o=t(({...e})=>n(i.Panel,{"data-slot":`resizable-panel`,...e}));o.displayName=`ResizablePanel`;const s=t(({withHandle:t,className:a,...o})=>n(i.PanelResizeHandle,{"data-slot":`resizable-handle`,className:r(`relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 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]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90`,a),...o,children:t&&n(`div`,{className:`z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border`,children:n(e,{className:`size-2.5`})})}));s.displayName=`ResizableHandle`;export{o as n,a as r,s as t};
|
|
2
|
-
//# sourceMappingURL=resizable-
|
|
2
|
+
//# sourceMappingURL=resizable-C2Zl-iLF.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable-
|
|
1
|
+
{"version":3,"file":"resizable-C2Zl-iLF.mjs","names":[],"sources":["../packages/components/ui/resizable.tsx"],"sourcesContent":["'use client';\n\nimport { memo } from 'react';\n\nimport { GripVerticalIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\ntype TResizablePanelGroup = React.ComponentProps<typeof ResizablePrimitive.PanelGroup>;\n\ntype TResizablePanel = React.ComponentProps<typeof ResizablePrimitive.Panel>;\n\ntype TResizableHandle = React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n withHandle?: boolean;\n};\n\n/**\n * Root container that manages a group of resizable panels; supports horizontal and vertical orientations.\n *\n * @example\n * ```tsx\n * import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from '@customafk/lunas-ui/ui/resizable';\n *\n * <ResizablePanelGroup direction=\"horizontal\">\n * <ResizablePanel defaultSize={50}>Left</ResizablePanel>\n * <ResizableHandle withHandle />\n * <ResizablePanel defaultSize={50}>Right</ResizablePanel>\n * </ResizablePanelGroup>\n * ```\n */\nconst ResizablePanelGroup = memo<TResizablePanelGroup>(({ className, ...props }) => {\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});\nResizablePanelGroup.displayName = 'ResizablePanelGroup';\n\n/** An individual resizable panel within a ResizablePanelGroup. */\nconst ResizablePanel = memo<TResizablePanel>(({ ...props }) => {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n});\nResizablePanel.displayName = 'ResizablePanel';\n\n/**\n * The drag handle placed between two ResizablePanels to resize them.\n *\n * @param withHandle - When true, renders a visible grip icon centered on the handle.\n */\nconst ResizableHandle = memo<TResizableHandle>(({ withHandle, className, ...props }) => {\n return (\n <ResizablePrimitive.PanelResizeHandle\n data-slot=\"resizable-handle\"\n className={cn(\n 'relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 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]:after:-translate-y-1/2 [&[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});\nResizableHandle.displayName = 'ResizableHandle';\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup };\n"],"mappings":"kNAgCA,MAAM,EAAsB,GAA4B,CAAE,YAAW,GAAG,KAEpE,EAAC,EAAmB,WAAA,CAClB,YAAU,wBACV,UAAW,EAAG,oEAAqE,EAAU,CAC7F,GAAI,GACJ,CAEJ,CACF,EAAoB,YAAc,sBAGlC,MAAM,EAAiB,GAAuB,CAAE,GAAG,KAC1C,EAAC,EAAmB,MAAA,CAAM,YAAU,kBAAkB,GAAI,GAAS,CAC1E,CACF,EAAe,YAAc,iBAO7B,MAAM,EAAkB,GAAwB,CAAE,aAAY,YAAW,GAAG,KAExE,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,CAEzC,CACF,EAAgB,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`lucide-react`),n=require(`react`),r=require(`react/jsx-runtime`),i=require(`@customafk/react-toolkit/utils`),a=require(`react-resizable-panels`);a=e.t(a);const o=(0,n.memo)(({className:e,...t})=>(0,r.jsx)(a.PanelGroup,{"data-slot":`resizable-panel-group`,className:(0,i.cn)(`flex h-full w-full data-[panel-group-direction=vertical]:flex-col`,e),...t}));o.displayName=`ResizablePanelGroup`;const s=(0,n.memo)(({...e})=>(0,r.jsx)(a.Panel,{"data-slot":`resizable-panel`,...e}));s.displayName=`ResizablePanel`;const c=(0,n.memo)(({withHandle:e,className:n,...o})=>(0,r.jsx)(a.PanelResizeHandle,{"data-slot":`resizable-handle`,className:(0,i.cn)(`relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 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]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90`,n),...o,children:e&&(0,r.jsx)(`div`,{className:`z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border`,children:(0,r.jsx)(t.GripVerticalIcon,{className:`size-2.5`})})}));c.displayName=`ResizableHandle`,Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|
|
2
|
-
//# sourceMappingURL=resizable-
|
|
2
|
+
//# sourceMappingURL=resizable-DDPMwd28.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable-
|
|
1
|
+
{"version":3,"file":"resizable-DDPMwd28.cjs","names":["ResizablePrimitive","GripVerticalIcon"],"sources":["../packages/components/ui/resizable.tsx"],"sourcesContent":["'use client';\n\nimport { memo } from 'react';\n\nimport { GripVerticalIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\ntype TResizablePanelGroup = React.ComponentProps<typeof ResizablePrimitive.PanelGroup>;\n\ntype TResizablePanel = React.ComponentProps<typeof ResizablePrimitive.Panel>;\n\ntype TResizableHandle = React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n withHandle?: boolean;\n};\n\n/**\n * Root container that manages a group of resizable panels; supports horizontal and vertical orientations.\n *\n * @example\n * ```tsx\n * import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from '@customafk/lunas-ui/ui/resizable';\n *\n * <ResizablePanelGroup direction=\"horizontal\">\n * <ResizablePanel defaultSize={50}>Left</ResizablePanel>\n * <ResizableHandle withHandle />\n * <ResizablePanel defaultSize={50}>Right</ResizablePanel>\n * </ResizablePanelGroup>\n * ```\n */\nconst ResizablePanelGroup = memo<TResizablePanelGroup>(({ className, ...props }) => {\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});\nResizablePanelGroup.displayName = 'ResizablePanelGroup';\n\n/** An individual resizable panel within a ResizablePanelGroup. */\nconst ResizablePanel = memo<TResizablePanel>(({ ...props }) => {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n});\nResizablePanel.displayName = 'ResizablePanel';\n\n/**\n * The drag handle placed between two ResizablePanels to resize them.\n *\n * @param withHandle - When true, renders a visible grip icon centered on the handle.\n */\nconst ResizableHandle = memo<TResizableHandle>(({ withHandle, className, ...props }) => {\n return (\n <ResizablePrimitive.PanelResizeHandle\n data-slot=\"resizable-handle\"\n className={cn(\n 'relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 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]:after:-translate-y-1/2 [&[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});\nResizableHandle.displayName = 'ResizableHandle';\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup };\n"],"mappings":"iNAgCA,MAAM,GAAA,EAAA,EAAA,OAAkD,CAAE,YAAW,GAAG,MAEpE,EAAA,EAAA,KAACA,EAAmB,WAAA,CAClB,YAAU,wBACV,WAAA,EAAA,EAAA,IAAc,oEAAqE,EAAU,CAC7F,GAAI,GACJ,CAEJ,CACF,EAAoB,YAAc,sBAGlC,MAAM,GAAA,EAAA,EAAA,OAAwC,CAAE,GAAG,MAC1C,EAAA,EAAA,KAACA,EAAmB,MAAA,CAAM,YAAU,kBAAkB,GAAI,GAAS,CAC1E,CACF,EAAe,YAAc,iBAO7B,MAAM,GAAA,EAAA,EAAA,OAA0C,CAAE,aAAY,YAAW,GAAG,MAExE,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,CAEzC,CACF,EAAgB,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{CheckIcon as e,ChevronDownIcon as t}from"lucide-react";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{cn as i}from"@customafk/react-toolkit/utils";import{Select as a}from"radix-ui";function o({...e}){return n(a.Root,{"data-slot":`select`,...e})}function s({...e}){return n(a.Group,{"data-slot":`select-group`,...e})}function c({...e}){return n(a.Value,{"data-slot":`select-value`,...e})}function l({className:e,size:o=`default`,children:s,...c}){return r(a.Trigger,{"data-slot":`select-trigger`,"data-size":o,className:i(`flex w-full items-center justify-between`,`outline-1 outline-border -outline-offset-1`,`gap-2 rounded bg-transparent px-3 py-2`,`rounded shadow-input transition-all`,`cursor-pointer whitespace-nowrap text-sm`,`focus-visible:text-text-positive-strong`,`focus-visible:outline-primary-strong`,`focus-visible:ring-4`,`focus-visible:ring-primary-weak`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-4`,`data-[state=open]:ring-primary-weak`,`disabled:cursor-not-allowed`,`disabled:opacity-50`,`aria-invalid:bg-danger-bg-subtle`,`aria-invalid:outline-danger`,`aria-invalid:ring-danger-weak`,`aria-invalid:focus:outline-danger-strong`,`aria-invalid:focus:ring-4`,`aria-invalid:placeholder:text-text-positive-weak`,`aria-invalid:data-[state=open]:outline-danger-strong`,`aria-invalid:data-[state=open]:ring-danger-weak`,`data-placeholder:text-text-positive-muted`,`*:data-[slot=select-value]:line-clamp-1`,`*:data-[slot=select-value]:flex`,`*:data-[slot=select-value]:items-center`,`*:data-[slot=select-value]:gap-2`,`aria-readonly:bg-muted-muted`,`aria-readonly:cursor-default`,`aria-readonly:focus:outline-none`,`aria-readonly:ring-0`,`aria-readonly:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg]:pointer-events-none`,`[&_svg:not([class*='size-'])]:size-4`,`[&_svg:not([class*='text-'])]:text-muted-foreground`,e),...c,children:[s,n(a.Icon,{asChild:!0,children:n(t,{size:16,opacity:50})})]})}function u({className:e,children:t,position:r=`popper`,...o}){return n(a.Portal,{children:n(a.Content,{"data-slot":`select-content`,className:i(`relative z-50 max-h-80 min-w-32 overflow-y-auto overflow-x-hidden rounded shadow-dropdown duration-300`,`bg-white`,`w-(--radix-select-trigger-width)`,`origin-(--radix-select-content-transform-origin)`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out`,`data-[side=bottom]:slide-in-from-top-8`,`data-[side=left]:slide-in-from-right-8`,`data-[side=right]:slide-in-from-left-8`,`data-[side=top]:slide-in-from-bottom-8`,r===`popper`&&`data-[side=bottom]:translate-y-1`,r===`popper`&&`data-[side=left]:-translate-x-1`,r===`popper`&&`data-[side=right]:translate-x-1`,r===`popper`&&`data-[side=top]:-translate-y-1`,e),position:r,...o,children:n(a.Viewport,{className:i(`p-1`,r===`popper`&&`w-full scroll-my-1`,r===`popper`&&`h-(--radix-select-trigger-height)`,r===`popper`&&`min-w-(--radix-select-trigger-width)`),children:t})})})}function d({className:e,...t}){return n(a.Label,{"data-slot":`select-label`,className:i(`px-2 py-1.5 text-text-positive-weak text-xs`,e),...t})}function f({className:t,children:o,...s}){return r(a.Item,{"data-slot":`select-item`,className:i(`relative flex select-none items-center`,`gap-2 rounded py-2.5 pr-8 pl-2`,`w-full`,`cursor-pointer outline-none transition-colors`,`font-medium text-sm text-text-positive-weak`,`focus:shadow-xs`,`focus:bg-muted-muted`,`data-disabled:opacity-50`,`data-disabled:pointer-events-none`,`[&_svg]:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,`[&_svg:not([class*='text-'])]:text-text-positive-weak`,`*:[span]:last:flex`,`*:[span]:last:items-center`,`*:[span]:last:gap-2`,t),...s,children:[n(a.ItemText,{children:o}),n(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:n(a.ItemIndicator,{children:n(e,{size:16})})})]})}function p({className:e,...t}){return n(a.Separator,{"data-slot":`select-separator`,className:i(`-mx-1 pointer-events-none my-1 h-px bg-border-weak`,e),...t})}export{d as a,c,f as i,u as n,p as o,s as r,l as s,o as t};
|
|
2
|
-
//# sourceMappingURL=select-
|
|
2
|
+
//# sourceMappingURL=select-DRCKwnTV.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-Ze8Fq88G.mjs","names":["Select","SelectPrimitive"],"sources":["../packages/components/ui/select.tsx"],"sourcesContent":["'use client';\n\nimport { CheckIcon, ChevronDownIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Select as SelectPrimitive } from 'radix-ui';\n\n/**\n * Accessible dropdown select built on Radix UI's Select primitives, composed from `Select`, `SelectTrigger`, `SelectContent`, and `SelectItem`.\n *\n * @example\n * ```tsx\n * import {\n * Select, SelectTrigger, SelectValue,\n * SelectContent, SelectItem,\n * } from '@customafk/lunas-ui/ui/select';\n *\n * <Select>\n * <SelectTrigger>\n * <SelectValue placeholder=\"Pick a fruit\" />\n * </SelectTrigger>\n * <SelectContent>\n * <SelectItem value=\"apple\">Apple</SelectItem>\n * <SelectItem value=\"banana\">Banana</SelectItem>\n * </SelectContent>\n * </Select>\n * ```\n */\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\n/** Groups related `SelectItem` elements with an optional `SelectLabel` header. */\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\n/** Renders the currently selected value (or a placeholder) inside `SelectTrigger`. */\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\n/**\n * The button that opens the select dropdown; renders the current value and a chevron icon.\n *\n * @param size - `'default'` (standard padding) or `'sm'` (compact).\n */\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n /** Controls the trigger's padding — `'default'` or `'sm'`. */\n size?: 'sm' | 'default';\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n 'flex w-full items-center justify-between',\n 'outline-1 outline-border -outline-offset-1',\n 'gap-2 rounded bg-transparent px-3 py-2',\n 'rounded shadow-input transition-all',\n 'cursor-pointer whitespace-nowrap text-sm',\n\n // Text styles\n 'focus-visible:text-text-positive-strong',\n 'focus-visible:outline-primary-strong',\n 'focus-visible:ring-4',\n 'focus-visible:ring-primary-weak',\n\n // State styles\n 'data-[state=open]:text-text-positive-muted',\n 'data-[state=open]:outline-primary-strong',\n 'data-[state=open]:ring-4',\n 'data-[state=open]:ring-primary-weak',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n\n // Invalid state\n 'aria-invalid:bg-danger-bg-subtle',\n 'aria-invalid:outline-danger',\n 'aria-invalid:ring-danger-weak',\n 'aria-invalid:focus:outline-danger-strong',\n 'aria-invalid:focus:ring-4',\n 'aria-invalid:placeholder:text-text-positive-weak',\n 'aria-invalid:data-[state=open]:outline-danger-strong',\n 'aria-invalid:data-[state=open]:ring-danger-weak',\n\n // Placeholder styles\n 'data-placeholder:text-text-positive-muted',\n '*:data-[slot=select-value]:line-clamp-1',\n '*:data-[slot=select-value]:flex',\n '*:data-[slot=select-value]:items-center',\n '*:data-[slot=select-value]:gap-2',\n\n // Readonly state\n 'aria-readonly:bg-muted-muted',\n 'aria-readonly:cursor-default',\n 'aria-readonly:focus:outline-none',\n 'aria-readonly:ring-0',\n 'aria-readonly:pointer-events-none',\n\n // Icon styles\n '[&_svg]:shrink-0',\n '[&_svg]:pointer-events-none',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-muted-foreground\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon size={16} opacity={50} />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\n/** Floating dropdown panel that renders inside a portal with enter/exit animations. */\nfunction SelectContent({ className, children, position = 'popper', ...props }: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n 'relative z-50 max-h-80 min-w-32 overflow-y-auto overflow-x-hidden rounded shadow-dropdown duration-300',\n 'bg-white',\n 'w-(--radix-select-trigger-width)',\n 'origin-(--radix-select-content-transform-origin)',\n\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in',\n\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out',\n\n 'data-[side=bottom]:slide-in-from-top-8',\n 'data-[side=left]:slide-in-from-right-8',\n 'data-[side=right]:slide-in-from-left-8',\n 'data-[side=top]:slide-in-from-bottom-8',\n\n position === 'popper' && 'data-[side=bottom]:translate-y-1',\n position === 'popper' && 'data-[side=left]:-translate-x-1',\n position === 'popper' && 'data-[side=right]:translate-x-1',\n position === 'popper' && 'data-[side=top]:-translate-y-1',\n className\n )}\n position={position}\n {...props}\n >\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' && 'w-full scroll-my-1',\n position === 'popper' && 'h-(--radix-select-trigger-height)',\n position === 'popper' && 'min-w-(--radix-select-trigger-width)'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\n/** Non-interactive label displayed above a `SelectGroup` to describe its options. */\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return <SelectPrimitive.Label data-slot=\"select-label\" className={cn('px-2 py-1.5 text-text-positive-weak text-xs', className)} {...props} />;\n}\n\n/** A selectable option within `SelectContent`; shows a check icon when chosen. */\nfunction SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n 'relative flex select-none items-center',\n 'gap-2 rounded py-2.5 pr-8 pl-2',\n 'w-full',\n 'cursor-pointer outline-none transition-colors',\n 'font-medium text-sm text-text-positive-weak',\n\n 'focus:shadow-xs',\n 'focus:bg-muted-muted',\n\n 'data-disabled:opacity-50',\n 'data-disabled:pointer-events-none',\n\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-text-positive-weak\",\n\n '*:[span]:last:flex',\n '*:[span]:last:items-center',\n '*:[span]:last:gap-2',\n className\n )}\n {...props}\n >\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon size={16} />\n </SelectPrimitive.ItemIndicator>\n </span>\n </SelectPrimitive.Item>\n );\n}\n\n/** Thin horizontal rule used to visually separate groups of `SelectItem` elements. */\nfunction SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return <SelectPrimitive.Separator data-slot=\"select-separator\" className={cn('-mx-1 pointer-events-none my-1 h-px bg-border-weak', className)} {...props} />;\n}\n\nexport { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue };\n"],"mappings":"sMA6BA,SAASA,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAACC,EAAgB,KAAA,CAAK,YAAU,SAAS,GAAI,GAAS,CAI/D,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,GAAS,CAItE,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,GAAS,CAQtE,SAAS,EAAc,CACrB,YACA,OAAO,UACP,WACA,GAAG,GAIF,CACD,OACE,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,YAAW,EACX,UAAW,EACT,2CACA,6CACA,yCACA,sCACA,2CAGA,0CACA,uCACA,uBACA,kCAGA,6CACA,2CACA,2BACA,sCACA,8BACA,sBAGA,mCACA,8BACA,gCACA,2CACA,4BACA,mDACA,uDACA,kDAGA,4CACA,0CACA,kCACA,0CACA,mCAGA,+BACA,+BACA,mCACA,uBACA,oCAGA,mBACA,8BACA,uCACA,sDACA,EACD,CACD,GAAI,YAEH,EACD,EAACA,EAAgB,KAAA,CAAK,QAAA,YACpB,EAAC,EAAA,CAAgB,KAAM,GAAI,QAAS,IAAM,EACrB,CAAA,EACC,CAK9B,SAAS,EAAc,CAAE,YAAW,WAAU,WAAW,SAAU,GAAG,GAA+D,CACnI,OACE,EAACA,EAAgB,OAAA,CAAA,SACf,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,UAAW,EACT,yGACA,WACA,mCACA,mDAEA,+BACA,4BAEA,kCACA,+BAEA,yCACA,yCACA,yCACA,yCAEA,IAAa,UAAY,mCACzB,IAAa,UAAY,kCACzB,IAAa,UAAY,kCACzB,IAAa,UAAY,iCACzB,EACD,CACS,WACV,GAAI,WAEJ,EAACA,EAAgB,SAAA,CACf,UAAW,EACT,MACA,IAAa,UAAY,qBACzB,IAAa,UAAY,oCACzB,IAAa,UAAY,uCAC1B,CAEA,YACwB,EACH,CAAA,CACH,CAK7B,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,UAAW,EAAG,8CAA+C,EAAU,CAAE,GAAI,GAAS,CAI/I,SAAS,EAAW,CAAE,YAAW,WAAU,GAAG,GAA4D,CACxG,OACE,EAACA,EAAgB,KAAA,CACf,YAAU,cACV,UAAW,EACT,yCACA,iCACA,SACA,gDACA,8CAEA,kBACA,uBAEA,2BACA,oCAEA,8BACA,mBACA,uCACA,wDAEA,qBACA,6BACA,sBACA,EACD,CACD,GAAI,YAEJ,EAACA,EAAgB,SAAA,CAAU,WAAA,CAAoC,CAC/D,EAAC,OAAA,CAAK,UAAU,sEACd,EAACA,EAAgB,cAAA,CAAA,SACf,EAAC,EAAA,CAAU,KAAM,GAAA,CAAM,CAAA,CACO,EAC3B,CAAA,EACc,CAK3B,SAAS,EAAgB,CAAE,YAAW,GAAG,GAAiE,CACxG,OAAO,EAACA,EAAgB,UAAA,CAAU,YAAU,mBAAmB,UAAW,EAAG,qDAAsD,EAAU,CAAE,GAAI,GAAS"}
|
|
1
|
+
{"version":3,"file":"select-DRCKwnTV.mjs","names":["Select","SelectPrimitive"],"sources":["../packages/components/ui/select.tsx"],"sourcesContent":["'use client';\n\nimport { CheckIcon, ChevronDownIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Select as SelectPrimitive } from 'radix-ui';\n\n/**\n * Accessible dropdown select built on Radix UI's Select primitives, composed from `Select`, `SelectTrigger`, `SelectContent`, and `SelectItem`.\n *\n * @example\n * ```tsx\n * import {\n * Select, SelectTrigger, SelectValue,\n * SelectContent, SelectItem,\n * } from '@customafk/lunas-ui/ui/select';\n *\n * <Select>\n * <SelectTrigger>\n * <SelectValue placeholder=\"Pick a fruit\" />\n * </SelectTrigger>\n * <SelectContent>\n * <SelectItem value=\"apple\">Apple</SelectItem>\n * <SelectItem value=\"banana\">Banana</SelectItem>\n * </SelectContent>\n * </Select>\n * ```\n */\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\n/** Groups related `SelectItem` elements with an optional `SelectLabel` header. */\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\n/** Renders the currently selected value (or a placeholder) inside `SelectTrigger`. */\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\n/**\n * The button that opens the select dropdown; renders the current value and a chevron icon.\n *\n * @param size - `'default'` (standard padding) or `'sm'` (compact).\n */\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n /** Controls the trigger's padding — `'default'` or `'sm'`. */\n size?: 'sm' | 'default';\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n 'flex w-full items-center justify-between',\n 'outline-1 outline-border -outline-offset-1',\n 'gap-2 rounded bg-transparent px-3 py-2',\n 'rounded shadow-input transition-all',\n 'cursor-pointer whitespace-nowrap text-sm',\n\n // Text styles\n 'focus-visible:text-text-positive-strong',\n 'focus-visible:outline-primary-strong',\n 'focus-visible:ring-4',\n 'focus-visible:ring-primary-weak',\n\n // State styles\n 'data-[state=open]:text-text-positive-muted',\n 'data-[state=open]:outline-primary-strong',\n 'data-[state=open]:ring-4',\n 'data-[state=open]:ring-primary-weak',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n\n // Invalid state\n 'aria-invalid:bg-danger-bg-subtle',\n 'aria-invalid:outline-danger',\n 'aria-invalid:ring-danger-weak',\n 'aria-invalid:focus:outline-danger-strong',\n 'aria-invalid:focus:ring-4',\n 'aria-invalid:placeholder:text-text-positive-weak',\n 'aria-invalid:data-[state=open]:outline-danger-strong',\n 'aria-invalid:data-[state=open]:ring-danger-weak',\n\n // Placeholder styles\n 'data-placeholder:text-text-positive-muted',\n '*:data-[slot=select-value]:line-clamp-1',\n '*:data-[slot=select-value]:flex',\n '*:data-[slot=select-value]:items-center',\n '*:data-[slot=select-value]:gap-2',\n\n // Readonly state\n 'aria-readonly:bg-muted-muted',\n 'aria-readonly:cursor-default',\n 'aria-readonly:focus:outline-none',\n 'aria-readonly:ring-0',\n 'aria-readonly:pointer-events-none',\n\n // Icon styles\n '[&_svg]:shrink-0',\n '[&_svg]:pointer-events-none',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-muted-foreground\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon size={16} opacity={50} />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\n/** Floating dropdown panel that renders inside a portal with enter/exit animations. */\nfunction SelectContent({ className, children, position = 'popper', ...props }: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n 'relative z-50 max-h-80 min-w-32 overflow-y-auto overflow-x-hidden rounded shadow-dropdown duration-300',\n 'bg-white',\n 'w-(--radix-select-trigger-width)',\n 'origin-(--radix-select-content-transform-origin)',\n\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in',\n\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out',\n\n 'data-[side=bottom]:slide-in-from-top-8',\n 'data-[side=left]:slide-in-from-right-8',\n 'data-[side=right]:slide-in-from-left-8',\n 'data-[side=top]:slide-in-from-bottom-8',\n\n position === 'popper' && 'data-[side=bottom]:translate-y-1',\n position === 'popper' && 'data-[side=left]:-translate-x-1',\n position === 'popper' && 'data-[side=right]:translate-x-1',\n position === 'popper' && 'data-[side=top]:-translate-y-1',\n className\n )}\n position={position}\n {...props}\n >\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' && 'w-full scroll-my-1',\n position === 'popper' && 'h-(--radix-select-trigger-height)',\n position === 'popper' && 'min-w-(--radix-select-trigger-width)'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\n/** Non-interactive label displayed above a `SelectGroup` to describe its options. */\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return <SelectPrimitive.Label data-slot=\"select-label\" className={cn('px-2 py-1.5 text-text-positive-weak text-xs', className)} {...props} />;\n}\n\n/** A selectable option within `SelectContent`; shows a check icon when chosen. */\nfunction SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n 'relative flex select-none items-center',\n 'gap-2 rounded py-2.5 pr-8 pl-2',\n 'w-full',\n 'cursor-pointer outline-none transition-colors',\n 'font-medium text-sm text-text-positive-weak',\n\n 'focus:shadow-xs',\n 'focus:bg-muted-muted',\n\n 'data-disabled:opacity-50',\n 'data-disabled:pointer-events-none',\n\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-text-positive-weak\",\n\n '*:[span]:last:flex',\n '*:[span]:last:items-center',\n '*:[span]:last:gap-2',\n className\n )}\n {...props}\n >\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon size={16} />\n </SelectPrimitive.ItemIndicator>\n </span>\n </SelectPrimitive.Item>\n );\n}\n\n/** Thin horizontal rule used to visually separate groups of `SelectItem` elements. */\nfunction SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return <SelectPrimitive.Separator data-slot=\"select-separator\" className={cn('-mx-1 pointer-events-none my-1 h-px bg-border-weak', className)} {...props} />;\n}\n\nexport { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue };\n"],"mappings":"sMA6BA,SAASA,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAACC,EAAgB,KAAA,CAAK,YAAU,SAAS,GAAI,GAAS,CAI/D,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,GAAS,CAItE,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,GAAS,CAQtE,SAAS,EAAc,CACrB,YACA,OAAO,UACP,WACA,GAAG,GAIF,CACD,OACE,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,YAAW,EACX,UAAW,EACT,2CACA,6CACA,yCACA,sCACA,2CAGA,0CACA,uCACA,uBACA,kCAGA,6CACA,2CACA,2BACA,sCACA,8BACA,sBAGA,mCACA,8BACA,gCACA,2CACA,4BACA,mDACA,uDACA,kDAGA,4CACA,0CACA,kCACA,0CACA,mCAGA,+BACA,+BACA,mCACA,uBACA,oCAGA,mBACA,8BACA,uCACA,sDACA,EACD,CACD,GAAI,YAEH,EACD,EAACA,EAAgB,KAAA,CAAK,QAAA,YACpB,EAAC,EAAA,CAAgB,KAAM,GAAI,QAAS,IAAM,EACrB,CAAA,E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require(`react/jsx-runtime`),r=require(`@customafk/react-toolkit/utils`),i=require(`radix-ui`);function a({...e}){return(0,n.jsx)(i.Select.Root,{"data-slot":`select`,...e})}function o({...e}){return(0,n.jsx)(i.Select.Group,{"data-slot":`select-group`,...e})}function s({...e}){return(0,n.jsx)(i.Select.Value,{"data-slot":`select-value`,...e})}function c({className:e,size:a=`default`,children:o,...s}){return(0,n.jsxs)(i.Select.Trigger,{"data-slot":`select-trigger`,"data-size":a,className:(0,r.cn)(`flex w-full items-center justify-between`,`outline-1 outline-border -outline-offset-1`,`gap-2 rounded bg-transparent px-3 py-2`,`rounded shadow-input transition-all`,`cursor-pointer whitespace-nowrap text-sm`,`focus-visible:text-text-positive-strong`,`focus-visible:outline-primary-strong`,`focus-visible:ring-4`,`focus-visible:ring-primary-weak`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-4`,`data-[state=open]:ring-primary-weak`,`disabled:cursor-not-allowed`,`disabled:opacity-50`,`aria-invalid:bg-danger-bg-subtle`,`aria-invalid:outline-danger`,`aria-invalid:ring-danger-weak`,`aria-invalid:focus:outline-danger-strong`,`aria-invalid:focus:ring-4`,`aria-invalid:placeholder:text-text-positive-weak`,`aria-invalid:data-[state=open]:outline-danger-strong`,`aria-invalid:data-[state=open]:ring-danger-weak`,`data-placeholder:text-text-positive-muted`,`*:data-[slot=select-value]:line-clamp-1`,`*:data-[slot=select-value]:flex`,`*:data-[slot=select-value]:items-center`,`*:data-[slot=select-value]:gap-2`,`aria-readonly:bg-muted-muted`,`aria-readonly:cursor-default`,`aria-readonly:focus:outline-none`,`aria-readonly:ring-0`,`aria-readonly:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg]:pointer-events-none`,`[&_svg:not([class*='size-'])]:size-4`,`[&_svg:not([class*='text-'])]:text-muted-foreground`,e),...s,children:[o,(0,n.jsx)(i.Select.Icon,{asChild:!0,children:(0,n.jsx)(t.ChevronDownIcon,{size:16,opacity:50})})]})}function l({className:e,children:t,position:a=`popper`,...o}){return(0,n.jsx)(i.Select.Portal,{children:(0,n.jsx)(i.Select.Content,{"data-slot":`select-content`,className:(0,r.cn)(`relative z-50 max-h-80 min-w-32 overflow-y-auto overflow-x-hidden rounded shadow-dropdown duration-300`,`bg-white`,`w-(--radix-select-trigger-width)`,`origin-(--radix-select-content-transform-origin)`,`data-[state=open]:animate-in`,`data-[state=open]:fade-in`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out`,`data-[side=bottom]:slide-in-from-top-8`,`data-[side=left]:slide-in-from-right-8`,`data-[side=right]:slide-in-from-left-8`,`data-[side=top]:slide-in-from-bottom-8`,a===`popper`&&`data-[side=bottom]:translate-y-1`,a===`popper`&&`data-[side=left]:-translate-x-1`,a===`popper`&&`data-[side=right]:translate-x-1`,a===`popper`&&`data-[side=top]:-translate-y-1`,e),position:a,...o,children:(0,n.jsx)(i.Select.Viewport,{className:(0,r.cn)(`p-1`,a===`popper`&&`w-full scroll-my-1`,a===`popper`&&`h-(--radix-select-trigger-height)`,a===`popper`&&`min-w-(--radix-select-trigger-width)`),children:t})})})}function u({className:e,...t}){return(0,n.jsx)(i.Select.Label,{"data-slot":`select-label`,className:(0,r.cn)(`px-2 py-1.5 text-text-positive-weak text-xs`,e),...t})}function d({className:e,children:a,...o}){return(0,n.jsxs)(i.Select.Item,{"data-slot":`select-item`,className:(0,r.cn)(`relative flex select-none items-center`,`gap-2 rounded py-2.5 pr-8 pl-2`,`w-full`,`cursor-pointer outline-none transition-colors`,`font-medium text-sm text-text-positive-weak`,`focus:shadow-xs`,`focus:bg-muted-muted`,`data-disabled:opacity-50`,`data-disabled:pointer-events-none`,`[&_svg]:pointer-events-none`,`[&_svg]:shrink-0`,`[&_svg:not([class*='size-'])]:size-4`,`[&_svg:not([class*='text-'])]:text-text-positive-weak`,`*:[span]:last:flex`,`*:[span]:last:items-center`,`*:[span]:last:gap-2`,e),...o,children:[(0,n.jsx)(i.Select.ItemText,{children:a}),(0,n.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,n.jsx)(i.Select.ItemIndicator,{children:(0,n.jsx)(t.CheckIcon,{size:16})})})]})}function f({className:e,...t}){return(0,n.jsx)(i.Select.Separator,{"data-slot":`select-separator`,className:(0,r.cn)(`-mx-1 pointer-events-none my-1 h-px bg-border-weak`,e),...t})}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
2
|
-
//# sourceMappingURL=select-
|
|
2
|
+
//# sourceMappingURL=select-DfvSMRUq.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-Py_t2nX1.cjs","names":["SelectPrimitive","ChevronDownIcon","CheckIcon"],"sources":["../packages/components/ui/select.tsx"],"sourcesContent":["'use client';\n\nimport { CheckIcon, ChevronDownIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Select as SelectPrimitive } from 'radix-ui';\n\n/**\n * Accessible dropdown select built on Radix UI's Select primitives, composed from `Select`, `SelectTrigger`, `SelectContent`, and `SelectItem`.\n *\n * @example\n * ```tsx\n * import {\n * Select, SelectTrigger, SelectValue,\n * SelectContent, SelectItem,\n * } from '@customafk/lunas-ui/ui/select';\n *\n * <Select>\n * <SelectTrigger>\n * <SelectValue placeholder=\"Pick a fruit\" />\n * </SelectTrigger>\n * <SelectContent>\n * <SelectItem value=\"apple\">Apple</SelectItem>\n * <SelectItem value=\"banana\">Banana</SelectItem>\n * </SelectContent>\n * </Select>\n * ```\n */\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\n/** Groups related `SelectItem` elements with an optional `SelectLabel` header. */\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\n/** Renders the currently selected value (or a placeholder) inside `SelectTrigger`. */\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\n/**\n * The button that opens the select dropdown; renders the current value and a chevron icon.\n *\n * @param size - `'default'` (standard padding) or `'sm'` (compact).\n */\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n /** Controls the trigger's padding — `'default'` or `'sm'`. */\n size?: 'sm' | 'default';\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n 'flex w-full items-center justify-between',\n 'outline-1 outline-border -outline-offset-1',\n 'gap-2 rounded bg-transparent px-3 py-2',\n 'rounded shadow-input transition-all',\n 'cursor-pointer whitespace-nowrap text-sm',\n\n // Text styles\n 'focus-visible:text-text-positive-strong',\n 'focus-visible:outline-primary-strong',\n 'focus-visible:ring-4',\n 'focus-visible:ring-primary-weak',\n\n // State styles\n 'data-[state=open]:text-text-positive-muted',\n 'data-[state=open]:outline-primary-strong',\n 'data-[state=open]:ring-4',\n 'data-[state=open]:ring-primary-weak',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n\n // Invalid state\n 'aria-invalid:bg-danger-bg-subtle',\n 'aria-invalid:outline-danger',\n 'aria-invalid:ring-danger-weak',\n 'aria-invalid:focus:outline-danger-strong',\n 'aria-invalid:focus:ring-4',\n 'aria-invalid:placeholder:text-text-positive-weak',\n 'aria-invalid:data-[state=open]:outline-danger-strong',\n 'aria-invalid:data-[state=open]:ring-danger-weak',\n\n // Placeholder styles\n 'data-placeholder:text-text-positive-muted',\n '*:data-[slot=select-value]:line-clamp-1',\n '*:data-[slot=select-value]:flex',\n '*:data-[slot=select-value]:items-center',\n '*:data-[slot=select-value]:gap-2',\n\n // Readonly state\n 'aria-readonly:bg-muted-muted',\n 'aria-readonly:cursor-default',\n 'aria-readonly:focus:outline-none',\n 'aria-readonly:ring-0',\n 'aria-readonly:pointer-events-none',\n\n // Icon styles\n '[&_svg]:shrink-0',\n '[&_svg]:pointer-events-none',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-muted-foreground\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon size={16} opacity={50} />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\n/** Floating dropdown panel that renders inside a portal with enter/exit animations. */\nfunction SelectContent({ className, children, position = 'popper', ...props }: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n 'relative z-50 max-h-80 min-w-32 overflow-y-auto overflow-x-hidden rounded shadow-dropdown duration-300',\n 'bg-white',\n 'w-(--radix-select-trigger-width)',\n 'origin-(--radix-select-content-transform-origin)',\n\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in',\n\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out',\n\n 'data-[side=bottom]:slide-in-from-top-8',\n 'data-[side=left]:slide-in-from-right-8',\n 'data-[side=right]:slide-in-from-left-8',\n 'data-[side=top]:slide-in-from-bottom-8',\n\n position === 'popper' && 'data-[side=bottom]:translate-y-1',\n position === 'popper' && 'data-[side=left]:-translate-x-1',\n position === 'popper' && 'data-[side=right]:translate-x-1',\n position === 'popper' && 'data-[side=top]:-translate-y-1',\n className\n )}\n position={position}\n {...props}\n >\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' && 'w-full scroll-my-1',\n position === 'popper' && 'h-(--radix-select-trigger-height)',\n position === 'popper' && 'min-w-(--radix-select-trigger-width)'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\n/** Non-interactive label displayed above a `SelectGroup` to describe its options. */\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return <SelectPrimitive.Label data-slot=\"select-label\" className={cn('px-2 py-1.5 text-text-positive-weak text-xs', className)} {...props} />;\n}\n\n/** A selectable option within `SelectContent`; shows a check icon when chosen. */\nfunction SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n 'relative flex select-none items-center',\n 'gap-2 rounded py-2.5 pr-8 pl-2',\n 'w-full',\n 'cursor-pointer outline-none transition-colors',\n 'font-medium text-sm text-text-positive-weak',\n\n 'focus:shadow-xs',\n 'focus:bg-muted-muted',\n\n 'data-disabled:opacity-50',\n 'data-disabled:pointer-events-none',\n\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-text-positive-weak\",\n\n '*:[span]:last:flex',\n '*:[span]:last:items-center',\n '*:[span]:last:gap-2',\n className\n )}\n {...props}\n >\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon size={16} />\n </SelectPrimitive.ItemIndicator>\n </span>\n </SelectPrimitive.Item>\n );\n}\n\n/** Thin horizontal rule used to visually separate groups of `SelectItem` elements. */\nfunction SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return <SelectPrimitive.Separator data-slot=\"select-separator\" className={cn('-mx-1 pointer-events-none my-1 h-px bg-border-weak', className)} {...props} />;\n}\n\nexport { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue };\n"],"mappings":"uKA6BA,SAAS,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,KAAA,CAAK,YAAU,SAAS,GAAI,GAAS,CAI/D,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,GAAS,CAItE,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,GAAS,CAQtE,SAAS,EAAc,CACrB,YACA,OAAO,UACP,WACA,GAAG,GAIF,CACD,OACE,EAAA,EAAA,MAACA,EAAAA,OAAgB,QAAA,CACf,YAAU,iBACV,YAAW,EACX,WAAA,EAAA,EAAA,IACE,2CACA,6CACA,yCACA,sCACA,2CAGA,0CACA,uCACA,uBACA,kCAGA,6CACA,2CACA,2BACA,sCACA,8BACA,sBAGA,mCACA,8BACA,gCACA,2CACA,4BACA,mDACA,uDACA,kDAGA,4CACA,0CACA,kCACA,0CACA,mCAGA,+BACA,+BACA,mCACA,uBACA,oCAGA,mBACA,8BACA,uCACA,sDACA,EACD,CACD,GAAI,YAEH,GACD,EAAA,EAAA,KAACA,EAAAA,OAAgB,KAAA,CAAK,QAAA,aACpB,EAAA,EAAA,KAACC,EAAAA,gBAAAA,CAAgB,KAAM,GAAI,QAAS,IAAM,EACrB,CAAA,EACC,CAK9B,SAAS,EAAc,CAAE,YAAW,WAAU,WAAW,SAAU,GAAG,GAA+D,CACnI,OACE,EAAA,EAAA,KAACD,EAAAA,OAAgB,OAAA,CAAA,UACf,EAAA,EAAA,KAACA,EAAAA,OAAgB,QAAA,CACf,YAAU,iBACV,WAAA,EAAA,EAAA,IACE,yGACA,WACA,mCACA,mD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con","CheckIcon"],"sources":["../packages/components/ui/select.tsx"],"sourcesContent":["'use client';\n\nimport { CheckIcon, ChevronDownIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Select as SelectPrimitive } from 'radix-ui';\n\n/**\n * Accessible dropdown select built on Radix UI's Select primitives, composed from `Select`, `SelectTrigger`, `SelectContent`, and `SelectItem`.\n *\n * @example\n * ```tsx\n * import {\n * Select, SelectTrigger, SelectValue,\n * SelectContent, SelectItem,\n * } from '@customafk/lunas-ui/ui/select';\n *\n * <Select>\n * <SelectTrigger>\n * <SelectValue placeholder=\"Pick a fruit\" />\n * </SelectTrigger>\n * <SelectContent>\n * <SelectItem value=\"apple\">Apple</SelectItem>\n * <SelectItem value=\"banana\">Banana</SelectItem>\n * </SelectContent>\n * </Select>\n * ```\n */\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\n/** Groups related `SelectItem` elements with an optional `SelectLabel` header. */\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\n/** Renders the currently selected value (or a placeholder) inside `SelectTrigger`. */\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\n/**\n * The button that opens the select dropdown; renders the current value and a chevron icon.\n *\n * @param size - `'default'` (standard padding) or `'sm'` (compact).\n */\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n /** Controls the trigger's padding — `'default'` or `'sm'`. */\n size?: 'sm' | 'default';\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n 'flex w-full items-center justify-between',\n 'outline-1 outline-border -outline-offset-1',\n 'gap-2 rounded bg-transparent px-3 py-2',\n 'rounded shadow-input transition-all',\n 'cursor-pointer whitespace-nowrap text-sm',\n\n // Text styles\n 'focus-visible:text-text-positive-strong',\n 'focus-visible:outline-primary-strong',\n 'focus-visible:ring-4',\n 'focus-visible:ring-primary-weak',\n\n // State styles\n 'data-[state=open]:text-text-positive-muted',\n 'data-[state=open]:outline-primary-strong',\n 'data-[state=open]:ring-4',\n 'data-[state=open]:ring-primary-weak',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n\n // Invalid state\n 'aria-invalid:bg-danger-bg-subtle',\n 'aria-invalid:outline-danger',\n 'aria-invalid:ring-danger-weak',\n 'aria-invalid:focus:outline-danger-strong',\n 'aria-invalid:focus:ring-4',\n 'aria-invalid:placeholder:text-text-positive-weak',\n 'aria-invalid:data-[state=open]:outline-danger-strong',\n 'aria-invalid:data-[state=open]:ring-danger-weak',\n\n // Placeholder styles\n 'data-placeholder:text-text-positive-muted',\n '*:data-[slot=select-value]:line-clamp-1',\n '*:data-[slot=select-value]:flex',\n '*:data-[slot=select-value]:items-center',\n '*:data-[slot=select-value]:gap-2',\n\n // Readonly state\n 'aria-readonly:bg-muted-muted',\n 'aria-readonly:cursor-default',\n 'aria-readonly:focus:outline-none',\n 'aria-readonly:ring-0',\n 'aria-readonly:pointer-events-none',\n\n // Icon styles\n '[&_svg]:shrink-0',\n '[&_svg]:pointer-events-none',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-muted-foreground\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon size={16} opacity={50} />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\n/** Floating dropdown panel that renders inside a portal with enter/exit animations. */\nfunction SelectContent({ className, children, position = 'popper', ...props }: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n 'relative z-50 max-h-80 min-w-32 overflow-y-auto overflow-x-hidden rounded shadow-dropdown duration-300',\n 'bg-white',\n 'w-(--radix-select-trigger-width)',\n 'origin-(--radix-select-content-transform-origin)',\n\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in',\n\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out',\n\n 'data-[side=bottom]:slide-in-from-top-8',\n 'data-[side=left]:slide-in-from-right-8',\n 'data-[side=right]:slide-in-from-left-8',\n 'data-[side=top]:slide-in-from-bottom-8',\n\n position === 'popper' && 'data-[side=bottom]:translate-y-1',\n position === 'popper' && 'data-[side=left]:-translate-x-1',\n position === 'popper' && 'data-[side=right]:translate-x-1',\n position === 'popper' && 'data-[side=top]:-translate-y-1',\n className\n )}\n position={position}\n {...props}\n >\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' && 'w-full scroll-my-1',\n position === 'popper' && 'h-(--radix-select-trigger-height)',\n position === 'popper' && 'min-w-(--radix-select-trigger-width)'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\n/** Non-interactive label displayed above a `SelectGroup` to describe its options. */\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return <SelectPrimitive.Label data-slot=\"select-label\" className={cn('px-2 py-1.5 text-text-positive-weak text-xs', className)} {...props} />;\n}\n\n/** A selectable option within `SelectContent`; shows a check icon when chosen. */\nfunction SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n 'relative flex select-none items-center',\n 'gap-2 rounded py-2.5 pr-8 pl-2',\n 'w-full',\n 'cursor-pointer outline-none transition-colors',\n 'font-medium text-sm text-text-positive-weak',\n\n 'focus:shadow-xs',\n 'focus:bg-muted-muted',\n\n 'data-disabled:opacity-50',\n 'data-disabled:pointer-events-none',\n\n '[&_svg]:pointer-events-none',\n '[&_svg]:shrink-0',\n \"[&_svg:not([class*='size-'])]:size-4\",\n \"[&_svg:not([class*='text-'])]:text-text-positive-weak\",\n\n '*:[span]:last:flex',\n '*:[span]:last:items-center',\n '*:[span]:last:gap-2',\n className\n )}\n {...props}\n >\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon size={16} />\n </SelectPrimitive.ItemIndicator>\n </span>\n </SelectPrimitive.Item>\n );\n}\n\n/** Thin horizontal rule used to visually separate groups of `SelectItem` elements. */\nfunction SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return <SelectPrimitive.Separator data-slot=\"select-separator\" className={cn('-mx-1 pointer-events-none my-1 h-px bg-border-weak', className)} {...props} />;\n}\n\nexport { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue };\n"],"mappings":"uKA6BA,SAAS,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,KAAA,CAAK,YAAU,SAAS,GAAI,GAAS,CAI/D,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,GAAS,CAItE,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAAA,EAAA,KAACA,EAAAA,OAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,GAAS,CAQtE,SAAS,EAAc,CACrB,YACA,OAAO,UACP,WACA,GAAG,GAIF,CACD,OACE,EAAA,EAAA,MAACA,EAAAA,OAAgB,QAAA,CACf,YAAU,iBACV,YAAW,EACX,WAAA,EAAA,EAAA,IACE,2CACA,6CACA,yCACA,sCACA,2CAGA,0CACA,uCACA,uBACA,kCAGA,6CACA,2CACA,2BACA,sCACA,8BACA,sBAGA,mCACA,8B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