@maxio-com/react-ui-components 9.28.0 → 9.29.1

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.
@@ -42,6 +42,7 @@ Use this skill to build React components using `@maxio-com/react-ui-components`.
42
42
  - [Components / Forms / DateField](references/components-forms-datefield.md)
43
43
  - [Components / Forms / DatePicker](references/components-forms-datepicker.md)
44
44
  - [Components / Forms / DateRangePicker](references/components-forms-daterangepicker.md)
45
+ - [Components / Forms / NumberField](references/components-forms-numberfield.md)
45
46
  - [Components / Forms / Radio Group](references/components-forms-radio-group.md)
46
47
  - [Components / Forms / SearchField](references/components-forms-searchfield.md)
47
48
  - [Components / Forms / Select](references/components-forms-select.md)
@@ -0,0 +1,246 @@
1
+ # NumberField
2
+
3
+ ## Usage Guidelines
4
+
5
+ ### Overview
6
+
7
+ NumberField lets users enter or edit a numeric value in a form, with
8
+ optional stepper buttons to increment or decrement the value. The native
9
+ browser spin buttons are hidden in favor of the stepper, which is off by
10
+ default.
11
+
12
+ #### When to Use
13
+
14
+ - Use when users need to enter a numeric value, such as a quantity, limit, or count.
15
+ - Use the stepper (`showStepper`) when incrementing or decrementing by a fixed step is a common interaction.
16
+ - Use `minValue`, `maxValue`, and `step` to constrain the accepted values.
17
+ - Use with a leading element for a compact unit or currency symbol.
18
+
19
+ #### When Not to Use
20
+
21
+ - Do not use for free-form text. Use TextField instead.
22
+ - Do not use for values that are not truly numeric, such as phone numbers or postal codes. Use TextField with the appropriate `type`.
23
+ - Do not rely on the stepper as the only way to change the value; the input must remain directly editable.
24
+
25
+ ### Variants
26
+
27
+ | Variants | Purpose | Usage notes |
28
+ | :------- | :-------------------------------------------- | :--------------------------------------------------------- |
29
+ | `sm` | Compact field for dense interfaces. | Use where form density is high and labels remain readable. |
30
+ | `md` | Default field size. | Use for most forms. |
31
+ | `lg` | Larger field for prominent form rows. | Use sparingly when the field needs more visual emphasis. |
32
+ | `xl` | Field with integrated label and helper/error. | Use when the field needs a stronger contained treatment. |
33
+
34
+ ### Behavior
35
+
36
+ - **Mouse and touch**: Users can place the cursor in the field, select text, and use the stepper buttons when `showStepper` is enabled.
37
+ - **Keyboard**: Users tab to the input, type a numeric value, and use the up/down arrow keys to increment or decrement.
38
+ - **Native spin buttons**: The underlying input renders as `type="text"` with `inputmode="numeric"` (not `type="number"`), so there is no native browser spin button. Use `showStepper` to opt into the custom stepper instead.
39
+ - **Controlled state**: Use `value` and `onChange` when product state owns the value. Use `defaultValue` for simple uncontrolled form fields.
40
+ - **Change timing**: `onChange` fires with a `number` when the user finishes editing (on blur, increment, or decrement), not on every keystroke.
41
+ - **Validation**: Use `minValue`/`maxValue` for range constraints, and show `errorMessage` after users submit, blur the field, or otherwise finish interacting.
42
+
43
+ ### Accessibility
44
+
45
+ - Provide a visible `label` whenever possible. Use `aria-label` or `aria-labelledby` only when a visible label is not available.
46
+ - Use `description` for helper text and `errorMessage` for validation feedback.
47
+ - Pair invalid values with `isInvalid` and an actionable `errorMessage`.
48
+ - The stepper buttons have accessible names ("Increment"/"Decrement") by default; override them with `incrementAriaLabel`/`decrementAriaLabel` when more context is needed.
49
+ - Do not rely on color alone to communicate validation, disabled, or read-only state.
50
+
51
+ ### Content
52
+
53
+ - Write labels as short nouns, such as "Quantity" or "Collection limit".
54
+ - Use helper text for constraints that prevent errors, such as the accepted range.
55
+ - Write error messages that name the problem and recovery step, such as "Enter a number between 1 and 99."
56
+
57
+ ### Related
58
+
59
+ - **[TextField](components-forms-textfield.md)**: use for free-form text, including numeric-looking values that are not truly numbers (phone numbers, postal codes).
60
+ - **[TextInput](deprecated-textinput.md)**: deprecated predecessor. Use NumberField for new `type="number"` usage.
61
+ - **[Migrating from TextInput to TextField](migration-guides-v9.md)**: prop mapping and checklist for replacing legacy TextInput usage.
62
+
63
+ ## React
64
+
65
+ ```tsx
66
+ import { NumberField } from '@maxio-com/react-ui-components';
67
+ ```
68
+
69
+ ### State Management
70
+
71
+ Use controlled state when product logic needs to validate, transform, save,
72
+ or share the current value.
73
+
74
+ #### Controlled
75
+
76
+ ```tsx
77
+ const [value, setValue] = React.useState(1);
78
+
79
+ <NumberField label="Quantity" value={value} onChange={setValue} />;
80
+ ```
81
+
82
+ #### Uncontrolled
83
+
84
+ ```tsx
85
+ <NumberField label="Quantity" defaultValue={1} />
86
+ ```
87
+
88
+ ### Stepper
89
+
90
+ Enable `showStepper` to render increment and decrement buttons. Use
91
+ `minValue`, `maxValue`, and `step` to constrain the value.
92
+
93
+ ```tsx
94
+ <NumberField
95
+ label="Cookies to buy"
96
+ defaultValue={1}
97
+ minValue={0}
98
+ maxValue={99}
99
+ showStepper
100
+ />
101
+ ```
102
+
103
+ ## Imports
104
+
105
+ ```tsx
106
+ import { Body, Grid, Icon, NumberField } from "@maxio-com/react-ui-components";
107
+ ```
108
+
109
+ ## Prop Types
110
+
111
+ ### NumberField
112
+
113
+ | Prop | Type | Required | Default | Description | Source |
114
+ | --- | --- | --- | --- | --- | --- |
115
+ | `className` | `string` | no | - | Additional class name for the number field container | NumberFieldProps |
116
+ | `description` | `string` | no | - | Description for the number field. It will not be visible if there is an error message. | NumberFieldProps |
117
+ | `errorMessage` | `string` | no | - | Error message for the number field | NumberFieldProps |
118
+ | `fullWidth` | `boolean` | no | - | Ensures the input spans the full width of its parent | NumberFieldProps |
119
+ | `label` | `string` | no | - | Label for the number field | NumberFieldProps |
120
+ | `leadingElement` | `ReactNode` | no | `null` | Leading element for the number field | NumberFieldProps |
121
+ | `placeholder` | `string` | no | - | Temporary text that occupies the number field when it is empty. | NumberFieldProps |
122
+ | `showStepper` | `boolean` | no | `false` | Shows increment and decrement stepper buttons | NumberFieldProps |
123
+ | `size` | `"sm" \| "md" \| "lg" \| "xl"` | no | `md` | Size of the number field | NumberFieldProps |
124
+ | `trailingElement` | `ReactNode` | no | `null` | Trailing element for the number field. Rendered alongside the stepper when `showStepper` is enabled. | NumberFieldProps |
125
+
126
+ ## Stories
127
+
128
+ ### Default
129
+
130
+ Provide a visible label and use placeholder text only as an example of the
131
+ expected value. Use controlled state when product logic needs to validate,
132
+ transform, save, or share the current value; use defaultValue when the
133
+ field can be read from a form submit or ref.
134
+
135
+ ```tsx
136
+ const Default = () => <NumberField label="Quantity" placeholder="0" onChange={action('onChange')} />;
137
+ ```
138
+
139
+ ### Stepper
140
+
141
+ Use the stepper when incrementing or decrementing by a fixed step is a
142
+ common interaction, such as adjusting a quantity.
143
+
144
+ ```tsx
145
+ const Stepper = () => <NumberField
146
+ label="Cookies to buy"
147
+ defaultValue={1}
148
+ minValue={0}
149
+ maxValue={99}
150
+ showStepper
151
+ onChange={action('onChange')} />;
152
+ ```
153
+
154
+ ### With Description
155
+
156
+ Use description text for helper content that users need before typing,
157
+ such as expected format or constraint.
158
+
159
+ ```tsx
160
+ const WithDescription = () => <NumberField
161
+ label="Number of days in advance"
162
+ description="Proforma invoices are generated this many days before the due date."
163
+ onChange={action('onChange')} />;
164
+ ```
165
+
166
+ ### With Leading Element
167
+
168
+ Use a leading element for compact units or currency symbols.
169
+
170
+ ```tsx
171
+ const WithLeadingElement = () => <NumberField
172
+ label="Credit card collection limit"
173
+ placeholder="No limit"
174
+ onChange={action('onChange')}
175
+ leadingElement={<Icon variant="credit-card" />}
176
+ formatOptions={{
177
+ style: 'currency',
178
+ currency: 'GBP',
179
+ }} />;
180
+ ```
181
+
182
+ ### With Trailing Element
183
+
184
+ Use a trailing element for compact units or currency symbols.
185
+
186
+ ```tsx
187
+ const WithTrailingElement = () => <NumberField
188
+ label="Price"
189
+ placeholder="0.00"
190
+ onChange={action('onChange')}
191
+ trailingElement={<Body size="xs">per unit</Body>} />;
192
+ ```
193
+
194
+ ### Validation
195
+
196
+ Use errorMessage with isInvalid so assistive technology receives invalid
197
+ state and users get actionable validation feedback.
198
+
199
+ ```tsx
200
+ const Validation = () => <NumberField
201
+ label="Proforma invoice start number"
202
+ isInvalid
203
+ errorMessage="Must be at least 1."
204
+ onChange={action('onChange')} />;
205
+ ```
206
+
207
+ ### Disabled
208
+
209
+ Use disabled fields when the value is unavailable and users cannot act on
210
+ it in the current context.
211
+
212
+ ```tsx
213
+ const Disabled = () => <NumberField label="Quantity" isDisabled />;
214
+ ```
215
+
216
+ ### Read Only
217
+
218
+ Use read-only fields when the value should remain selectable and readable
219
+ but cannot be edited.
220
+
221
+ ```tsx
222
+ const ReadOnly = () => <NumberField label="Account ID" value={12345} isReadOnly />;
223
+ ```
224
+
225
+ ### Sizes
226
+
227
+ Use size to match the density and prominence of the surrounding form.
228
+
229
+ ```tsx
230
+ const Sizes = (args) => (
231
+ <Grid gap={4}>
232
+ {(['sm', 'md', 'lg', 'xl'] as const).map((size) => (
233
+ <NumberField key={size} {...args} size={size} />
234
+ ))}
235
+ </Grid>
236
+ );
237
+ ```
238
+
239
+ ### Full Width
240
+
241
+ Use fullWidth in stacked forms and responsive layouts where the field
242
+ should fill the available parent width.
243
+
244
+ ```tsx
245
+ const FullWidth = () => <NumberField label="Quantity" placeholder="0" fullWidth onChange={action('onChange')} />;
246
+ ```
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { NumberFieldProps } from './types';
3
+ declare const NumberField: React.ForwardRefExoticComponent<NumberFieldProps & React.RefAttributes<HTMLInputElement>>;
4
+ export default NumberField;
5
+ //# sourceMappingURL=NumberField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/forms/NumberField/NumberField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAY1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,QAAA,MAAM,WAAW,2FA2GhB,CAAC;AAIF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default } from './NumberField';
2
+ export type { NumberFieldProps } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/forms/NumberField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { NumberFieldProps as AriaNumberFieldProps } from 'react-aria-components';
3
+ export interface NumberFieldProps extends Omit<AriaNumberFieldProps, 'children' | 'className'> {
4
+ label?: string;
5
+ size?: 'sm' | 'md' | 'lg' | 'xl';
6
+ fullWidth?: boolean;
7
+ description?: string;
8
+ errorMessage?: string;
9
+ leadingElement?: ReactNode;
10
+ trailingElement?: ReactNode;
11
+ showStepper?: boolean;
12
+ className?: string;
13
+ placeholder?: string;
14
+ }
15
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/forms/NumberField/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAEtF,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC5C,oBAAoB,EACpB,UAAU,GAAG,WAAW,CACzB;IAIC,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAIjC,SAAS,CAAC,EAAE,OAAO,CAAC;IAIpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,YAAY,CAAC,EAAE,MAAM,CAAC;IAItB,cAAc,CAAC,EAAE,SAAS,CAAC;IAI3B,eAAe,CAAC,EAAE,SAAS,CAAC;IAI5B,WAAW,CAAC,EAAE,OAAO,CAAC;IAItB,SAAS,CAAC,EAAE,MAAM,CAAC;IAInB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -6,6 +6,8 @@ export { default as SearchField } from './SearchField';
6
6
  export type { SearchFieldProps } from './SearchField';
7
7
  export { default as TextField } from './TextField';
8
8
  export type { TextFieldProps } from './TextField';
9
+ export { default as NumberField } from './NumberField';
10
+ export type { NumberFieldProps } from './NumberField';
9
11
  export { default as TextArea } from './TextArea';
10
12
  export type { TextAreaProps } from './TextArea';
11
13
  export { default as TextInput } from './TextInput';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE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ACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -29,17 +29,17 @@ import Tooltip from './Tooltip';
29
29
  import TooltipTrigger from './TooltipTrigger';
30
30
  import TopBar from './TopBar';
31
31
  import { Body, Code, Display, Heading, Label } from './Typography';
32
- import { Checkbox, CheckboxGroup, ComboBox, FormErrorMessage, FormHelperText, Radio, RadioGroup, SearchField, Select, TextArea, TextField, TextInput } from './forms';
32
+ import { Checkbox, CheckboxGroup, ComboBox, FormErrorMessage, FormHelperText, NumberField, Radio, RadioGroup, SearchField, Select, TextArea, TextField, TextInput } from './forms';
33
33
  import { Chip } from './Chip';
34
34
  import { Flex } from './Flex';
35
35
  import { Grid } from './Grid';
36
36
  import { ListBox } from './ListBox';
37
- export { ActionList, Drawer, Alert, Avatar, Banner, Body, Card, Breadcrumbs, BreadcrumbsItem, Button, Checkbox, CheckboxGroup, Code, ComboBox, CopyToClipboard, createColumnHelper, DataTable, Display, EmptyState, FormErrorMessage, FormHelperText, Heading, Icon, IconButton, Label, Link, LoadingSpinner, Logo, Menu, MenuButton, MenuList, OverlayTrigger, Pagination, Popover, DialogTrigger, Pressable, ProgressBar, Radio, RadioGroup, SearchField, Select, SegmentedControl, SideNav, Tab, TabList, TabPanel, TabPanels, Tabs, Tag, TextArea, TextField, TextInput, Tile, ToastProvider, GlobalToastProvider, useToast, ToastQueue, Toggle, Tooltip, TooltipTrigger, TopBar, Chip, Flex, Grid, ListBox, };
37
+ export { ActionList, Drawer, Alert, Avatar, Banner, Body, Card, Breadcrumbs, BreadcrumbsItem, Button, Checkbox, CheckboxGroup, Code, ComboBox, CopyToClipboard, createColumnHelper, DataTable, Display, EmptyState, FormErrorMessage, FormHelperText, Heading, Icon, IconButton, Label, Link, LoadingSpinner, Logo, Menu, MenuButton, MenuList, NumberField, OverlayTrigger, Pagination, Popover, DialogTrigger, Pressable, ProgressBar, Radio, RadioGroup, SearchField, Select, SegmentedControl, SideNav, Tab, TabList, TabPanel, TabPanels, Tabs, Tag, TextArea, TextField, TextInput, Tile, ToastProvider, GlobalToastProvider, useToast, ToastQueue, Toggle, Tooltip, TooltipTrigger, TopBar, Chip, Flex, Grid, ListBox, };
38
38
  export type { PopoverProps } from './Popover/types';
39
39
  export type { DrawerProps } from './Drawer/types';
40
40
  export type { CopyToClipboardProps, CopyToClipboardSize, CopyToClipboardVariant, } from './CopyToClipboard';
41
41
  export type { EmptyStateHeadingLevel, EmptyStateProps } from './EmptyState';
42
- export type { ComboBoxProps, SearchFieldProps, TextAreaProps, TextFieldProps, TextInputProps, } from './forms';
42
+ export type { ComboBoxProps, NumberFieldProps, SearchFieldProps, TextAreaProps, TextFieldProps, TextInputProps, } from './forms';
43
43
  export type { SegmentedControlItemProps, SegmentedControlProps, SegmentedControlSize, } from './SegmentedControl';
44
44
  export { Calendar } from './Calendar';
45
45
  export type { CalendarProps } from './Calendar';
@@ -50,5 +50,5 @@ export type { DateFieldProps } from './forms/DateField';
50
50
  export { DatePicker } from './forms/DatePicker';
51
51
  export type { DatePickerProps, DatePreset } from './forms/DatePicker';
52
52
  export { DateRangePicker } from './forms/DateRangePicker';
53
- export type { DateRangePickerProps, DateRangePreset } from './forms/DateRangePicker';
53
+ export type { DateRangePickerProps, DateRangePreset, } from './forms/DateRangePicker';
54
54
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,E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M,yBAAyB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxio-com/react-ui-components",
3
- "version": "9.28.0",
3
+ "version": "9.29.1",
4
4
  "description": "React UI components",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "78ffb230f55e600753d1946c32bd3f53e671ad57"
68
+ "gitHead": "63a6ace5e417f504624acbc15914b9359088bf24"
69
69
  }
@@ -1,7 +1,7 @@
1
1
  import React$1, { ReactNode, HTMLAttributes, LiHTMLAttributes, ButtonHTMLAttributes, AnchorHTMLAttributes, RefObject, FC, ElementType, InputHTMLAttributes } from 'react';
2
2
  import { RowData, Row, Table, ExpandedState, RowSelectionState, SortingState, TableOptions } from '@tanstack/react-table';
3
3
  export { createColumnHelper } from '@tanstack/react-table';
4
- import { PopoverProps as PopoverProps$1, ToggleButtonGroupProps, ToggleButtonProps, ListBoxProps as ListBoxProps$1, ListBoxLoadMoreItemProps, ListBoxItemProps as ListBoxItemProps$1, ListBoxSectionProps as ListBoxSectionProps$1, HeaderProps, ComboBoxProps as ComboBoxProps$1, ValidationResult, SearchFieldProps as SearchFieldProps$1, TextFieldProps as TextFieldProps$1, DateValue, DateFieldProps as DateFieldProps$1, DatePickerProps as DatePickerProps$1, DateRangePickerProps as DateRangePickerProps$1, CalendarProps as CalendarProps$1, RangeCalendarProps as RangeCalendarProps$1 } from 'react-aria-components';
4
+ import { PopoverProps as PopoverProps$1, ToggleButtonGroupProps, ToggleButtonProps, ListBoxProps as ListBoxProps$1, ListBoxLoadMoreItemProps, ListBoxItemProps as ListBoxItemProps$1, ListBoxSectionProps as ListBoxSectionProps$1, HeaderProps, ComboBoxProps as ComboBoxProps$1, ValidationResult, SearchFieldProps as SearchFieldProps$1, TextFieldProps as TextFieldProps$1, NumberFieldProps as NumberFieldProps$1, DateValue, DateFieldProps as DateFieldProps$1, DatePickerProps as DatePickerProps$1, DateRangePickerProps as DateRangePickerProps$1, CalendarProps as CalendarProps$1, RangeCalendarProps as RangeCalendarProps$1 } from 'react-aria-components';
5
5
  export { DialogTrigger, Pressable } from 'react-aria-components';
6
6
  import * as _floating_ui_react_dom_interactions from '@floating-ui/react-dom-interactions';
7
7
  import { MotionProps } from 'framer-motion';
@@ -797,6 +797,21 @@ interface TextFieldProps extends Omit<TextFieldProps$1, 'children' | 'className'
797
797
 
798
798
  declare const TextField: React$1.ForwardRefExoticComponent<TextFieldProps & React$1.RefAttributes<HTMLInputElement>>;
799
799
 
800
+ interface NumberFieldProps extends Omit<NumberFieldProps$1, 'children' | 'className'> {
801
+ label?: string;
802
+ size?: 'sm' | 'md' | 'lg' | 'xl';
803
+ fullWidth?: boolean;
804
+ description?: string;
805
+ errorMessage?: string;
806
+ leadingElement?: ReactNode;
807
+ trailingElement?: ReactNode;
808
+ showStepper?: boolean;
809
+ className?: string;
810
+ placeholder?: string;
811
+ }
812
+
813
+ declare const NumberField: React$1.ForwardRefExoticComponent<NumberFieldProps & React$1.RefAttributes<HTMLInputElement>>;
814
+
800
815
  interface TextAreaProps extends Omit<TextFieldProps$1, 'children' | 'className' | 'type'> {
801
816
  label?: string;
802
817
  size?: 'sm' | 'md' | 'lg' | 'xl';
@@ -979,5 +994,5 @@ type AuthLayoutProps = {
979
994
 
980
995
  declare const AuthLayout: ({ children, heading, description, sentiment, leadingElement, alert, topAddon, footer, }: AuthLayoutProps) => React$1.JSX.Element;
981
996
 
982
- export { ActionList, Alert, AuthLayout, Avatar, Banner, Body, Breadcrumbs, BreadcrumbsItem, Button, Calendar, Card, Checkbox, CheckboxGroup, Chip, Code, ComboBox, CopyToClipboard, DataTable, DateField, DatePicker, DateRangePicker, Display, Drawer, EmptyState, Flex, FormErrorMessage, FormHelperText, GlobalToastProvider, Grid, Heading, Icon, IconButton, Label, Link, ListBox, LoadingSpinner, Logo, Menu, MenuButton, MenuList, OverlayTrigger, Pagination, Popover, ProgressBar, Radio, RadioGroup, RangeCalendar, SearchField, SegmentedControl, Select, SideNavWrapper as SideNav, Tab, TabList, TabPanel, TabPanels, Tabs, Tag, TextArea, TextField, TextInput, Tile, ToastProvider, ToastQueue, Toggle, Tooltip, TooltipTrigger, TopBar, useElementResizeObserver, useHover, useOverlayTrigger, useToast, useWindowSize };
983
- export type { CalendarProps, ComboBoxProps, CopyToClipboardProps, CopyToClipboardSize, CopyToClipboardVariant, DateFieldProps, DatePickerProps, DatePreset, DateRangePickerProps, DateRangePreset, DrawerProps, EmptyStateHeadingLevel, EmptyStateProps, Interactions, OverlayAriaRole, Placement, PopoverProps, RangeCalendarProps, SearchFieldProps, SegmentedControlItemProps, SegmentedControlProps, SegmentedControlSize, TextAreaProps, TextFieldProps, TextInputProps };
997
+ export { ActionList, Alert, AuthLayout, Avatar, Banner, Body, Breadcrumbs, BreadcrumbsItem, Button, Calendar, Card, Checkbox, CheckboxGroup, Chip, Code, ComboBox, CopyToClipboard, DataTable, DateField, DatePicker, DateRangePicker, Display, Drawer, EmptyState, Flex, FormErrorMessage, FormHelperText, GlobalToastProvider, Grid, Heading, Icon, IconButton, Label, Link, ListBox, LoadingSpinner, Logo, Menu, MenuButton, MenuList, NumberField, OverlayTrigger, Pagination, Popover, ProgressBar, Radio, RadioGroup, RangeCalendar, SearchField, SegmentedControl, Select, SideNavWrapper as SideNav, Tab, TabList, TabPanel, TabPanels, Tabs, Tag, TextArea, TextField, TextInput, Tile, ToastProvider, ToastQueue, Toggle, Tooltip, TooltipTrigger, TopBar, useElementResizeObserver, useHover, useOverlayTrigger, useToast, useWindowSize };
998
+ export type { CalendarProps, ComboBoxProps, CopyToClipboardProps, CopyToClipboardSize, CopyToClipboardVariant, DateFieldProps, DatePickerProps, DatePreset, DateRangePickerProps, DateRangePreset, DrawerProps, EmptyStateHeadingLevel, EmptyStateProps, Interactions, NumberFieldProps, OverlayAriaRole, Placement, PopoverProps, RangeCalendarProps, SearchFieldProps, SegmentedControlItemProps, SegmentedControlProps, SegmentedControlSize, TextAreaProps, TextFieldProps, TextInputProps };