@moduix/react 1.1.1 → 2.0.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 (254) hide show
  1. package/README.md +16 -16
  2. package/dist/components/accordion/Accordion.css +8 -1
  3. package/dist/components/accordion/Accordion.d.ts +3 -2
  4. package/dist/components/accordion/Accordion.js +17 -5
  5. package/dist/components/accordion/Accordion.module.js +1 -0
  6. package/dist/components/accordion/index.d.ts +2 -2
  7. package/dist/components/alert/Alert.css +19 -5
  8. package/dist/components/alert/Alert.d.ts +5 -3
  9. package/dist/components/alert/Alert.js +17 -5
  10. package/dist/components/alert/Alert.module.js +1 -0
  11. package/dist/components/angle-slider/AngleSlider.d.ts +18 -2
  12. package/dist/components/angle-slider/AngleSlider.js +34 -18
  13. package/dist/components/angle-slider/index.d.ts +2 -2
  14. package/dist/components/aspect-ratio/AspectRatio.css +3 -1
  15. package/dist/components/aspect-ratio/AspectRatio.js +2 -2
  16. package/dist/components/avatar/Avatar.d.ts +6 -3
  17. package/dist/components/avatar/Avatar.js +12 -5
  18. package/dist/components/avatar/index.d.ts +2 -2
  19. package/dist/components/badge/Badge.css +44 -1
  20. package/dist/components/badge/Badge.d.ts +2 -2
  21. package/dist/components/badge/Badge.js +1 -1
  22. package/dist/components/bleed/Bleed.d.ts +6 -4
  23. package/dist/components/bleed/Bleed.js +3 -3
  24. package/dist/components/breadcrumbs/Breadcrumbs.css +7 -1
  25. package/dist/components/breadcrumbs/Breadcrumbs.d.ts +18 -0
  26. package/dist/components/breadcrumbs/Breadcrumbs.js +18 -4
  27. package/dist/components/breadcrumbs/Breadcrumbs.module.js +2 -1
  28. package/dist/components/breadcrumbs/index.d.ts +2 -0
  29. package/dist/components/button/Button.css +21 -1
  30. package/dist/components/button/Button.d.ts +6 -0
  31. package/dist/components/button/Button.js +12 -7
  32. package/dist/components/card/Card.css +20 -4
  33. package/dist/components/card/Card.d.ts +1 -0
  34. package/dist/components/card/Card.js +12 -1
  35. package/dist/components/card/Card.module.js +1 -0
  36. package/dist/components/carousel/Carousel.css +2 -0
  37. package/dist/components/carousel/Carousel.d.ts +4 -0
  38. package/dist/components/carousel/Carousel.js +15 -2
  39. package/dist/components/checkbox/Checkbox.d.ts +2 -3
  40. package/dist/components/checkbox/Checkbox.js +25 -22
  41. package/dist/components/checkbox/index.d.ts +2 -2
  42. package/dist/components/clipboard/Clipboard.css +1 -1
  43. package/dist/components/clipboard/Clipboard.d.ts +2 -0
  44. package/dist/components/clipboard/Clipboard.js +15 -4
  45. package/dist/components/close-button/CloseButton.d.ts +12 -2
  46. package/dist/components/close-button/CloseButton.js +9 -9
  47. package/dist/components/collapsible/Collapsible.css +9 -2
  48. package/dist/components/collapsible/Collapsible.d.ts +3 -2
  49. package/dist/components/collapsible/Collapsible.js +18 -6
  50. package/dist/components/collapsible/Collapsible.module.js +1 -0
  51. package/dist/components/collapsible/index.d.ts +2 -2
  52. package/dist/components/color-picker/ColorPicker.css +35 -6
  53. package/dist/components/color-picker/ColorPicker.d.ts +3 -3
  54. package/dist/components/color-picker/ColorPicker.js +78 -27
  55. package/dist/components/color-picker/ColorPicker.module.js +1 -0
  56. package/dist/components/color-picker/index.d.ts +2 -2
  57. package/dist/components/combobox/Combobox.css +37 -8
  58. package/dist/components/combobox/Combobox.d.ts +9 -2
  59. package/dist/components/combobox/Combobox.js +34 -8
  60. package/dist/components/combobox/index.d.ts +2 -2
  61. package/dist/components/command-palette/CommandPalette.css +40 -74
  62. package/dist/components/command-palette/CommandPalette.d.ts +13 -3
  63. package/dist/components/command-palette/CommandPalette.js +54 -43
  64. package/dist/components/command-palette/CommandPalette.module.js +0 -2
  65. package/dist/components/container/Container.js +1 -1
  66. package/dist/components/date-input/DateInput.css +3 -1
  67. package/dist/components/date-input/DateInput.d.ts +12 -7
  68. package/dist/components/date-input/DateInput.js +35 -14
  69. package/dist/components/date-input/index.d.ts +2 -2
  70. package/dist/components/date-picker/DatePicker.css +41 -13
  71. package/dist/components/date-picker/DatePicker.d.ts +30 -2
  72. package/dist/components/date-picker/DatePicker.js +94 -9
  73. package/dist/components/date-picker/index.d.ts +2 -2
  74. package/dist/components/dialog/Dialog.css +14 -10
  75. package/dist/components/dialog/Dialog.d.ts +2 -2
  76. package/dist/components/dialog/Dialog.js +3 -3
  77. package/dist/components/dialog/index.d.ts +2 -2
  78. package/dist/components/drawer/Drawer.d.ts +2 -2
  79. package/dist/components/drawer/Drawer.js +3 -3
  80. package/dist/components/drawer/index.d.ts +2 -2
  81. package/dist/components/editable/Editable.d.ts +9 -2
  82. package/dist/components/editable/Editable.js +14 -5
  83. package/dist/components/editable/index.d.ts +2 -2
  84. package/dist/components/empty/Empty.js +1 -1
  85. package/dist/components/field/Field.css +0 -4
  86. package/dist/components/field/Field.d.ts +3 -2
  87. package/dist/components/field/Field.js +6 -5
  88. package/dist/components/field/Field.module.js +0 -1
  89. package/dist/components/field/index.d.ts +2 -2
  90. package/dist/components/fieldset/Fieldset.d.ts +2 -2
  91. package/dist/components/fieldset/Fieldset.js +3 -3
  92. package/dist/components/fieldset/index.d.ts +2 -2
  93. package/dist/components/file-upload/FileUpload.css +81 -8
  94. package/dist/components/file-upload/FileUpload.d.ts +22 -5
  95. package/dist/components/file-upload/FileUpload.js +79 -21
  96. package/dist/components/file-upload/FileUpload.module.js +3 -0
  97. package/dist/components/file-upload/index.d.ts +2 -2
  98. package/dist/components/floating-panel/FloatingPanel.css +14 -10
  99. package/dist/components/floating-panel/FloatingPanel.d.ts +11 -3
  100. package/dist/components/floating-panel/FloatingPanel.js +15 -9
  101. package/dist/components/heading/Heading.js +1 -1
  102. package/dist/components/highlight/Highlight.js +1 -1
  103. package/dist/components/hover-card/HoverCard.css +14 -10
  104. package/dist/components/hover-card/HoverCard.d.ts +3 -2
  105. package/dist/components/hover-card/HoverCard.js +5 -4
  106. package/dist/components/hover-card/index.d.ts +2 -2
  107. package/dist/components/image/Image.css +7 -0
  108. package/dist/components/image/Image.d.ts +12 -0
  109. package/dist/components/image/Image.js +28 -0
  110. package/dist/components/image/Image.module.js +5 -0
  111. package/dist/components/image/index.d.ts +2 -0
  112. package/dist/components/image-cropper/ImageCropper.d.ts +7 -2
  113. package/dist/components/image-cropper/ImageCropper.js +25 -3
  114. package/dist/components/image-cropper/index.d.ts +2 -2
  115. package/dist/components/input/Input.js +1 -1
  116. package/dist/components/input-group/InputGroup.d.ts +3 -0
  117. package/dist/components/input-group/InputGroup.js +1 -1
  118. package/dist/components/kbd/Kbd.js +1 -1
  119. package/dist/components/lightbox/Lightbox.css +12 -10
  120. package/dist/components/lightbox/Lightbox.d.ts +4 -2
  121. package/dist/components/lightbox/Lightbox.js +9 -7
  122. package/dist/components/lightbox/index.d.ts +2 -2
  123. package/dist/components/list/List.js +1 -1
  124. package/dist/components/listbox/Listbox.css +60 -1
  125. package/dist/components/listbox/Listbox.d.ts +14 -2
  126. package/dist/components/listbox/Listbox.js +41 -5
  127. package/dist/components/listbox/Listbox.module.js +3 -0
  128. package/dist/components/listbox/index.d.ts +2 -2
  129. package/dist/components/marquee/Marquee.d.ts +2 -1
  130. package/dist/components/marquee/Marquee.js +4 -3
  131. package/dist/components/marquee/index.d.ts +2 -2
  132. package/dist/components/menu/Menu.css +14 -8
  133. package/dist/components/menu/Menu.d.ts +3 -2
  134. package/dist/components/menu/Menu.js +6 -5
  135. package/dist/components/menu/index.d.ts +2 -2
  136. package/dist/components/native-select/NativeSelect.d.ts +6 -2
  137. package/dist/components/native-select/NativeSelect.js +5 -4
  138. package/dist/components/number-input/NumberInput.css +0 -6
  139. package/dist/components/number-input/NumberInput.d.ts +7 -2
  140. package/dist/components/number-input/NumberInput.js +17 -4
  141. package/dist/components/number-input/index.d.ts +2 -2
  142. package/dist/components/pagination/Pagination.d.ts +4 -0
  143. package/dist/components/pagination/Pagination.js +13 -4
  144. package/dist/components/password-input/PasswordInput.d.ts +4 -0
  145. package/dist/components/password-input/PasswordInput.js +10 -2
  146. package/dist/components/pin-input/PinInput.d.ts +6 -1
  147. package/dist/components/pin-input/PinInput.js +25 -16
  148. package/dist/components/popover/Popover.css +20 -11
  149. package/dist/components/popover/Popover.js +1 -1
  150. package/dist/components/progress-circular/ProgressCircular.d.ts +6 -0
  151. package/dist/components/progress-circular/ProgressCircular.js +14 -3
  152. package/dist/components/progress-linear/ProgressLinear.d.ts +3 -0
  153. package/dist/components/progress-linear/ProgressLinear.js +6 -3
  154. package/dist/components/qr-code/QrCode.css +3 -2
  155. package/dist/components/qr-code/QrCode.d.ts +2 -2
  156. package/dist/components/qr-code/QrCode.js +3 -3
  157. package/dist/components/qr-code/index.d.ts +2 -2
  158. package/dist/components/radio-group/RadioGroup.d.ts +8 -4
  159. package/dist/components/radio-group/RadioGroup.js +22 -14
  160. package/dist/components/radio-group/index.d.ts +2 -2
  161. package/dist/components/rating-group/RatingGroup.css +3 -3
  162. package/dist/components/rating-group/RatingGroup.d.ts +11 -4
  163. package/dist/components/rating-group/RatingGroup.js +29 -18
  164. package/dist/components/rating-group/index.d.ts +2 -2
  165. package/dist/components/scroll-area/ScrollArea.css +7 -2
  166. package/dist/components/scroll-area/ScrollArea.d.ts +3 -0
  167. package/dist/components/scroll-area/ScrollArea.js +9 -6
  168. package/dist/components/segment-group/SegmentGroup.d.ts +13 -3
  169. package/dist/components/segment-group/SegmentGroup.js +23 -15
  170. package/dist/components/segment-group/index.d.ts +2 -2
  171. package/dist/components/select/Select.css +24 -15
  172. package/dist/components/select/Select.d.ts +18 -4
  173. package/dist/components/select/Select.js +65 -20
  174. package/dist/components/separator/Separator.js +1 -1
  175. package/dist/components/sidebar/Sidebar.css +144 -4
  176. package/dist/components/sidebar/Sidebar.d.ts +26 -0
  177. package/dist/components/sidebar/Sidebar.js +105 -13
  178. package/dist/components/sidebar/Sidebar.module.js +6 -0
  179. package/dist/components/signature-pad/SignaturePad.css +12 -41
  180. package/dist/components/signature-pad/SignaturePad.d.ts +14 -6
  181. package/dist/components/signature-pad/SignaturePad.js +56 -17
  182. package/dist/components/signature-pad/index.d.ts +2 -2
  183. package/dist/components/simple-grid/SimpleGrid.js +3 -3
  184. package/dist/components/skeleton/Skeleton.js +1 -1
  185. package/dist/components/slider/Slider.css +6 -4
  186. package/dist/components/slider/Slider.d.ts +12 -3
  187. package/dist/components/slider/Slider.js +24 -15
  188. package/dist/components/slider/index.d.ts +2 -2
  189. package/dist/components/spinner/Spinner.js +2 -2
  190. package/dist/components/split-button/SplitButton.d.ts +1 -1
  191. package/dist/components/split-button/SplitButton.js +3 -4
  192. package/dist/components/splitter/Splitter.css +13 -12
  193. package/dist/components/splitter/Splitter.d.ts +2 -2
  194. package/dist/components/splitter/Splitter.js +12 -11
  195. package/dist/components/splitter/index.d.ts +2 -2
  196. package/dist/components/stack/Stack.d.ts +1 -3
  197. package/dist/components/stack/Stack.js +4 -6
  198. package/dist/components/steps/Steps.d.ts +2 -1
  199. package/dist/components/steps/Steps.js +5 -4
  200. package/dist/components/swap/Swap.css +45 -0
  201. package/dist/components/swap/Swap.d.ts +11 -0
  202. package/dist/components/swap/Swap.js +39 -0
  203. package/dist/components/swap/Swap.module.js +11 -0
  204. package/dist/components/swap/index.d.ts +2 -0
  205. package/dist/components/switch/Switch.css +2 -2
  206. package/dist/components/switch/Switch.d.ts +4 -4
  207. package/dist/components/switch/Switch.js +19 -16
  208. package/dist/components/switch/index.d.ts +2 -2
  209. package/dist/components/table/Table.css +3 -3
  210. package/dist/components/table/Table.js +3 -2
  211. package/dist/components/table/Table.module.js +0 -1
  212. package/dist/components/tabs/Tabs.css +3 -1
  213. package/dist/components/tabs/Tabs.d.ts +3 -2
  214. package/dist/components/tabs/Tabs.js +5 -4
  215. package/dist/components/tabs/index.d.ts +2 -2
  216. package/dist/components/tag/Tag.css +12 -42
  217. package/dist/components/tag/Tag.js +7 -20
  218. package/dist/components/tags-input/TagsInput.css +3 -40
  219. package/dist/components/tags-input/TagsInput.d.ts +7 -4
  220. package/dist/components/tags-input/TagsInput.js +33 -21
  221. package/dist/components/tags-input/index.d.ts +2 -2
  222. package/dist/components/text/Text.d.ts +2 -2
  223. package/dist/components/text/Text.js +1 -1
  224. package/dist/components/textarea/Textarea.js +1 -1
  225. package/dist/components/timer/Timer.d.ts +14 -2
  226. package/dist/components/timer/Timer.js +13 -5
  227. package/dist/components/timer/index.d.ts +2 -2
  228. package/dist/components/toast/Toast.d.ts +3 -1
  229. package/dist/components/toast/Toast.js +11 -2
  230. package/dist/components/toggle/Toggle.css +3 -3
  231. package/dist/components/toggle/Toggle.d.ts +3 -2
  232. package/dist/components/toggle/Toggle.js +5 -4
  233. package/dist/components/toggle/index.d.ts +2 -2
  234. package/dist/components/toggle-group/ToggleGroup.d.ts +3 -2
  235. package/dist/components/toggle-group/ToggleGroup.js +4 -3
  236. package/dist/components/toggle-group/index.d.ts +2 -2
  237. package/dist/components/tooltip/Tooltip.css +14 -10
  238. package/dist/components/tooltip/Tooltip.d.ts +3 -2
  239. package/dist/components/tooltip/Tooltip.js +10 -3
  240. package/dist/components/tooltip/index.d.ts +2 -2
  241. package/dist/components/tour/Tour.css +23 -18
  242. package/dist/components/tour/Tour.d.ts +6 -0
  243. package/dist/components/tour/Tour.js +8 -1
  244. package/dist/components/tree-view/TreeView.css +1 -1
  245. package/dist/components/tree-view/TreeView.d.ts +2 -2
  246. package/dist/components/tree-view/TreeView.js +4 -4
  247. package/dist/components/tree-view/index.d.ts +2 -2
  248. package/dist/index.d.ts +40 -39
  249. package/dist/index.js +40 -39
  250. package/dist/lib/moduix/icons/ui/Icons.d.ts +1 -45
  251. package/dist/lib/moduix/icons/ui/Icons.js +36 -263
  252. package/dist/lib/moduix/icons/ui/index.d.ts +2 -2
  253. package/dist/lib/moduix/overlayPortal.js +1 -1
  254. package/package.json +4 -3
@@ -4,11 +4,14 @@ import { Progress } from "@ark-ui/react/progress";
4
4
  declare const ProgressLinear: import("react").ForwardRefExoticComponent<Omit<Progress.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
5
5
  Root: import("react").ForwardRefExoticComponent<Omit<Progress.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
6
6
  RootProvider: import("react").ForwardRefExoticComponent<Omit<Progress.RootProviderProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
7
+ Context: (props: Progress.ContextProps) => import("react").ReactNode;
7
8
  Label: import("react").ForwardRefExoticComponent<Omit<Progress.LabelProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
8
9
  ValueText: import("react").ForwardRefExoticComponent<Omit<Progress.ValueTextProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
9
10
  Track: import("react").ForwardRefExoticComponent<Omit<Progress.TrackProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
10
11
  Range: import("react").ForwardRefExoticComponent<Omit<Progress.RangeProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
11
12
  View: import("react").ForwardRefExoticComponent<Omit<Progress.ViewProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
13
+ useProgress: (props?: import("@ark-ui/react/progress").UseProgressProps) => import("@ark-ui/react/progress").UseProgressReturn;
14
+ useProgressContext: () => import("@ark-ui/react/progress").UseProgressContext;
12
15
  };
13
16
  //#endregion
14
17
  export { ProgressLinear };
@@ -1,9 +1,9 @@
1
1
  import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
2
2
  import ProgressLinear_module_default from "./ProgressLinear.module.js";
3
- import { jsx } from "react/jsx-runtime";
4
3
  import { clsx } from "clsx";
5
4
  import { forwardRef } from "react";
6
- import { Progress } from "@ark-ui/react/progress";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { Progress, useProgress, useProgressContext } from "@ark-ui/react/progress";
7
7
  //#region src/components/progress-linear/ProgressLinear.tsx
8
8
  const ProgressLinearRoot = forwardRef(function ProgressLinearRoot({ className, ...props }, ref) {
9
9
  return /* @__PURE__ */ jsx(Progress.Root, {
@@ -64,11 +64,14 @@ const ProgressLinearView = forwardRef(function ProgressLinearView({ className, .
64
64
  const ProgressLinear = Object.assign(ProgressLinearRoot, {
65
65
  Root: ProgressLinearRoot,
66
66
  RootProvider: ProgressLinearRootProvider,
67
+ Context: Progress.Context,
67
68
  Label: ProgressLinearLabel,
68
69
  ValueText: ProgressLinearValueText,
69
70
  Track: ProgressLinearTrack,
70
71
  Range: ProgressLinearRange,
71
- View: ProgressLinearView
72
+ View: ProgressLinearView,
73
+ useProgress,
74
+ useProgressContext
72
75
  });
73
76
  //#endregion
74
77
  export { ProgressLinear };
@@ -13,8 +13,9 @@
13
13
 
14
14
  .ZbLWjq_frame {
15
15
  box-sizing: border-box;
16
- width: var(--qr-code-size, 8rem);
17
- height: var(--qr-code-size, 8rem);
16
+ width: min(var(--qr-code-size, 8rem), 100%);
17
+ aspect-ratio: 1;
18
+ height: auto;
18
19
  color: inherit;
19
20
  fill: var(--qr-code-fill, currentColor);
20
21
  display: block;
@@ -1,4 +1,4 @@
1
- import { QrCode } from "@ark-ui/react/qr-code";
1
+ import { QrCode, useQrCode } from "@ark-ui/react/qr-code";
2
2
 
3
3
  //#region src/components/qr-code/QrCode.d.ts
4
4
  declare const QrCode$1: import("react").ForwardRefExoticComponent<Omit<QrCode.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
@@ -10,4 +10,4 @@ declare const QrCode$1: import("react").ForwardRefExoticComponent<Omit<QrCode.Ro
10
10
  DownloadTrigger: import("react").ForwardRefExoticComponent<Omit<QrCode.DownloadTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
11
11
  };
12
12
  //#endregion
13
- export { QrCode$1 as QrCode };
13
+ export { QrCode$1 as QrCode, useQrCode };
@@ -1,9 +1,9 @@
1
1
  import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
2
2
  import QrCode_module_default from "./QrCode.module.js";
3
- import { jsx } from "react/jsx-runtime";
4
3
  import { clsx } from "clsx";
5
4
  import { forwardRef } from "react";
6
- import { QrCode } from "@ark-ui/react/qr-code";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { QrCode, useQrCode } from "@ark-ui/react/qr-code";
7
7
  //#region src/components/qr-code/QrCode.tsx
8
8
  const QrCodeRoot = forwardRef(function QrCodeRoot({ className, ...props }, ref) {
9
9
  return /* @__PURE__ */ jsx(QrCode.Root, {
@@ -62,4 +62,4 @@ const QrCode$1 = Object.assign(QrCodeRoot, {
62
62
  DownloadTrigger: QrCodeDownloadTrigger
63
63
  });
64
64
  //#endregion
65
- export { QrCode$1 as QrCode };
65
+ export { QrCode$1 as QrCode, useQrCode };
@@ -1,2 +1,2 @@
1
- import { QrCode } from "./QrCode.js";
2
- export { QrCode };
1
+ import { QrCode, useQrCode } from "./QrCode.js";
2
+ export { QrCode, useQrCode };
@@ -1,20 +1,24 @@
1
- import { ComponentProps } from "react";
2
- import { RadioGroup } from "@ark-ui/react/radio-group";
1
+ import { ComponentProps, ReactNode } from "react";
2
+ import { RadioGroup, useRadioGroup } from "@ark-ui/react/radio-group";
3
3
 
4
4
  //#region src/components/radio-group/RadioGroup.d.ts
5
5
  type RadioGroupItemControlSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
6
6
  type RadioGroupItemControlProps = ComponentProps<typeof RadioGroup.ItemControl> & {
7
7
  size?: RadioGroupItemControlSize;
8
8
  };
9
+ type RadioGroupOptionProps = Omit<ComponentProps<typeof RadioGroup.Item>, 'asChild' | 'children'> & {
10
+ children: ReactNode;
11
+ size?: RadioGroupItemControlSize;
12
+ };
9
13
  declare const RadioGroup$1: import("react").ForwardRefExoticComponent<Omit<RadioGroup.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
10
14
  Root: import("react").ForwardRefExoticComponent<Omit<RadioGroup.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
11
15
  RootProvider: import("react").ForwardRefExoticComponent<Omit<RadioGroup.RootProviderProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
12
16
  Label: import("react").ForwardRefExoticComponent<Omit<RadioGroup.LabelProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
13
17
  Item: import("react").ForwardRefExoticComponent<Omit<RadioGroup.ItemProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
18
+ Option: import("react").ForwardRefExoticComponent<Omit<RadioGroupOptionProps, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
14
19
  ItemControl: import("react").ForwardRefExoticComponent<Omit<RadioGroupItemControlProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
15
20
  ItemText: import("react").ForwardRefExoticComponent<Omit<RadioGroup.ItemTextProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
16
- ItemHiddenInput: import("react").ForwardRefExoticComponent<Omit<RadioGroup.ItemHiddenInputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
17
21
  Indicator: import("react").ForwardRefExoticComponent<Omit<RadioGroup.IndicatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
18
22
  };
19
23
  //#endregion
20
- export { RadioGroup$1 as RadioGroup, type RadioGroupItemControlProps, type RadioGroupItemControlSize };
24
+ export { RadioGroup$1 as RadioGroup, type RadioGroupItemControlProps, type RadioGroupItemControlSize, type RadioGroupOptionProps, useRadioGroup };
@@ -1,9 +1,9 @@
1
1
  import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
2
2
  import RadioGroup_module_default from "./RadioGroup.module.js";
3
- import { jsx } from "react/jsx-runtime";
4
3
  import { clsx } from "clsx";
5
- import { forwardRef } from "react";
6
- import { RadioGroup } from "@ark-ui/react/radio-group";
4
+ import { Children, cloneElement, forwardRef } from "react";
5
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
+ import { RadioGroup, useRadioGroup } from "@ark-ui/react/radio-group";
7
7
  //#region src/components/radio-group/RadioGroup.tsx
8
8
  const RadioGroupRoot = forwardRef(function RadioGroupRoot({ className, ...props }, ref) {
9
9
  return /* @__PURE__ */ jsx(RadioGroup.Root, {
@@ -29,12 +29,21 @@ const RadioGroupLabel = forwardRef(function RadioGroupLabel({ className, ...prop
29
29
  ...props
30
30
  });
31
31
  });
32
- const RadioGroupItem = forwardRef(function RadioGroupItem({ className, ...props }, ref) {
32
+ const RadioGroupItem = forwardRef(function RadioGroupItem({ asChild, children, className, ...props }, ref) {
33
33
  return /* @__PURE__ */ jsx(RadioGroup.Item, {
34
34
  ref,
35
+ asChild,
35
36
  "data-slot": "radio-group-item",
36
37
  className: clsx(RadioGroup_module_default.item, normalizeClassName(className)),
37
- ...props
38
+ ...props,
39
+ children: withItemHiddenInput(children, asChild)
40
+ });
41
+ });
42
+ const RadioGroupOption = forwardRef(function RadioGroupOption({ children, size, ...props }, ref) {
43
+ return /* @__PURE__ */ jsxs(RadioGroupItem, {
44
+ ref,
45
+ ...props,
46
+ children: [/* @__PURE__ */ jsx(RadioGroupItemControl, { size }), /* @__PURE__ */ jsx(RadioGroupItemText, { children })]
38
47
  });
39
48
  });
40
49
  const RadioGroupItemControl = forwardRef(function RadioGroupItemControl({ className, size = "md", ...props }, ref) {
@@ -54,13 +63,12 @@ const RadioGroupItemText = forwardRef(function RadioGroupItemText({ className, .
54
63
  ...props
55
64
  });
56
65
  });
57
- const RadioGroupItemHiddenInput = forwardRef(function RadioGroupItemHiddenInput(props, ref) {
58
- return /* @__PURE__ */ jsx(RadioGroup.ItemHiddenInput, {
59
- ref,
60
- "data-slot": "radio-group-item-hidden-input",
61
- ...props
62
- });
63
- });
66
+ function withItemHiddenInput(children, asChild) {
67
+ const hiddenInput = /* @__PURE__ */ jsx(RadioGroup.ItemHiddenInput, { "data-slot": "radio-group-item-hidden-input" });
68
+ if (!asChild) return /* @__PURE__ */ jsxs(Fragment$1, { children: [children, hiddenInput] });
69
+ const child = Children.only(children);
70
+ return cloneElement(child, {}, child.props.children, hiddenInput);
71
+ }
64
72
  const RadioGroupIndicator = forwardRef(function RadioGroupIndicator({ className, ...props }, ref) {
65
73
  return /* @__PURE__ */ jsx(RadioGroup.Indicator, {
66
74
  ref,
@@ -74,10 +82,10 @@ const RadioGroup$1 = Object.assign(RadioGroupRoot, {
74
82
  RootProvider: RadioGroupRootProvider,
75
83
  Label: RadioGroupLabel,
76
84
  Item: RadioGroupItem,
85
+ Option: RadioGroupOption,
77
86
  ItemControl: RadioGroupItemControl,
78
87
  ItemText: RadioGroupItemText,
79
- ItemHiddenInput: RadioGroupItemHiddenInput,
80
88
  Indicator: RadioGroupIndicator
81
89
  });
82
90
  //#endregion
83
- export { RadioGroup$1 as RadioGroup };
91
+ export { RadioGroup$1 as RadioGroup, useRadioGroup };
@@ -1,2 +1,2 @@
1
- import { RadioGroup, RadioGroupItemControlProps, RadioGroupItemControlSize } from "./RadioGroup.js";
2
- export { RadioGroup, type RadioGroupItemControlProps, type RadioGroupItemControlSize };
1
+ import { RadioGroup, RadioGroupItemControlProps, RadioGroupItemControlSize, RadioGroupOptionProps, useRadioGroup } from "./RadioGroup.js";
2
+ export { RadioGroup, type RadioGroupItemControlProps, type RadioGroupItemControlSize, type RadioGroupOptionProps, useRadioGroup };
@@ -72,9 +72,9 @@
72
72
  }
73
73
 
74
74
  &:focus-visible {
75
- outline: var(--rating-group-focus-ring-width, var(--border-width-sm)) solid
76
- var(--rating-group-focus-ring-color, var(--color-ring));
77
- outline-offset: var(--rating-group-focus-ring-offset, var(--border-width-sm));
75
+ outline: var(--rating-group-focus-ring-width, 0) solid
76
+ var(--rating-group-focus-ring-color, transparent);
77
+ outline-offset: var(--rating-group-focus-ring-offset, 0);
78
78
  }
79
79
  }
80
80
 
@@ -1,5 +1,5 @@
1
- import { ComponentProps } from "react";
2
- import { RatingGroup } from "@ark-ui/react/rating-group";
1
+ import { ComponentProps, ReactNode } from "react";
2
+ import { RatingGroup, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext } from "@ark-ui/react/rating-group";
3
3
 
4
4
  //#region src/components/rating-group/RatingGroup.d.ts
5
5
  type RatingGroupSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
@@ -10,14 +10,21 @@ type RatingGroupRootProviderProps = ComponentProps<typeof RatingGroup.RootProvid
10
10
  size?: RatingGroupSize;
11
11
  };
12
12
  type RatingGroupItemIndicatorProps = ComponentProps<'span'>;
13
+ declare function RatingGroupItems({
14
+ children
15
+ }: {
16
+ children?: ReactNode;
17
+ }): import("react").JSX.Element;
13
18
  declare const RatingGroup$1: import("react").ForwardRefExoticComponent<Omit<RatingGroupRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
14
19
  Root: import("react").ForwardRefExoticComponent<Omit<RatingGroupRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
15
20
  RootProvider: import("react").ForwardRefExoticComponent<Omit<RatingGroupRootProviderProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
21
+ Context: (props: RatingGroup.ContextProps) => ReactNode;
16
22
  Label: import("react").ForwardRefExoticComponent<Omit<RatingGroup.LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
17
23
  Control: import("react").ForwardRefExoticComponent<Omit<RatingGroup.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
18
24
  Item: import("react").ForwardRefExoticComponent<Omit<RatingGroup.ItemProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
25
+ ItemContext: (props: RatingGroup.ItemContextProps) => ReactNode;
19
26
  ItemIndicator: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
20
- HiddenInput: import("react").ForwardRefExoticComponent<Omit<RatingGroup.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
27
+ Items: typeof RatingGroupItems;
21
28
  };
22
29
  //#endregion
23
- export { RatingGroup$1 as RatingGroup, type RatingGroupItemIndicatorProps, type RatingGroupRootProps, type RatingGroupRootProviderProps, type RatingGroupSize };
30
+ export { RatingGroup$1 as RatingGroup, type RatingGroupItemIndicatorProps, type RatingGroupRootProps, type RatingGroupRootProviderProps, type RatingGroupSize, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext };
@@ -1,27 +1,31 @@
1
- import { RatingStarIcon } from "../../lib/moduix/icons/ui/Icons.js";
2
1
  import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
2
+ import { RatingStarIcon } from "../../lib/moduix/icons/ui/Icons.js";
3
3
  import RatingGroup_module_default from "./RatingGroup.module.js";
4
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
4
  import { clsx } from "clsx";
6
- import { forwardRef } from "react";
7
- import { RatingGroup, useRatingGroupItemContext } from "@ark-ui/react/rating-group";
5
+ import { Children, cloneElement, forwardRef } from "react";
6
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
+ import { RatingGroup, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext } from "@ark-ui/react/rating-group";
8
8
  //#region src/components/rating-group/RatingGroup.tsx
9
- const RatingGroupRoot = forwardRef(function RatingGroupRoot({ className, size = "md", ...props }, ref) {
9
+ const RatingGroupRoot = forwardRef(function RatingGroupRoot({ asChild, children, className, size = "md", ...props }, ref) {
10
10
  return /* @__PURE__ */ jsx(RatingGroup.Root, {
11
11
  ref,
12
+ asChild,
12
13
  "data-slot": "rating-group-root",
13
14
  "data-size": size,
14
15
  className: clsx(RatingGroup_module_default.root, normalizeClassName(className)),
15
- ...props
16
+ ...props,
17
+ children: withHiddenInput(children, asChild)
16
18
  });
17
19
  });
18
- const RatingGroupRootProvider = forwardRef(function RatingGroupRootProvider({ className, size = "md", ...props }, ref) {
20
+ const RatingGroupRootProvider = forwardRef(function RatingGroupRootProvider({ asChild, children, className, size = "md", ...props }, ref) {
19
21
  return /* @__PURE__ */ jsx(RatingGroup.RootProvider, {
20
22
  ref,
23
+ asChild,
21
24
  "data-slot": "rating-group-root-provider",
22
25
  "data-size": size,
23
26
  className: clsx(RatingGroup_module_default.root, normalizeClassName(className)),
24
- ...props
27
+ ...props,
28
+ children: withHiddenInput(children, asChild)
25
29
  });
26
30
  });
27
31
  const RatingGroupLabel = forwardRef(function RatingGroupLabel({ className, ...props }, ref) {
@@ -57,7 +61,7 @@ const RatingGroupItemIndicator = forwardRef(function RatingGroupItemIndicator({
57
61
  "data-highlighted": highlighted ? "" : void 0,
58
62
  className: clsx(RatingGroup_module_default.itemIndicator, normalizeClassName(className)),
59
63
  ...props,
60
- children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(RatingStarIcon, {
64
+ children: children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(RatingStarIcon, {
61
65
  "data-slot": "rating-group-item-indicator-bg",
62
66
  className: RatingGroup_module_default.iconBg
63
67
  }), /* @__PURE__ */ jsx(RatingStarIcon, {
@@ -66,21 +70,28 @@ const RatingGroupItemIndicator = forwardRef(function RatingGroupItemIndicator({
66
70
  })] })
67
71
  });
68
72
  });
69
- const RatingGroupHiddenInput = forwardRef(function RatingGroupHiddenInput(props, ref) {
70
- return /* @__PURE__ */ jsx(RatingGroup.HiddenInput, {
71
- ref,
72
- "data-slot": "rating-group-hidden-input",
73
- ...props
74
- });
75
- });
73
+ function withHiddenInput(children, asChild) {
74
+ const hiddenInput = /* @__PURE__ */ jsx(RatingGroup.HiddenInput, { "data-slot": "rating-group-hidden-input" });
75
+ if (!asChild) return /* @__PURE__ */ jsxs(Fragment$1, { children: [children, hiddenInput] });
76
+ const child = Children.only(children);
77
+ return cloneElement(child, {}, child.props.children, hiddenInput);
78
+ }
79
+ function RatingGroupItems({ children }) {
80
+ return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(RatingGroup.Context, { children: ({ items }) => items.map((item) => /* @__PURE__ */ jsx(RatingGroupItem, {
81
+ index: item,
82
+ children: children ?? /* @__PURE__ */ jsx(RatingGroupItemIndicator, {})
83
+ }, item)) }) });
84
+ }
76
85
  const RatingGroup$1 = Object.assign(RatingGroupRoot, {
77
86
  Root: RatingGroupRoot,
78
87
  RootProvider: RatingGroupRootProvider,
88
+ Context: RatingGroup.Context,
79
89
  Label: RatingGroupLabel,
80
90
  Control: RatingGroupControl,
81
91
  Item: RatingGroupItem,
92
+ ItemContext: RatingGroup.ItemContext,
82
93
  ItemIndicator: RatingGroupItemIndicator,
83
- HiddenInput: RatingGroupHiddenInput
94
+ Items: RatingGroupItems
84
95
  });
85
96
  //#endregion
86
- export { RatingGroup$1 as RatingGroup };
97
+ export { RatingGroup$1 as RatingGroup, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext };
@@ -1,2 +1,2 @@
1
- import { RatingGroup, RatingGroupItemIndicatorProps, RatingGroupRootProps, RatingGroupRootProviderProps, RatingGroupSize } from "./RatingGroup.js";
2
- export { RatingGroup, type RatingGroupItemIndicatorProps, type RatingGroupRootProps, type RatingGroupRootProviderProps, type RatingGroupSize };
1
+ import { RatingGroup, RatingGroupItemIndicatorProps, RatingGroupRootProps, RatingGroupRootProviderProps, RatingGroupSize, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext } from "./RatingGroup.js";
2
+ export { RatingGroup, type RatingGroupItemIndicatorProps, type RatingGroupRootProps, type RatingGroupRootProviderProps, type RatingGroupSize, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext };
@@ -65,8 +65,8 @@
65
65
  user-select: none;
66
66
  touch-action: none;
67
67
  transition: opacity var(--scroll-area-transition, var(--transition-default)),
68
- width var(--scroll-area-transition, var(--transition-slow)),
69
- height var(--scroll-area-transition, var(--transition-slow));
68
+ width var(--scroll-area-thumb-hover-transition, var(--transition-fast)),
69
+ height var(--scroll-area-thumb-hover-transition, var(--transition-fast));
70
70
  justify-content: center;
71
71
  display: flex;
72
72
  position: absolute;
@@ -137,6 +137,11 @@
137
137
  &[data-scrolling] {
138
138
  transition-duration: 0s;
139
139
  }
140
+
141
+ .xqtLha_root[data-variant="always"] & {
142
+ opacity: var(--scroll-area-scrollbar-visible-opacity, 1);
143
+ pointer-events: auto;
144
+ }
140
145
  }
141
146
 
142
147
  .xqtLha_thumb {
@@ -4,9 +4,11 @@ import { ScrollArea } from "@ark-ui/react/scroll-area";
4
4
  //#region src/components/scroll-area/ScrollArea.d.ts
5
5
  type ModuixScrollAreaRootProps = ComponentProps<typeof ScrollArea.Root> & {
6
6
  fade?: boolean;
7
+ variant?: 'hover' | 'always';
7
8
  };
8
9
  type ModuixScrollAreaRootProviderProps = ComponentProps<typeof ScrollArea.RootProvider> & {
9
10
  fade?: boolean;
11
+ variant?: 'hover' | 'always';
10
12
  };
11
13
  declare const ScrollArea$1: import("react").ForwardRefExoticComponent<Omit<ModuixScrollAreaRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
12
14
  Root: import("react").ForwardRefExoticComponent<Omit<ModuixScrollAreaRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -16,6 +18,7 @@ declare const ScrollArea$1: import("react").ForwardRefExoticComponent<Omit<Modui
16
18
  Scrollbar: import("react").ForwardRefExoticComponent<Omit<ScrollArea.ScrollbarProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
17
19
  Thumb: import("react").ForwardRefExoticComponent<Omit<ScrollArea.ThumbProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
18
20
  Corner: import("react").ForwardRefExoticComponent<Omit<ScrollArea.CornerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
21
+ useScrollArea: (props?: import("@ark-ui/react/scroll-area").UseScrollAreaProps) => import("@ark-ui/react/scroll-area").UseScrollAreaReturn;
19
22
  };
20
23
  //#endregion
21
24
  export { type ModuixScrollAreaRootProps, type ModuixScrollAreaRootProviderProps, ScrollArea$1 as ScrollArea };
@@ -1,24 +1,26 @@
1
1
  import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
2
2
  import ScrollArea_module_default from "./ScrollArea.module.js";
3
- import { jsx } from "react/jsx-runtime";
4
3
  import { clsx } from "clsx";
5
4
  import { forwardRef } from "react";
6
- import { ScrollArea } from "@ark-ui/react/scroll-area";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { ScrollArea, useScrollArea } from "@ark-ui/react/scroll-area";
7
7
  //#region src/components/scroll-area/ScrollArea.tsx
8
- const ScrollAreaRoot = forwardRef(function ScrollAreaRoot({ className, fade, ...props }, ref) {
8
+ const ScrollAreaRoot = forwardRef(function ScrollAreaRoot({ className, fade, variant = "hover", ...props }, ref) {
9
9
  return /* @__PURE__ */ jsx(ScrollArea.Root, {
10
10
  ref,
11
11
  "data-slot": "scroll-area-root",
12
12
  "data-fade": fade ? "" : void 0,
13
+ "data-variant": variant,
13
14
  className: clsx(ScrollArea_module_default.root, normalizeClassName(className)),
14
15
  ...props
15
16
  });
16
17
  });
17
- const ScrollAreaRootProvider = forwardRef(function ScrollAreaRootProvider({ className, fade, ...props }, ref) {
18
+ const ScrollAreaRootProvider = forwardRef(function ScrollAreaRootProvider({ className, fade, variant = "hover", ...props }, ref) {
18
19
  return /* @__PURE__ */ jsx(ScrollArea.RootProvider, {
19
20
  ref,
20
21
  "data-slot": "scroll-area-root-provider",
21
22
  "data-fade": fade ? "" : void 0,
23
+ "data-variant": variant,
22
24
  className: clsx(ScrollArea_module_default.root, normalizeClassName(className)),
23
25
  ...props
24
26
  });
@@ -70,7 +72,8 @@ const ScrollArea$1 = Object.assign(ScrollAreaRoot, {
70
72
  Content: ScrollAreaContent,
71
73
  Scrollbar: ScrollAreaScrollbar,
72
74
  Thumb: ScrollAreaThumb,
73
- Corner: ScrollAreaCorner
75
+ Corner: ScrollAreaCorner,
76
+ useScrollArea
74
77
  });
75
78
  //#endregion
76
- export { ScrollArea$1 as ScrollArea };
79
+ export { ScrollArea$1 as ScrollArea, useScrollArea };
@@ -1,6 +1,16 @@
1
- import { SegmentGroup } from "@ark-ui/react/segment-group";
1
+ import { ReactNode } from "react";
2
+ import { SegmentGroup, useSegmentGroup } from "@ark-ui/react/segment-group";
2
3
 
3
4
  //#region src/components/segment-group/SegmentGroup.d.ts
5
+ declare function SegmentGroupItems({
6
+ items
7
+ }: {
8
+ items: readonly {
9
+ value: string;
10
+ label: ReactNode;
11
+ disabled?: boolean;
12
+ }[];
13
+ }): import("react").JSX.Element[];
4
14
  declare const SegmentGroup$1: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
5
15
  Root: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
6
16
  RootProvider: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.RootProviderProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -8,8 +18,8 @@ declare const SegmentGroup$1: import("react").ForwardRefExoticComponent<Omit<Seg
8
18
  Item: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.ItemProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
9
19
  ItemControl: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.ItemControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
10
20
  ItemText: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.ItemTextProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
11
- ItemHiddenInput: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.ItemHiddenInputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
12
21
  Indicator: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.IndicatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
22
+ Items: typeof SegmentGroupItems;
13
23
  };
14
24
  //#endregion
15
- export { SegmentGroup$1 as SegmentGroup };
25
+ export { SegmentGroup$1 as SegmentGroup, useSegmentGroup };
@@ -1,9 +1,9 @@
1
1
  import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
2
2
  import SegmentGroup_module_default from "./SegmentGroup.module.js";
3
- import { jsx } from "react/jsx-runtime";
4
3
  import { clsx } from "clsx";
5
- import { forwardRef } from "react";
6
- import { SegmentGroup } from "@ark-ui/react/segment-group";
4
+ import { Children, cloneElement, forwardRef } from "react";
5
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
+ import { SegmentGroup, useSegmentGroup } from "@ark-ui/react/segment-group";
7
7
  //#region src/components/segment-group/SegmentGroup.tsx
8
8
  const SegmentGroupRoot = forwardRef(function SegmentGroupRoot({ className, orientation = "horizontal", ...props }, ref) {
9
9
  return /* @__PURE__ */ jsx(SegmentGroup.Root, {
@@ -30,12 +30,14 @@ const SegmentGroupLabel = forwardRef(function SegmentGroupLabel({ className, ...
30
30
  ...props
31
31
  });
32
32
  });
33
- const SegmentGroupItem = forwardRef(function SegmentGroupItem({ className, ...props }, ref) {
33
+ const SegmentGroupItem = forwardRef(function SegmentGroupItem({ asChild, children, className, ...props }, ref) {
34
34
  return /* @__PURE__ */ jsx(SegmentGroup.Item, {
35
35
  ref,
36
+ asChild,
36
37
  "data-slot": "segment-group-item",
37
38
  className: clsx(SegmentGroup_module_default.item, normalizeClassName(className)),
38
- ...props
39
+ ...props,
40
+ children: withItemHiddenInput(children, asChild)
39
41
  });
40
42
  });
41
43
  const SegmentGroupItemControl = forwardRef(function SegmentGroupItemControl({ className, ...props }, ref) {
@@ -54,13 +56,12 @@ const SegmentGroupItemText = forwardRef(function SegmentGroupItemText({ classNam
54
56
  ...props
55
57
  });
56
58
  });
57
- const SegmentGroupItemHiddenInput = forwardRef(function SegmentGroupItemHiddenInput(props, ref) {
58
- return /* @__PURE__ */ jsx(SegmentGroup.ItemHiddenInput, {
59
- ref,
60
- "data-slot": "segment-group-item-hidden-input",
61
- ...props
62
- });
63
- });
59
+ function withItemHiddenInput(children, asChild) {
60
+ const hiddenInput = /* @__PURE__ */ jsx(SegmentGroup.ItemHiddenInput, { "data-slot": "segment-group-item-hidden-input" });
61
+ if (!asChild) return /* @__PURE__ */ jsxs(Fragment$1, { children: [children, hiddenInput] });
62
+ const child = Children.only(children);
63
+ return cloneElement(child, {}, child.props.children, hiddenInput);
64
+ }
64
65
  const SegmentGroupIndicator = forwardRef(function SegmentGroupIndicator({ className, ...props }, ref) {
65
66
  return /* @__PURE__ */ jsx(SegmentGroup.Indicator, {
66
67
  ref,
@@ -69,6 +70,13 @@ const SegmentGroupIndicator = forwardRef(function SegmentGroupIndicator({ classN
69
70
  ...props
70
71
  });
71
72
  });
73
+ function SegmentGroupItems({ items }) {
74
+ return items.map(({ value, label, disabled }) => /* @__PURE__ */ jsxs(SegmentGroupItem, {
75
+ value,
76
+ disabled,
77
+ children: [/* @__PURE__ */ jsx(SegmentGroupItemText, { children: label }), /* @__PURE__ */ jsx(SegmentGroupItemControl, {})]
78
+ }, value));
79
+ }
72
80
  const SegmentGroup$1 = Object.assign(SegmentGroupRoot, {
73
81
  Root: SegmentGroupRoot,
74
82
  RootProvider: SegmentGroupRootProvider,
@@ -76,8 +84,8 @@ const SegmentGroup$1 = Object.assign(SegmentGroupRoot, {
76
84
  Item: SegmentGroupItem,
77
85
  ItemControl: SegmentGroupItemControl,
78
86
  ItemText: SegmentGroupItemText,
79
- ItemHiddenInput: SegmentGroupItemHiddenInput,
80
- Indicator: SegmentGroupIndicator
87
+ Indicator: SegmentGroupIndicator,
88
+ Items: SegmentGroupItems
81
89
  });
82
90
  //#endregion
83
- export { SegmentGroup$1 as SegmentGroup };
91
+ export { SegmentGroup$1 as SegmentGroup, useSegmentGroup };
@@ -1,2 +1,2 @@
1
- import { SegmentGroup } from "./SegmentGroup.js";
2
- export { SegmentGroup };
1
+ import { SegmentGroup, useSegmentGroup } from "./SegmentGroup.js";
2
+ export { SegmentGroup, useSegmentGroup };
@@ -1,8 +1,10 @@
1
1
  @layer ui.components {
2
2
  @keyframes FGbIOa_select-content-open {
3
3
  from {
4
- opacity: var(--select-content-closed-opacity, 0);
5
- transform: scale(var(--select-content-closed-scale, var(--scale-popup)));
4
+ opacity: var(--select-content-closed-opacity, var(--popup-motion-starting-opacity, 0));
5
+ translate: var(--popup-motion-starting-translate-x, 0)
6
+ var(--popup-motion-starting-translate-y, 0);
7
+ transform: scale(var(--select-content-closed-scale, var(--popup-motion-starting-scale, var(--scale-popup))));
6
8
  }
7
9
 
8
10
  to {
@@ -18,8 +20,9 @@
18
20
  }
19
21
 
20
22
  to {
21
- opacity: var(--select-content-closed-opacity, 0);
22
- transform: scale(var(--select-content-closed-scale, var(--scale-popup)));
23
+ opacity: var(--select-content-closed-opacity, var(--popup-motion-ending-opacity, 0));
24
+ translate: var(--popup-motion-ending-translate-x, 0) var(--popup-motion-ending-translate-y, 0);
25
+ transform: scale(var(--select-content-closed-scale, var(--popup-motion-ending-scale, var(--scale-popup))));
23
26
  }
24
27
  }
25
28
 
@@ -145,7 +148,7 @@
145
148
  transform: translateY(-50%);
146
149
  }
147
150
 
148
- .FGbIOa_indicator, .FGbIOa_clearTrigger {
151
+ .FGbIOa_indicator {
149
152
  box-sizing: border-box;
150
153
  width: var(--select-action-size, 1.5rem);
151
154
  height: var(--select-action-size, 1.5rem);
@@ -184,16 +187,18 @@
184
187
  }
185
188
 
186
189
  .FGbIOa_clearTrigger {
187
- cursor: pointer;
190
+ --close-button-size: var(--select-action-size, 1.5rem);
191
+ --close-button-icon-size: var(--select-icon-size, 1rem);
192
+ --close-button-radius: var(--select-action-radius, var(--radius-sm));
193
+ --close-button-bg: var(--select-action-bg, transparent);
194
+ --close-button-bg-hover: var(--select-action-bg-hover, var(--color-muted));
195
+ --close-button-color: var(--select-icon-color, var(--color-muted-foreground));
196
+ --close-button-color-hover: var(--select-action-color-hover, var(--color-foreground));
197
+ --close-button-transition: var(--select-transition, var(--transition-default));
188
198
  pointer-events: auto;
189
199
 
190
- &:not(:is([disabled], [data-disabled])) {
191
- @media (hover: hover) {
192
- &:hover {
193
- background-color: var(--select-action-bg-hover, var(--color-muted));
194
- color: var(--select-action-color-hover, var(--color-foreground));
195
- }
196
- }
200
+ &[hidden] {
201
+ display: none;
197
202
  }
198
203
  }
199
204
 
@@ -224,11 +229,15 @@
224
229
  overflow: auto;
225
230
 
226
231
  &[data-state="open"] {
227
- animation: FGbIOa_select-content-open var(--select-transition, var(--transition-default));
232
+ animation: FGbIOa_select-content-open
233
+ var(--select-transition, var(--popup-motion-duration, var(--duration-normal))
234
+ var(--popup-motion-easing, var(--ease-in-out)));
228
235
  }
229
236
 
230
237
  &[data-state="closed"] {
231
- animation: FGbIOa_select-content-closed var(--select-transition, var(--transition-default));
238
+ animation: FGbIOa_select-content-closed
239
+ var(--select-transition, var(--popup-motion-duration, var(--duration-normal))
240
+ var(--popup-motion-easing, var(--ease-in-out)));
232
241
  pointer-events: none;
233
242
  }
234
243
  }