@customafk/lunas-ui 0.1.85 → 0.1.86
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/{button-BACBDBid.d.cts → button-D2qx5QHI.d.cts} +5 -5
- package/dist/{button-j-XyI_BU.d.mts → button-eheC-7Id.d.mts} +7 -7
- package/dist/cards/simple-card.d.mts +2 -2
- package/dist/data-display/date-tooltip.cjs +1 -1
- package/dist/data-display/date-tooltip.mjs +1 -1
- package/dist/data-display/empty.d.mts +2 -2
- package/dist/data-display/name.cjs +1 -1
- package/dist/data-display/name.mjs +1 -1
- package/dist/data-display/phone-number.cjs +1 -1
- package/dist/data-display/phone-number.mjs +1 -1
- package/dist/data-display/statistic.d.cts +4 -4
- package/dist/{dialog-B8BAhR8k.d.cts → dialog-5imw84-8.d.cts} +12 -12
- package/dist/{dialog-DXBsPqiq.d.mts → dialog-T7CVHrm2.d.mts} +12 -12
- package/dist/dialogs/detail-dialog/components/sidebar.cjs +1 -1
- package/dist/dialogs/detail-dialog/components/sidebar.d.cts +26 -26
- package/dist/dialogs/detail-dialog/components/sidebar.d.mts +26 -26
- 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.mjs +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 +4 -4
- 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.cjs.map +1 -1
- package/dist/features/tables/index.d.cts +17 -8
- package/dist/features/tables/index.d.mts +11 -2
- package/dist/features/tables/index.mjs +1 -1
- package/dist/features/tables/index.mjs.map +1 -1
- package/dist/features/tanstack-form/index.d.cts +90 -90
- package/dist/features/tanstack-form/index.d.mts +90 -90
- package/dist/{input-B4W9MM2a.d.cts → input-BYz8teIQ.d.mts} +5 -5
- package/dist/{input-CmnQ1O79.d.mts → input-CbpWzuai.d.cts} +6 -6
- package/dist/layouts/cms-layout/index.cjs +1 -1
- package/dist/layouts/cms-layout/index.mjs +1 -1
- package/dist/layouts/flex.d.cts +8 -8
- package/dist/layouts/flex.d.mts +8 -8
- 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/{tooltip-wJtgRj1d.cjs → tooltip-DMFoP_sB.cjs} +2 -2
- package/dist/{tooltip-wJtgRj1d.cjs.map → tooltip-DMFoP_sB.cjs.map} +1 -1
- package/dist/{tooltip-KihXLXJa.mjs → tooltip-Dd1torAV.mjs} +2 -2
- package/dist/{tooltip-KihXLXJa.mjs.map → tooltip-Dd1torAV.mjs.map} +1 -1
- package/dist/typography/paragraph.d.cts +2 -2
- package/dist/typography/paragraph.d.mts +2 -2
- 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.d.cts +7 -7
- package/dist/ui/alert.d.mts +7 -7
- 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 +4 -4
- package/dist/ui/badge.d.mts +2 -2
- 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 +5 -5
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.mts +1 -1
- package/dist/ui/calendar.d.cts +4 -4
- package/dist/ui/calendar.d.mts +4 -4
- package/dist/ui/card.cjs +1 -1
- package/dist/ui/card.cjs.map +1 -1
- package/dist/ui/card.d.cts +8 -8
- package/dist/ui/card.d.mts +8 -8
- package/dist/ui/card.mjs +1 -1
- package/dist/ui/card.mjs.map +1 -1
- package/dist/ui/carousel.d.cts +7 -7
- package/dist/ui/carousel.d.mts +7 -7
- package/dist/ui/checkbox.d.cts +2 -2
- package/dist/ui/checkbox.d.mts +2 -2
- 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.d.cts +25 -25
- package/dist/ui/field.d.mts +25 -25
- package/dist/ui/file-uploader.d.cts +2 -2
- package/dist/ui/file-uploader.d.mts +2 -2
- package/dist/ui/form.d.cts +11 -11
- package/dist/ui/form.d.mts +11 -11
- 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.d.cts +1 -1
- package/dist/ui/input.d.mts +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/item.d.cts +16 -16
- package/dist/ui/item.d.mts +16 -16
- package/dist/ui/label.d.cts +2 -2
- package/dist/ui/label.d.mts +2 -2
- package/dist/ui/menubar.d.cts +17 -17
- package/dist/ui/menubar.d.mts +17 -17
- package/dist/ui/multi-select.d.cts +2 -2
- 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.d.cts +5 -5
- package/dist/ui/popover.d.mts +5 -5
- package/dist/ui/progress.d.cts +2 -2
- package/dist/ui/progress.d.mts +2 -2
- package/dist/ui/radio-group.d.cts +3 -3
- package/dist/ui/radio-group.d.mts +3 -3
- package/dist/ui/resizable.d.cts +4 -4
- package/dist/ui/resizable.d.mts +4 -4
- package/dist/ui/scroll-area.d.cts +6 -6
- package/dist/ui/scroll-area.d.mts +6 -6
- package/dist/ui/select.d.cts +11 -11
- package/dist/ui/select.d.mts +11 -11
- 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 +26 -26
- package/dist/ui/sidebar.d.mts +28 -28
- 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.d.cts +2 -2
- package/dist/ui/spinner.d.mts +2 -2
- package/dist/ui/switch.d.cts +2 -2
- package/dist/ui/switch.d.mts +2 -2
- package/dist/ui/table.d.cts +18 -18
- package/dist/ui/table.d.mts +9 -9
- package/dist/ui/tabs.d.cts +5 -5
- package/dist/ui/tabs.d.mts +5 -5
- package/dist/ui/textarea.d.cts +2 -2
- package/dist/ui/textarea.d.mts +2 -2
- package/dist/ui/toggle-group.d.cts +3 -3
- package/dist/ui/toggle-group.d.mts +3 -3
- package/dist/ui/toggle.d.cts +4 -4
- package/dist/ui/toggle.d.mts +4 -4
- package/dist/ui/tooltip.cjs +1 -1
- package/dist/ui/tooltip.d.cts +5 -5
- package/dist/ui/tooltip.d.mts +5 -5
- package/dist/ui/tooltip.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as class_variance_authority_types10 from "class-variance-authority/types";
|
|
1
|
+
import * as react_jsx_runtime117 from "react/jsx-runtime";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as class_variance_authority_types10 from "class-variance-authority/types";
|
|
4
4
|
|
|
5
5
|
//#region packages/components/ui/input.variants.d.ts
|
|
6
6
|
declare const inputVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "outline" | "none" | "ghost" | "soft" | "subtle" | null | undefined;
|
|
8
8
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types10.ClassProp) | undefined) => string;
|
|
10
10
|
type InputVariantProps = VariantProps<typeof inputVariants>;
|
|
@@ -21,7 +21,7 @@ declare function Input({
|
|
|
21
21
|
variant?: InputVariantProps['variant'];
|
|
22
22
|
size?: InputVariantProps['size'];
|
|
23
23
|
onValueChange?: (value: string) => void;
|
|
24
|
-
}):
|
|
24
|
+
}): react_jsx_runtime117.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { Input as t };
|
|
27
|
-
//# sourceMappingURL=input-
|
|
27
|
+
//# sourceMappingURL=input-BYz8teIQ.d.mts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime162 from "react/jsx-runtime";
|
|
2
|
+
import * as class_variance_authority_types11 from "class-variance-authority/types";
|
|
2
3
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
-
import * as class_variance_authority_types13 from "class-variance-authority/types";
|
|
4
4
|
|
|
5
5
|
//#region packages/components/ui/input.variants.d.ts
|
|
6
6
|
declare const inputVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "outline" | "none" | "ghost" | "soft" | "subtle" | null | undefined;
|
|
8
8
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
9
|
-
} &
|
|
9
|
+
} & class_variance_authority_types11.ClassProp) | undefined) => string;
|
|
10
10
|
type InputVariantProps = VariantProps<typeof inputVariants>;
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region packages/components/ui/input.d.ts
|
|
@@ -21,7 +21,7 @@ declare function Input({
|
|
|
21
21
|
variant?: InputVariantProps['variant'];
|
|
22
22
|
size?: InputVariantProps['size'];
|
|
23
23
|
onValueChange?: (value: string) => void;
|
|
24
|
-
}):
|
|
24
|
+
}): react_jsx_runtime162.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { Input as t };
|
|
27
|
-
//# sourceMappingURL=input-
|
|
27
|
+
//# sourceMappingURL=input-CbpWzuai.d.cts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../dist-BqoK5OAd.cjs`);require(`../../button.variants-Bo2vzQp5.cjs`);const n=require(`../../button-BLYTfCyl.cjs`);require(`../../skeleton-oQFT4xR2.cjs`);const r=require(`../../tooltip-wJtgRj1d.cjs`);require(`../../separator-DSZyCT2g.cjs`);const i=require(`../../sheet-CxHNvLcP.cjs`);require(`../../input-qnlHzDDm.cjs`);let a=require(`@customafk/react-toolkit/utils`),o=require(`react/jsx-runtime`),s=require(`lucide-react`),c=require(`react`),l=require(`class-variance-authority`),u=require(`@customafk/react-toolkit/hooks/useMobile`);const d=`sidebar_state`,f=3600*24*7,p=`16rem`,m=`18rem`,h=`3rem`,g=`b`,_=(0,c.createContext)(null);function v(){let e=(0,c.useContext)(_);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function y({defaultOpen:e=!0,open:t,onOpenChange:n,className:i,style:s,children:l,...d}){let f=(0,u.useIsMobile)(),[p,m]=(0,c.useState)(!1),[h,g]=(0,c.useState)(e),v=t??h,y=(0,c.useCallback)(e=>{let t=typeof e==`function`?e(v):e;n?n(t):g(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,v]),b=(0,c.useCallback)(()=>f?m(e=>!e):y(e=>!e),[f,y]);(0,c.useEffect)(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),b())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[b]);let x=v?`expanded`:`collapsed`,S=(0,c.useMemo)(()=>({state:x,open:v,setOpen:y,isMobile:f,openMobile:p,setOpenMobile:m,toggleSidebar:b}),[x,v,y,f,p,b]);return(0,o.jsx)(_.Provider,{value:S,children:(0,o.jsx)(r.r,{delayDuration:0,children:(0,o.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...s},className:(0,a.cn)(`group/sidebar-wrapper flex h-dvh w-full has-data-[variant=inset]:bg-sidebar`,i),...d,children:l})})})}function b({side:e=`left`,variant:t=`sidebar`,collapsible:r=`offcanvas`,className:c,children:l,...u}){let{isMobile:d,state:f,openMobile:p,setOpenMobile:m,toggleSidebar:h}=v();return r===`none`?(0,o.jsx)(`aside`,{"data-slot":`sidebar`,className:(0,a.cn)(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,c),...u,children:l}):d?(0,o.jsx)(i.t,{open:p,onOpenChange:m,...u,children:(0,o.jsxs)(i.r,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`18rem`},side:e,children:[(0,o.jsxs)(i.o,{className:`sr-only`,children:[(0,o.jsx)(i.s,{children:`Sidebar`}),(0,o.jsx)(i.i,{children:`Displays the mobile sidebar.`})]}),(0,o.jsxs)(`div`,{className:`flex size-full flex-col`,children:[(0,o.jsxs)(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[(0,o.jsxs)(n.t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:(0,a.cn)(`size-10 rounded-full`,c),onClick:e=>{h(),e.preventDefault(),e.stopPropagation()},children:[(0,o.jsx)(s.MenuIcon,{className:`size-6!`}),(0,o.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),(0,o.jsx)(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,o.jsx)(s.ShoppingCartIcon,{size:20})}),(0,o.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,o.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,o.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,o.jsx)(`div`,{className:`flex flex-1 flex-col p-2`,children:l})]})]})}):(0,o.jsxs)(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":f,"data-collapsible":f===`collapsed`?r:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,o.jsx)(`div`,{"data-slot":`sidebar-gap`,className:(0,a.cn)(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,o.jsx)(`div`,{"data-slot":`sidebar-container`,className:(0,a.cn)(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,c),...u,children:(0,o.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:(0,a.cn)(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:l})})]})}function x({className:e,children:t,...n}){return(0,o.jsxs)(`main`,{"data-slot":`sidebar-inset`,className:(0,a.cn)(`relative flex w-full flex-1 flex-col`,e),...n,children:[(0,o.jsx)(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),(0,o.jsx)(`div`,{className:`inset-shadow-sm flex-1`,children:t})]})}function S({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:(0,a.cn)(`flex flex-col gap-2 p-2`,e),...t})}function C({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:(0,a.cn)(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function w({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:(0,a.cn)(`relative flex w-full min-w-0 flex-col`,e),...t})}function T({className:e,asChild:n=!1,...r}){return(0,o.jsx)(n?t.t:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:(0,a.cn)(`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`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,e),...r})}function E({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:(0,a.cn)(`w-full text-sm`,e),...t})}function D({className:e,...t}){return(0,o.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:(0,a.cn)(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function O({className:e,...t}){return(0,o.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:(0,a.cn)(`group/menu-item relative`,e),...t})}const k=(0,l.cva)([`peer/menu-button`,`cursor-pointer`,`flex w-full items-center gap-2`,`overflow-hidden rounded-md p-2 outline-hidden`,`truncate text-left font-normal`,`transition-[color,width,height,padding]`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`disabled:pointer-events-none`,`disabled:opacity-50`,`group-has-data-[sidebar=menu-action]/menu-item:pr-8`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`data-[active=true]:bg-sidebar-primary-muted`,`data-[active=true]:text-sidebar-primary`,`data-[state=open]:hover:bg-sidebar-accent`,`data-[state=open]:hover:text-sidebar-accent-foreground`,`group-data-[collapsible=icon]:size-12!`,`group-data-[collapsible=icon]:p-3!`,`group-data-[collapsible=icon]:gap-3!`,`[&>svg]:size-6`,`[&>svg]:shrink-0`,`[&>span:last-child]:truncate`],{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function A({asChild:e=!1,isActive:n=!1,variant:i=`default`,size:s=`default`,tooltip:c,className:l,...u}){let d=e?t.t:`button`,{isMobile:f,state:p}=v(),m=(0,o.jsx)(d,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":s,"data-active":n,className:(0,a.cn)(k({variant:i,size:s}),l),...u});return c?(typeof c==`string`&&(c={children:c}),(0,o.jsxs)(r.t,{children:[(0,o.jsx)(r.i,{asChild:!0,children:m}),(0,o.jsx)(r.n,{side:`right`,align:`center`,hidden:p!==`collapsed`||f,...c})]})):m}const j=()=>{let{toggleSidebar:e}=v();return(0,o.jsxs)(`header`,{"data-slot":`cms-layout-header`,className:(0,a.cn)(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[(0,o.jsxs)(n.t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:`size-10 rounded-full transition-all hover:text-text-positive`,onClick:t=>{t.preventDefault(),t.stopPropagation(),e()},children:[(0,o.jsx)(s.MenuIcon,{className:`size-6!`}),(0,o.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),(0,o.jsxs)(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[(0,o.jsx)(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,o.jsx)(s.ShoppingCartIcon,{size:20})}),(0,o.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,o.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Enterprise`}),(0,o.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2025`})]})]})]})},M=({activeNavItemId:e,sidebar:t,children:n,onLogout:r})=>{let i=(0,c.useMemo)(()=>t?.groupcontent||[],[t]);return(0,o.jsxs)(y,{children:[(0,o.jsx)(j,{}),(0,o.jsxs)(b,{variant:`inset`,collapsible:`icon`,children:[(0,o.jsx)(C,{children:i.map(t=>(0,o.jsxs)(w,{children:[(0,o.jsx)(T,{children:t.label}),(0,o.jsx)(E,{children:(0,o.jsx)(D,{children:t.items.map(t=>(0,o.jsx)(O,{children:(0,o.jsxs)(A,{isActive:t.id===e,onClick:e=>{t.onClick?.(),e.preventDefault(),e.stopPropagation()},children:[t.icon,t.label]})},t.id))})})]},t.id))}),(0,o.jsx)(S,{children:(0,o.jsxs)(D,{children:[(0,o.jsx)(O,{children:(0,o.jsxs)(A,{className:`border border-border`,onClick:e=>{r?.(),e.preventDefault(),e.stopPropagation()},children:[(0,o.jsx)(s.LogOutIcon,{className:`text-text-positive-weak`}),`Đăng xuất`]})}),(0,o.jsx)(O,{className:`mt-2 border-t border-t-border`,children:(0,o.jsx)(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})})]}),(0,o.jsx)(x,{children:(0,o.jsx)(`section`,{className:`relative size-full`,children:(0,o.jsx)(`div`,{className:`absolute inset-0`,children:n})})})]})};exports.CMSLayout=M;
|
|
1
|
+
const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../dist-BqoK5OAd.cjs`);require(`../../button.variants-Bo2vzQp5.cjs`);const n=require(`../../button-BLYTfCyl.cjs`);require(`../../skeleton-oQFT4xR2.cjs`);const r=require(`../../tooltip-DMFoP_sB.cjs`);require(`../../separator-DSZyCT2g.cjs`);const i=require(`../../sheet-CxHNvLcP.cjs`);require(`../../input-qnlHzDDm.cjs`);let a=require(`@customafk/react-toolkit/utils`),o=require(`react/jsx-runtime`),s=require(`lucide-react`),c=require(`react`),l=require(`class-variance-authority`),u=require(`@customafk/react-toolkit/hooks/useMobile`);const d=`sidebar_state`,f=3600*24*7,p=`16rem`,m=`18rem`,h=`3rem`,g=`b`,_=(0,c.createContext)(null);function v(){let e=(0,c.useContext)(_);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function y({defaultOpen:e=!0,open:t,onOpenChange:n,className:i,style:s,children:l,...d}){let f=(0,u.useIsMobile)(),[p,m]=(0,c.useState)(!1),[h,g]=(0,c.useState)(e),v=t??h,y=(0,c.useCallback)(e=>{let t=typeof e==`function`?e(v):e;n?n(t):g(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,v]),b=(0,c.useCallback)(()=>f?m(e=>!e):y(e=>!e),[f,y]);(0,c.useEffect)(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),b())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[b]);let x=v?`expanded`:`collapsed`,S=(0,c.useMemo)(()=>({state:x,open:v,setOpen:y,isMobile:f,openMobile:p,setOpenMobile:m,toggleSidebar:b}),[x,v,y,f,p,b]);return(0,o.jsx)(_.Provider,{value:S,children:(0,o.jsx)(r.r,{delayDuration:0,children:(0,o.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...s},className:(0,a.cn)(`group/sidebar-wrapper flex h-dvh w-full has-data-[variant=inset]:bg-sidebar`,i),...d,children:l})})})}function b({side:e=`left`,variant:t=`sidebar`,collapsible:r=`offcanvas`,className:c,children:l,...u}){let{isMobile:d,state:f,openMobile:p,setOpenMobile:m,toggleSidebar:h}=v();return r===`none`?(0,o.jsx)(`aside`,{"data-slot":`sidebar`,className:(0,a.cn)(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,c),...u,children:l}):d?(0,o.jsx)(i.t,{open:p,onOpenChange:m,...u,children:(0,o.jsxs)(i.r,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`18rem`},side:e,children:[(0,o.jsxs)(i.o,{className:`sr-only`,children:[(0,o.jsx)(i.s,{children:`Sidebar`}),(0,o.jsx)(i.i,{children:`Displays the mobile sidebar.`})]}),(0,o.jsxs)(`div`,{className:`flex size-full flex-col`,children:[(0,o.jsxs)(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[(0,o.jsxs)(n.t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:(0,a.cn)(`size-10 rounded-full`,c),onClick:e=>{h(),e.preventDefault(),e.stopPropagation()},children:[(0,o.jsx)(s.MenuIcon,{className:`size-6!`}),(0,o.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),(0,o.jsx)(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,o.jsx)(s.ShoppingCartIcon,{size:20})}),(0,o.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,o.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,o.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,o.jsx)(`div`,{className:`flex flex-1 flex-col p-2`,children:l})]})]})}):(0,o.jsxs)(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":f,"data-collapsible":f===`collapsed`?r:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,o.jsx)(`div`,{"data-slot":`sidebar-gap`,className:(0,a.cn)(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,o.jsx)(`div`,{"data-slot":`sidebar-container`,className:(0,a.cn)(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,c),...u,children:(0,o.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:(0,a.cn)(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:l})})]})}function x({className:e,children:t,...n}){return(0,o.jsxs)(`main`,{"data-slot":`sidebar-inset`,className:(0,a.cn)(`relative flex w-full flex-1 flex-col`,e),...n,children:[(0,o.jsx)(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),(0,o.jsx)(`div`,{className:`inset-shadow-sm flex-1`,children:t})]})}function S({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:(0,a.cn)(`flex flex-col gap-2 p-2`,e),...t})}function C({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:(0,a.cn)(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function w({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:(0,a.cn)(`relative flex w-full min-w-0 flex-col`,e),...t})}function T({className:e,asChild:n=!1,...r}){return(0,o.jsx)(n?t.t:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:(0,a.cn)(`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`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,e),...r})}function E({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:(0,a.cn)(`w-full text-sm`,e),...t})}function D({className:e,...t}){return(0,o.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:(0,a.cn)(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function O({className:e,...t}){return(0,o.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:(0,a.cn)(`group/menu-item relative`,e),...t})}const k=(0,l.cva)([`peer/menu-button`,`cursor-pointer`,`flex w-full items-center gap-2`,`overflow-hidden rounded-md p-2 outline-hidden`,`truncate text-left font-normal`,`transition-[color,width,height,padding]`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`disabled:pointer-events-none`,`disabled:opacity-50`,`group-has-data-[sidebar=menu-action]/menu-item:pr-8`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`data-[active=true]:bg-sidebar-primary-muted`,`data-[active=true]:text-sidebar-primary`,`data-[state=open]:hover:bg-sidebar-accent`,`data-[state=open]:hover:text-sidebar-accent-foreground`,`group-data-[collapsible=icon]:size-12!`,`group-data-[collapsible=icon]:p-3!`,`group-data-[collapsible=icon]:gap-3!`,`[&>svg]:size-6`,`[&>svg]:shrink-0`,`[&>span:last-child]:truncate`],{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function A({asChild:e=!1,isActive:n=!1,variant:i=`default`,size:s=`default`,tooltip:c,className:l,...u}){let d=e?t.t:`button`,{isMobile:f,state:p}=v(),m=(0,o.jsx)(d,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":s,"data-active":n,className:(0,a.cn)(k({variant:i,size:s}),l),...u});return c?(typeof c==`string`&&(c={children:c}),(0,o.jsxs)(r.t,{children:[(0,o.jsx)(r.i,{asChild:!0,children:m}),(0,o.jsx)(r.n,{side:`right`,align:`center`,hidden:p!==`collapsed`||f,...c})]})):m}const j=()=>{let{toggleSidebar:e}=v();return(0,o.jsxs)(`header`,{"data-slot":`cms-layout-header`,className:(0,a.cn)(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[(0,o.jsxs)(n.t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:`size-10 rounded-full transition-all hover:text-text-positive`,onClick:t=>{t.preventDefault(),t.stopPropagation(),e()},children:[(0,o.jsx)(s.MenuIcon,{className:`size-6!`}),(0,o.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),(0,o.jsxs)(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[(0,o.jsx)(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,o.jsx)(s.ShoppingCartIcon,{size:20})}),(0,o.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,o.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Enterprise`}),(0,o.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2025`})]})]})]})},M=({activeNavItemId:e,sidebar:t,children:n,onLogout:r})=>{let i=(0,c.useMemo)(()=>t?.groupcontent||[],[t]);return(0,o.jsxs)(y,{children:[(0,o.jsx)(j,{}),(0,o.jsxs)(b,{variant:`inset`,collapsible:`icon`,children:[(0,o.jsx)(C,{children:i.map(t=>(0,o.jsxs)(w,{children:[(0,o.jsx)(T,{children:t.label}),(0,o.jsx)(E,{children:(0,o.jsx)(D,{children:t.items.map(t=>(0,o.jsx)(O,{children:(0,o.jsxs)(A,{isActive:t.id===e,onClick:e=>{t.onClick?.(),e.preventDefault(),e.stopPropagation()},children:[t.icon,t.label]})},t.id))})})]},t.id))}),(0,o.jsx)(S,{children:(0,o.jsxs)(D,{children:[(0,o.jsx)(O,{children:(0,o.jsxs)(A,{className:`border border-border`,onClick:e=>{r?.(),e.preventDefault(),e.stopPropagation()},children:[(0,o.jsx)(s.LogOutIcon,{className:`text-text-positive-weak`}),`Đăng xuất`]})}),(0,o.jsx)(O,{className:`mt-2 border-t border-t-border`,children:(0,o.jsx)(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})})]}),(0,o.jsx)(x,{children:(0,o.jsx)(`section`,{className:`relative size-full`,children:(0,o.jsx)(`div`,{className:`absolute inset-0`,children:n})})})]})};exports.CMSLayout=M;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"../../dist-D2ydYRc4.mjs";import"../../button.variants-DBOg9vCn.mjs";import{t}from"../../button-BlQN92Jt.mjs";import"../../skeleton-6MpPv0K3.mjs";import{i as n,n as r,r as i,t as a}from"../../tooltip-KihXLXJa.mjs";import"../../separator-CWar33xc.mjs";import{i as o,o as s,r as c,s as l,t as u}from"../../sheet-CUfrx04D.mjs";import"../../input-DhoSwu7d.mjs";import{cn as d}from"@customafk/react-toolkit/utils";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{LogOutIcon as m,MenuIcon as h,ShoppingCartIcon as g}from"lucide-react";import{createContext as _,useCallback as v,useContext as y,useEffect as b,useMemo as x,useState as S}from"react";import{cva as C}from"class-variance-authority";import{useIsMobile as w}from"@customafk/react-toolkit/hooks/useMobile";const T=_(null);function E(){let e=y(T);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function D({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...s}){let c=w(),[l,u]=S(!1),[p,m]=S(e),h=t??p,g=v(e=>{let t=typeof e==`function`?e(h):e;n?n(t):m(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,h]),_=v(()=>c?u(e=>!e):g(e=>!e),[c,g]);b(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),_())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[_]);let y=h?`expanded`:`collapsed`,C=x(()=>({state:y,open:h,setOpen:g,isMobile:c,openMobile:l,setOpenMobile:u,toggleSidebar:_}),[y,h,g,c,l,_]);return f(T.Provider,{value:C,children:f(i,{delayDuration:0,children:f(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...a},className:d(`group/sidebar-wrapper flex h-dvh w-full has-data-[variant=inset]:bg-sidebar`,r),...s,children:o})})})}function O({side:e=`left`,variant:n=`sidebar`,collapsible:r=`offcanvas`,className:i,children:a,...m}){let{isMobile:_,state:v,openMobile:y,setOpenMobile:b,toggleSidebar:x}=E();return r===`none`?f(`aside`,{"data-slot":`sidebar`,className:d(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,i),...m,children:a}):_?f(u,{open:y,onOpenChange:b,...m,children:p(c,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`18rem`},side:e,children:[p(s,{className:`sr-only`,children:[f(l,{children:`Sidebar`}),f(o,{children:`Displays the mobile sidebar.`})]}),p(`div`,{className:`flex size-full flex-col`,children:[p(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[p(t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:d(`size-10 rounded-full`,i),onClick:e=>{x(),e.preventDefault(),e.stopPropagation()},children:[f(h,{className:`size-6!`}),f(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),f(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:f(g,{size:20})}),p(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[f(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),f(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),f(`div`,{className:`flex flex-1 flex-col p-2`,children:a})]})]})}):p(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":v,"data-collapsible":v===`collapsed`?r:``,"data-variant":n,"data-side":e,"data-slot":`sidebar`,children:[f(`div`,{"data-slot":`sidebar-gap`,className:d(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,n===`floating`||n===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),f(`div`,{"data-slot":`sidebar-container`,className:d(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,n===`floating`||n===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,i),...m,children:f(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:d(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:a})})]})}function k({className:e,children:t,...n}){return p(`main`,{"data-slot":`sidebar-inset`,className:d(`relative flex w-full flex-1 flex-col`,e),...n,children:[f(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),f(`div`,{className:`inset-shadow-sm flex-1`,children:t})]})}function A({className:e,...t}){return f(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:d(`flex flex-col gap-2 p-2`,e),...t})}function j({className:e,...t}){return f(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:d(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function M({className:e,...t}){return f(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:d(`relative flex w-full min-w-0 flex-col`,e),...t})}function N({className:t,asChild:n=!1,...r}){return f(n?e:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:d(`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`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,t),...r})}function P({className:e,...t}){return f(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:d(`w-full text-sm`,e),...t})}function F({className:e,...t}){return f(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:d(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function I({className:e,...t}){return f(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:d(`group/menu-item relative`,e),...t})}const L=C([`peer/menu-button`,`cursor-pointer`,`flex w-full items-center gap-2`,`overflow-hidden rounded-md p-2 outline-hidden`,`truncate text-left font-normal`,`transition-[color,width,height,padding]`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`disabled:pointer-events-none`,`disabled:opacity-50`,`group-has-data-[sidebar=menu-action]/menu-item:pr-8`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`data-[active=true]:bg-sidebar-primary-muted`,`data-[active=true]:text-sidebar-primary`,`data-[state=open]:hover:bg-sidebar-accent`,`data-[state=open]:hover:text-sidebar-accent-foreground`,`group-data-[collapsible=icon]:size-12!`,`group-data-[collapsible=icon]:p-3!`,`group-data-[collapsible=icon]:gap-3!`,`[&>svg]:size-6`,`[&>svg]:shrink-0`,`[&>span:last-child]:truncate`],{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function R({asChild:t=!1,isActive:i=!1,variant:o=`default`,size:s=`default`,tooltip:c,className:l,...u}){let m=t?e:`button`,{isMobile:h,state:g}=E(),_=f(m,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":s,"data-active":i,className:d(L({variant:o,size:s}),l),...u});return c?(typeof c==`string`&&(c={children:c}),p(a,{children:[f(n,{asChild:!0,children:_}),f(r,{side:`right`,align:`center`,hidden:g!==`collapsed`||h,...c})]})):_}const z=()=>{let{toggleSidebar:e}=E();return p(`header`,{"data-slot":`cms-layout-header`,className:d(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[p(t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:`size-10 rounded-full transition-all hover:text-text-positive`,onClick:t=>{t.preventDefault(),t.stopPropagation(),e()},children:[f(h,{className:`size-6!`}),f(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),p(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[f(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:f(g,{size:20})}),p(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[f(`span`,{className:`truncate font-medium`,children:`Lunas Enterprise`}),f(`span`,{className:`truncate text-xs`,children:`Established 2025`})]})]})]})},B=({activeNavItemId:e,sidebar:t,children:n,onLogout:r})=>{let i=x(()=>t?.groupcontent||[],[t]);return p(D,{children:[f(z,{}),p(O,{variant:`inset`,collapsible:`icon`,children:[f(j,{children:i.map(t=>p(M,{children:[f(N,{children:t.label}),f(P,{children:f(F,{children:t.items.map(t=>f(I,{children:p(R,{isActive:t.id===e,onClick:e=>{t.onClick?.(),e.preventDefault(),e.stopPropagation()},children:[t.icon,t.label]})},t.id))})})]},t.id))}),f(A,{children:p(F,{children:[f(I,{children:p(R,{className:`border border-border`,onClick:e=>{r?.(),e.preventDefault(),e.stopPropagation()},children:[f(m,{className:`text-text-positive-weak`}),`Đăng xuất`]})}),f(I,{className:`mt-2 border-t border-t-border`,children:f(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})})]}),f(k,{children:f(`section`,{className:`relative size-full`,children:f(`div`,{className:`absolute inset-0`,children:n})})})]})};export{B as CMSLayout};
|
|
1
|
+
import{t as e}from"../../dist-D2ydYRc4.mjs";import"../../button.variants-DBOg9vCn.mjs";import{t}from"../../button-BlQN92Jt.mjs";import"../../skeleton-6MpPv0K3.mjs";import{i as n,n as r,r as i,t as a}from"../../tooltip-Dd1torAV.mjs";import"../../separator-CWar33xc.mjs";import{i as o,o as s,r as c,s as l,t as u}from"../../sheet-CUfrx04D.mjs";import"../../input-DhoSwu7d.mjs";import{cn as d}from"@customafk/react-toolkit/utils";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{LogOutIcon as m,MenuIcon as h,ShoppingCartIcon as g}from"lucide-react";import{createContext as _,useCallback as v,useContext as y,useEffect as b,useMemo as x,useState as S}from"react";import{cva as C}from"class-variance-authority";import{useIsMobile as w}from"@customafk/react-toolkit/hooks/useMobile";const T=_(null);function E(){let e=y(T);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function D({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...s}){let c=w(),[l,u]=S(!1),[p,m]=S(e),h=t??p,g=v(e=>{let t=typeof e==`function`?e(h):e;n?n(t):m(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,h]),_=v(()=>c?u(e=>!e):g(e=>!e),[c,g]);b(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),_())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[_]);let y=h?`expanded`:`collapsed`,C=x(()=>({state:y,open:h,setOpen:g,isMobile:c,openMobile:l,setOpenMobile:u,toggleSidebar:_}),[y,h,g,c,l,_]);return f(T.Provider,{value:C,children:f(i,{delayDuration:0,children:f(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...a},className:d(`group/sidebar-wrapper flex h-dvh w-full has-data-[variant=inset]:bg-sidebar`,r),...s,children:o})})})}function O({side:e=`left`,variant:n=`sidebar`,collapsible:r=`offcanvas`,className:i,children:a,...m}){let{isMobile:_,state:v,openMobile:y,setOpenMobile:b,toggleSidebar:x}=E();return r===`none`?f(`aside`,{"data-slot":`sidebar`,className:d(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,i),...m,children:a}):_?f(u,{open:y,onOpenChange:b,...m,children:p(c,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`18rem`},side:e,children:[p(s,{className:`sr-only`,children:[f(l,{children:`Sidebar`}),f(o,{children:`Displays the mobile sidebar.`})]}),p(`div`,{className:`flex size-full flex-col`,children:[p(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[p(t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:d(`size-10 rounded-full`,i),onClick:e=>{x(),e.preventDefault(),e.stopPropagation()},children:[f(h,{className:`size-6!`}),f(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),f(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:f(g,{size:20})}),p(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[f(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),f(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),f(`div`,{className:`flex flex-1 flex-col p-2`,children:a})]})]})}):p(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":v,"data-collapsible":v===`collapsed`?r:``,"data-variant":n,"data-side":e,"data-slot":`sidebar`,children:[f(`div`,{"data-slot":`sidebar-gap`,className:d(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,n===`floating`||n===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),f(`div`,{"data-slot":`sidebar-container`,className:d(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,n===`floating`||n===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,i),...m,children:f(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:d(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:a})})]})}function k({className:e,children:t,...n}){return p(`main`,{"data-slot":`sidebar-inset`,className:d(`relative flex w-full flex-1 flex-col`,e),...n,children:[f(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),f(`div`,{className:`inset-shadow-sm flex-1`,children:t})]})}function A({className:e,...t}){return f(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:d(`flex flex-col gap-2 p-2`,e),...t})}function j({className:e,...t}){return f(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:d(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function M({className:e,...t}){return f(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:d(`relative flex w-full min-w-0 flex-col`,e),...t})}function N({className:t,asChild:n=!1,...r}){return f(n?e:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:d(`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`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,t),...r})}function P({className:e,...t}){return f(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:d(`w-full text-sm`,e),...t})}function F({className:e,...t}){return f(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:d(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function I({className:e,...t}){return f(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:d(`group/menu-item relative`,e),...t})}const L=C([`peer/menu-button`,`cursor-pointer`,`flex w-full items-center gap-2`,`overflow-hidden rounded-md p-2 outline-hidden`,`truncate text-left font-normal`,`transition-[color,width,height,padding]`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`disabled:pointer-events-none`,`disabled:opacity-50`,`group-has-data-[sidebar=menu-action]/menu-item:pr-8`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`data-[active=true]:bg-sidebar-primary-muted`,`data-[active=true]:text-sidebar-primary`,`data-[state=open]:hover:bg-sidebar-accent`,`data-[state=open]:hover:text-sidebar-accent-foreground`,`group-data-[collapsible=icon]:size-12!`,`group-data-[collapsible=icon]:p-3!`,`group-data-[collapsible=icon]:gap-3!`,`[&>svg]:size-6`,`[&>svg]:shrink-0`,`[&>span:last-child]:truncate`],{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function R({asChild:t=!1,isActive:i=!1,variant:o=`default`,size:s=`default`,tooltip:c,className:l,...u}){let m=t?e:`button`,{isMobile:h,state:g}=E(),_=f(m,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":s,"data-active":i,className:d(L({variant:o,size:s}),l),...u});return c?(typeof c==`string`&&(c={children:c}),p(a,{children:[f(n,{asChild:!0,children:_}),f(r,{side:`right`,align:`center`,hidden:g!==`collapsed`||h,...c})]})):_}const z=()=>{let{toggleSidebar:e}=E();return p(`header`,{"data-slot":`cms-layout-header`,className:d(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[p(t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:`size-10 rounded-full transition-all hover:text-text-positive`,onClick:t=>{t.preventDefault(),t.stopPropagation(),e()},children:[f(h,{className:`size-6!`}),f(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),p(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[f(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:f(g,{size:20})}),p(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[f(`span`,{className:`truncate font-medium`,children:`Lunas Enterprise`}),f(`span`,{className:`truncate text-xs`,children:`Established 2025`})]})]})]})},B=({activeNavItemId:e,sidebar:t,children:n,onLogout:r})=>{let i=x(()=>t?.groupcontent||[],[t]);return p(D,{children:[f(z,{}),p(O,{variant:`inset`,collapsible:`icon`,children:[f(j,{children:i.map(t=>p(M,{children:[f(N,{children:t.label}),f(P,{children:f(F,{children:t.items.map(t=>f(I,{children:p(R,{isActive:t.id===e,onClick:e=>{t.onClick?.(),e.preventDefault(),e.stopPropagation()},children:[t.icon,t.label]})},t.id))})})]},t.id))}),f(A,{children:p(F,{children:[f(I,{children:p(R,{className:`border border-border`,onClick:e=>{r?.(),e.preventDefault(),e.stopPropagation()},children:[f(m,{className:`text-text-positive-weak`}),`Đăng xuất`]})}),f(I,{className:`mt-2 border-t border-t-border`,children:f(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})})]}),f(k,{children:f(`section`,{className:`relative size-full`,children:f(`div`,{className:`absolute inset-0`,children:n})})})]})};export{B as CMSLayout};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/layouts/flex.d.cts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime28 from "react/jsx-runtime";
|
|
2
|
+
import * as react0 from "react";
|
|
3
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
|
|
6
6
|
//#region packages/components/layouts/flex.d.ts
|
|
7
7
|
declare const flexVariants: (props?: ({
|
|
8
8
|
vertical?: boolean | null | undefined;
|
|
9
|
-
width?: "max" | "min" | "
|
|
9
|
+
width?: "max" | "min" | "full" | "auto" | "fit" | "screen" | "null" | null | undefined;
|
|
10
10
|
wrap?: boolean | null | undefined;
|
|
11
11
|
margin?: "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
|
|
12
12
|
padding?: "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
|
|
13
13
|
gap?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
|
|
14
14
|
justify?: "center" | "start" | "end" | "between" | "around" | "evenly" | "stretch" | null | undefined;
|
|
15
|
-
align?: "center" | "
|
|
16
|
-
} &
|
|
15
|
+
align?: "center" | "start" | "end" | "stretch" | "baseline" | null | undefined;
|
|
16
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
17
17
|
type Props = {
|
|
18
18
|
className?: string;
|
|
19
19
|
} & VariantProps<typeof flexVariants>;
|
|
20
|
-
declare const Flex:
|
|
20
|
+
declare const Flex: react0.MemoExoticComponent<({
|
|
21
21
|
vertical,
|
|
22
22
|
wrap,
|
|
23
23
|
width,
|
|
@@ -28,7 +28,7 @@ declare const Flex: react25.MemoExoticComponent<({
|
|
|
28
28
|
align,
|
|
29
29
|
className,
|
|
30
30
|
children
|
|
31
|
-
}: React.PropsWithChildren<Props>) =>
|
|
31
|
+
}: React.PropsWithChildren<Props>) => react_jsx_runtime28.JSX.Element>;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { Flex };
|
|
34
34
|
//# sourceMappingURL=flex.d.cts.map
|
package/dist/layouts/flex.d.mts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime179 from "react/jsx-runtime";
|
|
2
|
+
import * as react13 from "react";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
|
-
import * as
|
|
4
|
+
import * as class_variance_authority_types6 from "class-variance-authority/types";
|
|
5
5
|
|
|
6
6
|
//#region packages/components/layouts/flex.d.ts
|
|
7
7
|
declare const flexVariants: (props?: ({
|
|
8
8
|
vertical?: boolean | null | undefined;
|
|
9
|
-
width?: "max" | "min" | "
|
|
9
|
+
width?: "max" | "min" | "full" | "auto" | "fit" | "screen" | "null" | null | undefined;
|
|
10
10
|
wrap?: boolean | null | undefined;
|
|
11
11
|
margin?: "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
|
|
12
12
|
padding?: "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
|
|
13
13
|
gap?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
|
|
14
14
|
justify?: "center" | "start" | "end" | "between" | "around" | "evenly" | "stretch" | null | undefined;
|
|
15
|
-
align?: "center" | "
|
|
16
|
-
} &
|
|
15
|
+
align?: "center" | "start" | "end" | "stretch" | "baseline" | null | undefined;
|
|
16
|
+
} & class_variance_authority_types6.ClassProp) | undefined) => string;
|
|
17
17
|
type Props = {
|
|
18
18
|
className?: string;
|
|
19
19
|
} & VariantProps<typeof flexVariants>;
|
|
20
|
-
declare const Flex:
|
|
20
|
+
declare const Flex: react13.MemoExoticComponent<({
|
|
21
21
|
vertical,
|
|
22
22
|
wrap,
|
|
23
23
|
width,
|
|
@@ -28,7 +28,7 @@ declare const Flex: react2.MemoExoticComponent<({
|
|
|
28
28
|
align,
|
|
29
29
|
className,
|
|
30
30
|
children
|
|
31
|
-
}: React.PropsWithChildren<Props>) =>
|
|
31
|
+
}: React.PropsWithChildren<Props>) => react_jsx_runtime179.JSX.Element>;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { Flex };
|
|
34
34
|
//# sourceMappingURL=flex.d.mts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../dist-BqoK5OAd.cjs`);require(`../../button.variants-Bo2vzQp5.cjs`);const n=require(`../../button-BLYTfCyl.cjs`);require(`../../skeleton-oQFT4xR2.cjs`);const r=require(`../../tooltip-wJtgRj1d.cjs`);require(`../../separator-DSZyCT2g.cjs`);const i=require(`../../sheet-CxHNvLcP.cjs`);require(`../../input-qnlHzDDm.cjs`);let a=require(`@customafk/react-toolkit/utils`),o=require(`react/jsx-runtime`),s=require(`lucide-react`),c=require(`react`),l=require(`class-variance-authority`),u=require(`@customafk/react-toolkit/hooks/useMobile`);const d=`sidebar_state`,f=3600*24*7,p=`16rem`,m=`18rem`,h=`3rem`,g=`b`,_=(0,c.createContext)(null);function v(){let e=(0,c.useContext)(_);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function y({defaultOpen:e=!0,open:t,onOpenChange:n,className:i,style:s,children:l,...d}){let f=(0,u.useIsMobile)(),[p,m]=(0,c.useState)(!1),[h,g]=(0,c.useState)(e),v=t??h,y=(0,c.useCallback)(e=>{let t=typeof e==`function`?e(v):e;n?n(t):g(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,v]),b=(0,c.useCallback)(()=>f?m(e=>!e):y(e=>!e),[f,y]);(0,c.useEffect)(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),b())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[b]);let x=v?`expanded`:`collapsed`,S=(0,c.useMemo)(()=>({state:x,open:v,setOpen:y,isMobile:f,openMobile:p,setOpenMobile:m,toggleSidebar:b}),[x,v,y,f,p,b]);return(0,o.jsx)(_.Provider,{value:S,children:(0,o.jsx)(r.r,{delayDuration:0,children:(0,o.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...s},className:(0,a.cn)(`group/sidebar-wrapper flex h-dvh w-full`,i),...d,children:l})})})}function b({side:e=`left`,variant:t=`sidebar`,collapsible:r=`offcanvas`,className:c,children:l,...u}){let{isMobile:d,state:f,openMobile:p,setOpenMobile:m,toggleSidebar:h}=v();return r===`none`?(0,o.jsx)(`aside`,{"data-slot":`sidebar`,className:(0,a.cn)(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,c),...u,children:l}):d?(0,o.jsx)(i.t,{open:p,onOpenChange:m,...u,children:(0,o.jsxs)(i.r,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`18rem`},side:e,children:[(0,o.jsxs)(i.o,{className:`sr-only`,children:[(0,o.jsx)(i.s,{children:`Sidebar`}),(0,o.jsx)(i.i,{children:`Displays the mobile sidebar.`})]}),(0,o.jsxs)(`div`,{className:`flex size-full flex-col`,children:[(0,o.jsxs)(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[(0,o.jsxs)(n.t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:(0,a.cn)(`size-10 rounded-full`,c),onClick:e=>{h(),e.preventDefault(),e.stopPropagation()},children:[(0,o.jsx)(s.MenuIcon,{className:`size-6!`}),(0,o.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),(0,o.jsx)(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,o.jsx)(s.ShoppingCartIcon,{size:20})}),(0,o.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,o.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,o.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,o.jsx)(`div`,{className:`flex flex-1 flex-col p-2`,children:l})]})]})}):(0,o.jsxs)(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":f,"data-collapsible":f===`collapsed`?r:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,o.jsx)(`div`,{"data-slot":`sidebar-gap`,className:(0,a.cn)(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,o.jsx)(`div`,{"data-slot":`sidebar-container`,className:(0,a.cn)(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,c),...u,children:(0,o.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:(0,a.cn)(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:l})})]})}function x({className:e,children:t,...n}){return(0,o.jsxs)(`main`,{"data-slot":`sidebar-inset`,className:(0,a.cn)(`relative flex w-full flex-1 flex-col`,e),...n,children:[(0,o.jsx)(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),(0,o.jsx)(`div`,{className:`inset-shadow-sm flex-1`,children:t})]})}function S({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:(0,a.cn)(`flex flex-col gap-2 p-2`,e),...t})}function C({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:(0,a.cn)(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function w({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:(0,a.cn)(`relative flex w-full min-w-0 flex-col`,e),...t})}function T({className:e,asChild:n=!1,...r}){return(0,o.jsx)(n?t.t:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:(0,a.cn)(`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`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,e),...r})}function E({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:(0,a.cn)(`w-full text-sm`,e),...t})}function D({className:e,...t}){return(0,o.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:(0,a.cn)(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function O({className:e,...t}){return(0,o.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:(0,a.cn)(`group/menu-item relative`,e),...t})}const k=(0,l.cva)([`peer/menu-button`,`cursor-pointer`,`flex w-full items-center gap-2`,`overflow-hidden rounded-md p-2 outline-hidden`,`truncate text-left font-normal`,`transition-[color,width,height,padding]`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`disabled:pointer-events-none`,`disabled:opacity-50`,`group-has-data-[sidebar=menu-action]/menu-item:pr-8`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`data-[active=true]:bg-sidebar-primary-muted`,`data-[active=true]:text-sidebar-primary`,`data-[state=open]:hover:bg-sidebar-accent`,`data-[state=open]:hover:text-sidebar-accent-foreground`,`group-data-[collapsible=icon]:size-12!`,`group-data-[collapsible=icon]:p-3!`,`group-data-[collapsible=icon]:gap-3!`,`[&>svg]:size-6`,`[&>svg]:shrink-0`,`[&>span:last-child]:truncate`],{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function A({asChild:e=!1,isActive:n=!1,variant:i=`default`,size:s=`default`,tooltip:c,className:l,...u}){let d=e?t.t:`button`,{isMobile:f,state:p}=v(),m=(0,o.jsx)(d,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":s,"data-active":n,className:(0,a.cn)(k({variant:i,size:s}),l),...u});return c?(typeof c==`string`&&(c={children:c}),(0,o.jsxs)(r.t,{children:[(0,o.jsx)(r.i,{asChild:!0,children:m}),(0,o.jsx)(r.n,{side:`right`,align:`center`,hidden:p!==`collapsed`||f,...c})]})):m}const j=()=>{let{toggleSidebar:e}=v();return(0,o.jsxs)(`header`,{"data-slot":`payment-layout-header`,className:(0,a.cn)(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[(0,o.jsxs)(n.t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:`size-10 rounded-full transition-all hover:text-text-positive`,onClick:t=>{t.preventDefault(),t.stopPropagation(),e()},children:[(0,o.jsx)(s.MenuIcon,{className:`size-6!`}),(0,o.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),(0,o.jsxs)(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[(0,o.jsx)(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,o.jsx)(s.ShoppingCartIcon,{size:20})}),(0,o.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,o.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Enterprise`}),(0,o.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2025`})]})]})]})},M=({activeNavItemId:e,sidebar:t,children:n})=>{let r=(0,c.useMemo)(()=>t?.groupcontent||[],[t]);return(0,o.jsxs)(y,{children:[(0,o.jsx)(j,{}),(0,o.jsxs)(b,{variant:`inset`,collapsible:`icon`,children:[(0,o.jsx)(C,{children:r.map(t=>(0,o.jsxs)(w,{children:[(0,o.jsx)(T,{children:t.label}),(0,o.jsx)(E,{children:(0,o.jsx)(D,{children:t.items.map(t=>(0,o.jsx)(O,{children:(0,o.jsxs)(A,{isActive:t.id===e,onClick:e=>{t.onClick?.(),e.preventDefault(),e.stopPropagation()},children:[t.icon,t.label]})},t.id))})})]},t.id))}),(0,o.jsx)(S,{children:(0,o.jsx)(D,{children:(0,o.jsx)(O,{className:`mt-2 border-t border-t-border`,children:(0,o.jsx)(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})})})]}),(0,o.jsx)(x,{children:(0,o.jsx)(`section`,{className:`relative size-full`,children:(0,o.jsx)(`div`,{className:`absolute inset-0`,children:n})})})]})};exports.PaymentLayout=M;
|
|
1
|
+
const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../dist-BqoK5OAd.cjs`);require(`../../button.variants-Bo2vzQp5.cjs`);const n=require(`../../button-BLYTfCyl.cjs`);require(`../../skeleton-oQFT4xR2.cjs`);const r=require(`../../tooltip-DMFoP_sB.cjs`);require(`../../separator-DSZyCT2g.cjs`);const i=require(`../../sheet-CxHNvLcP.cjs`);require(`../../input-qnlHzDDm.cjs`);let a=require(`@customafk/react-toolkit/utils`),o=require(`react/jsx-runtime`),s=require(`lucide-react`),c=require(`react`),l=require(`class-variance-authority`),u=require(`@customafk/react-toolkit/hooks/useMobile`);const d=`sidebar_state`,f=3600*24*7,p=`16rem`,m=`18rem`,h=`3rem`,g=`b`,_=(0,c.createContext)(null);function v(){let e=(0,c.useContext)(_);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function y({defaultOpen:e=!0,open:t,onOpenChange:n,className:i,style:s,children:l,...d}){let f=(0,u.useIsMobile)(),[p,m]=(0,c.useState)(!1),[h,g]=(0,c.useState)(e),v=t??h,y=(0,c.useCallback)(e=>{let t=typeof e==`function`?e(v):e;n?n(t):g(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,v]),b=(0,c.useCallback)(()=>f?m(e=>!e):y(e=>!e),[f,y]);(0,c.useEffect)(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),b())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[b]);let x=v?`expanded`:`collapsed`,S=(0,c.useMemo)(()=>({state:x,open:v,setOpen:y,isMobile:f,openMobile:p,setOpenMobile:m,toggleSidebar:b}),[x,v,y,f,p,b]);return(0,o.jsx)(_.Provider,{value:S,children:(0,o.jsx)(r.r,{delayDuration:0,children:(0,o.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...s},className:(0,a.cn)(`group/sidebar-wrapper flex h-dvh w-full`,i),...d,children:l})})})}function b({side:e=`left`,variant:t=`sidebar`,collapsible:r=`offcanvas`,className:c,children:l,...u}){let{isMobile:d,state:f,openMobile:p,setOpenMobile:m,toggleSidebar:h}=v();return r===`none`?(0,o.jsx)(`aside`,{"data-slot":`sidebar`,className:(0,a.cn)(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,c),...u,children:l}):d?(0,o.jsx)(i.t,{open:p,onOpenChange:m,...u,children:(0,o.jsxs)(i.r,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`18rem`},side:e,children:[(0,o.jsxs)(i.o,{className:`sr-only`,children:[(0,o.jsx)(i.s,{children:`Sidebar`}),(0,o.jsx)(i.i,{children:`Displays the mobile sidebar.`})]}),(0,o.jsxs)(`div`,{className:`flex size-full flex-col`,children:[(0,o.jsxs)(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[(0,o.jsxs)(n.t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:(0,a.cn)(`size-10 rounded-full`,c),onClick:e=>{h(),e.preventDefault(),e.stopPropagation()},children:[(0,o.jsx)(s.MenuIcon,{className:`size-6!`}),(0,o.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),(0,o.jsx)(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,o.jsx)(s.ShoppingCartIcon,{size:20})}),(0,o.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,o.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),(0,o.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),(0,o.jsx)(`div`,{className:`flex flex-1 flex-col p-2`,children:l})]})]})}):(0,o.jsxs)(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":f,"data-collapsible":f===`collapsed`?r:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,o.jsx)(`div`,{"data-slot":`sidebar-gap`,className:(0,a.cn)(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,o.jsx)(`div`,{"data-slot":`sidebar-container`,className:(0,a.cn)(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,c),...u,children:(0,o.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:(0,a.cn)(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:l})})]})}function x({className:e,children:t,...n}){return(0,o.jsxs)(`main`,{"data-slot":`sidebar-inset`,className:(0,a.cn)(`relative flex w-full flex-1 flex-col`,e),...n,children:[(0,o.jsx)(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),(0,o.jsx)(`div`,{className:`inset-shadow-sm flex-1`,children:t})]})}function S({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:(0,a.cn)(`flex flex-col gap-2 p-2`,e),...t})}function C({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:(0,a.cn)(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function w({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:(0,a.cn)(`relative flex w-full min-w-0 flex-col`,e),...t})}function T({className:e,asChild:n=!1,...r}){return(0,o.jsx)(n?t.t:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:(0,a.cn)(`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`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,e),...r})}function E({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:(0,a.cn)(`w-full text-sm`,e),...t})}function D({className:e,...t}){return(0,o.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:(0,a.cn)(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function O({className:e,...t}){return(0,o.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:(0,a.cn)(`group/menu-item relative`,e),...t})}const k=(0,l.cva)([`peer/menu-button`,`cursor-pointer`,`flex w-full items-center gap-2`,`overflow-hidden rounded-md p-2 outline-hidden`,`truncate text-left font-normal`,`transition-[color,width,height,padding]`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`disabled:pointer-events-none`,`disabled:opacity-50`,`group-has-data-[sidebar=menu-action]/menu-item:pr-8`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`data-[active=true]:bg-sidebar-primary-muted`,`data-[active=true]:text-sidebar-primary`,`data-[state=open]:hover:bg-sidebar-accent`,`data-[state=open]:hover:text-sidebar-accent-foreground`,`group-data-[collapsible=icon]:size-12!`,`group-data-[collapsible=icon]:p-3!`,`group-data-[collapsible=icon]:gap-3!`,`[&>svg]:size-6`,`[&>svg]:shrink-0`,`[&>span:last-child]:truncate`],{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function A({asChild:e=!1,isActive:n=!1,variant:i=`default`,size:s=`default`,tooltip:c,className:l,...u}){let d=e?t.t:`button`,{isMobile:f,state:p}=v(),m=(0,o.jsx)(d,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":s,"data-active":n,className:(0,a.cn)(k({variant:i,size:s}),l),...u});return c?(typeof c==`string`&&(c={children:c}),(0,o.jsxs)(r.t,{children:[(0,o.jsx)(r.i,{asChild:!0,children:m}),(0,o.jsx)(r.n,{side:`right`,align:`center`,hidden:p!==`collapsed`||f,...c})]})):m}const j=()=>{let{toggleSidebar:e}=v();return(0,o.jsxs)(`header`,{"data-slot":`payment-layout-header`,className:(0,a.cn)(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[(0,o.jsxs)(n.t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:`size-10 rounded-full transition-all hover:text-text-positive`,onClick:t=>{t.preventDefault(),t.stopPropagation(),e()},children:[(0,o.jsx)(s.MenuIcon,{className:`size-6!`}),(0,o.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),(0,o.jsxs)(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[(0,o.jsx)(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,o.jsx)(s.ShoppingCartIcon,{size:20})}),(0,o.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,o.jsx)(`span`,{className:`truncate font-medium`,children:`Lunas Enterprise`}),(0,o.jsx)(`span`,{className:`truncate text-xs`,children:`Established 2025`})]})]})]})},M=({activeNavItemId:e,sidebar:t,children:n})=>{let r=(0,c.useMemo)(()=>t?.groupcontent||[],[t]);return(0,o.jsxs)(y,{children:[(0,o.jsx)(j,{}),(0,o.jsxs)(b,{variant:`inset`,collapsible:`icon`,children:[(0,o.jsx)(C,{children:r.map(t=>(0,o.jsxs)(w,{children:[(0,o.jsx)(T,{children:t.label}),(0,o.jsx)(E,{children:(0,o.jsx)(D,{children:t.items.map(t=>(0,o.jsx)(O,{children:(0,o.jsxs)(A,{isActive:t.id===e,onClick:e=>{t.onClick?.(),e.preventDefault(),e.stopPropagation()},children:[t.icon,t.label]})},t.id))})})]},t.id))}),(0,o.jsx)(S,{children:(0,o.jsx)(D,{children:(0,o.jsx)(O,{className:`mt-2 border-t border-t-border`,children:(0,o.jsx)(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})})})]}),(0,o.jsx)(x,{children:(0,o.jsx)(`section`,{className:`relative size-full`,children:(0,o.jsx)(`div`,{className:`absolute inset-0`,children:n})})})]})};exports.PaymentLayout=M;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"../../dist-D2ydYRc4.mjs";import"../../button.variants-DBOg9vCn.mjs";import{t}from"../../button-BlQN92Jt.mjs";import"../../skeleton-6MpPv0K3.mjs";import{i as n,n as r,r as i,t as a}from"../../tooltip-KihXLXJa.mjs";import"../../separator-CWar33xc.mjs";import{i as o,o as s,r as c,s as l,t as u}from"../../sheet-CUfrx04D.mjs";import"../../input-DhoSwu7d.mjs";import{cn as d}from"@customafk/react-toolkit/utils";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{MenuIcon as m,ShoppingCartIcon as h}from"lucide-react";import{createContext as g,useCallback as _,useContext as v,useEffect as y,useMemo as b,useState as x}from"react";import{cva as S}from"class-variance-authority";import{useIsMobile as C}from"@customafk/react-toolkit/hooks/useMobile";const w=g(null);function T(){let e=v(w);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function E({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...s}){let c=C(),[l,u]=x(!1),[p,m]=x(e),h=t??p,g=_(e=>{let t=typeof e==`function`?e(h):e;n?n(t):m(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,h]),v=_(()=>c?u(e=>!e):g(e=>!e),[c,g]);y(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),v())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v]);let S=h?`expanded`:`collapsed`,T=b(()=>({state:S,open:h,setOpen:g,isMobile:c,openMobile:l,setOpenMobile:u,toggleSidebar:v}),[S,h,g,c,l,v]);return f(w.Provider,{value:T,children:f(i,{delayDuration:0,children:f(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...a},className:d(`group/sidebar-wrapper flex h-dvh w-full`,r),...s,children:o})})})}function D({side:e=`left`,variant:n=`sidebar`,collapsible:r=`offcanvas`,className:i,children:a,...g}){let{isMobile:_,state:v,openMobile:y,setOpenMobile:b,toggleSidebar:x}=T();return r===`none`?f(`aside`,{"data-slot":`sidebar`,className:d(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,i),...g,children:a}):_?f(u,{open:y,onOpenChange:b,...g,children:p(c,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`18rem`},side:e,children:[p(s,{className:`sr-only`,children:[f(l,{children:`Sidebar`}),f(o,{children:`Displays the mobile sidebar.`})]}),p(`div`,{className:`flex size-full flex-col`,children:[p(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[p(t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:d(`size-10 rounded-full`,i),onClick:e=>{x(),e.preventDefault(),e.stopPropagation()},children:[f(m,{className:`size-6!`}),f(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),f(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:f(h,{size:20})}),p(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[f(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),f(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),f(`div`,{className:`flex flex-1 flex-col p-2`,children:a})]})]})}):p(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":v,"data-collapsible":v===`collapsed`?r:``,"data-variant":n,"data-side":e,"data-slot":`sidebar`,children:[f(`div`,{"data-slot":`sidebar-gap`,className:d(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,n===`floating`||n===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),f(`div`,{"data-slot":`sidebar-container`,className:d(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,n===`floating`||n===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,i),...g,children:f(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:d(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:a})})]})}function O({className:e,children:t,...n}){return p(`main`,{"data-slot":`sidebar-inset`,className:d(`relative flex w-full flex-1 flex-col`,e),...n,children:[f(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),f(`div`,{className:`inset-shadow-sm flex-1`,children:t})]})}function k({className:e,...t}){return f(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:d(`flex flex-col gap-2 p-2`,e),...t})}function A({className:e,...t}){return f(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:d(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function j({className:e,...t}){return f(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:d(`relative flex w-full min-w-0 flex-col`,e),...t})}function M({className:t,asChild:n=!1,...r}){return f(n?e:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:d(`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`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,t),...r})}function N({className:e,...t}){return f(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:d(`w-full text-sm`,e),...t})}function P({className:e,...t}){return f(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:d(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function F({className:e,...t}){return f(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:d(`group/menu-item relative`,e),...t})}const I=S([`peer/menu-button`,`cursor-pointer`,`flex w-full items-center gap-2`,`overflow-hidden rounded-md p-2 outline-hidden`,`truncate text-left font-normal`,`transition-[color,width,height,padding]`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`disabled:pointer-events-none`,`disabled:opacity-50`,`group-has-data-[sidebar=menu-action]/menu-item:pr-8`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`data-[active=true]:bg-sidebar-primary-muted`,`data-[active=true]:text-sidebar-primary`,`data-[state=open]:hover:bg-sidebar-accent`,`data-[state=open]:hover:text-sidebar-accent-foreground`,`group-data-[collapsible=icon]:size-12!`,`group-data-[collapsible=icon]:p-3!`,`group-data-[collapsible=icon]:gap-3!`,`[&>svg]:size-6`,`[&>svg]:shrink-0`,`[&>span:last-child]:truncate`],{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function L({asChild:t=!1,isActive:i=!1,variant:o=`default`,size:s=`default`,tooltip:c,className:l,...u}){let m=t?e:`button`,{isMobile:h,state:g}=T(),_=f(m,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":s,"data-active":i,className:d(I({variant:o,size:s}),l),...u});return c?(typeof c==`string`&&(c={children:c}),p(a,{children:[f(n,{asChild:!0,children:_}),f(r,{side:`right`,align:`center`,hidden:g!==`collapsed`||h,...c})]})):_}const R=()=>{let{toggleSidebar:e}=T();return p(`header`,{"data-slot":`payment-layout-header`,className:d(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[p(t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:`size-10 rounded-full transition-all hover:text-text-positive`,onClick:t=>{t.preventDefault(),t.stopPropagation(),e()},children:[f(m,{className:`size-6!`}),f(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),p(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[f(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:f(h,{size:20})}),p(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[f(`span`,{className:`truncate font-medium`,children:`Lunas Enterprise`}),f(`span`,{className:`truncate text-xs`,children:`Established 2025`})]})]})]})},z=({activeNavItemId:e,sidebar:t,children:n})=>{let r=b(()=>t?.groupcontent||[],[t]);return p(E,{children:[f(R,{}),p(D,{variant:`inset`,collapsible:`icon`,children:[f(A,{children:r.map(t=>p(j,{children:[f(M,{children:t.label}),f(N,{children:f(P,{children:t.items.map(t=>f(F,{children:p(L,{isActive:t.id===e,onClick:e=>{t.onClick?.(),e.preventDefault(),e.stopPropagation()},children:[t.icon,t.label]})},t.id))})})]},t.id))}),f(k,{children:f(P,{children:f(F,{className:`mt-2 border-t border-t-border`,children:f(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})})})]}),f(O,{children:f(`section`,{className:`relative size-full`,children:f(`div`,{className:`absolute inset-0`,children:n})})})]})};export{z as PaymentLayout};
|
|
1
|
+
import{t as e}from"../../dist-D2ydYRc4.mjs";import"../../button.variants-DBOg9vCn.mjs";import{t}from"../../button-BlQN92Jt.mjs";import"../../skeleton-6MpPv0K3.mjs";import{i as n,n as r,r as i,t as a}from"../../tooltip-Dd1torAV.mjs";import"../../separator-CWar33xc.mjs";import{i as o,o as s,r as c,s as l,t as u}from"../../sheet-CUfrx04D.mjs";import"../../input-DhoSwu7d.mjs";import{cn as d}from"@customafk/react-toolkit/utils";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{MenuIcon as m,ShoppingCartIcon as h}from"lucide-react";import{createContext as g,useCallback as _,useContext as v,useEffect as y,useMemo as b,useState as x}from"react";import{cva as S}from"class-variance-authority";import{useIsMobile as C}from"@customafk/react-toolkit/hooks/useMobile";const w=g(null);function T(){let e=v(w);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function E({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...s}){let c=C(),[l,u]=x(!1),[p,m]=x(e),h=t??p,g=_(e=>{let t=typeof e==`function`?e(h):e;n?n(t):m(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,h]),v=_(()=>c?u(e=>!e):g(e=>!e),[c,g]);y(()=>{let e=e=>{e.key===`b`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),v())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v]);let S=h?`expanded`:`collapsed`,T=b(()=>({state:S,open:h,setOpen:g,isMobile:c,openMobile:l,setOpenMobile:u,toggleSidebar:v}),[S,h,g,c,l,v]);return f(w.Provider,{value:T,children:f(i,{delayDuration:0,children:f(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...a},className:d(`group/sidebar-wrapper flex h-dvh w-full`,r),...s,children:o})})})}function D({side:e=`left`,variant:n=`sidebar`,collapsible:r=`offcanvas`,className:i,children:a,...g}){let{isMobile:_,state:v,openMobile:y,setOpenMobile:b,toggleSidebar:x}=T();return r===`none`?f(`aside`,{"data-slot":`sidebar`,className:d(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,i),...g,children:a}):_?f(u,{open:y,onOpenChange:b,...g,children:p(c,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:max-w-3xs [&>button]:hidden`,style:{"--sidebar-width":`18rem`},side:e,children:[p(s,{className:`sr-only`,children:[f(l,{children:`Sidebar`}),f(o,{children:`Displays the mobile sidebar.`})]}),p(`div`,{className:`flex size-full flex-col`,children:[p(`div`,{className:`flex flex-0 items-center gap-x-2 border-border-weak border-b p-2 pr-4`,children:[p(t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:d(`size-10 rounded-full`,i),onClick:e=>{x(),e.preventDefault(),e.stopPropagation()},children:[f(m,{className:`size-6!`}),f(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),f(`div`,{className:`ml-2 flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:f(h,{size:20})}),p(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[f(`span`,{className:`truncate font-medium`,children:`Lunas Store`}),f(`span`,{className:`truncate text-xs`,children:`Established 2023`})]})]}),f(`div`,{className:`flex flex-1 flex-col p-2`,children:a})]})]})}):p(`aside`,{className:`group peer hidden bg-card text-sidebar-foreground md:block`,"data-state":v,"data-collapsible":v===`collapsed`?r:``,"data-variant":n,"data-side":e,"data-slot":`sidebar`,children:[f(`div`,{"data-slot":`sidebar-gap`,className:d(`relative`,`bg-transparent`,`transition-[width] duration-200 ease-linear`,`h-(--header-height) w-(--sidebar-width)`,`sm:h-[calc(var(--header-height)+0.5rem)]`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,n===`floating`||n===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),f(`div`,{"data-slot":`sidebar-container`,className:d(`hidden md:flex`,`fixed inset-y-0 top-14 z-10 shadow-nav`,`h-[calc(100dvh-3.5rem)] w-(--sidebar-width)`,`transition-[left,right,width] duration-200 ease-linear`,e===`left`&&`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`,e===`right`&&`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,n===`floating`||n===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,i),...g,children:f(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:d(`flex size-full flex-col`,`group-data-[variant=floating]:rounded-lg`,`group-data-[variant=floating]:border`,`group-data-[variant=floating]:border-sidebar-border`,`group-data-[variant=floating]:shadow-sm`),children:a})})]})}function O({className:e,children:t,...n}){return p(`main`,{"data-slot":`sidebar-inset`,className:d(`relative flex w-full flex-1 flex-col`,e),...n,children:[f(`div`,{className:`h-(--header-height) w-full sm:h-[calc(var(--header-height)+0.5rem)]`}),f(`div`,{className:`inset-shadow-sm flex-1`,children:t})]})}function k({className:e,...t}){return f(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:d(`flex flex-col gap-2 p-2`,e),...t})}function A({className:e,...t}){return f(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:d(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function j({className:e,...t}){return f(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:d(`relative flex w-full min-w-0 flex-col`,e),...t})}function M({className:t,asChild:n=!1,...r}){return f(n?e:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:d(`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`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,t),...r})}function N({className:e,...t}){return f(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:d(`w-full text-sm`,e),...t})}function P({className:e,...t}){return f(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:d(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function F({className:e,...t}){return f(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:d(`group/menu-item relative`,e),...t})}const I=S([`peer/menu-button`,`cursor-pointer`,`flex w-full items-center gap-2`,`overflow-hidden rounded-md p-2 outline-hidden`,`truncate text-left font-normal`,`transition-[color,width,height,padding]`,`hover:bg-sidebar-accent`,`hover:text-sidebar-accent-foreground`,`active:bg-sidebar-accent`,`active:text-sidebar-accent-foreground`,`disabled:pointer-events-none`,`disabled:opacity-50`,`group-has-data-[sidebar=menu-action]/menu-item:pr-8`,`aria-disabled:pointer-events-none`,`aria-disabled:opacity-50`,`data-[active=true]:bg-sidebar-primary-muted`,`data-[active=true]:text-sidebar-primary`,`data-[state=open]:hover:bg-sidebar-accent`,`data-[state=open]:hover:text-sidebar-accent-foreground`,`group-data-[collapsible=icon]:size-12!`,`group-data-[collapsible=icon]:p-3!`,`group-data-[collapsible=icon]:gap-3!`,`[&>svg]:size-6`,`[&>svg]:shrink-0`,`[&>span:last-child]:truncate`],{variants:{variant:{default:`hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground/80`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-10 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function L({asChild:t=!1,isActive:i=!1,variant:o=`default`,size:s=`default`,tooltip:c,className:l,...u}){let m=t?e:`button`,{isMobile:h,state:g}=T(),_=f(m,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":s,"data-active":i,className:d(I({variant:o,size:s}),l),...u});return c?(typeof c==`string`&&(c={children:c}),p(a,{children:[f(n,{asChild:!0,children:_}),f(r,{side:`right`,align:`center`,hidden:g!==`collapsed`||h,...c})]})):_}const R=()=>{let{toggleSidebar:e}=T();return p(`header`,{"data-slot":`payment-layout-header`,className:d(`bg-card`,`h-(--header-height)`,`sm:h-[calc(var(--header-height)+0.5rem)] sm:px-4 sm:pr-6`,`absolute inset-x-0 top-0 z-20 gap-2 px-2 pr-4.5`,`flex items-center shadow-nav`,`transition-[width,height] ease-linear`),children:[p(t,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,color:`muted`,size:`icon`,className:`size-10 rounded-full transition-all hover:text-text-positive`,onClick:t=>{t.preventDefault(),t.stopPropagation(),e()},children:[f(m,{className:`size-6!`}),f(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]}),p(`div`,{className:`flex gap-x-2 sm:ml-2.5`,children:[f(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:f(h,{size:20})}),p(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[f(`span`,{className:`truncate font-medium`,children:`Lunas Enterprise`}),f(`span`,{className:`truncate text-xs`,children:`Established 2025`})]})]})]})},z=({activeNavItemId:e,sidebar:t,children:n})=>{let r=b(()=>t?.groupcontent||[],[t]);return p(E,{children:[f(R,{}),p(D,{variant:`inset`,collapsible:`icon`,children:[f(A,{children:r.map(t=>p(j,{children:[f(M,{children:t.label}),f(N,{children:f(P,{children:t.items.map(t=>f(F,{children:p(L,{isActive:t.id===e,onClick:e=>{t.onClick?.(),e.preventDefault(),e.stopPropagation()},children:[t.icon,t.label]})},t.id))})})]},t.id))}),f(k,{children:f(P,{children:f(F,{className:`mt-2 border-t border-t-border`,children:f(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})})})]}),f(O,{children:f(`section`,{className:`relative size-full`,children:f(`div`,{className:`absolute inset-0`,children:n})})})]})};export{z as PaymentLayout};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/pages/FeatureDeveloping.d.ts
|
|
4
4
|
interface FeatureDevelopingProps {
|
|
@@ -19,7 +19,7 @@ declare const FeatureDeveloping: ({
|
|
|
19
19
|
onButtonClick,
|
|
20
20
|
className,
|
|
21
21
|
iconClassName
|
|
22
|
-
}: FeatureDevelopingProps) =>
|
|
22
|
+
}: FeatureDevelopingProps) => react_jsx_runtime26.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { FeatureDeveloping, FeatureDeveloping as default, FeatureDevelopingProps };
|
|
25
25
|
//# sourceMappingURL=FeatureDeveloping.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime265 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/pages/FeatureDeveloping.d.ts
|
|
4
4
|
interface FeatureDevelopingProps {
|
|
@@ -19,7 +19,7 @@ declare const FeatureDeveloping: ({
|
|
|
19
19
|
onButtonClick,
|
|
20
20
|
className,
|
|
21
21
|
iconClassName
|
|
22
|
-
}: FeatureDevelopingProps) =>
|
|
22
|
+
}: FeatureDevelopingProps) => react_jsx_runtime265.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { FeatureDeveloping, FeatureDeveloping as default, FeatureDevelopingProps };
|
|
25
25
|
//# sourceMappingURL=FeatureDeveloping.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime27 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/pages/FeatureFixing.d.ts
|
|
4
4
|
interface FeatureFixingProps {
|
|
@@ -19,7 +19,7 @@ declare const FeatureFixing: ({
|
|
|
19
19
|
onButtonClick,
|
|
20
20
|
className,
|
|
21
21
|
iconClassName
|
|
22
|
-
}: FeatureFixingProps) =>
|
|
22
|
+
}: FeatureFixingProps) => react_jsx_runtime27.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { FeatureFixing, FeatureFixing as default, FeatureFixingProps };
|
|
25
25
|
//# sourceMappingURL=FeatureFixing.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime203 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/pages/FeatureFixing.d.ts
|
|
4
4
|
interface FeatureFixingProps {
|
|
@@ -19,7 +19,7 @@ declare const FeatureFixing: ({
|
|
|
19
19
|
onButtonClick,
|
|
20
20
|
className,
|
|
21
21
|
iconClassName
|
|
22
|
-
}: FeatureFixingProps) =>
|
|
22
|
+
}: FeatureFixingProps) => react_jsx_runtime203.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { FeatureFixing, FeatureFixing as default, FeatureFixingProps };
|
|
25
25
|
//# sourceMappingURL=FeatureFixing.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime31 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/pages/NotAuthorized.d.ts
|
|
4
4
|
interface NotAuthorizedProps {
|
|
@@ -19,7 +19,7 @@ declare const NotAuthorized: ({
|
|
|
19
19
|
onButtonClick,
|
|
20
20
|
className,
|
|
21
21
|
iconClassName
|
|
22
|
-
}: NotAuthorizedProps) =>
|
|
22
|
+
}: NotAuthorizedProps) => react_jsx_runtime31.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { NotAuthorized, NotAuthorized as default, NotAuthorizedProps };
|
|
25
25
|
//# sourceMappingURL=NotAuthorized.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime204 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/pages/NotAuthorized.d.ts
|
|
4
4
|
interface NotAuthorizedProps {
|
|
@@ -19,7 +19,7 @@ declare const NotAuthorized: ({
|
|
|
19
19
|
onButtonClick,
|
|
20
20
|
className,
|
|
21
21
|
iconClassName
|
|
22
|
-
}: NotAuthorizedProps) =>
|
|
22
|
+
}: NotAuthorizedProps) => react_jsx_runtime204.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { NotAuthorized, NotAuthorized as default, NotAuthorizedProps };
|
|
25
25
|
//# sourceMappingURL=NotAuthorized.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/pages/NotFound.d.ts
|
|
4
4
|
interface NotFoundProps {
|
|
@@ -19,7 +19,7 @@ declare const NotFound: ({
|
|
|
19
19
|
onButtonClick,
|
|
20
20
|
className,
|
|
21
21
|
iconClassName
|
|
22
|
-
}: NotFoundProps) =>
|
|
22
|
+
}: NotFoundProps) => react_jsx_runtime1.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { NotFound, NotFound as default, NotFoundProps };
|
|
25
25
|
//# sourceMappingURL=NotFound.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime162 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/pages/NotFound.d.ts
|
|
4
4
|
interface NotFoundProps {
|
|
@@ -19,7 +19,7 @@ declare const NotFound: ({
|
|
|
19
19
|
onButtonClick,
|
|
20
20
|
className,
|
|
21
21
|
iconClassName
|
|
22
|
-
}: NotFoundProps) =>
|
|
22
|
+
}: NotFoundProps) => react_jsx_runtime162.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { NotFound, NotFound as default, NotFoundProps };
|
|
25
25
|
//# sourceMappingURL=NotFound.d.mts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`@customafk/react-toolkit/utils`),n=require(`react/jsx-runtime`),r=require(`radix-ui`);function i({delayDuration:e=0,...t}){return(0,n.jsx)(r.Tooltip.Provider,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function a({...e}){return(0,n.jsx)(i,{children:(0,n.jsx)(r.Tooltip.Root,{"data-slot":`tooltip`,...e})})}function o({...e}){return(0,n.jsx)(r.Tooltip.Trigger,{"data-slot":`tooltip-trigger`,...e})}function s({className:e,sideOffset:i=0,children:a,...o}){return(0,n.jsx)(r.Tooltip.Portal,{children:(0,n.jsxs)(r.Tooltip.Content,{"data-slot":`tooltip-content`,sideOffset:i,className:(0,t.cn)(`bg-secondary-strong text-text-negative-weak shadow-dropdown outline-none`,`fade-in-0 zoom-in-95 animate-in`,`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`,`z-50 w-fit`,`origin-(--radix-tooltip-content-transform-origin)`,`text-balance rounded-
|
|
2
|
-
//# sourceMappingURL=tooltip-
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`@customafk/react-toolkit/utils`),n=require(`react/jsx-runtime`),r=require(`radix-ui`);function i({delayDuration:e=0,...t}){return(0,n.jsx)(r.Tooltip.Provider,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function a({...e}){return(0,n.jsx)(i,{children:(0,n.jsx)(r.Tooltip.Root,{"data-slot":`tooltip`,...e})})}function o({...e}){return(0,n.jsx)(r.Tooltip.Trigger,{"data-slot":`tooltip-trigger`,...e})}function s({className:e,sideOffset:i=0,children:a,...o}){return(0,n.jsx)(r.Tooltip.Portal,{children:(0,n.jsxs)(r.Tooltip.Content,{"data-slot":`tooltip-content`,sideOffset:i,className:(0,t.cn)(`bg-secondary-strong text-text-negative-weak shadow-dropdown outline-none`,`fade-in-0 zoom-in-95 animate-in`,`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`,`z-50 w-fit`,`origin-(--radix-tooltip-content-transform-origin)`,`text-balance rounded-sm px-3 py-1.5 text-xs`,e),...o,children:[a,(0,n.jsx)(r.Tooltip.Arrow,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-secondary-strong fill-secondary-strong`})]})})}Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
2
|
+
//# sourceMappingURL=tooltip-DMFoP_sB.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-
|
|
1
|
+
{"version":3,"file":"tooltip-DMFoP_sB.cjs","names":["TooltipPrimitive"],"sources":["../packages/components/ui/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Tooltip as TooltipPrimitive } from 'radix-ui';\n\nfunction TooltipProvider({ delayDuration = 0, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return <TooltipPrimitive.Provider data-slot=\"tooltip-provider\" delayDuration={delayDuration} {...props} />;\n}\n\nfunction Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n </TooltipProvider>\n );\n}\n\nfunction TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({ className, sideOffset = 0, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-secondary-strong text-text-negative-weak shadow-dropdown outline-none',\n 'fade-in-0 zoom-in-95 animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\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 'z-50 w-fit',\n 'origin-(--radix-tooltip-content-transform-origin)',\n 'text-balance rounded-sm px-3 py-1.5 text-xs',\n className\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-secondary-strong fill-secondary-strong\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };\n"],"mappings":"6IAMA,SAAS,EAAgB,CAAE,gBAAgB,EAAG,GAAG,GAAiE,CAChH,OAAO,EAAA,EAAA,KAACA,EAAAA,QAAiB,SAAA,CAAS,YAAU,mBAAkC,gBAAe,GAAI,GAAS,CAG5G,SAAS,EAAQ,CAAE,GAAG,GAA6D,CACjF,OACE,EAAA,EAAA,KAAC,EAAA,CAAA,UACC,EAAA,EAAA,KAACA,EAAAA,QAAiB,KAAA,CAAK,YAAU,UAAU,GAAI,GAAS,CAAA,CACxC,CAItB,SAAS,EAAe,CAAE,GAAG,GAAgE,CAC3F,OAAO,EAAA,EAAA,KAACA,EAAAA,QAAiB,QAAA,CAAQ,YAAU,kBAAkB,GAAI,GAAS,CAG5E,SAAS,EAAe,CAAE,YAAW,aAAa,EAAG,WAAU,GAAG,GAAgE,CAChI,OACE,EAAA,EAAA,KAACA,EAAAA,QAAiB,OAAA,CAAA,UAChB,EAAA,EAAA,MAACA,EAAAA,QAAiB,QAAA,CAChB,YAAU,kBACE,aACZ,WAAA,EAAA,EAAA,IACE,2EACA,kCACA,kCACA,iCACA,kCACA,yCACA,yCACA,yCACA,yCACA,aACA,oDACA,8CACA,EACD,CACD,GAAI,YAEH,GACD,EAAA,EAAA,KAACA,EAAAA,QAAiB,MAAA,CAAM,UAAU,+GAAA,CAAiH,CAAA,EAC1H,CAAA,CACH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as e}from"@customafk/react-toolkit/utils";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{Tooltip as r}from"radix-ui";function i({delayDuration:e=0,...n}){return t(r.Provider,{"data-slot":`tooltip-provider`,delayDuration:e,...n})}function a({...e}){return t(i,{children:t(r.Root,{"data-slot":`tooltip`,...e})})}function o({...e}){return t(r.Trigger,{"data-slot":`tooltip-trigger`,...e})}function s({className:i,sideOffset:a=0,children:o,...s}){return t(r.Portal,{children:n(r.Content,{"data-slot":`tooltip-content`,sideOffset:a,className:e(`bg-secondary-strong text-text-negative-weak shadow-dropdown outline-none`,`fade-in-0 zoom-in-95 animate-in`,`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`,`z-50 w-fit`,`origin-(--radix-tooltip-content-transform-origin)`,`text-balance rounded-
|
|
2
|
-
//# sourceMappingURL=tooltip-
|
|
1
|
+
import{cn as e}from"@customafk/react-toolkit/utils";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{Tooltip as r}from"radix-ui";function i({delayDuration:e=0,...n}){return t(r.Provider,{"data-slot":`tooltip-provider`,delayDuration:e,...n})}function a({...e}){return t(i,{children:t(r.Root,{"data-slot":`tooltip`,...e})})}function o({...e}){return t(r.Trigger,{"data-slot":`tooltip-trigger`,...e})}function s({className:i,sideOffset:a=0,children:o,...s}){return t(r.Portal,{children:n(r.Content,{"data-slot":`tooltip-content`,sideOffset:a,className:e(`bg-secondary-strong text-text-negative-weak shadow-dropdown outline-none`,`fade-in-0 zoom-in-95 animate-in`,`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`,`z-50 w-fit`,`origin-(--radix-tooltip-content-transform-origin)`,`text-balance rounded-sm px-3 py-1.5 text-xs`,i),...s,children:[o,t(r.Arrow,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-secondary-strong fill-secondary-strong`})]})})}export{o as i,s as n,i as r,a as t};
|
|
2
|
+
//# sourceMappingURL=tooltip-Dd1torAV.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-
|
|
1
|
+
{"version":3,"file":"tooltip-Dd1torAV.mjs","names":["TooltipPrimitive","Tooltip"],"sources":["../packages/components/ui/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Tooltip as TooltipPrimitive } from 'radix-ui';\n\nfunction TooltipProvider({ delayDuration = 0, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return <TooltipPrimitive.Provider data-slot=\"tooltip-provider\" delayDuration={delayDuration} {...props} />;\n}\n\nfunction Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n </TooltipProvider>\n );\n}\n\nfunction TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({ className, sideOffset = 0, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-secondary-strong text-text-negative-weak shadow-dropdown outline-none',\n 'fade-in-0 zoom-in-95 animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\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 'z-50 w-fit',\n 'origin-(--radix-tooltip-content-transform-origin)',\n 'text-balance rounded-sm px-3 py-1.5 text-xs',\n className\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-secondary-strong fill-secondary-strong\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };\n"],"mappings":"yIAMA,SAAS,EAAgB,CAAE,gBAAgB,EAAG,GAAG,GAAiE,CAChH,OAAO,EAACA,EAAiB,SAAA,CAAS,YAAU,mBAAkC,gBAAe,GAAI,GAAS,CAG5G,SAASC,EAAQ,CAAE,GAAG,GAA6D,CACjF,OACE,EAAC,EAAA,CAAA,SACC,EAACD,EAAiB,KAAA,CAAK,YAAU,UAAU,GAAI,GAAS,CAAA,CACxC,CAItB,SAAS,EAAe,CAAE,GAAG,GAAgE,CAC3F,OAAO,EAACA,EAAiB,QAAA,CAAQ,YAAU,kBAAkB,GAAI,GAAS,CAG5E,SAAS,EAAe,CAAE,YAAW,aAAa,EAAG,WAAU,GAAG,GAAgE,CAChI,OACE,EAACA,EAAiB,OAAA,CAAA,SAChB,EAACA,EAAiB,QAAA,CAChB,YAAU,kBACE,aACZ,UAAW,EACT,2EACA,kCACA,kCACA,iCACA,kCACA,yCACA,yCACA,yCACA,yCACA,aACA,oDACA,8CACA,EACD,CACD,GAAI,YAEH,EACD,EAACA,EAAiB,MAAA,CAAM,UAAU,+GAAA,CAAiH,CAAA,EAC1H,CAAA,CACH"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime30 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/typography/paragraph.d.ts
|
|
4
4
|
type Props = {
|
|
@@ -10,7 +10,7 @@ declare const Paragraph: ({
|
|
|
10
10
|
variant,
|
|
11
11
|
className,
|
|
12
12
|
children
|
|
13
|
-
}: Props) =>
|
|
13
|
+
}: Props) => react_jsx_runtime30.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Paragraph };
|
|
16
16
|
//# sourceMappingURL=paragraph.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime183 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/typography/paragraph.d.ts
|
|
4
4
|
type Props = {
|
|
@@ -10,7 +10,7 @@ declare const Paragraph: ({
|
|
|
10
10
|
variant,
|
|
11
11
|
className,
|
|
12
12
|
children
|
|
13
|
-
}: Props) =>
|
|
13
|
+
}: Props) => react_jsx_runtime183.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Paragraph };
|
|
16
16
|
//# sourceMappingURL=paragraph.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime29 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/typography/title.d.ts
|
|
4
4
|
type Props = {
|
|
@@ -10,7 +10,7 @@ declare const Title: ({
|
|
|
10
10
|
level,
|
|
11
11
|
className,
|
|
12
12
|
children
|
|
13
|
-
}: Props) =>
|
|
13
|
+
}: Props) => react_jsx_runtime29.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Title };
|
|
16
16
|
//# sourceMappingURL=title.d.cts.map
|