@phillips/seldon 1.119.0 → 1.121.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/_virtual/_commonjsHelpers.js +1 -1
- package/dist/components/Accordion/Accordion.js +18 -18
- package/dist/components/Accordion/AccordionItem.js +67 -68
- package/dist/components/Carousel/Carousel.js +49 -51
- package/dist/components/Carousel/CarouselDots.js +46 -47
- package/dist/components/ContentPeek/ContentPeek.js +47 -47
- package/dist/components/ErrorBoundary/ErrorBoundary.js +11 -12
- package/dist/components/Filter/Filter.js +40 -41
- package/dist/components/Filter/FilterHeader.js +24 -24
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +21 -20
- package/dist/components/Input/Input.stories.d.ts +7 -0
- package/dist/components/Link/utils.js +2 -2
- package/dist/components/LinkBlock/LinkBlock.js +12 -13
- package/dist/components/LinkList/LinkList.js +8 -11
- package/dist/components/Navigation/Navigation.js +21 -22
- package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +48 -50
- package/dist/components/Navigation/NavigationList/NavigationList.js +33 -35
- package/dist/components/Pagination/Pagination.js +7 -7
- package/dist/components/Pagination/utils.js +1 -1
- package/dist/components/PinchZoom/PinchZoom.js +40 -43
- package/dist/components/Search/Search.js +94 -98
- package/dist/components/Search/SearchButton.js +19 -19
- package/dist/components/SeldonImage/SeldonImage.js +1 -1
- package/dist/components/Select/Select.js +22 -14
- package/dist/components/Select/Select.stories.d.ts +15 -0
- package/dist/components/Tabs/TabTrigger.js +13 -13
- package/dist/node_modules/@artsy/fresnel/dist/Breakpoints.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/DynamicResponsive.js +1 -1
- package/dist/node_modules/@artsy/fresnel/dist/Interactions.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/Media.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/MediaQueries.js +1 -1
- package/dist/node_modules/@artsy/fresnel/dist/Utils.js +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +2 -2
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +2 -2
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +5 -5
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +63 -67
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +35 -35
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +79 -83
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.js +5 -5
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js +43 -45
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +10 -10
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +113 -115
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +33 -37
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +422 -439
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context/dist/index.js +39 -41
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +7 -10
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +1 -1
- package/dist/node_modules/change-case/dist/index.js +41 -44
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +11 -11
- package/dist/node_modules/date-fns/differenceInDays.js +9 -9
- package/dist/node_modules/date-fns/differenceInHours.js +11 -11
- package/dist/node_modules/date-fns/differenceInMinutes.js +8 -8
- package/dist/node_modules/date-fns/differenceInSeconds.js +7 -7
- package/dist/node_modules/date-fns/formatDuration.js +11 -12
- package/dist/node_modules/date-fns/isSameWeek.js +8 -8
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +12 -12
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +3 -3
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +5 -5
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/localize.js +10 -10
- package/dist/node_modules/date-fns/startOfDay.js +6 -6
- package/dist/node_modules/date-fns/startOfWeek.js +7 -8
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1 -1
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +1 -1
- package/dist/node_modules/exenv/index.js +2 -2
- package/dist/node_modules/get-nonce/dist/es2015/index.js +1 -1
- package/dist/node_modules/prop-types/checkPropTypes.js +2 -2
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +3 -3
- package/dist/node_modules/react-intersection-observer/dist/index.js +2 -2
- package/dist/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js +1 -1
- package/dist/node_modules/react-modal/lib/components/ModalPortal.js +1 -1
- package/dist/node_modules/react-modal/lib/helpers/scopeTab.js +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +1 -1
- package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
- package/dist/node_modules/react-zoom-pan-pinch/dist/index.esm.js +14 -14
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +1 -1
- package/dist/node_modules/usehooks-ts/dist/index.js +1 -1
- package/dist/node_modules/warning/warning.js +1 -1
- package/dist/node_modules/wheel-gestures/dist/wheel-gestures.esm.js +1 -1
- package/dist/patterns/BidSnapshot/BidSnapshot.js +58 -58
- package/dist/patterns/DetailList/DetailList.js +22 -22
- package/dist/patterns/FilterMenu/FilterMenu.js +15 -15
- package/dist/patterns/LanguageSelector/LanguageSelector.js +23 -23
- package/dist/patterns/LanguageSelector/utils.js +2 -5
- package/dist/patterns/ObjectTile/ObjectTile.d.ts +4 -0
- package/dist/patterns/ObjectTile/ObjectTile.js +50 -48
- package/dist/patterns/ObjectTile/ObjectTile.stories.d.ts +2 -0
- package/dist/patterns/ViewingsList/StatefulViewingsList.js +16 -16
- package/dist/patterns/ViewingsList/ViewingsList.js +42 -42
- package/dist/patterns/ViewingsList/ViewingsListCard.js +122 -123
- package/dist/patterns/ViewingsList/ViewingsListCardForm.js +170 -170
- package/dist/scss/patterns/ObjectTile/_objectTile.scss +17 -1
- package/dist/site-furniture/Header/Header.js +32 -32
- package/package.json +2 -1
|
@@ -3,81 +3,81 @@ import * as be from "react-dom";
|
|
|
3
3
|
import { clamp as Ee } from "../../number/dist/index.js";
|
|
4
4
|
import { composeEventHandlers as b } from "../../primitive/dist/index.js";
|
|
5
5
|
import { createCollection as tt } from "../../react-collection/dist/index.js";
|
|
6
|
-
import { useComposedRefs as
|
|
6
|
+
import { useComposedRefs as k } from "../../react-compose-refs/dist/index.js";
|
|
7
7
|
import { createContextScope as ot } from "../../react-context/dist/index.js";
|
|
8
8
|
import { useDirection as nt } from "../../react-direction/dist/index.js";
|
|
9
9
|
import { DismissableLayer as rt } from "../../react-dismissable-layer/dist/index.js";
|
|
10
|
-
import { useFocusGuards as
|
|
11
|
-
import { FocusScope as
|
|
10
|
+
import { useFocusGuards as lt } from "../../react-focus-guards/dist/index.js";
|
|
11
|
+
import { FocusScope as st } from "../../react-focus-scope/dist/index.js";
|
|
12
12
|
import { useId as Ie } from "../../react-id/dist/index.js";
|
|
13
|
-
import { createPopperScope as
|
|
13
|
+
import { createPopperScope as Ne, Anchor as ct, Content as it, Arrow as at, Root as dt } from "../../react-popper/dist/index.js";
|
|
14
14
|
import { Portal as ut } from "../../react-portal/dist/index.js";
|
|
15
|
-
import { Primitive as
|
|
15
|
+
import { Primitive as O } from "../../react-primitive/dist/index.js";
|
|
16
16
|
import { Slot as pt } from "../../react-slot/dist/index.js";
|
|
17
17
|
import { useCallbackRef as ft } from "../../react-use-callback-ref/dist/index.js";
|
|
18
18
|
import { useControllableState as Re } from "../../react-use-controllable-state/dist/index.js";
|
|
19
|
-
import { useLayoutEffect as
|
|
19
|
+
import { useLayoutEffect as K } from "../../react-use-layout-effect/dist/index.js";
|
|
20
20
|
import { usePrevious as mt } from "../../react-use-previous/dist/index.js";
|
|
21
21
|
import { VisuallyHidden as ht } from "../../react-visually-hidden/dist/index.js";
|
|
22
22
|
import { hideOthers as vt } from "../../../aria-hidden/dist/es2015/index.js";
|
|
23
23
|
import gt from "../node_modules/react-remove-scroll/dist/es2015/Combination.js";
|
|
24
|
-
import { jsx as
|
|
24
|
+
import { jsx as d, Fragment as Te, jsxs as ce } from "react/jsx-runtime";
|
|
25
25
|
var St = [" ", "Enter", "ArrowUp", "ArrowDown"], wt = [" ", "Enter"], re = "Select", [ae, de, Ct] = tt(re), [ee, io] = ot(re, [
|
|
26
26
|
Ct,
|
|
27
|
-
|
|
28
|
-
]), ue =
|
|
27
|
+
Ne
|
|
28
|
+
]), ue = Ne(), [xt, G] = ee(re), [yt, It] = ee(re), _e = (o) => {
|
|
29
29
|
const {
|
|
30
30
|
__scopeSelect: i,
|
|
31
31
|
children: e,
|
|
32
32
|
open: c,
|
|
33
|
-
defaultOpen:
|
|
33
|
+
defaultOpen: r,
|
|
34
34
|
onOpenChange: a,
|
|
35
|
-
value:
|
|
36
|
-
defaultValue:
|
|
37
|
-
onValueChange:
|
|
38
|
-
dir:
|
|
39
|
-
name:
|
|
40
|
-
autoComplete:
|
|
35
|
+
value: n,
|
|
36
|
+
defaultValue: l,
|
|
37
|
+
onValueChange: s,
|
|
38
|
+
dir: p,
|
|
39
|
+
name: g,
|
|
40
|
+
autoComplete: w,
|
|
41
41
|
disabled: E,
|
|
42
|
-
required:
|
|
43
|
-
} =
|
|
42
|
+
required: I
|
|
43
|
+
} = o, f = ue(i), [h, C] = t.useState(null), [m, v] = t.useState(null), [y, H] = t.useState(!1), A = nt(p), [te = !1, N] = Re({
|
|
44
44
|
prop: c,
|
|
45
|
-
defaultProp: l,
|
|
46
|
-
onChange: a
|
|
47
|
-
}), [M, q] = Re({
|
|
48
|
-
prop: s,
|
|
49
45
|
defaultProp: r,
|
|
50
|
-
onChange:
|
|
51
|
-
}),
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
onChange: a
|
|
47
|
+
}), [M, j] = Re({
|
|
48
|
+
prop: n,
|
|
49
|
+
defaultProp: l,
|
|
50
|
+
onChange: s
|
|
51
|
+
}), $ = t.useRef(null), Y = h ? !!h.closest("form") : !0, [D, W] = t.useState(/* @__PURE__ */ new Set()), F = Array.from(D).map((R) => R.props.value).join(";");
|
|
52
|
+
return /* @__PURE__ */ d(dt, { ...f, children: /* @__PURE__ */ ce(
|
|
53
|
+
xt,
|
|
54
54
|
{
|
|
55
|
-
required:
|
|
55
|
+
required: I,
|
|
56
56
|
scope: i,
|
|
57
|
-
trigger:
|
|
58
|
-
onTriggerChange:
|
|
59
|
-
valueNode:
|
|
60
|
-
onValueNodeChange:
|
|
61
|
-
valueNodeHasChildren:
|
|
62
|
-
onValueNodeHasChildrenChange:
|
|
57
|
+
trigger: h,
|
|
58
|
+
onTriggerChange: C,
|
|
59
|
+
valueNode: m,
|
|
60
|
+
onValueNodeChange: v,
|
|
61
|
+
valueNodeHasChildren: y,
|
|
62
|
+
onValueNodeHasChildrenChange: H,
|
|
63
63
|
contentId: Ie(),
|
|
64
64
|
value: M,
|
|
65
|
-
onValueChange:
|
|
65
|
+
onValueChange: j,
|
|
66
66
|
open: te,
|
|
67
|
-
onOpenChange:
|
|
68
|
-
dir:
|
|
67
|
+
onOpenChange: N,
|
|
68
|
+
dir: A,
|
|
69
69
|
triggerPointerDownPosRef: $,
|
|
70
70
|
disabled: E,
|
|
71
71
|
children: [
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
|
|
72
|
+
/* @__PURE__ */ d(ae.Provider, { scope: i, children: /* @__PURE__ */ d(
|
|
73
|
+
yt,
|
|
74
74
|
{
|
|
75
|
-
scope:
|
|
75
|
+
scope: o.__scopeSelect,
|
|
76
76
|
onNativeOptionAdd: t.useCallback((R) => {
|
|
77
|
-
|
|
77
|
+
W((L) => new Set(L).add(R));
|
|
78
78
|
}, []),
|
|
79
79
|
onNativeOptionRemove: t.useCallback((R) => {
|
|
80
|
-
|
|
80
|
+
W((L) => {
|
|
81
81
|
const V = new Set(L);
|
|
82
82
|
return V.delete(R), V;
|
|
83
83
|
});
|
|
@@ -85,212 +85,211 @@ var St = [" ", "Enter", "ArrowUp", "ArrowDown"], wt = [" ", "Enter"], re = "Sele
|
|
|
85
85
|
children: e
|
|
86
86
|
}
|
|
87
87
|
) }),
|
|
88
|
-
|
|
88
|
+
Y ? /* @__PURE__ */ ce(
|
|
89
89
|
Je,
|
|
90
90
|
{
|
|
91
91
|
"aria-hidden": !0,
|
|
92
|
-
required:
|
|
92
|
+
required: I,
|
|
93
93
|
tabIndex: -1,
|
|
94
|
-
name:
|
|
95
|
-
autoComplete:
|
|
94
|
+
name: g,
|
|
95
|
+
autoComplete: w,
|
|
96
96
|
value: M,
|
|
97
|
-
onChange: (R) =>
|
|
97
|
+
onChange: (R) => j(R.target.value),
|
|
98
98
|
disabled: E,
|
|
99
99
|
children: [
|
|
100
|
-
M === void 0 ? /* @__PURE__ */
|
|
100
|
+
M === void 0 ? /* @__PURE__ */ d("option", { value: "" }) : null,
|
|
101
101
|
Array.from(D)
|
|
102
102
|
]
|
|
103
103
|
},
|
|
104
|
-
|
|
104
|
+
F
|
|
105
105
|
) : null
|
|
106
106
|
]
|
|
107
107
|
}
|
|
108
108
|
) });
|
|
109
109
|
};
|
|
110
|
-
|
|
111
|
-
var Me = "SelectTrigger",
|
|
112
|
-
(
|
|
113
|
-
const { __scopeSelect: e, disabled: c = !1, ...
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
}),
|
|
117
|
-
|
|
110
|
+
_e.displayName = re;
|
|
111
|
+
var Me = "SelectTrigger", Oe = t.forwardRef(
|
|
112
|
+
(o, i) => {
|
|
113
|
+
const { __scopeSelect: e, disabled: c = !1, ...r } = o, a = ue(e), n = G(Me, e), l = n.disabled || c, s = k(i, n.onTriggerChange), p = de(e), [g, w, E] = Qe((f) => {
|
|
114
|
+
const h = p().filter((v) => !v.disabled), C = h.find((v) => v.value === n.value), m = et(h, f, C);
|
|
115
|
+
m !== void 0 && n.onValueChange(m.value);
|
|
116
|
+
}), I = () => {
|
|
117
|
+
l || (n.onOpenChange(!0), E());
|
|
118
118
|
};
|
|
119
|
-
return /* @__PURE__ */
|
|
120
|
-
|
|
119
|
+
return /* @__PURE__ */ d(ct, { asChild: !0, ...a, children: /* @__PURE__ */ d(
|
|
120
|
+
O.button,
|
|
121
121
|
{
|
|
122
122
|
type: "button",
|
|
123
123
|
role: "combobox",
|
|
124
|
-
"aria-controls":
|
|
125
|
-
"aria-expanded":
|
|
126
|
-
"aria-required":
|
|
124
|
+
"aria-controls": n.contentId,
|
|
125
|
+
"aria-expanded": n.open,
|
|
126
|
+
"aria-required": n.required,
|
|
127
127
|
"aria-autocomplete": "none",
|
|
128
|
-
dir:
|
|
129
|
-
"data-state":
|
|
130
|
-
disabled:
|
|
131
|
-
"data-disabled":
|
|
132
|
-
"data-placeholder": $e(
|
|
133
|
-
...
|
|
134
|
-
ref:
|
|
135
|
-
onClick: b(
|
|
136
|
-
|
|
128
|
+
dir: n.dir,
|
|
129
|
+
"data-state": n.open ? "open" : "closed",
|
|
130
|
+
disabled: l,
|
|
131
|
+
"data-disabled": l ? "" : void 0,
|
|
132
|
+
"data-placeholder": $e(n.value) ? "" : void 0,
|
|
133
|
+
...r,
|
|
134
|
+
ref: s,
|
|
135
|
+
onClick: b(r.onClick, (f) => {
|
|
136
|
+
f.currentTarget.focus();
|
|
137
137
|
}),
|
|
138
|
-
onPointerDown: b(
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
x: Math.round(
|
|
142
|
-
y: Math.round(
|
|
143
|
-
},
|
|
138
|
+
onPointerDown: b(r.onPointerDown, (f) => {
|
|
139
|
+
const h = f.target;
|
|
140
|
+
h.hasPointerCapture(f.pointerId) && h.releasePointerCapture(f.pointerId), f.button === 0 && f.ctrlKey === !1 && (I(), n.triggerPointerDownPosRef.current = {
|
|
141
|
+
x: Math.round(f.pageX),
|
|
142
|
+
y: Math.round(f.pageY)
|
|
143
|
+
}, f.preventDefault());
|
|
144
144
|
}),
|
|
145
|
-
onKeyDown: b(
|
|
146
|
-
const
|
|
147
|
-
!(
|
|
145
|
+
onKeyDown: b(r.onKeyDown, (f) => {
|
|
146
|
+
const h = g.current !== "";
|
|
147
|
+
!(f.ctrlKey || f.altKey || f.metaKey) && f.key.length === 1 && w(f.key), !(h && f.key === " ") && St.includes(f.key) && (I(), f.preventDefault());
|
|
148
148
|
})
|
|
149
149
|
}
|
|
150
150
|
) });
|
|
151
151
|
}
|
|
152
152
|
);
|
|
153
|
-
|
|
154
|
-
var
|
|
155
|
-
(
|
|
156
|
-
const { __scopeSelect: e, className: c, style:
|
|
157
|
-
return
|
|
158
|
-
|
|
159
|
-
}, [
|
|
160
|
-
|
|
153
|
+
Oe.displayName = Me;
|
|
154
|
+
var Ae = "SelectValue", De = t.forwardRef(
|
|
155
|
+
(o, i) => {
|
|
156
|
+
const { __scopeSelect: e, className: c, style: r, children: a, placeholder: n = "", ...l } = o, s = G(Ae, e), { onValueNodeHasChildrenChange: p } = s, g = a !== void 0, w = k(i, s.onValueNodeChange);
|
|
157
|
+
return K(() => {
|
|
158
|
+
p(g);
|
|
159
|
+
}, [p, g]), /* @__PURE__ */ d(
|
|
160
|
+
O.span,
|
|
161
161
|
{
|
|
162
|
-
...
|
|
163
|
-
ref:
|
|
162
|
+
...l,
|
|
163
|
+
ref: w,
|
|
164
164
|
style: { pointerEvents: "none" },
|
|
165
|
-
children: $e(
|
|
165
|
+
children: $e(s.value) ? /* @__PURE__ */ d(Te, { children: n }) : a
|
|
166
166
|
}
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
169
|
);
|
|
170
|
-
De.displayName =
|
|
170
|
+
De.displayName = Ae;
|
|
171
171
|
var Tt = "SelectIcon", Le = t.forwardRef(
|
|
172
|
-
(
|
|
173
|
-
const { __scopeSelect: e, children: c, ...
|
|
174
|
-
return /* @__PURE__ */
|
|
172
|
+
(o, i) => {
|
|
173
|
+
const { __scopeSelect: e, children: c, ...r } = o;
|
|
174
|
+
return /* @__PURE__ */ d(O.span, { "aria-hidden": !0, ...r, ref: i, children: c || "▼" });
|
|
175
175
|
}
|
|
176
176
|
);
|
|
177
177
|
Le.displayName = Tt;
|
|
178
|
-
var Pt = "SelectPortal", ke = (
|
|
178
|
+
var Pt = "SelectPortal", ke = (o) => /* @__PURE__ */ d(ut, { asChild: !0, ...o });
|
|
179
179
|
ke.displayName = Pt;
|
|
180
|
-
var Z = "SelectContent",
|
|
181
|
-
(
|
|
182
|
-
const e =
|
|
183
|
-
if (
|
|
184
|
-
|
|
180
|
+
var Z = "SelectContent", Ve = t.forwardRef(
|
|
181
|
+
(o, i) => {
|
|
182
|
+
const e = G(Z, o.__scopeSelect), [c, r] = t.useState();
|
|
183
|
+
if (K(() => {
|
|
184
|
+
r(new DocumentFragment());
|
|
185
185
|
}, []), !e.open) {
|
|
186
186
|
const a = c;
|
|
187
187
|
return a ? be.createPortal(
|
|
188
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ d(Be, { scope: o.__scopeSelect, children: /* @__PURE__ */ d(ae.Slot, { scope: o.__scopeSelect, children: /* @__PURE__ */ d("div", { children: o.children }) }) }),
|
|
189
189
|
a
|
|
190
190
|
) : null;
|
|
191
191
|
}
|
|
192
|
-
return /* @__PURE__ */
|
|
192
|
+
return /* @__PURE__ */ d(He, { ...o, ref: i });
|
|
193
193
|
}
|
|
194
194
|
);
|
|
195
|
-
|
|
196
|
-
var
|
|
197
|
-
(
|
|
195
|
+
Ve.displayName = Z;
|
|
196
|
+
var B = 10, [Be, z] = ee(Z), Et = "SelectContentImpl", He = t.forwardRef(
|
|
197
|
+
(o, i) => {
|
|
198
198
|
const {
|
|
199
199
|
__scopeSelect: e,
|
|
200
200
|
position: c = "item-aligned",
|
|
201
|
-
onCloseAutoFocus:
|
|
201
|
+
onCloseAutoFocus: r,
|
|
202
202
|
onEscapeKeyDown: a,
|
|
203
|
-
onPointerDownOutside:
|
|
203
|
+
onPointerDownOutside: n,
|
|
204
204
|
//
|
|
205
205
|
// PopperContent props
|
|
206
|
-
side:
|
|
207
|
-
sideOffset:
|
|
208
|
-
align:
|
|
209
|
-
alignOffset:
|
|
210
|
-
arrowPadding:
|
|
206
|
+
side: l,
|
|
207
|
+
sideOffset: s,
|
|
208
|
+
align: p,
|
|
209
|
+
alignOffset: g,
|
|
210
|
+
arrowPadding: w,
|
|
211
211
|
collisionBoundary: E,
|
|
212
|
-
collisionPadding:
|
|
213
|
-
sticky:
|
|
214
|
-
hideWhenDetached:
|
|
215
|
-
avoidCollisions:
|
|
212
|
+
collisionPadding: I,
|
|
213
|
+
sticky: f,
|
|
214
|
+
hideWhenDetached: h,
|
|
215
|
+
avoidCollisions: C,
|
|
216
216
|
//
|
|
217
|
-
...
|
|
218
|
-
} =
|
|
217
|
+
...m
|
|
218
|
+
} = o, v = G(Z, e), [y, H] = t.useState(null), [A, te] = t.useState(null), N = k(i, (u) => H(u)), [M, j] = t.useState(null), [$, Y] = t.useState(
|
|
219
219
|
null
|
|
220
|
-
), D = de(e), [
|
|
220
|
+
), D = de(e), [W, F] = t.useState(!1), R = t.useRef(!1);
|
|
221
221
|
t.useEffect(() => {
|
|
222
|
-
if (
|
|
223
|
-
}, [
|
|
222
|
+
if (y) return vt(y);
|
|
223
|
+
}, [y]), lt();
|
|
224
224
|
const L = t.useCallback(
|
|
225
|
-
(
|
|
226
|
-
const [T, ...
|
|
227
|
-
for (const
|
|
228
|
-
if (
|
|
225
|
+
(u) => {
|
|
226
|
+
const [T, ..._] = D().map((P) => P.ref.current), [S] = _.slice(-1), x = document.activeElement;
|
|
227
|
+
for (const P of u)
|
|
228
|
+
if (P === x || (P?.scrollIntoView({ block: "nearest" }), P === T && A && (A.scrollTop = 0), P === S && A && (A.scrollTop = A.scrollHeight), P?.focus(), document.activeElement !== x)) return;
|
|
229
229
|
},
|
|
230
|
-
[D,
|
|
230
|
+
[D, A]
|
|
231
231
|
), V = t.useCallback(
|
|
232
|
-
() => L([M,
|
|
233
|
-
[L, M,
|
|
232
|
+
() => L([M, y]),
|
|
233
|
+
[L, M, y]
|
|
234
234
|
);
|
|
235
235
|
t.useEffect(() => {
|
|
236
|
-
|
|
237
|
-
}, [
|
|
238
|
-
const { onOpenChange: J, triggerPointerDownPosRef:
|
|
236
|
+
W && V();
|
|
237
|
+
}, [W, V]);
|
|
238
|
+
const { onOpenChange: J, triggerPointerDownPosRef: U } = v;
|
|
239
239
|
t.useEffect(() => {
|
|
240
|
-
if (
|
|
241
|
-
let
|
|
242
|
-
const T = (
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
y: Math.abs(Math.round(x.pageY) - ((B = (k = G.current) == null ? void 0 : k.y) != null ? B : 0))
|
|
240
|
+
if (y) {
|
|
241
|
+
let u = { x: 0, y: 0 };
|
|
242
|
+
const T = (S) => {
|
|
243
|
+
u = {
|
|
244
|
+
x: Math.abs(Math.round(S.pageX) - (U.current?.x ?? 0)),
|
|
245
|
+
y: Math.abs(Math.round(S.pageY) - (U.current?.y ?? 0))
|
|
247
246
|
};
|
|
248
|
-
},
|
|
249
|
-
|
|
247
|
+
}, _ = (S) => {
|
|
248
|
+
u.x <= 10 && u.y <= 10 ? S.preventDefault() : y.contains(S.target) || J(!1), document.removeEventListener("pointermove", T), U.current = null;
|
|
250
249
|
};
|
|
251
|
-
return
|
|
252
|
-
document.removeEventListener("pointermove", T), document.removeEventListener("pointerup",
|
|
250
|
+
return U.current !== null && (document.addEventListener("pointermove", T), document.addEventListener("pointerup", _, { capture: !0, once: !0 })), () => {
|
|
251
|
+
document.removeEventListener("pointermove", T), document.removeEventListener("pointerup", _, { capture: !0 });
|
|
253
252
|
};
|
|
254
253
|
}
|
|
255
|
-
}, [
|
|
256
|
-
const
|
|
257
|
-
return window.addEventListener("blur",
|
|
258
|
-
window.removeEventListener("blur",
|
|
254
|
+
}, [y, J, U]), t.useEffect(() => {
|
|
255
|
+
const u = () => J(!1);
|
|
256
|
+
return window.addEventListener("blur", u), window.addEventListener("resize", u), () => {
|
|
257
|
+
window.removeEventListener("blur", u), window.removeEventListener("resize", u);
|
|
259
258
|
};
|
|
260
259
|
}, [J]);
|
|
261
|
-
const [pe,
|
|
262
|
-
const T = D().filter((
|
|
263
|
-
|
|
260
|
+
const [pe, le] = Qe((u) => {
|
|
261
|
+
const T = D().filter((x) => !x.disabled), _ = T.find((x) => x.ref.current === document.activeElement), S = et(T, u, _);
|
|
262
|
+
S && setTimeout(() => S.ref.current.focus());
|
|
264
263
|
}), fe = t.useCallback(
|
|
265
|
-
(
|
|
266
|
-
const
|
|
267
|
-
(
|
|
264
|
+
(u, T, _) => {
|
|
265
|
+
const S = !R.current && !_;
|
|
266
|
+
(v.value !== void 0 && v.value === T || S) && (j(u), S && (R.current = !0));
|
|
268
267
|
},
|
|
269
|
-
[
|
|
270
|
-
), me = t.useCallback(() =>
|
|
271
|
-
(
|
|
272
|
-
const
|
|
273
|
-
(
|
|
268
|
+
[v.value]
|
|
269
|
+
), me = t.useCallback(() => y?.focus(), [y]), Q = t.useCallback(
|
|
270
|
+
(u, T, _) => {
|
|
271
|
+
const S = !R.current && !_;
|
|
272
|
+
(v.value !== void 0 && v.value === T || S) && Y(u);
|
|
274
273
|
},
|
|
275
|
-
[
|
|
276
|
-
),
|
|
277
|
-
side:
|
|
278
|
-
sideOffset:
|
|
279
|
-
align:
|
|
280
|
-
alignOffset:
|
|
281
|
-
arrowPadding:
|
|
274
|
+
[v.value]
|
|
275
|
+
), se = c === "popper" ? Se : We, oe = se === Se ? {
|
|
276
|
+
side: l,
|
|
277
|
+
sideOffset: s,
|
|
278
|
+
align: p,
|
|
279
|
+
alignOffset: g,
|
|
280
|
+
arrowPadding: w,
|
|
282
281
|
collisionBoundary: E,
|
|
283
|
-
collisionPadding:
|
|
284
|
-
sticky:
|
|
285
|
-
hideWhenDetached:
|
|
286
|
-
avoidCollisions:
|
|
282
|
+
collisionPadding: I,
|
|
283
|
+
sticky: f,
|
|
284
|
+
hideWhenDetached: h,
|
|
285
|
+
avoidCollisions: C
|
|
287
286
|
} : {};
|
|
288
|
-
return /* @__PURE__ */
|
|
289
|
-
|
|
287
|
+
return /* @__PURE__ */ d(
|
|
288
|
+
Be,
|
|
290
289
|
{
|
|
291
290
|
scope: e,
|
|
292
|
-
content:
|
|
293
|
-
viewport:
|
|
291
|
+
content: y,
|
|
292
|
+
viewport: A,
|
|
294
293
|
onViewportChange: te,
|
|
295
294
|
itemRefCallback: fe,
|
|
296
295
|
selectedItem: M,
|
|
@@ -299,58 +298,57 @@ var W = 10, [He, Y] = ee(Z), Et = "SelectContentImpl", Ve = t.forwardRef(
|
|
|
299
298
|
focusSelectedItem: V,
|
|
300
299
|
selectedItemText: $,
|
|
301
300
|
position: c,
|
|
302
|
-
isPositioned:
|
|
301
|
+
isPositioned: W,
|
|
303
302
|
searchRef: pe,
|
|
304
|
-
children: /* @__PURE__ */
|
|
305
|
-
|
|
303
|
+
children: /* @__PURE__ */ d(gt, { as: pt, allowPinchZoom: !0, children: /* @__PURE__ */ d(
|
|
304
|
+
st,
|
|
306
305
|
{
|
|
307
306
|
asChild: !0,
|
|
308
|
-
trapped:
|
|
309
|
-
onMountAutoFocus: (
|
|
310
|
-
|
|
307
|
+
trapped: v.open,
|
|
308
|
+
onMountAutoFocus: (u) => {
|
|
309
|
+
u.preventDefault();
|
|
311
310
|
},
|
|
312
|
-
onUnmountAutoFocus: b(
|
|
313
|
-
|
|
314
|
-
(T = u.trigger) == null || T.focus({ preventScroll: !0 }), f.preventDefault();
|
|
311
|
+
onUnmountAutoFocus: b(r, (u) => {
|
|
312
|
+
v.trigger?.focus({ preventScroll: !0 }), u.preventDefault();
|
|
315
313
|
}),
|
|
316
|
-
children: /* @__PURE__ */
|
|
314
|
+
children: /* @__PURE__ */ d(
|
|
317
315
|
rt,
|
|
318
316
|
{
|
|
319
317
|
asChild: !0,
|
|
320
318
|
disableOutsidePointerEvents: !0,
|
|
321
319
|
onEscapeKeyDown: a,
|
|
322
|
-
onPointerDownOutside:
|
|
323
|
-
onFocusOutside: (
|
|
324
|
-
onDismiss: () =>
|
|
325
|
-
children: /* @__PURE__ */
|
|
326
|
-
|
|
320
|
+
onPointerDownOutside: n,
|
|
321
|
+
onFocusOutside: (u) => u.preventDefault(),
|
|
322
|
+
onDismiss: () => v.onOpenChange(!1),
|
|
323
|
+
children: /* @__PURE__ */ d(
|
|
324
|
+
se,
|
|
327
325
|
{
|
|
328
326
|
role: "listbox",
|
|
329
|
-
id:
|
|
330
|
-
"data-state":
|
|
331
|
-
dir:
|
|
332
|
-
onContextMenu: (
|
|
333
|
-
...
|
|
327
|
+
id: v.contentId,
|
|
328
|
+
"data-state": v.open ? "open" : "closed",
|
|
329
|
+
dir: v.dir,
|
|
330
|
+
onContextMenu: (u) => u.preventDefault(),
|
|
331
|
+
...m,
|
|
334
332
|
...oe,
|
|
335
|
-
onPlaced: () =>
|
|
336
|
-
ref:
|
|
333
|
+
onPlaced: () => F(!0),
|
|
334
|
+
ref: N,
|
|
337
335
|
style: {
|
|
338
336
|
// flex layout so we can place the scroll buttons properly
|
|
339
337
|
display: "flex",
|
|
340
338
|
flexDirection: "column",
|
|
341
339
|
// reset the outline by default as the content MAY get focused
|
|
342
340
|
outline: "none",
|
|
343
|
-
...
|
|
341
|
+
...m.style
|
|
344
342
|
},
|
|
345
|
-
onKeyDown: b(
|
|
346
|
-
const T =
|
|
347
|
-
if (
|
|
348
|
-
let
|
|
349
|
-
if (["ArrowUp", "End"].includes(
|
|
350
|
-
const
|
|
351
|
-
|
|
343
|
+
onKeyDown: b(m.onKeyDown, (u) => {
|
|
344
|
+
const T = u.ctrlKey || u.altKey || u.metaKey;
|
|
345
|
+
if (u.key === "Tab" && u.preventDefault(), !T && u.key.length === 1 && le(u.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(u.key)) {
|
|
346
|
+
let S = D().filter((x) => !x.disabled).map((x) => x.ref.current);
|
|
347
|
+
if (["ArrowUp", "End"].includes(u.key) && (S = S.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(u.key)) {
|
|
348
|
+
const x = u.target, P = S.indexOf(x);
|
|
349
|
+
S = S.slice(P + 1);
|
|
352
350
|
}
|
|
353
|
-
setTimeout(() => L(
|
|
351
|
+
setTimeout(() => L(S)), u.preventDefault();
|
|
354
352
|
}
|
|
355
353
|
})
|
|
356
354
|
}
|
|
@@ -363,92 +361,92 @@ var W = 10, [He, Y] = ee(Z), Et = "SelectContentImpl", Ve = t.forwardRef(
|
|
|
363
361
|
);
|
|
364
362
|
}
|
|
365
363
|
);
|
|
366
|
-
|
|
367
|
-
var Rt = "SelectItemAlignedPosition", We = t.forwardRef((
|
|
368
|
-
const { __scopeSelect: e, onPlaced: c, ...
|
|
369
|
-
if (a.trigger && a.valueNode &&
|
|
370
|
-
const
|
|
364
|
+
He.displayName = Et;
|
|
365
|
+
var Rt = "SelectItemAlignedPosition", We = t.forwardRef((o, i) => {
|
|
366
|
+
const { __scopeSelect: e, onPlaced: c, ...r } = o, a = G(Z, e), n = z(Z, e), [l, s] = t.useState(null), [p, g] = t.useState(null), w = k(i, (N) => g(N)), E = de(e), I = t.useRef(!1), f = t.useRef(!0), { viewport: h, selectedItem: C, selectedItemText: m, focusSelectedItem: v } = n, y = t.useCallback(() => {
|
|
367
|
+
if (a.trigger && a.valueNode && l && p && h && C && m) {
|
|
368
|
+
const N = a.trigger.getBoundingClientRect(), M = p.getBoundingClientRect(), j = a.valueNode.getBoundingClientRect(), $ = m.getBoundingClientRect();
|
|
371
369
|
if (a.dir !== "rtl") {
|
|
372
|
-
const
|
|
373
|
-
|
|
370
|
+
const x = $.left - M.left, P = j.left - x, q = N.left - P, X = N.width + q, he = Math.max(X, M.width), ve = window.innerWidth - B, ge = Ee(P, [B, ve - he]);
|
|
371
|
+
l.style.minWidth = X + "px", l.style.left = ge + "px";
|
|
374
372
|
} else {
|
|
375
|
-
const
|
|
376
|
-
|
|
373
|
+
const x = M.right - $.right, P = window.innerWidth - j.right - x, q = window.innerWidth - N.right - P, X = N.width + q, he = Math.max(X, M.width), ve = window.innerWidth - B, ge = Ee(P, [B, ve - he]);
|
|
374
|
+
l.style.minWidth = X + "px", l.style.right = ge + "px";
|
|
377
375
|
}
|
|
378
|
-
const
|
|
376
|
+
const Y = E(), D = window.innerHeight - B * 2, W = h.scrollHeight, F = window.getComputedStyle(p), R = parseInt(F.borderTopWidth, 10), L = parseInt(F.paddingTop, 10), V = parseInt(F.borderBottomWidth, 10), J = parseInt(F.paddingBottom, 10), U = R + L + W + J + V, pe = Math.min(C.offsetHeight * 5, U), le = window.getComputedStyle(h), fe = parseInt(le.paddingTop, 10), me = parseInt(le.paddingBottom, 10), Q = N.top + N.height / 2 - B, se = D - Q, oe = C.offsetHeight / 2, u = C.offsetTop + oe, T = R + L + u, _ = U - T;
|
|
379
377
|
if (T <= Q) {
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
const
|
|
383
|
-
|
|
378
|
+
const x = C === Y[Y.length - 1].ref.current;
|
|
379
|
+
l.style.bottom = "0px";
|
|
380
|
+
const P = p.clientHeight - h.offsetTop - h.offsetHeight, q = Math.max(
|
|
381
|
+
se,
|
|
384
382
|
oe + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
385
|
-
(
|
|
386
|
-
),
|
|
387
|
-
|
|
383
|
+
(x ? me : 0) + P + V
|
|
384
|
+
), X = T + q;
|
|
385
|
+
l.style.height = X + "px";
|
|
388
386
|
} else {
|
|
389
|
-
const
|
|
390
|
-
|
|
391
|
-
const
|
|
387
|
+
const x = C === Y[0].ref.current;
|
|
388
|
+
l.style.top = "0px";
|
|
389
|
+
const q = Math.max(
|
|
392
390
|
Q,
|
|
393
|
-
R +
|
|
394
|
-
(
|
|
395
|
-
) +
|
|
396
|
-
|
|
391
|
+
R + h.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
392
|
+
(x ? fe : 0) + oe
|
|
393
|
+
) + _;
|
|
394
|
+
l.style.height = q + "px", h.scrollTop = T - Q + h.offsetTop;
|
|
397
395
|
}
|
|
398
|
-
|
|
396
|
+
l.style.margin = `${B}px 0`, l.style.minHeight = pe + "px", l.style.maxHeight = D + "px", c?.(), requestAnimationFrame(() => I.current = !0);
|
|
399
397
|
}
|
|
400
398
|
}, [
|
|
401
399
|
E,
|
|
402
400
|
a.trigger,
|
|
403
401
|
a.valueNode,
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
v,
|
|
407
|
-
I,
|
|
402
|
+
l,
|
|
403
|
+
p,
|
|
408
404
|
h,
|
|
405
|
+
C,
|
|
406
|
+
m,
|
|
409
407
|
a.dir,
|
|
410
408
|
c
|
|
411
409
|
]);
|
|
412
|
-
|
|
413
|
-
const [
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}, [
|
|
410
|
+
K(() => y(), [y]);
|
|
411
|
+
const [H, A] = t.useState();
|
|
412
|
+
K(() => {
|
|
413
|
+
p && A(window.getComputedStyle(p).zIndex);
|
|
414
|
+
}, [p]);
|
|
417
415
|
const te = t.useCallback(
|
|
418
|
-
(
|
|
419
|
-
|
|
416
|
+
(N) => {
|
|
417
|
+
N && f.current === !0 && (y(), v?.(), f.current = !1);
|
|
420
418
|
},
|
|
421
|
-
[
|
|
419
|
+
[y, v]
|
|
422
420
|
);
|
|
423
|
-
return /* @__PURE__ */
|
|
424
|
-
|
|
421
|
+
return /* @__PURE__ */ d(
|
|
422
|
+
Nt,
|
|
425
423
|
{
|
|
426
424
|
scope: e,
|
|
427
|
-
contentWrapper:
|
|
428
|
-
shouldExpandOnScrollRef:
|
|
425
|
+
contentWrapper: l,
|
|
426
|
+
shouldExpandOnScrollRef: I,
|
|
429
427
|
onScrollButtonChange: te,
|
|
430
|
-
children: /* @__PURE__ */
|
|
428
|
+
children: /* @__PURE__ */ d(
|
|
431
429
|
"div",
|
|
432
430
|
{
|
|
433
|
-
ref:
|
|
431
|
+
ref: s,
|
|
434
432
|
style: {
|
|
435
433
|
display: "flex",
|
|
436
434
|
flexDirection: "column",
|
|
437
435
|
position: "fixed",
|
|
438
|
-
zIndex:
|
|
436
|
+
zIndex: H
|
|
439
437
|
},
|
|
440
|
-
children: /* @__PURE__ */
|
|
441
|
-
|
|
438
|
+
children: /* @__PURE__ */ d(
|
|
439
|
+
O.div,
|
|
442
440
|
{
|
|
443
|
-
...
|
|
444
|
-
ref:
|
|
441
|
+
...r,
|
|
442
|
+
ref: w,
|
|
445
443
|
style: {
|
|
446
444
|
// When we get the height of the content, it includes borders. If we were to set
|
|
447
445
|
// the height without having `boxSizing: 'border-box'` it would be too big.
|
|
448
446
|
boxSizing: "border-box",
|
|
449
447
|
// We need to ensure the content doesn't get taller than the wrapper
|
|
450
448
|
maxHeight: "100%",
|
|
451
|
-
...
|
|
449
|
+
...r.style
|
|
452
450
|
}
|
|
453
451
|
}
|
|
454
452
|
)
|
|
@@ -458,21 +456,21 @@ var Rt = "SelectItemAlignedPosition", We = t.forwardRef((n, i) => {
|
|
|
458
456
|
);
|
|
459
457
|
});
|
|
460
458
|
We.displayName = Rt;
|
|
461
|
-
var bt = "SelectPopperPosition", Se = t.forwardRef((
|
|
459
|
+
var bt = "SelectPopperPosition", Se = t.forwardRef((o, i) => {
|
|
462
460
|
const {
|
|
463
461
|
__scopeSelect: e,
|
|
464
462
|
align: c = "start",
|
|
465
|
-
collisionPadding:
|
|
463
|
+
collisionPadding: r = B,
|
|
466
464
|
...a
|
|
467
|
-
} =
|
|
468
|
-
return /* @__PURE__ */
|
|
465
|
+
} = o, n = ue(e);
|
|
466
|
+
return /* @__PURE__ */ d(
|
|
469
467
|
it,
|
|
470
468
|
{
|
|
471
|
-
...
|
|
469
|
+
...n,
|
|
472
470
|
...a,
|
|
473
471
|
ref: i,
|
|
474
472
|
align: c,
|
|
475
|
-
collisionPadding:
|
|
473
|
+
collisionPadding: r,
|
|
476
474
|
style: {
|
|
477
475
|
// Ensure border-box for floating-ui calculations
|
|
478
476
|
boxSizing: "border-box",
|
|
@@ -487,11 +485,11 @@ var bt = "SelectPopperPosition", Se = t.forwardRef((n, i) => {
|
|
|
487
485
|
);
|
|
488
486
|
});
|
|
489
487
|
Se.displayName = bt;
|
|
490
|
-
var [
|
|
491
|
-
(
|
|
492
|
-
const { __scopeSelect: e, nonce: c, ...
|
|
488
|
+
var [Nt, Pe] = ee(Z, {}), we = "SelectViewport", Fe = t.forwardRef(
|
|
489
|
+
(o, i) => {
|
|
490
|
+
const { __scopeSelect: e, nonce: c, ...r } = o, a = z(we, e), n = Pe(we, e), l = k(i, a.onViewportChange), s = t.useRef(0);
|
|
493
491
|
return /* @__PURE__ */ ce(Te, { children: [
|
|
494
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ d(
|
|
495
493
|
"style",
|
|
496
494
|
{
|
|
497
495
|
dangerouslySetInnerHTML: {
|
|
@@ -500,13 +498,13 @@ var [_t, Pe] = ee(Z, {}), we = "SelectViewport", Fe = t.forwardRef(
|
|
|
500
498
|
nonce: c
|
|
501
499
|
}
|
|
502
500
|
),
|
|
503
|
-
/* @__PURE__ */
|
|
504
|
-
|
|
501
|
+
/* @__PURE__ */ d(ae.Slot, { scope: e, children: /* @__PURE__ */ d(
|
|
502
|
+
O.div,
|
|
505
503
|
{
|
|
506
504
|
"data-radix-select-viewport": "",
|
|
507
505
|
role: "presentation",
|
|
508
|
-
...
|
|
509
|
-
ref:
|
|
506
|
+
...r,
|
|
507
|
+
ref: l,
|
|
510
508
|
style: {
|
|
511
509
|
// we use position: 'relative' here on the `viewport` so that when we call
|
|
512
510
|
// `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
|
|
@@ -514,21 +512,21 @@ var [_t, Pe] = ee(Z, {}), we = "SelectViewport", Fe = t.forwardRef(
|
|
|
514
512
|
position: "relative",
|
|
515
513
|
flex: 1,
|
|
516
514
|
overflow: "auto",
|
|
517
|
-
...
|
|
515
|
+
...r.style
|
|
518
516
|
},
|
|
519
|
-
onScroll: b(
|
|
520
|
-
const
|
|
521
|
-
if (E
|
|
522
|
-
const
|
|
523
|
-
if (
|
|
524
|
-
const
|
|
525
|
-
if (
|
|
526
|
-
const
|
|
527
|
-
|
|
517
|
+
onScroll: b(r.onScroll, (p) => {
|
|
518
|
+
const g = p.currentTarget, { contentWrapper: w, shouldExpandOnScrollRef: E } = n;
|
|
519
|
+
if (E?.current && w) {
|
|
520
|
+
const I = Math.abs(s.current - g.scrollTop);
|
|
521
|
+
if (I > 0) {
|
|
522
|
+
const f = window.innerHeight - B * 2, h = parseFloat(w.style.minHeight), C = parseFloat(w.style.height), m = Math.max(h, C);
|
|
523
|
+
if (m < f) {
|
|
524
|
+
const v = m + I, y = Math.min(f, v), H = v - y;
|
|
525
|
+
w.style.height = y + "px", w.style.bottom === "0px" && (g.scrollTop = H > 0 ? H : 0, w.style.justifyContent = "flex-end");
|
|
528
526
|
}
|
|
529
527
|
}
|
|
530
528
|
}
|
|
531
|
-
|
|
529
|
+
s.current = g.scrollTop;
|
|
532
530
|
})
|
|
533
531
|
}
|
|
534
532
|
) })
|
|
@@ -536,89 +534,80 @@ var [_t, Pe] = ee(Z, {}), we = "SelectViewport", Fe = t.forwardRef(
|
|
|
536
534
|
}
|
|
537
535
|
);
|
|
538
536
|
Fe.displayName = we;
|
|
539
|
-
var Ue = "SelectGroup", [
|
|
540
|
-
(
|
|
541
|
-
const { __scopeSelect: e, ...c } =
|
|
542
|
-
return /* @__PURE__ */
|
|
537
|
+
var Ue = "SelectGroup", [_t, Mt] = ee(Ue), Ot = t.forwardRef(
|
|
538
|
+
(o, i) => {
|
|
539
|
+
const { __scopeSelect: e, ...c } = o, r = Ie();
|
|
540
|
+
return /* @__PURE__ */ d(_t, { scope: e, id: r, children: /* @__PURE__ */ d(O.div, { role: "group", "aria-labelledby": r, ...c, ref: i }) });
|
|
543
541
|
}
|
|
544
542
|
);
|
|
545
|
-
|
|
546
|
-
var Ke = "SelectLabel",
|
|
547
|
-
(
|
|
548
|
-
const { __scopeSelect: e, ...c } =
|
|
549
|
-
return /* @__PURE__ */
|
|
543
|
+
Ot.displayName = Ue;
|
|
544
|
+
var Ke = "SelectLabel", At = t.forwardRef(
|
|
545
|
+
(o, i) => {
|
|
546
|
+
const { __scopeSelect: e, ...c } = o, r = Mt(Ke, e);
|
|
547
|
+
return /* @__PURE__ */ d(O.div, { id: r.id, ...c, ref: i });
|
|
550
548
|
}
|
|
551
549
|
);
|
|
552
|
-
|
|
550
|
+
At.displayName = Ke;
|
|
553
551
|
var ie = "SelectItem", [Dt, Ge] = ee(ie), ze = t.forwardRef(
|
|
554
|
-
(
|
|
552
|
+
(o, i) => {
|
|
555
553
|
const {
|
|
556
554
|
__scopeSelect: e,
|
|
557
555
|
value: c,
|
|
558
|
-
disabled:
|
|
556
|
+
disabled: r = !1,
|
|
559
557
|
textValue: a,
|
|
560
|
-
...
|
|
561
|
-
} =
|
|
558
|
+
...n
|
|
559
|
+
} = o, l = G(ie, e), s = z(ie, e), p = l.value === c, [g, w] = t.useState(a ?? ""), [E, I] = t.useState(!1), f = k(
|
|
562
560
|
i,
|
|
563
|
-
(
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
}
|
|
567
|
-
), v = Ie(), I = () => {
|
|
568
|
-
l || (r.onValueChange(c), r.onOpenChange(!1));
|
|
561
|
+
(m) => s.itemRefCallback?.(m, c, r)
|
|
562
|
+
), h = Ie(), C = () => {
|
|
563
|
+
r || (l.onValueChange(c), l.onOpenChange(!1));
|
|
569
564
|
};
|
|
570
565
|
if (c === "")
|
|
571
566
|
throw new Error(
|
|
572
567
|
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
|
573
568
|
);
|
|
574
|
-
return /* @__PURE__ */
|
|
569
|
+
return /* @__PURE__ */ d(
|
|
575
570
|
Dt,
|
|
576
571
|
{
|
|
577
572
|
scope: e,
|
|
578
573
|
value: c,
|
|
579
|
-
disabled:
|
|
580
|
-
textId:
|
|
581
|
-
isSelected:
|
|
582
|
-
onItemTextChange: t.useCallback((
|
|
583
|
-
|
|
584
|
-
var g;
|
|
585
|
-
return u || ((g = h == null ? void 0 : h.textContent) != null ? g : "").trim();
|
|
586
|
-
});
|
|
574
|
+
disabled: r,
|
|
575
|
+
textId: h,
|
|
576
|
+
isSelected: p,
|
|
577
|
+
onItemTextChange: t.useCallback((m) => {
|
|
578
|
+
w((v) => v || (m?.textContent ?? "").trim());
|
|
587
579
|
}, []),
|
|
588
|
-
children: /* @__PURE__ */
|
|
580
|
+
children: /* @__PURE__ */ d(
|
|
589
581
|
ae.ItemSlot,
|
|
590
582
|
{
|
|
591
583
|
scope: e,
|
|
592
584
|
value: c,
|
|
593
|
-
disabled:
|
|
594
|
-
textValue:
|
|
595
|
-
children: /* @__PURE__ */
|
|
596
|
-
|
|
585
|
+
disabled: r,
|
|
586
|
+
textValue: g,
|
|
587
|
+
children: /* @__PURE__ */ d(
|
|
588
|
+
O.div,
|
|
597
589
|
{
|
|
598
590
|
role: "option",
|
|
599
|
-
"aria-labelledby":
|
|
591
|
+
"aria-labelledby": h,
|
|
600
592
|
"data-highlighted": E ? "" : void 0,
|
|
601
|
-
"aria-selected":
|
|
602
|
-
"data-state":
|
|
603
|
-
"aria-disabled":
|
|
604
|
-
"data-disabled":
|
|
605
|
-
tabIndex:
|
|
606
|
-
...
|
|
607
|
-
ref:
|
|
608
|
-
onFocus: b(
|
|
609
|
-
onBlur: b(
|
|
610
|
-
onPointerUp: b(
|
|
611
|
-
onPointerMove: b(
|
|
612
|
-
|
|
613
|
-
l ? (u = o.onItemLeave) == null || u.call(o) : h.currentTarget.focus({ preventScroll: !0 });
|
|
593
|
+
"aria-selected": p && E,
|
|
594
|
+
"data-state": p ? "checked" : "unchecked",
|
|
595
|
+
"aria-disabled": r || void 0,
|
|
596
|
+
"data-disabled": r ? "" : void 0,
|
|
597
|
+
tabIndex: r ? void 0 : -1,
|
|
598
|
+
...n,
|
|
599
|
+
ref: f,
|
|
600
|
+
onFocus: b(n.onFocus, () => I(!0)),
|
|
601
|
+
onBlur: b(n.onBlur, () => I(!1)),
|
|
602
|
+
onPointerUp: b(n.onPointerUp, C),
|
|
603
|
+
onPointerMove: b(n.onPointerMove, (m) => {
|
|
604
|
+
r ? s.onItemLeave?.() : m.currentTarget.focus({ preventScroll: !0 });
|
|
614
605
|
}),
|
|
615
|
-
onPointerLeave: b(
|
|
616
|
-
|
|
617
|
-
h.currentTarget === document.activeElement && ((u = o.onItemLeave) == null || u.call(o));
|
|
606
|
+
onPointerLeave: b(n.onPointerLeave, (m) => {
|
|
607
|
+
m.currentTarget === document.activeElement && s.onItemLeave?.();
|
|
618
608
|
}),
|
|
619
|
-
onKeyDown: b(
|
|
620
|
-
|
|
621
|
-
((g = o.searchRef) == null ? void 0 : g.current) !== "" && h.key === " " || (wt.includes(h.key) && I(), h.key === " " && h.preventDefault());
|
|
609
|
+
onKeyDown: b(n.onKeyDown, (m) => {
|
|
610
|
+
s.searchRef?.current !== "" && m.key === " " || (wt.includes(m.key) && C(), m.key === " " && m.preventDefault());
|
|
622
611
|
})
|
|
623
612
|
}
|
|
624
613
|
)
|
|
@@ -630,168 +619,162 @@ var ie = "SelectItem", [Dt, Ge] = ee(ie), ze = t.forwardRef(
|
|
|
630
619
|
);
|
|
631
620
|
ze.displayName = ie;
|
|
632
621
|
var ne = "SelectItemText", je = t.forwardRef(
|
|
633
|
-
(
|
|
634
|
-
const { __scopeSelect: e, className: c, style:
|
|
622
|
+
(o, i) => {
|
|
623
|
+
const { __scopeSelect: e, className: c, style: r, ...a } = o, n = G(ne, e), l = z(ne, e), s = Ge(ne, e), p = It(ne, e), [g, w] = t.useState(null), E = k(
|
|
635
624
|
i,
|
|
636
|
-
(
|
|
637
|
-
|
|
638
|
-
(
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
),
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
return z(() => (v(m), () => I(m)), [v, I, m]), /* @__PURE__ */ ce(Te, { children: [
|
|
647
|
-
/* @__PURE__ */ p(A.span, { id: o.textId, ...a, ref: E }),
|
|
648
|
-
o.isSelected && s.valueNode && !s.valueNodeHasChildren ? be.createPortal(a.children, s.valueNode) : null
|
|
625
|
+
(m) => w(m),
|
|
626
|
+
s.onItemTextChange,
|
|
627
|
+
(m) => l.itemTextRefCallback?.(m, s.value, s.disabled)
|
|
628
|
+
), I = g?.textContent, f = t.useMemo(
|
|
629
|
+
() => /* @__PURE__ */ d("option", { value: s.value, disabled: s.disabled, children: I }, s.value),
|
|
630
|
+
[s.disabled, s.value, I]
|
|
631
|
+
), { onNativeOptionAdd: h, onNativeOptionRemove: C } = p;
|
|
632
|
+
return K(() => (h(f), () => C(f)), [h, C, f]), /* @__PURE__ */ ce(Te, { children: [
|
|
633
|
+
/* @__PURE__ */ d(O.span, { id: s.textId, ...a, ref: E }),
|
|
634
|
+
s.isSelected && n.valueNode && !n.valueNodeHasChildren ? be.createPortal(a.children, n.valueNode) : null
|
|
649
635
|
] });
|
|
650
636
|
}
|
|
651
637
|
);
|
|
652
638
|
je.displayName = ne;
|
|
653
639
|
var Ye = "SelectItemIndicator", Lt = t.forwardRef(
|
|
654
|
-
(
|
|
655
|
-
const { __scopeSelect: e, ...c } =
|
|
656
|
-
return Ge(Ye, e).isSelected ? /* @__PURE__ */
|
|
640
|
+
(o, i) => {
|
|
641
|
+
const { __scopeSelect: e, ...c } = o;
|
|
642
|
+
return Ge(Ye, e).isSelected ? /* @__PURE__ */ d(O.span, { "aria-hidden": !0, ...c, ref: i }) : null;
|
|
657
643
|
}
|
|
658
644
|
);
|
|
659
645
|
Lt.displayName = Ye;
|
|
660
|
-
var Ce = "SelectScrollUpButton", qe = t.forwardRef((
|
|
661
|
-
const e =
|
|
662
|
-
return
|
|
646
|
+
var Ce = "SelectScrollUpButton", qe = t.forwardRef((o, i) => {
|
|
647
|
+
const e = z(Ce, o.__scopeSelect), c = Pe(Ce, o.__scopeSelect), [r, a] = t.useState(!1), n = k(i, c.onScrollButtonChange);
|
|
648
|
+
return K(() => {
|
|
663
649
|
if (e.viewport && e.isPositioned) {
|
|
664
|
-
let
|
|
665
|
-
const
|
|
666
|
-
a(
|
|
650
|
+
let l = function() {
|
|
651
|
+
const p = s.scrollTop > 0;
|
|
652
|
+
a(p);
|
|
667
653
|
};
|
|
668
|
-
const
|
|
669
|
-
return
|
|
654
|
+
const s = e.viewport;
|
|
655
|
+
return l(), s.addEventListener("scroll", l), () => s.removeEventListener("scroll", l);
|
|
670
656
|
}
|
|
671
|
-
}, [e.viewport, e.isPositioned]),
|
|
657
|
+
}, [e.viewport, e.isPositioned]), r ? /* @__PURE__ */ d(
|
|
672
658
|
Ze,
|
|
673
659
|
{
|
|
674
|
-
...
|
|
675
|
-
ref:
|
|
660
|
+
...o,
|
|
661
|
+
ref: n,
|
|
676
662
|
onAutoScroll: () => {
|
|
677
|
-
const { viewport:
|
|
678
|
-
|
|
663
|
+
const { viewport: l, selectedItem: s } = e;
|
|
664
|
+
l && s && (l.scrollTop = l.scrollTop - s.offsetHeight);
|
|
679
665
|
}
|
|
680
666
|
}
|
|
681
667
|
) : null;
|
|
682
668
|
});
|
|
683
669
|
qe.displayName = Ce;
|
|
684
|
-
var
|
|
685
|
-
const e =
|
|
686
|
-
return
|
|
670
|
+
var xe = "SelectScrollDownButton", Xe = t.forwardRef((o, i) => {
|
|
671
|
+
const e = z(xe, o.__scopeSelect), c = Pe(xe, o.__scopeSelect), [r, a] = t.useState(!1), n = k(i, c.onScrollButtonChange);
|
|
672
|
+
return K(() => {
|
|
687
673
|
if (e.viewport && e.isPositioned) {
|
|
688
|
-
let
|
|
689
|
-
const
|
|
690
|
-
a(
|
|
674
|
+
let l = function() {
|
|
675
|
+
const p = s.scrollHeight - s.clientHeight, g = Math.ceil(s.scrollTop) < p;
|
|
676
|
+
a(g);
|
|
691
677
|
};
|
|
692
|
-
const
|
|
693
|
-
return
|
|
678
|
+
const s = e.viewport;
|
|
679
|
+
return l(), s.addEventListener("scroll", l), () => s.removeEventListener("scroll", l);
|
|
694
680
|
}
|
|
695
|
-
}, [e.viewport, e.isPositioned]),
|
|
681
|
+
}, [e.viewport, e.isPositioned]), r ? /* @__PURE__ */ d(
|
|
696
682
|
Ze,
|
|
697
683
|
{
|
|
698
|
-
...
|
|
699
|
-
ref:
|
|
684
|
+
...o,
|
|
685
|
+
ref: n,
|
|
700
686
|
onAutoScroll: () => {
|
|
701
|
-
const { viewport:
|
|
702
|
-
|
|
687
|
+
const { viewport: l, selectedItem: s } = e;
|
|
688
|
+
l && s && (l.scrollTop = l.scrollTop + s.offsetHeight);
|
|
703
689
|
}
|
|
704
690
|
}
|
|
705
691
|
) : null;
|
|
706
692
|
});
|
|
707
|
-
Xe.displayName =
|
|
708
|
-
var Ze = t.forwardRef((
|
|
709
|
-
const { __scopeSelect: e, onAutoScroll: c, ...
|
|
710
|
-
|
|
693
|
+
Xe.displayName = xe;
|
|
694
|
+
var Ze = t.forwardRef((o, i) => {
|
|
695
|
+
const { __scopeSelect: e, onAutoScroll: c, ...r } = o, a = z("SelectScrollButton", e), n = t.useRef(null), l = de(e), s = t.useCallback(() => {
|
|
696
|
+
n.current !== null && (window.clearInterval(n.current), n.current = null);
|
|
711
697
|
}, []);
|
|
712
|
-
return t.useEffect(() => () =>
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
}, [r]), /* @__PURE__ */ p(
|
|
717
|
-
A.div,
|
|
698
|
+
return t.useEffect(() => () => s(), [s]), K(() => {
|
|
699
|
+
l().find((g) => g.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
700
|
+
}, [l]), /* @__PURE__ */ d(
|
|
701
|
+
O.div,
|
|
718
702
|
{
|
|
719
703
|
"aria-hidden": !0,
|
|
720
|
-
...
|
|
704
|
+
...r,
|
|
721
705
|
ref: i,
|
|
722
|
-
style: { flexShrink: 0, ...
|
|
723
|
-
onPointerDown: b(
|
|
724
|
-
|
|
706
|
+
style: { flexShrink: 0, ...r.style },
|
|
707
|
+
onPointerDown: b(r.onPointerDown, () => {
|
|
708
|
+
n.current === null && (n.current = window.setInterval(c, 50));
|
|
725
709
|
}),
|
|
726
|
-
onPointerMove: b(
|
|
727
|
-
|
|
728
|
-
(d = a.onItemLeave) == null || d.call(a), s.current === null && (s.current = window.setInterval(c, 50));
|
|
710
|
+
onPointerMove: b(r.onPointerMove, () => {
|
|
711
|
+
a.onItemLeave?.(), n.current === null && (n.current = window.setInterval(c, 50));
|
|
729
712
|
}),
|
|
730
|
-
onPointerLeave: b(
|
|
731
|
-
|
|
713
|
+
onPointerLeave: b(r.onPointerLeave, () => {
|
|
714
|
+
s();
|
|
732
715
|
})
|
|
733
716
|
}
|
|
734
717
|
);
|
|
735
|
-
}), kt = "SelectSeparator",
|
|
736
|
-
(
|
|
737
|
-
const { __scopeSelect: e, ...c } =
|
|
738
|
-
return /* @__PURE__ */
|
|
718
|
+
}), kt = "SelectSeparator", Vt = t.forwardRef(
|
|
719
|
+
(o, i) => {
|
|
720
|
+
const { __scopeSelect: e, ...c } = o;
|
|
721
|
+
return /* @__PURE__ */ d(O.div, { "aria-hidden": !0, ...c, ref: i });
|
|
739
722
|
}
|
|
740
723
|
);
|
|
741
|
-
|
|
742
|
-
var
|
|
743
|
-
(
|
|
744
|
-
const { __scopeSelect: e, ...c } =
|
|
745
|
-
return a.open &&
|
|
724
|
+
Vt.displayName = kt;
|
|
725
|
+
var ye = "SelectArrow", Bt = t.forwardRef(
|
|
726
|
+
(o, i) => {
|
|
727
|
+
const { __scopeSelect: e, ...c } = o, r = ue(e), a = G(ye, e), n = z(ye, e);
|
|
728
|
+
return a.open && n.position === "popper" ? /* @__PURE__ */ d(at, { ...r, ...c, ref: i }) : null;
|
|
746
729
|
}
|
|
747
730
|
);
|
|
748
|
-
|
|
749
|
-
function $e(
|
|
750
|
-
return
|
|
731
|
+
Bt.displayName = ye;
|
|
732
|
+
function $e(o) {
|
|
733
|
+
return o === "" || o === void 0;
|
|
751
734
|
}
|
|
752
735
|
var Je = t.forwardRef(
|
|
753
|
-
(
|
|
754
|
-
const { value: e, ...c } =
|
|
736
|
+
(o, i) => {
|
|
737
|
+
const { value: e, ...c } = o, r = t.useRef(null), a = k(i, r), n = mt(e);
|
|
755
738
|
return t.useEffect(() => {
|
|
756
|
-
const
|
|
757
|
-
|
|
739
|
+
const l = r.current, s = window.HTMLSelectElement.prototype, g = Object.getOwnPropertyDescriptor(
|
|
740
|
+
s,
|
|
758
741
|
"value"
|
|
759
742
|
).set;
|
|
760
|
-
if (
|
|
761
|
-
const
|
|
762
|
-
|
|
743
|
+
if (n !== e && g) {
|
|
744
|
+
const w = new Event("change", { bubbles: !0 });
|
|
745
|
+
g.call(l, e), l.dispatchEvent(w);
|
|
763
746
|
}
|
|
764
|
-
}, [
|
|
747
|
+
}, [n, e]), /* @__PURE__ */ d(ht, { asChild: !0, children: /* @__PURE__ */ d("select", { ...c, ref: a, defaultValue: e }) });
|
|
765
748
|
}
|
|
766
749
|
);
|
|
767
750
|
Je.displayName = "BubbleSelect";
|
|
768
|
-
function Qe(
|
|
769
|
-
const i = ft(
|
|
770
|
-
(
|
|
771
|
-
const
|
|
772
|
-
i(
|
|
773
|
-
e.current =
|
|
774
|
-
}(
|
|
751
|
+
function Qe(o) {
|
|
752
|
+
const i = ft(o), e = t.useRef(""), c = t.useRef(0), r = t.useCallback(
|
|
753
|
+
(n) => {
|
|
754
|
+
const l = e.current + n;
|
|
755
|
+
i(l), function s(p) {
|
|
756
|
+
e.current = p, window.clearTimeout(c.current), p !== "" && (c.current = window.setTimeout(() => s(""), 1e3));
|
|
757
|
+
}(l);
|
|
775
758
|
},
|
|
776
759
|
[i]
|
|
777
760
|
), a = t.useCallback(() => {
|
|
778
761
|
e.current = "", window.clearTimeout(c.current);
|
|
779
762
|
}, []);
|
|
780
|
-
return t.useEffect(() => () => window.clearTimeout(c.current), []), [e,
|
|
763
|
+
return t.useEffect(() => () => window.clearTimeout(c.current), []), [e, r, a];
|
|
781
764
|
}
|
|
782
|
-
function et(
|
|
783
|
-
const
|
|
784
|
-
let
|
|
785
|
-
|
|
786
|
-
const
|
|
787
|
-
(
|
|
765
|
+
function et(o, i, e) {
|
|
766
|
+
const r = i.length > 1 && Array.from(i).every((p) => p === i[0]) ? i[0] : i, a = e ? o.indexOf(e) : -1;
|
|
767
|
+
let n = Ht(o, Math.max(a, 0));
|
|
768
|
+
r.length === 1 && (n = n.filter((p) => p !== e));
|
|
769
|
+
const s = n.find(
|
|
770
|
+
(p) => p.textValue.toLowerCase().startsWith(r.toLowerCase())
|
|
788
771
|
);
|
|
789
|
-
return
|
|
772
|
+
return s !== e ? s : void 0;
|
|
790
773
|
}
|
|
791
|
-
function
|
|
792
|
-
return
|
|
774
|
+
function Ht(o, i) {
|
|
775
|
+
return o.map((e, c) => o[(i + c) % o.length]);
|
|
793
776
|
}
|
|
794
|
-
var ao =
|
|
777
|
+
var ao = _e, uo = Oe, po = De, fo = Le, mo = ke, ho = Ve, vo = Fe, go = ze, So = je, wo = qe, Co = Xe;
|
|
795
778
|
export {
|
|
796
779
|
ho as Content,
|
|
797
780
|
fo as Icon,
|
|
@@ -801,20 +784,20 @@ export {
|
|
|
801
784
|
ao as Root,
|
|
802
785
|
Co as ScrollDownButton,
|
|
803
786
|
wo as ScrollUpButton,
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
787
|
+
_e as Select,
|
|
788
|
+
Bt as SelectArrow,
|
|
789
|
+
Ve as SelectContent,
|
|
790
|
+
Ot as SelectGroup,
|
|
808
791
|
Le as SelectIcon,
|
|
809
792
|
ze as SelectItem,
|
|
810
793
|
Lt as SelectItemIndicator,
|
|
811
794
|
je as SelectItemText,
|
|
812
|
-
|
|
795
|
+
At as SelectLabel,
|
|
813
796
|
ke as SelectPortal,
|
|
814
797
|
Xe as SelectScrollDownButton,
|
|
815
798
|
qe as SelectScrollUpButton,
|
|
816
|
-
|
|
817
|
-
|
|
799
|
+
Vt as SelectSeparator,
|
|
800
|
+
Oe as SelectTrigger,
|
|
818
801
|
De as SelectValue,
|
|
819
802
|
Fe as SelectViewport,
|
|
820
803
|
uo as Trigger,
|