@customafk/lunas-ui 0.2.81 → 0.2.82
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/{analysis-panel-DYF2CmAH.cjs → analysis-panel-BoKjkPYz.cjs} +2 -2
- package/dist/{analysis-panel-DYF2CmAH.cjs.map → analysis-panel-BoKjkPYz.cjs.map} +1 -1
- package/dist/{analysis-panel-_s1fgcZC.mjs → analysis-panel-CZ8g9AAO.mjs} +2 -2
- package/dist/{analysis-panel-_s1fgcZC.mjs.map → analysis-panel-CZ8g9AAO.mjs.map} +1 -1
- package/dist/{badge-C_KLKwiS.d.cts → badge-BPiU1Ss2.d.cts} +2 -2
- package/dist/{badge-C_KLKwiS.d.mts → badge-BPiU1Ss2.d.mts} +2 -2
- package/dist/{badge-display-D6d7wTEE.mjs → badge-display-B5m09_Hs.mjs} +2 -2
- package/dist/{badge-display-D6d7wTEE.mjs.map → badge-display-B5m09_Hs.mjs.map} +1 -1
- package/dist/{badge-display-DWzSl3rs.cjs → badge-display-DHbCN998.cjs} +2 -2
- package/dist/{badge-display-DWzSl3rs.cjs.map → badge-display-DHbCN998.cjs.map} +1 -1
- package/dist/{boolean-display-Wko_5Jd5.mjs → boolean-display-CzHHDfHW.mjs} +2 -2
- package/dist/{boolean-display-Wko_5Jd5.mjs.map → boolean-display-CzHHDfHW.mjs.map} +1 -1
- package/dist/{boolean-display-C5GIuWnc.cjs → boolean-display-D2wjQhNX.cjs} +2 -2
- package/dist/{boolean-display-C5GIuWnc.cjs.map → boolean-display-D2wjQhNX.cjs.map} +1 -1
- package/dist/{button-CnKmz4qM.d.cts → button-BnoPktln.d.cts} +3 -3
- package/dist/{button-CnKmz4qM.d.mts → button-BnoPktln.d.mts} +3 -3
- package/dist/{calendar-BT6-Fo3T.d.mts → calendar-BkV5hTX2.d.mts} +2 -2
- package/dist/{calendar-D_QmR9VE.d.cts → calendar-iDMPT1kI.d.cts} +2 -2
- package/dist/{carousel-BBI4xPdK.d.mts → carousel-D7VXWJ3S.d.mts} +2 -2
- package/dist/{carousel-B_IXlBdH.d.cts → carousel-bBvM31sh.d.cts} +2 -2
- package/dist/currency-display-7w-ZjVUw.mjs +2 -0
- package/dist/currency-display-7w-ZjVUw.mjs.map +1 -0
- package/dist/currency-display-B06kc2IG.cjs +2 -0
- package/dist/currency-display-B06kc2IG.cjs.map +1 -0
- package/dist/{date-display-DXyb-Ai2.mjs → date-display-BO7OY_AC.mjs} +2 -2
- package/dist/{date-display-DXyb-Ai2.mjs.map → date-display-BO7OY_AC.mjs.map} +1 -1
- package/dist/{date-display-D38qvsh2.cjs → date-display-DHnZr_yf.cjs} +2 -2
- package/dist/{date-display-D38qvsh2.cjs.map → date-display-DHnZr_yf.cjs.map} +1 -1
- package/dist/{description-display-BwBMrRAi.mjs → description-display-CBfoP3Y2.mjs} +2 -2
- package/dist/{description-display-BwBMrRAi.mjs.map → description-display-CBfoP3Y2.mjs.map} +1 -1
- package/dist/{description-display-DIeHy7ll.cjs → description-display-Cckihd1s.cjs} +2 -2
- package/dist/{description-display-DIeHy7ll.cjs.map → description-display-Cckihd1s.cjs.map} +1 -1
- package/dist/dialogs/detail-dialog/components/sidebar.d.cts +1 -1
- package/dist/dialogs/detail-dialog/components/sidebar.d.mts +1 -1
- package/dist/dialogs/side-panel.cjs +2 -0
- package/dist/dialogs/side-panel.cjs.map +1 -0
- package/dist/dialogs/side-panel.d.cts +2 -0
- package/dist/dialogs/side-panel.d.mts +2 -0
- package/dist/dialogs/side-panel.mjs +2 -0
- package/dist/dialogs/side-panel.mjs.map +1 -0
- package/dist/{email-display-Be3b-kDL.mjs → email-display-Bk_furIx.mjs} +2 -2
- package/dist/{email-display-Be3b-kDL.mjs.map → email-display-Bk_furIx.mjs.map} +1 -1
- package/dist/{email-display-_FRE2qcO.cjs → email-display-w-hRYIeL.cjs} +2 -2
- package/dist/{email-display-_FRE2qcO.cjs.map → email-display-w-hRYIeL.cjs.map} +1 -1
- package/dist/features/descriptions/index.d.cts +1 -1
- package/dist/features/descriptions/index.d.mts +1 -1
- package/dist/features/tables/index.cjs +1 -1
- package/dist/features/tables/index.d.cts +1 -1
- package/dist/features/tables/index.d.mts +1 -1
- package/dist/features/tables/index.mjs +1 -1
- package/dist/{filter-C2wE49q7.mjs → filter-BO7ISTIR.mjs} +2 -2
- package/dist/{filter-C2wE49q7.mjs.map → filter-BO7ISTIR.mjs.map} +1 -1
- package/dist/{filter-z7p4lRp8.cjs → filter-CQ9BD0MV.cjs} +2 -2
- package/dist/{filter-z7p4lRp8.cjs.map → filter-CQ9BD0MV.cjs.map} +1 -1
- package/dist/{flex-CIzZIICK.d.cts → flex-CrxTaAXE.d.cts} +2 -2
- package/dist/{flex-CIzZIICK.d.mts → flex-CrxTaAXE.d.mts} +2 -2
- package/dist/{index-BSj8azta.d.cts → index-BMuVmm7f.d.mts} +2 -2
- package/dist/{index-CjiDR-94.d.mts → index-BPo-Lg3p.d.mts} +15 -12
- package/dist/{index-CEmVk1zP.d.mts → index-CLx89ATZ.d.cts} +2 -2
- package/dist/{index-DqAbPipJ.d.cts → index-DaLpXe5l.d.cts} +15 -12
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +13 -11
- package/dist/index.d.mts +13 -11
- package/dist/index.mjs +1 -1
- package/dist/layouts/flex.d.cts +1 -1
- package/dist/layouts/flex.d.mts +1 -1
- package/dist/layouts/ui-grid.cjs +2 -0
- package/dist/layouts/ui-grid.cjs.map +1 -0
- package/dist/layouts/ui-grid.d.cts +2 -0
- package/dist/layouts/ui-grid.d.mts +2 -0
- package/dist/layouts/ui-grid.mjs +2 -0
- package/dist/layouts/ui-grid.mjs.map +1 -0
- package/dist/{list-display-BvKGl7uq.cjs → list-display-DDeJoneW.cjs} +2 -2
- package/dist/{list-display-BvKGl7uq.cjs.map → list-display-DDeJoneW.cjs.map} +1 -1
- package/dist/{list-display-CWQvIMUj.mjs → list-display-DLsm8uAh.mjs} +2 -2
- package/dist/{list-display-CWQvIMUj.mjs.map → list-display-DLsm8uAh.mjs.map} +1 -1
- package/dist/{name-display-DfOtYp7d.cjs → name-display-CKnyugrP.cjs} +2 -2
- package/dist/{name-display-DfOtYp7d.cjs.map → name-display-CKnyugrP.cjs.map} +1 -1
- package/dist/{name-display-CnTRVqX4.mjs → name-display-H5HFH1fU.mjs} +2 -2
- package/dist/{name-display-CnTRVqX4.mjs.map → name-display-H5HFH1fU.mjs.map} +1 -1
- package/dist/{pagination-AxRzmAtZ.d.cts → pagination-BRw-yZBY.d.cts} +2 -2
- package/dist/{pagination-D12pR8_5.d.mts → pagination-BlLiOvY9.d.mts} +2 -2
- package/dist/{paragraph-C5HE9u0Q.d.mts → paragraph-CRo5eC7H.d.mts} +2 -2
- package/dist/{paragraph-DJlHIDmk.d.cts → paragraph-CkCNIsvz.d.cts} +2 -2
- package/dist/{permalink-DhqOATLQ.mjs → permalink-CaCx9fi6.mjs} +2 -2
- package/dist/{permalink-DhqOATLQ.mjs.map → permalink-CaCx9fi6.mjs.map} +1 -1
- package/dist/{permalink-29QzG9Xe.cjs → permalink-azuGQg2b.cjs} +2 -2
- package/dist/{permalink-29QzG9Xe.cjs.map → permalink-azuGQg2b.cjs.map} +1 -1
- package/dist/{phone-number-CQXrATQO.mjs → phone-number-Ba-f4s1Y.mjs} +2 -2
- package/dist/{phone-number-CQXrATQO.mjs.map → phone-number-Ba-f4s1Y.mjs.map} +1 -1
- package/dist/{phone-number-C2k8llhf.cjs → phone-number-BqRhKQdr.cjs} +2 -2
- package/dist/{phone-number-C2k8llhf.cjs.map → phone-number-BqRhKQdr.cjs.map} +1 -1
- package/dist/{progress-display-DZb1qjfY.mjs → progress-display-0UsBzt_r.mjs} +2 -2
- package/dist/{progress-display-DZb1qjfY.mjs.map → progress-display-0UsBzt_r.mjs.map} +1 -1
- package/dist/{progress-display-B4WVzdJw.cjs → progress-display-CiYWPOnq.cjs} +2 -2
- package/dist/{progress-display-B4WVzdJw.cjs.map → progress-display-CiYWPOnq.cjs.map} +1 -1
- package/dist/{resizable-D61lvcIL.d.cts → resizable-C3uADYIg.d.cts} +2 -2
- package/dist/{resizable-D61lvcIL.d.mts → resizable-C3uADYIg.d.mts} +2 -2
- package/dist/side-panel-DPrM5ygG.d.cts +86 -0
- package/dist/side-panel-DPrM5ygG.d.mts +86 -0
- package/dist/statistic-639yMA2d.mjs +2 -0
- package/dist/statistic-639yMA2d.mjs.map +1 -0
- package/dist/statistic-CE_Jg8SN.cjs +2 -0
- package/dist/statistic-CE_Jg8SN.cjs.map +1 -0
- package/dist/{status-display-CcihiYsH.mjs → status-display-BCYpNJmd.mjs} +2 -2
- package/dist/{status-display-CcihiYsH.mjs.map → status-display-BCYpNJmd.mjs.map} +1 -1
- package/dist/{status-display-DJ8fFqyX.cjs → status-display-xcCCGpGS.cjs} +2 -2
- package/dist/{status-display-DJ8fFqyX.cjs.map → status-display-xcCCGpGS.cjs.map} +1 -1
- package/dist/{summary-bar-DK8glsr4.cjs → summary-bar-C08g8bb1.cjs} +2 -2
- package/dist/{summary-bar-DK8glsr4.cjs.map → summary-bar-C08g8bb1.cjs.map} +1 -1
- package/dist/{summary-bar-C4loKj1L.mjs → summary-bar-C3NAnI3V.mjs} +2 -2
- package/dist/{summary-bar-C4loKj1L.mjs.map → summary-bar-C3NAnI3V.mjs.map} +1 -1
- package/dist/tables-BqZ4Zs6e.cjs +2 -0
- package/dist/tables-BqZ4Zs6e.cjs.map +1 -0
- package/dist/tables-Dg3KMBKA.mjs +2 -0
- package/dist/tables-Dg3KMBKA.mjs.map +1 -0
- package/dist/{tooltip-CLjCwnTD.cjs → tooltip-BVzKgxrZ.cjs} +3 -3
- package/dist/{tooltip-CLjCwnTD.cjs.map → tooltip-BVzKgxrZ.cjs.map} +1 -1
- package/dist/{tooltip-BKcU3bMc.mjs → tooltip-D7U_Nl5c.mjs} +3 -3
- package/dist/{tooltip-BKcU3bMc.mjs.map → tooltip-D7U_Nl5c.mjs.map} +1 -1
- package/dist/typography/paragraph.d.cts +1 -1
- package/dist/typography/paragraph.d.mts +1 -1
- package/dist/ui/alert-dialog.cjs +1 -1
- package/dist/ui/alert-dialog.cjs.map +1 -1
- package/dist/ui/alert-dialog.mjs +1 -1
- package/dist/ui/alert-dialog.mjs.map +1 -1
- package/dist/ui/badge.d.cts +1 -1
- package/dist/ui/badge.d.mts +1 -1
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.mts +1 -1
- package/dist/ui/calendar.d.cts +1 -1
- package/dist/ui/calendar.d.mts +1 -1
- package/dist/ui/carousel.d.cts +1 -1
- package/dist/ui/carousel.d.mts +1 -1
- package/dist/ui/dialog.cjs +1 -1
- package/dist/ui/dialog.cjs.map +1 -1
- package/dist/ui/dialog.mjs +1 -1
- package/dist/ui/dialog.mjs.map +1 -1
- package/dist/ui/pagination.d.cts +1 -1
- package/dist/ui/pagination.d.mts +1 -1
- package/dist/ui/resizable.d.cts +1 -1
- package/dist/ui/resizable.d.mts +1 -1
- package/dist/ui/sheet.cjs +1 -1
- package/dist/ui/sheet.cjs.map +1 -1
- package/dist/ui/sheet.mjs +1 -1
- package/dist/ui/sheet.mjs.map +1 -1
- package/dist/ui-grid-CzL5J7cm.d.cts +128 -0
- package/dist/ui-grid-CzL5J7cm.d.mts +128 -0
- package/package.json +9 -1
- package/dist/currency-display-BGkpGtN_.mjs +0 -2
- package/dist/currency-display-BGkpGtN_.mjs.map +0 -1
- package/dist/currency-display-Bbh5InhV.cjs +0 -2
- package/dist/currency-display-Bbh5InhV.cjs.map +0 -1
- package/dist/statistic-DoNUSe3e.mjs +0 -2
- package/dist/statistic-DoNUSe3e.mjs.map +0 -1
- package/dist/statistic-wnnjHsKj.cjs +0 -2
- package/dist/statistic-wnnjHsKj.cjs.map +0 -1
- package/dist/tables-BTBtN1di.mjs +0 -2
- package/dist/tables-BTBtN1di.mjs.map +0 -1
- package/dist/tables-BzP8Cnvh.cjs +0 -2
- package/dist/tables-BzP8Cnvh.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.mjs","names":["AlertDialogPrimitive"],"sources":["../../packages/components/ui/alert-dialog.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { AlertDialog as AlertDialogPrimitive } from 'radix-ui';\nimport { headingVariants } from '../typography/heading';\nimport { paragraphVariants } from '../typography/paragraph';\nimport { buttonVariants } from './button.variants';\n\n/**\n * Accessible alert dialog built on Radix UI's AlertDialog primitives, requiring explicit user confirmation before a destructive action can proceed.\n *\n * @example\n * ```tsx\n * import {\n * AlertDialog, AlertDialogTrigger, AlertDialogContent,\n * AlertDialogHeader, AlertDialogTitle, AlertDialogDescription,\n * AlertDialogFooter, AlertDialogAction, AlertDialogCancel,\n * } from '@customafk/lunas-ui/ui/alert-dialog';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <AlertDialog>\n * <AlertDialogTrigger asChild>\n * <Button variant=\"solid\" color=\"danger\">Delete account</Button>\n * </AlertDialogTrigger>\n * <AlertDialogContent>\n * <AlertDialogHeader>\n * <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>\n * <AlertDialogDescription>\n * This action cannot be undone. Your account will be permanently deleted.\n * </AlertDialogDescription>\n * </AlertDialogHeader>\n * <AlertDialogFooter>\n * <AlertDialogCancel>Cancel</AlertDialogCancel>\n * <AlertDialogAction>Continue</AlertDialogAction>\n * </AlertDialogFooter>\n * </AlertDialogContent>\n * </AlertDialog>\n * ```\n */\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\n/** Element that opens the alert dialog when clicked; typically wrapped with `asChild` around a `Button`. */\nfunction AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\n/** Renders alert dialog overlay and content into a portal outside the normal React tree. */\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the alert dialog panel; pointer events are disabled to prevent accidental dismissal. */\nfunction AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n style={{ pointerEvents: 'none' }}\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/** Animated panel that contains the alert dialog body; renders via `AlertDialogPortal` over `AlertDialogOverlay`. */\nfunction AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'bg-background',\n 'fixed z-50',\n '-translate-1/2 top-1/2 left-1/2',\n 'grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg',\n 'gap-4 rounded-lg p-6 shadow-lg duration-200',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n );\n}\n\n/** Layout wrapper for the alert dialog title and description. */\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"alert-dialog-header\" className={cn('flex flex-col gap-
|
|
1
|
+
{"version":3,"file":"alert-dialog.mjs","names":["AlertDialogPrimitive"],"sources":["../../packages/components/ui/alert-dialog.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { AlertDialog as AlertDialogPrimitive } from 'radix-ui';\nimport { headingVariants } from '../typography/heading';\nimport { paragraphVariants } from '../typography/paragraph';\nimport { buttonVariants } from './button.variants';\n\n/**\n * Accessible alert dialog built on Radix UI's AlertDialog primitives, requiring explicit user confirmation before a destructive action can proceed.\n *\n * @example\n * ```tsx\n * import {\n * AlertDialog, AlertDialogTrigger, AlertDialogContent,\n * AlertDialogHeader, AlertDialogTitle, AlertDialogDescription,\n * AlertDialogFooter, AlertDialogAction, AlertDialogCancel,\n * } from '@customafk/lunas-ui/ui/alert-dialog';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <AlertDialog>\n * <AlertDialogTrigger asChild>\n * <Button variant=\"solid\" color=\"danger\">Delete account</Button>\n * </AlertDialogTrigger>\n * <AlertDialogContent>\n * <AlertDialogHeader>\n * <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>\n * <AlertDialogDescription>\n * This action cannot be undone. Your account will be permanently deleted.\n * </AlertDialogDescription>\n * </AlertDialogHeader>\n * <AlertDialogFooter>\n * <AlertDialogCancel>Cancel</AlertDialogCancel>\n * <AlertDialogAction>Continue</AlertDialogAction>\n * </AlertDialogFooter>\n * </AlertDialogContent>\n * </AlertDialog>\n * ```\n */\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\n/** Element that opens the alert dialog when clicked; typically wrapped with `asChild` around a `Button`. */\nfunction AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\n/** Renders alert dialog overlay and content into a portal outside the normal React tree. */\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the alert dialog panel; pointer events are disabled to prevent accidental dismissal. */\nfunction AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n style={{ pointerEvents: 'none' }}\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/** Animated panel that contains the alert dialog body; renders via `AlertDialogPortal` over `AlertDialogOverlay`. */\nfunction AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'bg-background',\n 'fixed z-50',\n '-translate-1/2 top-1/2 left-1/2',\n 'grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg',\n 'gap-4 rounded-lg p-6 shadow-lg duration-200',\n 'data-[state=open]:animate-in',\n 'data-[state=open]:fade-in-0',\n 'data-[state=open]:zoom-in-95',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=closed]:zoom-out-95',\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n );\n}\n\n/** Layout wrapper for the alert dialog title and description. */\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"alert-dialog-header\" className={cn('flex flex-col gap-1 text-center sm:text-left', className)} {...props} />;\n}\n\n/** Layout wrapper for the cancel and action buttons at the bottom of the alert dialog. */\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"alert-dialog-footer\" className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />;\n}\n\n/** Accessible heading for the alert dialog, styled with the h3 heading variant. */\nfunction AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return <AlertDialogPrimitive.Title data-slot=\"alert-dialog-title\" className={cn(headingVariants({ level: 'h3' }), className)} {...props} />;\n}\n\n/** Muted supporting text that explains the consequences of the destructive action. */\nfunction AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(paragraphVariants({ variant: 'muted' }), 'not-first:mt-0 md:text-sm', className)}\n {...props}\n />\n );\n}\n\n/** Confirm button that closes the dialog and proceeds with the action; auto-focused and styled as the primary action. */\nfunction AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n return <AlertDialogPrimitive.Action className={cn(buttonVariants(), 'min-w-24', className)} {...props} autoFocus tabIndex={1} />;\n}\n\n/** Cancel button that closes the alert dialog without performing the destructive action. */\nfunction AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return <AlertDialogPrimitive.Cancel className={cn(buttonVariants({ variant: 'outline', color: 'muted' }), 'min-w-24', className)} {...props} />;\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n"],"mappings":"qTAwCA,SAAS,EAAY,CAAE,GAAG,GAAiE,CACzF,OAAO,EAACA,EAAqB,KAAtB,CAA2B,YAAU,eAAe,GAAI,CAAQ,CAAA,CACzE,CAGA,SAAS,EAAmB,CAAE,GAAG,GAAoE,CACnG,OAAO,EAACA,EAAqB,QAAtB,CAA8B,YAAU,uBAAuB,GAAI,CAAQ,CAAA,CACpF,CAGA,SAAS,EAAkB,CAAE,GAAG,GAAmE,CACjG,OAAO,EAACA,EAAqB,OAAtB,CAA6B,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAClF,CAGA,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAoE,CAC9G,OACE,EAACA,EAAqB,QAAtB,CACE,YAAU,uBACV,MAAO,CAAE,cAAe,MAAO,EAC/B,UAAW,EACT,iCACA,+BACA,kCACA,iCACA,8BACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAGA,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAoE,CAC9G,OACE,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CAAqB,CAAA,EACrB,EAACA,EAAqB,QAAtB,CACE,YAAU,uBACV,UAAW,EACT,gBACA,aACA,kCACA,kDACA,8CACA,+BACA,8BACA,+BACA,kCACA,iCACA,kCACA,CACF,EACA,GAAI,CACL,CAAA,CACgB,CAAA,CAAA,CAEvB,CAGA,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAsC,CAC/E,OAAO,EAAC,MAAD,CAAK,YAAU,sBAAsB,UAAW,EAAG,+CAAgD,CAAS,EAAG,GAAI,CAAQ,CAAA,CACpI,CAGA,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAsC,CAC/E,OAAO,EAAC,MAAD,CAAK,YAAU,sBAAsB,UAAW,EAAG,yDAA0D,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC9I,CAGA,SAAS,EAAiB,CAAE,YAAW,GAAG,GAAkE,CAC1G,OAAO,EAACA,EAAqB,MAAtB,CAA4B,YAAU,qBAAqB,UAAW,EAAG,EAAgB,CAAE,MAAO,IAAK,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC5I,CAGA,SAAS,EAAuB,CAAE,YAAW,GAAG,GAAwE,CACtH,OACE,EAACA,EAAqB,YAAtB,CACE,YAAU,2BACV,UAAW,EAAG,EAAkB,CAAE,QAAS,OAAQ,CAAC,EAAG,4BAA6B,CAAS,EAC7F,GAAI,CACL,CAAA,CAEL,CAGA,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAmE,CAC5G,OAAO,EAACA,EAAqB,OAAtB,CAA6B,UAAW,EAAG,EAAe,EAAG,WAAY,CAAS,EAAG,GAAI,EAAO,UAAA,GAAU,SAAU,CAAI,CAAA,CACjI,CAGA,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAmE,CAC5G,OAAO,EAACA,EAAqB,OAAtB,CAA6B,UAAW,EAAG,EAAe,CAAE,QAAS,UAAW,MAAO,OAAQ,CAAC,EAAG,WAAY,CAAS,EAAG,GAAI,CAAQ,CAAA,CAChJ"}
|
package/dist/ui/badge.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as BadgeProps, r as badgeVariants, t as Badge } from "../badge-
|
|
1
|
+
import { n as BadgeProps, r as badgeVariants, t as Badge } from "../badge-BPiU1Ss2.cjs";
|
|
2
2
|
export { Badge, BadgeProps, badgeVariants };
|
package/dist/ui/badge.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as BadgeProps, r as badgeVariants, t as Badge } from "../badge-
|
|
1
|
+
import { n as BadgeProps, r as badgeVariants, t as Badge } from "../badge-BPiU1Ss2.mjs";
|
|
2
2
|
export { Badge, BadgeProps, badgeVariants };
|
package/dist/ui/button.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ButtonProps, t as Button } from "../button-
|
|
1
|
+
import { n as ButtonProps, t as Button } from "../button-BnoPktln.cjs";
|
|
2
2
|
export { Button, ButtonProps };
|
package/dist/ui/button.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ButtonProps, t as Button } from "../button-
|
|
1
|
+
import { n as ButtonProps, t as Button } from "../button-BnoPktln.mjs";
|
|
2
2
|
export { Button, ButtonProps };
|
package/dist/ui/calendar.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as CalendarDayButton, t as Calendar } from "../calendar-
|
|
1
|
+
import { n as CalendarDayButton, t as Calendar } from "../calendar-iDMPT1kI.cjs";
|
|
2
2
|
export { Calendar, CalendarDayButton };
|
package/dist/ui/calendar.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as CalendarDayButton, t as Calendar } from "../calendar-
|
|
1
|
+
import { n as CalendarDayButton, t as Calendar } from "../calendar-BkV5hTX2.mjs";
|
|
2
2
|
export { Calendar, CalendarDayButton };
|
package/dist/ui/carousel.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CarouselNext, i as CarouselItem, n as CarouselApi, o as CarouselPrevious, r as CarouselContent, t as Carousel } from "../carousel-
|
|
1
|
+
import { a as CarouselNext, i as CarouselItem, n as CarouselApi, o as CarouselPrevious, r as CarouselContent, t as Carousel } from "../carousel-bBvM31sh.cjs";
|
|
2
2
|
export { Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious };
|
package/dist/ui/carousel.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CarouselNext, i as CarouselItem, n as CarouselApi, o as CarouselPrevious, r as CarouselContent, t as Carousel } from "../carousel-
|
|
1
|
+
import { a as CarouselNext, i as CarouselItem, n as CarouselApi, o as CarouselPrevious, r as CarouselContent, t as Carousel } from "../carousel-D7VXWJ3S.mjs";
|
|
2
2
|
export { Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious };
|
package/dist/ui/dialog.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../heading-DLjnJc1q.cjs"),t=require("../typography/paragraph.cjs"),n=require("../close-BYHgEZvZ.cjs");let r=require("@customafk/react-toolkit/utils"),i=require("react/jsx-runtime"),a=require("radix-ui");function o({...e}){return(0,i.jsx)(a.Dialog.Root,{"data-slot":`dialog`,...e})}function s({...e}){return(0,i.jsx)(a.Dialog.Trigger,{"data-slot":`dialog-trigger`,...e})}function c({...e}){return(0,i.jsx)(a.Dialog.Portal,{"data-slot":`dialog-portal`,...e})}function l({...e}){return(0,i.jsx)(a.Dialog.Close,{"data-slot":`dialog-close`,...e})}function u({className:e,...t}){return(0,i.jsx)(a.Dialog.Overlay,{"data-slot":`dialog-overlay`,className:(0,r.cn)(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:fade-in-0 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:animate-out`,e),...t})}function d({className:e,children:t,showCloseButton:o=!0,...s}){return(0,i.jsxs)(c,{children:[(0,i.jsx)(u,{}),(0,i.jsxs)(a.Dialog.Content,{"data-slot":`dialog-content`,className:(0,r.cn)(`fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2`,`grid w-full max-w-[calc(100%-2rem)] bg-background`,`max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-400`,`sm:max-w-lg`,`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 data-[state=closed]:animate-out`,e),onOpenAutoFocus:e=>{e.preventDefault()},...s,children:[t,o&&(0,i.jsx)(a.Dialog.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:(0,i.jsx)(n.t,{})})]})]})}function f({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`dialog-header`,className:(0,r.cn)(`flex flex-col gap-
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../heading-DLjnJc1q.cjs"),t=require("../typography/paragraph.cjs"),n=require("../close-BYHgEZvZ.cjs");let r=require("@customafk/react-toolkit/utils"),i=require("react/jsx-runtime"),a=require("radix-ui");function o({...e}){return(0,i.jsx)(a.Dialog.Root,{"data-slot":`dialog`,...e})}function s({...e}){return(0,i.jsx)(a.Dialog.Trigger,{"data-slot":`dialog-trigger`,...e})}function c({...e}){return(0,i.jsx)(a.Dialog.Portal,{"data-slot":`dialog-portal`,...e})}function l({...e}){return(0,i.jsx)(a.Dialog.Close,{"data-slot":`dialog-close`,...e})}function u({className:e,...t}){return(0,i.jsx)(a.Dialog.Overlay,{"data-slot":`dialog-overlay`,className:(0,r.cn)(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:fade-in-0 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:animate-out`,e),...t})}function d({className:e,children:t,showCloseButton:o=!0,...s}){return(0,i.jsxs)(c,{children:[(0,i.jsx)(u,{}),(0,i.jsxs)(a.Dialog.Content,{"data-slot":`dialog-content`,className:(0,r.cn)(`fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2`,`grid w-full max-w-[calc(100%-2rem)] bg-background`,`max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-400`,`sm:max-w-lg`,`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 data-[state=closed]:animate-out`,e),onOpenAutoFocus:e=>{e.preventDefault()},...s,children:[t,o&&(0,i.jsx)(a.Dialog.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:(0,i.jsx)(n.t,{})})]})]})}function f({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`dialog-header`,className:(0,r.cn)(`flex flex-col gap-1 text-center sm:text-left`,e),...t})}function p({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`dialog-footer`,className:(0,r.cn)(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function m({className:t,...n}){return(0,i.jsx)(a.Dialog.Title,{"data-slot":`dialog-title`,className:(0,r.cn)(e.t({level:`h3`}),t),...n})}function h({className:e,...n}){return(0,i.jsx)(a.Dialog.Description,{"data-slot":`dialog-description`,className:(0,r.cn)(t.paragraphVariants({variant:`muted`}),`not-first:mt-0 md:text-sm`,e),...n})}exports.Dialog=o,exports.DialogClose=l,exports.DialogContent=d,exports.DialogDescription=h,exports.DialogFooter=p,exports.DialogHeader=f,exports.DialogOverlay=u,exports.DialogPortal=c,exports.DialogTitle=m,exports.DialogTrigger=s;
|
|
2
2
|
//# sourceMappingURL=dialog.cjs.map
|
package/dist/ui/dialog.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.cjs","names":["DialogPrimitive","CloseButton","headingVariants","paragraphVariants"],"sources":["../../packages/components/ui/dialog.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { headingVariants } from '../typography/heading';\nimport { paragraphVariants } from '../typography/paragraph';\nimport { CloseButton } from './buttons/close';\n\n/**\n * Accessible modal dialog built on Radix UI's Dialog primitives with animated overlay, close button, and responsive sizing.\n *\n * @example\n * ```tsx\n * import {\n * Dialog, DialogTrigger, DialogContent,\n * DialogHeader, DialogTitle, DialogDescription, DialogFooter,\n * } from '@customafk/lunas-ui/ui/dialog';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button>Open dialog</Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Confirm action</DialogTitle>\n * <DialogDescription>This cannot be undone.</DialogDescription>\n * </DialogHeader>\n * <DialogFooter>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </DialogFooter>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\n/** Element that opens the dialog when clicked; typically wrapped with `asChild` around a `Button`. */\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\n/** Renders dialog overlay and content into a portal outside the normal React tree. */\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\n/** Button that closes the dialog; can be composed with `asChild` to use a custom element. */\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the dialog panel with fade-in/out animation. */\nfunction DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:fade-in-0 data-[state=open]:animate-in',\n 'data-[state=closed]:fade-out-0 data-[state=closed]:animate-out',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Animated dialog panel centred on screen; includes `DialogOverlay` and an optional close button.\n *\n * @param showCloseButton - When `true` (default), renders a `CloseButton` in the top-right corner.\n */\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n /** When `true` (default), renders an `×` close button fixed to the top-right corner of the panel. */\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2',\n 'grid w-full max-w-[calc(100%-2rem)] bg-background',\n 'max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-400',\n 'sm:max-w-lg',\n 'data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=open]:animate-in',\n 'data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 data-[state=closed]:animate-out',\n className\n )}\n onOpenAutoFocus={event => {\n // Prevents focus from shifting to the content when the dialog opens, which can cause layout shift if the content includes autofocusable elements.\n event.preventDefault();\n }}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" tabIndex={-1} asChild className=\"absolute top-3 right-3\">\n <CloseButton />\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\n/** Layout wrapper for the dialog title and description, stacked vertically with left alignment on wider screens. */\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-header\" className={cn('flex flex-col gap-
|
|
1
|
+
{"version":3,"file":"dialog.cjs","names":["DialogPrimitive","CloseButton","headingVariants","paragraphVariants"],"sources":["../../packages/components/ui/dialog.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { headingVariants } from '../typography/heading';\nimport { paragraphVariants } from '../typography/paragraph';\nimport { CloseButton } from './buttons/close';\n\n/**\n * Accessible modal dialog built on Radix UI's Dialog primitives with animated overlay, close button, and responsive sizing.\n *\n * @example\n * ```tsx\n * import {\n * Dialog, DialogTrigger, DialogContent,\n * DialogHeader, DialogTitle, DialogDescription, DialogFooter,\n * } from '@customafk/lunas-ui/ui/dialog';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button>Open dialog</Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Confirm action</DialogTitle>\n * <DialogDescription>This cannot be undone.</DialogDescription>\n * </DialogHeader>\n * <DialogFooter>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </DialogFooter>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\n/** Element that opens the dialog when clicked; typically wrapped with `asChild` around a `Button`. */\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\n/** Renders dialog overlay and content into a portal outside the normal React tree. */\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\n/** Button that closes the dialog; can be composed with `asChild` to use a custom element. */\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the dialog panel with fade-in/out animation. */\nfunction DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:fade-in-0 data-[state=open]:animate-in',\n 'data-[state=closed]:fade-out-0 data-[state=closed]:animate-out',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Animated dialog panel centred on screen; includes `DialogOverlay` and an optional close button.\n *\n * @param showCloseButton - When `true` (default), renders a `CloseButton` in the top-right corner.\n */\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n /** When `true` (default), renders an `×` close button fixed to the top-right corner of the panel. */\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2',\n 'grid w-full max-w-[calc(100%-2rem)] bg-background',\n 'max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-400',\n 'sm:max-w-lg',\n 'data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=open]:animate-in',\n 'data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 data-[state=closed]:animate-out',\n className\n )}\n onOpenAutoFocus={event => {\n // Prevents focus from shifting to the content when the dialog opens, which can cause layout shift if the content includes autofocusable elements.\n event.preventDefault();\n }}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" tabIndex={-1} asChild className=\"absolute top-3 right-3\">\n <CloseButton />\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\n/** Layout wrapper for the dialog title and description, stacked vertically with left alignment on wider screens. */\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-header\" className={cn('flex flex-col gap-1 text-center sm:text-left', className)} {...props} />;\n}\n\n/** Layout wrapper for dialog action buttons, stacked on mobile and right-aligned in a row on wider screens. */\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-footer\" className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />;\n}\n\n/** Accessible heading for the dialog panel, styled with the h3 heading variant and announced by screen readers. */\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return <DialogPrimitive.Title data-slot=\"dialog-title\" className={cn(headingVariants({ level: 'h3' }), className)} {...props} />;\n}\n\n/** Muted supporting text that describes the dialog's purpose; read by screen readers alongside the title. */\nfunction DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(paragraphVariants({ variant: 'muted' }), 'not-first:mt-0 md:text-sm', className)}\n {...props}\n />\n );\n}\n\nexport { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };\n"],"mappings":"4SAqCA,SAAS,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAI,CAAQ,CAAA,CAC9D,CAGA,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,QAAjB,CAAyB,YAAU,iBAAiB,GAAI,CAAQ,CAAA,CACzE,CAGA,SAAS,EAAa,CAAE,GAAG,GAA8D,CACvF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,OAAjB,CAAwB,YAAU,gBAAgB,GAAI,CAAQ,CAAA,CACvE,CAGA,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,MAAjB,CAAuB,YAAU,eAAe,GAAI,CAAQ,CAAA,CACrE,CAGA,SAAS,EAAc,CAAE,YAAW,GAAG,GAA+D,CACpG,OACE,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,QAAjB,CACE,YAAU,iBACV,WAAA,EAAA,EAAA,GAAA,CACE,iCACA,2DACA,iEACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAOA,SAAS,EAAc,CACrB,YACA,WACA,kBAAkB,GAClB,GAAG,GAIF,CACD,OACE,EAAA,EAAA,KAAA,CAAC,EAAD,CAAA,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,EAAD,CAAgB,CAAA,GAChB,EAAA,EAAA,KAAA,CAACA,EAAAA,OAAgB,QAAjB,CACE,YAAU,iBACV,WAAA,EAAA,EAAA,GAAA,CACE,gEACA,oDACA,8EACA,cACA,wFACA,iGACA,CACF,EACA,gBAAiB,GAAS,CAExB,EAAM,eAAe,CACvB,EACA,GAAI,EAfN,SAAA,CAiBG,EACA,IACC,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAgB,MAAjB,CAAuB,YAAU,eAAe,SAAU,GAAI,QAAA,GAAQ,UAAU,yBAC9E,UAAA,EAAA,EAAA,IAAA,CAACC,EAAAA,EAAD,CAAc,CAAA,CACO,CAAA,CAEF,CACb,CAAA,CAAA,CAAA,CAAA,CAElB,CAGA,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OAAO,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,YAAU,gBAAgB,WAAA,EAAA,EAAA,GAAA,CAAc,+CAAgD,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC9H,CAGA,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OAAO,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,YAAU,gBAAgB,WAAA,EAAA,EAAA,GAAA,CAAc,yDAA0D,CAAS,EAAG,GAAI,CAAQ,CAAA,CACxI,CAGA,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAAA,EAAA,IAAA,CAACD,EAAAA,OAAgB,MAAjB,CAAuB,YAAU,eAAe,WAAA,EAAA,EAAA,GAAA,CAAcE,EAAAA,EAAgB,CAAE,MAAO,IAAK,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACjI,CAGA,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAmE,CAC5G,OACE,EAAA,EAAA,IAAA,CAACF,EAAAA,OAAgB,YAAjB,CACE,YAAU,qBACV,WAAA,EAAA,EAAA,GAAA,CAAcG,EAAAA,kBAAkB,CAAE,QAAS,OAAQ,CAAC,EAAG,4BAA6B,CAAS,EAC7F,GAAI,CACL,CAAA,CAEL"}
|
package/dist/ui/dialog.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{t as e}from"../heading-Fajfx88p.mjs";import{paragraphVariants as t}from"../typography/paragraph.mjs";import{t as n}from"../close-DYJZ8fkh.mjs";import{cn as r}from"@customafk/react-toolkit/utils";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{Dialog as o}from"radix-ui";function s({...e}){return i(o.Root,{"data-slot":`dialog`,...e})}function c({...e}){return i(o.Trigger,{"data-slot":`dialog-trigger`,...e})}function l({...e}){return i(o.Portal,{"data-slot":`dialog-portal`,...e})}function u({...e}){return i(o.Close,{"data-slot":`dialog-close`,...e})}function d({className:e,...t}){return i(o.Overlay,{"data-slot":`dialog-overlay`,className:r(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:fade-in-0 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:animate-out`,e),...t})}function f({className:e,children:t,showCloseButton:s=!0,...c}){return a(l,{children:[i(d,{}),a(o.Content,{"data-slot":`dialog-content`,className:r(`fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2`,`grid w-full max-w-[calc(100%-2rem)] bg-background`,`max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-400`,`sm:max-w-lg`,`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 data-[state=closed]:animate-out`,e),onOpenAutoFocus:e=>{e.preventDefault()},...c,children:[t,s&&i(o.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:i(n,{})})]})]})}function p({className:e,...t}){return i(`div`,{"data-slot":`dialog-header`,className:r(`flex flex-col gap-
|
|
1
|
+
"use client";import{t as e}from"../heading-Fajfx88p.mjs";import{paragraphVariants as t}from"../typography/paragraph.mjs";import{t as n}from"../close-DYJZ8fkh.mjs";import{cn as r}from"@customafk/react-toolkit/utils";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{Dialog as o}from"radix-ui";function s({...e}){return i(o.Root,{"data-slot":`dialog`,...e})}function c({...e}){return i(o.Trigger,{"data-slot":`dialog-trigger`,...e})}function l({...e}){return i(o.Portal,{"data-slot":`dialog-portal`,...e})}function u({...e}){return i(o.Close,{"data-slot":`dialog-close`,...e})}function d({className:e,...t}){return i(o.Overlay,{"data-slot":`dialog-overlay`,className:r(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:fade-in-0 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:animate-out`,e),...t})}function f({className:e,children:t,showCloseButton:s=!0,...c}){return a(l,{children:[i(d,{}),a(o.Content,{"data-slot":`dialog-content`,className:r(`fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2`,`grid w-full max-w-[calc(100%-2rem)] bg-background`,`max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-400`,`sm:max-w-lg`,`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 data-[state=closed]:animate-out`,e),onOpenAutoFocus:e=>{e.preventDefault()},...c,children:[t,s&&i(o.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:i(n,{})})]})]})}function p({className:e,...t}){return i(`div`,{"data-slot":`dialog-header`,className:r(`flex flex-col gap-1 text-center sm:text-left`,e),...t})}function m({className:e,...t}){return i(`div`,{"data-slot":`dialog-footer`,className:r(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function h({className:t,...n}){return i(o.Title,{"data-slot":`dialog-title`,className:r(e({level:`h3`}),t),...n})}function g({className:e,...n}){return i(o.Description,{"data-slot":`dialog-description`,className:r(t({variant:`muted`}),`not-first:mt-0 md:text-sm`,e),...n})}export{s as Dialog,u as DialogClose,f as DialogContent,g as DialogDescription,m as DialogFooter,p as DialogHeader,d as DialogOverlay,l as DialogPortal,h as DialogTitle,c as DialogTrigger};
|
|
2
2
|
//# sourceMappingURL=dialog.mjs.map
|
package/dist/ui/dialog.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.mjs","names":["DialogPrimitive"],"sources":["../../packages/components/ui/dialog.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { headingVariants } from '../typography/heading';\nimport { paragraphVariants } from '../typography/paragraph';\nimport { CloseButton } from './buttons/close';\n\n/**\n * Accessible modal dialog built on Radix UI's Dialog primitives with animated overlay, close button, and responsive sizing.\n *\n * @example\n * ```tsx\n * import {\n * Dialog, DialogTrigger, DialogContent,\n * DialogHeader, DialogTitle, DialogDescription, DialogFooter,\n * } from '@customafk/lunas-ui/ui/dialog';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button>Open dialog</Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Confirm action</DialogTitle>\n * <DialogDescription>This cannot be undone.</DialogDescription>\n * </DialogHeader>\n * <DialogFooter>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </DialogFooter>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\n/** Element that opens the dialog when clicked; typically wrapped with `asChild` around a `Button`. */\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\n/** Renders dialog overlay and content into a portal outside the normal React tree. */\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\n/** Button that closes the dialog; can be composed with `asChild` to use a custom element. */\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the dialog panel with fade-in/out animation. */\nfunction DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:fade-in-0 data-[state=open]:animate-in',\n 'data-[state=closed]:fade-out-0 data-[state=closed]:animate-out',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Animated dialog panel centred on screen; includes `DialogOverlay` and an optional close button.\n *\n * @param showCloseButton - When `true` (default), renders a `CloseButton` in the top-right corner.\n */\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n /** When `true` (default), renders an `×` close button fixed to the top-right corner of the panel. */\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2',\n 'grid w-full max-w-[calc(100%-2rem)] bg-background',\n 'max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-400',\n 'sm:max-w-lg',\n 'data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=open]:animate-in',\n 'data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 data-[state=closed]:animate-out',\n className\n )}\n onOpenAutoFocus={event => {\n // Prevents focus from shifting to the content when the dialog opens, which can cause layout shift if the content includes autofocusable elements.\n event.preventDefault();\n }}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" tabIndex={-1} asChild className=\"absolute top-3 right-3\">\n <CloseButton />\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\n/** Layout wrapper for the dialog title and description, stacked vertically with left alignment on wider screens. */\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-header\" className={cn('flex flex-col gap-
|
|
1
|
+
{"version":3,"file":"dialog.mjs","names":["DialogPrimitive"],"sources":["../../packages/components/ui/dialog.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { headingVariants } from '../typography/heading';\nimport { paragraphVariants } from '../typography/paragraph';\nimport { CloseButton } from './buttons/close';\n\n/**\n * Accessible modal dialog built on Radix UI's Dialog primitives with animated overlay, close button, and responsive sizing.\n *\n * @example\n * ```tsx\n * import {\n * Dialog, DialogTrigger, DialogContent,\n * DialogHeader, DialogTitle, DialogDescription, DialogFooter,\n * } from '@customafk/lunas-ui/ui/dialog';\n * import { Button } from '@customafk/lunas-ui/ui/button';\n *\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button>Open dialog</Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Confirm action</DialogTitle>\n * <DialogDescription>This cannot be undone.</DialogDescription>\n * </DialogHeader>\n * <DialogFooter>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </DialogFooter>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\n/** Element that opens the dialog when clicked; typically wrapped with `asChild` around a `Button`. */\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\n/** Renders dialog overlay and content into a portal outside the normal React tree. */\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\n/** Button that closes the dialog; can be composed with `asChild` to use a custom element. */\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the dialog panel with fade-in/out animation. */\nfunction DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:fade-in-0 data-[state=open]:animate-in',\n 'data-[state=closed]:fade-out-0 data-[state=closed]:animate-out',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Animated dialog panel centred on screen; includes `DialogOverlay` and an optional close button.\n *\n * @param showCloseButton - When `true` (default), renders a `CloseButton` in the top-right corner.\n */\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n /** When `true` (default), renders an `×` close button fixed to the top-right corner of the panel. */\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2',\n 'grid w-full max-w-[calc(100%-2rem)] bg-background',\n 'max-h-[85dvh] gap-4 rounded-2xl p-6 shadow-dialog outline-none duration-400',\n 'sm:max-w-lg',\n 'data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=open]:animate-in',\n 'data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 data-[state=closed]:animate-out',\n className\n )}\n onOpenAutoFocus={event => {\n // Prevents focus from shifting to the content when the dialog opens, which can cause layout shift if the content includes autofocusable elements.\n event.preventDefault();\n }}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" tabIndex={-1} asChild className=\"absolute top-3 right-3\">\n <CloseButton />\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\n/** Layout wrapper for the dialog title and description, stacked vertically with left alignment on wider screens. */\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-header\" className={cn('flex flex-col gap-1 text-center sm:text-left', className)} {...props} />;\n}\n\n/** Layout wrapper for dialog action buttons, stacked on mobile and right-aligned in a row on wider screens. */\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-footer\" className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />;\n}\n\n/** Accessible heading for the dialog panel, styled with the h3 heading variant and announced by screen readers. */\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return <DialogPrimitive.Title data-slot=\"dialog-title\" className={cn(headingVariants({ level: 'h3' }), className)} {...props} />;\n}\n\n/** Muted supporting text that describes the dialog's purpose; read by screen readers alongside the title. */\nfunction DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(paragraphVariants({ variant: 'muted' }), 'not-first:mt-0 md:text-sm', className)}\n {...props}\n />\n );\n}\n\nexport { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };\n"],"mappings":"2SAqCA,SAAS,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAACA,EAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAI,CAAQ,CAAA,CAC9D,CAGA,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAACA,EAAgB,QAAjB,CAAyB,YAAU,iBAAiB,GAAI,CAAQ,CAAA,CACzE,CAGA,SAAS,EAAa,CAAE,GAAG,GAA8D,CACvF,OAAO,EAACA,EAAgB,OAAjB,CAAwB,YAAU,gBAAgB,GAAI,CAAQ,CAAA,CACvE,CAGA,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAACA,EAAgB,MAAjB,CAAuB,YAAU,eAAe,GAAI,CAAQ,CAAA,CACrE,CAGA,SAAS,EAAc,CAAE,YAAW,GAAG,GAA+D,CACpG,OACE,EAACA,EAAgB,QAAjB,CACE,YAAU,iBACV,UAAW,EACT,iCACA,2DACA,iEACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAOA,SAAS,EAAc,CACrB,YACA,WACA,kBAAkB,GAClB,GAAG,GAIF,CACD,OACE,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CAAgB,CAAA,EAChB,EAACA,EAAgB,QAAjB,CACE,YAAU,iBACV,UAAW,EACT,gEACA,oDACA,8EACA,cACA,wFACA,iGACA,CACF,EACA,gBAAiB,GAAS,CAExB,EAAM,eAAe,CACvB,EACA,GAAI,EAfN,SAAA,CAiBG,EACA,GACC,EAACA,EAAgB,MAAjB,CAAuB,YAAU,eAAe,SAAU,GAAI,QAAA,GAAQ,UAAU,yBAC9E,SAAA,EAAC,EAAD,CAAc,CAAA,CACO,CAAA,CAEF,CACb,CAAA,CAAA,CAAA,CAAA,CAElB,CAGA,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OAAO,EAAC,MAAD,CAAK,YAAU,gBAAgB,UAAW,EAAG,+CAAgD,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC9H,CAGA,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OAAO,EAAC,MAAD,CAAK,YAAU,gBAAgB,UAAW,EAAG,yDAA0D,CAAS,EAAG,GAAI,CAAQ,CAAA,CACxI,CAGA,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAACA,EAAgB,MAAjB,CAAuB,YAAU,eAAe,UAAW,EAAG,EAAgB,CAAE,MAAO,IAAK,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACjI,CAGA,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAmE,CAC5G,OACE,EAACA,EAAgB,YAAjB,CACE,YAAU,qBACV,UAAW,EAAG,EAAkB,CAAE,QAAS,OAAQ,CAAC,EAAG,4BAA6B,CAAS,EAC7F,GAAI,CACL,CAAA,CAEL"}
|
package/dist/ui/pagination.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PaginationLink, i as PaginationItem, n as PaginationContent, o as PaginationNext, r as PaginationEllipsis, s as PaginationPrevious, t as Pagination } from "../pagination-
|
|
1
|
+
import { a as PaginationLink, i as PaginationItem, n as PaginationContent, o as PaginationNext, r as PaginationEllipsis, s as PaginationPrevious, t as Pagination } from "../pagination-BRw-yZBY.cjs";
|
|
2
2
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
package/dist/ui/pagination.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PaginationLink, i as PaginationItem, n as PaginationContent, o as PaginationNext, r as PaginationEllipsis, s as PaginationPrevious, t as Pagination } from "../pagination-
|
|
1
|
+
import { a as PaginationLink, i as PaginationItem, n as PaginationContent, o as PaginationNext, r as PaginationEllipsis, s as PaginationPrevious, t as Pagination } from "../pagination-BlLiOvY9.mjs";
|
|
2
2
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
package/dist/ui/resizable.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ResizablePanel, r as ResizablePanelGroup, t as ResizableHandle } from "../resizable-
|
|
1
|
+
import { n as ResizablePanel, r as ResizablePanelGroup, t as ResizableHandle } from "../resizable-C3uADYIg.cjs";
|
|
2
2
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
package/dist/ui/resizable.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ResizablePanel, r as ResizablePanelGroup, t as ResizableHandle } from "../resizable-
|
|
1
|
+
import { n as ResizablePanel, r as ResizablePanelGroup, t as ResizableHandle } from "../resizable-C3uADYIg.mjs";
|
|
2
2
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
package/dist/ui/sheet.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("lucide-react"),t=require("@customafk/react-toolkit/utils"),n=require("react/jsx-runtime"),r=require("radix-ui");function i({...e}){return(0,n.jsx)(r.Dialog.Root,{"data-slot":`sheet`,...e})}function a({...e}){return(0,n.jsx)(r.Dialog.Trigger,{"data-slot":`sheet-trigger`,...e})}function o({...e}){return(0,n.jsx)(r.Dialog.Close,{"data-slot":`sheet-close`,...e})}function s({...e}){return(0,n.jsx)(r.Dialog.Portal,{"data-slot":`sheet-portal`,...e})}function c({className:e,...i}){return(0,n.jsx)(r.Dialog.Overlay,{"data-slot":`sheet-overlay`,className:(0,t.cn)(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=open]:fade-in-0`,e),...i})}function l({className:i,children:a,side:o=`right`,...l}){return(0,n.jsxs)(s,{children:[(0,n.jsx)(c,{}),(0,n.jsxs)(r.Dialog.Content,{"data-slot":`sheet-content`,className:(0,t.cn)(`bg-background`,`fixed z-50 flex flex-col gap-4 border-border-weak shadow-dropdown transition ease-in-out`,`data-[state=open]:animate-in`,`data-[state=open]:duration-500`,`data-[state=closed]:animate-out`,`data-[state=closed]:duration-300`,o===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm`,o===`right`&&`data-[state=closed]:slide-out-to-right`,o===`right`&&`data-[state=open]:slide-in-from-right`,o===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm`,o===`left`&&`data-[state=closed]:slide-out-to-left`,o===`left`&&`data-[state=open]:slide-in-from-left`,o===`top`&&`inset-x-0 top-0 h-auto border-b`,o===`top`&&`data-[state=closed]:slide-out-to-top`,o===`top`&&`data-[state=open]:slide-in-from-top`,o===`bottom`&&`inset-x-0 bottom-0 h-auto border-t`,o===`bottom`&&`data-[state=closed]:slide-out-to-bottom`,o===`bottom`&&`data-[state=open]:slide-in-from-bottom`,i),...l,children:[a,(0,n.jsxs)(r.Dialog.Close,{className:(0,t.cn)(`cursor-pointer p-2 ring-offset-background`,`absolute top-2 right-2 rounded-full opacity-70 transition-opacity`,`data-[state=open]:bg-secondary`,`disabled:pointer-events-none`,`hover:opacity-100`,`hover:bg-border-muted`,`focus:ring-border-weak`,`focus:ring-4`,`focus:outline-hidden`),children:[(0,n.jsx)(e.XIcon,{className:`size-5`}),(0,n.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function u({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`sheet-header`,className:(0,t.cn)(`flex flex-0 flex-col gap-1
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("lucide-react"),t=require("@customafk/react-toolkit/utils"),n=require("react/jsx-runtime"),r=require("radix-ui");function i({...e}){return(0,n.jsx)(r.Dialog.Root,{"data-slot":`sheet`,...e})}function a({...e}){return(0,n.jsx)(r.Dialog.Trigger,{"data-slot":`sheet-trigger`,...e})}function o({...e}){return(0,n.jsx)(r.Dialog.Close,{"data-slot":`sheet-close`,...e})}function s({...e}){return(0,n.jsx)(r.Dialog.Portal,{"data-slot":`sheet-portal`,...e})}function c({className:e,...i}){return(0,n.jsx)(r.Dialog.Overlay,{"data-slot":`sheet-overlay`,className:(0,t.cn)(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=open]:fade-in-0`,e),...i})}function l({className:i,children:a,side:o=`right`,...l}){return(0,n.jsxs)(s,{children:[(0,n.jsx)(c,{}),(0,n.jsxs)(r.Dialog.Content,{"data-slot":`sheet-content`,className:(0,t.cn)(`bg-background`,`fixed z-50 flex flex-col gap-4 border-border-weak shadow-dropdown transition ease-in-out`,`data-[state=open]:animate-in`,`data-[state=open]:duration-500`,`data-[state=closed]:animate-out`,`data-[state=closed]:duration-300`,o===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm`,o===`right`&&`data-[state=closed]:slide-out-to-right`,o===`right`&&`data-[state=open]:slide-in-from-right`,o===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm`,o===`left`&&`data-[state=closed]:slide-out-to-left`,o===`left`&&`data-[state=open]:slide-in-from-left`,o===`top`&&`inset-x-0 top-0 h-auto border-b`,o===`top`&&`data-[state=closed]:slide-out-to-top`,o===`top`&&`data-[state=open]:slide-in-from-top`,o===`bottom`&&`inset-x-0 bottom-0 h-auto border-t`,o===`bottom`&&`data-[state=closed]:slide-out-to-bottom`,o===`bottom`&&`data-[state=open]:slide-in-from-bottom`,i),...l,children:[a,(0,n.jsxs)(r.Dialog.Close,{className:(0,t.cn)(`cursor-pointer p-2 ring-offset-background`,`absolute top-2 right-2 rounded-full opacity-70 transition-opacity`,`data-[state=open]:bg-secondary`,`disabled:pointer-events-none`,`hover:opacity-100`,`hover:bg-border-muted`,`focus:ring-border-weak`,`focus:ring-4`,`focus:outline-hidden`),children:[(0,n.jsx)(e.XIcon,{className:`size-5`}),(0,n.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function u({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`sheet-header`,className:(0,t.cn)(`flex flex-0 flex-col gap-1 p-4`,e),...r})}function d({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`sheet-footer`,className:(0,t.cn)(`mt-auto flex flex-0 flex-col gap-2 p-4`,e),...r})}function f({className:e,...i}){return(0,n.jsx)(r.Dialog.Title,{"data-slot":`sheet-title`,className:(0,t.cn)(`font-semibold text-text-positive-strong`,e),...i})}function p({className:e,...i}){return(0,n.jsx)(r.Dialog.Description,{"data-slot":`sheet-description`,className:(0,t.cn)(`text-sm text-text-positive-weak`,e),...i})}exports.Sheet=i,exports.SheetClose=o,exports.SheetContent=l,exports.SheetDescription=p,exports.SheetFooter=d,exports.SheetHeader=u,exports.SheetTitle=f,exports.SheetTrigger=a;
|
|
2
2
|
//# sourceMappingURL=sheet.cjs.map
|
package/dist/ui/sheet.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.cjs","names":["SheetPrimitive","XIcon"],"sources":["../../packages/components/ui/sheet.tsx"],"sourcesContent":["'use client';\n\nimport { XIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Dialog as SheetPrimitive } from 'radix-ui';\n\n/**\n * Root provider for the Sheet panel — wraps all Sheet sub-components and manages open state.\n *\n * @example\n * ```tsx\n * import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, SheetDescription } from '@customafk/lunas-ui/ui/sheet';\n *\n * <Sheet>\n * <SheetTrigger>Open</SheetTrigger>\n * <SheetContent side=\"right\">\n * <SheetHeader>\n * <SheetTitle>Settings</SheetTitle>\n * <SheetDescription>Manage your preferences.</SheetDescription>\n * </SheetHeader>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\n/** Button or element that opens the Sheet when interacted with. */\nfunction SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\n/** Button that programmatically closes the Sheet. */\nfunction SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\n/** Portals Sheet content outside the current DOM hierarchy. */\nfunction SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the Sheet panel. */\nfunction SheetOverlay({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * The sliding panel itself; renders on the specified `side` of the viewport and includes a built-in close button.\n */\nfunction SheetContent({\n className,\n children,\n side = 'right',\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n /** Edge of the viewport from which the sheet slides in. */\n side?: 'top' | 'right' | 'bottom' | 'left';\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n 'bg-background',\n 'fixed z-50 flex flex-col gap-4 border-border-weak shadow-dropdown transition ease-in-out',\n\n 'data-[state=open]:animate-in',\n 'data-[state=open]:duration-500',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:duration-300',\n\n side === 'right' && 'inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n side === 'right' && 'data-[state=closed]:slide-out-to-right',\n side === 'right' && 'data-[state=open]:slide-in-from-right',\n\n side === 'left' && 'inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n side === 'left' && 'data-[state=closed]:slide-out-to-left',\n side === 'left' && 'data-[state=open]:slide-in-from-left',\n\n side === 'top' && 'inset-x-0 top-0 h-auto border-b',\n side === 'top' && 'data-[state=closed]:slide-out-to-top',\n side === 'top' && 'data-[state=open]:slide-in-from-top',\n\n side === 'bottom' && 'inset-x-0 bottom-0 h-auto border-t',\n side === 'bottom' && 'data-[state=closed]:slide-out-to-bottom',\n side === 'bottom' && 'data-[state=open]:slide-in-from-bottom',\n className\n )}\n {...props}\n >\n {children}\n <SheetPrimitive.Close\n className={cn(\n 'cursor-pointer p-2 ring-offset-background',\n 'absolute top-2 right-2 rounded-full opacity-70 transition-opacity',\n 'data-[state=open]:bg-secondary',\n 'disabled:pointer-events-none',\n 'hover:opacity-100',\n 'hover:bg-border-muted',\n 'focus:ring-border-weak',\n 'focus:ring-4',\n 'focus:outline-hidden'\n )}\n >\n <XIcon className=\"size-5\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n );\n}\n\n/** Padded container for the Sheet title and description at the top of the panel. */\nfunction SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sheet-header\" className={cn('flex flex-0 flex-col gap-1
|
|
1
|
+
{"version":3,"file":"sheet.cjs","names":["SheetPrimitive","XIcon"],"sources":["../../packages/components/ui/sheet.tsx"],"sourcesContent":["'use client';\n\nimport { XIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Dialog as SheetPrimitive } from 'radix-ui';\n\n/**\n * Root provider for the Sheet panel — wraps all Sheet sub-components and manages open state.\n *\n * @example\n * ```tsx\n * import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, SheetDescription } from '@customafk/lunas-ui/ui/sheet';\n *\n * <Sheet>\n * <SheetTrigger>Open</SheetTrigger>\n * <SheetContent side=\"right\">\n * <SheetHeader>\n * <SheetTitle>Settings</SheetTitle>\n * <SheetDescription>Manage your preferences.</SheetDescription>\n * </SheetHeader>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\n/** Button or element that opens the Sheet when interacted with. */\nfunction SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\n/** Button that programmatically closes the Sheet. */\nfunction SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\n/** Portals Sheet content outside the current DOM hierarchy. */\nfunction SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the Sheet panel. */\nfunction SheetOverlay({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * The sliding panel itself; renders on the specified `side` of the viewport and includes a built-in close button.\n */\nfunction SheetContent({\n className,\n children,\n side = 'right',\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n /** Edge of the viewport from which the sheet slides in. */\n side?: 'top' | 'right' | 'bottom' | 'left';\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n 'bg-background',\n 'fixed z-50 flex flex-col gap-4 border-border-weak shadow-dropdown transition ease-in-out',\n\n 'data-[state=open]:animate-in',\n 'data-[state=open]:duration-500',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:duration-300',\n\n side === 'right' && 'inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n side === 'right' && 'data-[state=closed]:slide-out-to-right',\n side === 'right' && 'data-[state=open]:slide-in-from-right',\n\n side === 'left' && 'inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n side === 'left' && 'data-[state=closed]:slide-out-to-left',\n side === 'left' && 'data-[state=open]:slide-in-from-left',\n\n side === 'top' && 'inset-x-0 top-0 h-auto border-b',\n side === 'top' && 'data-[state=closed]:slide-out-to-top',\n side === 'top' && 'data-[state=open]:slide-in-from-top',\n\n side === 'bottom' && 'inset-x-0 bottom-0 h-auto border-t',\n side === 'bottom' && 'data-[state=closed]:slide-out-to-bottom',\n side === 'bottom' && 'data-[state=open]:slide-in-from-bottom',\n className\n )}\n {...props}\n >\n {children}\n <SheetPrimitive.Close\n className={cn(\n 'cursor-pointer p-2 ring-offset-background',\n 'absolute top-2 right-2 rounded-full opacity-70 transition-opacity',\n 'data-[state=open]:bg-secondary',\n 'disabled:pointer-events-none',\n 'hover:opacity-100',\n 'hover:bg-border-muted',\n 'focus:ring-border-weak',\n 'focus:ring-4',\n 'focus:outline-hidden'\n )}\n >\n <XIcon className=\"size-5\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n );\n}\n\n/** Padded container for the Sheet title and description at the top of the panel. */\nfunction SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sheet-header\" className={cn('flex flex-0 flex-col gap-1 p-4', className)} {...props} />;\n}\n\n/** Sticky footer area at the bottom of the Sheet panel, typically used for action buttons. */\nfunction SheetFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sheet-footer\" className={cn('mt-auto flex flex-0 flex-col gap-2 p-4', className)} {...props} />;\n}\n\n/** Accessible title element for the Sheet, announced by screen readers on open. */\nfunction SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return <SheetPrimitive.Title data-slot=\"sheet-title\" className={cn('font-semibold text-text-positive-strong', className)} {...props} />;\n}\n\n/** Accessible description element for the Sheet, providing supplemental context to the title. */\nfunction SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>) {\n return <SheetPrimitive.Description data-slot=\"sheet-description\" className={cn('text-sm text-text-positive-weak', className)} {...props} />;\n}\n\nexport { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };\n"],"mappings":"+MA0BA,SAAS,EAAM,CAAE,GAAG,GAA2D,CAC7E,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAe,KAAhB,CAAqB,YAAU,QAAQ,GAAI,CAAQ,CAAA,CAC5D,CAGA,SAAS,EAAa,CAAE,GAAG,GAA8D,CACvF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAe,QAAhB,CAAwB,YAAU,gBAAgB,GAAI,CAAQ,CAAA,CACvE,CAGA,SAAS,EAAW,CAAE,GAAG,GAA4D,CACnF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAe,MAAhB,CAAsB,YAAU,cAAc,GAAI,CAAQ,CAAA,CACnE,CAGA,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAe,OAAhB,CAAuB,YAAU,eAAe,GAAI,CAAQ,CAAA,CACrE,CAGA,SAAS,EAAa,CAAE,YAAW,GAAG,GAA8D,CAClG,OACE,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAe,QAAhB,CACE,YAAU,gBACV,WAAA,EAAA,EAAA,GAAA,CACE,iCACA,+BACA,kCACA,iCACA,8BACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAKA,SAAS,EAAa,CACpB,YACA,WACA,OAAO,QACP,GAAG,GAIF,CACD,OACE,EAAA,EAAA,KAAA,CAAC,EAAD,CAAA,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,EAAD,CAAe,CAAA,GACf,EAAA,EAAA,KAAA,CAACA,EAAAA,OAAe,QAAhB,CACE,YAAU,gBACV,WAAA,EAAA,EAAA,GAAA,CACE,gBACA,2FAEA,+BACA,iCACA,kCACA,mCAEA,IAAS,SAAW,sDACpB,IAAS,SAAW,yCACpB,IAAS,SAAW,wCAEpB,IAAS,QAAU,qDACnB,IAAS,QAAU,wCACnB,IAAS,QAAU,uCAEnB,IAAS,OAAS,kCAClB,IAAS,OAAS,uCAClB,IAAS,OAAS,sCAElB,IAAS,UAAY,qCACrB,IAAS,UAAY,0CACrB,IAAS,UAAY,yCACrB,CACF,EACA,GAAI,EA5BN,SAAA,CA8BG,GACD,EAAA,EAAA,KAAA,CAACA,EAAAA,OAAe,MAAhB,CACE,WAAA,EAAA,EAAA,GAAA,CACE,4CACA,oEACA,iCACA,+BACA,oBACA,wBACA,yBACA,eACA,sBACF,EAXF,SAAA,EAaE,EAAA,EAAA,IAAA,CAACC,EAAAA,MAAD,CAAO,UAAU,QAAU,CAAA,GAC3B,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,UAAU,SAAA,OAAW,CAAA,CACjB,CACA,CAAA,CAAA,CACb,CAAA,CAAA,CAAA,CAAA,CAEjB,CAGA,SAAS,EAAY,CAAE,YAAW,GAAG,GAAsC,CACzE,OAAO,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,YAAU,eAAe,WAAA,EAAA,EAAA,GAAA,CAAc,iCAAkC,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC/G,CAGA,SAAS,EAAY,CAAE,YAAW,GAAG,GAAsC,CACzE,OAAO,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,YAAU,eAAe,WAAA,EAAA,EAAA,GAAA,CAAc,yCAA0C,CAAS,EAAG,GAAI,CAAQ,CAAA,CACvH,CAGA,SAAS,EAAW,CAAE,YAAW,GAAG,GAA4D,CAC9F,OAAO,EAAA,EAAA,IAAA,CAACD,EAAAA,OAAe,MAAhB,CAAsB,YAAU,cAAc,WAAA,EAAA,EAAA,GAAA,CAAc,0CAA2C,CAAS,EAAG,GAAI,CAAQ,CAAA,CACxI,CAGA,SAAS,EAAiB,CAAE,YAAW,GAAG,GAAkE,CAC1G,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,OAAe,YAAhB,CAA4B,YAAU,oBAAoB,WAAA,EAAA,EAAA,GAAA,CAAc,kCAAmC,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC5I"}
|
package/dist/ui/sheet.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{XIcon as e}from"lucide-react";import{cn as t}from"@customafk/react-toolkit/utils";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{Dialog as i}from"radix-ui";function a({...e}){return n(i.Root,{"data-slot":`sheet`,...e})}function o({...e}){return n(i.Trigger,{"data-slot":`sheet-trigger`,...e})}function s({...e}){return n(i.Close,{"data-slot":`sheet-close`,...e})}function c({...e}){return n(i.Portal,{"data-slot":`sheet-portal`,...e})}function l({className:e,...r}){return n(i.Overlay,{"data-slot":`sheet-overlay`,className:t(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=open]:fade-in-0`,e),...r})}function u({className:a,children:o,side:s=`right`,...u}){return r(c,{children:[n(l,{}),r(i.Content,{"data-slot":`sheet-content`,className:t(`bg-background`,`fixed z-50 flex flex-col gap-4 border-border-weak shadow-dropdown transition ease-in-out`,`data-[state=open]:animate-in`,`data-[state=open]:duration-500`,`data-[state=closed]:animate-out`,`data-[state=closed]:duration-300`,s===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm`,s===`right`&&`data-[state=closed]:slide-out-to-right`,s===`right`&&`data-[state=open]:slide-in-from-right`,s===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm`,s===`left`&&`data-[state=closed]:slide-out-to-left`,s===`left`&&`data-[state=open]:slide-in-from-left`,s===`top`&&`inset-x-0 top-0 h-auto border-b`,s===`top`&&`data-[state=closed]:slide-out-to-top`,s===`top`&&`data-[state=open]:slide-in-from-top`,s===`bottom`&&`inset-x-0 bottom-0 h-auto border-t`,s===`bottom`&&`data-[state=closed]:slide-out-to-bottom`,s===`bottom`&&`data-[state=open]:slide-in-from-bottom`,a),...u,children:[o,r(i.Close,{className:t(`cursor-pointer p-2 ring-offset-background`,`absolute top-2 right-2 rounded-full opacity-70 transition-opacity`,`data-[state=open]:bg-secondary`,`disabled:pointer-events-none`,`hover:opacity-100`,`hover:bg-border-muted`,`focus:ring-border-weak`,`focus:ring-4`,`focus:outline-hidden`),children:[n(e,{className:`size-5`}),n(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function d({className:e,...r}){return n(`div`,{"data-slot":`sheet-header`,className:t(`flex flex-0 flex-col gap-1
|
|
1
|
+
"use client";import{XIcon as e}from"lucide-react";import{cn as t}from"@customafk/react-toolkit/utils";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{Dialog as i}from"radix-ui";function a({...e}){return n(i.Root,{"data-slot":`sheet`,...e})}function o({...e}){return n(i.Trigger,{"data-slot":`sheet-trigger`,...e})}function s({...e}){return n(i.Close,{"data-slot":`sheet-close`,...e})}function c({...e}){return n(i.Portal,{"data-slot":`sheet-portal`,...e})}function l({className:e,...r}){return n(i.Overlay,{"data-slot":`sheet-overlay`,className:t(`fixed inset-0 z-50 bg-black/50`,`data-[state=open]:animate-in`,`data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0`,`data-[state=open]:fade-in-0`,e),...r})}function u({className:a,children:o,side:s=`right`,...u}){return r(c,{children:[n(l,{}),r(i.Content,{"data-slot":`sheet-content`,className:t(`bg-background`,`fixed z-50 flex flex-col gap-4 border-border-weak shadow-dropdown transition ease-in-out`,`data-[state=open]:animate-in`,`data-[state=open]:duration-500`,`data-[state=closed]:animate-out`,`data-[state=closed]:duration-300`,s===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm`,s===`right`&&`data-[state=closed]:slide-out-to-right`,s===`right`&&`data-[state=open]:slide-in-from-right`,s===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm`,s===`left`&&`data-[state=closed]:slide-out-to-left`,s===`left`&&`data-[state=open]:slide-in-from-left`,s===`top`&&`inset-x-0 top-0 h-auto border-b`,s===`top`&&`data-[state=closed]:slide-out-to-top`,s===`top`&&`data-[state=open]:slide-in-from-top`,s===`bottom`&&`inset-x-0 bottom-0 h-auto border-t`,s===`bottom`&&`data-[state=closed]:slide-out-to-bottom`,s===`bottom`&&`data-[state=open]:slide-in-from-bottom`,a),...u,children:[o,r(i.Close,{className:t(`cursor-pointer p-2 ring-offset-background`,`absolute top-2 right-2 rounded-full opacity-70 transition-opacity`,`data-[state=open]:bg-secondary`,`disabled:pointer-events-none`,`hover:opacity-100`,`hover:bg-border-muted`,`focus:ring-border-weak`,`focus:ring-4`,`focus:outline-hidden`),children:[n(e,{className:`size-5`}),n(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function d({className:e,...r}){return n(`div`,{"data-slot":`sheet-header`,className:t(`flex flex-0 flex-col gap-1 p-4`,e),...r})}function f({className:e,...r}){return n(`div`,{"data-slot":`sheet-footer`,className:t(`mt-auto flex flex-0 flex-col gap-2 p-4`,e),...r})}function p({className:e,...r}){return n(i.Title,{"data-slot":`sheet-title`,className:t(`font-semibold text-text-positive-strong`,e),...r})}function m({className:e,...r}){return n(i.Description,{"data-slot":`sheet-description`,className:t(`text-sm text-text-positive-weak`,e),...r})}export{a as Sheet,s as SheetClose,u as SheetContent,m as SheetDescription,f as SheetFooter,d as SheetHeader,p as SheetTitle,o as SheetTrigger};
|
|
2
2
|
//# sourceMappingURL=sheet.mjs.map
|
package/dist/ui/sheet.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.mjs","names":["SheetPrimitive"],"sources":["../../packages/components/ui/sheet.tsx"],"sourcesContent":["'use client';\n\nimport { XIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Dialog as SheetPrimitive } from 'radix-ui';\n\n/**\n * Root provider for the Sheet panel — wraps all Sheet sub-components and manages open state.\n *\n * @example\n * ```tsx\n * import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, SheetDescription } from '@customafk/lunas-ui/ui/sheet';\n *\n * <Sheet>\n * <SheetTrigger>Open</SheetTrigger>\n * <SheetContent side=\"right\">\n * <SheetHeader>\n * <SheetTitle>Settings</SheetTitle>\n * <SheetDescription>Manage your preferences.</SheetDescription>\n * </SheetHeader>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\n/** Button or element that opens the Sheet when interacted with. */\nfunction SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\n/** Button that programmatically closes the Sheet. */\nfunction SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\n/** Portals Sheet content outside the current DOM hierarchy. */\nfunction SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the Sheet panel. */\nfunction SheetOverlay({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * The sliding panel itself; renders on the specified `side` of the viewport and includes a built-in close button.\n */\nfunction SheetContent({\n className,\n children,\n side = 'right',\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n /** Edge of the viewport from which the sheet slides in. */\n side?: 'top' | 'right' | 'bottom' | 'left';\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n 'bg-background',\n 'fixed z-50 flex flex-col gap-4 border-border-weak shadow-dropdown transition ease-in-out',\n\n 'data-[state=open]:animate-in',\n 'data-[state=open]:duration-500',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:duration-300',\n\n side === 'right' && 'inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n side === 'right' && 'data-[state=closed]:slide-out-to-right',\n side === 'right' && 'data-[state=open]:slide-in-from-right',\n\n side === 'left' && 'inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n side === 'left' && 'data-[state=closed]:slide-out-to-left',\n side === 'left' && 'data-[state=open]:slide-in-from-left',\n\n side === 'top' && 'inset-x-0 top-0 h-auto border-b',\n side === 'top' && 'data-[state=closed]:slide-out-to-top',\n side === 'top' && 'data-[state=open]:slide-in-from-top',\n\n side === 'bottom' && 'inset-x-0 bottom-0 h-auto border-t',\n side === 'bottom' && 'data-[state=closed]:slide-out-to-bottom',\n side === 'bottom' && 'data-[state=open]:slide-in-from-bottom',\n className\n )}\n {...props}\n >\n {children}\n <SheetPrimitive.Close\n className={cn(\n 'cursor-pointer p-2 ring-offset-background',\n 'absolute top-2 right-2 rounded-full opacity-70 transition-opacity',\n 'data-[state=open]:bg-secondary',\n 'disabled:pointer-events-none',\n 'hover:opacity-100',\n 'hover:bg-border-muted',\n 'focus:ring-border-weak',\n 'focus:ring-4',\n 'focus:outline-hidden'\n )}\n >\n <XIcon className=\"size-5\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n );\n}\n\n/** Padded container for the Sheet title and description at the top of the panel. */\nfunction SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sheet-header\" className={cn('flex flex-0 flex-col gap-1
|
|
1
|
+
{"version":3,"file":"sheet.mjs","names":["SheetPrimitive"],"sources":["../../packages/components/ui/sheet.tsx"],"sourcesContent":["'use client';\n\nimport { XIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Dialog as SheetPrimitive } from 'radix-ui';\n\n/**\n * Root provider for the Sheet panel — wraps all Sheet sub-components and manages open state.\n *\n * @example\n * ```tsx\n * import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, SheetDescription } from '@customafk/lunas-ui/ui/sheet';\n *\n * <Sheet>\n * <SheetTrigger>Open</SheetTrigger>\n * <SheetContent side=\"right\">\n * <SheetHeader>\n * <SheetTitle>Settings</SheetTitle>\n * <SheetDescription>Manage your preferences.</SheetDescription>\n * </SheetHeader>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\n/** Button or element that opens the Sheet when interacted with. */\nfunction SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\n/** Button that programmatically closes the Sheet. */\nfunction SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\n/** Portals Sheet content outside the current DOM hierarchy. */\nfunction SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />;\n}\n\n/** Semi-transparent backdrop rendered behind the Sheet panel. */\nfunction SheetOverlay({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/50',\n 'data-[state=open]:animate-in',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0',\n 'data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * The sliding panel itself; renders on the specified `side` of the viewport and includes a built-in close button.\n */\nfunction SheetContent({\n className,\n children,\n side = 'right',\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n /** Edge of the viewport from which the sheet slides in. */\n side?: 'top' | 'right' | 'bottom' | 'left';\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n 'bg-background',\n 'fixed z-50 flex flex-col gap-4 border-border-weak shadow-dropdown transition ease-in-out',\n\n 'data-[state=open]:animate-in',\n 'data-[state=open]:duration-500',\n 'data-[state=closed]:animate-out',\n 'data-[state=closed]:duration-300',\n\n side === 'right' && 'inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n side === 'right' && 'data-[state=closed]:slide-out-to-right',\n side === 'right' && 'data-[state=open]:slide-in-from-right',\n\n side === 'left' && 'inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n side === 'left' && 'data-[state=closed]:slide-out-to-left',\n side === 'left' && 'data-[state=open]:slide-in-from-left',\n\n side === 'top' && 'inset-x-0 top-0 h-auto border-b',\n side === 'top' && 'data-[state=closed]:slide-out-to-top',\n side === 'top' && 'data-[state=open]:slide-in-from-top',\n\n side === 'bottom' && 'inset-x-0 bottom-0 h-auto border-t',\n side === 'bottom' && 'data-[state=closed]:slide-out-to-bottom',\n side === 'bottom' && 'data-[state=open]:slide-in-from-bottom',\n className\n )}\n {...props}\n >\n {children}\n <SheetPrimitive.Close\n className={cn(\n 'cursor-pointer p-2 ring-offset-background',\n 'absolute top-2 right-2 rounded-full opacity-70 transition-opacity',\n 'data-[state=open]:bg-secondary',\n 'disabled:pointer-events-none',\n 'hover:opacity-100',\n 'hover:bg-border-muted',\n 'focus:ring-border-weak',\n 'focus:ring-4',\n 'focus:outline-hidden'\n )}\n >\n <XIcon className=\"size-5\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n );\n}\n\n/** Padded container for the Sheet title and description at the top of the panel. */\nfunction SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sheet-header\" className={cn('flex flex-0 flex-col gap-1 p-4', className)} {...props} />;\n}\n\n/** Sticky footer area at the bottom of the Sheet panel, typically used for action buttons. */\nfunction SheetFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sheet-footer\" className={cn('mt-auto flex flex-0 flex-col gap-2 p-4', className)} {...props} />;\n}\n\n/** Accessible title element for the Sheet, announced by screen readers on open. */\nfunction SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return <SheetPrimitive.Title data-slot=\"sheet-title\" className={cn('font-semibold text-text-positive-strong', className)} {...props} />;\n}\n\n/** Accessible description element for the Sheet, providing supplemental context to the title. */\nfunction SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>) {\n return <SheetPrimitive.Description data-slot=\"sheet-description\" className={cn('text-sm text-text-positive-weak', className)} {...props} />;\n}\n\nexport { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };\n"],"mappings":"0LA0BA,SAAS,EAAM,CAAE,GAAG,GAA2D,CAC7E,OAAO,EAACA,EAAe,KAAhB,CAAqB,YAAU,QAAQ,GAAI,CAAQ,CAAA,CAC5D,CAGA,SAAS,EAAa,CAAE,GAAG,GAA8D,CACvF,OAAO,EAACA,EAAe,QAAhB,CAAwB,YAAU,gBAAgB,GAAI,CAAQ,CAAA,CACvE,CAGA,SAAS,EAAW,CAAE,GAAG,GAA4D,CACnF,OAAO,EAACA,EAAe,MAAhB,CAAsB,YAAU,cAAc,GAAI,CAAQ,CAAA,CACnE,CAGA,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAACA,EAAe,OAAhB,CAAuB,YAAU,eAAe,GAAI,CAAQ,CAAA,CACrE,CAGA,SAAS,EAAa,CAAE,YAAW,GAAG,GAA8D,CAClG,OACE,EAACA,EAAe,QAAhB,CACE,YAAU,gBACV,UAAW,EACT,iCACA,+BACA,kCACA,iCACA,8BACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAKA,SAAS,EAAa,CACpB,YACA,WACA,OAAO,QACP,GAAG,GAIF,CACD,OACE,EAAC,EAAD,CAAA,SAAA,CACE,EAAC,EAAD,CAAe,CAAA,EACf,EAACA,EAAe,QAAhB,CACE,YAAU,gBACV,UAAW,EACT,gBACA,2FAEA,+BACA,iCACA,kCACA,mCAEA,IAAS,SAAW,sDACpB,IAAS,SAAW,yCACpB,IAAS,SAAW,wCAEpB,IAAS,QAAU,qDACnB,IAAS,QAAU,wCACnB,IAAS,QAAU,uCAEnB,IAAS,OAAS,kCAClB,IAAS,OAAS,uCAClB,IAAS,OAAS,sCAElB,IAAS,UAAY,qCACrB,IAAS,UAAY,0CACrB,IAAS,UAAY,yCACrB,CACF,EACA,GAAI,EA5BN,SAAA,CA8BG,EACD,EAACA,EAAe,MAAhB,CACE,UAAW,EACT,4CACA,oEACA,iCACA,+BACA,oBACA,wBACA,yBACA,eACA,sBACF,EAXF,SAAA,CAaE,EAAC,EAAD,CAAO,UAAU,QAAU,CAAA,EAC3B,EAAC,OAAD,CAAM,UAAU,UAAU,SAAA,OAAW,CAAA,CACjB,CACA,CAAA,CAAA,CACb,CAAA,CAAA,CAAA,CAAA,CAEjB,CAGA,SAAS,EAAY,CAAE,YAAW,GAAG,GAAsC,CACzE,OAAO,EAAC,MAAD,CAAK,YAAU,eAAe,UAAW,EAAG,iCAAkC,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC/G,CAGA,SAAS,EAAY,CAAE,YAAW,GAAG,GAAsC,CACzE,OAAO,EAAC,MAAD,CAAK,YAAU,eAAe,UAAW,EAAG,yCAA0C,CAAS,EAAG,GAAI,CAAQ,CAAA,CACvH,CAGA,SAAS,EAAW,CAAE,YAAW,GAAG,GAA4D,CAC9F,OAAO,EAACA,EAAe,MAAhB,CAAsB,YAAU,cAAc,UAAW,EAAG,0CAA2C,CAAS,EAAG,GAAI,CAAQ,CAAA,CACxI,CAGA,SAAS,EAAiB,CAAE,YAAW,GAAG,GAAkE,CAC1G,OAAO,EAACA,EAAe,YAAhB,CAA4B,YAAU,oBAAoB,UAAW,EAAG,kCAAmC,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC5I"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
//#region packages/components/layouts/ui-grid.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Container-query breakpoint keys used by `UIGrid`'s `cols` and `UIGridItem`'s
|
|
4
|
+
* `span`, resolved against the nearest ancestor `@container/ui-grid` (i.e. the
|
|
5
|
+
* grid's own rendered width, not the viewport). These match Tailwind v4's default
|
|
6
|
+
* container-query scale exactly:
|
|
7
|
+
* - `'base'` — always applied, no minimum width (the fallback/mobile-first value).
|
|
8
|
+
* - `'sm'` — applies from **384px** (`24rem`) and up.
|
|
9
|
+
* - `'md'` — applies from **448px** (`28rem`) and up.
|
|
10
|
+
* - `'lg'` — applies from **512px** (`32rem`) and up.
|
|
11
|
+
* - `'xl'` — applies from **576px** (`36rem`) and up.
|
|
12
|
+
* - `'2xl'` — applies from **672px** (`42rem`) and up.
|
|
13
|
+
* - `'3xl'` — applies from **768px** (`48rem`) and up.
|
|
14
|
+
*
|
|
15
|
+
* Whichever breakpoint's minimum width is currently satisfied (in ascending
|
|
16
|
+
* order) wins, same cascade behavior as Tailwind's ordinary `sm:`/`md:`/`lg:`
|
|
17
|
+
* responsive classes.
|
|
18
|
+
*/
|
|
19
|
+
type TUIGridBreakpoint = 'base' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
20
|
+
type TUIGridCols = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
21
|
+
type TUIGridColsConfig = TUIGridCols | Partial<Record<TUIGridBreakpoint, TUIGridCols>>;
|
|
22
|
+
declare const GAP_CLASS: {
|
|
23
|
+
readonly xs: "gap-1";
|
|
24
|
+
readonly sm: "gap-2";
|
|
25
|
+
readonly md: "gap-4";
|
|
26
|
+
readonly lg: "gap-6";
|
|
27
|
+
readonly xl: "gap-8";
|
|
28
|
+
readonly none: "gap-0";
|
|
29
|
+
};
|
|
30
|
+
type UIGridProps = React.PropsWithChildren<{
|
|
31
|
+
/** Additional Tailwind classes merged on top of the generated classes. */
|
|
32
|
+
className?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Number of base grid columns (`1`–`12`). Every `UIGridItem`'s `span` is
|
|
35
|
+
* expressed against this same column count at every container width.
|
|
36
|
+
* - A plain number fixes the column count at every width.
|
|
37
|
+
* - An object varies the column count as the grid's own rendered width crosses
|
|
38
|
+
* each container-query breakpoint (see {@link TUIGridBreakpoint} for the
|
|
39
|
+
* exact pixel value of each key) — e.g. "narrow container → 4 columns, wide
|
|
40
|
+
* container → 12 columns".
|
|
41
|
+
* @default 12
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* // 4 cols below 448px, 8 cols from 448px, 12 cols from 512px up
|
|
45
|
+
* <UIGrid cols={{ base: 4, md: 8, lg: 12 }} />
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
cols?: TUIGridColsConfig;
|
|
49
|
+
/**
|
|
50
|
+
* Gap between grid cells, reusing the same scale as `Flex`'s `gap` prop.
|
|
51
|
+
* - `'none'` — `gap-0`
|
|
52
|
+
* - `'xs'` — `gap-1`
|
|
53
|
+
* - `'sm'` — `gap-2`
|
|
54
|
+
* - `'md'` — `gap-4` (default)
|
|
55
|
+
* - `'lg'` — `gap-6`
|
|
56
|
+
* - `'xl'` — `gap-8`
|
|
57
|
+
* @default 'md'
|
|
58
|
+
*/
|
|
59
|
+
gap?: keyof typeof GAP_CLASS;
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* A 12-column CSS Grid container with a named `@container` context, so both its
|
|
63
|
+
* own column count and its `UIGridItem` children's `span` can vary based on the
|
|
64
|
+
* grid's own rendered width instead of the viewport.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```tsx
|
|
68
|
+
* import { UIGrid, UIGridItem } from '@customafk/lunas-ui/layouts/ui-grid';
|
|
69
|
+
*
|
|
70
|
+
* <UIGrid gap="md" cols={{ base: 4, md: 12 }}>
|
|
71
|
+
* <UIGridItem span={6}>Left</UIGridItem>
|
|
72
|
+
* <UIGridItem span={6}>Right</UIGridItem>
|
|
73
|
+
* </UIGrid>
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
declare const UIGrid: import("react").MemoExoticComponent<({ cols, gap, className, children }: UIGridProps) => import("react").JSX.Element>;
|
|
77
|
+
type TUIGridSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
78
|
+
type TUIGridItemSpan = TUIGridSpan | Partial<Record<TUIGridBreakpoint, TUIGridSpan>>;
|
|
79
|
+
type UIGridItemProps = React.PropsWithChildren<{
|
|
80
|
+
/** Additional Tailwind classes merged on top of the span classes. */
|
|
81
|
+
className?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Number of the grid's columns this item should occupy (`1`–`12`).
|
|
84
|
+
* - A plain number fixes the span at every container width.
|
|
85
|
+
* - An object varies the span as the *grid's own* rendered width crosses each
|
|
86
|
+
* container-query breakpoint (see {@link TUIGridBreakpoint} for the exact
|
|
87
|
+
* pixel value of each key), not the viewport.
|
|
88
|
+
* @default 12
|
|
89
|
+
* @example
|
|
90
|
+
* ```tsx
|
|
91
|
+
* <UIGridItem span={6} />
|
|
92
|
+
* // full-width below 384px, half from 384px, a third from 448px up
|
|
93
|
+
* <UIGridItem span={{ base: 12, sm: 6, md: 4 }} />
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
span?: TUIGridItemSpan;
|
|
97
|
+
/**
|
|
98
|
+
* Wraps `children` in a `Suspense` boundary so a lazy-loaded cell (e.g. a
|
|
99
|
+
* `React.lazy()` component) doesn't block sibling items from rendering.
|
|
100
|
+
* @default true
|
|
101
|
+
*/
|
|
102
|
+
suspense?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Fallback UI shown while suspended children are loading. Only relevant when
|
|
105
|
+
* `suspense` is `true`.
|
|
106
|
+
* @default null
|
|
107
|
+
*/
|
|
108
|
+
fallback?: React.ReactNode;
|
|
109
|
+
}>;
|
|
110
|
+
/**
|
|
111
|
+
* A single cell inside a `UIGrid`. Spans `12` of the grid's columns by default
|
|
112
|
+
* (a full-width row) and can vary its span per container-query breakpoint.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```tsx
|
|
116
|
+
* import { UIGrid, UIGridItem } from '@customafk/lunas-ui/layouts/ui-grid';
|
|
117
|
+
*
|
|
118
|
+
* <UIGrid>
|
|
119
|
+
* <UIGridItem span={{ base: 12, md: 6 }} suspense fallback={<Skeleton />}>
|
|
120
|
+
* <LazyWidget />
|
|
121
|
+
* </UIGridItem>
|
|
122
|
+
* </UIGrid>
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
declare const UIGridItem: import("react").MemoExoticComponent<({ span, className, children, suspense, fallback }: UIGridItemProps) => import("react").JSX.Element>;
|
|
126
|
+
//#endregion
|
|
127
|
+
export { TUIGridSpan as a, TUIGridItemSpan as i, TUIGridCols as n, UIGrid as o, TUIGridColsConfig as r, UIGridItem as s, TUIGridBreakpoint as t };
|
|
128
|
+
//# sourceMappingURL=ui-grid-CzL5J7cm.d.cts.map
|