@eightshift/ui-components 8.1.0 → 8.3.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 (170) hide show
  1. package/dist/{Autocomplete-BUU44AuW.js → Autocomplete-Dqkum3dO.js} +29 -25
  2. package/dist/{Button-_E2Z5G2l.js → Button-DHgs_rCq.js} +15 -9
  3. package/dist/{Dialog-3XLIaepk.js → Dialog-CldDJ_4u.js} +390 -189
  4. package/dist/{Disclosure-Dh0z_DEQ.js → Disclosure-BHNgL5Is.js} +33 -29
  5. package/dist/{FocusScope-BKGWN6UK.js → FocusScope-CUuL5wjz.js} +13 -8
  6. package/dist/{Heading-BWTs9ckA.js → Heading-BQje2nS2.js} +1 -1
  7. package/dist/{I18nProvider-BskRMK8G.js → I18nProvider-R_4IDnf9.js} +1 -1
  8. package/dist/{Label-UpU4cKPh.js → Label-C4bJkVti.js} +1 -1
  9. package/dist/{ListBox-DepY-52g.js → ListBox-CZXso3mJ.js} +14 -38
  10. package/dist/{NumberFormatter-WKBRKiEA.js → NumberFormatter-Bwdv413k.js} +4 -2
  11. package/dist/{RadioGroup-Br9Mn9QJ.js → RadioGroup-BTByPMrl.js} +35 -35
  12. package/dist/{SearchField-q2Fj0L9K.js → SearchField-DkX1vqMN.js} +29 -26
  13. package/dist/{Slider-B8icnyOo.js → Slider-Dw-JjfLx.js} +55 -44
  14. package/dist/{Text-D4y19vs8.js → Text-CA2_mHEB.js} +4 -3
  15. package/dist/{VisuallyHidden-B_LZ_kn7.js → VisuallyHidden-ZZwHZDro.js} +2 -2
  16. package/dist/{animation-DpSgtWyu.js → animation-COc9P6ap.js} +2 -4
  17. package/dist/assets/{image-analysis-worker-BuHru-CI.js → image-analysis-worker-CBOB71mx.js} +1 -1
  18. package/dist/assets/style-admin.css +1 -1
  19. package/dist/assets/style-editor.css +1 -1
  20. package/dist/assets/style.css +1 -1
  21. package/dist/assets/wp-overrides/make-block-messages-nicer.css +1 -1
  22. package/dist/{build-module-DG6ZK7Ty.js → build-module-BISCoQjQ.js} +4 -4
  23. package/dist/{button-XSk_8UW7.js → button-ldR_tlvk.js} +64 -13
  24. package/dist/{checkbox-BYaS9tQ5.js → checkbox-DDyLJRY8.js} +8 -8
  25. package/dist/{color-swatch-6ZEIXej3.js → color-swatch-DmhdOhe4.js} +15 -16
  26. package/dist/components/animated-visibility/animated-visibility.js +5 -3
  27. package/dist/components/base-control/base-control.d.ts +1 -1
  28. package/dist/components/base-control/base-control.js +1 -1
  29. package/dist/components/base-control/container.d.ts +4 -30
  30. package/dist/components/base-control/container.js +5 -32
  31. package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
  32. package/dist/components/button/button.d.ts +1 -1
  33. package/dist/components/button/button.js +1 -1
  34. package/dist/components/checkbox/checkbox.js +1 -1
  35. package/dist/components/color-pickers/color-picker.js +8 -8
  36. package/dist/components/color-pickers/color-swatch.js +1 -1
  37. package/dist/components/color-pickers/gradient-editor.js +1 -1
  38. package/dist/components/color-pickers/solid-color-picker.js +1 -1
  39. package/dist/components/component-toggle/component-toggle.d.ts +1 -1
  40. package/dist/components/component-toggle/component-toggle.js +4 -4
  41. package/dist/components/container-panel/container-panel.js +11 -11
  42. package/dist/components/contextual-help/contextual-help.js +3 -3
  43. package/dist/components/draggable/draggable.d.ts +3 -3
  44. package/dist/components/draggable/draggable.js +1 -1
  45. package/dist/components/draggable-list/draggable-list.d.ts +3 -3
  46. package/dist/components/draggable-list/draggable-list.js +9 -9
  47. package/dist/components/expandable/expandable.js +4 -4
  48. package/dist/components/index.d.ts +1 -0
  49. package/dist/components/index.js +18 -17
  50. package/dist/components/input-field/input-field.d.ts +1 -1
  51. package/dist/components/input-field/input-field.js +1 -1
  52. package/dist/components/item-collection/item-collection.d.ts +3 -28
  53. package/dist/components/item-collection/item-collection.js +7 -7
  54. package/dist/components/link-input/link-input.d.ts +0 -2
  55. package/dist/components/link-input/link-input.js +1 -1
  56. package/dist/components/matrix-align/matrix-align.js +5 -4
  57. package/dist/components/menu/menu.d.ts +8 -29
  58. package/dist/components/menu/menu.js +11 -8
  59. package/dist/components/modal/modal.js +1 -1
  60. package/dist/components/notice/notice.js +8 -8
  61. package/dist/components/number-picker/number-picker.d.ts +1 -1
  62. package/dist/components/number-picker/number-picker.js +1 -1
  63. package/dist/components/option-select/option-select.d.ts +1 -1
  64. package/dist/components/option-select/option-select.js +22 -16
  65. package/dist/components/options-panel/options-panel.js +4 -4
  66. package/dist/components/placeholders/file-picker-shell.js +4 -3
  67. package/dist/components/placeholders/file-placeholder.js +3 -2
  68. package/dist/components/popover/popover.js +5 -5
  69. package/dist/components/portal-provider/portal-provider.js +2 -1
  70. package/dist/components/prompt-popover/prompt-popover.d.ts +56 -0
  71. package/dist/components/prompt-popover/prompt-popover.js +81 -0
  72. package/dist/components/radio/radio.d.ts +2 -1
  73. package/dist/components/radio/radio.js +2 -2
  74. package/dist/components/repeater/repeater-context.d.ts +0 -1
  75. package/dist/components/repeater/repeater-item.js +2 -2
  76. package/dist/components/repeater/repeater.d.ts +5 -38
  77. package/dist/components/repeater/repeater.js +8 -11
  78. package/dist/components/responsive/mini-responsive.d.ts +0 -1
  79. package/dist/components/responsive/mini-responsive.js +31 -31
  80. package/dist/components/responsive/responsive-legacy.d.ts +0 -1
  81. package/dist/components/responsive/responsive-legacy.js +13 -11
  82. package/dist/components/responsive/responsive.d.ts +0 -1
  83. package/dist/components/responsive/responsive.js +29 -29
  84. package/dist/components/responsive-preview/responsive-preview.js +4 -4
  85. package/dist/components/rich-label/rich-label.d.ts +1 -1
  86. package/dist/components/rich-label/rich-label.js +2 -2
  87. package/dist/components/select/async-multi-select.d.ts +12 -13
  88. package/dist/components/select/async-multi-select.js +40 -21
  89. package/dist/components/select/async-select.d.ts +12 -13
  90. package/dist/components/select/async-select.js +39 -21
  91. package/dist/components/select/multi-select.d.ts +2 -8
  92. package/dist/components/select/multi-select.js +20 -20
  93. package/dist/components/select/shared.d.ts +7 -11
  94. package/dist/components/select/shared.js +2 -2
  95. package/dist/components/select/single-select.d.ts +2 -8
  96. package/dist/components/select/single-select.js +17 -17
  97. package/dist/components/select/styles.d.ts +2 -2
  98. package/dist/components/slider/column-config-slider.js +8 -6
  99. package/dist/components/slider/slider.js +16 -12
  100. package/dist/components/slider/utils.js +1 -1
  101. package/dist/components/smart-image/smart-image.d.ts +1 -2
  102. package/dist/components/smart-image/smart-image.js +53 -51
  103. package/dist/components/tabs/tabs.d.ts +16 -64
  104. package/dist/components/tabs/tabs.js +1 -1
  105. package/dist/components/toggle/switch.d.ts +1 -1
  106. package/dist/components/toggle/switch.js +1 -1
  107. package/dist/components/toggle/toggle.js +2 -2
  108. package/dist/components/toggle-button/toggle-button.d.ts +2 -2
  109. package/dist/components/toggle-button/toggle-button.js +1 -1
  110. package/dist/components/tooltip/tooltip.js +1 -1
  111. package/dist/{draggable-9MfdTVWP.js → draggable-oS68xcYX.js} +130 -125
  112. package/dist/{es-dash-DunirOmV.js → es-dash-DPtJSRjw.js} +23 -52
  113. package/dist/{gradient-editor-yqSw0uPA.js → gradient-editor-DP8ioFX1.js} +39 -30
  114. package/dist/icons/block-icon.js +1 -1
  115. package/dist/icons/icon.d.ts +3 -3
  116. package/dist/icons/icon.js +21 -9
  117. package/dist/icons/icons.d.ts +210 -1
  118. package/dist/icons/index.js +1 -1
  119. package/dist/icons/jsx-svg.d.ts +5 -4
  120. package/dist/icons/jsx-svg.js +1 -1
  121. package/dist/index.js +18 -17
  122. package/dist/{input-field-nN6BO0oz.js → input-field-C-XvZeCZ.js} +8 -8
  123. package/dist/{jsx-svg-BjGQUBLh.js → jsx-svg-DRwJdRpA.js} +171 -129
  124. package/dist/{keyboard-g5Amam-c.js → keyboard-Cdqi5ZQQ.js} +1 -1
  125. package/dist/{link-input-BhlPElU8.js → link-input-DdwuqoMg.js} +147 -89
  126. package/dist/{modal-B5axB0Fc.js → modal-DZco5MDu.js} +15 -14
  127. package/dist/{number-picker-nnOf0XnN.js → number-picker-XqKW0BNi.js} +9 -9
  128. package/dist/{react-y40Dt3ab.js → react-O71mlJXS.js} +250 -266
  129. package/dist/{shared-Ba_bt4s9.js → shared-YXMIX2ka.js} +60 -44
  130. package/dist/{solid-color-picker-CsosgTVa.js → solid-color-picker-D5LEdmDM.js} +78 -58
  131. package/dist/{switch-BJ4_OyUm.js → switch-Bo6nmed_.js} +8 -8
  132. package/dist/{tabs-wAe0AAyu.js → tabs-DE-qb7Kt.js} +35 -30
  133. package/dist/{text-helpers-2j9DuxP1.js → text-helpers-QrwKKaOh.js} +3 -2
  134. package/dist/{textSelection-B_Nv6Jz3.js → textSelection-C17LWYmO.js} +3 -3
  135. package/dist/{toggle-button-BLJdEp8V.js → toggle-button-Cb4yCEua.js} +39 -8
  136. package/dist/{tooltip-BW9nj5-V.js → tooltip-CT-vzIdz.js} +68 -62
  137. package/dist/{useAsyncList-B3-uyJgA.js → useAsyncList-CjKVLGN0.js} +8 -4
  138. package/dist/{useButton-CPMVLXoX.js → useButton-V65TBDGM.js} +3 -3
  139. package/dist/{useCollection-PzY6FI39.js → useCollection-DqUS7tjk.js} +281 -184
  140. package/dist/useEvent-C9zwSNzZ.js +18 -0
  141. package/dist/{useField-DrfR8j9h.js → useField-B_ibsWst.js} +2 -2
  142. package/dist/{useFilter-CiCjo6Na.js → useFilter-C75IzdIZ.js} +1 -1
  143. package/dist/{useFocusRing-CrYHpV7C.js → useFocusRing-JidySWlU.js} +1 -1
  144. package/dist/{useFormReset-U6c35PHq.js → useFormReset-Sp8-miDa.js} +1 -1
  145. package/dist/{useFormValidation-B2q2MGWN.js → useFormValidation-CpmQEh8J.js} +2 -2
  146. package/dist/{useHover-CNsbAR0V.js → useHover-CaY3sRjL.js} +250 -46
  147. package/dist/{useLabel-DuxAjaic.js → useLabel-gfFDE4bn.js} +2 -2
  148. package/dist/{useLabels-NUsp5IW3.js → useLabels-Dcg-cEyM.js} +1 -1
  149. package/dist/{useListState-FLxa7R_U.js → useListState-CzB3v6M9.js} +6 -11
  150. package/dist/{useLocalizedStringFormatter-Ccm8EL_u.js → useLocalizedStringFormatter-CTCqjYu4.js} +6 -1
  151. package/dist/{useNumberFieldState-DWvm7CXu.js → useNumberFieldState-DC3XY3DQ.js} +79 -62
  152. package/dist/{useNumberFormatter-B0_D7a_o.js → useNumberFormatter-DbAt_fC_.js} +2 -2
  153. package/dist/{useOverlayTriggerState-zZ7homyI.js → useOverlayTriggerState-BKmSTK_5.js} +16 -11
  154. package/dist/{usePress-DRoujMNm.js → usePress-CUCWcP-m.js} +50 -28
  155. package/dist/{useSlot-pRz-v9kC.js → useSlot-CnQHcvd4.js} +1 -1
  156. package/dist/{useTextField-e8jIFT3s.js → useTextField-C3QIkMON.js} +6 -6
  157. package/dist/{useToggle-CR_ZKvr_.js → useToggle-bbGRUbo4.js} +6 -6
  158. package/dist/{useToggleState-ButQxGrJ.js → useToggleState-D_rLMrVW.js} +1 -1
  159. package/dist/utilities/array-helpers.d.ts +2 -2
  160. package/dist/utilities/array-helpers.js +4 -3
  161. package/dist/utilities/debounce-throttle.d.ts +9 -2
  162. package/dist/utilities/es-dash.d.ts +11 -8
  163. package/dist/utilities/es-dash.js +1 -1
  164. package/dist/utilities/index.js +2 -2
  165. package/dist/utilities/text-helpers.js +1 -1
  166. package/dist/utilities/web-workers.d.ts +7 -7
  167. package/dist/utilities/web-workers.js +5 -5
  168. package/dist/{utils-Czi6q2Ub.js → utils-ClM91CuL.js} +30 -19
  169. package/package.json +23 -27
  170. package/dist/useEvent-CzuFZ2HT.js +0 -22
@@ -1,10 +1,11 @@
1
1
  import { t as clsx } from "../../clsx-DQoRUQAf.js";
2
- import { r as truncateMiddle } from "../../text-helpers-2j9DuxP1.js";
2
+ import { r as truncateMiddle } from "../../text-helpers-QrwKKaOh.js";
3
3
  import { file } from "../../icons/ui-icons/file.js";
4
4
  import { SmartImage } from "../smart-image/smart-image.js";
5
5
  import "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region lib/components/placeholders/file-picker-shell.tsx
8
+ var isRenderFunction = (value) => Object.prototype.toString.call(value) === "[object Function]";
8
9
  var TypedSmartImage = SmartImage;
9
10
  /**
10
11
  * A shell for a file picker UI, handling both rich visual presentation and simple file placeholders.
@@ -51,7 +52,7 @@ var FilePickerShell = (props) => {
51
52
  className: "es:line-clamp-1",
52
53
  children: truncateMiddle(url, 34)
53
54
  })]
54
- }) : null, children && typeof children !== "function" ? jsx("div", {
55
+ }) : null, children && !isRenderFunction(children) ? jsx("div", {
55
56
  className: "es:flex es:items-center-safe es:gap-0.75 es-button-group-h",
56
57
  children
57
58
  }) : null]
@@ -70,7 +71,7 @@ var FilePickerShell = (props) => {
70
71
  hasError ? errorBadge : null,
71
72
  children ? jsx("div", {
72
73
  className: clsx("es:flex es:items-center-safe es:gap-0.75", "es-button-group-h", !hasError && !isTransparent && "es:absolute es:bottom-2 es:left-2 es:right-2 es:translate-y-[125%] es:group-hover:translate-y-0 es:has-aria-expanded:translate-y-0 es:has-focus-visible:translate-y-0 es:transition-transform es:ease-spring-smooth"),
73
- children: typeof children === "function" ? children({
74
+ children: isRenderFunction(children) ? children({
74
75
  dominantColors,
75
76
  isDark,
76
77
  isTransparent,
@@ -1,10 +1,11 @@
1
1
  import { t as clsx } from "../../clsx-DQoRUQAf.js";
2
2
  import { RichLabel } from "../rich-label/rich-label.js";
3
- import { t as __ } from "../../build-module-DG6ZK7Ty.js";
3
+ import { t as __ } from "../../build-module-BISCoQjQ.js";
4
4
  import { file } from "../../icons/ui-icons/file.js";
5
5
  import "react";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  //#region lib/components/placeholders/file-placeholder.tsx
8
+ var isStringValue = (value) => Object.prototype.toString.call(value) === "[object String]";
8
9
  /**
9
10
  * A simple file placeholder.
10
11
  *
@@ -21,7 +22,7 @@ import { jsx } from "react/jsx-runtime";
21
22
  */
22
23
  var FilePlaceholder = (props) => {
23
24
  const { icon, fileName, className, flat, children } = props;
24
- const label = fileName ?? (typeof children === "string" ? children : void 0) ?? __("No file selected", "eightshift-ui-components");
25
+ const label = fileName ?? (isStringValue(children) ? children : void 0) ?? __("No file selected", "eightshift-ui-components");
25
26
  return jsx(RichLabel, {
26
27
  icon: jsx("div", {
27
28
  className: clsx("es:w-fit es:rounded-xl es:p-2", fileName && [
@@ -1,8 +1,8 @@
1
1
  import { t as clsx } from "../../clsx-DQoRUQAf.js";
2
- import { n as $f2ff30fde7b014be$export$3ddf2d174ce01153, t as $f2ff30fde7b014be$export$2e1e1122cf0cba88, u as $542a13ca2fa5b484$export$5b6b19405a83ff9d } from "../../Dialog-3XLIaepk.js";
3
- import { o as $4fcfe18fac72dabd$export$746d02f47f4d381 } from "../../useOverlayTriggerState-zZ7homyI.js";
4
- import { t as Button } from "../../button-XSk_8UW7.js";
5
- import { t as __ } from "../../build-module-DG6ZK7Ty.js";
2
+ import { n as $f2ff30fde7b014be$export$3ddf2d174ce01153, t as $f2ff30fde7b014be$export$2e1e1122cf0cba88, u as $542a13ca2fa5b484$export$5b6b19405a83ff9d } from "../../Dialog-CldDJ_4u.js";
3
+ import { o as $4fcfe18fac72dabd$export$746d02f47f4d381 } from "../../useOverlayTriggerState-BKmSTK_5.js";
4
+ import { t as Button } from "../../button-ldR_tlvk.js";
5
+ import { t as __ } from "../../build-module-BISCoQjQ.js";
6
6
  import "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region lib/components/popover/popover.tsx
@@ -59,7 +59,7 @@ var Popover = (props) => {
59
59
  offset,
60
60
  crossOffset,
61
61
  containerPadding,
62
- className: ({ isEntering, isExiting }) => clsx("es:font-sans", "es:rounded-2xl es:bg-linear-to-br es:from-surface-50/85 es:to-surface-50/85 es:inset-ring es:inset-ring-surface-500/15 es:shadow-xl es:outline-hidden", "es:backdrop-blur-xl es:backdrop-brightness-110 es:backdrop-saturate-125", "es:inset-shadow-xs es:inset-shadow-white/50", "es:placement-bottom:origin-top-left es:placement-top:origin-bottom-left", "es:placement-left:origin-right es:placement-right:origin-left", "es:motion-ease-spring-bouncy", isEntering && "es:*:pointer-events-none es:motion-duration-300", "es:placement-bottom:origin-top-left es:placement-top:origin-bottom-left", isEntering && "es:motion-scale-x-in-95 es:motion-scale-y-in-90 es:motion-opacity-in-0", isEntering && "es:placement-top:motion-translate-y-in-[0.25rem] es:placement-bottom:motion-translate-y-in-[-0.25rem]", isExiting && "es:motion-scale-x-out-95 es:motion-scale-y-out-90 es:motion-opacity-out-0 es:motion-duration-200", isExiting && "es:placement-top:motion-translate-y-out-[0.25rem] es:placement-bottom:motion-translate-y-out-[-0.25rem]", wrapperClassName),
62
+ className: ({ isEntering, isExiting }) => clsx("es:font-sans", "es:rounded-2xl es:bg-linear-to-br es:from-surface-50/90 es:to-surface-50/90 es:inset-ring es:inset-ring-surface-500/15 es:shadow-xl es:outline-hidden", "es:backdrop-blur-xl es:backdrop-brightness-110 es:backdrop-saturate-115", "es:inset-shadow-sm es:inset-shadow-white/30", "es:placement-bottom:origin-top-left es:placement-top:origin-bottom-left", "es:placement-left:origin-right es:placement-right:origin-left", "es:motion-ease-spring-bouncy", isEntering && "es:*:pointer-events-none es:motion-duration-300", "es:placement-bottom:origin-top-left es:placement-top:origin-bottom-left", isEntering && "es:motion-scale-x-in-95 es:motion-scale-y-in-90 es:motion-opacity-in-0", isEntering && "es:placement-top:motion-translate-y-in-[0.25rem] es:placement-bottom:motion-translate-y-in-[-0.25rem]", isExiting && "es:motion-scale-x-out-95 es:motion-scale-y-out-90 es:motion-opacity-out-0 es:motion-duration-200", isExiting && "es:placement-top:motion-translate-y-out-[0.25rem] es:placement-bottom:motion-translate-y-out-[-0.25rem]", wrapperClassName),
63
63
  style,
64
64
  ...popoverProps,
65
65
  children: [showArrow && jsx($4fcfe18fac72dabd$export$746d02f47f4d381, {
@@ -16,8 +16,9 @@ import { jsx } from "react/jsx-runtime";
16
16
  * </PortalProvider>
17
17
  */
18
18
  var PortalProvider = ({ children, portalElement }) => {
19
+ const getContainer = useCallback(() => portalElement ?? null, [portalElement]);
19
20
  return jsx($72abaeab4d80592f$export$78efe591171d7d45, {
20
- getContainer: useCallback(() => portalElement ?? null, [portalElement]),
21
+ getContainer,
21
22
  children
22
23
  });
23
24
  };
@@ -0,0 +1,56 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import { Button } from '../button/button';
3
+ import { TriggeredPopover } from '../popover/popover';
4
+ import type { Prettify } from '../../utilities/types';
5
+ export type PromptPopoverType = 'default' | 'ai' | 'danger' | 'success';
6
+ type PromptPopoverAction = (close: () => void, event: Parameters<NonNullable<ComponentPropsWithoutRef<typeof Button>['onPress']>>[0]) => void;
7
+ export type PromptPopoverProps = Omit<ComponentPropsWithoutRef<typeof TriggeredPopover>, 'children' | 'triggerButtonIcon' | 'triggerButtonProps'> & {
8
+ /** Content to display between the label and action buttons. */
9
+ children?: ReactNode;
10
+ /** Additional props for the trigger button. */
11
+ triggerButtonProps?: ComponentPropsWithoutRef<typeof Button>;
12
+ /** Additional props for the primary action button. */
13
+ primaryProps?: ComponentPropsWithoutRef<typeof Button>;
14
+ /** Additional props for the secondary action button. */
15
+ secondaryProps?: ComponentPropsWithoutRef<typeof Button>;
16
+ /** Icon for the trigger button. */
17
+ triggerButtonIcon?: ReactNode;
18
+ /** Label for the prompt. */
19
+ label?: ReactNode;
20
+ /** Subtitle for the prompt. */
21
+ subtitle?: ReactNode;
22
+ /** Icon for the prompt label. */
23
+ icon?: ReactNode;
24
+ /** Visual type of the prompt. Defaults to `'default'`. */
25
+ type?: PromptPopoverType;
26
+ /** Function to call when the primary action is pressed. */
27
+ onPrimary?: PromptPopoverAction;
28
+ /** Function to call when the secondary action is pressed. */
29
+ onSecondary?: PromptPopoverAction;
30
+ /** Label for the primary action. */
31
+ primaryLabel?: ReactNode;
32
+ /** Label for the secondary action. */
33
+ secondaryLabel?: ReactNode;
34
+ /** Tooltip and accessible label for the trigger button. */
35
+ tooltip?: ReactNode;
36
+ /** Additional actions to display before the primary and secondary actions. */
37
+ additionalActions?: ReactNode;
38
+ /** If `true`, action buttons are arranged vertically. Defaults to `false`. */
39
+ verticalActions?: boolean;
40
+ /** If `true`, the component is not rendered. */
41
+ hidden?: boolean;
42
+ /** If `true`, the secondary action is not rendered. Defaults to `false`. */
43
+ hideSecondary?: boolean;
44
+ /** Additional props for the underlying triggered popover. */
45
+ popoverProps?: Omit<ComponentPropsWithoutRef<typeof TriggeredPopover>, 'children' | 'triggerButtonIcon' | 'triggerButtonProps'>;
46
+ };
47
+ /**
48
+ * A confirmation prompt displayed in a triggered popover.
49
+ *
50
+ * @component
51
+ * @param {PromptPopoverProps} props - Component props.
52
+ *
53
+ * @returns {JSX.Element} The PromptPopover component.
54
+ */
55
+ export declare const PromptPopover: (props: Prettify<PromptPopoverProps>) => import("react").JSX.Element | null;
56
+ export {};
@@ -0,0 +1,81 @@
1
+ import { t as clsx } from "../../clsx-DQoRUQAf.js";
2
+ import { t as Button } from "../../button-ldR_tlvk.js";
3
+ import { RichLabel } from "../rich-label/rich-label.js";
4
+ import { t as __ } from "../../build-module-BISCoQjQ.js";
5
+ import { TriggeredPopover } from "../popover/popover.js";
6
+ import { HStack } from "../layout/hstack.js";
7
+ import { VStack } from "../layout/vstack.js";
8
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
+ //#region lib/components/prompt-popover/prompt-popover.tsx
10
+ var TypedTriggeredPopover = TriggeredPopover;
11
+ var typeClassNames = {
12
+ default: "",
13
+ ai: "es-uic-theme-purple",
14
+ danger: "es-uic-theme-red",
15
+ success: "es-uic-theme-green"
16
+ };
17
+ /**
18
+ * A confirmation prompt displayed in a triggered popover.
19
+ *
20
+ * @component
21
+ * @param {PromptPopoverProps} props - Component props.
22
+ *
23
+ * @returns {JSX.Element} The PromptPopover component.
24
+ */
25
+ var PromptPopover = (props) => {
26
+ const { children, triggerButtonProps = {}, primaryProps = {}, secondaryProps = {}, triggerButtonIcon, type = "default", onPrimary, onSecondary, primaryLabel, secondaryLabel = __("Cancel", "eightshift-ui-components"), tooltip, label, subtitle, icon, additionalActions, verticalActions = false, hidden, hideSecondary, popoverProps, ...rest } = props;
27
+ if (hidden) return null;
28
+ const typeClassName = typeClassNames[type];
29
+ const StackComponent = verticalActions ? VStack : HStack;
30
+ return jsx(TypedTriggeredPopover, {
31
+ className: "es:w-60! es:p-3!",
32
+ triggerButtonIcon,
33
+ triggerButtonProps: {
34
+ "aria-label": typeof tooltip === "string" ? tooltip : void 0,
35
+ tooltip,
36
+ className: typeClassName,
37
+ ...triggerButtonProps
38
+ },
39
+ wrapperClassName: typeClassName,
40
+ showArrow: true,
41
+ ...rest,
42
+ ...popoverProps,
43
+ children: ({ close }) => jsxs(Fragment, { children: [
44
+ jsx(RichLabel, {
45
+ label,
46
+ subtitle,
47
+ icon,
48
+ labelClassName: children ? "es:text-sm" : void 0,
49
+ noColor: true
50
+ }),
51
+ children && jsx("div", {
52
+ className: "es:mt-3",
53
+ children
54
+ }),
55
+ jsxs(StackComponent, {
56
+ className: "es:mt-3",
57
+ noWrap: true,
58
+ children: [
59
+ additionalActions,
60
+ jsx(Button, {
61
+ type: "outline",
62
+ onPress: onSecondary ? (event) => onSecondary(close, event) : () => close(),
63
+ className: clsx(!verticalActions && "es:flex-1"),
64
+ hidden: hideSecondary,
65
+ ...secondaryProps,
66
+ children: secondaryLabel
67
+ }),
68
+ jsx(Button, {
69
+ type: "selected",
70
+ onPress: onPrimary ? (event) => onPrimary(close, event) : () => close(),
71
+ className: !verticalActions ? "es:flex-1" : void 0,
72
+ ...primaryProps,
73
+ children: primaryLabel
74
+ })
75
+ ]
76
+ })
77
+ ] })
78
+ });
79
+ };
80
+ //#endregion
81
+ export { PromptPopover };
@@ -35,6 +35,7 @@ type RadioButtonProps = Omit<ComponentPropsWithoutRef<typeof Radio>, 'children'
35
35
  design?: InternalRadioButtonDesign;
36
36
  children?: ReactNode;
37
37
  };
38
+ declare const RadioButtonComponent: (props: Prettify<RadioButtonProps>) => import("react").JSX.Element | null;
38
39
  /**
39
40
  * A simple radio button.
40
41
  *
@@ -45,7 +46,7 @@ type RadioButtonProps = Omit<ComponentPropsWithoutRef<typeof Radio>, 'children'
45
46
  *
46
47
  * @see {@link RadioButtonGroup} for usage example.
47
48
  */
48
- export declare const RadioButton: ((props: Prettify<RadioButtonProps>) => import("react").JSX.Element | null) & {
49
+ export declare const RadioButton: typeof RadioButtonComponent & {
49
50
  displayName: string;
50
51
  };
51
52
  type RadioButtonGroupProps = Omit<ComponentPropsWithoutRef<typeof RadioGroup>, 'children' | 'className' | 'isDisabled' | 'isReadOnly' | 'value' | 'onChange' | 'orientation'> & {
@@ -1,7 +1,7 @@
1
1
  import { t as clsx } from "../../clsx-DQoRUQAf.js";
2
2
  import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
3
- import { n as $43a3b93638fe5db9$export$b04be29aa201d4f5 } from "../../Label-UpU4cKPh.js";
4
- import { n as $fe21c36db05242bb$export$d7b12c4107be0d61, t as $fe21c36db05242bb$export$a98f0dcb43a68a25 } from "../../RadioGroup-Br9Mn9QJ.js";
3
+ import { n as $43a3b93638fe5db9$export$b04be29aa201d4f5 } from "../../Label-C4bJkVti.js";
4
+ import { n as $fe21c36db05242bb$export$d7b12c4107be0d61, t as $fe21c36db05242bb$export$a98f0dcb43a68a25 } from "../../RadioGroup-BTByPMrl.js";
5
5
  import { RichLabel } from "../rich-label/rich-label.js";
6
6
  import { BaseControl } from "../base-control/base-control.js";
7
7
  import { t as cva } from "../../dist-DpXluZqJ.js";
@@ -14,6 +14,5 @@ export type RepeaterContextValue = {
14
14
  isItemOpen: boolean;
15
15
  index: number;
16
16
  noDuplicateButton?: boolean;
17
- [key: string]: unknown;
18
17
  };
19
18
  export declare const RepeaterContext: import("react").Context<RepeaterContextValue | null>;
@@ -1,6 +1,6 @@
1
1
  import { t as clsx } from "../../clsx-DQoRUQAf.js";
2
- import { t as Button } from "../../button-XSk_8UW7.js";
3
- import { t as __ } from "../../build-module-DG6ZK7Ty.js";
2
+ import { t as Button } from "../../button-ldR_tlvk.js";
3
+ import { t as __ } from "../../build-module-BISCoQjQ.js";
4
4
  import { copy } from "../../icons/ui-icons/copy.js";
5
5
  import { dropdownCaretAlt } from "../../icons/ui-icons/dropdown-caret-alt.js";
6
6
  import { moreH } from "../../icons/ui-icons/more-h.js";
@@ -1,19 +1,19 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import type { Prettify } from '../../utilities/types';
3
- type RepeaterItemData = Record<string, unknown>;
4
- type RepeaterListItemValue<Item extends RepeaterItemData> = Item & {
3
+ type RepeaterItemData = object;
4
+ type RepeaterListItemValue<Item extends object> = Item & {
5
5
  disabled?: boolean;
6
6
  };
7
- type RepeaterChildValue<Item extends RepeaterItemData> = RepeaterListItemValue<Item> & {
7
+ type RepeaterChildValue<Item extends object> = RepeaterListItemValue<Item> & {
8
8
  updateData: (newValue: Partial<Item>) => void;
9
9
  itemIndex: number;
10
10
  deleteItem: () => void;
11
11
  };
12
- type AddButtonProps<Item extends RepeaterItemData> = {
12
+ type AddButtonProps<Item extends object> = {
13
13
  addItem: (additional?: Partial<RepeaterListItemValue<Item>>) => void;
14
14
  disabled?: boolean;
15
15
  };
16
- type RepeaterProps<Item extends RepeaterItemData = RepeaterItemData> = {
16
+ type RepeaterProps<Item extends object = object> = {
17
17
  children: (item: RepeaterChildValue<Item>) => ReactNode;
18
18
  /** Function to run when the items change. */
19
19
  onChange: (items: Item[]) => void;
@@ -61,38 +61,5 @@ type RepeaterProps<Item extends RepeaterItemData = RepeaterItemData> = {
61
61
  hidden?: boolean;
62
62
  itemLabelProp?: string;
63
63
  };
64
- /**
65
- * A component that allows re-ordering a list of items with additional sub-options.
66
- *
67
- * @component
68
- * @param {RepeaterProps} props - Component props.
69
- *
70
- * @returns {JSX.Element} The Repeater component.
71
- *
72
- * @example
73
- * <Repeater
74
- * label='My repeater'
75
- * items={items}
76
- * onChange={setItems}
77
- * >
78
- * {(item) => {
79
- * const { title, updateData } = item;
80
- *
81
- * return (
82
- * <RepeaterItem
83
- * label={title ?? 'New item'}
84
- * icon={myIcon}
85
- * >
86
- * <InputField
87
- * label='Title'
88
- * type='text'
89
- * value={title}
90
- * onChange={(value) => updateData({ title: value })}
91
- * />
92
- * </RepeaterItem>
93
- * );
94
- * }}
95
- * </Repeater>
96
- */
97
64
  export declare const Repeater: <Item extends RepeaterItemData>(props: Prettify<RepeaterProps<Item>>) => import("react").JSX.Element | null;
98
65
  export {};
@@ -1,8 +1,8 @@
1
1
  import { t as clsx } from "../../clsx-DQoRUQAf.js";
2
2
  import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
3
- import { t as Button } from "../../button-XSk_8UW7.js";
3
+ import { t as Button } from "../../button-ldR_tlvk.js";
4
4
  import { BaseControl } from "../base-control/base-control.js";
5
- import { t as __ } from "../../build-module-DG6ZK7Ty.js";
5
+ import { t as __ } from "../../build-module-BISCoQjQ.js";
6
6
  import { add } from "../../icons/ui-icons/add.js";
7
7
  import { moreH } from "../../icons/ui-icons/more-h.js";
8
8
  import { panelCollapse } from "../../icons/ui-icons/panel-collapse.js";
@@ -46,6 +46,10 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
46
46
  * }}
47
47
  * </Repeater>
48
48
  */
49
+ var mergeItem = (item, newValue) => ({
50
+ ...item,
51
+ ...newValue
52
+ });
49
53
  var Repeater = (props) => {
50
54
  const { children, onChange, items, icon, label, subtitle, help, actions, hideEmptyState, addDefaultItem = {}, addDisabled, onAfterItemAdd, onAfterItemRemove, minItems, maxItems, addButton, className, emptyState, noExpandAllButton, noDuplicateButton, noDragToRemove, moreOptions, hidden } = props;
51
55
  const [allOpen, setAllOpen] = useState(false);
@@ -54,10 +58,7 @@ var Repeater = (props) => {
54
58
  const canDelete = items.length > (minItems ?? 0);
55
59
  const canAdd = items.length < (maxItems ?? Number.MAX_SAFE_INTEGER) && !addDisabled;
56
60
  const addItem = useCallback((additional = {}) => {
57
- const newItem = {
58
- ...addDefaultItem,
59
- ...additional
60
- };
61
+ const newItem = mergeItem(addDefaultItem, additional);
61
62
  onChange([...items, newItem]);
62
63
  onAfterItemAdd?.(newItem);
63
64
  }, [
@@ -105,11 +106,7 @@ var Repeater = (props) => {
105
106
  children: children({
106
107
  ...item,
107
108
  updateData: (newValue) => {
108
- const updatedItems = [...items];
109
- updatedItems[index] = {
110
- ...updatedItems[index],
111
- ...newValue
112
- };
109
+ const updatedItems = items.map((currentItem, itemIndex) => itemIndex === index ? mergeItem(currentItem, newValue) : currentItem);
113
110
  onChange(updatedItems);
114
111
  },
115
112
  itemIndex: index,
@@ -5,7 +5,6 @@ type InnerContentAlign = 'start' | 'center' | 'end' | 'stretch';
5
5
  type ResponsiveOption = {
6
6
  label: string;
7
7
  value: Exclude<ResponsiveValueItem, undefined>;
8
- [key: string]: unknown;
9
8
  };
10
9
  type ResponsiveValue = Record<string, ResponsiveValueItem>;
11
10
  type BreakpointUiOverride = {
@@ -1,12 +1,12 @@
1
1
  import { t as clsx } from "../../clsx-DQoRUQAf.js";
2
- import { t as $efe09c6d1c304b50$export$5f1af8db9871e1d6 } from "../../Text-D4y19vs8.js";
3
- import { n as ButtonGroup, t as Button } from "../../button-XSk_8UW7.js";
4
- import { t as DecorativeTooltip } from "../../tooltip-BW9nj5-V.js";
2
+ import { t as $efe09c6d1c304b50$export$5f1af8db9871e1d6 } from "../../Text-CA2_mHEB.js";
3
+ import { t as DecorativeTooltip } from "../../tooltip-CT-vzIdz.js";
4
+ import { n as ButtonGroup, t as Button } from "../../button-ldR_tlvk.js";
5
5
  import { BaseControl } from "../base-control/base-control.js";
6
- import { f as upperFirst } from "../../es-dash-DunirOmV.js";
6
+ import { f as upperFirst } from "../../es-dash-DPtJSRjw.js";
7
7
  import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
8
8
  import { t as sprintf } from "../../sprintf-xJRAt4p0.js";
9
- import { t as __ } from "../../build-module-DG6ZK7Ty.js";
9
+ import { t as __ } from "../../build-module-BISCoQjQ.js";
10
10
  import { Icon } from "../../icons/icon.js";
11
11
  import { clearAlt } from "../../icons/ui-icons/clear-alt.js";
12
12
  import { dropdownCaretAlt } from "../../icons/ui-icons/dropdown-caret-alt.js";
@@ -14,7 +14,7 @@ import { responsiveOverridesAltFill } from "../../icons/ui-icons/responsive-over
14
14
  import { responsiveOverridesAlt2Fill } from "../../icons/ui-icons/responsive-overrides-alt2-fill.js";
15
15
  import { TriggeredPopover } from "../popover/popover.js";
16
16
  import { HStack } from "../layout/hstack.js";
17
- import { Container, ContainerGroup } from "../base-control/container.js";
17
+ import { Container as TypedContainer, ContainerGroup as TypedContainerGroup } from "../base-control/container.js";
18
18
  import { OptionSelect } from "../option-select/option-select.js";
19
19
  import { ResponsivePreview } from "../responsive-preview/responsive-preview.js";
20
20
  import { cloneElement } from "react";
@@ -30,7 +30,7 @@ var getResponsiveLabel = (value, key, options) => {
30
30
  if (!currentValue) return;
31
31
  return options?.find((option) => option.value === currentValue)?.label ?? upperFirst(currentValue);
32
32
  };
33
- var hasResponsiveOverrides = (value) => Object.keys(value).some((key) => !key.startsWith("_") && typeof value[key] !== "undefined");
33
+ var hasResponsiveOverrides = (value) => Object.keys(value).some((key) => !key.startsWith("_") && value[key] !== void 0);
34
34
  /**
35
35
  * A compact, inline version of `Responsive`. Allows the user to set different values for different breakpoints.
36
36
  *
@@ -74,7 +74,7 @@ var hasResponsiveOverrides = (value) => Object.keys(value).some((key) => !key.st
74
74
  */
75
75
  var MiniResponsive = (props) => {
76
76
  const { value = {}, onChange, icon, help, label, subtitle, options, breakpoints: rawBreakpoints, desktopFirstBreakpoints: rawDesktopFirstBreakpoints, breakpointData = {}, breakpointUiData, noModeSelect, children, hidden, useLegacyDesktopFirst, innerContentAlign = "start" } = props;
77
- if (typeof rawBreakpoints === "undefined" || !Array.isArray(rawBreakpoints)) {
77
+ if (rawBreakpoints === void 0 || !Array.isArray(rawBreakpoints)) {
78
78
  console.warn(__("MiniResponsive: Missing or invalid 'breakpoints' prop.", "eightshift-ui-components"));
79
79
  return null;
80
80
  }
@@ -82,13 +82,13 @@ var MiniResponsive = (props) => {
82
82
  let desktopFirstBreakpoints = (rawDesktopFirstBreakpoints ?? rawBreakpoints.slice(1)).map((breakpoint) => breakpoint.startsWith("max-") ? breakpoint : `max-${breakpoint}`);
83
83
  if (useLegacyDesktopFirst) desktopFirstBreakpoints = (rawDesktopFirstBreakpoints ?? rawBreakpoints.slice(0, -1)).map((breakpoint) => breakpoint.startsWith("max-") ? breakpoint : `max-${breakpoint}`);
84
84
  const isDesktopFirst = value[desktopFirstKey] === true;
85
- const firstMobileFirstOverride = breakpoints.find((breakpoint) => typeof value[breakpoint] !== "undefined");
86
- const lastDesktopFirstOverride = [...desktopFirstBreakpoints].reverse().find((breakpoint) => typeof value[breakpoint] !== "undefined");
85
+ const firstMobileFirstOverride = breakpoints.find((breakpoint) => value[breakpoint] !== void 0);
86
+ const lastDesktopFirstOverride = [...desktopFirstBreakpoints].reverse().find((breakpoint) => value[breakpoint] !== void 0);
87
87
  const breakpointsToMap = isDesktopFirst ? desktopFirstBreakpoints : breakpoints;
88
88
  const responsiveOverridesApplied = hasResponsiveOverrides(value);
89
89
  const getBreakpointWidth = (breakpoint) => breakpointData[breakpoint] ?? 0;
90
90
  if (hidden) return null;
91
- const DefaultTooltip = () => {
91
+ const renderDefaultTooltip = () => {
92
92
  const defaultBreakpoint = isDesktopFirst ? rawBreakpoints[rawBreakpoints.length - 1] : rawBreakpoints[0];
93
93
  const overrideIcon = defaultBreakpoint ? breakpointUiData?.[defaultBreakpoint]?.icon : void 0;
94
94
  const fallbackBreakpoint = defaultBreakpoint ?? "desktop";
@@ -181,7 +181,7 @@ var MiniResponsive = (props) => {
181
181
  children: [
182
182
  !isDesktopFirst ? jsxs("div", {
183
183
  className: clsx("es:grid es:grid-cols-[minmax(0,1.75rem)_minmax(0,1fr)_minmax(0,2.25rem)] es:items-center es:gap-x-2", "es:bg-white/50 es:p-1.5 es:rounded-sm es:first:rounded-t-2xl es:last:rounded-b-2xl es:inset-ring es:inset-ring-accent-600/25", innerContentAlign === "start" && "es:justify-items-start", innerContentAlign === "center" && "es:justify-items-center", innerContentAlign === "end" && "es:justify-items-end", innerContentAlign === "stretch" && "es:justify-items-stretch"),
184
- children: [jsx(DefaultTooltip, {}), jsx("div", {
184
+ children: [renderDefaultTooltip(), jsx("div", {
185
185
  className: "es:w-full es:col-start-2 es:col-end-2",
186
186
  children: children({
187
187
  breakpoint: defaultKey,
@@ -199,8 +199,8 @@ var MiniResponsive = (props) => {
199
199
  breakpointsToMap.map((breakpoint, index) => {
200
200
  const realBreakpointName = breakpoint.replace("max-", "");
201
201
  const filterBreakpoints = isDesktopFirst ? [...breakpointsToMap, defaultKey] : [defaultKey, ...breakpointsToMap];
202
- const aboveOverride = isDesktopFirst ? filterBreakpoints.slice(index + 1).find((currentBreakpoint) => typeof value[currentBreakpoint] !== "undefined") : [...filterBreakpoints.slice(0, index + 1)].reverse().find((currentBreakpoint) => typeof value[currentBreakpoint] !== "undefined");
203
- const belowOverride = isDesktopFirst ? [...filterBreakpoints.slice(0, index)].reverse().find((currentBreakpoint) => typeof value[currentBreakpoint] !== "undefined") : filterBreakpoints.slice(index + 2).find((currentBreakpoint) => typeof value[currentBreakpoint] !== "undefined");
202
+ const aboveOverride = isDesktopFirst ? filterBreakpoints.slice(index + 1).find((currentBreakpoint) => value[currentBreakpoint] !== void 0) : filterBreakpoints.slice(0, index + 1).reverse().find((currentBreakpoint) => value[currentBreakpoint] !== void 0);
203
+ const belowOverride = isDesktopFirst ? filterBreakpoints.slice(0, index).reverse().find((currentBreakpoint) => value[currentBreakpoint] !== void 0) : filterBreakpoints.slice(index + 2).find((currentBreakpoint) => value[currentBreakpoint] !== void 0);
204
204
  return jsxs("div", {
205
205
  className: clsx("es:grid es:grid-cols-[minmax(0,auto)_minmax(0,1fr)_minmax(0,2.25rem)] es:items-center es:gap-x-1.5", "es:bg-white/50 es:p-1.5 es:rounded-sm es:first:rounded-t-2xl es:last:rounded-b-2xl es:inset-ring es:inset-ring-surface-200/60", innerContentAlign === "start" && "es:justify-items-start", innerContentAlign === "center" && "es:justify-items-center", innerContentAlign === "end" && "es:justify-items-end", innerContentAlign === "stretch" && "es:justify-items-stretch"),
206
206
  children: [
@@ -218,31 +218,31 @@ var MiniResponsive = (props) => {
218
218
  jsx("span", {
219
219
  className: "es:block es:text-balance es:tabular-nums es:font-variation-[\"wdth\"_64,\"wght\"_275,\"ROND\"_50,\"slnt\"_-2] es:text-surface-500 es:mt-1",
220
220
  children: !isDesktopFirst ? jsxs(Fragment$1, { children: [
221
- !belowOverride && typeof value[breakpoint] !== "undefined" ? sprintf(__("Applied when the browser width is %dpx or more.", "eightshift-ui-components"), getBreakpointWidth(realBreakpointName)) : null,
222
- belowOverride && typeof value[breakpoint] !== "undefined" ? sprintf(__("Applied when the browser width is between %dpx and %dpx.", "eightshift-ui-components"), getBreakpointWidth(realBreakpointName), getBreakpointWidth(belowOverride) - 1) : null,
223
- typeof value[breakpoint] === "undefined" ? sprintf(__("From %dpx", "eightshift-ui-components"), getBreakpointWidth(realBreakpointName)) : null
221
+ !belowOverride && value[breakpoint] !== void 0 ? sprintf(__("Applied when the browser width is %dpx or more.", "eightshift-ui-components"), getBreakpointWidth(realBreakpointName)) : null,
222
+ belowOverride && value[breakpoint] !== void 0 ? sprintf(__("Applied when the browser width is between %dpx and %dpx.", "eightshift-ui-components"), getBreakpointWidth(realBreakpointName), getBreakpointWidth(belowOverride) - 1) : null,
223
+ value[breakpoint] === void 0 ? sprintf(__("From %dpx", "eightshift-ui-components"), getBreakpointWidth(realBreakpointName)) : null
224
224
  ] }) : jsxs(Fragment$1, { children: [
225
- !belowOverride && typeof value[breakpoint] !== "undefined" ? sprintf(__("Applied when the browser width is %dpx or less.", "eightshift-ui-components"), getBreakpointWidth(realBreakpointName) - 1) : null,
226
- belowOverride && typeof value[breakpoint] !== "undefined" ? sprintf(__("Applied when the browser width is between %dpx and %dpx.", "eightshift-ui-components"), getBreakpointWidth(belowOverride.replace("max-", "")), getBreakpointWidth(realBreakpointName) - 1) : null,
227
- typeof value[breakpoint] === "undefined" ? sprintf(__("Up to %dpx", "eightshift-ui-components"), getBreakpointWidth(breakpoint.replace("max-", ""))) : null
225
+ !belowOverride && value[breakpoint] !== void 0 ? sprintf(__("Applied when the browser width is %dpx or less.", "eightshift-ui-components"), getBreakpointWidth(realBreakpointName) - 1) : null,
226
+ belowOverride && value[breakpoint] !== void 0 ? sprintf(__("Applied when the browser width is between %dpx and %dpx.", "eightshift-ui-components"), getBreakpointWidth(belowOverride.replace("max-", "")), getBreakpointWidth(realBreakpointName) - 1) : null,
227
+ value[breakpoint] === void 0 ? sprintf(__("Up to %dpx", "eightshift-ui-components"), getBreakpointWidth(breakpoint.replace("max-", ""))) : null
228
228
  ] })
229
229
  }),
230
- typeof value[breakpoint] === "undefined" ? jsx("span", {
230
+ value[breakpoint] === void 0 ? jsx("span", {
231
231
  className: "es:mt-2 es:text-sm es:leading-none es:block es:font-variation-[\"wdth\"_75,\"wght\"_300,\"slnt\"_-5]",
232
232
  children: __("Not set", "eightshift-ui-components")
233
233
  }) : null,
234
- typeof value[breakpoint] !== "undefined" ? jsx("div", {
234
+ value[breakpoint] !== void 0 ? jsx("div", {
235
235
  className: "es:mx-auto es:mt-5",
236
236
  children: !isDesktopFirst ? jsx(BreakpointPreview, {
237
237
  dotsStart: Boolean(belowOverride),
238
238
  blocks: [
239
- aboveOverride && aboveOverride !== defaultKey && typeof value[aboveOverride] !== "undefined" ? {
239
+ aboveOverride && aboveOverride !== defaultKey && value[aboveOverride] !== void 0 ? {
240
240
  breakpoint: breakpointUiData?.[aboveOverride]?.label ?? aboveOverride,
241
241
  value: getResponsiveLabel(value, aboveOverride, options),
242
242
  dotsStart: !belowOverride,
243
243
  alignEnd: !belowOverride
244
244
  } : null,
245
- aboveOverride === defaultKey && typeof value[defaultKey] !== "undefined" ? {
245
+ aboveOverride === defaultKey && value[defaultKey] !== void 0 ? {
246
246
  breakpoint: __("Default", "eightshift-ui-components"),
247
247
  value: getResponsiveLabel(value, defaultKey, options),
248
248
  dotsStart: !belowOverride,
@@ -255,7 +255,7 @@ var MiniResponsive = (props) => {
255
255
  active: true,
256
256
  dotsEnd: !belowOverride
257
257
  },
258
- belowOverride && typeof value[belowOverride] !== "undefined" ? {
258
+ belowOverride && value[belowOverride] !== void 0 ? {
259
259
  breakpoint: breakpointUiData?.[belowOverride]?.label ?? belowOverride,
260
260
  value: getResponsiveLabel(value, belowOverride, options),
261
261
  width: String(getBreakpointWidth(belowOverride)),
@@ -292,7 +292,7 @@ var MiniResponsive = (props) => {
292
292
  }) : null
293
293
  ] }),
294
294
  children: jsx("div", {
295
- className: clsx("es:transition-colors es:icon:size-6 es:mx-0.5", typeof value[breakpoint] !== "undefined" ? "es:text-surface-600" : "es:text-surface-300"),
295
+ className: clsx("es:transition-colors es:icon:size-6 es:mx-0.5", value[breakpoint] !== void 0 ? "es:text-surface-600" : "es:text-surface-300"),
296
296
  children: jsx(Icon, {
297
297
  icon: breakpointUiData?.[realBreakpointName]?.icon,
298
298
  fallback: jsx(Icon, { icon: `screen${upperFirst(realBreakpointName)}` })
@@ -318,7 +318,7 @@ var MiniResponsive = (props) => {
318
318
  onChange(newValue);
319
319
  },
320
320
  icon: clearAlt,
321
- disabled: typeof value[breakpoint] === "undefined",
321
+ disabled: value[breakpoint] === void 0,
322
322
  type: "ghost"
323
323
  })
324
324
  ]
@@ -326,7 +326,7 @@ var MiniResponsive = (props) => {
326
326
  }),
327
327
  isDesktopFirst ? jsxs("div", {
328
328
  className: clsx("es:grid es:grid-cols-[minmax(0,1.75rem)_minmax(0,1fr)_minmax(0,2.25rem)] es:items-center es:gap-x-2", "es:bg-white/50 es:p-1.5 es:rounded-sm es:first:rounded-t-2xl es:last:rounded-b-2xl es:inset-ring es:inset-ring-accent-600/25", innerContentAlign === "start" && "es:justify-items-start", innerContentAlign === "center" && "es:justify-items-center", innerContentAlign === "end" && "es:justify-items-end", innerContentAlign === "stretch" && "es:justify-items-stretch"),
329
- children: [jsx(DefaultTooltip, {}), jsx("div", {
329
+ children: [renderDefaultTooltip(), jsx("div", {
330
330
  className: "es:w-full es:col-start-2 es:col-end-2",
331
331
  children: children({
332
332
  breakpoint: defaultKey,
@@ -343,10 +343,10 @@ var MiniResponsive = (props) => {
343
343
  }, "_default-desktop-first") : null
344
344
  ]
345
345
  }),
346
- jsxs(ContainerGroup, {
346
+ jsxs(TypedContainerGroup, {
347
347
  wrapClassName: "es:m-2 es:mt-4",
348
348
  label: __("Breakpoints", "eightshift-ui-components"),
349
- children: [jsx(Container, {
349
+ children: [jsx(TypedContainer, {
350
350
  lessSpaceEnd: true,
351
351
  children: jsx(BaseControl, {
352
352
  label: __("Actions", "eightshift-ui-components"),
@@ -376,7 +376,7 @@ var MiniResponsive = (props) => {
376
376
  children: __("Clear overrides", "eightshift-ui-components")
377
377
  })] })
378
378
  })
379
- }), jsx(Container, {
379
+ }), jsx(TypedContainer, {
380
380
  lessSpaceEnd: true,
381
381
  children: jsx(OptionSelect, {
382
382
  hidden: noModeSelect,
@@ -7,7 +7,6 @@ type ResponsiveAttributeMap = Record<string, string>;
7
7
  type ResponsiveOption = {
8
8
  label: string;
9
9
  value: Exclude<ResponsiveValueItem, undefined>;
10
- [key: string]: unknown;
11
10
  };
12
11
  type ResponsiveLegacyChildProps = {
13
12
  breakpoint: string;