@kanso-labs/react-native-kanso-ui 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/collection/index.js +107 -80
  2. package/dist/collection/index.js.map +1 -1
  3. package/dist/components/chip/index.d.ts +4 -1
  4. package/dist/components/chip/index.js +229 -161
  5. package/dist/components/chip/index.js.map +1 -1
  6. package/dist/components/dialog/index.d.ts +5 -5
  7. package/dist/components/dialog/index.js +5 -5
  8. package/dist/components/dialog/index.js.map +1 -1
  9. package/dist/components/drop-zone/index.d.ts +3 -3
  10. package/dist/components/drop-zone/index.js +2 -2
  11. package/dist/components/drop-zone/index.js.map +1 -1
  12. package/dist/components/menu/index.d.ts +3 -3
  13. package/dist/components/menu/index.js +3 -3
  14. package/dist/components/menu/index.js.map +1 -1
  15. package/dist/components/popover/index.d.ts +2 -2
  16. package/dist/components/popover/index.js +2 -2
  17. package/dist/components/popover/index.js.map +1 -1
  18. package/dist/components/search-view/index.d.ts +3 -2
  19. package/dist/components/search-view/index.js +3 -2
  20. package/dist/components/search-view/index.js.map +1 -1
  21. package/dist/components/sheet/index.d.ts +16 -7
  22. package/dist/components/sheet/index.js +157 -152
  23. package/dist/components/sheet/index.js.map +1 -1
  24. package/dist/components/table/index.d.ts +391 -0
  25. package/dist/components/table/index.js +1708 -0
  26. package/dist/components/table/index.js.map +1 -0
  27. package/dist/components/token-field/index.d.ts +105 -0
  28. package/dist/components/token-field/index.js +574 -0
  29. package/dist/components/token-field/index.js.map +1 -0
  30. package/dist/components/tooltip/index.d.ts +2 -1
  31. package/dist/components/tooltip/index.js.map +1 -1
  32. package/dist/field/index.js +50 -1
  33. package/dist/field/index.js.map +1 -1
  34. package/dist/field/styles.js +9 -1
  35. package/dist/field/styles.js.map +1 -1
  36. package/dist/glyphs/index.js +37 -1
  37. package/dist/glyphs/index.js.map +1 -1
  38. package/dist/i18n/index.js +17 -1
  39. package/dist/i18n/index.js.map +1 -1
  40. package/dist/i18n/messages.js +340 -0
  41. package/dist/i18n/messages.js.map +1 -1
  42. package/dist/index.d.ts +4 -2
  43. package/dist/index.js +4 -2
  44. package/dist/slider/index.js +1 -1
  45. package/dist/slider/index.js.map +1 -1
  46. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ReactNode","Ref","RefObject","HostInstance","StyleProp","TextStyle","ViewStyle","AnimatedStyle","useMemo","useRef","useState","Text","NativeText","StyleSheet","Animated","useTooltipTriggerState","ButtonTooltip","OverlayAlign","OverlaySide","ResolvedTheme","ButtonTooltipContext","Overlay","useAnchoredPlacement","PANEL_ORIGINS","usePanelMotion","useTheme","composeStyles","themedStyles","useTypeRole","DEFAULT_DELAY","DEFAULT_CLOSE_DELAY","MAX_WIDTH","stylesOf","colors","radii","spacing","create","label","color","inverseOnSurface","surface","backgroundColor","inverseSurface","borderRadius","xs","maxWidth","paddingHorizontal","sm","paddingVertical","pointerEvents","SurfaceProps","Pick","TooltipProps","anchor","isOpen","setPresent","present","testID","TooltipAlign","align","alignOffset","children","closeDelay","defaultOpen","delay","isDisabled","onOpenChange","ref","shouldCloseOnPress","side","TooltipSide","sideOffset","style","trigger","Tooltip","t0","$","_c","t1","t2","t3","t4","t5","t6","undefined","t7","state","hovered","pointer","t8","delayLongPress","hint","onHoverIn","current","open","onHoverOut","close","onLongPress","onPressIn","onPressOut","described","t9","t10","t11","TooltipSurface","styles","role","placement","motion","placed","onLayout","transformOrigin","T0","View","_c","NativeText"],"sources":["../../../src/components/tooltip/index.tsx"],"sourcesContent":["import type { ReactNode, Ref, RefObject } from 'react'\nimport type {\n HostInstance,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\n\nimport { useMemo, useRef, useState } from 'react'\nimport { Text as NativeText, StyleSheet } from 'react-native'\nimport Animated from 'react-native-reanimated'\nimport { useTooltipTriggerState } from 'react-stately/useTooltipTriggerState'\n\nimport type { ButtonTooltip } from '../../button/slots'\nimport type { OverlayAlign, OverlaySide } from '../../overlay'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { ButtonTooltipContext } from '../../button/slots'\nimport { Overlay, useAnchoredPlacement } from '../../overlay'\nimport { PANEL_ORIGINS, usePanelMotion } from '../../overlay/panel'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\n\n// kanso-ui's Tooltip, the tooltips page's plain tooltip: a container on\n// inverse surface with 8dp of padding at the ends and 4dp above and below,\n// holding a line of supporting text in body small on inverse on surface, so\n// one line is the page's 24dp. The page names a shape token without giving\n// its value, so it takes the extra-small corner, as web's does, and it lies\n// flat: the plain tooltip's tokens give no elevation. A long label wraps at\n// 320dp rather than running the width of the window.\n//\n// **It is placed by src/overlay's anchored placement**, in the overlay host\n// above the screen: on `side`, `top` unless told otherwise, lined up by\n// `align`, flipped to the opposite side at the edge of the window and kept\n// inside the safe area. It grows and fades in and out from the edge facing\n// the trigger as every anchored panel does, through src/overlay's panel\n// motion. It takes no press and draws no layer under it, so the screen stays\n// usable while it shows.\n//\n// **Touch has no hover, so a press held on the trigger for `delay` opens it**,\n// as Android's own tooltips open on a long press, and the press then ends\n// without pressing the trigger. A pointer resting on the trigger for `delay`\n// opens it as well, an iPad's or an Android mouse's. It closes `closeDelay`\n// after the pointer leaves, or after a held press ends while no pointer is on\n// the trigger, and at once on a press of the trigger unless\n// `shouldCloseOnPress` is off. `trigger=\"focus\"` leaves the pointer out, so\n// only the held press opens it. The state is React Stately's, the one web's\n// React Aria keeps, so once one tooltip has shown, the next a pointer rests on\n// opens at once, and only one shows at a time.\n//\n// **A screen reader never reaches the surface.** The label is the trigger's\n// accessibility hint instead, read after its name, which is what web's\n// `aria-describedby` gives a reader, and why the label is text.\n//\n// **The trigger is a Button, an IconButton or a FAB placed directly inside\n// it**, which takes the tooltip through src/button's slots.ts, as a\n// popover's trigger takes the popover. A tooltip and a popover or menu can\n// wrap the same button in either order.\n\n// How long a pointer rests on the trigger, or a press is held on it, before\n// the tooltip opens, and how long it stays once the pointer or the press has\n// gone, React Aria's own defaults, which web's takes.\nconst DEFAULT_DELAY = 1500\nconst DEFAULT_CLOSE_DELAY = 500\n\n// The widest it draws, web's cap.\nconst MAX_WIDTH = 320\n\nconst stylesOf = themedStyles(({ colors, radii, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n label: {\n color: colors.inverseOnSurface,\n },\n surface: {\n backgroundColor: colors.inverseSurface,\n borderRadius: radii.xs,\n maxWidth: MAX_WIDTH,\n paddingHorizontal: spacing.sm,\n paddingVertical: spacing.xs,\n pointerEvents: 'none',\n },\n }),\n)\n\ntype SurfaceProps = Pick<\n TooltipProps,\n 'align' | 'alignOffset' | 'label' | 'ref' | 'side' | 'sideOffset' | 'style'\n> & {\n readonly anchor: RefObject<HostInstance | null>\n readonly isOpen: boolean\n readonly setPresent: (present: boolean) => void\n readonly testID: string | undefined\n}\n\n/** Where the tooltip sits along the side it opens on. */\ntype TooltipAlign = OverlayAlign\n\ntype TooltipProps = {\n /**\n * Where the tooltip sits along the side it opens on. On `top` and\n * `bottom`, `start` and `end` follow a right-to-left layout.\n * @default 'center'\n */\n readonly align?: TooltipAlign\n /** Moves the tooltip along that side, in dp: right or down when positive. */\n readonly alignOffset?: number\n /**\n * The button the tooltip describes, and nothing else: a `Button`,\n * `IconButton` or `Fab`, or a `Popover` or `Menu` whose trigger is one.\n */\n readonly children?: ReactNode\n /**\n * How long the tooltip stays once the pointer has left the trigger, or a\n * held press has ended, in milliseconds.\n * @default 500\n */\n readonly closeDelay?: number\n /** Whether the tooltip starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /**\n * How long a pointer rests on the trigger, or a press is held on it,\n * before the tooltip opens, in milliseconds.\n * @default 1500\n */\n readonly delay?: number\n /**\n * Keeps the tooltip from opening, and its label off the trigger's hint.\n * @default false\n */\n readonly isDisabled?: boolean\n /** Whether the tooltip is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /**\n * What the tooltip says. Text, since it is also the trigger's\n * accessibility hint, which a screen reader reads after its name.\n */\n readonly label: string\n /** Called with the new state as the tooltip opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n readonly ref?: Ref<HostInstance>\n /**\n * Whether a press of the trigger closes the tooltip.\n * @default true\n */\n readonly shouldCloseOnPress?: boolean\n /**\n * Which side of the trigger the tooltip opens on. It flips to the opposite\n * side when there is no room.\n * @default 'top'\n */\n readonly side?: TooltipSide\n /**\n * The gap between the trigger and the tooltip, in dp.\n * @default spacing.sm\n */\n readonly sideOffset?: number\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n /**\n * `focus` leaves a pointer resting on the trigger out, so only a press\n * held on it opens the tooltip.\n */\n readonly trigger?: 'focus'\n}\n\n/** Which side of the trigger the tooltip opens on. */\ntype TooltipSide = OverlaySide\n\n/**\n * A label for the button it wraps, the tooltips spec page's plain tooltip,\n * shown while a press is held on the button or a pointer rests on it.\n *\n * ```tsx\n * <Tooltip label=\"Search\">\n * <IconButton aria-label=\"Search\">\n * <SearchGlyph />\n * </IconButton>\n * </Tooltip>\n * ```\n *\n * Pass `isOpen` with `onOpenChange` to hold the open state, or `defaultOpen`\n * to let it keep its own, and `delay` and `closeDelay` for how long it waits\n * before it opens and closes. What it says has to repeat what the button\n * already means, since a screen reader hears it as the button's hint and\n * touch only shows it to someone who holds a press: anything with a button\n * in it, or worth reading twice, is a `Popover`.\n *\n * `style`, `ref` and `testID` land on the tooltip itself.\n */\nfunction Tooltip({\n align = 'center',\n alignOffset,\n children,\n closeDelay = DEFAULT_CLOSE_DELAY,\n defaultOpen,\n delay = DEFAULT_DELAY,\n isDisabled = false,\n isOpen,\n label,\n onOpenChange,\n ref,\n shouldCloseOnPress = true,\n side = 'top',\n sideOffset,\n style,\n testID,\n trigger,\n}: TooltipProps) {\n const state = useTooltipTriggerState({\n closeDelay,\n defaultOpen,\n delay,\n isOpen,\n onOpenChange,\n })\n const anchor = useRef<HostInstance>(null)\n const hovered = useRef(false)\n const [present, setPresent] = useState(state.isOpen)\n const pointer = trigger !== 'focus'\n // What the trigger takes on: the pointer resting on it and leaving it, the\n // held press that opens the tooltip, and a press that closes it, at once as\n // it starts and after `closeDelay` as a held one ends, unless a pointer\n // still rests on the trigger, which keeps it until the pointer leaves.\n const described = useMemo<ButtonTooltip | null>(\n () =>\n isDisabled\n ? null\n : {\n delayLongPress: delay,\n hint: label,\n onHoverIn: pointer\n ? () => {\n hovered.current = true\n state.open(false)\n }\n : undefined,\n onHoverOut: pointer\n ? () => {\n hovered.current = false\n state.close(false)\n }\n : undefined,\n onLongPress: () => {\n state.open(true)\n },\n onPressIn: shouldCloseOnPress\n ? () => {\n state.close(true)\n }\n : undefined,\n onPressOut: () => {\n if (!hovered.current) {\n state.close(false)\n }\n },\n ref: anchor,\n },\n [delay, isDisabled, label, pointer, shouldCloseOnPress, state],\n )\n\n // Mounted the moment it opens, and kept until its exit has run.\n if (state.isOpen && !present) {\n setPresent(true)\n }\n\n return (\n <>\n <ButtonTooltipContext value={described}>{children}</ButtonTooltipContext>\n {present ? (\n <Overlay>\n <TooltipSurface\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n isOpen={state.isOpen}\n label={label}\n ref={ref}\n setPresent={setPresent}\n side={side}\n sideOffset={sideOffset}\n style={style}\n testID={testID}\n />\n </Overlay>\n ) : null}\n </>\n )\n}\n\n// The tooltip itself, drawn in the overlay host and placed beside the\n// trigger once it has reported its size.\nfunction TooltipSurface({\n align,\n alignOffset,\n anchor,\n isOpen,\n label,\n ref,\n setPresent,\n side,\n sideOffset,\n style,\n testID,\n}: SurfaceProps) {\n const styles = stylesOf(useTheme())\n const role = useTypeRole('bodySmall')\n const placement = useAnchoredPlacement({\n align,\n alignOffset,\n anchor,\n side,\n sideOffset,\n })\n const motion = usePanelMotion(isOpen, placement.placed, setPresent)\n\n return (\n <Animated.View\n aria-hidden\n onLayout={placement.onLayout}\n ref={ref}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.surface,\n placement.style,\n { transformOrigin: PANEL_ORIGINS[placement.side] },\n motion,\n style,\n )}\n testID={testID}\n >\n <NativeText style={composeStyles<TextStyle>(role, styles.label)}>\n {label}\n </NativeText>\n </Animated.View>\n )\n}\n\nexport { Tooltip }\nexport type { TooltipAlign, TooltipProps, TooltipSide }\n"],"mappings":";;;;;;;;;;;;;;AAgEA,MAAM6B,gBAAgB;AACtB,MAAMC,sBAAsB;AAG5B,MAAMC,YAAY;AAElB,MAAMC,WAAWL,cAAc,EAAEM,QAAQC,OAAOC,cAC9CtB,WAAWuB,OAAO;CAChBC,OAAO,EACLC,OAAOL,OAAOM,iBAChB;CACAC,SAAS;EACPC,iBAAiBR,OAAOS;EACxBC,cAAcT,MAAMU;EACpBC,UAAUd;EACVe,mBAAmBX,QAAQY;EAC3BC,iBAAiBb,QAAQS;EACzBK,eAAe;CACjB;AACF,CAAC,CACH;;;;;;;;;;;;;;;;;;;;;;AA2GA,SAAAyB,QAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAiB,MAAA,EAAAlB,OAAAmB,IAAAlB,aAAAC,UAAAC,YAAAiB,IAAAhB,aAAAC,OAAAgB,IAAAf,YAAAgB,IAAA3B,QAAAjB,OAAA6B,cAAAC,KAAAC,oBAAAc,IAAAb,MAAAc,IAAAZ,YAAAC,OAAAf,QAAAgB,YAAAE;CACf,MAAAhB,QAAAmB,OAAAM,KAAAA,IAAA,WAAAN;CAGA,MAAAhB,aAAAiB,OAAAK,KAAAA,IAAAtD,sBAAAiD;CAEA,MAAAf,QAAAgB,OAAAI,KAAAA,IAAAvD,gBAAAmD;CACA,MAAAf,aAAAgB,OAAAG,KAAAA,IAAA,QAAAH;CAKA,MAAAb,qBAAAc,OAAAE,KAAAA,IAAA,OAAAF;CACA,MAAAb,OAAAc,OAAAC,KAAAA,IAAA,QAAAD;CAAY,IAAAE;CAAA,IAAAT,EAA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;EAAApC,EAAA,KAAAvC;EAAAuC,EAAA,KAAAO;EAAAP,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,QAAA+B,UAAAG,YAAAlC,EAAA,QAAAT,OAAAS,EAAA,QAAAG,GAAAkC,QAAArC,EAAA,QAAAM,MAAAN,EAAA,QAAAS,MAAAT,EAAA,QAAAnB,QAAA;EAffgC,KAAA,oBAAA,GAAA,MAAA;GACE,eAAAT;GACU,UAAAC;GACLd;GACE,OAAAe;GAOCzB;GAER4B,UAAAA;EAGF,CAAA;EAAgBT,EAAA,MAAA+B,UAAAG;EAAAlC,EAAA,MAAAT;EAAAS,EAAA,MAAAG,GAAAkC;EAAArC,EAAA,MAAAM;EAAAN,EAAA,MAAAS;EAAAT,EAAA,MAAAnB;EAAAmB,EAAA,MAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,OAhBhBa;AAgBgB"}
1
+ {"version":3,"file":"index.js","names":["ReactNode","Ref","RefObject","HostInstance","StyleProp","TextStyle","ViewStyle","AnimatedStyle","useMemo","useRef","useState","Text","NativeText","StyleSheet","Animated","useTooltipTriggerState","ButtonTooltip","OverlayAlign","OverlaySide","ResolvedTheme","ButtonTooltipContext","Overlay","useAnchoredPlacement","PANEL_ORIGINS","usePanelMotion","useTheme","composeStyles","themedStyles","useTypeRole","DEFAULT_DELAY","DEFAULT_CLOSE_DELAY","MAX_WIDTH","stylesOf","colors","radii","spacing","create","label","color","inverseOnSurface","surface","backgroundColor","inverseSurface","borderRadius","xs","maxWidth","paddingHorizontal","sm","paddingVertical","pointerEvents","SurfaceProps","Pick","TooltipProps","anchor","isOpen","setPresent","present","testID","TooltipAlign","align","alignOffset","children","closeDelay","defaultOpen","delay","isDisabled","onOpenChange","ref","shouldCloseOnPress","side","TooltipSide","sideOffset","style","trigger","Tooltip","t0","$","_c","t1","t2","t3","t4","t5","t6","undefined","t7","state","hovered","pointer","t8","delayLongPress","hint","onHoverIn","current","open","onHoverOut","close","onLongPress","onPressIn","onPressOut","described","t9","t10","t11","TooltipSurface","styles","role","placement","motion","placed","onLayout","transformOrigin","T0","View","_c","NativeText"],"sources":["../../../src/components/tooltip/index.tsx"],"sourcesContent":["import type { ReactNode, Ref, RefObject } from 'react'\nimport type {\n HostInstance,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\n\nimport { useMemo, useRef, useState } from 'react'\nimport { Text as NativeText, StyleSheet } from 'react-native'\nimport Animated from 'react-native-reanimated'\nimport { useTooltipTriggerState } from 'react-stately/useTooltipTriggerState'\n\nimport type { ButtonTooltip } from '../../button/slots'\nimport type { OverlayAlign, OverlaySide } from '../../overlay'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { ButtonTooltipContext } from '../../button/slots'\nimport { Overlay, useAnchoredPlacement } from '../../overlay'\nimport { PANEL_ORIGINS, usePanelMotion } from '../../overlay/panel'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\n\n// kanso-ui's Tooltip, the tooltips page's plain tooltip: a container on\n// inverse surface with 8dp of padding at the ends and 4dp above and below,\n// holding a line of supporting text in body small on inverse on surface, so\n// one line is the page's 24dp. The page names a shape token without giving\n// its value, so it takes the extra-small corner, as web's does, and it lies\n// flat: the plain tooltip's tokens give no elevation. A long label wraps at\n// 320dp rather than running the width of the window.\n//\n// **It is placed by src/overlay's anchored placement**, in the overlay host\n// above the screen: on `side`, `top` unless told otherwise, lined up by\n// `align`, flipped to the opposite side at the edge of the window and kept\n// inside the safe area. It grows and fades in and out from the edge facing\n// the trigger as every anchored panel does, through src/overlay's panel\n// motion. It takes no press and draws no layer under it, so the screen stays\n// usable while it shows.\n//\n// **Touch has no hover, so a press held on the trigger for `delay` opens it**,\n// as Android's own tooltips open on a long press, and the press then ends\n// without pressing the trigger. A pointer resting on the trigger for `delay`\n// opens it as well, an iPad's or an Android mouse's. It closes `closeDelay`\n// after the pointer leaves, or after a held press ends while no pointer is on\n// the trigger, and at once on a press of the trigger unless\n// `shouldCloseOnPress` is off. `trigger=\"focus\"` leaves the pointer out, so\n// only the held press opens it. The state is React Stately's, the one web's\n// React Aria keeps, so once one tooltip has shown, the next a pointer rests on\n// opens at once, and only one shows at a time.\n//\n// **A screen reader never reaches the surface.** The label is the trigger's\n// accessibility hint instead, read after its name, which is what web's\n// `aria-describedby` gives a reader, and why the label is text.\n//\n// **The trigger is a Button, an IconButton, a FAB or a Chip placed directly\n// inside it**, which takes the tooltip through src/button's slots.ts, as a\n// popover's trigger takes the popover. A tooltip and a popover or menu can\n// wrap the same button in either order.\n\n// How long a pointer rests on the trigger, or a press is held on it, before\n// the tooltip opens, and how long it stays once the pointer or the press has\n// gone, React Aria's own defaults, which web's takes.\nconst DEFAULT_DELAY = 1500\nconst DEFAULT_CLOSE_DELAY = 500\n\n// The widest it draws, web's cap.\nconst MAX_WIDTH = 320\n\nconst stylesOf = themedStyles(({ colors, radii, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n label: {\n color: colors.inverseOnSurface,\n },\n surface: {\n backgroundColor: colors.inverseSurface,\n borderRadius: radii.xs,\n maxWidth: MAX_WIDTH,\n paddingHorizontal: spacing.sm,\n paddingVertical: spacing.xs,\n pointerEvents: 'none',\n },\n }),\n)\n\ntype SurfaceProps = Pick<\n TooltipProps,\n 'align' | 'alignOffset' | 'label' | 'ref' | 'side' | 'sideOffset' | 'style'\n> & {\n readonly anchor: RefObject<HostInstance | null>\n readonly isOpen: boolean\n readonly setPresent: (present: boolean) => void\n readonly testID: string | undefined\n}\n\n/** Where the tooltip sits along the side it opens on. */\ntype TooltipAlign = OverlayAlign\n\ntype TooltipProps = {\n /**\n * Where the tooltip sits along the side it opens on. On `top` and\n * `bottom`, `start` and `end` follow a right-to-left layout.\n * @default 'center'\n */\n readonly align?: TooltipAlign\n /** Moves the tooltip along that side, in dp: right or down when positive. */\n readonly alignOffset?: number\n /**\n * The button the tooltip describes, and nothing else: a `Button`,\n * `IconButton`, `Fab` or `Chip`, or a `Popover` or `Menu` whose trigger is\n * one.\n */\n readonly children?: ReactNode\n /**\n * How long the tooltip stays once the pointer has left the trigger, or a\n * held press has ended, in milliseconds.\n * @default 500\n */\n readonly closeDelay?: number\n /** Whether the tooltip starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /**\n * How long a pointer rests on the trigger, or a press is held on it,\n * before the tooltip opens, in milliseconds.\n * @default 1500\n */\n readonly delay?: number\n /**\n * Keeps the tooltip from opening, and its label off the trigger's hint.\n * @default false\n */\n readonly isDisabled?: boolean\n /** Whether the tooltip is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /**\n * What the tooltip says. Text, since it is also the trigger's\n * accessibility hint, which a screen reader reads after its name.\n */\n readonly label: string\n /** Called with the new state as the tooltip opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n readonly ref?: Ref<HostInstance>\n /**\n * Whether a press of the trigger closes the tooltip.\n * @default true\n */\n readonly shouldCloseOnPress?: boolean\n /**\n * Which side of the trigger the tooltip opens on. It flips to the opposite\n * side when there is no room.\n * @default 'top'\n */\n readonly side?: TooltipSide\n /**\n * The gap between the trigger and the tooltip, in dp.\n * @default spacing.sm\n */\n readonly sideOffset?: number\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n /**\n * `focus` leaves a pointer resting on the trigger out, so only a press\n * held on it opens the tooltip.\n */\n readonly trigger?: 'focus'\n}\n\n/** Which side of the trigger the tooltip opens on. */\ntype TooltipSide = OverlaySide\n\n/**\n * A label for the button it wraps, the tooltips spec page's plain tooltip,\n * shown while a press is held on the button or a pointer rests on it.\n *\n * ```tsx\n * <Tooltip label=\"Search\">\n * <IconButton aria-label=\"Search\">\n * <SearchGlyph />\n * </IconButton>\n * </Tooltip>\n * ```\n *\n * Pass `isOpen` with `onOpenChange` to hold the open state, or `defaultOpen`\n * to let it keep its own, and `delay` and `closeDelay` for how long it waits\n * before it opens and closes. What it says has to repeat what the button\n * already means, since a screen reader hears it as the button's hint and\n * touch only shows it to someone who holds a press: anything with a button\n * in it, or worth reading twice, is a `Popover`.\n *\n * `style`, `ref` and `testID` land on the tooltip itself.\n */\nfunction Tooltip({\n align = 'center',\n alignOffset,\n children,\n closeDelay = DEFAULT_CLOSE_DELAY,\n defaultOpen,\n delay = DEFAULT_DELAY,\n isDisabled = false,\n isOpen,\n label,\n onOpenChange,\n ref,\n shouldCloseOnPress = true,\n side = 'top',\n sideOffset,\n style,\n testID,\n trigger,\n}: TooltipProps) {\n const state = useTooltipTriggerState({\n closeDelay,\n defaultOpen,\n delay,\n isOpen,\n onOpenChange,\n })\n const anchor = useRef<HostInstance>(null)\n const hovered = useRef(false)\n const [present, setPresent] = useState(state.isOpen)\n const pointer = trigger !== 'focus'\n // What the trigger takes on: the pointer resting on it and leaving it, the\n // held press that opens the tooltip, and a press that closes it, at once as\n // it starts and after `closeDelay` as a held one ends, unless a pointer\n // still rests on the trigger, which keeps it until the pointer leaves.\n const described = useMemo<ButtonTooltip | null>(\n () =>\n isDisabled\n ? null\n : {\n delayLongPress: delay,\n hint: label,\n onHoverIn: pointer\n ? () => {\n hovered.current = true\n state.open(false)\n }\n : undefined,\n onHoverOut: pointer\n ? () => {\n hovered.current = false\n state.close(false)\n }\n : undefined,\n onLongPress: () => {\n state.open(true)\n },\n onPressIn: shouldCloseOnPress\n ? () => {\n state.close(true)\n }\n : undefined,\n onPressOut: () => {\n if (!hovered.current) {\n state.close(false)\n }\n },\n ref: anchor,\n },\n [delay, isDisabled, label, pointer, shouldCloseOnPress, state],\n )\n\n // Mounted the moment it opens, and kept until its exit has run.\n if (state.isOpen && !present) {\n setPresent(true)\n }\n\n return (\n <>\n <ButtonTooltipContext value={described}>{children}</ButtonTooltipContext>\n {present ? (\n <Overlay>\n <TooltipSurface\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n isOpen={state.isOpen}\n label={label}\n ref={ref}\n setPresent={setPresent}\n side={side}\n sideOffset={sideOffset}\n style={style}\n testID={testID}\n />\n </Overlay>\n ) : null}\n </>\n )\n}\n\n// The tooltip itself, drawn in the overlay host and placed beside the\n// trigger once it has reported its size.\nfunction TooltipSurface({\n align,\n alignOffset,\n anchor,\n isOpen,\n label,\n ref,\n setPresent,\n side,\n sideOffset,\n style,\n testID,\n}: SurfaceProps) {\n const styles = stylesOf(useTheme())\n const role = useTypeRole('bodySmall')\n const placement = useAnchoredPlacement({\n align,\n alignOffset,\n anchor,\n side,\n sideOffset,\n })\n const motion = usePanelMotion(isOpen, placement.placed, setPresent)\n\n return (\n <Animated.View\n aria-hidden\n onLayout={placement.onLayout}\n ref={ref}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.surface,\n placement.style,\n { transformOrigin: PANEL_ORIGINS[placement.side] },\n motion,\n style,\n )}\n testID={testID}\n >\n <NativeText style={composeStyles<TextStyle>(role, styles.label)}>\n {label}\n </NativeText>\n </Animated.View>\n )\n}\n\nexport { Tooltip }\nexport type { TooltipAlign, TooltipProps, TooltipSide }\n"],"mappings":";;;;;;;;;;;;;;AAgEA,MAAM6B,gBAAgB;AACtB,MAAMC,sBAAsB;AAG5B,MAAMC,YAAY;AAElB,MAAMC,WAAWL,cAAc,EAAEM,QAAQC,OAAOC,cAC9CtB,WAAWuB,OAAO;CAChBC,OAAO,EACLC,OAAOL,OAAOM,iBAChB;CACAC,SAAS;EACPC,iBAAiBR,OAAOS;EACxBC,cAAcT,MAAMU;EACpBC,UAAUd;EACVe,mBAAmBX,QAAQY;EAC3BC,iBAAiBb,QAAQS;EACzBK,eAAe;CACjB;AACF,CAAC,CACH;;;;;;;;;;;;;;;;;;;;;;AA4GA,SAAAyB,QAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAiB,MAAA,EAAAlB,OAAAmB,IAAAlB,aAAAC,UAAAC,YAAAiB,IAAAhB,aAAAC,OAAAgB,IAAAf,YAAAgB,IAAA3B,QAAAjB,OAAA6B,cAA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CACU,MAAAC,KAAA0B,UAASG;CAEZ,MAAA5B,KAAAxD,cACL+E,OAAMjE,SACNmE,UAASnC,OACT,EAAAuC,iBAAmBxF,cAAcoF,UAAStC,MAAO,GACjDuC,QACApC,KACF;CAGC,MAAAwC,KAAApG;CAAkB,MAAAuE,KAAAzD,cAAyBgF,MAAMD,OAAMpE,KAAM;CAAC,IAAAgD;CAAA,IAAAT,EAAA,OAAAoC,MAAApC,EAAA,OAAAvC,SAAAuC,EAAA,OAAAO,IAAA;EAA/DE,KAAA,oBAAC,IAAD;GAAmB,OAAAF;GAChB9C,UAAAA;EADQ,CAAA;EAEEuC,EAAA,KAAAoC;EAAApC,EAAA,KAAAvC;EAAAuC,EAAA,KAAAO;EAAAP,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,QAAA+B,UAAAG,YAAAlC,EAAA,QAAAT,OAAAS,EAAA,QAAAG,GAAAkC,QAAArC,EAAA,QAAAM,MAAAN,EAAA,QAAAS,MAAAT,EAAA,QAAAnB,QAAA;EAffgC,KAAA,oBAAA,GAAA,MAAA;GACE,eAAAT;GACU,UAAAC;GACLd;GACE,OAAAe;GAOCzB;GAER4B,UAAAA;EAGF,CAAA;EAAgBT,EAAA,MAAA+B,UAAAG;EAAAlC,EAAA,MAAAT;EAAAS,EAAA,MAAAG,GAAAkC;EAAArC,EAAA,MAAAM;EAAAN,EAAA,MAAAS;EAAAT,EAAA,MAAAnB;EAAAmB,EAAA,MAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,OAhBhBa;AAgBgB"}
@@ -753,6 +753,55 @@ function FieldValue(t0) {
753
753
  return t5;
754
754
  }
755
755
  /**
756
+ * What a field holds on lines that wrap, on the value's line of a
757
+ * {@link FieldBox}: a token field's pills, with its control after them. It
758
+ * clears the label at the top where the box is filled, once for every line,
759
+ * as a control does, and the control inside takes the box's states without
760
+ * clearing it again.
761
+ */
762
+ function FieldWrap(t0) {
763
+ const $ = c(9);
764
+ const { children } = t0;
765
+ const box = use(BoxContext);
766
+ const theme = useTheme();
767
+ const styles = fieldStylesOf(theme);
768
+ const { fontScale } = useWindowDimensions();
769
+ let t1;
770
+ if ($[0] !== box) {
771
+ t1 = {
772
+ ...box,
773
+ underLabel: false
774
+ };
775
+ $[0] = box;
776
+ $[1] = t1;
777
+ } else t1 = $[1];
778
+ const inside = t1;
779
+ const T0 = View;
780
+ const t2 = composeStyles(styles.wrap, box.underLabel ? marginTopOf(theme.typography.bodySmallLineHeight * fontScale) : void 0);
781
+ let t3;
782
+ if ($[2] !== children || $[3] !== inside) {
783
+ t3 = /* @__PURE__ */ jsx(BoxContext, {
784
+ value: inside,
785
+ children
786
+ });
787
+ $[2] = children;
788
+ $[3] = inside;
789
+ $[4] = t3;
790
+ } else t3 = $[4];
791
+ let t4;
792
+ if ($[5] !== T0 || $[6] !== t2 || $[7] !== t3) {
793
+ t4 = /* @__PURE__ */ jsx(T0, {
794
+ style: t2,
795
+ children: t3
796
+ });
797
+ $[5] = T0;
798
+ $[6] = t2;
799
+ $[7] = t3;
800
+ $[8] = t4;
801
+ } else t4 = $[8];
802
+ return t4;
803
+ }
804
+ /**
756
805
  * Tracks whether the control has focus, around the handlers the field was
757
806
  * given, which are called after.
758
807
  */
@@ -1202,6 +1251,6 @@ function widthTo(onMeasure) {
1202
1251
  };
1203
1252
  }
1204
1253
  //#endregion
1205
- export { FieldBox, FieldChevron, FieldInput, FieldMessage, FieldSegments, FieldStates, FieldStroke, FieldValue, describedBy, descriptionOf, useErrorAnnouncement, useFieldFocus, useStrokeMotion };
1254
+ export { FieldBox, FieldChevron, FieldInput, FieldMessage, FieldSegments, FieldStates, FieldStroke, FieldValue, FieldWrap, describedBy, descriptionOf, useErrorAnnouncement, useFieldFocus, useStrokeMotion };
1206
1255
 
1207
1256
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","RefObject","HostInstance","LayoutChangeEvent","StyleProp","TextInputProps","TextStyle","ViewProps","ViewStyle","AnimatedStyle","DerivedValue","createContext","use","useEffect","useId","useMemo","useRef","useState","AccessibilityInfo","Text","NativeText","Platform","Pressable","TextInput","useWindowDimensions","View","Animated","Easing","useAnimatedStyle","useDerivedValue","useReducedMotion","withTiming","Focusable","IconStyle","ResolvedTheme","useInsideForm","IconStyleContext","limitFor","useLocaleOf","formatCount","usePressFeedback","withOpacity","useTheme","composeStyles","useFontFamily","useTypeRole","fieldStylesOf","BoxControl","disabled","floated","invalid","label","required","underLabel","DescribedBy","Pick","FieldBoxProps","children","control","end","floatingLabel","isDisabled","isFocused","isInvalid","isPopulated","isRequired","leading","ref","trailing","trigger","FieldTriggerProps","variant","FieldVariant","FieldDescriptionPart","id","text","FieldInputProps","Omit","autosize","chosen","described","multiline","numeric","prefix","rows","suffix","FieldMessageProps","characterCount","characterLimitLabel","description","error","length","maxLength","FieldState","focused","hovered","FieldStatesProps","FieldStrokeProps","StrokeMotion","sides","style","onBlur","onFocus","onPress","testID","FieldValueProps","isPlaceholder","LabelPlace","fontSize","letterSpacing","lineHeight","top","color","width","WebState","ICON_SIZE","OUTSIDE_BOX","BoxContext","SegmentsLineContext","NO_PARTS","describedBy","locale","ids","idsOf","message","undefined","limit","limitOf","FieldBox","t0","$","_c","t1","t2","t3","t4","t5","t6","t7","theme","styles","fontScale","notch","setNotch","colors","radii","spacing","stateLayerOpacity","typography","t8","xs","borderTopEndRadius","borderTopStartRadius","t9","onSurface","corners","disableRipple","feedback","outlined","t10","state","rule","useRuleMotion","t11","t12","boxControlOf","boxControl","t13","disabledContent","T0","t14","NOT_A_CONTROL","triggerOf","t15","handlers","onHoverIn","t16","onHoverOut","t17","focusOf","t18","box","boxTrigger","boxLeading","boxTrailing","boxOutlined","boxDisabled","minHeightOf","lg","bodyLargeLineHeight","sm","bodySmallLineHeight","t19","outline","outlineStart","widthOf","outlineInset","outlineStartBox","outlineNotch","outlineNotchBox","outlineEnd","minWidthOf","outlineEndBox","layer","indicator","t20","onSurfaceVariant","icon","iconStyleOf","t21","t22","t23","t24","column","t25","t26","FieldInput","props","role","mono","fontFamilyMono","content","caret","primary","muted","affixed","holdsChosen","clearance","marginTopOf","affixStyle","colorOf","lines","copied","OS","extent","heightOf","descriptionOf","affixPart","webStateOf","INHERITS_DIRECTION","input","numericOf","inputMultiline","inputOverCopy","CHOSEN_ROOM","bodyLargeSize","copy","value","affixLine","SHRINKS","FieldMessage","insideForm","collapsed","messageStyle","useErrorAnnouncement","messageLine","messageLineCollapsed","OUT_OF_FLOW","ATOMIC","HIDDEN","NOT_DRAWN","counter","countOf","FieldSegments","onLine","segments","FieldStates","states","FieldValue","useFieldFocus","setFocused","event","event_0","const","dir","accessible","focusable","display","position","flexShrink","Affix","motion","reduceMotion","opacity","timing","duration","durationShort3","easing","bezier","easingStandard","fade","affix","String","BoxLabel","large","small","smallRole","place","bodyLargeTracking","motionStyle","labelOutlined","labelTextOutlined","REQUIRED_MARK","parts","map","part","join","said","filter","accessibilityHint","current","focus","height","size","marginTop","minHeight","minWidth","NotchMeasure","onMeasure","notchMeasure","T1","widthTo","fontFamily","fontVariant","md","FieldStroke","stroke","borderColor","get","borderWidth","borderTopWidth","_onPress","announceForAccessibility","onErrorContainer","disabledContainer","useStrokeMotion","durationShort2","nativeEvent","layout","FieldChevron","_c","state","NativeText","color"],"sources":["../../src/field/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref, RefObject } from 'react'\nimport type {\n HostInstance,\n LayoutChangeEvent,\n StyleProp,\n TextInputProps,\n TextStyle,\n ViewProps,\n ViewStyle,\n} from 'react-native'\nimport type { AnimatedStyle, DerivedValue } from 'react-native-reanimated'\n\nimport {\n createContext,\n use,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport {\n AccessibilityInfo,\n Text as NativeText,\n Platform,\n Pressable,\n TextInput,\n useWindowDimensions,\n View,\n} from 'react-native'\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useDerivedValue,\n useReducedMotion,\n withTiming,\n} from 'react-native-reanimated'\n\nimport type { Focusable } from '../form'\nimport type { IconStyle } from '../glyphs/icon-style'\nimport type { ResolvedTheme } from '../theme/scope'\n\nimport { useInsideForm } from '../form'\nimport { IconStyleContext } from '../glyphs/icon-style'\nimport { limitFor } from '../i18n'\nimport { useLocaleOf } from '../i18n/provider'\nimport { formatCount } from '../number/count'\nimport { usePressFeedback } from '../press'\nimport { withOpacity } from '../theme/color'\nimport { useTheme } from '../theme/scope'\nimport { composeStyles } from '../theme/styles'\nimport { useFontFamily } from '../typography/fonts'\nimport { useTypeRole } from '../typography/roles'\nimport { fieldStylesOf } from './styles'\n\n// The chrome every field shares, as on web: the box with its label, the\n// control inside it, and the line of supporting text under it. Each field is\n// the parts it renders inside a root of its own, and these are not exported\n// from the package.\n//\n// The text fields page draws two boxes. The filled one carries surface\n// container highest with an active indicator along its bottom, 1dp in the\n// outline role at rest and 2dp in primary while focused, and its label floats\n// within it. The outlined one has no fill and a 1dp outline all round that\n// thickens the same way, and its label floats up onto the outline, cutting a\n// notch in it.\n//\n// **The label floats by changing its type and its place**, eased by\n// Reanimated over `durationShort3` on the standard curve, as web transitions\n// them: body large on the value's line while the field is empty and\n// unfocused, body small at the top once it is focused or holds a value.\n// `floatingLabel={false}` keeps it small at the top in label medium, as web's\n// fixed label is. Under reduced motion it moves at once.\n//\n// **The box grows with the device's text size.** Its height is a floor rather\n// than a height, the padding above and below plus the lines it holds, and the\n// lines are the type tokens' line heights at the device's font scale, which\n// is what React Native draws the text at. So the 56dp the page gives is the\n// floor at the default text size, and a larger one makes the box taller\n// rather than running the value out of it.\n//\n// **The outline is drawn from views**, since there is no fieldset to cut it:\n// three pieces in a row, the stretch before the label, the notch under it,\n// which draws only the bottom of the outline, and the stretch after it. The\n// notch is the label's width in its floated type, measured from a copy of it\n// out of sight, as web's legend holds one. Before the label floats it is\n// closed, and the two stretches meet.\n//\n// **A pointer over the filled box draws the state layer**, the one every\n// control draws through `usePressFeedback`, on surface at the hover opacity,\n// and turns the indicator on surface, as the page's hovered state does; one\n// over the outlined box turns the outline on surface. Web's filled box draws\n// neither. Focus wins over hover, and an error takes the\n// error role, or on error container under a pointer.\n//\n// **Disabled is the page's colour at an opacity, translucent**: the filled\n// container and the rule are on surface at the `disabledContainer` opacity,\n// and the label, the value and the icons on surface at `disabledContent`,\n// over whatever the field sits on rather than mixed over the surface role as\n// web's are.\n\n// What a control needs to know about the box around it: how the label is\n// drawn, whether the control clears it, and the states it takes its colours\n// from.\ntype BoxControl = {\n readonly disabled: boolean\n readonly floated: boolean\n readonly invalid: boolean\n readonly label: 'fixed' | 'floating' | 'none'\n readonly required: boolean\n readonly underLabel: boolean\n}\n\ntype DescribedBy = Pick<ViewProps, 'accessibilityHint'> & {\n readonly 'aria-describedby'?: string\n}\n\ntype FieldBoxProps = {\n readonly children?: ReactNode\n /**\n * The control the box focuses when it is pressed anywhere, as the whole\n * of a native text field's box takes a press.\n */\n readonly control?: RefObject<Focusable | null>\n /**\n * What the box holds after the label and the control's column, drawn as\n * it is rather than in an icon's slot, for a part laid out against the\n * box's own edges: a number field's steppers. The column, and the label\n * in it, end where this starts, 16dp before it.\n */\n readonly end?: ReactNode\n /**\n * Whether the label sits in the empty box and floats to the top once the\n * field is focused or holds a value. `false` keeps it small at the top.\n * @default true\n */\n readonly floatingLabel?: boolean\n /** @default false */\n readonly isDisabled?: boolean\n /** Whether the control has focus, which the box draws. */\n readonly isFocused?: boolean\n /** @default false */\n readonly isInvalid?: boolean\n /** Whether the control holds anything, which floats the label. */\n readonly isPopulated?: boolean\n /**\n * Marks the label with an asterisk, as the text fields page marks a field\n * that must be filled.\n * @default false\n */\n readonly isRequired?: boolean\n /** What the field is for. */\n readonly label: string\n /** An icon at the start of the box, before the label and the control. */\n readonly leading?: ReactNode\n /**\n * The box itself, which a field opening a list from it measures to place\n * the list.\n */\n readonly ref?: Ref<HostInstance>\n /** An icon at the end of the box, after the control. */\n readonly trailing?: ReactNode\n /**\n * Makes the box itself the control, for a field holding something chosen\n * rather than typed: a button a screen reader reads by `aria-label`, which\n * a press anywhere on the box runs, in place of a `control` to focus.\n */\n readonly trigger?: FieldTriggerProps\n /** @default 'filled' */\n readonly variant?: FieldVariant\n}\n\n/**\n * One piece of what describes a field's control: the text a screen reader\n * hears on iOS and Android, and the id of the element showing it, which the\n * control points at under React Native Web.\n */\ntype FieldDescriptionPart = {\n readonly id: string\n readonly text: string\n}\n\ntype FieldInputProps = Omit<\n TextInputProps,\n | 'accessibilityHint'\n | 'cursorColor'\n | 'multiline'\n | 'numberOfLines'\n | 'placeholderTextColor'\n | 'rows'\n | 'selectionColor'\n | 'style'\n | 'underlineColorAndroid'\n> & {\n /**\n * Whether a multi-line control grows with the text it holds, from `rows`\n * up. `false` holds it at `rows` and scrolls the text inside.\n * @default true\n */\n readonly autosize?: boolean\n /**\n * The options a field holding several has chosen, written as one list,\n * drawn before the control on its line in the value's own role and cut\n * short with an ellipsis where the line runs out. The control keeps three\n * characters' width beside them at the least, so there is always\n * somewhere to type, and is described by them first.\n */\n readonly chosen?: string\n /** What describes the control, after its prefix and suffix. */\n readonly described?: readonly FieldDescriptionPart[]\n /**\n * Whether the control holds several lines rather than one, the return key\n * starting a new one.\n * @default false\n */\n readonly multiline?: boolean\n /**\n * The value in the mono face with tabular figures.\n * @default false\n */\n readonly numeric?: boolean\n /** Text before the value on its line. */\n readonly prefix?: ReactNode\n readonly ref?: Ref<ComponentRef<typeof TextInput>>\n /**\n * How many lines a multi-line control shows: the least it shows while it\n * grows, or all it shows when it does not.\n * @default 1\n */\n readonly rows?: number\n /** Text after the value on its line. */\n readonly suffix?: ReactNode\n}\n\ntype FieldMessageProps = {\n /**\n * Counts the characters, against `maxLength` where there is one.\n * @default false\n */\n readonly characterCount?: boolean\n /** How the limit is said to a screen reader. */\n readonly characterLimitLabel?: string | undefined\n /** The hint, which the error replaces while there is one. */\n readonly description?: string | undefined\n /** The problem with the value, in words. */\n readonly error?: string | undefined\n /** The field's id, as handed to {@link describedBy}. */\n readonly id: string\n /** How many characters the control holds. */\n readonly length?: number\n readonly maxLength?: number | undefined\n}\n\ntype FieldState = {\n readonly disabled: boolean\n readonly focused: boolean\n readonly hovered: boolean\n readonly invalid: boolean\n}\n\ntype FieldStatesProps = {\n readonly children?: ReactNode\n /** @default false */\n readonly isDisabled?: boolean\n /** @default false */\n readonly isInvalid?: boolean\n /** @default false */\n readonly isRequired?: boolean\n}\n\ntype FieldStrokeProps = StrokeMotion & {\n /** Every side of the view, or the top alone. */\n readonly sides: 'all' | 'top'\n readonly style: StyleProp<ViewStyle>\n}\n\n/**\n * What a box that is itself the control is read and pressed as: web's\n * `FieldTrigger`, which covers the box with one press target.\n */\ntype FieldTriggerProps = {\n /** Whether what the box opens is open, which a screen reader reads. */\n readonly 'aria-expanded'?: boolean\n /** The name a screen reader reads: the label, then the value shown. */\n readonly 'aria-label': string\n /** What describes the box, the line under it, as a control is described. */\n readonly described?: readonly FieldDescriptionPart[]\n readonly onBlur?: () => void\n readonly onFocus?: () => void\n readonly onPress: () => void\n readonly testID?: string\n}\n\ntype FieldValueProps = {\n /** The value, or the placeholder. */\n readonly children?: ReactNode\n /**\n * Whether nothing has been chosen, so what is drawn is the placeholder,\n * in the muted role, and under a label at rest on its line not at all.\n * @default false\n */\n readonly isPlaceholder?: boolean\n}\n\n/**\n * The filled box, or the outlined one: no fill, an outline that thickens and\n * takes the primary role while focused, and the label cutting it once it\n * floats, the text fields page's two fields.\n */\ntype FieldVariant = 'filled' | 'outlined'\n\n// Where the label is and what type it is in, at rest or floated.\ntype LabelPlace = {\n readonly fontSize: number\n readonly letterSpacing: number\n readonly lineHeight: number\n readonly top: number\n}\n\n// The control's state as React Native Web hands it to a browser, which reads\n// `aria-invalid` and `aria-required` off the input. React Native has neither.\n// A rule's colour and width as they ease.\ntype StrokeMotion = {\n readonly color: DerivedValue<string>\n readonly width: DerivedValue<number>\n}\n\ntype WebState = {\n readonly 'aria-invalid'?: true\n readonly 'aria-required'?: true\n}\n\n// The page's icon, which the box's outline is laid out around.\nconst ICON_SIZE = 24\n\n// A control outside any box has no label over it.\nconst OUTSIDE_BOX: BoxControl = {\n disabled: false,\n floated: true,\n invalid: false,\n label: 'none',\n required: false,\n underLabel: false,\n}\n\nconst BoxContext = createContext<BoxControl>(OUTSIDE_BOX)\n\n// Whether a FieldSegments sits on the line of another, as a date range\n// picker's two dates sit on the one line it draws, which clears the label\n// once for both.\nconst SegmentsLineContext = createContext(false)\n\nconst NO_PARTS: readonly FieldDescriptionPart[] = []\n\n/**\n * How a field's control is described by the line under it: the error while\n * there is one, otherwise the description, then the limit where there is a\n * `maxLength`. Hand the result to {@link FieldInput} as `described`, and the\n * same `id` to {@link FieldMessage}.\n */\nfunction describedBy(\n id: string,\n {\n characterLimitLabel,\n description,\n error,\n locale,\n maxLength,\n }: Pick<\n FieldMessageProps,\n 'characterLimitLabel' | 'description' | 'error' | 'maxLength'\n > & {\n /**\n * The locale the limit is said in, the field's `useLocaleOf`, or the\n * device's when left out.\n */\n readonly locale?: string\n },\n): readonly FieldDescriptionPart[] {\n const ids = idsOf(id)\n const message =\n error === undefined\n ? { id: ids.description, text: description ?? '' }\n : { id: ids.error, text: error }\n const limit = limitOf(maxLength, characterLimitLabel, locale)\n\n return [\n ...(message.text === '' ? [] : [message]),\n ...(limit === undefined ? [] : [{ id: ids.limit, text: limit }]),\n ]\n}\n\n/**\n * The box a control sits in, filled or outlined, with its label. Pressed\n * anywhere, it focuses its control, or runs its `trigger` where the box is\n * the control itself. The states it draws are handed to it, since the field\n * around it is what knows them.\n */\nfunction FieldBox({\n children,\n control,\n end,\n floatingLabel = true,\n isDisabled = false,\n isFocused = false,\n isInvalid = false,\n isPopulated = false,\n isRequired = false,\n label,\n leading,\n ref,\n trailing,\n trigger,\n variant = 'filled',\n}: FieldBoxProps) {\n const theme = useTheme()\n const styles = fieldStylesOf(theme)\n const { fontScale } = useWindowDimensions()\n const [notch, setNotch] = useState(0)\n const { colors, radii, spacing, stateLayerOpacity, typography } = theme\n // The hover layer alone: a text field's box takes no pressed or focus\n // layer, since the indicator and the label are what mark its focus.\n const feedback = usePressFeedback({\n color: colors.onSurface,\n corners: {\n borderTopEndRadius: radii.xs,\n borderTopStartRadius: radii.xs,\n },\n disabled: isDisabled,\n disableRipple: true,\n })\n const outlined = variant === 'outlined'\n const floated = !floatingLabel || isFocused || isPopulated\n const state: FieldState = {\n disabled: isDisabled,\n focused: isFocused,\n hovered: feedback.hovered,\n invalid: isInvalid,\n }\n const rule = useRuleMotion(theme, state)\n const boxControl = useMemo(\n () =>\n boxControlOf(\n floatingLabel,\n floated,\n isDisabled,\n isInvalid,\n isRequired,\n !outlined,\n ),\n [floatingLabel, floated, isDisabled, isInvalid, isRequired, outlined],\n )\n const disabledContent = withOpacity(\n colors.onSurface,\n stateLayerOpacity.disabledContent,\n )\n\n return (\n <Pressable\n {...(trigger === undefined ? NOT_A_CONTROL : triggerOf(trigger))}\n disabled={isDisabled}\n onHoverIn={feedback.handlers.onHoverIn}\n onHoverOut={feedback.handlers.onHoverOut}\n onPress={trigger?.onPress ?? focusOf(control)}\n ref={ref}\n style={composeStyles<ViewStyle>(\n styles.box,\n trigger === undefined ? undefined : styles.boxTrigger,\n leading === undefined ? undefined : styles.boxLeading,\n trailing === undefined ? undefined : styles.boxTrailing,\n outlined ? styles.boxOutlined : undefined,\n isDisabled && !outlined ? styles.boxDisabled : undefined,\n minHeightOf(\n outlined\n ? 2 * spacing.lg + typography.bodyLargeLineHeight * fontScale\n : 2 * spacing.sm +\n (typography.bodySmallLineHeight +\n typography.bodyLargeLineHeight) *\n fontScale,\n ),\n )}\n >\n {outlined ? (\n <View aria-hidden style={styles.outline}>\n <View\n style={composeStyles<ViewStyle>(\n styles.outlineStart,\n widthOf(outlineInset(spacing, leading)),\n )}\n >\n <FieldStroke\n color={rule.color}\n sides=\"all\"\n style={styles.outlineStartBox}\n width={rule.width}\n />\n </View>\n <View\n style={composeStyles<ViewStyle>(\n styles.outlineNotch,\n widthOf(floated ? notch : 0),\n )}\n >\n <FieldStroke\n color={rule.color}\n sides=\"all\"\n style={styles.outlineNotchBox}\n width={rule.width}\n />\n </View>\n <View\n style={composeStyles<ViewStyle>(\n styles.outlineEnd,\n minWidthOf(outlineInset(spacing, trailing)),\n )}\n >\n <FieldStroke\n color={rule.color}\n sides=\"all\"\n style={styles.outlineEndBox}\n width={rule.width}\n />\n </View>\n </View>\n ) : (\n <>\n {feedback.layer}\n <FieldStroke\n color={rule.color}\n sides=\"top\"\n style={styles.indicator}\n width={rule.width}\n />\n </>\n )}\n {leading === undefined ? null : (\n <View style={styles.icon}>\n <IconStyleContext\n value={iconStyleOf(\n isDisabled ? disabledContent : colors.onSurfaceVariant,\n )}\n >\n {leading}\n </IconStyleContext>\n </View>\n )}\n <View style={styles.column}>\n <BoxLabel\n floated={floated}\n floatingLabel={floatingLabel}\n isDisabled={isDisabled}\n isFocused={isFocused}\n isInvalid={isInvalid}\n isRequired={isRequired}\n variant={variant}\n >\n {label}\n </BoxLabel>\n {outlined ? (\n <NotchMeasure\n floatingLabel={floatingLabel}\n isRequired={isRequired}\n onMeasure={setNotch}\n >\n {label}\n </NotchMeasure>\n ) : null}\n <BoxContext value={boxControl}>{children}</BoxContext>\n </View>\n {end}\n {trailing === undefined ? null : (\n <View style={styles.icon}>\n <IconStyleContext\n value={iconStyleOf(\n isDisabled\n ? disabledContent\n : isInvalid\n ? colors.error\n : colors.onSurfaceVariant,\n )}\n >\n {trailing}\n </IconStyleContext>\n </View>\n )}\n </Pressable>\n )\n}\n\n/**\n * A field's text control, in a {@link FieldBox}, or in {@link FieldStates}\n * inside a container of a field's own. In a box it clears the label at the\n * top where the box is filled, and shows a prefix and a suffix only while the\n * label has floated, since at rest the label sits on their line. It takes the\n * error role for its caret while the field has an error, and draws a\n * placeholder in the muted role.\n *\n * It is described by what it holds chosen, its prefix and its suffix, ahead\n * of what the field hands it in `described`, so a reader hears the options\n * chosen beside the text and the unit the value is read against as a sighted\n * one sees them on the value's line: on iOS and Android as its hint, and\n * under React Native Web through `aria-describedby`, which drops the hint.\n *\n * `multiline` makes it a text area, `rows` lines of body large tall at the\n * least, its text from the top. iOS and Android grow a multi-line input with\n * what it holds by themselves, so a height floor is all `autosize` asks of\n * them, and `autosize={false}` sets the height instead, which they scroll\n * inside. React Native Web's textarea keeps the height it is given, so there\n * the control lies over a hidden copy of `value` that takes the height the\n * text would, as web's text area lies over its replica. A control that grows\n * is therefore handed its `value`.\n */\nfunction FieldInput({\n autosize = true,\n chosen = '',\n described = NO_PARTS,\n multiline = false,\n numeric = false,\n prefix,\n rows = 1,\n suffix,\n ...props\n}: FieldInputProps) {\n const box = use(BoxContext)\n const theme = useTheme()\n const styles = fieldStylesOf(theme)\n const { fontScale } = useWindowDimensions()\n const role = useTypeRole('bodyLarge')\n const mono = useFontFamily(theme.typography.fontFamilyMono)\n const id = useId()\n const { colors, stateLayerOpacity, typography } = theme\n const content = box.disabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : colors.onSurface\n const caret = box.invalid ? colors.error : colors.primary\n const muted = box.disabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : colors.onSurfaceVariant\n const affixed = prefix !== undefined || suffix !== undefined\n const holdsChosen = chosen !== ''\n const clearance = box.underLabel\n ? marginTopOf(typography.bodySmallLineHeight * fontScale)\n : undefined\n const affixStyle = composeStyles<TextStyle>(role, colorOf(muted))\n const lines =\n typography.bodyLargeLineHeight * fontScale * (multiline ? rows : 1)\n const copied = multiline && autosize && Platform.OS === 'web'\n const extent = multiline && !autosize ? heightOf(lines) : minHeightOf(lines)\n\n const control = (\n <TextInput\n {...(Platform.OS === 'web' ? INHERITS_DIRECTION : undefined)}\n {...props}\n {...descriptionOf([\n ...affixPart(`${id}-chosen`, holdsChosen ? chosen : undefined),\n ...affixPart(`${id}-prefix`, prefix),\n ...affixPart(`${id}-suffix`, suffix),\n ...described,\n ])}\n {...webStateOf(box)}\n aria-disabled={box.disabled}\n cursorColor={caret}\n multiline={multiline}\n placeholderTextColor={muted}\n selectionColor={caret}\n style={composeStyles<TextStyle>(\n role,\n styles.input,\n colorOf(content),\n numeric ? numericOf(mono) : undefined,\n multiline ? styles.inputMultiline : undefined,\n copied ? styles.inputOverCopy : extent,\n holdsChosen\n ? minWidthOf(CHOSEN_ROOM * typography.bodyLargeSize * fontScale)\n : undefined,\n affixed || copied || holdsChosen ? undefined : clearance,\n )}\n underlineColorAndroid=\"transparent\"\n />\n )\n\n if (copied) {\n // The space keeps a final line break a line of the copy, as the control\n // draws one.\n return (\n <View style={composeStyles<ViewStyle>(styles.copied, clearance)}>\n <NativeText\n aria-hidden\n style={composeStyles<TextStyle>(role, styles.copy, extent)}\n >\n {`${props.value ?? ''} `}\n </NativeText>\n {control}\n </View>\n )\n }\n\n if (!affixed && !holdsChosen) {\n return control\n }\n\n return (\n <View style={composeStyles<ViewStyle>(styles.affixLine, clearance)}>\n {holdsChosen ? (\n <NativeText\n id={`${id}-chosen`}\n numberOfLines={1}\n style={composeStyles<TextStyle>(role, colorOf(content), SHRINKS)}\n >\n {chosen}\n </NativeText>\n ) : null}\n {prefix === undefined ? null : (\n <Affix floated={box.floated} id={`${id}-prefix`} style={affixStyle}>\n {prefix}\n </Affix>\n )}\n {control}\n {suffix === undefined ? null : (\n <Affix floated={box.floated} id={`${id}-suffix`} style={affixStyle}>\n {suffix}\n </Affix>\n )}\n </View>\n )\n}\n\n/**\n * The line under a field: the error while there is one, the description\n * otherwise, and the count of characters at its end. With nothing to show it\n * is out of the flow, so the field ends at its box. Inside a form it is drawn\n * anyway, empty, since a form is where an error arrives after the fact, from\n * a server or on a submission, and every field below this one would\n * otherwise move by the line's height when it does.\n *\n * On iOS and Android the control reads the line out as its hint, so the line\n * itself is hidden from VoiceOver and TalkBack rather than read twice. An\n * error is announced as it arrives, since a hint that changes is not read\n * again: on iOS through `announceForAccessibility`, and on Android, where the\n * error is left reachable for it, by a polite live region around it, which\n * is also what announces it under React Native Web. An error the field opens\n * with is not announced, as a live region in a browser does not read what it\n * was mounted holding.\n *\n * The count is hidden everywhere. It changes on every keystroke, and read\n * back at that rate it is worse than not hearing it, so the limit is said\n * once in the control's description instead.\n */\nfunction FieldMessage({\n characterCount = false,\n characterLimitLabel,\n description,\n error,\n id,\n length = 0,\n maxLength,\n}: FieldMessageProps) {\n const theme = useTheme()\n const styles = fieldStylesOf(theme)\n const role = useTypeRole('bodySmall')\n const { fontScale } = useWindowDimensions()\n const ids = idsOf(id)\n const invalid = error !== undefined\n const locale = useLocaleOf(undefined)\n const limit = limitOf(maxLength, characterLimitLabel, locale)\n const insideForm = useInsideForm()\n const collapsed =\n !invalid && description === undefined && !characterCount && !insideForm\n const { colors, typography } = theme\n const messageStyle = composeStyles<TextStyle>(\n role,\n colorOf(invalid ? colors.error : colors.onSurfaceVariant),\n SHRINKS,\n )\n\n useErrorAnnouncement(error)\n\n return (\n <View\n style={composeStyles<ViewStyle>(\n styles.messageLine,\n collapsed\n ? styles.messageLineCollapsed\n : minHeightOf(typography.bodySmallLineHeight * fontScale),\n )}\n >\n <View\n aria-live=\"polite\"\n {...(Platform.OS === 'web' ? ATOMIC : undefined)}\n {...(Platform.OS === 'ios' ? HIDDEN : undefined)}\n style={invalid && error !== '' ? SHRINKS : OUT_OF_FLOW}\n >\n {invalid && error !== '' ? (\n <NativeText id={ids.error} style={messageStyle}>\n {error}\n </NativeText>\n ) : null}\n </View>\n {invalid || description === undefined ? null : (\n <NativeText\n {...(Platform.OS === 'web' ? undefined : HIDDEN)}\n id={ids.description}\n style={messageStyle}\n >\n {description}\n </NativeText>\n )}\n {limit === undefined || Platform.OS !== 'web' ? null : (\n <NativeText id={ids.limit} style={NOT_DRAWN}>\n {limit}\n </NativeText>\n )}\n {characterCount ? (\n <NativeText\n aria-hidden\n style={composeStyles<TextStyle>(messageStyle, styles.counter)}\n >\n {countOf(length, maxLength, locale)}\n </NativeText>\n ) : null}\n </View>\n )\n}\n\n/**\n * A date or a time's segments on the value's line of a {@link FieldBox}, in\n * a row, clearing the label at the top where the box is filled, as a control\n * does: web's `FieldSegments`. One inside another is a row on the outer\n * one's line, which has already cleared the label.\n */\nfunction FieldSegments({ children }: { readonly children?: ReactNode }) {\n const box = use(BoxContext)\n const onLine = use(SegmentsLineContext)\n const theme = useTheme()\n const styles = fieldStylesOf(theme)\n const { fontScale } = useWindowDimensions()\n\n return (\n <View\n style={composeStyles<ViewStyle>(\n styles.segments,\n box.underLabel && !onLine\n ? marginTopOf(theme.typography.bodySmallLineHeight * fontScale)\n : undefined,\n )}\n >\n <SegmentsLineContext value>{children}</SegmentsLineContext>\n </View>\n )\n}\n\n/**\n * Hands a control outside a box the states it is drawn in, for a field that\n * draws a container of its own around the control, as SearchField's bar is.\n * The control takes its colours and the state a screen reader reads from\n * these, as it does from the box around it.\n */\nfunction FieldStates({\n children,\n isDisabled = false,\n isInvalid = false,\n isRequired = false,\n}: FieldStatesProps) {\n const states = useMemo(\n () => ({\n ...OUTSIDE_BOX,\n disabled: isDisabled,\n invalid: isInvalid,\n required: isRequired,\n }),\n [isDisabled, isInvalid, isRequired],\n )\n\n return <BoxContext value={states}>{children}</BoxContext>\n}\n\n/**\n * A field's value where it was chosen rather than typed, on the value's line\n * of a {@link FieldBox} whose `trigger` makes the box the control: body\n * large, one line cut short with an ellipsis, clearing the label at the top\n * as a control does. Hidden from a screen reader, which reads the value in\n * the trigger's name.\n *\n * `isPlaceholder` says nothing has been chosen, which takes the muted role;\n * under a floating label at rest it is not drawn until the label floats,\n * exactly as an input's placeholder is, so the two never overlap.\n *\n * On web the value opens with a space, which a browser drops at the start\n * of the line. It keeps the label and the value two words in the box's text,\n * which axe reads as one string with nothing between its parts, and holds to\n * the trigger's name, as WCAG's label in name asks; without it the label\n * runs into the value's first word.\n */\nfunction FieldValue({ children, isPlaceholder = false }: FieldValueProps) {\n const box = use(BoxContext)\n const theme = useTheme()\n const { fontScale } = useWindowDimensions()\n const role = useTypeRole('bodyLarge')\n const { colors, stateLayerOpacity, typography } = theme\n const color =\n isPlaceholder && !box.floated\n ? 'transparent'\n : box.disabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : isPlaceholder\n ? colors.onSurfaceVariant\n : colors.onSurface\n\n return (\n <NativeText\n aria-hidden\n numberOfLines={1}\n style={composeStyles<TextStyle>(\n role,\n colorOf(color),\n box.underLabel\n ? marginTopOf(typography.bodySmallLineHeight * fontScale)\n : undefined,\n )}\n >\n {Platform.OS === 'web' ? ' ' : null}\n {children}\n </NativeText>\n )\n}\n\n/**\n * Tracks whether the control has focus, around the handlers the field was\n * given, which are called after.\n */\nfunction useFieldFocus({\n onBlur,\n onFocus,\n}: Pick<TextInputProps, 'onBlur' | 'onFocus'>) {\n const [focused, setFocused] = useState(false)\n\n return {\n focused,\n handlers: {\n onBlur: ((event) => {\n setFocused(false)\n onBlur?.(event)\n }) satisfies TextInputProps['onBlur'],\n onFocus: ((event) => {\n setFocused(true)\n onFocus?.(event)\n }) satisfies TextInputProps['onFocus'],\n },\n }\n}\n\n// What a web-only atomic live region adds, so a changed message is read whole.\n// React Native's types carry no `aria-atomic`, which React Native Web takes.\nconst ATOMIC = { 'aria-atomic': true } as const\n\n// What hides a part of the line under a field from VoiceOver and TalkBack,\n// where the control reads it out as its hint.\nconst HIDDEN = { 'aria-hidden': true } as const\n\n// What leaves the control's writing direction to the page under React Native\n// Web, which gives a TextInput `dir=\"auto\"` otherwise and so aligns a value by\n// its own script: a Latin value at the left of a right-to-left field, away\n// from its label. Null rather than left out, since left out is what it writes\n// `auto` for. React Native's types carry no `dir`.\nconst INHERITS_DIRECTION = { dir: null } as const\n\n// A box around a control of its own: the press lands on the box and moves\n// focus to the control, which is what a screen reader and a keyboard reach.\nconst NOT_A_CONTROL = { accessible: false, focusable: false } as const\n\n// The limit under React Native Web: in the document for the control to point\n// at, and drawn nowhere.\nconst NOT_DRAWN: TextStyle = { display: 'none' }\n\n// The live region with nothing in it, which takes no place in the line.\nconst OUT_OF_FLOW: ViewStyle = { position: 'absolute' }\n\nconst SHRINKS: TextStyle = { flexShrink: 1 }\n\n// How many characters' width a control holding chosen options keeps beside\n// them, in its own type's size, web's 3em.\nconst CHOSEN_ROOM = 3\n\n/**\n * A prefix or a suffix, faded in once the label has floated and out when it\n * comes back to rest, over the label's own `durationShort3`.\n */\nfunction Affix({\n children,\n floated,\n id,\n style,\n}: {\n readonly children: ReactNode\n readonly floated: boolean\n readonly id: string\n readonly style: StyleProp<TextStyle>\n}) {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n const opacity = floated ? 1 : 0\n const timing = {\n duration: motion.durationShort3,\n easing: Easing.bezier(...motion.easingStandard),\n }\n const fade = useAnimatedStyle(() => {\n 'worklet'\n return {\n opacity: reduceMotion ? opacity : withTiming(opacity, timing),\n }\n })\n\n return (\n <Animated.Text\n id={id}\n style={composeStyles<AnimatedStyle<TextStyle>>(style, fade)}\n >\n {children}\n </Animated.Text>\n )\n}\n\nfunction affixPart(\n id: string,\n affix: ReactNode,\n): readonly FieldDescriptionPart[] {\n if (affix === undefined) {\n return []\n }\n\n return [\n {\n id,\n text:\n typeof affix === 'string' || typeof affix === 'number'\n ? String(affix)\n : '',\n },\n ]\n}\n\nfunction boxControlOf(\n floatingLabel: boolean,\n floated: boolean,\n disabled: boolean,\n invalid: boolean,\n required: boolean,\n underLabel: boolean,\n): BoxControl {\n return {\n disabled,\n floated,\n invalid,\n label: floatingLabel ? 'floating' : 'fixed',\n required,\n underLabel,\n }\n}\n\n/**\n * The box's label: one line, cut short with an ellipsis, moving between its\n * resting place and its floated one. Hidden from screen readers, since the\n * control is named by the same words.\n */\nfunction BoxLabel({\n children,\n floated,\n floatingLabel,\n isDisabled,\n isFocused,\n isInvalid,\n isRequired,\n variant,\n}: {\n readonly children: string\n readonly floated: boolean\n readonly floatingLabel: boolean\n readonly isDisabled: boolean\n readonly isFocused: boolean\n readonly isInvalid: boolean\n readonly isRequired: boolean\n readonly variant: FieldVariant\n}) {\n const theme = useTheme()\n const styles = fieldStylesOf(theme)\n const { fontScale } = useWindowDimensions()\n const reduceMotion = useReducedMotion()\n const large = useTypeRole('bodyLarge')\n const small = useTypeRole(floatingLabel ? 'bodySmall' : 'labelMedium')\n const { colors, motion, spacing, stateLayerOpacity, typography } = theme\n const outlined = variant === 'outlined'\n const smallRole = floatingLabel ? 'bodySmall' : 'labelMedium'\n const place: LabelPlace = floated\n ? {\n fontSize: typography[`${smallRole}Size`],\n letterSpacing: typography[`${smallRole}Tracking`],\n lineHeight: typography[`${smallRole}LineHeight`],\n top: outlined\n ? -(\n spacing.lg +\n (typography[`${smallRole}LineHeight`] * fontScale) / 2\n )\n : 0,\n }\n : {\n fontSize: typography.bodyLargeSize,\n letterSpacing: typography.bodyLargeTracking,\n lineHeight: typography.bodyLargeLineHeight,\n top: outlined ? 0 : (typography.bodySmallLineHeight * fontScale) / 2,\n }\n const color = isDisabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : isInvalid\n ? colors.error\n : isFocused\n ? colors.primary\n : colors.onSurfaceVariant\n const timing = {\n duration: motion.durationShort3,\n easing: Easing.bezier(...motion.easingStandard),\n }\n\n const motionStyle = useAnimatedStyle(() => {\n 'worklet'\n return {\n color: reduceMotion ? color : withTiming(color, timing),\n fontSize: reduceMotion\n ? place.fontSize\n : withTiming(place.fontSize, timing),\n letterSpacing: reduceMotion\n ? place.letterSpacing\n : withTiming(place.letterSpacing, timing),\n lineHeight: reduceMotion\n ? place.lineHeight\n : withTiming(place.lineHeight, timing),\n top: reduceMotion ? place.top : withTiming(place.top, timing),\n }\n })\n\n return (\n <View\n aria-hidden\n style={composeStyles<ViewStyle>(\n styles.label,\n outlined ? styles.labelOutlined : undefined,\n )}\n >\n <Animated.Text\n numberOfLines={1}\n style={composeStyles<AnimatedStyle<TextStyle>>(\n floated ? small : large,\n outlined ? styles.labelTextOutlined : undefined,\n motionStyle,\n )}\n >\n {children}\n {isRequired ? REQUIRED_MARK : null}\n </Animated.Text>\n </View>\n )\n}\n\nfunction colorOf(color: string): TextStyle {\n return { color }\n}\n\n// The count in the locale's digits and grouping, as web writes it in the\n// provider's.\nfunction countOf(\n length: number,\n maxLength: number | undefined,\n locale: string,\n) {\n return maxLength === undefined\n ? formatCount(length, locale)\n : `${formatCount(length, locale)}/${formatCount(maxLength, locale)}`\n}\n\n/**\n * What describes a control by `parts`, as a field's control is described: the\n * ids of the elements showing them under React Native Web, and their text as\n * the hint VoiceOver and TalkBack read out on iOS and Android.\n */\nfunction descriptionOf(\n parts: readonly FieldDescriptionPart[],\n): DescribedBy | undefined {\n if (Platform.OS === 'web') {\n return parts.length === 0\n ? undefined\n : { 'aria-describedby': parts.map((part) => part.id).join(' ') }\n }\n\n const said = parts.map((part) => part.text).filter((text) => text !== '')\n\n return said.length === 0 ? undefined : { accessibilityHint: said.join(' ') }\n}\n\nfunction focusOf(control: RefObject<Focusable | null> | undefined) {\n return () => {\n control?.current?.focus()\n }\n}\n\nfunction heightOf(height: number): ViewStyle {\n return { height }\n}\n\nfunction iconStyleOf(color: string): IconStyle {\n return { color, size: ICON_SIZE }\n}\n\nfunction idsOf(id: string) {\n return {\n description: `${id}-description`,\n error: `${id}-error`,\n limit: `${id}-limit`,\n }\n}\n\n/**\n * The limit in words where there is one: the field's own, or the library's\n * in `locale`.\n */\nfunction limitOf(\n maxLength: number | undefined,\n label: string | undefined,\n locale: string | undefined,\n) {\n if (maxLength === undefined) {\n return undefined\n }\n\n return label ?? limitFor(maxLength, locale)\n}\n\nfunction marginTopOf(marginTop: number): ViewStyle {\n return { marginTop }\n}\n\nfunction minHeightOf(minHeight: number): ViewStyle {\n return { minHeight }\n}\n\nfunction minWidthOf(minWidth: number): ViewStyle {\n return { minWidth }\n}\n\n/**\n * The label's text in its floated type, out of sight, measured for the\n * outlined box's notch.\n */\nfunction NotchMeasure({\n children,\n floatingLabel,\n isRequired,\n onMeasure,\n}: {\n readonly children: string\n readonly floatingLabel: boolean\n readonly isRequired: boolean\n readonly onMeasure: (width: number) => void\n}) {\n const styles = fieldStylesOf(useTheme())\n const small = useTypeRole(floatingLabel ? 'bodySmall' : 'labelMedium')\n\n return (\n <View\n aria-hidden\n style={composeStyles<ViewStyle>(\n styles.label,\n styles.labelOutlined,\n styles.notchMeasure,\n )}\n >\n <NativeText\n numberOfLines={1}\n onLayout={widthTo(onMeasure)}\n style={composeStyles<TextStyle>(small, styles.labelTextOutlined)}\n >\n {children}\n {isRequired ? REQUIRED_MARK : null}\n </NativeText>\n </View>\n )\n}\n\nfunction numericOf(fontFamily: string | undefined): TextStyle {\n return { fontFamily, fontVariant: ['tabular-nums'] }\n}\n\n// How far an outline stretch reaches along the box before the label's place\n// begins or after it ends: the box's padding at that end, and past an icon\n// the page's 12dp, the icon and its 16dp, less the notch's own 4dp beside the\n// label.\nfunction outlineInset(spacing: ResolvedTheme['spacing'], icon: ReactNode) {\n return (\n (icon === undefined ? spacing.lg : spacing.md + ICON_SIZE + spacing.lg) -\n spacing.xs\n )\n}\n\n// The asterisk after a required field's label, which is how the text fields\n// page marks one. In the label rather than beside it, so it floats and takes\n// the label's colour with it.\nconst REQUIRED_MARK = '*'\n\n/**\n * One view drawing a field's rule in its eased colour and width, from\n * {@link useStrokeMotion}: on every side, for the outlined box's outline,\n * which the piece around it clips, and a bar's ring, or on the top alone,\n * for the filled box's indicator.\n */\nfunction FieldStroke({ color, sides, style, width }: FieldStrokeProps) {\n const stroke = useAnimatedStyle(() => {\n 'worklet'\n return sides === 'all'\n ? { borderColor: color.get(), borderWidth: width.get() }\n : { borderColor: color.get(), borderTopWidth: width.get() }\n })\n\n return (\n <Animated.View\n aria-hidden\n style={composeStyles<AnimatedStyle<ViewStyle>>(style, stroke)}\n />\n )\n}\n\n/**\n * The box as the control: a button named by the trigger and described by the\n * line under the field, which a keyboard and a screen reader reach.\n */\nfunction triggerOf({\n described = NO_PARTS,\n onPress: _onPress,\n ...trigger\n}: FieldTriggerProps) {\n return {\n ...trigger,\n ...descriptionOf(described),\n role: 'button' as const,\n }\n}\n\n/**\n * Says an error on iOS as it arrives, where a live region says nothing. An\n * error the field opened with is not said, and neither is one that has not\n * changed.\n */\nfunction useErrorAnnouncement(error: string | undefined) {\n const said = useRef(error)\n\n useEffect(() => {\n if (\n Platform.OS === 'ios' &&\n error !== undefined &&\n error !== '' &&\n error !== said.current\n ) {\n AccessibilityInfo.announceForAccessibility(error)\n }\n said.current = error\n }, [error])\n}\n\n/**\n * The rule the box draws, the filled box's indicator or the outlined box's\n * outline: its colour and its width by state.\n */\nfunction useRuleMotion(theme: ResolvedTheme, state: FieldState) {\n const { colors, stateLayerOpacity } = theme\n const width = !state.disabled && state.focused ? 2 : 1\n const color = state.disabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContainer)\n : state.focused\n ? state.invalid\n ? colors.error\n : colors.primary\n : state.hovered\n ? state.invalid\n ? colors.onErrorContainer\n : colors.onSurface\n : state.invalid\n ? colors.error\n : colors.outline\n\n return useStrokeMotion(color, width)\n}\n\n/**\n * A rule's colour and width, eased to each new pair over `durationShort2` as\n * web transitions them, and moved at once under reduced motion. Hand the\n * result to {@link FieldStroke}.\n */\nfunction useStrokeMotion(color: string, width: number): StrokeMotion {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n const timing = {\n duration: motion.durationShort2,\n easing: Easing.bezier(...motion.easingStandard),\n }\n\n return {\n color: useDerivedValue<string>(() =>\n reduceMotion ? color : withTiming(color, timing),\n ),\n width: useDerivedValue<number>(() =>\n reduceMotion ? width : withTiming(width, timing),\n ),\n }\n}\n\nfunction webStateOf(box: BoxControl): undefined | WebState {\n if (Platform.OS !== 'web') {\n return undefined\n }\n\n return {\n ...(box.invalid ? { 'aria-invalid': true } : undefined),\n ...(box.required ? { 'aria-required': true } : undefined),\n }\n}\n\nfunction widthOf(width: number): ViewStyle {\n return { width }\n}\n\nfunction widthTo(onMeasure: (width: number) => void) {\n return (event: LayoutChangeEvent) => {\n onMeasure(event.nativeEvent.layout.width)\n }\n}\n\nexport { FieldChevron } from './chevron'\n\nexport {\n describedBy,\n descriptionOf,\n FieldBox,\n FieldInput,\n FieldMessage,\n FieldSegments,\n FieldStates,\n FieldStroke,\n FieldValue,\n useErrorAnnouncement,\n useFieldFocus,\n useStrokeMotion,\n}\nexport type {\n FieldBoxProps,\n FieldDescriptionPart,\n FieldInputProps,\n FieldMessageProps,\n FieldStatesProps,\n FieldStrokeProps,\n FieldTriggerProps,\n FieldValueProps,\n FieldVariant,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA6UA,MAAMqH,YAAY;AAGlB,MAAMC,cAA0B;CAC9BpE,UAAU;CACVC,SAAS;CACTC,SAAS;CACTC,OAAO;CACPC,UAAU;CACVC,YAAY;AACd;AAEA,MAAMgE,aAAa1G,cAA0ByG,WAAW;AAKxD,MAAME,sBAAsB3G,cAAc,KAAK;AAE/C,MAAM4G,WAA4C,CAAA;;;;;;;AAQlD,SAASC,YACP9C,IACA,EACEc,qBACAC,aACAC,OACA+B,QACA7B,aAW+B;CACjC,MAAM8B,MAAMC,MAAMjD,EAAE;CACpB,MAAMkD,UACJlC,UAAUmC,KAAAA,IACN;EAAEnD,IAAIgD,IAAIjC;EAAad,MAAMc,eAAe;CAAG,IAC/C;EAAEf,IAAIgD,IAAIhC;EAAOf,MAAMe;CAAM;CACnC,MAAMoC,QAAQC,QAAQnC,WAAWJ,qBAAqBiC,MAAM;CAE5D,OAAO,CACL,GAAIG,QAAQjD,SAAS,KAAK,CAAA,IAAK,CAACiD,OAAO,GACvC,GAAIE,UAAUD,KAAAA,IAAY,CAAA,IAAK,CAAC;EAAEnD,IAAIgD,IAAII;EAAOnD,MAAMmD;CAAM,CAAC,CAAE;AAEpE;;;;;;;AAQA,SAAAE,SAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAkB,MAAA,EAAA1E,UAAAC,SAAAC,KAAAC,eAAAwE,IAAAvE,YAAAwE,IAAAvE,WAAAwE,IAAAvE,WAAAwE,IAAA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AACjB;AAEA,SAASgN,QAAQH,WAAoC;CACnD,QAAQ/C,UAA6B;EACnC+C,UAAU/C,MAAMkE,YAAYC,OAAOjO,KAAK;CAC1C;AACF"}
1
+ {"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","RefObject","HostInstance","LayoutChangeEvent","StyleProp","TextInputProps","TextStyle","ViewProps","ViewStyle","AnimatedStyle","DerivedValue","createContext","use","useEffect","useId","useMemo","useRef","useState","AccessibilityInfo","Text","NativeText","Platform","Pressable","TextInput","useWindowDimensions","View","Animated","Easing","useAnimatedStyle","useDerivedValue","useReducedMotion","withTiming","Focusable","IconStyle","ResolvedTheme","useInsideForm","IconStyleContext","limitFor","useLocaleOf","formatCount","usePressFeedback","withOpacity","useTheme","composeStyles","useFontFamily","useTypeRole","fieldStylesOf","BoxControl","disabled","floated","invalid","label","required","underLabel","DescribedBy","Pick","FieldBoxProps","children","control","end","floatingLabel","isDisabled","isFocused","isInvalid","isPopulated","isRequired","leading","ref","trailing","trigger","FieldTriggerProps","variant","FieldVariant","FieldDescriptionPart","id","text","FieldInputProps","Omit","autosize","chosen","described","multiline","numeric","prefix","rows","suffix","FieldMessageProps","characterCount","characterLimitLabel","description","error","length","maxLength","FieldState","focused","hovered","FieldStatesProps","FieldStrokeProps","StrokeMotion","sides","style","onBlur","onFocus","onPress","testID","FieldValueProps","isPlaceholder","LabelPlace","fontSize","letterSpacing","lineHeight","top","color","width","WebState","ICON_SIZE","OUTSIDE_BOX","BoxContext","SegmentsLineContext","NO_PARTS","describedBy","locale","ids","idsOf","message","undefined","limit","limitOf","FieldBox","t0","$","_c","t1","t2","t3","t4","t5","t6","t7","theme","styles","fontScale","notch","setNotch","colors","radii","spacing","stateLayerOpacity","typography","t8","xs","borderTopEndRadius","borderTopStartRadius","t9","onSurface","corners","disableRipple","feedback","outlined","t10","state","rule","useRuleMotion","t11","t12","boxControlOf","boxControl","t13","disabledContent","T0","t14","NOT_A_CONTROL","triggerOf","t15","handlers","onHoverIn","t16","onHoverOut","t17","focusOf","t18","box","boxTrigger","boxLeading","boxTrailing","boxOutlined","boxDisabled","minHeightOf","lg","bodyLargeLineHeight","sm","bodySmallLineHeight","t19","outline","outlineStart","widthOf","outlineInset","outlineStartBox","outlineNotch","outlineNotchBox","outlineEnd","minWidthOf","outlineEndBox","layer","indicator","t20","onSurfaceVariant","icon","iconStyleOf","t21","t22","t23","t24","column","t25","t26","FieldInput","props","role","mono","fontFamilyMono","content","caret","primary","muted","affixed","holdsChosen","clearance","marginTopOf","affixStyle","colorOf","lines","copied","OS","extent","heightOf","descriptionOf","affixPart","webStateOf","INHERITS_DIRECTION","input","numericOf","inputMultiline","inputOverCopy","CHOSEN_ROOM","bodyLargeSize","copy","value","affixLine","SHRINKS","FieldMessage","insideForm","collapsed","messageStyle","useErrorAnnouncement","messageLine","messageLineCollapsed","OUT_OF_FLOW","ATOMIC","HIDDEN","NOT_DRAWN","counter","countOf","FieldSegments","onLine","segments","FieldStates","states","FieldValue","FieldWrap","inside","wrap","useFieldFocus","setFocused","event","event_0","const","dir","accessible","focusable","display","position","flexShrink","Affix","motion","reduceMotion","opacity","timing","duration","durationShort3","easing","bezier","easingStandard","fade","affix","String","BoxLabel","large","small","smallRole","place","bodyLargeTracking","motionStyle","labelOutlined","labelTextOutlined","REQUIRED_MARK","parts","map","part","join","said","filter","accessibilityHint","current","focus","height","size","marginTop","minHeight","minWidth","NotchMeasure","onMeasure","notchMeasure","T1","widthTo","fontFamily","fontVariant","md","FieldStroke","stroke","borderColor","get","borderWidth","borderTopWidth","_onPress","announceForAccessibility","onErrorContainer","disabledContainer","useStrokeMotion","durationShort2","nativeEvent","layout","FieldChevron","_c","state","NativeText","color"],"sources":["../../src/field/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref, RefObject } from 'react'\nimport type {\n HostInstance,\n LayoutChangeEvent,\n StyleProp,\n TextInputProps,\n TextStyle,\n ViewProps,\n ViewStyle,\n} from 'react-native'\nimport type { AnimatedStyle, DerivedValue } from 'react-native-reanimated'\n\nimport {\n createContext,\n use,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport {\n AccessibilityInfo,\n Text as NativeText,\n Platform,\n Pressable,\n TextInput,\n useWindowDimensions,\n View,\n} from 'react-native'\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useDerivedValue,\n useReducedMotion,\n withTiming,\n} from 'react-native-reanimated'\n\nimport type { Focusable } from '../form'\nimport type { IconStyle } from '../glyphs/icon-style'\nimport type { ResolvedTheme } from '../theme/scope'\n\nimport { useInsideForm } from '../form'\nimport { IconStyleContext } from '../glyphs/icon-style'\nimport { limitFor } from '../i18n'\nimport { useLocaleOf } from '../i18n/provider'\nimport { formatCount } from '../number/count'\nimport { usePressFeedback } from '../press'\nimport { withOpacity } from '../theme/color'\nimport { useTheme } from '../theme/scope'\nimport { composeStyles } from '../theme/styles'\nimport { useFontFamily } from '../typography/fonts'\nimport { useTypeRole } from '../typography/roles'\nimport { fieldStylesOf } from './styles'\n\n// The chrome every field shares, as on web: the box with its label, the\n// control inside it, and the line of supporting text under it. Each field is\n// the parts it renders inside a root of its own, and these are not exported\n// from the package.\n//\n// The text fields page draws two boxes. The filled one carries surface\n// container highest with an active indicator along its bottom, 1dp in the\n// outline role at rest and 2dp in primary while focused, and its label floats\n// within it. The outlined one has no fill and a 1dp outline all round that\n// thickens the same way, and its label floats up onto the outline, cutting a\n// notch in it.\n//\n// **The label floats by changing its type and its place**, eased by\n// Reanimated over `durationShort3` on the standard curve, as web transitions\n// them: body large on the value's line while the field is empty and\n// unfocused, body small at the top once it is focused or holds a value.\n// `floatingLabel={false}` keeps it small at the top in label medium, as web's\n// fixed label is. Under reduced motion it moves at once.\n//\n// **The box grows with the device's text size.** Its height is a floor rather\n// than a height, the padding above and below plus the lines it holds, and the\n// lines are the type tokens' line heights at the device's font scale, which\n// is what React Native draws the text at. So the 56dp the page gives is the\n// floor at the default text size, and a larger one makes the box taller\n// rather than running the value out of it.\n//\n// **The outline is drawn from views**, since there is no fieldset to cut it:\n// three pieces in a row, the stretch before the label, the notch under it,\n// which draws only the bottom of the outline, and the stretch after it. The\n// notch is the label's width in its floated type, measured from a copy of it\n// out of sight, as web's legend holds one. Before the label floats it is\n// closed, and the two stretches meet.\n//\n// **A pointer over the filled box draws the state layer**, the one every\n// control draws through `usePressFeedback`, on surface at the hover opacity,\n// and turns the indicator on surface, as the page's hovered state does; one\n// over the outlined box turns the outline on surface. Web's filled box draws\n// neither. Focus wins over hover, and an error takes the\n// error role, or on error container under a pointer.\n//\n// **Disabled is the page's colour at an opacity, translucent**: the filled\n// container and the rule are on surface at the `disabledContainer` opacity,\n// and the label, the value and the icons on surface at `disabledContent`,\n// over whatever the field sits on rather than mixed over the surface role as\n// web's are.\n\n// What a control needs to know about the box around it: how the label is\n// drawn, whether the control clears it, and the states it takes its colours\n// from.\ntype BoxControl = {\n readonly disabled: boolean\n readonly floated: boolean\n readonly invalid: boolean\n readonly label: 'fixed' | 'floating' | 'none'\n readonly required: boolean\n readonly underLabel: boolean\n}\n\ntype DescribedBy = Pick<ViewProps, 'accessibilityHint'> & {\n readonly 'aria-describedby'?: string\n}\n\ntype FieldBoxProps = {\n readonly children?: ReactNode\n /**\n * The control the box focuses when it is pressed anywhere, as the whole\n * of a native text field's box takes a press.\n */\n readonly control?: RefObject<Focusable | null>\n /**\n * What the box holds after the label and the control's column, drawn as\n * it is rather than in an icon's slot, for a part laid out against the\n * box's own edges: a number field's steppers. The column, and the label\n * in it, end where this starts, 16dp before it.\n */\n readonly end?: ReactNode\n /**\n * Whether the label sits in the empty box and floats to the top once the\n * field is focused or holds a value. `false` keeps it small at the top.\n * @default true\n */\n readonly floatingLabel?: boolean\n /** @default false */\n readonly isDisabled?: boolean\n /** Whether the control has focus, which the box draws. */\n readonly isFocused?: boolean\n /** @default false */\n readonly isInvalid?: boolean\n /** Whether the control holds anything, which floats the label. */\n readonly isPopulated?: boolean\n /**\n * Marks the label with an asterisk, as the text fields page marks a field\n * that must be filled.\n * @default false\n */\n readonly isRequired?: boolean\n /** What the field is for. */\n readonly label: string\n /** An icon at the start of the box, before the label and the control. */\n readonly leading?: ReactNode\n /**\n * The box itself, which a field opening a list from it measures to place\n * the list.\n */\n readonly ref?: Ref<HostInstance>\n /** An icon at the end of the box, after the control. */\n readonly trailing?: ReactNode\n /**\n * Makes the box itself the control, for a field holding something chosen\n * rather than typed: a button a screen reader reads by `aria-label`, which\n * a press anywhere on the box runs, in place of a `control` to focus.\n */\n readonly trigger?: FieldTriggerProps\n /** @default 'filled' */\n readonly variant?: FieldVariant\n}\n\n/**\n * One piece of what describes a field's control: the text a screen reader\n * hears on iOS and Android, and the id of the element showing it, which the\n * control points at under React Native Web.\n */\ntype FieldDescriptionPart = {\n readonly id: string\n readonly text: string\n}\n\ntype FieldInputProps = Omit<\n TextInputProps,\n | 'accessibilityHint'\n | 'cursorColor'\n | 'multiline'\n | 'numberOfLines'\n | 'placeholderTextColor'\n | 'rows'\n | 'selectionColor'\n | 'style'\n | 'underlineColorAndroid'\n> & {\n /**\n * Whether a multi-line control grows with the text it holds, from `rows`\n * up. `false` holds it at `rows` and scrolls the text inside.\n * @default true\n */\n readonly autosize?: boolean\n /**\n * The options a field holding several has chosen, written as one list,\n * drawn before the control on its line in the value's own role and cut\n * short with an ellipsis where the line runs out. The control keeps three\n * characters' width beside them at the least, so there is always\n * somewhere to type, and is described by them first.\n */\n readonly chosen?: string\n /** What describes the control, after its prefix and suffix. */\n readonly described?: readonly FieldDescriptionPart[]\n /**\n * Whether the control holds several lines rather than one, the return key\n * starting a new one.\n * @default false\n */\n readonly multiline?: boolean\n /**\n * The value in the mono face with tabular figures.\n * @default false\n */\n readonly numeric?: boolean\n /** Text before the value on its line. */\n readonly prefix?: ReactNode\n readonly ref?: Ref<ComponentRef<typeof TextInput>>\n /**\n * How many lines a multi-line control shows: the least it shows while it\n * grows, or all it shows when it does not.\n * @default 1\n */\n readonly rows?: number\n /** Text after the value on its line. */\n readonly suffix?: ReactNode\n}\n\ntype FieldMessageProps = {\n /**\n * Counts the characters, against `maxLength` where there is one.\n * @default false\n */\n readonly characterCount?: boolean\n /** How the limit is said to a screen reader. */\n readonly characterLimitLabel?: string | undefined\n /** The hint, which the error replaces while there is one. */\n readonly description?: string | undefined\n /** The problem with the value, in words. */\n readonly error?: string | undefined\n /** The field's id, as handed to {@link describedBy}. */\n readonly id: string\n /** How many characters the control holds. */\n readonly length?: number\n readonly maxLength?: number | undefined\n}\n\ntype FieldState = {\n readonly disabled: boolean\n readonly focused: boolean\n readonly hovered: boolean\n readonly invalid: boolean\n}\n\ntype FieldStatesProps = {\n readonly children?: ReactNode\n /** @default false */\n readonly isDisabled?: boolean\n /** @default false */\n readonly isInvalid?: boolean\n /** @default false */\n readonly isRequired?: boolean\n}\n\ntype FieldStrokeProps = StrokeMotion & {\n /** Every side of the view, or the top alone. */\n readonly sides: 'all' | 'top'\n readonly style: StyleProp<ViewStyle>\n}\n\n/**\n * What a box that is itself the control is read and pressed as: web's\n * `FieldTrigger`, which covers the box with one press target.\n */\ntype FieldTriggerProps = {\n /** Whether what the box opens is open, which a screen reader reads. */\n readonly 'aria-expanded'?: boolean\n /** The name a screen reader reads: the label, then the value shown. */\n readonly 'aria-label': string\n /** What describes the box, the line under it, as a control is described. */\n readonly described?: readonly FieldDescriptionPart[]\n readonly onBlur?: () => void\n readonly onFocus?: () => void\n readonly onPress: () => void\n readonly testID?: string\n}\n\ntype FieldValueProps = {\n /** The value, or the placeholder. */\n readonly children?: ReactNode\n /**\n * Whether nothing has been chosen, so what is drawn is the placeholder,\n * in the muted role, and under a label at rest on its line not at all.\n * @default false\n */\n readonly isPlaceholder?: boolean\n}\n\n/**\n * The filled box, or the outlined one: no fill, an outline that thickens and\n * takes the primary role while focused, and the label cutting it once it\n * floats, the text fields page's two fields.\n */\ntype FieldVariant = 'filled' | 'outlined'\n\n// Where the label is and what type it is in, at rest or floated.\ntype LabelPlace = {\n readonly fontSize: number\n readonly letterSpacing: number\n readonly lineHeight: number\n readonly top: number\n}\n\n// The control's state as React Native Web hands it to a browser, which reads\n// `aria-invalid` and `aria-required` off the input. React Native has neither.\n// A rule's colour and width as they ease.\ntype StrokeMotion = {\n readonly color: DerivedValue<string>\n readonly width: DerivedValue<number>\n}\n\ntype WebState = {\n readonly 'aria-invalid'?: true\n readonly 'aria-required'?: true\n}\n\n// The page's icon, which the box's outline is laid out around.\nconst ICON_SIZE = 24\n\n// A control outside any box has no label over it.\nconst OUTSIDE_BOX: BoxControl = {\n disabled: false,\n floated: true,\n invalid: false,\n label: 'none',\n required: false,\n underLabel: false,\n}\n\nconst BoxContext = createContext<BoxControl>(OUTSIDE_BOX)\n\n// Whether a FieldSegments sits on the line of another, as a date range\n// picker's two dates sit on the one line it draws, which clears the label\n// once for both.\nconst SegmentsLineContext = createContext(false)\n\nconst NO_PARTS: readonly FieldDescriptionPart[] = []\n\n/**\n * How a field's control is described by the line under it: the error while\n * there is one, otherwise the description, then the limit where there is a\n * `maxLength`. Hand the result to {@link FieldInput} as `described`, and the\n * same `id` to {@link FieldMessage}.\n */\nfunction describedBy(\n id: string,\n {\n characterLimitLabel,\n description,\n error,\n locale,\n maxLength,\n }: Pick<\n FieldMessageProps,\n 'characterLimitLabel' | 'description' | 'error' | 'maxLength'\n > & {\n /**\n * The locale the limit is said in, the field's `useLocaleOf`, or the\n * device's when left out.\n */\n readonly locale?: string\n },\n): readonly FieldDescriptionPart[] {\n const ids = idsOf(id)\n const message =\n error === undefined\n ? { id: ids.description, text: description ?? '' }\n : { id: ids.error, text: error }\n const limit = limitOf(maxLength, characterLimitLabel, locale)\n\n return [\n ...(message.text === '' ? [] : [message]),\n ...(limit === undefined ? [] : [{ id: ids.limit, text: limit }]),\n ]\n}\n\n/**\n * The box a control sits in, filled or outlined, with its label. Pressed\n * anywhere, it focuses its control, or runs its `trigger` where the box is\n * the control itself. The states it draws are handed to it, since the field\n * around it is what knows them.\n */\nfunction FieldBox({\n children,\n control,\n end,\n floatingLabel = true,\n isDisabled = false,\n isFocused = false,\n isInvalid = false,\n isPopulated = false,\n isRequired = false,\n label,\n leading,\n ref,\n trailing,\n trigger,\n variant = 'filled',\n}: FieldBoxProps) {\n const theme = useTheme()\n const styles = fieldStylesOf(theme)\n const { fontScale } = useWindowDimensions()\n const [notch, setNotch] = useState(0)\n const { colors, radii, spacing, stateLayerOpacity, typography } = theme\n // The hover layer alone: a text field's box takes no pressed or focus\n // layer, since the indicator and the label are what mark its focus.\n const feedback = usePressFeedback({\n color: colors.onSurface,\n corners: {\n borderTopEndRadius: radii.xs,\n borderTopStartRadius: radii.xs,\n },\n disabled: isDisabled,\n disableRipple: true,\n })\n const outlined = variant === 'outlined'\n const floated = !floatingLabel || isFocused || isPopulated\n const state: FieldState = {\n disabled: isDisabled,\n focused: isFocused,\n hovered: feedback.hovered,\n invalid: isInvalid,\n }\n const rule = useRuleMotion(theme, state)\n const boxControl = useMemo(\n () =>\n boxControlOf(\n floatingLabel,\n floated,\n isDisabled,\n isInvalid,\n isRequired,\n !outlined,\n ),\n [floatingLabel, floated, isDisabled, isInvalid, isRequired, outlined],\n )\n const disabledContent = withOpacity(\n colors.onSurface,\n stateLayerOpacity.disabledContent,\n )\n\n return (\n <Pressable\n {...(trigger === undefined ? NOT_A_CONTROL : triggerOf(trigger))}\n disabled={isDisabled}\n onHoverIn={feedback.handlers.onHoverIn}\n onHoverOut={feedback.handlers.onHoverOut}\n onPress={trigger?.onPress ?? focusOf(control)}\n ref={ref}\n style={composeStyles<ViewStyle>(\n styles.box,\n trigger === undefined ? undefined : styles.boxTrigger,\n leading === undefined ? undefined : styles.boxLeading,\n trailing === undefined ? undefined : styles.boxTrailing,\n outlined ? styles.boxOutlined : undefined,\n isDisabled && !outlined ? styles.boxDisabled : undefined,\n minHeightOf(\n outlined\n ? 2 * spacing.lg + typography.bodyLargeLineHeight * fontScale\n : 2 * spacing.sm +\n (typography.bodySmallLineHeight +\n typography.bodyLargeLineHeight) *\n fontScale,\n ),\n )}\n >\n {outlined ? (\n <View aria-hidden style={styles.outline}>\n <View\n style={composeStyles<ViewStyle>(\n styles.outlineStart,\n widthOf(outlineInset(spacing, leading)),\n )}\n >\n <FieldStroke\n color={rule.color}\n sides=\"all\"\n style={styles.outlineStartBox}\n width={rule.width}\n />\n </View>\n <View\n style={composeStyles<ViewStyle>(\n styles.outlineNotch,\n widthOf(floated ? notch : 0),\n )}\n >\n <FieldStroke\n color={rule.color}\n sides=\"all\"\n style={styles.outlineNotchBox}\n width={rule.width}\n />\n </View>\n <View\n style={composeStyles<ViewStyle>(\n styles.outlineEnd,\n minWidthOf(outlineInset(spacing, trailing)),\n )}\n >\n <FieldStroke\n color={rule.color}\n sides=\"all\"\n style={styles.outlineEndBox}\n width={rule.width}\n />\n </View>\n </View>\n ) : (\n <>\n {feedback.layer}\n <FieldStroke\n color={rule.color}\n sides=\"top\"\n style={styles.indicator}\n width={rule.width}\n />\n </>\n )}\n {leading === undefined ? null : (\n <View style={styles.icon}>\n <IconStyleContext\n value={iconStyleOf(\n isDisabled ? disabledContent : colors.onSurfaceVariant,\n )}\n >\n {leading}\n </IconStyleContext>\n </View>\n )}\n <View style={styles.column}>\n <BoxLabel\n floated={floated}\n floatingLabel={floatingLabel}\n isDisabled={isDisabled}\n isFocused={isFocused}\n isInvalid={isInvalid}\n isRequired={isRequired}\n variant={variant}\n >\n {label}\n </BoxLabel>\n {outlined ? (\n <NotchMeasure\n floatingLabel={floatingLabel}\n isRequired={isRequired}\n onMeasure={setNotch}\n >\n {label}\n </NotchMeasure>\n ) : null}\n <BoxContext value={boxControl}>{children}</BoxContext>\n </View>\n {end}\n {trailing === undefined ? null : (\n <View style={styles.icon}>\n <IconStyleContext\n value={iconStyleOf(\n isDisabled\n ? disabledContent\n : isInvalid\n ? colors.error\n : colors.onSurfaceVariant,\n )}\n >\n {trailing}\n </IconStyleContext>\n </View>\n )}\n </Pressable>\n )\n}\n\n/**\n * A field's text control, in a {@link FieldBox}, or in {@link FieldStates}\n * inside a container of a field's own. In a box it clears the label at the\n * top where the box is filled, and shows a prefix and a suffix only while the\n * label has floated, since at rest the label sits on their line. It takes the\n * error role for its caret while the field has an error, and draws a\n * placeholder in the muted role.\n *\n * It is described by what it holds chosen, its prefix and its suffix, ahead\n * of what the field hands it in `described`, so a reader hears the options\n * chosen beside the text and the unit the value is read against as a sighted\n * one sees them on the value's line: on iOS and Android as its hint, and\n * under React Native Web through `aria-describedby`, which drops the hint.\n *\n * `multiline` makes it a text area, `rows` lines of body large tall at the\n * least, its text from the top. iOS and Android grow a multi-line input with\n * what it holds by themselves, so a height floor is all `autosize` asks of\n * them, and `autosize={false}` sets the height instead, which they scroll\n * inside. React Native Web's textarea keeps the height it is given, so there\n * the control lies over a hidden copy of `value` that takes the height the\n * text would, as web's text area lies over its replica. A control that grows\n * is therefore handed its `value`.\n */\nfunction FieldInput({\n autosize = true,\n chosen = '',\n described = NO_PARTS,\n multiline = false,\n numeric = false,\n prefix,\n rows = 1,\n suffix,\n ...props\n}: FieldInputProps) {\n const box = use(BoxContext)\n const theme = useTheme()\n const styles = fieldStylesOf(theme)\n const { fontScale } = useWindowDimensions()\n const role = useTypeRole('bodyLarge')\n const mono = useFontFamily(theme.typography.fontFamilyMono)\n const id = useId()\n const { colors, stateLayerOpacity, typography } = theme\n const content = box.disabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : colors.onSurface\n const caret = box.invalid ? colors.error : colors.primary\n const muted = box.disabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : colors.onSurfaceVariant\n const affixed = prefix !== undefined || suffix !== undefined\n const holdsChosen = chosen !== ''\n const clearance = box.underLabel\n ? marginTopOf(typography.bodySmallLineHeight * fontScale)\n : undefined\n const affixStyle = composeStyles<TextStyle>(role, colorOf(muted))\n const lines =\n typography.bodyLargeLineHeight * fontScale * (multiline ? rows : 1)\n const copied = multiline && autosize && Platform.OS === 'web'\n const extent = multiline && !autosize ? heightOf(lines) : minHeightOf(lines)\n\n const control = (\n <TextInput\n {...(Platform.OS === 'web' ? INHERITS_DIRECTION : undefined)}\n {...props}\n {...descriptionOf([\n ...affixPart(`${id}-chosen`, holdsChosen ? chosen : undefined),\n ...affixPart(`${id}-prefix`, prefix),\n ...affixPart(`${id}-suffix`, suffix),\n ...described,\n ])}\n {...webStateOf(box)}\n aria-disabled={box.disabled}\n cursorColor={caret}\n multiline={multiline}\n placeholderTextColor={muted}\n selectionColor={caret}\n style={composeStyles<TextStyle>(\n role,\n styles.input,\n colorOf(content),\n numeric ? numericOf(mono) : undefined,\n multiline ? styles.inputMultiline : undefined,\n copied ? styles.inputOverCopy : extent,\n holdsChosen\n ? minWidthOf(CHOSEN_ROOM * typography.bodyLargeSize * fontScale)\n : undefined,\n affixed || copied || holdsChosen ? undefined : clearance,\n )}\n underlineColorAndroid=\"transparent\"\n />\n )\n\n if (copied) {\n // The space keeps a final line break a line of the copy, as the control\n // draws one.\n return (\n <View style={composeStyles<ViewStyle>(styles.copied, clearance)}>\n <NativeText\n aria-hidden\n style={composeStyles<TextStyle>(role, styles.copy, extent)}\n >\n {`${props.value ?? ''} `}\n </NativeText>\n {control}\n </View>\n )\n }\n\n if (!affixed && !holdsChosen) {\n return control\n }\n\n return (\n <View style={composeStyles<ViewStyle>(styles.affixLine, clearance)}>\n {holdsChosen ? (\n <NativeText\n id={`${id}-chosen`}\n numberOfLines={1}\n style={composeStyles<TextStyle>(role, colorOf(content), SHRINKS)}\n >\n {chosen}\n </NativeText>\n ) : null}\n {prefix === undefined ? null : (\n <Affix floated={box.floated} id={`${id}-prefix`} style={affixStyle}>\n {prefix}\n </Affix>\n )}\n {control}\n {suffix === undefined ? null : (\n <Affix floated={box.floated} id={`${id}-suffix`} style={affixStyle}>\n {suffix}\n </Affix>\n )}\n </View>\n )\n}\n\n/**\n * The line under a field: the error while there is one, the description\n * otherwise, and the count of characters at its end. With nothing to show it\n * is out of the flow, so the field ends at its box. Inside a form it is drawn\n * anyway, empty, since a form is where an error arrives after the fact, from\n * a server or on a submission, and every field below this one would\n * otherwise move by the line's height when it does.\n *\n * On iOS and Android the control reads the line out as its hint, so the line\n * itself is hidden from VoiceOver and TalkBack rather than read twice. An\n * error is announced as it arrives, since a hint that changes is not read\n * again: on iOS through `announceForAccessibility`, and on Android, where the\n * error is left reachable for it, by a polite live region around it, which\n * is also what announces it under React Native Web. An error the field opens\n * with is not announced, as a live region in a browser does not read what it\n * was mounted holding.\n *\n * The count is hidden everywhere. It changes on every keystroke, and read\n * back at that rate it is worse than not hearing it, so the limit is said\n * once in the control's description instead.\n */\nfunction FieldMessage({\n characterCount = false,\n characterLimitLabel,\n description,\n error,\n id,\n length = 0,\n maxLength,\n}: FieldMessageProps) {\n const theme = useTheme()\n const styles = fieldStylesOf(theme)\n const role = useTypeRole('bodySmall')\n const { fontScale } = useWindowDimensions()\n const ids = idsOf(id)\n const invalid = error !== undefined\n const locale = useLocaleOf(undefined)\n const limit = limitOf(maxLength, characterLimitLabel, locale)\n const insideForm = useInsideForm()\n const collapsed =\n !invalid && description === undefined && !characterCount && !insideForm\n const { colors, typography } = theme\n const messageStyle = composeStyles<TextStyle>(\n role,\n colorOf(invalid ? colors.error : colors.onSurfaceVariant),\n SHRINKS,\n )\n\n useErrorAnnouncement(error)\n\n return (\n <View\n style={composeStyles<ViewStyle>(\n styles.messageLine,\n collapsed\n ? styles.messageLineCollapsed\n : minHeightOf(typography.bodySmallLineHeight * fontScale),\n )}\n >\n <View\n aria-live=\"polite\"\n {...(Platform.OS === 'web' ? ATOMIC : undefined)}\n {...(Platform.OS === 'ios' ? HIDDEN : undefined)}\n style={invalid && error !== '' ? SHRINKS : OUT_OF_FLOW}\n >\n {invalid && error !== '' ? (\n <NativeText id={ids.error} style={messageStyle}>\n {error}\n </NativeText>\n ) : null}\n </View>\n {invalid || description === undefined ? null : (\n <NativeText\n {...(Platform.OS === 'web' ? undefined : HIDDEN)}\n id={ids.description}\n style={messageStyle}\n >\n {description}\n </NativeText>\n )}\n {limit === undefined || Platform.OS !== 'web' ? null : (\n <NativeText id={ids.limit} style={NOT_DRAWN}>\n {limit}\n </NativeText>\n )}\n {characterCount ? (\n <NativeText\n aria-hidden\n style={composeStyles<TextStyle>(messageStyle, styles.counter)}\n >\n {countOf(length, maxLength, locale)}\n </NativeText>\n ) : null}\n </View>\n )\n}\n\n/**\n * A date or a time's segments on the value's line of a {@link FieldBox}, in\n * a row, clearing the label at the top where the box is filled, as a control\n * does: web's `FieldSegments`. One inside another is a row on the outer\n * one's line, which has already cleared the label.\n */\nfunction FieldSegments({ children }: { readonly children?: ReactNode }) {\n const box = use(BoxContext)\n const onLine = use(SegmentsLineContext)\n const theme = useTheme()\n const styles = fieldStylesOf(theme)\n const { fontScale } = useWindowDimensions()\n\n return (\n <View\n style={composeStyles<ViewStyle>(\n styles.segments,\n box.underLabel && !onLine\n ? marginTopOf(theme.typography.bodySmallLineHeight * fontScale)\n : undefined,\n )}\n >\n <SegmentsLineContext value>{children}</SegmentsLineContext>\n </View>\n )\n}\n\n/**\n * Hands a control outside a box the states it is drawn in, for a field that\n * draws a container of its own around the control, as SearchField's bar is.\n * The control takes its colours and the state a screen reader reads from\n * these, as it does from the box around it.\n */\nfunction FieldStates({\n children,\n isDisabled = false,\n isInvalid = false,\n isRequired = false,\n}: FieldStatesProps) {\n const states = useMemo(\n () => ({\n ...OUTSIDE_BOX,\n disabled: isDisabled,\n invalid: isInvalid,\n required: isRequired,\n }),\n [isDisabled, isInvalid, isRequired],\n )\n\n return <BoxContext value={states}>{children}</BoxContext>\n}\n\n/**\n * A field's value where it was chosen rather than typed, on the value's line\n * of a {@link FieldBox} whose `trigger` makes the box the control: body\n * large, one line cut short with an ellipsis, clearing the label at the top\n * as a control does. Hidden from a screen reader, which reads the value in\n * the trigger's name.\n *\n * `isPlaceholder` says nothing has been chosen, which takes the muted role;\n * under a floating label at rest it is not drawn until the label floats,\n * exactly as an input's placeholder is, so the two never overlap.\n *\n * On web the value opens with a space, which a browser drops at the start\n * of the line. It keeps the label and the value two words in the box's text,\n * which axe reads as one string with nothing between its parts, and holds to\n * the trigger's name, as WCAG's label in name asks; without it the label\n * runs into the value's first word.\n */\nfunction FieldValue({ children, isPlaceholder = false }: FieldValueProps) {\n const box = use(BoxContext)\n const theme = useTheme()\n const { fontScale } = useWindowDimensions()\n const role = useTypeRole('bodyLarge')\n const { colors, stateLayerOpacity, typography } = theme\n const color =\n isPlaceholder && !box.floated\n ? 'transparent'\n : box.disabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : isPlaceholder\n ? colors.onSurfaceVariant\n : colors.onSurface\n\n return (\n <NativeText\n aria-hidden\n numberOfLines={1}\n style={composeStyles<TextStyle>(\n role,\n colorOf(color),\n box.underLabel\n ? marginTopOf(typography.bodySmallLineHeight * fontScale)\n : undefined,\n )}\n >\n {Platform.OS === 'web' ? ' ' : null}\n {children}\n </NativeText>\n )\n}\n\n/**\n * What a field holds on lines that wrap, on the value's line of a\n * {@link FieldBox}: a token field's pills, with its control after them. It\n * clears the label at the top where the box is filled, once for every line,\n * as a control does, and the control inside takes the box's states without\n * clearing it again.\n */\nfunction FieldWrap({ children }: { readonly children?: ReactNode }) {\n const box = use(BoxContext)\n const theme = useTheme()\n const styles = fieldStylesOf(theme)\n const { fontScale } = useWindowDimensions()\n const inside = useMemo(() => ({ ...box, underLabel: false }), [box])\n\n return (\n <View\n style={composeStyles<ViewStyle>(\n styles.wrap,\n box.underLabel\n ? marginTopOf(theme.typography.bodySmallLineHeight * fontScale)\n : undefined,\n )}\n >\n <BoxContext value={inside}>{children}</BoxContext>\n </View>\n )\n}\n\n/**\n * Tracks whether the control has focus, around the handlers the field was\n * given, which are called after.\n */\nfunction useFieldFocus({\n onBlur,\n onFocus,\n}: Pick<TextInputProps, 'onBlur' | 'onFocus'>) {\n const [focused, setFocused] = useState(false)\n\n return {\n focused,\n handlers: {\n onBlur: ((event) => {\n setFocused(false)\n onBlur?.(event)\n }) satisfies TextInputProps['onBlur'],\n onFocus: ((event) => {\n setFocused(true)\n onFocus?.(event)\n }) satisfies TextInputProps['onFocus'],\n },\n }\n}\n\n// What a web-only atomic live region adds, so a changed message is read whole.\n// React Native's types carry no `aria-atomic`, which React Native Web takes.\nconst ATOMIC = { 'aria-atomic': true } as const\n\n// What hides a part of the line under a field from VoiceOver and TalkBack,\n// where the control reads it out as its hint.\nconst HIDDEN = { 'aria-hidden': true } as const\n\n// What leaves the control's writing direction to the page under React Native\n// Web, which gives a TextInput `dir=\"auto\"` otherwise and so aligns a value by\n// its own script: a Latin value at the left of a right-to-left field, away\n// from its label. Null rather than left out, since left out is what it writes\n// `auto` for. React Native's types carry no `dir`.\nconst INHERITS_DIRECTION = { dir: null } as const\n\n// A box around a control of its own: the press lands on the box and moves\n// focus to the control, which is what a screen reader and a keyboard reach.\nconst NOT_A_CONTROL = { accessible: false, focusable: false } as const\n\n// The limit under React Native Web: in the document for the control to point\n// at, and drawn nowhere.\nconst NOT_DRAWN: TextStyle = { display: 'none' }\n\n// The live region with nothing in it, which takes no place in the line.\nconst OUT_OF_FLOW: ViewStyle = { position: 'absolute' }\n\nconst SHRINKS: TextStyle = { flexShrink: 1 }\n\n// How many characters' width a control holding chosen options keeps beside\n// them, in its own type's size, web's 3em.\nconst CHOSEN_ROOM = 3\n\n/**\n * A prefix or a suffix, faded in once the label has floated and out when it\n * comes back to rest, over the label's own `durationShort3`.\n */\nfunction Affix({\n children,\n floated,\n id,\n style,\n}: {\n readonly children: ReactNode\n readonly floated: boolean\n readonly id: string\n readonly style: StyleProp<TextStyle>\n}) {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n const opacity = floated ? 1 : 0\n const timing = {\n duration: motion.durationShort3,\n easing: Easing.bezier(...motion.easingStandard),\n }\n const fade = useAnimatedStyle(() => {\n 'worklet'\n return {\n opacity: reduceMotion ? opacity : withTiming(opacity, timing),\n }\n })\n\n return (\n <Animated.Text\n id={id}\n style={composeStyles<AnimatedStyle<TextStyle>>(style, fade)}\n >\n {children}\n </Animated.Text>\n )\n}\n\nfunction affixPart(\n id: string,\n affix: ReactNode,\n): readonly FieldDescriptionPart[] {\n if (affix === undefined) {\n return []\n }\n\n return [\n {\n id,\n text:\n typeof affix === 'string' || typeof affix === 'number'\n ? String(affix)\n : '',\n },\n ]\n}\n\nfunction boxControlOf(\n floatingLabel: boolean,\n floated: boolean,\n disabled: boolean,\n invalid: boolean,\n required: boolean,\n underLabel: boolean,\n): BoxControl {\n return {\n disabled,\n floated,\n invalid,\n label: floatingLabel ? 'floating' : 'fixed',\n required,\n underLabel,\n }\n}\n\n/**\n * The box's label: one line, cut short with an ellipsis, moving between its\n * resting place and its floated one. Hidden from screen readers, since the\n * control is named by the same words.\n */\nfunction BoxLabel({\n children,\n floated,\n floatingLabel,\n isDisabled,\n isFocused,\n isInvalid,\n isRequired,\n variant,\n}: {\n readonly children: string\n readonly floated: boolean\n readonly floatingLabel: boolean\n readonly isDisabled: boolean\n readonly isFocused: boolean\n readonly isInvalid: boolean\n readonly isRequired: boolean\n readonly variant: FieldVariant\n}) {\n const theme = useTheme()\n const styles = fieldStylesOf(theme)\n const { fontScale } = useWindowDimensions()\n const reduceMotion = useReducedMotion()\n const large = useTypeRole('bodyLarge')\n const small = useTypeRole(floatingLabel ? 'bodySmall' : 'labelMedium')\n const { colors, motion, spacing, stateLayerOpacity, typography } = theme\n const outlined = variant === 'outlined'\n const smallRole = floatingLabel ? 'bodySmall' : 'labelMedium'\n const place: LabelPlace = floated\n ? {\n fontSize: typography[`${smallRole}Size`],\n letterSpacing: typography[`${smallRole}Tracking`],\n lineHeight: typography[`${smallRole}LineHeight`],\n top: outlined\n ? -(\n spacing.lg +\n (typography[`${smallRole}LineHeight`] * fontScale) / 2\n )\n : 0,\n }\n : {\n fontSize: typography.bodyLargeSize,\n letterSpacing: typography.bodyLargeTracking,\n lineHeight: typography.bodyLargeLineHeight,\n top: outlined ? 0 : (typography.bodySmallLineHeight * fontScale) / 2,\n }\n const color = isDisabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : isInvalid\n ? colors.error\n : isFocused\n ? colors.primary\n : colors.onSurfaceVariant\n const timing = {\n duration: motion.durationShort3,\n easing: Easing.bezier(...motion.easingStandard),\n }\n\n const motionStyle = useAnimatedStyle(() => {\n 'worklet'\n return {\n color: reduceMotion ? color : withTiming(color, timing),\n fontSize: reduceMotion\n ? place.fontSize\n : withTiming(place.fontSize, timing),\n letterSpacing: reduceMotion\n ? place.letterSpacing\n : withTiming(place.letterSpacing, timing),\n lineHeight: reduceMotion\n ? place.lineHeight\n : withTiming(place.lineHeight, timing),\n top: reduceMotion ? place.top : withTiming(place.top, timing),\n }\n })\n\n return (\n <View\n aria-hidden\n style={composeStyles<ViewStyle>(\n styles.label,\n outlined ? styles.labelOutlined : undefined,\n )}\n >\n <Animated.Text\n numberOfLines={1}\n style={composeStyles<AnimatedStyle<TextStyle>>(\n floated ? small : large,\n outlined ? styles.labelTextOutlined : undefined,\n motionStyle,\n )}\n >\n {children}\n {isRequired ? REQUIRED_MARK : null}\n </Animated.Text>\n </View>\n )\n}\n\nfunction colorOf(color: string): TextStyle {\n return { color }\n}\n\n// The count in the locale's digits and grouping, as web writes it in the\n// provider's.\nfunction countOf(\n length: number,\n maxLength: number | undefined,\n locale: string,\n) {\n return maxLength === undefined\n ? formatCount(length, locale)\n : `${formatCount(length, locale)}/${formatCount(maxLength, locale)}`\n}\n\n/**\n * What describes a control by `parts`, as a field's control is described: the\n * ids of the elements showing them under React Native Web, and their text as\n * the hint VoiceOver and TalkBack read out on iOS and Android.\n */\nfunction descriptionOf(\n parts: readonly FieldDescriptionPart[],\n): DescribedBy | undefined {\n if (Platform.OS === 'web') {\n return parts.length === 0\n ? undefined\n : { 'aria-describedby': parts.map((part) => part.id).join(' ') }\n }\n\n const said = parts.map((part) => part.text).filter((text) => text !== '')\n\n return said.length === 0 ? undefined : { accessibilityHint: said.join(' ') }\n}\n\nfunction focusOf(control: RefObject<Focusable | null> | undefined) {\n return () => {\n control?.current?.focus()\n }\n}\n\nfunction heightOf(height: number): ViewStyle {\n return { height }\n}\n\nfunction iconStyleOf(color: string): IconStyle {\n return { color, size: ICON_SIZE }\n}\n\nfunction idsOf(id: string) {\n return {\n description: `${id}-description`,\n error: `${id}-error`,\n limit: `${id}-limit`,\n }\n}\n\n/**\n * The limit in words where there is one: the field's own, or the library's\n * in `locale`.\n */\nfunction limitOf(\n maxLength: number | undefined,\n label: string | undefined,\n locale: string | undefined,\n) {\n if (maxLength === undefined) {\n return undefined\n }\n\n return label ?? limitFor(maxLength, locale)\n}\n\nfunction marginTopOf(marginTop: number): ViewStyle {\n return { marginTop }\n}\n\nfunction minHeightOf(minHeight: number): ViewStyle {\n return { minHeight }\n}\n\nfunction minWidthOf(minWidth: number): ViewStyle {\n return { minWidth }\n}\n\n/**\n * The label's text in its floated type, out of sight, measured for the\n * outlined box's notch.\n */\nfunction NotchMeasure({\n children,\n floatingLabel,\n isRequired,\n onMeasure,\n}: {\n readonly children: string\n readonly floatingLabel: boolean\n readonly isRequired: boolean\n readonly onMeasure: (width: number) => void\n}) {\n const styles = fieldStylesOf(useTheme())\n const small = useTypeRole(floatingLabel ? 'bodySmall' : 'labelMedium')\n\n return (\n <View\n aria-hidden\n style={composeStyles<ViewStyle>(\n styles.label,\n styles.labelOutlined,\n styles.notchMeasure,\n )}\n >\n <NativeText\n numberOfLines={1}\n onLayout={widthTo(onMeasure)}\n style={composeStyles<TextStyle>(small, styles.labelTextOutlined)}\n >\n {children}\n {isRequired ? REQUIRED_MARK : null}\n </NativeText>\n </View>\n )\n}\n\nfunction numericOf(fontFamily: string | undefined): TextStyle {\n return { fontFamily, fontVariant: ['tabular-nums'] }\n}\n\n// How far an outline stretch reaches along the box before the label's place\n// begins or after it ends: the box's padding at that end, and past an icon\n// the page's 12dp, the icon and its 16dp, less the notch's own 4dp beside the\n// label.\nfunction outlineInset(spacing: ResolvedTheme['spacing'], icon: ReactNode) {\n return (\n (icon === undefined ? spacing.lg : spacing.md + ICON_SIZE + spacing.lg) -\n spacing.xs\n )\n}\n\n// The asterisk after a required field's label, which is how the text fields\n// page marks one. In the label rather than beside it, so it floats and takes\n// the label's colour with it.\nconst REQUIRED_MARK = '*'\n\n/**\n * One view drawing a field's rule in its eased colour and width, from\n * {@link useStrokeMotion}: on every side, for the outlined box's outline,\n * which the piece around it clips, and a bar's ring, or on the top alone,\n * for the filled box's indicator.\n */\nfunction FieldStroke({ color, sides, style, width }: FieldStrokeProps) {\n const stroke = useAnimatedStyle(() => {\n 'worklet'\n return sides === 'all'\n ? { borderColor: color.get(), borderWidth: width.get() }\n : { borderColor: color.get(), borderTopWidth: width.get() }\n })\n\n return (\n <Animated.View\n aria-hidden\n style={composeStyles<AnimatedStyle<ViewStyle>>(style, stroke)}\n />\n )\n}\n\n/**\n * The box as the control: a button named by the trigger and described by the\n * line under the field, which a keyboard and a screen reader reach.\n */\nfunction triggerOf({\n described = NO_PARTS,\n onPress: _onPress,\n ...trigger\n}: FieldTriggerProps) {\n return {\n ...trigger,\n ...descriptionOf(described),\n role: 'button' as const,\n }\n}\n\n/**\n * Says an error on iOS as it arrives, where a live region says nothing. An\n * error the field opened with is not said, and neither is one that has not\n * changed.\n */\nfunction useErrorAnnouncement(error: string | undefined) {\n const said = useRef(error)\n\n useEffect(() => {\n if (\n Platform.OS === 'ios' &&\n error !== undefined &&\n error !== '' &&\n error !== said.current\n ) {\n AccessibilityInfo.announceForAccessibility(error)\n }\n said.current = error\n }, [error])\n}\n\n/**\n * The rule the box draws, the filled box's indicator or the outlined box's\n * outline: its colour and its width by state.\n */\nfunction useRuleMotion(theme: ResolvedTheme, state: FieldState) {\n const { colors, stateLayerOpacity } = theme\n const width = !state.disabled && state.focused ? 2 : 1\n const color = state.disabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContainer)\n : state.focused\n ? state.invalid\n ? colors.error\n : colors.primary\n : state.hovered\n ? state.invalid\n ? colors.onErrorContainer\n : colors.onSurface\n : state.invalid\n ? colors.error\n : colors.outline\n\n return useStrokeMotion(color, width)\n}\n\n/**\n * A rule's colour and width, eased to each new pair over `durationShort2` as\n * web transitions them, and moved at once under reduced motion. Hand the\n * result to {@link FieldStroke}.\n */\nfunction useStrokeMotion(color: string, width: number): StrokeMotion {\n const { motion } = useTheme()\n const reduceMotion = useReducedMotion()\n const timing = {\n duration: motion.durationShort2,\n easing: Easing.bezier(...motion.easingStandard),\n }\n\n return {\n color: useDerivedValue<string>(() =>\n reduceMotion ? color : withTiming(color, timing),\n ),\n width: useDerivedValue<number>(() =>\n reduceMotion ? width : withTiming(width, timing),\n ),\n }\n}\n\nfunction webStateOf(box: BoxControl): undefined | WebState {\n if (Platform.OS !== 'web') {\n return undefined\n }\n\n return {\n ...(box.invalid ? { 'aria-invalid': true } : undefined),\n ...(box.required ? { 'aria-required': true } : undefined),\n }\n}\n\nfunction widthOf(width: number): ViewStyle {\n return { width }\n}\n\nfunction widthTo(onMeasure: (width: number) => void) {\n return (event: LayoutChangeEvent) => {\n onMeasure(event.nativeEvent.layout.width)\n }\n}\n\nexport { FieldChevron } from './chevron'\n\nexport {\n describedBy,\n descriptionOf,\n FieldBox,\n FieldInput,\n FieldMessage,\n FieldSegments,\n FieldStates,\n FieldStroke,\n FieldValue,\n FieldWrap,\n useErrorAnnouncement,\n useFieldFocus,\n useStrokeMotion,\n}\nexport type {\n FieldBoxProps,\n FieldDescriptionPart,\n FieldInputProps,\n FieldMessageProps,\n FieldStatesProps,\n FieldStrokeProps,\n FieldTriggerProps,\n FieldValueProps,\n FieldVariant,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA6UA,MAAMqH,YAAY;AAGlB,MAAMC,cAA0B;CAC9BpE,UAAU;CACVC,SAAS;CACTC,SAAS;CACTC,OAAO;CACPC,UAAU;CACVC,YAAY;AACd;AAEA,MAAMgE,aAAa1G,cAA0ByG,WAAW;AAKxD,MAAME,sBAAsB3G,cAAc,KAAK;AAE/C,MAAM4G,WAA4C,CAAA;;;;;;;AAQlD,SAASC,YACP9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uBlF,WAAWkF,OAAO8K,MAAM,CACjD;CAAC,IAAA1J;CAAA,IAAAH,EAAA,OAAAD,MAAAC,EAAA,OAAAE,IAAA;EANIC,KAAA;GAAArB,OACEiB;GAENhB,OACMmB;EAGT;EAACF,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAPMG;AAON;AAGH,SAASyG,WAAWzD,KAAuC;CACzD,IAAIhK,SAASoN,OAAO,OAClB;CAGF,OAAO;EACL,GAAIpD,IAAInI,UAAU,EAAE,gBAAgB,KAAK,IAAI2E,KAAAA;EAC7C,GAAIwD,IAAIjI,WAAW,EAAE,iBAAiB,KAAK,IAAIyE,KAAAA;CACjD;AACF;AAEA,SAASsE,QAAQlF,OAA0B;CACzC,OAAO,EAAEA,MAAM;AACjB;AAEA,SAASmN,QAAQH,WAAoC;CACnD,QAAQ/C,UAA6B;EACnC+C,UAAU/C,MAAMkE,YAAYC,OAAOpO,KAAK;CAC1C;AACF"}
@@ -2,7 +2,7 @@ import { themedStyles } from "../theme/styles.js";
2
2
  import { withOpacity } from "../theme/color.js";
3
3
  import { StyleSheet } from "react-native";
4
4
  //#region src/field/styles.ts
5
- const fieldStylesOf = themedStyles(({ colors, radii, spacing, stateLayerOpacity }) => StyleSheet.create({
5
+ const fieldStylesOf = themedStyles(({ colors, radii, sizing, spacing, stateLayerOpacity }) => StyleSheet.create({
6
6
  affixLine: {
7
7
  alignItems: "baseline",
8
8
  flexDirection: "row",
@@ -150,6 +150,14 @@ const fieldStylesOf = themedStyles(({ colors, radii, spacing, stateLayerOpacity
150
150
  alignItems: "center",
151
151
  flexDirection: "row",
152
152
  overflow: "hidden"
153
+ },
154
+ wrap: {
155
+ alignItems: "center",
156
+ columnGap: spacing.xs,
157
+ flexDirection: "row",
158
+ flexWrap: "wrap",
159
+ minHeight: sizing.controlXs,
160
+ rowGap: spacing.sm
153
161
  }
154
162
  }));
155
163
  //#endregion