@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.
- package/dist/button/index.d.ts +32 -2
- package/dist/button/index.js +38 -26
- package/dist/button/index.js.map +1 -1
- package/dist/button/pending.js +144 -0
- package/dist/button/pending.js.map +1 -0
- package/dist/button/slots.js +7 -0
- package/dist/button/slots.js.map +1 -0
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/button/index.d.ts +3 -3
- package/dist/components/button/index.js +159 -111
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/card/index.d.ts +2 -2
- package/dist/components/card/index.js.map +1 -1
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/chip/index.d.ts +2 -2
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/chip-group/index.d.ts +3 -3
- package/dist/components/chip-group/index.js.map +1 -1
- package/dist/components/copy-field/index.d.ts +2 -2
- package/dist/components/copy-field/index.js.map +1 -1
- package/dist/components/dialog/index.d.ts +131 -0
- package/dist/components/dialog/index.js +861 -0
- package/dist/components/dialog/index.js.map +1 -0
- package/dist/components/icon-button/index.d.ts +3 -3
- package/dist/components/icon-button/index.js +165 -109
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/link/index.js.map +1 -1
- package/dist/components/meter/index.d.ts +73 -0
- package/dist/components/meter/index.js +179 -0
- package/dist/components/meter/index.js.map +1 -0
- package/dist/components/number-field/index.d.ts +3 -3
- package/dist/components/number-field/index.js +1 -9
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/product-icon/index.d.ts +2 -2
- package/dist/components/product-icon/index.js.map +1 -1
- package/dist/components/progress-indicator/index.d.ts +113 -0
- package/dist/components/progress-indicator/index.js +1024 -0
- package/dist/components/progress-indicator/index.js.map +1 -0
- package/dist/components/radio-group/index.d.ts +3 -3
- package/dist/components/radio-group/index.js.map +1 -1
- package/dist/components/search-field/index.d.ts +3 -3
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/segmented-button/index.d.ts +3 -3
- package/dist/components/segmented-button/index.js.map +1 -1
- package/dist/components/snackbar/index.d.ts +120 -0
- package/dist/components/snackbar/index.js +540 -0
- package/dist/components/snackbar/index.js.map +1 -0
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/text-field/index.d.ts +3 -3
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/field/index.d.ts +1 -1
- package/dist/field/index.js.map +1 -1
- package/dist/form/index.d.ts +1 -1
- package/dist/form/index.js.map +1 -1
- package/dist/glyphs/hidden.js +13 -0
- package/dist/glyphs/hidden.js.map +1 -0
- package/dist/glyphs/index.js +2 -8
- package/dist/glyphs/index.js.map +1 -1
- package/dist/i18n/index.js +23 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/messages.js +41 -0
- package/dist/i18n/messages.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +7 -3
- package/dist/indicator/index.d.ts +15 -0
- package/dist/indicator/index.js +256 -0
- package/dist/indicator/index.js.map +1 -0
- package/dist/indicator/motion.js +86 -0
- package/dist/indicator/motion.js.map +1 -0
- package/dist/indicator/paths.js +72 -0
- package/dist/indicator/paths.js.map +1 -0
- package/dist/indicator/styles.js +62 -0
- package/dist/indicator/styles.js.map +1 -0
- package/dist/mark/index.d.ts +1 -1
- package/dist/mark/index.js.map +1 -1
- package/dist/number/locale.js +14 -0
- package/dist/number/locale.js.map +1 -0
- package/dist/overlay/host.js +65 -2
- package/dist/overlay/host.js.map +1 -1
- package/dist/press/index.js +63 -63
- package/dist/press/index.js.map +1 -1
- package/dist/theme/resolve.js +1 -1
- package/dist/theme/resolve.js.map +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ReactNode","Ref","BlurEvent","Insets","KeyboardTypeOptions","StyleProp","TextInput","TextInputProps","TextInputSubmitEditingEvent","ViewStyle","NumberFormatter","useEffect","useId","useImperativeHandle","useRef","useState","AccessibilityInfo","Platform","Pressable","StyleSheet","useWindowDimensions","View","FieldVariant","ValidationResult","IconStyle","NumberFieldState","ResolvedTheme","describedBy","FieldBox","FieldInput","FieldMessage","useFieldFocus","useFieldValidation","MinusGlyph","PlusGlyph","IconStyleContext","useNumberFieldState","hitSlop","usePressFeedback","withOpacity","useTheme","composeStyles","themedStyles","IconButton","NumberFieldProps","Omit","decrementLabel","defaultValue","description","error","floatingLabel","formatOptions","Intl","NumberFormatOptions","incrementLabel","inputRef","isDisabled","isReadOnly","isRequired","label","locale","maxValue","minValue","name","numeric","onChange","value","ref","step","steppers","style","validate","variant","Spin","onPress","onPressIn","onPressOut","StepperProps","children","half","onBlur","onFocus","outlined","place","SteppersProps","canDecrement","canIncrement","inline","onDecrement","onIncrement","STEPPER_WIDTH","GLYPH_SIZE","SPIN_DELAY","SPIN_INTERVAL","deviceLocale","stylesOf","radii","spacing","create","stepper","alignItems","flexBasis","flexGrow","justifyContent","width","stepperBottomOutlined","borderBottomEndRadius","xs","stepperRing","outlineOffset","alignSelf","flexDirection","marginEnd","lg","marginStart","sm","marginVertical","steppersInline","gap","md","steppersOutlined","stepperTop","borderTopEndRadius","blurThen","then","event","commitBefore","state","handler","Event","commit","editInto","onEdit","text","setInputValue","glyphOf","color","size","halfOf","typography","fontScale","bodyLargeLineHeight","bodySmallLineHeight","keyboardOf","hasDecimals","hasNegative","undefined","Number","isNaN","OS","localeOf","NumberFormat","supportedLocalesOf","resolvedOptions","marginVerticalOf","margin","NumberField","t0","$","_c","onSubmitEditing","props","t1","t2","t3","t4","t5","t6","t7","t8","returnKeyType","id","control","writtenIn","t9","numberValue","empty","t10","String","t11","isEmpty","submitted","validation","shownError","t12","t13","focus","maximumFractionDigits","announced","useStepAnnouncement","inputValue","stepperFocused","setStepperFocused","t14","t15","Symbol","for","current","t16","t17","t18","t19","t20","decrement","increment","t21","steppersOf","stepThen","focused","t22","t23","t24","handlers","t25","t26","t27","t28","t29","t30","t31","t32","t33","outwardSlop","slop","reach","top","bottom","Stepper","ariaLabel","theme","styles","colors","stateLayerOpacity","corner","feedback","onSurfaceVariant","corners","disabled","T0","ring","layer","onSurface","disabledContent","Steppers","sizing","up","useSpin","down","controlXs","canStep","latest","timer","spun","clearTimeout","tick","setTimeout","pending","announceForAccessibility","_c"],"sources":["../../../src/components/number-field/index.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react'\nimport type {\n BlurEvent,\n Insets,\n KeyboardTypeOptions,\n StyleProp,\n TextInput,\n TextInputProps,\n TextInputSubmitEditingEvent,\n ViewStyle,\n} from 'react-native'\n\nimport { NumberFormatter } from '@internationalized/number'\nimport { useEffect, useId, useImperativeHandle, useRef, useState } from 'react'\nimport {\n AccessibilityInfo,\n Platform,\n Pressable,\n StyleSheet,\n useWindowDimensions,\n View,\n} from 'react-native'\n\nimport type { FieldVariant } from '../../field'\nimport type { ValidationResult } from '../../form'\nimport type { IconStyle } from '../../glyphs/icon-style'\nimport type { NumberFieldState } from '../../number/state'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport {\n describedBy,\n FieldBox,\n FieldInput,\n FieldMessage,\n useFieldFocus,\n} from '../../field'\nimport { useFieldValidation } from '../../form'\nimport { MinusGlyph, PlusGlyph } from '../../glyphs'\nimport { IconStyleContext } from '../../glyphs/icon-style'\nimport { useNumberFieldState } from '../../number/state'\nimport { hitSlop, usePressFeedback } from '../../press'\nimport { withOpacity } from '../../theme/color'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { IconButton } from '../icon-button'\n\n// kanso-ui's NumberField: the text fields page's field holding a number,\n// drawn through the field chrome in src/field as TextField is, with the value\n// in the mono face and tabular figures by default and two steppers at the\n// box's end.\n//\n// The steppers come in web's two layouts. Stacked, the plus over the minus,\n// they are a column flush with the box's top, end and bottom, each half of\n// the box and 32dp wide, drawing the icon buttons page's 20dp glyph in on\n// surface variant with the state layer and the ripple every control draws.\n// The top one takes the box's top-end corner, and the bottom one the outlined\n// box's bottom-end corner, so the column reads as the box's own edge. Side by\n// side, they are extra-small icon buttons, 8dp apart and 12dp from the end\n// where the page puts a field's icons, centred on the box. Either way a tap\n// steps once, on release, and a hold keeps stepping until the press ends or\n// the value reaches its bound, as React Aria's steppers do for a touch, and\n// the box shows focus while a stepper has it, as web's does.\n//\n// **The stacked pair reaches 48dp outward**, through `hitSlop`: the top one\n// up and the bottom one down, each 8dp to either side. Web keeps the pair to\n// its drawn size, since two 48dp targets inside the column would overlap;\n// reaching away from each other, the two never meet.\n//\n// The value is React Stately's, through src/number: a keystroke is kept only\n// where the text could still become a number in the field's locale and\n// format, and the text is read, clamped to the range, snapped to the step\n// and written back formatted when the field loses focus or the return key is\n// pressed, as web's is on blur and Enter. The keyboard is the one that types\n// what the field takes: a minus where the range reaches below zero, and a\n// decimal separator where the format shows a fraction. On iOS a minus is on\n// the numbers and punctuation keyboard alone, so a field that takes one gets\n// that.\n//\n// **The locale is a prop**, defaulting to the device's, where web reads it\n// from React Aria's `I18nProvider`. It decides how the value is written and\n// read, so a field in a German app reads \"1.234,5\" as 1234.5.\n//\n// A stepper press is announced on iOS and Android, by the value it leaves,\n// since VoiceOver and TalkBack stay on the stepper rather than reading the\n// field again.\n\ntype NumberFieldProps = Omit<\n TextInputProps,\n | 'accessibilityHint'\n | 'accessibilityLabel'\n | 'aria-disabled'\n | 'aria-label'\n | 'autoComplete'\n | 'autoCorrect'\n | 'children'\n | 'cursorColor'\n | 'defaultValue'\n | 'editable'\n | 'inputMode'\n | 'keyboardType'\n | 'maxLength'\n | 'multiline'\n | 'numberOfLines'\n | 'onChange'\n | 'onChangeText'\n | 'placeholder'\n | 'placeholderTextColor'\n | 'readOnly'\n | 'selectionColor'\n | 'spellCheck'\n | 'style'\n | 'underlineColorAndroid'\n | 'value'\n> & {\n /**\n * The name of the stepper that lowers the value, for a screen reader. Left\n * out, it is the English \"Decrease\" followed by the field's own label.\n */\n readonly decrementLabel?: string\n /** The value the field opens with, when it keeps its own. */\n readonly defaultValue?: number\n /**\n * A hint shown under the field. Replaced by `error` when there is one, so\n * the two never stack.\n */\n readonly description?: string\n /**\n * The problem with the current value, in words. Its presence is what puts\n * the field in its error state: the message, the error colours, and the\n * invalid state a screen reader reads all follow from it. The line under\n * the field arrives with the message, so the field grows when this does,\n * unless it is inside a `Form`, which keeps the line drawn. It wins over\n * what `validate` and the form say, and holds a `native` form back.\n */\n readonly error?: string\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, as the text fields page draws it.\n * `false` keeps it small at the top in every state.\n * @default true\n */\n readonly floatingLabel?: boolean\n /**\n * How the value is written and read: a currency, a percentage, a unit, a\n * number of fraction digits. It also decides what can be typed.\n */\n readonly formatOptions?: Intl.NumberFormatOptions\n /**\n * The name of the stepper that raises the value, for a screen reader. Left\n * out, it is the English \"Increase\" followed by the field's own label.\n */\n readonly incrementLabel?: string\n /**\n * A ref to the field's own `TextInput`, which is what a call site moves\n * focus to, after a server's error, say. `ref` is the field as a whole.\n */\n readonly inputRef?: Ref<TextInput>\n /**\n * Draws the field disabled: it takes no focus, no input and no steps.\n * @default false\n */\n readonly isDisabled?: boolean\n /**\n * Shows the value and takes focus, but takes no input and no steps.\n * @default false\n */\n readonly isReadOnly?: 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 /**\n * What the field is for, and the name a screen reader reads for it.\n * Required, since a field with no label is a box nobody can name.\n */\n readonly label: string\n /**\n * The BCP 47 locale the value is written and read in. Defaults to the\n * device's.\n */\n readonly locale?: string\n /** The highest value the field takes. A committed value is clamped to it. */\n readonly maxValue?: number\n /** The lowest value the field takes. A committed value is clamped to it. */\n readonly minValue?: number\n /**\n * The name the value is submitted under by the `Form` around the field,\n * and the key its `validationErrors` reach the field by. The form submits\n * the number written out, such as `1234.5`, and `''` for an empty field.\n */\n readonly name?: string\n /**\n * Renders the value in the mono face with tabular figures, for amounts and\n * other numbers meant to be compared down a column. On by default, since a\n * number field holds nothing else.\n * @default true\n */\n readonly numeric?: boolean\n /**\n * Called with the committed value, once it is read from what was typed or\n * stepped to. `NaN` is an empty field.\n */\n readonly onChange?: (value: number) => void\n readonly ref?: Ref<View>\n /**\n * The amount the steppers move the value by, and the multiple of it, from\n * `minValue`, that a committed value snaps to.\n */\n readonly step?: number\n /**\n * How the two steppers sit at the end of the box: stacked, the plus over\n * the minus, flush with the box's edge, or side by side as extra-small\n * icon buttons.\n * @default 'vertical'\n */\n readonly steppers?: 'horizontal' | 'vertical'\n /** Positions and sizes the field as a whole. */\n readonly style?: StyleProp<ViewStyle>\n /**\n * Checks the value, `NaN` for an empty field, and returns its problem in\n * words, or several, where there is one, and `true`, `null` or `undefined`\n * where there is none. Under the default `aria` validation the error shows\n * as the value changes; inside a `native` form it shows once a submission\n * is tried, or once the field loses focus after an edit, and holds the form\n * back.\n */\n readonly validate?: (value: number) => ValidationResult\n /** The value, when the call site keeps it. `NaN` is an empty field. */\n readonly value?: number\n /**\n * The filled box, or the outlined one: no fill, an outline that thickens\n * and takes the primary role while focused, and the label cutting it once\n * it floats, the text fields page's two fields.\n * @default 'filled'\n */\n readonly variant?: FieldVariant\n}\n\n// What a stepper hands its control so a tap steps once and a hold keeps\n// stepping.\ntype Spin = {\n readonly onPress: () => void\n readonly onPressIn: () => void\n readonly onPressOut: () => void\n}\n\ntype StepperProps = Spin & {\n readonly 'aria-label': string\n readonly children: ReactNode\n readonly half: number\n readonly isDisabled: boolean\n readonly onBlur: () => void\n readonly onFocus: () => void\n readonly outlined: boolean\n readonly place: 'bottom' | 'top'\n}\n\ntype SteppersProps = {\n readonly canDecrement: boolean\n readonly canIncrement: boolean\n readonly decrementLabel: string\n readonly incrementLabel: string\n readonly inline: boolean\n readonly onBlur: () => void\n readonly onDecrement: () => void\n readonly onFocus: () => void\n readonly onIncrement: () => void\n readonly outlined: boolean\n}\n\n// A stacked stepper's width, and the glyph it draws: the icon buttons page's\n// 20dp, for the extra-small size the pair stands in for.\nconst STEPPER_WIDTH = 32\nconst GLYPH_SIZE = 20\n\n// How long a stepper is held before it starts stepping on its own, and how\n// often it steps after that: React Aria's timings for a stepper held by\n// touch.\nconst SPIN_DELAY = 600\nconst SPIN_INTERVAL = 60\n\nlet deviceLocale: string | undefined\n\nconst stylesOf = themedStyles(({ radii, spacing }) =>\n StyleSheet.create({\n // One stacked stepper: half the column, its glyph in the middle.\n stepper: {\n alignItems: 'center',\n flexBasis: 0,\n flexGrow: 1,\n justifyContent: 'center',\n width: STEPPER_WIDTH,\n },\n stepperBottomOutlined: {\n borderBottomEndRadius: radii.xs,\n },\n // The ring inside the stepper, as web draws it, since outside it would\n // fall over the box's edge and the other stepper.\n stepperRing: {\n outlineOffset: -2,\n },\n // Stacked: the column reaches out of the box's padding to sit flush with\n // its top, end and bottom, 8dp after the value rather than the box's 16.\n steppers: {\n alignSelf: 'stretch',\n flexDirection: 'column',\n marginEnd: -spacing.lg,\n marginStart: spacing.sm - spacing.lg,\n marginVertical: -spacing.sm,\n },\n // Side by side: 12dp from the end, as the page places a field's icons,\n // and 8dp apart, which is how far each button's target reaches past it,\n // so neither target falls over the other's glyph. They centre on the\n // box, as the page centres a trailing icon and as web draws them, and\n // take no more of its height than the value's line, so the outlined\n // box, whose content is that line alone, is not made taller by them.\n // The margins that do it are worked out where they render, since the\n // line follows the device's text size.\n steppersInline: {\n alignSelf: 'center',\n flexDirection: 'row',\n gap: spacing.sm,\n marginEnd: spacing.md - spacing.lg,\n marginStart: spacing.sm - spacing.lg,\n },\n // In the outlined box the column has 16dp to reach rather than 8.\n steppersOutlined: {\n marginVertical: -spacing.lg,\n },\n stepperTop: {\n borderTopEndRadius: radii.xs,\n },\n }),\n)\n\n// The field's own blur handling, then the call site's.\nfunction blurThen(\n onBlur: () => void,\n then: ((event: BlurEvent) => void) | undefined,\n) {\n return (event: BlurEvent) => {\n onBlur()\n then?.(event)\n }\n}\n\n// Reads the text as the field's value, then hands the event on.\nfunction commitBefore<Event>(\n state: NumberFieldState,\n handler: ((event: Event) => void) | undefined,\n) {\n return (event: Event) => {\n state.commit()\n handler?.(event)\n }\n}\n\n// The text typed, kept only where it could still become a number, and\n// reported to the field's validation as an edit.\nfunction editInto(state: NumberFieldState, onEdit: () => void) {\n return (text: string) => {\n if (state.validate(text)) {\n state.setInputValue(text)\n onEdit()\n }\n }\n}\n\nfunction glyphOf(color: string): IconStyle {\n return { color, size: GLYPH_SIZE }\n}\n\n// A stacked stepper's half of the box: the box's padding above and below\n// and the lines it holds, at the device's text size, halved.\nfunction halfOf(\n { spacing, typography }: ResolvedTheme,\n outlined: boolean,\n fontScale: number,\n) {\n return outlined\n ? spacing.lg + (typography.bodyLargeLineHeight * fontScale) / 2\n : spacing.sm +\n ((typography.bodySmallLineHeight + typography.bodyLargeLineHeight) *\n fontScale) /\n 2\n}\n\n// The keyboard that types what the field takes. React Aria's own choice of\n// input mode, in React Native's keyboards.\nfunction keyboardOf(\n minValue: number | undefined,\n hasDecimals: boolean,\n): KeyboardTypeOptions {\n const hasNegative =\n minValue === undefined || Number.isNaN(minValue) || minValue < 0\n\n if (hasNegative) {\n return Platform.OS === 'ios' ? 'numbers-and-punctuation' : 'numeric'\n }\n\n return hasDecimals ? 'decimal-pad' : 'number-pad'\n}\n\n// The locale the field writes in: the one given, where the runtime takes it\n// as a locale at all, or the device's.\nfunction localeOf(locale: string | undefined) {\n if (locale !== undefined) {\n try {\n Intl.NumberFormat.supportedLocalesOf(locale)\n return locale\n } catch {\n // A malformed tag, which falls back to the device's.\n }\n }\n\n deviceLocale ??= new Intl.NumberFormat().resolvedOptions().locale\n return deviceLocale\n}\n\n// The margin that gives a side-by-side stepper the value's line in the\n// box's height: half the difference between the two, negative where the\n// button is taller.\nfunction marginVerticalOf(margin: number): ViewStyle {\n return { marginVertical: margin }\n}\n\n/**\n * A labelled number input with steppers, the text fields page's filled or\n * outlined field. Pass `value` with `onChange` to control it, or\n * `defaultValue` to let it keep its own; `onChange` is handed the committed\n * number, `NaN` for an empty field. `minValue`, `maxValue` and `step` shape\n * it, and `formatOptions` says how it reads, in `locale`: a currency, a\n * percentage, a unit.\n *\n * React Native's own `TextInput` props, the return key among them, reach the\n * control; `style` and `ref` are the field as a whole, and `inputRef` the\n * control.\n *\n * ```tsx\n * <NumberField defaultValue={1234.5} label=\"Label\" />\n * ```\n */\nfunction NumberField({\n decrementLabel,\n defaultValue,\n description,\n error,\n floatingLabel = true,\n formatOptions,\n incrementLabel,\n inputRef,\n isDisabled = false,\n isReadOnly = false,\n isRequired = false,\n label,\n locale,\n maxValue,\n minValue,\n name,\n numeric = true,\n onBlur,\n onChange,\n onFocus,\n onSubmitEditing,\n ref,\n returnKeyType = 'done',\n step,\n steppers = 'vertical',\n style,\n validate,\n value,\n variant = 'filled',\n ...props\n}: NumberFieldProps) {\n const id = useId()\n const control = useRef<TextInput>(null)\n const writtenIn = localeOf(locale)\n const state = useNumberFieldState({\n defaultValue,\n formatOptions,\n isDisabled,\n isReadOnly,\n locale: writtenIn,\n maxValue,\n minValue,\n onChange,\n step,\n value,\n })\n const empty = Number.isNaN(state.numberValue)\n const validation = useFieldValidation({\n control,\n error,\n isDisabled,\n isEmpty: empty,\n isReadOnly,\n isRequired,\n name,\n submitted: empty ? '' : String(state.numberValue),\n validate,\n value: state.numberValue,\n })\n const shownError = validation.error\n const focus = useFieldFocus({\n onBlur: commitBefore<BlurEvent>(state, blurThen(validation.onBlur, onBlur)),\n onFocus,\n })\n const hasDecimals =\n (new NumberFormatter(writtenIn, formatOptions).resolvedOptions()\n .maximumFractionDigits ?? 0) > 0\n const announced = useStepAnnouncement(state.inputValue)\n // The box is focused while focus is anywhere in it, a stepper's included,\n // as web's is through `:focus-within`.\n const [stepperFocused, setStepperFocused] = useState(false)\n\n useImperativeHandle<null | TextInput, null | TextInput>(\n inputRef,\n () => control.current,\n [],\n )\n\n return (\n <View ref={ref} style={style}>\n <FieldBox\n control={control}\n end={steppersOf({\n canDecrement: state.canDecrement,\n canIncrement: state.canIncrement,\n decrementLabel: decrementLabel ?? `Decrease ${label}`,\n incrementLabel: incrementLabel ?? `Increase ${label}`,\n inline: steppers === 'horizontal',\n onBlur: () => {\n setStepperFocused(false)\n },\n onDecrement: announced(stepThen(state.decrement, validation.onEdit)),\n onFocus: () => {\n setStepperFocused(true)\n },\n onIncrement: announced(stepThen(state.increment, validation.onEdit)),\n outlined: variant === 'outlined',\n })}\n floatingLabel={floatingLabel}\n isDisabled={isDisabled}\n isFocused={focus.focused || stepperFocused}\n isInvalid={shownError !== undefined}\n isPopulated={state.inputValue !== ''}\n isRequired={isRequired}\n label={label}\n variant={variant}\n >\n <FieldInput\n {...props}\n {...focus.handlers}\n aria-label={label}\n autoComplete=\"off\"\n autoCorrect={false}\n described={describedBy(id, { description, error: shownError })}\n editable={!isDisabled && !isReadOnly}\n keyboardType={keyboardOf(minValue, hasDecimals)}\n numeric={numeric}\n onChangeText={editInto(state, validation.onEdit)}\n onSubmitEditing={commitBefore<TextInputSubmitEditingEvent>(\n state,\n onSubmitEditing,\n )}\n ref={control}\n returnKeyType={returnKeyType}\n spellCheck={false}\n value={state.inputValue}\n />\n </FieldBox>\n <FieldMessage description={description} error={shownError} id={id} />\n </View>\n )\n}\n\n// The 48dp target a stacked stepper reaches to, all of its height on the\n// side away from the other stepper, and its width either side.\nfunction outwardSlop(\n half: number,\n place: 'bottom' | 'top',\n): Insets | undefined {\n const slop = hitSlop(half, STEPPER_WIDTH)\n if (slop === undefined) {\n return undefined\n }\n\n const reach = (slop.top ?? 0) + (slop.bottom ?? 0)\n return place === 'top'\n ? { ...slop, bottom: 0, top: reach }\n : { ...slop, bottom: reach, top: 0 }\n}\n\n/**\n * One of the stacked pair: half the column, the glyph in on surface\n * variant, and the state layer, the ripple and the ring every control\n * draws, the ring inside it. Disabled at the end of the range, where the\n * glyph takes on surface at the disabled opacity.\n */\nfunction Stepper({\n 'aria-label': ariaLabel,\n children,\n half,\n isDisabled,\n onBlur,\n onFocus,\n onPress,\n onPressIn,\n onPressOut,\n outlined,\n place,\n}: StepperProps) {\n const theme = useTheme()\n const styles = stylesOf(theme)\n const { colors, stateLayerOpacity } = theme\n const corner =\n place === 'top'\n ? styles.stepperTop\n : outlined\n ? styles.stepperBottomOutlined\n : undefined\n const feedback = usePressFeedback({\n color: colors.onSurfaceVariant,\n corners: corner,\n disabled: isDisabled,\n onBlur,\n onFocus,\n onPressIn,\n onPressOut,\n })\n\n return (\n <Pressable\n {...feedback.handlers}\n aria-label={ariaLabel}\n disabled={isDisabled}\n hitSlop={outwardSlop(half, place)}\n onPress={onPress}\n role=\"button\"\n style={composeStyles<ViewStyle>(\n styles.stepper,\n corner,\n feedback.ring,\n feedback.ring === undefined ? undefined : styles.stepperRing,\n )}\n >\n {feedback.layer}\n <IconStyleContext\n value={glyphOf(\n isDisabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : colors.onSurfaceVariant,\n )}\n >\n {children}\n </IconStyleContext>\n </Pressable>\n )\n}\n\n/**\n * The two steppers at the box's end, stacked or side by side, each\n * disabled where it would not move the value.\n */\nfunction Steppers({\n canDecrement,\n canIncrement,\n decrementLabel,\n incrementLabel,\n inline,\n onBlur,\n onDecrement,\n onFocus,\n onIncrement,\n outlined,\n}: SteppersProps) {\n const theme = useTheme()\n const styles = stylesOf(theme)\n const { fontScale } = useWindowDimensions()\n const { sizing, typography } = theme\n const up = useSpin(onIncrement, canIncrement)\n const down = useSpin(onDecrement, canDecrement)\n\n if (inline) {\n return (\n <View\n style={composeStyles<ViewStyle>(\n styles.steppersInline,\n marginVerticalOf(\n (typography.bodyLargeLineHeight * fontScale - sizing.controlXs) / 2,\n ),\n )}\n >\n <IconButton\n {...down}\n aria-label={decrementLabel}\n isDisabled={!canDecrement}\n onBlur={onBlur}\n onFocus={onFocus}\n size=\"xs\"\n >\n <MinusGlyph />\n </IconButton>\n <IconButton\n {...up}\n aria-label={incrementLabel}\n isDisabled={!canIncrement}\n onBlur={onBlur}\n onFocus={onFocus}\n size=\"xs\"\n >\n <PlusGlyph />\n </IconButton>\n </View>\n )\n }\n\n const half = halfOf(theme, outlined, fontScale)\n\n return (\n <View\n style={composeStyles<ViewStyle>(\n styles.steppers,\n outlined ? styles.steppersOutlined : undefined,\n )}\n >\n <Stepper\n {...up}\n aria-label={incrementLabel}\n half={half}\n isDisabled={!canIncrement}\n onBlur={onBlur}\n onFocus={onFocus}\n outlined={outlined}\n place=\"top\"\n >\n <PlusGlyph />\n </Stepper>\n <Stepper\n {...down}\n aria-label={decrementLabel}\n half={half}\n isDisabled={!canDecrement}\n onBlur={onBlur}\n onFocus={onFocus}\n outlined={outlined}\n place=\"bottom\"\n >\n <MinusGlyph />\n </Stepper>\n </View>\n )\n}\n\n// The steppers as the box's end, built by a call rather than written at the\n// prop, which is what react-perf's no-jsx-as-prop is after.\nfunction steppersOf(props: SteppersProps) {\n return <Steppers {...props} />\n}\n\n/**\n * A stepper's press handlers: a tap steps once, when it is released, and a\n * hold keeps stepping, from `SPIN_DELAY` on and every `SPIN_INTERVAL` after,\n * until the press ends or the value reaches its bound. A hold steps nothing\n * more on release, and a press the finger slides off steps nothing at all,\n * as React Aria's stepper does for a touch.\n */\n// A stepper's step, reported to the field's validation as an edit.\nfunction stepThen(step: () => void, onEdit: () => void) {\n return () => {\n step()\n onEdit()\n }\n}\n\nfunction useSpin(step: () => void, canStep: boolean): Spin {\n // The step and whether it can move, as of the last render, since a hold\n // steps from timers that outlive the render that started them.\n const latest = useRef({ canStep, step })\n const timer = useRef<ReturnType<typeof setTimeout>>(undefined)\n const spun = useRef(false)\n\n useEffect(() => {\n latest.current = { canStep, step }\n })\n useEffect(\n () => () => {\n clearTimeout(timer.current)\n },\n [],\n )\n\n const tick = () => {\n if (!latest.current.canStep) {\n return\n }\n spun.current = true\n latest.current.step()\n timer.current = setTimeout(tick, SPIN_INTERVAL)\n }\n\n return {\n onPress: () => {\n if (!spun.current) {\n latest.current.step()\n }\n },\n onPressIn: () => {\n clearTimeout(timer.current)\n spun.current = false\n timer.current = setTimeout(tick, SPIN_DELAY)\n },\n onPressOut: () => {\n clearTimeout(timer.current)\n },\n }\n}\n\n/**\n * Says the field's text after a stepper press, once the field has written\n * it, on iOS and Android, where the screen reader stays on the stepper.\n * Wrap each step in what it returns.\n */\nfunction useStepAnnouncement(text: string) {\n const pending = useRef(false)\n\n useEffect(() => {\n if (pending.current) {\n pending.current = false\n AccessibilityInfo.announceForAccessibility(text)\n }\n }, [text])\n\n return (step: () => void) => () => {\n pending.current = Platform.OS === 'ios' || Platform.OS === 'android'\n step()\n }\n}\n\nexport { NumberField }\nexport type { NumberFieldProps }\n"],"mappings":";;;;;;;;;;;;;;;;AAkRA,MAAM0F,gBAAgB;AACtB,MAAMC,aAAa;AAKnB,MAAMC,aAAa;AACnB,MAAMC,gBAAgB;AAEtB,IAAIC;AAEJ,MAAMC,WAAWrD,cAAc,EAAEsD,OAAOC,cACtC9E,WAAW+E,OAAO;CAEhBC,SAAS;EACPC,YAAY;EACZC,WAAW;EACXC,UAAU;EACVC,gBAAgB;EAChBC,OAAOd;CACT;CACAe,uBAAuB,EACrBC,uBAAuBV,MAAMW,GAC/B;CAGAC,aAAa,EACXC,eAAe,GACjB;CAGAxC,UAAU;EACRyC,WAAW;EACXC,eAAe;EACfC,WAAW,CAACf,QAAQgB;EACpBC,aAAajB,QAAQkB,KAAKlB,QAAQgB;EAClCG,gBAAgB,CAACnB,QAAQkB;CAC3B;CASAE,gBAAgB;EACdP,WAAW;EACXC,eAAe;EACfO,KAAKrB,QAAQkB;EACbH,WAAWf,QAAQsB,KAAKtB,QAAQgB;EAChCC,aAAajB,QAAQkB,KAAKlB,QAAQgB;CACpC;CAEAO,kBAAkB,EAChBJ,gBAAgB,CAACnB,QAAQgB,GAC3B;CACAQ,YAAY,EACVC,oBAAoB1B,MAA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;GACfqD,OAAMrD,QAAQjI,KAAM;GACpBuL,MAAKtD,UAAW0D,WAAWD,MAAMjK,aAAa;EAAjC;EAGRwE,KAAA;GAAA3F,eACI;IACP,IAAI,CAACkL,KAAIvD,SACPqD,OAAMrD,QAAQjI,KAAM;GACrB;GACFO,iBACU;IACTkL,aAAaF,MAAKtD,OAAQ;IAC1BuD,KAAIvD,UAAW;IACfsD,MAAKtD,UAAW0D,WAAWD,MAAMlK,UAAU;GAA9B;GACdhB,kBACW;IACViL,aAAaF,MAAKtD,OAAQ;GAAC;EAE/B;EAACvC,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAdMO;AAcN;;;;;;AAQH,SAAAwB,oBAAAxD,MAAA;CAAA,MAAAyB,IAAAC,EAAA,CAAA;CACE,MAAAiG,UAAgBlP,OAAO,KAAK;CAAC,IAAA+I;CAAA,IAAAK;CAAA,IAAAJ,EAAA,OAAAzB,MAAA;EAEnBwB,WAAA;GACR,IAAImG,QAAO3D,SAAQ;IACjB2D,QAAO3D,UAAW;IAClBrL,kBAAiBiP,yBAA0B5H,IAAI;GAAC;EACjD;EACA6B,KAAA,CAAC7B,IAAI;EAACyB,EAAA,KAAAzB;EAAAyB,EAAA,KAAAD;EAAAC,EAAA,KAAAI;CAAA,OAAA;EAAAL,KAAAC,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CALTnJ,UAAUkJ,IAKPK,EAAM;CAAC,IAAAC;CAAA,IAAAL,EAAA,OAAAqC,OAAAC,IAAA,2BAAA,GAAA;EAEHjC,MAAA/F,eAAsB;GAC3B4L,QAAO3D,UAAWpL,SAAQoI,OAAQ,SAASpI,SAAQoI,OAAQ;GAC3DjF,KAAK;EAAC;EACP0F,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAHMK;AAGN"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","BlurEvent","Insets","KeyboardTypeOptions","StyleProp","TextInput","TextInputProps","TextInputSubmitEditingEvent","ViewStyle","NumberFormatter","useEffect","useId","useImperativeHandle","useRef","useState","AccessibilityInfo","Platform","Pressable","StyleSheet","useWindowDimensions","View","FieldVariant","ValidationResult","IconStyle","NumberFieldState","ResolvedTheme","describedBy","FieldBox","FieldInput","FieldMessage","useFieldFocus","useFieldValidation","MinusGlyph","PlusGlyph","IconStyleContext","localeOf","useNumberFieldState","hitSlop","usePressFeedback","withOpacity","useTheme","composeStyles","themedStyles","IconButton","NumberFieldProps","Omit","decrementLabel","defaultValue","description","error","floatingLabel","formatOptions","Intl","NumberFormatOptions","incrementLabel","inputRef","isDisabled","isReadOnly","isRequired","label","locale","maxValue","minValue","name","numeric","onChange","value","ref","step","steppers","style","validate","variant","Spin","onPress","onPressIn","onPressOut","StepperProps","children","half","onBlur","onFocus","outlined","place","SteppersProps","canDecrement","canIncrement","inline","onDecrement","onIncrement","STEPPER_WIDTH","GLYPH_SIZE","SPIN_DELAY","SPIN_INTERVAL","stylesOf","radii","spacing","create","stepper","alignItems","flexBasis","flexGrow","justifyContent","width","stepperBottomOutlined","borderBottomEndRadius","xs","stepperRing","outlineOffset","alignSelf","flexDirection","marginEnd","lg","marginStart","sm","marginVertical","steppersInline","gap","md","steppersOutlined","stepperTop","borderTopEndRadius","blurThen","then","event","commitBefore","state","handler","Event","commit","editInto","onEdit","text","setInputValue","glyphOf","color","size","halfOf","typography","fontScale","bodyLargeLineHeight","bodySmallLineHeight","keyboardOf","hasDecimals","hasNegative","undefined","Number","isNaN","OS","marginVerticalOf","margin","NumberField","t0","$","_c","onSubmitEditing","props","t1","t2","t3","t4","t5","t6","t7","t8","returnKeyType","id","control","writtenIn","t9","numberValue","empty","t10","String","t11","isEmpty","submitted","validation","shownError","t12","t13","focus","resolvedOptions","maximumFractionDigits","announced","useStepAnnouncement","inputValue","stepperFocused","setStepperFocused","t14","t15","Symbol","for","current","t16","t17","t18","t19","t20","decrement","increment","t21","steppersOf","stepThen","focused","t22","t23","t24","handlers","t25","t26","t27","t28","t29","t30","t31","t32","t33","outwardSlop","slop","reach","top","bottom","Stepper","ariaLabel","theme","styles","colors","stateLayerOpacity","corner","feedback","onSurfaceVariant","corners","disabled","T0","ring","layer","onSurface","disabledContent","Steppers","sizing","up","useSpin","down","controlXs","canStep","latest","timer","spun","clearTimeout","tick","setTimeout","pending","announceForAccessibility","_c"],"sources":["../../../src/components/number-field/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref } from 'react'\nimport type {\n BlurEvent,\n Insets,\n KeyboardTypeOptions,\n StyleProp,\n TextInput,\n TextInputProps,\n TextInputSubmitEditingEvent,\n ViewStyle,\n} from 'react-native'\n\nimport { NumberFormatter } from '@internationalized/number'\nimport { useEffect, useId, useImperativeHandle, useRef, useState } from 'react'\nimport {\n AccessibilityInfo,\n Platform,\n Pressable,\n StyleSheet,\n useWindowDimensions,\n View,\n} from 'react-native'\n\nimport type { FieldVariant } from '../../field'\nimport type { ValidationResult } from '../../form'\nimport type { IconStyle } from '../../glyphs/icon-style'\nimport type { NumberFieldState } from '../../number/state'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport {\n describedBy,\n FieldBox,\n FieldInput,\n FieldMessage,\n useFieldFocus,\n} from '../../field'\nimport { useFieldValidation } from '../../form'\nimport { MinusGlyph, PlusGlyph } from '../../glyphs'\nimport { IconStyleContext } from '../../glyphs/icon-style'\nimport { localeOf } from '../../number/locale'\nimport { useNumberFieldState } from '../../number/state'\nimport { hitSlop, usePressFeedback } from '../../press'\nimport { withOpacity } from '../../theme/color'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { IconButton } from '../icon-button'\n\n// kanso-ui's NumberField: the text fields page's field holding a number,\n// drawn through the field chrome in src/field as TextField is, with the value\n// in the mono face and tabular figures by default and two steppers at the\n// box's end.\n//\n// The steppers come in web's two layouts. Stacked, the plus over the minus,\n// they are a column flush with the box's top, end and bottom, each half of\n// the box and 32dp wide, drawing the icon buttons page's 20dp glyph in on\n// surface variant with the state layer and the ripple every control draws.\n// The top one takes the box's top-end corner, and the bottom one the outlined\n// box's bottom-end corner, so the column reads as the box's own edge. Side by\n// side, they are extra-small icon buttons, 8dp apart and 12dp from the end\n// where the page puts a field's icons, centred on the box. Either way a tap\n// steps once, on release, and a hold keeps stepping until the press ends or\n// the value reaches its bound, as React Aria's steppers do for a touch, and\n// the box shows focus while a stepper has it, as web's does.\n//\n// **The stacked pair reaches 48dp outward**, through `hitSlop`: the top one\n// up and the bottom one down, each 8dp to either side. Web keeps the pair to\n// its drawn size, since two 48dp targets inside the column would overlap;\n// reaching away from each other, the two never meet.\n//\n// The value is React Stately's, through src/number: a keystroke is kept only\n// where the text could still become a number in the field's locale and\n// format, and the text is read, clamped to the range, snapped to the step\n// and written back formatted when the field loses focus or the return key is\n// pressed, as web's is on blur and Enter. The keyboard is the one that types\n// what the field takes: a minus where the range reaches below zero, and a\n// decimal separator where the format shows a fraction. On iOS a minus is on\n// the numbers and punctuation keyboard alone, so a field that takes one gets\n// that.\n//\n// **The locale is a prop**, defaulting to the device's, where web reads it\n// from React Aria's `I18nProvider`. It decides how the value is written and\n// read, so a field in a German app reads \"1.234,5\" as 1234.5.\n//\n// A stepper press is announced on iOS and Android, by the value it leaves,\n// since VoiceOver and TalkBack stay on the stepper rather than reading the\n// field again.\n\ntype NumberFieldProps = Omit<\n TextInputProps,\n | 'accessibilityHint'\n | 'accessibilityLabel'\n | 'aria-disabled'\n | 'aria-label'\n | 'autoComplete'\n | 'autoCorrect'\n | 'children'\n | 'cursorColor'\n | 'defaultValue'\n | 'editable'\n | 'inputMode'\n | 'keyboardType'\n | 'maxLength'\n | 'multiline'\n | 'numberOfLines'\n | 'onChange'\n | 'onChangeText'\n | 'placeholder'\n | 'placeholderTextColor'\n | 'readOnly'\n | 'selectionColor'\n | 'spellCheck'\n | 'style'\n | 'underlineColorAndroid'\n | 'value'\n> & {\n /**\n * The name of the stepper that lowers the value, for a screen reader. Left\n * out, it is the English \"Decrease\" followed by the field's own label.\n */\n readonly decrementLabel?: string\n /** The value the field opens with, when it keeps its own. */\n readonly defaultValue?: number\n /**\n * A hint shown under the field. Replaced by `error` when there is one, so\n * the two never stack.\n */\n readonly description?: string\n /**\n * The problem with the current value, in words. Its presence is what puts\n * the field in its error state: the message, the error colours, and the\n * invalid state a screen reader reads all follow from it. The line under\n * the field arrives with the message, so the field grows when this does,\n * unless it is inside a `Form`, which keeps the line drawn. It wins over\n * what `validate` and the form say, and holds a `native` form back.\n */\n readonly error?: string\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, as the text fields page draws it.\n * `false` keeps it small at the top in every state.\n * @default true\n */\n readonly floatingLabel?: boolean\n /**\n * How the value is written and read: a currency, a percentage, a unit, a\n * number of fraction digits. It also decides what can be typed.\n */\n readonly formatOptions?: Intl.NumberFormatOptions\n /**\n * The name of the stepper that raises the value, for a screen reader. Left\n * out, it is the English \"Increase\" followed by the field's own label.\n */\n readonly incrementLabel?: string\n /**\n * A ref to the field's own `TextInput`, which is what a call site moves\n * focus to, after a server's error, say. `ref` is the field as a whole.\n */\n readonly inputRef?: Ref<ComponentRef<typeof TextInput>>\n /**\n * Draws the field disabled: it takes no focus, no input and no steps.\n * @default false\n */\n readonly isDisabled?: boolean\n /**\n * Shows the value and takes focus, but takes no input and no steps.\n * @default false\n */\n readonly isReadOnly?: 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 /**\n * What the field is for, and the name a screen reader reads for it.\n * Required, since a field with no label is a box nobody can name.\n */\n readonly label: string\n /**\n * The BCP 47 locale the value is written and read in. Defaults to the\n * device's.\n */\n readonly locale?: string\n /** The highest value the field takes. A committed value is clamped to it. */\n readonly maxValue?: number\n /** The lowest value the field takes. A committed value is clamped to it. */\n readonly minValue?: number\n /**\n * The name the value is submitted under by the `Form` around the field,\n * and the key its `validationErrors` reach the field by. The form submits\n * the number written out, such as `1234.5`, and `''` for an empty field.\n */\n readonly name?: string\n /**\n * Renders the value in the mono face with tabular figures, for amounts and\n * other numbers meant to be compared down a column. On by default, since a\n * number field holds nothing else.\n * @default true\n */\n readonly numeric?: boolean\n /**\n * Called with the committed value, once it is read from what was typed or\n * stepped to. `NaN` is an empty field.\n */\n readonly onChange?: (value: number) => void\n readonly ref?: Ref<ComponentRef<typeof View>>\n /**\n * The amount the steppers move the value by, and the multiple of it, from\n * `minValue`, that a committed value snaps to.\n */\n readonly step?: number\n /**\n * How the two steppers sit at the end of the box: stacked, the plus over\n * the minus, flush with the box's edge, or side by side as extra-small\n * icon buttons.\n * @default 'vertical'\n */\n readonly steppers?: 'horizontal' | 'vertical'\n /** Positions and sizes the field as a whole. */\n readonly style?: StyleProp<ViewStyle>\n /**\n * Checks the value, `NaN` for an empty field, and returns its problem in\n * words, or several, where there is one, and `true`, `null` or `undefined`\n * where there is none. Under the default `aria` validation the error shows\n * as the value changes; inside a `native` form it shows once a submission\n * is tried, or once the field loses focus after an edit, and holds the form\n * back.\n */\n readonly validate?: (value: number) => ValidationResult\n /** The value, when the call site keeps it. `NaN` is an empty field. */\n readonly value?: number\n /**\n * The filled box, or the outlined one: no fill, an outline that thickens\n * and takes the primary role while focused, and the label cutting it once\n * it floats, the text fields page's two fields.\n * @default 'filled'\n */\n readonly variant?: FieldVariant\n}\n\n// What a stepper hands its control so a tap steps once and a hold keeps\n// stepping.\ntype Spin = {\n readonly onPress: () => void\n readonly onPressIn: () => void\n readonly onPressOut: () => void\n}\n\ntype StepperProps = Spin & {\n readonly 'aria-label': string\n readonly children: ReactNode\n readonly half: number\n readonly isDisabled: boolean\n readonly onBlur: () => void\n readonly onFocus: () => void\n readonly outlined: boolean\n readonly place: 'bottom' | 'top'\n}\n\ntype SteppersProps = {\n readonly canDecrement: boolean\n readonly canIncrement: boolean\n readonly decrementLabel: string\n readonly incrementLabel: string\n readonly inline: boolean\n readonly onBlur: () => void\n readonly onDecrement: () => void\n readonly onFocus: () => void\n readonly onIncrement: () => void\n readonly outlined: boolean\n}\n\n// A stacked stepper's width, and the glyph it draws: the icon buttons page's\n// 20dp, for the extra-small size the pair stands in for.\nconst STEPPER_WIDTH = 32\nconst GLYPH_SIZE = 20\n\n// How long a stepper is held before it starts stepping on its own, and how\n// often it steps after that: React Aria's timings for a stepper held by\n// touch.\nconst SPIN_DELAY = 600\nconst SPIN_INTERVAL = 60\n\nconst stylesOf = themedStyles(({ radii, spacing }) =>\n StyleSheet.create({\n // One stacked stepper: half the column, its glyph in the middle.\n stepper: {\n alignItems: 'center',\n flexBasis: 0,\n flexGrow: 1,\n justifyContent: 'center',\n width: STEPPER_WIDTH,\n },\n stepperBottomOutlined: {\n borderBottomEndRadius: radii.xs,\n },\n // The ring inside the stepper, as web draws it, since outside it would\n // fall over the box's edge and the other stepper.\n stepperRing: {\n outlineOffset: -2,\n },\n // Stacked: the column reaches out of the box's padding to sit flush with\n // its top, end and bottom, 8dp after the value rather than the box's 16.\n steppers: {\n alignSelf: 'stretch',\n flexDirection: 'column',\n marginEnd: -spacing.lg,\n marginStart: spacing.sm - spacing.lg,\n marginVertical: -spacing.sm,\n },\n // Side by side: 12dp from the end, as the page places a field's icons,\n // and 8dp apart, which is how far each button's target reaches past it,\n // so neither target falls over the other's glyph. They centre on the\n // box, as the page centres a trailing icon and as web draws them, and\n // take no more of its height than the value's line, so the outlined\n // box, whose content is that line alone, is not made taller by them.\n // The margins that do it are worked out where they render, since the\n // line follows the device's text size.\n steppersInline: {\n alignSelf: 'center',\n flexDirection: 'row',\n gap: spacing.sm,\n marginEnd: spacing.md - spacing.lg,\n marginStart: spacing.sm - spacing.lg,\n },\n // In the outlined box the column has 16dp to reach rather than 8.\n steppersOutlined: {\n marginVertical: -spacing.lg,\n },\n stepperTop: {\n borderTopEndRadius: radii.xs,\n },\n }),\n)\n\n// The field's own blur handling, then the call site's.\nfunction blurThen(\n onBlur: () => void,\n then: ((event: BlurEvent) => void) | undefined,\n) {\n return (event: BlurEvent) => {\n onBlur()\n then?.(event)\n }\n}\n\n// Reads the text as the field's value, then hands the event on.\nfunction commitBefore<Event>(\n state: NumberFieldState,\n handler: ((event: Event) => void) | undefined,\n) {\n return (event: Event) => {\n state.commit()\n handler?.(event)\n }\n}\n\n// The text typed, kept only where it could still become a number, and\n// reported to the field's validation as an edit.\nfunction editInto(state: NumberFieldState, onEdit: () => void) {\n return (text: string) => {\n if (state.validate(text)) {\n state.setInputValue(text)\n onEdit()\n }\n }\n}\n\nfunction glyphOf(color: string): IconStyle {\n return { color, size: GLYPH_SIZE }\n}\n\n// A stacked stepper's half of the box: the box's padding above and below\n// and the lines it holds, at the device's text size, halved.\nfunction halfOf(\n { spacing, typography }: ResolvedTheme,\n outlined: boolean,\n fontScale: number,\n) {\n return outlined\n ? spacing.lg + (typography.bodyLargeLineHeight * fontScale) / 2\n : spacing.sm +\n ((typography.bodySmallLineHeight + typography.bodyLargeLineHeight) *\n fontScale) /\n 2\n}\n\n// The keyboard that types what the field takes. React Aria's own choice of\n// input mode, in React Native's keyboards.\nfunction keyboardOf(\n minValue: number | undefined,\n hasDecimals: boolean,\n): KeyboardTypeOptions {\n const hasNegative =\n minValue === undefined || Number.isNaN(minValue) || minValue < 0\n\n if (hasNegative) {\n return Platform.OS === 'ios' ? 'numbers-and-punctuation' : 'numeric'\n }\n\n return hasDecimals ? 'decimal-pad' : 'number-pad'\n}\n\n// The margin that gives a side-by-side stepper the value's line in the\n// box's height: half the difference between the two, negative where the\n// button is taller.\nfunction marginVerticalOf(margin: number): ViewStyle {\n return { marginVertical: margin }\n}\n\n/**\n * A labelled number input with steppers, the text fields page's filled or\n * outlined field. Pass `value` with `onChange` to control it, or\n * `defaultValue` to let it keep its own; `onChange` is handed the committed\n * number, `NaN` for an empty field. `minValue`, `maxValue` and `step` shape\n * it, and `formatOptions` says how it reads, in `locale`: a currency, a\n * percentage, a unit.\n *\n * React Native's own `TextInput` props, the return key among them, reach the\n * control; `style` and `ref` are the field as a whole, and `inputRef` the\n * control.\n *\n * ```tsx\n * <NumberField defaultValue={1234.5} label=\"Label\" />\n * ```\n */\nfunction NumberField({\n decrementLabel,\n defaultValue,\n description,\n error,\n floatingLabel = true,\n formatOptions,\n incrementLabel,\n inputRef,\n isDisabled = false,\n isReadOnly = false,\n isRequired = false,\n label,\n locale,\n maxValue,\n minValue,\n name,\n numeric = true,\n onBlur,\n onChange,\n onFocus,\n onSubmitEditing,\n ref,\n returnKeyType = 'done',\n step,\n steppers = 'vertical',\n style,\n validate,\n value,\n variant = 'filled',\n ...props\n}: NumberFieldProps) {\n const id = useId()\n const control = useRef<ComponentRef<typeof TextInput>>(null)\n const writtenIn = localeOf(locale)\n const state = useNumberFieldState({\n defaultValue,\n formatOptions,\n isDisabled,\n isReadOnly,\n locale: writtenIn,\n maxValue,\n minValue,\n onChange,\n step,\n value,\n })\n const empty = Number.isNaN(state.numberValue)\n const validation = useFieldValidation({\n control,\n error,\n isDisabled,\n isEmpty: empty,\n isReadOnly,\n isRequired,\n name,\n submitted: empty ? '' : String(state.numberValue),\n validate,\n value: state.numberValue,\n })\n const shownError = validation.error\n const focus = useFieldFocus({\n onBlur: commitBefore<BlurEvent>(state, blurThen(validation.onBlur, onBlur)),\n onFocus,\n })\n const hasDecimals =\n (new NumberFormatter(writtenIn, formatOptions).resolvedOptions()\n .maximumFractionDigits ?? 0) > 0\n const announced = useStepAnnouncement(state.inputValue)\n // The box is focused while focus is anywhere in it, a stepper's included,\n // as web's is through `:focus-within`.\n const [stepperFocused, setStepperFocused] = useState(false)\n\n useImperativeHandle<\n ComponentRef<typeof TextInput> | null,\n ComponentRef<typeof TextInput> | null\n >(inputRef, () => control.current, [])\n\n return (\n <View ref={ref} style={style}>\n <FieldBox\n control={control}\n end={steppersOf({\n canDecrement: state.canDecrement,\n canIncrement: state.canIncrement,\n decrementLabel: decrementLabel ?? `Decrease ${label}`,\n incrementLabel: incrementLabel ?? `Increase ${label}`,\n inline: steppers === 'horizontal',\n onBlur: () => {\n setStepperFocused(false)\n },\n onDecrement: announced(stepThen(state.decrement, validation.onEdit)),\n onFocus: () => {\n setStepperFocused(true)\n },\n onIncrement: announced(stepThen(state.increment, validation.onEdit)),\n outlined: variant === 'outlined',\n })}\n floatingLabel={floatingLabel}\n isDisabled={isDisabled}\n isFocused={focus.focused || stepperFocused}\n isInvalid={shownError !== undefined}\n isPopulated={state.inputValue !== ''}\n isRequired={isRequired}\n label={label}\n variant={variant}\n >\n <FieldInput\n {...props}\n {...focus.handlers}\n aria-label={label}\n autoComplete=\"off\"\n autoCorrect={false}\n described={describedBy(id, { description, error: shownError })}\n editable={!isDisabled && !isReadOnly}\n keyboardType={keyboardOf(minValue, hasDecimals)}\n numeric={numeric}\n onChangeText={editInto(state, validation.onEdit)}\n onSubmitEditing={commitBefore<TextInputSubmitEditingEvent>(\n state,\n onSubmitEditing,\n )}\n ref={control}\n returnKeyType={returnKeyType}\n spellCheck={false}\n value={state.inputValue}\n />\n </FieldBox>\n <FieldMessage description={description} error={shownError} id={id} />\n </View>\n )\n}\n\n// The 48dp target a stacked stepper reaches to, all of its height on the\n// side away from the other stepper, and its width either side.\nfunction outwardSlop(\n half: number,\n place: 'bottom' | 'top',\n): Insets | undefined {\n const slop = hitSlop(half, STEPPER_WIDTH)\n if (slop === undefined) {\n return undefined\n }\n\n const reach = (slop.top ?? 0) + (slop.bottom ?? 0)\n return place === 'top'\n ? { ...slop, bottom: 0, top: reach }\n : { ...slop, bottom: reach, top: 0 }\n}\n\n/**\n * One of the stacked pair: half the column, the glyph in on surface\n * variant, and the state layer, the ripple and the ring every control\n * draws, the ring inside it. Disabled at the end of the range, where the\n * glyph takes on surface at the disabled opacity.\n */\nfunction Stepper({\n 'aria-label': ariaLabel,\n children,\n half,\n isDisabled,\n onBlur,\n onFocus,\n onPress,\n onPressIn,\n onPressOut,\n outlined,\n place,\n}: StepperProps) {\n const theme = useTheme()\n const styles = stylesOf(theme)\n const { colors, stateLayerOpacity } = theme\n const corner =\n place === 'top'\n ? styles.stepperTop\n : outlined\n ? styles.stepperBottomOutlined\n : undefined\n const feedback = usePressFeedback({\n color: colors.onSurfaceVariant,\n corners: corner,\n disabled: isDisabled,\n onBlur,\n onFocus,\n onPressIn,\n onPressOut,\n })\n\n return (\n <Pressable\n {...feedback.handlers}\n aria-label={ariaLabel}\n disabled={isDisabled}\n hitSlop={outwardSlop(half, place)}\n onPress={onPress}\n role=\"button\"\n style={composeStyles<ViewStyle>(\n styles.stepper,\n corner,\n feedback.ring,\n feedback.ring === undefined ? undefined : styles.stepperRing,\n )}\n >\n {feedback.layer}\n <IconStyleContext\n value={glyphOf(\n isDisabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : colors.onSurfaceVariant,\n )}\n >\n {children}\n </IconStyleContext>\n </Pressable>\n )\n}\n\n/**\n * The two steppers at the box's end, stacked or side by side, each\n * disabled where it would not move the value.\n */\nfunction Steppers({\n canDecrement,\n canIncrement,\n decrementLabel,\n incrementLabel,\n inline,\n onBlur,\n onDecrement,\n onFocus,\n onIncrement,\n outlined,\n}: SteppersProps) {\n const theme = useTheme()\n const styles = stylesOf(theme)\n const { fontScale } = useWindowDimensions()\n const { sizing, typography } = theme\n const up = useSpin(onIncrement, canIncrement)\n const down = useSpin(onDecrement, canDecrement)\n\n if (inline) {\n return (\n <View\n style={composeStyles<ViewStyle>(\n styles.steppersInline,\n marginVerticalOf(\n (typography.bodyLargeLineHeight * fontScale - sizing.controlXs) / 2,\n ),\n )}\n >\n <IconButton\n {...down}\n aria-label={decrementLabel}\n isDisabled={!canDecrement}\n onBlur={onBlur}\n onFocus={onFocus}\n size=\"xs\"\n >\n <MinusGlyph />\n </IconButton>\n <IconButton\n {...up}\n aria-label={incrementLabel}\n isDisabled={!canIncrement}\n onBlur={onBlur}\n onFocus={onFocus}\n size=\"xs\"\n >\n <PlusGlyph />\n </IconButton>\n </View>\n )\n }\n\n const half = halfOf(theme, outlined, fontScale)\n\n return (\n <View\n style={composeStyles<ViewStyle>(\n styles.steppers,\n outlined ? styles.steppersOutlined : undefined,\n )}\n >\n <Stepper\n {...up}\n aria-label={incrementLabel}\n half={half}\n isDisabled={!canIncrement}\n onBlur={onBlur}\n onFocus={onFocus}\n outlined={outlined}\n place=\"top\"\n >\n <PlusGlyph />\n </Stepper>\n <Stepper\n {...down}\n aria-label={decrementLabel}\n half={half}\n isDisabled={!canDecrement}\n onBlur={onBlur}\n onFocus={onFocus}\n outlined={outlined}\n place=\"bottom\"\n >\n <MinusGlyph />\n </Stepper>\n </View>\n )\n}\n\n// The steppers as the box's end, built by a call rather than written at the\n// prop, which is what react-perf's no-jsx-as-prop is after.\nfunction steppersOf(props: SteppersProps) {\n return <Steppers {...props} />\n}\n\n/**\n * A stepper's press handlers: a tap steps once, when it is released, and a\n * hold keeps stepping, from `SPIN_DELAY` on and every `SPIN_INTERVAL` after,\n * until the press ends or the value reaches its bound. A hold steps nothing\n * more on release, and a press the finger slides off steps nothing at all,\n * as React Aria's stepper does for a touch.\n */\n// A stepper's step, reported to the field's validation as an edit.\nfunction stepThen(step: () => void, onEdit: () => void) {\n return () => {\n step()\n onEdit()\n }\n}\n\nfunction useSpin(step: () => void, canStep: boolean): Spin {\n // The step and whether it can move, as of the last render, since a hold\n // steps from timers that outlive the render that started them.\n const latest = useRef({ canStep, step })\n const timer = useRef<ReturnType<typeof setTimeout>>(undefined)\n const spun = useRef(false)\n\n useEffect(() => {\n latest.current = { canStep, step }\n })\n useEffect(\n () => () => {\n clearTimeout(timer.current)\n },\n [],\n )\n\n const tick = () => {\n if (!latest.current.canStep) {\n return\n }\n spun.current = true\n latest.current.step()\n timer.current = setTimeout(tick, SPIN_INTERVAL)\n }\n\n return {\n onPress: () => {\n if (!spun.current) {\n latest.current.step()\n }\n },\n onPressIn: () => {\n clearTimeout(timer.current)\n spun.current = false\n timer.current = setTimeout(tick, SPIN_DELAY)\n },\n onPressOut: () => {\n clearTimeout(timer.current)\n },\n }\n}\n\n/**\n * Says the field's text after a stepper press, once the field has written\n * it, on iOS and Android, where the screen reader stays on the stepper.\n * Wrap each step in what it returns.\n */\nfunction useStepAnnouncement(text: string) {\n const pending = useRef(false)\n\n useEffect(() => {\n if (pending.current) {\n pending.current = false\n AccessibilityInfo.announceForAccessibility(text)\n }\n }, [text])\n\n return (step: () => void) => () => {\n pending.current = Platform.OS === 'ios' || Platform.OS === 'android'\n step()\n }\n}\n\nexport { NumberField }\nexport type { NumberFieldProps }\n"],"mappings":";;;;;;;;;;;;;;;;;AAmRA,MAAM4F,gBAAgB;AACtB,MAAMC,aAAa;AAKnB,MAAMC,aAAa;AACnB,MAAMC,gBAAgB;AAEtB,MAAMC,WAAWpD,cAAc,EAAEqD,OAAOC,cACtC9E,WAAW+E,OAAO;CAEhBC,SAAS;EACPC,YAAY;EACZC,WAAW;EACXC,UAAU;EACVC,gBAAgB;EAChBC,OAAOb;CACT;CACAc,uBAAuB,EACrBC,uBAAuBV,MAAMW,GAC/B;CAGAC,aAAa,EACXC,eAAe,GACjB;CAGAvC,UAAU;EACRwC,WAAW;EACXC,eAAe;EACfC,WAAW,CAACf,QAAQgB;EACpBC,aAAajB,QAAQkB,KAAKlB,QAAQgB;EAClCG,gBAAgB,CAACnB,QAAQkB;CAC3B;CASAE,gBAAgB;EACdP,WAAW;EACXC,eAAe;EACfO,KAAKrB,QAAQkB;EACbH,WAAWf,QAAQsB,KAAKtB,QAAQgB;EAChCC,aAAajB,QAAQkB,KAAKlB,QAAQgB;CACpC;CAEAO,kBAAkB,EAChBJ,gBAAgB,CAACnB,QAAQgB,GAC3B;CACAQ,YAAY,EACVC,oBAAoB1B,MAAMW,GAC5B;AACF,CAAC,CACH;AAGA,SAASgB,SACP1C,QACA2C,MACA;CACA,QAAQC,UAAqB;EAC3B5C,OAAO;EACP2C,OAAOC,KAAK;CACd;AACF;AAGA,SAASC,aACPC,OACAC,SACA;CACA,QAAQH,UAAiB;EACvBE,MAAMG,OAAO;EACbF,UAAUH,KAAK;CACjB;AACF;AAIA,SAASM,SAASJ,OAAyBK,QAAoB;C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IAAA2I;CAAA,IAAAK;CAAA,IAAAJ,EAAA,OAAArB,MAAA;EAEnBoB,WAAA;GACR,IAAIoG,QAAO3D,SAAQ;IACjB2D,QAAO3D,UAAW;IAClBlL,kBAAiB8O,yBAA0BzH,IAAI;GAAC;EACjD;EACAyB,KAAA,CAACzB,IAAI;EAACqB,EAAA,KAAArB;EAAAqB,EAAA,KAAAD;EAAAC,EAAA,KAAAI;CAAA,OAAA;EAAAL,KAAAC,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CALT/I,UAAU8I,IAKPK,EAAM;CAAC,IAAAC;CAAA,IAAAL,EAAA,OAAAsC,OAAAC,IAAA,2BAAA,GAAA;EAEHlC,MAAA1F,eAAsB;GAC3BwL,QAAO3D,UAAWjL,SAAQoI,OAAQ,SAASpI,SAAQoI,OAAQ;GAC3DhF,KAAK;EAAC;EACPqF,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAHMK;AAGN"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MarkImageProps } from "../../mark/index.js";
|
|
2
2
|
import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
3
|
-
import { Ref } from "react";
|
|
3
|
+
import { ComponentRef, Ref } from "react";
|
|
4
4
|
//#region src/components/product-icon/index.d.ts
|
|
5
5
|
type ProductIconProps = Omit<ViewProps, 'children' | 'style'> & {
|
|
6
6
|
/**
|
|
@@ -24,7 +24,7 @@ type ProductIconProps = Omit<ViewProps, 'children' | 'style'> & {
|
|
|
24
24
|
* channel's hash or a bracket.
|
|
25
25
|
*/
|
|
26
26
|
readonly name: string;
|
|
27
|
-
readonly ref?: Ref<View
|
|
27
|
+
readonly ref?: Ref<ComponentRef<typeof View>>;
|
|
28
28
|
/**
|
|
29
29
|
* Edge length: `sm` 36dp, `md` 40dp, `lg` 56dp. The same three Avatar
|
|
30
30
|
* uses, so the two are interchangeable wherever one leads a row or a card.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Ref","StyleProp","View","ViewProps","ViewStyle","MarkImageProps","Mark","ProductIconProps","Omit","decorative","imgProps","name","ref","size","src","style","tone","ProductIcon","t0","$","_c","props","t1","t2","undefined","t3","_c"],"sources":["../../../src/components/product-icon/index.tsx"],"sourcesContent":["import type { Ref } from 'react'\nimport type { StyleProp, View, ViewProps, ViewStyle } from 'react-native'\n\nimport type { MarkImageProps } from '../../mark'\n\nimport { Mark } from '../../mark'\n\n// The counterpart to Avatar: Avatar stands for a person, this stands for\n// everything else, such as an application, a service or a brand. It is drawn\n// as a rounded square with the mark letterboxed, and its tone tints the\n// fallback rather than the square. The header of `src/mark/styles.ts` says\n// why on all three counts.\n//\n// The box, the sizes, the tones, the mark's loading and the labelling are\n// the mark's in `src/mark`, which Avatar draws a person through as well. No\n// Material Design page draws a product mark, so its sizes are Avatar's, 36,\n// 40 and 56, which is what lets a mark and a person fill the same slot, and\n// its corner is the small one from the radius scale, as web's is.\n\ntype ProductIconProps = Omit<ViewProps, 'children' | 'style'> & {\n /**\n * Hides the mark from screen readers, for one beside the name of what it\n * identifies, where it would otherwise announce the name a second time.\n * `name` still supplies the initial, and is not announced.\n * @default false\n */\n readonly decorative?: boolean\n /**\n * Props for the mark's own `Image`: `crossOrigin` and `referrerPolicy` for\n * where it is served from, and `resizeMethod`, `fadeDuration` and\n * `progressiveRenderingEnabled` for how Android decodes and shows it.\n */\n readonly imgProps?: MarkImageProps\n /**\n * What this identifies. Supplies both the fallback initial and the\n * accessible name, so a screen reader announces the thing rather than\n * reading a letter aloud. The initial is the name's first letter, number or\n * emoji, passing over punctuation it opens with: a handle's at sign, a\n * channel's hash or a bracket.\n */\n readonly name: string\n readonly ref?: Ref<View
|
|
1
|
+
{"version":3,"file":"index.js","names":["ComponentRef","Ref","StyleProp","View","ViewProps","ViewStyle","MarkImageProps","Mark","ProductIconProps","Omit","decorative","imgProps","name","ref","size","src","style","tone","ProductIcon","t0","$","_c","props","t1","t2","undefined","t3","_c"],"sources":["../../../src/components/product-icon/index.tsx"],"sourcesContent":["import type { ComponentRef, Ref } from 'react'\nimport type { StyleProp, View, ViewProps, ViewStyle } from 'react-native'\n\nimport type { MarkImageProps } from '../../mark'\n\nimport { Mark } from '../../mark'\n\n// The counterpart to Avatar: Avatar stands for a person, this stands for\n// everything else, such as an application, a service or a brand. It is drawn\n// as a rounded square with the mark letterboxed, and its tone tints the\n// fallback rather than the square. The header of `src/mark/styles.ts` says\n// why on all three counts.\n//\n// The box, the sizes, the tones, the mark's loading and the labelling are\n// the mark's in `src/mark`, which Avatar draws a person through as well. No\n// Material Design page draws a product mark, so its sizes are Avatar's, 36,\n// 40 and 56, which is what lets a mark and a person fill the same slot, and\n// its corner is the small one from the radius scale, as web's is.\n\ntype ProductIconProps = Omit<ViewProps, 'children' | 'style'> & {\n /**\n * Hides the mark from screen readers, for one beside the name of what it\n * identifies, where it would otherwise announce the name a second time.\n * `name` still supplies the initial, and is not announced.\n * @default false\n */\n readonly decorative?: boolean\n /**\n * Props for the mark's own `Image`: `crossOrigin` and `referrerPolicy` for\n * where it is served from, and `resizeMethod`, `fadeDuration` and\n * `progressiveRenderingEnabled` for how Android decodes and shows it.\n */\n readonly imgProps?: MarkImageProps\n /**\n * What this identifies. Supplies both the fallback initial and the\n * accessible name, so a screen reader announces the thing rather than\n * reading a letter aloud. The initial is the name's first letter, number or\n * emoji, passing over punctuation it opens with: a handle's at sign, a\n * channel's hash or a bracket.\n */\n readonly name: string\n readonly ref?: Ref<ComponentRef<typeof View>>\n /**\n * Edge length: `sm` 36dp, `md` 40dp, `lg` 56dp. The same three Avatar\n * uses, so the two are interchangeable wherever one leads a row or a card.\n * @default 'md'\n */\n readonly size?: 'lg' | 'md' | 'sm'\n /**\n * The mark to show in place of the initial. The initial stays until it has\n * loaded, and comes back if it fails.\n */\n readonly src?: string\n readonly style?: StyleProp<ViewStyle>\n /**\n * Which container and on-container colour pair to tint the fallback with.\n * It is the fallback's own background, so it is gone once `src` has loaded\n * rather than sitting behind the mark.\n * @default 'primary'\n */\n readonly tone?: 'negative' | 'positive' | 'primary' | 'secondary' | 'tertiary'\n}\n\n/**\n * A small square mark identifying something that is not a person, such as\n * an application, a service or a brand. Reach for Avatar when it is a\n * person.\n *\n * ```tsx\n * <ProductIcon name=\"First item\" src={logo} />\n * ```\n *\n * The mark is letterboxed rather than cropped, so a logo of any aspect ratio\n * can be handed over as it was drawn.\n *\n * It is announced as an image named by `name`. When the thing's name is\n * already written next to the mark, mark it `decorative`, so a screen reader\n * reads the name once.\n *\n * The initial is taken in the device's locale. `style`, `ref` and `testID`\n * land on the square.\n */\nfunction ProductIcon({\n size = 'md',\n tone = 'primary',\n ...props\n}: ProductIconProps) {\n return <Mark {...props} kind=\"thing\" size={size} tone={tone} />\n}\n\nexport type { ProductIconProps }\n\nexport { ProductIcon }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAkFA,SAAAkB,YAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAD,IAAA;EAAqB,CAAA,CAAAL,MAAAS,IAAAN,MAAAO,IAAA,GAAAF,SAAAH;EAIFC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAA;EAAAF,QAAAF,EAAA;EAAAG,KAAAH,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CAHjB,MAAAN,OAAAS,OAAAE,KAAAA,IAAA,OAAAF;CACA,MAAAN,OAAAO,OAAAC,KAAAA,IAAA,YAAAD;CAAgB,IAAAE;CAAA,IAAAN,EAAA,OAAAE,SAAAF,EAAA,OAAAN,QAAAM,EAAA,OAAAH,MAAA;EAGTS,KAAA,oBAAC,MAAD;GAAK,GAAKJ;GAAY,MAAA;GAAcR;GAAYG;EAAI,CAAA;EAAIG,EAAA,KAAAE;EAAAF,EAAA,KAAAN;EAAAM,EAAA,KAAAH;EAAAG,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAAxDM;AAAwD"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { IndicatorTone } from "../../indicator/index.js";
|
|
2
|
+
import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
3
|
+
import { ComponentRef, Ref } from "react";
|
|
4
|
+
//#region src/components/progress-indicator/index.d.ts
|
|
5
|
+
type ProgressIndicatorProps = Omit<ViewProps, 'children' | 'style'> & {
|
|
6
|
+
/**
|
|
7
|
+
* How far the work is loaded ahead of the value, a video's buffered
|
|
8
|
+
* seconds or a queue's fetched pages. Read on the same scale as `value`:
|
|
9
|
+
* the track is solid up to it and dotted beyond. Ignored while the
|
|
10
|
+
* indicator is indeterminate and by the ring, and left out for work with
|
|
11
|
+
* nothing to buffer.
|
|
12
|
+
*/
|
|
13
|
+
readonly buffer?: number;
|
|
14
|
+
/**
|
|
15
|
+
* How wide the ring is drawn, as a CSS length read the way a theme's
|
|
16
|
+
* lengths are. Everything inside scales with it, so a ring in a button can
|
|
17
|
+
* take the button's icon size. The length is in px, since a relative unit
|
|
18
|
+
* has nothing on native to be relative to. Ignored by the line, which fills
|
|
19
|
+
* the width it is given.
|
|
20
|
+
* @default '40px', or '48px' for the wavy ring
|
|
21
|
+
*/
|
|
22
|
+
readonly diameter?: `${number}px`;
|
|
23
|
+
/**
|
|
24
|
+
* How the value reads.
|
|
25
|
+
* @default { style: 'percent' }
|
|
26
|
+
*/
|
|
27
|
+
readonly formatOptions?: Intl.NumberFormatOptions;
|
|
28
|
+
/**
|
|
29
|
+
* For work whose length is not known: the indicator runs on its own, and
|
|
30
|
+
* has no value to show or announce.
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
readonly isIndeterminate?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* What the work is, shown above the indicator. A screen reader reads it as
|
|
36
|
+
* the indicator's name; an indicator whose surroundings name it takes
|
|
37
|
+
* `aria-label` instead and leaves this out.
|
|
38
|
+
*/
|
|
39
|
+
readonly label?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The BCP 47 locale the value is written in. Defaults to the device's.
|
|
42
|
+
*/
|
|
43
|
+
readonly locale?: string;
|
|
44
|
+
/**
|
|
45
|
+
* The value at which the work is done.
|
|
46
|
+
* @default 100
|
|
47
|
+
*/
|
|
48
|
+
readonly maxValue?: number;
|
|
49
|
+
/**
|
|
50
|
+
* The value at which the work starts.
|
|
51
|
+
* @default 0
|
|
52
|
+
*/
|
|
53
|
+
readonly minValue?: number;
|
|
54
|
+
readonly ref?: Ref<ComponentRef<typeof View>>;
|
|
55
|
+
/**
|
|
56
|
+
* The page's two shapes. `wavy` draws the active indicator as a wave, which
|
|
57
|
+
* lies flat near either end of a determinate value, and leaves the track
|
|
58
|
+
* and the stop flat; the wavy ring is 48dp across rather than 40. Under
|
|
59
|
+
* reduced motion a wavy indicator is drawn flat.
|
|
60
|
+
* @default 'flat'
|
|
61
|
+
*/
|
|
62
|
+
readonly shape?: ProgressIndicatorShape;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the value is shown beside the label. Ignored while the indicator
|
|
65
|
+
* is indeterminate, which has no value to show.
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
68
|
+
readonly showValue?: boolean;
|
|
69
|
+
readonly style?: StyleProp<ViewStyle>;
|
|
70
|
+
/**
|
|
71
|
+
* Which colours it is drawn in. `primary` is the page's own pair, the active
|
|
72
|
+
* indicator in primary over a secondary container track, and `inherit`
|
|
73
|
+
* takes the colour of the slot it sits in, for an indicator inside something
|
|
74
|
+
* that already has one, such as a button, where primary would be the fill.
|
|
75
|
+
* @default 'primary'
|
|
76
|
+
*/
|
|
77
|
+
readonly tone?: ProgressIndicatorTone;
|
|
78
|
+
/**
|
|
79
|
+
* How far the work has gone, between `minValue` and `maxValue`.
|
|
80
|
+
* @default 0
|
|
81
|
+
*/
|
|
82
|
+
readonly value?: number;
|
|
83
|
+
/** The value as words, in place of the number `formatOptions` writes. */
|
|
84
|
+
readonly valueLabel?: string;
|
|
85
|
+
/**
|
|
86
|
+
* The line the page draws, or the ring: `linear` fills the width it is
|
|
87
|
+
* given, `circular` is 40dp across.
|
|
88
|
+
* @default 'linear'
|
|
89
|
+
*/
|
|
90
|
+
readonly variant?: ProgressIndicatorVariant;
|
|
91
|
+
};
|
|
92
|
+
type ProgressIndicatorShape = 'flat' | 'wavy';
|
|
93
|
+
type ProgressIndicatorTone = Extract<IndicatorTone, 'inherit' | 'primary'>;
|
|
94
|
+
type ProgressIndicatorVariant = 'circular' | 'linear';
|
|
95
|
+
/**
|
|
96
|
+
* Progress through a task, as a line or a ring. Pass `value` between
|
|
97
|
+
* `minValue` and `maxValue`, or set `isIndeterminate` for work whose length is
|
|
98
|
+
* not known. `formatOptions` says how the value reads, in `locale`, and
|
|
99
|
+
* `buffer` marks how far the work is loaded ahead of it.
|
|
100
|
+
*
|
|
101
|
+
* ```tsx
|
|
102
|
+
* <ProgressIndicator label="Label" showValue value={40} />
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* A screen reader hears it as a progress bar named by its label, with its
|
|
106
|
+
* value as `formatOptions` writes it, and no value while it is indeterminate.
|
|
107
|
+
* `style`, `ref` and `testID` land on the indicator as a whole, which is the
|
|
108
|
+
* view a layout positions.
|
|
109
|
+
*/
|
|
110
|
+
declare function ProgressIndicator({ 'aria-label': ariaLabel, buffer, diameter, formatOptions, isIndeterminate, label, locale, maxValue, minValue, shape, showValue, style, tone, value, valueLabel, variant, ...props }: ProgressIndicatorProps): import("react").JSX.Element;
|
|
111
|
+
//#endregion
|
|
112
|
+
export { ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorShape, type ProgressIndicatorTone, type ProgressIndicatorVariant };
|
|
113
|
+
//# sourceMappingURL=index.d.ts.map
|