@eightshift/ui-components 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button-wERNNG0T.js +185 -0
- package/dist/Collection-CKsHTyhc.js +2363 -0
- package/dist/Color-BhgbJF5x.js +2452 -0
- package/dist/ColorSwatch-Bcn6oRSg.js +64 -0
- package/dist/ComboBox-D1LPUwWP.js +1906 -0
- package/dist/Dialog-D190gMbE.js +2298 -0
- package/dist/FieldError-DeUh5Wkw.js +42 -0
- package/dist/FocusScope-C-plSxbS.js +831 -0
- package/dist/Form-Cq3fu75_.js +5 -0
- package/dist/Group-C5iZpSAM.js +48 -0
- package/dist/Heading-D-Pboe4p.js +16 -0
- package/dist/Hidden-rE6uR-lr.js +41 -0
- package/dist/Input--mF4XVE1.js +133 -0
- package/dist/Label-Fp6AwSRn.js +17 -0
- package/dist/List-CZMUbkFU.js +593 -0
- package/dist/ListBox-4oW9kh3R.js +582 -0
- package/dist/NumberFormatter-DA8u1Ot7.js +140 -0
- package/dist/OverlayArrow-BpB9uB_I.js +637 -0
- package/dist/RSPContexts-2lR5GG9p.js +14 -0
- package/dist/Select-aab027f3.esm-BKIJGje-.js +2469 -0
- package/dist/Separator-B88tj5YD.js +323 -0
- package/dist/Slider-CyJzC1bp.js +853 -0
- package/dist/Text-DRpwWot2.js +16 -0
- package/dist/VisuallyHidden-DsKYcRQ_.js +48 -0
- package/dist/_commonjsHelpers-CUmg6egw.js +6 -0
- package/dist/assets/index.css +57 -0
- package/dist/assets/style-admin.css +5864 -0
- package/dist/assets/style-editor.css +5864 -0
- package/dist/assets/style.css +5870 -0
- package/dist/assets/wp-font-enhancements.css +8 -0
- package/dist/assets/wp-ui-enhancements.css +377 -0
- package/dist/components/animated-visibility/animated-visibility.js +105 -0
- package/dist/components/base-control/base-control.js +86 -0
- package/dist/components/breakpoint-preview/breakpoint-preview.js +161 -0
- package/dist/components/button/button.js +387 -0
- package/dist/components/checkbox/checkbox.js +320 -0
- package/dist/components/color-pickers/color-picker.js +272 -0
- package/dist/components/color-pickers/color-swatch.js +59 -0
- package/dist/components/color-pickers/gradient-editor.js +534 -0
- package/dist/components/color-pickers/solid-color-picker.js +1567 -0
- package/dist/components/component-toggle/component-toggle.js +161 -0
- package/dist/components/container-panel/container-panel.js +131 -0
- package/dist/components/draggable/draggable-context.js +5 -0
- package/dist/components/draggable/draggable-handle.js +46 -0
- package/dist/components/draggable/draggable.js +6979 -0
- package/dist/components/draggable-list/draggable-list-context.js +5 -0
- package/dist/components/draggable-list/draggable-list-item.js +77 -0
- package/dist/components/draggable-list/draggable-list.js +151 -0
- package/dist/components/expandable/expandable.js +342 -0
- package/dist/components/index.js +137 -0
- package/dist/components/input-field/input-field.js +231 -0
- package/dist/components/item-collection/item-collection.js +59 -0
- package/dist/components/layout/hstack.js +30 -0
- package/dist/components/layout/vstack.js +30 -0
- package/dist/components/link-input/link-input.js +291 -0
- package/dist/components/matrix-align/matrix-align.js +134 -0
- package/dist/components/menu/menu.js +285 -0
- package/dist/components/modal/modal.js +305 -0
- package/dist/components/notice/notice.js +123 -0
- package/dist/components/number-picker/number-picker.js +292 -0
- package/dist/components/option-select/option-select.js +264 -0
- package/dist/components/options-panel/options-panel.js +158 -0
- package/dist/components/placeholders/file-placeholder.js +42 -0
- package/dist/components/placeholders/image-placeholder.js +88 -0
- package/dist/components/placeholders/media-placeholder.js +63 -0
- package/dist/components/popover/popover.js +207 -0
- package/dist/components/radio/radio.js +579 -0
- package/dist/components/repeater/repeater-context.js +5 -0
- package/dist/components/repeater/repeater-item.js +119 -0
- package/dist/components/repeater/repeater.js +280 -0
- package/dist/components/responsive/mini-responsive.js +498 -0
- package/dist/components/responsive/responsive-legacy.js +343 -0
- package/dist/components/responsive/responsive.js +583 -0
- package/dist/components/responsive-preview/responsive-preview.js +123 -0
- package/dist/components/rich-label/rich-label.js +66 -0
- package/dist/components/select/async-multi-select.js +157 -0
- package/dist/components/select/async-single-select.js +137 -0
- package/dist/components/select/custom-select-default-components.js +38 -0
- package/dist/components/select/multi-select-components.js +8 -0
- package/dist/components/select/multi-select.js +151 -0
- package/dist/components/select/react-select-component-wrappers.js +90 -0
- package/dist/components/select/shared.js +26 -0
- package/dist/components/select/single-select.js +131 -0
- package/dist/components/select/styles.js +49 -0
- package/dist/components/select/v2/async-select.js +297 -0
- package/dist/components/select/v2/shared.js +24 -0
- package/dist/components/select/v2/single-select.js +991 -0
- package/dist/components/slider/column-config-slider.js +210 -0
- package/dist/components/slider/slider.js +345 -0
- package/dist/components/slider/utils.js +94 -0
- package/dist/components/spacer/spacer.js +97 -0
- package/dist/components/tabs/tabs.js +704 -0
- package/dist/components/toggle/switch.js +156 -0
- package/dist/components/toggle/toggle.js +64 -0
- package/dist/components/toggle-button/toggle-button.js +343 -0
- package/dist/components/tooltip/tooltip.js +527 -0
- package/dist/context-BYWrbm1z.js +92 -0
- package/dist/default-i18n-CT_oS1Fy.js +922 -0
- package/dist/filterDOMProps-EDDcM64A.js +28 -0
- package/dist/icons/block-icon.js +42 -0
- package/dist/icons/generic-color-swatch.js +113 -0
- package/dist/icons/icons.js +30371 -0
- package/dist/icons/index.js +11 -0
- package/dist/icons/jsx-svg.js +50 -0
- package/dist/index-641ee5b8.esm-BPU8rMZr.js +3137 -0
- package/dist/index-CFozsmNS.js +28321 -0
- package/dist/index-wl5606BX.js +44 -0
- package/dist/index.js +139 -0
- package/dist/lite-DVmmD_-j.js +7 -0
- package/dist/modifiers.esm-BuJQPI1X.js +31 -0
- package/dist/multi-select-components-Sp-JEFEX.js +3744 -0
- package/dist/number-GajL10e1.js +36 -0
- package/dist/react-jsx-parser.min-DZCiis5V.js +11753 -0
- package/dist/react-select-async.esm-D937XTWW.js +107 -0
- package/dist/react-select.esm-Ciai3aKf.js +15 -0
- package/dist/style-admin.js +1 -0
- package/dist/style-editor.js +1 -0
- package/dist/style.js +1 -0
- package/dist/textSelection-CCcyjiRP.js +46 -0
- package/dist/useButton-BOHxkGQF.js +50 -0
- package/dist/useEvent-D5o_CqDH.js +23 -0
- package/dist/useFocusRing-nMG2uzxS.js +107 -0
- package/dist/useFormReset-DlmRL87g.js +22 -0
- package/dist/useFormValidation-D0_aaK-e.js +224 -0
- package/dist/useHover-VO5tcIli.js +890 -0
- package/dist/useLabel-BKH4fVA4.js +27 -0
- package/dist/useLabels-ntF3rFY0.js +23 -0
- package/dist/useListState-Cq2Nvr-v.js +161 -0
- package/dist/useLocalizedStringFormatter-CGzwx1a0.js +121 -0
- package/dist/useNumberField-C9dmERhP.js +1207 -0
- package/dist/useNumberFormatter-MrRLgvhj.js +13 -0
- package/dist/usePress-DjNo5790.js +677 -0
- package/dist/useSingleSelectListState--r3AAhRj.js +38 -0
- package/dist/useToggle-CQaXLe-O.js +59 -0
- package/dist/useToggleState-C3DLdez5.js +19 -0
- package/dist/utilities/array-helpers.js +56 -0
- package/dist/utilities/debounce-throttle.js +123 -0
- package/dist/utilities/es-dash.js +382 -0
- package/dist/utilities/index.js +27 -0
- package/dist/utilities/text-helpers.js +136 -0
- package/dist/utils-B94NDG0v.js +370 -0
- package/dist/wp/wp-font-enhancements.js +1 -0
- package/dist/wp/wp-ui-enhancements.js +1 -0
- package/package.json +8 -8
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import { i as $feb5ffebff200149$export$c3d8340acf92597f, j as $cc38e7bd3fc7b213$export$2bb74740c4e19def, k as $ae20dd8cbca75726$export$d6daf82dcd84e87c, l as $c5a24bc478652b5f$export$1005530eda016c13, d as $e1995378a142960e$export$18af5c7a9e9b3664 } from "./Collection-CKsHTyhc.js";
|
|
2
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-BYWrbm1z.js";
|
|
3
|
+
import React__default, { useMemo, createContext } from "react";
|
|
4
|
+
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./utils-B94NDG0v.js";
|
|
5
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
6
|
+
let $325a3faab7a68acd$var$cache = /* @__PURE__ */ new Map();
|
|
7
|
+
function $325a3faab7a68acd$export$a16aca283550c30d(options) {
|
|
8
|
+
let { locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
9
|
+
let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : "");
|
|
10
|
+
if ($325a3faab7a68acd$var$cache.has(cacheKey)) return $325a3faab7a68acd$var$cache.get(cacheKey);
|
|
11
|
+
let formatter = new Intl.Collator(locale, options);
|
|
12
|
+
$325a3faab7a68acd$var$cache.set(cacheKey, formatter);
|
|
13
|
+
return formatter;
|
|
14
|
+
}
|
|
15
|
+
class $657e4dc4a6e88df0$export$8f5ed9ff9f511381 {
|
|
16
|
+
getItemRect(key) {
|
|
17
|
+
let container = this.ref.current;
|
|
18
|
+
if (!container) return null;
|
|
19
|
+
let item = key != null ? $feb5ffebff200149$export$c3d8340acf92597f(this.ref, key) : null;
|
|
20
|
+
if (!item) return null;
|
|
21
|
+
let containerRect = container.getBoundingClientRect();
|
|
22
|
+
let itemRect = item.getBoundingClientRect();
|
|
23
|
+
return {
|
|
24
|
+
x: itemRect.left - containerRect.left + container.scrollLeft,
|
|
25
|
+
y: itemRect.top - containerRect.top + container.scrollTop,
|
|
26
|
+
width: itemRect.width,
|
|
27
|
+
height: itemRect.height
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
getContentSize() {
|
|
31
|
+
let container = this.ref.current;
|
|
32
|
+
var _container_scrollWidth, _container_scrollHeight;
|
|
33
|
+
return {
|
|
34
|
+
width: (_container_scrollWidth = container === null || container === void 0 ? void 0 : container.scrollWidth) !== null && _container_scrollWidth !== void 0 ? _container_scrollWidth : 0,
|
|
35
|
+
height: (_container_scrollHeight = container === null || container === void 0 ? void 0 : container.scrollHeight) !== null && _container_scrollHeight !== void 0 ? _container_scrollHeight : 0
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
getVisibleRect() {
|
|
39
|
+
let container = this.ref.current;
|
|
40
|
+
var _container_scrollLeft, _container_scrollTop, _container_offsetWidth, _container_offsetHeight;
|
|
41
|
+
return {
|
|
42
|
+
x: (_container_scrollLeft = container === null || container === void 0 ? void 0 : container.scrollLeft) !== null && _container_scrollLeft !== void 0 ? _container_scrollLeft : 0,
|
|
43
|
+
y: (_container_scrollTop = container === null || container === void 0 ? void 0 : container.scrollTop) !== null && _container_scrollTop !== void 0 ? _container_scrollTop : 0,
|
|
44
|
+
width: (_container_offsetWidth = container === null || container === void 0 ? void 0 : container.offsetWidth) !== null && _container_offsetWidth !== void 0 ? _container_offsetWidth : 0,
|
|
45
|
+
height: (_container_offsetHeight = container === null || container === void 0 ? void 0 : container.offsetHeight) !== null && _container_offsetHeight !== void 0 ? _container_offsetHeight : 0
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
constructor(ref) {
|
|
49
|
+
this.ref = ref;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
53
|
+
isDisabled(item) {
|
|
54
|
+
var _item_props;
|
|
55
|
+
return this.disabledBehavior === "all" && (((_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.isDisabled) || this.disabledKeys.has(item.key));
|
|
56
|
+
}
|
|
57
|
+
findNextNonDisabled(key, getNext) {
|
|
58
|
+
let nextKey = key;
|
|
59
|
+
while (nextKey != null) {
|
|
60
|
+
let item = this.collection.getItem(nextKey);
|
|
61
|
+
if ((item === null || item === void 0 ? void 0 : item.type) === "item" && !this.isDisabled(item)) return nextKey;
|
|
62
|
+
nextKey = getNext(nextKey);
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
getNextKey(key) {
|
|
67
|
+
let nextKey = key;
|
|
68
|
+
nextKey = this.collection.getKeyAfter(nextKey);
|
|
69
|
+
return this.findNextNonDisabled(nextKey, (key2) => this.collection.getKeyAfter(key2));
|
|
70
|
+
}
|
|
71
|
+
getPreviousKey(key) {
|
|
72
|
+
let nextKey = key;
|
|
73
|
+
nextKey = this.collection.getKeyBefore(nextKey);
|
|
74
|
+
return this.findNextNonDisabled(nextKey, (key2) => this.collection.getKeyBefore(key2));
|
|
75
|
+
}
|
|
76
|
+
findKey(key, nextKey, shouldSkip) {
|
|
77
|
+
let tempKey = key;
|
|
78
|
+
let itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
79
|
+
if (!itemRect || tempKey == null) return null;
|
|
80
|
+
let prevRect = itemRect;
|
|
81
|
+
do {
|
|
82
|
+
tempKey = nextKey(tempKey);
|
|
83
|
+
if (tempKey == null) break;
|
|
84
|
+
itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
85
|
+
} while (itemRect && shouldSkip(prevRect, itemRect) && tempKey != null);
|
|
86
|
+
return tempKey;
|
|
87
|
+
}
|
|
88
|
+
isSameRow(prevRect, itemRect) {
|
|
89
|
+
return prevRect.y === itemRect.y || prevRect.x !== itemRect.x;
|
|
90
|
+
}
|
|
91
|
+
isSameColumn(prevRect, itemRect) {
|
|
92
|
+
return prevRect.x === itemRect.x || prevRect.y !== itemRect.y;
|
|
93
|
+
}
|
|
94
|
+
getKeyBelow(key) {
|
|
95
|
+
if (this.layout === "grid" && this.orientation === "vertical") return this.findKey(key, (key2) => this.getNextKey(key2), this.isSameRow);
|
|
96
|
+
else return this.getNextKey(key);
|
|
97
|
+
}
|
|
98
|
+
getKeyAbove(key) {
|
|
99
|
+
if (this.layout === "grid" && this.orientation === "vertical") return this.findKey(key, (key2) => this.getPreviousKey(key2), this.isSameRow);
|
|
100
|
+
else return this.getPreviousKey(key);
|
|
101
|
+
}
|
|
102
|
+
getNextColumn(key, right) {
|
|
103
|
+
return right ? this.getPreviousKey(key) : this.getNextKey(key);
|
|
104
|
+
}
|
|
105
|
+
getKeyRightOf(key) {
|
|
106
|
+
let layoutDelegateMethod = this.direction === "ltr" ? "getKeyRightOf" : "getKeyLeftOf";
|
|
107
|
+
if (this.layoutDelegate[layoutDelegateMethod]) {
|
|
108
|
+
key = this.layoutDelegate[layoutDelegateMethod](key);
|
|
109
|
+
return this.findNextNonDisabled(key, (key2) => this.layoutDelegate[layoutDelegateMethod](key2));
|
|
110
|
+
}
|
|
111
|
+
if (this.layout === "grid") {
|
|
112
|
+
if (this.orientation === "vertical") return this.getNextColumn(key, this.direction === "rtl");
|
|
113
|
+
else return this.findKey(key, (key2) => this.getNextColumn(key2, this.direction === "rtl"), this.isSameColumn);
|
|
114
|
+
} else if (this.orientation === "horizontal") return this.getNextColumn(key, this.direction === "rtl");
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
getKeyLeftOf(key) {
|
|
118
|
+
let layoutDelegateMethod = this.direction === "ltr" ? "getKeyLeftOf" : "getKeyRightOf";
|
|
119
|
+
if (this.layoutDelegate[layoutDelegateMethod]) {
|
|
120
|
+
key = this.layoutDelegate[layoutDelegateMethod](key);
|
|
121
|
+
return this.findNextNonDisabled(key, (key2) => this.layoutDelegate[layoutDelegateMethod](key2));
|
|
122
|
+
}
|
|
123
|
+
if (this.layout === "grid") {
|
|
124
|
+
if (this.orientation === "vertical") return this.getNextColumn(key, this.direction === "ltr");
|
|
125
|
+
else return this.findKey(key, (key2) => this.getNextColumn(key2, this.direction === "ltr"), this.isSameColumn);
|
|
126
|
+
} else if (this.orientation === "horizontal") return this.getNextColumn(key, this.direction === "ltr");
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
getFirstKey() {
|
|
130
|
+
let key = this.collection.getFirstKey();
|
|
131
|
+
return this.findNextNonDisabled(key, (key2) => this.collection.getKeyAfter(key2));
|
|
132
|
+
}
|
|
133
|
+
getLastKey() {
|
|
134
|
+
let key = this.collection.getLastKey();
|
|
135
|
+
return this.findNextNonDisabled(key, (key2) => this.collection.getKeyBefore(key2));
|
|
136
|
+
}
|
|
137
|
+
getKeyPageAbove(key) {
|
|
138
|
+
let menu = this.ref.current;
|
|
139
|
+
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
140
|
+
if (!itemRect) return null;
|
|
141
|
+
if (menu && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(menu)) return this.getFirstKey();
|
|
142
|
+
let nextKey = key;
|
|
143
|
+
if (this.orientation === "horizontal") {
|
|
144
|
+
let pageX = Math.max(0, itemRect.x + itemRect.width - this.layoutDelegate.getVisibleRect().width);
|
|
145
|
+
while (itemRect && itemRect.x > pageX && nextKey != null) {
|
|
146
|
+
nextKey = this.getKeyAbove(nextKey);
|
|
147
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
148
|
+
}
|
|
149
|
+
} else {
|
|
150
|
+
let pageY = Math.max(0, itemRect.y + itemRect.height - this.layoutDelegate.getVisibleRect().height);
|
|
151
|
+
while (itemRect && itemRect.y > pageY && nextKey != null) {
|
|
152
|
+
nextKey = this.getKeyAbove(nextKey);
|
|
153
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return nextKey !== null && nextKey !== void 0 ? nextKey : this.getFirstKey();
|
|
157
|
+
}
|
|
158
|
+
getKeyPageBelow(key) {
|
|
159
|
+
let menu = this.ref.current;
|
|
160
|
+
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
161
|
+
if (!itemRect) return null;
|
|
162
|
+
if (menu && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(menu)) return this.getLastKey();
|
|
163
|
+
let nextKey = key;
|
|
164
|
+
if (this.orientation === "horizontal") {
|
|
165
|
+
let pageX = Math.min(this.layoutDelegate.getContentSize().width, itemRect.y - itemRect.width + this.layoutDelegate.getVisibleRect().width);
|
|
166
|
+
while (itemRect && itemRect.x < pageX && nextKey != null) {
|
|
167
|
+
nextKey = this.getKeyBelow(nextKey);
|
|
168
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
169
|
+
}
|
|
170
|
+
} else {
|
|
171
|
+
let pageY = Math.min(this.layoutDelegate.getContentSize().height, itemRect.y - itemRect.height + this.layoutDelegate.getVisibleRect().height);
|
|
172
|
+
while (itemRect && itemRect.y < pageY && nextKey != null) {
|
|
173
|
+
nextKey = this.getKeyBelow(nextKey);
|
|
174
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return nextKey !== null && nextKey !== void 0 ? nextKey : this.getLastKey();
|
|
178
|
+
}
|
|
179
|
+
getKeyForSearch(search, fromKey) {
|
|
180
|
+
if (!this.collator) return null;
|
|
181
|
+
let collection = this.collection;
|
|
182
|
+
let key = fromKey || this.getFirstKey();
|
|
183
|
+
while (key != null) {
|
|
184
|
+
let item = collection.getItem(key);
|
|
185
|
+
if (!item) return null;
|
|
186
|
+
let substring = item.textValue.slice(0, search.length);
|
|
187
|
+
if (item.textValue && this.collator.compare(substring, search) === 0) return key;
|
|
188
|
+
key = this.getNextKey(key);
|
|
189
|
+
}
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
constructor(...args) {
|
|
193
|
+
if (args.length === 1) {
|
|
194
|
+
let opts = args[0];
|
|
195
|
+
this.collection = opts.collection;
|
|
196
|
+
this.ref = opts.ref;
|
|
197
|
+
this.collator = opts.collator;
|
|
198
|
+
this.disabledKeys = opts.disabledKeys || /* @__PURE__ */ new Set();
|
|
199
|
+
this.disabledBehavior = opts.disabledBehavior || "all";
|
|
200
|
+
this.orientation = opts.orientation || "vertical";
|
|
201
|
+
this.direction = opts.direction;
|
|
202
|
+
this.layout = opts.layout || "stack";
|
|
203
|
+
this.layoutDelegate = opts.layoutDelegate || new $657e4dc4a6e88df0$export$8f5ed9ff9f511381(opts.ref);
|
|
204
|
+
} else {
|
|
205
|
+
this.collection = args[0];
|
|
206
|
+
this.disabledKeys = args[1];
|
|
207
|
+
this.ref = args[2];
|
|
208
|
+
this.collator = args[3];
|
|
209
|
+
this.layout = "stack";
|
|
210
|
+
this.orientation = "vertical";
|
|
211
|
+
this.disabledBehavior = "all";
|
|
212
|
+
this.layoutDelegate = new $657e4dc4a6e88df0$export$8f5ed9ff9f511381(this.ref);
|
|
213
|
+
}
|
|
214
|
+
if (this.layout === "stack" && this.orientation === "vertical") {
|
|
215
|
+
this.getKeyLeftOf = void 0;
|
|
216
|
+
this.getKeyRightOf = void 0;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function $982254629710d113$export$b95089534ab7c1fd(props) {
|
|
221
|
+
let { selectionManager, collection, disabledKeys, ref, keyboardDelegate, layoutDelegate } = props;
|
|
222
|
+
let collator = $325a3faab7a68acd$export$a16aca283550c30d({
|
|
223
|
+
usage: "search",
|
|
224
|
+
sensitivity: "base"
|
|
225
|
+
});
|
|
226
|
+
let disabledBehavior = selectionManager.disabledBehavior;
|
|
227
|
+
let delegate = useMemo(() => keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a({
|
|
228
|
+
collection,
|
|
229
|
+
disabledKeys,
|
|
230
|
+
disabledBehavior,
|
|
231
|
+
ref,
|
|
232
|
+
collator,
|
|
233
|
+
layoutDelegate
|
|
234
|
+
}), [
|
|
235
|
+
keyboardDelegate,
|
|
236
|
+
layoutDelegate,
|
|
237
|
+
collection,
|
|
238
|
+
disabledKeys,
|
|
239
|
+
ref,
|
|
240
|
+
collator,
|
|
241
|
+
disabledBehavior
|
|
242
|
+
]);
|
|
243
|
+
let { collectionProps } = $ae20dd8cbca75726$export$d6daf82dcd84e87c({
|
|
244
|
+
...props,
|
|
245
|
+
ref,
|
|
246
|
+
selectionManager,
|
|
247
|
+
keyboardDelegate: delegate
|
|
248
|
+
});
|
|
249
|
+
return {
|
|
250
|
+
listProps: collectionProps
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
const $453cc9f0df89c0a5$var$cache = /* @__PURE__ */ new WeakMap();
|
|
254
|
+
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
|
|
255
|
+
let count = $453cc9f0df89c0a5$var$cache.get(collection);
|
|
256
|
+
if (count != null) return count;
|
|
257
|
+
let counter = 0;
|
|
258
|
+
let countItems = (items) => {
|
|
259
|
+
for (let item of items) if (item.type === "section") countItems($c5a24bc478652b5f$export$1005530eda016c13(item, collection));
|
|
260
|
+
else counter++;
|
|
261
|
+
};
|
|
262
|
+
countItems(collection);
|
|
263
|
+
$453cc9f0df89c0a5$var$cache.set(collection, counter);
|
|
264
|
+
return counter;
|
|
265
|
+
}
|
|
266
|
+
function $f4b273590fab9f93$export$52210f68a14655d0(props) {
|
|
267
|
+
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
268
|
+
labelable: true
|
|
269
|
+
});
|
|
270
|
+
let ariaOrientation;
|
|
271
|
+
if (props.orientation === "vertical") ariaOrientation = "vertical";
|
|
272
|
+
if (props.elementType !== "hr") return {
|
|
273
|
+
separatorProps: {
|
|
274
|
+
...domProps,
|
|
275
|
+
role: "separator",
|
|
276
|
+
"aria-orientation": ariaOrientation
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
return {
|
|
280
|
+
separatorProps: domProps
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
const $d2f53cda644affe3$export$65d2a03b8800d6e3 = /* @__PURE__ */ createContext(null);
|
|
284
|
+
const $72a5793c14baf454$export$e0e4026c12a8bdbb = /* @__PURE__ */ createContext({});
|
|
285
|
+
const $72a5793c14baf454$export$8b251419efc915eb = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664("header", function Header(props, ref) {
|
|
286
|
+
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $72a5793c14baf454$export$e0e4026c12a8bdbb);
|
|
287
|
+
return /* @__PURE__ */ React__default.createElement("header", {
|
|
288
|
+
className: "react-aria-Header",
|
|
289
|
+
...props,
|
|
290
|
+
ref
|
|
291
|
+
}, props.children);
|
|
292
|
+
});
|
|
293
|
+
const $431f98aba6844401$export$6615d83f6de245ce = /* @__PURE__ */ createContext({});
|
|
294
|
+
const $431f98aba6844401$export$1ff3c3f08ae963c0 = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664("separator", function Separator(props, ref) {
|
|
295
|
+
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $431f98aba6844401$export$6615d83f6de245ce);
|
|
296
|
+
let { elementType, orientation, style, className, slot, ...otherProps } = props;
|
|
297
|
+
let Element = elementType || "hr";
|
|
298
|
+
if (Element === "hr" && orientation === "vertical") Element = "div";
|
|
299
|
+
let { separatorProps } = $f4b273590fab9f93$export$52210f68a14655d0({
|
|
300
|
+
...otherProps,
|
|
301
|
+
elementType,
|
|
302
|
+
orientation
|
|
303
|
+
});
|
|
304
|
+
return /* @__PURE__ */ React__default.createElement(Element, {
|
|
305
|
+
...$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props),
|
|
306
|
+
...separatorProps,
|
|
307
|
+
style,
|
|
308
|
+
className: className !== null && className !== void 0 ? className : "react-aria-Separator",
|
|
309
|
+
ref,
|
|
310
|
+
slot: slot || void 0
|
|
311
|
+
});
|
|
312
|
+
});
|
|
313
|
+
export {
|
|
314
|
+
$72a5793c14baf454$export$8b251419efc915eb as $,
|
|
315
|
+
$431f98aba6844401$export$1ff3c3f08ae963c0 as a,
|
|
316
|
+
$982254629710d113$export$b95089534ab7c1fd as b,
|
|
317
|
+
$453cc9f0df89c0a5$export$77d5aafae4e095b2 as c,
|
|
318
|
+
$d2f53cda644affe3$export$65d2a03b8800d6e3 as d,
|
|
319
|
+
$325a3faab7a68acd$export$a16aca283550c30d as e,
|
|
320
|
+
$2a25aae57d74318e$export$a05409b8bb224a5a as f,
|
|
321
|
+
$431f98aba6844401$export$6615d83f6de245ce as g,
|
|
322
|
+
$72a5793c14baf454$export$e0e4026c12a8bdbb as h
|
|
323
|
+
};
|