@doist/reactist 28.7.0 → 28.7.2

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 (125) hide show
  1. package/dist/reactist.cjs.development.js +67 -83
  2. package/dist/reactist.cjs.development.js.map +1 -1
  3. package/dist/reactist.cjs.production.min.js +1 -1
  4. package/dist/reactist.cjs.production.min.js.map +1 -1
  5. package/es/avatar/avatar.js +1 -1
  6. package/es/avatar/avatar.js.map +1 -1
  7. package/es/badge/badge.js +1 -1
  8. package/es/badge/badge.js.map +1 -1
  9. package/es/banner/banner.js +1 -1
  10. package/es/banner/banner.js.map +1 -1
  11. package/es/base-field/base-field.js +2 -2
  12. package/es/base-field/base-field.js.map +1 -1
  13. package/es/box/box.js +11 -13
  14. package/es/box/box.js.map +1 -1
  15. package/es/button/button.js +2 -2
  16. package/es/button/button.js.map +1 -1
  17. package/es/checkbox-field/checkbox-field.js +2 -4
  18. package/es/checkbox-field/checkbox-field.js.map +1 -1
  19. package/es/components/deprecated-button/deprecated-button.js +1 -1
  20. package/es/components/deprecated-button/deprecated-button.js.map +1 -1
  21. package/es/components/keyboard-shortcut/keyboard-shortcut.js +2 -2
  22. package/es/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  23. package/es/components/progress-bar/progress-bar.js +2 -2
  24. package/es/components/progress-bar/progress-bar.js.map +1 -1
  25. package/es/components/time/time-utils.js +3 -3
  26. package/es/components/time/time-utils.js.map +1 -1
  27. package/es/heading/heading.js +1 -1
  28. package/es/heading/heading.js.map +1 -1
  29. package/es/icons/banner-icon.js +1 -1
  30. package/es/icons/banner-icon.js.map +1 -1
  31. package/es/loading/loading.js +1 -3
  32. package/es/loading/loading.js.map +1 -1
  33. package/es/menu/menu.js +2 -2
  34. package/es/menu/menu.js.map +1 -1
  35. package/es/switch-field/switch-field.js +5 -7
  36. package/es/switch-field/switch-field.js.map +1 -1
  37. package/es/tabs/tabs.js +16 -20
  38. package/es/tabs/tabs.js.map +1 -1
  39. package/es/text/text.js +1 -1
  40. package/es/text/text.js.map +1 -1
  41. package/es/toast/toast-animation.js +2 -2
  42. package/es/toast/toast-animation.js.map +1 -1
  43. package/es/toast/use-toasts.js +2 -6
  44. package/es/toast/use-toasts.js.map +1 -1
  45. package/es/tooltip/tooltip.js +2 -2
  46. package/es/tooltip/tooltip.js.map +1 -1
  47. package/es/utils/common-helpers.js +2 -2
  48. package/es/utils/common-helpers.js.map +1 -1
  49. package/es/utils/responsive-props.js +4 -4
  50. package/es/utils/responsive-props.js.map +1 -1
  51. package/lib/avatar/avatar.js +1 -1
  52. package/lib/avatar/avatar.js.map +1 -1
  53. package/lib/badge/badge.js.map +1 -1
  54. package/lib/banner/banner.js +1 -1
  55. package/lib/banner/banner.js.map +1 -1
  56. package/lib/base-field/base-field.js +1 -1
  57. package/lib/base-field/base-field.js.map +1 -1
  58. package/lib/box/box.js +1 -1
  59. package/lib/box/box.js.map +1 -1
  60. package/lib/button/button.js.map +1 -1
  61. package/lib/checkbox-field/checkbox-field.js +1 -1
  62. package/lib/checkbox-field/checkbox-field.js.map +1 -1
  63. package/lib/components/deprecated-button/deprecated-button.js.map +1 -1
  64. package/lib/components/keyboard-shortcut/keyboard-shortcut.js +1 -1
  65. package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  66. package/lib/components/progress-bar/progress-bar.js +1 -1
  67. package/lib/components/progress-bar/progress-bar.js.map +1 -1
  68. package/lib/components/time/time-utils.js +1 -1
  69. package/lib/components/time/time-utils.js.map +1 -1
  70. package/lib/heading/heading.js.map +1 -1
  71. package/lib/loading/loading.js +1 -1
  72. package/lib/loading/loading.js.map +1 -1
  73. package/lib/menu/menu.js +1 -1
  74. package/lib/menu/menu.js.map +1 -1
  75. package/lib/switch-field/switch-field.js +1 -1
  76. package/lib/switch-field/switch-field.js.map +1 -1
  77. package/lib/tabs/tabs.js +1 -1
  78. package/lib/tabs/tabs.js.map +1 -1
  79. package/lib/text/text.js +1 -1
  80. package/lib/text/text.js.map +1 -1
  81. package/lib/toast/toast-animation.js +1 -1
  82. package/lib/toast/toast-animation.js.map +1 -1
  83. package/lib/toast/use-toasts.js +1 -1
  84. package/lib/toast/use-toasts.js.map +1 -1
  85. package/lib/tooltip/tooltip.js +1 -1
  86. package/lib/tooltip/tooltip.js.map +1 -1
  87. package/lib/utils/common-helpers.js +1 -1
  88. package/lib/utils/common-helpers.js.map +1 -1
  89. package/lib/utils/responsive-props.js +1 -1
  90. package/lib/utils/responsive-props.js.map +1 -1
  91. package/package.json +3 -6
  92. package/styles/avatar.css +2 -2
  93. package/styles/badge.css +2 -2
  94. package/styles/banner.css +4 -4
  95. package/styles/banner.module.css.css +1 -1
  96. package/styles/base-field.css +3 -3
  97. package/styles/box.css +2 -2
  98. package/styles/box.module.css.css +1 -1
  99. package/styles/button.css +3 -3
  100. package/styles/checkbox-field.css +2 -2
  101. package/styles/columns.css +2 -2
  102. package/styles/divider.css +2 -2
  103. package/styles/heading.css +2 -2
  104. package/styles/hidden-visually.css +2 -2
  105. package/styles/hidden.css +2 -2
  106. package/styles/index.css +3 -3
  107. package/styles/loading.css +3 -3
  108. package/styles/modal.css +4 -4
  109. package/styles/modal.module.css.css +1 -1
  110. package/styles/notice.css +2 -2
  111. package/styles/password-field.css +3 -3
  112. package/styles/prose.css +2 -2
  113. package/styles/reactist.css +6 -6
  114. package/styles/select-field.css +3 -3
  115. package/styles/spinner.css +1 -1
  116. package/styles/static-toast.css +3 -3
  117. package/styles/switch-field.css +3 -3
  118. package/styles/tabs.css +2 -2
  119. package/styles/text-area.css +3 -3
  120. package/styles/text-field.css +3 -3
  121. package/styles/text-link.css +2 -2
  122. package/styles/text.css +2 -2
  123. package/styles/tooltip.css +2 -2
  124. package/styles/use-toasts.css +3 -3
  125. package/styles/width.module.css.css +1 -1
@@ -170,11 +170,11 @@ function getClassNames(styles, property, value) {
170
170
  const classList = [];
171
171
 
172
172
  if (typeof value === 'string') {
173
- classList.push(styles[property + "-" + value]);
173
+ classList.push(styles[`${property}-${value}`]);
174
174
  } else {
175
- if (value.mobile) classList.push(styles[property + "-" + value.mobile]);
176
- if (value.tablet) classList.push(styles["tablet-" + property + "-" + value.tablet]);
177
- if (value.desktop) classList.push(styles["desktop-" + property + "-" + value.desktop]);
175
+ if (value.mobile) classList.push(styles[`${property}-${value.mobile}`]);
176
+ if (value.tablet) classList.push(styles[`tablet-${property}-${value.tablet}`]);
177
+ if (value.desktop) classList.push(styles[`desktop-${property}-${value.desktop}`]);
178
178
  }
179
179
 
180
180
  if (!classList.every(Boolean)) {
@@ -265,16 +265,14 @@ function getBoxClassNames({
265
265
  overlayScroll,
266
266
  className
267
267
  }) {
268
- var _ref, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8;
269
-
270
- const resolvedPaddingTop = (_ref = paddingTop != null ? paddingTop : paddingY) != null ? _ref : padding;
271
- const resolvedPaddingRight = (_ref2 = paddingRight != null ? paddingRight : paddingX) != null ? _ref2 : padding;
272
- const resolvedPaddingBottom = (_ref3 = paddingBottom != null ? paddingBottom : paddingY) != null ? _ref3 : padding;
273
- const resolvedPaddingLeft = (_ref4 = paddingLeft != null ? paddingLeft : paddingX) != null ? _ref4 : padding;
274
- const resolvedMarginTop = (_ref5 = marginTop != null ? marginTop : marginY) != null ? _ref5 : margin;
275
- const resolvedMarginRight = (_ref6 = marginRight != null ? marginRight : marginX) != null ? _ref6 : margin;
276
- const resolvedMarginBottom = (_ref7 = marginBottom != null ? marginBottom : marginY) != null ? _ref7 : margin;
277
- const resolvedMarginLeft = (_ref8 = marginLeft != null ? marginLeft : marginX) != null ? _ref8 : margin;
268
+ const resolvedPaddingTop = paddingTop ?? paddingY ?? padding;
269
+ const resolvedPaddingRight = paddingRight ?? paddingX ?? padding;
270
+ const resolvedPaddingBottom = paddingBottom ?? paddingY ?? padding;
271
+ const resolvedPaddingLeft = paddingLeft ?? paddingX ?? padding;
272
+ const resolvedMarginTop = marginTop ?? marginY ?? margin;
273
+ const resolvedMarginRight = marginRight ?? marginX ?? margin;
274
+ const resolvedMarginBottom = marginBottom ?? marginY ?? margin;
275
+ const resolvedMarginLeft = marginLeft ?? marginX ?? margin;
278
276
  const omitFlex = !display || typeof display === 'string' && display !== 'flex' && display !== 'inlineFlex';
279
277
  return classNames__default["default"](className, modules_54d944f2.box, display ? getClassNames(modules_54d944f2, 'display', display) : null, position !== 'static' ? getClassNames(modules_54d944f2, 'position', position) : null, minWidth != null ? getClassNames(modules_89b7671c, 'minWidth', String(minWidth)) : null, getClassNames(modules_89b7671c, 'maxWidth', maxWidth), getClassNames(modules_54d944f2, 'textAlign', textAlign), // padding
280
278
  getClassNames(modules_b537a8ee, 'paddingTop', resolvedPaddingTop), getClassNames(modules_b537a8ee, 'paddingRight', resolvedPaddingRight), getClassNames(modules_b537a8ee, 'paddingBottom', resolvedPaddingBottom), getClassNames(modules_b537a8ee, 'paddingLeft', resolvedPaddingLeft), // margin
@@ -283,7 +281,7 @@ function getBoxClassNames({
283
281
  getClassNames(modules_54d944f2, 'overflow', overflow), width != null ? getClassNames(modules_89b7671c, 'width', String(width)) : null, getClassNames(modules_54d944f2, 'height', height), getClassNames(modules_54d944f2, 'bg', background), borderRadius !== 'none' ? getClassNames(modules_54d944f2, 'borderRadius', borderRadius) : null, border !== 'none' ? getClassNames(modules_54d944f2, 'border', border) : null, overlayScroll ? modules_54d944f2.overlayScroll : null);
284
282
  }
285
283
 
286
- const Box$1 = /*#__PURE__*/polymorphicComponent(function Box(_ref9, ref) {
284
+ const Box$1 = /*#__PURE__*/polymorphicComponent(function Box(_ref, ref) {
287
285
  let {
288
286
  as: component = 'div',
289
287
  position = 'static',
@@ -322,8 +320,8 @@ const Box$1 = /*#__PURE__*/polymorphicComponent(function Box(_ref9, ref) {
322
320
  overlayScroll,
323
321
  className,
324
322
  children
325
- } = _ref9,
326
- props = _objectWithoutProperties(_ref9, _excluded$w);
323
+ } = _ref,
324
+ props = _objectWithoutProperties(_ref, _excluded$w);
327
325
 
328
326
  return /*#__PURE__*/React__namespace.createElement(component, _objectSpread2(_objectSpread2({}, props), {}, {
329
327
  className: getBoxClassNames({
@@ -560,10 +558,10 @@ function uniqueId() {
560
558
 
561
559
  function generateElementId(prefix) {
562
560
  const num = uniqueId();
563
- return prefix + "-" + num;
561
+ return `${prefix}-${num}`;
564
562
  }
565
563
  function useId(providedId) {
566
- const ref = React__namespace.useRef(providedId != null ? providedId : null);
564
+ const ref = React__namespace.useRef(providedId ?? null);
567
565
 
568
566
  if (!ref.current) {
569
567
  ref.current = generateElementId('element');
@@ -637,8 +635,8 @@ const Tooltip = /*#__PURE__*/React__namespace.forwardRef(({
637
635
  } = React__namespace.useContext(TooltipContext);
638
636
  const tooltip = react.useTooltipStore({
639
637
  placement: position,
640
- showTimeout: showTimeout != null ? showTimeout : globalShowTimeout,
641
- hideTimeout: hideTimeout != null ? hideTimeout : globalHideTimeout
638
+ showTimeout: showTimeout ?? globalShowTimeout,
639
+ hideTimeout: hideTimeout ?? globalHideTimeout
642
640
  });
643
641
  React__namespace.useImperativeHandle(ref, () => tooltip, [tooltip]);
644
642
  const isOpen = tooltip.useState('open');
@@ -718,7 +716,7 @@ const Button$1 = /*#__PURE__*/React__namespace.forwardRef(function Button(_ref,
718
716
  onClick: isDisabled ? preventDefault : onClick,
719
717
  className: classNames__default["default"]([getBoxClassNames({
720
718
  width
721
- }), exceptionallySetClassName, modules_5357ebb8.baseButton, modules_5357ebb8["variant-" + variant], modules_5357ebb8["tone-" + tone], modules_5357ebb8["size-" + size], shape === 'rounded' ? modules_5357ebb8['shape-rounded'] : null, disabled ? modules_5357ebb8.disabled : null])
719
+ }), exceptionallySetClassName, modules_5357ebb8.baseButton, modules_5357ebb8[`variant-${variant}`], modules_5357ebb8[`tone-${tone}`], modules_5357ebb8[`size-${size}`], shape === 'rounded' ? modules_5357ebb8['shape-rounded'] : null, disabled ? modules_5357ebb8.disabled : null])
722
720
  }), /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, startIcon ? /*#__PURE__*/React__namespace.createElement(Box$1, {
723
721
  display: "flex",
724
722
  className: modules_5357ebb8.startIcon,
@@ -769,7 +767,7 @@ const IconButton = /*#__PURE__*/React__namespace.forwardRef(function IconButton(
769
767
  ref: ref,
770
768
  "aria-disabled": isDisabled,
771
769
  onClick: isDisabled ? preventDefault : onClick,
772
- className: classNames__default["default"]([exceptionallySetClassName, modules_5357ebb8.baseButton, modules_5357ebb8["variant-" + variant], modules_5357ebb8["tone-" + tone], modules_5357ebb8["size-" + size], shape === 'rounded' ? modules_5357ebb8['shape-rounded'] : null, modules_5357ebb8.iconButton, disabled ? modules_5357ebb8.disabled : null])
770
+ className: classNames__default["default"]([exceptionallySetClassName, modules_5357ebb8.baseButton, modules_5357ebb8[`variant-${variant}`], modules_5357ebb8[`tone-${tone}`], modules_5357ebb8[`size-${size}`], shape === 'rounded' ? modules_5357ebb8['shape-rounded'] : null, modules_5357ebb8.iconButton, disabled ? modules_5357ebb8.disabled : null])
773
771
  }), loading && /*#__PURE__*/React__namespace.createElement(Spinner, null) || icon);
774
772
  const tooltipContent = tooltip === undefined ? props['aria-label'] : tooltip;
775
773
  return tooltipContent ? /*#__PURE__*/React__namespace.createElement(Tooltip, {
@@ -808,7 +806,7 @@ function BannerIcon(_ref) {
808
806
 
809
807
  const Icon = bannerIconForType[type];
810
808
  return Icon ? /*#__PURE__*/React__namespace.createElement(Icon, _objectSpread2(_objectSpread2({}, props), {}, {
811
- "data-testid": "banner-icon-" + type,
809
+ "data-testid": `banner-icon-${type}`,
812
810
  className: modules_de8ae2e5[type],
813
811
  "aria-hidden": true
814
812
  })) : null;
@@ -958,7 +956,7 @@ const Banner = /*#__PURE__*/React__namespace.forwardRef(function Banner(_ref, re
958
956
  variant: "quaternary",
959
957
  onClick: onClose,
960
958
  icon: /*#__PURE__*/React__namespace.createElement(CloseIcon, null),
961
- "aria-label": closeLabel != null ? closeLabel : 'Close banner'
959
+ "aria-label": closeLabel ?? 'Close banner'
962
960
  }) : null;
963
961
  return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
964
962
  ref: ref,
@@ -1053,15 +1051,13 @@ const sizeMapping = {
1053
1051
  };
1054
1052
 
1055
1053
  function Loading(_ref) {
1056
- var _sizeMapping$size;
1057
-
1058
1054
  let {
1059
1055
  size = 'small',
1060
1056
  exceptionallySetClassName
1061
1057
  } = _ref,
1062
1058
  props = _objectWithoutProperties(_ref, _excluded$m);
1063
1059
 
1064
- const numericSize = (_sizeMapping$size = sizeMapping[size]) != null ? _sizeMapping$size : sizeMapping.small;
1060
+ const numericSize = sizeMapping[size] ?? sizeMapping.small;
1065
1061
  const ariaLabel = props['aria-label'] ? props['aria-label'] : !props['aria-labelledby'] ? 'Loading…' : undefined;
1066
1062
  return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
1067
1063
  "aria-label": ariaLabel,
@@ -1191,7 +1187,7 @@ const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
1191
1187
  } = _ref,
1192
1188
  props = _objectWithoutProperties(_ref, _excluded$k);
1193
1189
 
1194
- const lineClampMultipleLines = typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp != null ? lineClamp : 1) > 1;
1190
+ const lineClampMultipleLines = typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp ?? 1) > 1;
1195
1191
  return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
1196
1192
  as: as,
1197
1193
  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],
@@ -1394,7 +1390,7 @@ function useToastsAnimation() {
1394
1390
  transition: ENTRANCE_TRANSITION,
1395
1391
  transforms: [{
1396
1392
  property: 'transform',
1397
- from: "translateY(" + (prevTop - top) + "px)"
1393
+ from: `translateY(${prevTop - top}px)`
1398
1394
  }]
1399
1395
  });
1400
1396
  } else if (typeof prevTop !== 'number') {
@@ -1404,7 +1400,7 @@ function useToastsAnimation() {
1404
1400
  transition: ENTRANCE_TRANSITION,
1405
1401
  transforms: [{
1406
1402
  property: 'transform',
1407
- from: "translateY(" + height + "px)"
1403
+ from: `translateY(${height}px)`
1408
1404
  }, {
1409
1405
  property: 'opacity',
1410
1406
  from: '0'
@@ -1491,24 +1487,20 @@ const InternalToast = /*#__PURE__*/React__default["default"].forwardRef(function
1491
1487
  */
1492
1488
 
1493
1489
  const actionWithCustomActionHandler = React__default["default"].useMemo(() => {
1494
- var _action$closeToast;
1495
-
1496
1490
  if (!isActionObject(action)) {
1497
1491
  return action;
1498
1492
  }
1499
1493
 
1500
1494
  return _objectSpread2(_objectSpread2({}, action), {}, {
1501
- closeToast: (_action$closeToast = action.closeToast) != null ? _action$closeToast : true,
1495
+ closeToast: action.closeToast ?? true,
1502
1496
  onClick: function handleActionClick() {
1503
- var _action$closeToast2;
1504
-
1505
1497
  if (!action) {
1506
1498
  return;
1507
1499
  }
1508
1500
 
1509
1501
  action.onClick();
1510
1502
 
1511
- if ((_action$closeToast2 = action.closeToast) != null ? _action$closeToast2 : true) {
1503
+ if (action.closeToast ?? true) {
1512
1504
  removeToast();
1513
1505
  }
1514
1506
  }
@@ -1681,7 +1673,7 @@ const Heading = /*#__PURE__*/React__namespace.forwardRef(function Heading(_ref,
1681
1673
 
1682
1674
  // In TypeScript v4.1, this would be properly recognized without needing the type assertion
1683
1675
  // https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types
1684
- const headingElementName = "h" + level;
1676
+ const headingElementName = `h${level}`;
1685
1677
  const lineClampMultipleLines = typeof lineClamp === 'string' ? parseInt(lineClamp, 10) > 1 : (lineClamp || 0) > 1;
1686
1678
  return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
1687
1679
  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],
@@ -1806,8 +1798,6 @@ function useForkRef(...refs) {
1806
1798
 
1807
1799
  const _excluded$e = ["label", "icon", "disabled", "indeterminate", "defaultChecked", "onChange"];
1808
1800
  const CheckboxField = /*#__PURE__*/React__namespace.forwardRef(function CheckboxField(_ref, ref) {
1809
- var _ref2, _props$checked, _props$checked2;
1810
-
1811
1801
  let {
1812
1802
  label,
1813
1803
  icon,
@@ -1832,8 +1822,8 @@ const CheckboxField = /*#__PURE__*/React__namespace.forwardRef(function Checkbox
1832
1822
  }
1833
1823
 
1834
1824
  const [keyFocused, setKeyFocused] = React__namespace.useState(false);
1835
- const [checkedState, setChecked] = React__namespace.useState((_ref2 = (_props$checked = props.checked) != null ? _props$checked : defaultChecked) != null ? _ref2 : false);
1836
- const isChecked = (_props$checked2 = props.checked) != null ? _props$checked2 : checkedState;
1825
+ const [checkedState, setChecked] = React__namespace.useState(props.checked ?? defaultChecked ?? false);
1826
+ const isChecked = props.checked ?? checkedState;
1837
1827
  const internalRef = React__namespace.useRef(null);
1838
1828
  const combinedRef = useForkRef(internalRef, ref);
1839
1829
  React__namespace.useEffect(function setIndeterminate() {
@@ -1979,7 +1969,7 @@ function validateInputLength({
1979
1969
  const currentLength = String(value || '').length;
1980
1970
  const isNearMaxLength = maxLength - currentLength <= MAX_LENGTH_THRESHOLD;
1981
1971
  return {
1982
- count: currentLength + "/" + maxLength,
1972
+ count: `${currentLength}/${maxLength}`,
1983
1973
  tone: isNearMaxLength ? 'error' : 'neutral'
1984
1974
  };
1985
1975
  }
@@ -2014,7 +2004,7 @@ function BaseField({
2014
2004
  });
2015
2005
  const [characterCount, setCharacterCount] = React__namespace.useState(inputLength.count);
2016
2006
  const [characterCountTone, setCharacterCountTone] = React__namespace.useState(inputLength.tone);
2017
- const ariaDescribedBy = originalAriaDescribedBy != null ? originalAriaDescribedBy : message ? messageId : null;
2007
+ const ariaDescribedBy = originalAriaDescribedBy ?? (message ? messageId : null);
2018
2008
  const renderCharacterCountBelow = characterCountPosition === 'below' && characterCount !== null;
2019
2009
  const renderCharacterCountInline = characterCountPosition === 'inline' && characterCount !== null;
2020
2010
 
@@ -2272,8 +2262,6 @@ var modules_8e05f7c9 = {"container":"bae487be","disabled":"_408d32a0","checked":
2272
2262
 
2273
2263
  const _excluded$a = ["label", "message", "tone", "disabled", "hidden", "defaultChecked", "id", "aria-describedby", "aria-label", "aria-labelledby", "onChange"];
2274
2264
  const SwitchField = /*#__PURE__*/React__namespace.forwardRef(function SwitchField(_ref, ref) {
2275
- var _ref2, _props$checked, _props$checked2;
2276
-
2277
2265
  let {
2278
2266
  label,
2279
2267
  message,
@@ -2291,12 +2279,12 @@ const SwitchField = /*#__PURE__*/React__namespace.forwardRef(function SwitchFiel
2291
2279
 
2292
2280
  const id = useId(originalId);
2293
2281
  const messageId = useId();
2294
- const ariaDescribedBy = originalAriaDescribedBy != null ? originalAriaDescribedBy : message ? messageId : undefined;
2295
- const ariaLabel = originalAriaLabel != null ? originalAriaLabel : undefined;
2296
- const ariaLabelledBy = originalAriaLabelledby != null ? originalAriaLabelledby : undefined;
2282
+ const ariaDescribedBy = originalAriaDescribedBy ?? (message ? messageId : undefined);
2283
+ const ariaLabel = originalAriaLabel ?? undefined;
2284
+ const ariaLabelledBy = originalAriaLabelledby ?? undefined;
2297
2285
  const [keyFocused, setKeyFocused] = React__namespace.useState(false);
2298
- const [checkedState, setChecked] = React__namespace.useState((_ref2 = (_props$checked = props.checked) != null ? _props$checked : defaultChecked) != null ? _ref2 : false);
2299
- const isChecked = (_props$checked2 = props.checked) != null ? _props$checked2 : checkedState;
2286
+ const [checkedState, setChecked] = React__namespace.useState(props.checked ?? defaultChecked ?? false);
2287
+ const isChecked = props.checked ?? checkedState;
2300
2288
  return /*#__PURE__*/React__namespace.createElement(Stack, {
2301
2289
  space: "small",
2302
2290
  hidden: hidden
@@ -2507,7 +2495,7 @@ function Avatar(_ref) {
2507
2495
  const userInitials = getInitials(user.name) || getInitials(user.email);
2508
2496
  const avatarSize = size ? size : 'l';
2509
2497
  const style = avatarUrl ? {
2510
- backgroundImage: "url(" + avatarUrl + ")",
2498
+ backgroundImage: `url(${avatarUrl})`,
2511
2499
  textIndent: '-9999px' // hide the initials
2512
2500
 
2513
2501
  } : {
@@ -2537,7 +2525,7 @@ function Badge(_ref) {
2537
2525
  as: "span" // It enables putting the badge inside a button (https://stackoverflow.com/a/12982334)
2538
2526
  ,
2539
2527
  display: "inline",
2540
- className: [modules_33c7c985.badge, modules_33c7c985["badge-" + tone]]
2528
+ className: [modules_33c7c985.badge, modules_33c7c985[`badge-${tone}`]]
2541
2529
  }), label);
2542
2530
  }
2543
2531
 
@@ -2855,15 +2843,11 @@ function Tabs({
2855
2843
  setSelectedId: onSelectedIdChange
2856
2844
  });
2857
2845
  const actualSelectedId = tabStore.useState('selectedId');
2858
- const memoizedTabState = React__namespace.useMemo(() => {
2859
- var _ref;
2860
-
2861
- return {
2862
- tabStore,
2863
- variant,
2864
- selectedId: (_ref = selectedId != null ? selectedId : actualSelectedId) != null ? _ref : null
2865
- };
2866
- }, [variant, tabStore, selectedId, actualSelectedId]);
2846
+ const memoizedTabState = React__namespace.useMemo(() => ({
2847
+ tabStore,
2848
+ variant,
2849
+ selectedId: selectedId ?? actualSelectedId ?? null
2850
+ }), [variant, tabStore, selectedId, actualSelectedId]);
2867
2851
  return /*#__PURE__*/React__namespace.createElement(TabsContext.Provider, {
2868
2852
  value: memoizedTabState
2869
2853
  }, children);
@@ -2887,7 +2871,7 @@ const Tab = /*#__PURE__*/React__namespace.forwardRef(function Tab({
2887
2871
  variant,
2888
2872
  tabStore
2889
2873
  } = tabContextValue;
2890
- const className = classNames__default["default"](exceptionallySetClassName, modules_40c67f5b.tab, modules_40c67f5b["tab-" + variant]);
2874
+ const className = classNames__default["default"](exceptionallySetClassName, modules_40c67f5b.tab, modules_40c67f5b[`tab-${variant}`]);
2891
2875
  return /*#__PURE__*/React__namespace.createElement(react.Tab, {
2892
2876
  id: id,
2893
2877
  ref: ref,
@@ -2902,15 +2886,15 @@ const Tab = /*#__PURE__*/React__namespace.forwardRef(function Tab({
2902
2886
  * A component used to group `<Tab>` elements together.
2903
2887
  */
2904
2888
 
2905
- function TabList(_ref2) {
2889
+ function TabList(_ref) {
2906
2890
  let {
2907
2891
  children,
2908
2892
  space,
2909
2893
  width = 'maxContent',
2910
2894
  align = 'start',
2911
2895
  exceptionallySetClassName
2912
- } = _ref2,
2913
- props = _objectWithoutProperties(_ref2, _excluded$5);
2896
+ } = _ref,
2897
+ props = _objectWithoutProperties(_ref, _excluded$5);
2914
2898
 
2915
2899
  const tabListRef = React__namespace.useRef(null);
2916
2900
  const tabListPrevWidthRef = React__namespace.useRef(0);
@@ -2929,8 +2913,8 @@ function TabList(_ref2) {
2929
2913
  if (selectedTab) {
2930
2914
  setSelectedTabElement(selectedTab);
2931
2915
  setSelectedTabStyle({
2932
- left: selectedTab.offsetLeft + "px",
2933
- width: selectedTab.offsetWidth + "px"
2916
+ left: `${selectedTab.offsetLeft}px`,
2917
+ width: `${selectedTab.offsetWidth}px`
2934
2918
  });
2935
2919
  }
2936
2920
  }, [selectedId]);
@@ -3000,9 +2984,9 @@ function TabList(_ref2) {
3000
2984
  }),
3001
2985
  ref: tabListRef
3002
2986
  }, props), /*#__PURE__*/React__namespace.createElement(Box$1, {
3003
- className: [modules_40c67f5b.track, modules_40c67f5b["track-" + variant]]
2987
+ className: [modules_40c67f5b.track, modules_40c67f5b[`track-${variant}`]]
3004
2988
  }), selectedTabElement ? /*#__PURE__*/React__namespace.createElement(Box$1, {
3005
- className: [modules_40c67f5b.selected, modules_40c67f5b["selected-" + variant]],
2989
+ className: [modules_40c67f5b.selected, modules_40c67f5b[`selected-${variant}`]],
3006
2990
  style: selectedTabStyle
3007
2991
  }) : null, /*#__PURE__*/React__namespace.createElement(Inline, {
3008
2992
  space: space,
@@ -3016,13 +3000,13 @@ function TabList(_ref2) {
3016
3000
  */
3017
3001
 
3018
3002
 
3019
- const TabPanel = /*#__PURE__*/React__namespace.forwardRef(function TabPanel(_ref3, ref) {
3003
+ const TabPanel = /*#__PURE__*/React__namespace.forwardRef(function TabPanel(_ref2, ref) {
3020
3004
  let {
3021
3005
  children,
3022
3006
  id,
3023
3007
  renderMode = 'always'
3024
- } = _ref3,
3025
- props = _objectWithoutProperties(_ref3, _excluded2$1);
3008
+ } = _ref2,
3009
+ props = _objectWithoutProperties(_ref2, _excluded2$1);
3026
3010
 
3027
3011
  const tabContextValue = React__namespace.useContext(TabsContext);
3028
3012
  const [tabRendered, setTabRendered] = React__namespace.useState(false);
@@ -3196,9 +3180,9 @@ const MenuList = /*#__PURE__*/React__namespace.forwardRef(function MenuList(_ref
3196
3180
  shift: 4,
3197
3181
  ref: ref,
3198
3182
  className: classNames__default["default"]('reactist_menulist', exceptionallySetClassName),
3199
- getAnchorRect: getAnchorRect != null ? getAnchorRect : undefined,
3183
+ getAnchorRect: getAnchorRect ?? undefined,
3200
3184
  modal: modal,
3201
- flip: flip != null ? flip : isSubMenu ? 'left bottom' : undefined
3185
+ flip: flip ?? (isSubMenu ? 'left bottom' : undefined)
3202
3186
  }))) : null;
3203
3187
  });
3204
3188
  /**
@@ -3354,7 +3338,7 @@ const Button = /*#__PURE__*/React__namespace.forwardRef(function Button(_ref, re
3354
3338
  } = _ref,
3355
3339
  props = _objectWithoutProperties(_ref, _excluded$3);
3356
3340
 
3357
- const className = classNames__default["default"]('reactist_button', variant ? "reactist_button--" + variant : null, size !== 'default' ? "reactist_button--" + size : null, {
3341
+ const className = classNames__default["default"]('reactist_button', variant ? `reactist_button--${variant}` : null, size !== 'default' ? `reactist_button--${size}` : null, {
3358
3342
  'reactist_button--loading': loading
3359
3343
  }, props.className);
3360
3344
  const button = /*#__PURE__*/React__namespace.createElement("button", _objectSpread2(_objectSpread2({}, props), {}, {
@@ -3729,13 +3713,13 @@ function parseKeys(shortcut, isMac, translateKey) {
3729
3713
  }
3730
3714
 
3731
3715
  function KeyboardShortcut(_ref) {
3732
- var _navigator$platform$t, _navigator$platform;
3716
+ var _navigator$platform;
3733
3717
 
3734
3718
  let {
3735
3719
  children,
3736
3720
  className,
3737
3721
  translateKey = globalTranslateKey,
3738
- isMac = (_navigator$platform$t = (_navigator$platform = navigator.platform) == null ? void 0 : _navigator$platform.toUpperCase().includes('MAC')) != null ? _navigator$platform$t : false
3722
+ isMac = ((_navigator$platform = navigator.platform) == null ? void 0 : _navigator$platform.toUpperCase().includes('MAC')) ?? false
3739
3723
  } = _ref,
3740
3724
  props = _objectWithoutProperties(_ref, _excluded$1);
3741
3725
 
@@ -3947,12 +3931,12 @@ function ProgressBar({
3947
3931
  }, /*#__PURE__*/React__namespace.createElement("div", {
3948
3932
  className: modules_a0e70af1.inner,
3949
3933
  style: {
3950
- width: width + "%"
3934
+ width: `${width}%`
3951
3935
  }
3952
3936
  }), /*#__PURE__*/React__namespace.createElement(HiddenVisually, null, /*#__PURE__*/React__namespace.createElement("progress", {
3953
3937
  value: width,
3954
3938
  max: 100,
3955
- "aria-valuetext": ariaValuetext != null ? ariaValuetext : undefined
3939
+ "aria-valuetext": ariaValuetext ?? undefined
3956
3940
  })));
3957
3941
  }
3958
3942
 
@@ -3988,11 +3972,11 @@ const TimeUtils = {
3988
3972
  return date.format(shortFormatPastYear);
3989
3973
  }
3990
3974
  } else if (diffDays === 1) {
3991
- return "" + diffDays + daysSuffix;
3975
+ return `${diffDays}${daysSuffix}`;
3992
3976
  } else if (diffHours > 0 && diffHours <= 23) {
3993
- return "" + diffHours + hoursSuffix;
3977
+ return `${diffHours}${hoursSuffix}`;
3994
3978
  } else if (diffMinutes > 0 && diffMinutes <= 59) {
3995
- return "" + diffMinutes + minutesSuffix;
3979
+ return `${diffMinutes}${minutesSuffix}`;
3996
3980
  } else {
3997
3981
  return momentsAgo;
3998
3982
  }