@dragunio/fe-libs 0.1.5 → 0.1.7

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 CHANGED
@@ -19,7 +19,8 @@ packages/ # Internal component source folders
19
19
  ├── skeleton/
20
20
  ├── modal/
21
21
  ├── progress/
22
- └── chip/
22
+ ├── chip/
23
+ └── avatar/
23
24
  apps/playground/ # Local component storybook
24
25
  ```
25
26
 
@@ -59,6 +60,7 @@ Available review routes:
59
60
  - `http://127.0.0.1:3000/#/modal` — Modal
60
61
  - `http://127.0.0.1:3000/#/progress` — ProgressBar
61
62
  - `http://127.0.0.1:3000/#/chip` — Chip
63
+ - `http://127.0.0.1:3000/#/avatar` — Avatar
62
64
  - `http://127.0.0.1:3000/#/text-input` — TextInput & TextArea
63
65
  - `http://127.0.0.1:3000/#/pagination` — Pagination
64
66
  - `http://127.0.0.1:3000/#/message` — Message
@@ -88,6 +90,9 @@ import {
88
90
  PlusIcon,
89
91
  Table,
90
92
  Toggle,
93
+ Checkbox,
94
+ RadioButton,
95
+ RadioGroup,
91
96
  Selection,
92
97
  DateTimePicker,
93
98
  } from '@dragunio/fe-libs';
@@ -96,7 +101,7 @@ import '@dragunio/fe-libs/styles.css';
96
101
 
97
102
  ### Toggle
98
103
 
99
- `Toggle` is a native checkbox styled as a switch. It supports controlled and uncontrolled usage, including the standard `onChange`, `onClick`, and `disabled` props. The active color is green by default and accepts any CSS color.
104
+ `Toggle` is a native checkbox styled as a switch. It supports controlled and uncontrolled usage, including the standard `onChange`, `onClick`, and `disabled` props. The active color is green by default and accepts any CSS color. Use `labelPosition="top"` to render its label above the switch; `right` is the default.
100
105
 
101
106
  ```tsx
102
107
  <Toggle
@@ -107,6 +112,28 @@ import '@dragunio/fe-libs/styles.css';
107
112
  />
108
113
  ```
109
114
 
115
+ ### Checkbox and radio controls
116
+
117
+ `Checkbox` and `RadioButton` keep native input behaviour while adding a styled control. They accept `label` and `labelPosition="top" | "right"` (`right` by default).
118
+
119
+ `RadioGroup` renders a named, accessible group from `options`. It is controlled with `value` or uncontrolled with `defaultValue`; `onChange` receives `(value, option, event)`. Its group label defaults to `top` and can also use `labelPosition="right"`.
120
+
121
+ ```tsx
122
+ <Checkbox label="Send me product updates" defaultChecked />
123
+
124
+ <RadioButton name="delivery" value="standard" label="Standard delivery" />
125
+
126
+ <RadioGroup
127
+ label="Notification frequency"
128
+ value={frequency}
129
+ onChange={(value) => setFrequency(value)}
130
+ options={[
131
+ { label: 'Daily', value: 'daily' },
132
+ { label: 'Weekly', value: 'weekly' },
133
+ ]}
134
+ />
135
+ ```
136
+
110
137
  ### Resizable data table
111
138
 
112
139
  Pass `headers` and `data` to have `Table` derive the maximum column count and an initial width for each column. The resize callback emits pixel widths, ready to persist in user preferences.
@@ -138,14 +165,15 @@ The library exposes ESM, CommonJS, TypeScript declarations, and keeps React as a
138
165
  - `Drawer` is a portal-based modal panel with `left`, `right`, `top`, and `bottom` slide-in animations. Use `fullScreen` for a full-viewport panel and `footer` for fixed actions below the scrollable body.
139
166
  - `Selection` is a rounded custom dropdown inspired by DropdownCustom, with single/multiple modes, optional search, clear action, tags, form-field values, and keyboard navigation.
140
167
  - `DateTimePicker` supports `mode="single"` and `mode="range"`; its default format is `dd/MM/yyyy HH:mm`.
141
- - `NumberInput` and `CurrencyInput` format values immediately while typing (`1000` → `1,000`) and keep up to two fractional digits by default. Use `allowDecimal`, `decimals`, `min`, and `max` to control decimal input and numeric limits. Both support `error` and `errorMessage` with the same red border/message treatment as `TextInput`. `CurrencyInput` adds a `VND` suffix by default, or a currency dropdown through `currencies`.
168
+ - `NumberInput` and `CurrencyInput` format values immediately while typing (`1000` → `1,000`) and keep up to two fractional digits by default. Both include accessible up/down controls (and arrow-key support); use `step` or `showStepper` to configure them. `NumberInput` also accepts `prefix`/`suffix` adornments. Use `allowDecimal`, `decimals`, `min`, and `max` to control decimal input and numeric limits. Both support `error` and `errorMessage` with the same red border/message treatment as `TextInput`. `CurrencyInput` adds a `VND` suffix by default, or a currency dropdown through `currencies`.
142
169
  - `Tooltip` shows accessible content on hover and focus.
143
170
  - `ExpandableSection` provides controlled and uncontrolled expand/collapse behavior.
144
- - `TextInput` and `TextArea` support `error`/`errorMessage`, `helperText`, `clearable`, `onClear`, and `onValueChange`. `TextInput` also accepts `label`, `isRequired`, and `prefix`/`suffix` adornments. Passing a string to `error` shows it below the field and applies the error border.
171
+ - `TextInput` and `TextArea` support `error`/`errorMessage`, `helperText`, `clearable`, `onClear`, and `onValueChange`. `TextArea` also accepts `autosize` (default `false`) to grow with its content. `TextInput` also accepts `label`, `isRequired`, and `prefix`/`suffix` adornments. Passing a string to `error` shows it below the field and applies the error border.
145
172
  - `Modal` is a centered portal dialog in `small`, `medium`, `large`, `xlarge`, and `full` sizes. Its close control and `actions` are library `Button` instances.
146
173
  - `Loading` provides `small`, `medium`, and `large` circular indicators (or a custom pixel `size`); use `Skeleton.Circle` and `Skeleton.Square` with `size`, or `Skeleton.Box` and `Skeleton.Line` with `width` and `height`.
147
174
  - `ProgressBar` is determinate when `value` is supplied and renders an indeterminate back-and-forth animation when it is omitted.
148
175
  - `Chip` supports the standard `default`, `success`, `error`, `info`, and `warning` palettes, plus `color` for any CSS color and `subtle`, `solid`, or `outline` variants.
176
+ - `Avatar` prioritises `src`, then derives initials from the final two words of `content` (`Nguyễn Minh Anh` → `MA`), and otherwise shows one of 32 built-in illustrated fallbacks. `AvatarGroup` overlaps its Avatar children and turns the final displayed item into `+n` when `maxCount` is exceeded; a single Avatar with `content` shows its content beside the Avatar.
149
177
  - `Pagination` supports controlled (`page`) and uncontrolled (`defaultPage`) navigation, compact ellipses, and accessible previous/next controls.
150
178
  - Mount `Message` once near the app root and trigger top-right alert notifications with `Message.success`, `Message.info`, `Message.warning`, or `Message.error`. `Snackbar` is a controlled temporary notification with actions, auto-hide, and configurable placement.
151
179
 
@@ -165,4 +193,11 @@ The library exposes ESM, CommonJS, TypeScript declarations, and keeps React as a
165
193
  <ProgressBar label="Upload" value={72} />
166
194
  <ProgressBar label="Synchronising" />
167
195
  <Chip status="success" dot>Complete</Chip>
196
+ <Avatar content="Nguyễn Minh Anh" size={48} />
197
+ <AvatarGroup maxCount={3}>
198
+ <Avatar content="Nguyễn Minh Anh" />
199
+ <Avatar content="Lê Hoàng Nam" />
200
+ <Avatar content="Trần Thu Hà" />
201
+ <Avatar content="Phạm Quốc Bảo" />
202
+ </AvatarGroup>
168
203
  ```
@@ -118,6 +118,18 @@ function ChevronDownIcon(props) {
118
118
  }
119
119
  ) });
120
120
  }
121
+ function ChevronUpIcon(props) {
122
+ return /* @__PURE__ */ jsx4("svg", { ...iconProps4(props), children: /* @__PURE__ */ jsx4(
123
+ "path",
124
+ {
125
+ d: "m6 15 6-6 6 6",
126
+ stroke: "currentColor",
127
+ strokeWidth: "2",
128
+ strokeLinecap: "round",
129
+ strokeLinejoin: "round"
130
+ }
131
+ ) });
132
+ }
121
133
  function CloseIcon(props) {
122
134
  return /* @__PURE__ */ jsx4("svg", { ...iconProps4(props), children: /* @__PURE__ */ jsx4(
123
135
  "path",
@@ -129,6 +141,20 @@ function CloseIcon(props) {
129
141
  }
130
142
  ) });
131
143
  }
144
+ function MoreHorizontalIcon(props) {
145
+ return /* @__PURE__ */ jsxs("svg", { ...iconProps4(props), children: [
146
+ /* @__PURE__ */ jsx4("circle", { cx: "5", cy: "12", r: "1.75", fill: "currentColor" }),
147
+ /* @__PURE__ */ jsx4("circle", { cx: "12", cy: "12", r: "1.75", fill: "currentColor" }),
148
+ /* @__PURE__ */ jsx4("circle", { cx: "19", cy: "12", r: "1.75", fill: "currentColor" })
149
+ ] });
150
+ }
151
+ function MoreVerticalIcon(props) {
152
+ return /* @__PURE__ */ jsxs("svg", { ...iconProps4(props), children: [
153
+ /* @__PURE__ */ jsx4("circle", { cx: "12", cy: "5", r: "1.75", fill: "currentColor" }),
154
+ /* @__PURE__ */ jsx4("circle", { cx: "12", cy: "12", r: "1.75", fill: "currentColor" }),
155
+ /* @__PURE__ */ jsx4("circle", { cx: "12", cy: "19", r: "1.75", fill: "currentColor" })
156
+ ] });
157
+ }
132
158
  function SearchIcon(props) {
133
159
  return /* @__PURE__ */ jsxs("svg", { ...iconProps4(props), children: [
134
160
  /* @__PURE__ */ jsx4("circle", { cx: "11", cy: "11", r: "6.5", stroke: "currentColor", strokeWidth: "2" }),
@@ -164,6 +190,9 @@ export {
164
190
  lock_unlocked,
165
191
  PlusIcon,
166
192
  ChevronDownIcon,
193
+ ChevronUpIcon,
167
194
  CloseIcon,
195
+ MoreHorizontalIcon,
196
+ MoreVerticalIcon,
168
197
  SearchIcon
169
198
  };
package/dist/icons.d.mts CHANGED
@@ -26,7 +26,10 @@ type IconProps = SVGProps<SVGSVGElement> & {
26
26
  };
27
27
  declare function PlusIcon(props: IconProps): react.JSX.Element;
28
28
  declare function ChevronDownIcon(props: IconProps): react.JSX.Element;
29
+ declare function ChevronUpIcon(props: IconProps): react.JSX.Element;
29
30
  declare function CloseIcon(props: IconProps): react.JSX.Element;
31
+ declare function MoreHorizontalIcon(props: IconProps): react.JSX.Element;
32
+ declare function MoreVerticalIcon(props: IconProps): react.JSX.Element;
30
33
  declare function SearchIcon(props: IconProps): react.JSX.Element;
31
34
 
32
- export { ChevronDownIcon, CloseIcon, type IconProps, PlusIcon, SearchIcon, arrow_left, check_square_fill, chevron_down, chevron_left, chevron_right, chevron_up, copy, key, lock, lock_unlocked, log_out, minus_square, plus, plus_square, search, trash, x_close };
35
+ export { ChevronDownIcon, ChevronUpIcon, CloseIcon, type IconProps, MoreHorizontalIcon, MoreVerticalIcon, PlusIcon, SearchIcon, arrow_left, check_square_fill, chevron_down, chevron_left, chevron_right, chevron_up, copy, key, lock, lock_unlocked, log_out, minus_square, plus, plus_square, search, trash, x_close };
package/dist/icons.d.ts CHANGED
@@ -26,7 +26,10 @@ type IconProps = SVGProps<SVGSVGElement> & {
26
26
  };
27
27
  declare function PlusIcon(props: IconProps): react.JSX.Element;
28
28
  declare function ChevronDownIcon(props: IconProps): react.JSX.Element;
29
+ declare function ChevronUpIcon(props: IconProps): react.JSX.Element;
29
30
  declare function CloseIcon(props: IconProps): react.JSX.Element;
31
+ declare function MoreHorizontalIcon(props: IconProps): react.JSX.Element;
32
+ declare function MoreVerticalIcon(props: IconProps): react.JSX.Element;
30
33
  declare function SearchIcon(props: IconProps): react.JSX.Element;
31
34
 
32
- export { ChevronDownIcon, CloseIcon, type IconProps, PlusIcon, SearchIcon, arrow_left, check_square_fill, chevron_down, chevron_left, chevron_right, chevron_up, copy, key, lock, lock_unlocked, log_out, minus_square, plus, plus_square, search, trash, x_close };
35
+ export { ChevronDownIcon, ChevronUpIcon, CloseIcon, type IconProps, MoreHorizontalIcon, MoreVerticalIcon, PlusIcon, SearchIcon, arrow_left, check_square_fill, chevron_down, chevron_left, chevron_right, chevron_up, copy, key, lock, lock_unlocked, log_out, minus_square, plus, plus_square, search, trash, x_close };
package/dist/icons.js CHANGED
@@ -21,7 +21,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var icons_exports = {};
22
22
  __export(icons_exports, {
23
23
  ChevronDownIcon: () => ChevronDownIcon,
24
+ ChevronUpIcon: () => ChevronUpIcon,
24
25
  CloseIcon: () => CloseIcon,
26
+ MoreHorizontalIcon: () => MoreHorizontalIcon,
27
+ MoreVerticalIcon: () => MoreVerticalIcon,
25
28
  PlusIcon: () => PlusIcon,
26
29
  SearchIcon: () => SearchIcon,
27
30
  arrow_left: () => arrow_left,
@@ -164,6 +167,18 @@ function ChevronDownIcon(props) {
164
167
  }
165
168
  ) });
166
169
  }
170
+ function ChevronUpIcon(props) {
171
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...iconProps4(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
172
+ "path",
173
+ {
174
+ d: "m6 15 6-6 6 6",
175
+ stroke: "currentColor",
176
+ strokeWidth: "2",
177
+ strokeLinecap: "round",
178
+ strokeLinejoin: "round"
179
+ }
180
+ ) });
181
+ }
167
182
  function CloseIcon(props) {
168
183
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { ...iconProps4(props), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
169
184
  "path",
@@ -175,6 +190,20 @@ function CloseIcon(props) {
175
190
  }
176
191
  ) });
177
192
  }
193
+ function MoreHorizontalIcon(props) {
194
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { ...iconProps4(props), children: [
195
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "5", cy: "12", r: "1.75", fill: "currentColor" }),
196
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "12", r: "1.75", fill: "currentColor" }),
197
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "19", cy: "12", r: "1.75", fill: "currentColor" })
198
+ ] });
199
+ }
200
+ function MoreVerticalIcon(props) {
201
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { ...iconProps4(props), children: [
202
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "5", r: "1.75", fill: "currentColor" }),
203
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "12", r: "1.75", fill: "currentColor" }),
204
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "19", r: "1.75", fill: "currentColor" })
205
+ ] });
206
+ }
178
207
  function SearchIcon(props) {
179
208
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { ...iconProps4(props), children: [
180
209
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "11", cy: "11", r: "6.5", stroke: "currentColor", strokeWidth: "2" }),
@@ -192,7 +221,10 @@ function SearchIcon(props) {
192
221
  // Annotate the CommonJS export names for ESM import in node:
193
222
  0 && (module.exports = {
194
223
  ChevronDownIcon,
224
+ ChevronUpIcon,
195
225
  CloseIcon,
226
+ MoreHorizontalIcon,
227
+ MoreVerticalIcon,
196
228
  PlusIcon,
197
229
  SearchIcon,
198
230
  arrow_left,
package/dist/icons.mjs CHANGED
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  ChevronDownIcon,
3
+ ChevronUpIcon,
3
4
  CloseIcon,
5
+ MoreHorizontalIcon,
6
+ MoreVerticalIcon,
4
7
  PlusIcon,
5
8
  SearchIcon,
6
9
  arrow_left,
@@ -20,10 +23,13 @@ import {
20
23
  search,
21
24
  trash,
22
25
  x_close
23
- } from "./chunk-3TCR34LS.mjs";
26
+ } from "./chunk-GT4546FD.mjs";
24
27
  export {
25
28
  ChevronDownIcon,
29
+ ChevronUpIcon,
26
30
  CloseIcon,
31
+ MoreHorizontalIcon,
32
+ MoreVerticalIcon,
27
33
  PlusIcon,
28
34
  SearchIcon,
29
35
  arrow_left,
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { ButtonHTMLAttributes, ReactNode, TableHTMLAttributes, HTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, KeyboardEventHandler, ReactElement } from 'react';
3
- export { ChevronDownIcon, CloseIcon, IconProps, PlusIcon, SearchIcon, arrow_left, check_square_fill, chevron_down, chevron_left, chevron_right, chevron_up, copy, key, lock, lock_unlocked, log_out, minus_square, plus, plus_square, search, trash, x_close } from './icons.mjs';
2
+ import { ButtonHTMLAttributes, ReactNode, HTMLAttributes, TableHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, KeyboardEventHandler, ChangeEvent, ReactElement } from 'react';
3
+ export { ChevronDownIcon, ChevronUpIcon, CloseIcon, IconProps, MoreHorizontalIcon, MoreVerticalIcon, PlusIcon, SearchIcon, arrow_left, check_square_fill, chevron_down, chevron_left, chevron_right, chevron_up, copy, key, lock, lock_unlocked, log_out, minus_square, plus, plus_square, search, trash, x_close } from './icons.mjs';
4
4
 
5
5
  type ButtonHierarchy = 'primary' | 'secondary-gray' | 'secondary-color' | 'tertiary-gray' | 'tertiary-color';
6
6
  type ButtonSize = '24' | '32' | '40';
@@ -44,6 +44,22 @@ declare const Button: react.ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<
44
44
  variant?: ButtonVariant;
45
45
  } & react.RefAttributes<HTMLButtonElement>>;
46
46
 
47
+ /** A Button action with a stable identifier for use in ButtonBar. */
48
+ type ButtonBarAction = ButtonProps & {
49
+ id: string;
50
+ };
51
+ type ButtonBarProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
52
+ /** Actions render in this order, both in the bar and the More menu. */
53
+ actions: ButtonBarAction[];
54
+ /** Number of actions to keep visible before overflowing the remainder. */
55
+ maxVisible?: number;
56
+ /** Overrides for the icon-only More trigger. */
57
+ moreButtonProps?: ButtonProps;
58
+ /** Accessible label for the More trigger and its action list. */
59
+ moreLabel?: string;
60
+ };
61
+ declare function ButtonBar({ actions, maxVisible, moreButtonProps, moreLabel, className, ...props }: ButtonBarProps): react.JSX.Element;
62
+
47
63
  type TableData = readonly (readonly ReactNode[])[];
48
64
  type ColumnResizeHandler = (columnSizes: number[], columnIndex: number) => void;
49
65
  type TablePaginationPosition = 'top-right' | 'bottom-right' | 'bottom-center' | 'middle-bottom';
@@ -92,12 +108,16 @@ type ToggleProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'color' | 'type'>
92
108
  color?: string;
93
109
  /** Optional text displayed next to the switch. */
94
110
  label?: ReactNode;
111
+ /** Places the label above or to the right of the switch. Defaults to `right`. */
112
+ labelPosition?: 'top' | 'right';
95
113
  };
96
114
  declare const Toggle: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "color" | "type"> & {
97
115
  /** Active track color. Accepts any valid CSS color, for example `#16a34a`. */
98
116
  color?: string;
99
117
  /** Optional text displayed next to the switch. */
100
118
  label?: ReactNode;
119
+ /** Places the label above or to the right of the switch. Defaults to `right`. */
120
+ labelPosition?: "top" | "right";
101
121
  } & react.RefAttributes<HTMLInputElement>>;
102
122
 
103
123
  type DrawerProps = Omit<HTMLAttributes<HTMLElement>, 'title'> & {
@@ -175,11 +195,14 @@ declare const TextArea: react.ForwardRefExoticComponent<Omit<react.TextareaHTMLA
175
195
  onValueChange?: (value: string) => void;
176
196
  clearLabel?: string;
177
197
  } & {
198
+ autosize?: boolean;
178
199
  value?: string;
179
200
  defaultValue?: string;
180
201
  } & react.RefAttributes<HTMLTextAreaElement>>;
181
202
 
182
203
  type TextAreaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'defaultValue'> & TextFieldBaseProps & {
204
+ /** Expands the textarea to fit its content. */
205
+ autosize?: boolean;
183
206
  value?: string;
184
207
  defaultValue?: string;
185
208
  };
@@ -241,7 +264,7 @@ declare const Selection: react.ForwardRefExoticComponent<Omit<react.HTMLAttribut
241
264
 
242
265
  declare function formatNumber(value: number, decimals?: number, thousandSeparator?: string, decimalSeparator?: string): string;
243
266
  /** A text input that displays numbers as 1,000.05 by default. */
244
- declare const NumberInput: react.ForwardRefExoticComponent<Omit<react.InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "max" | "min"> & {
267
+ declare const NumberInput: react.ForwardRefExoticComponent<Omit<react.InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "step" | "max" | "min"> & {
245
268
  value?: number | null;
246
269
  defaultValue?: number | null;
247
270
  onValueChange?: (value: number | null) => void;
@@ -251,10 +274,18 @@ declare const NumberInput: react.ForwardRefExoticComponent<Omit<react.InputHTMLA
251
274
  max?: number;
252
275
  decimalSeparator?: string;
253
276
  thousandSeparator?: string;
277
+ prefix?: react.ReactNode;
278
+ suffix?: react.ReactNode;
279
+ Prefix?: react.ReactNode;
280
+ Suffix?: react.ReactNode;
254
281
  endAdornment?: react.ReactNode;
282
+ step?: number;
283
+ showStepper?: boolean;
284
+ incrementLabel?: string;
285
+ decrementLabel?: string;
255
286
  } & FieldBaseProps & react.RefAttributes<HTMLInputElement>>;
256
287
 
257
- type NumberInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'value' | 'defaultValue' | 'onChange' | 'min' | 'max'> & {
288
+ type NumberInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'value' | 'defaultValue' | 'onChange' | 'min' | 'max' | 'step'> & {
258
289
  value?: number | null;
259
290
  defaultValue?: number | null;
260
291
  onValueChange?: (value: number | null) => void;
@@ -267,8 +298,24 @@ type NumberInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'va
267
298
  max?: number;
268
299
  decimalSeparator?: string;
269
300
  thousandSeparator?: string;
301
+ /** Content rendered inside the control before the numeric value. */
302
+ prefix?: ReactNode;
303
+ /** Content rendered inside the control after the numeric value. */
304
+ suffix?: ReactNode;
305
+ /** Alias for prefix. */
306
+ Prefix?: ReactNode;
307
+ /** Alias for suffix. */
308
+ Suffix?: ReactNode;
270
309
  /** Content rendered inside the control after the numeric value. */
271
310
  endAdornment?: ReactNode;
311
+ /** Amount added or subtracted by the increment and decrement controls. Defaults to 1. */
312
+ step?: number;
313
+ /** Shows the increment and decrement controls. Defaults to true. */
314
+ showStepper?: boolean;
315
+ /** Accessible label for the increment control. */
316
+ incrementLabel?: string;
317
+ /** Accessible label for the decrement control. */
318
+ decrementLabel?: string;
272
319
  } & FieldBaseProps;
273
320
 
274
321
  type Currency = {
@@ -311,6 +358,68 @@ type DateTimePickerProps = DateTimePickerSingleProps | DateTimePickerRangeProps;
311
358
  /** Calendar and time picker. Supports a single Date or [start, end] range. */
312
359
  declare function DateTimePicker(props: DateTimePickerProps): react.JSX.Element;
313
360
 
361
+ type ControlLabelPosition = 'top' | 'right';
362
+ type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & {
363
+ /** Optional text associated with the checkbox. */
364
+ label?: ReactNode;
365
+ /** Places the label above or to the right of the checkbox. Defaults to `right`. */
366
+ labelPosition?: ControlLabelPosition;
367
+ };
368
+
369
+ /** A native checkbox with an accessible, custom visual control. */
370
+ declare const Checkbox: react.ForwardRefExoticComponent<Omit<react.InputHTMLAttributes<HTMLInputElement>, "type"> & {
371
+ label?: react.ReactNode;
372
+ labelPosition?: ControlLabelPosition;
373
+ } & react.RefAttributes<HTMLInputElement>>;
374
+
375
+ /** A native radio input with an accessible, custom visual control. */
376
+ declare const RadioButton: react.ForwardRefExoticComponent<Omit<react.InputHTMLAttributes<HTMLInputElement>, "type"> & {
377
+ label?: react.ReactNode;
378
+ labelPosition?: ControlLabelPosition;
379
+ } & react.RefAttributes<HTMLInputElement>>;
380
+
381
+ type RadioButtonProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & {
382
+ /** Optional text associated with the radio button. */
383
+ label?: ReactNode;
384
+ /** Places the label above or to the right of the radio button. Defaults to `right`. */
385
+ labelPosition?: ControlLabelPosition;
386
+ };
387
+
388
+ type RadioValue = string | number;
389
+ type RadioGroupOption = {
390
+ label: ReactNode;
391
+ value: RadioValue;
392
+ disabled?: boolean;
393
+ };
394
+ type RadioGroupProps = Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'value'> & {
395
+ /** Optional text that names the radio group. */
396
+ label?: ReactNode;
397
+ /** Places the group label above or to the right of its options. Defaults to `top`. */
398
+ labelPosition?: ControlLabelPosition;
399
+ options: RadioGroupOption[];
400
+ name?: string;
401
+ value?: RadioValue;
402
+ defaultValue?: RadioValue;
403
+ onChange?: (value: RadioValue, option: RadioGroupOption, event: ChangeEvent<HTMLInputElement>) => void;
404
+ disabled?: boolean;
405
+ direction?: 'horizontal' | 'vertical';
406
+ isRequired?: boolean;
407
+ };
408
+
409
+ /** A named collection of native radio buttons with controlled and uncontrolled values. */
410
+ declare const RadioGroup: react.ForwardRefExoticComponent<Omit<react.HTMLAttributes<HTMLDivElement>, "value" | "defaultValue" | "onChange"> & {
411
+ label?: react.ReactNode;
412
+ labelPosition?: ControlLabelPosition;
413
+ options: RadioGroupOption[];
414
+ name?: string;
415
+ value?: RadioValue;
416
+ defaultValue?: RadioValue;
417
+ onChange?: (value: RadioValue, option: RadioGroupOption, event: ChangeEvent<HTMLInputElement>) => void;
418
+ disabled?: boolean;
419
+ direction?: "horizontal" | "vertical";
420
+ isRequired?: boolean;
421
+ } & react.RefAttributes<HTMLDivElement>>;
422
+
314
423
  type TooltipProps = Omit<HTMLAttributes<HTMLSpanElement>, 'content'> & {
315
424
  content: ReactNode;
316
425
  children: ReactElement;
@@ -513,4 +622,37 @@ type SnackbarProps = Omit<HTMLAttributes<HTMLDivElement>, 'onClose'> & {
513
622
  /** A controlled, temporary notification surface. */
514
623
  declare function Snackbar({ open, message, autoHideDuration, onClose, action, anchorOrigin, closeLabel, className, ...props }: SnackbarProps): react.JSX.Element | null;
515
624
 
516
- export { Button, type ButtonColor, type ButtonHierarchy, type ButtonProps, type ButtonSize, type ButtonVariant, Chip, type ChipProps, type ChipStatus, type ChipVariant, type ColumnResizeHandler, type Currency, CurrencyInput, type CurrencyInputProps, type DateRange, DateTimePicker, type DateTimePickerProps, type DateTimePickerRangeProps, type DateTimePickerSingleProps, type DescriptionDisplay, Drawer, type DrawerProps, ExpandableSection, type ExpandableSectionProps, type FieldError, Loading, type LoadingProps, type LoadingSize, Message, type MessageOptions, type MessageProps, type MessageSeverity, Modal, type ModalAction, type ModalProps, type ModalSize, NumberInput, type NumberInputProps, Pagination, type PaginationProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, Selection, type SelectionOption, type SelectionProps, type SelectionValue, Skeleton, SkeletonBox, type SkeletonBoxProps, SkeletonCircle, SkeletonLine, type SkeletonProps, type SkeletonSizeProps, SkeletonSquare, type SkeletonVariant, Snackbar, type SnackbarAnchorOrigin, type SnackbarProps, Table, TableBody, TableCaption, TableCell, type TableData, TableHead, TableHeader, type TablePaginationPosition, type TableProps, TableRow, TextArea, type TextAreaProps, TextInput, type TextInputProps, Toggle, type ToggleProps, Tooltip, type TooltipProps, formatNumber, getIconSize, message };
625
+ type AvatarShape = 'circle' | 'rounded';
626
+ type AvatarSize = number | string;
627
+ type AvatarProps = Omit<HTMLAttributes<HTMLSpanElement>, 'content'> & {
628
+ /** Image URL. A successfully loaded image takes priority over all fallbacks. */
629
+ src?: string | null;
630
+ /** Name or label used to derive initials when no image is available. */
631
+ content?: string | null;
632
+ /** Accessible description for the image or fallback avatar. Defaults to content. */
633
+ alt?: string;
634
+ /** Avatar width and height. Numbers are interpreted as pixels. */
635
+ size?: AvatarSize;
636
+ /** Circle is the default; rounded uses a square with rounded corners. */
637
+ shape?: AvatarShape;
638
+ /** Chooses a specific illustration from the fallback collection. */
639
+ fallbackIndex?: number;
640
+ };
641
+ type AvatarGroupProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
642
+ /** Avatar elements to show in the group. */
643
+ children: ReactNode;
644
+ /** Maximum total items to show, including the final +n overflow item. */
645
+ maxCount?: number;
646
+ };
647
+ /**
648
+ * A compact avatar that shows an image, name initials, or one of 32 fallback
649
+ * illustrations in that order.
650
+ */
651
+ declare function Avatar({ src, content, alt, size, shape, fallbackIndex, className, style, role, 'aria-label': ariaLabel, ...props }: AvatarProps): react.JSX.Element;
652
+ /**
653
+ * A compact overlapping set of Avatar elements. When it contains one Avatar
654
+ * with content, the full content is shown beside it.
655
+ */
656
+ declare function AvatarGroup({ children, maxCount, className, style, role, ...props }: AvatarGroupProps): react.JSX.Element;
657
+
658
+ export { Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarShape, type AvatarSize, Button, ButtonBar, type ButtonBarAction, type ButtonBarProps, type ButtonColor, type ButtonHierarchy, type ButtonProps, type ButtonSize, type ButtonVariant, Checkbox, type CheckboxProps, Chip, type ChipProps, type ChipStatus, type ChipVariant, type ColumnResizeHandler, type ControlLabelPosition, type Currency, CurrencyInput, type CurrencyInputProps, type DateRange, DateTimePicker, type DateTimePickerProps, type DateTimePickerRangeProps, type DateTimePickerSingleProps, type DescriptionDisplay, Drawer, type DrawerProps, ExpandableSection, type ExpandableSectionProps, type FieldError, Loading, type LoadingProps, type LoadingSize, Message, type MessageOptions, type MessageProps, type MessageSeverity, Modal, type ModalAction, type ModalProps, type ModalSize, NumberInput, type NumberInputProps, Pagination, type PaginationProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, RadioButton, type RadioButtonProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioValue, Selection, type SelectionOption, type SelectionProps, type SelectionValue, Skeleton, SkeletonBox, type SkeletonBoxProps, SkeletonCircle, SkeletonLine, type SkeletonProps, type SkeletonSizeProps, SkeletonSquare, type SkeletonVariant, Snackbar, type SnackbarAnchorOrigin, type SnackbarProps, Table, TableBody, TableCaption, TableCell, type TableData, TableHead, TableHeader, type TablePaginationPosition, type TableProps, TableRow, TextArea, type TextAreaProps, TextInput, type TextInputProps, Toggle, type ToggleProps, Tooltip, type TooltipProps, formatNumber, getIconSize, message };