@ngrok/mantle 0.73.2 → 0.73.4
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/accordion.d.ts +7 -9
- package/dist/accordion.js +1 -1
- package/dist/accordion.js.map +1 -1
- package/dist/agent.json +1 -1
- package/dist/alert-dialog.d.ts +33 -38
- package/dist/alert-dialog.js +1 -1
- package/dist/alert-dialog.js.map +1 -1
- package/dist/alert.d.ts +9 -11
- package/dist/alert.js +1 -1
- package/dist/alert.js.map +1 -1
- package/dist/{anchor-2stEauOz.js → anchor-CcTY5SIz.js} +2 -2
- package/dist/{anchor-2stEauOz.js.map → anchor-CcTY5SIz.js.map} +1 -1
- package/dist/anchor.d.ts +2 -3
- package/dist/anchor.js +1 -1
- package/dist/{as-child-CpZKMqTE.d.ts → as-child-uN_018tj.d.ts} +1 -1
- package/dist/badge.d.ts +3 -4
- package/dist/badge.js +1 -1
- package/dist/badge.js.map +1 -1
- package/dist/{booleanish-CBGdPL3Q.js → booleanish-BfvnW6vy.js} +1 -1
- package/dist/{booleanish-CBGdPL3Q.js.map → booleanish-BfvnW6vy.js.map} +1 -1
- package/dist/{browser-only-QPyyfLaB.js → browser-only-BSl_hruR.js} +1 -1
- package/dist/{browser-only-QPyyfLaB.js.map → browser-only-BSl_hruR.js.map} +1 -1
- package/dist/browser-only.js +1 -1
- package/dist/{button-POMJ-20y.js → button-BAxneEMu.js} +2 -2
- package/dist/{button-POMJ-20y.js.map → button-BAxneEMu.js.map} +1 -1
- package/dist/{button-DbHFERMB.d.ts → button-BYZOBUgj.d.ts} +16 -19
- package/dist/{button-GokecthL.js → button-uMIZVKit.js} +2 -2
- package/dist/{button-GokecthL.js.map → button-uMIZVKit.js.map} +1 -1
- package/dist/button.d.ts +4 -4
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +1 -2
- package/dist/calendar.js +1 -1
- package/dist/calendar.js.map +1 -1
- package/dist/card.d.ts +6 -7
- package/dist/card.js +1 -1
- package/dist/card.js.map +1 -1
- package/dist/checkbox.d.ts +3 -4
- package/dist/checkbox.js +1 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/code-block.d.ts +17 -19
- package/dist/code-block.js +1 -1
- package/dist/code-block.js.map +1 -1
- package/dist/code-block_highlight-utils.d.ts +1 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +2 -3
- package/dist/code.js +1 -1
- package/dist/code.js.map +1 -1
- package/dist/color.d.ts +2 -2
- package/dist/color.js.map +1 -1
- package/dist/combobox.d.ts +11 -13
- package/dist/combobox.js +1 -1
- package/dist/combobox.js.map +1 -1
- package/dist/command.d.ts +133 -220
- package/dist/command.js +1 -1
- package/dist/command.js.map +1 -1
- package/dist/{compose-refs-DZ3cPi47.js → compose-refs-Cjf2gfB8.js} +1 -1
- package/dist/{compose-refs-DZ3cPi47.js.map → compose-refs-Cjf2gfB8.js.map} +1 -1
- package/dist/{copy-to-clipboard-CNMRyck4.js → copy-to-clipboard-Baw30q9O.js} +2 -2
- package/dist/{copy-to-clipboard-CNMRyck4.js.map → copy-to-clipboard-Baw30q9O.js.map} +1 -1
- package/dist/{cx-D1HYnpvA.js → cx-CBSnSC36.js} +1 -1
- package/dist/{cx-D1HYnpvA.js.map → cx-CBSnSC36.js.map} +1 -1
- package/dist/cx.js +1 -1
- package/dist/data-table.d.ts +13 -15
- package/dist/data-table.js +1 -1
- package/dist/data-table.js.map +1 -1
- package/dist/{deep-non-nullable-Xu7ckQM6.d.ts → deep-non-nullable-BxRoySYR.d.ts} +1 -1
- package/dist/description-list.d.ts +5 -6
- package/dist/description-list.js +1 -1
- package/dist/description-list.js.map +1 -1
- package/dist/{dialog-B1KCB7JT.js → dialog-Dn-brQBw.js} +2 -2
- package/dist/{dialog-B1KCB7JT.js.map → dialog-Dn-brQBw.js.map} +1 -1
- package/dist/dialog.d.ts +14 -17
- package/dist/dialog.js +1 -1
- package/dist/{direction-D9IZ1wW6.d.ts → direction-CcTY0FmA.d.ts} +2 -2
- package/dist/{direction-HqPHXGIs.js → direction-Wa9W2F61.js} +1 -1
- package/dist/{direction-HqPHXGIs.js.map → direction-Wa9W2F61.js.map} +1 -1
- package/dist/{dropdown-menu-CvOiQUSZ.d.ts → dropdown-menu-BgYk4L8o.d.ts} +22 -24
- package/dist/{dropdown-menu-DY4w933w.js → dropdown-menu-C3YZJBkV.js} +2 -2
- package/dist/{dropdown-menu-DY4w933w.js.map → dropdown-menu-C3YZJBkV.js.map} +1 -1
- package/dist/dropdown-menu.d.ts +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +7 -8
- package/dist/empty.js +1 -1
- package/dist/empty.js.map +1 -1
- package/dist/{field-context-B7Z1cmZW.js → field-context-4k1kI7Bo.js} +2 -2
- package/dist/{field-context-B7Z1cmZW.js.map → field-context-4k1kI7Bo.js.map} +1 -1
- package/dist/field.d.ts +45 -25
- package/dist/field.js +1 -1
- package/dist/field.js.map +1 -1
- package/dist/flag.d.ts +1 -2
- package/dist/flag.js +1 -1
- package/dist/flag.js.map +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/hover-card.d.ts +4 -6
- package/dist/hover-card.js +1 -1
- package/dist/hover-card.js.map +1 -1
- package/dist/{icon-bWc5yC3-.js → icon-C8bYBIHW.js} +2 -2
- package/dist/{icon-bWc5yC3-.js.map → icon-C8bYBIHW.js.map} +1 -1
- package/dist/{icon-button-ZKN0sRIJ.js → icon-button-C_Ht_g1C.js} +2 -2
- package/dist/{icon-button-ZKN0sRIJ.js.map → icon-button-C_Ht_g1C.js.map} +1 -1
- package/dist/{icon-button-BDTb-lxs.d.ts → icon-button-ntupABbM.d.ts} +6 -8
- package/dist/{icon-BJ7q2RXZ.d.ts → icon-n49kOh4_.d.ts} +3 -4
- package/dist/icon.d.ts +3 -3
- package/dist/icon.js +1 -1
- package/dist/icons.d.ts +9 -10
- package/dist/icons.js +1 -1
- package/dist/icons.js.map +1 -1
- package/dist/{in-view-BUgyu-Tk.d.ts → in-view-BC3wmz-a.d.ts} +1 -1
- package/dist/{in-view-CeVqeGbv.js → in-view-C2DpZ6s0.js} +1 -1
- package/dist/{in-view-CeVqeGbv.js.map → in-view-C2DpZ6s0.js.map} +1 -1
- package/dist/{index-BhlxYL_y.d.ts → index-BL5WVva_.d.ts} +3 -6
- package/dist/{index-CWXKBva-.d.ts → index-DBZ3eRsl.d.ts} +5 -7
- package/dist/{index-DS_4n2eb.d.ts → index-DorCusfG.d.ts} +1 -1
- package/dist/{index-BbZBDzPh.d.ts → index-L3NmbHi5.d.ts} +1 -1
- package/dist/input.d.ts +7 -8
- package/dist/input.js +1 -1
- package/dist/input.js.map +1 -1
- package/dist/{is-input-CtUHJGgL.js → is-input-CXmS0OFN.js} +1 -1
- package/dist/{is-input-CtUHJGgL.js.map → is-input-CXmS0OFN.js.map} +1 -1
- package/dist/{kbd-CbMxDL9E.js → kbd-Bv6tefdB.js} +2 -2
- package/dist/{kbd-CbMxDL9E.js.map → kbd-Bv6tefdB.js.map} +1 -1
- package/dist/kbd.d.ts +1 -2
- package/dist/kbd.js +1 -1
- package/dist/{label-x6FcOpxc.js → label-DhIUmTN2.js} +2 -2
- package/dist/{label-x6FcOpxc.js.map → label-DhIUmTN2.js.map} +1 -1
- package/dist/label.d.ts +2 -4
- package/dist/label.js +1 -1
- package/dist/llms.txt +1 -1
- package/dist/main.d.ts +1 -2
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/media-object.d.ts +4 -5
- package/dist/media-object.js +1 -1
- package/dist/media-object.js.map +1 -1
- package/dist/multi-select.d.ts +16 -18
- package/dist/multi-select.js +1 -1
- package/dist/multi-select.js.map +1 -1
- package/dist/otp-input.d.ts +6 -7
- package/dist/otp-input.js +1 -1
- package/dist/otp-input.js.map +1 -1
- package/dist/pagination.d.ts +7 -9
- package/dist/pagination.js +1 -1
- package/dist/pagination.js.map +1 -1
- package/dist/{popover-CoZxokw_.js → popover-DponNBot.js} +2 -2
- package/dist/{popover-CoZxokw_.js.map → popover-DponNBot.js.map} +1 -1
- package/dist/popover.d.ts +6 -7
- package/dist/popover.js +1 -1
- package/dist/primitive-Cn3h4DJg.js +2 -0
- package/dist/primitive-Cn3h4DJg.js.map +1 -0
- package/dist/{primitive-qkxTYBUY.d.ts → primitive-D_-h74Kt.d.ts} +2 -3
- package/dist/progress.d.ts +4 -5
- package/dist/progress.js +1 -1
- package/dist/progress.js.map +1 -1
- package/dist/radio-group.d.ts +18 -20
- package/dist/radio-group.js +1 -1
- package/dist/radio-group.js.map +1 -1
- package/dist/{resolve-pre-rendered-props-BfWe69-w.js → resolve-pre-rendered-props-C-vrNxH1.js} +8 -8
- package/dist/resolve-pre-rendered-props-C-vrNxH1.js.map +1 -0
- package/dist/{resolve-pre-rendered-props-BONSCwYA.d.ts → resolve-pre-rendered-props-DxJ9-DAl.d.ts} +1 -1
- package/dist/sandboxed-on-click.d.ts +3 -4
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/sandboxed-on-click.js.map +1 -1
- package/dist/{select-SZFFzYs0.d.ts → select-C15-XvRT.d.ts} +15 -16
- package/dist/select-Cxc9VmP8.js +2 -0
- package/dist/select-Cxc9VmP8.js.map +1 -0
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/separator-Bqjy77rG.js +2 -0
- package/dist/separator-Bqjy77rG.js.map +1 -0
- package/dist/separator.d.ts +3 -5
- package/dist/separator.js +1 -1
- package/dist/sheet.d.ts +15 -19
- package/dist/sheet.js +1 -1
- package/dist/sheet.js.map +1 -1
- package/dist/skeleton.d.ts +4 -6
- package/dist/skeleton.js +1 -1
- package/dist/skeleton.js.map +1 -1
- package/dist/skip-to-main-link.d.ts +1 -2
- package/dist/skip-to-main-link.js +1 -1
- package/dist/skip-to-main-link.js.map +1 -1
- package/dist/slider.d.ts +1 -2
- package/dist/slider.js +1 -1
- package/dist/slider.js.map +1 -1
- package/dist/{slot-D_ZUrdEW.js → slot-CV5fmqFr.js} +2 -2
- package/dist/{slot-D_ZUrdEW.js.map → slot-CV5fmqFr.js.map} +1 -1
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/{sort-mXo37xN2.js → sort-BPX2Fk9t.js} +2 -2
- package/dist/{sort-mXo37xN2.js.map → sort-BPX2Fk9t.js.map} +1 -1
- package/dist/split-button.d.ts +10 -12
- package/dist/split-button.js +1 -1
- package/dist/split-button.js.map +1 -1
- package/dist/{svg-only-7gYlsX8f.js → svg-only-Cz1cby8y.js} +2 -2
- package/dist/{svg-only-7gYlsX8f.js.map → svg-only-Cz1cby8y.js.map} +1 -1
- package/dist/{svg-only-D4uqM1OC.d.ts → svg-only-f6ToFLH0.d.ts} +3 -4
- package/dist/switch.d.ts +3 -5
- package/dist/switch.js +1 -1
- package/dist/switch.js.map +1 -1
- package/dist/{table-CjSQkfZe.d.ts → table-BWD9IlIN.d.ts} +10 -12
- package/dist/{table-CHd39aT-.js → table-eyoUW2Uv.js} +2 -2
- package/dist/{table-CHd39aT-.js.map → table-eyoUW2Uv.js.map} +1 -1
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +6 -9
- package/dist/tabs.js +1 -1
- package/dist/tabs.js.map +1 -1
- package/dist/text-area.d.ts +2 -3
- package/dist/text-area.js +1 -1
- package/dist/text-area.js.map +1 -1
- package/dist/theme-provider-MMwxHEfw.js +2 -0
- package/dist/theme-provider-MMwxHEfw.js.map +1 -0
- package/dist/theme.d.ts +9 -10
- package/dist/theme.js +1 -1
- package/dist/theme.js.map +1 -1
- package/dist/{themes-FPux5kIu.d.ts → themes-CYNpplwN.d.ts} +1 -1
- package/dist/toast-CR3MVChj.js +2 -0
- package/dist/toast-CR3MVChj.js.map +1 -0
- package/dist/toast.d.ts +8 -10
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +4 -6
- package/dist/tooltip.js +1 -1
- package/dist/tooltip.js.map +1 -1
- package/dist/{traffic-policy-file-BwHHdhWJ.js → traffic-policy-file-0g5RXFqu.js} +1 -1
- package/dist/{traffic-policy-file-BwHHdhWJ.js.map → traffic-policy-file-0g5RXFqu.js.map} +1 -1
- package/dist/{types-QKZ5fvaQ.d.ts → types-BvUzforF.d.ts} +1 -1
- package/dist/types-D85fCNV3.js +2 -0
- package/dist/{types-884RJJqm.js.map → types-D85fCNV3.js.map} +1 -1
- package/dist/types.d.ts +6 -6
- package/dist/types.js +1 -1
- package/dist/use-copy-to-clipboard-BLpquU9d.js +2 -0
- package/dist/{use-copy-to-clipboard-CTgtLjUg.js.map → use-copy-to-clipboard-BLpquU9d.js.map} +1 -1
- package/dist/{use-isomorphic-layout-effect-CNSD0lhi.js → use-isomorphic-layout-effect-DdTRtMY-.js} +1 -1
- package/dist/{use-isomorphic-layout-effect-CNSD0lhi.js.map → use-isomorphic-layout-effect-DdTRtMY-.js.map} +1 -1
- package/dist/{use-matches-media-query-CojcYxlA.js → use-matches-media-query-CMSxHR9n.js} +1 -1
- package/dist/{use-matches-media-query-CojcYxlA.js.map → use-matches-media-query-CMSxHR9n.js.map} +1 -1
- package/dist/{use-prefers-reduced-motion-Bpx8G3UT.js → use-prefers-reduced-motion-CWIoFA6W.js} +2 -2
- package/dist/{use-prefers-reduced-motion-Bpx8G3UT.js.map → use-prefers-reduced-motion-CWIoFA6W.js.map} +1 -1
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +1 -1
- package/dist/utils.js.map +1 -1
- package/dist/{validation-BYME8rWN.js → validation-DCyx-ceH.js} +1 -1
- package/dist/{validation-BYME8rWN.js.map → validation-DCyx-ceH.js.map} +1 -1
- package/dist/{validation-CBSOmooP.d.ts → validation-xyX_6kph.d.ts} +1 -1
- package/dist/{variant-props-BZbM__kQ.d.ts → variant-props-CVymuSfa.d.ts} +2 -2
- package/dist/{with-style-props-xzZLnIrF.d.ts → with-style-props-CyImx7vd.d.ts} +1 -1
- package/package.json +6 -6
- package/dist/primitive-tXm_8n_t.js +0 -2
- package/dist/primitive-tXm_8n_t.js.map +0 -1
- package/dist/resolve-pre-rendered-props-BfWe69-w.js.map +0 -1
- package/dist/select-B7orOUPj.js +0 -2
- package/dist/select-B7orOUPj.js.map +0 -1
- package/dist/separator-awchG4LI.js +0 -2
- package/dist/separator-awchG4LI.js.map +0 -1
- package/dist/theme-provider-BFcnjeME.js +0 -2
- package/dist/theme-provider-BFcnjeME.js.map +0 -1
- package/dist/toast-CGnquSKO.js +0 -2
- package/dist/toast-CGnquSKO.js.map +0 -1
- package/dist/types-884RJJqm.js +0 -2
- package/dist/use-copy-to-clipboard-CTgtLjUg.js +0 -2
package/dist/command.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","names":["CommandPrimitive"],"sources":["../src/components/command/command.tsx","../src/components/command/meta-key.tsx"],"sourcesContent":["\"use client\";\n\nimport { MagnifyingGlassIcon } from \"@phosphor-icons/react/MagnifyingGlass\";\nimport { Command as CommandPrimitive, useCommandState } from \"cmdk\";\n\nimport {\n\ttype ComponentPropsWithoutRef,\n\ttype ComponentRef,\n\ttype ReactNode,\n\tforwardRef,\n} from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Dialog } from \"../dialog/dialog.js\";\nimport { Separator } from \"../separator/separator.js\";\n\ntype CommandRootProps = ComponentPropsWithoutRef<typeof CommandPrimitive>;\n\n/**\n * The root component for the Command. It provides the context for all other command sub-components.\n *\n * @see https://mantle.ngrok.com/components/command#commandroot\n *\n * @example\n * ```tsx\n * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n * <Command.Dialog.Trigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.Dialog.Trigger>\n * <Command.Dialog.Content>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog.Content>\n * </Command.Dialog.Root>\n * ```\n */\nconst CommandRoot = forwardRef<ComponentRef<\"div\">, CommandRootProps>(\n\t({ className, ...props }, ref) => (\n\t\t<CommandPrimitive\n\t\t\tref={ref}\n\t\t\tdata-slot=\"command\"\n\t\t\tclassName={cx(\"bg-popover flex h-full w-full flex-col overflow-hidden rounded-md\", className)}\n\t\t\t{...props}\n\t\t/>\n\t),\n);\nCommandRoot.displayName = \"Command\";\n\n/**\n * The props for the CommandDialog.Content component.\n *\n * @see https://mantle.ngrok.com/components/command#commanddialogcontent\n */\ntype CommandDialogContentProps = {\n\t/**\n\t * The content of the command dialog (inputs, lists, etc.).\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * Class name(s) to apply to the command dialog content.\n\t */\n\tclassName?: string;\n\t/**\n\t * The accessible title of the command dialog. Visually hidden.\n\t *\n\t * @default \"Command Palette\"\n\t */\n\ttitle?: string;\n\t/**\n\t * The accessible description of the command dialog. Visually hidden.\n\t *\n\t * @default \"Search for a command to run...\"\n\t */\n\tdescription?: string;\n\t/**\n\t * Whether to show the close button.\n\t *\n\t * @default true\n\t */\n\tshowCloseButton?: boolean;\n\t/**\n\t * Custom filter function for the command list.\n\t *\n\t * @see https://github.com/pacocoursey/cmdk?tab=readme-ov-file#filtering\n\t */\n\tfilter?: CommandRootProps[\"filter\"];\n\t/**\n\t * Whether to enable filtering of command items. When false, disables built-in filtering.\n\t *\n\t * @see https://github.com/pacocoursey/cmdk?tab=readme-ov-file#filtering\n\t */\n\tshouldFilter?: CommandRootProps[\"shouldFilter\"];\n};\n\n/**\n * The content of the CommandDialog. Renders the accessible title/description,\n * the command palette UI, and an optional close button.\n *\n * @see https://mantle.ngrok.com/components/command#commanddialogcontent\n *\n * @example\n * ```tsx\n * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n * <Command.Dialog.Trigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.Dialog.Trigger>\n * <Command.Dialog.Content>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog.Content>\n * </Command.Dialog.Root>\n * ```\n */\nconst CommandDialogContent = ({\n\tchildren,\n\tclassName,\n\tdescription = \"Search for a command to run...\",\n\tfilter,\n\tshouldFilter,\n\tshowCloseButton = true,\n\ttitle = \"Command Palette\",\n}: CommandDialogContentProps) => (\n\t<Dialog.Content className={cx(\"overflow-hidden p-0 relative\", className)}>\n\t\t<Dialog.Header className=\"sr-only absolute\">\n\t\t\t<Dialog.Title>{title}</Dialog.Title>\n\t\t\t<Dialog.Description>{description}</Dialog.Description>\n\t\t</Dialog.Header>\n\t\t<CommandRoot\n\t\t\tclassName=\"**:data-[slot=command-input-wrapper]:h-12 **:[[cmdk-input]]:h-12 **:data-[slot=command-group]:px-2 **:data-[slot=command-list]:pb-1\"\n\t\t\tfilter={filter}\n\t\t\tshouldFilter={shouldFilter}\n\t\t>\n\t\t\t{children}\n\t\t</CommandRoot>\n\t\t{showCloseButton && (\n\t\t\t<div className=\"absolute top-1.5 right-1.5\">\n\t\t\t\t<Dialog.CloseIconButton />\n\t\t\t</div>\n\t\t)}\n\t</Dialog.Content>\n);\nCommandDialogContent.displayName = \"CommandDialogContent\";\n\n/**\n * A compound namespace for building a command palette dialog with trigger support.\n *\n * @see https://mantle.ngrok.com/components/command#commanddialog\n *\n * @example\n * ```tsx\n * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n * <Command.Dialog.Trigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.Dialog.Trigger>\n * <Command.Dialog.Content>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog.Content>\n * </Command.Dialog.Root>\n * ```\n */\nconst CommandDialog = {\n\t/**\n\t * The root stateful component for the CommandDialog. Manages open/closed state.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commanddialogroot\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n\t * <Command.Dialog.Trigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.Dialog.Trigger>\n\t * <Command.Dialog.Content>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.Dialog.Content>\n\t * </Command.Dialog.Root>\n\t * ```\n\t */\n\tRoot: Dialog.Root,\n\t/**\n\t * A button that opens the CommandDialog when clicked.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commanddialogtrigger\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n\t * <Command.Dialog.Trigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.Dialog.Trigger>\n\t * <Command.Dialog.Content>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.Dialog.Content>\n\t * </Command.Dialog.Root>\n\t * ```\n\t */\n\tTrigger: Dialog.Trigger,\n\t/**\n\t * The visible content of the CommandDialog. Renders inside the dialog portal.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commanddialogcontent\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n\t * <Command.Dialog.Trigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.Dialog.Trigger>\n\t * <Command.Dialog.Content>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.Dialog.Content>\n\t * </Command.Dialog.Root>\n\t * ```\n\t */\n\tContent: CommandDialogContent,\n} as const;\n\n/**\n * The input component for the Command. It provides the input for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command#commandinput\n *\n * @example\n * ```tsx\n * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n * <Command.Dialog.Trigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.Dialog.Trigger>\n * <Command.Dialog.Content>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog.Content>\n * </Command.Dialog.Root>\n * ```\n */\nconst CommandInput = forwardRef<\n\tComponentRef<\"div\">,\n\tComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tdata-slot=\"command-input-wrapper\"\n\t\tclassName=\"flex h-9 items-center gap-2 border-b border-popover px-3\"\n\t>\n\t\t<MagnifyingGlassIcon className=\"size-5 shrink-0 opacity-50\" />\n\t\t<CommandPrimitive.Input\n\t\t\tdata-slot=\"command-input\"\n\t\t\tclassName={cx(\n\t\t\t\t\"placeholder:text-muted flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</div>\n));\nCommandInput.displayName = \"CommandInput\";\n\n/**\n * The list component for the Command. It provides the list for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command#commandlist\n *\n * @example\n * ```tsx\n * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n * <Command.Dialog.Trigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.Dialog.Trigger>\n * <Command.Dialog.Content>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog.Content>\n * </Command.Dialog.Root>\n * ```\n */\nconst CommandList = forwardRef<\n\tComponentRef<\"div\">,\n\tComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.List\n\t\tref={ref}\n\t\tdata-slot=\"command-list\"\n\t\tclassName={cx(\"max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto scrollbar\", className)}\n\t\t{...props}\n\t/>\n));\nCommandList.displayName = \"CommandList\";\n\n/**\n * The empty component for the Command. It provides the empty state for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command#commandempty\n *\n * @example\n * ```tsx\n * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n * <Command.Dialog.Trigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.Dialog.Trigger>\n * <Command.Dialog.Content>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog.Content>\n * </Command.Dialog.Root>\n * ```\n */\nconst CommandEmpty = forwardRef<\n\tComponentRef<\"div\">,\n\tComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Empty\n\t\tref={ref}\n\t\tdata-slot=\"command-empty\"\n\t\tclassName={cx(\"py-6 text-center text-sm\", className)}\n\t\t{...props}\n\t/>\n));\nCommandEmpty.displayName = \"CommandEmpty\";\n\n/**\n * The group component for the Command. It provides the group for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command#commandgroup\n *\n * @example\n * ```tsx\n * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n * <Command.Dialog.Trigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.Dialog.Trigger>\n * <Command.Dialog.Content>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog.Content>\n * </Command.Dialog.Root>\n * ```\n */\nconst CommandGroup = forwardRef<\n\tComponentRef<\"div\">,\n\tComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Group\n\t\tref={ref}\n\t\tdata-slot=\"command-group\"\n\t\tclassName={cx(\n\t\t\t\"**:[[cmdk-group-heading]]:text-muted overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCommandGroup.displayName = \"CommandGroup\";\n\n/**\n * The separator component for the Command. It provides the separator for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command#commandseparator\n *\n * @example\n * ```tsx\n * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n * <Command.Dialog.Trigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.Dialog.Trigger>\n * <Command.Dialog.Content>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog.Content>\n * </Command.Dialog.Root>\n * ```\n */\nconst CommandSeparator = forwardRef<\n\tComponentRef<typeof CommandPrimitive.Separator>,\n\tComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Separator ref={ref} data-slot=\"command-separator\" asChild {...props}>\n\t\t<Separator className={cx(\"-mx-1 my-1 w-auto\", className)} />\n\t</CommandPrimitive.Separator>\n));\nCommandSeparator.displayName = \"CommandSeparator\";\n\n/**\n * The item component for the Command. It provides the item for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command#commanditem\n *\n * @example\n * ```tsx\n * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n * <Command.Dialog.Trigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.Dialog.Trigger>\n * <Command.Dialog.Content>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog.Content>\n * </Command.Dialog.Root>\n * ```\n */\nconst CommandItem = forwardRef<\n\tComponentRef<\"div\">,\n\tComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Item\n\t\tref={ref}\n\t\tdata-slot=\"command-item\"\n\t\tclassName={cx(\n\t\t\t\"data-[selected=true]:bg-active-menu-item [&_svg:not([class*='text-'])]:text-muted relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-5\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCommandItem.displayName = \"CommandItem\";\n\n/**\n * The shortcut component for the Command. It provides the shortcut for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command#commandshortcut\n *\n * @example\n * ```tsx\n * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n * <Command.Dialog.Trigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.Dialog.Trigger>\n * <Command.Dialog.Content>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog.Content>\n * </Command.Dialog.Root>\n * ```\n */\nconst CommandShortcut = forwardRef<ComponentRef<\"span\">, ComponentPropsWithoutRef<\"span\">>(\n\t({ className, ...props }, ref) => (\n\t\t<span\n\t\t\tref={ref}\n\t\t\tdata-slot=\"command-shortcut\"\n\t\t\tclassName={cx(\"text-muted ml-auto text-xs tracking-widest\", className)}\n\t\t\t{...props}\n\t\t/>\n\t),\n);\nCommandShortcut.displayName = \"CommandShortcut\";\n\n/**\n * The command component for the Command. It provides the command for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command\n *\n * @example\n * Composition:\n * ```\n * Command.Dialog.Root\n * ├── Command.Dialog.Trigger\n * └── Command.Dialog.Content\n * ├── Command.Input\n * └── Command.List\n * ├── Command.Empty\n * ├── Command.Group\n * │ └── Command.Item\n * │ └── Command.Shortcut\n * └── Command.Separator\n * ```\n *\n * @example\n * ```tsx\n * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n * <Command.Dialog.Trigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.Dialog.Trigger>\n * <Command.Dialog.Content>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog.Content>\n * </Command.Dialog.Root>\n * ```\n */\nconst Command = {\n\t/**\n\t * The root component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commandroot\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n\t * <Command.Dialog.Trigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.Dialog.Trigger>\n\t * <Command.Dialog.Content>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.Dialog.Content>\n\t * </Command.Dialog.Root>\n\t * ```\n\t */\n\tRoot: CommandRoot,\n\t/**\n\t * A compound namespace for building a command palette dialog.\n\t * Use `Command.Dialog.Root`, `Command.Dialog.Trigger`, and `Command.Dialog.Content`.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commanddialog\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n\t * <Command.Dialog.Trigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.Dialog.Trigger>\n\t * <Command.Dialog.Content>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.Dialog.Content>\n\t * </Command.Dialog.Root>\n\t * ```\n\t */\n\tDialog: CommandDialog,\n\t/**\n\t * The input component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commandinput\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n\t * <Command.Dialog.Trigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.Dialog.Trigger>\n\t * <Command.Dialog.Content>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.Dialog.Content>\n\t * </Command.Dialog.Root>\n\t * ```\n\t */\n\tInput: CommandInput,\n\t/**\n\t * The list component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commandlist\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n\t * <Command.Dialog.Trigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.Dialog.Trigger>\n\t * <Command.Dialog.Content>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.Dialog.Content>\n\t * </Command.Dialog.Root>\n\t * ```\n\t */\n\tList: CommandList,\n\t/**\n\t * The empty component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commandempty\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n\t * <Command.Dialog.Trigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.Dialog.Trigger>\n\t * <Command.Dialog.Content>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.Dialog.Content>\n\t * </Command.Dialog.Root>\n\t * ```\n\t */\n\tEmpty: CommandEmpty,\n\t/**\n\t * The group component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commandgroup\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n\t * <Command.Dialog.Trigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.Dialog.Trigger>\n\t * <Command.Dialog.Content>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.Dialog.Content>\n\t * </Command.Dialog.Root>\n\t * ```\n\t */\n\tGroup: CommandGroup,\n\t/**\n\t * The item component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commanditem\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n\t * <Command.Dialog.Trigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.Dialog.Trigger>\n\t * <Command.Dialog.Content>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.Dialog.Content>\n\t * </Command.Dialog.Root>\n\t * ```\n\t */\n\tItem: CommandItem,\n\t/**\n\t * The shortcut component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commandshortcut\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n\t * <Command.Dialog.Trigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.Dialog.Trigger>\n\t * <Command.Dialog.Content>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.Dialog.Content>\n\t * </Command.Dialog.Root>\n\t * ```\n\t */\n\tShortcut: CommandShortcut,\n\t/**\n\t * The separator component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commandseparator\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.Dialog.Root open={open} onOpenChange={setOpen}>\n\t * <Command.Dialog.Trigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.Dialog.Trigger>\n\t * <Command.Dialog.Content>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.Dialog.Content>\n\t * </Command.Dialog.Root>\n\t * ```\n\t */\n\tSeparator: CommandSeparator,\n} as const;\n\nexport {\n\t//,\n\tCommand,\n\tuseCommandState,\n};\n","import { type ComponentProps, useEffect, useState } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Kbd } from \"../kbd/kbd.js\";\n\ntype Props = Omit<ComponentProps<\"kbd\">, \"children\">;\n\ntype Mod = \"⌘\" | \"⌃\";\n\n/**\n * Renders the platform-appropriate meta key kbd (⌘ or ⌃).\n *\n * - Initializes to `\"⌃\"` to avoid SSR mismatch.\n * - Updates on mount using `detectMetaKey()`.\n */\nfunction MetaKey({ className, ...props }: Props) {\n\tconst [glyph, setGlyph] = useState<Mod>(\"⌃\");\n\n\tuseEffect(() => {\n\t\tsetGlyph(detectMetaKey());\n\t}, []);\n\n\tconst label = glyph === \"⌘\" ? \"Command\" : \"Control\";\n\n\treturn (\n\t\t<Kbd\n\t\t\t{...props}\n\t\t\tsuppressHydrationWarning\n\t\t\tdata-slot=\"meta-key\"\n\t\t\tclassName={cx(glyph === \"⌃\" && \"font-medium\", className)}\n\t\t>\n\t\t\t<span className=\"sr-only\">{label}</span>\n\t\t\t{glyph}\n\t\t</Kbd>\n\t);\n}\n\nexport {\n\t//,\n\tMetaKey,\n};\n\n/**\n * Type guard for `navigator.userAgentData` existence.\n * Useful for newer UA hints where `platform` may be available.\n *\n * @param navigator The global `navigator`\n * @returns `true` if UA Data hints exist; narrows `navigator` accordingly.\n */\nfunction hasUAData(\n\tnavigator: Navigator,\n): navigator is Navigator & { userAgentData: { platform?: string } } {\n\treturn \"userAgentData\" in navigator;\n}\n\n/**\n * Detects the appropriate meta key label for the current platform.\n *\n * SSR-safe: returns `\"⌃\"` when `navigator` is not available.\n *\n * @returns `\"⌘\"` for Apple platforms; otherwise `\"⌃\"`.\n */\nfunction detectMetaKey(): Mod {\n\tif (typeof navigator === \"undefined\") {\n\t\treturn \"⌃\"; // SSR default\n\t}\n\n\tlet platform = \"\";\n\n\tif (hasUAData(navigator)) {\n\t\tplatform = navigator.userAgentData.platform ?? \"\";\n\t}\n\n\tif (!platform) {\n\t\tplatform = navigator.platform || navigator.userAgent || \"\";\n\t}\n\n\tconst isApple = /mac|iphone|ipad|ipod/i.test(platform);\n\n\tif (isApple) {\n\t\treturn \"⌘\";\n\t}\n\n\treturn \"⌃\";\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"command.js","names":["CommandPrimitive"],"sources":["../src/components/command/command.tsx","../src/components/command/meta-key.tsx"],"sourcesContent":["\"use client\";\n\nimport { MagnifyingGlassIcon } from \"@phosphor-icons/react/MagnifyingGlass\";\nimport { Command as CommandPrimitive, useCommandState } from \"cmdk\";\n\nimport {\n\ttype ComponentPropsWithoutRef,\n\ttype ComponentRef,\n\ttype ReactNode,\n\tforwardRef,\n} from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Dialog } from \"../dialog/dialog.js\";\nimport { Separator } from \"../separator/separator.js\";\n\ntype CommandRootProps = ComponentPropsWithoutRef<typeof CommandPrimitive>;\n\n/**\n * The root component for the Command. It provides the context for all other command sub-components.\n *\n * @see https://mantle.ngrok.com/components/command#commandroot\n *\n * @example\n * ```tsx\n * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n * <Command.DialogTrigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.DialogTrigger>\n * <Command.DialogContent>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.DialogContent>\n * </Command.DialogRoot>\n * ```\n */\nconst CommandRoot = forwardRef<ComponentRef<\"div\">, CommandRootProps>(\n\t({ className, ...props }, ref) => (\n\t\t<CommandPrimitive\n\t\t\tref={ref}\n\t\t\tdata-slot=\"command\"\n\t\t\tclassName={cx(\"bg-popover flex h-full w-full flex-col overflow-hidden rounded-md\", className)}\n\t\t\t{...props}\n\t\t/>\n\t),\n);\nCommandRoot.displayName = \"Command\";\n\n/**\n * The props for the CommandDialog.Content component.\n *\n * @see https://mantle.ngrok.com/components/command#commanddialogcontent\n */\ntype CommandDialogContentProps = {\n\t/**\n\t * The content of the command dialog (inputs, lists, etc.).\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * Class name(s) to apply to the command dialog content.\n\t */\n\tclassName?: string;\n\t/**\n\t * The accessible title of the command dialog. Visually hidden.\n\t *\n\t * @default \"Command Palette\"\n\t */\n\ttitle?: string;\n\t/**\n\t * The accessible description of the command dialog. Visually hidden.\n\t *\n\t * @default \"Search for a command to run...\"\n\t */\n\tdescription?: string;\n\t/**\n\t * Whether to show the close button.\n\t *\n\t * @default true\n\t */\n\tshowCloseButton?: boolean;\n\t/**\n\t * Custom filter function for the command list.\n\t *\n\t * @see https://github.com/pacocoursey/cmdk?tab=readme-ov-file#filtering\n\t */\n\tfilter?: CommandRootProps[\"filter\"];\n\t/**\n\t * Whether to enable filtering of command items. When false, disables built-in filtering.\n\t *\n\t * @see https://github.com/pacocoursey/cmdk?tab=readme-ov-file#filtering\n\t */\n\tshouldFilter?: CommandRootProps[\"shouldFilter\"];\n};\n\n/**\n * The content of the CommandDialog. Renders the accessible title/description,\n * the command palette UI, and an optional close button.\n *\n * @see https://mantle.ngrok.com/components/command#commanddialogcontent\n *\n * @example\n * ```tsx\n * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n * <Command.DialogTrigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.DialogTrigger>\n * <Command.DialogContent>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.DialogContent>\n * </Command.DialogRoot>\n * ```\n */\nconst CommandDialogContent = ({\n\tchildren,\n\tclassName,\n\tdescription = \"Search for a command to run...\",\n\tfilter,\n\tshouldFilter,\n\tshowCloseButton = true,\n\ttitle = \"Command Palette\",\n}: CommandDialogContentProps) => (\n\t<Dialog.Content className={cx(\"overflow-hidden p-0 relative\", className)}>\n\t\t<Dialog.Header className=\"sr-only absolute\">\n\t\t\t<Dialog.Title>{title}</Dialog.Title>\n\t\t\t<Dialog.Description>{description}</Dialog.Description>\n\t\t</Dialog.Header>\n\t\t<CommandRoot\n\t\t\tclassName=\"**:data-[slot=command-input-wrapper]:h-12 **:[[cmdk-input]]:h-12 **:data-[slot=command-group]:px-2 **:data-[slot=command-list]:pb-1\"\n\t\t\tfilter={filter}\n\t\t\tshouldFilter={shouldFilter}\n\t\t>\n\t\t\t{children}\n\t\t</CommandRoot>\n\t\t{showCloseButton && (\n\t\t\t<div className=\"absolute top-1.5 right-1.5\">\n\t\t\t\t<Dialog.CloseIconButton />\n\t\t\t</div>\n\t\t)}\n\t</Dialog.Content>\n);\nCommandDialogContent.displayName = \"CommandDialogContent\";\n\n/**\n * The input component for the Command. It provides the input for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command#commandinput\n *\n * @example\n * ```tsx\n * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n * <Command.DialogTrigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.DialogTrigger>\n * <Command.DialogContent>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.DialogContent>\n * </Command.DialogRoot>\n * ```\n */\nconst CommandInput = forwardRef<\n\tComponentRef<\"div\">,\n\tComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tdata-slot=\"command-input-wrapper\"\n\t\tclassName=\"flex h-9 items-center gap-2 border-b border-popover px-3\"\n\t>\n\t\t<MagnifyingGlassIcon className=\"size-5 shrink-0 opacity-50\" />\n\t\t<CommandPrimitive.Input\n\t\t\tdata-slot=\"command-input\"\n\t\t\tclassName={cx(\n\t\t\t\t\"placeholder:text-muted flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</div>\n));\nCommandInput.displayName = \"CommandInput\";\n\n/**\n * The list component for the Command. It provides the list for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command#commandlist\n *\n * @example\n * ```tsx\n * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n * <Command.DialogTrigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.DialogTrigger>\n * <Command.DialogContent>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.DialogContent>\n * </Command.DialogRoot>\n * ```\n */\nconst CommandList = forwardRef<\n\tComponentRef<\"div\">,\n\tComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.List\n\t\tref={ref}\n\t\tdata-slot=\"command-list\"\n\t\tclassName={cx(\"max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto scrollbar\", className)}\n\t\t{...props}\n\t/>\n));\nCommandList.displayName = \"CommandList\";\n\n/**\n * The empty component for the Command. It provides the empty state for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command#commandempty\n *\n * @example\n * ```tsx\n * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n * <Command.DialogTrigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.DialogTrigger>\n * <Command.DialogContent>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.DialogContent>\n * </Command.DialogRoot>\n * ```\n */\nconst CommandEmpty = forwardRef<\n\tComponentRef<\"div\">,\n\tComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Empty\n\t\tref={ref}\n\t\tdata-slot=\"command-empty\"\n\t\tclassName={cx(\"py-6 text-center text-sm\", className)}\n\t\t{...props}\n\t/>\n));\nCommandEmpty.displayName = \"CommandEmpty\";\n\n/**\n * The group component for the Command. It provides the group for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command#commandgroup\n *\n * @example\n * ```tsx\n * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n * <Command.DialogTrigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.DialogTrigger>\n * <Command.DialogContent>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.DialogContent>\n * </Command.DialogRoot>\n * ```\n */\nconst CommandGroup = forwardRef<\n\tComponentRef<\"div\">,\n\tComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Group\n\t\tref={ref}\n\t\tdata-slot=\"command-group\"\n\t\tclassName={cx(\n\t\t\t\"**:[[cmdk-group-heading]]:text-muted overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCommandGroup.displayName = \"CommandGroup\";\n\n/**\n * The separator component for the Command. It provides the separator for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command#commandseparator\n *\n * @example\n * ```tsx\n * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n * <Command.DialogTrigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.DialogTrigger>\n * <Command.DialogContent>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.DialogContent>\n * </Command.DialogRoot>\n * ```\n */\nconst CommandSeparator = forwardRef<\n\tComponentRef<typeof CommandPrimitive.Separator>,\n\tComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Separator ref={ref} data-slot=\"command-separator\" asChild {...props}>\n\t\t<Separator className={cx(\"-mx-1 my-1 w-auto\", className)} />\n\t</CommandPrimitive.Separator>\n));\nCommandSeparator.displayName = \"CommandSeparator\";\n\n/**\n * The item component for the Command. It provides the item for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command#commanditem\n *\n * @example\n * ```tsx\n * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n * <Command.DialogTrigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.DialogTrigger>\n * <Command.DialogContent>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.DialogContent>\n * </Command.DialogRoot>\n * ```\n */\nconst CommandItem = forwardRef<\n\tComponentRef<\"div\">,\n\tComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Item\n\t\tref={ref}\n\t\tdata-slot=\"command-item\"\n\t\tclassName={cx(\n\t\t\t\"data-[selected=true]:bg-active-menu-item [&_svg:not([class*='text-'])]:text-muted relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-5\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCommandItem.displayName = \"CommandItem\";\n\n/**\n * The shortcut component for the Command. It provides the shortcut for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command#commandshortcut\n *\n * @example\n * ```tsx\n * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n * <Command.DialogTrigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.DialogTrigger>\n * <Command.DialogContent>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.DialogContent>\n * </Command.DialogRoot>\n * ```\n */\nconst CommandShortcut = forwardRef<ComponentRef<\"span\">, ComponentPropsWithoutRef<\"span\">>(\n\t({ className, ...props }, ref) => (\n\t\t<span\n\t\t\tref={ref}\n\t\t\tdata-slot=\"command-shortcut\"\n\t\t\tclassName={cx(\"text-muted ml-auto text-xs tracking-widest\", className)}\n\t\t\t{...props}\n\t\t/>\n\t),\n);\nCommandShortcut.displayName = \"CommandShortcut\";\n\n/**\n * The command component for the Command. It provides the command for the command palette.\n *\n * @see https://mantle.ngrok.com/components/command\n *\n * @example\n * Composition:\n * ```\n * Command.DialogRoot\n * ├── Command.DialogTrigger\n * └── Command.DialogContent\n * ├── Command.Input\n * └── Command.List\n * ├── Command.Empty\n * ├── Command.Group\n * │ └── Command.Item\n * │ └── Command.Shortcut\n * └── Command.Separator\n * ```\n *\n * @example\n * ```tsx\n * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n * <Command.DialogTrigger asChild>\n * <Button type=\"button\">Open Command Palette</Button>\n * </Command.DialogTrigger>\n * <Command.DialogContent>\n * <Command.Input placeholder=\"Type a command or search...\" />\n * <Command.List>\n * <Command.Empty>No results found.</Command.Empty>\n * <Command.Group heading=\"Suggestions\">\n * <Command.Item>\n * <span>Calendar</span>\n * </Command.Item>\n * </Command.Group>\n * <Command.Separator />\n * <Command.Group heading=\"Settings\">\n * <Command.Item>\n * <span>Profile</span>\n * <Command.Shortcut>⌘,</Command.Shortcut>\n * </Command.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.DialogContent>\n * </Command.DialogRoot>\n * ```\n */\nconst Command = {\n\t/**\n\t * The root component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commandroot\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n\t * <Command.DialogTrigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.DialogTrigger>\n\t * <Command.DialogContent>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.DialogContent>\n\t * </Command.DialogRoot>\n\t * ```\n\t */\n\tRoot: CommandRoot,\n\t/**\n\t * The root stateful component for the Command dialog. Manages open/closed state.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commanddialogroot\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n\t * <Command.DialogTrigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.DialogTrigger>\n\t * <Command.DialogContent>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * </Command.List>\n\t * </Command.DialogContent>\n\t * </Command.DialogRoot>\n\t * ```\n\t */\n\tDialogRoot: Dialog.Root,\n\t/**\n\t * A button that opens the Command dialog when clicked.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commanddialogtrigger\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.DialogTrigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.DialogTrigger>\n\t * ```\n\t */\n\tDialogTrigger: Dialog.Trigger,\n\t/**\n\t * The visible content of the Command dialog. Renders inside the dialog portal.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commanddialogcontent\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.DialogContent>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * </Command.List>\n\t * </Command.DialogContent>\n\t * ```\n\t */\n\tDialogContent: CommandDialogContent,\n\t/**\n\t * The input component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commandinput\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n\t * <Command.DialogTrigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.DialogTrigger>\n\t * <Command.DialogContent>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.DialogContent>\n\t * </Command.DialogRoot>\n\t * ```\n\t */\n\tInput: CommandInput,\n\t/**\n\t * The list component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commandlist\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n\t * <Command.DialogTrigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.DialogTrigger>\n\t * <Command.DialogContent>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.DialogContent>\n\t * </Command.DialogRoot>\n\t * ```\n\t */\n\tList: CommandList,\n\t/**\n\t * The empty component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commandempty\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n\t * <Command.DialogTrigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.DialogTrigger>\n\t * <Command.DialogContent>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.DialogContent>\n\t * </Command.DialogRoot>\n\t * ```\n\t */\n\tEmpty: CommandEmpty,\n\t/**\n\t * The group component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commandgroup\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n\t * <Command.DialogTrigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.DialogTrigger>\n\t * <Command.DialogContent>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.DialogContent>\n\t * </Command.DialogRoot>\n\t * ```\n\t */\n\tGroup: CommandGroup,\n\t/**\n\t * The item component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commanditem\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n\t * <Command.DialogTrigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.DialogTrigger>\n\t * <Command.DialogContent>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.DialogContent>\n\t * </Command.DialogRoot>\n\t * ```\n\t */\n\tItem: CommandItem,\n\t/**\n\t * The shortcut component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commandshortcut\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n\t * <Command.DialogTrigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.DialogTrigger>\n\t * <Command.DialogContent>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.DialogContent>\n\t * </Command.DialogRoot>\n\t * ```\n\t */\n\tShortcut: CommandShortcut,\n\t/**\n\t * The separator component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commandseparator\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.DialogRoot open={open} onOpenChange={setOpen}>\n\t * <Command.DialogTrigger asChild>\n\t * <Button type=\"button\">Open Command Palette</Button>\n\t * </Command.DialogTrigger>\n\t * <Command.DialogContent>\n\t * <Command.Input placeholder=\"Type a command or search...\" />\n\t * <Command.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * <Command.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * <span>Calendar</span>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * <Command.Separator />\n\t * <Command.Group heading=\"Settings\">\n\t * <Command.Item>\n\t * <span>Profile</span>\n\t * <Command.Shortcut>⌘,</Command.Shortcut>\n\t * </Command.Item>\n\t * </Command.Group>\n\t * </Command.List>\n\t * </Command.DialogContent>\n\t * </Command.DialogRoot>\n\t * ```\n\t */\n\tSeparator: CommandSeparator,\n} as const;\n\nexport {\n\t//,\n\tCommand,\n\tuseCommandState,\n};\n","import { type ComponentProps, useEffect, useState } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Kbd } from \"../kbd/kbd.js\";\n\ntype Props = Omit<ComponentProps<\"kbd\">, \"children\">;\n\ntype Mod = \"⌘\" | \"⌃\";\n\n/**\n * Renders the platform-appropriate meta key kbd (⌘ or ⌃).\n *\n * - Initializes to `\"⌃\"` to avoid SSR mismatch.\n * - Updates on mount using `detectMetaKey()`.\n */\nfunction MetaKey({ className, ...props }: Props) {\n\tconst [glyph, setGlyph] = useState<Mod>(\"⌃\");\n\n\tuseEffect(() => {\n\t\tsetGlyph(detectMetaKey());\n\t}, []);\n\n\tconst label = glyph === \"⌘\" ? \"Command\" : \"Control\";\n\n\treturn (\n\t\t<Kbd\n\t\t\t{...props}\n\t\t\tsuppressHydrationWarning\n\t\t\tdata-slot=\"meta-key\"\n\t\t\tclassName={cx(glyph === \"⌃\" && \"font-medium\", className)}\n\t\t>\n\t\t\t<span className=\"sr-only\">{label}</span>\n\t\t\t{glyph}\n\t\t</Kbd>\n\t);\n}\n\nexport {\n\t//,\n\tMetaKey,\n};\n\n/**\n * Type guard for `navigator.userAgentData` existence.\n * Useful for newer UA hints where `platform` may be available.\n *\n * @param navigator The global `navigator`\n * @returns `true` if UA Data hints exist; narrows `navigator` accordingly.\n */\nfunction hasUAData(\n\tnavigator: Navigator,\n): navigator is Navigator & { userAgentData: { platform?: string } } {\n\treturn \"userAgentData\" in navigator;\n}\n\n/**\n * Detects the appropriate meta key label for the current platform.\n *\n * SSR-safe: returns `\"⌃\"` when `navigator` is not available.\n *\n * @returns `\"⌘\"` for Apple platforms; otherwise `\"⌃\"`.\n */\nfunction detectMetaKey(): Mod {\n\tif (typeof navigator === \"undefined\") {\n\t\treturn \"⌃\"; // SSR default\n\t}\n\n\tlet platform = \"\";\n\n\tif (hasUAData(navigator)) {\n\t\tplatform = navigator.userAgentData.platform ?? \"\";\n\t}\n\n\tif (!platform) {\n\t\tplatform = navigator.platform || navigator.userAgent || \"\";\n\t}\n\n\tconst isApple = /mac|iphone|ipad|ipod/i.test(platform);\n\n\tif (isApple) {\n\t\treturn \"⌘\";\n\t}\n\n\treturn \"⌃\";\n}\n"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{useCallback as e,useRef as t}from"react";function n(...e){return t=>{for(let n of e)typeof n==`function`?n(t):n!=null&&(n.current=t)}}function r(...n){let r=t(n);return r.current=n,e(e=>{for(let t of r.current)typeof t==`function`?t(e):t!=null&&(t.current=e)},[])}export{r as n,n as t};
|
|
2
|
-
//# sourceMappingURL=compose-refs-
|
|
2
|
+
//# sourceMappingURL=compose-refs-Cjf2gfB8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose-refs-
|
|
1
|
+
{"version":3,"file":"compose-refs-Cjf2gfB8.js","names":[],"sources":["../src/utils/compose-refs/compose-refs.tsx"],"sourcesContent":["import type { MutableRefObject, Ref } from \"react\";\nimport { useCallback, useRef } from \"react\";\n\ntype PossibleRef<T> = Ref<T> | undefined;\n\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */\nfunction composeRefs<T>(...refs: PossibleRef<T>[]) {\n\treturn (node: T | null) => {\n\t\tfor (const ref of refs) {\n\t\t\tif (typeof ref === \"function\") {\n\t\t\t\tref(node);\n\t\t\t} else if (ref != null) {\n\t\t\t\t(ref as MutableRefObject<T | null>).current = node;\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */\nfunction useComposedRefs<T>(...refs: PossibleRef<T>[]) {\n\tconst latestRefs = useRef(refs);\n\tlatestRefs.current = refs;\n\treturn useCallback((node: T | null) => {\n\t\tfor (const ref of latestRefs.current) {\n\t\t\tif (typeof ref === \"function\") {\n\t\t\t\tref(node);\n\t\t\t} else if (ref != null) {\n\t\t\t\t(ref as MutableRefObject<T | null>).current = node;\n\t\t\t}\n\t\t}\n\t}, []);\n}\n\nexport { composeRefs, useComposedRefs };\n"],"mappings":"gDASA,SAAS,EAAe,GAAG,EAAwB,CAClD,MAAQ,IAAmB,CAC1B,IAAK,IAAM,KAAO,EACb,OAAO,GAAQ,WAClB,EAAI,CAAI,EACE,GAAO,OACjB,EAAoC,QAAU,EAGjD,CACD,CAMA,SAAS,EAAmB,GAAG,EAAwB,CACtD,IAAM,EAAa,EAAO,CAAI,EAE9B,MADA,GAAW,QAAU,EACd,EAAa,GAAmB,CACtC,IAAK,IAAM,KAAO,EAAW,QACxB,OAAO,GAAQ,WAClB,EAAI,CAAI,EACE,GAAO,OACjB,EAAoC,QAAU,EAGjD,EAAG,CAAC,CAAC,CACN"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./browser-only-
|
|
2
|
-
//# sourceMappingURL=copy-to-clipboard-
|
|
1
|
+
import{n as e}from"./browser-only-BSl_hruR.js";async function t(t){if(!e())throw Error(`copyToClipboard requires a DOM environment`);try{if(typeof navigator.clipboard?.writeText==`function`)await navigator.clipboard.writeText(t);else throw Error(`writeText not supported`)}catch(e){try{n(t)}catch{throw e}}}function n(e){let t=document.createElement(`textarea`);t.value=e,document.body.appendChild(t);try{if(t.select(),!document.execCommand(`copy`))throw Error(`document.execCommand("copy") failed`)}finally{document.body.removeChild(t)}}export{t};
|
|
2
|
+
//# sourceMappingURL=copy-to-clipboard-Baw30q9O.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-to-clipboard-
|
|
1
|
+
{"version":3,"file":"copy-to-clipboard-Baw30q9O.js","names":[],"sources":["../src/utils/copy-to-clipboard.ts"],"sourcesContent":["import { canUseDOM } from \"../components/browser-only/browser-only.js\";\n\n/**\n * Copy the given string to the clipboard. Uses the Clipboard API when\n * available and falls back to an `execCommand(\"copy\")` polyfill for older\n * browsers.\n *\n * Throws when called outside a DOM environment, or when both the Clipboard\n * API and the polyfill fail — `await` the call to observe success.\n */\nasync function copyToClipboard(value: string) {\n\tif (!canUseDOM()) {\n\t\tthrow new Error(\"copyToClipboard requires a DOM environment\");\n\t}\n\ttry {\n\t\tif (typeof navigator.clipboard?.writeText === \"function\") {\n\t\t\tawait navigator.clipboard.writeText(value);\n\t\t} else {\n\t\t\tthrow new Error(\"writeText not supported\");\n\t\t}\n\t} catch (clipboardError) {\n\t\ttry {\n\t\t\tcopyToClipboardPolyfill(value);\n\t\t} catch {\n\t\t\tthrow clipboardError; // both approaches failed; propagate\n\t\t}\n\t}\n}\n\n/**\n * A fallback copy to clipboard function for older browsers that lack the\n * Clipboard API. Creates a temporary `<textarea>`, selects it, and invokes\n * the deprecated `document.execCommand(\"copy\")` API.\n *\n * Throws when `execCommand(\"copy\")` returns `false` (the call failed but\n * did not throw) so the caller can fall through to another strategy.\n */\nfunction copyToClipboardPolyfill(text: string) {\n\tconst tempTextArea = document.createElement(\"textarea\");\n\ttempTextArea.value = text;\n\tdocument.body.appendChild(tempTextArea);\n\ttry {\n\t\ttempTextArea.select();\n\t\tconst copied = document.execCommand(\"copy\");\n\t\tif (!copied) {\n\t\t\tthrow new Error('document.execCommand(\"copy\") failed');\n\t\t}\n\t} finally {\n\t\tdocument.body.removeChild(tempTextArea);\n\t}\n}\n\nexport { copyToClipboard };\n"],"mappings":"+CAUA,eAAe,EAAgB,EAAe,CAC7C,GAAI,CAAC,EAAU,EACd,MAAU,MAAM,4CAA4C,EAE7D,GAAI,CACH,GAAI,OAAO,UAAU,WAAW,WAAc,WAC7C,MAAM,UAAU,UAAU,UAAU,CAAK,OAEzC,MAAU,MAAM,yBAAyB,CAE3C,OAAS,EAAgB,CACxB,GAAI,CACH,EAAwB,CAAK,CAC9B,MAAQ,CACP,MAAM,CACP,CACD,CACD,CAUA,SAAS,EAAwB,EAAc,CAC9C,IAAM,EAAe,SAAS,cAAc,UAAU,EACtD,EAAa,MAAQ,EACrB,SAAS,KAAK,YAAY,CAAY,EACtC,GAAI,CAGH,GAFA,EAAa,OAAO,EAEhB,CADW,SAAS,YAAY,MAC1B,EACT,MAAU,MAAM,qCAAqC,CAEvD,QAAU,CACT,SAAS,KAAK,YAAY,CAAY,CACvC,CACD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{clsx as e}from"clsx";import{extendTailwindMerge as t}from"tailwind-merge";const n=t({extend:{classGroups:{"font-size":[`text-mono`,`text-size-inherit`]},theme:{spacing:[`em`]}}});function r(...t){return n(e(t))}export{r as t};
|
|
2
|
-
//# sourceMappingURL=cx-
|
|
2
|
+
//# sourceMappingURL=cx-CBSnSC36.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cx-
|
|
1
|
+
{"version":3,"file":"cx-CBSnSC36.js","names":[],"sources":["../src/utils/cx/cx.ts"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { extendTailwindMerge } from \"tailwind-merge\";\n\nconst twMerge = extendTailwindMerge({\n\textend: {\n\t\tclassGroups: {\n\t\t\t\"font-size\": [\"text-mono\", \"text-size-inherit\"],\n\t\t},\n\t\ttheme: {\n\t\t\tspacing: [\"em\"],\n\t\t},\n\t},\n});\n\n/**\n * Conditionally add Tailwind (and other) CSS classes.\n *\n * Allows for tailwind overrides in LTR-specificity-like order of applied classes.\n */\nexport function cx(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n"],"mappings":"iFAGA,MAAM,EAAU,EAAoB,CACnC,OAAQ,CACP,YAAa,CACZ,YAAa,CAAC,YAAa,mBAAmB,CAC/C,EACA,MAAO,CACN,QAAS,CAAC,IAAI,CACf,CACD,CACD,CAAC,EAOD,SAAgB,EAAG,GAAG,EAAsB,CAC3C,OAAO,EAAQ,EAAK,CAAM,CAAC,CAC5B"}
|
package/dist/cx.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-CBSnSC36.js";export{e as cx};
|
package/dist/data-table.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { t as Button } from "./button-
|
|
2
|
-
import { s as SortingMode } from "./direction-
|
|
3
|
-
import { t as Table$1 } from "./table-
|
|
4
|
-
import * as _$react from "react";
|
|
1
|
+
import { t as Button } from "./button-BYZOBUgj.js";
|
|
2
|
+
import { s as SortingMode } from "./direction-CcTY0FmA.js";
|
|
3
|
+
import { t as Table$1 } from "./table-BWD9IlIN.js";
|
|
5
4
|
import { ComponentProps, ReactNode } from "react";
|
|
6
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
7
5
|
import { HeaderContext, Row, Table } from "@tanstack/react-table";
|
|
8
6
|
export * from "@tanstack/react-table";
|
|
9
7
|
|
|
@@ -67,7 +65,7 @@ declare function Root<TData>({
|
|
|
67
65
|
children,
|
|
68
66
|
table,
|
|
69
67
|
...props
|
|
70
|
-
}: DataTableProps<TData>):
|
|
68
|
+
}: DataTableProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
71
69
|
declare namespace Root {
|
|
72
70
|
var displayName: string;
|
|
73
71
|
}
|
|
@@ -138,7 +136,7 @@ declare function HeaderSortButton<TData, TValue>({
|
|
|
138
136
|
sortIcon: propSortIcon,
|
|
139
137
|
onClick,
|
|
140
138
|
...props
|
|
141
|
-
}: DataTableHeaderSortButtonProps<TData, TValue>):
|
|
139
|
+
}: DataTableHeaderSortButtonProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
142
140
|
declare namespace HeaderSortButton {
|
|
143
141
|
var displayName: string;
|
|
144
142
|
}
|
|
@@ -169,7 +167,7 @@ declare function Header({
|
|
|
169
167
|
children,
|
|
170
168
|
className,
|
|
171
169
|
...props
|
|
172
|
-
}: DataTableHeaderProps):
|
|
170
|
+
}: DataTableHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
173
171
|
declare namespace Header {
|
|
174
172
|
var displayName: string;
|
|
175
173
|
}
|
|
@@ -196,7 +194,7 @@ type DataTableHeadProps = Omit<ComponentProps<typeof Table$1.Head>, "children">;
|
|
|
196
194
|
* </DataTable.Root>
|
|
197
195
|
* ```
|
|
198
196
|
*/
|
|
199
|
-
declare function Head<TData>(props: DataTableHeadProps):
|
|
197
|
+
declare function Head<TData>(props: DataTableHeadProps): import("react/jsx-runtime").JSX.Element;
|
|
200
198
|
declare namespace Head {
|
|
201
199
|
var displayName: string;
|
|
202
200
|
}
|
|
@@ -231,7 +229,7 @@ declare function Row$1<TData>({
|
|
|
231
229
|
className,
|
|
232
230
|
row,
|
|
233
231
|
...props
|
|
234
|
-
}: DataTableRowProps<TData>):
|
|
232
|
+
}: DataTableRowProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
235
233
|
declare namespace Row$1 {
|
|
236
234
|
var displayName: string;
|
|
237
235
|
}
|
|
@@ -262,7 +260,7 @@ type DataTableEmptyRowProps = ComponentProps<typeof Table$1.Row>;
|
|
|
262
260
|
declare function EmptyRow<TData>({
|
|
263
261
|
children,
|
|
264
262
|
...props
|
|
265
|
-
}: DataTableEmptyRowProps):
|
|
263
|
+
}: DataTableEmptyRowProps): import("react/jsx-runtime").JSX.Element;
|
|
266
264
|
declare namespace EmptyRow {
|
|
267
265
|
var displayName: string;
|
|
268
266
|
}
|
|
@@ -294,7 +292,7 @@ declare function ActionCell({
|
|
|
294
292
|
children,
|
|
295
293
|
className,
|
|
296
294
|
...props
|
|
297
|
-
}: DataTableActionCellProps):
|
|
295
|
+
}: DataTableActionCellProps): import("react/jsx-runtime").JSX.Element;
|
|
298
296
|
declare namespace ActionCell {
|
|
299
297
|
var displayName: string;
|
|
300
298
|
}
|
|
@@ -319,7 +317,7 @@ declare function ActionHeader({
|
|
|
319
317
|
children,
|
|
320
318
|
className,
|
|
321
319
|
...props
|
|
322
|
-
}: DataTableActionHeaderProps):
|
|
320
|
+
}: DataTableActionHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
323
321
|
declare namespace ActionHeader {
|
|
324
322
|
var displayName: string;
|
|
325
323
|
}
|
|
@@ -686,7 +684,7 @@ declare const DataTable: {
|
|
|
686
684
|
* });
|
|
687
685
|
* ```
|
|
688
686
|
*/
|
|
689
|
-
readonly Cell:
|
|
687
|
+
readonly Cell: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> & import("react").RefAttributes<HTMLTableDataCellElement>>;
|
|
690
688
|
/**
|
|
691
689
|
* The `<tbody>` container for rows of data. Typically wraps a map of
|
|
692
690
|
* `DataTable.Row`, with a `DataTable.EmptyRow` fallback when there is
|
|
@@ -703,7 +701,7 @@ declare const DataTable: {
|
|
|
703
701
|
* </DataTable.Body>
|
|
704
702
|
* ```
|
|
705
703
|
*/
|
|
706
|
-
readonly Body:
|
|
704
|
+
readonly Body: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & import("react").RefAttributes<HTMLTableSectionElement>, "ref"> & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
707
705
|
/**
|
|
708
706
|
* An empty-state row that spans every column. Render this as the `else`
|
|
709
707
|
* branch when `rows.length === 0` to keep the table's frame intact instead
|
package/dist/data-table.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-CBSnSC36.js";import{t}from"./button-uMIZVKit.js";import{i as n}from"./direction-Wa9W2F61.js";import{t as r}from"./sort-BPX2Fk9t.js";import{t as i}from"./table-eyoUW2Uv.js";import{Fragment as a,createContext as o,forwardRef as s,useContext as c,useMemo as l}from"react";import u from"tiny-invariant";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{flexRender as p}from"@tanstack/react-table";export*from"@tanstack/react-table";const m=[`unsorted`,`asc`,`desc`],h=[`unsorted`,`desc`,`asc`];function g(e,t){return _(t===`alphanumeric`?m:h,e)??`unsorted`}function _(e,t,n){if(e.length===0)return n;let r=e.findIndex(e=>e===t);if(r===-1)return n;let i=(r+1)%e.length;return e.at(i)??n}const v=o(null);function y(){let e=c(v);return u(e,`useDataTableContext should only be used within a DataTable child component`),e}function b({children:e,table:t,...n}){let r=l(()=>({table:t}),[t]);return d(v.Provider,{value:r,children:d(i.Root,{"data-slot":`data-table`,...n,children:d(i.Element,{children:e})})})}function x({children:r,className:i,column:a,disableSorting:o=!1,iconPlacement:s=`end`,sortingMode:c,sortIcon:l,onClick:u,...p}){let m=a.getIsSorted(),h=!o&&a.getCanSort(),g=h&&typeof m==`string`?m:`unsorted`,_=l?.(g)??d(j,{mode:c,direction:g});return f(t,{appearance:`ghost`,"data-slot":`data-table-header-sort-button`,className:e(`flex justify-start w-full h-full rounded-none not-disabled:active:scale-none text-muted`,i),"data-sort-direction":g,"data-table-header-action":!0,icon:_,iconPlacement:s,onClick:e=>{u?.(e),!e.defaultPrevented&&(!h||o||c===void 0||M(a,c))},priority:`neutral`,type:`button`,...p,children:[h&&g!==`unsorted`&&f(`span`,{className:`sr-only`,children:[`Column sorted in`,` `,c===`alphanumeric`?g===`asc`?`ascending`:`descending`:n(g),` `,`order`]}),r]})}function S({children:t,className:n,...r}){return d(i.Header,{"data-slot":`data-table-header`,className:e(`has-data-table-header-action:px-0`,n),...r,children:t})}const C=s((e,t)=>d(i.Body,{ref:t,"data-slot":`data-table-body`,...e}));C.displayName=`DataTableBody`;function w(e){let{table:t}=y();return d(i.Head,{"data-slot":`data-table-head`,...e,children:t.getHeaderGroups().map(e=>d(i.Row,{children:e.headers.map(e=>d(a,{children:e.isPlaceholder?d(i.Header,{},e.id):p(e.column.columnDef.header,e.getContext())},e.id))},e.id))})}function T({className:t,row:n,...r}){return d(i.Row,{"data-slot":`data-table-row`,className:e(r.onClick&&`cursor-pointer`,t),...r,children:n.getVisibleCells().map(e=>d(a,{children:p(e.column.columnDef.cell,e.getContext())},e.id))})}function E({children:e,...t}){let{table:n}=y(),r=n.getAllColumns().length;return d(i.Row,{"data-slot":`data-table-empty-row`,...t,children:d(i.Cell,{colSpan:r,children:e})})}function D(){return d(`span`,{"aria-hidden":!0,className:e(`pointer-events-none absolute -inset-y-px -left-1.5 w-1.5`,`opacity-0 transition-opacity group-data-sticky-active/table:opacity-100`,`shadow-[1px_0_0_0_var(--border-color-card-muted)]`,`bg-linear-to-l to-transparent`,`from-[color-mix(in_oklab,var(--shadow-color)_var(--shadow-second-opacity),transparent)]`)})}function O({children:t,className:n,...r}){return f(i.Cell,{"data-mantle-table-sticky-right":!0,"data-slot":`data-table-action-cell`,className:e(`sticky z-10 right-0 text-end align-middle bg-inherit p-2`,n),...r,children:[d(D,{}),t]})}function k({children:t,className:n,...r}){let{table:a}=y(),o=a.getRowModel().rows.length>0;return f(i.Header,{...o?{"data-mantle-table-sticky-right":!0}:{},"data-slot":`data-table-action-header`,className:e(o&&`sticky z-10 right-0 bg-inherit`,n),...r,children:[o&&d(D,{}),t]})}b.displayName=`DataTable`,O.displayName=`DataTableActionCell`,k.displayName=`DataTableActionHeader`,C.displayName=`DataTableBody`,E.displayName=`DataTableEmptyRow`,w.displayName=`DataTableHead`,S.displayName=`DataTableHeader`,x.displayName=`DataTableHeaderSortButton`,T.displayName=`DataTableRow`;const A={Root:b,ActionCell:O,ActionHeader:k,Cell:i.Cell,Body:C,EmptyRow:E,Head:w,Header:S,HeaderSortButton:x,Row:T};function j({direction:e,mode:t,...n}){return e===`unsorted`||!t||!e?d(`svg`,{"aria-hidden":!0,...n}):d(r,{mode:t,direction:e,...n})}function M(e,t){if(!e.getCanSort())return;let n=e.getIsSorted();switch(g(typeof n==`string`?n:`unsorted`,t)){case`unsorted`:e.clearSorting();return;case`asc`:e.toggleSorting(!1);return;case`desc`:e.toggleSorting(!0);return;default:return}}export{A as DataTable};
|
|
2
2
|
//# sourceMappingURL=data-table.js.map
|