@doist/reactist 24.2.0-beta → 25.0.0-beta.1

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 (144) hide show
  1. package/dist/reactist.cjs.development.js +336 -261
  2. package/dist/reactist.cjs.development.js.map +1 -1
  3. package/dist/reactist.cjs.production.min.js +1 -1
  4. package/dist/reactist.cjs.production.min.js.map +1 -1
  5. package/es/avatar/avatar.js.map +1 -1
  6. package/es/banner/banner.js.map +1 -1
  7. package/es/box/box.js +94 -19
  8. package/es/box/box.js.map +1 -1
  9. package/es/button/button.js +93 -18
  10. package/es/button/button.js.map +1 -1
  11. package/es/button/button.module.css.js +4 -0
  12. package/es/button/button.module.css.js.map +1 -0
  13. package/es/checkbox-field/checkbox-field.js.map +1 -1
  14. package/es/components/deprecated-dropdown/dropdown.js.map +1 -1
  15. package/es/components/deprecated-input/input.js +5 -1
  16. package/es/components/deprecated-input/input.js.map +1 -1
  17. package/es/heading/heading.js.map +1 -1
  18. package/es/index.js +2 -3
  19. package/es/index.js.map +1 -1
  20. package/es/loading/loading.js.map +1 -1
  21. package/es/menu/menu.js +56 -34
  22. package/es/menu/menu.js.map +1 -1
  23. package/es/modal/modal.js +18 -16
  24. package/es/modal/modal.js.map +1 -1
  25. package/es/password-field/password-field.js +2 -2
  26. package/es/password-field/password-field.js.map +1 -1
  27. package/es/prose/prose.js.map +1 -1
  28. package/es/select-field/select-field.js.map +1 -1
  29. package/es/switch-field/switch-field.js.map +1 -1
  30. package/es/tabs/tabs.js +26 -32
  31. package/es/tabs/tabs.js.map +1 -1
  32. package/es/text-area/text-area.js.map +1 -1
  33. package/es/text-field/text-field.js.map +1 -1
  34. package/es/toast/static-toast.js +2 -2
  35. package/es/toast/static-toast.js.map +1 -1
  36. package/es/tooltip/tooltip.js +13 -12
  37. package/es/tooltip/tooltip.js.map +1 -1
  38. package/es/utils/polymorphism.js +1 -1
  39. package/es/utils/polymorphism.js.map +1 -1
  40. package/lib/alert/alert.d.ts +1 -1
  41. package/lib/avatar/avatar.d.ts +4 -4
  42. package/lib/avatar/avatar.js.map +1 -1
  43. package/lib/badge/badge.d.ts +2 -2
  44. package/lib/banner/banner.d.ts +2 -2
  45. package/lib/banner/banner.js.map +1 -1
  46. package/lib/base-field/base-field.d.ts +3 -3
  47. package/lib/box/box.d.ts +2 -1
  48. package/lib/box/box.js +1 -1
  49. package/lib/box/box.js.map +1 -1
  50. package/lib/button/button.d.ts +123 -11
  51. package/lib/button/button.js +1 -1
  52. package/lib/button/button.js.map +1 -1
  53. package/lib/button/button.module.css.js +2 -0
  54. package/lib/button/button.module.css.js.map +1 -0
  55. package/lib/checkbox-field/checkbox-field.d.ts +29 -17
  56. package/lib/checkbox-field/checkbox-field.js.map +1 -1
  57. package/lib/checkbox-field/checkbox-icon.d.ts +1 -1
  58. package/lib/components/color-picker/color-picker.d.ts +2 -2
  59. package/lib/components/deprecated-dropdown/dropdown.d.ts +5 -5
  60. package/lib/components/deprecated-dropdown/dropdown.js.map +1 -1
  61. package/lib/components/deprecated-input/input.d.ts +6 -6
  62. package/lib/components/deprecated-input/input.js +1 -1
  63. package/lib/components/deprecated-input/input.js.map +1 -1
  64. package/lib/components/deprecated-select/select.d.ts +2 -2
  65. package/lib/components/icons/CloseIcon.svg.d.ts +2 -2
  66. package/lib/components/icons/ThinQuestionMarkIcon.svg.d.ts +2 -2
  67. package/lib/components/icons/ThreeDotsIcon.svg.d.ts +2 -2
  68. package/lib/components/keyboard-shortcut/keyboard-shortcut.d.ts +1 -1
  69. package/lib/components/progress-bar/progress-bar.d.ts +2 -2
  70. package/lib/components/time/time.d.ts +1 -1
  71. package/lib/divider/divider.d.ts +2 -2
  72. package/lib/heading/heading.d.ts +4 -12
  73. package/lib/heading/heading.js.map +1 -1
  74. package/lib/icons/alert-icon.d.ts +2 -2
  75. package/lib/icons/close-icon.d.ts +2 -2
  76. package/lib/icons/password-hidden-icon.d.ts +2 -2
  77. package/lib/icons/password-visible-icon.d.ts +2 -2
  78. package/lib/index.d.ts +0 -1
  79. package/lib/index.js +1 -1
  80. package/lib/loading/loading.d.ts +6 -7
  81. package/lib/loading/loading.js.map +1 -1
  82. package/lib/menu/menu.d.ts +20 -20
  83. package/lib/menu/menu.js +1 -1
  84. package/lib/menu/menu.js.map +1 -1
  85. package/lib/modal/modal-stories-components.d.ts +9 -9
  86. package/lib/modal/modal.d.ts +24 -35
  87. package/lib/modal/modal.js +1 -1
  88. package/lib/modal/modal.js.map +1 -1
  89. package/lib/notice/notice.d.ts +1 -1
  90. package/lib/password-field/password-field.d.ts +3 -8
  91. package/lib/password-field/password-field.js +1 -1
  92. package/lib/password-field/password-field.js.map +1 -1
  93. package/lib/prose/prose.d.ts +4 -7
  94. package/lib/prose/prose.js.map +1 -1
  95. package/lib/select-field/select-field.d.ts +3 -7
  96. package/lib/select-field/select-field.js.map +1 -1
  97. package/lib/spinner/spinner.d.ts +2 -2
  98. package/lib/switch-field/switch-field.d.ts +12 -11
  99. package/lib/switch-field/switch-field.js.map +1 -1
  100. package/lib/tabs/tabs.d.ts +24 -16
  101. package/lib/tabs/tabs.js +1 -1
  102. package/lib/tabs/tabs.js.map +1 -1
  103. package/lib/text-area/text-area.d.ts +3 -8
  104. package/lib/text-area/text-area.js.map +1 -1
  105. package/lib/text-field/text-field.d.ts +5 -10
  106. package/lib/text-field/text-field.js.map +1 -1
  107. package/lib/toast/static-toast.js +1 -1
  108. package/lib/toast/static-toast.js.map +1 -1
  109. package/lib/toast/use-toasts.d.ts +1 -1
  110. package/lib/tooltip/tooltip.d.ts +4 -7
  111. package/lib/tooltip/tooltip.js +1 -1
  112. package/lib/tooltip/tooltip.js.map +1 -1
  113. package/lib/utils/common-types.d.ts +19 -0
  114. package/lib/utils/polymorphism.d.ts +5 -21
  115. package/lib/utils/polymorphism.js.map +1 -1
  116. package/lib/utils/test-helpers.d.ts +2 -2
  117. package/package.json +3 -3
  118. package/styles/alert.css +2 -2
  119. package/styles/{base-button.css → button.css} +2 -2
  120. package/styles/button.module.css.css +1 -0
  121. package/styles/modal.css +2 -2
  122. package/styles/password-field.css +2 -2
  123. package/styles/reactist.css +1 -1
  124. package/styles/static-toast.css +2 -2
  125. package/styles/use-toasts.css +2 -2
  126. package/es/base-button/base-button.js +0 -75
  127. package/es/base-button/base-button.js.map +0 -1
  128. package/es/base-button/base-button.module.css.js +0 -4
  129. package/es/base-button/base-button.module.css.js.map +0 -1
  130. package/es/button-link/button-link.js +0 -38
  131. package/es/button-link/button-link.js.map +0 -1
  132. package/lib/base-button/base-button.d.ts +0 -80
  133. package/lib/base-button/base-button.js +0 -2
  134. package/lib/base-button/base-button.js.map +0 -1
  135. package/lib/base-button/base-button.module.css.js +0 -2
  136. package/lib/base-button/base-button.module.css.js.map +0 -1
  137. package/lib/base-button/index.d.ts +0 -1
  138. package/lib/button-link/button-link-story-wrapper.d.ts +0 -7
  139. package/lib/button-link/button-link.d.ts +0 -13
  140. package/lib/button-link/button-link.js +0 -2
  141. package/lib/button-link/button-link.js.map +0 -1
  142. package/lib/button-link/button-link.test.d.ts +0 -1
  143. package/lib/button-link/index.d.ts +0 -1
  144. package/styles/base-button.module.css.css +0 -1
@@ -111,7 +111,7 @@ function _objectWithoutProperties(source, excluded) {
111
111
  * convenience over merely using React.forwardRef directly, and then manually forcing the resulting
112
112
  * value to be typed using `as PolymorphicComponent<…>`.
113
113
  *
114
- * @see PolymorphicComponent for details about what this type does
114
+ * @deprecated Use Ariakit's composition instead (https://ariakit.org/guide/composition)
115
115
  */
116
116
 
117
117
  function polymorphicComponent(render) {
@@ -201,9 +201,62 @@ var modules_89b7671c = {"minWidth-0":"_68ab48ca","minWidth-xsmall":"_6fa2b565","
201
201
  var modules_8b5c09cb = {"gap-none":"_64ed24f4","gap-xsmall":"_2580a74b","gap-small":"c68f8bf6","gap-medium":"_43e5f8e9","gap-large":"_966b120f","gap-xlarge":"f957894c","gap-xxlarge":"_8cca104b","tablet-gap-none":"_5797cee2","tablet-gap-xsmall":"_9015672f","tablet-gap-small":"_7ec86eec","tablet-gap-medium":"_714d7179","tablet-gap-large":"ae1deb59","tablet-gap-xlarge":"e1cfce55","tablet-gap-xxlarge":"_168a8ff8","desktop-gap-none":"_43e2b619","desktop-gap-xsmall":"_0ea9bf88","desktop-gap-small":"d451307a","desktop-gap-medium":"bf93cf66","desktop-gap-large":"_1430cddf","desktop-gap-xlarge":"fa00c93e","desktop-gap-xxlarge":"_6f3aee54"};
202
202
 
203
203
  const _excluded = ["as", "position", "display", "flexDirection", "flexWrap", "flexGrow", "flexShrink", "gap", "alignItems", "justifyContent", "alignSelf", "overflow", "width", "height", "background", "border", "borderRadius", "minWidth", "maxWidth", "textAlign", "padding", "paddingY", "paddingX", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "margin", "marginY", "marginX", "marginTop", "marginRight", "marginBottom", "marginLeft", "className", "children"];
204
- const Box = /*#__PURE__*/polymorphicComponent(function Box(_ref, ref) {
205
- var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
206
204
 
205
+ function getBoxClassNames({
206
+ position = 'static',
207
+ display,
208
+ flexDirection = 'row',
209
+ flexWrap,
210
+ flexGrow,
211
+ flexShrink,
212
+ gap,
213
+ alignItems,
214
+ justifyContent,
215
+ alignSelf,
216
+ overflow,
217
+ width,
218
+ height,
219
+ background,
220
+ border,
221
+ borderRadius,
222
+ minWidth,
223
+ maxWidth,
224
+ textAlign,
225
+ padding,
226
+ paddingY,
227
+ paddingX,
228
+ paddingTop,
229
+ paddingRight,
230
+ paddingBottom,
231
+ paddingLeft,
232
+ margin,
233
+ marginY,
234
+ marginX,
235
+ marginTop,
236
+ marginRight,
237
+ marginBottom,
238
+ marginLeft,
239
+ className
240
+ }) {
241
+ var _ref, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8;
242
+
243
+ const resolvedPaddingTop = (_ref = paddingTop != null ? paddingTop : paddingY) != null ? _ref : padding;
244
+ const resolvedPaddingRight = (_ref2 = paddingRight != null ? paddingRight : paddingX) != null ? _ref2 : padding;
245
+ const resolvedPaddingBottom = (_ref3 = paddingBottom != null ? paddingBottom : paddingY) != null ? _ref3 : padding;
246
+ const resolvedPaddingLeft = (_ref4 = paddingLeft != null ? paddingLeft : paddingX) != null ? _ref4 : padding;
247
+ const resolvedMarginTop = (_ref5 = marginTop != null ? marginTop : marginY) != null ? _ref5 : margin;
248
+ const resolvedMarginRight = (_ref6 = marginRight != null ? marginRight : marginX) != null ? _ref6 : margin;
249
+ const resolvedMarginBottom = (_ref7 = marginBottom != null ? marginBottom : marginY) != null ? _ref7 : margin;
250
+ const resolvedMarginLeft = (_ref8 = marginLeft != null ? marginLeft : marginX) != null ? _ref8 : margin;
251
+ const omitFlex = !display || typeof display === 'string' && display !== 'flex' && display !== 'inlineFlex';
252
+ return classNames(className, modules_54d944f2.box, display ? getClassNames(modules_54d944f2, 'display', display) : null, position !== 'static' ? getClassNames(modules_54d944f2, 'position', position) : null, minWidth != null ? getClassNames(modules_89b7671c, 'minWidth', String(minWidth)) : null, getClassNames(modules_89b7671c, 'maxWidth', maxWidth), getClassNames(modules_54d944f2, 'textAlign', textAlign), // padding
253
+ getClassNames(modules_b537a8ee, 'paddingTop', resolvedPaddingTop), getClassNames(modules_b537a8ee, 'paddingRight', resolvedPaddingRight), getClassNames(modules_b537a8ee, 'paddingBottom', resolvedPaddingBottom), getClassNames(modules_b537a8ee, 'paddingLeft', resolvedPaddingLeft), // margin
254
+ getClassNames(modules_131405ac, 'marginTop', resolvedMarginTop), getClassNames(modules_131405ac, 'marginRight', resolvedMarginRight), getClassNames(modules_131405ac, 'marginBottom', resolvedMarginBottom), getClassNames(modules_131405ac, 'marginLeft', resolvedMarginLeft), // flex props
255
+ omitFlex ? null : getClassNames(modules_54d944f2, 'flexDirection', flexDirection), omitFlex ? null : getClassNames(modules_54d944f2, 'flexWrap', flexWrap), omitFlex ? null : getClassNames(modules_54d944f2, 'alignItems', alignItems), omitFlex ? null : getClassNames(modules_54d944f2, 'justifyContent', justifyContent), alignSelf != null ? getClassNames(modules_54d944f2, 'alignSelf', alignSelf) : null, flexShrink != null ? getClassNames(modules_54d944f2, 'flexShrink', String(flexShrink)) : null, flexGrow != null ? getClassNames(modules_54d944f2, 'flexGrow', String(flexGrow)) : null, gap ? getClassNames(modules_8b5c09cb, 'gap', gap) : null, // other props
256
+ getClassNames(modules_54d944f2, 'overflow', overflow), width != null ? getClassNames(modules_89b7671c, 'width', String(width)) : null, getClassNames(modules_54d944f2, 'height', height), getClassNames(modules_54d944f2, 'bg', background), borderRadius !== 'none' ? getClassNames(modules_54d944f2, 'borderRadius', borderRadius) : null, border !== 'none' ? getClassNames(modules_54d944f2, 'border', border) : null);
257
+ }
258
+
259
+ const Box = /*#__PURE__*/polymorphicComponent(function Box(_ref9, ref) {
207
260
  let {
208
261
  as: component = 'div',
209
262
  position = 'static',
@@ -241,24 +294,46 @@ const Box = /*#__PURE__*/polymorphicComponent(function Box(_ref, ref) {
241
294
  marginLeft,
242
295
  className,
243
296
  children
244
- } = _ref,
245
- props = _objectWithoutProperties(_ref, _excluded);
246
-
247
- const resolvedPaddingTop = (_ref2 = paddingTop != null ? paddingTop : paddingY) != null ? _ref2 : padding;
248
- const resolvedPaddingRight = (_ref3 = paddingRight != null ? paddingRight : paddingX) != null ? _ref3 : padding;
249
- const resolvedPaddingBottom = (_ref4 = paddingBottom != null ? paddingBottom : paddingY) != null ? _ref4 : padding;
250
- const resolvedPaddingLeft = (_ref5 = paddingLeft != null ? paddingLeft : paddingX) != null ? _ref5 : padding;
251
- const resolvedMarginTop = (_ref6 = marginTop != null ? marginTop : marginY) != null ? _ref6 : margin;
252
- const resolvedMarginRight = (_ref7 = marginRight != null ? marginRight : marginX) != null ? _ref7 : margin;
253
- const resolvedMarginBottom = (_ref8 = marginBottom != null ? marginBottom : marginY) != null ? _ref8 : margin;
254
- const resolvedMarginLeft = (_ref9 = marginLeft != null ? marginLeft : marginX) != null ? _ref9 : margin;
255
- const omitFlex = !display || typeof display === 'string' && display !== 'flex' && display !== 'inlineFlex';
297
+ } = _ref9,
298
+ props = _objectWithoutProperties(_ref9, _excluded);
299
+
256
300
  return /*#__PURE__*/React.createElement(component, _objectSpread2(_objectSpread2({}, props), {}, {
257
- className: classNames(className, modules_54d944f2.box, display ? getClassNames(modules_54d944f2, 'display', display) : null, position !== 'static' ? getClassNames(modules_54d944f2, 'position', position) : null, minWidth != null ? getClassNames(modules_89b7671c, 'minWidth', String(minWidth)) : null, getClassNames(modules_89b7671c, 'maxWidth', maxWidth), getClassNames(modules_54d944f2, 'textAlign', textAlign), // padding
258
- getClassNames(modules_b537a8ee, 'paddingTop', resolvedPaddingTop), getClassNames(modules_b537a8ee, 'paddingRight', resolvedPaddingRight), getClassNames(modules_b537a8ee, 'paddingBottom', resolvedPaddingBottom), getClassNames(modules_b537a8ee, 'paddingLeft', resolvedPaddingLeft), // margin
259
- getClassNames(modules_131405ac, 'marginTop', resolvedMarginTop), getClassNames(modules_131405ac, 'marginRight', resolvedMarginRight), getClassNames(modules_131405ac, 'marginBottom', resolvedMarginBottom), getClassNames(modules_131405ac, 'marginLeft', resolvedMarginLeft), // flex props
260
- omitFlex ? null : getClassNames(modules_54d944f2, 'flexDirection', flexDirection), omitFlex ? null : getClassNames(modules_54d944f2, 'flexWrap', flexWrap), omitFlex ? null : getClassNames(modules_54d944f2, 'alignItems', alignItems), omitFlex ? null : getClassNames(modules_54d944f2, 'justifyContent', justifyContent), alignSelf != null ? getClassNames(modules_54d944f2, 'alignSelf', alignSelf) : null, flexShrink != null ? getClassNames(modules_54d944f2, 'flexShrink', String(flexShrink)) : null, flexGrow != null ? getClassNames(modules_54d944f2, 'flexGrow', String(flexGrow)) : null, gap ? getClassNames(modules_8b5c09cb, 'gap', gap) : null, // other props
261
- getClassNames(modules_54d944f2, 'overflow', overflow), width != null ? getClassNames(modules_89b7671c, 'width', String(width)) : null, getClassNames(modules_54d944f2, 'height', height), getClassNames(modules_54d944f2, 'bg', background), borderRadius !== 'none' ? getClassNames(modules_54d944f2, 'borderRadius', borderRadius) : null, border !== 'none' ? getClassNames(modules_54d944f2, 'border', border) : null) || undefined,
301
+ className: getBoxClassNames({
302
+ position,
303
+ display,
304
+ flexDirection,
305
+ flexWrap,
306
+ flexGrow,
307
+ flexShrink,
308
+ gap,
309
+ alignItems,
310
+ justifyContent,
311
+ alignSelf,
312
+ overflow,
313
+ width,
314
+ height,
315
+ background,
316
+ border,
317
+ borderRadius,
318
+ minWidth,
319
+ maxWidth,
320
+ textAlign,
321
+ padding,
322
+ paddingY,
323
+ paddingX,
324
+ paddingTop,
325
+ paddingRight,
326
+ paddingBottom,
327
+ paddingLeft,
328
+ margin,
329
+ marginY,
330
+ marginX,
331
+ marginTop,
332
+ marginRight,
333
+ marginBottom,
334
+ marginLeft,
335
+ className
336
+ }),
262
337
  ref
263
338
  }), children);
264
339
  });
@@ -448,6 +523,30 @@ const HiddenVisually = /*#__PURE__*/polymorphicComponent(function HiddenVisually
448
523
  }));
449
524
  });
450
525
 
526
+ var modules_c7f5018f = {"svg":"_51539197","spinner":"_54fbe2b3","tint":"a0c466ed","fill":"_745b73d3"};
527
+
528
+ function Spinner({
529
+ size = 24
530
+ }) {
531
+ return /*#__PURE__*/React.createElement("svg", {
532
+ "aria-hidden": true,
533
+ width: size,
534
+ height: size,
535
+ viewBox: "0 0 24 24",
536
+ className: modules_c7f5018f.svg,
537
+ "data-chromatic": "ignore"
538
+ }, /*#__PURE__*/React.createElement("g", {
539
+ fill: "none",
540
+ fillRule: "nonzero"
541
+ }, /*#__PURE__*/React.createElement("path", {
542
+ className: modules_c7f5018f.tint,
543
+ d: "M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z"
544
+ }), /*#__PURE__*/React.createElement("path", {
545
+ className: modules_c7f5018f.fill,
546
+ d: "M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z"
547
+ })));
548
+ }
549
+
451
550
  var modules_95f1407a = {"tooltip":"_487c82cd"};
452
551
 
453
552
  function Tooltip({
@@ -478,145 +577,127 @@ function Tooltip({
478
577
  render: child,
479
578
  store: tooltip,
480
579
  ref: child.ref
481
- }), isOpen && content ? /*#__PURE__*/React.createElement(Box, {
482
- as: react.Tooltip,
483
- gutter: gapSize,
580
+ }), isOpen && content ? /*#__PURE__*/React.createElement(react.Tooltip, {
484
581
  store: tooltip,
485
- className: [modules_95f1407a.tooltip, exceptionallySetClassName],
486
- background: "toast",
487
- borderRadius: "standard",
488
- paddingX: "small",
489
- paddingY: "xsmall",
490
- maxWidth: "medium",
491
- width: "fitContent",
492
- overflow: "hidden",
493
- textAlign: "center"
582
+ gutter: gapSize,
583
+ render: /*#__PURE__*/React.createElement(Box, {
584
+ className: [modules_95f1407a.tooltip, exceptionallySetClassName],
585
+ background: "toast",
586
+ borderRadius: "standard",
587
+ paddingX: "small",
588
+ paddingY: "xsmall",
589
+ maxWidth: "medium",
590
+ width: "fitContent",
591
+ overflow: "hidden",
592
+ textAlign: "center"
593
+ })
494
594
  }, withArrow ? /*#__PURE__*/React.createElement(react.TooltipArrow, null) : null, typeof content === 'function' ? content() : content) : null);
495
595
  }
496
596
 
497
- var modules_c7f5018f = {"svg":"_51539197","spinner":"_54fbe2b3","tint":"a0c466ed","fill":"_745b73d3"};
498
-
499
- function Spinner({
500
- size = 24
501
- }) {
502
- return /*#__PURE__*/React.createElement("svg", {
503
- "aria-hidden": true,
504
- width: size,
505
- height: size,
506
- viewBox: "0 0 24 24",
507
- className: modules_c7f5018f.svg,
508
- "data-chromatic": "ignore"
509
- }, /*#__PURE__*/React.createElement("g", {
510
- fill: "none",
511
- fillRule: "nonzero"
512
- }, /*#__PURE__*/React.createElement("path", {
513
- className: modules_c7f5018f.tint,
514
- d: "M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z"
515
- }), /*#__PURE__*/React.createElement("path", {
516
- className: modules_c7f5018f.fill,
517
- d: "M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z"
518
- })));
519
- }
520
-
521
- var modules_b9569bce = {"baseButton":"_8313bd46","label":"_0051d171","shape-rounded":"_8eb8f0fa","size-small":"_8b7f1a82","size-normal":"_5e45d59f","size-large":"_95951888","disabled":"_43792df1","iconButton":"_8644eccb","startIcon":"a44d4350","endIcon":"_073e1aa4","variant-primary":"_7a4dbd5f","variant-secondary":"_54d56775","variant-tertiary":"_907a61ca","variant-quaternary":"f169a390","tone-destructive":"ccb3eb8c"};
597
+ var modules_5357ebb8 = {"baseButton":"_3930afa0","label":"_90654824","shape-rounded":"c05d17c2","size-small":"_1e29d236","size-normal":"_7246d092","size-large":"_2d084671","disabled":"_2b0b9d95","iconButton":"abd5766f","startIcon":"_380e7c73","endIcon":"_20fe4105","variant-primary":"_7ea1378e","variant-secondary":"_64ee8afd","variant-tertiary":"_650176bf","variant-quaternary":"aa19cb97","tone-destructive":"_7a2d9a8c"};
522
598
 
523
- const _excluded$6 = ["as", "variant", "tone", "size", "shape", "disabled", "loading", "tooltip", "onClick", "exceptionallySetClassName", "children", "startIcon", "endIcon", "icon", "width", "align"];
599
+ const _excluded$6 = ["variant", "tone", "size", "shape", "type", "disabled", "loading", "tooltip", "render", "onClick", "exceptionallySetClassName", "children", "startIcon", "endIcon", "width", "align"],
600
+ _excluded2$1 = ["variant", "tone", "size", "shape", "type", "disabled", "loading", "tooltip", "render", "onClick", "exceptionallySetClassName", "children", "icon"];
524
601
 
525
602
  function preventDefault(event) {
526
603
  event.preventDefault();
527
604
  }
528
605
  /**
529
- * The component that powers `Button` and `ButtonLink`, where the button styling logic and some
530
- * common functionality resides. This component is internal to Reactist.
531
- *
532
- * @see Button
533
- * @see ButtonLink
606
+ * A button element that displays a text label and optionally a start or end icon. It follows the
607
+ * [WAI-ARIA Button Pattern](https://www.w3.org/TR/wai-aria-practices/#button).
534
608
  */
535
609
 
536
610
 
537
- const BaseButton = /*#__PURE__*/polymorphicComponent(function BaseButton(_ref, ref) {
611
+ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
538
612
  let {
539
- as = 'div',
540
613
  variant,
541
614
  tone = 'normal',
542
615
  size = 'normal',
543
616
  shape = 'normal',
617
+ type = 'button',
544
618
  disabled = false,
545
619
  loading = false,
546
620
  tooltip,
621
+ render,
547
622
  onClick,
548
623
  exceptionallySetClassName,
549
624
  children,
550
625
  startIcon,
551
626
  endIcon,
552
- icon,
553
627
  width = 'auto',
554
628
  align = 'center'
555
629
  } = _ref,
556
630
  props = _objectWithoutProperties(_ref, _excluded$6);
557
631
 
558
632
  const isDisabled = loading || disabled;
559
- const buttonElement = /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
560
- as: as,
633
+ const buttonElement = /*#__PURE__*/React.createElement(react.Role.button, _objectSpread2(_objectSpread2({}, props), {}, {
634
+ render: render,
635
+ type: render != null ? undefined : type,
561
636
  ref: ref,
562
637
  "aria-disabled": isDisabled,
563
638
  onClick: isDisabled ? preventDefault : onClick,
564
- width: icon ? undefined : width,
565
- className: [exceptionallySetClassName, modules_b9569bce.baseButton, modules_b9569bce["variant-" + variant], modules_b9569bce["tone-" + tone], modules_b9569bce["size-" + size], shape === 'rounded' ? modules_b9569bce['shape-rounded'] : null, icon ? modules_b9569bce.iconButton : null, disabled ? modules_b9569bce.disabled : null]
566
- }), icon ? loading && /*#__PURE__*/React.createElement(Spinner, null) || icon : /*#__PURE__*/React.createElement(React.Fragment, null, startIcon ? /*#__PURE__*/React.createElement(Box, {
639
+ className: classNames([getBoxClassNames({
640
+ width
641
+ }), exceptionallySetClassName, modules_5357ebb8.baseButton, modules_5357ebb8["variant-" + variant], modules_5357ebb8["tone-" + tone], modules_5357ebb8["size-" + size], shape === 'rounded' ? modules_5357ebb8['shape-rounded'] : null, disabled ? modules_5357ebb8.disabled : null])
642
+ }), /*#__PURE__*/React.createElement(React.Fragment, null, startIcon ? /*#__PURE__*/React.createElement(Box, {
567
643
  display: "flex",
568
- className: modules_b9569bce.startIcon,
644
+ className: modules_5357ebb8.startIcon,
569
645
  "aria-hidden": true
570
646
  }, loading && !endIcon ? /*#__PURE__*/React.createElement(Spinner, null) : startIcon) : null, children ? /*#__PURE__*/React.createElement(Box, {
571
647
  as: "span",
572
- className: modules_b9569bce.label,
648
+ className: modules_5357ebb8.label,
573
649
  overflow: "hidden",
574
650
  width: width === 'full' ? 'full' : undefined,
575
651
  textAlign: width === 'auto' ? 'center' : align
576
652
  }, children) : null, endIcon || loading && !startIcon ? /*#__PURE__*/React.createElement(Box, {
577
653
  display: "flex",
578
- className: modules_b9569bce.endIcon,
654
+ className: modules_5357ebb8.endIcon,
579
655
  "aria-hidden": true
580
- }, loading ? /*#__PURE__*/React.createElement(Spinner, null) : endIcon) : null)); // If it's an icon-only button, make sure it uses the aria-label as tooltip if no tooltip was provided
581
-
582
- const tooltipContent = icon && tooltip === undefined ? props['aria-label'] : tooltip;
583
- return tooltipContent ? /*#__PURE__*/React.createElement(Tooltip, {
584
- content: tooltipContent
656
+ }, loading ? /*#__PURE__*/React.createElement(Spinner, null) : endIcon) : null));
657
+ return tooltip ? /*#__PURE__*/React.createElement(Tooltip, {
658
+ content: tooltip
585
659
  }, buttonElement) : buttonElement;
586
660
  });
587
-
588
- const _excluded$7 = ["variant", "tone", "size", "type", "disabled", "exceptionallySetClassName"];
589
661
  /**
590
- * A semantic button that also looks like a button, and provides all the necessary visual variants.
591
- * It follows the [WAI-ARIA Button Pattern](https://www.w3.org/TR/wai-aria-practices/#button).
592
- *
593
- * @see ButtonLink
662
+ * A button element that displays an icon only, visually, though it is semantically labelled. It
663
+ * also makes sure to always show a tooltip with its label. It follows the
664
+ * [WAI-ARIA Button Pattern](https://www.w3.org/TR/wai-aria-practices/#button).
594
665
  */
595
666
 
596
- const Button = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
667
+ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(_ref2, ref) {
597
668
  let {
598
669
  variant,
599
670
  tone = 'normal',
600
671
  size = 'normal',
672
+ shape = 'normal',
601
673
  type = 'button',
602
674
  disabled = false,
603
- exceptionallySetClassName
604
- } = _ref,
605
- props = _objectWithoutProperties(_ref, _excluded$7);
675
+ loading = false,
676
+ tooltip,
677
+ render,
678
+ onClick,
679
+ exceptionallySetClassName,
680
+ children,
681
+ icon
682
+ } = _ref2,
683
+ props = _objectWithoutProperties(_ref2, _excluded2$1);
606
684
 
607
- return /*#__PURE__*/React.createElement(BaseButton, _objectSpread2(_objectSpread2({}, props), {}, {
608
- as: "button",
685
+ const isDisabled = loading || disabled;
686
+ const buttonElement = /*#__PURE__*/React.createElement(react.Role.button, _objectSpread2(_objectSpread2({}, props), {}, {
687
+ render: render,
688
+ type: render != null ? undefined : type,
609
689
  ref: ref,
610
- variant: variant,
611
- tone: tone,
612
- size: size,
613
- type: type,
614
- disabled: disabled,
615
- exceptionallySetClassName: exceptionallySetClassName
616
- }));
690
+ "aria-disabled": isDisabled,
691
+ onClick: isDisabled ? preventDefault : onClick,
692
+ className: classNames([exceptionallySetClassName, modules_5357ebb8.baseButton, modules_5357ebb8["variant-" + variant], modules_5357ebb8["tone-" + tone], modules_5357ebb8["size-" + size], shape === 'rounded' ? modules_5357ebb8['shape-rounded'] : null, modules_5357ebb8.iconButton, disabled ? modules_5357ebb8.disabled : null])
693
+ }), loading && /*#__PURE__*/React.createElement(Spinner, null) || icon);
694
+ const tooltipContent = tooltip === undefined ? props['aria-label'] : tooltip;
695
+ return tooltipContent ? /*#__PURE__*/React.createElement(Tooltip, {
696
+ content: tooltipContent
697
+ }, buttonElement) : buttonElement;
617
698
  });
618
699
 
619
- const _excluded$8 = ["tone"];
700
+ const _excluded$7 = ["tone"];
620
701
  const alertIconForTone = {
621
702
  info: AlertInfoIcon,
622
703
  positive: AlertPositiveIcon,
@@ -628,7 +709,7 @@ function AlertIcon(_ref) {
628
709
  let {
629
710
  tone
630
711
  } = _ref,
631
- props = _objectWithoutProperties(_ref, _excluded$8);
712
+ props = _objectWithoutProperties(_ref, _excluded$7);
632
713
 
633
714
  const Icon = alertIconForTone[tone];
634
715
  return Icon ? /*#__PURE__*/React.createElement(Icon, _objectSpread2({}, props)) : null;
@@ -764,7 +845,7 @@ function useId(providedId) {
764
845
 
765
846
  var modules_afa80466 = {"banner":"c1dffd60","banner-info":"_9d552538","banner-promotion":"d797752e","title":"_8cd610da","title-without-description":"_78ea5373","title-info":"_319c73fa","title-promotion":"fc84253f","description":"af4bd758","description-info":"b95a8c07","description-promotion":"_3c33f615"};
766
847
 
767
- const _excluded$9 = ["id", "tone", "icon", "title", "description", "action"];
848
+ const _excluded$8 = ["id", "tone", "icon", "title", "description", "action"];
768
849
  const Banner = /*#__PURE__*/React.forwardRef(function Banner(_ref, ref) {
769
850
  let {
770
851
  id,
@@ -774,7 +855,7 @@ const Banner = /*#__PURE__*/React.forwardRef(function Banner(_ref, ref) {
774
855
  description,
775
856
  action
776
857
  } = _ref,
777
- props = _objectWithoutProperties(_ref, _excluded$9);
858
+ props = _objectWithoutProperties(_ref, _excluded$8);
778
859
 
779
860
  const titleId = useId();
780
861
  const descriptionId = useId();
@@ -816,7 +897,7 @@ const Banner = /*#__PURE__*/React.forwardRef(function Banner(_ref, ref) {
816
897
  }, action) : null));
817
898
  });
818
899
 
819
- const _excluded$a = ["size", "exceptionallySetClassName"];
900
+ const _excluded$9 = ["size", "exceptionallySetClassName"];
820
901
  const sizeMapping = {
821
902
  xsmall: 16,
822
903
  small: 24,
@@ -831,7 +912,7 @@ function Loading(_ref) {
831
912
  size = 'small',
832
913
  exceptionallySetClassName
833
914
  } = _ref,
834
- props = _objectWithoutProperties(_ref, _excluded$a);
915
+ props = _objectWithoutProperties(_ref, _excluded$9);
835
916
 
836
917
  const numericSize = (_sizeMapping$size = sizeMapping[size]) != null ? _sizeMapping$size : sizeMapping.small;
837
918
  const ariaLabel = props['aria-label'] ? props['aria-label'] : !props['aria-labelledby'] ? 'Loading…' : undefined;
@@ -874,7 +955,7 @@ function Notice({
874
955
 
875
956
  var modules_a9637dd3 = {"text":"a83bd4e0","size-caption":"_266d6623","size-copy":"a8d37c6e","size-subtitle":"_39f4eb1f","weight-semibold":"_7be5c531","weight-bold":"e214ff2e","tone-secondary":"_6a3e5ade","tone-danger":"_8f5b5f2b","tone-positive":"_9ae47ae4","lineClampMultipleLines":"_969f18f7","lineClamp-1":"_2f303ac3","lineClamp-2":"d3e04245","lineClamp-3":"_33411704","lineClamp-4":"bfc32640","lineClamp-5":"f813c82f"};
876
957
 
877
- const _excluded$b = ["as", "size", "weight", "tone", "align", "children", "lineClamp", "exceptionallySetClassName"];
958
+ const _excluded$a = ["as", "size", "weight", "tone", "align", "children", "lineClamp", "exceptionallySetClassName"];
878
959
  const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
879
960
  let {
880
961
  as,
@@ -886,7 +967,7 @@ const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
886
967
  lineClamp,
887
968
  exceptionallySetClassName
888
969
  } = _ref,
889
- props = _objectWithoutProperties(_ref, _excluded$b);
970
+ props = _objectWithoutProperties(_ref, _excluded$a);
890
971
 
891
972
  const lineClampMultipleLines = typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp != null ? lineClamp : 1) > 1;
892
973
  return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -902,7 +983,7 @@ const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
902
983
 
903
984
  var modules_d11e18f0 = {"stackedToastsView":"_616cc3f3","toastContainer":"_1b5f8e86","slot":"ce2e3476"};
904
985
 
905
- const _excluded$c = ["message", "description", "icon", "action", "onDismiss", "dismissLabel"];
986
+ const _excluded$b = ["message", "description", "icon", "action", "onDismiss", "dismissLabel"];
906
987
  /**
907
988
  * A toast that shows a message, and an optional action associated with it.
908
989
  *
@@ -927,7 +1008,7 @@ const StaticToast = /*#__PURE__*/React__default.forwardRef(function Toast(_ref,
927
1008
  onDismiss,
928
1009
  dismissLabel = 'Close'
929
1010
  } = _ref,
930
- props = _objectWithoutProperties(_ref, _excluded$c);
1011
+ props = _objectWithoutProperties(_ref, _excluded$b);
931
1012
 
932
1013
  return /*#__PURE__*/React__default.createElement(Box, _objectSpread2({
933
1014
  ref: ref,
@@ -951,7 +1032,7 @@ const StaticToast = /*#__PURE__*/React__default.forwardRef(function Toast(_ref,
951
1032
  variant: "tertiary",
952
1033
  size: "small",
953
1034
  onClick: action.onClick
954
- }, action.label) : action) : null, onDismiss ? /*#__PURE__*/React__default.createElement(ToastContentSlot, null, /*#__PURE__*/React__default.createElement(Button, {
1035
+ }, action.label) : action) : null, onDismiss ? /*#__PURE__*/React__default.createElement(ToastContentSlot, null, /*#__PURE__*/React__default.createElement(IconButton, {
955
1036
  variant: "quaternary",
956
1037
  size: "small",
957
1038
  onClick: onDismiss,
@@ -1148,7 +1229,7 @@ function useToastsAnimation() {
1148
1229
  };
1149
1230
  }
1150
1231
 
1151
- const _excluded$d = ["toastId"];
1232
+ const _excluded$c = ["toastId"];
1152
1233
  /** @private */
1153
1234
 
1154
1235
  const InternalToast = /*#__PURE__*/React__default.forwardRef(function InternalToast({
@@ -1279,7 +1360,7 @@ function ToastsProvider({
1279
1360
  let {
1280
1361
  toastId
1281
1362
  } = _ref,
1282
- props = _objectWithoutProperties(_ref, _excluded$d);
1363
+ props = _objectWithoutProperties(_ref, _excluded$c);
1283
1364
 
1284
1365
  return /*#__PURE__*/React__default.createElement(InternalToast, _objectSpread2({
1285
1366
  key: toastId,
@@ -1355,7 +1436,7 @@ function Toast(props) {
1355
1436
 
1356
1437
  var modules_949d2ff4 = {"heading":"bff24867","weight-medium":"_9b540c61","weight-light":"c6729907","tone-secondary":"d6507f70","tone-danger":"d1846d93","size-largest":"_7cbdd1ba","size-larger":"b3e14969","size-smaller":"be14a265","lineClampMultipleLines":"_71391f13","lineClamp-1":"_97298b1b","lineClamp-2":"_6d357d76","lineClamp-3":"d820b451","lineClamp-4":"_8d37487d","lineClamp-5":"_5215b4d7"};
1357
1438
 
1358
- const _excluded$e = ["level", "weight", "size", "tone", "children", "lineClamp", "align", "exceptionallySetClassName"];
1439
+ const _excluded$d = ["level", "weight", "size", "tone", "children", "lineClamp", "align", "exceptionallySetClassName"];
1359
1440
  const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
1360
1441
  let {
1361
1442
  level,
@@ -1367,7 +1448,7 @@ const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
1367
1448
  align,
1368
1449
  exceptionallySetClassName
1369
1450
  } = _ref,
1370
- props = _objectWithoutProperties(_ref, _excluded$e);
1451
+ props = _objectWithoutProperties(_ref, _excluded$d);
1371
1452
 
1372
1453
  // In TypeScript v4.1, this would be properly recognized without needing the type assertion
1373
1454
  // https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types
@@ -1386,7 +1467,7 @@ const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
1386
1467
 
1387
1468
  var modules_8ebe6db0 = {"prose":"_560c1e08","darkModeTypography":"_8b53b13e"};
1388
1469
 
1389
- const _excluded$f = ["darkModeTypography", "exceptionallySetClassName"];
1470
+ const _excluded$e = ["darkModeTypography", "exceptionallySetClassName"];
1390
1471
  /**
1391
1472
  * Used to style HTML you don’t control, like HTML content generated from Markdown.
1392
1473
  */
@@ -1396,54 +1477,23 @@ function Prose(_ref) {
1396
1477
  darkModeTypography,
1397
1478
  exceptionallySetClassName
1398
1479
  } = _ref,
1399
- props = _objectWithoutProperties(_ref, _excluded$f);
1480
+ props = _objectWithoutProperties(_ref, _excluded$e);
1400
1481
 
1401
1482
  return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
1402
1483
  className: [modules_8ebe6db0.prose, darkModeTypography ? modules_8ebe6db0.darkModeTypography : null, exceptionallySetClassName]
1403
1484
  }));
1404
1485
  }
1405
1486
 
1406
- const _excluded$g = ["as", "variant", "tone", "size", "exceptionallySetClassName", "openInNewTab"];
1407
- /**
1408
- * A semantic link that looks like a button, exactly matching the `Button` component in all visual
1409
- * aspects.
1410
- *
1411
- * @see Button
1412
- */
1413
-
1414
- const ButtonLink = /*#__PURE__*/polymorphicComponent(function ButtonLink(_ref, ref) {
1415
- let {
1416
- as = 'a',
1417
- variant,
1418
- tone = 'normal',
1419
- size = 'normal',
1420
- exceptionallySetClassName,
1421
- openInNewTab = false
1422
- } = _ref,
1423
- props = _objectWithoutProperties(_ref, _excluded$g);
1424
-
1425
- return /*#__PURE__*/React.createElement(BaseButton, _objectSpread2(_objectSpread2({}, props), {}, {
1426
- as: as,
1427
- ref: ref,
1428
- variant: variant,
1429
- tone: tone,
1430
- size: size,
1431
- exceptionallySetClassName: exceptionallySetClassName,
1432
- target: openInNewTab ? '_blank' : undefined,
1433
- rel: openInNewTab ? 'noopener noreferrer' : undefined
1434
- }));
1435
- });
1436
-
1437
1487
  var modules_3d05deee = {"container":"fdc181b3"};
1438
1488
 
1439
- const _excluded$h = ["as", "openInNewTab", "exceptionallySetClassName"];
1489
+ const _excluded$f = ["as", "openInNewTab", "exceptionallySetClassName"];
1440
1490
  const TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref) {
1441
1491
  let {
1442
1492
  as = 'a',
1443
1493
  openInNewTab = false,
1444
1494
  exceptionallySetClassName
1445
1495
  } = _ref,
1446
- props = _objectWithoutProperties(_ref, _excluded$h);
1496
+ props = _objectWithoutProperties(_ref, _excluded$f);
1447
1497
 
1448
1498
  return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
1449
1499
  as: as,
@@ -1455,7 +1505,7 @@ const TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref)
1455
1505
  }));
1456
1506
  });
1457
1507
 
1458
- const _excluded$i = ["checked", "indeterminate", "disabled"];
1508
+ const _excluded$g = ["checked", "indeterminate", "disabled"];
1459
1509
  const svgPath = {
1460
1510
  checked: 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2.457 4.293l-5.293 5.293-1.793-1.793a1 1 0 1 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l6-6a1 1 0 1 0-1.414-1.414z',
1461
1511
  unchecked: 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm0 1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z',
@@ -1494,7 +1544,7 @@ function CheckboxIcon(_ref) {
1494
1544
  indeterminate,
1495
1545
  disabled
1496
1546
  } = _ref,
1497
- props = _objectWithoutProperties(_ref, _excluded$i);
1547
+ props = _objectWithoutProperties(_ref, _excluded$g);
1498
1548
 
1499
1549
  const pathKey = getPathKey({
1500
1550
  checked,
@@ -1546,7 +1596,7 @@ function useForkRef(...refs) {
1546
1596
  refs);
1547
1597
  }
1548
1598
 
1549
- const _excluded$j = ["label", "icon", "disabled", "indeterminate", "defaultChecked", "onChange"];
1599
+ const _excluded$h = ["label", "icon", "disabled", "indeterminate", "defaultChecked", "onChange"];
1550
1600
  const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref, ref) {
1551
1601
  var _ref2, _props$checked, _props$checked2;
1552
1602
 
@@ -1558,7 +1608,7 @@ const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref,
1558
1608
  defaultChecked,
1559
1609
  onChange
1560
1610
  } = _ref,
1561
- props = _objectWithoutProperties(_ref, _excluded$j);
1611
+ props = _objectWithoutProperties(_ref, _excluded$h);
1562
1612
 
1563
1613
  const isControlledComponent = typeof props.checked === 'boolean';
1564
1614
 
@@ -1771,7 +1821,7 @@ function BaseField({
1771
1821
 
1772
1822
  var modules_aaf25250 = {"inputWrapper":"dea25485","bordered":"_80b6b376","error":"_1a32867a","slot":"dbbd207e"};
1773
1823
 
1774
- const _excluded$k = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "type", "maxWidth", "hidden", "aria-describedby", "startSlot", "endSlot"];
1824
+ const _excluded$i = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "type", "maxWidth", "hidden", "aria-describedby", "startSlot", "endSlot"];
1775
1825
  const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
1776
1826
  let {
1777
1827
  variant = 'default',
@@ -1789,7 +1839,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
1789
1839
  startSlot,
1790
1840
  endSlot
1791
1841
  } = _ref,
1792
- props = _objectWithoutProperties(_ref, _excluded$k);
1842
+ props = _objectWithoutProperties(_ref, _excluded$i);
1793
1843
 
1794
1844
  const internalRef = React.useRef(null);
1795
1845
  const combinedRef = useCallbackRef.useMergeRefs([ref, internalRef]);
@@ -1834,12 +1884,12 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
1834
1884
  }, endSlot) : null));
1835
1885
  });
1836
1886
 
1837
- const _excluded$l = ["togglePasswordLabel"];
1887
+ const _excluded$j = ["togglePasswordLabel"];
1838
1888
  const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref, ref) {
1839
1889
  let {
1840
1890
  togglePasswordLabel = 'Toggle password visibility'
1841
1891
  } = _ref,
1842
- props = _objectWithoutProperties(_ref, _excluded$l);
1892
+ props = _objectWithoutProperties(_ref, _excluded$j);
1843
1893
 
1844
1894
  const [isPasswordVisible, setPasswordVisible] = React.useState(false);
1845
1895
  const Icon = isPasswordVisible ? PasswordVisibleIcon : PasswordHiddenIcon;
@@ -1847,7 +1897,7 @@ const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref,
1847
1897
  ref: ref,
1848
1898
  // @ts-expect-error TextField does not support type="password", so we override the type check here
1849
1899
  type: isPasswordVisible ? 'text' : 'password',
1850
- endSlot: /*#__PURE__*/React.createElement(Button, {
1900
+ endSlot: /*#__PURE__*/React.createElement(IconButton, {
1851
1901
  variant: "quaternary",
1852
1902
  icon: /*#__PURE__*/React.createElement(Icon, {
1853
1903
  "aria-hidden": true
@@ -1860,7 +1910,7 @@ const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref,
1860
1910
 
1861
1911
  var modules_1fa9b208 = {"selectWrapper":"b930bb07","bordered":"e1f620b6","error":"_7e87474e"};
1862
1912
 
1863
- const _excluded$m = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "children", "hidden", "aria-describedby"];
1913
+ const _excluded$k = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "children", "hidden", "aria-describedby"];
1864
1914
  const SelectField = /*#__PURE__*/React.forwardRef(function SelectField(_ref, ref) {
1865
1915
  let {
1866
1916
  variant = 'default',
@@ -1876,7 +1926,7 @@ const SelectField = /*#__PURE__*/React.forwardRef(function SelectField(_ref, ref
1876
1926
  hidden,
1877
1927
  'aria-describedby': ariaDescribedBy
1878
1928
  } = _ref,
1879
- props = _objectWithoutProperties(_ref, _excluded$m);
1929
+ props = _objectWithoutProperties(_ref, _excluded$k);
1880
1930
 
1881
1931
  return /*#__PURE__*/React.createElement(BaseField, {
1882
1932
  variant: variant,
@@ -1914,7 +1964,7 @@ function SelectChevron(props) {
1914
1964
 
1915
1965
  var modules_8e05f7c9 = {"container":"bae487be","disabled":"_408d32a0","checked":"_99b0ead7","toggle":"_5af09fb5","label":"a66e1846","handle":"_0dcf70ec","keyFocused":"_1f5e7fd4"};
1916
1966
 
1917
- const _excluded$n = ["label", "hint", "disabled", "hidden", "defaultChecked", "id", "aria-describedby", "aria-label", "aria-labelledby", "onChange"];
1967
+ const _excluded$l = ["label", "hint", "disabled", "hidden", "defaultChecked", "id", "aria-describedby", "aria-label", "aria-labelledby", "onChange"];
1918
1968
  const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref) {
1919
1969
  var _ref2, _props$checked, _props$checked2;
1920
1970
 
@@ -1930,7 +1980,7 @@ const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref
1930
1980
  'aria-labelledby': originalAriaLabelledby,
1931
1981
  onChange
1932
1982
  } = _ref,
1933
- props = _objectWithoutProperties(_ref, _excluded$n);
1983
+ props = _objectWithoutProperties(_ref, _excluded$l);
1934
1984
 
1935
1985
  const id = useId(originalId);
1936
1986
  const hintId = useId();
@@ -1990,7 +2040,7 @@ const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref
1990
2040
 
1991
2041
  var modules_2728c236 = {"textAreaContainer":"_55ccf266","innerContainer":"_89bb7098","bordered":"_02a47358","error":"_704ff540","autoExpand":"_145ca8f0"};
1992
2042
 
1993
- const _excluded$o = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "hidden", "aria-describedby", "rows", "autoExpand"];
2043
+ const _excluded$m = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "hidden", "aria-describedby", "rows", "autoExpand"];
1994
2044
  const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
1995
2045
  let {
1996
2046
  variant = 'default',
@@ -2007,7 +2057,7 @@ const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
2007
2057
  rows,
2008
2058
  autoExpand = false
2009
2059
  } = _ref,
2010
- props = _objectWithoutProperties(_ref, _excluded$o);
2060
+ props = _objectWithoutProperties(_ref, _excluded$m);
2011
2061
 
2012
2062
  const containerRef = React.useRef(null);
2013
2063
  const internalRef = React.useRef(null);
@@ -2090,7 +2140,7 @@ function emailToIndex(email, maxIndex) {
2090
2140
 
2091
2141
  var modules_08f3eeac = {"avatar":"_38a1be89","size-xxs":"d32e92ae","size-xs":"_0667d719","size-s":"cf529fcf","size-m":"_6e268eab","size-l":"d64c62cf","size-xl":"_44fb77de","size-xxl":"_01f85e0e","size-xxxl":"_41a5fe19","tablet-size-xxs":"_6ab1577d","tablet-size-xs":"b52a4963","tablet-size-s":"_714a8419","tablet-size-m":"_81cd4d51","tablet-size-l":"bf0a4edb","tablet-size-xl":"e4f0dabd","tablet-size-xxl":"_67ea065d","tablet-size-xxxl":"_2af7f76f","desktop-size-xxs":"_759081dc","desktop-size-xs":"_8290d1c1","desktop-size-s":"_48ea172d","desktop-size-m":"_758f6641","desktop-size-l":"f9ada088","desktop-size-xl":"d3bb7470","desktop-size-xxl":"_9a312ee3","desktop-size-xxxl":"a1d30c23"};
2092
2142
 
2093
- const _excluded$p = ["user", "avatarUrl", "size", "className", "colorList", "exceptionallySetClassName"];
2143
+ const _excluded$n = ["user", "avatarUrl", "size", "className", "colorList", "exceptionallySetClassName"];
2094
2144
  const AVATAR_COLORS = ['#fcc652', '#e9952c', '#e16b2d', '#d84b40', '#e8435a', '#e5198a', '#ad3889', '#86389c', '#a8a8a8', '#98be2f', '#5d9d50', '#5f9f85', '#5bbcb6', '#32a3bf', '#2bafeb', '#2d88c3', '#3863cc', '#5e5e5e'];
2095
2145
 
2096
2146
  function Avatar(_ref) {
@@ -2102,7 +2152,7 @@ function Avatar(_ref) {
2102
2152
  colorList = AVATAR_COLORS,
2103
2153
  exceptionallySetClassName
2104
2154
  } = _ref,
2105
- props = _objectWithoutProperties(_ref, _excluded$p);
2155
+ props = _objectWithoutProperties(_ref, _excluded$n);
2106
2156
 
2107
2157
  const userInitials = getInitials(user.name) || getInitials(user.email);
2108
2158
  const avatarSize = size ? size : 'l';
@@ -2124,14 +2174,14 @@ Avatar.displayName = 'Avatar';
2124
2174
 
2125
2175
  var modules_33c7c985 = {"badge":"c6ba5977","badge-info":"cf731337","badge-positive":"_7cfc5738","badge-promote":"_63691069","badge-attention":"_28ffb572","badge-warning":"_89e77f92"};
2126
2176
 
2127
- const _excluded$q = ["tone", "label"];
2177
+ const _excluded$o = ["tone", "label"];
2128
2178
 
2129
2179
  function Badge(_ref) {
2130
2180
  let {
2131
2181
  tone,
2132
2182
  label
2133
2183
  } = _ref,
2134
- props = _objectWithoutProperties(_ref, _excluded$q);
2184
+ props = _objectWithoutProperties(_ref, _excluded$o);
2135
2185
 
2136
2186
  return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
2137
2187
  as: "span" // It enables putting the badge inside a button (https://stackoverflow.com/a/12982334)
@@ -2143,8 +2193,8 @@ function Badge(_ref) {
2143
2193
 
2144
2194
  var modules_8f59d13b = {"overlay":"_8aa86dd3","fadein":"_20c07ee6","fitContent":"_713bc08f","container":"_45139719","full":"ec8619a2","large":"_86a1d5a4","medium":"_11d61de3","small":"aee19643","xlarge":"fe449c81","expand":"_61ffb38f","buttonContainer":"_49ffdac0","headerContent":"ee92ccb3"};
2145
2195
 
2146
- const _excluded$r = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "exceptionallySetOverlayClassName", "autoFocus", "hideOnEscape", "hideOnInteractOutside", "children", "portalElement", "onKeyDown"],
2147
- _excluded2$1 = ["children", "button", "withDivider", "exceptionallySetClassName"],
2196
+ const _excluded$p = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "exceptionallySetOverlayClassName", "autoFocus", "hideOnEscape", "hideOnInteractOutside", "children", "portalElement", "onKeyDown", "className"],
2197
+ _excluded2$2 = ["children", "button", "withDivider", "exceptionallySetClassName"],
2148
2198
  _excluded3 = ["exceptionallySetClassName", "children"],
2149
2199
  _excluded4 = ["exceptionallySetClassName", "withDivider"],
2150
2200
  _excluded5 = ["children"];
@@ -2180,9 +2230,11 @@ function Modal(_ref) {
2180
2230
  hideOnInteractOutside = true,
2181
2231
  children,
2182
2232
  portalElement,
2183
- onKeyDown
2233
+ onKeyDown,
2234
+ // @ts-expect-error we want to make sure to not pass it to the Dialog component
2235
+ className
2184
2236
  } = _ref,
2185
- props = _objectWithoutProperties(_ref, _excluded$r);
2237
+ props = _objectWithoutProperties(_ref, _excluded$p);
2186
2238
 
2187
2239
  const setOpen = React.useCallback(visible => {
2188
2240
  if (!visible) {
@@ -2240,9 +2292,8 @@ function Modal(_ref) {
2240
2292
  className: classNames(modules_8f59d13b.overlay, modules_8f59d13b[height], modules_8f59d13b[width], exceptionallySetOverlayClassName),
2241
2293
 
2242
2294
  /**
2243
- * We're using `onPointerDown` instead of `onClick` to prevent
2244
- * the modal from closing when the click starts inside the modal
2245
- * and ends on the backdrop.
2295
+ * We're using `onPointerDown` instead of `onClick` to prevent the modal from
2296
+ * closing when the click starts inside the modal and ends on the backdrop.
2246
2297
  */
2247
2298
  onPointerDown: hideOnInteractOutside ? handleBackdropClick : undefined,
2248
2299
  ref: backdropRef
@@ -2252,17 +2303,18 @@ function Modal(_ref) {
2252
2303
  returnFocus: true
2253
2304
  }, /*#__PURE__*/React.createElement(react.Dialog, _objectSpread2(_objectSpread2({}, props), {}, {
2254
2305
  ref: dialogRef,
2255
- as: Box,
2306
+ render: /*#__PURE__*/React.createElement(Box, {
2307
+ borderRadius: "full",
2308
+ background: "default",
2309
+ display: "flex",
2310
+ flexDirection: "column",
2311
+ overflow: "hidden",
2312
+ height: height === 'expand' ? 'full' : undefined,
2313
+ flexGrow: height === 'expand' ? 1 : 0
2314
+ }),
2315
+ className: classNames(exceptionallySetClassName, modules_8f59d13b.container),
2256
2316
  store: store,
2257
2317
  preventBodyScroll: true,
2258
- borderRadius: "full",
2259
- background: "default",
2260
- display: "flex",
2261
- flexDirection: "column",
2262
- overflow: "hidden",
2263
- height: height === 'expand' ? 'full' : undefined,
2264
- flexGrow: height === 'expand' ? 1 : 0,
2265
- className: [exceptionallySetClassName, modules_8f59d13b.container],
2266
2318
  // Disable focus lock as we set up our own using ReactFocusLock
2267
2319
  modal: false,
2268
2320
  autoFocus: false,
@@ -2298,7 +2350,7 @@ function ModalCloseButton(props) {
2298
2350
  setIsMounted(true);
2299
2351
  }
2300
2352
  }, [isMounted]);
2301
- return /*#__PURE__*/React.createElement(Button, _objectSpread2(_objectSpread2({}, props), {}, {
2353
+ return /*#__PURE__*/React.createElement(IconButton, _objectSpread2(_objectSpread2({}, props), {}, {
2302
2354
  variant: "quaternary",
2303
2355
  onClick: onDismiss,
2304
2356
  icon: /*#__PURE__*/React.createElement(CloseIcon, null),
@@ -2320,7 +2372,7 @@ function ModalHeader(_ref2) {
2320
2372
  withDivider = false,
2321
2373
  exceptionallySetClassName
2322
2374
  } = _ref2,
2323
- props = _objectWithoutProperties(_ref2, _excluded2$1);
2375
+ props = _objectWithoutProperties(_ref2, _excluded2$2);
2324
2376
 
2325
2377
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
2326
2378
  as: "header",
@@ -2418,9 +2470,8 @@ function ModalActions(_ref5) {
2418
2470
 
2419
2471
  var modules_40c67f5b = {"tab":"e96bf360","track":"_430e252d","tab-neutral":"f631ccbe","tab-themed":"_6ba96acc","track-neutral":"ef4cd8d3","track-themed":"_344b3b10"};
2420
2472
 
2421
- const _excluded$s = ["as", "children", "id", "exceptionallySetClassName"],
2422
- _excluded2$2 = ["children", "space"],
2423
- _excluded3$1 = ["children", "id", "as", "render"];
2473
+ const _excluded$q = ["children", "space"],
2474
+ _excluded2$3 = ["children", "id", "renderMode"];
2424
2475
  const TabsContext = /*#__PURE__*/React.createContext(null);
2425
2476
  /**
2426
2477
  * Used to group components that compose a set of tabs. There can only be one active tab within the same `<Tabs>` group.
@@ -2457,15 +2508,12 @@ function Tabs({
2457
2508
  */
2458
2509
 
2459
2510
 
2460
- const Tab = /*#__PURE__*/polymorphicComponent(function Tab(_ref2, ref) {
2461
- let {
2462
- as,
2463
- children,
2464
- id,
2465
- exceptionallySetClassName
2466
- } = _ref2,
2467
- props = _objectWithoutProperties(_ref2, _excluded$s);
2468
-
2511
+ const Tab = /*#__PURE__*/React.forwardRef(function Tab({
2512
+ children,
2513
+ id,
2514
+ exceptionallySetClassName,
2515
+ render
2516
+ }, ref) {
2469
2517
  const tabContextValue = React.useContext(TabsContext);
2470
2518
  if (!tabContextValue) return null;
2471
2519
  const {
@@ -2473,24 +2521,24 @@ const Tab = /*#__PURE__*/polymorphicComponent(function Tab(_ref2, ref) {
2473
2521
  tabStore
2474
2522
  } = tabContextValue;
2475
2523
  const className = classNames(exceptionallySetClassName, modules_40c67f5b.tab, modules_40c67f5b["tab-" + variant]);
2476
- return /*#__PURE__*/React.createElement(react.Tab, _objectSpread2(_objectSpread2({}, props), {}, {
2477
- as: as,
2524
+ return /*#__PURE__*/React.createElement(react.Tab, {
2525
+ render: render,
2478
2526
  className: className,
2479
2527
  id: id,
2480
2528
  store: tabStore,
2481
2529
  ref: ref
2482
- }), children);
2530
+ }, children);
2483
2531
  });
2484
2532
  /**
2485
2533
  * A component used to group `<Tab>` elements together.
2486
2534
  */
2487
2535
 
2488
- function TabList(_ref3) {
2536
+ function TabList(_ref2) {
2489
2537
  let {
2490
2538
  children,
2491
2539
  space
2492
- } = _ref3,
2493
- props = _objectWithoutProperties(_ref3, _excluded2$2);
2540
+ } = _ref2,
2541
+ props = _objectWithoutProperties(_ref2, _excluded$q);
2494
2542
 
2495
2543
  const tabContextValue = React.useContext(TabsContext);
2496
2544
 
@@ -2504,13 +2552,14 @@ function TabList(_ref3) {
2504
2552
  } = tabContextValue;
2505
2553
  return (
2506
2554
  /*#__PURE__*/
2507
- // The extra <Box> prevents <Inline>'s negative margins from collapsing when used in a flex container
2555
+ // The extra <div> prevents <Inline>'s negative margins from collapsing when used in a flex container
2508
2556
  // which will render the track with the wrong height
2509
- React.createElement(Box, null, /*#__PURE__*/React.createElement(react.TabList, _objectSpread2({
2557
+ React.createElement("div", null, /*#__PURE__*/React.createElement(react.TabList, _objectSpread2({
2510
2558
  store: tabStore,
2511
- as: Box,
2512
- position: "relative",
2513
- width: "maxContent"
2559
+ render: /*#__PURE__*/React.createElement(Box, {
2560
+ position: "relative",
2561
+ width: "maxContent"
2562
+ })
2514
2563
  }, props), /*#__PURE__*/React.createElement(Box, {
2515
2564
  className: [modules_40c67f5b.track, modules_40c67f5b["track-" + variant]]
2516
2565
  }), /*#__PURE__*/React.createElement(Inline, {
@@ -2524,14 +2573,13 @@ function TabList(_ref3) {
2524
2573
  */
2525
2574
 
2526
2575
 
2527
- const TabPanel = /*#__PURE__*/polymorphicComponent(function TabPanel(_ref4, ref) {
2576
+ const TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel(_ref3, ref) {
2528
2577
  let {
2529
2578
  children,
2530
2579
  id,
2531
- as,
2532
- render = 'always'
2533
- } = _ref4,
2534
- props = _objectWithoutProperties(_ref4, _excluded3$1);
2580
+ renderMode = 'always'
2581
+ } = _ref3,
2582
+ props = _objectWithoutProperties(_ref3, _excluded2$3);
2535
2583
 
2536
2584
  const tabContextValue = React.useContext(TabsContext);
2537
2585
  const [tabRendered, setTabRendered] = React.useState(false);
@@ -2550,11 +2598,10 @@ const TabPanel = /*#__PURE__*/polymorphicComponent(function TabPanel(_ref4, ref)
2550
2598
  const {
2551
2599
  tabStore
2552
2600
  } = tabContextValue;
2553
- const shouldRender = render === 'always' || render === 'active' && tabIsActive || render === 'lazy' && (tabIsActive || tabRendered);
2601
+ const shouldRender = renderMode === 'always' || renderMode === 'active' && tabIsActive || renderMode === 'lazy' && (tabIsActive || tabRendered);
2554
2602
  return shouldRender ? /*#__PURE__*/React.createElement(react.TabPanel, _objectSpread2(_objectSpread2({}, props), {}, {
2555
2603
  tabId: id,
2556
2604
  store: tabStore,
2557
- as: as,
2558
2605
  ref: ref
2559
2606
  }), children) : null;
2560
2607
  });
@@ -2573,18 +2620,18 @@ function TabAwareSlot({
2573
2620
  }) : null;
2574
2621
  }
2575
2622
 
2576
- const _excluded$t = ["children", "onItemSelect"],
2577
- _excluded2$3 = ["exceptionallySetClassName"],
2578
- _excluded3$2 = ["as"],
2623
+ const _excluded$r = ["children", "onItemSelect"],
2624
+ _excluded2$4 = ["exceptionallySetClassName"],
2625
+ _excluded3$1 = ["render"],
2579
2626
  _excluded4$1 = ["exceptionallySetClassName", "modal"],
2580
- _excluded5$1 = ["value", "children", "onSelect", "hideOnSelect", "onClick", "exceptionallySetClassName", "as"],
2627
+ _excluded5$1 = ["value", "children", "onSelect", "hideOnSelect", "onClick", "exceptionallySetClassName"],
2581
2628
  _excluded6 = ["label", "children", "exceptionallySetClassName"];
2582
- const MenuContext = /*#__PURE__*/React.createContext( // Ariakit gives us no means to obtain a valid initial/default value of type MenuStateReturn
2583
- // (it is normally obtained by calling useMenuState but we can't call hooks outside components).
2584
- // This is however of little consequence since this value is only used if some of the components
2585
- // are used outside Menu, something that should not happen and we do not support.
2586
- // @ts-expect-error
2587
- {});
2629
+ const MenuContext = /*#__PURE__*/React.createContext({
2630
+ menuStore: null,
2631
+ handleItemSelect: () => undefined,
2632
+ getAnchorRect: null,
2633
+ setAnchorRect: () => undefined
2634
+ });
2588
2635
  /**
2589
2636
  * Wrapper component to control a menu. It does not render anything, only providing the state
2590
2637
  * management for the menu components inside it.
@@ -2595,7 +2642,7 @@ function Menu(_ref) {
2595
2642
  children,
2596
2643
  onItemSelect
2597
2644
  } = _ref,
2598
- props = _objectWithoutProperties(_ref, _excluded$t);
2645
+ props = _objectWithoutProperties(_ref, _excluded$r);
2599
2646
 
2600
2647
  const [anchorRect, setAnchorRect] = React.useState(null);
2601
2648
  const getAnchorRect = React.useMemo(() => anchorRect ? () => anchorRect : null, [anchorRect]);
@@ -2617,34 +2664,41 @@ function Menu(_ref) {
2617
2664
  */
2618
2665
 
2619
2666
 
2620
- const MenuButton = /*#__PURE__*/polymorphicComponent(function MenuButton(_ref2, ref) {
2667
+ const MenuButton = /*#__PURE__*/React.forwardRef(function MenuButton(_ref2, ref) {
2621
2668
  let {
2622
2669
  exceptionallySetClassName
2623
2670
  } = _ref2,
2624
- props = _objectWithoutProperties(_ref2, _excluded2$3);
2671
+ props = _objectWithoutProperties(_ref2, _excluded2$4);
2625
2672
 
2626
2673
  const {
2627
2674
  menuStore
2628
2675
  } = React.useContext(MenuContext);
2676
+
2677
+ if (!menuStore) {
2678
+ throw new Error('MenuButton must be wrapped in <Menu/>');
2679
+ }
2680
+
2629
2681
  return /*#__PURE__*/React.createElement(react.MenuButton, _objectSpread2(_objectSpread2({}, props), {}, {
2630
2682
  store: menuStore,
2631
2683
  ref: ref,
2632
2684
  className: classNames('reactist_menubutton', exceptionallySetClassName)
2633
2685
  }));
2634
- }); //
2635
- // ContextMenuTrigger
2636
- //
2637
-
2638
- const ContextMenuTrigger = /*#__PURE__*/polymorphicComponent(function ContextMenuTrigger(_ref3, ref) {
2686
+ });
2687
+ const ContextMenuTrigger = /*#__PURE__*/React.forwardRef(function ContextMenuTrigger(_ref3, ref) {
2639
2688
  let {
2640
- as: component = 'div'
2689
+ render
2641
2690
  } = _ref3,
2642
- props = _objectWithoutProperties(_ref3, _excluded3$2);
2691
+ props = _objectWithoutProperties(_ref3, _excluded3$1);
2643
2692
 
2644
2693
  const {
2645
2694
  setAnchorRect,
2646
2695
  menuStore
2647
2696
  } = React.useContext(MenuContext);
2697
+
2698
+ if (!menuStore) {
2699
+ throw new Error('ContextMenuTrigger must be wrapped in <Menu/>');
2700
+ }
2701
+
2648
2702
  const handleContextMenu = React.useCallback(function handleContextMenu(event) {
2649
2703
  event.preventDefault();
2650
2704
  setAnchorRect({
@@ -2657,16 +2711,17 @@ const ContextMenuTrigger = /*#__PURE__*/polymorphicComponent(function ContextMen
2657
2711
  React.useEffect(() => {
2658
2712
  if (!isOpen) setAnchorRect(null);
2659
2713
  }, [isOpen, setAnchorRect]);
2660
- return /*#__PURE__*/React.createElement(component, _objectSpread2(_objectSpread2({}, props), {}, {
2714
+ return /*#__PURE__*/React.createElement(react.Role.div, _objectSpread2(_objectSpread2({}, props), {}, {
2661
2715
  onContextMenu: handleContextMenu,
2662
- ref
2716
+ ref: ref,
2717
+ render: render
2663
2718
  }));
2664
2719
  });
2665
2720
  /**
2666
2721
  * The dropdown menu itself, containing a list of menu items.
2667
2722
  */
2668
2723
 
2669
- const MenuList = /*#__PURE__*/polymorphicComponent(function MenuList(_ref4, ref) {
2724
+ const MenuList = /*#__PURE__*/React.forwardRef(function MenuList(_ref4, ref) {
2670
2725
  let {
2671
2726
  exceptionallySetClassName,
2672
2727
  modal = true
@@ -2677,6 +2732,11 @@ const MenuList = /*#__PURE__*/polymorphicComponent(function MenuList(_ref4, ref)
2677
2732
  menuStore,
2678
2733
  getAnchorRect
2679
2734
  } = React.useContext(MenuContext);
2735
+
2736
+ if (!menuStore) {
2737
+ throw new Error('MenuList must be wrapped in <Menu/>');
2738
+ }
2739
+
2680
2740
  const isOpen = menuStore.useState('open');
2681
2741
  return isOpen ? /*#__PURE__*/React.createElement(react.Portal, {
2682
2742
  preserveTabOrder: true
@@ -2695,15 +2755,14 @@ const MenuList = /*#__PURE__*/polymorphicComponent(function MenuList(_ref4, ref)
2695
2755
  * callback.
2696
2756
  */
2697
2757
 
2698
- const MenuItem = /*#__PURE__*/polymorphicComponent(function MenuItem(_ref5, ref) {
2758
+ const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(_ref5, ref) {
2699
2759
  let {
2700
2760
  value,
2701
2761
  children,
2702
2762
  onSelect,
2703
2763
  hideOnSelect = true,
2704
2764
  onClick,
2705
- exceptionallySetClassName,
2706
- as = 'button'
2765
+ exceptionallySetClassName
2707
2766
  } = _ref5,
2708
2767
  props = _objectWithoutProperties(_ref5, _excluded5$1);
2709
2768
 
@@ -2711,6 +2770,11 @@ const MenuItem = /*#__PURE__*/polymorphicComponent(function MenuItem(_ref5, ref)
2711
2770
  handleItemSelect,
2712
2771
  menuStore
2713
2772
  } = React.useContext(MenuContext);
2773
+
2774
+ if (!menuStore) {
2775
+ throw new Error('MenuItem must be wrapped in <Menu/>');
2776
+ }
2777
+
2714
2778
  const {
2715
2779
  hide
2716
2780
  } = menuStore;
@@ -2722,7 +2786,6 @@ const MenuItem = /*#__PURE__*/polymorphicComponent(function MenuItem(_ref5, ref)
2722
2786
  if (shouldClose) hide();
2723
2787
  }, [onSelect, onClick, handleItemSelect, hideOnSelect, hide, value]);
2724
2788
  return /*#__PURE__*/React.createElement(react.MenuItem, _objectSpread2(_objectSpread2({}, props), {}, {
2725
- as: as,
2726
2789
  store: menuStore,
2727
2790
  ref: ref,
2728
2791
  onClick: handleClick,
@@ -2760,6 +2823,11 @@ const SubMenu = /*#__PURE__*/React.forwardRef(function SubMenu({
2760
2823
  handleItemSelect: parentMenuItemSelect,
2761
2824
  menuStore
2762
2825
  } = React.useContext(MenuContext);
2826
+
2827
+ if (!menuStore) {
2828
+ throw new Error('SubMenu must be wrapped in <Menu/>');
2829
+ }
2830
+
2763
2831
  const {
2764
2832
  hide: parentMenuHide
2765
2833
  } = menuStore;
@@ -2768,19 +2836,16 @@ const SubMenu = /*#__PURE__*/React.forwardRef(function SubMenu({
2768
2836
  parentMenuItemSelect == null ? void 0 : parentMenuItemSelect(value);
2769
2837
  parentMenuHide();
2770
2838
  }, [parentMenuHide, parentMenuItemSelect, onItemSelect]);
2771
- const [button, list] = React.Children.toArray(children); // Ariakit needs to be able to pass props to the MenuButton and combine it with the MenuItem component
2772
-
2773
- const renderMenuButton = React.useCallback(function renderMenuButton(props) {
2774
- return /*#__PURE__*/React.cloneElement(button, props);
2775
- }, [button]);
2839
+ const [button, list] = React.Children.toArray(children);
2840
+ const buttonElement = button;
2776
2841
  return /*#__PURE__*/React.createElement(Menu, {
2777
2842
  onItemSelect: handleSubItemSelect
2778
2843
  }, /*#__PURE__*/React.createElement(react.MenuItem, {
2779
- as: "div",
2780
2844
  store: menuStore,
2781
2845
  ref: ref,
2782
- hideOnClick: false
2783
- }, renderMenuButton), list);
2846
+ hideOnClick: false,
2847
+ render: buttonElement
2848
+ }, buttonElement.props.children), list);
2784
2849
  });
2785
2850
  /**
2786
2851
  * A way to semantically group some menu items.
@@ -2789,7 +2854,7 @@ const SubMenu = /*#__PURE__*/React.forwardRef(function SubMenu({
2789
2854
  * before and/or after the group if you so wish.
2790
2855
  */
2791
2856
 
2792
- const MenuGroup = /*#__PURE__*/polymorphicComponent(function MenuGroup(_ref6, ref) {
2857
+ const MenuGroup = /*#__PURE__*/React.forwardRef(function MenuGroup(_ref6, ref) {
2793
2858
  let {
2794
2859
  label,
2795
2860
  children,
@@ -2800,6 +2865,11 @@ const MenuGroup = /*#__PURE__*/polymorphicComponent(function MenuGroup(_ref6, re
2800
2865
  const {
2801
2866
  menuStore
2802
2867
  } = React.useContext(MenuContext);
2868
+
2869
+ if (!menuStore) {
2870
+ throw new Error('MenuGroup must be wrapped in <Menu/>');
2871
+ }
2872
+
2803
2873
  return /*#__PURE__*/React.createElement(react.MenuGroup, _objectSpread2(_objectSpread2({}, props), {}, {
2804
2874
  ref: ref,
2805
2875
  store: menuStore,
@@ -2810,7 +2880,7 @@ const MenuGroup = /*#__PURE__*/polymorphicComponent(function MenuGroup(_ref6, re
2810
2880
  }, label) : null, children);
2811
2881
  });
2812
2882
 
2813
- const _excluded$u = ["type", "variant", "size", "loading", "disabled", "tooltip", "onClick", "children"];
2883
+ const _excluded$s = ["type", "variant", "size", "loading", "disabled", "tooltip", "onClick", "children"];
2814
2884
  /**
2815
2885
  * @deprecated
2816
2886
  */
@@ -2826,7 +2896,7 @@ const Button$1 = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
2826
2896
  onClick,
2827
2897
  children
2828
2898
  } = _ref,
2829
- props = _objectWithoutProperties(_ref, _excluded$u);
2899
+ props = _objectWithoutProperties(_ref, _excluded$s);
2830
2900
 
2831
2901
  const className = classNames('reactist_button', variant ? "reactist_button--" + variant : null, size !== 'default' ? "reactist_button--" + size : null, {
2832
2902
  'reactist_button--loading': loading
@@ -2849,7 +2919,7 @@ Button$1.defaultProps = {
2849
2919
  disabled: false
2850
2920
  };
2851
2921
 
2852
- const _excluded$v = ["children", "onClick", "tooltip", "className"];
2922
+ const _excluded$t = ["children", "onClick", "tooltip", "className"];
2853
2923
 
2854
2924
  class Box$1 extends React.Component {
2855
2925
  constructor(props, context) {
@@ -3002,7 +3072,7 @@ const Trigger = /*#__PURE__*/React.forwardRef(function Trigger(_ref, ref) {
3002
3072
  tooltip,
3003
3073
  className
3004
3074
  } = _ref,
3005
- props = _objectWithoutProperties(_ref, _excluded$v);
3075
+ props = _objectWithoutProperties(_ref, _excluded$t);
3006
3076
 
3007
3077
  function handleClick(event) {
3008
3078
  event.preventDefault();
@@ -3129,7 +3199,7 @@ function ColorItem({
3129
3199
 
3130
3200
  ColorItem.displayName = 'ColorItem';
3131
3201
 
3132
- const _excluded$w = ["children", "className", "translateKey", "isMac"];
3202
+ const _excluded$u = ["children", "className", "translateKey", "isMac"];
3133
3203
  // Support for setting up how to translate modifiers globally.
3134
3204
  //
3135
3205
 
@@ -3211,7 +3281,7 @@ function KeyboardShortcut(_ref) {
3211
3281
  translateKey = globalTranslateKey,
3212
3282
  isMac = (_navigator$platform$t = (_navigator$platform = navigator.platform) == null ? void 0 : _navigator$platform.toUpperCase().includes('MAC')) != null ? _navigator$platform$t : false
3213
3283
  } = _ref,
3214
- props = _objectWithoutProperties(_ref, _excluded$w);
3284
+ props = _objectWithoutProperties(_ref, _excluded$u);
3215
3285
 
3216
3286
  const shortcuts = typeof children === 'string' ? [children] : children;
3217
3287
  return /*#__PURE__*/React.createElement("span", _objectSpread2({
@@ -3617,7 +3687,11 @@ Time.defaultProps = {
3617
3687
  }
3618
3688
  };
3619
3689
 
3620
- const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
3690
+ /**
3691
+ * @deprecated
3692
+ */
3693
+
3694
+ const Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
3621
3695
  const className = classNames('reactist_input', props.className);
3622
3696
  return /*#__PURE__*/React.createElement("input", _objectSpread2(_objectSpread2({}, props), {}, {
3623
3697
  className: className,
@@ -3626,7 +3700,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
3626
3700
  });
3627
3701
  Input.displayName = 'Input';
3628
3702
 
3629
- const _excluded$x = ["value", "options", "onChange", "disabled", "className", "defaultValue"];
3703
+ const _excluded$v = ["value", "options", "onChange", "disabled", "className", "defaultValue"];
3630
3704
 
3631
3705
  function Select(_ref) {
3632
3706
  let {
@@ -3637,7 +3711,7 @@ function Select(_ref) {
3637
3711
  className = '',
3638
3712
  defaultValue
3639
3713
  } = _ref,
3640
- otherProps = _objectWithoutProperties(_ref, _excluded$x);
3714
+ otherProps = _objectWithoutProperties(_ref, _excluded$v);
3641
3715
 
3642
3716
  const selectClassName = classNames('reactist_select', {
3643
3717
  disabled
@@ -3667,7 +3741,6 @@ exports.Badge = Badge;
3667
3741
  exports.Banner = Banner;
3668
3742
  exports.Box = Box;
3669
3743
  exports.Button = Button;
3670
- exports.ButtonLink = ButtonLink;
3671
3744
  exports.COLORS = COLORS;
3672
3745
  exports.CheckboxField = CheckboxField;
3673
3746
  exports.ColorPicker = ColorPicker;
@@ -3682,6 +3755,7 @@ exports.Divider = Divider;
3682
3755
  exports.Heading = Heading;
3683
3756
  exports.Hidden = Hidden;
3684
3757
  exports.HiddenVisually = HiddenVisually;
3758
+ exports.IconButton = IconButton;
3685
3759
  exports.Inline = Inline;
3686
3760
  exports.KeyCapturer = KeyCapturer;
3687
3761
  exports.KeyboardShortcut = KeyboardShortcut;
@@ -3720,5 +3794,6 @@ exports.Time = Time;
3720
3794
  exports.Toast = Toast;
3721
3795
  exports.ToastsProvider = ToastsProvider;
3722
3796
  exports.Tooltip = Tooltip;
3797
+ exports.getBoxClassNames = getBoxClassNames;
3723
3798
  exports.useToasts = useToasts;
3724
3799
  //# sourceMappingURL=reactist.cjs.development.js.map