@eightshift/ui-components 7.2.1 → 7.3.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/Autocomplete-pLMPWMFq.js +451 -0
- package/dist/Button-Biwg7zwt.js +223 -0
- package/dist/Dialog-C1sh8jbh.js +2474 -0
- package/dist/{Disclosure-NYWFw9RJ.js → Disclosure-B_SHgiUz.js} +50 -51
- package/dist/FocusScope-lGkM8AO8.js +734 -0
- package/dist/Form-BxIJCHYd.js +5 -0
- package/dist/Heading-B2EsUuu6.js +16 -0
- package/dist/{Hidden-8TB37dpK.js → Hidden-DYY00jLm.js} +10 -10
- package/dist/I18nProvider-Cm6dj5jY.js +93 -0
- package/dist/Label-B1TkoVOG.js +17 -0
- package/dist/ListBox-BquE0m8z.js +584 -0
- package/dist/{NumberFormatter-m5VW6MTK.js → NumberFormatter-JHF0Tadk.js} +24 -26
- package/dist/PortalProvider-BYcv24il.js +13 -0
- package/dist/RadioGroup-BxjLooWU.js +324 -0
- package/dist/SearchField-BkAU0HLm.js +322 -0
- package/dist/SelectionIndicator-Bx_EYBXD.js +13 -0
- package/dist/{Slider-DW1RuMVp.js → Slider-DSv6fyZ6.js} +321 -363
- package/dist/Text-C8pfwn0W.js +16 -0
- package/dist/{VisuallyHidden-CfsnJHZb.js → VisuallyHidden-KcXlGa5p.js} +12 -12
- package/dist/{animation-Bd2peown.js → animation-BJ-2VKdB.js} +12 -12
- package/dist/assets/style-admin.css +1 -1
- package/dist/assets/style-editor.css +1 -1
- package/dist/assets/style.css +1 -1
- package/dist/{button-D9cbyHeZ.js → button-CawAzlko.js} +21 -73
- package/dist/{checkbox-BO5RZmO8.js → checkbox-t7VrqXv2.js} +59 -62
- package/dist/{color-swatch-D2ZBkuTt.js → color-swatch-gU09x9Ga.js} +417 -414
- package/dist/components/base-control/base-control.js +2 -2
- package/dist/components/base-control/container.js +1 -1
- package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/color-pickers/color-picker.js +2 -2
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.js +1 -1
- package/dist/components/color-pickers/solid-color-picker.js +1 -1
- package/dist/components/component-toggle/component-toggle.js +4 -4
- package/dist/components/container-panel/container-panel.js +5 -5
- package/dist/components/draggable/draggable-handle.js +1 -1
- package/dist/components/draggable/draggable.js +1 -1
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/draggable-list/draggable-list.js +2 -2
- package/dist/components/expandable/expandable.js +7 -7
- package/dist/components/index.js +15 -15
- package/dist/components/input-field/input-field.js +1 -1
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +1 -1
- package/dist/components/matrix-align/matrix-align.js +5 -5
- package/dist/components/menu/menu.js +11 -11
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/number-picker/number-picker.js +1 -1
- package/dist/components/option-select/option-select.js +3 -3
- package/dist/components/options-panel/options-panel.js +3 -3
- package/dist/components/placeholders/file-picker-shell.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/popover/popover.js +6 -6
- package/dist/components/portal-provider/portal-provider.js +2 -2
- package/dist/components/radio/radio.js +9 -9
- package/dist/components/repeater/repeater-item.js +2 -2
- package/dist/components/repeater/repeater.js +3 -3
- package/dist/components/responsive/mini-responsive.js +6 -6
- package/dist/components/responsive/responsive-legacy.js +5 -5
- package/dist/components/responsive/responsive.js +5 -5
- package/dist/components/responsive-preview/responsive-preview.js +2 -2
- package/dist/components/select/async-multi-select.js +27 -26
- package/dist/components/select/async-select.js +27 -26
- package/dist/components/select/multi-select.js +33 -32
- package/dist/components/select/shared.js +1 -1
- package/dist/components/select/single-select.js +33 -32
- package/dist/components/select/styles.js +1 -1
- package/dist/components/slider/column-config-slider.js +8 -8
- package/dist/components/slider/slider.js +8 -8
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/smart-image/smart-image.js +1 -1
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle/toggle.js +3 -3
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{draggable-CTDVJ4zd.js → draggable-Cxv-OueQ.js} +1 -1
- package/dist/filterDOMProps-BfW758QC.js +69 -0
- package/dist/{gradient-editor-CD5Sho6A.js → gradient-editor-CInqVF8v.js} +6 -6
- package/dist/icons/index.js +1 -1
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/index.js +15 -15
- package/dist/{input-field-_OCWbftf.js → input-field-BdFrxQ-R.js} +46 -47
- package/dist/keyboard-CT41mQzR.js +55 -0
- package/dist/{link-input-BnjtzMbF.js → link-input-BDFhSSvH.js} +324 -356
- package/dist/{modal-snrElwty.js → modal-CJDaBdPh.js} +100 -92
- package/dist/{number-ZZIxJukn.js → number-MWRvGfyE.js} +10 -10
- package/dist/{number-picker-Dhtx4409.js → number-picker-BrxrB-xq.js} +43 -42
- package/dist/{shared-BpAYSi3F.js → shared-CI4kcnm8.js} +482 -502
- package/dist/{smart-image-CBNbxJ57.js → smart-image-eGdMu9s9.js} +2 -2
- package/dist/{solid-color-picker-DukArNH-.js → solid-color-picker-DXgX-OAm.js} +926 -935
- package/dist/{switch-DmsvyQPa.js → switch-DNHFoCCx.js} +28 -28
- package/dist/{tabs-Cy6gB0RL.js → tabs-C2tPOEYr.js} +145 -149
- package/dist/textSelection-BhX_2zV9.js +45 -0
- package/dist/{toggle-button-BlzUGfGy.js → toggle-button-DYDp11rq.js} +35 -35
- package/dist/{tooltip-BzJzYlcc.js → tooltip-C-hT6tN9.js} +162 -162
- package/dist/{useAsyncList-BNzwKoX4.js → useAsyncList-DsOh1xIx.js} +54 -74
- package/dist/{useButton-ra1ZSZ4z.js → useButton-BMZc4fTX.js} +11 -11
- package/dist/{SelectionManager-B8lLv6Ue.js → useCollection-CBVYSuGz.js} +1689 -1777
- package/dist/{useEvent-DkZVfgsS.js → useEvent-ypAU33vv.js} +5 -5
- package/dist/useField-BXf__jxy.js +32 -0
- package/dist/{useFilter-OiMnf6sb.js → useFilter-CfKEbIwL.js} +5 -5
- package/dist/{useFocusRing-DuYL4cdO.js → useFocusRing-BgYY-7ko.js} +23 -23
- package/dist/useFormReset-BuMc_O4y.js +17 -0
- package/dist/{FieldError-BWDbP5Db.js → useFormValidation-BcME9D0E.js} +63 -66
- package/dist/useHover-lyApu3ba.js +975 -0
- package/dist/{useLabel-2EohW5l6.js → useLabel-Rv8cIIKk.js} +8 -8
- package/dist/{useLabels-B2p7RXi5.js → useLabels-xOYtkA8o.js} +5 -5
- package/dist/useListState-u6DfeXHi.js +135 -0
- package/dist/{useLocalizedStringFormatter-Dv2diN3k.js → useLocalizedStringFormatter-CR-bmorj.js} +45 -45
- package/dist/{useNumberField-2xbi3jRV.js → useNumberFieldState-xL-ecwNz.js} +665 -619
- package/dist/useNumberFormatter-CR1PAFPG.js +10 -0
- package/dist/useOverlayTriggerState-AeCx45Gv.js +551 -0
- package/dist/usePress-Dnx5rBoD.js +593 -0
- package/dist/useTextField-BW3ZwGyz.js +159 -0
- package/dist/{useToggle-ecIirvIM.js → useToggle-BF5wptMP.js} +19 -20
- package/dist/useToggleState-D5P01lch.js +22 -0
- package/dist/useToolbar-BT25-MJg.js +55 -0
- package/dist/utilities/debounce-throttle.js +1 -1
- package/dist/utilities/es-dash.js +1 -1
- package/dist/utilities/index.js +3 -3
- package/dist/{utils-B_uiqNa4.js → utils-JFcCNFzy.js} +121 -122
- package/package.json +13 -13
- package/dist/Button-h6xF_WrP.js +0 -225
- package/dist/Dialog-i5VLQw1o.js +0 -2488
- package/dist/FocusScope-CgwbGOBB.js +0 -746
- package/dist/Form-DTMkbrQY.js +0 -5
- package/dist/Heading-Hol-wS_B.js +0 -16
- package/dist/Input-BURqyJXW.js +0 -161
- package/dist/Label-DFXXxMKY.js +0 -17
- package/dist/ListBox-BHUJxpwh.js +0 -600
- package/dist/OverlayArrow-BoloUPQM.js +0 -573
- package/dist/PortalProvider-DinZZCKX.js +0 -14
- package/dist/RSPContexts-C_z0bI8W.js +0 -12
- package/dist/RadioGroup-BwlGtCja.js +0 -329
- package/dist/SearchField-Cm1i5mLj.js +0 -764
- package/dist/SelectionIndicator-31L6EI9F.js +0 -13
- package/dist/Text-O6VBBDlP.js +0 -16
- package/dist/context-C-XNeJ_l.js +0 -93
- package/dist/filterDOMProps-_2_3GD-K.js +0 -69
- package/dist/textSelection-Dv6WPj0Z.js +0 -45
- package/dist/useField-D0WrzR2F.js +0 -32
- package/dist/useFormReset-DdkykzAn.js +0 -18
- package/dist/useHover-qaMm3XFO.js +0 -982
- package/dist/useListState-CD_5vfyy.js +0 -147
- package/dist/useNumberFormatter-C2Cm2mNj.js +0 -10
- package/dist/usePress-ZP1TjkFf.js +0 -678
- package/dist/useToggleState-IIDbiKPl.js +0 -23
- /package/dist/{List-DWlgW2Ex.js → List---tsVJlI.js} +0 -0
- /package/dist/{build-module-Bsx62nlm.js → build-module-K6vi4xE0.js} +0 -0
- /package/dist/{debounce-throttle-DXxSAKpq.js → debounce-throttle-LSPAPFtq.js} +0 -0
- /package/dist/{dist-2gkv7_1U.js → dist-jw8wvxoG.js} +0 -0
- /package/dist/{es-dash-HqXWZZ3_.js → es-dash-BuShf_ht.js} +0 -0
- /package/dist/{jsx-svg-DgKbriN1.js → jsx-svg-DT1SBWuP.js} +0 -0
- /package/dist/{utilities-lwX686oD.js → utilities-DV0KKJNR.js} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as clsx } from "../../clsx-BUU5J41u.js";
|
|
2
|
-
import { t as
|
|
3
|
-
import { n as ButtonGroup, t as Button } from "../../button-
|
|
4
|
-
import { t as
|
|
2
|
+
import { t as $efe09c6d1c304b50$export$5f1af8db9871e1d6 } from "../../Text-C8pfwn0W.js";
|
|
3
|
+
import { n as ButtonGroup, t as Button } from "../../button-CawAzlko.js";
|
|
4
|
+
import { t as DecorativeTooltip } from "../../tooltip-C-hT6tN9.js";
|
|
5
5
|
import { BaseControl } from "../base-control/base-control.js";
|
|
6
|
-
import { f as upperFirst } from "../../es-dash-
|
|
6
|
+
import { f as upperFirst } from "../../es-dash-BuShf_ht.js";
|
|
7
7
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
8
|
-
import { r as sprintf, t as __ } from "../../build-module-
|
|
8
|
+
import { r as sprintf, t as __ } from "../../build-module-K6vi4xE0.js";
|
|
9
9
|
import { Icon } from "../../icons/icon.js";
|
|
10
10
|
import { clearAlt } from "../../icons/ui-icons/clear-alt.js";
|
|
11
11
|
import { dropdownCaretAlt } from "../../icons/ui-icons/dropdown-caret-alt.js";
|
|
@@ -171,7 +171,7 @@ var MiniResponsive = (props) => {
|
|
|
171
171
|
className: "es:min-w-80 es:p-0!",
|
|
172
172
|
wrapperClassName: "es:rounded-3xl",
|
|
173
173
|
children: [
|
|
174
|
-
jsx($
|
|
174
|
+
jsx($efe09c6d1c304b50$export$5f1af8db9871e1d6, {
|
|
175
175
|
className: "es:px-4 es:pt-3 es:pb-0.5 es:text-center es:block es:text-base es:text-surface-600 es:font-variation-[\"wdth\"_105,\"wght\"_425,\"ROND\"_100]",
|
|
176
176
|
children: __("Responsive overrides", "eightshift-ui-components")
|
|
177
177
|
}),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as clsx } from "../../clsx-BUU5J41u.js";
|
|
2
2
|
import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
3
|
+
import { t as ToggleButton } from "../../toggle-button-DYDp11rq.js";
|
|
4
|
+
import { t as Button } from "../../button-CawAzlko.js";
|
|
5
|
+
import { t as DecorativeTooltip } from "../../tooltip-C-hT6tN9.js";
|
|
6
6
|
import { BaseControl } from "../base-control/base-control.js";
|
|
7
|
-
import { f as upperFirst } from "../../es-dash-
|
|
7
|
+
import { f as upperFirst } from "../../es-dash-BuShf_ht.js";
|
|
8
8
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
9
|
-
import { r as sprintf, t as __ } from "../../build-module-
|
|
9
|
+
import { r as sprintf, t as __ } from "../../build-module-K6vi4xE0.js";
|
|
10
10
|
import { Icon } from "../../icons/icon.js";
|
|
11
11
|
import { clearAlt } from "../../icons/ui-icons/clear-alt.js";
|
|
12
12
|
import { play } from "../../icons/ui-icons/play.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as clsx } from "../../clsx-BUU5J41u.js";
|
|
2
2
|
import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
3
|
+
import { t as ToggleButton } from "../../toggle-button-DYDp11rq.js";
|
|
4
|
+
import { n as ButtonGroup, t as Button } from "../../button-CawAzlko.js";
|
|
5
|
+
import { t as DecorativeTooltip } from "../../tooltip-C-hT6tN9.js";
|
|
6
6
|
import { BaseControl } from "../base-control/base-control.js";
|
|
7
|
-
import { f as upperFirst } from "../../es-dash-
|
|
7
|
+
import { f as upperFirst } from "../../es-dash-BuShf_ht.js";
|
|
8
8
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
9
|
-
import { r as sprintf, t as __ } from "../../build-module-
|
|
9
|
+
import { r as sprintf, t as __ } from "../../build-module-K6vi4xE0.js";
|
|
10
10
|
import { Icon } from "../../icons/icon.js";
|
|
11
11
|
import { clearAlt } from "../../icons/ui-icons/clear-alt.js";
|
|
12
12
|
import { dropdownCaretAlt } from "../../icons/ui-icons/dropdown-caret-alt.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
2
|
-
import { f as upperFirst } from "../../es-dash-
|
|
2
|
+
import { f as upperFirst } from "../../es-dash-BuShf_ht.js";
|
|
3
3
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
4
|
-
import { t as __ } from "../../build-module-
|
|
4
|
+
import { t as __ } from "../../build-module-K6vi4xE0.js";
|
|
5
5
|
import { previewResponsive } from "../../icons/ui-icons/preview-responsive.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region lib/components/responsive-preview/responsive-preview.jsx
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { t as clsx } from "../../clsx-BUU5J41u.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as $
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { n as $
|
|
9
|
-
import {
|
|
10
|
-
import { t as $
|
|
2
|
+
import { t as $4b38b5b75ecc6208$export$2f2b9559550c7bbc } from "../../Autocomplete-pLMPWMFq.js";
|
|
3
|
+
import { v as $42ceafc619f9c3ba$export$fb8073518f34e6ec } from "../../useCollection-CBVYSuGz.js";
|
|
4
|
+
import { n as $43a3b93638fe5db9$export$b04be29aa201d4f5 } from "../../Label-B1TkoVOG.js";
|
|
5
|
+
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "../../Button-Biwg7zwt.js";
|
|
6
|
+
import { u as $542a13ca2fa5b484$export$5b6b19405a83ff9d, w as $53e61d82d8b8611d$export$8b251419efc915eb } from "../../Dialog-C1sh8jbh.js";
|
|
7
|
+
import { r as $41fb335299a4a39e$export$f5b8910cec6cf069 } from "../../useTextField-BW3ZwGyz.js";
|
|
8
|
+
import { n as SelectClearButton, o as $c8bb816105474884$export$e288731fd71264f0, r as getGroupedOptions, s as $c8bb816105474884$export$ef9b1a59e592288f, t as OptionItemBase } from "../../shared-CI4kcnm8.js";
|
|
9
|
+
import { a as $928221da08ecbc62$export$dca12b0bb56e4fc, t as $928221da08ecbc62$export$41f133550aa26f48 } from "../../ListBox-BquE0m8z.js";
|
|
10
|
+
import { t as $29a5029ff43c9612$export$b94867ecbd698f21 } from "../../SearchField-BkAU0HLm.js";
|
|
11
|
+
import { t as $c73d3f3d5ec90946$export$bc3384a35de93d66 } from "../../useAsyncList-DsOh1xIx.js";
|
|
11
12
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
12
13
|
import { BaseControl } from "../base-control/base-control.js";
|
|
13
14
|
import { unescapeHTML } from "../../utilities/text-helpers.js";
|
|
14
|
-
import { n as _n, r as sprintf, t as __ } from "../../build-module-
|
|
15
|
+
import { n as _n, r as sprintf, t as __ } from "../../build-module-K6vi4xE0.js";
|
|
15
16
|
import { Icon } from "../../icons/icon.js";
|
|
16
17
|
import { Spinner } from "../../icons/spinner.js";
|
|
17
18
|
import { clearAlt } from "../../icons/ui-icons/clear-alt.js";
|
|
@@ -84,7 +85,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
84
85
|
*/
|
|
85
86
|
var AsyncMultiSelect = (props) => {
|
|
86
87
|
const { label, help, icon, subtitle, actions, inline, value, onChange, clearable, disabled, placeholder = __("Select...", "eightshift-ui-components"), fetchUrl, fetchConfig = {}, fetchFunction, getLabel = (item) => item?.label, getValue = (item) => item?.value, getMeta, getIcon, getSubtitle, getGroup, getData = (data) => data, customMenuOption, customValueDisplay, customDropdownArrow, className, groupKey, groupValueMapping, flat, size = "default", noMinWidth = false, noReorder, hidden, processLoadedOptions, ...rest } = props;
|
|
87
|
-
const list = $
|
|
88
|
+
const list = $c73d3f3d5ec90946$export$bc3384a35de93d66({
|
|
88
89
|
initialSelectedKeys: Array.isArray(value) ? value.map((item) => item?.value) : [],
|
|
89
90
|
getKey: (item) => item.value,
|
|
90
91
|
async load({ signal, filterText }) {
|
|
@@ -169,7 +170,7 @@ var AsyncMultiSelect = (props) => {
|
|
|
169
170
|
const ref = useRef(null);
|
|
170
171
|
const currentValueKeys = value?.map((item) => item?.value ?? item);
|
|
171
172
|
if (hidden) return null;
|
|
172
|
-
return jsx($
|
|
173
|
+
return jsx($c8bb816105474884$export$ef9b1a59e592288f, {
|
|
173
174
|
selectionMode: "multiple",
|
|
174
175
|
isDisabled: disabled,
|
|
175
176
|
value: currentValueKeys ?? [],
|
|
@@ -189,7 +190,7 @@ var AsyncMultiSelect = (props) => {
|
|
|
189
190
|
actions,
|
|
190
191
|
help,
|
|
191
192
|
inline,
|
|
192
|
-
labelAs: $
|
|
193
|
+
labelAs: $43a3b93638fe5db9$export$b04be29aa201d4f5,
|
|
193
194
|
children: [jsxs("div", {
|
|
194
195
|
className: clsx(selectControlClass({
|
|
195
196
|
disabled,
|
|
@@ -201,9 +202,9 @@ var AsyncMultiSelect = (props) => {
|
|
|
201
202
|
}), className),
|
|
202
203
|
ref,
|
|
203
204
|
children: [
|
|
204
|
-
jsxs($
|
|
205
|
+
jsxs($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
205
206
|
className: selectButtonClass({ size }),
|
|
206
|
-
children: [jsx($
|
|
207
|
+
children: [jsx($c8bb816105474884$export$e288731fd71264f0, {
|
|
207
208
|
className: "es:select-none es:pointer-events-none",
|
|
208
209
|
children: () => {
|
|
209
210
|
if (!currentValueKeys?.length) return jsx("span", {
|
|
@@ -287,23 +288,23 @@ var AsyncMultiSelect = (props) => {
|
|
|
287
288
|
})]
|
|
288
289
|
})
|
|
289
290
|
]
|
|
290
|
-
}), jsx($
|
|
291
|
+
}), jsx($542a13ca2fa5b484$export$5b6b19405a83ff9d, {
|
|
291
292
|
className: ({ isEntering, isExiting }) => clsx("es:font-sans", "es:w-(--select-width) es:min-w-72", "es:outline-hidden", "es:rounded-b-xl es:rounded-t-3xl", "es:overflow-clip es:grid es:grid-cols-1", "es:grid-rows-[auto_minmax(0,1fr)]", "es:has-last-selected:rounded-b-20!", "es:inset-ring es:inset-ring-surface-500/10", "es:inset-shadow-sm es:inset-shadow-white/30", !list?.items?.length ? "es:bg-surface-50/50" : "es:bg-surface-300/50", !list?.items?.length ? "es:backdrop-blur-sm" : "es:backdrop-blur-md", !list?.items?.length ? "es:backdrop-brightness-105" : "es:backdrop-brightness-110", "es:backdrop-saturate-125", "es:shadow-lg es:shadow-black/10", "es:transition-plus", "es:motion-duration-300 es:motion-ease-spring-bouncy", "es:placement-bottom:origin-top-left es:placement-top:origin-bottom-left", isEntering && "es:motion-scale-x-in-95 es:motion-scale-y-in-85 es:motion-opacity-in-0", isEntering && "es:placement-top:motion-translate-y-in-[0.5rem] es:placement-bottom:motion-translate-y-in-[-0.5rem]", isExiting && "es:motion-scale-x-out-95 es:motion-scale-y-out-85 es:motion-opacity-out-0", isExiting && "es:placement-top:motion-translate-y-out-[0.5rem] es:placement-bottom:motion-translate-y-out-[-0.5rem]"),
|
|
292
293
|
placement: "bottom left",
|
|
293
294
|
maxHeight: 260,
|
|
294
295
|
triggerRef: ref,
|
|
295
296
|
style: { "--select-width": ref.current ? `${ref.current.offsetWidth}px` : "var(--trigger-width)" },
|
|
296
|
-
children: jsxs($
|
|
297
|
+
children: jsxs($4b38b5b75ecc6208$export$2f2b9559550c7bbc, {
|
|
297
298
|
inputValue: list.filterText,
|
|
298
299
|
onInputChange: list.setFilterText,
|
|
299
300
|
children: [
|
|
300
|
-
jsxs($
|
|
301
|
+
jsxs($29a5029ff43c9612$export$b94867ecbd698f21, {
|
|
301
302
|
"aria-label": __("Search", "eightshift-ui-components"),
|
|
302
303
|
className: "es:flex es:items-center es:relative",
|
|
303
|
-
children: [jsx($
|
|
304
|
+
children: [jsx($41fb335299a4a39e$export$f5b8910cec6cf069, {
|
|
304
305
|
placeholder: __("Search...", "eightshift-ui-components"),
|
|
305
306
|
className: clsx("es:peer es:size-full es:h-9.5 es:outline-hidden! es:pl-3.5 es:pr-9 es:shadow-none! es:text-13! es:placeholder:text-surface-500 es:[&::-webkit-search-cancel-button]:hidden", "es:bg-accent-900/8 es:m-1.5 es:rounded-3xl! es:border-none!", "es:inset-ring! es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20", "es:text-accent-950 es:placeholder:text-accent-700/50", "es:transition")
|
|
306
|
-
}), jsx($
|
|
307
|
+
}), jsx($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
307
308
|
slot: "clear",
|
|
308
309
|
"aria-label": __("Clear", "eightshift-ui-components"),
|
|
309
310
|
className: clsx("es:absolute es:right-3 es:top-0 es:bottom-0 es:my-auto es:border-none es:bg-transparent", "es:flex es:size-7 es:items-center es:justify-center es:rounded-3xl es:text-sm es:text-surface-700 es:transition es:hover:bg-accent-50 es:hover:text-accent-800 es:any-focus:outline-hidden es:focus:ring-2 es:focus:ring-accent-500/50 es:disabled:text-secondary-300", "es:peer-placeholder-shown:opacity-0"),
|
|
@@ -314,7 +315,7 @@ var AsyncMultiSelect = (props) => {
|
|
|
314
315
|
className: "es:p-3 es:min-h-16 es:flex es:items-center es:justify-center",
|
|
315
316
|
children: jsx(Spinner, {})
|
|
316
317
|
}),
|
|
317
|
-
jsxs($
|
|
318
|
+
jsxs($928221da08ecbc62$export$41f133550aa26f48, {
|
|
318
319
|
className: clsx("es:space-y-0.75 es:p-1.5 es:pt-0 es:any-focus:outline-hidden es:h-full es:overflow-y-auto es:rounded-t-xl", list?.isLoading && "es:hidden"),
|
|
319
320
|
selectedKeys: list.selectedKeys,
|
|
320
321
|
selectionMode: "multiple",
|
|
@@ -330,12 +331,12 @@ var AsyncMultiSelect = (props) => {
|
|
|
330
331
|
iconClassName: "es:text-accent-700 es:icon:size-7!",
|
|
331
332
|
noColor: true
|
|
332
333
|
}),
|
|
333
|
-
children: [groupedItems && jsx($
|
|
334
|
+
children: [groupedItems && jsx($42ceafc619f9c3ba$export$fb8073518f34e6ec, {
|
|
334
335
|
items: groupedItems,
|
|
335
|
-
children: (section) => jsxs($
|
|
336
|
+
children: (section) => jsxs($928221da08ecbc62$export$dca12b0bb56e4fc, {
|
|
336
337
|
id: section.key,
|
|
337
338
|
className: "es:flex es:flex-col es:gap-0.75",
|
|
338
|
-
children: [jsx($
|
|
339
|
+
children: [jsx($53e61d82d8b8611d$export$8b251419efc915eb, {
|
|
339
340
|
className: "es:px-2.5 es:pb-1 es:pt-3 es:select-none",
|
|
340
341
|
children: jsx(RichLabel, {
|
|
341
342
|
icon: section?.icon,
|
|
@@ -344,12 +345,12 @@ var AsyncMultiSelect = (props) => {
|
|
|
344
345
|
endIcon: section?.endIcon,
|
|
345
346
|
fullWidth: true
|
|
346
347
|
})
|
|
347
|
-
}), jsx($
|
|
348
|
+
}), jsx($42ceafc619f9c3ba$export$fb8073518f34e6ec, {
|
|
348
349
|
items: section.options,
|
|
349
350
|
children: (item) => renderItem(item)
|
|
350
351
|
})]
|
|
351
352
|
})
|
|
352
|
-
}), !groupedItems && jsx($
|
|
353
|
+
}), !groupedItems && jsx($42ceafc619f9c3ba$export$fb8073518f34e6ec, {
|
|
353
354
|
items: list.items ?? [],
|
|
354
355
|
children: (item) => renderItem(item)
|
|
355
356
|
})]
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { t as clsx } from "../../clsx-BUU5J41u.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as $
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { n as $
|
|
9
|
-
import {
|
|
10
|
-
import { t as $
|
|
2
|
+
import { t as $4b38b5b75ecc6208$export$2f2b9559550c7bbc } from "../../Autocomplete-pLMPWMFq.js";
|
|
3
|
+
import { v as $42ceafc619f9c3ba$export$fb8073518f34e6ec } from "../../useCollection-CBVYSuGz.js";
|
|
4
|
+
import { n as $43a3b93638fe5db9$export$b04be29aa201d4f5 } from "../../Label-B1TkoVOG.js";
|
|
5
|
+
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "../../Button-Biwg7zwt.js";
|
|
6
|
+
import { u as $542a13ca2fa5b484$export$5b6b19405a83ff9d, w as $53e61d82d8b8611d$export$8b251419efc915eb } from "../../Dialog-C1sh8jbh.js";
|
|
7
|
+
import { r as $41fb335299a4a39e$export$f5b8910cec6cf069 } from "../../useTextField-BW3ZwGyz.js";
|
|
8
|
+
import { n as SelectClearButton, o as $c8bb816105474884$export$e288731fd71264f0, r as getGroupedOptions, s as $c8bb816105474884$export$ef9b1a59e592288f, t as OptionItemBase } from "../../shared-CI4kcnm8.js";
|
|
9
|
+
import { a as $928221da08ecbc62$export$dca12b0bb56e4fc, t as $928221da08ecbc62$export$41f133550aa26f48 } from "../../ListBox-BquE0m8z.js";
|
|
10
|
+
import { t as $29a5029ff43c9612$export$b94867ecbd698f21 } from "../../SearchField-BkAU0HLm.js";
|
|
11
|
+
import { t as $c73d3f3d5ec90946$export$bc3384a35de93d66 } from "../../useAsyncList-DsOh1xIx.js";
|
|
11
12
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
12
13
|
import { BaseControl } from "../base-control/base-control.js";
|
|
13
14
|
import { unescapeHTML } from "../../utilities/text-helpers.js";
|
|
14
|
-
import { t as __ } from "../../build-module-
|
|
15
|
+
import { t as __ } from "../../build-module-K6vi4xE0.js";
|
|
15
16
|
import { Icon } from "../../icons/icon.js";
|
|
16
17
|
import { Spinner } from "../../icons/spinner.js";
|
|
17
18
|
import { clearAlt } from "../../icons/ui-icons/clear-alt.js";
|
|
@@ -79,7 +80,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
79
80
|
var AsyncSelect = (props) => {
|
|
80
81
|
const { label, help, icon, subtitle, actions, inline, value: rawValue, onChange, disabled = false, clearable = false, className, placeholder = __("Select...", "eightshift-ui-components"), customMenuOption, customValueDisplay, customDropdownArrow, processLoadedOptions = (options) => options, fetchUrl, fetchConfig = {}, fetchFunction, getLabel = (item) => item?.label, getValue = (item) => item?.value, getMeta, getIcon, getSubtitle, getGroup, getData = (data) => data, extraItemProps, hidden, groupKey, groupValueMapping, flat, size = "default", noMinWidth = false, ...rest } = props;
|
|
81
82
|
const value = rawValue && !Array.isArray(rawValue) && typeof rawValue === "object" ? rawValue : null;
|
|
82
|
-
const list = $
|
|
83
|
+
const list = $c73d3f3d5ec90946$export$bc3384a35de93d66({
|
|
83
84
|
initialSelectedKeys: value && value?.value ? [value.value] : [],
|
|
84
85
|
getKey: (item) => item?.value,
|
|
85
86
|
async load({ signal, filterText }) {
|
|
@@ -151,7 +152,7 @@ var AsyncSelect = (props) => {
|
|
|
151
152
|
if (item && "id" in item) delete item.id;
|
|
152
153
|
onChange(item);
|
|
153
154
|
};
|
|
154
|
-
return jsx($
|
|
155
|
+
return jsx($c8bb816105474884$export$ef9b1a59e592288f, {
|
|
155
156
|
isDisabled: disabled,
|
|
156
157
|
value: value?.value ?? null,
|
|
157
158
|
onOpenChange: (isOpen) => {
|
|
@@ -170,7 +171,7 @@ var AsyncSelect = (props) => {
|
|
|
170
171
|
actions,
|
|
171
172
|
help,
|
|
172
173
|
inline,
|
|
173
|
-
labelAs: $
|
|
174
|
+
labelAs: $43a3b93638fe5db9$export$b04be29aa201d4f5,
|
|
174
175
|
children: [jsxs("div", {
|
|
175
176
|
className: clsx(selectControlClass({
|
|
176
177
|
disabled,
|
|
@@ -181,9 +182,9 @@ var AsyncSelect = (props) => {
|
|
|
181
182
|
inline
|
|
182
183
|
}), className),
|
|
183
184
|
ref,
|
|
184
|
-
children: [jsxs($
|
|
185
|
+
children: [jsxs($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
185
186
|
className: selectButtonClass({ size }),
|
|
186
|
-
children: [jsx($
|
|
187
|
+
children: [jsx($c8bb816105474884$export$e288731fd71264f0, { children: ({ isPlaceholder, selectedItems }) => {
|
|
187
188
|
const [selectedItem] = selectedItems;
|
|
188
189
|
if (!isPlaceholder && selectedItem && customValueDisplay) return customValueDisplay(selectedItem);
|
|
189
190
|
if (!selectedItem) return jsx("span", {
|
|
@@ -210,23 +211,23 @@ var AsyncSelect = (props) => {
|
|
|
210
211
|
})]
|
|
211
212
|
})]
|
|
212
213
|
}), clearable && jsx(SelectClearButton, {})]
|
|
213
|
-
}), jsx($
|
|
214
|
+
}), jsx($542a13ca2fa5b484$export$5b6b19405a83ff9d, {
|
|
214
215
|
className: ({ isEntering, isExiting }) => clsx("es:font-sans", "es:w-(--select-width) es:min-w-72", "es:outline-hidden", "es:rounded-t-3xl", "es:overflow-clip es:grid es:grid-cols-1", "es:grid-rows-[auto_minmax(0,1fr)]", "es:has-last-selected:rounded-b-20!", "es:inset-ring es:inset-ring-surface-500/10", "es:inset-shadow-sm es:inset-shadow-white/30", !list?.items?.length ? "es:bg-surface-50/50" : "es:bg-surface-300/50", !list?.items?.length ? "es:backdrop-blur-sm" : "es:backdrop-blur-md", !list?.items?.length ? "es:backdrop-brightness-105" : "es:backdrop-brightness-110", list.isLoading || !list?.items?.length ? "es:rounded-b-3xl" : "es:rounded-b-xl", "es:backdrop-saturate-125", "es:shadow-lg es:shadow-black/10", "es:transition-plus", "es:motion-duration-300 es:motion-ease-spring-bouncy", "es:placement-bottom:origin-top-left es:placement-top:origin-bottom-left", isEntering && "es:motion-scale-x-in-95 es:motion-scale-y-in-85 es:motion-opacity-in-0", isEntering && "es:placement-top:motion-translate-y-in-[0.5rem] es:placement-bottom:motion-translate-y-in-[-0.5rem]", isExiting && "es:motion-scale-x-out-95 es:motion-scale-y-out-85 es:motion-opacity-out-0", isExiting && "es:placement-top:motion-translate-y-out-[0.5rem] es:placement-bottom:motion-translate-y-out-[-0.5rem]"),
|
|
215
216
|
placement: "bottom left",
|
|
216
217
|
maxHeight: 260,
|
|
217
218
|
triggerRef: ref,
|
|
218
219
|
style: { "--select-width": ref.current ? `${ref.current.offsetWidth}px` : "var(--trigger-width)" },
|
|
219
|
-
children: jsxs($
|
|
220
|
+
children: jsxs($4b38b5b75ecc6208$export$2f2b9559550c7bbc, {
|
|
220
221
|
inputValue: list.filterText,
|
|
221
222
|
onInputChange: list.setFilterText,
|
|
222
223
|
children: [
|
|
223
|
-
jsxs($
|
|
224
|
+
jsxs($29a5029ff43c9612$export$b94867ecbd698f21, {
|
|
224
225
|
"aria-label": __("Search", "eightshift-ui-components"),
|
|
225
226
|
className: "es:flex es:items-center es:relative",
|
|
226
|
-
children: [jsx($
|
|
227
|
+
children: [jsx($41fb335299a4a39e$export$f5b8910cec6cf069, {
|
|
227
228
|
placeholder: __("Search...", "eightshift-ui-components"),
|
|
228
229
|
className: clsx("es:peer es:size-full es:h-9.5 es:outline-hidden! es:pl-3.5 es:pr-9 es:shadow-none! es:text-13! es:placeholder:text-surface-500 es:[&::-webkit-search-cancel-button]:hidden", "es:bg-accent-900/8 es:m-1.5 es:rounded-3xl! es:border-none!", "es:inset-ring! es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20", "es:text-accent-950 es:placeholder:text-accent-700/50", "es:transition")
|
|
229
|
-
}), jsx($
|
|
230
|
+
}), jsx($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
230
231
|
slot: "clear",
|
|
231
232
|
"aria-label": __("Clear", "eightshift-ui-components"),
|
|
232
233
|
className: clsx("es:absolute es:right-3 es:top-0 es:bottom-0 es:my-auto es:border-none es:bg-transparent", "es:flex es:size-7 es:items-center es:justify-center es:rounded-3xl es:text-sm es:text-surface-700 es:transition es:hover:bg-accent-50 es:hover:text-accent-800 es:any-focus:outline-hidden es:focus:ring-2 es:focus:ring-accent-500/50 es:disabled:text-secondary-300", "es:peer-placeholder-shown:opacity-0"),
|
|
@@ -237,7 +238,7 @@ var AsyncSelect = (props) => {
|
|
|
237
238
|
className: "es:p-3 es:min-h-16 es:flex es:items-center es:justify-center",
|
|
238
239
|
children: jsx(Spinner, {})
|
|
239
240
|
}),
|
|
240
|
-
jsxs($
|
|
241
|
+
jsxs($928221da08ecbc62$export$41f133550aa26f48, {
|
|
241
242
|
className: clsx("es:space-y-0.75 es:p-1.5 es:pt-0 es:any-focus:outline-hidden es:h-full es:overflow-y-auto es:rounded-t-xl", list?.isLoading && "es:hidden"),
|
|
242
243
|
selectedKeys: list.selectedKeys,
|
|
243
244
|
onSelectionChange: (selected) => {
|
|
@@ -252,12 +253,12 @@ var AsyncSelect = (props) => {
|
|
|
252
253
|
iconClassName: "es:text-accent-700 es:icon:size-7!",
|
|
253
254
|
noColor: true
|
|
254
255
|
}),
|
|
255
|
-
children: [groupedItems && jsx($
|
|
256
|
+
children: [groupedItems && jsx($42ceafc619f9c3ba$export$fb8073518f34e6ec, {
|
|
256
257
|
items: groupedItems,
|
|
257
|
-
children: (section) => jsxs($
|
|
258
|
+
children: (section) => jsxs($928221da08ecbc62$export$dca12b0bb56e4fc, {
|
|
258
259
|
id: section.key,
|
|
259
260
|
className: "es:flex es:flex-col es:gap-0.75",
|
|
260
|
-
children: [jsx($
|
|
261
|
+
children: [jsx($53e61d82d8b8611d$export$8b251419efc915eb, {
|
|
261
262
|
className: "es:px-2.5 es:pb-1 es:pt-3 es:select-none",
|
|
262
263
|
children: jsx(RichLabel, {
|
|
263
264
|
icon: section?.icon,
|
|
@@ -266,12 +267,12 @@ var AsyncSelect = (props) => {
|
|
|
266
267
|
endIcon: section?.endIcon,
|
|
267
268
|
fullWidth: true
|
|
268
269
|
})
|
|
269
|
-
}), jsx($
|
|
270
|
+
}), jsx($42ceafc619f9c3ba$export$fb8073518f34e6ec, {
|
|
270
271
|
items: section.options,
|
|
271
272
|
children: (item) => renderItem(item)
|
|
272
273
|
})]
|
|
273
274
|
})
|
|
274
|
-
}), !groupedItems && jsx($
|
|
275
|
+
}), !groupedItems && jsx($42ceafc619f9c3ba$export$fb8073518f34e6ec, {
|
|
275
276
|
items: list.items,
|
|
276
277
|
children: (item) => renderItem(item)
|
|
277
278
|
})]
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { t as clsx } from "../../clsx-BUU5J41u.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as $
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { n as $
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { t as $4b38b5b75ecc6208$export$2f2b9559550c7bbc } from "../../Autocomplete-pLMPWMFq.js";
|
|
3
|
+
import { v as $42ceafc619f9c3ba$export$fb8073518f34e6ec } from "../../useCollection-CBVYSuGz.js";
|
|
4
|
+
import { n as $43a3b93638fe5db9$export$b04be29aa201d4f5 } from "../../Label-B1TkoVOG.js";
|
|
5
|
+
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "../../Button-Biwg7zwt.js";
|
|
6
|
+
import { u as $542a13ca2fa5b484$export$5b6b19405a83ff9d, w as $53e61d82d8b8611d$export$8b251419efc915eb } from "../../Dialog-C1sh8jbh.js";
|
|
7
|
+
import { r as $41fb335299a4a39e$export$f5b8910cec6cf069 } from "../../useTextField-BW3ZwGyz.js";
|
|
8
|
+
import { i as getValue, n as SelectClearButton, o as $c8bb816105474884$export$e288731fd71264f0, r as getGroupedOptions, s as $c8bb816105474884$export$ef9b1a59e592288f, t as OptionItemBase } from "../../shared-CI4kcnm8.js";
|
|
9
|
+
import { a as $928221da08ecbc62$export$dca12b0bb56e4fc, t as $928221da08ecbc62$export$41f133550aa26f48 } from "../../ListBox-BquE0m8z.js";
|
|
10
|
+
import { t as $ef182bb9912241d8$export$3274cf84b703fff } from "../../useFilter-CfKEbIwL.js";
|
|
11
|
+
import { t as $29a5029ff43c9612$export$b94867ecbd698f21 } from "../../SearchField-BkAU0HLm.js";
|
|
11
12
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
12
13
|
import { BaseControl } from "../base-control/base-control.js";
|
|
13
14
|
import { randomId } from "../../utilities/hash.js";
|
|
14
|
-
import { n as _n, r as sprintf, t as __ } from "../../build-module-
|
|
15
|
+
import { n as _n, r as sprintf, t as __ } from "../../build-module-K6vi4xE0.js";
|
|
15
16
|
import { Icon } from "../../icons/icon.js";
|
|
16
17
|
import { clearAlt } from "../../icons/ui-icons/clear-alt.js";
|
|
17
18
|
import { dropdownCaret } from "../../icons/ui-icons/dropdown-caret.js";
|
|
@@ -80,7 +81,7 @@ var MultiSelect = (props) => {
|
|
|
80
81
|
const { icon, help, label, inline, actions, subtitle, value, onChange, options, simpleValue = false, groupKey, groupValueMapping, disabled = false, clearable = false, placeholder = __("Select...", "eightshift-ui-components"), customMenuOption, customValueDisplay, customDropdownArrow, className, flat, size = "default", noMinWidth = false, noReorder, searchable, hidden, ...rest } = props;
|
|
81
82
|
const ref = useRef(null);
|
|
82
83
|
const [searchTerm, setSearchTerm] = useState("");
|
|
83
|
-
const { contains } = $
|
|
84
|
+
const { contains } = $ef182bb9912241d8$export$3274cf84b703fff({ sensitivity: "base" });
|
|
84
85
|
const filteredOptions = useMemo(() => {
|
|
85
86
|
if (!searchable || searchTerm.length === 0) return options;
|
|
86
87
|
return options?.filter((item) => {
|
|
@@ -135,7 +136,7 @@ var MultiSelect = (props) => {
|
|
|
135
136
|
onChange(selectedValues);
|
|
136
137
|
};
|
|
137
138
|
if (hidden) return null;
|
|
138
|
-
return jsx($
|
|
139
|
+
return jsx($c8bb816105474884$export$ef9b1a59e592288f, {
|
|
139
140
|
selectionMode: "multiple",
|
|
140
141
|
isDisabled: disabled,
|
|
141
142
|
value: currentValueKeys,
|
|
@@ -153,7 +154,7 @@ var MultiSelect = (props) => {
|
|
|
153
154
|
actions,
|
|
154
155
|
help,
|
|
155
156
|
inline,
|
|
156
|
-
labelAs: $
|
|
157
|
+
labelAs: $43a3b93638fe5db9$export$b04be29aa201d4f5,
|
|
157
158
|
children: [jsxs("div", {
|
|
158
159
|
className: clsx(selectControlClass({
|
|
159
160
|
disabled,
|
|
@@ -165,9 +166,9 @@ var MultiSelect = (props) => {
|
|
|
165
166
|
}), className),
|
|
166
167
|
ref,
|
|
167
168
|
children: [
|
|
168
|
-
jsxs($
|
|
169
|
+
jsxs($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
169
170
|
className: selectButtonClass({ size }),
|
|
170
|
-
children: [jsx($
|
|
171
|
+
children: [jsx($c8bb816105474884$export$e288731fd71264f0, {
|
|
171
172
|
className: "es:select-none es:pointer-events-none",
|
|
172
173
|
children: ({ isPlaceholder, selectedItems }) => {
|
|
173
174
|
const [selectedItem] = selectedItems;
|
|
@@ -245,30 +246,30 @@ var MultiSelect = (props) => {
|
|
|
245
246
|
})]
|
|
246
247
|
})
|
|
247
248
|
]
|
|
248
|
-
}), jsxs($
|
|
249
|
+
}), jsxs($542a13ca2fa5b484$export$5b6b19405a83ff9d, {
|
|
249
250
|
className: ({ isEntering, isExiting }) => clsx("es:font-sans", "es:w-(--select-width) es:min-w-72", "es:outline-hidden", searchable ? "es:rounded-b-xl es:rounded-t-3xl" : "es:rounded-2xl", "es:overflow-clip es:grid es:grid-cols-1", searchable ? "es:grid-rows-[auto_minmax(0,1fr)]" : "es:grid-rows-1", !searchable && "es:has-first-selected:rounded-t-20!", "es:has-last-selected:rounded-b-20!", "es:inset-ring es:inset-ring-surface-500/10", "es:inset-shadow-sm es:inset-shadow-white/30", searchable && !options?.length ? "es:bg-surface-50/50" : "es:bg-surface-300/50", searchable && !options?.length ? "es:backdrop-blur-sm" : "es:backdrop-blur-md", searchable && !options?.length ? "es:backdrop-brightness-105" : "es:backdrop-brightness-110", "es:backdrop-saturate-125", "es:shadow-lg es:shadow-black/10", "es:transition-plus", "es:motion-duration-300 es:motion-ease-spring-bouncy", "es:placement-bottom:origin-top-left es:placement-top:origin-bottom-left", isEntering && "es:motion-scale-x-in-95 es:motion-scale-y-in-85 es:motion-opacity-in-0", isEntering && "es:placement-top:motion-translate-y-in-[0.5rem] es:placement-bottom:motion-translate-y-in-[-0.5rem]", isExiting && "es:motion-scale-x-out-95 es:motion-scale-y-out-85 es:motion-opacity-out-0", isExiting && "es:placement-top:motion-translate-y-out-[0.5rem] es:placement-bottom:motion-translate-y-out-[-0.5rem]"),
|
|
250
251
|
placement: "bottom left",
|
|
251
252
|
maxHeight: 260,
|
|
252
253
|
triggerRef: ref,
|
|
253
254
|
style: { "--select-width": ref.current ? `${ref.current.offsetWidth}px` : "var(--trigger-width)" },
|
|
254
|
-
children: [searchable && jsxs($
|
|
255
|
+
children: [searchable && jsxs($4b38b5b75ecc6208$export$2f2b9559550c7bbc, {
|
|
255
256
|
filter: () => true,
|
|
256
257
|
inputValue: searchTerm,
|
|
257
258
|
onInputChange: setSearchTerm,
|
|
258
|
-
children: [jsxs($
|
|
259
|
+
children: [jsxs($29a5029ff43c9612$export$b94867ecbd698f21, {
|
|
259
260
|
"aria-label": __("Search", "eightshift-ui-components"),
|
|
260
261
|
className: "es:flex es:items-center es:relative",
|
|
261
262
|
autoFocus: true,
|
|
262
|
-
children: [jsx($
|
|
263
|
+
children: [jsx($41fb335299a4a39e$export$f5b8910cec6cf069, {
|
|
263
264
|
placeholder: __("Search...", "eightshift-ui-components"),
|
|
264
265
|
className: clsx("es:peer es:size-full es:h-9.5 es:outline-hidden! es:pl-3.5 es:pr-9 es:shadow-none! es:text-13! es:placeholder:text-surface-500 es:[&::-webkit-search-cancel-button]:hidden", "es:bg-accent-900/8 es:m-1.5 es:rounded-3xl! es:border-none!", "es:inset-ring! es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20", "es:text-accent-950 es:placeholder:text-accent-700/50", "es:transition")
|
|
265
|
-
}), jsx($
|
|
266
|
+
}), jsx($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
266
267
|
slot: "clear",
|
|
267
268
|
"aria-label": __("Clear", "eightshift-ui-components"),
|
|
268
269
|
className: clsx("es:absolute es:right-3 es:top-0 es:bottom-0 es:my-auto es:border-none es:bg-transparent", "es:flex es:size-7 es:items-center es:justify-center es:rounded-3xl es:text-sm es:text-surface-700 es:transition es:hover:bg-accent-50 es:hover:text-accent-800 es:any-focus:outline-hidden es:focus:ring-2 es:focus:ring-accent-500/50 es:disabled:text-secondary-300", "es:peer-placeholder-shown:opacity-0"),
|
|
269
270
|
children: clearAlt
|
|
270
271
|
})]
|
|
271
|
-
}), jsxs($
|
|
272
|
+
}), jsxs($928221da08ecbc62$export$41f133550aa26f48, {
|
|
272
273
|
className: "es:space-y-0.75 es:p-1.5 es:pt-0 es:any-focus:outline-hidden es:h-full es:overflow-y-auto es:rounded-t-xl",
|
|
273
274
|
renderEmptyState: () => jsx(RichLabel, {
|
|
274
275
|
icon: searchEmpty,
|
|
@@ -278,12 +279,12 @@ var MultiSelect = (props) => {
|
|
|
278
279
|
iconClassName: "es:text-accent-700 es:icon:size-7!",
|
|
279
280
|
noColor: true
|
|
280
281
|
}),
|
|
281
|
-
children: [groupedOptions && jsx($
|
|
282
|
+
children: [groupedOptions && jsx($42ceafc619f9c3ba$export$fb8073518f34e6ec, {
|
|
282
283
|
items: groupedOptions,
|
|
283
|
-
children: (item) => jsxs($
|
|
284
|
+
children: (item) => jsxs($928221da08ecbc62$export$dca12b0bb56e4fc, {
|
|
284
285
|
id: item.key,
|
|
285
286
|
className: "es:flex es:flex-col es:gap-0.75",
|
|
286
|
-
children: [jsx($
|
|
287
|
+
children: [jsx($53e61d82d8b8611d$export$8b251419efc915eb, {
|
|
287
288
|
className: "es:px-2.5 es:pb-1 es:pt-3 es:select-none",
|
|
288
289
|
children: jsx(RichLabel, {
|
|
289
290
|
icon: item?.icon,
|
|
@@ -292,17 +293,17 @@ var MultiSelect = (props) => {
|
|
|
292
293
|
endIcon: item?.endIcon,
|
|
293
294
|
fullWidth: true
|
|
294
295
|
})
|
|
295
|
-
}), jsx($
|
|
296
|
+
}), jsx($42ceafc619f9c3ba$export$fb8073518f34e6ec, {
|
|
296
297
|
items: item.options,
|
|
297
298
|
children: (subItem) => renderItem(subItem)
|
|
298
299
|
})]
|
|
299
300
|
})
|
|
300
|
-
}), !groupedOptions && jsx($
|
|
301
|
+
}), !groupedOptions && jsx($42ceafc619f9c3ba$export$fb8073518f34e6ec, {
|
|
301
302
|
items: searchable ? filteredOptions : options,
|
|
302
303
|
children: (item) => renderItem(item)
|
|
303
304
|
})]
|
|
304
305
|
})]
|
|
305
|
-
}), !searchable && jsxs($
|
|
306
|
+
}), !searchable && jsxs($928221da08ecbc62$export$41f133550aa26f48, {
|
|
306
307
|
className: "es:space-y-0.75 es:p-1.5 es:any-focus:outline-hidden es:h-full es:overflow-y-auto es:rounded-t-xl",
|
|
307
308
|
renderEmptyState: () => jsx(RichLabel, {
|
|
308
309
|
icon: searchEmpty,
|
|
@@ -312,12 +313,12 @@ var MultiSelect = (props) => {
|
|
|
312
313
|
iconClassName: "es:text-accent-700 es:icon:size-7!",
|
|
313
314
|
noColor: true
|
|
314
315
|
}),
|
|
315
|
-
children: [groupedOptions && jsx($
|
|
316
|
+
children: [groupedOptions && jsx($42ceafc619f9c3ba$export$fb8073518f34e6ec, {
|
|
316
317
|
items: groupedOptions,
|
|
317
|
-
children: (item) => jsxs($
|
|
318
|
+
children: (item) => jsxs($928221da08ecbc62$export$dca12b0bb56e4fc, {
|
|
318
319
|
id: item.key,
|
|
319
320
|
className: "es:flex es:flex-col es:gap-0.75",
|
|
320
|
-
children: [jsx($
|
|
321
|
+
children: [jsx($53e61d82d8b8611d$export$8b251419efc915eb, {
|
|
321
322
|
className: "es:px-2.5 es:pb-1 es:pt-3 es:select-none",
|
|
322
323
|
children: jsx(RichLabel, {
|
|
323
324
|
icon: item?.icon,
|
|
@@ -326,12 +327,12 @@ var MultiSelect = (props) => {
|
|
|
326
327
|
endIcon: item?.endIcon,
|
|
327
328
|
fullWidth: true
|
|
328
329
|
})
|
|
329
|
-
}), jsx($
|
|
330
|
+
}), jsx($42ceafc619f9c3ba$export$fb8073518f34e6ec, {
|
|
330
331
|
items: item.options,
|
|
331
332
|
children: (subItem) => renderItem(subItem)
|
|
332
333
|
})]
|
|
333
334
|
})
|
|
334
|
-
}), !groupedOptions && jsx($
|
|
335
|
+
}), !groupedOptions && jsx($42ceafc619f9c3ba$export$fb8073518f34e6ec, {
|
|
335
336
|
items: options,
|
|
336
337
|
children: (item) => renderItem(item)
|
|
337
338
|
})]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as moveArrayItem, i as getValue, n as SelectClearButton, r as getGroupedOptions, t as OptionItemBase } from "../../shared-
|
|
1
|
+
import { a as moveArrayItem, i as getValue, n as SelectClearButton, r as getGroupedOptions, t as OptionItemBase } from "../../shared-CI4kcnm8.js";
|
|
2
2
|
export { OptionItemBase, SelectClearButton, getGroupedOptions, getValue, moveArrayItem };
|