@tamagui/select 3.0.0-beta.669.1 → 3.0.0-beta.728.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 +0 -1
- package/dist/cjs/Select.native.cjs +0 -1
- package/dist/cjs/Select.native.js +0 -1
- package/dist/cjs/Select.native.js.map +1 -1
- package/dist/cjs/SelectContent.cjs +0 -1
- package/dist/cjs/SelectContent.native.cjs +0 -1
- package/dist/cjs/SelectContent.native.js +0 -1
- package/dist/cjs/SelectContent.native.js.map +1 -1
- package/dist/cjs/SelectImpl.cjs +0 -1
- package/dist/cjs/SelectImpl.native.cjs +0 -1
- package/dist/cjs/SelectImpl.native.js +0 -1
- package/dist/cjs/SelectImpl.native.js.map +1 -1
- package/dist/cjs/SelectItem.cjs +0 -1
- package/dist/cjs/SelectItem.native.cjs +0 -1
- package/dist/cjs/SelectItem.native.js +0 -1
- package/dist/cjs/SelectItem.native.js.map +1 -1
- package/dist/cjs/SelectItemText.cjs +0 -1
- package/dist/cjs/SelectItemText.native.cjs +0 -1
- package/dist/cjs/SelectItemText.native.js +0 -1
- package/dist/cjs/SelectItemText.native.js.map +1 -1
- package/dist/cjs/SelectScrollButton.cjs +0 -1
- package/dist/cjs/SelectScrollButton.native.cjs +0 -1
- package/dist/cjs/SelectScrollButton.native.js +0 -1
- package/dist/cjs/SelectScrollButton.native.js.map +1 -1
- package/dist/cjs/SelectTrigger.cjs +0 -1
- package/dist/cjs/SelectTrigger.native.cjs +0 -1
- package/dist/cjs/SelectTrigger.native.js +0 -1
- package/dist/cjs/SelectTrigger.native.js.map +1 -1
- package/dist/cjs/SelectViewport.cjs +0 -1
- package/dist/cjs/SelectViewport.native.cjs +0 -1
- package/dist/cjs/SelectViewport.native.js +0 -1
- package/dist/cjs/SelectViewport.native.js.map +1 -1
- package/dist/cjs/constants.cjs +0 -1
- package/dist/cjs/constants.native.cjs +0 -1
- package/dist/cjs/constants.native.js +0 -1
- package/dist/cjs/constants.native.js.map +1 -1
- package/dist/cjs/context.cjs +0 -1
- package/dist/cjs/context.native.cjs +0 -1
- package/dist/cjs/context.native.js +0 -1
- package/dist/cjs/context.native.js.map +1 -1
- package/dist/cjs/index.cjs +0 -1
- package/dist/cjs/index.native.cjs +0 -1
- package/dist/cjs/index.native.js +0 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/selectionController.cjs +0 -1
- package/dist/cjs/selectionController.native.cjs +0 -1
- package/dist/cjs/selectionController.native.js +0 -1
- package/dist/cjs/selectionController.native.js.map +1 -1
- package/dist/cjs/types.cjs +0 -1
- package/dist/cjs/types.native.cjs +0 -1
- package/dist/cjs/types.native.js +0 -1
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/esm/Select.mjs.map +1 -1
- package/dist/esm/Select.native.js.map +1 -1
- package/dist/esm/SelectImpl.mjs.map +1 -1
- package/dist/esm/SelectItem.mjs.map +1 -1
- package/dist/esm/SelectItem.native.js.map +1 -1
- package/dist/esm/SelectViewport.mjs.map +1 -1
- package/dist/esm/context.mjs.map +1 -1
- package/dist/esm/context.native.js.map +1 -1
- package/dist/esm/selectionController.mjs.map +1 -1
- package/dist/esm/selectionController.native.js.map +1 -1
- package/dist/jsx/Select.mjs.map +1 -1
- package/dist/jsx/Select.native.cjs +0 -1
- package/dist/jsx/Select.native.js +0 -1
- package/dist/jsx/Select.native.js.map +1 -1
- package/dist/jsx/SelectContent.native.cjs +0 -1
- package/dist/jsx/SelectContent.native.js +0 -1
- package/dist/jsx/SelectContent.native.js.map +1 -1
- package/dist/jsx/SelectImpl.mjs.map +1 -1
- package/dist/jsx/SelectImpl.native.cjs +0 -1
- package/dist/jsx/SelectImpl.native.js +0 -1
- package/dist/jsx/SelectImpl.native.js.map +1 -1
- package/dist/jsx/SelectItem.mjs.map +1 -1
- package/dist/jsx/SelectItem.native.cjs +0 -1
- package/dist/jsx/SelectItem.native.js +0 -1
- package/dist/jsx/SelectItem.native.js.map +1 -1
- package/dist/jsx/SelectItemText.native.cjs +0 -1
- package/dist/jsx/SelectItemText.native.js +0 -1
- package/dist/jsx/SelectItemText.native.js.map +1 -1
- package/dist/jsx/SelectScrollButton.native.cjs +0 -1
- package/dist/jsx/SelectScrollButton.native.js +0 -1
- package/dist/jsx/SelectScrollButton.native.js.map +1 -1
- package/dist/jsx/SelectTrigger.native.cjs +0 -1
- package/dist/jsx/SelectTrigger.native.js +0 -1
- package/dist/jsx/SelectTrigger.native.js.map +1 -1
- package/dist/jsx/SelectViewport.mjs.map +1 -1
- package/dist/jsx/SelectViewport.native.cjs +0 -1
- package/dist/jsx/SelectViewport.native.js +0 -1
- package/dist/jsx/SelectViewport.native.js.map +1 -1
- package/dist/jsx/constants.native.cjs +0 -1
- package/dist/jsx/constants.native.js +0 -1
- package/dist/jsx/constants.native.js.map +1 -1
- package/dist/jsx/context.mjs.map +1 -1
- package/dist/jsx/context.native.cjs +0 -1
- package/dist/jsx/context.native.js +0 -1
- package/dist/jsx/context.native.js.map +1 -1
- package/dist/jsx/index.native.cjs +0 -1
- package/dist/jsx/index.native.js +0 -1
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/selectionController.mjs.map +1 -1
- package/dist/jsx/selectionController.native.cjs +0 -1
- package/dist/jsx/selectionController.native.js +0 -1
- package/dist/jsx/selectionController.native.js.map +1 -1
- package/dist/jsx/types.native.cjs +0 -1
- package/dist/jsx/types.native.js +0 -1
- package/dist/jsx/types.native.js.map +1 -1
- package/package.json +29 -29
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectItem.native.js","names":[],"sources":["jsx/SelectItem.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 for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar SelectItem_exports = {};\n__export(SelectItem_exports, {\n SelectItem: () => SelectItem,\n SelectItemContextProvider: () => SelectItemContextProvider,\n SelectItemFrame: () => SelectItemFrame,\n useSelectItemContext: () => useSelectItemContext\n});\nmodule.exports = __toCommonJS(SelectItem_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_adapt = require(\"@tamagui/adapt\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core = require(\"@tamagui/core\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar React = __toESM(require(\"react\"), 1);\nvar import_context = require(\"./context\");\nvar import_selectionController = require(\"./selectionController\");\nfunction _instanceof(left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return !!right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n}\nvar ITEM_NAME = \"SelectItem\";\nvar { Provider: SelectItemContextProvider, useStyledContext: useSelectItemContext } = (0, import_core.createStyledContext)(null, ITEM_NAME);\nvar SelectItemFrame = (0, import_core.styled)(import_core.View, {\n displayName: ITEM_NAME,\n alignItems: \"center\",\n flexDirection: \"row\"\n});\nvar SelectItem = (0, import_core.createStyledHOC)(SelectItemFrame, function SelectItem2(props, forwardedRef) {\n var { scope, value, disabled: disabledProp, \"aria-disabled\": ariaDisabled, textValue: textValueProp, ...restProps } = props;\n var disabled = disabledProp !== null && disabledProp !== void 0 ? disabledProp : ariaDisabled === true;\n var context = (0, import_context.useSelectItemParentContext)(scope);\n var selectContext = (0, import_context.useSelectContext)(scope);\n var isAdapted = (0, import_adapt.useAdaptIsActive)(selectContext.adaptScope);\n var { listRef, registry, mode, selectedValues, selectValue, activeIndexSubscribe, activeIndexRef, allowMouseUpRef, allowSelectRef, selectTimeoutRef, interactions, shouldRenderWebNative, setActiveIndexFast, moveActive, search } = context;\n var isSelected = selectedValues.includes(value);\n var pendingMouseUpSelectionRef = React.useRef(false);\n var itemNodeRef = React.useRef(null);\n var [, rerenderRegistry] = React.useReducer(function(version) {\n return version + 1;\n }, 0);\n var registrationRef = React.useRef(null);\n var initialRegistration = React.useRef({\n value,\n disabled,\n textValue: textValueProp\n });\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n return registry.subscribe(function() {\n return rerenderRegistry();\n });\n }, [\n registry\n ]);\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n var registration = registry.registerItem(initialRegistration.current);\n registrationRef.current = registration;\n var registeredNode = itemNodeRef.current;\n registration.setNode(registeredNode);\n var registeredIndex = registry.getItems().findIndex(function(item) {\n return item.id === registration.id;\n });\n if (import_constants.isWeb && listRef && registeredIndex >= 0 && _instanceof(registeredNode, HTMLElement)) {\n listRef.current[registeredIndex] = registeredNode;\n }\n return function() {\n var currentIndex = registry.getItems().findIndex(function(item) {\n return item.id === registration.id;\n });\n if (listRef && currentIndex >= 0 && listRef.current[currentIndex] === registeredNode) {\n listRef.current[currentIndex] = null;\n }\n registrationRef.current = null;\n registration.unregister();\n };\n }, [\n registry\n ]);\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n var _registrationRef_current;\n (_registrationRef_current = registrationRef.current) === null || _registrationRef_current === void 0 ? void 0 : _registrationRef_current.update({\n value,\n disabled,\n textValue: textValueProp\n });\n }, [\n disabled,\n textValueProp,\n value\n ]);\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n var _registrationRef_current;\n (_registrationRef_current = registrationRef.current) === null || _registrationRef_current === void 0 ? void 0 : _registrationRef_current.setNode(itemNodeRef.current);\n });\n var index = registry.getIndex(value);\n React.useEffect(function() {\n var handleActiveIndex = function(i) {\n if (index === i) {\n if (import_constants.isWeb) {\n requestAnimationFrame(function() {\n var _listRef_current_index;\n listRef === null || listRef === void 0 ? void 0 : (_listRef_current_index = listRef.current[index]) === null || _listRef_current_index === void 0 ? void 0 : _listRef_current_index.focus();\n });\n }\n }\n };\n var currentActiveIndex = activeIndexRef === null || activeIndexRef === void 0 ? void 0 : activeIndexRef.current;\n if (currentActiveIndex !== null && currentActiveIndex !== void 0) {\n handleActiveIndex(currentActiveIndex);\n }\n return activeIndexSubscribe(handleActiveIndex);\n }, [\n activeIndexRef,\n activeIndexSubscribe,\n index,\n listRef\n ]);\n var textId = React.useId();\n var refCallback = React.useCallback(function(node) {\n var _registrationRef_current;\n itemNodeRef.current = node;\n (_registrationRef_current = registrationRef.current) === null || _registrationRef_current === void 0 ? void 0 : _registrationRef_current.setNode(node);\n if (!import_constants.isWeb) return;\n if (listRef && index >= 0) {\n listRef.current[index] = _instanceof(node, HTMLElement) ? node : null;\n }\n }, [\n index,\n listRef\n ]);\n var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, refCallback);\n var handleSelect = React.useCallback(function(event) {\n var reason = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"item-press\";\n if (disabled) return;\n var nativeEvent = (event === null || event === void 0 ? void 0 : event.nativeEvent) || event;\n selectValue(value, (0, import_core.createChangeEventDetails)(reason, nativeEvent, event === null || event === void 0 ? void 0 : event.currentTarget));\n }, [\n disabled,\n selectValue,\n value\n ]);\n var handleKeyDown = React.useCallback(function(event) {\n var _event_key;\n if (disabled) return;\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n handleSelect(event, \"keyboard\");\n return;\n }\n if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n event.preventDefault();\n event.stopPropagation();\n moveActive(event.key === \"ArrowDown\" ? 1 : -1, event.nativeEvent || event);\n return;\n }\n if (!interactions && ((_event_key = event.key) === null || _event_key === void 0 ? void 0 : _event_key.length) === 1 && !event.metaKey && !event.ctrlKey) {\n search(event.key, event.nativeEvent || event);\n }\n if (allowSelectRef) {\n allowSelectRef.current = true;\n }\n }, [\n allowSelectRef,\n disabled,\n handleSelect,\n interactions,\n moveActive,\n search\n ]);\n var selectItemProps = React.useMemo(function() {\n if (interactions) {\n var { onTouchMove, onTouchEnd, onKeyDown, onClick, onMouseUp, onMouseMove, onPress, ...itemProps } = restProps;\n var interactionProps = interactions.getItemProps({\n ...itemProps,\n onTouchMove() {\n allowSelectRef.current = true;\n allowMouseUpRef.current = false;\n },\n onTouchEnd() {\n allowSelectRef.current = false;\n allowMouseUpRef.current = true;\n },\n onMouseMove(event) {\n if (disabled || index < 0) return;\n setActiveIndexFast === null || setActiveIndexFast === void 0 ? void 0 : setActiveIndexFast(index, {\n reason: \"item-hover\",\n event: event.nativeEvent || event,\n trigger: event.currentTarget,\n index\n });\n },\n onKeyDown: handleKeyDown,\n onClick(event) {\n if (disabled) return;\n var shouldSelect = pendingMouseUpSelectionRef.current || allowSelectRef.current;\n pendingMouseUpSelectionRef.current = false;\n clearTimeout(selectTimeoutRef.current);\n allowSelectRef.current = true;\n if (shouldSelect) {\n handleSelect(event);\n }\n },\n onMouseUp(event) {\n if (disabled) return;\n if (!allowMouseUpRef.current) {\n allowMouseUpRef.current = true;\n allowSelectRef.current = true;\n return;\n }\n pendingMouseUpSelectionRef.current = allowSelectRef.current;\n clearTimeout(selectTimeoutRef.current);\n selectTimeoutRef.current = setTimeout(function() {\n allowSelectRef.current = true;\n if (pendingMouseUpSelectionRef.current) {\n pendingMouseUpSelectionRef.current = false;\n handleSelect(event);\n }\n });\n }\n });\n return {\n ...interactionProps,\n onTouchMove: (0, import_helpers.composeEventHandlers)(onTouchMove, interactionProps.onTouchMove),\n onTouchEnd: (0, import_helpers.composeEventHandlers)(onTouchEnd, interactionProps.onTouchEnd),\n onKeyDown: (0, import_helpers.composeEventHandlers)(onKeyDown, interactionProps.onKeyDown),\n onClick(event) {\n var _interactionProps_onClick;\n onClick === null || onClick === void 0 ? void 0 : onClick(event);\n if (event.defaultPrevented) {\n pendingMouseUpSelectionRef.current = false;\n clearTimeout(selectTimeoutRef.current);\n allowSelectRef.current = true;\n return;\n }\n (_interactionProps_onClick = interactionProps.onClick) === null || _interactionProps_onClick === void 0 ? void 0 : _interactionProps_onClick.call(interactionProps, event);\n },\n onMouseUp: (0, import_helpers.composeEventHandlers)(onMouseUp, interactionProps.onMouseUp),\n onMouseMove: (0, import_helpers.composeEventHandlers)(onMouseMove, interactionProps.onMouseMove),\n onPress\n };\n }\n return {\n ...restProps,\n onKeyDown: (0, import_helpers.composeEventHandlers)(restProps.onKeyDown, handleKeyDown),\n onMouseMove: (0, import_helpers.composeEventHandlers)(restProps.onMouseMove, function(event) {\n if (disabled || index < 0) return;\n setActiveIndexFast === null || setActiveIndexFast === void 0 ? void 0 : setActiveIndexFast(index, {\n reason: \"item-hover\",\n event: event.nativeEvent || event,\n trigger: event.currentTarget,\n index\n });\n }),\n onPress: (0, import_helpers.composeEventHandlers)(restProps.onPress, handleSelect)\n };\n }, [\n allowMouseUpRef,\n allowSelectRef,\n disabled,\n handleKeyDown,\n handleSelect,\n index,\n interactions,\n restProps,\n selectTimeoutRef,\n setActiveIndexFast\n ]);\n var accessibilityProps = (0, import_selectionController.getSelectOptionProps)(mode, isSelected, disabled, import_constants.isWeb ? \"web\" : \"native\");\n var _selectContext_activeIndex;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemContextProvider, {\n scope,\n value,\n textId: textId || \"\",\n textValue: textValueProp,\n isSelected,\n children: shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"option\", {\n value,\n disabled,\n children: props.children\n }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemFrame, {\n render: \"div\",\n ref: composedRefs,\n \"aria-labelledby\": textId,\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-disabled\": disabled ? \"\" : void 0,\n tabIndex: disabled ? void 0 : import_constants.isWeb && isAdapted ? index === ((_selectContext_activeIndex = selectContext.activeIndex) !== null && _selectContext_activeIndex !== void 0 ? _selectContext_activeIndex : selectContext.selectedIndex) ? 0 : -1 : -1,\n zIndex: 100,\n ...selectItemProps,\n ...accessibilityProps\n })\n });\n}, {\n disableTheme: true\n});\n//# sourceMappingURL=SelectItem.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;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC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,KAAK;GACL,mBAAmB;GACnB,cAAc,aAAa,WAAW;GACtC,iBAAiB,WAAW,KAAK,KAAK;GACtC,UAAU,WAAW,KAAK,IAAI,iBAAiB,SAAS,YAAY,YAAY,6BAA6B,cAAc,iBAAiB,QAAQ,+BAA+B,KAAK,IAAI,6BAA6B,cAAc,iBAAiB,IAAI,CAAC,IAAI,CAAC;GAClQ,QAAQ;GACR,GAAG;GACH,GAAG;EACL,CAAC;CACH,CAAC;AACH,GAAG,EACD,cAAc,KAChB,CAAC"}
|
|
1
|
+
{"version":3,"file":"SelectItem.native.js","names":[],"sources":["jsx/SelectItem.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 for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar SelectItem_exports = {};\n__export(SelectItem_exports, {\n SelectItem: () => SelectItem,\n SelectItemContextProvider: () => SelectItemContextProvider,\n SelectItemFrame: () => SelectItemFrame,\n useSelectItemContext: () => useSelectItemContext\n});\nmodule.exports = __toCommonJS(SelectItem_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_adapt = require(\"@tamagui/adapt\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core = require(\"@tamagui/core\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar React = __toESM(require(\"react\"), 1);\nvar import_context = require(\"./context\");\nvar import_selectionController = require(\"./selectionController\");\nfunction _instanceof(left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return !!right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n}\nvar ITEM_NAME = \"SelectItem\";\nvar { Provider: SelectItemContextProvider, useStyledContext: useSelectItemContext } = (0, import_core.createStyledContext)(null, ITEM_NAME);\nvar SelectItemFrame = (0, import_core.styled)(import_core.View, {\n displayName: ITEM_NAME,\n alignItems: \"center\",\n flexDirection: \"row\"\n});\nvar SelectItem = (0, import_core.createStyledHOC)(SelectItemFrame, function SelectItem2(props, forwardedRef) {\n var { scope, value, disabled: disabledProp, \"aria-disabled\": ariaDisabled, textValue: textValueProp, ...restProps } = props;\n var disabled = disabledProp !== null && disabledProp !== void 0 ? disabledProp : ariaDisabled === true;\n var context = (0, import_context.useSelectItemParentContext)(scope);\n var selectContext = (0, import_context.useSelectContext)(scope);\n var isAdapted = (0, import_adapt.useAdaptIsActive)(selectContext.adaptScope);\n var { listRef, registry, mode, selectedValues, selectValue, activeIndexSubscribe, activeIndexRef, allowMouseUpRef, allowSelectRef, selectTimeoutRef, interactions, shouldRenderWebNative, setActiveIndexFast, moveActive, search } = context;\n var isSelected = selectedValues.includes(value);\n var pendingMouseUpSelectionRef = React.useRef(false);\n var itemNodeRef = React.useRef(null);\n var [, rerenderRegistry] = React.useReducer(function(version) {\n return version + 1;\n }, 0);\n var registrationRef = React.useRef(null);\n var initialRegistration = React.useRef({\n value,\n disabled,\n textValue: textValueProp\n });\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n return registry.subscribe(function() {\n return rerenderRegistry();\n });\n }, [\n registry\n ]);\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n var registration = registry.registerItem(initialRegistration.current);\n registrationRef.current = registration;\n var registeredNode = itemNodeRef.current;\n registration.setNode(registeredNode);\n var registeredIndex = registry.getItems().findIndex(function(item) {\n return item.id === registration.id;\n });\n if (import_constants.isWeb && listRef && registeredIndex >= 0 && _instanceof(registeredNode, HTMLElement)) {\n listRef.current[registeredIndex] = registeredNode;\n }\n return function() {\n var currentIndex = registry.getItems().findIndex(function(item) {\n return item.id === registration.id;\n });\n if (listRef && currentIndex >= 0 && listRef.current[currentIndex] === registeredNode) {\n listRef.current[currentIndex] = null;\n }\n registrationRef.current = null;\n registration.unregister();\n };\n }, [\n registry\n ]);\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n var _registrationRef_current;\n (_registrationRef_current = registrationRef.current) === null || _registrationRef_current === void 0 ? void 0 : _registrationRef_current.update({\n value,\n disabled,\n textValue: textValueProp\n });\n }, [\n disabled,\n textValueProp,\n value\n ]);\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n var _registrationRef_current;\n (_registrationRef_current = registrationRef.current) === null || _registrationRef_current === void 0 ? void 0 : _registrationRef_current.setNode(itemNodeRef.current);\n });\n var index = registry.getIndex(value);\n React.useEffect(function() {\n var handleActiveIndex = function(i) {\n if (index === i) {\n if (import_constants.isWeb) {\n requestAnimationFrame(function() {\n var _listRef_current_index;\n listRef === null || listRef === void 0 ? void 0 : (_listRef_current_index = listRef.current[index]) === null || _listRef_current_index === void 0 ? void 0 : _listRef_current_index.focus();\n });\n }\n }\n };\n var currentActiveIndex = activeIndexRef === null || activeIndexRef === void 0 ? void 0 : activeIndexRef.current;\n if (currentActiveIndex !== null && currentActiveIndex !== void 0) {\n handleActiveIndex(currentActiveIndex);\n }\n return activeIndexSubscribe(handleActiveIndex);\n }, [\n activeIndexRef,\n activeIndexSubscribe,\n index,\n listRef\n ]);\n var textId = React.useId();\n var refCallback = React.useCallback(function(node) {\n var _registrationRef_current;\n itemNodeRef.current = node;\n (_registrationRef_current = registrationRef.current) === null || _registrationRef_current === void 0 ? void 0 : _registrationRef_current.setNode(node);\n if (!import_constants.isWeb) return;\n if (listRef && index >= 0) {\n listRef.current[index] = _instanceof(node, HTMLElement) ? node : null;\n }\n }, [\n index,\n listRef\n ]);\n var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, refCallback);\n var handleSelect = React.useCallback(function(event) {\n var reason = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"item-press\";\n if (disabled) return;\n var nativeEvent = (event === null || event === void 0 ? void 0 : event.nativeEvent) || event;\n selectValue(value, (0, import_core.createChangeEventDetails)(reason, nativeEvent, event === null || event === void 0 ? void 0 : event.currentTarget));\n }, [\n disabled,\n selectValue,\n value\n ]);\n var handleKeyDown = React.useCallback(function(event) {\n var _event_key;\n if (disabled) return;\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n handleSelect(event, \"keyboard\");\n return;\n }\n if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n event.preventDefault();\n event.stopPropagation();\n moveActive(event.key === \"ArrowDown\" ? 1 : -1, event.nativeEvent || event);\n return;\n }\n if (!interactions && ((_event_key = event.key) === null || _event_key === void 0 ? void 0 : _event_key.length) === 1 && !event.metaKey && !event.ctrlKey) {\n search(event.key, event.nativeEvent || event);\n }\n if (allowSelectRef) {\n allowSelectRef.current = true;\n }\n }, [\n allowSelectRef,\n disabled,\n handleSelect,\n interactions,\n moveActive,\n search\n ]);\n var selectItemProps = React.useMemo(function() {\n if (interactions) {\n var { onTouchMove, onTouchEnd, onKeyDown, onClick, onMouseUp, onMouseMove, onPress, ...itemProps } = restProps;\n var interactionProps = interactions.getItemProps({\n ...itemProps,\n onTouchMove() {\n allowSelectRef.current = true;\n allowMouseUpRef.current = false;\n },\n onTouchEnd() {\n allowSelectRef.current = false;\n allowMouseUpRef.current = true;\n },\n onMouseMove(event) {\n if (disabled || index < 0) return;\n setActiveIndexFast === null || setActiveIndexFast === void 0 ? void 0 : setActiveIndexFast(index, {\n reason: \"item-hover\",\n event: event.nativeEvent || event,\n trigger: event.currentTarget,\n index\n });\n },\n onKeyDown: handleKeyDown,\n onClick(event) {\n if (disabled) return;\n var shouldSelect = pendingMouseUpSelectionRef.current || allowSelectRef.current;\n pendingMouseUpSelectionRef.current = false;\n clearTimeout(selectTimeoutRef.current);\n allowSelectRef.current = true;\n if (shouldSelect) {\n handleSelect(event);\n }\n },\n onMouseUp(event) {\n if (disabled) return;\n if (!allowMouseUpRef.current) {\n allowMouseUpRef.current = true;\n allowSelectRef.current = true;\n return;\n }\n pendingMouseUpSelectionRef.current = allowSelectRef.current;\n clearTimeout(selectTimeoutRef.current);\n selectTimeoutRef.current = setTimeout(function() {\n allowSelectRef.current = true;\n if (pendingMouseUpSelectionRef.current) {\n pendingMouseUpSelectionRef.current = false;\n handleSelect(event);\n }\n });\n }\n });\n return {\n ...interactionProps,\n onTouchMove: (0, import_helpers.composeEventHandlers)(onTouchMove, interactionProps.onTouchMove),\n onTouchEnd: (0, import_helpers.composeEventHandlers)(onTouchEnd, interactionProps.onTouchEnd),\n onKeyDown: (0, import_helpers.composeEventHandlers)(onKeyDown, interactionProps.onKeyDown),\n onClick(event) {\n var _interactionProps_onClick;\n onClick === null || onClick === void 0 ? void 0 : onClick(event);\n if (event.defaultPrevented) {\n pendingMouseUpSelectionRef.current = false;\n clearTimeout(selectTimeoutRef.current);\n allowSelectRef.current = true;\n return;\n }\n (_interactionProps_onClick = interactionProps.onClick) === null || _interactionProps_onClick === void 0 ? void 0 : _interactionProps_onClick.call(interactionProps, event);\n },\n onMouseUp: (0, import_helpers.composeEventHandlers)(onMouseUp, interactionProps.onMouseUp),\n onMouseMove: (0, import_helpers.composeEventHandlers)(onMouseMove, interactionProps.onMouseMove),\n onPress\n };\n }\n return {\n ...restProps,\n onKeyDown: (0, import_helpers.composeEventHandlers)(restProps.onKeyDown, handleKeyDown),\n onMouseMove: (0, import_helpers.composeEventHandlers)(restProps.onMouseMove, function(event) {\n if (disabled || index < 0) return;\n setActiveIndexFast === null || setActiveIndexFast === void 0 ? void 0 : setActiveIndexFast(index, {\n reason: \"item-hover\",\n event: event.nativeEvent || event,\n trigger: event.currentTarget,\n index\n });\n }),\n onPress: (0, import_helpers.composeEventHandlers)(restProps.onPress, handleSelect)\n };\n }, [\n allowMouseUpRef,\n allowSelectRef,\n disabled,\n handleKeyDown,\n handleSelect,\n index,\n interactions,\n restProps,\n selectTimeoutRef,\n setActiveIndexFast\n ]);\n var accessibilityProps = (0, import_selectionController.getSelectOptionProps)(mode, isSelected, disabled, import_constants.isWeb ? \"web\" : \"native\");\n var _selectContext_activeIndex;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemContextProvider, {\n scope,\n value,\n textId: textId || \"\",\n textValue: textValueProp,\n isSelected,\n children: shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"option\", {\n value,\n disabled,\n children: props.children\n }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemFrame, {\n render: \"div\",\n ref: composedRefs,\n \"aria-labelledby\": textId,\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-disabled\": disabled ? \"\" : void 0,\n tabIndex: disabled ? void 0 : import_constants.isWeb && isAdapted ? index === ((_selectContext_activeIndex = selectContext.activeIndex) !== null && _selectContext_activeIndex !== void 0 ? _selectContext_activeIndex : selectContext.selectedIndex) ? 0 : -1 : -1,\n zIndex: 100,\n ...selectItemProps,\n ...accessibilityProps\n })\n });\n}, {\n disableTheme: true\n});\n//# sourceMappingURL=SelectItem.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IA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AAW,aAAa;GACtF,cAAc,GAAG,eAAe,qBAAoB,CAAE,UAAU,aAAa,SAAS,OAAO;IAC3F,IAAI,YAAY,QAAQ,GAAG;IAC3B,uBAAuB,QAAQ,uBAAuB,KAAK,IAAI,KAAK,IAAI,mBAAmB,OAAO;KAChG,QAAQ;KACR,OAAO,MAAM,eAAe;KAC5B,SAAS,MAAM;KACf;IACF,CAAC;GACH,CAAC;GACD,UAAU,GAAG,eAAe,qBAAoB,CAAE,UAAU,SAAS,YAAY;EACnF;CACF,GAAG;EACD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CACD,IAAI,sBAAsB,GAAG,2BAA2B,qBAAoB,CAAE,MAAM,YAAY,UAAU,iBAAiB,QAAQ,QAAQ,QAAQ;CACnJ,IAAI;CACJ,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,2BAA2B;EAC5E;EACA;EACA,QAAQ,UAAU;EAClB,WAAW;EACX;EACA,UAAU,wBAAwC,iBAAC,GAAG,mBAAmB,IAAG,CAAE,UAAU;GACtF;GACA;GACA,UAAU,MAAM;EAClB,CAAC,IAAoB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,iBAAiB;GAChE,QAAQ;GACR,KAAK;GACL,mBAAmB;GACnB,cAAc,aAAa,WAAW;GACtC,iBAAiB,WAAW,KAAK,KAAK;GACtC,UAAU,WAAW,KAAK,IAAI,iBAAiB,SAAS,YAAY,YAAY,6BAA6B,cAAc,iBAAiB,QAAQ,+BAA+B,KAAK,IAAI,6BAA6B,cAAc,iBAAiB,IAAI,CAAC,IAAI,CAAC;GAClQ,QAAQ;GACR,GAAG;GACH,GAAG;EACL,CAAC;CACH,CAAC;AACH,GAAG,EACD,cAAc,KAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectItemText.native.js","names":[],"sources":["jsx/SelectItemText.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 for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar SelectItemText_exports = {};\n__export(SelectItemText_exports, {\n ITEM_TEXT_NAME: () => ITEM_TEXT_NAME,\n SelectItemText: () => SelectItemText,\n SelectItemTextFrame: () => SelectItemTextFrame\n});\nmodule.exports = __toCommonJS(SelectItemText_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_core = require(\"@tamagui/core\");\nvar React = __toESM(require(\"react\"), 1);\nvar import_context = require(\"./context\");\nvar import_selectionController = require(\"./selectionController\");\nvar import_SelectItem = require(\"./SelectItem\");\nvar ITEM_TEXT_NAME = \"SelectItemText\";\nvar SelectItemTextFrame = (0, import_core.styled)(import_core.Text, {\n displayName: ITEM_TEXT_NAME\n});\nvar SelectItemText = (0, import_core.createStyledHOC)(SelectItemTextFrame, function SelectItemText2(props, forwardedRef) {\n var { scope, className, ...itemTextProps } = props;\n var itemParentContext = (0, import_context.useSelectItemParentContext)(scope);\n var ref = React.useRef(null);\n var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);\n var itemContext = (0, import_SelectItem.useSelectItemContext)(scope);\n var contents = React.useRef(null);\n var label = React.useRef(props.children);\n label.current = props.children;\n var labelText = (0, import_selectionController.getSelectLabelText)(props.children);\n contents.current = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemTextFrame, {\n className,\n id: itemContext.textId,\n ...itemTextProps,\n ref: composedRefs\n });\n (0, import_core.useIsomorphicLayoutEffect)(function() {\n return itemParentContext.registry.registerLabel(itemContext.value, label.current, itemContext.textValue);\n }, [\n itemContext.textValue,\n itemContext.value,\n itemParentContext.registry,\n labelText\n ]);\n if (itemParentContext.shouldRenderWebNative) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {\n children: props.children\n });\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {\n children: contents.current\n });\n});\n//# sourceMappingURL=SelectItemText.js.map\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectItemText.native.js","names":[],"sources":["jsx/SelectItemText.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 for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar SelectItemText_exports = {};\n__export(SelectItemText_exports, {\n ITEM_TEXT_NAME: () => ITEM_TEXT_NAME,\n SelectItemText: () => SelectItemText,\n SelectItemTextFrame: () => SelectItemTextFrame\n});\nmodule.exports = __toCommonJS(SelectItemText_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_core = require(\"@tamagui/core\");\nvar React = __toESM(require(\"react\"), 1);\nvar import_context = require(\"./context\");\nvar import_selectionController = require(\"./selectionController\");\nvar import_SelectItem = require(\"./SelectItem\");\nvar ITEM_TEXT_NAME = \"SelectItemText\";\nvar SelectItemTextFrame = (0, import_core.styled)(import_core.Text, {\n displayName: ITEM_TEXT_NAME\n});\nvar SelectItemText = (0, import_core.createStyledHOC)(SelectItemTextFrame, function SelectItemText2(props, forwardedRef) {\n var { scope, className, ...itemTextProps } = props;\n var itemParentContext = (0, import_context.useSelectItemParentContext)(scope);\n var ref = React.useRef(null);\n var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);\n var itemContext = (0, import_SelectItem.useSelectItemContext)(scope);\n var contents = React.useRef(null);\n var label = React.useRef(props.children);\n label.current = props.children;\n var labelText = (0, import_selectionController.getSelectLabelText)(props.children);\n contents.current = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemTextFrame, {\n className,\n id: itemContext.textId,\n ...itemTextProps,\n ref: composedRefs\n });\n (0, import_core.useIsomorphicLayoutEffect)(function() {\n return itemParentContext.registry.registerLabel(itemContext.value, label.current, itemContext.textValue);\n }, [\n itemContext.textValue,\n itemContext.value,\n itemParentContext.registry,\n labelText\n ]);\n if (itemParentContext.shouldRenderWebNative) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {\n children: props.children\n });\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {\n children: contents.current\n });\n});\n//# sourceMappingURL=SelectItemText.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;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,K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AS,YAAY,SAAS;CACzG,GAAG;EACD,YAAY;EACZ,YAAY;EACZ,kBAAkB;EAClB;CACF,CAAC;CACD,IAAI,kBAAkB,uBAAuB;EAC3C,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,mBAAmB,UAAU,EAC9E,UAAU,MAAM,SAClB,CAAC;CACH;CACA,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,mBAAmB,UAAU,EAC9E,UAAU,SAAS,QACrB,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectScrollButton.native.js","names":[],"sources":["jsx/SelectScrollButton.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar SelectScrollButton_native_exports = {};\n__export(SelectScrollButton_native_exports, {\n SelectScrollButtonFrame: () => SelectScrollButtonFrame,\n SelectScrollDownButton: () => SelectScrollDownButton,\n SelectScrollUpButton: () => SelectScrollUpButton\n});\nmodule.exports = __toCommonJS(SelectScrollButton_native_exports);\nvar import_core = require(\"@tamagui/core\");\nvar SelectScrollButtonFrame = (0, import_core.styled)(import_core.View, {\n displayName: \"SelectScrollButton\"\n});\nvar SelectScrollUpButton = (0, import_core.createStyledHOC)(SelectScrollButtonFrame, function(_props) {\n return null;\n});\nvar SelectScrollDownButton = (0, import_core.createStyledHOC)(SelectScrollButtonFrame, function(_props) {\n return null;\n});\n//# sourceMappingURL=SelectScrollButton.native.js.map\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectScrollButton.native.js","names":[],"sources":["jsx/SelectScrollButton.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar SelectScrollButton_native_exports = {};\n__export(SelectScrollButton_native_exports, {\n SelectScrollButtonFrame: () => SelectScrollButtonFrame,\n SelectScrollDownButton: () => SelectScrollDownButton,\n SelectScrollUpButton: () => SelectScrollUpButton\n});\nmodule.exports = __toCommonJS(SelectScrollButton_native_exports);\nvar import_core = require(\"@tamagui/core\");\nvar SelectScrollButtonFrame = (0, import_core.styled)(import_core.View, {\n displayName: \"SelectScrollButton\"\n});\nvar SelectScrollUpButton = (0, import_core.createStyledHOC)(SelectScrollButtonFrame, function(_props) {\n return null;\n});\nvar SelectScrollDownButton = (0, import_core.createStyledHOC)(SelectScrollButtonFrame, function(_props) {\n return null;\n});\n//# sourceMappingURL=SelectScrollButton.native.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,oCAAoC,CAAC;AACzC,SAAS,mCAAmC;CAC1C,+BAA+B;CAC/B,8BAA8B;CAC9B,4BAA4B;AAC9B,CAAC;AACD,OAAO,UAAU,aAAa,iCAAiC;AAC/D,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,2BAA2B,GAAG,YAAY,OAAM,CAAE,YAAY,MAAM,EACtE,aAAa,qBACf,CAAC;AACD,IAAI,wBAAwB,GAAG,YAAY,gBAAe,CAAE,yBAAyB,SAAS,QAAQ;CACpG,OAAO;AACT,CAAC;AACD,IAAI,0BAA0B,GAAG,YAAY,gBAAe,CAAE,yBAAyB,SAAS,QAAQ;CACtG,OAAO;AACT,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectTrigger.native.js","names":[],"sources":["jsx/SelectTrigger.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 SelectTrigger_exports = {};\n__export(SelectTrigger_exports, {\n\tSelectTrigger: () => SelectTrigger,\n\tSelectTriggerFrame: () => SelectTriggerFrame\n});\nmodule.exports = __toCommonJS(SelectTrigger_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core = require(\"@tamagui/core\");\nvar import_helpers = require(\"@tamagui/helpers\");\n__toESM(require(\"react\"), 1);\nvar import_context = require(\"./context\");\nvar SelectTriggerFrame = (0, import_core.styled)(import_core.View, {\n\tdisplayName: \"SelectTrigger\",\n\talignItems: \"center\",\n\tflexDirection: \"row\",\n\trender: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"button\", { type: \"button\" })\n});\nvar SelectTrigger = (0, import_core.createStyledHOC)(SelectTriggerFrame, function SelectTrigger2(props, forwardedRef) {\n\tvar _context_floatingContext;\n\tvar { scope, disabled = false, ...triggerProps } = props;\n\tvar context = (0, import_context.useSelectContext)(scope);\n\tvar itemParentContext = (0, import_context.useSelectItemParentContext)(scope);\n\tvar composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, (_context_floatingContext = context.floatingContext) === null || _context_floatingContext === void 0 ? void 0 : _context_floatingContext.refs.setReference);\n\tif (itemParentContext.shouldRenderWebNative) return null;\n\tvar toggleOpen = function(event) {\n\t\tvar reason = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"trigger-press\";\n\t\tif (!disabled) itemParentContext.requestOpenChange(!context.open, (0, import_core.createChangeEventDetails)(reason, (event === null || event === void 0 ? void 0 : event.nativeEvent) || event, event === null || event === void 0 ? void 0 : event.currentTarget));\n\t};\n\tvar interactionProps = {\n\t\t...triggerProps,\n\t\t...import_constants.isWeb ? { onMouseDown: (0, import_helpers.composeEventHandlers)(triggerProps.onMouseDown, function(event) {\n\t\t\tevent.preventDefault();\n\t\t\ttoggleOpen(event);\n\t\t}) } : { onPress: (0, import_helpers.composeEventHandlers)(triggerProps.onPress, toggleOpen) },\n\t\tonKeyDown: (0, import_helpers.composeEventHandlers)(triggerProps.onKeyDown, function(event) {\n\t\t\tif (event.key === \"Enter\" || event.key === \" \") {\n\t\t\t\tevent.preventDefault();\n\t\t\t\ttoggleOpen(event, \"keyboard\");\n\t\t\t}\n\t\t})\n\t};\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectTriggerFrame, {\n\t\ttype: \"button\",\n\t\tid: itemParentContext.id,\n\t\trole: \"combobox\",\n\t\t\"aria-haspopup\": \"listbox\",\n\t\t\"aria-expanded\": context.open,\n\t\t\"aria-autocomplete\": \"none\",\n\t\taccessibilityRole: import_constants.isWeb ? void 0 : \"button\",\n\t\taccessibilityState: import_constants.isWeb ? void 0 : {\n\t\t\texpanded: context.open,\n\t\t\tdisabled\n\t\t},\n\t\tdir: context.dir,\n\t\tdisabled,\n\t\t\"data-disabled\": disabled ? \"\" : void 0,\n\t\t...interactionProps,\n\t\tref: composedRefs\n\t});\n});\n//# sourceMappingURL=SelectTrigger.js.map\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectTrigger.native.js","names":[],"sources":["jsx/SelectTrigger.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 SelectTrigger_exports = {};\n__export(SelectTrigger_exports, {\n\tSelectTrigger: () => SelectTrigger,\n\tSelectTriggerFrame: () => SelectTriggerFrame\n});\nmodule.exports = __toCommonJS(SelectTrigger_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core = require(\"@tamagui/core\");\nvar import_helpers = require(\"@tamagui/helpers\");\n__toESM(require(\"react\"), 1);\nvar import_context = require(\"./context\");\nvar SelectTriggerFrame = (0, import_core.styled)(import_core.View, {\n\tdisplayName: \"SelectTrigger\",\n\talignItems: \"center\",\n\tflexDirection: \"row\",\n\trender: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"button\", { type: \"button\" })\n});\nvar SelectTrigger = (0, import_core.createStyledHOC)(SelectTriggerFrame, function SelectTrigger2(props, forwardedRef) {\n\tvar _context_floatingContext;\n\tvar { scope, disabled = false, ...triggerProps } = props;\n\tvar context = (0, import_context.useSelectContext)(scope);\n\tvar itemParentContext = (0, import_context.useSelectItemParentContext)(scope);\n\tvar composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, (_context_floatingContext = context.floatingContext) === null || _context_floatingContext === void 0 ? void 0 : _context_floatingContext.refs.setReference);\n\tif (itemParentContext.shouldRenderWebNative) return null;\n\tvar toggleOpen = function(event) {\n\t\tvar reason = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"trigger-press\";\n\t\tif (!disabled) itemParentContext.requestOpenChange(!context.open, (0, import_core.createChangeEventDetails)(reason, (event === null || event === void 0 ? void 0 : event.nativeEvent) || event, event === null || event === void 0 ? void 0 : event.currentTarget));\n\t};\n\tvar interactionProps = {\n\t\t...triggerProps,\n\t\t...import_constants.isWeb ? { onMouseDown: (0, import_helpers.composeEventHandlers)(triggerProps.onMouseDown, function(event) {\n\t\t\tevent.preventDefault();\n\t\t\ttoggleOpen(event);\n\t\t}) } : { onPress: (0, import_helpers.composeEventHandlers)(triggerProps.onPress, toggleOpen) },\n\t\tonKeyDown: (0, import_helpers.composeEventHandlers)(triggerProps.onKeyDown, function(event) {\n\t\t\tif (event.key === \"Enter\" || event.key === \" \") {\n\t\t\t\tevent.preventDefault();\n\t\t\t\ttoggleOpen(event, \"keyboard\");\n\t\t\t}\n\t\t})\n\t};\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectTriggerFrame, {\n\t\ttype: \"button\",\n\t\tid: itemParentContext.id,\n\t\trole: \"combobox\",\n\t\t\"aria-haspopup\": \"listbox\",\n\t\t\"aria-expanded\": context.open,\n\t\t\"aria-autocomplete\": \"none\",\n\t\taccessibilityRole: import_constants.isWeb ? void 0 : \"button\",\n\t\taccessibilityState: import_constants.isWeb ? void 0 : {\n\t\t\texpanded: context.open,\n\t\t\tdisabled\n\t\t},\n\t\tdir: context.dir,\n\t\tdisabled,\n\t\t\"data-disabled\": disabled ? \"\" : void 0,\n\t\t...interactionProps,\n\t\tref: composedRefs\n\t});\n});\n//# sourceMappingURL=SelectTrigger.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,GAAG,YAKpG,cAAc,CAAC,OAAO,CA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IAAI,UAAU,KAAK;EAC9E,IAAI,CAAC,UAAU,kBAAkB,kBAAkB,CAAC,QAAQ,OAAO,GAAG,YAAY,yBAAwB,CAAE,SAAS,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM,gBAAgB,OAAO,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM,aAAa,CAAC;CACnQ;CACA,IAAI,mBAAmB;EACtB,GAAG;EACH,GAAG,iBAAiB,QAAQ,EAAE,cAAc,GAAG,eAAe,qBAAoB,CAAE,aAAa,aAAa,SAAS,OAAO;GAC7H,MAAM,eAAe;GACrB,WAAW,KAAK;EACjB,CAAC,EAAE,IAAI,EAAE,UAAU,GAAG,eAAe,qBAAoB,CAAE,aAAa,SAAS,UAAU,EAAE;EAC7F,YAAY,GAAG,eAAe,qBAAoB,CAAE,aAAa,WAAW,SAAS,OAAO;GAC3F,IAAI,MAAM,QAAQ,WAAW,MAAM,QAAQ,KAAK;IAC/C,MAAM,eAAe;IACrB,WAAW,OAAO,UAAU;GAC7B;EACD,CAAC;CACF;CACA,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,oBAAoB;EACtE,MAAM;EACN,IAAI,kBAAkB;EACtB,MAAM;EACN,iBAAiB;EACjB,iBAAiB,QAAQ;EACzB,qBAAqB;EACrB,mBAAmB,iBAAiB,QAAQ,KAAK,IAAI;EACrD,oBAAoB,iBAAiB,QAAQ,KAAK,IAAI;GACrD,UAAU,QAAQ;GAClB;EACD;EACA,KAAK,QAAQ;EACb;EACA,iBAAiB,WAAW,KAAK,KAAK;EACtC,GAAG;EACH,KAAK;CACN,CAAC;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectViewport.js","names":[],"sources":["jsx/SelectViewport.js"],"sourcesContent":["import { AdaptPortalContents, useAdaptIsActive } from \"@tamagui/adapt\";\nimport { AnimatePresence } from \"@tamagui/animate-presence\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { createStyledHOC, styled, View } from \"@tamagui/core\";\nimport { needsPortalRepropagation } from \"@tamagui/portal\";\nimport { YStack } from \"@tamagui/stacks\";\nimport { startTransition } from \"@tamagui/start-transition\";\nimport * as React from \"react\";\nimport { VIEWPORT_NAME } from \"./constants\";\nimport {\n ForwardSelectContext,\n useSelectContext,\n useSelectItemParentContext\n} from \"./context\";\nimport { getSelectListboxProps } from \"./selectionController\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nconst SelectViewportFrame = styled(View, {\n displayName: VIEWPORT_NAME,\n position: \"relative\"\n});\nconst needsRepropagation = needsPortalRepropagation();\nconst SelectViewport = createStyledHOC(\n SelectViewportFrame,\n function SelectViewport2(props, forwardedRef) {\n const { scope, children, disableScroll, ...viewportProps } = props;\n const context = useSelectContext(scope);\n const itemContext = useSelectItemParentContext(scope);\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const viewportRef = React.useRef(null);\n const registeredItemCount = itemContext.registry.getItems().length;\n const [lazyMounted, setLazyMounted] = React.useState(context.lazyMount ? false : true);\n React.useEffect(() => {\n if (!context.lazyMount) return;\n if (!context.open) return;\n if (lazyMounted) return;\n startTransition(() => {\n setLazyMounted(true);\n });\n }, [context.lazyMount, context.open, lazyMounted]);\n React.useEffect(() => {\n if (!isWeb || !isAdapted || !context.open) return;\n const frame = requestAnimationFrame(() => {\n const index = context.activeIndexRef.current ?? itemContext.registry.firstEnabledIndex();\n const activeItem = viewportRef.current?.querySelector(\n '[role=\"option\"][tabindex=\"0\"]'\n ) ?? (index >= 0 ? itemContext.listRef?.current[index] : null);\n activeItem?.focus();\n });\n return () => cancelAnimationFrame(frame);\n }, [context.activeIndex, context.open, isAdapted, registeredItemCount]);\n const composedRefs = useComposedRefs(\n // @ts-ignore react 19 ref type mismatch\n forwardedRef,\n viewportRef,\n context.floatingContext?.refs.setFloating\n );\n useIsomorphicLayoutEffect(() => {\n if (context.update) {\n context.update();\n }\n }, [isAdapted]);\n React.useEffect(() => {\n if (context.lazyMount && lazyMounted && context.open && context.update) {\n const frame = requestAnimationFrame(context.update);\n return () => cancelAnimationFrame(frame);\n }\n }, [lazyMounted, registeredItemCount]);\n if (itemContext.shouldRenderWebNative) {\n return /* @__PURE__ */ jsx(YStack, { position: \"relative\", children });\n }\n if (isAdapted || !isWeb) {\n let content = /* @__PURE__ */ jsx(\n SelectViewportFrame,\n {\n ...viewportProps,\n ...isWeb ? getSelectListboxProps(itemContext.mode) : {},\n \"data-select-viewport\": \"\",\n ref: composedRefs,\n children: lazyMounted ? children : null\n }\n );\n if (needsRepropagation) {\n content = /* @__PURE__ */ jsx(ForwardSelectContext, { itemContext, context, children: content });\n }\n return /* @__PURE__ */ jsx(AdaptPortalContents, { scope: context.adaptScope, children: content });\n }\n if (!itemContext.interactions) {\n return null;\n }\n const {\n style,\n // remove this, it was set to \"Select\" always\n className,\n ...floatingProps\n } = itemContext.interactions.getFloatingProps();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n !disableScroll && /* @__PURE__ */ jsx(\n \"style\",\n {\n dangerouslySetInnerHTML: {\n __html: selectViewportCSS\n }\n }\n ),\n /* @__PURE__ */ jsx(AnimatePresence, { children: context.open ? /* @__PURE__ */ jsx(\n SelectViewportFrame,\n {\n \"data-select-viewport\": \"\",\n ...isWeb && {\n \"data-state\": context.open ? \"open\" : \"closed\"\n },\n ...viewportProps,\n ...style,\n ...floatingProps,\n ...getSelectListboxProps(itemContext.mode),\n overflowY: disableScroll ? void 0 : style.overflow ?? \"auto\",\n ref: composedRefs,\n children: lazyMounted ? children : null\n },\n \"select-viewport\"\n ) : null }),\n !context.open && !(context.lazyMount && context.renderValue) && lazyMounted && /* @__PURE__ */ jsx(\"div\", { style: { display: \"none\" }, children })\n ] });\n }\n);\nconst selectViewportCSS = `\n[data-select-viewport] {\n scrollbar-width: none;\n -webkit-overflow-scrolling: touch;\n overscroll-behavior: contain;\n}\n\n[data-select-viewport]::-webkit-scrollbar{\n display:none\n}\n`;\nexport {\n SelectViewport,\n SelectViewportFrame\n};\n//# sourceMappingURL=SelectViewport.js.map\n"],"mappings":";;;;;;;;;;;;;;;AAiBA,MAAM,sBAAsB,OAAO,MAAM;CACvC,aAAa;CACb,UAAU;AACZ,CAAC;AACD,MAAM,qBAAqB,yBAAyB;AACpD,MAAM,iBAAiB,gBACrB,qBACA,SAAS,gBAAgB,OAAO,cAAc;CAC5C,MAAM,EAAE,OAAO,UAAU,eAAe,GAAG,kBAAkB;CAC7D,MAAM,UAAU,iBAAiB,KAAK;CACtC,MAAM,cAAc,2BAA2B,KAAK;CACpD,MAAM,YAAY,iBAAiB,QAAQ,UAAU;CACrD,MAAM,cAAc,MAAM,OAAO,IAAI;CACrC,MAAM,sBAAsB,YAAY,SAAS,SAAS,
|
|
1
|
+
{"version":3,"file":"SelectViewport.js","names":[],"sources":["jsx/SelectViewport.js"],"sourcesContent":["import { AdaptPortalContents, useAdaptIsActive } from \"@tamagui/adapt\";\nimport { AnimatePresence } from \"@tamagui/animate-presence\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { createStyledHOC, styled, View } from \"@tamagui/core\";\nimport { needsPortalRepropagation } from \"@tamagui/portal\";\nimport { YStack } from \"@tamagui/stacks\";\nimport { startTransition } from \"@tamagui/start-transition\";\nimport * as React from \"react\";\nimport { VIEWPORT_NAME } from \"./constants\";\nimport {\n ForwardSelectContext,\n useSelectContext,\n useSelectItemParentContext\n} from \"./context\";\nimport { getSelectListboxProps } from \"./selectionController\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nconst SelectViewportFrame = styled(View, {\n displayName: VIEWPORT_NAME,\n position: \"relative\"\n});\nconst needsRepropagation = needsPortalRepropagation();\nconst SelectViewport = createStyledHOC(\n SelectViewportFrame,\n function SelectViewport2(props, forwardedRef) {\n const { scope, children, disableScroll, ...viewportProps } = props;\n const context = useSelectContext(scope);\n const itemContext = useSelectItemParentContext(scope);\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const viewportRef = React.useRef(null);\n const registeredItemCount = itemContext.registry.getItems().length;\n const [lazyMounted, setLazyMounted] = React.useState(context.lazyMount ? false : true);\n React.useEffect(() => {\n if (!context.lazyMount) return;\n if (!context.open) return;\n if (lazyMounted) return;\n startTransition(() => {\n setLazyMounted(true);\n });\n }, [context.lazyMount, context.open, lazyMounted]);\n React.useEffect(() => {\n if (!isWeb || !isAdapted || !context.open) return;\n const frame = requestAnimationFrame(() => {\n const index = context.activeIndexRef.current ?? itemContext.registry.firstEnabledIndex();\n const activeItem = viewportRef.current?.querySelector(\n '[role=\"option\"][tabindex=\"0\"]'\n ) ?? (index >= 0 ? itemContext.listRef?.current[index] : null);\n activeItem?.focus();\n });\n return () => cancelAnimationFrame(frame);\n }, [context.activeIndex, context.open, isAdapted, registeredItemCount]);\n const composedRefs = useComposedRefs(\n // @ts-ignore react 19 ref type mismatch\n forwardedRef,\n viewportRef,\n context.floatingContext?.refs.setFloating\n );\n useIsomorphicLayoutEffect(() => {\n if (context.update) {\n context.update();\n }\n }, [isAdapted]);\n React.useEffect(() => {\n if (context.lazyMount && lazyMounted && context.open && context.update) {\n const frame = requestAnimationFrame(context.update);\n return () => cancelAnimationFrame(frame);\n }\n }, [lazyMounted, registeredItemCount]);\n if (itemContext.shouldRenderWebNative) {\n return /* @__PURE__ */ jsx(YStack, { position: \"relative\", children });\n }\n if (isAdapted || !isWeb) {\n let content = /* @__PURE__ */ jsx(\n SelectViewportFrame,\n {\n ...viewportProps,\n ...isWeb ? getSelectListboxProps(itemContext.mode) : {},\n \"data-select-viewport\": \"\",\n ref: composedRefs,\n children: lazyMounted ? children : null\n }\n );\n if (needsRepropagation) {\n content = /* @__PURE__ */ jsx(ForwardSelectContext, { itemContext, context, children: content });\n }\n return /* @__PURE__ */ jsx(AdaptPortalContents, { scope: context.adaptScope, children: content });\n }\n if (!itemContext.interactions) {\n return null;\n }\n const {\n style,\n // remove this, it was set to \"Select\" always\n className,\n ...floatingProps\n } = itemContext.interactions.getFloatingProps();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n !disableScroll && /* @__PURE__ */ jsx(\n \"style\",\n {\n dangerouslySetInnerHTML: {\n __html: selectViewportCSS\n }\n }\n ),\n /* @__PURE__ */ jsx(AnimatePresence, { children: context.open ? /* @__PURE__ */ jsx(\n SelectViewportFrame,\n {\n \"data-select-viewport\": \"\",\n ...isWeb && {\n \"data-state\": context.open ? \"open\" : \"closed\"\n },\n ...viewportProps,\n ...style,\n ...floatingProps,\n ...getSelectListboxProps(itemContext.mode),\n overflowY: disableScroll ? void 0 : style.overflow ?? \"auto\",\n ref: composedRefs,\n children: lazyMounted ? children : null\n },\n \"select-viewport\"\n ) : null }),\n !context.open && !(context.lazyMount && context.renderValue) && lazyMounted && /* @__PURE__ */ jsx(\"div\", { style: { display: \"none\" }, children })\n ] });\n }\n);\nconst selectViewportCSS = `\n[data-select-viewport] {\n scrollbar-width: none;\n -webkit-overflow-scrolling: touch;\n overscroll-behavior: contain;\n}\n\n[data-select-viewport]::-webkit-scrollbar{\n display:none\n}\n`;\nexport {\n SelectViewport,\n SelectViewportFrame\n};\n//# sourceMappingURL=SelectViewport.js.map\n"],"mappings":";;;;;;;;;;;;;;;AAiBA,MAAM,sBAAsB,OAAO,MAAM;CACvC,aAAa;CACb,UAAU;AACZ,CAAC;AACD,MAAM,qBAAqB,yBAAyB;AACpD,MAAM,iBAAiB,gBACrB,qBACA,SAAS,gBAAgB,OAAO,cAAc;CAC5C,MAAM,EAAE,OAAO,UAAU,eAAe,GAAG,kBAAkB;CAC7D,MAAM,UAAU,iBAAiB,KAAK;CACtC,MAAM,cAAc,2BAA2B,KAAK;CACpD,MAAM,YAAY,iBAAiB,QAAQ,UAAU;CACrD,MAAM,cAAc,MAAM,OAAO,IAAI;CACrC,MAAM,sBAAsB,YAAY,SAAS,SAAS,CAAC,CAAC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GACL,UAAU,cAAc,WAAW;EACrC,CACF;EACA,IAAI,oBAAoB;GACtB,UAA0B,oBAAI,sBAAsB;IAAE;IAAa;IAAS,UAAU;GAAQ,CAAC;EACjG;EACA,OAAuB,oBAAI,qBAAqB;GAAE,OAAO,QAAQ;GAAY,UAAU;EAAQ,CAAC;CAClG;CACA,IAAI,CAAC,YAAY,cAAc;EAC7B,OAAO;CACT;CACA,MAAM,EACJ,OAEA,WACA,GAAG,kBACD,YAAY,aAAa,iBAAiB;CAC9C,OAAuB,qBAAK,UAAU,EAAE,UAAU;EAChD,CAAC,iBAAiC,oBAChC,SACA,EACE,yBAAyB,EACvB,QAAQ,kBACV,EACF,CACF;EACgB,oBAAI,iBAAiB,EAAE,UAAU,QAAQ,OAAuB,oBAC9E,qBACA;GACE,wBAAwB;GACxB,GAAG,SAAS,EACV,cAAc,QAAQ,OAAO,SAAS,SACxC;GACA,GAAG;GACH,GAAG;GACH,GAAG;GACH,GAAG,sBAAsB,YAAY,IAAI;GACzC,WAAW,gBAAgB,KAAK,IAAI,MAAM,YAAY;GACtD,KAAK;GACL,UAAU,cAAc,WAAW;EACrC,GACA,iBACF,IAAI,KAAK,CAAC;EACV,CAAC,QAAQ,QAAQ,EAAE,QAAQ,aAAa,QAAQ,gBAAgB,eAA+B,oBAAI,OAAO;GAAE,OAAO,EAAE,SAAS,OAAO;GAAG;EAAS,CAAC;CACpJ,EAAE,CAAC;AACL,CACF;AACA,MAAM,oBAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectViewport.native.js","names":[],"sources":["jsx/SelectViewport.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar SelectViewport_native_exports = {};\n__export(SelectViewport_native_exports, {\n SelectViewport: () => SelectViewport,\n SelectViewportFrame: () => SelectViewportFrame\n});\nmodule.exports = __toCommonJS(SelectViewport_native_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_adapt = require(\"@tamagui/adapt\");\nvar import_core = require(\"@tamagui/core\");\nvar import_constants = require(\"./constants\");\nvar import_context = require(\"./context\");\nvar SelectViewportFrame = (0, import_core.styled)(import_core.View, {\n displayName: import_constants.VIEWPORT_NAME,\n position: \"relative\"\n});\nvar SelectViewport = (0, import_core.createStyledHOC)(SelectViewportFrame, function SelectViewport2(props, forwardedRef) {\n var { scope, children, disableScroll: _disableScroll, ...viewportProps } = props;\n var context = (0, import_context.useSelectContext)(scope);\n var itemParentContext = (0, import_context.useSelectItemParentContext)(scope);\n var themeName = (0, import_core.useThemeName)();\n var adaptContext = (0, import_adapt.useAdaptContext)();\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {\n name: themeName,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_context.ForwardSelectContext, {\n itemContext: itemParentContext,\n context,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptContext.Provider, {\n ...adaptContext,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectViewportFrame, {\n ...viewportProps,\n ref: forwardedRef,\n children\n })\n })\n })\n });\n if (!context.open) {\n if (context.lazyMount && context.renderValue) return null;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectViewportFrame, {\n display: \"none\",\n children: contents\n });\n }\n return isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptPortalContents, {\n scope: context.adaptScope,\n children: contents\n }) : contents;\n});\nSelectViewport.displayName = import_constants.VIEWPORT_NAME;\n//# sourceMappingURL=SelectViewport.native.js.map\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectViewport.native.js","names":[],"sources":["jsx/SelectViewport.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar SelectViewport_native_exports = {};\n__export(SelectViewport_native_exports, {\n SelectViewport: () => SelectViewport,\n SelectViewportFrame: () => SelectViewportFrame\n});\nmodule.exports = __toCommonJS(SelectViewport_native_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_adapt = require(\"@tamagui/adapt\");\nvar import_core = require(\"@tamagui/core\");\nvar import_constants = require(\"./constants\");\nvar import_context = require(\"./context\");\nvar SelectViewportFrame = (0, import_core.styled)(import_core.View, {\n displayName: import_constants.VIEWPORT_NAME,\n position: \"relative\"\n});\nvar SelectViewport = (0, import_core.createStyledHOC)(SelectViewportFrame, function SelectViewport2(props, forwardedRef) {\n var { scope, children, disableScroll: _disableScroll, ...viewportProps } = props;\n var context = (0, import_context.useSelectContext)(scope);\n var itemParentContext = (0, import_context.useSelectItemParentContext)(scope);\n var themeName = (0, import_core.useThemeName)();\n var adaptContext = (0, import_adapt.useAdaptContext)();\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {\n name: themeName,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_context.ForwardSelectContext, {\n itemContext: itemParentContext,\n context,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptContext.Provider, {\n ...adaptContext,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectViewportFrame, {\n ...viewportProps,\n ref: forwardedRef,\n children\n })\n })\n })\n });\n if (!context.open) {\n if (context.lazyMount && context.renderValue) return null;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectViewportFrame, {\n display: \"none\",\n children: contents\n });\n }\n return isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptPortalContents, {\n scope: context.adaptScope,\n children: contents\n }) : contents;\n});\nSelectViewport.displayName = import_constants.VIEWPORT_NAME;\n//# sourceMappingURL=SelectViewport.native.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAA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IAAG,CAAE,qBAAqB;KACzE,GAAG;KACH,KAAK;KACL;IACF,CAAC;GACH,CAAC;EACH,CAAC;CACH,CAAC;CACD,IAAI,CAAC,QAAQ,MAAM;EACjB,IAAI,QAAQ,aAAa,QAAQ,aAAa,OAAO;EACrD,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,qBAAqB;GACtE,SAAS;GACT,UAAU;EACZ,CAAC;CACH;CACA,OAAO,YAA4B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa,qBAAqB;EAC/F,OAAO,QAAQ;EACf,UAAU;CACZ,CAAC,IAAI;AACP,CAAC;AACD,eAAe,cAAc,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.native.js","names":[],"sources":["jsx/constants.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar constants_exports = {};\n__export(constants_exports, {\n FALLBACK_THRESHOLD: () => FALLBACK_THRESHOLD,\n MIN_HEIGHT: () => MIN_HEIGHT,\n SCROLL_ARROW_THRESHOLD: () => SCROLL_ARROW_THRESHOLD,\n SCROLL_ARROW_VELOCITY: () => SCROLL_ARROW_VELOCITY,\n SELECT_NAME: () => SELECT_NAME,\n VIEWPORT_NAME: () => VIEWPORT_NAME,\n WINDOW_PADDING: () => WINDOW_PADDING\n});\nmodule.exports = __toCommonJS(constants_exports);\nvar SELECT_NAME = \"Select\";\nvar WINDOW_PADDING = 8;\nvar SCROLL_ARROW_VELOCITY = 8;\nvar SCROLL_ARROW_THRESHOLD = 8;\nvar MIN_HEIGHT = 80;\nvar FALLBACK_THRESHOLD = 16;\nvar VIEWPORT_NAME = \"SelectViewport\";\n//# sourceMappingURL=constants.js.map\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.native.js","names":[],"sources":["jsx/constants.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar constants_exports = {};\n__export(constants_exports, {\n FALLBACK_THRESHOLD: () => FALLBACK_THRESHOLD,\n MIN_HEIGHT: () => MIN_HEIGHT,\n SCROLL_ARROW_THRESHOLD: () => SCROLL_ARROW_THRESHOLD,\n SCROLL_ARROW_VELOCITY: () => SCROLL_ARROW_VELOCITY,\n SELECT_NAME: () => SELECT_NAME,\n VIEWPORT_NAME: () => VIEWPORT_NAME,\n WINDOW_PADDING: () => WINDOW_PADDING\n});\nmodule.exports = __toCommonJS(constants_exports);\nvar SELECT_NAME = \"Select\";\nvar WINDOW_PADDING = 8;\nvar SCROLL_ARROW_VELOCITY = 8;\nvar SCROLL_ARROW_THRESHOLD = 8;\nvar MIN_HEIGHT = 80;\nvar FALLBACK_THRESHOLD = 16;\nvar VIEWPORT_NAME = \"SelectViewport\";\n//# sourceMappingURL=constants.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,oBAAoB,CAAC;AACzB,SAAS,mBAAmB;CAC1B,0BAA0B;CAC1B,kBAAkB;CAClB,8BAA8B;CAC9B,6BAA6B;CAC7B,mBAAmB;CACnB,qBAAqB;CACrB,sBAAsB;AACxB,CAAC;AACD,OAAO,UAAU,aAAa,iBAAiB;AAC/C,IAAI,cAAc;AAClB,IAAI,iBAAiB;AACrB,IAAI,wBAAwB;AAC5B,IAAI,yBAAyB;AAC7B,IAAI,aAAa;AACjB,IAAI,qBAAqB;AACzB,IAAI,gBAAgB"}
|
package/dist/jsx/context.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","names":[],"sources":["jsx/context.js"],"sourcesContent":["import { createStyledContext } from \"@tamagui/core\";\nimport { getPortal } from \"@tamagui/native\";\nimport { createContext } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nconst SelectZIndexContext = createContext(void 0);\nconst SelectNativeComponentContext = createContext(null);\nconst { Provider: SelectProvider, useStyledContext: useSelectContext } = createStyledContext(null, \"Select\");\nconst {\n Provider: SelectItemParentProvider,\n useStyledContext: useSelectItemParentContext\n} = createStyledContext(null, \"SelectItem\");\nconst ForwardSelectContext = ({\n context,\n itemContext,\n children\n}) => {\n const portalState = getPortal().state;\n if (portalState.type === \"teleport\") {\n return children;\n }\n return /* @__PURE__ */ jsx(SelectProvider, { scope: context.scopeName, ...context, children: /* @__PURE__ */ jsx(SelectItemParentProvider, { scope: context.scopeName, ...itemContext, children }) });\n};\nexport {\n ForwardSelectContext,\n SelectItemParentProvider,\n SelectNativeComponentContext,\n SelectProvider,\n SelectZIndexContext,\n useSelectContext,\n useSelectItemParentContext\n};\n//# sourceMappingURL=context.js.map\n"],"mappings":";;;;;;AAIA,MAAM,sBAAsB,cAAc,KAAK,CAAC;AAChD,MAAM,+BAA+B,cAAc,IAAI;AACvD,MAAM,EAAE,UAAU,gBAAgB,kBAAkB,qBAAqB,oBAAoB,MAAM,QAAQ;AAC3G,MAAM,EACJ,UAAU,0BACV,kBAAkB,+BAChB,oBAAoB,MAAM,YAAY;AAC1C,MAAM,wBAAwB,EAC5B,SACA,aACA,eACI;CACJ,MAAM,cAAc,UAAU,
|
|
1
|
+
{"version":3,"file":"context.js","names":[],"sources":["jsx/context.js"],"sourcesContent":["import { createStyledContext } from \"@tamagui/core\";\nimport { getPortal } from \"@tamagui/native\";\nimport { createContext } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nconst SelectZIndexContext = createContext(void 0);\nconst SelectNativeComponentContext = createContext(null);\nconst { Provider: SelectProvider, useStyledContext: useSelectContext } = createStyledContext(null, \"Select\");\nconst {\n Provider: SelectItemParentProvider,\n useStyledContext: useSelectItemParentContext\n} = createStyledContext(null, \"SelectItem\");\nconst ForwardSelectContext = ({\n context,\n itemContext,\n children\n}) => {\n const portalState = getPortal().state;\n if (portalState.type === \"teleport\") {\n return children;\n }\n return /* @__PURE__ */ jsx(SelectProvider, { scope: context.scopeName, ...context, children: /* @__PURE__ */ jsx(SelectItemParentProvider, { scope: context.scopeName, ...itemContext, children }) });\n};\nexport {\n ForwardSelectContext,\n SelectItemParentProvider,\n SelectNativeComponentContext,\n SelectProvider,\n SelectZIndexContext,\n useSelectContext,\n useSelectItemParentContext\n};\n//# sourceMappingURL=context.js.map\n"],"mappings":";;;;;;AAIA,MAAM,sBAAsB,cAAc,KAAK,CAAC;AAChD,MAAM,+BAA+B,cAAc,IAAI;AACvD,MAAM,EAAE,UAAU,gBAAgB,kBAAkB,qBAAqB,oBAAoB,MAAM,QAAQ;AAC3G,MAAM,EACJ,UAAU,0BACV,kBAAkB,+BAChB,oBAAoB,MAAM,YAAY;AAC1C,MAAM,wBAAwB,EAC5B,SACA,aACA,eACI;CACJ,MAAM,cAAc,UAAU,CAAC,CAAC;CAChC,IAAI,YAAY,SAAS,YAAY;EACnC,OAAO;CACT;CACA,OAAuB,oBAAI,gBAAgB;EAAE,OAAO,QAAQ;EAAW,GAAG;EAAS,UAA0B,oBAAI,0BAA0B;GAAE,OAAO,QAAQ;GAAW,GAAG;GAAa;EAAS,CAAC;CAAE,CAAC;AACtM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.native.js","names":[],"sources":["jsx/context.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar context_exports = {};\n__export(context_exports, {\n ForwardSelectContext: () => ForwardSelectContext,\n SelectItemParentProvider: () => SelectItemParentProvider,\n SelectNativeComponentContext: () => SelectNativeComponentContext,\n SelectProvider: () => SelectProvider,\n SelectZIndexContext: () => SelectZIndexContext,\n useSelectContext: () => useSelectContext,\n useSelectItemParentContext: () => useSelectItemParentContext\n});\nmodule.exports = __toCommonJS(context_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_native = require(\"@tamagui/native\");\nvar import_react = require(\"react\");\nvar SelectZIndexContext = /* @__PURE__ */ (0, import_react.createContext)(void 0);\nvar SelectNativeComponentContext = /* @__PURE__ */ (0, import_react.createContext)(null);\nvar { Provider: SelectProvider, useStyledContext: useSelectContext } = (0, import_core.createStyledContext)(null, \"Select\");\nvar { Provider: SelectItemParentProvider, useStyledContext: useSelectItemParentContext } = (0, import_core.createStyledContext)(null, \"SelectItem\");\nvar ForwardSelectContext = function(param) {\n var { context, itemContext, children } = param;\n var portalState = (0, import_native.getPortal)().state;\n if (portalState.type === \"teleport\") {\n return children;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectProvider, {\n scope: context.scopeName,\n ...context,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemParentProvider, {\n scope: context.scopeName,\n ...itemContext,\n children\n })\n });\n};\n//# sourceMappingURL=context.js.map\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.native.js","names":[],"sources":["jsx/context.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar context_exports = {};\n__export(context_exports, {\n ForwardSelectContext: () => ForwardSelectContext,\n SelectItemParentProvider: () => SelectItemParentProvider,\n SelectNativeComponentContext: () => SelectNativeComponentContext,\n SelectProvider: () => SelectProvider,\n SelectZIndexContext: () => SelectZIndexContext,\n useSelectContext: () => useSelectContext,\n useSelectItemParentContext: () => useSelectItemParentContext\n});\nmodule.exports = __toCommonJS(context_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_native = require(\"@tamagui/native\");\nvar import_react = require(\"react\");\nvar SelectZIndexContext = /* @__PURE__ */ (0, import_react.createContext)(void 0);\nvar SelectNativeComponentContext = /* @__PURE__ */ (0, import_react.createContext)(null);\nvar { Provider: SelectProvider, useStyledContext: useSelectContext } = (0, import_core.createStyledContext)(null, \"Select\");\nvar { Provider: SelectItemParentProvider, useStyledContext: useSelectItemParentContext } = (0, import_core.createStyledContext)(null, \"SelectItem\");\nvar ForwardSelectContext = function(param) {\n var { context, itemContext, children } = param;\n var portalState = (0, import_native.getPortal)().state;\n if (portalState.type === \"teleport\") {\n return children;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectProvider, {\n scope: context.scopeName,\n ...context,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemParentProvider, {\n scope: context.scopeName,\n ...itemContext,\n children\n })\n });\n};\n//# sourceMappingURL=context.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,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AG,YAAY,oBAAmB,CAAE,MAAM,YAAY;AAClJ,IAAI,uBAAuB,SAAS,OAAO;CACzC,IAAI,EAAE,SAAS,aAAa,aAAa;CACzC,IAAI,eAAe,GAAG,cAAc,UAAS,CAAE,CAAC,CAAC;CACjD,IAAI,YAAY,SAAS,YAAY;EACnC,OAAO;CACT;CACA,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,gBAAgB;EACjE,OAAO,QAAQ;EACf,GAAG;EACH,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,0BAA0B;GAC9E,OAAO,QAAQ;GACf,GAAG;GACH;EACF,CAAC;CACH,CAAC;AACH"}
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":[],"sources":["jsx/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./Select\"), module.exports);\n__reExport(index_exports, require(\"./SelectItem\"), module.exports);\n__reExport(index_exports, require(\"./SelectItemText\"), module.exports);\n__reExport(index_exports, require(\"./SelectScrollButton\"), module.exports);\n__reExport(index_exports, require(\"./SelectTrigger\"), module.exports);\n__reExport(index_exports, require(\"./SelectViewport\"), module.exports);\n__reExport(index_exports, require(\"./context\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["jsx/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./Select\"), module.exports);\n__reExport(index_exports, require(\"./SelectItem\"), module.exports);\n__reExport(index_exports, require(\"./SelectItemText\"), module.exports);\n__reExport(index_exports, require(\"./SelectScrollButton\"), module.exports);\n__reExport(index_exports, require(\"./SelectTrigger\"), module.exports);\n__reExport(index_exports, require(\"./SelectViewport\"), module.exports);\n__reExport(index_exports, require(\"./context\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,oBAAU,GAAG,OAAO,OAAO;AAC7D,WAAW,eAAe,QAAQ,wBAAc,GAAG,OAAO,OAAO;AACjE,WAAW,eAAe,QAAQ,4BAAkB,GAAG,OAAO,OAAO;AACrE,WAAW,eAAe,QAAQ,gCAAsB,GAAG,OAAO,OAAO;AACzE,WAAW,eAAe,QAAQ,2BAAiB,GAAG,OAAO,OAAO;AACpE,WAAW,eAAe,QAAQ,4BAAkB,GAAG,OAAO,OAAO;AACrE,WAAW,eAAe,QAAQ,qBAAW,GAAG,OAAO,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectionController.js","names":[],"sources":["jsx/selectionController.js"],"sourcesContent":["function getSelectLabelText(label) {\n if (typeof label === \"string\" || typeof label === \"number\") {\n return String(label);\n }\n if (Array.isArray(label)) {\n return label.map(getSelectLabelText).join(\"\");\n }\n if (label && typeof label === \"object\" && \"props\" in label) {\n return getSelectLabelText(label.props?.children);\n }\n return \"\";\n}\nfunction createSelectItemRegistry(onChange) {\n const items = [];\n const labelRegistrations = /* @__PURE__ */ new Map();\n const explicitTextValues = /* @__PURE__ */ new Map();\n const itemNodes = /* @__PURE__ */ new Map();\n const listeners = /* @__PURE__ */ new Set();\n const notify = () => {\n onChange?.();\n listeners.forEach((listener) => listener());\n };\n const getItems = () => items;\n const getItem = (value) => items.find((item) => item.value === value);\n const getIndex = (value) => items.findIndex((item) => item.value === value);\n const getRegisteredLabel = (value) => {\n const registrations = labelRegistrations.get(value);\n if (!registrations?.size) return void 0;\n const values = Array.from(registrations.values());\n return values[values.length - 1];\n };\n const applyRegisteredLabel = (value) => {\n const registeredLabel = getRegisteredLabel(value);\n let changed = false;\n for (const item of items) {\n if (item.value !== value) continue;\n const nextLabel = registeredLabel?.label;\n const nextTextValue = explicitTextValues.get(item.id) || registeredLabel?.textValue;\n if (item.label !== nextLabel || item.textValue !== nextTextValue) {\n item.label = nextLabel;\n item.textValue = nextTextValue;\n changed = true;\n }\n }\n if (changed) notify();\n };\n const syncNodeOrder = () => {\n const previousOrder = items.map((item) => item.id);\n items.sort((a, b) => {\n const aNode = itemNodes.get(a.id);\n const bNode = itemNodes.get(b.id);\n if (!aNode || !bNode || typeof aNode.compareDocumentPosition !== \"function\") {\n return 0;\n }\n const position = aNode.compareDocumentPosition(bNode);\n if (position & 4) return -1;\n if (position & 2) return 1;\n return 0;\n });\n if (items.some((item, index) => item.id !== previousOrder[index])) {\n notify();\n }\n };\n const registerItem = (item) => {\n const id = Symbol(item.value);\n const registeredLabel = getRegisteredLabel(item.value);\n const registeredItem = {\n ...item,\n ...registeredLabel,\n textValue: item.textValue ?? registeredLabel?.textValue,\n id\n };\n explicitTextValues.set(id, item.textValue);\n items.push(registeredItem);\n notify();\n return {\n id,\n update(next) {\n const index = items.findIndex((current2) => current2.id === id);\n if (index < 0) return;\n const current = items[index];\n if (\"textValue\" in next) {\n explicitTextValues.set(id, next.textValue);\n }\n const nextItem = { ...current, ...next };\n if (next.value !== void 0 && next.value !== current.value) {\n const nextLabel = getRegisteredLabel(next.value);\n nextItem.label = nextLabel?.label;\n }\n const explicitTextValue = explicitTextValues.get(id);\n nextItem.textValue = explicitTextValue || getSelectLabelText(nextItem.label) || (nextItem.label ? nextItem.value : void 0);\n const changed = Object.entries(next).some(\n ([key, value]) => current[key] !== value\n );\n const textValueChanged = current.textValue !== nextItem.textValue;\n if (!changed && !textValueChanged) return;\n items[index] = nextItem;\n notify();\n },\n setNode(node) {\n if (node) {\n itemNodes.set(id, node);\n syncNodeOrder();\n } else {\n itemNodes.delete(id);\n }\n },\n unregister() {\n const index = items.findIndex((current) => current.id === id);\n if (index < 0) return;\n items.splice(index, 1);\n explicitTextValues.delete(id);\n itemNodes.delete(id);\n notify();\n }\n };\n };\n const registerLabel = (value, label, textValue) => {\n const id = Symbol(value);\n const normalizedTextValue = textValue || getSelectLabelText(label) || value;\n const registrations = labelRegistrations.get(value) ?? (() => {\n const next = /* @__PURE__ */ new Map();\n labelRegistrations.set(value, next);\n return next;\n })();\n registrations.set(id, { label, textValue: normalizedTextValue });\n applyRegisteredLabel(value);\n return () => {\n registrations.delete(id);\n if (!registrations.size) {\n labelRegistrations.delete(value);\n }\n applyRegisteredLabel(value);\n };\n };\n const firstEnabledIndex = () => items.findIndex((item) => !item.disabled);\n const nextEnabledIndex = (fromIndex, direction) => {\n if (!items.length) return -1;\n if (fromIndex == null || fromIndex < 0 || fromIndex >= items.length) {\n if (direction === 1) return firstEnabledIndex();\n for (let index = items.length - 1; index >= 0; index--) {\n if (!items[index].disabled) return index;\n }\n return -1;\n }\n for (let offset = 1; offset <= items.length; offset++) {\n const index = (fromIndex + direction * offset + items.length) % items.length;\n if (!items[index]?.disabled) return index;\n }\n return -1;\n };\n const findTypeaheadIndex = (search, fromIndex) => {\n const normalizedSearch = search.trim().toLocaleLowerCase();\n if (!normalizedSearch) return -1;\n const start = fromIndex == null || fromIndex < 0 ? -1 : fromIndex;\n for (let offset = 1; offset <= items.length; offset++) {\n const index = (start + offset) % items.length;\n const item = items[index];\n const label = item.textValue || getSelectLabelText(item.label) || item.value;\n if (!item.disabled && label.toLocaleLowerCase().startsWith(normalizedSearch)) {\n return index;\n }\n }\n return -1;\n };\n return {\n subscribe(listener) {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n },\n registerItem,\n registerLabel,\n getItems,\n getItem,\n getIndex,\n firstEnabledIndex,\n nextEnabledIndex,\n findTypeaheadIndex,\n getDisabledIndices: () => items.flatMap((item, index) => item.disabled ? [index] : []),\n getTypeaheadLabels: () => items.map((item) => item.textValue || getSelectLabelText(item.label) || item.value)\n };\n}\nfunction normalizeSelectSelection(mode, value) {\n if (mode === \"single\") {\n return typeof value === \"string\" ? value : \"\";\n }\n const values = Array.isArray(value) ? value : [];\n return [...new Set(values)];\n}\nfunction selectedValuesFromSelection(mode, value) {\n const normalized = normalizeSelectSelection(mode, value);\n return mode === \"multiple\" ? normalized : normalized ? [normalized] : [];\n}\nfunction createSelectSelectionController({\n mode: initialMode,\n value: initialValue,\n registry\n}) {\n let mode = initialMode;\n let value = normalizeSelectSelection(mode, initialValue);\n let activeIndex = null;\n const selectedValues = () => selectedValuesFromSelection(mode, value);\n const setMode = (nextMode) => {\n if (mode === nextMode) return value;\n mode = nextMode;\n value = normalizeSelectSelection(mode, value);\n return value;\n };\n const setValue = (nextValue) => {\n value = normalizeSelectSelection(mode, nextValue);\n return value;\n };\n const isSelected = (itemValue) => selectedValues().includes(itemValue);\n const toggle = (itemValue) => {\n const item = registry.getItem(itemValue);\n if (!item || item.disabled) return value;\n if (mode === \"single\") {\n value = itemValue;\n return value;\n }\n const current = selectedValues();\n value = current.includes(itemValue) ? current.filter((currentValue) => currentValue !== itemValue) : [...current, itemValue];\n return value;\n };\n const selectionAnchor = () => {\n const values = selectedValues();\n for (let index = values.length - 1; index >= 0; index--) {\n const item = registry.getItem(values[index]);\n if (item) return item;\n }\n const firstEnabledIndex = registry.firstEnabledIndex();\n return firstEnabledIndex < 0 ? void 0 : registry.getItems()[firstEnabledIndex];\n };\n const selectionAnchorIndex = () => {\n const anchor = selectionAnchor();\n return anchor ? registry.getIndex(anchor.value) : -1;\n };\n const initialActiveIndex = () => {\n const anchorIndex = selectionAnchorIndex();\n const anchor = anchorIndex < 0 ? void 0 : registry.getItems()[anchorIndex];\n return anchor && !anchor.disabled ? anchorIndex : registry.firstEnabledIndex();\n };\n const moveActive = (direction) => {\n const nextIndex = registry.nextEnabledIndex(activeIndex, direction);\n activeIndex = nextIndex < 0 ? null : nextIndex;\n return activeIndex == null ? void 0 : registry.getItems()[activeIndex];\n };\n return {\n registry,\n get mode() {\n return mode;\n },\n get value() {\n return value;\n },\n get activeIndex() {\n return activeIndex;\n },\n get activeItem() {\n return activeIndex == null ? void 0 : registry.getItems()[activeIndex];\n },\n get shouldCloseOnSelect() {\n return mode === \"single\";\n },\n setMode,\n setValue,\n isSelected,\n toggle,\n selectionAnchor,\n selectionAnchorIndex,\n initialActiveIndex,\n setActiveIndex(index) {\n activeIndex = index;\n },\n moveActive\n };\n}\nfunction getSelectListboxProps(mode) {\n return {\n role: \"listbox\",\n \"aria-multiselectable\": mode === \"multiple\" ? true : void 0\n };\n}\nfunction getSelectOptionProps(mode, selected, disabled, platform) {\n if (platform === \"native\") {\n return {\n accessibilityRole: mode === \"multiple\" ? \"checkbox\" : \"button\",\n accessibilityState: {\n selected: mode === \"single\" ? selected : void 0,\n checked: mode === \"multiple\" ? selected : void 0,\n disabled\n }\n };\n }\n return {\n role: \"option\",\n \"aria-selected\": selected,\n \"aria-disabled\": disabled || void 0\n };\n}\nexport {\n createSelectItemRegistry,\n createSelectSelectionController,\n getSelectLabelText,\n getSelectListboxProps,\n getSelectOptionProps,\n normalizeSelectSelection,\n selectedValuesFromSelection\n};\n//# sourceMappingURL=selectionController.js.map\n"],"mappings":";AAAA,SAAS,mBAAmB,OAAO;CACjC,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;EAC1D,OAAO,OAAO,KAAK;CACrB;CACA,IAAI,MAAM,QAAQ,KAAK,GAAG;EACxB,OAAO,MAAM,IAAI,kBAAkB,EAAE,KAAK,EAAE;CAC9C;CACA,IAAI,SAAS,OAAO,UAAU,YAAY,WAAW,OAAO;EAC1D,OAAO,mBAAmB,MAAM,OAAO,QAAQ;CACjD;CACA,O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,cAAc;EAChC,MAAM,YAAY,SAAS,iBAAiB,aAAa,SAAS;EAClE,cAAc,YAAY,IAAI,OAAO;EACrC,OAAO,eAAe,OAAO,KAAK,IAAI,SAAS,SAAS,EAAE;CAC5D;CACA,OAAO;EACL;EACA,IAAI,OAAO;GACT,OAAO;EACT;EACA,IAAI,QAAQ;GACV,OAAO;EACT;EACA,IAAI,cAAc;GAChB,OAAO;EACT;EACA,IAAI,aAAa;GACf,OAAO,eAAe,OAAO,KAAK,IAAI,SAAS,SAAS,EAAE;EAC5D;EACA,IAAI,sBAAsB;GACxB,OAAO,SAAS;EAClB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe,OAAO;GACpB,cAAc;EAChB;EACA;CACF;AACF;AACA,SAAS,sBAAsB,MAAM;CACnC,OAAO;EACL,MAAM;EACN,wBAAwB,SAAS,aAAa,OAAO,KAAK;CAC5D;AACF;AACA,SAAS,qBAAqB,MAAM,UAAU,UAAU,UAAU;CAChE,IAAI,aAAa,UAAU;EACzB,OAAO;GACL,mBAAmB,SAAS,aAAa,aAAa;GACtD,oBAAoB;IAClB,UAAU,SAAS,WAAW,WAAW,KAAK;IAC9C,SAAS,SAAS,aAAa,WAAW,KAAK;IAC/C;GACF;EACF;CACF;CACA,OAAO;EACL,MAAM;EACN,iBAAiB;EACjB,iBAAiB,YAAY,KAAK;CACpC;AACF"}
|
|
1
|
+
{"version":3,"file":"selectionController.js","names":[],"sources":["jsx/selectionController.js"],"sourcesContent":["function getSelectLabelText(label) {\n if (typeof label === \"string\" || typeof label === \"number\") {\n return String(label);\n }\n if (Array.isArray(label)) {\n return label.map(getSelectLabelText).join(\"\");\n }\n if (label && typeof label === \"object\" && \"props\" in label) {\n return getSelectLabelText(label.props?.children);\n }\n return \"\";\n}\nfunction createSelectItemRegistry(onChange) {\n const items = [];\n const labelRegistrations = /* @__PURE__ */ new Map();\n const explicitTextValues = /* @__PURE__ */ new Map();\n const itemNodes = /* @__PURE__ */ new Map();\n const listeners = /* @__PURE__ */ new Set();\n const notify = () => {\n onChange?.();\n listeners.forEach((listener) => listener());\n };\n const getItems = () => items;\n const getItem = (value) => items.find((item) => item.value === value);\n const getIndex = (value) => items.findIndex((item) => item.value === value);\n const getRegisteredLabel = (value) => {\n const registrations = labelRegistrations.get(value);\n if (!registrations?.size) return void 0;\n const values = Array.from(registrations.values());\n return values[values.length - 1];\n };\n const applyRegisteredLabel = (value) => {\n const registeredLabel = getRegisteredLabel(value);\n let changed = false;\n for (const item of items) {\n if (item.value !== value) continue;\n const nextLabel = registeredLabel?.label;\n const nextTextValue = explicitTextValues.get(item.id) || registeredLabel?.textValue;\n if (item.label !== nextLabel || item.textValue !== nextTextValue) {\n item.label = nextLabel;\n item.textValue = nextTextValue;\n changed = true;\n }\n }\n if (changed) notify();\n };\n const syncNodeOrder = () => {\n const previousOrder = items.map((item) => item.id);\n items.sort((a, b) => {\n const aNode = itemNodes.get(a.id);\n const bNode = itemNodes.get(b.id);\n if (!aNode || !bNode || typeof aNode.compareDocumentPosition !== \"function\") {\n return 0;\n }\n const position = aNode.compareDocumentPosition(bNode);\n if (position & 4) return -1;\n if (position & 2) return 1;\n return 0;\n });\n if (items.some((item, index) => item.id !== previousOrder[index])) {\n notify();\n }\n };\n const registerItem = (item) => {\n const id = Symbol(item.value);\n const registeredLabel = getRegisteredLabel(item.value);\n const registeredItem = {\n ...item,\n ...registeredLabel,\n textValue: item.textValue ?? registeredLabel?.textValue,\n id\n };\n explicitTextValues.set(id, item.textValue);\n items.push(registeredItem);\n notify();\n return {\n id,\n update(next) {\n const index = items.findIndex((current2) => current2.id === id);\n if (index < 0) return;\n const current = items[index];\n if (\"textValue\" in next) {\n explicitTextValues.set(id, next.textValue);\n }\n const nextItem = { ...current, ...next };\n if (next.value !== void 0 && next.value !== current.value) {\n const nextLabel = getRegisteredLabel(next.value);\n nextItem.label = nextLabel?.label;\n }\n const explicitTextValue = explicitTextValues.get(id);\n nextItem.textValue = explicitTextValue || getSelectLabelText(nextItem.label) || (nextItem.label ? nextItem.value : void 0);\n const changed = Object.entries(next).some(\n ([key, value]) => current[key] !== value\n );\n const textValueChanged = current.textValue !== nextItem.textValue;\n if (!changed && !textValueChanged) return;\n items[index] = nextItem;\n notify();\n },\n setNode(node) {\n if (node) {\n itemNodes.set(id, node);\n syncNodeOrder();\n } else {\n itemNodes.delete(id);\n }\n },\n unregister() {\n const index = items.findIndex((current) => current.id === id);\n if (index < 0) return;\n items.splice(index, 1);\n explicitTextValues.delete(id);\n itemNodes.delete(id);\n notify();\n }\n };\n };\n const registerLabel = (value, label, textValue) => {\n const id = Symbol(value);\n const normalizedTextValue = textValue || getSelectLabelText(label) || value;\n const registrations = labelRegistrations.get(value) ?? (() => {\n const next = /* @__PURE__ */ new Map();\n labelRegistrations.set(value, next);\n return next;\n })();\n registrations.set(id, { label, textValue: normalizedTextValue });\n applyRegisteredLabel(value);\n return () => {\n registrations.delete(id);\n if (!registrations.size) {\n labelRegistrations.delete(value);\n }\n applyRegisteredLabel(value);\n };\n };\n const firstEnabledIndex = () => items.findIndex((item) => !item.disabled);\n const nextEnabledIndex = (fromIndex, direction) => {\n if (!items.length) return -1;\n if (fromIndex == null || fromIndex < 0 || fromIndex >= items.length) {\n if (direction === 1) return firstEnabledIndex();\n for (let index = items.length - 1; index >= 0; index--) {\n if (!items[index].disabled) return index;\n }\n return -1;\n }\n for (let offset = 1; offset <= items.length; offset++) {\n const index = (fromIndex + direction * offset + items.length) % items.length;\n if (!items[index]?.disabled) return index;\n }\n return -1;\n };\n const findTypeaheadIndex = (search, fromIndex) => {\n const normalizedSearch = search.trim().toLocaleLowerCase();\n if (!normalizedSearch) return -1;\n const start = fromIndex == null || fromIndex < 0 ? -1 : fromIndex;\n for (let offset = 1; offset <= items.length; offset++) {\n const index = (start + offset) % items.length;\n const item = items[index];\n const label = item.textValue || getSelectLabelText(item.label) || item.value;\n if (!item.disabled && label.toLocaleLowerCase().startsWith(normalizedSearch)) {\n return index;\n }\n }\n return -1;\n };\n return {\n subscribe(listener) {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n },\n registerItem,\n registerLabel,\n getItems,\n getItem,\n getIndex,\n firstEnabledIndex,\n nextEnabledIndex,\n findTypeaheadIndex,\n getDisabledIndices: () => items.flatMap((item, index) => item.disabled ? [index] : []),\n getTypeaheadLabels: () => items.map((item) => item.textValue || getSelectLabelText(item.label) || item.value)\n };\n}\nfunction normalizeSelectSelection(mode, value) {\n if (mode === \"single\") {\n return typeof value === \"string\" ? value : \"\";\n }\n const values = Array.isArray(value) ? value : [];\n return [...new Set(values)];\n}\nfunction selectedValuesFromSelection(mode, value) {\n const normalized = normalizeSelectSelection(mode, value);\n return mode === \"multiple\" ? normalized : normalized ? [normalized] : [];\n}\nfunction createSelectSelectionController({\n mode: initialMode,\n value: initialValue,\n registry\n}) {\n let mode = initialMode;\n let value = normalizeSelectSelection(mode, initialValue);\n let activeIndex = null;\n const selectedValues = () => selectedValuesFromSelection(mode, value);\n const setMode = (nextMode) => {\n if (mode === nextMode) return value;\n mode = nextMode;\n value = normalizeSelectSelection(mode, value);\n return value;\n };\n const setValue = (nextValue) => {\n value = normalizeSelectSelection(mode, nextValue);\n return value;\n };\n const isSelected = (itemValue) => selectedValues().includes(itemValue);\n const toggle = (itemValue) => {\n const item = registry.getItem(itemValue);\n if (!item || item.disabled) return value;\n if (mode === \"single\") {\n value = itemValue;\n return value;\n }\n const current = selectedValues();\n value = current.includes(itemValue) ? current.filter((currentValue) => currentValue !== itemValue) : [...current, itemValue];\n return value;\n };\n const selectionAnchor = () => {\n const values = selectedValues();\n for (let index = values.length - 1; index >= 0; index--) {\n const item = registry.getItem(values[index]);\n if (item) return item;\n }\n const firstEnabledIndex = registry.firstEnabledIndex();\n return firstEnabledIndex < 0 ? void 0 : registry.getItems()[firstEnabledIndex];\n };\n const selectionAnchorIndex = () => {\n const anchor = selectionAnchor();\n return anchor ? registry.getIndex(anchor.value) : -1;\n };\n const initialActiveIndex = () => {\n const anchorIndex = selectionAnchorIndex();\n const anchor = anchorIndex < 0 ? void 0 : registry.getItems()[anchorIndex];\n return anchor && !anchor.disabled ? anchorIndex : registry.firstEnabledIndex();\n };\n const moveActive = (direction) => {\n const nextIndex = registry.nextEnabledIndex(activeIndex, direction);\n activeIndex = nextIndex < 0 ? null : nextIndex;\n return activeIndex == null ? void 0 : registry.getItems()[activeIndex];\n };\n return {\n registry,\n get mode() {\n return mode;\n },\n get value() {\n return value;\n },\n get activeIndex() {\n return activeIndex;\n },\n get activeItem() {\n return activeIndex == null ? void 0 : registry.getItems()[activeIndex];\n },\n get shouldCloseOnSelect() {\n return mode === \"single\";\n },\n setMode,\n setValue,\n isSelected,\n toggle,\n selectionAnchor,\n selectionAnchorIndex,\n initialActiveIndex,\n setActiveIndex(index) {\n activeIndex = index;\n },\n moveActive\n };\n}\nfunction getSelectListboxProps(mode) {\n return {\n role: \"listbox\",\n \"aria-multiselectable\": mode === \"multiple\" ? true : void 0\n };\n}\nfunction getSelectOptionProps(mode, selected, disabled, platform) {\n if (platform === \"native\") {\n return {\n accessibilityRole: mode === \"multiple\" ? \"checkbox\" : \"button\",\n accessibilityState: {\n selected: mode === \"single\" ? selected : void 0,\n checked: mode === \"multiple\" ? selected : void 0,\n disabled\n }\n };\n }\n return {\n role: \"option\",\n \"aria-selected\": selected,\n \"aria-disabled\": disabled || void 0\n };\n}\nexport {\n createSelectItemRegistry,\n createSelectSelectionController,\n getSelectLabelText,\n getSelectListboxProps,\n getSelectOptionProps,\n normalizeSelectSelection,\n selectedValuesFromSelection\n};\n//# sourceMappingURL=selectionController.js.map\n"],"mappings":";AAAA,SAAS,mBAAmB,OAAO;CACjC,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;EAC1D,OAAO,OAAO,KAAK;CACrB;CACA,IAAI,MAAM,QAAQ,KAAK,GAAG;EACxB,OAAO,MAAM,IAAI,kBAAkB,CAAC,CAAC,KAAK,EAAE;CAC9C;CACA,IAAI,SAAS,OAAO,UAAU,Y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