@kanso-labs/react-native-kanso-ui 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/autocomplete/index.js +15 -1
- package/dist/autocomplete/index.js.map +1 -1
- package/dist/badge/index.js +9 -70
- package/dist/badge/index.js.map +1 -1
- package/dist/button/group.d.ts +5 -0
- package/dist/button/group.js +115 -0
- package/dist/button/group.js.map +1 -0
- package/dist/button/index.d.ts +4 -1
- package/dist/button/index.js +45 -23
- package/dist/button/index.js.map +1 -1
- package/dist/button/palettes.d.ts +2 -0
- package/dist/button/slots.js +2 -1
- package/dist/button/slots.js.map +1 -1
- package/dist/calendar/index.js +351 -182
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/styles.js +33 -2
- package/dist/calendar/styles.js.map +1 -1
- package/dist/carousel/arrangement.d.ts +5 -0
- package/dist/carousel/arrangement.js +123 -0
- package/dist/carousel/arrangement.js.map +1 -0
- package/dist/chequer/index.js +95 -0
- package/dist/chequer/index.js.map +1 -0
- package/dist/collection/index.d.ts +157 -0
- package/dist/collection/index.js +1331 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/color-thumb/index.js +56 -0
- package/dist/color-thumb/index.js.map +1 -0
- package/dist/components/badge/index.d.ts +48 -0
- package/dist/components/badge/index.js +122 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/{badge → components/badge}/styles.js +10 -6
- package/dist/components/badge/styles.js.map +1 -0
- package/dist/components/breadcrumbs/index.d.ts +66 -0
- package/dist/components/breadcrumbs/index.js +285 -0
- package/dist/components/breadcrumbs/index.js.map +1 -0
- package/dist/components/button/index.d.ts +4 -2
- package/dist/components/button/index.js +227 -188
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button-group/index.d.ts +87 -0
- package/dist/components/button-group/index.js +275 -0
- package/dist/components/button-group/index.js.map +1 -0
- package/dist/components/calendar/index.d.ts +11 -3
- package/dist/components/calendar/index.js +60 -45
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/carousel/index.d.ts +72 -0
- package/dist/components/carousel/index.js +496 -0
- package/dist/components/carousel/index.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +7 -1
- package/dist/components/checkbox/index.js +183 -138
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox-group/index.d.ts +92 -0
- package/dist/components/checkbox-group/index.js +306 -0
- package/dist/components/checkbox-group/index.js.map +1 -0
- package/dist/components/code/index.d.ts +25 -0
- package/dist/components/code/index.js +87 -0
- package/dist/components/code/index.js.map +1 -0
- package/dist/components/color-area/index.d.ts +85 -0
- package/dist/components/color-area/index.js +630 -0
- package/dist/components/color-area/index.js.map +1 -0
- package/dist/components/color-field/index.d.ts +144 -0
- package/dist/components/color-field/index.js +516 -0
- package/dist/components/color-field/index.js.map +1 -0
- package/dist/components/color-picker/index.d.ts +74 -0
- package/dist/components/color-picker/index.js +317 -0
- package/dist/components/color-picker/index.js.map +1 -0
- package/dist/components/color-slider/index.d.ts +82 -0
- package/dist/components/color-slider/index.js +456 -0
- package/dist/components/color-slider/index.js.map +1 -0
- package/dist/components/color-swatch/index.d.ts +46 -0
- package/dist/components/color-swatch/index.js +127 -0
- package/dist/components/color-swatch/index.js.map +1 -0
- package/dist/components/color-swatch-picker/index.d.ts +81 -0
- package/dist/components/color-swatch-picker/index.js +287 -0
- package/dist/components/color-swatch-picker/index.js.map +1 -0
- package/dist/components/color-wheel/index.d.ts +71 -0
- package/dist/components/color-wheel/index.js +407 -0
- package/dist/components/color-wheel/index.js.map +1 -0
- package/dist/components/combo-box/index.d.ts +193 -0
- package/dist/components/combo-box/index.js +616 -0
- package/dist/components/combo-box/index.js.map +1 -0
- package/dist/components/container/index.d.ts +47 -0
- package/dist/components/container/index.js +85 -0
- package/dist/components/container/index.js.map +1 -0
- package/dist/components/date-field/index.d.ts +120 -0
- package/dist/components/date-field/index.js +111 -0
- package/dist/components/date-field/index.js.map +1 -0
- package/dist/components/date-picker/index.d.ts +130 -0
- package/dist/components/date-picker/index.js +310 -0
- package/dist/components/date-picker/index.js.map +1 -0
- package/dist/components/date-range-picker/index.d.ts +139 -0
- package/dist/components/date-range-picker/index.js +421 -0
- package/dist/components/date-range-picker/index.js.map +1 -0
- package/dist/components/disclosure/index.d.ts +94 -0
- package/dist/components/disclosure/index.js +365 -0
- package/dist/components/disclosure/index.js.map +1 -0
- package/dist/components/disclosure-group/index.d.ts +61 -0
- package/dist/components/disclosure-group/index.js +100 -0
- package/dist/components/disclosure-group/index.js.map +1 -0
- package/dist/components/drop-zone/index.d.ts +113 -0
- package/dist/components/drop-zone/index.js +304 -0
- package/dist/components/drop-zone/index.js.map +1 -0
- package/dist/components/fab/index.d.ts +80 -0
- package/dist/components/fab/index.js +246 -0
- package/dist/components/fab/index.js.map +1 -0
- package/dist/components/fab-menu/index.d.ts +120 -0
- package/dist/components/fab-menu/index.js +640 -0
- package/dist/components/fab-menu/index.js.map +1 -0
- package/dist/components/feed/index.d.ts +57 -0
- package/dist/components/feed/index.js +167 -0
- package/dist/components/feed/index.js.map +1 -0
- package/dist/components/form/index.d.ts +3 -2
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/icon-button/index.d.ts +4 -2
- package/dist/components/icon-button/index.js +204 -171
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/keycap/index.d.ts +27 -0
- package/dist/components/keycap/index.js +136 -0
- package/dist/components/keycap/index.js.map +1 -0
- package/dist/components/list/index.d.ts +15 -158
- package/dist/components/list/index.js +21 -1047
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/list-box/index.d.ts +73 -0
- package/dist/components/list-box/index.js +82 -0
- package/dist/components/list-box/index.js.map +1 -0
- package/dist/components/loading-indicator/index.d.ts +32 -0
- package/dist/components/loading-indicator/index.js +174 -0
- package/dist/components/loading-indicator/index.js.map +1 -0
- package/dist/components/menu/index.js +1 -1
- package/dist/components/navigation-tree/index.d.ts +117 -0
- package/dist/components/navigation-tree/index.js +135 -0
- package/dist/components/navigation-tree/index.js.map +1 -0
- package/dist/components/number-field/index.js +132 -143
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/range-calendar/index.d.ts +69 -0
- package/dist/components/range-calendar/index.js +144 -0
- package/dist/components/range-calendar/index.js.map +1 -0
- package/dist/components/search-view/index.d.ts +78 -0
- package/dist/components/search-view/index.js +570 -0
- package/dist/components/search-view/index.js.map +1 -0
- package/dist/components/select/index.d.ts +152 -0
- package/dist/components/select/index.js +419 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/separator/index.d.ts +3 -2
- package/dist/components/separator/index.js +29 -26
- package/dist/components/separator/index.js.map +1 -1
- package/dist/components/slider/index.d.ts +111 -0
- package/dist/components/slider/index.js +673 -0
- package/dist/components/slider/index.js.map +1 -0
- package/dist/components/split-button/index.d.ts +77 -0
- package/dist/components/split-button/index.js +354 -0
- package/dist/components/split-button/index.js.map +1 -0
- package/dist/components/supporting-pane/index.d.ts +44 -0
- package/dist/components/supporting-pane/index.js +109 -0
- package/dist/components/supporting-pane/index.js.map +1 -0
- package/dist/components/tabs/index.d.ts +196 -0
- package/dist/components/tabs/index.js +1137 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/text/index.d.ts +1 -1
- package/dist/components/text/index.js +49 -21
- package/dist/components/text/index.js.map +1 -1
- package/dist/components/text-area/index.d.ts +145 -0
- package/dist/components/text-area/index.js +231 -0
- package/dist/components/text-area/index.js.map +1 -0
- package/dist/components/time-field/index.d.ts +43 -0
- package/dist/components/time-field/index.js +107 -0
- package/dist/components/time-field/index.js.map +1 -0
- package/dist/components/time-picker/index.d.ts +65 -0
- package/dist/components/time-picker/index.js +1168 -0
- package/dist/components/time-picker/index.js.map +1 -0
- package/dist/components/toolbar/index.d.ts +53 -0
- package/dist/components/toolbar/index.js +185 -0
- package/dist/components/toolbar/index.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +101 -0
- package/dist/components/tooltip/index.js +223 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/components/tree/index.d.ts +112 -0
- package/dist/components/tree/index.js +157 -0
- package/dist/components/tree/index.js.map +1 -0
- package/dist/control/group.js +23 -0
- package/dist/control/group.js.map +1 -0
- package/dist/disclosure/chevron.js +75 -0
- package/dist/disclosure/chevron.js.map +1 -0
- package/dist/disclosure/index.js +7 -0
- package/dist/disclosure/index.js.map +1 -0
- package/dist/drop/index.d.ts +54 -0
- package/dist/drop/index.js +161 -0
- package/dist/drop/index.js.map +1 -0
- package/dist/fab/index.d.ts +19 -0
- package/dist/fab/index.js +147 -0
- package/dist/fab/index.js.map +1 -0
- package/dist/field/chevron.js +74 -0
- package/dist/field/chevron.js.map +1 -0
- package/dist/field/index.d.ts +2 -1
- package/dist/field/index.js +350 -153
- package/dist/field/index.js.map +1 -1
- package/dist/field/styles.js +27 -0
- package/dist/field/styles.js.map +1 -1
- package/dist/files/index.d.ts +18 -0
- package/dist/files/index.js +107 -0
- package/dist/files/index.js.map +1 -0
- package/dist/form/index.d.ts +6 -4
- package/dist/form/index.js +64 -85
- package/dist/form/index.js.map +1 -1
- package/dist/glyphs/index.js +92 -1
- package/dist/glyphs/index.js.map +1 -1
- package/dist/i18n/index.js +20 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +1394 -34
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +51 -6
- package/dist/index.js +47 -4
- package/dist/indicator/paths.js +23 -1
- package/dist/indicator/paths.js.map +1 -1
- package/dist/modal/index.js +96 -68
- package/dist/modal/index.js.map +1 -1
- package/dist/navigation/index.js +8 -5
- package/dist/navigation/index.js.map +1 -1
- package/dist/number/keyboard.js +16 -0
- package/dist/number/keyboard.js.map +1 -0
- package/dist/overlay/anchored.js +68 -38
- package/dist/overlay/anchored.js.map +1 -1
- package/dist/overlay/keyboard.js +57 -0
- package/dist/overlay/keyboard.js.map +1 -0
- package/dist/overlay/panel.js +173 -19
- package/dist/overlay/panel.js.map +1 -1
- package/dist/overlay/placement.js +16 -2
- package/dist/overlay/placement.js.map +1 -1
- package/dist/picker/index.js +322 -0
- package/dist/picker/index.js.map +1 -0
- package/dist/press/index.d.ts +2 -0
- package/dist/press/index.js +102 -100
- package/dist/press/index.js.map +1 -1
- package/dist/row/index.js +77 -69
- package/dist/row/index.js.map +1 -1
- package/dist/row/styles.js +13 -2
- package/dist/row/styles.js.map +1 -1
- package/dist/segments/field.js +277 -0
- package/dist/segments/field.js.map +1 -0
- package/dist/segments/index.js +574 -0
- package/dist/segments/index.js.map +1 -0
- package/dist/segments/styles.js +24 -0
- package/dist/segments/styles.js.map +1 -0
- package/dist/separator/index.js +7 -0
- package/dist/separator/index.js.map +1 -0
- package/dist/slider/index.js +145 -0
- package/dist/slider/index.js.map +1 -0
- package/dist/swatch/index.js +56 -0
- package/dist/swatch/index.js.map +1 -0
- package/dist/typography/size.js +14 -0
- package/dist/typography/size.js.map +1 -0
- package/package.json +11 -2
- package/dist/badge/styles.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
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","messagesFor","useLocaleOf","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","t10","numberValue","empty","t11","String","t12","isEmpty","submitted","validation","shownError","t13","t14","focus","t15","resolvedOptions","maximumFractionDigits","announced","useStepAnnouncement","inputValue","stepperFocused","setStepperFocused","t16","t17","Symbol","for","current","t18","decrement","increment","t19","t20","steppersOf","decrease","replace","increase","stepThen","focused","t21","t22","handlers","t23","t24","t25","t26","t27","t28","t29","t30","t31","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 { messagesFor } from '../../i18n'\nimport { useLocaleOf } from '../../i18n/provider'\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 the `I18nProvider`'s**, as web reads it from React Aria's,\n// unless the `locale` prop names another, and the device's under neither. It\n// decides how the value is written and read, so a field in a German app reads\n// \"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 name React Aria gives web's in the `I18nProvider`'s\n * locale, or the device's outside one, around the field's own label:\n * \"Decrease Label\" in English.\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 name React Aria gives web's in the `I18nProvider`'s\n * locale, or the device's outside one, around the field's own label:\n * \"Increase Label\" in English.\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 * `I18nProvider`'s, or the device's outside one.\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 = useLocaleOf(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:\n decrementLabel ??\n messagesFor(writtenIn).decrease.replace('{label}', label),\n incrementLabel:\n incrementLabel ??\n messagesFor(writtenIn).increase.replace('{label}', 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":";;;;;;;;;;;;;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ent","Insets","StyleProp","TextInput","TextInputProps","TextInputSubmitEditingEvent","ViewStyle","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","messagesFor","useLocaleOf","keyboardFor","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","marginVerticalOf","margin","NumberField","t0","$","_c","onSubmitEditing","props","t1","t2","t3","t4","t5","t6","t7","t8","returnKeyType","undefined","id","control","writtenIn","t9","t10","numberValue","Number","isNaN","empty","t11","String","t12","isEmpty","submitted","validation","shownError","t13","t14","focus","announced","useStepAnnouncement","inputValue","stepperFocused","setStepperFocused","t15","t16","Symbol","for","current","t17","decrement","increment","t18","t19","steppersOf","decrease","replace","increase","stepThen","focused","t20","t21","handlers","t22","t23","t24","t25","t26","t27","t28","t29","t30","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","OS","_c"],"sources":["../../../src/components/number-field/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref } from 'react'\nimport type {\n BlurEvent,\n Insets,\n StyleProp,\n TextInput,\n TextInputProps,\n TextInputSubmitEditingEvent,\n ViewStyle,\n} from 'react-native'\n\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 { messagesFor } from '../../i18n'\nimport { useLocaleOf } from '../../i18n/provider'\nimport { keyboardFor } from '../../number/keyboard'\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 the `I18nProvider`'s**, as web reads it from React Aria's,\n// unless the `locale` prop names another, and the device's under neither. It\n// decides how the value is written and read, so a field in a German app reads\n// \"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 name React Aria gives web's in the `I18nProvider`'s\n * locale, or the device's outside one, around the field's own label:\n * \"Decrease Label\" in English.\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 name React Aria gives web's in the `I18nProvider`'s\n * locale, or the device's outside one, around the field's own label:\n * \"Increase Label\" in English.\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 * `I18nProvider`'s, or the device's outside one.\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 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 = useLocaleOf(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 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:\n decrementLabel ??\n messagesFor(writtenIn).decrease.replace('{label}', label),\n incrementLabel:\n incrementLabel ??\n messagesFor(writtenIn).increase.replace('{label}', 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={keyboardFor(writtenIn, formatOptions, minValue)}\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":";;;;;;;;;;;;;;;;;;AAwRA,MAAM4F,gBAAgB;AACtB,MAAMC,aAAa;AAKnB,MAAMC,aAAa;AACnB,MAAMC,gBAAgB;AAEtB,MAAMC,WAAWpD,cAAc,EAAEqD,OAAOC,cACtChF,WAAWiF,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;CAC7D,QAAQC,SAAiB;EACvB,IAAIN,MAAMvD,SAAS6D,IAAI,GAAG;GACxBN,MAAMO,cAAcD,IAAI;GACxBD,OAAO;EACT;CACF;AACF;AAEA,SAASG,QAAQC,OAA0B;CACzC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B;GACdhB,kBACW;IACVuK,aAAaF,MAAKrD,OAAQ;GAAC;EAE/B;EAAC1C,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAdMO;AAcN;;;;;;AAQH,SAAA2B,oBAAAhD,MAAA;CAAA,MAAAc,IAAAC,EAAA,CAAA;CACE,MAAAmG,UAAgB3O,OAAO,KAAK;CAAC,IAAAsI;CAAA,IAAAK;CAAA,IAAAJ,EAAA,OAAAd,MAAA;EAEnBa,WAAA;GACR,IAAIqG,QAAO1D,SAAQ;IACjB0D,QAAO1D,UAAW;IAClB/K,kBAAiB0O,yBAA0BnH,IAAI;GAAC;EACjD;EACAkB,KAAA,CAAClB,IAAI;EAACc,EAAA,KAAAd;EAAAc,EAAA,KAAAD;EAAAC,EAAA,KAAAI;CAAA,OAAA;EAAAL,KAAAC,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CALT1I,UAAUyI,IAKPK,EAAM;CAAC,IAAAC;CAAA,IAAAL,EAAA,OAAAwC,OAAAC,IAAA,2BAAA,GAAA;EAEHpC,MAAAnF,eAAsB;GAC3BkL,QAAO1D,UAAW9K,SAAQ0O,OAAQ,SAAS1O,SAAQ0O,OAAQ;GAC3DpL,KAAK;EAAC;EACP8E,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAHMK;AAGN"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { StyleProp, View, ViewStyle } from "react-native";
|
|
2
|
+
import { ComponentRef, Ref } from "react";
|
|
3
|
+
import { DateDuration } from "@internationalized/date";
|
|
4
|
+
import { DateValue, RangeCalendarProps } from "react-stately/useRangeCalendarState";
|
|
5
|
+
//#region src/components/range-calendar/index.d.ts
|
|
6
|
+
type RangeCalendarProps$1<T extends DateValue = DateValue> = Pick<RangeCalendarProps<T>, 'allowsNonContiguousRanges' | 'defaultFocusedValue' | 'defaultValue' | 'firstDayOfWeek' | 'focusedValue' | 'isDateUnavailable' | 'isDisabled' | 'isReadOnly' | 'maxValue' | 'minValue' | 'onChange' | 'onFocusChange' | 'value'> & {
|
|
7
|
+
/**
|
|
8
|
+
* The calendar's name. The month shown, or the months, is added to it, as
|
|
9
|
+
* React Aria adds it on web.
|
|
10
|
+
*/
|
|
11
|
+
readonly 'aria-label'?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The BCP 47 locale the calendar is written in: its month and weekday
|
|
14
|
+
* names, its digits, its first day of the week and its calendar system.
|
|
15
|
+
* Defaults to the `I18nProvider`'s, or the device's outside one.
|
|
16
|
+
*/
|
|
17
|
+
readonly locale?: string;
|
|
18
|
+
readonly ref?: Ref<ComponentRef<typeof View>>;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the header draws the month and the year as menu buttons, each
|
|
21
|
+
* opening a list of them in the grid's place, as `Calendar`'s does. The
|
|
22
|
+
* year list runs a century either side of the year shown, or to
|
|
23
|
+
* `minValue` and `maxValue` where they are closer.
|
|
24
|
+
*
|
|
25
|
+
* For one visible month. With `visibleDuration` of more than one, the
|
|
26
|
+
* header is the plain one, whose heading names every month shown, since
|
|
27
|
+
* the menus name only the first.
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
readonly showMonthYearMenus?: boolean;
|
|
31
|
+
readonly style?: StyleProp<ViewStyle>;
|
|
32
|
+
readonly testID?: string;
|
|
33
|
+
/**
|
|
34
|
+
* How many months the calendar shows at once, and moves by: side by side
|
|
35
|
+
* from the expanded window size up, one under another below it. Only
|
|
36
|
+
* `months` is read.
|
|
37
|
+
* @default { months: 1 }
|
|
38
|
+
*/
|
|
39
|
+
readonly visibleDuration?: DateDuration;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A calendar for picking a range of dates. The value is a `{ start, end }`
|
|
43
|
+
* pair of `@internationalized/date` values, as on web: pass `value` with
|
|
44
|
+
* `onChange` to control it, or `defaultValue` to let it keep its own.
|
|
45
|
+
*
|
|
46
|
+
* ```tsx
|
|
47
|
+
* import { CalendarDate } from '@internationalized/date'
|
|
48
|
+
*
|
|
49
|
+
* <RangeCalendar
|
|
50
|
+
* aria-label="Label"
|
|
51
|
+
* defaultValue={{
|
|
52
|
+
* start: new CalendarDate(2026, 9, 8),
|
|
53
|
+
* end: new CalendarDate(2026, 9, 15),
|
|
54
|
+
* }}
|
|
55
|
+
* />
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* The two ends take the circle a selected date takes in `Calendar`, and the
|
|
59
|
+
* days between them a band in the secondary container. `minValue`,
|
|
60
|
+
* `maxValue`, `isDateUnavailable` and `visibleDuration` are the props
|
|
61
|
+
* `Calendar` takes, and `allowsNonContiguousRanges` lets a range run past
|
|
62
|
+
* the dates ruled out inside it rather than stopping at the first.
|
|
63
|
+
*
|
|
64
|
+
* `style`, `ref` and `testID` land on the container.
|
|
65
|
+
*/
|
|
66
|
+
declare function RangeCalendar<T extends DateValue = DateValue>({ 'aria-label': ariaLabel, locale, ref, showMonthYearMenus, style, testID, visibleDuration, ...props }: RangeCalendarProps$1<T>): import("react").JSX.Element;
|
|
67
|
+
//#endregion
|
|
68
|
+
export { RangeCalendar, type RangeCalendarProps$1 as RangeCalendarProps };
|
|
69
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { composeStyles } from "../../theme/styles.js";
|
|
2
|
+
import { useLocaleOf } from "../../i18n/provider.js";
|
|
3
|
+
import { CalendarFrame, useRootStyle, visibleRangeOf } from "../../calendar/index.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { View } from "react-native";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { createCalendar } from "@internationalized/date";
|
|
8
|
+
import { useRangeCalendarState } from "react-stately/useRangeCalendarState";
|
|
9
|
+
//#region src/components/range-calendar/index.tsx
|
|
10
|
+
/**
|
|
11
|
+
* A calendar for picking a range of dates. The value is a `{ start, end }`
|
|
12
|
+
* pair of `@internationalized/date` values, as on web: pass `value` with
|
|
13
|
+
* `onChange` to control it, or `defaultValue` to let it keep its own.
|
|
14
|
+
*
|
|
15
|
+
* ```tsx
|
|
16
|
+
* import { CalendarDate } from '@internationalized/date'
|
|
17
|
+
*
|
|
18
|
+
* <RangeCalendar
|
|
19
|
+
* aria-label="Label"
|
|
20
|
+
* defaultValue={{
|
|
21
|
+
* start: new CalendarDate(2026, 9, 8),
|
|
22
|
+
* end: new CalendarDate(2026, 9, 15),
|
|
23
|
+
* }}
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* The two ends take the circle a selected date takes in `Calendar`, and the
|
|
28
|
+
* days between them a band in the secondary container. `minValue`,
|
|
29
|
+
* `maxValue`, `isDateUnavailable` and `visibleDuration` are the props
|
|
30
|
+
* `Calendar` takes, and `allowsNonContiguousRanges` lets a range run past
|
|
31
|
+
* the dates ruled out inside it rather than stopping at the first.
|
|
32
|
+
*
|
|
33
|
+
* `style`, `ref` and `testID` land on the container.
|
|
34
|
+
*/
|
|
35
|
+
function RangeCalendar(t0) {
|
|
36
|
+
const $ = c(33);
|
|
37
|
+
let ariaLabel;
|
|
38
|
+
let locale;
|
|
39
|
+
let props;
|
|
40
|
+
let ref;
|
|
41
|
+
let style;
|
|
42
|
+
let t1;
|
|
43
|
+
let testID;
|
|
44
|
+
let visibleDuration;
|
|
45
|
+
if ($[0] !== t0) {
|
|
46
|
+
({"aria-label": ariaLabel, locale, ref, showMonthYearMenus: t1, style, testID, visibleDuration, ...props} = t0);
|
|
47
|
+
$[0] = t0;
|
|
48
|
+
$[1] = ariaLabel;
|
|
49
|
+
$[2] = locale;
|
|
50
|
+
$[3] = props;
|
|
51
|
+
$[4] = ref;
|
|
52
|
+
$[5] = style;
|
|
53
|
+
$[6] = t1;
|
|
54
|
+
$[7] = testID;
|
|
55
|
+
$[8] = visibleDuration;
|
|
56
|
+
} else {
|
|
57
|
+
ariaLabel = $[1];
|
|
58
|
+
locale = $[2];
|
|
59
|
+
props = $[3];
|
|
60
|
+
ref = $[4];
|
|
61
|
+
style = $[5];
|
|
62
|
+
t1 = $[6];
|
|
63
|
+
testID = $[7];
|
|
64
|
+
visibleDuration = $[8];
|
|
65
|
+
}
|
|
66
|
+
const showMonthYearMenus = t1 === void 0 ? false : t1;
|
|
67
|
+
const writtenIn = useLocaleOf(locale);
|
|
68
|
+
const months = Math.max(1, visibleDuration?.months ?? 1);
|
|
69
|
+
const rootStyle = useRootStyle(months);
|
|
70
|
+
let t2;
|
|
71
|
+
if ($[9] !== months) {
|
|
72
|
+
t2 = { months };
|
|
73
|
+
$[9] = months;
|
|
74
|
+
$[10] = t2;
|
|
75
|
+
} else t2 = $[10];
|
|
76
|
+
let t3;
|
|
77
|
+
if ($[11] !== props || $[12] !== t2 || $[13] !== writtenIn) {
|
|
78
|
+
t3 = {
|
|
79
|
+
...props,
|
|
80
|
+
createCalendar,
|
|
81
|
+
locale: writtenIn,
|
|
82
|
+
visibleDuration: t2
|
|
83
|
+
};
|
|
84
|
+
$[11] = props;
|
|
85
|
+
$[12] = t2;
|
|
86
|
+
$[13] = writtenIn;
|
|
87
|
+
$[14] = t3;
|
|
88
|
+
} else t3 = $[14];
|
|
89
|
+
const state = useRangeCalendarState(t3);
|
|
90
|
+
let t4;
|
|
91
|
+
if ($[15] !== state || $[16] !== writtenIn) {
|
|
92
|
+
t4 = visibleRangeOf(state, writtenIn, true);
|
|
93
|
+
$[15] = state;
|
|
94
|
+
$[16] = writtenIn;
|
|
95
|
+
$[17] = t4;
|
|
96
|
+
} else t4 = $[17];
|
|
97
|
+
const shown = t4;
|
|
98
|
+
const t5 = ariaLabel === void 0 ? shown : `${ariaLabel}, ${shown}`;
|
|
99
|
+
let t6;
|
|
100
|
+
if ($[18] !== rootStyle || $[19] !== style) {
|
|
101
|
+
t6 = composeStyles(rootStyle, style);
|
|
102
|
+
$[18] = rootStyle;
|
|
103
|
+
$[19] = style;
|
|
104
|
+
$[20] = t6;
|
|
105
|
+
} else t6 = $[20];
|
|
106
|
+
let t7;
|
|
107
|
+
if ($[21] !== months || $[22] !== props.firstDayOfWeek || $[23] !== showMonthYearMenus || $[24] !== state || $[25] !== writtenIn) {
|
|
108
|
+
t7 = /* @__PURE__ */ jsx(CalendarFrame, {
|
|
109
|
+
firstDayOfWeek: props.firstDayOfWeek,
|
|
110
|
+
locale: writtenIn,
|
|
111
|
+
months,
|
|
112
|
+
showMonthYearMenus,
|
|
113
|
+
state
|
|
114
|
+
});
|
|
115
|
+
$[21] = months;
|
|
116
|
+
$[22] = props.firstDayOfWeek;
|
|
117
|
+
$[23] = showMonthYearMenus;
|
|
118
|
+
$[24] = state;
|
|
119
|
+
$[25] = writtenIn;
|
|
120
|
+
$[26] = t7;
|
|
121
|
+
} else t7 = $[26];
|
|
122
|
+
let t8;
|
|
123
|
+
if ($[27] !== ref || $[28] !== t5 || $[29] !== t6 || $[30] !== t7 || $[31] !== testID) {
|
|
124
|
+
t8 = /* @__PURE__ */ jsx(View, {
|
|
125
|
+
"aria-label": t5,
|
|
126
|
+
ref,
|
|
127
|
+
role: "group",
|
|
128
|
+
style: t6,
|
|
129
|
+
testID,
|
|
130
|
+
children: t7
|
|
131
|
+
});
|
|
132
|
+
$[27] = ref;
|
|
133
|
+
$[28] = t5;
|
|
134
|
+
$[29] = t6;
|
|
135
|
+
$[30] = t7;
|
|
136
|
+
$[31] = testID;
|
|
137
|
+
$[32] = t8;
|
|
138
|
+
} else t8 = $[32];
|
|
139
|
+
return t8;
|
|
140
|
+
}
|
|
141
|
+
//#endregion
|
|
142
|
+
export { RangeCalendar };
|
|
143
|
+
|
|
144
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["DateDuration","ComponentRef","Ref","StyleProp","ViewStyle","DateValue","RangeCalendarProps","StatelyRangeCalendarProps","createCalendar","View","useRangeCalendarState","CalendarFrame","useRootStyle","visibleRangeOf","useLocaleOf","composeStyles","Pick","T","locale","ref","showMonthYearMenus","style","testID","visibleDuration","RangeCalendar","t0","$","_c","ariaLabel","props","t1","undefined","writtenIn","months","Math","max","rootStyle","t2","t3","state","t4","shown","t5","t6","t7","firstDayOfWeek","t8","_c"],"sources":["../../../src/components/range-calendar/index.tsx"],"sourcesContent":["import type { DateDuration } from '@internationalized/date'\nimport type { ComponentRef, Ref } from 'react'\nimport type { StyleProp, ViewStyle } from 'react-native'\nimport type {\n DateValue,\n RangeCalendarProps as StatelyRangeCalendarProps,\n} from 'react-stately/useRangeCalendarState'\n\nimport { createCalendar } from '@internationalized/date'\nimport { View } from 'react-native'\nimport { useRangeCalendarState } from 'react-stately/useRangeCalendarState'\n\nimport { CalendarFrame, useRootStyle, visibleRangeOf } from '../../calendar'\nimport { useLocaleOf } from '../../i18n/provider'\nimport { composeStyles } from '../../theme/styles'\n\n// kanso-ui's RangeCalendar: the date pickers page's calendar again, picking\n// two dates rather than one. Every part it draws is Calendar's, from\n// src/calendar, the container, the header, the month and year menus, the\n// grid and the date cell, so the two cannot come apart.\n//\n// What a range adds is the band between its two ends. The docked token set\n// stops at the selected date, so the band's colours are the modal date\n// picker's range-selection tokens: the secondary container, one step down\n// from the primary the two ends take, with its label in on secondary\n// container and its state layers in on primary container. Two things follow\n// from drawing a band across a grid whose dates are spaced apart, as on web.\n//\n// **The band is square and the ends are round.** A run of days reads as one\n// shape rather than a row of circles, and the first and last day round only\n// their outer side, which is what makes the band begin and end at a circle.\n// The sides are logical, so a right-to-left layout turns the band over.\n//\n// **The band fills the whole of each day's column.** A day in the range\n// drops the 4dp either side that every other date keeps and takes the full\n// width of its column, so one day's band meets the next one's.\n//\n// The state is React Stately's `useRangeCalendarState`, which web's React\n// Aria range calendar is built on. A first press starts the range and a\n// second ends it, on either side of the first. While a range is started a\n// pointer over a date draws the range as far as it, as web's does; a touch\n// has no such preview, so on a phone the band shows once the second date is\n// pressed. A date `isDateUnavailable` rules out is struck through, and once\n// a range is started the dates past it are disabled, unless\n// `allowsNonContiguousRanges` lets the range run over it.\n//\n// Each date's name is React Aria's: the two ends open with the whole range,\n// a day inside it is said to be selected, and each date's hint says whether\n// a press starts a range or ends the one started.\n\ntype RangeCalendarProps<T extends DateValue = DateValue> = Pick<\n StatelyRangeCalendarProps<T>,\n | 'allowsNonContiguousRanges'\n | 'defaultFocusedValue'\n | 'defaultValue'\n | 'firstDayOfWeek'\n | 'focusedValue'\n | 'isDateUnavailable'\n | 'isDisabled'\n | 'isReadOnly'\n | 'maxValue'\n | 'minValue'\n | 'onChange'\n | 'onFocusChange'\n | 'value'\n> & {\n /**\n * The calendar's name. The month shown, or the months, is added to it, as\n * React Aria adds it on web.\n */\n readonly 'aria-label'?: string\n /**\n * The BCP 47 locale the calendar is written in: its month and weekday\n * names, its digits, its first day of the week and its calendar system.\n * Defaults to the `I18nProvider`'s, or the device's outside one.\n */\n readonly locale?: string\n readonly ref?: Ref<ComponentRef<typeof View>>\n /**\n * Whether the header draws the month and the year as menu buttons, each\n * opening a list of them in the grid's place, as `Calendar`'s does. The\n * year list runs a century either side of the year shown, or to\n * `minValue` and `maxValue` where they are closer.\n *\n * For one visible month. With `visibleDuration` of more than one, the\n * header is the plain one, whose heading names every month shown, since\n * the menus name only the first.\n * @default false\n */\n readonly showMonthYearMenus?: boolean\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n /**\n * How many months the calendar shows at once, and moves by: side by side\n * from the expanded window size up, one under another below it. Only\n * `months` is read.\n * @default { months: 1 }\n */\n readonly visibleDuration?: DateDuration\n}\n\n/**\n * A calendar for picking a range of dates. The value is a `{ start, end }`\n * pair of `@internationalized/date` values, as on web: pass `value` with\n * `onChange` to control it, or `defaultValue` to let it keep its own.\n *\n * ```tsx\n * import { CalendarDate } from '@internationalized/date'\n *\n * <RangeCalendar\n * aria-label=\"Label\"\n * defaultValue={{\n * start: new CalendarDate(2026, 9, 8),\n * end: new CalendarDate(2026, 9, 15),\n * }}\n * />\n * ```\n *\n * The two ends take the circle a selected date takes in `Calendar`, and the\n * days between them a band in the secondary container. `minValue`,\n * `maxValue`, `isDateUnavailable` and `visibleDuration` are the props\n * `Calendar` takes, and `allowsNonContiguousRanges` lets a range run past\n * the dates ruled out inside it rather than stopping at the first.\n *\n * `style`, `ref` and `testID` land on the container.\n */\nfunction RangeCalendar<T extends DateValue = DateValue>({\n 'aria-label': ariaLabel,\n locale,\n ref,\n showMonthYearMenus = false,\n style,\n testID,\n visibleDuration,\n ...props\n}: RangeCalendarProps<T>) {\n const writtenIn = useLocaleOf(locale)\n const months = Math.max(1, visibleDuration?.months ?? 1)\n const rootStyle = useRootStyle(months)\n const state = useRangeCalendarState<T>({\n ...props,\n createCalendar,\n locale: writtenIn,\n visibleDuration: { months },\n })\n const shown = visibleRangeOf(state, writtenIn, true)\n\n return (\n <View\n aria-label={ariaLabel === undefined ? shown : `${ariaLabel}, ${shown}`}\n ref={ref}\n role=\"group\"\n style={composeStyles<ViewStyle>(rootStyle, style)}\n testID={testID}\n >\n <CalendarFrame\n firstDayOfWeek={props.firstDayOfWeek}\n locale={writtenIn}\n months={months}\n showMonthYearMenus={showMonthYearMenus}\n state={state}\n />\n </View>\n )\n}\n\nexport type { RangeCalendarProps }\n\nexport { RangeCalendar }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8HA,SAAAwB,cAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAV;CAAA,IAAAW;CAAA,IAAAV;CAAA,IAAAE;CAAA,IAAAS;CAAA,IAAAR;CAAA,IAAAC;CAAA,IAAAG,EAAA,OAAAD,IAAA;EAAwD,CAAA,CAAA,cAAAG,WAAAV,QAAAC,KAAAC,oBAAAU,IAAAT,OAAAC,QAAAC,iBAAA,GAAAM,SAAAJ;EAShCC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAR;EAAAQ,EAAA,KAAAG;EAAAH,EAAA,KAAAP;EAAAO,EAAA,KAAAL;EAAAK,EAAA,KAAAI;EAA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yBqB,WAAWf,KAAK;EAACK,EAAA,MAAAU;EAAAV,EAAA,MAAAL;EAAAK,EAAA,MAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,IAAAkB;CAAA,IAAAlB,EAAA,QAAAO,UAAAP,EAAA,QAAAG,MAAAgB,kBAAAnB,EAAA,QAAAN,sBAAAM,EAAA,QAAAa,SAAAb,EAAA,QAAAM,WAAA;EAGjDY,KAAA,oBAAC,eAAD;GACkB,gBAAAf,MAAKgB;GACbb,QAAAA;GACAC;GACYb;GACbmB;EAAK,CAAA;EACZb,EAAA,MAAAO;EAAAP,EAAA,MAAAG,MAAAgB;EAAAnB,EAAA,MAAAN;EAAAM,EAAA,MAAAa;EAAAb,EAAA,MAAAM;EAAAN,EAAA,MAAAkB;CAAA,OAAAA,KAAAlB,EAAA;CAAA,IAAAoB;CAAA,IAAApB,EAAA,QAAAP,OAAAO,EAAA,QAAAgB,MAAAhB,EAAA,QAAAiB,MAAAjB,EAAA,QAAAkB,MAAAlB,EAAA,QAAAJ,QAAA;EAbJwB,KAAA,oBAAC,MAAD;GACc,cAAAJ;GACPvB;GACA,MAAA;GACE,OAAAwB;GACCrB;GAERsB,UAAAA;EAPG,CAAA;EAcElB,EAAA,MAAAP;EAAAO,EAAA,MAAAgB;EAAAhB,EAAA,MAAAiB;EAAAjB,EAAA,MAAAkB;EAAAlB,EAAA,MAAAJ;EAAAI,EAAA,MAAAoB;CAAA,OAAAA,KAAApB,EAAA;CAAA,OAdPoB;AAcO"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { AutocompleteProps } from "../autocomplete/index.js";
|
|
2
|
+
import { HostInstance, StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
import { ReactNode, Ref } from "react";
|
|
4
|
+
//#region src/components/search-view/index.d.ts
|
|
5
|
+
type SearchViewContentProps<T extends object = object> = Omit<AutocompleteProps<T>, 'children'> & {
|
|
6
|
+
/**
|
|
7
|
+
* What the back button is called, for a screen reader. Left out, the
|
|
8
|
+
* library names it in the `I18nProvider`'s locale, or the device's outside
|
|
9
|
+
* one, "Back" in English.
|
|
10
|
+
*/
|
|
11
|
+
readonly backLabel?: string;
|
|
12
|
+
/** The results: a ListBox or a List, which typing narrows. */
|
|
13
|
+
readonly children?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* What the clear button is called, for a screen reader. Left out, it is
|
|
16
|
+
* the name React Aria gives web's in the `I18nProvider`'s locale, or the
|
|
17
|
+
* device's outside one, "Clear search" in English.
|
|
18
|
+
*/
|
|
19
|
+
readonly clearLabel?: string;
|
|
20
|
+
/**
|
|
21
|
+
* What is searched, for a screen reader. It names both the view and its
|
|
22
|
+
* input, and is read rather than shown; `placeholder` is what is seen.
|
|
23
|
+
*/
|
|
24
|
+
readonly label: string;
|
|
25
|
+
/** The supporting text in the empty input, which is what a person reads. */
|
|
26
|
+
readonly placeholder?: string;
|
|
27
|
+
readonly ref?: Ref<HostInstance>;
|
|
28
|
+
readonly style?: StyleProp<ViewStyle>;
|
|
29
|
+
readonly testID?: string;
|
|
30
|
+
};
|
|
31
|
+
type SearchViewProps = {
|
|
32
|
+
/**
|
|
33
|
+
* The Button or IconButton that opens the view, and `SearchView.Content`.
|
|
34
|
+
*/
|
|
35
|
+
readonly children?: ReactNode;
|
|
36
|
+
/** Whether the view starts open, when it keeps its own state. */
|
|
37
|
+
readonly defaultOpen?: boolean;
|
|
38
|
+
/** Whether the view is open, when the call site holds the state. */
|
|
39
|
+
readonly isOpen?: boolean;
|
|
40
|
+
/** Called with the new state as the view opens or closes. */
|
|
41
|
+
readonly onOpenChange?: (isOpen: boolean) => void;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* The view a search opens into: full screen in a compact window, docked
|
|
45
|
+
* under what opened it in a wider one. Pass `isOpen` with `onOpenChange` to
|
|
46
|
+
* hold the open state, or `defaultOpen` to let it keep its own.
|
|
47
|
+
*
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <SearchView>
|
|
50
|
+
* <IconButton aria-label="Search">
|
|
51
|
+
* <SearchIcon />
|
|
52
|
+
* </IconButton>
|
|
53
|
+
* <SearchView.Content label="Search" placeholder="Search">
|
|
54
|
+
* <ListBox aria-label="Results">…</ListBox>
|
|
55
|
+
* </SearchView.Content>
|
|
56
|
+
* </SearchView>
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* Composed as Popover is: a `Button` or `IconButton` placed directly inside
|
|
60
|
+
* `SearchView` opens the view, and `SearchView.Content` is the view itself.
|
|
61
|
+
*/
|
|
62
|
+
declare function SearchView({ children, defaultOpen, isOpen, onOpenChange }: SearchViewProps): import("react").JSX.Element;
|
|
63
|
+
declare namespace SearchView {
|
|
64
|
+
var Content: typeof SearchViewContent;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The view: the header with its back button, input and clear button, and
|
|
68
|
+
* the results under it, inside an Autocomplete, so typing narrows them. What
|
|
69
|
+
* has been typed is the autocomplete's: pass `inputValue` with
|
|
70
|
+
* `onInputChange` to control it, or `defaultInputValue` to let it keep its
|
|
71
|
+
* own, which starts again each time the view opens.
|
|
72
|
+
*
|
|
73
|
+
* `style`, `ref` and `testID` land on the view's surface.
|
|
74
|
+
*/
|
|
75
|
+
declare function SearchViewContent<T extends object = object>({ backLabel, clearLabel, defaultInputValue, filter, inputValue, label, onInputChange, ...props }: SearchViewContentProps<T>): import("react").JSX.Element | null;
|
|
76
|
+
//#endregion
|
|
77
|
+
export { SearchView, SearchViewContent, type SearchViewContentProps, type SearchViewProps };
|
|
78
|
+
//# sourceMappingURL=index.d.ts.map
|