@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,7 +4,6 @@ import { Dialog, useDialog, useDialogContext } from "@ark-ui/react/dialog";
4
4
  import { ark } from "@ark-ui/react/factory";
5
5
  import { clsx } from "clsx";
6
6
  import { forwardRef } from "react";
7
- import { normalizeClassName } from "../../internal/normalizeClassName.js";
8
7
  import { OverlayPortal, OverlayPortalProvider } from "../../internal/overlayPortal.js";
9
8
  import { CloseButton } from "../close-button/index.js";
10
9
  import Dialog_module from "./Dialog.module.js";
@@ -35,18 +34,18 @@ const Dialog_DialogTrigger = /*#__PURE__*/ forwardRef(function({ asChild, classN
35
34
  return /*#__PURE__*/ jsx(Dialog.Trigger, {
36
35
  ref: ref,
37
36
  asChild: asChild,
38
- "data-slot": "dialog-trigger",
39
- className: clsx(!asChild && Dialog_module.trigger, normalizeClassName(className)),
40
- ...props
37
+ className: clsx(!asChild && Dialog_module.trigger, className),
38
+ ...props,
39
+ "data-slot": "dialog-trigger"
41
40
  });
42
41
  });
43
42
  const Dialog_DialogBackdrop = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
44
43
  return /*#__PURE__*/ jsx(OverlayPortal, {
45
44
  children: /*#__PURE__*/ jsx(Dialog.Backdrop, {
46
45
  ref: ref,
47
- "data-slot": "dialog-backdrop",
48
- className: clsx(Dialog_module.backdrop, normalizeClassName(className)),
49
- ...props
46
+ className: clsx(Dialog_module.backdrop, className),
47
+ ...props,
48
+ "data-slot": "dialog-backdrop"
50
49
  })
51
50
  });
52
51
  });
@@ -54,43 +53,43 @@ const Dialog_DialogPositioner = /*#__PURE__*/ forwardRef(function({ className, .
54
53
  return /*#__PURE__*/ jsx(OverlayPortal, {
55
54
  children: /*#__PURE__*/ jsx(Dialog.Positioner, {
56
55
  ref: ref,
57
- "data-slot": "dialog-positioner",
58
- className: clsx(Dialog_module.positioner, normalizeClassName(className)),
59
- ...props
56
+ className: clsx(Dialog_module.positioner, className),
57
+ ...props,
58
+ "data-slot": "dialog-positioner"
60
59
  })
61
60
  });
62
61
  });
63
62
  const Dialog_DialogContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
64
63
  return /*#__PURE__*/ jsx(Dialog.Content, {
65
64
  ref: ref,
66
- "data-slot": "dialog-content",
67
- className: clsx(Dialog_module.content, normalizeClassName(className)),
68
- ...props
65
+ className: clsx(Dialog_module.content, className),
66
+ ...props,
67
+ "data-slot": "dialog-content"
69
68
  });
70
69
  });
71
70
  const Dialog_DialogTitle = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
72
71
  return /*#__PURE__*/ jsx(Dialog.Title, {
73
72
  ref: ref,
74
- "data-slot": "dialog-title",
75
- className: clsx(Dialog_module.title, normalizeClassName(className)),
76
- ...props
73
+ className: clsx(Dialog_module.title, className),
74
+ ...props,
75
+ "data-slot": "dialog-title"
77
76
  });
78
77
  });
79
78
  const Dialog_DialogDescription = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
80
79
  return /*#__PURE__*/ jsx(Dialog.Description, {
81
80
  ref: ref,
82
- "data-slot": "dialog-description",
83
- className: clsx(Dialog_module.description, normalizeClassName(className)),
84
- ...props
81
+ className: clsx(Dialog_module.description, className),
82
+ ...props,
83
+ "data-slot": "dialog-description"
85
84
  });
86
85
  });
87
86
  const Dialog_DialogCloseTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, ...props }, ref) {
88
87
  return /*#__PURE__*/ jsx(Dialog.CloseTrigger, {
89
88
  ref: ref,
90
89
  asChild: asChild,
91
- "data-slot": "dialog-close-trigger",
92
- className: clsx(!asChild && Dialog_module.closeTrigger, normalizeClassName(className)),
93
- ...props
90
+ className: clsx(!asChild && Dialog_module.closeTrigger, className),
91
+ ...props,
92
+ "data-slot": "dialog-close-trigger"
94
93
  });
95
94
  });
96
95
  const Dialog_DialogCloseIcon = /*#__PURE__*/ forwardRef(function({ className, children, 'aria-label': ariaLabel = DEFAULT_CLOSE_BUTTON_LABEL, ...props }, ref) {
@@ -101,7 +100,7 @@ const Dialog_DialogCloseIcon = /*#__PURE__*/ forwardRef(function({ className, ch
101
100
  ref: ref,
102
101
  "data-slot": "dialog-close-icon",
103
102
  "aria-label": ariaLabel,
104
- className: clsx(Dialog_module.closeIcon, normalizeClassName(className)),
103
+ className: clsx(Dialog_module.closeIcon, className),
105
104
  children: children
106
105
  })
107
106
  });
@@ -109,25 +108,25 @@ const Dialog_DialogCloseIcon = /*#__PURE__*/ forwardRef(function({ className, ch
109
108
  const Dialog_DialogHeader = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
110
109
  return /*#__PURE__*/ jsx(ark.div, {
111
110
  ref: ref,
112
- "data-slot": "dialog-header",
113
- className: clsx(Dialog_module.header, normalizeClassName(className)),
114
- ...props
111
+ className: clsx(Dialog_module.header, className),
112
+ ...props,
113
+ "data-slot": "dialog-header"
115
114
  });
116
115
  });
117
116
  const Dialog_DialogBody = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
118
117
  return /*#__PURE__*/ jsx(ark.div, {
119
118
  ref: ref,
120
- "data-slot": "dialog-body",
121
- className: clsx(Dialog_module.body, normalizeClassName(className)),
122
- ...props
119
+ className: clsx(Dialog_module.body, className),
120
+ ...props,
121
+ "data-slot": "dialog-body"
123
122
  });
124
123
  });
125
124
  const Dialog_DialogFooter = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
126
125
  return /*#__PURE__*/ jsx(ark.div, {
127
126
  ref: ref,
128
- "data-slot": "dialog-footer",
129
- className: clsx(Dialog_module.footer, normalizeClassName(className)),
130
- ...props
127
+ className: clsx(Dialog_module.footer, className),
128
+ ...props,
129
+ "data-slot": "dialog-footer"
131
130
  });
132
131
  });
133
132
  const Dialog_Dialog = Object.assign(DialogRoot, {
@@ -1,12 +1,15 @@
1
1
  import { Drawer as DrawerPrimitive, useDrawer, useDrawerContext, useDrawerStackContext } from '@ark-ui/react/drawer';
2
2
  import type { ComponentProps } from 'react';
3
- import { type OverlayPortalProps } from '../../internal/overlayPortal';
4
- type DrawerRootProps = ComponentProps<typeof DrawerPrimitive.Root> & OverlayPortalProps;
3
+ import { type OverlayPortalProps } from '../../internal/overlayPortal.js';
4
+ type DrawerVariant = 'island';
5
+ type DrawerRootProps = ComponentProps<typeof DrawerPrimitive.Root> & OverlayPortalProps & {
6
+ variant?: DrawerVariant;
7
+ };
5
8
  type DrawerRootProviderProps = ComponentProps<typeof DrawerPrimitive.RootProvider> & OverlayPortalProps;
6
9
  type DrawerContentProps = ComponentProps<typeof DrawerPrimitive.Content> & {
7
10
  variant?: 'island';
8
11
  };
9
- declare function DrawerRoot({ lazyMount, portalled, portalRef, unmountOnExit, ...props }: DrawerRootProps): import("react").JSX.Element;
12
+ declare function DrawerRoot({ lazyMount, portalled, portalRef, unmountOnExit, variant, swipeDirection, snapPoints, defaultSnapPoint, ...props }: DrawerRootProps): import("react").JSX.Element;
10
13
  declare function DrawerRootProvider({ lazyMount, portalled, portalRef, unmountOnExit, ...props }: DrawerRootProviderProps): import("react").JSX.Element;
11
14
  declare const Drawer: typeof DrawerRoot & {
12
15
  Root: typeof DrawerRoot;
@@ -3,20 +3,28 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { Drawer, useDrawer, useDrawerContext, useDrawerStackContext } from "@ark-ui/react/drawer";
4
4
  import { ark } from "@ark-ui/react/factory";
5
5
  import { clsx } from "clsx";
6
- import { forwardRef } from "react";
7
- import { normalizeClassName } from "../../internal/normalizeClassName.js";
6
+ import { createContext, forwardRef, useContext } from "react";
8
7
  import { OverlayPortal, OverlayPortalProvider } from "../../internal/overlayPortal.js";
9
8
  import { CloseButton } from "../close-button/index.js";
10
9
  import Drawer_module from "./Drawer.module.js";
11
10
  const DEFAULT_CLOSE_BUTTON_LABEL = 'Close drawer';
12
- function DrawerRoot({ lazyMount = true, portalled, portalRef, unmountOnExit = true, ...props }) {
11
+ const DrawerVariantContext = /*#__PURE__*/ createContext(void 0);
12
+ function DrawerRoot({ lazyMount = true, portalled, portalRef, unmountOnExit = true, variant, swipeDirection, snapPoints, defaultSnapPoint, ...props }) {
13
13
  return /*#__PURE__*/ jsx(OverlayPortalProvider, {
14
14
  portalled: portalled,
15
15
  portalRef: portalRef,
16
- children: /*#__PURE__*/ jsx(Drawer.Root, {
17
- lazyMount: lazyMount,
18
- unmountOnExit: unmountOnExit,
19
- ...props
16
+ children: /*#__PURE__*/ jsx(DrawerVariantContext.Provider, {
17
+ value: variant,
18
+ children: /*#__PURE__*/ jsx(Drawer.Root, {
19
+ ...props,
20
+ lazyMount: lazyMount,
21
+ unmountOnExit: unmountOnExit,
22
+ swipeDirection: swipeDirection,
23
+ snapPoints: snapPoints ?? ('island' === variant ? [
24
+ 1
25
+ ] : void 0),
26
+ defaultSnapPoint: void 0 !== defaultSnapPoint ? defaultSnapPoint : 'island' === variant ? 1 : void 0
27
+ })
20
28
  })
21
29
  });
22
30
  }
@@ -36,18 +44,18 @@ const Drawer_DrawerTrigger = /*#__PURE__*/ forwardRef(function({ asChild, classN
36
44
  return /*#__PURE__*/ jsx(Drawer.Trigger, {
37
45
  ref: ref,
38
46
  asChild: asChild,
39
- "data-slot": "drawer-trigger",
40
- className: clsx(!asChild && Drawer_module.trigger, normalizeClassName(className)),
41
- ...props
47
+ className: clsx(!asChild && Drawer_module.trigger, className),
48
+ ...props,
49
+ "data-slot": "drawer-trigger"
42
50
  });
43
51
  });
44
52
  const Drawer_DrawerBackdrop = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
45
53
  return /*#__PURE__*/ jsx(OverlayPortal, {
46
54
  children: /*#__PURE__*/ jsx(Drawer.Backdrop, {
47
55
  ref: ref,
48
- "data-slot": "drawer-backdrop",
49
- className: clsx(Drawer_module.backdrop, normalizeClassName(className)),
50
- ...props
56
+ className: clsx(Drawer_module.backdrop, className),
57
+ ...props,
58
+ "data-slot": "drawer-backdrop"
51
59
  })
52
60
  });
53
61
  });
@@ -55,60 +63,61 @@ const Drawer_DrawerPositioner = /*#__PURE__*/ forwardRef(function({ className, .
55
63
  return /*#__PURE__*/ jsx(OverlayPortal, {
56
64
  children: /*#__PURE__*/ jsx(Drawer.Positioner, {
57
65
  ref: ref,
58
- "data-slot": "drawer-positioner",
59
- className: clsx(Drawer_module.positioner, normalizeClassName(className)),
60
- ...props
66
+ className: clsx(Drawer_module.positioner, className),
67
+ ...props,
68
+ "data-slot": "drawer-positioner"
61
69
  })
62
70
  });
63
71
  });
64
72
  const Drawer_DrawerContent = /*#__PURE__*/ forwardRef(function({ className, variant, ...props }, ref) {
73
+ const rootVariant = useContext(DrawerVariantContext);
65
74
  return /*#__PURE__*/ jsx(Drawer.Content, {
66
75
  ref: ref,
67
- "data-slot": "drawer-content",
68
- "data-variant": variant,
69
- className: clsx(Drawer_module.content, normalizeClassName(className)),
70
- ...props
76
+ "data-variant": variant ?? rootVariant,
77
+ className: clsx(Drawer_module.content, className),
78
+ ...props,
79
+ "data-slot": "drawer-content"
71
80
  });
72
81
  });
73
82
  const Drawer_DrawerGrabber = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
74
83
  return /*#__PURE__*/ jsx(Drawer.Grabber, {
75
84
  ref: ref,
76
- "data-slot": "drawer-grabber",
77
- className: clsx(Drawer_module.grabber, normalizeClassName(className)),
78
- ...props
85
+ className: clsx(Drawer_module.grabber, className),
86
+ ...props,
87
+ "data-slot": "drawer-grabber"
79
88
  });
80
89
  });
81
90
  const Drawer_DrawerGrabberIndicator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
82
91
  return /*#__PURE__*/ jsx(Drawer.GrabberIndicator, {
83
92
  ref: ref,
84
- "data-slot": "drawer-grabber-indicator",
85
- className: clsx(Drawer_module.grabberIndicator, normalizeClassName(className)),
86
- ...props
93
+ className: clsx(Drawer_module.grabberIndicator, className),
94
+ ...props,
95
+ "data-slot": "drawer-grabber-indicator"
87
96
  });
88
97
  });
89
98
  const Drawer_DrawerTitle = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
90
99
  return /*#__PURE__*/ jsx(Drawer.Title, {
91
100
  ref: ref,
92
- "data-slot": "drawer-title",
93
- className: clsx(Drawer_module.title, normalizeClassName(className)),
94
- ...props
101
+ className: clsx(Drawer_module.title, className),
102
+ ...props,
103
+ "data-slot": "drawer-title"
95
104
  });
96
105
  });
97
106
  const Drawer_DrawerDescription = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
98
107
  return /*#__PURE__*/ jsx(Drawer.Description, {
99
108
  ref: ref,
100
- "data-slot": "drawer-description",
101
- className: clsx(Drawer_module.description, normalizeClassName(className)),
102
- ...props
109
+ className: clsx(Drawer_module.description, className),
110
+ ...props,
111
+ "data-slot": "drawer-description"
103
112
  });
104
113
  });
105
114
  const Drawer_DrawerCloseTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, ...props }, ref) {
106
115
  return /*#__PURE__*/ jsx(Drawer.CloseTrigger, {
107
116
  ref: ref,
108
117
  asChild: asChild,
109
- "data-slot": "drawer-close-trigger",
110
- className: clsx(!asChild && Drawer_module.closeTrigger, normalizeClassName(className)),
111
- ...props
118
+ className: clsx(!asChild && Drawer_module.closeTrigger, className),
119
+ ...props,
120
+ "data-slot": "drawer-close-trigger"
112
121
  });
113
122
  });
114
123
  const Drawer_DrawerCloseIcon = /*#__PURE__*/ forwardRef(function({ className, children, 'aria-label': ariaLabel = DEFAULT_CLOSE_BUTTON_LABEL, ...props }, ref) {
@@ -119,7 +128,7 @@ const Drawer_DrawerCloseIcon = /*#__PURE__*/ forwardRef(function({ className, ch
119
128
  ref: ref,
120
129
  "data-slot": "drawer-close-icon",
121
130
  "aria-label": ariaLabel,
122
- className: clsx(Drawer_module.closeIcon, normalizeClassName(className)),
131
+ className: clsx(Drawer_module.closeIcon, className),
123
132
  children: children
124
133
  })
125
134
  });
@@ -127,49 +136,49 @@ const Drawer_DrawerCloseIcon = /*#__PURE__*/ forwardRef(function({ className, ch
127
136
  const Drawer_DrawerSwipeArea = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
128
137
  return /*#__PURE__*/ jsx(Drawer.SwipeArea, {
129
138
  ref: ref,
130
- "data-slot": "drawer-swipe-area",
131
- className: clsx(Drawer_module.swipeArea, normalizeClassName(className)),
132
- ...props
139
+ className: clsx(Drawer_module.swipeArea, className),
140
+ ...props,
141
+ "data-slot": "drawer-swipe-area"
133
142
  });
134
143
  });
135
144
  const Drawer_DrawerIndent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
136
145
  return /*#__PURE__*/ jsx(Drawer.Indent, {
137
146
  ref: ref,
138
- "data-slot": "drawer-indent",
139
- className: clsx(Drawer_module.indent, normalizeClassName(className)),
140
- ...props
147
+ className: clsx(Drawer_module.indent, className),
148
+ ...props,
149
+ "data-slot": "drawer-indent"
141
150
  });
142
151
  });
143
152
  const Drawer_DrawerIndentBackground = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
144
153
  return /*#__PURE__*/ jsx(Drawer.IndentBackground, {
145
154
  ref: ref,
146
- "data-slot": "drawer-indent-background",
147
- className: clsx(Drawer_module.indentBackground, normalizeClassName(className)),
148
- ...props
155
+ className: clsx(Drawer_module.indentBackground, className),
156
+ ...props,
157
+ "data-slot": "drawer-indent-background"
149
158
  });
150
159
  });
151
160
  const Drawer_DrawerHeader = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
152
161
  return /*#__PURE__*/ jsx(ark.div, {
153
162
  ref: ref,
154
- "data-slot": "drawer-header",
155
- className: clsx(Drawer_module.header, normalizeClassName(className)),
156
- ...props
163
+ className: clsx(Drawer_module.header, className),
164
+ ...props,
165
+ "data-slot": "drawer-header"
157
166
  });
158
167
  });
159
168
  const Drawer_DrawerBody = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
160
169
  return /*#__PURE__*/ jsx(ark.div, {
161
170
  ref: ref,
162
- "data-slot": "drawer-body",
163
- className: clsx(Drawer_module.body, normalizeClassName(className)),
164
- ...props
171
+ className: clsx(Drawer_module.body, className),
172
+ ...props,
173
+ "data-slot": "drawer-body"
165
174
  });
166
175
  });
167
176
  const Drawer_DrawerFooter = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
168
177
  return /*#__PURE__*/ jsx(ark.div, {
169
178
  ref: ref,
170
- "data-slot": "drawer-footer",
171
- className: clsx(Drawer_module.footer, normalizeClassName(className)),
172
- ...props
179
+ className: clsx(Drawer_module.footer, className),
180
+ ...props,
181
+ "data-slot": "drawer-footer"
173
182
  });
174
183
  });
175
184
  const Drawer_Drawer = Object.assign(DrawerRoot, {
@@ -10,7 +10,7 @@ declare const Editable: import("react").ForwardRefExoticComponent<Omit<EditableP
10
10
  EditTrigger: import("react").ForwardRefExoticComponent<Omit<EditablePrimitive.EditTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
11
11
  SubmitTrigger: import("react").ForwardRefExoticComponent<Omit<EditablePrimitive.SubmitTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
12
12
  CancelTrigger: import("react").ForwardRefExoticComponent<Omit<EditablePrimitive.CancelTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
13
- Controls: import("react").ForwardRefExoticComponent<Omit<Omit<EditablePrimitive.ControlProps & import("react").RefAttributes<HTMLDivElement>, "children" | "asChild">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
13
+ Controls: import("react").ForwardRefExoticComponent<Omit<Omit<EditablePrimitive.ControlProps & import("react").RefAttributes<HTMLDivElement>, "asChild" | "children">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
14
14
  Context: (props: EditablePrimitive.ContextProps) => import("react").ReactNode;
15
15
  };
16
16
  export { Editable, useEditable, useEditableContext };
@@ -4,89 +4,88 @@ import { Editable, useEditable, useEditableContext } from "@ark-ui/react/editabl
4
4
  import { clsx } from "clsx";
5
5
  import { forwardRef } from "react";
6
6
  import { CheckIcon, CloseIcon, PencilIcon } from "../../internal/icons/ui/index.js";
7
- import { normalizeClassName } from "../../internal/normalizeClassName.js";
8
7
  import Editable_module from "./Editable.module.js";
9
8
  const Editable_EditableRoot = /*#__PURE__*/ forwardRef(function({ activationMode = 'dblclick', className, ...props }, ref) {
10
9
  return /*#__PURE__*/ jsx(Editable.Root, {
11
10
  ref: ref,
12
- "data-slot": "editable-root",
13
11
  activationMode: activationMode,
14
- className: clsx(Editable_module.root, normalizeClassName(className)),
15
- ...props
12
+ className: clsx(Editable_module.root, className),
13
+ ...props,
14
+ "data-slot": "editable-root"
16
15
  });
17
16
  });
18
17
  const Editable_EditableRootProvider = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
19
18
  return /*#__PURE__*/ jsx(Editable.RootProvider, {
20
19
  ref: ref,
21
- "data-slot": "editable-root-provider",
22
- className: clsx(Editable_module.root, normalizeClassName(className)),
23
- ...props
20
+ className: clsx(Editable_module.root, className),
21
+ ...props,
22
+ "data-slot": "editable-root-provider"
24
23
  });
25
24
  });
26
25
  const Editable_EditableLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
27
26
  return /*#__PURE__*/ jsx(Editable.Label, {
28
27
  ref: ref,
29
- "data-slot": "editable-label",
30
- className: clsx(Editable_module.label, normalizeClassName(className)),
31
- ...props
28
+ className: clsx(Editable_module.label, className),
29
+ ...props,
30
+ "data-slot": "editable-label"
32
31
  });
33
32
  });
34
33
  const Editable_EditableArea = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
35
34
  return /*#__PURE__*/ jsx(Editable.Area, {
36
35
  ref: ref,
37
- "data-slot": "editable-area",
38
- className: clsx(Editable_module.area, normalizeClassName(className)),
39
- ...props
36
+ className: clsx(Editable_module.area, className),
37
+ ...props,
38
+ "data-slot": "editable-area"
40
39
  });
41
40
  });
42
41
  const Editable_EditableInput = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
43
42
  return /*#__PURE__*/ jsx(Editable.Input, {
44
43
  ref: ref,
45
- "data-slot": "editable-input",
46
- className: clsx(Editable_module.input, normalizeClassName(className)),
47
- ...props
44
+ className: clsx(Editable_module.input, className),
45
+ ...props,
46
+ "data-slot": "editable-input"
48
47
  });
49
48
  });
50
49
  const Editable_EditablePreview = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
51
50
  return /*#__PURE__*/ jsx(Editable.Preview, {
52
51
  ref: ref,
53
- "data-slot": "editable-preview",
54
- className: clsx(Editable_module.preview, normalizeClassName(className)),
55
- ...props
52
+ className: clsx(Editable_module.preview, className),
53
+ ...props,
54
+ "data-slot": "editable-preview"
56
55
  });
57
56
  });
58
57
  const Editable_EditableControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
59
58
  return /*#__PURE__*/ jsx(Editable.Control, {
60
59
  ref: ref,
61
- "data-slot": "editable-control",
62
- className: clsx(Editable_module.control, normalizeClassName(className)),
63
- ...props
60
+ className: clsx(Editable_module.control, className),
61
+ ...props,
62
+ "data-slot": "editable-control"
64
63
  });
65
64
  });
66
65
  const Editable_EditableEditTrigger = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, ref) {
67
66
  return /*#__PURE__*/ jsx(Editable.EditTrigger, {
68
67
  ref: ref,
69
- "data-slot": "editable-edit-trigger",
70
- className: clsx(Editable_module.trigger, normalizeClassName(className)),
68
+ className: clsx(Editable_module.trigger, className),
71
69
  ...props,
70
+ "data-slot": "editable-edit-trigger",
72
71
  children: children ?? /*#__PURE__*/ jsx(PencilIcon, {})
73
72
  });
74
73
  });
75
74
  const Editable_EditableSubmitTrigger = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, ref) {
76
75
  return /*#__PURE__*/ jsx(Editable.SubmitTrigger, {
77
76
  ref: ref,
78
- "data-slot": "editable-submit-trigger",
79
- className: clsx(Editable_module.trigger, normalizeClassName(className)),
77
+ className: clsx(Editable_module.trigger, className),
80
78
  ...props,
79
+ "data-slot": "editable-submit-trigger",
81
80
  children: children ?? /*#__PURE__*/ jsx(CheckIcon, {})
82
81
  });
83
82
  });
84
83
  const Editable_EditableCancelTrigger = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, ref) {
85
84
  return /*#__PURE__*/ jsx(Editable.CancelTrigger, {
86
85
  ref: ref,
87
- "data-slot": "editable-cancel-trigger",
88
- className: clsx(Editable_module.trigger, normalizeClassName(className)),
86
+ className: clsx(Editable_module.trigger, className),
89
87
  ...props,
88
+ "data-slot": "editable-cancel-trigger",
90
89
  children: children ?? /*#__PURE__*/ jsx(CloseIcon, {})
91
90
  });
92
91
  });
@@ -2,66 +2,65 @@ 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 Empty_module from "./Empty.module.js";
7
6
  const Empty_EmptyRoot = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
8
7
  return /*#__PURE__*/ jsx(ark.div, {
9
8
  ref: ref,
9
+ ...props,
10
10
  "data-scope": "empty",
11
11
  "data-part": "root",
12
- "data-slot": "empty-root",
13
- className: clsx(Empty_module.root, normalizeClassName(className)),
14
- ...props
12
+ className: clsx(Empty_module.root, className),
13
+ "data-slot": "empty-root"
15
14
  });
16
15
  });
17
16
  const Empty_EmptyIcon = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
18
17
  return /*#__PURE__*/ jsx(ark.div, {
19
18
  ref: ref,
19
+ ...props,
20
20
  "data-scope": "empty",
21
21
  "data-part": "icon",
22
- "data-slot": "empty-icon",
23
- className: clsx(Empty_module.icon, normalizeClassName(className)),
24
- ...props
22
+ className: clsx(Empty_module.icon, className),
23
+ "data-slot": "empty-icon"
25
24
  });
26
25
  });
27
26
  const Empty_EmptyContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
28
27
  return /*#__PURE__*/ jsx(ark.div, {
29
28
  ref: ref,
29
+ ...props,
30
30
  "data-scope": "empty",
31
31
  "data-part": "content",
32
- "data-slot": "empty-content",
33
- className: clsx(Empty_module.content, normalizeClassName(className)),
34
- ...props
32
+ className: clsx(Empty_module.content, className),
33
+ "data-slot": "empty-content"
35
34
  });
36
35
  });
37
36
  const Empty_EmptyTitle = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
38
37
  return /*#__PURE__*/ jsx(ark.h3, {
39
38
  ref: ref,
39
+ ...props,
40
40
  "data-scope": "empty",
41
41
  "data-part": "title",
42
- "data-slot": "empty-title",
43
- className: clsx(Empty_module.title, normalizeClassName(className)),
44
- ...props
42
+ className: clsx(Empty_module.title, className),
43
+ "data-slot": "empty-title"
45
44
  });
46
45
  });
47
46
  const Empty_EmptyDescription = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
48
47
  return /*#__PURE__*/ jsx(ark.div, {
49
48
  ref: ref,
49
+ ...props,
50
50
  "data-scope": "empty",
51
51
  "data-part": "description",
52
- "data-slot": "empty-description",
53
- className: clsx(Empty_module.description, normalizeClassName(className)),
54
- ...props
52
+ className: clsx(Empty_module.description, className),
53
+ "data-slot": "empty-description"
55
54
  });
56
55
  });
57
56
  const Empty_EmptyActions = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
58
57
  return /*#__PURE__*/ jsx(ark.div, {
59
58
  ref: ref,
59
+ ...props,
60
60
  "data-scope": "empty",
61
61
  "data-part": "actions",
62
- "data-slot": "empty-actions",
63
- className: clsx(Empty_module.actions, normalizeClassName(className)),
64
- ...props
62
+ className: clsx(Empty_module.actions, className),
63
+ "data-slot": "empty-actions"
65
64
  });
66
65
  });
67
66
  const Empty = Object.assign(Empty_EmptyRoot, {