@kanso-labs/react-native-kanso-ui 0.7.0 → 0.8.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/README.md +37 -0
- package/dist/badge/index.js +25 -23
- package/dist/badge/index.js.map +1 -1
- package/dist/button/index.d.ts +2 -1
- package/dist/button/index.js.map +1 -1
- package/dist/button/pending.js +17 -21
- package/dist/button/pending.js.map +1 -1
- package/dist/calendar/index.js +1 -1
- package/dist/components/autocomplete/index.js +28 -26
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/avatar/index.js +2 -2
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/calendar/index.d.ts +1 -1
- package/dist/components/calendar/index.js +77 -38
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/chip-group/index.d.ts +4 -3
- package/dist/components/chip-group/index.js +47 -45
- package/dist/components/chip-group/index.js.map +1 -1
- package/dist/components/copy-field/index.d.ts +5 -5
- package/dist/components/copy-field/index.js +30 -28
- package/dist/components/copy-field/index.js.map +1 -1
- package/dist/components/currency/index.d.ts +2 -2
- package/dist/components/currency/index.js +3 -1
- package/dist/components/currency/index.js.map +1 -1
- package/dist/components/list/index.d.ts +6 -5
- package/dist/components/list/index.js +97 -106
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/menu/index.d.ts +4 -3
- package/dist/components/menu/index.js +32 -39
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/meter/index.d.ts +2 -1
- package/dist/components/meter/index.js +9 -7
- package/dist/components/meter/index.js.map +1 -1
- package/dist/components/number-field/index.d.ts +7 -3
- package/dist/components/number-field/index.js +214 -192
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/product-icon/index.d.ts +2 -2
- package/dist/components/product-icon/index.js +2 -2
- package/dist/components/product-icon/index.js.map +1 -1
- package/dist/components/progress-indicator/index.d.ts +2 -1
- package/dist/components/progress-indicator/index.js +15 -13
- package/dist/components/progress-indicator/index.js.map +1 -1
- package/dist/components/search-field/index.d.ts +3 -3
- package/dist/components/search-field/index.js +105 -104
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/sheet/index.d.ts +2 -2
- package/dist/components/sheet/index.js +22 -26
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/components/snackbar/index.d.ts +3 -3
- package/dist/components/snackbar/index.js +36 -34
- package/dist/components/snackbar/index.js.map +1 -1
- package/dist/components/tag/index.d.ts +58 -0
- package/dist/components/tag/index.js +205 -0
- package/dist/components/tag/index.js.map +1 -0
- package/dist/components/text-field/index.d.ts +6 -3
- package/dist/components/text-field/index.js +3 -0
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/field/index.js +39 -36
- package/dist/field/index.js.map +1 -1
- package/dist/i18n/index.js +12 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +367 -0
- package/dist/i18n/messages.js.map +1 -1
- package/dist/i18n/provider.d.ts +53 -0
- package/dist/i18n/provider.js +96 -0
- package/dist/i18n/provider.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/indicator/index.js +1 -2
- package/dist/indicator/index.js.map +1 -1
- package/dist/mark/index.js +77 -117
- package/dist/mark/index.js.map +1 -1
- package/dist/mark/initials.js.map +1 -1
- package/dist/number/count.js +15 -0
- package/dist/number/count.js.map +1 -0
- package/dist/number/locale.js.map +1 -1
- package/dist/overlay/host.js +30 -21
- package/dist/overlay/host.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","RefObject","StyleProp","TextInput","TextInputKeyPressEvent","TextInputProps","TextInputSubmitEditingEvent","ViewStyle","use","useId","useImperativeHandle","useRef","useState","Pressable","StyleSheet","useWindowDimensions","View","AutocompleteValue","ValidationResult","IconStyle","AutocompleteContext","describedBy","FieldInput","FieldMessage","FieldStates","FieldStroke","useFieldFocus","useStrokeMotion","useFieldValidation","CloseGlyph","SearchGlyph","IconStyleContext","usePressFeedback","withOpacity","useTheme","composeStyles","themedStyles","IconButton","SearchBarProps","children","clearLabel","control","isDisabled","isFocused","isInvalid","isRequired","onClear","showsClear","SearchFieldProps","Omit","defaultValue","description","error","inputRef","label","name","onChange","value","onSubmit","placeholder","ref","style","validate","ICON_SIZE","MAX_WIDTH","CLEAR_LABEL","stylesOf","colors","radii","spacing","stateLayerOpacity","create","bar","alignItems","backgroundColor","surfaceContainerHigh","borderRadius","pill","flexDirection","gap","lg","maxWidth","paddingEnd","paddingStart","md","barDisabled","onSurface","disabledContainer","clear","marginEnd","xs","ring","bottom","left","pointerEvents","position","right","top","blurThen","onBlur","then","event","clearFrom","current","focus","clearInto","setOwn","onEdit","editInto","text","focusOf","iconStyleOf","color","size","keyInto","onKeyPress","undefined","nativeEvent","key","minHeightOf","minHeight","reportTo","autocomplete","setInputValue","SearchBar","t0","$","_c","theme","styles","fontScale","sizing","typography","t1","t2","corners","disabled","disableRipple","feedback","primary","T0","t3","t4","t5","handlers","onHoverIn","t6","onHoverOut","t7","t8","onPressIn","t9","onPressOut","t10","controlLg","bodyLargeLineHeight","t11","layer","t12","width","t13","onSurfaceVariant","disabledContent","t14","t15","Symbol","for","t16","t17","t18","t19","SearchField","onFocus","onSubmitEditing","props","id","own","inputValue","report","isEmpty","isReadOnly","submitted","validation","shownError","T1","focused","T2","submitInto","t20","t21","t22","t23","_c"],"sources":["../../../src/components/search-field/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref, RefObject } from 'react'\nimport type {\n StyleProp,\n TextInput,\n TextInputKeyPressEvent,\n TextInputProps,\n TextInputSubmitEditingEvent,\n ViewStyle,\n} from 'react-native'\n\nimport { use, useId, useImperativeHandle, useRef, useState } from 'react'\nimport { Pressable, StyleSheet, useWindowDimensions, View } from 'react-native'\n\nimport type { AutocompleteValue } from '../../autocomplete'\nimport type { ValidationResult } from '../../form'\nimport type { IconStyle } from '../../glyphs/icon-style'\n\nimport { AutocompleteContext } from '../../autocomplete'\nimport {\n describedBy,\n FieldInput,\n FieldMessage,\n FieldStates,\n FieldStroke,\n useFieldFocus,\n useStrokeMotion,\n} from '../../field'\nimport { useFieldValidation } from '../../form'\nimport { CloseGlyph, SearchGlyph } from '../../glyphs'\nimport { IconStyleContext } from '../../glyphs/icon-style'\nimport { usePressFeedback } from '../../press'\nimport { withOpacity } from '../../theme/color'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { IconButton } from '../icon-button'\n\n// kanso-ui's SearchField: the search page's search bar on its own, rather\n// than the box the other fields share. A pill on surface container high, the\n// page's 24dp magnifier in on surface variant at the start, the value in body\n// large on surface, and a clear button at the end while the field holds\n// anything. The page's 16dp of padding is to a 48dp tap target and the icon\n// sits 12dp inside that, so the magnifier starts 28dp in and the value 4dp\n// past the target, at 68dp. The clear button is the medium icon button, 40dp\n// around a 24dp icon, 4dp in from the padding, so its icon ends 28dp from the\n// end. The bar follows its own width up to the page's 720dp; the page's 360dp\n// floor is left to the call site, since a phone's width less its margins is\n// under it.\n//\n// The bar is the large control height, 56dp, as web's is, and grows by as\n// much as the value's line does at the device's text size.\n//\n// Under a pointer and while pressed, the bar draws the state layer every\n// control draws through `usePressFeedback`, on surface at the hover and\n// pressed opacities, and a press anywhere on it focuses the control, as a\n// press anywhere on the other fields' boxes does. The page names a focused\n// state and draws nothing for it, so the bar takes the 2dp primary ring the\n// text fields page gives a focused field, inside the pill, as web's does. An\n// error is the text fields page's too, which the search page does not name:\n// the ring in the error role, 1dp at rest and 2dp once focused. The ring is a\n// border on a view of its own over the bar rather than a shadow, so the\n// colour and the width ease together and showing it moves nothing.\n//\n// **Disabled is the chrome's, translucent**, on surface at the disabled\n// opacities over whatever the bar sits on, as the text field's box is, rather\n// than mixed over the surface role as web's is.\n//\n// The label is the control's name and is never drawn, since the bar has no\n// place for one: the placeholder is what a person reads.\n\ntype SearchBarProps = {\n /** The field's input, between the magnifier and the clear button. */\n readonly children: ReactNode\n readonly clearLabel: string\n /** The control a press on the bar, or on the clear button, focuses. */\n readonly control: RefObject<ComponentRef<typeof TextInput> | null>\n readonly isDisabled: boolean\n readonly isFocused: boolean\n readonly isInvalid: boolean\n readonly isRequired: boolean\n /** Empties the field, from the clear button. */\n readonly onClear: () => void\n /** Whether the field holds anything, which shows the clear button. */\n readonly showsClear: boolean\n}\n\ntype SearchFieldProps = Omit<\n TextInputProps,\n | 'accessibilityHint'\n | 'accessibilityLabel'\n | 'aria-disabled'\n | 'aria-label'\n | 'children'\n | 'cursorColor'\n | 'defaultValue'\n | 'editable'\n | 'multiline'\n | 'numberOfLines'\n | 'onChange'\n | 'onChangeText'\n | 'placeholderTextColor'\n | 'readOnly'\n | 'returnKeyType'\n | 'role'\n | 'selectionColor'\n | 'style'\n | 'underlineColorAndroid'\n | 'value'\n> & {\n /**\n * The name of the button that clears the field, for a screen reader.\n * Left out, it is \"Clear search\", the English name web's takes from React\n * Aria.\n */\n readonly clearLabel?: string\n /**\n * The value the field opens with, when it keeps its own. Inside an\n * `Autocomplete` the autocomplete's is read instead.\n */\n readonly defaultValue?: string\n /**\n * A hint shown under the bar. Replaced by `error` when there is one, so the\n * two never stack.\n */\n readonly description?: string\n /**\n * The problem with the current value, in words. Its presence is what puts\n * the field in its error state: the message, the ring in the error role,\n * and the invalid state a screen reader reads all follow from it. The line\n * under the bar arrives with the message, so the field grows when this\n * does, unless it is inside a `Form`, which keeps the line drawn. It wins\n * over what `validate` and the form say, and holds a `native` form back.\n */\n readonly error?: string\n /**\n * A ref to the field's own `TextInput`, which is what a call site moves\n * focus to. `ref` is the field as a whole.\n */\n readonly inputRef?: Ref<ComponentRef<typeof TextInput>>\n /**\n * Draws the field disabled: it takes no focus and no input, and its clear\n * button no press.\n * @default false\n */\n readonly isDisabled?: boolean\n /**\n * Whether the field has to be filled in, which a screen reader reads.\n * Inside a `native` form, an empty one holds the submission back and shows\n * its error once a submission is tried. The bar draws no label, so there\n * is no asterisk to show it.\n * @default false\n */\n readonly isRequired?: boolean\n /**\n * What the field searches, for a screen reader. The bar draws no label, so\n * this is read and never shown; `placeholder` is what is seen.\n */\n readonly label: string\n /**\n * The name the value is submitted under by the `Form` around the field,\n * and the key its `validationErrors` reach the field by.\n */\n readonly name?: string\n /** Called with the new value as it is edited, and with `''` once cleared. */\n readonly onChange?: (value: string) => void\n /** Called once the field is emptied, from its clear button or Escape. */\n readonly onClear?: () => void\n /** Called with the value when the keyboard's search key submits it. */\n readonly onSubmit?: (value: string) => void\n /** The supporting text in the empty bar, which is what a person reads. */\n readonly placeholder?: string\n readonly ref?: Ref<ComponentRef<typeof View>>\n /** Positions and sizes the field as a whole. */\n readonly style?: StyleProp<ViewStyle>\n /**\n * Checks the value, and returns its problem in words, or several, where\n * there is one, and `true`, `null` or `undefined` where there is none.\n * Under the default `aria` validation the error shows as the value\n * changes; inside a `native` form it shows once a submission is tried, or\n * once the field loses focus after an edit, and holds the form back.\n */\n readonly validate?: (value: string) => ValidationResult\n /**\n * The value, when the call site keeps it. Inside an `Autocomplete` the\n * autocomplete's `inputValue` is read instead.\n */\n readonly value?: string\n}\n\n// The page's icon, which the magnifier is drawn at.\nconst ICON_SIZE = 24\n\n// The widest the page draws a search bar.\nconst MAX_WIDTH = 720\n\n// The clear button's name when the call site gives none, as React Aria names\n// web's in English.\nconst CLEAR_LABEL = 'Clear search'\n\nconst stylesOf = themedStyles(({ colors, radii, spacing, stateLayerOpacity }) =>\n StyleSheet.create({\n bar: {\n alignItems: 'center',\n backgroundColor: colors.surfaceContainerHigh,\n borderRadius: radii.pill,\n flexDirection: 'row',\n gap: spacing.lg,\n maxWidth: MAX_WIDTH,\n paddingEnd: spacing.lg,\n paddingStart: spacing.lg + spacing.md,\n },\n barDisabled: {\n backgroundColor: withOpacity(\n colors.onSurface,\n stateLayerOpacity.disabledContainer,\n ),\n },\n // 4dp in from the padding, so the icon inside the 40dp button ends\n // 28dp from the end, where the page's 48dp target puts it.\n clear: {\n marginEnd: spacing.xs,\n },\n // The ring, over the whole bar and its corners. It takes no touches,\n // so a press lands on the bar under it.\n ring: {\n borderRadius: radii.pill,\n bottom: 0,\n left: 0,\n pointerEvents: 'none',\n position: 'absolute',\n right: 0,\n top: 0,\n },\n }),\n)\n\n// Empties the field: the value goes, and the call site is told twice over.\n// The field's own blur handling, then the call site's.\nfunction blurThen(\n onBlur: () => void,\n then: TextInputProps['onBlur'],\n): TextInputProps['onBlur'] {\n return (event) => {\n onBlur()\n then?.(event)\n }\n}\n\n// Empties the field from its button, and hands focus back to the control, so\n// the next keyword is typed straight in.\nfunction clearFrom(\n onClear: () => void,\n control: RefObject<ComponentRef<typeof TextInput> | null>,\n) {\n return () => {\n onClear()\n control.current?.focus()\n }\n}\n\nfunction clearInto(\n setOwn: (value: string) => void,\n onChange: ((value: string) => void) | undefined,\n onClear: (() => void) | undefined,\n onEdit: () => void,\n) {\n return () => {\n setOwn('')\n onEdit()\n onChange?.('')\n onClear?.()\n }\n}\n\n// Keeps an edit as the field's own value and reports it, so a field the call\n// site controls is told and one it does not still shows what was typed, and\n// tells the field's validation it was edited.\nfunction editInto(\n setOwn: (value: string) => void,\n onChange: ((value: string) => void) | undefined,\n onEdit: () => void,\n) {\n return (text: string) => {\n setOwn(text)\n onEdit()\n onChange?.(text)\n }\n}\n\nfunction focusOf(control: RefObject<ComponentRef<typeof TextInput> | null>) {\n return () => {\n control.current?.focus()\n }\n}\n\nfunction iconStyleOf(color: string): IconStyle {\n return { color, size: ICON_SIZE }\n}\n\n// Escape empties a field that holds anything, from a hardware keyboard or\n// under React Native Web, as it does web's. The call site's own handler is\n// called after.\nfunction keyInto(\n clear: (() => void) | undefined,\n onKeyPress: TextInputProps['onKeyPress'],\n) {\n return (event: TextInputKeyPressEvent) => {\n if (clear !== undefined && event.nativeEvent.key === 'Escape') {\n clear()\n }\n onKeyPress?.(event)\n }\n}\n\nfunction minHeightOf(minHeight: number): ViewStyle {\n return { minHeight }\n}\n\n// Inside an Autocomplete, an edit reaches it as well as the call site, which\n// is what makes the list under the field narrow as it is typed into.\nfunction reportTo(\n autocomplete: AutocompleteValue | null,\n onChange: ((value: string) => void) | undefined,\n) {\n if (autocomplete === null) {\n return onChange\n }\n\n return (value: string) => {\n autocomplete.setInputValue(value)\n onChange?.(value)\n }\n}\n\n/**\n * The bar around the control: the pill with its state layer and ring, the\n * magnifier at the start and the clear button at the end. A press anywhere on\n * it focuses the control.\n */\nfunction SearchBar({\n children,\n clearLabel,\n control,\n isDisabled,\n isFocused,\n isInvalid,\n isRequired,\n onClear,\n showsClear,\n}: SearchBarProps) {\n const theme = useTheme()\n const styles = stylesOf(theme)\n const { fontScale } = useWindowDimensions()\n const { colors, radii, sizing, stateLayerOpacity, typography } = theme\n const feedback = usePressFeedback({\n color: colors.onSurface,\n corners: { borderRadius: radii.pill },\n disabled: isDisabled,\n disableRipple: true,\n })\n const ring = useStrokeMotion(\n isInvalid ? colors.error : colors.primary,\n isDisabled ? 0 : isFocused ? 2 : isInvalid ? 1 : 0,\n )\n\n return (\n <Pressable\n accessible={false}\n disabled={isDisabled}\n focusable={false}\n onHoverIn={feedback.handlers.onHoverIn}\n onHoverOut={feedback.handlers.onHoverOut}\n onPress={focusOf(control)}\n onPressIn={feedback.handlers.onPressIn}\n onPressOut={feedback.handlers.onPressOut}\n style={composeStyles<ViewStyle>(\n styles.bar,\n isDisabled ? styles.barDisabled : undefined,\n minHeightOf(\n sizing.controlLg + typography.bodyLargeLineHeight * (fontScale - 1),\n ),\n )}\n >\n {feedback.layer}\n <FieldStroke\n color={ring.color}\n sides=\"all\"\n style={styles.ring}\n width={ring.width}\n />\n <IconStyleContext\n value={iconStyleOf(\n isDisabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : colors.onSurfaceVariant,\n )}\n >\n <SearchGlyph />\n </IconStyleContext>\n <FieldStates\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isRequired={isRequired}\n >\n {children}\n </FieldStates>\n {showsClear ? (\n <IconButton\n aria-label={clearLabel}\n isDisabled={isDisabled}\n onPress={clearFrom(onClear, control)}\n style={styles.clear}\n >\n <CloseGlyph />\n </IconButton>\n ) : null}\n </Pressable>\n )\n}\n\n/**\n * A search bar: a keyword typed into a pill, submitted with the keyboard's\n * search key and cleared with its button. Pass `value` with `onChange` to\n * control it, or `defaultValue` to let it keep its own; `onSubmit` is handed\n * the value when the search key is pressed, and `onClear` is called when the\n * field is emptied.\n *\n * The bar is the search page's rather than the box the other fields share;\n * the control and the line under it are the field chrome in `src/field`.\n * React Native's own `TextInput` props reach the control; `style` and `ref`\n * are the field as a whole, and `inputRef` the control. Inside an\n * `Autocomplete`, the field shows what the autocomplete holds and reports\n * each edit to it, which filters the list beside it.\n *\n * ```tsx\n * <SearchField label=\"Label\" placeholder=\"Supporting text\" />\n * ```\n */\nfunction SearchField({\n clearLabel = CLEAR_LABEL,\n defaultValue = '',\n description,\n error,\n inputRef,\n isDisabled = false,\n isRequired = false,\n label,\n name,\n onBlur,\n onChange,\n onClear,\n onFocus,\n onKeyPress,\n onSubmit,\n onSubmitEditing,\n ref,\n style,\n validate,\n value,\n ...props\n}: SearchFieldProps) {\n const id = useId()\n const control = useRef<ComponentRef<typeof TextInput>>(null)\n const autocomplete = use(AutocompleteContext)\n const [own, setOwn] = useState(defaultValue)\n const current = autocomplete?.inputValue ?? value ?? own\n const report = reportTo(autocomplete, onChange)\n const validation = useFieldValidation({\n control,\n error,\n isDisabled,\n isEmpty: current === '',\n isReadOnly: false,\n isRequired,\n name,\n submitted: current,\n validate,\n value: current,\n })\n const focus = useFieldFocus({\n onBlur: blurThen(validation.onBlur, onBlur),\n onFocus,\n })\n const clear = clearInto(setOwn, report, onClear, validation.onEdit)\n const shownError = validation.error\n\n useImperativeHandle<\n ComponentRef<typeof TextInput> | null,\n ComponentRef<typeof TextInput> | null\n >(inputRef, () => control.current, [])\n\n return (\n <View ref={ref} style={style}>\n <SearchBar\n clearLabel={clearLabel}\n control={control}\n isDisabled={isDisabled}\n isFocused={focus.focused}\n isInvalid={shownError !== undefined}\n isRequired={isRequired}\n onClear={clear}\n showsClear={current !== ''}\n >\n <FieldInput\n {...props}\n {...focus.handlers}\n aria-label={label}\n described={describedBy(id, { description, error: shownError })}\n editable={!isDisabled}\n onChangeText={editInto(setOwn, report, validation.onEdit)}\n onKeyPress={keyInto(\n current === '' || isDisabled ? undefined : clear,\n onKeyPress,\n )}\n onSubmitEditing={submitInto(current, onSubmit, onSubmitEditing)}\n ref={control}\n returnKeyType=\"search\"\n role=\"searchbox\"\n value={current}\n />\n </SearchBar>\n <FieldMessage description={description} error={shownError} id={id} />\n </View>\n )\n}\n\n// Hands the value to `onSubmit` when the keyboard's search key is pressed,\n// and the event to the call site's own handler after.\nfunction submitInto(\n value: string,\n onSubmit: ((value: string) => void) | undefined,\n onSubmitEditing: TextInputProps['onSubmitEditing'],\n) {\n return (event: TextInputSubmitEditingEvent) => {\n onSubmit?.(value)\n onSubmitEditing?.(event)\n }\n}\n\nexport { SearchField }\nexport type { SearchFieldProps }\n"],"mappings":";;;;;;;;;;;;;;;AA6LA,MAAMiE,YAAY;AAGlB,MAAMC,YAAY;AAIlB,MAAMC,cAAc;AAEpB,MAAMC,WAAW9B,cAAc,EAAE+B,QAAQC,OAAOC,SAASC,wBACvDxD,WAAWyD,OAAO;CAChBC,KAAK;EACHC,YAAY;EACZC,iBAAiBP,OAAOQ;EACxBC,cAAcR,MAAMS;EACpBC,eAAe;EACfC,KAAKV,QAAQW;EACbC,UAAUjB;EACVkB,YAAYb,QAAQW;EACpBG,cAAcd,QAAQW,KAAKX,QAAQe;CACrC;CACAC,aAAa,EACXX,iBAAiBzC,YACfkC,OAAOmB,WACPhB,kBAAkBiB,iBACpB,EACF;CAGAC,OAAO,EACLC,WAAWpB,QAAQqB,GACrB;CAGAC,MAAM;EACJf,cAAcR,MAAMS;EACpBe,QAAQ;EACRC,MAAM;EACNC,eAAe;EACfC,UAAU;EACVC,OAAO;EACPC,KAAK;C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UAAAA;EAVQ,CAAA;EA2BE9D,EAAA,MAAA0D;EAAA1D,EAAA,MAAAtC;EAAAsC,EAAA,MAAAtF;EAAAsF,EAAA,MAAAtB,MAAAiF;EAAA3D,EAAA,MAAApF;EAAAoF,EAAA,MAAAjF;EAAAiF,EAAA,MAAAgC;EAAAhC,EAAA,MAAAkC;EAAAlC,EAAA,MAAA8D;EAAA9D,EAAA,MAAA+D;CAAA,OAAAA,MAAA/D,EAAA;CAAA,IAAAgE;CAAA,IAAAhE,EAAA,QAAA3E,eAAA2E,EAAA,QAAAiD,MAAAjD,EAAA,QAAAyD,YAAA;EACZO,MAAA,oBAAC,cAAD;GAA2B3I;GAAoBoI,OAAAA;GAAgBR;EAAE,CAAA;EAAIjD,EAAA,MAAA3E;EAAA2E,EAAA,MAAAiD;EAAAjD,EAAA,MAAAyD;EAAAzD,EAAA,MAAAgE;CAAA,OAAAA,MAAAhE,EAAA;CAAA,IAAAiE;CAAA,IAAAjE,EAAA,QAAAc,MAAAd,EAAA,QAAAlE,OAAAkE,EAAA,QAAAjE,SAAAiE,EAAA,QAAA+D,OAAA/D,EAAA,QAAAgE,KAAA;EA7BvEC,MAAA,qBAAC,IAAD;GAAWnI;GAAYC;GAAvB,UAAA,CACEgI,KA4BAC,GA7BG;;EA8BEhE,EAAA,MAAAc;EAAAd,EAAA,MAAAlE;EAAAkE,EAAA,MAAAjE;EAAAiE,EAAA,MAAA+D;EAAA/D,EAAA,MAAAgE;EAAAhE,EAAA,MAAAiE;CAAA,OAAAA,MAAAjE,EAAA;CAAA,OA9BPiE;AA8BO;AAMX,SAASJ,WACPlI,OACAC,UACAmH,iBACA;CACA,QAAQxE,UAAuC;EAC7C3C,WAAWD,KAAK;EAChBoH,kBAAkBxE,KAAK;CACzB;AACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","RefObject","StyleProp","TextInput","TextInputKeyPressEvent","TextInputProps","TextInputSubmitEditingEvent","ViewStyle","use","useId","useImperativeHandle","useRef","useState","Pressable","StyleSheet","useWindowDimensions","View","AutocompleteValue","ValidationResult","IconStyle","AutocompleteContext","describedBy","FieldInput","FieldMessage","FieldStates","FieldStroke","useFieldFocus","useStrokeMotion","useFieldValidation","CloseGlyph","SearchGlyph","IconStyleContext","useMessages","usePressFeedback","withOpacity","useTheme","composeStyles","themedStyles","IconButton","SearchBarProps","children","clearLabel","control","isDisabled","isFocused","isInvalid","isRequired","onClear","showsClear","SearchFieldProps","Omit","defaultValue","description","error","inputRef","label","name","onChange","value","onSubmit","placeholder","ref","style","validate","ICON_SIZE","MAX_WIDTH","stylesOf","colors","radii","spacing","stateLayerOpacity","create","bar","alignItems","backgroundColor","surfaceContainerHigh","borderRadius","pill","flexDirection","gap","lg","maxWidth","paddingEnd","paddingStart","md","barDisabled","onSurface","disabledContainer","clear","marginEnd","xs","ring","bottom","left","pointerEvents","position","right","top","blurThen","onBlur","then","event","clearFrom","current","focus","clearInto","setOwn","onEdit","editInto","text","focusOf","iconStyleOf","color","size","keyInto","onKeyPress","undefined","nativeEvent","key","minHeightOf","minHeight","reportTo","autocomplete","setInputValue","SearchBar","t0","$","_c","theme","styles","fontScale","sizing","typography","t1","t2","corners","disabled","disableRipple","feedback","primary","T0","t3","t4","t5","handlers","onHoverIn","t6","onHoverOut","t7","t8","onPressIn","t9","onPressOut","t10","controlLg","bodyLargeLineHeight","t11","layer","t12","width","t13","onSurfaceVariant","disabledContent","t14","t15","Symbol","for","t16","t17","t18","t19","SearchField","onFocus","onSubmitEditing","ownClearLabel","props","messages","clearSearch","id","own","inputValue","report","isEmpty","isReadOnly","submitted","validation","shownError","T1","focused","T2","submitInto","t20","t21","t22","_c"],"sources":["../../../src/components/search-field/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref, RefObject } from 'react'\nimport type {\n StyleProp,\n TextInput,\n TextInputKeyPressEvent,\n TextInputProps,\n TextInputSubmitEditingEvent,\n ViewStyle,\n} from 'react-native'\n\nimport { use, useId, useImperativeHandle, useRef, useState } from 'react'\nimport { Pressable, StyleSheet, useWindowDimensions, View } from 'react-native'\n\nimport type { AutocompleteValue } from '../../autocomplete'\nimport type { ValidationResult } from '../../form'\nimport type { IconStyle } from '../../glyphs/icon-style'\n\nimport { AutocompleteContext } from '../../autocomplete'\nimport {\n describedBy,\n FieldInput,\n FieldMessage,\n FieldStates,\n FieldStroke,\n useFieldFocus,\n useStrokeMotion,\n} from '../../field'\nimport { useFieldValidation } from '../../form'\nimport { CloseGlyph, SearchGlyph } from '../../glyphs'\nimport { IconStyleContext } from '../../glyphs/icon-style'\nimport { useMessages } from '../../i18n/provider'\nimport { usePressFeedback } from '../../press'\nimport { withOpacity } from '../../theme/color'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { IconButton } from '../icon-button'\n\n// kanso-ui's SearchField: the search page's search bar on its own, rather\n// than the box the other fields share. A pill on surface container high, the\n// page's 24dp magnifier in on surface variant at the start, the value in body\n// large on surface, and a clear button at the end while the field holds\n// anything. The page's 16dp of padding is to a 48dp tap target and the icon\n// sits 12dp inside that, so the magnifier starts 28dp in and the value 4dp\n// past the target, at 68dp. The clear button is the medium icon button, 40dp\n// around a 24dp icon, 4dp in from the padding, so its icon ends 28dp from the\n// end. The bar follows its own width up to the page's 720dp; the page's 360dp\n// floor is left to the call site, since a phone's width less its margins is\n// under it.\n//\n// The bar is the large control height, 56dp, as web's is, and grows by as\n// much as the value's line does at the device's text size.\n//\n// Under a pointer and while pressed, the bar draws the state layer every\n// control draws through `usePressFeedback`, on surface at the hover and\n// pressed opacities, and a press anywhere on it focuses the control, as a\n// press anywhere on the other fields' boxes does. The page names a focused\n// state and draws nothing for it, so the bar takes the 2dp primary ring the\n// text fields page gives a focused field, inside the pill, as web's does. An\n// error is the text fields page's too, which the search page does not name:\n// the ring in the error role, 1dp at rest and 2dp once focused. The ring is a\n// border on a view of its own over the bar rather than a shadow, so the\n// colour and the width ease together and showing it moves nothing.\n//\n// **Disabled is the chrome's, translucent**, on surface at the disabled\n// opacities over whatever the bar sits on, as the text field's box is, rather\n// than mixed over the surface role as web's is.\n//\n// The label is the control's name and is never drawn, since the bar has no\n// place for one: the placeholder is what a person reads.\n\ntype SearchBarProps = {\n /** The field's input, between the magnifier and the clear button. */\n readonly children: ReactNode\n readonly clearLabel: string\n /** The control a press on the bar, or on the clear button, focuses. */\n readonly control: RefObject<ComponentRef<typeof TextInput> | null>\n readonly isDisabled: boolean\n readonly isFocused: boolean\n readonly isInvalid: boolean\n readonly isRequired: boolean\n /** Empties the field, from the clear button. */\n readonly onClear: () => void\n /** Whether the field holds anything, which shows the clear button. */\n readonly showsClear: boolean\n}\n\ntype SearchFieldProps = Omit<\n TextInputProps,\n | 'accessibilityHint'\n | 'accessibilityLabel'\n | 'aria-disabled'\n | 'aria-label'\n | 'children'\n | 'cursorColor'\n | 'defaultValue'\n | 'editable'\n | 'multiline'\n | 'numberOfLines'\n | 'onChange'\n | 'onChangeText'\n | 'placeholderTextColor'\n | 'readOnly'\n | 'returnKeyType'\n | 'role'\n | 'selectionColor'\n | 'style'\n | 'underlineColorAndroid'\n | 'value'\n> & {\n /**\n * The name of the button that clears the field, for a screen reader.\n * Left out, it is the name React Aria gives web's in the `I18nProvider`'s\n * locale, or the device's outside one, \"Clear search\" in English.\n */\n readonly clearLabel?: string\n /**\n * The value the field opens with, when it keeps its own. Inside an\n * `Autocomplete` the autocomplete's is read instead.\n */\n readonly defaultValue?: string\n /**\n * A hint shown under the bar. Replaced by `error` when there is one, so the\n * two never stack.\n */\n readonly description?: string\n /**\n * The problem with the current value, in words. Its presence is what puts\n * the field in its error state: the message, the ring in the error role,\n * and the invalid state a screen reader reads all follow from it. The line\n * under the bar arrives with the message, so the field grows when this\n * does, unless it is inside a `Form`, which keeps the line drawn. It wins\n * over what `validate` and the form say, and holds a `native` form back.\n */\n readonly error?: string\n /**\n * A ref to the field's own `TextInput`, which is what a call site moves\n * focus to. `ref` is the field as a whole.\n */\n readonly inputRef?: Ref<ComponentRef<typeof TextInput>>\n /**\n * Draws the field disabled: it takes no focus and no input, and its clear\n * button no press.\n * @default false\n */\n readonly isDisabled?: boolean\n /**\n * Whether the field has to be filled in, which a screen reader reads.\n * Inside a `native` form, an empty one holds the submission back and shows\n * its error once a submission is tried. The bar draws no label, so there\n * is no asterisk to show it.\n * @default false\n */\n readonly isRequired?: boolean\n /**\n * What the field searches, for a screen reader. The bar draws no label, so\n * this is read and never shown; `placeholder` is what is seen.\n */\n readonly label: string\n /**\n * The name the value is submitted under by the `Form` around the field,\n * and the key its `validationErrors` reach the field by.\n */\n readonly name?: string\n /** Called with the new value as it is edited, and with `''` once cleared. */\n readonly onChange?: (value: string) => void\n /** Called once the field is emptied, from its clear button or Escape. */\n readonly onClear?: () => void\n /** Called with the value when the keyboard's search key submits it. */\n readonly onSubmit?: (value: string) => void\n /** The supporting text in the empty bar, which is what a person reads. */\n readonly placeholder?: string\n readonly ref?: Ref<ComponentRef<typeof View>>\n /** Positions and sizes the field as a whole. */\n readonly style?: StyleProp<ViewStyle>\n /**\n * Checks the value, and returns its problem in words, or several, where\n * there is one, and `true`, `null` or `undefined` where there is none.\n * Under the default `aria` validation the error shows as the value\n * changes; inside a `native` form it shows once a submission is tried, or\n * once the field loses focus after an edit, and holds the form back.\n */\n readonly validate?: (value: string) => ValidationResult\n /**\n * The value, when the call site keeps it. Inside an `Autocomplete` the\n * autocomplete's `inputValue` is read instead.\n */\n readonly value?: string\n}\n\n// The page's icon, which the magnifier is drawn at.\nconst ICON_SIZE = 24\n\n// The widest the page draws a search bar.\nconst MAX_WIDTH = 720\n\nconst stylesOf = themedStyles(({ colors, radii, spacing, stateLayerOpacity }) =>\n StyleSheet.create({\n bar: {\n alignItems: 'center',\n backgroundColor: colors.surfaceContainerHigh,\n borderRadius: radii.pill,\n flexDirection: 'row',\n gap: spacing.lg,\n maxWidth: MAX_WIDTH,\n paddingEnd: spacing.lg,\n paddingStart: spacing.lg + spacing.md,\n },\n barDisabled: {\n backgroundColor: withOpacity(\n colors.onSurface,\n stateLayerOpacity.disabledContainer,\n ),\n },\n // 4dp in from the padding, so the icon inside the 40dp button ends\n // 28dp from the end, where the page's 48dp target puts it.\n clear: {\n marginEnd: spacing.xs,\n },\n // The ring, over the whole bar and its corners. It takes no touches,\n // so a press lands on the bar under it.\n ring: {\n borderRadius: radii.pill,\n bottom: 0,\n left: 0,\n pointerEvents: 'none',\n position: 'absolute',\n right: 0,\n top: 0,\n },\n }),\n)\n\n// Empties the field: the value goes, and the call site is told twice over.\n// The field's own blur handling, then the call site's.\nfunction blurThen(\n onBlur: () => void,\n then: TextInputProps['onBlur'],\n): TextInputProps['onBlur'] {\n return (event) => {\n onBlur()\n then?.(event)\n }\n}\n\n// Empties the field from its button, and hands focus back to the control, so\n// the next keyword is typed straight in.\nfunction clearFrom(\n onClear: () => void,\n control: RefObject<ComponentRef<typeof TextInput> | null>,\n) {\n return () => {\n onClear()\n control.current?.focus()\n }\n}\n\nfunction clearInto(\n setOwn: (value: string) => void,\n onChange: ((value: string) => void) | undefined,\n onClear: (() => void) | undefined,\n onEdit: () => void,\n) {\n return () => {\n setOwn('')\n onEdit()\n onChange?.('')\n onClear?.()\n }\n}\n\n// Keeps an edit as the field's own value and reports it, so a field the call\n// site controls is told and one it does not still shows what was typed, and\n// tells the field's validation it was edited.\nfunction editInto(\n setOwn: (value: string) => void,\n onChange: ((value: string) => void) | undefined,\n onEdit: () => void,\n) {\n return (text: string) => {\n setOwn(text)\n onEdit()\n onChange?.(text)\n }\n}\n\nfunction focusOf(control: RefObject<ComponentRef<typeof TextInput> | null>) {\n return () => {\n control.current?.focus()\n }\n}\n\nfunction iconStyleOf(color: string): IconStyle {\n return { color, size: ICON_SIZE }\n}\n\n// Escape empties a field that holds anything, from a hardware keyboard or\n// under React Native Web, as it does web's. The call site's own handler is\n// called after.\nfunction keyInto(\n clear: (() => void) | undefined,\n onKeyPress: TextInputProps['onKeyPress'],\n) {\n return (event: TextInputKeyPressEvent) => {\n if (clear !== undefined && event.nativeEvent.key === 'Escape') {\n clear()\n }\n onKeyPress?.(event)\n }\n}\n\nfunction minHeightOf(minHeight: number): ViewStyle {\n return { minHeight }\n}\n\n// Inside an Autocomplete, an edit reaches it as well as the call site, which\n// is what makes the list under the field narrow as it is typed into.\nfunction reportTo(\n autocomplete: AutocompleteValue | null,\n onChange: ((value: string) => void) | undefined,\n) {\n if (autocomplete === null) {\n return onChange\n }\n\n return (value: string) => {\n autocomplete.setInputValue(value)\n onChange?.(value)\n }\n}\n\n/**\n * The bar around the control: the pill with its state layer and ring, the\n * magnifier at the start and the clear button at the end. A press anywhere on\n * it focuses the control.\n */\nfunction SearchBar({\n children,\n clearLabel,\n control,\n isDisabled,\n isFocused,\n isInvalid,\n isRequired,\n onClear,\n showsClear,\n}: SearchBarProps) {\n const theme = useTheme()\n const styles = stylesOf(theme)\n const { fontScale } = useWindowDimensions()\n const { colors, radii, sizing, stateLayerOpacity, typography } = theme\n const feedback = usePressFeedback({\n color: colors.onSurface,\n corners: { borderRadius: radii.pill },\n disabled: isDisabled,\n disableRipple: true,\n })\n const ring = useStrokeMotion(\n isInvalid ? colors.error : colors.primary,\n isDisabled ? 0 : isFocused ? 2 : isInvalid ? 1 : 0,\n )\n\n return (\n <Pressable\n accessible={false}\n disabled={isDisabled}\n focusable={false}\n onHoverIn={feedback.handlers.onHoverIn}\n onHoverOut={feedback.handlers.onHoverOut}\n onPress={focusOf(control)}\n onPressIn={feedback.handlers.onPressIn}\n onPressOut={feedback.handlers.onPressOut}\n style={composeStyles<ViewStyle>(\n styles.bar,\n isDisabled ? styles.barDisabled : undefined,\n minHeightOf(\n sizing.controlLg + typography.bodyLargeLineHeight * (fontScale - 1),\n ),\n )}\n >\n {feedback.layer}\n <FieldStroke\n color={ring.color}\n sides=\"all\"\n style={styles.ring}\n width={ring.width}\n />\n <IconStyleContext\n value={iconStyleOf(\n isDisabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : colors.onSurfaceVariant,\n )}\n >\n <SearchGlyph />\n </IconStyleContext>\n <FieldStates\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isRequired={isRequired}\n >\n {children}\n </FieldStates>\n {showsClear ? (\n <IconButton\n aria-label={clearLabel}\n isDisabled={isDisabled}\n onPress={clearFrom(onClear, control)}\n style={styles.clear}\n >\n <CloseGlyph />\n </IconButton>\n ) : null}\n </Pressable>\n )\n}\n\n/**\n * A search bar: a keyword typed into a pill, submitted with the keyboard's\n * search key and cleared with its button. Pass `value` with `onChange` to\n * control it, or `defaultValue` to let it keep its own; `onSubmit` is handed\n * the value when the search key is pressed, and `onClear` is called when the\n * field is emptied.\n *\n * The bar is the search page's rather than the box the other fields share;\n * the control and the line under it are the field chrome in `src/field`.\n * React Native's own `TextInput` props reach the control; `style` and `ref`\n * are the field as a whole, and `inputRef` the control. Inside an\n * `Autocomplete`, the field shows what the autocomplete holds and reports\n * each edit to it, which filters the list beside it.\n *\n * ```tsx\n * <SearchField label=\"Label\" placeholder=\"Supporting text\" />\n * ```\n */\nfunction SearchField({\n clearLabel: ownClearLabel,\n defaultValue = '',\n description,\n error,\n inputRef,\n isDisabled = false,\n isRequired = false,\n label,\n name,\n onBlur,\n onChange,\n onClear,\n onFocus,\n onKeyPress,\n onSubmit,\n onSubmitEditing,\n ref,\n style,\n validate,\n value,\n ...props\n}: SearchFieldProps) {\n const messages = useMessages()\n const clearLabel = ownClearLabel ?? messages.clearSearch\n const id = useId()\n const control = useRef<ComponentRef<typeof TextInput>>(null)\n const autocomplete = use(AutocompleteContext)\n const [own, setOwn] = useState(defaultValue)\n const current = autocomplete?.inputValue ?? value ?? own\n const report = reportTo(autocomplete, onChange)\n const validation = useFieldValidation({\n control,\n error,\n isDisabled,\n isEmpty: current === '',\n isReadOnly: false,\n isRequired,\n name,\n submitted: current,\n validate,\n value: current,\n })\n const focus = useFieldFocus({\n onBlur: blurThen(validation.onBlur, onBlur),\n onFocus,\n })\n const clear = clearInto(setOwn, report, onClear, validation.onEdit)\n const shownError = validation.error\n\n useImperativeHandle<\n ComponentRef<typeof TextInput> | null,\n ComponentRef<typeof TextInput> | null\n >(inputRef, () => control.current, [])\n\n return (\n <View ref={ref} style={style}>\n <SearchBar\n clearLabel={clearLabel}\n control={control}\n isDisabled={isDisabled}\n isFocused={focus.focused}\n isInvalid={shownError !== undefined}\n isRequired={isRequired}\n onClear={clear}\n showsClear={current !== ''}\n >\n <FieldInput\n {...props}\n {...focus.handlers}\n aria-label={label}\n described={describedBy(id, { description, error: shownError })}\n editable={!isDisabled}\n onChangeText={editInto(setOwn, report, validation.onEdit)}\n onKeyPress={keyInto(\n current === '' || isDisabled ? undefined : clear,\n onKeyPress,\n )}\n onSubmitEditing={submitInto(current, onSubmit, onSubmitEditing)}\n ref={control}\n returnKeyType=\"search\"\n role=\"searchbox\"\n value={current}\n />\n </SearchBar>\n <FieldMessage description={description} error={shownError} id={id} />\n </View>\n )\n}\n\n// Hands the value to `onSubmit` when the keyboard's search key is pressed,\n// and the event to the call site's own handler after.\nfunction submitInto(\n value: string,\n onSubmit: ((value: string) => void) | undefined,\n onSubmitEditing: TextInputProps['onSubmitEditing'],\n) {\n return (event: TextInputSubmitEditingEvent) => {\n onSubmit?.(value)\n onSubmitEditing?.(event)\n }\n}\n\nexport { SearchField }\nexport type { SearchFieldProps }\n"],"mappings":";;;;;;;;;;;;;;;;AA8LA,MAAMkE,YAAY;AAGlB,MAAMC,YAAY;AAElB,MAAMC,WAAW7B,cAAc,EAAE8B,QAAQC,OAAOC,SAASC,wBACvDxD,WAAWyD,OAAO;CAChBC,KAAK;EACHC,YAAY;EACZC,iBAAiBP,OAAOQ;EACxBC,cAAcR,MAAMS;EACpBC,eAAe;EACfC,KAAKV,QAAQW;EACbC,UAAUhB;EACViB,YAAYb,QAAQW;EACpBG,cAAcd,QAAQW,KAAKX,QAAQe;CACrC;CACAC,aAAa,EACXX,iBAAiBxC,YACfiC,OAAOmB,WACPhB,kBAAkBiB,iBACpB,EACF;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KAAK;EAChBmH,kBAAkBxE,KAAK;CACzB;AACF"}
|
|
@@ -116,8 +116,8 @@ declare function SheetFooter({ style, ...props }: SheetPartProps): import("react
|
|
|
116
116
|
/**
|
|
117
117
|
* The bottom sheet's drag handle, a 32 by 4dp bar centred along its top edge.
|
|
118
118
|
* Where the sheet has two heights it is a button moving it to the other one,
|
|
119
|
-
* named "Drag handle" in the
|
|
120
|
-
* otherwise; elsewhere it is a mark a screen reader skips. A side sheet draws
|
|
119
|
+
* named "Drag handle" in the `I18nProvider`'s locale, or the device's outside
|
|
120
|
+
* one, unless `aria-label` says otherwise; elsewhere it is a mark a screen reader skips. A side sheet draws
|
|
121
121
|
* none. `style`, `ref` and `testID` land on its view.
|
|
122
122
|
*/
|
|
123
123
|
declare function SheetHandle({ 'aria-label': label, style, ...props }: SheetHandleProps): import("react").JSX.Element | null;
|
|
@@ -2,9 +2,9 @@ import { useTheme } from "../../theme/scope.js";
|
|
|
2
2
|
import { composeStyles, themedStyles } from "../../theme/styles.js";
|
|
3
3
|
import { usePressFeedback } from "../../press/index.js";
|
|
4
4
|
import { useTypeRole } from "../../typography/roles.js";
|
|
5
|
+
import { useMessages } from "../../i18n/provider.js";
|
|
5
6
|
import { refsOf } from "../../ref/index.js";
|
|
6
7
|
import { ButtonSlotContext } from "../../button/slots.js";
|
|
7
|
-
import { messagesFor } from "../../i18n/index.js";
|
|
8
8
|
import { useWindowSizeClass } from "../../hooks/useWindowSizeClass.js";
|
|
9
9
|
import { ModalWindow, NO_INSETS, insetsOf, panelRoleOf, useModalState, useModalTrigger } from "../../modal/index.js";
|
|
10
10
|
import { c } from "react/compiler-runtime";
|
|
@@ -420,12 +420,12 @@ function SheetFooter(t0) {
|
|
|
420
420
|
/**
|
|
421
421
|
* The bottom sheet's drag handle, a 32 by 4dp bar centred along its top edge.
|
|
422
422
|
* Where the sheet has two heights it is a button moving it to the other one,
|
|
423
|
-
* named "Drag handle" in the
|
|
424
|
-
* otherwise; elsewhere it is a mark a screen reader skips. A side sheet draws
|
|
423
|
+
* named "Drag handle" in the `I18nProvider`'s locale, or the device's outside
|
|
424
|
+
* one, unless `aria-label` says otherwise; elsewhere it is a mark a screen reader skips. A side sheet draws
|
|
425
425
|
* none. `style`, `ref` and `testID` land on its view.
|
|
426
426
|
*/
|
|
427
427
|
function SheetHandle(t0) {
|
|
428
|
-
const $ = c(
|
|
428
|
+
const $ = c(21);
|
|
429
429
|
let label;
|
|
430
430
|
let props;
|
|
431
431
|
let style;
|
|
@@ -462,6 +462,7 @@ function SheetHandle(t0) {
|
|
|
462
462
|
} else t2 = $[8];
|
|
463
463
|
const feedback = usePressFeedback(t2);
|
|
464
464
|
const { toggle } = layout;
|
|
465
|
+
const messages = useMessages();
|
|
465
466
|
if (!layout.bottom) return null;
|
|
466
467
|
if (toggle === void 0) return /* @__PURE__ */ jsx(View, {
|
|
467
468
|
"aria-hidden": true,
|
|
@@ -471,23 +472,18 @@ function SheetHandle(t0) {
|
|
|
471
472
|
});
|
|
472
473
|
const T0 = Pressable;
|
|
473
474
|
const t3 = layout.expanded;
|
|
474
|
-
|
|
475
|
-
if ($[9] !== label) {
|
|
476
|
-
t4 = label ?? messagesFor().dragHandle;
|
|
477
|
-
$[9] = label;
|
|
478
|
-
$[10] = t4;
|
|
479
|
-
} else t4 = $[10];
|
|
475
|
+
const t4 = label ?? messages.dragHandle;
|
|
480
476
|
const t5 = "button";
|
|
481
477
|
const t6 = feedback.handlers;
|
|
482
478
|
const t7 = composeStyles(styles.handle, feedback.ring, style);
|
|
483
479
|
let t8;
|
|
484
|
-
if ($[
|
|
480
|
+
if ($[9] !== styles.bar) {
|
|
485
481
|
t8 = /* @__PURE__ */ jsx(View, { style: styles.bar });
|
|
486
|
-
$[
|
|
487
|
-
$[
|
|
488
|
-
} else t8 = $[
|
|
482
|
+
$[9] = styles.bar;
|
|
483
|
+
$[10] = t8;
|
|
484
|
+
} else t8 = $[10];
|
|
489
485
|
let t9;
|
|
490
|
-
if ($[
|
|
486
|
+
if ($[11] !== T0 || $[12] !== feedback.handlers || $[13] !== feedback.layer || $[14] !== layout.expanded || $[15] !== props || $[16] !== t4 || $[17] !== t7 || $[18] !== t8 || $[19] !== toggle) {
|
|
491
487
|
t9 = /* @__PURE__ */ jsxs(T0, {
|
|
492
488
|
"aria-expanded": t3,
|
|
493
489
|
"aria-label": t4,
|
|
@@ -498,17 +494,17 @@ function SheetHandle(t0) {
|
|
|
498
494
|
style: t7,
|
|
499
495
|
children: [feedback.layer, t8]
|
|
500
496
|
});
|
|
501
|
-
$[
|
|
502
|
-
$[
|
|
503
|
-
$[
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
$[
|
|
507
|
-
$[
|
|
508
|
-
$[
|
|
509
|
-
$[
|
|
510
|
-
$[
|
|
511
|
-
} else t9 = $[
|
|
497
|
+
$[11] = T0;
|
|
498
|
+
$[12] = feedback.handlers;
|
|
499
|
+
$[13] = feedback.layer;
|
|
500
|
+
$[14] = layout.expanded;
|
|
501
|
+
$[15] = props;
|
|
502
|
+
$[16] = t4;
|
|
503
|
+
$[17] = t7;
|
|
504
|
+
$[18] = t8;
|
|
505
|
+
$[19] = toggle;
|
|
506
|
+
$[20] = t9;
|
|
507
|
+
} else t9 = $[20];
|
|
512
508
|
return t9;
|
|
513
509
|
}
|
|
514
510
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","HostInstance","LayoutChangeEvent","ScrollViewProps","StyleProp","TextProps","TextStyle","ViewProps","ViewStyle","GestureType","AnimatedStyle","SharedValue","EdgeInsets","createContext","use","useCallback","useEffect","useId","useMemo","useState","I18nManager","Text","NativeText","Pressable","ScrollView","StyleSheet","useWindowDimensions","View","Gesture","GestureDetector","GestureHandlerRootView","Animated","Easing","useAnimatedStyle","useReducedMotion","useSharedValue","withTiming","SafeAreaInsetsContext","ButtonSlots","ModalOpenProps","ModalTrigger","ResolvedTheme","ButtonSlotContext","useWindowSizeClass","messagesFor","insetsOf","ModalWindow","NO_INSETS","panelRoleOf","useModalState","useModalTrigger","usePressFeedback","refsOf","useTheme","composeStyles","themedStyles","useTypeRole","SIDE_WIDTH","TOP_MARGIN","PARTIAL","DRAG_SLOP","FLING","BAR_WIDTH","BAR_HEIGHT","BAR_SPACE","BAR_SIDE","stylesOf","colors","radii","shadows","spacing","create","bar","backgroundColor","onSurfaceVariant","borderRadius","pill","height","width","body","gap","lg","paddingHorizontal","xl","paddingVertical","bodyText","color","container","surfaceContainerLow","boxShadow","elevation1","overflow","containerBottom","borderTopLeftRadius","borderTopRightRadius","containerSide","borderBottomStartRadius","borderTopStartRadius","flex","footer","alignItems","borderTopColor","outlineVariant","borderTopWidth","flexDirection","flexShrink","flexWrap","sm","justifyContent","minHeight","paddingBottom","paddingTop","handle","alignSelf","header","borderBottomColor","borderBottomWidth","md","rootBottom","bottom","left","position","right","rootSide","end","maxWidth","top","title","minWidth","SheetLayout","expanded","pan","setTitle","node","titleId","toggle","SheetLayoutContext","SheetTriggerContext","SheetBodyProps","ref","SheetContentProps","Omit","SheetOpenProps","children","isDismissable","isKeyboardDismissDisabled","style","SheetHandleProps","defaultOpen","isOpen","onOpenChange","SheetPartProps","SheetProps","SheetTitleProps","SheetWindowProps","close","setPresent","present","slots","Stops","partial","settles","bottomBoundsOf","insets","maxHeight","Math","max","settleOf","at","velocity","find","stop","findLast","reduce","nearest","abs","Sheet","t0","$","_c","t1","context","t2","t3","SheetBody","contentContainerStyle","onContentSizeChange","onLayout","props","scrollEnabled","undefined","layout","useLayout","styles","text","content","setContent","room","setRoom","measureContent","event","nativeEvent","measureRoom","scrolls","overflows","t4","Native","enabled","blocksExternalGesture","native","T0","T1","t5","t6","t7","t8","t9","SheetContent","outer","state","SheetFooter","SheetHandle","label","theme","corners","feedback","dragHandle","handlers","ring","layer","SheetHeader","SheetTitle","role","SheetWindow","testID","full","setFull","setExpanded","stopsOf","stops","twoHeights","rest","motion","useSheetMotion","length","offset","useSheetDrag","Symbol","for","_temp","measure","labelledBy","t10","t11","scrim","t12","T2","t13","t14","t15","t16","sideInsetsOf","panel","t17","t18","t19","t20","t21","t22","was","paddingStart","lower","part","Error","reduceMotion","origin","lowest","follow","translation","set","min","get","settle","target","higher","duration","durationMedium1","easing","bezier","easingEmphasizedDecelerate","success","velocityY","Pan","activeOffsetY","runOnJS","onStart","translationY","onUpdate","translationY_0","onEnd","withTestId","shown","direction","isRTL","durationShort2","durationShort3","easingEmphasizedAccelerate","easingStandard","fade","enter","exit","gone","timer","setTimeout","clearTimeout","transform","translateY","progress","opacity","translateX","Body","Content","Footer","Handle","Header","Title","_c","NativeText"],"sources":["../../../src/components/sheet/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref } from 'react'\nimport type {\n HostInstance,\n LayoutChangeEvent,\n ScrollViewProps,\n StyleProp,\n TextProps,\n TextStyle,\n ViewProps,\n ViewStyle,\n} from 'react-native'\nimport type { GestureType } from 'react-native-gesture-handler'\nimport type { AnimatedStyle, SharedValue } from 'react-native-reanimated'\nimport type { EdgeInsets } from 'react-native-safe-area-context'\n\nimport {\n createContext,\n use,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useState,\n} from 'react'\nimport {\n I18nManager,\n Text as NativeText,\n Pressable,\n ScrollView,\n StyleSheet,\n useWindowDimensions,\n View,\n} from 'react-native'\nimport {\n Gesture,\n GestureDetector,\n GestureHandlerRootView,\n} from 'react-native-gesture-handler'\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useReducedMotion,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated'\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context'\n\nimport type { ButtonSlots } from '../../button/slots'\nimport type { ModalOpenProps, ModalTrigger } from '../../modal'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { ButtonSlotContext } from '../../button/slots'\nimport { useWindowSizeClass } from '../../hooks/useWindowSizeClass'\nimport { messagesFor } from '../../i18n'\nimport {\n insetsOf,\n ModalWindow,\n NO_INSETS,\n panelRoleOf,\n useModalState,\n useModalTrigger,\n} from '../../modal'\nimport { usePressFeedback } from '../../press'\nimport { refsOf } from '../../ref'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\n\n// The bottom sheets and side sheets spec pages' modal sheets, as kanso-ui's\n// Sheet draws them: one component, which is a bottom sheet in a compact\n// window, below 600dp, and a side sheet from the medium window up. Both sit on\n// surface container low at the first elevation level, over the scrim. The\n// bottom sheet spans the window, with the 28dp corner on its top two corners,\n// and stops 72dp short of the window's top, the page's top margin, so a long\n// body scrolls. The side sheet is 400dp wide and as tall as the window, along\n// the end edge, with the 16dp corner on its two start corners, and turns over\n// with the layout under right-to-left.\n//\n// **The bottom sheet drags**, which web's does not: the spec page draws a\n// sheet that is dragged between heights and swiped down to go, and web\n// records leaving it out as a departure that native need not repeat. A sheet\n// taller than half the window opens at half its height, as Android's modal\n// bottom sheet does, and is dragged up to the whole of it and back; one no\n// taller opens whole. Let go, it settles on the nearest of those heights, or\n// one height on in the direction of a fling, and below the lowest it goes,\n// unless `isDismissable` is false, which holds it at the lowest. The drag is\n// Gesture Handler's pan, through the builder API both its 2.x and its 3\n// export. While the sheet is at half height its body does not scroll, so a\n// drag on it raises the sheet; once whole, a body with more than it can show\n// scrolls, and the sheet is dragged by the handle, header and actions. At\n// half height the actions are below the fold, where the drag brings them.\n//\n// **The handle is a control where the sheet has two heights**, as Android's\n// drag handle is: a press moves the sheet to the other one, and it says which\n// it is at as expanded or collapsed. It takes the press feedback every control\n// does, over a 48dp target, and is named \"Drag handle\" in the device's locale\n// unless `aria-label` says otherwise. A sheet with one height has nothing for\n// it to do, and draws it as web does, as a mark the screen reader skips. The\n// side sheet draws no handle.\n//\n// **It is drawn in a React Native `Modal`**, through src/modal, as `Dialog`\n// is, so it keeps the `ThemeScope` around it, hosts its own overlays, and\n// takes its scrim, its back gesture and its focus handling from there. The\n// sheet's own panel is a Gesture Handler root, which Android needs for a\n// gesture inside a `Modal`'s window.\n//\n// **It animates out as well as in**, from the motion tokens: it arrives from\n// its edge over the medium duration on the emphasised decelerating curve and\n// leaves over the short one on the accelerating curve, while the scrim fades\n// on the standard one. Web only animates in, since React Aria keeps a closing\n// surface mounted only while a CSS animation runs. The side sheet fades as it\n// travels, as web's does; the bottom sheet does not, since its position is\n// also the drag's. Under reduced motion the sheet appears and leaves at once,\n// and the scrim still fades.\n//\n// **Its content sits inside the safe area** while its fill runs on under it:\n// the bottom sheet's above the home indicator and inside the side insets of a\n// phone held sideways, and the side sheet's under the status bar and over the\n// home indicator, inside the inset on its own edge.\n\n// The side sheet's width, web's and the side sheets page's.\nconst SIDE_WIDTH = 400\n\n// The bottom sheet's top margin once whole, the page's 72dp.\nconst TOP_MARGIN = 72\n\n// How much of the window a sheet with two heights shows at the lower one.\nconst PARTIAL = 0.5\n\n// How far a press travels before it is a drag, so a tap on the sheet's\n// content stays a tap.\nconst DRAG_SLOP = 8\n\n// A release faster than this, in dp a second, is a fling, which moves the\n// sheet one height on rather than to the nearest. Android's bottom sheet\n// takes the same speed as the one that hides it.\nconst FLING = 500\n\n// The handle's bar and the room above and below it, web's 32 by 4 with 22dp\n// either side, which with 8dp at its ends makes the 48dp target.\nconst BAR_WIDTH = 32\nconst BAR_HEIGHT = 4\nconst BAR_SPACE = 22\nconst BAR_SIDE = 8\n\nconst stylesOf = themedStyles(\n ({ colors, radii, shadows, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The handle's bar, on on-surface variant.\n bar: {\n backgroundColor: colors.onSurfaceVariant,\n borderRadius: radii.pill,\n height: BAR_HEIGHT,\n width: BAR_WIDTH,\n },\n // The body's padding, web's: 24dp at the sides, 16dp at either end\n // and between whatever it holds.\n body: {\n gap: spacing.lg,\n paddingHorizontal: spacing.xl,\n paddingVertical: spacing.lg,\n },\n // The text a body is handed as a string, in body medium on on-surface\n // variant, as the stories on web set theirs.\n bodyText: {\n color: colors.onSurfaceVariant,\n },\n // Both sheets' container, whose corners clip the body's scroll.\n container: {\n backgroundColor: colors.surfaceContainerLow,\n boxShadow: shadows.elevation1,\n overflow: 'hidden',\n },\n // The bottom sheet's container: the window's width, rounded on top.\n containerBottom: {\n borderTopLeftRadius: radii.xl,\n borderTopRightRadius: radii.xl,\n width: '100%',\n },\n // The side sheet's container, as tall as the window and rounded on the\n // corners that face the screen it covers.\n containerSide: {\n borderBottomStartRadius: radii.lg,\n borderTopStartRadius: radii.lg,\n flex: 1,\n },\n // The actions, web's: leading, wrapping onto another row when they do\n // not fit on one, over a divider, in a bar 72dp tall at least.\n footer: {\n alignItems: 'center',\n borderTopColor: colors.outlineVariant,\n borderTopWidth: 1,\n flexDirection: 'row',\n flexShrink: 0,\n flexWrap: 'wrap',\n gap: spacing.sm,\n justifyContent: 'flex-start',\n minHeight: 72,\n paddingBottom: spacing.xl,\n paddingHorizontal: spacing.xl,\n paddingTop: spacing.lg,\n },\n // The handle's 48dp target, centred along the sheet's top edge.\n handle: {\n alignItems: 'center',\n alignSelf: 'center',\n borderRadius: radii.pill,\n flexShrink: 0,\n paddingHorizontal: BAR_SIDE,\n paddingVertical: BAR_SPACE,\n },\n // The headline and whatever shares its row, a close button for one,\n // over a divider.\n header: {\n alignItems: 'center',\n borderBottomColor: colors.outlineVariant,\n borderBottomWidth: 1,\n flexDirection: 'row',\n flexShrink: 0,\n gap: spacing.md,\n justifyContent: 'space-between',\n paddingHorizontal: spacing.xl,\n paddingVertical: spacing.sm,\n },\n // Where each sheet sits in the window. The panel is a Gesture Handler\n // root of its own, the size of the sheet, so a press beside it reaches\n // the scrim.\n rootBottom: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n },\n rootSide: {\n bottom: 0,\n end: 0,\n maxWidth: '100%',\n position: 'absolute',\n top: 0,\n width: SIDE_WIDTH,\n },\n // The headline gives way to whatever shares its row.\n title: {\n color: colors.onSurfaceVariant,\n flexShrink: 1,\n minWidth: 0,\n },\n }),\n)\n\n// What the content's parts read: which sheet is drawn, whether it is at its\n// whole height, the drag a scrolling body holds off, and the headline.\ntype SheetLayout = {\n readonly bottom: boolean\n readonly expanded: boolean\n // Gesture Handler 3 deprecates its gesture builder, and this type, for hooks\n // that version 2 does not have, and the peer range admits both, so the sheet\n // keeps the builder while it does.\n // oxlint-disable-next-line typescript/no-deprecated -- see above\n readonly pan: GestureType\n readonly setTitle: (node: HostInstance | null) => void\n readonly titleId: string\n /** What a press on the handle does, where the sheet has two heights. */\n readonly toggle: (() => void) | undefined\n}\n\nconst SheetLayoutContext = createContext<null | SheetLayout>(null)\nconst SheetTriggerContext = createContext<ModalTrigger | null>(null)\n\ntype SheetBodyProps = ScrollViewProps & {\n readonly ref?: Ref<ComponentRef<typeof ScrollView>>\n}\n\ntype SheetContentProps = Omit<ViewProps, 'children' | 'style'> &\n SheetOpenProps & {\n readonly children?: ReactNode\n /**\n * Whether a press on the scrim, outside the sheet, and a swipe down past\n * its lowest height close it. Android's back gesture is\n * `isKeyboardDismissDisabled`'s, and this says nothing about it.\n * @default true\n */\n readonly isDismissable?: boolean\n /**\n * Keeps Android's back gesture, VoiceOver's escape gesture, and Escape on\n * web, from closing the sheet.\n * @default false\n */\n readonly isKeyboardDismissDisabled?: boolean\n readonly ref?: Ref<ComponentRef<typeof View>>\n readonly style?: StyleProp<ViewStyle>\n }\n\ntype SheetHandleProps = Omit<ViewProps, 'children'> & {\n readonly ref?: Ref<ComponentRef<typeof View>>\n}\n\ntype SheetOpenProps = ModalOpenProps & {\n /** Whether the sheet starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /** Whether the sheet is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /** Called with the new state as the sheet opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n}\n\ntype SheetPartProps = ViewProps & {\n readonly ref?: Ref<ComponentRef<typeof View>>\n}\n\ntype SheetProps = SheetOpenProps & {\n /** The button that opens the sheet, and `Sheet.Content`. */\n readonly children?: ReactNode\n}\n\ntype SheetTitleProps = Omit<TextProps, 'role'> & {\n readonly ref?: Ref<HostInstance>\n}\n\n// What the window draws once the sheet is open, and what it needs from the\n// part that keeps the open state.\ntype SheetWindowProps = Omit<\n SheetContentProps,\n 'defaultOpen' | 'isOpen' | 'onOpenChange'\n> & {\n readonly close: () => void\n readonly isDismissable: boolean\n readonly isKeyboardDismissDisabled: boolean\n readonly isOpen: boolean\n readonly setPresent: (present: boolean) => void\n readonly slots: ButtonSlots\n}\n\n// The heights a bottom sheet rests at, as how far its panel is moved down:\n// whole, at half the window where it is taller than that, and gone.\ntype Stops = {\n /** The lower height, where the sheet has two. */\n readonly partial: null | number\n /** Every height a release can settle on, highest first. */\n readonly settles: readonly number[]\n}\n\n// The bottom sheet's room and padding: no taller than the window less the top\n// margin, or less the status bar where that is the taller, and its content\n// above the home indicator and inside the side insets.\nfunction bottomBoundsOf(insets: EdgeInsets, height: number): ViewStyle {\n return {\n ...insetsOf(insets),\n maxHeight: height - Math.max(TOP_MARGIN, insets.top),\n paddingTop: 0,\n }\n}\n\n/**\n * Where a bottom sheet let go comes to rest: one height on in the direction of\n * a fling, and the nearest height otherwise. Heights are how far the panel is\n * moved down, highest first, and the highest is always the whole sheet, 0.\n */\nfunction settleOf(at: number, velocity: number, settles: readonly number[]) {\n if (velocity > FLING) {\n return settles.find((stop) => stop > at) ?? settles.at(-1) ?? 0\n }\n\n if (velocity < -FLING) {\n return settles.findLast((stop) => stop < at) ?? 0\n }\n\n return settles.reduce(\n (nearest, stop) =>\n Math.abs(stop - at) < Math.abs(nearest - at) ? stop : nearest,\n 0,\n )\n}\n\n/**\n * A modal sheet along an edge of the screen, the bottom sheets and side sheets\n * spec pages' modal sheets, paired by window size as kanso-ui's are: a bottom\n * sheet in a compact window, dragged between heights and swiped down to go,\n * and a side sheet along the end edge from the medium window up. Pass\n * `isOpen` with `onOpenChange` to hold the open state, or `defaultOpen` to let\n * it keep its own.\n *\n * ```tsx\n * <Sheet>\n * <Button>Open</Button>\n * <Sheet.Content>\n * <Sheet.Handle />\n * <Sheet.Header>\n * <Sheet.Title>Headline</Sheet.Title>\n * </Sheet.Header>\n * <Sheet.Body>Supporting text</Sheet.Body>\n * <Sheet.Footer>\n * <Button slot=\"close\">Done</Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet>\n * ```\n *\n * Composed rather than configured by props, as web's is. A `Button` or\n * `IconButton` inside `Sheet` and outside its content opens it, and one given\n * `slot=\"close\"` anywhere inside the content closes it. A sheet nothing on the\n * screen opens leaves `Sheet` out and passes `isOpen` and `onOpenChange` to\n * `Sheet.Content` instead.\n */\nfunction Sheet({ children, defaultOpen, isOpen, onOpenChange }: SheetProps) {\n const { context, slots } = useModalTrigger({\n defaultOpen,\n isOpen,\n onOpenChange,\n })\n\n return (\n <SheetTriggerContext value={context}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </SheetTriggerContext>\n )\n}\n\n/**\n * What the sheet shows, as a body that scrolls when its content runs past the\n * room it has. A string is drawn in body medium on on-surface variant;\n * anything else draws itself. `style`, `ref` and `testID` land on the\n * `ScrollView`.\n *\n * A body its content runs past takes focus, as web's is a tab stop, so a\n * keyboard can scroll it when nothing inside it takes focus; a call site's\n * own `focusable` still wins. A bottom sheet's body scrolls only once the\n * sheet is at its whole height, and holds the sheet's drag off while it does.\n */\nfunction SheetBody({\n children,\n contentContainerStyle,\n onContentSizeChange,\n onLayout,\n scrollEnabled = true,\n ...props\n}: SheetBodyProps) {\n const layout = useLayout('Sheet.Body')\n const styles = stylesOf(useTheme())\n const text = useTypeRole('bodyMedium')\n const [content, setContent] = useState(0)\n const [room, setRoom] = useState(0)\n const measureContent = useCallback(\n (width: number, height: number) => {\n setContent(height)\n onContentSizeChange?.(width, height)\n },\n [onContentSizeChange],\n )\n const measureRoom = useCallback(\n (event: LayoutChangeEvent) => {\n setRoom(event.nativeEvent.layout.height)\n onLayout?.(event)\n },\n [onLayout],\n )\n const scrolls = scrollEnabled && layout.expanded\n const overflows = content > room\n // oxlint-disable-next-line react/capitalized-calls, typescript/no-deprecated -- a builder named after its gesture, not a component; see SheetLayout\n const native = Gesture.Native()\n .enabled(scrolls && overflows)\n .blocksExternalGesture(layout.pan)\n\n return (\n <GestureDetector gesture={native}>\n <ScrollView\n focusable={scrolls && overflows}\n onContentSizeChange={measureContent}\n onLayout={measureRoom}\n {...props}\n contentContainerStyle={composeStyles<ViewStyle>(\n styles.body,\n contentContainerStyle,\n )}\n scrollEnabled={scrolls}\n >\n {typeof children === 'string' ? (\n <NativeText style={composeStyles<TextStyle>(text, styles.bodyText)}>\n {children}\n </NativeText>\n ) : (\n children\n )}\n </ScrollView>\n </GestureDetector>\n )\n}\n\n/**\n * The sheet itself, and the scrim behind it. Everything the sheet shows goes\n * in here; the button that opens it stays outside it.\n *\n * Inside `Sheet`, the open state is the trigger's. On its own it is this\n * part's: `isOpen` with `onOpenChange` holds it, and a `slot=\"close\"` button,\n * the scrim, the swipe and the back gesture all report through\n * `onOpenChange`. `style`, `ref` and `testID` land on the container, and\n * `testID` names the drag `<testID>-drag` for Gesture Handler's test helpers.\n */\nfunction SheetContent({\n defaultOpen,\n isDismissable = true,\n isKeyboardDismissDisabled = false,\n isOpen,\n onOpenChange,\n ...props\n}: SheetContentProps) {\n const outer = use(SheetTriggerContext)\n const { close, present, setPresent, slots, state } = useModalState(outer, {\n defaultOpen,\n isOpen,\n onOpenChange,\n })\n\n if (!present) {\n return null\n }\n\n return (\n <SheetWindow\n {...props}\n close={close}\n isDismissable={isDismissable}\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n isOpen={state.isOpen}\n setPresent={setPresent}\n slots={slots}\n />\n )\n}\n\n/**\n * The sheet's actions, leading and wrapping onto another row when they do not\n * fit on one, over a divider. On a bottom sheet at half height they are below\n * the fold until the sheet is raised. `style`, `ref` and `testID` land on its\n * view.\n */\nfunction SheetFooter({ style, ...props }: SheetPartProps) {\n useLayout('Sheet.Footer')\n const styles = stylesOf(useTheme())\n\n return (\n <View {...props} style={composeStyles<ViewStyle>(styles.footer, style)} />\n )\n}\n\n/**\n * The bottom sheet's drag handle, a 32 by 4dp bar centred along its top edge.\n * Where the sheet has two heights it is a button moving it to the other one,\n * named \"Drag handle\" in the device's locale unless `aria-label` says\n * otherwise; elsewhere it is a mark a screen reader skips. A side sheet draws\n * none. `style`, `ref` and `testID` land on its view.\n */\nfunction SheetHandle({\n 'aria-label': label,\n style,\n ...props\n}: SheetHandleProps) {\n const layout = useLayout('Sheet.Handle')\n const theme = useTheme()\n const styles = stylesOf(theme)\n const { colors, radii } = theme\n const feedback = usePressFeedback({\n color: colors.onSurfaceVariant,\n corners: { borderRadius: radii.pill },\n })\n const { toggle } = layout\n\n if (!layout.bottom) {\n return null\n }\n\n if (toggle === undefined) {\n return (\n <View\n aria-hidden\n {...props}\n style={composeStyles<ViewStyle>(styles.handle, style)}\n >\n <View style={styles.bar} />\n </View>\n )\n }\n\n return (\n <Pressable\n aria-expanded={layout.expanded}\n aria-label={label ?? messagesFor().dragHandle}\n role=\"button\"\n {...props}\n {...feedback.handlers}\n onPress={toggle}\n style={composeStyles<ViewStyle>(styles.handle, feedback.ring, style)}\n >\n {feedback.layer}\n <View style={styles.bar} />\n </Pressable>\n )\n}\n\n/**\n * The sheet's header: its `Sheet.Title`, and anything beside it, such as a\n * close button, over a divider. `style`, `ref` and `testID` land on its view.\n */\nfunction SheetHeader({ style, ...props }: SheetPartProps) {\n useLayout('Sheet.Header')\n const styles = stylesOf(useTheme())\n\n return (\n <View {...props} style={composeStyles<ViewStyle>(styles.header, style)} />\n )\n}\n\n/**\n * Names the sheet: the container is labelled by it, and a screen reader is\n * sent to it once the sheet shows. In title large on on-surface variant.\n * `style`, `ref` and `testID` land on React Native's own Text.\n */\nfunction SheetTitle({ ref, style, ...props }: SheetTitleProps) {\n const layout = useLayout('Sheet.Title')\n const styles = stylesOf(useTheme())\n const role = useTypeRole('titleLarge')\n\n return (\n <NativeText\n {...props}\n nativeID={layout.titleId}\n ref={refsOf(layout.setTitle, ref)}\n role=\"heading\"\n style={composeStyles<TextStyle>(role, styles.title, style)}\n />\n )\n}\n\n/**\n * The open sheet, mounted from the moment it opens until its exit has run, so\n * each opening starts from its edge and at its first height.\n */\nfunction SheetWindow({\n children,\n close,\n isDismissable,\n isKeyboardDismissDisabled,\n isOpen,\n onLayout,\n setPresent,\n slots,\n style,\n testID,\n ...props\n}: SheetWindowProps) {\n const styles = stylesOf(useTheme())\n const insets = use(SafeAreaInsetsContext) ?? NO_INSETS\n const { height } = useWindowDimensions()\n const bottom = useWindowSizeClass() === 'compact'\n const titleId = useId()\n const [title, setTitle] = useState<HostInstance | null>(null)\n // The panel's height as laid out, before any drag moves it, and whether a\n // sheet with two heights is at the higher one.\n const [full, setFull] = useState<null | number>(null)\n const [expanded, setExpanded] = useState(false)\n const stops = stopsOf(bottom, full, height, isDismissable)\n const twoHeights = stops.partial !== null\n const rest = stops.partial !== null && !expanded ? stops.partial : 0\n const motion = useSheetMotion({ bottom, full, isOpen, rest, setPresent })\n const pan = useSheetDrag({\n close,\n enabled: bottom && isOpen && stops.settles.length > 1,\n expanded,\n full,\n isDismissable,\n offset: motion.offset,\n rest,\n setExpanded,\n stops,\n testID,\n })\n const toggle = useCallback(() => {\n setExpanded((was) => !was)\n }, [])\n const layout = useMemo<SheetLayout>(\n () => ({\n bottom,\n expanded: !twoHeights || expanded,\n pan,\n setTitle,\n titleId,\n toggle: twoHeights ? toggle : undefined,\n }),\n [bottom, expanded, pan, titleId, toggle, twoHeights],\n )\n const measure = useCallback(\n (event: LayoutChangeEvent) => {\n setFull(event.nativeEvent.layout.height)\n onLayout?.(event)\n },\n [onLayout],\n )\n const labelledBy = title === null ? undefined : titleId\n\n return (\n <ModalWindow\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n labelledBy={labelledBy}\n onClose={close}\n onScrimPress={isDismissable && isOpen ? close : undefined}\n scrim={motion.scrim}\n title={title}\n >\n <GestureHandlerRootView\n style={bottom ? styles.rootBottom : styles.rootSide}\n >\n <GestureDetector gesture={pan}>\n <Animated.View\n {...panelRoleOf('dialog', labelledBy)}\n onAccessibilityEscape={\n isKeyboardDismissDisabled ? undefined : close\n }\n {...props}\n onLayout={measure}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.container,\n bottom ? styles.containerBottom : styles.containerSide,\n bottom ? bottomBoundsOf(insets, height) : sideInsetsOf(insets),\n motion.panel,\n style,\n )}\n testID={testID}\n >\n <SheetLayoutContext value={layout}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </SheetLayoutContext>\n </Animated.View>\n </GestureDetector>\n </GestureHandlerRootView>\n </ModalWindow>\n )\n}\n\n// The side sheet's padding: its content under the status bar, over the home\n// indicator and inside the inset on its own edge. Its start edge faces the\n// screen it covers, which has none.\nfunction sideInsetsOf(insets: EdgeInsets): ViewStyle {\n return { ...insetsOf(insets), paddingStart: 0 }\n}\n\nfunction stopsOf(\n bottom: boolean,\n full: null | number,\n height: number,\n isDismissable: boolean,\n): Stops {\n if (!bottom || full === null) {\n return { partial: null, settles: [0] }\n }\n\n const lower = full - height * PARTIAL\n const partial = lower > 0 ? lower : null\n\n return {\n partial,\n settles: [\n 0,\n ...(partial === null ? [] : [partial]),\n ...(isDismissable ? [full] : []),\n ],\n }\n}\n\nfunction useLayout(part: string) {\n const layout = use(SheetLayoutContext)\n\n if (layout === null) {\n throw new Error(`${part} is drawn inside Sheet.Content.`)\n }\n\n return layout\n}\n\n/**\n * The bottom sheet's drag. The panel follows the finger, no higher than its\n * whole height and no lower than gone, or than its lowest height when it may\n * not be dismissed, and once let go it settles where `settleOf` says: below\n * the lowest height it closes, and at another height it moves the sheet there.\n */\nfunction useSheetDrag({\n close,\n enabled,\n expanded,\n full,\n isDismissable,\n offset,\n rest,\n setExpanded,\n stops,\n testID,\n}: {\n readonly close: () => void\n readonly enabled: boolean\n readonly expanded: boolean\n readonly full: null | number\n readonly isDismissable: boolean\n readonly offset: SharedValue<number>\n readonly rest: number\n readonly setExpanded: (expanded: boolean) => void\n readonly stops: Stops\n readonly testID: string | undefined\n}) {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n // Where the panel stood when the drag was recognised. Gesture Handler\n // measures its translation from there, past the slop.\n const origin = useSharedValue(0)\n const lowest = stops.settles.at(-1) ?? 0\n\n function follow(translation: number) {\n offset.set(Math.min(lowest, Math.max(0, origin.get() + translation)))\n }\n\n function settle(target: number) {\n if (isDismissable && target === full) {\n close()\n return\n }\n\n const higher = target === 0\n if (stops.partial !== null && higher !== expanded) {\n setExpanded(higher)\n return\n }\n\n offset.set(\n reduceMotion\n ? target\n : withTiming(target, {\n duration: motion.durationMedium1,\n easing: Easing.bezier(...motion.easingEmphasizedDecelerate),\n }),\n )\n }\n\n // oxlint-disable-next-line react/capitalized-calls, typescript/no-deprecated -- a builder named after its gesture, not a component; see SheetLayout\n const pan = Gesture.Pan()\n .activeOffsetY([-DRAG_SLOP, DRAG_SLOP])\n .enabled(enabled)\n .runOnJS(true)\n .onStart(({ translationY }) => {\n origin.set(offset.get())\n follow(translationY)\n })\n .onUpdate(({ translationY }) => {\n follow(translationY)\n })\n .onEnd(({ velocityY }, success) => {\n settle(success ? settleOf(offset.get(), velocityY, stops.settles) : rest)\n })\n\n return testID === undefined ? pan : pan.withTestId(`${testID}-drag`)\n}\n\n/**\n * The scrim's and the panel's motion, and the timer that unmounts the sheet\n * once its exit has run. The bottom sheet's position is how far its panel is\n * moved down, which the drag sets too; it starts below the window and rises\n * to its height once that is measured. The side sheet's is how far it has\n * come in from its edge, which is the end edge, and so the left one under\n * right-to-left.\n */\nfunction useSheetMotion({\n bottom,\n full,\n isOpen,\n rest,\n setPresent,\n}: {\n readonly bottom: boolean\n readonly full: null | number\n readonly isOpen: boolean\n readonly rest: number\n readonly setPresent: (present: boolean) => void\n}) {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n const { height } = useWindowDimensions()\n const offset = useSharedValue(height)\n const shown = useSharedValue(0)\n const scrim = useSharedValue(0)\n // A translation is not mirrored under a right-to-left layout, though the\n // side sheet's edge is, so it travels the other way there.\n const direction = I18nManager.isRTL ? -1 : 1\n\n useEffect(() => {\n const fade = {\n duration: motion.durationShort2,\n easing: Easing.bezier(...motion.easingStandard),\n }\n const enter = {\n duration: motion.durationMedium1,\n easing: Easing.bezier(...motion.easingEmphasizedDecelerate),\n }\n const exit = {\n duration: motion.durationShort3,\n easing: Easing.bezier(...motion.easingEmphasizedAccelerate),\n }\n\n if (isOpen) {\n scrim.set(withTiming(1, fade))\n if (!bottom) {\n shown.set(reduceMotion ? 1 : withTiming(1, enter))\n return undefined\n }\n if (full === null) {\n return undefined\n }\n // It rises from its own height below where it rests, not from the\n // bottom of the window, so it shows from the first frame.\n if (offset.get() > full) {\n offset.set(full)\n }\n offset.set(reduceMotion ? rest : withTiming(rest, enter))\n return undefined\n }\n\n scrim.set(withTiming(0, fade))\n if (bottom) {\n const gone = full ?? height\n offset.set(reduceMotion ? gone : withTiming(gone, exit))\n } else {\n shown.set(reduceMotion ? 0 : withTiming(0, exit))\n }\n const timer = setTimeout(\n () => {\n setPresent(false)\n },\n reduceMotion\n ? motion.durationShort2\n : Math.max(motion.durationShort2, motion.durationShort3),\n )\n\n return () => {\n clearTimeout(timer)\n }\n }, [\n bottom,\n full,\n height,\n isOpen,\n motion,\n offset,\n reduceMotion,\n rest,\n scrim,\n setPresent,\n shown,\n ])\n\n return {\n offset,\n panel: useAnimatedStyle(() => {\n 'worklet'\n if (bottom) {\n return { transform: [{ translateY: offset.get() }] }\n }\n\n const progress = shown.get()\n return {\n opacity: progress,\n transform: [{ translateX: (1 - progress) * SIDE_WIDTH * direction }],\n }\n }),\n scrim: useAnimatedStyle(() => {\n 'worklet'\n return { opacity: scrim.get() }\n }),\n }\n}\n\nSheet.Body = SheetBody\nSheet.Content = SheetContent\nSheet.Footer = SheetFooter\nSheet.Handle = SheetHandle\nSheet.Header = SheetHeader\nSheet.Title = SheetTitle\n\nexport {\n Sheet,\n SheetBody,\n SheetContent,\n SheetFooter,\n SheetHandle,\n SheetHeader,\n SheetTitle,\n}\nexport type {\n SheetBodyProps,\n SheetContentProps,\n SheetHandleProps,\n SheetPartProps,\n SheetProps,\n SheetTitleProps,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAyHA,MAAM2D,aAAa;AAGnB,MAAMC,aAAa;AAGnB,MAAMC,UAAU;AAIhB,MAAMC,YAAY;AAKlB,MAAMC,QAAQ;AAId,MAAMC,YAAY;AAClB,MAAMC,aAAa;AACnB,MAAMC,YAAY;AAClB,MAAMC,WAAW;AAEjB,MAAMC,WAAWX,cACd,EAAEY,QAAQC,OAAOC,SAASC,cACzB7C,WAAW8C,OAAO;CAEhBC,KAAK;EACHC,iBAAiBN,OAAOO;EACxBC,cAAcP,MAAMQ;EACpBC,QAAQd;EACRe,OAAOhB;CACT;CAGAiB,MAAM;EACJC,KAAKV,QAAQW;EACbC,mBAAmBZ,QAAQa;EAC3BC,iBAAiBd,QAAQW;CAC3B;CAGAI,UAAU,EACRC,OAAOnB,OAAOO,iBAChB;CAEAa,WAAW;EACTd,iBAAiBN,OAAOqB;EACxBC,WAAWpB,QAAQqB;EACnBC,UAAU;CACZ;CAEAC,iBAAiB;EACfC,qBAAqBzB,MAAMe;EAC3BW,sBAAsB1B,MAAMe;EAC5BL,OAAO;CACT;CAGAiB,eAAe;EACbC,yBAAyB5B,MAAMa;EAC/BgB,sBAAsB7B,MAAMa;EAC5BiB,MAAM;CACR;CAGAC,QAAQ;EACNC,YAAY;EACZC,gBAAgBlC,OAAOmC;EACvBC,gBAAgB;EAChBC,eAAe;EACfC,YAAY;EACZC,UAAU;EACV1B,KAAKV,QAAQqC;EACbC,gBAAgB;EAChBC,WAAW;EACXC,eAAexC,QAAQa;EACvBD,mBAAmBZ,QAAQa;EAC3B4B,YAAYzC,QAAQW;CACtB;CAEA+B,QAAQ;EACNZ,YAAY;EACZa,WAAW;EACXtC,cAAcP,MAAMQ;EACpB6B,YAAY;EACZvB,mBAAmBjB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BAAiB;EAAA;EAEtB,IAAIsF,QAAM,OACD,EAAAoM,WAAa,CAAC,EAAAC,YAAcvE,OAAMoC,IAAK,EAAE,CAAC,EAAE;EAGrD,MAAAoC,WAAiBhB,MAAKpB,IAAK;EAAC,OACrB;GAAAqC,SACID;GAAQF,WACN,CAAC,EAAAI,aAAe,IAAIF,YAAYpQ,aAAaqP,UAAU,CAAC;EACrE;CAAC,CACF;CACM,MAAAjG,KAAA5K,uBAAiB;EAAA;EAAA,OAEf,EAAA6R,SAAWhE,MAAK2B,IAAK,EAAE;CAAC,CAChC;CAAC,IAAArE;CAAA,IAAAlC,EAAA,QAAAmE,UAAAnE,EAAA,QAAAK,MAAAL,EAAA,QAAA2B,IAAA;EAjBGO,KAAA;GAAAiC;GAAAiB,OAEE/E;GAWLuE,OACKjD;EAIT;EAAC3B,EAAA,MAAAmE;EAAAnE,EAAA,MAAAK;EAAAL,EAAA,MAAA2B;EAAA3B,EAAA,MAAAkC;CAAA,OAAAA,KAAAlC,EAAA;CAAA,OAlBMkC;AAkBN;AAGHpC,MAAMgJ,OAAOxI;AACbR,MAAMiJ,UAAUxG;AAChBzC,MAAMkJ,SAAStG;AACf5C,MAAMmJ,SAAStG;AACf7C,MAAMoJ,SAAS9F;AACftD,MAAMqJ,QAAQ9F"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","HostInstance","LayoutChangeEvent","ScrollViewProps","StyleProp","TextProps","TextStyle","ViewProps","ViewStyle","GestureType","AnimatedStyle","SharedValue","EdgeInsets","createContext","use","useCallback","useEffect","useId","useMemo","useState","I18nManager","Text","NativeText","Pressable","ScrollView","StyleSheet","useWindowDimensions","View","Gesture","GestureDetector","GestureHandlerRootView","Animated","Easing","useAnimatedStyle","useReducedMotion","useSharedValue","withTiming","SafeAreaInsetsContext","ButtonSlots","ModalOpenProps","ModalTrigger","ResolvedTheme","ButtonSlotContext","useWindowSizeClass","useMessages","insetsOf","ModalWindow","NO_INSETS","panelRoleOf","useModalState","useModalTrigger","usePressFeedback","refsOf","useTheme","composeStyles","themedStyles","useTypeRole","SIDE_WIDTH","TOP_MARGIN","PARTIAL","DRAG_SLOP","FLING","BAR_WIDTH","BAR_HEIGHT","BAR_SPACE","BAR_SIDE","stylesOf","colors","radii","shadows","spacing","create","bar","backgroundColor","onSurfaceVariant","borderRadius","pill","height","width","body","gap","lg","paddingHorizontal","xl","paddingVertical","bodyText","color","container","surfaceContainerLow","boxShadow","elevation1","overflow","containerBottom","borderTopLeftRadius","borderTopRightRadius","containerSide","borderBottomStartRadius","borderTopStartRadius","flex","footer","alignItems","borderTopColor","outlineVariant","borderTopWidth","flexDirection","flexShrink","flexWrap","sm","justifyContent","minHeight","paddingBottom","paddingTop","handle","alignSelf","header","borderBottomColor","borderBottomWidth","md","rootBottom","bottom","left","position","right","rootSide","end","maxWidth","top","title","minWidth","SheetLayout","expanded","pan","setTitle","node","titleId","toggle","SheetLayoutContext","SheetTriggerContext","SheetBodyProps","ref","SheetContentProps","Omit","SheetOpenProps","children","isDismissable","isKeyboardDismissDisabled","style","SheetHandleProps","defaultOpen","isOpen","onOpenChange","SheetPartProps","SheetProps","SheetTitleProps","SheetWindowProps","close","setPresent","present","slots","Stops","partial","settles","bottomBoundsOf","insets","maxHeight","Math","max","settleOf","at","velocity","find","stop","findLast","reduce","nearest","abs","Sheet","t0","$","_c","t1","context","t2","t3","SheetBody","contentContainerStyle","onContentSizeChange","onLayout","props","scrollEnabled","undefined","layout","useLayout","styles","text","content","setContent","room","setRoom","measureContent","event","nativeEvent","measureRoom","scrolls","overflows","t4","Native","enabled","blocksExternalGesture","native","T0","T1","t5","t6","t7","t8","t9","SheetContent","outer","state","SheetFooter","SheetHandle","label","theme","corners","feedback","messages","dragHandle","handlers","ring","layer","SheetHeader","SheetTitle","role","SheetWindow","testID","full","setFull","setExpanded","stopsOf","stops","twoHeights","rest","motion","useSheetMotion","length","offset","useSheetDrag","Symbol","for","_temp","measure","labelledBy","t10","t11","scrim","t12","T2","t13","t14","t15","t16","sideInsetsOf","panel","t17","t18","t19","t20","t21","t22","was","paddingStart","lower","part","Error","reduceMotion","origin","lowest","follow","translation","set","min","get","settle","target","higher","duration","durationMedium1","easing","bezier","easingEmphasizedDecelerate","success","velocityY","Pan","activeOffsetY","runOnJS","onStart","translationY","onUpdate","translationY_0","onEnd","withTestId","shown","direction","isRTL","durationShort2","durationShort3","easingEmphasizedAccelerate","easingStandard","fade","enter","exit","gone","timer","setTimeout","clearTimeout","transform","translateY","progress","opacity","translateX","Body","Content","Footer","Handle","Header","Title","_c","NativeText"],"sources":["../../../src/components/sheet/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref } from 'react'\nimport type {\n HostInstance,\n LayoutChangeEvent,\n ScrollViewProps,\n StyleProp,\n TextProps,\n TextStyle,\n ViewProps,\n ViewStyle,\n} from 'react-native'\nimport type { GestureType } from 'react-native-gesture-handler'\nimport type { AnimatedStyle, SharedValue } from 'react-native-reanimated'\nimport type { EdgeInsets } from 'react-native-safe-area-context'\n\nimport {\n createContext,\n use,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useState,\n} from 'react'\nimport {\n I18nManager,\n Text as NativeText,\n Pressable,\n ScrollView,\n StyleSheet,\n useWindowDimensions,\n View,\n} from 'react-native'\nimport {\n Gesture,\n GestureDetector,\n GestureHandlerRootView,\n} from 'react-native-gesture-handler'\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useReducedMotion,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated'\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context'\n\nimport type { ButtonSlots } from '../../button/slots'\nimport type { ModalOpenProps, ModalTrigger } from '../../modal'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { ButtonSlotContext } from '../../button/slots'\nimport { useWindowSizeClass } from '../../hooks/useWindowSizeClass'\nimport { useMessages } from '../../i18n/provider'\nimport {\n insetsOf,\n ModalWindow,\n NO_INSETS,\n panelRoleOf,\n useModalState,\n useModalTrigger,\n} from '../../modal'\nimport { usePressFeedback } from '../../press'\nimport { refsOf } from '../../ref'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\n\n// The bottom sheets and side sheets spec pages' modal sheets, as kanso-ui's\n// Sheet draws them: one component, which is a bottom sheet in a compact\n// window, below 600dp, and a side sheet from the medium window up. Both sit on\n// surface container low at the first elevation level, over the scrim. The\n// bottom sheet spans the window, with the 28dp corner on its top two corners,\n// and stops 72dp short of the window's top, the page's top margin, so a long\n// body scrolls. The side sheet is 400dp wide and as tall as the window, along\n// the end edge, with the 16dp corner on its two start corners, and turns over\n// with the layout under right-to-left.\n//\n// **The bottom sheet drags**, which web's does not: the spec page draws a\n// sheet that is dragged between heights and swiped down to go, and web\n// records leaving it out as a departure that native need not repeat. A sheet\n// taller than half the window opens at half its height, as Android's modal\n// bottom sheet does, and is dragged up to the whole of it and back; one no\n// taller opens whole. Let go, it settles on the nearest of those heights, or\n// one height on in the direction of a fling, and below the lowest it goes,\n// unless `isDismissable` is false, which holds it at the lowest. The drag is\n// Gesture Handler's pan, through the builder API both its 2.x and its 3\n// export. While the sheet is at half height its body does not scroll, so a\n// drag on it raises the sheet; once whole, a body with more than it can show\n// scrolls, and the sheet is dragged by the handle, header and actions. At\n// half height the actions are below the fold, where the drag brings them.\n//\n// **The handle is a control where the sheet has two heights**, as Android's\n// drag handle is: a press moves the sheet to the other one, and it says which\n// it is at as expanded or collapsed. It takes the press feedback every control\n// does, over a 48dp target, and is named \"Drag handle\" in the `I18nProvider`'s\n// locale, or the device's outside one, unless `aria-label` says otherwise. A sheet with one height has nothing for\n// it to do, and draws it as web does, as a mark the screen reader skips. The\n// side sheet draws no handle.\n//\n// **It is drawn in a React Native `Modal`**, through src/modal, as `Dialog`\n// is, so it keeps the `ThemeScope` around it, hosts its own overlays, and\n// takes its scrim, its back gesture and its focus handling from there. The\n// sheet's own panel is a Gesture Handler root, which Android needs for a\n// gesture inside a `Modal`'s window.\n//\n// **It animates out as well as in**, from the motion tokens: it arrives from\n// its edge over the medium duration on the emphasised decelerating curve and\n// leaves over the short one on the accelerating curve, while the scrim fades\n// on the standard one. Web only animates in, since React Aria keeps a closing\n// surface mounted only while a CSS animation runs. The side sheet fades as it\n// travels, as web's does; the bottom sheet does not, since its position is\n// also the drag's. Under reduced motion the sheet appears and leaves at once,\n// and the scrim still fades.\n//\n// **Its content sits inside the safe area** while its fill runs on under it:\n// the bottom sheet's above the home indicator and inside the side insets of a\n// phone held sideways, and the side sheet's under the status bar and over the\n// home indicator, inside the inset on its own edge.\n\n// The side sheet's width, web's and the side sheets page's.\nconst SIDE_WIDTH = 400\n\n// The bottom sheet's top margin once whole, the page's 72dp.\nconst TOP_MARGIN = 72\n\n// How much of the window a sheet with two heights shows at the lower one.\nconst PARTIAL = 0.5\n\n// How far a press travels before it is a drag, so a tap on the sheet's\n// content stays a tap.\nconst DRAG_SLOP = 8\n\n// A release faster than this, in dp a second, is a fling, which moves the\n// sheet one height on rather than to the nearest. Android's bottom sheet\n// takes the same speed as the one that hides it.\nconst FLING = 500\n\n// The handle's bar and the room above and below it, web's 32 by 4 with 22dp\n// either side, which with 8dp at its ends makes the 48dp target.\nconst BAR_WIDTH = 32\nconst BAR_HEIGHT = 4\nconst BAR_SPACE = 22\nconst BAR_SIDE = 8\n\nconst stylesOf = themedStyles(\n ({ colors, radii, shadows, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The handle's bar, on on-surface variant.\n bar: {\n backgroundColor: colors.onSurfaceVariant,\n borderRadius: radii.pill,\n height: BAR_HEIGHT,\n width: BAR_WIDTH,\n },\n // The body's padding, web's: 24dp at the sides, 16dp at either end\n // and between whatever it holds.\n body: {\n gap: spacing.lg,\n paddingHorizontal: spacing.xl,\n paddingVertical: spacing.lg,\n },\n // The text a body is handed as a string, in body medium on on-surface\n // variant, as the stories on web set theirs.\n bodyText: {\n color: colors.onSurfaceVariant,\n },\n // Both sheets' container, whose corners clip the body's scroll.\n container: {\n backgroundColor: colors.surfaceContainerLow,\n boxShadow: shadows.elevation1,\n overflow: 'hidden',\n },\n // The bottom sheet's container: the window's width, rounded on top.\n containerBottom: {\n borderTopLeftRadius: radii.xl,\n borderTopRightRadius: radii.xl,\n width: '100%',\n },\n // The side sheet's container, as tall as the window and rounded on the\n // corners that face the screen it covers.\n containerSide: {\n borderBottomStartRadius: radii.lg,\n borderTopStartRadius: radii.lg,\n flex: 1,\n },\n // The actions, web's: leading, wrapping onto another row when they do\n // not fit on one, over a divider, in a bar 72dp tall at least.\n footer: {\n alignItems: 'center',\n borderTopColor: colors.outlineVariant,\n borderTopWidth: 1,\n flexDirection: 'row',\n flexShrink: 0,\n flexWrap: 'wrap',\n gap: spacing.sm,\n justifyContent: 'flex-start',\n minHeight: 72,\n paddingBottom: spacing.xl,\n paddingHorizontal: spacing.xl,\n paddingTop: spacing.lg,\n },\n // The handle's 48dp target, centred along the sheet's top edge.\n handle: {\n alignItems: 'center',\n alignSelf: 'center',\n borderRadius: radii.pill,\n flexShrink: 0,\n paddingHorizontal: BAR_SIDE,\n paddingVertical: BAR_SPACE,\n },\n // The headline and whatever shares its row, a close button for one,\n // over a divider.\n header: {\n alignItems: 'center',\n borderBottomColor: colors.outlineVariant,\n borderBottomWidth: 1,\n flexDirection: 'row',\n flexShrink: 0,\n gap: spacing.md,\n justifyContent: 'space-between',\n paddingHorizontal: spacing.xl,\n paddingVertical: spacing.sm,\n },\n // Where each sheet sits in the window. The panel is a Gesture Handler\n // root of its own, the size of the sheet, so a press beside it reaches\n // the scrim.\n rootBottom: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n },\n rootSide: {\n bottom: 0,\n end: 0,\n maxWidth: '100%',\n position: 'absolute',\n top: 0,\n width: SIDE_WIDTH,\n },\n // The headline gives way to whatever shares its row.\n title: {\n color: colors.onSurfaceVariant,\n flexShrink: 1,\n minWidth: 0,\n },\n }),\n)\n\n// What the content's parts read: which sheet is drawn, whether it is at its\n// whole height, the drag a scrolling body holds off, and the headline.\ntype SheetLayout = {\n readonly bottom: boolean\n readonly expanded: boolean\n // Gesture Handler 3 deprecates its gesture builder, and this type, for hooks\n // that version 2 does not have, and the peer range admits both, so the sheet\n // keeps the builder while it does.\n // oxlint-disable-next-line typescript/no-deprecated -- see above\n readonly pan: GestureType\n readonly setTitle: (node: HostInstance | null) => void\n readonly titleId: string\n /** What a press on the handle does, where the sheet has two heights. */\n readonly toggle: (() => void) | undefined\n}\n\nconst SheetLayoutContext = createContext<null | SheetLayout>(null)\nconst SheetTriggerContext = createContext<ModalTrigger | null>(null)\n\ntype SheetBodyProps = ScrollViewProps & {\n readonly ref?: Ref<ComponentRef<typeof ScrollView>>\n}\n\ntype SheetContentProps = Omit<ViewProps, 'children' | 'style'> &\n SheetOpenProps & {\n readonly children?: ReactNode\n /**\n * Whether a press on the scrim, outside the sheet, and a swipe down past\n * its lowest height close it. Android's back gesture is\n * `isKeyboardDismissDisabled`'s, and this says nothing about it.\n * @default true\n */\n readonly isDismissable?: boolean\n /**\n * Keeps Android's back gesture, VoiceOver's escape gesture, and Escape on\n * web, from closing the sheet.\n * @default false\n */\n readonly isKeyboardDismissDisabled?: boolean\n readonly ref?: Ref<ComponentRef<typeof View>>\n readonly style?: StyleProp<ViewStyle>\n }\n\ntype SheetHandleProps = Omit<ViewProps, 'children'> & {\n readonly ref?: Ref<ComponentRef<typeof View>>\n}\n\ntype SheetOpenProps = ModalOpenProps & {\n /** Whether the sheet starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /** Whether the sheet is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /** Called with the new state as the sheet opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n}\n\ntype SheetPartProps = ViewProps & {\n readonly ref?: Ref<ComponentRef<typeof View>>\n}\n\ntype SheetProps = SheetOpenProps & {\n /** The button that opens the sheet, and `Sheet.Content`. */\n readonly children?: ReactNode\n}\n\ntype SheetTitleProps = Omit<TextProps, 'role'> & {\n readonly ref?: Ref<HostInstance>\n}\n\n// What the window draws once the sheet is open, and what it needs from the\n// part that keeps the open state.\ntype SheetWindowProps = Omit<\n SheetContentProps,\n 'defaultOpen' | 'isOpen' | 'onOpenChange'\n> & {\n readonly close: () => void\n readonly isDismissable: boolean\n readonly isKeyboardDismissDisabled: boolean\n readonly isOpen: boolean\n readonly setPresent: (present: boolean) => void\n readonly slots: ButtonSlots\n}\n\n// The heights a bottom sheet rests at, as how far its panel is moved down:\n// whole, at half the window where it is taller than that, and gone.\ntype Stops = {\n /** The lower height, where the sheet has two. */\n readonly partial: null | number\n /** Every height a release can settle on, highest first. */\n readonly settles: readonly number[]\n}\n\n// The bottom sheet's room and padding: no taller than the window less the top\n// margin, or less the status bar where that is the taller, and its content\n// above the home indicator and inside the side insets.\nfunction bottomBoundsOf(insets: EdgeInsets, height: number): ViewStyle {\n return {\n ...insetsOf(insets),\n maxHeight: height - Math.max(TOP_MARGIN, insets.top),\n paddingTop: 0,\n }\n}\n\n/**\n * Where a bottom sheet let go comes to rest: one height on in the direction of\n * a fling, and the nearest height otherwise. Heights are how far the panel is\n * moved down, highest first, and the highest is always the whole sheet, 0.\n */\nfunction settleOf(at: number, velocity: number, settles: readonly number[]) {\n if (velocity > FLING) {\n return settles.find((stop) => stop > at) ?? settles.at(-1) ?? 0\n }\n\n if (velocity < -FLING) {\n return settles.findLast((stop) => stop < at) ?? 0\n }\n\n return settles.reduce(\n (nearest, stop) =>\n Math.abs(stop - at) < Math.abs(nearest - at) ? stop : nearest,\n 0,\n )\n}\n\n/**\n * A modal sheet along an edge of the screen, the bottom sheets and side sheets\n * spec pages' modal sheets, paired by window size as kanso-ui's are: a bottom\n * sheet in a compact window, dragged between heights and swiped down to go,\n * and a side sheet along the end edge from the medium window up. Pass\n * `isOpen` with `onOpenChange` to hold the open state, or `defaultOpen` to let\n * it keep its own.\n *\n * ```tsx\n * <Sheet>\n * <Button>Open</Button>\n * <Sheet.Content>\n * <Sheet.Handle />\n * <Sheet.Header>\n * <Sheet.Title>Headline</Sheet.Title>\n * </Sheet.Header>\n * <Sheet.Body>Supporting text</Sheet.Body>\n * <Sheet.Footer>\n * <Button slot=\"close\">Done</Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet>\n * ```\n *\n * Composed rather than configured by props, as web's is. A `Button` or\n * `IconButton` inside `Sheet` and outside its content opens it, and one given\n * `slot=\"close\"` anywhere inside the content closes it. A sheet nothing on the\n * screen opens leaves `Sheet` out and passes `isOpen` and `onOpenChange` to\n * `Sheet.Content` instead.\n */\nfunction Sheet({ children, defaultOpen, isOpen, onOpenChange }: SheetProps) {\n const { context, slots } = useModalTrigger({\n defaultOpen,\n isOpen,\n onOpenChange,\n })\n\n return (\n <SheetTriggerContext value={context}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </SheetTriggerContext>\n )\n}\n\n/**\n * What the sheet shows, as a body that scrolls when its content runs past the\n * room it has. A string is drawn in body medium on on-surface variant;\n * anything else draws itself. `style`, `ref` and `testID` land on the\n * `ScrollView`.\n *\n * A body its content runs past takes focus, as web's is a tab stop, so a\n * keyboard can scroll it when nothing inside it takes focus; a call site's\n * own `focusable` still wins. A bottom sheet's body scrolls only once the\n * sheet is at its whole height, and holds the sheet's drag off while it does.\n */\nfunction SheetBody({\n children,\n contentContainerStyle,\n onContentSizeChange,\n onLayout,\n scrollEnabled = true,\n ...props\n}: SheetBodyProps) {\n const layout = useLayout('Sheet.Body')\n const styles = stylesOf(useTheme())\n const text = useTypeRole('bodyMedium')\n const [content, setContent] = useState(0)\n const [room, setRoom] = useState(0)\n const measureContent = useCallback(\n (width: number, height: number) => {\n setContent(height)\n onContentSizeChange?.(width, height)\n },\n [onContentSizeChange],\n )\n const measureRoom = useCallback(\n (event: LayoutChangeEvent) => {\n setRoom(event.nativeEvent.layout.height)\n onLayout?.(event)\n },\n [onLayout],\n )\n const scrolls = scrollEnabled && layout.expanded\n const overflows = content > room\n // oxlint-disable-next-line react/capitalized-calls, typescript/no-deprecated -- a builder named after its gesture, not a component; see SheetLayout\n const native = Gesture.Native()\n .enabled(scrolls && overflows)\n .blocksExternalGesture(layout.pan)\n\n return (\n <GestureDetector gesture={native}>\n <ScrollView\n focusable={scrolls && overflows}\n onContentSizeChange={measureContent}\n onLayout={measureRoom}\n {...props}\n contentContainerStyle={composeStyles<ViewStyle>(\n styles.body,\n contentContainerStyle,\n )}\n scrollEnabled={scrolls}\n >\n {typeof children === 'string' ? (\n <NativeText style={composeStyles<TextStyle>(text, styles.bodyText)}>\n {children}\n </NativeText>\n ) : (\n children\n )}\n </ScrollView>\n </GestureDetector>\n )\n}\n\n/**\n * The sheet itself, and the scrim behind it. Everything the sheet shows goes\n * in here; the button that opens it stays outside it.\n *\n * Inside `Sheet`, the open state is the trigger's. On its own it is this\n * part's: `isOpen` with `onOpenChange` holds it, and a `slot=\"close\"` button,\n * the scrim, the swipe and the back gesture all report through\n * `onOpenChange`. `style`, `ref` and `testID` land on the container, and\n * `testID` names the drag `<testID>-drag` for Gesture Handler's test helpers.\n */\nfunction SheetContent({\n defaultOpen,\n isDismissable = true,\n isKeyboardDismissDisabled = false,\n isOpen,\n onOpenChange,\n ...props\n}: SheetContentProps) {\n const outer = use(SheetTriggerContext)\n const { close, present, setPresent, slots, state } = useModalState(outer, {\n defaultOpen,\n isOpen,\n onOpenChange,\n })\n\n if (!present) {\n return null\n }\n\n return (\n <SheetWindow\n {...props}\n close={close}\n isDismissable={isDismissable}\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n isOpen={state.isOpen}\n setPresent={setPresent}\n slots={slots}\n />\n )\n}\n\n/**\n * The sheet's actions, leading and wrapping onto another row when they do not\n * fit on one, over a divider. On a bottom sheet at half height they are below\n * the fold until the sheet is raised. `style`, `ref` and `testID` land on its\n * view.\n */\nfunction SheetFooter({ style, ...props }: SheetPartProps) {\n useLayout('Sheet.Footer')\n const styles = stylesOf(useTheme())\n\n return (\n <View {...props} style={composeStyles<ViewStyle>(styles.footer, style)} />\n )\n}\n\n/**\n * The bottom sheet's drag handle, a 32 by 4dp bar centred along its top edge.\n * Where the sheet has two heights it is a button moving it to the other one,\n * named \"Drag handle\" in the `I18nProvider`'s locale, or the device's outside\n * one, unless `aria-label` says otherwise; elsewhere it is a mark a screen reader skips. A side sheet draws\n * none. `style`, `ref` and `testID` land on its view.\n */\nfunction SheetHandle({\n 'aria-label': label,\n style,\n ...props\n}: SheetHandleProps) {\n const layout = useLayout('Sheet.Handle')\n const theme = useTheme()\n const styles = stylesOf(theme)\n const { colors, radii } = theme\n const feedback = usePressFeedback({\n color: colors.onSurfaceVariant,\n corners: { borderRadius: radii.pill },\n })\n const { toggle } = layout\n const messages = useMessages()\n\n if (!layout.bottom) {\n return null\n }\n\n if (toggle === undefined) {\n return (\n <View\n aria-hidden\n {...props}\n style={composeStyles<ViewStyle>(styles.handle, style)}\n >\n <View style={styles.bar} />\n </View>\n )\n }\n\n return (\n <Pressable\n aria-expanded={layout.expanded}\n aria-label={label ?? messages.dragHandle}\n role=\"button\"\n {...props}\n {...feedback.handlers}\n onPress={toggle}\n style={composeStyles<ViewStyle>(styles.handle, feedback.ring, style)}\n >\n {feedback.layer}\n <View style={styles.bar} />\n </Pressable>\n )\n}\n\n/**\n * The sheet's header: its `Sheet.Title`, and anything beside it, such as a\n * close button, over a divider. `style`, `ref` and `testID` land on its view.\n */\nfunction SheetHeader({ style, ...props }: SheetPartProps) {\n useLayout('Sheet.Header')\n const styles = stylesOf(useTheme())\n\n return (\n <View {...props} style={composeStyles<ViewStyle>(styles.header, style)} />\n )\n}\n\n/**\n * Names the sheet: the container is labelled by it, and a screen reader is\n * sent to it once the sheet shows. In title large on on-surface variant.\n * `style`, `ref` and `testID` land on React Native's own Text.\n */\nfunction SheetTitle({ ref, style, ...props }: SheetTitleProps) {\n const layout = useLayout('Sheet.Title')\n const styles = stylesOf(useTheme())\n const role = useTypeRole('titleLarge')\n\n return (\n <NativeText\n {...props}\n nativeID={layout.titleId}\n ref={refsOf(layout.setTitle, ref)}\n role=\"heading\"\n style={composeStyles<TextStyle>(role, styles.title, style)}\n />\n )\n}\n\n/**\n * The open sheet, mounted from the moment it opens until its exit has run, so\n * each opening starts from its edge and at its first height.\n */\nfunction SheetWindow({\n children,\n close,\n isDismissable,\n isKeyboardDismissDisabled,\n isOpen,\n onLayout,\n setPresent,\n slots,\n style,\n testID,\n ...props\n}: SheetWindowProps) {\n const styles = stylesOf(useTheme())\n const insets = use(SafeAreaInsetsContext) ?? NO_INSETS\n const { height } = useWindowDimensions()\n const bottom = useWindowSizeClass() === 'compact'\n const titleId = useId()\n const [title, setTitle] = useState<HostInstance | null>(null)\n // The panel's height as laid out, before any drag moves it, and whether a\n // sheet with two heights is at the higher one.\n const [full, setFull] = useState<null | number>(null)\n const [expanded, setExpanded] = useState(false)\n const stops = stopsOf(bottom, full, height, isDismissable)\n const twoHeights = stops.partial !== null\n const rest = stops.partial !== null && !expanded ? stops.partial : 0\n const motion = useSheetMotion({ bottom, full, isOpen, rest, setPresent })\n const pan = useSheetDrag({\n close,\n enabled: bottom && isOpen && stops.settles.length > 1,\n expanded,\n full,\n isDismissable,\n offset: motion.offset,\n rest,\n setExpanded,\n stops,\n testID,\n })\n const toggle = useCallback(() => {\n setExpanded((was) => !was)\n }, [])\n const layout = useMemo<SheetLayout>(\n () => ({\n bottom,\n expanded: !twoHeights || expanded,\n pan,\n setTitle,\n titleId,\n toggle: twoHeights ? toggle : undefined,\n }),\n [bottom, expanded, pan, titleId, toggle, twoHeights],\n )\n const measure = useCallback(\n (event: LayoutChangeEvent) => {\n setFull(event.nativeEvent.layout.height)\n onLayout?.(event)\n },\n [onLayout],\n )\n const labelledBy = title === null ? undefined : titleId\n\n return (\n <ModalWindow\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n labelledBy={labelledBy}\n onClose={close}\n onScrimPress={isDismissable && isOpen ? close : undefined}\n scrim={motion.scrim}\n title={title}\n >\n <GestureHandlerRootView\n style={bottom ? styles.rootBottom : styles.rootSide}\n >\n <GestureDetector gesture={pan}>\n <Animated.View\n {...panelRoleOf('dialog', labelledBy)}\n onAccessibilityEscape={\n isKeyboardDismissDisabled ? undefined : close\n }\n {...props}\n onLayout={measure}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.container,\n bottom ? styles.containerBottom : styles.containerSide,\n bottom ? bottomBoundsOf(insets, height) : sideInsetsOf(insets),\n motion.panel,\n style,\n )}\n testID={testID}\n >\n <SheetLayoutContext value={layout}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </SheetLayoutContext>\n </Animated.View>\n </GestureDetector>\n </GestureHandlerRootView>\n </ModalWindow>\n )\n}\n\n// The side sheet's padding: its content under the status bar, over the home\n// indicator and inside the inset on its own edge. Its start edge faces the\n// screen it covers, which has none.\nfunction sideInsetsOf(insets: EdgeInsets): ViewStyle {\n return { ...insetsOf(insets), paddingStart: 0 }\n}\n\nfunction stopsOf(\n bottom: boolean,\n full: null | number,\n height: number,\n isDismissable: boolean,\n): Stops {\n if (!bottom || full === null) {\n return { partial: null, settles: [0] }\n }\n\n const lower = full - height * PARTIAL\n const partial = lower > 0 ? lower : null\n\n return {\n partial,\n settles: [\n 0,\n ...(partial === null ? [] : [partial]),\n ...(isDismissable ? [full] : []),\n ],\n }\n}\n\nfunction useLayout(part: string) {\n const layout = use(SheetLayoutContext)\n\n if (layout === null) {\n throw new Error(`${part} is drawn inside Sheet.Content.`)\n }\n\n return layout\n}\n\n/**\n * The bottom sheet's drag. The panel follows the finger, no higher than its\n * whole height and no lower than gone, or than its lowest height when it may\n * not be dismissed, and once let go it settles where `settleOf` says: below\n * the lowest height it closes, and at another height it moves the sheet there.\n */\nfunction useSheetDrag({\n close,\n enabled,\n expanded,\n full,\n isDismissable,\n offset,\n rest,\n setExpanded,\n stops,\n testID,\n}: {\n readonly close: () => void\n readonly enabled: boolean\n readonly expanded: boolean\n readonly full: null | number\n readonly isDismissable: boolean\n readonly offset: SharedValue<number>\n readonly rest: number\n readonly setExpanded: (expanded: boolean) => void\n readonly stops: Stops\n readonly testID: string | undefined\n}) {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n // Where the panel stood when the drag was recognised. Gesture Handler\n // measures its translation from there, past the slop.\n const origin = useSharedValue(0)\n const lowest = stops.settles.at(-1) ?? 0\n\n function follow(translation: number) {\n offset.set(Math.min(lowest, Math.max(0, origin.get() + translation)))\n }\n\n function settle(target: number) {\n if (isDismissable && target === full) {\n close()\n return\n }\n\n const higher = target === 0\n if (stops.partial !== null && higher !== expanded) {\n setExpanded(higher)\n return\n }\n\n offset.set(\n reduceMotion\n ? target\n : withTiming(target, {\n duration: motion.durationMedium1,\n easing: Easing.bezier(...motion.easingEmphasizedDecelerate),\n }),\n )\n }\n\n // oxlint-disable-next-line react/capitalized-calls, typescript/no-deprecated -- a builder named after its gesture, not a component; see SheetLayout\n const pan = Gesture.Pan()\n .activeOffsetY([-DRAG_SLOP, DRAG_SLOP])\n .enabled(enabled)\n .runOnJS(true)\n .onStart(({ translationY }) => {\n origin.set(offset.get())\n follow(translationY)\n })\n .onUpdate(({ translationY }) => {\n follow(translationY)\n })\n .onEnd(({ velocityY }, success) => {\n settle(success ? settleOf(offset.get(), velocityY, stops.settles) : rest)\n })\n\n return testID === undefined ? pan : pan.withTestId(`${testID}-drag`)\n}\n\n/**\n * The scrim's and the panel's motion, and the timer that unmounts the sheet\n * once its exit has run. The bottom sheet's position is how far its panel is\n * moved down, which the drag sets too; it starts below the window and rises\n * to its height once that is measured. The side sheet's is how far it has\n * come in from its edge, which is the end edge, and so the left one under\n * right-to-left.\n */\nfunction useSheetMotion({\n bottom,\n full,\n isOpen,\n rest,\n setPresent,\n}: {\n readonly bottom: boolean\n readonly full: null | number\n readonly isOpen: boolean\n readonly rest: number\n readonly setPresent: (present: boolean) => void\n}) {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n const { height } = useWindowDimensions()\n const offset = useSharedValue(height)\n const shown = useSharedValue(0)\n const scrim = useSharedValue(0)\n // A translation is not mirrored under a right-to-left layout, though the\n // side sheet's edge is, so it travels the other way there.\n const direction = I18nManager.isRTL ? -1 : 1\n\n useEffect(() => {\n const fade = {\n duration: motion.durationShort2,\n easing: Easing.bezier(...motion.easingStandard),\n }\n const enter = {\n duration: motion.durationMedium1,\n easing: Easing.bezier(...motion.easingEmphasizedDecelerate),\n }\n const exit = {\n duration: motion.durationShort3,\n easing: Easing.bezier(...motion.easingEmphasizedAccelerate),\n }\n\n if (isOpen) {\n scrim.set(withTiming(1, fade))\n if (!bottom) {\n shown.set(reduceMotion ? 1 : withTiming(1, enter))\n return undefined\n }\n if (full === null) {\n return undefined\n }\n // It rises from its own height below where it rests, not from the\n // bottom of the window, so it shows from the first frame.\n if (offset.get() > full) {\n offset.set(full)\n }\n offset.set(reduceMotion ? rest : withTiming(rest, enter))\n return undefined\n }\n\n scrim.set(withTiming(0, fade))\n if (bottom) {\n const gone = full ?? height\n offset.set(reduceMotion ? gone : withTiming(gone, exit))\n } else {\n shown.set(reduceMotion ? 0 : withTiming(0, exit))\n }\n const timer = setTimeout(\n () => {\n setPresent(false)\n },\n reduceMotion\n ? motion.durationShort2\n : Math.max(motion.durationShort2, motion.durationShort3),\n )\n\n return () => {\n clearTimeout(timer)\n }\n }, [\n bottom,\n full,\n height,\n isOpen,\n motion,\n offset,\n reduceMotion,\n rest,\n scrim,\n setPresent,\n shown,\n ])\n\n return {\n offset,\n panel: useAnimatedStyle(() => {\n 'worklet'\n if (bottom) {\n return { transform: [{ translateY: offset.get() }] }\n }\n\n const progress = shown.get()\n return {\n opacity: progress,\n transform: [{ translateX: (1 - progress) * SIDE_WIDTH * direction }],\n }\n }),\n scrim: useAnimatedStyle(() => {\n 'worklet'\n return { opacity: scrim.get() }\n }),\n }\n}\n\nSheet.Body = SheetBody\nSheet.Content = SheetContent\nSheet.Footer = SheetFooter\nSheet.Handle = SheetHandle\nSheet.Header = SheetHeader\nSheet.Title = SheetTitle\n\nexport {\n Sheet,\n SheetBody,\n SheetContent,\n SheetFooter,\n SheetHandle,\n SheetHeader,\n SheetTitle,\n}\nexport type {\n SheetBodyProps,\n SheetContentProps,\n SheetHandleProps,\n SheetPartProps,\n SheetProps,\n SheetTitleProps,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAyHA,MAAM2D,aAAa;AAGnB,MAAMC,aAAa;AAGnB,MAAMC,UAAU;AAIhB,MAAMC,YAAY;AAKlB,MAAMC,QAAQ;AAId,MAAMC,YAAY;AAClB,MAAMC,aAAa;AACnB,MAAMC,YAAY;AAClB,MAAMC,WAAW;AAEjB,MAAMC,WAAWX,cACd,EAAEY,QAAQC,OAAOC,SAASC,cACzB7C,WAAW8C,OAAO;CAEhBC,KAAK;EACHC,iBAAiBN,OAAOO;EACxBC,cAAcP,MAAMQ;EACpBC,QAAQd;EACRe,OAAOhB;CACT;CAGAiB,MAAM;EACJC,KAAKV,QAAQW;EACbC,mBAAmBZ,QAAQa;EAC3BC,iBAAiBd,QAAQW;CAC3B;CAGAI,UAAU,EACRC,OAAOnB,OAAOO,iBAChB;CAEAa,WAAW;EACTd,iBAAiBN,OAAOqB;EACxBC,WAAWpB,QAAQqB;EACnBC,UAAU;CACZ;CAEAC,iBAAiB;EACfC,qBAAqBzB,MAAMe;EAC3BW,sBAAsB1B,MAAMe;EAC5BL,OAAO;CACT;CAGAiB,eAAe;EACbC,yBAAyB5B,MAAMa;EAC/BgB,sBAAsB7B,MAAMa;EAC5BiB,MAAM;CACR;CAGAC,QAAQ;EACNC,YAAY;EACZC,gBAAgBlC,OAAOmC;EACvBC,gBAAgB;EAChBC,eAAe;EACfC,YAAY;EACZC,UAAU;EACV1B,KAAKV,QAAQqC;EACbC,gBAAgB;EAChBC,WAAW;EACXC,eAAexC,QAAQa;EACvBD,mBAAmBZ,QAAQa;EAC3B4B,YAAYzC,QAAQW;CACtB;CAEA+B,QAAQ;EACNZ,YAAY;EACZa,WAAW;EACXtC,cAAcP,MAAMQ;EACpB6B,YAAY;E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AAK,EAAE,CAAC,EAAE;EAGrD,MAAAoC,WAAiBhB,MAAKpB,IAAK;EAAC,OACrB;GAAAqC,SACID;GAAQF,WACN,CAAC,EAAAI,aAAe,IAAIF,YAAYrQ,aAAasP,UAAU,CAAC;EACrE;CAAC,CACF;CACM,MAAAlG,KAAA5K,uBAAiB;EAAA;EAAA,OAEf,EAAA8R,SAAWhE,MAAK2B,IAAK,EAAE;CAAC,CAChC;CAAC,IAAAtE;CAAA,IAAAlC,EAAA,QAAAoE,UAAApE,EAAA,QAAAK,MAAAL,EAAA,QAAA2B,IAAA;EAjBGO,KAAA;GAAAkC;GAAAiB,OAEEhF;GAWLwE,OACKlD;EAIT;EAAC3B,EAAA,MAAAoE;EAAApE,EAAA,MAAAK;EAAAL,EAAA,MAAA2B;EAAA3B,EAAA,MAAAkC;CAAA,OAAAA,KAAAlC,EAAA;CAAA,OAlBMkC;AAkBN;AAGHpC,MAAMiJ,OAAOzI;AACbR,MAAMkJ,UAAUzG;AAChBzC,MAAMmJ,SAASvG;AACf5C,MAAMoJ,SAASvG;AACf7C,MAAMqJ,SAAS9F;AACfvD,MAAMsJ,QAAQ9F"}
|
|
@@ -52,8 +52,8 @@ type SnackbarProps = Omit<ViewProps, 'children' | 'style'> & {
|
|
|
52
52
|
/**
|
|
53
53
|
* What a screen reader calls the button that dismisses a snackbar. It sits
|
|
54
54
|
* here rather than on a message's own options because it does not vary by
|
|
55
|
-
* message.
|
|
56
|
-
*
|
|
55
|
+
* message. Left out, it is the word React Aria gives web's in the
|
|
56
|
+
* `I18nProvider`'s locale, or the device's outside one, "Close" in English.
|
|
57
57
|
*/
|
|
58
58
|
readonly closeLabel?: string;
|
|
59
59
|
/** The queue the snackbar shows messages from. */
|
|
@@ -111,7 +111,7 @@ declare class SnackbarQueue {
|
|
|
111
111
|
* `style`, `ref` and `testID` land on that region, a view along the bottom of
|
|
112
112
|
* the screen that holds the message.
|
|
113
113
|
*/
|
|
114
|
-
declare function Snackbar({ closeLabel, queue, style, ...props }: SnackbarProps): import("react").JSX.Element;
|
|
114
|
+
declare function Snackbar({ closeLabel: ownCloseLabel, queue, style, ...props }: SnackbarProps): import("react").JSX.Element;
|
|
115
115
|
declare namespace Snackbar {
|
|
116
116
|
var Queue: typeof SnackbarQueue;
|
|
117
117
|
}
|