@kanso-labs/react-native-kanso-ui 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +37 -0
  2. package/dist/badge/index.js +25 -23
  3. package/dist/badge/index.js.map +1 -1
  4. package/dist/button/index.d.ts +2 -1
  5. package/dist/button/index.js.map +1 -1
  6. package/dist/button/pending.js +17 -21
  7. package/dist/button/pending.js.map +1 -1
  8. package/dist/calendar/index.js +1182 -0
  9. package/dist/calendar/index.js.map +1 -0
  10. package/dist/calendar/styles.js +120 -0
  11. package/dist/calendar/styles.js.map +1 -0
  12. package/dist/components/autocomplete/index.js +28 -26
  13. package/dist/components/autocomplete/index.js.map +1 -1
  14. package/dist/components/avatar/index.d.ts +2 -2
  15. package/dist/components/avatar/index.js +2 -2
  16. package/dist/components/avatar/index.js.map +1 -1
  17. package/dist/components/calendar/index.d.ts +51 -0
  18. package/dist/components/calendar/index.js +121 -0
  19. package/dist/components/calendar/index.js.map +1 -0
  20. package/dist/components/chip-group/index.d.ts +4 -3
  21. package/dist/components/chip-group/index.js +47 -45
  22. package/dist/components/chip-group/index.js.map +1 -1
  23. package/dist/components/copy-field/index.d.ts +5 -5
  24. package/dist/components/copy-field/index.js +30 -28
  25. package/dist/components/copy-field/index.js.map +1 -1
  26. package/dist/components/currency/index.d.ts +2 -2
  27. package/dist/components/currency/index.js +3 -1
  28. package/dist/components/currency/index.js.map +1 -1
  29. package/dist/components/list/index.d.ts +6 -5
  30. package/dist/components/list/index.js +97 -106
  31. package/dist/components/list/index.js.map +1 -1
  32. package/dist/components/menu/index.d.ts +4 -3
  33. package/dist/components/menu/index.js +33 -40
  34. package/dist/components/menu/index.js.map +1 -1
  35. package/dist/components/meter/index.d.ts +2 -1
  36. package/dist/components/meter/index.js +9 -7
  37. package/dist/components/meter/index.js.map +1 -1
  38. package/dist/components/navigation-bar/index.d.ts +3 -9
  39. package/dist/components/navigation-bar/index.js +10 -34
  40. package/dist/components/navigation-bar/index.js.map +1 -1
  41. package/dist/components/navigation-rail/index.d.ts +68 -0
  42. package/dist/components/navigation-rail/index.js +294 -0
  43. package/dist/components/navigation-rail/index.js.map +1 -0
  44. package/dist/components/number-field/index.d.ts +7 -3
  45. package/dist/components/number-field/index.js +214 -192
  46. package/dist/components/number-field/index.js.map +1 -1
  47. package/dist/components/popover/index.js +1 -1
  48. package/dist/components/product-icon/index.d.ts +2 -2
  49. package/dist/components/product-icon/index.js +2 -2
  50. package/dist/components/product-icon/index.js.map +1 -1
  51. package/dist/components/progress-indicator/index.d.ts +2 -1
  52. package/dist/components/progress-indicator/index.js +15 -13
  53. package/dist/components/progress-indicator/index.js.map +1 -1
  54. package/dist/components/search-field/index.d.ts +3 -3
  55. package/dist/components/search-field/index.js +105 -104
  56. package/dist/components/search-field/index.js.map +1 -1
  57. package/dist/components/sheet/index.d.ts +2 -2
  58. package/dist/components/sheet/index.js +22 -26
  59. package/dist/components/sheet/index.js.map +1 -1
  60. package/dist/components/snackbar/index.d.ts +3 -3
  61. package/dist/components/snackbar/index.js +36 -34
  62. package/dist/components/snackbar/index.js.map +1 -1
  63. package/dist/components/tag/index.d.ts +58 -0
  64. package/dist/components/tag/index.js +205 -0
  65. package/dist/components/tag/index.js.map +1 -0
  66. package/dist/components/text-field/index.d.ts +6 -3
  67. package/dist/components/text-field/index.js +3 -0
  68. package/dist/components/text-field/index.js.map +1 -1
  69. package/dist/field/index.js +39 -36
  70. package/dist/field/index.js.map +1 -1
  71. package/dist/glyphs/index.js +19 -1
  72. package/dist/glyphs/index.js.map +1 -1
  73. package/dist/i18n/index.js +12 -1
  74. package/dist/i18n/index.js.map +1 -1
  75. package/dist/i18n/messages.js +741 -0
  76. package/dist/i18n/messages.js.map +1 -1
  77. package/dist/i18n/provider.d.ts +53 -0
  78. package/dist/i18n/provider.js +96 -0
  79. package/dist/i18n/provider.js.map +1 -0
  80. package/dist/index.d.ts +5 -1
  81. package/dist/index.js +6 -2
  82. package/dist/indicator/index.js +1 -2
  83. package/dist/indicator/index.js.map +1 -1
  84. package/dist/mark/index.js +77 -117
  85. package/dist/mark/index.js.map +1 -1
  86. package/dist/mark/initials.js.map +1 -1
  87. package/dist/navigation/index.d.ts +8 -1
  88. package/dist/navigation/index.js +113 -64
  89. package/dist/navigation/index.js.map +1 -1
  90. package/dist/navigation/styles.js +22 -0
  91. package/dist/navigation/styles.js.map +1 -1
  92. package/dist/number/count.js +15 -0
  93. package/dist/number/count.js.map +1 -0
  94. package/dist/number/locale.js.map +1 -1
  95. package/dist/overlay/host.js +30 -21
  96. package/dist/overlay/host.js.map +1 -1
  97. package/package.json +3 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","LayoutChangeEvent","StyleProp","ViewProps","ViewStyle","AnimatedStyle","SharedValue","Edge","useMemo","I18nManager","ScrollView","StyleSheet","View","Animated","Easing","useAnimatedStyle","useReducedMotion","useSharedValue","withTiming","SafeAreaView","NavigationItemProps","ResolvedTheme","NavigationContext","NavigationItem","useTheme","composeStyles","themedStyles","NavigationRailItemProps","NavigationRailProps","Omit","children","header","isExpanded","ref","selectedRoute","style","Timing","duration","easing","ReturnType","bezier","COLLAPSED_WIDTH","EXPANDED_MIN_WIDTH","EXPANDED_MAX_WIDTH","TOP_PADDING","EXPANDED_PADDING","RING_REACH","styles","create","content","flexShrink","destinations","alignSelf","flexBasis","flexGrow","margin","inset","stylesOf","colors","spacing","collapsed","alignItems","paddingBottom","xl","paddingTop","width","collapsedList","gap","xs","padding","expanded","maxWidth","minWidth","paddingHorizontal","expandedList","marginBottom","xxxl","headerExpanded","paddingStart","sm","rail","backgroundColor","surface","flexDirection","overflow","edgesOf","isRTL","NavigationRail","t0","$","_c","ariaLabel","props","t1","undefined","theme","own","reduceMotion","t2","const","t3","form","measuring","context","widthStyle","current","get","t4","t5","T0","t6","widthThen","timingOf","T1","t8","Symbol","for","T2","t10","t11","t12","t13","t14","t15","t16","t9","t17","t7","t18","NavigationRailItem","motion","durationLong2","easingEmphasized","timing","event","next","nativeEvent","layout","set","Item","_c"],"sources":["../../../src/components/navigation-rail/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref } from 'react'\nimport type {\n LayoutChangeEvent,\n StyleProp,\n ViewProps,\n ViewStyle,\n} from 'react-native'\nimport type { AnimatedStyle, SharedValue } from 'react-native-reanimated'\nimport type { Edge } from 'react-native-safe-area-context'\n\nimport { useMemo } from 'react'\nimport { I18nManager, ScrollView, StyleSheet, View } from 'react-native'\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useReducedMotion,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated'\nimport { SafeAreaView } from 'react-native-safe-area-context'\n\nimport type { NavigationItemProps } from '../../navigation'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { NavigationContext, NavigationItem } from '../../navigation'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\n\n// kanso-ui's NavigationRail, the navigation rail page's rail, in both its\n// forms: collapsed, a 96dp column of vertical destinations down the leading\n// edge, and expanded, between 220dp and 360dp with each destination the\n// page's 56dp horizontal pill. Both are on the surface role, with their\n// contents 44dp from the top: the first destination, or a header when the\n// rail has one, such as a menu button that expands it, with the first\n// destination 40dp under it. The destinations are src/navigation's, shared\n// with NavigationBar, which holds their values.\n//\n// **The rail widens and narrows** when `isExpanded` changes: its surface\n// moves from one form's width to the other's over `durationLong2` on the\n// emphasized curve, as the active indicator moves, while the destinations\n// take their new form at once and the surface reveals or covers them. Web\n// changes width at once. Under reduced motion it does here too. The width it\n// moves to is the one the new form lays out at, measured, so an expanded\n// rail is as wide as its longest label asks within the page's bounds.\n//\n// The rail paints its surface under the status bar, the home indicator and a\n// landscape notch on its leading side, and keeps its header and destinations\n// inside the safe area: a `SafeAreaView` pads it by the top, the bottom and\n// the leading inset, the left one or under right-to-left the right, wherever\n// the rail meets them. Its trailing side faces the screen's content, so it\n// takes no inset there.\n//\n// The destinations scroll in a block of their own under the header, so a\n// rail shorter than they are scrolls them rather than squashing each below\n// its height, and the header stays where it is. The block is a `tablist` and\n// each destination a `tab`, which is how both platforms announce a set of\n// top-level destinations; the header is outside it, since what it holds is\n// not one of them. Web's rail is a landmark of links, which native has no\n// counterpart for. A destination still goes to its `href` through the app's\n// router, see `RouterProvider`.\n\ntype NavigationRailItemProps = NavigationItemProps\n\ntype NavigationRailProps = Omit<ViewProps, 'children' | 'style'> & {\n /** The destinations: `NavigationRail.Item`s. */\n readonly children?: ReactNode\n /**\n * What the rail draws above its destinations: a menu button that expands\n * it, or a floating action button.\n */\n readonly header?: ReactNode\n /**\n * Whether the rail is in its expanded form, each destination a pill with\n * its label beside the icon, rather than collapsed with the label under it.\n * @default false\n */\n readonly isExpanded?: boolean\n readonly ref?: Ref<ComponentRef<typeof View>>\n /**\n * The route of the current destination, matched against each\n * destination's `href`. The match is selected and draws the active\n * indicator.\n */\n readonly selectedRoute?: string\n readonly style?: StyleProp<ViewStyle>\n}\n\ntype Timing = {\n readonly duration: number\n readonly easing: ReturnType<typeof Easing.bezier>\n}\n\n// The collapsed rail's width, and the expanded rail's bounds.\nconst COLLAPSED_WIDTH = 96\nconst EXPANDED_MIN_WIDTH = 220\nconst EXPANDED_MAX_WIDTH = 360\n\n// The page's 44dp above the contents, header or not, and the 20dp either\n// side of the expanded rail's pills, which fall between two steps of the\n// spacing scale and so are written out.\nconst TOP_PADDING = 44\nconst EXPANDED_PADDING = 20\n\n// How far a destination's focus ring reaches past it: the 2dp offset and the\n// 2dp ring. A scroll view clips what overflows it, so the block the\n// destinations scroll in is padded by this much and pulled back out by as\n// much, which leaves every destination where it was and every ring whole.\nconst RING_REACH = 4\n\nconst styles = StyleSheet.create({\n // The form being drawn, as wide as it lays out, whatever the surface\n // around it is moving through.\n content: {\n flexShrink: 0,\n },\n // The destinations' block, which takes the height the header leaves and\n // scrolls what does not fit in it.\n destinations: {\n alignSelf: 'stretch',\n flexBasis: 'auto',\n flexGrow: 1,\n flexShrink: 1,\n margin: -RING_REACH,\n },\n // The safe area and the form inside it take the rail's height and no more,\n // shrinking below what their destinations ask, since a view keeps its\n // content's height by default and the block would then never scroll.\n inset: {\n flexGrow: 1,\n flexShrink: 1,\n },\n})\n\nconst stylesOf = themedStyles(({ colors, spacing }) =>\n StyleSheet.create({\n // The collapsed rail, its destinations centred in it.\n collapsed: {\n alignItems: 'center',\n flexGrow: 1,\n flexShrink: 1,\n paddingBottom: spacing.xl,\n paddingTop: TOP_PADDING,\n width: COLLAPSED_WIDTH,\n },\n // The collapsed rail's destinations, 4dp apart.\n collapsedList: {\n alignItems: 'center',\n gap: spacing.xs,\n padding: RING_REACH,\n },\n // The expanded rail: as wide as its pills ask, within the page's bounds,\n // 20dp either side of them.\n expanded: {\n flexGrow: 1,\n flexShrink: 1,\n maxWidth: EXPANDED_MAX_WIDTH,\n minWidth: EXPANDED_MIN_WIDTH,\n paddingBottom: spacing.xl,\n paddingHorizontal: EXPANDED_PADDING,\n paddingTop: TOP_PADDING,\n },\n // The expanded rail's pills, at its leading edge with no gap between.\n expandedList: {\n alignItems: 'flex-start',\n padding: RING_REACH,\n },\n // What the rail draws above its destinations, the page's 40dp clear of\n // the first: the collapsed rail's 4dp gap, and the rest of its own here.\n header: {\n alignItems: 'center',\n marginBottom: spacing.xxxl - spacing.xs,\n },\n // The expanded rail has no gap between destinations, so its header keeps\n // the whole 40dp. It starts at the leading edge where the pills do, 8dp\n // in from there: a 40dp icon button centres its 24dp icon, and 8dp puts\n // that icon over the pills' icons, 16dp into each pill.\n headerExpanded: {\n alignItems: 'flex-start',\n alignSelf: 'stretch',\n marginBottom: spacing.xxxl,\n paddingStart: spacing.sm,\n },\n // The rail's surface. It keeps its width whatever sits beside it, and\n // holds the form being drawn at its leading edge, clipping it while the\n // surface is narrower.\n rail: {\n backgroundColor: colors.surface,\n flexDirection: 'row',\n flexShrink: 0,\n overflow: 'hidden',\n },\n }),\n)\n\n// The edges the rail meets: the top, the bottom and its leading side, which\n// is the right one under right-to-left.\nfunction edgesOf(): readonly Edge[] {\n return ['bottom', I18nManager.isRTL ? 'right' : 'left', 'top']\n}\n\n/**\n * The column of top-level destinations a medium or wider window keeps at its\n * leading edge, collapsed or, with `isExpanded`, expanded. Each destination\n * goes to its `href` through the app's router, see `RouterProvider`.\n *\n * ```tsx\n * <NavigationRail selectedRoute=\"/first\">\n * <NavigationRail.Item href=\"/first\" icon={<FirstIcon />}>\n * First item\n * </NavigationRail.Item>\n * <NavigationRail.Item href=\"/second\" icon={<SecondIcon />}>\n * Second item\n * </NavigationRail.Item>\n * </NavigationRail>\n * ```\n *\n * Draw it at the leading edge of a row holding the screen's content, which\n * gives it its height: it paints its surface to the screen's edges and keeps\n * its destinations clear of the status bar, the home indicator and a notch\n * itself.\n *\n * `aria-label` names the destinations' tab list. `style`, `ref` and `testID`\n * land on the rail's own view, its surface.\n */\nfunction NavigationRail({\n 'aria-label': ariaLabel,\n children,\n header,\n isExpanded = false,\n selectedRoute,\n style,\n ...props\n}: NavigationRailProps) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const reduceMotion = useReducedMotion()\n // The surface's width, unset until the form being drawn is first measured,\n // which leaves the surface as wide as that form.\n const width = useSharedValue<number | undefined>(undefined)\n const context = useMemo(\n () => ({\n form: isExpanded ? ('expanded' as const) : ('collapsed' as const),\n measuring: false,\n selectedRoute,\n }),\n [isExpanded, selectedRoute],\n )\n const widthStyle = useAnimatedStyle(() => {\n 'worklet'\n const current = width.get()\n\n return current === undefined ? {} : { width: current }\n })\n\n return (\n <Animated.View\n {...props}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n own.rail,\n widthStyle,\n style,\n )}\n >\n <View\n onLayout={widthThen(width, reduceMotion, timingOf(theme))}\n style={styles.content}\n >\n <SafeAreaView edges={edgesOf()} style={styles.inset}>\n <View style={isExpanded ? own.expanded : own.collapsed}>\n {header === undefined ? null : (\n <View\n style={composeStyles<ViewStyle>(\n own.header,\n isExpanded ? own.headerExpanded : undefined,\n )}\n >\n {header}\n </View>\n )}\n <ScrollView\n aria-label={ariaLabel}\n contentContainerStyle={\n isExpanded ? own.expandedList : own.collapsedList\n }\n role=\"tablist\"\n style={styles.destinations}\n >\n <NavigationContext value={context}>{children}</NavigationContext>\n </ScrollView>\n </View>\n </SafeAreaView>\n </View>\n </Animated.View>\n )\n}\n\n/**\n * One destination of a navigation rail: an icon, a label and, while it is\n * the current one, the active indicator. Pressing it calls `onPress`, then\n * goes to its `href`. Renders nothing of its own outside a `NavigationRail`,\n * whose `selectedRoute` says whether it is selected.\n *\n * `style`, `ref` and `testID` land on the destination's `Pressable`.\n */\nfunction NavigationRailItem(props: NavigationRailItemProps) {\n return <NavigationItem {...props} />\n}\n\n// The rail's change of width, on the active indicator's duration and curve.\nfunction timingOf({ motion }: ResolvedTheme): Timing {\n return {\n duration: motion.durationLong2,\n easing: Easing.bezier(...motion.easingEmphasized),\n }\n}\n\n// Moves the surface to the width the form being drawn lays out at: at once\n// the first time, and under reduced motion, and over the rail's timing\n// after that. Built by a call rather than written inline at the prop, which\n// is what react-perf's jsx-no-new-function-as-prop is after.\nfunction widthThen(\n width: SharedValue<number | undefined>,\n reduceMotion: boolean,\n timing: Timing,\n) {\n return (event: LayoutChangeEvent) => {\n const next = event.nativeEvent.layout.width\n\n width.set(\n width.get() === undefined || reduceMotion\n ? next\n : withTiming(next, timing),\n )\n }\n}\n\nNavigationRail.Item = NavigationRailItem\n\nexport type { NavigationRailItemProps, NavigationRailProps }\n\nexport { NavigationRail, NavigationRailItem }\n"],"mappings":";;;;;;;;;;AA6FA,MAAM2C,kBAAkB;AACxB,MAAMC,qBAAqB;AAC3B,MAAMC,qBAAqB;AAK3B,MAAMC,cAAc;AACpB,MAAMC,mBAAmB;AAMzB,MAAMC,aAAa;AAEnB,MAAMC,SAASpC,WAAWqC,OAAO;CAG/BC,SAAS,EACPC,YAAY,EACd;CAGAC,cAAc;EACZC,WAAW;EACXC,WAAW;EACX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EAAA6E,EAAA,MAAAmB;EAAAnB,EAAA,MAAAuC;CAAA,OAAAA,MAAAvC,EAAA;CAAA,OArChBuC;AAqCgB;;;;;;;;;AAYpB,SAAAC,mBAAArC,OAAA;CAAA,MAAAH,IAAAC,EAAA,CAAA;CAAA,IAAAF;CAAA,IAAAC,EAAA,OAAAG,OAAA;EACSJ,KAAA,oBAAC,gBAAD,EAAe,GAAKI,MAAK,CAAA;EAAIH,EAAA,KAAAG;EAAAH,EAAA,KAAAD;CAAA,OAAAA,KAAAC,EAAA;CAAA,OAA7BD;AAA6B;AAItC,SAASwB,SAAS,EAAEkB,UAAiC;CACnD,OAAO;EACL7F,UAAU6F,OAAOC;EACjB7F,QAAQxB,OAAO0B,OAAO,GAAG0F,OAAOE,gBAAgB;CAClD;AACF;AAMA,SAASrB,UACP9C,OACAgC,cACAoC,QACA;CACA,QAAQC,UAA6B;EACnC,MAAMC,OAAOD,MAAME,YAAYC,OAAOxE;EAEtCA,MAAMyE,IACJzE,MAAMyC,IAAI,MAAMZ,KAAAA,KAAaG,eACzBsC,OACArH,WAAWqH,MAAMF,MAAM,CAC7B;CACF;AACF;AAEA9C,eAAeoD,OAAOV"}
@@ -6,7 +6,9 @@ import { ComponentRef, Ref } from "react";
6
6
  type NumberFieldProps = Omit<TextInputProps, 'accessibilityHint' | 'accessibilityLabel' | 'aria-disabled' | 'aria-label' | 'autoComplete' | 'autoCorrect' | 'children' | 'cursorColor' | 'defaultValue' | 'editable' | 'inputMode' | 'keyboardType' | 'maxLength' | 'multiline' | 'numberOfLines' | 'onChange' | 'onChangeText' | 'placeholder' | 'placeholderTextColor' | 'readOnly' | 'selectionColor' | 'spellCheck' | 'style' | 'underlineColorAndroid' | 'value'> & {
7
7
  /**
8
8
  * The name of the stepper that lowers the value, for a screen reader. Left
9
- * out, it is the English "Decrease" followed by the field's own label.
9
+ * out, it is the name React Aria gives web's in the `I18nProvider`'s
10
+ * locale, or the device's outside one, around the field's own label:
11
+ * "Decrease Label" in English.
10
12
  */
11
13
  readonly decrementLabel?: string;
12
14
  /** The value the field opens with, when it keeps its own. */
@@ -39,7 +41,9 @@ type NumberFieldProps = Omit<TextInputProps, 'accessibilityHint' | 'accessibilit
39
41
  readonly formatOptions?: Intl.NumberFormatOptions;
40
42
  /**
41
43
  * The name of the stepper that raises the value, for a screen reader. Left
42
- * out, it is the English "Increase" followed by the field's own label.
44
+ * out, it is the name React Aria gives web's in the `I18nProvider`'s
45
+ * locale, or the device's outside one, around the field's own label:
46
+ * "Increase Label" in English.
43
47
  */
44
48
  readonly incrementLabel?: string;
45
49
  /**
@@ -70,7 +74,7 @@ type NumberFieldProps = Omit<TextInputProps, 'accessibilityHint' | 'accessibilit
70
74
  readonly label: string;
71
75
  /**
72
76
  * The BCP 47 locale the value is written and read in. Defaults to the
73
- * device's.
77
+ * `I18nProvider`'s, or the device's outside one.
74
78
  */
75
79
  readonly locale?: string;
76
80
  /** The highest value the field takes. A committed value is clamped to it. */
@@ -3,7 +3,8 @@ import { useTheme } from "../../theme/scope.js";
3
3
  import { composeStyles, themedStyles } from "../../theme/styles.js";
4
4
  import { hitSlop, usePressFeedback } from "../../press/index.js";
5
5
  import { withOpacity } from "../../theme/color.js";
6
- import { localeOf } from "../../number/locale.js";
6
+ import { messagesFor } from "../../i18n/index.js";
7
+ import { useLocaleOf } from "../../i18n/provider.js";
7
8
  import { MinusGlyph, PlusGlyph } from "../../glyphs/index.js";
8
9
  import { useFieldValidation } from "../../form/index.js";
9
10
  import { IconButton } from "../icon-button/index.js";
@@ -99,7 +100,7 @@ function marginVerticalOf(margin) {
99
100
  * ```
100
101
  */
101
102
  function NumberField(t0) {
102
- const $ = c(110);
103
+ const $ = c(126);
103
104
  let decrementLabel;
104
105
  let defaultValue;
105
106
  let description;
@@ -205,30 +206,45 @@ function NumberField(t0) {
205
206
  const variant = t8 === void 0 ? "filled" : t8;
206
207
  const id = useId();
207
208
  const control = useRef(null);
208
- const writtenIn = localeOf(locale);
209
- const state = useNumberFieldState({
210
- defaultValue,
211
- formatOptions,
212
- isDisabled,
213
- isReadOnly,
214
- locale: writtenIn,
215
- maxValue,
216
- minValue,
217
- onChange,
218
- step,
219
- value
220
- });
209
+ const writtenIn = useLocaleOf(locale);
221
210
  let t9;
222
- if ($[31] !== state.numberValue) {
223
- t9 = Number.isNaN(state.numberValue);
224
- $[31] = state.numberValue;
225
- $[32] = t9;
226
- } else t9 = $[32];
227
- const empty = t9;
228
- const t10 = empty ? "" : String(state.numberValue);
229
- let t11;
230
- if ($[33] !== empty || $[34] !== error || $[35] !== isDisabled || $[36] !== isReadOnly || $[37] !== isRequired || $[38] !== name || $[39] !== state.numberValue || $[40] !== t10 || $[41] !== validate) {
231
- t11 = {
211
+ if ($[31] !== defaultValue || $[32] !== formatOptions || $[33] !== isDisabled || $[34] !== isReadOnly || $[35] !== maxValue || $[36] !== minValue || $[37] !== onChange || $[38] !== step || $[39] !== value || $[40] !== writtenIn) {
212
+ t9 = {
213
+ defaultValue,
214
+ formatOptions,
215
+ isDisabled,
216
+ isReadOnly,
217
+ locale: writtenIn,
218
+ maxValue,
219
+ minValue,
220
+ onChange,
221
+ step,
222
+ value
223
+ };
224
+ $[31] = defaultValue;
225
+ $[32] = formatOptions;
226
+ $[33] = isDisabled;
227
+ $[34] = isReadOnly;
228
+ $[35] = maxValue;
229
+ $[36] = minValue;
230
+ $[37] = onChange;
231
+ $[38] = step;
232
+ $[39] = value;
233
+ $[40] = writtenIn;
234
+ $[41] = t9;
235
+ } else t9 = $[41];
236
+ const state = useNumberFieldState(t9);
237
+ let t10;
238
+ if ($[42] !== state.numberValue) {
239
+ t10 = Number.isNaN(state.numberValue);
240
+ $[42] = state.numberValue;
241
+ $[43] = t10;
242
+ } else t10 = $[43];
243
+ const empty = t10;
244
+ const t11 = empty ? "" : String(state.numberValue);
245
+ let t12;
246
+ if ($[44] !== empty || $[45] !== error || $[46] !== isDisabled || $[47] !== isReadOnly || $[48] !== isRequired || $[49] !== name || $[50] !== state.numberValue || $[51] !== t11 || $[52] !== validate) {
247
+ t12 = {
232
248
  control,
233
249
  error,
234
250
  isDisabled,
@@ -236,222 +252,228 @@ function NumberField(t0) {
236
252
  isReadOnly,
237
253
  isRequired,
238
254
  name,
239
- submitted: t10,
255
+ submitted: t11,
240
256
  validate,
241
257
  value: state.numberValue
242
258
  };
243
- $[33] = empty;
244
- $[34] = error;
245
- $[35] = isDisabled;
246
- $[36] = isReadOnly;
247
- $[37] = isRequired;
248
- $[38] = name;
249
- $[39] = state.numberValue;
250
- $[40] = t10;
251
- $[41] = validate;
252
- $[42] = t11;
253
- } else t11 = $[42];
254
- const validation = useFieldValidation(t11);
259
+ $[44] = empty;
260
+ $[45] = error;
261
+ $[46] = isDisabled;
262
+ $[47] = isReadOnly;
263
+ $[48] = isRequired;
264
+ $[49] = name;
265
+ $[50] = state.numberValue;
266
+ $[51] = t11;
267
+ $[52] = validate;
268
+ $[53] = t12;
269
+ } else t12 = $[53];
270
+ const validation = useFieldValidation(t12);
255
271
  const shownError = validation.error;
256
- let t12;
257
- if ($[43] !== onBlur || $[44] !== state || $[45] !== validation.onBlur) {
258
- t12 = commitBefore(state, blurThen(validation.onBlur, onBlur));
259
- $[43] = onBlur;
260
- $[44] = state;
261
- $[45] = validation.onBlur;
262
- $[46] = t12;
263
- } else t12 = $[46];
264
272
  let t13;
265
- if ($[47] !== onFocus || $[48] !== t12) {
266
- t13 = {
267
- onBlur: t12,
273
+ if ($[54] !== onBlur || $[55] !== state || $[56] !== validation.onBlur) {
274
+ t13 = commitBefore(state, blurThen(validation.onBlur, onBlur));
275
+ $[54] = onBlur;
276
+ $[55] = state;
277
+ $[56] = validation.onBlur;
278
+ $[57] = t13;
279
+ } else t13 = $[57];
280
+ let t14;
281
+ if ($[58] !== onFocus || $[59] !== t13) {
282
+ t14 = {
283
+ onBlur: t13,
268
284
  onFocus
269
285
  };
270
- $[47] = onFocus;
271
- $[48] = t12;
272
- $[49] = t13;
273
- } else t13 = $[49];
274
- const focus = useFieldFocus(t13);
275
- const hasDecimals = (new NumberFormatter(writtenIn, formatOptions).resolvedOptions().maximumFractionDigits ?? 0) > 0;
286
+ $[58] = onFocus;
287
+ $[59] = t13;
288
+ $[60] = t14;
289
+ } else t14 = $[60];
290
+ 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;
276
299
  const announced = useStepAnnouncement(state.inputValue);
277
300
  const [stepperFocused, setStepperFocused] = useState(false);
278
- let t14;
279
- let t15;
280
- if ($[50] === Symbol.for("react.memo_cache_sentinel")) {
281
- t14 = () => control.current;
282
- t15 = [];
283
- $[50] = t14;
284
- $[51] = t15;
301
+ let t16;
302
+ let t17;
303
+ if ($[64] === Symbol.for("react.memo_cache_sentinel")) {
304
+ t16 = () => control.current;
305
+ t17 = [];
306
+ $[64] = t16;
307
+ $[65] = t17;
285
308
  } else {
286
- t14 = $[50];
287
- t15 = $[51];
309
+ t16 = $[64];
310
+ t17 = $[65];
288
311
  }
289
- useImperativeHandle(inputRef, t14, t15);
290
- const t16 = decrementLabel ?? `Decrease ${label}`;
291
- const t17 = incrementLabel ?? `Increase ${label}`;
292
- const t18 = steppers === "horizontal";
293
- let t19;
294
- if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
295
- t19 = () => {
296
- setStepperFocused(false);
297
- };
298
- $[52] = t19;
299
- } else t19 = $[52];
300
- let t20;
301
- if ($[53] !== announced || $[54] !== state.canDecrement || $[55] !== state.canIncrement || $[56] !== state.decrement || $[57] !== state.increment || $[58] !== t16 || $[59] !== t17 || $[60] !== t18 || $[61] !== validation.onEdit || $[62] !== variant) {
302
- let t21;
303
- if ($[64] === Symbol.for("react.memo_cache_sentinel")) {
304
- t21 = () => {
312
+ useImperativeHandle(inputRef, t16, t17);
313
+ let t18;
314
+ if ($[66] !== announced || $[67] !== decrementLabel || $[68] !== incrementLabel || $[69] !== label || $[70] !== state.canDecrement || $[71] !== state.canIncrement || $[72] !== state.decrement || $[73] !== state.increment || $[74] !== steppers || $[75] !== validation.onEdit || $[76] !== variant || $[77] !== writtenIn) {
315
+ let t19;
316
+ if ($[79] === Symbol.for("react.memo_cache_sentinel")) {
317
+ t19 = () => {
318
+ setStepperFocused(false);
319
+ };
320
+ $[79] = t19;
321
+ } else t19 = $[79];
322
+ let t20;
323
+ if ($[80] === Symbol.for("react.memo_cache_sentinel")) {
324
+ t20 = () => {
305
325
  setStepperFocused(true);
306
326
  };
307
- $[64] = t21;
308
- } else t21 = $[64];
309
- t20 = steppersOf({
327
+ $[80] = t20;
328
+ } else t20 = $[80];
329
+ t18 = steppersOf({
310
330
  canDecrement: state.canDecrement,
311
331
  canIncrement: state.canIncrement,
312
- decrementLabel: t16,
313
- incrementLabel: t17,
314
- inline: t18,
332
+ decrementLabel: decrementLabel ?? messagesFor(writtenIn).decrease.replace("{label}", label),
333
+ incrementLabel: incrementLabel ?? messagesFor(writtenIn).increase.replace("{label}", label),
334
+ inline: steppers === "horizontal",
315
335
  onBlur: t19,
316
336
  onDecrement: announced(stepThen(state.decrement, validation.onEdit)),
317
- onFocus: t21,
337
+ onFocus: t20,
318
338
  onIncrement: announced(stepThen(state.increment, validation.onEdit)),
319
339
  outlined: variant === "outlined"
320
340
  });
321
- $[53] = announced;
322
- $[54] = state.canDecrement;
323
- $[55] = state.canIncrement;
324
- $[56] = state.decrement;
325
- $[57] = state.increment;
326
- $[58] = t16;
327
- $[59] = t17;
328
- $[60] = t18;
329
- $[61] = validation.onEdit;
330
- $[62] = variant;
331
- $[63] = t20;
332
- } else t20 = $[63];
333
- const t21 = focus.focused || stepperFocused;
334
- const t22 = shownError !== void 0;
335
- const t23 = state.inputValue !== "";
336
- const t24 = focus.handlers;
337
- let t25;
338
- if ($[65] !== description || $[66] !== id || $[67] !== shownError) {
339
- t25 = describedBy(id, {
341
+ $[66] = announced;
342
+ $[67] = decrementLabel;
343
+ $[68] = incrementLabel;
344
+ $[69] = label;
345
+ $[70] = state.canDecrement;
346
+ $[71] = state.canIncrement;
347
+ $[72] = state.decrement;
348
+ $[73] = state.increment;
349
+ $[74] = steppers;
350
+ $[75] = validation.onEdit;
351
+ $[76] = variant;
352
+ $[77] = writtenIn;
353
+ $[78] = t18;
354
+ } else t18 = $[78];
355
+ const t19 = focus.focused || stepperFocused;
356
+ const t20 = shownError !== void 0;
357
+ const t21 = state.inputValue !== "";
358
+ const t22 = focus.handlers;
359
+ let t23;
360
+ if ($[81] !== description || $[82] !== id || $[83] !== shownError) {
361
+ t23 = describedBy(id, {
340
362
  description,
341
363
  error: shownError
342
364
  });
343
- $[65] = description;
344
- $[66] = id;
345
- $[67] = shownError;
346
- $[68] = t25;
347
- } else t25 = $[68];
348
- const t26 = !isDisabled && !isReadOnly;
365
+ $[81] = description;
366
+ $[82] = id;
367
+ $[83] = shownError;
368
+ $[84] = t23;
369
+ } else t23 = $[84];
370
+ const t24 = !isDisabled && !isReadOnly;
371
+ let t25;
372
+ if ($[85] !== hasDecimals || $[86] !== minValue) {
373
+ t25 = keyboardOf(minValue, hasDecimals);
374
+ $[85] = hasDecimals;
375
+ $[86] = minValue;
376
+ $[87] = t25;
377
+ } else t25 = $[87];
378
+ let t26;
379
+ if ($[88] !== state || $[89] !== validation.onEdit) {
380
+ t26 = editInto(state, validation.onEdit);
381
+ $[88] = state;
382
+ $[89] = validation.onEdit;
383
+ $[90] = t26;
384
+ } else t26 = $[90];
349
385
  let t27;
350
- if ($[69] !== hasDecimals || $[70] !== minValue) {
351
- t27 = keyboardOf(minValue, hasDecimals);
352
- $[69] = hasDecimals;
353
- $[70] = minValue;
354
- $[71] = t27;
355
- } else t27 = $[71];
386
+ if ($[91] !== onSubmitEditing || $[92] !== state) {
387
+ t27 = commitBefore(state, onSubmitEditing);
388
+ $[91] = onSubmitEditing;
389
+ $[92] = state;
390
+ $[93] = t27;
391
+ } else t27 = $[93];
356
392
  let t28;
357
- if ($[72] !== state || $[73] !== validation.onEdit) {
358
- t28 = editInto(state, validation.onEdit);
359
- $[72] = state;
360
- $[73] = validation.onEdit;
361
- $[74] = t28;
362
- } else t28 = $[74];
363
- let t29;
364
- if ($[75] !== onSubmitEditing || $[76] !== state) {
365
- t29 = commitBefore(state, onSubmitEditing);
366
- $[75] = onSubmitEditing;
367
- $[76] = state;
368
- $[77] = t29;
369
- } else t29 = $[77];
370
- let t30;
371
- if ($[78] !== focus.handlers || $[79] !== label || $[80] !== numeric || $[81] !== props || $[82] !== returnKeyType || $[83] !== state.inputValue || $[84] !== t25 || $[85] !== t26 || $[86] !== t27 || $[87] !== t28 || $[88] !== t29) {
372
- t30 = /* @__PURE__ */ jsx(FieldInput, {
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, {
373
395
  ...props,
374
- ...t24,
396
+ ...t22,
375
397
  "aria-label": label,
376
398
  autoComplete: "off",
377
399
  autoCorrect: false,
378
- described: t25,
379
- editable: t26,
380
- keyboardType: t27,
400
+ described: t23,
401
+ editable: t24,
402
+ keyboardType: t25,
381
403
  numeric,
382
- onChangeText: t28,
383
- onSubmitEditing: t29,
404
+ onChangeText: t26,
405
+ onSubmitEditing: t27,
384
406
  ref: control,
385
407
  returnKeyType,
386
408
  spellCheck: false,
387
409
  value: state.inputValue
388
410
  });
389
- $[78] = focus.handlers;
390
- $[79] = label;
391
- $[80] = numeric;
392
- $[81] = props;
393
- $[82] = returnKeyType;
394
- $[83] = state.inputValue;
395
- $[84] = t25;
396
- $[85] = t26;
397
- $[86] = t27;
398
- $[87] = t28;
399
- $[88] = t29;
400
- $[89] = t30;
401
- } else t30 = $[89];
402
- let t31;
403
- if ($[90] !== floatingLabel || $[91] !== isDisabled || $[92] !== isRequired || $[93] !== label || $[94] !== t20 || $[95] !== t21 || $[96] !== t22 || $[97] !== t23 || $[98] !== t30 || $[99] !== variant) {
404
- t31 = /* @__PURE__ */ jsx(FieldBox, {
411
+ $[94] = focus.handlers;
412
+ $[95] = label;
413
+ $[96] = numeric;
414
+ $[97] = props;
415
+ $[98] = returnKeyType;
416
+ $[99] = state.inputValue;
417
+ $[100] = t23;
418
+ $[101] = t24;
419
+ $[102] = t25;
420
+ $[103] = t26;
421
+ $[104] = t27;
422
+ $[105] = t28;
423
+ } else t28 = $[105];
424
+ let t29;
425
+ if ($[106] !== floatingLabel || $[107] !== isDisabled || $[108] !== isRequired || $[109] !== label || $[110] !== t18 || $[111] !== t19 || $[112] !== t20 || $[113] !== t21 || $[114] !== t28 || $[115] !== variant) {
426
+ t29 = /* @__PURE__ */ jsx(FieldBox, {
405
427
  control,
406
- end: t20,
428
+ end: t18,
407
429
  floatingLabel,
408
430
  isDisabled,
409
- isFocused: t21,
410
- isInvalid: t22,
411
- isPopulated: t23,
431
+ isFocused: t19,
432
+ isInvalid: t20,
433
+ isPopulated: t21,
412
434
  isRequired,
413
435
  label,
414
436
  variant,
415
- children: t30
437
+ children: t28
416
438
  });
417
- $[90] = floatingLabel;
418
- $[91] = isDisabled;
419
- $[92] = isRequired;
420
- $[93] = label;
421
- $[94] = t20;
422
- $[95] = t21;
423
- $[96] = t22;
424
- $[97] = t23;
425
- $[98] = t30;
426
- $[99] = variant;
427
- $[100] = t31;
428
- } else t31 = $[100];
429
- let t32;
430
- if ($[101] !== description || $[102] !== id || $[103] !== shownError) {
431
- t32 = /* @__PURE__ */ jsx(FieldMessage, {
439
+ $[106] = floatingLabel;
440
+ $[107] = isDisabled;
441
+ $[108] = isRequired;
442
+ $[109] = label;
443
+ $[110] = t18;
444
+ $[111] = t19;
445
+ $[112] = t20;
446
+ $[113] = t21;
447
+ $[114] = t28;
448
+ $[115] = variant;
449
+ $[116] = t29;
450
+ } else t29 = $[116];
451
+ let t30;
452
+ if ($[117] !== description || $[118] !== id || $[119] !== shownError) {
453
+ t30 = /* @__PURE__ */ jsx(FieldMessage, {
432
454
  description,
433
455
  error: shownError,
434
456
  id
435
457
  });
436
- $[101] = description;
437
- $[102] = id;
438
- $[103] = shownError;
439
- $[104] = t32;
440
- } else t32 = $[104];
441
- let t33;
442
- if ($[105] !== ref || $[106] !== style || $[107] !== t31 || $[108] !== t32) {
443
- t33 = /* @__PURE__ */ jsxs(View, {
458
+ $[117] = description;
459
+ $[118] = id;
460
+ $[119] = shownError;
461
+ $[120] = t30;
462
+ } else t30 = $[120];
463
+ let t31;
464
+ if ($[121] !== ref || $[122] !== style || $[123] !== t29 || $[124] !== t30) {
465
+ t31 = /* @__PURE__ */ jsxs(View, {
444
466
  ref,
445
467
  style,
446
- children: [t31, t32]
468
+ children: [t29, t30]
447
469
  });
448
- $[105] = ref;
449
- $[106] = style;
450
- $[107] = t31;
451
- $[108] = t32;
452
- $[109] = t33;
453
- } else t33 = $[109];
454
- return t33;
470
+ $[121] = ref;
471
+ $[122] = style;
472
+ $[123] = t29;
473
+ $[124] = t30;
474
+ $[125] = t31;
475
+ } else t31 = $[125];
476
+ return t31;
455
477
  }
456
478
  function outwardSlop(half, place) {
457
479
  const slop = hitSlop(half, STEPPER_WIDTH);