@tamagui/select 1.14.1 → 1.14.2
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/BubbleSelect.js +47 -1
- package/dist/cjs/BubbleSelect.js.map +2 -2
- package/dist/cjs/Select.js +494 -1
- package/dist/cjs/Select.js.map +2 -2
- package/dist/cjs/SelectContent.js +54 -1
- package/dist/cjs/SelectContent.js.map +2 -2
- package/dist/cjs/SelectContent.native.js +30 -1
- package/dist/cjs/SelectContent.native.js.map +2 -2
- package/dist/cjs/SelectImpl.js +308 -1
- package/dist/cjs/SelectImpl.js.map +2 -2
- package/dist/cjs/SelectImpl.native.js +34 -1
- package/dist/cjs/SelectImpl.native.js.map +2 -2
- package/dist/cjs/SelectScrollButton.js +175 -1
- package/dist/cjs/SelectScrollButton.js.map +2 -2
- package/dist/cjs/SelectScrollButton.native.js +31 -1
- package/dist/cjs/SelectScrollButton.native.js.map +2 -2
- package/dist/cjs/SelectViewport.js +115 -2
- package/dist/cjs/SelectViewport.js.map +2 -2
- package/dist/cjs/SelectViewport.native.js +52 -1
- package/dist/cjs/SelectViewport.native.js.map +2 -2
- package/dist/cjs/constants.js +46 -1
- package/dist/cjs/constants.js.map +2 -2
- package/dist/cjs/context.js +43 -1
- package/dist/cjs/context.js.map +2 -2
- package/dist/cjs/index.js +19 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/types.js +16 -1
- package/dist/cjs/types.js.map +2 -2
- package/dist/cjs/useSelectBreakpointActive.js +42 -1
- package/dist/cjs/useSelectBreakpointActive.js.map +2 -2
- package/dist/esm/BubbleSelect.js +24 -1
- package/dist/esm/BubbleSelect.js.map +2 -2
- package/dist/esm/BubbleSelect.mjs +24 -1
- package/dist/esm/BubbleSelect.mjs.map +2 -2
- package/dist/esm/Select.js +464 -1
- package/dist/esm/Select.js.map +2 -2
- package/dist/esm/Select.mjs +464 -1
- package/dist/esm/Select.mjs.map +2 -2
- package/dist/esm/SelectContent.js +30 -1
- package/dist/esm/SelectContent.js.map +2 -2
- package/dist/esm/SelectContent.mjs +30 -1
- package/dist/esm/SelectContent.mjs.map +2 -2
- package/dist/esm/SelectContent.native.js +6 -1
- package/dist/esm/SelectContent.native.js.map +2 -2
- package/dist/esm/SelectContent.native.mjs +6 -1
- package/dist/esm/SelectContent.native.mjs.map +2 -2
- package/dist/esm/SelectImpl.js +294 -1
- package/dist/esm/SelectImpl.js.map +2 -2
- package/dist/esm/SelectImpl.mjs +294 -1
- package/dist/esm/SelectImpl.mjs.map +2 -2
- package/dist/esm/SelectImpl.native.js +10 -1
- package/dist/esm/SelectImpl.native.js.map +2 -2
- package/dist/esm/SelectImpl.native.mjs +10 -1
- package/dist/esm/SelectImpl.native.mjs.map +2 -2
- package/dist/esm/SelectScrollButton.js +140 -1
- package/dist/esm/SelectScrollButton.js.map +2 -2
- package/dist/esm/SelectScrollButton.mjs +140 -1
- package/dist/esm/SelectScrollButton.mjs.map +2 -2
- package/dist/esm/SelectScrollButton.native.js +6 -1
- package/dist/esm/SelectScrollButton.native.js.map +2 -2
- package/dist/esm/SelectScrollButton.native.mjs +6 -1
- package/dist/esm/SelectScrollButton.native.mjs.map +2 -2
- package/dist/esm/SelectViewport.js +80 -2
- package/dist/esm/SelectViewport.js.map +2 -2
- package/dist/esm/SelectViewport.mjs +80 -2
- package/dist/esm/SelectViewport.mjs.map +2 -2
- package/dist/esm/SelectViewport.native.js +18 -1
- package/dist/esm/SelectViewport.native.js.map +2 -2
- package/dist/esm/SelectViewport.native.mjs +18 -1
- package/dist/esm/SelectViewport.native.mjs.map +2 -2
- package/dist/esm/constants.js +16 -1
- package/dist/esm/constants.js.map +2 -2
- package/dist/esm/constants.mjs +16 -1
- package/dist/esm/constants.mjs.map +2 -2
- package/dist/esm/context.js +15 -1
- package/dist/esm/context.js.map +2 -2
- package/dist/esm/context.mjs +15 -1
- package/dist/esm/context.mjs.map +2 -2
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/useSelectBreakpointActive.js +17 -1
- package/dist/esm/useSelectBreakpointActive.js.map +2 -2
- package/dist/esm/useSelectBreakpointActive.mjs +17 -1
- package/dist/esm/useSelectBreakpointActive.mjs.map +2 -2
- package/dist/jsx/BubbleSelect.js +24 -1
- package/dist/jsx/BubbleSelect.js.map +2 -2
- package/dist/jsx/BubbleSelect.mjs +24 -1
- package/dist/jsx/BubbleSelect.mjs.map +2 -2
- package/dist/jsx/Select.js +428 -1
- package/dist/jsx/Select.js.map +2 -2
- package/dist/jsx/Select.mjs +428 -1
- package/dist/jsx/Select.mjs.map +2 -2
- package/dist/jsx/SelectContent.js +29 -1
- package/dist/jsx/SelectContent.js.map +2 -2
- package/dist/jsx/SelectContent.mjs +29 -1
- package/dist/jsx/SelectContent.mjs.map +2 -2
- package/dist/jsx/SelectContent.native.js +6 -1
- package/dist/jsx/SelectContent.native.js.map +2 -2
- package/dist/jsx/SelectContent.native.mjs +6 -1
- package/dist/jsx/SelectContent.native.mjs.map +2 -2
- package/dist/jsx/SelectImpl.js +286 -1
- package/dist/jsx/SelectImpl.js.map +2 -2
- package/dist/jsx/SelectImpl.mjs +286 -1
- package/dist/jsx/SelectImpl.mjs.map +2 -2
- package/dist/jsx/SelectImpl.native.js +9 -1
- package/dist/jsx/SelectImpl.native.js.map +2 -2
- package/dist/jsx/SelectImpl.native.mjs +9 -1
- package/dist/jsx/SelectImpl.native.mjs.map +2 -2
- package/dist/jsx/SelectScrollButton.js +126 -1
- package/dist/jsx/SelectScrollButton.js.map +2 -2
- package/dist/jsx/SelectScrollButton.mjs +126 -1
- package/dist/jsx/SelectScrollButton.mjs.map +2 -2
- package/dist/jsx/SelectScrollButton.native.js +6 -1
- package/dist/jsx/SelectScrollButton.native.js.map +2 -2
- package/dist/jsx/SelectScrollButton.native.mjs +6 -1
- package/dist/jsx/SelectScrollButton.native.mjs.map +2 -2
- package/dist/jsx/SelectViewport.js +72 -2
- package/dist/jsx/SelectViewport.js.map +2 -2
- package/dist/jsx/SelectViewport.mjs +72 -2
- package/dist/jsx/SelectViewport.mjs.map +2 -2
- package/dist/jsx/SelectViewport.native.js +17 -1
- package/dist/jsx/SelectViewport.native.js.map +2 -2
- package/dist/jsx/SelectViewport.native.mjs +17 -1
- package/dist/jsx/SelectViewport.native.mjs.map +2 -2
- package/dist/jsx/constants.js +16 -1
- package/dist/jsx/constants.js.map +2 -2
- package/dist/jsx/constants.mjs +16 -1
- package/dist/jsx/constants.mjs.map +2 -2
- package/dist/jsx/context.js +14 -1
- package/dist/jsx/context.js.map +2 -2
- package/dist/jsx/context.mjs +14 -1
- package/dist/jsx/context.mjs.map +2 -2
- package/dist/jsx/index.js +2 -1
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +2 -1
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/useSelectBreakpointActive.js +17 -1
- package/dist/jsx/useSelectBreakpointActive.js.map +2 -2
- package/dist/jsx/useSelectBreakpointActive.mjs +17 -1
- package/dist/jsx/useSelectBreakpointActive.mjs.map +2 -2
- package/package.json +16 -16
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SelectContent.tsx"],
|
|
4
4
|
"sourcesContent": ["import { FloatingOverlay, FloatingPortal } from '@floating-ui/react'\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 = (\n <Theme forceClassName name={themeName}>\n {children}\n </Theme>\n )\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": "AAyBI,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAyBI,SAUO,UAVP;AAzBJ,SAAS,iBAAiB,sBAAsB;AAChD,SAAS,OAAO,kBAAkB,oBAAoB;AACtD,SAAS,mBAAmB;AAC5B,SAAS,kBAAmC;AAE5C,SAAS,wBAAwB;AAEjC,SAAS,0BAA0B;AAMnC,MAAM,eAAe;AAEd,MAAM,gBAAgB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT,GAAG;AACL,MAA4C;AAC1C,QAAM,UAAU,iBAAiB,cAAc,aAAa;AAC5D,QAAM,YAAY,aAAa;AAC/B,QAAM,YAAY,mBAAmB,OAAO;AAC5C,QAAM,WACJ,oBAAC,SAAM,gBAAc,MAAC,MAAM,WACzB,UACH;AAEF,QAAM,QAAQ,iBAAiB;AAE/B,MAAI,WAAW;AACb,QAAI,CAAC,QAAQ,MAAM;AACjB,aAAO;AAAA,IACT;AACA,WAAO,gCAAG,oBAAS;AAAA,EACrB;AAEA,SACE,oBAAC,kBACE,kBAAQ,OACP,oBAAC,mBAAgB,OAAO,EAAE,OAAO,GAAG,YAAY,CAAC,OAC/C,8BAAC,cAAW,MAAI,MAAC,SAAO,MAAE,GAAG,iBAC3B,8BAAC,eAAa,oBAAS,GACzB,GACF,IAEA,oBAAC,SAAI,OAAO,EAAE,SAAS,OAAO,GAAI,oBAAS,GAE/C;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,31 @@
|
|
|
1
|
-
import{Fragment
|
|
1
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { FloatingOverlay, FloatingPortal } from "@floating-ui/react";
|
|
3
|
+
import { Theme, useIsTouchDevice, useThemeName } from "@tamagui/core";
|
|
4
|
+
import { Dismissable } from "@tamagui/dismissable";
|
|
5
|
+
import { FocusScope } from "@tamagui/focus-scope";
|
|
6
|
+
import { useSelectContext } from "./context";
|
|
7
|
+
import { useShowSelectSheet } from "./useSelectBreakpointActive";
|
|
8
|
+
const CONTENT_NAME = "SelectContent";
|
|
9
|
+
const SelectContent = ({
|
|
10
|
+
children,
|
|
11
|
+
__scopeSelect,
|
|
12
|
+
zIndex = 1e3,
|
|
13
|
+
...focusScopeProps
|
|
14
|
+
}) => {
|
|
15
|
+
const context = useSelectContext(CONTENT_NAME, __scopeSelect);
|
|
16
|
+
const themeName = useThemeName();
|
|
17
|
+
const showSheet = useShowSelectSheet(context);
|
|
18
|
+
const contents = /* @__PURE__ */ jsx(Theme, { forceClassName: true, name: themeName, children });
|
|
19
|
+
const touch = useIsTouchDevice();
|
|
20
|
+
if (showSheet) {
|
|
21
|
+
if (!context.open) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return /* @__PURE__ */ jsx(Fragment, { children: contents });
|
|
25
|
+
}
|
|
26
|
+
return /* @__PURE__ */ jsx(FloatingPortal, { children: context.open ? /* @__PURE__ */ jsx(FloatingOverlay, { style: { zIndex }, lockScroll: !touch, children: /* @__PURE__ */ jsx(FocusScope, { loop: true, trapped: true, ...focusScopeProps, children: /* @__PURE__ */ jsx(Dismissable, { children: contents }) }) }) : /* @__PURE__ */ jsx("div", { style: { display: "none" }, children: contents }) });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
SelectContent
|
|
30
|
+
};
|
|
2
31
|
//# sourceMappingURL=SelectContent.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SelectContent.tsx"],
|
|
4
4
|
"sourcesContent": ["import { FloatingOverlay, FloatingPortal } from '@floating-ui/react'\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 = (\n <Theme forceClassName name={themeName}>\n {children}\n </Theme>\n )\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": "AAyBI,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAyBI,SAUO,UAVP;AAzBJ,SAAS,iBAAiB,sBAAsB;AAChD,SAAS,OAAO,kBAAkB,oBAAoB;AACtD,SAAS,mBAAmB;AAC5B,SAAS,kBAAmC;AAE5C,SAAS,wBAAwB;AAEjC,SAAS,0BAA0B;AAMnC,MAAM,eAAe;AAEd,MAAM,gBAAgB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT,GAAG;AACL,MAA4C;AAC1C,QAAM,UAAU,iBAAiB,cAAc,aAAa;AAC5D,QAAM,YAAY,aAAa;AAC/B,QAAM,YAAY,mBAAmB,OAAO;AAC5C,QAAM,WACJ,oBAAC,SAAM,gBAAc,MAAC,MAAM,WACzB,UACH;AAEF,QAAM,QAAQ,iBAAiB;AAE/B,MAAI,WAAW;AACb,QAAI,CAAC,QAAQ,MAAM;AACjB,aAAO;AAAA,IACT;AACA,WAAO,gCAAG,oBAAS;AAAA,EACrB;AAEA,SACE,oBAAC,kBACE,kBAAQ,OACP,oBAAC,mBAAgB,OAAO,EAAE,OAAO,GAAG,YAAY,CAAC,OAC/C,8BAAC,cAAW,MAAI,MAAC,SAAO,MAAE,GAAG,iBAC3B,8BAAC,eAAa,oBAAS,GACzB,GACF,IAEA,oBAAC,SAAI,OAAO,EAAE,SAAS,OAAO,GAAI,oBAAS,GAE/C;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SelectContent.native.tsx"],
|
|
4
4
|
"sourcesContent": ["import { SelectContentProps } from './types'\n\nexport const SelectContent = ({ children }: SelectContentProps) => {\n return children\n}\n"],
|
|
5
|
-
"mappings": "AAEO,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAEO,MAAM,gBAAgB,CAAC,EAAE,SAAS,MAA0B;AACjE,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SelectContent.native.tsx"],
|
|
4
4
|
"sourcesContent": ["import { SelectContentProps } from './types'\n\nexport const SelectContent = ({ children }: SelectContentProps) => {\n return children\n}\n"],
|
|
5
|
-
"mappings": "AAEO,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAEO,MAAM,gBAAgB,CAAC,EAAE,SAAS,MAA0B;AACjE,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/esm/SelectImpl.js
CHANGED
|
@@ -1,2 +1,295 @@
|
|
|
1
|
-
import{jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import {
|
|
3
|
+
autoUpdate,
|
|
4
|
+
flip,
|
|
5
|
+
inner,
|
|
6
|
+
offset,
|
|
7
|
+
shift,
|
|
8
|
+
size,
|
|
9
|
+
useClick,
|
|
10
|
+
useDismiss,
|
|
11
|
+
useFloating,
|
|
12
|
+
useInnerOffset,
|
|
13
|
+
useInteractions,
|
|
14
|
+
useListNavigation,
|
|
15
|
+
useRole,
|
|
16
|
+
useTypeahead
|
|
17
|
+
} from "@floating-ui/react";
|
|
18
|
+
import {
|
|
19
|
+
isClient,
|
|
20
|
+
isWeb,
|
|
21
|
+
useIsTouchDevice,
|
|
22
|
+
useIsomorphicLayoutEffect
|
|
23
|
+
} from "@tamagui/core";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import { flushSync } from "react-dom";
|
|
26
|
+
import { SCROLL_ARROW_THRESHOLD, WINDOW_PADDING } from "./constants";
|
|
27
|
+
import { SelectProvider, useSelectContext } from "./context";
|
|
28
|
+
const SelectInlineImpl = (props) => {
|
|
29
|
+
const {
|
|
30
|
+
__scopeSelect,
|
|
31
|
+
children,
|
|
32
|
+
open = false,
|
|
33
|
+
selectedIndexRef,
|
|
34
|
+
listContentRef
|
|
35
|
+
} = props;
|
|
36
|
+
const selectContext = useSelectContext("SelectSheetImpl", __scopeSelect);
|
|
37
|
+
const {
|
|
38
|
+
setActiveIndex,
|
|
39
|
+
setOpen,
|
|
40
|
+
setSelectedIndex,
|
|
41
|
+
selectedIndex,
|
|
42
|
+
activeIndex,
|
|
43
|
+
forceUpdate
|
|
44
|
+
} = selectContext;
|
|
45
|
+
const [scrollTop, setScrollTop] = React.useState(0);
|
|
46
|
+
const touch = useIsTouchDevice();
|
|
47
|
+
const listItemsRef = React.useRef([]);
|
|
48
|
+
const overflowRef = React.useRef(null);
|
|
49
|
+
const upArrowRef = React.useRef(null);
|
|
50
|
+
const downArrowRef = React.useRef(null);
|
|
51
|
+
const allowSelectRef = React.useRef(false);
|
|
52
|
+
const allowMouseUpRef = React.useRef(true);
|
|
53
|
+
const selectTimeoutRef = React.useRef();
|
|
54
|
+
const state = React.useRef({
|
|
55
|
+
isMouseOutside: false
|
|
56
|
+
});
|
|
57
|
+
const [controlledScrolling, setControlledScrolling] = React.useState(false);
|
|
58
|
+
const [fallback, setFallback] = React.useState(false);
|
|
59
|
+
const [innerOffset, setInnerOffset] = React.useState(0);
|
|
60
|
+
const [blockSelection, setBlockSelection] = React.useState(false);
|
|
61
|
+
const floatingStyle = React.useRef({});
|
|
62
|
+
React.useEffect(() => {
|
|
63
|
+
const frame = requestAnimationFrame(() => {
|
|
64
|
+
if (!open) {
|
|
65
|
+
setScrollTop(0);
|
|
66
|
+
setFallback(false);
|
|
67
|
+
setActiveIndex(null);
|
|
68
|
+
setControlledScrolling(false);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
return () => {
|
|
72
|
+
cancelAnimationFrame(frame);
|
|
73
|
+
};
|
|
74
|
+
}, [open, setActiveIndex]);
|
|
75
|
+
if (isWeb && isClient) {
|
|
76
|
+
React.useEffect(() => {
|
|
77
|
+
if (!open)
|
|
78
|
+
return;
|
|
79
|
+
const mouseUp = (e) => {
|
|
80
|
+
if (state.current.isMouseOutside) {
|
|
81
|
+
setOpen(false);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
document.addEventListener("mouseup", mouseUp);
|
|
85
|
+
return () => {
|
|
86
|
+
document.removeEventListener("mouseup", mouseUp);
|
|
87
|
+
};
|
|
88
|
+
}, [open]);
|
|
89
|
+
}
|
|
90
|
+
const updateFloatingSize = size({
|
|
91
|
+
apply({
|
|
92
|
+
availableHeight,
|
|
93
|
+
rects: {
|
|
94
|
+
reference: { width }
|
|
95
|
+
}
|
|
96
|
+
}) {
|
|
97
|
+
floatingStyle.current = {
|
|
98
|
+
width,
|
|
99
|
+
maxHeight: availableHeight
|
|
100
|
+
};
|
|
101
|
+
},
|
|
102
|
+
padding: WINDOW_PADDING
|
|
103
|
+
});
|
|
104
|
+
const { x, y, reference, floating, strategy, context, refs } = useFloating({
|
|
105
|
+
open,
|
|
106
|
+
onOpenChange: setOpen,
|
|
107
|
+
whileElementsMounted: autoUpdate,
|
|
108
|
+
placement: "bottom-start",
|
|
109
|
+
middleware: fallback ? [
|
|
110
|
+
offset(5),
|
|
111
|
+
...[
|
|
112
|
+
touch ? shift({ crossAxis: true, padding: WINDOW_PADDING }) : flip({ padding: WINDOW_PADDING })
|
|
113
|
+
],
|
|
114
|
+
updateFloatingSize
|
|
115
|
+
] : [
|
|
116
|
+
inner({
|
|
117
|
+
listRef: listItemsRef,
|
|
118
|
+
overflowRef,
|
|
119
|
+
index: selectedIndex,
|
|
120
|
+
offset: innerOffset,
|
|
121
|
+
onFallbackChange: setFallback,
|
|
122
|
+
padding: 10,
|
|
123
|
+
minItemsVisible: touch ? 10 : 4,
|
|
124
|
+
referenceOverflowThreshold: 20
|
|
125
|
+
}),
|
|
126
|
+
updateFloatingSize
|
|
127
|
+
]
|
|
128
|
+
});
|
|
129
|
+
const floatingRef = refs.floating;
|
|
130
|
+
const showUpArrow = open && scrollTop > SCROLL_ARROW_THRESHOLD;
|
|
131
|
+
const showDownArrow = open && floatingRef.current && scrollTop < floatingRef.current.scrollHeight - floatingRef.current.clientHeight - SCROLL_ARROW_THRESHOLD;
|
|
132
|
+
const interactions = useInteractions([
|
|
133
|
+
useClick(context, { event: "mousedown" }),
|
|
134
|
+
useDismiss(context, { outsidePress: true }),
|
|
135
|
+
useRole(context, { role: "listbox" }),
|
|
136
|
+
useInnerOffset(context, {
|
|
137
|
+
enabled: !fallback,
|
|
138
|
+
onChange: setInnerOffset,
|
|
139
|
+
overflowRef
|
|
140
|
+
}),
|
|
141
|
+
useListNavigation(context, {
|
|
142
|
+
listRef: listItemsRef,
|
|
143
|
+
activeIndex,
|
|
144
|
+
selectedIndex,
|
|
145
|
+
onNavigate: setActiveIndex
|
|
146
|
+
}),
|
|
147
|
+
useTypeahead(context, {
|
|
148
|
+
listRef: listContentRef,
|
|
149
|
+
onMatch: open ? setActiveIndex : setSelectedIndex,
|
|
150
|
+
selectedIndex,
|
|
151
|
+
activeIndex
|
|
152
|
+
})
|
|
153
|
+
]);
|
|
154
|
+
const interactionsContext = React.useMemo(() => {
|
|
155
|
+
return {
|
|
156
|
+
...interactions,
|
|
157
|
+
getReferenceProps() {
|
|
158
|
+
return interactions.getReferenceProps({
|
|
159
|
+
ref: reference,
|
|
160
|
+
className: "SelectTrigger",
|
|
161
|
+
onKeyDown(event) {
|
|
162
|
+
if (event.key === "Enter" || event.key === " " && !context.dataRef.current.typing) {
|
|
163
|
+
event.preventDefault();
|
|
164
|
+
setOpen(true);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
},
|
|
169
|
+
getFloatingProps(props2) {
|
|
170
|
+
return interactions.getFloatingProps({
|
|
171
|
+
ref: floating,
|
|
172
|
+
className: "Select",
|
|
173
|
+
...props2,
|
|
174
|
+
style: {
|
|
175
|
+
position: strategy,
|
|
176
|
+
top: y ?? "",
|
|
177
|
+
left: x ?? "",
|
|
178
|
+
outline: 0,
|
|
179
|
+
scrollbarWidth: "none",
|
|
180
|
+
...floatingStyle.current,
|
|
181
|
+
...props2 == null ? void 0 : props2.style
|
|
182
|
+
},
|
|
183
|
+
onPointerEnter() {
|
|
184
|
+
setControlledScrolling(false);
|
|
185
|
+
state.current.isMouseOutside = false;
|
|
186
|
+
},
|
|
187
|
+
onPointerLeave() {
|
|
188
|
+
state.current.isMouseOutside = true;
|
|
189
|
+
},
|
|
190
|
+
onPointerMove() {
|
|
191
|
+
state.current.isMouseOutside = false;
|
|
192
|
+
setControlledScrolling(false);
|
|
193
|
+
},
|
|
194
|
+
onKeyDown() {
|
|
195
|
+
setControlledScrolling(true);
|
|
196
|
+
},
|
|
197
|
+
onContextMenu(e) {
|
|
198
|
+
e.preventDefault();
|
|
199
|
+
},
|
|
200
|
+
onScroll(event) {
|
|
201
|
+
flushSync(() => setScrollTop(event.currentTarget.scrollTop));
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
}, [floating, y, x, interactions]);
|
|
207
|
+
useIsomorphicLayoutEffect(() => {
|
|
208
|
+
if (open) {
|
|
209
|
+
selectTimeoutRef.current = setTimeout(() => {
|
|
210
|
+
allowSelectRef.current = true;
|
|
211
|
+
}, 300);
|
|
212
|
+
return () => {
|
|
213
|
+
clearTimeout(selectTimeoutRef.current);
|
|
214
|
+
};
|
|
215
|
+
} else {
|
|
216
|
+
allowSelectRef.current = false;
|
|
217
|
+
allowMouseUpRef.current = true;
|
|
218
|
+
setInnerOffset(0);
|
|
219
|
+
setFallback(false);
|
|
220
|
+
setBlockSelection(false);
|
|
221
|
+
}
|
|
222
|
+
}, [open]);
|
|
223
|
+
useIsomorphicLayoutEffect(() => {
|
|
224
|
+
function onPointerDown(e) {
|
|
225
|
+
var _a, _b, _c;
|
|
226
|
+
const target = e.target;
|
|
227
|
+
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)))) {
|
|
228
|
+
setOpen(false);
|
|
229
|
+
setControlledScrolling(false);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (open) {
|
|
233
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
234
|
+
return () => {
|
|
235
|
+
document.removeEventListener("pointerdown", onPointerDown);
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
}, [open, refs, setOpen]);
|
|
239
|
+
useIsomorphicLayoutEffect(() => {
|
|
240
|
+
var _a, _b;
|
|
241
|
+
if (open && controlledScrolling) {
|
|
242
|
+
if (activeIndex != null) {
|
|
243
|
+
(_a = listItemsRef.current[activeIndex]) == null ? void 0 : _a.scrollIntoView({ block: "nearest" });
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
setScrollTop(((_b = refs.floating.current) == null ? void 0 : _b.scrollTop) ?? 0);
|
|
247
|
+
}, [open, refs, controlledScrolling, activeIndex]);
|
|
248
|
+
useIsomorphicLayoutEffect(() => {
|
|
249
|
+
var _a;
|
|
250
|
+
if (open && fallback) {
|
|
251
|
+
if (selectedIndex != null) {
|
|
252
|
+
(_a = listItemsRef.current[selectedIndex]) == null ? void 0 : _a.scrollIntoView({ block: "nearest" });
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}, [open, fallback, selectedIndex]);
|
|
256
|
+
useIsomorphicLayoutEffect(() => {
|
|
257
|
+
if (refs.floating.current && fallback) {
|
|
258
|
+
refs.floating.current.style.maxHeight = "";
|
|
259
|
+
}
|
|
260
|
+
}, [refs, fallback]);
|
|
261
|
+
return /* @__PURE__ */ jsx(
|
|
262
|
+
SelectProvider,
|
|
263
|
+
{
|
|
264
|
+
scope: __scopeSelect,
|
|
265
|
+
...selectContext,
|
|
266
|
+
setScrollTop,
|
|
267
|
+
setInnerOffset,
|
|
268
|
+
floatingRef,
|
|
269
|
+
setValueAtIndex: (index, value) => {
|
|
270
|
+
listContentRef.current[index] = value;
|
|
271
|
+
},
|
|
272
|
+
fallback,
|
|
273
|
+
interactions: interactionsContext,
|
|
274
|
+
floatingContext: context,
|
|
275
|
+
activeIndex,
|
|
276
|
+
canScrollDown: !!showDownArrow,
|
|
277
|
+
canScrollUp: !!showUpArrow,
|
|
278
|
+
controlledScrolling,
|
|
279
|
+
dataRef: context.dataRef,
|
|
280
|
+
listRef: listItemsRef,
|
|
281
|
+
blockSelection,
|
|
282
|
+
allowMouseUpRef,
|
|
283
|
+
upArrowRef,
|
|
284
|
+
downArrowRef,
|
|
285
|
+
selectTimeoutRef,
|
|
286
|
+
allowSelectRef,
|
|
287
|
+
children
|
|
288
|
+
}
|
|
289
|
+
);
|
|
290
|
+
};
|
|
291
|
+
const userAgent = typeof navigator !== "undefined" && navigator.userAgent || "";
|
|
292
|
+
export {
|
|
293
|
+
SelectInlineImpl
|
|
294
|
+
};
|
|
2
295
|
//# sourceMappingURL=SelectImpl.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SelectImpl.tsx"],
|
|
4
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'\nimport {\n isClient,\n isWeb,\n useIsTouchDevice,\n useIsomorphicLayoutEffect,\n} 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 && isClient) {\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: true }),\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 = React.useMemo(() => {\n return {\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 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 }, [floating, y, x, interactions])\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={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": "AA+TI
|
|
6
|
-
"names": ["
|
|
5
|
+
"mappings": "AA+TI;AA/TJ;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAE1B,SAAS,wBAAwB,sBAAsB;AACvD,SAAS,gBAAgB,wBAAwB;AAI1C,MAAM,mBAAmB,CAAC,UAA2B;AAC1D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,gBAAgB,iBAAiB,mBAAmB,aAAa;AACvE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF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