@moduix/react 2.5.1 → 2.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 (204) hide show
  1. package/README.md +24 -3
  2. package/THIRD_PARTY_NOTICES.md +49 -0
  3. package/dist/components/accordion/Accordion.js +20 -21
  4. package/dist/components/alert/Alert.js +18 -19
  5. package/dist/components/alert/Alert_module.css +3 -16
  6. package/dist/components/angle-slider/AngleSlider.d.ts +5 -11
  7. package/dist/components/angle-slider/AngleSlider.js +29 -71
  8. package/dist/components/aspect-ratio/AspectRatio.js +1 -2
  9. package/dist/components/aspect-ratio/AspectRatio_module.css +0 -13
  10. package/dist/components/avatar/Avatar.d.ts +3 -6
  11. package/dist/components/avatar/Avatar.js +14 -57
  12. package/dist/components/avatar/Avatar.module.js +1 -2
  13. package/dist/components/avatar/Avatar_module.css +0 -6
  14. package/dist/components/badge/Badge.d.ts +2 -2
  15. package/dist/components/badge/Badge.js +5 -10
  16. package/dist/components/badge/Badge_module.css +7 -14
  17. package/dist/components/bleed/Bleed.js +1 -2
  18. package/dist/components/breadcrumbs/Breadcrumbs.d.ts +1 -1
  19. package/dist/components/breadcrumbs/Breadcrumbs.js +16 -32
  20. package/dist/components/breadcrumbs/Breadcrumbs_module.css +12 -14
  21. package/dist/components/button/Button.d.ts +4 -4
  22. package/dist/components/button/Button.js +1 -2
  23. package/dist/components/button/Button_module.css +2 -8
  24. package/dist/components/card/Card.d.ts +15 -15
  25. package/dist/components/card/Card.js +30 -31
  26. package/dist/components/card/Card_module.css +2 -18
  27. package/dist/components/carousel/Carousel.d.ts +1 -1
  28. package/dist/components/carousel/Carousel.js +34 -35
  29. package/dist/components/carousel/Carousel_module.css +7 -0
  30. package/dist/components/chart/Chart.d.ts +9 -8
  31. package/dist/components/chart/Chart.js +21 -22
  32. package/dist/components/chart/Chart_module.css +0 -2
  33. package/dist/components/checkbox/Checkbox.d.ts +3 -2
  34. package/dist/components/checkbox/Checkbox.js +20 -43
  35. package/dist/components/clipboard/Clipboard.js +27 -27
  36. package/dist/components/close-button/CloseButton.js +1 -2
  37. package/dist/components/close-button/CloseButton_module.css +1 -10
  38. package/dist/components/collapsible/Collapsible.js +17 -20
  39. package/dist/components/collapsible/Collapsible_module.css +2 -4
  40. package/dist/components/color-picker/ColorPicker.d.ts +4 -3
  41. package/dist/components/color-picker/ColorPicker.js +79 -92
  42. package/dist/components/color-picker/ColorPicker_module.css +0 -1
  43. package/dist/components/combobox/Combobox.d.ts +5 -5
  44. package/dist/components/combobox/Combobox.js +51 -60
  45. package/dist/components/combobox/Combobox_module.css +0 -1
  46. package/dist/components/command-palette/CommandPalette.d.ts +7 -18
  47. package/dist/components/command-palette/CommandPalette.js +99 -126
  48. package/dist/components/command-palette/CommandPalette_module.css +11 -18
  49. package/dist/components/container/Container.js +1 -2
  50. package/dist/components/container/Container_module.css +1 -1
  51. package/dist/components/date-input/DateInput.d.ts +7 -9
  52. package/dist/components/date-input/DateInput.js +24 -54
  53. package/dist/components/date-input/DateInput_module.css +0 -1
  54. package/dist/components/date-picker/DatePicker.d.ts +1 -1
  55. package/dist/components/date-picker/DatePicker.js +84 -93
  56. package/dist/components/date-picker/DatePicker.module.js +1 -1
  57. package/dist/components/date-picker/DatePicker_module.css +5 -2
  58. package/dist/components/dialog/Dialog.d.ts +1 -1
  59. package/dist/components/dialog/Dialog.js +31 -32
  60. package/dist/components/drawer/Drawer.d.ts +6 -3
  61. package/dist/components/drawer/Drawer.js +63 -54
  62. package/dist/components/editable/Editable.d.ts +1 -1
  63. package/dist/components/editable/Editable.js +27 -28
  64. package/dist/components/empty/Empty.js +18 -19
  65. package/dist/components/field/Field.js +29 -30
  66. package/dist/components/fieldset/Fieldset.js +15 -16
  67. package/dist/components/file-upload/FileUpload.d.ts +3 -2
  68. package/dist/components/file-upload/FileUpload.js +52 -79
  69. package/dist/components/file-upload/FileUpload_module.css +4 -13
  70. package/dist/components/floating-panel/FloatingPanel.d.ts +3 -3
  71. package/dist/components/floating-panel/FloatingPanel.js +36 -37
  72. package/dist/components/floating-panel/FloatingPanel_module.css +4 -17
  73. package/dist/components/floating-panel/index.d.ts +1 -0
  74. package/dist/components/heading/Heading.js +1 -2
  75. package/dist/components/highlight/Highlight.js +1 -2
  76. package/dist/components/hover-card/HoverCard.d.ts +3 -2
  77. package/dist/components/hover-card/HoverCard.js +24 -15
  78. package/dist/components/hover-card/HoverCard.module.js +1 -0
  79. package/dist/components/hover-card/HoverCard_module.css +18 -3
  80. package/dist/components/hover-card/index.d.ts +1 -0
  81. package/dist/components/image/Image.js +1 -2
  82. package/dist/components/image-cropper/ImageCropper.d.ts +1 -1
  83. package/dist/components/image-cropper/ImageCropper.js +21 -22
  84. package/dist/components/input/Input.d.ts +4 -4
  85. package/dist/components/input/Input.js +1 -2
  86. package/dist/components/input-group/InputGroup.d.ts +5 -5
  87. package/dist/components/input-group/InputGroup.js +5 -6
  88. package/dist/components/json-tree-view/JsonTreeView.js +3 -4
  89. package/dist/components/json-tree-view/JsonTreeView_module.css +26 -10
  90. package/dist/components/kbd/Kbd.js +6 -7
  91. package/dist/components/lightbox/Lightbox.d.ts +1 -1
  92. package/dist/components/lightbox/Lightbox.js +38 -39
  93. package/dist/components/lightbox/Lightbox_module.css +0 -2
  94. package/dist/components/list/List.js +2 -3
  95. package/dist/components/listbox/Listbox.d.ts +5 -5
  96. package/dist/components/listbox/Listbox.js +50 -56
  97. package/dist/components/listbox/Listbox.module.js +2 -2
  98. package/dist/components/listbox/Listbox_module.css +3 -13
  99. package/dist/components/marquee/Marquee.js +18 -19
  100. package/dist/components/menu/Menu.d.ts +2 -1
  101. package/dist/components/menu/Menu.js +72 -79
  102. package/dist/components/menu/Menu.module.js +1 -1
  103. package/dist/components/menu/Menu_module.css +8 -8
  104. package/dist/components/native-select/NativeSelect.js +2 -3
  105. package/dist/components/native-select/NativeSelect_module.css +0 -1
  106. package/dist/components/navigation-menu/NavigationMenu.js +39 -58
  107. package/dist/components/navigation-menu/NavigationMenu.module.js +2 -3
  108. package/dist/components/navigation-menu/NavigationMenu_module.css +15 -32
  109. package/dist/components/number-input/NumberInput.js +25 -26
  110. package/dist/components/pagination/Pagination.js +28 -31
  111. package/dist/components/pagination/Pagination_module.css +1 -5
  112. package/dist/components/password-input/PasswordInput.js +20 -21
  113. package/dist/components/pin-input/PinInput.d.ts +3 -2
  114. package/dist/components/pin-input/PinInput.js +20 -61
  115. package/dist/components/popover/Popover.d.ts +5 -3
  116. package/dist/components/popover/Popover.js +41 -42
  117. package/dist/components/progress-circular/ProgressCircular.js +24 -25
  118. package/dist/components/progress-circular/ProgressCircular.module.js +1 -3
  119. package/dist/components/progress-circular/ProgressCircular_module.css +0 -10
  120. package/dist/components/progress-linear/ProgressLinear.js +21 -22
  121. package/dist/components/progress-linear/ProgressLinear.module.js +1 -5
  122. package/dist/components/progress-linear/ProgressLinear_module.css +0 -20
  123. package/dist/components/qr-code/QrCode.js +18 -19
  124. package/dist/components/radio-group/RadioGroup.d.ts +1 -0
  125. package/dist/components/radio-group/RadioGroup.js +25 -39
  126. package/dist/components/radio-group/RadioGroup_module.css +0 -1
  127. package/dist/components/rating-group/RatingGroup.d.ts +1 -0
  128. package/dist/components/rating-group/RatingGroup.js +19 -36
  129. package/dist/components/rating-group/RatingGroup_module.css +1 -1
  130. package/dist/components/scroll-area/ScrollArea.js +7 -8
  131. package/dist/components/segment-group/SegmentGroup.d.ts +1 -0
  132. package/dist/components/segment-group/SegmentGroup.js +28 -42
  133. package/dist/components/segment-group/SegmentGroup_module.css +4 -0
  134. package/dist/components/select/Select.d.ts +4 -7
  135. package/dist/components/select/Select.js +69 -119
  136. package/dist/components/select/Select.module.js +1 -1
  137. package/dist/components/select/Select_module.css +4 -31
  138. package/dist/components/separator/Separator.d.ts +6 -6
  139. package/dist/components/separator/Separator.js +1 -2
  140. package/dist/components/sidebar/Sidebar.d.ts +16 -16
  141. package/dist/components/sidebar/Sidebar.js +81 -86
  142. package/dist/components/sidebar/Sidebar.module.js +2 -3
  143. package/dist/components/sidebar/Sidebar_module.css +62 -158
  144. package/dist/components/signature-pad/SignaturePad.d.ts +5 -8
  145. package/dist/components/signature-pad/SignaturePad.js +28 -57
  146. package/dist/components/signature-pad/SignaturePad_module.css +0 -1
  147. package/dist/components/simple-grid/SimpleGrid.js +13 -8
  148. package/dist/components/skeleton/Skeleton.d.ts +2 -2
  149. package/dist/components/skeleton/Skeleton.js +1 -2
  150. package/dist/components/slider/Slider.d.ts +2 -2
  151. package/dist/components/slider/Slider.js +38 -52
  152. package/dist/components/spinner/Spinner.d.ts +2 -2
  153. package/dist/components/spinner/Spinner.js +1 -2
  154. package/dist/components/split-button/SplitButton.d.ts +7 -7
  155. package/dist/components/split-button/SplitButton.js +25 -17
  156. package/dist/components/splitter/Splitter.js +14 -15
  157. package/dist/components/splitter/Splitter_module.css +2 -10
  158. package/dist/components/stack/Stack.d.ts +6 -6
  159. package/dist/components/stack/Stack.js +4 -5
  160. package/dist/components/stack/Stack_module.css +1 -1
  161. package/dist/components/steps/Steps.js +35 -36
  162. package/dist/components/steps/Steps_module.css +2 -3
  163. package/dist/components/swap/Swap.js +9 -10
  164. package/dist/components/switch/Switch.d.ts +3 -2
  165. package/dist/components/switch/Switch.js +17 -40
  166. package/dist/components/switch/Switch_module.css +0 -1
  167. package/dist/components/table/Table.d.ts +5 -5
  168. package/dist/components/table/Table.js +35 -36
  169. package/dist/components/tabs/Tabs.js +18 -19
  170. package/dist/components/tabs/Tabs_module.css +5 -10
  171. package/dist/components/tag/Tag.js +5 -6
  172. package/dist/components/tag/Tag_module.css +2 -4
  173. package/dist/components/tags-input/TagsInput.d.ts +3 -3
  174. package/dist/components/tags-input/TagsInput.js +37 -91
  175. package/dist/components/tags-input/TagsInput_module.css +0 -1
  176. package/dist/components/text/Text.js +1 -2
  177. package/dist/components/textarea/Textarea.js +1 -2
  178. package/dist/components/timer/Timer.js +21 -22
  179. package/dist/components/toast/Toast.d.ts +1 -1
  180. package/dist/components/toast/Toast.js +15 -16
  181. package/dist/components/toast/Toast_module.css +1 -2
  182. package/dist/components/toc/Toc.js +29 -30
  183. package/dist/components/toc/Toc_module.css +2 -2
  184. package/dist/components/toggle/Toggle.js +6 -7
  185. package/dist/components/toggle-group/ToggleGroup.d.ts +1 -1
  186. package/dist/components/toggle-group/ToggleGroup.js +3 -4
  187. package/dist/components/tooltip/Tooltip.d.ts +1 -1
  188. package/dist/components/tooltip/Tooltip.js +17 -18
  189. package/dist/components/tooltip/Tooltip_module.css +1 -1
  190. package/dist/components/tour/Tour.d.ts +1 -1
  191. package/dist/components/tour/Tour.js +39 -40
  192. package/dist/components/tree-view/TreeView.d.ts +4 -4
  193. package/dist/components/tree-view/TreeView.js +47 -48
  194. package/dist/components/tree-view/TreeView_module.css +39 -12
  195. package/dist/components/typeset/Typeset.js +2 -3
  196. package/dist/components/typeset/Typeset_module.css +300 -159
  197. package/dist/internal/icons/ui/Icons.d.ts +9 -30
  198. package/dist/internal/icons/ui/Icons.js +67 -807
  199. package/dist/internal/icons/ui/index.d.ts +1 -1
  200. package/dist/styles/animations.css +310 -0
  201. package/dist/styles/style.css +168 -2
  202. package/package.json +23 -23
  203. package/dist/internal/normalizeClassName.d.ts +0 -1
  204. package/dist/internal/normalizeClassName.js +0 -2
@@ -1,60 +1,55 @@
1
1
  "use client";
2
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { jsx } from "react/jsx-runtime";
3
3
  import { DateInput, useDateInput, useDateInputContext } from "@ark-ui/react/date-input";
4
4
  import { clsx } from "clsx";
5
- import { Children, cloneElement, forwardRef } from "react";
6
- import { normalizeClassName } from "../../internal/normalizeClassName.js";
5
+ import { forwardRef } from "react";
7
6
  import DateInput_module from "./DateInput.module.js";
8
- const DateInput_DateInputRoot = /*#__PURE__*/ forwardRef(function({ asChild, children, className, names, ...props }, ref) {
7
+ const DateInput_DateInputRoot = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
9
8
  return /*#__PURE__*/ jsx(DateInput.Root, {
10
9
  ref: ref,
11
- "data-slot": "date-input-root",
12
- className: clsx(DateInput_module.root, normalizeClassName(className)),
13
- asChild: asChild,
10
+ className: clsx(DateInput_module.root, className),
14
11
  ...props,
15
- children: withHiddenInputs(children, asChild, names)
12
+ "data-slot": "date-input-root"
16
13
  });
17
14
  });
18
- const DateInput_DateInputRootProvider = /*#__PURE__*/ forwardRef(function({ asChild, children, className, names, ...props }, ref) {
15
+ const DateInput_DateInputRootProvider = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
19
16
  return /*#__PURE__*/ jsx(DateInput.RootProvider, {
20
17
  ref: ref,
21
- "data-slot": "date-input-root-provider",
22
- className: clsx(DateInput_module.root, normalizeClassName(className)),
23
- asChild: asChild,
18
+ className: clsx(DateInput_module.root, className),
24
19
  ...props,
25
- children: withHiddenInputs(children, asChild, names)
20
+ "data-slot": "date-input-root-provider"
26
21
  });
27
22
  });
28
23
  const DateInput_DateInputLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
29
24
  return /*#__PURE__*/ jsx(DateInput.Label, {
30
25
  ref: ref,
31
- "data-slot": "date-input-label",
32
- className: clsx(DateInput_module.label, normalizeClassName(className)),
33
- ...props
26
+ className: clsx(DateInput_module.label, className),
27
+ ...props,
28
+ "data-slot": "date-input-label"
34
29
  });
35
30
  });
36
31
  const DateInput_DateInputControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
37
32
  return /*#__PURE__*/ jsx(DateInput.Control, {
38
33
  ref: ref,
39
- "data-slot": "date-input-control",
40
- className: clsx(DateInput_module.control, normalizeClassName(className)),
41
- ...props
34
+ className: clsx(DateInput_module.control, className),
35
+ ...props,
36
+ "data-slot": "date-input-control"
42
37
  });
43
38
  });
44
39
  const DateInput_DateInputSegmentGroup = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
45
40
  return /*#__PURE__*/ jsx(DateInput.SegmentGroup, {
46
41
  ref: ref,
47
- "data-slot": "date-input-segment-group",
48
- className: clsx(DateInput_module.segmentGroup, normalizeClassName(className)),
49
- ...props
42
+ className: clsx(DateInput_module.segmentGroup, className),
43
+ ...props,
44
+ "data-slot": "date-input-segment-group"
50
45
  });
51
46
  });
52
47
  const DateInput_DateInputSegment = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
53
48
  return /*#__PURE__*/ jsx(DateInput.Segment, {
54
49
  ref: ref,
55
- "data-slot": "date-input-segment",
56
- className: clsx(DateInput_module.segment, normalizeClassName(className)),
57
- ...props
50
+ className: clsx(DateInput_module.segment, className),
51
+ ...props,
52
+ "data-slot": "date-input-segment"
58
53
  });
59
54
  });
60
55
  const DateInput_DateInputSegments = /*#__PURE__*/ forwardRef(function(props, ref) {
@@ -68,44 +63,19 @@ const DateInput_DateInputSegments = /*#__PURE__*/ forwardRef(function(props, ref
68
63
  })
69
64
  });
70
65
  });
71
- function withHiddenInputs(children, asChild, names) {
72
- const hiddenInputs = /*#__PURE__*/ jsx(DateInputFormInputs, {
73
- names: names
74
- });
75
- if (!asChild) return /*#__PURE__*/ jsxs(Fragment, {
76
- children: [
77
- children,
78
- hiddenInputs
79
- ]
80
- });
81
- const child = Children.only(children);
82
- return /*#__PURE__*/ cloneElement(child, {}, child.props.children, hiddenInputs);
83
- }
84
- function DateInputFormInputs({ names }) {
85
- const dateInput = useDateInputContext();
86
- const inputCount = Math.max(dateInput.displayValues.length, 1);
87
- return /*#__PURE__*/ jsx(Fragment, {
88
- children: Array.from({
89
- length: inputCount
90
- }, (_, index)=>/*#__PURE__*/ jsx(DateInput.HiddenInput, {
91
- index: index,
92
- name: names?.[index],
93
- "data-slot": "date-input-hidden-input"
94
- }, index))
95
- });
96
- }
97
66
  function DateInputSeparator({ className, 'aria-hidden': ariaHidden = true, role = 'presentation', ...props }) {
98
67
  return /*#__PURE__*/ jsx("span", {
99
- "data-slot": "date-input-separator",
100
68
  "aria-hidden": ariaHidden,
101
69
  role: role,
102
- className: clsx(DateInput_module.separator, normalizeClassName(className)),
103
- ...props
70
+ className: clsx(DateInput_module.separator, className),
71
+ ...props,
72
+ "data-slot": "date-input-separator"
104
73
  });
105
74
  }
106
75
  const DateInput_DateInput = Object.assign(DateInput_DateInputRoot, {
107
76
  Root: DateInput_DateInputRoot,
108
77
  RootProvider: DateInput_DateInputRootProvider,
78
+ HiddenInput: DateInput.HiddenInput,
109
79
  Label: DateInput_DateInputLabel,
110
80
  Control: DateInput_DateInputControl,
111
81
  SegmentGroup: DateInput_DateInputSegmentGroup,
@@ -94,7 +94,6 @@
94
94
 
95
95
  .segment-AyTFWd[data-type="literal"] {
96
96
  min-width: auto;
97
- box-shadow: none;
98
97
  color: var(--moduix-date-input-separator-color, var(--moduix-color-muted-foreground));
99
98
  pointer-events: none;
100
99
  background: none;
@@ -1,7 +1,7 @@
1
1
  import { useDatePicker, useDatePickerContext, type UseDatePickerReturn } from '@ark-ui/react/date-picker';
2
2
  import { DatePicker as DatePickerPrimitive } from '@ark-ui/react/date-picker';
3
3
  import type { ComponentProps } from 'react';
4
- import { type OverlayPortalProps } from '../../internal/overlayPortal';
4
+ import { type OverlayPortalProps } from '../../internal/overlayPortal.js';
5
5
  type DatePickerRootProps = ComponentProps<typeof DatePickerPrimitive.Root> & OverlayPortalProps;
6
6
  type DatePickerRootProviderProps = ComponentProps<typeof DatePickerPrimitive.RootProvider> & OverlayPortalProps;
7
7
  type DatePickerFieldProps = ComponentProps<typeof DatePickerPrimitive.Control> & {
@@ -6,7 +6,6 @@ import { useFieldsetContext } from "@ark-ui/react/fieldset";
6
6
  import { clsx } from "clsx";
7
7
  import { forwardRef } from "react";
8
8
  import { CalendarIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "../../internal/icons/ui/index.js";
9
- import { normalizeClassName } from "../../internal/normalizeClassName.js";
10
9
  import { OverlayPortal, OverlayPortalProvider } from "../../internal/overlayPortal.js";
11
10
  import { CloseButton } from "../close-button/index.js";
12
11
  import DatePicker_module from "./DatePicker.module.js";
@@ -18,15 +17,15 @@ const DatePicker_DatePickerRoot = /*#__PURE__*/ forwardRef(function({ className,
18
17
  portalRef: portalRef,
19
18
  children: /*#__PURE__*/ jsx(DatePicker.Root, {
20
19
  ref: ref,
21
- "data-slot": "date-picker-root",
22
- className: clsx(DatePicker_module.root, normalizeClassName(className)),
20
+ className: clsx(DatePicker_module.root, className),
23
21
  disabled: disabled ?? field?.disabled ?? fieldset?.disabled,
24
22
  invalid: invalid ?? field?.invalid ?? fieldset?.invalid,
25
23
  lazyMount: lazyMount,
26
24
  readOnly: readOnly ?? field?.readOnly,
27
25
  required: required ?? field?.required,
28
26
  unmountOnExit: unmountOnExit,
29
- ...props
27
+ ...props,
28
+ "data-slot": "date-picker-root"
30
29
  })
31
30
  });
32
31
  });
@@ -36,28 +35,28 @@ const DatePicker_DatePickerRootProvider = /*#__PURE__*/ forwardRef(function({ cl
36
35
  portalRef: portalRef,
37
36
  children: /*#__PURE__*/ jsx(DatePicker.RootProvider, {
38
37
  ref: ref,
39
- "data-slot": "date-picker-root-provider",
40
- className: clsx(DatePicker_module.root, normalizeClassName(className)),
38
+ className: clsx(DatePicker_module.root, className),
41
39
  lazyMount: lazyMount,
42
40
  unmountOnExit: unmountOnExit,
43
- ...props
41
+ ...props,
42
+ "data-slot": "date-picker-root-provider"
44
43
  })
45
44
  });
46
45
  });
47
46
  const DatePicker_DatePickerLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
48
47
  return /*#__PURE__*/ jsx(DatePicker.Label, {
49
48
  ref: ref,
50
- "data-slot": "date-picker-label",
51
- className: clsx(DatePicker_module.label, normalizeClassName(className)),
52
- ...props
49
+ className: clsx(DatePicker_module.label, className),
50
+ ...props,
51
+ "data-slot": "date-picker-label"
53
52
  });
54
53
  });
55
54
  const DatePicker_DatePickerControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
56
55
  return /*#__PURE__*/ jsx(DatePicker.Control, {
57
56
  ref: ref,
58
- "data-slot": "date-picker-control",
59
- className: clsx(DatePicker_module.control, normalizeClassName(className)),
60
- ...props
57
+ className: clsx(DatePicker_module.control, className),
58
+ ...props,
59
+ "data-slot": "date-picker-control"
61
60
  });
62
61
  });
63
62
  const DatePicker_DatePickerField = /*#__PURE__*/ forwardRef(function({ clearLabel, clearTriggerProps, inputProps, placeholder, triggerLabel, triggerProps, ...props }, ref) {
@@ -124,44 +123,36 @@ const DatePicker_DatePickerRangeField = /*#__PURE__*/ forwardRef(function({ clea
124
123
  const DatePicker_DatePickerInput = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
125
124
  return /*#__PURE__*/ jsx(DatePicker.Input, {
126
125
  ref: ref,
127
- "data-slot": "date-picker-input",
128
- className: clsx(DatePicker_module.input, normalizeClassName(className)),
129
- ...props
126
+ className: clsx(DatePicker_module.input, className),
127
+ ...props,
128
+ "data-slot": "date-picker-input"
130
129
  });
131
130
  });
132
131
  const DatePicker_DatePickerTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, children, ...props }, ref) {
133
132
  return /*#__PURE__*/ jsx(DatePicker.Trigger, {
134
133
  ref: ref,
135
- "data-slot": "date-picker-trigger",
136
134
  asChild: asChild,
137
- className: clsx(!asChild && DatePicker_module.trigger, normalizeClassName(className)),
135
+ className: clsx(!asChild && DatePicker_module.trigger, className),
138
136
  ...props,
137
+ "data-slot": "date-picker-trigger",
139
138
  children: children ?? /*#__PURE__*/ jsx(CalendarIcon, {})
140
139
  });
141
140
  });
142
141
  const DatePicker_DatePickerClearTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }, ref) {
143
- const triggerClassName = clsx(DatePicker_module.clearTrigger, normalizeClassName(className));
144
- if (asChild) return /*#__PURE__*/ jsx(DatePicker.ClearTrigger, {
142
+ const triggerClassName = clsx(DatePicker_module.clearTrigger, className);
143
+ return /*#__PURE__*/ jsx(DatePicker.ClearTrigger, {
145
144
  ref: ref,
146
145
  asChild: true,
147
- "data-slot": "date-picker-clear-trigger",
148
146
  className: triggerClassName,
149
- ...void 0 === ariaLabel ? {} : {
147
+ ...asChild && void 0 !== ariaLabel ? {
150
148
  'aria-label': ariaLabel
151
- },
152
- ...void 0 === ariaLabelledBy ? {} : {
149
+ } : {},
150
+ ...asChild && void 0 !== ariaLabelledBy ? {
153
151
  'aria-labelledby': ariaLabelledBy
154
- },
152
+ } : {},
155
153
  ...props,
156
- children: children
157
- });
158
- return /*#__PURE__*/ jsx(DatePicker.ClearTrigger, {
159
- ref: ref,
160
- asChild: true,
161
154
  "data-slot": "date-picker-clear-trigger",
162
- className: triggerClassName,
163
- ...props,
164
- children: /*#__PURE__*/ jsx(CloseButton.Root, {
155
+ children: asChild ? children : /*#__PURE__*/ jsx(CloseButton.Root, {
165
156
  ...void 0 === ariaLabel ? {} : {
166
157
  'aria-label': ariaLabel
167
158
  },
@@ -176,71 +167,71 @@ const DatePicker_DatePickerPositioner = /*#__PURE__*/ forwardRef(function({ clas
176
167
  return /*#__PURE__*/ jsx(OverlayPortal, {
177
168
  children: /*#__PURE__*/ jsx(DatePicker.Positioner, {
178
169
  ref: ref,
179
- "data-slot": "date-picker-positioner",
180
- className: clsx(DatePicker_module.positioner, normalizeClassName(className)),
181
- ...props
170
+ className: clsx(DatePicker_module.positioner, className),
171
+ ...props,
172
+ "data-slot": "date-picker-positioner"
182
173
  })
183
174
  });
184
175
  });
185
176
  const DatePicker_DatePickerContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
186
177
  return /*#__PURE__*/ jsx(DatePicker.Content, {
187
178
  ref: ref,
188
- "data-slot": "date-picker-content",
189
- className: clsx(DatePicker_module.content, normalizeClassName(className)),
190
- ...props
179
+ className: clsx(DatePicker_module.content, className),
180
+ ...props,
181
+ "data-slot": "date-picker-content"
191
182
  });
192
183
  });
193
184
  const DatePicker_DatePickerView = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
194
185
  return /*#__PURE__*/ jsx(DatePicker.View, {
195
186
  ref: ref,
196
- "data-slot": "date-picker-view",
197
- className: clsx(DatePicker_module.view, normalizeClassName(className)),
198
- ...props
187
+ className: clsx(DatePicker_module.view, className),
188
+ ...props,
189
+ "data-slot": "date-picker-view"
199
190
  });
200
191
  });
201
192
  const DatePicker_DatePickerViewControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
202
193
  return /*#__PURE__*/ jsx(DatePicker.ViewControl, {
203
194
  ref: ref,
204
- "data-slot": "date-picker-view-control",
205
- className: clsx(DatePicker_module.viewControl, normalizeClassName(className)),
206
- ...props
195
+ className: clsx(DatePicker_module.viewControl, className),
196
+ ...props,
197
+ "data-slot": "date-picker-view-control"
207
198
  });
208
199
  });
209
200
  const DatePicker_DatePickerPrevTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, children, ...props }, ref) {
210
201
  return /*#__PURE__*/ jsx(DatePicker.PrevTrigger, {
211
202
  ref: ref,
212
- "data-slot": "date-picker-prev-trigger",
213
203
  asChild: asChild,
214
- className: clsx(!asChild && DatePicker_module.navTrigger, normalizeClassName(className)),
204
+ className: clsx(!asChild && DatePicker_module.navTrigger, className),
215
205
  ...props,
206
+ "data-slot": "date-picker-prev-trigger",
216
207
  children: children ?? /*#__PURE__*/ jsx(ChevronLeftIcon, {})
217
208
  });
218
209
  });
219
210
  const DatePicker_DatePickerNextTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, children, ...props }, ref) {
220
211
  return /*#__PURE__*/ jsx(DatePicker.NextTrigger, {
221
212
  ref: ref,
222
- "data-slot": "date-picker-next-trigger",
223
213
  asChild: asChild,
224
- className: clsx(!asChild && DatePicker_module.navTrigger, normalizeClassName(className)),
214
+ className: clsx(!asChild && DatePicker_module.navTrigger, className),
225
215
  ...props,
216
+ "data-slot": "date-picker-next-trigger",
226
217
  children: children ?? /*#__PURE__*/ jsx(ChevronRightIcon, {})
227
218
  });
228
219
  });
229
220
  const DatePicker_DatePickerRangeText = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
230
221
  return /*#__PURE__*/ jsx(DatePicker.RangeText, {
231
222
  ref: ref,
232
- "data-slot": "date-picker-range-text",
233
- className: clsx(DatePicker_module.rangeText, normalizeClassName(className)),
234
- ...props
223
+ className: clsx(DatePicker_module.rangeText, className),
224
+ ...props,
225
+ "data-slot": "date-picker-range-text"
235
226
  });
236
227
  });
237
228
  const DatePicker_DatePickerViewTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, children, ...props }, ref) {
238
229
  return /*#__PURE__*/ jsx(DatePicker.ViewTrigger, {
239
230
  ref: ref,
240
- "data-slot": "date-picker-view-trigger",
241
231
  asChild: asChild,
242
- className: clsx(!asChild && DatePicker_module.viewTrigger, normalizeClassName(className)),
232
+ className: clsx(!asChild && DatePicker_module.viewTrigger, className),
243
233
  ...props,
234
+ "data-slot": "date-picker-view-trigger",
244
235
  children: children ?? /*#__PURE__*/ jsxs(Fragment, {
245
236
  children: [
246
237
  /*#__PURE__*/ jsx(DatePicker_DatePickerRangeText, {}),
@@ -252,73 +243,73 @@ const DatePicker_DatePickerViewTrigger = /*#__PURE__*/ forwardRef(function({ asC
252
243
  const DatePicker_DatePickerTable = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
253
244
  return /*#__PURE__*/ jsx(DatePicker.Table, {
254
245
  ref: ref,
255
- "data-slot": "date-picker-table",
256
- className: clsx(DatePicker_module.table, normalizeClassName(className)),
257
- ...props
246
+ className: clsx(DatePicker_module.table, className),
247
+ ...props,
248
+ "data-slot": "date-picker-table"
258
249
  });
259
250
  });
260
251
  const DatePicker_DatePickerTableHead = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
261
252
  return /*#__PURE__*/ jsx(DatePicker.TableHead, {
262
253
  ref: ref,
263
- "data-slot": "date-picker-table-head",
264
- className: normalizeClassName(className),
265
- ...props
254
+ className: className,
255
+ ...props,
256
+ "data-slot": "date-picker-table-head"
266
257
  });
267
258
  });
268
259
  const DatePicker_DatePickerTableBody = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
269
260
  return /*#__PURE__*/ jsx(DatePicker.TableBody, {
270
261
  ref: ref,
271
- "data-slot": "date-picker-table-body",
272
- className: normalizeClassName(className),
273
- ...props
262
+ className: className,
263
+ ...props,
264
+ "data-slot": "date-picker-table-body"
274
265
  });
275
266
  });
276
267
  const DatePicker_DatePickerTableRow = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
277
268
  return /*#__PURE__*/ jsx(DatePicker.TableRow, {
278
269
  ref: ref,
279
- "data-slot": "date-picker-table-row",
280
- className: normalizeClassName(className),
281
- ...props
270
+ className: className,
271
+ ...props,
272
+ "data-slot": "date-picker-table-row"
282
273
  });
283
274
  });
284
275
  const DatePicker_DatePickerTableHeader = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
285
276
  return /*#__PURE__*/ jsx(DatePicker.TableHeader, {
286
277
  ref: ref,
287
- "data-slot": "date-picker-table-header",
288
- className: clsx(DatePicker_module.tableHeader, normalizeClassName(className)),
289
- ...props
278
+ className: clsx(DatePicker_module.tableHeader, className),
279
+ ...props,
280
+ "data-slot": "date-picker-table-header"
290
281
  });
291
282
  });
292
283
  const DatePicker_DatePickerWeekNumberHeaderCell = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
293
284
  return /*#__PURE__*/ jsx(DatePicker.WeekNumberHeaderCell, {
294
285
  ref: ref,
295
- "data-slot": "date-picker-week-number-header-cell",
296
- className: clsx(DatePicker_module.tableHeader, DatePicker_module.weekNumberCell, normalizeClassName(className)),
297
- ...props
286
+ className: clsx(DatePicker_module.tableHeader, DatePicker_module.weekNumberCell, className),
287
+ ...props,
288
+ "data-slot": "date-picker-week-number-header-cell"
298
289
  });
299
290
  });
300
291
  const DatePicker_DatePickerWeekNumberCell = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
301
292
  return /*#__PURE__*/ jsx(DatePicker.WeekNumberCell, {
302
293
  ref: ref,
303
- "data-slot": "date-picker-week-number-cell",
304
- className: clsx(DatePicker_module.weekNumberCell, normalizeClassName(className)),
305
- ...props
294
+ className: clsx(DatePicker_module.weekNumberCell, className),
295
+ ...props,
296
+ "data-slot": "date-picker-week-number-cell"
306
297
  });
307
298
  });
308
299
  const DatePicker_DatePickerTableCell = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
309
300
  return /*#__PURE__*/ jsx(DatePicker.TableCell, {
310
301
  ref: ref,
311
- "data-slot": "date-picker-table-cell",
312
- className: clsx(DatePicker_module.tableCell, normalizeClassName(className)),
313
- ...props
302
+ className: clsx(DatePicker_module.tableCell, className),
303
+ ...props,
304
+ "data-slot": "date-picker-table-cell"
314
305
  });
315
306
  });
316
307
  const DatePicker_DatePickerTableCellTrigger = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
317
308
  return /*#__PURE__*/ jsx(DatePicker.TableCellTrigger, {
318
309
  ref: ref,
319
- "data-slot": "date-picker-table-cell-trigger",
320
- className: clsx(DatePicker_module.tableCellTrigger, normalizeClassName(className)),
321
- ...props
310
+ className: clsx(DatePicker_module.tableCellTrigger, className),
311
+ ...props,
312
+ "data-slot": "date-picker-table-cell-trigger"
322
313
  });
323
314
  });
324
315
  const DatePicker_DatePickerDayTable = /*#__PURE__*/ forwardRef(function({ offset, showHeader = true, showWeekNumbers = false, ...props }, ref) {
@@ -373,34 +364,34 @@ const DatePicker_DatePickerDayTable = /*#__PURE__*/ forwardRef(function({ offset
373
364
  const DatePicker_DatePickerMonthSelect = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
374
365
  return /*#__PURE__*/ jsx(DatePicker.MonthSelect, {
375
366
  ref: ref,
376
- "data-slot": "date-picker-month-select",
377
- className: clsx(DatePicker_module.select, normalizeClassName(className)),
378
- ...props
367
+ className: clsx(DatePicker_module.select, className),
368
+ ...props,
369
+ "data-slot": "date-picker-month-select"
379
370
  });
380
371
  });
381
372
  const DatePicker_DatePickerYearSelect = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
382
373
  return /*#__PURE__*/ jsx(DatePicker.YearSelect, {
383
374
  ref: ref,
384
- "data-slot": "date-picker-year-select",
385
- className: clsx(DatePicker_module.select, normalizeClassName(className)),
386
- ...props
375
+ className: clsx(DatePicker_module.select, className),
376
+ ...props,
377
+ "data-slot": "date-picker-year-select"
387
378
  });
388
379
  });
389
380
  const DatePicker_DatePickerPresetTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, ...props }, ref) {
390
381
  return /*#__PURE__*/ jsx(DatePicker.PresetTrigger, {
391
382
  ref: ref,
392
- "data-slot": "date-picker-preset-trigger",
393
383
  asChild: asChild,
394
- className: clsx(!asChild && DatePicker_module.presetTrigger, normalizeClassName(className)),
395
- ...props
384
+ className: clsx(!asChild && DatePicker_module.presetTrigger, className),
385
+ ...props,
386
+ "data-slot": "date-picker-preset-trigger"
396
387
  });
397
388
  });
398
389
  const DatePicker_DatePickerValueText = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
399
390
  return /*#__PURE__*/ jsx(DatePicker.ValueText, {
400
391
  ref: ref,
401
- "data-slot": "date-picker-value-text",
402
- className: clsx(DatePicker_module.valueText, normalizeClassName(className)),
403
- ...props
392
+ className: clsx(DatePicker_module.valueText, className),
393
+ ...props,
394
+ "data-slot": "date-picker-value-text"
404
395
  });
405
396
  });
406
397
  const DatePicker_DatePicker = Object.assign(DatePicker_DatePickerRoot, {
@@ -1,9 +1,9 @@
1
1
  import "./DatePicker_module.css";
2
2
  const DatePicker_module = {
3
3
  root: "root-sgMq4I",
4
+ input: "input-c9DrcO",
4
5
  label: "label-o8_6xd",
5
6
  control: "control-pfUmnK",
6
- input: "input-c9DrcO",
7
7
  trigger: "trigger-sqKYfh",
8
8
  navTrigger: "navTrigger-XCWd0K",
9
9
  viewTrigger: "viewTrigger-ZeOJgr",
@@ -38,6 +38,10 @@
38
38
  display: inline-flex;
39
39
  }
40
40
 
41
+ .root-sgMq4I:has(.input-c9DrcO[data-index="1"]) {
42
+ width: var(--moduix-date-picker-width, 24rem);
43
+ }
44
+
41
45
  .root-sgMq4I:is([data-disabled], [data-readonly]) {
42
46
  opacity: var(--moduix-date-picker-disabled-opacity, var(--moduix-opacity-disabled));
43
47
  }
@@ -191,7 +195,6 @@
191
195
  --moduix-close-button-focus-ring-width: var(--moduix-date-picker-action-focus-ring-width, var(--moduix-border-width-sm));
192
196
  --moduix-close-button-focus-ring-color: var(--moduix-date-picker-focus-ring-color, var(--moduix-color-ring));
193
197
  --moduix-close-button-focus-ring-offset: var(--moduix-date-picker-action-focus-ring-offset, 0);
194
- --moduix-close-button-transition: var(--moduix-date-picker-transition, var(--moduix-transition-default));
195
198
  top: 50%;
196
199
  position: absolute;
197
200
  inset-inline-end: calc(var(--moduix-date-picker-trigger-offset-right, var(--moduix-spacing-2)) +
@@ -253,7 +256,7 @@
253
256
  }
254
257
  }
255
258
 
256
- .root-sgMq4I[data-inline] .content-pUiIqD {
259
+ .content-pUiIqD[data-inline] {
257
260
  min-width: var(--moduix-date-picker-inline-content-min-width, 18rem);
258
261
  box-shadow: var(--moduix-date-picker-inline-content-shadow, none);
259
262
  }
@@ -1,6 +1,6 @@
1
1
  import { Dialog as DialogPrimitive, useDialog, useDialogContext } from '@ark-ui/react/dialog';
2
2
  import type { ComponentProps } from 'react';
3
- import { type OverlayPortalProps } from '../../internal/overlayPortal';
3
+ import { type OverlayPortalProps } from '../../internal/overlayPortal.js';
4
4
  type DialogRootProps = ComponentProps<typeof DialogPrimitive.Root> & OverlayPortalProps;
5
5
  type DialogRootProviderProps = ComponentProps<typeof DialogPrimitive.RootProvider> & OverlayPortalProps;
6
6
  declare function DialogRoot({ lazyMount, portalled, portalRef, unmountOnExit, ...props }: DialogRootProps): import("react").JSX.Element;