@tamagui/select 1.13.2 → 1.13.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/dist/cjs/BubbleSelect.js +1 -47
  2. package/dist/cjs/BubbleSelect.js.map +2 -2
  3. package/dist/cjs/Select.js +1 -494
  4. package/dist/cjs/Select.js.map +2 -2
  5. package/dist/cjs/SelectContent.js +1 -54
  6. package/dist/cjs/SelectContent.js.map +2 -2
  7. package/dist/cjs/SelectContent.native.js +1 -30
  8. package/dist/cjs/SelectContent.native.js.map +2 -2
  9. package/dist/cjs/SelectImpl.js +1 -308
  10. package/dist/cjs/SelectImpl.js.map +2 -2
  11. package/dist/cjs/SelectImpl.native.js +1 -34
  12. package/dist/cjs/SelectImpl.native.js.map +2 -2
  13. package/dist/cjs/SelectScrollButton.js +1 -175
  14. package/dist/cjs/SelectScrollButton.js.map +2 -2
  15. package/dist/cjs/SelectScrollButton.native.js +1 -31
  16. package/dist/cjs/SelectScrollButton.native.js.map +2 -2
  17. package/dist/cjs/SelectViewport.js +2 -115
  18. package/dist/cjs/SelectViewport.js.map +2 -2
  19. package/dist/cjs/SelectViewport.native.js +1 -52
  20. package/dist/cjs/SelectViewport.native.js.map +2 -2
  21. package/dist/cjs/constants.js +1 -46
  22. package/dist/cjs/constants.js.map +2 -2
  23. package/dist/cjs/context.js +1 -43
  24. package/dist/cjs/context.js.map +2 -2
  25. package/dist/cjs/index.js +1 -19
  26. package/dist/cjs/index.js.map +2 -2
  27. package/dist/cjs/types.js +1 -16
  28. package/dist/cjs/types.js.map +2 -2
  29. package/dist/cjs/useSelectBreakpointActive.js +1 -42
  30. package/dist/cjs/useSelectBreakpointActive.js.map +2 -2
  31. package/dist/esm/BubbleSelect.js +1 -24
  32. package/dist/esm/BubbleSelect.js.map +2 -2
  33. package/dist/esm/BubbleSelect.mjs +1 -24
  34. package/dist/esm/BubbleSelect.mjs.map +2 -2
  35. package/dist/esm/Select.js +1 -464
  36. package/dist/esm/Select.js.map +2 -2
  37. package/dist/esm/Select.mjs +1 -464
  38. package/dist/esm/Select.mjs.map +2 -2
  39. package/dist/esm/SelectContent.js +1 -30
  40. package/dist/esm/SelectContent.js.map +2 -2
  41. package/dist/esm/SelectContent.mjs +1 -30
  42. package/dist/esm/SelectContent.mjs.map +2 -2
  43. package/dist/esm/SelectContent.native.js +1 -6
  44. package/dist/esm/SelectContent.native.js.map +2 -2
  45. package/dist/esm/SelectContent.native.mjs +1 -6
  46. package/dist/esm/SelectContent.native.mjs.map +2 -2
  47. package/dist/esm/SelectImpl.js +1 -294
  48. package/dist/esm/SelectImpl.js.map +2 -2
  49. package/dist/esm/SelectImpl.mjs +1 -294
  50. package/dist/esm/SelectImpl.mjs.map +2 -2
  51. package/dist/esm/SelectImpl.native.js +1 -10
  52. package/dist/esm/SelectImpl.native.js.map +2 -2
  53. package/dist/esm/SelectImpl.native.mjs +1 -10
  54. package/dist/esm/SelectImpl.native.mjs.map +2 -2
  55. package/dist/esm/SelectScrollButton.js +1 -140
  56. package/dist/esm/SelectScrollButton.js.map +2 -2
  57. package/dist/esm/SelectScrollButton.mjs +1 -140
  58. package/dist/esm/SelectScrollButton.mjs.map +2 -2
  59. package/dist/esm/SelectScrollButton.native.js +1 -6
  60. package/dist/esm/SelectScrollButton.native.js.map +2 -2
  61. package/dist/esm/SelectScrollButton.native.mjs +1 -6
  62. package/dist/esm/SelectScrollButton.native.mjs.map +2 -2
  63. package/dist/esm/SelectViewport.js +2 -80
  64. package/dist/esm/SelectViewport.js.map +2 -2
  65. package/dist/esm/SelectViewport.mjs +2 -80
  66. package/dist/esm/SelectViewport.mjs.map +2 -2
  67. package/dist/esm/SelectViewport.native.js +1 -18
  68. package/dist/esm/SelectViewport.native.js.map +2 -2
  69. package/dist/esm/SelectViewport.native.mjs +1 -18
  70. package/dist/esm/SelectViewport.native.mjs.map +2 -2
  71. package/dist/esm/constants.js +1 -16
  72. package/dist/esm/constants.js.map +2 -2
  73. package/dist/esm/constants.mjs +1 -16
  74. package/dist/esm/constants.mjs.map +2 -2
  75. package/dist/esm/context.js +1 -15
  76. package/dist/esm/context.js.map +2 -2
  77. package/dist/esm/context.mjs +1 -15
  78. package/dist/esm/context.mjs.map +2 -2
  79. package/dist/esm/index.js +1 -2
  80. package/dist/esm/index.js.map +1 -1
  81. package/dist/esm/index.mjs +1 -2
  82. package/dist/esm/index.mjs.map +1 -1
  83. package/dist/esm/useSelectBreakpointActive.js +1 -17
  84. package/dist/esm/useSelectBreakpointActive.js.map +2 -2
  85. package/dist/esm/useSelectBreakpointActive.mjs +1 -17
  86. package/dist/esm/useSelectBreakpointActive.mjs.map +2 -2
  87. package/dist/jsx/BubbleSelect.js +1 -24
  88. package/dist/jsx/BubbleSelect.js.map +2 -2
  89. package/dist/jsx/BubbleSelect.mjs +1 -24
  90. package/dist/jsx/BubbleSelect.mjs.map +2 -2
  91. package/dist/jsx/Select.js +1 -428
  92. package/dist/jsx/Select.js.map +2 -2
  93. package/dist/jsx/Select.mjs +1 -428
  94. package/dist/jsx/Select.mjs.map +2 -2
  95. package/dist/jsx/SelectContent.js +1 -29
  96. package/dist/jsx/SelectContent.js.map +2 -2
  97. package/dist/jsx/SelectContent.mjs +1 -29
  98. package/dist/jsx/SelectContent.mjs.map +2 -2
  99. package/dist/jsx/SelectContent.native.js +1 -6
  100. package/dist/jsx/SelectContent.native.js.map +2 -2
  101. package/dist/jsx/SelectContent.native.mjs +1 -6
  102. package/dist/jsx/SelectContent.native.mjs.map +2 -2
  103. package/dist/jsx/SelectImpl.js +1 -286
  104. package/dist/jsx/SelectImpl.js.map +2 -2
  105. package/dist/jsx/SelectImpl.mjs +1 -286
  106. package/dist/jsx/SelectImpl.mjs.map +2 -2
  107. package/dist/jsx/SelectImpl.native.js +1 -9
  108. package/dist/jsx/SelectImpl.native.js.map +2 -2
  109. package/dist/jsx/SelectImpl.native.mjs +1 -9
  110. package/dist/jsx/SelectImpl.native.mjs.map +2 -2
  111. package/dist/jsx/SelectScrollButton.js +1 -126
  112. package/dist/jsx/SelectScrollButton.js.map +2 -2
  113. package/dist/jsx/SelectScrollButton.mjs +1 -126
  114. package/dist/jsx/SelectScrollButton.mjs.map +2 -2
  115. package/dist/jsx/SelectScrollButton.native.js +1 -6
  116. package/dist/jsx/SelectScrollButton.native.js.map +2 -2
  117. package/dist/jsx/SelectScrollButton.native.mjs +1 -6
  118. package/dist/jsx/SelectScrollButton.native.mjs.map +2 -2
  119. package/dist/jsx/SelectViewport.js +2 -72
  120. package/dist/jsx/SelectViewport.js.map +2 -2
  121. package/dist/jsx/SelectViewport.mjs +2 -72
  122. package/dist/jsx/SelectViewport.mjs.map +2 -2
  123. package/dist/jsx/SelectViewport.native.js +1 -17
  124. package/dist/jsx/SelectViewport.native.js.map +2 -2
  125. package/dist/jsx/SelectViewport.native.mjs +1 -17
  126. package/dist/jsx/SelectViewport.native.mjs.map +2 -2
  127. package/dist/jsx/constants.js +1 -16
  128. package/dist/jsx/constants.js.map +2 -2
  129. package/dist/jsx/constants.mjs +1 -16
  130. package/dist/jsx/constants.mjs.map +2 -2
  131. package/dist/jsx/context.js +1 -14
  132. package/dist/jsx/context.js.map +2 -2
  133. package/dist/jsx/context.mjs +1 -14
  134. package/dist/jsx/context.mjs.map +2 -2
  135. package/dist/jsx/index.js +1 -2
  136. package/dist/jsx/index.js.map +1 -1
  137. package/dist/jsx/index.mjs +1 -2
  138. package/dist/jsx/index.mjs.map +1 -1
  139. package/dist/jsx/useSelectBreakpointActive.js +1 -17
  140. package/dist/jsx/useSelectBreakpointActive.js.map +2 -2
  141. package/dist/jsx/useSelectBreakpointActive.mjs +1 -17
  142. package/dist/jsx/useSelectBreakpointActive.mjs.map +2 -2
  143. package/package.json +16 -16
@@ -1,141 +1,2 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { autoUpdate, offset, useFloating } from "@floating-ui/react";
3
- import { useComposedRefs } from "@tamagui/compose-refs";
4
- import { useIsomorphicLayoutEffect } from "@tamagui/core";
5
- import { YStack } from "@tamagui/stacks";
6
- import * as React from "react";
7
- import { flushSync } from "react-dom";
8
- import { useSelectContext } from "./context";
9
- const SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
10
- const SelectScrollUpButton = React.forwardRef((props, forwardedRef) => {
11
- return /* @__PURE__ */ jsx(
12
- SelectScrollButtonImpl,
13
- {
14
- componentName: SCROLL_UP_BUTTON_NAME,
15
- ...props,
16
- dir: "up",
17
- ref: forwardedRef
18
- }
19
- );
20
- });
21
- SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
22
- const SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
23
- const SelectScrollDownButton = React.forwardRef((props, forwardedRef) => {
24
- return /* @__PURE__ */ jsx(
25
- SelectScrollButtonImpl,
26
- {
27
- componentName: SCROLL_DOWN_BUTTON_NAME,
28
- ...props,
29
- dir: "down",
30
- ref: forwardedRef
31
- }
32
- );
33
- });
34
- SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
35
- const SelectScrollButtonImpl = React.memo(
36
- React.forwardRef(
37
- (props, forwardedRef) => {
38
- var _a;
39
- const { __scopeSelect, dir, componentName, ...scrollIndicatorProps } = props;
40
- const {
41
- floatingRef,
42
- forceUpdate,
43
- open,
44
- fallback,
45
- setScrollTop,
46
- setInnerOffset,
47
- ...context
48
- } = useSelectContext(componentName, __scopeSelect);
49
- const [element, setElement] = React.useState(null);
50
- const statusRef = React.useRef("idle");
51
- const isVisible = context[dir === "down" ? "canScrollDown" : "canScrollUp"];
52
- const frameRef = React.useRef();
53
- const { x, y, reference, floating, strategy, update, refs } = useFloating({
54
- open: open && isVisible,
55
- strategy: "fixed",
56
- placement: dir === "up" ? "top" : "bottom",
57
- middleware: [offset(({ rects }) => -rects.floating.height)],
58
- whileElementsMounted: (...args) => autoUpdate(...args, { animationFrame: true })
59
- });
60
- const composedRef = useComposedRefs(forwardedRef, floating);
61
- if (floatingRef) {
62
- if (open) {
63
- if (element !== floatingRef.current) {
64
- setElement(floatingRef.current);
65
- reference(floatingRef.current);
66
- requestAnimationFrame(update);
67
- }
68
- } else {
69
- cancelAnimationFrame(frameRef.current);
70
- }
71
- }
72
- useIsomorphicLayoutEffect(() => {
73
- return () => {
74
- cancelAnimationFrame(frameRef.current);
75
- };
76
- }, []);
77
- if (!(isVisible && floatingRef)) {
78
- return null;
79
- }
80
- const onScroll = (amount) => {
81
- console.log("on scroll?");
82
- if (fallback) {
83
- if (refs.floating.current) {
84
- refs.floating.current.scrollTop -= amount;
85
- flushSync(() => {
86
- var _a2;
87
- return setScrollTop(((_a2 = refs.floating.current) == null ? void 0 : _a2.scrollTop) ?? 0);
88
- });
89
- }
90
- } else {
91
- flushSync(() => setInnerOffset((value) => value - amount));
92
- }
93
- };
94
- return /* @__PURE__ */ jsx(
95
- YStack,
96
- {
97
- ref: composedRef,
98
- componentName,
99
- "aria-hidden": true,
100
- ...scrollIndicatorProps,
101
- zIndex: 1e3,
102
- position: strategy,
103
- left: x || 0,
104
- top: y || 0,
105
- width: `calc(${(((_a = floatingRef == null ? void 0 : floatingRef.current) == null ? void 0 : _a.offsetWidth) ?? 0) - 2}px)`,
106
- onPointerEnter: () => {
107
- statusRef.current = "active";
108
- let prevNow = Date.now();
109
- function frame() {
110
- if (element) {
111
- const currentNow = Date.now();
112
- const msElapsed = currentNow - prevNow;
113
- prevNow = currentNow;
114
- const pixelsToScroll = msElapsed / 2;
115
- const remainingPixels = dir === "up" ? element.scrollTop : element.scrollHeight - element.clientHeight - element.scrollTop;
116
- const scrollRemaining = dir === "up" ? element.scrollTop - pixelsToScroll > 0 : element.scrollTop + pixelsToScroll < element.scrollHeight - element.clientHeight;
117
- onScroll(
118
- dir === "up" ? Math.min(pixelsToScroll, remainingPixels) : Math.max(-pixelsToScroll, -remainingPixels)
119
- );
120
- if (scrollRemaining) {
121
- frameRef.current = requestAnimationFrame(frame);
122
- }
123
- }
124
- }
125
- cancelAnimationFrame(frameRef.current);
126
- frameRef.current = requestAnimationFrame(frame);
127
- },
128
- onPointerLeave: () => {
129
- statusRef.current = "idle";
130
- cancelAnimationFrame(frameRef.current);
131
- }
132
- }
133
- );
134
- }
135
- )
136
- );
137
- export {
138
- SelectScrollDownButton,
139
- SelectScrollUpButton
140
- };
1
+ import{jsx as p}from"react/jsx-runtime";import{autoUpdate as q,offset as k,useFloating as W}from"@floating-ui/react";import{useComposedRefs as z}from"@tamagui/compose-refs";import{useIsomorphicLayoutEffect as V}from"@tamagui/core";import{YStack as Y}from"@tamagui/stacks";import*as n from"react";import{flushSync as T}from"react-dom";import{useSelectContext as $}from"./context";const w="SelectScrollUpButton",G=n.forwardRef((c,s)=>p(E,{componentName:w,...c,dir:"up",ref:s}));G.displayName=w;const h="SelectScrollDownButton",J=n.forwardRef((c,s)=>p(E,{componentName:h,...c,dir:"down",ref:s}));J.displayName=h;const E=n.memo(n.forwardRef((c,s)=>{var g;const{__scopeSelect:N,dir:i,componentName:u,...R}=c,{floatingRef:o,forceUpdate:K,open:f,fallback:x,setScrollTop:I,setInnerOffset:y,...A}=$(u,N),[e,F]=n.useState(null),S=n.useRef("idle"),d=A[i==="down"?"canScrollDown":"canScrollUp"],l=n.useRef(),{x:U,y:_,reference:L,floating:D,strategy:M,update:O,refs:m}=W({open:f&&d,strategy:"fixed",placement:i==="up"?"top":"bottom",middleware:[k(({rects:t})=>-t.floating.height)],whileElementsMounted:(...t)=>q(...t,{animationFrame:!0})}),H=z(s,D);if(o&&(f?e!==o.current&&(F(o.current),L(o.current),requestAnimationFrame(O)):cancelAnimationFrame(l.current)),V(()=>()=>{cancelAnimationFrame(l.current)},[]),!(d&&o))return null;const b=t=>{console.log("on scroll?"),x?m.floating.current&&(m.floating.current.scrollTop-=t,T(()=>{var r;return I(((r=m.floating.current)==null?void 0:r.scrollTop)??0)})):T(()=>y(r=>r-t))};return p(Y,{ref:H,componentName:u,"aria-hidden":!0,...R,zIndex:1e3,position:M,left:U||0,top:_||0,width:`calc(${(((g=o==null?void 0:o.current)==null?void 0:g.offsetWidth)??0)-2}px)`,onPointerEnter:()=>{S.current="active";let t=Date.now();function r(){if(e){const B=Date.now(),v=B-t;t=B;const a=v/2,P=i==="up"?e.scrollTop:e.scrollHeight-e.clientHeight-e.scrollTop,C=i==="up"?e.scrollTop-a>0:e.scrollTop+a<e.scrollHeight-e.clientHeight;b(i==="up"?Math.min(a,P):Math.max(-a,-P)),C&&(l.current=requestAnimationFrame(r))}}cancelAnimationFrame(l.current),l.current=requestAnimationFrame(r)},onPointerLeave:()=>{S.current="idle",cancelAnimationFrame(l.current)}})}));export{J as SelectScrollDownButton,G as SelectScrollUpButton};
141
2
  //# sourceMappingURL=SelectScrollButton.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/SelectScrollButton.tsx"],
4
4
  "sourcesContent": ["import { autoUpdate, offset, useFloating } from '@floating-ui/react'\nimport { useComposedRefs } from '@tamagui/compose-refs'\nimport { TamaguiElement, useIsomorphicLayoutEffect } from '@tamagui/core'\nimport { YStack } from '@tamagui/stacks'\nimport * as React from 'react'\nimport { flushSync } from 'react-dom'\n\nimport { useSelectContext } from './context'\nimport {\n ScopedProps,\n SelectScrollButtonImplProps,\n SelectScrollButtonProps,\n} from './types'\n\n/* -------------------------------------------------------------------------------------------------\n * SelectScrollUpButton\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLL_UP_BUTTON_NAME = 'SelectScrollUpButton'\n\nexport const SelectScrollUpButton = React.forwardRef<\n TamaguiElement,\n SelectScrollButtonProps\n>((props: ScopedProps<SelectScrollButtonProps>, forwardedRef) => {\n return (\n <SelectScrollButtonImpl\n componentName={SCROLL_UP_BUTTON_NAME}\n {...props}\n dir=\"up\"\n ref={forwardedRef}\n />\n )\n})\n\nSelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME\n\n/* -------------------------------------------------------------------------------------------------\n * SelectScrollDownButton\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLL_DOWN_BUTTON_NAME = 'SelectScrollDownButton'\n\nexport const SelectScrollDownButton = React.forwardRef<\n TamaguiElement,\n SelectScrollButtonProps\n>((props: ScopedProps<SelectScrollButtonProps>, forwardedRef) => {\n return (\n <SelectScrollButtonImpl\n componentName={SCROLL_DOWN_BUTTON_NAME}\n {...props}\n dir=\"down\"\n ref={forwardedRef}\n />\n )\n})\n\nSelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME\n\ntype SelectScrollButtonImplElement = TamaguiElement\n\nconst SelectScrollButtonImpl = React.memo(\n React.forwardRef<SelectScrollButtonImplElement, SelectScrollButtonImplProps>(\n (props: ScopedProps<SelectScrollButtonImplProps>, forwardedRef) => {\n const { __scopeSelect, dir, componentName, ...scrollIndicatorProps } = props\n const {\n floatingRef,\n forceUpdate,\n open,\n fallback,\n setScrollTop,\n setInnerOffset,\n ...context\n } = useSelectContext(componentName, __scopeSelect)\n\n const [element, setElement] = React.useState<HTMLElement | null>(null)\n const statusRef = React.useRef<'idle' | 'active'>('idle')\n const isVisible = context[dir === 'down' ? 'canScrollDown' : 'canScrollUp']\n const frameRef = React.useRef<any>()\n\n const { x, y, reference, floating, strategy, update, refs } = useFloating({\n open: open && isVisible,\n strategy: 'fixed',\n placement: dir === 'up' ? 'top' : 'bottom',\n middleware: [offset(({ rects }) => -rects.floating.height)],\n whileElementsMounted: (...args) => autoUpdate(...args, { animationFrame: true }),\n })\n\n const composedRef = useComposedRefs(forwardedRef, floating)\n\n if (floatingRef) {\n if (open) {\n if (element !== floatingRef.current) {\n setElement(floatingRef.current)\n reference(floatingRef.current)\n requestAnimationFrame(update)\n }\n } else {\n cancelAnimationFrame(frameRef.current)\n }\n }\n\n useIsomorphicLayoutEffect(() => {\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n cancelAnimationFrame(frameRef.current)\n }\n }, [])\n\n if (!(isVisible && floatingRef)) {\n return null\n }\n\n const onScroll = (amount: number) => {\n console.log('on scroll?')\n if (fallback) {\n if (refs.floating.current) {\n refs.floating.current.scrollTop -= amount\n flushSync(() => setScrollTop!(refs.floating.current?.scrollTop ?? 0))\n }\n } else {\n flushSync(() => setInnerOffset!((value) => value - amount))\n }\n }\n\n return (\n <YStack\n ref={composedRef}\n componentName={componentName}\n aria-hidden\n {...scrollIndicatorProps}\n zIndex={1000}\n // @ts-expect-error\n position={strategy}\n left={x || 0}\n top={y || 0}\n width={`calc(${(floatingRef?.current?.offsetWidth ?? 0) - 2}px)`}\n onPointerEnter={() => {\n statusRef.current = 'active'\n let prevNow = Date.now()\n\n function frame() {\n if (element) {\n const currentNow = Date.now()\n const msElapsed = currentNow - prevNow\n prevNow = currentNow\n\n const pixelsToScroll = msElapsed / 2\n\n const remainingPixels =\n dir === 'up'\n ? element.scrollTop\n : element.scrollHeight - element.clientHeight - element.scrollTop\n\n const scrollRemaining =\n dir === 'up'\n ? element.scrollTop - pixelsToScroll > 0\n : element.scrollTop + pixelsToScroll <\n element.scrollHeight - element.clientHeight\n\n onScroll(\n dir === 'up'\n ? Math.min(pixelsToScroll, remainingPixels)\n : Math.max(-pixelsToScroll, -remainingPixels)\n )\n\n if (scrollRemaining) {\n frameRef.current = requestAnimationFrame(frame)\n }\n }\n }\n\n cancelAnimationFrame(frameRef.current)\n frameRef.current = requestAnimationFrame(frame)\n }}\n onPointerLeave={() => {\n statusRef.current = 'idle'\n cancelAnimationFrame(frameRef.current)\n }}\n />\n )\n }\n )\n)\n"],
5
- "mappings": "AAyBI;AAzBJ,SAAS,YAAY,QAAQ,mBAAmB;AAChD,SAAS,uBAAuB;AAChC,SAAyB,iCAAiC;AAC1D,SAAS,cAAc;AACvB,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAE1B,SAAS,wBAAwB;AAWjC,MAAM,wBAAwB;AAEvB,MAAM,uBAAuB,MAAM,WAGxC,CAAC,OAA6C,iBAAiB;AAC/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAe;AAAA,MACd,GAAG;AAAA,MACJ,KAAI;AAAA,M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CAE9D,EAEA,OACE7C,EAACM,EAAA,CACC,IAAKqC,EACL,cAAevB,EACf,cAAW,GACV,GAAGC,EACJ,OAAQ,IAER,SAAUiB,EACV,KAAMJ,GAAK,EACX,IAAKC,GAAK,EACV,MAAO,WAASlB,EAAAK,GAAA,YAAAA,EAAa,UAAb,YAAAL,EAAsB,cAAe,GAAK,OAC1D,eAAgB,IAAM,CACpBc,EAAU,QAAU,SACpB,IAAIgB,EAAU,KAAK,IAAI,EAEvB,SAASC,GAAQ,CACf,GAAInB,EAAS,CACX,MAAMoB,EAAa,KAAK,IAAI,EACtBC,EAAYD,EAAaF,EAC/BA,EAAUE,EAEV,MAAME,EAAiBD,EAAY,EAE7BE,EACJjC,IAAQ,KACJU,EAAQ,UACRA,EAAQ,aAAeA,EAAQ,aAAeA,EAAQ,UAEtDwB,EACJlC,IAAQ,KACJU,EAAQ,UAAYsB,EAAiB,EACrCtB,EAAQ,UAAYsB,EACpBtB,EAAQ,aAAeA,EAAQ,aAErCe,EACEzB,IAAQ,KACJ,KAAK,IAAIgC,EAAgBC,CAAe,EACxC,KAAK,IAAI,CAACD,EAAgB,CAACC,CAAe,CAChD,EAEIC,IACFpB,EAAS,QAAU,sBAAsBe,CAAK,EAElD,CACF,CAEA,qBAAqBf,EAAS,OAAO,EACrCA,EAAS,QAAU,sBAAsBe,CAAK,CAChD,EACA,eAAgB,IAAM,CACpBjB,EAAU,QAAU,OACpB,qBAAqBE,EAAS,OAAO,CACvC,EACF,CAEJ,CACF,CACF",
6
+ "names": ["jsx", "autoUpdate", "offset", "useFloating", "useComposedRefs", "useIsomorphicLayoutEffect", "YStack", "React", "flushSync", "useSelectContext", "SCROLL_UP_BUTTON_NAME", "SelectScrollUpButton", "props", "forwardedRef", "SelectScrollButtonImpl", "SCROLL_DOWN_BUTTON_NAME", "SelectScrollDownButton", "_a", "__scopeSelect", "dir", "componentName", "scrollIndicatorProps", "floatingRef", "forceUpdate", "open", "fallback", "setScrollTop", "setInnerOffset", "context", "element", "setElement", "statusRef", "isVisible", "frameRef", "x", "y", "reference", "floating", "strategy", "update", "refs", "rects", "args", "composedRef", "onScroll", "amount", "value", "prevNow", "frame", "currentNow", "msElapsed", "pixelsToScroll", "remainingPixels", "scrollRemaining"]
7
7
  }
@@ -1,7 +1,2 @@
1
- const SelectScrollUpButton = (_) => null;
2
- const SelectScrollDownButton = (_) => null;
3
- export {
4
- SelectScrollDownButton,
5
- SelectScrollUpButton
6
- };
1
+ const e=o=>null,r=o=>null;export{r as SelectScrollDownButton,e as SelectScrollUpButton};
7
2
  //# sourceMappingURL=SelectScrollButton.native.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/SelectScrollButton.native.tsx"],
4
4
  "sourcesContent": ["import { ScopedProps, SelectScrollButtonProps } from './types'\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const SelectScrollUpButton = (_: ScopedProps<SelectScrollButtonProps>) => null\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const SelectScrollDownButton = (_: ScopedProps<SelectScrollButtonProps>) =>\n null\n"],
5
- "mappings": "AAGO,MAAM,uBAAuB,CAAC,MAA4C;AAG1E,MAAM,yBAAyB,CAAC,MACrC;",
6
- "names": []
5
+ "mappings": "AAGO,MAAMA,EAAwBC,GAA4C,KAGpEC,EAA0BD,GACrC",
6
+ "names": ["SelectScrollUpButton", "_", "SelectScrollDownButton"]
7
7
  }
@@ -1,7 +1,2 @@
1
- const SelectScrollUpButton = (_) => null;
2
- const SelectScrollDownButton = (_) => null;
3
- export {
4
- SelectScrollDownButton,
5
- SelectScrollUpButton
6
- };
1
+ const e=o=>null,r=o=>null;export{r as SelectScrollDownButton,e as SelectScrollUpButton};
7
2
  //# sourceMappingURL=SelectScrollButton.native.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/SelectScrollButton.native.tsx"],
4
4
  "sourcesContent": ["import { ScopedProps, SelectScrollButtonProps } from './types'\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const SelectScrollUpButton = (_: ScopedProps<SelectScrollButtonProps>) => null\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const SelectScrollDownButton = (_: ScopedProps<SelectScrollButtonProps>) =>\n null\n"],
5
- "mappings": "AAGO,MAAM,uBAAuB,CAAC,MAA4C;AAG1E,MAAM,yBAAyB,CAAC,MACrC;",
6
- "names": []
5
+ "mappings": "AAGO,MAAMA,EAAwBC,GAA4C,KAGpEC,EAA0BD,GACrC",
6
+ "names": ["SelectScrollUpButton", "_", "SelectScrollDownButton"]
7
7
  }
@@ -1,78 +1,4 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { FloatingFocusManager } from "@floating-ui/react";
3
- import { isWeb } from "@tamagui/core";
4
- import { styled } from "@tamagui/core";
5
- import { PortalItem } from "@tamagui/portal";
6
- import { ThemeableStack } from "@tamagui/stacks";
7
- import * as React from "react";
8
- import { VIEWPORT_NAME } from "./constants";
9
- import { ForwardSelectContext, useSelectContext } from "./context";
10
- import { useSelectBreakpointActive } from "./useSelectBreakpointActive";
11
- const SelectViewportFrame = styled(ThemeableStack, {
12
- name: VIEWPORT_NAME,
13
- backgroundColor: "$background",
14
- elevate: true,
15
- bordered: true,
16
- userSelect: "none",
17
- outlineWidth: 0,
18
- variants: {
19
- size: {
20
- "...size": (val, { tokens }) => {
21
- return {
22
- borderRadius: tokens.radius[val] ?? val
23
- };
24
- }
25
- }
26
- },
27
- defaultVariants: {
28
- size: "$2"
29
- }
30
- });
31
- const SelectViewport = React.forwardRef(
32
- (props, forwardedRef) => {
33
- const { __scopeSelect, children, disableScroll, ...viewportProps } = props;
34
- const context = useSelectContext(VIEWPORT_NAME, __scopeSelect);
35
- const breakpointActive = useSelectBreakpointActive(context.sheetBreakpoint);
36
- if (breakpointActive || !isWeb) {
37
- return /* @__PURE__ */ jsx(PortalItem, { hostName: `${context.scopeKey}SheetContents`, children: /* @__PURE__ */ jsx(ForwardSelectContext, { context, children }) });
38
- }
39
- if (!context.floatingContext) {
40
- return null;
41
- }
42
- if (!context.open) {
43
- return children;
44
- }
45
- const {
46
- style: { scrollbarWidth, listStyleType, overflow, ...restStyle },
47
- ...floatingProps
48
- } = context.interactions.getFloatingProps();
49
- return /* @__PURE__ */ jsxs(Fragment, { children: [
50
- !disableScroll && /* @__PURE__ */ jsx(
51
- "style",
52
- {
53
- dangerouslySetInnerHTML: {
54
- __html: selectViewportCSS
55
- }
56
- }
57
- ),
58
- /* @__PURE__ */ jsx(FloatingFocusManager, { context: context.floatingContext, children: /* @__PURE__ */ jsx(
59
- SelectViewportFrame,
60
- {
61
- size: context.size,
62
- role: "presentation",
63
- ...viewportProps,
64
- ref: forwardedRef,
65
- ...floatingProps,
66
- ...restStyle,
67
- overflow: disableScroll ? void 0 : overflow ?? "scroll",
68
- children
69
- }
70
- ) })
71
- ] });
72
- }
73
- );
74
- SelectViewport.displayName = VIEWPORT_NAME;
75
- const selectViewportCSS = `
1
+ import{Fragment as k,jsx as t,jsxs as x}from"react/jsx-runtime";import{FloatingFocusManager as d}from"@floating-ui/react";import{isWeb as f}from"@tamagui/core";import{styled as S}from"@tamagui/core";import{PortalItem as u}from"@tamagui/portal";import{ThemeableStack as w}from"@tamagui/stacks";import*as g from"react";import{VIEWPORT_NAME as n}from"./constants";import{ForwardSelectContext as b,useSelectContext as h}from"./context";import{useSelectBreakpointActive as P}from"./useSelectBreakpointActive";const V=S(w,{name:n,backgroundColor:"$background",elevate:!0,bordered:!0,userSelect:"none",outlineWidth:0,variants:{size:{"...size":(o,{tokens:r})=>({borderRadius:r.radius[o]??o})}},defaultVariants:{size:"$2"}}),v=g.forwardRef((o,r)=>{const{__scopeSelect:s,children:i,disableScroll:l,...a}=o,e=h(n,s);if(P(e.sheetBreakpoint)||!f)return t(u,{hostName:`${e.scopeKey}SheetContents`,children:t(b,{context:e,children:i})});if(!e.floatingContext)return null;if(!e.open)return i;const{style:{scrollbarWidth:C,listStyleType:_,overflow:c,...p},...m}=e.interactions.getFloatingProps();return x(k,{children:[!l&&t("style",{dangerouslySetInnerHTML:{__html:y}}),t(d,{context:e.floatingContext,children:t(V,{size:e.size,role:"presentation",...a,ref:r,...m,...p,overflow:l?void 0:c??"scroll",children:i})})]})});v.displayName=n;const y=`
76
2
  .is_SelectViewport {
77
3
  scrollbar-width: none;
78
4
  -webkit-overflow-scrolling: touch;
@@ -82,9 +8,5 @@ const selectViewportCSS = `
82
8
  .is_SelectViewport::-webkit-scrollbar{
83
9
  display:none
84
10
  }
85
- `;
86
- export {
87
- SelectViewport,
88
- SelectViewportFrame
89
- };
11
+ `;export{v as SelectViewport,V as SelectViewportFrame};
90
12
  //# sourceMappingURL=SelectViewport.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/SelectViewport.tsx"],
4
4
  "sourcesContent": ["import { FloatingFocusManager } from '@floating-ui/react'\nimport { TamaguiElement, isWeb } from '@tamagui/core'\nimport { styled } from '@tamagui/core'\nimport { PortalItem } from '@tamagui/portal'\nimport { ThemeableStack } from '@tamagui/stacks'\nimport * as React from 'react'\n\nimport { VIEWPORT_NAME } from './constants'\nimport { ForwardSelectContext, useSelectContext } from './context'\nimport { ScopedProps, SelectViewportProps } from './types'\nimport { useSelectBreakpointActive } from './useSelectBreakpointActive'\n\n/* -------------------------------------------------------------------------------------------------\n * SelectViewport\n * -----------------------------------------------------------------------------------------------*/\n\nexport const SelectViewportFrame = styled(ThemeableStack, {\n name: VIEWPORT_NAME,\n backgroundColor: '$background',\n elevate: true,\n bordered: true,\n userSelect: 'none',\n outlineWidth: 0,\n\n variants: {\n size: {\n '...size': (val, { tokens }) => {\n return {\n borderRadius: tokens.radius[val] ?? val,\n }\n },\n },\n } as const,\n\n defaultVariants: {\n size: '$2',\n },\n})\n\nexport const SelectViewport = React.forwardRef<TamaguiElement, SelectViewportProps>(\n (props: ScopedProps<SelectViewportProps>, forwardedRef) => {\n const { __scopeSelect, children, disableScroll, ...viewportProps } = props\n const context = useSelectContext(VIEWPORT_NAME, __scopeSelect)\n const breakpointActive = useSelectBreakpointActive(context.sheetBreakpoint)\n\n if (breakpointActive || !isWeb) {\n return (\n <PortalItem hostName={`${context.scopeKey}SheetContents`}>\n <ForwardSelectContext context={context}>{children}</ForwardSelectContext>\n </PortalItem>\n )\n }\n\n if (!context.floatingContext) {\n return null\n }\n\n if (!context.open) {\n return children\n }\n\n const {\n style: { scrollbarWidth, listStyleType, overflow, ...restStyle },\n ...floatingProps\n } = context.interactions!.getFloatingProps()\n\n return (\n <>\n {!disableScroll && (\n <style\n dangerouslySetInnerHTML={{\n __html: selectViewportCSS,\n }}\n />\n )}\n <FloatingFocusManager context={context.floatingContext}>\n <SelectViewportFrame\n size={context.size}\n // @ts-ignore\n role=\"presentation\"\n {...viewportProps}\n ref={forwardedRef}\n {...floatingProps}\n {...restStyle}\n overflow={disableScroll ? undefined : overflow ?? 'scroll'}\n >\n {children}\n </SelectViewportFrame>\n </FloatingFocusManager>\n </>\n )\n }\n)\n\nSelectViewport.displayName = VIEWPORT_NAME\n\nconst selectViewportCSS = `\n.is_SelectViewport {\n scrollbar-width: none;\n -webkit-overflow-scrolling: touch;\n overscroll-behavior: contain;\n}\n\n.is_SelectViewport::-webkit-scrollbar{\n display:none\n}\n`\n"],
5
- "mappings": "AAgDU,SAmBJ,UAnBI,KAmBJ,YAnBI;AAhDV,SAAS,4BAA4B;AACrC,SAAyB,aAAa;AACtC,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,YAAY,WAAW;AAEvB,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB,wBAAwB;AAEvD,SAAS,iCAAiC;AAMnC,MAAM,sBAAsB,OAAO,gBAAgB;AAAA,EACxD,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,cAAc;AAAA,EAEd,UAAU;AAAA,IACR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OACErB,EAAAF,EAAA,CACG,WAACqB,GACApB,EAAC,SACC,wBAAyB,CACvB,OAAQ4B,CACV,EACF,EAEF5B,EAACE,EAAA,CAAqB,QAASoB,EAAQ,gBACrC,SAAAtB,EAACY,EAAA,CACC,KAAMU,EAAQ,KAEd,KAAK,eACJ,GAAGD,EACJ,IAAKJ,EACJ,GAAGU,EACH,GAAGD,EACJ,SAAUN,EAAgB,OAAYK,GAAY,SAEjD,SAAAN,EACH,EACF,GACF,CAEJ,CACF,EAEAJ,EAAe,YAAcP,EAE7B,MAAMoB,EAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": ["Fragment", "jsx", "jsxs", "FloatingFocusManager", "isWeb", "styled", "PortalItem", "ThemeableStack", "React", "VIEWPORT_NAME", "ForwardSelectContext", "useSelectContext", "useSelectBreakpointActive", "SelectViewportFrame", "val", "tokens", "SelectViewport", "props", "forwardedRef", "__scopeSelect", "children", "disableScroll", "viewportProps", "context", "scrollbarWidth", "listStyleType", "overflow", "restStyle", "floatingProps", "selectViewportCSS"]
7
7
  }
@@ -1,78 +1,4 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { FloatingFocusManager } from "@floating-ui/react";
3
- import { isWeb } from "@tamagui/core";
4
- import { styled } from "@tamagui/core";
5
- import { PortalItem } from "@tamagui/portal";
6
- import { ThemeableStack } from "@tamagui/stacks";
7
- import * as React from "react";
8
- import { VIEWPORT_NAME } from "./constants";
9
- import { ForwardSelectContext, useSelectContext } from "./context";
10
- import { useSelectBreakpointActive } from "./useSelectBreakpointActive";
11
- const SelectViewportFrame = styled(ThemeableStack, {
12
- name: VIEWPORT_NAME,
13
- backgroundColor: "$background",
14
- elevate: true,
15
- bordered: true,
16
- userSelect: "none",
17
- outlineWidth: 0,
18
- variants: {
19
- size: {
20
- "...size": (val, { tokens }) => {
21
- return {
22
- borderRadius: tokens.radius[val] ?? val
23
- };
24
- }
25
- }
26
- },
27
- defaultVariants: {
28
- size: "$2"
29
- }
30
- });
31
- const SelectViewport = React.forwardRef(
32
- (props, forwardedRef) => {
33
- const { __scopeSelect, children, disableScroll, ...viewportProps } = props;
34
- const context = useSelectContext(VIEWPORT_NAME, __scopeSelect);
35
- const breakpointActive = useSelectBreakpointActive(context.sheetBreakpoint);
36
- if (breakpointActive || !isWeb) {
37
- return /* @__PURE__ */ jsx(PortalItem, { hostName: `${context.scopeKey}SheetContents`, children: /* @__PURE__ */ jsx(ForwardSelectContext, { context, children }) });
38
- }
39
- if (!context.floatingContext) {
40
- return null;
41
- }
42
- if (!context.open) {
43
- return children;
44
- }
45
- const {
46
- style: { scrollbarWidth, listStyleType, overflow, ...restStyle },
47
- ...floatingProps
48
- } = context.interactions.getFloatingProps();
49
- return /* @__PURE__ */ jsxs(Fragment, { children: [
50
- !disableScroll && /* @__PURE__ */ jsx(
51
- "style",
52
- {
53
- dangerouslySetInnerHTML: {
54
- __html: selectViewportCSS
55
- }
56
- }
57
- ),
58
- /* @__PURE__ */ jsx(FloatingFocusManager, { context: context.floatingContext, children: /* @__PURE__ */ jsx(
59
- SelectViewportFrame,
60
- {
61
- size: context.size,
62
- role: "presentation",
63
- ...viewportProps,
64
- ref: forwardedRef,
65
- ...floatingProps,
66
- ...restStyle,
67
- overflow: disableScroll ? void 0 : overflow ?? "scroll",
68
- children
69
- }
70
- ) })
71
- ] });
72
- }
73
- );
74
- SelectViewport.displayName = VIEWPORT_NAME;
75
- const selectViewportCSS = `
1
+ import{Fragment as k,jsx as t,jsxs as x}from"react/jsx-runtime";import{FloatingFocusManager as d}from"@floating-ui/react";import{isWeb as f}from"@tamagui/core";import{styled as S}from"@tamagui/core";import{PortalItem as u}from"@tamagui/portal";import{ThemeableStack as w}from"@tamagui/stacks";import*as g from"react";import{VIEWPORT_NAME as n}from"./constants";import{ForwardSelectContext as b,useSelectContext as h}from"./context";import{useSelectBreakpointActive as P}from"./useSelectBreakpointActive";const V=S(w,{name:n,backgroundColor:"$background",elevate:!0,bordered:!0,userSelect:"none",outlineWidth:0,variants:{size:{"...size":(o,{tokens:r})=>({borderRadius:r.radius[o]??o})}},defaultVariants:{size:"$2"}}),v=g.forwardRef((o,r)=>{const{__scopeSelect:s,children:i,disableScroll:l,...a}=o,e=h(n,s);if(P(e.sheetBreakpoint)||!f)return t(u,{hostName:`${e.scopeKey}SheetContents`,children:t(b,{context:e,children:i})});if(!e.floatingContext)return null;if(!e.open)return i;const{style:{scrollbarWidth:C,listStyleType:_,overflow:c,...p},...m}=e.interactions.getFloatingProps();return x(k,{children:[!l&&t("style",{dangerouslySetInnerHTML:{__html:y}}),t(d,{context:e.floatingContext,children:t(V,{size:e.size,role:"presentation",...a,ref:r,...m,...p,overflow:l?void 0:c??"scroll",children:i})})]})});v.displayName=n;const y=`
76
2
  .is_SelectViewport {
77
3
  scrollbar-width: none;
78
4
  -webkit-overflow-scrolling: touch;
@@ -82,9 +8,5 @@ const selectViewportCSS = `
82
8
  .is_SelectViewport::-webkit-scrollbar{
83
9
  display:none
84
10
  }
85
- `;
86
- export {
87
- SelectViewport,
88
- SelectViewportFrame
89
- };
11
+ `;export{v as SelectViewport,V as SelectViewportFrame};
90
12
  //# sourceMappingURL=SelectViewport.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/SelectViewport.tsx"],
4
4
  "sourcesContent": ["import { FloatingFocusManager } from '@floating-ui/react'\nimport { TamaguiElement, isWeb } from '@tamagui/core'\nimport { styled } from '@tamagui/core'\nimport { PortalItem } from '@tamagui/portal'\nimport { ThemeableStack } from '@tamagui/stacks'\nimport * as React from 'react'\n\nimport { VIEWPORT_NAME } from './constants'\nimport { ForwardSelectContext, useSelectContext } from './context'\nimport { ScopedProps, SelectViewportProps } from './types'\nimport { useSelectBreakpointActive } from './useSelectBreakpointActive'\n\n/* -------------------------------------------------------------------------------------------------\n * SelectViewport\n * -----------------------------------------------------------------------------------------------*/\n\nexport const SelectViewportFrame = styled(ThemeableStack, {\n name: VIEWPORT_NAME,\n backgroundColor: '$background',\n elevate: true,\n bordered: true,\n userSelect: 'none',\n outlineWidth: 0,\n\n variants: {\n size: {\n '...size': (val, { tokens }) => {\n return {\n borderRadius: tokens.radius[val] ?? val,\n }\n },\n },\n } as const,\n\n defaultVariants: {\n size: '$2',\n },\n})\n\nexport const SelectViewport = React.forwardRef<TamaguiElement, SelectViewportProps>(\n (props: ScopedProps<SelectViewportProps>, forwardedRef) => {\n const { __scopeSelect, children, disableScroll, ...viewportProps } = props\n const context = useSelectContext(VIEWPORT_NAME, __scopeSelect)\n const breakpointActive = useSelectBreakpointActive(context.sheetBreakpoint)\n\n if (breakpointActive || !isWeb) {\n return (\n <PortalItem hostName={`${context.scopeKey}SheetContents`}>\n <ForwardSelectContext context={context}>{children}</ForwardSelectContext>\n </PortalItem>\n )\n }\n\n if (!context.floatingContext) {\n return null\n }\n\n if (!context.open) {\n return children\n }\n\n const {\n style: { scrollbarWidth, listStyleType, overflow, ...restStyle },\n ...floatingProps\n } = context.interactions!.getFloatingProps()\n\n return (\n <>\n {!disableScroll && (\n <style\n dangerouslySetInnerHTML={{\n __html: selectViewportCSS,\n }}\n />\n )}\n <FloatingFocusManager context={context.floatingContext}>\n <SelectViewportFrame\n size={context.size}\n // @ts-ignore\n role=\"presentation\"\n {...viewportProps}\n ref={forwardedRef}\n {...floatingProps}\n {...restStyle}\n overflow={disableScroll ? undefined : overflow ?? 'scroll'}\n >\n {children}\n </SelectViewportFrame>\n </FloatingFocusManager>\n </>\n )\n }\n)\n\nSelectViewport.displayName = VIEWPORT_NAME\n\nconst selectViewportCSS = `\n.is_SelectViewport {\n scrollbar-width: none;\n -webkit-overflow-scrolling: touch;\n overscroll-behavior: contain;\n}\n\n.is_SelectViewport::-webkit-scrollbar{\n display:none\n}\n`\n"],
5
- "mappings": "AAgDU,SAmBJ,UAnBI,KAmBJ,YAnBI;AAhDV,SAAS,4BAA4B;AACrC,SAAyB,aAAa;AACtC,SAAS,cAAc;A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SAAU,GAAGiB,EAAQ,wBAC/B,SAAAtB,EAACS,EAAA,CAAqB,QAASa,EAAU,SAAAH,EAAS,EACpD,EAIJ,GAAI,CAACG,EAAQ,gBACX,OAAO,KAGT,GAAI,CAACA,EAAQ,KACX,OAAOH,EAGT,KAAM,CACJ,MAAO,CAAE,eAAAI,EAAgB,cAAAC,EAAe,SAAAC,EAAU,GAAGC,CAAU,EAC/D,GAAGC,CACL,EAAIL,EAAQ,aAAc,iBAAiB,EAE3C,OACErB,EAAAF,EAAA,CACG,WAACqB,GACApB,EAAC,SACC,wBAAyB,CACvB,OAAQ4B,CACV,EACF,EAEF5B,EAACE,EAAA,CAAqB,QAASoB,EAAQ,gBACrC,SAAAtB,EAACY,EAAA,CACC,KAAMU,EAAQ,KAEd,KAAK,eACJ,GAAGD,EACJ,IAAKJ,EACJ,GAAGU,EACH,GAAGD,EACJ,SAAUN,EAAgB,OAAYK,GAAY,SAEjD,SAAAN,EACH,EACF,GACF,CAEJ,CACF,EAEAJ,EAAe,YAAcP,EAE7B,MAAMoB,EAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": ["Fragment", "jsx", "jsxs", "FloatingFocusManager", "isWeb", "styled", "PortalItem", "ThemeableStack", "React", "VIEWPORT_NAME", "ForwardSelectContext", "useSelectContext", "useSelectBreakpointActive", "SelectViewportFrame", "val", "tokens", "SelectViewport", "props", "forwardedRef", "__scopeSelect", "children", "disableScroll", "viewportProps", "context", "scrollbarWidth", "listStyleType", "overflow", "restStyle", "floatingProps", "selectViewportCSS"]
7
7
  }
@@ -1,19 +1,2 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { AdaptParentContext } from "@tamagui/adapt";
3
- import { Theme, useThemeName } from "@tamagui/core";
4
- import { PortalItem } from "@tamagui/portal";
5
- import * as React from "react";
6
- import { VIEWPORT_NAME } from "./constants";
7
- import { SelectProvider, useSelectContext } from "./context";
8
- const SelectViewport = (props) => {
9
- const { __scopeSelect, children } = props;
10
- const context = useSelectContext(VIEWPORT_NAME, __scopeSelect);
11
- const themeName = useThemeName();
12
- const adaptContext = React.useContext(AdaptParentContext);
13
- return /* @__PURE__ */ jsx(PortalItem, { hostName: `${context.scopeKey}SheetContents`, children: /* @__PURE__ */ jsx(Theme, { name: themeName, children: /* @__PURE__ */ jsx(SelectProvider, { scope: __scopeSelect, ...context, children: /* @__PURE__ */ jsx(AdaptParentContext.Provider, { value: adaptContext, children }) }) }) });
14
- };
15
- SelectViewport.displayName = VIEWPORT_NAME;
16
- export {
17
- SelectViewport
18
- };
1
+ import{jsx as e}from"react/jsx-runtime";import{AdaptParentContext as r}from"@tamagui/adapt";import{Theme as n,useThemeName as i}from"@tamagui/core";import{PortalItem as P}from"@tamagui/portal";import*as l from"react";import{VIEWPORT_NAME as m}from"./constants";import{SelectProvider as d,useSelectContext as S}from"./context";const f=p=>{const{__scopeSelect:t,children:c}=p,o=S(m,t),s=i(),a=l.useContext(r);return e(P,{hostName:`${o.scopeKey}SheetContents`,children:e(n,{name:s,children:e(d,{scope:t,...o,children:e(r.Provider,{value:a,children:c})})})})};f.displayName=m;export{f as SelectViewport};
19
2
  //# sourceMappingURL=SelectViewport.native.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/SelectViewport.native.tsx"],
4
4
  "sourcesContent": ["import { AdaptParentContext } from '@tamagui/adapt'\nimport { Stack, Theme, useThemeName } from '@tamagui/core'\nimport { PortalItem } from '@tamagui/portal'\nimport * as React from 'react'\n\nimport { VIEWPORT_NAME } from './constants'\nimport { SelectProvider, useSelectContext } from './context'\nimport { ScopedProps, SelectViewportProps } from './types'\n\nexport const SelectViewport = (props: ScopedProps<SelectViewportProps>) => {\n const { __scopeSelect, children } = props\n const context = useSelectContext(VIEWPORT_NAME, __scopeSelect)\n const themeName = useThemeName()\n const adaptContext = React.useContext(AdaptParentContext)\n\n // need to forward context...\n return (\n <PortalItem hostName={`${context.scopeKey}SheetContents`}>\n <Theme name={themeName}>\n <SelectProvider scope={__scopeSelect} {...context}>\n <AdaptParentContext.Provider value={adaptContext}>\n {children}\n </AdaptParentContext.Provider>\n </SelectProvider>\n </Theme>\n </PortalItem>\n )\n}\n\nSelectViewport.displayName = VIEWPORT_NAME\n"],
5
- "mappings": "AAoBU;AApBV,SAAS,0BAA0B;AACnC,SAAgB,OAAO,oBAAoB;AAC3C,SAAS,kBAAkB;AAC3B,YAAY,WAAW;AAEvB,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB,wBAAwB;AAG1C,MAAM,iBAAiB,CAAC,UAA4C;AACzE,QAAM,EAAE,eAAe,SAAS,IAAI;AACpC,QAAM,UAAU,iBAAiB,eAAe,aAAa;AAC7D,QAAM,YAAY,aAAa;AAC/B,QAAM,eAAe,MAAM,WAAW,kBAAkB;AAGxD,SACE,oBAAC,cAAW,UAAU,GAAG,QAAQ,yBAC/B,8BAAC,SAAM,MAAM,WACX,8BAAC,kBAAe,OAAO,eAAgB,GAAG,SACxC,8BAAC,mBAAmB,UAAnB,EAA4B,OAAO,cACjC,UACH,GACF,GACF,GACF;AAEJ;AAEA,eAAe,cAAc;",
6
- "names": []
5
+ "mappings": "AAoBU,cAAAA,MAAA,oBApBV,OAAS,sBAAAC,MAA0B,iBACnC,OAAgB,SAAAC,EAAO,gBAAAC,MAAoB,gBAC3C,OAAS,cAAAC,MAAkB,kBAC3B,UAAYC,MAAW,QAEvB,OAAS,iBAAAC,MAAqB,cAC9B,OAAS,kBAAAC,EAAgB,oBAAAC,MAAwB,YAG1C,MAAMC,EAAkBC,GAA4C,CACzE,KAAM,CAAE,cAAAC,EAAe,SAAAC,CAAS,EAAIF,EAC9BG,EAAUL,EAAiBF,EAAeK,CAAa,EACvDG,EAAYX,EAAa,EACzBY,EAAeV,EAAM,WAAWJ,CAAkB,EAGxD,OACED,EAACI,EAAA,CAAW,SAAU,GAAGS,EAAQ,wBAC/B,SAAAb,EAACE,EAAA,CAAM,KAAMY,EACX,SAAAd,EAACO,EAAA,CAAe,MAAOI,EAAgB,GAAGE,EACxC,SAAAb,EAACC,EAAmB,SAAnB,CAA4B,MAAOc,EACjC,SAAAH,EACH,EACF,EACF,EACF,CAEJ,EAEAH,EAAe,YAAcH",
6
+ "names": ["jsx", "AdaptParentContext", "Theme", "useThemeName", "PortalItem", "React", "VIEWPORT_NAME", "SelectProvider", "useSelectContext", "SelectViewport", "props", "__scopeSelect", "children", "context", "themeName", "adaptContext"]
7
7
  }
@@ -1,19 +1,2 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { AdaptParentContext } from "@tamagui/adapt";
3
- import { Theme, useThemeName } from "@tamagui/core";
4
- import { PortalItem } from "@tamagui/portal";
5
- import * as React from "react";
6
- import { VIEWPORT_NAME } from "./constants";
7
- import { SelectProvider, useSelectContext } from "./context";
8
- const SelectViewport = (props) => {
9
- const { __scopeSelect, children } = props;
10
- const context = useSelectContext(VIEWPORT_NAME, __scopeSelect);
11
- const themeName = useThemeName();
12
- const adaptContext = React.useContext(AdaptParentContext);
13
- return /* @__PURE__ */ jsx(PortalItem, { hostName: `${context.scopeKey}SheetContents`, children: /* @__PURE__ */ jsx(Theme, { name: themeName, children: /* @__PURE__ */ jsx(SelectProvider, { scope: __scopeSelect, ...context, children: /* @__PURE__ */ jsx(AdaptParentContext.Provider, { value: adaptContext, children }) }) }) });
14
- };
15
- SelectViewport.displayName = VIEWPORT_NAME;
16
- export {
17
- SelectViewport
18
- };
1
+ import{jsx as e}from"react/jsx-runtime";import{AdaptParentContext as r}from"@tamagui/adapt";import{Theme as n,useThemeName as i}from"@tamagui/core";import{PortalItem as P}from"@tamagui/portal";import*as l from"react";import{VIEWPORT_NAME as m}from"./constants";import{SelectProvider as d,useSelectContext as S}from"./context";const f=p=>{const{__scopeSelect:t,children:c}=p,o=S(m,t),s=i(),a=l.useContext(r);return e(P,{hostName:`${o.scopeKey}SheetContents`,children:e(n,{name:s,children:e(d,{scope:t,...o,children:e(r.Provider,{value:a,children:c})})})})};f.displayName=m;export{f as SelectViewport};
19
2
  //# sourceMappingURL=SelectViewport.native.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/SelectViewport.native.tsx"],
4
4
  "sourcesContent": ["import { AdaptParentContext } from '@tamagui/adapt'\nimport { Stack, Theme, useThemeName } from '@tamagui/core'\nimport { PortalItem } from '@tamagui/portal'\nimport * as React from 'react'\n\nimport { VIEWPORT_NAME } from './constants'\nimport { SelectProvider, useSelectContext } from './context'\nimport { ScopedProps, SelectViewportProps } from './types'\n\nexport const SelectViewport = (props: ScopedProps<SelectViewportProps>) => {\n const { __scopeSelect, children } = props\n const context = useSelectContext(VIEWPORT_NAME, __scopeSelect)\n const themeName = useThemeName()\n const adaptContext = React.useContext(AdaptParentContext)\n\n // need to forward context...\n return (\n <PortalItem hostName={`${context.scopeKey}SheetContents`}>\n <Theme name={themeName}>\n <SelectProvider scope={__scopeSelect} {...context}>\n <AdaptParentContext.Provider value={adaptContext}>\n {children}\n </AdaptParentContext.Provider>\n </SelectProvider>\n </Theme>\n </PortalItem>\n )\n}\n\nSelectViewport.displayName = VIEWPORT_NAME\n"],
5
- "mappings": "AAoBU;AApBV,SAAS,0BAA0B;AACnC,SAAgB,OAAO,oBAAoB;AAC3C,SAAS,kBAAkB;AAC3B,YAAY,WAAW;AAEvB,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB,wBAAwB;AAG1C,MAAM,iBAAiB,CAAC,UAA4C;AACzE,QAAM,EAAE,eAAe,SAAS,IAAI;AACpC,QAAM,UAAU,iBAAiB,eAAe,aAAa;AAC7D,QAAM,YAAY,aAAa;AAC/B,QAAM,eAAe,MAAM,WAAW,kBAAkB;AAGxD,SACE,oBAAC,cAAW,UAAU,GAAG,QAAQ,yBAC/B,8BAAC,SAAM,MAAM,WACX,8BAAC,kBAAe,OAAO,eAAgB,GAAG,SACxC,8BAAC,mBAAmB,UAAnB,EAA4B,OAAO,cACjC,UACH,GACF,GACF,GACF;AAEJ;AAEA,eAAe,cAAc;",
6
- "names": []
5
+ "mappings": "AAoBU,cAAAA,MAAA,oBApBV,OAAS,sBAAAC,MAA0B,iBACnC,OAAgB,SAAAC,EAAO,gBAAAC,MAAoB,gBAC3C,OAAS,cAAAC,MAAkB,kBAC3B,UAAYC,MAAW,QAEvB,OAAS,iBAAAC,MAAqB,cAC9B,OAAS,kBAAAC,EAAgB,oBAAAC,MAAwB,YAG1C,MAAMC,EAAkBC,GAA4C,CACzE,KAAM,CAAE,cAAAC,EAAe,SAAAC,CAAS,EAAIF,EAC9BG,EAAUL,EAAiBF,EAAeK,CAAa,EACvDG,EAAYX,EAAa,EACzBY,EAAeV,EAAM,WAAWJ,CAAkB,EAGxD,OACED,EAACI,EAAA,CAAW,SAAU,GAAGS,EAAQ,wBAC/B,SAAAb,EAACE,EAAA,CAAM,KAAMY,EACX,SAAAd,EAACO,EAAA,CAAe,MAAOI,EAAgB,GAAGE,EACxC,SAAAb,EAACC,EAAmB,SAAnB,CAA4B,MAAOc,EACjC,SAAAH,EACH,EACF,EACF,EACF,CAEJ,EAEAH,EAAe,YAAcH",
6
+ "names": ["jsx", "AdaptParentContext", "Theme", "useThemeName", "PortalItem", "React", "VIEWPORT_NAME", "SelectProvider", "useSelectContext", "SelectViewport", "props", "__scopeSelect", "children", "context", "themeName", "adaptContext"]
7
7
  }
@@ -1,17 +1,2 @@
1
- const SELECT_NAME = "Select";
2
- const WINDOW_PADDING = 8;
3
- const SCROLL_ARROW_VELOCITY = 8;
4
- const SCROLL_ARROW_THRESHOLD = 8;
5
- const MIN_HEIGHT = 80;
6
- const FALLBACK_THRESHOLD = 16;
7
- const VIEWPORT_NAME = "SelectViewport";
8
- export {
9
- FALLBACK_THRESHOLD,
10
- MIN_HEIGHT,
11
- SCROLL_ARROW_THRESHOLD,
12
- SCROLL_ARROW_VELOCITY,
13
- SELECT_NAME,
14
- VIEWPORT_NAME,
15
- WINDOW_PADDING
16
- };
1
+ const t="Select",o=8,e=8,L=8,c=80,E=16,O="SelectViewport";export{E as FALLBACK_THRESHOLD,c as MIN_HEIGHT,L as SCROLL_ARROW_THRESHOLD,e as SCROLL_ARROW_VELOCITY,t as SELECT_NAME,O as VIEWPORT_NAME,o as WINDOW_PADDING};
17
2
  //# sourceMappingURL=constants.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants.tsx"],
4
4
  "sourcesContent": ["export const SELECT_NAME = 'Select'\nexport const WINDOW_PADDING = 8\nexport const SCROLL_ARROW_VELOCITY = 8\nexport const SCROLL_ARROW_THRESHOLD = 8\nexport const MIN_HEIGHT = 80\nexport const FALLBACK_THRESHOLD = 16\nexport const VIEWPORT_NAME = 'SelectViewport'\n"],
5
- "mappings": "AAAO,MAAM,cAAc;AACpB,MAAM,iBAAiB;AACvB,MAAM,wBAAwB;AAC9B,MAAM,yBAAyB;AAC/B,MAAM,aAAa;AACnB,MAAM,qBAAqB;AAC3B,MAAM,gBAAgB;",
6
- "names": []
5
+ "mappings": "AAAO,MAAMA,EAAc,SACdC,EAAiB,EACjBC,EAAwB,EACxBC,EAAyB,EACzBC,EAAa,GACbC,EAAqB,GACrBC,EAAgB",
6
+ "names": ["SELECT_NAME", "WINDOW_PADDING", "SCROLL_ARROW_VELOCITY", "SCROLL_ARROW_THRESHOLD", "MIN_HEIGHT", "FALLBACK_THRESHOLD", "VIEWPORT_NAME"]
7
7
  }
@@ -1,17 +1,2 @@
1
- const SELECT_NAME = "Select";
2
- const WINDOW_PADDING = 8;
3
- const SCROLL_ARROW_VELOCITY = 8;
4
- const SCROLL_ARROW_THRESHOLD = 8;
5
- const MIN_HEIGHT = 80;
6
- const FALLBACK_THRESHOLD = 16;
7
- const VIEWPORT_NAME = "SelectViewport";
8
- export {
9
- FALLBACK_THRESHOLD,
10
- MIN_HEIGHT,
11
- SCROLL_ARROW_THRESHOLD,
12
- SCROLL_ARROW_VELOCITY,
13
- SELECT_NAME,
14
- VIEWPORT_NAME,
15
- WINDOW_PADDING
16
- };
1
+ const t="Select",o=8,e=8,L=8,c=80,E=16,O="SelectViewport";export{E as FALLBACK_THRESHOLD,c as MIN_HEIGHT,L as SCROLL_ARROW_THRESHOLD,e as SCROLL_ARROW_VELOCITY,t as SELECT_NAME,O as VIEWPORT_NAME,o as WINDOW_PADDING};
17
2
  //# sourceMappingURL=constants.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants.tsx"],
4
4
  "sourcesContent": ["export const SELECT_NAME = 'Select'\nexport const WINDOW_PADDING = 8\nexport const SCROLL_ARROW_VELOCITY = 8\nexport const SCROLL_ARROW_THRESHOLD = 8\nexport const MIN_HEIGHT = 80\nexport const FALLBACK_THRESHOLD = 16\nexport const VIEWPORT_NAME = 'SelectViewport'\n"],
5
- "mappings": "AAAO,MAAM,cAAc;AACpB,MAAM,iBAAiB;AACvB,MAAM,wBAAwB;AAC9B,MAAM,yBAAyB;AAC/B,MAAM,aAAa;AACnB,MAAM,qBAAqB;AAC3B,MAAM,gBAAgB;",
6
- "names": []
5
+ "mappings": "AAAO,MAAMA,EAAc,SACdC,EAAiB,EACjBC,EAAwB,EACxBC,EAAyB,EACzBC,EAAa,GACbC,EAAqB,GACrBC,EAAgB",
6
+ "names": ["SELECT_NAME", "WINDOW_PADDING", "SCROLL_ARROW_VELOCITY", "SCROLL_ARROW_THRESHOLD", "MIN_HEIGHT", "FALLBACK_THRESHOLD", "VIEWPORT_NAME"]
7
7
  }