@kanso-labs/react-native-kanso-ui 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/README.md +37 -0
  2. package/dist/badge/index.js +9 -68
  3. package/dist/badge/index.js.map +1 -1
  4. package/dist/button/index.d.ts +2 -1
  5. package/dist/button/index.js +1 -1
  6. package/dist/button/index.js.map +1 -1
  7. package/dist/button/palettes.d.ts +2 -0
  8. package/dist/button/pending.js +17 -21
  9. package/dist/button/pending.js.map +1 -1
  10. package/dist/calendar/index.js +1 -1
  11. package/dist/components/autocomplete/index.js +28 -26
  12. package/dist/components/autocomplete/index.js.map +1 -1
  13. package/dist/components/avatar/index.d.ts +2 -2
  14. package/dist/components/avatar/index.js +2 -2
  15. package/dist/components/avatar/index.js.map +1 -1
  16. package/dist/components/badge/index.d.ts +48 -0
  17. package/dist/components/badge/index.js +122 -0
  18. package/dist/components/badge/index.js.map +1 -0
  19. package/dist/{badge → components/badge}/styles.js +10 -6
  20. package/dist/components/badge/styles.js.map +1 -0
  21. package/dist/components/breadcrumbs/index.d.ts +66 -0
  22. package/dist/components/breadcrumbs/index.js +285 -0
  23. package/dist/components/breadcrumbs/index.js.map +1 -0
  24. package/dist/components/calendar/index.d.ts +1 -1
  25. package/dist/components/calendar/index.js +77 -38
  26. package/dist/components/calendar/index.js.map +1 -1
  27. package/dist/components/checkbox/index.d.ts +7 -1
  28. package/dist/components/checkbox/index.js +183 -138
  29. package/dist/components/checkbox/index.js.map +1 -1
  30. package/dist/components/checkbox-group/index.d.ts +93 -0
  31. package/dist/components/checkbox-group/index.js +306 -0
  32. package/dist/components/checkbox-group/index.js.map +1 -0
  33. package/dist/components/chip-group/index.d.ts +4 -3
  34. package/dist/components/chip-group/index.js +47 -45
  35. package/dist/components/chip-group/index.js.map +1 -1
  36. package/dist/components/code/index.d.ts +25 -0
  37. package/dist/components/code/index.js +87 -0
  38. package/dist/components/code/index.js.map +1 -0
  39. package/dist/components/container/index.d.ts +47 -0
  40. package/dist/components/container/index.js +85 -0
  41. package/dist/components/container/index.js.map +1 -0
  42. package/dist/components/copy-field/index.d.ts +5 -5
  43. package/dist/components/copy-field/index.js +30 -28
  44. package/dist/components/copy-field/index.js.map +1 -1
  45. package/dist/components/currency/index.d.ts +2 -2
  46. package/dist/components/currency/index.js +3 -1
  47. package/dist/components/currency/index.js.map +1 -1
  48. package/dist/components/fab/index.d.ts +80 -0
  49. package/dist/components/fab/index.js +231 -0
  50. package/dist/components/fab/index.js.map +1 -0
  51. package/dist/components/fab-menu/index.d.ts +120 -0
  52. package/dist/components/fab-menu/index.js +640 -0
  53. package/dist/components/fab-menu/index.js.map +1 -0
  54. package/dist/components/feed/index.d.ts +57 -0
  55. package/dist/components/feed/index.js +167 -0
  56. package/dist/components/feed/index.js.map +1 -0
  57. package/dist/components/keycap/index.d.ts +27 -0
  58. package/dist/components/keycap/index.js +136 -0
  59. package/dist/components/keycap/index.js.map +1 -0
  60. package/dist/components/list/index.d.ts +6 -5
  61. package/dist/components/list/index.js +97 -106
  62. package/dist/components/list/index.js.map +1 -1
  63. package/dist/components/menu/index.d.ts +4 -3
  64. package/dist/components/menu/index.js +33 -40
  65. package/dist/components/menu/index.js.map +1 -1
  66. package/dist/components/meter/index.d.ts +2 -1
  67. package/dist/components/meter/index.js +9 -7
  68. package/dist/components/meter/index.js.map +1 -1
  69. package/dist/components/number-field/index.d.ts +7 -3
  70. package/dist/components/number-field/index.js +214 -192
  71. package/dist/components/number-field/index.js.map +1 -1
  72. package/dist/components/product-icon/index.d.ts +2 -2
  73. package/dist/components/product-icon/index.js +2 -2
  74. package/dist/components/product-icon/index.js.map +1 -1
  75. package/dist/components/progress-indicator/index.d.ts +2 -1
  76. package/dist/components/progress-indicator/index.js +15 -13
  77. package/dist/components/progress-indicator/index.js.map +1 -1
  78. package/dist/components/search-field/index.d.ts +3 -3
  79. package/dist/components/search-field/index.js +105 -104
  80. package/dist/components/search-field/index.js.map +1 -1
  81. package/dist/components/separator/index.d.ts +3 -2
  82. package/dist/components/separator/index.js +29 -26
  83. package/dist/components/separator/index.js.map +1 -1
  84. package/dist/components/sheet/index.d.ts +2 -2
  85. package/dist/components/sheet/index.js +22 -26
  86. package/dist/components/sheet/index.js.map +1 -1
  87. package/dist/components/snackbar/index.d.ts +3 -3
  88. package/dist/components/snackbar/index.js +36 -34
  89. package/dist/components/snackbar/index.js.map +1 -1
  90. package/dist/components/supporting-pane/index.d.ts +44 -0
  91. package/dist/components/supporting-pane/index.js +109 -0
  92. package/dist/components/supporting-pane/index.js.map +1 -0
  93. package/dist/components/tag/index.d.ts +58 -0
  94. package/dist/components/tag/index.js +205 -0
  95. package/dist/components/tag/index.js.map +1 -0
  96. package/dist/components/text/index.d.ts +1 -1
  97. package/dist/components/text/index.js +49 -21
  98. package/dist/components/text/index.js.map +1 -1
  99. package/dist/components/text-area/index.d.ts +145 -0
  100. package/dist/components/text-area/index.js +231 -0
  101. package/dist/components/text-area/index.js.map +1 -0
  102. package/dist/components/text-field/index.d.ts +6 -3
  103. package/dist/components/text-field/index.js +3 -0
  104. package/dist/components/text-field/index.js.map +1 -1
  105. package/dist/components/toolbar/index.d.ts +53 -0
  106. package/dist/components/toolbar/index.js +185 -0
  107. package/dist/components/toolbar/index.js.map +1 -0
  108. package/dist/control/group.js +23 -0
  109. package/dist/control/group.js.map +1 -0
  110. package/dist/fab/index.d.ts +19 -0
  111. package/dist/fab/index.js +147 -0
  112. package/dist/fab/index.js.map +1 -0
  113. package/dist/field/index.js +123 -79
  114. package/dist/field/index.js.map +1 -1
  115. package/dist/field/styles.js +18 -0
  116. package/dist/field/styles.js.map +1 -1
  117. package/dist/form/index.d.ts +1 -2
  118. package/dist/form/index.js +1 -1
  119. package/dist/form/index.js.map +1 -1
  120. package/dist/i18n/index.js +12 -1
  121. package/dist/i18n/index.js.map +1 -1
  122. package/dist/i18n/messages.js +367 -0
  123. package/dist/i18n/messages.js.map +1 -1
  124. package/dist/i18n/provider.d.ts +53 -0
  125. package/dist/i18n/provider.js +96 -0
  126. package/dist/i18n/provider.js.map +1 -0
  127. package/dist/index.d.ts +19 -4
  128. package/dist/index.js +17 -3
  129. package/dist/indicator/index.js +1 -2
  130. package/dist/indicator/index.js.map +1 -1
  131. package/dist/mark/index.js +77 -117
  132. package/dist/mark/index.js.map +1 -1
  133. package/dist/mark/initials.js.map +1 -1
  134. package/dist/modal/index.js +59 -46
  135. package/dist/modal/index.js.map +1 -1
  136. package/dist/navigation/index.js +8 -5
  137. package/dist/navigation/index.js.map +1 -1
  138. package/dist/number/count.js +15 -0
  139. package/dist/number/count.js.map +1 -0
  140. package/dist/number/locale.js.map +1 -1
  141. package/dist/overlay/host.js +30 -21
  142. package/dist/overlay/host.js.map +1 -1
  143. package/dist/overlay/placement.js +3 -1
  144. package/dist/overlay/placement.js.map +1 -1
  145. package/dist/separator/index.js +7 -0
  146. package/dist/separator/index.js.map +1 -0
  147. package/dist/typography/size.js +14 -0
  148. package/dist/typography/size.js.map +1 -0
  149. package/package.json +1 -1
  150. package/dist/badge/styles.js.map +0 -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;CACP;AACF,CAAC,CACH;AAIA,SAASC,SACPC,QACAC,MAC0B;CAC1B,QAAQC,UAAU;EAChBF,OAAO;EACPC,OAAOC,KAAK;CACd;AACF;AAIA,SAASC,UACPxD,SACAL,SACA;CACA,aAAa;EACXK,QAAQ;EACRL,QAAQ8D,SAASC,MAAM;CACzB;AACF;AAEA,SAASC,UACPC,QACAlD,UACAV,SACA6D,QACA;CACA,aAAa;EACXD,O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AA,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;CAGAC,OAAO,EACLC,WAAWpB,QAAQqB,GACrB;CAGAC,MAAM;EACJf,cAAcR,MAAMS;EACpBe,QAAQ;EACRC,MAAM;EACNC,eAAe;EACfC,UAAU;EACVC,OAAO;EACPC,KAAK;CACP;AACF,CAAC,CACH;AAIA,SAASC,SACPC,QACAC,MAC0B;CAC1B,QAAQC,UAAU;EAChBF,OAAO;EACPC,OAAOC,KAAK;CACd;AACF;AAIA,SAAS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AqF,EAAA,MAAAtB,MAAAoF;EAAA9D,EAAA,MAAAnF;EAAAmF,EAAA,MAAAhF;EAAAgF,EAAA,MAAA8B;EAAA9B,EAAA,MAAAgC;EAAAhC,EAAA,MAAA4C;EAAA5C,EAAA,MAAAiE;CAAA,OAAAA,MAAAjE,EAAA;CAAA,IAAAkE;CAAA,IAAAlE,EAAA,QAAA1E,eAAA0E,EAAA,QAAAoD,MAAApD,EAAA,QAAA4D,YAAA;EACZM,MAAA,oBAAC,cAAD;GAA2B5I;GAAoBsI,OAAAA;GAAgBR;EAAE,CAAA;EAAIpD,EAAA,MAAA1E;EAAA0E,EAAA,MAAAoD;EAAApD,EAAA,MAAA4D;EAAA5D,EAAA,MAAAkE;CAAA,OAAAA,MAAAlE,EAAA;CAAA,IAAAmE;CAAA,IAAAnE,EAAA,QAAAc,MAAAd,EAAA,QAAAjE,OAAAiE,EAAA,QAAAhE,SAAAgE,EAAA,QAAAiE,OAAAjE,EAAA,QAAAkE,KAAA;EA7BvEC,MAAA,qBAAC,IAAD;GAAWpI;GAAYC;GAAvB,UAAA,CACEiI,KA4BAC,GA7BG;;EA8BElE,EAAA,MAAAc;EAAAd,EAAA,MAAAjE;EAAAiE,EAAA,MAAAhE;EAAAgE,EAAA,MAAAiE;EAAAjE,EAAA,MAAAkE;EAAAlE,EAAA,MAAAmE;CAAA,OAAAA,MAAAnE,EAAA;CAAA,OA9BPmE;AA8BO;AAMX,SAASH,WACPpI,OACAC,UACAkH,iBACA;CACA,QAAQxE,UAAuC;EAC7C1C,WAAWD,KAAK;EAChBmH,kBAAkBxE,KAAK;CACzB;AACF"}
@@ -13,7 +13,8 @@ type SeparatorProps = ViewProps & {
13
13
  readonly inset?: SeparatorInset;
14
14
  /**
15
15
  * Which way the rule runs. A rule takes its length from its parent: a
16
- * horizontal one spans a column, and a vertical one a row.
16
+ * horizontal one spans a column, and a vertical one a row. Inside a
17
+ * `Toolbar` it runs across the bar unless this says otherwise.
17
18
  * @default 'horizontal'
18
19
  */
19
20
  readonly orientation?: 'horizontal' | 'vertical';
@@ -39,7 +40,7 @@ type SeparatorProps = ViewProps & {
39
40
  * iOS nor Android has. `style`, `ref` and `testID` land on the `View`, and a
40
41
  * `style` there applies over the rule's own.
41
42
  */
42
- declare function Separator({ inset, orientation, style, ...props }: SeparatorProps): import("react").JSX.Element;
43
+ declare function Separator({ inset, orientation: own, style, ...props }: SeparatorProps): import("react").JSX.Element;
43
44
  //#endregion
44
45
  export { Separator, type SeparatorInset, type SeparatorProps };
45
46
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,9 @@
1
1
  import { useTheme } from "../../theme/scope.js";
2
2
  import { composeStyles, themedStyles } from "../../theme/styles.js";
3
+ import { SeparatorOrientationContext } from "../../separator/index.js";
3
4
  import { c } from "react/compiler-runtime";
4
5
  import { StyleSheet, View } from "react-native";
6
+ import { use } from "react";
5
7
  import { jsx } from "react/jsx-runtime";
6
8
  //#region src/components/separator/index.tsx
7
9
  const styles = StyleSheet.create({
@@ -58,50 +60,51 @@ const VERTICAL = { "aria-orientation": "vertical" };
58
60
  */
59
61
  function Separator(t0) {
60
62
  const $ = c(14);
63
+ let own;
61
64
  let props;
62
65
  let style;
63
66
  let t1;
64
- let t2;
65
67
  if ($[0] !== t0) {
66
- ({inset: t1, orientation: t2, style, ...props} = t0);
68
+ ({inset: t1, orientation: own, style, ...props} = t0);
67
69
  $[0] = t0;
68
- $[1] = props;
69
- $[2] = style;
70
- $[3] = t1;
71
- $[4] = t2;
70
+ $[1] = own;
71
+ $[2] = props;
72
+ $[3] = style;
73
+ $[4] = t1;
72
74
  } else {
73
- props = $[1];
74
- style = $[2];
75
- t1 = $[3];
76
- t2 = $[4];
75
+ own = $[1];
76
+ props = $[2];
77
+ style = $[3];
78
+ t1 = $[4];
77
79
  }
78
80
  const inset = t1 === void 0 ? "none" : t1;
79
- const orientation = t2 === void 0 ? "horizontal" : t2;
80
81
  const theme = useTheme();
81
- const t3 = orientation === "vertical" ? VERTICAL : void 0;
82
- let t4;
82
+ const provided = use(SeparatorOrientationContext);
83
+ const orientation = own ?? provided ?? "horizontal";
84
+ const t2 = orientation === "vertical" ? VERTICAL : void 0;
85
+ let t3;
83
86
  if ($[5] !== inset || $[6] !== orientation || $[7] !== style || $[8] !== theme) {
84
- t4 = composeStyles(styles[orientation], fillOf(theme).rule, insetsOf(theme)[orientation][inset], style);
87
+ t3 = composeStyles(styles[orientation], fillOf(theme).rule, insetsOf(theme)[orientation][inset], style);
85
88
  $[5] = inset;
86
89
  $[6] = orientation;
87
90
  $[7] = style;
88
91
  $[8] = theme;
89
- $[9] = t4;
90
- } else t4 = $[9];
91
- let t5;
92
- if ($[10] !== props || $[11] !== t3 || $[12] !== t4) {
93
- t5 = /* @__PURE__ */ jsx(View, {
92
+ $[9] = t3;
93
+ } else t3 = $[9];
94
+ let t4;
95
+ if ($[10] !== props || $[11] !== t2 || $[12] !== t3) {
96
+ t4 = /* @__PURE__ */ jsx(View, {
94
97
  role: "separator",
95
- ...t3,
98
+ ...t2,
96
99
  ...props,
97
- style: t4
100
+ style: t3
98
101
  });
99
102
  $[10] = props;
100
- $[11] = t3;
101
- $[12] = t4;
102
- $[13] = t5;
103
- } else t5 = $[13];
104
- return t5;
103
+ $[11] = t2;
104
+ $[12] = t3;
105
+ $[13] = t4;
106
+ } else t4 = $[13];
107
+ return t4;
105
108
  }
106
109
  //#endregion
107
110
  export { Separator };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ComponentRef","Ref","ViewProps","ViewStyle","StyleSheet","View","useTheme","composeStyles","themedStyles","styles","create","horizontal","alignSelf","flexShrink","height","vertical","width","fillOf","colors","rule","backgroundColor","outlineVariant","insetsOf","spacing","both","marginEnd","lg","marginStart","none","start","marginBottom","marginTop","VERTICAL","SeparatorInset","SeparatorProps","inset","orientation","ref","Separator","t0","$","_c","props","style","t1","t2","undefined","theme","t3","t4","t5","_c"],"sources":["../../../src/components/separator/index.tsx"],"sourcesContent":["import type { ComponentRef, Ref } from 'react'\nimport type { ViewProps, ViewStyle } from 'react-native'\n\nimport { StyleSheet, View } from 'react-native'\n\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\n\n// A divider is the same colour as a border, so it draws from outlineVariant\n// rather than a role of its own, as on web: the design system treats the two\n// as one decision.\n//\n// Drawn as a filled 1dp view rather than as a border, so the rule is the view\n// itself, which flex `gap` and anything measuring it can see.\n//\n// A rule has no length of its own. `alignSelf: 'stretch'` takes it from the\n// parent's cross axis: a horizontal rule spans a column, which is what a\n// `View` is by default, and a vertical one spans a row. A rule between two\n// rows should match whatever they turn out to be rather than being told a\n// length at the call site, and in a parent running the same way as the rule\n// it has none, which is the documented cost.\n//\n// The divider page gives three forms and this draws all three: full width,\n// inset by 16dp at the leading end, and middle-inset by 16dp at both. The page\n// names them \"inset\" and \"middle-inset\"; the prop says `start` and `both`, as\n// on web, since the two words say which ends move. The inset is a margin on\n// the axis the rule runs along, which shortens a stretched rule rather than\n// pushing it out of its parent. A horizontal rule's is `marginStart`, which\n// React Native puts on the right under right-to-left.\nconst styles = StyleSheet.create({\n horizontal: {\n alignSelf: 'stretch',\n flexShrink: 0,\n height: 1,\n },\n vertical: {\n alignSelf: 'stretch',\n flexShrink: 0,\n width: 1,\n },\n})\n\nconst fillOf = themedStyles(({ colors }) =>\n StyleSheet.create({\n rule: { backgroundColor: colors.outlineVariant },\n }),\n)\n\n// The page's 16dp, on the axis the rule runs along.\nconst insetsOf = themedStyles(({ spacing }) => ({\n horizontal: StyleSheet.create({\n both: { marginEnd: spacing.lg, marginStart: spacing.lg },\n none: {},\n start: { marginStart: spacing.lg },\n }),\n vertical: StyleSheet.create({\n both: { marginBottom: spacing.lg, marginTop: spacing.lg },\n none: {},\n start: { marginTop: spacing.lg },\n }),\n}))\n\n// React Native Web writes `aria-orientation` onto the element, which React\n// Native's types do not name. A horizontal rule needs none, since that is the\n// separator role's own default.\nconst VERTICAL: { readonly 'aria-orientation': 'vertical' } = {\n 'aria-orientation': 'vertical',\n}\n\ntype SeparatorInset = 'both' | 'none' | 'start'\n\ntype SeparatorProps = ViewProps & {\n /**\n * How far the rule is held off the ends it runs between. `start` holds it\n * 16dp off the leading end, which is the page's inset divider; `both` holds\n * it off each end, which is its middle-inset one. The inset follows the\n * writing direction rather than a fixed side.\n * @default 'none'\n */\n readonly inset?: SeparatorInset\n /**\n * Which way the rule runs. A rule takes its length from its parent: a\n * horizontal one spans a column, and a vertical one a row.\n * @default 'horizontal'\n */\n readonly orientation?: 'horizontal' | 'vertical'\n readonly ref?: Ref<ComponentRef<typeof View>>\n}\n\n/**\n * A 1dp rule between items, in the outline-variant colour, carrying the\n * separator role.\n *\n * ```tsx\n * <Stack gap=\"none\">\n * <Text>First item</Text>\n * <Separator inset=\"start\" />\n * <Text>Second item</Text>\n * </Stack>\n * ```\n *\n * `inset` holds the rule off the ends it runs between, `start` off the\n * leading one and `both` off each, which is what a rule between list rows\n * takes so it lines up with their text rather than the container's edge.\n *\n * Web draws the rule again as a border under forced colours, which neither\n * iOS nor Android has. `style`, `ref` and `testID` land on the `View`, and a\n * `style` there applies over the rule's own.\n */\nfunction Separator({\n inset = 'none',\n orientation = 'horizontal',\n style,\n ...props\n}: SeparatorProps) {\n const theme = useTheme()\n\n return (\n <View\n role=\"separator\"\n {...(orientation === 'vertical' ? VERTICAL : undefined)}\n {...props}\n style={composeStyles<ViewStyle>(\n styles[orientation],\n fillOf(theme).rule,\n insetsOf(theme)[orientation][inset],\n style,\n )}\n />\n )\n}\n\nexport type { SeparatorInset, SeparatorProps }\n\nexport { Separator }\n"],"mappings":";;;;;;AA6BA,MAAMS,SAASL,WAAWM,OAAO;CAC/BC,YAAY;EACVC,WAAW;EACXC,YAAY;EACZC,QAAQ;CACV;CACAC,UAAU;EACRH,WAAW;EACXC,YAAY;EACZG,OAAO;CACT;AACF,CAAC;AAED,MAAMC,SAAST,cAAc,EAAEU,aAC7Bd,WAAWM,OAAO,EAChBS,MAAM,EAAEC,iBAA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O8B,KAAK,CAAC,CAAA5B,MACbG,SAASyB,KAAK,CAAC,CAACX,YAAY,CAACD,QAC7BQ,KACF;EAACH,EAAA,KAAAL;EAAAK,EAAA,KAAAJ;EAAAI,EAAA,KAAAG;EAAAH,EAAA,KAAAO;EAAAP,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,IAAAU;CAAA,IAAAV,EAAA,QAAAE,SAAAF,EAAA,QAAAQ,MAAAR,EAAA,QAAAS,IAAA;EATHC,KAAA,oBAAC,MAAD;GACO,MAAA;GAAW,GACXF;GAAiD,GAClDN;GACG,OAAAO;EAKN,CAAA;EACDT,EAAA,MAAAE;EAAAF,EAAA,MAAAQ;EAAAR,EAAA,MAAAS;EAAAT,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,OAVFU;AAUE"}
1
+ {"version":3,"file":"index.js","names":["ComponentRef","Ref","ViewProps","ViewStyle","use","StyleSheet","View","SeparatorOrientationContext","useTheme","composeStyles","themedStyles","styles","create","horizontal","alignSelf","flexShrink","height","vertical","width","fillOf","colors","rule","backgroundColor","outlineVariant","insetsOf","spacing","both","marginEnd","lg","marginStart","none","start","marginBottom","marginTop","VERTICAL","SeparatorInset","SeparatorProps","inset","orientation","ref","Separator","t0","$","_c","own","props","style","t1","undefined","theme","provided","t2","t3","t4","_c"],"sources":["../../../src/components/separator/index.tsx"],"sourcesContent":["import type { ComponentRef, Ref } from 'react'\nimport type { ViewProps, ViewStyle } from 'react-native'\n\nimport { use } from 'react'\nimport { StyleSheet, View } from 'react-native'\n\nimport { SeparatorOrientationContext } from '../../separator'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\n\n// A divider is the same colour as a border, so it draws from outlineVariant\n// rather than a role of its own, as on web: the design system treats the two\n// as one decision.\n//\n// Drawn as a filled 1dp view rather than as a border, so the rule is the view\n// itself, which flex `gap` and anything measuring it can see.\n//\n// A rule has no length of its own. `alignSelf: 'stretch'` takes it from the\n// parent's cross axis: a horizontal rule spans a column, which is what a\n// `View` is by default, and a vertical one spans a row. A rule between two\n// rows should match whatever they turn out to be rather than being told a\n// length at the call site, and in a parent running the same way as the rule\n// it has none, which is the documented cost.\n//\n// The divider page gives three forms and this draws all three: full width,\n// inset by 16dp at the leading end, and middle-inset by 16dp at both. The page\n// names them \"inset\" and \"middle-inset\"; the prop says `start` and `both`, as\n// on web, since the two words say which ends move. The inset is a margin on\n// the axis the rule runs along, which shortens a stretched rule rather than\n// pushing it out of its parent. A horizontal rule's is `marginStart`, which\n// React Native puts on the right under right-to-left.\nconst styles = StyleSheet.create({\n horizontal: {\n alignSelf: 'stretch',\n flexShrink: 0,\n height: 1,\n },\n vertical: {\n alignSelf: 'stretch',\n flexShrink: 0,\n width: 1,\n },\n})\n\nconst fillOf = themedStyles(({ colors }) =>\n StyleSheet.create({\n rule: { backgroundColor: colors.outlineVariant },\n }),\n)\n\n// The page's 16dp, on the axis the rule runs along.\nconst insetsOf = themedStyles(({ spacing }) => ({\n horizontal: StyleSheet.create({\n both: { marginEnd: spacing.lg, marginStart: spacing.lg },\n none: {},\n start: { marginStart: spacing.lg },\n }),\n vertical: StyleSheet.create({\n both: { marginBottom: spacing.lg, marginTop: spacing.lg },\n none: {},\n start: { marginTop: spacing.lg },\n }),\n}))\n\n// React Native Web writes `aria-orientation` onto the element, which React\n// Native's types do not name. A horizontal rule needs none, since that is the\n// separator role's own default.\nconst VERTICAL: { readonly 'aria-orientation': 'vertical' } = {\n 'aria-orientation': 'vertical',\n}\n\ntype SeparatorInset = 'both' | 'none' | 'start'\n\ntype SeparatorProps = ViewProps & {\n /**\n * How far the rule is held off the ends it runs between. `start` holds it\n * 16dp off the leading end, which is the page's inset divider; `both` holds\n * it off each end, which is its middle-inset one. The inset follows the\n * writing direction rather than a fixed side.\n * @default 'none'\n */\n readonly inset?: SeparatorInset\n /**\n * Which way the rule runs. A rule takes its length from its parent: a\n * horizontal one spans a column, and a vertical one a row. Inside a\n * `Toolbar` it runs across the bar unless this says otherwise.\n * @default 'horizontal'\n */\n readonly orientation?: 'horizontal' | 'vertical'\n readonly ref?: Ref<ComponentRef<typeof View>>\n}\n\n/**\n * A 1dp rule between items, in the outline-variant colour, carrying the\n * separator role.\n *\n * ```tsx\n * <Stack gap=\"none\">\n * <Text>First item</Text>\n * <Separator inset=\"start\" />\n * <Text>Second item</Text>\n * </Stack>\n * ```\n *\n * `inset` holds the rule off the ends it runs between, `start` off the\n * leading one and `both` off each, which is what a rule between list rows\n * takes so it lines up with their text rather than the container's edge.\n *\n * Web draws the rule again as a border under forced colours, which neither\n * iOS nor Android has. `style`, `ref` and `testID` land on the `View`, and a\n * `style` there applies over the rule's own.\n */\nfunction Separator({\n inset = 'none',\n orientation: own,\n style,\n ...props\n}: SeparatorProps) {\n const theme = useTheme()\n const provided = use(SeparatorOrientationContext)\n const orientation = own ?? provided ?? 'horizontal'\n\n return (\n <View\n role=\"separator\"\n {...(orientation === 'vertical' ? VERTICAL : undefined)}\n {...props}\n style={composeStyles<ViewStyle>(\n styles[orientation],\n fillOf(theme).rule,\n insetsOf(theme)[orientation][inset],\n style,\n )}\n />\n )\n}\n\nexport type { SeparatorInset, SeparatorProps }\n\nexport { Separator }\n"],"mappings":";;;;;;;;AA+BA,MAAMW,SAASN,WAAWO,OAAO;CAC/BC,YAAY;EACVC,WAAW;EACXC,YAAY;EACZC,QAAQ;CACV;CACAC,UAAU;EACRH,WAAW;EACXC,YAAY;EACZG,OAAO;CACT;AACF,CAAC;AAED,MAAMC,SAAST,cAAc,EAAEU,aAC7Bf,WAAWO,OAAO,EAChBS,MAAM,EAAEC,iBAAiBF,OAAOG,eAAe,EACjD,CAAC,CACH;AAGA,MAAMC,WAAWd,cAAc,EAAEe,eAAe;CAC9CZ,YAAYR,WAAWO,OAAO;EAC5Bc,MAAM;GAAEC,WAAWF,QAAQG;GAAIC,aAAaJ,QAAQG;EAAG;EACvDE,MAAM,CAAC;EACPC,OAAO,EAAEF,aAAaJ,QAAQG,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AAA,KAAAV,EAAA;CAAA,IAAAW;CAAA,IAAAX,EAAA,QAAAG,SAAAH,EAAA,QAAAS,MAAAT,EAAA,QAAAU,IAAA;EATHC,KAAA,oBAAC,MAAD;GACO,MAAA;GAAW,GACXF;GAAiD,GAClDN;GACG,OAAAO;EAKN,CAAA;EACDV,EAAA,MAAAG;EAAAH,EAAA,MAAAS;EAAAT,EAAA,MAAAU;EAAAV,EAAA,MAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,OAVFW;AAUE"}
@@ -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 device's locale unless `aria-label` says
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 device's locale unless `aria-label` says
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(23);
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
- let t4;
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 ($[11] !== styles.bar) {
480
+ if ($[9] !== styles.bar) {
485
481
  t8 = /* @__PURE__ */ jsx(View, { style: styles.bar });
486
- $[11] = styles.bar;
487
- $[12] = t8;
488
- } else t8 = $[12];
482
+ $[9] = styles.bar;
483
+ $[10] = t8;
484
+ } else t8 = $[10];
489
485
  let t9;
490
- if ($[13] !== T0 || $[14] !== feedback.handlers || $[15] !== feedback.layer || $[16] !== layout.expanded || $[17] !== props || $[18] !== t4 || $[19] !== t7 || $[20] !== t8 || $[21] !== toggle) {
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
- $[13] = T0;
502
- $[14] = feedback.handlers;
503
- $[15] = feedback.layer;
504
- $[16] = layout.expanded;
505
- $[17] = props;
506
- $[18] = t4;
507
- $[19] = t7;
508
- $[20] = t8;
509
- $[21] = toggle;
510
- $[22] = t9;
511
- } else t9 = $[22];
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
  /**