@eightshift/ui-components 1.6.1 → 1.7.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.
- package/dist/Button-VbCAu4hd.js +185 -0
- package/dist/{intlStrings-BxJIrC6b.js → Color-BpLubxWI.js} +2394 -2394
- package/dist/{ColorSwatch-BNX2quma.js → ColorSwatch-CinC14s3.js} +4 -4
- package/dist/{Dialog-BdtBguys.js → Dialog-BN5EE7UH.js} +9 -9
- package/dist/{FieldError-ClB3-XvF.js → FieldError-BttM1Nxd.js} +2 -2
- package/dist/{FocusScope-B5L3qI3N.js → FocusScope-CtCX0OGo.js} +2 -2
- package/dist/{Group-ubPTwji_.js → Group-XzWUooix.js} +3 -3
- package/dist/{Heading-DGnF6JDc.js → Heading-DZelepHV.js} +1 -1
- package/dist/{Hidden-CupIZhlF.js → Hidden-CcFqOzrp.js} +1 -1
- package/dist/{Input-BoNEjaXM.js → Input-CV1qVS6t.js} +8 -8
- package/dist/{Label-BqW0M3HN.js → Label-BwqMVkuV.js} +2 -2
- package/dist/{ListBox-civ86c_v.js → ListBox-DuZPdnkk.js} +16 -12
- package/dist/{SelectionManager-Ctbzoj1E.js → SelectionManager-x27KqnAT.js} +67 -34
- package/dist/{Separator-CDhAddZc.js → Separator-BM58t3PP.js} +24 -26
- package/dist/{Slider-Dkj8Slw3.js → Slider-D9Cs6yKr.js} +162 -162
- package/dist/{Text-CdwRBXol.js → Text-BVIXT8qq.js} +1 -1
- package/dist/{VisuallyHidden-DsMLX-RC.js → VisuallyHidden-WhC7vZaL.js} +2 -2
- package/dist/assets/style.css +1 -1
- package/dist/components/animated-visibility/animated-visibility.js +92 -129
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/button/button.js +6 -6
- package/dist/components/checkbox/checkbox.js +7 -7
- package/dist/components/color-pickers/color-picker.js +2 -2
- package/dist/components/color-pickers/color-swatch.js +3 -3
- package/dist/components/color-pickers/gradient-editor.js +2 -2
- package/dist/components/color-pickers/solid-color-picker.js +64 -64
- package/dist/components/component-toggle/component-toggle.js +1 -1
- package/dist/components/draggable/draggable-handle.js +2 -2
- package/dist/components/draggable/draggable.js +7 -4
- package/dist/components/draggable-list/draggable-list-item.js +2 -2
- package/dist/components/draggable-list/draggable-list.js +6 -3
- package/dist/components/expandable/expandable.js +3 -3
- package/dist/components/index.js +3 -1
- package/dist/components/input-field/input-field.js +7 -7
- package/dist/components/item-collection/item-collection.js +6 -1
- package/dist/components/link-input/link-input.js +40 -36
- package/dist/components/list-box/list-box.js +2 -2
- package/dist/components/matrix-align/matrix-align.js +2 -2
- package/dist/components/menu/menu.js +15 -15
- package/dist/components/modal/modal.js +6 -6
- package/dist/components/number-picker/number-picker.js +10 -10
- package/dist/components/option-select/option-select.js +1 -1
- package/dist/components/options-panel/options-panel.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/placeholders/media-placeholder.js +6 -5
- package/dist/components/popover/popover.js +2 -2
- package/dist/components/radio/radio.js +13 -13
- package/dist/components/repeater/repeater-item.js +1 -1
- package/dist/components/repeater/repeater.js +6 -3
- package/dist/components/responsive/mini-responsive.js +495 -0
- package/dist/components/responsive/responsive-legacy.js +2 -2
- package/dist/components/responsive/responsive.js +7 -3
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/select/async-multi-select.js +1 -0
- package/dist/components/select/async-single-select.js +1 -0
- package/dist/components/select/multi-select.js +1 -0
- package/dist/components/select/single-select.js +1 -0
- package/dist/components/select/styles.js +1 -1
- package/dist/components/slider/column-config-slider.js +3 -3
- package/dist/components/slider/slider.js +3 -3
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/spacer/spacer.js +3 -4
- package/dist/components/tabs/tabs.js +22 -17
- package/dist/components/toggle/switch.js +6 -6
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +6 -6
- package/dist/components/tooltip/tooltip.js +3 -3
- package/dist/{context-kCEA3M_y.js → context-Cs-ZD1nu.js} +1 -1
- package/dist/{default-i18n-BqWys-1G.js → default-i18n-DRnM8y4w.js} +45 -21
- package/dist/{focusSafely-xMzk3syC.js → focusSafely-CgFLw4FA.js} +1 -1
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/index.js +3 -1
- package/dist/{number-CHmNj-oR.js → number-GajL10e1.js} +2 -2
- package/dist/{react-jsx-parser.min-sPC96O_U.js → react-jsx-parser.min-B5HVwW_W.js} +103 -53
- package/dist/{textSelection-D5Bit8i8.js → textSelection-CvK0YHTZ.js} +1 -1
- package/dist/{tooltip-srrt1p-b.js → tooltip-eKaARDoV.js} +5 -5
- package/dist/{useButton-6H5k2W5N.js → useButton-Cy9eEev7.js} +3 -3
- package/dist/{useEvent-BY-3vfxa.js → useEvent-LZebwyrb.js} +1 -1
- package/dist/{useFocusRing-rz8eyzby.js → useFocusRing-BMOTWmOx.js} +1 -1
- package/dist/{useFocusable-Bu2Ovohk.js → useFocusable-ByyKSVQv.js} +2 -2
- package/dist/{useFormReset-fUHUaaR6.js → useFormReset-B8m1uz1J.js} +1 -1
- package/dist/{useFormValidationState-DAan_XbC.js → useFormValidationState-BjMhz_VI.js} +2 -2
- package/dist/{useLabel-Bk7iP__W.js → useLabel-B6uO0wVK.js} +2 -2
- package/dist/{useLabels-DmsOywGg.js → useLabels-5dFkeiXx.js} +1 -1
- package/dist/{useListState-GXSJsAgz.js → useListState-eKxv7HPC.js} +28 -16
- package/dist/{useLocalizedStringFormatter-m03yY3xi.js → useLocalizedStringFormatter-BaKmjFNp.js} +1 -1
- package/dist/{useMenuTrigger-CT2-BFLo.js → useMenuTrigger-4fwEmto8.js} +4 -4
- package/dist/{useNumberFieldState-CpmU88xz.js → useNumberField-DMMUTZ-h.js} +169 -169
- package/dist/{useNumberFormatter-B-20GQ2u.js → useNumberFormatter-Cyx5Dxkf.js} +1 -1
- package/dist/{usePress-Cs8K7gKw.js → usePress-D8nPoIQm.js} +22 -10
- package/dist/{useSingleSelectListState-C1ddMCq3.js → useSingleSelectListState-CABciySJ.js} +3 -2
- package/dist/{useToggle-Cn2nQUNS.js → useToggle-BmltE9Zr.js} +4 -4
- package/dist/{useToggleState-Dj0JhD9W.js → useToggleState-DZXLEnA_.js} +1 -1
- package/dist/{utils-Du2x3YVu.js → utils-BCJajCwh.js} +15 -7
- package/package.json +18 -18
- package/dist/Button-CYX0D6At.js +0 -55
- package/dist/LiveAnnouncer-D8h-3GrG.js +0 -63
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { cloneElement } from "react";
|
|
3
|
+
import { D as DecorativeTooltip } from "../../tooltip-eKaARDoV.js";
|
|
4
|
+
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
|
+
import { _ as __, s as sprintf } from "../../default-i18n-DRnM8y4w.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 { ResponsivePreview } from "../responsive-preview/responsive-preview.js";
|
|
10
|
+
import { ButtonGroup, Button } from "../button/button.js";
|
|
11
|
+
import { Spacer } from "../spacer/spacer.js";
|
|
12
|
+
import { BaseControl } from "../base-control/base-control.js";
|
|
13
|
+
import { TriggeredPopover } from "../popover/popover.js";
|
|
14
|
+
import { OptionSelect } from "../option-select/option-select.js";
|
|
15
|
+
import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../Text-BVIXT8qq.js";
|
|
16
|
+
/**
|
|
17
|
+
* A compact, inline version of `Responsive`. 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 the main view, with the detail popover closed.
|
|
26
|
+
* - `isInlineExpandedView: boolean` - (Optional) `true` if the detail popover is open.
|
|
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.hidden] - If `true`, the component is not rendered.
|
|
43
|
+
* @param {'start' | 'center' | 'end' | 'stretch'} [props.innerContentAlign='start'] - Determines inner content alignment
|
|
44
|
+
*
|
|
45
|
+
* @returns {JSX.Element} The MiniResponsive component.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* <MiniResponsive
|
|
49
|
+
* value={value}
|
|
50
|
+
* onChange={onChange}
|
|
51
|
+
* icon={icons.myIcon}
|
|
52
|
+
* label={__('Label', 'eightshift-ui-components')}
|
|
53
|
+
* options={[
|
|
54
|
+
* { value: 'value1', label: 'Value 1' },
|
|
55
|
+
* { value: 'value2', label: 'Value 2' },
|
|
56
|
+
* { value: 'value3', label: 'Value 3' },
|
|
57
|
+
* ]}
|
|
58
|
+
* breakpoints={['mobile', 'tablet', 'desktop', 'large']}
|
|
59
|
+
* breakpointData={breakpointData}
|
|
60
|
+
* >
|
|
61
|
+
* {({ breakpoint, currentValue, options, handleChange }) => (
|
|
62
|
+
* <Select
|
|
63
|
+
* label={breakpoint}
|
|
64
|
+
* value={currentValue}
|
|
65
|
+
* options={options}
|
|
66
|
+
* onChange={handleChange}
|
|
67
|
+
* />
|
|
68
|
+
* )}
|
|
69
|
+
* </MiniResponsive>
|
|
70
|
+
*
|
|
71
|
+
* @preserve
|
|
72
|
+
*/
|
|
73
|
+
const MiniResponsive = (props) => {
|
|
74
|
+
const {
|
|
75
|
+
value,
|
|
76
|
+
onChange,
|
|
77
|
+
icon,
|
|
78
|
+
help,
|
|
79
|
+
label,
|
|
80
|
+
subtitle,
|
|
81
|
+
options,
|
|
82
|
+
breakpoints: rawBreakpoints,
|
|
83
|
+
desktopFirstBreakpoints: rawDesktopFirstBreakpoints,
|
|
84
|
+
breakpointData,
|
|
85
|
+
breakpointUiData,
|
|
86
|
+
noModeSelect,
|
|
87
|
+
children,
|
|
88
|
+
hidden,
|
|
89
|
+
innerContentAlign = "start"
|
|
90
|
+
} = props;
|
|
91
|
+
if (typeof rawBreakpoints === "undefined" || !Array.isArray(rawBreakpoints)) {
|
|
92
|
+
console.warn(__("MiniResponsive: Missing or invalid 'breakpoints' prop.", "eightshift-ui-components"));
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
const breakpoints = rawBreakpoints.slice(1);
|
|
96
|
+
const desktopFirstBreakpoints = (rawDesktopFirstBreakpoints ?? rawBreakpoints.slice(0, -1)).map(
|
|
97
|
+
(breakpoint) => breakpoint.startsWith("max-") ? breakpoint : `max-${breakpoint}`
|
|
98
|
+
);
|
|
99
|
+
const isDesktopFirst = (value == null ? void 0 : value["_desktopFirst"]) === true;
|
|
100
|
+
const firstMobileFirstOverride = breakpoints.find((breakpoint) => typeof (value == null ? void 0 : value[breakpoint]) !== "undefined");
|
|
101
|
+
const lastDesktopFirstOverride = desktopFirstBreakpoints.toReversed().find((breakpoint) => typeof (value == null ? void 0 : value[breakpoint]) !== "undefined");
|
|
102
|
+
const breakpointsToMap = isDesktopFirst ? desktopFirstBreakpoints : breakpoints;
|
|
103
|
+
if (hidden) {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
const DefaultTooltip = () => {
|
|
107
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
108
|
+
const overrideIcon = (_a = breakpointUiData == null ? void 0 : breakpointUiData[isDesktopFirst ? rawBreakpoints.at(-1) : rawBreakpoints.at(0)]) == null ? void 0 : _a.icon;
|
|
109
|
+
return /* @__PURE__ */ jsx(
|
|
110
|
+
DecorativeTooltip,
|
|
111
|
+
{
|
|
112
|
+
placement: "left",
|
|
113
|
+
className: "es-uic-p-3",
|
|
114
|
+
theme: "light",
|
|
115
|
+
offset: 7.5,
|
|
116
|
+
arrow: true,
|
|
117
|
+
text: /* @__PURE__ */ jsxs("div", { className: "es-uic-max-w-64 es-uic-p-1", children: [
|
|
118
|
+
/* @__PURE__ */ jsx("span", { className: "es-uic-block es-uic-text-balance es-uic-font-semibold es-uic-tabular-nums", children: __("Default", "eightshift-ui-components") }),
|
|
119
|
+
/* @__PURE__ */ jsxs("span", { className: "es-uic-block es-uic-text-balance es-uic-tabular-nums", children: [
|
|
120
|
+
!firstMobileFirstOverride && !lastDesktopFirstOverride && __("Always applied, regardless of browser width.", "eightshift-ui-components"),
|
|
121
|
+
firstMobileFirstOverride && !isDesktopFirst && sprintf(__("Applies when the browser width is %dpx or less.", "eightshift-ui-components"), breakpointData[firstMobileFirstOverride] - 1),
|
|
122
|
+
lastDesktopFirstOverride && isDesktopFirst && sprintf(__("Applies when the browser width is %dpx or more.", "eightshift-ui-components"), breakpointData[lastDesktopFirstOverride.replace("max-", "")])
|
|
123
|
+
] }),
|
|
124
|
+
/* @__PURE__ */ jsxs("div", { className: "es-uic-mx-auto", children: [
|
|
125
|
+
firstMobileFirstOverride && !isDesktopFirst && /* @__PURE__ */ jsx(
|
|
126
|
+
BreakpointPreview,
|
|
127
|
+
{
|
|
128
|
+
blocks: [
|
|
129
|
+
{
|
|
130
|
+
breakpoint: __("Default", "eightshift-ui-components"),
|
|
131
|
+
widthEnd: breakpointData[firstMobileFirstOverride] - 1,
|
|
132
|
+
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"]),
|
|
133
|
+
dotsStart: true,
|
|
134
|
+
alignEnd: true,
|
|
135
|
+
active: true
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
breakpoint: ((_c = breakpointUiData == null ? void 0 : breakpointUiData[firstMobileFirstOverride]) == null ? void 0 : _c.label) ?? firstMobileFirstOverride,
|
|
139
|
+
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]),
|
|
140
|
+
dotsEnd: true
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
lastDesktopFirstOverride && isDesktopFirst && /* @__PURE__ */ jsx(
|
|
146
|
+
BreakpointPreview,
|
|
147
|
+
{
|
|
148
|
+
blocks: [
|
|
149
|
+
{
|
|
150
|
+
breakpoint: ((_e = breakpointUiData == null ? void 0 : breakpointUiData[lastDesktopFirstOverride.replace("max-", "")]) == null ? void 0 : _e.label) ?? lastDesktopFirstOverride.replace("max-", ""),
|
|
151
|
+
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]),
|
|
152
|
+
dotsStart: true,
|
|
153
|
+
alignEnd: true
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
breakpoint: __("Default", "eightshift-ui-components"),
|
|
157
|
+
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"]),
|
|
158
|
+
width: breakpointData[lastDesktopFirstOverride.replace("max-", "")],
|
|
159
|
+
dotsEnd: true,
|
|
160
|
+
active: true
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
] })
|
|
166
|
+
] }),
|
|
167
|
+
children: /* @__PURE__ */ jsx("div", { className: "es-uic-flex es-uic-size-7 es-uic-items-center es-uic-justify-center es-uic-rounded es-uic-border es-uic-border-teal-500/10 es-uic-bg-teal-50 es-uic-p-0.5 es-uic-text-teal-800 es-uic-shadow-sm es-uic-shadow-teal-600/25 [&>svg]:es-uic-size-5", children: ((_h = icons) == null ? void 0 : _h[overrideIcon]) ?? overrideIcon ?? icons[`screen${upperFirst(isDesktopFirst ? rawBreakpoints.at(-1) : rawBreakpoints.at(0))}`] })
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
};
|
|
171
|
+
return /* @__PURE__ */ jsx(
|
|
172
|
+
BaseControl,
|
|
173
|
+
{
|
|
174
|
+
icon,
|
|
175
|
+
label,
|
|
176
|
+
subtitle,
|
|
177
|
+
help,
|
|
178
|
+
inline: true,
|
|
179
|
+
children: /* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
180
|
+
children({
|
|
181
|
+
breakpoint: "_default",
|
|
182
|
+
currentValue: value == null ? void 0 : value["_default"],
|
|
183
|
+
handleChange: (newValue) => onChange({
|
|
184
|
+
...value,
|
|
185
|
+
_default: newValue
|
|
186
|
+
}),
|
|
187
|
+
options,
|
|
188
|
+
key: Object.keys(value),
|
|
189
|
+
isInlineCollapsedView: true
|
|
190
|
+
}),
|
|
191
|
+
/* @__PURE__ */ jsxs(
|
|
192
|
+
TriggeredPopover,
|
|
193
|
+
{
|
|
194
|
+
triggerButtonIcon: cloneElement(isDesktopFirst ? icons.responsiveOverridesAlt : icons.responsiveOverridesAlt2, { className: "!es-uic-size-5" }),
|
|
195
|
+
triggerButtonProps: {
|
|
196
|
+
tooltip: __("Responsive overrides", "eightshift-ui-components"),
|
|
197
|
+
className: "es-uic-w-7"
|
|
198
|
+
},
|
|
199
|
+
className: "es-uic-min-w-80 es-uic-divide-y es-uic-divide-gray-200 !es-uic-p-0",
|
|
200
|
+
children: [
|
|
201
|
+
/* @__PURE__ */ jsxs("div", { className: "es-uic-flex es-uic-items-center es-uic-justify-between es-uic-p-2", children: [
|
|
202
|
+
/* @__PURE__ */ jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { className: "es-uic-block es-uic-text-xs es-uic-text-gray-500", children: __("Responsive overrides", "eightshift-ui-components") }),
|
|
203
|
+
/* @__PURE__ */ jsx(
|
|
204
|
+
OptionSelect,
|
|
205
|
+
{
|
|
206
|
+
hidden: noModeSelect,
|
|
207
|
+
"aria-label": __("Breakpoint mode", "eightshift-ui-components"),
|
|
208
|
+
value: isDesktopFirst,
|
|
209
|
+
onChange: (newMode) => {
|
|
210
|
+
onChange({
|
|
211
|
+
_default: value["_default"],
|
|
212
|
+
_desktopFirst: newMode
|
|
213
|
+
});
|
|
214
|
+
},
|
|
215
|
+
options: [
|
|
216
|
+
{ label: __("Mobile-first", "eightshift-ui-components"), subtitle: __("Default", "eightshift-ui-components"), value: false },
|
|
217
|
+
{ label: __("Desktop-first", "eightshift-ui-components"), value: true }
|
|
218
|
+
],
|
|
219
|
+
wrapperProps: { triggerProps: { size: "small" } },
|
|
220
|
+
type: "menu",
|
|
221
|
+
tooltip: true
|
|
222
|
+
}
|
|
223
|
+
)
|
|
224
|
+
] }),
|
|
225
|
+
/* @__PURE__ */ jsxs("div", { className: "es-uic-space-y-2 es-uic-px-2 es-uic-py-2.5", children: [
|
|
226
|
+
!isDesktopFirst && /* @__PURE__ */ jsxs(
|
|
227
|
+
"div",
|
|
228
|
+
{
|
|
229
|
+
className: clsx(
|
|
230
|
+
"es-uic-grid es-uic-grid-cols-[minmax(0,_1.75rem),_minmax(0,_1fr),_minmax(0,_2.25rem)] es-uic-items-center es-uic-gap-x-2",
|
|
231
|
+
innerContentAlign === "start" && "es-uic-justify-items-start",
|
|
232
|
+
innerContentAlign === "center" && "es-uic-justify-items-center",
|
|
233
|
+
innerContentAlign === "end" && "es-uic-justify-items-end",
|
|
234
|
+
innerContentAlign === "stretch" && "es-uic-justify-items-stretch"
|
|
235
|
+
),
|
|
236
|
+
children: [
|
|
237
|
+
/* @__PURE__ */ jsx(DefaultTooltip, {}),
|
|
238
|
+
/* @__PURE__ */ jsx("div", { className: "es-uic-col-start-2 es-uic-col-end-2", children: children({
|
|
239
|
+
breakpoint: "_default",
|
|
240
|
+
currentValue: value == null ? void 0 : value["_default"],
|
|
241
|
+
handleChange: (newValue) => onChange({
|
|
242
|
+
...value,
|
|
243
|
+
_default: newValue
|
|
244
|
+
}),
|
|
245
|
+
options,
|
|
246
|
+
key: Object.keys(value),
|
|
247
|
+
isInlineExpandedView: true
|
|
248
|
+
}) })
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
"_default-mobile-first"
|
|
252
|
+
),
|
|
253
|
+
breakpointsToMap.map((breakpoint, i) => {
|
|
254
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
255
|
+
const realBreakpointName = breakpoint.replace("max-", "");
|
|
256
|
+
const filterBreakpoints = isDesktopFirst ? [...breakpointsToMap, "_default"] : ["_default", ...breakpointsToMap];
|
|
257
|
+
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");
|
|
258
|
+
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");
|
|
259
|
+
return /* @__PURE__ */ jsxs(
|
|
260
|
+
"div",
|
|
261
|
+
{
|
|
262
|
+
className: clsx(
|
|
263
|
+
"es-uic-grid es-uic-grid-cols-[minmax(0,_auto),_minmax(0,_1fr),_minmax(0,_2.25rem)] es-uic-items-center es-uic-gap-x-2",
|
|
264
|
+
innerContentAlign === "start" && "es-uic-justify-items-start",
|
|
265
|
+
innerContentAlign === "center" && "es-uic-justify-items-center",
|
|
266
|
+
innerContentAlign === "end" && "es-uic-justify-items-end",
|
|
267
|
+
innerContentAlign === "stretch" && "es-uic-justify-items-stretch"
|
|
268
|
+
),
|
|
269
|
+
children: [
|
|
270
|
+
/* @__PURE__ */ jsx(
|
|
271
|
+
DecorativeTooltip,
|
|
272
|
+
{
|
|
273
|
+
placement: "left",
|
|
274
|
+
theme: "light",
|
|
275
|
+
offset: 7.5,
|
|
276
|
+
arrow: true,
|
|
277
|
+
text: /* @__PURE__ */ jsxs("div", { className: "es-uic-max-w-96 es-uic-p-1", children: [
|
|
278
|
+
/* @__PURE__ */ jsx("span", { className: "es-uic-block es-uic-font-semibold", children: ((_a = breakpointUiData == null ? void 0 : breakpointUiData[realBreakpointName]) == null ? void 0 : _a.label) ?? upperFirst(realBreakpointName) }),
|
|
279
|
+
/* @__PURE__ */ jsxs("span", { className: "es-uic-block es-uic-text-balance es-uic-tabular-nums", children: [
|
|
280
|
+
!isDesktopFirst && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
281
|
+
!belowOverride && typeof value[breakpoint] !== "undefined" && sprintf(__("Applied when the browser width is %dpx or more.", "eightshift-ui-components"), breakpointData[realBreakpointName]),
|
|
282
|
+
belowOverride && typeof value[breakpoint] !== "undefined" && sprintf(
|
|
283
|
+
__("Applied when the browser width is between %dpx and %dpx.", "eightshift-ui-components"),
|
|
284
|
+
breakpointData[realBreakpointName],
|
|
285
|
+
breakpointData[belowOverride] - 1
|
|
286
|
+
),
|
|
287
|
+
typeof value[breakpoint] === "undefined" && sprintf(__("From %dpx", "eightshift-ui-components"), breakpointData[realBreakpointName])
|
|
288
|
+
] }),
|
|
289
|
+
isDesktopFirst && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
290
|
+
!belowOverride && typeof value[breakpoint] !== "undefined" && sprintf(__("Applied when the browser width is %dpx or less.", "eightshift-ui-components"), breakpointData[realBreakpointName] - 1),
|
|
291
|
+
belowOverride && typeof value[breakpoint] !== "undefined" && sprintf(
|
|
292
|
+
__("Applied when the browser width is between %dpx and %dpx.", "eightshift-ui-components"),
|
|
293
|
+
breakpointData[belowOverride == null ? void 0 : belowOverride.replace("max-", "")],
|
|
294
|
+
breakpointData[realBreakpointName] - 1
|
|
295
|
+
),
|
|
296
|
+
typeof value[breakpoint] === "undefined" && sprintf(__("Up to %dpx", "eightshift-ui-components"), breakpointData[breakpoint == null ? void 0 : breakpoint.replace("max-", "")])
|
|
297
|
+
] })
|
|
298
|
+
] }),
|
|
299
|
+
typeof value[breakpoint] === "undefined" && /* @__PURE__ */ jsx("span", { className: "es-uic-mt-2 es-uic-block es-uic-font-medium es-uic-italic", children: __("Not set", "eightshift-ui-components") }),
|
|
300
|
+
typeof value[breakpoint] !== "undefined" && /* @__PURE__ */ jsxs("div", { className: "es-uic-mx-auto es-uic-mt-2", children: [
|
|
301
|
+
!isDesktopFirst && /* @__PURE__ */ jsx(
|
|
302
|
+
BreakpointPreview,
|
|
303
|
+
{
|
|
304
|
+
dotsStart: belowOverride,
|
|
305
|
+
blocks: [
|
|
306
|
+
aboveOverride !== "_default" && typeof (value == null ? void 0 : value[aboveOverride]) !== "undefined" && {
|
|
307
|
+
breakpoint: ((_b = breakpointUiData == null ? void 0 : breakpointUiData[aboveOverride]) == null ? void 0 : _b.label) ?? aboveOverride,
|
|
308
|
+
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]),
|
|
309
|
+
dotsStart: !belowOverride,
|
|
310
|
+
alignEnd: !belowOverride
|
|
311
|
+
},
|
|
312
|
+
aboveOverride === "_default" && typeof (value == null ? void 0 : value["_default"]) !== "undefined" && {
|
|
313
|
+
breakpoint: __("Default", "eightshift-ui-components"),
|
|
314
|
+
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"]),
|
|
315
|
+
dotsStart: !belowOverride,
|
|
316
|
+
alignEnd: !belowOverride
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
breakpoint: ((_e = breakpointUiData == null ? void 0 : breakpointUiData[realBreakpointName]) == null ? void 0 : _e.label) ?? realBreakpointName,
|
|
320
|
+
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]),
|
|
321
|
+
width: breakpointData[realBreakpointName],
|
|
322
|
+
active: true,
|
|
323
|
+
dotsEnd: !belowOverride
|
|
324
|
+
},
|
|
325
|
+
belowOverride && typeof (value == null ? void 0 : value[belowOverride]) !== "undefined" && {
|
|
326
|
+
breakpoint: ((_g = breakpointUiData == null ? void 0 : breakpointUiData[belowOverride]) == null ? void 0 : _g.label) ?? belowOverride,
|
|
327
|
+
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]),
|
|
328
|
+
width: breakpointData[belowOverride],
|
|
329
|
+
dotsEnd: true
|
|
330
|
+
}
|
|
331
|
+
]
|
|
332
|
+
}
|
|
333
|
+
),
|
|
334
|
+
isDesktopFirst && /* @__PURE__ */ jsx(
|
|
335
|
+
BreakpointPreview,
|
|
336
|
+
{
|
|
337
|
+
dotsStart: true,
|
|
338
|
+
dotsEnd: aboveOverride !== "_default",
|
|
339
|
+
blocks: [
|
|
340
|
+
belowOverride && {
|
|
341
|
+
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-", "")),
|
|
342
|
+
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])
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
breakpoint: ((_k = breakpointUiData == null ? void 0 : breakpointUiData[realBreakpointName]) == null ? void 0 : _k.label) ?? realBreakpointName,
|
|
346
|
+
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]),
|
|
347
|
+
width: breakpointData[(_m = filterBreakpoints[i - 1]) == null ? void 0 : _m.replace("max-", "")],
|
|
348
|
+
active: true
|
|
349
|
+
},
|
|
350
|
+
aboveOverride !== "_default" && {
|
|
351
|
+
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-", "")),
|
|
352
|
+
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]),
|
|
353
|
+
width: breakpointData[breakpoint == null ? void 0 : breakpoint.replace("max-", "")]
|
|
354
|
+
},
|
|
355
|
+
aboveOverride === "_default" && {
|
|
356
|
+
breakpoint: __("Default", "eightshift-ui-components"),
|
|
357
|
+
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"]),
|
|
358
|
+
width: breakpointData[breakpoint == null ? void 0 : breakpoint.replace("max-", "")],
|
|
359
|
+
dotsEnd: true
|
|
360
|
+
}
|
|
361
|
+
]
|
|
362
|
+
}
|
|
363
|
+
)
|
|
364
|
+
] })
|
|
365
|
+
] }),
|
|
366
|
+
children: /* @__PURE__ */ jsx(
|
|
367
|
+
"div",
|
|
368
|
+
{
|
|
369
|
+
className: clsx(
|
|
370
|
+
"es-uic-flex es-uic-size-7 es-uic-items-center es-uic-justify-center es-uic-rounded es-uic-border es-uic-p-0.5 es-uic-shadow-sm es-uic-transition-colors [&>svg]:es-uic-size-5",
|
|
371
|
+
typeof value[breakpoint] !== "undefined" ? "es-uic-border-gray-200 es-uic-bg-gray-50 es-uic-text-gray-700" : "es-uic-border-gray-100 es-uic-bg-white es-uic-text-gray-500"
|
|
372
|
+
),
|
|
373
|
+
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)}`])
|
|
374
|
+
}
|
|
375
|
+
)
|
|
376
|
+
}
|
|
377
|
+
),
|
|
378
|
+
children({
|
|
379
|
+
breakpoint,
|
|
380
|
+
currentValue: value == null ? void 0 : value[breakpoint],
|
|
381
|
+
handleChange: (newValue) => {
|
|
382
|
+
onChange({
|
|
383
|
+
...value,
|
|
384
|
+
[breakpoint]: newValue
|
|
385
|
+
});
|
|
386
|
+
},
|
|
387
|
+
options,
|
|
388
|
+
key: Object.keys(value)
|
|
389
|
+
}),
|
|
390
|
+
/* @__PURE__ */ jsx(
|
|
391
|
+
Button,
|
|
392
|
+
{
|
|
393
|
+
onPress: () => {
|
|
394
|
+
const newValue = { ...value };
|
|
395
|
+
delete newValue[breakpoint];
|
|
396
|
+
onChange(newValue);
|
|
397
|
+
},
|
|
398
|
+
icon: icons.clearAlt,
|
|
399
|
+
disabled: typeof (value == null ? void 0 : value[breakpoint]) === "undefined",
|
|
400
|
+
type: "ghost"
|
|
401
|
+
}
|
|
402
|
+
)
|
|
403
|
+
]
|
|
404
|
+
},
|
|
405
|
+
realBreakpointName
|
|
406
|
+
);
|
|
407
|
+
}),
|
|
408
|
+
isDesktopFirst && /* @__PURE__ */ jsxs(
|
|
409
|
+
"div",
|
|
410
|
+
{
|
|
411
|
+
className: clsx(
|
|
412
|
+
"es-uic-grid es-uic-grid-cols-[minmax(0,_1.75rem),_minmax(0,_1fr),_minmax(0,_2.25rem)] es-uic-items-center es-uic-gap-x-2",
|
|
413
|
+
innerContentAlign === "start" && "es-uic-justify-items-start",
|
|
414
|
+
innerContentAlign === "center" && "es-uic-justify-items-center",
|
|
415
|
+
innerContentAlign === "end" && "es-uic-justify-items-end",
|
|
416
|
+
innerContentAlign === "stretch" && "es-uic-justify-items-stretch"
|
|
417
|
+
),
|
|
418
|
+
children: [
|
|
419
|
+
/* @__PURE__ */ jsx(DefaultTooltip, {}),
|
|
420
|
+
/* @__PURE__ */ jsx("div", { className: "es-uic-col-start-2 es-uic-col-end-2", children: children({
|
|
421
|
+
breakpoint: "_default",
|
|
422
|
+
currentValue: value == null ? void 0 : value["_default"],
|
|
423
|
+
handleChange: (newValue) => onChange({
|
|
424
|
+
...value,
|
|
425
|
+
_default: newValue
|
|
426
|
+
}),
|
|
427
|
+
options,
|
|
428
|
+
key: Object.keys(value),
|
|
429
|
+
isInlineExpandedView: true
|
|
430
|
+
}) })
|
|
431
|
+
]
|
|
432
|
+
},
|
|
433
|
+
"_default-desktop-first"
|
|
434
|
+
)
|
|
435
|
+
] }),
|
|
436
|
+
/* @__PURE__ */ jsxs("div", { className: "es-uic-grid es-uic-grid-cols-[1fr_auto_1fr] es-uic-gap-x-1 es-uic-px-1", children: [
|
|
437
|
+
/* @__PURE__ */ jsx(
|
|
438
|
+
TriggeredPopover,
|
|
439
|
+
{
|
|
440
|
+
triggerButtonLabel: __("Responsive preview", "eightshift-ui-components"),
|
|
441
|
+
triggerButtonProps: {
|
|
442
|
+
disabled: !Object.keys(value).some((key) => !(key == null ? void 0 : key.startsWith("_")) && typeof (value == null ? void 0 : value[key]) !== "undefined"),
|
|
443
|
+
type: "ghost",
|
|
444
|
+
className: "es-uic-my-1"
|
|
445
|
+
},
|
|
446
|
+
children: /* @__PURE__ */ jsx(
|
|
447
|
+
ResponsivePreview,
|
|
448
|
+
{
|
|
449
|
+
value,
|
|
450
|
+
isDesktopFirst,
|
|
451
|
+
breakpoints,
|
|
452
|
+
desktopFirstBreakpoints,
|
|
453
|
+
options,
|
|
454
|
+
breakpointData,
|
|
455
|
+
breakpointUiData
|
|
456
|
+
}
|
|
457
|
+
)
|
|
458
|
+
}
|
|
459
|
+
),
|
|
460
|
+
/* @__PURE__ */ jsx(
|
|
461
|
+
Spacer,
|
|
462
|
+
{
|
|
463
|
+
className: "*:!es-uic-bg-gray-200",
|
|
464
|
+
vertical: true,
|
|
465
|
+
border: true
|
|
466
|
+
}
|
|
467
|
+
),
|
|
468
|
+
/* @__PURE__ */ jsx(
|
|
469
|
+
Button,
|
|
470
|
+
{
|
|
471
|
+
icon: icons.clearAlt,
|
|
472
|
+
disabled: !Object.keys(value).some((key) => !(key == null ? void 0 : key.startsWith("_")) && typeof (value == null ? void 0 : value[key]) !== "undefined"),
|
|
473
|
+
onPress: () => {
|
|
474
|
+
const newValue = { ...value };
|
|
475
|
+
[...breakpoints, ...desktopFirstBreakpoints].forEach((breakpoint) => {
|
|
476
|
+
delete newValue[breakpoint];
|
|
477
|
+
});
|
|
478
|
+
onChange(newValue);
|
|
479
|
+
},
|
|
480
|
+
type: "ghost",
|
|
481
|
+
className: "es-uic-my-1 es-uic-justify-center",
|
|
482
|
+
children: __("Clear all overrides", "eightshift-ui-components")
|
|
483
|
+
}
|
|
484
|
+
)
|
|
485
|
+
] })
|
|
486
|
+
]
|
|
487
|
+
}
|
|
488
|
+
)
|
|
489
|
+
] })
|
|
490
|
+
}
|
|
491
|
+
);
|
|
492
|
+
};
|
|
493
|
+
export {
|
|
494
|
+
MiniResponsive
|
|
495
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
-
import { D as DecorativeTooltip } from "../../tooltip-
|
|
3
|
+
import { D as DecorativeTooltip } from "../../tooltip-eKaARDoV.js";
|
|
4
4
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
|
-
import { _ as __, s as sprintf } from "../../default-i18n-
|
|
5
|
+
import { _ as __, s as sprintf } from "../../default-i18n-DRnM8y4w.js";
|
|
6
6
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
7
7
|
import { upperFirst } from "../../utilities/es-dash.js";
|
|
8
8
|
import { icons } from "../../icons/icons.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
-
import { D as DecorativeTooltip } from "../../tooltip-
|
|
3
|
+
import { D as DecorativeTooltip } from "../../tooltip-eKaARDoV.js";
|
|
4
4
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
|
-
import { _ as __, s as sprintf } from "../../default-i18n-
|
|
5
|
+
import { _ as __, s as sprintf } from "../../default-i18n-DRnM8y4w.js";
|
|
6
6
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
7
7
|
import { upperFirst } from "../../utilities/es-dash.js";
|
|
8
8
|
import { icons } from "../../icons/icons.js";
|
|
@@ -90,6 +90,10 @@ const Responsive = (props) => {
|
|
|
90
90
|
hidden,
|
|
91
91
|
innerContentAlign = "start"
|
|
92
92
|
} = props;
|
|
93
|
+
if (typeof rawBreakpoints === "undefined" || !Array.isArray(rawBreakpoints)) {
|
|
94
|
+
console.warn(__("Responsive: Missing or invalid 'breakpoints' prop.", "eightshift-ui-components"));
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
93
97
|
const breakpoints = rawBreakpoints.slice(1);
|
|
94
98
|
const desktopFirstBreakpoints = (rawDesktopFirstBreakpoints ?? rawBreakpoints.slice(0, -1)).map(
|
|
95
99
|
(breakpoint) => breakpoint.startsWith("max-") ? breakpoint : `max-${breakpoint}`
|
|
@@ -117,7 +121,7 @@ const Responsive = (props) => {
|
|
|
117
121
|
/* @__PURE__ */ jsx("span", { className: "es-uic-block es-uic-text-balance es-uic-font-semibold es-uic-tabular-nums", children: __("Default", "eightshift-ui-components") }),
|
|
118
122
|
/* @__PURE__ */ jsxs("span", { className: "es-uic-block es-uic-text-balance es-uic-tabular-nums", children: [
|
|
119
123
|
!firstMobileFirstOverride && !lastDesktopFirstOverride && __("Always applied, regardless of browser width.", "eightshift-ui-components"),
|
|
120
|
-
firstMobileFirstOverride && !isDesktopFirst && sprintf(__("Applies when the browser width is %dpx or
|
|
124
|
+
firstMobileFirstOverride && !isDesktopFirst && sprintf(__("Applies when the browser width is %dpx or less.", "eightshift-ui-components"), breakpointData[firstMobileFirstOverride] - 1),
|
|
121
125
|
lastDesktopFirstOverride && isDesktopFirst && sprintf(__("Applies when the browser width is %dpx or more.", "eightshift-ui-components"), breakpointData[lastDesktopFirstOverride.replace("max-", "")])
|
|
122
126
|
] }),
|
|
123
127
|
/* @__PURE__ */ jsxs("div", { className: "es-uic-mx-auto", children: [
|
|
@@ -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-DRnM8y4w.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";
|
|
@@ -143,6 +143,7 @@ const AsyncMultiSelect = (props) => {
|
|
|
143
143
|
DropdownIndicator: customDropdownArrow ?? CustomSelectDefaultDropdownIndicator,
|
|
144
144
|
ClearIndicator: customClearIndicator ?? CustomSelectDefaultClearIndicator
|
|
145
145
|
},
|
|
146
|
+
menuPortalTarget: document.body,
|
|
146
147
|
...additionalProps
|
|
147
148
|
}
|
|
148
149
|
) })
|
|
@@ -125,6 +125,7 @@ const AsyncSelect = (props) => {
|
|
|
125
125
|
DropdownIndicator: customDropdownArrow ?? CustomSelectDefaultDropdownIndicator,
|
|
126
126
|
ClearIndicator: customClearIndicator ?? CustomSelectDefaultClearIndicator
|
|
127
127
|
},
|
|
128
|
+
menuPortalTarget: document.body,
|
|
128
129
|
...additionalProps
|
|
129
130
|
}
|
|
130
131
|
)
|
|
@@ -137,6 +137,7 @@ const MultiSelect = (props) => {
|
|
|
137
137
|
DropdownIndicator: customDropdownArrow ?? CustomSelectDefaultDropdownIndicator,
|
|
138
138
|
ClearIndicator: customClearIndicator ?? CustomSelectDefaultClearIndicator
|
|
139
139
|
},
|
|
140
|
+
menuPortalTarget: document.body,
|
|
140
141
|
...additionalProps
|
|
141
142
|
}
|
|
142
143
|
) })
|
|
@@ -119,6 +119,7 @@ const Select = (props) => {
|
|
|
119
119
|
DropdownIndicator: customDropdownArrow ?? CustomSelectDefaultDropdownIndicator,
|
|
120
120
|
ClearIndicator: customClearIndicator ?? CustomSelectDefaultClearIndicator
|
|
121
121
|
},
|
|
122
|
+
menuPortalTarget: document.body,
|
|
122
123
|
...additionalProps
|
|
123
124
|
}
|
|
124
125
|
)
|
|
@@ -16,7 +16,7 @@ const multiValueLabelStyles = "es-uic-select-none";
|
|
|
16
16
|
const multiValueRemoveStyles = "hover:es-uic-bg-red-500/15 hover:es-uic-text-red-900 es-uic-text-gray-500 es-uic-rounded es-uic-p-0.5 [&>svg]:es-uic-size-3.5 [&>svg]:es-uic-stroke-[1.5] es-uic-transition";
|
|
17
17
|
const clearIndicatorStyles = "es-uic-text-gray-500 es-uic-p-1 es-uic-rounded-md hover:bg-red-50 hover:text-red-800 es-uic-transition";
|
|
18
18
|
const dropdownIndicatorStyles = "es-uic-text-gray-500 es-uic-px-1 group-hover:es-uic-text-black [&>svg]:es-uic-transition-transform [&>svg]:es-uic-duration-500 [&>svg]:es-uic-size-5.5";
|
|
19
|
-
const menuStyles = "es-uic-
|
|
19
|
+
const menuStyles = "es-uic-rounded-md es-uic-border es-uic-border-gray-200 es-uic-bg-white es-uic-shadow-lg es-uic-mt-1 es-uic-text-sm es-uic-overflow-x-hidden";
|
|
20
20
|
const optionStyles = {
|
|
21
21
|
base: "es-uic-p-2 !es-uic-flex es-uic-items-center es-uic-gap-1.5 es-uic-text-gray-800 es-uic-rounded [&>svg]:es-uic-size-5 [&>svg]:es-uic-text-gray-500 es-uic-transition es-uic-mx-1 first:es-uic-mt-1 last:es-uic-mb-1 !es-uic-w-auto es-uic-min-h-9",
|
|
22
22
|
focus: "es-uic-bg-gray-100 active:es-uic-bg-teal-700/15",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../default-i18n-
|
|
3
|
-
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-
|
|
4
|
-
import { $ as $6f909507e6374d18$export$472062a354075cee, a as $6f909507e6374d18$export$105594979f116971, b as $6f909507e6374d18$export$2c1b491743890dec, c as $6f909507e6374d18$export$a590f758a961cb5b } from "../../Slider-
|
|
2
|
+
import { _ as __ } from "../../default-i18n-DRnM8y4w.js";
|
|
3
|
+
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BwqMVkuV.js";
|
|
4
|
+
import { $ as $6f909507e6374d18$export$472062a354075cee, a as $6f909507e6374d18$export$105594979f116971, b as $6f909507e6374d18$export$2c1b491743890dec, c as $6f909507e6374d18$export$a590f758a961cb5b } from "../../Slider-D9Cs6yKr.js";
|
|
5
5
|
import { BaseControl } from "../base-control/base-control.js";
|
|
6
6
|
import { icons } from "../../icons/icons.js";
|
|
7
7
|
import { getColumnConfigOutputText } from "./utils.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "../../utils-
|
|
3
|
-
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5, a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "../../Label-
|
|
4
|
-
import { $ as $6f909507e6374d18$export$472062a354075cee, c as $6f909507e6374d18$export$a590f758a961cb5b, a as $6f909507e6374d18$export$105594979f116971, b as $6f909507e6374d18$export$2c1b491743890dec, d as $6f909507e6374d18$export$1e7083018727fa60 } from "../../Slider-
|
|
2
|
+
import { $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "../../utils-BCJajCwh.js";
|
|
3
|
+
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5, a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "../../Label-BwqMVkuV.js";
|
|
4
|
+
import { $ as $6f909507e6374d18$export$472062a354075cee, c as $6f909507e6374d18$export$a590f758a961cb5b, a as $6f909507e6374d18$export$105594979f116971, b as $6f909507e6374d18$export$2c1b491743890dec, d as $6f909507e6374d18$export$1e7083018727fa60 } from "../../Slider-D9Cs6yKr.js";
|
|
5
5
|
import { BaseControl } from "../base-control/base-control.js";
|
|
6
6
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
7
7
|
import { NumberPicker } from "../number-picker/number-picker.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __, s as sprintf, a as _n } from "../../default-i18n-
|
|
1
|
+
import { _ as __, s as sprintf, a as _n } from "../../default-i18n-DRnM8y4w.js";
|
|
2
2
|
/**
|
|
3
3
|
* Generates an array of markers based on the provided minimum and maximum values and step.
|
|
4
4
|
* If the step is less than 10, only markers divisible by 5 and 10 are included.
|