@tamagui/select 1.1.10 → 1.1.12

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.
@@ -65,7 +65,7 @@ const SelectViewportFrame = (0, import_core2.styled)(import_stacks.ThemeableStac
65
65
  });
66
66
  const SelectViewport = React.forwardRef(
67
67
  (props, forwardedRef) => {
68
- const { __scopeSelect, children, ...viewportProps } = props;
68
+ const { __scopeSelect, children, disableScroll, ...viewportProps } = props;
69
69
  const context = (0, import_context.useSelectContext)(import_constants.VIEWPORT_NAME, __scopeSelect);
70
70
  const breakpointActive = (0, import_useSelectBreakpointActive.useSelectBreakpointActive)(context.sheetBreakpoint);
71
71
  if (breakpointActive || !import_core.isWeb) {
@@ -78,11 +78,11 @@ const SelectViewport = React.forwardRef(
78
78
  return children;
79
79
  }
80
80
  const {
81
- style: { scrollbarWidth, listStyleType, ...restStyle },
81
+ style: { scrollbarWidth, listStyleType, overflow, ...restStyle },
82
82
  ...floatingProps
83
83
  } = context.interactions.getFloatingProps();
84
84
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
85
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
85
+ !disableScroll && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
86
86
  "style",
87
87
  {
88
88
  dangerouslySetInnerHTML: {
@@ -99,6 +99,7 @@ const SelectViewport = React.forwardRef(
99
99
  ref: forwardedRef,
100
100
  ...floatingProps,
101
101
  ...restStyle,
102
+ overflow: disableScroll ? void 0 : overflow,
102
103
  children
103
104
  }
104
105
  ) })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SelectViewport.tsx"],
4
- "sourcesContent": ["import { FloatingFocusManager } from '@floating-ui/react-dom-interactions'\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 overflow: 'scroll',\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, ...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, ...restStyle },\n ...floatingProps\n } = context.interactions!.getFloatingProps()\n\n return (\n <>\n <style\n dangerouslySetInnerHTML={{\n __html: selectViewportCSS,\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 >\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-over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AG;AAAA,IACL,IAAI,QAAQ,aAAc,iBAAiB;AAE3C,WACE,4EACE;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,yBAAyB;AAAA,YACvB,QAAQ;AAAA,UACV;AAAA;AAAA,MACF;AAAA,MACA,4CAAC,sDAAqB,SAAS,QAAQ,iBACrC;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,QAAQ;AAAA,UAEd,MAAK;AAAA,UACJ,GAAG;AAAA,UACJ,KAAK;AAAA,UACJ,GAAG;AAAA,UACH,GAAG;AAAA,UAEH;AAAA;AAAA,MACH,GACF;AAAA,OACF;AAAA,EAEJ;AACF;AAEA,eAAe,cAAc;AAE7B,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
4
+ "sourcesContent": ["import { FloatingFocusManager } from '@floating-ui/react-dom-interactions'\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 overflow: 'scroll',\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}\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiDU;AAjDV,oCAAqC;AACrC,kBAAsC;AACtC,IAAAA,eAAuB;AACvB,oBAA2B;AAC3B,oBAA+B;AAC/B,YAAuB;AAEvB,uBAA8B;AAC9B,qBAAuD;AAEvD,uCAA0C;AAMnC,MAAM,0BAAsB,qBAAO,8BAAgB;AAAA,EACxD,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,cAAc;AAAA,EAEd,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,W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AA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": ["import_core"]
7
7
  }
@@ -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 { 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 type SelectImplProps = ScopedProps<SelectProps> & {\n activeIndexRef: any\n selectedIndexRef: any\n listContentRef: any\n}\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}\n\nexport interface SelectContextValue {\n dir?: Direction\n scopeKey: string\n sheetBreakpoint: string | boolean | null\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 // SheetImpl only:\n isInSheet?: boolean\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<{\n children?: React.ReactNode\n zIndex?: number\n}>\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 { 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 type SelectImplProps = ScopedProps<SelectProps> & {\n activeIndexRef: any\n selectedIndexRef: any\n listContentRef: any\n}\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}\n\nexport interface SelectContextValue {\n dir?: Direction\n scopeKey: string\n sheetBreakpoint: string | boolean | null\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 // SheetImpl only:\n isInSheet?: boolean\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 disableScroll?: boolean\n}\n\nexport type SelectContentProps = ScopedProps<{\n children?: React.ReactNode\n zIndex?: number\n}>\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
  }
@@ -31,7 +31,7 @@ const SelectViewportFrame = styled(ThemeableStack, {
31
31
  });
32
32
  const SelectViewport = React.forwardRef(
33
33
  (props, forwardedRef) => {
34
- const { __scopeSelect, children, ...viewportProps } = props;
34
+ const { __scopeSelect, children, disableScroll, ...viewportProps } = props;
35
35
  const context = useSelectContext(VIEWPORT_NAME, __scopeSelect);
36
36
  const breakpointActive = useSelectBreakpointActive(context.sheetBreakpoint);
37
37
  if (breakpointActive || !isWeb) {
@@ -44,11 +44,11 @@ const SelectViewport = React.forwardRef(
44
44
  return children;
45
45
  }
46
46
  const {
47
- style: { scrollbarWidth, listStyleType, ...restStyle },
47
+ style: { scrollbarWidth, listStyleType, overflow, ...restStyle },
48
48
  ...floatingProps
49
49
  } = context.interactions.getFloatingProps();
50
50
  return /* @__PURE__ */ jsxs(Fragment, { children: [
51
- /* @__PURE__ */ jsx(
51
+ !disableScroll && /* @__PURE__ */ jsx(
52
52
  "style",
53
53
  {
54
54
  dangerouslySetInnerHTML: {
@@ -65,6 +65,7 @@ const SelectViewport = React.forwardRef(
65
65
  ref: forwardedRef,
66
66
  ...floatingProps,
67
67
  ...restStyle,
68
+ overflow: disableScroll ? void 0 : overflow,
68
69
  children
69
70
  }
70
71
  ) })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SelectViewport.tsx"],
4
- "sourcesContent": ["import { FloatingFocusManager } from '@floating-ui/react-dom-interactions'\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 overflow: 'scroll',\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, ...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, ...restStyle },\n ...floatingProps\n } = context.interactions!.getFloatingProps()\n\n return (\n <>\n <style\n dangerouslySetInnerHTML={{\n __html: selectViewportCSS,\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 >\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": "AAiDU,SAmBJ,UAnBI,KAmBJ,YAnBI;AAjDV,SAAS,4BAA4B;AACrC,SAAyB,aAAa;AACtC,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,YAAY,WAAW;AAEvB,SAAS,qBAAqB;AAC9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AAG;AAAA,UACJ,KAAK;AAAA,UACJ,GAAG;AAAA,UACH,GAAG;AAAA,UAEH;AAAA;AAAA,MACH,GACF;AAAA,OACF;AAAA,EAEJ;AACF;AAEA,eAAe,cAAc;AAE7B,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
4
+ "sourcesContent": ["import { FloatingFocusManager } from '@floating-ui/react-dom-interactions'\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 overflow: 'scroll',\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}\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": "AAiDU,SAmBJ,UAnBI,KAmBJ,YAnBI;AAjDV,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,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,cAAc;AAAA,EAEd,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,WAAW,CAAC,KAAK,EAAE,OAAO,MAAM;AAC9B,eAAO;AAAA,UACL,cAAc,OAAO,OAAO,GAAG,KAAK;AAAA,QACtC;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,iBAAiB;AAAA,IACf,MAAM;AAAA,EACR;AACF,CAAC;AAEM,MAAM,iBAAiB,MAAM;AAAA,EAClC,CAAC,OAAyC,iBAAiB;AACzD,UAAM,EAAE,eAAe,UAAU,eAAe,GAAG,cAAc,IAAI;AACrE,UAAM,UAAU,iBAAiB,eAAe,aAAa;AAC7D,UAAM,mBAAmB,0BAA0B,QAAQ,eAAe;AAE1E,QAAI,oBAAoB,CAAC,OAAO;AAC9B,aACE,oBAAC,cAAW,UAAU,GAAG,QAAQ,yBAC/B,8BAAC,wBAAqB,SAAmB,UAAS,GACpD;AAAA,IAEJ;AAEA,QAAI,CAAC,QAAQ,iBAAiB;AAC5B,aAAO;AAAA,IACT;AAEA,QAAI,CAAC,QAAQ,MAAM;AACjB,aAAO;AAAA,IACT;AAEA,UAAM;AAAA,MACJ,OAAO,EAAE,gBAAgB,eAAe,UAAU,GAAG,UAAU;AAAA,MAC/D,GAAG;AAAA,IACL,IAAI,QAAQ,aAAc,iBAAiB;AAE3C,WACE,iCACG;AAAA,OAAC,iBACA;AAAA,QAAC;AAAA;AAAA,UACC,yBAAyB;AAAA,YACvB,QAAQ;AAAA,UACV;AAAA;AAAA,MACF;AAAA,MAEF,oBAAC,wBAAqB,SAAS,QAAQ,iBACrC;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,QAAQ;AAAA,UAEd,MAAK;AAAA,UACJ,GAAG;AAAA,UACJ,KAAK;AAAA,UACJ,GAAG;AAAA,UACH,GAAG;AAAA,UACJ,UAAU,gBAAgB,SAAY;AAAA,UAErC;AAAA;AAAA,MACH,GACF;AAAA,OACF;AAAA,EAEJ;AACF;AAEA,eAAe,cAAc;AAE7B,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -30,7 +30,7 @@ const SelectViewportFrame = styled(ThemeableStack, {
30
30
  });
31
31
  const SelectViewport = React.forwardRef(
32
32
  (props, forwardedRef) => {
33
- const { __scopeSelect, children, ...viewportProps } = props;
33
+ const { __scopeSelect, children, disableScroll, ...viewportProps } = props;
34
34
  const context = useSelectContext(VIEWPORT_NAME, __scopeSelect);
35
35
  const breakpointActive = useSelectBreakpointActive(context.sheetBreakpoint);
36
36
  if (breakpointActive || !isWeb) {
@@ -43,15 +43,15 @@ const SelectViewport = React.forwardRef(
43
43
  return children;
44
44
  }
45
45
  const {
46
- style: { scrollbarWidth, listStyleType, ...restStyle },
46
+ style: { scrollbarWidth, listStyleType, overflow, ...restStyle },
47
47
  ...floatingProps
48
48
  } = context.interactions.getFloatingProps();
49
49
  return <>
50
- <style
50
+ {!disableScroll && <style
51
51
  dangerouslySetInnerHTML={{
52
52
  __html: selectViewportCSS
53
53
  }}
54
- />
54
+ />}
55
55
  <FloatingFocusManager context={context.floatingContext}><SelectViewportFrame
56
56
  size={context.size}
57
57
  role="presentation"
@@ -59,6 +59,7 @@ const SelectViewport = React.forwardRef(
59
59
  ref={forwardedRef}
60
60
  {...floatingProps}
61
61
  {...restStyle}
62
+ overflow={disableScroll ? void 0 : overflow}
62
63
  >{children}</SelectViewportFrame></FloatingFocusManager>
63
64
  </>;
64
65
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SelectViewport.tsx"],
4
- "sourcesContent": ["import { FloatingFocusManager } from '@floating-ui/react-dom-interactions'\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 overflow: 'scroll',\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, ...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, ...restStyle },\n ...floatingProps\n } = context.interactions!.getFloatingProps()\n\n return (\n <>\n <style\n dangerouslySetInnerHTML={{\n __html: selectViewportCSS,\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 >\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": "AAAA,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,S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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
4
+ "sourcesContent": ["import { FloatingFocusManager } from '@floating-ui/react-dom-interactions'\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 overflow: 'scroll',\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}\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": "AAAA,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,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,cAAc;AAAA,EAEd,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,WAAW,CAAC,KAAK,EAAE,OAAO,MAAM;AAC9B,eAAO;AAAA,UACL,cAAc,OAAO,OAAO,GAAG,KAAK;AAAA,QACtC;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,iBAAiB;AAAA,IACf,MAAM;AAAA,EACR;AACF,CAAC;AAEM,MAAM,iBAAiB,MAAM;AAAA,EAClC,CAAC,OAAyC,iBAAiB;AACzD,UAAM,EAAE,eAAe,UAAU,eAAe,GAAG,cAAc,IAAI;AACrE,UAAM,UAAU,iBAAiB,eAAe,aAAa;AAC7D,UAAM,mBAAmB,0BAA0B,QAAQ,eAAe;AAE1E,QAAI,oBAAoB,CAAC,OAAO;AAC9B,aACE,CAAC,WAAW,UAAU,GAAG,QAAQ,yBAC/B,CAAC,qBAAqB,SAAS,UAAU,SAAS,EAAjD,qBACH,EAFC;AAAA,IAIL;AAEA,QAAI,CAAC,QAAQ,iBAAiB;AAC5B,aAAO;AAAA,IACT;AAEA,QAAI,CAAC,QAAQ,MAAM;AACjB,aAAO;AAAA,IACT;AAEA,UAAM;AAAA,MACJ,OAAO,EAAE,gBAAgB,eAAe,UAAU,GAAG,UAAU;AAAA,MAC/D,GAAG;AAAA,IACL,IAAI,QAAQ,aAAc,iBAAiB;AAE3C,WACE;AAAA,OACG,CAAC,iBACA,CAAC;AAAA,QACC,yBAAyB;AAAA,UACvB,QAAQ;AAAA,QACV;AAAA,MACF;AAAA,MAEF,CAAC,qBAAqB,SAAS,QAAQ,iBACrC,CAAC;AAAA,QACC,MAAM,QAAQ;AAAA,QAEd,KAAK;AAAA,YACD;AAAA,QACJ,KAAK;AAAA,YACD;AAAA,YACA;AAAA,QACJ,UAAU,gBAAgB,SAAY;AAAA,QAErC,SACH,EAXC,oBAYH,EAbC;AAAA,IAcH;AAAA,EAEJ;AACF;AAEA,eAAe,cAAc;AAE7B,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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.1.10",
3
+ "version": "1.1.12",
4
4
  "sideEffects": [
5
5
  "*.css"
6
6
  ],
@@ -27,19 +27,19 @@
27
27
  "@floating-ui/react-dom-interactions": "0.8.1",
28
28
  "@floating-ui/react-native": "0.8.0",
29
29
  "@radix-ui/react-use-previous": "^0.1.1",
30
- "@tamagui/adapt": "^1.1.10",
31
- "@tamagui/compose-refs": "^1.1.10",
32
- "@tamagui/core": "^1.1.10",
33
- "@tamagui/create-context": "^1.1.10",
34
- "@tamagui/dismissable": "^1.1.10",
35
- "@tamagui/focus-scope": "^1.1.10",
36
- "@tamagui/list-item": "^1.1.10",
37
- "@tamagui/portal": "^1.1.10",
38
- "@tamagui/separator": "^1.1.10",
39
- "@tamagui/stacks": "^1.1.10",
40
- "@tamagui/text": "^1.1.10",
41
- "@tamagui/use-controllable-state": "^1.1.10",
42
- "@tamagui/use-event": "^1.1.10"
30
+ "@tamagui/adapt": "^1.1.12",
31
+ "@tamagui/compose-refs": "^1.1.12",
32
+ "@tamagui/core": "^1.1.12",
33
+ "@tamagui/create-context": "^1.1.12",
34
+ "@tamagui/dismissable": "^1.1.12",
35
+ "@tamagui/focus-scope": "^1.1.12",
36
+ "@tamagui/list-item": "^1.1.12",
37
+ "@tamagui/portal": "^1.1.12",
38
+ "@tamagui/separator": "^1.1.12",
39
+ "@tamagui/stacks": "^1.1.12",
40
+ "@tamagui/text": "^1.1.12",
41
+ "@tamagui/use-controllable-state": "^1.1.12",
42
+ "@tamagui/use-event": "^1.1.12"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": "*",
@@ -47,7 +47,7 @@
47
47
  "react-native": "*"
48
48
  },
49
49
  "devDependencies": {
50
- "@tamagui/build": "^1.1.10",
50
+ "@tamagui/build": "^1.1.12",
51
51
  "react": "^18.2.0",
52
52
  "react-dom": "^18.2.0",
53
53
  "react-native": "*"
@@ -40,7 +40,7 @@ export const SelectViewportFrame = styled(ThemeableStack, {
40
40
 
41
41
  export const SelectViewport = React.forwardRef<TamaguiElement, SelectViewportProps>(
42
42
  (props: ScopedProps<SelectViewportProps>, forwardedRef) => {
43
- const { __scopeSelect, children, ...viewportProps } = props
43
+ const { __scopeSelect, children, disableScroll, ...viewportProps } = props
44
44
  const context = useSelectContext(VIEWPORT_NAME, __scopeSelect)
45
45
  const breakpointActive = useSelectBreakpointActive(context.sheetBreakpoint)
46
46
 
@@ -61,17 +61,19 @@ export const SelectViewport = React.forwardRef<TamaguiElement, SelectViewportPro
61
61
  }
62
62
 
63
63
  const {
64
- style: { scrollbarWidth, listStyleType, ...restStyle },
64
+ style: { scrollbarWidth, listStyleType, overflow, ...restStyle },
65
65
  ...floatingProps
66
66
  } = context.interactions!.getFloatingProps()
67
67
 
68
68
  return (
69
69
  <>
70
- <style
71
- dangerouslySetInnerHTML={{
72
- __html: selectViewportCSS,
73
- }}
74
- />
70
+ {!disableScroll && (
71
+ <style
72
+ dangerouslySetInnerHTML={{
73
+ __html: selectViewportCSS,
74
+ }}
75
+ />
76
+ )}
75
77
  <FloatingFocusManager context={context.floatingContext}>
76
78
  <SelectViewportFrame
77
79
  size={context.size}
@@ -81,6 +83,7 @@ export const SelectViewport = React.forwardRef<TamaguiElement, SelectViewportPro
81
83
  ref={forwardedRef}
82
84
  {...floatingProps}
83
85
  {...restStyle}
86
+ overflow={disableScroll ? undefined : overflow}
84
87
  >
85
88
  {children}
86
89
  </SelectViewportFrame>
package/src/types.tsx CHANGED
@@ -84,6 +84,7 @@ export interface SelectContextValue {
84
84
 
85
85
  export type SelectViewportProps = ThemeableStackProps & {
86
86
  size?: SizeTokens
87
+ disableScroll?: boolean
87
88
  }
88
89
 
89
90
  export type SelectContentProps = ScopedProps<{
package/types/Select.d.ts CHANGED
@@ -586,6 +586,7 @@ export declare const Select: ((props: ScopedProps<SelectProps>) => JSX.Element)
586
586
  readonly chromeless?: boolean | "all" | undefined;
587
587
  }>> & {
588
588
  size?: import("@tamagui/core").SizeTokens | undefined;
589
+ disableScroll?: boolean | undefined;
589
590
  } & React.RefAttributes<TamaguiElement>>;
590
591
  Sheet: React.FunctionComponent<Omit<import("@tamagui/sheet/types/types").SheetProps, "open" | "onOpenChange"> & React.RefAttributes<import("react-native").View>> & {
591
592
  Handle: ({ __scopeSheet, ...props }: import("@tamagui/sheet/types/types").SheetScopedProps<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<{}, "elevation" | "fullscreen"> & {
@@ -116,5 +116,6 @@ export declare const SelectViewport: React.ForwardRefExoticComponent<Omit<import
116
116
  readonly chromeless?: boolean | "all" | undefined;
117
117
  }>> & {
118
118
  size?: import("@tamagui/core").SizeTokens | undefined;
119
+ disableScroll?: boolean | undefined;
119
120
  } & React.RefAttributes<TamaguiElement>>;
120
121
  //# sourceMappingURL=SelectViewport.d.ts.map
package/types/types.d.ts CHANGED
@@ -72,6 +72,7 @@ export interface SelectContextValue {
72
72
  }
73
73
  export type SelectViewportProps = ThemeableStackProps & {
74
74
  size?: SizeTokens;
75
+ disableScroll?: boolean;
75
76
  };
76
77
  export type SelectContentProps = ScopedProps<{
77
78
  children?: React.ReactNode;