@eightshift/ui-components 5.0.10 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/{Collection-uTAXq9Br.js → Collection-BRJOMbOa.js} +12 -7
  2. package/dist/{Dialog-CmAxaSUv.js → Dialog-D6EdDPeu.js} +8 -8
  3. package/dist/{useFormValidation-Dy0PXJg5.js → Form-Bnyyv3Im.js} +6 -4
  4. package/dist/{Group-DDPhPPTQ.js → Group-LBogWgyp.js} +2 -2
  5. package/dist/{Input-BmDS8Juy.js → Input-DfSBLhDx.js} +1 -1
  6. package/dist/List-BLeHBkfx.js +590 -0
  7. package/dist/{ListBox-_nDFq8-H.js → ListBox-BY3gwI8c.js} +3 -3
  8. package/dist/Select-BebwUgKB.js +764 -0
  9. package/dist/Separator-CTQWg_HO.js +1111 -0
  10. package/dist/TextField-o2U-uBWv.js +133 -0
  11. package/dist/assets/style-admin.css +268 -150
  12. package/dist/assets/style-editor.css +268 -150
  13. package/dist/assets/style.css +268 -150
  14. package/dist/assets/wp-font-enhancements.css +1 -1
  15. package/dist/assets/wp-ui-enhancements.css +1 -1
  16. package/dist/components/breakpoint-preview/breakpoint-preview.js +3 -4
  17. package/dist/components/button/button.js +3 -3
  18. package/dist/components/checkbox/checkbox.js +1 -2
  19. package/dist/components/color-pickers/color-picker.js +7 -9
  20. package/dist/components/color-pickers/color-swatch.js +1 -1
  21. package/dist/components/color-pickers/gradient-editor.js +19 -25
  22. package/dist/components/color-pickers/solid-color-picker.js +27 -27
  23. package/dist/components/component-toggle/component-toggle.js +1 -1
  24. package/dist/components/draggable/draggable-handle.js +2 -2
  25. package/dist/components/draggable/draggable.js +5 -5
  26. package/dist/components/draggable-list/draggable-list-item.js +2 -2
  27. package/dist/components/draggable-list/draggable-list.js +5 -5
  28. package/dist/components/expandable/expandable.js +1 -1
  29. package/dist/components/index.js +5 -5
  30. package/dist/components/input-field/input-field.js +13 -129
  31. package/dist/components/item-collection/item-collection.js +1 -1
  32. package/dist/components/link-input/link-input.js +1463 -17
  33. package/dist/components/matrix-align/matrix-align.js +11 -14
  34. package/dist/components/menu/menu.js +4 -8
  35. package/dist/components/modal/modal.js +3 -3
  36. package/dist/components/number-picker/number-picker.js +9 -10
  37. package/dist/components/option-select/option-select.js +140 -156
  38. package/dist/components/placeholders/file-placeholder.js +1 -1
  39. package/dist/components/placeholders/image-placeholder.js +3 -3
  40. package/dist/components/placeholders/media-placeholder.js +2 -2
  41. package/dist/components/popover/popover.js +10 -5
  42. package/dist/components/radio/radio.js +4 -5
  43. package/dist/components/repeater/repeater-item.js +1 -1
  44. package/dist/components/repeater/repeater.js +6 -6
  45. package/dist/components/responsive/mini-responsive.js +45 -47
  46. package/dist/components/responsive/responsive-legacy.js +51 -55
  47. package/dist/components/responsive/responsive.js +47 -49
  48. package/dist/components/responsive-preview/responsive-preview.js +12 -15
  49. package/dist/components/select/async-multi-select.js +4 -4
  50. package/dist/components/select/async-single-select.js +1 -1
  51. package/dist/components/select/multi-select-components.js +1 -1
  52. package/dist/components/select/multi-select.js +4 -4
  53. package/dist/components/select/shared.js +2 -2
  54. package/dist/components/select/single-select.js +1 -1
  55. package/dist/components/select/styles.js +3 -3
  56. package/dist/components/select/v2/async-select.js +215 -158
  57. package/dist/components/select/v2/shared.js +29 -20
  58. package/dist/components/select/v2/single-select.js +202 -851
  59. package/dist/components/slider/column-config-slider.js +2 -2
  60. package/dist/components/slider/slider.js +2 -2
  61. package/dist/components/slider/utils.js +1 -1
  62. package/dist/components/tabs/tabs.js +7 -8
  63. package/dist/components/toggle/switch.js +4 -3
  64. package/dist/components/toggle-button/toggle-button.js +1 -1
  65. package/dist/{default-i18n-CT_oS1Fy.js → default-i18n-OFa3zAyB.js} +5 -9
  66. package/dist/icons/jsx-svg.js +3 -4
  67. package/dist/index.js +4 -4
  68. package/dist/{multi-select-components-Sp-JEFEX.js → multi-select-components-BcKzA24f.js} +3 -3
  69. package/dist/{react-jsx-parser.min-DZCiis5V.js → react-jsx-parser.min-LF707GK8.js} +312 -332
  70. package/dist/useAsyncList-fLtZMvJO.js +420 -0
  71. package/dist/useFilter-BR5z1A4Q.js +50 -0
  72. package/dist/{useListState-9Hq_FiRF.js → useListState-BrZ2XvDS.js} +1 -1
  73. package/dist/{useNumberField-D0u2bh8g.js → useNumberField-y0dLc_6m.js} +2 -2
  74. package/dist/{useSingleSelectListState-DqhemUIh.js → useSingleSelectListState-Bh46cRXs.js} +1 -1
  75. package/dist/utilities/array-helpers.js +4 -7
  76. package/dist/utilities/es-dash.js +21 -3
  77. package/dist/utilities/index.js +2 -1
  78. package/dist/utilities/text-helpers.js +3 -3
  79. package/package.json +9 -9
  80. package/dist/ComboBox-BANSEKnb.js +0 -1915
  81. package/dist/Form-Cq3fu75_.js +0 -5
  82. package/dist/List-CZMUbkFU.js +0 -593
  83. package/dist/Separator-BN3mjL6q.js +0 -332
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
2
2
  .edit-post-header, .components-popover, .edit-post-sidebar, .wp-block-post-title, .components-select-control__input, .components-base-control__field, .components-base-control__label, .components-combobox-control__suggestions-container, .components-input-control__label, .components-input-control__input, .components-checkbox-control__label, .components-menu-group__label, .components-menu-item__button, .components-notice .components-notice__content, .components-tooltip, .components-modal__header, .preferences-modal__section-title, .preferences-modal__section-description, .block-editor-inserter__tabs, .editor-list-view-sidebar, .edit-post-layout__footer, .components-snackbar, .components-text-control__input {
3
3
  font-family: var(--es-font-sans, "Geist Variable", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
4
4
  }
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
2
2
  @layer properties {
3
3
  @supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
4
4
  *, :before, :after, ::backdrop {
@@ -51,7 +51,7 @@ const BreakpointPreview = (props) => {
51
51
  if (!blocks || blocks.length < 1) {
52
52
  return null;
53
53
  }
54
- const hasActive = (blocks == null ? void 0 : blocks.some(({ active }) => active)) ?? false;
54
+ const hasActive = blocks?.some(({ active }) => active) ?? false;
55
55
  const activeColors = {
56
56
  blue: {
57
57
  text: "es:text-blue-500",
@@ -108,9 +108,8 @@ const BreakpointPreview = (props) => {
108
108
  /* @__PURE__ */ jsx("div", { className: "es:row-start-2 es:size-px es:justify-self-end" })
109
109
  ] }),
110
110
  blocks.map(({ width, widthEnd, breakpoint, value, dotsStart: dotsStart2 = false, dotsEnd: dotsEnd2 = false, active = false, alignEnd = false, color }, i) => {
111
- var _a, _b;
112
- const activeTextColor = ((_a = activeColors == null ? void 0 : activeColors[color]) == null ? void 0 : _a.text) ?? activeColors.default.text;
113
- const activeBgColor = ((_b = activeColors == null ? void 0 : activeColors[color]) == null ? void 0 : _b.bg) ?? activeColors.default.bg;
111
+ const activeTextColor = activeColors?.[color]?.text ?? activeColors.default.text;
112
+ const activeBgColor = activeColors?.[color]?.bg ?? activeColors.default.bg;
114
113
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
115
114
  /* @__PURE__ */ jsxs("div", { className: "es:row-start-1 es:flex es:min-w-28 es:items-center es:gap-1 es:font-mono es:font-medium es:text-secondary-400", children: [
116
115
  dotsStart2 && /* @__PURE__ */ jsxs("div", { className: clsx("es:flex es:gap-0.5", active ? activeTextColor : "text-secondary-300"), children: [
@@ -8,9 +8,9 @@ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-Bb
8
8
  import { c as clsx } from "../../lite-DVmmD_-j.js";
9
9
  import { c as cva } from "../../index-BljRBEr_.js";
10
10
  import { Tooltip } from "../tooltip/tooltip.js";
11
- import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
11
+ import { _ as __ } from "../../default-i18n-OFa3zAyB.js";
12
12
  import { icons } from "../../icons/icons.js";
13
- import "../../react-jsx-parser.min-DZCiis5V.js";
13
+ import "../../react-jsx-parser.min-LF707GK8.js";
14
14
  function $2680b1829e803644$export$fa142eb1681c520(props, ref) {
15
15
  const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, orientation = "horizontal" } = props;
16
16
  let [isInToolbar, setInToolbar] = useState(false);
@@ -139,7 +139,7 @@ const Button = (props) => {
139
139
  ...other
140
140
  } = props;
141
141
  let tooltip = rawTooltip;
142
- if (rawTooltip === true && (ariaLabel == null ? void 0 : ariaLabel.length) > 0) {
142
+ if (rawTooltip === true && ariaLabel?.length > 0) {
143
143
  tooltip = ariaLabel;
144
144
  }
145
145
  const objRef = $df56164dff5785e2$export$4338b53315abf666(forwardedRef);
@@ -1,10 +1,9 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { a as $4e85f108e88277b8$export$b085522c77523c51 } from "../../RSPContexts-2lR5GG9p.js";
3
3
  import { d as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, h as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../../utils-CZt7LCbO.js";
4
- import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu75_.js";
4
+ import { a as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, b as $e93e671b31057976$export$b8473d3665f3a75a, c as $e5be200c675c3b3a$export$a763b9476acd3eb, d as $e5be200c675c3b3a$export$dad6ae84456c676a, $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Bnyyv3Im.js";
5
5
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
6
6
  import React__default, { useEffect, useRef, forwardRef, useContext, createContext, useMemo } from "react";
7
- import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, a as $e93e671b31057976$export$b8473d3665f3a75a, b as $e5be200c675c3b3a$export$a763b9476acd3eb, c as $e5be200c675c3b3a$export$dad6ae84456c676a } from "../../useFormValidation-Dy0PXJg5.js";
8
7
  import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "../../usePress-DWBuejBp.js";
9
8
  import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "../../useToggle-yGuUBU7q.js";
10
9
  import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-ibcBUHnB.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
2
+ import { _ as __ } from "../../default-i18n-OFa3zAyB.js";
3
3
  import { Menu, MenuItem, MenuSeparator, MenuSection } from "../menu/menu.js";
4
4
  import { ColorSwatch } from "./color-swatch.js";
5
5
  import { RichLabel } from "../rich-label/rich-label.js";
@@ -52,7 +52,6 @@ import { icons } from "../../icons/icons.js";
52
52
  * @preserve
53
53
  */
54
54
  const ColorPicker = (props) => {
55
- var _a, _b;
56
55
  const {
57
56
  icon,
58
57
  label,
@@ -75,9 +74,9 @@ const ColorPicker = (props) => {
75
74
  if (hidden) {
76
75
  return null;
77
76
  }
78
- const currentColor = (_a = colors == null ? void 0 : colors.find(({ slug }) => slug === value)) == null ? void 0 : _a.color;
77
+ const currentColor = colors?.find(({ slug }) => slug === value)?.color;
79
78
  const colorSuffixRegex = /(?!^.+)(-?(?:50|100|200|300|400|500|600|700|800|900|950|10|20|30|40|50|60|70|80|90){1})$/gi;
80
- const hasColorGroups = !noColorGroups && (colors == null ? void 0 : colors.some(({ slug }) => colorSuffixRegex.test(slug)));
79
+ const hasColorGroups = !noColorGroups && colors?.some(({ slug }) => colorSuffixRegex.test(slug));
81
80
  let groupedColors;
82
81
  const colorGroupNames = {
83
82
  generic: __("Other colors", "eightshift-ui-components")
@@ -85,11 +84,10 @@ const ColorPicker = (props) => {
85
84
  if (hasColorGroups) {
86
85
  groupedColors = colors.reduce(
87
86
  (output, current) => {
88
- var _a2;
89
- if (current === void 0 || (current == null ? void 0 : current.name) === void 0 || (current == null ? void 0 : current.slug) === void 0) {
87
+ if (current === void 0 || current?.name === void 0 || current?.slug === void 0) {
90
88
  return output;
91
89
  }
92
- if ((_a2 = current.slug.match(colorSuffixRegex)) == null ? void 0 : _a2.length) {
90
+ if (current.slug.match(colorSuffixRegex)?.length) {
93
91
  const newSlug = current.slug.replace(colorSuffixRegex, "").trim();
94
92
  if (!output[newSlug]) {
95
93
  output[newSlug] = [];
@@ -152,7 +150,7 @@ const ColorPicker = (props) => {
152
150
  tooltipText = __("List marker color", "eightshift-ui-components");
153
151
  menuTriggerIcon = icons.colorPickerListMarker;
154
152
  }
155
- const currentColorName = (_b = colors == null ? void 0 : colors.find((color) => (color == null ? void 0 : color.slug) === value)) == null ? void 0 : _b.name;
153
+ const currentColorName = colors?.find((color) => color?.slug === value)?.name;
156
154
  if (!label && tooltipText) {
157
155
  tooltipText = /* @__PURE__ */ jsx(
158
156
  RichLabel,
@@ -208,7 +206,7 @@ const ColorPicker = (props) => {
208
206
  tooltip: tooltipText,
209
207
  triggerProps: {
210
208
  ...rest.triggerProps,
211
- "aria-label": typeof label !== "undefined" ? null : props == null ? void 0 : props["aria-label"]
209
+ "aria-label": typeof label !== "undefined" ? null : props?.["aria-label"]
212
210
  },
213
211
  ...rest,
214
212
  children: [
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { $ as $251c695a52d94a8d$export$cae13e90592f246a } from "../../ColorSwatch-Dt3lRApA.js";
3
3
  import { c as clsx } from "../../lite-DVmmD_-j.js";
4
- import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
4
+ import { _ as __ } from "../../default-i18n-OFa3zAyB.js";
5
5
  import { $ as $799cddbef784668f$export$6e865ea70d7724f } from "../../Color-CNqKeT8D.js";
6
6
  /**
7
7
  * A simple color/gradient swatch.
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { _ as __, s as sprintf } from "../../default-i18n-CT_oS1Fy.js";
2
+ import { _ as __, s as sprintf } from "../../default-i18n-OFa3zAyB.js";
3
3
  import { useMemo, useState } from "react";
4
4
  import { ButtonGroup, Button } from "../button/button.js";
5
5
  import { icons } from "../../icons/icons.js";
@@ -89,11 +89,10 @@ function y(e, o, t, n) {
89
89
  }
90
90
  }
91
91
  const getGradientResult = (input, type) => {
92
- var _a, _b;
93
92
  if (!input || !type) {
94
93
  return "";
95
94
  }
96
- if (typeof input === "string" || !(input == null ? void 0 : input.stops)) {
95
+ if (typeof input === "string" || !input?.stops) {
97
96
  return "";
98
97
  }
99
98
  let output = "";
@@ -104,23 +103,22 @@ const getGradientResult = (input, type) => {
104
103
  output += `${type}-gradient(`;
105
104
  if (type === "linear") {
106
105
  const { orientation } = input;
107
- if ((orientation == null ? void 0 : orientation.type) === "angular") {
106
+ if (orientation?.type === "angular") {
108
107
  output += `${orientation.value.value}${orientation.value.unit}, `;
109
- } else if ((orientation == null ? void 0 : orientation.type) === "directional") {
108
+ } else if (orientation?.type === "directional") {
110
109
  output += `to ${orientation.value}, `;
111
110
  }
112
111
  }
113
112
  if (type === "radial") {
114
113
  const { shape, position } = input;
115
- output += `${shape ?? "circle"} at ${((_a = position == null ? void 0 : position.x) == null ? void 0 : _a.value) ?? "center"} ${((_b = position == null ? void 0 : position.y) == null ? void 0 : _b.value) ?? "center"}, `;
114
+ output += `${shape ?? "circle"} at ${position?.x?.value ?? "center"} ${position?.y?.value ?? "center"}, `;
116
115
  }
117
116
  if (type === "conic") {
118
117
  const { angle, position } = input;
119
118
  output += `from ${angle ?? "0deg"} at ${position ?? "center"}, `;
120
119
  }
121
120
  output += input.stops.map((stop) => {
122
- var _a2, _b2;
123
- return `${stop.color} ${((_a2 = stop.offset) == null ? void 0 : _a2.value) ?? ""}${((_b2 = stop.offset) == null ? void 0 : _b2.unit) ?? ""}`.trim();
121
+ return `${stop.color} ${stop.offset?.value ?? ""}${stop.offset?.unit ?? ""}`.trim();
124
122
  }).join(", ");
125
123
  output += ")";
126
124
  return output;
@@ -213,22 +211,21 @@ const linearDirections = [
213
211
  * @preserve
214
212
  */
215
213
  const GradientEditor = (props) => {
216
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
217
214
  const { value, onChange, hidden } = props;
218
215
  const gradientData = useMemo(() => {
219
- if ((value == null ? void 0 : value.startsWith("radial-gradient")) || (value == null ? void 0 : value.startsWith("repeating-radial-gradient"))) {
216
+ if (value?.startsWith("radial-gradient") || value?.startsWith("repeating-radial-gradient")) {
220
217
  return K(value ?? "");
221
218
  }
222
- if ((value == null ? void 0 : value.startsWith("conic-gradient")) || (value == null ? void 0 : value.startsWith("repeating-conic-gradient"))) {
219
+ if (value?.startsWith("conic-gradient") || value?.startsWith("repeating-conic-gradient")) {
223
220
  return j(value ?? "");
224
221
  }
225
222
  return P(value ?? "");
226
223
  }, [value]);
227
224
  const gradientType = useMemo(() => {
228
- if (typeof value === "string" && (value == null ? void 0 : value.startsWith("radial-gradient")) || (value == null ? void 0 : value.startsWith("repeating-radial-gradient"))) {
225
+ if (typeof value === "string" && value?.startsWith("radial-gradient") || value?.startsWith("repeating-radial-gradient")) {
229
226
  return "radial";
230
227
  }
231
- if (typeof value === "string" && (value == null ? void 0 : value.startsWith("conic-gradient")) || (value == null ? void 0 : value.startsWith("repeating-conic-gradient"))) {
228
+ if (typeof value === "string" && value?.startsWith("conic-gradient") || value?.startsWith("repeating-conic-gradient")) {
232
229
  return "conic";
233
230
  }
234
231
  return "linear";
@@ -275,7 +272,7 @@ const GradientEditor = (props) => {
275
272
  min: 0,
276
273
  max: 360,
277
274
  step: 1,
278
- value: ((_a = gradientData == null ? void 0 : gradientData.orientation) == null ? void 0 : _a.type) === "angular" ? (_c = (_b = gradientData == null ? void 0 : gradientData.orientation) == null ? void 0 : _b.value) == null ? void 0 : _c.value : null,
275
+ value: gradientData?.orientation?.type === "angular" ? gradientData?.orientation?.value?.value : null,
279
276
  onChange: (angle) => {
280
277
  setGradientData({
281
278
  ...gradientData,
@@ -285,10 +282,7 @@ const GradientEditor = (props) => {
285
282
  suffix: "°",
286
283
  size: "small",
287
284
  className: "es:grow",
288
- placeholder: ((_d = linearDirections.find(({ value: value2 }) => {
289
- var _a2;
290
- return value2 === ((_a2 = gradientData == null ? void 0 : gradientData.orientation) == null ? void 0 : _a2.value);
291
- })) == null ? void 0 : _d.valueDegrees) ?? ""
285
+ placeholder: linearDirections.find(({ value: value2 }) => value2 === gradientData?.orientation?.value)?.valueDegrees ?? ""
292
286
  }
293
287
  ),
294
288
  /* @__PURE__ */ jsx(
@@ -343,7 +337,7 @@ const GradientEditor = (props) => {
343
337
  {
344
338
  icon: icons.centerPoint,
345
339
  label: __("Center point", "eightshift-ui-components"),
346
- value: `${((_f = (_e = gradientData == null ? void 0 : gradientData.position) == null ? void 0 : _e.y) == null ? void 0 : _f.value) ?? "center"} ${((_h = (_g = gradientData == null ? void 0 : gradientData.position) == null ? void 0 : _g.x) == null ? void 0 : _h.value) ?? "center"}`,
340
+ value: `${gradientData?.position?.y?.value ?? "center"} ${gradientData?.position?.x?.value ?? "center"}`,
347
341
  onChange: (position) => {
348
342
  const [x2, y2] = position.split(" ");
349
343
  setGradientData({
@@ -367,7 +361,7 @@ const GradientEditor = (props) => {
367
361
  min: 0,
368
362
  max: 360,
369
363
  step: 1,
370
- value: parseInt(gradientData == null ? void 0 : gradientData.angle.replace("deg", "")),
364
+ value: parseInt(gradientData?.angle.replace("deg", "")),
371
365
  onChange: (value2) => {
372
366
  setGradientData({
373
367
  ...gradientData,
@@ -384,7 +378,7 @@ const GradientEditor = (props) => {
384
378
  {
385
379
  icon: icons.centerPoint,
386
380
  label: __("Center point", "eightshift-ui-components"),
387
- value: `${((_j = (_i = gradientData == null ? void 0 : gradientData.position) == null ? void 0 : _i.y) == null ? void 0 : _j.value) ?? "center"} ${((_l = (_k = gradientData == null ? void 0 : gradientData.position) == null ? void 0 : _k.x) == null ? void 0 : _l.value) ?? "center"}`,
381
+ value: `${gradientData?.position?.y?.value ?? "center"} ${gradientData?.position?.x?.value ?? "center"}`,
388
382
  onChange: (value2) => {
389
383
  setGradientData({
390
384
  ...gradientData,
@@ -412,7 +406,7 @@ const GradientEditor = (props) => {
412
406
  /* @__PURE__ */ jsx(
413
407
  DraggableList,
414
408
  {
415
- items: gradientData == null ? void 0 : gradientData.stops,
409
+ items: gradientData?.stops,
416
410
  onChange: (items) => {
417
411
  setGradientData({
418
412
  ...gradientData,
@@ -492,7 +486,7 @@ const GradientEditor = (props) => {
492
486
  );
493
487
  }
494
488
  },
495
- (_m = gradientData == null ? void 0 : gradientData.stops) == null ? void 0 : _m.length
489
+ gradientData?.stops?.length
496
490
  ),
497
491
  /* @__PURE__ */ jsx(
498
492
  Slider,
@@ -501,11 +495,11 @@ const GradientEditor = (props) => {
501
495
  min: 0,
502
496
  max: 100,
503
497
  step: 1,
504
- value: (_n = gradientData == null ? void 0 : gradientData.stops) == null ? void 0 : _n.map(({ offset }, i) => {
498
+ value: gradientData?.stops?.map(({ offset }, i) => {
505
499
  if (!offset) {
506
500
  return i * 100 / (gradientData.stops.length - 1);
507
501
  }
508
- return parseInt(offset == null ? void 0 : offset.value);
502
+ return parseInt(offset?.value);
509
503
  }),
510
504
  onChange: (value2) => {
511
505
  setGradientData({
@@ -14,14 +14,14 @@ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-Bb
14
14
  import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "../../useLocalizedStringFormatter-C9GO0IDB.js";
15
15
  import { a as $5c3e21d68f1c4674$export$a966af930f325cab } from "../../VisuallyHidden-BYi0pekx.js";
16
16
  import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-DHrSdE_Q.js";
17
- import { a as $3985021b0ad6602f$export$37fb8590cf2c088c, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-BmDS8Juy.js";
17
+ import { a as $3985021b0ad6602f$export$37fb8590cf2c088c, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-DfSBLhDx.js";
18
18
  import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-JS_ob-kh.js";
19
19
  import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-BuJgePCv.js";
20
- import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, b as $d2e8511e6f209edf$export$e908e06f4b8e3402, c as $7d0a636d7a4dcefd$export$2123ff2b87c81ca, d as $d841c8010a73d545$export$4f384c9210e583c3, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-D0u2bh8g.js";
21
- import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, b as $e5be200c675c3b3a$export$a763b9476acd3eb } from "../../useFormValidation-Dy0PXJg5.js";
20
+ import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, b as $d2e8511e6f209edf$export$e908e06f4b8e3402, c as $7d0a636d7a4dcefd$export$2123ff2b87c81ca, d as $d841c8010a73d545$export$4f384c9210e583c3, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-y0dLc_6m.js";
21
+ import { a as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, c as $e5be200c675c3b3a$export$a763b9476acd3eb } from "../../Form-Bnyyv3Im.js";
22
22
  import { c as clsx } from "../../lite-DVmmD_-j.js";
23
23
  import { BaseControl } from "../base-control/base-control.js";
24
- import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
24
+ import { _ as __ } from "../../default-i18n-OFa3zAyB.js";
25
25
  import { TriggeredPopover } from "../popover/popover.js";
26
26
  import { icons } from "../../icons/icons.js";
27
27
  import { Tabs, TabList, Tab, TabPanel } from "../tabs/tabs.js";
@@ -1269,9 +1269,9 @@ const $1cca5300a3c2e7f9$export$44fd664bcca5b6fb = /* @__PURE__ */ forwardRef(fun
1269
1269
  */
1270
1270
  const SolidColorPicker = (props) => {
1271
1271
  const { value: rawValue, onChange, disabled, onChangeEnd, allowTransparency = false, outputFormat, hidden, noAdvancedOptions } = props;
1272
- const value = rawValue == null ? void 0 : rawValue.replace("transparent", "rgba(0, 0, 0, 0)");
1272
+ const value = rawValue?.replace("transparent", "rgba(0, 0, 0, 0)");
1273
1273
  const defaultColor = $799cddbef784668f$export$6e865ea70d7724f("#00000000").toFormat(allowTransparency ? "hsla" : "hsl");
1274
- const modifiedValue = value && (value == null ? void 0 : value.length) > 1 ? $799cddbef784668f$export$6e865ea70d7724f(value) : defaultColor;
1274
+ const modifiedValue = value && value?.length > 1 ? $799cddbef784668f$export$6e865ea70d7724f(value) : defaultColor;
1275
1275
  const [color, setColor] = useState(modifiedValue.toFormat(allowTransparency ? "hsla" : "hsl"));
1276
1276
  if (hidden) {
1277
1277
  return null;
@@ -1280,12 +1280,12 @@ const SolidColorPicker = (props) => {
1280
1280
  if (onChangeEnd) {
1281
1281
  handleChangeEnd = (color2) => {
1282
1282
  setColor(color2 ?? defaultColor);
1283
- onChange(color2 == null ? void 0 : color2.toString(outputFormat ?? (allowTransparency ? "hexa" : "hex")));
1283
+ onChange(color2?.toString(outputFormat ?? (allowTransparency ? "hexa" : "hex")));
1284
1284
  };
1285
1285
  }
1286
1286
  let handleChange = (color2) => {
1287
1287
  setColor(color2 ?? defaultColor);
1288
- onChange(color2 == null ? void 0 : color2.toString(outputFormat ?? (allowTransparency ? "hexa" : "hex")));
1288
+ onChange(color2?.toString(outputFormat ?? (allowTransparency ? "hexa" : "hex")));
1289
1289
  };
1290
1290
  const valueInputClassName = clsx(
1291
1291
  "es:h-8 es:w-12",
@@ -1366,7 +1366,7 @@ const SolidColorPicker = (props) => {
1366
1366
  $3ada01a82feafb94$export$b865d4358897bb17,
1367
1367
  {
1368
1368
  value: color,
1369
- onChange: (color2) => handleChange(color2 == null ? void 0 : color2.toFormat("hsl")),
1369
+ onChange: (color2) => handleChange(color2?.toFormat("hsl")),
1370
1370
  "aria-label": __("Hex color value", "eightshift-ui-components"),
1371
1371
  isDisabled: disabled,
1372
1372
  children: /* @__PURE__ */ jsx(
@@ -1409,8 +1409,8 @@ const SolidColorPicker = (props) => {
1409
1409
  /* @__PURE__ */ jsx(
1410
1410
  $3ada01a82feafb94$export$b865d4358897bb17,
1411
1411
  {
1412
- value: color == null ? void 0 : color.toFormat(allowTransparency ? "rgba" : "rgb"),
1413
- onChange: (color2) => handleChange(color2 == null ? void 0 : color2.toFormat("hsl")),
1412
+ value: color?.toFormat(allowTransparency ? "rgba" : "rgb"),
1413
+ onChange: (color2) => handleChange(color2?.toFormat("hsl")),
1414
1414
  channel: "red",
1415
1415
  children: /* @__PURE__ */ jsx(
1416
1416
  BaseControl,
@@ -1425,8 +1425,8 @@ const SolidColorPicker = (props) => {
1425
1425
  /* @__PURE__ */ jsx(
1426
1426
  $3ada01a82feafb94$export$b865d4358897bb17,
1427
1427
  {
1428
- value: color == null ? void 0 : color.toFormat(allowTransparency ? "rgba" : "rgb"),
1429
- onChange: (color2) => handleChange(color2 == null ? void 0 : color2.toFormat("hsl")),
1428
+ value: color?.toFormat(allowTransparency ? "rgba" : "rgb"),
1429
+ onChange: (color2) => handleChange(color2?.toFormat("hsl")),
1430
1430
  channel: "green",
1431
1431
  children: /* @__PURE__ */ jsx(
1432
1432
  BaseControl,
@@ -1441,8 +1441,8 @@ const SolidColorPicker = (props) => {
1441
1441
  /* @__PURE__ */ jsx(
1442
1442
  $3ada01a82feafb94$export$b865d4358897bb17,
1443
1443
  {
1444
- value: color == null ? void 0 : color.toFormat(allowTransparency ? "rgba" : "rgb"),
1445
- onChange: (color2) => handleChange(color2 == null ? void 0 : color2.toFormat("hsl")),
1444
+ value: color?.toFormat(allowTransparency ? "rgba" : "rgb"),
1445
+ onChange: (color2) => handleChange(color2?.toFormat("hsl")),
1446
1446
  channel: "blue",
1447
1447
  children: /* @__PURE__ */ jsx(
1448
1448
  BaseControl,
@@ -1459,8 +1459,8 @@ const SolidColorPicker = (props) => {
1459
1459
  /* @__PURE__ */ jsx(
1460
1460
  $3ada01a82feafb94$export$b865d4358897bb17,
1461
1461
  {
1462
- value: color == null ? void 0 : color.toFormat(allowTransparency ? "hsla" : "hsl"),
1463
- onChange: (color2) => handleChange(color2 == null ? void 0 : color2.toFormat("hsl")),
1462
+ value: color?.toFormat(allowTransparency ? "hsla" : "hsl"),
1463
+ onChange: (color2) => handleChange(color2?.toFormat("hsl")),
1464
1464
  channel: "hue",
1465
1465
  children: /* @__PURE__ */ jsx(
1466
1466
  BaseControl,
@@ -1475,8 +1475,8 @@ const SolidColorPicker = (props) => {
1475
1475
  /* @__PURE__ */ jsx(
1476
1476
  $3ada01a82feafb94$export$b865d4358897bb17,
1477
1477
  {
1478
- value: color == null ? void 0 : color.toFormat(allowTransparency ? "hsla" : "hsl"),
1479
- onChange: (color2) => handleChange(color2 == null ? void 0 : color2.toFormat("hsl")),
1478
+ value: color?.toFormat(allowTransparency ? "hsla" : "hsl"),
1479
+ onChange: (color2) => handleChange(color2?.toFormat("hsl")),
1480
1480
  channel: "saturation",
1481
1481
  children: /* @__PURE__ */ jsx(
1482
1482
  BaseControl,
@@ -1491,8 +1491,8 @@ const SolidColorPicker = (props) => {
1491
1491
  /* @__PURE__ */ jsx(
1492
1492
  $3ada01a82feafb94$export$b865d4358897bb17,
1493
1493
  {
1494
- value: color == null ? void 0 : color.toFormat(allowTransparency ? "hsla" : "hsl"),
1495
- onChange: (color2) => handleChange(color2 == null ? void 0 : color2.toFormat("hsl")),
1494
+ value: color?.toFormat(allowTransparency ? "hsla" : "hsl"),
1495
+ onChange: (color2) => handleChange(color2?.toFormat("hsl")),
1496
1496
  channel: "lightness",
1497
1497
  children: /* @__PURE__ */ jsx(
1498
1498
  BaseControl,
@@ -1509,8 +1509,8 @@ const SolidColorPicker = (props) => {
1509
1509
  /* @__PURE__ */ jsx(
1510
1510
  $3ada01a82feafb94$export$b865d4358897bb17,
1511
1511
  {
1512
- value: color == null ? void 0 : color.toFormat(allowTransparency ? "hsba" : "hsb"),
1513
- onChange: (color2) => handleChange(color2 == null ? void 0 : color2.toFormat("hsl")),
1512
+ value: color?.toFormat(allowTransparency ? "hsba" : "hsb"),
1513
+ onChange: (color2) => handleChange(color2?.toFormat("hsl")),
1514
1514
  channel: "hue",
1515
1515
  children: /* @__PURE__ */ jsx(
1516
1516
  BaseControl,
@@ -1525,8 +1525,8 @@ const SolidColorPicker = (props) => {
1525
1525
  /* @__PURE__ */ jsx(
1526
1526
  $3ada01a82feafb94$export$b865d4358897bb17,
1527
1527
  {
1528
- value: color == null ? void 0 : color.toFormat(allowTransparency ? "hsba" : "hsb"),
1529
- onChange: (color2) => handleChange(color2 == null ? void 0 : color2.toFormat("hsl")),
1528
+ value: color?.toFormat(allowTransparency ? "hsba" : "hsb"),
1529
+ onChange: (color2) => handleChange(color2?.toFormat("hsl")),
1530
1530
  channel: "saturation",
1531
1531
  children: /* @__PURE__ */ jsx(
1532
1532
  BaseControl,
@@ -1541,8 +1541,8 @@ const SolidColorPicker = (props) => {
1541
1541
  /* @__PURE__ */ jsx(
1542
1542
  $3ada01a82feafb94$export$b865d4358897bb17,
1543
1543
  {
1544
- value: color == null ? void 0 : color.toFormat(allowTransparency ? "hsba" : "hsb"),
1545
- onChange: (color2) => handleChange(color2 == null ? void 0 : color2.toFormat("hsl")),
1544
+ value: color?.toFormat(allowTransparency ? "hsba" : "hsb"),
1545
+ onChange: (color2) => handleChange(color2?.toFormat("hsl")),
1546
1546
  channel: "brightness",
1547
1547
  children: /* @__PURE__ */ jsx(
1548
1548
  BaseControl,
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { _ as __, s as sprintf } from "../../default-i18n-CT_oS1Fy.js";
2
+ import { _ as __, s as sprintf } from "../../default-i18n-OFa3zAyB.js";
3
3
  import { Expandable } from "../expandable/expandable.js";
4
4
  import { icons } from "../../icons/icons.js";
5
5
  import { Switch } from "../toggle/switch.js";
@@ -1,10 +1,10 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { c as clsx } from "../../lite-DVmmD_-j.js";
3
- import "../../default-i18n-CT_oS1Fy.js";
3
+ import "../../default-i18n-OFa3zAyB.js";
4
4
  import { DraggableContext } from "./draggable-context.js";
5
5
  import { useContext } from "react";
6
6
  import { icons } from "../../icons/icons.js";
7
- import "../../react-jsx-parser.min-DZCiis5V.js";
7
+ import "../../react-jsx-parser.min-LF707GK8.js";
8
8
  /**
9
9
  * A Draggable item handle.
10
10
  *
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useLayoutEffect, useMemo, useState, useCallback, startTransition, createContext, memo, forwardRef, useImperativeHandle, useContext, useId } from "react";
3
- import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
3
+ import { _ as __ } from "../../default-i18n-OFa3zAyB.js";
4
4
  import { DraggableContext } from "./draggable-context.js";
5
5
  import { r as reactDomExports } from "../../index-CFozsmNS.js";
6
6
  var i = Symbol.for("preact-signals");
@@ -7187,10 +7187,10 @@ function move(items, event) {
7187
7187
  return mutate(items, event, arrayMove);
7188
7188
  }
7189
7189
  const fixIds = (items, itemIdBase) => {
7190
- return (items == null ? void 0 : items.map((item, i2) => ({
7190
+ return items?.map((item, i2) => ({
7191
7191
  ...item,
7192
- id: (item == null ? void 0 : item.id) ?? `${itemIdBase}-${i2}`
7193
- }))) ?? [];
7192
+ id: item?.id ?? `${itemIdBase}-${i2}`
7193
+ })) ?? [];
7194
7194
  };
7195
7195
  const SortableItem = ({ id, index, disabled, children, axis }) => {
7196
7196
  const [element, setElement] = useState(null);
@@ -7274,7 +7274,7 @@ const Draggable3 = (props) => {
7274
7274
  {
7275
7275
  onDragOver: (event) => setItems((items2) => move(items2, event)),
7276
7276
  onDragEnd: (event) => {
7277
- if (event == null ? void 0 : event.canceled) {
7277
+ if (event?.canceled) {
7278
7278
  return;
7279
7279
  }
7280
7280
  setItems((items2) => move(items2, event));
@@ -1,10 +1,10 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { c as clsx } from "../../lite-DVmmD_-j.js";
3
- import "../../default-i18n-CT_oS1Fy.js";
3
+ import "../../default-i18n-OFa3zAyB.js";
4
4
  import { BaseControl } from "../base-control/base-control.js";
5
5
  import { icons } from "../../icons/icons.js";
6
6
  import { cloneElement } from "react";
7
- import "../../react-jsx-parser.min-DZCiis5V.js";
7
+ import "../../react-jsx-parser.min-LF707GK8.js";
8
8
  /**
9
9
  * A DraggableList item.
10
10
  *
@@ -1,13 +1,13 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useId } from "react";
3
- import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
3
+ import { _ as __ } from "../../default-i18n-OFa3zAyB.js";
4
4
  import { BaseControl } from "../base-control/base-control.js";
5
5
  import { c as clsx } from "../../lite-DVmmD_-j.js";
6
- import { L as List, a as arrayRemove, b as arrayMove } from "../../List-CZMUbkFU.js";
6
+ import { L as List, a as arrayRemove, b as arrayMove } from "../../List-BLeHBkfx.js";
7
7
  const fixIds = (items, itemIdBase) => {
8
- return items == null ? void 0 : items.map((item, i) => ({
8
+ return items?.map((item, i) => ({
9
9
  ...item,
10
- id: (item == null ? void 0 : item.id) ?? `${itemIdBase}-${i}`
10
+ id: item?.id ?? `${itemIdBase}-${i}`
11
11
  }));
12
12
  };
13
13
  /**
@@ -138,7 +138,7 @@ const DraggableList = (props) => {
138
138
  }
139
139
  })
140
140
  },
141
- (value == null ? void 0 : value.id) ?? key
141
+ value?.id ?? key
142
142
  );
143
143
  }
144
144
  }
@@ -5,7 +5,7 @@ import { AnimatedVisibility } from "../animated-visibility/animated-visibility.j
5
5
  import { Button } from "../button/button.js";
6
6
  import { icons } from "../../icons/icons.js";
7
7
  import { c as clsx } from "../../lite-DVmmD_-j.js";
8
- import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
8
+ import { _ as __ } from "../../default-i18n-OFa3zAyB.js";
9
9
  import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-DH22t_SM.js";
10
10
  import { e as $bdb11010cef70236$export$f680877a34711e37, n as $b5e257d569688ac6$export$535bd6ca7f90a273, k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, a as $64fa3d84918910a7$export$29f1550f4b0d4415, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, o as $64fa3d84918910a7$export$c62b8e45d58ddad9, d as $3ef42575df84b30b$export$9d1611c77c2fe928, m as $5dc95899b306f630$export$c9058316764c140e } from "../../utils-CZt7LCbO.js";
11
11
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
@@ -38,8 +38,8 @@ import { ResponsiveLegacy } from "./responsive/responsive-legacy.js";
38
38
  import { ResponsivePreview } from "./responsive-preview/responsive-preview.js";
39
39
  import { AsyncMultiSelect } from "./select/async-multi-select.js";
40
40
  import { AsyncSelect } from "./select/async-single-select.js";
41
- import { __ExperimentalAsyncSelect } from "./select/v2/async-select.js";
42
- import { __ExperimentalSelect } from "./select/v2/single-select.js";
41
+ import { AsyncSelectNext } from "./select/v2/async-select.js";
42
+ import { SelectNext } from "./select/v2/single-select.js";
43
43
  import { Modal } from "./modal/modal.js";
44
44
  import { MultiSelect } from "./select/multi-select.js";
45
45
  import { RSClearIndicator, RSDropdownIndicator, RSMultiValue, RSMultiValueContainer, RSMultiValueLabel, RSMultiValueRemove, RSOption, RSSingleValue } from "./select/react-select-component-wrappers.js";
@@ -59,6 +59,7 @@ export {
59
59
  AnimatedVisibility,
60
60
  AsyncMultiSelect,
61
61
  AsyncSelect,
62
+ AsyncSelectNext,
62
63
  BaseControl,
63
64
  BreakpointPreview,
64
65
  Button,
@@ -120,6 +121,7 @@ export {
120
121
  ResponsivePreview,
121
122
  RichLabel,
122
123
  Select,
124
+ SelectNext,
123
125
  Slider,
124
126
  SolidColorPicker,
125
127
  Spacer,
@@ -133,7 +135,5 @@ export {
133
135
  ToggleButton,
134
136
  Tooltip,
135
137
  TriggeredPopover,
136
- VStack,
137
- __ExperimentalAsyncSelect,
138
- __ExperimentalSelect
138
+ VStack
139
139
  };