@eightshift/ui-components 5.6.1 → 6.0.1
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.
- package/dist/{Button-CQ5ZZJ2w.js → Button-BXjXzdW_.js} +13 -13
- package/dist/{Dialog-BMgMUQuN.js → Dialog-D8bjn-nh.js} +404 -77
- package/dist/{FieldError-B8BgFmIQ.js → FieldError-DwBG6m1U.js} +2 -2
- package/dist/{FocusScope-B5vxRkHm.js → FocusScope-BMk5oZCk.js} +8 -8
- package/dist/{Heading-B5aEynOM.js → Heading-BmRX4BRL.js} +3 -3
- package/dist/{Hidden-rE6uR-lr.js → Hidden-Rfj-STx7.js} +4 -4
- package/dist/{Input-8yja_IHC.js → Input-CNNksOWg.js} +11 -11
- package/dist/{Label-DWVaNd2E.js → Label-D8a3eYb-.js} +4 -4
- package/dist/{List-BiAnh5G5.js → List-BGHOoFf0.js} +8 -8
- package/dist/{ListBox-DggfiuO_.js → ListBox-Dd37zMvs.js} +40 -41
- package/dist/{OverlayArrow-DraDOoRn.js → OverlayArrow-DokC40S3.js} +6 -6
- package/dist/{PortalProvider---wyKpMr.js → PortalProvider-CHPnqDSH.js} +2 -2
- package/dist/RadioGroup-BVFvITWO.js +371 -0
- package/dist/{SearchField-DWGdCvnn.js → SearchField-CHYnN-jt.js} +16 -16
- package/dist/{SelectionManager-B6-b5NM2.js → SelectionManager-N8X7T_4D.js} +44 -46
- package/dist/{SharedElementTransition-fML-zIv6.js → SharedElementTransition-BDT84GtD.js} +3 -3
- package/dist/{Slider-DfU6bRtH.js → Slider-CL5CM9S8.js} +23 -23
- package/dist/{Text-AxKZjtFm.js → Text-ztX6G1zR.js} +3 -3
- package/dist/{VisuallyHidden-CgnIuZJ2.js → VisuallyHidden-DTUuKFiI.js} +4 -4
- package/dist/assets/style-admin.css +12156 -2
- package/dist/assets/style-editor.css +12156 -2
- package/dist/assets/style.css +12162 -2
- package/dist/assets/wp-overrides/allow-full-width-blocks.css +6 -0
- package/dist/assets/wp-overrides/fix-label-text-case.css +29 -0
- package/dist/assets/wp-overrides/increase-sidebar-width.css +4 -0
- package/dist/assets/wp-overrides/make-block-messages-nicer.css +155 -0
- package/dist/assets/wp-overrides/replace-fonts.css +8 -0
- package/dist/assets/wp-overrides/restyle-tooltips.css +194 -0
- package/dist/assets/wp-overrides/round-corners.css +200 -0
- package/dist/assets/wp-overrides/unify-button-sizes.css +5 -0
- package/dist/clsx-DgYk2OaC.js +16 -0
- package/dist/{Color-WxFE7lQB.js → color-swatch-CFIuSPcO.js} +124 -6
- package/dist/components/animated-visibility/animated-visibility.js +25 -17
- package/dist/components/base-control/base-control.js +8 -5
- package/dist/components/base-control/container.js +204 -0
- package/dist/components/button/button.js +249 -155
- package/dist/components/checkbox/checkbox.js +96 -37
- package/dist/components/color-pickers/color-picker.js +16 -7
- package/dist/components/color-pickers/color-swatch.js +5 -57
- package/dist/components/color-pickers/gradient-editor.js +161 -138
- package/dist/components/color-pickers/solid-color-picker.js +308 -206
- package/dist/components/component-toggle/component-toggle.js +12 -8
- package/dist/components/container-panel/container-panel.js +54 -31
- package/dist/components/draggable/draggable-handle.js +8 -7
- package/dist/components/draggable/draggable.js +2 -2
- package/dist/components/draggable-list/draggable-list-item.js +21 -12
- package/dist/components/draggable-list/draggable-list.js +19 -21
- package/dist/components/expandable/expandable.js +56 -28
- package/dist/components/index.js +7 -21
- package/dist/components/input-field/input-field.js +112 -35
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +181 -121
- package/dist/components/matrix-align/matrix-align.js +54 -20
- package/dist/components/menu/menu.js +26 -34
- package/dist/components/modal/modal.js +31 -28
- package/dist/components/notice/notice.js +45 -28
- package/dist/components/number-picker/number-picker.js +151 -101
- package/dist/components/option-select/option-select.js +40 -4
- package/dist/components/options-panel/options-panel.js +52 -25
- package/dist/components/placeholders/file-picker-shell.js +10 -9
- package/dist/components/placeholders/file-placeholder.js +14 -6
- package/dist/components/placeholders/image-placeholder.js +14 -4
- package/dist/components/placeholders/media-placeholder.js +11 -4
- package/dist/components/popover/popover.js +14 -11
- package/dist/components/portal-provider/portal-provider.js +1 -1
- package/dist/components/radio/radio.js +118 -429
- package/dist/components/repeater/repeater-item.js +7 -10
- package/dist/components/repeater/repeater.js +9 -15
- package/dist/components/responsive/mini-responsive.js +53 -61
- package/dist/components/responsive/responsive-legacy.js +1 -1
- package/dist/components/responsive/responsive.js +27 -27
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/rich-label/rich-label.js +5 -5
- package/dist/components/select/async-multi-select.js +467 -100
- package/dist/components/select/{v2/async-select.js → async-select.js} +182 -105
- package/dist/components/select/multi-select.js +437 -83
- package/dist/components/select/shared.js +14 -42
- package/dist/components/select/single-select.js +349 -54
- package/dist/components/slider/column-config-slider.js +138 -45
- package/dist/components/slider/slider.js +265 -205
- package/dist/components/slider/utils.js +32 -1
- package/dist/components/smart-image/smart-image.js +25 -4
- package/dist/components/smart-image/worker-inline.js +1 -1
- package/dist/components/spacer/spacer.js +2 -2
- package/dist/components/tabs/tabs.js +370 -101
- package/dist/components/toggle/switch.js +174 -39
- package/dist/components/toggle/toggle.js +6 -3
- package/dist/components/toggle-button/toggle-button.js +140 -56
- package/dist/components/tooltip/tooltip.js +27 -26
- package/dist/{context-DMOmz986.js → context-BQvmiUqb.js} +3 -3
- package/dist/{default-i18n-DBm-GqWM.js → default-i18n-CnQeC5Pl.js} +10 -10
- package/dist/{general-Ck8IV7xJ.js → general-B6pOveVp.js} +11 -10
- package/dist/icons/icons.js +28 -9
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/icons/spinner.js +3 -1
- package/dist/{index-Dq3gT5pW.js → index-BHpUy2Ix.js} +1 -1
- package/dist/{index-D8-Zjpbd.js → index-oFgxU4zs.js} +3 -3
- package/dist/index.js +6 -20
- package/dist/proxy-0B6wWuDe.js +7409 -0
- package/dist/{react-jsx-parser.min-VUl-CuCv.js → react-jsx-parser.min-B_hvYYa1.js} +5 -5
- package/dist/{Select-BvggcFOX.js → shared-DwjRce5e.js} +170 -36
- package/dist/{textSelection-DbCKqaw8.js → textSelection-CwHUtNVX.js} +1 -1
- package/dist/{useButton-v9ngEj50.js → useButton-DdZrS1Kz.js} +3 -3
- package/dist/{useEvent-BifIGnVS.js → useEvent-BD7Olibq.js} +1 -1
- package/dist/{useFilter-BlkUH1Ma.js → useFilter-bhxeEDg8.js} +1 -1
- package/dist/{useFocusRing-Cgm0R4Cf.js → useFocusRing-D3b7Kh4P.js} +1 -1
- package/dist/{useFormReset-yV9VVy9R.js → useFormReset-WUv2PdFO.js} +1 -1
- package/dist/{useFormValidation-CeNsUGWK.js → useFormValidation-DQeXkyLm.js} +2 -2
- package/dist/{useHover-BRDW3y7-.js → useHover-Bycb7BsD.js} +7 -7
- package/dist/{useLabel-C8umX0gk.js → useLabel-Bnv4-T24.js} +2 -2
- package/dist/{useLabels-Cdxi6JSa.js → useLabels-B49ptFDX.js} +1 -1
- package/dist/{useListState-RdLrYsMP.js → useListState-ZKhRO8ML.js} +1 -1
- package/dist/{useLocalizedStringFormatter-eaZiN2tE.js → useLocalizedStringFormatter-NETP-8H8.js} +1 -1
- package/dist/{useNumberField-D16dDfYF.js → useNumberField-D2fUHql3.js} +10 -10
- package/dist/{useNumberFormatter-BCmkV-7c.js → useNumberFormatter-DGvuRCn7.js} +1 -1
- package/dist/{usePress-DJskZBH9.js → usePress-B8OteQMu.js} +6 -6
- package/dist/{useSingleSelectListState-n0AVMr3Y.js → useSingleSelectListState-BBTu4shO.js} +2 -2
- package/dist/{useToggle-DSBDAfdw.js → useToggle-BZhaYwZl.js} +4 -4
- package/dist/{useToggleState-CzN79ary.js → useToggleState-VkXJjsru.js} +1 -1
- package/dist/utilities/general.js +1 -1
- package/dist/utilities/index.js +1 -1
- package/dist/{utils-cvK1vxO7.js → utils-DGpXyJOJ.js} +29 -42
- package/dist/workers/image-analysis.worker.js +3 -3
- package/package.json +26 -22
- package/dist/ColorSwatch-xVS3rMYS.js +0 -66
- package/dist/Select-ef7c0426.esm-CmTkSxDx.js +0 -2474
- package/dist/Separator-B-xeqOkC.js +0 -344
- package/dist/assets/wp-font-enhancements.css +0 -2
- package/dist/assets/wp-ui-enhancements.css +0 -2
- package/dist/components/select/async-single-select.js +0 -138
- package/dist/components/select/custom-select-default-components.js +0 -38
- package/dist/components/select/multi-select-components.js +0 -8
- package/dist/components/select/react-select-component-wrappers.js +0 -90
- package/dist/components/select/styles.js +0 -49
- package/dist/components/select/v2/async-multi-select.js +0 -432
- package/dist/components/select/v2/multi-select.js +0 -403
- package/dist/components/select/v2/shared.js +0 -69
- package/dist/components/select/v2/single-select.js +0 -358
- package/dist/index-641ee5b8.esm-DVp0njHa.js +0 -3139
- package/dist/modifiers.esm-BuJQPI1X.js +0 -31
- package/dist/multi-select-components-CT_W0Cy9.js +0 -3744
- package/dist/react-select-async.esm-Zl1LPaPb.js +0 -107
- package/dist/react-select.esm-Bu36HujU.js +0 -15
- package/dist/useDragAndDrop-C08ZXv4F.js +0 -3925
- package/dist/wp/wp-font-enhancements.js +0 -1
- package/dist/wp/wp-ui-enhancements.js +0 -1
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useId, useState } from "react";
|
|
3
|
-
import { _ as __ } from "../../default-i18n-
|
|
3
|
+
import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
|
|
4
4
|
import { Button } from "../button/button.js";
|
|
5
5
|
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
9
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
10
|
-
import { L as List, a as arrayRemove, b as arrayMove } from "../../List-
|
|
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
|
-
const fixIds = (items, itemIdBase) => {
|
|
13
|
-
return items?.map((item, i) => ({
|
|
14
|
-
...item,
|
|
15
|
-
id: item?.id ?? `${itemIdBase}-${i}`
|
|
16
|
-
}));
|
|
17
|
-
};
|
|
18
12
|
/**
|
|
19
13
|
* A component that allows re-ordering a list of items with additional sub-options.
|
|
20
14
|
*
|
|
@@ -77,7 +71,7 @@ const Repeater = (props) => {
|
|
|
77
71
|
const {
|
|
78
72
|
children,
|
|
79
73
|
onChange,
|
|
80
|
-
items
|
|
74
|
+
items,
|
|
81
75
|
icon,
|
|
82
76
|
label,
|
|
83
77
|
subtitle,
|
|
@@ -104,7 +98,6 @@ const Repeater = (props) => {
|
|
|
104
98
|
if (typeof rawItems === "undefined" || rawItems === null || !Array.isArray(rawItems)) {
|
|
105
99
|
console.warn(__("Repeater: 'items' are not an array or are undefined!", "eightshift-ui-components"));
|
|
106
100
|
}
|
|
107
|
-
const items = fixIds(rawItems ?? [], itemIdBase);
|
|
108
101
|
const canDelete = items.length > (minItems ?? 0);
|
|
109
102
|
const canAdd = items.length < (maxItems ?? Number.MAX_SAFE_INTEGER) && !addDisabled;
|
|
110
103
|
if (hidden) {
|
|
@@ -154,7 +147,8 @@ const Repeater = (props) => {
|
|
|
154
147
|
icon: icons.add,
|
|
155
148
|
className: clsx("es:icon:size-4", !hideEmptyState && items.length < 1 && "es:invisible"),
|
|
156
149
|
tooltip: __("Add item", "eightshift-ui-components"),
|
|
157
|
-
disabled: addDisabled || !canAdd
|
|
150
|
+
disabled: addDisabled || !canAdd,
|
|
151
|
+
type: "simple"
|
|
158
152
|
}
|
|
159
153
|
),
|
|
160
154
|
addButton && /* @__PURE__ */ jsx("div", { className: clsx(!hideEmptyState && items.length < 1 && "es:invisible"), children: addButton({
|
|
@@ -173,14 +167,14 @@ const Repeater = (props) => {
|
|
|
173
167
|
/* @__PURE__ */ jsx(
|
|
174
168
|
List,
|
|
175
169
|
{
|
|
176
|
-
values: items.map((item) => ({ ...item, disabled: openItems[item
|
|
170
|
+
values: items.map((item) => ({ ...item, disabled: openItems?.[item?.id] })),
|
|
177
171
|
onChange: ({ oldIndex, newIndex }) => onChange(newIndex === -1 ? arrayRemove(items, oldIndex) : arrayMove(items, oldIndex, newIndex)),
|
|
178
172
|
renderList: ({ children: children2, props: props2 }) => {
|
|
179
173
|
const { key, ...rest } = props2;
|
|
180
174
|
return /* @__PURE__ */ jsx(
|
|
181
175
|
"ul",
|
|
182
176
|
{
|
|
183
|
-
className: clsx("es:w-full es:list-none", className),
|
|
177
|
+
className: clsx("es:w-full es:list-none es:m-0! es:flex es:flex-col es:gap-1", className),
|
|
184
178
|
...rest,
|
|
185
179
|
children: children2
|
|
186
180
|
},
|
|
@@ -192,7 +186,7 @@ const Repeater = (props) => {
|
|
|
192
186
|
return /* @__PURE__ */ jsx(
|
|
193
187
|
"li",
|
|
194
188
|
{
|
|
195
|
-
className: "es:group es:w-full es:list-none es:any-focus:outline-hidden",
|
|
189
|
+
className: "es:group es:w-full es:list-none es:any-focus:outline-hidden es:m-0!",
|
|
196
190
|
...rest,
|
|
197
191
|
children: /* @__PURE__ */ jsx(
|
|
198
192
|
RepeaterContext.Provider,
|
|
@@ -241,7 +235,7 @@ const Repeater = (props) => {
|
|
|
241
235
|
}
|
|
242
236
|
)
|
|
243
237
|
},
|
|
244
|
-
|
|
238
|
+
key
|
|
245
239
|
);
|
|
246
240
|
},
|
|
247
241
|
removableByMove: !noDragToRemove
|
|
@@ -3,17 +3,16 @@ import { cloneElement } from "react";
|
|
|
3
3
|
import { DecorativeTooltip } from "../tooltip/tooltip.js";
|
|
4
4
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
5
|
import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
|
|
6
|
-
import { _ as __ } from "../../default-i18n-
|
|
6
|
+
import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
|
|
7
7
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
8
8
|
import { upperFirst } from "../../utilities/es-dash.js";
|
|
9
9
|
import { icons } from "../../icons/icons.js";
|
|
10
10
|
import { ResponsivePreview } from "../responsive-preview/responsive-preview.js";
|
|
11
11
|
import { ButtonGroup, Button } from "../button/button.js";
|
|
12
|
-
import { Spacer } from "../spacer/spacer.js";
|
|
13
12
|
import { BaseControl } from "../base-control/base-control.js";
|
|
14
13
|
import { TriggeredPopover } from "../popover/popover.js";
|
|
15
14
|
import { OptionSelect } from "../option-select/option-select.js";
|
|
16
|
-
import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../Text-
|
|
15
|
+
import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../Text-ztX6G1zR.js";
|
|
17
16
|
/**
|
|
18
17
|
* A compact, inline version of `Responsive`. Allows the user to set different values for different breakpoints.
|
|
19
18
|
*
|
|
@@ -118,13 +117,13 @@ const MiniResponsive = (props) => {
|
|
|
118
117
|
offset: 7.5,
|
|
119
118
|
arrow: true,
|
|
120
119
|
text: /* @__PURE__ */ jsxs("div", { className: "es:max-w-64 es:p-1", children: [
|
|
121
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
122
|
-
/* @__PURE__ */ jsxs("span", { className:
|
|
120
|
+
/* @__PURE__ */ jsx("span", { className: 'es:block es:font-variation-["wdth"_180,"wght"_500] es:text-base es:leading-none es:text-surface-600', children: __("Default", "eightshift-ui-components") }),
|
|
121
|
+
/* @__PURE__ */ jsxs("span", { className: 'es:block es:text-balance es:tabular-nums es:font-variation-["wdth"_60,"wght"_300] es:text-surface-500 es:mt-1', children: [
|
|
123
122
|
!firstMobileFirstOverride && !lastDesktopFirstOverride && __("Always applied, regardless of browser width.", "eightshift-ui-components"),
|
|
124
123
|
firstMobileFirstOverride && !isDesktopFirst && sprintf(__("Applies when the browser width is %dpx or less.", "eightshift-ui-components"), breakpointData[firstMobileFirstOverride] - 1),
|
|
125
124
|
lastDesktopFirstOverride && isDesktopFirst && sprintf(__("Applies when the browser width is %dpx or more.", "eightshift-ui-components"), breakpointData[lastDesktopFirstOverride.replace("max-", "")])
|
|
126
125
|
] }),
|
|
127
|
-
/* @__PURE__ */ jsxs("div", { className: "es:mx-auto", children: [
|
|
126
|
+
/* @__PURE__ */ jsxs("div", { className: "es:mx-auto es:mt-5", children: [
|
|
128
127
|
firstMobileFirstOverride && !isDesktopFirst && /* @__PURE__ */ jsx(
|
|
129
128
|
BreakpointPreview,
|
|
130
129
|
{
|
|
@@ -167,7 +166,7 @@ const MiniResponsive = (props) => {
|
|
|
167
166
|
)
|
|
168
167
|
] })
|
|
169
168
|
] }),
|
|
170
|
-
children: /* @__PURE__ */ jsx("div", { className: "es:
|
|
169
|
+
children: /* @__PURE__ */ jsx("div", { className: "es:icon:size-6 es:mx-0.5 es:text-accent-700", children: icons?.[overrideIcon] ?? overrideIcon ?? icons[`screen${upperFirst(isDesktopFirst ? rawBreakpoints.at(-1) : rawBreakpoints.at(0))}`] })
|
|
171
170
|
}
|
|
172
171
|
);
|
|
173
172
|
};
|
|
@@ -194,43 +193,22 @@ const MiniResponsive = (props) => {
|
|
|
194
193
|
/* @__PURE__ */ jsxs(
|
|
195
194
|
TriggeredPopover,
|
|
196
195
|
{
|
|
197
|
-
triggerButtonIcon: cloneElement(
|
|
196
|
+
triggerButtonIcon: cloneElement(icons.dropdownCaretAlt, { className: "es:size-5!" }),
|
|
198
197
|
triggerButtonProps: {
|
|
199
198
|
tooltip: __("Responsive overrides", "eightshift-ui-components"),
|
|
200
|
-
className: "es:w-
|
|
199
|
+
className: "es:w-6"
|
|
201
200
|
},
|
|
202
|
-
className: "es:min-w-80 es:
|
|
201
|
+
className: "es:min-w-80 es:p-0!",
|
|
202
|
+
wrapperClassName: "es:rounded-3xl",
|
|
203
203
|
children: [
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
|
|
206
|
-
/* @__PURE__ */ jsx(
|
|
207
|
-
OptionSelect,
|
|
208
|
-
{
|
|
209
|
-
hidden: noModeSelect,
|
|
210
|
-
"aria-label": __("Breakpoint mode", "eightshift-ui-components"),
|
|
211
|
-
value: isDesktopFirst,
|
|
212
|
-
onChange: (newMode) => {
|
|
213
|
-
onChange({
|
|
214
|
-
_default: value["_default"],
|
|
215
|
-
_desktopFirst: newMode
|
|
216
|
-
});
|
|
217
|
-
},
|
|
218
|
-
options: [
|
|
219
|
-
{ label: __("Mobile-first", "eightshift-ui-components"), subtitle: __("Default", "eightshift-ui-components"), value: false },
|
|
220
|
-
{ label: __("Desktop-first", "eightshift-ui-components"), value: true }
|
|
221
|
-
],
|
|
222
|
-
wrapperProps: { triggerProps: { size: "small" } },
|
|
223
|
-
type: "menu",
|
|
224
|
-
tooltip: true
|
|
225
|
-
}
|
|
226
|
-
)
|
|
227
|
-
] }),
|
|
228
|
-
/* @__PURE__ */ jsxs("div", { className: "es:space-y-2 es:px-2 es:py-2.5", children: [
|
|
204
|
+
/* @__PURE__ */ jsx("div", { className: "es:flex es:items-center es:justify-between es:pt-3 es:px-3.5", children: /* @__PURE__ */ jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { className: 'es:block es:text-lg es:text-surface-600 es:font-variation-["wdth"_180,"wght"_325]', children: __("Responsive overrides", "eightshift-ui-components") }) }),
|
|
205
|
+
/* @__PURE__ */ jsxs("div", { className: "es:px-2 es:mt-1 es:space-y-0.5", children: [
|
|
229
206
|
!isDesktopFirst && /* @__PURE__ */ jsxs(
|
|
230
207
|
"div",
|
|
231
208
|
{
|
|
232
209
|
className: clsx(
|
|
233
210
|
"es:grid es:grid-cols-[minmax(0,1.75rem)_minmax(0,1fr)_minmax(0,2.25rem)] es:items-center es:gap-x-2",
|
|
211
|
+
"es:bg-white/50 es:p-1.5 es:rounded-sm es:first:rounded-t-2xl es:last:rounded-b-2xl es:inset-ring es:inset-ring-accent-600/25",
|
|
234
212
|
innerContentAlign === "start" && "es:justify-items-start",
|
|
235
213
|
innerContentAlign === "center" && "es:justify-items-center",
|
|
236
214
|
innerContentAlign === "end" && "es:justify-items-end",
|
|
@@ -262,7 +240,8 @@ const MiniResponsive = (props) => {
|
|
|
262
240
|
"div",
|
|
263
241
|
{
|
|
264
242
|
className: clsx(
|
|
265
|
-
"es:grid es:grid-cols-[minmax(0,auto)_minmax(0,1fr)_minmax(0,2.25rem)] es:items-center es:gap-x-
|
|
243
|
+
"es:grid es:grid-cols-[minmax(0,auto)_minmax(0,1fr)_minmax(0,2.25rem)] es:items-center es:gap-x-1.5",
|
|
244
|
+
"es:bg-white/50 es:p-1.5 es:rounded-sm es:first:rounded-t-2xl es:last:rounded-b-2xl es:inset-ring es:inset-ring-surface-200/60",
|
|
266
245
|
innerContentAlign === "start" && "es:justify-items-start",
|
|
267
246
|
innerContentAlign === "center" && "es:justify-items-center",
|
|
268
247
|
innerContentAlign === "end" && "es:justify-items-end",
|
|
@@ -277,8 +256,8 @@ const MiniResponsive = (props) => {
|
|
|
277
256
|
offset: 7.5,
|
|
278
257
|
arrow: true,
|
|
279
258
|
text: /* @__PURE__ */ jsxs("div", { className: "es:max-w-96 es:p-1", children: [
|
|
280
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
281
|
-
/* @__PURE__ */ jsxs("span", { className:
|
|
259
|
+
/* @__PURE__ */ jsx("span", { className: 'es:block es:font-variation-["wdth"_180,"wght"_500] es:text-base es:leading-none es:text-surface-600', children: breakpointUiData?.[realBreakpointName]?.label ?? upperFirst(realBreakpointName) }),
|
|
260
|
+
/* @__PURE__ */ jsxs("span", { className: 'es:block es:text-balance es:tabular-nums es:font-variation-["wdth"_60,"wght"_300] es:text-surface-500 es:mt-1', children: [
|
|
282
261
|
!isDesktopFirst && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
283
262
|
!belowOverride && typeof value[breakpoint] !== "undefined" && sprintf(__("Applied when the browser width is %dpx or more.", "eightshift-ui-components"), breakpointData[realBreakpointName]),
|
|
284
263
|
belowOverride && typeof value[breakpoint] !== "undefined" && sprintf(
|
|
@@ -298,8 +277,8 @@ const MiniResponsive = (props) => {
|
|
|
298
277
|
typeof value[breakpoint] === "undefined" && sprintf(__("Up to %dpx", "eightshift-ui-components"), breakpointData[breakpoint?.replace("max-", "")])
|
|
299
278
|
] })
|
|
300
279
|
] }),
|
|
301
|
-
typeof value[breakpoint] === "undefined" && /* @__PURE__ */ jsx("span", { className:
|
|
302
|
-
typeof value[breakpoint] !== "undefined" && /* @__PURE__ */ jsxs("div", { className: "es:mx-auto es:mt-
|
|
280
|
+
typeof value[breakpoint] === "undefined" && /* @__PURE__ */ jsx("span", { className: 'es:mt-2 es:block es:font-variation-["wdth"_100,"YTLC"_520,"wght"_350,"slnt"_-10]', children: __("Not set", "eightshift-ui-components") }),
|
|
281
|
+
typeof value[breakpoint] !== "undefined" && /* @__PURE__ */ jsxs("div", { className: "es:mx-auto es:mt-5", children: [
|
|
303
282
|
!isDesktopFirst && /* @__PURE__ */ jsx(
|
|
304
283
|
BreakpointPreview,
|
|
305
284
|
{
|
|
@@ -368,10 +347,7 @@ const MiniResponsive = (props) => {
|
|
|
368
347
|
children: /* @__PURE__ */ jsx(
|
|
369
348
|
"div",
|
|
370
349
|
{
|
|
371
|
-
className: clsx(
|
|
372
|
-
"es:flex es:size-7 es:items-center es:justify-center es:rounded es:border es:p-0.5 es:shadow-sm es:transition-colors es:icon:size-5",
|
|
373
|
-
typeof value[breakpoint] !== "undefined" ? "es:border-secondary-200 es:bg-secondary-50 es:text-secondary-700" : "es:border-secondary-100 es:bg-white es:text-secondary-500"
|
|
374
|
-
),
|
|
350
|
+
className: clsx("es:transition-colors es:icon:size-6 es:mx-0.5", typeof value[breakpoint] !== "undefined" ? "es:text-surface-600" : "es:text-surface-300"),
|
|
375
351
|
children: icons?.[breakpointUiData?.[realBreakpointName]?.icon] ?? breakpointUiData?.[realBreakpointName]?.icon ?? icons?.[`screen${upperFirst(realBreakpointName)}`]
|
|
376
352
|
}
|
|
377
353
|
)
|
|
@@ -412,6 +388,7 @@ const MiniResponsive = (props) => {
|
|
|
412
388
|
{
|
|
413
389
|
className: clsx(
|
|
414
390
|
"es:grid es:grid-cols-[minmax(0,1.75rem)_minmax(0,1fr)_minmax(0,2.25rem)] es:items-center es:gap-x-2",
|
|
391
|
+
"es:bg-white/50 es:p-1.5 es:rounded-sm es:first:rounded-t-2xl es:last:rounded-b-2xl es:inset-ring es:inset-ring-accent-600/25",
|
|
415
392
|
innerContentAlign === "start" && "es:justify-items-start",
|
|
416
393
|
innerContentAlign === "center" && "es:justify-items-center",
|
|
417
394
|
innerContentAlign === "end" && "es:justify-items-end",
|
|
@@ -435,15 +412,15 @@ const MiniResponsive = (props) => {
|
|
|
435
412
|
"_default-desktop-first"
|
|
436
413
|
)
|
|
437
414
|
] }),
|
|
438
|
-
/* @__PURE__ */ jsxs(
|
|
439
|
-
/* @__PURE__ */ jsx(
|
|
415
|
+
/* @__PURE__ */ jsxs(ButtonGroup, { className: clsx("es:mx-2 es:mt-3", "es:w-fill es:grid es:grid-cols-2", noModeSelect ? "es:mb-2" : "es:mb-0.5"), children: [
|
|
416
|
+
/* @__PURE__ */ jsx("div", { className: clsx("es:bg-white/50 es:inset-ring es:p-1.5 es:inset-ring-surface-200/60 es:rounded-tl-2xl es:rounded-sm", noModeSelect && "es:rounded-bl-2xl"), children: /* @__PURE__ */ jsx(
|
|
440
417
|
TriggeredPopover,
|
|
441
418
|
{
|
|
442
419
|
triggerButtonLabel: __("Responsive preview", "eightshift-ui-components"),
|
|
443
420
|
triggerButtonProps: {
|
|
444
421
|
disabled: !Object.keys(value).some((key) => !key?.startsWith("_") && typeof value?.[key] !== "undefined"),
|
|
445
422
|
type: "ghost",
|
|
446
|
-
className: "es:
|
|
423
|
+
className: "es:w-fill"
|
|
447
424
|
},
|
|
448
425
|
children: /* @__PURE__ */ jsx(
|
|
449
426
|
ResponsivePreview,
|
|
@@ -458,16 +435,8 @@ const MiniResponsive = (props) => {
|
|
|
458
435
|
}
|
|
459
436
|
)
|
|
460
437
|
}
|
|
461
|
-
),
|
|
462
|
-
/* @__PURE__ */ jsx(
|
|
463
|
-
Spacer,
|
|
464
|
-
{
|
|
465
|
-
className: "es:*:bg-secondary-200!",
|
|
466
|
-
vertical: true,
|
|
467
|
-
border: true
|
|
468
|
-
}
|
|
469
|
-
),
|
|
470
|
-
/* @__PURE__ */ jsx(
|
|
438
|
+
) }),
|
|
439
|
+
/* @__PURE__ */ jsx("div", { className: clsx("es:bg-white/50 es:inset-ring es:p-1.5 es:inset-ring-surface-200/60 es:rounded-sm es:rounded-tr-2xl", noModeSelect && "es:rounded-br-2xl"), children: /* @__PURE__ */ jsx(
|
|
471
440
|
Button,
|
|
472
441
|
{
|
|
473
442
|
icon: icons.clearAlt,
|
|
@@ -480,11 +449,34 @@ const MiniResponsive = (props) => {
|
|
|
480
449
|
onChange(newValue);
|
|
481
450
|
},
|
|
482
451
|
type: "ghost",
|
|
483
|
-
className: "es:
|
|
484
|
-
children: __("Clear
|
|
452
|
+
className: "es:w-fill",
|
|
453
|
+
children: __("Clear overrides", "eightshift-ui-components")
|
|
485
454
|
}
|
|
486
|
-
)
|
|
487
|
-
] })
|
|
455
|
+
) })
|
|
456
|
+
] }),
|
|
457
|
+
/* @__PURE__ */ jsx(
|
|
458
|
+
OptionSelect,
|
|
459
|
+
{
|
|
460
|
+
hidden: noModeSelect,
|
|
461
|
+
icon: icons.responsiveOverridesAlt3Fill,
|
|
462
|
+
label: __("Breakpoint mode", "eightshift-ui-components"),
|
|
463
|
+
value: isDesktopFirst,
|
|
464
|
+
onChange: (newMode) => {
|
|
465
|
+
onChange({
|
|
466
|
+
_default: value["_default"],
|
|
467
|
+
_desktopFirst: newMode
|
|
468
|
+
});
|
|
469
|
+
},
|
|
470
|
+
options: [
|
|
471
|
+
{ label: __("Mobile-first", "eightshift-ui-components"), subtitle: __("Default", "eightshift-ui-components"), value: false },
|
|
472
|
+
{ label: __("Desktop-first", "eightshift-ui-components"), value: true }
|
|
473
|
+
],
|
|
474
|
+
wrapperProps: { triggerProps: { type: "simple", className: "es:grow" } },
|
|
475
|
+
type: "menu",
|
|
476
|
+
inline: true,
|
|
477
|
+
className: "es:pl-3 es:mx-2 es:mb-2 es:bg-white/50 es:inset-ring es:p-1.5 es:inset-ring-surface-200/60 es:rounded-t-sm es:rounded-b-2xl"
|
|
478
|
+
}
|
|
479
|
+
)
|
|
488
480
|
]
|
|
489
481
|
}
|
|
490
482
|
)
|
|
@@ -3,7 +3,7 @@ import { useState } from "react";
|
|
|
3
3
|
import { DecorativeTooltip } from "../tooltip/tooltip.js";
|
|
4
4
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
5
|
import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
|
|
6
|
-
import { _ as __ } from "../../default-i18n-
|
|
6
|
+
import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
|
|
7
7
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
8
8
|
import { upperFirst } from "../../utilities/es-dash.js";
|
|
9
9
|
import { icons } from "../../icons/icons.js";
|
|
@@ -3,7 +3,7 @@ import { useState } from "react";
|
|
|
3
3
|
import { DecorativeTooltip } from "../tooltip/tooltip.js";
|
|
4
4
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
5
|
import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
|
|
6
|
-
import { _ as __ } from "../../default-i18n-
|
|
6
|
+
import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
|
|
7
7
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
8
8
|
import { upperFirst } from "../../utilities/es-dash.js";
|
|
9
9
|
import { icons } from "../../icons/icons.js";
|
|
@@ -118,18 +118,18 @@ const Responsive = (props) => {
|
|
|
118
118
|
DecorativeTooltip,
|
|
119
119
|
{
|
|
120
120
|
placement: "left",
|
|
121
|
-
className: "es:p-
|
|
121
|
+
className: "es:p-4! es:rounded-2xl!",
|
|
122
122
|
theme: "light",
|
|
123
123
|
offset: 7.5,
|
|
124
124
|
arrow: true,
|
|
125
125
|
text: /* @__PURE__ */ jsxs("div", { className: "es:max-w-64 es:p-1", children: [
|
|
126
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
127
|
-
/* @__PURE__ */ jsxs("span", { className:
|
|
126
|
+
/* @__PURE__ */ jsx("span", { className: 'es:block es:font-variation-["wdth"_180,"wght"_500] es:text-base es:leading-none es:text-surface-600', children: __("Default", "eightshift-ui-components") }),
|
|
127
|
+
/* @__PURE__ */ jsxs("span", { className: 'es:block es:text-balance es:tabular-nums es:font-variation-["wdth"_60,"wght"_300] es:text-surface-500 es:mt-1', children: [
|
|
128
128
|
!firstMobileFirstOverride && !lastDesktopFirstOverride && __("Always applied, regardless of browser width.", "eightshift-ui-components"),
|
|
129
129
|
firstMobileFirstOverride && !isDesktopFirst && sprintf(__("Applies when the browser width is %dpx or less.", "eightshift-ui-components"), breakpointData[firstMobileFirstOverride] - 1),
|
|
130
130
|
lastDesktopFirstOverride && isDesktopFirst && sprintf(__("Applies when the browser width is %dpx or more.", "eightshift-ui-components"), breakpointData[lastDesktopFirstOverride.replace("max-", "")])
|
|
131
131
|
] }),
|
|
132
|
-
/* @__PURE__ */ jsxs("div", { className: "es:mx-auto", children: [
|
|
132
|
+
/* @__PURE__ */ jsxs("div", { className: "es:mx-auto es:mt-5", children: [
|
|
133
133
|
firstMobileFirstOverride && !isDesktopFirst && /* @__PURE__ */ jsx(
|
|
134
134
|
BreakpointPreview,
|
|
135
135
|
{
|
|
@@ -172,7 +172,7 @@ const Responsive = (props) => {
|
|
|
172
172
|
)
|
|
173
173
|
] })
|
|
174
174
|
] }),
|
|
175
|
-
children: /* @__PURE__ */ jsx("div", { className: "es:
|
|
175
|
+
children: /* @__PURE__ */ jsx("div", { className: "es:icon:size-6 es:mx-0.5 es:text-accent-700", children: icons?.[overrideIcon] ?? overrideIcon ?? icons[`screen${upperFirst(isDesktopFirst ? rawBreakpoints.at(-1) : rawBreakpoints.at(0))}`] })
|
|
176
176
|
}
|
|
177
177
|
);
|
|
178
178
|
};
|
|
@@ -210,7 +210,7 @@ const Responsive = (props) => {
|
|
|
210
210
|
/* @__PURE__ */ jsx(
|
|
211
211
|
ToggleButton,
|
|
212
212
|
{
|
|
213
|
-
icon:
|
|
213
|
+
icon: icons.responsiveOverridesAlt3Fill,
|
|
214
214
|
onChange: () => setDetailsVisible(!detailsVisible),
|
|
215
215
|
selected: detailsVisible,
|
|
216
216
|
tooltip: detailsVisible ? __("Hide responsive overrides", "eightshift-ui-components") : __("Show responsive overrides", "eightshift-ui-components")
|
|
@@ -222,7 +222,7 @@ const Responsive = (props) => {
|
|
|
222
222
|
"aria-label": __("Responsive options", "eightshift-ui-components"),
|
|
223
223
|
tooltip: __("Responsive options", "eightshift-ui-components"),
|
|
224
224
|
popoverProps: { placement: "bottom right" },
|
|
225
|
-
triggerProps: { className: "es:w-
|
|
225
|
+
triggerProps: { className: "es:w-6 es:stroke-[1.25]" },
|
|
226
226
|
triggerIcon: icons.dropdownCaretAlt,
|
|
227
227
|
children: [
|
|
228
228
|
!noModeSelect && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -294,6 +294,7 @@ const Responsive = (props) => {
|
|
|
294
294
|
});
|
|
295
295
|
onChange(newValue);
|
|
296
296
|
},
|
|
297
|
+
danger: true,
|
|
297
298
|
children: __("Clear all overrides", "eightshift-ui-components")
|
|
298
299
|
}
|
|
299
300
|
)
|
|
@@ -307,12 +308,13 @@ const Responsive = (props) => {
|
|
|
307
308
|
"div",
|
|
308
309
|
{
|
|
309
310
|
className: clsx(
|
|
310
|
-
"es:grid es:items-center es:gap-x-2 es:transition-[grid-template-columns,margin-block-end] es:duration-
|
|
311
|
+
"es:grid es:items-center es:gap-x-2 es:transition-[grid-template-columns,margin-block-end] es:duration-200",
|
|
312
|
+
detailsVisible && "es:bg-white/50 es:p-1.5 es:rounded-sm es:first:rounded-t-2xl es:last:rounded-b-2xl es:inset-ring es:inset-ring-accent-600/25",
|
|
311
313
|
innerContentAlign === "start" && "es:justify-items-start",
|
|
312
314
|
innerContentAlign === "center" && "es:justify-items-center",
|
|
313
315
|
innerContentAlign === "end" && "es:justify-items-end",
|
|
314
316
|
innerContentAlign === "stretch" && "es:justify-items-stretch",
|
|
315
|
-
detailsVisible ? "es:mb-
|
|
317
|
+
detailsVisible ? "es:mb-0.5 es:grid-cols-[minmax(0,1.75rem)_minmax(0,1fr)_minmax(0,2.25rem)]" : "es:grid-cols-[minmax(0,0rem)_minmax(0,1fr)_minmax(0,2.25rem)]"
|
|
316
318
|
),
|
|
317
319
|
children: [
|
|
318
320
|
detailsVisible && /* @__PURE__ */ jsx(DefaultTooltip, {}),
|
|
@@ -334,7 +336,8 @@ const Responsive = (props) => {
|
|
|
334
336
|
AnimatedVisibility,
|
|
335
337
|
{
|
|
336
338
|
className: clsx(
|
|
337
|
-
"es:mb-
|
|
339
|
+
"es:mb-0.5 es:grid es:grid-cols-[minmax(0,1.75rem)_minmax(0,1fr)_minmax(0,2.25rem)] es:items-center es:gap-x-2",
|
|
340
|
+
"es:bg-white/50 es:p-1.5 es:rounded-sm es:first:rounded-t-2xl es:last:rounded-b-2xl es:inset-ring es:inset-ring-accent-600/25",
|
|
338
341
|
innerContentAlign === "start" && "es:justify-items-start",
|
|
339
342
|
innerContentAlign === "center" && "es:justify-items-center",
|
|
340
343
|
innerContentAlign === "end" && "es:justify-items-end",
|
|
@@ -362,7 +365,7 @@ const Responsive = (props) => {
|
|
|
362
365
|
AnimatedVisibility,
|
|
363
366
|
{
|
|
364
367
|
visible: detailsVisible,
|
|
365
|
-
className: "es:space-y-
|
|
368
|
+
className: "es:space-y-0.5",
|
|
366
369
|
children: breakpointsToMap.map((breakpoint, i) => {
|
|
367
370
|
const realBreakpointName = breakpoint.replace("max-", "");
|
|
368
371
|
const filterBreakpoints = isDesktopFirst ? [...breakpointsToMap, "_default"] : ["_default", ...breakpointsToMap];
|
|
@@ -373,6 +376,9 @@ const Responsive = (props) => {
|
|
|
373
376
|
{
|
|
374
377
|
className: clsx(
|
|
375
378
|
"es:grid es:grid-cols-[minmax(0,auto)_minmax(0,1fr)_minmax(0,2.25rem)] es:items-center es:gap-x-2",
|
|
379
|
+
"es:bg-white/50 es:p-1.5 es:rounded-sm es:inset-ring es:inset-ring-surface-200/60",
|
|
380
|
+
!isDesktopFirst && "es:last:rounded-b-2xl",
|
|
381
|
+
isDesktopFirst && "es:first:rounded-t-2xl",
|
|
376
382
|
innerContentAlign === "start" && "es:justify-items-start",
|
|
377
383
|
innerContentAlign === "center" && "es:justify-items-center",
|
|
378
384
|
innerContentAlign === "end" && "es:justify-items-end",
|
|
@@ -384,11 +390,12 @@ const Responsive = (props) => {
|
|
|
384
390
|
{
|
|
385
391
|
placement: "left",
|
|
386
392
|
theme: "light",
|
|
393
|
+
className: "es:p-4! es:rounded-2xl!",
|
|
387
394
|
offset: 7.5,
|
|
388
395
|
arrow: true,
|
|
389
396
|
text: /* @__PURE__ */ jsxs("div", { className: "es:max-w-96 es:p-1", children: [
|
|
390
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
391
|
-
/* @__PURE__ */ jsxs("span", { className:
|
|
397
|
+
/* @__PURE__ */ jsx("span", { className: 'es:block es:font-variation-["wdth"_180,"wght"_500] es:text-base es:leading-none es:text-surface-600', children: breakpointUiData?.[realBreakpointName]?.label ?? upperFirst(realBreakpointName) }),
|
|
398
|
+
/* @__PURE__ */ jsxs("span", { className: 'es:block es:text-balance es:tabular-nums es:font-variation-["wdth"_60,"wght"_300] es:text-surface-500 es:mt-1', children: [
|
|
392
399
|
!isDesktopFirst && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
393
400
|
!belowOverride && typeof value[breakpoint] !== "undefined" && sprintf(__("Applied when the browser width is %dpx or more.", "eightshift-ui-components"), breakpointData[realBreakpointName]),
|
|
394
401
|
belowOverride && typeof value[breakpoint] !== "undefined" && sprintf(
|
|
@@ -408,8 +415,8 @@ const Responsive = (props) => {
|
|
|
408
415
|
typeof value[breakpoint] === "undefined" && sprintf(__("Up to %dpx", "eightshift-ui-components"), breakpointData[breakpoint?.replace("max-", "")])
|
|
409
416
|
] })
|
|
410
417
|
] }),
|
|
411
|
-
typeof value[breakpoint] === "undefined" && /* @__PURE__ */ jsx("span", { className:
|
|
412
|
-
typeof value[breakpoint] !== "undefined" && /* @__PURE__ */ jsxs("div", { className: "es:mx-auto es:mt-
|
|
418
|
+
typeof value[breakpoint] === "undefined" && /* @__PURE__ */ jsx("span", { className: 'es:mt-2 es:block es:font-variation-["wdth"_100,"YTLC"_520,"wght"_350,"slnt"_-10]', children: __("Not set", "eightshift-ui-components") }),
|
|
419
|
+
typeof value[breakpoint] !== "undefined" && /* @__PURE__ */ jsxs("div", { className: "es:mx-auto es:mt-5", children: [
|
|
413
420
|
!isDesktopFirst && /* @__PURE__ */ jsx(
|
|
414
421
|
BreakpointPreview,
|
|
415
422
|
{
|
|
@@ -475,16 +482,7 @@ const Responsive = (props) => {
|
|
|
475
482
|
)
|
|
476
483
|
] })
|
|
477
484
|
] }),
|
|
478
|
-
children: /* @__PURE__ */ jsx(
|
|
479
|
-
"div",
|
|
480
|
-
{
|
|
481
|
-
className: clsx(
|
|
482
|
-
"es:flex es:size-7 es:items-center es:justify-center es:rounded es:border es:p-0.5 es:shadow-sm es:transition-colors es:icon:size-5",
|
|
483
|
-
typeof value[breakpoint] !== "undefined" ? "es:border-secondary-200 es:bg-secondary-50 es:text-secondary-700" : "es:border-secondary-100 es:bg-white es:text-secondary-500"
|
|
484
|
-
),
|
|
485
|
-
children: icons?.[breakpointUiData?.[realBreakpointName]?.icon] ?? breakpointUiData?.[realBreakpointName]?.icon ?? icons?.[`screen${upperFirst(realBreakpointName)}`]
|
|
486
|
-
}
|
|
487
|
-
)
|
|
485
|
+
children: /* @__PURE__ */ jsx("div", { className: clsx("es:transition-colors es:icon:size-6 es:mx-0.5", typeof value[breakpoint] !== "undefined" ? "es:text-surface-600" : "es:text-surface-300"), children: icons?.[breakpointUiData?.[realBreakpointName]?.icon] ?? breakpointUiData?.[realBreakpointName]?.icon ?? icons?.[`screen${upperFirst(realBreakpointName)}`] })
|
|
488
486
|
}
|
|
489
487
|
),
|
|
490
488
|
children({
|
|
@@ -524,11 +522,12 @@ const Responsive = (props) => {
|
|
|
524
522
|
{
|
|
525
523
|
className: clsx(
|
|
526
524
|
"es:grid es:items-center es:gap-x-2 es:transition-[grid-template-columns,margin-block-start] es:duration-150",
|
|
525
|
+
detailsVisible && "es:bg-white/50 es:p-1.5 es:rounded-sm es:first:rounded-t-2xl es:last:rounded-b-2xl es:inset-ring es:inset-ring-accent-600/25 es:transition-plus",
|
|
527
526
|
innerContentAlign === "start" && "es:justify-items-start",
|
|
528
527
|
innerContentAlign === "center" && "es:justify-items-center",
|
|
529
528
|
innerContentAlign === "end" && "es:justify-items-end",
|
|
530
529
|
innerContentAlign === "stretch" && "es:justify-items-stretch",
|
|
531
|
-
detailsVisible ? "es:mt-
|
|
530
|
+
detailsVisible ? "es:mt-0.5 es:grid-cols-[minmax(0,1.75rem)_minmax(0,1fr)_minmax(0,2.25rem)]" : "es:grid-cols-[minmax(0,0rem)_minmax(0,1fr)_minmax(0,2.25rem)]"
|
|
532
531
|
),
|
|
533
532
|
children: [
|
|
534
533
|
detailsVisible && /* @__PURE__ */ jsx(DefaultTooltip, {}),
|
|
@@ -551,6 +550,7 @@ const Responsive = (props) => {
|
|
|
551
550
|
{
|
|
552
551
|
className: clsx(
|
|
553
552
|
"es:grid es:grid-cols-[minmax(0,1.75rem)_minmax(0,1fr)_minmax(0,2.25rem)] es:items-center es:gap-x-2 es:pt-1",
|
|
553
|
+
"es:bg-white/50 es:p-1.5 es:rounded-sm es:first:rounded-t-2xl es:last:rounded-b-2xl es:inset-ring es:inset-ring-accent-600/25",
|
|
554
554
|
innerContentAlign === "start" && "es:justify-items-start",
|
|
555
555
|
innerContentAlign === "center" && "es:justify-items-center",
|
|
556
556
|
innerContentAlign === "end" && "es:justify-items-end",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../default-i18n-
|
|
2
|
+
import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
|
|
3
3
|
import { upperFirst } from "../../utilities/es-dash.js";
|
|
4
4
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
5
5
|
import { icons } from "../../icons/icons.js";
|
|
@@ -55,20 +55,20 @@ const RichLabel = (props) => {
|
|
|
55
55
|
const ComponentToRender = as ?? "div";
|
|
56
56
|
if (contentsOnly) {
|
|
57
57
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
58
|
-
icon && /* @__PURE__ */ jsx("span", { className: clsx("es:icon:size-5", !noColor && "es:text-
|
|
58
|
+
icon && /* @__PURE__ */ jsx("span", { className: clsx("es:icon:size-5", !noColor && "es:text-secondary-500", iconClassName), children: icon }),
|
|
59
59
|
label && /* @__PURE__ */ jsx("span", { className: clsx("es:text-balance", !noColor && "es:text-secondary-800", labelClassName), children: label }),
|
|
60
|
-
subtitle && /* @__PURE__ */ jsx("span", { className: clsx("es:text-balance es:text-xs es:not-contrast-more:opacity-65", !noColor && "es:text-secondary-
|
|
60
|
+
subtitle && /* @__PURE__ */ jsx("span", { className: clsx("es:text-balance es:text-xs es:not-contrast-more:opacity-65", !noColor && "es:text-secondary-700", subtitleClassName), children: subtitle })
|
|
61
61
|
] });
|
|
62
62
|
}
|
|
63
63
|
return /* @__PURE__ */ jsxs(
|
|
64
64
|
ComponentToRender,
|
|
65
65
|
{
|
|
66
|
-
className: clsx("es:flex es:items-center es:gap-
|
|
66
|
+
className: clsx("es:flex es:items-center es:gap-1.75 es:text-sm", !noColor && "es:text-secondary-700 es:any-icon:text-secondary-500", fullWidth && "es:grow", className),
|
|
67
67
|
children: [
|
|
68
68
|
icon && /* @__PURE__ */ jsx("span", { className: clsx("es:icon:size-5 es:shrink-0", noColor && "es:not-contrast-more:opacity-80", iconClassName), children: icon }),
|
|
69
69
|
(label || subtitle) && /* @__PURE__ */ jsxs("div", { className: clsx("es:flex es:items-start es:text-balance es:text-start", inlineSubtitle ? "es:gap-1.5" : "es:flex-col", labelSubtitleWrapClassName), children: [
|
|
70
|
-
label && /* @__PURE__ */ jsx("span", { className: labelClassName, children: label }),
|
|
71
|
-
subtitle && /* @__PURE__ */ jsx("span", { className: clsx(!fullSizeSubtitle && "es:text-
|
|
70
|
+
label && /* @__PURE__ */ jsx("span", { className: clsx('es:font-variation-["wdth"_120,"wght"_400]', labelClassName), children: label }),
|
|
71
|
+
subtitle && /* @__PURE__ */ jsx("span", { className: clsx(!fullSizeSubtitle && "es:text-12", "es:not-contrast-more:opacity-65", subtitleClassName), children: subtitle })
|
|
72
72
|
] })
|
|
73
73
|
]
|
|
74
74
|
}
|