@eightshift/ui-components 5.6.1 → 6.0.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 (146) hide show
  1. package/dist/{Button-CQ5ZZJ2w.js → Button-BXjXzdW_.js} +13 -13
  2. package/dist/{Dialog-BMgMUQuN.js → Dialog-D8bjn-nh.js} +404 -77
  3. package/dist/{FieldError-B8BgFmIQ.js → FieldError-DwBG6m1U.js} +2 -2
  4. package/dist/{FocusScope-B5vxRkHm.js → FocusScope-BMk5oZCk.js} +8 -8
  5. package/dist/{Heading-B5aEynOM.js → Heading-BmRX4BRL.js} +3 -3
  6. package/dist/{Hidden-rE6uR-lr.js → Hidden-Rfj-STx7.js} +4 -4
  7. package/dist/{Input-8yja_IHC.js → Input-CNNksOWg.js} +11 -11
  8. package/dist/{Label-DWVaNd2E.js → Label-D8a3eYb-.js} +4 -4
  9. package/dist/{List-BiAnh5G5.js → List-BGHOoFf0.js} +8 -8
  10. package/dist/{ListBox-DggfiuO_.js → ListBox-Dd37zMvs.js} +40 -41
  11. package/dist/{OverlayArrow-DraDOoRn.js → OverlayArrow-DokC40S3.js} +6 -6
  12. package/dist/{PortalProvider---wyKpMr.js → PortalProvider-CHPnqDSH.js} +2 -2
  13. package/dist/RadioGroup-BVFvITWO.js +371 -0
  14. package/dist/{SearchField-DWGdCvnn.js → SearchField-CHYnN-jt.js} +16 -16
  15. package/dist/{SelectionManager-B6-b5NM2.js → SelectionManager-N8X7T_4D.js} +44 -46
  16. package/dist/{SharedElementTransition-fML-zIv6.js → SharedElementTransition-BDT84GtD.js} +3 -3
  17. package/dist/{Slider-DfU6bRtH.js → Slider-CL5CM9S8.js} +23 -23
  18. package/dist/{Text-AxKZjtFm.js → Text-ztX6G1zR.js} +3 -3
  19. package/dist/{VisuallyHidden-CgnIuZJ2.js → VisuallyHidden-DTUuKFiI.js} +4 -4
  20. package/dist/assets/style-admin.css +12156 -2
  21. package/dist/assets/style-editor.css +12156 -2
  22. package/dist/assets/style.css +12162 -2
  23. package/dist/assets/wp-overrides/allow-full-width-blocks.css +6 -0
  24. package/dist/assets/wp-overrides/fix-label-text-case.css +29 -0
  25. package/dist/assets/wp-overrides/increase-sidebar-width.css +4 -0
  26. package/dist/assets/wp-overrides/make-block-messages-nicer.css +155 -0
  27. package/dist/assets/wp-overrides/replace-fonts.css +8 -0
  28. package/dist/assets/wp-overrides/restyle-tooltips.css +194 -0
  29. package/dist/assets/wp-overrides/round-corners.css +200 -0
  30. package/dist/assets/wp-overrides/unify-button-sizes.css +5 -0
  31. package/dist/clsx-DgYk2OaC.js +16 -0
  32. package/dist/{Color-WxFE7lQB.js → color-swatch-CFIuSPcO.js} +124 -6
  33. package/dist/components/animated-visibility/animated-visibility.js +25 -17
  34. package/dist/components/base-control/base-control.js +8 -5
  35. package/dist/components/base-control/container.js +204 -0
  36. package/dist/components/button/button.js +249 -155
  37. package/dist/components/checkbox/checkbox.js +96 -37
  38. package/dist/components/color-pickers/color-picker.js +16 -7
  39. package/dist/components/color-pickers/color-swatch.js +5 -57
  40. package/dist/components/color-pickers/gradient-editor.js +161 -138
  41. package/dist/components/color-pickers/solid-color-picker.js +308 -206
  42. package/dist/components/component-toggle/component-toggle.js +12 -8
  43. package/dist/components/container-panel/container-panel.js +54 -31
  44. package/dist/components/draggable/draggable-handle.js +8 -7
  45. package/dist/components/draggable/draggable.js +2 -2
  46. package/dist/components/draggable-list/draggable-list-item.js +21 -12
  47. package/dist/components/draggable-list/draggable-list.js +19 -21
  48. package/dist/components/expandable/expandable.js +56 -28
  49. package/dist/components/index.js +7 -21
  50. package/dist/components/input-field/input-field.js +112 -35
  51. package/dist/components/item-collection/item-collection.js +1 -1
  52. package/dist/components/link-input/link-input.js +181 -121
  53. package/dist/components/matrix-align/matrix-align.js +54 -20
  54. package/dist/components/menu/menu.js +26 -34
  55. package/dist/components/modal/modal.js +31 -28
  56. package/dist/components/notice/notice.js +45 -28
  57. package/dist/components/number-picker/number-picker.js +151 -101
  58. package/dist/components/option-select/option-select.js +40 -4
  59. package/dist/components/options-panel/options-panel.js +52 -25
  60. package/dist/components/placeholders/file-picker-shell.js +10 -9
  61. package/dist/components/placeholders/file-placeholder.js +14 -6
  62. package/dist/components/placeholders/image-placeholder.js +14 -4
  63. package/dist/components/placeholders/media-placeholder.js +11 -4
  64. package/dist/components/popover/popover.js +14 -11
  65. package/dist/components/portal-provider/portal-provider.js +1 -1
  66. package/dist/components/radio/radio.js +118 -429
  67. package/dist/components/repeater/repeater-item.js +7 -10
  68. package/dist/components/repeater/repeater.js +9 -15
  69. package/dist/components/responsive/mini-responsive.js +53 -61
  70. package/dist/components/responsive/responsive-legacy.js +1 -1
  71. package/dist/components/responsive/responsive.js +27 -27
  72. package/dist/components/responsive-preview/responsive-preview.js +1 -1
  73. package/dist/components/rich-label/rich-label.js +5 -5
  74. package/dist/components/select/async-multi-select.js +467 -100
  75. package/dist/components/select/{v2/async-select.js → async-select.js} +182 -105
  76. package/dist/components/select/multi-select.js +437 -83
  77. package/dist/components/select/shared.js +14 -42
  78. package/dist/components/select/single-select.js +349 -54
  79. package/dist/components/slider/column-config-slider.js +138 -45
  80. package/dist/components/slider/slider.js +265 -205
  81. package/dist/components/slider/utils.js +32 -1
  82. package/dist/components/smart-image/smart-image.js +25 -4
  83. package/dist/components/smart-image/worker-inline.js +1 -1
  84. package/dist/components/spacer/spacer.js +2 -2
  85. package/dist/components/tabs/tabs.js +370 -101
  86. package/dist/components/toggle/switch.js +174 -39
  87. package/dist/components/toggle/toggle.js +6 -3
  88. package/dist/components/toggle-button/toggle-button.js +140 -56
  89. package/dist/components/tooltip/tooltip.js +27 -26
  90. package/dist/{context-DMOmz986.js → context-BQvmiUqb.js} +3 -3
  91. package/dist/{default-i18n-DBm-GqWM.js → default-i18n-CnQeC5Pl.js} +10 -10
  92. package/dist/{general-Ck8IV7xJ.js → general-B6pOveVp.js} +11 -10
  93. package/dist/icons/icons.js +28 -9
  94. package/dist/icons/jsx-svg.js +1 -1
  95. package/dist/icons/spinner.js +3 -1
  96. package/dist/{index-Dq3gT5pW.js → index-BHpUy2Ix.js} +1 -1
  97. package/dist/{index-D8-Zjpbd.js → index-oFgxU4zs.js} +3 -3
  98. package/dist/index.js +6 -20
  99. package/dist/proxy-0B6wWuDe.js +7409 -0
  100. package/dist/{react-jsx-parser.min-VUl-CuCv.js → react-jsx-parser.min-B_hvYYa1.js} +5 -5
  101. package/dist/{Select-BvggcFOX.js → shared-DwjRce5e.js} +170 -36
  102. package/dist/{textSelection-DbCKqaw8.js → textSelection-CwHUtNVX.js} +1 -1
  103. package/dist/{useButton-v9ngEj50.js → useButton-DdZrS1Kz.js} +3 -3
  104. package/dist/{useEvent-BifIGnVS.js → useEvent-BD7Olibq.js} +1 -1
  105. package/dist/{useFilter-BlkUH1Ma.js → useFilter-bhxeEDg8.js} +1 -1
  106. package/dist/{useFocusRing-Cgm0R4Cf.js → useFocusRing-D3b7Kh4P.js} +1 -1
  107. package/dist/{useFormReset-yV9VVy9R.js → useFormReset-WUv2PdFO.js} +1 -1
  108. package/dist/{useFormValidation-CeNsUGWK.js → useFormValidation-DQeXkyLm.js} +2 -2
  109. package/dist/{useHover-BRDW3y7-.js → useHover-Bycb7BsD.js} +7 -7
  110. package/dist/{useLabel-C8umX0gk.js → useLabel-Bnv4-T24.js} +2 -2
  111. package/dist/{useLabels-Cdxi6JSa.js → useLabels-B49ptFDX.js} +1 -1
  112. package/dist/{useListState-RdLrYsMP.js → useListState-ZKhRO8ML.js} +1 -1
  113. package/dist/{useLocalizedStringFormatter-eaZiN2tE.js → useLocalizedStringFormatter-NETP-8H8.js} +1 -1
  114. package/dist/{useNumberField-D16dDfYF.js → useNumberField-D2fUHql3.js} +10 -10
  115. package/dist/{useNumberFormatter-BCmkV-7c.js → useNumberFormatter-DGvuRCn7.js} +1 -1
  116. package/dist/{usePress-DJskZBH9.js → usePress-B8OteQMu.js} +6 -6
  117. package/dist/{useSingleSelectListState-n0AVMr3Y.js → useSingleSelectListState-BBTu4shO.js} +2 -2
  118. package/dist/{useToggle-DSBDAfdw.js → useToggle-BZhaYwZl.js} +4 -4
  119. package/dist/{useToggleState-CzN79ary.js → useToggleState-VkXJjsru.js} +1 -1
  120. package/dist/utilities/general.js +1 -1
  121. package/dist/utilities/index.js +1 -1
  122. package/dist/{utils-cvK1vxO7.js → utils-DGpXyJOJ.js} +29 -42
  123. package/dist/workers/image-analysis.worker.js +3 -3
  124. package/package.json +26 -22
  125. package/dist/ColorSwatch-xVS3rMYS.js +0 -66
  126. package/dist/Select-ef7c0426.esm-CmTkSxDx.js +0 -2474
  127. package/dist/Separator-B-xeqOkC.js +0 -344
  128. package/dist/assets/wp-font-enhancements.css +0 -2
  129. package/dist/assets/wp-ui-enhancements.css +0 -2
  130. package/dist/components/select/async-single-select.js +0 -138
  131. package/dist/components/select/custom-select-default-components.js +0 -38
  132. package/dist/components/select/multi-select-components.js +0 -8
  133. package/dist/components/select/react-select-component-wrappers.js +0 -90
  134. package/dist/components/select/styles.js +0 -49
  135. package/dist/components/select/v2/async-multi-select.js +0 -432
  136. package/dist/components/select/v2/multi-select.js +0 -403
  137. package/dist/components/select/v2/shared.js +0 -69
  138. package/dist/components/select/v2/single-select.js +0 -358
  139. package/dist/index-641ee5b8.esm-DVp0njHa.js +0 -3139
  140. package/dist/modifiers.esm-BuJQPI1X.js +0 -31
  141. package/dist/multi-select-components-CT_W0Cy9.js +0 -3744
  142. package/dist/react-select-async.esm-Zl1LPaPb.js +0 -107
  143. package/dist/react-select.esm-Bu36HujU.js +0 -15
  144. package/dist/useDragAndDrop-C08ZXv4F.js +0 -3925
  145. package/dist/wp/wp-font-enhancements.js +0 -1
  146. package/dist/wp/wp-ui-enhancements.js +0 -1
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
3
- import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
3
+ import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
4
4
  import { Expandable } from "../expandable/expandable.js";
5
5
  import { icons } from "../../icons/icons.js";
6
6
  import { Switch } from "../toggle/switch.js";
@@ -14,6 +14,8 @@ import { AnimatedVisibility } from "../animated-visibility/animated-visibility.j
14
14
  /**
15
15
  * A component that provides a nice way to toggle a component on and off, and display its content in an expandable panel.
16
16
  *
17
+ * @deprecated since 6.0.0 - Suggested replacement is toggle in one panel/tab, that shows/hides other content when on.
18
+ *
17
19
  * @component
18
20
  * @param {Object} props - Component props.
19
21
  * @param {JSX.Element} [props.icon] - Icon to display in the label.
@@ -139,17 +141,19 @@ const ComponentToggle = (props) => {
139
141
  return /* @__PURE__ */ jsx(
140
142
  Expandable,
141
143
  {
142
- icon: icon ?? icons.componentGeneric,
143
- label: !noLabel && label,
144
- subtitle,
145
- keepActionsOnExpand: !hideUseToggleOnExpand,
146
- actions: !noUseToggle && /* @__PURE__ */ jsx(
144
+ standalone: true,
145
+ icon: !noUseToggle ? /* @__PURE__ */ jsx(
147
146
  Switch,
148
147
  {
149
148
  checked: useComponent,
150
- onChange
149
+ onChange,
150
+ "aria-label": switchAriaLabel,
151
+ size: "medium"
151
152
  }
152
- ),
153
+ ) : icon ?? icons.componentGeneric,
154
+ label: !noLabel && label,
155
+ subtitle,
156
+ keepActionsOnExpand: !hideUseToggleOnExpand,
153
157
  disabled: !useComponent || expandButtonDisabled,
154
158
  noFocusHandling: true,
155
159
  children: !expandButtonDisabled && /* @__PURE__ */ jsx("div", { className: contentClassName, children })
@@ -22,6 +22,10 @@ import { BaseControl } from "../base-control/base-control.js";
22
22
  * @param {Function} [props.onUseChange] - Function to call when the use toggle is toggled. `(value: boolean) => void`.
23
23
  * @param {boolean} [props.closable] - If `true`, the panel can be closed. Will not show if `title` is not set.
24
24
  * @param {boolean} [props.startOpen=false] - Controls whether the panel is open by default.
25
+ * @param {boolean} [props.topBorder=false] - If `true`, a border is added to the top of the panel.
26
+ * @param {boolean} [props.accentLabel=false] - If `true`, the title and icon are tinted.
27
+ * @param {boolean} [props.accentIcon=false] - If `true`, the icon is tinted.
28
+ * @param {boolean} [props.noLabelInset=false] - If `true`, the label is not slightly inset, to better align with rounded containers.
25
29
  * @param {JSX.Element} [props.actions] - Actions to show at the end
26
30
  * @param {boolean} [props.hidden] - If `true`, the component is not rendered.
27
31
  *
@@ -35,13 +39,29 @@ import { BaseControl } from "../base-control/base-control.js";
35
39
  * @preserve
36
40
  */
37
41
  const ContainerPanel = (props) => {
38
- const { children, className, title, icon, subtitle, use, onUseChange, closable, startOpen = false, actions, hidden } = props;
42
+ const {
43
+ children,
44
+ className,
45
+ title,
46
+ icon,
47
+ subtitle,
48
+ use,
49
+ onUseChange,
50
+ closable,
51
+ startOpen = false,
52
+ topBorder = false,
53
+ accentLabel = false,
54
+ accentIcon = false,
55
+ noLabelInset = false,
56
+ actions,
57
+ hidden
58
+ } = props;
39
59
  const [open, setOpen] = useState(startOpen);
40
60
  if (hidden) {
41
61
  return null;
42
62
  }
43
63
  if (!title && typeof use === "undefined") {
44
- return /* @__PURE__ */ jsx("div", { className: clsx("es:space-y-2 es:border-t es:border-t-secondary-200 es:p-4", className), children });
64
+ return /* @__PURE__ */ jsx("div", { className: clsx("es:flex es:flex-col es:gap-3 es:p-4", topBorder && "es:border-t es:border-t-secondary-200", className), children });
45
65
  }
46
66
  const justUse = !closable && typeof onUseChange !== "undefined";
47
67
  const justClosable = closable && typeof onUseChange === "undefined";
@@ -49,46 +69,44 @@ const ContainerPanel = (props) => {
49
69
  return /* @__PURE__ */ jsxs(
50
70
  BaseControl,
51
71
  {
52
- icon,
72
+ icon: onUseChange ? /* @__PURE__ */ jsx(
73
+ Switch,
74
+ {
75
+ checked: use,
76
+ onChange: (value) => {
77
+ if (!value) {
78
+ setOpen(false);
79
+ }
80
+ onUseChange(value);
81
+ },
82
+ size: "medium"
83
+ }
84
+ ) : icon,
53
85
  label: title,
54
86
  subtitle,
55
87
  actions: /* @__PURE__ */ jsxs(Fragment, { children: [
56
88
  actions,
57
- /* @__PURE__ */ jsxs(
89
+ /* @__PURE__ */ jsx(
58
90
  HStack,
59
91
  {
60
92
  hidden: !closable && !onUseChange,
61
93
  className: "es:ml-auto",
62
- children: [
63
- onUseChange && /* @__PURE__ */ jsx(
64
- Switch,
65
- {
66
- checked: use,
67
- onChange: (value) => {
68
- if (!value) {
69
- setOpen(false);
70
- }
71
- onUseChange(value);
72
- }
73
- }
74
- ),
75
- closable && /* @__PURE__ */ jsx(
76
- Button,
77
- {
78
- onPress: () => setOpen(!open),
79
- icon: (typeof use !== "undefined" ? open && use : open) ? icons.caretDownFill : icons.caretDown,
80
- type: "ghost",
81
- size: "small",
82
- className: clsx("es:icon:size-5 es:icon:transition-transform", (typeof use !== "undefined" ? open && use : open) && "es:icon:-scale-y-100"),
83
- disabled: typeof use !== "undefined" && !use
84
- }
85
- )
86
- ]
94
+ children: closable && /* @__PURE__ */ jsx(
95
+ Button,
96
+ {
97
+ onPress: () => setOpen(!open),
98
+ icon: icons.chevronDown,
99
+ type: "ghost",
100
+ size: "small",
101
+ className: clsx("es:icon:size-4! es:icon:transition-transform", (typeof use !== "undefined" ? open && use : open) && "es:icon:-scale-y-100"),
102
+ disabled: typeof use !== "undefined" && !use
103
+ }
104
+ )
87
105
  }
88
106
  )
89
107
  ] }),
90
108
  className: clsx(
91
- "es:border-t es:border-t-secondary-200",
109
+ topBorder && "es:border-t es:border-t-secondary-200",
92
110
  !closable && typeof use === "undefined" && "es:space-y-2",
93
111
  justClosable && open && "es:pb-4",
94
112
  justUse && use && "es:pb-4",
@@ -99,7 +117,12 @@ const ContainerPanel = (props) => {
99
117
  ),
100
118
  labelContainerClassName: clsx((closable || onUseChange) && "es:pl-4 es:pr-3 es:min-h-12", !(closable || onUseChange) && "es:mt-3 es:mb-3", "es:pb-0!"),
101
119
  controlContainerClassName: "es:px-4",
102
- labelClassName: "es:text-secondary-600!",
120
+ labelClassName: clsx(
121
+ !noLabelInset && "es:px-1",
122
+ accentLabel && "es:text-accent-800 es:any-icon:text-accent-700",
123
+ accentIcon && "es:any-icon:text-accent-700",
124
+ !accentLabel && "es:text-surface-700"
125
+ ),
103
126
  children: [
104
127
  !closable && !onUseChange && typeof use === "undefined" && children,
105
128
  closable && typeof use === "undefined" && /* @__PURE__ */ jsx(
@@ -1,10 +1,10 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { c as clsx } from "../../lite-DVmmD_-j.js";
3
- import "../../default-i18n-DBm-GqWM.js";
3
+ import "../../default-i18n-CnQeC5Pl.js";
4
4
  import { DraggableContext } from "./draggable-context.js";
5
5
  import { useContext } from "react";
6
6
  import { icons } from "../../icons/icons.js";
7
- import "../../react-jsx-parser.min-VUl-CuCv.js";
7
+ import "../../react-jsx-parser.min-B_hvYYa1.js";
8
8
  /**
9
9
  * A Draggable item handle.
10
10
  *
@@ -26,13 +26,14 @@ const DraggableHandle = (props) => {
26
26
  "div",
27
27
  {
28
28
  className: clsx(
29
- "es:flex es:h-5 es:w-4 es:cursor-pointer es:items-center es:justify-center es:rounded es:border es:border-secondary-200 es:bg-white es:text-secondary-400 es:transition",
29
+ "es:flex es:h-5 es:w-4 es:cursor-pointer es:items-center es:justify-center es:rounded-sm es:hover:rounded-md es:inset-ring es:inset-ring-surface-400/10 es:bg-surface-50 es:text-surface-500/80 es:transition-plus",
30
+ "es:shadow-2xs es:shadow-surface-900/2",
30
31
  "es:icon:size-4 es:icon:shrink-0",
31
- "es:active:border-accent-500/30 es:active:bg-accent-50 es:active:text-accent-500",
32
+ "es:active:inset-ring-accent-500/30 es:active:bg-surface-100 es:active:text-accent-500 es:active:rounded-xl",
32
33
  "es:any-focus:outline-hidden",
33
- status !== "dragging" && "es:focus:border-accent-500 es:focus:ring-2 es:focus:ring-accent-500/50",
34
- "es:hover:text-accent-500",
35
- status === "dragging" && "es:border-accent-600! es:bg-accent-500! es:text-white! es:shadow-sm es:shadow-accent-500/30 es:ring-3 es:ring-accent-500/50",
34
+ status !== "dragging" && "es:focus:inset-ring-accent-500 es:focus:ring-2 es:focus:ring-accent-500/30",
35
+ "es:hover:text-accent-700",
36
+ status === "dragging" && "es:border-accent-600! es:bg-accent-500! es:text-white! es:shadow-sm es:shadow-black/5 es:ring-3 es:ring-accent-500/50",
36
37
  className
37
38
  ),
38
39
  ref: handleRef,
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useLayoutEffect, useMemo, useState, useCallback, startTransition, createContext, memo, forwardRef, useImperativeHandle, useContext, useId } from "react";
3
- import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
3
+ import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
4
4
  import { DraggableContext } from "./draggable-context.js";
5
- import { r as reactDomExports } from "../../index-D8-Zjpbd.js";
5
+ import { r as reactDomExports } from "../../index-oFgxU4zs.js";
6
6
  var i = Symbol.for("preact-signals");
7
7
  function t() {
8
8
  if (!(s > 1)) {
@@ -1,10 +1,11 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { c as clsx } from "../../lite-DVmmD_-j.js";
3
- import "../../default-i18n-DBm-GqWM.js";
4
- import { BaseControl } from "../base-control/base-control.js";
3
+ import "../../default-i18n-CnQeC5Pl.js";
4
+ import { HStack } from "../layout/hstack.js";
5
+ import { RichLabel } from "../rich-label/rich-label.js";
5
6
  import { icons } from "../../icons/icons.js";
6
7
  import { cloneElement } from "react";
7
- import "../../react-jsx-parser.min-VUl-CuCv.js";
8
+ import "../../react-jsx-parser.min-B_hvYYa1.js";
8
9
  /**
9
10
  * A DraggableList item.
10
11
  *
@@ -13,7 +14,6 @@ import "../../react-jsx-parser.min-VUl-CuCv.js";
13
14
  * @param {JSX.Element} [props.icon] - Icon to display in the label.
14
15
  * @param {string} [props.label] - Label to display.
15
16
  * @param {string} [props.subtitle] - Subtitle to display.
16
- * @param {JSX.Element|JSX.Element[]} [props.actions] - Actions to display to the right of the label.
17
17
  * @param {string} [props.textValue] - The text value of the item.
18
18
  * @param {string} [props.className] - Classes to pass to the label.
19
19
  *
@@ -24,18 +24,27 @@ import "../../react-jsx-parser.min-VUl-CuCv.js";
24
24
  * @preserve
25
25
  */
26
26
  const DraggableListItem = (props) => {
27
- const { children, icon, label, subtitle, className, ...rest } = props;
27
+ const { children, icon, label, subtitle, className, iconClassName, labelClassName, subtitleClassName, labelContainerClassName, ...rest } = props;
28
28
  return /* @__PURE__ */ jsxs(
29
- BaseControl,
29
+ HStack,
30
30
  {
31
- icon,
32
- label,
33
- subtitle,
34
- className: clsx("es:w-full", className),
35
- fullWidthLabel: true,
36
- inline: true,
31
+ className: clsx("es:w-fill es:group es:pl-1", className),
37
32
  ...rest,
38
33
  children: [
34
+ /* @__PURE__ */ jsx(
35
+ RichLabel,
36
+ {
37
+ icon,
38
+ label,
39
+ subtitle,
40
+ className: clsx("es:mr-auto", labelContainerClassName),
41
+ iconClassName,
42
+ labelClassName,
43
+ subtitleClassName,
44
+ fullWidthLabel: true,
45
+ inline: true
46
+ }
47
+ ),
39
48
  cloneElement(icons.reorderGrabberV, {
40
49
  className: "es:opacity-0 es:transition-opacity es:group-focus-visible:opacity-100 es:text-secondary-400 es:size-4 es:group-hover:opacity-100"
41
50
  }),
@@ -1,9 +1,10 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useId } from "react";
3
- import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
3
+ import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
4
4
  import { BaseControl } from "../base-control/base-control.js";
5
- import { c as clsx } from "../../lite-DVmmD_-j.js";
6
- import { L as List, a as arrayRemove, b as arrayMove } from "../../List-BiAnh5G5.js";
5
+ import { c as clsx } from "../../clsx-DgYk2OaC.js";
6
+ import { L as List, a as arrayRemove, b as arrayMove } from "../../List-BGHOoFf0.js";
7
+ import { Container, ContainerGroup } from "../base-control/container.js";
7
8
  const fixIds = (items, itemIdBase) => {
8
9
  return items?.map((item, i) => ({
9
10
  ...item,
@@ -69,6 +70,8 @@ const DraggableList = (props) => {
69
70
  actions,
70
71
  disabled,
71
72
  className,
73
+ itemClassName,
74
+ itemContainerClassName,
72
75
  labelAsHandle,
73
76
  onAfterItemRemove,
74
77
  hidden,
@@ -89,42 +92,37 @@ const DraggableList = (props) => {
89
92
  subtitle,
90
93
  help,
91
94
  actions,
92
- className: "es:w-full",
95
+ className: clsx("es:w-full", className),
93
96
  ...rest,
94
97
  children: /* @__PURE__ */ jsx(
95
98
  List,
96
99
  {
100
+ transitionDuration: 200,
97
101
  values: items,
98
102
  onChange: ({ oldIndex, newIndex }) => onChange(newIndex === -1 ? arrayRemove(items, oldIndex) : arrayMove(items, oldIndex, newIndex)),
99
103
  renderList: ({ children: children2, props: props2 }) => {
100
104
  const { key, ...rest2 } = props2;
101
105
  return /* @__PURE__ */ jsx(
102
- "ul",
106
+ ContainerGroup,
103
107
  {
104
- className: "es:w-full es:list-none",
108
+ as: "ul",
109
+ className: clsx("es:w-full es:list-none es:m-0!", itemContainerClassName),
105
110
  ...rest2,
106
111
  children: children2
107
112
  },
108
113
  key
109
114
  );
110
115
  },
111
- renderItem: ({ value, index, isDisabled, isDragged, isSelected, props: props2 }) => {
116
+ renderItem: ({ value, index, isDragged, isSelected, props: props2 }) => {
112
117
  const { key, ...rest2 } = props2;
113
118
  return /* @__PURE__ */ jsx(
114
- "li",
119
+ Container,
115
120
  {
116
- className: clsx(
117
- "es:group",
118
- "es:min-h-8 es:w-full",
119
- "es:flex es:items-center es:gap-1 es:rounded-lg",
120
- "es:transition-[box-shadow,background-color,filter,opacity,border-color]",
121
- "es:border es:border-transparent",
122
- "es:any-focus:outline-hidden es:focus:ring-2 es:focus:ring-accent-500/50 es:focus:border-accent-500",
123
- isDisabled && "es:grayscale",
124
- isDragged && "es:bg-white es:opacity-50",
125
- isSelected && "es:bg-accent-50",
126
- isDragged ? "es:cursor-grabbing" : "es:cursor-grab"
127
- ),
121
+ as: "li",
122
+ accent: isDragged || isSelected,
123
+ elevated: isDragged || isSelected,
124
+ className: clsx("es:list-none es:m-0!", itemClassName),
125
+ "data-selected": isDragged || isSelected || props2?.style?.position === "fixed",
128
126
  ...rest2,
129
127
  children: children({
130
128
  ...value,
@@ -140,7 +138,7 @@ const DraggableList = (props) => {
140
138
  }
141
139
  })
142
140
  },
143
- value?.id ?? key
141
+ key
144
142
  );
145
143
  }
146
144
  }
@@ -1,19 +1,19 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import React__default, { useRef, useCallback, useEffect, forwardRef, createContext, useContext } from "react";
2
+ import $dbSRa$react__default, { useRef, useCallback, useEffect, forwardRef, createContext, useContext } from "react";
3
3
  import { RichLabel } from "../rich-label/rich-label.js";
4
4
  import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
5
5
  import { Button } from "../button/button.js";
6
6
  import { icons } from "../../icons/icons.js";
7
7
  import { c as clsx } from "../../lite-DVmmD_-j.js";
8
- import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
9
- import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-CQ5ZZJ2w.js";
10
- import { d as $bdb11010cef70236$export$f680877a34711e37, n as $b5e257d569688ac6$export$535bd6ca7f90a273, k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, a as $64fa3d84918910a7$export$29f1550f4b0d4415, h as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, o as $64fa3d84918910a7$export$c62b8e45d58ddad9, b as $3ef42575df84b30b$export$9d1611c77c2fe928, m as $5dc95899b306f630$export$c9058316764c140e } from "../../utils-cvK1vxO7.js";
8
+ import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-BXjXzdW_.js";
9
+ import { b as $bdb11010cef70236$export$f680877a34711e37, m as $b5e257d569688ac6$export$535bd6ca7f90a273, j as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, $ as $64fa3d84918910a7$export$29f1550f4b0d4415, g as $64fa3d84918910a7$export$4d86445c2cf5e3, h as $64fa3d84918910a7$export$2881499e37b75b9a, n as $64fa3d84918910a7$export$c62b8e45d58ddad9, a as $3ef42575df84b30b$export$9d1611c77c2fe928, l as $5dc95899b306f630$export$c9058316764c140e } from "../../utils-DGpXyJOJ.js";
11
10
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-D2C6R0DK.js";
12
- import { a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../../useHover-BRDW3y7-.js";
13
- import { r as reactDomExports } from "../../index-D8-Zjpbd.js";
14
- import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "../../useEvent-BifIGnVS.js";
15
- import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-Cgm0R4Cf.js";
16
- import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DWVaNd2E.js";
11
+ import { a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../../useHover-Bycb7BsD.js";
12
+ import { r as reactDomExports } from "../../index-oFgxU4zs.js";
13
+ import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "../../useEvent-BD7Olibq.js";
14
+ import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-D3b7Kh4P.js";
15
+ import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-D8a3eYb-.js";
16
+ import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
17
17
  function $5e910fae8e128ead$export$6e3e27031a30522f(props, state, ref) {
18
18
  let { isDisabled } = props;
19
19
  let triggerId = $bdb11010cef70236$export$f680877a34711e37();
@@ -149,7 +149,7 @@ const $28f4fd908f0de97f$export$74a362b31437ec83 = /* @__PURE__ */ forwardRef(fun
149
149
  (_props_onExpandedChange = props.onExpandedChange) === null || _props_onExpandedChange === void 0 ? void 0 : _props_onExpandedChange.call(props, isExpanded2);
150
150
  }
151
151
  });
152
- let panelRef = React__default.useRef(null);
152
+ let panelRef = $dbSRa$react__default.useRef(null);
153
153
  let isDisabled = props.isDisabled || (groupState === null || groupState === void 0 ? void 0 : groupState.isDisabled) || false;
154
154
  let { buttonProps, panelProps } = $5e910fae8e128ead$export$6e3e27031a30522f({
155
155
  ...props,
@@ -173,7 +173,7 @@ const $28f4fd908f0de97f$export$74a362b31437ec83 = /* @__PURE__ */ forwardRef(fun
173
173
  let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(otherProps, {
174
174
  global: true
175
175
  });
176
- return /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
176
+ return /* @__PURE__ */ $dbSRa$react__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
177
177
  values: [
178
178
  [
179
179
  $d2b4bc8c273e7be6$export$24d547caef80ccd1,
@@ -196,7 +196,7 @@ const $28f4fd908f0de97f$export$74a362b31437ec83 = /* @__PURE__ */ forwardRef(fun
196
196
  state
197
197
  ]
198
198
  ]
199
- }, /* @__PURE__ */ React__default.createElement("div", {
199
+ }, /* @__PURE__ */ $dbSRa$react__default.createElement("div", {
200
200
  ...$3ef42575df84b30b$export$9d1611c77c2fe928(domProps, renderProps, focusWithinProps),
201
201
  ref,
202
202
  "data-expanded": state.isExpanded || void 0,
@@ -220,12 +220,12 @@ const $28f4fd908f0de97f$export$feabaa331e1d464c = /* @__PURE__ */ forwardRef(fun
220
220
  let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
221
221
  global: true
222
222
  });
223
- return /* @__PURE__ */ React__default.createElement("div", {
223
+ return /* @__PURE__ */ $dbSRa$react__default.createElement("div", {
224
224
  ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, panelProps, focusWithinProps),
225
225
  ref: $5dc95899b306f630$export$c9058316764c140e(ref, panelRef),
226
226
  role,
227
227
  "data-focus-visible-within": isFocusVisibleWithin || void 0
228
- }, /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
228
+ }, /* @__PURE__ */ $dbSRa$react__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
229
229
  values: [
230
230
  [
231
231
  $d2b4bc8c273e7be6$export$24d547caef80ccd1,
@@ -253,6 +253,8 @@ const $28f4fd908f0de97f$export$feabaa331e1d464c = /* @__PURE__ */ forwardRef(fun
253
253
  * @param {Function} [props.onOpenChange] - Function is called when the panel is opened or closed.
254
254
  * @param {object} [props.headerProps] - Props to pass to the header (label + trigger).
255
255
  * @param {JSX.Element} [props.customOpenButton] - Allows adding a custom open button. **IMPORTANT**: make sure to set `slot='trigger'` on the passed element!
256
+ * @param {boolean} [props.standalone] - If `true`, component's border radius will not adapt to the surrounding components.
257
+ * @param {boolean} [props.flat] - If `true`, component will look more flat. Useful for nested layer of controls.
256
258
  * @param {boolean} [props.hidden] - If `true`, the component is not rendered.
257
259
  *
258
260
  * @returns {JSX.Element} The Expandable component.
@@ -282,10 +284,12 @@ const Expandable = (props) => {
282
284
  onOpenChange,
283
285
  customOpenButton,
284
286
  headerProps,
287
+ standalone,
288
+ flat,
285
289
  hidden,
286
290
  ...other
287
291
  } = props;
288
- const [isOpen, setIsOpen] = React__default.useState(open);
292
+ const [isOpen, setIsOpen] = $dbSRa$react__default.useState(open);
289
293
  if (isOpen && disabled) {
290
294
  setIsOpen(false);
291
295
  }
@@ -296,13 +300,26 @@ const Expandable = (props) => {
296
300
  $28f4fd908f0de97f$export$74a362b31437ec83,
297
301
  {
298
302
  isExpanded: isOpen,
299
- 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),
303
+ className: clsx("es:text-sm", !standalone && "es:group", className),
300
304
  ...other,
301
305
  children: [
302
306
  /* @__PURE__ */ jsxs(
303
307
  "div",
304
308
  {
305
- 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),
309
+ className: clsx(
310
+ "es:flex es:items-center es:gap-1 es:pr-1.25 es:py-1 es:pl-2.5",
311
+ standalone && "es:rounded-xl",
312
+ !standalone && "es:rounded-md es:group-first:rounded-t-xl es:group-after-current:rounded-t-xl",
313
+ "es:inset-ring",
314
+ "es:inset-shadow-xs",
315
+ isOpen && "es:bg-surface-100 es:inset-ring-surface-300/75 es:inset-shadow-surface-100/30",
316
+ isOpen && "es:rounded-b-md es:rounded-t-xl",
317
+ !isOpen && "es:bg-white es:bg-linear-to-b es:from-25% es:from-secondary-100/5 es:to-secondary-300/10 es:inset-ring-secondary-300/45 es:inset-shadow-secondary-200/50",
318
+ !isOpen && !standalone && "es:rounded-b-md es:group-last:rounded-b-xl es:group-before-current:rounded-b-xl",
319
+ !flat && "es:shadow-xs es:shadow-black/5",
320
+ "es:transition-plus es:duration-200 es:motion-ease-spring-bouncy",
321
+ headerClassName
322
+ ),
306
323
  ...headerProps,
307
324
  children: [
308
325
  /* @__PURE__ */ jsx(
@@ -311,22 +328,22 @@ const Expandable = (props) => {
311
328
  icon,
312
329
  label,
313
330
  subtitle,
314
- className: labelClassName,
315
- as: $01b77f81d0f07f68$export$b04be29aa201d4f5,
316
- fullWidth: true
331
+ className: clsx("es:grow", labelClassName),
332
+ as: $01b77f81d0f07f68$export$b04be29aa201d4f5
317
333
  }
318
334
  ),
319
335
  actions && !keepActionsOnExpand && /* @__PURE__ */ jsx(
320
336
  AnimatedVisibility,
321
337
  {
322
338
  visible: !isOpen,
323
- className: "es:ml-auto es:flex es:gap-2",
324
- transition: "slideFadeDownSlight",
339
+ className: "es:flex es:gap-1 es:shrink-0",
340
+ transition: "scaleFade",
341
+ decreaseBounce: true,
325
342
  noInitial: true,
326
343
  children: actions
327
344
  }
328
345
  ),
329
- actions && keepActionsOnExpand && /* @__PURE__ */ jsx("div", { className: "es:ml-auto es:flex es:gap-2", children: actions }),
346
+ actions && keepActionsOnExpand && /* @__PURE__ */ jsx("div", { className: "es:flex es:gap-1 es:shrink-0", children: actions }),
330
347
  customOpenButton && customOpenButton({
331
348
  open: isOpen,
332
349
  toggleOpen: () => {
@@ -343,7 +360,7 @@ const Expandable = (props) => {
343
360
  {
344
361
  slot: "trigger",
345
362
  type: "ghost",
346
- icon: isOpen ? icons.caretDownFill : icons.caretDown,
363
+ icon: icons.dropdownCaretAlt,
347
364
  onPress: () => {
348
365
  setIsOpen(!isOpen);
349
366
  if (onOpenChange) {
@@ -352,7 +369,11 @@ const Expandable = (props) => {
352
369
  },
353
370
  tooltip: isOpen ? __("Close", "eightshift-ui-components") : __("Open", "eightshift-ui-components"),
354
371
  disabled,
355
- className: clsx("es:icon:size-5 es:icon:transition-transform", isOpen && "es:icon:-scale-y-100"),
372
+ className: clsx(
373
+ "es:icon:transition-plus es:ease-spring-bouncier es:duration-400",
374
+ isOpen && "es:icon:-scale-y-100 es:icon:text-surface-600",
375
+ !isOpen && "es:icon:text-secondary-500"
376
+ ),
356
377
  size: "small"
357
378
  }
358
379
  )
@@ -363,11 +384,18 @@ const Expandable = (props) => {
363
384
  $28f4fd908f0de97f$export$feabaa331e1d464c,
364
385
  {
365
386
  className: clsx(
366
- isOpen && "es:space-y-2.5 es:border-t es:border-t-secondary-200 es:p-2",
367
- isOpen && "es:motion-safe:motion-preset-slide-down-sm es:motion-safe:motion-ease-spring-smooth es:motion-safe:motion-ease-linear/opacity es:motion-safe:motion-duration-300 es:motion-reduce:motion-preset-fade-md",
387
+ "es:h-(--disclosure-panel-height)",
388
+ "es:opacity-0 es:blur-[1px] es:-translate-y-2",
389
+ !isOpen && "es:rounded-t-xl",
390
+ isOpen && "es:rounded-t-sm es:opacity-100 es:blur-none es:translate-y-0 es:mt-1",
391
+ "es:origin-top",
392
+ "es:bg-white es:rounded-b-xl es:inset-ring es:inset-ring-surface-200",
393
+ "es:inset-shadow-sm es:inset-shadow-accent-600/5",
394
+ !flat && "es:shadow-xs es:shadow-black/5",
395
+ "es:transition-plus-h",
368
396
  contentClassName
369
397
  ),
370
- children
398
+ children: /* @__PURE__ */ jsx("div", { className: "es:space-y-1 es:px-3 es:py-3.5", children })
371
399
  }
372
400
  )
373
401
  ]
@@ -5,9 +5,10 @@ import { Button, ButtonGroup } from "./button/button.js";
5
5
  import { Checkbox } from "./checkbox/checkbox.js";
6
6
  import { ComponentToggle } from "./component-toggle/component-toggle.js";
7
7
  import { ContainerPanel } from "./container-panel/container-panel.js";
8
- import { ColorSwatch } from "./color-pickers/color-swatch.js";
8
+ import { C } from "../color-swatch-CFIuSPcO.js";
9
9
  import { ColorPicker } from "./color-pickers/color-picker.js";
10
10
  import { ColumnConfigSlider, ColumnConfigSliderOutput } from "./slider/column-config-slider.js";
11
+ import { Container, ContainerGroup } from "./base-control/container.js";
11
12
  import { DraggableList } from "./draggable-list/draggable-list.js";
12
13
  import { DraggableListItem, DraggableListItemHandle } from "./draggable-list/draggable-list-item.js";
13
14
  import { DraggableContext } from "./draggable/draggable-context.js";
@@ -37,15 +38,10 @@ import { RepeaterItem } from "./repeater/repeater-item.js";
37
38
  import { Responsive } from "./responsive/responsive.js";
38
39
  import { ResponsiveLegacy } from "./responsive/responsive-legacy.js";
39
40
  import { ResponsivePreview } from "./responsive-preview/responsive-preview.js";
40
- import { __AsyncMultiSelectNext } from "./select/v2/async-multi-select.js";
41
41
  import { AsyncMultiSelect } from "./select/async-multi-select.js";
42
- import { AsyncSelect } from "./select/async-single-select.js";
43
- import { AsyncSelectNext } from "./select/v2/async-select.js";
44
- import { SelectNext } from "./select/v2/single-select.js";
45
- import { __MultiSelectNext } from "./select/v2/multi-select.js";
42
+ import { AsyncSelect } from "./select/async-select.js";
46
43
  import { Modal } from "./modal/modal.js";
47
44
  import { MultiSelect } from "./select/multi-select.js";
48
- import { RSClearIndicator, RSDropdownIndicator, RSMultiValue, RSMultiValueContainer, RSMultiValueLabel, RSMultiValueRemove, RSOption, RSSingleValue } from "./select/react-select-component-wrappers.js";
49
45
  import { OptionSelect } from "./option-select/option-select.js";
50
46
  import { OptionsPanel, OptionsPanelHeader, OptionsPanelIntro, OptionsPanelSection } from "./options-panel/options-panel.js";
51
47
  import { Select } from "./select/single-select.js";
@@ -63,17 +59,18 @@ export {
63
59
  AnimatedVisibility,
64
60
  AsyncMultiSelect,
65
61
  AsyncSelect,
66
- AsyncSelectNext,
67
62
  BaseControl,
68
63
  BreakpointPreview,
69
64
  Button,
70
65
  ButtonGroup,
71
66
  Checkbox,
72
67
  ColorPicker,
73
- ColorSwatch,
68
+ C as ColorSwatch,
74
69
  ColumnConfigSlider,
75
70
  ColumnConfigSliderOutput,
76
71
  ComponentToggle,
72
+ Container,
73
+ ContainerGroup,
77
74
  ContainerPanel,
78
75
  DecorativeTooltip,
79
76
  Draggable,
@@ -110,14 +107,6 @@ export {
110
107
  OptionsPanelSection,
111
108
  Popover,
112
109
  PortalProvider,
113
- RSClearIndicator,
114
- RSDropdownIndicator,
115
- RSMultiValue,
116
- RSMultiValueContainer,
117
- RSMultiValueLabel,
118
- RSMultiValueRemove,
119
- RSOption,
120
- RSSingleValue,
121
110
  RadioButton,
122
111
  RadioButtonGroup,
123
112
  Repeater,
@@ -127,7 +116,6 @@ export {
127
116
  ResponsivePreview,
128
117
  RichLabel,
129
118
  Select,
130
- SelectNext,
131
119
  Slider,
132
120
  SmartImage,
133
121
  SolidColorPicker,
@@ -142,7 +130,5 @@ export {
142
130
  ToggleButton,
143
131
  Tooltip,
144
132
  TriggeredPopover,
145
- VStack,
146
- __AsyncMultiSelectNext,
147
- __MultiSelectNext
133
+ VStack
148
134
  };