@eightshift/ui-components 6.0.12 → 6.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 (84) hide show
  1. package/dist/{Button-JRIu2BnS.js → Button-BTCA69Lt.js} +9 -9
  2. package/dist/{Dialog-Dd1yqNus.js → Dialog-BbNWvB5_.js} +76 -57
  3. package/dist/{FieldError-DmVwL6Dj.js → FieldError-BPG0hKfB.js} +2 -2
  4. package/dist/{FocusScope-Dri1oBcH.js → FocusScope-BxT4xfe9.js} +6 -7
  5. package/dist/{Heading-eA6LXIKB.js → Heading-CY-_gt-U.js} +2 -2
  6. package/dist/{Input-Cuw9UbNb.js → Input-Wrnm2nxy.js} +8 -8
  7. package/dist/{Label-DPWyf-gp.js → Label-BDlf9vIY.js} +3 -2
  8. package/dist/{ListBox-DT1sFY3e.js → ListBox-yHUyUAAH.js} +28 -26
  9. package/dist/{OverlayArrow-DVJTTfZM.js → OverlayArrow-NzRV9wsn.js} +7 -7
  10. package/dist/{RadioGroup-Cp5cdBI_.js → RadioGroup-BFDueqHz.js} +14 -14
  11. package/dist/{SearchField-CLhr5PGZ.js → SearchField-CmRhtrQf.js} +12 -12
  12. package/dist/{SelectionManager-DbBiF5M8.js → SelectionManager-VgpR-1Ri.js} +33 -29
  13. package/dist/{Slider-CZV3HhHY.js → Slider-Bl5G0ZHE.js} +16 -15
  14. package/dist/{Text-Dae33gHp.js → Text-CjFEHSfr.js} +3 -2
  15. package/dist/{VisuallyHidden-eaCBtXhE.js → VisuallyHidden-DXVaR_RC.js} +2 -2
  16. package/dist/{animation-DY7CNkr6.js → animation-B2sADg3I.js} +1 -1
  17. package/dist/assets/style-admin.css +1438 -1448
  18. package/dist/assets/style-editor.css +1438 -1448
  19. package/dist/assets/style.css +1438 -1448
  20. package/dist/assets/wp-overrides/fix-label-text-case.css +7 -7
  21. package/dist/assets/wp-overrides/make-block-messages-nicer.css +36 -36
  22. package/dist/assets/wp-overrides/restyle-tooltips.css +56 -56
  23. package/dist/assets/wp-overrides/round-corners.css +43 -43
  24. package/dist/{color-swatch-CZj0jHZd.js → color-swatch-DtaLObbd.js} +4 -4
  25. package/dist/components/base-control/base-control.js +1 -1
  26. package/dist/components/button/button.js +9 -9
  27. package/dist/components/checkbox/checkbox.js +10 -10
  28. package/dist/components/color-pickers/color-picker.js +1 -1
  29. package/dist/components/color-pickers/color-swatch.js +1 -1
  30. package/dist/components/color-pickers/gradient-editor.js +1 -1
  31. package/dist/components/color-pickers/solid-color-picker.js +26 -22
  32. package/dist/components/draggable/draggable.js +4 -5
  33. package/dist/components/expandable/expandable.js +8 -8
  34. package/dist/components/index.js +4 -2
  35. package/dist/components/input-field/input-field.js +10 -10
  36. package/dist/components/link-input/link-input.js +24 -23
  37. package/dist/components/matrix-align/matrix-align.js +1 -1
  38. package/dist/components/menu/menu.js +1 -1
  39. package/dist/components/modal/modal.js +19 -20
  40. package/dist/components/number-picker/number-picker.js +10 -10
  41. package/dist/components/options-panel/options-panel.js +1 -1
  42. package/dist/components/placeholders/file-picker-shell.js +48 -42
  43. package/dist/components/popover/popover.js +1 -1
  44. package/dist/components/radio/radio.js +2 -2
  45. package/dist/components/responsive/mini-responsive.js +1 -1
  46. package/dist/components/select/async-multi-select.js +7 -7
  47. package/dist/components/select/async-select.js +7 -7
  48. package/dist/components/select/multi-select.js +8 -8
  49. package/dist/components/select/shared.js +3 -3
  50. package/dist/components/select/single-select.js +8 -8
  51. package/dist/components/slider/column-config-slider.js +3 -3
  52. package/dist/components/slider/slider.js +3 -3
  53. package/dist/components/smart-image/image-analysis-worker-next.js +144 -0
  54. package/dist/components/smart-image/smart-image-next.js +294 -0
  55. package/dist/components/tabs/tabs.js +15 -14
  56. package/dist/components/toggle/switch.js +7 -7
  57. package/dist/components/toggle/toggle.js +1 -1
  58. package/dist/components/toggle-button/toggle-button.js +10 -7
  59. package/dist/components/tooltip/tooltip.js +5 -5
  60. package/dist/{context-DYYO3Ns3.js → context-iUFQCK8m.js} +1 -1
  61. package/dist/icons/icons.js +2 -2
  62. package/dist/index.js +3 -1
  63. package/dist/{proxy-CcjltLEW.js → proxy-CgLBbUpw.js} +4189 -3959
  64. package/dist/{shared-Bg9lx3pE.js → shared-DSTKnPjF.js} +27 -24
  65. package/dist/{textSelection-Cq_Br7RW.js → textSelection-D_BSbtab.js} +1 -1
  66. package/dist/{useButton-CeuyDay5.js → useButton-DofKjCES.js} +3 -3
  67. package/dist/{useEvent-DoWvho2u.js → useEvent-ADVZr4I3.js} +1 -1
  68. package/dist/{useFilter-DYtfYPua.js → useFilter-Cqw0-KoB.js} +1 -1
  69. package/dist/{useFocusRing-WEswknAY.js → useFocusRing-Ct2N5S1b.js} +10 -5
  70. package/dist/{useFormReset-BDF1K4E4.js → useFormReset-KT27O1en.js} +1 -1
  71. package/dist/{useFormValidation-Dqzjv4jX.js → useFormValidation-DwbcW-pN.js} +2 -2
  72. package/dist/{useHover-CG39Ci3A.js → useHover-VPZwb-1l.js} +15 -14
  73. package/dist/{useLabel--3fT2XKM.js → useLabel-DzXzKZZZ.js} +2 -2
  74. package/dist/{useLabels-vzdDMGCX.js → useLabels-D8O3gOdV.js} +1 -1
  75. package/dist/{useListState-Bya9g7W8.js → useListState-jHobZH6F.js} +1 -1
  76. package/dist/{useLocalizedStringFormatter-M3L6Ge2c.js → useLocalizedStringFormatter-CEDs0LsA.js} +1 -1
  77. package/dist/{useNumberField-D6lsi3Vu.js → useNumberField-CrLevIP3.js} +50 -40
  78. package/dist/{useNumberFormatter-BWOyCamK.js → useNumberFormatter-CG_IQXp9.js} +1 -1
  79. package/dist/{usePress-B9w0X4Ur.js → usePress-BPCda-AF.js} +13 -7
  80. package/dist/{useSingleSelectListState-D9SqGLJ0.js → useSingleSelectListState-sLg_MnX8.js} +2 -2
  81. package/dist/{useToggle-Deq2xxQV.js → useToggle-D0-c9HPm.js} +4 -4
  82. package/dist/{useToggleState-j3o1PvdS.js → useToggleState-BhJn-Dz7.js} +1 -1
  83. package/dist/{utils-HC9_3Crc.js → utils-Cr3pLd9c.js} +77 -38
  84. package/package.json +24 -24
@@ -1,16 +1,16 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import $dbSRa$react__default, { forwardRef, createContext, useRef } from "react";
3
3
  import "../../default-i18n-CnQeC5Pl.js";
4
- import { a as $a049562f99e7db0e$export$f9c6924e160136d1, b as $3985021b0ad6602f$export$37fb8590cf2c088c, c as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-Cuw9UbNb.js";
5
- import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DPWyf-gp.js";
6
- import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-JRIu2BnS.js";
7
- import { $ as $64fa3d84918910a7$export$29f1550f4b0d4415, d as $64fa3d84918910a7$export$fabf2dc03a41866e, e as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, f as $64fa3d84918910a7$export$ef03459518577ad4, g as $64fa3d84918910a7$export$4d86445c2cf5e3, h as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-HC9_3Crc.js";
8
- import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-DmVwL6Dj.js";
4
+ import { a as $a049562f99e7db0e$export$f9c6924e160136d1, b as $3985021b0ad6602f$export$37fb8590cf2c088c, c as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-Wrnm2nxy.js";
5
+ import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BDlf9vIY.js";
6
+ import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-BTCA69Lt.js";
7
+ import { $ as $64fa3d84918910a7$export$29f1550f4b0d4415, e as $64fa3d84918910a7$export$fabf2dc03a41866e, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, g as $64fa3d84918910a7$export$ef03459518577ad4, h as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, a as $64fa3d84918910a7$export$df3a06d6289f983e } from "../../utils-Cr3pLd9c.js";
8
+ import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-BPG0hKfB.js";
9
9
  import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu75_.js";
10
- import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-Dae33gHp.js";
10
+ import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-CjFEHSfr.js";
11
11
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-eGTqWSTd.js";
12
- import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-DYYO3Ns3.js";
13
- import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-D6lsi3Vu.js";
12
+ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-iUFQCK8m.js";
13
+ import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-CrLevIP3.js";
14
14
  import { ButtonGroup, Button } from "../button/button.js";
15
15
  import { icons } from "../../icons/icons.js";
16
16
  import { c as clsx } from "../../clsx-DgYk2OaC.js";
@@ -97,7 +97,7 @@ const $b91743d66a0ed188$export$63c5fa0b2fdccd2e = /* @__PURE__ */ forwardRef(fun
97
97
  validation
98
98
  ]
99
99
  ]
100
- }, /* @__PURE__ */ $dbSRa$react__default.createElement("div", {
100
+ }, /* @__PURE__ */ $dbSRa$react__default.createElement($64fa3d84918910a7$export$df3a06d6289f983e.div, {
101
101
  ...DOMProps,
102
102
  ...renderProps,
103
103
  ref,
@@ -277,7 +277,7 @@ const NumberPicker = ({
277
277
  /* @__PURE__ */ jsx(
278
278
  $3985021b0ad6602f$export$f5b8910cec6cf069,
279
279
  {
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!',
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
283
  width: fixedWidth ? `calc(${fixedWidth}ch + 2px)` : `calc(${min < 0 ? "1ch + " : "0.75ch + "}${Math.max((max ?? 1e3)?.toString()?.length, (placeholder ?? "")?.length)} * 1ch)`
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { c as clsx } from "../../clsx-DgYk2OaC.js";
3
3
  import { RichLabel } from "../rich-label/rich-label.js";
4
- import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-eA6LXIKB.js";
4
+ import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-CY-_gt-U.js";
5
5
  import { cloneElement } from "react";
6
6
  /**
7
7
  * Component that provides a container panel for options, with an optional title.
@@ -5,6 +5,7 @@ import "react";
5
5
  import "../../react-jsx-parser.min-B_hvYYa1.js";
6
6
  import { truncateMiddle } from "../../utilities/text-helpers.js";
7
7
  import { SmartImage } from "../smart-image/smart-image.js";
8
+ import { __SmartImageNext } from "../smart-image/smart-image-next.js";
8
9
  /**
9
10
  * A shell for a file picker UI, handling both rich visual presentation (e.g. images) and simple file placeholders.
10
11
  *
@@ -53,6 +54,7 @@ const FilePickerShell = (props) => {
53
54
  className,
54
55
  noUrlContent,
55
56
  hidden,
57
+ __useSmartImageNext = false,
56
58
  ...rest
57
59
  } = props;
58
60
  if (hidden) {
@@ -67,11 +69,11 @@ const FilePickerShell = (props) => {
67
69
  {
68
70
  ...rest,
69
71
  className: clsx(
70
- "es:border es:border-surface-200 es:bg-white es:bg-linear-to-br es:from-surface-50/5 es:to-surface-50/30 es:flex es:justify-between es:rounded-2xl es:isolate es:relative es:flex-col es:gap-2 es:overflow-clip es:group es:p-2",
72
+ "es:border es:border-surface-200 es:bg-surface-50 es:flex es:justify-between es:rounded-2xl es:isolate es:relative es:flex-col es:gap-2 es:overflow-clip es:group es:p-2",
71
73
  className
72
74
  ),
73
75
  children: [
74
- type === "file" && /* @__PURE__ */ jsxs("div", { className: "es:grow es:flex es:flex-col es:gap-2 es:text-sm es:items-center-safe es:justify-center-safe es:font-mono es:icon:size-6 es:rounded-xl es:bg-surface-50 es:inset-ring es:inset-ring-surface-100 es:icon:text-surface-500 es:text-surface-700 es:p-2", children: [
76
+ type === "file" && /* @__PURE__ */ jsxs("div", { className: "es:grow es:flex es:flex-col es:gap-2 es:text-sm es:items-center-safe es:justify-center-safe es:font-mono es:icon:size-6 es:rounded-xl es:bg-white/50 es:inset-ring es:inset-ring-surface-100 es:icon:text-surface-500 es:text-surface-700 es:px-2 es:py-4", children: [
75
77
  icon,
76
78
  /* @__PURE__ */ jsx("span", { className: "es:line-clamp-1", children: truncateMiddle(url, 34) })
77
79
  ] }),
@@ -80,56 +82,60 @@ const FilePickerShell = (props) => {
80
82
  }
81
83
  );
82
84
  }
85
+ const ComponentToRender = __useSmartImageNext ? __SmartImageNext : SmartImage;
83
86
  return /* @__PURE__ */ jsx(
84
- SmartImage,
87
+ ComponentToRender,
85
88
  {
86
89
  src: url,
87
90
  alt: "",
88
- className: ({ hasAnalysed, isTransparent, transparencyInfo }) => clsx(
89
- hasAnalysed && transparencyInfo?.left && url && "es:pl-3",
90
- hasAnalysed && transparencyInfo?.right && url && "es:pr-3",
91
- hasAnalysed && transparencyInfo?.top && url && "es:pt-3",
92
- hasAnalysed && transparencyInfo?.bottom && url && "es:pb-3",
93
- hasAnalysed && isTransparent && "es:bg-white/60 es:object-contain es:mx-auto",
91
+ className: ({ hasAnalysed, isTransparent, transparencyInfo, isDark, hasError }) => clsx(
92
+ hasAnalysed && isTransparent && url && "es:p-4",
93
+ hasAnalysed && isTransparent && isDark && "es:object-contain es:mx-auto",
94
+ hasAnalysed && isTransparent && !isDark && "es:object-contain es:mx-auto",
94
95
  hasAnalysed && isTransparent && (transparencyInfo?.left || transparencyInfo?.right) && "es:w-full!",
95
96
  hasAnalysed && isTransparent && (transparencyInfo?.top || transparencyInfo?.bottom) && "es:h-full!",
96
97
  hasAnalysed && !isTransparent && "es:w-full! es:aspect-3-2 es:object-cover",
97
- hasAnalysed && "es:grow es:rounded-xl es:h-fill!"
98
+ hasAnalysed && "es:grow es:rounded-xl es:h-fill!",
99
+ hasError && "es:rounded-xl"
98
100
  ),
99
- errorClassName: "es:aspect-3-2 es:rounded-2xl es:bg-linear-to-br es:from-white es:to-secondary-50 es:border es:border-dashed es:border-secondary-200",
101
+ errorClassName: !__useSmartImageNext && "es:aspect-3-2 es:rounded-2xl es:bg-linear-to-br es:from-white es:to-secondary-50 es:border es:border-dashed es:border-secondary-200",
100
102
  imageAnalysisSettings: { yFrom: 0.25, yTo: 0.75 },
101
103
  ...rest,
102
- children: ({ image, dominantColors, isDark, hasAnalysed, isTransparent, hasError, errorBadge }) => /* @__PURE__ */ jsxs(
103
- "div",
104
- {
105
- className: clsx(
106
- "es:border es:justify-between es:rounded-2xl es:isolate es:relative es:flex-col es:gap-y-2 es:grid es:grid-cols-1 es:overflow-clip es:aspect-3-2 es:transition",
107
- !hasError && hasAnalysed ? "es:border-secondary-200" : "es:border-secondary-200/0",
108
- !hasError && hasAnalysed && !isTransparent && "es:group es:grid-rows-1",
109
- !hasError && hasAnalysed && isTransparent && "es:p-2 es:grid-rows-[minmax(0,1fr)_auto] es:h-fit",
110
- !hasAnalysed && "es:shimmer-dark es:bg-secondary-50",
111
- hasError && "es:flex es:items-center es:justify-center",
112
- className
113
- ),
114
- style: !hasError && hasAnalysed && isTransparent ? { backgroundColor: `color-mix(in srgb, ${dominantColors[0]?.color || "#ffffff"} ${dominantColors[0]?.isDark ? 10 : 80}%, #ffffff)` } : {},
115
- children: [
116
- image,
117
- hasError && errorBadge,
118
- children && /* @__PURE__ */ jsx(
119
- "div",
120
- {
121
- className: clsx(
122
- "es:flex es:items-center-safe es:gap-0.75",
123
- "es-button-group-h",
124
- !hasError && !isTransparent && "es:absolute es:bottom-2 es:left-2 es:right-2 es:translate-y-[125%] es:group-hover:translate-y-0 es:has-aria-expanded:translate-y-0 es:has-focus-visible:translate-y-0 es:transition-transform es:ease-spring-smooth",
125
- hasError && "es:absolute es:bottom-2 es:left-2 es:right-2"
126
- ),
127
- children: typeof children === "function" ? children({ dominantColors, isDark, isTransparent, hasError }) : children
128
- }
129
- )
130
- ]
131
- }
132
- )
104
+ children: ({ image, dominantColors, isDark, hasAnalysed, isTransparent, hasError, errorBadge }) => {
105
+ const dominantDisplayColor = dominantColors?.find((c) => c.saturation > 0.25) || dominantColors?.[0];
106
+ return /* @__PURE__ */ jsxs(
107
+ "div",
108
+ {
109
+ className: clsx(
110
+ "es:border es:justify-between es:rounded-2xl es:isolate es:relative es:flex-col es:gap-y-2 es:grid es:grid-cols-1 es:overflow-clip es:aspect-3-2 es:transition",
111
+ !hasError && hasAnalysed ? "es:border-secondary-200" : "es:border-secondary-200/0",
112
+ !hasError && hasAnalysed && !isTransparent && "es:group es:grid-rows-1",
113
+ (hasAnalysed && isTransparent || hasError) && "es:p-2 es:grid-rows-[minmax(0,1fr)_auto] es:h-fit",
114
+ !hasError && !hasAnalysed && "es:shimmer-dark es:bg-surface-100",
115
+ hasError && "es:bg-surface-50 es:border-surface-100",
116
+ className
117
+ ),
118
+ style: !hasError && hasAnalysed && isTransparent ? {
119
+ backgroundColor: `color-mix(in srgb, ${dominantDisplayColor?.color || "#ffffff"} ${dominantDisplayColor?.isDark ? 5 : 25}%, ${dominantDisplayColor?.isDark ? "#ffffff" : "#000000"})`
120
+ } : {},
121
+ children: [
122
+ !hasError && image,
123
+ hasError && errorBadge,
124
+ children && /* @__PURE__ */ jsx(
125
+ "div",
126
+ {
127
+ className: clsx(
128
+ "es:flex es:items-center-safe es:gap-0.75",
129
+ "es-button-group-h",
130
+ !hasError && !isTransparent && "es:absolute es:bottom-2 es:left-2 es:right-2 es:translate-y-[125%] es:group-hover:translate-y-0 es:has-aria-expanded:translate-y-0 es:has-focus-visible:translate-y-0 es:transition-transform es:ease-spring-smooth"
131
+ ),
132
+ children: typeof children === "function" ? children({ dominantColors, isDark, isTransparent, hasError }) : children
133
+ }
134
+ )
135
+ ]
136
+ }
137
+ );
138
+ }
133
139
  }
134
140
  );
135
141
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d, g as $de32f1b87079253c$export$3ddf2d174ce01153, h as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../../Dialog-Dd1yqNus.js";
2
+ import { f as $07b14b47974efb58$export$5b6b19405a83ff9d, g as $de32f1b87079253c$export$3ddf2d174ce01153, h as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../../Dialog-BbNWvB5_.js";
3
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";
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DPWyf-gp.js";
3
- import { a as $b6c3ddc6086f204d$export$d7b12c4107be0d61, $ as $b6c3ddc6086f204d$export$a98f0dcb43a68a25 } from "../../RadioGroup-Cp5cdBI_.js";
2
+ import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BDlf9vIY.js";
3
+ import { a as $b6c3ddc6086f204d$export$d7b12c4107be0d61, $ as $b6c3ddc6086f204d$export$a98f0dcb43a68a25 } from "../../RadioGroup-BFDueqHz.js";
4
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";
@@ -12,7 +12,7 @@ import { ButtonGroup, Button } from "../button/button.js";
12
12
  import { BaseControl } from "../base-control/base-control.js";
13
13
  import { TriggeredPopover } from "../popover/popover.js";
14
14
  import { OptionSelect } from "../option-select/option-select.js";
15
- import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../Text-Dae33gHp.js";
15
+ import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../Text-CjFEHSfr.js";
16
16
  /**
17
17
  * A compact, inline version of `Responsive`. Allows the user to set different values for different breakpoints.
18
18
  *
@@ -2,13 +2,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
3
3
  import { _ as __, a as _n } from "../../default-i18n-CnQeC5Pl.js";
4
4
  import { BaseControl } from "../base-control/base-control.js";
5
- import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../SearchField-CLhr5PGZ.js";
6
- import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-JRIu2BnS.js";
7
- import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-Cuw9UbNb.js";
8
- import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DPWyf-gp.js";
9
- import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../ListBox-DT1sFY3e.js";
10
- import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-Dd1yqNus.js";
11
- import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-Bg9lx3pE.js";
5
+ import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../SearchField-CmRhtrQf.js";
6
+ import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-BTCA69Lt.js";
7
+ import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-Wrnm2nxy.js";
8
+ import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BDlf9vIY.js";
9
+ import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../ListBox-yHUyUAAH.js";
10
+ import { f as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-BbNWvB5_.js";
11
+ import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-DSTKnPjF.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";
@@ -1,13 +1,13 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
3
3
  import { BaseControl } from "../base-control/base-control.js";
4
- import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../SearchField-CLhr5PGZ.js";
5
- import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-JRIu2BnS.js";
6
- import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-Cuw9UbNb.js";
7
- import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DPWyf-gp.js";
8
- import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../ListBox-DT1sFY3e.js";
9
- import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-Dd1yqNus.js";
10
- import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-Bg9lx3pE.js";
4
+ import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../SearchField-CmRhtrQf.js";
5
+ import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-BTCA69Lt.js";
6
+ import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-Wrnm2nxy.js";
7
+ import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BDlf9vIY.js";
8
+ import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../ListBox-yHUyUAAH.js";
9
+ import { f as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-BbNWvB5_.js";
10
+ import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-DSTKnPjF.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";
@@ -2,13 +2,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
3
3
  import { _ as __, a as _n } from "../../default-i18n-CnQeC5Pl.js";
4
4
  import { BaseControl } from "../base-control/base-control.js";
5
- import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../SearchField-CLhr5PGZ.js";
6
- import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-JRIu2BnS.js";
7
- import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-Cuw9UbNb.js";
8
- import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DPWyf-gp.js";
9
- import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../ListBox-DT1sFY3e.js";
10
- import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-Dd1yqNus.js";
11
- import { g as getValue, $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-Bg9lx3pE.js";
5
+ import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../SearchField-CmRhtrQf.js";
6
+ import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-BTCA69Lt.js";
7
+ import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-Wrnm2nxy.js";
8
+ import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BDlf9vIY.js";
9
+ import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../ListBox-yHUyUAAH.js";
10
+ import { f as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-BbNWvB5_.js";
11
+ import { g as getValue, $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-DSTKnPjF.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";
@@ -19,7 +19,7 @@ import { TriggeredPopover } from "../popover/popover.js";
19
19
  import { DraggableList } from "../draggable-list/draggable-list.js";
20
20
  import { DraggableListItem } from "../draggable-list/draggable-list-item.js";
21
21
  import { randomId } from "../../utilities/hash.js";
22
- import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../useFilter-DYtfYPua.js";
22
+ import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../useFilter-Cqw0-KoB.js";
23
23
  /**
24
24
  * Multi-select menu.
25
25
  *
@@ -1,8 +1,8 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../default-i18n-CnQeC5Pl.js";
3
- import "../../Button-JRIu2BnS.js";
4
- import "../../ListBox-DT1sFY3e.js";
5
- import { O, S, g, m } from "../../shared-Bg9lx3pE.js";
3
+ import "../../Button-BTCA69Lt.js";
4
+ import "../../ListBox-yHUyUAAH.js";
5
+ import { O, S, g, m } from "../../shared-DSTKnPjF.js";
6
6
  import "../../icons/icons.js";
7
7
  import "react";
8
8
  import "../../react-jsx-parser.min-B_hvYYa1.js";
@@ -1,13 +1,13 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
3
3
  import { BaseControl } from "../base-control/base-control.js";
4
- import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../SearchField-CLhr5PGZ.js";
5
- import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-JRIu2BnS.js";
6
- import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-Cuw9UbNb.js";
7
- import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DPWyf-gp.js";
8
- import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../ListBox-DT1sFY3e.js";
9
- import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-Dd1yqNus.js";
10
- import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-Bg9lx3pE.js";
4
+ import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../SearchField-CmRhtrQf.js";
5
+ import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-BTCA69Lt.js";
6
+ import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-Wrnm2nxy.js";
7
+ import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BDlf9vIY.js";
8
+ import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../ListBox-yHUyUAAH.js";
9
+ import { f as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-BbNWvB5_.js";
10
+ import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-DSTKnPjF.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";
@@ -15,7 +15,7 @@ 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
17
  import { randomId } from "../../utilities/hash.js";
18
- import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../useFilter-DYtfYPua.js";
18
+ import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../useFilter-Cqw0-KoB.js";
19
19
  /**
20
20
  * Select menu.
21
21
  *
@@ -1,13 +1,13 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
3
3
  import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
4
- import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DPWyf-gp.js";
5
- import { $ as $6f909507e6374d18$export$472062a354075cee, a as $6f909507e6374d18$export$105594979f116971, b as $6f909507e6374d18$export$2c1b491743890dec, c as $6f909507e6374d18$export$a590f758a961cb5b } from "../../Slider-CZV3HhHY.js";
4
+ import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BDlf9vIY.js";
5
+ import { $ as $6f909507e6374d18$export$472062a354075cee, a as $6f909507e6374d18$export$105594979f116971, b as $6f909507e6374d18$export$2c1b491743890dec, c as $6f909507e6374d18$export$a590f758a961cb5b } from "../../Slider-Bl5G0ZHE.js";
6
6
  import { BaseControl } from "../base-control/base-control.js";
7
7
  import { icons } from "../../icons/icons.js";
8
8
  import { getColumnConfigOutputText } from "./utils.js";
9
9
  import { c as clsx } from "../../clsx-DgYk2OaC.js";
10
- import { A as AnimatePresence, m as motion } from "../../proxy-CcjltLEW.js";
10
+ import { A as AnimatePresence, m as motion } from "../../proxy-CgLBbUpw.js";
11
11
  /**
12
12
  * A two-thumb slider for selecting a range of columns.
13
13
  *
@@ -1,13 +1,13 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
- import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DPWyf-gp.js";
4
- import { $ as $6f909507e6374d18$export$472062a354075cee, a as $6f909507e6374d18$export$105594979f116971, b as $6f909507e6374d18$export$2c1b491743890dec, c as $6f909507e6374d18$export$a590f758a961cb5b } from "../../Slider-CZV3HhHY.js";
3
+ import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BDlf9vIY.js";
4
+ import { $ as $6f909507e6374d18$export$472062a354075cee, a as $6f909507e6374d18$export$105594979f116971, b as $6f909507e6374d18$export$2c1b491743890dec, c as $6f909507e6374d18$export$a590f758a961cb5b } from "../../Slider-Bl5G0ZHE.js";
5
5
  import { BaseControl } from "../base-control/base-control.js";
6
6
  import { c as clsx } from "../../clsx-DgYk2OaC.js";
7
7
  import { NumberPicker } from "../number-picker/number-picker.js";
8
8
  import { generateMarkers, generateGridTemplate } from "./utils.js";
9
9
  import { HStack } from "../layout/hstack.js";
10
- import { A as AnimatePresence, m as motion } from "../../proxy-CcjltLEW.js";
10
+ import { A as AnimatePresence, m as motion } from "../../proxy-CgLBbUpw.js";
11
11
  /**
12
12
  * A single/multi-thumb slider component.
13
13
  *
@@ -0,0 +1,144 @@
1
+ const getSaturation = (r, g, b) => {
2
+ const red = r / 255;
3
+ const green = g / 255;
4
+ const blue = b / 255;
5
+ const max = Math.max(red, green, blue);
6
+ const min = Math.min(red, green, blue);
7
+ const delta = max - min;
8
+ if (max < 0.05) {
9
+ return 0;
10
+ }
11
+ let saturation = 0;
12
+ if (max !== 0) {
13
+ saturation = delta / max;
14
+ }
15
+ return parseFloat(saturation.toFixed(3));
16
+ };
17
+ const rgbToHex = (r, g, b) => "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1).toUpperCase();
18
+ self.onmessage = (e) => {
19
+ const { buffer, width, height, config } = e.data;
20
+ const { maxColors = 5, threshold = 96, transparencyThreshold = 255 } = config;
21
+ const stride = 4;
22
+ const isTransparent = (idx) => buffer[idx + 3] < transparencyThreshold;
23
+ const getIdx = (x, y) => (y * width + x) * stride;
24
+ const corners = {
25
+ topLeft: isTransparent(getIdx(0, 0)),
26
+ topRight: isTransparent(getIdx(width - 1, 0)),
27
+ bottomLeft: isTransparent(getIdx(0, height - 1)),
28
+ bottomRight: isTransparent(getIdx(width - 1, height - 1))
29
+ };
30
+ const sides = { top: false, bottom: false, left: false, right: false };
31
+ for (let x = 0; x < width; x += 5) {
32
+ if (!sides.top && isTransparent(getIdx(x, 0))) {
33
+ sides.top = true;
34
+ }
35
+ if (!sides.bottom && isTransparent(getIdx(x, height - 1))) {
36
+ sides.bottom = true;
37
+ }
38
+ }
39
+ for (let y = 0; y < height; y += 5) {
40
+ if (!sides.left && isTransparent(getIdx(0, y))) {
41
+ sides.left = true;
42
+ }
43
+ if (!sides.right && isTransparent(getIdx(width - 1, y))) {
44
+ sides.right = true;
45
+ }
46
+ }
47
+ let internalTransparent = false;
48
+ const borderIsSolid = !Object.values(sides).some((v) => v);
49
+ if (borderIsSolid) {
50
+ const len = buffer.length;
51
+ const step = Math.floor(len / 100);
52
+ for (let i = 0; i < len; i += step) {
53
+ const idx = i - i % 4;
54
+ if (buffer[idx + 3] < 255) {
55
+ internalTransparent = true;
56
+ break;
57
+ }
58
+ }
59
+ } else {
60
+ internalTransparent = true;
61
+ }
62
+ const colorCounts = {};
63
+ const samplingRate = 20;
64
+ let totalSampledPixels = 0;
65
+ let sumR = 0;
66
+ let sumG = 0;
67
+ let sumB = 0;
68
+ for (let i = 0; i < buffer.length; i += stride * samplingRate) {
69
+ const rRaw = buffer[i];
70
+ const gRaw = buffer[i + 1];
71
+ const bRaw = buffer[i + 2];
72
+ const a = buffer[i + 3];
73
+ if (a < 250) continue;
74
+ totalSampledPixels++;
75
+ sumR += rRaw;
76
+ sumG += gRaw;
77
+ sumB += bRaw;
78
+ const q = 5;
79
+ const r = Math.round(rRaw / q) * q;
80
+ const g = Math.round(gRaw / q) * q;
81
+ const b = Math.round(bRaw / q) * q;
82
+ const key = `${r},${g},${b}`;
83
+ colorCounts[key] = (colorCounts[key] || 0) + 1;
84
+ }
85
+ let averageColor = null;
86
+ if (totalSampledPixels > 0) {
87
+ const avgR = Math.round(sumR / totalSampledPixels);
88
+ const avgG = Math.round(sumG / totalSampledPixels);
89
+ const avgB = Math.round(sumB / totalSampledPixels);
90
+ const avgLum = 0.2126 * avgR + 0.7152 * avgG + 0.0722 * avgB;
91
+ averageColor = {
92
+ color: rgbToHex(avgR, avgG, avgB),
93
+ isDark: avgLum <= 128,
94
+ saturation: getSaturation(avgR, avgG, avgB)
95
+ };
96
+ }
97
+ const sortedRawColors = Object.entries(colorCounts).map(([key, count]) => {
98
+ const [r, g, b] = key.split(",").map(Number);
99
+ return { r, g, b, count };
100
+ }).sort((a, b) => b.count - a.count);
101
+ const distinctPalette = [];
102
+ for (const candidate of sortedRawColors) {
103
+ if (distinctPalette.length >= maxColors) break;
104
+ let isSimilar = false;
105
+ for (const existing of distinctPalette) {
106
+ const dist = Math.sqrt(Math.pow(candidate.r - existing.r, 2) + Math.pow(candidate.g - existing.g, 2) + Math.pow(candidate.b - existing.b, 2));
107
+ if (dist < threshold) {
108
+ existing.count += candidate.count;
109
+ isSimilar = true;
110
+ break;
111
+ }
112
+ }
113
+ if (!isSimilar) {
114
+ distinctPalette.push({ ...candidate });
115
+ }
116
+ }
117
+ const palette = distinctPalette.map((item) => {
118
+ const percentage = parseFloat((item.count / totalSampledPixels).toFixed(3));
119
+ const lum = 0.2126 * item.r + 0.7152 * item.g + 0.0722 * item.b;
120
+ return {
121
+ color: rgbToHex(item.r, item.g, item.b),
122
+ area: percentage,
123
+ isDark: lum <= 128,
124
+ saturation: getSaturation(item.r, item.g, item.b)
125
+ };
126
+ });
127
+ self.postMessage({
128
+ dominantColors: palette,
129
+ averageColor,
130
+ isDark: palette[0]?.isDark || false,
131
+ isTransparent: internalTransparent || Object.values(corners).some((v) => v) || Object.values(sides).some((v) => v),
132
+ transparencyInfo: {
133
+ any: internalTransparent,
134
+ left: sides.left,
135
+ right: sides.right,
136
+ top: sides.top,
137
+ bottom: sides.bottom,
138
+ topLeftCorner: corners.topLeft,
139
+ topRightCorner: corners.topRight,
140
+ bottomLeftCorner: corners.bottomLeft,
141
+ bottomRightCorner: corners.bottomRight
142
+ }
143
+ });
144
+ };