@doist/reactist 17.10.1 → 19.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/reactist.cjs.development.js +426 -409
  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/components/color-picker/color-picker.js +1 -1
  6. package/es/components/color-picker/color-picker.js.map +1 -1
  7. package/es/components/deprecated-button/deprecated-button.js +1 -1
  8. package/es/components/deprecated-button/deprecated-button.js.map +1 -1
  9. package/es/components/time/time.js +1 -1
  10. package/es/components/time/time.js.map +1 -1
  11. package/es/index.js +2 -2
  12. package/es/new-components/badge/badge.js +12 -12
  13. package/es/new-components/badge/badge.js.map +1 -1
  14. package/es/new-components/badge/badge.module.css.js +1 -1
  15. package/es/new-components/base-button/base-button.js +1 -1
  16. package/es/new-components/base-button/base-button.js.map +1 -1
  17. package/es/new-components/box/box.module.css.js +1 -1
  18. package/es/new-components/checkbox-field/checkbox-field.js +1 -1
  19. package/es/new-components/checkbox-field/checkbox-field.js.map +1 -1
  20. package/es/{components → new-components}/menu/menu.js +7 -6
  21. package/es/new-components/menu/menu.js.map +1 -0
  22. package/es/new-components/modal/modal.js +4 -6
  23. package/es/new-components/modal/modal.js.map +1 -1
  24. package/es/new-components/password-field/password-field.js +2 -2
  25. package/es/new-components/password-field/password-field.js.map +1 -1
  26. package/es/{components → new-components}/tooltip/tooltip.js +45 -29
  27. package/es/new-components/tooltip/tooltip.js.map +1 -0
  28. package/es/new-components/tooltip/tooltip.module.css.js +4 -0
  29. package/es/new-components/tooltip/tooltip.module.css.js.map +1 -0
  30. package/lib/components/color-picker/color-picker.js +1 -1
  31. package/lib/components/color-picker/color-picker.js.map +1 -1
  32. package/lib/components/deprecated-button/deprecated-button.js +1 -1
  33. package/lib/components/deprecated-button/deprecated-button.js.map +1 -1
  34. package/lib/components/time/time.js +1 -1
  35. package/lib/components/time/time.js.map +1 -1
  36. package/lib/index.d.ts +2 -3
  37. package/lib/index.js +1 -1
  38. package/lib/new-components/badge/badge.d.ts +11 -2
  39. package/lib/new-components/badge/badge.js +1 -1
  40. package/lib/new-components/badge/badge.js.map +1 -1
  41. package/lib/new-components/badge/badge.module.css.js +1 -1
  42. package/lib/{components/menu/menu.test.d.ts → new-components/badge/badge.test.d.ts} +0 -0
  43. package/lib/new-components/base-button/base-button.d.ts +1 -1
  44. package/lib/new-components/base-button/base-button.js +1 -1
  45. package/lib/new-components/base-button/base-button.js.map +1 -1
  46. package/lib/new-components/box/box.module.css.js +1 -1
  47. package/lib/new-components/checkbox-field/checkbox-field.js +1 -1
  48. package/lib/new-components/checkbox-field/checkbox-field.js.map +1 -1
  49. package/lib/{components → new-components}/menu/index.d.ts +0 -0
  50. package/lib/{components → new-components}/menu/menu.d.ts +1 -2
  51. package/lib/new-components/menu/menu.js +2 -0
  52. package/lib/new-components/menu/menu.js.map +1 -0
  53. package/lib/{components/tooltip/tooltip.test.d.ts → new-components/menu/menu.test.d.ts} +0 -0
  54. package/lib/new-components/modal/modal.js +1 -1
  55. package/lib/new-components/modal/modal.js.map +1 -1
  56. package/lib/new-components/password-field/password-field.js +1 -1
  57. package/lib/new-components/password-field/password-field.js.map +1 -1
  58. package/lib/new-components/tooltip/index.d.ts +2 -0
  59. package/lib/new-components/tooltip/tooltip.d.ts +61 -0
  60. package/lib/new-components/tooltip/tooltip.js +2 -0
  61. package/lib/new-components/tooltip/tooltip.js.map +1 -0
  62. package/lib/new-components/tooltip/tooltip.module.css.js +2 -0
  63. package/lib/new-components/tooltip/tooltip.module.css.js.map +1 -0
  64. package/lib/new-components/tooltip/tooltip.test.d.ts +1 -0
  65. package/package.json +4 -3
  66. package/styles/alert.css +2 -2
  67. package/styles/avatar.css +1 -1
  68. package/styles/badge.css +2 -2
  69. package/styles/badge.module.css.css +1 -1
  70. package/styles/base-button.css +2 -2
  71. package/styles/base-field.css +1 -1
  72. package/styles/box.css +1 -1
  73. package/styles/box.module.css.css +1 -1
  74. package/styles/checkbox-field.css +1 -1
  75. package/styles/color-picker.css +6 -1
  76. package/styles/columns.css +1 -1
  77. package/styles/deprecated-button.css +6 -1
  78. package/styles/divider.css +1 -1
  79. package/styles/dropdown.css +6 -1
  80. package/styles/heading.css +1 -1
  81. package/styles/hidden-visually.css +1 -1
  82. package/styles/hidden.css +1 -1
  83. package/styles/loading.css +1 -1
  84. package/styles/menu.css +1 -1
  85. package/styles/modal.css +2 -2
  86. package/styles/notice.css +1 -1
  87. package/styles/password-field.css +2 -2
  88. package/styles/progress-bar.css +1 -1
  89. package/styles/reactist.css +5 -5
  90. package/styles/select-field.css +1 -1
  91. package/styles/static-toast.css +2 -2
  92. package/styles/switch-field.css +1 -1
  93. package/styles/tabs.css +1 -1
  94. package/styles/text-area.css +1 -1
  95. package/styles/text-field.css +1 -1
  96. package/styles/text-link.css +1 -1
  97. package/styles/text.css +1 -1
  98. package/styles/time.css +6 -1
  99. package/styles/tooltip.css +6 -1
  100. package/styles/tooltip.module.css.css +1 -0
  101. package/styles/use-toasts.css +2 -2
  102. package/es/components/menu/menu.js.map +0 -1
  103. package/es/components/tooltip/tooltip.js.map +0 -1
  104. package/lib/components/menu/menu.js +0 -2
  105. package/lib/components/menu/menu.js.map +0 -1
  106. package/lib/components/tooltip/index.d.ts +0 -2
  107. package/lib/components/tooltip/tooltip.d.ts +0 -15
  108. package/lib/components/tooltip/tooltip.js +0 -2
  109. package/lib/components/tooltip/tooltip.js.map +0 -1
@@ -10,16 +10,16 @@ var classNames = _interopDefault(require('classnames'));
10
10
  var flattenChildren = _interopDefault(require('react-keyed-flatten-children'));
11
11
  var tooltip = require('ariakit/tooltip');
12
12
  var portal = require('ariakit/portal');
13
- var ariakitUtils = require('ariakit-utils');
13
+ var ariakitReactUtils = require('ariakit-react-utils');
14
14
  var useCallbackRef = require('use-callback-ref');
15
15
  var FocusLock = _interopDefault(require('react-focus-lock'));
16
16
  var ariaHidden = require('aria-hidden');
17
17
  var dialog = require('ariakit/dialog');
18
18
  var tab = require('ariakit/tab');
19
+ var Ariakit = require('ariakit/menu');
19
20
  var ReactDOM = _interopDefault(require('react-dom'));
20
21
  var dayjs = _interopDefault(require('dayjs'));
21
22
  var LocalizedFormat = _interopDefault(require('dayjs/plugin/localizedFormat'));
22
- var Ariakit = require('ariakit/menu');
23
23
  var dialog$1 = require('@reach/dialog');
24
24
 
25
25
  function ownKeys(object, enumerableOnly) {
@@ -196,7 +196,7 @@ function mapResponsiveProp(fromValue, mapper) {
196
196
  };
197
197
  }
198
198
 
199
- var modules_54d944f2 = {"box":"c6a2474f","position-absolute":"_49e2264f","position-fixed":"a2c9755f","position-relative":"_1986121c","position-sticky":"c5be4e70","tablet-position-absolute":"c6d09c38","tablet-position-fixed":"_2bb75a11","tablet-position-relative":"e992df42","tablet-position-sticky":"d693740c","desktop-position-absolute":"a9f2e68e","desktop-position-fixed":"fca89ad4","desktop-position-relative":"_84913029","desktop-position-sticky":"_1f54b76e","display-block":"_78a04f11","display-flex":"_04f32a92","display-inline":"_00982f96","display-inlineBlock":"_9be0cd8f","display-inlineFlex":"_7ff24869","display-none":"e85f798b","tablet-display-block":"cc7d9996","tablet-display-flex":"aec740e8","tablet-display-inline":"_5eb29888","tablet-display-inlineBlock":"_7399782e","tablet-display-inlineFlex":"_2a4eeb4a","tablet-display-none":"cbd91c8d","desktop-display-block":"d830ca47","desktop-display-flex":"_48cb59a8","desktop-display-inline":"cd0008da","desktop-display-inlineBlock":"_9826a4c8","desktop-display-inlineFlex":"_3e3e729b","desktop-display-none":"_183faf15","flexDirection-column":"eb8408ce","flexDirection-row":"cc313af7","tablet-flexDirection-column":"_571a8cb5","tablet-flexDirection-row":"_03a092d9","desktop-flexDirection-column":"_28991a11","desktop-flexDirection-row":"_7de969fe","flexWrap-wrap":"a6716a2d","flexWrap-nowrap":"_80a7d7fe","flexShrink-0":"_88012354","flexGrow-0":"_6cce36ca","flexGrow-1":"ee7114e6","alignItems-flexStart":"d482b846","alignItems-center":"b7b3664a","alignItems-flexEnd":"_3ca6f2cc","alignItems-baseline":"f97f2803","tablet-alignItems-flexStart":"_57269e2f","tablet-alignItems-center":"_1104d48d","tablet-alignItems-flexEnd":"_86b85059","tablet-alignItems-baseline":"_884972d7","desktop-alignItems-flexStart":"_55026d8f","desktop-alignItems-center":"_49c0fe6f","desktop-alignItems-flexEnd":"_7f55b215","desktop-alignItems-baseline":"da3d398e","justifyContent-flexStart":"f64f71c8","justifyContent-center":"_85286fa2","justifyContent-flexEnd":"cf4ec4c9","justifyContent-spaceAround":"bd407abb","justifyContent-spaceBetween":"a6ae7538","justifyContent-spaceEvenly":"_0e4d97f7","tablet-justifyContent-flexStart":"f2417980","tablet-justifyContent-center":"_5dab5532","tablet-justifyContent-flexEnd":"_4f8d866f","tablet-justifyContent-spaceAround":"_2090c016","tablet-justifyContent-spaceBetween":"ecde71f9","tablet-justifyContent-spaceEvenly":"d779c879","desktop-justifyContent-flexStart":"eb59e0ec","desktop-justifyContent-center":"_4be33fff","desktop-justifyContent-flexEnd":"_14f5eeab","desktop-justifyContent-spaceBetween":"_6fc4e2ed","alignSelf-stretch":"ac494732","alignSelf-flexStart":"_32b61baa","alignSelf-center":"_757c3504","alignSelf-flexEnd":"_539c72bc","alignSelf-baseline":"_2c0ed225","tablet-alignSelf-stretch":"f5896cb5","tablet-alignSelf-flexStart":"_2313a9cc","tablet-alignSelf-center":"_2cbc3335","tablet-alignSelf-flexEnd":"_5b1e6221","tablet-alignSelf-baseline":"fd0f9da4","desktop-alignSelf-stretch":"bef42d6a","desktop-alignSelf-flexStart":"_73620997","desktop-alignSelf-center":"_4eeafebd","desktop-alignSelf-flexEnd":"_944043da","desktop-alignSelf-baseline":"_18913c93","overflow-hidden":"_57850d52","overflow-auto":"bcc25aac","overflow-visible":"eabdf554","overflow-scroll":"_382f77d7","height-full":"e7a8b591","bg-default":"_64eb02c8","bg-aside":"_4bc1d066","bg-highlight":"_7a672ba1","bg-selected":"_3191f73c","bg-toast":"_2b535d30","borderRadius-standard":"_75e98b4e","borderRadius-full":"_51ff4c0f","border-primary":"b9c6f2a1","border-secondary":"_54355849","border-tertiary":"_6199baf2","textAlign-start":"a144300d","textAlign-center":"_48affbca","textAlign-end":"_6bfe8b19","textAlign-justify":"a1168ad5","tablet-textAlign-start":"_00a122fe","tablet-textAlign-center":"_440cb970","tablet-textAlign-end":"_7d161401","tablet-textAlign-justify":"_09dfcdd3","desktop-textAlign-start":"_3ad9923a","desktop-textAlign-center":"_1b158a32","desktop-textAlign-end":"_9255e83c","desktop-textAlign-justify":"_2138258d"};
199
+ var modules_54d944f2 = {"box":"_2a3b75a1","position-absolute":"_2286072d","position-fixed":"_0847ebf3","position-relative":"_9015266f","position-sticky":"_572136cd","tablet-position-absolute":"dec0da3c","tablet-position-fixed":"eb3f61a4","tablet-position-relative":"_6a9d01dd","tablet-position-sticky":"cf9268ba","desktop-position-absolute":"_6579cc9c","desktop-position-fixed":"_3a6a421f","desktop-position-relative":"_3a6950ac","desktop-position-sticky":"_142cd372","display-block":"_9a084bff","display-flex":"_509a57b4","display-inline":"_4a786bb9","display-inlineBlock":"_5d644b40","display-inlineFlex":"_973d00d0","display-none":"_3e4f26a6","tablet-display-block":"d525fe3a","tablet-display-flex":"_316c9f4b","tablet-display-inline":"_5e788d98","tablet-display-inlineBlock":"_851fc6b8","tablet-display-inlineFlex":"c16ba46a","tablet-display-none":"_759c0c1a","desktop-display-block":"c374b455","desktop-display-flex":"_8a854d8f","desktop-display-inline":"_805fa8dc","desktop-display-inlineBlock":"ab26af05","desktop-display-inlineFlex":"_9bd12ba4","desktop-display-none":"_581476ce","flexDirection-column":"_1fb9d90e","flexDirection-row":"e5a9206f","tablet-flexDirection-column":"_3e6a0be1","tablet-flexDirection-row":"e9e2e53a","desktop-flexDirection-column":"c7d6b073","desktop-flexDirection-row":"_935269b4","flexWrap-wrap":"_3692f9c2","flexWrap-nowrap":"_55f6f487","flexShrink-0":"d5d0d34a","flexGrow-0":"d8ff7933","flexGrow-1":"_4a93668a","alignItems-flexStart":"_5a8c5a77","alignItems-center":"_50ba6b6b","alignItems-flexEnd":"_3963f790","alignItems-baseline":"_55ef2d4e","tablet-alignItems-flexStart":"_3e2bfb5d","tablet-alignItems-center":"a99be1ab","tablet-alignItems-flexEnd":"fa8221fe","tablet-alignItems-baseline":"e83669a0","desktop-alignItems-flexStart":"_65e6b537","desktop-alignItems-center":"db356482","desktop-alignItems-flexEnd":"acc08587","desktop-alignItems-baseline":"ad033867","justifyContent-flexStart":"_985b733f","justifyContent-center":"_95a98d2a","justifyContent-flexEnd":"be9bf31a","justifyContent-spaceAround":"a89d8798","justifyContent-spaceBetween":"_904ef8fe","justifyContent-spaceEvenly":"_489975d5","tablet-justifyContent-flexStart":"a7175ae7","tablet-justifyContent-center":"_7334dead","tablet-justifyContent-flexEnd":"_746de733","tablet-justifyContent-spaceAround":"_6d09398a","tablet-justifyContent-spaceBetween":"c2324c1d","tablet-justifyContent-spaceEvenly":"_04bd6e07","desktop-justifyContent-flexStart":"_39b310de","desktop-justifyContent-center":"_0dc77292","desktop-justifyContent-flexEnd":"_96c15bd8","desktop-justifyContent-spaceBetween":"_096111a6","alignSelf-stretch":"_35d69587","alignSelf-flexStart":"f46f3a67","alignSelf-center":"fb6a8035","alignSelf-flexEnd":"d3193acd","alignSelf-baseline":"_1154f656","tablet-alignSelf-stretch":"_298e04af","tablet-alignSelf-flexStart":"_2c729d24","tablet-alignSelf-center":"_9ea5e943","tablet-alignSelf-flexEnd":"_02266425","tablet-alignSelf-baseline":"c16a5800","desktop-alignSelf-stretch":"_2ec9eb74","desktop-alignSelf-flexStart":"_34f1fb03","desktop-alignSelf-center":"_77c58550","desktop-alignSelf-flexEnd":"_9ffa429f","desktop-alignSelf-baseline":"_6cc14c5d","overflow-hidden":"f6342c26","overflow-auto":"_10a2f952","overflow-visible":"f20b8b87","overflow-scroll":"_4954f87c","height-full":"a83fb2f5","bg-default":"d85cf739","bg-aside":"_4eb1d749","bg-highlight":"da1ccaa5","bg-selected":"_82dc28e7","bg-toast":"_63ba3dfa","borderRadius-standard":"_34cd2b5e","borderRadius-full":"_5fe4d5e3","border-primary":"_1b34ffd9","border-secondary":"_705519b0","border-tertiary":"_67adc238","textAlign-start":"fff8bff0","textAlign-center":"f973eed0","textAlign-end":"_225acbd7","textAlign-justify":"dea1e8ba","tablet-textAlign-start":"_919d6c8f","tablet-textAlign-center":"ab9d970e","tablet-textAlign-end":"b5b45e0e","tablet-textAlign-justify":"bd6e42e0","desktop-textAlign-start":"_15120506","desktop-textAlign-center":"_337333b5","desktop-textAlign-end":"_221db0fb","desktop-textAlign-justify":"_29ea9711"};
200
200
 
201
201
  var modules_b537a8ee = {"paddingTop-xsmall":"c4803194","paddingTop-small":"_4e9ab24b","paddingTop-medium":"_1d226e27","paddingTop-large":"eb6097f1","paddingTop-xlarge":"d3229ba4","paddingTop-xxlarge":"_47978ba4","tablet-paddingTop-xsmall":"f987719c","tablet-paddingTop-small":"_8dbc4b4d","tablet-paddingTop-medium":"ae44fe07","tablet-paddingTop-large":"ffe9548d","tablet-paddingTop-xlarge":"f2b76a44","tablet-paddingTop-xxlarge":"c6eb8f43","desktop-paddingTop-xsmall":"_8699b560","desktop-paddingTop-small":"_02c374b7","desktop-paddingTop-medium":"_0dd0332f","desktop-paddingTop-large":"da55f1f6","desktop-paddingTop-xlarge":"_8ef2a278","desktop-paddingTop-xxlarge":"_8b493b28","paddingRight-xsmall":"_211eebc7","paddingRight-small":"ad0ccf15","paddingRight-medium":"a03e39af","paddingRight-large":"f0941ead","paddingRight-xlarge":"e47c5a43","paddingRight-xxlarge":"e849a5cf","tablet-paddingRight-xsmall":"_85374228","tablet-paddingRight-small":"_89df37b9","tablet-paddingRight-medium":"_1cc50ebe","tablet-paddingRight-large":"_1060982b","tablet-paddingRight-xlarge":"be58847d","tablet-paddingRight-xxlarge":"_45093484","desktop-paddingRight-xsmall":"f8d99d6a","desktop-paddingRight-small":"efa076d9","desktop-paddingRight-medium":"e59caa64","desktop-paddingRight-large":"da42f46a","desktop-paddingRight-xlarge":"b3ee2580","desktop-paddingRight-xxlarge":"_3ef94658","paddingBottom-xsmall":"b0e6eab4","paddingBottom-small":"_9510d053","paddingBottom-medium":"d7af60c9","paddingBottom-large":"b75f86cd","paddingBottom-xlarge":"fbd4ce29","paddingBottom-xxlarge":"_33e3ad63","tablet-paddingBottom-xsmall":"f0302da7","tablet-paddingBottom-small":"_4f9b8012","tablet-paddingBottom-medium":"_4333e20e","tablet-paddingBottom-large":"_30bbc76c","tablet-paddingBottom-xlarge":"ba5a4008","tablet-paddingBottom-xxlarge":"_423a3b1a","desktop-paddingBottom-xsmall":"b40139b7","desktop-paddingBottom-small":"f96071fa","desktop-paddingBottom-medium":"fe803c9a","desktop-paddingBottom-large":"_01686eb9","desktop-paddingBottom-xlarge":"afa763d8","desktop-paddingBottom-xxlarge":"a95785f1","paddingLeft-xsmall":"cad4e2ec","paddingLeft-small":"d70b3c17","paddingLeft-medium":"_8c851bd6","paddingLeft-large":"_078feb3c","paddingLeft-xlarge":"_76ab968c","paddingLeft-xxlarge":"aaca85d7","tablet-paddingLeft-xsmall":"_5eb0e5aa","tablet-paddingLeft-small":"_0384fb4f","tablet-paddingLeft-medium":"edffff6f","tablet-paddingLeft-large":"_873b9a46","tablet-paddingLeft-xlarge":"_89105db5","tablet-paddingLeft-xxlarge":"db1966fe","desktop-paddingLeft-xsmall":"b17f826b","desktop-paddingLeft-small":"_6dc83610","desktop-paddingLeft-medium":"_3421b8b2","desktop-paddingLeft-large":"_68cec7a6","desktop-paddingLeft-xlarge":"_94bde020","desktop-paddingLeft-xxlarge":"b94ee579"};
202
202
 
@@ -454,7 +454,7 @@ const HiddenVisually = /*#__PURE__*/polymorphicComponent(function HiddenVisually
454
454
  }));
455
455
  });
456
456
 
457
- const _excluded$6 = ["children", "content", "position", "gapSize", "className"];
457
+ var modules_95f1407a = {"tooltip":"_2b075a8d"};
458
458
 
459
459
  const SHOW_DELAY = 500;
460
460
  const HIDE_DELAY = 100;
@@ -468,16 +468,14 @@ function useDelayedTooltipState(initialState) {
468
468
  }), [delay, tooltipState]);
469
469
  }
470
470
 
471
- function Tooltip(_ref) {
472
- let {
473
- children,
474
- content,
475
- position = 'top',
476
- gapSize = 3,
477
- className
478
- } = _ref,
479
- props = _objectWithoutProperties(_ref, _excluded$6);
480
-
471
+ function Tooltip({
472
+ children,
473
+ content,
474
+ position = 'top',
475
+ gapSize = 3,
476
+ withArrow = false,
477
+ exceptionallySetClassName
478
+ }) {
481
479
  const state = useDelayedTooltipState({
482
480
  placement: position,
483
481
  gutter: gapSize
@@ -495,19 +493,19 @@ function Tooltip(_ref) {
495
493
  * Prevents the tooltip from automatically firing on focus all the time. This is to prevent
496
494
  * tooltips from showing when the trigger element is focused back after a popover or dialog that
497
495
  * it opened was closed. See link below for more details.
498
- * @see https://github.com/reakit/reakit/discussions/749
496
+ * @see https://github.com/ariakit/ariakit/discussions/749
499
497
  */
500
498
 
501
499
 
502
500
  function handleFocus(event) {
503
501
  var _child$props;
504
502
 
505
- // If focus is not followed by a key up event, does it mean that it's not
506
- // an intentional keyboard focus? Not sure but it seems to work.
507
- // This may be resolved soon in an upcoming version of reakit:
508
- // https://github.com/reakit/reakit/issues/750
509
- function handleKeyUp(e) {
510
- const eventKey = e.key;
503
+ // If focus is not followed by a key up event, does it mean that it's not an intentional
504
+ // keyboard focus? Not sure but it seems to work.
505
+ // This may be resolved soon in an upcoming version of ariakit:
506
+ // https://github.com/ariakit/ariakit/issues/750
507
+ function handleKeyUp(event) {
508
+ const eventKey = event.key;
511
509
 
512
510
  if (eventKey !== 'Escape' && eventKey !== 'Enter' && eventKey !== 'Space') {
513
511
  state.show();
@@ -516,25 +514,44 @@ function Tooltip(_ref) {
516
514
 
517
515
  event.currentTarget.addEventListener('keyup', handleKeyUp, {
518
516
  once: true
519
- }); // Prevent tooltip.show from being called by TooltipReference
517
+ });
518
+ event.preventDefault(); // Prevent tooltip.show from being called by TooltipReference
520
519
 
521
- event.preventDefault();
522
520
  child == null ? void 0 : (_child$props = child.props) == null ? void 0 : _child$props.onFocus == null ? void 0 : _child$props.onFocus(event);
523
521
  }
524
522
 
523
+ function handleBlur(event) {
524
+ var _child$props2;
525
+
526
+ state.hide();
527
+ child == null ? void 0 : (_child$props2 = child.props) == null ? void 0 : _child$props2.onBlur == null ? void 0 : _child$props2.onBlur(event);
528
+ }
529
+
525
530
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(tooltip.TooltipAnchor, {
526
531
  state: state,
527
532
  ref: child.ref,
528
- onFocus: handleFocus
533
+ described: true
529
534
  }, anchorProps => {
530
535
  // Let child props override anchor props so user can specify attributes like tabIndex
531
536
  // Also, do not apply the child's props to TooltipAnchor as props like `as` can create problems
532
537
  // by applying the replacement component/element twice
533
- return /*#__PURE__*/React.cloneElement(child, _objectSpread2(_objectSpread2({}, anchorProps), child.props));
534
- }), state.visible ? /*#__PURE__*/React.createElement(tooltip.Tooltip, _objectSpread2(_objectSpread2({}, props), {}, {
538
+ return /*#__PURE__*/React.cloneElement(child, _objectSpread2(_objectSpread2(_objectSpread2({}, anchorProps), child.props), {}, {
539
+ onFocus: handleFocus,
540
+ onBlur: handleBlur
541
+ }));
542
+ }), state.open ? /*#__PURE__*/React.createElement(Box, {
543
+ as: tooltip.Tooltip,
535
544
  state: state,
536
- className: classNames('reactist_tooltip', className)
537
- }), typeof content === 'function' ? content() : content) : null);
545
+ className: [modules_95f1407a.tooltip, exceptionallySetClassName],
546
+ background: "toast",
547
+ borderRadius: "standard",
548
+ paddingX: "small",
549
+ paddingY: "xsmall",
550
+ maxWidth: "medium",
551
+ width: "fitContent",
552
+ overflow: "hidden",
553
+ textAlign: "center"
554
+ }, withArrow ? /*#__PURE__*/React.createElement(tooltip.TooltipArrow, null) : null, typeof content === 'function' ? content() : content) : null);
538
555
  }
539
556
  // Internal helpers
540
557
  //
@@ -592,7 +609,7 @@ function Spinner({
592
609
 
593
610
  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"};
594
611
 
595
- const _excluded$7 = ["as", "variant", "tone", "size", "shape", "disabled", "loading", "tooltip", "onClick", "exceptionallySetClassName", "children", "startIcon", "endIcon", "icon", "width", "align"];
612
+ const _excluded$6 = ["as", "variant", "tone", "size", "shape", "disabled", "loading", "tooltip", "onClick", "exceptionallySetClassName", "children", "startIcon", "endIcon", "icon", "width", "align"];
596
613
 
597
614
  function preventDefault(event) {
598
615
  event.preventDefault();
@@ -625,7 +642,7 @@ const BaseButton = /*#__PURE__*/polymorphicComponent(function BaseButton(_ref, r
625
642
  width = 'auto',
626
643
  align = 'center'
627
644
  } = _ref,
628
- props = _objectWithoutProperties(_ref, _excluded$7);
645
+ props = _objectWithoutProperties(_ref, _excluded$6);
629
646
 
630
647
  const isDisabled = loading || disabled;
631
648
  const buttonElement = /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -657,7 +674,7 @@ const BaseButton = /*#__PURE__*/polymorphicComponent(function BaseButton(_ref, r
657
674
  }, buttonElement) : buttonElement;
658
675
  });
659
676
 
660
- const _excluded$8 = ["variant", "tone", "size", "type", "disabled", "exceptionallySetClassName"];
677
+ const _excluded$7 = ["variant", "tone", "size", "type", "disabled", "exceptionallySetClassName"];
661
678
  /**
662
679
  * A semantic button that also looks like a button, and provides all the necessary visual variants.
663
680
  * It follows the [WAI-ARIA Button Pattern](https://www.w3.org/TR/wai-aria-practices/#button).
@@ -674,7 +691,7 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
674
691
  disabled = false,
675
692
  exceptionallySetClassName
676
693
  } = _ref,
677
- props = _objectWithoutProperties(_ref, _excluded$8);
694
+ props = _objectWithoutProperties(_ref, _excluded$7);
678
695
 
679
696
  return /*#__PURE__*/React.createElement(BaseButton, _objectSpread2(_objectSpread2({}, props), {}, {
680
697
  as: "button",
@@ -688,7 +705,7 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
688
705
  }));
689
706
  });
690
707
 
691
- const _excluded$9 = ["tone"];
708
+ const _excluded$8 = ["tone"];
692
709
  const alertIconForTone = {
693
710
  info: AlertInfoIcon,
694
711
  positive: AlertPositiveIcon,
@@ -700,7 +717,7 @@ function AlertIcon(_ref) {
700
717
  let {
701
718
  tone
702
719
  } = _ref,
703
- props = _objectWithoutProperties(_ref, _excluded$9);
720
+ props = _objectWithoutProperties(_ref, _excluded$8);
704
721
 
705
722
  const Icon = alertIconForTone[tone];
706
723
  return Icon ? /*#__PURE__*/React.createElement(Icon, _objectSpread2({}, props)) : null;
@@ -813,7 +830,7 @@ function Alert({
813
830
  })) : null));
814
831
  }
815
832
 
816
- const _excluded$a = ["size", "exceptionallySetClassName"];
833
+ const _excluded$9 = ["size", "exceptionallySetClassName"];
817
834
  const sizeMapping = {
818
835
  xsmall: 16,
819
836
  small: 24,
@@ -828,7 +845,7 @@ function Loading(_ref) {
828
845
  size = 'small',
829
846
  exceptionallySetClassName
830
847
  } = _ref,
831
- props = _objectWithoutProperties(_ref, _excluded$a);
848
+ props = _objectWithoutProperties(_ref, _excluded$9);
832
849
 
833
850
  const numericSize = (_sizeMapping$size = sizeMapping[size]) != null ? _sizeMapping$size : sizeMapping.small;
834
851
  const ariaLabel = props['aria-label'] ? props['aria-label'] : !props['aria-labelledby'] ? 'Loading…' : undefined;
@@ -871,7 +888,7 @@ function Notice({
871
888
 
872
889
  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"};
873
890
 
874
- const _excluded$b = ["as", "size", "weight", "tone", "align", "children", "lineClamp", "exceptionallySetClassName"];
891
+ const _excluded$a = ["as", "size", "weight", "tone", "align", "children", "lineClamp", "exceptionallySetClassName"];
875
892
  const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
876
893
  let {
877
894
  as,
@@ -883,7 +900,7 @@ const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
883
900
  lineClamp,
884
901
  exceptionallySetClassName
885
902
  } = _ref,
886
- props = _objectWithoutProperties(_ref, _excluded$b);
903
+ props = _objectWithoutProperties(_ref, _excluded$a);
887
904
 
888
905
  const lineClampMultipleLines = typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp != null ? lineClamp : 1) > 1;
889
906
  return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -899,7 +916,7 @@ const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
899
916
 
900
917
  var modules_d11e18f0 = {"stackedToastsView":"_8e9f0a55","toastContainer":"_121b9429","slot":"_6a2a04c5"};
901
918
 
902
- const _excluded$c = ["message", "description", "icon", "action", "onDismiss", "dismissLabel"];
919
+ const _excluded$b = ["message", "description", "icon", "action", "onDismiss", "dismissLabel"];
903
920
  /**
904
921
  * A toast that shows a message, and an optional action associated with it.
905
922
  *
@@ -924,7 +941,7 @@ const StaticToast = /*#__PURE__*/React__default.forwardRef(function Toast(_ref,
924
941
  onDismiss,
925
942
  dismissLabel = 'Close'
926
943
  } = _ref,
927
- props = _objectWithoutProperties(_ref, _excluded$c);
944
+ props = _objectWithoutProperties(_ref, _excluded$b);
928
945
 
929
946
  return /*#__PURE__*/React__default.createElement(Box, _objectSpread2({
930
947
  ref: ref,
@@ -1165,7 +1182,7 @@ function useToastsAnimation() {
1165
1182
  };
1166
1183
  }
1167
1184
 
1168
- const _excluded$d = ["toastId"];
1185
+ const _excluded$c = ["toastId"];
1169
1186
  /** @private */
1170
1187
 
1171
1188
  const InternalToast = /*#__PURE__*/React__default.forwardRef(function InternalToast({
@@ -1274,7 +1291,7 @@ function ToastsProvider({
1274
1291
  let {
1275
1292
  toastId
1276
1293
  } = _ref,
1277
- props = _objectWithoutProperties(_ref, _excluded$d);
1294
+ props = _objectWithoutProperties(_ref, _excluded$c);
1278
1295
 
1279
1296
  return /*#__PURE__*/React__default.createElement(InternalToast, _objectSpread2({
1280
1297
  key: toastId,
@@ -1350,7 +1367,7 @@ function Toast(props) {
1350
1367
 
1351
1368
  var modules_949d2ff4 = {"heading":"_71a1610c","weight-light":"_63750f40","tone-secondary":"_9ce984cf","tone-danger":"_1acad35e","size-largest":"_3da27a00","size-larger":"df220733","size-smaller":"eb373739","lineClampMultipleLines":"f53cfd2b","lineClamp-1":"e4819fc9","lineClamp-2":"a0ed6177","lineClamp-3":"_180d433e","lineClamp-4":"_40826ad9","lineClamp-5":"_5999b247"};
1352
1369
 
1353
- const _excluded$e = ["level", "weight", "size", "tone", "children", "lineClamp", "align", "exceptionallySetClassName"];
1370
+ const _excluded$d = ["level", "weight", "size", "tone", "children", "lineClamp", "align", "exceptionallySetClassName"];
1354
1371
  const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
1355
1372
  let {
1356
1373
  level,
@@ -1362,7 +1379,7 @@ const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
1362
1379
  align,
1363
1380
  exceptionallySetClassName
1364
1381
  } = _ref,
1365
- props = _objectWithoutProperties(_ref, _excluded$e);
1382
+ props = _objectWithoutProperties(_ref, _excluded$d);
1366
1383
 
1367
1384
  // In TypeScript v4.1, this would be properly recognized without needing the type assertion
1368
1385
  // https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types
@@ -1379,7 +1396,7 @@ const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
1379
1396
  }), children);
1380
1397
  });
1381
1398
 
1382
- const _excluded$f = ["as", "variant", "tone", "size", "exceptionallySetClassName", "openInNewTab"];
1399
+ const _excluded$e = ["as", "variant", "tone", "size", "exceptionallySetClassName", "openInNewTab"];
1383
1400
  /**
1384
1401
  * A semantic link that looks like a button, exactly matching the `Button` component in all visual
1385
1402
  * aspects.
@@ -1396,7 +1413,7 @@ const ButtonLink = /*#__PURE__*/polymorphicComponent(function ButtonLink(_ref, r
1396
1413
  exceptionallySetClassName,
1397
1414
  openInNewTab = false
1398
1415
  } = _ref,
1399
- props = _objectWithoutProperties(_ref, _excluded$f);
1416
+ props = _objectWithoutProperties(_ref, _excluded$e);
1400
1417
 
1401
1418
  return /*#__PURE__*/React.createElement(BaseButton, _objectSpread2(_objectSpread2({}, props), {}, {
1402
1419
  as: as,
@@ -1412,14 +1429,14 @@ const ButtonLink = /*#__PURE__*/polymorphicComponent(function ButtonLink(_ref, r
1412
1429
 
1413
1430
  var modules_3d05deee = {"container":"fdc181b3"};
1414
1431
 
1415
- const _excluded$g = ["as", "openInNewTab", "exceptionallySetClassName"];
1432
+ const _excluded$f = ["as", "openInNewTab", "exceptionallySetClassName"];
1416
1433
  const TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref) {
1417
1434
  let {
1418
1435
  as = 'a',
1419
1436
  openInNewTab = false,
1420
1437
  exceptionallySetClassName
1421
1438
  } = _ref,
1422
- props = _objectWithoutProperties(_ref, _excluded$g);
1439
+ props = _objectWithoutProperties(_ref, _excluded$f);
1423
1440
 
1424
1441
  return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
1425
1442
  as: as,
@@ -1431,7 +1448,7 @@ const TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref)
1431
1448
  }));
1432
1449
  });
1433
1450
 
1434
- const _excluded$h = ["checked", "indeterminate", "disabled"];
1451
+ const _excluded$g = ["checked", "indeterminate", "disabled"];
1435
1452
  const svgPath = {
1436
1453
  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',
1437
1454
  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',
@@ -1470,7 +1487,7 @@ function CheckboxIcon(_ref) {
1470
1487
  indeterminate,
1471
1488
  disabled
1472
1489
  } = _ref,
1473
- props = _objectWithoutProperties(_ref, _excluded$h);
1490
+ props = _objectWithoutProperties(_ref, _excluded$g);
1474
1491
 
1475
1492
  const pathKey = getPathKey({
1476
1493
  checked,
@@ -1491,7 +1508,7 @@ function CheckboxIcon(_ref) {
1491
1508
 
1492
1509
  var modules_664a6a80 = {"container":"_84dfdb83","disabled":"_131a2ca4","checked":"_95b1556d","keyFocused":"_49de7ebd","icon":"_6b4b1851","label":"_9047f3bd"};
1493
1510
 
1494
- const _excluded$i = ["label", "icon", "disabled", "indeterminate", "defaultChecked", "onChange"];
1511
+ const _excluded$h = ["label", "icon", "disabled", "indeterminate", "defaultChecked", "onChange"];
1495
1512
  const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref, ref) {
1496
1513
  var _ref2, _props$checked, _props$checked2;
1497
1514
 
@@ -1503,7 +1520,7 @@ const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref,
1503
1520
  defaultChecked,
1504
1521
  onChange
1505
1522
  } = _ref,
1506
- props = _objectWithoutProperties(_ref, _excluded$i);
1523
+ props = _objectWithoutProperties(_ref, _excluded$h);
1507
1524
 
1508
1525
  const isControlledComponent = typeof props.checked === 'boolean';
1509
1526
 
@@ -1522,7 +1539,7 @@ const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref,
1522
1539
  const [checkedState, setChecked] = React.useState((_ref2 = (_props$checked = props.checked) != null ? _props$checked : defaultChecked) != null ? _ref2 : false);
1523
1540
  const isChecked = (_props$checked2 = props.checked) != null ? _props$checked2 : checkedState;
1524
1541
  const internalRef = React.useRef(null);
1525
- const combinedRef = ariakitUtils.useForkRef(internalRef, ref);
1542
+ const combinedRef = ariakitReactUtils.useForkRef(internalRef, ref);
1526
1543
  React.useEffect(function setIndeterminate() {
1527
1544
  if (internalRef.current && typeof indeterminate === 'boolean') {
1528
1545
  internalRef.current.indeterminate = indeterminate;
@@ -1718,7 +1735,7 @@ var modules_3f03ead6 = {"inputWrapper":"_66b448b3"};
1718
1735
 
1719
1736
  var modules_aaf25250 = {"inputWrapper":"fb09cd05","bordered":"f65f40dd","error":"_29118bf0","startIcon":"a40eb111"};
1720
1737
 
1721
- const _excluded$j = ["variant", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "togglePasswordLabel", "hidden", "aria-describedby"];
1738
+ const _excluded$i = ["variant", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "togglePasswordLabel", "hidden", "aria-describedby"];
1722
1739
  const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref, ref) {
1723
1740
  let {
1724
1741
  variant = 'default',
@@ -1733,11 +1750,11 @@ const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref,
1733
1750
  hidden,
1734
1751
  'aria-describedby': ariaDescribedBy
1735
1752
  } = _ref,
1736
- props = _objectWithoutProperties(_ref, _excluded$j);
1753
+ props = _objectWithoutProperties(_ref, _excluded$i);
1737
1754
 
1738
1755
  const id = useId(props.id);
1739
1756
  const internalRef = React.useRef(null);
1740
- const inputRef = ariakitUtils.useForkRef(internalRef, ref);
1757
+ const inputRef = ariakitReactUtils.useForkRef(internalRef, ref);
1741
1758
  const [isPasswordVisible, setPasswordVisible] = React.useState(false);
1742
1759
 
1743
1760
  function togglePasswordVisibility() {
@@ -1782,7 +1799,7 @@ const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref,
1782
1799
 
1783
1800
  var modules_1fa9b208 = {"selectWrapper":"a804edbf","bordered":"_50a3655f","error":"a6d38abf"};
1784
1801
 
1785
- const _excluded$k = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "children", "hidden", "aria-describedby"];
1802
+ const _excluded$j = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "children", "hidden", "aria-describedby"];
1786
1803
  const SelectField = /*#__PURE__*/React.forwardRef(function SelectField(_ref, ref) {
1787
1804
  let {
1788
1805
  variant = 'default',
@@ -1798,7 +1815,7 @@ const SelectField = /*#__PURE__*/React.forwardRef(function SelectField(_ref, ref
1798
1815
  hidden,
1799
1816
  'aria-describedby': ariaDescribedBy
1800
1817
  } = _ref,
1801
- props = _objectWithoutProperties(_ref, _excluded$k);
1818
+ props = _objectWithoutProperties(_ref, _excluded$j);
1802
1819
 
1803
1820
  return /*#__PURE__*/React.createElement(BaseField, {
1804
1821
  variant: variant,
@@ -1836,7 +1853,7 @@ function SelectChevron(props) {
1836
1853
 
1837
1854
  var modules_8e05f7c9 = {"container":"ec63c3f1","disabled":"_7de9c06d","checked":"a37981fc","toggle":"_2a17ac45","label":"_68cc9707","handle":"_91409c7f","keyFocused":"a6490371"};
1838
1855
 
1839
- const _excluded$l = ["label", "hint", "disabled", "hidden", "defaultChecked", "id", "aria-describedby", "aria-label", "aria-labelledby", "onChange"];
1856
+ const _excluded$k = ["label", "hint", "disabled", "hidden", "defaultChecked", "id", "aria-describedby", "aria-label", "aria-labelledby", "onChange"];
1840
1857
  const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref) {
1841
1858
  var _ref2, _props$checked, _props$checked2;
1842
1859
 
@@ -1852,7 +1869,7 @@ const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref
1852
1869
  'aria-labelledby': originalAriaLabelledby,
1853
1870
  onChange
1854
1871
  } = _ref,
1855
- props = _objectWithoutProperties(_ref, _excluded$l);
1872
+ props = _objectWithoutProperties(_ref, _excluded$k);
1856
1873
 
1857
1874
  const id = useId(originalId);
1858
1875
  const hintId = useId();
@@ -1912,7 +1929,7 @@ const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref
1912
1929
 
1913
1930
  var modules_2728c236 = {"textAreaContainer":"_21dbfa84","innerContainer":"_43588660","bordered":"f081b428","error":"a862f0e5","autoExpand":"_46360b15"};
1914
1931
 
1915
- const _excluded$m = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "hidden", "aria-describedby", "rows", "autoExpand"];
1932
+ const _excluded$l = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "hidden", "aria-describedby", "rows", "autoExpand"];
1916
1933
  const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
1917
1934
  let {
1918
1935
  variant = 'default',
@@ -1929,7 +1946,7 @@ const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
1929
1946
  rows,
1930
1947
  autoExpand = false
1931
1948
  } = _ref,
1932
- props = _objectWithoutProperties(_ref, _excluded$m);
1949
+ props = _objectWithoutProperties(_ref, _excluded$l);
1933
1950
 
1934
1951
  const containerRef = React.useRef(null);
1935
1952
  const internalRef = React.useRef(null);
@@ -1973,7 +1990,7 @@ const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
1973
1990
  }))));
1974
1991
  });
1975
1992
 
1976
- const _excluded$n = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "type", "maxWidth", "hidden", "aria-describedby", "startIcon"];
1993
+ const _excluded$m = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "type", "maxWidth", "hidden", "aria-describedby", "startIcon"];
1977
1994
  const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
1978
1995
  let {
1979
1996
  variant = 'default',
@@ -1990,7 +2007,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
1990
2007
  'aria-describedby': ariaDescribedBy,
1991
2008
  startIcon
1992
2009
  } = _ref,
1993
- props = _objectWithoutProperties(_ref, _excluded$n);
2010
+ props = _objectWithoutProperties(_ref, _excluded$m);
1994
2011
 
1995
2012
  const internalRef = React.useRef(null);
1996
2013
  const combinedRef = useCallbackRef.useMergeRefs([ref, internalRef]);
@@ -2059,7 +2076,7 @@ function emailToIndex(email, maxIndex) {
2059
2076
 
2060
2077
  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"};
2061
2078
 
2062
- const _excluded$o = ["user", "avatarUrl", "size", "className", "colorList", "exceptionallySetClassName"];
2079
+ const _excluded$n = ["user", "avatarUrl", "size", "className", "colorList", "exceptionallySetClassName"];
2063
2080
  const AVATAR_COLORS = ['#fcc652', '#e9952c', '#e16b2d', '#d84b40', '#e8435a', '#e5198a', '#ad3889', '#86389c', '#a8a8a8', '#98be2f', '#5d9d50', '#5f9f85', '#5bbcb6', '#32a3bf', '#2bafeb', '#2d88c3', '#3863cc', '#5e5e5e'];
2064
2081
 
2065
2082
  function Avatar(_ref) {
@@ -2071,7 +2088,7 @@ function Avatar(_ref) {
2071
2088
  colorList = AVATAR_COLORS,
2072
2089
  exceptionallySetClassName
2073
2090
  } = _ref,
2074
- props = _objectWithoutProperties(_ref, _excluded$o);
2091
+ props = _objectWithoutProperties(_ref, _excluded$n);
2075
2092
 
2076
2093
  const userInitials = getInitials(user.name) || getInitials(user.email);
2077
2094
  const avatarSize = size ? size : 'l';
@@ -2091,27 +2108,28 @@ function Avatar(_ref) {
2091
2108
 
2092
2109
  Avatar.displayName = 'Avatar';
2093
2110
 
2094
- var modules_33c7c985 = {"badge":"_1eb9b834","badge-neutral":"e02d9b99","badge-positive":"_0243fb89","badge-color":"_85c0ffa3"};
2111
+ var modules_33c7c985 = {"badge":"c717b894","badge-info":"_0fddcc47","badge-positive":"_62550d9b","badge-promote":"_5fdf5bab","badge-attention":"_2d52906f"};
2112
+
2113
+ const _excluded$o = ["tone", "label"];
2095
2114
 
2096
- const _excluded$p = ["variant", "children", "exceptionallySetClassName"];
2097
- const Badge = /*#__PURE__*/polymorphicComponent(function Badge(_ref, ref) {
2115
+ function Badge(_ref) {
2098
2116
  let {
2099
- variant = 'neutral',
2100
- children,
2101
- exceptionallySetClassName
2117
+ tone,
2118
+ label
2102
2119
  } = _ref,
2103
- rest = _objectWithoutProperties(_ref, _excluded$p);
2120
+ props = _objectWithoutProperties(_ref, _excluded$o);
2104
2121
 
2105
- return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, rest), {}, {
2106
- ref: ref,
2122
+ return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
2123
+ as: "span" // It enables putting the badge inside a button (https://stackoverflow.com/a/12982334)
2124
+ ,
2107
2125
  display: "inline",
2108
- className: [modules_33c7c985.badge, modules_33c7c985["badge-" + variant], exceptionallySetClassName]
2109
- }), children);
2110
- });
2126
+ className: [modules_33c7c985.badge, modules_33c7c985["badge-" + tone]]
2127
+ }), label);
2128
+ }
2111
2129
 
2112
2130
  var modules_8f59d13b = {"overlay":"_868392ae","fadein":"_63d7ee15","fitContent":"b8548bf2","container":"_31956461","full":"_1007df83","large":"_10c275aa","medium":"_0ac526b4","small":"_30f38fdb","xlarge":"_54868e8b","expand":"c0bc68bc","buttonContainer":"_6527332a","headerContent":"_4750dc1b"};
2113
2131
 
2114
- const _excluded$q = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "exceptionallySetOverlayClassName", "autoFocus", "hideOnEscape", "hideOnInteractOutside", "children", "portalElement"],
2132
+ const _excluded$p = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "exceptionallySetOverlayClassName", "autoFocus", "hideOnEscape", "hideOnInteractOutside", "children", "portalElement"],
2115
2133
  _excluded2$1 = ["children", "button", "withDivider", "exceptionallySetClassName"],
2116
2134
  _excluded3 = ["exceptionallySetClassName", "children"],
2117
2135
  _excluded4 = ["exceptionallySetClassName", "withDivider"],
@@ -2149,16 +2167,16 @@ function Modal(_ref) {
2149
2167
  children,
2150
2168
  portalElement
2151
2169
  } = _ref,
2152
- props = _objectWithoutProperties(_ref, _excluded$q);
2170
+ props = _objectWithoutProperties(_ref, _excluded$p);
2153
2171
 
2154
- const setVisible = React.useCallback(visible => {
2172
+ const setOpen = React.useCallback(visible => {
2155
2173
  if (!visible) {
2156
2174
  onDismiss == null ? void 0 : onDismiss();
2157
2175
  }
2158
2176
  }, [onDismiss]);
2159
2177
  const state = dialog.useDialogState({
2160
- visible: isOpen,
2161
- setVisible
2178
+ open: isOpen,
2179
+ setOpen
2162
2180
  });
2163
2181
  const contextValue = React.useMemo(() => ({
2164
2182
  onDismiss,
@@ -2190,9 +2208,7 @@ function Modal(_ref) {
2190
2208
  return null;
2191
2209
  }
2192
2210
 
2193
- return /*#__PURE__*/React.createElement(portal.Portal // @ts-expect-error `portalRef` doesn't accept MutableRefObject initialized as null
2194
- , {
2195
- // @ts-expect-error `portalRef` doesn't accept MutableRefObject initialized as null
2211
+ return /*#__PURE__*/React.createElement(portal.Portal, {
2196
2212
  portalRef: portalRef,
2197
2213
  portalElement: portalElement
2198
2214
  }, /*#__PURE__*/React.createElement(Box, {
@@ -2400,7 +2416,7 @@ function usePrevious(value) {
2400
2416
 
2401
2417
  var modules_40c67f5b = {"tab":"e96bf360","track":"_430e252d","tab-neutral":"f631ccbe","tab-themed":"_6ba96acc","track-neutral":"ef4cd8d3","track-themed":"_344b3b10"};
2402
2418
 
2403
- const _excluded$r = ["as", "children", "id", "exceptionallySetClassName"],
2419
+ const _excluded$q = ["as", "children", "id", "exceptionallySetClassName"],
2404
2420
  _excluded2$2 = ["children", "space"],
2405
2421
  _excluded3$1 = ["children", "id", "as", "render"];
2406
2422
  const TabsContext = /*#__PURE__*/React.createContext(null);
@@ -2451,7 +2467,7 @@ const Tab = /*#__PURE__*/polymorphicComponent(function Tab(_ref, ref) {
2451
2467
  id,
2452
2468
  exceptionallySetClassName
2453
2469
  } = _ref,
2454
- props = _objectWithoutProperties(_ref, _excluded$r);
2470
+ props = _objectWithoutProperties(_ref, _excluded$q);
2455
2471
 
2456
2472
  const tabContextValue = React.useContext(TabsContext);
2457
2473
 
@@ -2561,101 +2577,337 @@ function TabAwareSlot({
2561
2577
  }) : null;
2562
2578
  }
2563
2579
 
2564
- const _excluded$s = ["type", "variant", "size", "loading", "disabled", "tooltip", "onClick", "children"];
2580
+ const _excluded$r = ["children", "onItemSelect"],
2581
+ _excluded2$3 = ["exceptionallySetClassName"],
2582
+ _excluded3$2 = ["as"],
2583
+ _excluded4$1 = ["exceptionallySetClassName", "modal"],
2584
+ _excluded5$1 = ["value", "children", "onSelect", "hideOnSelect", "onClick", "exceptionallySetClassName", "as"],
2585
+ _excluded6 = ["label", "children", "exceptionallySetClassName"];
2586
+ const MenuContext = /*#__PURE__*/React.createContext( // Ariakit gives us no means to obtain a valid initial/default value of type MenuStateReturn
2587
+ // (it is normally obtained by calling useMenuState but we can't call hooks outside components).
2588
+ // This is however of little consequence since this value is only used if some of the components
2589
+ // are used outside Menu, something that should not happen and we do not support.
2590
+ // @ts-expect-error
2591
+ {});
2565
2592
  /**
2566
- * @deprecated
2593
+ * Wrapper component to control a menu. It does not render anything, only providing the state
2594
+ * management for the menu components inside it.
2567
2595
  */
2568
2596
 
2569
- const Button$1 = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
2597
+ function Menu(_ref) {
2570
2598
  let {
2571
- type = 'button',
2572
- variant,
2573
- size = 'default',
2574
- loading = false,
2575
- disabled = false,
2576
- tooltip,
2577
- onClick,
2578
- children
2599
+ children,
2600
+ onItemSelect
2579
2601
  } = _ref,
2580
- props = _objectWithoutProperties(_ref, _excluded$s);
2581
-
2582
- const className = classNames('reactist_button', variant ? "reactist_button--" + variant : null, size !== 'default' ? "reactist_button--" + size : null, {
2583
- 'reactist_button--loading': loading
2584
- }, props.className);
2585
- const button = /*#__PURE__*/React.createElement("button", _objectSpread2(_objectSpread2({}, props), {}, {
2586
- ref: ref,
2587
- type: type,
2588
- className: className,
2589
- "aria-disabled": disabled || loading,
2590
- onClick: disabled || loading ? undefined : onClick
2591
- }), children);
2592
- return tooltip ? /*#__PURE__*/React.createElement(Tooltip, {
2593
- content: tooltip
2594
- }, button) : button;
2595
- });
2596
- Button$1.displayName = 'Button';
2597
- Button$1.defaultProps = {
2598
- size: 'default',
2599
- loading: false,
2600
- disabled: false
2601
- };
2602
-
2603
- const _excluded$t = ["children", "onClick", "tooltip", "className"];
2602
+ props = _objectWithoutProperties(_ref, _excluded$r);
2604
2603
 
2605
- class Box$1 extends React.Component {
2606
- constructor(props, context) {
2607
- super(props, context);
2608
- this._timeout = void 0;
2604
+ const [anchorRect, handleAnchorRectChange] = React.useState(null);
2605
+ const getAnchorRect = React.useMemo(() => {
2606
+ return anchorRect ? () => anchorRect : undefined;
2607
+ }, [anchorRect]);
2608
+ const state = Ariakit.useMenuState(_objectSpread2({
2609
+ focusLoop: true,
2610
+ gutter: 8,
2611
+ shift: 4,
2612
+ getAnchorRect
2613
+ }, props));
2614
+ const handleItemSelect = React.useCallback(function handleItemSelect(value) {
2615
+ if (onItemSelect) onItemSelect(value);
2616
+ }, [onItemSelect]);
2617
+ const value = React.useMemo(() => ({
2618
+ state,
2619
+ handleItemSelect,
2620
+ handleAnchorRectChange
2621
+ }), [state, handleItemSelect]);
2622
+ return /*#__PURE__*/React.createElement(MenuContext.Provider, {
2623
+ value: value
2624
+ }, children);
2625
+ }
2626
+ /**
2627
+ * A button to toggle a dropdown menu open or closed.
2628
+ */
2609
2629
 
2610
- this._handleClickOutside = event => {
2611
- const dropdownDOMNode = ReactDOM.findDOMNode(this);
2612
- if (dropdownDOMNode && !dropdownDOMNode.contains(event.target)) this._toggleShowBody();else if (!this.props.allowBodyInteractions) {
2613
- // won't close when body interactions are allowed
2614
- this._timeout = setTimeout(() => {
2615
- if (this.state.showBody) {
2616
- this._toggleShowBody();
2617
- }
2618
- }, 100);
2619
- }
2620
- };
2621
2630
 
2622
- this._toggleShowBody = () => {
2623
- if (!this.state.showBody) {
2624
- // will show
2625
- if (this.props.onShowBody) this.props.onShowBody();
2626
- document.addEventListener('click', this._handleClickOutside, true);
2627
- } else {
2628
- // will hide
2629
- if (this.props.onHideBody) this.props.onHideBody();
2630
- document.removeEventListener('click', this._handleClickOutside, true);
2631
- }
2631
+ const MenuButton = /*#__PURE__*/polymorphicComponent(function MenuButton(_ref2, ref) {
2632
+ let {
2633
+ exceptionallySetClassName
2634
+ } = _ref2,
2635
+ props = _objectWithoutProperties(_ref2, _excluded2$3);
2632
2636
 
2633
- this.setState({
2634
- showBody: !this.state.showBody
2635
- });
2636
- };
2637
+ const {
2638
+ state
2639
+ } = React.useContext(MenuContext);
2640
+ return /*#__PURE__*/React.createElement(Ariakit.MenuButton, _objectSpread2(_objectSpread2({}, props), {}, {
2641
+ state: state,
2642
+ ref: ref,
2643
+ className: classNames('reactist_menubutton', exceptionallySetClassName)
2644
+ }));
2645
+ }); //
2646
+ // ContextMenuTrigger
2647
+ //
2637
2648
 
2638
- this._setPosition = body => {
2639
- if (body) {
2640
- const scrollingParent = document.getElementById(this.props.scrolling_parent ? this.props.scrolling_parent : '');
2649
+ const ContextMenuTrigger = /*#__PURE__*/polymorphicComponent(function ContextMenuTrigger(_ref3, ref) {
2650
+ let {
2651
+ as: component = 'div'
2652
+ } = _ref3,
2653
+ props = _objectWithoutProperties(_ref3, _excluded3$2);
2641
2654
 
2642
- if (scrollingParent) {
2643
- const dropdown = ReactDOM.findDOMNode(this);
2655
+ const {
2656
+ handleAnchorRectChange,
2657
+ state
2658
+ } = React.useContext(MenuContext);
2659
+ const handleContextMenu = React.useCallback(event => {
2660
+ event.preventDefault();
2661
+ handleAnchorRectChange({
2662
+ x: event.clientX,
2663
+ y: event.clientY
2664
+ });
2665
+ state.show();
2666
+ }, [handleAnchorRectChange, state]);
2667
+ return /*#__PURE__*/React.createElement(component, _objectSpread2(_objectSpread2({}, props), {}, {
2668
+ onContextMenu: handleContextMenu,
2669
+ ref
2670
+ }));
2671
+ });
2672
+ /**
2673
+ * The dropdown menu itself, containing a list of menu items.
2674
+ */
2644
2675
 
2645
- if (!dropdown) {
2646
- return;
2647
- }
2676
+ const MenuList = /*#__PURE__*/polymorphicComponent(function MenuList(_ref4, ref) {
2677
+ let {
2678
+ exceptionallySetClassName,
2679
+ modal = true
2680
+ } = _ref4,
2681
+ props = _objectWithoutProperties(_ref4, _excluded4$1);
2648
2682
 
2649
- const dropdownVerticalPosition = ReactDOM.findDOMNode(this).offsetTop;
2650
- const dropdownTrigger = dropdown.querySelector('.trigger');
2683
+ const {
2684
+ state
2685
+ } = React.useContext(MenuContext);
2686
+ return state.open ? /*#__PURE__*/React.createElement(portal.Portal, {
2687
+ preserveTabOrder: true
2688
+ }, /*#__PURE__*/React.createElement(Ariakit.Menu, _objectSpread2(_objectSpread2({}, props), {}, {
2689
+ state: state,
2690
+ ref: ref,
2691
+ className: classNames('reactist_menulist', exceptionallySetClassName),
2692
+ modal: modal
2693
+ }))) : null;
2694
+ });
2695
+ /**
2696
+ * A menu item inside a menu list. It can be selected by the user, triggering the `onSelect`
2697
+ * callback.
2698
+ */
2651
2699
 
2652
- if (!dropdownTrigger) {
2653
- return;
2654
- }
2700
+ const MenuItem = /*#__PURE__*/polymorphicComponent(function MenuItem(_ref5, ref) {
2701
+ let {
2702
+ value,
2703
+ children,
2704
+ onSelect,
2705
+ hideOnSelect = true,
2706
+ onClick,
2707
+ exceptionallySetClassName,
2708
+ as = 'button'
2709
+ } = _ref5,
2710
+ props = _objectWithoutProperties(_ref5, _excluded5$1);
2655
2711
 
2656
- const dropdownTriggerHeight = dropdownTrigger.clientHeight;
2657
- const dropdownBodyHeight = body.clientHeight;
2658
- const scrollingParentHeight = scrollingParent.clientHeight;
2712
+ const {
2713
+ handleItemSelect,
2714
+ state
2715
+ } = React.useContext(MenuContext);
2716
+ const {
2717
+ hide
2718
+ } = state;
2719
+ const handleClick = React.useCallback(function handleClick(event) {
2720
+ onClick == null ? void 0 : onClick(event);
2721
+ const onSelectResult = onSelect && !event.defaultPrevented ? onSelect() : undefined;
2722
+ const shouldClose = onSelectResult !== false && hideOnSelect;
2723
+ handleItemSelect(value);
2724
+ if (shouldClose) hide();
2725
+ }, [onSelect, onClick, handleItemSelect, hideOnSelect, hide, value]);
2726
+ return /*#__PURE__*/React.createElement(Ariakit.MenuItem, _objectSpread2(_objectSpread2({}, props), {}, {
2727
+ as: as,
2728
+ state: state,
2729
+ ref: ref,
2730
+ onClick: handleClick,
2731
+ className: exceptionallySetClassName,
2732
+ hideOnClick: false
2733
+ }), children);
2734
+ });
2735
+ /**
2736
+ * This component can be rendered alongside other `MenuItem` inside a `MenuList` in order to have
2737
+ * a sub-menu.
2738
+ *
2739
+ * Its children are expected to have the structure of a first level menu (a `MenuButton` and a
2740
+ * `MenuList`).
2741
+ *
2742
+ * ```jsx
2743
+ * <MenuItem label="Edit profile" />
2744
+ * <SubMenu>
2745
+ * <MenuButton>More options</MenuButton>
2746
+ * <MenuList>
2747
+ * <MenuItem label="Preferences" />
2748
+ * <MenuItem label="Sign out" />
2749
+ * </MenuList>
2750
+ * </SubMenu>
2751
+ * ```
2752
+ *
2753
+ * The `MenuButton` will become a menu item in the current menu items list, and it will lead to
2754
+ * opening a sub-menu with the menu items list below it.
2755
+ */
2756
+
2757
+ const SubMenu = /*#__PURE__*/React.forwardRef(function SubMenu({
2758
+ children,
2759
+ onItemSelect
2760
+ }, ref) {
2761
+ const {
2762
+ handleItemSelect: parentMenuItemSelect,
2763
+ state
2764
+ } = React.useContext(MenuContext);
2765
+ const {
2766
+ hide: parentMenuHide
2767
+ } = state;
2768
+ const handleSubItemSelect = React.useCallback(function handleSubItemSelect(value) {
2769
+ if (onItemSelect) onItemSelect(value);
2770
+ parentMenuItemSelect(value);
2771
+ parentMenuHide();
2772
+ }, [parentMenuHide, parentMenuItemSelect, onItemSelect]);
2773
+ const [button, list] = React.Children.toArray(children); // Ariakit needs to be able to pass props to the MenuButton
2774
+ // and combine it with the MenuItem component
2775
+
2776
+ const renderMenuButton = React.useCallback(function renderMenuButton(props) {
2777
+ return /*#__PURE__*/React.cloneElement(button, props);
2778
+ }, [button]);
2779
+ return /*#__PURE__*/React.createElement(Menu, {
2780
+ onItemSelect: handleSubItemSelect
2781
+ }, /*#__PURE__*/React.createElement(Ariakit.MenuItem, {
2782
+ as: "div",
2783
+ state: state,
2784
+ ref: ref,
2785
+ hideOnClick: false
2786
+ }, renderMenuButton), list);
2787
+ });
2788
+ /**
2789
+ * A way to semantically group some menu items.
2790
+ *
2791
+ * This group does not add any visual separator. You can do that yourself adding `<hr />` elements
2792
+ * before and/or after the group if you so wish.
2793
+ */
2794
+
2795
+ const MenuGroup = /*#__PURE__*/polymorphicComponent(function MenuGroup(_ref6, ref) {
2796
+ let {
2797
+ label,
2798
+ children,
2799
+ exceptionallySetClassName
2800
+ } = _ref6,
2801
+ props = _objectWithoutProperties(_ref6, _excluded6);
2802
+
2803
+ const {
2804
+ state
2805
+ } = React.useContext(MenuContext);
2806
+ return /*#__PURE__*/React.createElement(Ariakit.MenuGroup, _objectSpread2(_objectSpread2({}, props), {}, {
2807
+ ref: ref,
2808
+ state: state,
2809
+ className: exceptionallySetClassName
2810
+ }), label ? /*#__PURE__*/React.createElement("div", {
2811
+ role: "presentation",
2812
+ className: "reactist_menugroup__label"
2813
+ }, label) : null, children);
2814
+ });
2815
+
2816
+ const _excluded$s = ["type", "variant", "size", "loading", "disabled", "tooltip", "onClick", "children"];
2817
+ /**
2818
+ * @deprecated
2819
+ */
2820
+
2821
+ const Button$1 = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
2822
+ let {
2823
+ type = 'button',
2824
+ variant,
2825
+ size = 'default',
2826
+ loading = false,
2827
+ disabled = false,
2828
+ tooltip,
2829
+ onClick,
2830
+ children
2831
+ } = _ref,
2832
+ props = _objectWithoutProperties(_ref, _excluded$s);
2833
+
2834
+ const className = classNames('reactist_button', variant ? "reactist_button--" + variant : null, size !== 'default' ? "reactist_button--" + size : null, {
2835
+ 'reactist_button--loading': loading
2836
+ }, props.className);
2837
+ const button = /*#__PURE__*/React.createElement("button", _objectSpread2(_objectSpread2({}, props), {}, {
2838
+ ref: ref,
2839
+ type: type,
2840
+ className: className,
2841
+ "aria-disabled": disabled || loading,
2842
+ onClick: disabled || loading ? undefined : onClick
2843
+ }), children);
2844
+ return tooltip ? /*#__PURE__*/React.createElement(Tooltip, {
2845
+ content: tooltip
2846
+ }, button) : button;
2847
+ });
2848
+ Button$1.displayName = 'Button';
2849
+ Button$1.defaultProps = {
2850
+ size: 'default',
2851
+ loading: false,
2852
+ disabled: false
2853
+ };
2854
+
2855
+ const _excluded$t = ["children", "onClick", "tooltip", "className"];
2856
+
2857
+ class Box$1 extends React.Component {
2858
+ constructor(props, context) {
2859
+ super(props, context);
2860
+ this._timeout = void 0;
2861
+
2862
+ this._handleClickOutside = event => {
2863
+ const dropdownDOMNode = ReactDOM.findDOMNode(this);
2864
+ if (dropdownDOMNode && !dropdownDOMNode.contains(event.target)) this._toggleShowBody();else if (!this.props.allowBodyInteractions) {
2865
+ // won't close when body interactions are allowed
2866
+ this._timeout = setTimeout(() => {
2867
+ if (this.state.showBody) {
2868
+ this._toggleShowBody();
2869
+ }
2870
+ }, 100);
2871
+ }
2872
+ };
2873
+
2874
+ this._toggleShowBody = () => {
2875
+ if (!this.state.showBody) {
2876
+ // will show
2877
+ if (this.props.onShowBody) this.props.onShowBody();
2878
+ document.addEventListener('click', this._handleClickOutside, true);
2879
+ } else {
2880
+ // will hide
2881
+ if (this.props.onHideBody) this.props.onHideBody();
2882
+ document.removeEventListener('click', this._handleClickOutside, true);
2883
+ }
2884
+
2885
+ this.setState({
2886
+ showBody: !this.state.showBody
2887
+ });
2888
+ };
2889
+
2890
+ this._setPosition = body => {
2891
+ if (body) {
2892
+ const scrollingParent = document.getElementById(this.props.scrolling_parent ? this.props.scrolling_parent : '');
2893
+
2894
+ if (scrollingParent) {
2895
+ const dropdown = ReactDOM.findDOMNode(this);
2896
+
2897
+ if (!dropdown) {
2898
+ return;
2899
+ }
2900
+
2901
+ const dropdownVerticalPosition = ReactDOM.findDOMNode(this).offsetTop;
2902
+ const dropdownTrigger = dropdown.querySelector('.trigger');
2903
+
2904
+ if (!dropdownTrigger) {
2905
+ return;
2906
+ }
2907
+
2908
+ const dropdownTriggerHeight = dropdownTrigger.clientHeight;
2909
+ const dropdownBodyHeight = body.clientHeight;
2910
+ const scrollingParentHeight = scrollingParent.clientHeight;
2659
2911
  const scrollingParentOffset = scrollingParent.scrollTop;
2660
2912
  const bottomOffset = scrollingParentHeight + scrollingParentOffset - dropdownVerticalPosition - dropdownTriggerHeight;
2661
2913
  const top = bottomOffset < dropdownBodyHeight;
@@ -3368,241 +3620,6 @@ Time.defaultProps = {
3368
3620
  }
3369
3621
  };
3370
3622
 
3371
- const _excluded$v = ["children", "onItemSelect"],
3372
- _excluded2$3 = ["exceptionallySetClassName"],
3373
- _excluded3$2 = ["as"],
3374
- _excluded4$1 = ["exceptionallySetClassName"],
3375
- _excluded5$1 = ["value", "children", "onSelect", "hideOnSelect", "onClick", "exceptionallySetClassName", "as"],
3376
- _excluded6 = ["label", "children", "exceptionallySetClassName"];
3377
- const MenuContext = /*#__PURE__*/React.createContext( // Ariakit gives us no means to obtain a valid initial/default value of type MenuStateReturn
3378
- // (it is normally obtained by calling useMenuState but we can't call hooks outside components).
3379
- // This is however of little consequence since this value is only used if some of the components
3380
- // are used outside Menu, something that should not happen and we do not support.
3381
- // @ts-expect-error
3382
- {});
3383
- /**
3384
- * Wrapper component to control a menu. It does not render anything, only providing the state
3385
- * management for the menu components inside it. Note that if you are relying on the `[role='menu']`
3386
- * attribute to style the menu list, it is applied a `menubar` role instead in Safari.
3387
- */
3388
-
3389
- function Menu(_ref) {
3390
- let {
3391
- children,
3392
- onItemSelect
3393
- } = _ref,
3394
- props = _objectWithoutProperties(_ref, _excluded$v);
3395
-
3396
- const [anchorRect, handleAnchorRectChange] = React.useState(null);
3397
- const getAnchorRect = React.useMemo(() => {
3398
- return anchorRect ? () => anchorRect : undefined;
3399
- }, [anchorRect]);
3400
- const state = Ariakit.useMenuState(_objectSpread2({
3401
- focusLoop: true,
3402
- gutter: 8,
3403
- shift: 4,
3404
- getAnchorRect
3405
- }, props));
3406
- const handleItemSelect = React.useCallback(function handleItemSelect(value) {
3407
- if (onItemSelect) onItemSelect(value);
3408
- }, [onItemSelect]);
3409
- const value = React.useMemo(() => ({
3410
- state,
3411
- handleItemSelect,
3412
- handleAnchorRectChange
3413
- }), [state, handleItemSelect]);
3414
- return /*#__PURE__*/React.createElement(MenuContext.Provider, {
3415
- value: value
3416
- }, children);
3417
- }
3418
- /**
3419
- * A button to toggle a dropdown menu open or closed.
3420
- */
3421
-
3422
-
3423
- const MenuButton = /*#__PURE__*/polymorphicComponent(function MenuButton(_ref2, ref) {
3424
- let {
3425
- exceptionallySetClassName
3426
- } = _ref2,
3427
- props = _objectWithoutProperties(_ref2, _excluded2$3);
3428
-
3429
- const {
3430
- state
3431
- } = React.useContext(MenuContext);
3432
- return /*#__PURE__*/React.createElement(Ariakit.MenuButton, _objectSpread2(_objectSpread2({}, props), {}, {
3433
- state: state,
3434
- ref: ref,
3435
- className: classNames('reactist_menubutton', exceptionallySetClassName)
3436
- }));
3437
- }); //
3438
- // ContextMenuTrigger
3439
- //
3440
-
3441
- const ContextMenuTrigger = /*#__PURE__*/polymorphicComponent(function ContextMenuTrigger(_ref3, ref) {
3442
- let {
3443
- as: component = 'div'
3444
- } = _ref3,
3445
- props = _objectWithoutProperties(_ref3, _excluded3$2);
3446
-
3447
- const {
3448
- handleAnchorRectChange,
3449
- state
3450
- } = React.useContext(MenuContext);
3451
- const handleContextMenu = React.useCallback(event => {
3452
- event.preventDefault();
3453
- handleAnchorRectChange({
3454
- x: event.clientX,
3455
- y: event.clientY
3456
- });
3457
- state.show();
3458
- }, [handleAnchorRectChange, state]);
3459
- return /*#__PURE__*/React.createElement(component, _objectSpread2(_objectSpread2({}, props), {}, {
3460
- onContextMenu: handleContextMenu,
3461
- ref
3462
- }));
3463
- });
3464
- /**
3465
- * The dropdown menu itself, containing a list of menu items.
3466
- */
3467
-
3468
- const MenuList = /*#__PURE__*/polymorphicComponent(function MenuList(_ref4, ref) {
3469
- let {
3470
- exceptionallySetClassName
3471
- } = _ref4,
3472
- props = _objectWithoutProperties(_ref4, _excluded4$1);
3473
-
3474
- const {
3475
- state
3476
- } = React.useContext(MenuContext);
3477
- return state.visible ? /*#__PURE__*/React.createElement(portal.Portal, {
3478
- preserveTabOrder: true
3479
- }, /*#__PURE__*/React.createElement(Ariakit.Menu, _objectSpread2(_objectSpread2({}, props), {}, {
3480
- state: state,
3481
- ref: ref,
3482
- className: classNames('reactist_menulist', exceptionallySetClassName)
3483
- }))) : null;
3484
- });
3485
- /**
3486
- * A menu item inside a menu list. It can be selected by the user, triggering the `onSelect`
3487
- * callback.
3488
- */
3489
-
3490
- const MenuItem = /*#__PURE__*/polymorphicComponent(function MenuItem(_ref5, ref) {
3491
- let {
3492
- value,
3493
- children,
3494
- onSelect,
3495
- hideOnSelect = true,
3496
- onClick,
3497
- exceptionallySetClassName,
3498
- as = 'button'
3499
- } = _ref5,
3500
- props = _objectWithoutProperties(_ref5, _excluded5$1);
3501
-
3502
- const {
3503
- handleItemSelect,
3504
- state
3505
- } = React.useContext(MenuContext);
3506
- const {
3507
- hide
3508
- } = state;
3509
- const handleClick = React.useCallback(function handleClick(event) {
3510
- onClick == null ? void 0 : onClick(event);
3511
- const onSelectResult = onSelect && !event.defaultPrevented ? onSelect() : undefined;
3512
- const shouldClose = onSelectResult !== false && hideOnSelect;
3513
- handleItemSelect(value);
3514
- if (shouldClose) hide();
3515
- }, [onSelect, onClick, handleItemSelect, hideOnSelect, hide, value]);
3516
- return /*#__PURE__*/React.createElement(Ariakit.MenuItem, _objectSpread2(_objectSpread2({}, props), {}, {
3517
- as: as,
3518
- state: state,
3519
- ref: ref,
3520
- onClick: handleClick,
3521
- className: exceptionallySetClassName,
3522
- hideOnClick: false
3523
- }), children);
3524
- });
3525
- /**
3526
- * This component can be rendered alongside other `MenuItem` inside a `MenuList` in order to have
3527
- * a sub-menu.
3528
- *
3529
- * Its children are expected to have the structure of a first level menu (a `MenuButton` and a
3530
- * `MenuList`).
3531
- *
3532
- * ```jsx
3533
- * <MenuItem label="Edit profile" />
3534
- * <SubMenu>
3535
- * <MenuButton>More options</MenuButton>
3536
- * <MenuList>
3537
- * <MenuItem label="Preferences" />
3538
- * <MenuItem label="Sign out" />
3539
- * </MenuList>
3540
- * </SubMenu>
3541
- * ```
3542
- *
3543
- * The `MenuButton` will become a menu item in the current menu items list, and it will lead to
3544
- * opening a sub-menu with the menu items list below it.
3545
- */
3546
-
3547
- const SubMenu = /*#__PURE__*/React.forwardRef(function SubMenu({
3548
- children,
3549
- onItemSelect
3550
- }, ref) {
3551
- const {
3552
- handleItemSelect: parentMenuItemSelect,
3553
- state
3554
- } = React.useContext(MenuContext);
3555
- const {
3556
- hide: parentMenuHide
3557
- } = state;
3558
- const handleSubItemSelect = React.useCallback(function handleSubItemSelect(value) {
3559
- if (onItemSelect) onItemSelect(value);
3560
- parentMenuItemSelect(value);
3561
- parentMenuHide();
3562
- }, [parentMenuHide, parentMenuItemSelect, onItemSelect]);
3563
- const [button, list] = React.Children.toArray(children); // Ariakit needs to be able to pass props to the MenuButton
3564
- // and combine it with the MenuItem component
3565
-
3566
- const renderMenuButton = React.useCallback(function renderMenuButton(props) {
3567
- return /*#__PURE__*/React.cloneElement(button, props);
3568
- }, [button]);
3569
- return /*#__PURE__*/React.createElement(Menu, {
3570
- onItemSelect: handleSubItemSelect
3571
- }, /*#__PURE__*/React.createElement(Ariakit.MenuItem, {
3572
- as: "div",
3573
- state: state,
3574
- ref: ref,
3575
- hideOnClick: false
3576
- }, renderMenuButton), list);
3577
- });
3578
- /**
3579
- * A way to semantically group some menu items.
3580
- *
3581
- * This group does not add any visual separator. You can do that yourself adding `<hr />` elements
3582
- * before and/or after the group if you so wish.
3583
- */
3584
-
3585
- const MenuGroup = /*#__PURE__*/polymorphicComponent(function MenuGroup(_ref6, ref) {
3586
- let {
3587
- label,
3588
- children,
3589
- exceptionallySetClassName
3590
- } = _ref6,
3591
- props = _objectWithoutProperties(_ref6, _excluded6);
3592
-
3593
- const {
3594
- state
3595
- } = React.useContext(MenuContext);
3596
- return /*#__PURE__*/React.createElement(Ariakit.MenuGroup, _objectSpread2(_objectSpread2({}, props), {}, {
3597
- ref: ref,
3598
- state: state,
3599
- className: exceptionallySetClassName
3600
- }), label ? /*#__PURE__*/React.createElement("div", {
3601
- role: "presentation",
3602
- className: "reactist_menugroup__label"
3603
- }, label) : null, children);
3604
- });
3605
-
3606
3623
  const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
3607
3624
  const className = classNames('reactist_input', props.className);
3608
3625
  return /*#__PURE__*/React.createElement("input", _objectSpread2(_objectSpread2({}, props), {}, {
@@ -3612,7 +3629,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
3612
3629
  });
3613
3630
  Input.displayName = 'Input';
3614
3631
 
3615
- const _excluded$w = ["value", "options", "onChange", "disabled", "className", "defaultValue"];
3632
+ const _excluded$v = ["value", "options", "onChange", "disabled", "className", "defaultValue"];
3616
3633
 
3617
3634
  function Select(_ref) {
3618
3635
  let {
@@ -3623,7 +3640,7 @@ function Select(_ref) {
3623
3640
  className = '',
3624
3641
  defaultValue
3625
3642
  } = _ref,
3626
- otherProps = _objectWithoutProperties(_ref, _excluded$w);
3643
+ otherProps = _objectWithoutProperties(_ref, _excluded$v);
3627
3644
 
3628
3645
  const selectClassName = classNames('reactist_select', {
3629
3646
  disabled
@@ -3657,7 +3674,7 @@ const CloseIcon$1 = () => /*#__PURE__*/React.createElement("svg", {
3657
3674
  d: "M11.293 12L5.146 5.854a.5.5 0 1 1 .708-.708L12 11.293l6.146-6.147a.5.5 0 0 1 .708.708L12.707 12l6.147 6.146a.5.5 0 0 1-.708.708L12 12.707l-6.146 6.147a.5.5 0 0 1-.708-.708L11.293 12z"
3658
3675
  }));
3659
3676
 
3660
- const _excluded$x = ["id", "icon", "title", "subtitle", "children", "customCloseButton", "onClick", "onClose", "closeAltText", "className", "aria-live"];
3677
+ const _excluded$w = ["id", "icon", "title", "subtitle", "children", "customCloseButton", "onClick", "onClose", "closeAltText", "className", "aria-live"];
3661
3678
 
3662
3679
  function DeprecatedNotification(_ref) {
3663
3680
  let {
@@ -3673,7 +3690,7 @@ function DeprecatedNotification(_ref) {
3673
3690
  className,
3674
3691
  'aria-live': ariaLive = 'polite'
3675
3692
  } = _ref,
3676
- rest = _objectWithoutProperties(_ref, _excluded$x);
3693
+ rest = _objectWithoutProperties(_ref, _excluded$w);
3677
3694
 
3678
3695
  const titleId = title ? id + "-title" : null;
3679
3696
  const titleIdAttribute = titleId ? {
@@ -3725,7 +3742,7 @@ function DeprecatedNotification(_ref) {
3725
3742
 
3726
3743
  var modules_8f59d13b$1 = {"reach-portal":"_37bef8d8","fadein":"_77f9687f","fitContent":"bcc4e0a5","container":"d4832c2d","full":"b0c3b021","large":"_573d6aa5","medium":"_8550d996","small":"_43bb18f5","xlarge":"_57b4159d","overlay":"cb63f300","expand":"e741893e","buttonContainer":"bb1ce281","headerContent":"c5ef989c"};
3727
3744
 
3728
- const _excluded$y = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "autoFocus", "children"],
3745
+ const _excluded$x = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "autoFocus", "children"],
3729
3746
  _excluded2$4 = ["children", "button", "withDivider", "exceptionallySetClassName"],
3730
3747
  _excluded3$3 = ["exceptionallySetClassName", "children"],
3731
3748
  _excluded4$2 = ["exceptionallySetClassName", "withDivider"],
@@ -3760,7 +3777,7 @@ function DeprecatedModal(_ref) {
3760
3777
  autoFocus = true,
3761
3778
  children
3762
3779
  } = _ref,
3763
- props = _objectWithoutProperties(_ref, _excluded$y);
3780
+ props = _objectWithoutProperties(_ref, _excluded$x);
3764
3781
 
3765
3782
  const contextValue = React.useMemo(() => ({
3766
3783
  onDismiss,