@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
@@ -15,6 +15,7 @@ declare const RadioGroup: import("react").ForwardRefExoticComponent<Omit<RadioGr
15
15
  ItemContext: (props: import("@ark-ui/react/radio-group").RadioGroupItemContextProps) => ReactNode;
16
16
  Label: import("react").ForwardRefExoticComponent<Omit<RadioGroupPrimitive.LabelProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
17
17
  Item: import("react").ForwardRefExoticComponent<Omit<RadioGroupPrimitive.ItemProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
18
+ ItemHiddenInput: import("react").ForwardRefExoticComponent<RadioGroupPrimitive.ItemHiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
18
19
  Option: import("react").ForwardRefExoticComponent<Omit<RadioGroupOptionProps, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
19
20
  ItemControl: import("react").ForwardRefExoticComponent<Omit<RadioGroupItemControlProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
20
21
  ItemText: import("react").ForwardRefExoticComponent<Omit<RadioGroupPrimitive.ItemTextProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
@@ -1,42 +1,39 @@
1
1
  "use client";
2
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { RadioGroup, useRadioGroup, useRadioGroupContext, useRadioGroupItemContext } from "@ark-ui/react/radio-group";
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 RadioGroup_module from "./RadioGroup.module.js";
8
7
  const RadioGroup_RadioGroupRoot = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
9
8
  return /*#__PURE__*/ jsx(RadioGroup.Root, {
10
9
  ref: ref,
11
- "data-slot": "radio-group-root",
12
- className: clsx(RadioGroup_module.root, normalizeClassName(className)),
13
- ...props
10
+ className: clsx(RadioGroup_module.root, className),
11
+ ...props,
12
+ "data-slot": "radio-group-root"
14
13
  });
15
14
  });
16
15
  const RadioGroup_RadioGroupRootProvider = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
17
16
  return /*#__PURE__*/ jsx(RadioGroup.RootProvider, {
18
17
  ref: ref,
19
- "data-slot": "radio-group-root-provider",
20
- className: clsx(RadioGroup_module.root, normalizeClassName(className)),
21
- ...props
18
+ className: clsx(RadioGroup_module.root, className),
19
+ ...props,
20
+ "data-slot": "radio-group-root-provider"
22
21
  });
23
22
  });
24
23
  const RadioGroup_RadioGroupLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
25
24
  return /*#__PURE__*/ jsx(RadioGroup.Label, {
26
25
  ref: ref,
27
- "data-slot": "radio-group-label",
28
- className: clsx(RadioGroup_module.label, normalizeClassName(className)),
29
- ...props
26
+ className: clsx(RadioGroup_module.label, className),
27
+ ...props,
28
+ "data-slot": "radio-group-label"
30
29
  });
31
30
  });
32
- const RadioGroup_RadioGroupItem = /*#__PURE__*/ forwardRef(function({ asChild, children, className, ...props }, ref) {
31
+ const RadioGroup_RadioGroupItem = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
33
32
  return /*#__PURE__*/ jsx(RadioGroup.Item, {
34
33
  ref: ref,
35
- asChild: asChild,
36
- "data-slot": "radio-group-item",
37
- className: clsx(RadioGroup_module.item, normalizeClassName(className)),
34
+ className: clsx(RadioGroup_module.item, className),
38
35
  ...props,
39
- children: withItemHiddenInput(children, asChild)
36
+ "data-slot": "radio-group-item"
40
37
  });
41
38
  });
42
39
  const RadioGroup_RadioGroupOption = /*#__PURE__*/ forwardRef(function({ children, size, ...props }, ref) {
@@ -44,6 +41,7 @@ const RadioGroup_RadioGroupOption = /*#__PURE__*/ forwardRef(function({ children
44
41
  ref: ref,
45
42
  ...props,
46
43
  children: [
44
+ /*#__PURE__*/ jsx(RadioGroup.ItemHiddenInput, {}),
47
45
  /*#__PURE__*/ jsx(RadioGroup_RadioGroupItemControl, {
48
46
  size: size
49
47
  }),
@@ -56,39 +54,26 @@ const RadioGroup_RadioGroupOption = /*#__PURE__*/ forwardRef(function({ children
56
54
  const RadioGroup_RadioGroupItemControl = /*#__PURE__*/ forwardRef(function({ className, size = 'md', ...props }, ref) {
57
55
  return /*#__PURE__*/ jsx(RadioGroup.ItemControl, {
58
56
  ref: ref,
59
- "data-slot": "radio-group-item-control",
60
57
  "data-size": size,
61
- className: clsx(RadioGroup_module.itemControl, normalizeClassName(className)),
62
- ...props
58
+ className: clsx(RadioGroup_module.itemControl, className),
59
+ ...props,
60
+ "data-slot": "radio-group-item-control"
63
61
  });
64
62
  });
65
63
  const RadioGroup_RadioGroupItemText = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
66
64
  return /*#__PURE__*/ jsx(RadioGroup.ItemText, {
67
65
  ref: ref,
68
- "data-slot": "radio-group-item-text",
69
- className: clsx(RadioGroup_module.itemText, normalizeClassName(className)),
70
- ...props
66
+ className: clsx(RadioGroup_module.itemText, className),
67
+ ...props,
68
+ "data-slot": "radio-group-item-text"
71
69
  });
72
70
  });
73
- function withItemHiddenInput(children, asChild) {
74
- const hiddenInput = /*#__PURE__*/ jsx(RadioGroup.ItemHiddenInput, {
75
- "data-slot": "radio-group-item-hidden-input"
76
- });
77
- if (!asChild) return /*#__PURE__*/ jsxs(Fragment, {
78
- children: [
79
- children,
80
- hiddenInput
81
- ]
82
- });
83
- const child = Children.only(children);
84
- return /*#__PURE__*/ cloneElement(child, {}, child.props.children, hiddenInput);
85
- }
86
71
  const RadioGroup_RadioGroupIndicator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
87
72
  return /*#__PURE__*/ jsx(RadioGroup.Indicator, {
88
73
  ref: ref,
89
- "data-slot": "radio-group-indicator",
90
- className: clsx(RadioGroup_module.indicator, normalizeClassName(className)),
91
- ...props
74
+ className: clsx(RadioGroup_module.indicator, className),
75
+ ...props,
76
+ "data-slot": "radio-group-indicator"
92
77
  });
93
78
  });
94
79
  const RadioGroup_RadioGroup = Object.assign(RadioGroup_RadioGroupRoot, {
@@ -98,6 +83,7 @@ const RadioGroup_RadioGroup = Object.assign(RadioGroup_RadioGroupRoot, {
98
83
  ItemContext: RadioGroup.ItemContext,
99
84
  Label: RadioGroup_RadioGroupLabel,
100
85
  Item: RadioGroup_RadioGroupItem,
86
+ ItemHiddenInput: RadioGroup.ItemHiddenInput,
101
87
  Option: RadioGroup_RadioGroupOption,
102
88
  ItemControl: RadioGroup_RadioGroupItemControl,
103
89
  ItemText: RadioGroup_RadioGroupItemText,
@@ -23,7 +23,6 @@
23
23
  gap: var(--moduix-radio-gap, var(--moduix-spacing-2));
24
24
  vertical-align: middle;
25
25
  cursor: pointer;
26
- width: -moz-fit-content;
27
26
  width: fit-content;
28
27
  display: inline-flex;
29
28
  }
@@ -15,6 +15,7 @@ declare const RatingGroup: import("react").ForwardRefExoticComponent<Omit<Rating
15
15
  Root: import("react").ForwardRefExoticComponent<Omit<RatingGroupRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
16
16
  RootProvider: import("react").ForwardRefExoticComponent<Omit<RatingGroupRootProviderProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
17
17
  Context: (props: RatingGroupPrimitive.ContextProps) => ReactNode;
18
+ HiddenInput: import("react").ForwardRefExoticComponent<RatingGroupPrimitive.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
18
19
  Label: import("react").ForwardRefExoticComponent<Omit<RatingGroupPrimitive.LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
19
20
  Control: import("react").ForwardRefExoticComponent<Omit<RatingGroupPrimitive.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
20
21
  Item: import("react").ForwardRefExoticComponent<Omit<RatingGroupPrimitive.ItemProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
@@ -2,65 +2,60 @@
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { RatingGroup, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext } from "@ark-ui/react/rating-group";
4
4
  import { clsx } from "clsx";
5
- import { Children, cloneElement, forwardRef } from "react";
5
+ import { forwardRef } from "react";
6
6
  import { RatingStarIcon } from "../../internal/icons/ui/index.js";
7
- import { normalizeClassName } from "../../internal/normalizeClassName.js";
8
7
  import RatingGroup_module from "./RatingGroup.module.js";
9
- const RatingGroup_RatingGroupRoot = /*#__PURE__*/ forwardRef(function({ asChild, children, className, size = 'md', ...props }, ref) {
8
+ const RatingGroup_RatingGroupRoot = /*#__PURE__*/ forwardRef(function({ className, size = 'md', ...props }, ref) {
10
9
  return /*#__PURE__*/ jsx(RatingGroup.Root, {
11
10
  ref: ref,
12
- asChild: asChild,
13
- "data-slot": "rating-group-root",
14
11
  "data-size": size,
15
- className: clsx(RatingGroup_module.root, normalizeClassName(className)),
12
+ className: clsx(RatingGroup_module.root, className),
16
13
  ...props,
17
- children: withHiddenInput(children, asChild)
14
+ "data-slot": "rating-group-root"
18
15
  });
19
16
  });
20
- const RatingGroup_RatingGroupRootProvider = /*#__PURE__*/ forwardRef(function({ asChild, children, className, size = 'md', ...props }, ref) {
17
+ const RatingGroup_RatingGroupRootProvider = /*#__PURE__*/ forwardRef(function({ className, size = 'md', ...props }, ref) {
21
18
  return /*#__PURE__*/ jsx(RatingGroup.RootProvider, {
22
19
  ref: ref,
23
- asChild: asChild,
24
- "data-slot": "rating-group-root-provider",
25
20
  "data-size": size,
26
- className: clsx(RatingGroup_module.root, normalizeClassName(className)),
21
+ className: clsx(RatingGroup_module.root, className),
27
22
  ...props,
28
- children: withHiddenInput(children, asChild)
23
+ "data-slot": "rating-group-root-provider"
29
24
  });
30
25
  });
31
26
  const RatingGroup_RatingGroupLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
32
27
  return /*#__PURE__*/ jsx(RatingGroup.Label, {
33
28
  ref: ref,
34
- "data-slot": "rating-group-label",
35
- className: clsx(RatingGroup_module.label, normalizeClassName(className)),
36
- ...props
29
+ className: clsx(RatingGroup_module.label, className),
30
+ ...props,
31
+ "data-slot": "rating-group-label"
37
32
  });
38
33
  });
39
34
  const RatingGroup_RatingGroupControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
40
35
  return /*#__PURE__*/ jsx(RatingGroup.Control, {
41
36
  ref: ref,
42
- "data-slot": "rating-group-control",
43
- className: clsx(RatingGroup_module.control, normalizeClassName(className)),
44
- ...props
37
+ className: clsx(RatingGroup_module.control, className),
38
+ ...props,
39
+ "data-slot": "rating-group-control"
45
40
  });
46
41
  });
47
42
  const RatingGroup_RatingGroupItem = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
48
43
  return /*#__PURE__*/ jsx(RatingGroup.Item, {
49
44
  ref: ref,
50
- "data-slot": "rating-group-item",
51
- className: clsx(RatingGroup_module.item, normalizeClassName(className)),
52
- ...props
45
+ className: clsx(RatingGroup_module.item, className),
46
+ ...props,
47
+ "data-slot": "rating-group-item"
53
48
  });
54
49
  });
55
50
  const RatingGroup_RatingGroupItemIndicator = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, ref) {
56
51
  const { half, highlighted } = useRatingGroupItemContext();
57
52
  return /*#__PURE__*/ jsx("span", {
58
53
  ref: ref,
59
- "data-slot": "rating-group-item-indicator",
60
54
  "data-half": half ? '' : void 0,
61
55
  "data-highlighted": highlighted ? '' : void 0,
62
- className: clsx(RatingGroup_module.itemIndicator, normalizeClassName(className)),
56
+ className: clsx(RatingGroup_module.itemIndicator, className),
63
57
  ...props,
58
+ "data-slot": "rating-group-item-indicator",
64
59
  children: children ?? /*#__PURE__*/ jsxs(Fragment, {
65
60
  children: [
66
61
  /*#__PURE__*/ jsx(RatingStarIcon, {
@@ -75,19 +70,6 @@ const RatingGroup_RatingGroupItemIndicator = /*#__PURE__*/ forwardRef(function({
75
70
  })
76
71
  });
77
72
  });
78
- function withHiddenInput(children, asChild) {
79
- const hiddenInput = /*#__PURE__*/ jsx(RatingGroup.HiddenInput, {
80
- "data-slot": "rating-group-hidden-input"
81
- });
82
- if (!asChild) return /*#__PURE__*/ jsxs(Fragment, {
83
- children: [
84
- children,
85
- hiddenInput
86
- ]
87
- });
88
- const child = Children.only(children);
89
- return /*#__PURE__*/ cloneElement(child, {}, child.props.children, hiddenInput);
90
- }
91
73
  function RatingGroupItems({ children }) {
92
74
  return /*#__PURE__*/ jsx(Fragment, {
93
75
  children: /*#__PURE__*/ jsx(RatingGroup.Context, {
@@ -102,6 +84,7 @@ const RatingGroup_RatingGroup = Object.assign(RatingGroup_RatingGroupRoot, {
102
84
  Root: RatingGroup_RatingGroupRoot,
103
85
  RootProvider: RatingGroup_RatingGroupRootProvider,
104
86
  Context: RatingGroup.Context,
87
+ HiddenInput: RatingGroup.HiddenInput,
105
88
  Label: RatingGroup_RatingGroupLabel,
106
89
  Control: RatingGroup_RatingGroupControl,
107
90
  Item: RatingGroup_RatingGroupItem,
@@ -73,7 +73,7 @@
73
73
  pointer-events: none;
74
74
  }
75
75
 
76
- .item-KSLnDf[data-focus-visible], .item-KSLnDf:focus-visible {
76
+ .item-KSLnDf[data-focus-visible] {
77
77
  outline: var(--moduix-rating-group-focus-ring-width, var(--moduix-focus-ring-inset-width, var(--moduix-border-width-sm)))
78
78
  solid var(--moduix-rating-group-focus-ring-color, var(--moduix-color-ring));
79
79
  outline-offset: var(--moduix-rating-group-focus-ring-offset, var(--moduix-border-width-sm));
@@ -3,7 +3,6 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { ScrollArea, useScrollArea, useScrollAreaContext } from "@ark-ui/react/scroll-area";
4
4
  import { clsx } from "clsx";
5
5
  import { forwardRef } from "react";
6
- import { normalizeClassName } from "../../internal/normalizeClassName.js";
7
6
  import ScrollArea_module from "./ScrollArea.module.js";
8
7
  const ScrollArea_ScrollAreaRoot = /*#__PURE__*/ forwardRef(function({ className, fade, variant = 'hover', ...props }, ref) {
9
8
  return /*#__PURE__*/ jsx(ScrollArea.Root, {
@@ -12,7 +11,7 @@ const ScrollArea_ScrollAreaRoot = /*#__PURE__*/ forwardRef(function({ className,
12
11
  "data-slot": "scroll-area-root",
13
12
  "data-fade": fade ? '' : void 0,
14
13
  "data-variant": variant,
15
- className: clsx(ScrollArea_module.root, normalizeClassName(className))
14
+ className: clsx(ScrollArea_module.root, className)
16
15
  });
17
16
  });
18
17
  const ScrollArea_ScrollAreaRootProvider = /*#__PURE__*/ forwardRef(function({ className, fade, variant = 'hover', ...props }, ref) {
@@ -22,7 +21,7 @@ const ScrollArea_ScrollAreaRootProvider = /*#__PURE__*/ forwardRef(function({ cl
22
21
  "data-slot": "scroll-area-root-provider",
23
22
  "data-fade": fade ? '' : void 0,
24
23
  "data-variant": variant,
25
- className: clsx(ScrollArea_module.root, normalizeClassName(className))
24
+ className: clsx(ScrollArea_module.root, className)
26
25
  });
27
26
  });
28
27
  const ScrollArea_ScrollAreaViewport = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
@@ -30,7 +29,7 @@ const ScrollArea_ScrollAreaViewport = /*#__PURE__*/ forwardRef(function({ classN
30
29
  ref: ref,
31
30
  ...props,
32
31
  "data-slot": "scroll-area-viewport",
33
- className: clsx(ScrollArea_module.viewport, normalizeClassName(className))
32
+ className: clsx(ScrollArea_module.viewport, className)
34
33
  });
35
34
  });
36
35
  const ScrollArea_ScrollAreaContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
@@ -38,7 +37,7 @@ const ScrollArea_ScrollAreaContent = /*#__PURE__*/ forwardRef(function({ classNa
38
37
  ref: ref,
39
38
  ...props,
40
39
  "data-slot": "scroll-area-content",
41
- className: clsx(ScrollArea_module.content, normalizeClassName(className))
40
+ className: clsx(ScrollArea_module.content, className)
42
41
  });
43
42
  });
44
43
  const ScrollArea_ScrollAreaScrollbar = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
@@ -46,7 +45,7 @@ const ScrollArea_ScrollAreaScrollbar = /*#__PURE__*/ forwardRef(function({ class
46
45
  ref: ref,
47
46
  ...props,
48
47
  "data-slot": "scroll-area-scrollbar",
49
- className: clsx(ScrollArea_module.scrollbar, normalizeClassName(className))
48
+ className: clsx(ScrollArea_module.scrollbar, className)
50
49
  });
51
50
  });
52
51
  const ScrollArea_ScrollAreaThumb = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
@@ -54,7 +53,7 @@ const ScrollArea_ScrollAreaThumb = /*#__PURE__*/ forwardRef(function({ className
54
53
  ref: ref,
55
54
  ...props,
56
55
  "data-slot": "scroll-area-thumb",
57
- className: clsx(ScrollArea_module.thumb, normalizeClassName(className))
56
+ className: clsx(ScrollArea_module.thumb, className)
58
57
  });
59
58
  });
60
59
  const ScrollArea_ScrollAreaCorner = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
@@ -62,7 +61,7 @@ const ScrollArea_ScrollAreaCorner = /*#__PURE__*/ forwardRef(function({ classNam
62
61
  ref: ref,
63
62
  ...props,
64
63
  "data-slot": "scroll-area-corner",
65
- className: clsx(ScrollArea_module.corner, normalizeClassName(className))
64
+ className: clsx(ScrollArea_module.corner, className)
66
65
  });
67
66
  });
68
67
  const ScrollArea_ScrollArea = Object.assign(ScrollArea_ScrollAreaRoot, {
@@ -16,6 +16,7 @@ declare const SegmentGroup: import("react").ForwardRefExoticComponent<Omit<Segme
16
16
  ItemContext: (props: SegmentGroupPrimitive.ItemContextProps) => ReactNode;
17
17
  Label: import("react").ForwardRefExoticComponent<Omit<SegmentGroupPrimitive.LabelProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
18
18
  Item: import("react").ForwardRefExoticComponent<Omit<SegmentGroupPrimitive.ItemProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
19
+ ItemHiddenInput: import("react").ForwardRefExoticComponent<SegmentGroupPrimitive.ItemHiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
19
20
  ItemControl: import("react").ForwardRefExoticComponent<Omit<SegmentGroupPrimitive.ItemControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
20
21
  ItemText: import("react").ForwardRefExoticComponent<Omit<SegmentGroupPrimitive.ItemTextProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
21
22
  Indicator: import("react").ForwardRefExoticComponent<Omit<SegmentGroupPrimitive.IndicatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,11 +1,10 @@
1
1
  "use client";
2
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useFieldContext } from "@ark-ui/react/field";
4
4
  import { useFieldsetContext } from "@ark-ui/react/fieldset";
5
5
  import { SegmentGroup, useSegmentGroup, useSegmentGroupContext, useSegmentGroupItemContext } from "@ark-ui/react/segment-group";
6
6
  import { clsx } from "clsx";
7
- import { Children, cloneElement, forwardRef } from "react";
8
- import { normalizeClassName } from "../../internal/normalizeClassName.js";
7
+ import { forwardRef } from "react";
9
8
  import SegmentGroup_module from "./SegmentGroup.module.js";
10
9
  function omitUndefined(props) {
11
10
  return Object.fromEntries(Object.entries(props).filter(([, value])=>void 0 !== value));
@@ -22,7 +21,7 @@ function SegmentGroup_useSegmentGroup(props) {
22
21
  });
23
22
  }
24
23
  const SegmentGroup_SegmentGroupRoot = /*#__PURE__*/ forwardRef(function({ className, defaultValue, disabled, form, id, ids, invalid, name, onValueChange, orientation = 'horizontal', readOnly, required, value, ...props }, ref) {
25
- const segmentGroup = SegmentGroup_useSegmentGroup(omitUndefined({
24
+ const segmentGroup = SegmentGroup_useSegmentGroup({
26
25
  defaultValue,
27
26
  disabled,
28
27
  form,
@@ -35,76 +34,61 @@ const SegmentGroup_SegmentGroupRoot = /*#__PURE__*/ forwardRef(function({ classN
35
34
  readOnly,
36
35
  required,
37
36
  value
38
- }));
37
+ });
39
38
  return /*#__PURE__*/ jsx(SegmentGroup.RootProvider, {
40
39
  ref: ref,
41
40
  value: segmentGroup,
42
- "data-slot": "segment-group-root",
43
- className: clsx(SegmentGroup_module.root, normalizeClassName(className)),
44
- ...props
41
+ className: clsx(SegmentGroup_module.root, className),
42
+ ...props,
43
+ "data-slot": "segment-group-root"
45
44
  });
46
45
  });
47
46
  const SegmentGroup_SegmentGroupRootProvider = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
48
47
  return /*#__PURE__*/ jsx(SegmentGroup.RootProvider, {
49
48
  ref: ref,
50
- "data-slot": "segment-group-root-provider",
51
- className: clsx(SegmentGroup_module.root, normalizeClassName(className)),
52
- ...props
49
+ className: clsx(SegmentGroup_module.root, className),
50
+ ...props,
51
+ "data-slot": "segment-group-root-provider"
53
52
  });
54
53
  });
55
54
  const SegmentGroup_SegmentGroupLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
56
55
  return /*#__PURE__*/ jsx(SegmentGroup.Label, {
57
56
  ref: ref,
58
- "data-slot": "segment-group-label",
59
- className: clsx(SegmentGroup_module.label, normalizeClassName(className)),
60
- ...props
57
+ className: clsx(SegmentGroup_module.label, className),
58
+ ...props,
59
+ "data-slot": "segment-group-label"
61
60
  });
62
61
  });
63
- const SegmentGroup_SegmentGroupItem = /*#__PURE__*/ forwardRef(function({ asChild, children, className, ...props }, ref) {
62
+ const SegmentGroup_SegmentGroupItem = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
64
63
  return /*#__PURE__*/ jsx(SegmentGroup.Item, {
65
64
  ref: ref,
66
- asChild: asChild,
67
- "data-slot": "segment-group-item",
68
- className: clsx(SegmentGroup_module.item, normalizeClassName(className)),
65
+ className: clsx(SegmentGroup_module.item, className),
69
66
  ...props,
70
- children: withItemHiddenInput(children, asChild)
67
+ "data-slot": "segment-group-item"
71
68
  });
72
69
  });
73
70
  const SegmentGroup_SegmentGroupItemControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
74
71
  return /*#__PURE__*/ jsx(SegmentGroup.ItemControl, {
75
72
  ref: ref,
76
- "data-slot": "segment-group-item-control",
77
- className: clsx(SegmentGroup_module.itemControl, normalizeClassName(className)),
78
- ...props
73
+ className: clsx(SegmentGroup_module.itemControl, className),
74
+ ...props,
75
+ "data-slot": "segment-group-item-control"
79
76
  });
80
77
  });
81
78
  const SegmentGroup_SegmentGroupItemText = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
82
79
  return /*#__PURE__*/ jsx(SegmentGroup.ItemText, {
83
80
  ref: ref,
84
- "data-slot": "segment-group-item-text",
85
- className: clsx(SegmentGroup_module.itemText, normalizeClassName(className)),
86
- ...props
81
+ className: clsx(SegmentGroup_module.itemText, className),
82
+ ...props,
83
+ "data-slot": "segment-group-item-text"
87
84
  });
88
85
  });
89
- function withItemHiddenInput(children, asChild) {
90
- const hiddenInput = /*#__PURE__*/ jsx(SegmentGroup.ItemHiddenInput, {
91
- "data-slot": "segment-group-item-hidden-input"
92
- });
93
- if (!asChild) return /*#__PURE__*/ jsxs(Fragment, {
94
- children: [
95
- children,
96
- hiddenInput
97
- ]
98
- });
99
- const child = Children.only(children);
100
- return /*#__PURE__*/ cloneElement(child, {}, child.props.children, hiddenInput);
101
- }
102
86
  const SegmentGroup_SegmentGroupIndicator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
103
87
  return /*#__PURE__*/ jsx(SegmentGroup.Indicator, {
104
88
  ref: ref,
105
- "data-slot": "segment-group-indicator",
106
- className: clsx(SegmentGroup_module.indicator, normalizeClassName(className)),
107
- ...props
89
+ className: clsx(SegmentGroup_module.indicator, className),
90
+ ...props,
91
+ "data-slot": "segment-group-indicator"
108
92
  });
109
93
  });
110
94
  function SegmentGroupItems({ items }) {
@@ -115,7 +99,8 @@ function SegmentGroupItems({ items }) {
115
99
  /*#__PURE__*/ jsx(SegmentGroup_SegmentGroupItemText, {
116
100
  children: label
117
101
  }),
118
- /*#__PURE__*/ jsx(SegmentGroup_SegmentGroupItemControl, {})
102
+ /*#__PURE__*/ jsx(SegmentGroup_SegmentGroupItemControl, {}),
103
+ /*#__PURE__*/ jsx(SegmentGroup.ItemHiddenInput, {})
119
104
  ]
120
105
  }, value));
121
106
  }
@@ -126,6 +111,7 @@ const SegmentGroup_SegmentGroup = Object.assign(SegmentGroup_SegmentGroupRoot, {
126
111
  ItemContext: SegmentGroup.ItemContext,
127
112
  Label: SegmentGroup_SegmentGroupLabel,
128
113
  Item: SegmentGroup_SegmentGroupItem,
114
+ ItemHiddenInput: SegmentGroup.ItemHiddenInput,
129
115
  ItemControl: SegmentGroup_SegmentGroupItemControl,
130
116
  ItemText: SegmentGroup_SegmentGroupItemText,
131
117
  Indicator: SegmentGroup_SegmentGroupIndicator,
@@ -71,6 +71,10 @@
71
71
  .item-YWqgii:hover:not([data-readonly], [data-disabled]) {
72
72
  color: var(--moduix-segment-group-item-color-hover, var(--moduix-color-foreground));
73
73
  }
74
+
75
+ .item-YWqgii:hover:not([data-readonly], [data-disabled])[data-state="checked"] {
76
+ color: var(--moduix-segment-group-item-color-hover, var(--moduix-segment-group-item-color-checked, var(--moduix-color-foreground)));
77
+ }
74
78
  }
75
79
 
76
80
  .item-YWqgii[data-state="checked"] {
@@ -1,12 +1,8 @@
1
1
  import { Select as SelectPrimitive, type SelectRootComponent as ArkSelectRootComponent, type SelectRootProviderComponent as ArkSelectRootProviderComponent, useSelect, useSelectContext, useSelectItemContext } from '@ark-ui/react/select';
2
2
  import type { ComponentProps, ReactNode } from 'react';
3
- import { type OverlayPortalProps } from '../../internal/overlayPortal';
4
- type SelectNativeFormControl = 'select' | 'input';
5
- type SelectRootOwnProps = OverlayPortalProps & {
6
- nativeFormControl?: SelectNativeFormControl;
7
- };
8
- type SelectRootComponent = ArkSelectRootComponent<SelectRootOwnProps>;
9
- type SelectRootProviderComponent = ArkSelectRootProviderComponent<SelectRootOwnProps>;
3
+ import { type OverlayPortalProps } from '../../internal/overlayPortal.js';
4
+ type SelectRootComponent = ArkSelectRootComponent<OverlayPortalProps>;
5
+ type SelectRootProviderComponent = ArkSelectRootProviderComponent<OverlayPortalProps>;
10
6
  type SelectFieldProps = Omit<ComponentProps<typeof SelectPrimitive.Control>, 'asChild' | 'children'> & {
11
7
  clearLabel?: string;
12
8
  indicator?: ReactNode;
@@ -16,6 +12,7 @@ declare const Select: SelectRootComponent & {
16
12
  Root: SelectRootComponent;
17
13
  RootProvider: SelectRootProviderComponent;
18
14
  Context: <T extends unknown>(props: SelectPrimitive.ContextProps<T>) => ReactNode;
15
+ HiddenSelect: import("react").ForwardRefExoticComponent<SelectPrimitive.HiddenSelectProps & import("react").RefAttributes<HTMLSelectElement>>;
19
16
  ItemContext: (props: SelectPrimitive.ItemContextProps) => ReactNode;
20
17
  useSelect: <T extends unknown>(props: import("@ark-ui/react/select").UseSelectProps<T>) => import("@ark-ui/react/select").UseSelectReturn<T>;
21
18
  useSelectContext: () => import("@ark-ui/react/select").UseSelectContext<any>;