@kanso-labs/react-native-kanso-ui 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/autocomplete/index.js +15 -1
- package/dist/autocomplete/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 +44 -22
- package/dist/button/index.js.map +1 -1
- 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 +1358 -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/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-group/index.d.ts +3 -4
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/checkbox-group/index.js.map +1 -1
- package/dist/components/chip/index.d.ts +4 -1
- package/dist/components/chip/index.js +229 -161
- package/dist/components/chip/index.js.map +1 -1
- 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/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/dialog/index.d.ts +5 -5
- package/dist/components/dialog/index.js +5 -5
- package/dist/components/dialog/index.js.map +1 -1
- 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 +1 -1
- package/dist/components/fab/index.js +91 -76
- package/dist/components/fab/index.js.map +1 -1
- 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/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.d.ts +3 -3
- package/dist/components/menu/index.js +3 -3
- package/dist/components/menu/index.js.map +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/popover/index.d.ts +2 -2
- package/dist/components/popover/index.js +2 -2
- package/dist/components/popover/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 +79 -0
- package/dist/components/search-view/index.js +571 -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/sheet/index.d.ts +16 -7
- package/dist/components/sheet/index.js +157 -152
- package/dist/components/sheet/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/table/index.d.ts +391 -0
- package/dist/components/table/index.js +1708 -0
- package/dist/components/table/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/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/token-field/index.d.ts +105 -0
- package/dist/components/token-field/index.js +574 -0
- package/dist/components/token-field/index.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +102 -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/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/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 +359 -154
- package/dist/field/index.js.map +1 -1
- package/dist/field/styles.js +18 -1
- 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 +5 -2
- package/dist/form/index.js +64 -85
- package/dist/form/index.js.map +1 -1
- package/dist/glyphs/index.js +128 -1
- package/dist/glyphs/index.js.map +1 -1
- package/dist/i18n/index.js +36 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +1734 -34
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +37 -3
- package/dist/index.js +36 -3
- package/dist/indicator/paths.js +23 -1
- package/dist/indicator/paths.js.map +1 -1
- package/dist/modal/index.js +92 -77
- package/dist/modal/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 +13 -1
- 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/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/package.json +11 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactNode","Key","TreeProps","StatelyTreeProps","useTreeState","CollectionProps","CollectionRowProps","CollectionSectionProps","CollectionView","nestedRowNode","sectionNode","NavigationTreeItemProps","NavigationTreeItemText","Omit","children","href","label","textValue","NavigationTreeProps","T","defaultExpandedKeys","Iterable","expandedKeys","onExpandedChange","keys","Set","selectedRoute","NavigationTreeSectionProps","NavigationTree","t0","$","_c","disabledKeys","items","props","t1","t2","selectionMode","state","t3","undefined","t4","nothing","NavigationTreeItem","_props","getCollectionNode","navigationItemNode","NavigationTreeSection","Item","Section","_c"],"sources":["../../../src/components/navigation-tree/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { Key } from 'react-stately'\nimport type { TreeProps as StatelyTreeProps } from 'react-stately/useTreeState'\n\nimport { useTreeState } from 'react-stately/useTreeState'\n\nimport type {\n CollectionProps,\n CollectionRowProps,\n CollectionSectionProps,\n} from '../../collection'\n\nimport { CollectionView, nestedRowNode, sectionNode } from '../../collection'\n\n// kanso-ui's NavigationTree: the navigation drawer page's contents, a nested\n// set of links with the current one marked. It is Tree's shape, drawn by\n// src/collection as a Tree is, so its chevron, its 24dp a level and its\n// opening and closing are Tree's, and the row is src/row's under that\n// module's `drawer` variant: the drawer page's 56dp row with a label-large\n// label, held 12dp off each edge, on a secondary-container pill while it is\n// the current one.\n//\n// A tree selects, and a navigation tree navigates, so this takes\n// `selectedRoute` where Tree takes `selectedKeys`, and has no selection at\n// all, as React Aria's has none. The row whose `href` is the route is the\n// current one, and each row it sits under is drawn with a bold label, found\n// through every row, open or not, so a current row closed out of sight\n// still shows where it is.\n//\n// Three things differ from web's, each because a screen reader or a touch on\n// a phone works differently from a keyboard in a browser.\n//\n// **A row is one element to a screen reader**, a link, as Tree's row is one\n// element. It reports whether it is open, and opening and closing it are\n// accessibility actions, named from src/i18n as Tree's are. The current row\n// says so through `aria-current` on the web, as web's does, and reports\n// itself selected on native, which has no counterpart to it, as\n// NavigationBar's current destination does.\n//\n// **A press goes where the row leads**, through src/router, so under a\n// `RouterProvider` it moves between the app's screens and without one it asks\n// the platform to open the `href`. The chevron is what opens and closes a row\n// that has rows under it, and a row with no `href` opens and closes on a press\n// instead, as React Aria's does.\n//\n// **The tree is one `FlatList`**, as Tree is, so a long drawer draws only the\n// rows in view. A section's heading scrolls with its rows, as web's does,\n// since a drawer's headings are no list's subheads.\n\ntype NavigationTreeItemProps = NavigationTreeItemText &\n Omit<\n CollectionRowProps,\n 'children' | 'onAction' | 'overline' | 'textValue'\n > & {\n /**\n * The rows nested under this one, as further `NavigationTree.Item`\n * parts.\n */\n readonly children?: ReactNode\n /**\n * Where the row leads, which a press opens and `selectedRoute` is matched\n * against.\n */\n readonly href?: string\n }\n\n// What the row is worth as text, which the collection keeps beside the row\n// as web's does: a string label is taken as the value, and anything else has\n// to say what it is worth, so the compiler asks for it where web's types do.\ntype NavigationTreeItemText =\n | {\n /** The row's label, as something other than a plain string. */\n readonly label?: ReactNode\n /** The row's text, which a label that is not a string cannot give. */\n readonly textValue: string\n }\n | {\n /** The row's label: where it goes. */\n readonly label: string\n /** The row's text. Defaults to the label. */\n readonly textValue?: string\n }\n\ntype NavigationTreeProps<T extends object = object> = Omit<\n CollectionProps<T>,\n | 'defaultSelectedKeys'\n | 'disallowEmptySelection'\n | 'onAction'\n | 'onSelectionChange'\n | 'renderEmptyState'\n | 'selectedKeys'\n | 'selectionMode'\n | 'selectLabel'\n> & {\n /** The keys of the rows open at first, when the tree keeps its own. */\n readonly defaultExpandedKeys?: Iterable<Key>\n /**\n * The keys of the open rows, for a call site holding them itself with\n * `onExpandedChange`.\n */\n readonly expandedKeys?: Iterable<Key>\n /** Called with the keys of the open rows whenever a row opens or closes. */\n readonly onExpandedChange?: (keys: Set<Key>) => void\n /**\n * The route the app is on, matched against each row's `href`: the row it\n * matches is the current one, and the rows above it are its trail.\n */\n readonly selectedRoute?: null | string\n}\n\ntype NavigationTreeSectionProps = CollectionSectionProps\n\n/**\n * A nested set of links, with the current one marked. Give the tree a\n * `selectedRoute` and each row an `href`, and the row whose `href` matches is\n * the current one, drawn on the drawer's pill, while each row it sits under\n * is drawn with a bold label, so a closed trail still shows where you are.\n * Which rows are open is React Stately's, as web's is React Aria's: pass\n * `expandedKeys` with `onExpandedChange` to control it, or\n * `defaultExpandedKeys` to let it keep its own.\n *\n * ```tsx\n * <NavigationTree aria-label=\"Label\" selectedRoute=\"/second\">\n * <NavigationTree.Item href=\"/first\" id=\"first\" label=\"First item\">\n * <NavigationTree.Item href=\"/second\" id=\"second\" label=\"Second item\" />\n * </NavigationTree.Item>\n * </NavigationTree>\n * ```\n *\n * There is no selection here, as there is none in React Aria's: what is\n * current comes from the route rather than from anything the reader picked,\n * and `Tree` is the one that selects. A press opens a row's `href` through\n * the `RouterProvider` around it. Composed from parts, `NavigationTree.Item`\n * and `NavigationTree.Section`, which the tree draws from their props, so\n * neither renders anything on its own. Name the tree with `aria-label`. It\n * scrolls by itself, so it wants a height to fill: a short tree on a page\n * that scrolls takes `scrollEnabled={false}` and is laid out at its full\n * length. It has no ground of its own, so it takes the drawer's, and `style`\n * and `ref` land on the `FlatList`.\n */\nfunction NavigationTree<T extends object = object>({\n children,\n defaultExpandedKeys,\n disabledKeys,\n expandedKeys,\n items,\n onExpandedChange,\n selectedRoute,\n ...props\n}: NavigationTreeProps<T>) {\n const state = useTreeState<T>({\n // Each part builds its own entry in the collection; see\n // `navigationItemNode` and the one src/collection gives. The collection\n // skips what is not an element, as a ReactNode may be, and asks any\n // element for its entry.\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- see above\n children: children as StatelyTreeProps<T>['children'],\n defaultExpandedKeys,\n disabledKeys,\n expandedKeys,\n items,\n onExpandedChange,\n selectionMode: 'none',\n })\n\n return (\n <CollectionView<T>\n {...props}\n kind=\"drawer\"\n renderEmptyState={nothing}\n selectedRoute={selectedRoute ?? undefined}\n state={state}\n />\n )\n}\n\n/**\n * One row, and the rows under it. Its slots are ListItem's, with a `label`\n * where ListItem has a headline and no overline, since the drawer page gives\n * one line of label: `leading`, the `label`, `supporting` under it, and\n * `trailing`, such as a count. Give it an `href`, which is what a press\n * opens and what `selectedRoute` is matched against, and an `id`, which is\n * the key opening is reported by.\n *\n * Rows nested as `children` are what make it open: a row with none draws no\n * chevron. The tree draws it from its entry in the collection, so it renders\n * nothing on its own. `style`, `ref` and `testID` land on the row.\n */\nfunction NavigationTreeItem(_props: NavigationTreeItemProps): null {\n return null\n}\n\nNavigationTreeItem.getCollectionNode = navigationItemNode\n\n/** A named group of rows, with its heading above them. */\nfunction NavigationTreeSection(_props: NavigationTreeSectionProps): null {\n return null\n}\n\nNavigationTreeSection.getCollectionNode = sectionNode\n\n// The entry the collection holds for an `Item` part, whose first line is its\n// label.\nfunction navigationItemNode(props: NavigationTreeItemProps) {\n return nestedRowNode(\n props,\n props.label,\n props.textValue ?? (typeof props.label === 'string' ? props.label : ''),\n )\n}\n\n// What a drawer with no rows draws, which is nothing: React Aria's takes no\n// empty state, since a set of links has no search to have found none.\nfunction nothing() {\n return null\n}\n\nNavigationTree.Item = NavigationTreeItem\nNavigationTree.Section = NavigationTreeSection\n\nexport { NavigationTree, NavigationTreeItem, NavigationTreeSection }\nexport type {\n NavigationTreeItemProps,\n NavigationTreeProps,\n NavigationTreeSectionProps,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4IA,SAAA4B,eAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAjB;CAAA,IAAAM;CAAA,IAAAY;CAAA,IAAAV;CAAA,IAAAW;CAAA,IAAAV;CAAA,IAAAW;CAAA,IAAAR;CAAA,IAAAI,EAAA,OAAAD,IAAA;EAAmD,CAAA,CAAAf,UAAAM,qBAAAY,cAAAV,cAAAW,OAAAV,kBAAAG,eAAA,GAAAQ,SAAAL;EAS1BC,EAAA,KAAAD;EAAAC,EAAA,KAAAhB;EAAAgB,EAAA,KAAAV;EAAAU,EAAA,KAAAE;EAAAF,EAAA,KAAAR;EAAAQ,EAAA,KAAAG;EAAAH,EAAA,KAAAP;EAAAO,EAAA,KAAAI;EAAAJ,EAAA,KAAAJ;CAAA,OAAA;EAAAZ,WAAAgB,EAAA;EAAAV,sBAAAU,EAAA;EAAAE,eAAAF,EAAA;EAAAR,eAAAQ,EAAA;EAAAG,QAAAH,EAAA;EAAAP,mBAAAO,EAAA;EAAAI,QAAAJ,EAAA;EAAAJ,gBAAAI,EAAA;CAAA;CAOX,MAAAK,K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@@ import { MinusGlyph, PlusGlyph } from "../../glyphs/index.js";
|
|
|
9
9
|
import { useFieldValidation } from "../../form/index.js";
|
|
10
10
|
import { IconButton } from "../icon-button/index.js";
|
|
11
11
|
import { FieldBox, FieldInput, FieldMessage, describedBy, useFieldFocus } from "../../field/index.js";
|
|
12
|
+
import { keyboardFor } from "../../number/keyboard.js";
|
|
12
13
|
import { useNumberFieldState } from "../../number/state.js";
|
|
13
14
|
import { c } from "react/compiler-runtime";
|
|
14
15
|
import { AccessibilityInfo, Platform, Pressable, StyleSheet, View, useWindowDimensions } from "react-native";
|
|
15
16
|
import { useEffect, useId, useImperativeHandle, useRef, useState } from "react";
|
|
16
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
-
import { NumberFormatter } from "@internationalized/number";
|
|
18
18
|
//#region src/components/number-field/index.tsx
|
|
19
19
|
const STEPPER_WIDTH = 32;
|
|
20
20
|
const GLYPH_SIZE = 20;
|
|
@@ -76,10 +76,6 @@ function glyphOf(color) {
|
|
|
76
76
|
function halfOf({ spacing, typography }, outlined, fontScale) {
|
|
77
77
|
return outlined ? spacing.lg + typography.bodyLargeLineHeight * fontScale / 2 : spacing.sm + (typography.bodySmallLineHeight + typography.bodyLargeLineHeight) * fontScale / 2;
|
|
78
78
|
}
|
|
79
|
-
function keyboardOf(minValue, hasDecimals) {
|
|
80
|
-
if (minValue === void 0 || Number.isNaN(minValue) || minValue < 0) return Platform.OS === "ios" ? "numbers-and-punctuation" : "numeric";
|
|
81
|
-
return hasDecimals ? "decimal-pad" : "number-pad";
|
|
82
|
-
}
|
|
83
79
|
function marginVerticalOf(margin) {
|
|
84
80
|
return { marginVertical: margin };
|
|
85
81
|
}
|
|
@@ -100,7 +96,7 @@ function marginVerticalOf(margin) {
|
|
|
100
96
|
* ```
|
|
101
97
|
*/
|
|
102
98
|
function NumberField(t0) {
|
|
103
|
-
const $ = c(
|
|
99
|
+
const $ = c(124);
|
|
104
100
|
let decrementLabel;
|
|
105
101
|
let defaultValue;
|
|
106
102
|
let description;
|
|
@@ -288,192 +284,185 @@ function NumberField(t0) {
|
|
|
288
284
|
$[60] = t14;
|
|
289
285
|
} else t14 = $[60];
|
|
290
286
|
const focus = useFieldFocus(t14);
|
|
291
|
-
let t15;
|
|
292
|
-
if ($[61] !== formatOptions || $[62] !== writtenIn) {
|
|
293
|
-
t15 = new NumberFormatter(writtenIn, formatOptions).resolvedOptions().maximumFractionDigits ?? 0;
|
|
294
|
-
$[61] = formatOptions;
|
|
295
|
-
$[62] = writtenIn;
|
|
296
|
-
$[63] = t15;
|
|
297
|
-
} else t15 = $[63];
|
|
298
|
-
const hasDecimals = t15 > 0;
|
|
299
287
|
const announced = useStepAnnouncement(state.inputValue);
|
|
300
288
|
const [stepperFocused, setStepperFocused] = useState(false);
|
|
289
|
+
let t15;
|
|
301
290
|
let t16;
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
t16 =
|
|
305
|
-
|
|
306
|
-
$[
|
|
307
|
-
$[65] = t17;
|
|
291
|
+
if ($[61] === Symbol.for("react.memo_cache_sentinel")) {
|
|
292
|
+
t15 = () => control.current;
|
|
293
|
+
t16 = [];
|
|
294
|
+
$[61] = t15;
|
|
295
|
+
$[62] = t16;
|
|
308
296
|
} else {
|
|
309
|
-
|
|
310
|
-
|
|
297
|
+
t15 = $[61];
|
|
298
|
+
t16 = $[62];
|
|
311
299
|
}
|
|
312
|
-
useImperativeHandle(inputRef,
|
|
313
|
-
let
|
|
314
|
-
if ($[
|
|
315
|
-
let
|
|
316
|
-
if ($[
|
|
317
|
-
|
|
300
|
+
useImperativeHandle(inputRef, t15, t16);
|
|
301
|
+
let t17;
|
|
302
|
+
if ($[63] !== announced || $[64] !== decrementLabel || $[65] !== incrementLabel || $[66] !== label || $[67] !== state.canDecrement || $[68] !== state.canIncrement || $[69] !== state.decrement || $[70] !== state.increment || $[71] !== steppers || $[72] !== validation.onEdit || $[73] !== variant || $[74] !== writtenIn) {
|
|
303
|
+
let t18;
|
|
304
|
+
if ($[76] === Symbol.for("react.memo_cache_sentinel")) {
|
|
305
|
+
t18 = () => {
|
|
318
306
|
setStepperFocused(false);
|
|
319
307
|
};
|
|
320
|
-
$[
|
|
321
|
-
} else
|
|
322
|
-
let
|
|
323
|
-
if ($[
|
|
324
|
-
|
|
308
|
+
$[76] = t18;
|
|
309
|
+
} else t18 = $[76];
|
|
310
|
+
let t19;
|
|
311
|
+
if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
|
|
312
|
+
t19 = () => {
|
|
325
313
|
setStepperFocused(true);
|
|
326
314
|
};
|
|
327
|
-
$[
|
|
328
|
-
} else
|
|
329
|
-
|
|
315
|
+
$[77] = t19;
|
|
316
|
+
} else t19 = $[77];
|
|
317
|
+
t17 = steppersOf({
|
|
330
318
|
canDecrement: state.canDecrement,
|
|
331
319
|
canIncrement: state.canIncrement,
|
|
332
320
|
decrementLabel: decrementLabel ?? messagesFor(writtenIn).decrease.replace("{label}", label),
|
|
333
321
|
incrementLabel: incrementLabel ?? messagesFor(writtenIn).increase.replace("{label}", label),
|
|
334
322
|
inline: steppers === "horizontal",
|
|
335
|
-
onBlur:
|
|
323
|
+
onBlur: t18,
|
|
336
324
|
onDecrement: announced(stepThen(state.decrement, validation.onEdit)),
|
|
337
|
-
onFocus:
|
|
325
|
+
onFocus: t19,
|
|
338
326
|
onIncrement: announced(stepThen(state.increment, validation.onEdit)),
|
|
339
327
|
outlined: variant === "outlined"
|
|
340
328
|
});
|
|
341
|
-
$[
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
$[
|
|
353
|
-
$[
|
|
354
|
-
} else
|
|
355
|
-
const
|
|
356
|
-
const
|
|
357
|
-
const
|
|
358
|
-
const
|
|
359
|
-
let
|
|
360
|
-
if ($[
|
|
361
|
-
|
|
329
|
+
$[63] = announced;
|
|
330
|
+
$[64] = decrementLabel;
|
|
331
|
+
$[65] = incrementLabel;
|
|
332
|
+
$[66] = label;
|
|
333
|
+
$[67] = state.canDecrement;
|
|
334
|
+
$[68] = state.canIncrement;
|
|
335
|
+
$[69] = state.decrement;
|
|
336
|
+
$[70] = state.increment;
|
|
337
|
+
$[71] = steppers;
|
|
338
|
+
$[72] = validation.onEdit;
|
|
339
|
+
$[73] = variant;
|
|
340
|
+
$[74] = writtenIn;
|
|
341
|
+
$[75] = t17;
|
|
342
|
+
} else t17 = $[75];
|
|
343
|
+
const t18 = focus.focused || stepperFocused;
|
|
344
|
+
const t19 = shownError !== void 0;
|
|
345
|
+
const t20 = state.inputValue !== "";
|
|
346
|
+
const t21 = focus.handlers;
|
|
347
|
+
let t22;
|
|
348
|
+
if ($[78] !== description || $[79] !== id || $[80] !== shownError) {
|
|
349
|
+
t22 = describedBy(id, {
|
|
362
350
|
description,
|
|
363
351
|
error: shownError
|
|
364
352
|
});
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
} else
|
|
370
|
-
const
|
|
353
|
+
$[78] = description;
|
|
354
|
+
$[79] = id;
|
|
355
|
+
$[80] = shownError;
|
|
356
|
+
$[81] = t22;
|
|
357
|
+
} else t22 = $[81];
|
|
358
|
+
const t23 = !isDisabled && !isReadOnly;
|
|
359
|
+
let t24;
|
|
360
|
+
if ($[82] !== formatOptions || $[83] !== minValue || $[84] !== writtenIn) {
|
|
361
|
+
t24 = keyboardFor(writtenIn, formatOptions, minValue);
|
|
362
|
+
$[82] = formatOptions;
|
|
363
|
+
$[83] = minValue;
|
|
364
|
+
$[84] = writtenIn;
|
|
365
|
+
$[85] = t24;
|
|
366
|
+
} else t24 = $[85];
|
|
371
367
|
let t25;
|
|
372
|
-
if ($[
|
|
373
|
-
t25 =
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
} else t25 = $[
|
|
368
|
+
if ($[86] !== state || $[87] !== validation.onEdit) {
|
|
369
|
+
t25 = editInto(state, validation.onEdit);
|
|
370
|
+
$[86] = state;
|
|
371
|
+
$[87] = validation.onEdit;
|
|
372
|
+
$[88] = t25;
|
|
373
|
+
} else t25 = $[88];
|
|
378
374
|
let t26;
|
|
379
|
-
if ($[
|
|
380
|
-
t26 =
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
} else t26 = $[
|
|
375
|
+
if ($[89] !== onSubmitEditing || $[90] !== state) {
|
|
376
|
+
t26 = commitBefore(state, onSubmitEditing);
|
|
377
|
+
$[89] = onSubmitEditing;
|
|
378
|
+
$[90] = state;
|
|
379
|
+
$[91] = t26;
|
|
380
|
+
} else t26 = $[91];
|
|
385
381
|
let t27;
|
|
386
|
-
if ($[
|
|
387
|
-
t27 =
|
|
388
|
-
$[91] = onSubmitEditing;
|
|
389
|
-
$[92] = state;
|
|
390
|
-
$[93] = t27;
|
|
391
|
-
} else t27 = $[93];
|
|
392
|
-
let t28;
|
|
393
|
-
if ($[94] !== focus.handlers || $[95] !== label || $[96] !== numeric || $[97] !== props || $[98] !== returnKeyType || $[99] !== state.inputValue || $[100] !== t23 || $[101] !== t24 || $[102] !== t25 || $[103] !== t26 || $[104] !== t27) {
|
|
394
|
-
t28 = /* @__PURE__ */ jsx(FieldInput, {
|
|
382
|
+
if ($[92] !== focus.handlers || $[93] !== label || $[94] !== numeric || $[95] !== props || $[96] !== returnKeyType || $[97] !== state.inputValue || $[98] !== t22 || $[99] !== t23 || $[100] !== t24 || $[101] !== t25 || $[102] !== t26) {
|
|
383
|
+
t27 = /* @__PURE__ */ jsx(FieldInput, {
|
|
395
384
|
...props,
|
|
396
|
-
...
|
|
385
|
+
...t21,
|
|
397
386
|
"aria-label": label,
|
|
398
387
|
autoComplete: "off",
|
|
399
388
|
autoCorrect: false,
|
|
400
|
-
described:
|
|
401
|
-
editable:
|
|
402
|
-
keyboardType:
|
|
389
|
+
described: t22,
|
|
390
|
+
editable: t23,
|
|
391
|
+
keyboardType: t24,
|
|
403
392
|
numeric,
|
|
404
|
-
onChangeText:
|
|
405
|
-
onSubmitEditing:
|
|
393
|
+
onChangeText: t25,
|
|
394
|
+
onSubmitEditing: t26,
|
|
406
395
|
ref: control,
|
|
407
396
|
returnKeyType,
|
|
408
397
|
spellCheck: false,
|
|
409
398
|
value: state.inputValue
|
|
410
399
|
});
|
|
411
|
-
$[
|
|
412
|
-
$[
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
416
|
-
$[
|
|
417
|
-
$[
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
420
|
-
$[
|
|
421
|
-
$[
|
|
422
|
-
$[
|
|
423
|
-
} else
|
|
424
|
-
let
|
|
425
|
-
if ($[
|
|
426
|
-
|
|
400
|
+
$[92] = focus.handlers;
|
|
401
|
+
$[93] = label;
|
|
402
|
+
$[94] = numeric;
|
|
403
|
+
$[95] = props;
|
|
404
|
+
$[96] = returnKeyType;
|
|
405
|
+
$[97] = state.inputValue;
|
|
406
|
+
$[98] = t22;
|
|
407
|
+
$[99] = t23;
|
|
408
|
+
$[100] = t24;
|
|
409
|
+
$[101] = t25;
|
|
410
|
+
$[102] = t26;
|
|
411
|
+
$[103] = t27;
|
|
412
|
+
} else t27 = $[103];
|
|
413
|
+
let t28;
|
|
414
|
+
if ($[104] !== floatingLabel || $[105] !== isDisabled || $[106] !== isRequired || $[107] !== label || $[108] !== t17 || $[109] !== t18 || $[110] !== t19 || $[111] !== t20 || $[112] !== t27 || $[113] !== variant) {
|
|
415
|
+
t28 = /* @__PURE__ */ jsx(FieldBox, {
|
|
427
416
|
control,
|
|
428
|
-
end:
|
|
417
|
+
end: t17,
|
|
429
418
|
floatingLabel,
|
|
430
419
|
isDisabled,
|
|
431
|
-
isFocused:
|
|
432
|
-
isInvalid:
|
|
433
|
-
isPopulated:
|
|
420
|
+
isFocused: t18,
|
|
421
|
+
isInvalid: t19,
|
|
422
|
+
isPopulated: t20,
|
|
434
423
|
isRequired,
|
|
435
424
|
label,
|
|
436
425
|
variant,
|
|
437
|
-
children:
|
|
426
|
+
children: t27
|
|
438
427
|
});
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
$[
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
428
|
+
$[104] = floatingLabel;
|
|
429
|
+
$[105] = isDisabled;
|
|
430
|
+
$[106] = isRequired;
|
|
431
|
+
$[107] = label;
|
|
432
|
+
$[108] = t17;
|
|
433
|
+
$[109] = t18;
|
|
434
|
+
$[110] = t19;
|
|
435
|
+
$[111] = t20;
|
|
436
|
+
$[112] = t27;
|
|
437
|
+
$[113] = variant;
|
|
447
438
|
$[114] = t28;
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
if ($[117] !== description || $[118] !== id || $[119] !== shownError) {
|
|
453
|
-
t30 = /* @__PURE__ */ jsx(FieldMessage, {
|
|
439
|
+
} else t28 = $[114];
|
|
440
|
+
let t29;
|
|
441
|
+
if ($[115] !== description || $[116] !== id || $[117] !== shownError) {
|
|
442
|
+
t29 = /* @__PURE__ */ jsx(FieldMessage, {
|
|
454
443
|
description,
|
|
455
444
|
error: shownError,
|
|
456
445
|
id
|
|
457
446
|
});
|
|
458
|
-
$[
|
|
459
|
-
$[
|
|
460
|
-
$[
|
|
461
|
-
$[
|
|
462
|
-
} else
|
|
463
|
-
let
|
|
464
|
-
if ($[
|
|
465
|
-
|
|
447
|
+
$[115] = description;
|
|
448
|
+
$[116] = id;
|
|
449
|
+
$[117] = shownError;
|
|
450
|
+
$[118] = t29;
|
|
451
|
+
} else t29 = $[118];
|
|
452
|
+
let t30;
|
|
453
|
+
if ($[119] !== ref || $[120] !== style || $[121] !== t28 || $[122] !== t29) {
|
|
454
|
+
t30 = /* @__PURE__ */ jsxs(View, {
|
|
466
455
|
ref,
|
|
467
456
|
style,
|
|
468
|
-
children: [
|
|
457
|
+
children: [t28, t29]
|
|
469
458
|
});
|
|
470
|
-
$[
|
|
471
|
-
$[
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
-
} else
|
|
476
|
-
return
|
|
459
|
+
$[119] = ref;
|
|
460
|
+
$[120] = style;
|
|
461
|
+
$[121] = t28;
|
|
462
|
+
$[122] = t29;
|
|
463
|
+
$[123] = t30;
|
|
464
|
+
} else t30 = $[123];
|
|
465
|
+
return t30;
|
|
477
466
|
}
|
|
478
467
|
function outwardSlop(half, place) {
|
|
479
468
|
const slop = hitSlop(half, STEPPER_WIDTH);
|
|
@@ -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":";;;;;;;;;;;;;;;;;;AAyRA,MAAM6F,gBAAgB;AACtB,MAAMC,aAAa;AAKnB,MAAMC,aAAa;AACnB,MAAMC,gBAAgB;AAEtB,MAAMC,WAAWpD,cAAc,EAAEqD,OAAOC,cACtC/E,WAAWgF,OAAO;CAEhBC,SAAS;EACPC,YA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AAItD,SACPoD,OAAMpD,QAAQ/H,KAAM;GACrB;GACFO,iBACU;IACT+K,aAAaF,MAAKrD,OAAQ;IAC1BsD,KAAItD,UAAW;IACfqD,MAAKrD,UAAWyD,WAAWD,MAAM/J,UAAU;GAA9B;GACdhB,kBACW;IACV8K,aAAaF,MAAKrD,OAAQ;GAAC;EAE/B;EAAC1C,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAdMO;AAcN;;;;;;AAQH,SAAA2B,oBAAAvD,MAAA;CAAA,MAAAqB,IAAAC,EAAA,CAAA;CACE,MAAAmG,UAAgBjP,OAAO,KAAK;CAAC,IAAA4I;CAAA,IAAAK;CAAA,IAAAJ,EAAA,OAAArB,MAAA;EAEnBoB,WAAA;GACR,IAAIqG,QAAO1D,SAAQ;IACjB0D,QAAO1D,UAAW;IAClBrL,kBAAiBgP,yBAA0B1H,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;CALThJ,UAAU+I,IAKPK,EAAM;CAAC,IAAAC;CAAA,IAAAL,EAAA,OAAAwC,OAAAC,IAAA,2BAAA,GAAA;EAEHpC,MAAA1F,eAAsB;GAC3ByL,QAAO1D,UAAWpL,SAAQqI,OAAQ,SAASrI,SAAQqI,OAAQ;GAC3DhF,KAAK;EAAC;EACPqF,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAHMK;AAGN"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","BlurEvent","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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