@doist/reactist 15.3.0 → 16.1.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 (112) hide show
  1. package/dist/reactist.cjs.development.js +596 -160
  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/{notification/notification.js → deprecated-notification/deprecated-notification.js} +3 -3
  6. package/es/components/deprecated-notification/deprecated-notification.js.map +1 -0
  7. package/es/components/menu/menu.js +1 -1
  8. package/es/index.js +4 -2
  9. package/es/index.js.map +1 -1
  10. package/es/new-components/badge/badge.module.css.js +1 -1
  11. package/es/new-components/box/box.js.map +1 -1
  12. package/es/new-components/box/box.module.css.js +1 -1
  13. package/es/new-components/modal/modal.js +1 -1
  14. package/es/new-components/password-field/password-field.js +1 -1
  15. package/es/new-components/toast/static-toast.js +86 -0
  16. package/es/new-components/toast/static-toast.js.map +1 -0
  17. package/es/new-components/toast/toast-animation.js +175 -0
  18. package/es/new-components/toast/toast-animation.js.map +1 -0
  19. package/es/new-components/toast/toast.module.css.js +4 -0
  20. package/es/new-components/toast/toast.module.css.js.map +1 -0
  21. package/es/new-components/toast/use-toasts.js +195 -0
  22. package/es/new-components/toast/use-toasts.js.map +1 -0
  23. package/lib/components/color-picker/color-picker.js +1 -1
  24. package/lib/components/color-picker/color-picker.js.map +1 -1
  25. package/lib/components/deprecated-button/deprecated-button.js +1 -1
  26. package/lib/components/deprecated-button/deprecated-button.js.map +1 -1
  27. package/lib/components/deprecated-dropdown/dropdown.js +1 -1
  28. package/lib/components/deprecated-dropdown/dropdown.js.map +1 -1
  29. package/lib/components/deprecated-input/input.js +1 -1
  30. package/lib/components/deprecated-input/input.js.map +1 -1
  31. package/lib/components/{notification/notification.d.ts → deprecated-notification/deprecated-notification.d.ts} +4 -4
  32. package/lib/components/deprecated-notification/deprecated-notification.js +2 -0
  33. package/lib/components/deprecated-notification/deprecated-notification.js.map +1 -0
  34. package/lib/components/{notification/notification.test.d.ts → deprecated-notification/deprecated-notification.test.d.ts} +0 -0
  35. package/lib/components/deprecated-notification/index.d.ts +1 -0
  36. package/lib/components/deprecated-select/select.js +1 -1
  37. package/lib/components/deprecated-select/select.js.map +1 -1
  38. package/lib/components/keyboard-shortcut/keyboard-shortcut.js +1 -1
  39. package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  40. package/lib/components/menu/menu.js +1 -1
  41. package/lib/components/menu/menu.js.map +1 -1
  42. package/lib/components/progress-bar/progress-bar.js +1 -1
  43. package/lib/components/progress-bar/progress-bar.js.map +1 -1
  44. package/lib/components/tooltip/tooltip.js +1 -1
  45. package/lib/components/tooltip/tooltip.js.map +1 -1
  46. package/lib/index.d.ts +2 -1
  47. package/lib/index.js +1 -1
  48. package/lib/new-components/badge/badge.module.css.js +1 -1
  49. package/lib/new-components/box/box.d.ts +5 -3
  50. package/lib/new-components/box/box.js +1 -1
  51. package/lib/new-components/box/box.js.map +1 -1
  52. package/lib/new-components/box/box.module.css.js +1 -1
  53. package/lib/new-components/deprecated-modal/modal.js +1 -1
  54. package/lib/new-components/deprecated-modal/modal.js.map +1 -1
  55. package/lib/new-components/modal/modal.js +1 -1
  56. package/lib/new-components/modal/modal.js.map +1 -1
  57. package/lib/new-components/password-field/password-field.js +1 -1
  58. package/lib/new-components/stack/stack.js +1 -1
  59. package/lib/new-components/stack/stack.js.map +1 -1
  60. package/lib/new-components/tabs/tabs.js +1 -1
  61. package/lib/new-components/tabs/tabs.js.map +1 -1
  62. package/lib/new-components/test-helpers.d.ts +2 -1
  63. package/lib/new-components/toast/index.d.ts +4 -0
  64. package/lib/new-components/toast/static-toast.d.ts +61 -0
  65. package/lib/new-components/toast/static-toast.js +2 -0
  66. package/lib/new-components/toast/static-toast.js.map +1 -0
  67. package/lib/new-components/toast/toast-animation.d.ts +50 -0
  68. package/lib/new-components/toast/toast-animation.js +2 -0
  69. package/lib/new-components/toast/toast-animation.js.map +1 -0
  70. package/lib/new-components/toast/toast.module.css.js +2 -0
  71. package/lib/new-components/toast/toast.module.css.js.map +1 -0
  72. package/lib/new-components/toast/toast.test.d.ts +1 -0
  73. package/lib/new-components/toast/use-toasts.d.ts +128 -0
  74. package/lib/new-components/toast/use-toasts.js +2 -0
  75. package/lib/new-components/toast/use-toasts.js.map +1 -0
  76. package/package.json +3 -3
  77. package/styles/alert.css +1 -1
  78. package/styles/avatar.css +1 -1
  79. package/styles/badge.css +2 -2
  80. package/styles/badge.module.css.css +1 -1
  81. package/styles/base-button.css +1 -1
  82. package/styles/base-field.css +1 -1
  83. package/styles/box.css +1 -1
  84. package/styles/box.module.css.css +1 -1
  85. package/styles/checkbox-field.css +1 -1
  86. package/styles/columns.css +1 -1
  87. package/styles/{notification.css → deprecated-notification.css} +0 -0
  88. package/styles/divider.css +1 -1
  89. package/styles/heading.css +1 -1
  90. package/styles/hidden-visually.css +1 -1
  91. package/styles/hidden.css +1 -1
  92. package/styles/inline.css +1 -1
  93. package/styles/loading.css +1 -1
  94. package/styles/modal.css +1 -1
  95. package/styles/notice.css +1 -1
  96. package/styles/password-field.css +1 -1
  97. package/styles/progress-bar.css +1 -1
  98. package/styles/reactist.css +5 -4
  99. package/styles/select-field.css +1 -1
  100. package/styles/stack.css +1 -1
  101. package/styles/static-toast.css +11 -0
  102. package/styles/switch-field.css +1 -1
  103. package/styles/tabs.css +1 -1
  104. package/styles/text-area.css +1 -1
  105. package/styles/text-field.css +1 -1
  106. package/styles/text-link.css +1 -1
  107. package/styles/text.css +1 -1
  108. package/styles/toast.module.css.css +1 -0
  109. package/styles/use-toasts.css +11 -0
  110. package/es/components/notification/notification.js.map +0 -1
  111. package/lib/components/notification/notification.js +0 -2
  112. package/lib/components/notification/notification.js.map +0 -1
@@ -5,14 +5,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
6
 
7
7
  var React = require('react');
8
+ var React__default = _interopDefault(React);
8
9
  var classNames = _interopDefault(require('classnames'));
9
10
  var flattenChildren = _interopDefault(require('react-keyed-flatten-children'));
10
11
  var tooltip = require('ariakit/tooltip');
12
+ var portal = require('ariakit/portal');
11
13
  var ariakitUtils = require('ariakit-utils');
12
14
  var FocusLock = _interopDefault(require('react-focus-lock'));
13
15
  var ariaHidden = require('aria-hidden');
14
16
  var dialog = require('ariakit/dialog');
15
- var portal = require('ariakit/portal');
16
17
  var tab = require('ariakit/tab');
17
18
  var ReactDOM = _interopDefault(require('react-dom'));
18
19
  var dayjs = _interopDefault(require('dayjs'));
@@ -194,7 +195,7 @@ function mapResponsiveProp(fromValue, mapper) {
194
195
  };
195
196
  }
196
197
 
197
- var modules_54d944f2 = {"box":"f9408a0e","position-absolute":"_7807dcdd","position-fixed":"dc5f328c","position-relative":"_0e4ff085","position-sticky":"_4019d94a","tablet-position-absolute":"b1865c0f","tablet-position-fixed":"af8c5967","tablet-position-relative":"ef2b609f","tablet-position-sticky":"_04935ffd","desktop-position-absolute":"bda94091","desktop-position-fixed":"_691dfd31","desktop-position-relative":"efda904e","desktop-position-sticky":"bcf04687","display-block":"b5b9f34a","display-flex":"_6e9db9aa","display-inline":"ece6d246","display-inlineBlock":"e5e2223f","display-inlineFlex":"f344a0e2","display-none":"_9002f8c2","tablet-display-block":"d896f0ff","tablet-display-flex":"_56412665","tablet-display-inline":"_6b430cc5","tablet-display-inlineBlock":"_4158c5ad","tablet-display-inlineFlex":"c598eaab","tablet-display-none":"_5a2a6d3f","desktop-display-block":"_132ef8fb","desktop-display-flex":"_5bd11385","desktop-display-inline":"a51c2ec9","desktop-display-inlineBlock":"_93506988","desktop-display-inlineFlex":"_385d45a5","desktop-display-none":"_921732eb","flexDirection-column":"_41ef5755","flexDirection-row":"_6cad1a19","tablet-flexDirection-column":"f1c16205","tablet-flexDirection-row":"_65305ae1","desktop-flexDirection-column":"_4916f0f9","desktop-flexDirection-row":"_430dfc8e","flexWrap-wrap":"_3d2d56fe","flexWrap-nowrap":"_826e4adf","flexShrink-0":"f8344e0f","flexGrow-0":"f117e2ab","flexGrow-1":"_1355325c","alignItems-flexStart":"c5b05c6a","alignItems-center":"_21b8bafa","alignItems-flexEnd":"_56d73c9b","alignItems-baseline":"_052e0707","tablet-alignItems-flexStart":"_90048c98","tablet-alignItems-center":"_7e189a0b","tablet-alignItems-flexEnd":"b8aefb5c","tablet-alignItems-baseline":"_4c1a5ef9","desktop-alignItems-flexStart":"f4d052ef","desktop-alignItems-center":"e5478926","desktop-alignItems-flexEnd":"b4f5051a","desktop-alignItems-baseline":"b21adace","justifyContent-flexStart":"be6deb6a","justifyContent-center":"d8eaf780","justifyContent-flexEnd":"_9212ca89","justifyContent-spaceAround":"_5d2cd095","justifyContent-spaceBetween":"_00d5fe7e","justifyContent-spaceEvenly":"ce4f4c2d","tablet-justifyContent-flexStart":"_6580dbbc","tablet-justifyContent-center":"_3f689891","tablet-justifyContent-flexEnd":"_628df8db","tablet-justifyContent-spaceAround":"_3ea88b4f","tablet-justifyContent-spaceBetween":"_4554d93d","tablet-justifyContent-spaceEvenly":"eb13fb50","desktop-justifyContent-flexStart":"_36dc744d","desktop-justifyContent-center":"ee7077ab","desktop-justifyContent-flexEnd":"_4edc8c86","desktop-justifyContent-spaceBetween":"_7e147696","alignSelf-stretch":"c0655cd6","alignSelf-flexStart":"_11863030","alignSelf-center":"c6d86139","alignSelf-flexEnd":"c0bd1f82","alignSelf-baseline":"_95686aec","tablet-alignSelf-stretch":"_9b712cc7","tablet-alignSelf-flexStart":"f7b935f7","tablet-alignSelf-center":"bf9ad125","tablet-alignSelf-flexEnd":"_3b4f8c3c","tablet-alignSelf-baseline":"_49d27079","desktop-alignSelf-stretch":"_63d27ffa","desktop-alignSelf-flexStart":"d45796cc","desktop-alignSelf-center":"c91c7bf7","desktop-alignSelf-flexEnd":"f2453212","desktop-alignSelf-baseline":"_3882757c","overflow-hidden":"_473810b4","overflow-auto":"_051c2340","overflow-visible":"_14e451d1","overflow-scroll":"_4d8555f8","height-full":"_867d251e","bg-default":"_2d928bf8","bg-aside":"db3f5af6","bg-highlight":"c990fcc3","bg-selected":"_976a662f","borderRadius-standard":"_46b52f05","borderRadius-full":"_1c8b326b","border-primary":"_0ef8c314","border-secondary":"_14871605","border-tertiary":"_36c045c3","textAlign-start":"d745aa1e","textAlign-center":"_31cf99c5","textAlign-end":"_10a7a030","textAlign-justify":"_2cfc8b46","tablet-textAlign-start":"e6b7bb40","tablet-textAlign-center":"_47dcb91c","tablet-textAlign-end":"_1d4011ce","tablet-textAlign-justify":"_18407499","desktop-textAlign-start":"_565de5cf","desktop-textAlign-center":"_64254ba3","desktop-textAlign-end":"_3cc6a504","desktop-textAlign-justify":"_0efec659"};
198
+ var modules_54d944f2 = {"box":"aa9a5a15","position-absolute":"_8e8803b9","position-fixed":"e11a8cf1","position-relative":"_5e6c2a17","position-sticky":"_125d4a65","tablet-position-absolute":"_8cbc0cd3","tablet-position-fixed":"_4b5e0b30","tablet-position-relative":"_32636b2c","tablet-position-sticky":"_3c8df1b2","desktop-position-absolute":"_0fc96c32","desktop-position-fixed":"_86f2af8d","desktop-position-relative":"_9ca81d89","desktop-position-sticky":"_7ddb76a3","display-block":"_1f239253","display-flex":"d3c9028a","display-inline":"_7804dae4","display-inlineBlock":"_2011b4f7","display-inlineFlex":"_84d1c5e9","display-none":"ecffd994","tablet-display-block":"_858d10e6","tablet-display-flex":"_048e1351","tablet-display-inline":"_4ad22f53","tablet-display-inlineBlock":"_9bdcf7c5","tablet-display-inlineFlex":"_086af02f","tablet-display-none":"e6d66504","desktop-display-block":"_42a60b7f","desktop-display-flex":"_75f9923b","desktop-display-inline":"_89fe8b6b","desktop-display-inlineBlock":"f5044459","desktop-display-inlineFlex":"c4bb937b","desktop-display-none":"_155e67e3","flexDirection-column":"_8b7928cc","flexDirection-row":"_5d86bbce","tablet-flexDirection-column":"_056ba2f7","tablet-flexDirection-row":"_68a9954e","desktop-flexDirection-column":"febb3bff","desktop-flexDirection-row":"e32ba18f","flexWrap-wrap":"bf057363","flexWrap-nowrap":"c12b5de4","flexShrink-0":"_1b0fdede","flexGrow-0":"_74d96364","flexGrow-1":"_8085a81a","alignItems-flexStart":"d646b895","alignItems-center":"_7eb6fbcd","alignItems-flexEnd":"aa0f1674","alignItems-baseline":"_5f712321","tablet-alignItems-flexStart":"_9cba71cc","tablet-alignItems-center":"_8803e1ed","tablet-alignItems-flexEnd":"dd23ad40","tablet-alignItems-baseline":"b6e66958","desktop-alignItems-flexStart":"_3cf6aa44","desktop-alignItems-center":"c455cc71","desktop-alignItems-flexEnd":"d72d7865","desktop-alignItems-baseline":"d856f657","justifyContent-flexStart":"e99eaf27","justifyContent-center":"f9927840","justifyContent-flexEnd":"_318ae7a4","justifyContent-spaceAround":"_792f21bb","justifyContent-spaceBetween":"c563d133","justifyContent-spaceEvenly":"_88fa03eb","tablet-justifyContent-flexStart":"_10110808","tablet-justifyContent-center":"_39532d47","tablet-justifyContent-flexEnd":"_6f28967b","tablet-justifyContent-spaceAround":"_61cf0e53","tablet-justifyContent-spaceBetween":"d9eb935c","tablet-justifyContent-spaceEvenly":"_2c34f330","desktop-justifyContent-flexStart":"_0d99cfa4","desktop-justifyContent-center":"a8e50b37","desktop-justifyContent-flexEnd":"_5c59c692","desktop-justifyContent-spaceBetween":"_2367b5bf","alignSelf-stretch":"da53b153","alignSelf-flexStart":"e7504e05","alignSelf-center":"_31910485","alignSelf-flexEnd":"f9deb037","alignSelf-baseline":"d2e0b600","tablet-alignSelf-stretch":"_322b2d4c","tablet-alignSelf-flexStart":"_8c3ace8c","tablet-alignSelf-center":"_3784fff8","tablet-alignSelf-flexEnd":"_7d7054cd","tablet-alignSelf-baseline":"_24e72f72","desktop-alignSelf-stretch":"_805f09a3","desktop-alignSelf-flexStart":"c124aecf","desktop-alignSelf-center":"_7f550538","desktop-alignSelf-flexEnd":"f1a1ea25","desktop-alignSelf-baseline":"a47a5534","overflow-hidden":"_79330f2d","overflow-auto":"_2d735aa4","overflow-visible":"_2d2dc480","overflow-scroll":"eae7bf85","height-full":"_3bd4b4e5","bg-default":"cdd56ed4","bg-aside":"ace3a6e9","bg-highlight":"_69ba9d50","bg-selected":"d3c85356","bg-toast":"_54ff8cfc","borderRadius-standard":"a010e6ce","borderRadius-full":"c7f4eef5","border-primary":"_0133b2bb","border-secondary":"_10ddcd6f","border-tertiary":"b1dd5c24","textAlign-start":"_3692c550","textAlign-center":"_917de8e0","textAlign-end":"f1f1808a","textAlign-justify":"_70cadb46","tablet-textAlign-start":"c009a023","tablet-textAlign-center":"_994025e9","tablet-textAlign-end":"da09b74f","tablet-textAlign-justify":"cedd005b","desktop-textAlign-start":"_6fb085b1","desktop-textAlign-center":"_742b34ba","desktop-textAlign-end":"_8d252912","desktop-textAlign-justify":"_081ee438"};
198
199
 
199
200
  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"};
200
201
 
@@ -865,66 +866,517 @@ function Notice({
865
866
  }, children))));
866
867
  }
867
868
 
868
- 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"};
869
+ 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"};
869
870
 
870
- const _excluded$b = ["level", "weight", "size", "tone", "children", "lineClamp", "align", "exceptionallySetClassName"];
871
- const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
871
+ const _excluded$b = ["as", "size", "weight", "tone", "align", "children", "lineClamp", "exceptionallySetClassName"];
872
+ const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
872
873
  let {
873
- level,
874
+ as,
875
+ size = 'body',
874
876
  weight = 'regular',
875
- size,
876
877
  tone = 'normal',
878
+ align,
877
879
  children,
878
880
  lineClamp,
879
- align,
880
881
  exceptionallySetClassName
881
882
  } = _ref,
882
883
  props = _objectWithoutProperties(_ref, _excluded$b);
883
884
 
884
- // In TypeScript v4.1, this would be properly recognized without needing the type assertion
885
- // https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types
886
- const headingElementName = "h" + level;
887
- const lineClampMultipleLines = typeof lineClamp === 'string' ? parseInt(lineClamp, 10) > 1 : (lineClamp || 0) > 1;
885
+ const lineClampMultipleLines = typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp != null ? lineClamp : 1) > 1;
888
886
  return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
889
- className: [exceptionallySetClassName, modules_949d2ff4.heading, weight !== 'regular' ? getClassNames(modules_949d2ff4, 'weight', weight) : null, tone !== 'normal' ? getClassNames(modules_949d2ff4, 'tone', tone) : null, getClassNames(modules_949d2ff4, 'size', size), lineClampMultipleLines ? modules_949d2ff4.lineClampMultipleLines : null, lineClamp ? getClassNames(modules_949d2ff4, 'lineClamp', lineClamp.toString()) : null],
887
+ as: as,
888
+ className: [exceptionallySetClassName, modules_a9637dd3.text, size !== 'body' ? getClassNames(modules_a9637dd3, 'size', size) : null, weight !== 'regular' ? getClassNames(modules_a9637dd3, 'weight', weight) : null, tone !== 'normal' ? getClassNames(modules_a9637dd3, 'tone', tone) : null, lineClampMultipleLines ? modules_a9637dd3.lineClampMultipleLines : null, lineClamp ? getClassNames(modules_a9637dd3, 'lineClamp', lineClamp.toString()) : null],
890
889
  textAlign: align,
891
890
  // Prevents emojis from being cut-off
892
891
  // See https://github.com/Doist/reactist/pull/528
893
892
  paddingRight: lineClamp ? 'xsmall' : undefined,
894
- as: headingElementName,
895
893
  ref: ref
896
894
  }), children);
897
895
  });
898
896
 
899
- 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"};
897
+ var modules_d11e18f0 = {"stackedToastsView":"_8e9f0a55","toastContainer":"_121b9429","slot":"_6a2a04c5"};
900
898
 
901
- const _excluded$c = ["as", "size", "weight", "tone", "align", "children", "lineClamp", "exceptionallySetClassName"];
902
- const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
899
+ const _excluded$c = ["message", "description", "icon", "action", "onDismiss", "dismissLabel"];
900
+ /**
901
+ * A toast that shows a message, and an optional action associated with it.
902
+ *
903
+ * This component is generally not meant to be used directly. Most of the time you'll want to use
904
+ * toasts generated via `useToasts` instead. However, this component is available in case you need
905
+ * to take control of rendering a toast under different circumstances than that of notification-like
906
+ * floating toasts.
907
+ *
908
+ * This component makes no assumptions outwardly about how it is positioned on the screen. That is,
909
+ * it will not be shown floating or fixed to the viewport edges, as toasts normally show up. It only
910
+ * provides the toast look and feel, but you are responsible for positioning it as you want.
911
+ *
912
+ * @see useToasts
913
+ */
914
+
915
+ const StaticToast = /*#__PURE__*/React__default.forwardRef(function Toast(_ref, ref) {
903
916
  let {
904
- as,
905
- size = 'body',
917
+ message,
918
+ description,
919
+ icon,
920
+ action,
921
+ onDismiss,
922
+ dismissLabel = 'Close'
923
+ } = _ref,
924
+ props = _objectWithoutProperties(_ref, _excluded$c);
925
+
926
+ return /*#__PURE__*/React__default.createElement(Box, _objectSpread2({
927
+ ref: ref,
928
+ role: "alert",
929
+ "aria-live": "polite",
930
+ borderRadius: "full",
931
+ width: "fitContent",
932
+ background: "toast",
933
+ display: "flex",
934
+ padding: "large",
935
+ alignItems: "center",
936
+ className: modules_d11e18f0.toastContainer
937
+ }, props), icon ? /*#__PURE__*/React__default.createElement(ToastContentSlot, null, icon) : null, /*#__PURE__*/React__default.createElement(Box, {
938
+ flexGrow: 1,
939
+ maxWidth: "small"
940
+ }, description ? /*#__PURE__*/React__default.createElement(Stack, {
941
+ space: "small"
942
+ }, /*#__PURE__*/React__default.createElement(Text, {
943
+ weight: "bold"
944
+ }, message, " "), /*#__PURE__*/React__default.createElement(Text, null, description)) : /*#__PURE__*/React__default.createElement(Text, null, message)), action ? /*#__PURE__*/React__default.createElement(ToastContentSlot, null, isActionObject(action) ? /*#__PURE__*/React__default.createElement(Button, {
945
+ variant: "tertiary",
946
+ size: "small",
947
+ onClick: action.onClick
948
+ }, action.label) : action) : null, onDismiss ? /*#__PURE__*/React__default.createElement(ToastContentSlot, null, /*#__PURE__*/React__default.createElement(Button, {
949
+ variant: "quaternary",
950
+ size: "small",
951
+ onClick: onDismiss,
952
+ "aria-label": dismissLabel,
953
+ icon: /*#__PURE__*/React__default.createElement(CloseIcon, null)
954
+ })) : null);
955
+ });
956
+
957
+ function isActionObject(action) {
958
+ return action != null && typeof action === 'object' && 'label' in action && 'onClick' in action && typeof action.label === 'string' && typeof action.onClick === 'function';
959
+ }
960
+
961
+ function ToastContentSlot({
962
+ children
963
+ }) {
964
+ return /*#__PURE__*/React__default.createElement(Box, {
965
+ display: "flex",
966
+ alignItems: "center",
967
+ justifyContent: "center",
968
+ marginX: "-xsmall",
969
+ marginY: "-medium",
970
+ className: modules_d11e18f0.slot
971
+ }, children);
972
+ }
973
+
974
+ let uid = 0;
975
+
976
+ function uniqueId() {
977
+ return uid++;
978
+ }
979
+
980
+ function generateElementId(prefix) {
981
+ const num = uniqueId();
982
+ return prefix + "-" + num;
983
+ }
984
+ function useId(providedId) {
985
+ const ref = React.useRef(providedId != null ? providedId : null);
986
+
987
+ if (!ref.current) {
988
+ ref.current = generateElementId('element');
989
+ }
990
+
991
+ return ref.current;
992
+ }
993
+
994
+ /**
995
+ * Adapted with minor changes from https://github.com/seek-oss/braid-design-system/blob/7a5ebccb/packages/braid-design-system/lib/components/useToast/useFlipList.ts
996
+ *
997
+ * MIT License
998
+ *
999
+ * Copyright (c) 2018 SEEK
1000
+ *
1001
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
1002
+ * of this software and associated documentation files (the "Software"), to deal
1003
+ * in the Software without restriction, including without limitation the rights
1004
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1005
+ * copies of the Software, and to permit persons to whom the Software is
1006
+ * furnished to do so, subject to the following conditions:
1007
+ *
1008
+ * The above copyright notice and this permission notice shall be included in all
1009
+ * copies or substantial portions of the Software.
1010
+ *
1011
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1012
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1013
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1014
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1015
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1016
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1017
+ * SOFTWARE.
1018
+ */
1019
+ const ANIMATION_TIMEOUT = 400;
1020
+ const ENTRANCE_TRANSITION = 'transform 0.3s ease, opacity 0.3s ease';
1021
+ const EXIT_TRANSITION = 'opacity 0.2s ease';
1022
+ /**
1023
+ * Applies the "from" value of given CSS properties, and also sets a transition CSS property. Then
1024
+ * it waits an animation frame before setting the same CSS properties to the target "to" value. This
1025
+ * triggers the browser to perform the CSS transition on them.
1026
+ *
1027
+ * At the end of the animation, it cleans up, unsetting all the CSS properties (including the
1028
+ * transition), and calls the "done" callback, if given.
1029
+ */
1030
+
1031
+ function animate({
1032
+ element,
1033
+ transforms,
1034
+ transition,
1035
+ done
1036
+ }) {
1037
+ const fallbackTimeout = setTimeout(() => {
1038
+ done == null ? void 0 : done();
1039
+ }, ANIMATION_TIMEOUT);
1040
+ transforms.forEach(({
1041
+ property,
1042
+ from = ''
1043
+ }) => {
1044
+ element.style.setProperty(property, from);
1045
+ });
1046
+ element.style.setProperty('transition', '');
1047
+
1048
+ function transitionEndHandler(event) {
1049
+ if (event.target !== element) {
1050
+ return;
1051
+ }
1052
+
1053
+ element.style.setProperty('transition', '');
1054
+ done == null ? void 0 : done();
1055
+ element.removeEventListener('transitionend', transitionEndHandler);
1056
+ clearTimeout(fallbackTimeout);
1057
+ }
1058
+
1059
+ element.addEventListener('transitionend', transitionEndHandler); // Call requestAnimationFrame twice to make sure we have a full animation frame at our disposal
1060
+
1061
+ window.requestAnimationFrame(() => {
1062
+ window.requestAnimationFrame(() => {
1063
+ element.style.setProperty('transition', transition);
1064
+ transforms.forEach(({
1065
+ property,
1066
+ to = ''
1067
+ }) => {
1068
+ element.style.setProperty(property, to);
1069
+ });
1070
+ });
1071
+ });
1072
+ }
1073
+ /**
1074
+ * Provides the functionality of animating the stacked toasts when they appear and before they
1075
+ * disappear.
1076
+ *
1077
+ * It works by keeping a mapping from toast IDs to the toast elements, and keeping a mapping from
1078
+ * toast IDs to their top position. Then, on every single re-render, it compares the new DOM
1079
+ * situation with the previously stored one in these mappings. With this information, it applies
1080
+ * animations that smoothly transitions between both states.
1081
+ */
1082
+
1083
+
1084
+ function useToastsAnimation() {
1085
+ const refs = React.useMemo(() => new Map(), []);
1086
+ const positions = React.useMemo(() => new Map(), []);
1087
+ React.useLayoutEffect(() => {
1088
+ const animations = [];
1089
+ Array.from(refs.entries()).forEach(([id, element]) => {
1090
+ if (!element) {
1091
+ refs.delete(id);
1092
+ return;
1093
+ }
1094
+
1095
+ const prevTop = positions.get(id);
1096
+ const {
1097
+ top,
1098
+ height
1099
+ } = element.getBoundingClientRect();
1100
+
1101
+ if (typeof prevTop === 'number' && prevTop !== top) {
1102
+ // Move animation
1103
+ animations.push({
1104
+ element,
1105
+ transition: ENTRANCE_TRANSITION,
1106
+ transforms: [{
1107
+ property: 'transform',
1108
+ from: "translateY(" + (prevTop - top) + "px)"
1109
+ }]
1110
+ });
1111
+ } else if (typeof prevTop !== 'number') {
1112
+ // Enter animation
1113
+ animations.push({
1114
+ element,
1115
+ transition: ENTRANCE_TRANSITION,
1116
+ transforms: [{
1117
+ property: 'transform',
1118
+ from: "translateY(" + height + "px)"
1119
+ }, {
1120
+ property: 'opacity',
1121
+ from: '0'
1122
+ }]
1123
+ });
1124
+ }
1125
+
1126
+ positions.set(id, element.getBoundingClientRect().top);
1127
+ });
1128
+ animations.forEach(({
1129
+ element,
1130
+ transforms,
1131
+ transition
1132
+ }) => {
1133
+ animate({
1134
+ element,
1135
+ transforms,
1136
+ transition
1137
+ });
1138
+ });
1139
+ });
1140
+ const animateRemove = React.useCallback(function animateRemove(id, onAnimationDone) {
1141
+ const element = refs.get(id);
1142
+
1143
+ if (element) {
1144
+ // Removal animation
1145
+ animate({
1146
+ element,
1147
+ transforms: [{
1148
+ property: 'opacity',
1149
+ to: '0'
1150
+ }],
1151
+ transition: EXIT_TRANSITION,
1152
+ done: onAnimationDone
1153
+ });
1154
+ }
1155
+ }, [refs]);
1156
+ const mappedRef = React.useCallback(id => ref => {
1157
+ refs.set(id, ref);
1158
+ }, [refs]);
1159
+ return {
1160
+ mappedRef,
1161
+ animateRemove
1162
+ };
1163
+ }
1164
+
1165
+ const _excluded$d = ["toastId"];
1166
+ /** @private */
1167
+
1168
+ const InternalToast = /*#__PURE__*/React__default.forwardRef(function InternalToast({
1169
+ message,
1170
+ description,
1171
+ icon,
1172
+ action,
1173
+ autoDismissDelay,
1174
+ dismissLabel,
1175
+ showDismissButton = true,
1176
+ toastId,
1177
+ onDismiss,
1178
+ onRemoveToast
1179
+ }, ref) {
1180
+ const [timeoutRunning, setTimeoutRunning] = React__default.useState(Boolean(autoDismissDelay));
1181
+ const timeoutRef = React__default.useRef();
1182
+ const startTimeout = React__default.useCallback(function startTimeout() {
1183
+ setTimeoutRunning(true);
1184
+ }, []);
1185
+ const stopTimeout = React__default.useCallback(function stopTimeout() {
1186
+ setTimeoutRunning(false);
1187
+ clearTimeout(timeoutRef.current);
1188
+ timeoutRef.current = undefined;
1189
+ }, []);
1190
+ React__default.useEffect(function setupAutoDismiss() {
1191
+ if (!timeoutRunning || !autoDismissDelay) return;
1192
+ timeoutRef.current = window.setTimeout(() => {
1193
+ onRemoveToast(toastId);
1194
+ onDismiss == null ? void 0 : onDismiss();
1195
+ }, autoDismissDelay * 1000);
1196
+ return stopTimeout;
1197
+ }, [autoDismissDelay, onDismiss, onRemoveToast, toastId, stopTimeout, timeoutRunning]);
1198
+ return /*#__PURE__*/React__default.createElement(StaticToast, {
1199
+ ref: ref,
1200
+ message: message,
1201
+ description: description,
1202
+ icon: icon,
1203
+ action: action,
1204
+ onDismiss: showDismissButton ? () => {
1205
+ onDismiss == null ? void 0 : onDismiss();
1206
+ onRemoveToast(toastId);
1207
+ } : undefined,
1208
+ dismissLabel: dismissLabel,
1209
+ // @ts-expect-error
1210
+ onMouseEnter: stopTimeout,
1211
+ onMouseLeave: startTimeout
1212
+ });
1213
+ });
1214
+ const ToastsContext = /*#__PURE__*/React__default.createContext(() => () => undefined);
1215
+ /**
1216
+ * Provides the state management and rendering of the toasts currently active.
1217
+ *
1218
+ * You need to render this near the top of your app components tree, in order to `useToasts`.
1219
+ *
1220
+ * @see useToasts
1221
+ */
1222
+
1223
+ function ToastsProvider({
1224
+ children,
1225
+ padding = 'large',
1226
+ defaultAutoDismissDelay = 10
1227
+ /* seconds */
1228
+ ,
1229
+ defaultDismissLabel = 'Close'
1230
+ }) {
1231
+ const [toasts, setToasts] = React__default.useState([]);
1232
+ const {
1233
+ mappedRef,
1234
+ animateRemove
1235
+ } = useToastsAnimation();
1236
+ const removeToast = React__default.useCallback(function onRemoveToast(toastId) {
1237
+ animateRemove(toastId, () => {
1238
+ setToasts(list => {
1239
+ const index = list.findIndex(n => n.toastId === toastId);
1240
+ if (index < 0) return list;
1241
+ const copy = [...list];
1242
+ copy.splice(index, 1);
1243
+ return copy;
1244
+ });
1245
+ });
1246
+ }, [animateRemove]);
1247
+ const showToast = React__default.useCallback(function showToast(props) {
1248
+ const toastId = generateElementId('toast');
1249
+
1250
+ const newToast = _objectSpread2(_objectSpread2({
1251
+ autoDismissDelay: defaultAutoDismissDelay,
1252
+ dismissLabel: defaultDismissLabel
1253
+ }, props), {}, {
1254
+ toastId
1255
+ });
1256
+
1257
+ setToasts(list => [...list, newToast]);
1258
+ return () => removeToast(toastId);
1259
+ }, [defaultAutoDismissDelay, defaultDismissLabel, removeToast]);
1260
+ return /*#__PURE__*/React__default.createElement(ToastsContext.Provider, {
1261
+ value: showToast
1262
+ }, children, /*#__PURE__*/React__default.createElement(portal.Portal, null, toasts.length === 0 ? null : /*#__PURE__*/React__default.createElement(Box, {
1263
+ className: modules_d11e18f0.stackedToastsView,
1264
+ position: "fixed",
1265
+ width: "full",
1266
+ paddingX: padding,
1267
+ paddingBottom: padding
1268
+ }, /*#__PURE__*/React__default.createElement(Stack, {
1269
+ space: "medium"
1270
+ }, toasts.map(_ref => {
1271
+ let {
1272
+ toastId
1273
+ } = _ref,
1274
+ props = _objectWithoutProperties(_ref, _excluded$d);
1275
+
1276
+ return /*#__PURE__*/React__default.createElement(InternalToast, _objectSpread2({
1277
+ key: toastId,
1278
+ ref: mappedRef(toastId),
1279
+ toastId: toastId,
1280
+ onRemoveToast: removeToast
1281
+ }, props));
1282
+ })))));
1283
+ }
1284
+ /**
1285
+ * Provides a function `showToast` that shows a new toast every time you call it.
1286
+ *
1287
+ * ```jsx
1288
+ * const showToast = useToasts()
1289
+ *
1290
+ * <button onClick={() => showToast({ message: 'Hello' })}>
1291
+ * Say hello
1292
+ * </button>
1293
+ * ```
1294
+ *
1295
+ * All toasts fired via this function are rendered in a global fixed location, and stacked one on
1296
+ * top of the other.
1297
+ *
1298
+ * When called, `showToast` returns a function that dismisses the toast when called.
1299
+ *
1300
+ * @see ToastsProvider
1301
+ */
1302
+
1303
+
1304
+ function useToasts() {
1305
+ return React__default.useContext(ToastsContext);
1306
+ }
1307
+ /**
1308
+ * Adds a toast to be rendered, stacked alongside any other currently active toasts.
1309
+ *
1310
+ * For most situations, you should prefer to use the `showToast` function obtained from `useToasts`.
1311
+ * This component is provided for convenience to render toasts in the markup, but it has some
1312
+ * peculiarities, which are discussed below.
1313
+ *
1314
+ * Internally, this calls `showToast`. It is provided for two reasons:
1315
+ *
1316
+ * 1. Convenience, when you want to fire a toast in markup/jsx code. Keep in mind, though, that
1317
+ * toasts rendered in this way will be removed from view when the context where it is rendered
1318
+ * is unmounted. Unlike toasts fired with `showToast`, which will normally be dismissed, either
1319
+ * by the user or after a delay. They'll still be animated on their way out, though.
1320
+ * 2. When combined with disabling dismissing it (e.g. `showDismissButton={false}` and
1321
+ * `autoDismissDelay={false}` it provides a way to show "permanent" toasts that only go away when
1322
+ * the component ceases to be rendered).
1323
+ *
1324
+ * This is useful for cases when the consumer wants to control when a toast is visible, and to keep
1325
+ * it visible based on an app-specific condition.
1326
+ *
1327
+ * Something important to note about this component is that it triggers the toast based on the props
1328
+ * passed when first rendered, and it does not update the toast if these props change on subsequent
1329
+ * renders. In this sense, this is an imperative component, more than a descriptive one. This is
1330
+ * done to simplify the internals, and to keep it in line with how `showToast` works: you fire up a
1331
+ * toast imperatively, and you loose control over it. It remains rendered according to the props you
1332
+ * first passed.
1333
+ *
1334
+ * @see useToasts
1335
+ */
1336
+
1337
+
1338
+ function Toast(props) {
1339
+ const showToast = useToasts();
1340
+ const propsRef = React__default.useRef(props);
1341
+ React__default.useEffect(() => {
1342
+ const dismissToast = showToast(propsRef.current);
1343
+ return dismissToast;
1344
+ }, [showToast]);
1345
+ return null;
1346
+ }
1347
+
1348
+ 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"};
1349
+
1350
+ const _excluded$e = ["level", "weight", "size", "tone", "children", "lineClamp", "align", "exceptionallySetClassName"];
1351
+ const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
1352
+ let {
1353
+ level,
906
1354
  weight = 'regular',
1355
+ size,
907
1356
  tone = 'normal',
908
- align,
909
1357
  children,
910
1358
  lineClamp,
1359
+ align,
911
1360
  exceptionallySetClassName
912
1361
  } = _ref,
913
- props = _objectWithoutProperties(_ref, _excluded$c);
1362
+ props = _objectWithoutProperties(_ref, _excluded$e);
914
1363
 
915
- const lineClampMultipleLines = typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp != null ? lineClamp : 1) > 1;
1364
+ // In TypeScript v4.1, this would be properly recognized without needing the type assertion
1365
+ // https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types
1366
+ const headingElementName = "h" + level;
1367
+ const lineClampMultipleLines = typeof lineClamp === 'string' ? parseInt(lineClamp, 10) > 1 : (lineClamp || 0) > 1;
916
1368
  return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
917
- as: as,
918
- className: [exceptionallySetClassName, modules_a9637dd3.text, size !== 'body' ? getClassNames(modules_a9637dd3, 'size', size) : null, weight !== 'regular' ? getClassNames(modules_a9637dd3, 'weight', weight) : null, tone !== 'normal' ? getClassNames(modules_a9637dd3, 'tone', tone) : null, lineClampMultipleLines ? modules_a9637dd3.lineClampMultipleLines : null, lineClamp ? getClassNames(modules_a9637dd3, 'lineClamp', lineClamp.toString()) : null],
1369
+ className: [exceptionallySetClassName, modules_949d2ff4.heading, weight !== 'regular' ? getClassNames(modules_949d2ff4, 'weight', weight) : null, tone !== 'normal' ? getClassNames(modules_949d2ff4, 'tone', tone) : null, getClassNames(modules_949d2ff4, 'size', size), lineClampMultipleLines ? modules_949d2ff4.lineClampMultipleLines : null, lineClamp ? getClassNames(modules_949d2ff4, 'lineClamp', lineClamp.toString()) : null],
919
1370
  textAlign: align,
920
1371
  // Prevents emojis from being cut-off
921
1372
  // See https://github.com/Doist/reactist/pull/528
922
1373
  paddingRight: lineClamp ? 'xsmall' : undefined,
1374
+ as: headingElementName,
923
1375
  ref: ref
924
1376
  }), children);
925
1377
  });
926
1378
 
927
- const _excluded$d = ["as", "variant", "tone", "size", "exceptionallySetClassName", "openInNewTab"];
1379
+ const _excluded$f = ["as", "variant", "tone", "size", "exceptionallySetClassName", "openInNewTab"];
928
1380
  /**
929
1381
  * A semantic link that looks like a button, exactly matching the `Button` component in all visual
930
1382
  * aspects.
@@ -941,7 +1393,7 @@ const ButtonLink = /*#__PURE__*/polymorphicComponent(function ButtonLink(_ref, r
941
1393
  exceptionallySetClassName,
942
1394
  openInNewTab = false
943
1395
  } = _ref,
944
- props = _objectWithoutProperties(_ref, _excluded$d);
1396
+ props = _objectWithoutProperties(_ref, _excluded$f);
945
1397
 
946
1398
  return /*#__PURE__*/React.createElement(BaseButton, _objectSpread2(_objectSpread2({}, props), {}, {
947
1399
  as: as,
@@ -957,14 +1409,14 @@ const ButtonLink = /*#__PURE__*/polymorphicComponent(function ButtonLink(_ref, r
957
1409
 
958
1410
  var modules_3d05deee = {"container":"_232127ef"};
959
1411
 
960
- const _excluded$e = ["as", "openInNewTab", "exceptionallySetClassName"];
1412
+ const _excluded$g = ["as", "openInNewTab", "exceptionallySetClassName"];
961
1413
  const TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref) {
962
1414
  let {
963
1415
  as = 'a',
964
1416
  openInNewTab = false,
965
1417
  exceptionallySetClassName
966
1418
  } = _ref,
967
- props = _objectWithoutProperties(_ref, _excluded$e);
1419
+ props = _objectWithoutProperties(_ref, _excluded$g);
968
1420
 
969
1421
  return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
970
1422
  as: as,
@@ -976,7 +1428,7 @@ const TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref)
976
1428
  }));
977
1429
  });
978
1430
 
979
- const _excluded$f = ["checked", "indeterminate", "disabled"];
1431
+ const _excluded$h = ["checked", "indeterminate", "disabled"];
980
1432
  const svgPath = {
981
1433
  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',
982
1434
  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',
@@ -1015,7 +1467,7 @@ function CheckboxIcon(_ref) {
1015
1467
  indeterminate,
1016
1468
  disabled
1017
1469
  } = _ref,
1018
- props = _objectWithoutProperties(_ref, _excluded$f);
1470
+ props = _objectWithoutProperties(_ref, _excluded$h);
1019
1471
 
1020
1472
  const pathKey = getPathKey({
1021
1473
  checked,
@@ -1036,7 +1488,7 @@ function CheckboxIcon(_ref) {
1036
1488
 
1037
1489
  var modules_664a6a80 = {"container":"_96c4d12f","disabled":"_5048e2a5","checked":"_42187b48","keyFocused":"_3510166f"};
1038
1490
 
1039
- const _excluded$g = ["label", "disabled", "indeterminate", "defaultChecked", "onChange"];
1491
+ const _excluded$i = ["label", "disabled", "indeterminate", "defaultChecked", "onChange"];
1040
1492
  const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref, ref) {
1041
1493
  var _ref2, _props$checked, _props$checked2;
1042
1494
 
@@ -1047,7 +1499,7 @@ const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref,
1047
1499
  defaultChecked,
1048
1500
  onChange
1049
1501
  } = _ref,
1050
- props = _objectWithoutProperties(_ref, _excluded$g);
1502
+ props = _objectWithoutProperties(_ref, _excluded$i);
1051
1503
 
1052
1504
  const isControlledComponent = typeof props.checked === 'boolean';
1053
1505
 
@@ -1106,26 +1558,6 @@ const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref,
1106
1558
  }), label ? /*#__PURE__*/React.createElement(Text, null, label) : null);
1107
1559
  });
1108
1560
 
1109
- let uid = 0;
1110
-
1111
- function uniqueId() {
1112
- return uid++;
1113
- }
1114
-
1115
- function generateElementId(prefix) {
1116
- const num = uniqueId();
1117
- return prefix + "-" + num;
1118
- }
1119
- function useId(providedId) {
1120
- const ref = React.useRef(providedId != null ? providedId : null);
1121
-
1122
- if (!ref.current) {
1123
- ref.current = generateElementId('element');
1124
- }
1125
-
1126
- return ref.current;
1127
- }
1128
-
1129
1561
  var modules_540a88ff = {"container":"_2e189908","auxiliaryLabel":"_83051e0a","bordered":"fd20ef50","error":"d1a17d92","primaryLabel":"_75e0afa0","secondaryLabel":"d04a867d","messageIcon":"_77b2107e"};
1130
1562
 
1131
1563
  function FieldHint(props) {
@@ -1275,7 +1707,7 @@ var modules_3f03ead6 = {"inputWrapper":"_66b448b3"};
1275
1707
 
1276
1708
  var modules_aaf25250 = {"inputWrapper":"_9d172ece","bordered":"c59d0239","error":"_7e63ee20"};
1277
1709
 
1278
- const _excluded$h = ["variant", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "togglePasswordLabel", "hidden", "aria-describedby"];
1710
+ const _excluded$j = ["variant", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "togglePasswordLabel", "hidden", "aria-describedby"];
1279
1711
  const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref, ref) {
1280
1712
  let {
1281
1713
  variant = 'default',
@@ -1290,7 +1722,7 @@ const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref,
1290
1722
  hidden,
1291
1723
  'aria-describedby': ariaDescribedBy
1292
1724
  } = _ref,
1293
- props = _objectWithoutProperties(_ref, _excluded$h);
1725
+ props = _objectWithoutProperties(_ref, _excluded$j);
1294
1726
 
1295
1727
  const id = useId(props.id);
1296
1728
  const internalRef = React.useRef(null);
@@ -1339,7 +1771,7 @@ const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref,
1339
1771
 
1340
1772
  var modules_1fa9b208 = {"selectWrapper":"_07e75293","error":"f147bcea"};
1341
1773
 
1342
- const _excluded$i = ["id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "children", "hidden", "aria-describedby"];
1774
+ const _excluded$k = ["id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "children", "hidden", "aria-describedby"];
1343
1775
  const SelectField = /*#__PURE__*/React.forwardRef(function SelectField(_ref, ref) {
1344
1776
  let {
1345
1777
  id,
@@ -1354,7 +1786,7 @@ const SelectField = /*#__PURE__*/React.forwardRef(function SelectField(_ref, ref
1354
1786
  hidden,
1355
1787
  'aria-describedby': ariaDescribedBy
1356
1788
  } = _ref,
1357
- props = _objectWithoutProperties(_ref, _excluded$i);
1789
+ props = _objectWithoutProperties(_ref, _excluded$k);
1358
1790
 
1359
1791
  return /*#__PURE__*/React.createElement(BaseField, {
1360
1792
  id: id,
@@ -1390,7 +1822,7 @@ function SelectChevron(props) {
1390
1822
 
1391
1823
  var modules_8e05f7c9 = {"container":"ec63c3f1","disabled":"_7de9c06d","checked":"a37981fc","toggle":"_2a17ac45","label":"_68cc9707","handle":"_91409c7f","keyFocused":"a6490371"};
1392
1824
 
1393
- const _excluded$j = ["label", "hint", "disabled", "hidden", "defaultChecked", "id", "aria-describedby", "aria-label", "aria-labelledby", "onChange"];
1825
+ const _excluded$l = ["label", "hint", "disabled", "hidden", "defaultChecked", "id", "aria-describedby", "aria-label", "aria-labelledby", "onChange"];
1394
1826
  const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref) {
1395
1827
  var _ref2, _props$checked, _props$checked2;
1396
1828
 
@@ -1406,7 +1838,7 @@ const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref
1406
1838
  'aria-labelledby': originalAriaLabelledby,
1407
1839
  onChange
1408
1840
  } = _ref,
1409
- props = _objectWithoutProperties(_ref, _excluded$j);
1841
+ props = _objectWithoutProperties(_ref, _excluded$l);
1410
1842
 
1411
1843
  const id = useId(originalId);
1412
1844
  const hintId = useId();
@@ -1466,7 +1898,7 @@ const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref
1466
1898
 
1467
1899
  var modules_2728c236 = {"textAreaContainer":"_61447829","bordered":"_76f4ad88","error":"_4df3452b"};
1468
1900
 
1469
- const _excluded$k = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "hidden", "aria-describedby"];
1901
+ const _excluded$m = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "hidden", "aria-describedby"];
1470
1902
 
1471
1903
  function TextArea(_ref) {
1472
1904
  let {
@@ -1482,7 +1914,7 @@ function TextArea(_ref) {
1482
1914
  hidden,
1483
1915
  'aria-describedby': ariaDescribedBy
1484
1916
  } = _ref,
1485
- props = _objectWithoutProperties(_ref, _excluded$k);
1917
+ props = _objectWithoutProperties(_ref, _excluded$m);
1486
1918
 
1487
1919
  return /*#__PURE__*/React.createElement(BaseField, {
1488
1920
  variant: variant,
@@ -1503,7 +1935,7 @@ function TextArea(_ref) {
1503
1935
  }, /*#__PURE__*/React.createElement("textarea", _objectSpread2(_objectSpread2({}, props), extraProps))));
1504
1936
  }
1505
1937
 
1506
- const _excluded$l = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "type", "maxWidth", "hidden", "aria-describedby"];
1938
+ const _excluded$n = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "type", "maxWidth", "hidden", "aria-describedby"];
1507
1939
  const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
1508
1940
  let {
1509
1941
  variant = 'default',
@@ -1519,7 +1951,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
1519
1951
  hidden,
1520
1952
  'aria-describedby': ariaDescribedBy
1521
1953
  } = _ref,
1522
- props = _objectWithoutProperties(_ref, _excluded$l);
1954
+ props = _objectWithoutProperties(_ref, _excluded$n);
1523
1955
 
1524
1956
  return /*#__PURE__*/React.createElement(BaseField, {
1525
1957
  variant: variant,
@@ -1570,7 +2002,7 @@ function emailToIndex(email, maxIndex) {
1570
2002
 
1571
2003
  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"};
1572
2004
 
1573
- const _excluded$m = ["user", "avatarUrl", "size", "className", "colorList", "exceptionallySetClassName"];
2005
+ const _excluded$o = ["user", "avatarUrl", "size", "className", "colorList", "exceptionallySetClassName"];
1574
2006
  const AVATAR_COLORS = ['#fcc652', '#e9952c', '#e16b2d', '#d84b40', '#e8435a', '#e5198a', '#ad3889', '#86389c', '#a8a8a8', '#98be2f', '#5d9d50', '#5f9f85', '#5bbcb6', '#32a3bf', '#2bafeb', '#2d88c3', '#3863cc', '#5e5e5e'];
1575
2007
 
1576
2008
  function Avatar(_ref) {
@@ -1582,7 +2014,7 @@ function Avatar(_ref) {
1582
2014
  colorList = AVATAR_COLORS,
1583
2015
  exceptionallySetClassName
1584
2016
  } = _ref,
1585
- props = _objectWithoutProperties(_ref, _excluded$m);
2017
+ props = _objectWithoutProperties(_ref, _excluded$o);
1586
2018
 
1587
2019
  const userInitials = getInitials(user.name) || getInitials(user.email);
1588
2020
  const avatarSize = size ? size : 'l';
@@ -1602,16 +2034,16 @@ function Avatar(_ref) {
1602
2034
 
1603
2035
  Avatar.displayName = 'Avatar';
1604
2036
 
1605
- var modules_33c7c985 = {"badge":"_0b1e00ed","badge-neutral":"dda494a5","badge-positive":"_9260b8b0","badge-color":"_73a14c03"};
2037
+ var modules_33c7c985 = {"badge":"d05d2b62","badge-neutral":"a14691f3","badge-positive":"_4e255fdb","badge-color":"a58624e2"};
1606
2038
 
1607
- const _excluded$n = ["variant", "children"];
2039
+ const _excluded$p = ["variant", "children"];
1608
2040
 
1609
2041
  function Badge(_ref) {
1610
2042
  let {
1611
2043
  variant = 'neutral',
1612
2044
  children
1613
2045
  } = _ref,
1614
- rest = _objectWithoutProperties(_ref, _excluded$n);
2046
+ rest = _objectWithoutProperties(_ref, _excluded$p);
1615
2047
 
1616
2048
  const variantClassName = modules_33c7c985["badge-" + variant];
1617
2049
  return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, rest), {}, {
@@ -1621,7 +2053,7 @@ function Badge(_ref) {
1621
2053
 
1622
2054
  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"};
1623
2055
 
1624
- const _excluded$o = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "autoFocus", "children"],
2056
+ const _excluded$q = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "autoFocus", "children"],
1625
2057
  _excluded2$1 = ["children", "button", "withDivider", "exceptionallySetClassName"],
1626
2058
  _excluded3 = ["exceptionallySetClassName", "children"],
1627
2059
  _excluded4 = ["exceptionallySetClassName", "withDivider"],
@@ -1655,7 +2087,7 @@ function Modal(_ref) {
1655
2087
  autoFocus = true,
1656
2088
  children
1657
2089
  } = _ref,
1658
- props = _objectWithoutProperties(_ref, _excluded$o);
2090
+ props = _objectWithoutProperties(_ref, _excluded$q);
1659
2091
 
1660
2092
  const setVisible = React.useCallback(visible => {
1661
2093
  if (!visible) {
@@ -1899,7 +2331,7 @@ function usePrevious(value) {
1899
2331
 
1900
2332
  var modules_40c67f5b = {"tab":"a1064a3b","track":"_06f1b8a1","tab-neutral":"dabbec7d","tab-themed":"e6f5ae4e","track-neutral":"_43913ce5","track-themed":"_39bdfdde","track-xsmall":"_1c148f4e","track-small":"_2a370df5","track-medium":"_77430437","track-large":"_33db5352","track-xlarge":"_60bf9564","track-xxlarge":"_29a35080"};
1901
2333
 
1902
- const _excluded$p = ["as", "children", "id", "exceptionallySetClassName"],
2334
+ const _excluded$r = ["as", "children", "id", "exceptionallySetClassName"],
1903
2335
  _excluded2$2 = ["children", "space"],
1904
2336
  _excluded3$1 = ["children", "id", "as", "render"];
1905
2337
  const TabsContext = /*#__PURE__*/React.createContext(null);
@@ -1949,7 +2381,7 @@ const Tab = /*#__PURE__*/polymorphicComponent(function Tab(_ref, ref) {
1949
2381
  id,
1950
2382
  exceptionallySetClassName
1951
2383
  } = _ref,
1952
- props = _objectWithoutProperties(_ref, _excluded$p);
2384
+ props = _objectWithoutProperties(_ref, _excluded$r);
1953
2385
 
1954
2386
  const tabContextValue = React.useContext(TabsContext);
1955
2387
 
@@ -2058,7 +2490,7 @@ function TabAwareSlot({
2058
2490
  }) : null;
2059
2491
  }
2060
2492
 
2061
- const _excluded$q = ["type", "variant", "size", "loading", "disabled", "tooltip", "onClick", "children"];
2493
+ const _excluded$s = ["type", "variant", "size", "loading", "disabled", "tooltip", "onClick", "children"];
2062
2494
  /**
2063
2495
  * @deprecated
2064
2496
  */
@@ -2074,7 +2506,7 @@ const Button$1 = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
2074
2506
  onClick,
2075
2507
  children
2076
2508
  } = _ref,
2077
- props = _objectWithoutProperties(_ref, _excluded$q);
2509
+ props = _objectWithoutProperties(_ref, _excluded$s);
2078
2510
 
2079
2511
  const className = classNames('reactist_button', variant ? "reactist_button--" + variant : null, size !== 'default' ? "reactist_button--" + size : null, {
2080
2512
  'reactist_button--loading': loading
@@ -2097,7 +2529,7 @@ Button$1.defaultProps = {
2097
2529
  disabled: false
2098
2530
  };
2099
2531
 
2100
- const _excluded$r = ["children", "onClick", "tooltip", "className"];
2532
+ const _excluded$t = ["children", "onClick", "tooltip", "className"];
2101
2533
 
2102
2534
  class Box$1 extends React.Component {
2103
2535
  constructor(props, context) {
@@ -2250,7 +2682,7 @@ const Trigger = /*#__PURE__*/React.forwardRef(function Trigger(_ref, ref) {
2250
2682
  tooltip,
2251
2683
  className
2252
2684
  } = _ref,
2253
- props = _objectWithoutProperties(_ref, _excluded$r);
2685
+ props = _objectWithoutProperties(_ref, _excluded$t);
2254
2686
 
2255
2687
  function handleClick(event) {
2256
2688
  event.preventDefault();
@@ -2377,7 +2809,7 @@ function ColorItem({
2377
2809
 
2378
2810
  ColorItem.displayName = 'ColorItem';
2379
2811
 
2380
- const _excluded$s = ["children", "className", "translateKey", "isMac"];
2812
+ const _excluded$u = ["children", "className", "translateKey", "isMac"];
2381
2813
  // Support for setting up how to translate modifiers globally.
2382
2814
  //
2383
2815
 
@@ -2459,7 +2891,7 @@ function KeyboardShortcut(_ref) {
2459
2891
  translateKey = globalTranslateKey,
2460
2892
  isMac = (_navigator$platform$t = (_navigator$platform = navigator.platform) == null ? void 0 : _navigator$platform.toUpperCase().includes('MAC')) != null ? _navigator$platform$t : false
2461
2893
  } = _ref,
2462
- props = _objectWithoutProperties(_ref, _excluded$s);
2894
+ props = _objectWithoutProperties(_ref, _excluded$u);
2463
2895
 
2464
2896
  const shortcuts = typeof children === 'string' ? [children] : children;
2465
2897
  return /*#__PURE__*/React.createElement("span", _objectSpread2({
@@ -2865,83 +3297,7 @@ Time.defaultProps = {
2865
3297
  }
2866
3298
  };
2867
3299
 
2868
- const CloseIcon$1 = () => /*#__PURE__*/React.createElement("svg", {
2869
- width: "24",
2870
- height: "24",
2871
- viewBox: "0 0 24 24"
2872
- }, /*#__PURE__*/React.createElement("path", {
2873
- fill: "gray",
2874
- fillRule: "evenodd",
2875
- 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"
2876
- }));
2877
-
2878
- const _excluded$t = ["id", "icon", "title", "subtitle", "children", "customCloseButton", "onClick", "onClose", "closeAltText", "className", "aria-live"];
2879
-
2880
- function Notification(_ref) {
2881
- let {
2882
- id,
2883
- icon,
2884
- title,
2885
- subtitle,
2886
- children,
2887
- customCloseButton,
2888
- onClick,
2889
- onClose,
2890
- closeAltText = 'Close',
2891
- className,
2892
- 'aria-live': ariaLive = 'polite'
2893
- } = _ref,
2894
- rest = _objectWithoutProperties(_ref, _excluded$t);
2895
-
2896
- const titleId = title ? id + "-title" : null;
2897
- const titleIdAttribute = titleId ? {
2898
- id: titleId
2899
- } : null;
2900
- const subtitleId = subtitle ? id + "-subtitle" : null;
2901
- const subtitleIdAttribute = subtitleId ? {
2902
- id: subtitleId
2903
- } : null;
2904
- const contentId = children ? id + "-content" : null;
2905
- const contentIdAttribute = children ? {
2906
- id: id + "-content"
2907
- } : null;
2908
- const ariaLabelledBy = contentId ? {
2909
- 'aria-labelledby': contentId
2910
- } : titleId ? {
2911
- 'aria-labelledby': titleId
2912
- } : null;
2913
- const ariaDescribedBy = subtitleId && !children ? {
2914
- 'aria-describedby': subtitleId
2915
- } : null;
2916
- const notificationContent = /*#__PURE__*/React.createElement("div", _objectSpread2({
2917
- className: "reactist-notification__content"
2918
- }, contentIdAttribute), children != null ? children : /*#__PURE__*/React.createElement(React.Fragment, null, title ? /*#__PURE__*/React.createElement("h3", _objectSpread2({
2919
- className: "reactist-notification__title"
2920
- }, titleIdAttribute), title) : null, subtitle ? /*#__PURE__*/React.createElement("p", _objectSpread2({
2921
- className: "reactist-notification__subtitle"
2922
- }, subtitleIdAttribute), subtitle) : null));
2923
- const notificationBody = /*#__PURE__*/React.createElement("div", {
2924
- className: "reactist-notification__icon-content-group"
2925
- }, icon != null ? icon : null, notificationContent);
2926
- return /*#__PURE__*/React.createElement("div", _objectSpread2(_objectSpread2(_objectSpread2({
2927
- id: id,
2928
- role: "alert",
2929
- className: classNames('reactist-notification', className, {
2930
- 'reactist-notification--with-button': Boolean(onClick),
2931
- 'reactist-notification--with-close-button': Boolean(onClose)
2932
- }),
2933
- "aria-live": ariaLive
2934
- }, ariaLabelledBy), ariaDescribedBy), rest), onClick ? /*#__PURE__*/React.createElement("button", {
2935
- className: "reactist-notification__button",
2936
- onClick: onClick
2937
- }, notificationBody) : notificationBody, onClose ? /*#__PURE__*/React.createElement("button", {
2938
- className: "reactist-notification__close-button",
2939
- onClick: onClose,
2940
- "aria-label": closeAltText
2941
- }, customCloseButton != null ? customCloseButton : /*#__PURE__*/React.createElement(CloseIcon$1, null)) : null);
2942
- }
2943
-
2944
- const _excluded$u = ["children", "onItemSelect"],
3300
+ const _excluded$v = ["children", "onItemSelect"],
2945
3301
  _excluded2$3 = ["exceptionallySetClassName"],
2946
3302
  _excluded3$2 = ["exceptionallySetClassName"],
2947
3303
  _excluded4$1 = ["value", "children", "onSelect", "hideOnSelect", "onClick", "exceptionallySetClassName", "as"],
@@ -2963,7 +3319,7 @@ function Menu(_ref) {
2963
3319
  children,
2964
3320
  onItemSelect
2965
3321
  } = _ref,
2966
- props = _objectWithoutProperties(_ref, _excluded$u);
3322
+ props = _objectWithoutProperties(_ref, _excluded$v);
2967
3323
 
2968
3324
  const state = Ariakit.useMenuState(_objectSpread2({
2969
3325
  focusLoop: true,
@@ -3150,7 +3506,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
3150
3506
  });
3151
3507
  Input.displayName = 'Input';
3152
3508
 
3153
- const _excluded$v = ["value", "options", "onChange", "disabled", "className", "defaultValue"];
3509
+ const _excluded$w = ["value", "options", "onChange", "disabled", "className", "defaultValue"];
3154
3510
 
3155
3511
  function Select(_ref) {
3156
3512
  let {
@@ -3161,7 +3517,7 @@ function Select(_ref) {
3161
3517
  className = '',
3162
3518
  defaultValue
3163
3519
  } = _ref,
3164
- otherProps = _objectWithoutProperties(_ref, _excluded$v);
3520
+ otherProps = _objectWithoutProperties(_ref, _excluded$w);
3165
3521
 
3166
3522
  const selectClassName = classNames('reactist_select', {
3167
3523
  disabled
@@ -3185,9 +3541,85 @@ Select.defaultProps = {
3185
3541
  disabled: false
3186
3542
  };
3187
3543
 
3544
+ const CloseIcon$1 = () => /*#__PURE__*/React.createElement("svg", {
3545
+ width: "24",
3546
+ height: "24",
3547
+ viewBox: "0 0 24 24"
3548
+ }, /*#__PURE__*/React.createElement("path", {
3549
+ fill: "gray",
3550
+ fillRule: "evenodd",
3551
+ 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"
3552
+ }));
3553
+
3554
+ const _excluded$x = ["id", "icon", "title", "subtitle", "children", "customCloseButton", "onClick", "onClose", "closeAltText", "className", "aria-live"];
3555
+
3556
+ function DeprecatedNotification(_ref) {
3557
+ let {
3558
+ id,
3559
+ icon,
3560
+ title,
3561
+ subtitle,
3562
+ children,
3563
+ customCloseButton,
3564
+ onClick,
3565
+ onClose,
3566
+ closeAltText = 'Close',
3567
+ className,
3568
+ 'aria-live': ariaLive = 'polite'
3569
+ } = _ref,
3570
+ rest = _objectWithoutProperties(_ref, _excluded$x);
3571
+
3572
+ const titleId = title ? id + "-title" : null;
3573
+ const titleIdAttribute = titleId ? {
3574
+ id: titleId
3575
+ } : null;
3576
+ const subtitleId = subtitle ? id + "-subtitle" : null;
3577
+ const subtitleIdAttribute = subtitleId ? {
3578
+ id: subtitleId
3579
+ } : null;
3580
+ const contentId = children ? id + "-content" : null;
3581
+ const contentIdAttribute = children ? {
3582
+ id: id + "-content"
3583
+ } : null;
3584
+ const ariaLabelledBy = contentId ? {
3585
+ 'aria-labelledby': contentId
3586
+ } : titleId ? {
3587
+ 'aria-labelledby': titleId
3588
+ } : null;
3589
+ const ariaDescribedBy = subtitleId && !children ? {
3590
+ 'aria-describedby': subtitleId
3591
+ } : null;
3592
+ const notificationContent = /*#__PURE__*/React.createElement("div", _objectSpread2({
3593
+ className: "reactist-notification__content"
3594
+ }, contentIdAttribute), children != null ? children : /*#__PURE__*/React.createElement(React.Fragment, null, title ? /*#__PURE__*/React.createElement("h3", _objectSpread2({
3595
+ className: "reactist-notification__title"
3596
+ }, titleIdAttribute), title) : null, subtitle ? /*#__PURE__*/React.createElement("p", _objectSpread2({
3597
+ className: "reactist-notification__subtitle"
3598
+ }, subtitleIdAttribute), subtitle) : null));
3599
+ const notificationBody = /*#__PURE__*/React.createElement("div", {
3600
+ className: "reactist-notification__icon-content-group"
3601
+ }, icon != null ? icon : null, notificationContent);
3602
+ return /*#__PURE__*/React.createElement("div", _objectSpread2(_objectSpread2(_objectSpread2({
3603
+ id: id,
3604
+ role: "alert",
3605
+ className: classNames('reactist-notification', className, {
3606
+ 'reactist-notification--with-button': Boolean(onClick),
3607
+ 'reactist-notification--with-close-button': Boolean(onClose)
3608
+ }),
3609
+ "aria-live": ariaLive
3610
+ }, ariaLabelledBy), ariaDescribedBy), rest), onClick ? /*#__PURE__*/React.createElement("button", {
3611
+ className: "reactist-notification__button",
3612
+ onClick: onClick
3613
+ }, notificationBody) : notificationBody, onClose ? /*#__PURE__*/React.createElement("button", {
3614
+ className: "reactist-notification__close-button",
3615
+ onClick: onClose,
3616
+ "aria-label": closeAltText
3617
+ }, customCloseButton != null ? customCloseButton : /*#__PURE__*/React.createElement(CloseIcon$1, null)) : null);
3618
+ }
3619
+
3188
3620
  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"};
3189
3621
 
3190
- const _excluded$w = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "autoFocus", "children"],
3622
+ const _excluded$y = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "autoFocus", "children"],
3191
3623
  _excluded2$4 = ["children", "button", "withDivider", "exceptionallySetClassName"],
3192
3624
  _excluded3$3 = ["exceptionallySetClassName", "children"],
3193
3625
  _excluded4$2 = ["exceptionallySetClassName", "withDivider"],
@@ -3222,7 +3654,7 @@ function DeprecatedModal(_ref) {
3222
3654
  autoFocus = true,
3223
3655
  children
3224
3656
  } = _ref,
3225
- props = _objectWithoutProperties(_ref, _excluded$w);
3657
+ props = _objectWithoutProperties(_ref, _excluded$y);
3226
3658
 
3227
3659
  const contextValue = React.useMemo(() => ({
3228
3660
  onDismiss,
@@ -3411,6 +3843,7 @@ exports.DeprecatedModalBody = DeprecatedModalBody;
3411
3843
  exports.DeprecatedModalCloseButton = DeprecatedModalCloseButton;
3412
3844
  exports.DeprecatedModalFooter = DeprecatedModalFooter;
3413
3845
  exports.DeprecatedModalHeader = DeprecatedModalHeader;
3846
+ exports.DeprecatedNotification = DeprecatedNotification;
3414
3847
  exports.DeprecatedSelect = Select;
3415
3848
  exports.Divider = Divider;
3416
3849
  exports.Heading = Heading;
@@ -3432,12 +3865,12 @@ exports.ModalCloseButton = ModalCloseButton;
3432
3865
  exports.ModalFooter = ModalFooter;
3433
3866
  exports.ModalHeader = ModalHeader;
3434
3867
  exports.Notice = Notice;
3435
- exports.Notification = Notification;
3436
3868
  exports.PasswordField = PasswordField;
3437
3869
  exports.ProgressBar = ProgressBar;
3438
3870
  exports.SUPPORTED_KEYS = SUPPORTED_KEYS;
3439
3871
  exports.SelectField = SelectField;
3440
3872
  exports.Stack = Stack;
3873
+ exports.StaticToast = StaticToast;
3441
3874
  exports.SubMenu = SubMenu;
3442
3875
  exports.SwitchField = SwitchField;
3443
3876
  exports.Tab = Tab;
@@ -3450,6 +3883,9 @@ exports.TextArea = TextArea;
3450
3883
  exports.TextField = TextField;
3451
3884
  exports.TextLink = TextLink;
3452
3885
  exports.Time = Time;
3886
+ exports.Toast = Toast;
3887
+ exports.ToastsProvider = ToastsProvider;
3453
3888
  exports.Tooltip = Tooltip;
3454
3889
  exports.usePrevious = usePrevious;
3890
+ exports.useToasts = useToasts;
3455
3891
  //# sourceMappingURL=reactist.cjs.development.js.map