@eightshift/ui-components 5.0.2 → 5.0.4

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 (58) hide show
  1. package/dist/{Button-BpwTmkAe.js → Button-DH22t_SM.js} +75 -6
  2. package/dist/{Collection-n5d0zIgb.js → Collection-uTAXq9Br.js} +1 -1
  3. package/dist/{Color-lVhk8V_G.js → Color-CNqKeT8D.js} +1 -1
  4. package/dist/{ColorSwatch-DntWEAC3.js → ColorSwatch-Dt3lRApA.js} +1 -1
  5. package/dist/{ComboBox-BJpTEATT.js → ComboBox-D7KpCYaK.js} +9 -9
  6. package/dist/{Dialog-O9uw63D7.js → Dialog-CJVCRT8_.js} +5 -5
  7. package/dist/{ListBox-BTxlCGcc.js → ListBox-_nDFq8-H.js} +4 -4
  8. package/dist/{OverlayArrow-5aDgmImj.js → OverlayArrow-CjvnevpX.js} +1 -1
  9. package/dist/{Separator-CaTBkETC.js → Separator-BN3mjL6q.js} +1 -1
  10. package/dist/{Slider-C-S1oEH9.js → Slider-uOPcIpqS.js} +1 -1
  11. package/dist/assets/style-admin.css +1121 -365
  12. package/dist/assets/style-editor.css +1121 -365
  13. package/dist/assets/style.css +1124 -368
  14. package/dist/components/button/button.js +53 -25
  15. package/dist/components/checkbox/checkbox.js +5 -5
  16. package/dist/components/color-pickers/color-swatch.js +4 -4
  17. package/dist/components/color-pickers/gradient-editor.js +3 -3
  18. package/dist/components/color-pickers/solid-color-picker.js +9 -9
  19. package/dist/components/component-toggle/component-toggle.js +0 -1
  20. package/dist/components/draggable/draggable.js +9 -5
  21. package/dist/components/expandable/expandable.js +60 -53
  22. package/dist/components/input-field/input-field.js +3 -3
  23. package/dist/components/layout/hstack.js +4 -2
  24. package/dist/components/layout/vstack.js +4 -2
  25. package/dist/components/link-input/link-input.js +11 -9
  26. package/dist/components/menu/menu.js +5 -5
  27. package/dist/components/modal/modal.js +101 -77
  28. package/dist/components/notice/notice.js +16 -16
  29. package/dist/components/number-picker/number-picker.js +3 -3
  30. package/dist/components/placeholders/file-placeholder.js +13 -6
  31. package/dist/components/placeholders/image-placeholder.js +2 -2
  32. package/dist/components/placeholders/media-placeholder.js +2 -2
  33. package/dist/components/popover/popover.js +2 -2
  34. package/dist/components/radio/radio.js +4 -4
  35. package/dist/components/repeater/repeater-item.js +6 -5
  36. package/dist/components/repeater/repeater.js +8 -3
  37. package/dist/components/select/async-multi-select.js +1 -0
  38. package/dist/components/select/async-single-select.js +1 -0
  39. package/dist/components/select/multi-select.js +1 -0
  40. package/dist/components/select/single-select.js +1 -0
  41. package/dist/components/select/styles.js +1 -1
  42. package/dist/components/select/v2/async-select.js +5 -5
  43. package/dist/components/select/v2/shared.js +1 -1
  44. package/dist/components/select/v2/single-select.js +8 -8
  45. package/dist/components/slider/column-config-slider.js +2 -2
  46. package/dist/components/slider/slider.js +2 -2
  47. package/dist/components/tabs/tabs.js +12 -11
  48. package/dist/components/toggle/switch.js +3 -3
  49. package/dist/components/toggle-button/toggle-button.js +13 -12
  50. package/dist/components/tooltip/tooltip.js +1 -1
  51. package/dist/{number-GajL10e1.js → number-CHmNj-oR.js} +2 -2
  52. package/dist/{useButton-Bt3BffJm.js → useButton-lRcWnvOB.js} +1 -1
  53. package/dist/{useListState-DkyH7elT.js → useListState-9Hq_FiRF.js} +1 -1
  54. package/dist/{useNumberField-CU1_u8ze.js → useNumberField-D0u2bh8g.js} +2 -2
  55. package/dist/{usePress-BrJylgPR.js → usePress-DWBuejBp.js} +5 -3
  56. package/dist/{useSingleSelectListState-C4sorv2p.js → useSingleSelectListState-DqhemUIh.js} +1 -1
  57. package/dist/{useToggle-CDa3YAZI.js → useToggle-yGuUBU7q.js} +1 -1
  58. package/package.json +11 -11
@@ -1,14 +1,16 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-BpwTmkAe.js";
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, b as $0393f8ab869a0f1a$export$c17561cb55d4db30 } from "../../Button-DH22t_SM.js";
3
3
  import { k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, a as $64fa3d84918910a7$export$29f1550f4b0d4415, b as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928, l as $df56164dff5785e2$export$4338b53315abf666 } from "../../utils-CZt7LCbO.js";
4
4
  import { $ as $9bf71ea28793e738$export$c5251b9e124bf29 } from "../../FocusScope-BEPI2m7u.js";
5
5
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
6
- import React__default, { useState, useRef, forwardRef, createContext } from "react";
6
+ import React__default, { useState, useRef, forwardRef, createContext, cloneElement } from "react";
7
7
  import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-BbYZoHvX.js";
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
11
  import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
12
+ import { icons } from "../../icons/icons.js";
13
+ import "../../react-jsx-parser.min-DZCiis5V.js";
12
14
  function $2680b1829e803644$export$fa142eb1681c520(props, ref) {
13
15
  const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, orientation = "horizontal" } = props;
14
16
  let [isInToolbar, setInToolbar] = useState(false);
@@ -101,12 +103,14 @@ const $13c3c67164f4d5be$export$4c260019440d418f = /* @__PURE__ */ forwardRef(fun
101
103
  * @param {React.Ref} [props.forwardedRef] - Ref to forward to the button. Use the same as the `ref` prop.
102
104
  * @param {string} [props.wrapperClassName] - Classes to pass to the tooltip wrapper.
103
105
  * @param {Object} [props.tooltipProps] - Props to pass to the tooltip.
106
+ * @param {boolean} [props.pending] - If `true`, the button is in a pending state, which can be used to indicate that an action is being processed.
107
+ * @param {string} [props.pendingAriaLabel='Loading'] - ARIA label for the pending state, used for screen readers.
104
108
  * @param {boolean} [props.hidden] - If `true`, the component is not rendered.
105
109
  *
106
110
  * @returns {JSX.Element} The Button component.
107
111
  *
108
112
  * @typedef {'small' | 'default' | 'large'} ButtonSize
109
- * @typedef {'default' | 'selected' | 'ghost' | 'danger' | 'dangerGhost'} ButtonType
113
+ * @typedef {'default' | 'selected' | 'selectedGhost' | 'ghost' | 'danger' | 'dangerGhost'} ButtonType
110
114
  *
111
115
  * @example
112
116
  * <Button onPress={() => console.log('Hi!')} icon={icons.myIcon} />
@@ -121,6 +125,8 @@ const Button = (props) => {
121
125
  icon,
122
126
  size = "default",
123
127
  type = "default",
128
+ pending,
129
+ pendingAriaLabel = __("Loading", "eightshift-ui-components"),
124
130
  disabled,
125
131
  className,
126
132
  tooltip: rawTooltip,
@@ -150,29 +156,37 @@ const Button = (props) => {
150
156
  "es:btn-group-mid:rounded-none",
151
157
  "es:btn-group-h-start:rounded-r-none es:btn-group-v-start:rounded-b-none",
152
158
  "es:btn-group-h-end:rounded-l-none es:btn-group-v-end:rounded-t-none",
153
- "es:not-disabled:cursor-pointer",
159
+ "es:enabled:not-pending:cursor-pointer",
154
160
  "es:shrink-0",
161
+ "es:pending:shadow-none! es:pending:cursor-wait",
155
162
  icon && children ? "es:justify-start" : "es:justify-center",
156
163
  className
157
164
  ],
158
165
  {
159
166
  variants: {
160
167
  size: {
161
- small: "es:icon:size-4.5 es:rounded-md",
162
- default: "es:icon:size-5.5 es:rounded-lg",
163
- large: "es:icon:size-6 es:rounded-lg"
168
+ small: "es:icon:size-4.5 es:rounded-7",
169
+ default: "es:icon:size-5.5 es:rounded-10",
170
+ large: "es:icon:size-6 es:rounded-xl"
164
171
  },
165
172
  type: {
166
173
  default: "es:bg-radial-[at_50%_125%] es:inset-ring es:inset-shadow-xs",
167
174
  selected: "es:bg-radial-[at_50%_125%] es:inset-ring es:inset-shadow-xs",
168
175
  danger: "es:bg-radial-[at_50%_125%] es:inset-ring es:inset-shadow-xs",
169
- ghost: "es:border-transparent es:text-secondary-700 es:not-disabled:hover:bg-secondary-100 es:disabled:border-transparent!",
176
+ ghost: "es:border-transparent es:text-secondary-700 es:enabled:hover:bg-secondary-100 es:enabled:active:bg-accent-50 es:enabled:pressed:bg-accent-50 es:enabled:active:text-accent-950 es:enabled:pressed:text-accent-950 es:disabled:border-transparent!",
170
177
  dangerGhost: [
171
- "es:border-transparent es:text-red-600",
172
- "es:not-disabled:hover:bg-red-500/5",
178
+ "es:border-transparent es:text-red-700",
179
+ "es:enabled:hover:bg-red-500/5 es:enabled:active:bg-red-500/10 es:enabled:pressed:bg-red-500/10",
173
180
  "es:focus-visible:text-red-700",
174
181
  "es:focus-visible:ring-red-500/30 es:focus-visible:border-red-600 es:focus-visible:inset-ring-red-100",
175
182
  "es:disabled:border-transparent!"
183
+ ],
184
+ selectedGhost: [
185
+ "es:border-transparent es:text-accent-600",
186
+ "es:enabled:hover:bg-accent-500/5 es:enabled:active:bg-accent-500/10 es:enabled:pressed:bg-accent-500/10",
187
+ "es:focus-visible:text-accent-700",
188
+ "es:focus-visible:ring-accent-500/30 es:focus-visible:border-accent-500 es:focus-visible:inset-ring-accent-100",
189
+ "es:disabled:border-transparent!"
176
190
  ]
177
191
  }
178
192
  },
@@ -187,8 +201,8 @@ const Button = (props) => {
187
201
  "es:border-secondary-300",
188
202
  "es:inset-ring-secondary-100",
189
203
  "es:inset-shadow-secondary-100/50",
190
- "es:shadow-xs",
191
- "es:hover:inset-shadow-secondary-100 es:hover:to-secondary-100 es:hover:inset-ring-secondary-100",
204
+ "es:shadow-sm",
205
+ "es:enabled:hover:shadow-md es:enabled:active:shadow-sm es:enabled:pressed:shadow-sm es:hover:inset-shadow-secondary-100 es:hover:to-secondary-100 es:hover:inset-ring-secondary-100",
192
206
  "es:hover:text-accent-950",
193
207
  "es:focus-visible:text-accent-950"
194
208
  ]
@@ -205,22 +219,22 @@ const Button = (props) => {
205
219
  "es:focus-visible:border-accent-700",
206
220
  "es:focus-visible:inset-ring es:focus-visible:inset-ring-accent-600",
207
221
  "es:focus-visible:inset-shadow-xs es:focus-visible:inset-shadow-accent-400",
208
- "es:shadow es:shadow-accent-600/30"
222
+ "es:shadow es:shadow-accent-600/30 es:enabled:hover:shadow-md es:enabled:active:shadow-sm es:enabled:pressed:shadow-sm"
209
223
  ]
210
224
  },
211
225
  {
212
226
  type: "danger",
213
227
  disabled: false,
214
228
  class: [
215
- "es:text-red-800",
229
+ "es:text-red-700",
216
230
  "es:from-red-50/75 es:to-white",
217
- "es:border-red-600/50",
231
+ "es:border-red-700/50",
218
232
  "es:inset-ring-red-100",
219
233
  "es:inset-shadow-red-50",
220
234
  "es:hover:inset-shadow-red-100 es:hover:inset-ring-red-100 es:hover:text-red-800 es:hover:border-red-600",
221
235
  "es:focus-visible:text-red-900",
222
236
  "es:focus-visible:ring-red-500/30 es:focus-visible:border-red-600 es:focus-visible:inset-ring-red-100",
223
- "es:shadow"
237
+ "es:shadow es:shadow-red-700/20 es:enabled:hover:shadow-md es:enabled:active:shadow-sm es:enabled:pressed:shadow-sm"
224
238
  ]
225
239
  },
226
240
  {
@@ -300,25 +314,39 @@ const Button = (props) => {
300
314
  }
301
315
  }
302
316
  );
303
- const component = /* @__PURE__ */ jsxs(
317
+ const component = /* @__PURE__ */ jsx(
304
318
  $d2b4bc8c273e7be6$export$353f5b6fc5456de1,
305
319
  {
306
320
  onPress,
307
321
  isDisabled: disabled,
322
+ isPending: pending,
308
323
  className: componentClasses({
309
- disabled,
310
- hasIcon: Boolean(icon),
311
- iconOnly: Boolean(icon && !children),
324
+ disabled: !pending && disabled,
325
+ hasIcon: pending || Boolean(icon),
326
+ iconOnly: pending || Boolean(icon && !children),
312
327
  size,
313
328
  type
314
329
  }),
315
330
  ref: objRef,
316
331
  "aria-label": ariaLabel,
317
332
  ...other,
318
- children: [
319
- icon,
320
- children
321
- ]
333
+ children: ({ isPending }) => /* @__PURE__ */ jsxs(Fragment, { children: [
334
+ !isPending && /* @__PURE__ */ jsxs(Fragment, { children: [
335
+ icon,
336
+ children
337
+ ] }),
338
+ isPending && /* @__PURE__ */ jsxs(Fragment, { children: [
339
+ /* @__PURE__ */ jsx(
340
+ $0393f8ab869a0f1a$export$c17561cb55d4db30,
341
+ {
342
+ "aria-label": pendingAriaLabel,
343
+ className: "es:sr-only",
344
+ isIndeterminate: true
345
+ }
346
+ ),
347
+ cloneElement(icons.loader, { className: "es:motion-preset-spin es:motion-duration-1750" })
348
+ ] })
349
+ ] })
322
350
  }
323
351
  );
324
352
  if (!tooltip) {
@@ -5,8 +5,8 @@ import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu
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
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
- import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "../../usePress-BrJylgPR.js";
9
- import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "../../useToggle-CDa3YAZI.js";
8
+ import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "../../usePress-DWBuejBp.js";
9
+ import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "../../useToggle-yGuUBU7q.js";
10
10
  import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-ibcBUHnB.js";
11
11
  import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-Bv0UJQl8.js";
12
12
  import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-C2SkI1Fn.js";
@@ -265,10 +265,10 @@ const Checkbox2 = (props) => {
265
265
  "div",
266
266
  {
267
267
  className: clsx(
268
- "es:size-5 es:flex es:items-center es:justify-center",
268
+ "es:size-5 es:grid es:place-items-center es:grid-cols-1 es:grid-rows-1 es:*:row-start-1 es:*:col-start-1",
269
269
  "es:transition es:cursor-pointer",
270
270
  "es:bg-radial es:border es:rounded-md",
271
- "es:shadow-xs es:inset-ring es:inset-shadow-xs",
271
+ "es:shadow-sm es:inset-ring es:inset-shadow-xs",
272
272
  "es:any-focus:outline-hidden es:group-focus-visible:ring-2 es:group-focus-visible:ring-accent-500/50",
273
273
  !selectedOrIntermediate && "es:group-focus-visible:border-accent-500",
274
274
  !selectedOrIntermediate && "es:border-secondary-300 es:inset-ring-secondary-100 es:inset-shadow-secondary-100/50",
@@ -283,7 +283,7 @@ const Checkbox2 = (props) => {
283
283
  /* @__PURE__ */ jsx(
284
284
  AnimatedVisibility,
285
285
  {
286
- transition: "scaleFade",
286
+ transition: "scaleRotateFade",
287
287
  visible: indeterminate,
288
288
  className: "es:transition-none",
289
289
  children: /* @__PURE__ */ jsx("div", { className: "es:h-0.5 es:w-3 es:rounded es:bg-white" })
@@ -1,8 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { $ as $251c695a52d94a8d$export$cae13e90592f246a } from "../../ColorSwatch-DntWEAC3.js";
2
+ import { $ as $251c695a52d94a8d$export$cae13e90592f246a } from "../../ColorSwatch-Dt3lRApA.js";
3
3
  import { c as clsx } from "../../lite-DVmmD_-j.js";
4
4
  import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
5
- import { $ as $799cddbef784668f$export$6e865ea70d7724f } from "../../Color-lVhk8V_G.js";
5
+ import { $ as $799cddbef784668f$export$6e865ea70d7724f } from "../../Color-CNqKeT8D.js";
6
6
  /**
7
7
  * A simple color/gradient swatch.
8
8
  *
@@ -47,10 +47,10 @@ const ColorSwatch = (props) => {
47
47
  style: {
48
48
  background: (color || gradient) && backgroundGradient
49
49
  },
50
- className: () => clsx("es:size-6 es:rounded es:border es:border-secondary-300 es:shadow-xs", !color && !gradient && !customGradient && "es:bg-white", className),
50
+ className: () => clsx("es:size-6 es:rounded-md es:border es:border-secondary-300 es:shadow-sm", !color && !gradient && !customGradient && "es:bg-white", className),
51
51
  colorName: !color && !gradient && !customGradient ? __("No color", "eightshift-ui-components") : colorName,
52
52
  color,
53
- children: !color && !gradient && !customGradient && /* @__PURE__ */ jsx("div", { className: "es:m-auto es:h-full es:w-px es:rotate-45 es:rounded es:bg-red-500" })
53
+ children: !color && !gradient && !customGradient && /* @__PURE__ */ jsx("div", { className: "es:m-auto es:h-full es:w-px es:rotate-45 es:rounded-md es:bg-red-500" })
54
54
  }
55
55
  );
56
56
  };
@@ -6,7 +6,7 @@ import { icons } from "../../icons/icons.js";
6
6
  import { SolidColorPicker } from "./solid-color-picker.js";
7
7
  import { Slider } from "../slider/slider.js";
8
8
  import { NumberPicker } from "../number-picker/number-picker.js";
9
- import { $ as $251c695a52d94a8d$export$cae13e90592f246a } from "../../ColorSwatch-DntWEAC3.js";
9
+ import { $ as $251c695a52d94a8d$export$cae13e90592f246a } from "../../ColorSwatch-Dt3lRApA.js";
10
10
  import { Menu, MenuItem } from "../menu/menu.js";
11
11
  import { MatrixAlign } from "../matrix-align/matrix-align.js";
12
12
  import { Spacer } from "../spacer/spacer.js";
@@ -134,12 +134,12 @@ const gradientTypes = [
134
134
  {
135
135
  label: __("Radial"),
136
136
  value: "radial",
137
- icon: /* @__PURE__ */ jsx("div", { className: "es:transparent es:size-4 es:rounded-full es:bg-[radial-gradient(var(--tw-gradient-stops))] es:from-current" })
137
+ icon: /* @__PURE__ */ jsx("div", { className: "es:transparent es:size-4 es:rounded-full es:bg-radial es:from-current/75 es:to-current/10" })
138
138
  },
139
139
  {
140
140
  label: __("Conic"),
141
141
  value: "conic",
142
- icon: /* @__PURE__ */ jsx("div", { className: "es:transparent es:size-4 es:rounded-full es:bg-[conic-gradient(var(--tw-gradient-stops))] es:from-current" })
142
+ icon: /* @__PURE__ */ jsx("div", { className: "es:transparent es:size-4 es:rounded-full es:bg-conic es:from-current" })
143
143
  }
144
144
  ];
145
145
  const linearDirections = [
@@ -5,11 +5,11 @@ import { d as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$
5
5
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
6
6
  import { a as $9ab94262bd0047c7$export$420e68273165f4ec, $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-Bv0UJQl8.js";
7
7
  import { b as $458b0a5536c1a7cf$export$40bfa8c7b0832715, g as $03deb23ff14920c4$export$4eaf04e54aa8eed6, z as $7215afc6de606d6b$export$de79e2c695e052f3, A as $46d819fcbaf35654$export$8f71654801c2f7cd, p as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, c as $c87311424ea30a05$export$fedb369cb70207f1, v as $c87311424ea30a05$export$a11b0059900ceec8, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-C2SkI1Fn.js";
8
- import { $ as $799cddbef784668f$export$6e865ea70d7724f, b as $799cddbef784668f$export$4cde5df63f53f473, a as $3493a52097159720$exports } from "../../Color-lVhk8V_G.js";
9
- import { $ as $9446cca9a3875146$export$cb6e0bb50bc19463, a as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "../../number-GajL10e1.js";
8
+ import { $ as $799cddbef784668f$export$6e865ea70d7724f, b as $799cddbef784668f$export$4cde5df63f53f473, a as $3493a52097159720$exports } from "../../Color-CNqKeT8D.js";
9
+ import { a as $9446cca9a3875146$export$cb6e0bb50bc19463, $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "../../number-CHmNj-oR.js";
10
10
  import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-B7-lUnAF.js";
11
11
  import { $ as $99facab73266f662$export$5add1d006293d136 } from "../../useFormReset-D2YaWRIA.js";
12
- import { e as $28f99e3e86e6ec45$export$e5fda3247f5d67f9, f as $e8a7022cf87cba2a$export$36da96379f79f245, g as $bcca50147b47f54d$export$56b2c08e277f365, h as $47b897dc8cdb026b$export$8d15029008292ae, d as $6f909507e6374d18$export$1e7083018727fa60, i as $6f909507e6374d18$export$f1fce0420cc6d8ee, j as $6f909507e6374d18$export$6189c2744041d8f8, a as $6f909507e6374d18$export$105594979f116971 } from "../../Slider-C-S1oEH9.js";
12
+ import { e as $28f99e3e86e6ec45$export$e5fda3247f5d67f9, f as $e8a7022cf87cba2a$export$36da96379f79f245, g as $bcca50147b47f54d$export$56b2c08e277f365, h as $47b897dc8cdb026b$export$8d15029008292ae, d as $6f909507e6374d18$export$1e7083018727fa60, i as $6f909507e6374d18$export$f1fce0420cc6d8ee, j as $6f909507e6374d18$export$6189c2744041d8f8, a as $6f909507e6374d18$export$105594979f116971 } from "../../Slider-uOPcIpqS.js";
13
13
  import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-BbYZoHvX.js";
14
14
  import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "../../useLocalizedStringFormatter-C9GO0IDB.js";
15
15
  import { a as $5c3e21d68f1c4674$export$a966af930f325cab } from "../../VisuallyHidden-BYi0pekx.js";
@@ -17,7 +17,7 @@ import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError
17
17
  import { a as $3985021b0ad6602f$export$37fb8590cf2c088c, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-BmDS8Juy.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-CU1_u8ze.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
21
  import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, b as $e5be200c675c3b3a$export$a763b9476acd3eb } from "../../useFormValidation-Dy0PXJg5.js";
22
22
  import { c as clsx } from "../../lite-DVmmD_-j.js";
23
23
  import { BaseControl } from "../base-control/base-control.js";
@@ -1290,7 +1290,7 @@ const SolidColorPicker = (props) => {
1290
1290
  const valueInputClassName = clsx(
1291
1291
  "es:h-8 es:w-12",
1292
1292
  "es:tabular-nums es:font-mono",
1293
- "es:border es:rounded-lg es:border-secondary-300 es:p-2 es:text-sm es:shadow-xs es:transition es:selection:bg-accent-500/20 es:selection:text-accent-950",
1293
+ "es:border es:rounded-lg es:border-secondary-300 es:p-2 es:text-sm es:shadow-sm es:transition es:selection:bg-accent-500/20 es:selection:text-accent-950",
1294
1294
  "es:any-focus:outline-hidden",
1295
1295
  "es:focus-visible:ring-2 es:focus-visible:ring-accent-500/50 es:focus-visible:z-10",
1296
1296
  "es:focus-visible:border-accent-500",
@@ -1304,7 +1304,7 @@ const SolidColorPicker = (props) => {
1304
1304
  xChannel: "saturation",
1305
1305
  yChannel: "lightness",
1306
1306
  className: clsx(
1307
- "es:size-48 es:rounded-md es:border es:border-secondary-300 es:shadow-sm es:transition",
1307
+ "es:size-48 es:rounded-xl es:border es:border-secondary-300 es:shadow-sm es:transition",
1308
1308
  'es:[&:has(>_[data-focus-visible="true"])]:ring-2 es:[&:has(>_[data-focus-visible="true"])]:ring-accent-500/50',
1309
1309
  "es:disabled:bg-linear-to-r! es:disabled:from-white es:disabled:to-secondary-100"
1310
1310
  ),
@@ -1325,7 +1325,7 @@ const SolidColorPicker = (props) => {
1325
1325
  $6f909507e6374d18$export$105594979f116971,
1326
1326
  {
1327
1327
  className: clsx(
1328
- "es:h-7 es:w-48 es:rounded-md es:border es:border-secondary-300 es:shadow-sm",
1328
+ "es:h-7 es:w-48 es:rounded-10 es:border es:border-secondary-300 es:shadow-sm",
1329
1329
  'es:[&:has(>_[data-focus-visible="true"])]:ring-2 es:[&:has(>_[data-focus-visible="true"])]:ring-accent-500/50',
1330
1330
  "es:disabled:bg-linear-to-r! es:disabled:from-white es:disabled:to-secondary-100"
1331
1331
  ),
@@ -1345,7 +1345,7 @@ const SolidColorPicker = (props) => {
1345
1345
  $6f909507e6374d18$export$105594979f116971,
1346
1346
  {
1347
1347
  className: clsx(
1348
- "es:h-7 es:w-48 es:rounded-md es:border es:border-secondary-300 es:shadow-sm",
1348
+ "es:h-7 es:w-48 es:rounded-10 es:border es:border-secondary-300 es:shadow-sm",
1349
1349
  'es:[&:has(>_[data-focus-visible="true"])]:ring-2 es:[&:has(>_[data-focus-visible="true"])]:ring-accent-500/50',
1350
1350
  "es:disabled:bg-linear-to-r! es:disabled:from-white es:disabled:to-secondary-100"
1351
1351
  ),
@@ -1375,7 +1375,7 @@ const SolidColorPicker = (props) => {
1375
1375
  className: clsx(
1376
1376
  "es:h-9 es:w-20",
1377
1377
  "es:tabular-nums es:font-mono",
1378
- "es:border es:border-secondary-300 es:p-2 es:text-sm es:shadow-xs es:transition es:selection:bg-accent-500/20 es:selection:text-accent-950",
1378
+ "es:border es:border-secondary-300 es:p-2 es:text-sm es:shadow-sm es:transition es:selection:bg-accent-500/20 es:selection:text-accent-950",
1379
1379
  "es:any-focus:outline-hidden",
1380
1380
  "es:focus-visible:ring-2 es:focus-visible:ring-accent-500/50 es:focus-visible:z-10",
1381
1381
  "es:focus-visible:border-accent-500",
@@ -23,7 +23,6 @@ import { AnimatedVisibility } from "../animated-visibility/animated-visibility.j
23
23
  * @param {boolean} [props.noUseToggle] - If `true`, the toggle is not displayed.
24
24
  * @param {boolean} [props.noExpandButton] - If `true`, the expand button is not shown.
25
25
  * @param {boolean} [props.noLabel] - If `true`, the label is not shown.
26
- * @param {boolean} [props.noUseToggle] - If `true`, the toggle is not displayed.
27
26
  * @param {boolean} [props.expandButtonDisabled] - If `true`, the expand button is disabled.
28
27
  * @param {boolean} [props.controlOnly] - If `true`, only the control is displayed.
29
28
  * @param {boolean} [props.hideUseToggleOnExpand] - If `true`, and the component is display in a variant where it can be expanded, the use toggle will hide when the component is expanded.
@@ -427,9 +427,10 @@ function computed(compute, comparator) {
427
427
  return w(compute);
428
428
  }
429
429
  function deepEqual(a2, b2) {
430
- if (a2 === b2) {
430
+ if (Object.is(a2, b2)) {
431
431
  return true;
432
432
  }
433
+ if (a2 === null || b2 === null) return false;
433
434
  if (typeof a2 === "function" && typeof b2 === "function") {
434
435
  return a2 === b2;
435
436
  }
@@ -453,11 +454,13 @@ function deepEqual(a2, b2) {
453
454
  );
454
455
  return !hasDifferentValues;
455
456
  }
456
- try {
457
- return JSON.stringify(a2) === JSON.stringify(b2);
458
- } catch (e2) {
459
- return false;
457
+ if (typeof a2 === "object" && typeof b2 === "object") {
458
+ const aKeys = Object.keys(a2);
459
+ const bKeys = Object.keys(b2);
460
+ if (aKeys.length !== bKeys.length) return false;
461
+ return aKeys.some((key) => deepEqual(a2[key], b2[key]));
460
462
  }
463
+ return false;
461
464
  }
462
465
  function reactive({ get }, _2) {
463
466
  return {
@@ -4434,6 +4437,7 @@ render_fn = function() {
4434
4437
  };
4435
4438
  dropEffectCleanup = E(() => {
4436
4439
  if (dragOperation.status.dropped) {
4440
+ queueMicrotask(() => dropEffectCleanup == null ? void 0 : dropEffectCleanup());
4437
4441
  const onComplete = cleanup;
4438
4442
  cleanup = void 0;
4439
4443
  source.status = "dropping";
@@ -6,7 +6,7 @@ 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
8
  import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
9
- import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-BpwTmkAe.js";
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";
12
12
  import { b as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../../useHover-C2SkI1Fn.js";
@@ -269,59 +269,66 @@ const Expandable = (props) => {
269
269
  className: clsx("es:w-full es:rounded-xl es:border es:border-secondary-300/0 es:text-sm es:transition", isOpen && "es:border-secondary-300/100 es:shadow-lg", className),
270
270
  ...other,
271
271
  children: [
272
- /* @__PURE__ */ jsxs("div", { className: clsx("es:flex es:h-10 es:items-center es:gap-1 es:transition-[padding]", isOpen && "es:py-1 es:pl-2 es:pr-1", headerClassName), children: [
273
- /* @__PURE__ */ jsx(
274
- RichLabel,
275
- {
276
- icon,
277
- label,
278
- subtitle,
279
- className: labelClassName,
280
- as: $01b77f81d0f07f68$export$b04be29aa201d4f5,
281
- fullWidth: true
282
- }
283
- ),
284
- actions && !keepActionsOnExpand && /* @__PURE__ */ jsx(
285
- AnimatedVisibility,
286
- {
287
- visible: !isOpen,
288
- className: "es:ml-auto es:flex es:gap-2",
289
- transition: "slideFadeDownSlight",
290
- noInitial: true,
291
- children: actions
292
- }
293
- ),
294
- actions && keepActionsOnExpand && /* @__PURE__ */ jsx("div", { className: "es:ml-auto es:flex es:gap-2", children: actions }),
295
- customOpenButton && customOpenButton({
296
- open: isOpen,
297
- toggleOpen: () => {
298
- setIsOpen(!isOpen);
299
- if (onOpenChange) {
300
- onOpenChange(!isOpen);
301
- }
302
- },
303
- tooltip: isOpen ? __("Close", "eightshift-ui-components") : __("Open", "eightshift-ui-components"),
304
- disabled
305
- }),
306
- !customOpenButton && /* @__PURE__ */ jsx(
307
- Button,
308
- {
309
- slot: "trigger",
310
- type: "ghost",
311
- icon: isOpen ? icons.caretDownFill : icons.caretDown,
312
- onPress: () => {
313
- setIsOpen(!isOpen);
314
- if (onOpenChange) {
315
- onOpenChange(!isOpen);
272
+ /* @__PURE__ */ jsxs(
273
+ "div",
274
+ {
275
+ className: clsx("es:flex es:h-10 es:items-center es:gap-1 es:transition-[padding]", isOpen && "es:py-1 es:pl-2 es:pr-1", headerClassName),
276
+ ...headerProps,
277
+ children: [
278
+ /* @__PURE__ */ jsx(
279
+ RichLabel,
280
+ {
281
+ icon,
282
+ label,
283
+ subtitle,
284
+ className: labelClassName,
285
+ as: $01b77f81d0f07f68$export$b04be29aa201d4f5,
286
+ fullWidth: true
287
+ }
288
+ ),
289
+ actions && !keepActionsOnExpand && /* @__PURE__ */ jsx(
290
+ AnimatedVisibility,
291
+ {
292
+ visible: !isOpen,
293
+ className: "es:ml-auto es:flex es:gap-2",
294
+ transition: "slideFadeDownSlight",
295
+ noInitial: true,
296
+ children: actions
316
297
  }
317
- },
318
- tooltip: isOpen ? __("Close", "eightshift-ui-components") : __("Open", "eightshift-ui-components"),
319
- disabled,
320
- className: clsx("es:icon:size-5 es:icon:transition-transform", isOpen && "es:icon:-scale-y-100"),
321
- size: "small"
322
- }
323
- )
324
- ] }),
298
+ ),
299
+ actions && keepActionsOnExpand && /* @__PURE__ */ jsx("div", { className: "es:ml-auto es:flex es:gap-2", children: actions }),
300
+ customOpenButton && customOpenButton({
301
+ open: isOpen,
302
+ toggleOpen: () => {
303
+ setIsOpen(!isOpen);
304
+ if (onOpenChange) {
305
+ onOpenChange(!isOpen);
306
+ }
307
+ },
308
+ tooltip: isOpen ? __("Close", "eightshift-ui-components") : __("Open", "eightshift-ui-components"),
309
+ disabled
310
+ }),
311
+ !customOpenButton && /* @__PURE__ */ jsx(
312
+ Button,
313
+ {
314
+ slot: "trigger",
315
+ type: "ghost",
316
+ icon: isOpen ? icons.caretDownFill : icons.caretDown,
317
+ onPress: () => {
318
+ setIsOpen(!isOpen);
319
+ if (onOpenChange) {
320
+ onOpenChange(!isOpen);
321
+ }
322
+ },
323
+ tooltip: isOpen ? __("Close", "eightshift-ui-components") : __("Open", "eightshift-ui-components"),
324
+ disabled,
325
+ className: clsx("es:icon:size-5 es:icon:transition-transform", isOpen && "es:icon:-scale-y-100"),
326
+ size: "small"
327
+ }
328
+ )
329
+ ]
330
+ }
331
+ ),
325
332
  /* @__PURE__ */ jsx(
326
333
  $28f4fd908f0de97f$export$feabaa331e1d464c,
327
334
  {
@@ -194,7 +194,7 @@ const InputField = (props) => {
194
194
  ...other,
195
195
  type,
196
196
  className: clsx(
197
- "es:min-h-10 es:w-full es:rounded-lg es:border es:border-secondary-300 es:p-2 es:text-sm es:shadow-xs es:transition es:selection:bg-accent-500/20 es:selection:text-accent-950",
197
+ "es:min-h-10 es:w-full es:rounded-10 es:border es:border-secondary-300 es:p-2 es:text-sm es:shadow-sm es:not-readonly:focus:shadow-md es:transition es:selection:bg-accent-500/20 es:selection:text-accent-950",
198
198
  "es:any-focus:outline-hidden",
199
199
  "es:focus-visible:ring-2 es:focus-visible:ring-accent-500/50",
200
200
  "es:focus-visible:border-accent-500",
@@ -210,12 +210,12 @@ const InputField = (props) => {
210
210
  {
211
211
  ...other,
212
212
  className: clsx(
213
- "es:min-h-10 es:w-full es:rounded-lg es:border es:border-secondary-300 es:p-2 es:text-sm es:shadow-xs es:transition es:selection:bg-accent-500/20 es:selection:text-accent-950",
213
+ "es:min-h-10 es:w-full es:rounded-10 es:border es:border-secondary-300 es:p-2 es:text-sm es:shadow-sm es:not-readonly:focus:shadow-md es:transition es:selection:bg-accent-500/20 es:selection:text-accent-950",
214
214
  "es:any-focus:outline-hidden",
215
215
  "es:focus-visible:ring-2 es:focus-visible:ring-accent-500/50",
216
216
  "es:focus-visible:border-accent-500",
217
217
  "es:inset-ring es:inset-ring-secondary-100",
218
- "es:disabled:shadow-none! es:disabled:border-secondary-200 es:disabled:bg-secondary-50 es:disabled:text-secondary-500 es:disabled:cursor-default es:readonly:bg-secondary-50",
218
+ "es:disabled:shadow-none! es:readonly:shadow-xs! es:disabled:border-secondary-200 es:disabled:bg-secondary-50 es:disabled:text-secondary-500 es:disabled:cursor-default es:readonly:bg-secondary-50",
219
219
  className
220
220
  )
221
221
  }
@@ -5,6 +5,7 @@ import { c as clsx } from "../../lite-DVmmD_-j.js";
5
5
  *
6
6
  * @component
7
7
  * @param {Object} props - Component props.
8
+ * @param {JSX.Element} [props.as] - Element to render the component as. Defaults to `div`.
8
9
  * @param {boolean} [props.noWrap] - If `true`, the children will not wrap if their size exceeds the container size.
9
10
  * @param {string} [props.className] - Classes to pass to the component.
10
11
  * @param {boolean} [props.hidden] - If `true`, the component is not rendered.
@@ -19,11 +20,12 @@ import { c as clsx } from "../../lite-DVmmD_-j.js";
19
20
  * @preserve
20
21
  */
21
22
  const HStack = (props) => {
22
- const { children, noWrap, className, hidden } = props;
23
+ const { children, noWrap, className, hidden, as } = props;
23
24
  if (hidden) {
24
25
  return null;
25
26
  }
26
- return /* @__PURE__ */ jsx("div", { className: clsx("es:flex es:items-center es:gap-x-1.5 es:gap-y-2", !noWrap && "es:flex-wrap", className), children });
27
+ const ComponentToRender = as ?? "div";
28
+ return /* @__PURE__ */ jsx(ComponentToRender, { className: clsx("es:flex es:items-center es:gap-x-1.5 es:gap-y-2", !noWrap && "es:flex-wrap", className), children });
27
29
  };
28
30
  export {
29
31
  HStack
@@ -5,6 +5,7 @@ import { c as clsx } from "../../lite-DVmmD_-j.js";
5
5
  *
6
6
  * @component
7
7
  * @param {Object} props - Component props.
8
+ * @param {JSX.Element} [props.as] - Element to render the component as. Defaults to `div`.
8
9
  * @param {boolean} [props.noWrap] - If `true`, the children will not wrap if their size exceeds the container size.
9
10
  * @param {string} [props.className] - Classes to pass to the component.
10
11
  * @param {boolean} [props.hidden] - If `true`, the component is not rendered.
@@ -19,11 +20,12 @@ import { c as clsx } from "../../lite-DVmmD_-j.js";
19
20
  * @preserve
20
21
  */
21
22
  const VStack = (props) => {
22
- const { children, noWrap, className, hidden } = props;
23
+ const { children, noWrap, className, hidden, as } = props;
23
24
  if (hidden) {
24
25
  return null;
25
26
  }
26
- return /* @__PURE__ */ jsx("div", { className: clsx("es:flex es:flex-col es:gap-x-1.5 es:gap-y-1.5", !noWrap && "es:flex-wrap", className), children });
27
+ const ComponentToRender = as ?? "div";
28
+ return /* @__PURE__ */ jsx(ComponentToRender, { className: clsx("es:flex es:flex-col es:gap-x-1.5 es:gap-y-1.5", !noWrap && "es:flex-wrap", className), children });
27
29
  };
28
30
  export {
29
31
  VStack