@orianatech/pire 1.3.0 → 1.4.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.
Files changed (50) hide show
  1. package/dist/components/core/Tag.d.ts.map +1 -1
  2. package/dist/components/core/icon-data.generated.d.ts.map +1 -1
  3. package/dist/components/core/icon-map.d.ts.map +1 -1
  4. package/dist/components/data/BarList.d.cts +30 -0
  5. package/dist/components/data/BarList.d.ts +31 -0
  6. package/dist/components/data/BarList.d.ts.map +1 -0
  7. package/dist/components/data/DataTable.d.cts +45 -3
  8. package/dist/components/data/DataTable.d.ts +45 -3
  9. package/dist/components/data/DataTable.d.ts.map +1 -1
  10. package/dist/components/data/RecordCard.d.cts +28 -0
  11. package/dist/components/data/RecordCard.d.ts +29 -0
  12. package/dist/components/data/RecordCard.d.ts.map +1 -0
  13. package/dist/components/data/ViewSwitcher.d.cts +32 -0
  14. package/dist/components/data/ViewSwitcher.d.ts +33 -0
  15. package/dist/components/data/ViewSwitcher.d.ts.map +1 -0
  16. package/dist/components/feedback/Tooltip.d.cts +18 -0
  17. package/dist/components/feedback/Tooltip.d.ts +18 -0
  18. package/dist/components/feedback/Tooltip.d.ts.map +1 -1
  19. package/dist/components/forms/ChoiceCardGroup.d.cts +50 -0
  20. package/dist/components/forms/ChoiceCardGroup.d.ts +51 -0
  21. package/dist/components/forms/ChoiceCardGroup.d.ts.map +1 -0
  22. package/dist/components/forms/NumberField.d.cts +18 -1
  23. package/dist/components/forms/NumberField.d.ts +18 -1
  24. package/dist/components/forms/NumberField.d.ts.map +1 -1
  25. package/dist/components/forms/QuantityStepper.d.cts +28 -0
  26. package/dist/components/forms/QuantityStepper.d.ts +29 -0
  27. package/dist/components/forms/QuantityStepper.d.ts.map +1 -0
  28. package/dist/components/navigation/Ribbon.d.cts +75 -0
  29. package/dist/components/navigation/Ribbon.d.ts +76 -0
  30. package/dist/components/navigation/Ribbon.d.ts.map +1 -0
  31. package/dist/components/patterns/ConfirmDialog.d.cts +8 -1
  32. package/dist/components/patterns/ConfirmDialog.d.ts +8 -1
  33. package/dist/components/patterns/ConfirmDialog.d.ts.map +1 -1
  34. package/dist/components/patterns/ValueHelpDialog.d.cts +23 -1
  35. package/dist/components/patterns/ValueHelpDialog.d.ts +23 -1
  36. package/dist/components/patterns/ValueHelpDialog.d.ts.map +1 -1
  37. package/dist/components.css +259 -2
  38. package/dist/i18n/messages.d.cts +44 -0
  39. package/dist/i18n/messages.d.ts +44 -0
  40. package/dist/i18n/messages.d.ts.map +1 -1
  41. package/dist/index.cjs +1371 -845
  42. package/dist/index.cjs.map +1 -1
  43. package/dist/index.d.cts +7 -1
  44. package/dist/index.d.ts +7 -1
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +1294 -774
  47. package/dist/index.js.map +1 -1
  48. package/dist/tokens/colors.css +7 -0
  49. package/dist/tokens/themes.css +3 -0
  50. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/core/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,QAAS,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACrE,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAClC;AAED;;;;;GAKG;AACH,eAAO,MAAM,GAAG,kFAiBd,CAAC"}
1
+ {"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/core/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,QAAS,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACrE,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAClC;AAED;;;;;GAKG;AACH,eAAO,MAAM,GAAG,kFAoBd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"icon-data.generated.d.ts","sourceRoot":"","sources":["../../../src/components/core/icon-data.generated.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA4I9C,CAAC"}
1
+ {"version":3,"file":"icon-data.generated.d.ts","sourceRoot":"","sources":["../../../src/components/core/icon-data.generated.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA8I9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"icon-map.d.ts","sourceRoot":"","sources":["../../../src/components/core/icon-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA0D7C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAAkD,CAAC"}
1
+ {"version":3,"file":"icon-map.d.ts","sourceRoot":"","sources":["../../../src/components/core/icon-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA6D7C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAAkD,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type * as React from 'react';
2
+ export interface BarListItem {
3
+ id: string;
4
+ label: React.ReactNode;
5
+ /** The magnitude the bar draws. */
6
+ value: number;
7
+ /** The figure as the reader should see it — formatted in the caller's locale, not here.
8
+ * Defaults to `String(value)`. */
9
+ valueLabel?: React.ReactNode;
10
+ /** A second line under the figure: "−12 reserved", "no stock". */
11
+ hint?: React.ReactNode;
12
+ /** Tints the figure and the bar from the status ramp. Value states, never series colours. */
13
+ tone?: 'neutral' | 'positive' | 'critical' | 'negative';
14
+ }
15
+ export interface BarListProps extends Omit<React.HTMLAttributes<HTMLUListElement>, 'children'> {
16
+ /** Names the list for assistive tech — required. */
17
+ 'aria-label': string;
18
+ items: BarListItem[];
19
+ /** What a full bar means. Defaults to the largest value present, which makes the list a
20
+ * ranking. Supply it to compare against a target or a total instead. */
21
+ max?: number;
22
+ }
23
+ /**
24
+ * Label, proportional bar, figure — a ranked readout where the comparison is between rows.
25
+ * Stock across branches, hours across cost centres, spend across suppliers.
26
+ *
27
+ * Not a chart: it uses the status ramp, not the `--viz-*` series ramp, because these are value
28
+ * states. Not a `ProgressBar` either — that is one value against a known total.
29
+ */
30
+ export declare function BarList({ items, max, className, ...rest }: BarListProps): React.JSX.Element;
@@ -0,0 +1,31 @@
1
+ import type * as React from 'react';
2
+ export interface BarListItem {
3
+ id: string;
4
+ label: React.ReactNode;
5
+ /** The magnitude the bar draws. */
6
+ value: number;
7
+ /** The figure as the reader should see it — formatted in the caller's locale, not here.
8
+ * Defaults to `String(value)`. */
9
+ valueLabel?: React.ReactNode;
10
+ /** A second line under the figure: "−12 reserved", "no stock". */
11
+ hint?: React.ReactNode;
12
+ /** Tints the figure and the bar from the status ramp. Value states, never series colours. */
13
+ tone?: 'neutral' | 'positive' | 'critical' | 'negative';
14
+ }
15
+ export interface BarListProps extends Omit<React.HTMLAttributes<HTMLUListElement>, 'children'> {
16
+ /** Names the list for assistive tech — required. */
17
+ 'aria-label': string;
18
+ items: BarListItem[];
19
+ /** What a full bar means. Defaults to the largest value present, which makes the list a
20
+ * ranking. Supply it to compare against a target or a total instead. */
21
+ max?: number;
22
+ }
23
+ /**
24
+ * Label, proportional bar, figure — a ranked readout where the comparison is between rows.
25
+ * Stock across branches, hours across cost centres, spend across suppliers.
26
+ *
27
+ * Not a chart: it uses the status ramp, not the `--viz-*` series ramp, because these are value
28
+ * states. Not a `ProgressBar` either — that is one value against a known total.
29
+ */
30
+ export declare function BarList({ items, max, className, ...rest }: BarListProps): React.JSX.Element;
31
+ //# sourceMappingURL=BarList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BarList.d.ts","sourceRoot":"","sources":["../../../src/components/data/BarList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd;uCACmC;IACnC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,kEAAkE;IAClE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,6FAA6F;IAC7F,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;CACzD;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC5F,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB;6EACyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,YAAY,qBAwBvE"}
@@ -1,8 +1,17 @@
1
- import type * as React from 'react';
1
+ import * as React from 'react';
2
+ /** Value states a single cell can carry. The same five `Badge` uses, so a red cell and a red badge
3
+ * mean the same thing on one screen. */
4
+ export type DataTableCellTone = 'positive' | 'critical' | 'negative' | 'informative' | 'neutral';
2
5
  export interface DataTableColumn<T = any> {
3
6
  key: string;
4
7
  label: string;
5
8
  align?: 'left' | 'right' | 'center';
9
+ /**
10
+ * Column width. Applied to the DOM for a **pinned** column, where it is the geometry the whole
11
+ * frozen run is measured from and a number is required. Everywhere else the grid still sizes by
12
+ * content: React Aria's `<Column width>` reaches the DOM only inside a `ResizableTableContainer`,
13
+ * which this table is not, so an unpinned width is a hint the browser is free to ignore.
14
+ */
6
15
  width?: number | string;
7
16
  /** Right-aligns and switches to tabular mono. Use for every amount, quantity and ID. */
8
17
  numeric?: boolean;
@@ -14,6 +23,25 @@ export interface DataTableColumn<T = any> {
14
23
  */
15
24
  hideLabel?: boolean;
16
25
  render?: (row: T) => React.ReactNode;
26
+ /**
27
+ * Freezes the column at the start of the grid while the rest scroll horizontally. For a
28
+ * comparison matrix — one product across thirty-four branches — where the row is unreadable
29
+ * once its identity has scrolled away.
30
+ *
31
+ * Requires a numeric `width`: every later pinned column's offset is the sum of the ones before
32
+ * it, and there is nothing to sum otherwise. Only a *leading* run may be pinned.
33
+ */
34
+ pinned?: boolean;
35
+ /**
36
+ * Tints the cell by value state — background from `--status-*-bg`, text from `--status-*-fg`.
37
+ *
38
+ * For a matrix where the *cell* carries the state and the row does not: one branch out of stock
39
+ * while the rest of the product's row is fine. Return `undefined` to leave a cell untinted.
40
+ *
41
+ * This is not a substitute for saying so in words. Colour alone is not a value state — pair it
42
+ * with a figure, a badge or a sub-label that reads the same to someone who cannot see the tint.
43
+ */
44
+ tone?: (row: T) => DataTableCellTone | undefined;
17
45
  }
18
46
  export interface DataTableSort {
19
47
  key: string;
@@ -39,7 +67,8 @@ export interface DataTableProps<T extends {
39
67
  /** Row height: 32 / 40 / 48px. Condensed is the analyst default. */
40
68
  density?: 'condensed' | 'regular' | 'comfortable';
41
69
  /**
42
- * `true` / `'multiple'` gives a checkbox column and a select-all header box.
70
+ * `true` / `'multiple'` gives a checkbox column and a select-all header box — see
71
+ * `hideSelectAll` for when the header box is the wrong control.
43
72
  *
44
73
  * `'single'` selects by pressing the row and renders **no** selection column. That is not a
45
74
  * shortcut: a checkbox is a claim that more than one can be ticked, and a checkbox column that
@@ -49,6 +78,19 @@ export interface DataTableProps<T extends {
49
78
  selectable?: boolean | 'single' | 'multiple';
50
79
  selected?: Array<string | number>;
51
80
  onSelectionChange?: (ids: Array<string | number>) => void;
81
+ /**
82
+ * Drops the header's select-all checkbox, keeping the per-row ones.
83
+ *
84
+ * For a table whose `rows` are a *view* of a larger selectable set — a searchable picker where
85
+ * the consumer holds ticks for records the current query filtered out of sight — and where the
86
+ * screen already carries a select-all of its own whose scope is the whole set. Two select-alls
87
+ * on one screen acting on two different collections is the defect this exists to remove, not a
88
+ * choice to offer the user; `ValueHelpDialog`'s multi-select is the call site.
89
+ *
90
+ * The column stays (the row checkboxes need it) and keeps an announced-only name, since a
91
+ * header cell with no text leaves its column unnamed.
92
+ */
93
+ hideSelectAll?: boolean;
52
94
  sort?: DataTableSort;
53
95
  onSortChange?: (sort: DataTableSort) => void;
54
96
  onRowAction?: (row: T) => void;
@@ -86,4 +128,4 @@ export interface DataTableProps<T extends {
86
128
  * screen-reader row/column announcements — do not hand-roll a <table> in product code. */
87
129
  export declare function DataTable<T extends {
88
130
  id: string | number;
89
- }>({ columns, rows, density, selectable, selected, onSelectionChange, sort, onSortChange, onRowAction, stickyHeader, emptyLabel, isLoading, loadingRowCount, loadingLabel, footer, rowProps, renderExpanded, expandedIds, className, style, ...rest }: DataTableProps<T>): React.JSX.Element;
131
+ }>({ columns, rows, density, selectable, selected, onSelectionChange, hideSelectAll, sort, onSortChange, onRowAction, stickyHeader, emptyLabel, isLoading, loadingRowCount, loadingLabel, footer, rowProps, renderExpanded, expandedIds, className, style, ...rest }: DataTableProps<T>): React.JSX.Element;
@@ -1,8 +1,17 @@
1
- import type * as React from 'react';
1
+ import * as React from 'react';
2
+ /** Value states a single cell can carry. The same five `Badge` uses, so a red cell and a red badge
3
+ * mean the same thing on one screen. */
4
+ export type DataTableCellTone = 'positive' | 'critical' | 'negative' | 'informative' | 'neutral';
2
5
  export interface DataTableColumn<T = any> {
3
6
  key: string;
4
7
  label: string;
5
8
  align?: 'left' | 'right' | 'center';
9
+ /**
10
+ * Column width. Applied to the DOM for a **pinned** column, where it is the geometry the whole
11
+ * frozen run is measured from and a number is required. Everywhere else the grid still sizes by
12
+ * content: React Aria's `<Column width>` reaches the DOM only inside a `ResizableTableContainer`,
13
+ * which this table is not, so an unpinned width is a hint the browser is free to ignore.
14
+ */
6
15
  width?: number | string;
7
16
  /** Right-aligns and switches to tabular mono. Use for every amount, quantity and ID. */
8
17
  numeric?: boolean;
@@ -14,6 +23,25 @@ export interface DataTableColumn<T = any> {
14
23
  */
15
24
  hideLabel?: boolean;
16
25
  render?: (row: T) => React.ReactNode;
26
+ /**
27
+ * Freezes the column at the start of the grid while the rest scroll horizontally. For a
28
+ * comparison matrix — one product across thirty-four branches — where the row is unreadable
29
+ * once its identity has scrolled away.
30
+ *
31
+ * Requires a numeric `width`: every later pinned column's offset is the sum of the ones before
32
+ * it, and there is nothing to sum otherwise. Only a *leading* run may be pinned.
33
+ */
34
+ pinned?: boolean;
35
+ /**
36
+ * Tints the cell by value state — background from `--status-*-bg`, text from `--status-*-fg`.
37
+ *
38
+ * For a matrix where the *cell* carries the state and the row does not: one branch out of stock
39
+ * while the rest of the product's row is fine. Return `undefined` to leave a cell untinted.
40
+ *
41
+ * This is not a substitute for saying so in words. Colour alone is not a value state — pair it
42
+ * with a figure, a badge or a sub-label that reads the same to someone who cannot see the tint.
43
+ */
44
+ tone?: (row: T) => DataTableCellTone | undefined;
17
45
  }
18
46
  export interface DataTableSort {
19
47
  key: string;
@@ -39,7 +67,8 @@ export interface DataTableProps<T extends {
39
67
  /** Row height: 32 / 40 / 48px. Condensed is the analyst default. */
40
68
  density?: 'condensed' | 'regular' | 'comfortable';
41
69
  /**
42
- * `true` / `'multiple'` gives a checkbox column and a select-all header box.
70
+ * `true` / `'multiple'` gives a checkbox column and a select-all header box — see
71
+ * `hideSelectAll` for when the header box is the wrong control.
43
72
  *
44
73
  * `'single'` selects by pressing the row and renders **no** selection column. That is not a
45
74
  * shortcut: a checkbox is a claim that more than one can be ticked, and a checkbox column that
@@ -49,6 +78,19 @@ export interface DataTableProps<T extends {
49
78
  selectable?: boolean | 'single' | 'multiple';
50
79
  selected?: Array<string | number>;
51
80
  onSelectionChange?: (ids: Array<string | number>) => void;
81
+ /**
82
+ * Drops the header's select-all checkbox, keeping the per-row ones.
83
+ *
84
+ * For a table whose `rows` are a *view* of a larger selectable set — a searchable picker where
85
+ * the consumer holds ticks for records the current query filtered out of sight — and where the
86
+ * screen already carries a select-all of its own whose scope is the whole set. Two select-alls
87
+ * on one screen acting on two different collections is the defect this exists to remove, not a
88
+ * choice to offer the user; `ValueHelpDialog`'s multi-select is the call site.
89
+ *
90
+ * The column stays (the row checkboxes need it) and keeps an announced-only name, since a
91
+ * header cell with no text leaves its column unnamed.
92
+ */
93
+ hideSelectAll?: boolean;
52
94
  sort?: DataTableSort;
53
95
  onSortChange?: (sort: DataTableSort) => void;
54
96
  onRowAction?: (row: T) => void;
@@ -86,5 +128,5 @@ export interface DataTableProps<T extends {
86
128
  * screen-reader row/column announcements — do not hand-roll a <table> in product code. */
87
129
  export declare function DataTable<T extends {
88
130
  id: string | number;
89
- }>({ columns, rows, density, selectable, selected, onSelectionChange, sort, onSortChange, onRowAction, stickyHeader, emptyLabel, isLoading, loadingRowCount, loadingLabel, footer, rowProps, renderExpanded, expandedIds, className, style, ...rest }: DataTableProps<T>): React.JSX.Element;
131
+ }>({ columns, rows, density, selectable, selected, onSelectionChange, hideSelectAll, sort, onSortChange, onRowAction, stickyHeader, emptyLabel, isLoading, loadingRowCount, loadingLabel, footer, rowProps, renderExpanded, expandedIds, className, style, ...rest }: DataTableProps<T>): React.JSX.Element;
90
132
  //# sourceMappingURL=DataTable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../src/components/data/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AASpC,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,GAAG;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,wFAAwF;IACxF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CACtC;AAED,MAAM,WAAW,aAAa;IAAG,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,KAAK,GAAG,MAAM,CAAA;CAAE;AAEnE,MAAM,WAAW,iBAAiB;IAChC,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,GAAG;IACrE,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,oEAAoE;IACpE,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,aAAa,CAAC;IAClD;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC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AAG,MAAM,CAAC,CAAC;IACrC,iGAAiG;IACjG,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2FAA2F;IAC3F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,6FAA6F;IAC7F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED;2FAC2F;AAC3F,wBAAgB,SAAS,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAmB,EAC/F,UAAU,EAAE,QAAQ,EAAE,iBAAiB,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,YAAmB,EAC5G,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EACpD,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,qBAoP9F"}
@@ -0,0 +1,28 @@
1
+ import type * as React from 'react';
2
+ export interface RecordCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
3
+ /** The record as a person names it — the branch, the supplier, the warehouse. */
4
+ title: React.ReactNode;
5
+ /** One line of secondary identity: an address, a code, a contact. Omit when the name is enough. */
6
+ subtitle?: React.ReactNode;
7
+ /** Lucide slug for the leading tile. */
8
+ icon?: string;
9
+ /** Trailing slot — usually a small tertiary Button that reopens the picker. Omit for a
10
+ * read-only card, which is what a transfer's route needs at both ends. */
11
+ action?: React.ReactNode;
12
+ /**
13
+ * Greys the card, and **only** the card: whatever sits in `action` stays fully pressable.
14
+ *
15
+ * The slot takes any node, so there is nothing here that could safely disable it — injecting a
16
+ * prop into a stranger's element is a guess about what that element accepts. Pass `isDisabled`
17
+ * to that control yourself, alongside this one, whenever the record is locked. A card is a
18
+ * readout, not a control: this is presentation, and it carries no disabled semantics for
19
+ * assistive tech either.
20
+ */
21
+ isDisabled?: boolean;
22
+ }
23
+ /**
24
+ * A picked master-data record shown as a card rather than a field value: which branch, which
25
+ * warehouse, which counterparty. Use it once a record is chosen — `ValueHelpField` is what
26
+ * chooses one.
27
+ */
28
+ export declare function RecordCard({ title, subtitle, icon, action, isDisabled, className, ...rest }: RecordCardProps): React.JSX.Element;
@@ -0,0 +1,29 @@
1
+ import type * as React from 'react';
2
+ export interface RecordCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
3
+ /** The record as a person names it — the branch, the supplier, the warehouse. */
4
+ title: React.ReactNode;
5
+ /** One line of secondary identity: an address, a code, a contact. Omit when the name is enough. */
6
+ subtitle?: React.ReactNode;
7
+ /** Lucide slug for the leading tile. */
8
+ icon?: string;
9
+ /** Trailing slot — usually a small tertiary Button that reopens the picker. Omit for a
10
+ * read-only card, which is what a transfer's route needs at both ends. */
11
+ action?: React.ReactNode;
12
+ /**
13
+ * Greys the card, and **only** the card: whatever sits in `action` stays fully pressable.
14
+ *
15
+ * The slot takes any node, so there is nothing here that could safely disable it — injecting a
16
+ * prop into a stranger's element is a guess about what that element accepts. Pass `isDisabled`
17
+ * to that control yourself, alongside this one, whenever the record is locked. A card is a
18
+ * readout, not a control: this is presentation, and it carries no disabled semantics for
19
+ * assistive tech either.
20
+ */
21
+ isDisabled?: boolean;
22
+ }
23
+ /**
24
+ * A picked master-data record shown as a card rather than a field value: which branch, which
25
+ * warehouse, which counterparty. Use it once a record is chosen — `ValueHelpField` is what
26
+ * chooses one.
27
+ */
28
+ export declare function RecordCard({ title, subtitle, icon, action, isDisabled, className, ...rest }: RecordCardProps): React.JSX.Element;
29
+ //# sourceMappingURL=RecordCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecordCard.d.ts","sourceRoot":"","sources":["../../../src/components/data/RecordCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC1F,iFAAiF;IACjF,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,mGAAmG;IACnG,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;+EAC2E;IAC3E,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,eAAe,qBAa5G"}
@@ -0,0 +1,32 @@
1
+ import type * as React from 'react';
2
+ export interface ViewSwitcherProps {
3
+ /** The saved view currently applied. */
4
+ name: string;
5
+ /** The view has unsaved changes. Rendered as text and folded into the accessible name — a
6
+ * colour-only marker is a state nobody using a screen reader ever learns about. */
7
+ isDirty?: boolean;
8
+ /** Leading glyph. Defaults to `star`, which is what saved views are marked with elsewhere. */
9
+ icon?: string;
10
+ /** Opens the consumer's own views menu or dialog. */
11
+ onPress?: () => void;
12
+ /** Set while the view list has nothing to switch to yet — e.g. the screen has not finished its
13
+ * first load, or the consumer's views dialog is already open and re-opening it would be a
14
+ * no-op. Do not use it to mean "no views exist"; render nothing in that case instead. */
15
+ isDisabled?: boolean;
16
+ /** Replaces the whole accessible name — the library's usual meaning for `aria-label`, the same
17
+ * as `DataTable`, `SegmentedControl` and `FilterBar` give it. Reach for this when a screen
18
+ * shows more than one saved-view switcher and the default "Saved views: …" phrasing would no
19
+ * longer tell them apart. Supplying it hands the consumer the whole string: the dictionary's
20
+ * modified phrasing no longer applies, so an `isDirty` view needs the override to say so
21
+ * itself. */
22
+ 'aria-label'?: string;
23
+ className?: string;
24
+ style?: React.CSSProperties;
25
+ }
26
+ /**
27
+ * The saved-view trigger every ERP list opens with. A `Button`, not a `Select`: picking a view
28
+ * opens a dialog with scope and sharing, and a select that opens a dialog lies about what it is.
29
+ *
30
+ * Sits in a toolbar row, or in `Ribbon`'s `leading` slot when the ribbon is collapsed.
31
+ */
32
+ export declare function ViewSwitcher({ name, isDirty, icon, onPress, isDisabled, 'aria-label': ariaLabel, className, style }: ViewSwitcherProps): React.JSX.Element;
@@ -0,0 +1,33 @@
1
+ import type * as React from 'react';
2
+ export interface ViewSwitcherProps {
3
+ /** The saved view currently applied. */
4
+ name: string;
5
+ /** The view has unsaved changes. Rendered as text and folded into the accessible name — a
6
+ * colour-only marker is a state nobody using a screen reader ever learns about. */
7
+ isDirty?: boolean;
8
+ /** Leading glyph. Defaults to `star`, which is what saved views are marked with elsewhere. */
9
+ icon?: string;
10
+ /** Opens the consumer's own views menu or dialog. */
11
+ onPress?: () => void;
12
+ /** Set while the view list has nothing to switch to yet — e.g. the screen has not finished its
13
+ * first load, or the consumer's views dialog is already open and re-opening it would be a
14
+ * no-op. Do not use it to mean "no views exist"; render nothing in that case instead. */
15
+ isDisabled?: boolean;
16
+ /** Replaces the whole accessible name — the library's usual meaning for `aria-label`, the same
17
+ * as `DataTable`, `SegmentedControl` and `FilterBar` give it. Reach for this when a screen
18
+ * shows more than one saved-view switcher and the default "Saved views: …" phrasing would no
19
+ * longer tell them apart. Supplying it hands the consumer the whole string: the dictionary's
20
+ * modified phrasing no longer applies, so an `isDirty` view needs the override to say so
21
+ * itself. */
22
+ 'aria-label'?: string;
23
+ className?: string;
24
+ style?: React.CSSProperties;
25
+ }
26
+ /**
27
+ * The saved-view trigger every ERP list opens with. A `Button`, not a `Select`: picking a view
28
+ * opens a dialog with scope and sharing, and a select that opens a dialog lies about what it is.
29
+ *
30
+ * Sits in a toolbar row, or in `Ribbon`'s `leading` slot when the ribbon is collapsed.
31
+ */
32
+ export declare function ViewSwitcher({ name, isDirty, icon, onPress, isDisabled, 'aria-label': ariaLabel, className, style }: ViewSwitcherProps): React.JSX.Element;
33
+ //# sourceMappingURL=ViewSwitcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewSwitcher.d.ts","sourceRoot":"","sources":["../../../src/components/data/ViewSwitcher.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAMpC,MAAM,WAAW,iBAAiB;IAChC,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb;wFACoF;IACpF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8FAA8F;IAC9F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;8FAE0F;IAC1F,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;kBAKc;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAa,EAAE,OAAO,EAAE,UAAU,EAC9E,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,iBAAiB,qBAgB/D"}
@@ -11,6 +11,24 @@ export interface TooltipProps {
11
11
  * A child that cannot take focus on its own is made focusable for you. That is the point: a
12
12
  * tooltip on something unreachable by keyboard is invisible to anyone not using a mouse, and it
13
13
  * fails silently — a dead tooltip is indistinguishable from a live one until somebody hovers it.
14
+ *
15
+ * **A `isDisabled` child must be button-shaped.** A disabled control cannot hold focus, so it is
16
+ * wrapped in a focusable `<span role="button" aria-disabled="true">` — the only role React
17
+ * Aria's `Focusable` accepts here that also describes a disabled control the way the control
18
+ * already describes itself (`group` is not in its allow-list; a real `<button>` would nest
19
+ * inside the `IconButton` this most often wraps). `role="button"` is children-presentational, so
20
+ * wrapping a *disabled field* — `<Tooltip label="Locked until released"><Input isDisabled /></Tooltip>`
21
+ * — announces "button" and suppresses the textbox semantics inside it. Explain a locked field
22
+ * through its own `description` instead, and keep this for buttons, icon buttons and the
23
+ * button-shaped controls beside them.
24
+ *
25
+ * This is documented rather than warned about: the only runtime signal is the child's rendered
26
+ * role, and sniffing that is both a heuristic and a thing that would fire on every correct call
27
+ * site here — a warning nobody can act on is a warning everybody learns to ignore.
28
+ *
29
+ * Weigh the tab stop, too. On an `IconButton` the tooltip label *is* the button's accessible
30
+ * name, so a disabled one gains a focus stop that tells a screen-reader user nothing it had not
31
+ * already read. A toolbar of eight disabled icon buttons is eight of them.
14
32
  */
15
33
  children: React.ReactNode;
16
34
  }
@@ -11,6 +11,24 @@ export interface TooltipProps {
11
11
  * A child that cannot take focus on its own is made focusable for you. That is the point: a
12
12
  * tooltip on something unreachable by keyboard is invisible to anyone not using a mouse, and it
13
13
  * fails silently — a dead tooltip is indistinguishable from a live one until somebody hovers it.
14
+ *
15
+ * **A `isDisabled` child must be button-shaped.** A disabled control cannot hold focus, so it is
16
+ * wrapped in a focusable `<span role="button" aria-disabled="true">` — the only role React
17
+ * Aria's `Focusable` accepts here that also describes a disabled control the way the control
18
+ * already describes itself (`group` is not in its allow-list; a real `<button>` would nest
19
+ * inside the `IconButton` this most often wraps). `role="button"` is children-presentational, so
20
+ * wrapping a *disabled field* — `<Tooltip label="Locked until released"><Input isDisabled /></Tooltip>`
21
+ * — announces "button" and suppresses the textbox semantics inside it. Explain a locked field
22
+ * through its own `description` instead, and keep this for buttons, icon buttons and the
23
+ * button-shaped controls beside them.
24
+ *
25
+ * This is documented rather than warned about: the only runtime signal is the child's rendered
26
+ * role, and sniffing that is both a heuristic and a thing that would fire on every correct call
27
+ * site here — a warning nobody can act on is a warning everybody learns to ignore.
28
+ *
29
+ * Weigh the tab stop, too. On an `IconButton` the tooltip label *is* the button's accessible
30
+ * name, so a disabled one gains a focus stop that tells a screen-reader user nothing it had not
31
+ * already read. A toolbar of eight disabled icon buttons is eight of them.
14
32
  */
15
33
  children: React.ReactNode;
16
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/feedback/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,YAAY;IAC3B,uEAAuE;IACvE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAChD,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,SAAiB,EAAE,KAAW,EAAE,QAAQ,EAAE,EAAE,YAAY,qBAwBxF"}
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/feedback/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,YAAY;IAC3B,uEAAuE;IACvE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAChD,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,SAAiB,EAAE,KAAW,EAAE,QAAQ,EAAE,EAAE,YAAY,qBAgDxF"}
@@ -0,0 +1,50 @@
1
+ import type * as React from 'react';
2
+ export interface ChoiceCardOption {
3
+ id: string;
4
+ label: React.ReactNode;
5
+ /** One line on what choosing this means — the cost, the scope, the consequence. */
6
+ description?: React.ReactNode;
7
+ icon?: string;
8
+ /** Decorative illustration under the description, e.g. the density picker's row bars.
9
+ * Marked `aria-hidden` — put anything that carries meaning in `description` instead. */
10
+ preview?: React.ReactNode;
11
+ /** Use for an option the current context makes unavailable, e.g. a scope the record doesn't
12
+ * support. Still shown, so the user knows the choice exists — just not right now. */
13
+ isDisabled?: boolean;
14
+ }
15
+ export interface ChoiceCardGroupProps {
16
+ /** Names the choice for assistive tech, e.g. "Count scope". Required when `label` is omitted. */
17
+ 'aria-label'?: string;
18
+ /** Visible group label. Use when the choice needs a heading of its own on the page; fall back
19
+ * to `aria-label` when the surrounding UI already names the choice (a dialog title, a step
20
+ * heading). */
21
+ label?: React.ReactNode;
22
+ /** Guidance that applies to the group as a whole, below the cards — not a per-option detail,
23
+ * which belongs in that option's `description`. */
24
+ description?: React.ReactNode;
25
+ /** Shown when `isRequired` and nothing has been chosen at validation time. */
26
+ errorMessage?: React.ReactNode;
27
+ options: ChoiceCardOption[];
28
+ /** Controlled selection. Pair with `onChange`; omit and use `defaultValue` for an uncontrolled group. */
29
+ value?: string;
30
+ /** Starting selection for an uncontrolled group. */
31
+ defaultValue?: string;
32
+ onChange?: (id: string) => void;
33
+ /** Grid columns. Two by default; four suits short labels (a count-scope picker), one suits a
34
+ * description-led list with a preview underneath (a row-density picker). */
35
+ columns?: number;
36
+ /** Use while the choice is temporarily unavailable for every option — e.g. the record it
37
+ * governs hasn't loaded yet — not for disabling a single option, which is `ChoiceCardOption.isDisabled`. */
38
+ isDisabled?: boolean;
39
+ /** Use when the form cannot be submitted without a selection, so a missing choice surfaces
40
+ * `errorMessage` instead of failing silently downstream. */
41
+ isRequired?: boolean;
42
+ className?: string;
43
+ style?: React.CSSProperties;
44
+ }
45
+ /**
46
+ * Mutually exclusive options that each need explaining — a count's scope, a row density, a
47
+ * posting mode. Use it when the choice deserves a sentence; use `Radio` when the label is enough
48
+ * and `SegmentedControl` when the options only change how data is displayed.
49
+ */
50
+ export declare function ChoiceCardGroup({ label, description, errorMessage, options, value, defaultValue, onChange, columns, isDisabled, isRequired, className, style, ...rest }: ChoiceCardGroupProps): React.JSX.Element;
@@ -0,0 +1,51 @@
1
+ import type * as React from 'react';
2
+ export interface ChoiceCardOption {
3
+ id: string;
4
+ label: React.ReactNode;
5
+ /** One line on what choosing this means — the cost, the scope, the consequence. */
6
+ description?: React.ReactNode;
7
+ icon?: string;
8
+ /** Decorative illustration under the description, e.g. the density picker's row bars.
9
+ * Marked `aria-hidden` — put anything that carries meaning in `description` instead. */
10
+ preview?: React.ReactNode;
11
+ /** Use for an option the current context makes unavailable, e.g. a scope the record doesn't
12
+ * support. Still shown, so the user knows the choice exists — just not right now. */
13
+ isDisabled?: boolean;
14
+ }
15
+ export interface ChoiceCardGroupProps {
16
+ /** Names the choice for assistive tech, e.g. "Count scope". Required when `label` is omitted. */
17
+ 'aria-label'?: string;
18
+ /** Visible group label. Use when the choice needs a heading of its own on the page; fall back
19
+ * to `aria-label` when the surrounding UI already names the choice (a dialog title, a step
20
+ * heading). */
21
+ label?: React.ReactNode;
22
+ /** Guidance that applies to the group as a whole, below the cards — not a per-option detail,
23
+ * which belongs in that option's `description`. */
24
+ description?: React.ReactNode;
25
+ /** Shown when `isRequired` and nothing has been chosen at validation time. */
26
+ errorMessage?: React.ReactNode;
27
+ options: ChoiceCardOption[];
28
+ /** Controlled selection. Pair with `onChange`; omit and use `defaultValue` for an uncontrolled group. */
29
+ value?: string;
30
+ /** Starting selection for an uncontrolled group. */
31
+ defaultValue?: string;
32
+ onChange?: (id: string) => void;
33
+ /** Grid columns. Two by default; four suits short labels (a count-scope picker), one suits a
34
+ * description-led list with a preview underneath (a row-density picker). */
35
+ columns?: number;
36
+ /** Use while the choice is temporarily unavailable for every option — e.g. the record it
37
+ * governs hasn't loaded yet — not for disabling a single option, which is `ChoiceCardOption.isDisabled`. */
38
+ isDisabled?: boolean;
39
+ /** Use when the form cannot be submitted without a selection, so a missing choice surfaces
40
+ * `errorMessage` instead of failing silently downstream. */
41
+ isRequired?: boolean;
42
+ className?: string;
43
+ style?: React.CSSProperties;
44
+ }
45
+ /**
46
+ * Mutually exclusive options that each need explaining — a count's scope, a row density, a
47
+ * posting mode. Use it when the choice deserves a sentence; use `Radio` when the label is enough
48
+ * and `SegmentedControl` when the options only change how data is displayed.
49
+ */
50
+ export declare function ChoiceCardGroup({ label, description, errorMessage, options, value, defaultValue, onChange, columns, isDisabled, isRequired, className, style, ...rest }: ChoiceCardGroupProps): React.JSX.Element;
51
+ //# sourceMappingURL=ChoiceCardGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChoiceCardGroup.d.ts","sourceRoot":"","sources":["../../../src/components/forms/ChoiceCardGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAKpC,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,mFAAmF;IACnF,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;6FACyF;IACzF,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;0FACsF;IACtF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,iGAAiG;IACjG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;oBAEgB;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;wDACoD;IACpD,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,8EAA8E;IAC9E,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,yGAAyG;IACzG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC;iFAC6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;iHAC6G;IAC7G,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;iEAC6D;IAC7D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAC9F,QAAQ,EAAE,OAAW,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,oBAAoB,qBA0BjG"}
@@ -37,6 +37,23 @@ export interface NumberFieldProps<TEmpty extends '' | null = never> {
37
37
  isRequired?: boolean;
38
38
  /** Hide the increment/decrement buttons — typical inside dense table cells. */
39
39
  hideStepper?: boolean;
40
+ /**
41
+ * `stacked` is the compact spinner beside the input — the default, and right for a dense form.
42
+ * `inline` puts a full-size decrement and increment on either side of the value, for entry with
43
+ * gloves or a scanner. `QuantityStepper` is the named preset for that case; reach for this prop
44
+ * directly only when you need the layout without the preset's other defaults.
45
+ */
46
+ stepperLayout?: 'stacked' | 'inline';
47
+ /**
48
+ * Overrides the dictionary's increment/decrement names, in **both** stepper layouts —
49
+ * QuantityStepper supplies its own.
50
+ *
51
+ * For a field where "Increase" is not what the button does to the thing being counted: "Add one
52
+ * case", "Next pallet". A silently-ignored override is worse than no prop, so the stacked
53
+ * spinner honours these exactly as the inline one does.
54
+ */
55
+ incrementLabel?: string;
56
+ decrementLabel?: string;
40
57
  /**
41
58
  * Show a button that empties the field, reporting whatever `emptyValue` declares.
42
59
  *
@@ -69,4 +86,4 @@ export interface NumberFieldProps<TEmpty extends '' | null = never> {
69
86
  * Enable the action and validate when it is pressed, surfacing the reason. A disabled control that
70
87
  * does not say why is a worse affordance regardless, so the fix costs nothing.
71
88
  */
72
- export declare function NumberField<TEmpty extends '' | null = never>({ label, suffix, description, errorMessage, hideStepper, size, fullWidth, className, style, value, defaultValue, onChange, emptyValue, isClearable, clearLabel, ...rest }: NumberFieldProps<TEmpty>): React.JSX.Element;
89
+ export declare function NumberField<TEmpty extends '' | null = never>({ label, suffix, description, errorMessage, hideStepper, stepperLayout, incrementLabel, decrementLabel, size, fullWidth, className, style, value, defaultValue, onChange, emptyValue, isClearable, clearLabel, ...rest }: NumberFieldProps<TEmpty>): React.JSX.Element;
@@ -37,6 +37,23 @@ export interface NumberFieldProps<TEmpty extends '' | null = never> {
37
37
  isRequired?: boolean;
38
38
  /** Hide the increment/decrement buttons — typical inside dense table cells. */
39
39
  hideStepper?: boolean;
40
+ /**
41
+ * `stacked` is the compact spinner beside the input — the default, and right for a dense form.
42
+ * `inline` puts a full-size decrement and increment on either side of the value, for entry with
43
+ * gloves or a scanner. `QuantityStepper` is the named preset for that case; reach for this prop
44
+ * directly only when you need the layout without the preset's other defaults.
45
+ */
46
+ stepperLayout?: 'stacked' | 'inline';
47
+ /**
48
+ * Overrides the dictionary's increment/decrement names, in **both** stepper layouts —
49
+ * QuantityStepper supplies its own.
50
+ *
51
+ * For a field where "Increase" is not what the button does to the thing being counted: "Add one
52
+ * case", "Next pallet". A silently-ignored override is worse than no prop, so the stacked
53
+ * spinner honours these exactly as the inline one does.
54
+ */
55
+ incrementLabel?: string;
56
+ decrementLabel?: string;
40
57
  /**
41
58
  * Show a button that empties the field, reporting whatever `emptyValue` declares.
42
59
  *
@@ -69,5 +86,5 @@ export interface NumberFieldProps<TEmpty extends '' | null = never> {
69
86
  * Enable the action and validate when it is pressed, surfacing the reason. A disabled control that
70
87
  * does not say why is a worse affordance regardless, so the fix costs nothing.
71
88
  */
72
- export declare function NumberField<TEmpty extends '' | null = never>({ label, suffix, description, errorMessage, hideStepper, size, fullWidth, className, style, value, defaultValue, onChange, emptyValue, isClearable, clearLabel, ...rest }: NumberFieldProps<TEmpty>): React.JSX.Element;
89
+ export declare function NumberField<TEmpty extends '' | null = never>({ label, suffix, description, errorMessage, hideStepper, stepperLayout, incrementLabel, decrementLabel, size, fullWidth, className, style, value, defaultValue, onChange, emptyValue, isClearable, clearLabel, ...rest }: NumberFieldProps<TEmpty>): React.JSX.Element;
73
90
  //# sourceMappingURL=NumberField.d.ts.map