@tamagui/select 2.7.7 → 3.0.0-beta.1093.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 +406 -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 +79 -79
  6. package/dist/cjs/SelectContent.native.cjs +29 -0
  7. package/dist/cjs/SelectContent.native.js +17 -22
  8. package/dist/cjs/SelectContent.native.js.map +1 -1
  9. package/dist/cjs/SelectImpl.cjs +305 -320
  10. package/dist/cjs/SelectImpl.native.cjs +29 -0
  11. package/dist/cjs/SelectImpl.native.js +16 -24
  12. package/dist/cjs/SelectImpl.native.js.map +1 -1
  13. package/dist/cjs/SelectItem.cjs +256 -205
  14. package/dist/cjs/SelectItem.native.cjs +288 -0
  15. package/dist/cjs/SelectItem.native.js +264 -213
  16. package/dist/cjs/SelectItem.native.js.map +1 -1
  17. package/dist/cjs/SelectItemText.cjs +48 -79
  18. package/dist/cjs/SelectItemText.native.cjs +73 -0
  19. package/dist/cjs/SelectItemText.native.js +49 -79
  20. package/dist/cjs/SelectItemText.native.js.map +1 -1
  21. package/dist/cjs/SelectScrollButton.cjs +110 -130
  22. package/dist/cjs/SelectScrollButton.native.cjs +37 -0
  23. package/dist/cjs/SelectScrollButton.native.js +24 -22
  24. package/dist/cjs/SelectScrollButton.native.js.map +1 -1
  25. package/dist/cjs/SelectTrigger.cjs +68 -84
  26. package/dist/cjs/SelectTrigger.native.cjs +90 -0
  27. package/dist/cjs/SelectTrigger.native.js +70 -66
  28. package/dist/cjs/SelectTrigger.native.js.map +1 -1
  29. package/dist/cjs/SelectViewport.cjs +121 -142
  30. package/dist/cjs/SelectViewport.native.cjs +72 -0
  31. package/dist/cjs/SelectViewport.native.js +53 -50
  32. package/dist/cjs/SelectViewport.native.js.map +1 -1
  33. package/dist/cjs/constants.cjs +20 -22
  34. package/dist/cjs/constants.native.cjs +40 -0
  35. package/dist/cjs/constants.native.js +20 -21
  36. package/dist/cjs/constants.native.js.map +1 -1
  37. package/dist/cjs/context.cjs +37 -48
  38. package/dist/cjs/context.native.cjs +57 -0
  39. package/dist/cjs/context.native.js +39 -49
  40. package/dist/cjs/context.native.js.map +1 -1
  41. package/dist/cjs/index.cjs +14 -11
  42. package/dist/cjs/index.native.cjs +26 -0
  43. package/dist/cjs/index.native.js +14 -10
  44. package/dist/cjs/index.native.js.map +1 -1
  45. package/dist/cjs/selectionController.cjs +343 -0
  46. package/dist/cjs/selectionController.native.cjs +407 -0
  47. package/dist/cjs/selectionController.native.js +409 -0
  48. package/dist/cjs/selectionController.native.js.map +1 -0
  49. package/dist/cjs/types.cjs +9 -11
  50. package/dist/cjs/types.native.cjs +18 -0
  51. package/dist/cjs/types.native.js +9 -10
  52. package/dist/cjs/types.native.js.map +1 -1
  53. package/dist/esm/Select.mjs +381 -443
  54. package/dist/esm/Select.mjs.map +1 -1
  55. package/dist/esm/Select.native.js +420 -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 +291 -295
  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 +240 -181
  66. package/dist/esm/SelectItem.mjs.map +1 -1
  67. package/dist/esm/SelectItem.native.js +249 -191
  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 +107 -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 +315 -0
  97. package/dist/esm/selectionController.mjs.map +1 -0
  98. package/dist/esm/selectionController.native.js +377 -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 +381 -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 +29 -0
  110. package/dist/jsx/SelectContent.native.js +17 -22
  111. package/dist/jsx/SelectContent.native.js.map +1 -1
  112. package/dist/jsx/SelectImpl.mjs +291 -295
  113. package/dist/jsx/SelectImpl.mjs.map +1 -1
  114. package/dist/jsx/SelectImpl.native.cjs +29 -0
  115. package/dist/jsx/SelectImpl.native.js +16 -24
  116. package/dist/jsx/SelectImpl.native.js.map +1 -1
  117. package/dist/jsx/SelectItem.mjs +240 -181
  118. package/dist/jsx/SelectItem.mjs.map +1 -1
  119. package/dist/jsx/SelectItem.native.cjs +288 -0
  120. package/dist/jsx/SelectItem.native.js +264 -213
  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 +73 -0
  125. package/dist/jsx/SelectItemText.native.js +49 -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 +37 -0
  130. package/dist/jsx/SelectScrollButton.native.js +24 -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 +90 -0
  135. package/dist/jsx/SelectTrigger.native.js +70 -66
  136. package/dist/jsx/SelectTrigger.native.js.map +1 -1
  137. package/dist/jsx/SelectViewport.mjs +107 -119
  138. package/dist/jsx/SelectViewport.mjs.map +1 -1
  139. package/dist/jsx/SelectViewport.native.cjs +72 -0
  140. package/dist/jsx/SelectViewport.native.js +53 -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 +40 -0
  145. package/dist/jsx/constants.native.js +20 -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 +57 -0
  150. package/dist/jsx/context.native.js +39 -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 +26 -0
  155. package/dist/jsx/index.native.js +14 -10
  156. package/dist/jsx/index.native.js.map +1 -1
  157. package/dist/jsx/selectionController.mjs +315 -0
  158. package/dist/jsx/selectionController.mjs.map +1 -0
  159. package/dist/jsx/selectionController.native.cjs +407 -0
  160. package/dist/jsx/selectionController.native.js +409 -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 +18 -0
  164. package/dist/jsx/types.native.js +9 -10
  165. package/dist/jsx/types.native.js.map +1 -1
  166. package/package.json +31 -30
  167. package/src/Select.tsx +478 -378
  168. package/src/SelectContent.tsx +46 -16
  169. package/src/SelectImpl.native.tsx +0 -8
  170. package/src/SelectImpl.tsx +149 -160
  171. package/src/SelectItem.tsx +280 -159
  172. package/src/SelectItemText.tsx +16 -33
  173. package/src/SelectScrollButton.native.tsx +13 -4
  174. package/src/SelectScrollButton.tsx +57 -42
  175. package/src/SelectTrigger.tsx +77 -53
  176. package/src/SelectViewport.native.tsx +42 -25
  177. package/src/SelectViewport.tsx +60 -60
  178. package/src/context.tsx +6 -2
  179. package/src/index.tsx +5 -2
  180. package/src/selectionController.ts +404 -0
  181. package/src/types.tsx +105 -59
  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 +90 -0
  210. package/types/selectionController.d.ts.map +1 -0
  211. package/types/types.d.ts +66 -50
  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
@@ -5,67 +5,70 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
12
  };
13
13
  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;
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;
21
21
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
23
  var SelectViewport_native_exports = {};
26
24
  __export(SelectViewport_native_exports, {
27
- SelectViewport: () => SelectViewport
25
+ SelectViewport: () => SelectViewport,
26
+ SelectViewportFrame: () => SelectViewportFrame
28
27
  });
29
28
  module.exports = __toCommonJS(SelectViewport_native_exports);
30
29
  var import_jsx_runtime = require("react/jsx-runtime");
31
30
  var import_adapt = require("@tamagui/adapt");
32
31
  var import_core = require("@tamagui/core");
33
- var import_stacks = require("@tamagui/stacks");
34
32
  var import_constants = require("./constants.native.js");
35
33
  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
- };
34
+ var SelectViewportFrame = (0, import_core.styled)(import_core.View, {
35
+ displayName: import_constants.VIEWPORT_NAME,
36
+ position: "relative"
37
+ });
38
+ var SelectViewport = (0, import_core.createStyledHOC)(SelectViewportFrame, function SelectViewport2(props, forwardedRef) {
39
+ var { scope, children, disableScroll: _disableScroll, ...viewportProps } = props;
40
+ var context = (0, import_context.useSelectContext)(scope);
41
+ var itemParentContext = (0, import_context.useSelectItemParentContext)(scope);
42
+ var themeName = (0, import_core.useThemeName)();
43
+ var adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope);
44
+ var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
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.ProvideAdaptContext, {
51
+ ...adaptContext,
52
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectViewportFrame, {
53
+ ...viewportProps,
54
+ ref: forwardedRef,
55
+ children
56
+ })
57
+ })
58
+ })
59
+ });
60
+ if (!context.open) {
61
+ if (context.lazyMount && context.renderValue) return null;
62
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectViewportFrame, {
63
+ display: "none",
64
+ children: contents
65
+ });
66
+ }
67
+ return isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptPortalContents, {
68
+ scope: context.adaptScope,
69
+ children: contents
70
+ }) : contents;
71
+ });
70
72
  SelectViewport.displayName = import_constants.VIEWPORT_NAME;
73
+
71
74
  //# 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)(context.adaptScope);\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.ProvideAdaptContext, {\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,OAAM,CAAE,YAAY,MAAM;CAClE,aAAa,iBAAiB;CAC9B,UAAU;AACZ,CAAC;AACD,IAAI,kBAAkB,GAAG,YAAY,gBAAe,CAAE,qBAAqB,SAAS,gBAAgB,OAAO,cAAc;CACvH,IAAI,EAAE,OAAO,UAAU,eAAe,gBAAgB,GAAG,kBAAkB;CAC3E,IAAI,WAAW,GAAG,eAAe,iBAAgB,CAAE,KAAK;CACxD,IAAI,qBAAqB,GAAG,eAAe,2BAA0B,CAAE,KAAK;CAC5E,IAAI,aAAa,GAAG,YAAY,aAAY,CAAE;CAC9C,IAAI,gBAAgB,GAAG,aAAa,gBAAe,CAAE,QAAQ,UAAU;CACvE,IAAI,aAAa,GAAG,aAAa,iBAAgB,CAAE,QAAQ,UAAU;CACrE,IAAI,WAA2B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,YAAY,OAAO;EAC5E,MAAM;EACN,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,sBAAsB;GACzF,aAAa;GACb;GACA,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa,qBAAqB;IACtF,GAAG;IACH,UAA0B,iBAAC,GAAG,mBAAmB,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"}
@@ -3,32 +3,30 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
10
  };
11
11
  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;
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;
19
19
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
21
  var constants_exports = {};
24
22
  __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
23
+ FALLBACK_THRESHOLD: () => FALLBACK_THRESHOLD,
24
+ MIN_HEIGHT: () => MIN_HEIGHT,
25
+ SCROLL_ARROW_THRESHOLD: () => SCROLL_ARROW_THRESHOLD,
26
+ SCROLL_ARROW_VELOCITY: () => SCROLL_ARROW_VELOCITY,
27
+ SELECT_NAME: () => SELECT_NAME,
28
+ VIEWPORT_NAME: () => VIEWPORT_NAME,
29
+ WINDOW_PADDING: () => WINDOW_PADDING
32
30
  });
33
31
  module.exports = __toCommonJS(constants_exports);
34
32
  const SELECT_NAME = "Select";
@@ -37,4 +35,4 @@ const SCROLL_ARROW_VELOCITY = 8;
37
35
  const SCROLL_ARROW_THRESHOLD = 8;
38
36
  const MIN_HEIGHT = 80;
39
37
  const FALLBACK_THRESHOLD = 16;
40
- const VIEWPORT_NAME = "SelectViewport";
38
+ const VIEWPORT_NAME = "SelectViewport";
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ 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;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var constants_exports = {};
24
+ __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
32
+ });
33
+ module.exports = __toCommonJS(constants_exports);
34
+ var SELECT_NAME = "Select";
35
+ var WINDOW_PADDING = 8;
36
+ var SCROLL_ARROW_VELOCITY = 8;
37
+ var SCROLL_ARROW_THRESHOLD = 8;
38
+ var MIN_HEIGHT = 80;
39
+ var FALLBACK_THRESHOLD = 16;
40
+ var VIEWPORT_NAME = "SelectViewport";
@@ -5,32 +5,30 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
12
  };
13
13
  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;
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;
21
21
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
23
  var constants_exports = {};
26
24
  __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
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
34
32
  });
35
33
  module.exports = __toCommonJS(constants_exports);
36
34
  var SELECT_NAME = "Select";
@@ -40,4 +38,5 @@ var SCROLL_ARROW_THRESHOLD = 8;
40
38
  var MIN_HEIGHT = 80;
41
39
  var FALLBACK_THRESHOLD = 16;
42
40
  var VIEWPORT_NAME = "SelectViewport";
41
+
43
42
  //# 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"}
@@ -3,31 +3,30 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
10
  };
11
11
  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;
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;
19
19
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
21
  var context_exports = {};
24
22
  __export(context_exports, {
25
- ForwardSelectContext: () => ForwardSelectContext,
26
- SelectItemParentProvider: () => SelectItemParentProvider,
27
- SelectProvider: () => SelectProvider,
28
- SelectZIndexContext: () => SelectZIndexContext,
29
- useSelectContext: () => useSelectContext,
30
- useSelectItemParentContext: () => useSelectItemParentContext
23
+ ForwardSelectContext: () => ForwardSelectContext,
24
+ SelectItemParentProvider: () => SelectItemParentProvider,
25
+ SelectNativeComponentContext: () => SelectNativeComponentContext,
26
+ SelectProvider: () => SelectProvider,
27
+ SelectZIndexContext: () => SelectZIndexContext,
28
+ useSelectContext: () => useSelectContext,
29
+ useSelectItemParentContext: () => useSelectItemParentContext
31
30
  });
32
31
  module.exports = __toCommonJS(context_exports);
33
32
  var import_core = require("@tamagui/core");
@@ -35,31 +34,21 @@ var import_native = require("@tamagui/native");
35
34
  var import_react = require("react");
36
35
  var import_jsx_runtime = require("react/jsx-runtime");
37
36
  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
- };
37
+ const SelectNativeComponentContext = (0, import_react.createContext)(null);
38
+ const { Provider: SelectProvider, useStyledContext: useSelectContext } = (0, import_core.createStyledContext)(null, "Select");
39
+ const { Provider: SelectItemParentProvider, useStyledContext: useSelectItemParentContext } = (0, import_core.createStyledContext)(null, "SelectItem");
40
+ const ForwardSelectContext = ({ context, itemContext, children }) => {
41
+ const portalState = (0, import_native.getPortal)().state;
42
+ if (portalState.type === "teleport") {
43
+ return children;
44
+ }
45
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectProvider, {
46
+ scope: context.scopeName,
47
+ ...context,
48
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemParentProvider, {
49
+ scope: context.scopeName,
50
+ ...itemContext,
51
+ children
52
+ })
53
+ });
54
+ };
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ 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;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var context_exports = {};
24
+ __export(context_exports, {
25
+ ForwardSelectContext: () => ForwardSelectContext,
26
+ SelectItemParentProvider: () => SelectItemParentProvider,
27
+ SelectNativeComponentContext: () => SelectNativeComponentContext,
28
+ SelectProvider: () => SelectProvider,
29
+ SelectZIndexContext: () => SelectZIndexContext,
30
+ useSelectContext: () => useSelectContext,
31
+ useSelectItemParentContext: () => useSelectItemParentContext
32
+ });
33
+ module.exports = __toCommonJS(context_exports);
34
+ var import_jsx_runtime = require("react/jsx-runtime");
35
+ var import_core = require("@tamagui/core");
36
+ var import_native = require("@tamagui/native");
37
+ var import_react = require("react");
38
+ var SelectZIndexContext = /* @__PURE__ */ (0, import_react.createContext)(void 0);
39
+ var SelectNativeComponentContext = /* @__PURE__ */ (0, import_react.createContext)(null);
40
+ var { Provider: SelectProvider, useStyledContext: useSelectContext } = (0, import_core.createStyledContext)(null, "Select");
41
+ var { Provider: SelectItemParentProvider, useStyledContext: useSelectItemParentContext } = (0, import_core.createStyledContext)(null, "SelectItem");
42
+ var ForwardSelectContext = function(param) {
43
+ var { context, itemContext, children } = param;
44
+ var portalState = (0, import_native.getPortal)().state;
45
+ if (portalState.type === "teleport") {
46
+ return children;
47
+ }
48
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectProvider, {
49
+ scope: context.scopeName,
50
+ ...context,
51
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemParentProvider, {
52
+ scope: context.scopeName,
53
+ ...itemContext,
54
+ children
55
+ })
56
+ });
57
+ };
@@ -5,65 +5,55 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
12
  };
13
13
  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;
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;
21
21
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
23
  var context_exports = {};
26
24
  __export(context_exports, {
27
- ForwardSelectContext: () => ForwardSelectContext,
28
- SelectItemParentProvider: () => SelectItemParentProvider,
29
- SelectProvider: () => SelectProvider,
30
- SelectZIndexContext: () => SelectZIndexContext,
31
- useSelectContext: () => useSelectContext,
32
- useSelectItemParentContext: () => useSelectItemParentContext
25
+ ForwardSelectContext: () => ForwardSelectContext,
26
+ SelectItemParentProvider: () => SelectItemParentProvider,
27
+ SelectNativeComponentContext: () => SelectNativeComponentContext,
28
+ SelectProvider: () => SelectProvider,
29
+ SelectZIndexContext: () => SelectZIndexContext,
30
+ useSelectContext: () => useSelectContext,
31
+ useSelectItemParentContext: () => useSelectItemParentContext
33
32
  });
34
33
  module.exports = __toCommonJS(context_exports);
35
34
  var import_jsx_runtime = require("react/jsx-runtime");
36
35
  var import_core = require("@tamagui/core");
37
36
  var import_native = require("@tamagui/native");
38
37
  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
- });
38
+ var SelectZIndexContext = /* @__PURE__ */ (0, import_react.createContext)(void 0);
39
+ var SelectNativeComponentContext = /* @__PURE__ */ (0, import_react.createContext)(null);
40
+ var { Provider: SelectProvider, useStyledContext: useSelectContext } = (0, import_core.createStyledContext)(null, "Select");
41
+ var { Provider: SelectItemParentProvider, useStyledContext: useSelectItemParentContext } = (0, import_core.createStyledContext)(null, "SelectItem");
42
+ var ForwardSelectContext = function(param) {
43
+ var { context, itemContext, children } = param;
44
+ var portalState = (0, import_native.getPortal)().state;
45
+ if (portalState.type === "teleport") {
46
+ return children;
47
+ }
48
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectProvider, {
49
+ scope: context.scopeName,
50
+ ...context,
51
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemParentProvider, {
52
+ scope: context.scopeName,
53
+ ...itemContext,
54
+ children
55
+ })
56
+ });
68
57
  };
58
+
69
59
  //# sourceMappingURL=context.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","context_exports","__export","ForwardSelectContext","SelectItemParentProvider","SelectProvider","SelectZIndexContext","useSelectContext","useSelectItemParentContext","module","exports","import_jsx_runtime","require","import_core","import_native","import_react","createContext","Provider","useStyledContext","createStyledContext","param","context","itemContext","children","portalState","getPortal","state","type","jsx","isInSheet","scope","scopeName"],"sources":["../../src/context.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,oBAAA,EAAAA,CAAA,KAAAA,oBAAA;EAAAC,wBAAA,EAAAA,CAAA,KAAAA,wBAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAA,cAAA;EAAAC,mBAAA,EAAAA,CAAA,KAAAA,mBAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,0BAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAd,YAAoC,CAAAK,eAAA;AACpC,IAAAU,kBAA0B,GAAAC,OAAA;AAC1B,IAAAC,WAAA,GAAAD,OAA8B;AAmCxB,IAAAE,aAAA,GAAAF,OAAA;AA/BC,IAAAG,YAAM,GAAAH,OAAA,QAAsB;AAE5B,IAAAN,mBAAkB,kBAAgB,IAAAS,YAAkB,CAAAC,aAAiB,OAC1E;AAIK;EAAMC,QAAA,EAAAZ,cAAA;EAAAa,gBAAA,EAAAX;AAAA,QAAAM,WAAA,CAAAM,mBAAA;AAAA,IACX;EAAAF,QAAU,EAAAb,wBAAA;EAAAc,gBAAA,EAAAV;AAAA,QAAAK,WAAA,CAAAM,mBAAA;AAAA,IACVhB,oBAAkB,YAAAA,CAAAiB,KAAA;EACpB;IAAIC,OAAA;IAAAC,WAAA;IAAAC;EAAA,IAAkDH,KAAa;EAE5D,IAAMI,WAAA,OAAAV,aAAwB,CAAAW,SAAA,IAAAC,KAAA;EACnC,IAAAF,WAAA,CAAAG,IAAA;IACA,OAAAJ,QAAA;EACA;EACF,OAIM,mBAAAZ,kBAAA,CAAAiB,GAAA,EAAAvB,cAAA;IAGJwB,SAAM;IACNC,KAAI,EAAAT,OAAY,CAAAU,SAAS;IACvB,GAAAV,OAAO;IACTE,QAAA,qBAAAZ,kBAAA,CAAAiB,GAAA,EAAAxB,wBAAA;MAGA0B,KACE,EAAAT,OAAA,CAAAU,SAAA;MAMJ,GAAAT,WAAA","ignoreList":[]}
1
+ {"version":3,"file":"context.native.js","names":[],"sources":["cjs/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,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,kBAAkB,CAAC;AACvB,SAAS,iBAAiB;CACxB,4BAA4B;CAC5B,gCAAgC;CAChC,oCAAoC;CACpC,sBAAsB;CACtB,2BAA2B;CAC3B,wBAAwB;CACxB,kCAAkC;AACpC,CAAC;AACD,OAAO,UAAU,aAAa,eAAe;AAC7C,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,gBAAgB,QAAQ,iBAAiB;AAC7C,IAAI,eAAe,QAAQ,OAAO;AAClC,IAAI,sBAAsC,iBAAC,GAAG,aAAa,cAAa,CAAE,KAAK,CAAC;AAChF,IAAI,+BAA+C,iBAAC,GAAG,aAAa,cAAa,CAAE,IAAI;AACvF,IAAI,EAAE,UAAU,gBAAgB,kBAAkB,sBAAsB,GAAG,YAAY,oBAAmB,CAAE,MAAM,QAAQ;AAC1H,IAAI,EAAE,UAAU,0BAA0B,kBAAkB,gCAAgC,GAAG,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"}