@wix/site-ui 1.347.0 → 1.349.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 (226) hide show
  1. package/dist/{6706.js → 1093.js} +3 -3
  2. package/dist/{8724.js → 1219.js} +2 -2
  3. package/dist/{7373.js → 1288.js} +8 -2
  4. package/dist/{5299.js → 1381.js} +98 -127
  5. package/dist/{3056.js → 1607.js} +32 -34
  6. package/dist/1629.js +2 -0
  7. package/dist/1669.js +75 -0
  8. package/dist/1718.js +26 -0
  9. package/dist/{1477.js → 201.js} +17 -26
  10. package/dist/2221.js +9 -0
  11. package/dist/{2445.js → 226.js} +12 -48
  12. package/dist/2387.js +7 -0
  13. package/dist/2580.js +6 -0
  14. package/dist/{1500.js → 2859.js} +10 -34
  15. package/dist/3014.js +178 -0
  16. package/dist/{6247.js → 3054.js} +3 -3
  17. package/dist/{7642.js → 3093.js} +1 -1
  18. package/dist/3189.js +5 -0
  19. package/dist/{7564.js → 331.js} +2 -2
  20. package/dist/3357.js +7 -0
  21. package/dist/{487.js → 3398.js} +38 -39
  22. package/dist/3502.js +224 -0
  23. package/dist/3695.js +50 -0
  24. package/dist/3829.js +1 -1
  25. package/dist/{6588.js → 3859.js} +115 -92
  26. package/dist/{3670.js → 3910.js} +28 -21
  27. package/dist/392.js +7 -0
  28. package/dist/{4549.js → 4155.js} +11 -3
  29. package/dist/4226.js +7 -0
  30. package/dist/{6329.js → 4229.js} +1 -1
  31. package/dist/4293.js +3 -0
  32. package/dist/4346.js +853 -2
  33. package/dist/{285.js → 4472.js} +3 -3
  34. package/dist/4605.js +207 -0
  35. package/dist/{7366.js → 488.js} +60 -7
  36. package/dist/{8750.js → 497.js} +190 -375
  37. package/dist/4989.js +35 -0
  38. package/dist/{6270.js → 510.js} +157 -196
  39. package/dist/5258.js +26 -0
  40. package/dist/{5036.js → 5275.js} +0 -3
  41. package/dist/{8171.js → 5298.js} +90 -102
  42. package/dist/5473.js +11 -0
  43. package/dist/{4745.js → 5490.js} +3 -1
  44. package/dist/{6089.js → 5561.js} +869 -786
  45. package/dist/{8996.js → 5595.js} +4 -3
  46. package/dist/5890.js +25 -0
  47. package/dist/{6046.js → 5969.js} +1 -1
  48. package/dist/5984.js +38 -0
  49. package/dist/{8527.js → 6006.js} +3 -3
  50. package/dist/6040.js +97 -0
  51. package/dist/{8758.js → 6137.js} +10 -8
  52. package/dist/{4281.js → 6140.js} +18 -10
  53. package/dist/{8960.js → 6191.js} +2 -2
  54. package/dist/6240.js +121 -0
  55. package/dist/{4490.js → 6373.js} +7 -5
  56. package/dist/{904.js → 6487.js} +19 -17
  57. package/dist/{9635.js → 6498.js} +1 -1
  58. package/dist/6499.js +4 -7
  59. package/dist/6508.js +7 -0
  60. package/dist/{8225.js → 6540.js} +1 -0
  61. package/dist/6551.js +46 -0
  62. package/dist/{9369.js → 6620.js} +35 -34
  63. package/dist/{4143.js → 6838.js} +19 -10
  64. package/dist/6902.js +48 -0
  65. package/dist/6904.js +51 -0
  66. package/dist/70.js +24 -0
  67. package/dist/7024.js +39 -0
  68. package/dist/{6882.js → 721.js} +737 -362
  69. package/dist/{951.js → 7270.js} +4 -4
  70. package/dist/{3485.js → 7323.js} +143 -111
  71. package/dist/{7541.js → 7488.js} +2 -2
  72. package/dist/{4863.js → 7542.js} +7 -6
  73. package/dist/7551.js +28 -0
  74. package/dist/{7021.js → 7640.js} +1 -1
  75. package/dist/{353.js → 7692.js} +3 -7
  76. package/dist/{4707.js → 7930.js} +2 -2
  77. package/dist/{8052.js → 8.js} +80 -64
  78. package/dist/{6914.js → 8129.js} +3 -15
  79. package/dist/{3319.js → 8358.js} +62 -63
  80. package/dist/{5864.js → 8407.js} +13 -13
  81. package/dist/8488.js +15 -0
  82. package/dist/{4768.js → 8495.js} +1 -1
  83. package/dist/8734.js +171 -0
  84. package/dist/{1763.js → 9018.js} +205 -331
  85. package/dist/9053.js +29 -0
  86. package/dist/9067.js +41 -0
  87. package/dist/{2861.js → 9120.js} +2 -2
  88. package/dist/{42.js → 9197.js} +2 -2
  89. package/dist/{9189.js → 9248.js} +36 -17
  90. package/dist/{2801.js → 9252.js} +4 -9
  91. package/dist/9295.js +7 -0
  92. package/dist/9303.js +8 -0
  93. package/dist/{167.js → 9374.js} +1 -1
  94. package/dist/{9352.js → 9540.js} +17 -47
  95. package/dist/9576.js +51 -0
  96. package/dist/{8272.js → 9591.js} +36 -46
  97. package/dist/{6107.js → 9770.js} +2 -2
  98. package/dist/{5085.js → 9880.js} +6 -3
  99. package/dist/Accordion/index.d.ts +207 -41
  100. package/dist/Accordion/index.js +75 -177
  101. package/dist/AlertDialog/index.d.ts +440 -140
  102. package/dist/AlertDialog/index.js +3 -13
  103. package/dist/Autocomplete/index.d.ts +722 -150
  104. package/dist/Autocomplete/index.js +16 -29
  105. package/dist/Avatar/index.d.ts +38 -3
  106. package/dist/Avatar/index.js +82 -28
  107. package/dist/Breadcrumbs/index.d.ts +63 -91
  108. package/dist/Breadcrumbs/index.js +1 -1
  109. package/dist/Button/index.d.ts +11 -0
  110. package/dist/Button/index.js +2 -2
  111. package/dist/Checkbox/index.d.ts +206 -36
  112. package/dist/Checkbox/index.js +293 -8
  113. package/dist/CheckboxField/index.css +1 -1
  114. package/dist/CheckboxField/index.d.ts +40 -36
  115. package/dist/CheckboxGroup/index.d.ts +50 -36
  116. package/dist/CheckboxGroup/index.js +87 -58
  117. package/dist/CheckboxGroupField/index.css +1 -1
  118. package/dist/Collapsible/index.d.ts +128 -36
  119. package/dist/Collapsible/index.js +21 -25
  120. package/dist/Combobox/index.d.ts +801 -158
  121. package/dist/Combobox/index.js +70 -114
  122. package/dist/ContextMenu/index.d.ts +1162 -195
  123. package/dist/ContextMenu/index.js +46 -36
  124. package/dist/Dialog/index.d.ts +425 -133
  125. package/dist/Dialog/index.js +8 -4
  126. package/dist/Drawer/index.d.ts +589 -144
  127. package/dist/Drawer/index.js +482 -562
  128. package/dist/Field/index.css +1 -1
  129. package/dist/Field/index.d.ts +341 -42
  130. package/dist/Field/index.js +123 -273
  131. package/dist/Fieldset/index.d.ts +11 -0
  132. package/dist/Fieldset/index.js +10 -17
  133. package/dist/Form/index.d.ts +43 -39
  134. package/dist/Form/index.js +58 -50
  135. package/dist/Input/index.css +1 -1
  136. package/dist/Input/index.d.ts +94 -42
  137. package/dist/Input/index.js +1 -1
  138. package/dist/Menu/index.d.ts +1140 -175
  139. package/dist/Menu/index.js +51 -67
  140. package/dist/Menubar/index.d.ts +651 -173
  141. package/dist/Menubar/index.js +12 -16
  142. package/dist/Meter/index.js +21 -18
  143. package/dist/NavigationMenu/index.d.ts +370 -86
  144. package/dist/NavigationMenu/index.js +144 -178
  145. package/dist/NumberField/index.css +1 -1
  146. package/dist/NumberField/index.d.ts +507 -47
  147. package/dist/NumberField/index.js +434 -718
  148. package/dist/Popover/index.d.ts +561 -142
  149. package/dist/Popover/index.js +181 -252
  150. package/dist/PreviewCard/index.d.ts +507 -143
  151. package/dist/PreviewCard/index.js +97 -151
  152. package/dist/Progress/index.d.ts +117 -3
  153. package/dist/Progress/index.js +37 -36
  154. package/dist/Radio/index.d.ts +177 -7
  155. package/dist/Radio/index.js +54 -70
  156. package/dist/RadioField/index.css +1 -1
  157. package/dist/RadioField/index.d.ts +23 -7
  158. package/dist/RadioGroup/index.d.ts +51 -37
  159. package/dist/RadioGroup/index.js +60 -51
  160. package/dist/RadioGroupField/index.css +1 -1
  161. package/dist/RadioGroupField/index.d.ts +40 -37
  162. package/dist/ScrollArea/index.d.ts +295 -1
  163. package/dist/ScrollArea/index.js +256 -324
  164. package/dist/Select/index.d.ts +516 -123
  165. package/dist/Select/index.js +513 -635
  166. package/dist/SelectField/index.css +1 -1
  167. package/dist/SelectField/index.d.ts +109 -134
  168. package/dist/SelectField/index.js +5 -1
  169. package/dist/Separator/index.d.ts +12 -0
  170. package/dist/Separator/index.js +1 -1
  171. package/dist/Slider/index.d.ts +383 -64
  172. package/dist/Slider/index.js +298 -374
  173. package/dist/Switch/index.d.ts +184 -37
  174. package/dist/Switch/index.js +44 -58
  175. package/dist/Tabs/index.d.ts +220 -35
  176. package/dist/Tabs/index.js +199 -193
  177. package/dist/Toast/index.d.ts +280 -64
  178. package/dist/Toast/index.js +299 -374
  179. package/dist/Toggle/index.d.ts +55 -35
  180. package/dist/Toggle/index.js +19 -13
  181. package/dist/ToggleGroup/index.d.ts +62 -35
  182. package/dist/ToggleGroup/index.js +13 -31
  183. package/dist/Toolbar/index.d.ts +117 -2
  184. package/dist/Toolbar/index.js +31 -43
  185. package/dist/Tooltip/index.d.ts +507 -150
  186. package/dist/Tooltip/index.js +163 -213
  187. package/dist/index.d.ts +12912 -5382
  188. package/package.json +3 -3
  189. package/dist/2205.js +0 -26
  190. package/dist/2274.js +0 -34
  191. package/dist/2287.js +0 -17
  192. package/dist/3020.js +0 -7
  193. package/dist/3021.js +0 -72
  194. package/dist/3140.js +0 -4
  195. package/dist/3248.js +0 -307
  196. package/dist/4026.js +0 -12
  197. package/dist/4922.js +0 -15
  198. package/dist/5659.js +0 -4
  199. package/dist/5992.js +0 -447
  200. package/dist/6330.js +0 -30
  201. package/dist/6535.js +0 -72
  202. package/dist/6917.js +0 -55
  203. package/dist/7725.js +0 -10
  204. package/dist/7871.js +0 -38
  205. package/dist/8106.js +0 -239
  206. package/dist/8685.js +0 -102
  207. package/dist/8935.js +0 -8
  208. package/dist/8971.js +0 -40
  209. package/dist/8979.js +0 -10
  210. package/dist/9048.js +0 -52
  211. package/dist/9087.js +0 -256
  212. package/dist/9255.js +0 -136
  213. /package/dist/{1457.js → 1068.js} +0 -0
  214. /package/dist/{6003.js → 1234.js} +0 -0
  215. /package/dist/{4723.js → 1282.js} +0 -0
  216. /package/dist/{6825.js → 1876.js} +0 -0
  217. /package/dist/{5778.js → 1885.js} +0 -0
  218. /package/dist/{2445.js.LICENSE.txt → 226.js.LICENSE.txt} +0 -0
  219. /package/dist/{1279.js → 3278.js} +0 -0
  220. /package/dist/{3296.js → 5568.js} +0 -0
  221. /package/dist/{8685.css → 6240.css} +0 -0
  222. /package/dist/{9829.js → 6488.js} +0 -0
  223. /package/dist/{9863.js → 6534.js} +0 -0
  224. /package/dist/{4495.js → 7718.js} +0 -0
  225. /package/dist/{3395.js → 8866.js} +0 -0
  226. /package/dist/{2418.js → 9837.js} +0 -0
@@ -65,15 +65,15 @@ declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E &
65
65
  readonly baseUIHandlerPrevented?: boolean | undefined;
66
66
  };
67
67
 
68
- declare const cancelOpen: "cancel-open";
68
+ declare const cancelOpen: 'cancel-open';
69
69
 
70
- declare const chipRemovePress: "chip-remove-press";
70
+ declare const chipRemovePress: 'chip-remove-press';
71
71
 
72
- declare const clearPress: "clear-press";
72
+ declare const clearPress: 'clear-press';
73
73
 
74
- declare const closePress: "close-press";
74
+ declare const closePress: 'close-press';
75
75
 
76
- declare const closeWatcher: "close-watcher";
76
+ declare const closeWatcher: 'close-watcher';
77
77
 
78
78
  /**
79
79
  * Shape of the render prop: a function that takes props to be spread on the element and component's state and returns a React element.
@@ -83,45 +83,50 @@ declare const closeWatcher: "close-watcher";
83
83
  */
84
84
  declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => React_2.ReactElement<unknown>;
85
85
 
86
- declare const decrementPress: "decrement-press";
86
+ declare const decrementPress: 'decrement-press';
87
87
 
88
- declare const disabled: "disabled";
88
+ declare const disabled: 'disabled';
89
89
 
90
- declare const drag: "drag";
90
+ /**
91
+ * Present when the toggle button is disabled.
92
+ */
93
+ declare const disabled_2 = "data-disabled";
94
+
95
+ declare const drag: 'drag';
91
96
 
92
- declare const escapeKey: "escape-key";
97
+ declare const escapeKey: 'escape-key';
93
98
 
94
- declare const focusOut: "focus-out";
99
+ declare const focusOut: 'focus-out';
95
100
 
96
101
  declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
97
102
  ref?: React_2.Ref<T> | undefined;
98
103
  };
99
104
 
100
- declare const imperativeAction: "imperative-action";
105
+ declare const imperativeAction: 'imperative-action';
101
106
 
102
- declare const incrementPress: "increment-press";
107
+ declare const incrementPress: 'increment-press';
103
108
 
104
- declare const initial: "initial";
109
+ declare const initial: 'initial';
105
110
 
106
- declare const inputBlur: "input-blur";
111
+ declare const inputBlur: 'input-blur';
107
112
 
108
- declare const inputChange: "input-change";
113
+ declare const inputChange: 'input-change';
109
114
 
110
- declare const inputClear: "input-clear";
115
+ declare const inputClear: 'input-clear';
111
116
 
112
- declare const inputPaste: "input-paste";
117
+ declare const inputPaste: 'input-paste';
113
118
 
114
- declare const inputPress: "input-press";
119
+ declare const inputPress: 'input-press';
115
120
 
116
- declare const itemPress: "item-press";
121
+ declare const itemPress: 'item-press';
117
122
 
118
- declare const keyboard: "keyboard";
123
+ declare const keyboard: 'keyboard';
119
124
 
120
- declare const linkPress: "link-press";
125
+ declare const linkPress: 'link-press';
121
126
 
122
- declare const listNavigation: "list-navigation";
127
+ declare const listNavigation: 'list-navigation';
123
128
 
124
- declare const missing: "missing";
129
+ declare const missing: 'missing';
125
130
 
126
131
  declare interface NativeButtonProps {
127
132
  /**
@@ -133,11 +138,18 @@ declare interface NativeButtonProps {
133
138
  nativeButton?: boolean | undefined;
134
139
  }
135
140
 
136
- declare const none: "none";
141
+ declare const none: 'none';
137
142
 
138
- declare const outsidePress: "outside-press";
143
+ declare const outsidePress: 'outside-press';
139
144
 
140
- declare const pointer: "pointer";
145
+ declare const pointer: 'pointer';
146
+
147
+ declare const popupClose: 'popup-close';
148
+
149
+ /**
150
+ * Present when the toggle button is pressed.
151
+ */
152
+ declare const pressed = "data-pressed";
141
153
 
142
154
  declare namespace REASONS {
143
155
  export {
@@ -168,6 +180,7 @@ declare namespace REASONS {
168
180
  drag,
169
181
  wheel,
170
182
  scrub,
183
+ popupClose,
171
184
  cancelOpen,
172
185
  siblingOpen,
173
186
  disabled,
@@ -222,11 +235,11 @@ declare interface ReasonToEventMap {
222
235
  [REASONS.windowResize]: UIEvent;
223
236
  }
224
237
 
225
- declare const scrub: "scrub";
238
+ declare const scrub: 'scrub';
226
239
 
227
- declare const siblingOpen: "sibling-open";
240
+ declare const siblingOpen: 'sibling-open';
228
241
 
229
- declare const swipe: "swipe";
242
+ declare const swipe: 'swipe';
230
243
 
231
244
  export declare const Toggle: React_2.ForwardRefExoticComponent<Omit<Omit<Toggle_2.Props<string> & React_2.RefAttributes<HTMLButtonElement>, "ref">, "className"> & {
232
245
  className?: string;
@@ -253,6 +266,13 @@ export declare type ToggleChangeEventDetails = BaseUIChangeEventDetails<Toggle_2
253
266
 
254
267
  export declare type ToggleChangeEventReason = typeof REASONS.none;
255
268
 
269
+ export declare namespace ToggleDataAttributes {
270
+ export {
271
+ pressed,
272
+ disabled_2 as disabled
273
+ }
274
+ }
275
+
256
276
  export declare interface ToggleProps<Value extends string> extends NativeButtonProps, BaseUIComponentProps<'button', ToggleState> {
257
277
  /**
258
278
  * Whether the toggle button is currently pressed.
@@ -292,17 +312,17 @@ export declare interface ToggleState {
292
312
  disabled: boolean;
293
313
  }
294
314
 
295
- declare const trackPress: "track-press";
315
+ declare const trackPress: 'track-press';
296
316
 
297
- declare const triggerFocus: "trigger-focus";
317
+ declare const triggerFocus: 'trigger-focus';
298
318
 
299
- declare const triggerHover: "trigger-hover";
319
+ declare const triggerHover: 'trigger-hover';
300
320
 
301
- declare const triggerPress: "trigger-press";
321
+ declare const triggerPress: 'trigger-press';
302
322
 
303
- declare const wheel: "wheel";
323
+ declare const wheel: 'wheel';
304
324
 
305
- declare const windowResize: "window-resize";
325
+ declare const windowResize: 'window-resize';
306
326
 
307
327
  /**
308
328
  * Adds a `preventBaseUIHandler` method to all event handlers.
@@ -1,23 +1,21 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
- import { useBaseUiId } from "../6046.js";
4
- import { useToggleGroupContext } from "../7725.js";
5
- import { useIsoLayoutEffect } from "../6499.js";
6
- import { error } from "../4026.js";
7
- import { useControlled } from "../8527.js";
8
- import { useButton } from "../9189.js";
9
- import { createChangeEventDetails } from "../4768.js";
10
- import { useRenderElement } from "../8272.js";
11
- import { CompositeItem } from "../951.js";
3
+ import { useBaseUiId } from "../5969.js";
4
+ import { useToggleGroupContext } from "../392.js";
5
+ import { error } from "../4293.js";
6
+ import { useControlled } from "../6006.js";
7
+ import { useButton } from "../9248.js";
8
+ import { createChangeEventDetails } from "../8495.js";
9
+ import { useRenderElement } from "../9591.js";
10
+ import { CompositeItem } from "../7270.js";
12
11
  import * as __rspack_external_react from "react";
13
12
  const Toggle_Toggle = /*#__PURE__*/ __rspack_external_react.forwardRef(function(componentProps, forwardedRef) {
14
- const { className, defaultPressed: defaultPressedProp = false, disabled: disabledProp = false, form, onPressedChange, pressed: pressedProp, render, type, value: valueProp, nativeButton = true, style, ...elementProps } = componentProps;
13
+ const { className, defaultPressed = false, disabled: disabledProp = false, form, onPressedChange, pressed: pressedProp, render, type, value: valueProp, nativeButton = true, style, ...elementProps } = componentProps;
15
14
  const value = useBaseUiId(valueProp || void 0);
16
15
  const groupContext = useToggleGroupContext();
17
16
  const groupValue = groupContext?.value ?? [];
18
- const defaultPressed = groupContext ? void 0 : defaultPressedProp;
19
17
  const disabled = (disabledProp || groupContext?.disabled) ?? false;
20
- if ('production' !== process.env.NODE_ENV) useIsoLayoutEffect(()=>{
18
+ if ('production' !== process.env.NODE_ENV) __rspack_external_react.useEffect(()=>{
21
19
  if (groupContext && void 0 === valueProp && groupContext.isValueInitialized) error('A `<Toggle>` component rendered in a `<ToggleGroup>` has no explicit `value` prop.', 'This will cause issues between the Toggle Group and Toggle values.', 'Provide the `<Toggle>` with a `value` prop matching the `<ToggleGroup>` values prop type.');
22
20
  }, [
23
21
  groupContext,
@@ -48,9 +46,10 @@ const Toggle_Toggle = /*#__PURE__*/ __rspack_external_react.forwardRef(function(
48
46
  onClick (event) {
49
47
  const nextPressed = !pressed;
50
48
  const details = createChangeEventDetails("none", event.nativeEvent);
51
- if (value) groupContext?.setGroupValue?.(value, nextPressed, details);
52
49
  onPressedChange?.(nextPressed, details);
53
50
  if (details.isCanceled) return;
51
+ if (value) groupContext?.setGroupValue?.(value, nextPressed, details);
52
+ if (details.isCanceled) return;
54
53
  setPressedState(nextPressed);
55
54
  }
56
55
  },
@@ -63,11 +62,18 @@ const Toggle_Toggle = /*#__PURE__*/ __rspack_external_react.forwardRef(function(
63
62
  ref: refs,
64
63
  props
65
64
  });
65
+ const itemMetadata = __rspack_external_react.useMemo(()=>({
66
+ disabled,
67
+ focusableWhenDisabled: false
68
+ }), [
69
+ disabled
70
+ ]);
66
71
  if (groupContext) return /*#__PURE__*/ jsx(CompositeItem, {
67
72
  tag: "button",
68
73
  render: render,
69
74
  className: className,
70
75
  style: style,
76
+ metadata: itemMetadata,
71
77
  state: state,
72
78
  refs: refs,
73
79
  props: props
@@ -65,15 +65,15 @@ declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E &
65
65
  readonly baseUIHandlerPrevented?: boolean | undefined;
66
66
  };
67
67
 
68
- declare const cancelOpen: "cancel-open";
68
+ declare const cancelOpen: 'cancel-open';
69
69
 
70
- declare const chipRemovePress: "chip-remove-press";
70
+ declare const chipRemovePress: 'chip-remove-press';
71
71
 
72
- declare const clearPress: "clear-press";
72
+ declare const clearPress: 'clear-press';
73
73
 
74
- declare const closePress: "close-press";
74
+ declare const closePress: 'close-press';
75
75
 
76
- declare const closeWatcher: "close-watcher";
76
+ declare const closeWatcher: 'close-watcher';
77
77
 
78
78
  /**
79
79
  * Shape of the render prop: a function that takes props to be spread on the element and component's state and returns a React element.
@@ -83,53 +83,71 @@ declare const closeWatcher: "close-watcher";
83
83
  */
84
84
  declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => React_2.ReactElement<unknown>;
85
85
 
86
- declare const decrementPress: "decrement-press";
86
+ declare const decrementPress: 'decrement-press';
87
87
 
88
- declare const disabled: "disabled";
88
+ declare const disabled: 'disabled';
89
89
 
90
- declare const drag: "drag";
90
+ /**
91
+ * Present when the toggle group is disabled.
92
+ */
93
+ declare const disabled_2 = "data-disabled";
91
94
 
92
- declare const escapeKey: "escape-key";
95
+ declare const drag: 'drag';
93
96
 
94
- declare const focusOut: "focus-out";
97
+ declare const escapeKey: 'escape-key';
98
+
99
+ declare const focusOut: 'focus-out';
95
100
 
96
101
  declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
97
102
  ref?: React_2.Ref<T> | undefined;
98
103
  };
99
104
 
100
- declare const imperativeAction: "imperative-action";
105
+ declare const imperativeAction: 'imperative-action';
101
106
 
102
- declare const incrementPress: "increment-press";
107
+ declare const incrementPress: 'increment-press';
103
108
 
104
- declare const initial: "initial";
109
+ declare const initial: 'initial';
105
110
 
106
- declare const inputBlur: "input-blur";
111
+ declare const inputBlur: 'input-blur';
107
112
 
108
- declare const inputChange: "input-change";
113
+ declare const inputChange: 'input-change';
109
114
 
110
- declare const inputClear: "input-clear";
115
+ declare const inputClear: 'input-clear';
111
116
 
112
- declare const inputPaste: "input-paste";
117
+ declare const inputPaste: 'input-paste';
113
118
 
114
- declare const inputPress: "input-press";
119
+ declare const inputPress: 'input-press';
115
120
 
116
- declare const itemPress: "item-press";
121
+ declare const itemPress: 'item-press';
117
122
 
118
- declare const keyboard: "keyboard";
123
+ declare const keyboard: 'keyboard';
119
124
 
120
- declare const linkPress: "link-press";
125
+ declare const linkPress: 'link-press';
121
126
 
122
- declare const listNavigation: "list-navigation";
127
+ declare const listNavigation: 'list-navigation';
123
128
 
124
- declare const missing: "missing";
129
+ declare const missing: 'missing';
125
130
 
126
- declare const none: "none";
131
+ /**
132
+ * Present when the toggle group allows multiple buttons to be in the pressed state at the same time.
133
+ */
134
+ declare const multiple = "data-multiple";
135
+
136
+ declare const none: 'none';
127
137
 
128
138
  declare type Orientation = 'horizontal' | 'vertical';
129
139
 
130
- declare const outsidePress: "outside-press";
140
+ /**
141
+ * Indicates the orientation of the toggle group.
142
+ * @type {'horizontal' | 'vertical'}
143
+ */
144
+ declare const orientation_2 = "data-orientation";
145
+
146
+ declare const outsidePress: 'outside-press';
131
147
 
132
- declare const pointer: "pointer";
148
+ declare const pointer: 'pointer';
149
+
150
+ declare const popupClose: 'popup-close';
133
151
 
134
152
  declare namespace REASONS {
135
153
  export {
@@ -160,6 +178,7 @@ declare namespace REASONS {
160
178
  drag,
161
179
  wheel,
162
180
  scrub,
181
+ popupClose,
163
182
  cancelOpen,
164
183
  siblingOpen,
165
184
  disabled,
@@ -214,11 +233,11 @@ declare interface ReasonToEventMap {
214
233
  [REASONS.windowResize]: UIEvent;
215
234
  }
216
235
 
217
- declare const scrub: "scrub";
236
+ declare const scrub: 'scrub';
218
237
 
219
- declare const siblingOpen: "sibling-open";
238
+ declare const siblingOpen: 'sibling-open';
220
239
 
221
- declare const swipe: "swipe";
240
+ declare const swipe: 'swipe';
222
241
 
223
242
  export declare const ToggleGroup: React_2.ForwardRefExoticComponent<Omit<Omit<ToggleGroup_2.Props<string> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
224
243
  className?: string;
@@ -244,6 +263,14 @@ export declare type ToggleGroupChangeEventDetails = BaseUIChangeEventDetails<Tog
244
263
 
245
264
  export declare type ToggleGroupChangeEventReason = typeof REASONS.none;
246
265
 
266
+ export declare namespace ToggleGroupDataAttributes {
267
+ export {
268
+ disabled_2 as disabled,
269
+ orientation_2 as orientation,
270
+ multiple
271
+ }
272
+ }
273
+
247
274
  export declare interface ToggleGroupProps<Value extends string> extends BaseUIComponentProps<'div', ToggleGroupState> {
248
275
  /**
249
276
  * The pressed state of the toggle group represented by an array of
@@ -303,17 +330,17 @@ export declare interface ToggleGroupState {
303
330
  orientation: Orientation;
304
331
  }
305
332
 
306
- declare const trackPress: "track-press";
333
+ declare const trackPress: 'track-press';
307
334
 
308
- declare const triggerFocus: "trigger-focus";
335
+ declare const triggerFocus: 'trigger-focus';
309
336
 
310
- declare const triggerHover: "trigger-hover";
337
+ declare const triggerHover: 'trigger-hover';
311
338
 
312
- declare const triggerPress: "trigger-press";
339
+ declare const triggerPress: 'trigger-press';
313
340
 
314
- declare const wheel: "wheel";
341
+ declare const wheel: 'wheel';
315
342
 
316
- declare const windowResize: "window-resize";
343
+ declare const windowResize: 'window-resize';
317
344
 
318
345
  /**
319
346
  * Adds a `preventBaseUIHandler` method to all event handlers.
@@ -1,37 +1,23 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
- import { useToolbarRootContext } from "../6107.js";
4
- import { useControlled } from "../8527.js";
5
- import { EMPTY_ARRAY, useRenderElement } from "../8272.js";
6
- import { useStableCallback } from "../7541.js";
7
- import { ToggleGroupContext } from "../7725.js";
8
- import { CompositeRoot } from "../9087.js";
3
+ import { useToolbarRootContext } from "../9770.js";
4
+ import { useToolbarGroupContext } from "../6508.js";
5
+ import { EMPTY_ARRAY, useRenderElement } from "../9591.js";
6
+ import { useControlled } from "../6006.js";
7
+ import { useStableCallback } from "../7488.js";
8
+ import { ToggleGroupContext } from "../392.js";
9
+ import { CompositeRoot } from "../3502.js";
9
10
  import * as __rspack_external_react from "react";
10
- let ToggleGroupDataAttributes_ToggleGroupDataAttributes = /*#__PURE__*/ function(ToggleGroupDataAttributes) {
11
- ToggleGroupDataAttributes["disabled"] = "data-disabled";
12
- ToggleGroupDataAttributes["orientation"] = "data-orientation";
13
- ToggleGroupDataAttributes["multiple"] = "data-multiple";
14
- return ToggleGroupDataAttributes;
15
- }({});
16
- const stateAttributesMapping = {
17
- multiple (value) {
18
- if (value) return {
19
- [ToggleGroupDataAttributes_ToggleGroupDataAttributes.multiple]: ''
20
- };
21
- return null;
22
- }
23
- };
24
11
  const ToggleGroup_ToggleGroup = /*#__PURE__*/ __rspack_external_react.forwardRef(function(componentProps, forwardedRef) {
25
12
  const { defaultValue: defaultValueProp, disabled: disabledProp = false, loopFocus = true, onValueChange, orientation = 'horizontal', multiple = false, value: valueProp, className, render, style, ...elementProps } = componentProps;
26
13
  const toolbarContext = useToolbarRootContext(true);
27
- const isValueInitialized = __rspack_external_react.useMemo(()=>void 0 !== valueProp || void 0 !== defaultValueProp, [
28
- valueProp,
29
- defaultValueProp
30
- ]);
31
- const disabled = (toolbarContext?.disabled ?? false) || disabledProp;
14
+ const toolbarGroupContext = useToolbarGroupContext();
15
+ const defaultValue = defaultValueProp ?? EMPTY_ARRAY;
16
+ const isValueInitialized = void 0 !== valueProp || void 0 !== defaultValueProp;
17
+ const disabled = (toolbarContext?.disabled ?? false) || (toolbarGroupContext?.disabled ?? false) || disabledProp;
32
18
  const [groupValue, setValueState] = useControlled({
33
19
  controlled: valueProp,
34
- default: void 0 === valueProp ? defaultValueProp ?? EMPTY_ARRAY : void 0,
20
+ default: defaultValue,
35
21
  name: 'ToggleGroup',
36
22
  state: 'value'
37
23
  });
@@ -55,13 +41,11 @@ const ToggleGroup_ToggleGroup = /*#__PURE__*/ __rspack_external_react.forwardRef
55
41
  };
56
42
  const contextValue = __rspack_external_react.useMemo(()=>({
57
43
  disabled,
58
- orientation,
59
44
  setGroupValue,
60
45
  value: groupValue,
61
46
  isValueInitialized
62
47
  }), [
63
48
  disabled,
64
- orientation,
65
49
  setGroupValue,
66
50
  groupValue,
67
51
  isValueInitialized
@@ -76,8 +60,7 @@ const ToggleGroup_ToggleGroup = /*#__PURE__*/ __rspack_external_react.forwardRef
76
60
  props: [
77
61
  defaultProps,
78
62
  elementProps
79
- ],
80
- stateAttributesMapping: stateAttributesMapping
63
+ ]
81
64
  });
82
65
  return /*#__PURE__*/ jsx(ToggleGroupContext.Provider, {
83
66
  value: contextValue,
@@ -93,7 +76,6 @@ const ToggleGroup_ToggleGroup = /*#__PURE__*/ __rspack_external_react.forwardRef
93
76
  defaultProps,
94
77
  elementProps
95
78
  ],
96
- stateAttributesMapping: stateAttributesMapping,
97
79
  loopFocus: loopFocus,
98
80
  enableHomeAndEndKeys: true,
99
81
  orientation: orientation
@@ -43,6 +43,36 @@ declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E &
43
43
  */
44
44
  declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => React_2.ReactElement<unknown>;
45
45
 
46
+ /**
47
+ * Present when the toolbar is disabled.
48
+ */
49
+ declare const disabled = "data-disabled";
50
+
51
+ /**
52
+ * Present when the group is disabled.
53
+ */
54
+ declare const disabled_2 = "data-disabled";
55
+
56
+ /**
57
+ * Present when the button is disabled.
58
+ */
59
+ declare const disabled_3 = "data-disabled";
60
+
61
+ /**
62
+ * Present when the input is disabled.
63
+ */
64
+ declare const disabled_4 = "data-disabled";
65
+
66
+ /**
67
+ * Present when the button remains focusable when disabled.
68
+ */
69
+ declare const focusable = "data-focusable";
70
+
71
+ /**
72
+ * Present when the input remains focusable when disabled.
73
+ */
74
+ declare const focusable_2 = "data-focusable";
75
+
46
76
  declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
47
77
  ref?: React_2.Ref<T> | undefined;
48
78
  };
@@ -59,6 +89,42 @@ declare interface NativeButtonProps {
59
89
 
60
90
  export declare type Orientation = 'horizontal' | 'vertical';
61
91
 
92
+ /**
93
+ * Indicates the orientation of the separator, which is perpendicular to the toolbar.
94
+ * @type {'horizontal' | 'vertical'}
95
+ */
96
+ declare const orientation_2 = "data-orientation";
97
+
98
+ /**
99
+ * Indicates the orientation of the toolbar.
100
+ * @type {'horizontal' | 'vertical'}
101
+ */
102
+ declare const orientation_3 = "data-orientation";
103
+
104
+ /**
105
+ * Indicates the orientation of the toolbar.
106
+ * @type {'horizontal' | 'vertical'}
107
+ */
108
+ declare const orientation_4 = "data-orientation";
109
+
110
+ /**
111
+ * Indicates the orientation of the toolbar.
112
+ * @type {'horizontal' | 'vertical'}
113
+ */
114
+ declare const orientation_5 = "data-orientation";
115
+
116
+ /**
117
+ * Indicates the orientation of the toolbar.
118
+ * @type {'horizontal' | 'vertical'}
119
+ */
120
+ declare const orientation_6 = "data-orientation";
121
+
122
+ /**
123
+ * Indicates the orientation of the toolbar.
124
+ * @type {'horizontal' | 'vertical'}
125
+ */
126
+ declare const orientation_7 = "data-orientation";
127
+
62
128
  /**
63
129
  * A separator element accessible to screen readers.
64
130
  * Renders a `<div>` element.
@@ -121,6 +187,14 @@ export declare namespace ToolbarButton {
121
187
  export type Props = ToolbarButtonProps;
122
188
  }
123
189
 
190
+ export declare namespace ToolbarButtonDataAttributes {
191
+ export {
192
+ disabled_3 as disabled,
193
+ orientation_5 as orientation,
194
+ focusable
195
+ }
196
+ }
197
+
124
198
  export declare interface ToolbarButtonProps extends NativeButtonProps, BaseUIComponentProps<'button', ToolbarButtonState> {
125
199
  /**
126
200
  * When `true` the item is disabled.
@@ -158,6 +232,13 @@ export declare namespace ToolbarGroup {
158
232
  export type Props = ToolbarGroupProps;
159
233
  }
160
234
 
235
+ export declare namespace ToolbarGroupDataAttributes {
236
+ export {
237
+ disabled_2 as disabled,
238
+ orientation_4 as orientation
239
+ }
240
+ }
241
+
161
242
  export declare interface ToolbarGroupProps extends BaseUIComponentProps<'div', ToolbarGroupState> {
162
243
  /**
163
244
  * When `true` all toolbar items in the group are disabled.
@@ -181,6 +262,14 @@ export declare namespace ToolbarInput {
181
262
  export type Props = ToolbarInputProps;
182
263
  }
183
264
 
265
+ export declare namespace ToolbarInputDataAttributes {
266
+ export {
267
+ disabled_4 as disabled,
268
+ orientation_7 as orientation,
269
+ focusable_2 as focusable
270
+ }
271
+ }
272
+
184
273
  export declare interface ToolbarInputProps extends BaseUIComponentProps<'input', ToolbarInputState> {
185
274
  /**
186
275
  * When `true` the item is disabled.
@@ -219,7 +308,13 @@ export declare namespace ToolbarLink {
219
308
  export type Props = ToolbarLinkProps;
220
309
  }
221
310
 
222
- export declare interface ToolbarLinkProps extends BaseUIComponentProps<'a', ToolbarLinkState> {}
311
+ export declare namespace ToolbarLinkDataAttributes {
312
+ export {
313
+ orientation_6 as orientation
314
+ }
315
+ }
316
+
317
+ export declare interface ToolbarLinkProps extends BaseUIComponentProps<'a', ToolbarLinkState, React_2.ComponentPropsWithRef<'a'>> {}
223
318
 
224
319
  export declare interface ToolbarLinkState {
225
320
  /**
@@ -243,7 +338,15 @@ export declare namespace ToolbarRoot {
243
338
  export type Props = ToolbarRootProps;
244
339
  }
245
340
 
341
+ export declare namespace ToolbarRootDataAttributes {
342
+ export {
343
+ disabled,
344
+ orientation_3 as orientation
345
+ }
346
+ }
347
+
246
348
  export declare interface ToolbarRootItemMetadata {
349
+ disabled: boolean;
247
350
  focusableWhenDisabled: boolean;
248
351
  }
249
352
 
@@ -288,7 +391,19 @@ export declare namespace ToolbarSeparator {
288
391
  export type Props = ToolbarSeparatorProps;
289
392
  }
290
393
 
291
- export declare interface ToolbarSeparatorProps extends BaseUIComponentProps<'div', ToolbarSeparatorState>, Separator.Props {}
394
+ export declare namespace ToolbarSeparatorDataAttributes {
395
+ export {
396
+ orientation_2 as orientation
397
+ }
398
+ }
399
+
400
+ export declare interface ToolbarSeparatorProps extends Separator.Props {
401
+ /**
402
+ * The orientation of the separator. Defaults to the opposite of the toolbar's
403
+ * orientation, so a horizontal toolbar renders vertical separators.
404
+ */
405
+ orientation?: Orientation | undefined;
406
+ }
292
407
 
293
408
  export declare interface ToolbarSeparatorState extends SeparatorState {}
294
409