@datum-cloud/datum-ui 0.6.1 → 0.7.0

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 (251) hide show
  1. package/README.md +10 -0
  2. package/dist/action-row-DnhBhMtt.mjs +22 -0
  3. package/dist/app-navigation/index.mjs +2 -2
  4. package/dist/{app-navigation-84ro28PU.mjs → app-navigation-D0EBWUwJ.mjs} +48 -3
  5. package/dist/autocomplete/index.mjs +1 -1
  6. package/dist/autocomplete-DdbTQe6u.mjs +141 -0
  7. package/dist/autosearch/index.mjs +100 -92
  8. package/dist/avatar-stack/index.mjs +1 -1
  9. package/dist/{avatar-stack-oVr8tsU7.mjs → avatar-stack-CDhlA1Nm.mjs} +1 -1
  10. package/dist/calendar/index.mjs +1 -1
  11. package/dist/{calendar-DEkCw7I1.mjs → calendar-C-Hbf74r.mjs} +4 -4
  12. package/dist/{calendar-date-picker-CDT-8Ha8.mjs → calendar-date-picker-BaykEs6j.mjs} +324 -240
  13. package/dist/code-editor/index.mjs +1 -1
  14. package/dist/components/base/date-picker/index.d.ts +4 -0
  15. package/dist/components/base/date-picker/index.d.ts.map +1 -0
  16. package/dist/components/base/date-picker/types.d.ts +7 -0
  17. package/dist/components/base/date-picker/types.d.ts.map +1 -0
  18. package/dist/components/base/date-picker/use-date-constraints.d.ts +8 -0
  19. package/dist/components/base/date-picker/use-date-constraints.d.ts.map +1 -0
  20. package/dist/components/base/index.d.ts +3 -0
  21. package/dist/components/base/index.d.ts.map +1 -1
  22. package/dist/components/base/mobile-sheet/context.d.ts +13 -0
  23. package/dist/components/base/mobile-sheet/context.d.ts.map +1 -0
  24. package/dist/components/base/mobile-sheet/index.d.ts +3 -0
  25. package/dist/components/base/mobile-sheet/index.d.ts.map +1 -0
  26. package/dist/components/base/mobile-sheet/mobile-sheet.d.ts +14 -0
  27. package/dist/components/base/mobile-sheet/mobile-sheet.d.ts.map +1 -0
  28. package/dist/components/base/option-picker/index.d.ts +5 -0
  29. package/dist/components/base/option-picker/index.d.ts.map +1 -0
  30. package/dist/components/base/option-picker/option-list.d.ts +3 -0
  31. package/dist/components/base/option-picker/option-list.d.ts.map +1 -0
  32. package/dist/components/base/option-picker/types.d.ts +71 -0
  33. package/dist/components/base/option-picker/types.d.ts.map +1 -0
  34. package/dist/components/base/option-picker/use-option-picker.d.ts +4 -0
  35. package/dist/components/base/option-picker/use-option-picker.d.ts.map +1 -0
  36. package/dist/components/base/responsive-dropdown/index.d.ts +2 -0
  37. package/dist/components/base/responsive-dropdown/index.d.ts.map +1 -0
  38. package/dist/components/base/responsive-dropdown/responsive-dropdown.d.ts +25 -0
  39. package/dist/components/base/responsive-dropdown/responsive-dropdown.d.ts.map +1 -0
  40. package/dist/components/base/responsive-popover/index.d.ts +2 -0
  41. package/dist/components/base/responsive-popover/index.d.ts.map +1 -0
  42. package/dist/components/base/responsive-popover/responsive-popover.d.ts +46 -0
  43. package/dist/components/base/responsive-popover/responsive-popover.d.ts.map +1 -0
  44. package/dist/components/base/tooltip/tooltip.d.ts.map +1 -1
  45. package/dist/components/features/app-navigation/app-navigation.d.ts +5 -3
  46. package/dist/components/features/app-navigation/app-navigation.d.ts.map +1 -1
  47. package/dist/components/features/autocomplete/autocomplete.d.ts +2 -2
  48. package/dist/components/features/autocomplete/autocomplete.d.ts.map +1 -1
  49. package/dist/components/features/autocomplete/autocomplete.types.d.ts +7 -16
  50. package/dist/components/features/autocomplete/autocomplete.types.d.ts.map +1 -1
  51. package/dist/components/features/autocomplete/trigger.d.ts +20 -0
  52. package/dist/components/features/autocomplete/trigger.d.ts.map +1 -0
  53. package/dist/components/features/autosearch/autosearch.d.ts +1 -1
  54. package/dist/components/features/autosearch/autosearch.d.ts.map +1 -1
  55. package/dist/components/features/autosearch/autosearch.types.d.ts +4 -0
  56. package/dist/components/features/autosearch/autosearch.types.d.ts.map +1 -1
  57. package/dist/components/features/calendar-date-picker/calendar-date-picker.d.ts +3 -37
  58. package/dist/components/features/calendar-date-picker/calendar-date-picker.d.ts.map +1 -1
  59. package/dist/components/features/calendar-date-picker/calendar-header.d.ts +13 -0
  60. package/dist/components/features/calendar-date-picker/calendar-header.d.ts.map +1 -0
  61. package/dist/components/features/calendar-date-picker/calendar-presets.d.ts +9 -0
  62. package/dist/components/features/calendar-date-picker/calendar-presets.d.ts.map +1 -0
  63. package/dist/components/features/calendar-date-picker/date-trigger.d.ts +24 -0
  64. package/dist/components/features/calendar-date-picker/date-trigger.d.ts.map +1 -0
  65. package/dist/components/features/calendar-date-picker/index.d.ts +2 -1
  66. package/dist/components/features/calendar-date-picker/index.d.ts.map +1 -1
  67. package/dist/components/features/calendar-date-picker/types.d.ts +42 -0
  68. package/dist/components/features/calendar-date-picker/types.d.ts.map +1 -0
  69. package/dist/components/features/calendar-date-picker/use-calendar-date-picker.d.ts +48 -0
  70. package/dist/components/features/calendar-date-picker/use-calendar-date-picker.d.ts.map +1 -0
  71. package/dist/components/features/data-table/components/row-actions.d.ts +1 -1
  72. package/dist/components/features/data-table/components/row-actions.d.ts.map +1 -1
  73. package/dist/components/features/data-table/filters/checkbox-filter.d.ts +1 -1
  74. package/dist/components/features/data-table/filters/checkbox-filter.d.ts.map +1 -1
  75. package/dist/components/features/data-table/filters/select-filter.d.ts +1 -1
  76. package/dist/components/features/data-table/filters/select-filter.d.ts.map +1 -1
  77. package/dist/components/features/data-table/types.d.ts +11 -12
  78. package/dist/components/features/data-table/types.d.ts.map +1 -1
  79. package/dist/components/features/date-time-picker/date-time-picker.d.ts +1 -1
  80. package/dist/components/features/date-time-picker/date-time-picker.d.ts.map +1 -1
  81. package/dist/components/features/date-time-picker/types.d.ts +23 -0
  82. package/dist/components/features/date-time-picker/types.d.ts.map +1 -1
  83. package/dist/components/features/form/components/form-combobox.d.ts +7 -44
  84. package/dist/components/features/form/components/form-combobox.d.ts.map +1 -1
  85. package/dist/components/features/form/components/form-dialog.d.ts +2 -1
  86. package/dist/components/features/form/components/form-dialog.d.ts.map +1 -1
  87. package/dist/components/features/form/components/form-field.d.ts +1 -1
  88. package/dist/components/features/form/components/form-field.d.ts.map +1 -1
  89. package/dist/components/features/form/types/index.d.ts +4 -0
  90. package/dist/components/features/form/types/index.d.ts.map +1 -1
  91. package/dist/components/features/index.d.ts +2 -0
  92. package/dist/components/features/index.d.ts.map +1 -1
  93. package/dist/components/features/more-actions/action-row.d.ts +9 -0
  94. package/dist/components/features/more-actions/action-row.d.ts.map +1 -0
  95. package/dist/components/features/more-actions/index.d.ts +3 -1
  96. package/dist/components/features/more-actions/index.d.ts.map +1 -1
  97. package/dist/components/features/more-actions/more-actions.d.ts +8 -14
  98. package/dist/components/features/more-actions/more-actions.d.ts.map +1 -1
  99. package/dist/components/features/more-actions/types.d.ts +24 -0
  100. package/dist/components/features/more-actions/types.d.ts.map +1 -0
  101. package/dist/components/features/multi-select/index.d.ts +3 -0
  102. package/dist/components/features/multi-select/index.d.ts.map +1 -0
  103. package/dist/components/features/multi-select/multi-select.d.ts +147 -0
  104. package/dist/components/features/multi-select/multi-select.d.ts.map +1 -0
  105. package/dist/components/features/page-title/page-title.d.ts.map +1 -1
  106. package/dist/components/features/rich-text-editor/index.d.ts +4 -0
  107. package/dist/components/features/rich-text-editor/index.d.ts.map +1 -0
  108. package/dist/components/features/rich-text-editor/rich-text-content.d.ts +3 -0
  109. package/dist/components/features/rich-text-editor/rich-text-content.d.ts.map +1 -0
  110. package/dist/components/features/rich-text-editor/rich-text-editor.d.ts +28 -0
  111. package/dist/components/features/rich-text-editor/rich-text-editor.d.ts.map +1 -0
  112. package/dist/components/features/rich-text-editor/toolbar/bold-toolbar.d.ts +2 -0
  113. package/dist/components/features/rich-text-editor/toolbar/bold-toolbar.d.ts.map +1 -0
  114. package/dist/components/features/rich-text-editor/toolbar/italic-toolbar.d.ts +2 -0
  115. package/dist/components/features/rich-text-editor/toolbar/italic-toolbar.d.ts.map +1 -0
  116. package/dist/components/features/rich-text-editor/toolbar/link-toolbar.d.ts +2 -0
  117. package/dist/components/features/rich-text-editor/toolbar/link-toolbar.d.ts.map +1 -0
  118. package/dist/components/features/rich-text-editor/toolbar/strike-toolbar.d.ts +2 -0
  119. package/dist/components/features/rich-text-editor/toolbar/strike-toolbar.d.ts.map +1 -0
  120. package/dist/components/features/rich-text-editor/toolbar/toolbar-button.d.ts +17 -0
  121. package/dist/components/features/rich-text-editor/toolbar/toolbar-button.d.ts.map +1 -0
  122. package/dist/components/features/rich-text-editor/toolbar/toolbar.d.ts +6 -0
  123. package/dist/components/features/rich-text-editor/toolbar/toolbar.d.ts.map +1 -0
  124. package/dist/components/features/rich-text-editor/toolbar/underline-toolbar.d.ts +2 -0
  125. package/dist/components/features/rich-text-editor/toolbar/underline-toolbar.d.ts.map +1 -0
  126. package/dist/components/features/rich-text-editor/types.d.ts +20 -0
  127. package/dist/components/features/rich-text-editor/types.d.ts.map +1 -0
  128. package/dist/components/features/tag-input/tag-input.d.ts +12 -1
  129. package/dist/components/features/tag-input/tag-input.d.ts.map +1 -1
  130. package/dist/components/features/task-queue/core/task-queue-dropdown.d.ts.map +1 -1
  131. package/dist/components/features/time-picker/time-picker.d.ts +1 -17
  132. package/dist/components/features/time-picker/time-picker.d.ts.map +1 -1
  133. package/dist/components/features/time-picker/types.d.ts +20 -18
  134. package/dist/components/features/time-picker/types.d.ts.map +1 -1
  135. package/dist/components/features/time-picker/use-time-slots.d.ts +10 -0
  136. package/dist/components/features/time-picker/use-time-slots.d.ts.map +1 -0
  137. package/dist/components/features/time-range-picker/components/absolute-range-panel.d.ts.map +1 -1
  138. package/dist/components/features/time-range-picker/time-range-picker.d.ts.map +1 -1
  139. package/dist/data-table/index.mjs +60 -175
  140. package/dist/date-picker/index.mjs +2 -2
  141. package/dist/date-time-picker/index.mjs +1 -1
  142. package/dist/{date-time-picker-BomrW07W.mjs → date-time-picker-DKOxrhmc.mjs} +64 -49
  143. package/dist/dropdown/index.mjs +109 -1
  144. package/dist/dropzone/index.mjs +1 -1
  145. package/dist/empty-content/index.mjs +1 -1
  146. package/dist/form/adapters/conform/index.mjs +2 -2
  147. package/dist/form/adapters/rhf/index.mjs +2 -2
  148. package/dist/form/index.mjs +2 -2
  149. package/dist/form/stepper/index.mjs +3 -3
  150. package/dist/{form-B3rQ4CH9.mjs → form-CCNN9VtJ.mjs} +27 -30
  151. package/dist/grid/index.mjs +1 -1
  152. package/dist/hooks/index.d.ts +1 -0
  153. package/dist/hooks/index.d.ts.map +1 -1
  154. package/dist/hooks/index.mjs +4 -3
  155. package/dist/hooks/use-breakpoint.d.ts +9 -0
  156. package/dist/hooks/use-breakpoint.d.ts.map +1 -0
  157. package/dist/index.mjs +48 -41
  158. package/dist/input-number/index.mjs +1 -1
  159. package/dist/loader-overlay/index.mjs +1 -1
  160. package/dist/map/index.mjs +1 -1
  161. package/dist/{map-CWIQ-eql.mjs → map-DRzZDNtB.mjs} +83 -4
  162. package/dist/mobile-sheet/index.mjs +2 -0
  163. package/dist/mobile-sheet-BxMvkzAj.mjs +61 -0
  164. package/dist/more-actions/index.mjs +3 -2
  165. package/dist/more-actions-Ca5qqd0H.mjs +49 -0
  166. package/dist/multi-select/index.mjs +2 -0
  167. package/dist/multi-select-DM_dxnSV.mjs +235 -0
  168. package/dist/page-title/index.mjs +1 -1
  169. package/dist/{page-title-ChsnpBiH.mjs → page-title-ChLiv6gB.mjs} +3 -2
  170. package/dist/popover/index.mjs +1 -1
  171. package/dist/radio-group/index.mjs +1 -1
  172. package/dist/responsive-dropdown/index.mjs +2 -0
  173. package/dist/responsive-dropdown-IFroDgKn.mjs +53 -0
  174. package/dist/responsive-popover/index.mjs +2 -0
  175. package/dist/responsive-popover-D-t9bxSN.mjs +61 -0
  176. package/dist/rich-text-editor/index.mjs +2 -0
  177. package/dist/rich-text-editor-CQH_U4T5.mjs +293 -0
  178. package/dist/select/index.mjs +1 -1
  179. package/dist/sheet/index.mjs +2 -2
  180. package/dist/{sheet-BzXksqYY.mjs → sheet-LhUgozvg.mjs} +1 -1
  181. package/dist/sidebar/index.mjs +1 -1
  182. package/dist/{sidebar-BnhnjvfO.mjs → sidebar-B8LQJiNI.mjs} +3 -3
  183. package/dist/skeleton/index.mjs +1 -1
  184. package/dist/{skeleton-D1MUhAVo.mjs → skeleton-D4HOEiOZ.mjs} +1 -1
  185. package/dist/spinner/index.mjs +1 -1
  186. package/dist/stepper/index.mjs +1 -1
  187. package/dist/styles/canela.css +23 -0
  188. package/dist/styles/fonts/CanelaText-Regular.ttf +0 -0
  189. package/dist/styles/tokens/figma-tokens.css +4 -0
  190. package/dist/switch/index.mjs +1 -1
  191. package/dist/table/index.mjs +1 -1
  192. package/dist/tag-input/index.mjs +1 -1
  193. package/dist/{tag-input-T9cUX9-G.mjs → tag-input-Bf4GMptp.mjs} +29 -14
  194. package/dist/task-queue/index.mjs +1 -1
  195. package/dist/{task-queue-dropdown-Wcbj-f0V.mjs → task-queue-dropdown-D-LncEWm.mjs} +39 -39
  196. package/dist/textarea/index.mjs +1 -1
  197. package/dist/theme/index.mjs +1 -1
  198. package/dist/time-picker/index.mjs +1 -1
  199. package/dist/time-picker-BZF5jbF6.mjs +99 -0
  200. package/dist/{to-api-format-Bh3c01gr.mjs → to-api-format-CgKcC9SK.mjs} +144 -119
  201. package/dist/toast/index.mjs +2 -2
  202. package/dist/{toast-DpxlFNNx.mjs → toast-DDdLgY53.mjs} +1 -1
  203. package/dist/tooltip/index.mjs +1 -1
  204. package/dist/{tooltip-Cruvl5F6.mjs → tooltip-a7NTDCWw.mjs} +74 -17
  205. package/dist/transfer/index.mjs +1 -1
  206. package/dist/{types-BZNk3q65.mjs → types-CKIe2WlV.mjs} +2 -2
  207. package/dist/typography/index.mjs +1 -1
  208. package/dist/use-breakpoint-DGcVmB3c.mjs +36 -0
  209. package/dist/{use-copy-to-clipboard-uNeeVHC4.mjs → use-copy-to-clipboard-D7KyLIAt.mjs} +1 -1
  210. package/dist/use-date-constraints-R3H4lIoT.mjs +41 -0
  211. package/dist/use-option-picker-BXQOfyrK.mjs +215 -0
  212. package/dist/visually-hidden/index.mjs +1 -1
  213. package/package.json +61 -6
  214. package/dist/autocomplete-CkYJueBL.mjs +0 -293
  215. package/dist/combobox/index.mjs +0 -2
  216. package/dist/combobox-B-C9lJeD.mjs +0 -97
  217. package/dist/components/features/combobox/combobox.d.ts +0 -27
  218. package/dist/components/features/combobox/combobox.d.ts.map +0 -1
  219. package/dist/components/features/combobox/index.d.ts +0 -3
  220. package/dist/components/features/combobox/index.d.ts.map +0 -1
  221. package/dist/components/features/combobox/types.d.ts +0 -84
  222. package/dist/components/features/combobox/types.d.ts.map +0 -1
  223. package/dist/dropdown-DZiAt-jS.mjs +0 -110
  224. package/dist/dropdown-menu-lALvDnab.mjs +0 -85
  225. package/dist/more-actions-ILnEZq_E.mjs +0 -52
  226. package/dist/time-picker-BoF7pZZ2.mjs +0 -43
  227. /package/dist/{adapter-context-rWveHhDd.mjs → adapter-context-NyGTDZYq.mjs} +0 -0
  228. /package/dist/{col-1T0Q3SlH.mjs → col-DISdGlqY.mjs} +0 -0
  229. /package/dist/{dropzone-ogtpQ4fy.mjs → dropzone-Bt0plEuw.mjs} +0 -0
  230. /package/dist/{empty-content-C63GPJ5d.mjs → empty-content-CBh5bbtJ.mjs} +0 -0
  231. /package/dist/{form-context-Ccxm-wqL.mjs → form-context-CeKyvO-A.mjs} +0 -0
  232. /package/dist/{hooks-D8r2M2U6.mjs → hooks-DQXVwbrs.mjs} +0 -0
  233. /package/dist/{input-number-a7uydAsw.mjs → input-number-Diu-C6d5.mjs} +0 -0
  234. /package/dist/{loader-overlay-BTFdkp7W.mjs → loader-overlay-C2WDla6V.mjs} +0 -0
  235. /package/dist/{map-leaflet-imports-CRSKA79m.mjs → map-leaflet-imports-BkUrNU37.mjs} +0 -0
  236. /package/dist/{popover-FJAcbYoH.mjs → popover-JOuXJOZ2.mjs} +0 -0
  237. /package/dist/{radio-group-CiITR0LO.mjs → radio-group-70UjJBb5.mjs} +0 -0
  238. /package/dist/{select-CiLR_DiQ.mjs → select-zxwykvQn.mjs} +0 -0
  239. /package/dist/{sheet-Di3b-oPu.mjs → sheet-DVEToCVY.mjs} +0 -0
  240. /package/dist/{skeleton-BKl4mfJt.mjs → skeleton-D2xuJdE1.mjs} +0 -0
  241. /package/dist/{spinner-OyOf9-Yu.mjs → spinner-CgPI3DDi.mjs} +0 -0
  242. /package/dist/{stepper-DvIOp0hh.mjs → stepper-Beb-zbdL.mjs} +0 -0
  243. /package/dist/{switch-DQJQhPIQ.mjs → switch-DcSF42Kc.mjs} +0 -0
  244. /package/dist/{table-Cdsh-39-.mjs → table-DWGT4cqh.mjs} +0 -0
  245. /package/dist/{textarea-BwD-MmTV.mjs → textarea-BoChBcFz.mjs} +0 -0
  246. /package/dist/{themes-DG1md8FI.mjs → themes-CAiN4b6G.mjs} +0 -0
  247. /package/dist/{toast-BWnN5fax.mjs → toast-D5XD7goD.mjs} +0 -0
  248. /package/dist/{transfer-46C-rFFW.mjs → transfer-CoGPwOc6.mjs} +0 -0
  249. /package/dist/{typography-ClB8k55E.mjs → typography-TRKP_CLT.mjs} +0 -0
  250. /package/dist/{use-display-touched-I39aXEBD.mjs → use-display-touched-8VGszCqj.mjs} +0 -0
  251. /package/dist/{visuallyhidden-BLUsJpYH.mjs → visuallyhidden-BHOPczmW.mjs} +0 -0
@@ -1,97 +0,0 @@
1
- import { t as cn } from "./cn-D2KYQ917.mjs";
2
- import { a as CommandInput, i as CommandGroup, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "./command-DqHWukGK.mjs";
3
- import { i as PopoverTrigger, r as PopoverContent, t as Popover } from "./popover-FJAcbYoH.mjs";
4
- import { CheckIcon, ChevronDown, X } from "lucide-react";
5
- import * as React$1 from "react";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
- //#region src/components/features/combobox/combobox.tsx
8
- /**
9
- * Combobox - Single-select dropdown with search
10
- *
11
- * A simpler alternative to Autocomplete for basic select scenarios.
12
- * Supports grouped options and search filtering.
13
- *
14
- * @example
15
- * ```tsx
16
- * const options = [
17
- * { value: '1', label: 'Option 1' },
18
- * { value: '2', label: 'Option 2' },
19
- * ]
20
- *
21
- * <Combobox
22
- * options={options}
23
- * value={value}
24
- * onChange={setValue}
25
- * placeholder="Select an option"
26
- * />
27
- * ```
28
- */
29
- function Combobox({ options, value, onChange, placeholder = "Select option...", searchPlaceholder = "Search...", emptyMessage = "No options found.", disabled = false, className, triggerClassName, contentClassName, searchable = true, showDropdownArrow = true, clearable = false, id, "data-testid": testId, modal = true }) {
30
- const [open, setOpen] = React$1.useState(false);
31
- const isGrouped = options.length > 0 && "options" in options[0];
32
- const selectedOption = React$1.useMemo(() => {
33
- if (isGrouped) return options.flatMap((group) => group.options);
34
- return options;
35
- }, [options, isGrouped]).find((opt) => opt.value === value);
36
- const handleSelect = React$1.useCallback((selectedValue) => {
37
- onChange?.(selectedValue === value ? void 0 : selectedValue);
38
- setOpen(false);
39
- }, [value, onChange]);
40
- const handleClear = React$1.useCallback((e) => {
41
- e.stopPropagation();
42
- onChange?.(void 0);
43
- }, [onChange]);
44
- return /* @__PURE__ */ jsxs(Popover, {
45
- open,
46
- onOpenChange: setOpen,
47
- modal,
48
- children: [/* @__PURE__ */ jsx(PopoverTrigger, {
49
- asChild: true,
50
- children: /* @__PURE__ */ jsxs("button", {
51
- type: "button",
52
- role: "combobox",
53
- "aria-expanded": open,
54
- disabled,
55
- id,
56
- "data-testid": testId,
57
- className: cn("flex h-10 w-full items-center justify-between rounded-lg border border-input bg-background px-3 py-2 text-sm", "ring-offset-background placeholder:text-muted-foreground", "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", "disabled:cursor-not-allowed disabled:opacity-50", triggerClassName, className),
58
- children: [/* @__PURE__ */ jsx("span", {
59
- className: "truncate",
60
- children: selectedOption ? selectedOption.label : placeholder
61
- }), /* @__PURE__ */ jsxs("div", {
62
- className: "ml-2 flex shrink-0 items-center gap-1",
63
- children: [clearable && selectedOption && !disabled && /* @__PURE__ */ jsx(X, {
64
- className: "size-4 opacity-50 hover:opacity-100",
65
- onClick: handleClear
66
- }), showDropdownArrow && /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 opacity-50" })]
67
- })]
68
- })
69
- }), /* @__PURE__ */ jsx(PopoverContent, {
70
- className: cn("popover-content-width-full p-0", contentClassName),
71
- align: "start",
72
- children: /* @__PURE__ */ jsxs(Command, { children: [searchable && /* @__PURE__ */ jsx(CommandInput, {
73
- placeholder: searchPlaceholder,
74
- className: "h-9"
75
- }), /* @__PURE__ */ jsxs(CommandList, {
76
- className: "max-h-[300px]",
77
- children: [/* @__PURE__ */ jsx(CommandEmpty, { children: emptyMessage }), isGrouped ? options.map((group) => /* @__PURE__ */ jsx(CommandGroup, {
78
- heading: group.label,
79
- children: group.options.map((option) => /* @__PURE__ */ jsxs(CommandItem, {
80
- value: option.value,
81
- disabled: option.disabled,
82
- onSelect: handleSelect,
83
- children: [option.label, /* @__PURE__ */ jsx(CheckIcon, { className: cn("ml-auto size-4", value === option.value ? "opacity-100" : "opacity-0") })]
84
- }, option.value))
85
- }, group.label)) : /* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs(CommandItem, {
86
- value: option.value,
87
- disabled: option.disabled,
88
- onSelect: handleSelect,
89
- children: [option.label, /* @__PURE__ */ jsx(CheckIcon, { className: cn("ml-auto size-4", value === option.value ? "opacity-100" : "opacity-0") })]
90
- }, option.value)) })]
91
- })] })
92
- })]
93
- });
94
- }
95
- Combobox.displayName = "Combobox";
96
- //#endregion
97
- export { Combobox as t };
@@ -1,27 +0,0 @@
1
- import type { ComboboxProps } from './types';
2
- /**
3
- * Combobox - Single-select dropdown with search
4
- *
5
- * A simpler alternative to Autocomplete for basic select scenarios.
6
- * Supports grouped options and search filtering.
7
- *
8
- * @example
9
- * ```tsx
10
- * const options = [
11
- * { value: '1', label: 'Option 1' },
12
- * { value: '2', label: 'Option 2' },
13
- * ]
14
- *
15
- * <Combobox
16
- * options={options}
17
- * value={value}
18
- * onChange={setValue}
19
- * placeholder="Select an option"
20
- * />
21
- * ```
22
- */
23
- export declare function Combobox({ options, value, onChange, placeholder, searchPlaceholder, emptyMessage, disabled, className, triggerClassName, contentClassName, searchable, showDropdownArrow, clearable, id, 'data-testid': testId, modal, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
24
- export declare namespace Combobox {
25
- var displayName: string;
26
- }
27
- //# sourceMappingURL=combobox.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/features/combobox/combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiC,aAAa,EAAE,MAAM,SAAS,CAAA;AAc3E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,KAAK,EACL,QAAQ,EACR,WAAgC,EAChC,iBAA+B,EAC/B,YAAkC,EAClC,QAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,UAAiB,EACjB,iBAAwB,EACxB,SAAiB,EACjB,EAAE,EACF,aAAa,EAAE,MAAM,EACrB,KAAY,GACb,EAAE,aAAa,2CAgIf;yBAjJe,QAAQ"}
@@ -1,3 +0,0 @@
1
- export { Combobox } from './combobox';
2
- export type { ComboboxGroup, ComboboxOption, ComboboxProps } from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/features/combobox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA"}
@@ -1,84 +0,0 @@
1
- export interface ComboboxOption {
2
- value: string;
3
- label: string;
4
- disabled?: boolean;
5
- }
6
- export interface ComboboxGroup {
7
- label: string;
8
- options: ComboboxOption[];
9
- }
10
- export interface ComboboxProps {
11
- /**
12
- * Available options (flat or grouped)
13
- */
14
- 'options': ComboboxOption[] | ComboboxGroup[];
15
- /**
16
- * Selected value
17
- */
18
- 'value'?: string;
19
- /**
20
- * Called when selection changes
21
- */
22
- 'onChange'?: (value: string | undefined) => void;
23
- /**
24
- * Placeholder for trigger button
25
- * @default "Select option..."
26
- */
27
- 'placeholder'?: string;
28
- /**
29
- * Placeholder for search input
30
- * @default "Search..."
31
- */
32
- 'searchPlaceholder'?: string;
33
- /**
34
- * Message shown when no options match
35
- * @default "No options found."
36
- */
37
- 'emptyMessage'?: string;
38
- /**
39
- * Disable the combobox
40
- */
41
- 'disabled'?: boolean;
42
- /**
43
- * Additional CSS classes for container
44
- */
45
- 'className'?: string;
46
- /**
47
- * Additional CSS classes for trigger button
48
- */
49
- 'triggerClassName'?: string;
50
- /**
51
- * Additional CSS classes for popover content
52
- */
53
- 'contentClassName'?: string;
54
- /**
55
- * Enable search functionality
56
- * @default true
57
- */
58
- 'searchable'?: boolean;
59
- /**
60
- * Show dropdown arrow icon
61
- * @default true
62
- */
63
- 'showDropdownArrow'?: boolean;
64
- /**
65
- * Allow clearing the selection
66
- * @default false
67
- */
68
- 'clearable'?: boolean;
69
- /**
70
- * ID for the combobox
71
- */
72
- 'id'?: string;
73
- /**
74
- * Test ID
75
- */
76
- 'data-testid'?: string;
77
- /**
78
- * Whether the popover is modal (prevents interaction with elements outside)
79
- * Required when using inside a Dialog/Modal component
80
- * @default true
81
- */
82
- 'modal'?: boolean;
83
- }
84
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/features/combobox/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,cAAc,EAAE,CAAA;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,SAAS,EAAE,cAAc,EAAE,GAAG,aAAa,EAAE,CAAA;IAE7C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAA;IAEhD;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAE5B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAE3B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAE3B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB"}
@@ -1,110 +0,0 @@
1
- import { t as cn } from "./cn-D2KYQ917.mjs";
2
- import { t as Icon } from "./icon-wrapper-DuLp3RM1.mjs";
3
- import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
4
- import "react";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
7
- //#region src/components/features/dropdown/dropdown.tsx
8
- /**
9
- * Datum Dropdown Menu Component
10
- * Extends shadcn DropdownMenu with:
11
- * - Destructive variant for DropdownMenuItem
12
- */
13
- function DropdownMenu({ ...props }) {
14
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { ...props });
15
- }
16
- function DropdownMenuPortal({ ...props }) {
17
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { ...props });
18
- }
19
- function DropdownMenuTrigger({ ...props }) {
20
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, { ...props });
21
- }
22
- function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
23
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
24
- sideOffset,
25
- className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className),
26
- ...props
27
- }) });
28
- }
29
- function DropdownMenuGroup({ ...props }) {
30
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, { ...props });
31
- }
32
- function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
33
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, {
34
- "data-inset": inset,
35
- "data-variant": variant,
36
- className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
37
- ...props
38
- });
39
- }
40
- function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
41
- return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, {
42
- className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
43
- checked,
44
- ...props,
45
- children: [/* @__PURE__ */ jsx("span", {
46
- className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
47
- children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Icon, {
48
- icon: CheckIcon,
49
- className: "size-4"
50
- }) })
51
- }), children]
52
- });
53
- }
54
- function DropdownMenuRadioGroup({ ...props }) {
55
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.RadioGroup, { ...props });
56
- }
57
- function DropdownMenuRadioItem({ className, children, ...props }) {
58
- return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, {
59
- className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
60
- ...props,
61
- children: [/* @__PURE__ */ jsx("span", {
62
- className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
63
- children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Icon, {
64
- icon: CircleIcon,
65
- className: "size-2 fill-current"
66
- }) })
67
- }), children]
68
- });
69
- }
70
- function DropdownMenuLabel({ className, inset, ...props }) {
71
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, {
72
- "data-inset": inset,
73
- className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
74
- ...props
75
- });
76
- }
77
- function DropdownMenuSeparator({ className, ...props }) {
78
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, {
79
- className: cn("bg-border -mx-1 my-1 h-px", className),
80
- ...props
81
- });
82
- }
83
- function DropdownMenuShortcut({ className, ...props }) {
84
- return /* @__PURE__ */ jsx("span", {
85
- className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
86
- ...props
87
- });
88
- }
89
- function DropdownMenuSub({ ...props }) {
90
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, { ...props });
91
- }
92
- function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
93
- return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, {
94
- "data-inset": inset,
95
- className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8", className),
96
- ...props,
97
- children: [children, /* @__PURE__ */ jsx(Icon, {
98
- icon: ChevronRightIcon,
99
- className: "ml-auto size-4"
100
- })]
101
- });
102
- }
103
- function DropdownMenuSubContent({ className, ...props }) {
104
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, {
105
- className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg", className),
106
- ...props
107
- });
108
- }
109
- //#endregion
110
- export { DropdownMenuItem as a, DropdownMenuRadioGroup as c, DropdownMenuShortcut as d, DropdownMenuSub as f, DropdownMenuTrigger as h, DropdownMenuGroup as i, DropdownMenuRadioItem as l, DropdownMenuSubTrigger as m, DropdownMenuCheckboxItem as n, DropdownMenuLabel as o, DropdownMenuSubContent as p, DropdownMenuContent as r, DropdownMenuPortal as s, DropdownMenu as t, DropdownMenuSeparator as u };
@@ -1,85 +0,0 @@
1
- import { t as cn } from "./utils-C8KwMfT_.mjs";
2
- import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
3
- import * as React$1 from "react";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
6
- //#region ../shadcn/ui/dropdown-menu.tsx
7
- /**
8
- * Vanilla shadcn/ui DropdownMenu Component
9
- * Pure shadcn dropdown without Datum customizations
10
- * For Datum-specific features (destructive MenuItem), import from @/modules/datum-ui
11
- */
12
- const DropdownMenu = DropdownMenuPrimitive.Root;
13
- const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
14
- DropdownMenuPrimitive.Group;
15
- DropdownMenuPrimitive.Portal;
16
- DropdownMenuPrimitive.Sub;
17
- const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
18
- const DropdownMenuSubTrigger = React$1.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, {
19
- ref,
20
- className: cn("focus:bg-accent data-[state=open]:bg-accent flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className),
21
- ...props,
22
- children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
23
- }));
24
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
25
- const DropdownMenuSubContent = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, {
26
- ref,
27
- className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg", className),
28
- ...props
29
- }));
30
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
31
- const DropdownMenuContent = React$1.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
32
- ref,
33
- sideOffset,
34
- className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md", className),
35
- ...props
36
- }) }));
37
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
38
- const DropdownMenuItem = React$1.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, {
39
- ref,
40
- className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className),
41
- ...props
42
- }));
43
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
44
- const DropdownMenuCheckboxItem = React$1.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, {
45
- ref,
46
- className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
47
- checked,
48
- ...props,
49
- children: [/* @__PURE__ */ jsx("span", {
50
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
51
- children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "h-4 w-4" }) })
52
- }), children]
53
- }));
54
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
55
- const DropdownMenuRadioItem = React$1.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, {
56
- ref,
57
- className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
58
- ...props,
59
- children: [/* @__PURE__ */ jsx("span", {
60
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
61
- children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "h-2 w-2 fill-current" }) })
62
- }), children]
63
- }));
64
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
65
- const DropdownMenuLabel = React$1.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, {
66
- ref,
67
- className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
68
- ...props
69
- }));
70
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
71
- const DropdownMenuSeparator = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, {
72
- ref,
73
- className: cn("bg-muted -mx-1 my-1 h-px", className),
74
- ...props
75
- }));
76
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
77
- const DropdownMenuShortcut = ({ className, ...props }) => {
78
- return /* @__PURE__ */ jsx("span", {
79
- className: cn("ml-auto text-xs tracking-widest opacity-60", className),
80
- ...props
81
- });
82
- };
83
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
84
- //#endregion
85
- export { DropdownMenuLabel as a, DropdownMenuSeparator as c, DropdownMenuItem as i, DropdownMenuTrigger as l, DropdownMenuCheckboxItem as n, DropdownMenuRadioGroup as o, DropdownMenuContent as r, DropdownMenuRadioItem as s, DropdownMenu as t };
@@ -1,52 +0,0 @@
1
- import { t as cn } from "./cn-D2KYQ917.mjs";
2
- import { t as Button } from "./button-BllvE9Lm.mjs";
3
- import { t as Tooltip } from "./tooltip-Cruvl5F6.mjs";
4
- import { a as DropdownMenuItem, h as DropdownMenuTrigger, r as DropdownMenuContent, t as DropdownMenu } from "./dropdown-DZiAt-jS.mjs";
5
- import { Ellipsis } from "lucide-react";
6
- import { useState } from "react";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
- //#region src/components/features/more-actions/more-actions.tsx
9
- function MoreActions({ row, actions, className, disabled = false, iconClassName }) {
10
- const [open, setOpen] = useState(false);
11
- const visibleActions = actions.filter((action) => !action.hidden?.(row));
12
- if (visibleActions.length === 0) return null;
13
- return /* @__PURE__ */ jsxs(DropdownMenu, {
14
- open,
15
- onOpenChange: setOpen,
16
- children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
17
- asChild: true,
18
- children: /* @__PURE__ */ jsx(Button, {
19
- onClick: () => setOpen(!open),
20
- type: "quaternary",
21
- theme: "borderless",
22
- size: "icon",
23
- disabled,
24
- className: cn("data-[state=open]:bg-accent size-7 p-0 focus-visible:ring-0 focus-visible:ring-offset-0", className),
25
- children: /* @__PURE__ */ jsx(Ellipsis, { className: cn("size-5", iconClassName) })
26
- })
27
- }), /* @__PURE__ */ jsx(DropdownMenuContent, {
28
- align: "end",
29
- children: visibleActions.map((action) => {
30
- const tooltipText = typeof action.tooltip === "function" ? action.tooltip(row) : action.tooltip ?? action.label;
31
- const menuItem = /* @__PURE__ */ jsxs(DropdownMenuItem, {
32
- onClick: (event) => {
33
- event.preventDefault();
34
- event.stopPropagation();
35
- setOpen(false);
36
- action.action(row);
37
- },
38
- className: cn("cursor-pointer text-xs", action.variant === "destructive" && "text-destructive [&_svg]:!text-destructive hover:!text-destructive hover:[&_svg]:!text-destructive", action.className),
39
- disabled: action.disabled?.(row) ?? false,
40
- children: [action.icon, action.label]
41
- });
42
- if (tooltipText && tooltipText !== action.label) return /* @__PURE__ */ jsx(Tooltip, {
43
- message: tooltipText,
44
- children: menuItem
45
- }, action.key);
46
- return /* @__PURE__ */ jsx("div", { children: menuItem }, action.key);
47
- })
48
- })]
49
- });
50
- }
51
- //#endregion
52
- export { MoreActions as t };
@@ -1,43 +0,0 @@
1
- import { t as cn } from "./cn-D2KYQ917.mjs";
2
- import { t as Input } from "./input-FKGqZypx.mjs";
3
- import * as React$1 from "react";
4
- import { jsx } from "react/jsx-runtime";
5
- //#region src/components/features/time-picker/time-picker.tsx
6
- /**
7
- * TimePicker - Simple time input component
8
- *
9
- * Provides a native HTML time input for selecting hours and minutes.
10
- * Value format: "HH:mm" (e.g., "14:30")
11
- *
12
- * @example
13
- * ```tsx
14
- * <TimePicker
15
- * value="14:30"
16
- * onChange={(time) => console.log(time)}
17
- * min="09:00"
18
- * max="17:00"
19
- * />
20
- * ```
21
- */
22
- function TimePicker({ value, onChange, min, max, step, placeholder, disabled, className, id, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedBy }) {
23
- const handleChange = React$1.useCallback((e) => {
24
- onChange?.(e.target.value);
25
- }, [onChange]);
26
- return /* @__PURE__ */ jsx(Input, {
27
- id,
28
- type: "time",
29
- value: value || "",
30
- onChange: handleChange,
31
- min,
32
- max,
33
- step,
34
- placeholder,
35
- disabled,
36
- className: cn(className),
37
- "aria-invalid": ariaInvalid,
38
- "aria-describedby": ariaDescribedBy
39
- });
40
- }
41
- TimePicker.displayName = "TimePicker";
42
- //#endregion
43
- export { TimePicker as t };
File without changes
File without changes
File without changes
File without changes
File without changes