@kanso-labs/react-native-kanso-ui 0.10.0 → 0.11.0
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/collection/index.js +107 -80
- package/dist/collection/index.js.map +1 -1
- package/dist/components/chip/index.d.ts +4 -1
- package/dist/components/chip/index.js +229 -161
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/dialog/index.d.ts +5 -5
- package/dist/components/dialog/index.js +5 -5
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/drop-zone/index.d.ts +3 -3
- package/dist/components/drop-zone/index.js +2 -2
- package/dist/components/drop-zone/index.js.map +1 -1
- package/dist/components/menu/index.d.ts +3 -3
- package/dist/components/menu/index.js +3 -3
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/index.js +2 -2
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/search-view/index.d.ts +3 -2
- package/dist/components/search-view/index.js +3 -2
- package/dist/components/search-view/index.js.map +1 -1
- package/dist/components/sheet/index.d.ts +16 -7
- package/dist/components/sheet/index.js +157 -152
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/components/table/index.d.ts +391 -0
- package/dist/components/table/index.js +1708 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/token-field/index.d.ts +105 -0
- package/dist/components/token-field/index.js +574 -0
- package/dist/components/token-field/index.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +2 -1
- package/dist/components/tooltip/index.js.map +1 -1
- package/dist/field/index.js +50 -1
- package/dist/field/index.js.map +1 -1
- package/dist/field/styles.js +9 -1
- package/dist/field/styles.js.map +1 -1
- package/dist/glyphs/index.js +37 -1
- package/dist/glyphs/index.js.map +1 -1
- package/dist/i18n/index.js +17 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +340 -0
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/slider/index.js +1 -1
- package/dist/slider/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ReactElement","ReactNode","Ref","RefObject","GestureResponderEvent","HostInstance","LayoutChangeEvent","NativeScrollEvent","NativeSyntheticEvent","PressableProps","StyleProp","TextStyle","ViewProps","ViewStyle","AnimatedStyle","Key","Node","Selection","SelectionMode","RootMenuTriggerState","TreeProps","TreeState","Children","createContext","use","useCallback","useEffect","useId","useMemo","useRef","useState","I18nManager","Text","NativeText","Platform","Pressable","ScrollView","StyleSheet","View","Animated","useMenuTriggerState","useSubmenuTriggerState","useTreeState","ButtonSlots","OverlayAlign","OverlaySide","ResolvedTheme","ButtonSlotContext","CheckGlyph","ChevronEndGlyph","useMessages","Overlay","useAnchoredPlacement","DismissLayer","PANEL_ORIGINS","useBackToClose","useFocusOnPlaced","usePanelMotion","useReturnFocus","usePressFeedback","refsOf","useOpenLink","RowContent","rowContentColor","rowStyleOf","rowStyles","useTheme","composeStyles","themedStyles","useTypeRole","ProgressIndicator","Separator","MENU_MIN","MENU_MAX","CHECK_SIZE","CHEVRON_SIZE","LOADING_DIAMETER","HAS_SUBMENU","styles","create","scroll","flexGrow","sentinel","height","stylesOf","colors","radii","shadows","sizing","spacing","content","paddingVertical","sm","empty","color","onSurfaceVariant","header","paddingBottom","xxs","paddingHorizontal","lg","paddingTop","md","loading","alignItems","justifyContent","minHeight","rowXs","separator","marginVertical","surface","backgroundColor","surfaceContainerLow","borderRadius","xs","boxShadow","elevation2","maxWidth","minWidth","overflow","ItemNodeProps","MenuItemProps","submenu","MenuContentProps","MenuAlign","Omit","align","alignOffset","children","item","T","defaultSelectedKeys","Iterable","disabledKeys","disallowEmptySelection","items","onAction","key","onClose","onSelectionChange","keys","ref","renderEmptyState","selectedKeys","selectionMode","shouldCloseOnSelect","side","MenuSide","sideOffset","style","href","id","isDisabled","leading","textValue","trailing","MenuLevel","anchor","close","isOpen","openLink","root","MenuLoadMoreProps","isLoading","label","onLoadMore","scrollOffset","testID","MenuProps","defaultOpen","onOpenChange","trigger","MenuTrigger","MenuSectionProps","MenuSeparatorProps","MenuSubmenuProps","PanelProps","level","setPresent","present","PanelValue","activate","node","focusKey","setFocusTarget","state","viewport","Viewport","read","offset","subscribe","listener","LevelContext","Menu","t0","$","_c","t1","undefined","t2","t3","useLatest","t4","expanded","onLongPress","open","default","toggle","slots","t5","t6","t7","MenuContent","props","Error","MenuItem","_props","getCollectionNode","hasChildNodes","rendered","type","MenuLoadMore","MenuSection","forEach","child","push","childNodes","element","MenuSeparator","MenuSubmenu","activationOf","panel","EmptyRow","theme","own","messages","T0","variant","T1","noResults","emptyState","firstItemKey","collection","getKeys","getItem","selectionManager","itemRoleOf","mode","Pick","OS","role","accessibilityRole","LoaderRow","top","loadedAt","latest","current","y","now","check","t8","event","nativeEvent","layout","onLayout","t9","t10","t11","loadingMore","t12","t13","MenuNode","props_0","MenuPanel","isRTL","placement","motion","placed","focusTarget","useViewport","closes","select","nodes","t14","t15","t16","t17","t18","transformOrigin","t19","length","map","node_0","t20","onScroll","t21","t22","MenuRow","onActivate","onBlur","onFocus","onHoverIn","onHoverOut","onPress","onPressIn","onPressOut","_href","_id","_isDisabled","_onAction","_textValue","disabled","selectable","selected","isSelected","feedback","hasLeading","lead","end","hasEnd","handlers","pressThen","ring","layer","SectionNode","titleRole","named","getChildren","SubmenuRow","triggerKey","submenuState","callback","Symbol","for","seen","listeners","_temp","add","delete","notify","listener_0","event_0","contentOffset","Set","Content","Item","LoadMore","Section","Submenu","_c","NativeText"],"sources":["../../../src/components/menu/index.tsx"],"sourcesContent":["import type { ReactElement, ReactNode, Ref, RefObject } from 'react'\nimport type {\n GestureResponderEvent,\n HostInstance,\n LayoutChangeEvent,\n NativeScrollEvent,\n NativeSyntheticEvent,\n PressableProps,\n StyleProp,\n TextStyle,\n ViewProps,\n ViewStyle,\n} from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\nimport type { Key, Node, Selection, SelectionMode } from 'react-stately'\nimport type { RootMenuTriggerState } from 'react-stately/useMenuTriggerState'\nimport type { TreeProps, TreeState } from 'react-stately/useTreeState'\n\nimport {\n Children,\n createContext,\n use,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport {\n I18nManager,\n Text as NativeText,\n Platform,\n Pressable,\n ScrollView,\n StyleSheet,\n View,\n} from 'react-native'\nimport Animated from 'react-native-reanimated'\nimport {\n useMenuTriggerState,\n useSubmenuTriggerState,\n} from 'react-stately/useMenuTriggerState'\nimport { useTreeState } from 'react-stately/useTreeState'\n\nimport type { ButtonSlots } from '../../button/slots'\nimport type { OverlayAlign, OverlaySide } from '../../overlay'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { ButtonSlotContext } from '../../button/slots'\nimport { CheckGlyph, ChevronEndGlyph } from '../../glyphs'\nimport { useMessages } from '../../i18n/provider'\nimport { Overlay, useAnchoredPlacement } from '../../overlay'\nimport {\n DismissLayer,\n PANEL_ORIGINS,\n useBackToClose,\n useFocusOnPlaced,\n usePanelMotion,\n useReturnFocus,\n} from '../../overlay/panel'\nimport { usePressFeedback } from '../../press'\nimport { refsOf } from '../../ref'\nimport { useOpenLink } from '../../router'\nimport { RowContent, rowContentColor, rowStyleOf, rowStyles } from '../../row'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\nimport { ProgressIndicator } from '../progress-indicator'\nimport { Separator } from '../separator'\n\n// kanso-ui's Menu, from the menus page: a surface between 112 and 280dp wide\n// with the 4dp corner and the second elevation, 8dp above and below its\n// items, holding rows 48dp tall with a label in label large, on tertiary\n// container when selected, with a check beside the label. The container\n// colour is the Expressive column's surface container low, as web's is,\n// rather than the baseline's surface container. The container alone sits as\n// close as 1.1:1 to the surface, so the check is what carries the selection\n// for a reader who cannot tell the two apart.\n//\n// Six parts, as on web: `Menu.Content`, `Menu.Item`, `Menu.Section`,\n// `Menu.Separator`, `Menu.Submenu` and `Menu.LoadMore`. A `Button` or\n// `IconButton` placed directly inside `Menu` is its trigger, wired through\n// the button's slots as Popover's is.\n//\n// **A menu's children are a collection**, built by React Stately's tree\n// state as React Aria builds web's: each part hands the collection an entry\n// of its own, and the content draws the rows from those entries, so the\n// parts render nothing on their own. Selection is the collection's too, so\n// `selectionMode`, `selectedKeys` and `onSelectionChange` behave as on web.\n//\n// **The surface is src/overlay's anchored panel**, as Popover's is: drawn in\n// the overlay host above the screen, placed beside its trigger, flipped at\n// the edge of the window and kept inside the safe area, faded and scaled in\n// from the edge facing the trigger once it has been placed and out again\n// before it unmounts, at once under reduced motion. A press outside it lands\n// on the dismiss layer under it and closes the menu, and Android's back\n// gesture and VoiceOver's escape gesture close it too. Its items scroll when\n// they run past the room the window leaves.\n//\n// **A press on an item runs its action and closes the menu**, unless the\n// menu selects several items at once, where each press toggles one and the\n// menu stays open, as on web. An item given an `href` follows it and closes\n// the menu whatever the selection.\n//\n// **A submenu opens on a press on its item**, where web opens one on hover\n// too: a press is the one way in that touch has. It opens at the inline end\n// of the item, where the item's chevron points, with its first item level\n// with the one that opened it, and draws no dismiss layer of its own, so a\n// press on another item of the menu it came from still reaches that item and\n// a press outside both closes the whole menu. Android's back gesture and\n// VoiceOver's escape close the submenu alone, and closing the menu closes\n// every submenu with it.\n//\n// **A screen reader is sent to the first item** that takes a press once the\n// surface is placed, and back to the trigger, or to the item that opened a\n// submenu, once it has gone. Items are `menuitem` rows; a selecting menu's\n// report whether they are checked, and on the web they are web's\n// `menuitemradio` and `menuitemcheckbox`. Typeahead and the keycap\n// shortcuts web draws need a hardware keyboard, which this pass leaves out,\n// so the items take no `shortcut`.\n\n// The menus page's width range.\nconst MENU_MIN = 112\nconst MENU_MAX = 280\n\n// The check at the menus page's 24dp icon size, and the chevron at web's\n// 20dp.\nconst CHECK_SIZE = 24\nconst CHEVRON_SIZE = 20\n\n// The loading ring at web's 20dp, which leaves the row an item's height.\nconst LOADING_DIAMETER = '20px'\n\n// React Native Web writes `aria-haspopup` onto the element, which React\n// Native's types do not name.\nconst HAS_SUBMENU: { readonly 'aria-haspopup': 'menu' } = {\n 'aria-haspopup': 'menu',\n}\n\nconst styles = StyleSheet.create({\n // Only as tall as its items until the panel's room runs out, where it\n // scrolls.\n scroll: {\n flexGrow: 0,\n },\n // What `Menu.LoadMore` leaves while nothing is loading: a point the menu\n // can tell is in view.\n sentinel: {\n height: 0,\n },\n})\n\nconst stylesOf = themedStyles(\n ({ colors, radii, shadows, sizing, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The page's 8dp above and below the items.\n content: {\n paddingVertical: spacing.sm,\n },\n empty: {\n color: colors.onSurfaceVariant,\n },\n // A section's heading, at the item's own inline padding so it lines up\n // with the labels under it. The menus page names no subhead, so the\n // type is the lists page's, title small in on surface variant, with\n // more room above than below so it reads as belonging to what follows.\n header: {\n color: colors.onSurfaceVariant,\n paddingBottom: spacing.xxs,\n paddingHorizontal: spacing.lg,\n paddingTop: spacing.md,\n },\n // The ring on its own, centred in a row an item's height.\n loading: {\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: sizing.rowXs,\n },\n // The menus page's divider: the rule with 8dp either side of it.\n separator: {\n marginVertical: spacing.sm,\n },\n surface: {\n backgroundColor: colors.surfaceContainerLow,\n borderRadius: radii.xs,\n boxShadow: shadows.elevation2,\n maxWidth: MENU_MAX,\n minWidth: MENU_MIN,\n overflow: 'hidden',\n },\n }),\n)\n\n// The props a row is drawn from, as an item's entry in the collection\n// carries them: the item's own, and for an item that opens a submenu, the\n// content it opens.\ntype ItemNodeProps = MenuItemProps & {\n readonly submenu?: ReactElement<MenuContentProps>\n}\n\ntype MenuAlign = OverlayAlign\n\ntype MenuContentProps<T extends object = object> = Omit<\n ViewProps,\n 'children' | 'role' | 'style'\n> & {\n /**\n * Where the menu lines up along the side it opens on. On `top` and\n * `bottom`, `start` and `end` follow a right-to-left layout.\n * @default 'start'\n */\n readonly align?: MenuAlign\n /**\n * Moves the menu along that side, in dp: right or down when positive.\n * Left out, a submenu moves up by the surface's own padding, which puts\n * its first item level with the one that opened it.\n */\n readonly alignOffset?: number\n /**\n * The items, each a `Menu.Item`, `Menu.Section`, `Menu.Separator`,\n * `Menu.Submenu` or `Menu.LoadMore`. With `items`, a function from an item\n * to its part, called for each item in turn.\n */\n readonly children?: ((item: T) => ReactElement) | ReactNode\n /** The keys selected at first, when the menu keeps its own selection. */\n readonly defaultSelectedKeys?: 'all' | Iterable<Key>\n /** The keys of the items drawn disabled, which take no presses. */\n readonly disabledKeys?: Iterable<Key>\n /**\n * Keeps the last selected item selected, so a press on it changes\n * nothing.\n * @default false\n */\n readonly disallowEmptySelection?: boolean\n /** The entries `children` draws a part for, when it is a function. */\n readonly items?: Iterable<T>\n /** Called with an item's key when a press on it runs its action. */\n readonly onAction?: (key: Key) => void\n /** Called when a press on an item closes the menu. */\n readonly onClose?: () => void\n /** Called with the selected keys whenever a press changes them. */\n readonly onSelectionChange?: (keys: Selection) => void\n readonly ref?: Ref<HostInstance>\n /**\n * What the menu shows when nothing is in it. Left out, it is a muted row\n * saying \"No results\" in the `I18nProvider`'s language, or the device's\n * outside one, so the menu keeps a row's height.\n */\n readonly renderEmptyState?: () => ReactNode\n /**\n * The selected keys, for a call site holding the selection itself with\n * `onSelectionChange`.\n */\n readonly selectedKeys?: 'all' | Iterable<Key>\n /**\n * Whether a press selects an item: one at a time, several, or none, in\n * which case a press runs the item's action alone.\n * @default 'none'\n */\n readonly selectionMode?: SelectionMode\n /**\n * Whether a press on an item closes the menu. Left out, it does unless the\n * menu selects several items at once, or the item has an `href`.\n */\n readonly shouldCloseOnSelect?: boolean\n /**\n * Which side of the trigger the menu opens on. It flips to the opposite\n * side when there is no room. Left out, a menu opens below its trigger and\n * a submenu at the inline end of the item that opens it.\n */\n readonly side?: MenuSide\n /**\n * The gap between the trigger and the menu, in dp. Left out, a menu sits\n * `spacing.sm` from its trigger and a submenu against its item.\n */\n readonly sideOffset?: number\n readonly style?: StyleProp<ViewStyle>\n}\n\ntype MenuItemProps = Omit<\n PressableProps,\n 'children' | 'disabled' | 'id' | 'role' | 'style'\n> & {\n /** The item's label: what it does. */\n readonly children?: ReactNode\n /**\n * Where a press on the item leads, through the app's router as Button's\n * `href` does. An item with one closes the menu whatever the selection.\n */\n readonly href?: string\n /**\n * The key the item is selected and reported by. Give one to every item\n * the call site needs to tell apart.\n */\n readonly id?: Key\n /**\n * Draws the item disabled, and takes no presses on it, as a key in the\n * menu's `disabledKeys` does.\n * @default false\n */\n readonly isDisabled?: boolean\n /**\n * Content before the label, usually an icon, which takes the label's\n * colour at 24dp. A selected item draws the check here in its place.\n */\n readonly leading?: ReactNode\n /**\n * Called when a press runs the item's action, in place of the menu's\n * `onAction` for this item.\n */\n readonly onAction?: () => void\n readonly ref?: Ref<HostInstance>\n readonly style?: StyleProp<ViewStyle>\n /**\n * The item's text, read off `children` when they are a plain string, so\n * an item whose label is an element passes it.\n */\n readonly textValue?: string\n /** Content after the label. */\n readonly trailing?: ReactNode\n}\n\n// One level of the menu tree, as its content reads it: the root's, from\n// `Menu`, or a submenu's, from the item that opens it.\ntype MenuLevel = {\n /** The view the content is placed beside. */\n readonly anchor: RefObject<HostInstance | null>\n /** Closes this level: the whole menu at the root, the submenu alone below. */\n readonly close: () => void\n readonly isOpen: boolean\n /**\n * Follows an item's `href`. Read where the app's router reaches, outside\n * the overlay host, and handed down to every level.\n */\n readonly openLink: (href: string) => void\n /** The root's state, which every level closes the whole menu through. */\n readonly root: RootMenuTriggerState\n readonly submenu: boolean\n}\n\ntype MenuLoadMoreProps = {\n /**\n * Draws the ring in a row of its own while more items are being fetched.\n * @default false\n */\n readonly isLoading?: boolean\n /**\n * What a screen reader calls the ring while it shows. Left out, it is the\n * word for it in the `I18nProvider`'s language, or the device's outside\n * one, \"Loading more\" in English.\n */\n readonly label?: string\n /**\n * Called when the row comes within `scrollOffset` of the menu's visible\n * end, while nothing is loading.\n */\n readonly onLoadMore?: () => void\n /**\n * How far past the visible end of the menu the row starts loading, as a\n * share of the menu's visible height.\n * @default 1\n */\n readonly scrollOffset?: number\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\ntype MenuProps = {\n /** The trigger, then the `Menu.Content` it opens. */\n readonly children?: ReactNode\n /** Whether the menu starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /** Whether the menu is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /** Called with the new state as the menu opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n /**\n * What opens the menu: a press on the trigger, or a press held on it, in\n * which case a plain press runs the trigger's own `onPress`.\n * @default 'press'\n */\n readonly trigger?: MenuTrigger\n}\n\ntype MenuSectionProps = {\n readonly 'aria-label'?: string\n /** The items in the section. */\n readonly children?: ReactNode\n /**\n * The section's heading, which names the group. A section without one is\n * a group with no name, and takes `aria-label` for one instead.\n */\n readonly header?: ReactNode\n readonly id?: Key\n}\n\ntype MenuSeparatorProps = {\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\ntype MenuSide = OverlaySide\n\ntype MenuSubmenuProps = {\n /**\n * The item that opens the submenu, then the `Menu.Content` it opens.\n * Exactly those two, in that order.\n */\n readonly children: readonly [\n trigger: ReactElement<MenuItemProps>,\n content: ReactElement<MenuContentProps>,\n ]\n}\n\ntype MenuTrigger = 'longPress' | 'press'\n\ntype PanelProps<T extends object> = MenuContentProps<T> & {\n readonly level: MenuLevel\n readonly setPresent: (present: boolean) => void\n}\n\n// What a row reads from the content it is drawn in.\ntype PanelValue<T> = {\n /** Runs a press on an item: its selection, its action and the close. */\n readonly activate: (node: Node<T>) => void\n /** The item a screen reader is sent to once the panel is placed. */\n readonly focusKey: Key | null\n readonly level: MenuLevel\n readonly setFocusTarget: (node: HostInstance | null) => void\n readonly state: TreeState<T>\n readonly viewport: Viewport\n}\n\n// The part of the menu's scroll view in view, for `Menu.LoadMore` to tell\n// whether it is near: read when asked, with a listener told whenever the\n// view scrolls or is laid out.\ntype Viewport = {\n readonly read: () => { readonly height: number; readonly offset: number }\n readonly subscribe: (listener: () => void) => () => void\n}\n\nconst LevelContext = createContext<MenuLevel | null>(null)\n\n/**\n * A list of actions or choices opened from a control. Pass `isOpen` with\n * `onOpenChange` to hold the open state, or `defaultOpen` to let it keep its\n * own.\n *\n * ```tsx\n * <Menu>\n * <Button variant=\"outlined\">Open</Button>\n * <Menu.Content>\n * <Menu.Item id=\"first\">First item</Menu.Item>\n * </Menu.Content>\n * </Menu>\n * ```\n *\n * A `Button` or `IconButton` placed directly inside `Menu` is its trigger,\n * and a press on it toggles the menu. Everything the menu shows goes in\n * `Menu.Content`, since the trigger lives in the screen while the menu is\n * drawn above it.\n */\nfunction Menu({\n children,\n defaultOpen,\n isOpen,\n onOpenChange,\n trigger = 'press',\n}: MenuProps) {\n const state = useMenuTriggerState({\n defaultOpen,\n isOpen,\n onOpenChange,\n trigger,\n })\n const anchor = useRef<HostInstance>(null)\n const openLink = useOpenLink()\n const close = useLatest(() => {\n state.close()\n })\n const slots = useMemo<ButtonSlots>(\n () =>\n trigger === 'longPress'\n ? {\n trigger: {\n expanded: state.isOpen,\n onLongPress: () => {\n state.open()\n },\n ref: anchor,\n },\n }\n : {\n default: () => {\n state.toggle()\n },\n trigger: { expanded: state.isOpen, ref: anchor },\n },\n [state, trigger],\n )\n const level = useMemo<MenuLevel>(\n () => ({\n anchor,\n close,\n isOpen: state.isOpen,\n openLink,\n root: state,\n submenu: false,\n }),\n [close, openLink, state],\n )\n\n return (\n <LevelContext value={level}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </LevelContext>\n )\n}\n\n/**\n * The menu itself, and the surface it is drawn on. Its items scroll when they\n * run past the room the window leaves on the side it opened on.\n *\n * A menu with nothing in it shows a muted \"No results\" row in place of its\n * items; pass `renderEmptyState` to draw something else.\n *\n * `style`, `ref` and `testID` land on the surface.\n */\nfunction MenuContent<T extends object = object>(props: MenuContentProps<T>) {\n const level = use(LevelContext)\n\n if (level === null) {\n throw new Error('Menu.Content is drawn inside Menu or Menu.Submenu.')\n }\n\n const { anchor, isOpen } = level\n const [present, setPresent] = useState(isOpen)\n\n // Mounted the moment it opens, and kept until its exit has run.\n if (isOpen && !present) {\n setPresent(true)\n }\n\n useReturnFocus(present, false, anchor)\n\n if (!present) {\n return null\n }\n\n return (\n <Overlay>\n <MenuPanel<T> {...props} level={level} setPresent={setPresent} />\n </Overlay>\n )\n}\n\n/**\n * One action or choice. Its slots are the row's: `leading` before the label,\n * the label as children, and `trailing` after it. A selected item draws the\n * check, in place of `leading` where it has one and at the end of the row\n * where it has none, so choosing an item moves nothing in the menu. An item\n * that opens a submenu draws the chevron itself.\n *\n * The menu draws it from its entry in the collection, so it renders nothing\n * on its own. `style`, `ref` and `testID` land on the row.\n */\nfunction MenuItem(_props: MenuItemProps): null {\n return null\n}\n\n// The entry the collection holds for an item, as React Stately's own `Item`\n// gives one: keyed by the item's `id`, and carrying the props the row is\n// drawn from.\nMenuItem.getCollectionNode = function* getCollectionNode(props: ItemNodeProps) {\n yield {\n 'aria-label': props['aria-label'],\n hasChildNodes: false,\n key: props.id,\n props,\n rendered: props.children,\n textValue:\n props.textValue ??\n (typeof props.children === 'string' ? props.children : ''),\n type: 'item',\n }\n}\n\n/**\n * The row shown while more items are being fetched. `onLoadMore` is called\n * when it comes near the visible end of the menu, and the ring is drawn only\n * while `isLoading`. It goes last, after the items it loads more of.\n */\nfunction MenuLoadMore(_props: MenuLoadMoreProps): null {\n return null\n}\n\nMenuLoadMore.getCollectionNode = function* getCollectionNode(\n props: MenuLoadMoreProps,\n) {\n yield { hasChildNodes: false, props, rendered: null, type: 'loader' }\n}\n\n/**\n * A named group of items. `header` names it, and is what a screen reader\n * reads before the items inside.\n */\nfunction MenuSection(_props: MenuSectionProps): null {\n return null\n}\n\nMenuSection.getCollectionNode = function* getCollectionNode(\n props: MenuSectionProps,\n) {\n const children: ReactNode[] = []\n\n // Walked as React Stately's own Section walks them, which leaves each\n // child its own key rather than the one `Children.toArray` gives it.\n Children.forEach(props.children, (child) => {\n if (child !== null && child !== undefined && child !== false) {\n children.push(child)\n }\n })\n\n yield {\n 'aria-label': props['aria-label'],\n *childNodes() {\n for (const element of children) {\n yield { element }\n }\n },\n hasChildNodes: true,\n key: props.id,\n props,\n rendered: props.header,\n type: 'section',\n }\n}\n\n/** A rule between groups of items, with the menus page's 8dp either side. */\nfunction MenuSeparator(_props: MenuSeparatorProps): null {\n return null\n}\n\nMenuSeparator.getCollectionNode = function* getCollectionNode(\n props: MenuSeparatorProps,\n) {\n yield { hasChildNodes: false, props, rendered: null, type: 'separator' }\n}\n\n/**\n * An item that opens a menu of its own. Takes exactly two children: the\n * `Menu.Item` that opens it, then the `Menu.Content` it opens. A press on\n * the item opens it, and a second press closes it.\n */\nfunction MenuSubmenu(_props: MenuSubmenuProps): null {\n return null\n}\n\n// The trigger item's own entry, carrying the content it opens.\nMenuSubmenu.getCollectionNode = function* getCollectionNode(\n props: MenuSubmenuProps,\n) {\n const [trigger, content] = props.children\n\n yield* MenuItem.getCollectionNode({ ...trigger.props, submenu: content })\n}\n\n/** Runs a press on an item, from its entry. Built by a call, as below. */\nfunction activationOf<T>(panel: PanelValue<T>, node: Node<T>) {\n return () => {\n panel.activate(node)\n }\n}\n\n/**\n * The muted row a menu shows when nothing is in it: an item's box and label\n * in on surface variant, with no press of its own.\n */\nfunction EmptyRow() {\n const theme = useTheme()\n const own = stylesOf(theme)\n const label = useTypeRole('labelLarge')\n const messages = useMessages()\n\n return (\n <View style={rowStyleOf(theme, { variant: 'menu' })}>\n <NativeText style={composeStyles<TextStyle>(label, own.empty)}>\n {messages.noResults}\n </NativeText>\n </View>\n )\n}\n\n// What the menu shows when nothing is in it.\nfunction emptyState() {\n return <EmptyRow />\n}\n\n/** The first item a press reaches, which a screen reader is sent to. */\nfunction firstItemKey<T>(state: TreeState<T>) {\n for (const key of state.collection.getKeys()) {\n if (\n state.collection.getItem(key)?.type === 'item' &&\n !state.selectionManager.isDisabled(key)\n ) {\n return key\n }\n }\n\n return null\n}\n\n/**\n * The role a row reports. React Native's roles stop at `menuitem`, which iOS\n * and Android read with the checked state beside it. Web's checkable items\n * are roles of their own, which React Native Web writes from\n * `accessibilityRole`, typed as any string.\n */\nfunction itemRoleOf(\n mode: SelectionMode,\n): Pick<ViewProps, 'accessibilityRole' | 'role'> {\n if (Platform.OS !== 'web' || mode === 'none') {\n return { role: 'menuitem' }\n }\n\n return {\n accessibilityRole: mode === 'single' ? 'menuitemradio' : 'menuitemcheckbox',\n }\n}\n\n/**\n * The row `Menu.LoadMore` draws: nothing while idle, and the ring while\n * loading. Each time it is laid out, and each time the menu scrolls, it asks\n * whether it has come within `scrollOffset` of the visible end, and calls\n * `onLoadMore` once for each place it is found there, so a load that adds\n * nothing does not start another.\n */\nfunction LoaderRow({\n props,\n viewport,\n}: {\n readonly props: MenuLoadMoreProps\n readonly viewport: Viewport\n}) {\n const own = stylesOf(useTheme())\n const {\n isLoading = false,\n label,\n onLoadMore,\n scrollOffset = 1,\n style,\n testID,\n } = props\n const messages = useMessages()\n const top = useRef<null | number>(null)\n const loadedAt = useRef<null | number>(null)\n // The latest props, for a check the viewport runs between renders.\n const latest = useRef({ isLoading, onLoadMore, scrollOffset })\n\n useEffect(() => {\n latest.current = { isLoading, onLoadMore, scrollOffset }\n })\n\n const check = useCallback(() => {\n const y = top.current\n const { height, offset } = viewport.read()\n const now = latest.current\n\n if (\n y === null ||\n height === 0 ||\n now.isLoading ||\n now.onLoadMore === undefined ||\n loadedAt.current === y ||\n y > offset + height * (1 + now.scrollOffset)\n ) {\n return\n }\n\n loadedAt.current = y\n now.onLoadMore()\n }, [viewport])\n\n useEffect(() => viewport.subscribe(check), [check, viewport])\n\n const onLayout = useCallback(\n (event: LayoutChangeEvent) => {\n top.current = event.nativeEvent.layout.y\n check()\n },\n [check],\n )\n\n if (!isLoading) {\n return (\n <View\n onLayout={onLayout}\n style={composeStyles<ViewStyle>(styles.sentinel, style)}\n testID={testID}\n />\n )\n }\n\n return (\n <View\n onLayout={onLayout}\n role=\"menuitem\"\n style={composeStyles<ViewStyle>(own.loading, style)}\n testID={testID}\n >\n <ProgressIndicator\n aria-label={label ?? messages.loadingMore}\n diameter={LOADING_DIAMETER}\n isIndeterminate\n variant=\"circular\"\n />\n </View>\n )\n}\n\n// One entry of the collection, drawn as the part it came from.\nfunction MenuNode<T>({\n node,\n panel,\n}: {\n readonly node: Node<T>\n readonly panel: PanelValue<T>\n}) {\n const own = stylesOf(useTheme())\n\n switch (node.type) {\n case 'loader': {\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its part was written with, which React Stately types as `any`\n const props: MenuLoadMoreProps = node.props\n return <LoaderRow props={props} viewport={panel.viewport} />\n }\n case 'section': {\n return <SectionNode node={node} panel={panel} />\n }\n case 'separator': {\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- see above\n const { style, testID }: MenuSeparatorProps = node.props\n return (\n <Separator\n style={composeStyles<ViewStyle>(own.separator, style)}\n testID={testID}\n />\n )\n }\n default: {\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- see above\n const props: ItemNodeProps = node.props\n return props.submenu === undefined ? (\n <MenuRow\n node={node}\n onActivate={activationOf(panel, node)}\n panel={panel}\n />\n ) : (\n <SubmenuRow content={props.submenu} node={node} panel={panel} />\n )\n }\n }\n}\n\n// The surface and the rows inside it, drawn in the overlay host above the\n// screen, so the placement measures the layer the surface is drawn in.\nfunction MenuPanel<T extends object>({\n align = 'start',\n alignOffset,\n children,\n defaultSelectedKeys,\n disabledKeys,\n disallowEmptySelection,\n items,\n level,\n onAction,\n onClose,\n onSelectionChange,\n ref,\n renderEmptyState = emptyState,\n selectedKeys,\n selectionMode = 'none',\n setPresent,\n shouldCloseOnSelect,\n side,\n sideOffset,\n style,\n ...props\n}: PanelProps<T>) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const { anchor, close, isOpen, openLink, root, submenu } = level\n const state = useTreeState<T>({\n // Each part builds its own entry in the collection; see the parts'\n // `getCollectionNode`. The collection skips what is not an element, as a\n // ReactNode may be, and asks any element for its entry.\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- see above\n children: children as TreeProps<T>['children'],\n defaultSelectedKeys,\n disabledKeys,\n disallowEmptySelection,\n items,\n onSelectionChange,\n selectedKeys,\n selectionMode,\n })\n const placement = useAnchoredPlacement({\n align,\n alignOffset: alignOffset ?? (submenu ? -theme.spacing.sm : undefined),\n anchor,\n side: side ?? (submenu ? (I18nManager.isRTL ? 'left' : 'right') : 'bottom'),\n sideOffset: sideOffset ?? (submenu ? 0 : undefined),\n })\n const motion = usePanelMotion(isOpen, placement.placed, setPresent)\n const [focusTarget, setFocusTarget] = useState<HostInstance | null>(null)\n const scroll = useViewport()\n const focusKey = firstItemKey(state)\n\n useBackToClose(close, isOpen)\n useFocusOnPlaced(placement.placed, focusTarget)\n\n const activate = useCallback(\n (node: Node<T>) => {\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its part was written with, which React Stately types as `any`\n const item: ItemNodeProps = node.props\n const closes =\n shouldCloseOnSelect ??\n (selectionMode !== 'multiple' || item.href !== undefined)\n\n if (selectionMode !== 'none') {\n state.selectionManager.select(node.key)\n }\n\n if (item.onAction === undefined) {\n onAction?.(node.key)\n } else {\n item.onAction()\n }\n\n if (item.href !== undefined) {\n openLink(item.href)\n }\n\n if (closes) {\n onClose?.()\n root.close()\n }\n },\n [\n onAction,\n onClose,\n openLink,\n root,\n selectionMode,\n shouldCloseOnSelect,\n state,\n ],\n )\n const panel = useMemo<PanelValue<T>>(\n () => ({\n activate,\n focusKey,\n level,\n setFocusTarget,\n state,\n viewport: scroll.viewport,\n }),\n [activate, focusKey, level, scroll.viewport, state],\n )\n const nodes = [...state.collection]\n\n return (\n <>\n {submenu || !isOpen ? null : <DismissLayer onPress={close} />}\n <Animated.View\n onAccessibilityEscape={close}\n role=\"menu\"\n {...props}\n onLayout={placement.onLayout}\n ref={ref}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n own.surface,\n placement.style,\n { transformOrigin: PANEL_ORIGINS[placement.side] },\n motion,\n style,\n )}\n >\n <ScrollView\n contentContainerStyle={own.content}\n onLayout={scroll.onLayout}\n onScroll={scroll.onScroll}\n scrollEventThrottle={16}\n style={styles.scroll}\n >\n {nodes.length === 0 ? (\n <View role=\"menuitem\">{renderEmptyState()}</View>\n ) : (\n nodes.map((node) => (\n <MenuNode key={node.key} node={node} panel={panel} />\n ))\n )}\n </ScrollView>\n </Animated.View>\n </>\n )\n}\n\n/**\n * An item's row: the state layer, the ripple and the focus ring over the\n * leading slot, the label and the trailing slot, on tertiary container while\n * selected.\n */\nfunction MenuRow<T>({\n anchor,\n expanded,\n node,\n onActivate,\n panel,\n}: {\n /** Where the row's node is kept, for a submenu to be placed against. */\n readonly anchor?: RefObject<HostInstance | null>\n /** Whether the submenu the row opens is open. */\n readonly expanded?: boolean\n readonly node: Node<T>\n readonly onActivate: () => void\n readonly panel: PanelValue<T>\n}) {\n const theme = useTheme()\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its item was written with, which React Stately types as `any`\n const {\n children,\n href: _href,\n id: _id,\n isDisabled: _isDisabled,\n leading,\n onAction: _onAction,\n onBlur,\n onFocus,\n onHoverIn,\n onHoverOut,\n onPress,\n onPressIn,\n onPressOut,\n ref,\n style,\n submenu,\n textValue: _textValue,\n trailing,\n ...props\n }: ItemNodeProps = node.props\n const { selectionManager } = panel.state\n // The selection manager reads an item's own `isDisabled` off its entry,\n // beside the menu's `disabledKeys`, so it answers for both.\n const disabled = selectionManager.isDisabled(node.key)\n const selectable = selectionManager.selectionMode !== 'none'\n const selected = selectable && selectionManager.isSelected(node.key)\n const content = rowContentColor(theme, {\n isDisabled: disabled,\n isSelected: selected,\n variant: 'menu',\n })\n const feedback = usePressFeedback({\n color: content,\n disabled,\n onBlur,\n onFocus,\n onHoverIn,\n onHoverOut,\n onPressIn,\n onPressOut,\n })\n\n const hasLeading = leading !== undefined && leading !== null\n const check = selected ? (\n <CheckGlyph color={content} size={CHECK_SIZE} />\n ) : null\n const lead = hasLeading ? (check ?? leading) : null\n const end =\n submenu === undefined ? (\n <>\n {trailing}\n {hasLeading ? null : check}\n </>\n ) : (\n <>\n {trailing}\n <ChevronEndGlyph color={content} size={CHEVRON_SIZE} />\n </>\n )\n const hasEnd =\n submenu !== undefined ||\n (trailing !== undefined && trailing !== null) ||\n (!hasLeading && check !== null)\n\n return (\n <Pressable\n {...itemRoleOf(selectionManager.selectionMode)}\n {...(selectable ? { 'aria-checked': selected } : undefined)}\n {...(submenu === undefined\n ? undefined\n : { ...HAS_SUBMENU, 'aria-expanded': expanded })}\n {...props}\n {...feedback.handlers}\n disabled={disabled}\n onPress={pressThen(onPress, onActivate)}\n ref={refsOf(\n anchor,\n node.key === panel.focusKey ? panel.setFocusTarget : undefined,\n ref,\n )}\n style={composeStyles<ViewStyle>(\n rowStyleOf(theme, { isSelected: selected, variant: 'menu' }),\n feedback.ring,\n feedback.ring === undefined ? undefined : rowStyles.ring,\n style,\n )}\n >\n {feedback.layer}\n <RowContent\n isDisabled={disabled}\n isSelected={selected}\n leading={lead}\n trailing={hasEnd ? end : undefined}\n variant=\"menu\"\n >\n {children}\n </RowContent>\n </Pressable>\n )\n}\n\n/**\n * The press handler of a row: the call site's own `onPress`, then the row's\n * activation. Built by a call rather than written inline at the prop, which\n * is what react-perf's no-new-function-as-prop is after.\n */\nfunction pressThen(onPress: PressableProps['onPress'], onActivate: () => void) {\n return (event: GestureResponderEvent) => {\n onPress?.(event)\n onActivate()\n }\n}\n\n/** A section: its heading, then its items, as a group named by the heading. */\nfunction SectionNode<T>({\n node,\n panel,\n}: {\n readonly node: Node<T>\n readonly panel: PanelValue<T>\n}) {\n const own = stylesOf(useTheme())\n const titleRole = useTypeRole('titleSmall')\n const id = useId()\n const header = node.rendered\n const named = header !== undefined && header !== null\n // The TreeCollection useTreeState builds has no getChildren, so a section's\n // items are read off its node, as React Aria's own menu reads them.\n const children =\n panel.state.collection.getChildren?.(node.key) ??\n // oxlint-disable-next-line typescript/no-deprecated -- the only route to them here\n node.childNodes\n\n return (\n <View\n aria-label={named ? undefined : node['aria-label']}\n aria-labelledby={named ? id : undefined}\n role=\"group\"\n >\n {named ? (\n <NativeText\n nativeID={id}\n style={composeStyles<TextStyle>(titleRole, own.header)}\n >\n {header}\n </NativeText>\n ) : null}\n {[...children].map((child) => (\n <MenuNode key={child.key} node={child} panel={panel} />\n ))}\n </View>\n )\n}\n\n/**\n * An item that opens a submenu: its row, and the submenu's content, drawn\n * under the submenu's own level so it opens beside the row and closes on its\n * own. A press on the row toggles it.\n */\nfunction SubmenuRow<T>({\n content,\n node,\n panel,\n}: {\n readonly content: ReactElement<MenuContentProps>\n readonly node: Node<T>\n readonly panel: PanelValue<T>\n}) {\n const { openLink, root } = panel.level\n const anchor = useRef<HostInstance>(null)\n const submenuState = useSubmenuTriggerState({ triggerKey: node.key }, root)\n const close = useLatest(() => {\n submenuState.close()\n })\n const toggle = useCallback(() => {\n submenuState.toggle()\n }, [submenuState])\n const level = useMemo<MenuLevel>(\n () => ({\n anchor,\n close,\n isOpen: submenuState.isOpen,\n openLink,\n root,\n submenu: true,\n }),\n [close, openLink, root, submenuState.isOpen],\n )\n\n return (\n <>\n <MenuRow\n anchor={anchor}\n expanded={submenuState.isOpen}\n node={node}\n onActivate={toggle}\n panel={panel}\n />\n <LevelContext value={level}>{content}</LevelContext>\n </>\n )\n}\n\n/**\n * A callback of one identity for the life of the component, which calls the\n * latest `callback` it was rendered with. A menu's state is a new object on\n * every render, and the back gesture's listener is added again whenever the\n * callback it closes through changes: added again after a submenu's, the\n * menu's own would be the one Android calls first, and the gesture would\n * close the whole menu rather than the submenu.\n */\nfunction useLatest(callback: () => void) {\n const latest = useRef(callback)\n\n useEffect(() => {\n latest.current = callback\n })\n\n return useCallback(() => {\n latest.current()\n }, [])\n}\n\n/**\n * Keeps track of the part of the menu's scroll view in view, for\n * `Menu.LoadMore`, and tells it whenever that changes.\n */\nfunction useViewport() {\n const seen = useRef({ height: 0, offset: 0 })\n const [listeners] = useState(() => new Set<() => void>())\n const viewport = useMemo<Viewport>(\n () => ({\n read: () => seen.current,\n subscribe: (listener) => {\n listeners.add(listener)\n return () => {\n listeners.delete(listener)\n }\n },\n }),\n [listeners],\n )\n\n function notify() {\n for (const listener of listeners) {\n listener()\n }\n }\n\n return {\n onLayout: (event: LayoutChangeEvent) => {\n seen.current = {\n ...seen.current,\n height: event.nativeEvent.layout.height,\n }\n notify()\n },\n onScroll: (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n seen.current = {\n ...seen.current,\n offset: event.nativeEvent.contentOffset.y,\n }\n notify()\n },\n viewport,\n }\n}\n\nMenu.Content = MenuContent\nMenu.Item = MenuItem\nMenu.LoadMore = MenuLoadMore\nMenu.Section = MenuSection\nMenu.Separator = MenuSeparator\nMenu.Submenu = MenuSubmenu\n\nexport {\n Menu,\n MenuContent,\n MenuItem,\n MenuLoadMore,\n MenuSection,\n MenuSeparator,\n MenuSubmenu,\n}\nexport type {\n MenuAlign,\n MenuContentProps,\n MenuItemProps,\n MenuLoadMoreProps,\n MenuProps,\n MenuSectionProps,\n MenuSeparatorProps,\n MenuSide,\n MenuSubmenuProps,\n MenuTrigger,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2HA,MAAMwE,WAAW;AACjB,MAAMC,WAAW;AAIjB,MAAMC,aAAa;AACnB,MAAMC,eAAe;AAGrB,MAAMC,mBAAmB;AAIzB,MAAMC,cAAoD,EACxD,iBAAiB,OACnB;AAEA,MAAMC,SAASzC,WAAW0C,OAAO;CAG/BC,QAAQ,EACNC,UAAU,EACZ;CAGAC,UAAU,EACRC,QAAQ,EACV;AACF,CAAC;AAED,MAAMC,WAAWhB,cACd,EAAEiB,QAAQC,OAAOC,SAASC,QAAQC,cACjCpD,WAAW0C,OAAO;CAEhBW,SAAS,EACPC,iBAAiBF,QAAQG,GAC3B;CACA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AK,MAAAC,cAAkBL,WACrBhJ,WAAS;EACV;EACFI,EAAA,KAAA4I;EAAA5I,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAJD,MAAAgJ,SAAA3I;CAIC,IAAAE;CAAA,IAAAO;CAAA,IAAAd,EAAA,OAAAgJ,QAAA;EAGWzI,MAAA2D,UAAA;GACRyE,KAAI9E,UAAW;IAAA,GACV8E,KAAI9E;IAAQ7K,QACPkL,MAAKC,YAAYC,OAAOpL;GAClC;GACAgQ,OAAO;EAAC;EAEAlI,MAAAoI,YAAA;GACRP,KAAI9E,UAAW;IAAA,GACV8E,KAAI9E;IAAQnE,QACPwE,QAAKC,YAAYgF,cAAcrF;GACzC;GACAkF,OAAO;EAAC;EACThJ,EAAA,KAAAgJ;EAAAhJ,EAAA,KAAAO;EAAAP,EAAA,KAAAc;CAAA,OAAA;EAAAP,KAAAP,EAAA;EAAAc,KAAAd,EAAA;CAAA;CAAA,IAAAe;CAAA,IAAAf,EAAA,OAAAO,MAAAP,EAAA,QAAAc,MAAAd,EAAA,QAAAT,UAAA;EAdIwB,KAAA;GAAAsD,UACK9D;GAMT4F,UACSrF;GAMTvB;EAEH;EAACS,EAAA,KAAAO;EAAAP,EAAA,MAAAc;EAAAd,EAAA,MAAAT;EAAAS,EAAA,MAAAe;CAAA,OAAAA,KAAAf,EAAA;CAAA,OAhBMe;AAgBN;AAtCH,SAAA8H,QAAA;CAAA,uBAEqC,IAAIO,IAAgB;AAAC;AAuC1DtJ,KAAKuJ,UAAUpI;AACfnB,KAAKwJ,OAAOlI;AACZtB,KAAKyJ,WAAW7H;AAChB5B,KAAK0J,UAAU7H;AACf7B,KAAK1H,YAAY6J;AACjBnC,KAAK2J,UAAUvH"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactElement","ReactNode","Ref","RefObject","GestureResponderEvent","HostInstance","LayoutChangeEvent","NativeScrollEvent","NativeSyntheticEvent","PressableProps","StyleProp","TextStyle","ViewProps","ViewStyle","AnimatedStyle","Key","Node","Selection","SelectionMode","RootMenuTriggerState","TreeProps","TreeState","Children","createContext","use","useCallback","useEffect","useId","useMemo","useRef","useState","I18nManager","Text","NativeText","Platform","Pressable","ScrollView","StyleSheet","View","Animated","useMenuTriggerState","useSubmenuTriggerState","useTreeState","ButtonSlots","OverlayAlign","OverlaySide","ResolvedTheme","ButtonSlotContext","CheckGlyph","ChevronEndGlyph","useMessages","Overlay","useAnchoredPlacement","DismissLayer","PANEL_ORIGINS","useBackToClose","useFocusOnPlaced","usePanelMotion","useReturnFocus","usePressFeedback","refsOf","useOpenLink","RowContent","rowContentColor","rowStyleOf","rowStyles","useTheme","composeStyles","themedStyles","useTypeRole","ProgressIndicator","Separator","MENU_MIN","MENU_MAX","CHECK_SIZE","CHEVRON_SIZE","LOADING_DIAMETER","HAS_SUBMENU","styles","create","scroll","flexGrow","sentinel","height","stylesOf","colors","radii","shadows","sizing","spacing","content","paddingVertical","sm","empty","color","onSurfaceVariant","header","paddingBottom","xxs","paddingHorizontal","lg","paddingTop","md","loading","alignItems","justifyContent","minHeight","rowXs","separator","marginVertical","surface","backgroundColor","surfaceContainerLow","borderRadius","xs","boxShadow","elevation2","maxWidth","minWidth","overflow","ItemNodeProps","MenuItemProps","submenu","MenuContentProps","MenuAlign","Omit","align","alignOffset","children","item","T","defaultSelectedKeys","Iterable","disabledKeys","disallowEmptySelection","items","onAction","key","onClose","onSelectionChange","keys","ref","renderEmptyState","selectedKeys","selectionMode","shouldCloseOnSelect","side","MenuSide","sideOffset","style","href","id","isDisabled","leading","textValue","trailing","MenuLevel","anchor","close","isOpen","openLink","root","MenuLoadMoreProps","isLoading","label","onLoadMore","scrollOffset","testID","MenuProps","defaultOpen","onOpenChange","trigger","MenuTrigger","MenuSectionProps","MenuSeparatorProps","MenuSubmenuProps","PanelProps","level","setPresent","present","PanelValue","activate","node","focusKey","setFocusTarget","state","viewport","Viewport","read","offset","subscribe","listener","LevelContext","Menu","t0","$","_c","t1","undefined","t2","t3","useLatest","t4","expanded","onLongPress","open","default","toggle","slots","t5","t6","t7","MenuContent","props","Error","MenuItem","_props","getCollectionNode","hasChildNodes","rendered","type","MenuLoadMore","MenuSection","forEach","child","push","childNodes","element","MenuSeparator","MenuSubmenu","activationOf","panel","EmptyRow","theme","own","messages","T0","variant","T1","noResults","emptyState","firstItemKey","collection","getKeys","getItem","selectionManager","itemRoleOf","mode","Pick","OS","role","accessibilityRole","LoaderRow","top","loadedAt","latest","current","y","now","check","t8","event","nativeEvent","layout","onLayout","t9","t10","t11","loadingMore","t12","t13","MenuNode","props_0","MenuPanel","isRTL","placement","motion","placed","focusTarget","useViewport","closes","select","nodes","t14","t15","t16","t17","t18","transformOrigin","t19","length","map","node_0","t20","onScroll","t21","t22","MenuRow","onActivate","onBlur","onFocus","onHoverIn","onHoverOut","onPress","onPressIn","onPressOut","_href","_id","_isDisabled","_onAction","_textValue","disabled","selectable","selected","isSelected","feedback","hasLeading","lead","end","hasEnd","handlers","pressThen","ring","layer","SectionNode","titleRole","named","getChildren","SubmenuRow","triggerKey","submenuState","callback","Symbol","for","seen","listeners","_temp","add","delete","notify","listener_0","event_0","contentOffset","Set","Content","Item","LoadMore","Section","Submenu","_c","NativeText"],"sources":["../../../src/components/menu/index.tsx"],"sourcesContent":["import type { ReactElement, ReactNode, Ref, RefObject } from 'react'\nimport type {\n GestureResponderEvent,\n HostInstance,\n LayoutChangeEvent,\n NativeScrollEvent,\n NativeSyntheticEvent,\n PressableProps,\n StyleProp,\n TextStyle,\n ViewProps,\n ViewStyle,\n} from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\nimport type { Key, Node, Selection, SelectionMode } from 'react-stately'\nimport type { RootMenuTriggerState } from 'react-stately/useMenuTriggerState'\nimport type { TreeProps, TreeState } from 'react-stately/useTreeState'\n\nimport {\n Children,\n createContext,\n use,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport {\n I18nManager,\n Text as NativeText,\n Platform,\n Pressable,\n ScrollView,\n StyleSheet,\n View,\n} from 'react-native'\nimport Animated from 'react-native-reanimated'\nimport {\n useMenuTriggerState,\n useSubmenuTriggerState,\n} from 'react-stately/useMenuTriggerState'\nimport { useTreeState } from 'react-stately/useTreeState'\n\nimport type { ButtonSlots } from '../../button/slots'\nimport type { OverlayAlign, OverlaySide } from '../../overlay'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { ButtonSlotContext } from '../../button/slots'\nimport { CheckGlyph, ChevronEndGlyph } from '../../glyphs'\nimport { useMessages } from '../../i18n/provider'\nimport { Overlay, useAnchoredPlacement } from '../../overlay'\nimport {\n DismissLayer,\n PANEL_ORIGINS,\n useBackToClose,\n useFocusOnPlaced,\n usePanelMotion,\n useReturnFocus,\n} from '../../overlay/panel'\nimport { usePressFeedback } from '../../press'\nimport { refsOf } from '../../ref'\nimport { useOpenLink } from '../../router'\nimport { RowContent, rowContentColor, rowStyleOf, rowStyles } from '../../row'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\nimport { ProgressIndicator } from '../progress-indicator'\nimport { Separator } from '../separator'\n\n// kanso-ui's Menu, from the menus page: a surface between 112 and 280dp wide\n// with the 4dp corner and the second elevation, 8dp above and below its\n// items, holding rows 48dp tall with a label in label large, on tertiary\n// container when selected, with a check beside the label. The container\n// colour is the Expressive column's surface container low, as web's is,\n// rather than the baseline's surface container. The container alone sits as\n// close as 1.1:1 to the surface, so the check is what carries the selection\n// for a reader who cannot tell the two apart.\n//\n// Six parts, as on web: `Menu.Content`, `Menu.Item`, `Menu.Section`,\n// `Menu.Separator`, `Menu.Submenu` and `Menu.LoadMore`. A `Button`,\n// `IconButton` or `Chip` placed directly inside `Menu` is its trigger, wired\n// through the button's slots as Popover's is, so an assist chip opens a menu\n// of choices as it does on web.\n//\n// **A menu's children are a collection**, built by React Stately's tree\n// state as React Aria builds web's: each part hands the collection an entry\n// of its own, and the content draws the rows from those entries, so the\n// parts render nothing on their own. Selection is the collection's too, so\n// `selectionMode`, `selectedKeys` and `onSelectionChange` behave as on web.\n//\n// **The surface is src/overlay's anchored panel**, as Popover's is: drawn in\n// the overlay host above the screen, placed beside its trigger, flipped at\n// the edge of the window and kept inside the safe area, faded and scaled in\n// from the edge facing the trigger once it has been placed and out again\n// before it unmounts, at once under reduced motion. A press outside it lands\n// on the dismiss layer under it and closes the menu, and Android's back\n// gesture and VoiceOver's escape gesture close it too. Its items scroll when\n// they run past the room the window leaves.\n//\n// **A press on an item runs its action and closes the menu**, unless the\n// menu selects several items at once, where each press toggles one and the\n// menu stays open, as on web. An item given an `href` follows it and closes\n// the menu whatever the selection.\n//\n// **A submenu opens on a press on its item**, where web opens one on hover\n// too: a press is the one way in that touch has. It opens at the inline end\n// of the item, where the item's chevron points, with its first item level\n// with the one that opened it, and draws no dismiss layer of its own, so a\n// press on another item of the menu it came from still reaches that item and\n// a press outside both closes the whole menu. Android's back gesture and\n// VoiceOver's escape close the submenu alone, and closing the menu closes\n// every submenu with it.\n//\n// **A screen reader is sent to the first item** that takes a press once the\n// surface is placed, and back to the trigger, or to the item that opened a\n// submenu, once it has gone. Items are `menuitem` rows; a selecting menu's\n// report whether they are checked, and on the web they are web's\n// `menuitemradio` and `menuitemcheckbox`. Typeahead and the keycap\n// shortcuts web draws need a hardware keyboard, which this pass leaves out,\n// so the items take no `shortcut`.\n\n// The menus page's width range.\nconst MENU_MIN = 112\nconst MENU_MAX = 280\n\n// The check at the menus page's 24dp icon size, and the chevron at web's\n// 20dp.\nconst CHECK_SIZE = 24\nconst CHEVRON_SIZE = 20\n\n// The loading ring at web's 20dp, which leaves the row an item's height.\nconst LOADING_DIAMETER = '20px'\n\n// React Native Web writes `aria-haspopup` onto the element, which React\n// Native's types do not name.\nconst HAS_SUBMENU: { readonly 'aria-haspopup': 'menu' } = {\n 'aria-haspopup': 'menu',\n}\n\nconst styles = StyleSheet.create({\n // Only as tall as its items until the panel's room runs out, where it\n // scrolls.\n scroll: {\n flexGrow: 0,\n },\n // What `Menu.LoadMore` leaves while nothing is loading: a point the menu\n // can tell is in view.\n sentinel: {\n height: 0,\n },\n})\n\nconst stylesOf = themedStyles(\n ({ colors, radii, shadows, sizing, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The page's 8dp above and below the items.\n content: {\n paddingVertical: spacing.sm,\n },\n empty: {\n color: colors.onSurfaceVariant,\n },\n // A section's heading, at the item's own inline padding so it lines up\n // with the labels under it. The menus page names no subhead, so the\n // type is the lists page's, title small in on surface variant, with\n // more room above than below so it reads as belonging to what follows.\n header: {\n color: colors.onSurfaceVariant,\n paddingBottom: spacing.xxs,\n paddingHorizontal: spacing.lg,\n paddingTop: spacing.md,\n },\n // The ring on its own, centred in a row an item's height.\n loading: {\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: sizing.rowXs,\n },\n // The menus page's divider: the rule with 8dp either side of it.\n separator: {\n marginVertical: spacing.sm,\n },\n surface: {\n backgroundColor: colors.surfaceContainerLow,\n borderRadius: radii.xs,\n boxShadow: shadows.elevation2,\n maxWidth: MENU_MAX,\n minWidth: MENU_MIN,\n overflow: 'hidden',\n },\n }),\n)\n\n// The props a row is drawn from, as an item's entry in the collection\n// carries them: the item's own, and for an item that opens a submenu, the\n// content it opens.\ntype ItemNodeProps = MenuItemProps & {\n readonly submenu?: ReactElement<MenuContentProps>\n}\n\ntype MenuAlign = OverlayAlign\n\ntype MenuContentProps<T extends object = object> = Omit<\n ViewProps,\n 'children' | 'role' | 'style'\n> & {\n /**\n * Where the menu lines up along the side it opens on. On `top` and\n * `bottom`, `start` and `end` follow a right-to-left layout.\n * @default 'start'\n */\n readonly align?: MenuAlign\n /**\n * Moves the menu along that side, in dp: right or down when positive.\n * Left out, a submenu moves up by the surface's own padding, which puts\n * its first item level with the one that opened it.\n */\n readonly alignOffset?: number\n /**\n * The items, each a `Menu.Item`, `Menu.Section`, `Menu.Separator`,\n * `Menu.Submenu` or `Menu.LoadMore`. With `items`, a function from an item\n * to its part, called for each item in turn.\n */\n readonly children?: ((item: T) => ReactElement) | ReactNode\n /** The keys selected at first, when the menu keeps its own selection. */\n readonly defaultSelectedKeys?: 'all' | Iterable<Key>\n /** The keys of the items drawn disabled, which take no presses. */\n readonly disabledKeys?: Iterable<Key>\n /**\n * Keeps the last selected item selected, so a press on it changes\n * nothing.\n * @default false\n */\n readonly disallowEmptySelection?: boolean\n /** The entries `children` draws a part for, when it is a function. */\n readonly items?: Iterable<T>\n /** Called with an item's key when a press on it runs its action. */\n readonly onAction?: (key: Key) => void\n /** Called when a press on an item closes the menu. */\n readonly onClose?: () => void\n /** Called with the selected keys whenever a press changes them. */\n readonly onSelectionChange?: (keys: Selection) => void\n readonly ref?: Ref<HostInstance>\n /**\n * What the menu shows when nothing is in it. Left out, it is a muted row\n * saying \"No results\" in the `I18nProvider`'s language, or the device's\n * outside one, so the menu keeps a row's height.\n */\n readonly renderEmptyState?: () => ReactNode\n /**\n * The selected keys, for a call site holding the selection itself with\n * `onSelectionChange`.\n */\n readonly selectedKeys?: 'all' | Iterable<Key>\n /**\n * Whether a press selects an item: one at a time, several, or none, in\n * which case a press runs the item's action alone.\n * @default 'none'\n */\n readonly selectionMode?: SelectionMode\n /**\n * Whether a press on an item closes the menu. Left out, it does unless the\n * menu selects several items at once, or the item has an `href`.\n */\n readonly shouldCloseOnSelect?: boolean\n /**\n * Which side of the trigger the menu opens on. It flips to the opposite\n * side when there is no room. Left out, a menu opens below its trigger and\n * a submenu at the inline end of the item that opens it.\n */\n readonly side?: MenuSide\n /**\n * The gap between the trigger and the menu, in dp. Left out, a menu sits\n * `spacing.sm` from its trigger and a submenu against its item.\n */\n readonly sideOffset?: number\n readonly style?: StyleProp<ViewStyle>\n}\n\ntype MenuItemProps = Omit<\n PressableProps,\n 'children' | 'disabled' | 'id' | 'role' | 'style'\n> & {\n /** The item's label: what it does. */\n readonly children?: ReactNode\n /**\n * Where a press on the item leads, through the app's router as Button's\n * `href` does. An item with one closes the menu whatever the selection.\n */\n readonly href?: string\n /**\n * The key the item is selected and reported by. Give one to every item\n * the call site needs to tell apart.\n */\n readonly id?: Key\n /**\n * Draws the item disabled, and takes no presses on it, as a key in the\n * menu's `disabledKeys` does.\n * @default false\n */\n readonly isDisabled?: boolean\n /**\n * Content before the label, usually an icon, which takes the label's\n * colour at 24dp. A selected item draws the check here in its place.\n */\n readonly leading?: ReactNode\n /**\n * Called when a press runs the item's action, in place of the menu's\n * `onAction` for this item.\n */\n readonly onAction?: () => void\n readonly ref?: Ref<HostInstance>\n readonly style?: StyleProp<ViewStyle>\n /**\n * The item's text, read off `children` when they are a plain string, so\n * an item whose label is an element passes it.\n */\n readonly textValue?: string\n /** Content after the label. */\n readonly trailing?: ReactNode\n}\n\n// One level of the menu tree, as its content reads it: the root's, from\n// `Menu`, or a submenu's, from the item that opens it.\ntype MenuLevel = {\n /** The view the content is placed beside. */\n readonly anchor: RefObject<HostInstance | null>\n /** Closes this level: the whole menu at the root, the submenu alone below. */\n readonly close: () => void\n readonly isOpen: boolean\n /**\n * Follows an item's `href`. Read where the app's router reaches, outside\n * the overlay host, and handed down to every level.\n */\n readonly openLink: (href: string) => void\n /** The root's state, which every level closes the whole menu through. */\n readonly root: RootMenuTriggerState\n readonly submenu: boolean\n}\n\ntype MenuLoadMoreProps = {\n /**\n * Draws the ring in a row of its own while more items are being fetched.\n * @default false\n */\n readonly isLoading?: boolean\n /**\n * What a screen reader calls the ring while it shows. Left out, it is the\n * word for it in the `I18nProvider`'s language, or the device's outside\n * one, \"Loading more\" in English.\n */\n readonly label?: string\n /**\n * Called when the row comes within `scrollOffset` of the menu's visible\n * end, while nothing is loading.\n */\n readonly onLoadMore?: () => void\n /**\n * How far past the visible end of the menu the row starts loading, as a\n * share of the menu's visible height.\n * @default 1\n */\n readonly scrollOffset?: number\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\ntype MenuProps = {\n /** The trigger, then the `Menu.Content` it opens. */\n readonly children?: ReactNode\n /** Whether the menu starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /** Whether the menu is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /** Called with the new state as the menu opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n /**\n * What opens the menu: a press on the trigger, or a press held on it, in\n * which case a plain press runs the trigger's own `onPress`.\n * @default 'press'\n */\n readonly trigger?: MenuTrigger\n}\n\ntype MenuSectionProps = {\n readonly 'aria-label'?: string\n /** The items in the section. */\n readonly children?: ReactNode\n /**\n * The section's heading, which names the group. A section without one is\n * a group with no name, and takes `aria-label` for one instead.\n */\n readonly header?: ReactNode\n readonly id?: Key\n}\n\ntype MenuSeparatorProps = {\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\ntype MenuSide = OverlaySide\n\ntype MenuSubmenuProps = {\n /**\n * The item that opens the submenu, then the `Menu.Content` it opens.\n * Exactly those two, in that order.\n */\n readonly children: readonly [\n trigger: ReactElement<MenuItemProps>,\n content: ReactElement<MenuContentProps>,\n ]\n}\n\ntype MenuTrigger = 'longPress' | 'press'\n\ntype PanelProps<T extends object> = MenuContentProps<T> & {\n readonly level: MenuLevel\n readonly setPresent: (present: boolean) => void\n}\n\n// What a row reads from the content it is drawn in.\ntype PanelValue<T> = {\n /** Runs a press on an item: its selection, its action and the close. */\n readonly activate: (node: Node<T>) => void\n /** The item a screen reader is sent to once the panel is placed. */\n readonly focusKey: Key | null\n readonly level: MenuLevel\n readonly setFocusTarget: (node: HostInstance | null) => void\n readonly state: TreeState<T>\n readonly viewport: Viewport\n}\n\n// The part of the menu's scroll view in view, for `Menu.LoadMore` to tell\n// whether it is near: read when asked, with a listener told whenever the\n// view scrolls or is laid out.\ntype Viewport = {\n readonly read: () => { readonly height: number; readonly offset: number }\n readonly subscribe: (listener: () => void) => () => void\n}\n\nconst LevelContext = createContext<MenuLevel | null>(null)\n\n/**\n * A list of actions or choices opened from a control. Pass `isOpen` with\n * `onOpenChange` to hold the open state, or `defaultOpen` to let it keep its\n * own.\n *\n * ```tsx\n * <Menu>\n * <Button variant=\"outlined\">Open</Button>\n * <Menu.Content>\n * <Menu.Item id=\"first\">First item</Menu.Item>\n * </Menu.Content>\n * </Menu>\n * ```\n *\n * A `Button`, `IconButton` or `Chip` placed directly inside `Menu` is its\n * trigger, and a press on it toggles the menu. Everything the menu shows goes\n * in `Menu.Content`, since the trigger lives in the screen while the menu is\n * drawn above it.\n */\nfunction Menu({\n children,\n defaultOpen,\n isOpen,\n onOpenChange,\n trigger = 'press',\n}: MenuProps) {\n const state = useMenuTriggerState({\n defaultOpen,\n isOpen,\n onOpenChange,\n trigger,\n })\n const anchor = useRef<HostInstance>(null)\n const openLink = useOpenLink()\n const close = useLatest(() => {\n state.close()\n })\n const slots = useMemo<ButtonSlots>(\n () =>\n trigger === 'longPress'\n ? {\n trigger: {\n expanded: state.isOpen,\n onLongPress: () => {\n state.open()\n },\n ref: anchor,\n },\n }\n : {\n default: () => {\n state.toggle()\n },\n trigger: { expanded: state.isOpen, ref: anchor },\n },\n [state, trigger],\n )\n const level = useMemo<MenuLevel>(\n () => ({\n anchor,\n close,\n isOpen: state.isOpen,\n openLink,\n root: state,\n submenu: false,\n }),\n [close, openLink, state],\n )\n\n return (\n <LevelContext value={level}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </LevelContext>\n )\n}\n\n/**\n * The menu itself, and the surface it is drawn on. Its items scroll when they\n * run past the room the window leaves on the side it opened on.\n *\n * A menu with nothing in it shows a muted \"No results\" row in place of its\n * items; pass `renderEmptyState` to draw something else.\n *\n * `style`, `ref` and `testID` land on the surface.\n */\nfunction MenuContent<T extends object = object>(props: MenuContentProps<T>) {\n const level = use(LevelContext)\n\n if (level === null) {\n throw new Error('Menu.Content is drawn inside Menu or Menu.Submenu.')\n }\n\n const { anchor, isOpen } = level\n const [present, setPresent] = useState(isOpen)\n\n // Mounted the moment it opens, and kept until its exit has run.\n if (isOpen && !present) {\n setPresent(true)\n }\n\n useReturnFocus(present, false, anchor)\n\n if (!present) {\n return null\n }\n\n return (\n <Overlay>\n <MenuPanel<T> {...props} level={level} setPresent={setPresent} />\n </Overlay>\n )\n}\n\n/**\n * One action or choice. Its slots are the row's: `leading` before the label,\n * the label as children, and `trailing` after it. A selected item draws the\n * check, in place of `leading` where it has one and at the end of the row\n * where it has none, so choosing an item moves nothing in the menu. An item\n * that opens a submenu draws the chevron itself.\n *\n * The menu draws it from its entry in the collection, so it renders nothing\n * on its own. `style`, `ref` and `testID` land on the row.\n */\nfunction MenuItem(_props: MenuItemProps): null {\n return null\n}\n\n// The entry the collection holds for an item, as React Stately's own `Item`\n// gives one: keyed by the item's `id`, and carrying the props the row is\n// drawn from.\nMenuItem.getCollectionNode = function* getCollectionNode(props: ItemNodeProps) {\n yield {\n 'aria-label': props['aria-label'],\n hasChildNodes: false,\n key: props.id,\n props,\n rendered: props.children,\n textValue:\n props.textValue ??\n (typeof props.children === 'string' ? props.children : ''),\n type: 'item',\n }\n}\n\n/**\n * The row shown while more items are being fetched. `onLoadMore` is called\n * when it comes near the visible end of the menu, and the ring is drawn only\n * while `isLoading`. It goes last, after the items it loads more of.\n */\nfunction MenuLoadMore(_props: MenuLoadMoreProps): null {\n return null\n}\n\nMenuLoadMore.getCollectionNode = function* getCollectionNode(\n props: MenuLoadMoreProps,\n) {\n yield { hasChildNodes: false, props, rendered: null, type: 'loader' }\n}\n\n/**\n * A named group of items. `header` names it, and is what a screen reader\n * reads before the items inside.\n */\nfunction MenuSection(_props: MenuSectionProps): null {\n return null\n}\n\nMenuSection.getCollectionNode = function* getCollectionNode(\n props: MenuSectionProps,\n) {\n const children: ReactNode[] = []\n\n // Walked as React Stately's own Section walks them, which leaves each\n // child its own key rather than the one `Children.toArray` gives it.\n Children.forEach(props.children, (child) => {\n if (child !== null && child !== undefined && child !== false) {\n children.push(child)\n }\n })\n\n yield {\n 'aria-label': props['aria-label'],\n *childNodes() {\n for (const element of children) {\n yield { element }\n }\n },\n hasChildNodes: true,\n key: props.id,\n props,\n rendered: props.header,\n type: 'section',\n }\n}\n\n/** A rule between groups of items, with the menus page's 8dp either side. */\nfunction MenuSeparator(_props: MenuSeparatorProps): null {\n return null\n}\n\nMenuSeparator.getCollectionNode = function* getCollectionNode(\n props: MenuSeparatorProps,\n) {\n yield { hasChildNodes: false, props, rendered: null, type: 'separator' }\n}\n\n/**\n * An item that opens a menu of its own. Takes exactly two children: the\n * `Menu.Item` that opens it, then the `Menu.Content` it opens. A press on\n * the item opens it, and a second press closes it.\n */\nfunction MenuSubmenu(_props: MenuSubmenuProps): null {\n return null\n}\n\n// The trigger item's own entry, carrying the content it opens.\nMenuSubmenu.getCollectionNode = function* getCollectionNode(\n props: MenuSubmenuProps,\n) {\n const [trigger, content] = props.children\n\n yield* MenuItem.getCollectionNode({ ...trigger.props, submenu: content })\n}\n\n/** Runs a press on an item, from its entry. Built by a call, as below. */\nfunction activationOf<T>(panel: PanelValue<T>, node: Node<T>) {\n return () => {\n panel.activate(node)\n }\n}\n\n/**\n * The muted row a menu shows when nothing is in it: an item's box and label\n * in on surface variant, with no press of its own.\n */\nfunction EmptyRow() {\n const theme = useTheme()\n const own = stylesOf(theme)\n const label = useTypeRole('labelLarge')\n const messages = useMessages()\n\n return (\n <View style={rowStyleOf(theme, { variant: 'menu' })}>\n <NativeText style={composeStyles<TextStyle>(label, own.empty)}>\n {messages.noResults}\n </NativeText>\n </View>\n )\n}\n\n// What the menu shows when nothing is in it.\nfunction emptyState() {\n return <EmptyRow />\n}\n\n/** The first item a press reaches, which a screen reader is sent to. */\nfunction firstItemKey<T>(state: TreeState<T>) {\n for (const key of state.collection.getKeys()) {\n if (\n state.collection.getItem(key)?.type === 'item' &&\n !state.selectionManager.isDisabled(key)\n ) {\n return key\n }\n }\n\n return null\n}\n\n/**\n * The role a row reports. React Native's roles stop at `menuitem`, which iOS\n * and Android read with the checked state beside it. Web's checkable items\n * are roles of their own, which React Native Web writes from\n * `accessibilityRole`, typed as any string.\n */\nfunction itemRoleOf(\n mode: SelectionMode,\n): Pick<ViewProps, 'accessibilityRole' | 'role'> {\n if (Platform.OS !== 'web' || mode === 'none') {\n return { role: 'menuitem' }\n }\n\n return {\n accessibilityRole: mode === 'single' ? 'menuitemradio' : 'menuitemcheckbox',\n }\n}\n\n/**\n * The row `Menu.LoadMore` draws: nothing while idle, and the ring while\n * loading. Each time it is laid out, and each time the menu scrolls, it asks\n * whether it has come within `scrollOffset` of the visible end, and calls\n * `onLoadMore` once for each place it is found there, so a load that adds\n * nothing does not start another.\n */\nfunction LoaderRow({\n props,\n viewport,\n}: {\n readonly props: MenuLoadMoreProps\n readonly viewport: Viewport\n}) {\n const own = stylesOf(useTheme())\n const {\n isLoading = false,\n label,\n onLoadMore,\n scrollOffset = 1,\n style,\n testID,\n } = props\n const messages = useMessages()\n const top = useRef<null | number>(null)\n const loadedAt = useRef<null | number>(null)\n // The latest props, for a check the viewport runs between renders.\n const latest = useRef({ isLoading, onLoadMore, scrollOffset })\n\n useEffect(() => {\n latest.current = { isLoading, onLoadMore, scrollOffset }\n })\n\n const check = useCallback(() => {\n const y = top.current\n const { height, offset } = viewport.read()\n const now = latest.current\n\n if (\n y === null ||\n height === 0 ||\n now.isLoading ||\n now.onLoadMore === undefined ||\n loadedAt.current === y ||\n y > offset + height * (1 + now.scrollOffset)\n ) {\n return\n }\n\n loadedAt.current = y\n now.onLoadMore()\n }, [viewport])\n\n useEffect(() => viewport.subscribe(check), [check, viewport])\n\n const onLayout = useCallback(\n (event: LayoutChangeEvent) => {\n top.current = event.nativeEvent.layout.y\n check()\n },\n [check],\n )\n\n if (!isLoading) {\n return (\n <View\n onLayout={onLayout}\n style={composeStyles<ViewStyle>(styles.sentinel, style)}\n testID={testID}\n />\n )\n }\n\n return (\n <View\n onLayout={onLayout}\n role=\"menuitem\"\n style={composeStyles<ViewStyle>(own.loading, style)}\n testID={testID}\n >\n <ProgressIndicator\n aria-label={label ?? messages.loadingMore}\n diameter={LOADING_DIAMETER}\n isIndeterminate\n variant=\"circular\"\n />\n </View>\n )\n}\n\n// One entry of the collection, drawn as the part it came from.\nfunction MenuNode<T>({\n node,\n panel,\n}: {\n readonly node: Node<T>\n readonly panel: PanelValue<T>\n}) {\n const own = stylesOf(useTheme())\n\n switch (node.type) {\n case 'loader': {\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its part was written with, which React Stately types as `any`\n const props: MenuLoadMoreProps = node.props\n return <LoaderRow props={props} viewport={panel.viewport} />\n }\n case 'section': {\n return <SectionNode node={node} panel={panel} />\n }\n case 'separator': {\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- see above\n const { style, testID }: MenuSeparatorProps = node.props\n return (\n <Separator\n style={composeStyles<ViewStyle>(own.separator, style)}\n testID={testID}\n />\n )\n }\n default: {\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- see above\n const props: ItemNodeProps = node.props\n return props.submenu === undefined ? (\n <MenuRow\n node={node}\n onActivate={activationOf(panel, node)}\n panel={panel}\n />\n ) : (\n <SubmenuRow content={props.submenu} node={node} panel={panel} />\n )\n }\n }\n}\n\n// The surface and the rows inside it, drawn in the overlay host above the\n// screen, so the placement measures the layer the surface is drawn in.\nfunction MenuPanel<T extends object>({\n align = 'start',\n alignOffset,\n children,\n defaultSelectedKeys,\n disabledKeys,\n disallowEmptySelection,\n items,\n level,\n onAction,\n onClose,\n onSelectionChange,\n ref,\n renderEmptyState = emptyState,\n selectedKeys,\n selectionMode = 'none',\n setPresent,\n shouldCloseOnSelect,\n side,\n sideOffset,\n style,\n ...props\n}: PanelProps<T>) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const { anchor, close, isOpen, openLink, root, submenu } = level\n const state = useTreeState<T>({\n // Each part builds its own entry in the collection; see the parts'\n // `getCollectionNode`. The collection skips what is not an element, as a\n // ReactNode may be, and asks any element for its entry.\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- see above\n children: children as TreeProps<T>['children'],\n defaultSelectedKeys,\n disabledKeys,\n disallowEmptySelection,\n items,\n onSelectionChange,\n selectedKeys,\n selectionMode,\n })\n const placement = useAnchoredPlacement({\n align,\n alignOffset: alignOffset ?? (submenu ? -theme.spacing.sm : undefined),\n anchor,\n side: side ?? (submenu ? (I18nManager.isRTL ? 'left' : 'right') : 'bottom'),\n sideOffset: sideOffset ?? (submenu ? 0 : undefined),\n })\n const motion = usePanelMotion(isOpen, placement.placed, setPresent)\n const [focusTarget, setFocusTarget] = useState<HostInstance | null>(null)\n const scroll = useViewport()\n const focusKey = firstItemKey(state)\n\n useBackToClose(close, isOpen)\n useFocusOnPlaced(placement.placed, focusTarget)\n\n const activate = useCallback(\n (node: Node<T>) => {\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its part was written with, which React Stately types as `any`\n const item: ItemNodeProps = node.props\n const closes =\n shouldCloseOnSelect ??\n (selectionMode !== 'multiple' || item.href !== undefined)\n\n if (selectionMode !== 'none') {\n state.selectionManager.select(node.key)\n }\n\n if (item.onAction === undefined) {\n onAction?.(node.key)\n } else {\n item.onAction()\n }\n\n if (item.href !== undefined) {\n openLink(item.href)\n }\n\n if (closes) {\n onClose?.()\n root.close()\n }\n },\n [\n onAction,\n onClose,\n openLink,\n root,\n selectionMode,\n shouldCloseOnSelect,\n state,\n ],\n )\n const panel = useMemo<PanelValue<T>>(\n () => ({\n activate,\n focusKey,\n level,\n setFocusTarget,\n state,\n viewport: scroll.viewport,\n }),\n [activate, focusKey, level, scroll.viewport, state],\n )\n const nodes = [...state.collection]\n\n return (\n <>\n {submenu || !isOpen ? null : <DismissLayer onPress={close} />}\n <Animated.View\n onAccessibilityEscape={close}\n role=\"menu\"\n {...props}\n onLayout={placement.onLayout}\n ref={ref}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n own.surface,\n placement.style,\n { transformOrigin: PANEL_ORIGINS[placement.side] },\n motion,\n style,\n )}\n >\n <ScrollView\n contentContainerStyle={own.content}\n onLayout={scroll.onLayout}\n onScroll={scroll.onScroll}\n scrollEventThrottle={16}\n style={styles.scroll}\n >\n {nodes.length === 0 ? (\n <View role=\"menuitem\">{renderEmptyState()}</View>\n ) : (\n nodes.map((node) => (\n <MenuNode key={node.key} node={node} panel={panel} />\n ))\n )}\n </ScrollView>\n </Animated.View>\n </>\n )\n}\n\n/**\n * An item's row: the state layer, the ripple and the focus ring over the\n * leading slot, the label and the trailing slot, on tertiary container while\n * selected.\n */\nfunction MenuRow<T>({\n anchor,\n expanded,\n node,\n onActivate,\n panel,\n}: {\n /** Where the row's node is kept, for a submenu to be placed against. */\n readonly anchor?: RefObject<HostInstance | null>\n /** Whether the submenu the row opens is open. */\n readonly expanded?: boolean\n readonly node: Node<T>\n readonly onActivate: () => void\n readonly panel: PanelValue<T>\n}) {\n const theme = useTheme()\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its item was written with, which React Stately types as `any`\n const {\n children,\n href: _href,\n id: _id,\n isDisabled: _isDisabled,\n leading,\n onAction: _onAction,\n onBlur,\n onFocus,\n onHoverIn,\n onHoverOut,\n onPress,\n onPressIn,\n onPressOut,\n ref,\n style,\n submenu,\n textValue: _textValue,\n trailing,\n ...props\n }: ItemNodeProps = node.props\n const { selectionManager } = panel.state\n // The selection manager reads an item's own `isDisabled` off its entry,\n // beside the menu's `disabledKeys`, so it answers for both.\n const disabled = selectionManager.isDisabled(node.key)\n const selectable = selectionManager.selectionMode !== 'none'\n const selected = selectable && selectionManager.isSelected(node.key)\n const content = rowContentColor(theme, {\n isDisabled: disabled,\n isSelected: selected,\n variant: 'menu',\n })\n const feedback = usePressFeedback({\n color: content,\n disabled,\n onBlur,\n onFocus,\n onHoverIn,\n onHoverOut,\n onPressIn,\n onPressOut,\n })\n\n const hasLeading = leading !== undefined && leading !== null\n const check = selected ? (\n <CheckGlyph color={content} size={CHECK_SIZE} />\n ) : null\n const lead = hasLeading ? (check ?? leading) : null\n const end =\n submenu === undefined ? (\n <>\n {trailing}\n {hasLeading ? null : check}\n </>\n ) : (\n <>\n {trailing}\n <ChevronEndGlyph color={content} size={CHEVRON_SIZE} />\n </>\n )\n const hasEnd =\n submenu !== undefined ||\n (trailing !== undefined && trailing !== null) ||\n (!hasLeading && check !== null)\n\n return (\n <Pressable\n {...itemRoleOf(selectionManager.selectionMode)}\n {...(selectable ? { 'aria-checked': selected } : undefined)}\n {...(submenu === undefined\n ? undefined\n : { ...HAS_SUBMENU, 'aria-expanded': expanded })}\n {...props}\n {...feedback.handlers}\n disabled={disabled}\n onPress={pressThen(onPress, onActivate)}\n ref={refsOf(\n anchor,\n node.key === panel.focusKey ? panel.setFocusTarget : undefined,\n ref,\n )}\n style={composeStyles<ViewStyle>(\n rowStyleOf(theme, { isSelected: selected, variant: 'menu' }),\n feedback.ring,\n feedback.ring === undefined ? undefined : rowStyles.ring,\n style,\n )}\n >\n {feedback.layer}\n <RowContent\n isDisabled={disabled}\n isSelected={selected}\n leading={lead}\n trailing={hasEnd ? end : undefined}\n variant=\"menu\"\n >\n {children}\n </RowContent>\n </Pressable>\n )\n}\n\n/**\n * The press handler of a row: the call site's own `onPress`, then the row's\n * activation. Built by a call rather than written inline at the prop, which\n * is what react-perf's no-new-function-as-prop is after.\n */\nfunction pressThen(onPress: PressableProps['onPress'], onActivate: () => void) {\n return (event: GestureResponderEvent) => {\n onPress?.(event)\n onActivate()\n }\n}\n\n/** A section: its heading, then its items, as a group named by the heading. */\nfunction SectionNode<T>({\n node,\n panel,\n}: {\n readonly node: Node<T>\n readonly panel: PanelValue<T>\n}) {\n const own = stylesOf(useTheme())\n const titleRole = useTypeRole('titleSmall')\n const id = useId()\n const header = node.rendered\n const named = header !== undefined && header !== null\n // The TreeCollection useTreeState builds has no getChildren, so a section's\n // items are read off its node, as React Aria's own menu reads them.\n const children =\n panel.state.collection.getChildren?.(node.key) ??\n // oxlint-disable-next-line typescript/no-deprecated -- the only route to them here\n node.childNodes\n\n return (\n <View\n aria-label={named ? undefined : node['aria-label']}\n aria-labelledby={named ? id : undefined}\n role=\"group\"\n >\n {named ? (\n <NativeText\n nativeID={id}\n style={composeStyles<TextStyle>(titleRole, own.header)}\n >\n {header}\n </NativeText>\n ) : null}\n {[...children].map((child) => (\n <MenuNode key={child.key} node={child} panel={panel} />\n ))}\n </View>\n )\n}\n\n/**\n * An item that opens a submenu: its row, and the submenu's content, drawn\n * under the submenu's own level so it opens beside the row and closes on its\n * own. A press on the row toggles it.\n */\nfunction SubmenuRow<T>({\n content,\n node,\n panel,\n}: {\n readonly content: ReactElement<MenuContentProps>\n readonly node: Node<T>\n readonly panel: PanelValue<T>\n}) {\n const { openLink, root } = panel.level\n const anchor = useRef<HostInstance>(null)\n const submenuState = useSubmenuTriggerState({ triggerKey: node.key }, root)\n const close = useLatest(() => {\n submenuState.close()\n })\n const toggle = useCallback(() => {\n submenuState.toggle()\n }, [submenuState])\n const level = useMemo<MenuLevel>(\n () => ({\n anchor,\n close,\n isOpen: submenuState.isOpen,\n openLink,\n root,\n submenu: true,\n }),\n [close, openLink, root, submenuState.isOpen],\n )\n\n return (\n <>\n <MenuRow\n anchor={anchor}\n expanded={submenuState.isOpen}\n node={node}\n onActivate={toggle}\n panel={panel}\n />\n <LevelContext value={level}>{content}</LevelContext>\n </>\n )\n}\n\n/**\n * A callback of one identity for the life of the component, which calls the\n * latest `callback` it was rendered with. A menu's state is a new object on\n * every render, and the back gesture's listener is added again whenever the\n * callback it closes through changes: added again after a submenu's, the\n * menu's own would be the one Android calls first, and the gesture would\n * close the whole menu rather than the submenu.\n */\nfunction useLatest(callback: () => void) {\n const latest = useRef(callback)\n\n useEffect(() => {\n latest.current = callback\n })\n\n return useCallback(() => {\n latest.current()\n }, [])\n}\n\n/**\n * Keeps track of the part of the menu's scroll view in view, for\n * `Menu.LoadMore`, and tells it whenever that changes.\n */\nfunction useViewport() {\n const seen = useRef({ height: 0, offset: 0 })\n const [listeners] = useState(() => new Set<() => void>())\n const viewport = useMemo<Viewport>(\n () => ({\n read: () => seen.current,\n subscribe: (listener) => {\n listeners.add(listener)\n return () => {\n listeners.delete(listener)\n }\n },\n }),\n [listeners],\n )\n\n function notify() {\n for (const listener of listeners) {\n listener()\n }\n }\n\n return {\n onLayout: (event: LayoutChangeEvent) => {\n seen.current = {\n ...seen.current,\n height: event.nativeEvent.layout.height,\n }\n notify()\n },\n onScroll: (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n seen.current = {\n ...seen.current,\n offset: event.nativeEvent.contentOffset.y,\n }\n notify()\n },\n viewport,\n }\n}\n\nMenu.Content = MenuContent\nMenu.Item = MenuItem\nMenu.LoadMore = MenuLoadMore\nMenu.Section = MenuSection\nMenu.Separator = MenuSeparator\nMenu.Submenu = MenuSubmenu\n\nexport {\n Menu,\n MenuContent,\n MenuItem,\n MenuLoadMore,\n MenuSection,\n MenuSeparator,\n MenuSubmenu,\n}\nexport type {\n MenuAlign,\n MenuContentProps,\n MenuItemProps,\n MenuLoadMoreProps,\n MenuProps,\n MenuSectionProps,\n MenuSeparatorProps,\n MenuSide,\n MenuSubmenuProps,\n MenuTrigger,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA4HA,MAAMwE,WAAW;AACjB,MAAMC,WAAW;AAIjB,MAAMC,aAAa;AACnB,MAAMC,eAAe;AAGrB,MAAMC,mBAAmB;AAIzB,MAAMC,cAAoD,EACxD,iBAAiB,OACnB;AAEA,MAAMC,SAASzC,WAAW0C,OAAO;CAG/BC,QAAQ,EACNC,UAAU,EACZ;CAGAC,UAAU,EACRC,QAAQ,EACV;AACF,CAAC;AAED,MAAMC,WAAWhB,cACd,EAAEiB,QAAQC,OAAOC,SAASC,QAAQC,cACjCpD,WAAW0C,OAAO;CAEhBW,SAAS,EACPC,iBAAiBF,QAAQG,GAC3B;CACAC,OAAO,EACLC,OAAOT,OAAOU,iBAChB;CAKAC,QAAQ;EACNF,OAAOT,OAAOU;EACdE,eAAeR,QAAQS;EACvBC,mBAAmBV,QAAQW;EAC3BC,YAAYZ,QAAQa;CACtB;CAEAC,SAAS;EACPC,YAAY;EACZC,gBAAgB;EAChBC,WAAWl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zI,MAAA2D,UAAA;GACRyE,KAAI9E,UAAW;IAAA,GACV8E,KAAI9E;IAAQ7K,QACPkL,MAAKC,YAAYC,OAAOpL;GAClC;GACAgQ,OAAO;EAAC;EAEAlI,MAAAoI,YAAA;GACRP,KAAI9E,UAAW;IAAA,GACV8E,KAAI9E;IAAQnE,QACPwE,QAAKC,YAAYgF,cAAcrF;GACzC;GACAkF,OAAO;EAAC;EACThJ,EAAA,KAAAgJ;EAAAhJ,EAAA,KAAAO;EAAAP,EAAA,KAAAc;CAAA,OAAA;EAAAP,KAAAP,EAAA;EAAAc,KAAAd,EAAA;CAAA;CAAA,IAAAe;CAAA,IAAAf,EAAA,OAAAO,MAAAP,EAAA,QAAAc,MAAAd,EAAA,QAAAT,UAAA;EAdIwB,KAAA;GAAAsD,UACK9D;GAMT4F,UACSrF;GAMTvB;EAEH;EAACS,EAAA,KAAAO;EAAAP,EAAA,MAAAc;EAAAd,EAAA,MAAAT;EAAAS,EAAA,MAAAe;CAAA,OAAAA,KAAAf,EAAA;CAAA,OAhBMe;AAgBN;AAtCH,SAAA8H,QAAA;CAAA,uBAEqC,IAAIO,IAAgB;AAAC;AAuC1DtJ,KAAKuJ,UAAUpI;AACfnB,KAAKwJ,OAAOlI;AACZtB,KAAKyJ,WAAW7H;AAChB5B,KAAK0J,UAAU7H;AACf7B,KAAK1H,YAAY6J;AACjBnC,KAAK2J,UAAUvH"}
|
|
@@ -106,8 +106,8 @@ type PopoverTrigger = 'hover' | 'press';
|
|
|
106
106
|
* and `modal` keeps one inside it. A press outside the panel and a button
|
|
107
107
|
* given `slot="close"` inside it close it, and a press on its trigger
|
|
108
108
|
* toggles it. Composed rather than configured by props, as web's is: a
|
|
109
|
-
* `Button` or `
|
|
110
|
-
* and the panel is placed beside it.
|
|
109
|
+
* `Button`, `IconButton` or `Chip` placed directly inside `Popover` is its
|
|
110
|
+
* trigger, and the panel is placed beside it.
|
|
111
111
|
*/
|
|
112
112
|
declare function Popover({ children, closeDelay, defaultOpen, delay, isOpen, modal, onOpenChange, size, trigger }: PopoverProps): import("react").JSX.Element;
|
|
113
113
|
declare namespace Popover {
|
|
@@ -58,8 +58,8 @@ const TitleContext = createContext(null);
|
|
|
58
58
|
* and `modal` keeps one inside it. A press outside the panel and a button
|
|
59
59
|
* given `slot="close"` inside it close it, and a press on its trigger
|
|
60
60
|
* toggles it. Composed rather than configured by props, as web's is: a
|
|
61
|
-
* `Button` or `
|
|
62
|
-
* and the panel is placed beside it.
|
|
61
|
+
* `Button`, `IconButton` or `Chip` placed directly inside `Popover` is its
|
|
62
|
+
* trigger, and the panel is placed beside it.
|
|
63
63
|
*/
|
|
64
64
|
function Popover(t0) {
|
|
65
65
|
const $ = c(23);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ReactNode","Ref","RefObject","HostInstance","StyleProp","TextProps","TextStyle","ViewProps","ViewStyle","AnimatedStyle","OverlayTriggerState","createContext","use","useCallback","useEffect","useId","useMemo","useRef","useState","Text","NativeText","ScrollView","StyleSheet","Animated","useOverlayTriggerState","ButtonSlots","OverlayAlign","OverlaySide","ResolvedTheme","ButtonSlotContext","ModalWindow","panelRoleOf","Overlay","useAnchoredPlacement","DismissLayer","PANEL_ORIGINS","useBackToClose","useFocusOnPlaced","usePanelMotion","useReturnFocus","refsOf","useTheme","composeStyles","themedStyles","useTypeRole","DEFAULT_HOVER_DELAY","DEFAULT_HOVER_CLOSE_DELAY","WIDTHS","md","sm","const","Record","PopoverSize","UNSEEN","opacity","stylesOf","colors","radii","shadows","spacing","create","content","paddingBottom","paddingHorizontal","lg","paddingTop","description","color","onSurfaceVariant","scroll","flexGrow","surface","backgroundColor","surfaceContainer","borderRadius","boxShadow","elevation2","overflow","title","HoverTrigger","ReturnType","useHoverTrigger","PanelProps","Omit","PopoverContentProps","anchor","byPointer","close","dismissable","hover","isOpen","labelledBy","modal","setPresent","present","size","titled","PopoverTitle","PopoverAlign","align","alignOffset","children","ref","side","PopoverSide","sideOffset","style","triggerRef","PopoverDescriptionProps","PopoverProps","closeDelay","defaultOpen","delay","onOpenChange","trigger","PopoverTrigger","PopoverRoot","id","setTitle","node","PopoverTitleProps","PopoverContext","TitleContext","Popover","t0","$","_c","t1","t2","t3","t4","t5","undefined","t6","state","hovering","t7","t8","default","press","delayLongPress","expanded","onHoverIn","enter","onHoverOut","leave","onLongPress","longPress","toggle","slots","t9","t10","root","t11","t12","PopoverContent","props","Error","setByPointer","panel","PopoverDescription","styles","role","T0","PopoverPanel","placement","setPanel","motion","placed","panelEnter","panelLeave","onLayout","maxWidth","transformOrigin","t13","t14","View","t15","wasOpen","setWasOpen","timer","Symbol","for","onPanel","onTrigger","pointer","clearTimeout","current","after","milliseconds","then","setTimeout","closeOnceGone","open","Content","Description","Title","_c","NativeText"],"sources":["../../../src/components/popover/index.tsx"],"sourcesContent":["import type { ReactNode, Ref, RefObject } from 'react'\nimport type {\n HostInstance,\n StyleProp,\n TextProps,\n TextStyle,\n ViewProps,\n ViewStyle,\n} from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\nimport type { OverlayTriggerState } from 'react-stately/useOverlayTriggerState'\n\nimport {\n createContext,\n use,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport { Text as NativeText, ScrollView, StyleSheet } from 'react-native'\nimport Animated from 'react-native-reanimated'\nimport { useOverlayTriggerState } from 'react-stately/useOverlayTriggerState'\n\nimport type { ButtonSlots } from '../../button/slots'\nimport type { OverlayAlign, OverlaySide } from '../../overlay'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { ButtonSlotContext } from '../../button/slots'\nimport { ModalWindow, panelRoleOf } from '../../modal'\nimport { Overlay, useAnchoredPlacement } from '../../overlay'\nimport {\n DismissLayer,\n PANEL_ORIGINS,\n useBackToClose,\n useFocusOnPlaced,\n usePanelMotion,\n useReturnFocus,\n} from '../../overlay/panel'\nimport { refsOf } from '../../ref'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\n\n// kanso-ui's Popover, a panel anchored to the control that opened it. It has\n// no Material Design page of its own, so it follows the tooltips page's rich\n// tooltip, as web's does: a panel on surface container with the 12dp corner\n// and the second elevation, inset 12dp above, 8dp below and 16dp at the\n// sides, holding a subhead in title small over supporting text in body\n// medium, both in on-surface variant, with no caret drawn between it and its\n// anchor. It is as wide as its content, up to 320dp at `md` and 240dp at\n// `sm`.\n//\n// **It is placed by src/overlay's anchored placement**: on `side`, lined up\n// by `align`, flipped to the opposite side at the edge of the window and kept\n// inside the safe area, with `start` and `end` following a right-to-left\n// layout. Its content scrolls when it runs past the room on the side it\n// opened on.\n//\n// **A non-modal popover, the default, draws in the overlay host** above the\n// screen, and a screen reader can leave it for the screen around it. A press\n// outside it lands on src/overlay's dismiss layer, drawn under it and hidden\n// from a screen reader, which closes it. The press goes no further, so a press on the trigger\n// closes it rather than opening it again, as on web. Android's back gesture\n// and VoiceOver's escape gesture close it too. **A modal popover draws in a\n// `Modal`**, through src/modal, as a dialog does, which keeps a screen reader\n// inside it until it closes, over a scrim that draws nothing.\n//\n// **`trigger=\"hover\"` opens once a pointer has rested on the trigger** for\n// `delay`, an iPad's pointer or an Android mouse, and closes `closeDelay`\n// after the pointer has left both the trigger and the panel, so the panel's\n// own buttons stay in reach. Touch has no hover, so a press held for `delay`\n// opens it too, and a popover opened that way stays open until a press\n// outside it or on its trigger. A hovered popover is always non-modal, as on\n// web, and one a pointer opened draws no layer under it, which would take\n// the pointer off the trigger.\n//\n// **It fades and scales in and out**, from 95% and from the edge facing its\n// anchor: in over the short3 duration on the emphasised decelerating curve,\n// once it has been placed, and out over short2 on the accelerating one, as\n// src/overlay's panel moves every anchored panel. Web only animates in, since\n// React Aria keeps a closing surface mounted only while a CSS animation runs;\n// here the panel stays mounted until its exit has run. Under reduced motion it\n// appears and leaves at once, as web's does.\n//\n// **A screen reader follows a press.** Opened by a press, or by a press held\n// on a hover trigger, it is sent to the title, or to the panel without one,\n// once the panel is placed, and back to the trigger once it has gone. A\n// pointer resting on the trigger moves nothing.\n\n// How long a pointer rests on a hover trigger before the popover opens, and\n// how long it has to be gone before it closes, React Aria's own defaults,\n// which web's spells out.\nconst DEFAULT_HOVER_DELAY = 600\nconst DEFAULT_HOVER_CLOSE_DELAY = 200\n\n// The widest each size draws, web's.\nconst WIDTHS = { md: 320, sm: 240 } as const satisfies Record<\n PopoverSize,\n number\n>\n\n// A modal popover's scrim takes presses and draws nothing.\nconst UNSEEN: ViewStyle = { opacity: 0 }\n\nconst stylesOf = themedStyles(\n ({ colors, radii, shadows, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The rich tooltip's inset: 12dp above, 8dp below and 16dp at the\n // sides.\n content: {\n paddingBottom: spacing.sm,\n paddingHorizontal: spacing.lg,\n paddingTop: spacing.md,\n },\n description: {\n color: colors.onSurfaceVariant,\n },\n // Only as tall as its content until the panel's room runs out, where\n // it scrolls.\n scroll: {\n flexGrow: 0,\n },\n surface: {\n backgroundColor: colors.surfaceContainer,\n borderRadius: radii.md,\n boxShadow: shadows.elevation2,\n overflow: 'hidden',\n },\n title: {\n color: colors.onSurfaceVariant,\n },\n }),\n)\n\n// How a hovered popover is opened and closed by a pointer, and how it was\n// opened last.\ntype HoverTrigger = ReturnType<typeof useHoverTrigger>\n\ntype PanelProps = Omit<PopoverContentProps, 'triggerRef'> & {\n readonly anchor: RefObject<HostInstance | null>\n /** Whether a pointer resting on the trigger opened it. */\n readonly byPointer: boolean\n readonly close: () => void\n /** Whether a press outside it lands on a layer that closes it. */\n readonly dismissable: boolean\n readonly hover: HoverTrigger\n readonly isOpen: boolean\n readonly labelledBy: string | undefined\n readonly modal: boolean\n readonly setPresent: (present: boolean) => void\n readonly size: PopoverSize\n /** The headline, which a screen reader is sent to once the panel shows. */\n readonly title: HostInstance | null\n readonly titled: PopoverTitle\n}\n\n/** Where the panel sits along the side it opens on. */\ntype PopoverAlign = OverlayAlign\n\ntype PopoverContentProps = Omit<ViewProps, 'children' | 'role' | 'style'> & {\n /**\n * Where the panel sits along the side it opens on. On `top` and `bottom`,\n * `start` and `end` follow a right-to-left layout.\n * @default 'center'\n */\n readonly align?: PopoverAlign\n /** Moves the panel along that side, in dp: right or down when positive. */\n readonly alignOffset?: number\n readonly children?: ReactNode\n readonly ref?: Ref<HostInstance>\n /**\n * Which side of the trigger the panel opens on. It flips to the opposite\n * side when there is no room.\n * @default 'bottom'\n */\n readonly side?: PopoverSide\n /**\n * The gap between the trigger and the panel, in dp.\n * @default spacing.sm\n */\n readonly sideOffset?: number\n readonly style?: StyleProp<ViewStyle>\n /** A view to place the panel beside other than the trigger. */\n readonly triggerRef?: RefObject<HostInstance | null>\n}\n\ntype PopoverDescriptionProps = TextProps & {\n readonly ref?: Ref<HostInstance>\n}\n\ntype PopoverProps = {\n /** The button that opens the popover, and `Popover.Content`. */\n readonly children?: ReactNode\n /**\n * How long the pointer has to be gone from a hovered popover's trigger\n * and panel before it closes, in milliseconds. Ignored by a pressed one.\n * @default 200\n */\n readonly closeDelay?: number\n /** Whether the popover starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /**\n * How long a pointer rests on a hover trigger, or a press is held on it,\n * before the popover opens, in milliseconds. Ignored by a pressed one.\n * @default 600\n */\n readonly delay?: number\n /** Whether the popover is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /**\n * Keeps a screen reader inside the panel while it is open, as a dialog\n * does. Off by default: a popover leaves the screen in reach, which is the\n * difference from `Sheet`. A hovered popover is never modal.\n * @default false\n */\n readonly modal?: boolean\n /** Called with the new state as the popover opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n /**\n * The panel's width: `sm` caps it at 240dp, `md` at 320dp. Either way it is\n * only as wide as its content.\n * @default 'md'\n */\n readonly size?: PopoverSize\n /**\n * What opens the panel: a press on the trigger, or a pointer resting on\n * it. `hover` is the tooltips page's rich tooltip, and on touch it opens\n * on a press held for `delay`.\n * @default 'press'\n */\n readonly trigger?: PopoverTrigger\n}\n\n// What the content reads from the root.\ntype PopoverRoot = {\n /** The trigger's node, which the panel is placed beside. */\n readonly anchor: RefObject<HostInstance | null>\n readonly close: () => void\n readonly hover: HoverTrigger\n readonly isOpen: boolean\n /** Whether the panel keeps a screen reader inside it. */\n readonly modal: boolean\n readonly size: PopoverSize\n}\n\n/** Which side of the trigger the panel opens on. */\ntype PopoverSide = OverlaySide\n\ntype PopoverSize = 'md' | 'sm'\n\n// What the panel's parts read: the headline's id, and where its node goes.\ntype PopoverTitle = {\n readonly id: string\n readonly setTitle: (node: HostInstance | null) => void\n}\n\ntype PopoverTitleProps = Omit<TextProps, 'role'> & {\n readonly ref?: Ref<HostInstance>\n}\n\ntype PopoverTrigger = 'hover' | 'press'\n\nconst PopoverContext = createContext<null | PopoverRoot>(null)\nconst TitleContext = createContext<null | PopoverTitle>(null)\n\n/**\n * A panel anchored to the control that opened it, as the tooltips spec\n * page's rich tooltip draws one. Pass `isOpen` with `onOpenChange` to hold\n * the open state, or `defaultOpen` to let it keep its own.\n *\n * ```tsx\n * <Popover>\n * <Button variant=\"outlined\">Open</Button>\n * <Popover.Content>\n * <Popover.Title>Headline</Popover.Title>\n * <Popover.Description>Supporting text</Popover.Description>\n * </Popover.Content>\n * </Popover>\n * ```\n *\n * Non-modal by default, which leaves the screen in reach of a screen reader,\n * and `modal` keeps one inside it. A press outside the panel and a button\n * given `slot=\"close\"` inside it close it, and a press on its trigger\n * toggles it. Composed rather than configured by props, as web's is: a\n * `Button` or `IconButton` placed directly inside `Popover` is its trigger,\n * and the panel is placed beside it.\n */\nfunction Popover({\n children,\n closeDelay = DEFAULT_HOVER_CLOSE_DELAY,\n defaultOpen,\n delay = DEFAULT_HOVER_DELAY,\n isOpen,\n modal = false,\n onOpenChange,\n size = 'md',\n trigger = 'press',\n}: PopoverProps) {\n const state = useOverlayTriggerState({ defaultOpen, isOpen, onOpenChange })\n const anchor = useRef<HostInstance>(null)\n const hover = useHoverTrigger(state, delay, closeDelay)\n const hovering = trigger === 'hover'\n const close = useCallback(() => {\n state.close()\n }, [state])\n const slots = useMemo<ButtonSlots>(\n () =>\n hovering\n ? {\n default: hover.press,\n trigger: {\n delayLongPress: delay,\n expanded: state.isOpen,\n onHoverIn: hover.enter,\n onHoverOut: hover.leave,\n onLongPress: hover.longPress,\n ref: anchor,\n },\n }\n : {\n default: () => {\n state.toggle()\n },\n trigger: { expanded: state.isOpen, ref: anchor },\n },\n [delay, hover, hovering, state],\n )\n const root = useMemo<PopoverRoot>(\n () => ({\n anchor,\n close,\n hover,\n isOpen: state.isOpen,\n modal: modal && !hovering,\n size,\n }),\n [close, hover, hovering, modal, size, state.isOpen],\n )\n\n return (\n <PopoverContext value={root}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </PopoverContext>\n )\n}\n\n/**\n * The panel itself. Everything the popover shows goes in here; the trigger\n * stays outside it. Its content scrolls when it runs past the room the\n * window leaves on the side it opened on.\n *\n * `style`, `ref` and `testID` land on the panel.\n */\nfunction PopoverContent({ triggerRef, ...props }: PopoverContentProps) {\n const root = use(PopoverContext)\n\n if (root === null) {\n throw new Error('Popover.Content is drawn inside Popover.')\n }\n\n const { anchor, close, hover, isOpen, modal, size } = root\n const [present, setPresent] = useState(isOpen)\n const [title, setTitle] = useState<HostInstance | null>(null)\n const [byPointer, setByPointer] = useState(hover.byPointer)\n const id = useId()\n const titled = useMemo(() => ({ id, setTitle }), [id])\n\n // Mounted the moment it opens, and kept until its exit has run.\n if (isOpen && !present) {\n setPresent(true)\n }\n\n // Whether a pointer opened it, kept until it has gone, after the root has\n // forgotten.\n if (isOpen && byPointer !== hover.byPointer) {\n setByPointer(hover.byPointer)\n }\n\n useReturnFocus(present, byPointer, triggerRef ?? anchor)\n\n if (!present) {\n return null\n }\n\n const labelledBy = title === null ? undefined : id\n const panel = (\n <PopoverPanel\n {...props}\n anchor={triggerRef ?? anchor}\n byPointer={byPointer}\n close={close}\n dismissable={!modal && !byPointer && isOpen}\n hover={hover}\n isOpen={isOpen}\n labelledBy={labelledBy}\n modal={modal}\n setPresent={setPresent}\n size={size}\n title={title}\n titled={titled}\n />\n )\n\n if (!modal) {\n return <Overlay>{panel}</Overlay>\n }\n\n return (\n <ModalWindow\n isKeyboardDismissDisabled={false}\n labelledBy={labelledBy}\n onClose={close}\n onScrimPress={isOpen ? close : undefined}\n scrim={UNSEEN}\n title={null}\n >\n {panel}\n </ModalWindow>\n )\n}\n\n/**\n * Supporting text under the title, in body medium on on-surface variant.\n * `style`, `ref` and `testID` land on React Native's own Text.\n */\nfunction PopoverDescription({ style, ...props }: PopoverDescriptionProps) {\n const styles = stylesOf(useTheme())\n const role = useTypeRole('bodyMedium')\n\n return (\n <NativeText\n {...props}\n style={composeStyles<TextStyle>(role, styles.description, style)}\n />\n )\n}\n\n// The panel, drawn where the popover's host is: in the overlay host above the\n// screen, or in the `Modal` of a modal one, so the placement measures the\n// layer the panel is drawn in.\nfunction PopoverPanel({\n align,\n alignOffset,\n anchor,\n byPointer,\n children,\n close,\n dismissable,\n hover,\n isOpen,\n labelledBy,\n modal,\n ref,\n setPresent,\n side,\n sideOffset,\n size,\n style,\n title,\n titled,\n ...props\n}: PanelProps) {\n const styles = stylesOf(useTheme())\n const placement = useAnchoredPlacement({\n align,\n alignOffset,\n anchor,\n side,\n sideOffset,\n })\n const [panel, setPanel] = useState<HostInstance | null>(null)\n const motion = usePanelMotion(isOpen, placement.placed, setPresent)\n const slots = useMemo<ButtonSlots>(() => ({ close }), [close])\n\n useBackToClose(close, !modal && isOpen)\n useFocusOnPlaced(placement.placed && !byPointer, title ?? panel)\n\n return (\n <>\n {dismissable ? <DismissLayer onPress={close} /> : null}\n <Animated.View\n {...(modal\n ? panelRoleOf('dialog', labelledBy)\n : { 'aria-labelledby': labelledBy, role: 'dialog' as const })}\n onAccessibilityEscape={close}\n onPointerEnter={hover.panelEnter}\n onPointerLeave={hover.panelLeave}\n {...props}\n onLayout={placement.onLayout}\n ref={refsOf(setPanel, ref)}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.surface,\n { maxWidth: WIDTHS[size] },\n placement.style,\n { transformOrigin: PANEL_ORIGINS[placement.side] },\n motion,\n style,\n )}\n >\n <ScrollView\n contentContainerStyle={styles.content}\n style={styles.scroll}\n >\n <TitleContext value={titled}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </TitleContext>\n </ScrollView>\n </Animated.View>\n </>\n )\n}\n\n/**\n * Names the popover: the panel is labelled by it, and a screen reader is\n * sent to it once a pressed popover shows. In title small on on-surface\n * variant, the rich tooltip's subhead. `style`, `ref` and `testID` land on\n * React Native's own Text.\n */\nfunction PopoverTitle({ ref, style, ...props }: PopoverTitleProps) {\n const titled = use(TitleContext)\n const styles = stylesOf(useTheme())\n const role = useTypeRole('titleSmall')\n\n if (titled === null) {\n throw new Error('Popover.Title is drawn inside Popover.Content.')\n }\n\n return (\n <NativeText\n {...props}\n nativeID={titled.id}\n ref={refsOf(titled.setTitle, ref)}\n role=\"heading\"\n style={composeStyles<TextStyle>(role, styles.title, style)}\n />\n )\n}\n\n/**\n * How a hovered popover opens and closes. A pointer resting on the trigger\n * for `delay` opens it, and once the pointer has left both the trigger and\n * the panel for `closeDelay` it closes again. A press held for `delay` opens\n * it as well, and a popover opened that way stays open until a press outside\n * it or on the trigger. `byPointer` says whether a pointer opened it, which\n * is forgotten as it closes, however it closed.\n */\nfunction useHoverTrigger(\n state: OverlayTriggerState,\n delay: number,\n closeDelay: number,\n) {\n const [byPointer, setByPointer] = useState(false)\n const [wasOpen, setWasOpen] = useState(state.isOpen)\n const timer = useRef<ReturnType<typeof setTimeout>>(undefined)\n const pointer = useRef({ onPanel: false, onTrigger: false })\n\n if (wasOpen !== state.isOpen) {\n setWasOpen(state.isOpen)\n if (!state.isOpen) {\n setByPointer(false)\n }\n }\n\n useEffect(\n () => () => {\n clearTimeout(timer.current)\n },\n [],\n )\n\n function after(milliseconds: number, then: () => void) {\n clearTimeout(timer.current)\n timer.current = setTimeout(then, milliseconds)\n }\n\n function closeOnceGone() {\n after(closeDelay, () => {\n if (!pointer.current.onPanel && !pointer.current.onTrigger) {\n state.close()\n }\n })\n }\n\n return {\n byPointer,\n enter: () => {\n pointer.current.onTrigger = true\n if (state.isOpen) {\n clearTimeout(timer.current)\n return\n }\n after(delay, () => {\n setByPointer(true)\n state.open()\n })\n },\n leave: () => {\n pointer.current.onTrigger = false\n if (!state.isOpen) {\n clearTimeout(timer.current)\n } else if (byPointer) {\n closeOnceGone()\n }\n },\n longPress: () => {\n clearTimeout(timer.current)\n setByPointer(false)\n state.open()\n },\n panelEnter: () => {\n pointer.current.onPanel = true\n clearTimeout(timer.current)\n },\n panelLeave: () => {\n pointer.current.onPanel = false\n if (byPointer) {\n closeOnceGone()\n }\n },\n press: () => {\n clearTimeout(timer.current)\n if (state.isOpen) {\n state.close()\n }\n },\n }\n}\n\nPopover.Content = PopoverContent\nPopover.Description = PopoverDescription\nPopover.Title = PopoverTitle\n\nexport { Popover, PopoverContent, PopoverDescription, PopoverTitle }\nexport type {\n PopoverAlign,\n PopoverContentProps,\n PopoverDescriptionProps,\n PopoverProps,\n PopoverSide,\n PopoverSize,\n PopoverTitleProps,\n PopoverTrigger,\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA+FA,MAAM6C,sBAAsB;AAC5B,MAAMC,4BAA4B;AAGlC,MAAMC,SAAS;CAAEC,IAAI;CAAKC,IAAI;AAAI;AAMlC,MAAMI,SAAoB,EAAEC,SAAS,EAAE;AAEvC,MAAMC,WAAWZ,cACd,EAAEa,QAAQC,OAAOC,SAASC,cACzBrC,WAAWsC,OAAO;CAGhBC,SAAS;EACPC,eAAeH,QAAQV;EACvBc,mBAAmBJ,QAAQK;EAC3BC,YAAYN,QAAQX;CACtB;CACAkB,aAAa,EACXC,OAAOX,OAAOY,iBAChB;CAGAC,QAAQ,EACNC,UAAU,EACZ;CACAC,SAAS;EACPC,iBAAiBhB,OAAOiB;EACxBC,cAAcjB,MAA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A;CAAA,OA1CM4B;AA0CN;AAGH9B,QAAQuE,UAAUvC;AAClBhC,QAAQwE,cAAcnC;AACtBrC,QAAQyE,QAAQnG"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactNode","Ref","RefObject","HostInstance","StyleProp","TextProps","TextStyle","ViewProps","ViewStyle","AnimatedStyle","OverlayTriggerState","createContext","use","useCallback","useEffect","useId","useMemo","useRef","useState","Text","NativeText","ScrollView","StyleSheet","Animated","useOverlayTriggerState","ButtonSlots","OverlayAlign","OverlaySide","ResolvedTheme","ButtonSlotContext","ModalWindow","panelRoleOf","Overlay","useAnchoredPlacement","DismissLayer","PANEL_ORIGINS","useBackToClose","useFocusOnPlaced","usePanelMotion","useReturnFocus","refsOf","useTheme","composeStyles","themedStyles","useTypeRole","DEFAULT_HOVER_DELAY","DEFAULT_HOVER_CLOSE_DELAY","WIDTHS","md","sm","const","Record","PopoverSize","UNSEEN","opacity","stylesOf","colors","radii","shadows","spacing","create","content","paddingBottom","paddingHorizontal","lg","paddingTop","description","color","onSurfaceVariant","scroll","flexGrow","surface","backgroundColor","surfaceContainer","borderRadius","boxShadow","elevation2","overflow","title","HoverTrigger","ReturnType","useHoverTrigger","PanelProps","Omit","PopoverContentProps","anchor","byPointer","close","dismissable","hover","isOpen","labelledBy","modal","setPresent","present","size","titled","PopoverTitle","PopoverAlign","align","alignOffset","children","ref","side","PopoverSide","sideOffset","style","triggerRef","PopoverDescriptionProps","PopoverProps","closeDelay","defaultOpen","delay","onOpenChange","trigger","PopoverTrigger","PopoverRoot","id","setTitle","node","PopoverTitleProps","PopoverContext","TitleContext","Popover","t0","$","_c","t1","t2","t3","t4","t5","undefined","t6","state","hovering","t7","t8","default","press","delayLongPress","expanded","onHoverIn","enter","onHoverOut","leave","onLongPress","longPress","toggle","slots","t9","t10","root","t11","t12","PopoverContent","props","Error","setByPointer","panel","PopoverDescription","styles","role","T0","PopoverPanel","placement","setPanel","motion","placed","panelEnter","panelLeave","onLayout","maxWidth","transformOrigin","t13","t14","View","t15","wasOpen","setWasOpen","timer","Symbol","for","onPanel","onTrigger","pointer","clearTimeout","current","after","milliseconds","then","setTimeout","closeOnceGone","open","Content","Description","Title","_c","NativeText"],"sources":["../../../src/components/popover/index.tsx"],"sourcesContent":["import type { ReactNode, Ref, RefObject } from 'react'\nimport type {\n HostInstance,\n StyleProp,\n TextProps,\n TextStyle,\n ViewProps,\n ViewStyle,\n} from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\nimport type { OverlayTriggerState } from 'react-stately/useOverlayTriggerState'\n\nimport {\n createContext,\n use,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport { Text as NativeText, ScrollView, StyleSheet } from 'react-native'\nimport Animated from 'react-native-reanimated'\nimport { useOverlayTriggerState } from 'react-stately/useOverlayTriggerState'\n\nimport type { ButtonSlots } from '../../button/slots'\nimport type { OverlayAlign, OverlaySide } from '../../overlay'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { ButtonSlotContext } from '../../button/slots'\nimport { ModalWindow, panelRoleOf } from '../../modal'\nimport { Overlay, useAnchoredPlacement } from '../../overlay'\nimport {\n DismissLayer,\n PANEL_ORIGINS,\n useBackToClose,\n useFocusOnPlaced,\n usePanelMotion,\n useReturnFocus,\n} from '../../overlay/panel'\nimport { refsOf } from '../../ref'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\n\n// kanso-ui's Popover, a panel anchored to the control that opened it. It has\n// no Material Design page of its own, so it follows the tooltips page's rich\n// tooltip, as web's does: a panel on surface container with the 12dp corner\n// and the second elevation, inset 12dp above, 8dp below and 16dp at the\n// sides, holding a subhead in title small over supporting text in body\n// medium, both in on-surface variant, with no caret drawn between it and its\n// anchor. It is as wide as its content, up to 320dp at `md` and 240dp at\n// `sm`.\n//\n// **It is placed by src/overlay's anchored placement**: on `side`, lined up\n// by `align`, flipped to the opposite side at the edge of the window and kept\n// inside the safe area, with `start` and `end` following a right-to-left\n// layout. Its content scrolls when it runs past the room on the side it\n// opened on.\n//\n// **A non-modal popover, the default, draws in the overlay host** above the\n// screen, and a screen reader can leave it for the screen around it. A press\n// outside it lands on src/overlay's dismiss layer, drawn under it and hidden\n// from a screen reader, which closes it. The press goes no further, so a press on the trigger\n// closes it rather than opening it again, as on web. Android's back gesture\n// and VoiceOver's escape gesture close it too. **A modal popover draws in a\n// `Modal`**, through src/modal, as a dialog does, which keeps a screen reader\n// inside it until it closes, over a scrim that draws nothing.\n//\n// **`trigger=\"hover\"` opens once a pointer has rested on the trigger** for\n// `delay`, an iPad's pointer or an Android mouse, and closes `closeDelay`\n// after the pointer has left both the trigger and the panel, so the panel's\n// own buttons stay in reach. Touch has no hover, so a press held for `delay`\n// opens it too, and a popover opened that way stays open until a press\n// outside it or on its trigger. A hovered popover is always non-modal, as on\n// web, and one a pointer opened draws no layer under it, which would take\n// the pointer off the trigger.\n//\n// **It fades and scales in and out**, from 95% and from the edge facing its\n// anchor: in over the short3 duration on the emphasised decelerating curve,\n// once it has been placed, and out over short2 on the accelerating one, as\n// src/overlay's panel moves every anchored panel. Web only animates in, since\n// React Aria keeps a closing surface mounted only while a CSS animation runs;\n// here the panel stays mounted until its exit has run. Under reduced motion it\n// appears and leaves at once, as web's does.\n//\n// **A screen reader follows a press.** Opened by a press, or by a press held\n// on a hover trigger, it is sent to the title, or to the panel without one,\n// once the panel is placed, and back to the trigger once it has gone. A\n// pointer resting on the trigger moves nothing.\n\n// How long a pointer rests on a hover trigger before the popover opens, and\n// how long it has to be gone before it closes, React Aria's own defaults,\n// which web's spells out.\nconst DEFAULT_HOVER_DELAY = 600\nconst DEFAULT_HOVER_CLOSE_DELAY = 200\n\n// The widest each size draws, web's.\nconst WIDTHS = { md: 320, sm: 240 } as const satisfies Record<\n PopoverSize,\n number\n>\n\n// A modal popover's scrim takes presses and draws nothing.\nconst UNSEEN: ViewStyle = { opacity: 0 }\n\nconst stylesOf = themedStyles(\n ({ colors, radii, shadows, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The rich tooltip's inset: 12dp above, 8dp below and 16dp at the\n // sides.\n content: {\n paddingBottom: spacing.sm,\n paddingHorizontal: spacing.lg,\n paddingTop: spacing.md,\n },\n description: {\n color: colors.onSurfaceVariant,\n },\n // Only as tall as its content until the panel's room runs out, where\n // it scrolls.\n scroll: {\n flexGrow: 0,\n },\n surface: {\n backgroundColor: colors.surfaceContainer,\n borderRadius: radii.md,\n boxShadow: shadows.elevation2,\n overflow: 'hidden',\n },\n title: {\n color: colors.onSurfaceVariant,\n },\n }),\n)\n\n// How a hovered popover is opened and closed by a pointer, and how it was\n// opened last.\ntype HoverTrigger = ReturnType<typeof useHoverTrigger>\n\ntype PanelProps = Omit<PopoverContentProps, 'triggerRef'> & {\n readonly anchor: RefObject<HostInstance | null>\n /** Whether a pointer resting on the trigger opened it. */\n readonly byPointer: boolean\n readonly close: () => void\n /** Whether a press outside it lands on a layer that closes it. */\n readonly dismissable: boolean\n readonly hover: HoverTrigger\n readonly isOpen: boolean\n readonly labelledBy: string | undefined\n readonly modal: boolean\n readonly setPresent: (present: boolean) => void\n readonly size: PopoverSize\n /** The headline, which a screen reader is sent to once the panel shows. */\n readonly title: HostInstance | null\n readonly titled: PopoverTitle\n}\n\n/** Where the panel sits along the side it opens on. */\ntype PopoverAlign = OverlayAlign\n\ntype PopoverContentProps = Omit<ViewProps, 'children' | 'role' | 'style'> & {\n /**\n * Where the panel sits along the side it opens on. On `top` and `bottom`,\n * `start` and `end` follow a right-to-left layout.\n * @default 'center'\n */\n readonly align?: PopoverAlign\n /** Moves the panel along that side, in dp: right or down when positive. */\n readonly alignOffset?: number\n readonly children?: ReactNode\n readonly ref?: Ref<HostInstance>\n /**\n * Which side of the trigger the panel opens on. It flips to the opposite\n * side when there is no room.\n * @default 'bottom'\n */\n readonly side?: PopoverSide\n /**\n * The gap between the trigger and the panel, in dp.\n * @default spacing.sm\n */\n readonly sideOffset?: number\n readonly style?: StyleProp<ViewStyle>\n /** A view to place the panel beside other than the trigger. */\n readonly triggerRef?: RefObject<HostInstance | null>\n}\n\ntype PopoverDescriptionProps = TextProps & {\n readonly ref?: Ref<HostInstance>\n}\n\ntype PopoverProps = {\n /** The button that opens the popover, and `Popover.Content`. */\n readonly children?: ReactNode\n /**\n * How long the pointer has to be gone from a hovered popover's trigger\n * and panel before it closes, in milliseconds. Ignored by a pressed one.\n * @default 200\n */\n readonly closeDelay?: number\n /** Whether the popover starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /**\n * How long a pointer rests on a hover trigger, or a press is held on it,\n * before the popover opens, in milliseconds. Ignored by a pressed one.\n * @default 600\n */\n readonly delay?: number\n /** Whether the popover is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /**\n * Keeps a screen reader inside the panel while it is open, as a dialog\n * does. Off by default: a popover leaves the screen in reach, which is the\n * difference from `Sheet`. A hovered popover is never modal.\n * @default false\n */\n readonly modal?: boolean\n /** Called with the new state as the popover opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n /**\n * The panel's width: `sm` caps it at 240dp, `md` at 320dp. Either way it is\n * only as wide as its content.\n * @default 'md'\n */\n readonly size?: PopoverSize\n /**\n * What opens the panel: a press on the trigger, or a pointer resting on\n * it. `hover` is the tooltips page's rich tooltip, and on touch it opens\n * on a press held for `delay`.\n * @default 'press'\n */\n readonly trigger?: PopoverTrigger\n}\n\n// What the content reads from the root.\ntype PopoverRoot = {\n /** The trigger's node, which the panel is placed beside. */\n readonly anchor: RefObject<HostInstance | null>\n readonly close: () => void\n readonly hover: HoverTrigger\n readonly isOpen: boolean\n /** Whether the panel keeps a screen reader inside it. */\n readonly modal: boolean\n readonly size: PopoverSize\n}\n\n/** Which side of the trigger the panel opens on. */\ntype PopoverSide = OverlaySide\n\ntype PopoverSize = 'md' | 'sm'\n\n// What the panel's parts read: the headline's id, and where its node goes.\ntype PopoverTitle = {\n readonly id: string\n readonly setTitle: (node: HostInstance | null) => void\n}\n\ntype PopoverTitleProps = Omit<TextProps, 'role'> & {\n readonly ref?: Ref<HostInstance>\n}\n\ntype PopoverTrigger = 'hover' | 'press'\n\nconst PopoverContext = createContext<null | PopoverRoot>(null)\nconst TitleContext = createContext<null | PopoverTitle>(null)\n\n/**\n * A panel anchored to the control that opened it, as the tooltips spec\n * page's rich tooltip draws one. Pass `isOpen` with `onOpenChange` to hold\n * the open state, or `defaultOpen` to let it keep its own.\n *\n * ```tsx\n * <Popover>\n * <Button variant=\"outlined\">Open</Button>\n * <Popover.Content>\n * <Popover.Title>Headline</Popover.Title>\n * <Popover.Description>Supporting text</Popover.Description>\n * </Popover.Content>\n * </Popover>\n * ```\n *\n * Non-modal by default, which leaves the screen in reach of a screen reader,\n * and `modal` keeps one inside it. A press outside the panel and a button\n * given `slot=\"close\"` inside it close it, and a press on its trigger\n * toggles it. Composed rather than configured by props, as web's is: a\n * `Button`, `IconButton` or `Chip` placed directly inside `Popover` is its\n * trigger, and the panel is placed beside it.\n */\nfunction Popover({\n children,\n closeDelay = DEFAULT_HOVER_CLOSE_DELAY,\n defaultOpen,\n delay = DEFAULT_HOVER_DELAY,\n isOpen,\n modal = false,\n onOpenChange,\n size = 'md',\n trigger = 'press',\n}: PopoverProps) {\n const state = useOverlayTriggerState({ defaultOpen, isOpen, onOpenChange })\n const anchor = useRef<HostInstance>(null)\n const hover = useHoverTrigger(state, delay, closeDelay)\n const hovering = trigger === 'hover'\n const close = useCallback(() => {\n state.close()\n }, [state])\n const slots = useMemo<ButtonSlots>(\n () =>\n hovering\n ? {\n default: hover.press,\n trigger: {\n delayLongPress: delay,\n expanded: state.isOpen,\n onHoverIn: hover.enter,\n onHoverOut: hover.leave,\n onLongPress: hover.longPress,\n ref: anchor,\n },\n }\n : {\n default: () => {\n state.toggle()\n },\n trigger: { expanded: state.isOpen, ref: anchor },\n },\n [delay, hover, hovering, state],\n )\n const root = useMemo<PopoverRoot>(\n () => ({\n anchor,\n close,\n hover,\n isOpen: state.isOpen,\n modal: modal && !hovering,\n size,\n }),\n [close, hover, hovering, modal, size, state.isOpen],\n )\n\n return (\n <PopoverContext value={root}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </PopoverContext>\n )\n}\n\n/**\n * The panel itself. Everything the popover shows goes in here; the trigger\n * stays outside it. Its content scrolls when it runs past the room the\n * window leaves on the side it opened on.\n *\n * `style`, `ref` and `testID` land on the panel.\n */\nfunction PopoverContent({ triggerRef, ...props }: PopoverContentProps) {\n const root = use(PopoverContext)\n\n if (root === null) {\n throw new Error('Popover.Content is drawn inside Popover.')\n }\n\n const { anchor, close, hover, isOpen, modal, size } = root\n const [present, setPresent] = useState(isOpen)\n const [title, setTitle] = useState<HostInstance | null>(null)\n const [byPointer, setByPointer] = useState(hover.byPointer)\n const id = useId()\n const titled = useMemo(() => ({ id, setTitle }), [id])\n\n // Mounted the moment it opens, and kept until its exit has run.\n if (isOpen && !present) {\n setPresent(true)\n }\n\n // Whether a pointer opened it, kept until it has gone, after the root has\n // forgotten.\n if (isOpen && byPointer !== hover.byPointer) {\n setByPointer(hover.byPointer)\n }\n\n useReturnFocus(present, byPointer, triggerRef ?? anchor)\n\n if (!present) {\n return null\n }\n\n const labelledBy = title === null ? undefined : id\n const panel = (\n <PopoverPanel\n {...props}\n anchor={triggerRef ?? anchor}\n byPointer={byPointer}\n close={close}\n dismissable={!modal && !byPointer && isOpen}\n hover={hover}\n isOpen={isOpen}\n labelledBy={labelledBy}\n modal={modal}\n setPresent={setPresent}\n size={size}\n title={title}\n titled={titled}\n />\n )\n\n if (!modal) {\n return <Overlay>{panel}</Overlay>\n }\n\n return (\n <ModalWindow\n isKeyboardDismissDisabled={false}\n labelledBy={labelledBy}\n onClose={close}\n onScrimPress={isOpen ? close : undefined}\n scrim={UNSEEN}\n title={null}\n >\n {panel}\n </ModalWindow>\n )\n}\n\n/**\n * Supporting text under the title, in body medium on on-surface variant.\n * `style`, `ref` and `testID` land on React Native's own Text.\n */\nfunction PopoverDescription({ style, ...props }: PopoverDescriptionProps) {\n const styles = stylesOf(useTheme())\n const role = useTypeRole('bodyMedium')\n\n return (\n <NativeText\n {...props}\n style={composeStyles<TextStyle>(role, styles.description, style)}\n />\n )\n}\n\n// The panel, drawn where the popover's host is: in the overlay host above the\n// screen, or in the `Modal` of a modal one, so the placement measures the\n// layer the panel is drawn in.\nfunction PopoverPanel({\n align,\n alignOffset,\n anchor,\n byPointer,\n children,\n close,\n dismissable,\n hover,\n isOpen,\n labelledBy,\n modal,\n ref,\n setPresent,\n side,\n sideOffset,\n size,\n style,\n title,\n titled,\n ...props\n}: PanelProps) {\n const styles = stylesOf(useTheme())\n const placement = useAnchoredPlacement({\n align,\n alignOffset,\n anchor,\n side,\n sideOffset,\n })\n const [panel, setPanel] = useState<HostInstance | null>(null)\n const motion = usePanelMotion(isOpen, placement.placed, setPresent)\n const slots = useMemo<ButtonSlots>(() => ({ close }), [close])\n\n useBackToClose(close, !modal && isOpen)\n useFocusOnPlaced(placement.placed && !byPointer, title ?? panel)\n\n return (\n <>\n {dismissable ? <DismissLayer onPress={close} /> : null}\n <Animated.View\n {...(modal\n ? panelRoleOf('dialog', labelledBy)\n : { 'aria-labelledby': labelledBy, role: 'dialog' as const })}\n onAccessibilityEscape={close}\n onPointerEnter={hover.panelEnter}\n onPointerLeave={hover.panelLeave}\n {...props}\n onLayout={placement.onLayout}\n ref={refsOf(setPanel, ref)}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.surface,\n { maxWidth: WIDTHS[size] },\n placement.style,\n { transformOrigin: PANEL_ORIGINS[placement.side] },\n motion,\n style,\n )}\n >\n <ScrollView\n contentContainerStyle={styles.content}\n style={styles.scroll}\n >\n <TitleContext value={titled}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </TitleContext>\n </ScrollView>\n </Animated.View>\n </>\n )\n}\n\n/**\n * Names the popover: the panel is labelled by it, and a screen reader is\n * sent to it once a pressed popover shows. In title small on on-surface\n * variant, the rich tooltip's subhead. `style`, `ref` and `testID` land on\n * React Native's own Text.\n */\nfunction PopoverTitle({ ref, style, ...props }: PopoverTitleProps) {\n const titled = use(TitleContext)\n const styles = stylesOf(useTheme())\n const role = useTypeRole('titleSmall')\n\n if (titled === null) {\n throw new Error('Popover.Title is drawn inside Popover.Content.')\n }\n\n return (\n <NativeText\n {...props}\n nativeID={titled.id}\n ref={refsOf(titled.setTitle, ref)}\n role=\"heading\"\n style={composeStyles<TextStyle>(role, styles.title, style)}\n />\n )\n}\n\n/**\n * How a hovered popover opens and closes. A pointer resting on the trigger\n * for `delay` opens it, and once the pointer has left both the trigger and\n * the panel for `closeDelay` it closes again. A press held for `delay` opens\n * it as well, and a popover opened that way stays open until a press outside\n * it or on the trigger. `byPointer` says whether a pointer opened it, which\n * is forgotten as it closes, however it closed.\n */\nfunction useHoverTrigger(\n state: OverlayTriggerState,\n delay: number,\n closeDelay: number,\n) {\n const [byPointer, setByPointer] = useState(false)\n const [wasOpen, setWasOpen] = useState(state.isOpen)\n const timer = useRef<ReturnType<typeof setTimeout>>(undefined)\n const pointer = useRef({ onPanel: false, onTrigger: false })\n\n if (wasOpen !== state.isOpen) {\n setWasOpen(state.isOpen)\n if (!state.isOpen) {\n setByPointer(false)\n }\n }\n\n useEffect(\n () => () => {\n clearTimeout(timer.current)\n },\n [],\n )\n\n function after(milliseconds: number, then: () => void) {\n clearTimeout(timer.current)\n timer.current = setTimeout(then, milliseconds)\n }\n\n function closeOnceGone() {\n after(closeDelay, () => {\n if (!pointer.current.onPanel && !pointer.current.onTrigger) {\n state.close()\n }\n })\n }\n\n return {\n byPointer,\n enter: () => {\n pointer.current.onTrigger = true\n if (state.isOpen) {\n clearTimeout(timer.current)\n return\n }\n after(delay, () => {\n setByPointer(true)\n state.open()\n })\n },\n leave: () => {\n pointer.current.onTrigger = false\n if (!state.isOpen) {\n clearTimeout(timer.current)\n } else if (byPointer) {\n closeOnceGone()\n }\n },\n longPress: () => {\n clearTimeout(timer.current)\n setByPointer(false)\n state.open()\n },\n panelEnter: () => {\n pointer.current.onPanel = true\n clearTimeout(timer.current)\n },\n panelLeave: () => {\n pointer.current.onPanel = false\n if (byPointer) {\n closeOnceGone()\n }\n },\n press: () => {\n clearTimeout(timer.current)\n if (state.isOpen) {\n state.close()\n }\n },\n }\n}\n\nPopover.Content = PopoverContent\nPopover.Description = PopoverDescription\nPopover.Title = PopoverTitle\n\nexport { Popover, PopoverContent, PopoverDescription, PopoverTitle }\nexport type {\n PopoverAlign,\n PopoverContentProps,\n PopoverDescriptionProps,\n PopoverProps,\n PopoverSide,\n PopoverSize,\n PopoverTitleProps,\n PopoverTrigger,\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA+FA,MAAM6C,sBAAsB;AAC5B,MAAMC,4BAA4B;AAGlC,MAAMC,SAAS;CAAEC,IAAI;CAAKC,IAAI;AAAI;AAMlC,MAAMI,SAAoB,EAAEC,SAAS,EAAE;AAEvC,MAAMC,WAAWZ,cACd,EAAEa,QAAQC,OAAOC,SAASC,cACzBrC,WAAWsC,OAAO;CAGhBC,SAAS;EACPC,eAAeH,QAAQV;EACvBc,mBAAmBJ,QAAQK;EAC3BC,YAAYN,QAAQX;CACtB;CACAkB,aAAa,EACXC,OAAOX,OAAOY,iBAChB;CAGAC,QAAQ,EACNC,UAAU,EACZ;CACAC,SAAS;EACPC,iBAAiBhB,OAAOiB;EACxBC,cAAcjB,MAAMT;EACpB2B,WAAWjB,QAAQkB;EACnBC,UAAU;CACZ;CACAC,OAAO,EACLX,OAAOX,OAAOY,iBAChB;AACF,CAAC,CACL;AAkIA,MAAMqD,iBAAiB9G,cAAkC,IAAI;AAC7D,MAAM+G,eAAe/G,cAAmC,IAAI;;;;;;;;;;;;;;;;;;;;;;;AAwB5D,SAAAgH,QAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAiB,MAAA,EAAAzB,UAAAS,YAAAiB,IAAAhB,aAAAC,OAAAgB,IAAAtC,QAAAE,OAAAqC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,EAAA,QAAAvC,aAAAuC,EAAA,QAAAmE,eAAA;EACW1C,WAAA;GACVmC,QAAOE,QAAQJ,UAAW;GAC1B,IAAIjG,WACF0G,cAAc;EACf;EACFnE,EAAA,MAAAvC;EAAAuC,EAAA,MAAAmE;EAAAnE,EAAA,MAAAyB;CAAA,OAAAA,KAAAzB,EAAA;CAAA,IAAA0B;CAAA,IAAA1B,EAAA,QAAAS,OAAA;EACMiB,YAAA;GACLmC,aAAaN,MAAKO,OAAQ;GAC1B,IAAIrD,MAAK5C,QACP4C,MAAK/C,MAAO;EACb;EACFsC,EAAA,MAAAS;EAAAT,EAAA,MAAA0B;CAAA,OAAAA,MAAA1B,EAAA;CAAA,IAAA4B;CAAA,IAAA5B,EAAA,QAAAvC,aAAAuC,EAAA,QAAA0B,OAAA1B,EAAA,QAAAM,MAAAN,EAAA,QAAAQ,MAAAR,EAAA,QAAAW,MAAAX,EAAA,QAAAyB,IAAA;EAzCIG,MAAA;GAAAnE;GAAAyD,OAEEZ;GAUNc,OACMZ;GAONc,WACUX;GAIViC,YACWhC;GAGXiC,YACWpB;GAKXX,OACMY;EAMT;EAAC1B,EAAA,MAAAvC;EAAAuC,EAAA,MAAA0B;EAAA1B,EAAA,MAAAM;EAAAN,EAAA,MAAAQ;EAAAR,EAAA,MAAAW;EAAAX,EAAA,MAAAyB;EAAAzB,EAAA,MAAA4B;CAAA,OAAAA,MAAA5B,EAAA;CAAA,OA1CM4B;AA0CN;AAGH9B,QAAQuE,UAAUvC;AAClBhC,QAAQwE,cAAcnC;AACtBrC,QAAQyE,QAAQnG"}
|
|
@@ -56,8 +56,9 @@ type SearchViewProps = {
|
|
|
56
56
|
* </SearchView>
|
|
57
57
|
* ```
|
|
58
58
|
*
|
|
59
|
-
* Composed as Popover is: a `Button` or `
|
|
60
|
-
* `SearchView` opens the view, and `SearchView.Content` is the view
|
|
59
|
+
* Composed as Popover is: a `Button`, `IconButton` or `Chip` placed directly
|
|
60
|
+
* inside `SearchView` opens the view, and `SearchView.Content` is the view
|
|
61
|
+
* itself.
|
|
61
62
|
*/
|
|
62
63
|
declare function SearchView({ children, defaultOpen, isOpen, onOpenChange }: SearchViewProps): import("react").JSX.Element;
|
|
63
64
|
declare namespace SearchView {
|