@eightshift/ui-components 5.0.0 → 5.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-wERNNG0T.js +185 -0
- package/dist/Collection-CKsHTyhc.js +2363 -0
- package/dist/Color-BhgbJF5x.js +2452 -0
- package/dist/ColorSwatch-Bcn6oRSg.js +64 -0
- package/dist/ComboBox-D1LPUwWP.js +1906 -0
- package/dist/Dialog-D190gMbE.js +2298 -0
- package/dist/FieldError-DeUh5Wkw.js +42 -0
- package/dist/FocusScope-C-plSxbS.js +831 -0
- package/dist/Form-Cq3fu75_.js +5 -0
- package/dist/Group-C5iZpSAM.js +48 -0
- package/dist/Heading-D-Pboe4p.js +16 -0
- package/dist/Hidden-rE6uR-lr.js +41 -0
- package/dist/Input--mF4XVE1.js +133 -0
- package/dist/Label-Fp6AwSRn.js +17 -0
- package/dist/List-CZMUbkFU.js +593 -0
- package/dist/ListBox-4oW9kh3R.js +582 -0
- package/dist/NumberFormatter-DA8u1Ot7.js +140 -0
- package/dist/OverlayArrow-BpB9uB_I.js +637 -0
- package/dist/RSPContexts-2lR5GG9p.js +14 -0
- package/dist/Select-aab027f3.esm-BKIJGje-.js +2469 -0
- package/dist/Separator-B88tj5YD.js +323 -0
- package/dist/Slider-CyJzC1bp.js +853 -0
- package/dist/Text-DRpwWot2.js +16 -0
- package/dist/VisuallyHidden-DsKYcRQ_.js +48 -0
- package/dist/_commonjsHelpers-CUmg6egw.js +6 -0
- package/dist/assets/index.css +57 -0
- package/dist/assets/style-admin.css +5864 -0
- package/dist/assets/style-editor.css +5864 -0
- package/dist/assets/style.css +5870 -0
- package/dist/assets/wp-font-enhancements.css +8 -0
- package/dist/assets/wp-ui-enhancements.css +377 -0
- package/dist/components/animated-visibility/animated-visibility.js +105 -0
- package/dist/components/base-control/base-control.js +86 -0
- package/dist/components/breakpoint-preview/breakpoint-preview.js +161 -0
- package/dist/components/button/button.js +387 -0
- package/dist/components/checkbox/checkbox.js +320 -0
- package/dist/components/color-pickers/color-picker.js +272 -0
- package/dist/components/color-pickers/color-swatch.js +59 -0
- package/dist/components/color-pickers/gradient-editor.js +534 -0
- package/dist/components/color-pickers/solid-color-picker.js +1567 -0
- package/dist/components/component-toggle/component-toggle.js +161 -0
- package/dist/components/container-panel/container-panel.js +131 -0
- package/dist/components/draggable/draggable-context.js +5 -0
- package/dist/components/draggable/draggable-handle.js +46 -0
- package/dist/components/draggable/draggable.js +6979 -0
- package/dist/components/draggable-list/draggable-list-context.js +5 -0
- package/dist/components/draggable-list/draggable-list-item.js +77 -0
- package/dist/components/draggable-list/draggable-list.js +151 -0
- package/dist/components/expandable/expandable.js +342 -0
- package/dist/components/index.js +137 -0
- package/dist/components/input-field/input-field.js +231 -0
- package/dist/components/item-collection/item-collection.js +59 -0
- package/dist/components/layout/hstack.js +30 -0
- package/dist/components/layout/vstack.js +30 -0
- package/dist/components/link-input/link-input.js +291 -0
- package/dist/components/matrix-align/matrix-align.js +134 -0
- package/dist/components/menu/menu.js +285 -0
- package/dist/components/modal/modal.js +305 -0
- package/dist/components/notice/notice.js +123 -0
- package/dist/components/number-picker/number-picker.js +292 -0
- package/dist/components/option-select/option-select.js +264 -0
- package/dist/components/options-panel/options-panel.js +158 -0
- package/dist/components/placeholders/file-placeholder.js +42 -0
- package/dist/components/placeholders/image-placeholder.js +88 -0
- package/dist/components/placeholders/media-placeholder.js +63 -0
- package/dist/components/popover/popover.js +207 -0
- package/dist/components/radio/radio.js +579 -0
- package/dist/components/repeater/repeater-context.js +5 -0
- package/dist/components/repeater/repeater-item.js +119 -0
- package/dist/components/repeater/repeater.js +280 -0
- package/dist/components/responsive/mini-responsive.js +498 -0
- package/dist/components/responsive/responsive-legacy.js +343 -0
- package/dist/components/responsive/responsive.js +583 -0
- package/dist/components/responsive-preview/responsive-preview.js +123 -0
- package/dist/components/rich-label/rich-label.js +66 -0
- package/dist/components/select/async-multi-select.js +157 -0
- package/dist/components/select/async-single-select.js +137 -0
- package/dist/components/select/custom-select-default-components.js +38 -0
- package/dist/components/select/multi-select-components.js +8 -0
- package/dist/components/select/multi-select.js +151 -0
- package/dist/components/select/react-select-component-wrappers.js +90 -0
- package/dist/components/select/shared.js +26 -0
- package/dist/components/select/single-select.js +131 -0
- package/dist/components/select/styles.js +49 -0
- package/dist/components/select/v2/async-select.js +297 -0
- package/dist/components/select/v2/shared.js +24 -0
- package/dist/components/select/v2/single-select.js +991 -0
- package/dist/components/slider/column-config-slider.js +210 -0
- package/dist/components/slider/slider.js +345 -0
- package/dist/components/slider/utils.js +94 -0
- package/dist/components/spacer/spacer.js +97 -0
- package/dist/components/tabs/tabs.js +704 -0
- package/dist/components/toggle/switch.js +156 -0
- package/dist/components/toggle/toggle.js +64 -0
- package/dist/components/toggle-button/toggle-button.js +343 -0
- package/dist/components/tooltip/tooltip.js +527 -0
- package/dist/context-BYWrbm1z.js +92 -0
- package/dist/default-i18n-CT_oS1Fy.js +922 -0
- package/dist/filterDOMProps-EDDcM64A.js +28 -0
- package/dist/icons/block-icon.js +42 -0
- package/dist/icons/generic-color-swatch.js +113 -0
- package/dist/icons/icons.js +30371 -0
- package/dist/icons/index.js +11 -0
- package/dist/icons/jsx-svg.js +50 -0
- package/dist/index-641ee5b8.esm-BPU8rMZr.js +3137 -0
- package/dist/index-CFozsmNS.js +28321 -0
- package/dist/index-wl5606BX.js +44 -0
- package/dist/index.js +139 -0
- package/dist/lite-DVmmD_-j.js +7 -0
- package/dist/modifiers.esm-BuJQPI1X.js +31 -0
- package/dist/multi-select-components-Sp-JEFEX.js +3744 -0
- package/dist/number-GajL10e1.js +36 -0
- package/dist/react-jsx-parser.min-DZCiis5V.js +11753 -0
- package/dist/react-select-async.esm-D937XTWW.js +107 -0
- package/dist/react-select.esm-Ciai3aKf.js +15 -0
- package/dist/style-admin.js +1 -0
- package/dist/style-editor.js +1 -0
- package/dist/style.js +1 -0
- package/dist/textSelection-CCcyjiRP.js +46 -0
- package/dist/useButton-BOHxkGQF.js +50 -0
- package/dist/useEvent-D5o_CqDH.js +23 -0
- package/dist/useFocusRing-nMG2uzxS.js +107 -0
- package/dist/useFormReset-DlmRL87g.js +22 -0
- package/dist/useFormValidation-D0_aaK-e.js +224 -0
- package/dist/useHover-VO5tcIli.js +890 -0
- package/dist/useLabel-BKH4fVA4.js +27 -0
- package/dist/useLabels-ntF3rFY0.js +23 -0
- package/dist/useListState-Cq2Nvr-v.js +161 -0
- package/dist/useLocalizedStringFormatter-CGzwx1a0.js +121 -0
- package/dist/useNumberField-C9dmERhP.js +1207 -0
- package/dist/useNumberFormatter-MrRLgvhj.js +13 -0
- package/dist/usePress-DjNo5790.js +677 -0
- package/dist/useSingleSelectListState--r3AAhRj.js +38 -0
- package/dist/useToggle-CQaXLe-O.js +59 -0
- package/dist/useToggleState-C3DLdez5.js +19 -0
- package/dist/utilities/array-helpers.js +56 -0
- package/dist/utilities/debounce-throttle.js +123 -0
- package/dist/utilities/es-dash.js +382 -0
- package/dist/utilities/index.js +27 -0
- package/dist/utilities/text-helpers.js +136 -0
- package/dist/utils-B94NDG0v.js +370 -0
- package/dist/wp/wp-font-enhancements.js +1 -0
- package/dist/wp/wp-ui-enhancements.js +1 -0
- package/package.json +8 -8
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { DecorativeTooltip } from "../tooltip/tooltip.js";
|
|
4
|
+
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
|
+
import { _ as __, s as sprintf } from "../../default-i18n-CT_oS1Fy.js";
|
|
6
|
+
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
7
|
+
import { upperFirst } from "../../utilities/es-dash.js";
|
|
8
|
+
import { icons } from "../../icons/icons.js";
|
|
9
|
+
import { Menu, MenuItem, MenuSeparator, SubMenuItem } from "../menu/menu.js";
|
|
10
|
+
import { ResponsivePreview } from "../responsive-preview/responsive-preview.js";
|
|
11
|
+
import { Button, ButtonGroup } from "../button/button.js";
|
|
12
|
+
import { RichLabel } from "../rich-label/rich-label.js";
|
|
13
|
+
import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
|
|
14
|
+
import { ToggleButton } from "../toggle-button/toggle-button.js";
|
|
15
|
+
import { BaseControl } from "../base-control/base-control.js";
|
|
16
|
+
/**
|
|
17
|
+
* A component that allows the user to set different values for different breakpoints.
|
|
18
|
+
*
|
|
19
|
+
* Inner items should be passed as a render function.
|
|
20
|
+
* The following props are passed to the render function:
|
|
21
|
+
* - `breakpoint: string` - Name of the current breakpoint.
|
|
22
|
+
* - `currentValue: any` - Current value.
|
|
23
|
+
* - `handleChange: Function<(attributeName: string, value: any) => void>` - A function to change the value for the breakpoint..
|
|
24
|
+
* - `options: Object<string, any>` - (Optional) Options list passed to the `ResponsiveLegacy` component. (optional)
|
|
25
|
+
* - `isInlineCollapsedView: boolean` - (Optional) `true` if in `inline` mode, and the details are collapsed.
|
|
26
|
+
* - `isInlineExpandedView: boolean` - (Optional) `true` if in `inline` mode, and the details are shown.
|
|
27
|
+
*
|
|
28
|
+
* @component
|
|
29
|
+
* @param {Object} props - Component props.
|
|
30
|
+
* @param {Object} props.value - The current value of the component.
|
|
31
|
+
* @param {Function} props.onChange - Function to run when the value changes. `(newValue: Object) => void`.
|
|
32
|
+
* @param {JSX.Element} props.icon - The icon of the component.
|
|
33
|
+
* @param {string} props.help - The help text of the component.
|
|
34
|
+
* @param {string} props.label - The label of the component.
|
|
35
|
+
* @param {string} props.subtitle - The subtitle of the component.
|
|
36
|
+
* @param {{label: string, value: string}[]} props.options - Options of the attribute the component is linked to. `{ value: string, label: string }[]`.
|
|
37
|
+
* @param {string[]} props.breakpoints - Breakpoints to use.
|
|
38
|
+
* @param {string[]} [props.desktopFirstBreakpoints] - Breakpoints to use in desktop-first mode. If not provided, the breakpoints will be used in reverse order.
|
|
39
|
+
* @param {Object<string, number>} [props.breakpointData] - Currently used breakpoint data. `{ [breakpoint: string]: number }`.
|
|
40
|
+
* @param {Object<string, number>} [props.breakpointUiData] - Allows overriding breakpoint names and icons. `{ [breakpoint: string]: { label: string, icon: JSX.Element|string } }`.
|
|
41
|
+
* @param {boolean} [props.noModeSelect] - If `true`, the mode selection (desktop-first/mobile-first) is hidden.
|
|
42
|
+
* @param {boolean} [props.inline] - If `true`, the default breakpoint is shown inline with the label. In the expanded state, all breakpoints are shown below the label.
|
|
43
|
+
* @param {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
44
|
+
* @param {boolean} [props.useLegacyDesktopFirst] - If `true`, the legacy desktop-first mode is used. This is only for backwards compatibility.
|
|
45
|
+
* @param {string} [props.className] - Classes to pass to the control base.
|
|
46
|
+
* @param {'start' | 'center' | 'end' | 'stretch'} [props.innerContentAlign='start'] - Determines inner content alignment
|
|
47
|
+
*
|
|
48
|
+
* @returns {JSX.Element} The Responsive component.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* <Responsive
|
|
52
|
+
* value={value}
|
|
53
|
+
* onChange={onChange}
|
|
54
|
+
* icon={icons.myIcon}
|
|
55
|
+
* label={__('Label', 'eightshift-ui-components')}
|
|
56
|
+
* options={[
|
|
57
|
+
* { value: 'value1', label: 'Value 1' },
|
|
58
|
+
* { value: 'value2', label: 'Value 2' },
|
|
59
|
+
* { value: 'value3', label: 'Value 3' },
|
|
60
|
+
* ]}
|
|
61
|
+
* breakpoints={['mobile', 'tablet', 'desktop', 'large']}
|
|
62
|
+
* breakpointData={breakpointData}
|
|
63
|
+
* >
|
|
64
|
+
* {({ breakpoint, currentValue, options, handleChange }) => (
|
|
65
|
+
* <Select
|
|
66
|
+
* label={breakpoint}
|
|
67
|
+
* value={currentValue}
|
|
68
|
+
* options={options}
|
|
69
|
+
* onChange={handleChange}
|
|
70
|
+
* />
|
|
71
|
+
* )}
|
|
72
|
+
* </Responsive>
|
|
73
|
+
*
|
|
74
|
+
* @preserve
|
|
75
|
+
*/
|
|
76
|
+
const Responsive = (props) => {
|
|
77
|
+
const {
|
|
78
|
+
value,
|
|
79
|
+
onChange,
|
|
80
|
+
icon,
|
|
81
|
+
help,
|
|
82
|
+
label,
|
|
83
|
+
subtitle,
|
|
84
|
+
options,
|
|
85
|
+
breakpoints: rawBreakpoints,
|
|
86
|
+
desktopFirstBreakpoints: rawDesktopFirstBreakpoints,
|
|
87
|
+
breakpointData,
|
|
88
|
+
breakpointUiData,
|
|
89
|
+
noModeSelect,
|
|
90
|
+
inline,
|
|
91
|
+
children,
|
|
92
|
+
hidden,
|
|
93
|
+
innerContentAlign = "start",
|
|
94
|
+
useLegacyDesktopFirst,
|
|
95
|
+
className
|
|
96
|
+
} = props;
|
|
97
|
+
if (typeof rawBreakpoints === "undefined" || !Array.isArray(rawBreakpoints)) {
|
|
98
|
+
console.warn(__("Responsive: Missing or invalid 'breakpoints' prop.", "eightshift-ui-components"));
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
const breakpoints = rawBreakpoints.slice(1);
|
|
102
|
+
let desktopFirstBreakpoints = (rawDesktopFirstBreakpoints ?? rawBreakpoints.slice(1)).map((breakpoint) => breakpoint.startsWith("max-") ? breakpoint : `max-${breakpoint}`);
|
|
103
|
+
if (useLegacyDesktopFirst) {
|
|
104
|
+
desktopFirstBreakpoints = (rawDesktopFirstBreakpoints ?? rawBreakpoints.slice(0, -1)).map((breakpoint) => breakpoint.startsWith("max-") ? breakpoint : `max-${breakpoint}`);
|
|
105
|
+
}
|
|
106
|
+
const [detailsVisible, setDetailsVisible] = useState(false);
|
|
107
|
+
const isDesktopFirst = (value == null ? void 0 : value["_desktopFirst"]) === true;
|
|
108
|
+
const firstMobileFirstOverride = breakpoints.find((breakpoint) => typeof (value == null ? void 0 : value[breakpoint]) !== "undefined");
|
|
109
|
+
const lastDesktopFirstOverride = desktopFirstBreakpoints.toReversed().find((breakpoint) => typeof (value == null ? void 0 : value[breakpoint]) !== "undefined");
|
|
110
|
+
const breakpointsToMap = isDesktopFirst ? desktopFirstBreakpoints : breakpoints;
|
|
111
|
+
if (hidden) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
const DefaultTooltip = () => {
|
|
115
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
116
|
+
const overrideIcon = (_a = breakpointUiData == null ? void 0 : breakpointUiData[isDesktopFirst ? rawBreakpoints.at(-1) : rawBreakpoints.at(0)]) == null ? void 0 : _a.icon;
|
|
117
|
+
return /* @__PURE__ */ jsx(
|
|
118
|
+
DecorativeTooltip,
|
|
119
|
+
{
|
|
120
|
+
placement: "left",
|
|
121
|
+
className: "es:p-3",
|
|
122
|
+
theme: "light",
|
|
123
|
+
offset: 7.5,
|
|
124
|
+
arrow: true,
|
|
125
|
+
text: /* @__PURE__ */ jsxs("div", { className: "es:max-w-64 es:p-1", children: [
|
|
126
|
+
/* @__PURE__ */ jsx("span", { className: "es:block es:text-balance es:font-semibold es:tabular-nums", children: __("Default", "eightshift-ui-components") }),
|
|
127
|
+
/* @__PURE__ */ jsxs("span", { className: "es:block es:text-balance es:tabular-nums", children: [
|
|
128
|
+
!firstMobileFirstOverride && !lastDesktopFirstOverride && __("Always applied, regardless of browser width.", "eightshift-ui-components"),
|
|
129
|
+
firstMobileFirstOverride && !isDesktopFirst && sprintf(__("Applies when the browser width is %dpx or less.", "eightshift-ui-components"), breakpointData[firstMobileFirstOverride] - 1),
|
|
130
|
+
lastDesktopFirstOverride && isDesktopFirst && sprintf(__("Applies when the browser width is %dpx or more.", "eightshift-ui-components"), breakpointData[lastDesktopFirstOverride.replace("max-", "")])
|
|
131
|
+
] }),
|
|
132
|
+
/* @__PURE__ */ jsxs("div", { className: "es:mx-auto", children: [
|
|
133
|
+
firstMobileFirstOverride && !isDesktopFirst && /* @__PURE__ */ jsx(
|
|
134
|
+
BreakpointPreview,
|
|
135
|
+
{
|
|
136
|
+
blocks: [
|
|
137
|
+
{
|
|
138
|
+
breakpoint: __("Default", "eightshift-ui-components"),
|
|
139
|
+
widthEnd: breakpointData[firstMobileFirstOverride] - 1,
|
|
140
|
+
value: ((_b = options == null ? void 0 : options.find((opt) => opt.value === (value == null ? void 0 : value["_default"]))) == null ? void 0 : _b.label) ?? upperFirst(value == null ? void 0 : value["_default"]),
|
|
141
|
+
dotsStart: true,
|
|
142
|
+
alignEnd: true,
|
|
143
|
+
active: true
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
breakpoint: ((_c = breakpointUiData == null ? void 0 : breakpointUiData[firstMobileFirstOverride]) == null ? void 0 : _c.label) ?? firstMobileFirstOverride,
|
|
147
|
+
value: ((_d = options == null ? void 0 : options.find((opt) => opt.value === (value == null ? void 0 : value[firstMobileFirstOverride]))) == null ? void 0 : _d.label) ?? upperFirst(value == null ? void 0 : value[firstMobileFirstOverride]),
|
|
148
|
+
dotsEnd: true
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
),
|
|
153
|
+
lastDesktopFirstOverride && isDesktopFirst && /* @__PURE__ */ jsx(
|
|
154
|
+
BreakpointPreview,
|
|
155
|
+
{
|
|
156
|
+
blocks: [
|
|
157
|
+
{
|
|
158
|
+
breakpoint: ((_e = breakpointUiData == null ? void 0 : breakpointUiData[lastDesktopFirstOverride.replace("max-", "")]) == null ? void 0 : _e.label) ?? lastDesktopFirstOverride.replace("max-", ""),
|
|
159
|
+
value: ((_f = options == null ? void 0 : options.find((opt) => opt.value === (value == null ? void 0 : value[lastDesktopFirstOverride]))) == null ? void 0 : _f.label) ?? upperFirst(value == null ? void 0 : value[lastDesktopFirstOverride]),
|
|
160
|
+
dotsStart: true,
|
|
161
|
+
alignEnd: true
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
breakpoint: __("Default", "eightshift-ui-components"),
|
|
165
|
+
value: ((_g = options == null ? void 0 : options.find((opt) => opt.value === (value == null ? void 0 : value["_default"]))) == null ? void 0 : _g.label) ?? upperFirst(value == null ? void 0 : value["_default"]),
|
|
166
|
+
width: breakpointData[lastDesktopFirstOverride.replace("max-", "")],
|
|
167
|
+
dotsEnd: true,
|
|
168
|
+
active: true
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
] })
|
|
174
|
+
] }),
|
|
175
|
+
children: /* @__PURE__ */ jsx("div", { className: "es:flex es:size-7 es:items-center es:justify-center es:rounded es:border es:border-accent-500/10 es:bg-accent-50 es:p-0.5 es:text-accent-800 es:shadow-sm es:shadow-accent-600/25 es:icon:size-5", children: ((_h = icons) == null ? void 0 : _h[overrideIcon]) ?? overrideIcon ?? icons[`screen${upperFirst(isDesktopFirst ? rawBreakpoints.at(-1) : rawBreakpoints.at(0))}`] })
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
};
|
|
179
|
+
return /* @__PURE__ */ jsxs(
|
|
180
|
+
BaseControl,
|
|
181
|
+
{
|
|
182
|
+
icon,
|
|
183
|
+
label,
|
|
184
|
+
subtitle,
|
|
185
|
+
help,
|
|
186
|
+
className,
|
|
187
|
+
actions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
188
|
+
inline && /* @__PURE__ */ jsx(
|
|
189
|
+
AnimatedVisibility,
|
|
190
|
+
{
|
|
191
|
+
className: "es:mr-0.5",
|
|
192
|
+
visible: !detailsVisible,
|
|
193
|
+
transition: "scaleFade",
|
|
194
|
+
noInitial: true,
|
|
195
|
+
children: children({
|
|
196
|
+
breakpoint: "_default",
|
|
197
|
+
currentValue: value == null ? void 0 : value["_default"],
|
|
198
|
+
handleChange: (newValue) => onChange({
|
|
199
|
+
...value,
|
|
200
|
+
_default: newValue
|
|
201
|
+
}),
|
|
202
|
+
options,
|
|
203
|
+
key: Object.keys(value),
|
|
204
|
+
isInlineCollapsedView: true
|
|
205
|
+
})
|
|
206
|
+
},
|
|
207
|
+
"_default-inline"
|
|
208
|
+
),
|
|
209
|
+
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
210
|
+
/* @__PURE__ */ jsx(
|
|
211
|
+
ToggleButton,
|
|
212
|
+
{
|
|
213
|
+
icon: isDesktopFirst ? icons.responsiveOverridesAlt : icons.responsiveOverridesAlt2,
|
|
214
|
+
onChange: () => setDetailsVisible(!detailsVisible),
|
|
215
|
+
selected: detailsVisible,
|
|
216
|
+
tooltip: detailsVisible ? __("Hide responsive overrides", "eightshift-ui-components") : __("Show responsive overrides", "eightshift-ui-components")
|
|
217
|
+
}
|
|
218
|
+
),
|
|
219
|
+
/* @__PURE__ */ jsxs(
|
|
220
|
+
Menu,
|
|
221
|
+
{
|
|
222
|
+
"aria-label": __("Responsive options", "eightshift-ui-components"),
|
|
223
|
+
tooltip: __("Responsive options", "eightshift-ui-components"),
|
|
224
|
+
popoverProps: { placement: "bottom right" },
|
|
225
|
+
triggerProps: { className: "es:w-5.5 es:stroke-[1.25]" },
|
|
226
|
+
triggerIcon: icons.dropdownCaretAlt,
|
|
227
|
+
children: [
|
|
228
|
+
!noModeSelect && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
229
|
+
/* @__PURE__ */ jsx(
|
|
230
|
+
MenuItem,
|
|
231
|
+
{
|
|
232
|
+
className: "es:pb-0! es:pt-1!",
|
|
233
|
+
disabled: true,
|
|
234
|
+
children: __("Breakpoint mode", "eightshift-ui-components")
|
|
235
|
+
}
|
|
236
|
+
),
|
|
237
|
+
/* @__PURE__ */ jsx(
|
|
238
|
+
MenuItem,
|
|
239
|
+
{
|
|
240
|
+
selected: !isDesktopFirst,
|
|
241
|
+
onClick: () => {
|
|
242
|
+
onChange({
|
|
243
|
+
_default: value["_default"],
|
|
244
|
+
_desktopFirst: false
|
|
245
|
+
});
|
|
246
|
+
},
|
|
247
|
+
children: /* @__PURE__ */ jsx(
|
|
248
|
+
RichLabel,
|
|
249
|
+
{
|
|
250
|
+
label: __("Mobile-first", "eightshift-ui-components"),
|
|
251
|
+
subtitle: __("Default", "eightshift-ui-components"),
|
|
252
|
+
noColor: true
|
|
253
|
+
}
|
|
254
|
+
)
|
|
255
|
+
}
|
|
256
|
+
),
|
|
257
|
+
/* @__PURE__ */ jsx(
|
|
258
|
+
MenuItem,
|
|
259
|
+
{
|
|
260
|
+
selected: isDesktopFirst,
|
|
261
|
+
onClick: () => {
|
|
262
|
+
onChange({
|
|
263
|
+
_default: value["_default"],
|
|
264
|
+
_desktopFirst: true
|
|
265
|
+
});
|
|
266
|
+
},
|
|
267
|
+
children: __("Desktop-first", "eightshift-ui-components")
|
|
268
|
+
}
|
|
269
|
+
),
|
|
270
|
+
/* @__PURE__ */ jsx(MenuSeparator, {})
|
|
271
|
+
] }),
|
|
272
|
+
Object.keys(value).some((key) => !(key == null ? void 0 : key.startsWith("_")) && typeof (value == null ? void 0 : value[key]) !== "undefined") && /* @__PURE__ */ jsx(SubMenuItem, { trigger: /* @__PURE__ */ jsx(MenuItem, { icon: icons.previewResponsive, children: __("Responsive preview", "eightshift-ui-components") }), children: /* @__PURE__ */ jsx(MenuItem, { disabled: true, children: /* @__PURE__ */ jsx(
|
|
273
|
+
ResponsivePreview,
|
|
274
|
+
{
|
|
275
|
+
value,
|
|
276
|
+
isDesktopFirst,
|
|
277
|
+
breakpoints,
|
|
278
|
+
desktopFirstBreakpoints,
|
|
279
|
+
options,
|
|
280
|
+
breakpointData,
|
|
281
|
+
breakpointUiData
|
|
282
|
+
}
|
|
283
|
+
) }) }),
|
|
284
|
+
Object.keys(value).some((key) => !(key == null ? void 0 : key.startsWith("_")) && typeof (value == null ? void 0 : value[key]) !== "undefined") && /* @__PURE__ */ jsx(MenuSeparator, {}),
|
|
285
|
+
/* @__PURE__ */ jsx(
|
|
286
|
+
MenuItem,
|
|
287
|
+
{
|
|
288
|
+
icon: icons.clearAlt,
|
|
289
|
+
onClick: () => {
|
|
290
|
+
const newValue = { ...value };
|
|
291
|
+
[...breakpoints, ...desktopFirstBreakpoints].forEach((breakpoint) => {
|
|
292
|
+
delete newValue[breakpoint];
|
|
293
|
+
});
|
|
294
|
+
onChange(newValue);
|
|
295
|
+
},
|
|
296
|
+
children: __("Clear all overrides", "eightshift-ui-components")
|
|
297
|
+
}
|
|
298
|
+
)
|
|
299
|
+
]
|
|
300
|
+
}
|
|
301
|
+
)
|
|
302
|
+
] })
|
|
303
|
+
] }),
|
|
304
|
+
children: [
|
|
305
|
+
!isDesktopFirst && !inline && /* @__PURE__ */ jsxs(
|
|
306
|
+
"div",
|
|
307
|
+
{
|
|
308
|
+
className: clsx(
|
|
309
|
+
"es:grid es:items-center es:gap-x-2 es:transition-[grid-template-columns,margin-block-end] es:duration-150",
|
|
310
|
+
innerContentAlign === "start" && "es:justify-items-start",
|
|
311
|
+
innerContentAlign === "center" && "es:justify-items-center",
|
|
312
|
+
innerContentAlign === "end" && "es:justify-items-end",
|
|
313
|
+
innerContentAlign === "stretch" && "es:justify-items-stretch",
|
|
314
|
+
detailsVisible ? "es:mb-2 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)]"
|
|
315
|
+
),
|
|
316
|
+
children: [
|
|
317
|
+
detailsVisible && /* @__PURE__ */ jsx(DefaultTooltip, {}),
|
|
318
|
+
/* @__PURE__ */ jsx("div", { className: clsx("es:w-full", detailsVisible ? "es:col-start-2 es:col-end-2" : "es:col-span-full"), children: children({
|
|
319
|
+
breakpoint: "_default",
|
|
320
|
+
currentValue: value == null ? void 0 : value["_default"],
|
|
321
|
+
handleChange: (newValue) => onChange({
|
|
322
|
+
...value,
|
|
323
|
+
_default: newValue
|
|
324
|
+
}),
|
|
325
|
+
options,
|
|
326
|
+
key: Object.keys(value)
|
|
327
|
+
}) })
|
|
328
|
+
]
|
|
329
|
+
},
|
|
330
|
+
"_default-mobile-first"
|
|
331
|
+
),
|
|
332
|
+
!isDesktopFirst && inline && /* @__PURE__ */ jsxs(
|
|
333
|
+
AnimatedVisibility,
|
|
334
|
+
{
|
|
335
|
+
className: clsx(
|
|
336
|
+
"es:mb-2 es:grid es:grid-cols-[minmax(0,1.75rem)_minmax(0,1fr)_minmax(0,2.25rem)] es:items-center es:gap-x-2",
|
|
337
|
+
innerContentAlign === "start" && "es:justify-items-start",
|
|
338
|
+
innerContentAlign === "center" && "es:justify-items-center",
|
|
339
|
+
innerContentAlign === "end" && "es:justify-items-end",
|
|
340
|
+
innerContentAlign === "stretch" && "es:justify-items-stretch"
|
|
341
|
+
),
|
|
342
|
+
visible: detailsVisible,
|
|
343
|
+
children: [
|
|
344
|
+
/* @__PURE__ */ jsx(DefaultTooltip, {}),
|
|
345
|
+
/* @__PURE__ */ jsx("div", { className: "es:col-start-2 es:col-end-2", children: children({
|
|
346
|
+
breakpoint: "_default",
|
|
347
|
+
currentValue: value == null ? void 0 : value["_default"],
|
|
348
|
+
handleChange: (newValue) => onChange({
|
|
349
|
+
...value,
|
|
350
|
+
_default: newValue
|
|
351
|
+
}),
|
|
352
|
+
options,
|
|
353
|
+
key: Object.keys(value),
|
|
354
|
+
isInlineExpandedView: true
|
|
355
|
+
}) })
|
|
356
|
+
]
|
|
357
|
+
},
|
|
358
|
+
"_default-mobile-first-inline"
|
|
359
|
+
),
|
|
360
|
+
/* @__PURE__ */ jsx(
|
|
361
|
+
AnimatedVisibility,
|
|
362
|
+
{
|
|
363
|
+
visible: detailsVisible,
|
|
364
|
+
className: "es:space-y-2",
|
|
365
|
+
children: breakpointsToMap.map((breakpoint, i) => {
|
|
366
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
367
|
+
const realBreakpointName = breakpoint.replace("max-", "");
|
|
368
|
+
const filterBreakpoints = isDesktopFirst ? [...breakpointsToMap, "_default"] : ["_default", ...breakpointsToMap];
|
|
369
|
+
const aboveOverride = isDesktopFirst ? filterBreakpoints.slice(i + 1).find((breakpoint2) => typeof (value == null ? void 0 : value[breakpoint2]) !== "undefined") : filterBreakpoints.slice(0, i + 1).toReversed().find((breakpoint2) => typeof (value == null ? void 0 : value[breakpoint2]) !== "undefined");
|
|
370
|
+
const belowOverride = isDesktopFirst ? filterBreakpoints.slice(0, i).toReversed().find((breakpoint2) => typeof (value == null ? void 0 : value[breakpoint2]) !== "undefined") : filterBreakpoints.slice(i + 2).find((breakpoint2) => typeof (value == null ? void 0 : value[breakpoint2]) !== "undefined");
|
|
371
|
+
return /* @__PURE__ */ jsxs(
|
|
372
|
+
"div",
|
|
373
|
+
{
|
|
374
|
+
className: clsx(
|
|
375
|
+
"es:grid es:grid-cols-[minmax(0,auto)_minmax(0,1fr)_minmax(0,2.25rem)] es:items-center es:gap-x-2",
|
|
376
|
+
innerContentAlign === "start" && "es:justify-items-start",
|
|
377
|
+
innerContentAlign === "center" && "es:justify-items-center",
|
|
378
|
+
innerContentAlign === "end" && "es:justify-items-end",
|
|
379
|
+
innerContentAlign === "stretch" && "es:justify-items-stretch"
|
|
380
|
+
),
|
|
381
|
+
children: [
|
|
382
|
+
/* @__PURE__ */ jsx(
|
|
383
|
+
DecorativeTooltip,
|
|
384
|
+
{
|
|
385
|
+
placement: "left",
|
|
386
|
+
theme: "light",
|
|
387
|
+
offset: 7.5,
|
|
388
|
+
arrow: true,
|
|
389
|
+
text: /* @__PURE__ */ jsxs("div", { className: "es:max-w-96 es:p-1", children: [
|
|
390
|
+
/* @__PURE__ */ jsx("span", { className: "es:block es:font-semibold", children: ((_a = breakpointUiData == null ? void 0 : breakpointUiData[realBreakpointName]) == null ? void 0 : _a.label) ?? upperFirst(realBreakpointName) }),
|
|
391
|
+
/* @__PURE__ */ jsxs("span", { className: "es:block es:text-balance es:tabular-nums", children: [
|
|
392
|
+
!isDesktopFirst && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
393
|
+
!belowOverride && typeof value[breakpoint] !== "undefined" && sprintf(__("Applied when the browser width is %dpx or more.", "eightshift-ui-components"), breakpointData[realBreakpointName]),
|
|
394
|
+
belowOverride && typeof value[breakpoint] !== "undefined" && sprintf(
|
|
395
|
+
__("Applied when the browser width is between %dpx and %dpx.", "eightshift-ui-components"),
|
|
396
|
+
breakpointData[realBreakpointName],
|
|
397
|
+
breakpointData[belowOverride] - 1
|
|
398
|
+
),
|
|
399
|
+
typeof value[breakpoint] === "undefined" && sprintf(__("From %dpx", "eightshift-ui-components"), breakpointData[realBreakpointName])
|
|
400
|
+
] }),
|
|
401
|
+
isDesktopFirst && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
402
|
+
!belowOverride && typeof value[breakpoint] !== "undefined" && sprintf(__("Applied when the browser width is %dpx or less.", "eightshift-ui-components"), breakpointData[realBreakpointName] - 1),
|
|
403
|
+
belowOverride && typeof value[breakpoint] !== "undefined" && sprintf(
|
|
404
|
+
__("Applied when the browser width is between %dpx and %dpx.", "eightshift-ui-components"),
|
|
405
|
+
breakpointData[belowOverride == null ? void 0 : belowOverride.replace("max-", "")],
|
|
406
|
+
breakpointData[realBreakpointName] - 1
|
|
407
|
+
),
|
|
408
|
+
typeof value[breakpoint] === "undefined" && sprintf(__("Up to %dpx", "eightshift-ui-components"), breakpointData[breakpoint == null ? void 0 : breakpoint.replace("max-", "")])
|
|
409
|
+
] })
|
|
410
|
+
] }),
|
|
411
|
+
typeof value[breakpoint] === "undefined" && /* @__PURE__ */ jsx("span", { className: "es:mt-2 es:block es:font-medium es:italic", children: __("Not set", "eightshift-ui-components") }),
|
|
412
|
+
typeof value[breakpoint] !== "undefined" && /* @__PURE__ */ jsxs("div", { className: "es:mx-auto es:mt-2", children: [
|
|
413
|
+
!isDesktopFirst && /* @__PURE__ */ jsx(
|
|
414
|
+
BreakpointPreview,
|
|
415
|
+
{
|
|
416
|
+
dotsStart: belowOverride,
|
|
417
|
+
blocks: [
|
|
418
|
+
aboveOverride !== "_default" && typeof (value == null ? void 0 : value[aboveOverride]) !== "undefined" && {
|
|
419
|
+
breakpoint: ((_b = breakpointUiData == null ? void 0 : breakpointUiData[aboveOverride]) == null ? void 0 : _b.label) ?? aboveOverride,
|
|
420
|
+
value: ((_c = options == null ? void 0 : options.find((opt) => opt.value === (value == null ? void 0 : value[aboveOverride]))) == null ? void 0 : _c.label) ?? upperFirst(value == null ? void 0 : value[aboveOverride]),
|
|
421
|
+
dotsStart: !belowOverride,
|
|
422
|
+
alignEnd: !belowOverride
|
|
423
|
+
},
|
|
424
|
+
aboveOverride === "_default" && typeof (value == null ? void 0 : value["_default"]) !== "undefined" && {
|
|
425
|
+
breakpoint: __("Default", "eightshift-ui-components"),
|
|
426
|
+
value: ((_d = options == null ? void 0 : options.find((opt) => opt.value === (value == null ? void 0 : value["_default"]))) == null ? void 0 : _d.label) ?? upperFirst(value == null ? void 0 : value["_default"]),
|
|
427
|
+
dotsStart: !belowOverride,
|
|
428
|
+
alignEnd: !belowOverride
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
breakpoint: ((_e = breakpointUiData == null ? void 0 : breakpointUiData[realBreakpointName]) == null ? void 0 : _e.label) ?? realBreakpointName,
|
|
432
|
+
value: ((_f = options == null ? void 0 : options.find((opt) => opt.value === (value == null ? void 0 : value[breakpoint]))) == null ? void 0 : _f.label) ?? upperFirst(value == null ? void 0 : value[breakpoint]),
|
|
433
|
+
width: breakpointData[realBreakpointName],
|
|
434
|
+
active: true,
|
|
435
|
+
dotsEnd: !belowOverride
|
|
436
|
+
},
|
|
437
|
+
belowOverride && typeof (value == null ? void 0 : value[belowOverride]) !== "undefined" && {
|
|
438
|
+
breakpoint: ((_g = breakpointUiData == null ? void 0 : breakpointUiData[belowOverride]) == null ? void 0 : _g.label) ?? belowOverride,
|
|
439
|
+
value: ((_h = options == null ? void 0 : options.find((opt) => opt.value === (value == null ? void 0 : value[belowOverride]))) == null ? void 0 : _h.label) ?? upperFirst(value == null ? void 0 : value[belowOverride]),
|
|
440
|
+
width: breakpointData[belowOverride],
|
|
441
|
+
dotsEnd: true
|
|
442
|
+
}
|
|
443
|
+
]
|
|
444
|
+
}
|
|
445
|
+
),
|
|
446
|
+
isDesktopFirst && /* @__PURE__ */ jsx(
|
|
447
|
+
BreakpointPreview,
|
|
448
|
+
{
|
|
449
|
+
dotsStart: true,
|
|
450
|
+
dotsEnd: aboveOverride !== "_default",
|
|
451
|
+
blocks: [
|
|
452
|
+
belowOverride && {
|
|
453
|
+
breakpoint: ((_i = breakpointUiData == null ? void 0 : breakpointUiData[belowOverride == null ? void 0 : belowOverride.replace("max-", "")]) == null ? void 0 : _i.label) ?? (belowOverride == null ? void 0 : belowOverride.replace("max-", "")),
|
|
454
|
+
value: ((_j = options == null ? void 0 : options.find((opt) => opt.value === (value == null ? void 0 : value[belowOverride]))) == null ? void 0 : _j.label) ?? upperFirst(value == null ? void 0 : value[belowOverride])
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
breakpoint: ((_k = breakpointUiData == null ? void 0 : breakpointUiData[realBreakpointName]) == null ? void 0 : _k.label) ?? realBreakpointName,
|
|
458
|
+
value: ((_l = options == null ? void 0 : options.find((opt) => opt.value === (value == null ? void 0 : value[breakpoint]))) == null ? void 0 : _l.label) ?? upperFirst(value == null ? void 0 : value[realBreakpointName]),
|
|
459
|
+
width: breakpointData[(_m = filterBreakpoints[i - 1]) == null ? void 0 : _m.replace("max-", "")],
|
|
460
|
+
active: true
|
|
461
|
+
},
|
|
462
|
+
aboveOverride !== "_default" && {
|
|
463
|
+
breakpoint: ((_n = breakpointUiData == null ? void 0 : breakpointUiData[aboveOverride == null ? void 0 : aboveOverride.replace("max-", "")]) == null ? void 0 : _n.label) ?? (aboveOverride == null ? void 0 : aboveOverride.replace("max-", "")),
|
|
464
|
+
value: ((_o = options == null ? void 0 : options.find((opt) => opt.value === (value == null ? void 0 : value[aboveOverride]))) == null ? void 0 : _o.label) ?? upperFirst(value == null ? void 0 : value[aboveOverride]),
|
|
465
|
+
width: breakpointData[breakpoint == null ? void 0 : breakpoint.replace("max-", "")]
|
|
466
|
+
},
|
|
467
|
+
aboveOverride === "_default" && {
|
|
468
|
+
breakpoint: __("Default", "eightshift-ui-components"),
|
|
469
|
+
value: ((_p = options == null ? void 0 : options.find((opt) => opt.value === (value == null ? void 0 : value["_default"]))) == null ? void 0 : _p.label) ?? upperFirst(value == null ? void 0 : value["_default"]),
|
|
470
|
+
width: breakpointData[breakpoint == null ? void 0 : breakpoint.replace("max-", "")],
|
|
471
|
+
dotsEnd: true
|
|
472
|
+
}
|
|
473
|
+
]
|
|
474
|
+
}
|
|
475
|
+
)
|
|
476
|
+
] })
|
|
477
|
+
] }),
|
|
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: ((_r = icons) == null ? void 0 : _r[(_q = breakpointUiData == null ? void 0 : breakpointUiData[realBreakpointName]) == null ? void 0 : _q.icon]) ?? ((_s = breakpointUiData == null ? void 0 : breakpointUiData[realBreakpointName]) == null ? void 0 : _s.icon) ?? ((_t = icons) == null ? void 0 : _t[`screen${upperFirst(realBreakpointName)}`])
|
|
486
|
+
}
|
|
487
|
+
)
|
|
488
|
+
}
|
|
489
|
+
),
|
|
490
|
+
children({
|
|
491
|
+
breakpoint,
|
|
492
|
+
currentValue: value == null ? void 0 : value[breakpoint],
|
|
493
|
+
handleChange: (newValue) => {
|
|
494
|
+
onChange({
|
|
495
|
+
...value,
|
|
496
|
+
[breakpoint]: newValue
|
|
497
|
+
});
|
|
498
|
+
},
|
|
499
|
+
options,
|
|
500
|
+
key: Object.keys(value)
|
|
501
|
+
}),
|
|
502
|
+
/* @__PURE__ */ jsx(
|
|
503
|
+
Button,
|
|
504
|
+
{
|
|
505
|
+
onPress: () => {
|
|
506
|
+
const newValue = { ...value };
|
|
507
|
+
delete newValue[breakpoint];
|
|
508
|
+
onChange(newValue);
|
|
509
|
+
},
|
|
510
|
+
icon: icons.clearAlt,
|
|
511
|
+
disabled: typeof (value == null ? void 0 : value[breakpoint]) === "undefined",
|
|
512
|
+
type: "ghost"
|
|
513
|
+
}
|
|
514
|
+
)
|
|
515
|
+
]
|
|
516
|
+
},
|
|
517
|
+
realBreakpointName
|
|
518
|
+
);
|
|
519
|
+
})
|
|
520
|
+
}
|
|
521
|
+
),
|
|
522
|
+
isDesktopFirst && !inline && /* @__PURE__ */ jsxs(
|
|
523
|
+
"div",
|
|
524
|
+
{
|
|
525
|
+
className: clsx(
|
|
526
|
+
"es:grid es:items-center es:gap-x-2 es:transition-[grid-template-columns,margin-block-start] es:duration-150",
|
|
527
|
+
innerContentAlign === "start" && "es:justify-items-start",
|
|
528
|
+
innerContentAlign === "center" && "es:justify-items-center",
|
|
529
|
+
innerContentAlign === "end" && "es:justify-items-end",
|
|
530
|
+
innerContentAlign === "stretch" && "es:justify-items-stretch",
|
|
531
|
+
detailsVisible ? "es:mt-2! 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
|
+
),
|
|
533
|
+
children: [
|
|
534
|
+
detailsVisible && /* @__PURE__ */ jsx(DefaultTooltip, {}),
|
|
535
|
+
/* @__PURE__ */ jsx("div", { className: clsx("es:w-full", detailsVisible ? "es:col-start-2 es:col-end-2" : "es:col-span-full"), children: children({
|
|
536
|
+
breakpoint: "_default",
|
|
537
|
+
currentValue: value == null ? void 0 : value["_default"],
|
|
538
|
+
handleChange: (newValue) => onChange({
|
|
539
|
+
...value,
|
|
540
|
+
_default: newValue
|
|
541
|
+
}),
|
|
542
|
+
options,
|
|
543
|
+
key: Object.keys(value)
|
|
544
|
+
}) })
|
|
545
|
+
]
|
|
546
|
+
},
|
|
547
|
+
"_default-desktop-first"
|
|
548
|
+
),
|
|
549
|
+
isDesktopFirst && inline && /* @__PURE__ */ jsxs(
|
|
550
|
+
AnimatedVisibility,
|
|
551
|
+
{
|
|
552
|
+
className: clsx(
|
|
553
|
+
"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",
|
|
554
|
+
innerContentAlign === "start" && "es:justify-items-start",
|
|
555
|
+
innerContentAlign === "center" && "es:justify-items-center",
|
|
556
|
+
innerContentAlign === "end" && "es:justify-items-end",
|
|
557
|
+
innerContentAlign === "stretch" && "es:justify-items-stretch"
|
|
558
|
+
),
|
|
559
|
+
visible: detailsVisible,
|
|
560
|
+
children: [
|
|
561
|
+
/* @__PURE__ */ jsx(DefaultTooltip, {}),
|
|
562
|
+
/* @__PURE__ */ jsx("div", { className: "es:col-start-2 es:col-end-2", children: children({
|
|
563
|
+
breakpoint: "_default",
|
|
564
|
+
currentValue: value == null ? void 0 : value["_default"],
|
|
565
|
+
handleChange: (newValue) => onChange({
|
|
566
|
+
...value,
|
|
567
|
+
_default: newValue
|
|
568
|
+
}),
|
|
569
|
+
options,
|
|
570
|
+
key: Object.keys(value),
|
|
571
|
+
isInlineExpandedView: true
|
|
572
|
+
}) })
|
|
573
|
+
]
|
|
574
|
+
},
|
|
575
|
+
"_default-desktop-first-inline"
|
|
576
|
+
)
|
|
577
|
+
]
|
|
578
|
+
}
|
|
579
|
+
);
|
|
580
|
+
};
|
|
581
|
+
export {
|
|
582
|
+
Responsive
|
|
583
|
+
};
|