@tamagui/linear-gradient 1.0.11 → 1.0.13
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/package.json +4 -4
- package/dist/cjs/BubbleSelect.js +0 -44
- package/dist/cjs/BubbleSelect.js.map +0 -7
- package/dist/cjs/Select.js +0 -480
- package/dist/cjs/Select.js.map +0 -7
- package/dist/cjs/SelectContent.js +0 -76
- package/dist/cjs/SelectContent.js.map +0 -7
- package/dist/cjs/SelectContent.native.js +0 -31
- package/dist/cjs/SelectContent.native.js.map +0 -7
- package/dist/cjs/SelectImpl.js +0 -301
- package/dist/cjs/SelectImpl.js.map +0 -7
- package/dist/cjs/SelectImpl.native.js +0 -37
- package/dist/cjs/SelectImpl.native.js.map +0 -7
- package/dist/cjs/SelectScrollButton.js +0 -161
- package/dist/cjs/SelectScrollButton.js.map +0 -7
- package/dist/cjs/SelectScrollButton.native.js +0 -32
- package/dist/cjs/SelectScrollButton.native.js.map +0 -7
- package/dist/cjs/SelectViewport.js +0 -126
- package/dist/cjs/SelectViewport.js.map +0 -7
- package/dist/cjs/SelectViewport.native.js +0 -62
- package/dist/cjs/SelectViewport.native.js.map +0 -7
- package/dist/cjs/constants.js +0 -47
- package/dist/cjs/constants.js.map +0 -7
- package/dist/cjs/context.js +0 -49
- package/dist/cjs/context.js.map +0 -7
- package/dist/cjs/types.js +0 -17
- package/dist/cjs/types.js.map +0 -7
- package/dist/cjs/useSelectBreakpointActive.js +0 -39
- package/dist/cjs/useSelectBreakpointActive.js.map +0 -7
- package/dist/esm/BubbleSelect.js +0 -25
- package/dist/esm/BubbleSelect.js.map +0 -7
- package/dist/esm/Select.js +0 -452
- package/dist/esm/Select.js.map +0 -7
- package/dist/esm/SelectContent.js +0 -52
- package/dist/esm/SelectContent.js.map +0 -7
- package/dist/esm/SelectContent.native.js +0 -7
- package/dist/esm/SelectContent.native.js.map +0 -7
- package/dist/esm/SelectImpl.js +0 -286
- package/dist/esm/SelectImpl.js.map +0 -7
- package/dist/esm/SelectImpl.native.js +0 -13
- package/dist/esm/SelectImpl.native.js.map +0 -7
- package/dist/esm/SelectScrollButton.js +0 -130
- package/dist/esm/SelectScrollButton.js.map +0 -7
- package/dist/esm/SelectScrollButton.native.js +0 -7
- package/dist/esm/SelectScrollButton.native.js.map +0 -7
- package/dist/esm/SelectViewport.js +0 -95
- package/dist/esm/SelectViewport.js.map +0 -7
- package/dist/esm/SelectViewport.native.js +0 -32
- package/dist/esm/SelectViewport.native.js.map +0 -7
- package/dist/esm/constants.js +0 -17
- package/dist/esm/constants.js.map +0 -7
- package/dist/esm/context.js +0 -21
- package/dist/esm/context.js.map +0 -7
- package/dist/esm/types.js +0 -1
- package/dist/esm/types.js.map +0 -7
- package/dist/esm/useSelectBreakpointActive.js +0 -14
- package/dist/esm/useSelectBreakpointActive.js.map +0 -7
- package/dist/jsx/BubbleSelect.js +0 -25
- package/dist/jsx/BubbleSelect.js.map +0 -7
- package/dist/jsx/Select.js +0 -326
- package/dist/jsx/Select.js.map +0 -7
- package/dist/jsx/SelectContent.js +0 -30
- package/dist/jsx/SelectContent.js.map +0 -7
- package/dist/jsx/SelectContent.native.js +0 -7
- package/dist/jsx/SelectContent.native.js.map +0 -7
- package/dist/jsx/SelectImpl.js +0 -259
- package/dist/jsx/SelectImpl.js.map +0 -7
- package/dist/jsx/SelectImpl.native.js +0 -10
- package/dist/jsx/SelectImpl.native.js.map +0 -7
- package/dist/jsx/SelectScrollButton.js +0 -103
- package/dist/jsx/SelectScrollButton.js.map +0 -7
- package/dist/jsx/SelectScrollButton.native.js +0 -7
- package/dist/jsx/SelectScrollButton.native.js.map +0 -7
- package/dist/jsx/SelectViewport.js +0 -73
- package/dist/jsx/SelectViewport.js.map +0 -7
- package/dist/jsx/SelectViewport.native.js +0 -18
- package/dist/jsx/SelectViewport.native.js.map +0 -7
- package/dist/jsx/constants.js +0 -17
- package/dist/jsx/constants.js.map +0 -7
- package/dist/jsx/context.js +0 -15
- package/dist/jsx/context.js.map +0 -7
- package/dist/jsx/types.js +0 -1
- package/dist/jsx/types.js.map +0 -7
- package/dist/jsx/useSelectBreakpointActive.js +0 -14
- package/dist/jsx/useSelectBreakpointActive.js.map +0 -7
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var SelectContent_exports = {};
|
|
20
|
-
__export(SelectContent_exports, {
|
|
21
|
-
SelectContent: () => SelectContent
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(SelectContent_exports);
|
|
24
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
-
var import_react_dom_interactions = require("@floating-ui/react-dom-interactions");
|
|
26
|
-
var import_core = require("@tamagui/core");
|
|
27
|
-
var import_dismissable = require("@tamagui/dismissable");
|
|
28
|
-
var import_focus_scope = require("@tamagui/focus-scope");
|
|
29
|
-
var import_context = require("./context");
|
|
30
|
-
var import_useSelectBreakpointActive = require("./useSelectBreakpointActive");
|
|
31
|
-
const CONTENT_NAME = "SelectContent";
|
|
32
|
-
const SelectContent = ({
|
|
33
|
-
children,
|
|
34
|
-
__scopeSelect,
|
|
35
|
-
zIndex = 1e3,
|
|
36
|
-
...focusScopeProps
|
|
37
|
-
}) => {
|
|
38
|
-
const context = (0, import_context.useSelectContext)(CONTENT_NAME, __scopeSelect);
|
|
39
|
-
const themeName = (0, import_core.useThemeName)();
|
|
40
|
-
const showSheet = (0, import_useSelectBreakpointActive.useShowSelectSheet)(context);
|
|
41
|
-
const contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {
|
|
42
|
-
name: themeName,
|
|
43
|
-
children
|
|
44
|
-
});
|
|
45
|
-
const touch = (0, import_core.useIsTouchDevice)();
|
|
46
|
-
if (showSheet) {
|
|
47
|
-
if (!context.open) {
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
51
|
-
children: contents
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_dom_interactions.FloatingPortal, {
|
|
55
|
-
children: context.open ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_dom_interactions.FloatingOverlay, {
|
|
56
|
-
style: { zIndex },
|
|
57
|
-
lockScroll: !touch,
|
|
58
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_focus_scope.FocusScope, {
|
|
59
|
-
loop: true,
|
|
60
|
-
trapped: true,
|
|
61
|
-
...focusScopeProps,
|
|
62
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dismissable.Dismissable, {
|
|
63
|
-
children: contents
|
|
64
|
-
})
|
|
65
|
-
})
|
|
66
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
67
|
-
style: { display: "none" },
|
|
68
|
-
children: contents
|
|
69
|
-
})
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
73
|
-
0 && (module.exports = {
|
|
74
|
-
SelectContent
|
|
75
|
-
});
|
|
76
|
-
//# sourceMappingURL=SelectContent.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/SelectContent.tsx"],
|
|
4
|
-
"sourcesContent": ["import { FloatingOverlay, FloatingPortal } from '@floating-ui/react-dom-interactions'\nimport { Theme, useIsTouchDevice, useThemeName } from '@tamagui/core'\nimport { Dismissable } from '@tamagui/dismissable'\nimport { FocusScope, FocusScopeProps } from '@tamagui/focus-scope'\n\nimport { useSelectContext } from './context'\nimport { SelectContentProps } from './types'\nimport { useShowSelectSheet } from './useSelectBreakpointActive'\n\n/* -------------------------------------------------------------------------------------------------\n * SelectContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'SelectContent'\n\nexport const SelectContent = ({\n children,\n __scopeSelect,\n zIndex = 1000,\n ...focusScopeProps\n}: SelectContentProps & FocusScopeProps) => {\n const context = useSelectContext(CONTENT_NAME, __scopeSelect)\n const themeName = useThemeName()\n const showSheet = useShowSelectSheet(context)\n const contents = <Theme name={themeName}>{children}</Theme>\n const touch = useIsTouchDevice()\n\n if (showSheet) {\n if (!context.open) {\n return null\n }\n return <>{contents}</>\n }\n\n return (\n <FloatingPortal>\n {context.open ? (\n <FloatingOverlay style={{ zIndex }} lockScroll={!touch}>\n <FocusScope loop trapped {...focusScopeProps}>\n <Dismissable>{contents}</Dismissable>\n </FocusScope>\n </FloatingOverlay>\n ) : (\n <div style={{ display: 'none' }}>{contents}</div>\n )}\n </FloatingPortal>\n )\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBmB;AAxBnB,oCAAgD;AAChD,kBAAsD;AACtD,yBAA4B;AAC5B,yBAA4C;AAE5C,qBAAiC;AAEjC,uCAAmC;AAMnC,MAAM,eAAe;AAEd,MAAM,gBAAgB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA,SAAS;AAAA,KACN;AACL,MAA4C;AAC1C,QAAM,cAAU,iCAAiB,cAAc,aAAa;AAC5D,QAAM,gBAAY,0BAAa;AAC/B,QAAM,gBAAY,qDAAmB,OAAO;AAC5C,QAAM,WAAW,4CAAC;AAAA,IAAM,MAAM;AAAA,IAAY;AAAA,GAAS;AACnD,QAAM,YAAQ,8BAAiB;AAE/B,MAAI,WAAW;AACb,QAAI,CAAC,QAAQ,MAAM;AACjB,aAAO;AAAA,IACT;AACA,WAAO;AAAA,MAAG;AAAA,KAAS;AAAA,EACrB;AAEA,SACE,4CAAC;AAAA,IACE,kBAAQ,OACP,4CAAC;AAAA,MAAgB,OAAO,EAAE,OAAO;AAAA,MAAG,YAAY,CAAC;AAAA,MAC/C,sDAAC;AAAA,QAAW,MAAI;AAAA,QAAC,SAAO;AAAA,QAAE,GAAG;AAAA,QAC3B,sDAAC;AAAA,UAAa;AAAA,SAAS;AAAA,OACzB;AAAA,KACF,IAEA,4CAAC;AAAA,MAAI,OAAO,EAAE,SAAS,OAAO;AAAA,MAAI;AAAA,KAAS;AAAA,GAE/C;AAEJ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var SelectContent_native_exports = {};
|
|
20
|
-
__export(SelectContent_native_exports, {
|
|
21
|
-
SelectContent: () => SelectContent
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(SelectContent_native_exports);
|
|
24
|
-
const SelectContent = ({ children }) => {
|
|
25
|
-
return children;
|
|
26
|
-
};
|
|
27
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
-
0 && (module.exports = {
|
|
29
|
-
SelectContent
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=SelectContent.native.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/SelectContent.native.tsx"],
|
|
4
|
-
"sourcesContent": ["import { SelectContentProps } from './types'\n\nexport const SelectContent = ({ children }: SelectContentProps) => {\n return children\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,gBAAgB,CAAC,EAAE,SAAS,MAA0B;AACjE,SAAO;AACT;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/SelectImpl.js
DELETED
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
-
mod
|
|
23
|
-
));
|
|
24
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
-
var SelectImpl_exports = {};
|
|
26
|
-
__export(SelectImpl_exports, {
|
|
27
|
-
SelectInlineImpl: () => SelectInlineImpl
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(SelectImpl_exports);
|
|
30
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
-
var import_react_dom_interactions = require("@floating-ui/react-dom-interactions");
|
|
32
|
-
var import_core = require("@tamagui/core");
|
|
33
|
-
var React = __toESM(require("react"));
|
|
34
|
-
var import_react_dom = require("react-dom");
|
|
35
|
-
var import_constants = require("./constants");
|
|
36
|
-
var import_context = require("./context");
|
|
37
|
-
const SelectInlineImpl = (props) => {
|
|
38
|
-
const {
|
|
39
|
-
__scopeSelect,
|
|
40
|
-
children,
|
|
41
|
-
open = false,
|
|
42
|
-
selectedIndexRef,
|
|
43
|
-
listContentRef
|
|
44
|
-
} = props;
|
|
45
|
-
const selectContext = (0, import_context.useSelectContext)("SelectSheetImpl", __scopeSelect);
|
|
46
|
-
const {
|
|
47
|
-
setActiveIndex,
|
|
48
|
-
setOpen,
|
|
49
|
-
setSelectedIndex,
|
|
50
|
-
selectedIndex,
|
|
51
|
-
activeIndex,
|
|
52
|
-
forceUpdate
|
|
53
|
-
} = selectContext;
|
|
54
|
-
const [scrollTop, setScrollTop] = React.useState(0);
|
|
55
|
-
const touch = (0, import_core.useIsTouchDevice)();
|
|
56
|
-
const listItemsRef = React.useRef([]);
|
|
57
|
-
const overflowRef = React.useRef(null);
|
|
58
|
-
const upArrowRef = React.useRef(null);
|
|
59
|
-
const downArrowRef = React.useRef(null);
|
|
60
|
-
const allowSelectRef = React.useRef(false);
|
|
61
|
-
const allowMouseUpRef = React.useRef(true);
|
|
62
|
-
const selectTimeoutRef = React.useRef();
|
|
63
|
-
const state = React.useRef({
|
|
64
|
-
isMouseOutside: false
|
|
65
|
-
});
|
|
66
|
-
const [controlledScrolling, setControlledScrolling] = React.useState(false);
|
|
67
|
-
const [fallback, setFallback] = React.useState(false);
|
|
68
|
-
const [innerOffset, setInnerOffset] = React.useState(0);
|
|
69
|
-
const [blockSelection, setBlockSelection] = React.useState(false);
|
|
70
|
-
const floatingStyle = React.useRef({});
|
|
71
|
-
React.useEffect(() => {
|
|
72
|
-
const frame = requestAnimationFrame(() => {
|
|
73
|
-
if (!open) {
|
|
74
|
-
setScrollTop(0);
|
|
75
|
-
setFallback(false);
|
|
76
|
-
setActiveIndex(null);
|
|
77
|
-
setControlledScrolling(false);
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
return () => {
|
|
81
|
-
cancelAnimationFrame(frame);
|
|
82
|
-
};
|
|
83
|
-
}, [open, setActiveIndex]);
|
|
84
|
-
if (import_core.isWeb) {
|
|
85
|
-
React.useEffect(() => {
|
|
86
|
-
if (!open)
|
|
87
|
-
return;
|
|
88
|
-
const mouseUp = (e) => {
|
|
89
|
-
if (state.current.isMouseOutside) {
|
|
90
|
-
setOpen(false);
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
document.addEventListener("mouseup", mouseUp);
|
|
94
|
-
return () => {
|
|
95
|
-
document.removeEventListener("mouseup", mouseUp);
|
|
96
|
-
};
|
|
97
|
-
}, [open]);
|
|
98
|
-
}
|
|
99
|
-
const updateFloatingSize = (0, import_react_dom_interactions.size)({
|
|
100
|
-
apply({
|
|
101
|
-
availableHeight,
|
|
102
|
-
rects: {
|
|
103
|
-
reference: { width }
|
|
104
|
-
}
|
|
105
|
-
}) {
|
|
106
|
-
floatingStyle.current = {
|
|
107
|
-
width,
|
|
108
|
-
maxHeight: availableHeight
|
|
109
|
-
};
|
|
110
|
-
},
|
|
111
|
-
padding: import_constants.WINDOW_PADDING
|
|
112
|
-
});
|
|
113
|
-
const { x, y, reference, floating, strategy, context, refs } = (0, import_react_dom_interactions.useFloating)({
|
|
114
|
-
open,
|
|
115
|
-
onOpenChange: setOpen,
|
|
116
|
-
whileElementsMounted: import_react_dom_interactions.autoUpdate,
|
|
117
|
-
placement: "bottom-start",
|
|
118
|
-
middleware: fallback ? [
|
|
119
|
-
(0, import_react_dom_interactions.offset)(5),
|
|
120
|
-
...[
|
|
121
|
-
touch ? (0, import_react_dom_interactions.shift)({ crossAxis: true, padding: import_constants.WINDOW_PADDING }) : (0, import_react_dom_interactions.flip)({ padding: import_constants.WINDOW_PADDING })
|
|
122
|
-
],
|
|
123
|
-
updateFloatingSize
|
|
124
|
-
] : [
|
|
125
|
-
(0, import_react_dom_interactions.inner)({
|
|
126
|
-
listRef: listItemsRef,
|
|
127
|
-
overflowRef,
|
|
128
|
-
index: selectedIndex,
|
|
129
|
-
offset: innerOffset,
|
|
130
|
-
onFallbackChange: setFallback,
|
|
131
|
-
padding: 10,
|
|
132
|
-
minItemsVisible: touch ? 10 : 4,
|
|
133
|
-
referenceOverflowThreshold: 20
|
|
134
|
-
}),
|
|
135
|
-
updateFloatingSize
|
|
136
|
-
]
|
|
137
|
-
});
|
|
138
|
-
const floatingRef = refs.floating;
|
|
139
|
-
const showUpArrow = open && scrollTop > import_constants.SCROLL_ARROW_THRESHOLD;
|
|
140
|
-
const showDownArrow = open && floatingRef.current && scrollTop < floatingRef.current.scrollHeight - floatingRef.current.clientHeight - import_constants.SCROLL_ARROW_THRESHOLD;
|
|
141
|
-
const interactions = (0, import_react_dom_interactions.useInteractions)([
|
|
142
|
-
(0, import_react_dom_interactions.useClick)(context, { event: "mousedown" }),
|
|
143
|
-
(0, import_react_dom_interactions.useDismiss)(context, { outsidePress: false }),
|
|
144
|
-
(0, import_react_dom_interactions.useRole)(context, { role: "listbox" }),
|
|
145
|
-
(0, import_react_dom_interactions.useInnerOffset)(context, {
|
|
146
|
-
enabled: !fallback,
|
|
147
|
-
onChange: setInnerOffset,
|
|
148
|
-
overflowRef
|
|
149
|
-
}),
|
|
150
|
-
(0, import_react_dom_interactions.useListNavigation)(context, {
|
|
151
|
-
listRef: listItemsRef,
|
|
152
|
-
activeIndex,
|
|
153
|
-
selectedIndex,
|
|
154
|
-
onNavigate: setActiveIndex
|
|
155
|
-
}),
|
|
156
|
-
(0, import_react_dom_interactions.useTypeahead)(context, {
|
|
157
|
-
listRef: listContentRef,
|
|
158
|
-
onMatch: open ? setActiveIndex : setSelectedIndex,
|
|
159
|
-
selectedIndex,
|
|
160
|
-
activeIndex
|
|
161
|
-
})
|
|
162
|
-
]);
|
|
163
|
-
const interactionsContext = {
|
|
164
|
-
...interactions,
|
|
165
|
-
getReferenceProps() {
|
|
166
|
-
return interactions.getReferenceProps({
|
|
167
|
-
ref: reference,
|
|
168
|
-
className: "SelectTrigger",
|
|
169
|
-
onKeyDown(event) {
|
|
170
|
-
if (event.key === "Enter" || event.key === " " && !context.dataRef.current.typing) {
|
|
171
|
-
event.preventDefault();
|
|
172
|
-
setOpen(true);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
},
|
|
177
|
-
getFloatingProps(props2) {
|
|
178
|
-
return interactions.getFloatingProps({
|
|
179
|
-
ref: floating,
|
|
180
|
-
className: "Select",
|
|
181
|
-
...props2,
|
|
182
|
-
style: {
|
|
183
|
-
position: strategy,
|
|
184
|
-
top: y ?? "",
|
|
185
|
-
left: x ?? "",
|
|
186
|
-
outline: 0,
|
|
187
|
-
listStyleType: "none",
|
|
188
|
-
scrollbarWidth: "none",
|
|
189
|
-
...floatingStyle.current,
|
|
190
|
-
...props2 == null ? void 0 : props2.style
|
|
191
|
-
},
|
|
192
|
-
onPointerEnter() {
|
|
193
|
-
setControlledScrolling(false);
|
|
194
|
-
state.current.isMouseOutside = false;
|
|
195
|
-
},
|
|
196
|
-
onPointerLeave() {
|
|
197
|
-
state.current.isMouseOutside = true;
|
|
198
|
-
},
|
|
199
|
-
onPointerMove() {
|
|
200
|
-
state.current.isMouseOutside = false;
|
|
201
|
-
setControlledScrolling(false);
|
|
202
|
-
},
|
|
203
|
-
onKeyDown() {
|
|
204
|
-
setControlledScrolling(true);
|
|
205
|
-
},
|
|
206
|
-
onContextMenu(e) {
|
|
207
|
-
e.preventDefault();
|
|
208
|
-
},
|
|
209
|
-
onScroll(event) {
|
|
210
|
-
(0, import_react_dom.flushSync)(() => setScrollTop(event.currentTarget.scrollTop));
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
(0, import_core.useIsomorphicLayoutEffect)(() => {
|
|
216
|
-
if (open) {
|
|
217
|
-
selectTimeoutRef.current = setTimeout(() => {
|
|
218
|
-
allowSelectRef.current = true;
|
|
219
|
-
}, 300);
|
|
220
|
-
return () => {
|
|
221
|
-
clearTimeout(selectTimeoutRef.current);
|
|
222
|
-
};
|
|
223
|
-
} else {
|
|
224
|
-
allowSelectRef.current = false;
|
|
225
|
-
allowMouseUpRef.current = true;
|
|
226
|
-
setInnerOffset(0);
|
|
227
|
-
setFallback(false);
|
|
228
|
-
setBlockSelection(false);
|
|
229
|
-
}
|
|
230
|
-
}, [open]);
|
|
231
|
-
(0, import_core.useIsomorphicLayoutEffect)(() => {
|
|
232
|
-
function onPointerDown(e) {
|
|
233
|
-
var _a, _b, _c;
|
|
234
|
-
const target = e.target;
|
|
235
|
-
if (!(((_a = refs.floating.current) == null ? void 0 : _a.contains(target)) || ((_b = upArrowRef.current) == null ? void 0 : _b.contains(target)) || ((_c = downArrowRef.current) == null ? void 0 : _c.contains(target)))) {
|
|
236
|
-
setOpen(false);
|
|
237
|
-
setControlledScrolling(false);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
if (open) {
|
|
241
|
-
document.addEventListener("pointerdown", onPointerDown);
|
|
242
|
-
return () => {
|
|
243
|
-
document.removeEventListener("pointerdown", onPointerDown);
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
}, [open, refs, setOpen]);
|
|
247
|
-
(0, import_core.useIsomorphicLayoutEffect)(() => {
|
|
248
|
-
var _a, _b;
|
|
249
|
-
if (open && controlledScrolling) {
|
|
250
|
-
if (activeIndex != null) {
|
|
251
|
-
(_a = listItemsRef.current[activeIndex]) == null ? void 0 : _a.scrollIntoView({ block: "nearest" });
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
setScrollTop(((_b = refs.floating.current) == null ? void 0 : _b.scrollTop) ?? 0);
|
|
255
|
-
}, [open, refs, controlledScrolling, activeIndex]);
|
|
256
|
-
(0, import_core.useIsomorphicLayoutEffect)(() => {
|
|
257
|
-
var _a;
|
|
258
|
-
if (open && fallback) {
|
|
259
|
-
if (selectedIndex != null) {
|
|
260
|
-
(_a = listItemsRef.current[selectedIndex]) == null ? void 0 : _a.scrollIntoView({ block: "nearest" });
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}, [open, fallback, selectedIndex]);
|
|
264
|
-
(0, import_core.useIsomorphicLayoutEffect)(() => {
|
|
265
|
-
if (refs.floating.current && fallback) {
|
|
266
|
-
refs.floating.current.style.maxHeight = "";
|
|
267
|
-
}
|
|
268
|
-
}, [refs, fallback]);
|
|
269
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_context.SelectProvider, {
|
|
270
|
-
scope: __scopeSelect,
|
|
271
|
-
...selectContext,
|
|
272
|
-
setScrollTop,
|
|
273
|
-
setInnerOffset,
|
|
274
|
-
floatingRef,
|
|
275
|
-
setValueAtIndex: (index, value) => {
|
|
276
|
-
listContentRef.current[index] = value;
|
|
277
|
-
},
|
|
278
|
-
fallback,
|
|
279
|
-
interactions: interactionsContext,
|
|
280
|
-
floatingContext: context,
|
|
281
|
-
activeIndex,
|
|
282
|
-
canScrollDown: !!showDownArrow,
|
|
283
|
-
canScrollUp: !!showUpArrow,
|
|
284
|
-
controlledScrolling: true,
|
|
285
|
-
dataRef: context.dataRef,
|
|
286
|
-
listRef: listItemsRef,
|
|
287
|
-
blockSelection,
|
|
288
|
-
allowMouseUpRef,
|
|
289
|
-
upArrowRef,
|
|
290
|
-
downArrowRef,
|
|
291
|
-
selectTimeoutRef,
|
|
292
|
-
allowSelectRef,
|
|
293
|
-
children
|
|
294
|
-
});
|
|
295
|
-
};
|
|
296
|
-
const userAgent = typeof navigator !== "undefined" && navigator.userAgent || "";
|
|
297
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
298
|
-
0 && (module.exports = {
|
|
299
|
-
SelectInlineImpl
|
|
300
|
-
});
|
|
301
|
-
//# sourceMappingURL=SelectImpl.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/SelectImpl.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n SideObject,\n autoUpdate,\n flip,\n inner,\n offset,\n shift,\n size,\n useClick,\n useDismiss,\n useFloating,\n useInnerOffset,\n useInteractions,\n useListNavigation,\n useRole,\n useTypeahead,\n} from '@floating-ui/react-dom-interactions'\nimport { isWeb, useIsTouchDevice, useIsomorphicLayoutEffect } from '@tamagui/core'\nimport * as React from 'react'\nimport { flushSync } from 'react-dom'\n\nimport { SCROLL_ARROW_THRESHOLD, WINDOW_PADDING } from './constants'\nimport { SelectProvider, useSelectContext } from './context'\nimport { SelectImplProps } from './types'\n\n// TODO use id for focusing from label\nexport const SelectInlineImpl = (props: SelectImplProps) => {\n const {\n __scopeSelect,\n children,\n open = false,\n selectedIndexRef,\n listContentRef,\n } = props\n\n const selectContext = useSelectContext('SelectSheetImpl', __scopeSelect)\n const {\n setActiveIndex,\n setOpen,\n setSelectedIndex,\n selectedIndex,\n activeIndex,\n forceUpdate,\n } = selectContext\n const [scrollTop, setScrollTop] = React.useState(0)\n const touch = useIsTouchDevice()\n\n const listItemsRef = React.useRef<Array<HTMLElement | null>>([])\n const overflowRef = React.useRef<null | SideObject>(null)\n const upArrowRef = React.useRef<HTMLDivElement | null>(null)\n const downArrowRef = React.useRef<HTMLDivElement | null>(null)\n const allowSelectRef = React.useRef(false)\n const allowMouseUpRef = React.useRef(true)\n const selectTimeoutRef = React.useRef<any>()\n const state = React.useRef({\n isMouseOutside: false,\n })\n\n const [controlledScrolling, setControlledScrolling] = React.useState(false)\n const [fallback, setFallback] = React.useState(false)\n const [innerOffset, setInnerOffset] = React.useState(0)\n const [blockSelection, setBlockSelection] = React.useState(false)\n const floatingStyle = React.useRef({})\n\n // Wait for scroll position to settle before showing arrows to prevent\n // interference with pointer events.\n React.useEffect(() => {\n const frame = requestAnimationFrame(() => {\n if (!open) {\n setScrollTop(0)\n setFallback(false)\n setActiveIndex(null)\n setControlledScrolling(false)\n }\n })\n return () => {\n cancelAnimationFrame(frame)\n }\n }, [open, setActiveIndex])\n\n // close when mouseup outside select\n if (isWeb) {\n React.useEffect(() => {\n if (!open) return\n const mouseUp = (e: MouseEvent) => {\n if (state.current.isMouseOutside) {\n setOpen(false)\n }\n }\n document.addEventListener('mouseup', mouseUp)\n return () => {\n document.removeEventListener('mouseup', mouseUp)\n }\n }, [open])\n }\n\n const updateFloatingSize = size({\n apply({\n availableHeight,\n rects: {\n reference: { width },\n },\n }) {\n floatingStyle.current = {\n width: width,\n maxHeight: availableHeight,\n }\n },\n padding: WINDOW_PADDING,\n })\n\n const { x, y, reference, floating, strategy, context, refs } = useFloating({\n open,\n onOpenChange: setOpen,\n whileElementsMounted: autoUpdate,\n placement: 'bottom-start',\n middleware: fallback\n ? [\n offset(5),\n ...[\n touch\n ? shift({ crossAxis: true, padding: WINDOW_PADDING })\n : flip({ padding: WINDOW_PADDING }),\n ],\n updateFloatingSize,\n ]\n : [\n inner({\n listRef: listItemsRef,\n overflowRef,\n index: selectedIndex,\n offset: innerOffset,\n onFallbackChange: setFallback,\n padding: 10,\n minItemsVisible: touch ? 10 : 4,\n referenceOverflowThreshold: 20,\n }),\n updateFloatingSize,\n ],\n })\n\n const floatingRef = refs.floating\n\n const showUpArrow = open && scrollTop > SCROLL_ARROW_THRESHOLD\n const showDownArrow =\n open &&\n floatingRef.current &&\n scrollTop <\n floatingRef.current.scrollHeight -\n floatingRef.current.clientHeight -\n SCROLL_ARROW_THRESHOLD\n\n const interactions = useInteractions([\n useClick(context, { event: 'mousedown' }),\n useDismiss(context, { outsidePress: false }),\n useRole(context, { role: 'listbox' }),\n useInnerOffset(context, {\n enabled: !fallback,\n onChange: setInnerOffset,\n overflowRef,\n }),\n useListNavigation(context, {\n listRef: listItemsRef,\n activeIndex,\n selectedIndex,\n onNavigate: setActiveIndex,\n }),\n useTypeahead(context, {\n listRef: listContentRef,\n onMatch: open ? setActiveIndex : setSelectedIndex,\n selectedIndex,\n activeIndex,\n }),\n ])\n\n const interactionsContext = {\n ...interactions,\n getReferenceProps() {\n return interactions.getReferenceProps({\n ref: reference,\n className: 'SelectTrigger',\n onKeyDown(event) {\n if (\n event.key === 'Enter' ||\n (event.key === ' ' && !context.dataRef.current.typing)\n ) {\n event.preventDefault()\n setOpen(true)\n }\n },\n })\n },\n getFloatingProps(props) {\n return interactions.getFloatingProps({\n ref: floating,\n className: 'Select',\n ...props,\n style: {\n position: strategy,\n top: y ?? '',\n left: x ?? '',\n outline: 0,\n listStyleType: 'none',\n scrollbarWidth: 'none',\n ...floatingStyle.current,\n ...props?.style,\n },\n onPointerEnter() {\n setControlledScrolling(false)\n state.current.isMouseOutside = false\n },\n onPointerLeave() {\n state.current.isMouseOutside = true\n },\n onPointerMove() {\n state.current.isMouseOutside = false\n setControlledScrolling(false)\n },\n onKeyDown() {\n setControlledScrolling(true)\n },\n onContextMenu(e) {\n e.preventDefault()\n },\n onScroll(event) {\n // In React 18, the ScrollArrows need to synchronously know this value to prevent\n // painting at the wrong time.\n flushSync(() => setScrollTop(event.currentTarget.scrollTop))\n },\n })\n },\n }\n\n // effects\n\n useIsomorphicLayoutEffect(() => {\n if (open) {\n selectTimeoutRef.current = setTimeout(() => {\n allowSelectRef.current = true\n }, 300)\n\n return () => {\n clearTimeout(selectTimeoutRef.current)\n }\n } else {\n allowSelectRef.current = false\n allowMouseUpRef.current = true\n setInnerOffset(0)\n setFallback(false)\n setBlockSelection(false)\n }\n }, [open])\n\n // Replacement for `useDismiss` as the arrows are outside of the floating\n // element DOM tree.\n useIsomorphicLayoutEffect(() => {\n function onPointerDown(e: PointerEvent) {\n const target = e.target as Node\n if (\n !(\n refs.floating.current?.contains(target) ||\n upArrowRef.current?.contains(target) ||\n downArrowRef.current?.contains(target)\n )\n ) {\n setOpen(false)\n setControlledScrolling(false)\n }\n }\n\n if (open) {\n document.addEventListener('pointerdown', onPointerDown)\n return () => {\n document.removeEventListener('pointerdown', onPointerDown)\n }\n }\n }, [open, refs, setOpen])\n\n // Scroll the `activeIndex` item into view only in \"controlledScrolling\"\n // (keyboard nav) mode.\n useIsomorphicLayoutEffect(() => {\n if (open && controlledScrolling) {\n if (activeIndex != null) {\n listItemsRef.current[activeIndex]?.scrollIntoView({ block: 'nearest' })\n }\n }\n\n setScrollTop(refs.floating.current?.scrollTop ?? 0)\n }, [open, refs, controlledScrolling, activeIndex])\n\n // Scroll the `selectedIndex` into view upon opening the floating element.\n useIsomorphicLayoutEffect(() => {\n if (open && fallback) {\n if (selectedIndex != null) {\n listItemsRef.current[selectedIndex]?.scrollIntoView({ block: 'nearest' })\n }\n }\n }, [open, fallback, selectedIndex])\n\n // Unset the height limiting for fallback mode. This gets executed prior to\n // the positioning call.\n useIsomorphicLayoutEffect(() => {\n if (refs.floating.current && fallback) {\n refs.floating.current.style.maxHeight = ''\n }\n }, [refs, fallback])\n\n // We set this to true by default so that events bubble to forms without JS (SSR)\n // const isFormControl = trigger ? Boolean(trigger.closest('form')) : true\n // const [bubbleSelect, setBubbleSelect] = React.useState<HTMLSelectElement | null>(null)\n // const triggerPointerDownPosRef = React.useRef<{ x: number; y: number } | null>(null)\n\n return (\n <SelectProvider\n scope={__scopeSelect}\n {...(selectContext as Required<typeof selectContext>)}\n setScrollTop={setScrollTop}\n setInnerOffset={setInnerOffset}\n floatingRef={floatingRef}\n setValueAtIndex={(index, value) => {\n listContentRef.current[index] = value\n }}\n fallback={fallback}\n interactions={interactionsContext}\n floatingContext={context}\n activeIndex={activeIndex}\n canScrollDown={!!showDownArrow}\n canScrollUp={!!showUpArrow}\n controlledScrolling\n dataRef={context.dataRef}\n listRef={listItemsRef}\n blockSelection={blockSelection}\n allowMouseUpRef={allowMouseUpRef}\n upArrowRef={upArrowRef}\n downArrowRef={downArrowRef}\n selectTimeoutRef={selectTimeoutRef}\n allowSelectRef={allowSelectRef}\n >\n {children}\n {/* {isFormControl ? (\n <BubbleSelect\n ref={setBubbleSelect}\n aria-hidden\n tabIndex={-1}\n name={name}\n autoComplete={autoComplete}\n value={value}\n // enable form autofill\n onChange={(event) => setValue(event.target.value)}\n />\n ) : null} */}\n </SelectProvider>\n )\n}\n\n// Cross browser fixes for pinch-zooming/backdrop-filter \uD83D\uDE44\nconst userAgent = (typeof navigator !== 'undefined' && navigator.userAgent) || ''\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyTI;AAzTJ,oCAgBO;AACP,kBAAmE;AACnE,YAAuB;AACvB,uBAA0B;AAE1B,uBAAuD;AACvD,qBAAiD;AAI1C,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,QAAQ,iBAArB,mBAAmC,eAAe,EAAE,OAAO,UAAU;AAAA,MACvE;AAAA,IACF;AAEA,mBAAa,UAAK,SAAS,YAAd,mBAAuB,cAAa,CAAC;AAAA,EACpD,GAAG,CAAC,MAAM,MAAM,qBAAqB,WAAW,CAAC;AAGjD,6CAA0B,MAAM;AAnSlC;AAoSI,QAAI,QAAQ,UAAU;AACpB,UAAI,iBAAiB,MAAM;AACzB,2BAAa,QAAQ,mBAArB,mBAAqC,eAAe,EAAE,OAAO,UAAU;AAAA,MACzE;AAAA,IACF;AAAA,EACF,GAAG,CAAC,MAAM,UAAU,aAAa,CAAC;AAIlC,6CAA0B,MAAM;AAC9B,QAAI,KAAK,SAAS,WAAW,UAAU;AACrC,WAAK,SAAS,QAAQ,MAAM,YAAY;AAAA,IAC1C;AAAA,EACF,GAAG,CAAC,MAAM,QAAQ,CAAC;AAOnB,SACE,4CAAC;AAAA,IACC,OAAO;AAAA,IACN,GAAI;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB,CAAC,OAAO,UAAU;AACjC,qBAAe,QAAQ,SAAS;AAAA,IAClC;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB;AAAA,IACA,eAAe,CAAC,CAAC;AAAA,IACjB,aAAa,CAAC,CAAC;AAAA,IACf,qBAAmB;AAAA,IACnB,SAAS,QAAQ;AAAA,IACjB,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEC;AAAA,GAaH;AAEJ;AAGA,MAAM,YAAa,OAAO,cAAc,eAAe,UAAU,aAAc;",
|
|
6
|
-
"names": ["props"]
|
|
7
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var SelectImpl_native_exports = {};
|
|
20
|
-
__export(SelectImpl_native_exports, {
|
|
21
|
-
SelectInlineImpl: () => SelectInlineImpl
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(SelectImpl_native_exports);
|
|
24
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
-
const SelectInlineImpl = (props) => {
|
|
26
|
-
if (process.env.NODE_ENV === "development") {
|
|
27
|
-
console.warn("Sheet not implemented inline on native");
|
|
28
|
-
}
|
|
29
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
30
|
-
children: props.children
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
-
0 && (module.exports = {
|
|
35
|
-
SelectInlineImpl
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=SelectImpl.native.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/SelectImpl.native.tsx"],
|
|
4
|
-
"sourcesContent": ["import { SelectImplProps } from './types'\n\n/**\n * TODO can just make it a sheet for native\n * later on can have `native` prop\n */\n\nexport const SelectInlineImpl = (props: SelectImplProps) => {\n if (process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.warn('Sheet not implemented inline on native')\n }\n return <>{props.children}</>\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYS;AALF,MAAM,mBAAmB,CAAC,UAA2B;AAC1D,MAAI,QAAQ,IAAI,aAAa,eAAe;AAE1C,YAAQ,KAAK,wCAAwC;AAAA,EACvD;AACA,SAAO;AAAA,IAAG,gBAAM;AAAA,GAAS;AAC3B;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|