@doist/reactist 28.6.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 (126) hide show
  1. package/dist/reactist.cjs.development.js +76 -84
  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 +10 -2
  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.d.ts +1 -1
  55. package/lib/banner/banner.js +1 -1
  56. package/lib/banner/banner.js.map +1 -1
  57. package/lib/base-field/base-field.js +1 -1
  58. package/lib/base-field/base-field.js.map +1 -1
  59. package/lib/box/box.js +1 -1
  60. package/lib/box/box.js.map +1 -1
  61. package/lib/button/button.js.map +1 -1
  62. package/lib/checkbox-field/checkbox-field.js +1 -1
  63. package/lib/checkbox-field/checkbox-field.js.map +1 -1
  64. package/lib/components/deprecated-button/deprecated-button.js.map +1 -1
  65. package/lib/components/keyboard-shortcut/keyboard-shortcut.js +1 -1
  66. package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  67. package/lib/components/progress-bar/progress-bar.js +1 -1
  68. package/lib/components/progress-bar/progress-bar.js.map +1 -1
  69. package/lib/components/time/time-utils.js +1 -1
  70. package/lib/components/time/time-utils.js.map +1 -1
  71. package/lib/heading/heading.js.map +1 -1
  72. package/lib/loading/loading.js +1 -1
  73. package/lib/loading/loading.js.map +1 -1
  74. package/lib/menu/menu.js +1 -1
  75. package/lib/menu/menu.js.map +1 -1
  76. package/lib/switch-field/switch-field.js +1 -1
  77. package/lib/switch-field/switch-field.js.map +1 -1
  78. package/lib/tabs/tabs.js +1 -1
  79. package/lib/tabs/tabs.js.map +1 -1
  80. package/lib/text/text.js +1 -1
  81. package/lib/text/text.js.map +1 -1
  82. package/lib/toast/toast-animation.js +1 -1
  83. package/lib/toast/toast-animation.js.map +1 -1
  84. package/lib/toast/use-toasts.js +1 -1
  85. package/lib/toast/use-toasts.js.map +1 -1
  86. package/lib/tooltip/tooltip.js +1 -1
  87. package/lib/tooltip/tooltip.js.map +1 -1
  88. package/lib/utils/common-helpers.js +1 -1
  89. package/lib/utils/common-helpers.js.map +1 -1
  90. package/lib/utils/responsive-props.js +1 -1
  91. package/lib/utils/responsive-props.js.map +1 -1
  92. package/package.json +3 -6
  93. package/styles/avatar.css +2 -2
  94. package/styles/badge.css +2 -2
  95. package/styles/banner.css +4 -4
  96. package/styles/banner.module.css.css +1 -1
  97. package/styles/base-field.css +3 -3
  98. package/styles/box.css +2 -2
  99. package/styles/box.module.css.css +1 -1
  100. package/styles/button.css +3 -3
  101. package/styles/checkbox-field.css +2 -2
  102. package/styles/columns.css +2 -2
  103. package/styles/divider.css +2 -2
  104. package/styles/heading.css +2 -2
  105. package/styles/hidden-visually.css +2 -2
  106. package/styles/hidden.css +2 -2
  107. package/styles/index.css +4 -3
  108. package/styles/loading.css +3 -3
  109. package/styles/modal.css +4 -4
  110. package/styles/modal.module.css.css +1 -1
  111. package/styles/notice.css +2 -2
  112. package/styles/password-field.css +3 -3
  113. package/styles/prose.css +2 -2
  114. package/styles/reactist.css +6 -6
  115. package/styles/select-field.css +3 -3
  116. package/styles/spinner.css +1 -1
  117. package/styles/static-toast.css +3 -3
  118. package/styles/switch-field.css +3 -3
  119. package/styles/tabs.css +2 -2
  120. package/styles/text-area.css +3 -3
  121. package/styles/text-field.css +3 -3
  122. package/styles/text-link.css +2 -2
  123. package/styles/text.css +2 -2
  124. package/styles/tooltip.css +2 -2
  125. package/styles/use-toasts.css +3 -3
  126. 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;
@@ -928,6 +926,14 @@ const _excluded$n = ["id", "type", "title", "description", "action", "icon", "im
928
926
  _excluded2$5 = ["label"],
929
927
  _excluded3$2 = ["type", "label"],
930
928
  _excluded4$2 = ["type", "label", "variant"];
929
+ /**
930
+ * Type guard to check if the action is an Action object (button or link)
931
+ */
932
+
933
+ function isActionObject$1(action) {
934
+ return typeof action === 'object' && action !== null && 'type' in action && (action.type === 'button' || action.type === 'link');
935
+ }
936
+
931
937
  const Banner = /*#__PURE__*/React__namespace.forwardRef(function Banner(_ref, ref) {
932
938
  let {
933
939
  id,
@@ -950,7 +956,7 @@ const Banner = /*#__PURE__*/React__namespace.forwardRef(function Banner(_ref, re
950
956
  variant: "quaternary",
951
957
  onClick: onClose,
952
958
  icon: /*#__PURE__*/React__namespace.createElement(CloseIcon, null),
953
- "aria-label": closeLabel != null ? closeLabel : 'Close banner'
959
+ "aria-label": closeLabel ?? 'Close banner'
954
960
  }) : null;
955
961
  return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
956
962
  ref: ref,
@@ -1006,7 +1012,7 @@ const Banner = /*#__PURE__*/React__namespace.forwardRef(function Banner(_ref, re
1006
1012
  className: modules_afa80466.actions,
1007
1013
  display: "flex",
1008
1014
  gap: "small"
1009
- }, (action == null ? void 0 : action.type) === 'button' ? /*#__PURE__*/React__namespace.createElement(ActionButton, _objectSpread2({}, action)) : null, (action == null ? void 0 : action.type) === 'link' ? /*#__PURE__*/React__namespace.createElement(ActionLink, _objectSpread2({}, action)) : null, closeButton) : null));
1015
+ }, action ? isActionObject$1(action) ? action.type === 'button' ? /*#__PURE__*/React__namespace.createElement(ActionButton, _objectSpread2({}, action)) : /*#__PURE__*/React__namespace.createElement(ActionLink, _objectSpread2({}, action)) : action : null, closeButton) : null));
1010
1016
  });
1011
1017
 
1012
1018
  function ActionButton(_ref3) {
@@ -1045,15 +1051,13 @@ const sizeMapping = {
1045
1051
  };
1046
1052
 
1047
1053
  function Loading(_ref) {
1048
- var _sizeMapping$size;
1049
-
1050
1054
  let {
1051
1055
  size = 'small',
1052
1056
  exceptionallySetClassName
1053
1057
  } = _ref,
1054
1058
  props = _objectWithoutProperties(_ref, _excluded$m);
1055
1059
 
1056
- const numericSize = (_sizeMapping$size = sizeMapping[size]) != null ? _sizeMapping$size : sizeMapping.small;
1060
+ const numericSize = sizeMapping[size] ?? sizeMapping.small;
1057
1061
  const ariaLabel = props['aria-label'] ? props['aria-label'] : !props['aria-labelledby'] ? 'Loading…' : undefined;
1058
1062
  return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
1059
1063
  "aria-label": ariaLabel,
@@ -1183,7 +1187,7 @@ const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
1183
1187
  } = _ref,
1184
1188
  props = _objectWithoutProperties(_ref, _excluded$k);
1185
1189
 
1186
- 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;
1187
1191
  return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
1188
1192
  as: as,
1189
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],
@@ -1386,7 +1390,7 @@ function useToastsAnimation() {
1386
1390
  transition: ENTRANCE_TRANSITION,
1387
1391
  transforms: [{
1388
1392
  property: 'transform',
1389
- from: "translateY(" + (prevTop - top) + "px)"
1393
+ from: `translateY(${prevTop - top}px)`
1390
1394
  }]
1391
1395
  });
1392
1396
  } else if (typeof prevTop !== 'number') {
@@ -1396,7 +1400,7 @@ function useToastsAnimation() {
1396
1400
  transition: ENTRANCE_TRANSITION,
1397
1401
  transforms: [{
1398
1402
  property: 'transform',
1399
- from: "translateY(" + height + "px)"
1403
+ from: `translateY(${height}px)`
1400
1404
  }, {
1401
1405
  property: 'opacity',
1402
1406
  from: '0'
@@ -1483,24 +1487,20 @@ const InternalToast = /*#__PURE__*/React__default["default"].forwardRef(function
1483
1487
  */
1484
1488
 
1485
1489
  const actionWithCustomActionHandler = React__default["default"].useMemo(() => {
1486
- var _action$closeToast;
1487
-
1488
1490
  if (!isActionObject(action)) {
1489
1491
  return action;
1490
1492
  }
1491
1493
 
1492
1494
  return _objectSpread2(_objectSpread2({}, action), {}, {
1493
- closeToast: (_action$closeToast = action.closeToast) != null ? _action$closeToast : true,
1495
+ closeToast: action.closeToast ?? true,
1494
1496
  onClick: function handleActionClick() {
1495
- var _action$closeToast2;
1496
-
1497
1497
  if (!action) {
1498
1498
  return;
1499
1499
  }
1500
1500
 
1501
1501
  action.onClick();
1502
1502
 
1503
- if ((_action$closeToast2 = action.closeToast) != null ? _action$closeToast2 : true) {
1503
+ if (action.closeToast ?? true) {
1504
1504
  removeToast();
1505
1505
  }
1506
1506
  }
@@ -1673,7 +1673,7 @@ const Heading = /*#__PURE__*/React__namespace.forwardRef(function Heading(_ref,
1673
1673
 
1674
1674
  // In TypeScript v4.1, this would be properly recognized without needing the type assertion
1675
1675
  // https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types
1676
- const headingElementName = "h" + level;
1676
+ const headingElementName = `h${level}`;
1677
1677
  const lineClampMultipleLines = typeof lineClamp === 'string' ? parseInt(lineClamp, 10) > 1 : (lineClamp || 0) > 1;
1678
1678
  return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
1679
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],
@@ -1798,8 +1798,6 @@ function useForkRef(...refs) {
1798
1798
 
1799
1799
  const _excluded$e = ["label", "icon", "disabled", "indeterminate", "defaultChecked", "onChange"];
1800
1800
  const CheckboxField = /*#__PURE__*/React__namespace.forwardRef(function CheckboxField(_ref, ref) {
1801
- var _ref2, _props$checked, _props$checked2;
1802
-
1803
1801
  let {
1804
1802
  label,
1805
1803
  icon,
@@ -1824,8 +1822,8 @@ const CheckboxField = /*#__PURE__*/React__namespace.forwardRef(function Checkbox
1824
1822
  }
1825
1823
 
1826
1824
  const [keyFocused, setKeyFocused] = React__namespace.useState(false);
1827
- const [checkedState, setChecked] = React__namespace.useState((_ref2 = (_props$checked = props.checked) != null ? _props$checked : defaultChecked) != null ? _ref2 : false);
1828
- 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;
1829
1827
  const internalRef = React__namespace.useRef(null);
1830
1828
  const combinedRef = useForkRef(internalRef, ref);
1831
1829
  React__namespace.useEffect(function setIndeterminate() {
@@ -1971,7 +1969,7 @@ function validateInputLength({
1971
1969
  const currentLength = String(value || '').length;
1972
1970
  const isNearMaxLength = maxLength - currentLength <= MAX_LENGTH_THRESHOLD;
1973
1971
  return {
1974
- count: currentLength + "/" + maxLength,
1972
+ count: `${currentLength}/${maxLength}`,
1975
1973
  tone: isNearMaxLength ? 'error' : 'neutral'
1976
1974
  };
1977
1975
  }
@@ -2006,7 +2004,7 @@ function BaseField({
2006
2004
  });
2007
2005
  const [characterCount, setCharacterCount] = React__namespace.useState(inputLength.count);
2008
2006
  const [characterCountTone, setCharacterCountTone] = React__namespace.useState(inputLength.tone);
2009
- const ariaDescribedBy = originalAriaDescribedBy != null ? originalAriaDescribedBy : message ? messageId : null;
2007
+ const ariaDescribedBy = originalAriaDescribedBy ?? (message ? messageId : null);
2010
2008
  const renderCharacterCountBelow = characterCountPosition === 'below' && characterCount !== null;
2011
2009
  const renderCharacterCountInline = characterCountPosition === 'inline' && characterCount !== null;
2012
2010
 
@@ -2264,8 +2262,6 @@ var modules_8e05f7c9 = {"container":"bae487be","disabled":"_408d32a0","checked":
2264
2262
 
2265
2263
  const _excluded$a = ["label", "message", "tone", "disabled", "hidden", "defaultChecked", "id", "aria-describedby", "aria-label", "aria-labelledby", "onChange"];
2266
2264
  const SwitchField = /*#__PURE__*/React__namespace.forwardRef(function SwitchField(_ref, ref) {
2267
- var _ref2, _props$checked, _props$checked2;
2268
-
2269
2265
  let {
2270
2266
  label,
2271
2267
  message,
@@ -2283,12 +2279,12 @@ const SwitchField = /*#__PURE__*/React__namespace.forwardRef(function SwitchFiel
2283
2279
 
2284
2280
  const id = useId(originalId);
2285
2281
  const messageId = useId();
2286
- const ariaDescribedBy = originalAriaDescribedBy != null ? originalAriaDescribedBy : message ? messageId : undefined;
2287
- const ariaLabel = originalAriaLabel != null ? originalAriaLabel : undefined;
2288
- const ariaLabelledBy = originalAriaLabelledby != null ? originalAriaLabelledby : undefined;
2282
+ const ariaDescribedBy = originalAriaDescribedBy ?? (message ? messageId : undefined);
2283
+ const ariaLabel = originalAriaLabel ?? undefined;
2284
+ const ariaLabelledBy = originalAriaLabelledby ?? undefined;
2289
2285
  const [keyFocused, setKeyFocused] = React__namespace.useState(false);
2290
- const [checkedState, setChecked] = React__namespace.useState((_ref2 = (_props$checked = props.checked) != null ? _props$checked : defaultChecked) != null ? _ref2 : false);
2291
- 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;
2292
2288
  return /*#__PURE__*/React__namespace.createElement(Stack, {
2293
2289
  space: "small",
2294
2290
  hidden: hidden
@@ -2499,7 +2495,7 @@ function Avatar(_ref) {
2499
2495
  const userInitials = getInitials(user.name) || getInitials(user.email);
2500
2496
  const avatarSize = size ? size : 'l';
2501
2497
  const style = avatarUrl ? {
2502
- backgroundImage: "url(" + avatarUrl + ")",
2498
+ backgroundImage: `url(${avatarUrl})`,
2503
2499
  textIndent: '-9999px' // hide the initials
2504
2500
 
2505
2501
  } : {
@@ -2529,7 +2525,7 @@ function Badge(_ref) {
2529
2525
  as: "span" // It enables putting the badge inside a button (https://stackoverflow.com/a/12982334)
2530
2526
  ,
2531
2527
  display: "inline",
2532
- className: [modules_33c7c985.badge, modules_33c7c985["badge-" + tone]]
2528
+ className: [modules_33c7c985.badge, modules_33c7c985[`badge-${tone}`]]
2533
2529
  }), label);
2534
2530
  }
2535
2531
 
@@ -2847,15 +2843,11 @@ function Tabs({
2847
2843
  setSelectedId: onSelectedIdChange
2848
2844
  });
2849
2845
  const actualSelectedId = tabStore.useState('selectedId');
2850
- const memoizedTabState = React__namespace.useMemo(() => {
2851
- var _ref;
2852
-
2853
- return {
2854
- tabStore,
2855
- variant,
2856
- selectedId: (_ref = selectedId != null ? selectedId : actualSelectedId) != null ? _ref : null
2857
- };
2858
- }, [variant, tabStore, selectedId, actualSelectedId]);
2846
+ const memoizedTabState = React__namespace.useMemo(() => ({
2847
+ tabStore,
2848
+ variant,
2849
+ selectedId: selectedId ?? actualSelectedId ?? null
2850
+ }), [variant, tabStore, selectedId, actualSelectedId]);
2859
2851
  return /*#__PURE__*/React__namespace.createElement(TabsContext.Provider, {
2860
2852
  value: memoizedTabState
2861
2853
  }, children);
@@ -2879,7 +2871,7 @@ const Tab = /*#__PURE__*/React__namespace.forwardRef(function Tab({
2879
2871
  variant,
2880
2872
  tabStore
2881
2873
  } = tabContextValue;
2882
- 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}`]);
2883
2875
  return /*#__PURE__*/React__namespace.createElement(react.Tab, {
2884
2876
  id: id,
2885
2877
  ref: ref,
@@ -2894,15 +2886,15 @@ const Tab = /*#__PURE__*/React__namespace.forwardRef(function Tab({
2894
2886
  * A component used to group `<Tab>` elements together.
2895
2887
  */
2896
2888
 
2897
- function TabList(_ref2) {
2889
+ function TabList(_ref) {
2898
2890
  let {
2899
2891
  children,
2900
2892
  space,
2901
2893
  width = 'maxContent',
2902
2894
  align = 'start',
2903
2895
  exceptionallySetClassName
2904
- } = _ref2,
2905
- props = _objectWithoutProperties(_ref2, _excluded$5);
2896
+ } = _ref,
2897
+ props = _objectWithoutProperties(_ref, _excluded$5);
2906
2898
 
2907
2899
  const tabListRef = React__namespace.useRef(null);
2908
2900
  const tabListPrevWidthRef = React__namespace.useRef(0);
@@ -2921,8 +2913,8 @@ function TabList(_ref2) {
2921
2913
  if (selectedTab) {
2922
2914
  setSelectedTabElement(selectedTab);
2923
2915
  setSelectedTabStyle({
2924
- left: selectedTab.offsetLeft + "px",
2925
- width: selectedTab.offsetWidth + "px"
2916
+ left: `${selectedTab.offsetLeft}px`,
2917
+ width: `${selectedTab.offsetWidth}px`
2926
2918
  });
2927
2919
  }
2928
2920
  }, [selectedId]);
@@ -2992,9 +2984,9 @@ function TabList(_ref2) {
2992
2984
  }),
2993
2985
  ref: tabListRef
2994
2986
  }, props), /*#__PURE__*/React__namespace.createElement(Box$1, {
2995
- className: [modules_40c67f5b.track, modules_40c67f5b["track-" + variant]]
2987
+ className: [modules_40c67f5b.track, modules_40c67f5b[`track-${variant}`]]
2996
2988
  }), selectedTabElement ? /*#__PURE__*/React__namespace.createElement(Box$1, {
2997
- className: [modules_40c67f5b.selected, modules_40c67f5b["selected-" + variant]],
2989
+ className: [modules_40c67f5b.selected, modules_40c67f5b[`selected-${variant}`]],
2998
2990
  style: selectedTabStyle
2999
2991
  }) : null, /*#__PURE__*/React__namespace.createElement(Inline, {
3000
2992
  space: space,
@@ -3008,13 +3000,13 @@ function TabList(_ref2) {
3008
3000
  */
3009
3001
 
3010
3002
 
3011
- const TabPanel = /*#__PURE__*/React__namespace.forwardRef(function TabPanel(_ref3, ref) {
3003
+ const TabPanel = /*#__PURE__*/React__namespace.forwardRef(function TabPanel(_ref2, ref) {
3012
3004
  let {
3013
3005
  children,
3014
3006
  id,
3015
3007
  renderMode = 'always'
3016
- } = _ref3,
3017
- props = _objectWithoutProperties(_ref3, _excluded2$1);
3008
+ } = _ref2,
3009
+ props = _objectWithoutProperties(_ref2, _excluded2$1);
3018
3010
 
3019
3011
  const tabContextValue = React__namespace.useContext(TabsContext);
3020
3012
  const [tabRendered, setTabRendered] = React__namespace.useState(false);
@@ -3188,9 +3180,9 @@ const MenuList = /*#__PURE__*/React__namespace.forwardRef(function MenuList(_ref
3188
3180
  shift: 4,
3189
3181
  ref: ref,
3190
3182
  className: classNames__default["default"]('reactist_menulist', exceptionallySetClassName),
3191
- getAnchorRect: getAnchorRect != null ? getAnchorRect : undefined,
3183
+ getAnchorRect: getAnchorRect ?? undefined,
3192
3184
  modal: modal,
3193
- flip: flip != null ? flip : isSubMenu ? 'left bottom' : undefined
3185
+ flip: flip ?? (isSubMenu ? 'left bottom' : undefined)
3194
3186
  }))) : null;
3195
3187
  });
3196
3188
  /**
@@ -3346,7 +3338,7 @@ const Button = /*#__PURE__*/React__namespace.forwardRef(function Button(_ref, re
3346
3338
  } = _ref,
3347
3339
  props = _objectWithoutProperties(_ref, _excluded$3);
3348
3340
 
3349
- 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, {
3350
3342
  'reactist_button--loading': loading
3351
3343
  }, props.className);
3352
3344
  const button = /*#__PURE__*/React__namespace.createElement("button", _objectSpread2(_objectSpread2({}, props), {}, {
@@ -3721,13 +3713,13 @@ function parseKeys(shortcut, isMac, translateKey) {
3721
3713
  }
3722
3714
 
3723
3715
  function KeyboardShortcut(_ref) {
3724
- var _navigator$platform$t, _navigator$platform;
3716
+ var _navigator$platform;
3725
3717
 
3726
3718
  let {
3727
3719
  children,
3728
3720
  className,
3729
3721
  translateKey = globalTranslateKey,
3730
- 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
3731
3723
  } = _ref,
3732
3724
  props = _objectWithoutProperties(_ref, _excluded$1);
3733
3725
 
@@ -3939,12 +3931,12 @@ function ProgressBar({
3939
3931
  }, /*#__PURE__*/React__namespace.createElement("div", {
3940
3932
  className: modules_a0e70af1.inner,
3941
3933
  style: {
3942
- width: width + "%"
3934
+ width: `${width}%`
3943
3935
  }
3944
3936
  }), /*#__PURE__*/React__namespace.createElement(HiddenVisually, null, /*#__PURE__*/React__namespace.createElement("progress", {
3945
3937
  value: width,
3946
3938
  max: 100,
3947
- "aria-valuetext": ariaValuetext != null ? ariaValuetext : undefined
3939
+ "aria-valuetext": ariaValuetext ?? undefined
3948
3940
  })));
3949
3941
  }
3950
3942
 
@@ -3980,11 +3972,11 @@ const TimeUtils = {
3980
3972
  return date.format(shortFormatPastYear);
3981
3973
  }
3982
3974
  } else if (diffDays === 1) {
3983
- return "" + diffDays + daysSuffix;
3975
+ return `${diffDays}${daysSuffix}`;
3984
3976
  } else if (diffHours > 0 && diffHours <= 23) {
3985
- return "" + diffHours + hoursSuffix;
3977
+ return `${diffHours}${hoursSuffix}`;
3986
3978
  } else if (diffMinutes > 0 && diffMinutes <= 59) {
3987
- return "" + diffMinutes + minutesSuffix;
3979
+ return `${diffMinutes}${minutesSuffix}`;
3988
3980
  } else {
3989
3981
  return momentsAgo;
3990
3982
  }