@tamagui/select 2.7.7 → 3.0.0-beta.643.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.
Files changed (248) hide show
  1. package/dist/cjs/Select.cjs +409 -467
  2. package/dist/cjs/Select.native.cjs +495 -0
  3. package/dist/cjs/Select.native.js +445 -492
  4. package/dist/cjs/Select.native.js.map +1 -1
  5. package/dist/cjs/SelectContent.cjs +80 -79
  6. package/dist/cjs/SelectContent.native.cjs +30 -0
  7. package/dist/cjs/SelectContent.native.js +18 -22
  8. package/dist/cjs/SelectContent.native.js.map +1 -1
  9. package/dist/cjs/SelectImpl.cjs +299 -319
  10. package/dist/cjs/SelectImpl.native.cjs +30 -0
  11. package/dist/cjs/SelectImpl.native.js +17 -24
  12. package/dist/cjs/SelectImpl.native.js.map +1 -1
  13. package/dist/cjs/SelectItem.cjs +268 -205
  14. package/dist/cjs/SelectItem.native.cjs +317 -0
  15. package/dist/cjs/SelectItem.native.js +291 -211
  16. package/dist/cjs/SelectItem.native.js.map +1 -1
  17. package/dist/cjs/SelectItemText.cjs +49 -79
  18. package/dist/cjs/SelectItemText.native.cjs +74 -0
  19. package/dist/cjs/SelectItemText.native.js +50 -79
  20. package/dist/cjs/SelectItemText.native.js.map +1 -1
  21. package/dist/cjs/SelectScrollButton.cjs +111 -130
  22. package/dist/cjs/SelectScrollButton.native.cjs +38 -0
  23. package/dist/cjs/SelectScrollButton.native.js +25 -22
  24. package/dist/cjs/SelectScrollButton.native.js.map +1 -1
  25. package/dist/cjs/SelectTrigger.cjs +69 -84
  26. package/dist/cjs/SelectTrigger.native.cjs +91 -0
  27. package/dist/cjs/SelectTrigger.native.js +71 -66
  28. package/dist/cjs/SelectTrigger.native.js.map +1 -1
  29. package/dist/cjs/SelectViewport.cjs +119 -142
  30. package/dist/cjs/SelectViewport.native.cjs +73 -0
  31. package/dist/cjs/SelectViewport.native.js +54 -50
  32. package/dist/cjs/SelectViewport.native.js.map +1 -1
  33. package/dist/cjs/constants.cjs +21 -22
  34. package/dist/cjs/constants.native.cjs +41 -0
  35. package/dist/cjs/constants.native.js +21 -21
  36. package/dist/cjs/constants.native.js.map +1 -1
  37. package/dist/cjs/context.cjs +38 -48
  38. package/dist/cjs/context.native.cjs +58 -0
  39. package/dist/cjs/context.native.js +40 -49
  40. package/dist/cjs/context.native.js.map +1 -1
  41. package/dist/cjs/index.cjs +15 -11
  42. package/dist/cjs/index.native.cjs +27 -0
  43. package/dist/cjs/index.native.js +15 -10
  44. package/dist/cjs/index.native.js.map +1 -1
  45. package/dist/cjs/selectionController.cjs +334 -0
  46. package/dist/cjs/selectionController.native.cjs +403 -0
  47. package/dist/cjs/selectionController.native.js +405 -0
  48. package/dist/cjs/selectionController.native.js.map +1 -0
  49. package/dist/cjs/types.cjs +10 -11
  50. package/dist/cjs/types.native.cjs +19 -0
  51. package/dist/cjs/types.native.js +10 -10
  52. package/dist/cjs/types.native.js.map +1 -1
  53. package/dist/esm/Select.mjs +382 -443
  54. package/dist/esm/Select.mjs.map +1 -1
  55. package/dist/esm/Select.native.js +418 -469
  56. package/dist/esm/Select.native.js.map +1 -1
  57. package/dist/esm/SelectContent.mjs +67 -61
  58. package/dist/esm/SelectContent.mjs.map +1 -1
  59. package/dist/esm/SelectContent.native.js +4 -5
  60. package/dist/esm/SelectContent.native.js.map +1 -1
  61. package/dist/esm/SelectImpl.mjs +284 -294
  62. package/dist/esm/SelectImpl.mjs.map +1 -1
  63. package/dist/esm/SelectImpl.native.js +5 -8
  64. package/dist/esm/SelectImpl.native.js.map +1 -1
  65. package/dist/esm/SelectItem.mjs +252 -182
  66. package/dist/esm/SelectItem.mjs.map +1 -1
  67. package/dist/esm/SelectItem.native.js +276 -190
  68. package/dist/esm/SelectItem.native.js.map +1 -1
  69. package/dist/esm/SelectItemText.mjs +33 -55
  70. package/dist/esm/SelectItemText.mjs.map +1 -1
  71. package/dist/esm/SelectItemText.native.js +34 -56
  72. package/dist/esm/SelectItemText.native.js.map +1 -1
  73. package/dist/esm/SelectScrollButton.mjs +95 -107
  74. package/dist/esm/SelectScrollButton.mjs.map +1 -1
  75. package/dist/esm/SelectScrollButton.native.js +11 -7
  76. package/dist/esm/SelectScrollButton.native.js.map +1 -1
  77. package/dist/esm/SelectTrigger.mjs +56 -58
  78. package/dist/esm/SelectTrigger.mjs.map +1 -1
  79. package/dist/esm/SelectTrigger.native.js +54 -44
  80. package/dist/esm/SelectTrigger.native.js.map +1 -1
  81. package/dist/esm/SelectViewport.mjs +104 -119
  82. package/dist/esm/SelectViewport.mjs.map +1 -1
  83. package/dist/esm/SelectViewport.native.js +44 -39
  84. package/dist/esm/SelectViewport.native.js.map +1 -1
  85. package/dist/esm/constants.mjs +1 -0
  86. package/dist/esm/constants.mjs.map +1 -1
  87. package/dist/esm/constants.native.js +1 -0
  88. package/dist/esm/constants.native.js.map +1 -1
  89. package/dist/esm/context.mjs +20 -28
  90. package/dist/esm/context.mjs.map +1 -1
  91. package/dist/esm/context.native.js +23 -31
  92. package/dist/esm/context.native.js.map +1 -1
  93. package/dist/esm/index.js +13 -3
  94. package/dist/esm/index.mjs +13 -3
  95. package/dist/esm/index.native.js +13 -3
  96. package/dist/esm/selectionController.mjs +305 -0
  97. package/dist/esm/selectionController.mjs.map +1 -0
  98. package/dist/esm/selectionController.native.js +372 -0
  99. package/dist/esm/selectionController.native.js.map +1 -0
  100. package/dist/esm/types.mjs +0 -2
  101. package/dist/esm/types.native.js +0 -2
  102. package/dist/jsx/Select.mjs +382 -443
  103. package/dist/jsx/Select.mjs.map +1 -1
  104. package/dist/jsx/Select.native.cjs +495 -0
  105. package/dist/jsx/Select.native.js +445 -492
  106. package/dist/jsx/Select.native.js.map +1 -1
  107. package/dist/jsx/SelectContent.mjs +67 -61
  108. package/dist/jsx/SelectContent.mjs.map +1 -1
  109. package/dist/jsx/SelectContent.native.cjs +30 -0
  110. package/dist/jsx/SelectContent.native.js +18 -22
  111. package/dist/jsx/SelectContent.native.js.map +1 -1
  112. package/dist/jsx/SelectImpl.mjs +284 -294
  113. package/dist/jsx/SelectImpl.mjs.map +1 -1
  114. package/dist/jsx/SelectImpl.native.cjs +30 -0
  115. package/dist/jsx/SelectImpl.native.js +17 -24
  116. package/dist/jsx/SelectImpl.native.js.map +1 -1
  117. package/dist/jsx/SelectItem.mjs +252 -182
  118. package/dist/jsx/SelectItem.mjs.map +1 -1
  119. package/dist/jsx/SelectItem.native.cjs +317 -0
  120. package/dist/jsx/SelectItem.native.js +291 -211
  121. package/dist/jsx/SelectItem.native.js.map +1 -1
  122. package/dist/jsx/SelectItemText.mjs +33 -55
  123. package/dist/jsx/SelectItemText.mjs.map +1 -1
  124. package/dist/jsx/SelectItemText.native.cjs +74 -0
  125. package/dist/jsx/SelectItemText.native.js +50 -79
  126. package/dist/jsx/SelectItemText.native.js.map +1 -1
  127. package/dist/jsx/SelectScrollButton.mjs +95 -107
  128. package/dist/jsx/SelectScrollButton.mjs.map +1 -1
  129. package/dist/jsx/SelectScrollButton.native.cjs +38 -0
  130. package/dist/jsx/SelectScrollButton.native.js +25 -22
  131. package/dist/jsx/SelectScrollButton.native.js.map +1 -1
  132. package/dist/jsx/SelectTrigger.mjs +56 -58
  133. package/dist/jsx/SelectTrigger.mjs.map +1 -1
  134. package/dist/jsx/SelectTrigger.native.cjs +91 -0
  135. package/dist/jsx/SelectTrigger.native.js +71 -66
  136. package/dist/jsx/SelectTrigger.native.js.map +1 -1
  137. package/dist/jsx/SelectViewport.mjs +104 -119
  138. package/dist/jsx/SelectViewport.mjs.map +1 -1
  139. package/dist/jsx/SelectViewport.native.cjs +73 -0
  140. package/dist/jsx/SelectViewport.native.js +54 -50
  141. package/dist/jsx/SelectViewport.native.js.map +1 -1
  142. package/dist/jsx/constants.mjs +1 -0
  143. package/dist/jsx/constants.mjs.map +1 -1
  144. package/dist/jsx/constants.native.cjs +41 -0
  145. package/dist/jsx/constants.native.js +21 -21
  146. package/dist/jsx/constants.native.js.map +1 -1
  147. package/dist/jsx/context.mjs +20 -28
  148. package/dist/jsx/context.mjs.map +1 -1
  149. package/dist/jsx/context.native.cjs +58 -0
  150. package/dist/jsx/context.native.js +40 -49
  151. package/dist/jsx/context.native.js.map +1 -1
  152. package/dist/jsx/index.js +13 -3
  153. package/dist/jsx/index.mjs +13 -3
  154. package/dist/jsx/index.native.cjs +27 -0
  155. package/dist/jsx/index.native.js +15 -10
  156. package/dist/jsx/index.native.js.map +1 -1
  157. package/dist/jsx/selectionController.mjs +305 -0
  158. package/dist/jsx/selectionController.mjs.map +1 -0
  159. package/dist/jsx/selectionController.native.cjs +403 -0
  160. package/dist/jsx/selectionController.native.js +405 -0
  161. package/dist/jsx/selectionController.native.js.map +1 -0
  162. package/dist/jsx/types.mjs +0 -2
  163. package/dist/jsx/types.native.cjs +19 -0
  164. package/dist/jsx/types.native.js +10 -10
  165. package/dist/jsx/types.native.js.map +1 -1
  166. package/package.json +28 -28
  167. package/src/Select.tsx +457 -357
  168. package/src/SelectContent.tsx +46 -16
  169. package/src/SelectImpl.native.tsx +0 -8
  170. package/src/SelectImpl.tsx +87 -100
  171. package/src/SelectItem.tsx +282 -136
  172. package/src/SelectItemText.tsx +16 -33
  173. package/src/SelectScrollButton.native.tsx +13 -4
  174. package/src/SelectScrollButton.tsx +56 -41
  175. package/src/SelectTrigger.tsx +77 -53
  176. package/src/SelectViewport.native.tsx +42 -25
  177. package/src/SelectViewport.tsx +52 -51
  178. package/src/context.tsx +6 -2
  179. package/src/index.tsx +5 -2
  180. package/src/selectionController.ts +389 -0
  181. package/src/types.tsx +88 -45
  182. package/types/Select.d.ts +139 -201
  183. package/types/Select.d.ts.map +1 -1
  184. package/types/SelectContent.d.ts +1 -1
  185. package/types/SelectContent.d.ts.map +1 -1
  186. package/types/SelectContent.native.d.ts.map +1 -1
  187. package/types/SelectImpl.d.ts +2 -1
  188. package/types/SelectImpl.d.ts.map +1 -1
  189. package/types/SelectImpl.native.d.ts +1 -5
  190. package/types/SelectImpl.native.d.ts.map +1 -1
  191. package/types/SelectItem.d.ts +13 -16
  192. package/types/SelectItem.d.ts.map +1 -1
  193. package/types/SelectItemText.d.ts +9 -13
  194. package/types/SelectItemText.d.ts.map +1 -1
  195. package/types/SelectScrollButton.d.ts +15 -2
  196. package/types/SelectScrollButton.d.ts.map +1 -1
  197. package/types/SelectScrollButton.native.d.ts +16 -3
  198. package/types/SelectScrollButton.native.d.ts.map +1 -1
  199. package/types/SelectTrigger.d.ts +11 -23
  200. package/types/SelectTrigger.d.ts.map +1 -1
  201. package/types/SelectViewport.d.ts +11 -38
  202. package/types/SelectViewport.d.ts.map +1 -1
  203. package/types/SelectViewport.native.d.ts +15 -4
  204. package/types/SelectViewport.native.d.ts.map +1 -1
  205. package/types/context.d.ts +2 -0
  206. package/types/context.d.ts.map +1 -1
  207. package/types/index.d.ts +5 -2
  208. package/types/index.d.ts.map +1 -1
  209. package/types/selectionController.d.ts +88 -0
  210. package/types/selectionController.d.ts.map +1 -0
  211. package/types/types.d.ts +47 -37
  212. package/types/types.d.ts.map +1 -1
  213. package/dist/cjs/BubbleSelect.cjs +0 -50
  214. package/dist/cjs/BubbleSelect.native.js +0 -30
  215. package/dist/cjs/BubbleSelect.native.js.map +0 -1
  216. package/dist/cjs/useSelectBreakpointActive.cjs +0 -32
  217. package/dist/cjs/useSelectBreakpointActive.native.js +0 -35
  218. package/dist/cjs/useSelectBreakpointActive.native.js.map +0 -1
  219. package/dist/esm/BubbleSelect.mjs +0 -27
  220. package/dist/esm/BubbleSelect.mjs.map +0 -1
  221. package/dist/esm/BubbleSelect.native.js +0 -4
  222. package/dist/esm/BubbleSelect.native.js.map +0 -1
  223. package/dist/esm/index.js.map +0 -1
  224. package/dist/esm/index.mjs.map +0 -1
  225. package/dist/esm/index.native.js.map +0 -1
  226. package/dist/esm/types.mjs.map +0 -1
  227. package/dist/esm/types.native.js.map +0 -1
  228. package/dist/esm/useSelectBreakpointActive.mjs +0 -7
  229. package/dist/esm/useSelectBreakpointActive.mjs.map +0 -1
  230. package/dist/esm/useSelectBreakpointActive.native.js +0 -7
  231. package/dist/esm/useSelectBreakpointActive.native.js.map +0 -1
  232. package/dist/jsx/BubbleSelect.mjs +0 -27
  233. package/dist/jsx/BubbleSelect.mjs.map +0 -1
  234. package/dist/jsx/BubbleSelect.native.js +0 -30
  235. package/dist/jsx/BubbleSelect.native.js.map +0 -1
  236. package/dist/jsx/index.js.map +0 -1
  237. package/dist/jsx/index.mjs.map +0 -1
  238. package/dist/jsx/types.mjs.map +0 -1
  239. package/dist/jsx/useSelectBreakpointActive.mjs +0 -7
  240. package/dist/jsx/useSelectBreakpointActive.mjs.map +0 -1
  241. package/dist/jsx/useSelectBreakpointActive.native.js +0 -35
  242. package/dist/jsx/useSelectBreakpointActive.native.js.map +0 -1
  243. package/src/BubbleSelect.tsx +0 -50
  244. package/src/useSelectBreakpointActive.tsx +0 -7
  245. package/types/BubbleSelect.d.ts +0 -2
  246. package/types/BubbleSelect.d.ts.map +0 -1
  247. package/types/useSelectBreakpointActive.d.ts +0 -3
  248. package/types/useSelectBreakpointActive.d.ts.map +0 -1
@@ -1,71 +1,75 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
12
13
  };
13
14
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
21
22
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
24
  var SelectViewport_native_exports = {};
26
25
  __export(SelectViewport_native_exports, {
27
- SelectViewport: () => SelectViewport
26
+ SelectViewport: () => SelectViewport,
27
+ SelectViewportFrame: () => SelectViewportFrame
28
28
  });
29
29
  module.exports = __toCommonJS(SelectViewport_native_exports);
30
30
  var import_jsx_runtime = require("react/jsx-runtime");
31
31
  var import_adapt = require("@tamagui/adapt");
32
32
  var import_core = require("@tamagui/core");
33
- var import_stacks = require("@tamagui/stacks");
34
33
  var import_constants = require("./constants.native.js");
35
34
  var import_context = require("./context.native.js");
36
- var SelectViewport = function (props) {
37
- var {
38
- scope,
39
- children
40
- } = props;
41
- var context = (0, import_context.useSelectContext)(scope);
42
- var itemParentContext = (0, import_context.useSelectItemParentContext)(scope);
43
- var themeName = (0, import_core.useThemeName)();
44
- var adaptContext = (0, import_adapt.useAdaptContext)();
45
- var contents = /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Theme, {
46
- name: themeName,
47
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_context.ForwardSelectContext, {
48
- itemContext: itemParentContext,
49
- context,
50
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_adapt.AdaptContext.Provider, {
51
- ...adaptContext,
52
- children
53
- })
54
- })
55
- });
56
- if (!context.open) {
57
- if (context.lazyMount && context.renderValue) {
58
- return null;
59
- }
60
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_stacks.YStack, {
61
- display: "none",
62
- children: contents
63
- });
64
- }
65
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_adapt.AdaptPortalContents, {
66
- scope: context.adaptScope,
67
- children: contents
68
- });
69
- };
35
+ var SelectViewportFrame = (0, import_core.styled)(import_core.View, {
36
+ displayName: import_constants.VIEWPORT_NAME,
37
+ position: "relative"
38
+ });
39
+ var SelectViewport = (0, import_core.createStyledHOC)(SelectViewportFrame, function SelectViewport2(props, forwardedRef) {
40
+ var { scope, children, disableScroll: _disableScroll, ...viewportProps } = props;
41
+ var context = (0, import_context.useSelectContext)(scope);
42
+ var itemParentContext = (0, import_context.useSelectItemParentContext)(scope);
43
+ var themeName = (0, import_core.useThemeName)();
44
+ var adaptContext = (0, import_adapt.useAdaptContext)();
45
+ var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
46
+ var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {
47
+ name: themeName,
48
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_context.ForwardSelectContext, {
49
+ itemContext: itemParentContext,
50
+ context,
51
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptContext.Provider, {
52
+ ...adaptContext,
53
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectViewportFrame, {
54
+ ...viewportProps,
55
+ ref: forwardedRef,
56
+ children
57
+ })
58
+ })
59
+ })
60
+ });
61
+ if (!context.open) {
62
+ if (context.lazyMount && context.renderValue) return null;
63
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectViewportFrame, {
64
+ display: "none",
65
+ children: contents
66
+ });
67
+ }
68
+ return isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptPortalContents, {
69
+ scope: context.adaptScope,
70
+ children: contents
71
+ }) : contents;
72
+ });
70
73
  SelectViewport.displayName = import_constants.VIEWPORT_NAME;
74
+
71
75
  //# sourceMappingURL=SelectViewport.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["SelectViewport_native_exports","__export","SelectViewport","module","exports","__toCommonJS","import_jsx_runtime","require","import_adapt","import_core","import_stacks","import_constants","import_context","props","scope","children","context","useSelectContext","itemParentContext","useSelectItemParentContext","themeName","useThemeName","adaptContext","useAdaptContext","contents","jsx","Theme","name","ForwardSelectContext","itemContext","AdaptContext","Provider","open","lazyMount","renderValue","YStack","display","AdaptPortalContents","adaptScope","displayName","VIEWPORT_NAME"],"sources":["../../src/SelectViewport.native.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,6BAAA;AAAAC,QAAA,CAAAD,6BAAA;EAAAE,cAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAL,6BAAA;AAAA,IAAAM,kBAAA,GAA4BC,OAAA;AAC5B,IAAAC,YAAA,GAAmED,OAAA;AACnE,IAAAE,WAAA,GAAoCF,OAAA;AACpC,IAAAG,aAAA,GAAuBH,OAAA;AACvB,IAAAI,gBAAA,GAA8BJ,OAAA;AAC9B,IAAAK,cAAA,GAAmFL,OAAA;AAC5E,IAAIL,cAAA,GAAiB,SAAAA,CAASW,KAAA,EAAO;EACxC,IAAI;IAAEC,KAAA;IAAOC;EAAS,IAAIF,KAAA;EAC1B,IAAIG,OAAA,OAAUJ,cAAA,CAAAK,gBAAA,EAAiBH,KAAK;EACpC,IAAII,iBAAA,OAAoBN,cAAA,CAAAO,0BAAA,EAA2BL,KAAK;EACxD,IAAIM,SAAA,OAAYX,WAAA,CAAAY,YAAA,EAAa;EAE7B,IAAIC,YAAA,OAAed,YAAA,CAAAe,eAAA,EAAgB;EACnC,IAAIC,QAAA,GAAyB,mBAAAlB,kBAAA,CAAAmB,GAAA,EAAKhB,WAAA,CAAAiB,KAAA,EAAO;IACrCC,IAAA,EAAMP,SAAA;IACNL,QAAA,EAAwB,mBAAAT,kBAAA,CAAAmB,GAAA,EAAKb,cAAA,CAAAgB,oBAAA,EAAsB;MAC/CC,WAAA,EAAaX,iBAAA;MACbF,OAAA;MACAD,QAAA,EAAwB,mBAAAT,kBAAA,CAAAmB,GAAA,EAAKjB,YAAA,CAAAsB,YAAA,CAAaC,QAAA,EAAU;QAChD,GAAGT,YAAA;QACHP;MACJ,CAAC;IACL,CAAC;EACL,CAAC;EACD,IAAI,CAACC,OAAA,CAAQgB,IAAA,EAAM;IACf,IAAIhB,OAAA,CAAQiB,SAAA,IAAajB,OAAA,CAAQkB,WAAA,EAAa;MAC1C,OAAO;IACX;IACA,OAAqB,mBAAA5B,kBAAA,CAAAmB,GAAA,EAAKf,aAAA,CAAAyB,MAAA,EAAQ;MAC9BC,OAAA,EAAS;MACTrB,QAAA,EAAUS;IACd,CAAC;EACL;EACA,OAAqB,mBAAAlB,kBAAA,CAAAmB,GAAA,EAAKjB,YAAA,CAAA6B,mBAAA,EAAqB;IAC3CvB,KAAA,EAAOE,OAAA,CAAQsB,UAAA;IACfvB,QAAA,EAAUS;EACd,CAAC;AACL;AACAtB,cAAA,CAAeqC,WAAA,GAAc5B,gBAAA,CAAA6B,aAAA","ignoreList":[]}
1
+ {"version":3,"file":"SelectViewport.native.js","names":[],"sources":["cjs/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;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,gCAAgC,CAAC;AACrC,SAAS,+BAA+B;CACtC,sBAAsB;CACtB,2BAA2B;AAC7B,CAAC;AACD,OAAO,UAAU,aAAa,6BAA6B;AAC3D,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,eAAe,QAAQ,gBAAgB;AAC3C,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,mBAAmB,QAAQ,uBAAa;AAC5C,IAAI,iBAAiB,QAAQ,qBAAW;AACxC,IAAI,uBAAuB,GAAG,YAAY,QAAQ,YAAY,MAAM;CAClE,aAAa,iBAAiB;CAC9B,UAAU;AACZ,CAAC;AACD,IAAI,kBAAkB,GAAG,YAAY,iBAAiB,qBAAqB,SAAS,gBAAgB,OAAO,cAAc;CACvH,IAAI,EAAE,OAAO,UAAU,eAAe,gBAAgB,GAAG,kBAAkB;CAC3E,IAAI,WAAW,GAAG,eAAe,kBAAkB,KAAK;CACxD,IAAI,qBAAqB,GAAG,eAAe,4BAA4B,KAAK;CAC5E,IAAI,aAAa,GAAG,YAAY,cAAc;CAC9C,IAAI,gBAAgB,GAAG,aAAa,iBAAiB;CACrD,IAAI,aAAa,GAAG,aAAa,kBAAkB,QAAQ,UAAU;CACrE,IAAI,WAA2B,iBAAC,GAAG,mBAAmB,KAAK,YAAY,OAAO;EAC5E,MAAM;EACN,UAA0B,iBAAC,GAAG,mBAAmB,KAAK,eAAe,sBAAsB;GACzF,aAAa;GACb;GACA,UAA0B,iBAAC,GAAG,mBAAmB,KAAK,aAAa,aAAa,UAAU;IACxF,GAAG;IACH,UAA0B,iBAAC,GAAG,mBAAmB,KAAK,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,KAAK,qBAAqB;GACtE,SAAS;GACT,UAAU;EACZ,CAAC;CACH;CACA,OAAO,YAA4B,iBAAC,GAAG,mBAAmB,KAAK,aAAa,qBAAqB;EAC/F,OAAO,QAAQ;EACf,UAAU;CACZ,CAAC,IAAI;AACP,CAAC;AACD,eAAe,cAAc,iBAAiB"}
@@ -1,34 +1,33 @@
1
+
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
6
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
10
11
  };
11
12
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
19
20
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
22
  var constants_exports = {};
24
23
  __export(constants_exports, {
25
- FALLBACK_THRESHOLD: () => FALLBACK_THRESHOLD,
26
- MIN_HEIGHT: () => MIN_HEIGHT,
27
- SCROLL_ARROW_THRESHOLD: () => SCROLL_ARROW_THRESHOLD,
28
- SCROLL_ARROW_VELOCITY: () => SCROLL_ARROW_VELOCITY,
29
- SELECT_NAME: () => SELECT_NAME,
30
- VIEWPORT_NAME: () => VIEWPORT_NAME,
31
- WINDOW_PADDING: () => WINDOW_PADDING
24
+ FALLBACK_THRESHOLD: () => FALLBACK_THRESHOLD,
25
+ MIN_HEIGHT: () => MIN_HEIGHT,
26
+ SCROLL_ARROW_THRESHOLD: () => SCROLL_ARROW_THRESHOLD,
27
+ SCROLL_ARROW_VELOCITY: () => SCROLL_ARROW_VELOCITY,
28
+ SELECT_NAME: () => SELECT_NAME,
29
+ VIEWPORT_NAME: () => VIEWPORT_NAME,
30
+ WINDOW_PADDING: () => WINDOW_PADDING
32
31
  });
33
32
  module.exports = __toCommonJS(constants_exports);
34
33
  const SELECT_NAME = "Select";
@@ -37,4 +36,4 @@ const SCROLL_ARROW_VELOCITY = 8;
37
36
  const SCROLL_ARROW_THRESHOLD = 8;
38
37
  const MIN_HEIGHT = 80;
39
38
  const FALLBACK_THRESHOLD = 16;
40
- const VIEWPORT_NAME = "SelectViewport";
39
+ const VIEWPORT_NAME = "SelectViewport";
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
22
+ };
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
+ var constants_exports = {};
25
+ __export(constants_exports, {
26
+ FALLBACK_THRESHOLD: () => FALLBACK_THRESHOLD,
27
+ MIN_HEIGHT: () => MIN_HEIGHT,
28
+ SCROLL_ARROW_THRESHOLD: () => SCROLL_ARROW_THRESHOLD,
29
+ SCROLL_ARROW_VELOCITY: () => SCROLL_ARROW_VELOCITY,
30
+ SELECT_NAME: () => SELECT_NAME,
31
+ VIEWPORT_NAME: () => VIEWPORT_NAME,
32
+ WINDOW_PADDING: () => WINDOW_PADDING
33
+ });
34
+ module.exports = __toCommonJS(constants_exports);
35
+ var SELECT_NAME = "Select";
36
+ var WINDOW_PADDING = 8;
37
+ var SCROLL_ARROW_VELOCITY = 8;
38
+ var SCROLL_ARROW_THRESHOLD = 8;
39
+ var MIN_HEIGHT = 80;
40
+ var FALLBACK_THRESHOLD = 16;
41
+ var VIEWPORT_NAME = "SelectViewport";
@@ -1,36 +1,35 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
12
13
  };
13
14
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
21
22
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
24
  var constants_exports = {};
26
25
  __export(constants_exports, {
27
- FALLBACK_THRESHOLD: () => FALLBACK_THRESHOLD,
28
- MIN_HEIGHT: () => MIN_HEIGHT,
29
- SCROLL_ARROW_THRESHOLD: () => SCROLL_ARROW_THRESHOLD,
30
- SCROLL_ARROW_VELOCITY: () => SCROLL_ARROW_VELOCITY,
31
- SELECT_NAME: () => SELECT_NAME,
32
- VIEWPORT_NAME: () => VIEWPORT_NAME,
33
- WINDOW_PADDING: () => WINDOW_PADDING
26
+ FALLBACK_THRESHOLD: () => FALLBACK_THRESHOLD,
27
+ MIN_HEIGHT: () => MIN_HEIGHT,
28
+ SCROLL_ARROW_THRESHOLD: () => SCROLL_ARROW_THRESHOLD,
29
+ SCROLL_ARROW_VELOCITY: () => SCROLL_ARROW_VELOCITY,
30
+ SELECT_NAME: () => SELECT_NAME,
31
+ VIEWPORT_NAME: () => VIEWPORT_NAME,
32
+ WINDOW_PADDING: () => WINDOW_PADDING
34
33
  });
35
34
  module.exports = __toCommonJS(constants_exports);
36
35
  var SELECT_NAME = "Select";
@@ -40,4 +39,5 @@ var SCROLL_ARROW_THRESHOLD = 8;
40
39
  var MIN_HEIGHT = 80;
41
40
  var FALLBACK_THRESHOLD = 16;
42
41
  var VIEWPORT_NAME = "SelectViewport";
42
+
43
43
  //# sourceMappingURL=constants.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","constants_exports","__export","FALLBACK_THRESHOLD","MIN_HEIGHT","SCROLL_ARROW_THRESHOLD","SCROLL_ARROW_VELOCITY","SELECT_NAME","VIEWPORT_NAME","WINDOW_PADDING","module","exports"],"sources":["../../src/constants.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,iBAAA;AAAAC,QAAA,CAAAD,iBAAA;EAAAE,kBAAA,EAAAA,CAAA,KAAAA,kBAAA;EAAAC,UAAA,EAAAA,CAAA,KAAAA,UAAA;EAAAC,sBAAA,EAAAA,CAAA,KAAAA,sBAAA;EAAAC,qBAAA,EAAAA,CAAA,KAAAA,qBAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAA;AAAA;AAAOC,MAAM,CAAAC,OAAA,GAAAf,YAAc,CAAAK,iBAAA;AACpB,IAAAM,WAAM,WAAiB;AACvB,IAAAE,cAAM;AACN,IAAAH,qBAAM;AACN,IAAAD,sBAAmB;AACnB,IAAAD,UAAM;AACN,IAAAD,kBAAsB","ignoreList":[]}
1
+ {"version":3,"file":"constants.native.js","names":[],"sources":["cjs/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"}
@@ -1,33 +1,33 @@
1
+
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
6
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
10
11
  };
11
12
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
19
20
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
22
  var context_exports = {};
24
23
  __export(context_exports, {
25
- ForwardSelectContext: () => ForwardSelectContext,
26
- SelectItemParentProvider: () => SelectItemParentProvider,
27
- SelectProvider: () => SelectProvider,
28
- SelectZIndexContext: () => SelectZIndexContext,
29
- useSelectContext: () => useSelectContext,
30
- useSelectItemParentContext: () => useSelectItemParentContext
24
+ ForwardSelectContext: () => ForwardSelectContext,
25
+ SelectItemParentProvider: () => SelectItemParentProvider,
26
+ SelectNativeComponentContext: () => SelectNativeComponentContext,
27
+ SelectProvider: () => SelectProvider,
28
+ SelectZIndexContext: () => SelectZIndexContext,
29
+ useSelectContext: () => useSelectContext,
30
+ useSelectItemParentContext: () => useSelectItemParentContext
31
31
  });
32
32
  module.exports = __toCommonJS(context_exports);
33
33
  var import_core = require("@tamagui/core");
@@ -35,31 +35,21 @@ var import_native = require("@tamagui/native");
35
35
  var import_react = require("react");
36
36
  var import_jsx_runtime = require("react/jsx-runtime");
37
37
  const SelectZIndexContext = (0, import_react.createContext)(void 0);
38
- const {
39
- Provider: SelectProvider,
40
- useStyledContext: useSelectContext
41
- } = (0, import_core.createStyledContext)(null, "Select");
42
- const {
43
- Provider: SelectItemParentProvider,
44
- useStyledContext: useSelectItemParentContext
45
- } = (0, import_core.createStyledContext)(null, "SelectItem");
46
- const ForwardSelectContext = ({
47
- context,
48
- itemContext,
49
- children
50
- }) => {
51
- const portalState = (0, import_native.getPortal)().state;
52
- if (portalState.type === "teleport") {
53
- return children;
54
- }
55
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(SelectProvider, {
56
- isInSheet: true,
57
- scope: context.scopeName,
58
- ...context,
59
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(SelectItemParentProvider, {
60
- scope: context.scopeName,
61
- ...itemContext,
62
- children
63
- })
64
- });
65
- };
38
+ const SelectNativeComponentContext = (0, import_react.createContext)(null);
39
+ const { Provider: SelectProvider, useStyledContext: useSelectContext } = (0, import_core.createStyledContext)(null, "Select");
40
+ const { Provider: SelectItemParentProvider, useStyledContext: useSelectItemParentContext } = (0, import_core.createStyledContext)(null, "SelectItem");
41
+ const ForwardSelectContext = ({ context, itemContext, children }) => {
42
+ const portalState = (0, import_native.getPortal)().state;
43
+ if (portalState.type === "teleport") {
44
+ return children;
45
+ }
46
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectProvider, {
47
+ scope: context.scopeName,
48
+ ...context,
49
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemParentProvider, {
50
+ scope: context.scopeName,
51
+ ...itemContext,
52
+ children
53
+ })
54
+ });
55
+ };
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
22
+ };
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
+ var context_exports = {};
25
+ __export(context_exports, {
26
+ ForwardSelectContext: () => ForwardSelectContext,
27
+ SelectItemParentProvider: () => SelectItemParentProvider,
28
+ SelectNativeComponentContext: () => SelectNativeComponentContext,
29
+ SelectProvider: () => SelectProvider,
30
+ SelectZIndexContext: () => SelectZIndexContext,
31
+ useSelectContext: () => useSelectContext,
32
+ useSelectItemParentContext: () => useSelectItemParentContext
33
+ });
34
+ module.exports = __toCommonJS(context_exports);
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_core = require("@tamagui/core");
37
+ var import_native = require("@tamagui/native");
38
+ var import_react = require("react");
39
+ var SelectZIndexContext = /* @__PURE__ */ (0, import_react.createContext)(void 0);
40
+ var SelectNativeComponentContext = /* @__PURE__ */ (0, import_react.createContext)(null);
41
+ var { Provider: SelectProvider, useStyledContext: useSelectContext } = (0, import_core.createStyledContext)(null, "Select");
42
+ var { Provider: SelectItemParentProvider, useStyledContext: useSelectItemParentContext } = (0, import_core.createStyledContext)(null, "SelectItem");
43
+ var ForwardSelectContext = function(param) {
44
+ var { context, itemContext, children } = param;
45
+ var portalState = (0, import_native.getPortal)().state;
46
+ if (portalState.type === "teleport") {
47
+ return children;
48
+ }
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectProvider, {
50
+ scope: context.scopeName,
51
+ ...context,
52
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemParentProvider, {
53
+ scope: context.scopeName,
54
+ ...itemContext,
55
+ children
56
+ })
57
+ });
58
+ };
@@ -1,69 +1,60 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
12
13
  };
13
14
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
21
22
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
24
  var context_exports = {};
26
25
  __export(context_exports, {
27
- ForwardSelectContext: () => ForwardSelectContext,
28
- SelectItemParentProvider: () => SelectItemParentProvider,
29
- SelectProvider: () => SelectProvider,
30
- SelectZIndexContext: () => SelectZIndexContext,
31
- useSelectContext: () => useSelectContext,
32
- useSelectItemParentContext: () => useSelectItemParentContext
26
+ ForwardSelectContext: () => ForwardSelectContext,
27
+ SelectItemParentProvider: () => SelectItemParentProvider,
28
+ SelectNativeComponentContext: () => SelectNativeComponentContext,
29
+ SelectProvider: () => SelectProvider,
30
+ SelectZIndexContext: () => SelectZIndexContext,
31
+ useSelectContext: () => useSelectContext,
32
+ useSelectItemParentContext: () => useSelectItemParentContext
33
33
  });
34
34
  module.exports = __toCommonJS(context_exports);
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_core = require("@tamagui/core");
37
37
  var import_native = require("@tamagui/native");
38
38
  var import_react = require("react");
39
- var SelectZIndexContext = /* @__PURE__ */(0, import_react.createContext)(void 0);
40
- var {
41
- Provider: SelectProvider,
42
- useStyledContext: useSelectContext
43
- } = (0, import_core.createStyledContext)(null, "Select");
44
- var {
45
- Provider: SelectItemParentProvider,
46
- useStyledContext: useSelectItemParentContext
47
- } = (0, import_core.createStyledContext)(null, "SelectItem");
48
- var ForwardSelectContext = function (param) {
49
- var {
50
- context,
51
- itemContext,
52
- children
53
- } = param;
54
- var portalState = (0, import_native.getPortal)().state;
55
- if (portalState.type === "teleport") {
56
- return children;
57
- }
58
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(SelectProvider, {
59
- isInSheet: true,
60
- scope: context.scopeName,
61
- ...context,
62
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(SelectItemParentProvider, {
63
- scope: context.scopeName,
64
- ...itemContext,
65
- children
66
- })
67
- });
39
+ var SelectZIndexContext = /* @__PURE__ */ (0, import_react.createContext)(void 0);
40
+ var SelectNativeComponentContext = /* @__PURE__ */ (0, import_react.createContext)(null);
41
+ var { Provider: SelectProvider, useStyledContext: useSelectContext } = (0, import_core.createStyledContext)(null, "Select");
42
+ var { Provider: SelectItemParentProvider, useStyledContext: useSelectItemParentContext } = (0, import_core.createStyledContext)(null, "SelectItem");
43
+ var ForwardSelectContext = function(param) {
44
+ var { context, itemContext, children } = param;
45
+ var portalState = (0, import_native.getPortal)().state;
46
+ if (portalState.type === "teleport") {
47
+ return children;
48
+ }
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectProvider, {
50
+ scope: context.scopeName,
51
+ ...context,
52
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemParentProvider, {
53
+ scope: context.scopeName,
54
+ ...itemContext,
55
+ children
56
+ })
57
+ });
68
58
  };
59
+
69
60
  //# sourceMappingURL=context.native.js.map