@eightshift/ui-components 6.0.2 → 6.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 (61) hide show
  1. package/dist/assets/style-admin.css +111 -29
  2. package/dist/assets/style-editor.css +75 -29
  3. package/dist/assets/style.css +75 -29
  4. package/dist/{color-swatch-CFIuSPcO.js → color-swatch-BEBLRxTy.js} +1 -1
  5. package/dist/components/animated-visibility/animated-visibility.js +1 -1
  6. package/dist/components/base-control/base-control.js +1 -1
  7. package/dist/components/base-control/container.js +1 -1
  8. package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
  9. package/dist/components/button/button.js +1 -1
  10. package/dist/components/checkbox/checkbox.js +1 -1
  11. package/dist/components/color-pickers/color-picker.js +2 -2
  12. package/dist/components/color-pickers/color-swatch.js +2 -2
  13. package/dist/components/color-pickers/gradient-editor.js +3 -3
  14. package/dist/components/color-pickers/solid-color-picker.js +4 -3
  15. package/dist/components/component-toggle/component-toggle.js +1 -1
  16. package/dist/components/container-panel/container-panel.js +1 -1
  17. package/dist/components/draggable/draggable-handle.js +1 -1
  18. package/dist/components/draggable/draggable.js +2 -2
  19. package/dist/components/draggable-list/draggable-list-item.js +1 -1
  20. package/dist/components/expandable/expandable.js +1 -1
  21. package/dist/components/index.js +1 -1
  22. package/dist/components/input-field/input-field.js +3 -3
  23. package/dist/components/layout/hstack.js +1 -1
  24. package/dist/components/layout/vstack.js +1 -1
  25. package/dist/components/link-input/link-input.js +12 -7
  26. package/dist/components/matrix-align/matrix-align.js +1 -1
  27. package/dist/components/menu/menu.js +1 -1
  28. package/dist/components/modal/modal.js +1 -1
  29. package/dist/components/notice/notice.js +1 -1
  30. package/dist/components/number-picker/number-picker.js +3 -3
  31. package/dist/components/options-panel/options-panel.js +1 -1
  32. package/dist/components/placeholders/file-picker-shell.js +1 -1
  33. package/dist/components/popover/popover.js +1 -1
  34. package/dist/components/radio/radio.js +5 -5
  35. package/dist/components/repeater/repeater-item.js +1 -1
  36. package/dist/components/repeater/repeater.js +2 -2
  37. package/dist/components/responsive/mini-responsive.js +1 -1
  38. package/dist/components/responsive/responsive-legacy.js +1 -1
  39. package/dist/components/responsive/responsive.js +1 -1
  40. package/dist/components/rich-label/rich-label.js +1 -1
  41. package/dist/components/select/async-multi-select.js +7 -6
  42. package/dist/components/select/async-select.js +7 -6
  43. package/dist/components/select/multi-select.js +9 -8
  44. package/dist/components/select/shared.js +2 -2
  45. package/dist/components/select/single-select.js +7 -6
  46. package/dist/components/slider/column-config-slider.js +8 -5
  47. package/dist/components/smart-image/smart-image.js +2 -2
  48. package/dist/components/spacer/spacer.js +1 -1
  49. package/dist/components/tabs/tabs.js +1 -1
  50. package/dist/components/toggle/toggle.js +1 -1
  51. package/dist/components/tooltip/tooltip.js +1 -1
  52. package/dist/{general-lYMgCPqJ.js → general-ChNQK6O9.js} +4 -4
  53. package/dist/icons/spinner.js +1 -1
  54. package/dist/index.js +1 -1
  55. package/dist/utilities/general.js +5 -5
  56. package/dist/utilities/hash.js +9 -0
  57. package/dist/utilities/index.js +14 -8
  58. package/dist/workers/image-analysis.worker.js +1 -1
  59. package/package.json +6 -6
  60. package/dist/lite-DVmmD_-j.js +0 -7
  61. package/dist/{shared-DwjRce5e.js → shared-DOxXagm0.js} +1 -1
@@ -13,7 +13,7 @@ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-BQ
13
13
  import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-D2fUHql3.js";
14
14
  import { ButtonGroup, Button } from "../button/button.js";
15
15
  import { icons } from "../../icons/icons.js";
16
- import { c as clsx } from "../../lite-DVmmD_-j.js";
16
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
17
17
  import { BaseControl } from "../base-control/base-control.js";
18
18
  import { c as cva } from "../../index-BHpUy2Ix.js";
19
19
  const $b91743d66a0ed188$export$b414a48cf5dcbc11 = /* @__PURE__ */ createContext(null);
@@ -277,10 +277,10 @@ const NumberPicker = ({
277
277
  /* @__PURE__ */ jsx(
278
278
  $3985021b0ad6602f$export$f5b8910cec6cf069,
279
279
  {
280
- className: 'es:tracking-wide es:font-variation-["wdth"_84,"YTLC"_520,"wght"_325,"slnt"_0,"YTFI"_788] es:placeholder-shown:font-variation-["wdth"_100,"YTLC"_500,"wght"_250,"slnt"_-8] es:any-focus:outline-hidden! es:p-px es:border-none! es:shadow-none! es:bg-transparent',
280
+ className: 'es:font-variation-["wdth"_84,"YTLC"_520,"wght"_325,"slnt"_0,"YTFI"_788] es:placeholder-shown:font-variation-["wdth"_100,"YTLC"_500,"wght"_250,"slnt"_-8] es:any-focus:outline-hidden! es:p-px es:border-none! es:shadow-none! es:bg-transparent es:text-13!',
281
281
  placeholder,
282
282
  style: {
283
- width: fixedWidth ? `calc(${fixedWidth}ch + 2px)` : `calc(${min < 0 ? "0.75ch + " : "0.5ch + "}${(max ?? 1e3)?.toString()?.length} * 1ch)`
283
+ width: fixedWidth ? `calc(${fixedWidth}ch + 2px)` : `calc(${min < 0 ? "1ch + " : "0.75ch + "}${Math.max((max ?? 1e3)?.toString()?.length, (placeholder ?? "")?.length)} * 1ch)`
284
284
  }
285
285
  }
286
286
  ),
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { c as clsx } from "../../lite-DVmmD_-j.js";
2
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
3
3
  import { RichLabel } from "../rich-label/rich-label.js";
4
4
  import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-BmRX4BRL.js";
5
5
  import { cloneElement } from "react";
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { c as clsx } from "../../lite-DVmmD_-j.js";
2
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
3
3
  import { icons } from "../../icons/icons.js";
4
4
  import "react";
5
5
  import "../../react-jsx-parser.min-B_hvYYa1.js";
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d, g as $de32f1b87079253c$export$3ddf2d174ce01153, h as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../../Dialog-D8bjn-nh.js";
3
- import { c as clsx } from "../../lite-DVmmD_-j.js";
3
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
4
4
  import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
5
5
  import { Button } from "../button/button.js";
6
6
  /**
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-D8a3eYb-.js";
3
3
  import { a as $b6c3ddc6086f204d$export$d7b12c4107be0d61, $ as $b6c3ddc6086f204d$export$a98f0dcb43a68a25 } from "../../RadioGroup-BVFvITWO.js";
4
- import { c as clsx } from "../../lite-DVmmD_-j.js";
4
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
5
5
  import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
6
6
  import { RichLabel } from "../rich-label/rich-label.js";
7
7
  import { BaseControl } from "../base-control/base-control.js";
@@ -118,12 +118,12 @@ const RadioButton = (props) => {
118
118
  compoundVariants: [
119
119
  {
120
120
  design: ["segmented", "segmentedHorizontal"],
121
- class: ["es:px-3 es:py-2 es:w-fill es:inset-ring", "es:transition-plus es:duration-300 es:ease-spring-snappy", !flat && "es:shadow-xs es:shadow-black/5"]
121
+ class: ["es:px-3 es:py-2 es:w-fill es:inset-ring es:min-h-13", "es:transition-plus es:duration-300", !flat && "es:shadow-xs es:shadow-black/5"]
122
122
  },
123
123
  {
124
124
  checked: false,
125
125
  design: ["segmented", "segmentedHorizontal"],
126
- class: "es:bg-secondary-50 es:inset-ring-secondary-200/50 es:rounded-md es:hover:rounded-xl"
126
+ class: ["es:bg-white es:bg-linear-to-b es:from-secondary-50/75 es:to-secondary-100/50 es:from-25% es:inset-ring-secondary-200/50", "es:rounded-md es:hover:rounded-18"]
127
127
  },
128
128
  {
129
129
  checked: true,
@@ -131,8 +131,8 @@ const RadioButton = (props) => {
131
131
  class: "es:bg-surface-100 es:text-accent-900 es:inset-ring-accent-600/10 es:rounded-3xl"
132
132
  },
133
133
  //
134
- { design: "segmented", checked: false, class: "es:first:rounded-t-xl es:last:rounded-b-xl es:before-current:rounded-b-xl es:after-current:rounded-t-xl" },
135
- { design: "segmentedHorizontal", checked: false, class: "es:first:rounded-l-xl es:last:rounded-r-xl es:before-current:rounded-l-xl es:after-current:rounded-r-xl" }
134
+ { design: "segmented", checked: false, class: "es:first:rounded-t-2xl es:last:rounded-b-2xl es:before-current:rounded-b-2xl es:after-current:rounded-t-2xl" },
135
+ { design: "segmentedHorizontal", checked: false, class: "es:first:rounded-l-2xl es:last:rounded-r-2xl es:before-current:rounded-r-2xl es:after-current:rounded-l-2xl" }
136
136
  ],
137
137
  defaultVariants: {
138
138
  design: "default",
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Button } from "../button/button.js";
3
3
  import { Menu, MenuSeparator, MenuItem } from "../menu/menu.js";
4
4
  import { icons } from "../../icons/icons.js";
5
- import { c as clsx } from "../../lite-DVmmD_-j.js";
5
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
6
6
  import { useContext } from "react";
7
7
  import { Expandable } from "../expandable/expandable.js";
8
8
  import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
@@ -6,7 +6,7 @@ import { icons } from "../../icons/icons.js";
6
6
  import { BaseControl } from "../base-control/base-control.js";
7
7
  import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
8
8
  import { RepeaterContext } from "./repeater-context.js";
9
- import { c as clsx } from "../../lite-DVmmD_-j.js";
9
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
10
10
  import { L as List, a as arrayRemove, b as arrayMove } from "../../List-BGHOoFf0.js";
11
11
  import { Menu, MenuItem, MenuSeparator } from "../menu/menu.js";
12
12
  /**
@@ -215,7 +215,7 @@ const Repeater = (props) => {
215
215
  allOpen,
216
216
  setAllOpen,
217
217
  setOpenItems,
218
- isItemOpen: openItems[item.id] ?? allOpen,
218
+ isItemOpen: openItems?.[item?.id] ?? allOpen,
219
219
  noDuplicateButton
220
220
  },
221
221
  children: children({
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { cloneElement } from "react";
3
3
  import { DecorativeTooltip } from "../tooltip/tooltip.js";
4
- import { c as clsx } from "../../lite-DVmmD_-j.js";
4
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
5
5
  import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
6
6
  import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
7
7
  import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { DecorativeTooltip } from "../tooltip/tooltip.js";
4
- import { c as clsx } from "../../lite-DVmmD_-j.js";
4
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
5
5
  import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
6
6
  import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
7
7
  import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { DecorativeTooltip } from "../tooltip/tooltip.js";
4
- import { c as clsx } from "../../lite-DVmmD_-j.js";
4
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
5
5
  import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
6
6
  import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
7
7
  import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
@@ -1,5 +1,5 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { c as clsx } from "../../lite-DVmmD_-j.js";
2
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
3
3
  /**
4
4
  * Component that displays a label, with an optional icon and subtitle.
5
5
  *
@@ -8,18 +8,19 @@ import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-CNNk
8
8
  import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-D8a3eYb-.js";
9
9
  import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../ListBox-Dd37zMvs.js";
10
10
  import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-D8bjn-nh.js";
11
- import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-DwjRce5e.js";
11
+ import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-DOxXagm0.js";
12
12
  import { useRef, cloneElement } from "react";
13
13
  import { icons } from "../../icons/icons.js";
14
14
  import "../../react-jsx-parser.min-B_hvYYa1.js";
15
15
  import { Spinner } from "../../icons/spinner.js";
16
16
  import { RichLabel } from "../rich-label/rich-label.js";
17
17
  import { unescapeHTML } from "../../utilities/text-helpers.js";
18
+ import { randomId } from "../../utilities/hash.js";
19
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
18
20
  import { c as cva } from "../../index-BHpUy2Ix.js";
19
21
  import { TriggeredPopover } from "../popover/popover.js";
20
22
  import { DraggableList } from "../draggable-list/draggable-list.js";
21
23
  import { DraggableListItem } from "../draggable-list/draggable-list-item.js";
22
- import { c as clsx } from "../../clsx-DgYk2OaC.js";
23
24
  import { $ as $f86e6c1ec7da6ebb$export$bc3384a35de93d66 } from "../../useAsyncList-D52mQcrH.js";
24
25
  /**
25
26
  * Async multi-select menu.
@@ -432,9 +433,9 @@ const AsyncMultiSelect = (props) => {
432
433
  {
433
434
  placeholder: __("Search...", "eightshift-ui-components"),
434
435
  className: clsx(
435
- "es:peer es:size-full es:h-9.5 es:outline-hidden es:pl-3.5 es:pr-9 es:shadow-none es:text-13 es:placeholder:text-surface-500 es:[&::-webkit-search-cancel-button]:hidden",
436
- "es:bg-accent-900/8 es:m-1.5 es:rounded-3xl es:border-none",
437
- "es:inset-ring es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20",
436
+ "es:peer es:size-full es:h-9.5 es:outline-hidden! es:pl-3.5 es:pr-9 es:shadow-none! es:text-13! es:placeholder:text-surface-500 es:[&::-webkit-search-cancel-button]:hidden",
437
+ "es:bg-accent-900/8 es:m-1.5 es:rounded-3xl es:border-none!",
438
+ "es:inset-ring! es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20",
438
439
  "es:text-accent-950 es:placeholder:text-accent-700/50",
439
440
  "es:transition"
440
441
  )
@@ -487,7 +488,7 @@ const AsyncMultiSelect = (props) => {
487
488
  return /* @__PURE__ */ jsxs(
488
489
  OptionItemBase,
489
490
  {
490
- id: item?.value,
491
+ id: item?.value ?? randomId(8),
491
492
  className: item?.className,
492
493
  selectIndicator: true,
493
494
  children: [
@@ -7,15 +7,16 @@ import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-CNNk
7
7
  import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-D8a3eYb-.js";
8
8
  import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../ListBox-Dd37zMvs.js";
9
9
  import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-D8bjn-nh.js";
10
- import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-DwjRce5e.js";
10
+ import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-DOxXagm0.js";
11
11
  import { useRef, cloneElement } from "react";
12
12
  import { icons } from "../../icons/icons.js";
13
13
  import "../../react-jsx-parser.min-B_hvYYa1.js";
14
14
  import { Spinner } from "../../icons/spinner.js";
15
15
  import { RichLabel } from "../rich-label/rich-label.js";
16
16
  import { unescapeHTML } from "../../utilities/text-helpers.js";
17
- import { c as cva } from "../../index-BHpUy2Ix.js";
17
+ import { randomId } from "../../utilities/hash.js";
18
18
  import { c as clsx } from "../../clsx-DgYk2OaC.js";
19
+ import { c as cva } from "../../index-BHpUy2Ix.js";
19
20
  import { $ as $f86e6c1ec7da6ebb$export$bc3384a35de93d66 } from "../../useAsyncList-D52mQcrH.js";
20
21
  /**
21
22
  * Select menu with async loading.
@@ -354,9 +355,9 @@ const AsyncSelect = (props) => {
354
355
  {
355
356
  placeholder: __("Search...", "eightshift-ui-components"),
356
357
  className: clsx(
357
- "es:peer es:size-full es:h-9.5 es:outline-hidden es:pl-3.5 es:pr-9 es:shadow-none es:text-13 es:placeholder:text-surface-500 es:[&::-webkit-search-cancel-button]:hidden",
358
- "es:bg-accent-900/8 es:m-1.5 es:rounded-3xl es:border-none",
359
- "es:inset-ring es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20",
358
+ "es:peer es:size-full es:h-9.5 es:outline-hidden! es:pl-3.5 es:pr-9 es:shadow-none! es:text-13! es:placeholder:text-surface-500 es:[&::-webkit-search-cancel-button]:hidden",
359
+ "es:bg-accent-900/8 es:m-1.5 es:rounded-3xl es:border-none!",
360
+ "es:inset-ring! es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20",
360
361
  "es:text-accent-950 es:placeholder:text-accent-700/50",
361
362
  "es:transition"
362
363
  )
@@ -407,7 +408,7 @@ const AsyncSelect = (props) => {
407
408
  return /* @__PURE__ */ jsxs(
408
409
  OptionItemBase,
409
410
  {
410
- id: item?.value,
411
+ id: item?.value ?? randomId(8),
411
412
  className: item?.className,
412
413
  selectIndicator: true,
413
414
  children: [
@@ -8,16 +8,17 @@ import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-CNNk
8
8
  import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-D8a3eYb-.js";
9
9
  import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../ListBox-Dd37zMvs.js";
10
10
  import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-D8bjn-nh.js";
11
- import { g as getValue, $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-DwjRce5e.js";
11
+ import { g as getValue, $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-DOxXagm0.js";
12
12
  import { useRef, cloneElement, isValidElement } from "react";
13
13
  import { icons } from "../../icons/icons.js";
14
14
  import "../../react-jsx-parser.min-B_hvYYa1.js";
15
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
15
16
  import { RichLabel } from "../rich-label/rich-label.js";
16
17
  import { c as cva } from "../../index-BHpUy2Ix.js";
17
18
  import { TriggeredPopover } from "../popover/popover.js";
18
19
  import { DraggableList } from "../draggable-list/draggable-list.js";
19
20
  import { DraggableListItem } from "../draggable-list/draggable-list-item.js";
20
- import { c as clsx } from "../../clsx-DgYk2OaC.js";
21
+ import { randomId } from "../../utilities/hash.js";
21
22
  import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../useFilter-bhxeEDg8.js";
22
23
  /**
23
24
  * Multi-select menu.
@@ -307,7 +308,7 @@ const MultiSelect = (props) => {
307
308
  /* @__PURE__ */ jsx(
308
309
  DraggableList,
309
310
  {
310
- items: value,
311
+ items: simpleValue ? value.map((item) => options.find((option) => option.value === item)) : value,
311
312
  onChange: (value2) => {
312
313
  handleSelectionChange(new Set(value2?.map((item) => item?.value ?? item)));
313
314
  },
@@ -380,9 +381,9 @@ const MultiSelect = (props) => {
380
381
  {
381
382
  placeholder: __("Search...", "eightshift-ui-components"),
382
383
  className: clsx(
383
- "es:peer es:size-full es:h-9.5 es:outline-hidden es:pl-3.5 es:pr-9 es:shadow-none es:text-13 es:placeholder:text-surface-500 es:[&::-webkit-search-cancel-button]:hidden",
384
- "es:bg-accent-900/8 es:m-1.5 es:rounded-3xl es:border-none",
385
- "es:inset-ring es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20",
384
+ "es:peer es:size-full es:h-9.5 es:outline-hidden! es:pl-3.5 es:pr-9 es:shadow-none! es:text-13! es:placeholder:text-surface-500 es:[&::-webkit-search-cancel-button]:hidden",
385
+ "es:bg-accent-900/8 es:m-1.5 es:rounded-3xl es:border-none!",
386
+ "es:inset-ring! es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20",
386
387
  "es:text-accent-950 es:placeholder:text-accent-700/50",
387
388
  "es:transition"
388
389
  )
@@ -427,7 +428,7 @@ const MultiSelect = (props) => {
427
428
  return /* @__PURE__ */ jsxs(
428
429
  OptionItemBase,
429
430
  {
430
- id: item.value,
431
+ id: item?.value ?? randomId(8),
431
432
  className: item?.className,
432
433
  selectIndicator: true,
433
434
  children: [
@@ -472,7 +473,7 @@ const MultiSelect = (props) => {
472
473
  return /* @__PURE__ */ jsxs(
473
474
  OptionItemBase,
474
475
  {
475
- id: item.value,
476
+ id: item?.value ?? randomId(8),
476
477
  className: item?.className,
477
478
  selectIndicator: true,
478
479
  children: [
@@ -2,12 +2,12 @@ import "react/jsx-runtime";
2
2
  import "../../default-i18n-CnQeC5Pl.js";
3
3
  import "../../Button-BXjXzdW_.js";
4
4
  import "../../ListBox-Dd37zMvs.js";
5
- import { O, S, g, m } from "../../shared-DwjRce5e.js";
5
+ import { O, S, g, m } from "../../shared-DOxXagm0.js";
6
6
  import "../../icons/icons.js";
7
7
  import "react";
8
8
  import "../../react-jsx-parser.min-B_hvYYa1.js";
9
- import "../animated-visibility/animated-visibility.js";
10
9
  import "../../clsx-DgYk2OaC.js";
10
+ import "../animated-visibility/animated-visibility.js";
11
11
  export {
12
12
  O as OptionItemBase,
13
13
  S as SelectClearButton,
@@ -7,13 +7,14 @@ import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-CNNk
7
7
  import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-D8a3eYb-.js";
8
8
  import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../ListBox-Dd37zMvs.js";
9
9
  import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-D8bjn-nh.js";
10
- import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-DwjRce5e.js";
10
+ import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-DOxXagm0.js";
11
11
  import { useRef, cloneElement } from "react";
12
12
  import { icons } from "../../icons/icons.js";
13
13
  import "../../react-jsx-parser.min-B_hvYYa1.js";
14
- import { c as clsx } from "../../lite-DVmmD_-j.js";
14
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
15
15
  import { RichLabel } from "../rich-label/rich-label.js";
16
16
  import { c as cva } from "../../index-BHpUy2Ix.js";
17
+ import { randomId } from "../../utilities/hash.js";
17
18
  import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../useFilter-bhxeEDg8.js";
18
19
  /**
19
20
  * Select menu.
@@ -301,9 +302,9 @@ const Select = (props) => {
301
302
  {
302
303
  placeholder: __("Search...", "eightshift-ui-components"),
303
304
  className: clsx(
304
- "es:peer es:size-full es:h-9.5 es:outline-hidden es:pl-3.5 es:pr-9 es:shadow-none es:text-13 es:placeholder:text-surface-500 es:[&::-webkit-search-cancel-button]:hidden",
305
- "es:bg-accent-900/8 es:m-1.5 es:rounded-3xl es:border-none",
306
- "es:inset-ring es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20",
305
+ "es:peer es:size-full es:h-9.5 es:outline-hidden! es:pl-3.5 es:pr-9 es:shadow-none! es:text-13! es:placeholder:text-surface-500 es:[&::-webkit-search-cancel-button]:hidden",
306
+ "es:bg-accent-900/8 es:m-1.5 es:rounded-3xl es:border-none!",
307
+ "es:inset-ring! es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20",
307
308
  "es:text-accent-950 es:placeholder:text-accent-700/50",
308
309
  "es:transition"
309
310
  )
@@ -348,7 +349,7 @@ const Select = (props) => {
348
349
  return /* @__PURE__ */ jsxs(
349
350
  OptionItemBase,
350
351
  {
351
- id: item.value,
352
+ id: item?.value ?? randomId(8),
352
353
  className: item?.className,
353
354
  selectIndicator: true,
354
355
  children: [
@@ -141,8 +141,8 @@ const ColumnConfigSlider = (props) => {
141
141
  "es:transition es:duration-300",
142
142
  !flat && !disabled && "es:shadow-xs es:shadow-black/5",
143
143
  "es:mx-1.25",
144
- value[0] === 1 && "es:ml-4.25",
145
- value[1] === columns && "es:mr-4.25",
144
+ value[0] === 1 && "es:ml-1.75",
145
+ value[1] === columns && "es:mr-1.75",
146
146
  !disabled && [
147
147
  "es:bg-accent-500 es:bg-linear-to-b es:from-accent-100/15 es:to-accent-100/0 es:from-25%",
148
148
  "es:inset-ring es:inset-ring-accent-700/10",
@@ -165,8 +165,8 @@ const ColumnConfigSlider = (props) => {
165
165
  "es:transition es:duration-300 es:ease-spring-smooth",
166
166
  marker >= value[0] - 1 && marker < value[1] ? "es:text-accent-900" : "es:text-surface-400",
167
167
  disabled && "es:opacity-0",
168
- !disableOffset && index === 0 && value[0] === 2 && "es:-translate-x-0.25",
169
- !disableWidth && index === columns - 1 && value[1] === columns - 1 && "es:translate-x-0.25",
168
+ !disableOffset && index === 0 && value[0] === 2 && "es:-translate-x-px",
169
+ !disableWidth && index === columns - 1 && value[1] === columns - 1 && "es:translate-x-px",
170
170
  !disableOffset && index === 0 && value[0] === 1 && "es:opacity-0 es:scale-50",
171
171
  !disableWidth && index === columns - 1 && value[1] === columns && "es:opacity-0 es:scale-50"
172
172
  ),
@@ -221,7 +221,10 @@ const ColumnConfigSlider = (props) => {
221
221
  !disabled && "es:hover:not-dragging:cursor-grab",
222
222
  i === 0 && disableOffset && "es:hidden",
223
223
  i === 1 && disableWidth && "es:hidden",
224
- "es:justify-self-center",
224
+ i === 0 && state.values[0] === 1 && "es:justify-self-start",
225
+ i === 0 && state.values[0] > 1 && "es:justify-self-center",
226
+ i === 1 && state.values[1] < columns && "es:justify-self-center",
227
+ i === 1 && state.values[1] === columns && "es:justify-self-end",
225
228
  !flat && !disabled && "es:shadow-xs es:shadow-black/5"
226
229
  ),
227
230
  style: {
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
3
- import { c as clsx } from "../../lite-DVmmD_-j.js";
3
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
4
4
  import { useState, useRef, useEffect, cloneElement } from "react";
5
5
  import { icons } from "../../icons/icons.js";
6
6
  import "../../react-jsx-parser.min-B_hvYYa1.js";
@@ -8,7 +8,7 @@ import { DecorativeTooltip } from "../tooltip/tooltip.js";
8
8
  import { useImageAnalysisWorker } from "../../utilities/web-workers.js";
9
9
  import workerInline from "./worker-inline.js";
10
10
  import { cyrb64Hash } from "../../utilities/hash.js";
11
- import { a as analyzeImage } from "../../general-lYMgCPqJ.js";
11
+ import { b as analyzeImage } from "../../general-ChNQK6O9.js";
12
12
  /**
13
13
  * @typedef {Object} CustomImageProps
14
14
  * @property {JSX.Element} [props.renderError] - Component to render if image analysis fails. `(error) => JSX:Element`.
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { c as clsx } from "../../lite-DVmmD_-j.js";
2
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
3
3
  import { RichLabel } from "../rich-label/rich-label.js";
4
4
  /**
5
5
  * A simple spacer/divider component, with optional text or icon.
@@ -16,7 +16,7 @@ import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRi
16
16
  import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "../../useSingleSelectListState-BBTu4shO.js";
17
17
  import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
18
18
  import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
19
- import { c as clsx } from "../../lite-DVmmD_-j.js";
19
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
20
20
  import { c as cva } from "../../index-BHpUy2Ix.js";
21
21
  import { Notice } from "../notice/notice.js";
22
22
  import { RichLabel } from "../rich-label/rich-label.js";
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-D8a3eYb-.js";
3
3
  import { Switch } from "./switch.js";
4
4
  import { RichLabel } from "../rich-label/rich-label.js";
5
- import { c as clsx } from "../../lite-DVmmD_-j.js";
5
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
6
6
  /**
7
7
  * A toggle switch with a label and optional icon and subtitle.
8
8
  *
@@ -6,7 +6,7 @@ import { w as $6179b936705e76d3$export$ae780daf29e6d456, $ as $f645667febf57a63$
6
6
  import $dbSRa$react__default, { useContext, useState, useMemo, useRef, useEffect, forwardRef, createContext } from "react";
7
7
  import { a as $96b38030c423d352$export$9fc1347d4195ccb3 } from "../../PortalProvider-CHPnqDSH.js";
8
8
  import { $ as $dbSRa$reactdom } from "../../index-oFgxU4zs.js";
9
- import { c as clsx } from "../../lite-DVmmD_-j.js";
9
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
10
10
  const $f57aed4a881a3485$var$Context = /* @__PURE__ */ $dbSRa$react__default.createContext(null);
11
11
  function $f57aed4a881a3485$export$178405afcd8c5eb(props) {
12
12
  let { children } = props;
@@ -4367,10 +4367,10 @@ const analyzeImageData = ({ buffer, imageData, width, height, settings, skipTran
4367
4367
  };
4368
4368
  export {
4369
4369
  FLOAT_RGBA as F,
4370
- analyzeImage as a,
4371
- analyzeImageAsync as b,
4372
- checkTransparency as c,
4373
- analyzeImageData as d,
4370
+ analyzeImageData as a,
4371
+ analyzeImage as b,
4372
+ analyzeImageAsync as c,
4373
+ checkTransparency as d,
4374
4374
  floatBufferFromCanvas as f,
4375
4375
  getFileExtension as g,
4376
4376
  isColorDark as i,
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { c as clsx } from "../lite-DVmmD_-j.js";
2
+ import { c as clsx } from "../clsx-DgYk2OaC.js";
3
3
  /**
4
4
  * A simple loading indicator.
5
5
  *
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { Button, ButtonGroup } from "./components/button/button.js";
5
5
  import { Checkbox } from "./components/checkbox/checkbox.js";
6
6
  import { ComponentToggle } from "./components/component-toggle/component-toggle.js";
7
7
  import { ContainerPanel } from "./components/container-panel/container-panel.js";
8
- import { C } from "./color-swatch-CFIuSPcO.js";
8
+ import { C } from "./color-swatch-BEBLRxTy.js";
9
9
  import { ColorPicker } from "./components/color-pickers/color-picker.js";
10
10
  import { ColumnConfigSlider, ColumnConfigSliderOutput } from "./components/slider/column-config-slider.js";
11
11
  import { Container, ContainerGroup } from "./components/base-control/container.js";
@@ -1,10 +1,10 @@
1
1
  import "./hash.js";
2
- import { a, b, d, c, g, i } from "../general-lYMgCPqJ.js";
2
+ import { b, c, a, d, g, i } from "../general-ChNQK6O9.js";
3
3
  export {
4
- a as analyzeImage,
5
- b as analyzeImageAsync,
6
- d as analyzeImageData,
7
- c as checkTransparency,
4
+ b as analyzeImage,
5
+ c as analyzeImageAsync,
6
+ a as analyzeImageData,
7
+ d as checkTransparency,
8
8
  g as getFileExtension,
9
9
  i as isColorDark
10
10
  };
@@ -24,7 +24,16 @@ const cyrb64Hash = (str, seed = 0) => {
24
24
  const [h2, h1] = cyrb64(str, seed);
25
25
  return h2.toString(36).padStart(7, "0") + h1.toString(36).padStart(7, "0");
26
26
  };
27
+ const randomId = (length) => {
28
+ const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
29
+ let result = "";
30
+ for (let i = 0; i < length; i++) {
31
+ result += chars.charAt(Math.floor(Math.random() * chars.length));
32
+ }
33
+ return result;
34
+ };
27
35
  export {
28
36
  cyrb64Hash,
37
+ randomId,
29
38
  simpleHash
30
39
  };
@@ -2,17 +2,22 @@ import { arrayMoveMultiple, fixIds } from "./array-helpers.js";
2
2
  import { camelCase, has, isEmpty, isEqual, isObject, isPlainObject, isString, kebabCase, lowerFirst, pascalCase, snakeCase, upperFirst } from "./es-dash.js";
3
3
  import { truncate, truncateEnd, truncateMiddle, unescapeHTML } from "./text-helpers.js";
4
4
  import { debounce, throttle } from "./debounce-throttle.js";
5
- import { a, b, d, c, g, i } from "../general-lYMgCPqJ.js";
6
- import { c as c2 } from "../lite-DVmmD_-j.js";
7
- import { cyrb64Hash, simpleHash } from "./hash.js";
5
+ import { b, c, a, d, g, i } from "../general-ChNQK6O9.js";
6
+ import { c as c2 } from "../clsx-DgYk2OaC.js";
7
+ import { cyrb64Hash, randomId, simpleHash } from "./hash.js";
8
+ function clsx() {
9
+ for (var t, r = 0, e = "", n = arguments.length; r < n; r++) (t = arguments[r]) && "string" == typeof t && (e += (e && " ") + t);
10
+ return e;
11
+ }
8
12
  export {
9
- a as analyzeImage,
10
- b as analyzeImageAsync,
11
- d as analyzeImageData,
13
+ b as analyzeImage,
14
+ c as analyzeImageAsync,
15
+ a as analyzeImageData,
12
16
  arrayMoveMultiple,
13
17
  camelCase,
14
- c as checkTransparency,
15
- c2 as clsx,
18
+ d as checkTransparency,
19
+ clsx,
20
+ c2 as clsxFull,
16
21
  cyrb64Hash,
17
22
  debounce,
18
23
  fixIds,
@@ -27,6 +32,7 @@ export {
27
32
  kebabCase,
28
33
  lowerFirst,
29
34
  pascalCase,
35
+ randomId,
30
36
  simpleHash,
31
37
  snakeCase,
32
38
  throttle,
@@ -1,4 +1,4 @@
1
- import { f as floatBufferFromCanvas, d as analyzeImageData, F as FLOAT_RGBA } from "../general-lYMgCPqJ.js";
1
+ import { f as floatBufferFromCanvas, a as analyzeImageData, F as FLOAT_RGBA } from "../general-ChNQK6O9.js";
2
2
  self.onmessage = async (event) => {
3
3
  const { imageBitmap, settings } = event.data;
4
4
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eightshift/ui-components",
3
- "version": "6.0.2",
3
+ "version": "6.0.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -62,10 +62,10 @@
62
62
  "@react-stately/collections": "^3.12.8",
63
63
  "@stylistic/eslint-plugin-js": "^4.4.1",
64
64
  "@tailwindcss/vite": "^4.1.17",
65
- "@thi.ng/color": "^5.8.2",
66
- "@thi.ng/pixel": "^7.5.16",
67
- "@thi.ng/pixel-analysis": "^2.0.17",
68
- "@thi.ng/pixel-dominant-colors": "^2.0.21",
65
+ "@thi.ng/color": "^5.8.3",
66
+ "@thi.ng/pixel": "^7.5.17",
67
+ "@thi.ng/pixel-analysis": "^2.0.18",
68
+ "@thi.ng/pixel-dominant-colors": "^2.0.22",
69
69
  "@types/react": "^18.3.27",
70
70
  "@types/react-dom": "^18.3.7",
71
71
  "@vitejs/plugin-react-swc": "^4.2.2",
@@ -76,7 +76,7 @@
76
76
  "css-gradient-parser": "^0.0.18",
77
77
  "eslint": "^9.39.1",
78
78
  "eslint-config-prettier": "^10.1.8",
79
- "eslint-plugin-jsdoc": "^61.4.0",
79
+ "eslint-plugin-jsdoc": "^61.4.1",
80
80
  "eslint-plugin-prettier": "^5.5.4",
81
81
  "glob": "^13.0.0",
82
82
  "globals": "^16.5.0",
@@ -1,7 +0,0 @@
1
- function clsx() {
2
- for (var t, r = 0, e = "", n = arguments.length; r < n; r++) (t = arguments[r]) && "string" == typeof t && (e += (e && " ") + t);
3
- return e;
4
- }
5
- export {
6
- clsx as c
7
- };