@eightshift/ui-components 5.6.1 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Button-CQ5ZZJ2w.js → Button-BXjXzdW_.js} +13 -13
- package/dist/{Dialog-BMgMUQuN.js → Dialog-D8bjn-nh.js} +404 -77
- package/dist/{FieldError-B8BgFmIQ.js → FieldError-DwBG6m1U.js} +2 -2
- package/dist/{FocusScope-B5vxRkHm.js → FocusScope-BMk5oZCk.js} +8 -8
- package/dist/{Heading-B5aEynOM.js → Heading-BmRX4BRL.js} +3 -3
- package/dist/{Hidden-rE6uR-lr.js → Hidden-Rfj-STx7.js} +4 -4
- package/dist/{Input-8yja_IHC.js → Input-CNNksOWg.js} +11 -11
- package/dist/{Label-DWVaNd2E.js → Label-D8a3eYb-.js} +4 -4
- package/dist/{List-BiAnh5G5.js → List-BGHOoFf0.js} +8 -8
- package/dist/{ListBox-DggfiuO_.js → ListBox-Dd37zMvs.js} +40 -41
- package/dist/{OverlayArrow-DraDOoRn.js → OverlayArrow-DokC40S3.js} +6 -6
- package/dist/{PortalProvider---wyKpMr.js → PortalProvider-CHPnqDSH.js} +2 -2
- package/dist/RadioGroup-BVFvITWO.js +371 -0
- package/dist/{SearchField-DWGdCvnn.js → SearchField-CHYnN-jt.js} +16 -16
- package/dist/{SelectionManager-B6-b5NM2.js → SelectionManager-N8X7T_4D.js} +44 -46
- package/dist/{SharedElementTransition-fML-zIv6.js → SharedElementTransition-BDT84GtD.js} +3 -3
- package/dist/{Slider-DfU6bRtH.js → Slider-CL5CM9S8.js} +23 -23
- package/dist/{Text-AxKZjtFm.js → Text-ztX6G1zR.js} +3 -3
- package/dist/{VisuallyHidden-CgnIuZJ2.js → VisuallyHidden-DTUuKFiI.js} +4 -4
- package/dist/assets/style-admin.css +12156 -2
- package/dist/assets/style-editor.css +12156 -2
- package/dist/assets/style.css +12162 -2
- package/dist/assets/wp-overrides/allow-full-width-blocks.css +6 -0
- package/dist/assets/wp-overrides/fix-label-text-case.css +29 -0
- package/dist/assets/wp-overrides/increase-sidebar-width.css +4 -0
- package/dist/assets/wp-overrides/make-block-messages-nicer.css +155 -0
- package/dist/assets/wp-overrides/replace-fonts.css +8 -0
- package/dist/assets/wp-overrides/restyle-tooltips.css +194 -0
- package/dist/assets/wp-overrides/round-corners.css +200 -0
- package/dist/assets/wp-overrides/unify-button-sizes.css +5 -0
- package/dist/clsx-DgYk2OaC.js +16 -0
- package/dist/{Color-WxFE7lQB.js → color-swatch-CFIuSPcO.js} +124 -6
- package/dist/components/animated-visibility/animated-visibility.js +25 -17
- package/dist/components/base-control/base-control.js +8 -5
- package/dist/components/base-control/container.js +204 -0
- package/dist/components/button/button.js +249 -155
- package/dist/components/checkbox/checkbox.js +96 -37
- package/dist/components/color-pickers/color-picker.js +16 -7
- package/dist/components/color-pickers/color-swatch.js +5 -57
- package/dist/components/color-pickers/gradient-editor.js +161 -138
- package/dist/components/color-pickers/solid-color-picker.js +308 -206
- package/dist/components/component-toggle/component-toggle.js +12 -8
- package/dist/components/container-panel/container-panel.js +54 -31
- package/dist/components/draggable/draggable-handle.js +8 -7
- package/dist/components/draggable/draggable.js +2 -2
- package/dist/components/draggable-list/draggable-list-item.js +21 -12
- package/dist/components/draggable-list/draggable-list.js +19 -21
- package/dist/components/expandable/expandable.js +56 -28
- package/dist/components/index.js +7 -21
- package/dist/components/input-field/input-field.js +112 -35
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +181 -121
- package/dist/components/matrix-align/matrix-align.js +54 -20
- package/dist/components/menu/menu.js +26 -34
- package/dist/components/modal/modal.js +31 -28
- package/dist/components/notice/notice.js +45 -28
- package/dist/components/number-picker/number-picker.js +151 -101
- package/dist/components/option-select/option-select.js +40 -4
- package/dist/components/options-panel/options-panel.js +52 -25
- package/dist/components/placeholders/file-picker-shell.js +10 -9
- package/dist/components/placeholders/file-placeholder.js +14 -6
- package/dist/components/placeholders/image-placeholder.js +14 -4
- package/dist/components/placeholders/media-placeholder.js +11 -4
- package/dist/components/popover/popover.js +14 -11
- package/dist/components/portal-provider/portal-provider.js +1 -1
- package/dist/components/radio/radio.js +118 -429
- package/dist/components/repeater/repeater-item.js +7 -10
- package/dist/components/repeater/repeater.js +9 -15
- package/dist/components/responsive/mini-responsive.js +53 -61
- package/dist/components/responsive/responsive-legacy.js +1 -1
- package/dist/components/responsive/responsive.js +27 -27
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/rich-label/rich-label.js +5 -5
- package/dist/components/select/async-multi-select.js +467 -100
- package/dist/components/select/{v2/async-select.js → async-select.js} +182 -105
- package/dist/components/select/multi-select.js +437 -83
- package/dist/components/select/shared.js +14 -42
- package/dist/components/select/single-select.js +349 -54
- package/dist/components/slider/column-config-slider.js +138 -45
- package/dist/components/slider/slider.js +265 -205
- package/dist/components/slider/utils.js +32 -1
- package/dist/components/smart-image/smart-image.js +25 -4
- package/dist/components/smart-image/worker-inline.js +1 -1
- package/dist/components/spacer/spacer.js +2 -2
- package/dist/components/tabs/tabs.js +370 -101
- package/dist/components/toggle/switch.js +174 -39
- package/dist/components/toggle/toggle.js +6 -3
- package/dist/components/toggle-button/toggle-button.js +140 -56
- package/dist/components/tooltip/tooltip.js +27 -26
- package/dist/{context-DMOmz986.js → context-BQvmiUqb.js} +3 -3
- package/dist/{default-i18n-DBm-GqWM.js → default-i18n-CnQeC5Pl.js} +10 -10
- package/dist/{general-Ck8IV7xJ.js → general-B6pOveVp.js} +11 -10
- package/dist/icons/icons.js +28 -9
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/icons/spinner.js +3 -1
- package/dist/{index-Dq3gT5pW.js → index-BHpUy2Ix.js} +1 -1
- package/dist/{index-D8-Zjpbd.js → index-oFgxU4zs.js} +3 -3
- package/dist/index.js +6 -20
- package/dist/proxy-0B6wWuDe.js +7409 -0
- package/dist/{react-jsx-parser.min-VUl-CuCv.js → react-jsx-parser.min-B_hvYYa1.js} +5 -5
- package/dist/{Select-BvggcFOX.js → shared-DwjRce5e.js} +170 -36
- package/dist/{textSelection-DbCKqaw8.js → textSelection-CwHUtNVX.js} +1 -1
- package/dist/{useButton-v9ngEj50.js → useButton-DdZrS1Kz.js} +3 -3
- package/dist/{useEvent-BifIGnVS.js → useEvent-BD7Olibq.js} +1 -1
- package/dist/{useFilter-BlkUH1Ma.js → useFilter-bhxeEDg8.js} +1 -1
- package/dist/{useFocusRing-Cgm0R4Cf.js → useFocusRing-D3b7Kh4P.js} +1 -1
- package/dist/{useFormReset-yV9VVy9R.js → useFormReset-WUv2PdFO.js} +1 -1
- package/dist/{useFormValidation-CeNsUGWK.js → useFormValidation-DQeXkyLm.js} +2 -2
- package/dist/{useHover-BRDW3y7-.js → useHover-Bycb7BsD.js} +7 -7
- package/dist/{useLabel-C8umX0gk.js → useLabel-Bnv4-T24.js} +2 -2
- package/dist/{useLabels-Cdxi6JSa.js → useLabels-B49ptFDX.js} +1 -1
- package/dist/{useListState-RdLrYsMP.js → useListState-ZKhRO8ML.js} +1 -1
- package/dist/{useLocalizedStringFormatter-eaZiN2tE.js → useLocalizedStringFormatter-NETP-8H8.js} +1 -1
- package/dist/{useNumberField-D16dDfYF.js → useNumberField-D2fUHql3.js} +10 -10
- package/dist/{useNumberFormatter-BCmkV-7c.js → useNumberFormatter-DGvuRCn7.js} +1 -1
- package/dist/{usePress-DJskZBH9.js → usePress-B8OteQMu.js} +6 -6
- package/dist/{useSingleSelectListState-n0AVMr3Y.js → useSingleSelectListState-BBTu4shO.js} +2 -2
- package/dist/{useToggle-DSBDAfdw.js → useToggle-BZhaYwZl.js} +4 -4
- package/dist/{useToggleState-CzN79ary.js → useToggleState-VkXJjsru.js} +1 -1
- package/dist/utilities/general.js +1 -1
- package/dist/utilities/index.js +1 -1
- package/dist/{utils-cvK1vxO7.js → utils-DGpXyJOJ.js} +29 -42
- package/dist/workers/image-analysis.worker.js +3 -3
- package/package.json +26 -22
- package/dist/ColorSwatch-xVS3rMYS.js +0 -66
- package/dist/Select-ef7c0426.esm-CmTkSxDx.js +0 -2474
- package/dist/Separator-B-xeqOkC.js +0 -344
- package/dist/assets/wp-font-enhancements.css +0 -2
- package/dist/assets/wp-ui-enhancements.css +0 -2
- package/dist/components/select/async-single-select.js +0 -138
- package/dist/components/select/custom-select-default-components.js +0 -38
- package/dist/components/select/multi-select-components.js +0 -8
- package/dist/components/select/react-select-component-wrappers.js +0 -90
- package/dist/components/select/styles.js +0 -49
- package/dist/components/select/v2/async-multi-select.js +0 -432
- package/dist/components/select/v2/multi-select.js +0 -403
- package/dist/components/select/v2/shared.js +0 -69
- package/dist/components/select/v2/single-select.js +0 -358
- package/dist/index-641ee5b8.esm-DVp0njHa.js +0 -3139
- package/dist/modifiers.esm-BuJQPI1X.js +0 -31
- package/dist/multi-select-components-CT_W0Cy9.js +0 -3744
- package/dist/react-select-async.esm-Zl1LPaPb.js +0 -107
- package/dist/react-select.esm-Bu36HujU.js +0 -15
- package/dist/useDragAndDrop-C08ZXv4F.js +0 -3925
- package/dist/wp/wp-font-enhancements.js +0 -1
- package/dist/wp/wp-ui-enhancements.js +0 -1
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
import { d as $cc38e7bd3fc7b213$export$2bb74740c4e19def, q as $feb5ffebff200149$export$c3d8340acf92597f, m as $ae20dd8cbca75726$export$d6daf82dcd84e87c, r as $c5a24bc478652b5f$export$1005530eda016c13, f as $e1995378a142960e$export$18af5c7a9e9b3664, s as $23b9f4fcf0fe224b$export$5ae2504e948afce5, o as $23b9f4fcf0fe224b$export$d68d59712b04d9d1 } from "./SelectionManager-B6-b5NM2.js";
|
|
2
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-DMOmz986.js";
|
|
3
|
-
import React__default, { useMemo, createContext } from "react";
|
|
4
|
-
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, b as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-cvK1vxO7.js";
|
|
5
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
|
|
6
|
-
function $62d8ded9296f3872$export$cfa2225e87938781(node, checkForOverflow) {
|
|
7
|
-
let scrollableNode = node;
|
|
8
|
-
if ($cc38e7bd3fc7b213$export$2bb74740c4e19def(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;
|
|
9
|
-
while (scrollableNode && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;
|
|
10
|
-
return scrollableNode || document.scrollingElement || document.documentElement;
|
|
11
|
-
}
|
|
12
|
-
let $325a3faab7a68acd$var$cache = /* @__PURE__ */ new Map();
|
|
13
|
-
function $325a3faab7a68acd$export$a16aca283550c30d(options) {
|
|
14
|
-
let { locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
15
|
-
let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : "");
|
|
16
|
-
if ($325a3faab7a68acd$var$cache.has(cacheKey)) return $325a3faab7a68acd$var$cache.get(cacheKey);
|
|
17
|
-
let formatter = new Intl.Collator(locale, options);
|
|
18
|
-
$325a3faab7a68acd$var$cache.set(cacheKey, formatter);
|
|
19
|
-
return formatter;
|
|
20
|
-
}
|
|
21
|
-
class $657e4dc4a6e88df0$export$8f5ed9ff9f511381 {
|
|
22
|
-
getItemRect(key) {
|
|
23
|
-
let container = this.ref.current;
|
|
24
|
-
if (!container) return null;
|
|
25
|
-
let item = key != null ? $feb5ffebff200149$export$c3d8340acf92597f(this.ref, key) : null;
|
|
26
|
-
if (!item) return null;
|
|
27
|
-
let containerRect = container.getBoundingClientRect();
|
|
28
|
-
let itemRect = item.getBoundingClientRect();
|
|
29
|
-
return {
|
|
30
|
-
x: itemRect.left - containerRect.left - container.clientLeft + container.scrollLeft,
|
|
31
|
-
y: itemRect.top - containerRect.top - container.clientTop + container.scrollTop,
|
|
32
|
-
width: itemRect.width,
|
|
33
|
-
height: itemRect.height
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
getContentSize() {
|
|
37
|
-
let container = this.ref.current;
|
|
38
|
-
var _container_scrollWidth, _container_scrollHeight;
|
|
39
|
-
return {
|
|
40
|
-
width: (_container_scrollWidth = container === null || container === void 0 ? void 0 : container.scrollWidth) !== null && _container_scrollWidth !== void 0 ? _container_scrollWidth : 0,
|
|
41
|
-
height: (_container_scrollHeight = container === null || container === void 0 ? void 0 : container.scrollHeight) !== null && _container_scrollHeight !== void 0 ? _container_scrollHeight : 0
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
getVisibleRect() {
|
|
45
|
-
let container = this.ref.current;
|
|
46
|
-
var _container_scrollLeft, _container_scrollTop, _container_clientWidth, _container_clientHeight;
|
|
47
|
-
return {
|
|
48
|
-
x: (_container_scrollLeft = container === null || container === void 0 ? void 0 : container.scrollLeft) !== null && _container_scrollLeft !== void 0 ? _container_scrollLeft : 0,
|
|
49
|
-
y: (_container_scrollTop = container === null || container === void 0 ? void 0 : container.scrollTop) !== null && _container_scrollTop !== void 0 ? _container_scrollTop : 0,
|
|
50
|
-
width: (_container_clientWidth = container === null || container === void 0 ? void 0 : container.clientWidth) !== null && _container_clientWidth !== void 0 ? _container_clientWidth : 0,
|
|
51
|
-
height: (_container_clientHeight = container === null || container === void 0 ? void 0 : container.clientHeight) !== null && _container_clientHeight !== void 0 ? _container_clientHeight : 0
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
constructor(ref) {
|
|
55
|
-
this.ref = ref;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
59
|
-
isDisabled(item) {
|
|
60
|
-
var _item_props;
|
|
61
|
-
return this.disabledBehavior === "all" && (((_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.isDisabled) || this.disabledKeys.has(item.key));
|
|
62
|
-
}
|
|
63
|
-
findNextNonDisabled(key, getNext) {
|
|
64
|
-
let nextKey = key;
|
|
65
|
-
while (nextKey != null) {
|
|
66
|
-
let item = this.collection.getItem(nextKey);
|
|
67
|
-
if ((item === null || item === void 0 ? void 0 : item.type) === "item" && !this.isDisabled(item)) return nextKey;
|
|
68
|
-
nextKey = getNext(nextKey);
|
|
69
|
-
}
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
getNextKey(key) {
|
|
73
|
-
let nextKey = key;
|
|
74
|
-
nextKey = this.collection.getKeyAfter(nextKey);
|
|
75
|
-
return this.findNextNonDisabled(nextKey, (key2) => this.collection.getKeyAfter(key2));
|
|
76
|
-
}
|
|
77
|
-
getPreviousKey(key) {
|
|
78
|
-
let nextKey = key;
|
|
79
|
-
nextKey = this.collection.getKeyBefore(nextKey);
|
|
80
|
-
return this.findNextNonDisabled(nextKey, (key2) => this.collection.getKeyBefore(key2));
|
|
81
|
-
}
|
|
82
|
-
findKey(key, nextKey, shouldSkip) {
|
|
83
|
-
let tempKey = key;
|
|
84
|
-
let itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
85
|
-
if (!itemRect || tempKey == null) return null;
|
|
86
|
-
let prevRect = itemRect;
|
|
87
|
-
do {
|
|
88
|
-
tempKey = nextKey(tempKey);
|
|
89
|
-
if (tempKey == null) break;
|
|
90
|
-
itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
91
|
-
} while (itemRect && shouldSkip(prevRect, itemRect) && tempKey != null);
|
|
92
|
-
return tempKey;
|
|
93
|
-
}
|
|
94
|
-
isSameRow(prevRect, itemRect) {
|
|
95
|
-
return prevRect.y === itemRect.y || prevRect.x !== itemRect.x;
|
|
96
|
-
}
|
|
97
|
-
isSameColumn(prevRect, itemRect) {
|
|
98
|
-
return prevRect.x === itemRect.x || prevRect.y !== itemRect.y;
|
|
99
|
-
}
|
|
100
|
-
getKeyBelow(key) {
|
|
101
|
-
if (this.layout === "grid" && this.orientation === "vertical") return this.findKey(key, (key2) => this.getNextKey(key2), this.isSameRow);
|
|
102
|
-
else return this.getNextKey(key);
|
|
103
|
-
}
|
|
104
|
-
getKeyAbove(key) {
|
|
105
|
-
if (this.layout === "grid" && this.orientation === "vertical") return this.findKey(key, (key2) => this.getPreviousKey(key2), this.isSameRow);
|
|
106
|
-
else return this.getPreviousKey(key);
|
|
107
|
-
}
|
|
108
|
-
getNextColumn(key, right) {
|
|
109
|
-
return right ? this.getPreviousKey(key) : this.getNextKey(key);
|
|
110
|
-
}
|
|
111
|
-
getKeyRightOf(key) {
|
|
112
|
-
let layoutDelegateMethod = this.direction === "ltr" ? "getKeyRightOf" : "getKeyLeftOf";
|
|
113
|
-
if (this.layoutDelegate[layoutDelegateMethod]) {
|
|
114
|
-
key = this.layoutDelegate[layoutDelegateMethod](key);
|
|
115
|
-
return this.findNextNonDisabled(key, (key2) => this.layoutDelegate[layoutDelegateMethod](key2));
|
|
116
|
-
}
|
|
117
|
-
if (this.layout === "grid") {
|
|
118
|
-
if (this.orientation === "vertical") return this.getNextColumn(key, this.direction === "rtl");
|
|
119
|
-
else return this.findKey(key, (key2) => this.getNextColumn(key2, this.direction === "rtl"), this.isSameColumn);
|
|
120
|
-
} else if (this.orientation === "horizontal") return this.getNextColumn(key, this.direction === "rtl");
|
|
121
|
-
return null;
|
|
122
|
-
}
|
|
123
|
-
getKeyLeftOf(key) {
|
|
124
|
-
let layoutDelegateMethod = this.direction === "ltr" ? "getKeyLeftOf" : "getKeyRightOf";
|
|
125
|
-
if (this.layoutDelegate[layoutDelegateMethod]) {
|
|
126
|
-
key = this.layoutDelegate[layoutDelegateMethod](key);
|
|
127
|
-
return this.findNextNonDisabled(key, (key2) => this.layoutDelegate[layoutDelegateMethod](key2));
|
|
128
|
-
}
|
|
129
|
-
if (this.layout === "grid") {
|
|
130
|
-
if (this.orientation === "vertical") return this.getNextColumn(key, this.direction === "ltr");
|
|
131
|
-
else return this.findKey(key, (key2) => this.getNextColumn(key2, this.direction === "ltr"), this.isSameColumn);
|
|
132
|
-
} else if (this.orientation === "horizontal") return this.getNextColumn(key, this.direction === "ltr");
|
|
133
|
-
return null;
|
|
134
|
-
}
|
|
135
|
-
getFirstKey() {
|
|
136
|
-
let key = this.collection.getFirstKey();
|
|
137
|
-
return this.findNextNonDisabled(key, (key2) => this.collection.getKeyAfter(key2));
|
|
138
|
-
}
|
|
139
|
-
getLastKey() {
|
|
140
|
-
let key = this.collection.getLastKey();
|
|
141
|
-
return this.findNextNonDisabled(key, (key2) => this.collection.getKeyBefore(key2));
|
|
142
|
-
}
|
|
143
|
-
getKeyPageAbove(key) {
|
|
144
|
-
let menu = this.ref.current;
|
|
145
|
-
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
146
|
-
if (!itemRect) return null;
|
|
147
|
-
if (menu && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(menu)) return this.getFirstKey();
|
|
148
|
-
let nextKey = key;
|
|
149
|
-
if (this.orientation === "horizontal") {
|
|
150
|
-
let pageX = Math.max(0, itemRect.x + itemRect.width - this.layoutDelegate.getVisibleRect().width);
|
|
151
|
-
while (itemRect && itemRect.x > pageX && nextKey != null) {
|
|
152
|
-
nextKey = this.getKeyAbove(nextKey);
|
|
153
|
-
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
154
|
-
}
|
|
155
|
-
} else {
|
|
156
|
-
let pageY = Math.max(0, itemRect.y + itemRect.height - this.layoutDelegate.getVisibleRect().height);
|
|
157
|
-
while (itemRect && itemRect.y > pageY && nextKey != null) {
|
|
158
|
-
nextKey = this.getKeyAbove(nextKey);
|
|
159
|
-
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
return nextKey !== null && nextKey !== void 0 ? nextKey : this.getFirstKey();
|
|
163
|
-
}
|
|
164
|
-
getKeyPageBelow(key) {
|
|
165
|
-
let menu = this.ref.current;
|
|
166
|
-
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
167
|
-
if (!itemRect) return null;
|
|
168
|
-
if (menu && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(menu)) return this.getLastKey();
|
|
169
|
-
let nextKey = key;
|
|
170
|
-
if (this.orientation === "horizontal") {
|
|
171
|
-
let pageX = Math.min(this.layoutDelegate.getContentSize().width, itemRect.y - itemRect.width + this.layoutDelegate.getVisibleRect().width);
|
|
172
|
-
while (itemRect && itemRect.x < pageX && nextKey != null) {
|
|
173
|
-
nextKey = this.getKeyBelow(nextKey);
|
|
174
|
-
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
175
|
-
}
|
|
176
|
-
} else {
|
|
177
|
-
let pageY = Math.min(this.layoutDelegate.getContentSize().height, itemRect.y - itemRect.height + this.layoutDelegate.getVisibleRect().height);
|
|
178
|
-
while (itemRect && itemRect.y < pageY && nextKey != null) {
|
|
179
|
-
nextKey = this.getKeyBelow(nextKey);
|
|
180
|
-
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
return nextKey !== null && nextKey !== void 0 ? nextKey : this.getLastKey();
|
|
184
|
-
}
|
|
185
|
-
getKeyForSearch(search, fromKey) {
|
|
186
|
-
if (!this.collator) return null;
|
|
187
|
-
let collection = this.collection;
|
|
188
|
-
let key = fromKey || this.getFirstKey();
|
|
189
|
-
while (key != null) {
|
|
190
|
-
let item = collection.getItem(key);
|
|
191
|
-
if (!item) return null;
|
|
192
|
-
let substring = item.textValue.slice(0, search.length);
|
|
193
|
-
if (item.textValue && this.collator.compare(substring, search) === 0) return key;
|
|
194
|
-
key = this.getNextKey(key);
|
|
195
|
-
}
|
|
196
|
-
return null;
|
|
197
|
-
}
|
|
198
|
-
constructor(...args) {
|
|
199
|
-
if (args.length === 1) {
|
|
200
|
-
let opts = args[0];
|
|
201
|
-
this.collection = opts.collection;
|
|
202
|
-
this.ref = opts.ref;
|
|
203
|
-
this.collator = opts.collator;
|
|
204
|
-
this.disabledKeys = opts.disabledKeys || /* @__PURE__ */ new Set();
|
|
205
|
-
this.disabledBehavior = opts.disabledBehavior || "all";
|
|
206
|
-
this.orientation = opts.orientation || "vertical";
|
|
207
|
-
this.direction = opts.direction;
|
|
208
|
-
this.layout = opts.layout || "stack";
|
|
209
|
-
this.layoutDelegate = opts.layoutDelegate || new $657e4dc4a6e88df0$export$8f5ed9ff9f511381(opts.ref);
|
|
210
|
-
} else {
|
|
211
|
-
this.collection = args[0];
|
|
212
|
-
this.disabledKeys = args[1];
|
|
213
|
-
this.ref = args[2];
|
|
214
|
-
this.collator = args[3];
|
|
215
|
-
this.layout = "stack";
|
|
216
|
-
this.orientation = "vertical";
|
|
217
|
-
this.disabledBehavior = "all";
|
|
218
|
-
this.layoutDelegate = new $657e4dc4a6e88df0$export$8f5ed9ff9f511381(this.ref);
|
|
219
|
-
}
|
|
220
|
-
if (this.layout === "stack" && this.orientation === "vertical") {
|
|
221
|
-
this.getKeyLeftOf = void 0;
|
|
222
|
-
this.getKeyRightOf = void 0;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
function $982254629710d113$export$b95089534ab7c1fd(props) {
|
|
227
|
-
let { selectionManager, collection, disabledKeys, ref, keyboardDelegate, layoutDelegate } = props;
|
|
228
|
-
let collator = $325a3faab7a68acd$export$a16aca283550c30d({
|
|
229
|
-
usage: "search",
|
|
230
|
-
sensitivity: "base"
|
|
231
|
-
});
|
|
232
|
-
let disabledBehavior = selectionManager.disabledBehavior;
|
|
233
|
-
let delegate = useMemo(() => keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a({
|
|
234
|
-
collection,
|
|
235
|
-
disabledKeys,
|
|
236
|
-
disabledBehavior,
|
|
237
|
-
ref,
|
|
238
|
-
collator,
|
|
239
|
-
layoutDelegate
|
|
240
|
-
}), [
|
|
241
|
-
keyboardDelegate,
|
|
242
|
-
layoutDelegate,
|
|
243
|
-
collection,
|
|
244
|
-
disabledKeys,
|
|
245
|
-
ref,
|
|
246
|
-
collator,
|
|
247
|
-
disabledBehavior
|
|
248
|
-
]);
|
|
249
|
-
let { collectionProps } = $ae20dd8cbca75726$export$d6daf82dcd84e87c({
|
|
250
|
-
...props,
|
|
251
|
-
ref,
|
|
252
|
-
selectionManager,
|
|
253
|
-
keyboardDelegate: delegate
|
|
254
|
-
});
|
|
255
|
-
return {
|
|
256
|
-
listProps: collectionProps
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
const $453cc9f0df89c0a5$var$cache = /* @__PURE__ */ new WeakMap();
|
|
260
|
-
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
|
|
261
|
-
let count = $453cc9f0df89c0a5$var$cache.get(collection);
|
|
262
|
-
if (count != null) return count;
|
|
263
|
-
let counter = 0;
|
|
264
|
-
let countItems = (items) => {
|
|
265
|
-
for (let item of items) {
|
|
266
|
-
if (item.type === "section") countItems($c5a24bc478652b5f$export$1005530eda016c13(item, collection));
|
|
267
|
-
else if (item.type === "item") counter++;
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
countItems(collection);
|
|
271
|
-
$453cc9f0df89c0a5$var$cache.set(collection, counter);
|
|
272
|
-
return counter;
|
|
273
|
-
}
|
|
274
|
-
function $f4b273590fab9f93$export$52210f68a14655d0(props) {
|
|
275
|
-
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
276
|
-
labelable: true
|
|
277
|
-
});
|
|
278
|
-
let ariaOrientation;
|
|
279
|
-
if (props.orientation === "vertical") ariaOrientation = "vertical";
|
|
280
|
-
if (props.elementType !== "hr") return {
|
|
281
|
-
separatorProps: {
|
|
282
|
-
...domProps,
|
|
283
|
-
role: "separator",
|
|
284
|
-
"aria-orientation": ariaOrientation
|
|
285
|
-
}
|
|
286
|
-
};
|
|
287
|
-
return {
|
|
288
|
-
separatorProps: domProps
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
const $72a5793c14baf454$export$e0e4026c12a8bdbb = /* @__PURE__ */ createContext({});
|
|
292
|
-
const $72a5793c14baf454$export$8b251419efc915eb = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664($23b9f4fcf0fe224b$export$5ae2504e948afce5, function Header(props, ref) {
|
|
293
|
-
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $72a5793c14baf454$export$e0e4026c12a8bdbb);
|
|
294
|
-
return /* @__PURE__ */ React__default.createElement("header", {
|
|
295
|
-
className: "react-aria-Header",
|
|
296
|
-
...props,
|
|
297
|
-
ref
|
|
298
|
-
}, props.children);
|
|
299
|
-
});
|
|
300
|
-
const $431f98aba6844401$export$6615d83f6de245ce = /* @__PURE__ */ createContext({});
|
|
301
|
-
class $431f98aba6844401$export$7750289ca694c0b5 extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
|
|
302
|
-
filter(collection, newCollection) {
|
|
303
|
-
let prevItem = newCollection.getItem(this.prevKey);
|
|
304
|
-
if (prevItem && prevItem.type !== "separator") {
|
|
305
|
-
let clone = this.clone();
|
|
306
|
-
newCollection.addDescendants(clone, collection);
|
|
307
|
-
return clone;
|
|
308
|
-
}
|
|
309
|
-
return null;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
$431f98aba6844401$export$7750289ca694c0b5.type = "separator";
|
|
313
|
-
const $431f98aba6844401$export$1ff3c3f08ae963c0 = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664($431f98aba6844401$export$7750289ca694c0b5, function Separator(props, ref) {
|
|
314
|
-
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $431f98aba6844401$export$6615d83f6de245ce);
|
|
315
|
-
let { elementType, orientation, style, className, slot, ...otherProps } = props;
|
|
316
|
-
let Element = elementType || "hr";
|
|
317
|
-
if (Element === "hr" && orientation === "vertical") Element = "div";
|
|
318
|
-
let { separatorProps } = $f4b273590fab9f93$export$52210f68a14655d0({
|
|
319
|
-
...otherProps,
|
|
320
|
-
elementType,
|
|
321
|
-
orientation
|
|
322
|
-
});
|
|
323
|
-
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
324
|
-
global: true
|
|
325
|
-
});
|
|
326
|
-
return /* @__PURE__ */ React__default.createElement(Element, {
|
|
327
|
-
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, separatorProps),
|
|
328
|
-
style,
|
|
329
|
-
className: className !== null && className !== void 0 ? className : "react-aria-Separator",
|
|
330
|
-
ref,
|
|
331
|
-
slot: slot || void 0
|
|
332
|
-
});
|
|
333
|
-
});
|
|
334
|
-
export {
|
|
335
|
-
$72a5793c14baf454$export$8b251419efc915eb as $,
|
|
336
|
-
$431f98aba6844401$export$1ff3c3f08ae963c0 as a,
|
|
337
|
-
$325a3faab7a68acd$export$a16aca283550c30d as b,
|
|
338
|
-
$62d8ded9296f3872$export$cfa2225e87938781 as c,
|
|
339
|
-
$982254629710d113$export$b95089534ab7c1fd as d,
|
|
340
|
-
$453cc9f0df89c0a5$export$77d5aafae4e095b2 as e,
|
|
341
|
-
$2a25aae57d74318e$export$a05409b8bb224a5a as f,
|
|
342
|
-
$431f98aba6844401$export$6615d83f6de245ce as g,
|
|
343
|
-
$72a5793c14baf454$export$e0e4026c12a8bdbb as h
|
|
344
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.15 | MIT License | https://tailwindcss.com */
|
|
2
|
-
.edit-post-header,.components-popover,.edit-post-sidebar,.wp-block-post-title,.components-select-control__input,.components-base-control__field,.components-base-control__label,.components-combobox-control__suggestions-container,.components-input-control__label,.components-input-control__input,.components-checkbox-control__label,.components-menu-group__label,.components-menu-item__button,.components-notice .components-notice__content,.components-tooltip,.components-modal__header,.preferences-modal__section-title,.preferences-modal__section-description,.block-editor-inserter__tabs,.editor-list-view-sidebar,.edit-post-layout__footer,.components-snackbar,.components-text-control__input{font-family:var(--es-font-sans,"Geist Variable",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji")}body.wp-admin{font-family:var(--es-font-sans,"Geist Variable",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji")!important}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.15 | MIT License | https://tailwindcss.com */
|
|
2
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-content:"";--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-border-style:solid;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}.edit-post-header__toolbar .components-button,.edit-post-header__settings .components-button,.editor-document-tools__left .components-button,.editor-header__center .components-button,.editor-header__settings .components-button,.edit-post-sidebar .components-button:not(.components-panel__body-toggle,.editor-post-last-revision__title),.components-snackbar,.components-toggle-group-control,.editor-post-publish-panel .components-button,.edit-post-text-editor__toolbar .components-button,.edit-post-text-editor__body .components-textarea-control__input,.media-modal-content,.media-modal-content .components-button,.components-guide__container .components-button,.components-notice__content .components-button,.editor-post-featured-image__toggle.components-button{border-radius:var(--es-radius-md,.375rem)!important}.components-input-control__container,.components-combobox-control__suggestions-container,.components-checkbox-control__input,button.components-toggle-group-control-option-base,.editor-post-visibility__password-input{border-radius:.25rem!important}.components-button-group .components-button:first-child{border-top-left-radius:var(--es-radius-md,.375rem)!important;border-bottom-left-radius:var(--es-radius-md,.375rem)!important}.components-button-group .components-button:last-child{border-top-right-radius:var(--es-radius-md,.375rem)!important;border-bottom-right-radius:var(--es-radius-md,.375rem)!important}.components-popover__content,.components-guide{border-radius:var(--es-radius-lg,.5rem)!important}.block-editor-inserter__search{border-top-left-radius:var(--es-radius-lg,.5rem)!important;border-top-right-radius:var(--es-radius-lg,.5rem)!important}.media-menu-item.active{border-top-left-radius:var(--es-radius-md,.375rem)!important;border-top-right-radius:var(--es-radius-md,.375rem)!important}.components-base-control__label,.components-input-control__label,.components-custom-select-control__label{--tw-font-weight:var(--es-font-weight-normal,400)!important;font-size:13px!important;font-weight:var(--es-font-weight-normal,400)!important;--tw-tracking:var(--es-tracking-normal,0em)!important;letter-spacing:var(--es-tracking-normal,0em)!important;text-transform:none!important}.edit-post-sidebar,.interface-interface-skeleton__sidebar:not(:empty)>.interface-complementary-area__fill[style="width: 280px;"],.interface-complementary-area.editor-sidebar{width:calc(var(--es-spacing,.25rem)*80)!important}.block-editor-block-list__block-crash-warning{border-radius:var(--es-radius-lg,.5rem)!important;border-color:var(--es-color-red-700,#bf000f)!important}@supports (color:lab(0% 0 0)){.block-editor-block-list__block-crash-warning{border-color:var(--es-color-red-700,lab(40.4273% 67.2623 53.7441))!important}}@supports (color:color-mix(in lab, red, red)){.block-editor-block-list__block-crash-warning{border-color:color-mix(in oklab,var(--es-color-red-700,lab(40.4273% 67.2623 53.7441))15%,transparent)!important}}.block-editor-block-list__block-crash-warning{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important;--tw-shadow-color:var(--es-color-red-700,#bf000f)!important}@supports (color:lab(0% 0 0)){.block-editor-block-list__block-crash-warning{--tw-shadow-color:var(--es-color-red-700,lab(40.4273% 67.2623 53.7441))!important}}@supports (color:color-mix(in lab, red, red)){.block-editor-block-list__block-crash-warning{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--es-color-red-700,lab(40.4273% 67.2623 53.7441))10%,transparent)var(--tw-shadow-alpha),transparent)!important}}.block-editor-block-list__block-crash-warning .block-editor-warning__message{color:var(--es-color-red-950,#460809)!important}@supports (color:lab(0% 0 0)){.block-editor-block-list__block-crash-warning .block-editor-warning__message{color:var(--es-color-red-950,lab(13.003% 29.04 16.7519))!important}}.wp-block-missing div.block-editor-warning{border-radius:var(--es-radius-lg,.5rem)!important;border-color:var(--es-color-zinc-300,#d4d4d8)!important;background-color:var(--es-color-zinc-50,#fafafa)!important}@supports (color:lab(0% 0 0)){.wp-block-missing div.block-editor-warning{border-color:var(--es-color-zinc-300,lab(84.9837% .601262 -2.17986))!important;background-color:var(--es-color-zinc-50,lab(98.26% 0 0))!important}}@supports (color:color-mix(in lab, red, red)){.wp-block-missing div.block-editor-warning{background-color:color-mix(in oklab,var(--es-color-zinc-50,lab(98.26% 0 0))75%,transparent)!important}}.wp-block-missing div.block-editor-warning{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important;--tw-shadow-color:var(--es-color-zinc-700,#3f3f46)!important}@supports (color:lab(0% 0 0)){.wp-block-missing div.block-editor-warning{--tw-shadow-color:var(--es-color-zinc-700,lab(26.8019% 1.35387 -4.68303))!important}}@supports (color:color-mix(in lab, red, red)){.wp-block-missing div.block-editor-warning{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--es-color-zinc-700,lab(26.8019% 1.35387 -4.68303))20%,transparent)var(--tw-shadow-alpha),transparent)!important}}.wp-block-missing div.block-editor-warning .block-editor-warning__message{color:var(--es-color-zinc-950,#09090b)!important}@supports (color:lab(0% 0 0)){.wp-block-missing div.block-editor-warning .block-editor-warning__message{color:var(--es-color-zinc-950,lab(2.51107% .242703 -.886115))!important}}.block-editor-block-contextual-toolbar,.block-editor-block-parent-selector__button{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-radius:var(--es-radius-lg,.5rem)!important}.block-editor-block-types-list .block-editor-block-types-list__item{border-radius:var(--es-radius-lg,.5rem)!important}.block-editor-block-types-list .block-editor-block-types-list__item:after{content:var(--tw-content);border-radius:var(--es-radius-lg,.5rem)!important}.block-editor-block-types-list .block-editor-block-types-list__item svg{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.block-editor-list-view-tree .block-editor-block-icon{border-radius:.25rem!important}.block-editor-list-view-tree .block-editor-list-view-leaf>:first-child{border-top-left-radius:var(--es-radius-lg,.5rem)!important;border-bottom-left-radius:var(--es-radius-lg,.5rem)!important}.block-editor-list-view-tree .block-editor-list-view-leaf>:last-child{border-top-right-radius:var(--es-radius-lg,.5rem)!important;border-bottom-right-radius:var(--es-radius-lg,.5rem)!important}.block-editor-block-inspector .block-editor-block-card .block-editor-block-icon{border-radius:.25rem!important}.block-editor-inserter__toggle{border-radius:var(--es-radius-md,.375rem)!important}:is(.edit-post-header__toolbar,.edit-post-header__settings,.editor-document-tools__left,.editor-header__center,.editor-header__settings) .components-button{min-height:calc(var(--es-spacing,.25rem)*9)!important;min-width:calc(var(--es-spacing,.25rem)*9)!important}.editor-styles-wrapper .wp-block:not(.editor-post-title,.block-list-appender){max-width:100%!important}.components-tooltip{border-style:var(--tw-border-style);border-width:1px;border-color:var(--es-color-gray-800,#1e2939);background-color:color-mix(in oklab,var(--es-color-gray-950,#030712)70%,transparent);padding-inline:calc(var(--es-spacing,.25rem)*1);padding-block:calc(var(--es-spacing,.25rem)*.5);color:var(--es-color-white,#fff);--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-backdrop-blur:blur(var(--es-blur-xl,24px));--tw-backdrop-brightness:brightness(105%);--tw-backdrop-saturate:saturate(150%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);border-radius:var(--es-radius-md,.375rem)!important}@supports (color:lab(0% 0 0)){.components-tooltip{border-color:var(--es-color-gray-800,lab(16.1051% -1.18239 -11.7533));background-color:color-mix(in oklab,var(--es-color-gray-950,lab(1.90334% .278696 -5.48866))70%,transparent)}}.components-tooltip:has(>:first-child){border-color:var(--es-color-gray-200,#e5e7eb);background-color:var(--es-color-white,#fff)}@supports (color:lab(0% 0 0)){.components-tooltip:has(>:first-child){border-color:var(--es-color-gray-200,lab(91.6229% -.159115 -2.26791))}}@supports (color:color-mix(in lab, red, red)){.components-tooltip:has(>:first-child){background-color:color-mix(in oklab,var(--es-color-white,#fff)80%,transparent)}}.components-tooltip:has(>:first-child){color:var(--es-color-gray-700,#364153)}@supports (color:lab(0% 0 0)){.components-tooltip:has(>:first-child){color:var(--es-color-gray-700,lab(27.1134% -.956401 -12.3224))}}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { A as AsyncSelect$1 } from "../../react-select-async.esm-Zl1LPaPb.js";
|
|
3
|
-
import { CustomSelectDefaultClearIndicator, CustomSelectDefaultDropdownIndicator } from "./custom-select-default-components.js";
|
|
4
|
-
import { BaseControl } from "../base-control/base-control.js";
|
|
5
|
-
import { eightshiftSelectClasses } from "./styles.js";
|
|
6
|
-
import { c as components } from "../../index-641ee5b8.esm-DVp0njHa.js";
|
|
7
|
-
/**
|
|
8
|
-
* Select menu with async loading.
|
|
9
|
-
*
|
|
10
|
-
* @component
|
|
11
|
-
* @param {Object} props - Component props.
|
|
12
|
-
* @param {string} [props.label] - Label of the component.
|
|
13
|
-
* @param {string} [props.help] - Help text of the component.
|
|
14
|
-
* @param {string} [props.icon] - Icon of the component.
|
|
15
|
-
* @param {string} [props.subtitle] - Subtitle of the component.
|
|
16
|
-
* @param {JSX.Element|JSX.Element[]} [props.actions] - Actions to show to the right of the label.
|
|
17
|
-
* @param {boolean} [props.inline] - Whether the Select menu is displayed inline with the label, to the right.
|
|
18
|
-
* @param {boolean|{label: string, value: string, metadata: Object<string, any>?}[]} [props.preloadOptions=true] - If `true`, the initial loading is done as soon as the component is loaded. If an array of `{label: '', value: ''}` option is provided, that is loaded immediately, dynamic fetching only happens in search. If `false`, nothing is loaded immediately, fetching only happens when an user types to search.
|
|
19
|
-
* @param {Function} props.loadOptions - Async function that returns an array of `{label: '', value: ''}`-formatted items. `loadOptions(searchText: string): Promise<{label: string, value: string, metadata: Object<string, any>?}[]>`.
|
|
20
|
-
* @param {{label: string, value: string, metadata: Object<string, any>?}} props.value - Current value of the select.
|
|
21
|
-
* @param {Function} props.onChange - Function to call when the value changes.
|
|
22
|
-
* @param {boolean} [props.clearable=false] - Whether the select is clearable.
|
|
23
|
-
* @param {boolean} [props.noSearch=false] - Whether the search is disabled.
|
|
24
|
-
* @param {boolean} [props.disabled=false] - Whether the select is disabled.
|
|
25
|
-
* @param {boolean} [props.keepMenuOpenAfterSelect=false] - Whether the menu stays open after an select.
|
|
26
|
-
* @param {string} [props.placeholder] - Placeholder text to show when no value is selected.
|
|
27
|
-
* @param {JSX.Element} [props.customDropdownIndicator] - If provided, replaces the default dropdown arrow indicator.
|
|
28
|
-
* @param {JSX.Element} [props.customClearIndicator] - If provided and `noClear` is `false`, replaces the default 'Clear all' button.
|
|
29
|
-
* @param {JSX.Element} [props.customMenuOption] - If provided, replaces the default item in the dropdown menu (react-select's `components.Option`).
|
|
30
|
-
* @param {JSX.Element} [props.customValueDisplay] - If provided, replaces the default current value display of each selected item (react-select's `components.SingleValue`).
|
|
31
|
-
* @param {Function} [props.processLoadedOptions] - Allows modifying (filtering, grouping, ...) options output after the items have been dynamically fetched. Must include `label`, `value`, and `id` keys in the output, additional fields can be added as required.
|
|
32
|
-
* @param {string} props.className - Classes to pass to the select menu.
|
|
33
|
-
* @param {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
34
|
-
*
|
|
35
|
-
* @returns {JSX.Element} The AsyncSelect component.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* const [value, setValue] = useState(null);
|
|
39
|
-
*
|
|
40
|
-
* const loadOptions = async (searchText) => {
|
|
41
|
-
* const response = await fetch(`https://api.example.com/items?q=${searchText}`);
|
|
42
|
-
* const data = await response.json();
|
|
43
|
-
*
|
|
44
|
-
* return data.items.map((item) => ({
|
|
45
|
-
* label: item.name,
|
|
46
|
-
* value: item.id,
|
|
47
|
-
* }));
|
|
48
|
-
* };
|
|
49
|
-
*
|
|
50
|
-
* <AsyncMultiSelect
|
|
51
|
-
* label='Select items'
|
|
52
|
-
* loadOptions={loadOptions}
|
|
53
|
-
* value={value}
|
|
54
|
-
* onChange={setValue}
|
|
55
|
-
* />
|
|
56
|
-
*
|
|
57
|
-
* @preserve
|
|
58
|
-
*/
|
|
59
|
-
const AsyncSelect = (props) => {
|
|
60
|
-
const {
|
|
61
|
-
label,
|
|
62
|
-
help,
|
|
63
|
-
icon,
|
|
64
|
-
subtitle,
|
|
65
|
-
actions,
|
|
66
|
-
inline,
|
|
67
|
-
loadOptions,
|
|
68
|
-
preloadOptions = true,
|
|
69
|
-
value,
|
|
70
|
-
onChange,
|
|
71
|
-
noSearch = false,
|
|
72
|
-
disabled = false,
|
|
73
|
-
clearable = false,
|
|
74
|
-
keepMenuOpenAfterSelect = false,
|
|
75
|
-
className,
|
|
76
|
-
placeholder,
|
|
77
|
-
customMenuOption,
|
|
78
|
-
customValueDisplay,
|
|
79
|
-
customDropdownArrow,
|
|
80
|
-
customClearIndicator,
|
|
81
|
-
processLoadedOptions = (options) => options,
|
|
82
|
-
hidden,
|
|
83
|
-
...additionalProps
|
|
84
|
-
} = props;
|
|
85
|
-
if (hidden) {
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
const customLoadOptions = async (searchText) => {
|
|
89
|
-
const results = await loadOptions(searchText);
|
|
90
|
-
return processLoadedOptions(results?.map((item) => ({ id: item.value, ...item })) ?? []);
|
|
91
|
-
};
|
|
92
|
-
return /* @__PURE__ */ jsx(
|
|
93
|
-
BaseControl,
|
|
94
|
-
{
|
|
95
|
-
label,
|
|
96
|
-
icon,
|
|
97
|
-
subtitle,
|
|
98
|
-
actions,
|
|
99
|
-
help,
|
|
100
|
-
inline,
|
|
101
|
-
children: /* @__PURE__ */ jsx(
|
|
102
|
-
AsyncSelect$1,
|
|
103
|
-
{
|
|
104
|
-
unstyled: true,
|
|
105
|
-
loadOptions: customLoadOptions,
|
|
106
|
-
defaultOptions: preloadOptions,
|
|
107
|
-
value,
|
|
108
|
-
onChange: (value2) => {
|
|
109
|
-
if (value2 && "id" in value2) {
|
|
110
|
-
delete value2.id;
|
|
111
|
-
}
|
|
112
|
-
onChange(value2);
|
|
113
|
-
},
|
|
114
|
-
closeMenuOnSelect: !keepMenuOpenAfterSelect,
|
|
115
|
-
isClearable: clearable,
|
|
116
|
-
isSearchable: !noSearch,
|
|
117
|
-
isDisabled: disabled,
|
|
118
|
-
className,
|
|
119
|
-
placeholder,
|
|
120
|
-
classNames: eightshiftSelectClasses,
|
|
121
|
-
components: {
|
|
122
|
-
Option: customMenuOption ?? components.Option,
|
|
123
|
-
SingleValue: customValueDisplay ?? components.SingleValue,
|
|
124
|
-
IndicatorSeparator: null,
|
|
125
|
-
DropdownIndicator: customDropdownArrow ?? CustomSelectDefaultDropdownIndicator,
|
|
126
|
-
ClearIndicator: customClearIndicator ?? CustomSelectDefaultClearIndicator
|
|
127
|
-
},
|
|
128
|
-
menuPlacement: "auto",
|
|
129
|
-
menuPortalTarget: document.body,
|
|
130
|
-
...additionalProps
|
|
131
|
-
}
|
|
132
|
-
)
|
|
133
|
-
}
|
|
134
|
-
);
|
|
135
|
-
};
|
|
136
|
-
export {
|
|
137
|
-
AsyncSelect
|
|
138
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import React__default from "react";
|
|
3
|
-
import { icons } from "../../icons/icons.js";
|
|
4
|
-
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
|
-
import { c as components } from "../../index-641ee5b8.esm-DVp0njHa.js";
|
|
6
|
-
/**
|
|
7
|
-
* Default dropdown indicator for CustomSelect.
|
|
8
|
-
*
|
|
9
|
-
* @param {import('react-select').DropdownIndicatorProps} props - components.DropdownIndicator props.
|
|
10
|
-
*
|
|
11
|
-
* @preserve
|
|
12
|
-
*/
|
|
13
|
-
const CustomSelectDefaultDropdownIndicator = (props) => {
|
|
14
|
-
return /* @__PURE__ */ jsx(components.DropdownIndicator, { ...props, children: React__default.cloneElement(icons.dropdownCaretAlt, {
|
|
15
|
-
className: clsx(props.selectProps.menuIsOpen && "es:-scale-y-100 ")
|
|
16
|
-
}) });
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Default clear indicator for CustomSelect.
|
|
20
|
-
*
|
|
21
|
-
* @param {import('react-select').ClearIndicatorProps} props - components.DropdownIndicator props.
|
|
22
|
-
*
|
|
23
|
-
* @preserve
|
|
24
|
-
*/
|
|
25
|
-
const CustomSelectDefaultClearIndicator = (props) => /* @__PURE__ */ jsx(components.ClearIndicator, { ...props, children: icons.clear });
|
|
26
|
-
/**
|
|
27
|
-
* Default multiple value remove element for CustomSelect.
|
|
28
|
-
*
|
|
29
|
-
* @param {import('react-select').MultiValueRemoveProps} props - components.MultiValueRemove props.
|
|
30
|
-
*
|
|
31
|
-
* @preserve
|
|
32
|
-
*/
|
|
33
|
-
const CustomSelectDefaultMultiValueRemove = (props) => /* @__PURE__ */ jsx(components.MultiValueRemove, { ...props, children: React__default.cloneElement(icons.clear, { className: "es:size-4" }) });
|
|
34
|
-
export {
|
|
35
|
-
CustomSelectDefaultClearIndicator,
|
|
36
|
-
CustomSelectDefaultDropdownIndicator,
|
|
37
|
-
CustomSelectDefaultMultiValueRemove
|
|
38
|
-
};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { c as components } from "../../index-641ee5b8.esm-DVp0njHa.js";
|
|
3
|
-
/**
|
|
4
|
-
* Custom dropdown indicator for CustomSelect.
|
|
5
|
-
*
|
|
6
|
-
* (a wrapper for `components.DropdownIndicator` from `react-select`)
|
|
7
|
-
*
|
|
8
|
-
* @param {import('react-select').DropdownIndicatorProps} props - components.DropdownIndicator props.
|
|
9
|
-
*
|
|
10
|
-
* @preserve
|
|
11
|
-
*/
|
|
12
|
-
const RSDropdownIndicator = (props) => /* @__PURE__ */ jsx(components.DropdownIndicator, { ...props });
|
|
13
|
-
/**
|
|
14
|
-
* Custom value display for CustomSelect.
|
|
15
|
-
*
|
|
16
|
-
* (a wrapper for `components.SingleValue` from `react-select`)
|
|
17
|
-
*
|
|
18
|
-
* @param {import('react-select').SingleValueProps} props - components.SingleValue props.
|
|
19
|
-
*
|
|
20
|
-
* @preserve
|
|
21
|
-
*/
|
|
22
|
-
const RSSingleValue = (props) => /* @__PURE__ */ jsx(components.SingleValue, { ...props });
|
|
23
|
-
/**
|
|
24
|
-
* Custom value display for multi item select.
|
|
25
|
-
*
|
|
26
|
-
* (a wrapper for `components.MultiValue` from `react-select`)
|
|
27
|
-
*
|
|
28
|
-
* @param {import('react-select').MultiValueProps} props - components.SingleValue props.
|
|
29
|
-
*
|
|
30
|
-
* @preserve
|
|
31
|
-
*/
|
|
32
|
-
const RSMultiValue = (props) => /* @__PURE__ */ jsx(components.MultiValue, { ...props });
|
|
33
|
-
/**
|
|
34
|
-
* Custom option for CustomSelect.
|
|
35
|
-
*
|
|
36
|
-
* (a wrapper for `components.Option` from `react-select`)
|
|
37
|
-
*
|
|
38
|
-
* @param {import('react-select').OptionProps} props - components.Option props.
|
|
39
|
-
*
|
|
40
|
-
* @preserve
|
|
41
|
-
*/
|
|
42
|
-
const RSOption = (props) => /* @__PURE__ */ jsx(components.Option, { ...props });
|
|
43
|
-
/**
|
|
44
|
-
* Custom multiple value remove button for CustomSelect.
|
|
45
|
-
*
|
|
46
|
-
* (a wrapper for `components.MultiValueRemove` from `react-select`)
|
|
47
|
-
*
|
|
48
|
-
* @param {import('react-select').MultiValueRemoveProps} props - components.MultiValueRemove props.
|
|
49
|
-
*
|
|
50
|
-
* @preserve
|
|
51
|
-
*/
|
|
52
|
-
const RSMultiValueRemove = (props) => /* @__PURE__ */ jsx(components.MultiValueRemove, { ...props });
|
|
53
|
-
/**
|
|
54
|
-
* Custom multiple value display container for CustomSelect.
|
|
55
|
-
*
|
|
56
|
-
* (a wrapper for `components.MultiValueContainer` from `react-select`)
|
|
57
|
-
*
|
|
58
|
-
* @param {import('react-select').MultiValueGenericProps} props - components.MultiValueContainer props.
|
|
59
|
-
*
|
|
60
|
-
* @preserve
|
|
61
|
-
*/
|
|
62
|
-
const RSMultiValueContainer = (props) => /* @__PURE__ */ jsx(components.MultiValueContainer, { ...props });
|
|
63
|
-
/**
|
|
64
|
-
* Custom multiple value display for CustomSelect.
|
|
65
|
-
*
|
|
66
|
-
* (a wrapper for `components.MultiValueLabel` from `react-select`)
|
|
67
|
-
*
|
|
68
|
-
* @param {import('react-select').MultiValueGenericProps} props - components.MultiValueLabel props.
|
|
69
|
-
*
|
|
70
|
-
* @preserve
|
|
71
|
-
*/
|
|
72
|
-
const RSMultiValueLabel = (props) => /* @__PURE__ */ jsx(components.MultiValueLabel, { ...props });
|
|
73
|
-
/**
|
|
74
|
-
* Default clear indicator for CustomSelect.
|
|
75
|
-
*
|
|
76
|
-
* @param {import('react-select').ClearIndicatorProps} props - components.ClearIndicator props.
|
|
77
|
-
*
|
|
78
|
-
* @preserve
|
|
79
|
-
*/
|
|
80
|
-
const RSClearIndicator = (props) => /* @__PURE__ */ jsx(components.ClearIndicator, { ...props });
|
|
81
|
-
export {
|
|
82
|
-
RSClearIndicator,
|
|
83
|
-
RSDropdownIndicator,
|
|
84
|
-
RSMultiValue,
|
|
85
|
-
RSMultiValueContainer,
|
|
86
|
-
RSMultiValueLabel,
|
|
87
|
-
RSMultiValueRemove,
|
|
88
|
-
RSOption,
|
|
89
|
-
RSSingleValue
|
|
90
|
-
};
|