@tamagui/select 2.7.6 → 3.0.0-beta.637.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Select.cjs +409 -467
- package/dist/cjs/Select.native.cjs +495 -0
- package/dist/cjs/Select.native.js +445 -492
- package/dist/cjs/Select.native.js.map +1 -1
- package/dist/cjs/SelectContent.cjs +80 -79
- package/dist/cjs/SelectContent.native.cjs +30 -0
- package/dist/cjs/SelectContent.native.js +18 -22
- package/dist/cjs/SelectContent.native.js.map +1 -1
- package/dist/cjs/SelectImpl.cjs +299 -319
- package/dist/cjs/SelectImpl.native.cjs +30 -0
- package/dist/cjs/SelectImpl.native.js +17 -24
- package/dist/cjs/SelectImpl.native.js.map +1 -1
- package/dist/cjs/SelectItem.cjs +268 -205
- package/dist/cjs/SelectItem.native.cjs +317 -0
- package/dist/cjs/SelectItem.native.js +291 -211
- package/dist/cjs/SelectItem.native.js.map +1 -1
- package/dist/cjs/SelectItemText.cjs +49 -79
- package/dist/cjs/SelectItemText.native.cjs +74 -0
- package/dist/cjs/SelectItemText.native.js +50 -79
- package/dist/cjs/SelectItemText.native.js.map +1 -1
- package/dist/cjs/SelectScrollButton.cjs +111 -130
- package/dist/cjs/SelectScrollButton.native.cjs +38 -0
- package/dist/cjs/SelectScrollButton.native.js +25 -22
- package/dist/cjs/SelectScrollButton.native.js.map +1 -1
- package/dist/cjs/SelectTrigger.cjs +69 -84
- package/dist/cjs/SelectTrigger.native.cjs +91 -0
- package/dist/cjs/SelectTrigger.native.js +71 -66
- package/dist/cjs/SelectTrigger.native.js.map +1 -1
- package/dist/cjs/SelectViewport.cjs +119 -142
- package/dist/cjs/SelectViewport.native.cjs +73 -0
- package/dist/cjs/SelectViewport.native.js +54 -50
- package/dist/cjs/SelectViewport.native.js.map +1 -1
- package/dist/cjs/constants.cjs +21 -22
- package/dist/cjs/constants.native.cjs +41 -0
- package/dist/cjs/constants.native.js +21 -21
- package/dist/cjs/constants.native.js.map +1 -1
- package/dist/cjs/context.cjs +38 -48
- package/dist/cjs/context.native.cjs +58 -0
- package/dist/cjs/context.native.js +40 -49
- package/dist/cjs/context.native.js.map +1 -1
- package/dist/cjs/index.cjs +15 -11
- package/dist/cjs/index.native.cjs +27 -0
- package/dist/cjs/index.native.js +15 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/selectionController.cjs +334 -0
- package/dist/cjs/selectionController.native.cjs +403 -0
- package/dist/cjs/selectionController.native.js +405 -0
- package/dist/cjs/selectionController.native.js.map +1 -0
- package/dist/cjs/types.cjs +10 -11
- package/dist/cjs/types.native.cjs +19 -0
- package/dist/cjs/types.native.js +10 -10
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/esm/Select.mjs +382 -443
- package/dist/esm/Select.mjs.map +1 -1
- package/dist/esm/Select.native.js +418 -469
- package/dist/esm/Select.native.js.map +1 -1
- package/dist/esm/SelectContent.mjs +67 -61
- package/dist/esm/SelectContent.mjs.map +1 -1
- package/dist/esm/SelectContent.native.js +4 -5
- package/dist/esm/SelectContent.native.js.map +1 -1
- package/dist/esm/SelectImpl.mjs +284 -294
- package/dist/esm/SelectImpl.mjs.map +1 -1
- package/dist/esm/SelectImpl.native.js +5 -8
- package/dist/esm/SelectImpl.native.js.map +1 -1
- package/dist/esm/SelectItem.mjs +252 -182
- package/dist/esm/SelectItem.mjs.map +1 -1
- package/dist/esm/SelectItem.native.js +276 -190
- package/dist/esm/SelectItem.native.js.map +1 -1
- package/dist/esm/SelectItemText.mjs +33 -55
- package/dist/esm/SelectItemText.mjs.map +1 -1
- package/dist/esm/SelectItemText.native.js +34 -56
- package/dist/esm/SelectItemText.native.js.map +1 -1
- package/dist/esm/SelectScrollButton.mjs +95 -107
- package/dist/esm/SelectScrollButton.mjs.map +1 -1
- package/dist/esm/SelectScrollButton.native.js +11 -7
- package/dist/esm/SelectScrollButton.native.js.map +1 -1
- package/dist/esm/SelectTrigger.mjs +56 -58
- package/dist/esm/SelectTrigger.mjs.map +1 -1
- package/dist/esm/SelectTrigger.native.js +54 -44
- package/dist/esm/SelectTrigger.native.js.map +1 -1
- package/dist/esm/SelectViewport.mjs +104 -119
- package/dist/esm/SelectViewport.mjs.map +1 -1
- package/dist/esm/SelectViewport.native.js +44 -39
- package/dist/esm/SelectViewport.native.js.map +1 -1
- package/dist/esm/constants.mjs +1 -0
- package/dist/esm/constants.mjs.map +1 -1
- package/dist/esm/constants.native.js +1 -0
- package/dist/esm/constants.native.js.map +1 -1
- package/dist/esm/context.mjs +20 -28
- package/dist/esm/context.mjs.map +1 -1
- package/dist/esm/context.native.js +23 -31
- package/dist/esm/context.native.js.map +1 -1
- package/dist/esm/index.js +13 -3
- package/dist/esm/index.mjs +13 -3
- package/dist/esm/index.native.js +13 -3
- package/dist/esm/selectionController.mjs +305 -0
- package/dist/esm/selectionController.mjs.map +1 -0
- package/dist/esm/selectionController.native.js +372 -0
- package/dist/esm/selectionController.native.js.map +1 -0
- package/dist/esm/types.mjs +0 -2
- package/dist/esm/types.native.js +0 -2
- package/dist/jsx/Select.mjs +382 -443
- package/dist/jsx/Select.mjs.map +1 -1
- package/dist/jsx/Select.native.cjs +495 -0
- package/dist/jsx/Select.native.js +445 -492
- package/dist/jsx/Select.native.js.map +1 -1
- package/dist/jsx/SelectContent.mjs +67 -61
- package/dist/jsx/SelectContent.mjs.map +1 -1
- package/dist/jsx/SelectContent.native.cjs +30 -0
- package/dist/jsx/SelectContent.native.js +18 -22
- package/dist/jsx/SelectContent.native.js.map +1 -1
- package/dist/jsx/SelectImpl.mjs +284 -294
- package/dist/jsx/SelectImpl.mjs.map +1 -1
- package/dist/jsx/SelectImpl.native.cjs +30 -0
- package/dist/jsx/SelectImpl.native.js +17 -24
- package/dist/jsx/SelectImpl.native.js.map +1 -1
- package/dist/jsx/SelectItem.mjs +252 -182
- package/dist/jsx/SelectItem.mjs.map +1 -1
- package/dist/jsx/SelectItem.native.cjs +317 -0
- package/dist/jsx/SelectItem.native.js +291 -211
- package/dist/jsx/SelectItem.native.js.map +1 -1
- package/dist/jsx/SelectItemText.mjs +33 -55
- package/dist/jsx/SelectItemText.mjs.map +1 -1
- package/dist/jsx/SelectItemText.native.cjs +74 -0
- package/dist/jsx/SelectItemText.native.js +50 -79
- package/dist/jsx/SelectItemText.native.js.map +1 -1
- package/dist/jsx/SelectScrollButton.mjs +95 -107
- package/dist/jsx/SelectScrollButton.mjs.map +1 -1
- package/dist/jsx/SelectScrollButton.native.cjs +38 -0
- package/dist/jsx/SelectScrollButton.native.js +25 -22
- package/dist/jsx/SelectScrollButton.native.js.map +1 -1
- package/dist/jsx/SelectTrigger.mjs +56 -58
- package/dist/jsx/SelectTrigger.mjs.map +1 -1
- package/dist/jsx/SelectTrigger.native.cjs +91 -0
- package/dist/jsx/SelectTrigger.native.js +71 -66
- package/dist/jsx/SelectTrigger.native.js.map +1 -1
- package/dist/jsx/SelectViewport.mjs +104 -119
- package/dist/jsx/SelectViewport.mjs.map +1 -1
- package/dist/jsx/SelectViewport.native.cjs +73 -0
- package/dist/jsx/SelectViewport.native.js +54 -50
- package/dist/jsx/SelectViewport.native.js.map +1 -1
- package/dist/jsx/constants.mjs +1 -0
- package/dist/jsx/constants.mjs.map +1 -1
- package/dist/jsx/constants.native.cjs +41 -0
- package/dist/jsx/constants.native.js +21 -21
- package/dist/jsx/constants.native.js.map +1 -1
- package/dist/jsx/context.mjs +20 -28
- package/dist/jsx/context.mjs.map +1 -1
- package/dist/jsx/context.native.cjs +58 -0
- package/dist/jsx/context.native.js +40 -49
- package/dist/jsx/context.native.js.map +1 -1
- package/dist/jsx/index.js +13 -3
- package/dist/jsx/index.mjs +13 -3
- package/dist/jsx/index.native.cjs +27 -0
- package/dist/jsx/index.native.js +15 -10
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/selectionController.mjs +305 -0
- package/dist/jsx/selectionController.mjs.map +1 -0
- package/dist/jsx/selectionController.native.cjs +403 -0
- package/dist/jsx/selectionController.native.js +405 -0
- package/dist/jsx/selectionController.native.js.map +1 -0
- package/dist/jsx/types.mjs +0 -2
- package/dist/jsx/types.native.cjs +19 -0
- package/dist/jsx/types.native.js +10 -10
- package/dist/jsx/types.native.js.map +1 -1
- package/package.json +28 -28
- package/src/Select.tsx +457 -357
- package/src/SelectContent.tsx +46 -16
- package/src/SelectImpl.native.tsx +0 -8
- package/src/SelectImpl.tsx +87 -100
- package/src/SelectItem.tsx +282 -136
- package/src/SelectItemText.tsx +16 -33
- package/src/SelectScrollButton.native.tsx +13 -4
- package/src/SelectScrollButton.tsx +56 -41
- package/src/SelectTrigger.tsx +77 -53
- package/src/SelectViewport.native.tsx +42 -25
- package/src/SelectViewport.tsx +52 -51
- package/src/context.tsx +6 -2
- package/src/index.tsx +5 -2
- package/src/selectionController.ts +389 -0
- package/src/types.tsx +88 -45
- package/types/Select.d.ts +139 -201
- package/types/Select.d.ts.map +1 -1
- package/types/SelectContent.d.ts +1 -1
- package/types/SelectContent.d.ts.map +1 -1
- package/types/SelectContent.native.d.ts.map +1 -1
- package/types/SelectImpl.d.ts +2 -1
- package/types/SelectImpl.d.ts.map +1 -1
- package/types/SelectImpl.native.d.ts +1 -5
- package/types/SelectImpl.native.d.ts.map +1 -1
- package/types/SelectItem.d.ts +13 -16
- package/types/SelectItem.d.ts.map +1 -1
- package/types/SelectItemText.d.ts +9 -13
- package/types/SelectItemText.d.ts.map +1 -1
- package/types/SelectScrollButton.d.ts +15 -2
- package/types/SelectScrollButton.d.ts.map +1 -1
- package/types/SelectScrollButton.native.d.ts +16 -3
- package/types/SelectScrollButton.native.d.ts.map +1 -1
- package/types/SelectTrigger.d.ts +11 -23
- package/types/SelectTrigger.d.ts.map +1 -1
- package/types/SelectViewport.d.ts +11 -38
- package/types/SelectViewport.d.ts.map +1 -1
- package/types/SelectViewport.native.d.ts +15 -4
- package/types/SelectViewport.native.d.ts.map +1 -1
- package/types/context.d.ts +2 -0
- package/types/context.d.ts.map +1 -1
- package/types/index.d.ts +5 -2
- package/types/index.d.ts.map +1 -1
- package/types/selectionController.d.ts +88 -0
- package/types/selectionController.d.ts.map +1 -0
- package/types/types.d.ts +47 -37
- package/types/types.d.ts.map +1 -1
- package/dist/cjs/BubbleSelect.cjs +0 -50
- package/dist/cjs/BubbleSelect.native.js +0 -30
- package/dist/cjs/BubbleSelect.native.js.map +0 -1
- package/dist/cjs/useSelectBreakpointActive.cjs +0 -32
- package/dist/cjs/useSelectBreakpointActive.native.js +0 -35
- package/dist/cjs/useSelectBreakpointActive.native.js.map +0 -1
- package/dist/esm/BubbleSelect.mjs +0 -27
- package/dist/esm/BubbleSelect.mjs.map +0 -1
- package/dist/esm/BubbleSelect.native.js +0 -4
- package/dist/esm/BubbleSelect.native.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/types.mjs.map +0 -1
- package/dist/esm/types.native.js.map +0 -1
- package/dist/esm/useSelectBreakpointActive.mjs +0 -7
- package/dist/esm/useSelectBreakpointActive.mjs.map +0 -1
- package/dist/esm/useSelectBreakpointActive.native.js +0 -7
- package/dist/esm/useSelectBreakpointActive.native.js.map +0 -1
- package/dist/jsx/BubbleSelect.mjs +0 -27
- package/dist/jsx/BubbleSelect.mjs.map +0 -1
- package/dist/jsx/BubbleSelect.native.js +0 -30
- package/dist/jsx/BubbleSelect.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
- package/dist/jsx/types.mjs.map +0 -1
- package/dist/jsx/useSelectBreakpointActive.mjs +0 -7
- package/dist/jsx/useSelectBreakpointActive.mjs.map +0 -1
- package/dist/jsx/useSelectBreakpointActive.native.js +0 -35
- package/dist/jsx/useSelectBreakpointActive.native.js.map +0 -1
- package/src/BubbleSelect.tsx +0 -50
- package/src/useSelectBreakpointActive.tsx +0 -7
- package/types/BubbleSelect.d.ts +0 -2
- package/types/BubbleSelect.d.ts.map +0 -1
- package/types/useSelectBreakpointActive.d.ts +0 -3
- 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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
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
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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,"
|
|
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"}
|
package/dist/cjs/constants.cjs
CHANGED
|
@@ -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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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,"
|
|
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"}
|
package/dist/cjs/context.cjs
CHANGED
|
@@ -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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|