@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
@@ -4,104 +4,103 @@ import { Steps, useSteps, useStepsContext, useStepsItemContext } from "@ark-ui/r
4
4
  import { clsx } from "clsx";
5
5
  import { forwardRef } from "react";
6
6
  import { CheckIcon } from "../../internal/icons/ui/index.js";
7
- import { normalizeClassName } from "../../internal/normalizeClassName.js";
8
7
  import Steps_module from "./Steps.module.js";
9
8
  const Steps_StepsRoot = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
10
9
  return /*#__PURE__*/ jsx(Steps.Root, {
11
10
  ref: ref,
12
- "data-slot": "steps-root",
13
- className: clsx(Steps_module.root, normalizeClassName(className)),
14
- ...props
11
+ className: clsx(Steps_module.root, className),
12
+ ...props,
13
+ "data-slot": "steps-root"
15
14
  });
16
15
  });
17
16
  const Steps_StepsRootProvider = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
18
17
  return /*#__PURE__*/ jsx(Steps.RootProvider, {
19
18
  ref: ref,
20
- "data-slot": "steps-root-provider",
21
- className: clsx(Steps_module.root, normalizeClassName(className)),
22
- ...props
19
+ className: clsx(Steps_module.root, className),
20
+ ...props,
21
+ "data-slot": "steps-root-provider"
23
22
  });
24
23
  });
25
24
  const Steps_StepsList = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
26
25
  return /*#__PURE__*/ jsx(Steps.List, {
27
26
  ref: ref,
28
- "data-slot": "steps-list",
29
- className: clsx(Steps_module.list, normalizeClassName(className)),
30
- ...props
27
+ className: clsx(Steps_module.list, className),
28
+ ...props,
29
+ "data-slot": "steps-list"
31
30
  });
32
31
  });
33
32
  const Steps_StepsItem = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
34
33
  return /*#__PURE__*/ jsx(Steps.Item, {
35
34
  ref: ref,
36
- "data-slot": "steps-item",
37
- className: clsx(Steps_module.item, normalizeClassName(className)),
38
- ...props
35
+ className: clsx(Steps_module.item, className),
36
+ ...props,
37
+ "data-slot": "steps-item"
39
38
  });
40
39
  });
41
40
  const Steps_StepsTrigger = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
42
41
  return /*#__PURE__*/ jsx(Steps.Trigger, {
43
42
  ref: ref,
44
- "data-slot": "steps-trigger",
45
- className: clsx(Steps_module.trigger, normalizeClassName(className)),
46
- ...props
43
+ className: clsx(Steps_module.trigger, className),
44
+ ...props,
45
+ "data-slot": "steps-trigger"
47
46
  });
48
47
  });
49
48
  const Steps_StepsIndicator = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, ref) {
50
49
  const item = useStepsItemContext();
51
50
  return /*#__PURE__*/ jsx(Steps.Indicator, {
52
51
  ref: ref,
53
- "data-slot": "steps-indicator",
54
- className: clsx(Steps_module.indicator, normalizeClassName(className)),
52
+ className: clsx(Steps_module.indicator, className),
55
53
  ...props,
54
+ "data-slot": "steps-indicator",
56
55
  children: children ?? (item.completed ? /*#__PURE__*/ jsx(CheckIcon, {}) : item.index + 1)
57
56
  });
58
57
  });
59
58
  const Steps_StepsSeparator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
60
59
  return /*#__PURE__*/ jsx(Steps.Separator, {
61
60
  ref: ref,
62
- "data-slot": "steps-separator",
63
- className: clsx(Steps_module.separator, normalizeClassName(className)),
64
- ...props
61
+ className: clsx(Steps_module.separator, className),
62
+ ...props,
63
+ "data-slot": "steps-separator"
65
64
  });
66
65
  });
67
66
  const Steps_StepsContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
68
67
  return /*#__PURE__*/ jsx(Steps.Content, {
69
68
  ref: ref,
70
- "data-slot": "steps-content",
71
- className: clsx(Steps_module.content, normalizeClassName(className)),
72
- ...props
69
+ className: clsx(Steps_module.content, className),
70
+ ...props,
71
+ "data-slot": "steps-content"
73
72
  });
74
73
  });
75
74
  const Steps_StepsCompletedContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
76
75
  return /*#__PURE__*/ jsx(Steps.CompletedContent, {
77
76
  ref: ref,
78
- "data-slot": "steps-completed-content",
79
- className: clsx(Steps_module.completedContent, normalizeClassName(className)),
80
- ...props
77
+ className: clsx(Steps_module.completedContent, className),
78
+ ...props,
79
+ "data-slot": "steps-completed-content"
81
80
  });
82
81
  });
83
82
  const Steps_StepsPrevTrigger = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
84
83
  return /*#__PURE__*/ jsx(Steps.PrevTrigger, {
85
84
  ref: ref,
86
- "data-slot": "steps-prev-trigger",
87
- className: clsx(Steps_module.prevTrigger, normalizeClassName(className)),
88
- ...props
85
+ className: clsx(Steps_module.prevTrigger, className),
86
+ ...props,
87
+ "data-slot": "steps-prev-trigger"
89
88
  });
90
89
  });
91
90
  const Steps_StepsNextTrigger = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
92
91
  return /*#__PURE__*/ jsx(Steps.NextTrigger, {
93
92
  ref: ref,
94
- "data-slot": "steps-next-trigger",
95
- className: clsx(Steps_module.nextTrigger, normalizeClassName(className)),
96
- ...props
93
+ className: clsx(Steps_module.nextTrigger, className),
94
+ ...props,
95
+ "data-slot": "steps-next-trigger"
97
96
  });
98
97
  });
99
98
  const Steps_StepsProgress = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
100
99
  return /*#__PURE__*/ jsx(Steps.Progress, {
101
100
  ref: ref,
102
- "data-slot": "steps-progress",
103
- className: clsx(Steps_module.progress, normalizeClassName(className)),
104
- ...props
101
+ className: clsx(Steps_module.progress, className),
102
+ ...props,
103
+ "data-slot": "steps-progress"
105
104
  });
106
105
  });
107
106
  const Steps_Steps = Object.assign(Steps_StepsRoot, {
@@ -19,7 +19,7 @@
19
19
  flex-direction: row;
20
20
  }
21
21
 
22
- @media (max-width: 40rem) {
22
+ @media (width <= 40rem) {
23
23
  .root-FkZrbo[data-orientation="vertical"] {
24
24
  gap: var(--moduix-steps-root-gap, var(--moduix-spacing-4));
25
25
  flex-direction: column;
@@ -45,11 +45,10 @@
45
45
  gap: var(--moduix-steps-gap, var(--moduix-spacing-4));
46
46
  flex-direction: column;
47
47
  flex: none;
48
- width: -moz-fit-content;
49
48
  width: fit-content;
50
49
  }
51
50
 
52
- @media (max-width: 40rem) {
51
+ @media (width <= 40rem) {
53
52
  .list-heLEy0[data-orientation="horizontal"] {
54
53
  scrollbar-width: thin;
55
54
  overflow-x: auto;
@@ -3,32 +3,31 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { Swap, useSwap, useSwapContext } from "@ark-ui/react/swap";
4
4
  import { clsx } from "clsx";
5
5
  import { forwardRef } from "react";
6
- import { normalizeClassName } from "../../internal/normalizeClassName.js";
7
6
  import Swap_module from "./Swap.module.js";
8
7
  const Swap_SwapRoot = /*#__PURE__*/ forwardRef(function({ animation = 'scale', className, ...props }, ref) {
9
8
  return /*#__PURE__*/ jsx(Swap.Root, {
10
9
  ref: ref,
11
- "data-slot": "swap-root",
12
10
  "data-animation": animation,
13
- className: clsx(Swap_module.root, normalizeClassName(className)),
14
- ...props
11
+ className: clsx(Swap_module.root, className),
12
+ ...props,
13
+ "data-slot": "swap-root"
15
14
  });
16
15
  });
17
16
  const Swap_SwapRootProvider = /*#__PURE__*/ forwardRef(function({ animation = 'scale', className, ...props }, ref) {
18
17
  return /*#__PURE__*/ jsx(Swap.RootProvider, {
19
18
  ref: ref,
20
- "data-slot": "swap-root-provider",
21
19
  "data-animation": animation,
22
- className: clsx(Swap_module.root, normalizeClassName(className)),
23
- ...props
20
+ className: clsx(Swap_module.root, className),
21
+ ...props,
22
+ "data-slot": "swap-root-provider"
24
23
  });
25
24
  });
26
25
  const Swap_SwapIndicator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
27
26
  return /*#__PURE__*/ jsx(Swap.Indicator, {
28
27
  ref: ref,
29
- "data-slot": "swap-indicator",
30
- className: clsx(Swap_module.indicator, normalizeClassName(className)),
31
- ...props
28
+ className: clsx(Swap_module.indicator, className),
29
+ ...props,
30
+ "data-slot": "swap-indicator"
32
31
  });
33
32
  });
34
33
  const Swap_Swap = Object.assign(Swap_SwapRoot, {
@@ -1,5 +1,5 @@
1
1
  import { Switch as SwitchPrimitive, useSwitch, useSwitchContext } from '@ark-ui/react/switch';
2
- import type { ComponentProps, ReactNode } from 'react';
2
+ import type { ComponentProps } from 'react';
3
3
  type SwitchSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
4
  type SwitchRootProps = ComponentProps<typeof SwitchPrimitive.Root> & {
5
5
  size?: SwitchSize;
@@ -10,10 +10,11 @@ type SwitchRootProviderProps = ComponentProps<typeof SwitchPrimitive.RootProvide
10
10
  declare const Switch: import("react").ForwardRefExoticComponent<Omit<SwitchRootProps, "ref"> & import("react").RefAttributes<HTMLLabelElement>> & {
11
11
  Root: import("react").ForwardRefExoticComponent<Omit<SwitchRootProps, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
12
12
  RootProvider: import("react").ForwardRefExoticComponent<Omit<SwitchRootProviderProps, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
13
+ HiddenInput: import("react").ForwardRefExoticComponent<SwitchPrimitive.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
13
14
  Control: import("react").ForwardRefExoticComponent<Omit<SwitchPrimitive.ControlProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
14
15
  Thumb: import("react").ForwardRefExoticComponent<Omit<SwitchPrimitive.ThumbProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
15
16
  Label: import("react").ForwardRefExoticComponent<Omit<SwitchPrimitive.LabelProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
16
- Context: (props: SwitchPrimitive.ContextProps) => ReactNode;
17
+ Context: (props: SwitchPrimitive.ContextProps) => import("react").ReactNode;
17
18
  };
18
19
  export { Switch, useSwitch, useSwitchContext };
19
20
  export type { SwitchRootProps, SwitchRootProviderProps, SwitchSize };
@@ -1,79 +1,56 @@
1
1
  "use client";
2
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { jsx } from "react/jsx-runtime";
3
3
  import { Switch, SwitchContext, useSwitch, useSwitchContext } from "@ark-ui/react/switch";
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 Switch_module from "./Switch.module.js";
8
- const Switch_SwitchRoot = /*#__PURE__*/ forwardRef(function({ asChild, children, className, size = 'md', ...props }, ref) {
7
+ const Switch_SwitchRoot = /*#__PURE__*/ forwardRef(function({ className, size = 'md', ...props }, ref) {
9
8
  return /*#__PURE__*/ jsx(Switch.Root, {
10
9
  ref: ref,
11
- asChild: asChild,
12
- "data-slot": "switch-root",
13
10
  "data-size": size,
14
- className: clsx(Switch_module.root, normalizeClassName(className)),
11
+ className: clsx(Switch_module.root, className),
15
12
  ...props,
16
- children: withHiddenInput(children, asChild)
13
+ "data-slot": "switch-root"
17
14
  });
18
15
  });
19
- const Switch_SwitchRootProvider = /*#__PURE__*/ forwardRef(function({ asChild, children, className, size = 'md', ...props }, ref) {
16
+ const Switch_SwitchRootProvider = /*#__PURE__*/ forwardRef(function({ className, size = 'md', ...props }, ref) {
20
17
  return /*#__PURE__*/ jsx(Switch.RootProvider, {
21
18
  ref: ref,
22
- asChild: asChild,
23
- "data-slot": "switch-root-provider",
24
19
  "data-size": size,
25
- className: clsx(Switch_module.root, normalizeClassName(className)),
20
+ className: clsx(Switch_module.root, className),
26
21
  ...props,
27
- children: withHiddenInput(children, asChild)
22
+ "data-slot": "switch-root-provider"
28
23
  });
29
24
  });
30
25
  const Switch_SwitchControl = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, ref) {
31
26
  return /*#__PURE__*/ jsx(Switch.Control, {
32
27
  ref: ref,
33
- "data-slot": "switch-control",
34
- className: clsx(Switch_module.control, normalizeClassName(className)),
28
+ className: clsx(Switch_module.control, className),
35
29
  ...props,
30
+ "data-slot": "switch-control",
36
31
  children: children ?? /*#__PURE__*/ jsx(Switch_SwitchThumb, {})
37
32
  });
38
33
  });
39
34
  const Switch_SwitchThumb = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
40
35
  return /*#__PURE__*/ jsx(Switch.Thumb, {
41
36
  ref: ref,
42
- "data-slot": "switch-thumb",
43
- className: clsx(Switch_module.thumb, normalizeClassName(className)),
44
- ...props
37
+ className: clsx(Switch_module.thumb, className),
38
+ ...props,
39
+ "data-slot": "switch-thumb"
45
40
  });
46
41
  });
47
42
  const Switch_SwitchLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
48
43
  return /*#__PURE__*/ jsx(Switch.Label, {
49
44
  ref: ref,
50
- "data-slot": "switch-label",
51
- className: clsx(Switch_module.label, normalizeClassName(className)),
52
- ...props
45
+ className: clsx(Switch_module.label, className),
46
+ ...props,
47
+ "data-slot": "switch-label"
53
48
  });
54
49
  });
55
- function withHiddenInput(children, asChild) {
56
- const hiddenInput = /*#__PURE__*/ jsx(SwitchHiddenInput, {});
57
- if (!asChild) return /*#__PURE__*/ jsxs(Fragment, {
58
- children: [
59
- children,
60
- hiddenInput
61
- ]
62
- });
63
- const child = Children.only(children);
64
- return /*#__PURE__*/ cloneElement(child, {}, child.props.children, hiddenInput);
65
- }
66
- function SwitchHiddenInput() {
67
- const switchApi = useSwitchContext();
68
- const readOnly = void 0 !== switchApi.getRootProps()['data-readonly'];
69
- return /*#__PURE__*/ jsx(Switch.HiddenInput, {
70
- "aria-readonly": readOnly || void 0,
71
- "data-slot": "switch-hidden-input"
72
- });
73
- }
74
50
  const Switch_Switch = Object.assign(Switch_SwitchRoot, {
75
51
  Root: Switch_SwitchRoot,
76
52
  RootProvider: Switch_SwitchRootProvider,
53
+ HiddenInput: Switch.HiddenInput,
77
54
  Control: Switch_SwitchControl,
78
55
  Thumb: Switch_SwitchThumb,
79
56
  Label: Switch_SwitchLabel,
@@ -4,7 +4,6 @@
4
4
  gap: var(--moduix-switch-gap, var(--moduix-spacing-2));
5
5
  vertical-align: middle;
6
6
  cursor: pointer;
7
- width: -moz-fit-content;
8
7
  width: fit-content;
9
8
  display: inline-flex;
10
9
  }
@@ -1,22 +1,22 @@
1
1
  declare const Table: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
2
2
  interactive?: boolean;
3
3
  showColumnBorder?: boolean;
4
- size?: "sm" | "md" | "lg";
4
+ size?: 'sm' | 'md' | 'lg';
5
5
  stickyHeader?: boolean;
6
6
  striped?: boolean;
7
- variant?: "line" | "outline";
7
+ variant?: 'line' | 'outline';
8
8
  } & import("react").RefAttributes<HTMLTableElement>> & {
9
9
  Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
10
10
  interactive?: boolean;
11
11
  showColumnBorder?: boolean;
12
- size?: "sm" | "md" | "lg";
12
+ size?: 'sm' | 'md' | 'lg';
13
13
  stickyHeader?: boolean;
14
14
  striped?: boolean;
15
- variant?: "line" | "outline";
15
+ variant?: 'line' | 'outline';
16
16
  } & import("react").RefAttributes<HTMLTableElement>>;
17
17
  ScrollArea: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLDivElement>>;
18
18
  Caption: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
19
- side?: "top" | "bottom";
19
+ side?: 'top' | 'bottom';
20
20
  } & import("react").RefAttributes<HTMLTableCaptionElement>>;
21
21
  ColumnGroup: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLTableColElement>>;
22
22
  Column: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
@@ -2,7 +2,6 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { ark } from "@ark-ui/react/factory";
3
3
  import { clsx } from "clsx";
4
4
  import { forwardRef } from "react";
5
- import { normalizeClassName } from "../../internal/normalizeClassName.js";
6
5
  import Table_module from "./Table.module.js";
7
6
  const Table_TableRoot = /*#__PURE__*/ forwardRef(function({ asChild, className, interactive = false, showColumnBorder = false, size = 'md', stickyHeader = false, striped = false, variant = 'line', ...props }, ref) {
8
7
  return /*#__PURE__*/ jsx(ark.table, {
@@ -10,15 +9,15 @@ const Table_TableRoot = /*#__PURE__*/ forwardRef(function({ asChild, className,
10
9
  asChild: asChild,
11
10
  "data-scope": "table",
12
11
  "data-part": "root",
13
- "data-slot": "table-root",
14
12
  "data-interactive": interactive || void 0,
15
13
  "data-show-column-border": showColumnBorder || void 0,
16
14
  "data-size": size,
17
15
  "data-sticky-header": stickyHeader || void 0,
18
16
  "data-striped": striped || void 0,
19
17
  "data-variant": variant,
20
- className: clsx(Table_module.root, normalizeClassName(className)),
21
- ...props
18
+ className: clsx(Table_module.root, className),
19
+ ...props,
20
+ "data-slot": "table-root"
22
21
  });
23
22
  });
24
23
  const Table_TableScrollArea = /*#__PURE__*/ forwardRef(function({ asChild, className, ...props }, ref) {
@@ -27,9 +26,9 @@ const Table_TableScrollArea = /*#__PURE__*/ forwardRef(function({ asChild, class
27
26
  asChild: asChild,
28
27
  "data-scope": "table",
29
28
  "data-part": "scroll-area",
30
- "data-slot": "table-scroll-area",
31
- className: clsx(Table_module.scrollArea, normalizeClassName(className)),
32
- ...props
29
+ className: clsx(Table_module.scrollArea, className),
30
+ ...props,
31
+ "data-slot": "table-scroll-area"
33
32
  });
34
33
  });
35
34
  const Table_TableCaption = /*#__PURE__*/ forwardRef(function({ asChild, className, side = 'bottom', ...props }, ref) {
@@ -39,9 +38,9 @@ const Table_TableCaption = /*#__PURE__*/ forwardRef(function({ asChild, classNam
39
38
  "data-scope": "table",
40
39
  "data-part": "caption",
41
40
  "data-side": side,
42
- "data-slot": "table-caption",
43
- className: clsx(Table_module.caption, normalizeClassName(className)),
44
- ...props
41
+ className: clsx(Table_module.caption, className),
42
+ ...props,
43
+ "data-slot": "table-caption"
45
44
  });
46
45
  });
47
46
  const Table_TableColumnGroup = /*#__PURE__*/ forwardRef(function({ asChild, className, ...props }, ref) {
@@ -50,9 +49,9 @@ const Table_TableColumnGroup = /*#__PURE__*/ forwardRef(function({ asChild, clas
50
49
  asChild: asChild,
51
50
  "data-scope": "table",
52
51
  "data-part": "column-group",
53
- "data-slot": "table-column-group",
54
- className: normalizeClassName(className),
55
- ...props
52
+ className: className,
53
+ ...props,
54
+ "data-slot": "table-column-group"
56
55
  });
57
56
  });
58
57
  const Table_TableColumn = /*#__PURE__*/ forwardRef(function({ asChild, className, htmlWidth, width, ...props }, ref) {
@@ -61,10 +60,10 @@ const Table_TableColumn = /*#__PURE__*/ forwardRef(function({ asChild, className
61
60
  asChild: asChild,
62
61
  "data-scope": "table",
63
62
  "data-part": "column",
64
- "data-slot": "table-column",
65
63
  width: htmlWidth ?? width,
66
- className: normalizeClassName(className),
67
- ...props
64
+ className: className,
65
+ ...props,
66
+ "data-slot": "table-column"
68
67
  });
69
68
  });
70
69
  const Table_TableHeader = /*#__PURE__*/ forwardRef(function({ asChild, className, ...props }, ref) {
@@ -73,9 +72,9 @@ const Table_TableHeader = /*#__PURE__*/ forwardRef(function({ asChild, className
73
72
  asChild: asChild,
74
73
  "data-scope": "table",
75
74
  "data-part": "header",
76
- "data-slot": "table-header",
77
- className: clsx(Table_module.header, normalizeClassName(className)),
78
- ...props
75
+ className: clsx(Table_module.header, className),
76
+ ...props,
77
+ "data-slot": "table-header"
79
78
  });
80
79
  });
81
80
  const Table_TableBody = /*#__PURE__*/ forwardRef(function({ asChild, className, ...props }, ref) {
@@ -84,9 +83,9 @@ const Table_TableBody = /*#__PURE__*/ forwardRef(function({ asChild, className,
84
83
  asChild: asChild,
85
84
  "data-scope": "table",
86
85
  "data-part": "body",
87
- "data-slot": "table-body",
88
- className: clsx(Table_module.body, normalizeClassName(className)),
89
- ...props
86
+ className: clsx(Table_module.body, className),
87
+ ...props,
88
+ "data-slot": "table-body"
90
89
  });
91
90
  });
92
91
  const Table_TableFooter = /*#__PURE__*/ forwardRef(function({ asChild, className, ...props }, ref) {
@@ -95,9 +94,9 @@ const Table_TableFooter = /*#__PURE__*/ forwardRef(function({ asChild, className
95
94
  asChild: asChild,
96
95
  "data-scope": "table",
97
96
  "data-part": "footer",
98
- "data-slot": "table-footer",
99
- className: clsx(Table_module.footer, normalizeClassName(className)),
100
- ...props
97
+ className: clsx(Table_module.footer, className),
98
+ ...props,
99
+ "data-slot": "table-footer"
101
100
  });
102
101
  });
103
102
  const Table_TableRow = /*#__PURE__*/ forwardRef(function({ asChild, className, ...props }, ref) {
@@ -106,9 +105,9 @@ const Table_TableRow = /*#__PURE__*/ forwardRef(function({ asChild, className, .
106
105
  asChild: asChild,
107
106
  "data-scope": "table",
108
107
  "data-part": "row",
109
- "data-slot": "table-row",
110
- className: clsx(Table_module.row, normalizeClassName(className)),
111
- ...props
108
+ className: clsx(Table_module.row, className),
109
+ ...props,
110
+ "data-slot": "table-row"
112
111
  });
113
112
  });
114
113
  const Table_TableColumnHeader = /*#__PURE__*/ forwardRef(function({ asChild, className, numeric = false, ...props }, ref) {
@@ -118,9 +117,9 @@ const Table_TableColumnHeader = /*#__PURE__*/ forwardRef(function({ asChild, cla
118
117
  "data-scope": "table",
119
118
  "data-part": "column-header",
120
119
  "data-numeric": numeric || void 0,
121
- "data-slot": "table-column-header",
122
- className: clsx(Table_module.columnHeader, numeric && Table_module.numeric, normalizeClassName(className)),
123
- ...props
120
+ className: clsx(Table_module.columnHeader, numeric && Table_module.numeric, className),
121
+ ...props,
122
+ "data-slot": "table-column-header"
124
123
  });
125
124
  });
126
125
  const Table_TableCell = /*#__PURE__*/ forwardRef(function({ asChild, className, numeric = false, ...props }, ref) {
@@ -130,9 +129,9 @@ const Table_TableCell = /*#__PURE__*/ forwardRef(function({ asChild, className,
130
129
  "data-scope": "table",
131
130
  "data-part": "cell",
132
131
  "data-numeric": numeric || void 0,
133
- "data-slot": "table-cell",
134
- className: clsx(Table_module.cell, numeric && Table_module.numeric, normalizeClassName(className)),
135
- ...props
132
+ className: clsx(Table_module.cell, numeric && Table_module.numeric, className),
133
+ ...props,
134
+ "data-slot": "table-cell"
136
135
  });
137
136
  });
138
137
  const Table_TableEmpty = /*#__PURE__*/ forwardRef(function({ asChild, children = 'No results.', className, colSpan, ...props }, ref) {
@@ -147,10 +146,10 @@ const Table_TableEmpty = /*#__PURE__*/ forwardRef(function({ asChild, children =
147
146
  asChild: asChild,
148
147
  "data-scope": "table",
149
148
  "data-part": "empty",
150
- "data-slot": "table-empty",
151
149
  colSpan: colSpan,
152
- className: clsx(Table_module.cell, Table_module.empty, normalizeClassName(className)),
150
+ className: clsx(Table_module.cell, Table_module.empty, className),
153
151
  ...props,
152
+ "data-slot": "table-empty",
154
153
  children: children
155
154
  })
156
155
  });
@@ -3,17 +3,16 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { Tabs, useTabs, useTabsContext } from "@ark-ui/react/tabs";
4
4
  import { clsx } from "clsx";
5
5
  import { forwardRef } from "react";
6
- import { normalizeClassName } from "../../internal/normalizeClassName.js";
7
6
  import Tabs_module from "./Tabs.module.js";
8
7
  const Tabs_TabsRoot = /*#__PURE__*/ forwardRef(function({ className, orientation, variant = 'default', ...props }, ref) {
9
8
  const resolvedVariant = 'vertical' === orientation ? 'default' : variant;
10
9
  return /*#__PURE__*/ jsx(Tabs.Root, {
11
10
  ref: ref,
12
- "data-slot": "tabs-root",
13
11
  "data-variant": resolvedVariant,
14
- className: clsx(Tabs_module.root, normalizeClassName(className)),
12
+ className: clsx(Tabs_module.root, className),
15
13
  orientation: orientation,
16
- ...props
14
+ ...props,
15
+ "data-slot": "tabs-root"
17
16
  });
18
17
  });
19
18
  const Tabs_TabsRootProvider = /*#__PURE__*/ forwardRef(function({ className, value, variant = 'default', ...props }, ref) {
@@ -21,43 +20,43 @@ const Tabs_TabsRootProvider = /*#__PURE__*/ forwardRef(function({ className, val
21
20
  const resolvedVariant = 'vertical' === orientation ? 'default' : variant;
22
21
  return /*#__PURE__*/ jsx(Tabs.RootProvider, {
23
22
  ref: ref,
24
- "data-slot": "tabs-root-provider",
25
23
  "data-variant": resolvedVariant,
26
- className: clsx(Tabs_module.root, normalizeClassName(className)),
24
+ className: clsx(Tabs_module.root, className),
27
25
  value: value,
28
- ...props
26
+ ...props,
27
+ "data-slot": "tabs-root-provider"
29
28
  });
30
29
  });
31
30
  const Tabs_TabsList = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
32
31
  return /*#__PURE__*/ jsx(Tabs.List, {
33
32
  ref: ref,
34
- "data-slot": "tabs-list",
35
- className: clsx(Tabs_module.list, normalizeClassName(className)),
36
- ...props
33
+ className: clsx(Tabs_module.list, className),
34
+ ...props,
35
+ "data-slot": "tabs-list"
37
36
  });
38
37
  });
39
38
  const Tabs_TabsTrigger = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
40
39
  return /*#__PURE__*/ jsx(Tabs.Trigger, {
41
40
  ref: ref,
42
- "data-slot": "tabs-trigger",
43
- className: clsx(Tabs_module.trigger, normalizeClassName(className)),
44
- ...props
41
+ className: clsx(Tabs_module.trigger, className),
42
+ ...props,
43
+ "data-slot": "tabs-trigger"
45
44
  });
46
45
  });
47
46
  const Tabs_TabsIndicator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
48
47
  return /*#__PURE__*/ jsx(Tabs.Indicator, {
49
48
  ref: ref,
50
- "data-slot": "tabs-indicator",
51
- className: clsx(Tabs_module.indicator, normalizeClassName(className)),
52
- ...props
49
+ className: clsx(Tabs_module.indicator, className),
50
+ ...props,
51
+ "data-slot": "tabs-indicator"
53
52
  });
54
53
  });
55
54
  const Tabs_TabsContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
56
55
  return /*#__PURE__*/ jsx(Tabs.Content, {
57
56
  ref: ref,
58
- "data-slot": "tabs-content",
59
- className: clsx(Tabs_module.content, normalizeClassName(className)),
60
- ...props
57
+ className: clsx(Tabs_module.content, className),
58
+ ...props,
59
+ "data-slot": "tabs-content"
61
60
  });
62
61
  });
63
62
  const Tabs_Tabs = Object.assign(Tabs_TabsRoot, {