@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.
Files changed (46) hide show
  1. package/dist/collection/index.js +107 -80
  2. package/dist/collection/index.js.map +1 -1
  3. package/dist/components/chip/index.d.ts +4 -1
  4. package/dist/components/chip/index.js +229 -161
  5. package/dist/components/chip/index.js.map +1 -1
  6. package/dist/components/dialog/index.d.ts +5 -5
  7. package/dist/components/dialog/index.js +5 -5
  8. package/dist/components/dialog/index.js.map +1 -1
  9. package/dist/components/drop-zone/index.d.ts +3 -3
  10. package/dist/components/drop-zone/index.js +2 -2
  11. package/dist/components/drop-zone/index.js.map +1 -1
  12. package/dist/components/menu/index.d.ts +3 -3
  13. package/dist/components/menu/index.js +3 -3
  14. package/dist/components/menu/index.js.map +1 -1
  15. package/dist/components/popover/index.d.ts +2 -2
  16. package/dist/components/popover/index.js +2 -2
  17. package/dist/components/popover/index.js.map +1 -1
  18. package/dist/components/search-view/index.d.ts +3 -2
  19. package/dist/components/search-view/index.js +3 -2
  20. package/dist/components/search-view/index.js.map +1 -1
  21. package/dist/components/sheet/index.d.ts +16 -7
  22. package/dist/components/sheet/index.js +157 -152
  23. package/dist/components/sheet/index.js.map +1 -1
  24. package/dist/components/table/index.d.ts +391 -0
  25. package/dist/components/table/index.js +1708 -0
  26. package/dist/components/table/index.js.map +1 -0
  27. package/dist/components/token-field/index.d.ts +105 -0
  28. package/dist/components/token-field/index.js +574 -0
  29. package/dist/components/token-field/index.js.map +1 -0
  30. package/dist/components/tooltip/index.d.ts +2 -1
  31. package/dist/components/tooltip/index.js.map +1 -1
  32. package/dist/field/index.js +50 -1
  33. package/dist/field/index.js.map +1 -1
  34. package/dist/field/styles.js +9 -1
  35. package/dist/field/styles.js.map +1 -1
  36. package/dist/glyphs/index.js +37 -1
  37. package/dist/glyphs/index.js.map +1 -1
  38. package/dist/i18n/index.js +17 -1
  39. package/dist/i18n/index.js.map +1 -1
  40. package/dist/i18n/messages.js +340 -0
  41. package/dist/i18n/messages.js.map +1 -1
  42. package/dist/index.d.ts +4 -2
  43. package/dist/index.js +4 -2
  44. package/dist/slider/index.js +1 -1
  45. package/dist/slider/index.js.map +1 -1
  46. package/package.json +1 -1
@@ -111,8 +111,9 @@ function resultsOf(windowHeight, header) {
111
111
  * </SearchView>
112
112
  * ```
113
113
  *
114
- * Composed as Popover is: a `Button` or `IconButton` placed directly inside
115
- * `SearchView` opens the view, and `SearchView.Content` is the view itself.
114
+ * Composed as Popover is: a `Button`, `IconButton` or `Chip` placed directly
115
+ * inside `SearchView` opens the view, and `SearchView.Content` is the view
116
+ * itself.
116
117
  */
117
118
  function SearchView(t0) {
118
119
  const $ = c(19);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","RefObject","HostInstance","StyleProp","TextInput","ViewStyle","AnimatedStyle","EdgeInsets","OverlayTriggerState","createContext","use","useCallback","useMemo","useRef","useState","Platform","StyleSheet","useWindowDimensions","View","Animated","SafeAreaInsetsContext","useOverlayTriggerState","AutocompleteValue","ButtonSlots","AnchoredPlacement","ResolvedTheme","AutocompleteProps","AutocompleteContext","ButtonSlotContext","FieldInput","ArrowBackGlyph","CloseGlyph","useWindowSizeClass","useMessages","insetsOf","ModalWindow","NO_INSETS","panelRoleOf","useAnchoredPlacement","useKeyboardTop","PANEL_ORIGINS","useFocusOnPlaced","usePanelMotion","useReturnFocus","refsOf","useTheme","composeStyles","themedStyles","Autocomplete","IconButton","FULL_HEADER","MIN_WIDTH","MAX_WIDTH","MIN_RESULTS","UNSEEN","opacity","stylesOf","colors","radii","shadows","spacing","create","back","marginStart","xs","clear","marginEnd","divider","backgroundColor","outline","flexShrink","height","docked","borderRadius","xl","boxShadow","elevation3","full","bottom","left","position","right","top","header","alignItems","flexDirection","gap","sm","paddingHorizontal","lg","resultsFull","flex","surface","surfaceContainerHigh","overflow","PanelProps","Omit","SearchViewContentProps","anchor","backLabel","clearLabel","close","isOpen","setInput","input","setPresent","present","T","children","label","placeholder","ref","style","testID","SearchViewProps","defaultOpen","onOpenChange","SearchViewRoot","state","SearchViewContext","clearOf","autocomplete","setInputValue","focus","dockedOf","placement","transformOrigin","side","width","Math","min","max","anchorWidth","fullOf","insets","covered","paddingBottom","measureBottomOf","panel","setBottom","measureInWindow","_x","y","_width","minHeightOf","minHeight","resultsOf","windowHeight","maxHeight","SearchView","t0","$","_c","t1","t2","open","t3","expanded","t4","default","trigger","slots","t5","root","t6","t7","SearchViewContent","defaultInputValue","filter","inputValue","onInputChange","props","Error","messages","undefined","clearSearch","t8","t9","t10","SearchViewPanel","theme","styles","sizing","typography","window","keyboardTop","align","motion","placed","setPanel","setOwnInput","controlLg","bodyLargeLineHeight","fontScale","Symbol","for","OS","onLayout","T0","onSurface","t11","t12","t13","t14","t15","t16","t17","t18","t19","Content","_c"],"sources":["../../../src/components/search-view/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref, RefObject } from 'react'\nimport type {\n HostInstance,\n StyleProp,\n TextInput,\n ViewStyle,\n} from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\nimport type { EdgeInsets } from 'react-native-safe-area-context'\nimport type { OverlayTriggerState } from 'react-stately/useOverlayTriggerState'\n\nimport {\n createContext,\n use,\n useCallback,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport { Platform, StyleSheet, useWindowDimensions, View } from 'react-native'\nimport Animated from 'react-native-reanimated'\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context'\nimport { useOverlayTriggerState } from 'react-stately/useOverlayTriggerState'\n\nimport type { AutocompleteValue } from '../../autocomplete'\nimport type { ButtonSlots } from '../../button/slots'\nimport type { AnchoredPlacement } from '../../overlay'\nimport type { ResolvedTheme } from '../../theme/scope'\nimport type { AutocompleteProps } from '../autocomplete'\n\nimport { AutocompleteContext } from '../../autocomplete'\nimport { ButtonSlotContext } from '../../button/slots'\nimport { FieldInput } from '../../field'\nimport { ArrowBackGlyph, CloseGlyph } from '../../glyphs'\nimport { useWindowSizeClass } from '../../hooks/useWindowSizeClass'\nimport { useMessages } from '../../i18n/provider'\nimport { insetsOf, ModalWindow, NO_INSETS, panelRoleOf } from '../../modal'\nimport { useAnchoredPlacement } from '../../overlay'\nimport { useKeyboardTop } from '../../overlay/keyboard'\nimport {\n PANEL_ORIGINS,\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 { Autocomplete } from '../autocomplete'\nimport { IconButton } from '../icon-button'\n\n// kanso-ui's SearchView, the search page's search view: what a search opens\n// into. A header holds a back button, the input and a clear button, over a\n// 1dp divider in the outline role, and the results run under it. Both of the\n// page's forms are surface container high, with the input in body large on\n// surface over a supporting text in on surface variant, the back icon in on\n// surface and the clear icon in on surface variant.\n//\n// **Which form is the window's.** In a compact window it is the page's\n// full-screen view: the whole window, square, with a 72dp header, its content\n// inside the safe area while its fill runs on under it. From the medium\n// window up, the docked view: dropped under what opened it, as wide as that\n// and held between the page's 360dp and 720dp, with a 28dp corner, a 56dp\n// header, results at least 240dp tall and the whole view no taller than two\n// thirds of the window, at elevation 3, as web's takes them from Compose's\n// docked search bar. Both headers grow by as much as the input's line does at\n// the device's text size.\n//\n// **Both forms are drawn in a `Modal`**, through src/modal, as web's is a\n// dialog in a modal popover: a screen reader stays inside the view until it\n// closes, and a press outside the docked one lands on a scrim that draws\n// nothing and closes it. The docked one is placed by src/overlay's anchored\n// placement under its trigger, flipped above it where there is no room, and\n// kept above the software keyboard. Full screen, the results stop at the\n// keyboard's top edge, so the last of them can be scrolled into sight above\n// the keys.\n//\n// **It is Autocomplete around the header and the results**, as web's is: the\n// header's input is the autocomplete's field, so a ListBox or a List among\n// the results narrows as it is typed into, says how many rows a search leaves\n// to a screen reader, and takes a press on its first tap while the keyboard\n// is up, as it does anywhere inside an Autocomplete.\n//\n// **The header lines up with the search bar's.** The back button sits where\n// SearchField's magnifier does, its icon 28dp in, and the text starts at\n// 68dp, as the bar's does; the clear button's icon ends 28dp from the end. So\n// a view opened from a bar puts its input where the bar's was.\n//\n// **Focus goes to the input and back.** The input takes the keyboard's focus\n// as the view opens, and a screen reader is sent to it once the view shows,\n// and back to the trigger once it has gone. The back button closes it, as\n// Android's back gesture, VoiceOver's escape gesture and Escape on web do.\n// It fades and scales in and out, as src/overlay's anchored panels do, and\n// at once under reduced motion.\n\n// The page's full-screen header, and the docked view's bounds.\nconst FULL_HEADER = 72\nconst MIN_WIDTH = 360\nconst MAX_WIDTH = 720\nconst MIN_RESULTS = 240\n\n// The docked view'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 // 4dp in from the header's padding, so the icon inside the 40dp button\n // sits 28dp in, where the search bar draws its magnifier.\n back: {\n marginStart: spacing.xs,\n },\n // 4dp in from the padding, so the icon inside the 40dp button ends 28dp\n // from the end, as the search bar's does.\n clear: {\n marginEnd: spacing.xs,\n },\n // The page's divider under the header, in the outline role.\n divider: {\n backgroundColor: colors.outline,\n flexShrink: 0,\n height: 1,\n },\n docked: {\n borderRadius: radii.xl,\n boxShadow: shadows.elevation3,\n },\n full: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n header: {\n alignItems: 'center',\n flexDirection: 'row',\n flexShrink: 0,\n gap: spacing.sm,\n paddingHorizontal: spacing.lg,\n },\n // Full screen, the results take what the header leaves, and scroll\n // inside it.\n resultsFull: {\n flex: 1,\n },\n surface: {\n backgroundColor: colors.surfaceContainerHigh,\n overflow: 'hidden',\n },\n }),\n)\n\ntype PanelProps = Omit<\n SearchViewContentProps,\n | 'backLabel'\n | 'clearLabel'\n | 'defaultInputValue'\n | 'filter'\n | 'inputValue'\n | 'onInputChange'\n> & {\n readonly anchor: RefObject<HostInstance | null>\n readonly backLabel: string\n readonly clearLabel: string\n readonly close: () => void\n readonly docked: boolean\n readonly isOpen: boolean\n readonly setInput: (input: ComponentRef<typeof TextInput> | null) => void\n readonly setPresent: (present: boolean) => void\n}\n\ntype SearchViewContentProps<T extends object = object> = Omit<\n AutocompleteProps<T>,\n 'children'\n> & {\n /**\n * What the back button is called, for a screen reader. Left out, the\n * library names it in the `I18nProvider`'s locale, or the device's outside\n * one, \"Back\" in English.\n */\n readonly backLabel?: string\n /** The results: a ListBox or a List, which typing narrows. */\n readonly children?: ReactNode\n /**\n * What the clear button is called, for a screen reader. Left out, it is\n * the name React Aria gives web's in the `I18nProvider`'s locale, or the\n * device's outside one, \"Clear search\" in English.\n */\n readonly clearLabel?: string\n /**\n * What is searched, for a screen reader. It names both the view and its\n * input, and is read rather than shown; `placeholder` is what is seen.\n */\n readonly label: string\n /** The supporting text in the empty input, which is what a person reads. */\n readonly placeholder?: string\n readonly ref?: Ref<HostInstance>\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\ntype SearchViewProps = {\n /**\n * The Button or IconButton that opens the view, and `SearchView.Content`.\n */\n readonly children?: ReactNode\n /** Whether the view starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /** Whether the view is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /** Called with the new state as the view opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n}\n\n// What the content reads from the root: the open state, and the trigger's\n// node, which the docked view is placed under and focus goes back to.\ntype SearchViewRoot = {\n readonly anchor: RefObject<HostInstance | null>\n readonly state: OverlayTriggerState\n}\n\nconst SearchViewContext = createContext<null | SearchViewRoot>(null)\n\n// Empties the input from the clear button, and hands the keyboard back to it,\n// so the next search is typed straight in.\nfunction clearOf(\n autocomplete: AutocompleteValue,\n input: ComponentRef<typeof TextInput> | null,\n) {\n return () => {\n autocomplete.setInputValue('')\n input?.focus()\n }\n}\n\n// The docked view: as wide as what opened it, between the page's bounds,\n// and placed under it.\nfunction dockedOf(placement: AnchoredPlacement): ViewStyle {\n return {\n ...placement.style,\n transformOrigin: PANEL_ORIGINS[placement.side],\n width: Math.min(\n MAX_WIDTH,\n Math.max(MIN_WIDTH, placement.anchorWidth ?? MIN_WIDTH),\n ),\n }\n}\n\n// The full-screen view's content inside the safe area, and above the\n// keyboard where the keyboard reaches further up than the safe area's own\n// bottom inset.\nfunction fullOf(insets: EdgeInsets, covered: number): ViewStyle {\n return {\n ...insetsOf(insets),\n paddingBottom: Math.max(insets.bottom, covered),\n transformOrigin: 'top',\n }\n}\n\n// Where the view's bottom edge is in the window, kept for the keyboard to be\n// measured against.\nfunction measureBottomOf(\n panel: HostInstance | null,\n setBottom: (bottom: number) => void,\n) {\n return () => {\n panel?.measureInWindow((_x, y, _width, height) => {\n setBottom(y + height)\n })\n }\n}\n\nfunction minHeightOf(minHeight: number): ViewStyle {\n return { minHeight }\n}\n\n// The docked view's results: at least the page's 240dp, and short enough\n// that the view stays within two thirds of the window.\nfunction resultsOf(windowHeight: number, header: number): ViewStyle {\n return {\n maxHeight: (windowHeight * 2) / 3 - header - 1,\n minHeight: MIN_RESULTS,\n }\n}\n\n/**\n * The view a search opens into: full screen in a compact window, docked\n * under what opened it in a wider one. Pass `isOpen` with `onOpenChange` to\n * hold the open state, or `defaultOpen` to let it keep its own.\n *\n * ```tsx\n * <SearchView>\n * <IconButton aria-label=\"Search\">\n * <SearchIcon />\n * </IconButton>\n * <SearchView.Content label=\"Search\" placeholder=\"Search\">\n * <ListBox aria-label=\"Results\">…</ListBox>\n * </SearchView.Content>\n * </SearchView>\n * ```\n *\n * Composed as Popover is: a `Button` or `IconButton` placed directly inside\n * `SearchView` opens the view, and `SearchView.Content` is the view itself.\n */\nfunction SearchView({\n children,\n defaultOpen,\n isOpen,\n onOpenChange,\n}: SearchViewProps) {\n const state = useOverlayTriggerState({ defaultOpen, isOpen, onOpenChange })\n const anchor = useRef<HostInstance>(null)\n const slots = useMemo<ButtonSlots>(\n () => ({\n default: () => {\n state.open()\n },\n trigger: { expanded: state.isOpen, ref: anchor },\n }),\n [state],\n )\n const root = useMemo<SearchViewRoot>(() => ({ anchor, state }), [state])\n\n return (\n <SearchViewContext value={root}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </SearchViewContext>\n )\n}\n\n/**\n * The view: the header with its back button, input and clear button, and\n * the results under it, inside an Autocomplete, so typing narrows them. What\n * has been typed is the autocomplete's: pass `inputValue` with\n * `onInputChange` to control it, or `defaultInputValue` to let it keep its\n * own, which starts again each time the view opens.\n *\n * `style`, `ref` and `testID` land on the view's surface.\n */\nfunction SearchViewContent<T extends object = object>({\n backLabel,\n clearLabel,\n defaultInputValue,\n filter,\n inputValue,\n label,\n onInputChange,\n ...props\n}: SearchViewContentProps<T>) {\n const root = use(SearchViewContext)\n\n if (root === null) {\n throw new Error('SearchView.Content is drawn inside SearchView.')\n }\n\n const { anchor, state } = root\n const messages = useMessages()\n const docked = useWindowSizeClass() !== 'compact'\n const [present, setPresent] = useState(state.isOpen)\n const [input, setInput] = useState<ComponentRef<typeof TextInput> | null>(\n null,\n )\n const close = useCallback(() => {\n state.close()\n }, [state])\n const slots = useMemo<ButtonSlots>(() => ({ close }), [close])\n\n // Mounted the moment it opens, and kept until its exit has run.\n if (state.isOpen && !present) {\n setPresent(true)\n }\n\n useReturnFocus(present, false, anchor)\n\n if (!present) {\n return null\n }\n\n return (\n <Autocomplete<T>\n defaultInputValue={defaultInputValue}\n filter={filter}\n inputValue={inputValue}\n onInputChange={onInputChange}\n >\n <ModalWindow\n isKeyboardDismissDisabled={false}\n label={label}\n labelledBy={undefined}\n onClose={close}\n onScrimPress={state.isOpen ? close : undefined}\n scrim={UNSEEN}\n // Full screen it is shown at once, so the screen reader goes to the\n // input as the window shows; docked, once the view has been placed.\n title={docked ? null : input}\n >\n <ButtonSlotContext value={slots}>\n <SearchViewPanel\n {...props}\n anchor={anchor}\n backLabel={backLabel ?? messages.back}\n clearLabel={clearLabel ?? messages.clearSearch}\n close={close}\n docked={docked}\n isOpen={state.isOpen}\n label={label}\n setInput={setInput}\n setPresent={setPresent}\n />\n </ButtonSlotContext>\n </ModalWindow>\n </Autocomplete>\n )\n}\n\n// The surface, drawn in the `Modal` so the anchored placement measures the\n// layer it is drawn in. Read inside the Autocomplete, whose value the input\n// shows and reports each edit to.\nfunction SearchViewPanel({\n anchor,\n backLabel,\n children,\n clearLabel,\n close,\n docked,\n isOpen,\n label,\n placeholder,\n ref,\n setInput,\n setPresent,\n style,\n ...props\n}: PanelProps) {\n const theme = useTheme()\n const styles = stylesOf(theme)\n const { colors, sizing, typography } = theme\n const autocomplete = use(AutocompleteContext)\n const window = useWindowDimensions()\n const insets = use(SafeAreaInsetsContext) ?? NO_INSETS\n const keyboardTop = useKeyboardTop()\n const placement = useAnchoredPlacement({ align: 'start', anchor })\n const motion = usePanelMotion(isOpen, !docked || placement.placed, setPresent)\n const [panel, setPanel] = useState<HostInstance | null>(null)\n const [input, setOwnInput] = useState<ComponentRef<typeof TextInput> | null>(\n null,\n )\n const [bottom, setBottom] = useState<null | number>(null)\n const header =\n (docked ? sizing.controlLg : FULL_HEADER) +\n typography.bodyLargeLineHeight * (window.fontScale - 1)\n // Full screen, how far the keyboard reaches up over the view. iOS draws it\n // over the window, where Android's `Modal` shrinks the window to make room\n // and leaves it nothing to cover.\n const covered =\n keyboardTop === null || bottom === null ? 0 : bottom - keyboardTop\n\n useFocusOnPlaced(docked && placement.placed, input)\n\n if (autocomplete === null) {\n return null\n }\n\n return (\n <Animated.View\n {...panelRoleOf('dialog', undefined)}\n aria-label={Platform.OS === 'web' ? undefined : label}\n onAccessibilityEscape={close}\n {...props}\n onLayout={docked ? placement.onLayout : measureBottomOf(panel, setBottom)}\n ref={refsOf(setPanel, ref)}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.surface,\n docked ? styles.docked : styles.full,\n docked ? dockedOf(placement) : fullOf(insets, covered),\n motion,\n style,\n )}\n >\n <View\n style={composeStyles<ViewStyle>(styles.header, minHeightOf(header))}\n >\n <IconButton aria-label={backLabel} slot=\"close\" style={styles.back}>\n <ArrowBackGlyph color={colors.onSurface} />\n </IconButton>\n <FieldInput\n aria-label={label}\n // A search view opens to be typed into, so the input takes the\n // keyboard as it shows rather than leaving it to the back button.\n autoFocus\n onChangeText={autocomplete.setInputValue}\n placeholder={placeholder}\n ref={refsOf(setOwnInput, setInput)}\n returnKeyType=\"search\"\n role=\"searchbox\"\n value={autocomplete.inputValue}\n />\n {autocomplete.inputValue === '' ? null : (\n <IconButton\n aria-label={clearLabel}\n onPress={clearOf(autocomplete, input)}\n style={styles.clear}\n >\n <CloseGlyph />\n </IconButton>\n )}\n </View>\n <View style={styles.divider} />\n <View\n style={docked ? resultsOf(window.height, header) : styles.resultsFull}\n >\n {children}\n </View>\n </Animated.View>\n )\n}\n\nSearchView.Content = SearchViewContent\n\nexport { SearchView, SearchViewContent }\nexport type { SearchViewContentProps, SearchViewProps }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAgGA,MAAMoD,cAAc;AACpB,MAAMC,YAAY;AAClB,MAAMC,YAAY;AAClB,MAAMC,cAAc;AAGpB,MAAMC,SAAoB,EAAEC,SAAS,EAAE;AAEvC,MAAMC,WAAWT,cACd,EAAEU,QAAQC,OAAOC,SAASC,cACzB5C,WAAW6C,OAAO;CAGhBC,MAAM,EACJC,aAAaH,QAAQI,GACvB;CAGAC,OAAO,EACLC,WAAWN,QAAQI,GACrB;CAEAG,SAAS;EACPC,iBAAiBX,OAAOY;EACxBC,YAAY;EACZC,QAAQ;CACV;CACAC,QAAQ;EACNC,cAAcf,MAAMgB;EACpBC,WAAWhB,QAAQiB;CACrB;CACAC,MAAM;EACJC,QAAQ;EACRC,MAAM;EACNC,UAAU;EACVC,OAAO;EACPC,KAAK;CACP;CACAC,QAAQ;EACNC,YAAY;EACZC,eAAe;EACff,YAAY;EACZgB,KAAK1B,QAAQ2B;EACbC,mBAAmB5B,QAA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AAsD;EAAAtD,EAAA,MAAAwD;EAAAxD,EAAA,MAAAG,GAAAxI;EAAAqI,EAAA,MAAAK;EAAAL,EAAA,MAAAO;EAAAP,EAAA,MAAAW;EAAAX,EAAA,MAAAa;EAAAb,EAAA,MAAAc;EAAAd,EAAA,MAAAyD;CAAA,OAAAA,MAAAzD,EAAA;CAAA,OAjDhByD;AAiDgB;AAIpB3D,WAAW4D,UAAU3C"}
1
+ {"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","RefObject","HostInstance","StyleProp","TextInput","ViewStyle","AnimatedStyle","EdgeInsets","OverlayTriggerState","createContext","use","useCallback","useMemo","useRef","useState","Platform","StyleSheet","useWindowDimensions","View","Animated","SafeAreaInsetsContext","useOverlayTriggerState","AutocompleteValue","ButtonSlots","AnchoredPlacement","ResolvedTheme","AutocompleteProps","AutocompleteContext","ButtonSlotContext","FieldInput","ArrowBackGlyph","CloseGlyph","useWindowSizeClass","useMessages","insetsOf","ModalWindow","NO_INSETS","panelRoleOf","useAnchoredPlacement","useKeyboardTop","PANEL_ORIGINS","useFocusOnPlaced","usePanelMotion","useReturnFocus","refsOf","useTheme","composeStyles","themedStyles","Autocomplete","IconButton","FULL_HEADER","MIN_WIDTH","MAX_WIDTH","MIN_RESULTS","UNSEEN","opacity","stylesOf","colors","radii","shadows","spacing","create","back","marginStart","xs","clear","marginEnd","divider","backgroundColor","outline","flexShrink","height","docked","borderRadius","xl","boxShadow","elevation3","full","bottom","left","position","right","top","header","alignItems","flexDirection","gap","sm","paddingHorizontal","lg","resultsFull","flex","surface","surfaceContainerHigh","overflow","PanelProps","Omit","SearchViewContentProps","anchor","backLabel","clearLabel","close","isOpen","setInput","input","setPresent","present","T","children","label","placeholder","ref","style","testID","SearchViewProps","defaultOpen","onOpenChange","SearchViewRoot","state","SearchViewContext","clearOf","autocomplete","setInputValue","focus","dockedOf","placement","transformOrigin","side","width","Math","min","max","anchorWidth","fullOf","insets","covered","paddingBottom","measureBottomOf","panel","setBottom","measureInWindow","_x","y","_width","minHeightOf","minHeight","resultsOf","windowHeight","maxHeight","SearchView","t0","$","_c","t1","t2","open","t3","expanded","t4","default","trigger","slots","t5","root","t6","t7","SearchViewContent","defaultInputValue","filter","inputValue","onInputChange","props","Error","messages","undefined","clearSearch","t8","t9","t10","SearchViewPanel","theme","styles","sizing","typography","window","keyboardTop","align","motion","placed","setPanel","setOwnInput","controlLg","bodyLargeLineHeight","fontScale","Symbol","for","OS","onLayout","T0","onSurface","t11","t12","t13","t14","t15","t16","t17","t18","t19","Content","_c"],"sources":["../../../src/components/search-view/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref, RefObject } from 'react'\nimport type {\n HostInstance,\n StyleProp,\n TextInput,\n ViewStyle,\n} from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\nimport type { EdgeInsets } from 'react-native-safe-area-context'\nimport type { OverlayTriggerState } from 'react-stately/useOverlayTriggerState'\n\nimport {\n createContext,\n use,\n useCallback,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport { Platform, StyleSheet, useWindowDimensions, View } from 'react-native'\nimport Animated from 'react-native-reanimated'\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context'\nimport { useOverlayTriggerState } from 'react-stately/useOverlayTriggerState'\n\nimport type { AutocompleteValue } from '../../autocomplete'\nimport type { ButtonSlots } from '../../button/slots'\nimport type { AnchoredPlacement } from '../../overlay'\nimport type { ResolvedTheme } from '../../theme/scope'\nimport type { AutocompleteProps } from '../autocomplete'\n\nimport { AutocompleteContext } from '../../autocomplete'\nimport { ButtonSlotContext } from '../../button/slots'\nimport { FieldInput } from '../../field'\nimport { ArrowBackGlyph, CloseGlyph } from '../../glyphs'\nimport { useWindowSizeClass } from '../../hooks/useWindowSizeClass'\nimport { useMessages } from '../../i18n/provider'\nimport { insetsOf, ModalWindow, NO_INSETS, panelRoleOf } from '../../modal'\nimport { useAnchoredPlacement } from '../../overlay'\nimport { useKeyboardTop } from '../../overlay/keyboard'\nimport {\n PANEL_ORIGINS,\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 { Autocomplete } from '../autocomplete'\nimport { IconButton } from '../icon-button'\n\n// kanso-ui's SearchView, the search page's search view: what a search opens\n// into. A header holds a back button, the input and a clear button, over a\n// 1dp divider in the outline role, and the results run under it. Both of the\n// page's forms are surface container high, with the input in body large on\n// surface over a supporting text in on surface variant, the back icon in on\n// surface and the clear icon in on surface variant.\n//\n// **Which form is the window's.** In a compact window it is the page's\n// full-screen view: the whole window, square, with a 72dp header, its content\n// inside the safe area while its fill runs on under it. From the medium\n// window up, the docked view: dropped under what opened it, as wide as that\n// and held between the page's 360dp and 720dp, with a 28dp corner, a 56dp\n// header, results at least 240dp tall and the whole view no taller than two\n// thirds of the window, at elevation 3, as web's takes them from Compose's\n// docked search bar. Both headers grow by as much as the input's line does at\n// the device's text size.\n//\n// **Both forms are drawn in a `Modal`**, through src/modal, as web's is a\n// dialog in a modal popover: a screen reader stays inside the view until it\n// closes, and a press outside the docked one lands on a scrim that draws\n// nothing and closes it. The docked one is placed by src/overlay's anchored\n// placement under its trigger, flipped above it where there is no room, and\n// kept above the software keyboard. Full screen, the results stop at the\n// keyboard's top edge, so the last of them can be scrolled into sight above\n// the keys.\n//\n// **It is Autocomplete around the header and the results**, as web's is: the\n// header's input is the autocomplete's field, so a ListBox or a List among\n// the results narrows as it is typed into, says how many rows a search leaves\n// to a screen reader, and takes a press on its first tap while the keyboard\n// is up, as it does anywhere inside an Autocomplete.\n//\n// **The header lines up with the search bar's.** The back button sits where\n// SearchField's magnifier does, its icon 28dp in, and the text starts at\n// 68dp, as the bar's does; the clear button's icon ends 28dp from the end. So\n// a view opened from a bar puts its input where the bar's was.\n//\n// **Focus goes to the input and back.** The input takes the keyboard's focus\n// as the view opens, and a screen reader is sent to it once the view shows,\n// and back to the trigger once it has gone. The back button closes it, as\n// Android's back gesture, VoiceOver's escape gesture and Escape on web do.\n// It fades and scales in and out, as src/overlay's anchored panels do, and\n// at once under reduced motion.\n\n// The page's full-screen header, and the docked view's bounds.\nconst FULL_HEADER = 72\nconst MIN_WIDTH = 360\nconst MAX_WIDTH = 720\nconst MIN_RESULTS = 240\n\n// The docked view'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 // 4dp in from the header's padding, so the icon inside the 40dp button\n // sits 28dp in, where the search bar draws its magnifier.\n back: {\n marginStart: spacing.xs,\n },\n // 4dp in from the padding, so the icon inside the 40dp button ends 28dp\n // from the end, as the search bar's does.\n clear: {\n marginEnd: spacing.xs,\n },\n // The page's divider under the header, in the outline role.\n divider: {\n backgroundColor: colors.outline,\n flexShrink: 0,\n height: 1,\n },\n docked: {\n borderRadius: radii.xl,\n boxShadow: shadows.elevation3,\n },\n full: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n header: {\n alignItems: 'center',\n flexDirection: 'row',\n flexShrink: 0,\n gap: spacing.sm,\n paddingHorizontal: spacing.lg,\n },\n // Full screen, the results take what the header leaves, and scroll\n // inside it.\n resultsFull: {\n flex: 1,\n },\n surface: {\n backgroundColor: colors.surfaceContainerHigh,\n overflow: 'hidden',\n },\n }),\n)\n\ntype PanelProps = Omit<\n SearchViewContentProps,\n | 'backLabel'\n | 'clearLabel'\n | 'defaultInputValue'\n | 'filter'\n | 'inputValue'\n | 'onInputChange'\n> & {\n readonly anchor: RefObject<HostInstance | null>\n readonly backLabel: string\n readonly clearLabel: string\n readonly close: () => void\n readonly docked: boolean\n readonly isOpen: boolean\n readonly setInput: (input: ComponentRef<typeof TextInput> | null) => void\n readonly setPresent: (present: boolean) => void\n}\n\ntype SearchViewContentProps<T extends object = object> = Omit<\n AutocompleteProps<T>,\n 'children'\n> & {\n /**\n * What the back button is called, for a screen reader. Left out, the\n * library names it in the `I18nProvider`'s locale, or the device's outside\n * one, \"Back\" in English.\n */\n readonly backLabel?: string\n /** The results: a ListBox or a List, which typing narrows. */\n readonly children?: ReactNode\n /**\n * What the clear button is called, for a screen reader. Left out, it is\n * the name React Aria gives web's in the `I18nProvider`'s locale, or the\n * device's outside one, \"Clear search\" in English.\n */\n readonly clearLabel?: string\n /**\n * What is searched, for a screen reader. It names both the view and its\n * input, and is read rather than shown; `placeholder` is what is seen.\n */\n readonly label: string\n /** The supporting text in the empty input, which is what a person reads. */\n readonly placeholder?: string\n readonly ref?: Ref<HostInstance>\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\ntype SearchViewProps = {\n /**\n * The Button or IconButton that opens the view, and `SearchView.Content`.\n */\n readonly children?: ReactNode\n /** Whether the view starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /** Whether the view is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /** Called with the new state as the view opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n}\n\n// What the content reads from the root: the open state, and the trigger's\n// node, which the docked view is placed under and focus goes back to.\ntype SearchViewRoot = {\n readonly anchor: RefObject<HostInstance | null>\n readonly state: OverlayTriggerState\n}\n\nconst SearchViewContext = createContext<null | SearchViewRoot>(null)\n\n// Empties the input from the clear button, and hands the keyboard back to it,\n// so the next search is typed straight in.\nfunction clearOf(\n autocomplete: AutocompleteValue,\n input: ComponentRef<typeof TextInput> | null,\n) {\n return () => {\n autocomplete.setInputValue('')\n input?.focus()\n }\n}\n\n// The docked view: as wide as what opened it, between the page's bounds,\n// and placed under it.\nfunction dockedOf(placement: AnchoredPlacement): ViewStyle {\n return {\n ...placement.style,\n transformOrigin: PANEL_ORIGINS[placement.side],\n width: Math.min(\n MAX_WIDTH,\n Math.max(MIN_WIDTH, placement.anchorWidth ?? MIN_WIDTH),\n ),\n }\n}\n\n// The full-screen view's content inside the safe area, and above the\n// keyboard where the keyboard reaches further up than the safe area's own\n// bottom inset.\nfunction fullOf(insets: EdgeInsets, covered: number): ViewStyle {\n return {\n ...insetsOf(insets),\n paddingBottom: Math.max(insets.bottom, covered),\n transformOrigin: 'top',\n }\n}\n\n// Where the view's bottom edge is in the window, kept for the keyboard to be\n// measured against.\nfunction measureBottomOf(\n panel: HostInstance | null,\n setBottom: (bottom: number) => void,\n) {\n return () => {\n panel?.measureInWindow((_x, y, _width, height) => {\n setBottom(y + height)\n })\n }\n}\n\nfunction minHeightOf(minHeight: number): ViewStyle {\n return { minHeight }\n}\n\n// The docked view's results: at least the page's 240dp, and short enough\n// that the view stays within two thirds of the window.\nfunction resultsOf(windowHeight: number, header: number): ViewStyle {\n return {\n maxHeight: (windowHeight * 2) / 3 - header - 1,\n minHeight: MIN_RESULTS,\n }\n}\n\n/**\n * The view a search opens into: full screen in a compact window, docked\n * under what opened it in a wider one. Pass `isOpen` with `onOpenChange` to\n * hold the open state, or `defaultOpen` to let it keep its own.\n *\n * ```tsx\n * <SearchView>\n * <IconButton aria-label=\"Search\">\n * <SearchIcon />\n * </IconButton>\n * <SearchView.Content label=\"Search\" placeholder=\"Search\">\n * <ListBox aria-label=\"Results\">…</ListBox>\n * </SearchView.Content>\n * </SearchView>\n * ```\n *\n * Composed as Popover is: a `Button`, `IconButton` or `Chip` placed directly\n * inside `SearchView` opens the view, and `SearchView.Content` is the view\n * itself.\n */\nfunction SearchView({\n children,\n defaultOpen,\n isOpen,\n onOpenChange,\n}: SearchViewProps) {\n const state = useOverlayTriggerState({ defaultOpen, isOpen, onOpenChange })\n const anchor = useRef<HostInstance>(null)\n const slots = useMemo<ButtonSlots>(\n () => ({\n default: () => {\n state.open()\n },\n trigger: { expanded: state.isOpen, ref: anchor },\n }),\n [state],\n )\n const root = useMemo<SearchViewRoot>(() => ({ anchor, state }), [state])\n\n return (\n <SearchViewContext value={root}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </SearchViewContext>\n )\n}\n\n/**\n * The view: the header with its back button, input and clear button, and\n * the results under it, inside an Autocomplete, so typing narrows them. What\n * has been typed is the autocomplete's: pass `inputValue` with\n * `onInputChange` to control it, or `defaultInputValue` to let it keep its\n * own, which starts again each time the view opens.\n *\n * `style`, `ref` and `testID` land on the view's surface.\n */\nfunction SearchViewContent<T extends object = object>({\n backLabel,\n clearLabel,\n defaultInputValue,\n filter,\n inputValue,\n label,\n onInputChange,\n ...props\n}: SearchViewContentProps<T>) {\n const root = use(SearchViewContext)\n\n if (root === null) {\n throw new Error('SearchView.Content is drawn inside SearchView.')\n }\n\n const { anchor, state } = root\n const messages = useMessages()\n const docked = useWindowSizeClass() !== 'compact'\n const [present, setPresent] = useState(state.isOpen)\n const [input, setInput] = useState<ComponentRef<typeof TextInput> | null>(\n null,\n )\n const close = useCallback(() => {\n state.close()\n }, [state])\n const slots = useMemo<ButtonSlots>(() => ({ close }), [close])\n\n // Mounted the moment it opens, and kept until its exit has run.\n if (state.isOpen && !present) {\n setPresent(true)\n }\n\n useReturnFocus(present, false, anchor)\n\n if (!present) {\n return null\n }\n\n return (\n <Autocomplete<T>\n defaultInputValue={defaultInputValue}\n filter={filter}\n inputValue={inputValue}\n onInputChange={onInputChange}\n >\n <ModalWindow\n isKeyboardDismissDisabled={false}\n label={label}\n labelledBy={undefined}\n onClose={close}\n onScrimPress={state.isOpen ? close : undefined}\n scrim={UNSEEN}\n // Full screen it is shown at once, so the screen reader goes to the\n // input as the window shows; docked, once the view has been placed.\n title={docked ? null : input}\n >\n <ButtonSlotContext value={slots}>\n <SearchViewPanel\n {...props}\n anchor={anchor}\n backLabel={backLabel ?? messages.back}\n clearLabel={clearLabel ?? messages.clearSearch}\n close={close}\n docked={docked}\n isOpen={state.isOpen}\n label={label}\n setInput={setInput}\n setPresent={setPresent}\n />\n </ButtonSlotContext>\n </ModalWindow>\n </Autocomplete>\n )\n}\n\n// The surface, drawn in the `Modal` so the anchored placement measures the\n// layer it is drawn in. Read inside the Autocomplete, whose value the input\n// shows and reports each edit to.\nfunction SearchViewPanel({\n anchor,\n backLabel,\n children,\n clearLabel,\n close,\n docked,\n isOpen,\n label,\n placeholder,\n ref,\n setInput,\n setPresent,\n style,\n ...props\n}: PanelProps) {\n const theme = useTheme()\n const styles = stylesOf(theme)\n const { colors, sizing, typography } = theme\n const autocomplete = use(AutocompleteContext)\n const window = useWindowDimensions()\n const insets = use(SafeAreaInsetsContext) ?? NO_INSETS\n const keyboardTop = useKeyboardTop()\n const placement = useAnchoredPlacement({ align: 'start', anchor })\n const motion = usePanelMotion(isOpen, !docked || placement.placed, setPresent)\n const [panel, setPanel] = useState<HostInstance | null>(null)\n const [input, setOwnInput] = useState<ComponentRef<typeof TextInput> | null>(\n null,\n )\n const [bottom, setBottom] = useState<null | number>(null)\n const header =\n (docked ? sizing.controlLg : FULL_HEADER) +\n typography.bodyLargeLineHeight * (window.fontScale - 1)\n // Full screen, how far the keyboard reaches up over the view. iOS draws it\n // over the window, where Android's `Modal` shrinks the window to make room\n // and leaves it nothing to cover.\n const covered =\n keyboardTop === null || bottom === null ? 0 : bottom - keyboardTop\n\n useFocusOnPlaced(docked && placement.placed, input)\n\n if (autocomplete === null) {\n return null\n }\n\n return (\n <Animated.View\n {...panelRoleOf('dialog', undefined)}\n aria-label={Platform.OS === 'web' ? undefined : label}\n onAccessibilityEscape={close}\n {...props}\n onLayout={docked ? placement.onLayout : measureBottomOf(panel, setBottom)}\n ref={refsOf(setPanel, ref)}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.surface,\n docked ? styles.docked : styles.full,\n docked ? dockedOf(placement) : fullOf(insets, covered),\n motion,\n style,\n )}\n >\n <View\n style={composeStyles<ViewStyle>(styles.header, minHeightOf(header))}\n >\n <IconButton aria-label={backLabel} slot=\"close\" style={styles.back}>\n <ArrowBackGlyph color={colors.onSurface} />\n </IconButton>\n <FieldInput\n aria-label={label}\n // A search view opens to be typed into, so the input takes the\n // keyboard as it shows rather than leaving it to the back button.\n autoFocus\n onChangeText={autocomplete.setInputValue}\n placeholder={placeholder}\n ref={refsOf(setOwnInput, setInput)}\n returnKeyType=\"search\"\n role=\"searchbox\"\n value={autocomplete.inputValue}\n />\n {autocomplete.inputValue === '' ? null : (\n <IconButton\n aria-label={clearLabel}\n onPress={clearOf(autocomplete, input)}\n style={styles.clear}\n >\n <CloseGlyph />\n </IconButton>\n )}\n </View>\n <View style={styles.divider} />\n <View\n style={docked ? resultsOf(window.height, header) : styles.resultsFull}\n >\n {children}\n </View>\n </Animated.View>\n )\n}\n\nSearchView.Content = SearchViewContent\n\nexport { SearchView, SearchViewContent }\nexport type { SearchViewContentProps, SearchViewProps }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAgGA,MAAMoD,cAAc;AACpB,MAAMC,YAAY;AAClB,MAAMC,YAAY;AAClB,MAAMC,cAAc;AAGpB,MAAMC,SAAoB,EAAEC,SAAS,EAAE;AAEvC,MAAMC,WAAWT,cACd,EAAEU,QAAQC,OAAOC,SAASC,cACzB5C,WAAW6C,OAAO;CAGhBC,MAAM,EACJC,aAAaH,QAAQI,GACvB;CAGAC,OAAO,EACLC,WAAWN,QAAQI,GACrB;CAEAG,SAAS;EACPC,iBAAiBX,OAAOY;EACxBC,YAAY;EACZC,QAAQ;CACV;CACAC,QAAQ;EACNC,cAAcf,MAAMgB;EACpBC,WAAWhB,QAAQiB;CACrB;CACAC,MAAM;EACJC,QAAQ;EACRC,MAAM;EACNC,UAAU;EACVC,OAAO;EACPC,KAAK;CACP;CACAC,QAAQ;EACNC,YAAY;EACZC,eAAe;EACff,YAAY;EACZgB,KAAK1B,QAAQ2B;EACbC,mBAAmB5B,QAAQ6B;CAC7B;CAGAC,aAAa,EACXC,MAAM,EACR;CACAC,SAAS;EACPxB,iBAAiBX,OAAOoC;EACxBC,UAAU;CACZ;AACF,CAAC,CACL;AAuEA,MAAMyB,oBAAoB9G,cAAqC,IAAI;AAInE,SAAS+G,QACPC,cACAjB,OACA;CACA,aAAa;EACXiB,aAAaC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;CAAA,OAjDhByD;AAiDgB;AAIpB3D,WAAW4D,UAAU3C"}
@@ -7,6 +7,14 @@ type SheetBodyProps = ScrollViewProps & {
7
7
  };
8
8
  type SheetContentProps = Omit<ViewProps, 'children' | 'style'> & SheetOpenProps & {
9
9
  readonly children?: ReactNode;
10
+ /**
11
+ * The height a bottom sheet with two heights opens at each time: `half`,
12
+ * where its content stays in reach of a drag, or `whole`, where its
13
+ * actions are in view from the start. A sheet with one height, and a side
14
+ * sheet, open whole whatever this says.
15
+ * @default 'half'
16
+ */
17
+ readonly initialHeight?: 'half' | 'whole';
10
18
  /**
11
19
  * Whether a press on the scrim, outside the sheet, and a swipe down past
12
20
  * its lowest height close it. Android's back gesture is
@@ -68,11 +76,11 @@ type SheetTitleProps = Omit<TextProps, 'role'> & {
68
76
  * </Sheet>
69
77
  * ```
70
78
  *
71
- * Composed rather than configured by props, as web's is. A `Button` or
72
- * `IconButton` inside `Sheet` and outside its content opens it, and one given
73
- * `slot="close"` anywhere inside the content closes it. A sheet nothing on the
74
- * screen opens leaves `Sheet` out and passes `isOpen` and `onOpenChange` to
75
- * `Sheet.Content` instead.
79
+ * Composed rather than configured by props, as web's is. A `Button`,
80
+ * `IconButton` or `Chip` inside `Sheet` and outside its content opens it, and
81
+ * a button given `slot="close"` anywhere inside the content closes it. A
82
+ * sheet nothing on the screen opens leaves `Sheet` out and passes `isOpen`
83
+ * and `onOpenChange` to `Sheet.Content` instead.
76
84
  */
77
85
  declare function Sheet({ children, defaultOpen, isOpen, onOpenChange }: SheetProps): import("react").JSX.Element;
78
86
  declare namespace Sheet {
@@ -109,8 +117,9 @@ declare function SheetContent({ defaultOpen, isDismissable, isKeyboardDismissDis
109
117
  /**
110
118
  * The sheet's actions, leading and wrapping onto another row when they do not
111
119
  * fit on one, over a divider. On a bottom sheet at half height they are below
112
- * the fold until the sheet is raised. `style`, `ref` and `testID` land on its
113
- * view.
120
+ * the fold until the sheet is raised, so a sheet opened for them takes
121
+ * `initialHeight="whole"` on `Sheet.Content`. `style`, `ref` and `testID`
122
+ * land on its view.
114
123
  */
115
124
  declare function SheetFooter({ style, ...props }: SheetPartProps): import("react").JSX.Element;
116
125
  /**
@@ -148,11 +148,11 @@ function settleOf(at, velocity, settles) {
148
148
  * </Sheet>
149
149
  * ```
150
150
  *
151
- * Composed rather than configured by props, as web's is. A `Button` or
152
- * `IconButton` inside `Sheet` and outside its content opens it, and one given
153
- * `slot="close"` anywhere inside the content closes it. A sheet nothing on the
154
- * screen opens leaves `Sheet` out and passes `isOpen` and `onOpenChange` to
155
- * `Sheet.Content` instead.
151
+ * Composed rather than configured by props, as web's is. A `Button`,
152
+ * `IconButton` or `Chip` inside `Sheet` and outside its content opens it, and
153
+ * a button given `slot="close"` anywhere inside the content closes it. A
154
+ * sheet nothing on the screen opens leaves `Sheet` out and passes `isOpen`
155
+ * and `onOpenChange` to `Sheet.Content` instead.
156
156
  */
157
157
  function Sheet(t0) {
158
158
  const $ = c(10);
@@ -384,8 +384,9 @@ function SheetContent(t0) {
384
384
  /**
385
385
  * The sheet's actions, leading and wrapping onto another row when they do not
386
386
  * fit on one, over a divider. On a bottom sheet at half height they are below
387
- * the fold until the sheet is raised. `style`, `ref` and `testID` land on its
388
- * view.
387
+ * the fold until the sheet is raised, so a sheet opened for them takes
388
+ * `initialHeight="whole"` on `Sheet.Content`. `style`, `ref` and `testID`
389
+ * land on its view.
389
390
  */
390
391
  function SheetFooter(t0) {
391
392
  const $ = c(7);
@@ -599,7 +600,7 @@ function SheetTitle(t0) {
599
600
  * each opening starts from its edge and at its first height.
600
601
  */
601
602
  function SheetWindow(t0) {
602
- const $ = c(76);
603
+ const $ = c(77);
603
604
  let children;
604
605
  let close;
605
606
  let isDismissable;
@@ -610,9 +611,10 @@ function SheetWindow(t0) {
610
611
  let setPresent;
611
612
  let slots;
612
613
  let style;
614
+ let t1;
613
615
  let testID;
614
616
  if ($[0] !== t0) {
615
- ({children, close, isDismissable, isKeyboardDismissDisabled, isOpen, onLayout, setPresent, slots, style, testID, ...props} = t0);
617
+ ({children, close, initialHeight: t1, isDismissable, isKeyboardDismissDisabled, isOpen, onLayout, setPresent, slots, style, testID, ...props} = t0);
616
618
  $[0] = t0;
617
619
  $[1] = children;
618
620
  $[2] = close;
@@ -624,7 +626,8 @@ function SheetWindow(t0) {
624
626
  $[8] = setPresent;
625
627
  $[9] = slots;
626
628
  $[10] = style;
627
- $[11] = testID;
629
+ $[11] = t1;
630
+ $[12] = testID;
628
631
  } else {
629
632
  children = $[1];
630
633
  close = $[2];
@@ -636,8 +639,10 @@ function SheetWindow(t0) {
636
639
  setPresent = $[8];
637
640
  slots = $[9];
638
641
  style = $[10];
639
- testID = $[11];
642
+ t1 = $[11];
643
+ testID = $[12];
640
644
  }
645
+ const initialHeight = t1 === void 0 ? "half" : t1;
641
646
  const styles = stylesOf(useTheme());
642
647
  const insets = use(SafeAreaInsetsContext) ?? NO_INSETS;
643
648
  const { height } = useWindowDimensions();
@@ -645,42 +650,42 @@ function SheetWindow(t0) {
645
650
  const titleId = useId();
646
651
  const [title, setTitle] = useState(null);
647
652
  const [full, setFull] = useState(null);
648
- const [expanded, setExpanded] = useState(false);
649
- let t1;
650
- if ($[12] !== bottom || $[13] !== full || $[14] !== height || $[15] !== isDismissable) {
651
- t1 = stopsOf(bottom, full, height, isDismissable);
652
- $[12] = bottom;
653
- $[13] = full;
654
- $[14] = height;
655
- $[15] = isDismissable;
656
- $[16] = t1;
657
- } else t1 = $[16];
658
- const stops = t1;
653
+ const [expanded, setExpanded] = useState(initialHeight === "whole");
654
+ let t2;
655
+ if ($[13] !== bottom || $[14] !== full || $[15] !== height || $[16] !== isDismissable) {
656
+ t2 = stopsOf(bottom, full, height, isDismissable);
657
+ $[13] = bottom;
658
+ $[14] = full;
659
+ $[15] = height;
660
+ $[16] = isDismissable;
661
+ $[17] = t2;
662
+ } else t2 = $[17];
663
+ const stops = t2;
659
664
  const twoHeights = stops.partial !== null;
660
665
  const rest = stops.partial !== null && !expanded ? stops.partial : 0;
661
- let t2;
662
- if ($[17] !== bottom || $[18] !== full || $[19] !== isOpen || $[20] !== rest || $[21] !== setPresent) {
663
- t2 = {
666
+ let t3;
667
+ if ($[18] !== bottom || $[19] !== full || $[20] !== isOpen || $[21] !== rest || $[22] !== setPresent) {
668
+ t3 = {
664
669
  bottom,
665
670
  full,
666
671
  isOpen,
667
672
  rest,
668
673
  setPresent
669
674
  };
670
- $[17] = bottom;
671
- $[18] = full;
672
- $[19] = isOpen;
673
- $[20] = rest;
674
- $[21] = setPresent;
675
- $[22] = t2;
676
- } else t2 = $[22];
677
- const motion = useSheetMotion(t2);
678
- const t3 = bottom && isOpen && stops.settles.length > 1;
679
- let t4;
680
- if ($[23] !== close || $[24] !== expanded || $[25] !== full || $[26] !== isDismissable || $[27] !== motion.offset || $[28] !== rest || $[29] !== stops || $[30] !== t3 || $[31] !== testID) {
681
- t4 = {
675
+ $[18] = bottom;
676
+ $[19] = full;
677
+ $[20] = isOpen;
678
+ $[21] = rest;
679
+ $[22] = setPresent;
680
+ $[23] = t3;
681
+ } else t3 = $[23];
682
+ const motion = useSheetMotion(t3);
683
+ const t4 = bottom && isOpen && stops.settles.length > 1;
684
+ let t5;
685
+ if ($[24] !== close || $[25] !== expanded || $[26] !== full || $[27] !== isDismissable || $[28] !== motion.offset || $[29] !== rest || $[30] !== stops || $[31] !== t4 || $[32] !== testID) {
686
+ t5 = {
682
687
  close,
683
- enabled: t3,
688
+ enabled: t4,
684
689
  expanded,
685
690
  full,
686
691
  isDismissable,
@@ -690,157 +695,157 @@ function SheetWindow(t0) {
690
695
  stops,
691
696
  testID
692
697
  };
693
- $[23] = close;
694
- $[24] = expanded;
695
- $[25] = full;
696
- $[26] = isDismissable;
697
- $[27] = motion.offset;
698
- $[28] = rest;
699
- $[29] = stops;
700
- $[30] = t3;
701
- $[31] = testID;
702
- $[32] = t4;
703
- } else t4 = $[32];
704
- const pan = useSheetDrag(t4);
705
- let t5;
706
- if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
707
- t5 = () => {
708
- setExpanded(_temp);
709
- };
698
+ $[24] = close;
699
+ $[25] = expanded;
700
+ $[26] = full;
701
+ $[27] = isDismissable;
702
+ $[28] = motion.offset;
703
+ $[29] = rest;
704
+ $[30] = stops;
705
+ $[31] = t4;
706
+ $[32] = testID;
710
707
  $[33] = t5;
711
708
  } else t5 = $[33];
712
- const toggle = t5;
713
- const t6 = !twoHeights || expanded;
714
- const t7 = twoHeights ? toggle : void 0;
715
- let t8;
716
- if ($[34] !== bottom || $[35] !== pan || $[36] !== t6 || $[37] !== t7 || $[38] !== titleId) {
717
- t8 = {
709
+ const pan = useSheetDrag(t5);
710
+ let t6;
711
+ if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
712
+ t6 = () => {
713
+ setExpanded(_temp);
714
+ };
715
+ $[34] = t6;
716
+ } else t6 = $[34];
717
+ const toggle = t6;
718
+ const t7 = !twoHeights || expanded;
719
+ const t8 = twoHeights ? toggle : void 0;
720
+ let t9;
721
+ if ($[35] !== bottom || $[36] !== pan || $[37] !== t7 || $[38] !== t8 || $[39] !== titleId) {
722
+ t9 = {
718
723
  bottom,
719
- expanded: t6,
724
+ expanded: t7,
720
725
  pan,
721
726
  setTitle,
722
727
  titleId,
723
- toggle: t7
728
+ toggle: t8
724
729
  };
725
- $[34] = bottom;
726
- $[35] = pan;
727
- $[36] = t6;
730
+ $[35] = bottom;
731
+ $[36] = pan;
728
732
  $[37] = t7;
729
- $[38] = titleId;
730
- $[39] = t8;
731
- } else t8 = $[39];
732
- const layout = t8;
733
- let t9;
734
- if ($[40] !== onLayout) {
735
- t9 = (event) => {
733
+ $[38] = t8;
734
+ $[39] = titleId;
735
+ $[40] = t9;
736
+ } else t9 = $[40];
737
+ const layout = t9;
738
+ let t10;
739
+ if ($[41] !== onLayout) {
740
+ t10 = (event) => {
736
741
  setFull(event.nativeEvent.layout.height);
737
742
  onLayout?.(event);
738
743
  };
739
- $[40] = onLayout;
740
- $[41] = t9;
741
- } else t9 = $[41];
742
- const measure = t9;
744
+ $[41] = onLayout;
745
+ $[42] = t10;
746
+ } else t10 = $[42];
747
+ const measure = t10;
743
748
  const labelledBy = title === null ? void 0 : titleId;
744
749
  const T0 = ModalWindow;
745
- const t10 = isDismissable && isOpen ? close : void 0;
746
- const t11 = motion.scrim;
750
+ const t11 = isDismissable && isOpen ? close : void 0;
751
+ const t12 = motion.scrim;
747
752
  const T1 = GestureHandlerRootView;
748
- const t12 = bottom ? styles.rootBottom : styles.rootSide;
753
+ const t13 = bottom ? styles.rootBottom : styles.rootSide;
749
754
  const T2 = GestureDetector;
750
- const t13 = Animated;
751
- let t14;
752
- if ($[42] !== labelledBy) {
753
- t14 = panelRoleOf("dialog", labelledBy);
754
- $[42] = labelledBy;
755
- $[43] = t14;
756
- } else t14 = $[43];
757
- const t15 = isKeyboardDismissDisabled ? void 0 : close;
758
- const t16 = composeStyles(styles.container, bottom ? styles.containerBottom : styles.containerSide, bottom ? bottomBoundsOf(insets, height) : sideInsetsOf(insets), motion.panel, style);
759
- let t17;
760
- if ($[44] !== children || $[45] !== slots) {
761
- t17 = /* @__PURE__ */ jsx(ButtonSlotContext, {
755
+ const t14 = Animated;
756
+ let t15;
757
+ if ($[43] !== labelledBy) {
758
+ t15 = panelRoleOf("dialog", labelledBy);
759
+ $[43] = labelledBy;
760
+ $[44] = t15;
761
+ } else t15 = $[44];
762
+ const t16 = isKeyboardDismissDisabled ? void 0 : close;
763
+ const t17 = composeStyles(styles.container, bottom ? styles.containerBottom : styles.containerSide, bottom ? bottomBoundsOf(insets, height) : sideInsetsOf(insets), motion.panel, style);
764
+ let t18;
765
+ if ($[45] !== children || $[46] !== slots) {
766
+ t18 = /* @__PURE__ */ jsx(ButtonSlotContext, {
762
767
  value: slots,
763
768
  children
764
769
  });
765
- $[44] = children;
766
- $[45] = slots;
767
- $[46] = t17;
768
- } else t17 = $[46];
769
- let t18;
770
- if ($[47] !== layout || $[48] !== t17) {
771
- t18 = /* @__PURE__ */ jsx(SheetLayoutContext, {
770
+ $[45] = children;
771
+ $[46] = slots;
772
+ $[47] = t18;
773
+ } else t18 = $[47];
774
+ let t19;
775
+ if ($[48] !== layout || $[49] !== t18) {
776
+ t19 = /* @__PURE__ */ jsx(SheetLayoutContext, {
772
777
  value: layout,
773
- children: t17
778
+ children: t18
774
779
  });
775
- $[47] = layout;
776
- $[48] = t17;
780
+ $[48] = layout;
777
781
  $[49] = t18;
778
- } else t18 = $[49];
779
- let t19;
780
- if ($[50] !== measure || $[51] !== props || $[52] !== t13.View || $[53] !== t14 || $[54] !== t15 || $[55] !== t16 || $[56] !== t18 || $[57] !== testID) {
781
- t19 = /* @__PURE__ */ jsx(t13.View, {
782
- ...t14,
783
- onAccessibilityEscape: t15,
782
+ $[50] = t19;
783
+ } else t19 = $[50];
784
+ let t20;
785
+ if ($[51] !== measure || $[52] !== props || $[53] !== t14.View || $[54] !== t15 || $[55] !== t16 || $[56] !== t17 || $[57] !== t19 || $[58] !== testID) {
786
+ t20 = /* @__PURE__ */ jsx(t14.View, {
787
+ ...t15,
788
+ onAccessibilityEscape: t16,
784
789
  ...props,
785
790
  onLayout: measure,
786
- style: t16,
791
+ style: t17,
787
792
  testID,
788
- children: t18
793
+ children: t19
789
794
  });
790
- $[50] = measure;
791
- $[51] = props;
792
- $[52] = t13.View;
793
- $[53] = t14;
795
+ $[51] = measure;
796
+ $[52] = props;
797
+ $[53] = t14.View;
794
798
  $[54] = t15;
795
799
  $[55] = t16;
796
- $[56] = t18;
797
- $[57] = testID;
798
- $[58] = t19;
799
- } else t19 = $[58];
800
- let t20;
801
- if ($[59] !== T2 || $[60] !== pan || $[61] !== t19) {
802
- t20 = /* @__PURE__ */ jsx(T2, {
800
+ $[56] = t17;
801
+ $[57] = t19;
802
+ $[58] = testID;
803
+ $[59] = t20;
804
+ } else t20 = $[59];
805
+ let t21;
806
+ if ($[60] !== T2 || $[61] !== pan || $[62] !== t20) {
807
+ t21 = /* @__PURE__ */ jsx(T2, {
803
808
  gesture: pan,
804
- children: t19
809
+ children: t20
805
810
  });
806
- $[59] = T2;
807
- $[60] = pan;
808
- $[61] = t19;
811
+ $[60] = T2;
812
+ $[61] = pan;
809
813
  $[62] = t20;
810
- } else t20 = $[62];
811
- let t21;
812
- if ($[63] !== T1 || $[64] !== t12 || $[65] !== t20) {
813
- t21 = /* @__PURE__ */ jsx(T1, {
814
- style: t12,
815
- children: t20
814
+ $[63] = t21;
815
+ } else t21 = $[63];
816
+ let t22;
817
+ if ($[64] !== T1 || $[65] !== t13 || $[66] !== t21) {
818
+ t22 = /* @__PURE__ */ jsx(T1, {
819
+ style: t13,
820
+ children: t21
816
821
  });
817
- $[63] = T1;
818
- $[64] = t12;
819
- $[65] = t20;
822
+ $[64] = T1;
823
+ $[65] = t13;
820
824
  $[66] = t21;
821
- } else t21 = $[66];
822
- let t22;
823
- if ($[67] !== T0 || $[68] !== close || $[69] !== isKeyboardDismissDisabled || $[70] !== labelledBy || $[71] !== motion.scrim || $[72] !== t10 || $[73] !== t21 || $[74] !== title) {
824
- t22 = /* @__PURE__ */ jsx(T0, {
825
+ $[67] = t22;
826
+ } else t22 = $[67];
827
+ let t23;
828
+ if ($[68] !== T0 || $[69] !== close || $[70] !== isKeyboardDismissDisabled || $[71] !== labelledBy || $[72] !== motion.scrim || $[73] !== t11 || $[74] !== t22 || $[75] !== title) {
829
+ t23 = /* @__PURE__ */ jsx(T0, {
825
830
  isKeyboardDismissDisabled,
826
831
  labelledBy,
827
832
  onClose: close,
828
- onScrimPress: t10,
829
- scrim: t11,
833
+ onScrimPress: t11,
834
+ scrim: t12,
830
835
  title,
831
- children: t21
836
+ children: t22
832
837
  });
833
- $[67] = T0;
834
- $[68] = close;
835
- $[69] = isKeyboardDismissDisabled;
836
- $[70] = labelledBy;
837
- $[71] = motion.scrim;
838
- $[72] = t10;
839
- $[73] = t21;
840
- $[74] = title;
841
- $[75] = t22;
842
- } else t22 = $[75];
843
- return t22;
838
+ $[68] = T0;
839
+ $[69] = close;
840
+ $[70] = isKeyboardDismissDisabled;
841
+ $[71] = labelledBy;
842
+ $[72] = motion.scrim;
843
+ $[73] = t11;
844
+ $[74] = t22;
845
+ $[75] = title;
846
+ $[76] = t23;
847
+ } else t23 = $[76];
848
+ return t23;
844
849
  }
845
850
  function _temp(was) {
846
851
  return !was;