@tamagui/select 3.0.0-beta.924.1 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Select.cjs +23 -25
- package/dist/cjs/Select.native.cjs +27 -26
- package/dist/cjs/Select.native.js +27 -26
- package/dist/cjs/Select.native.js.map +1 -1
- package/dist/cjs/SelectImpl.cjs +67 -63
- package/dist/cjs/SelectItem.cjs +49 -60
- package/dist/cjs/SelectItem.native.cjs +51 -79
- package/dist/cjs/SelectItem.native.js +51 -79
- package/dist/cjs/SelectItem.native.js.map +1 -1
- package/dist/cjs/SelectScrollButton.cjs +9 -25
- package/dist/cjs/SelectTrigger.cjs +22 -5
- package/dist/cjs/SelectTrigger.native.cjs +15 -5
- package/dist/cjs/SelectTrigger.native.js +15 -5
- package/dist/cjs/SelectTrigger.native.js.map +1 -1
- package/dist/cjs/SelectViewport.cjs +29 -32
- package/dist/cjs/SelectViewport.native.cjs +2 -2
- package/dist/cjs/SelectViewport.native.js +2 -2
- package/dist/cjs/SelectViewport.native.js.map +1 -1
- package/dist/cjs/selectionController.cjs +15 -5
- package/dist/cjs/selectionController.native.cjs +20 -15
- package/dist/cjs/selectionController.native.js +20 -15
- package/dist/cjs/selectionController.native.js.map +1 -1
- package/dist/esm/Select.mjs +27 -28
- package/dist/esm/Select.mjs.map +1 -1
- package/dist/esm/Select.native.js +31 -29
- package/dist/esm/Select.native.js.map +1 -1
- package/dist/esm/SelectImpl.mjs +68 -64
- package/dist/esm/SelectImpl.mjs.map +1 -1
- package/dist/esm/SelectItem.mjs +50 -61
- package/dist/esm/SelectItem.mjs.map +1 -1
- package/dist/esm/SelectItem.native.js +52 -80
- package/dist/esm/SelectItem.native.js.map +1 -1
- package/dist/esm/SelectScrollButton.mjs +10 -26
- package/dist/esm/SelectScrollButton.mjs.map +1 -1
- package/dist/esm/SelectTrigger.mjs +16 -5
- package/dist/esm/SelectTrigger.mjs.map +1 -1
- package/dist/esm/SelectTrigger.native.js +15 -4
- package/dist/esm/SelectTrigger.native.js.map +1 -1
- package/dist/esm/SelectViewport.mjs +30 -33
- package/dist/esm/SelectViewport.mjs.map +1 -1
- package/dist/esm/SelectViewport.native.js +3 -3
- package/dist/esm/SelectViewport.native.js.map +1 -1
- package/dist/esm/selectionController.mjs +15 -5
- package/dist/esm/selectionController.mjs.map +1 -1
- package/dist/esm/selectionController.native.js +20 -15
- package/dist/esm/selectionController.native.js.map +1 -1
- package/dist/jsx/Select.mjs +27 -28
- package/dist/jsx/Select.mjs.map +1 -1
- package/dist/jsx/Select.native.cjs +27 -26
- package/dist/jsx/Select.native.js +27 -26
- package/dist/jsx/Select.native.js.map +1 -1
- package/dist/jsx/SelectImpl.mjs +68 -64
- package/dist/jsx/SelectImpl.mjs.map +1 -1
- package/dist/jsx/SelectItem.mjs +50 -61
- package/dist/jsx/SelectItem.mjs.map +1 -1
- package/dist/jsx/SelectItem.native.cjs +51 -79
- package/dist/jsx/SelectItem.native.js +51 -79
- package/dist/jsx/SelectItem.native.js.map +1 -1
- package/dist/jsx/SelectScrollButton.mjs +10 -26
- package/dist/jsx/SelectScrollButton.mjs.map +1 -1
- package/dist/jsx/SelectTrigger.mjs +16 -5
- package/dist/jsx/SelectTrigger.mjs.map +1 -1
- package/dist/jsx/SelectTrigger.native.cjs +15 -5
- package/dist/jsx/SelectTrigger.native.js +15 -5
- package/dist/jsx/SelectTrigger.native.js.map +1 -1
- package/dist/jsx/SelectViewport.mjs +30 -33
- package/dist/jsx/SelectViewport.mjs.map +1 -1
- package/dist/jsx/SelectViewport.native.cjs +2 -2
- package/dist/jsx/SelectViewport.native.js +2 -2
- package/dist/jsx/SelectViewport.native.js.map +1 -1
- package/dist/jsx/selectionController.mjs +15 -5
- package/dist/jsx/selectionController.mjs.map +1 -1
- package/dist/jsx/selectionController.native.cjs +20 -15
- package/dist/jsx/selectionController.native.js +20 -15
- package/dist/jsx/selectionController.native.js.map +1 -1
- package/package.json +30 -29
- package/src/Select.tsx +41 -41
- package/src/SelectImpl.tsx +107 -95
- package/src/SelectItem.tsx +66 -91
- package/src/SelectScrollButton.tsx +14 -32
- package/src/SelectTrigger.tsx +19 -2
- package/src/SelectViewport.native.tsx +4 -4
- package/src/SelectViewport.tsx +34 -30
- package/src/selectionController.ts +20 -5
- package/src/types.tsx +26 -22
- package/types/Select.d.ts +42 -81
- package/types/Select.d.ts.map +1 -1
- package/types/SelectImpl.d.ts.map +1 -1
- package/types/SelectItem.d.ts +3 -5
- package/types/SelectItem.d.ts.map +1 -1
- package/types/SelectItemText.d.ts +3 -5
- package/types/SelectItemText.d.ts.map +1 -1
- package/types/SelectScrollButton.d.ts +5 -9
- package/types/SelectScrollButton.d.ts.map +1 -1
- package/types/SelectScrollButton.native.d.ts +5 -9
- package/types/SelectScrollButton.native.d.ts.map +1 -1
- package/types/SelectTrigger.d.ts +3 -5
- package/types/SelectTrigger.d.ts.map +1 -1
- package/types/SelectViewport.d.ts +4 -9
- package/types/SelectViewport.d.ts.map +1 -1
- package/types/SelectViewport.native.d.ts +4 -9
- package/types/SelectViewport.native.d.ts.map +1 -1
- package/types/selectionController.d.ts +2 -0
- package/types/selectionController.d.ts.map +1 -1
- package/types/types.d.ts +30 -22
- package/types/types.d.ts.map +1 -1
|
@@ -71,6 +71,12 @@ var SelectValue = (0, import_core.createStyledHOC)(SelectValueFrame, function Se
|
|
|
71
71
|
var itemParentContext = (0, import_context.useSelectItemParentContext)(scope);
|
|
72
72
|
var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.onValueNodeChange);
|
|
73
73
|
var isEmptyValue = context.selectedValues.length === 0;
|
|
74
|
+
var [, rerender] = React.useReducer(function(version) {
|
|
75
|
+
return version + 1;
|
|
76
|
+
}, 0);
|
|
77
|
+
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
78
|
+
return itemParentContext.registry.subscribe(rerender);
|
|
79
|
+
}, [itemParentContext.registry]);
|
|
74
80
|
var _itemParentContext_registry_getItem_label;
|
|
75
81
|
var registeredValue = context.mode === "multiple" ? context.selectedValues.map(function(value, index) {
|
|
76
82
|
var _itemParentContext_registry_getItem2;
|
|
@@ -116,7 +122,7 @@ var SelectIndicator = (0, import_core.createStyledHOC)(SelectIndicatorFrame, fun
|
|
|
116
122
|
var context = (0, import_context.useSelectContext)(scope);
|
|
117
123
|
var [layout, setLayout] = React.useState(null);
|
|
118
124
|
var rafRef = React.useRef(0);
|
|
119
|
-
|
|
125
|
+
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
120
126
|
var update = function(index) {
|
|
121
127
|
if (typeof index !== "number") return;
|
|
122
128
|
cancelAnimationFrame(rafRef.current);
|
|
@@ -223,6 +229,7 @@ function SelectRoot(props) {
|
|
|
223
229
|
}, [requestOpenChange]);
|
|
224
230
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptParent, {
|
|
225
231
|
scope: adaptScope,
|
|
232
|
+
adaptChildren: props.children,
|
|
226
233
|
open,
|
|
227
234
|
onOpenChange: handleAdaptOpenChange,
|
|
228
235
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectInner, {
|
|
@@ -267,7 +274,6 @@ function useEmitter() {
|
|
|
267
274
|
}, [])];
|
|
268
275
|
}
|
|
269
276
|
function SelectInner(props) {
|
|
270
|
-
var _registry_getItems_activeIndex, _controller_selectionAnchor;
|
|
271
277
|
var { scope = "", adaptScope, native, children, open, requestOpenChange, defaultOpen: _defaultOpen, onOpenChange: _onOpenChange, value: valueProp, defaultValue, onValueChange, multiple = false, name, form, disablePreventBodyScroll, size: sizeProp = true, onActiveChange, dir, id, renderValue, lazyMount, zIndex } = props;
|
|
272
278
|
var SelectImpl = (0, import_adapt.useAdaptIsActive)(adaptScope) ? SelectSheetImpl : import_SelectImpl.SelectInlineImpl;
|
|
273
279
|
var mode = multiple ? "multiple" : "single";
|
|
@@ -310,28 +316,32 @@ function SelectInner(props) {
|
|
|
310
316
|
});
|
|
311
317
|
}, [props.id, requestOpenChange]);
|
|
312
318
|
var activeIndexRef = React.useRef(null);
|
|
313
|
-
var [activeIndex, setActiveIndexState] = React.useState(null);
|
|
314
319
|
var [emitActiveIndex, activeIndexSubscribe] = useEmitter();
|
|
315
320
|
var selectedIndexRef = React.useRef(null);
|
|
321
|
+
var lastPointerRef = React.useRef({
|
|
322
|
+
x: -1,
|
|
323
|
+
y: -1
|
|
324
|
+
});
|
|
316
325
|
var listContentRef = React.useRef([]);
|
|
317
326
|
var listRef = React.useRef([]);
|
|
318
327
|
var [valueNode, setValueNode] = React.useState(null);
|
|
319
328
|
var selectedIndex = Math.max(0, controller.selectionAnchorIndex());
|
|
320
329
|
listContentRef.current = registry.getTypeaheadLabels();
|
|
321
|
-
|
|
330
|
+
var itemNodes = registry.getNodes();
|
|
331
|
+
listRef.current.length = itemNodes.length;
|
|
332
|
+
for (var i = 0; i < itemNodes.length; i++) listRef.current[i] = itemNodes[i];
|
|
322
333
|
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
323
334
|
selectedIndexRef.current = selectedIndex;
|
|
324
335
|
});
|
|
325
336
|
var shouldRenderWebNative = import_constants.isWeb && (native === true || native === "web" || Array.isArray(native) && native.includes("web"));
|
|
326
|
-
var
|
|
327
|
-
if (activeIndexRef.current
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
}
|
|
337
|
+
var setActiveIndex = React.useCallback(function(index, details) {
|
|
338
|
+
if (activeIndexRef.current === index) return;
|
|
339
|
+
activeIndexRef.current = index;
|
|
340
|
+
controller.setActiveIndex(index);
|
|
341
|
+
emitActiveIndex(index);
|
|
342
|
+
if (typeof index === "number") {
|
|
343
|
+
var item = registry.getItems()[index];
|
|
344
|
+
if (item && details) onActiveChange === null || onActiveChange === void 0 || onActiveChange(item.value, details);
|
|
335
345
|
}
|
|
336
346
|
}, [
|
|
337
347
|
controller,
|
|
@@ -339,10 +349,6 @@ function SelectInner(props) {
|
|
|
339
349
|
onActiveChange,
|
|
340
350
|
registry
|
|
341
351
|
]);
|
|
342
|
-
var setActiveIndex = React.useCallback(function(index, details) {
|
|
343
|
-
setActiveIndexFast(index, details);
|
|
344
|
-
setActiveIndexState(index);
|
|
345
|
-
}, [setActiveIndexFast]);
|
|
346
352
|
var activeDetails = React.useCallback(function(reason, index, event) {
|
|
347
353
|
return {
|
|
348
354
|
reason,
|
|
@@ -389,10 +395,7 @@ function SelectInner(props) {
|
|
|
389
395
|
if (open) {
|
|
390
396
|
var nextIndex = controller.initialActiveIndex();
|
|
391
397
|
if (nextIndex >= 0) setActiveIndex(nextIndex, activeDetails("list-navigation", nextIndex));
|
|
392
|
-
} else
|
|
393
|
-
setActiveIndexFast(null);
|
|
394
|
-
setActiveIndexState(null);
|
|
395
|
-
}
|
|
398
|
+
} else setActiveIndex(null);
|
|
396
399
|
}, [
|
|
397
400
|
open,
|
|
398
401
|
selectedIndex,
|
|
@@ -440,7 +443,9 @@ function SelectInner(props) {
|
|
|
440
443
|
selectValue,
|
|
441
444
|
changeNativeValue,
|
|
442
445
|
shouldRenderWebNative,
|
|
443
|
-
|
|
446
|
+
setActiveIndex,
|
|
447
|
+
selectedIndex,
|
|
448
|
+
lastPointerRef,
|
|
444
449
|
listRef,
|
|
445
450
|
moveActive,
|
|
446
451
|
search,
|
|
@@ -454,15 +459,12 @@ function SelectInner(props) {
|
|
|
454
459
|
fallback: false,
|
|
455
460
|
valueNode,
|
|
456
461
|
onValueNodeChange: setValueNode,
|
|
457
|
-
activeIndex,
|
|
458
462
|
activeIndexRef,
|
|
459
463
|
selectedIndex,
|
|
460
464
|
setActiveIndex,
|
|
461
465
|
value,
|
|
462
466
|
mode,
|
|
463
467
|
selectedValues,
|
|
464
|
-
activeItem: activeIndex == null ? void 0 : (_registry_getItems_activeIndex = registry.getItems()[activeIndex]) === null || _registry_getItems_activeIndex === void 0 ? void 0 : _registry_getItems_activeIndex.value,
|
|
465
|
-
selectionAnchor: (_controller_selectionAnchor = controller.selectionAnchor()) === null || _controller_selectionAnchor === void 0 ? void 0 : _controller_selectionAnchor.value,
|
|
466
468
|
open,
|
|
467
469
|
native,
|
|
468
470
|
renderValue,
|
|
@@ -471,7 +473,6 @@ function SelectInner(props) {
|
|
|
471
473
|
activeIndexRef,
|
|
472
474
|
listContentRef,
|
|
473
475
|
selectedIndexRef,
|
|
474
|
-
setActiveIndexFast,
|
|
475
476
|
...props,
|
|
476
477
|
open,
|
|
477
478
|
value,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.native.js","names":[],"sources":["jsx/Select.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n\t// If the importer is in node compatibility mode or this is not an ESM\n\t// file that has been converted to a CommonJS file using a Babel-\n\t// compatible transform (i.e. \"__esModule\" has not been set), then set\n\t// \"default\" to the CommonJS \"module.exports\" for node compatibility.\n\tisNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\t\tvalue: mod,\n\t\tenumerable: true\n\t}) : target,\n\tmod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Select_exports = {};\n__export(Select_exports, {\n\tSelect: () => Select,\n\tSelectGroup: () => SelectGroup,\n\tSelectGroupFrame: () => SelectGroupFrame,\n\tSelectIcon: () => SelectIcon,\n\tSelectIndicator: () => SelectIndicator,\n\tSelectIndicatorFrame: () => SelectIndicatorFrame,\n\tSelectItemIndicator: () => SelectItemIndicator,\n\tSelectItemIndicatorFrame: () => SelectItemIndicatorFrame,\n\tSelectLabel: () => SelectLabel,\n\tSelectLabelFrame: () => SelectLabelFrame,\n\tSelectRoot: () => SelectRoot,\n\tSelectSeparator: () => SelectSeparator,\n\tSelectValue: () => SelectValue,\n\tSelectValueFrame: () => SelectValueFrame\n});\nmodule.exports = __toCommonJS(Select_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_adapt = require(\"@tamagui/adapt\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core = require(\"@tamagui/core\");\nvar import_focus_scope = require(\"@tamagui/focus-scope\");\nvar import_focusable = require(\"@tamagui/focusable\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_use_controllable_state = require(\"@tamagui/use-controllable-state\");\nvar React = __toESM(require(\"react\"), 1);\nvar import_context = require(\"./context\");\nvar import_SelectContent = require(\"./SelectContent\");\nvar import_SelectImpl = require(\"./SelectImpl\");\nvar import_SelectItem = require(\"./SelectItem\");\nvar import_SelectItemText = require(\"./SelectItemText\");\nvar import_SelectScrollButton = require(\"./SelectScrollButton\");\nvar import_SelectTrigger = require(\"./SelectTrigger\");\nvar import_SelectViewport = require(\"./SelectViewport\");\nvar import_selectionController = require(\"./selectionController\");\nvar SelectValueFrame = (0, import_core.styled)(import_core.Text, { displayName: \"SelectValue\" });\nvar SelectValue = (0, import_core.createStyledHOC)(SelectValueFrame, function SelectValue2(param, forwardedRef) {\n\tvar { scope, children: childrenProp, placeholder, ...props } = param;\n\tvar _itemParentContext_registry_getItem;\n\tvar context = (0, import_context.useSelectContext)(scope);\n\tvar itemParentContext = (0, import_context.useSelectItemParentContext)(scope);\n\tvar composedRefs = (0, import_compose_refs.useComposedRefs)(\n\t\t// @ts-ignore react 19 ref type mismatch\n\t\tforwardedRef,\n\t\tcontext.onValueNodeChange\n\t);\n\tvar isEmptyValue = context.selectedValues.length === 0;\n\tvar _itemParentContext_registry_getItem_label;\n\tvar registeredValue = context.mode === \"multiple\" ? context.selectedValues.map(function(value, index) {\n\t\tvar _itemParentContext_registry_getItem2;\n\t\tvar _itemParentContext_registry_getItem_label2;\n\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(React.Fragment, { children: [index > 0 ? \", \" : null, (_itemParentContext_registry_getItem_label2 = (_itemParentContext_registry_getItem2 = itemParentContext.registry.getItem(value)) === null || _itemParentContext_registry_getItem2 === void 0 ? void 0 : _itemParentContext_registry_getItem2.label) !== null && _itemParentContext_registry_getItem_label2 !== void 0 ? _itemParentContext_registry_getItem_label2 : value] }, value);\n\t}) : (_itemParentContext_registry_getItem_label = (_itemParentContext_registry_getItem = itemParentContext.registry.getItem(context.selectedValues[0])) === null || _itemParentContext_registry_getItem === void 0 ? void 0 : _itemParentContext_registry_getItem.label) !== null && _itemParentContext_registry_getItem_label !== void 0 ? _itemParentContext_registry_getItem_label : context.value;\n\tvar children = childrenProp !== void 0 ? childrenProp : context.renderValue ? context.renderValue(context.value) : registeredValue;\n\tvar selectValueChildren = isEmptyValue ? placeholder !== null && placeholder !== void 0 ? placeholder : children : children;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectValueFrame, {\n\t\tpointerEvents: \"none\",\n\t\tref: composedRefs,\n\t\t...props,\n\t\tchildren: selectValueChildren\n\t});\n});\nvar SelectIcon = (0, import_core.styled)(import_core.View, {\n\tdisplayName: \"SelectIcon\",\n\t\"aria-hidden\": true\n});\nvar SelectItemIndicatorFrame = (0, import_core.styled)(import_core.View, { displayName: \"SelectItemIndicator\" });\nvar SelectItemIndicator = (0, import_core.createStyledHOC)(SelectItemIndicatorFrame, function SelectItemIndicator2(props, forwardedRef) {\n\tvar { scope, ...itemIndicatorProps } = props;\n\tvar context = (0, import_context.useSelectItemParentContext)(scope);\n\tvar itemContext = (0, import_SelectItem.useSelectItemContext)(scope);\n\tif (context.shouldRenderWebNative) return null;\n\treturn itemContext.isSelected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemIndicatorFrame, {\n\t\t\"aria-hidden\": true,\n\t\t...itemIndicatorProps,\n\t\tref: forwardedRef\n\t}) : null;\n});\nvar SelectIndicatorFrame = (0, import_core.styled)(import_core.View, {\n\tdisplayName: \"SelectIndicator\",\n\tposition: \"absolute\",\n\ttop: 0,\n\tleft: 0,\n\tpointerEvents: \"none\",\n\tzIndex: 10\n});\nvar SelectIndicator = (0, import_core.createStyledHOC)(SelectIndicatorFrame, function SelectIndicator2(param, forwardedRef) {\n\tvar { scope, ...props } = param;\n\tvar itemContext = (0, import_context.useSelectItemParentContext)(scope);\n\tvar context = (0, import_context.useSelectContext)(scope);\n\tvar [layout, setLayout] = React.useState(null);\n\tvar rafRef = React.useRef(0);\n\tReact.useLayoutEffect(function() {\n\t\tvar update = function(index) {\n\t\t\tif (typeof index !== \"number\") return;\n\t\t\tcancelAnimationFrame(rafRef.current);\n\t\t\trafRef.current = requestAnimationFrame(function() {\n\t\t\t\tvar _itemContext_listRef_current, _itemContext_listRef;\n\t\t\t\tvar node = (_itemContext_listRef = itemContext.listRef) === null || _itemContext_listRef === void 0 ? void 0 : (_itemContext_listRef_current = _itemContext_listRef.current) === null || _itemContext_listRef_current === void 0 ? void 0 : _itemContext_listRef_current[index];\n\t\t\t\tif (node) setLayout({\n\t\t\t\t\twidth: Math.round(node.offsetWidth),\n\t\t\t\t\theight: Math.round(node.offsetHeight),\n\t\t\t\t\tx: Math.round(node.offsetLeft),\n\t\t\t\t\ty: Math.round(node.offsetTop)\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t\tif (context.open && context.activeIndexRef.current !== null) update(context.activeIndexRef.current);\n\t\treturn itemContext.activeIndexSubscribe(update);\n\t}, [context.open, itemContext.listRef]);\n\tif (!layout) return null;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectIndicatorFrame, {\n\t\tref: forwardedRef,\n\t\t...props,\n\t\twidth: layout.width,\n\t\theight: layout.height,\n\t\tx: layout.x,\n\t\ty: layout.y\n\t});\n});\nvar GROUP_NAME = \"SelectGroup\";\nvar { Provider: SelectGroupContextProvider, useStyledContext: useSelectGroupContext } = (0, import_core.createStyledContext)({ id: \"\" }, \"SelectGroup\");\nvar SelectGroupFrame = (0, import_core.styled)(import_core.View, { displayName: GROUP_NAME });\nvar NativeSelect = (0, import_core.styled)(import_core.Text, {\n\tdisplayName: \"NativeSelect\",\n\trender: \"select\"\n});\nvar SelectGroup = (0, import_core.createStyledHOC)(SelectGroupFrame, function(props, forwardedRef) {\n\tvar { scope, ...groupProps } = props;\n\tvar groupId = React.useId();\n\tvar context = (0, import_context.useSelectContext)(scope);\n\tvar itemParentContext = (0, import_context.useSelectItemParentContext)(scope);\n\tvar StyledNativeSelect = React.useContext(import_context.SelectNativeComponentContext);\n\tvar nativeSelectRef = React.useRef(null);\n\tvar content = (function() {\n\t\tif (itemParentContext.shouldRenderWebNative) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeSelect, {\n\t\t\t...StyledNativeSelect && {\n\t\t\t\trender: StyledNativeSelect,\n\t\t\t\tsize: itemParentContext.size,\n\t\t\t\tstyle: { appearance: \"none\" }\n\t\t\t},\n\t\t\t...groupProps,\n\t\t\tvalue: context.value,\n\t\t\tmultiple: context.mode === \"multiple\",\n\t\t\tname: itemParentContext.name,\n\t\t\tform: itemParentContext.form,\n\t\t\tid: itemParentContext.id,\n\t\t\tonChange: function(event) {\n\t\t\t\tvar value = context.mode === \"multiple\" ? Array.from(event.currentTarget.selectedOptions, function(option) {\n\t\t\t\t\treturn option.value;\n\t\t\t\t}) : event.currentTarget.value;\n\t\t\t\titemParentContext.changeNativeValue(value, event.nativeEvent);\n\t\t\t},\n\t\t\tref: nativeSelectRef,\n\t\t\tchildren: props.children\n\t\t});\n\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectGroupFrame, {\n\t\t\trole: \"group\",\n\t\t\t\"aria-labelledby\": groupId,\n\t\t\t...groupProps,\n\t\t\tref: forwardedRef\n\t\t});\n\t})();\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectGroupContextProvider, {\n\t\tscope,\n\t\tid: groupId || \"\",\n\t\tchildren: content\n\t});\n});\nSelectGroup.displayName = GROUP_NAME;\nvar SelectLabelFrame = (0, import_core.styled)(import_core.Text, { displayName: \"SelectLabel\" });\nvar SelectLabel = (0, import_core.createStyledHOC)(SelectLabelFrame, function(props, forwardedRef) {\n\tvar { scope, ...labelProps } = props;\n\tvar context = (0, import_context.useSelectItemParentContext)(scope);\n\tvar groupContext = useSelectGroupContext(scope);\n\tif (context.shouldRenderWebNative) return null;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectLabelFrame, {\n\t\trender: \"div\",\n\t\tid: groupContext.id,\n\t\t...labelProps,\n\t\tref: forwardedRef\n\t});\n});\nvar SelectSeparator = (0, import_core.styled)(import_core.View, { displayName: \"SelectSeparator\" });\nvar SelectSheetImpl = function(props) {\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: props.children });\n};\nfunction SelectRoot(props) {\n\tvar adaptScope = `AdaptSelect${props.scope || \"\"}`;\n\tvar [open, requestOpenChange] = (0, import_use_controllable_state.useControllableState)({\n\t\tprop: props.open,\n\t\tdefaultProp: props.defaultOpen || false,\n\t\tonChange: props.onOpenChange\n\t});\n\tvar handleAdaptOpenChange = React.useCallback(function(nextOpen) {\n\t\trequestOpenChange(nextOpen, (0, import_core.createChangeEventDetails)(nextOpen ? \"trigger-press\" : \"outside-press\"));\n\t}, [requestOpenChange]);\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptParent, {\n\t\tscope: adaptScope,\n\t\topen,\n\t\tonOpenChange: handleAdaptOpenChange,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectInner, {\n\t\t\t...props,\n\t\t\tscope: props.scope,\n\t\t\tadaptScope,\n\t\t\topen,\n\t\t\trequestOpenChange\n\t\t})\n\t});\n}\nvar Select = (0, import_helpers.withStaticProperties)(SelectRoot, {\n\tRoot: SelectRoot,\n\tAdapt: import_adapt.Adapt,\n\tContent: import_SelectContent.SelectContent,\n\tGroup: SelectGroup,\n\tIcon: SelectIcon,\n\tItem: import_SelectItem.SelectItem,\n\tItemIndicator: SelectItemIndicator,\n\tItemText: import_SelectItemText.SelectItemText,\n\tLabel: SelectLabel,\n\tScrollDownButton: import_SelectScrollButton.SelectScrollDownButton,\n\tScrollUpButton: import_SelectScrollButton.SelectScrollUpButton,\n\tSeparator: SelectSeparator,\n\tTrigger: import_SelectTrigger.SelectTrigger,\n\tValue: SelectValue,\n\tViewport: import_SelectViewport.SelectViewport,\n\tIndicator: SelectIndicator,\n\tFocusScope: import_focus_scope.FocusScopeController\n});\nfunction useEmitter() {\n\tvar listenersRef = React.useRef(/* @__PURE__ */ new Set());\n\treturn [React.useCallback(function(value) {\n\t\tlistenersRef.current.forEach(function(l) {\n\t\t\treturn l(value);\n\t\t});\n\t}, []), React.useCallback(function(listener) {\n\t\tlistenersRef.current.add(listener);\n\t\treturn function() {\n\t\t\tlistenersRef.current.delete(listener);\n\t\t};\n\t}, [])];\n}\nfunction SelectInner(props) {\n\tvar _registry_getItems_activeIndex, _controller_selectionAnchor;\n\tvar { scope = \"\", adaptScope, native, children, open, requestOpenChange, defaultOpen: _defaultOpen, onOpenChange: _onOpenChange, value: valueProp, defaultValue, onValueChange, multiple = false, name, form, disablePreventBodyScroll, size: sizeProp = true, onActiveChange, dir, id, renderValue, lazyMount, zIndex } = props;\n\tvar SelectImpl = (0, import_adapt.useAdaptIsActive)(adaptScope) ? SelectSheetImpl : import_SelectImpl.SelectInlineImpl;\n\tvar mode = multiple ? \"multiple\" : \"single\";\n\tvar [valueState, requestValueChange] = (0, import_use_controllable_state.useControllableState)({\n\t\tprop: valueProp,\n\t\tdefaultProp: defaultValue !== null && defaultValue !== void 0 ? defaultValue : mode === \"multiple\" ? [] : \"\",\n\t\tonChange: onValueChange,\n\t\ttransition: true\n\t});\n\tvar value = React.useMemo(function() {\n\t\treturn mode === \"multiple\" ? (0, import_selectionController.selectedValuesFromSelection)(mode, valueState) : typeof valueState === \"string\" ? valueState : \"\";\n\t}, [mode, valueState]);\n\tvar selectedValues = React.useMemo(function() {\n\t\treturn (0, import_selectionController.selectedValuesFromSelection)(mode, value);\n\t}, [mode, value]);\n\tvar [, rerenderRegistry] = React.useReducer(function(version) {\n\t\treturn version + 1;\n\t}, 0);\n\tvar registryRef = React.useRef(null);\n\tif (!registryRef.current) registryRef.current = (0, import_selectionController.createSelectItemRegistry)(rerenderRegistry);\n\tvar registry = registryRef.current;\n\tvar controllerRef = React.useRef(null);\n\tif (!controllerRef.current) controllerRef.current = (0, import_selectionController.createSelectSelectionController)({\n\t\tmode,\n\t\tvalue,\n\t\tregistry\n\t});\n\tvar controller = controllerRef.current;\n\tcontroller.setMode(mode);\n\tcontroller.setValue(value);\n\tReact.useEffect(function() {\n\t\tif (!props.id) return;\n\t\treturn (0, import_focusable.registerFocusable)(props.id, {\n\t\t\tfocusAndSelect: function() {\n\t\t\t\trequestOpenChange(function(current) {\n\t\t\t\t\treturn !current;\n\t\t\t\t}, (0, import_core.createChangeEventDetails)(\"trigger-press\"));\n\t\t\t},\n\t\t\tfocus: function() {}\n\t\t});\n\t}, [props.id, requestOpenChange]);\n\tvar activeIndexRef = React.useRef(null);\n\tvar [activeIndex, setActiveIndexState] = React.useState(null);\n\tvar [emitActiveIndex, activeIndexSubscribe] = useEmitter();\n\tvar selectedIndexRef = React.useRef(null);\n\tvar listContentRef = React.useRef([]);\n\tvar listRef = React.useRef([]);\n\tvar [valueNode, setValueNode] = React.useState(null);\n\tvar selectedIndex = Math.max(0, controller.selectionAnchorIndex());\n\tlistContentRef.current = registry.getTypeaheadLabels();\n\tlistRef.current.length = registry.getItems().length;\n\t(0, import_constants.useIsomorphicLayoutEffect)(function() {\n\t\tselectedIndexRef.current = selectedIndex;\n\t});\n\tvar shouldRenderWebNative = import_constants.isWeb && (native === true || native === \"web\" || Array.isArray(native) && native.includes(\"web\"));\n\tvar setActiveIndexFast = React.useCallback(function(index, details) {\n\t\tif (activeIndexRef.current !== index) {\n\t\t\tactiveIndexRef.current = index;\n\t\t\tcontroller.setActiveIndex(index);\n\t\t\tif (typeof index === \"number\") {\n\t\t\t\temitActiveIndex(index);\n\t\t\t\tvar item = registry.getItems()[index];\n\t\t\t\tif (item && details) onActiveChange === null || onActiveChange === void 0 || onActiveChange(item.value, details);\n\t\t\t}\n\t\t}\n\t}, [\n\t\tcontroller,\n\t\temitActiveIndex,\n\t\tonActiveChange,\n\t\tregistry\n\t]);\n\tvar setActiveIndex = React.useCallback(function(index, details) {\n\t\tsetActiveIndexFast(index, details);\n\t\tsetActiveIndexState(index);\n\t}, [setActiveIndexFast]);\n\tvar activeDetails = React.useCallback(function(reason, index, event) {\n\t\treturn {\n\t\t\treason,\n\t\t\tevent,\n\t\t\ttrigger: void 0,\n\t\t\tindex\n\t\t};\n\t}, []);\n\tvar moveActive = React.useCallback(function(direction, event) {\n\t\tvar nextIndex = registry.nextEnabledIndex(activeIndexRef.current, direction);\n\t\tif (nextIndex >= 0) setActiveIndex(nextIndex, activeDetails(\"keyboard\", nextIndex, event));\n\t}, [\n\t\tactiveDetails,\n\t\tregistry,\n\t\tsetActiveIndex\n\t]);\n\tvar typeaheadRef = React.useRef({\n\t\ttext: \"\",\n\t\ttimeout: null\n\t});\n\tvar search = React.useCallback(function(text, event) {\n\t\tclearTimeout(typeaheadRef.current.timeout);\n\t\ttypeaheadRef.current.text += text;\n\t\tvar nextIndex = registry.findTypeaheadIndex(typeaheadRef.current.text, activeIndexRef.current);\n\t\tif (nextIndex < 0 && typeaheadRef.current.text.length > 1) {\n\t\t\ttypeaheadRef.current.text = text;\n\t\t\tnextIndex = registry.findTypeaheadIndex(text, activeIndexRef.current);\n\t\t}\n\t\ttypeaheadRef.current.timeout = setTimeout(function() {\n\t\t\ttypeaheadRef.current.text = \"\";\n\t\t}, 750);\n\t\tif (nextIndex >= 0) setActiveIndex(nextIndex, activeDetails(\"keyboard\", nextIndex, event));\n\t}, [\n\t\tactiveDetails,\n\t\tregistry,\n\t\tsetActiveIndex\n\t]);\n\tReact.useEffect(function() {\n\t\treturn function() {\n\t\t\treturn clearTimeout(typeaheadRef.current.timeout);\n\t\t};\n\t}, []);\n\tReact.useEffect(function() {\n\t\tif (open) {\n\t\t\tvar nextIndex = controller.initialActiveIndex();\n\t\t\tif (nextIndex >= 0) setActiveIndex(nextIndex, activeDetails(\"list-navigation\", nextIndex));\n\t\t} else {\n\t\t\tsetActiveIndexFast(null);\n\t\t\tsetActiveIndexState(null);\n\t\t}\n\t}, [\n\t\topen,\n\t\tselectedIndex,\n\t\tregistry.getItems().length\n\t]);\n\tvar selectValue = React.useCallback(function(nextItemValue, details) {\n\t\tvar item = registry.getItem(nextItemValue);\n\t\tif (!item || item.disabled) return;\n\t\tcontroller.setMode(mode);\n\t\tcontroller.setValue(value);\n\t\tvar previousValue = controller.value;\n\t\trequestValueChange(controller.toggle(nextItemValue), details);\n\t\tif (details.isCanceled) {\n\t\t\tcontroller.setValue(previousValue);\n\t\t\treturn;\n\t\t}\n\t\tif (controller.shouldCloseOnSelect) requestOpenChange(false, (0, import_core.createChangeEventDetails)(details.reason === \"keyboard\" ? \"keyboard\" : \"item-press\", details.event, details.trigger));\n\t}, [\n\t\tcontroller,\n\t\tmode,\n\t\tregistry,\n\t\trequestOpenChange,\n\t\trequestValueChange,\n\t\tvalue\n\t]);\n\tvar changeNativeValue = React.useCallback(function(nextValue, event) {\n\t\tvar details = (0, import_core.createChangeEventDetails)(\"native-change\", event);\n\t\trequestValueChange(nextValue, details);\n\t\tif (!details.isCanceled) controller.setValue(nextValue);\n\t}, [controller, requestValueChange]);\n\tvar content = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_context.SelectItemParentProvider, {\n\t\tscopeName: scope,\n\t\tscope,\n\t\tadaptScope,\n\t\tmode,\n\t\tselectedValues,\n\t\tregistry,\n\t\tsize: sizeProp,\n\t\tactiveIndexSubscribe,\n\t\tactiveIndexRef,\n\t\trequestOpenChange,\n\t\tid,\n\t\tname,\n\t\tform,\n\t\tselectValue,\n\t\tchangeNativeValue,\n\t\tshouldRenderWebNative,\n\t\tsetActiveIndexFast,\n\t\tlistRef,\n\t\tmoveActive,\n\t\tsearch,\n\t\tchildren: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_context.SelectProvider, {\n\t\t\tscope,\n\t\t\tscopeName: scope,\n\t\t\tadaptScope,\n\t\t\tdisablePreventBodyScroll,\n\t\t\tdir,\n\t\t\tblockSelection: false,\n\t\t\tfallback: false,\n\t\t\tvalueNode,\n\t\t\tonValueNodeChange: setValueNode,\n\t\t\tactiveIndex,\n\t\t\tactiveIndexRef,\n\t\t\tselectedIndex,\n\t\t\tsetActiveIndex,\n\t\t\tvalue,\n\t\t\tmode,\n\t\t\tselectedValues,\n\t\t\tactiveItem: activeIndex == null ? void 0 : (_registry_getItems_activeIndex = registry.getItems()[activeIndex]) === null || _registry_getItems_activeIndex === void 0 ? void 0 : _registry_getItems_activeIndex.value,\n\t\t\tselectionAnchor: (_controller_selectionAnchor = controller.selectionAnchor()) === null || _controller_selectionAnchor === void 0 ? void 0 : _controller_selectionAnchor.value,\n\t\t\topen,\n\t\t\tnative,\n\t\t\trenderValue,\n\t\t\tlazyMount,\n\t\t\tchildren: shouldRenderWebNative ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectImpl, {\n\t\t\t\tactiveIndexRef,\n\t\t\t\tlistContentRef,\n\t\t\t\tselectedIndexRef,\n\t\t\t\tsetActiveIndexFast,\n\t\t\t\t...props,\n\t\t\t\topen,\n\t\t\t\tvalue,\n\t\t\t\tchildren\n\t\t\t})\n\t\t}), import_constants.isWeb && !shouldRenderWebNative && name ? (mode === \"multiple\" ? selectedValues : [value]).map(function(inputValue) {\n\t\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"input\", {\n\t\t\t\ttype: \"hidden\",\n\t\t\t\tname,\n\t\t\t\tform,\n\t\t\t\tvalue: inputValue\n\t\t\t}, inputValue);\n\t\t}) : null]\n\t});\n\tif (zIndex !== void 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_context.SelectZIndexContext.Provider, {\n\t\tvalue: zIndex,\n\t\tchildren: content\n\t});\n\treturn content;\n}\n//# sourceMappingURL=Select.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;GAChB,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAC3D,CAAC;CACF;CACA,OAAO;AACR;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GA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S,SAAS;CACvD,GAAG,CAAC,YAAY,kBAAkB,CAAC;CACnC,IAAI,UAA0B,iBAAC,GAAG,mBAAmB,KAAI,CAAE,eAAe,0BAA0B;EACnG,WAAW;EACX;EACA;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU,CAAiB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,gBAAgB;GACrF;GACA,WAAW;GACX;GACA;GACA;GACA,gBAAgB;GAChB,UAAU;GACV;GACA,mBAAmB;GACnB;GACA;GACA;GACA;GACA;GACA;GACA;GACA,YAAY,eAAe,OAAO,KAAK,KAAK,iCAAiC,SAAS,SAAS,CAAC,CAAC,kBAAkB,QAAQ,mCAAmC,KAAK,IAAI,KAAK,IAAI,+BAA+B;GAC/M,kBAAkB,8BAA8B,WAAW,gBAAgB,OAAO,QAAQ,gCAAgC,KAAK,IAAI,KAAK,IAAI,4BAA4B;GACxK;GACA;GACA;GACA;GACA,UAAU,wBAAwB,WAA2B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,YAAY;IACpG;IACA;IACA;IACA;IACA,GAAG;IACH;IACA;IACA;GACD,CAAC;EACF,CAAC,GAAG,iBAAiB,SAAS,CAAC,yBAAyB,QAAQ,SAAS,aAAa,iBAAiB,CAAC,KAAK,EAAC,CAAE,IAAI,SAAS,YAAY;GACxI,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,SAAS;IAC3D,MAAM;IACN;IACA;IACA,OAAO;GACR,GAAG,UAAU;EACd,CAAC,IAAI,IAAI;CACV,CAAC;CACD,IAAI,WAAW,KAAK,GAAG,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,oBAAoB,UAAU;EACtH,OAAO;EACP,UAAU;CACX,CAAC;CACD,OAAO;AACR"}
|
|
1
|
+
{"version":3,"file":"Select.native.js","names":[],"sources":["jsx/Select.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n\t// If the importer is in node compatibility mode or this is not an ESM\n\t// file that has been converted to a CommonJS file using a Babel-\n\t// compatible transform (i.e. \"__esModule\" has not been set), then set\n\t// \"default\" to the CommonJS \"module.exports\" for node compatibility.\n\tisNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\t\tvalue: mod,\n\t\tenumerable: true\n\t}) : target,\n\tmod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Select_exports = {};\n__export(Select_exports, {\n\tSelect: () => Select,\n\tSelectGroup: () => SelectGroup,\n\tSelectGroupFrame: () => SelectGroupFrame,\n\tSelectIcon: () => SelectIcon,\n\tSelectIndicator: () => SelectIndicator,\n\tSelectIndicatorFrame: () => SelectIndicatorFrame,\n\tSelectItemIndicator: () => SelectItemIndicator,\n\tSelectItemIndicatorFrame: () => SelectItemIndicatorFrame,\n\tSelectLabel: () => SelectLabel,\n\tSelectLabelFrame: () => SelectLabelFrame,\n\tSelectRoot: () => SelectRoot,\n\tSelectSeparator: () => SelectSeparator,\n\tSelectValue: () => SelectValue,\n\tSelectValueFrame: () => SelectValueFrame\n});\nmodule.exports = __toCommonJS(Select_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_adapt = require(\"@tamagui/adapt\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core = require(\"@tamagui/core\");\nvar import_focus_scope = require(\"@tamagui/focus-scope\");\nvar import_focusable = require(\"@tamagui/focusable\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_use_controllable_state = require(\"@tamagui/use-controllable-state\");\nvar React = __toESM(require(\"react\"), 1);\nvar import_context = require(\"./context\");\nvar import_SelectContent = require(\"./SelectContent\");\nvar import_SelectImpl = require(\"./SelectImpl\");\nvar import_SelectItem = require(\"./SelectItem\");\nvar import_SelectItemText = require(\"./SelectItemText\");\nvar import_SelectScrollButton = require(\"./SelectScrollButton\");\nvar import_SelectTrigger = require(\"./SelectTrigger\");\nvar import_SelectViewport = require(\"./SelectViewport\");\nvar import_selectionController = require(\"./selectionController\");\nvar SelectValueFrame = (0, import_core.styled)(import_core.Text, { displayName: \"SelectValue\" });\nvar SelectValue = (0, import_core.createStyledHOC)(SelectValueFrame, function SelectValue2(param, forwardedRef) {\n\tvar { scope, children: childrenProp, placeholder, ...props } = param;\n\tvar _itemParentContext_registry_getItem;\n\tvar context = (0, import_context.useSelectContext)(scope);\n\tvar itemParentContext = (0, import_context.useSelectItemParentContext)(scope);\n\tvar composedRefs = (0, import_compose_refs.useComposedRefs)(\n\t\t// @ts-ignore react 19 ref type mismatch\n\t\tforwardedRef,\n\t\tcontext.onValueNodeChange\n\t);\n\tvar isEmptyValue = context.selectedValues.length === 0;\n\tvar [, rerender] = React.useReducer(function(version) {\n\t\treturn version + 1;\n\t}, 0);\n\t(0, import_constants.useIsomorphicLayoutEffect)(function() {\n\t\treturn itemParentContext.registry.subscribe(rerender);\n\t}, [itemParentContext.registry]);\n\tvar _itemParentContext_registry_getItem_label;\n\tvar registeredValue = context.mode === \"multiple\" ? context.selectedValues.map(function(value, index) {\n\t\tvar _itemParentContext_registry_getItem2;\n\t\tvar _itemParentContext_registry_getItem_label2;\n\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(React.Fragment, { children: [index > 0 ? \", \" : null, (_itemParentContext_registry_getItem_label2 = (_itemParentContext_registry_getItem2 = itemParentContext.registry.getItem(value)) === null || _itemParentContext_registry_getItem2 === void 0 ? void 0 : _itemParentContext_registry_getItem2.label) !== null && _itemParentContext_registry_getItem_label2 !== void 0 ? _itemParentContext_registry_getItem_label2 : value] }, value);\n\t}) : (_itemParentContext_registry_getItem_label = (_itemParentContext_registry_getItem = itemParentContext.registry.getItem(context.selectedValues[0])) === null || _itemParentContext_registry_getItem === void 0 ? void 0 : _itemParentContext_registry_getItem.label) !== null && _itemParentContext_registry_getItem_label !== void 0 ? _itemParentContext_registry_getItem_label : context.value;\n\tvar children = childrenProp !== void 0 ? childrenProp : context.renderValue ? context.renderValue(context.value) : registeredValue;\n\tvar selectValueChildren = isEmptyValue ? placeholder !== null && placeholder !== void 0 ? placeholder : children : children;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectValueFrame, {\n\t\tpointerEvents: \"none\",\n\t\tref: composedRefs,\n\t\t...props,\n\t\tchildren: selectValueChildren\n\t});\n});\nvar SelectIcon = (0, import_core.styled)(import_core.View, {\n\tdisplayName: \"SelectIcon\",\n\t\"aria-hidden\": true\n});\nvar SelectItemIndicatorFrame = (0, import_core.styled)(import_core.View, { displayName: \"SelectItemIndicator\" });\nvar SelectItemIndicator = (0, import_core.createStyledHOC)(SelectItemIndicatorFrame, function SelectItemIndicator2(props, forwardedRef) {\n\tvar { scope, ...itemIndicatorProps } = props;\n\tvar context = (0, import_context.useSelectItemParentContext)(scope);\n\tvar itemContext = (0, import_SelectItem.useSelectItemContext)(scope);\n\tif (context.shouldRenderWebNative) return null;\n\treturn itemContext.isSelected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemIndicatorFrame, {\n\t\t\"aria-hidden\": true,\n\t\t...itemIndicatorProps,\n\t\tref: forwardedRef\n\t}) : null;\n});\nvar SelectIndicatorFrame = (0, import_core.styled)(import_core.View, {\n\tdisplayName: \"SelectIndicator\",\n\tposition: \"absolute\",\n\ttop: 0,\n\tleft: 0,\n\tpointerEvents: \"none\",\n\tzIndex: 10\n});\nvar SelectIndicator = (0, import_core.createStyledHOC)(SelectIndicatorFrame, function SelectIndicator2(param, forwardedRef) {\n\tvar { scope, ...props } = param;\n\tvar itemContext = (0, import_context.useSelectItemParentContext)(scope);\n\tvar context = (0, import_context.useSelectContext)(scope);\n\tvar [layout, setLayout] = React.useState(null);\n\tvar rafRef = React.useRef(0);\n\t(0, import_constants.useIsomorphicLayoutEffect)(function() {\n\t\tvar update = function(index) {\n\t\t\tif (typeof index !== \"number\") return;\n\t\t\tcancelAnimationFrame(rafRef.current);\n\t\t\trafRef.current = requestAnimationFrame(function() {\n\t\t\t\tvar _itemContext_listRef_current, _itemContext_listRef;\n\t\t\t\tvar node = (_itemContext_listRef = itemContext.listRef) === null || _itemContext_listRef === void 0 ? void 0 : (_itemContext_listRef_current = _itemContext_listRef.current) === null || _itemContext_listRef_current === void 0 ? void 0 : _itemContext_listRef_current[index];\n\t\t\t\tif (node) setLayout({\n\t\t\t\t\twidth: Math.round(node.offsetWidth),\n\t\t\t\t\theight: Math.round(node.offsetHeight),\n\t\t\t\t\tx: Math.round(node.offsetLeft),\n\t\t\t\t\ty: Math.round(node.offsetTop)\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t\tif (context.open && context.activeIndexRef.current !== null) update(context.activeIndexRef.current);\n\t\treturn itemContext.activeIndexSubscribe(update);\n\t}, [context.open, itemContext.listRef]);\n\tif (!layout) return null;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectIndicatorFrame, {\n\t\tref: forwardedRef,\n\t\t...props,\n\t\twidth: layout.width,\n\t\theight: layout.height,\n\t\tx: layout.x,\n\t\ty: layout.y\n\t});\n});\nvar GROUP_NAME = \"SelectGroup\";\nvar { Provider: SelectGroupContextProvider, useStyledContext: useSelectGroupContext } = (0, import_core.createStyledContext)({ id: \"\" }, \"SelectGroup\");\nvar SelectGroupFrame = (0, import_core.styled)(import_core.View, { displayName: GROUP_NAME });\nvar NativeSelect = (0, import_core.styled)(import_core.Text, {\n\tdisplayName: \"NativeSelect\",\n\trender: \"select\"\n});\nvar SelectGroup = (0, import_core.createStyledHOC)(SelectGroupFrame, function(props, forwardedRef) {\n\tvar { scope, ...groupProps } = props;\n\tvar groupId = React.useId();\n\tvar context = (0, import_context.useSelectContext)(scope);\n\tvar itemParentContext = (0, import_context.useSelectItemParentContext)(scope);\n\tvar StyledNativeSelect = React.useContext(import_context.SelectNativeComponentContext);\n\tvar nativeSelectRef = React.useRef(null);\n\tvar content = (function() {\n\t\tif (itemParentContext.shouldRenderWebNative) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeSelect, {\n\t\t\t...StyledNativeSelect && {\n\t\t\t\trender: StyledNativeSelect,\n\t\t\t\tsize: itemParentContext.size,\n\t\t\t\tstyle: { appearance: \"none\" }\n\t\t\t},\n\t\t\t...groupProps,\n\t\t\tvalue: context.value,\n\t\t\tmultiple: context.mode === \"multiple\",\n\t\t\tname: itemParentContext.name,\n\t\t\tform: itemParentContext.form,\n\t\t\tid: itemParentContext.id,\n\t\t\tonChange: function(event) {\n\t\t\t\tvar value = context.mode === \"multiple\" ? Array.from(event.currentTarget.selectedOptions, function(option) {\n\t\t\t\t\treturn option.value;\n\t\t\t\t}) : event.currentTarget.value;\n\t\t\t\titemParentContext.changeNativeValue(value, event.nativeEvent);\n\t\t\t},\n\t\t\tref: nativeSelectRef,\n\t\t\tchildren: props.children\n\t\t});\n\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectGroupFrame, {\n\t\t\trole: \"group\",\n\t\t\t\"aria-labelledby\": groupId,\n\t\t\t...groupProps,\n\t\t\tref: forwardedRef\n\t\t});\n\t})();\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectGroupContextProvider, {\n\t\tscope,\n\t\tid: groupId || \"\",\n\t\tchildren: content\n\t});\n});\nSelectGroup.displayName = GROUP_NAME;\nvar SelectLabelFrame = (0, import_core.styled)(import_core.Text, { displayName: \"SelectLabel\" });\nvar SelectLabel = (0, import_core.createStyledHOC)(SelectLabelFrame, function(props, forwardedRef) {\n\tvar { scope, ...labelProps } = props;\n\tvar context = (0, import_context.useSelectItemParentContext)(scope);\n\tvar groupContext = useSelectGroupContext(scope);\n\tif (context.shouldRenderWebNative) return null;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectLabelFrame, {\n\t\trender: \"div\",\n\t\tid: groupContext.id,\n\t\t...labelProps,\n\t\tref: forwardedRef\n\t});\n});\nvar SelectSeparator = (0, import_core.styled)(import_core.View, { displayName: \"SelectSeparator\" });\nvar SelectSheetImpl = function(props) {\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: props.children });\n};\nfunction SelectRoot(props) {\n\tvar adaptScope = `AdaptSelect${props.scope || \"\"}`;\n\tvar [open, requestOpenChange] = (0, import_use_controllable_state.useControllableState)({\n\t\tprop: props.open,\n\t\tdefaultProp: props.defaultOpen || false,\n\t\tonChange: props.onOpenChange\n\t});\n\tvar handleAdaptOpenChange = React.useCallback(function(nextOpen) {\n\t\trequestOpenChange(nextOpen, (0, import_core.createChangeEventDetails)(nextOpen ? \"trigger-press\" : \"outside-press\"));\n\t}, [requestOpenChange]);\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptParent, {\n\t\tscope: adaptScope,\n\t\tadaptChildren: props.children,\n\t\topen,\n\t\tonOpenChange: handleAdaptOpenChange,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectInner, {\n\t\t\t...props,\n\t\t\tscope: props.scope,\n\t\t\tadaptScope,\n\t\t\topen,\n\t\t\trequestOpenChange\n\t\t})\n\t});\n}\nvar Select = (0, import_helpers.withStaticProperties)(SelectRoot, {\n\tRoot: SelectRoot,\n\tAdapt: import_adapt.Adapt,\n\tContent: import_SelectContent.SelectContent,\n\tGroup: SelectGroup,\n\tIcon: SelectIcon,\n\tItem: import_SelectItem.SelectItem,\n\tItemIndicator: SelectItemIndicator,\n\tItemText: import_SelectItemText.SelectItemText,\n\tLabel: SelectLabel,\n\tScrollDownButton: import_SelectScrollButton.SelectScrollDownButton,\n\tScrollUpButton: import_SelectScrollButton.SelectScrollUpButton,\n\tSeparator: SelectSeparator,\n\tTrigger: import_SelectTrigger.SelectTrigger,\n\tValue: SelectValue,\n\tViewport: import_SelectViewport.SelectViewport,\n\tIndicator: SelectIndicator,\n\tFocusScope: import_focus_scope.FocusScopeController\n});\nfunction useEmitter() {\n\tvar listenersRef = React.useRef(/* @__PURE__ */ new Set());\n\treturn [React.useCallback(function(value) {\n\t\tlistenersRef.current.forEach(function(l) {\n\t\t\treturn l(value);\n\t\t});\n\t}, []), React.useCallback(function(listener) {\n\t\tlistenersRef.current.add(listener);\n\t\treturn function() {\n\t\t\tlistenersRef.current.delete(listener);\n\t\t};\n\t}, [])];\n}\nfunction SelectInner(props) {\n\tvar { scope = \"\", adaptScope, native, children, open, requestOpenChange, defaultOpen: _defaultOpen, onOpenChange: _onOpenChange, value: valueProp, defaultValue, onValueChange, multiple = false, name, form, disablePreventBodyScroll, size: sizeProp = true, onActiveChange, dir, id, renderValue, lazyMount, zIndex } = props;\n\tvar SelectImpl = (0, import_adapt.useAdaptIsActive)(adaptScope) ? SelectSheetImpl : import_SelectImpl.SelectInlineImpl;\n\tvar mode = multiple ? \"multiple\" : \"single\";\n\tvar [valueState, requestValueChange] = (0, import_use_controllable_state.useControllableState)({\n\t\tprop: valueProp,\n\t\tdefaultProp: defaultValue !== null && defaultValue !== void 0 ? defaultValue : mode === \"multiple\" ? [] : \"\",\n\t\tonChange: onValueChange,\n\t\ttransition: true\n\t});\n\tvar value = React.useMemo(function() {\n\t\treturn mode === \"multiple\" ? (0, import_selectionController.selectedValuesFromSelection)(mode, valueState) : typeof valueState === \"string\" ? valueState : \"\";\n\t}, [mode, valueState]);\n\tvar selectedValues = React.useMemo(function() {\n\t\treturn (0, import_selectionController.selectedValuesFromSelection)(mode, value);\n\t}, [mode, value]);\n\tvar [, rerenderRegistry] = React.useReducer(function(version) {\n\t\treturn version + 1;\n\t}, 0);\n\tvar registryRef = React.useRef(null);\n\tif (!registryRef.current) registryRef.current = (0, import_selectionController.createSelectItemRegistry)(rerenderRegistry);\n\tvar registry = registryRef.current;\n\tvar controllerRef = React.useRef(null);\n\tif (!controllerRef.current) controllerRef.current = (0, import_selectionController.createSelectSelectionController)({\n\t\tmode,\n\t\tvalue,\n\t\tregistry\n\t});\n\tvar controller = controllerRef.current;\n\tcontroller.setMode(mode);\n\tcontroller.setValue(value);\n\tReact.useEffect(function() {\n\t\tif (!props.id) return;\n\t\treturn (0, import_focusable.registerFocusable)(props.id, {\n\t\t\tfocusAndSelect: function() {\n\t\t\t\trequestOpenChange(function(current) {\n\t\t\t\t\treturn !current;\n\t\t\t\t}, (0, import_core.createChangeEventDetails)(\"trigger-press\"));\n\t\t\t},\n\t\t\tfocus: function() {}\n\t\t});\n\t}, [props.id, requestOpenChange]);\n\tvar activeIndexRef = React.useRef(null);\n\tvar [emitActiveIndex, activeIndexSubscribe] = useEmitter();\n\tvar selectedIndexRef = React.useRef(null);\n\tvar lastPointerRef = React.useRef({\n\t\tx: -1,\n\t\ty: -1\n\t});\n\tvar listContentRef = React.useRef([]);\n\tvar listRef = React.useRef([]);\n\tvar [valueNode, setValueNode] = React.useState(null);\n\tvar selectedIndex = Math.max(0, controller.selectionAnchorIndex());\n\tlistContentRef.current = registry.getTypeaheadLabels();\n\tvar itemNodes = registry.getNodes();\n\tlistRef.current.length = itemNodes.length;\n\tfor (var i = 0; i < itemNodes.length; i++) listRef.current[i] = itemNodes[i];\n\t(0, import_constants.useIsomorphicLayoutEffect)(function() {\n\t\tselectedIndexRef.current = selectedIndex;\n\t});\n\tvar shouldRenderWebNative = import_constants.isWeb && (native === true || native === \"web\" || Array.isArray(native) && native.includes(\"web\"));\n\tvar setActiveIndex = React.useCallback(function(index, details) {\n\t\tif (activeIndexRef.current === index) return;\n\t\tactiveIndexRef.current = index;\n\t\tcontroller.setActiveIndex(index);\n\t\temitActiveIndex(index);\n\t\tif (typeof index === \"number\") {\n\t\t\tvar item = registry.getItems()[index];\n\t\t\tif (item && details) onActiveChange === null || onActiveChange === void 0 || onActiveChange(item.value, details);\n\t\t}\n\t}, [\n\t\tcontroller,\n\t\temitActiveIndex,\n\t\tonActiveChange,\n\t\tregistry\n\t]);\n\tvar activeDetails = React.useCallback(function(reason, index, event) {\n\t\treturn {\n\t\t\treason,\n\t\t\tevent,\n\t\t\ttrigger: void 0,\n\t\t\tindex\n\t\t};\n\t}, []);\n\tvar moveActive = React.useCallback(function(direction, event) {\n\t\tvar nextIndex = registry.nextEnabledIndex(activeIndexRef.current, direction);\n\t\tif (nextIndex >= 0) setActiveIndex(nextIndex, activeDetails(\"keyboard\", nextIndex, event));\n\t}, [\n\t\tactiveDetails,\n\t\tregistry,\n\t\tsetActiveIndex\n\t]);\n\tvar typeaheadRef = React.useRef({\n\t\ttext: \"\",\n\t\ttimeout: null\n\t});\n\tvar search = React.useCallback(function(text, event) {\n\t\tclearTimeout(typeaheadRef.current.timeout);\n\t\ttypeaheadRef.current.text += text;\n\t\tvar nextIndex = registry.findTypeaheadIndex(typeaheadRef.current.text, activeIndexRef.current);\n\t\tif (nextIndex < 0 && typeaheadRef.current.text.length > 1) {\n\t\t\ttypeaheadRef.current.text = text;\n\t\t\tnextIndex = registry.findTypeaheadIndex(text, activeIndexRef.current);\n\t\t}\n\t\ttypeaheadRef.current.timeout = setTimeout(function() {\n\t\t\ttypeaheadRef.current.text = \"\";\n\t\t}, 750);\n\t\tif (nextIndex >= 0) setActiveIndex(nextIndex, activeDetails(\"keyboard\", nextIndex, event));\n\t}, [\n\t\tactiveDetails,\n\t\tregistry,\n\t\tsetActiveIndex\n\t]);\n\tReact.useEffect(function() {\n\t\treturn function() {\n\t\t\treturn clearTimeout(typeaheadRef.current.timeout);\n\t\t};\n\t}, []);\n\tReact.useEffect(function() {\n\t\tif (open) {\n\t\t\tvar nextIndex = controller.initialActiveIndex();\n\t\t\tif (nextIndex >= 0) setActiveIndex(nextIndex, activeDetails(\"list-navigation\", nextIndex));\n\t\t} else setActiveIndex(null);\n\t}, [\n\t\topen,\n\t\tselectedIndex,\n\t\tregistry.getItems().length\n\t]);\n\tvar selectValue = React.useCallback(function(nextItemValue, details) {\n\t\tvar item = registry.getItem(nextItemValue);\n\t\tif (!item || item.disabled) return;\n\t\tcontroller.setMode(mode);\n\t\tcontroller.setValue(value);\n\t\tvar previousValue = controller.value;\n\t\trequestValueChange(controller.toggle(nextItemValue), details);\n\t\tif (details.isCanceled) {\n\t\t\tcontroller.setValue(previousValue);\n\t\t\treturn;\n\t\t}\n\t\tif (controller.shouldCloseOnSelect) requestOpenChange(false, (0, import_core.createChangeEventDetails)(details.reason === \"keyboard\" ? \"keyboard\" : \"item-press\", details.event, details.trigger));\n\t}, [\n\t\tcontroller,\n\t\tmode,\n\t\tregistry,\n\t\trequestOpenChange,\n\t\trequestValueChange,\n\t\tvalue\n\t]);\n\tvar changeNativeValue = React.useCallback(function(nextValue, event) {\n\t\tvar details = (0, import_core.createChangeEventDetails)(\"native-change\", event);\n\t\trequestValueChange(nextValue, details);\n\t\tif (!details.isCanceled) controller.setValue(nextValue);\n\t}, [controller, requestValueChange]);\n\tvar content = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_context.SelectItemParentProvider, {\n\t\tscopeName: scope,\n\t\tscope,\n\t\tadaptScope,\n\t\tmode,\n\t\tselectedValues,\n\t\tregistry,\n\t\tsize: sizeProp,\n\t\tactiveIndexSubscribe,\n\t\tactiveIndexRef,\n\t\trequestOpenChange,\n\t\tid,\n\t\tname,\n\t\tform,\n\t\tselectValue,\n\t\tchangeNativeValue,\n\t\tshouldRenderWebNative,\n\t\tsetActiveIndex,\n\t\tselectedIndex,\n\t\tlastPointerRef,\n\t\tlistRef,\n\t\tmoveActive,\n\t\tsearch,\n\t\tchildren: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_context.SelectProvider, {\n\t\t\tscope,\n\t\t\tscopeName: scope,\n\t\t\tadaptScope,\n\t\t\tdisablePreventBodyScroll,\n\t\t\tdir,\n\t\t\tblockSelection: false,\n\t\t\tfallback: false,\n\t\t\tvalueNode,\n\t\t\tonValueNodeChange: setValueNode,\n\t\t\tactiveIndexRef,\n\t\t\tselectedIndex,\n\t\t\tsetActiveIndex,\n\t\t\tvalue,\n\t\t\tmode,\n\t\t\tselectedValues,\n\t\t\topen,\n\t\t\tnative,\n\t\t\trenderValue,\n\t\t\tlazyMount,\n\t\t\tchildren: shouldRenderWebNative ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectImpl, {\n\t\t\t\tactiveIndexRef,\n\t\t\t\tlistContentRef,\n\t\t\t\tselectedIndexRef,\n\t\t\t\t...props,\n\t\t\t\topen,\n\t\t\t\tvalue,\n\t\t\t\tchildren\n\t\t\t})\n\t\t}), import_constants.isWeb && !shouldRenderWebNative && name ? (mode === \"multiple\" ? selectedValues : [value]).map(function(inputValue) {\n\t\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"input\", {\n\t\t\t\ttype: \"hidden\",\n\t\t\t\tname,\n\t\t\t\tform,\n\t\t\t\tvalue: inputValue\n\t\t\t}, inputValue);\n\t\t}) : null]\n\t});\n\tif (zIndex !== void 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_context.SelectZIndexContext.Provider, {\n\t\tvalue: zIndex,\n\t\tchildren: content\n\t});\n\treturn content;\n}\n//# sourceMappingURL=Select.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI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;GACA;GACA;GACA;GACA;GACA;GACA,UAAU,wBAAwB,WAA2B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,YAAY;IACpG;IACA;IACA;IACA,GAAG;IACH;IACA;IACA;GACD,CAAC;EACF,CAAC,GAAG,iBAAiB,SAAS,CAAC,yBAAyB,QAAQ,SAAS,aAAa,iBAAiB,CAAC,KAAK,EAAC,CAAE,IAAI,SAAS,YAAY;GACxI,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,SAAS;IAC3D,MAAM;IACN;IACA;IACA,OAAO;GACR,GAAG,UAAU;EACd,CAAC,IAAI,IAAI;CACV,CAAC;CACD,IAAI,WAAW,KAAK,GAAG,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,oBAAoB,UAAU;EACtH,OAAO;EACP,UAAU;CACX,CAAC;CACD,OAAO;AACR"}
|
package/dist/jsx/SelectImpl.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { inner, offset, size, useClick, useFloatingRaw, useInteractions, useListNavigation, useRole, useTypeahead } from "@tamagui/floating";
|
|
2
2
|
import { useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
3
3
|
import { createChangeEventDetails, useEvent, useIsTouchDevice } from "@tamagui/core";
|
|
4
4
|
import { composeEventHandlers } from "@tamagui/helpers";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import { flushSync } from "react-dom";
|
|
7
6
|
import { SCROLL_ARROW_THRESHOLD } from "./constants.mjs";
|
|
8
7
|
import { SelectItemParentProvider, SelectProvider, useSelectContext, useSelectItemParentContext } from "./context.mjs";
|
|
9
8
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -13,8 +12,7 @@ const SelectInlineImpl = (props) => {
|
|
|
13
12
|
const selectContext = useSelectContext(scope);
|
|
14
13
|
const selectItemParentContext = useSelectItemParentContext(scope);
|
|
15
14
|
const { setActiveIndex, selectedIndex, activeIndexRef } = selectContext;
|
|
16
|
-
const { requestOpenChange, registry } = selectItemParentContext;
|
|
17
|
-
const [scrollTop, setScrollTop] = React.useState(0);
|
|
15
|
+
const { requestOpenChange, registry, lastPointerRef } = selectItemParentContext;
|
|
18
16
|
const touch = useIsTouchDevice();
|
|
19
17
|
const listItemsRef = selectItemParentContext.listRef;
|
|
20
18
|
const overflowRef = React.useRef(null);
|
|
@@ -30,12 +28,11 @@ const SelectInlineImpl = (props) => {
|
|
|
30
28
|
});
|
|
31
29
|
const [controlledScrolling, setControlledScrolling] = React.useState(false);
|
|
32
30
|
const [fallback, setFallback] = React.useState(false);
|
|
33
|
-
const [innerOffset, setInnerOffset] = React.useState(0);
|
|
34
31
|
const [blockSelection, setBlockSelection] = React.useState(false);
|
|
35
|
-
const floatingStyle = React.useRef({});
|
|
36
32
|
React.useEffect(() => {
|
|
37
33
|
if (!open) {
|
|
38
|
-
|
|
34
|
+
setCanScrollUp(false);
|
|
35
|
+
setCanScrollDown(false);
|
|
39
36
|
setFallback(false);
|
|
40
37
|
setControlledScrolling(false);
|
|
41
38
|
}
|
|
@@ -53,33 +50,38 @@ const SelectInlineImpl = (props) => {
|
|
|
53
50
|
const { x, y, strategy, refs, update, placement: computedPlacement } = useFloatingRaw({
|
|
54
51
|
open,
|
|
55
52
|
placement: "bottom-start",
|
|
56
|
-
whileElementsMounted: autoUpdate,
|
|
57
53
|
middleware: [
|
|
58
|
-
size({ apply({ rects
|
|
59
|
-
|
|
60
|
-
if (refs.floating.current) Object.assign(refs.floating.current.style, floatingStyle.current);
|
|
54
|
+
size({ apply({ rects, elements }) {
|
|
55
|
+
elements.floating.style.minWidth = `${rects.reference.width + 8}px`;
|
|
61
56
|
} }),
|
|
62
57
|
inner({
|
|
63
58
|
listRef: listItemsRef,
|
|
64
59
|
overflowRef,
|
|
65
60
|
index: selectedIndex,
|
|
66
|
-
offset: innerOffset,
|
|
67
61
|
onFallbackChange: setFallback,
|
|
68
|
-
padding
|
|
62
|
+
get padding() {
|
|
63
|
+
return 10 + Math.max(upArrowRef.current?.offsetHeight ?? 0, downArrowRef.current?.offsetHeight ?? 0);
|
|
64
|
+
},
|
|
69
65
|
minItemsVisible: touch ? 10 : 4,
|
|
70
66
|
referenceOverflowThreshold: 20
|
|
71
67
|
}),
|
|
72
|
-
offset({ crossAxis: -
|
|
68
|
+
offset({ crossAxis: -4 })
|
|
73
69
|
]
|
|
74
70
|
});
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
|
|
71
|
+
const [canScrollUp, setCanScrollUp] = React.useState(false);
|
|
72
|
+
const [canScrollDown, setCanScrollDown] = React.useState(false);
|
|
73
|
+
const updateScrollArrows = React.useCallback(() => {
|
|
74
|
+
const el = refs.floating.current;
|
|
75
|
+
if (!el) return;
|
|
76
|
+
setCanScrollUp(el.scrollTop > SCROLL_ARROW_THRESHOLD);
|
|
77
|
+
setCanScrollDown(el.scrollTop < el.scrollHeight - el.clientHeight - SCROLL_ARROW_THRESHOLD);
|
|
78
|
+
}, [refs]);
|
|
79
|
+
const showUpArrow = open && canScrollUp;
|
|
80
|
+
const showDownArrow = open && canScrollDown;
|
|
79
81
|
useIsomorphicLayoutEffect(() => {
|
|
80
|
-
if (
|
|
82
|
+
if (!open) return;
|
|
83
|
+
update();
|
|
81
84
|
window.addEventListener("resize", update);
|
|
82
|
-
if (open) update();
|
|
83
85
|
return () => window.removeEventListener("resize", update);
|
|
84
86
|
}, [update, open]);
|
|
85
87
|
const onMatch = useEvent((index) => {
|
|
@@ -93,38 +95,41 @@ const SelectInlineImpl = (props) => {
|
|
|
93
95
|
});
|
|
94
96
|
const dataRef = React.useRef({});
|
|
95
97
|
dataRef.current.placement = computedPlacement;
|
|
96
|
-
const
|
|
98
|
+
const onOpenChange = useEvent((nextOpen, event, reason) => {
|
|
99
|
+
requestOpenChange(nextOpen, createChangeEventDetails(reason === "list-navigation" ? "keyboard" : "trigger-press", event, refs.reference.current));
|
|
100
|
+
});
|
|
101
|
+
const referenceElement = refs.reference.current || null;
|
|
102
|
+
const floatingElement = refs.floating.current || null;
|
|
103
|
+
const interactionContext = React.useMemo(() => ({
|
|
97
104
|
open,
|
|
98
|
-
onOpenChange
|
|
99
|
-
requestOpenChange(nextOpen, createChangeEventDetails(reason === "list-navigation" ? "keyboard" : "trigger-press", event, refs.reference.current));
|
|
100
|
-
},
|
|
105
|
+
onOpenChange,
|
|
101
106
|
refs: {
|
|
102
107
|
reference: refs.reference,
|
|
103
108
|
floating: refs.floating,
|
|
104
109
|
domReference: refs.reference
|
|
105
110
|
},
|
|
106
111
|
elements: {
|
|
107
|
-
reference:
|
|
108
|
-
floating:
|
|
109
|
-
domReference:
|
|
112
|
+
reference: referenceElement,
|
|
113
|
+
floating: floatingElement,
|
|
114
|
+
domReference: referenceElement
|
|
110
115
|
},
|
|
111
116
|
dataRef
|
|
112
|
-
}
|
|
117
|
+
}), [
|
|
118
|
+
open,
|
|
119
|
+
onOpenChange,
|
|
120
|
+
refs,
|
|
121
|
+
referenceElement,
|
|
122
|
+
floatingElement
|
|
123
|
+
]);
|
|
113
124
|
const interactionsProps = [
|
|
114
125
|
useClick(interactionContext, {
|
|
115
126
|
event: "mousedown",
|
|
116
127
|
keyboardHandlers: false
|
|
117
128
|
}),
|
|
118
129
|
useRole(interactionContext, { role: "listbox" }),
|
|
119
|
-
useInnerOffset(interactionContext, {
|
|
120
|
-
enabled: !fallback && isScrollable,
|
|
121
|
-
onChange: setInnerOffset,
|
|
122
|
-
overflowRef,
|
|
123
|
-
scrollRef: refs.floating
|
|
124
|
-
}),
|
|
125
130
|
useListNavigation(interactionContext, {
|
|
126
131
|
listRef: listItemsRef,
|
|
127
|
-
activeIndex:
|
|
132
|
+
activeIndex: null,
|
|
128
133
|
selectedIndex,
|
|
129
134
|
onNavigate: (index) => {
|
|
130
135
|
if (index !== null) setActiveIndex(index, {
|
|
@@ -135,13 +140,14 @@ const SelectInlineImpl = (props) => {
|
|
|
135
140
|
});
|
|
136
141
|
},
|
|
137
142
|
disabledIndices: registry.getDisabledIndices(),
|
|
138
|
-
scrollItemIntoView: false
|
|
143
|
+
scrollItemIntoView: false,
|
|
144
|
+
focusItemOnHover: false
|
|
139
145
|
}),
|
|
140
146
|
useTypeahead(interactionContext, {
|
|
141
147
|
listRef: listContentRef,
|
|
142
148
|
onMatch,
|
|
143
149
|
selectedIndex,
|
|
144
|
-
activeIndex:
|
|
150
|
+
activeIndex: null,
|
|
145
151
|
onTypingChange: (e) => {
|
|
146
152
|
state.current.isTyping = e;
|
|
147
153
|
}
|
|
@@ -152,10 +158,14 @@ const SelectInlineImpl = (props) => {
|
|
|
152
158
|
}, interactionsProps));
|
|
153
159
|
const interactionsContext = React.useMemo(() => {
|
|
154
160
|
return {
|
|
155
|
-
...interactions,
|
|
156
161
|
getReferenceProps(props2 = {}) {
|
|
157
162
|
return interactions.getReferenceProps({
|
|
158
163
|
...props2,
|
|
164
|
+
onMouseDown: composeEventHandlers(props2.onMouseDown, (event) => {
|
|
165
|
+
const last = lastPointerRef.current;
|
|
166
|
+
last.x = event.clientX;
|
|
167
|
+
last.y = event.clientY;
|
|
168
|
+
}),
|
|
159
169
|
onKeyDown: composeEventHandlers(props2.onKeyDown, (event) => {
|
|
160
170
|
latestKeyboardEventRef.current = event.nativeEvent || event;
|
|
161
171
|
if (event.key === "Enter" || event.code === "Space" || event.key === " " && !state.current.isTyping) {
|
|
@@ -168,17 +178,7 @@ const SelectInlineImpl = (props) => {
|
|
|
168
178
|
getFloatingProps(props2) {
|
|
169
179
|
return interactions.getFloatingProps({
|
|
170
180
|
ref: refs.floating,
|
|
171
|
-
className: "Select",
|
|
172
181
|
...props2,
|
|
173
|
-
style: {
|
|
174
|
-
position: strategy,
|
|
175
|
-
top: y ?? "",
|
|
176
|
-
left: x ?? "",
|
|
177
|
-
outline: 0,
|
|
178
|
-
scrollbarWidth: "none",
|
|
179
|
-
...floatingStyle.current,
|
|
180
|
-
...props2?.style
|
|
181
|
-
},
|
|
182
182
|
onPointerEnter() {
|
|
183
183
|
setControlledScrolling(false);
|
|
184
184
|
state.current.isMouseOutside = false;
|
|
@@ -197,20 +197,24 @@ const SelectInlineImpl = (props) => {
|
|
|
197
197
|
onContextMenu(e) {
|
|
198
198
|
e.preventDefault();
|
|
199
199
|
},
|
|
200
|
-
onScroll
|
|
201
|
-
flushSync(() => {
|
|
202
|
-
setScrollTop(event.currentTarget.scrollTop);
|
|
203
|
-
});
|
|
204
|
-
}
|
|
200
|
+
onScroll: updateScrollArrows
|
|
205
201
|
});
|
|
206
202
|
}
|
|
207
203
|
};
|
|
208
204
|
}, [
|
|
209
|
-
refs
|
|
205
|
+
refs,
|
|
206
|
+
interactions,
|
|
207
|
+
requestOpenChange,
|
|
208
|
+
updateScrollArrows
|
|
209
|
+
]);
|
|
210
|
+
const floatingPosition = React.useMemo(() => ({
|
|
211
|
+
position: strategy,
|
|
212
|
+
top: y ?? "",
|
|
213
|
+
left: x ?? ""
|
|
214
|
+
}), [
|
|
215
|
+
strategy,
|
|
210
216
|
x,
|
|
211
|
-
y
|
|
212
|
-
refs.floating.current,
|
|
213
|
-
interactions
|
|
217
|
+
y
|
|
214
218
|
]);
|
|
215
219
|
useIsomorphicLayoutEffect(() => {
|
|
216
220
|
if (open) {
|
|
@@ -225,7 +229,6 @@ const SelectInlineImpl = (props) => {
|
|
|
225
229
|
}
|
|
226
230
|
allowSelectRef.current = false;
|
|
227
231
|
allowMouseUpRef.current = true;
|
|
228
|
-
setInnerOffset(0);
|
|
229
232
|
setFallback(false);
|
|
230
233
|
setBlockSelection(false);
|
|
231
234
|
}, [open]);
|
|
@@ -236,15 +239,15 @@ const SelectInlineImpl = (props) => {
|
|
|
236
239
|
if (!open) return;
|
|
237
240
|
const scrollActiveIntoView = (index) => {
|
|
238
241
|
if (controlledScrolling && index != null) listItemsRef.current[index]?.scrollIntoView({ block: "nearest" });
|
|
239
|
-
|
|
242
|
+
updateScrollArrows();
|
|
240
243
|
};
|
|
241
244
|
scrollActiveIntoView(activeIndexRef.current);
|
|
242
245
|
return selectItemParentContext.activeIndexSubscribe(scrollActiveIntoView);
|
|
243
246
|
}, [
|
|
244
247
|
open,
|
|
245
|
-
refs,
|
|
246
248
|
controlledScrolling,
|
|
247
|
-
selectItemParentContext.activeIndexSubscribe
|
|
249
|
+
selectItemParentContext.activeIndexSubscribe,
|
|
250
|
+
updateScrollArrows
|
|
248
251
|
]);
|
|
249
252
|
React.useEffect(() => {
|
|
250
253
|
if (open && fallback) {
|
|
@@ -265,10 +268,11 @@ const SelectInlineImpl = (props) => {
|
|
|
265
268
|
return /* @__PURE__ */ jsx(SelectProvider, {
|
|
266
269
|
scope,
|
|
267
270
|
...selectContext,
|
|
268
|
-
|
|
269
|
-
setInnerOffset,
|
|
271
|
+
updateScrollArrows,
|
|
270
272
|
fallback,
|
|
271
273
|
floatingContext,
|
|
274
|
+
interactions: interactionsContext,
|
|
275
|
+
floatingPosition,
|
|
272
276
|
canScrollDown: !!showDownArrow,
|
|
273
277
|
canScrollUp: !!showUpArrow,
|
|
274
278
|
controlledScrolling,
|
|
@@ -282,7 +286,7 @@ const SelectInlineImpl = (props) => {
|
|
|
282
286
|
allowMouseUpRef,
|
|
283
287
|
allowSelectRef,
|
|
284
288
|
dataRef,
|
|
285
|
-
|
|
289
|
+
getItemProps: interactions.getItemProps,
|
|
286
290
|
listRef: listItemsRef,
|
|
287
291
|
selectTimeoutRef,
|
|
288
292
|
children
|