@kanso-labs/react-native-kanso-ui 0.1.1 → 0.3.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 (88) hide show
  1. package/dist/button/index.d.ts +32 -2
  2. package/dist/button/index.js +38 -26
  3. package/dist/button/index.js.map +1 -1
  4. package/dist/button/pending.js +144 -0
  5. package/dist/button/pending.js.map +1 -0
  6. package/dist/button/slots.js +7 -0
  7. package/dist/button/slots.js.map +1 -0
  8. package/dist/components/avatar/index.d.ts +2 -2
  9. package/dist/components/avatar/index.js.map +1 -1
  10. package/dist/components/button/index.d.ts +3 -3
  11. package/dist/components/button/index.js +159 -111
  12. package/dist/components/button/index.js.map +1 -1
  13. package/dist/components/card/index.d.ts +2 -2
  14. package/dist/components/card/index.js.map +1 -1
  15. package/dist/components/checkbox/index.d.ts +2 -2
  16. package/dist/components/checkbox/index.js.map +1 -1
  17. package/dist/components/chip/index.d.ts +2 -2
  18. package/dist/components/chip/index.js.map +1 -1
  19. package/dist/components/chip-group/index.d.ts +3 -3
  20. package/dist/components/chip-group/index.js.map +1 -1
  21. package/dist/components/copy-field/index.d.ts +2 -2
  22. package/dist/components/copy-field/index.js.map +1 -1
  23. package/dist/components/dialog/index.d.ts +131 -0
  24. package/dist/components/dialog/index.js +861 -0
  25. package/dist/components/dialog/index.js.map +1 -0
  26. package/dist/components/icon-button/index.d.ts +3 -3
  27. package/dist/components/icon-button/index.js +165 -109
  28. package/dist/components/icon-button/index.js.map +1 -1
  29. package/dist/components/link/index.js +1 -1
  30. package/dist/components/link/index.js.map +1 -1
  31. package/dist/components/meter/index.d.ts +73 -0
  32. package/dist/components/meter/index.js +179 -0
  33. package/dist/components/meter/index.js.map +1 -0
  34. package/dist/components/number-field/index.d.ts +3 -3
  35. package/dist/components/number-field/index.js +1 -9
  36. package/dist/components/number-field/index.js.map +1 -1
  37. package/dist/components/product-icon/index.d.ts +2 -2
  38. package/dist/components/product-icon/index.js.map +1 -1
  39. package/dist/components/progress-indicator/index.d.ts +113 -0
  40. package/dist/components/progress-indicator/index.js +1024 -0
  41. package/dist/components/progress-indicator/index.js.map +1 -0
  42. package/dist/components/radio-group/index.d.ts +3 -3
  43. package/dist/components/radio-group/index.js.map +1 -1
  44. package/dist/components/search-field/index.d.ts +3 -3
  45. package/dist/components/search-field/index.js.map +1 -1
  46. package/dist/components/segmented-button/index.d.ts +3 -3
  47. package/dist/components/segmented-button/index.js.map +1 -1
  48. package/dist/components/snackbar/index.d.ts +120 -0
  49. package/dist/components/snackbar/index.js +540 -0
  50. package/dist/components/snackbar/index.js.map +1 -0
  51. package/dist/components/switch/index.d.ts +2 -2
  52. package/dist/components/switch/index.js.map +1 -1
  53. package/dist/components/text-field/index.d.ts +3 -3
  54. package/dist/components/text-field/index.js.map +1 -1
  55. package/dist/field/index.d.ts +1 -1
  56. package/dist/field/index.js.map +1 -1
  57. package/dist/form/index.d.ts +1 -1
  58. package/dist/form/index.js.map +1 -1
  59. package/dist/glyphs/hidden.js +13 -0
  60. package/dist/glyphs/hidden.js.map +1 -0
  61. package/dist/glyphs/index.js +2 -8
  62. package/dist/glyphs/index.js.map +1 -1
  63. package/dist/i18n/index.js +23 -0
  64. package/dist/i18n/index.js.map +1 -0
  65. package/dist/i18n/messages.js +41 -0
  66. package/dist/i18n/messages.js.map +1 -0
  67. package/dist/index.d.ts +5 -1
  68. package/dist/index.js +7 -3
  69. package/dist/indicator/index.d.ts +15 -0
  70. package/dist/indicator/index.js +256 -0
  71. package/dist/indicator/index.js.map +1 -0
  72. package/dist/indicator/motion.js +86 -0
  73. package/dist/indicator/motion.js.map +1 -0
  74. package/dist/indicator/paths.js +72 -0
  75. package/dist/indicator/paths.js.map +1 -0
  76. package/dist/indicator/styles.js +62 -0
  77. package/dist/indicator/styles.js.map +1 -0
  78. package/dist/mark/index.d.ts +1 -1
  79. package/dist/mark/index.js.map +1 -1
  80. package/dist/number/locale.js +14 -0
  81. package/dist/number/locale.js.map +1 -0
  82. package/dist/overlay/host.js +65 -2
  83. package/dist/overlay/host.js.map +1 -1
  84. package/dist/press/index.js +63 -63
  85. package/dist/press/index.js.map +1 -1
  86. package/dist/theme/resolve.js +1 -1
  87. package/dist/theme/resolve.js.map +1 -1
  88. package/package.json +11 -11
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ReactNode","Ref","RefObject","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","IconStyle","ResolvedTheme","useInsideForm","IconStyleContext","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","trailing","variant","FieldVariant","FieldDescriptionPart","id","text","FieldInputProps","Omit","described","numeric","prefix","ref","suffix","FieldMessageProps","characterCount","characterLimitLabel","description","error","length","maxLength","FieldState","focused","hovered","FieldStatesProps","FieldStrokeProps","StrokeMotion","sides","style","LabelPlace","fontSize","letterSpacing","lineHeight","top","color","width","WebState","ICON_SIZE","OUTSIDE_BOX","BoxContext","NO_PARTS","counterFormat","Intl","NumberFormat","describedBy","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","t15","t16","handlers","onHoverIn","t17","onHoverOut","t18","focusOf","t19","box","boxLeading","boxTrailing","boxOutlined","boxDisabled","minHeightOf","lg","bodyLargeLineHeight","sm","bodySmallLineHeight","t20","outline","outlineStart","widthOf","outlineInset","outlineStartBox","outlineNotch","outlineNotchBox","outlineEnd","minWidthOf","outlineEndBox","layer","indicator","t21","onSurfaceVariant","icon","iconStyleOf","t22","t23","t24","t25","column","t26","t27","FieldInput","props","role","mono","fontFamilyMono","content","caret","primary","muted","affixed","clearance","marginTopOf","affixStyle","colorOf","descriptionOf","affixPart","webStateOf","OS","INHERITS_DIRECTION","input","numericOf","affixLine","FieldMessage","insideForm","collapsed","messageStyle","SHRINKS","useErrorAnnouncement","messageLine","messageLineCollapsed","OUT_OF_FLOW","ATOMIC","HIDDEN","NOT_DRAWN","counter","countOf","FieldStates","states","useFieldFocus","onBlur","onFocus","setFocused","event","event_0","const","dir","display","position","flexShrink","Affix","motion","reduceMotion","opacity","timing","duration","durationShort3","easing","bezier","easingStandard","fade","affix","String","BoxLabel","large","small","smallRole","place","bodyLargeSize","bodyLargeTracking","motionStyle","labelOutlined","labelTextOutlined","REQUIRED_MARK","format","parts","map","part","join","said","filter","accessibilityHint","current","focus","size","marginTop","minHeight","minWidth","NotchMeasure","onMeasure","notchMeasure","T1","widthTo","fontFamily","fontVariant","md","FieldStroke","stroke","borderColor","get","borderWidth","borderTopWidth","announceForAccessibility","onErrorContainer","disabledContainer","useStrokeMotion","durationShort2","nativeEvent","layout","_c","state","NativeText","color"],"sources":["../../src/field/index.tsx"],"sourcesContent":["import type { ReactNode, Ref, RefObject } from 'react'\nimport type {\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 { IconStyle } from '../glyphs/icon-style'\nimport type { ResolvedTheme } from '../theme/scope'\n\nimport { useInsideForm } from '../form'\nimport { IconStyleContext } from '../glyphs/icon-style'\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<null | TextInput>\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 /** An icon at the end of the box, after the control. */\n readonly trailing?: ReactNode\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 | 'placeholderTextColor'\n | 'selectionColor'\n | 'style'\n | 'underlineColorAndroid'\n> & {\n /** What describes the control, after its prefix and suffix. */\n readonly described?: readonly FieldDescriptionPart[]\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<TextInput>\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 * 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\nconst NO_PARTS: readonly FieldDescriptionPart[] = []\n\nlet counterFormat: Intl.NumberFormat | undefined\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 maxLength,\n }: Pick<\n FieldMessageProps,\n 'characterLimitLabel' | 'description' | 'error' | 'maxLength'\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)\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. The states it draws are handed to it,\n * since the field 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 trailing,\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 accessible={false}\n disabled={isDisabled}\n focusable={false}\n onHoverIn={feedback.handlers.onHoverIn}\n onHoverOut={feedback.handlers.onHoverOut}\n onPress={focusOf(control)}\n style={composeStyles<ViewStyle>(\n styles.box,\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 its prefix and suffix, ahead of what the field hands it\n * in `described`, so a reader hears the unit the value is read against as a\n * sighted one sees it beside the value: on iOS and Android as its hint, and\n * under React Native Web through `aria-describedby`, which drops the hint.\n */\nfunction FieldInput({\n described = NO_PARTS,\n numeric = false,\n prefix,\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 clearance = box.underLabel\n ? marginTopOf(typography.bodySmallLineHeight * fontScale)\n : undefined\n const affixStyle = composeStyles<TextStyle>(role, colorOf(muted))\n\n const control = (\n <TextInput\n {...(Platform.OS === 'web' ? INHERITS_DIRECTION : undefined)}\n {...props}\n {...descriptionOf([\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 placeholderTextColor={muted}\n selectionColor={caret}\n style={composeStyles<TextStyle>(\n role,\n styles.input,\n colorOf(content),\n numeric ? numericOf(mono) : undefined,\n minHeightOf(typography.bodyLargeLineHeight * fontScale),\n affixed ? undefined : clearance,\n )}\n underlineColorAndroid=\"transparent\"\n />\n )\n\n if (!affixed) {\n return control\n }\n\n return (\n <View style={composeStyles<ViewStyle>(styles.affixLine, clearance)}>\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 limit = limitOf(maxLength, characterLimitLabel)\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)}\n </NativeText>\n ) : null}\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 * 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: ViewProps = { 'aria-hidden': true }\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// 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/**\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 device's digits and grouping, as web writes it in the\n// reader's locale. One formatter, since the count changes on every keystroke.\nfunction countOf(length: number, maxLength: number | undefined) {\n counterFormat ??= new Intl.NumberFormat()\n\n return maxLength === undefined\n ? counterFormat.format(length)\n : `${counterFormat.format(length)}/${counterFormat.format(maxLength)}`\n}\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<null | TextInput>) {\n return () => {\n control.current?.focus()\n }\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 English, which\n * an app in another language replaces through `characterLimitLabel`.\n */\nfunction limitOf(maxLength: number | undefined, label: string | undefined) {\n if (maxLength === undefined) {\n return undefined\n }\n\n return (\n label ??\n (maxLength === 1\n ? 'Up to 1 character'\n : `Up to ${String(maxLength)} characters`)\n )\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// Says an error on iOS as it arrives. An error the field opened with is not\n// said, and neither is one that has not changed.\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 {\n describedBy,\n FieldBox,\n FieldInput,\n FieldMessage,\n FieldStates,\n FieldStroke,\n useFieldFocus,\n useStrokeMotion,\n}\nexport type {\n FieldBoxProps,\n FieldDescriptionPart,\n FieldInputProps,\n FieldMessageProps,\n FieldStatesProps,\n FieldStrokeProps,\n FieldVariant,\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqQA,MAAMmG,YAAY;AAGlB,MAAMC,cAA0B;CAC9BxD,UAAU;CACVC,SAAS;CACTC,SAAS;CACTC,OAAO;CACPC,UAAU;CACVC,YAAY;AACd;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D,QACvBpO,OAAMqO,OAAO,GAAIP,OAAMQ,cAAe;CAChD;CAGS,MAAA/I,KAAArF,sBACL6N,eAAA1J,QAAuBjE,WAAWiE,OAAO4J,MAAM,CACjD;CACO,MAAAvI,KAAAxF,sBACL6N,eAAAzJ,QAAuBlE,WAAWkE,OAAO2J,MAAM,CACjD;CAAC,IAAAtI;CAAA,IAAAH,EAAA,OAAAD,MAAAC,EAAA,OAAAE,IAAA;EANIC,KAAA;GAAAtB,OACEkB;GAENjB,OACMoB;EAGT;EAACF,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAPMG;AAON;AAGH,SAASiG,WAAWlD,KAAuC;CACzD,IAAIhJ,SAASmM,OAAO,OAClB;CAGF,OAAO;EACL,GAAInD,IAAIvH,UAAU,EAAE,gBAAgB,KAAK,IAAIgE,KAAAA;EAC7C,GAAIuD,IAAIrH,WAAW,EAAE,iBAAiB,KAAK,IAAI8D,KAAAA;CACjD;AACF;AAEA,SAASoE,QAAQjF,OAA0B;CACzC,OAAO,EAAEA,MAAM;AACjB;AAEA,SAASiM,QAAQH,WAAoC;CACnD,QAAQ9C,UAA6B;EACnC8C,UAAU9C,MAAMgE,YAAYC,OAAOjN,KAAK;CAC1C;AACF"}
1
+ {"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","RefObject","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","IconStyle","ResolvedTheme","useInsideForm","IconStyleContext","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","trailing","variant","FieldVariant","FieldDescriptionPart","id","text","FieldInputProps","Omit","described","numeric","prefix","ref","suffix","FieldMessageProps","characterCount","characterLimitLabel","description","error","length","maxLength","FieldState","focused","hovered","FieldStatesProps","FieldStrokeProps","StrokeMotion","sides","style","LabelPlace","fontSize","letterSpacing","lineHeight","top","color","width","WebState","ICON_SIZE","OUTSIDE_BOX","BoxContext","NO_PARTS","counterFormat","Intl","NumberFormat","describedBy","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","t15","t16","handlers","onHoverIn","t17","onHoverOut","t18","focusOf","t19","box","boxLeading","boxTrailing","boxOutlined","boxDisabled","minHeightOf","lg","bodyLargeLineHeight","sm","bodySmallLineHeight","t20","outline","outlineStart","widthOf","outlineInset","outlineStartBox","outlineNotch","outlineNotchBox","outlineEnd","minWidthOf","outlineEndBox","layer","indicator","t21","onSurfaceVariant","icon","iconStyleOf","t22","t23","t24","t25","column","t26","t27","FieldInput","props","role","mono","fontFamilyMono","content","caret","primary","muted","affixed","clearance","marginTopOf","affixStyle","colorOf","descriptionOf","affixPart","webStateOf","OS","INHERITS_DIRECTION","input","numericOf","affixLine","FieldMessage","insideForm","collapsed","messageStyle","SHRINKS","useErrorAnnouncement","messageLine","messageLineCollapsed","OUT_OF_FLOW","ATOMIC","HIDDEN","NOT_DRAWN","counter","countOf","FieldStates","states","useFieldFocus","onBlur","onFocus","setFocused","event","event_0","const","dir","display","position","flexShrink","Affix","motion","reduceMotion","opacity","timing","duration","durationShort3","easing","bezier","easingStandard","fade","affix","String","BoxLabel","large","small","smallRole","place","bodyLargeSize","bodyLargeTracking","motionStyle","labelOutlined","labelTextOutlined","REQUIRED_MARK","format","parts","map","part","join","said","filter","accessibilityHint","current","focus","size","marginTop","minHeight","minWidth","NotchMeasure","onMeasure","notchMeasure","T1","widthTo","fontFamily","fontVariant","md","FieldStroke","stroke","borderColor","get","borderWidth","borderTopWidth","announceForAccessibility","onErrorContainer","disabledContainer","useStrokeMotion","durationShort2","nativeEvent","layout","_c","state","NativeText","color"],"sources":["../../src/field/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref, RefObject } from 'react'\nimport type {\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 { IconStyle } from '../glyphs/icon-style'\nimport type { ResolvedTheme } from '../theme/scope'\n\nimport { useInsideForm } from '../form'\nimport { IconStyleContext } from '../glyphs/icon-style'\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<ComponentRef<typeof TextInput> | 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 /** An icon at the end of the box, after the control. */\n readonly trailing?: ReactNode\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 | 'placeholderTextColor'\n | 'selectionColor'\n | 'style'\n | 'underlineColorAndroid'\n> & {\n /** What describes the control, after its prefix and suffix. */\n readonly described?: readonly FieldDescriptionPart[]\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 /** 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 * 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\nconst NO_PARTS: readonly FieldDescriptionPart[] = []\n\nlet counterFormat: Intl.NumberFormat | undefined\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 maxLength,\n }: Pick<\n FieldMessageProps,\n 'characterLimitLabel' | 'description' | 'error' | 'maxLength'\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)\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. The states it draws are handed to it,\n * since the field 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 trailing,\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 accessible={false}\n disabled={isDisabled}\n focusable={false}\n onHoverIn={feedback.handlers.onHoverIn}\n onHoverOut={feedback.handlers.onHoverOut}\n onPress={focusOf(control)}\n style={composeStyles<ViewStyle>(\n styles.box,\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 its prefix and suffix, ahead of what the field hands it\n * in `described`, so a reader hears the unit the value is read against as a\n * sighted one sees it beside the value: on iOS and Android as its hint, and\n * under React Native Web through `aria-describedby`, which drops the hint.\n */\nfunction FieldInput({\n described = NO_PARTS,\n numeric = false,\n prefix,\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 clearance = box.underLabel\n ? marginTopOf(typography.bodySmallLineHeight * fontScale)\n : undefined\n const affixStyle = composeStyles<TextStyle>(role, colorOf(muted))\n\n const control = (\n <TextInput\n {...(Platform.OS === 'web' ? INHERITS_DIRECTION : undefined)}\n {...props}\n {...descriptionOf([\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 placeholderTextColor={muted}\n selectionColor={caret}\n style={composeStyles<TextStyle>(\n role,\n styles.input,\n colorOf(content),\n numeric ? numericOf(mono) : undefined,\n minHeightOf(typography.bodyLargeLineHeight * fontScale),\n affixed ? undefined : clearance,\n )}\n underlineColorAndroid=\"transparent\"\n />\n )\n\n if (!affixed) {\n return control\n }\n\n return (\n <View style={composeStyles<ViewStyle>(styles.affixLine, clearance)}>\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 limit = limitOf(maxLength, characterLimitLabel)\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)}\n </NativeText>\n ) : null}\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 * 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// 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/**\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 device's digits and grouping, as web writes it in the\n// reader's locale. One formatter, since the count changes on every keystroke.\nfunction countOf(length: number, maxLength: number | undefined) {\n counterFormat ??= new Intl.NumberFormat()\n\n return maxLength === undefined\n ? counterFormat.format(length)\n : `${counterFormat.format(length)}/${counterFormat.format(maxLength)}`\n}\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<ComponentRef<typeof TextInput> | null>) {\n return () => {\n control.current?.focus()\n }\n}\n\nfunction iconStyleOf(color: string): IconStyle {\n return { color, size: ICON_SIZE }\n}\n\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 English, which\n * an app in another language replaces through `characterLimitLabel`.\n */\nfunction limitOf(maxLength: number | undefined, label: string | undefined) {\n if (maxLength === undefined) {\n return undefined\n }\n\n return (\n label ??\n (maxLength === 1\n ? 'Up to 1 character'\n : `Up to ${String(maxLength)} characters`)\n )\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// Says an error on iOS as it arrives. An error the field opened with is not\n// said, and neither is one that has not changed.\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 {\n describedBy,\n FieldBox,\n FieldInput,\n FieldMessage,\n FieldStates,\n FieldStroke,\n useFieldFocus,\n useStrokeMotion,\n}\nexport type {\n FieldBoxProps,\n FieldDescriptionPart,\n FieldInputProps,\n FieldMessageProps,\n FieldStatesProps,\n FieldStrokeProps,\n FieldVariant,\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqQA,MAAMoG,YAAY;AAGlB,MAAMC,cAA0B;CAC9BxD,UAAU;CACVC,SAAS;CACTC,SAAS;CACTC,OAAO;CACPC,UAAU;CACVC,YAAY;AACd;AAEA,MAAMoD,aAAa1F,cAA0ByF,WAAW;AAExD,MAAME,WAA4C,CAAA;AAElD,IAAIC;;;;;;;AAQJ,SAASG,YACPvC,IACA,EACEW,qBACAC,aACAC,OACAE,aAK+B;CACjC,MAAMyB,MAAMC,MAAMzC,EAAE;CACpB,MAAM0C,UACJ7B,UAAU8B,KAAAA,IACN;EAAE3C,IAAIwC,IAAI5B;EAAaX,MAAMW,eAAe;CAAG,IAC/C;EAAEZ,IAAIwC,IAAI3B;EAAOZ,MAAMY;CAAM;CACnC,MAAM+B,QAAQC,QAAQ9B,WAAWJ,mBAAmB;CAEpD,OAAO,CACL,GAAI+B,QAAQzC,SAAS,KAAK,CAAA,IAAK,CAACyC,OAAO,GACvC,GAAIE,UAAUD,KAAAA,IAAY,CAAA,IAAK,CAAC;EAAE3C,IAAIwC,IAAII;EAAO3C,MAAM2C;CAAM,CAAC,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IAAIgE,KAAAA;EAC7C,GAAIuD,IAAIrH,WAAW,EAAE,iBAAiB,KAAK,IAAI8D,KAAAA;CACjD;AACF;AAEA,SAASoE,QAAQjF,OAA0B;CACzC,OAAO,EAAEA,MAAM;AACjB;AAEA,SAASiM,QAAQH,WAAoC;CACnD,QAAQ9C,UAA6B;EACnC8C,UAAU9C,MAAMgE,YAAYC,OAAOjN,KAAK;CAC1C;AACF"}
@@ -1,5 +1,5 @@
1
1
  import { TextInput } from "react-native";
2
- import "react";
2
+ import { ComponentRef } from "react";
3
3
  //#region src/form/index.d.ts
4
4
  /**
5
5
  * `aria` shows a field's error as soon as the field says so, and lets the
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["RefObject","TextInput","createContext","use","useEffect","useId","useRef","useState","FieldValidationOptions","control","error","isDisabled","isEmpty","isReadOnly","isRequired","name","submitted","validate","value","T","ValidationResult","FormEntry","blocks","focus","show","submits","FormRegistry","entries","remove","id","set","entry","FormState","registry","requestSubmit","validationBehavior","FormValidationBehavior","validationErrors","ValidationErrors","FormValues","Readonly","Record","ValidationError","FIELD_VALIDATION_BEHAVIOR","REQUIRED_ERROR","NO_ERRORS","NO_MESSAGES","FormContext","createRegistry","fields","Map","values","delete","focusOf","current","lineOf","messages","length","undefined","join","messagesOf","result","submitOf","onSubmit","blocking","filter","first","at","Object","fromEntries","flatMap","useFieldValidation","t0","$","_c","form","behavior","serverErrors","clearedFrom","setClearedFrom","showing","setShowing","edited","native","barred","server","client","own","shown","t1","t2","t3","Symbol","for","t4","t5","t6","t7","t8","t9","t10","t11","t12","onBlur","onEdit","useInsideForm","_c"],"sources":["../../src/form/index.ts"],"sourcesContent":["import type { RefObject } from 'react'\nimport type { TextInput } from 'react-native'\n\nimport { createContext, use, useEffect, useId, useRef, useState } from 'react'\n\n// What a Form tells the fields inside it, and what each field tells it back,\n// as React Aria's Form and its fields do through context on web. The form\n// hands down how its fields validate and the errors a server sent back, by\n// field name. Each field registers with the form around it while it is\n// mounted, in the order the tree mounts them, which is the order they are\n// drawn in, and the form reads that list when it is submitted: the values by\n// name, and under `native` which fields hold it back and which of them takes\n// focus.\n\ntype FieldValidationOptions<T> = {\n /** The control a failed native submission focuses. */\n readonly control: RefObject<null | TextInput>\n /** The field's own error, which wins over anything the form says. */\n readonly error: string | undefined\n readonly isDisabled: boolean\n /** Whether the value is what a required field must not be left as. */\n readonly isEmpty: boolean\n readonly isReadOnly: boolean\n readonly isRequired: boolean\n readonly name: string | undefined\n /** The value as the form submits it. */\n readonly submitted: string\n readonly validate: ((value: T) => ValidationResult) | undefined\n readonly value: T\n}\n\n/** What a field tells the form it is in, as of its last render. */\ntype FormEntry = {\n /** Whether the field holds a native submission back. */\n readonly blocks: boolean\n /** Moves focus to the field's control. */\n readonly focus: () => void\n /** Shows the field's own error, once a submission it held back is tried. */\n readonly show: () => void\n /** The name and value the field submits, where it submits one. */\n readonly submits: readonly [string, string] | undefined\n}\n\ntype FormRegistry = {\n readonly entries: () => readonly FormEntry[]\n readonly remove: (id: string) => void\n readonly set: (id: string, entry: FormEntry) => void\n}\n\ntype FormState = {\n readonly registry: FormRegistry\n readonly requestSubmit: () => void\n readonly validationBehavior: FormValidationBehavior\n readonly validationErrors: ValidationErrors\n}\n\n/**\n * `aria` shows a field's error as soon as the field says so, and lets the\n * form submit regardless. `native` holds the form back while a field in it is\n * required and empty, or rejected by its `validate`, and shows that field's\n * error once a submission is tried.\n */\ntype FormValidationBehavior = 'aria' | 'native'\n\n/** The values a form submits, as strings by each field's `name`. */\ntype FormValues = Readonly<Record<string, string>>\n\n/** A field's problem in words: one message, or several read as one line. */\ntype ValidationError = readonly string[] | string\n\n/** Errors keyed by each field's `name`, such as a server's answer. */\ntype ValidationErrors = Readonly<Record<string, ValidationError>>\n\n/**\n * What a field's `validate` returns for a value: its problem in words, or\n * `true`, `null` or `undefined` where there is none, as on web.\n */\ntype ValidationResult = null | true | undefined | ValidationError\n\n/**\n * What a field outside a form, and a form told nothing, validates by. The\n * library shows its own message under a field, so an error shows as the\n * field reports it rather than once a submission is tried.\n */\nconst FIELD_VALIDATION_BEHAVIOR: FormValidationBehavior = 'aria'\n\n/** The error a required field left empty shows under `native`. */\nconst REQUIRED_ERROR = 'Fill out this field.'\n\nconst NO_ERRORS: ValidationErrors = {}\n\nconst NO_MESSAGES: readonly string[] = []\n\nconst FormContext = createContext<FormState | null>(null)\n\n/**\n * The fields a form holds, in the order they registered. A field that is\n * already in it keeps its place as it reports again, so the order is the one\n * they mounted in.\n */\nfunction createRegistry(): FormRegistry {\n const fields = new Map<string, FormEntry>()\n\n return {\n entries: () => [...fields.values()],\n remove: (id) => {\n fields.delete(id)\n },\n set: (id, entry) => {\n fields.set(id, entry)\n },\n }\n}\n\n// Focuses a field's control, through the ref the field holds it in.\nfunction focusOf(control: RefObject<null | TextInput>) {\n return () => {\n control.current?.focus()\n }\n}\n\n// One line of a field's messages, or nothing where there are none.\nfunction lineOf(messages: readonly string[]): string | undefined {\n return messages.length === 0 ? undefined : messages.join(' ')\n}\n\n// A validation result as the messages it holds.\nfunction messagesOf(result: ValidationResult): readonly string[] {\n if (typeof result === 'string') {\n return result === '' ? NO_MESSAGES : [result]\n }\n\n return result === null || result === undefined || result === true\n ? NO_MESSAGES\n : result\n}\n\n/**\n * Submits a form: under `native`, holds it back while any field blocks,\n * showing each blocking field's error and focusing the first, and otherwise\n * hands `onSubmit` every named field's value.\n */\nfunction submitOf(\n registry: FormRegistry,\n validationBehavior: FormValidationBehavior,\n onSubmit: ((values: FormValues) => void) | undefined,\n) {\n return () => {\n const entries = registry.entries()\n\n if (validationBehavior === 'native') {\n const blocking = entries.filter((entry) => entry.blocks)\n const first = blocking.at(0)\n\n if (first !== undefined) {\n for (const entry of blocking) {\n entry.show()\n }\n first.focus()\n return\n }\n }\n\n onSubmit?.(\n Object.fromEntries(\n entries.flatMap((entry) =>\n entry.submits === undefined ? [] : [entry.submits],\n ),\n ),\n )\n }\n}\n\n/**\n * A field's validation, as React Aria's is on web, and its place in the form\n * around it. It hands back the error the field shows, and two handlers the\n * field calls: `onEdit` as its value is edited, and `onBlur` as its control\n * loses focus.\n *\n * The error is the field's own `error` where it has one. Otherwise it is the\n * server's, from the form's `validationErrors` under the field's `name`,\n * until the field is edited; a new `validationErrors` from the form shows it\n * again. Otherwise, under `aria`, it is what `validate` says about the value\n * as it changes.\n *\n * Under `native` that last one, or the required field's own error when it is\n * empty, is shown late and taken back early, as on web: once a submission it\n * holds back is tried, or once the control loses focus after an edit, and no\n * longer once the value is right, so a field shows nothing new in the middle\n * of being typed in. A disabled or read-only field holds nothing back, and a\n * disabled one submits nothing, as a browser bars both from validation and\n * leaves a disabled input out of what a form submits.\n */\nfunction useFieldValidation<T>({\n control,\n error,\n isDisabled,\n isEmpty,\n isReadOnly,\n isRequired,\n name,\n submitted,\n validate,\n value,\n}: FieldValidationOptions<T>) {\n const form = use(FormContext)\n const id = useId()\n const behavior = form?.validationBehavior ?? FIELD_VALIDATION_BEHAVIOR\n const serverErrors = form?.validationErrors ?? NO_ERRORS\n const registry = form?.registry\n // The errors object the field was edited under. Its server error stays\n // cleared until the form is handed a new one.\n const [clearedFrom, setClearedFrom] = useState<null | ValidationErrors>(null)\n const [showing, setShowing] = useState(false)\n // Whether the value has been edited since the control last lost focus,\n // which is when a browser fires `change`, and so when React Aria commits.\n const edited = useRef(false)\n const native = behavior === 'native'\n const barred = isDisabled || isReadOnly\n const server =\n name === undefined || clearedFrom === serverErrors\n ? NO_MESSAGES\n : messagesOf(serverErrors[name])\n const client =\n validate === undefined ? NO_MESSAGES : messagesOf(validate(value))\n const own =\n client.length > 0\n ? client\n : native && isRequired && isEmpty && !barred\n ? [REQUIRED_ERROR]\n : NO_MESSAGES\n\n // Taken back as soon as the value is right, however it got there.\n if (showing && own.length === 0) {\n setShowing(false)\n }\n\n const shown = native ? (showing ? own : NO_MESSAGES) : client\n const entry: FormEntry = {\n blocks:\n !barred && (error !== undefined || server.length > 0 || own.length > 0),\n focus: focusOf(control),\n show: () => {\n setShowing(true)\n },\n submits: isDisabled || name === undefined ? undefined : [name, submitted],\n }\n\n // Reported after every render, so the form reads what the field shows.\n useEffect(() => {\n registry?.set(id, entry)\n })\n\n useEffect(\n () => () => {\n registry?.remove(id)\n },\n [id, registry],\n )\n\n return {\n error: error ?? lineOf(server) ?? lineOf(shown),\n onBlur: () => {\n if (edited.current) {\n edited.current = false\n setClearedFrom(serverErrors)\n setShowing(native)\n }\n },\n onEdit: () => {\n edited.current = true\n setClearedFrom(serverErrors)\n },\n }\n}\n\n/** Whether the field is inside a form, which keeps its message line drawn. */\nfunction useInsideForm() {\n return use(FormContext) !== null\n}\n\nexport {\n createRegistry,\n FIELD_VALIDATION_BEHAVIOR,\n FormContext,\n submitOf,\n useFieldValidation,\n useInsideForm,\n}\nexport type {\n FormValidationBehavior,\n FormValues,\n ValidationError,\n ValidationErrors,\n ValidationResult,\n}\n"],"mappings":";;;;;;;;AAoFA,MAAM2C,4BAAoD;;AAG1D,MAAMC,iBAAiB;AAEvB,MAAMC,YAA8B,CAAC;AAErC,MAAMC,cAAiC,CAAA;AAEvC,MAAMC,cAAc7C,cAAgC,IAAI;;;;;;AAOxD,SAAS8C,iBAA+B;CACtC,MAAMC,yBAAS,IAAIC,IAAuB;CAE1C,OAAO;EACLvB,eAAe,CAAC,GAAGsB,OAAOE,OAAO,CAAC;EAClCvB,SAASC,OAAO;GACdoB,OAAOG,OAAOvB,EAAE;EAClB;EACAC,MAAMD,IAAIE,UAAU;GAClBkB,OAAOnB,IAAID,IAAIE,KAAK;EACtB;CACF;AACF;AAGA,SAASsB,QAAQ5C,SAAsC;CACrD,aAAa;EACXA,QAAQ6C,SAAS/B,MAAM;CACzB;AACF;AAGA,SAASgC,OAAOC,UAAiD;CAC/D,OAAOA,SAASC,WAAW,IAAIC,KAAAA,IAAYF,SAASG,KAAK,GAAG;AAC9D;AAGA,SAASC,WAAWC,QAA6C;CAC/D,IAAI,OAAOA,WAAW,UACpB,OAAOA,WAAW,KAAKf,cAAc,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,EAAA;CAAA,IAAA6B;CAAA,IAAA7B,EAAA,QAAA2B,OAAA3B,EAAA,QAAA4B,OAAA5B,EAAA,QAAA0B,IAAA;EAZIG,MAAA;GAAA5F,OACEyF;GAAwCI,QACvCH;GAMPI,QACOH;EAIV;EAAC5B,EAAA,MAAA2B;EAAA3B,EAAA,MAAA4B;EAAA5B,EAAA,MAAA0B;EAAA1B,EAAA,MAAA6B;CAAA,OAAAA,MAAA7B,EAAA;CAAA,OAbM6B;AAaN;;AAIH,SAASG,gBAAgB;CACvB,OAAOtG,IAAI4C,WAAW,MAAM;AAC9B"}
1
+ {"version":3,"file":"index.js","names":["ComponentRef","RefObject","TextInput","createContext","use","useEffect","useId","useRef","useState","FieldValidationOptions","control","error","isDisabled","isEmpty","isReadOnly","isRequired","name","submitted","validate","value","T","ValidationResult","FormEntry","blocks","focus","show","submits","FormRegistry","entries","remove","id","set","entry","FormState","registry","requestSubmit","validationBehavior","FormValidationBehavior","validationErrors","ValidationErrors","FormValues","Readonly","Record","ValidationError","FIELD_VALIDATION_BEHAVIOR","REQUIRED_ERROR","NO_ERRORS","NO_MESSAGES","FormContext","createRegistry","fields","Map","values","delete","focusOf","current","lineOf","messages","length","undefined","join","messagesOf","result","submitOf","onSubmit","blocking","filter","first","at","Object","fromEntries","flatMap","useFieldValidation","t0","$","_c","form","behavior","serverErrors","clearedFrom","setClearedFrom","showing","setShowing","edited","native","barred","server","client","own","shown","t1","t2","t3","Symbol","for","t4","t5","t6","t7","t8","t9","t10","t11","t12","onBlur","onEdit","useInsideForm","_c"],"sources":["../../src/form/index.ts"],"sourcesContent":["import type { ComponentRef, RefObject } from 'react'\nimport type { TextInput } from 'react-native'\n\nimport { createContext, use, useEffect, useId, useRef, useState } from 'react'\n\n// What a Form tells the fields inside it, and what each field tells it back,\n// as React Aria's Form and its fields do through context on web. The form\n// hands down how its fields validate and the errors a server sent back, by\n// field name. Each field registers with the form around it while it is\n// mounted, in the order the tree mounts them, which is the order they are\n// drawn in, and the form reads that list when it is submitted: the values by\n// name, and under `native` which fields hold it back and which of them takes\n// focus.\n\ntype FieldValidationOptions<T> = {\n /** The control a failed native submission focuses. */\n readonly control: RefObject<ComponentRef<typeof TextInput> | null>\n /** The field's own error, which wins over anything the form says. */\n readonly error: string | undefined\n readonly isDisabled: boolean\n /** Whether the value is what a required field must not be left as. */\n readonly isEmpty: boolean\n readonly isReadOnly: boolean\n readonly isRequired: boolean\n readonly name: string | undefined\n /** The value as the form submits it. */\n readonly submitted: string\n readonly validate: ((value: T) => ValidationResult) | undefined\n readonly value: T\n}\n\n/** What a field tells the form it is in, as of its last render. */\ntype FormEntry = {\n /** Whether the field holds a native submission back. */\n readonly blocks: boolean\n /** Moves focus to the field's control. */\n readonly focus: () => void\n /** Shows the field's own error, once a submission it held back is tried. */\n readonly show: () => void\n /** The name and value the field submits, where it submits one. */\n readonly submits: readonly [string, string] | undefined\n}\n\ntype FormRegistry = {\n readonly entries: () => readonly FormEntry[]\n readonly remove: (id: string) => void\n readonly set: (id: string, entry: FormEntry) => void\n}\n\ntype FormState = {\n readonly registry: FormRegistry\n readonly requestSubmit: () => void\n readonly validationBehavior: FormValidationBehavior\n readonly validationErrors: ValidationErrors\n}\n\n/**\n * `aria` shows a field's error as soon as the field says so, and lets the\n * form submit regardless. `native` holds the form back while a field in it is\n * required and empty, or rejected by its `validate`, and shows that field's\n * error once a submission is tried.\n */\ntype FormValidationBehavior = 'aria' | 'native'\n\n/** The values a form submits, as strings by each field's `name`. */\ntype FormValues = Readonly<Record<string, string>>\n\n/** A field's problem in words: one message, or several read as one line. */\ntype ValidationError = readonly string[] | string\n\n/** Errors keyed by each field's `name`, such as a server's answer. */\ntype ValidationErrors = Readonly<Record<string, ValidationError>>\n\n/**\n * What a field's `validate` returns for a value: its problem in words, or\n * `true`, `null` or `undefined` where there is none, as on web.\n */\ntype ValidationResult = null | true | undefined | ValidationError\n\n/**\n * What a field outside a form, and a form told nothing, validates by. The\n * library shows its own message under a field, so an error shows as the\n * field reports it rather than once a submission is tried.\n */\nconst FIELD_VALIDATION_BEHAVIOR: FormValidationBehavior = 'aria'\n\n/** The error a required field left empty shows under `native`. */\nconst REQUIRED_ERROR = 'Fill out this field.'\n\nconst NO_ERRORS: ValidationErrors = {}\n\nconst NO_MESSAGES: readonly string[] = []\n\nconst FormContext = createContext<FormState | null>(null)\n\n/**\n * The fields a form holds, in the order they registered. A field that is\n * already in it keeps its place as it reports again, so the order is the one\n * they mounted in.\n */\nfunction createRegistry(): FormRegistry {\n const fields = new Map<string, FormEntry>()\n\n return {\n entries: () => [...fields.values()],\n remove: (id) => {\n fields.delete(id)\n },\n set: (id, entry) => {\n fields.set(id, entry)\n },\n }\n}\n\n// Focuses a field's control, through the ref the field holds it in.\nfunction focusOf(control: RefObject<ComponentRef<typeof TextInput> | null>) {\n return () => {\n control.current?.focus()\n }\n}\n\n// One line of a field's messages, or nothing where there are none.\nfunction lineOf(messages: readonly string[]): string | undefined {\n return messages.length === 0 ? undefined : messages.join(' ')\n}\n\n// A validation result as the messages it holds.\nfunction messagesOf(result: ValidationResult): readonly string[] {\n if (typeof result === 'string') {\n return result === '' ? NO_MESSAGES : [result]\n }\n\n return result === null || result === undefined || result === true\n ? NO_MESSAGES\n : result\n}\n\n/**\n * Submits a form: under `native`, holds it back while any field blocks,\n * showing each blocking field's error and focusing the first, and otherwise\n * hands `onSubmit` every named field's value.\n */\nfunction submitOf(\n registry: FormRegistry,\n validationBehavior: FormValidationBehavior,\n onSubmit: ((values: FormValues) => void) | undefined,\n) {\n return () => {\n const entries = registry.entries()\n\n if (validationBehavior === 'native') {\n const blocking = entries.filter((entry) => entry.blocks)\n const first = blocking.at(0)\n\n if (first !== undefined) {\n for (const entry of blocking) {\n entry.show()\n }\n first.focus()\n return\n }\n }\n\n onSubmit?.(\n Object.fromEntries(\n entries.flatMap((entry) =>\n entry.submits === undefined ? [] : [entry.submits],\n ),\n ),\n )\n }\n}\n\n/**\n * A field's validation, as React Aria's is on web, and its place in the form\n * around it. It hands back the error the field shows, and two handlers the\n * field calls: `onEdit` as its value is edited, and `onBlur` as its control\n * loses focus.\n *\n * The error is the field's own `error` where it has one. Otherwise it is the\n * server's, from the form's `validationErrors` under the field's `name`,\n * until the field is edited; a new `validationErrors` from the form shows it\n * again. Otherwise, under `aria`, it is what `validate` says about the value\n * as it changes.\n *\n * Under `native` that last one, or the required field's own error when it is\n * empty, is shown late and taken back early, as on web: once a submission it\n * holds back is tried, or once the control loses focus after an edit, and no\n * longer once the value is right, so a field shows nothing new in the middle\n * of being typed in. A disabled or read-only field holds nothing back, and a\n * disabled one submits nothing, as a browser bars both from validation and\n * leaves a disabled input out of what a form submits.\n */\nfunction useFieldValidation<T>({\n control,\n error,\n isDisabled,\n isEmpty,\n isReadOnly,\n isRequired,\n name,\n submitted,\n validate,\n value,\n}: FieldValidationOptions<T>) {\n const form = use(FormContext)\n const id = useId()\n const behavior = form?.validationBehavior ?? FIELD_VALIDATION_BEHAVIOR\n const serverErrors = form?.validationErrors ?? NO_ERRORS\n const registry = form?.registry\n // The errors object the field was edited under. Its server error stays\n // cleared until the form is handed a new one.\n const [clearedFrom, setClearedFrom] = useState<null | ValidationErrors>(null)\n const [showing, setShowing] = useState(false)\n // Whether the value has been edited since the control last lost focus,\n // which is when a browser fires `change`, and so when React Aria commits.\n const edited = useRef(false)\n const native = behavior === 'native'\n const barred = isDisabled || isReadOnly\n const server =\n name === undefined || clearedFrom === serverErrors\n ? NO_MESSAGES\n : messagesOf(serverErrors[name])\n const client =\n validate === undefined ? NO_MESSAGES : messagesOf(validate(value))\n const own =\n client.length > 0\n ? client\n : native && isRequired && isEmpty && !barred\n ? [REQUIRED_ERROR]\n : NO_MESSAGES\n\n // Taken back as soon as the value is right, however it got there.\n if (showing && own.length === 0) {\n setShowing(false)\n }\n\n const shown = native ? (showing ? own : NO_MESSAGES) : client\n const entry: FormEntry = {\n blocks:\n !barred && (error !== undefined || server.length > 0 || own.length > 0),\n focus: focusOf(control),\n show: () => {\n setShowing(true)\n },\n submits: isDisabled || name === undefined ? undefined : [name, submitted],\n }\n\n // Reported after every render, so the form reads what the field shows.\n useEffect(() => {\n registry?.set(id, entry)\n })\n\n useEffect(\n () => () => {\n registry?.remove(id)\n },\n [id, registry],\n )\n\n return {\n error: error ?? lineOf(server) ?? lineOf(shown),\n onBlur: () => {\n if (edited.current) {\n edited.current = false\n setClearedFrom(serverErrors)\n setShowing(native)\n }\n },\n onEdit: () => {\n edited.current = true\n setClearedFrom(serverErrors)\n },\n }\n}\n\n/** Whether the field is inside a form, which keeps its message line drawn. */\nfunction useInsideForm() {\n return use(FormContext) !== null\n}\n\nexport {\n createRegistry,\n FIELD_VALIDATION_BEHAVIOR,\n FormContext,\n submitOf,\n useFieldValidation,\n useInsideForm,\n}\nexport type {\n FormValidationBehavior,\n FormValues,\n ValidationError,\n ValidationErrors,\n ValidationResult,\n}\n"],"mappings":";;;;;;;;AAoFA,MAAM4C,4BAAoD;;AAG1D,MAAMC,iBAAiB;AAEvB,MAAMC,YAA8B,CAAC;AAErC,MAAMC,cAAiC,CAAA;AAEvC,MAAMC,cAAc7C,cAAgC,IAAI;;;;;;AAOxD,SAAS8C,iBAA+B;CACtC,MAAMC,yBAAS,IAAIC,IAAuB;CAE1C,OAAO;EACLvB,eAAe,CAAC,GAAGsB,OAAOE,OAAO,CAAC;EAClCvB,SAASC,OAAO;GACdoB,OAAOG,OAAOvB,EAAE;EAClB;EACAC,MAAMD,IAAIE,UAAU;GAClBkB,OAAOnB,IAAID,IAAIE,KAAK;EACtB;CACF;AACF;AAGA,SAASsB,QAAQ5C,SAA2D;CAC1E,aAAa;EACXA,QAAQ6C,SAAS/B,MAAM;CACzB;AACF;AAGA,SAASgC,OAAOC,UAAiD;CAC/D,OAAOA,SAASC,WAAW,IAAIC,KAAAA,IAAYF,SAASG,KAAK,GAAG;AAC9D;AAGA,SAASC,WAAWC,QAA6C;CAC/D,IAAI,OAAOA,WAAW,UACpB,OAAOA,WAAW,KAAKf,cAAc,CAAC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AA;CAAA,IAAA6B;CAAA,IAAA7B,EAAA,QAAA2B,OAAA3B,EAAA,QAAA4B,OAAA5B,EAAA,QAAA0B,IAAA;EAZIG,MAAA;GAAA5F,OACEyF;GAAwCI,QACvCH;GAMPI,QACOH;EAIV;EAAC5B,EAAA,MAAA2B;EAAA3B,EAAA,MAAA4B;EAAA5B,EAAA,MAAA0B;EAAA1B,EAAA,MAAA6B;CAAA,OAAAA,MAAA7B,EAAA;CAAA,OAbM6B;AAaN;;AAIH,SAASG,gBAAgB;CACvB,OAAOtG,IAAI4C,WAAW,MAAM;AAC9B"}
@@ -0,0 +1,13 @@
1
+ import { Platform } from "react-native";
2
+ //#region src/glyphs/hidden.ts
3
+ const HIDDEN = Platform.select({
4
+ default: {
5
+ accessibilityElementsHidden: true,
6
+ importantForAccessibility: "no-hide-descendants"
7
+ },
8
+ web: { "aria-hidden": true }
9
+ });
10
+ //#endregion
11
+ export { HIDDEN };
12
+
13
+ //# sourceMappingURL=hidden.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hidden.js","names":["SvgProps","Platform","HIDDEN","select","default","accessibilityElementsHidden","importantForAccessibility","web"],"sources":["../../src/glyphs/hidden.ts"],"sourcesContent":["import type { SvgProps } from 'react-native-svg'\n\nimport { Platform } from 'react-native'\n\n// What hides an svg from screen readers, for the glyphs and anything else the\n// library draws in one. On iOS and Android that is React Native's two props,\n// one for VoiceOver and one for TalkBack. Under React Native Web,\n// react-native-svg hands its props to the `<svg>` as they are, so it is\n// `aria-hidden` there, which is the one the browser reads.\nconst HIDDEN = Platform.select<SvgProps>({\n default: {\n accessibilityElementsHidden: true,\n importantForAccessibility: 'no-hide-descendants',\n },\n web: { 'aria-hidden': true },\n})\n\nexport { HIDDEN }\n"],"mappings":";;AASA,MAAME,SAASD,SAASE,OAAiB;CACvCC,SAAS;EACPC,6BAA6B;EAC7BC,2BAA2B;CAC7B;CACAC,KAAK,EAAE,eAAe,KAAK;AAC7B,CAAC"}
@@ -1,17 +1,11 @@
1
+ import { HIDDEN } from "./hidden.js";
1
2
  import { useIconStyle } from "./icon-style.js";
2
3
  import { glyphStyles } from "./styles.js";
3
4
  import { c } from "react/compiler-runtime";
4
- import { I18nManager, Platform, StyleSheet } from "react-native";
5
+ import { I18nManager, StyleSheet } from "react-native";
5
6
  import Svg, { Path } from "react-native-svg";
6
7
  import { jsx } from "react/jsx-runtime";
7
8
  //#region src/glyphs/index.tsx
8
- const HIDDEN = Platform.select({
9
- default: {
10
- accessibilityElementsHidden: true,
11
- importantForAccessibility: "no-hide-descendants"
12
- },
13
- web: { "aria-hidden": true }
14
- });
15
9
  function CheckGlyph(props) {
16
10
  const $ = c(3);
17
11
  let t0;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ReactNode","ColorValue","StyleProp","ViewStyle","SvgProps","I18nManager","Platform","StyleSheet","Svg","Path","useIconStyle","glyphStyles","GlyphProps","color","size","style","testID","HIDDEN","select","default","accessibilityElementsHidden","importantForAccessibility","web","ArrowBackGlyph","props","$","_c","t0","Symbol","for","t1","ArrowDownwardGlyph","ArrowDropDownGlyph","ArrowUpwardGlyph","CalendarGlyph","CheckGlyph","ChevronDownGlyph","ChevronEndGlyph","ClockGlyph","CloseGlyph","Glyph","children","mirrored","undefined","slot","side","t2","t3","compose","isRTL","t4","KeyboardGlyph","MinusGlyph","IndeterminateGlyph","PersonGlyph","PlusGlyph","SearchGlyph","_c"],"sources":["../../src/glyphs/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { ColorValue, StyleProp, ViewStyle } from 'react-native'\nimport type { SvgProps } from 'react-native-svg'\n\nimport { I18nManager, Platform, StyleSheet } from 'react-native'\nimport Svg, { Path } from 'react-native-svg'\n\nimport { useIconStyle } from './icon-style'\nimport { glyphStyles } from './styles'\n\n// The glyphs the library's own controls draw, the same set kanso-ui draws on\n// web: the check and the dash a checkbox shows, the plus and minus a number\n// field's steppers show, the magnifier and cross a search field shows, and the\n// rest named beside each one. Private to the library, as on web: a call site\n// with icons of its own passes them to the slots that take a node, and reads\n// the slot's colour and size through `useIconStyle()`.\n//\n// The paths are kanso-ui's, unchanged: Material Symbols on their 24-unit grid,\n// which is what the checkbox page draws at 18dp, the icon buttons page at 20\n// and the search, menus, date picker and time picker pages at 24.\n\ntype GlyphProps = {\n /** The fill. Defaults to the colour of the slot the glyph sits in. */\n readonly color?: ColorValue\n /** The square's side in dp. Defaults to the size of the slot. */\n readonly size?: number\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\n// What hides a glyph from screen readers. On iOS and Android that is React\n// Native's two props, one for VoiceOver and one for TalkBack. Under React\n// Native Web, react-native-svg hands its props to the `<svg>` as they are, so\n// it is `aria-hidden` there, which is the one the browser reads.\nconst HIDDEN = Platform.select<SvgProps>({\n default: {\n accessibilityElementsHidden: true,\n importantForAccessibility: 'no-hide-descendants',\n },\n web: { 'aria-hidden': true },\n})\n\n// What a search view's back button draws, pointing at the page it returns to.\n// It says \"back\" rather than \"to the left\", so it mirrors under a right-to-left\n// layout.\nfunction ArrowBackGlyph(props: GlyphProps) {\n return (\n <Glyph {...props} mirrored>\n <Path d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\" />\n </Glyph>\n )\n}\n\n// Which way a sorted column is ordered. Up is ascending and down is\n// descending. Neither mirrors under a right-to-left layout: they say \"up\" and\n// \"down\" rather than \"onward\", and those do not flip.\nfunction ArrowDownwardGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z\" />\n </Glyph>\n )\n}\n\n// What a menu button draws after its label, pointing at the list it opens.\n// Down is down in either writing direction, so it does not mirror.\nfunction ArrowDropDownGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M7 10l5 5 5-5z\" />\n </Glyph>\n )\n}\n\nfunction ArrowUpwardGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z\" />\n </Glyph>\n )\n}\n\n// What the date picker's trigger draws: the calendar a date is picked from.\nfunction CalendarGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 4h-1V2h-2v2H8V2H6v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2z\" />\n </Glyph>\n )\n}\n\nfunction CheckGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\" />\n </Glyph>\n )\n}\n\n// Points down at the menu a split button's second half opens.\nfunction ChevronDownGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z\" />\n </Glyph>\n )\n}\n\n// Points at the submenu a menu item opens. It says \"further in\" rather than\n// \"to the right\", so it mirrors under a right-to-left layout.\nfunction ChevronEndGlyph(props: GlyphProps) {\n return (\n <Glyph {...props} mirrored>\n <Path d=\"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\" />\n </Glyph>\n )\n}\n\n// What the time picker's trigger draws, and the button that takes its keyboard\n// entry back to the dial: the clock a time is picked from.\nfunction ClockGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z\" />\n </Glyph>\n )\n}\n\nfunction CloseGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\" />\n </Glyph>\n )\n}\n\n/**\n * The svg every glyph draws: the 24-unit grid its path is on, a square of the\n * slot's size filled in the slot's colour, and nothing a screen reader\n * announces, since the control around a glyph carries the name. A glyph whose\n * direction means \"onward\" or \"back\" passes `mirrored`, which turns it over\n * under a right-to-left layout as `:dir(rtl)` does on web.\n */\nfunction Glyph({\n children,\n color,\n mirrored = false,\n size,\n style,\n testID,\n}: GlyphProps & { readonly children: ReactNode; readonly mirrored?: boolean }) {\n const slot = useIconStyle()\n const side = size ?? slot.size\n return (\n <Svg\n {...HIDDEN}\n color={color ?? slot.color}\n fill=\"currentColor\"\n height={side}\n style={StyleSheet.compose(\n mirrored && I18nManager.isRTL ? glyphStyles.mirrored : undefined,\n style,\n )}\n testID={testID}\n viewBox=\"0 0 24 24\"\n width={side}\n >\n {children}\n </Svg>\n )\n}\n\n// What the time picker's dial draws on the button that switches it to typed\n// entry.\nfunction KeyboardGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H4V7h16v10zm-9-9h2v2h-2zm0 3h2v2h-2zM8 8h2v2H8zm0 3h2v2H8zm-3 0h2v2H5zm0-3h2v2H5zm3 6h8v2H8zm6-3h2v2h-2zm0-3h2v2h-2zm3 3h2v2h-2zm0-3h2v2h-2z\" />\n </Glyph>\n )\n}\n\n// The same rule stands for a partly selected checkbox and for a stepper's\n// decrement; the two names say which is meant at the call site.\nfunction MinusGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 13H5v-2h14v2z\" />\n </Glyph>\n )\n}\n\nconst IndeterminateGlyph = MinusGlyph\n\n// What an avatar with no name to take initials from draws: Material Design's\n// anonymous person, a head over shoulders.\nfunction PersonGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\" />\n </Glyph>\n )\n}\n\nfunction PlusGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\" />\n </Glyph>\n )\n}\n\nfunction SearchGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\" />\n </Glyph>\n )\n}\n\nexport {\n ArrowBackGlyph,\n ArrowDownwardGlyph,\n ArrowDropDownGlyph,\n ArrowUpwardGlyph,\n CalendarGlyph,\n CheckGlyph,\n ChevronDownGlyph,\n ChevronEndGlyph,\n ClockGlyph,\n CloseGlyph,\n IndeterminateGlyph,\n KeyboardGlyph,\n MinusGlyph,\n PersonGlyph,\n PlusGlyph,\n SearchGlyph,\n}\nexport type { GlyphProps }\n"],"mappings":";;;;;;;AAkCA,MAAMiB,SAASX,SAASY,OAAiB;CACvCC,SAAS;EACPC,6BAA6B;EAC7BC,2BAA2B;CAC7B;CACAC,KAAK,EAAE,eAAe,KAAK;AAC7B,CAAC;AAmDD,SAAAa,WAAAX,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAG,OAAAC,IAAA,2BAAA,GAAA;EAGMF,KAAA,oBAAC,MAAD,EAAQ,GAAA,oDAAmD,CAAA;EAAGF,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAK;CAAA,IAAAL,EAAA,OAAAD,OAAA;EADh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;AAIZ,SAAAyB,UAAA/B,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAG,OAAAC,IAAA,2BAAA,GAAA;EAGMF,KAAA,oBAAC,MAAD,EAAQ,GAAA,sCAAqC,CAAA;EAAGF,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAK;CAAA,IAAAL,EAAA,OAAAD,OAAA;EADlDM,KAAA,oBAAC,OAAD;GAAM,GAAKN;GACTG,UAAAA;EADI,CAAA;EAEEF,EAAA,KAAAD;EAAAC,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAFRK;AAEQ;AAIZ,SAAA0B,YAAAhC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAG,OAAAC,IAAA,2BAAA,GAAA;EAGMF,KAAA,oBAAC,MAAD,EAAQ,GAAA,6MAA4M,CAAA;EAAGF,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAK;CAAA,IAAAL,EAAA,OAAAD,OAAA;EADzNM,KAAA,oBAAC,OAAD;GAAM,GAAKN;GACTG,UAAAA;EADI,CAAA;EAEEF,EAAA,KAAAD;EAAAC,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAFRK;AAEQ"}
1
+ {"version":3,"file":"index.js","names":["ReactNode","ColorValue","StyleProp","ViewStyle","I18nManager","StyleSheet","Svg","Path","HIDDEN","useIconStyle","glyphStyles","GlyphProps","color","size","style","testID","ArrowBackGlyph","props","$","_c","t0","Symbol","for","t1","ArrowDownwardGlyph","ArrowDropDownGlyph","ArrowUpwardGlyph","CalendarGlyph","CheckGlyph","ChevronDownGlyph","ChevronEndGlyph","ClockGlyph","CloseGlyph","Glyph","children","mirrored","undefined","slot","side","t2","t3","compose","isRTL","t4","KeyboardGlyph","MinusGlyph","IndeterminateGlyph","PersonGlyph","PlusGlyph","SearchGlyph","_c"],"sources":["../../src/glyphs/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { ColorValue, StyleProp, ViewStyle } from 'react-native'\n\nimport { I18nManager, StyleSheet } from 'react-native'\nimport Svg, { Path } from 'react-native-svg'\n\nimport { HIDDEN } from './hidden'\nimport { useIconStyle } from './icon-style'\nimport { glyphStyles } from './styles'\n\n// The glyphs the library's own controls draw, the same set kanso-ui draws on\n// web: the check and the dash a checkbox shows, the plus and minus a number\n// field's steppers show, the magnifier and cross a search field shows, and the\n// rest named beside each one. Private to the library, as on web: a call site\n// with icons of its own passes them to the slots that take a node, and reads\n// the slot's colour and size through `useIconStyle()`.\n//\n// The paths are kanso-ui's, unchanged: Material Symbols on their 24-unit grid,\n// which is what the checkbox page draws at 18dp, the icon buttons page at 20\n// and the search, menus, date picker and time picker pages at 24.\n\ntype GlyphProps = {\n /** The fill. Defaults to the colour of the slot the glyph sits in. */\n readonly color?: ColorValue\n /** The square's side in dp. Defaults to the size of the slot. */\n readonly size?: number\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\n// What a search view's back button draws, pointing at the page it returns to.\n// It says \"back\" rather than \"to the left\", so it mirrors under a right-to-left\n// layout.\nfunction ArrowBackGlyph(props: GlyphProps) {\n return (\n <Glyph {...props} mirrored>\n <Path d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\" />\n </Glyph>\n )\n}\n\n// Which way a sorted column is ordered. Up is ascending and down is\n// descending. Neither mirrors under a right-to-left layout: they say \"up\" and\n// \"down\" rather than \"onward\", and those do not flip.\nfunction ArrowDownwardGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z\" />\n </Glyph>\n )\n}\n\n// What a menu button draws after its label, pointing at the list it opens.\n// Down is down in either writing direction, so it does not mirror.\nfunction ArrowDropDownGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M7 10l5 5 5-5z\" />\n </Glyph>\n )\n}\n\nfunction ArrowUpwardGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z\" />\n </Glyph>\n )\n}\n\n// What the date picker's trigger draws: the calendar a date is picked from.\nfunction CalendarGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 4h-1V2h-2v2H8V2H6v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2z\" />\n </Glyph>\n )\n}\n\nfunction CheckGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\" />\n </Glyph>\n )\n}\n\n// Points down at the menu a split button's second half opens.\nfunction ChevronDownGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z\" />\n </Glyph>\n )\n}\n\n// Points at the submenu a menu item opens. It says \"further in\" rather than\n// \"to the right\", so it mirrors under a right-to-left layout.\nfunction ChevronEndGlyph(props: GlyphProps) {\n return (\n <Glyph {...props} mirrored>\n <Path d=\"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\" />\n </Glyph>\n )\n}\n\n// What the time picker's trigger draws, and the button that takes its keyboard\n// entry back to the dial: the clock a time is picked from.\nfunction ClockGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z\" />\n </Glyph>\n )\n}\n\nfunction CloseGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\" />\n </Glyph>\n )\n}\n\n/**\n * The svg every glyph draws: the 24-unit grid its path is on, a square of the\n * slot's size filled in the slot's colour, and nothing a screen reader\n * announces, since the control around a glyph carries the name. A glyph whose\n * direction means \"onward\" or \"back\" passes `mirrored`, which turns it over\n * under a right-to-left layout as `:dir(rtl)` does on web.\n */\nfunction Glyph({\n children,\n color,\n mirrored = false,\n size,\n style,\n testID,\n}: GlyphProps & { readonly children: ReactNode; readonly mirrored?: boolean }) {\n const slot = useIconStyle()\n const side = size ?? slot.size\n return (\n <Svg\n {...HIDDEN}\n color={color ?? slot.color}\n fill=\"currentColor\"\n height={side}\n style={StyleSheet.compose(\n mirrored && I18nManager.isRTL ? glyphStyles.mirrored : undefined,\n style,\n )}\n testID={testID}\n viewBox=\"0 0 24 24\"\n width={side}\n >\n {children}\n </Svg>\n )\n}\n\n// What the time picker's dial draws on the button that switches it to typed\n// entry.\nfunction KeyboardGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H4V7h16v10zm-9-9h2v2h-2zm0 3h2v2h-2zM8 8h2v2H8zm0 3h2v2H8zm-3 0h2v2H5zm0-3h2v2H5zm3 6h8v2H8zm6-3h2v2h-2zm0-3h2v2h-2zm3 3h2v2h-2zm0-3h2v2h-2z\" />\n </Glyph>\n )\n}\n\n// The same rule stands for a partly selected checkbox and for a stepper's\n// decrement; the two names say which is meant at the call site.\nfunction MinusGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 13H5v-2h14v2z\" />\n </Glyph>\n )\n}\n\nconst IndeterminateGlyph = MinusGlyph\n\n// What an avatar with no name to take initials from draws: Material Design's\n// anonymous person, a head over shoulders.\nfunction PersonGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\" />\n </Glyph>\n )\n}\n\nfunction PlusGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\" />\n </Glyph>\n )\n}\n\nfunction SearchGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\" />\n </Glyph>\n )\n}\n\nexport {\n ArrowBackGlyph,\n ArrowDownwardGlyph,\n ArrowDropDownGlyph,\n ArrowUpwardGlyph,\n CalendarGlyph,\n CheckGlyph,\n ChevronDownGlyph,\n ChevronEndGlyph,\n ClockGlyph,\n CloseGlyph,\n IndeterminateGlyph,\n KeyboardGlyph,\n MinusGlyph,\n PersonGlyph,\n PlusGlyph,\n SearchGlyph,\n}\nexport type { GlyphProps }\n"],"mappings":";;;;;;;;AA+EA,SAAA4B,WAAAX,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAG,OAAAC,IAAA,2BAAA,GAAA;EAGMF,KAAA,oBAAC,MAAD,EAAQ,GAAA,oDAAmD,CAAA;EAAGF,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAK;CAAA,IAAAL,EAAA,OAAAD,OAAA;EADhEM,KAAA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AAAyB,UAAA/B,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAG,OAAAC,IAAA,2BAAA,GAAA;EAGMF,KAAA,oBAAC,MAAD,EAAQ,GAAA,sCAAqC,CAAA;EAAGF,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAK;CAAA,IAAAL,EAAA,OAAAD,OAAA;EADlDM,KAAA,oBAAC,OAAD;GAAM,GAAKN;GACTG,UAAAA;EADI,CAAA;EAEEF,EAAA,KAAAD;EAAAC,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAFRK;AAEQ;AAIZ,SAAA0B,YAAAhC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAG,OAAAC,IAAA,2BAAA,GAAA;EAGMF,KAAA,oBAAC,MAAD,EAAQ,GAAA,6MAA4M,CAAA;EAAGF,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAK;CAAA,IAAAL,EAAA,OAAAD,OAAA;EADzNM,KAAA,oBAAC,OAAD;GAAM,GAAKN;GACTG,UAAAA;EADI,CAAA;EAEEF,EAAA,KAAAD;EAAAC,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAFRK;AAEQ"}
@@ -0,0 +1,23 @@
1
+ import { localeOf } from "../number/locale.js";
2
+ import { MESSAGES } from "./messages.js";
3
+ //#region src/i18n/index.ts
4
+ const TABLE = new Map(Object.entries(MESSAGES));
5
+ const cache = /* @__PURE__ */ new Map();
6
+ function lookUp(locale) {
7
+ const tag = locale.split("-u-")[0];
8
+ const language = tag.split("-")[0];
9
+ return TABLE.get(tag) ?? [...TABLE].find(([key]) => key.startsWith(`${language}-`))?.[1] ?? MESSAGES["en-US"];
10
+ }
11
+ /** The library's words in `locale`, or in the device's when given none. */
12
+ function messagesFor(locale) {
13
+ const resolved = localeOf(locale);
14
+ const cached = cache.get(resolved);
15
+ if (cached !== void 0) return cached;
16
+ const messages = lookUp(resolved);
17
+ cache.set(resolved, messages);
18
+ return messages;
19
+ }
20
+ //#endregion
21
+ export { messagesFor };
22
+
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["LibraryMessages","localeOf","MESSAGES","TABLE","Map","Object","entries","cache","lookUp","locale","tag","split","language","get","find","key","startsWith","messagesFor","resolved","cached","undefined","messages","set"],"sources":["../../src/i18n/index.ts"],"sourcesContent":["import type { LibraryMessages } from './messages'\n\nimport { localeOf } from '../number/locale'\nimport { MESSAGES } from './messages'\n\n// The words the library writes itself, in the locale a component is given or\n// the device's. Web reads them through React Aria's dictionary, in the\n// I18nProvider's locale, and this falls back the way that dictionary does: the\n// table's entry for the locale, then the first for its language, then English,\n// so `fr-CA` reads French and a locale the table lacks reads English.\n\nconst TABLE = new Map(Object.entries(MESSAGES))\n\n// One set per locale an app renders in, looked up the first time a component\n// asks for it.\nconst cache = new Map<string, LibraryMessages>()\n\n// A device's locale can carry a Unicode extension, `pt-PT-u-nu-latn`, which\n// says how numbers are written rather than which words; it is set aside, or\n// `pt-PT` would match no entry and read the first Portuguese one, Brazil's.\nfunction lookUp(locale: string): LibraryMessages {\n const tag = locale.split('-u-')[0]\n const language = tag.split('-')[0]\n\n return (\n TABLE.get(tag) ??\n [...TABLE].find(([key]) => key.startsWith(`${language}-`))?.[1] ??\n MESSAGES['en-US']\n )\n}\n\n/** The library's words in `locale`, or in the device's when given none. */\nfunction messagesFor(locale?: string): LibraryMessages {\n const resolved = localeOf(locale)\n const cached = cache.get(resolved)\n\n if (cached !== undefined) {\n return cached\n }\n\n const messages = lookUp(resolved)\n cache.set(resolved, messages)\n return messages\n}\n\nexport { messagesFor }\nexport type { LibraryMessages }\n"],"mappings":";;;AAWA,MAAMG,QAAQ,IAAIC,IAAIC,OAAOC,QAAQJ,QAAQ,CAAC;AAI9C,MAAMK,wBAAQ,IAAIH,IAA6B;AAK/C,SAASI,OAAOC,QAAiC;CAC/C,MAAMC,MAAMD,OAAOE,MAAM,KAAK,CAAC,CAAC;CAChC,MAAMC,WAAWF,IAAIC,MAAM,GAAG,CAAC,CAAC;CAEhC,OACER,MAAMU,IAAIH,GAAG,KACb,CAAC,GAAGP,KAAK,CAAC,CAACW,MAAM,CAACC,SAASA,IAAIC,WAAW,GAAGJ,SAAQ,EAAG,CAAC,CAAC,GAAG,MAC7DV,SAAS;AAEb;;AAGA,SAASe,YAAYR,QAAkC;CACrD,MAAMS,WAAWjB,SAASQ,MAAM;CAChC,MAAMU,SAASZ,MAAMM,IAAIK,QAAQ;CAEjC,IAAIC,WAAWC,KAAAA,GACb,OAAOD;CAGT,MAAME,WAAWb,OAAOU,QAAQ;CAChCX,MAAMe,IAAIJ,UAAUG,QAAQ;CAC5B,OAAOA;AACT"}
@@ -0,0 +1,41 @@
1
+ //#region src/i18n/messages.ts
2
+ const MESSAGES = {
3
+ "ar-AE": { loading: "جارٍ التحميل" },
4
+ "bg-BG": { loading: "Зареждане" },
5
+ "cs-CZ": { loading: "Načítání" },
6
+ "da-DK": { loading: "Indlæser" },
7
+ "de-DE": { loading: "Wird geladen" },
8
+ "el-GR": { loading: "Φόρτωση" },
9
+ "en-US": { loading: "Loading" },
10
+ "es-ES": { loading: "Cargando" },
11
+ "et-EE": { loading: "Laadimine" },
12
+ "fi-FI": { loading: "Ladataan" },
13
+ "fr-FR": { loading: "Chargement" },
14
+ "he-IL": { loading: "טוען" },
15
+ "hr-HR": { loading: "Učitavanje" },
16
+ "hu-HU": { loading: "Betöltés" },
17
+ "it-IT": { loading: "Caricamento" },
18
+ "ja-JP": { loading: "読み込み中" },
19
+ "ko-KR": { loading: "로드 중" },
20
+ "lt-LT": { loading: "Įkeliama" },
21
+ "lv-LV": { loading: "Notiek ielāde" },
22
+ "nb-NO": { loading: "Laster inn" },
23
+ "nl-NL": { loading: "Laden" },
24
+ "pl-PL": { loading: "Ładowanie" },
25
+ "pt-BR": { loading: "Carregando" },
26
+ "pt-PT": { loading: "A carregar" },
27
+ "ro-RO": { loading: "Se încarcă" },
28
+ "ru-RU": { loading: "Загрузка" },
29
+ "sk-SK": { loading: "Načítava sa" },
30
+ "sl-SI": { loading: "Nalaganje" },
31
+ "sr-SP": { loading: "Učitavanje" },
32
+ "sv-SE": { loading: "Läser in" },
33
+ "tr-TR": { loading: "Yükleniyor" },
34
+ "uk-UA": { loading: "Завантаження" },
35
+ "zh-CN": { loading: "正在加载" },
36
+ "zh-TW": { loading: "正在載入" }
37
+ };
38
+ //#endregion
39
+ export { MESSAGES };
40
+
41
+ //# sourceMappingURL=messages.js.map