@tamagui/select 1.47.4 → 1.47.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Select.js +82 -40
- package/dist/cjs/Select.js.map +1 -1
- package/dist/cjs/SelectContent.js +2 -1
- package/dist/cjs/SelectContent.js.map +1 -1
- package/dist/cjs/SelectImpl.js +38 -23
- package/dist/cjs/SelectImpl.js.map +2 -2
- package/dist/cjs/SelectItem.js +24 -12
- package/dist/cjs/SelectItem.js.map +1 -1
- package/dist/cjs/SelectTrigger.js +7 -6
- package/dist/cjs/SelectTrigger.js.map +1 -1
- package/dist/cjs/SelectViewport.js +6 -5
- package/dist/cjs/SelectViewport.js.map +1 -1
- package/dist/cjs/context.js +19 -4
- package/dist/cjs/context.js.map +1 -1
- package/dist/esm/Select.js +89 -41
- package/dist/esm/Select.js.map +1 -1
- package/dist/esm/SelectContent.js +3 -2
- package/dist/esm/SelectContent.js.map +1 -1
- package/dist/esm/SelectImpl.js +42 -23
- package/dist/esm/SelectImpl.js.map +1 -1
- package/dist/esm/SelectItem.js +28 -13
- package/dist/esm/SelectItem.js.map +1 -1
- package/dist/esm/SelectTrigger.js +8 -7
- package/dist/esm/SelectTrigger.js.map +1 -1
- package/dist/esm/SelectViewport.js +11 -6
- package/dist/esm/SelectViewport.js.map +1 -1
- package/dist/esm/context.js +14 -3
- package/dist/esm/context.js.map +1 -1
- package/dist/jsx/Select.js +66 -22
- package/dist/jsx/Select.js.map +1 -1
- package/dist/jsx/SelectContent.js +3 -2
- package/dist/jsx/SelectContent.js.map +1 -1
- package/dist/jsx/SelectImpl.js +38 -23
- package/dist/jsx/SelectImpl.js.map +1 -1
- package/dist/jsx/SelectItem.js +28 -13
- package/dist/jsx/SelectItem.js.map +1 -1
- package/dist/jsx/SelectTrigger.js +8 -7
- package/dist/jsx/SelectTrigger.js.map +1 -1
- package/dist/jsx/SelectViewport.js +11 -6
- package/dist/jsx/SelectViewport.js.map +1 -1
- package/dist/jsx/context.js +14 -3
- package/dist/jsx/context.js.map +1 -1
- package/package.json +19 -19
- package/src/Select.tsx +101 -49
- package/src/SelectContent.tsx +3 -2
- package/src/SelectImpl.tsx +46 -23
- package/src/SelectItem.tsx +33 -14
- package/src/SelectTrigger.tsx +8 -7
- package/src/SelectViewport.tsx +13 -6
- package/src/context.tsx +24 -8
- package/src/types.tsx +24 -18
- package/types/Select.d.ts.map +1 -1
- package/types/SelectContent.d.ts.map +1 -1
- package/types/SelectImpl.d.ts +2 -1
- package/types/SelectImpl.d.ts.map +1 -1
- package/types/SelectItem.d.ts.map +1 -1
- package/types/SelectTrigger.d.ts.map +1 -1
- package/types/SelectViewport.d.ts.map +1 -1
- package/types/context.d.ts +23 -2
- package/types/context.d.ts.map +1 -1
- package/types/types.d.ts +23 -16
- package/types/types.d.ts.map +1 -1
package/src/SelectImpl.tsx
CHANGED
|
@@ -21,10 +21,16 @@ import {
|
|
|
21
21
|
useIsomorphicLayoutEffect,
|
|
22
22
|
} from '@tamagui/core'
|
|
23
23
|
import * as React from 'react'
|
|
24
|
+
import { useMemo } from 'react'
|
|
24
25
|
import { flushSync } from 'react-dom'
|
|
25
26
|
|
|
26
27
|
import { SCROLL_ARROW_THRESHOLD, WINDOW_PADDING } from './constants'
|
|
27
|
-
import {
|
|
28
|
+
import {
|
|
29
|
+
SelectItemParentProvider,
|
|
30
|
+
SelectProvider,
|
|
31
|
+
useSelectContext,
|
|
32
|
+
useSelectItemParentContext,
|
|
33
|
+
} from './context'
|
|
28
34
|
import { SelectImplProps } from './types'
|
|
29
35
|
|
|
30
36
|
// TODO use id for focusing from label
|
|
@@ -38,14 +44,14 @@ export const SelectInlineImpl = (props: SelectImplProps) => {
|
|
|
38
44
|
} = props
|
|
39
45
|
|
|
40
46
|
const selectContext = useSelectContext('SelectSheetImpl', __scopeSelect)
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
const selectItemParentContext = useSelectItemParentContext(
|
|
48
|
+
'SelectSheetImpl',
|
|
49
|
+
__scopeSelect
|
|
50
|
+
)
|
|
51
|
+
const { setActiveIndex, selectedIndex, activeIndex, forceUpdate } = selectContext
|
|
52
|
+
|
|
53
|
+
const { setOpen, setSelectedIndex } = selectItemParentContext
|
|
54
|
+
|
|
49
55
|
const [scrollTop, setScrollTop] = React.useState(0)
|
|
50
56
|
const touch = useIsTouchDevice()
|
|
51
57
|
|
|
@@ -294,7 +300,7 @@ export const SelectInlineImpl = (props: SelectImplProps) => {
|
|
|
294
300
|
|
|
295
301
|
// Scroll the `activeIndex` item into view only in "controlledScrolling"
|
|
296
302
|
// (keyboard nav) mode.
|
|
297
|
-
|
|
303
|
+
React.useEffect(() => {
|
|
298
304
|
if (open && controlledScrolling) {
|
|
299
305
|
if (activeIndex != null) {
|
|
300
306
|
listItemsRef.current[activeIndex]?.scrollIntoView({ block: 'nearest' })
|
|
@@ -305,7 +311,7 @@ export const SelectInlineImpl = (props: SelectImplProps) => {
|
|
|
305
311
|
}, [open, refs, controlledScrolling, activeIndex])
|
|
306
312
|
|
|
307
313
|
// Scroll the `selectedIndex` into view upon opening the floating element.
|
|
308
|
-
|
|
314
|
+
React.useEffect(() => {
|
|
309
315
|
if (open && fallback) {
|
|
310
316
|
if (selectedIndex != null) {
|
|
311
317
|
listItemsRef.current[selectedIndex]?.scrollIntoView({ block: 'nearest' })
|
|
@@ -332,27 +338,29 @@ export const SelectInlineImpl = (props: SelectImplProps) => {
|
|
|
332
338
|
{...(selectContext as Required<typeof selectContext>)}
|
|
333
339
|
setScrollTop={setScrollTop}
|
|
334
340
|
setInnerOffset={setInnerOffset}
|
|
335
|
-
setValueAtIndex={(index, value) => {
|
|
336
|
-
listContentRef.current[index] = value
|
|
337
|
-
}}
|
|
338
341
|
fallback={fallback}
|
|
339
|
-
interactions={interactionsContext}
|
|
340
342
|
floatingContext={context}
|
|
341
343
|
activeIndex={activeIndex}
|
|
342
344
|
canScrollDown={!!showDownArrow}
|
|
343
345
|
canScrollUp={!!showUpArrow}
|
|
344
346
|
controlledScrolling={controlledScrolling}
|
|
345
|
-
dataRef={context.dataRef}
|
|
346
|
-
listRef={listItemsRef}
|
|
347
347
|
blockSelection={blockSelection}
|
|
348
|
-
allowMouseUpRef={allowMouseUpRef}
|
|
349
348
|
upArrowRef={upArrowRef}
|
|
350
349
|
downArrowRef={downArrowRef}
|
|
351
|
-
selectTimeoutRef={selectTimeoutRef}
|
|
352
|
-
allowSelectRef={allowSelectRef}
|
|
353
350
|
update={update}
|
|
354
351
|
>
|
|
355
|
-
|
|
352
|
+
<SelectItemParentProvider
|
|
353
|
+
scope={__scopeSelect}
|
|
354
|
+
{...selectItemParentContext}
|
|
355
|
+
allowMouseUpRef={allowMouseUpRef}
|
|
356
|
+
allowSelectRef={allowSelectRef}
|
|
357
|
+
dataRef={context.dataRef}
|
|
358
|
+
interactions={interactionsContext}
|
|
359
|
+
listRef={listItemsRef}
|
|
360
|
+
selectTimeoutRef={selectTimeoutRef}
|
|
361
|
+
>
|
|
362
|
+
{children}
|
|
363
|
+
</SelectItemParentProvider>
|
|
356
364
|
{/* {isFormControl ? (
|
|
357
365
|
<BubbleSelect
|
|
358
366
|
ref={setBubbleSelect}
|
|
@@ -369,5 +377,20 @@ export const SelectInlineImpl = (props: SelectImplProps) => {
|
|
|
369
377
|
)
|
|
370
378
|
}
|
|
371
379
|
|
|
372
|
-
//
|
|
373
|
-
|
|
380
|
+
// only for debugging if a useMemo is working
|
|
381
|
+
|
|
382
|
+
export const useMemoDebug: typeof useMemo = (fn, args) => {
|
|
383
|
+
let run = 1
|
|
384
|
+
|
|
385
|
+
const res = useMemo(() => {
|
|
386
|
+
run = 0
|
|
387
|
+
return fn()
|
|
388
|
+
}, args)
|
|
389
|
+
|
|
390
|
+
if (run === 1) {
|
|
391
|
+
// rome-ignore lint/nursery/noConsoleLog: <explanation>
|
|
392
|
+
console.log('saved a run')
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
return res
|
|
396
|
+
}
|
package/src/SelectItem.tsx
CHANGED
|
@@ -8,7 +8,11 @@ import {
|
|
|
8
8
|
import { ListItem, ListItemProps } from '@tamagui/list-item'
|
|
9
9
|
import * as React from 'react'
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
createSelectContext,
|
|
13
|
+
useSelectContext,
|
|
14
|
+
useSelectItemParentContext,
|
|
15
|
+
} from './context'
|
|
12
16
|
import { ScopedProps } from './types'
|
|
13
17
|
|
|
14
18
|
/* -------------------------------------------------------------------------------------------------
|
|
@@ -43,25 +47,42 @@ export const SelectItem = React.forwardRef<TamaguiElement, SelectItemProps>(
|
|
|
43
47
|
index,
|
|
44
48
|
...itemProps
|
|
45
49
|
} = props
|
|
46
|
-
const context =
|
|
47
|
-
const isSelected = context.value === value
|
|
48
|
-
const textId = React.useId()
|
|
50
|
+
const context = useSelectItemParentContext(ITEM_NAME, __scopeSelect)
|
|
49
51
|
|
|
50
52
|
const {
|
|
51
|
-
selectedIndex,
|
|
52
53
|
setSelectedIndex,
|
|
53
54
|
listRef,
|
|
54
|
-
open,
|
|
55
55
|
setOpen,
|
|
56
56
|
onChange,
|
|
57
|
-
|
|
57
|
+
activeIndexSubscribe,
|
|
58
|
+
valueSubscribe,
|
|
58
59
|
allowMouseUpRef,
|
|
59
60
|
allowSelectRef,
|
|
60
61
|
setValueAtIndex,
|
|
61
62
|
selectTimeoutRef,
|
|
62
63
|
dataRef,
|
|
64
|
+
interactions,
|
|
65
|
+
shouldRenderWebNative,
|
|
66
|
+
size,
|
|
63
67
|
} = context
|
|
64
68
|
|
|
69
|
+
const [isSelected, setSelected] = React.useState(false)
|
|
70
|
+
const [isActive, setActive] = React.useState(false)
|
|
71
|
+
|
|
72
|
+
React.useEffect(() => {
|
|
73
|
+
return activeIndexSubscribe((i) => {
|
|
74
|
+
setActive(index === i)
|
|
75
|
+
})
|
|
76
|
+
}, [index])
|
|
77
|
+
|
|
78
|
+
React.useEffect(() => {
|
|
79
|
+
return valueSubscribe((val) => {
|
|
80
|
+
setSelected(val === value)
|
|
81
|
+
})
|
|
82
|
+
}, [value])
|
|
83
|
+
|
|
84
|
+
const textId = React.useId()
|
|
85
|
+
|
|
65
86
|
const composedRefs = useComposedRefs(forwardedRef, (node) => {
|
|
66
87
|
if (!isWeb) return
|
|
67
88
|
if (node instanceof HTMLElement) {
|
|
@@ -81,8 +102,8 @@ export const SelectItem = React.forwardRef<TamaguiElement, SelectItemProps>(
|
|
|
81
102
|
setOpen(false)
|
|
82
103
|
}
|
|
83
104
|
|
|
84
|
-
const selectItemProps =
|
|
85
|
-
?
|
|
105
|
+
const selectItemProps = interactions
|
|
106
|
+
? interactions.getItemProps({
|
|
86
107
|
...(isWebTouchable
|
|
87
108
|
? {
|
|
88
109
|
onTouchStart() {
|
|
@@ -141,9 +162,7 @@ export const SelectItem = React.forwardRef<TamaguiElement, SelectItemProps>(
|
|
|
141
162
|
onPress: handleSelect,
|
|
142
163
|
}
|
|
143
164
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
React.useLayoutEffect(() => {
|
|
165
|
+
useIsomorphicLayoutEffect(() => {
|
|
147
166
|
if (isActive) {
|
|
148
167
|
listRef?.current[index]?.focus()
|
|
149
168
|
}
|
|
@@ -156,7 +175,7 @@ export const SelectItem = React.forwardRef<TamaguiElement, SelectItemProps>(
|
|
|
156
175
|
textId={textId || ''}
|
|
157
176
|
isSelected={isSelected}
|
|
158
177
|
>
|
|
159
|
-
{
|
|
178
|
+
{shouldRenderWebNative ? (
|
|
160
179
|
<option value={value}>{props.children}</option>
|
|
161
180
|
) : (
|
|
162
181
|
<ListItem
|
|
@@ -175,7 +194,7 @@ export const SelectItem = React.forwardRef<TamaguiElement, SelectItemProps>(
|
|
|
175
194
|
aria-disabled={disabled || undefined}
|
|
176
195
|
data-disabled={disabled ? '' : undefined}
|
|
177
196
|
tabIndex={disabled ? undefined : -1}
|
|
178
|
-
size={
|
|
197
|
+
size={size}
|
|
179
198
|
{...itemProps}
|
|
180
199
|
{...selectItemProps}
|
|
181
200
|
/>
|
package/src/SelectTrigger.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { TamaguiElement } from '@tamagui/core'
|
|
|
3
3
|
import { ListItem, ListItemProps } from '@tamagui/list-item'
|
|
4
4
|
import * as React from 'react'
|
|
5
5
|
|
|
6
|
-
import { useSelectContext } from './context'
|
|
6
|
+
import { useSelectContext, useSelectItemParentContext } from './context'
|
|
7
7
|
import { ScopedProps } from './types'
|
|
8
8
|
|
|
9
9
|
/* -------------------------------------------------------------------------------------------------
|
|
@@ -18,6 +18,7 @@ export const SelectTrigger = React.forwardRef<TamaguiElement, SelectTriggerProps
|
|
|
18
18
|
const { __scopeSelect, disabled = false, unstyled = false, ...triggerProps } = props
|
|
19
19
|
|
|
20
20
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect)
|
|
21
|
+
const itemParentContext = useSelectItemParentContext(TRIGGER_NAME, __scopeSelect)
|
|
21
22
|
const composedRefs = useComposedRefs(
|
|
22
23
|
forwardedRef,
|
|
23
24
|
context.floatingContext?.refs.setReference as any
|
|
@@ -25,7 +26,7 @@ export const SelectTrigger = React.forwardRef<TamaguiElement, SelectTriggerProps
|
|
|
25
26
|
// const getItems = useCollection(__scopeSelect)
|
|
26
27
|
// const labelId = useLabelContext(context.trigger)
|
|
27
28
|
// const labelledBy = ariaLabelledby || labelId
|
|
28
|
-
if (
|
|
29
|
+
if (itemParentContext.shouldRenderWebNative) {
|
|
29
30
|
return null
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -46,7 +47,7 @@ export const SelectTrigger = React.forwardRef<TamaguiElement, SelectTriggerProps
|
|
|
46
47
|
},
|
|
47
48
|
borderWidth: 1,
|
|
48
49
|
})}
|
|
49
|
-
size={
|
|
50
|
+
size={itemParentContext.size}
|
|
50
51
|
// aria-controls={context.contentId}
|
|
51
52
|
aria-expanded={context.open}
|
|
52
53
|
aria-autocomplete="none"
|
|
@@ -55,17 +56,17 @@ export const SelectTrigger = React.forwardRef<TamaguiElement, SelectTriggerProps
|
|
|
55
56
|
data-disabled={disabled ? '' : undefined}
|
|
56
57
|
{...triggerProps}
|
|
57
58
|
ref={composedRefs}
|
|
58
|
-
{...(process.env.TAMAGUI_TARGET === 'web' &&
|
|
59
|
+
{...(process.env.TAMAGUI_TARGET === 'web' && itemParentContext.interactions
|
|
59
60
|
? {
|
|
60
|
-
...
|
|
61
|
+
...itemParentContext.interactions.getReferenceProps(),
|
|
61
62
|
onMouseDown() {
|
|
62
63
|
context.floatingContext?.update()
|
|
63
|
-
|
|
64
|
+
itemParentContext.setOpen(!context.open)
|
|
64
65
|
},
|
|
65
66
|
}
|
|
66
67
|
: {
|
|
67
68
|
onPress() {
|
|
68
|
-
|
|
69
|
+
itemParentContext.setOpen(!context.open)
|
|
69
70
|
},
|
|
70
71
|
})}
|
|
71
72
|
/>
|
package/src/SelectViewport.tsx
CHANGED
|
@@ -12,7 +12,11 @@ import { ThemeableStack } from '@tamagui/stacks'
|
|
|
12
12
|
import * as React from 'react'
|
|
13
13
|
|
|
14
14
|
import { VIEWPORT_NAME } from './constants'
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
ForwardSelectContext,
|
|
17
|
+
useSelectContext,
|
|
18
|
+
useSelectItemParentContext,
|
|
19
|
+
} from './context'
|
|
16
20
|
import { ScopedProps, SelectViewportProps } from './types'
|
|
17
21
|
import { useSelectBreakpointActive } from './useSelectBreakpointActive'
|
|
18
22
|
|
|
@@ -53,6 +57,7 @@ export const SelectViewport = SelectViewportFrame.styleable<SelectViewportProps>
|
|
|
53
57
|
function SelectViewport(props: ScopedProps<SelectViewportProps>, forwardedRef) {
|
|
54
58
|
const { __scopeSelect, children, disableScroll, ...viewportProps } = props
|
|
55
59
|
const context = useSelectContext(VIEWPORT_NAME, __scopeSelect)
|
|
60
|
+
const itemContext = useSelectItemParentContext(VIEWPORT_NAME, __scopeSelect)
|
|
56
61
|
const breakpointActive = useSelectBreakpointActive(context.sheetBreakpoint)
|
|
57
62
|
|
|
58
63
|
useIsomorphicLayoutEffect(() => {
|
|
@@ -66,19 +71,21 @@ export const SelectViewport = SelectViewportFrame.styleable<SelectViewportProps>
|
|
|
66
71
|
context.floatingContext?.refs.setFloating
|
|
67
72
|
)
|
|
68
73
|
|
|
69
|
-
if (
|
|
74
|
+
if (itemContext.shouldRenderWebNative) {
|
|
70
75
|
return <>{children}</>
|
|
71
76
|
}
|
|
72
77
|
|
|
73
78
|
if (breakpointActive || !isWeb) {
|
|
74
79
|
return (
|
|
75
80
|
<PortalItem hostName={`${context.scopeKey}SheetContents`}>
|
|
76
|
-
<ForwardSelectContext context={context}>
|
|
81
|
+
<ForwardSelectContext itemContext={itemContext} context={context}>
|
|
82
|
+
{children}
|
|
83
|
+
</ForwardSelectContext>
|
|
77
84
|
</PortalItem>
|
|
78
85
|
)
|
|
79
86
|
}
|
|
80
87
|
|
|
81
|
-
if (!
|
|
88
|
+
if (!itemContext.interactions) {
|
|
82
89
|
if (process.env.NODE_ENV === 'development') {
|
|
83
90
|
console.warn(`No interactions provided to Select, potentially missing Adapt`)
|
|
84
91
|
}
|
|
@@ -89,7 +96,7 @@ export const SelectViewport = SelectViewportFrame.styleable<SelectViewportProps>
|
|
|
89
96
|
const {
|
|
90
97
|
style: { scrollbarWidth, listStyleType, overflow, ...restStyle },
|
|
91
98
|
...floatingProps
|
|
92
|
-
} =
|
|
99
|
+
} = itemContext.interactions.getFloatingProps()
|
|
93
100
|
|
|
94
101
|
return (
|
|
95
102
|
<>
|
|
@@ -105,7 +112,7 @@ export const SelectViewport = SelectViewportFrame.styleable<SelectViewportProps>
|
|
|
105
112
|
{context.open ? (
|
|
106
113
|
<SelectViewportFrame
|
|
107
114
|
key="select-viewport"
|
|
108
|
-
size={
|
|
115
|
+
size={itemContext.size}
|
|
109
116
|
// @ts-ignore
|
|
110
117
|
role="presentation"
|
|
111
118
|
{...viewportProps}
|
package/src/context.tsx
CHANGED
|
@@ -1,20 +1,36 @@
|
|
|
1
1
|
import { createContextScope } from '@tamagui/create-context'
|
|
2
2
|
|
|
3
3
|
import { SELECT_NAME } from './constants'
|
|
4
|
-
import { ScopedProps, SelectContextValue } from './types'
|
|
4
|
+
import { ScopedProps, SelectContextValue, SelectItemParentContextValue } from './types'
|
|
5
5
|
|
|
6
|
-
export const [createSelectContext, createSelectScope] =
|
|
7
|
-
createContextScope(SELECT_NAME)
|
|
6
|
+
export const [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME)
|
|
8
7
|
|
|
9
8
|
export const [SelectProvider, useSelectContext] =
|
|
10
9
|
createSelectContext<SelectContextValue>(SELECT_NAME)
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
// these values shouldn't change as often for performance to avoid re-rendering every item
|
|
12
|
+
|
|
13
|
+
export const [createSelectItemParentContext, createSelectItemParentScope] =
|
|
14
|
+
createContextScope(SELECT_NAME + 'ItemParent')
|
|
15
|
+
|
|
16
|
+
export const [SelectItemParentProvider, useSelectItemParentContext] =
|
|
17
|
+
createSelectContext<SelectItemParentContextValue>(SELECT_NAME)
|
|
18
|
+
|
|
19
|
+
export const ForwardSelectContext = ({
|
|
20
|
+
__scopeSelect,
|
|
21
|
+
context,
|
|
22
|
+
itemContext,
|
|
23
|
+
children,
|
|
24
|
+
}: ScopedProps<{
|
|
25
|
+
children?: any
|
|
26
|
+
context: SelectContextValue
|
|
27
|
+
itemContext: SelectItemParentContextValue
|
|
28
|
+
}>) => {
|
|
15
29
|
return (
|
|
16
|
-
<SelectProvider isInSheet scope={
|
|
17
|
-
{
|
|
30
|
+
<SelectProvider isInSheet scope={__scopeSelect} {...context}>
|
|
31
|
+
<SelectItemParentProvider scope={__scopeSelect} {...itemContext}>
|
|
32
|
+
{children}
|
|
33
|
+
</SelectItemParentProvider>
|
|
18
34
|
</SelectProvider>
|
|
19
35
|
)
|
|
20
36
|
}
|
package/src/types.tsx
CHANGED
|
@@ -33,52 +33,58 @@ export interface SelectProps {
|
|
|
33
33
|
native?: NativeValue<'web'>
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
type DisposeFn = () => void
|
|
37
|
+
export type EmitterSubscriber<Val> = (cb: (val: Val) => void) => DisposeFn
|
|
38
|
+
|
|
39
|
+
export interface SelectItemParentContextValue {
|
|
40
|
+
setSelectedIndex: (index: number) => void
|
|
41
|
+
listRef?: MutableRefObject<Array<HTMLElement | null>>
|
|
42
|
+
setOpen: (open: boolean) => void
|
|
43
|
+
onChange: (value: string) => void
|
|
44
|
+
activeIndexSubscribe: EmitterSubscriber<number>
|
|
45
|
+
valueSubscribe: EmitterSubscriber<any>
|
|
46
|
+
allowSelectRef?: MutableRefObject<boolean>
|
|
47
|
+
allowMouseUpRef?: MutableRefObject<boolean>
|
|
48
|
+
setValueAtIndex: (index: number, value: string) => void
|
|
49
|
+
selectTimeoutRef?: MutableRefObject<any>
|
|
50
|
+
dataRef?: MutableRefObject<ContextData>
|
|
51
|
+
interactions?: {
|
|
52
|
+
getReferenceProps: (userProps?: HTMLProps<Element> | undefined) => any
|
|
53
|
+
getFloatingProps: (userProps?: HTMLProps<HTMLElement> | undefined) => any
|
|
54
|
+
getItemProps: (userProps?: HTMLProps<HTMLElement> | undefined) => any
|
|
55
|
+
}
|
|
56
|
+
shouldRenderWebNative?: boolean
|
|
57
|
+
size?: SizeTokens
|
|
58
|
+
}
|
|
59
|
+
|
|
36
60
|
export interface SelectContextValue {
|
|
37
61
|
dir?: Direction
|
|
38
62
|
scopeKey: string
|
|
39
63
|
sheetBreakpoint: string | boolean | null
|
|
40
|
-
size?: SizeTokens
|
|
41
64
|
value: any
|
|
42
65
|
selectedItem: ReactNode
|
|
43
66
|
setSelectedItem: (item: ReactNode) => void
|
|
44
67
|
selectedIndex: number
|
|
45
|
-
setSelectedIndex: (index: number) => void
|
|
46
68
|
activeIndex: number | null
|
|
47
69
|
setActiveIndex: (index: number | null) => void
|
|
48
|
-
setValueAtIndex: (index: number, value: string) => void
|
|
49
70
|
open: boolean
|
|
50
|
-
setOpen: (open: boolean) => void
|
|
51
|
-
onChange: (value: string) => void
|
|
52
71
|
valueNode: Element | null
|
|
53
72
|
onValueNodeChange(node: HTMLElement): void
|
|
54
73
|
forceUpdate: DispatchWithoutAction
|
|
55
|
-
|
|
56
74
|
// SheetImpl only:
|
|
57
75
|
isInSheet?: boolean
|
|
58
|
-
|
|
59
76
|
// InlineImpl only:
|
|
60
77
|
fallback: boolean
|
|
61
78
|
blockSelection: boolean
|
|
62
|
-
allowSelectRef?: MutableRefObject<boolean>
|
|
63
|
-
allowMouseUpRef?: MutableRefObject<boolean>
|
|
64
79
|
upArrowRef?: MutableRefObject<HTMLDivElement | null>
|
|
65
80
|
downArrowRef?: MutableRefObject<HTMLDivElement | null>
|
|
66
|
-
selectTimeoutRef?: MutableRefObject<any>
|
|
67
81
|
setScrollTop?: Function
|
|
68
82
|
setInnerOffset?: Function
|
|
69
|
-
dataRef?: MutableRefObject<ContextData>
|
|
70
83
|
controlledScrolling?: boolean
|
|
71
|
-
listRef?: MutableRefObject<Array<HTMLElement | null>>
|
|
72
84
|
canScrollUp?: boolean
|
|
73
85
|
canScrollDown?: boolean
|
|
74
86
|
floatingContext?: FloatingContext<ReferenceType>
|
|
75
|
-
interactions?: {
|
|
76
|
-
getReferenceProps: (userProps?: HTMLProps<Element> | undefined) => any
|
|
77
|
-
getFloatingProps: (userProps?: HTMLProps<HTMLElement> | undefined) => any
|
|
78
|
-
getItemProps: (userProps?: HTMLProps<HTMLElement> | undefined) => any
|
|
79
|
-
}
|
|
80
87
|
native?: NativeValue
|
|
81
|
-
shouldRenderWebNative: boolean
|
|
82
88
|
/** update floating-ui to recalculate */
|
|
83
89
|
update?: () => void
|
|
84
90
|
}
|
package/types/Select.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EACd,QAAQ,EACR,cAAc,EACd,kBAAkB,
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EACd,QAAQ,EACR,cAAc,EACd,kBAAkB,EAQnB,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAY,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAO5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAgB9B,OAAO,EAAE,WAAW,EAAmB,WAAW,EAAE,MAAM,SAAS,CAAA;AAYnE,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGpB,CAAA;AAEF,KAAK,gBAAgB,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,GAAG;IAC1D,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC9B,CAAA;AAmDD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKrB,CAAA;AAQF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe9B,CAAA;AAmGF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG3B,CAAA;AAwGF,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAA;AAgC5C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE1B,CAAA;AAoCF,eAAO,MAAM,MAAM,WACT,YAAY,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuJjC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectContent.d.ts","sourceRoot":"","sources":["../src/SelectContent.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAc,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAGlE,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAS5C,eAAO,MAAM,aAAa,4DAKvB,kBAAkB,GAAG,eAAe,
|
|
1
|
+
{"version":3,"file":"SelectContent.d.ts","sourceRoot":"","sources":["../src/SelectContent.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAc,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAGlE,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAS5C,eAAO,MAAM,aAAa,4DAKvB,kBAAkB,GAAG,eAAe,uBAqCtC,CAAA"}
|
package/types/SelectImpl.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
2
|
import { SelectImplProps } from './types';
|
|
3
3
|
export declare const SelectInlineImpl: (props: SelectImplProps) => JSX.Element;
|
|
4
|
+
export declare const useMemoDebug: typeof useMemo;
|
|
4
5
|
//# sourceMappingURL=SelectImpl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectImpl.d.ts","sourceRoot":"","sources":["../src/SelectImpl.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SelectImpl.d.ts","sourceRoot":"","sources":["../src/SelectImpl.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAU/B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAGzC,eAAO,MAAM,gBAAgB,UAAW,eAAe,gBAqVtD,CAAA;AAID,eAAO,MAAM,YAAY,EAAE,OAAO,OAcjC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectItem.d.ts","sourceRoot":"","sources":["../src/SelectItem.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EAIf,MAAM,eAAe,CAAA;AACtB,OAAO,EAAY,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"SelectItem.d.ts","sourceRoot":"","sources":["../src/SelectItem.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EAIf,MAAM,eAAe,CAAA;AACtB,OAAO,EAAY,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAe9B,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,eAAO,MAAO,yBAAyB;;;;;;GAAE,oBAAoB;;;wCACL,CAAA;AAExD,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,UAAU,wFAqKtB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectTrigger.d.ts","sourceRoot":"","sources":["../src/SelectTrigger.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAY,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAU9B,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAA;AAE9C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SelectTrigger.d.ts","sourceRoot":"","sources":["../src/SelectTrigger.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAY,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAU9B,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAA;AAE9C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA2DzB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectViewport.d.ts","sourceRoot":"","sources":["../src/SelectViewport.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EAIf,MAAM,eAAe,CAAA;AAItB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"SelectViewport.d.ts","sourceRoot":"","sources":["../src/SelectViewport.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EAIf,MAAM,eAAe,CAAA;AAItB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAe9B,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2B9B,CAAA;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiF1B,CAAA"}
|
package/types/context.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ScopedProps, SelectContextValue } from './types';
|
|
2
|
+
import { ScopedProps, SelectContextValue, SelectItemParentContextValue } from './types';
|
|
3
3
|
export declare const createSelectContext: <ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType | undefined) => readonly [{
|
|
4
4
|
(props: ContextValueType & {
|
|
5
5
|
scope: import("@tamagui/create-context").Scope<ContextValueType>;
|
|
@@ -20,8 +20,29 @@ export declare const SelectProvider: {
|
|
|
20
20
|
warn?: boolean | undefined;
|
|
21
21
|
fallback?: Partial<SelectContextValue> | undefined;
|
|
22
22
|
} | undefined) => SelectContextValue;
|
|
23
|
-
export declare const
|
|
23
|
+
export declare const createSelectItemParentContext: <ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType | undefined) => readonly [{
|
|
24
|
+
(props: ContextValueType & {
|
|
25
|
+
scope: import("@tamagui/create-context").Scope<ContextValueType>;
|
|
26
|
+
children: import("react").ReactNode;
|
|
27
|
+
}): JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
}, (consumerName: string, scope: import("@tamagui/create-context").Scope<ContextValueType | undefined>, options?: {
|
|
30
|
+
warn?: boolean | undefined;
|
|
31
|
+
fallback?: Partial<ContextValueType> | undefined;
|
|
32
|
+
} | undefined) => ContextValueType], createSelectItemParentScope: import("@tamagui/create-context").CreateScope;
|
|
33
|
+
export declare const SelectItemParentProvider: {
|
|
34
|
+
(props: SelectItemParentContextValue & {
|
|
35
|
+
scope: import("@tamagui/create-context").Scope<SelectItemParentContextValue>;
|
|
36
|
+
children: import("react").ReactNode;
|
|
37
|
+
}): JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
}, useSelectItemParentContext: (consumerName: string, scope: import("@tamagui/create-context").Scope<SelectItemParentContextValue | undefined>, options?: {
|
|
40
|
+
warn?: boolean | undefined;
|
|
41
|
+
fallback?: Partial<SelectItemParentContextValue> | undefined;
|
|
42
|
+
} | undefined) => SelectItemParentContextValue;
|
|
43
|
+
export declare const ForwardSelectContext: ({ __scopeSelect, context, itemContext, children, }: ScopedProps<{
|
|
24
44
|
children?: any;
|
|
25
45
|
context: SelectContextValue;
|
|
46
|
+
itemContext: SelectItemParentContextValue;
|
|
26
47
|
}>) => JSX.Element;
|
|
27
48
|
//# sourceMappingURL=context.d.ts.map
|
package/types/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAEvF,eAAO,MAAO,mBAAmB;;;;;;;;;qCAAE,iBAAiB,+CAAmC,CAAA;AAEvF,eAAO,MAAO,cAAc;;;;;;GAAE,gBAAgB;;;oCACQ,CAAA;AAItD,eAAO,MAAO,6BAA6B;;;;;;;;;qCAAE,2BAA2B,+CACxB,CAAA;AAEhD,eAAO,MAAO,wBAAwB;;;;;;GAAE,0BAA0B;;;8CACF,CAAA;AAEhE,eAAO,MAAM,oBAAoB;eAMpB,GAAG;aACL,kBAAkB;iBACd,4BAA4B;kBAS1C,CAAA"}
|
package/types/types.d.ts
CHANGED
|
@@ -30,48 +30,54 @@ export interface SelectProps {
|
|
|
30
30
|
*/
|
|
31
31
|
native?: NativeValue<'web'>;
|
|
32
32
|
}
|
|
33
|
+
type DisposeFn = () => void;
|
|
34
|
+
export type EmitterSubscriber<Val> = (cb: (val: Val) => void) => DisposeFn;
|
|
35
|
+
export interface SelectItemParentContextValue {
|
|
36
|
+
setSelectedIndex: (index: number) => void;
|
|
37
|
+
listRef?: MutableRefObject<Array<HTMLElement | null>>;
|
|
38
|
+
setOpen: (open: boolean) => void;
|
|
39
|
+
onChange: (value: string) => void;
|
|
40
|
+
activeIndexSubscribe: EmitterSubscriber<number>;
|
|
41
|
+
valueSubscribe: EmitterSubscriber<any>;
|
|
42
|
+
allowSelectRef?: MutableRefObject<boolean>;
|
|
43
|
+
allowMouseUpRef?: MutableRefObject<boolean>;
|
|
44
|
+
setValueAtIndex: (index: number, value: string) => void;
|
|
45
|
+
selectTimeoutRef?: MutableRefObject<any>;
|
|
46
|
+
dataRef?: MutableRefObject<ContextData>;
|
|
47
|
+
interactions?: {
|
|
48
|
+
getReferenceProps: (userProps?: HTMLProps<Element> | undefined) => any;
|
|
49
|
+
getFloatingProps: (userProps?: HTMLProps<HTMLElement> | undefined) => any;
|
|
50
|
+
getItemProps: (userProps?: HTMLProps<HTMLElement> | undefined) => any;
|
|
51
|
+
};
|
|
52
|
+
shouldRenderWebNative?: boolean;
|
|
53
|
+
size?: SizeTokens;
|
|
54
|
+
}
|
|
33
55
|
export interface SelectContextValue {
|
|
34
56
|
dir?: Direction;
|
|
35
57
|
scopeKey: string;
|
|
36
58
|
sheetBreakpoint: string | boolean | null;
|
|
37
|
-
size?: SizeTokens;
|
|
38
59
|
value: any;
|
|
39
60
|
selectedItem: ReactNode;
|
|
40
61
|
setSelectedItem: (item: ReactNode) => void;
|
|
41
62
|
selectedIndex: number;
|
|
42
|
-
setSelectedIndex: (index: number) => void;
|
|
43
63
|
activeIndex: number | null;
|
|
44
64
|
setActiveIndex: (index: number | null) => void;
|
|
45
|
-
setValueAtIndex: (index: number, value: string) => void;
|
|
46
65
|
open: boolean;
|
|
47
|
-
setOpen: (open: boolean) => void;
|
|
48
|
-
onChange: (value: string) => void;
|
|
49
66
|
valueNode: Element | null;
|
|
50
67
|
onValueNodeChange(node: HTMLElement): void;
|
|
51
68
|
forceUpdate: DispatchWithoutAction;
|
|
52
69
|
isInSheet?: boolean;
|
|
53
70
|
fallback: boolean;
|
|
54
71
|
blockSelection: boolean;
|
|
55
|
-
allowSelectRef?: MutableRefObject<boolean>;
|
|
56
|
-
allowMouseUpRef?: MutableRefObject<boolean>;
|
|
57
72
|
upArrowRef?: MutableRefObject<HTMLDivElement | null>;
|
|
58
73
|
downArrowRef?: MutableRefObject<HTMLDivElement | null>;
|
|
59
|
-
selectTimeoutRef?: MutableRefObject<any>;
|
|
60
74
|
setScrollTop?: Function;
|
|
61
75
|
setInnerOffset?: Function;
|
|
62
|
-
dataRef?: MutableRefObject<ContextData>;
|
|
63
76
|
controlledScrolling?: boolean;
|
|
64
|
-
listRef?: MutableRefObject<Array<HTMLElement | null>>;
|
|
65
77
|
canScrollUp?: boolean;
|
|
66
78
|
canScrollDown?: boolean;
|
|
67
79
|
floatingContext?: FloatingContext<ReferenceType>;
|
|
68
|
-
interactions?: {
|
|
69
|
-
getReferenceProps: (userProps?: HTMLProps<Element> | undefined) => any;
|
|
70
|
-
getFloatingProps: (userProps?: HTMLProps<HTMLElement> | undefined) => any;
|
|
71
|
-
getItemProps: (userProps?: HTMLProps<HTMLElement> | undefined) => any;
|
|
72
|
-
};
|
|
73
80
|
native?: NativeValue;
|
|
74
|
-
shouldRenderWebNative: boolean;
|
|
75
81
|
/** update floating-ui to recalculate */
|
|
76
82
|
update?: () => void;
|
|
77
83
|
}
|
|
@@ -90,4 +96,5 @@ export interface SelectScrollButtonImplProps extends YStackProps {
|
|
|
90
96
|
}
|
|
91
97
|
export interface SelectScrollButtonProps extends Omit<SelectScrollButtonImplProps, 'dir' | 'componentName'> {
|
|
92
98
|
}
|
|
99
|
+
export {};
|
|
93
100
|
//# sourceMappingURL=types.d.ts.map
|