@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,50 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from === "object" || typeof from === "function") {
9
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
- get: () => from[key],
11
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
- });
13
- }
14
- return to;
15
- };
16
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
- // If the importer is in node compatibility mode or this is not an ESM
18
- // file that has been converted to a CommonJS file using a Babel-
19
- // compatible transform (i.e. "__esModule" has not been set), then set
20
- // "default" to the CommonJS "module.exports" for node compatibility.
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
22
- value: mod,
23
- enumerable: true
24
- }) : target, mod));
25
- var import_compose_refs = require("@tamagui/compose-refs");
26
- var import_use_previous = require("@tamagui/use-previous");
27
- var React = __toESM(require("react"), 1);
28
- const BubbleSelect = React.forwardRef((props, forwardedRef) => {
29
- const {
30
- value,
31
- ...selectProps
32
- } = props;
33
- const ref = React.useRef(null);
34
- const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);
35
- const prevValue = (0, import_use_previous.usePrevious)(value);
36
- React.useEffect(() => {
37
- const select = ref.current;
38
- const selectProto = window.HTMLSelectElement.prototype;
39
- const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
40
- const setValue = descriptor.set;
41
- if (prevValue !== value && setValue) {
42
- const event = new Event("change", {
43
- bubbles: true
44
- });
45
- setValue.call(select, value);
46
- select.dispatchEvent(event);
47
- }
48
- }, [prevValue, value]);
49
- return null;
50
- });
@@ -1,30 +0,0 @@
1
- "use strict";
2
-
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
- get: () => from[key],
13
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
- });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
- // If the importer is in node compatibility mode or this is not an ESM
20
- // file that has been converted to a CommonJS file using a Babel-
21
- // compatible transform (i.e. "__esModule" has not been set), then set
22
- // "default" to the CommonJS "module.exports" for node compatibility.
23
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
24
- value: mod,
25
- enumerable: true
26
- }) : target, mod));
27
- var import_compose_refs = require("@tamagui/compose-refs");
28
- var import_use_previous = require("@tamagui/use-previous");
29
- var React = __toESM(require("react"), 1);
30
- //# sourceMappingURL=BubbleSelect.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["import_compose_refs","require","import_use_previous","React","__toESM"],"sources":["../../src/BubbleSelect.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;gBAAA;AACA,IAAAA,mBAAA,GAA4BC,OAAA;AAC5B,IAAAC,mBAAuB,GAAAD,OAAA;AAGvB,IAAAE,KAAM,GAAAC,OAAA,CAAAH,OAAqB,WAGzB,CAAC","ignoreList":[]}
@@ -1,32 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- };
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;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
23
- var useSelectBreakpointActive_exports = {};
24
- __export(useSelectBreakpointActive_exports, {
25
- useShowSelectSheet: () => useShowSelectSheet
26
- });
27
- module.exports = __toCommonJS(useSelectBreakpointActive_exports);
28
- var import_adapt = require("@tamagui/adapt");
29
- const useShowSelectSheet = context => {
30
- const breakpointActive = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
31
- return context.open === false ? false : breakpointActive;
32
- };
@@ -1,35 +0,0 @@
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", {
23
- value: true
24
- }), mod);
25
- var useSelectBreakpointActive_exports = {};
26
- __export(useSelectBreakpointActive_exports, {
27
- useShowSelectSheet: () => useShowSelectSheet
28
- });
29
- module.exports = __toCommonJS(useSelectBreakpointActive_exports);
30
- var import_adapt = require("@tamagui/adapt");
31
- var useShowSelectSheet = function (context) {
32
- var breakpointActive = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
33
- return context.open === false ? false : breakpointActive;
34
- };
35
- //# sourceMappingURL=useSelectBreakpointActive.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","useSelectBreakpointActive_exports","__export","useShowSelectSheet","module","exports","import_adapt","require","context","breakpointActive","useAdaptIsActive","adaptScope","open"],"sources":["../../src/useSelectBreakpointActive.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,iCAAA;AAAAC,QAAA,CAAAD,iCAAA;EAAAE,kBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAiC,CAAAK,iCAAA;AAG1B,IAAAK,YAAM,GAAAC,OAAA,CAAqB,gBAAiC;AACjE,IAAAJ,kBAAM,YAAAA,CAAmBK,OAAA;EACzB,IAAAC,gBAAe,IAAS,GAAAH,YAAQ,CAAQI,gBAAA,EAAAF,OAAA,CAAAG,UAAA;EAC1C,OAAAH,OAAA,CAAAI,IAAA,qBAAAH,gBAAA","ignoreList":[]}
@@ -1,27 +0,0 @@
1
- import { useComposedRefs } from "@tamagui/compose-refs";
2
- import { usePrevious } from "@tamagui/use-previous";
3
- import * as React from "react";
4
- const BubbleSelect = React.forwardRef((props, forwardedRef) => {
5
- const {
6
- value,
7
- ...selectProps
8
- } = props;
9
- const ref = React.useRef(null);
10
- const composedRefs = useComposedRefs(forwardedRef, ref);
11
- const prevValue = usePrevious(value);
12
- React.useEffect(() => {
13
- const select = ref.current;
14
- const selectProto = window.HTMLSelectElement.prototype;
15
- const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
16
- const setValue = descriptor.set;
17
- if (prevValue !== value && setValue) {
18
- const event = new Event("change", {
19
- bubbles: true
20
- });
21
- setValue.call(select, value);
22
- select.dispatchEvent(event);
23
- }
24
- }, [prevValue, value]);
25
- return null;
26
- });
27
- //# sourceMappingURL=BubbleSelect.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useComposedRefs","usePrevious","React","BubbleSelect","forwardRef","props","forwardedRef","value","selectProps","ref","useRef","composedRefs","prevValue","useEffect","select","current","selectProto","window","HTMLSelectElement","prototype","descriptor","Object","getOwnPropertyDescriptor","setValue","set","event","Event","bubbles","call","dispatchEvent"],"sources":["../../src/BubbleSelect.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,QAAuB;AAChC,SAASC,WAAA,QAAmB;AAC5B,YAAYC,KAAA,MAAW;AAGvB,MAAMC,YAAA,GAAeD,KAAA,CAAME,UAAA,CAGzB,CAACC,KAAA,EAAOC,YAAA,KAAiB;EACzB,MAAM;IAAEC,KAAA;IAAO,GAAGC;EAAY,IAAIH,KAAA;EAClC,MAAMI,GAAA,GAAMP,KAAA,CAAMQ,MAAA,CAA0B,IAAI;EAChD,MAAMC,YAAA,GAAeX,eAAA,CAAgBM,YAAA,EAAcG,GAAG;EACtD,MAAMG,SAAA,GAAYX,WAAA,CAAYM,KAAK;EAGnCL,KAAA,CAAMW,SAAA,CAAU,MAAM;IACpB,MAAMC,MAAA,GAASL,GAAA,CAAIM,OAAA;IACnB,MAAMC,WAAA,GAAcC,MAAA,CAAOC,iBAAA,CAAkBC,SAAA;IAC7C,MAAMC,UAAA,GAAaC,MAAA,CAAOC,wBAAA,CACxBN,WAAA,EACA,OACF;IACA,MAAMO,QAAA,GAAWH,UAAA,CAAWI,GAAA;IAC5B,IAAIZ,SAAA,KAAcL,KAAA,IAASgB,QAAA,EAAU;MACnC,MAAME,KAAA,GAAQ,IAAIC,KAAA,CAAM,UAAU;QAAEC,OAAA,EAAS;MAAK,CAAC;MACnDJ,QAAA,CAASK,IAAA,CAAKd,MAAA,EAAQP,KAAK;MAC3BO,MAAA,CAAOe,aAAA,CAAcJ,KAAK;IAC5B;EACF,GAAG,CAACb,SAAA,EAAWL,KAAK,CAAC;EAerB,OAAO;AAMT,CAAC","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- import { useComposedRefs } from "@tamagui/compose-refs";
2
- import { usePrevious } from "@tamagui/use-previous";
3
- import * as React from "react";
4
- //# sourceMappingURL=BubbleSelect.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useComposedRefs","usePrevious","React"],"sources":["../../src/BubbleSelect.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,QAAuB;AAChC,SAASC,WAAA,QAAmB;AAC5B,YAAYC,KAAA,MAAW","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AAEd,cAAc","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AAEd,cAAc","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AAEd,cAAc","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
@@ -1,7 +0,0 @@
1
- import { useAdaptIsActive } from "@tamagui/adapt";
2
- const useShowSelectSheet = context => {
3
- const breakpointActive = useAdaptIsActive(context.adaptScope);
4
- return context.open === false ? false : breakpointActive;
5
- };
6
- export { useShowSelectSheet };
7
- //# sourceMappingURL=useSelectBreakpointActive.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useAdaptIsActive","useShowSelectSheet","context","breakpointActive","adaptScope","open"],"sources":["../../src/useSelectBreakpointActive.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,gBAAA,QAAwB;AAG1B,MAAMC,kBAAA,GAAsBC,OAAA,IAAgC;EACjE,MAAMC,gBAAA,GAAmBH,gBAAA,CAAiBE,OAAA,CAAQE,UAAU;EAC5D,OAAOF,OAAA,CAAQG,IAAA,KAAS,QAAQ,QAAQF,gBAAA;AAC1C","ignoreList":[]}
@@ -1,7 +0,0 @@
1
- import { useAdaptIsActive } from "@tamagui/adapt";
2
- var useShowSelectSheet = function (context) {
3
- var breakpointActive = useAdaptIsActive(context.adaptScope);
4
- return context.open === false ? false : breakpointActive;
5
- };
6
- export { useShowSelectSheet };
7
- //# sourceMappingURL=useSelectBreakpointActive.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useAdaptIsActive","useShowSelectSheet","context","breakpointActive","adaptScope","open"],"sources":["../../src/useSelectBreakpointActive.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,gBAAA,QAAwB;AAG1B,IAAAC,kBAAM,YAAAA,CAAsBC,OAAgC;EACjE,IAAAC,gBAAM,GAAAH,gBAAmB,CAAAE,OAAiB,CAAAE,UAAQ;EAClD,OAAOF,OAAA,CAAQG,IAAA,KAAS,QAAQ,QAAQF,gBAAA;AAC1C","ignoreList":[]}
@@ -1,27 +0,0 @@
1
- import { useComposedRefs } from "@tamagui/compose-refs";
2
- import { usePrevious } from "@tamagui/use-previous";
3
- import * as React from "react";
4
- const BubbleSelect = React.forwardRef((props, forwardedRef) => {
5
- const {
6
- value,
7
- ...selectProps
8
- } = props;
9
- const ref = React.useRef(null);
10
- const composedRefs = useComposedRefs(forwardedRef, ref);
11
- const prevValue = usePrevious(value);
12
- React.useEffect(() => {
13
- const select = ref.current;
14
- const selectProto = window.HTMLSelectElement.prototype;
15
- const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
16
- const setValue = descriptor.set;
17
- if (prevValue !== value && setValue) {
18
- const event = new Event("change", {
19
- bubbles: true
20
- });
21
- setValue.call(select, value);
22
- select.dispatchEvent(event);
23
- }
24
- }, [prevValue, value]);
25
- return null;
26
- });
27
- //# sourceMappingURL=BubbleSelect.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useComposedRefs","usePrevious","React","BubbleSelect","forwardRef","props","forwardedRef","value","selectProps","ref","useRef","composedRefs","prevValue","useEffect","select","current","selectProto","window","HTMLSelectElement","prototype","descriptor","Object","getOwnPropertyDescriptor","setValue","set","event","Event","bubbles","call","dispatchEvent"],"sources":["../../src/BubbleSelect.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,QAAuB;AAChC,SAASC,WAAA,QAAmB;AAC5B,YAAYC,KAAA,MAAW;AAGvB,MAAMC,YAAA,GAAeD,KAAA,CAAME,UAAA,CAGzB,CAACC,KAAA,EAAOC,YAAA,KAAiB;EACzB,MAAM;IAAEC,KAAA;IAAO,GAAGC;EAAY,IAAIH,KAAA;EAClC,MAAMI,GAAA,GAAMP,KAAA,CAAMQ,MAAA,CAA0B,IAAI;EAChD,MAAMC,YAAA,GAAeX,eAAA,CAAgBM,YAAA,EAAcG,GAAG;EACtD,MAAMG,SAAA,GAAYX,WAAA,CAAYM,KAAK;EAGnCL,KAAA,CAAMW,SAAA,CAAU,MAAM;IACpB,MAAMC,MAAA,GAASL,GAAA,CAAIM,OAAA;IACnB,MAAMC,WAAA,GAAcC,MAAA,CAAOC,iBAAA,CAAkBC,SAAA;IAC7C,MAAMC,UAAA,GAAaC,MAAA,CAAOC,wBAAA,CACxBN,WAAA,EACA,OACF;IACA,MAAMO,QAAA,GAAWH,UAAA,CAAWI,GAAA;IAC5B,IAAIZ,SAAA,KAAcL,KAAA,IAASgB,QAAA,EAAU;MACnC,MAAME,KAAA,GAAQ,IAAIC,KAAA,CAAM,UAAU;QAAEC,OAAA,EAAS;MAAK,CAAC;MACnDJ,QAAA,CAASK,IAAA,CAAKd,MAAA,EAAQP,KAAK;MAC3BO,MAAA,CAAOe,aAAA,CAAcJ,KAAK;IAC5B;EACF,GAAG,CAACb,SAAA,EAAWL,KAAK,CAAC;EAerB,OAAO;AAMT,CAAC","ignoreList":[]}
@@ -1,30 +0,0 @@
1
- "use strict";
2
-
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
- get: () => from[key],
13
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
- });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
- // If the importer is in node compatibility mode or this is not an ESM
20
- // file that has been converted to a CommonJS file using a Babel-
21
- // compatible transform (i.e. "__esModule" has not been set), then set
22
- // "default" to the CommonJS "module.exports" for node compatibility.
23
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
24
- value: mod,
25
- enumerable: true
26
- }) : target, mod));
27
- var import_compose_refs = require("@tamagui/compose-refs");
28
- var import_use_previous = require("@tamagui/use-previous");
29
- var React = __toESM(require("react"), 1);
30
- //# sourceMappingURL=BubbleSelect.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__copyProps","to","from","except","desc","key","call","get","enumerable","__toESM","mod","isNodeMode","target","__esModule","value","import_compose_refs","require"],"sources":["../../src/BubbleSelect.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,QAAS,GAAAC,MAAA,CAAAC,MAAmB;AAC5B,IAAAC,SAAY,GAAAF,MAAA,CAAWG,cAAA;AAGvB,IAAAC,gBAAM,GAAeJ,MAAM,CAAAK,wBAGjB;AACR,IAAAC,iBAAkB,GAAAN,MAAA,CAAAO,mBAAgB;AAClC,IAAAC,YAAY,GAAAR,MAAM,CAAAS,cAA8B;AAChD,IAAAC,YAAM,GAAAV,MAAe,CAAAW,SAAA,CAAAC,cAAgB;AACrC,IAAAC,WAAM,GAAAA,CAAAC,EAAY,EAAAC,IAAA,EAAAC,MAAY,EAAKC,IAAA;EAGnC,IAAAF,IAAM,WAAUA,IAAM,wBAAAA,IAAA;IACpB,SAAMG,GAAA,IAASZ,iBAAI,CAAAS,IAAA,GACnB,IAAM,CAAAL,YAAA,CAAcS,IAAA,CAAAL,EAAO,EAAAI,GAAA,KAAAA,GAAA,KAAkBF,MAAA,EAC7Cd,SAAM,CAAAY,EAAA,EAAAI,GAAa;MAAAE,GAAO,EAAAA,CAAA,KAAAL,IAAA,CAAAG,GAAA;MAAAG,UAAA,IAAAJ,IAAA,GAAAb,gBAAA,CAAAW,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAI;IAAA;EAAA;EACxB,OACAP,EAAA;AAAA;AAEF,IAAAQ,OAAM,GAAAA,CAAAC,GAAA,EAAAC,UAAW,EAAWC,MAAA,MAAAA,MAAA,GAAAF,GAAA,WAAAxB,QAAA,CAAAS,YAAA,CAAAe,GAAA,SAAAV,WAAA;AAC5B;AACE;AACA;AACA;AAA0BW,UAC5B,KAAAD,GAAA,KAAAA,GAAA,CAAAG,UAAA,GAAAxB,SAAA,CAAAuB,MAAA;EAAAE,KAAA,EAAAJ,GAAA;EAAAF,UAAA;AAAA,KAAAI,MAAA,EACFF,GAeA;AAMF,IAACK,mBAAA,GAAAC,OAAA","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AAEd,cAAc","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AAEd,cAAc","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
@@ -1,7 +0,0 @@
1
- import { useAdaptIsActive } from "@tamagui/adapt";
2
- const useShowSelectSheet = context => {
3
- const breakpointActive = useAdaptIsActive(context.adaptScope);
4
- return context.open === false ? false : breakpointActive;
5
- };
6
- export { useShowSelectSheet };
7
- //# sourceMappingURL=useSelectBreakpointActive.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useAdaptIsActive","useShowSelectSheet","context","breakpointActive","adaptScope","open"],"sources":["../../src/useSelectBreakpointActive.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,gBAAA,QAAwB;AAG1B,MAAMC,kBAAA,GAAsBC,OAAA,IAAgC;EACjE,MAAMC,gBAAA,GAAmBH,gBAAA,CAAiBE,OAAA,CAAQE,UAAU;EAC5D,OAAOF,OAAA,CAAQG,IAAA,KAAS,QAAQ,QAAQF,gBAAA;AAC1C","ignoreList":[]}
@@ -1,35 +0,0 @@
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", {
23
- value: true
24
- }), mod);
25
- var useSelectBreakpointActive_exports = {};
26
- __export(useSelectBreakpointActive_exports, {
27
- useShowSelectSheet: () => useShowSelectSheet
28
- });
29
- module.exports = __toCommonJS(useSelectBreakpointActive_exports);
30
- var import_adapt = require("@tamagui/adapt");
31
- var useShowSelectSheet = function (context) {
32
- var breakpointActive = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
33
- return context.open === false ? false : breakpointActive;
34
- };
35
- //# sourceMappingURL=useSelectBreakpointActive.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty"],"sources":["../../src/useSelectBreakpointActive.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AAGF,IAAAA,SAAM,GAAAC,MAAA,CAAAC,cAAsB;AACjC,IAAAC,gBAAM,GAAAF,MAAmB,CAAAG,wBAAyB;AAClD,IAAAC,iBAAe,GAAAJ,MAAS,CAAAK,mBAAgB;AAC1C,IAAAC,YAAA,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA","ignoreList":[]}
@@ -1,50 +0,0 @@
1
- import { useComposedRefs } from '@tamagui/compose-refs'
2
- import { usePrevious } from '@tamagui/use-previous'
3
- import * as React from 'react'
4
-
5
- /* -----------------------------------------------------------------------------------------------*/
6
- const BubbleSelect = React.forwardRef<
7
- HTMLSelectElement,
8
- React.ComponentPropsWithoutRef<'select'>
9
- >((props, forwardedRef) => {
10
- const { value, ...selectProps } = props
11
- const ref = React.useRef<HTMLSelectElement>(null)
12
- const composedRefs = useComposedRefs(forwardedRef, ref)
13
- const prevValue = usePrevious(value)
14
-
15
- // Bubble value change to parents (e.g form change event)
16
- React.useEffect(() => {
17
- const select = ref.current!
18
- const selectProto = window.HTMLSelectElement.prototype
19
- const descriptor = Object.getOwnPropertyDescriptor(
20
- selectProto,
21
- 'value'
22
- ) as PropertyDescriptor
23
- const setValue = descriptor.set
24
- if (prevValue !== value && setValue) {
25
- const event = new Event('change', { bubbles: true })
26
- setValue.call(select, value)
27
- select.dispatchEvent(event)
28
- }
29
- }, [prevValue, value])
30
-
31
- /**
32
- * We purposefully use a `select` here to support form autofill as much
33
- * as possible.
34
- *
35
- * We purposefully do not add the `value` attribute here to allow the value
36
- * to be set programatically and bubble to any parent form `onChange` event.
37
- * Adding the `value` will cause React to consider the programatic
38
- * dispatch a duplicate and it will get swallowed.
39
- *
40
- * We use `VisuallyHidden` rather than `display: "none"` because Safari autofill
41
- * won't work otherwise.
42
- */
43
- // TODO
44
- return null
45
- // return (
46
- // <VisuallyHidden asChild>
47
- // <select {...selectProps} ref={composedRefs} defaultValue={value} />
48
- // </VisuallyHidden>
49
- // )
50
- })
@@ -1,7 +0,0 @@
1
- import { useAdaptIsActive } from '@tamagui/adapt'
2
- import type { SelectContextValue } from './types'
3
-
4
- export const useShowSelectSheet = (context: SelectContextValue) => {
5
- const breakpointActive = useAdaptIsActive(context.adaptScope)
6
- return context.open === false ? false : breakpointActive
7
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=BubbleSelect.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BubbleSelect.d.ts","sourceRoot":"","sources":["../src/BubbleSelect.tsx"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import type { SelectContextValue } from './types';
2
- export declare const useShowSelectSheet: (context: SelectContextValue) => boolean;
3
- //# sourceMappingURL=useSelectBreakpointActive.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSelectBreakpointActive.d.ts","sourceRoot":"","sources":["../src/useSelectBreakpointActive.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAEjD,eAAO,MAAM,kBAAkB,GAAI,SAAS,kBAAkB,YAG7D,CAAA"}