@tamagui/select 1.110.5 → 1.111.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/cjs/Select.native.js +43 -157
  2. package/dist/cjs/Select.native.js.map +2 -2
  3. package/dist/cjs/SelectContent.native.js +1 -1
  4. package/dist/cjs/SelectContent.native.js.map +1 -1
  5. package/dist/cjs/SelectItem.native.js +32 -113
  6. package/dist/cjs/SelectItem.native.js.map +2 -2
  7. package/dist/cjs/SelectItemText.native.js +6 -61
  8. package/dist/cjs/SelectItemText.native.js.map +1 -1
  9. package/dist/cjs/SelectTrigger.native.js +22 -79
  10. package/dist/cjs/SelectTrigger.native.js.map +1 -1
  11. package/dist/cjs/SelectViewport.native.js +2 -2
  12. package/dist/cjs/SelectViewport.native.js.map +1 -1
  13. package/dist/cjs/context.native.js +10 -86
  14. package/dist/cjs/context.native.js.map +2 -2
  15. package/dist/esm/BubbleSelect.native.mjs +4 -0
  16. package/dist/esm/BubbleSelect.native.mjs.map +1 -0
  17. package/dist/esm/Select.native.js +43 -156
  18. package/dist/esm/Select.native.js.map +2 -2
  19. package/dist/esm/Select.native.mjs +397 -0
  20. package/dist/esm/Select.native.mjs.map +1 -0
  21. package/dist/esm/SelectContent.native.js +1 -1
  22. package/dist/esm/SelectContent.native.js.map +1 -1
  23. package/dist/esm/SelectContent.native.mjs +8 -0
  24. package/dist/esm/SelectContent.native.mjs.map +1 -0
  25. package/dist/esm/SelectImpl.native.mjs +8 -0
  26. package/dist/esm/SelectImpl.native.mjs.map +1 -0
  27. package/dist/esm/SelectItem.native.js +33 -113
  28. package/dist/esm/SelectItem.native.js.map +2 -2
  29. package/dist/esm/SelectItem.native.mjs +132 -0
  30. package/dist/esm/SelectItem.native.mjs.map +1 -0
  31. package/dist/esm/SelectItemText.native.js +5 -59
  32. package/dist/esm/SelectItemText.native.js.map +1 -1
  33. package/dist/esm/SelectItemText.native.mjs +55 -0
  34. package/dist/esm/SelectItemText.native.mjs.map +1 -0
  35. package/dist/esm/SelectScrollButton.native.mjs +8 -0
  36. package/dist/esm/SelectScrollButton.native.mjs.map +1 -0
  37. package/dist/esm/SelectTrigger.native.js +21 -77
  38. package/dist/esm/SelectTrigger.native.js.map +1 -1
  39. package/dist/esm/SelectTrigger.native.mjs +54 -0
  40. package/dist/esm/SelectTrigger.native.mjs.map +1 -0
  41. package/dist/esm/SelectViewport.native.js +2 -2
  42. package/dist/esm/SelectViewport.native.js.map +1 -1
  43. package/dist/esm/SelectViewport.native.mjs +35 -0
  44. package/dist/esm/SelectViewport.native.mjs.map +1 -0
  45. package/dist/esm/constants.native.mjs +9 -0
  46. package/dist/esm/constants.native.mjs.map +1 -0
  47. package/dist/esm/context.native.js +10 -85
  48. package/dist/esm/context.native.js.map +1 -1
  49. package/dist/esm/context.native.mjs +27 -0
  50. package/dist/esm/context.native.mjs.map +1 -0
  51. package/dist/esm/index.native.mjs +3 -0
  52. package/dist/esm/index.native.mjs.map +1 -0
  53. package/dist/esm/types.native.mjs +2 -0
  54. package/dist/esm/types.native.mjs.map +1 -0
  55. package/dist/esm/useSelectBreakpointActive.native.mjs +11 -0
  56. package/dist/esm/useSelectBreakpointActive.native.mjs.map +1 -0
  57. package/dist/jsx/Select.native.js +42 -155
  58. package/dist/jsx/Select.native.js.map +2 -2
  59. package/dist/jsx/SelectContent.native.js +1 -1
  60. package/dist/jsx/SelectContent.native.js.map +1 -1
  61. package/dist/jsx/SelectItem.native.js +32 -112
  62. package/dist/jsx/SelectItem.native.js.map +2 -2
  63. package/dist/jsx/SelectItemText.native.js +5 -59
  64. package/dist/jsx/SelectItemText.native.js.map +1 -1
  65. package/dist/jsx/SelectTrigger.native.js +21 -77
  66. package/dist/jsx/SelectTrigger.native.js.map +1 -1
  67. package/dist/jsx/SelectViewport.native.js +2 -2
  68. package/dist/jsx/SelectViewport.native.js.map +1 -1
  69. package/dist/jsx/context.native.js +10 -85
  70. package/dist/jsx/context.native.js.map +1 -1
  71. package/package.json +23 -23
@@ -4,96 +4,13 @@ import { isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
4
4
  import { ListItemFrame, useListItem } from "@tamagui/list-item";
5
5
  import * as React from "react";
6
6
  import { createSelectContext, useSelectItemParentContext } from "./context";
7
- function _array_like_to_array(arr, len) {
8
- (len == null || len > arr.length) && (len = arr.length);
9
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
10
- return arr2;
11
- }
12
- function _array_with_holes(arr) {
13
- if (Array.isArray(arr)) return arr;
14
- }
15
- function _define_property(obj, key, value) {
16
- return key in obj ? Object.defineProperty(obj, key, {
17
- value,
18
- enumerable: !0,
19
- configurable: !0,
20
- writable: !0
21
- }) : obj[key] = value, obj;
22
- }
23
- function _instanceof(left, right) {
24
- return right != null && typeof Symbol < "u" && right[Symbol.hasInstance] ? !!right[Symbol.hasInstance](left) : left instanceof right;
25
- }
26
- function _iterable_to_array_limit(arr, i) {
27
- var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
28
- if (_i != null) {
29
- var _arr = [], _n = !0, _d = !1, _s, _e;
30
- try {
31
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
32
- ;
33
- } catch (err) {
34
- _d = !0, _e = err;
35
- } finally {
36
- try {
37
- !_n && _i.return != null && _i.return();
38
- } finally {
39
- if (_d) throw _e;
40
- }
41
- }
42
- return _arr;
43
- }
44
- }
45
- function _non_iterable_rest() {
46
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
47
- }
48
- function _object_spread(target) {
49
- for (var i = 1; i < arguments.length; i++) {
50
- var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
51
- typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
52
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
53
- }))), ownKeys.forEach(function(key) {
54
- _define_property(target, key, source[key]);
55
- });
56
- }
57
- return target;
58
- }
59
- function _object_without_properties(source, excluded) {
60
- if (source == null) return {};
61
- var target = _object_without_properties_loose(source, excluded), key, i;
62
- if (Object.getOwnPropertySymbols) {
63
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
64
- for (i = 0; i < sourceSymbolKeys.length; i++)
65
- key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
66
- }
67
- return target;
68
- }
69
- function _object_without_properties_loose(source, excluded) {
70
- if (source == null) return {};
71
- var target = {}, sourceKeys = Object.keys(source), key, i;
72
- for (i = 0; i < sourceKeys.length; i++)
73
- key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
74
- return target;
75
- }
76
- function _sliced_to_array(arr, i) {
77
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
78
- }
79
- function _unsupported_iterable_to_array(o, minLen) {
80
- if (o) {
81
- if (typeof o == "string") return _array_like_to_array(o, minLen);
82
- var n = Object.prototype.toString.call(o).slice(8, -1);
83
- if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
84
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
85
- }
86
- }
87
- var ITEM_NAME = "SelectItem", _createSelectContext = _sliced_to_array(createSelectContext(ITEM_NAME), 2), SelectItemContextProvider = _createSelectContext[0], useSelectItemContext = _createSelectContext[1], SelectItem = ListItemFrame.styleable(function(props, forwardedRef) {
88
- var __scopeSelect = props.__scopeSelect, value = props.value, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? !1 : _props_disabled, textValueProp = props.textValue, index = props.index, restProps = _object_without_properties(props, [
89
- "__scopeSelect",
90
- "value",
91
- "disabled",
92
- "textValue",
93
- "index"
94
- ]), _useListItem = useListItem(_object_spread({}, !props.unstyled && {
95
- ellipse: !0
96
- }, restProps)), listItemProps = _useListItem.props, context = useSelectItemParentContext(ITEM_NAME, __scopeSelect), setSelectedIndex = context.setSelectedIndex, listRef = context.listRef, setOpen = context.setOpen, onChange = context.onChange, activeIndexSubscribe = context.activeIndexSubscribe, valueSubscribe = context.valueSubscribe, allowMouseUpRef = context.allowMouseUpRef, allowSelectRef = context.allowSelectRef, setValueAtIndex = context.setValueAtIndex, selectTimeoutRef = context.selectTimeoutRef, dataRef = context.dataRef, interactions = context.interactions, shouldRenderWebNative = context.shouldRenderWebNative, size = context.size, onActiveChange = context.onActiveChange, initialValue = context.initialValue, _React_useState = _sliced_to_array(React.useState(initialValue === value), 2), isSelected = _React_useState[0], setSelected = _React_useState[1];
7
+ var ITEM_NAME = "SelectItem", [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME), SelectItem = ListItemFrame.styleable(function(props, forwardedRef) {
8
+ var { __scopeSelect, value, disabled = !1, textValue: textValueProp, index, ...restProps } = props, { props: listItemProps } = useListItem({
9
+ ...!props.unstyled && {
10
+ ellipse: !0
11
+ },
12
+ ...restProps
13
+ }), context = useSelectItemParentContext(ITEM_NAME, __scopeSelect), { setSelectedIndex, listRef, setOpen, onChange, activeIndexSubscribe, valueSubscribe, allowMouseUpRef, allowSelectRef, setValueAtIndex, selectTimeoutRef, dataRef, interactions, shouldRenderWebNative, size, onActiveChange, initialValue } = context, [isSelected, setSelected] = React.useState(initialValue === value);
97
14
  React.useEffect(function() {
98
15
  return activeIndexSubscribe(function(i) {
99
16
  var isActive = index === i;
@@ -112,7 +29,7 @@ var ITEM_NAME = "SelectItem", _createSelectContext = _sliced_to_array(createSele
112
29
  value
113
30
  ]);
114
31
  var textId = React.useId(), composedRefs = useComposedRefs(forwardedRef, function(node) {
115
- isWeb && _instanceof(node, HTMLElement) && listRef && (listRef.current[index] = node);
32
+ isWeb && node instanceof HTMLElement && listRef && (listRef.current[index] = node);
116
33
  });
117
34
  useIsomorphicLayoutEffect(function() {
118
35
  setValueAtIndex(index, value);
@@ -126,19 +43,19 @@ var ITEM_NAME = "SelectItem", _createSelectContext = _sliced_to_array(createSele
126
43
  }
127
44
  var selectItemProps = React.useMemo(function() {
128
45
  return interactions ? interactions.getItemProps({
129
- onTouchMove: function() {
46
+ onTouchMove() {
130
47
  allowSelectRef.current = !0, allowMouseUpRef.current = !1;
131
48
  },
132
- onTouchEnd: function() {
49
+ onTouchEnd() {
133
50
  allowSelectRef.current = !1, allowMouseUpRef.current = !0;
134
51
  },
135
- onKeyDown: function(event) {
52
+ onKeyDown(event) {
136
53
  event.key === "Enter" || event.key === " " && !(dataRef != null && dataRef.current.typing) ? (event.preventDefault(), handleSelect()) : allowSelectRef.current = !0;
137
54
  },
138
- onClick: function() {
55
+ onClick() {
139
56
  allowSelectRef.current && handleSelect();
140
57
  },
141
- onMouseUp: function() {
58
+ onMouseUp() {
142
59
  allowMouseUpRef.current && (allowSelectRef.current && handleSelect(), clearTimeout(selectTimeoutRef.current), selectTimeoutRef.current = setTimeout(function() {
143
60
  allowSelectRef.current = !0;
144
61
  }));
@@ -157,7 +74,7 @@ var ITEM_NAME = "SelectItem", _createSelectContext = _sliced_to_array(createSele
157
74
  children: shouldRenderWebNative ? /* @__PURE__ */ _jsx("option", {
158
75
  value,
159
76
  children: props.children
160
- }) : /* @__PURE__ */ _jsx(ListItemFrame, _object_spread({
77
+ }) : /* @__PURE__ */ _jsx(ListItemFrame, {
161
78
  tag: "div",
162
79
  componentName: ITEM_NAME,
163
80
  ref: composedRefs,
@@ -166,21 +83,24 @@ var ITEM_NAME = "SelectItem", _createSelectContext = _sliced_to_array(createSele
166
83
  "data-state": isSelected ? "active" : "inactive",
167
84
  "aria-disabled": disabled || void 0,
168
85
  "data-disabled": disabled ? "" : void 0,
169
- tabIndex: disabled ? void 0 : -1
170
- }, !props.unstyled && {
171
- backgrounded: !0,
172
- pressTheme: !0,
173
- hoverTheme: !0,
174
- focusTheme: !0,
175
- cursor: "default",
176
- size,
177
- outlineOffset: -0.5,
178
- focusVisibleStyle: {
179
- outlineColor: "$outlineColor",
180
- outlineWidth: 1,
181
- outlineStyle: "solid"
182
- }
183
- }, listItemProps, selectItemProps))
86
+ tabIndex: disabled ? void 0 : -1,
87
+ ...!props.unstyled && {
88
+ backgrounded: !0,
89
+ pressTheme: !0,
90
+ hoverTheme: !0,
91
+ focusTheme: !0,
92
+ cursor: "default",
93
+ size,
94
+ outlineOffset: -0.5,
95
+ focusVisibleStyle: {
96
+ outlineColor: "$outlineColor",
97
+ outlineWidth: 1,
98
+ outlineStyle: "solid"
99
+ }
100
+ },
101
+ ...listItemProps,
102
+ ...selectItemProps
103
+ })
184
104
  });
185
105
  }, {
186
106
  disableTheme: !0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/n8/tamagui/code/ui/select/src/SelectItem.tsx"],
4
- "mappings": ";AAAA,SAASA,uBAAuB;AAChC,SAASC,OAAOC,iCAAiC;AAEjD,SAASC,eAAeC,mBAAmB;AAC3C,YAAYC,WAAW;AAEvB,SAASC,qBAAqBC,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOhE,IAAMC,YAAY,cAShBF,uBAAAA,iBAAAA,oBAA4CE,SAAAA,GAAAA,CAAAA,GADhCC,4BACZH,qBAAAA,CAAAA,GADuCI,uBACvCJ,qBAAAA,CAAAA,GAaWK,aAAaR,cAAcS,UACtC,SAAoBC,OAA2CC,cAAY;AACzE,MACEC,gBAMEF,MANFE,eACAC,QAKEH,MALFG,OAAAA,kBAKEH,MAJFI,UAAAA,WAAAA,oBAAAA,SAAW,KAAA,iBACAC,gBAGTL,MAHFM,WACAC,QAEEP,MAFFO,OACGC,YAAAA,2BACDR,OAAAA;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AAW;MACpCsC,iBAAehE,YAAYiE;MAC3BC,iBAAelE,WAAW,KAAKiE;MAC/BE,UAAUnE,WAAWiE,SAAY;OAC5B,CAACrE,MAAMS,YAAY;MACtB+D,cAAc;MACdC,YAAY;MACZC,YAAY;MACZC,YAAY;MACZC,QAAQ;MACRlD;MACAmD,eAAe;MAEfC,mBAAmB;QACjBC,cAAc;QACdC,cAAc;QACdC,cAAc;MAChB;IACF,GACItE,eACAiC,eAAAA,CAAAA;;AAKd,GACA;EACEsC,cAAc;AAChB,CAAA;",
5
- "names": ["useComposedRefs", "isWeb", "useIsomorphicLayoutEffect", "ListItemFrame", "useListItem", "React", "createSelectContext", "useSelectItemParentContext", "ITEM_NAME", "SelectItemContextProvider", "useSelectItemContext", "SelectItem", "styleable", "props", "forwardedRef", "__scopeSelect", "value", "disabled", "textValueProp", "textValue", "index", "restProps", "unstyled", "ellipse", "listItemProps", "context", "setSelectedIndex", "listRef", "setOpen", "onChange", "activeIndexSubscribe", "valueSubscribe", "allowMouseUpRef", "allowSelectRef", "setValueAtIndex", "selectTimeoutRef", "dataRef", "interactions", "shouldRenderWebNative", "size", "onActiveChange", "initialValue", "useState", "isSelected", "setSelected", "useEffect", "i", "isActive", "current", "focus", "val", "textId", "useId", "composedRefs", "node", "HTMLElement", "handleSelect", "selectItemProps", "useMemo", "getItemProps", "onTouchMove", "onTouchEnd", "onKeyDown", "event", "key", "typing", "preventDefault", "onClick", "onMouseUp", "clearTimeout", "setTimeout", "onPress", "scope", "option", "children", "tag", "componentName", "ref", "aria-labelledby", "aria-selected", "data-state", "aria-disabled", "undefined", "data-disabled", "tabIndex", "backgrounded", "pressTheme", "hoverTheme", "focusTheme", "cursor", "outlineOffset", "focusVisibleStyle", "outlineColor", "outlineWidth", "outlineStyle", "disableTheme"]
4
+ "mappings": ";AAAA,SAASA,uBAAuB;AAChC,SAASC,OAAOC,iCAAiC;AAEjD,SAASC,eAAeC,mBAAmB;AAC3C,YAAYC,WAAW;AAEvB,SAASC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Y;QACZC,YAAY;QACZC,QAAQ;QACRlD;QACAmD,eAAe;QAEfC,mBAAmB;UACjBC,cAAc;UACdC,cAAc;UACdC,cAAc;QAChB;MACF;MACC,GAAGxE;MACH,GAAGmC;;;AAKd,GACA;EACEsC,cAAc;AAChB,CAAA;",
5
+ "names": ["useComposedRefs", "isWeb", "useIsomorphicLayoutEffect", "ListItemFrame", "useListItem", "React", "createSelectContext", "useSelectItemParentContext", "ITEM_NAME", "SelectItemContextProvider", "useSelectItemContext", "SelectItem", "styleable", "props", "forwardedRef", "__scopeSelect", "value", "disabled", "textValue", "textValueProp", "index", "restProps", "listItemProps", "unstyled", "ellipse", "context", "setSelectedIndex", "listRef", "setOpen", "onChange", "activeIndexSubscribe", "valueSubscribe", "allowMouseUpRef", "allowSelectRef", "setValueAtIndex", "selectTimeoutRef", "dataRef", "interactions", "shouldRenderWebNative", "size", "onActiveChange", "initialValue", "isSelected", "setSelected", "useState", "useEffect", "i", "isActive", "current", "focus", "val", "textId", "useId", "composedRefs", "node", "HTMLElement", "handleSelect", "selectItemProps", "useMemo", "getItemProps", "onTouchMove", "onTouchEnd", "onKeyDown", "event", "key", "typing", "preventDefault", "onClick", "onMouseUp", "clearTimeout", "setTimeout", "onPress", "scope", "option", "children", "tag", "componentName", "ref", "aria-labelledby", "aria-selected", "data-state", "aria-disabled", "undefined", "data-disabled", "tabIndex", "backgrounded", "pressTheme", "hoverTheme", "focusTheme", "cursor", "outlineOffset", "focusVisibleStyle", "outlineColor", "outlineWidth", "outlineStyle", "disableTheme"]
6
6
  }
@@ -5,57 +5,6 @@ import { SizableText } from "@tamagui/text";
5
5
  import * as React from "react";
6
6
  import { useSelectContext, useSelectItemParentContext } from "./context";
7
7
  import { useSelectItemContext } from "./SelectItem";
8
- function _define_property(obj, key, value) {
9
- return key in obj ? Object.defineProperty(obj, key, {
10
- value,
11
- enumerable: !0,
12
- configurable: !0,
13
- writable: !0
14
- }) : obj[key] = value, obj;
15
- }
16
- function _object_spread(target) {
17
- for (var i = 1; i < arguments.length; i++) {
18
- var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
19
- typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
20
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
21
- }))), ownKeys2.forEach(function(key) {
22
- _define_property(target, key, source[key]);
23
- });
24
- }
25
- return target;
26
- }
27
- function ownKeys(object, enumerableOnly) {
28
- var keys = Object.keys(object);
29
- if (Object.getOwnPropertySymbols) {
30
- var symbols = Object.getOwnPropertySymbols(object);
31
- enumerableOnly && (symbols = symbols.filter(function(sym) {
32
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
33
- })), keys.push.apply(keys, symbols);
34
- }
35
- return keys;
36
- }
37
- function _object_spread_props(target, source) {
38
- return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
39
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
40
- }), target;
41
- }
42
- function _object_without_properties(source, excluded) {
43
- if (source == null) return {};
44
- var target = _object_without_properties_loose(source, excluded), key, i;
45
- if (Object.getOwnPropertySymbols) {
46
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
47
- for (i = 0; i < sourceSymbolKeys.length; i++)
48
- key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
49
- }
50
- return target;
51
- }
52
- function _object_without_properties_loose(source, excluded) {
53
- if (source == null) return {};
54
- var target = {}, sourceKeys = Object.keys(source), key, i;
55
- for (i = 0; i < sourceKeys.length; i++)
56
- key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
57
- return target;
58
- }
59
8
  var ITEM_TEXT_NAME = "SelectItemText", SelectItemTextFrame = styled(SizableText, {
60
9
  name: ITEM_TEXT_NAME,
61
10
  variants: {
@@ -71,17 +20,14 @@ var ITEM_TEXT_NAME = "SelectItemText", SelectItemTextFrame = styled(SizableText,
71
20
  unstyled: process.env.TAMAGUI_HEADLESS === "1"
72
21
  }
73
22
  }), SelectItemText = SelectItemTextFrame.styleable(function(props, forwardedRef) {
74
- var __scopeSelect = props.__scopeSelect, className = props.className, itemTextProps = _object_without_properties(props, [
75
- "__scopeSelect",
76
- "className"
77
- ]), context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect), itemParentContext = useSelectItemParentContext(ITEM_TEXT_NAME, __scopeSelect), ref = React.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref), itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect), contents = React.useRef();
78
- return contents.current = /* @__PURE__ */ _jsx(SelectItemTextFrame, _object_spread_props(_object_spread({
23
+ var { __scopeSelect, className, ...itemTextProps } = props, context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect), itemParentContext = useSelectItemParentContext(ITEM_TEXT_NAME, __scopeSelect), ref = React.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref), itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect), contents = React.useRef();
24
+ return contents.current = /* @__PURE__ */ _jsx(SelectItemTextFrame, {
79
25
  className,
80
26
  size: itemParentContext.size,
81
- id: itemContext.textId
82
- }, itemTextProps), {
27
+ id: itemContext.textId,
28
+ ...itemTextProps,
83
29
  ref: composedRefs
84
- })), React.useEffect(function() {
30
+ }), React.useEffect(function() {
85
31
  itemParentContext.initialValue === itemContext.value && !context.selectedIndex && context.setSelectedItem(contents.current);
86
32
  }, []), React.useEffect(function() {
87
33
  return itemParentContext.valueSubscribe(function(val) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/n8/tamagui/code/ui/select/src/SelectItemText.tsx"],
4
- "mappings": ";AAAA,SAASA,uBAAuB;AAEhC,SAASC,cAAc;AACvB,SAASC,mBAAmB;AAC5B,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AAgBT,SAASC,OAAO;IAE5C,CAAA;EACF,GAAG;IAACF,YAAYQ;GAAM,GAElBZ,kBAAkBiB,wBACb,qBAAA,WAAA;cAAGvB,MAAMwB;OAIhB,qBAAA,WAAA;cACGb,SAASC;;AAYhB,CAAA;",
5
5
  "names": ["useComposedRefs", "styled", "SizableText", "React", "useSelectContext", "useSelectItemParentContext", "useSelectItemContext", "ITEM_TEXT_NAME", "SelectItemTextFrame", "name", "variants", "unstyled", "false", "userSelect", "color", "ellipse", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "SelectItemText", "styleable", "props", "forwardedRef", "__scopeSelect", "className", "itemTextProps", "context", "itemParentContext", "ref", "useRef", "composedRefs", "itemContext", "contents", "current", "size", "id", "textId", "useEffect", "initialValue", "value", "selectedIndex", "setSelectedItem", "valueSubscribe", "val", "shouldRenderWebNative", "children"]
6
6
  }
@@ -4,96 +4,40 @@ import { isClient, isWeb } from "@tamagui/core";
4
4
  import { ListItem } from "@tamagui/list-item";
5
5
  import * as React from "react";
6
6
  import { useSelectContext, useSelectItemParentContext } from "./context";
7
- function _define_property(obj, key, value) {
8
- return key in obj ? Object.defineProperty(obj, key, {
9
- value,
10
- enumerable: !0,
11
- configurable: !0,
12
- writable: !0
13
- }) : obj[key] = value, obj;
14
- }
15
- function _object_spread(target) {
16
- for (var i = 1; i < arguments.length; i++) {
17
- var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
18
- typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
19
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
20
- }))), ownKeys2.forEach(function(key) {
21
- _define_property(target, key, source[key]);
22
- });
23
- }
24
- return target;
25
- }
26
- function ownKeys(object, enumerableOnly) {
27
- var keys = Object.keys(object);
28
- if (Object.getOwnPropertySymbols) {
29
- var symbols = Object.getOwnPropertySymbols(object);
30
- enumerableOnly && (symbols = symbols.filter(function(sym) {
31
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
32
- })), keys.push.apply(keys, symbols);
33
- }
34
- return keys;
35
- }
36
- function _object_spread_props(target, source) {
37
- return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
38
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
39
- }), target;
40
- }
41
- function _object_without_properties(source, excluded) {
42
- if (source == null) return {};
43
- var target = _object_without_properties_loose(source, excluded), key, i;
44
- if (Object.getOwnPropertySymbols) {
45
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
46
- for (i = 0; i < sourceSymbolKeys.length; i++)
47
- key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
48
- }
49
- return target;
50
- }
51
- function _object_without_properties_loose(source, excluded) {
52
- if (source == null) return {};
53
- var target = {}, sourceKeys = Object.keys(source), key, i;
54
- for (i = 0; i < sourceKeys.length; i++)
55
- key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
56
- return target;
57
- }
58
7
  var TRIGGER_NAME = "SelectTrigger", isPointerCoarse = isWeb && isClient ? window.matchMedia("(pointer:coarse)").matches : !0, SelectTrigger = /* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
59
- var _context_floatingContext, __scopeSelect = props.__scopeSelect, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? !1 : _props_disabled, _props_unstyled = props.unstyled, unstyled = _props_unstyled === void 0 ? !1 : _props_unstyled, triggerProps = _object_without_properties(props, [
60
- "__scopeSelect",
61
- "disabled",
62
- "unstyled"
63
- ]), context = useSelectContext(TRIGGER_NAME, __scopeSelect), itemParentContext = useSelectItemParentContext(TRIGGER_NAME, __scopeSelect), composedRefs = useComposedRefs(forwardedRef, (_context_floatingContext = context.floatingContext) === null || _context_floatingContext === void 0 ? void 0 : _context_floatingContext.refs.setReference);
64
- return itemParentContext.shouldRenderWebNative ? null : /* @__PURE__ */ _jsx(ListItem, _object_spread(_object_spread_props(_object_spread(_object_spread_props(_object_spread({
8
+ var _context_floatingContext, { __scopeSelect, disabled = !1, unstyled = !1, ...triggerProps } = props, context = useSelectContext(TRIGGER_NAME, __scopeSelect), itemParentContext = useSelectItemParentContext(TRIGGER_NAME, __scopeSelect), composedRefs = useComposedRefs(forwardedRef, (_context_floatingContext = context.floatingContext) === null || _context_floatingContext === void 0 ? void 0 : _context_floatingContext.refs.setReference);
9
+ return itemParentContext.shouldRenderWebNative ? null : /* @__PURE__ */ _jsx(ListItem, {
65
10
  componentName: TRIGGER_NAME,
66
11
  unstyled,
67
12
  tag: "button",
68
13
  type: "button",
69
- id: itemParentContext.id
70
- }, !unstyled && {
71
- backgrounded: !0,
72
- radiused: !0,
73
- hoverTheme: !0,
74
- pressTheme: !0,
75
- focusable: !0,
76
- focusVisibleStyle: {
77
- outlineStyle: "solid",
78
- outlineWidth: 2,
79
- outlineColor: "$outlineColor"
14
+ id: itemParentContext.id,
15
+ ...!unstyled && {
16
+ backgrounded: !0,
17
+ radiused: !0,
18
+ hoverTheme: !0,
19
+ pressTheme: !0,
20
+ focusable: !0,
21
+ focusVisibleStyle: {
22
+ outlineStyle: "solid",
23
+ outlineWidth: 2,
24
+ outlineColor: "$outlineColor"
25
+ },
26
+ borderWidth: 1,
27
+ size: itemParentContext.size
80
28
  },
81
- borderWidth: 1,
82
- size: itemParentContext.size
83
- }), {
84
29
  // aria-controls={context.contentId}
85
30
  "aria-expanded": context.open,
86
31
  "aria-autocomplete": "none",
87
32
  dir: context.dir,
88
33
  disabled,
89
- "data-disabled": disabled ? "" : void 0
90
- }), triggerProps), {
91
- ref: composedRefs
92
- }), {
93
- onPress: function() {
34
+ "data-disabled": disabled ? "" : void 0,
35
+ ...triggerProps,
36
+ ref: composedRefs,
37
+ onPress() {
94
38
  itemParentContext.setOpen(!context.open);
95
39
  }
96
- }));
40
+ });
97
41
  });
98
42
  export {
99
43
  SelectTrigger
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/n8/tamagui/code/ui/select/src/SelectTrigger.tsx"],
4
- "mappings": ";AAAA,SAASA,uBAAuB;AAChC,SAASC,UAAUC,aAAkC;AAErD,SAASC,gBAAgB;AACzB,YAAYC,WAAW;AAEvB,SAASC,kBAAkBC,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAM7D,IAAMC,eAAe,iBAIfC,kBACJN,SAASD,WAAWQ,OAAOC,WAAW,kBAAA,EAAoBC,UAAU,IAEzDC,gBAAgBR,sBAAMS,WACjC,SAAuBC,OAA8CC,cAAY;MAO7EC,0BANMC,gBAAuEH,MAAvEG,eAAAA,kBAAuEH,MAAxDI,UAAAA,WAAAA,oBAAAA,SAAW,KAAA,iBAAA,kBAA6CJ,MAAtCK,UAAAA,WAAAA,oBAAAA,SAAW,KAAA,iBAAUC,eAAAA,2BAAiBN,OAAAA;IAAvEG;IAAeC;IAAkBC;MAEnCH,UAAUX,iBAAiBE,cAAcU,aAAAA,GACzCI,oBAAoBf,2BAA2BC,cAAcU,aAAAA,GAC7DK,eAAetB,gBACnBe,eACAC,2BAAAA,QAAQO,qBAAe,QAAvBP,6BAAAA,SAAAA,SAAAA,yBAAyBQ,KAAKC,YAAY;AAK5C,SAAIJ,kBAAkBK,wBACb,OAIP,qBAACvB,UAAAA,eAAAA,qBAAAA,eAAAA,qBAAAA,eAAAA;IACCwB,eAAepB;IACfY;IACAS,KAAI;IACJC,MAAK;IACLC,IAAIT,kBAAkBS;KACjB,CAACX,YAAY;IAChBY,cAAc;IACdC,UAAU;IACVC,YAAY;IACZC,YAAY;IACZC,WAAW;IACXC,mBAAmB;MACjBC,cAAc;MACdC,cAAc;MACdC,cAAc;IAChB;IACAC,aAAa;IACbC,MAAMpB,kBAAkBoB;EAC1B,CAAA,GAAA;;IAE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B,KAAK1B;IAkBC2B,UAAAA;AACE5B,wBAAkB6B,QAAQ,CAAClC,QAAQ2B,IAAI;IACzC;;AAIZ,CAAA;",
5
5
  "names": ["useComposedRefs", "isClient", "isWeb", "ListItem", "React", "useSelectContext", "useSelectItemParentContext", "TRIGGER_NAME", "isPointerCoarse", "window", "matchMedia", "matches", "SelectTrigger", "forwardRef", "props", "forwardedRef", "context", "__scopeSelect", "disabled", "unstyled", "triggerProps", "itemParentContext", "composedRefs", "floatingContext", "refs", "setReference", "shouldRenderWebNative", "componentName", "tag", "type", "id", "backgrounded", "radiused", "hoverTheme", "pressTheme", "focusable", "focusVisibleStyle", "outlineStyle", "outlineWidth", "outlineColor", "borderWidth", "size", "aria-expanded", "open", "aria-autocomplete", "dir", "data-disabled", "undefined", "ref", "onPress", "setOpen"]
6
6
  }
@@ -6,9 +6,9 @@ import * as React from "react";
6
6
  import { VIEWPORT_NAME } from "./constants";
7
7
  import { ForwardSelectContext, useSelectContext, useSelectItemParentContext } from "./context";
8
8
  var SelectViewport = function(props) {
9
- var __scopeSelect = props.__scopeSelect, children = props.children, context = useSelectContext(VIEWPORT_NAME, __scopeSelect), itemParentContext = useSelectItemParentContext(VIEWPORT_NAME, __scopeSelect), themeName = useThemeName(), adaptContext = React.useContext(AdaptParentContext);
9
+ var { __scopeSelect, children } = props, context = useSelectContext(VIEWPORT_NAME, __scopeSelect), itemParentContext = useSelectItemParentContext(VIEWPORT_NAME, __scopeSelect), themeName = useThemeName(), adaptContext = React.useContext(AdaptParentContext);
10
10
  return /* @__PURE__ */ _jsx(PortalItem, {
11
- hostName: "".concat(context.scopeKey, "SheetContents"),
11
+ hostName: `${context.scopeKey}SheetContents`,
12
12
  children: /* @__PURE__ */ _jsx(Theme, {
13
13
  name: themeName,
14
14
  children: /* @__PURE__ */ _jsx(ForwardSelectContext, {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/n8/tamagui/code/ui/select/src/SelectViewport.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cAAcnB;",
5
5
  "names": ["AdaptParentContext", "Theme", "useThemeName", "PortalItem", "React", "VIEWPORT_NAME", "ForwardSelectContext", "useSelectContext", "useSelectItemParentContext", "SelectViewport", "props", "__scopeSelect", "children", "context", "itemParentContext", "themeName", "adaptContext", "useContext", "hostName", "scopeKey", "name", "itemContext", "Provider", "value", "displayName"]
6
6
  }
@@ -1,93 +1,18 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { createContextScope } from "@tamagui/create-context";
3
3
  import { SELECT_NAME } from "./constants";
4
- function _array_like_to_array(arr, len) {
5
- (len == null || len > arr.length) && (len = arr.length);
6
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
7
- return arr2;
8
- }
9
- function _array_with_holes(arr) {
10
- if (Array.isArray(arr)) return arr;
11
- }
12
- function _define_property(obj, key, value) {
13
- return key in obj ? Object.defineProperty(obj, key, {
14
- value,
15
- enumerable: !0,
16
- configurable: !0,
17
- writable: !0
18
- }) : obj[key] = value, obj;
19
- }
20
- function _iterable_to_array_limit(arr, i) {
21
- var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
22
- if (_i != null) {
23
- var _arr = [], _n = !0, _d = !1, _s, _e;
24
- try {
25
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
26
- ;
27
- } catch (err) {
28
- _d = !0, _e = err;
29
- } finally {
30
- try {
31
- !_n && _i.return != null && _i.return();
32
- } finally {
33
- if (_d) throw _e;
34
- }
35
- }
36
- return _arr;
37
- }
38
- }
39
- function _non_iterable_rest() {
40
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
41
- }
42
- function _object_spread(target) {
43
- for (var i = 1; i < arguments.length; i++) {
44
- var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
45
- typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
46
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
47
- }))), ownKeys2.forEach(function(key) {
48
- _define_property(target, key, source[key]);
49
- });
50
- }
51
- return target;
52
- }
53
- function ownKeys(object, enumerableOnly) {
54
- var keys = Object.keys(object);
55
- if (Object.getOwnPropertySymbols) {
56
- var symbols = Object.getOwnPropertySymbols(object);
57
- enumerableOnly && (symbols = symbols.filter(function(sym) {
58
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
59
- })), keys.push.apply(keys, symbols);
60
- }
61
- return keys;
62
- }
63
- function _object_spread_props(target, source) {
64
- return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
65
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
66
- }), target;
67
- }
68
- function _sliced_to_array(arr, i) {
69
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
70
- }
71
- function _unsupported_iterable_to_array(o, minLen) {
72
- if (o) {
73
- if (typeof o == "string") return _array_like_to_array(o, minLen);
74
- var n = Object.prototype.toString.call(o).slice(8, -1);
75
- if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
76
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
77
- }
78
- }
79
- var _createContextScope = _sliced_to_array(createContextScope(SELECT_NAME), 2), createSelectContext = _createContextScope[0], createSelectScope = _createContextScope[1], _createSelectContext = _sliced_to_array(createSelectContext(SELECT_NAME), 2), SelectProvider = _createSelectContext[0], useSelectContext = _createSelectContext[1], _createContextScope1 = _sliced_to_array(createContextScope(SELECT_NAME), 2), createSelectItemParentContext = _createContextScope1[0], createSelectItemParentScope = _createContextScope1[1], _createSelectContext1 = _sliced_to_array(createSelectContext(SELECT_NAME), 2), SelectItemParentProvider = _createSelectContext1[0], useSelectItemParentContext = _createSelectContext1[1], ForwardSelectContext = function(param) {
80
- var __scopeSelect = param.__scopeSelect, context = param.context, itemContext = param.itemContext, children = param.children;
81
- return /* @__PURE__ */ _jsx(SelectProvider, _object_spread_props(_object_spread({
4
+ var [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME), [SelectProvider, useSelectContext] = createSelectContext(SELECT_NAME), [createSelectItemParentContext, createSelectItemParentScope] = createContextScope(SELECT_NAME), [SelectItemParentProvider, useSelectItemParentContext] = createSelectContext(SELECT_NAME), ForwardSelectContext = function(param) {
5
+ var { __scopeSelect, context, itemContext, children } = param;
6
+ return /* @__PURE__ */ _jsx(SelectProvider, {
82
7
  isInSheet: !0,
83
- scope: __scopeSelect
84
- }, context), {
85
- children: /* @__PURE__ */ _jsx(SelectItemParentProvider, _object_spread_props(_object_spread({
86
- scope: __scopeSelect
87
- }, itemContext), {
8
+ scope: __scopeSelect,
9
+ ...context,
10
+ children: /* @__PURE__ */ _jsx(SelectItemParentProvider, {
11
+ scope: __scopeSelect,
12
+ ...itemContext,
88
13
  children
89
- }))
90
- }));
14
+ })
15
+ });
91
16
  };
92
17
  export {
93
18
  ForwardSelectContext,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/n8/tamagui/code/ui/select/src/context.tsx"],
4
- "mappings": ";AAAA,SAASA,0BAA0B;AAEnC,SAASC,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAO4BD,sBAAAA,iBAAAA,mBAAmBC,WAAAA,GAAAA,CAAAA,GAA7DC,sBAA0CF,oBAAAA,CAAAA,GAArBG,oBAAqBH,oBAAAA,CAAAA,GAGtDE,uBAAAA,iBAAAA,oBAAwCD,WAAAA,GAAAA,CAAAA,GAD5BG,iBACZF,qBAAAA,CAAAA,GAD4BG,mBAC5BH,qBAAAA,CAAAA,GAKAF,uBAAAA,iBAAAA,mBAAmBC,WAAAA,GAAAA,CAAAA,GADPK,gCACZN,qBAAAA,CAAAA,GAD2CO,8BAC3CP,qBAAAA,CAAAA,GAGAE,wBAAAA,iBAAAA,oBAAkDD,WAAAA,GAAAA,CAAAA,GADtCO,2BACZN,sBAAAA,CAAAA,GADsCO,6BACtCP,sBAAAA,CAAAA,GAEWQ,uBAAuB,SAAA,OAAA;MAClCC,gBAAAA,MAAAA,eACAC,UAAAA,MAAAA,SACAC,cAAAA,MAAAA,aACAC,WAAAA,MAAAA;AAMA,SACE,qBAACV,gBAAAA,qBAAAA,eAAAA;IAAeW,WAAS;IAACC,OAAOL;KAAmBC,OAAAA,GAAAA;cAClD,qBAACJ,0BAAAA,qBAAAA,eAAAA;MAAyBQ,OAAOL;OAAmBE,WAAAA,GAAAA;;;;AAK1D;",
4
+ "mappings": ";AAAA,SAASA,0BAA0B;AAEnC,SAASC,mBAAmB;AAOrB,IAAM,CAACC,qBAAqBC,iBAAAA,IAAqBH,mBAAmBC,WAAAA,GAE9D,CAACG,gBAAgBC,gBAAAA,IAC5BH,oBAAwCD,WAAAA,GAI7B,CAACK,+BAA+BC,2BAAAA,IAC3CP,mBAAmBC,WAAAA,GAER,CAACO,0BAA0BC,0BAAAA,IACtCP,oBAAkDD,WAAAA,GAEvCS,uBAAuB,SAAA,OAAA;MAAC,EACnCC,eACAC,SACAC,aACAC,SAAQ,IAKR;AACA,SACE,qBAACV,gBAAAA;IAAeW,WAAS;IAACC,OAAOL;IAAgB,GAAGC;cAClD,qBAACJ,0BAAAA;MAAyBQ,OAAOL;MAAgB,GAAGE;;;;AAK1D;",
5
5
  "names": ["createContextScope", "SELECT_NAME", "createSelectContext", "createSelectScope", "SelectProvider", "useSelectContext", "createSelectItemParentContext", "createSelectItemParentScope", "SelectItemParentProvider", "useSelectItemParentContext", "ForwardSelectContext", "__scopeSelect", "context", "itemContext", "children", "isInSheet", "scope"]
6
6
  }