@tamagui/select 1.99.1 → 1.100.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Select.js.map +1 -1
- package/dist/cjs/Select.native.js +10 -20
- package/dist/cjs/Select.native.js.map +1 -1
- package/dist/cjs/SelectImpl.js +1 -2
- package/dist/cjs/SelectImpl.js.map +1 -1
- package/dist/cjs/SelectItem.js.map +1 -1
- package/dist/cjs/SelectItem.native.js +8 -16
- package/dist/cjs/SelectItem.native.js.map +1 -1
- package/dist/cjs/SelectItemText.native.js +2 -4
- package/dist/cjs/SelectItemText.native.js.map +1 -1
- package/dist/cjs/SelectScrollButton.js.map +1 -1
- package/dist/cjs/SelectScrollButton.native.js.map +1 -1
- package/dist/cjs/SelectTrigger.js.map +1 -1
- package/dist/cjs/SelectTrigger.native.js +2 -4
- package/dist/cjs/SelectTrigger.native.js.map +1 -1
- package/dist/cjs/SelectViewport.js.map +1 -1
- package/dist/cjs/context.native.js +6 -12
- package/dist/cjs/context.native.js.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/Select.js.map +1 -1
- package/dist/esm/Select.native.js +10 -20
- package/dist/esm/Select.native.js.map +1 -1
- package/dist/esm/SelectImpl.js +1 -2
- package/dist/esm/SelectImpl.js.map +1 -1
- package/dist/esm/SelectItem.js.map +1 -1
- package/dist/esm/SelectItem.native.js +8 -16
- package/dist/esm/SelectItem.native.js.map +1 -1
- package/dist/esm/SelectItemText.native.js +2 -4
- package/dist/esm/SelectItemText.native.js.map +1 -1
- package/dist/esm/SelectScrollButton.js.map +1 -1
- package/dist/esm/SelectScrollButton.native.js.map +1 -1
- package/dist/esm/SelectTrigger.js.map +1 -1
- package/dist/esm/SelectTrigger.native.js +2 -4
- package/dist/esm/SelectTrigger.native.js.map +1 -1
- package/dist/esm/SelectViewport.js.map +1 -1
- package/dist/esm/context.native.js +6 -12
- package/dist/esm/context.native.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/jsx/Select.js.map +1 -1
- package/dist/jsx/Select.native.js +10 -20
- package/dist/jsx/Select.native.js.map +1 -1
- package/dist/jsx/SelectImpl.js +1 -2
- package/dist/jsx/SelectImpl.js.map +1 -1
- package/dist/jsx/SelectItem.js.map +1 -1
- package/dist/jsx/SelectItem.native.js +8 -16
- package/dist/jsx/SelectItem.native.js.map +1 -1
- package/dist/jsx/SelectItemText.native.js +2 -4
- package/dist/jsx/SelectItemText.native.js.map +1 -1
- package/dist/jsx/SelectScrollButton.js.map +1 -1
- package/dist/jsx/SelectScrollButton.native.js.map +1 -1
- package/dist/jsx/SelectTrigger.js.map +1 -1
- package/dist/jsx/SelectTrigger.native.js +2 -4
- package/dist/jsx/SelectTrigger.native.js.map +1 -1
- package/dist/jsx/SelectViewport.js.map +1 -1
- package/dist/jsx/context.native.js +6 -12
- package/dist/jsx/context.native.js.map +1 -1
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +25 -25
- package/src/Select.tsx +7 -7
- package/src/SelectItem.tsx +2 -2
- package/src/SelectItemText.tsx +2 -2
- package/src/SelectScrollButton.native.tsx +5 -3
- package/src/SelectScrollButton.tsx +4 -4
- package/src/SelectTrigger.tsx +2 -2
- package/src/SelectViewport.native.tsx +2 -2
- package/src/SelectViewport.tsx +6 -2
- package/src/context.tsx +2 -2
- package/src/index.tsx +2 -7
- package/src/types.tsx +6 -6
- package/types/Select.d.ts +2 -2
- package/types/Select.d.ts.map +1 -1
- package/types/SelectScrollButton.native.d.ts +3 -3
- package/types/SelectScrollButton.native.d.ts.map +1 -1
- package/types/SelectViewport.d.ts.map +1 -1
- package/types/SelectViewport.native.d.ts +2 -2
- package/types/SelectViewport.native.d.ts.map +1 -1
- package/types/context.d.ts +2 -2
- package/types/context.d.ts.map +1 -1
- package/types/index.d.ts +2 -2
- package/types/index.d.ts.map +1 -1
- package/types/types.d.ts +6 -6
- package/types/types.d.ts.map +1 -1
|
@@ -7,7 +7,7 @@ import { flushSync } from 'react-dom'
|
|
|
7
7
|
|
|
8
8
|
import { useSelectContext } from './context'
|
|
9
9
|
import type {
|
|
10
|
-
|
|
10
|
+
SelectScopedProps,
|
|
11
11
|
SelectScrollButtonImplProps,
|
|
12
12
|
SelectScrollButtonProps,
|
|
13
13
|
} from './types'
|
|
@@ -21,7 +21,7 @@ const SCROLL_UP_BUTTON_NAME = 'SelectScrollUpButton'
|
|
|
21
21
|
export const SelectScrollUpButton = React.forwardRef<
|
|
22
22
|
TamaguiElement,
|
|
23
23
|
SelectScrollButtonProps
|
|
24
|
-
>((props:
|
|
24
|
+
>((props: SelectScopedProps<SelectScrollButtonProps>, forwardedRef) => {
|
|
25
25
|
return (
|
|
26
26
|
<SelectScrollButtonImpl
|
|
27
27
|
componentName={SCROLL_UP_BUTTON_NAME}
|
|
@@ -43,7 +43,7 @@ const SCROLL_DOWN_BUTTON_NAME = 'SelectScrollDownButton'
|
|
|
43
43
|
export const SelectScrollDownButton = React.forwardRef<
|
|
44
44
|
TamaguiElement,
|
|
45
45
|
SelectScrollButtonProps
|
|
46
|
-
>((props:
|
|
46
|
+
>((props: SelectScopedProps<SelectScrollButtonProps>, forwardedRef) => {
|
|
47
47
|
return (
|
|
48
48
|
<SelectScrollButtonImpl
|
|
49
49
|
componentName={SCROLL_DOWN_BUTTON_NAME}
|
|
@@ -60,7 +60,7 @@ type SelectScrollButtonImplElement = TamaguiElement
|
|
|
60
60
|
|
|
61
61
|
const SelectScrollButtonImpl = React.memo(
|
|
62
62
|
React.forwardRef<SelectScrollButtonImplElement, SelectScrollButtonImplProps>(
|
|
63
|
-
(props:
|
|
63
|
+
(props: SelectScopedProps<SelectScrollButtonImplProps>, forwardedRef) => {
|
|
64
64
|
const { __scopeSelect, dir, componentName, ...scrollIndicatorProps } = props
|
|
65
65
|
const { forceUpdate, open, fallback, setScrollTop, setInnerOffset, ...context } =
|
|
66
66
|
useSelectContext(componentName, __scopeSelect)
|
package/src/SelectTrigger.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { ListItem } from '@tamagui/list-item'
|
|
|
5
5
|
import * as React from 'react'
|
|
6
6
|
|
|
7
7
|
import { useSelectContext, useSelectItemParentContext } from './context'
|
|
8
|
-
import type {
|
|
8
|
+
import type { SelectScopedProps } from './types'
|
|
9
9
|
|
|
10
10
|
/* -------------------------------------------------------------------------------------------------
|
|
11
11
|
* SelectTrigger
|
|
@@ -18,7 +18,7 @@ const isPointerCoarse =
|
|
|
18
18
|
isWeb && isClient ? window.matchMedia('(pointer:coarse)').matches : true
|
|
19
19
|
|
|
20
20
|
export const SelectTrigger = React.forwardRef<TamaguiElement, SelectTriggerProps>(
|
|
21
|
-
function SelectTrigger(props:
|
|
21
|
+
function SelectTrigger(props: SelectScopedProps<SelectTriggerProps>, forwardedRef) {
|
|
22
22
|
const { __scopeSelect, disabled = false, unstyled = false, ...triggerProps } = props
|
|
23
23
|
|
|
24
24
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect)
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
useSelectContext,
|
|
10
10
|
useSelectItemParentContext,
|
|
11
11
|
} from './context'
|
|
12
|
-
import type {
|
|
12
|
+
import type { SelectScopedProps, SelectViewportProps } from './types'
|
|
13
13
|
|
|
14
|
-
export const SelectViewport = (props:
|
|
14
|
+
export const SelectViewport = (props: SelectScopedProps<SelectViewportProps>) => {
|
|
15
15
|
const { __scopeSelect, children } = props
|
|
16
16
|
const context = useSelectContext(VIEWPORT_NAME, __scopeSelect)
|
|
17
17
|
const itemParentContext = useSelectItemParentContext(VIEWPORT_NAME, __scopeSelect)
|
package/src/SelectViewport.tsx
CHANGED
|
@@ -12,7 +12,11 @@ import {
|
|
|
12
12
|
useSelectContext,
|
|
13
13
|
useSelectItemParentContext,
|
|
14
14
|
} from './context'
|
|
15
|
-
import type {
|
|
15
|
+
import type {
|
|
16
|
+
SelectScopedProps,
|
|
17
|
+
SelectViewportExtraProps,
|
|
18
|
+
SelectViewportProps,
|
|
19
|
+
} from './types'
|
|
16
20
|
import { useSelectBreakpointActive } from './useSelectBreakpointActive'
|
|
17
21
|
|
|
18
22
|
/* -------------------------------------------------------------------------------------------------
|
|
@@ -49,7 +53,7 @@ export const SelectViewportFrame = styled(ThemeableStack, {
|
|
|
49
53
|
})
|
|
50
54
|
|
|
51
55
|
export const SelectViewport = SelectViewportFrame.styleable<SelectViewportExtraProps>(
|
|
52
|
-
function SelectViewport(props:
|
|
56
|
+
function SelectViewport(props: SelectScopedProps<SelectViewportProps>, forwardedRef) {
|
|
53
57
|
const { __scopeSelect, children, disableScroll, ...viewportProps } = props
|
|
54
58
|
const context = useSelectContext(VIEWPORT_NAME, __scopeSelect)
|
|
55
59
|
const itemContext = useSelectItemParentContext(VIEWPORT_NAME, __scopeSelect)
|
package/src/context.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { createContextScope } from '@tamagui/create-context'
|
|
|
2
2
|
|
|
3
3
|
import { SELECT_NAME } from './constants'
|
|
4
4
|
import type {
|
|
5
|
-
|
|
5
|
+
SelectScopedProps,
|
|
6
6
|
SelectContextValue,
|
|
7
7
|
SelectItemParentContextValue,
|
|
8
8
|
} from './types'
|
|
@@ -25,7 +25,7 @@ export const ForwardSelectContext = ({
|
|
|
25
25
|
context,
|
|
26
26
|
itemContext,
|
|
27
27
|
children,
|
|
28
|
-
}:
|
|
28
|
+
}: SelectScopedProps<{
|
|
29
29
|
children?: any
|
|
30
30
|
context: SelectContextValue
|
|
31
31
|
itemContext: SelectItemParentContextValue
|
package/src/index.tsx
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
export * from './Select'
|
|
2
|
-
export type
|
|
3
|
-
SelectContentProps,
|
|
4
|
-
SelectProps,
|
|
5
|
-
SelectScrollButtonProps,
|
|
6
|
-
SelectViewportProps,
|
|
7
|
-
} from './types'
|
|
2
|
+
export type * from './types'
|
|
8
3
|
export * from './context'
|
|
9
|
-
export type { SelectItemProps } from './SelectItem'
|
|
4
|
+
export type { SelectItemProps, SelectItemExtraProps } from './SelectItem'
|
|
10
5
|
export type { SelectTriggerProps } from './SelectTrigger'
|
package/src/types.tsx
CHANGED
|
@@ -4,11 +4,11 @@ import type { Scope } from '@tamagui/create-context'
|
|
|
4
4
|
import type { ThemeableStackProps, YStackProps } from '@tamagui/stacks'
|
|
5
5
|
import type { DispatchWithoutAction, HTMLProps, MutableRefObject, ReactNode } from 'react'
|
|
6
6
|
|
|
7
|
-
export type
|
|
7
|
+
export type SelectDirection = 'ltr' | 'rtl'
|
|
8
8
|
|
|
9
|
-
export type
|
|
9
|
+
export type SelectScopedProps<P> = P & { __scopeSelect?: Scope }
|
|
10
10
|
|
|
11
|
-
export type SelectImplProps =
|
|
11
|
+
export type SelectImplProps = SelectScopedProps<SelectProps> & {
|
|
12
12
|
activeIndexRef: any
|
|
13
13
|
selectedIndexRef: any
|
|
14
14
|
listContentRef: any
|
|
@@ -23,7 +23,7 @@ export interface SelectProps {
|
|
|
23
23
|
open?: boolean
|
|
24
24
|
defaultOpen?: boolean
|
|
25
25
|
onOpenChange?(open: boolean): void
|
|
26
|
-
dir?:
|
|
26
|
+
dir?: SelectDirection
|
|
27
27
|
name?: string
|
|
28
28
|
autoComplete?: string
|
|
29
29
|
size?: SizeTokens
|
|
@@ -71,7 +71,7 @@ export interface SelectItemParentContextValue {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
export interface SelectContextValue {
|
|
74
|
-
dir?:
|
|
74
|
+
dir?: SelectDirection
|
|
75
75
|
scopeKey: string
|
|
76
76
|
sheetBreakpoint: string | boolean | null
|
|
77
77
|
value: any
|
|
@@ -111,7 +111,7 @@ export interface SelectViewportExtraProps {
|
|
|
111
111
|
|
|
112
112
|
export type SelectViewportProps = ThemeableStackProps & SelectViewportExtraProps
|
|
113
113
|
|
|
114
|
-
export type SelectContentProps =
|
|
114
|
+
export type SelectContentProps = SelectScopedProps<{
|
|
115
115
|
children?: React.ReactNode
|
|
116
116
|
zIndex?: number
|
|
117
117
|
}>
|
package/types/Select.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FontSizeTokens, TamaguiElement } from '@tamagui/core';
|
|
2
2
|
import type { ListItemProps } from '@tamagui/list-item';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import type {
|
|
4
|
+
import type { SelectScopedProps, SelectProps } from './types';
|
|
5
5
|
export interface SelectValueExtraProps {
|
|
6
6
|
placeholder?: React.ReactNode;
|
|
7
7
|
}
|
|
@@ -29,7 +29,7 @@ export type SelectLabelProps = ListItemProps;
|
|
|
29
29
|
export declare const SelectSeparator: import("@tamagui/core").TamaguiComponent<import("@tamagui/core").TamaDefer, TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
|
|
30
30
|
vertical?: boolean | undefined;
|
|
31
31
|
}, import("@tamagui/core").StaticConfigPublic>;
|
|
32
|
-
export declare const Select: ((props:
|
|
32
|
+
export declare const Select: ((props: SelectScopedProps<SelectProps>) => import("react/jsx-runtime").JSX.Element) & {
|
|
33
33
|
Adapt: (({ platform, when, children }: import("@tamagui/adapt").AdaptProps) => any) & {
|
|
34
34
|
Contents: {
|
|
35
35
|
(props: any): React.FunctionComponentElement<any>;
|
package/types/Select.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAY,cAAc,EAAE,MAAM,eAAe,CAAA;AAI7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AASvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAkB9B,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"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electScopedProps, SelectScrollButtonProps } from './types';
|
|
2
|
+
export declare const SelectScrollUpButton: (_: SelectScopedProps<SelectScrollButtonProps>) => null;
|
|
3
|
+
export declare const SelectScrollDownButton: (_: SelectScopedProps<SelectScrollButtonProps>) => null;
|
|
4
4
|
//# sourceMappingURL=SelectScrollButton.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectScrollButton.native.d.ts","sourceRoot":"","sources":["../src/SelectScrollButton.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"SelectScrollButton.native.d.ts","sourceRoot":"","sources":["../src/SelectScrollButton.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAGzE,eAAO,MAAM,oBAAoB,MAAO,kBAAkB,uBAAuB,CAAC,SAC5E,CAAA;AAGN,eAAO,MAAM,sBAAsB,MAAO,kBAAkB,uBAAuB,CAAC,SAC9E,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectViewport.d.ts","sourceRoot":"","sources":["../src/SelectViewport.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"SelectViewport.d.ts","sourceRoot":"","sources":["../src/SelectViewport.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAEV,wBAAwB,EAEzB,MAAM,SAAS,CAAA;AAOhB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;8CA2B9B,CAAA;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAsF1B,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SelectScopedProps, SelectViewportProps } from './types';
|
|
2
2
|
export declare const SelectViewport: {
|
|
3
|
-
(props:
|
|
3
|
+
(props: SelectScopedProps<SelectViewportProps>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=SelectViewport.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectViewport.native.d.ts","sourceRoot":"","sources":["../src/SelectViewport.native.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"SelectViewport.native.d.ts","sourceRoot":"","sources":["../src/SelectViewport.native.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAErE,eAAO,MAAM,cAAc;YAAW,kBAAkB,mBAAmB,CAAC;;CAuB3E,CAAA"}
|
package/types/context.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
2
|
+
import type { SelectScopedProps, 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>;
|
|
@@ -40,7 +40,7 @@ export declare const SelectItemParentProvider: {
|
|
|
40
40
|
warn?: boolean | undefined;
|
|
41
41
|
fallback?: Partial<SelectItemParentContextValue> | undefined;
|
|
42
42
|
} | undefined) => SelectItemParentContextValue;
|
|
43
|
-
export declare const ForwardSelectContext: ({ __scopeSelect, context, itemContext, children, }:
|
|
43
|
+
export declare const ForwardSelectContext: ({ __scopeSelect, context, itemContext, children, }: SelectScopedProps<{
|
|
44
44
|
children?: any;
|
|
45
45
|
context: SelectContextValue;
|
|
46
46
|
itemContext: SelectItemParentContextValue;
|
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,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.tsx"],"names":[],"mappings":";AAGA,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,SAAS,CAAA;AAEhB,eAAO,MAAO,mBAAmB;;;;;;;;;qCAAE,iBAAiB,+CAAmC,CAAA;AAEvF,eAAO,MAAO,cAAc;;;;;;GAAE,gBAAgB;;;oCACQ,CAAA;AAItD,eAAO,MAAO,6BAA6B;;;;;;;;;qCAAE,2BAA2B,+CACvC,CAAA;AAEjC,eAAO,MAAO,wBAAwB;;;;;;GAAE,0BAA0B;;;8CACF,CAAA;AAEhE,eAAO,MAAM,oBAAoB,uDAK9B,kBAAkB;IACnB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,OAAO,EAAE,kBAAkB,CAAA;IAC3B,WAAW,EAAE,4BAA4B,CAAA;CAC1C,CAAC,4CAQD,CAAA"}
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './Select';
|
|
2
|
-
export type
|
|
2
|
+
export type * from './types';
|
|
3
3
|
export * from './context';
|
|
4
|
-
export type { SelectItemProps } from './SelectItem';
|
|
4
|
+
export type { SelectItemProps, SelectItemExtraProps } from './SelectItem';
|
|
5
5
|
export type { SelectTriggerProps } from './SelectTrigger';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,mBAAmB,SAAS,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACzE,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA"}
|
package/types/types.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import type { NativeValue, SizeTokens } from '@tamagui/core';
|
|
|
3
3
|
import type { Scope } from '@tamagui/create-context';
|
|
4
4
|
import type { ThemeableStackProps, YStackProps } from '@tamagui/stacks';
|
|
5
5
|
import type { DispatchWithoutAction, HTMLProps, MutableRefObject, ReactNode } from 'react';
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
6
|
+
export type SelectDirection = 'ltr' | 'rtl';
|
|
7
|
+
export type SelectScopedProps<P> = P & {
|
|
8
8
|
__scopeSelect?: Scope;
|
|
9
9
|
};
|
|
10
|
-
export type SelectImplProps =
|
|
10
|
+
export type SelectImplProps = SelectScopedProps<SelectProps> & {
|
|
11
11
|
activeIndexRef: any;
|
|
12
12
|
selectedIndexRef: any;
|
|
13
13
|
listContentRef: any;
|
|
@@ -21,7 +21,7 @@ export interface SelectProps {
|
|
|
21
21
|
open?: boolean;
|
|
22
22
|
defaultOpen?: boolean;
|
|
23
23
|
onOpenChange?(open: boolean): void;
|
|
24
|
-
dir?:
|
|
24
|
+
dir?: SelectDirection;
|
|
25
25
|
name?: string;
|
|
26
26
|
autoComplete?: string;
|
|
27
27
|
size?: SizeTokens;
|
|
@@ -64,7 +64,7 @@ export interface SelectItemParentContextValue {
|
|
|
64
64
|
size?: SizeTokens;
|
|
65
65
|
}
|
|
66
66
|
export interface SelectContextValue {
|
|
67
|
-
dir?:
|
|
67
|
+
dir?: SelectDirection;
|
|
68
68
|
scopeKey: string;
|
|
69
69
|
sheetBreakpoint: string | boolean | null;
|
|
70
70
|
value: any;
|
|
@@ -99,7 +99,7 @@ export interface SelectViewportExtraProps {
|
|
|
99
99
|
unstyled?: boolean;
|
|
100
100
|
}
|
|
101
101
|
export type SelectViewportProps = ThemeableStackProps & SelectViewportExtraProps;
|
|
102
|
-
export type SelectContentProps =
|
|
102
|
+
export type SelectContentProps = SelectScopedProps<{
|
|
103
103
|
children?: React.ReactNode;
|
|
104
104
|
zIndex?: number;
|
|
105
105
|
}>;
|
package/types/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACrF,OAAO,KAAK,EAAkB,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AACvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE1F,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACrF,OAAO,KAAK,EAAkB,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AACvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE1F,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,KAAK,CAAA;AAE3C,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,aAAa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