@tamagui/select 1.0.1-beta.136 → 1.0.1-beta.139

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/types.tsx"],
4
- "sourcesContent": ["import type {\n ContextData,\n FloatingContext,\n ReferenceType,\n} from '@floating-ui/react-dom-interactions'\nimport type { MediaPropKeys, SizeTokens } from '@tamagui/core'\nimport type { Scope } from '@tamagui/create-context'\nimport type { ThemeableStackProps, YStackProps } from '@tamagui/stacks'\nimport type { DispatchWithoutAction, HTMLProps, MutableRefObject, ReactNode } from 'react'\n\nexport type Direction = 'ltr' | 'rtl'\n\nexport type ScopedProps<P> = P & { __scopeSelect?: Scope }\n\nexport interface SelectProps {\n id?: string\n children?: ReactNode\n value?: string\n defaultValue?: string\n onValueChange?(value: string): void\n open?: boolean\n defaultOpen?: boolean\n onOpenChange?(open: boolean): void\n dir?: Direction\n name?: string\n autoComplete?: string\n size?: SizeTokens\n sheetBreakpoint?: MediaPropKeys | false\n}\n\ntype NonNull<A> = Exclude<A, void | null>\n\nexport interface SelectContextValue {\n dir?: Direction\n scopeKey: string\n sheetBreakpoint: NonNull<SelectProps['sheetBreakpoint']>\n size?: SizeTokens\n value: any\n selectedItem: ReactNode\n setSelectedItem: (item: ReactNode) => void\n selectedIndex: number\n setSelectedIndex: (index: number) => void\n activeIndex: number | null\n setActiveIndex: (index: number | null) => void\n setValueAtIndex: (index: number, value: string) => void\n open: boolean\n setOpen: (open: boolean) => void\n onChange: (value: string) => void\n valueNode: Element | null\n onValueNodeChange(node: HTMLElement): void\n valueNodeHasChildren: boolean\n onValueNodeHasChildrenChange(hasChildren: boolean): void\n forceUpdate: DispatchWithoutAction\n\n // InlineImpl only:\n fallback: boolean\n blockSelection: boolean\n allowSelectRef?: MutableRefObject<boolean>\n allowMouseUpRef?: MutableRefObject<boolean>\n upArrowRef?: MutableRefObject<HTMLDivElement | null>\n downArrowRef?: MutableRefObject<HTMLDivElement | null>\n selectTimeoutRef?: MutableRefObject<any>\n setScrollTop?: Function\n setInnerOffset?: Function\n dataRef?: MutableRefObject<ContextData>\n controlledScrolling?: boolean\n listRef?: MutableRefObject<Array<HTMLElement | null>>\n floatingRef?: MutableRefObject<HTMLElement | null>\n canScrollUp?: boolean\n canScrollDown?: boolean\n floatingContext?: FloatingContext<ReferenceType>\n interactions?: {\n getReferenceProps: (userProps?: HTMLProps<Element> | undefined) => any\n getFloatingProps: (userProps?: HTMLProps<HTMLElement> | undefined) => any\n getItemProps: (userProps?: HTMLProps<HTMLElement> | undefined) => any\n }\n}\n\nexport type SelectViewportProps = ThemeableStackProps & {\n size?: SizeTokens\n}\n\nexport type SelectContentProps = ScopedProps<{ children?: React.ReactNode }>\n\nexport interface SelectScrollButtonImplProps extends YStackProps {\n dir: 'up' | 'down'\n componentName: string\n}\n\nexport interface SelectScrollButtonProps\n extends Omit<SelectScrollButtonImplProps, 'dir' | 'componentName'> {}\n"],
4
+ "sourcesContent": ["import type {\n ContextData,\n FloatingContext,\n ReferenceType,\n} from '@floating-ui/react-dom-interactions'\nimport type { MediaQueryKey, SizeTokens } from '@tamagui/core'\nimport type { Scope } from '@tamagui/create-context'\nimport type { ThemeableStackProps, YStackProps } from '@tamagui/stacks'\nimport type { DispatchWithoutAction, HTMLProps, MutableRefObject, ReactNode } from 'react'\n\nexport type Direction = 'ltr' | 'rtl'\n\nexport type ScopedProps<P> = P & { __scopeSelect?: Scope }\n\nexport interface SelectProps {\n id?: string\n children?: ReactNode\n value?: string\n defaultValue?: string\n onValueChange?(value: string): void\n open?: boolean\n defaultOpen?: boolean\n onOpenChange?(open: boolean): void\n dir?: Direction\n name?: string\n autoComplete?: string\n size?: SizeTokens\n sheetBreakpoint?: MediaQueryKey | false\n}\n\ntype NonNull<A> = Exclude<A, void | null>\n\nexport interface SelectContextValue {\n dir?: Direction\n scopeKey: string\n sheetBreakpoint: NonNull<SelectProps['sheetBreakpoint']>\n size?: SizeTokens\n value: any\n selectedItem: ReactNode\n setSelectedItem: (item: ReactNode) => void\n selectedIndex: number\n setSelectedIndex: (index: number) => void\n activeIndex: number | null\n setActiveIndex: (index: number | null) => void\n setValueAtIndex: (index: number, value: string) => void\n open: boolean\n setOpen: (open: boolean) => void\n onChange: (value: string) => void\n valueNode: Element | null\n onValueNodeChange(node: HTMLElement): void\n valueNodeHasChildren: boolean\n onValueNodeHasChildrenChange(hasChildren: boolean): void\n forceUpdate: DispatchWithoutAction\n\n // InlineImpl only:\n fallback: boolean\n blockSelection: boolean\n allowSelectRef?: MutableRefObject<boolean>\n allowMouseUpRef?: MutableRefObject<boolean>\n upArrowRef?: MutableRefObject<HTMLDivElement | null>\n downArrowRef?: MutableRefObject<HTMLDivElement | null>\n selectTimeoutRef?: MutableRefObject<any>\n setScrollTop?: Function\n setInnerOffset?: Function\n dataRef?: MutableRefObject<ContextData>\n controlledScrolling?: boolean\n listRef?: MutableRefObject<Array<HTMLElement | null>>\n floatingRef?: MutableRefObject<HTMLElement | null>\n canScrollUp?: boolean\n canScrollDown?: boolean\n floatingContext?: FloatingContext<ReferenceType>\n interactions?: {\n getReferenceProps: (userProps?: HTMLProps<Element> | undefined) => any\n getFloatingProps: (userProps?: HTMLProps<HTMLElement> | undefined) => any\n getItemProps: (userProps?: HTMLProps<HTMLElement> | undefined) => any\n }\n}\n\nexport type SelectViewportProps = ThemeableStackProps & {\n size?: SizeTokens\n}\n\nexport type SelectContentProps = ScopedProps<{ children?: React.ReactNode }>\n\nexport interface SelectScrollButtonImplProps extends YStackProps {\n dir: 'up' | 'down'\n componentName: string\n}\n\nexport interface SelectScrollButtonProps\n extends Omit<SelectScrollButtonImplProps, 'dir' | 'componentName'> {}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/select",
3
- "version": "1.0.1-beta.136",
3
+ "version": "1.0.1-beta.139",
4
4
  "sideEffects": [
5
5
  "*.css"
6
6
  ],
@@ -18,23 +18,25 @@
18
18
  "build": "tamagui-build",
19
19
  "watch": "tamagui-build --watch",
20
20
  "clean": "tamagui-build clean",
21
- "clean:build": "tamagui-build clean:build"
21
+ "clean:build": "tamagui-build clean:build",
22
+ "lint": "eslint",
23
+ "lint:fix": "yarn lint --fix"
22
24
  },
23
25
  "dependencies": {
24
26
  "@floating-ui/react-dom": "^1.0.0",
25
27
  "@floating-ui/react-dom-interactions": "^0.8.1",
26
28
  "@floating-ui/react-native": "^0.8.0",
27
29
  "@radix-ui/react-use-previous": "^0.1.1",
28
- "@tamagui/compose-refs": "^1.0.1-beta.136",
29
- "@tamagui/core": "^1.0.1-beta.136",
30
- "@tamagui/create-context": "^1.0.1-beta.136",
31
- "@tamagui/list-item": "^1.0.1-beta.136",
32
- "@tamagui/portal": "^1.0.1-beta.136",
33
- "@tamagui/separator": "^1.0.1-beta.136",
34
- "@tamagui/stacks": "^1.0.1-beta.136",
35
- "@tamagui/text": "^1.0.1-beta.136",
36
- "@tamagui/use-controllable-state": "^1.0.1-beta.136",
37
- "@tamagui/use-event": "^1.0.1-beta.136"
30
+ "@tamagui/compose-refs": "^1.0.1-beta.139",
31
+ "@tamagui/core": "^1.0.1-beta.139",
32
+ "@tamagui/create-context": "^1.0.1-beta.139",
33
+ "@tamagui/list-item": "^1.0.1-beta.139",
34
+ "@tamagui/portal": "^1.0.1-beta.139",
35
+ "@tamagui/separator": "^1.0.1-beta.139",
36
+ "@tamagui/stacks": "^1.0.1-beta.139",
37
+ "@tamagui/text": "^1.0.1-beta.139",
38
+ "@tamagui/use-controllable-state": "^1.0.1-beta.139",
39
+ "@tamagui/use-event": "^1.0.1-beta.139"
38
40
  },
39
41
  "peerDependencies": {
40
42
  "react": "*",
@@ -42,7 +44,7 @@
42
44
  "react-native": "*"
43
45
  },
44
46
  "devDependencies": {
45
- "@tamagui/build": "^1.0.1-beta.136",
47
+ "@tamagui/build": "^1.0.1-beta.139",
46
48
  "@types/react-native": "^0.69.2",
47
49
  "react": "*",
48
50
  "react-dom": "*",
package/src/types.tsx CHANGED
@@ -3,7 +3,7 @@ import type {
3
3
  FloatingContext,
4
4
  ReferenceType,
5
5
  } from '@floating-ui/react-dom-interactions'
6
- import type { MediaPropKeys, SizeTokens } from '@tamagui/core'
6
+ import type { MediaQueryKey, SizeTokens } from '@tamagui/core'
7
7
  import type { Scope } from '@tamagui/create-context'
8
8
  import type { ThemeableStackProps, YStackProps } from '@tamagui/stacks'
9
9
  import type { DispatchWithoutAction, HTMLProps, MutableRefObject, ReactNode } from 'react'
@@ -25,7 +25,7 @@ export interface SelectProps {
25
25
  name?: string
26
26
  autoComplete?: string
27
27
  size?: SizeTokens
28
- sheetBreakpoint?: MediaPropKeys | false
28
+ sheetBreakpoint?: MediaQueryKey | false
29
29
  }
30
30
 
31
31
  type NonNull<A> = Exclude<A, void | null>
package/types/Select.d.ts CHANGED
@@ -644,7 +644,7 @@ export declare const Select: ((props: ScopedProps<SelectProps>) => JSX.Element)
644
644
  Viewport: React.ForwardRefExoticComponent<Omit<import("react-native").ViewProps, "children" | "display"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
645
645
  readonly fullscreen?: boolean | undefined;
646
646
  readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
647
- }, "fontFamily" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "elevate" | "bordered" | "transparent" | "backgrounded" | "radiused" | "padded" | "chromeless"> & {
647
+ }, "transparent" | "fontFamily" | "backgrounded" | "radiused" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "padded" | "elevate" | "bordered" | "chromeless"> & {
648
648
  fontFamily?: unknown;
649
649
  backgrounded?: boolean | undefined;
650
650
  radiused?: boolean | undefined;
@@ -660,7 +660,7 @@ export declare const Select: ((props: ScopedProps<SelectProps>) => JSX.Element)
660
660
  } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "children" | "display"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
661
661
  readonly fullscreen?: boolean | undefined;
662
662
  readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
663
- }, "fontFamily" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "elevate" | "bordered" | "transparent" | "backgrounded" | "radiused" | "padded" | "chromeless"> & {
663
+ }, "transparent" | "fontFamily" | "backgrounded" | "radiused" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "padded" | "elevate" | "bordered" | "chromeless"> & {
664
664
  fontFamily?: unknown;
665
665
  backgrounded?: boolean | undefined;
666
666
  radiused?: boolean | undefined;
@@ -676,7 +676,7 @@ export declare const Select: ((props: ScopedProps<SelectProps>) => JSX.Element)
676
676
  }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "children" | "display"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
677
677
  readonly fullscreen?: boolean | undefined;
678
678
  readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
679
- }, "fontFamily" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "elevate" | "bordered" | "transparent" | "backgrounded" | "radiused" | "padded" | "chromeless"> & {
679
+ }, "transparent" | "fontFamily" | "backgrounded" | "radiused" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "padded" | "elevate" | "bordered" | "chromeless"> & {
680
680
  fontFamily?: unknown;
681
681
  backgrounded?: boolean | undefined;
682
682
  radiused?: boolean | undefined;
@@ -76,7 +76,7 @@ export declare const SelectViewportFrame: import("@tamagui/core").TamaguiCompone
76
76
  export declare const SelectViewport: React.ForwardRefExoticComponent<Omit<import("react-native").ViewProps, "children" | "display"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
77
77
  readonly fullscreen?: boolean | undefined;
78
78
  readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
79
- }, "fontFamily" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "elevate" | "bordered" | "transparent" | "backgrounded" | "radiused" | "padded" | "chromeless"> & {
79
+ }, "transparent" | "fontFamily" | "backgrounded" | "radiused" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "padded" | "elevate" | "bordered" | "chromeless"> & {
80
80
  fontFamily?: unknown;
81
81
  backgrounded?: boolean | undefined;
82
82
  radiused?: boolean | undefined;
@@ -92,7 +92,7 @@ export declare const SelectViewport: React.ForwardRefExoticComponent<Omit<import
92
92
  } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "children" | "display"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
93
93
  readonly fullscreen?: boolean | undefined;
94
94
  readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
95
- }, "fontFamily" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "elevate" | "bordered" | "transparent" | "backgrounded" | "radiused" | "padded" | "chromeless"> & {
95
+ }, "transparent" | "fontFamily" | "backgrounded" | "radiused" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "padded" | "elevate" | "bordered" | "chromeless"> & {
96
96
  fontFamily?: unknown;
97
97
  backgrounded?: boolean | undefined;
98
98
  radiused?: boolean | undefined;
@@ -108,7 +108,7 @@ export declare const SelectViewport: React.ForwardRefExoticComponent<Omit<import
108
108
  }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "children" | "display"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
109
109
  readonly fullscreen?: boolean | undefined;
110
110
  readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
111
- }, "fontFamily" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "elevate" | "bordered" | "transparent" | "backgrounded" | "radiused" | "padded" | "chromeless"> & {
111
+ }, "transparent" | "fontFamily" | "backgrounded" | "radiused" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "padded" | "elevate" | "bordered" | "chromeless"> & {
112
112
  fontFamily?: unknown;
113
113
  backgrounded?: boolean | undefined;
114
114
  radiused?: boolean | undefined;
package/types/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { ContextData, FloatingContext, ReferenceType } from '@floating-ui/react-dom-interactions';
2
- import type { MediaPropKeys, SizeTokens } from '@tamagui/core';
2
+ import type { MediaQueryKey, 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';
@@ -20,7 +20,7 @@ export interface SelectProps {
20
20
  name?: string;
21
21
  autoComplete?: string;
22
22
  size?: SizeTokens;
23
- sheetBreakpoint?: MediaPropKeys | false;
23
+ sheetBreakpoint?: MediaQueryKey | false;
24
24
  }
25
25
  declare type NonNull<A> = Exclude<A, void | null>;
26
26
  export interface SelectContextValue {