@ngrok/mantle 0.66.0 → 0.66.2

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.
Files changed (297) hide show
  1. package/dist/accordion.d.ts +158 -154
  2. package/dist/accordion.js +1 -1
  3. package/dist/accordion.js.map +1 -1
  4. package/dist/alert-dialog.d.ts +282 -277
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert-dialog.js.map +1 -1
  7. package/dist/alert.d.ts +145 -138
  8. package/dist/alert.js +1 -1
  9. package/dist/alert.js.map +1 -1
  10. package/dist/anchor.d.ts +25 -22
  11. package/dist/anchor.js +1 -1
  12. package/dist/anchor.js.map +1 -1
  13. package/dist/as-child-XMVTepJu.d.ts +31 -0
  14. package/dist/badge.d.ts +29 -19
  15. package/dist/badge.js +1 -1
  16. package/dist/badge.js.map +1 -1
  17. package/dist/booleanish-CBGdPL3Q.js +2 -0
  18. package/dist/booleanish-CBGdPL3Q.js.map +1 -0
  19. package/dist/browser-only-QPyyfLaB.js +2 -0
  20. package/dist/browser-only-QPyyfLaB.js.map +1 -0
  21. package/dist/browser-only.d.ts +20 -15
  22. package/dist/browser-only.js +1 -2
  23. package/dist/button-B6StZJsz.d.ts +175 -0
  24. package/dist/button-CRRPesae.js +2 -0
  25. package/dist/button-CRRPesae.js.map +1 -0
  26. package/dist/button-DA2p0_5F.js +2 -0
  27. package/dist/button-DA2p0_5F.js.map +1 -0
  28. package/dist/button.d.ts +4 -9
  29. package/dist/button.js +1 -2
  30. package/dist/calendar.d.ts +14 -8
  31. package/dist/calendar.js +1 -1
  32. package/dist/calendar.js.map +1 -1
  33. package/dist/card.d.ts +99 -97
  34. package/dist/card.js +1 -1
  35. package/dist/card.js.map +1 -1
  36. package/dist/checkbox.d.ts +14 -12
  37. package/dist/checkbox.js +1 -1
  38. package/dist/checkbox.js.map +1 -1
  39. package/dist/code-block.d.ts +254 -237
  40. package/dist/code-block.js +3 -3
  41. package/dist/code-block.js.map +1 -1
  42. package/dist/code.d.ts +5 -3
  43. package/dist/code.js +1 -1
  44. package/dist/code.js.map +1 -1
  45. package/dist/color.d.ts +2 -38
  46. package/dist/color.js +1 -1
  47. package/dist/color.js.map +1 -1
  48. package/dist/combobox.d.ts +172 -167
  49. package/dist/combobox.js +1 -1
  50. package/dist/combobox.js.map +1 -1
  51. package/dist/command.d.ts +234 -227
  52. package/dist/command.js +1 -1
  53. package/dist/command.js.map +1 -1
  54. package/dist/compose-refs-DeIsFv68.js +2 -0
  55. package/dist/compose-refs-DeIsFv68.js.map +1 -0
  56. package/dist/cx-bKromGBh.js +2 -0
  57. package/dist/cx-bKromGBh.js.map +1 -0
  58. package/dist/cx.d.ts +4 -2
  59. package/dist/cx.js +1 -2
  60. package/dist/data-table.d.ts +211 -184
  61. package/dist/data-table.js +1 -1
  62. package/dist/data-table.js.map +1 -1
  63. package/dist/deep-non-nullable-BLM3Gz0I.d.ts +8 -0
  64. package/dist/description-list.d.ts +61 -59
  65. package/dist/description-list.js +1 -1
  66. package/dist/description-list.js.map +1 -1
  67. package/dist/dialog-BuD_JQf_.d.ts +422 -0
  68. package/dist/dialog-Cr5u0Eai.js +2 -0
  69. package/dist/dialog-Cr5u0Eai.js.map +1 -0
  70. package/dist/dialog.d.ts +3 -410
  71. package/dist/dialog.js +1 -2
  72. package/dist/direction-DfrtFTny.js +2 -0
  73. package/dist/direction-DfrtFTny.js.map +1 -0
  74. package/dist/{direction-DHheuUag.d.ts → direction-deXpJFDZ.d.ts} +9 -7
  75. package/dist/dropdown-menu-CjOaj-Ap.js +2 -0
  76. package/dist/dropdown-menu-CjOaj-Ap.js.map +1 -0
  77. package/dist/dropdown-menu-D_ZoY1AH.d.ts +330 -0
  78. package/dist/dropdown-menu.d.ts +2 -325
  79. package/dist/dropdown-menu.js +1 -2
  80. package/dist/flag.d.ts +31 -22
  81. package/dist/flag.js +1 -1
  82. package/dist/flag.js.map +1 -1
  83. package/dist/hooks.d.ts +72 -59
  84. package/dist/hooks.js +1 -1
  85. package/dist/hooks.js.map +1 -1
  86. package/dist/hover-card.d.ts +97 -91
  87. package/dist/hover-card.js +1 -1
  88. package/dist/hover-card.js.map +1 -1
  89. package/dist/{icon-DXTMiV1L.d.ts → icon-B1XLv02t.d.ts} +11 -9
  90. package/dist/icon-B5oNYYrJ.js +2 -0
  91. package/dist/icon-B5oNYYrJ.js.map +1 -0
  92. package/dist/icon-button-2r6S3HVA.d.ts +98 -0
  93. package/dist/icon-button-D4e9-dq-.js +2 -0
  94. package/dist/icon-button-D4e9-dq-.js.map +1 -0
  95. package/dist/icon.d.ts +4 -4
  96. package/dist/icon.js +1 -2
  97. package/dist/icons.d.ts +54 -41
  98. package/dist/icons.js +1 -1
  99. package/dist/icons.js.map +1 -1
  100. package/dist/{in-view-aHeQHaUj.d.ts → in-view-CTQRT44m.d.ts} +29 -22
  101. package/dist/in-view-bPnaWEL4.js +2 -0
  102. package/dist/in-view-bPnaWEL4.js.map +1 -0
  103. package/dist/index-BLCvtjLi.d.ts +40 -0
  104. package/dist/index-DWqhfw9n.d.ts +103 -0
  105. package/dist/{button-group-BFnqgdtl.d.ts → index-ViSCOUrU.d.ts} +10 -8
  106. package/dist/index-s8rMcilU.d.ts +47 -0
  107. package/dist/input.d.ts +3 -100
  108. package/dist/input.js +1 -1
  109. package/dist/input.js.map +1 -1
  110. package/dist/is-input-BFR8yMM7.js +2 -0
  111. package/dist/is-input-BFR8yMM7.js.map +1 -0
  112. package/dist/kbd-pyj32aN4.js +2 -0
  113. package/dist/kbd-pyj32aN4.js.map +1 -0
  114. package/dist/kbd.d.ts +10 -4
  115. package/dist/kbd.js +1 -2
  116. package/dist/label.d.ts +8 -6
  117. package/dist/label.js +1 -1
  118. package/dist/label.js.map +1 -1
  119. package/dist/media-object.d.ts +70 -68
  120. package/dist/media-object.js +1 -1
  121. package/dist/media-object.js.map +1 -1
  122. package/dist/multi-select.d.ts +226 -218
  123. package/dist/multi-select.js +1 -1
  124. package/dist/multi-select.js.map +1 -1
  125. package/dist/pagination.d.ts +168 -164
  126. package/dist/pagination.js +1 -1
  127. package/dist/pagination.js.map +1 -1
  128. package/dist/popover.d.ts +119 -117
  129. package/dist/popover.js +1 -1
  130. package/dist/popover.js.map +1 -1
  131. package/dist/primitive-Cath9ASB.js +2 -0
  132. package/dist/primitive-Cath9ASB.js.map +1 -0
  133. package/dist/primitive-tuHqhoRE.d.ts +16 -0
  134. package/dist/progress.d.ts +175 -150
  135. package/dist/progress.js +1 -1
  136. package/dist/progress.js.map +1 -1
  137. package/dist/radio-group.d.ts +246 -230
  138. package/dist/radio-group.js +1 -1
  139. package/dist/radio-group.js.map +1 -1
  140. package/dist/sandboxed-on-click.d.ts +36 -31
  141. package/dist/sandboxed-on-click.js +1 -1
  142. package/dist/sandboxed-on-click.js.map +1 -1
  143. package/dist/select-39Jfc1Cb.d.ts +265 -0
  144. package/dist/select-DZ2ztBkI.js +2 -0
  145. package/dist/select-DZ2ztBkI.js.map +1 -0
  146. package/dist/select.d.ts +2 -263
  147. package/dist/select.js +1 -2
  148. package/dist/separator-BcCNbHBg.js +2 -0
  149. package/dist/separator-BcCNbHBg.js.map +1 -0
  150. package/dist/separator.d.ts +28 -21
  151. package/dist/separator.js +1 -2
  152. package/dist/sheet.d.ts +319 -305
  153. package/dist/sheet.js +1 -1
  154. package/dist/sheet.js.map +1 -1
  155. package/dist/skeleton.d.ts +8 -6
  156. package/dist/skeleton.js +1 -1
  157. package/dist/skeleton.js.map +1 -1
  158. package/dist/slider.d.ts +48 -35
  159. package/dist/slider.js +1 -1
  160. package/dist/slider.js.map +1 -1
  161. package/dist/slot-DdnjeV2n.js +2 -0
  162. package/dist/slot-DdnjeV2n.js.map +1 -0
  163. package/dist/slot.d.ts +6 -4
  164. package/dist/slot.js +1 -2
  165. package/dist/sort-CfPsu1Gs.js +2 -0
  166. package/dist/sort-CfPsu1Gs.js.map +1 -0
  167. package/dist/split-button.d.ts +158 -162
  168. package/dist/split-button.js +1 -1
  169. package/dist/split-button.js.map +1 -1
  170. package/dist/svg-only-BVLlbQ4e.js +2 -0
  171. package/dist/svg-only-BVLlbQ4e.js.map +1 -0
  172. package/dist/{svg-only-Cp8Mu_sh.d.ts → svg-only-Dti1FvNV.d.ts} +11 -9
  173. package/dist/switch.d.ts +10 -8
  174. package/dist/switch.js +1 -1
  175. package/dist/switch.js.map +1 -1
  176. package/dist/table-BWMp12sl.js +2 -0
  177. package/dist/table-BWMp12sl.js.map +1 -0
  178. package/dist/table-Dpt192qt.d.ts +398 -0
  179. package/dist/table.d.ts +2 -396
  180. package/dist/table.js +1 -2
  181. package/dist/tabs.d.ts +110 -104
  182. package/dist/tabs.js +1 -1
  183. package/dist/tabs.js.map +1 -1
  184. package/dist/text-area.d.ts +10 -8
  185. package/dist/text-area.js +1 -1
  186. package/dist/text-area.js.map +1 -1
  187. package/dist/theme-provider-C8F5nFrJ.js +2 -0
  188. package/dist/theme-provider-C8F5nFrJ.js.map +1 -0
  189. package/dist/theme.d.ts +66 -39
  190. package/dist/theme.js +1 -2
  191. package/dist/{themes-Bi46K9ZW.d.ts → themes-ClppRAGt.d.ts} +4 -2
  192. package/dist/toast-1AuBbrBS.js +2 -0
  193. package/dist/toast-1AuBbrBS.js.map +1 -0
  194. package/dist/toast.d.ts +95 -87
  195. package/dist/toast.js +1 -2
  196. package/dist/tooltip.d.ts +78 -73
  197. package/dist/tooltip.js +1 -1
  198. package/dist/tooltip.js.map +1 -1
  199. package/dist/{chunk-W2YQRWR5.js → traffic-policy-file-QnF-2YkY.js} +2 -2
  200. package/dist/traffic-policy-file-QnF-2YkY.js.map +1 -0
  201. package/dist/types-884RJJqm.js +2 -0
  202. package/dist/types-884RJJqm.js.map +1 -0
  203. package/dist/{types-DehRoXC5.d.ts → types-DgXUgkpc.d.ts} +38 -36
  204. package/dist/types-Dh4BVhXC.d.ts +9 -0
  205. package/dist/types.d.ts +6 -49
  206. package/dist/types.js +1 -2
  207. package/dist/use-copy-to-clipboard-BEbQOKHc.js +2 -0
  208. package/dist/use-copy-to-clipboard-BEbQOKHc.js.map +1 -0
  209. package/dist/use-matches-media-query-CojcYxlA.js +2 -0
  210. package/dist/use-matches-media-query-CojcYxlA.js.map +1 -0
  211. package/dist/use-prefers-reduced-motion-BiG6QGkf.js +2 -0
  212. package/dist/use-prefers-reduced-motion-BiG6QGkf.js.map +1 -0
  213. package/dist/utils.d.ts +6 -5
  214. package/dist/utils.js +1 -1
  215. package/dist/utils.js.map +1 -1
  216. package/dist/variant-props-UE-phTwh.d.ts +13 -0
  217. package/dist/with-style-props-D1QFTzj6.d.ts +29 -0
  218. package/package.json +6 -6
  219. package/dist/as-child-DJ7x3JFV.d.ts +0 -21
  220. package/dist/browser-only.js.map +0 -1
  221. package/dist/button-DLUUf_c-.d.ts +0 -173
  222. package/dist/button.js.map +0 -1
  223. package/dist/chunk-2FYR6IJV.js +0 -2
  224. package/dist/chunk-2FYR6IJV.js.map +0 -1
  225. package/dist/chunk-5VDCC3YW.js +0 -2
  226. package/dist/chunk-5VDCC3YW.js.map +0 -1
  227. package/dist/chunk-63ZAW25Z.js +0 -2
  228. package/dist/chunk-63ZAW25Z.js.map +0 -1
  229. package/dist/chunk-6J7D73WA.js +0 -2
  230. package/dist/chunk-6J7D73WA.js.map +0 -1
  231. package/dist/chunk-72TJUKMV.js +0 -1
  232. package/dist/chunk-72TJUKMV.js.map +0 -1
  233. package/dist/chunk-7MJQGBE4.js +0 -2
  234. package/dist/chunk-7MJQGBE4.js.map +0 -1
  235. package/dist/chunk-7YLII2US.js +0 -2
  236. package/dist/chunk-7YLII2US.js.map +0 -1
  237. package/dist/chunk-ADF5DAYG.js +0 -2
  238. package/dist/chunk-ADF5DAYG.js.map +0 -1
  239. package/dist/chunk-CBRSMQ26.js +0 -2
  240. package/dist/chunk-CBRSMQ26.js.map +0 -1
  241. package/dist/chunk-COQIVAQH.js +0 -2
  242. package/dist/chunk-COQIVAQH.js.map +0 -1
  243. package/dist/chunk-ELZLLG6G.js +0 -2
  244. package/dist/chunk-ELZLLG6G.js.map +0 -1
  245. package/dist/chunk-EVU5XGB4.js +0 -2
  246. package/dist/chunk-EVU5XGB4.js.map +0 -1
  247. package/dist/chunk-EYZYDUS2.js +0 -2
  248. package/dist/chunk-EYZYDUS2.js.map +0 -1
  249. package/dist/chunk-HKSO72E5.js +0 -2
  250. package/dist/chunk-HKSO72E5.js.map +0 -1
  251. package/dist/chunk-HL2HWYKP.js +0 -2
  252. package/dist/chunk-HL2HWYKP.js.map +0 -1
  253. package/dist/chunk-IVQ626TU.js +0 -2
  254. package/dist/chunk-IVQ626TU.js.map +0 -1
  255. package/dist/chunk-JQ5D5YZR.js +0 -2
  256. package/dist/chunk-JQ5D5YZR.js.map +0 -1
  257. package/dist/chunk-LBO5LEYM.js +0 -2
  258. package/dist/chunk-LBO5LEYM.js.map +0 -1
  259. package/dist/chunk-MLXONRJD.js +0 -2
  260. package/dist/chunk-MLXONRJD.js.map +0 -1
  261. package/dist/chunk-OHPGAB7U.js +0 -2
  262. package/dist/chunk-OHPGAB7U.js.map +0 -1
  263. package/dist/chunk-OP6JMBKJ.js +0 -2
  264. package/dist/chunk-OP6JMBKJ.js.map +0 -1
  265. package/dist/chunk-PFXFESEN.js +0 -2
  266. package/dist/chunk-PFXFESEN.js.map +0 -1
  267. package/dist/chunk-PNL7JOXI.js +0 -2
  268. package/dist/chunk-PNL7JOXI.js.map +0 -1
  269. package/dist/chunk-RED6SFAV.js +0 -2
  270. package/dist/chunk-RED6SFAV.js.map +0 -1
  271. package/dist/chunk-SBQHQ2SJ.js +0 -2
  272. package/dist/chunk-SBQHQ2SJ.js.map +0 -1
  273. package/dist/chunk-SGGOH2WW.js +0 -2
  274. package/dist/chunk-SGGOH2WW.js.map +0 -1
  275. package/dist/chunk-W2YQRWR5.js.map +0 -1
  276. package/dist/chunk-W5A5HSFE.js +0 -2
  277. package/dist/chunk-W5A5HSFE.js.map +0 -1
  278. package/dist/chunk-YPAUKPCE.js +0 -2
  279. package/dist/chunk-YPAUKPCE.js.map +0 -1
  280. package/dist/cx.js.map +0 -1
  281. package/dist/deep-non-nullable-SmpSvoSd.d.ts +0 -8
  282. package/dist/dialog.js.map +0 -1
  283. package/dist/dropdown-menu.js.map +0 -1
  284. package/dist/icon-button-CT71Ti9V.d.ts +0 -96
  285. package/dist/icon.js.map +0 -1
  286. package/dist/kbd.js.map +0 -1
  287. package/dist/primitive-CBR_XmVa.d.ts +0 -14
  288. package/dist/select.js.map +0 -1
  289. package/dist/separator.js.map +0 -1
  290. package/dist/slot.js.map +0 -1
  291. package/dist/table.js.map +0 -1
  292. package/dist/theme.js.map +0 -1
  293. package/dist/toast.js.map +0 -1
  294. package/dist/types-BuKAGhC-.d.ts +0 -7
  295. package/dist/types.js.map +0 -1
  296. package/dist/variant-props-oDo2u-We.d.ts +0 -11
  297. package/dist/with-style-props-VnLWm0Yd.d.ts +0 -27
@@ -1 +1 @@
1
- {"version":3,"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 { type ComponentPropsWithoutRef, type ComponentRef, forwardRef } 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.Root>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Root>\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 component.\n *\n * @see https://mantle.ngrok.com/components/command#commanddialog\n */\ntype CommandDialogProps = ComponentPropsWithoutRef<typeof Dialog.Root> & {\n\t/**\n\t * The title of the command dialog.\n\t */\n\ttitle?: string;\n\t/**\n\t * The description of the command dialog.\n\t */\n\tdescription?: string;\n\t/**\n\t * Class name(s) to apply to the command dialog content.\n\t */\n\tclassName?: string;\n\t/**\n\t * Whether to show the close button.\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 * A window overlaid on either the primary window or another dialog window.\n * The root stateful component for the CommandDialog.\n *\n * @see https://mantle.ngrok.com/components/command#commanddialog\n *\n * @example\n * ```tsx\n * <Command.Dialog>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\n */\nconst CommandDialog = ({\n\tchildren,\n\tclassName,\n\tdescription = \"Search for a command to run...\",\n\tfilter,\n\tshouldFilter,\n\tshowCloseButton = true,\n\ttitle = \"Command Palette\",\n\t...props\n}: CommandDialogProps) => (\n\t<Dialog.Root {...props}>\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<Dialog.Content className={cx(\"overflow-hidden p-0 relative\", className)}>\n\t\t\t<CommandRoot\n\t\t\t\tclassName=\"**:[[cmdk-group-heading]]:text-muted **:data-[slot=command-input-wrapper]:h-12 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 **:[[cmdk-input]]:h-12 **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\"\n\t\t\t\tfilter={filter}\n\t\t\t\tshouldFilter={shouldFilter}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</CommandRoot>\n\t\t\t{showCloseButton && (\n\t\t\t\t<div className=\"absolute top-1.5 right-1.5\">\n\t\t\t\t\t<Dialog.CloseIconButton />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</Dialog.Content>\n\t</Dialog.Root>\n);\nCommandDialog.displayName = \"CommandDialog\";\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>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\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-4 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>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\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>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\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>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\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>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\n */\nconst CommandSeparator = forwardRef<\n\tComponentRef<typeof Separator>,\n\tComponentPropsWithoutRef<typeof Separator>\n>(({ className, ...props }, ref) => (\n\t<Separator\n\t\tref={ref}\n\t\tdata-slot=\"command-separator\"\n\t\tclassName={cx(\"-mx-1 my-1 w-auto\", className)}\n\t\t{...props}\n\t/>\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>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\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-popover-hover [&_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-4\",\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>\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>\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 * ```tsx\n * <Command.Dialog>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\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.Root>\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.Root>\n\t * ```\n\t */\n\tRoot: CommandRoot,\n\t/**\n\t * The dialog component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commanddialog\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.Dialog>\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.Dialog>\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.Input placeholder=\"Type a command or search...\" />\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.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * </Command.List>\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.Empty>No results found.</Command.Empty>\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.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * Calendar\n\t * </Command.Item>\n\t * </Command.Group>\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.Item>\n\t * Calendar\n\t * </Command.Item>\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.Shortcut>⌘,</Command.Shortcut>\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.Separator />\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\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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","names":["MagnifyingGlassIcon","CommandPrimitive","useCommandState","forwardRef","jsx","jsxs","CommandRoot","forwardRef","className","props","ref","CommandPrimitive","cx","CommandDialog","children","description","filter","shouldFilter","showCloseButton","title","Dialog","CommandInput","MagnifyingGlassIcon","CommandList","CommandEmpty","CommandGroup","CommandSeparator","Separator","CommandItem","CommandShortcut","Command","useEffect","useState","jsx","jsxs","MetaKey","className","props","glyph","setGlyph","useState","useEffect","detectMetaKey","label","Kbd","cx","hasUAData","navigator","detectMetaKey","platform"]}
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 { type ComponentPropsWithoutRef, type ComponentRef, forwardRef } 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.Root>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Root>\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 component.\n *\n * @see https://mantle.ngrok.com/components/command#commanddialog\n */\ntype CommandDialogProps = ComponentPropsWithoutRef<typeof Dialog.Root> & {\n\t/**\n\t * The title of the command dialog.\n\t */\n\ttitle?: string;\n\t/**\n\t * The description of the command dialog.\n\t */\n\tdescription?: string;\n\t/**\n\t * Class name(s) to apply to the command dialog content.\n\t */\n\tclassName?: string;\n\t/**\n\t * Whether to show the close button.\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 * A window overlaid on either the primary window or another dialog window.\n * The root stateful component for the CommandDialog.\n *\n * @see https://mantle.ngrok.com/components/command#commanddialog\n *\n * @example\n * ```tsx\n * <Command.Dialog>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\n */\nconst CommandDialog = ({\n\tchildren,\n\tclassName,\n\tdescription = \"Search for a command to run...\",\n\tfilter,\n\tshouldFilter,\n\tshowCloseButton = true,\n\ttitle = \"Command Palette\",\n\t...props\n}: CommandDialogProps) => (\n\t<Dialog.Root {...props}>\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<Dialog.Content className={cx(\"overflow-hidden p-0 relative\", className)}>\n\t\t\t<CommandRoot\n\t\t\t\tclassName=\"**:[[cmdk-group-heading]]:text-muted **:data-[slot=command-input-wrapper]:h-12 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 **:[[cmdk-input]]:h-12 **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\"\n\t\t\t\tfilter={filter}\n\t\t\t\tshouldFilter={shouldFilter}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</CommandRoot>\n\t\t\t{showCloseButton && (\n\t\t\t\t<div className=\"absolute top-1.5 right-1.5\">\n\t\t\t\t\t<Dialog.CloseIconButton />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</Dialog.Content>\n\t</Dialog.Root>\n);\nCommandDialog.displayName = \"CommandDialog\";\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>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\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-4 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>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\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>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\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>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\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>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\n */\nconst CommandSeparator = forwardRef<\n\tComponentRef<typeof Separator>,\n\tComponentPropsWithoutRef<typeof Separator>\n>(({ className, ...props }, ref) => (\n\t<Separator\n\t\tref={ref}\n\t\tdata-slot=\"command-separator\"\n\t\tclassName={cx(\"-mx-1 my-1 w-auto\", className)}\n\t\t{...props}\n\t/>\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>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\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-popover-hover [&_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-4\",\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>\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>\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 * ```tsx\n * <Command.Dialog>\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.Item>\n * </Command.Group>\n * </Command.List>\n * </Command.Dialog>\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.Root>\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.Root>\n\t * ```\n\t */\n\tRoot: CommandRoot,\n\t/**\n\t * The dialog component for the Command component.\n\t *\n\t * @see https://mantle.ngrok.com/components/command#commanddialog\n\t *\n\t * @example\n\t * ```tsx\n\t * <Command.Dialog>\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.Dialog>\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.Input placeholder=\"Type a command or search...\" />\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.List>\n\t * <Command.Empty>No results found.</Command.Empty>\n\t * </Command.List>\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.Empty>No results found.</Command.Empty>\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.Group heading=\"Suggestions\">\n\t * <Command.Item>\n\t * Calendar\n\t * </Command.Item>\n\t * </Command.Group>\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.Item>\n\t * Calendar\n\t * </Command.Item>\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.Shortcut>⌘,</Command.Shortcut>\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.Separator />\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\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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"}
@@ -0,0 +1,2 @@
1
+ import{useCallback as e}from"react";function t(...e){return t=>{for(let n of e)typeof n==`function`?n(t):n!=null&&(n.current=t)}}function n(...n){return e(()=>t(...n),[n])}export{n,t};
2
+ //# sourceMappingURL=compose-refs-DeIsFv68.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose-refs-DeIsFv68.js","names":[],"sources":["../src/utils/compose-refs/compose-refs.tsx"],"sourcesContent":["import type { MutableRefObject, Ref } from \"react\";\nimport { useCallback } 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) => {\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>).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\treturn useCallback(() => composeRefs(...refs), [refs]);\n}\n\nexport { composeRefs, useComposedRefs };\n"],"mappings":"oCASA,SAAS,EAAe,GAAG,EAAwB,CAClD,MAAQ,IAAY,CACnB,IAAK,IAAM,KAAO,EACb,OAAO,GAAQ,WAClB,EAAI,EAAK,CACC,GAAO,OAChB,EAA4B,QAAU,IAU3C,SAAS,EAAmB,GAAG,EAAwB,CACtD,OAAO,MAAkB,EAAY,GAAG,EAAK,CAAE,CAAC,EAAK,CAAC"}
@@ -0,0 +1,2 @@
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`]}}});function r(...t){return n(e(t))}export{r as t};
2
+ //# sourceMappingURL=cx-bKromGBh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cx-bKromGBh.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},\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,oBAAoB,CAC/C,CACD,CACD,CAAC,CAOF,SAAgB,EAAG,GAAG,EAAsB,CAC3C,OAAO,EAAQ,EAAK,EAAO,CAAC"}
package/dist/cx.d.ts CHANGED
@@ -1,10 +1,12 @@
1
- import { ClassValue } from 'clsx';
1
+ import { ClassValue } from "clsx";
2
2
 
3
+ //#region src/utils/cx/cx.d.ts
3
4
  /**
4
5
  * Conditionally add Tailwind (and other) CSS classes.
5
6
  *
6
7
  * Allows for tailwind overrides in LTR-specificity-like order of applied classes.
7
8
  */
8
9
  declare function cx(...inputs: ClassValue[]): string;
9
-
10
+ //#endregion
10
11
  export { cx };
12
+ //# sourceMappingURL=cx.d.ts.map
package/dist/cx.js CHANGED
@@ -1,2 +1 @@
1
- import{a as o}from"./chunk-PFXFESEN.js";export{o as cx};
2
- //# sourceMappingURL=cx.js.map
1
+ import{t as e}from"./cx-bKromGBh.js";export{e as cx};
@@ -1,21 +1,19 @@
1
- import { Table as Table$1, HeaderContext, Row as Row$1 } from '@tanstack/react-table';
2
- export * from '@tanstack/react-table';
3
- import * as react from 'react';
4
- import { ComponentProps, ReactNode } from 'react';
5
- import * as react_jsx_runtime from 'react/jsx-runtime';
6
- import { d as SortingMode } from './direction-DHheuUag.js';
7
- import { B as Button } from './button-DLUUf_c-.js';
8
- import { Table } from './table.js';
9
- import './deep-non-nullable-SmpSvoSd.js';
10
- import 'class-variance-authority';
11
- import 'class-variance-authority/types';
12
- import './variant-props-oDo2u-We.js';
1
+ import { t as Button } from "./button-B6StZJsz.js";
2
+ import { s as SortingMode } from "./direction-deXpJFDZ.js";
3
+ import { t as Table$1 } from "./table-Dpt192qt.js";
4
+ import * as react from "react";
5
+ import { ComponentProps, ReactNode } from "react";
6
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
7
+ import { HeaderContext, Row, Table } from "@tanstack/react-table";
8
+ export * from "@tanstack/react-table";
13
9
 
10
+ //#region src/components/data-table/types.d.ts
14
11
  declare const sortDirections: readonly ["asc", "desc", "unsorted"];
15
12
  type SortDirection = (typeof sortDirections)[number];
16
-
17
- type DataTableProps<TData> = ComponentProps<typeof Table.Root> & {
18
- table: Table$1<TData>;
13
+ //#endregion
14
+ //#region src/components/data-table/data-table.d.ts
15
+ type DataTableProps<TData> = ComponentProps<typeof Table$1.Root> & {
16
+ table: Table<TData>;
19
17
  };
20
18
  /**
21
19
  * A data table component that provides sorting and other data table functionality.
@@ -33,37 +31,41 @@ type DataTableProps<TData> = ComponentProps<typeof Table.Root> & {
33
31
  * </DataTable>
34
32
  * ```
35
33
  */
36
- declare function Root<TData>({ children, table, ...props }: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
34
+ declare function Root<TData>({
35
+ children,
36
+ table,
37
+ ...props
38
+ }: DataTableProps<TData>): react_jsx_runtime0.JSX.Element;
37
39
  declare namespace Root {
38
- var displayName: string;
40
+ var displayName: string;
39
41
  }
40
42
  type DataTableHeaderSortButtonProps<TData, TValue> = Omit<ComponentProps<typeof Button>, "icon"> & Pick<HeaderContext<TData, TValue>, "column"> & ({
41
- /**
42
- * Disable sorting for this column.
43
- * It will prevent the sorting direction from being toggled and any icon
44
- * from being shown.
45
- */
46
- disableSorting: true;
47
- /**
48
- * Use this to render a custom sort icon for the column if it is sortable
49
- * and you want to override the default sort icon
50
- */
51
- sortIcon?: undefined;
52
- /**
53
- * The sorting mode of the column, whether it is alphanumeric or time based.
54
- */
55
- sortingMode?: undefined;
43
+ /**
44
+ * Disable sorting for this column.
45
+ * It will prevent the sorting direction from being toggled and any icon
46
+ * from being shown.
47
+ */
48
+ disableSorting: true;
49
+ /**
50
+ * Use this to render a custom sort icon for the column if it is sortable
51
+ * and you want to override the default sort icon
52
+ */
53
+ sortIcon?: undefined;
54
+ /**
55
+ * The sorting mode of the column, whether it is alphanumeric or time based.
56
+ */
57
+ sortingMode?: undefined;
56
58
  } | {
57
- disableSorting?: false;
58
- /**
59
- * Use this to render a custom sort icon for the column if it is sortable
60
- * and you want to override the default sort icon
61
- */
62
- sortIcon?: (sortDirection: SortDirection) => ReactNode;
63
- /**
64
- * The sorting mode of the column, whether it is alphanumeric or time based.
65
- */
66
- sortingMode: SortingMode;
59
+ disableSorting?: false;
60
+ /**
61
+ * Use this to render a custom sort icon for the column if it is sortable
62
+ * and you want to override the default sort icon
63
+ */
64
+ sortIcon?: (sortDirection: SortDirection) => ReactNode;
65
+ /**
66
+ * The sorting mode of the column, whether it is alphanumeric or time based.
67
+ */
68
+ sortingMode: SortingMode;
67
69
  });
68
70
  /**
69
71
  * A sortable button toggle for a column header in a data table.
@@ -86,11 +88,21 @@ type DataTableHeaderSortButtonProps<TData, TValue> = Omit<ComponentProps<typeof
86
88
  * - For alphanumeric sorting: unsorted ➡️ ascending ➡️ descending ➡️ unsorted
87
89
  * - For time sorting: unsorted ➡️ newest-to-oldest ➡️ oldest-to-newest ➡️ unsorted
88
90
  */
89
- declare function HeaderSortButton<TData, TValue>({ children, className, column, disableSorting, iconPlacement, sortingMode, sortIcon: propSortIcon, onClick, ...props }: DataTableHeaderSortButtonProps<TData, TValue>): react_jsx_runtime.JSX.Element;
91
+ declare function HeaderSortButton<TData, TValue>({
92
+ children,
93
+ className,
94
+ column,
95
+ disableSorting,
96
+ iconPlacement,
97
+ sortingMode,
98
+ sortIcon: propSortIcon,
99
+ onClick,
100
+ ...props
101
+ }: DataTableHeaderSortButtonProps<TData, TValue>): react_jsx_runtime0.JSX.Element;
90
102
  declare namespace HeaderSortButton {
91
- var displayName: string;
103
+ var displayName: string;
92
104
  }
93
- type DataTableHeaderProps = ComponentProps<typeof Table.Header>;
105
+ type DataTableHeaderProps = ComponentProps<typeof Table$1.Header>;
94
106
  /**
95
107
  * A header for a data table.
96
108
  * This is typically used to wrap the `DataTable.HeaderSortButton` component.
@@ -106,31 +118,45 @@ type DataTableHeaderProps = ComponentProps<typeof Table.Header>;
106
118
  * </DataTable.Header>
107
119
  * ```
108
120
  */
109
- declare function Header({ children, className, ...props }: DataTableHeaderProps): react_jsx_runtime.JSX.Element;
121
+ declare function Header({
122
+ children,
123
+ className,
124
+ ...props
125
+ }: DataTableHeaderProps): react_jsx_runtime0.JSX.Element;
110
126
  declare namespace Header {
111
- var displayName: string;
127
+ var displayName: string;
112
128
  }
113
- type DataTableHeadProps = Omit<ComponentProps<typeof Table.Head>, "children">;
114
- declare function Head<TData>(props: DataTableHeadProps): react_jsx_runtime.JSX.Element;
129
+ type DataTableHeadProps = Omit<ComponentProps<typeof Table$1.Head>, "children">;
130
+ declare function Head<TData>(props: DataTableHeadProps): react_jsx_runtime0.JSX.Element;
115
131
  declare namespace Head {
116
- var displayName: string;
132
+ var displayName: string;
117
133
  }
118
- type DataTableRowProps<TData> = Omit<ComponentProps<typeof Table.Row>, "children"> & {
119
- row: Row$1<TData>;
134
+ type DataTableRowProps<TData> = Omit<ComponentProps<typeof Table$1.Row>, "children"> & {
135
+ row: Row<TData>;
120
136
  };
121
- declare function Row<TData>({ row, ...props }: DataTableRowProps<TData>): react_jsx_runtime.JSX.Element;
122
- declare namespace Row {
123
- var displayName: string;
137
+ declare function Row$1<TData>({
138
+ row,
139
+ ...props
140
+ }: DataTableRowProps<TData>): react_jsx_runtime0.JSX.Element;
141
+ declare namespace Row$1 {
142
+ var displayName: string;
124
143
  }
125
- type DataTableEmptyRowProps = ComponentProps<typeof Table.Row>;
126
- declare function EmptyRow<TData>({ children, ...props }: DataTableEmptyRowProps): react_jsx_runtime.JSX.Element;
144
+ type DataTableEmptyRowProps = ComponentProps<typeof Table$1.Row>;
145
+ declare function EmptyRow<TData>({
146
+ children,
147
+ ...props
148
+ }: DataTableEmptyRowProps): react_jsx_runtime0.JSX.Element;
127
149
  declare namespace EmptyRow {
128
- var displayName: string;
150
+ var displayName: string;
129
151
  }
130
- type DataTableActionCellProps = ComponentProps<typeof Table.Cell>;
131
- declare function ActionCell({ children, className, ...props }: DataTableActionCellProps): react_jsx_runtime.JSX.Element;
152
+ type DataTableActionCellProps = ComponentProps<typeof Table$1.Cell>;
153
+ declare function ActionCell({
154
+ children,
155
+ className,
156
+ ...props
157
+ }: DataTableActionCellProps): react_jsx_runtime0.JSX.Element;
132
158
  declare namespace ActionCell {
133
- var displayName: string;
159
+ var displayName: string;
134
160
  }
135
161
  /**
136
162
  * A data table component that provides sorting and other data table functionality.
@@ -149,128 +175,129 @@ declare namespace ActionCell {
149
175
  * ```
150
176
  */
151
177
  declare const DataTable: {
152
- /**
153
- * The root container of the data table component.
154
- *
155
- * @see https://mantle.ngrok.com/components/data-table#datatableroot
156
- *
157
- * @example
158
- * ```tsx
159
- * <DataTable.Root table={table}>
160
- * <DataTable.Head />
161
- * <DataTable.Body>
162
- * <DataTable.Rows />
163
- * </DataTable.Body>
164
- * </DataTable.Root>
165
- * ```
166
- */
167
- readonly Root: typeof Root;
168
- /**
169
- * A sticky action cell positioned at the end of each row for action buttons.
170
- *
171
- * @see https://mantle.ngrok.com/components/data-table#datatableactioncell
172
- *
173
- * @example
174
- * ```tsx
175
- * <DataTable.ActionCell>
176
- * <Button size="sm">Edit</Button>
177
- * <Button size="sm">Delete</Button>
178
- * </DataTable.ActionCell>
179
- * ```
180
- */
181
- readonly ActionCell: typeof ActionCell;
182
- /**
183
- * A table cell component for rendering individual data cells.
184
- *
185
- * @see https://mantle.ngrok.com/components/data-table#datatablecell
186
- *
187
- * @example
188
- * ```tsx
189
- * <DataTable.Cell>
190
- * Cell content
191
- * </DataTable.Cell>
192
- * ```
193
- */
194
- readonly Cell: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> & react.RefAttributes<HTMLTableDataCellElement>>;
195
- /**
196
- * The table body container for rows of data.
197
- *
198
- * @see https://mantle.ngrok.com/components/data-table#datatablebody
199
- *
200
- * @example
201
- * ```tsx
202
- * <DataTable.Body>
203
- * <DataTable.Rows />
204
- * </DataTable.Body>
205
- * ```
206
- */
207
- readonly Body: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & react.RefAttributes<HTMLTableSectionElement>>;
208
- /**
209
- * An empty state row that spans all columns when there's no data to display.
210
- *
211
- * @see https://mantle.ngrok.com/components/data-table#datatableemptyrow
212
- *
213
- * @example
214
- * ```tsx
215
- * <DataTable.EmptyRow>
216
- * No data available
217
- * </DataTable.EmptyRow>
218
- * ```
219
- */
220
- readonly EmptyRow: typeof EmptyRow;
221
- /**
222
- * The table header container that renders column headers automatically.
223
- *
224
- * @see https://mantle.ngrok.com/components/data-table#datatablehead
225
- *
226
- * @example
227
- * ```tsx
228
- * <DataTable.Head />
229
- * ```
230
- */
231
- readonly Head: typeof Head;
232
- /**
233
- * A header cell component optimized for data table header actions.
234
- *
235
- * @see https://mantle.ngrok.com/components/data-table#datatableheader
236
- *
237
- * @example
238
- * ```tsx
239
- * <DataTable.Header>
240
- * <DataTable.HeaderSortButton column={column} sortingMode="alphanumeric">
241
- * Column Title
242
- * </DataTable.HeaderSortButton>
243
- * </DataTable.Header>
244
- * ```
245
- */
246
- readonly Header: typeof Header;
247
- /**
248
- * A sortable button toggle for column headers with sorting functionality.
249
- *
250
- * @see https://mantle.ngrok.com/components/data-table#datatableheadersortbutton
251
- *
252
- * @example
253
- * ```tsx
254
- * <DataTable.HeaderSortButton
255
- * column={column}
256
- * sortingMode="alphanumeric"
257
- * >
258
- * Column Title
259
- * </DataTable.HeaderSortButton>
260
- * ```
261
- */
262
- readonly HeaderSortButton: typeof HeaderSortButton;
263
- /**
264
- * A single data table row component for rendering custom row layouts.
265
- *
266
- * @see https://mantle.ngrok.com/components/data-table#datatablerow
267
- *
268
- * @example
269
- * ```tsx
270
- * <DataTable.Row row={row} />
271
- * ```
272
- */
273
- readonly Row: typeof Row;
178
+ /**
179
+ * The root container of the data table component.
180
+ *
181
+ * @see https://mantle.ngrok.com/components/data-table#datatableroot
182
+ *
183
+ * @example
184
+ * ```tsx
185
+ * <DataTable.Root table={table}>
186
+ * <DataTable.Head />
187
+ * <DataTable.Body>
188
+ * <DataTable.Rows />
189
+ * </DataTable.Body>
190
+ * </DataTable.Root>
191
+ * ```
192
+ */
193
+ readonly Root: typeof Root;
194
+ /**
195
+ * A sticky action cell positioned at the end of each row for action buttons.
196
+ *
197
+ * @see https://mantle.ngrok.com/components/data-table#datatableactioncell
198
+ *
199
+ * @example
200
+ * ```tsx
201
+ * <DataTable.ActionCell>
202
+ * <Button size="sm">Edit</Button>
203
+ * <Button size="sm">Delete</Button>
204
+ * </DataTable.ActionCell>
205
+ * ```
206
+ */
207
+ readonly ActionCell: typeof ActionCell;
208
+ /**
209
+ * A table cell component for rendering individual data cells.
210
+ *
211
+ * @see https://mantle.ngrok.com/components/data-table#datatablecell
212
+ *
213
+ * @example
214
+ * ```tsx
215
+ * <DataTable.Cell>
216
+ * Cell content
217
+ * </DataTable.Cell>
218
+ * ```
219
+ */
220
+ readonly Cell: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> & react.RefAttributes<HTMLTableDataCellElement>>;
221
+ /**
222
+ * The table body container for rows of data.
223
+ *
224
+ * @see https://mantle.ngrok.com/components/data-table#datatablebody
225
+ *
226
+ * @example
227
+ * ```tsx
228
+ * <DataTable.Body>
229
+ * <DataTable.Rows />
230
+ * </DataTable.Body>
231
+ * ```
232
+ */
233
+ readonly Body: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & react.RefAttributes<HTMLTableSectionElement>>;
234
+ /**
235
+ * An empty state row that spans all columns when there's no data to display.
236
+ *
237
+ * @see https://mantle.ngrok.com/components/data-table#datatableemptyrow
238
+ *
239
+ * @example
240
+ * ```tsx
241
+ * <DataTable.EmptyRow>
242
+ * No data available
243
+ * </DataTable.EmptyRow>
244
+ * ```
245
+ */
246
+ readonly EmptyRow: typeof EmptyRow;
247
+ /**
248
+ * The table header container that renders column headers automatically.
249
+ *
250
+ * @see https://mantle.ngrok.com/components/data-table#datatablehead
251
+ *
252
+ * @example
253
+ * ```tsx
254
+ * <DataTable.Head />
255
+ * ```
256
+ */
257
+ readonly Head: typeof Head;
258
+ /**
259
+ * A header cell component optimized for data table header actions.
260
+ *
261
+ * @see https://mantle.ngrok.com/components/data-table#datatableheader
262
+ *
263
+ * @example
264
+ * ```tsx
265
+ * <DataTable.Header>
266
+ * <DataTable.HeaderSortButton column={column} sortingMode="alphanumeric">
267
+ * Column Title
268
+ * </DataTable.HeaderSortButton>
269
+ * </DataTable.Header>
270
+ * ```
271
+ */
272
+ readonly Header: typeof Header;
273
+ /**
274
+ * A sortable button toggle for column headers with sorting functionality.
275
+ *
276
+ * @see https://mantle.ngrok.com/components/data-table#datatableheadersortbutton
277
+ *
278
+ * @example
279
+ * ```tsx
280
+ * <DataTable.HeaderSortButton
281
+ * column={column}
282
+ * sortingMode="alphanumeric"
283
+ * >
284
+ * Column Title
285
+ * </DataTable.HeaderSortButton>
286
+ * ```
287
+ */
288
+ readonly HeaderSortButton: typeof HeaderSortButton;
289
+ /**
290
+ * A single data table row component for rendering custom row layouts.
291
+ *
292
+ * @see https://mantle.ngrok.com/components/data-table#datatablerow
293
+ *
294
+ * @example
295
+ * ```tsx
296
+ * <DataTable.Row row={row} />
297
+ * ```
298
+ */
299
+ readonly Row: typeof Row$1;
274
300
  };
275
-
301
+ //#endregion
276
302
  export { DataTable };
303
+ //# sourceMappingURL=data-table.d.ts.map