@tamagui/select 1.0.1-beta.99 → 1.0.1-rc.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/cjs/BubbleSelect.js +25 -33
- package/dist/cjs/BubbleSelect.js.map +1 -1
- package/dist/cjs/Select.js +391 -789
- package/dist/cjs/Select.js.map +3 -3
- package/dist/cjs/SelectContent.js +72 -0
- package/dist/cjs/SelectContent.js.map +7 -0
- package/dist/cjs/SelectContent.native.js +31 -0
- package/dist/cjs/SelectContent.native.js.map +7 -0
- package/dist/cjs/SelectImpl.js +288 -0
- package/dist/cjs/SelectImpl.js.map +7 -0
- package/dist/cjs/SelectScrollButton.js +157 -0
- package/dist/cjs/SelectScrollButton.js.map +7 -0
- package/dist/cjs/SelectScrollButton.native.js +32 -0
- package/dist/cjs/SelectScrollButton.native.js.map +7 -0
- package/dist/cjs/SelectViewport.js +125 -0
- package/dist/cjs/SelectViewport.js.map +7 -0
- package/dist/cjs/SelectViewport.native.js +41 -0
- package/dist/cjs/SelectViewport.native.js.map +7 -0
- package/dist/cjs/constants.js +47 -0
- package/dist/cjs/constants.js.map +7 -0
- package/dist/cjs/context.js +49 -0
- package/dist/cjs/context.js.map +7 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/types.js +17 -0
- package/dist/cjs/types.js.map +7 -0
- package/dist/cjs/useSelectBreakpointActive.js +39 -0
- package/dist/cjs/useSelectBreakpointActive.js.map +7 -0
- package/dist/esm/BubbleSelect.js +20 -33
- package/dist/esm/BubbleSelect.js.map +1 -1
- package/dist/esm/Select.js +379 -803
- package/dist/esm/Select.js.map +3 -3
- package/dist/esm/SelectContent.js +48 -0
- package/dist/esm/SelectContent.js.map +7 -0
- package/dist/esm/SelectContent.native.js +7 -0
- package/dist/esm/SelectContent.native.js.map +7 -0
- package/dist/esm/SelectImpl.js +273 -0
- package/dist/esm/SelectImpl.js.map +7 -0
- package/dist/esm/SelectScrollButton.js +126 -0
- package/dist/esm/SelectScrollButton.js.map +7 -0
- package/dist/esm/SelectScrollButton.native.js +7 -0
- package/dist/esm/SelectScrollButton.native.js.map +7 -0
- package/dist/esm/SelectViewport.js +94 -0
- package/dist/esm/SelectViewport.js.map +7 -0
- package/dist/esm/SelectViewport.native.js +17 -0
- package/dist/esm/SelectViewport.native.js.map +7 -0
- package/dist/esm/constants.js +17 -0
- package/dist/esm/constants.js.map +7 -0
- package/dist/esm/context.js +21 -0
- package/dist/esm/context.js.map +7 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/types.js +1 -0
- package/dist/esm/types.js.map +7 -0
- package/dist/esm/useSelectBreakpointActive.js +14 -0
- package/dist/esm/useSelectBreakpointActive.js.map +7 -0
- package/dist/jsx/BubbleSelect.js +20 -18
- package/dist/jsx/BubbleSelect.js.map +1 -1
- package/dist/jsx/Select.js +259 -656
- package/dist/jsx/Select.js.map +3 -3
- package/dist/jsx/SelectContent.js +27 -0
- package/dist/jsx/SelectContent.js.map +7 -0
- package/dist/jsx/SelectContent.native.js +7 -0
- package/dist/jsx/SelectContent.native.js.map +7 -0
- package/dist/jsx/SelectImpl.js +246 -0
- package/dist/jsx/SelectImpl.js.map +7 -0
- package/dist/jsx/SelectScrollButton.js +99 -0
- package/dist/jsx/SelectScrollButton.js.map +7 -0
- package/dist/jsx/SelectScrollButton.native.js +7 -0
- package/dist/jsx/SelectScrollButton.native.js.map +7 -0
- package/dist/jsx/SelectViewport.js +72 -0
- package/dist/jsx/SelectViewport.js.map +7 -0
- package/dist/jsx/SelectViewport.native.js +13 -0
- package/dist/jsx/SelectViewport.native.js.map +7 -0
- package/dist/jsx/constants.js +17 -0
- package/dist/jsx/constants.js.map +7 -0
- package/dist/jsx/context.js +15 -0
- package/dist/jsx/context.js.map +7 -0
- package/dist/jsx/index.js +1 -0
- package/dist/jsx/index.js.map +2 -2
- package/dist/jsx/types.js +1 -0
- package/dist/jsx/types.js.map +7 -0
- package/dist/jsx/useSelectBreakpointActive.js +14 -0
- package/dist/jsx/useSelectBreakpointActive.js.map +7 -0
- package/package.json +26 -20
- package/src/Select.tsx +210 -906
- package/src/SelectContent.native.tsx +5 -0
- package/src/SelectContent.tsx +45 -0
- package/src/SelectImpl.tsx +344 -0
- package/src/SelectScrollButton.native.tsx +7 -0
- package/src/SelectScrollButton.tsx +168 -0
- package/src/SelectViewport.native.tsx +14 -0
- package/src/SelectViewport.tsx +104 -0
- package/src/constants.tsx +7 -0
- package/src/context.tsx +19 -0
- package/src/index.tsx +7 -0
- package/src/types.tsx +91 -0
- package/src/useSelectBreakpointActive.tsx +15 -0
- package/types/BubbleSelect.d.ts +2 -0
- package/types/Select.d.ts +449 -599
- package/types/SelectContent.d.ts +5 -0
- package/types/SelectContent.native.d.ts +4 -0
- package/types/SelectImpl.d.ts +9 -0
- package/types/SelectScrollButton.d.ts +6 -0
- package/types/SelectScrollButton.native.d.ts +4 -0
- package/types/SelectViewport.d.ts +127 -0
- package/types/SelectViewport.native.d.ts +7 -0
- package/types/constants.d.ts +8 -0
- package/types/context.d.ts +21 -0
- package/types/index.d.ts +2 -0
- package/types/types.d.ts +81 -0
- package/types/useSelectBreakpointActive.d.ts +4 -0
- package/types/Select.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
package/dist/cjs/Select.js
CHANGED
|
@@ -1,38 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __objRest = (source, exclude) => {
|
|
25
|
-
var target = {};
|
|
26
|
-
for (var prop in source)
|
|
27
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
if (source != null && __getOwnPropSymbols)
|
|
30
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
-
target[prop] = source[prop];
|
|
33
|
-
}
|
|
34
|
-
return target;
|
|
35
|
-
};
|
|
36
8
|
var __export = (target, all) => {
|
|
37
9
|
for (var name in all)
|
|
38
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -45,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
45
17
|
}
|
|
46
18
|
return to;
|
|
47
19
|
};
|
|
48
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
49
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
50
25
|
var Select_exports = {};
|
|
51
26
|
__export(Select_exports, {
|
|
@@ -55,813 +30,442 @@ __export(Select_exports, {
|
|
|
55
30
|
SelectItem: () => SelectItem,
|
|
56
31
|
SelectItemTextFrame: () => SelectItemTextFrame,
|
|
57
32
|
SelectSeparator: () => SelectSeparator,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
SelectViewportFrame: () => SelectViewportFrame,
|
|
61
|
-
createSelectScope: () => createSelectScope
|
|
33
|
+
SelectSheetContents: () => SelectSheetContents,
|
|
34
|
+
SelectTrigger: () => SelectTrigger
|
|
62
35
|
});
|
|
63
36
|
module.exports = __toCommonJS(Select_exports);
|
|
64
|
-
var
|
|
65
|
-
var
|
|
37
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
|
+
var import_adapt = require("@tamagui/adapt");
|
|
66
39
|
var import_compose_refs = require("@tamagui/compose-refs");
|
|
67
40
|
var import_core = require("@tamagui/core");
|
|
68
41
|
var import_core2 = require("@tamagui/core");
|
|
69
|
-
var
|
|
42
|
+
var import_core3 = require("@tamagui/core");
|
|
70
43
|
var import_list_item = require("@tamagui/list-item");
|
|
44
|
+
var import_portal = require("@tamagui/portal");
|
|
71
45
|
var import_separator = require("@tamagui/separator");
|
|
46
|
+
var import_sheet = require("@tamagui/sheet");
|
|
72
47
|
var import_stacks = require("@tamagui/stacks");
|
|
73
48
|
var import_text = require("@tamagui/text");
|
|
74
49
|
var import_use_controllable_state = require("@tamagui/use-controllable-state");
|
|
75
50
|
var React = __toESM(require("react"));
|
|
76
|
-
var
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return !/^((?!chrome|android).)*safari/i.test(userAgent) ? (visualViewport == null ? void 0 : visualViewport.offsetTop) ?? 0 : 0;
|
|
84
|
-
}
|
|
85
|
-
const SELECT_NAME = "Select";
|
|
86
|
-
const WINDOW_PADDING = 8;
|
|
87
|
-
const SCROLL_ARROW_VELOCITY = 8;
|
|
88
|
-
const SCROLL_ARROW_THRESHOLD = 8;
|
|
89
|
-
const MIN_HEIGHT = 80;
|
|
90
|
-
const FALLBACK_THRESHOLD = 16;
|
|
91
|
-
const [createSelectContext, createSelectScope] = (0, import_create_context.createContextScope)(SELECT_NAME);
|
|
92
|
-
const [SelectProvider, useSelectContext] = createSelectContext(SELECT_NAME);
|
|
51
|
+
var import_constants = require("./constants");
|
|
52
|
+
var import_context = require("./context");
|
|
53
|
+
var import_SelectContent = require("./SelectContent");
|
|
54
|
+
var import_SelectImpl = require("./SelectImpl");
|
|
55
|
+
var import_SelectScrollButton = require("./SelectScrollButton");
|
|
56
|
+
var import_SelectViewport = require("./SelectViewport");
|
|
57
|
+
var import_useSelectBreakpointActive = require("./useSelectBreakpointActive");
|
|
93
58
|
const TRIGGER_NAME = "SelectTrigger";
|
|
94
|
-
const SelectTrigger = React.forwardRef(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
59
|
+
const SelectTrigger = React.forwardRef(
|
|
60
|
+
(props, forwardedRef) => {
|
|
61
|
+
const {
|
|
62
|
+
__scopeSelect,
|
|
63
|
+
disabled = false,
|
|
64
|
+
"aria-labelledby": ariaLabelledby,
|
|
65
|
+
...triggerProps
|
|
66
|
+
} = props;
|
|
67
|
+
const context = (0, import_context.useSelectContext)(TRIGGER_NAME, __scopeSelect);
|
|
68
|
+
const labelledBy = ariaLabelledby;
|
|
69
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_list_item.ListItem, {
|
|
70
|
+
componentName: TRIGGER_NAME,
|
|
71
|
+
backgrounded: true,
|
|
72
|
+
radiused: true,
|
|
73
|
+
hoverTheme: true,
|
|
74
|
+
pressTheme: true,
|
|
75
|
+
focusTheme: true,
|
|
76
|
+
focusable: true,
|
|
77
|
+
borderWidth: 1,
|
|
78
|
+
size: context.size,
|
|
79
|
+
"aria-expanded": context.open,
|
|
80
|
+
"aria-autocomplete": "none",
|
|
81
|
+
"aria-labelledby": labelledBy,
|
|
82
|
+
dir: context.dir,
|
|
83
|
+
disabled,
|
|
84
|
+
"data-disabled": disabled ? "" : void 0,
|
|
85
|
+
...triggerProps,
|
|
86
|
+
ref: forwardedRef,
|
|
87
|
+
...process.env.TAMAGUI_TARGET === "web" && context.interactions ? context.interactions.getReferenceProps() : {
|
|
88
|
+
onPress() {
|
|
89
|
+
context.setOpen(!context.open);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
);
|
|
123
95
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
124
96
|
const VALUE_NAME = "SelectValue";
|
|
125
|
-
const SelectValueFrame = (0,
|
|
97
|
+
const SelectValueFrame = (0, import_core2.styled)(import_text.Paragraph, {
|
|
126
98
|
name: VALUE_NAME,
|
|
127
99
|
selectable: false
|
|
128
100
|
});
|
|
129
|
-
const SelectValue = SelectValueFrame.extractable(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
101
|
+
const SelectValue = SelectValueFrame.extractable(
|
|
102
|
+
React.forwardRef(
|
|
103
|
+
({ __scopeSelect, children: childrenProp, placeholder }, forwardedRef) => {
|
|
104
|
+
const context = (0, import_context.useSelectContext)(VALUE_NAME, __scopeSelect);
|
|
105
|
+
const { onValueNodeHasChildrenChange } = context;
|
|
106
|
+
const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.onValueNodeChange);
|
|
107
|
+
const children = childrenProp ?? context.selectedItem;
|
|
108
|
+
const hasChildren = !!children;
|
|
109
|
+
const selectValueChildren = context.value === void 0 && placeholder !== void 0 ? placeholder : children;
|
|
110
|
+
(0, import_core2.useIsomorphicLayoutEffect)(() => {
|
|
111
|
+
onValueNodeHasChildrenChange(hasChildren);
|
|
112
|
+
}, [onValueNodeHasChildrenChange, hasChildren]);
|
|
113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectValueFrame, {
|
|
114
|
+
size: context.size,
|
|
115
|
+
ref: composedRefs,
|
|
116
|
+
pointerEvents: "none",
|
|
117
|
+
children: selectValueChildren
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
);
|
|
143
122
|
SelectValue.displayName = VALUE_NAME;
|
|
144
|
-
const SelectIcon = (0,
|
|
123
|
+
const SelectIcon = (0, import_core2.styled)(import_stacks.XStack, {
|
|
145
124
|
name: "SelectIcon",
|
|
146
125
|
"aria-hidden": true,
|
|
147
|
-
children: /* @__PURE__ */
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
const SelectContent = ({ children, __scopeSelect }) => {
|
|
151
|
-
const context = useSelectContext(CONTENT_NAME, __scopeSelect);
|
|
152
|
-
const themeName = (0, import_core.useThemeName)();
|
|
153
|
-
const contents = /* @__PURE__ */ React.createElement(import_core.Theme, {
|
|
154
|
-
name: themeName
|
|
155
|
-
}, children);
|
|
156
|
-
return /* @__PURE__ */ React.createElement(import_react_dom_interactions.FloatingPortal, null, context.open ? /* @__PURE__ */ React.createElement(import_react_dom_interactions.FloatingOverlay, {
|
|
157
|
-
lockScroll: true
|
|
158
|
-
}, contents) : /* @__PURE__ */ React.createElement("div", {
|
|
159
|
-
style: { display: "none" }
|
|
160
|
-
}, contents));
|
|
161
|
-
};
|
|
162
|
-
const VIEWPORT_NAME = "SelectViewport";
|
|
163
|
-
const SelectViewportFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
|
|
164
|
-
name: VIEWPORT_NAME,
|
|
165
|
-
backgroundColor: "$background",
|
|
166
|
-
elevate: true,
|
|
167
|
-
bordered: true,
|
|
168
|
-
overflow: "scroll",
|
|
169
|
-
userSelect: "none",
|
|
170
|
-
variants: {
|
|
171
|
-
size: {
|
|
172
|
-
"...size": (val, { tokens }) => {
|
|
173
|
-
return {
|
|
174
|
-
borderRadius: tokens.radius[val] ?? val
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
defaultVariants: {
|
|
180
|
-
size: "$2"
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
const SelectViewport = React.forwardRef((props, forwardedRef) => {
|
|
184
|
-
const _a = props, { __scopeSelect, children } = _a, viewportProps = __objRest(_a, ["__scopeSelect", "children"]);
|
|
185
|
-
const context = useSelectContext(VIEWPORT_NAME, __scopeSelect);
|
|
186
|
-
const _b = context.interactions.getFloatingProps(), { style } = _b, floatingProps = __objRest(_b, ["style"]);
|
|
187
|
-
delete style["scrollbarWidth"];
|
|
188
|
-
delete style["listStyleType"];
|
|
189
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("style", {
|
|
190
|
-
dangerouslySetInnerHTML: {
|
|
191
|
-
__html: `[data-tamagui-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-tamagui-select-viewport]::-webkit-scrollbar{display:none}`
|
|
192
|
-
}
|
|
193
|
-
}), /* @__PURE__ */ React.createElement(import_react_dom_interactions.FloatingFocusManager, {
|
|
194
|
-
context: context.floatingContext,
|
|
195
|
-
preventTabbing: true
|
|
196
|
-
}, /* @__PURE__ */ React.createElement(SelectViewportFrame, __spreadValues(__spreadValues(__spreadProps(__spreadValues({
|
|
197
|
-
size: context.size,
|
|
198
|
-
"data-tamagui-select-viewport": "",
|
|
199
|
-
role: "presentation"
|
|
200
|
-
}, viewportProps), {
|
|
201
|
-
ref: forwardedRef
|
|
202
|
-
}), floatingProps), style), children)));
|
|
126
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.Paragraph, {
|
|
127
|
+
children: "\u25BC"
|
|
128
|
+
})
|
|
203
129
|
});
|
|
204
|
-
SelectViewport.displayName = VIEWPORT_NAME;
|
|
205
130
|
const ITEM_NAME = "SelectItem";
|
|
206
|
-
const [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
207
|
-
const SelectItem = React.forwardRef(
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
React.useEffect(() => {
|
|
244
|
-
setValueAtIndex(index, value);
|
|
245
|
-
}, [index]);
|
|
246
|
-
const timeoutRef = React.useRef();
|
|
247
|
-
const [allowMouseUp, setAllowMouseUp] = React.useState(false);
|
|
248
|
-
function handleSelect() {
|
|
249
|
-
setSelectedIndex(index);
|
|
250
|
-
onChange(value);
|
|
251
|
-
setOpen(false);
|
|
252
|
-
}
|
|
253
|
-
React.useLayoutEffect(() => {
|
|
254
|
-
clearTimeout(timeoutRef.current);
|
|
255
|
-
if (open) {
|
|
256
|
-
if (selectedIndex !== index) {
|
|
257
|
-
setAllowMouseUp(true);
|
|
258
|
-
} else {
|
|
259
|
-
timeoutRef.current = setTimeout(() => {
|
|
260
|
-
setAllowMouseUp(true);
|
|
261
|
-
}, 300);
|
|
131
|
+
const [SelectItemContextProvider, useSelectItemContext] = (0, import_context.createSelectContext)(ITEM_NAME);
|
|
132
|
+
const SelectItem = React.forwardRef(
|
|
133
|
+
(props, forwardedRef) => {
|
|
134
|
+
const {
|
|
135
|
+
__scopeSelect,
|
|
136
|
+
value,
|
|
137
|
+
disabled = false,
|
|
138
|
+
textValue: textValueProp,
|
|
139
|
+
index,
|
|
140
|
+
...itemProps
|
|
141
|
+
} = props;
|
|
142
|
+
const context = (0, import_context.useSelectContext)(ITEM_NAME, __scopeSelect);
|
|
143
|
+
const isSelected = context.value === value;
|
|
144
|
+
const textId = (0, import_core3.useId)();
|
|
145
|
+
const {
|
|
146
|
+
selectedIndex,
|
|
147
|
+
setSelectedIndex,
|
|
148
|
+
listRef,
|
|
149
|
+
open,
|
|
150
|
+
setOpen,
|
|
151
|
+
onChange,
|
|
152
|
+
setActiveIndex,
|
|
153
|
+
allowMouseUpRef,
|
|
154
|
+
allowSelectRef,
|
|
155
|
+
setValueAtIndex,
|
|
156
|
+
selectTimeoutRef,
|
|
157
|
+
dataRef
|
|
158
|
+
} = context;
|
|
159
|
+
const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, (node) => {
|
|
160
|
+
if (!import_core.isWeb)
|
|
161
|
+
return;
|
|
162
|
+
if (node instanceof HTMLElement) {
|
|
163
|
+
if (listRef) {
|
|
164
|
+
listRef.current[index] = node;
|
|
165
|
+
}
|
|
262
166
|
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
167
|
+
});
|
|
168
|
+
React.useEffect(() => {
|
|
169
|
+
setValueAtIndex(index, value);
|
|
170
|
+
}, [index, setValueAtIndex, value]);
|
|
171
|
+
function handleSelect() {
|
|
172
|
+
setSelectedIndex(index);
|
|
173
|
+
onChange(value);
|
|
174
|
+
setOpen(false);
|
|
271
175
|
}
|
|
176
|
+
const selectItemProps = context.interactions ? context.interactions.getItemProps({
|
|
177
|
+
onTouchStart() {
|
|
178
|
+
allowSelectRef.current = true;
|
|
179
|
+
allowMouseUpRef.current = false;
|
|
180
|
+
},
|
|
181
|
+
onKeyDown(event) {
|
|
182
|
+
if (event.key === "Enter" || event.key === " " && !(dataRef == null ? void 0 : dataRef.current.typing)) {
|
|
183
|
+
event.preventDefault();
|
|
184
|
+
handleSelect();
|
|
185
|
+
} else {
|
|
186
|
+
allowSelectRef.current = true;
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
onClick() {
|
|
190
|
+
if (allowSelectRef.current) {
|
|
191
|
+
setSelectedIndex(index);
|
|
192
|
+
setOpen(false);
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
onMouseUp() {
|
|
196
|
+
if (!allowMouseUpRef.current) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
if (allowSelectRef.current) {
|
|
200
|
+
handleSelect();
|
|
201
|
+
}
|
|
202
|
+
clearTimeout(selectTimeoutRef.current);
|
|
203
|
+
selectTimeoutRef.current = setTimeout(() => {
|
|
204
|
+
allowSelectRef.current = true;
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
}) : {
|
|
208
|
+
onPress: handleSelect
|
|
209
|
+
};
|
|
210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemContextProvider, {
|
|
211
|
+
scope: __scopeSelect,
|
|
212
|
+
value,
|
|
213
|
+
textId: textId || "",
|
|
214
|
+
isSelected,
|
|
215
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_list_item.ListItem, {
|
|
216
|
+
backgrounded: true,
|
|
217
|
+
pressTheme: true,
|
|
218
|
+
cursor: "",
|
|
219
|
+
focusTheme: true,
|
|
220
|
+
componentName: ITEM_NAME,
|
|
221
|
+
ref: composedRefs,
|
|
222
|
+
"aria-labelledby": textId,
|
|
223
|
+
"aria-selected": isSelected,
|
|
224
|
+
"data-state": isSelected ? "active" : "inactive",
|
|
225
|
+
"aria-disabled": disabled || void 0,
|
|
226
|
+
"data-disabled": disabled ? "" : void 0,
|
|
227
|
+
tabIndex: disabled ? void 0 : -1,
|
|
228
|
+
size: context.size,
|
|
229
|
+
...itemProps,
|
|
230
|
+
...selectItemProps
|
|
231
|
+
})
|
|
232
|
+
});
|
|
272
233
|
}
|
|
273
|
-
|
|
274
|
-
onClick: allowMouseUp ? handleSelect : void 0,
|
|
275
|
-
onMouseUp: allowMouseUp ? handleSelect : void 0,
|
|
276
|
-
onKeyDown: handleKeyDown
|
|
277
|
-
});
|
|
278
|
-
return /* @__PURE__ */ React.createElement(SelectItemContextProvider, {
|
|
279
|
-
scope: __scopeSelect,
|
|
280
|
-
value,
|
|
281
|
-
textId: textId || "",
|
|
282
|
-
isSelected,
|
|
283
|
-
onItemTextChange: React.useCallback((node) => {
|
|
284
|
-
setTextValue((prevTextValue) => prevTextValue || ((node == null ? void 0 : node.textContent) ?? "").trim());
|
|
285
|
-
}, [])
|
|
286
|
-
}, /* @__PURE__ */ React.createElement(import_list_item.ListItem, __spreadValues(__spreadValues({
|
|
287
|
-
backgrounded: true,
|
|
288
|
-
pressTheme: true,
|
|
289
|
-
focusTheme: true,
|
|
290
|
-
componentName: ITEM_NAME,
|
|
291
|
-
ref: composedRefs,
|
|
292
|
-
"aria-labelledby": textId,
|
|
293
|
-
"aria-selected": isSelected && isFocused,
|
|
294
|
-
"data-state": isSelected ? "active" : "inactive",
|
|
295
|
-
"aria-disabled": disabled || void 0,
|
|
296
|
-
"data-disabled": disabled ? "" : void 0,
|
|
297
|
-
tabIndex: disabled ? void 0 : -1,
|
|
298
|
-
size: context.size
|
|
299
|
-
}, itemProps), selectItemProps)));
|
|
300
|
-
});
|
|
234
|
+
);
|
|
301
235
|
SelectItem.displayName = ITEM_NAME;
|
|
302
236
|
const ITEM_TEXT_NAME = "SelectItemText";
|
|
303
|
-
const SelectItemTextFrame = (0,
|
|
237
|
+
const SelectItemTextFrame = (0, import_core2.styled)(import_text.SizableText, {
|
|
304
238
|
name: ITEM_TEXT_NAME,
|
|
305
239
|
selectable: false
|
|
306
240
|
});
|
|
307
|
-
const SelectItemText = React.forwardRef(
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
241
|
+
const SelectItemText = React.forwardRef(
|
|
242
|
+
(props, forwardedRef) => {
|
|
243
|
+
const { __scopeSelect, className, ...itemTextProps } = props;
|
|
244
|
+
const context = (0, import_context.useSelectContext)(ITEM_TEXT_NAME, __scopeSelect);
|
|
245
|
+
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
246
|
+
const ref = React.useRef(null);
|
|
247
|
+
const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);
|
|
248
|
+
const isSelected = Boolean(itemContext.isSelected && context.valueNode);
|
|
249
|
+
const contents = React.useMemo(
|
|
250
|
+
() => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemTextFrame, {
|
|
251
|
+
className,
|
|
252
|
+
size: context.size,
|
|
253
|
+
id: itemContext.textId,
|
|
254
|
+
...itemTextProps,
|
|
255
|
+
ref: composedRefs
|
|
256
|
+
}),
|
|
257
|
+
[props, context.size, className, itemContext.textId]
|
|
258
|
+
);
|
|
259
|
+
React.useEffect(() => {
|
|
260
|
+
if (isSelected) {
|
|
261
|
+
context.setSelectedItem(contents);
|
|
262
|
+
}
|
|
263
|
+
}, [isSelected, contents]);
|
|
264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
265
|
+
children: contents
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
);
|
|
320
269
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
321
270
|
const ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
322
|
-
const SelectItemIndicatorFrame = (0,
|
|
271
|
+
const SelectItemIndicatorFrame = (0, import_core2.styled)(import_stacks.XStack, {
|
|
323
272
|
name: ITEM_TEXT_NAME
|
|
324
273
|
});
|
|
325
|
-
const SelectItemIndicator = React.forwardRef(
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
});
|
|
274
|
+
const SelectItemIndicator = React.forwardRef(
|
|
275
|
+
(props, forwardedRef) => {
|
|
276
|
+
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
277
|
+
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
278
|
+
return itemContext.isSelected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemIndicatorFrame, {
|
|
279
|
+
"aria-hidden": true,
|
|
280
|
+
...itemIndicatorProps,
|
|
281
|
+
ref: forwardedRef
|
|
282
|
+
}) : null;
|
|
283
|
+
}
|
|
284
|
+
);
|
|
334
285
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
335
286
|
const GROUP_NAME = "SelectGroup";
|
|
336
|
-
const [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
337
|
-
const SelectGroupFrame = (0,
|
|
287
|
+
const [SelectGroupContextProvider, useSelectGroupContext] = (0, import_context.createSelectContext)(GROUP_NAME);
|
|
288
|
+
const SelectGroupFrame = (0, import_core2.styled)(import_stacks.YStack, {
|
|
338
289
|
name: GROUP_NAME,
|
|
339
290
|
width: "100%"
|
|
340
291
|
});
|
|
341
|
-
const SelectGroup = React.forwardRef(
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
})
|
|
292
|
+
const SelectGroup = React.forwardRef(
|
|
293
|
+
(props, forwardedRef) => {
|
|
294
|
+
const { __scopeSelect, ...groupProps } = props;
|
|
295
|
+
const groupId = (0, import_core3.useId)();
|
|
296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectGroupContextProvider, {
|
|
297
|
+
scope: __scopeSelect,
|
|
298
|
+
id: groupId || "",
|
|
299
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectGroupFrame, {
|
|
300
|
+
role: "group",
|
|
301
|
+
"aria-labelledby": groupId,
|
|
302
|
+
...groupProps,
|
|
303
|
+
ref: forwardedRef
|
|
304
|
+
})
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
);
|
|
354
308
|
SelectGroup.displayName = GROUP_NAME;
|
|
355
309
|
const LABEL_NAME = "SelectLabel";
|
|
356
|
-
const SelectLabel = React.forwardRef(
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
});
|
|
369
|
-
SelectLabel.displayName = LABEL_NAME;
|
|
370
|
-
const SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
371
|
-
const SelectScrollUpButton = React.forwardRef((props, forwardedRef) => {
|
|
372
|
-
return /* @__PURE__ */ React.createElement(SelectScrollButtonImpl, __spreadProps(__spreadValues({
|
|
373
|
-
componentName: SCROLL_UP_BUTTON_NAME
|
|
374
|
-
}, props), {
|
|
375
|
-
dir: "up",
|
|
376
|
-
ref: forwardedRef
|
|
377
|
-
}));
|
|
378
|
-
});
|
|
379
|
-
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
380
|
-
const SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
381
|
-
const SelectScrollDownButton = React.forwardRef((props, forwardedRef) => {
|
|
382
|
-
return /* @__PURE__ */ React.createElement(SelectScrollButtonImpl, __spreadProps(__spreadValues({
|
|
383
|
-
componentName: SCROLL_DOWN_BUTTON_NAME
|
|
384
|
-
}, props), {
|
|
385
|
-
dir: "down",
|
|
386
|
-
ref: forwardedRef
|
|
387
|
-
}));
|
|
388
|
-
});
|
|
389
|
-
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
390
|
-
const SelectScrollButtonImpl = React.forwardRef((props, forwardedRef) => {
|
|
391
|
-
var _c;
|
|
392
|
-
const _a = props, { __scopeSelect, dir, componentName } = _a, scrollIndicatorProps = __objRest(_a, ["__scopeSelect", "dir", "componentName"]);
|
|
393
|
-
const _b = useSelectContext(componentName, __scopeSelect), { floatingRef, increaseHeight, forceUpdate } = _b, context = __objRest(_b, ["floatingRef", "increaseHeight", "forceUpdate"]);
|
|
394
|
-
const intervalRef = React.useRef();
|
|
395
|
-
const loopingRef = React.useRef(false);
|
|
396
|
-
const isVisible = context[dir === "down" ? "canScrollDown" : "canScrollUp"];
|
|
397
|
-
const { x, y, reference, floating, strategy, update, refs } = (0, import_react_dom_interactions.useFloating)({
|
|
398
|
-
strategy: "fixed",
|
|
399
|
-
placement: dir === "up" ? "top" : "bottom",
|
|
400
|
-
middleware: [(0, import_react_dom_interactions.offset)(({ rects }) => -rects.floating.height)]
|
|
401
|
-
});
|
|
402
|
-
const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, floating);
|
|
403
|
-
React.useLayoutEffect(() => {
|
|
404
|
-
reference(floatingRef.current);
|
|
405
|
-
}, [reference, floatingRef.current]);
|
|
406
|
-
React.useEffect(() => {
|
|
407
|
-
if (!refs.reference.current || !refs.floating.current || !isVisible) {
|
|
408
|
-
return;
|
|
409
|
-
}
|
|
410
|
-
const cleanup = (0, import_react_dom_interactions.autoUpdate)(refs.reference.current, refs.floating.current, update, {
|
|
411
|
-
animationFrame: true
|
|
310
|
+
const SelectLabel = React.forwardRef(
|
|
311
|
+
(props, forwardedRef) => {
|
|
312
|
+
const { __scopeSelect, ...labelProps } = props;
|
|
313
|
+
const context = (0, import_context.useSelectContext)(LABEL_NAME, __scopeSelect);
|
|
314
|
+
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_list_item.ListItem, {
|
|
316
|
+
componentName: LABEL_NAME,
|
|
317
|
+
fontWeight: "800",
|
|
318
|
+
id: groupContext.id,
|
|
319
|
+
size: context.size,
|
|
320
|
+
...labelProps,
|
|
321
|
+
ref: forwardedRef
|
|
412
322
|
});
|
|
413
|
-
return () => {
|
|
414
|
-
clearInterval(intervalRef.current);
|
|
415
|
-
loopingRef.current = false;
|
|
416
|
-
cleanup();
|
|
417
|
-
};
|
|
418
|
-
}, [isVisible, update, refs.floating, refs.reference]);
|
|
419
|
-
if (!isVisible) {
|
|
420
|
-
return null;
|
|
421
323
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
if (floating2) {
|
|
426
|
-
const value = isUp ? -SCROLL_ARROW_VELOCITY : SCROLL_ARROW_VELOCITY;
|
|
427
|
-
const multi = isUp && floating2.scrollTop <= SCROLL_ARROW_THRESHOLD * 2 || !isUp && floating2.scrollTop >= floating2.scrollHeight - floating2.clientHeight - SCROLL_ARROW_THRESHOLD * 2 ? 2 : 1;
|
|
428
|
-
floating2.scrollTop += multi * (isUp ? -SCROLL_ARROW_VELOCITY : SCROLL_ARROW_VELOCITY);
|
|
429
|
-
increaseHeight(floating2, multi === 2 ? value * 2 : value);
|
|
430
|
-
forceUpdate();
|
|
431
|
-
}
|
|
432
|
-
};
|
|
433
|
-
return /* @__PURE__ */ React.createElement(import_stacks.YStack, __spreadProps(__spreadValues({
|
|
434
|
-
ref: composedRefs,
|
|
435
|
-
componentName,
|
|
436
|
-
"aria-hidden": true
|
|
437
|
-
}, scrollIndicatorProps), {
|
|
438
|
-
zIndex: 1e3,
|
|
439
|
-
position: strategy,
|
|
440
|
-
left: x || 0,
|
|
441
|
-
top: y || 0,
|
|
442
|
-
width: `calc(${(((_c = floatingRef.current) == null ? void 0 : _c.offsetWidth) ?? 0) - 2}px)`,
|
|
443
|
-
onPointerMove: () => {
|
|
444
|
-
if (!loopingRef.current) {
|
|
445
|
-
intervalRef.current = setInterval(handleScrollArrowChange, 1e3 / 60);
|
|
446
|
-
loopingRef.current = true;
|
|
447
|
-
}
|
|
448
|
-
},
|
|
449
|
-
onPointerLeave: () => {
|
|
450
|
-
loopingRef.current = false;
|
|
451
|
-
clearInterval(intervalRef.current);
|
|
452
|
-
}
|
|
453
|
-
}));
|
|
454
|
-
});
|
|
455
|
-
const SelectSeparator = (0, import_core.styled)(import_separator.Separator, {
|
|
324
|
+
);
|
|
325
|
+
SelectLabel.displayName = LABEL_NAME;
|
|
326
|
+
const SelectSeparator = (0, import_core2.styled)(import_separator.Separator, {
|
|
456
327
|
name: "SelectSeparator"
|
|
457
328
|
});
|
|
458
|
-
const
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
autoComplete
|
|
473
|
-
} = props;
|
|
474
|
-
const [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
475
|
-
prop: openProp,
|
|
476
|
-
defaultProp: defaultOpen || false,
|
|
477
|
-
onChange: onOpenChange
|
|
329
|
+
const SelectSheetController = (props) => {
|
|
330
|
+
const context = (0, import_context.useSelectContext)("SelectSheetController", props.__scopeSelect);
|
|
331
|
+
const showSheet = (0, import_useSelectBreakpointActive.useShowSelectSheet)(context);
|
|
332
|
+
const breakpointActive = (0, import_useSelectBreakpointActive.useSelectBreakpointActive)(context.sheetBreakpoint);
|
|
333
|
+
const getShowSheet = (0, import_core2.useGet)(showSheet);
|
|
334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sheet.SheetController, {
|
|
335
|
+
onOpenChange: (val) => {
|
|
336
|
+
if (getShowSheet()) {
|
|
337
|
+
props.onOpenChange(val);
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
open: context.open,
|
|
341
|
+
hidden: breakpointActive === false,
|
|
342
|
+
children: props.children
|
|
478
343
|
});
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
344
|
+
};
|
|
345
|
+
const SHEET_CONTENTS_NAME = "SelectSheetContents";
|
|
346
|
+
const SelectSheetContents = ({ __scopeSelect }) => {
|
|
347
|
+
const context = (0, import_context.useSelectContext)(SHEET_CONTENTS_NAME, __scopeSelect);
|
|
348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.PortalHost, {
|
|
349
|
+
name: `${context.scopeKey}SheetContents`
|
|
483
350
|
});
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
const [scrollTop, setScrollTop] = React.useState(0);
|
|
490
|
-
const listItemsRef = React.useRef([]);
|
|
491
|
-
const listContentRef = React.useRef([]);
|
|
492
|
-
const [selectedIndex, setSelectedIndex] = React.useState(Math.max(0, listContentRef.current.indexOf(value)));
|
|
493
|
-
const [controlledScrolling, setControlledScrolling] = React.useState(false);
|
|
494
|
-
const [middlewareType, setMiddlewareType] = React.useState("align");
|
|
495
|
-
(0, import_core.useIsomorphicLayoutEffect)(() => {
|
|
496
|
-
selectedIndexRef.current = selectedIndex;
|
|
497
|
-
activeIndexRef.current = activeIndex;
|
|
351
|
+
};
|
|
352
|
+
SelectSheetContents.displayName = SHEET_CONTENTS_NAME;
|
|
353
|
+
const SelectSheetImpl = (props) => {
|
|
354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
355
|
+
children: props.children
|
|
498
356
|
});
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
357
|
+
};
|
|
358
|
+
const Select = (0, import_core2.withStaticProperties)(
|
|
359
|
+
(props) => {
|
|
360
|
+
const {
|
|
361
|
+
__scopeSelect,
|
|
362
|
+
children,
|
|
363
|
+
open: openProp,
|
|
364
|
+
defaultOpen,
|
|
365
|
+
onOpenChange,
|
|
366
|
+
value: valueProp,
|
|
367
|
+
defaultValue,
|
|
368
|
+
onValueChange,
|
|
369
|
+
size: sizeProp = "$4",
|
|
370
|
+
dir
|
|
371
|
+
} = props;
|
|
372
|
+
const { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
|
|
373
|
+
Contents: SelectSheetContents
|
|
508
374
|
});
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
}
|
|
562
|
-
Object.assign(floating2.style, {
|
|
563
|
-
maxHeight: `${floating2.scrollHeight - Math.abs(top + bottom)}px`,
|
|
564
|
-
minWidth: `${reference2.width + getFloatingPadding(floating2) * 2}px`
|
|
565
|
-
});
|
|
566
|
-
return {
|
|
567
|
-
y: nextY,
|
|
568
|
-
data: {
|
|
569
|
-
y: top,
|
|
570
|
-
skip: true
|
|
571
|
-
},
|
|
572
|
-
reset: {
|
|
573
|
-
rects: true
|
|
574
|
-
}
|
|
575
|
-
};
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
] : [
|
|
579
|
-
(0, import_react_dom_interactions.offset)(5),
|
|
580
|
-
(0, import_react_dom_interactions.flip)(),
|
|
581
|
-
(0, import_react_dom_interactions.size)({
|
|
582
|
-
apply({ rects, availableHeight, elements }) {
|
|
583
|
-
Object.assign(elements.floating.style, {
|
|
584
|
-
width: `${rects.reference.width}px`,
|
|
585
|
-
maxHeight: `${availableHeight}px`
|
|
586
|
-
});
|
|
375
|
+
const sheetBreakpoint = when || false;
|
|
376
|
+
const isSheet = (0, import_useSelectBreakpointActive.useSelectBreakpointActive)(sheetBreakpoint);
|
|
377
|
+
const SelectImpl = isSheet ? SelectSheetImpl : import_SelectImpl.SelectInlineImpl;
|
|
378
|
+
const forceUpdate = React.useReducer(() => ({}), {})[1];
|
|
379
|
+
const [selectedItem, setSelectedItem] = React.useState(null);
|
|
380
|
+
const [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
381
|
+
prop: openProp,
|
|
382
|
+
defaultProp: defaultOpen || false,
|
|
383
|
+
onChange: onOpenChange,
|
|
384
|
+
strategy: "most-recent-wins"
|
|
385
|
+
});
|
|
386
|
+
const [value, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
387
|
+
prop: valueProp,
|
|
388
|
+
defaultProp: defaultValue || "",
|
|
389
|
+
onChange: onValueChange,
|
|
390
|
+
strategy: "most-recent-wins"
|
|
391
|
+
});
|
|
392
|
+
const [activeIndex, setActiveIndex] = React.useState(null);
|
|
393
|
+
const selectedIndexRef = React.useRef(null);
|
|
394
|
+
const activeIndexRef = React.useRef(null);
|
|
395
|
+
const listContentRef = React.useRef([]);
|
|
396
|
+
const [selectedIndex, setSelectedIndex] = React.useState(
|
|
397
|
+
Math.max(0, listContentRef.current.indexOf(value))
|
|
398
|
+
);
|
|
399
|
+
const [valueNode, setValueNode] = React.useState(null);
|
|
400
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React.useState(false);
|
|
401
|
+
(0, import_core2.useIsomorphicLayoutEffect)(() => {
|
|
402
|
+
selectedIndexRef.current = selectedIndex;
|
|
403
|
+
activeIndexRef.current = activeIndex;
|
|
404
|
+
});
|
|
405
|
+
const id = (0, import_core3.useId)();
|
|
406
|
+
const scopeKey = __scopeSelect ? Object.keys(__scopeSelect)[0] ?? id : id;
|
|
407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdaptProvider, {
|
|
408
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_context.SelectProvider, {
|
|
409
|
+
dir,
|
|
410
|
+
blockSelection: false,
|
|
411
|
+
size: sizeProp,
|
|
412
|
+
fallback: false,
|
|
413
|
+
selectedItem,
|
|
414
|
+
setSelectedItem,
|
|
415
|
+
forceUpdate,
|
|
416
|
+
valueNode,
|
|
417
|
+
onValueNodeChange: setValueNode,
|
|
418
|
+
onValueNodeHasChildrenChange: setValueNodeHasChildren,
|
|
419
|
+
valueNodeHasChildren,
|
|
420
|
+
scopeKey,
|
|
421
|
+
sheetBreakpoint,
|
|
422
|
+
scope: __scopeSelect,
|
|
423
|
+
setValueAtIndex: (index, value2) => {
|
|
424
|
+
listContentRef.current[index] = value2;
|
|
587
425
|
},
|
|
588
|
-
|
|
426
|
+
activeIndex,
|
|
427
|
+
onChange: setValue,
|
|
428
|
+
selectedIndex,
|
|
429
|
+
setActiveIndex,
|
|
430
|
+
setOpen,
|
|
431
|
+
setSelectedIndex,
|
|
432
|
+
value,
|
|
433
|
+
open,
|
|
434
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectSheetController, {
|
|
435
|
+
onOpenChange: setOpen,
|
|
436
|
+
__scopeSelect,
|
|
437
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectImpl, {
|
|
438
|
+
activeIndexRef,
|
|
439
|
+
listContentRef,
|
|
440
|
+
selectedIndexRef,
|
|
441
|
+
...props,
|
|
442
|
+
open,
|
|
443
|
+
value,
|
|
444
|
+
children
|
|
445
|
+
})
|
|
446
|
+
})
|
|
589
447
|
})
|
|
590
|
-
]
|
|
591
|
-
});
|
|
592
|
-
const floatingRef = refs.floating;
|
|
593
|
-
const forceUpdate = React.useReducer(() => ({}), {})[1];
|
|
594
|
-
const showUpArrow = showArrows && scrollTop > SCROLL_ARROW_THRESHOLD;
|
|
595
|
-
const showDownArrow = showArrows && floatingRef.current && scrollTop < floatingRef.current.scrollHeight - floatingRef.current.clientHeight - SCROLL_ARROW_THRESHOLD;
|
|
596
|
-
const interactions = (0, import_react_dom_interactions.useInteractions)([
|
|
597
|
-
(0, import_react_dom_interactions.useClick)(context, { pointerDown: true }),
|
|
598
|
-
(0, import_react_dom_interactions.useRole)(context, { role: "listbox" }),
|
|
599
|
-
(0, import_react_dom_interactions.useDismiss)(context),
|
|
600
|
-
(0, import_react_dom_interactions.useListNavigation)(context, {
|
|
601
|
-
listRef: listItemsRef,
|
|
602
|
-
activeIndex,
|
|
603
|
-
selectedIndex,
|
|
604
|
-
onNavigate: setActiveIndex
|
|
605
|
-
}),
|
|
606
|
-
(0, import_react_dom_interactions.useTypeahead)(context, {
|
|
607
|
-
listRef: listContentRef,
|
|
608
|
-
onMatch: open ? setActiveIndex : setSelectedIndex,
|
|
609
|
-
selectedIndex,
|
|
610
|
-
activeIndex
|
|
611
|
-
})
|
|
612
|
-
]);
|
|
613
|
-
const increaseHeight = React.useCallback((floating2, amount = 0) => {
|
|
614
|
-
if (middlewareType === "fallback") {
|
|
615
|
-
return;
|
|
616
|
-
}
|
|
617
|
-
const currentMaxHeight = Number(floating2.style.maxHeight.replace("px", ""));
|
|
618
|
-
const currentTop = Number(floating2.style.top.replace("px", ""));
|
|
619
|
-
const rect = floating2.getBoundingClientRect();
|
|
620
|
-
const rectTop = rect.top;
|
|
621
|
-
const rectBottom = rect.bottom;
|
|
622
|
-
const viewportHeight = (visualViewport == null ? void 0 : visualViewport.height) ?? 0;
|
|
623
|
-
const visualMaxHeight = viewportHeight - WINDOW_PADDING * 2;
|
|
624
|
-
if (amount < 0 && selectedIndexRef.current != null && Math.round(rectBottom) < Math.round(viewportHeight + getVisualOffsetTop() - WINDOW_PADDING)) {
|
|
625
|
-
floating2.style.maxHeight = `${Math.min(visualMaxHeight, currentMaxHeight - amount)}px`;
|
|
626
|
-
}
|
|
627
|
-
if (amount > 0 && Math.round(rectTop) > Math.round(WINDOW_PADDING - getVisualOffsetTop()) && floating2.scrollHeight > floating2.offsetHeight) {
|
|
628
|
-
const nextTop = Math.max(WINDOW_PADDING + getVisualOffsetTop(), currentTop - amount);
|
|
629
|
-
const nextMaxHeight = Math.min(visualMaxHeight, currentMaxHeight + amount);
|
|
630
|
-
Object.assign(floating2.style, {
|
|
631
|
-
maxHeight: `${nextMaxHeight}px`,
|
|
632
|
-
top: `${nextTop}px`
|
|
633
|
-
});
|
|
634
|
-
if (nextTop - WINDOW_PADDING > getVisualOffsetTop()) {
|
|
635
|
-
floating2.scrollTop -= nextMaxHeight - currentMaxHeight + getFloatingPadding(floating2);
|
|
636
|
-
}
|
|
637
|
-
return currentTop - nextTop;
|
|
638
|
-
}
|
|
639
|
-
}, [middlewareType]);
|
|
640
|
-
const touchPageYRef = React.useRef(null);
|
|
641
|
-
const handleWheel = React.useCallback((event) => {
|
|
642
|
-
var _a;
|
|
643
|
-
const pinching = event.ctrlKey;
|
|
644
|
-
const currentTarget = event.currentTarget;
|
|
645
|
-
function isWheelEvent(event2) {
|
|
646
|
-
return typeof event2.deltaY === "number";
|
|
647
|
-
}
|
|
648
|
-
function isTouchEvent(event2) {
|
|
649
|
-
return event2.touches != null;
|
|
650
|
-
}
|
|
651
|
-
if (Math.abs(((currentTarget == null ? void 0 : currentTarget.offsetHeight) ?? 0) - (((visualViewport == null ? void 0 : visualViewport.height) ?? 0) - WINDOW_PADDING * 2)) > 1 && !pinching) {
|
|
652
|
-
event.preventDefault();
|
|
653
|
-
} else if (isWheelEvent(event) && isFirefox) {
|
|
654
|
-
currentTarget.scrollTop += event.deltaY;
|
|
655
|
-
}
|
|
656
|
-
if (!pinching) {
|
|
657
|
-
let delta = 5;
|
|
658
|
-
if (isTouchEvent(event)) {
|
|
659
|
-
const currentPageY = touchPageYRef.current;
|
|
660
|
-
const pageY = (_a = event.touches[0]) == null ? void 0 : _a.pageY;
|
|
661
|
-
if (pageY != null) {
|
|
662
|
-
touchPageYRef.current = pageY;
|
|
663
|
-
if (currentPageY != null) {
|
|
664
|
-
delta = currentPageY - pageY;
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
increaseHeight(currentTarget, isWheelEvent(event) ? event.deltaY : delta);
|
|
669
|
-
setScrollTop(currentTarget.scrollTop);
|
|
670
|
-
forceUpdate();
|
|
671
|
-
}
|
|
672
|
-
}, [increaseHeight, forceUpdate]);
|
|
673
|
-
React.useEffect(() => {
|
|
674
|
-
function onTouchEnd() {
|
|
675
|
-
touchPageYRef.current = null;
|
|
676
|
-
}
|
|
677
|
-
const floating2 = floatingRef.current;
|
|
678
|
-
if (open && floating2 && middlewareType === "align") {
|
|
679
|
-
floating2.addEventListener("wheel", handleWheel);
|
|
680
|
-
floating2.addEventListener("touchmove", handleWheel);
|
|
681
|
-
floating2.addEventListener("touchend", onTouchEnd, { passive: true });
|
|
682
|
-
return () => {
|
|
683
|
-
floating2.removeEventListener("wheel", handleWheel);
|
|
684
|
-
floating2.removeEventListener("touchmove", handleWheel);
|
|
685
|
-
floating2.removeEventListener("touchend", onTouchEnd);
|
|
686
|
-
};
|
|
687
|
-
}
|
|
688
|
-
}, [open, floatingRef, handleWheel, middlewareType]);
|
|
689
|
-
React.useEffect(() => {
|
|
690
|
-
window.addEventListener("resize", update);
|
|
691
|
-
return () => {
|
|
692
|
-
window.removeEventListener("resize", update);
|
|
693
|
-
};
|
|
694
|
-
}, [update]);
|
|
695
|
-
React.useLayoutEffect(() => {
|
|
696
|
-
var _a;
|
|
697
|
-
const floating2 = floatingRef.current;
|
|
698
|
-
if (open && controlledScrolling && floating2) {
|
|
699
|
-
const item = activeIndex != null ? listItemsRef.current[activeIndex] : selectedIndex != null ? listItemsRef.current[selectedIndex] : null;
|
|
700
|
-
if (item && prevActiveIndex != null) {
|
|
701
|
-
const itemHeight = ((_a = listItemsRef.current[prevActiveIndex]) == null ? void 0 : _a.offsetHeight) ?? 0;
|
|
702
|
-
const floatingHeight = floating2.offsetHeight;
|
|
703
|
-
const top = item.offsetTop;
|
|
704
|
-
const bottom = top + itemHeight;
|
|
705
|
-
if (top < floating2.scrollTop + 20) {
|
|
706
|
-
const diff = floating2.scrollTop - top + 20;
|
|
707
|
-
floating2.scrollTop -= diff;
|
|
708
|
-
if (activeIndex != selectedIndex && activeIndex != null) {
|
|
709
|
-
increaseHeight(floating2, -diff);
|
|
710
|
-
}
|
|
711
|
-
} else if (bottom > floatingHeight + floating2.scrollTop - 20) {
|
|
712
|
-
const diff = bottom - floatingHeight - floating2.scrollTop + 20;
|
|
713
|
-
floating2.scrollTop += diff;
|
|
714
|
-
if (activeIndex != selectedIndex && activeIndex != null) {
|
|
715
|
-
floating2.scrollTop -= increaseHeight(floating2, diff) ?? 0;
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
}, [
|
|
721
|
-
open,
|
|
722
|
-
controlledScrolling,
|
|
723
|
-
prevActiveIndex,
|
|
724
|
-
activeIndex,
|
|
725
|
-
selectedIndex,
|
|
726
|
-
floatingRef,
|
|
727
|
-
increaseHeight
|
|
728
|
-
]);
|
|
729
|
-
React.useLayoutEffect(() => {
|
|
730
|
-
var _a;
|
|
731
|
-
const floating2 = refs.floating.current;
|
|
732
|
-
const reference2 = refs.reference.current;
|
|
733
|
-
if (open && floating2 && reference2 && floating2.offsetHeight < floating2.scrollHeight) {
|
|
734
|
-
const referenceRect = reference2.getBoundingClientRect();
|
|
735
|
-
if (middlewareType === "fallback") {
|
|
736
|
-
const item = listItemsRef.current[selectedIndex];
|
|
737
|
-
if (item) {
|
|
738
|
-
floating2.scrollTop = item.offsetTop - floating2.clientHeight + referenceRect.height;
|
|
739
|
-
}
|
|
740
|
-
return;
|
|
741
|
-
}
|
|
742
|
-
floating2.scrollTop = (_a = middlewareData.size) == null ? void 0 : _a.y;
|
|
743
|
-
const closeToBottom = ((visualViewport == null ? void 0 : visualViewport.height) ?? 0) + getVisualOffsetTop() - referenceRect.bottom < FALLBACK_THRESHOLD;
|
|
744
|
-
const closeToTop = referenceRect.top < FALLBACK_THRESHOLD;
|
|
745
|
-
if (floating2.offsetHeight < MIN_HEIGHT || closeToTop || closeToBottom) {
|
|
746
|
-
setMiddlewareType("fallback");
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
}, [
|
|
750
|
-
open,
|
|
751
|
-
increaseHeight,
|
|
752
|
-
selectedIndex,
|
|
753
|
-
middlewareType,
|
|
754
|
-
refs.floating,
|
|
755
|
-
refs.reference,
|
|
756
|
-
middlewareData
|
|
757
|
-
]);
|
|
758
|
-
React.useLayoutEffect(() => {
|
|
759
|
-
if (open && selectedIndex != null) {
|
|
760
|
-
requestAnimationFrame(() => {
|
|
761
|
-
var _a;
|
|
762
|
-
(_a = listItemsRef.current[selectedIndex]) == null ? void 0 : _a.focus({ preventScroll: true });
|
|
763
|
-
});
|
|
764
|
-
}
|
|
765
|
-
}, [listItemsRef, selectedIndex, open]);
|
|
766
|
-
React.useEffect(() => {
|
|
767
|
-
const frame = requestAnimationFrame(() => {
|
|
768
|
-
setShowArrows(open);
|
|
769
|
-
if (!open) {
|
|
770
|
-
setScrollTop(0);
|
|
771
|
-
setMiddlewareType("align");
|
|
772
|
-
setActiveIndex(null);
|
|
773
|
-
setControlledScrolling(false);
|
|
774
|
-
}
|
|
775
448
|
});
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
ref: reference,
|
|
797
|
-
className: "SelectTrigger",
|
|
798
|
-
onKeyDown(event) {
|
|
799
|
-
if (event.key === "Enter" || event.key === " " && !context.dataRef.current.typing) {
|
|
800
|
-
event.preventDefault();
|
|
801
|
-
setOpen(true);
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
});
|
|
805
|
-
},
|
|
806
|
-
getFloatingProps(props2) {
|
|
807
|
-
return interactions.getFloatingProps(__spreadProps(__spreadValues({
|
|
808
|
-
ref: floating,
|
|
809
|
-
className: "Select"
|
|
810
|
-
}, props2), {
|
|
811
|
-
style: __spreadValues({
|
|
812
|
-
position: strategy,
|
|
813
|
-
top: y ?? "",
|
|
814
|
-
left: x ?? "",
|
|
815
|
-
outline: 0,
|
|
816
|
-
listStyleType: "none",
|
|
817
|
-
scrollbarWidth: "none",
|
|
818
|
-
userSelect: "none"
|
|
819
|
-
}, props2 == null ? void 0 : props2.style),
|
|
820
|
-
onPointerEnter() {
|
|
821
|
-
setControlledScrolling(false);
|
|
822
|
-
},
|
|
823
|
-
onPointerMove() {
|
|
824
|
-
setControlledScrolling(false);
|
|
825
|
-
},
|
|
826
|
-
onKeyDown() {
|
|
827
|
-
setControlledScrolling(true);
|
|
828
|
-
},
|
|
829
|
-
onScroll(event) {
|
|
830
|
-
setScrollTop(event.currentTarget.scrollTop);
|
|
831
|
-
}
|
|
832
|
-
}));
|
|
833
|
-
}
|
|
834
|
-
}),
|
|
835
|
-
floatingContext: context,
|
|
836
|
-
activeIndex,
|
|
837
|
-
canScrollDown: !!showDownArrow,
|
|
838
|
-
canScrollUp: !!showUpArrow,
|
|
839
|
-
controlledScrolling: true,
|
|
840
|
-
dataRef: context.dataRef,
|
|
841
|
-
listRef: listItemsRef,
|
|
842
|
-
onChange: setValue,
|
|
843
|
-
selectedIndex,
|
|
844
|
-
setActiveIndex,
|
|
845
|
-
setOpen,
|
|
846
|
-
setSelectedIndex,
|
|
847
|
-
value,
|
|
848
|
-
open
|
|
849
|
-
}, children);
|
|
850
|
-
}, {
|
|
851
|
-
Content: SelectContent,
|
|
852
|
-
Group: SelectGroup,
|
|
853
|
-
Icon: SelectIcon,
|
|
854
|
-
Item: SelectItem,
|
|
855
|
-
ItemIndicator: SelectItemIndicator,
|
|
856
|
-
ItemText: SelectItemText,
|
|
857
|
-
Label: SelectLabel,
|
|
858
|
-
ScrollDownButton: SelectScrollDownButton,
|
|
859
|
-
ScrollUpButton: SelectScrollUpButton,
|
|
860
|
-
Trigger: SelectTrigger,
|
|
861
|
-
Value: SelectValue,
|
|
862
|
-
Viewport: SelectViewport
|
|
863
|
-
});
|
|
864
|
-
Select.displayName = SELECT_NAME;
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
Adapt: import_adapt.Adapt,
|
|
452
|
+
Content: import_SelectContent.SelectContent,
|
|
453
|
+
Group: SelectGroup,
|
|
454
|
+
Icon: SelectIcon,
|
|
455
|
+
Item: SelectItem,
|
|
456
|
+
ItemIndicator: SelectItemIndicator,
|
|
457
|
+
ItemText: SelectItemText,
|
|
458
|
+
Label: SelectLabel,
|
|
459
|
+
ScrollDownButton: import_SelectScrollButton.SelectScrollDownButton,
|
|
460
|
+
ScrollUpButton: import_SelectScrollButton.SelectScrollUpButton,
|
|
461
|
+
Trigger: SelectTrigger,
|
|
462
|
+
Value: SelectValue,
|
|
463
|
+
Viewport: import_SelectViewport.SelectViewport,
|
|
464
|
+
SheetContents: SelectSheetContents,
|
|
465
|
+
Sheet: import_sheet.ControlledSheet
|
|
466
|
+
}
|
|
467
|
+
);
|
|
468
|
+
Select.displayName = import_constants.SELECT_NAME;
|
|
865
469
|
// Annotate the CommonJS export names for ESM import in node:
|
|
866
470
|
0 && (module.exports = {
|
|
867
471
|
Select,
|
|
@@ -870,9 +474,7 @@ Select.displayName = SELECT_NAME;
|
|
|
870
474
|
SelectItem,
|
|
871
475
|
SelectItemTextFrame,
|
|
872
476
|
SelectSeparator,
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
SelectViewportFrame,
|
|
876
|
-
createSelectScope
|
|
477
|
+
SelectSheetContents,
|
|
478
|
+
SelectTrigger
|
|
877
479
|
});
|
|
878
480
|
//# sourceMappingURL=Select.js.map
|