@orianatech/pire 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/components/core/Button.d.cts +12 -0
  2. package/dist/components/core/Button.d.ts +12 -0
  3. package/dist/components/core/Button.d.ts.map +1 -1
  4. package/dist/components/core/ComingSoonMark.d.cts +39 -0
  5. package/dist/components/core/ComingSoonMark.d.ts +40 -0
  6. package/dist/components/core/ComingSoonMark.d.ts.map +1 -0
  7. package/dist/components/data/DataTable.d.cts +35 -1
  8. package/dist/components/data/DataTable.d.ts +35 -1
  9. package/dist/components/data/DataTable.d.ts.map +1 -1
  10. package/dist/components/forms/FormField.d.ts.map +1 -1
  11. package/dist/components/layout/SelectionBar.d.cts +31 -4
  12. package/dist/components/layout/SelectionBar.d.ts +31 -4
  13. package/dist/components/layout/SelectionBar.d.ts.map +1 -1
  14. package/dist/components/navigation/Breadcrumb.d.cts +12 -2
  15. package/dist/components/navigation/Breadcrumb.d.ts +12 -2
  16. package/dist/components/navigation/Breadcrumb.d.ts.map +1 -1
  17. package/dist/components/navigation/Ribbon.d.cts +27 -0
  18. package/dist/components/navigation/Ribbon.d.ts +27 -0
  19. package/dist/components/navigation/Ribbon.d.ts.map +1 -1
  20. package/dist/components/navigation/ShellBar.d.cts +19 -1
  21. package/dist/components/navigation/ShellBar.d.ts +19 -1
  22. package/dist/components/navigation/ShellBar.d.ts.map +1 -1
  23. package/dist/components/patterns/SidePanel.d.cts +17 -3
  24. package/dist/components/patterns/SidePanel.d.ts +17 -3
  25. package/dist/components/patterns/SidePanel.d.ts.map +1 -1
  26. package/dist/components.css +213 -2
  27. package/dist/i18n/messages.d.cts +24 -0
  28. package/dist/i18n/messages.d.ts +24 -0
  29. package/dist/i18n/messages.d.ts.map +1 -1
  30. package/dist/index.cjs +1350 -950
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.d.cts +1 -1
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +1327 -919
  36. package/dist/index.js.map +1 -1
  37. package/package.json +1 -1
@@ -12,6 +12,18 @@ export interface ButtonProps extends Omit<AriaButtonProps, 'className' | 'childr
12
12
  /** Icon slug rendered after the label. */
13
13
  iconEnd?: string;
14
14
  fullWidth?: boolean;
15
+ /**
16
+ * An action the product will have but does not have yet. Draws the button in the tertiary ink
17
+ * with a "Soon" mark after the label, keeps it **focusable** with `aria-disabled="true"`, and
18
+ * never fires `onPress` (nor submits a form).
19
+ *
20
+ * Not a kind of `isDisabled`. Disabled means "not now" — no selection, no permission, the wrong
21
+ * document state — and takes the control out of the tab order. This means "not yet", and the mark
22
+ * is the message: it has to be reachable by keyboard, announced ("Send by WhatsApp, soon"), and
23
+ * able to carry a `Tooltip` saying what the action will do. It also does not look disabled, so a
24
+ * user can tell the two apart.
25
+ */
26
+ isComingSoon?: boolean;
15
27
  className?: string;
16
28
  }
17
29
  export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -12,6 +12,18 @@ export interface ButtonProps extends Omit<AriaButtonProps, 'className' | 'childr
12
12
  /** Icon slug rendered after the label. */
13
13
  iconEnd?: string;
14
14
  fullWidth?: boolean;
15
+ /**
16
+ * An action the product will have but does not have yet. Draws the button in the tertiary ink
17
+ * with a "Soon" mark after the label, keeps it **focusable** with `aria-disabled="true"`, and
18
+ * never fires `onPress` (nor submits a form).
19
+ *
20
+ * Not a kind of `isDisabled`. Disabled means "not now" — no selection, no permission, the wrong
21
+ * document state — and takes the control out of the tab order. This means "not yet", and the mark
22
+ * is the message: it has to be reachable by keyboard, announced ("Send by WhatsApp, soon"), and
23
+ * able to carry a `Tooltip` saying what the action will do. It also does not look disabled, so a
24
+ * user can tell the two apart.
25
+ */
26
+ isComingSoon?: boolean;
15
27
  className?: string;
16
28
  }
17
29
  export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/core/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAwB,KAAK,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIlG,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,UAAU,CAAC;IAClF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;gEAC4D;IAC5D,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,YAAY,CAAC;IACzE,4EAA4E;IAC5E,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,MAAM,uFAkBjB,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/core/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAwB,KAAK,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAMlG,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,UAAU,CAAC;IAClF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;gEAC4D;IAC5D,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,YAAY,CAAC;IACzE,4EAA4E;IAC5E,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,MAAM,uFAgCjB,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The "Soon" mark `Button` and `Ribbon.Command` draw after their label while `isComingSoon`.
3
+ *
4
+ * Private: the mark means nothing on its own, only beside the label of a control that is focusable
5
+ * and inert. It is drawn, never announced — the announcement is the control's name, which
6
+ * `comingSoonProps` builds whenever the label is plain text. `announce` is the fallback for a label
7
+ * that is not (an element, a formatted fragment): a hidden ", Soon" read as part of the content.
8
+ * Second best, because the hidden span is absolutely positioned and name computation pads a
9
+ * non-inline box with spaces — "Registrar cobro , Pronto".
10
+ */
11
+ export declare function ComingSoonMark({ announce }: {
12
+ announce: boolean;
13
+ }): import("react").JSX.Element;
14
+ /**
15
+ * What `isComingSoon` does to a React Aria button's props, shared so `Button` and `Ribbon.Command`
16
+ * cannot drift apart.
17
+ *
18
+ * Not `isDisabled`: that takes the control out of the tab order, and the mark is the message — a
19
+ * screen-reader user who can never reach the control never hears it, and a `Tooltip` has nothing to
20
+ * attach to. `aria-disabled` keeps it reachable while saying it does nothing. Every press handler
21
+ * is dropped rather than wrapped, and `type` is forced to `button`, because a submit button that is
22
+ * only *aria*-disabled still submits its form.
23
+ *
24
+ * `label` is the control's name as plain text — an explicit `aria-label`, or the children when they
25
+ * are a string — and comes back as `"<label>, <Soon>"`. Pass `undefined` when there is no such text,
26
+ * and render `ComingSoonMark` with `announce` instead.
27
+ */
28
+ export declare function comingSoonProps(label: string | undefined, comingSoon: string): {
29
+ 'aria-disabled': true;
30
+ 'data-coming-soon': string;
31
+ type: 'button';
32
+ onPress: undefined;
33
+ onPressStart: undefined;
34
+ onPressEnd: undefined;
35
+ onPressUp: undefined;
36
+ onPressChange: undefined;
37
+ onClick: undefined;
38
+ 'aria-label'?: string | undefined;
39
+ };
@@ -0,0 +1,40 @@
1
+ /**
2
+ * The "Soon" mark `Button` and `Ribbon.Command` draw after their label while `isComingSoon`.
3
+ *
4
+ * Private: the mark means nothing on its own, only beside the label of a control that is focusable
5
+ * and inert. It is drawn, never announced — the announcement is the control's name, which
6
+ * `comingSoonProps` builds whenever the label is plain text. `announce` is the fallback for a label
7
+ * that is not (an element, a formatted fragment): a hidden ", Soon" read as part of the content.
8
+ * Second best, because the hidden span is absolutely positioned and name computation pads a
9
+ * non-inline box with spaces — "Registrar cobro , Pronto".
10
+ */
11
+ export declare function ComingSoonMark({ announce }: {
12
+ announce: boolean;
13
+ }): import("react").JSX.Element;
14
+ /**
15
+ * What `isComingSoon` does to a React Aria button's props, shared so `Button` and `Ribbon.Command`
16
+ * cannot drift apart.
17
+ *
18
+ * Not `isDisabled`: that takes the control out of the tab order, and the mark is the message — a
19
+ * screen-reader user who can never reach the control never hears it, and a `Tooltip` has nothing to
20
+ * attach to. `aria-disabled` keeps it reachable while saying it does nothing. Every press handler
21
+ * is dropped rather than wrapped, and `type` is forced to `button`, because a submit button that is
22
+ * only *aria*-disabled still submits its form.
23
+ *
24
+ * `label` is the control's name as plain text — an explicit `aria-label`, or the children when they
25
+ * are a string — and comes back as `"<label>, <Soon>"`. Pass `undefined` when there is no such text,
26
+ * and render `ComingSoonMark` with `announce` instead.
27
+ */
28
+ export declare function comingSoonProps(label: string | undefined, comingSoon: string): {
29
+ 'aria-disabled': true;
30
+ 'data-coming-soon': string;
31
+ type: 'button';
32
+ onPress: undefined;
33
+ onPressStart: undefined;
34
+ onPressEnd: undefined;
35
+ onPressUp: undefined;
36
+ onPressChange: undefined;
37
+ onClick: undefined;
38
+ 'aria-label'?: string | undefined;
39
+ };
40
+ //# sourceMappingURL=ComingSoonMark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComingSoonMark.d.ts","sourceRoot":"","sources":["../../../src/components/core/ComingSoonMark.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,+BAUjE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,UAAU,EAAE,MAAM;;;UAInE,QAAQ;;;;;;;;EASjB"}
@@ -23,6 +23,16 @@ export interface DataTableColumn<T = any> {
23
23
  */
24
24
  hideLabel?: boolean;
25
25
  render?: (row: T) => React.ReactNode;
26
+ /**
27
+ * The field this cell shows while its row is being edited (`editingRowId`, `pendingRow`). Pass an
28
+ * `Input`, `Select`, `NumberField`… with `aria-label` — there is no visible label in a cell — and
29
+ * own its value yourself. A column without one keeps showing its value, or nothing on the pending
30
+ * row, which has no value yet.
31
+ *
32
+ * For the pending row it is called with `pendingRow`, which is not a full record: read nothing
33
+ * off it that the pending row does not carry.
34
+ */
35
+ renderEdit?: (row: T) => React.ReactNode;
26
36
  /**
27
37
  * Freezes the column at the start of the grid while the rest scroll horizontally. For a
28
38
  * comparison matrix — one product across thirty-four branches — where the row is unreadable
@@ -116,6 +126,30 @@ export interface DataTableProps<T extends {
116
126
  expandedIds?: Array<string | number>;
117
127
  /** Swaps the body for skeleton rows derived from `columns` and `density`, keeping the header. */
118
128
  isLoading?: boolean;
129
+ /**
130
+ * The row currently being edited in place. Its `renderEdit` cells swap in for their values, focus
131
+ * goes to the first field, and every key typed into a field belongs to that field — Space types a
132
+ * space, arrows move the caret, letters do not start a row search. Enter in any field calls
133
+ * `onCommitRow`, Escape calls `onCancelRow`; the table does not leave edit mode on its own, so
134
+ * clear this (or keep it, if the save failed) in those handlers.
135
+ *
136
+ * For a 1–3 field master — brands, reasons, helpdesk categories — that has no page or dialog of
137
+ * its own. A row with more fields than that wants `SidePanel presentation="docked"` instead.
138
+ */
139
+ editingRowId?: string | number;
140
+ /**
141
+ * A new record that does not exist in `rows` yet, rendered as an editing row above them. Lets
142
+ * "New brand" add a row without inventing a placeholder id. Its handlers receive `null` as the id.
143
+ *
144
+ * After `onCommitRow(null)` focus returns to the pending row's first field, so a consumer that
145
+ * saves and passes a fresh blank `pendingRow` gives the "Enter saves and opens another" loop with
146
+ * no focus handling of its own.
147
+ */
148
+ pendingRow?: Partial<T>;
149
+ /** Enter in a field of the editing row. `null` for `pendingRow`. */
150
+ onCommitRow?: (id: string | number | null) => void;
151
+ /** Escape in a field of the editing row. `null` for `pendingRow`. */
152
+ onCancelRow?: (id: string | number | null) => void;
119
153
  /** Skeleton row count. Defaults to the current `rows` length, or 5 when there are none. */
120
154
  loadingRowCount?: number;
121
155
  /** Overrides the dictionary's `dataTableLoading`, announced while the body is a skeleton. */
@@ -128,4 +162,4 @@ export interface DataTableProps<T extends {
128
162
  * screen-reader row/column announcements — do not hand-roll a <table> in product code. */
129
163
  export declare function DataTable<T extends {
130
164
  id: string | number;
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;
165
+ }>({ columns, rows, density, selectable, selected, onSelectionChange, hideSelectAll, sort, onSortChange, onRowAction, stickyHeader, emptyLabel, isLoading, loadingRowCount, loadingLabel, footer, rowProps, renderExpanded, expandedIds, editingRowId, pendingRow, onCommitRow, onCancelRow, className, style, ...rest }: DataTableProps<T>): React.JSX.Element;
@@ -23,6 +23,16 @@ export interface DataTableColumn<T = any> {
23
23
  */
24
24
  hideLabel?: boolean;
25
25
  render?: (row: T) => React.ReactNode;
26
+ /**
27
+ * The field this cell shows while its row is being edited (`editingRowId`, `pendingRow`). Pass an
28
+ * `Input`, `Select`, `NumberField`… with `aria-label` — there is no visible label in a cell — and
29
+ * own its value yourself. A column without one keeps showing its value, or nothing on the pending
30
+ * row, which has no value yet.
31
+ *
32
+ * For the pending row it is called with `pendingRow`, which is not a full record: read nothing
33
+ * off it that the pending row does not carry.
34
+ */
35
+ renderEdit?: (row: T) => React.ReactNode;
26
36
  /**
27
37
  * Freezes the column at the start of the grid while the rest scroll horizontally. For a
28
38
  * comparison matrix — one product across thirty-four branches — where the row is unreadable
@@ -116,6 +126,30 @@ export interface DataTableProps<T extends {
116
126
  expandedIds?: Array<string | number>;
117
127
  /** Swaps the body for skeleton rows derived from `columns` and `density`, keeping the header. */
118
128
  isLoading?: boolean;
129
+ /**
130
+ * The row currently being edited in place. Its `renderEdit` cells swap in for their values, focus
131
+ * goes to the first field, and every key typed into a field belongs to that field — Space types a
132
+ * space, arrows move the caret, letters do not start a row search. Enter in any field calls
133
+ * `onCommitRow`, Escape calls `onCancelRow`; the table does not leave edit mode on its own, so
134
+ * clear this (or keep it, if the save failed) in those handlers.
135
+ *
136
+ * For a 1–3 field master — brands, reasons, helpdesk categories — that has no page or dialog of
137
+ * its own. A row with more fields than that wants `SidePanel presentation="docked"` instead.
138
+ */
139
+ editingRowId?: string | number;
140
+ /**
141
+ * A new record that does not exist in `rows` yet, rendered as an editing row above them. Lets
142
+ * "New brand" add a row without inventing a placeholder id. Its handlers receive `null` as the id.
143
+ *
144
+ * After `onCommitRow(null)` focus returns to the pending row's first field, so a consumer that
145
+ * saves and passes a fresh blank `pendingRow` gives the "Enter saves and opens another" loop with
146
+ * no focus handling of its own.
147
+ */
148
+ pendingRow?: Partial<T>;
149
+ /** Enter in a field of the editing row. `null` for `pendingRow`. */
150
+ onCommitRow?: (id: string | number | null) => void;
151
+ /** Escape in a field of the editing row. `null` for `pendingRow`. */
152
+ onCancelRow?: (id: string | number | null) => void;
119
153
  /** Skeleton row count. Defaults to the current `rows` length, or 5 when there are none. */
120
154
  loadingRowCount?: number;
121
155
  /** Overrides the dictionary's `dataTableLoading`, announced while the body is a skeleton. */
@@ -128,5 +162,5 @@ export interface DataTableProps<T extends {
128
162
  * screen-reader row/column announcements — do not hand-roll a <table> in product code. */
129
163
  export declare function DataTable<T extends {
130
164
  id: string | number;
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;
165
+ }>({ columns, rows, density, selectable, selected, onSelectionChange, hideSelectAll, sort, onSortChange, onRowAction, stickyHeader, emptyLabel, isLoading, loadingRowCount, loadingLabel, footer, rowProps, renderExpanded, expandedIds, editingRowId, pendingRow, onCommitRow, onCancelRow, className, style, ...rest }: DataTableProps<T>): React.JSX.Element;
132
166
  //# 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,MAAM,OAAO,CAAC;AAgC/B;yCACyC;AACzC,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,aAAa,GAAG,SAAS,CAAC;AAEjG,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;;;;;OAKG;IACH,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;IACrC;;;;;;;OAO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I,CAAC;IACnD,qEAAqE;IACrE,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD,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,EAC3D,OAAO,EACP,IAAI,EACJ,OAAmB,EACnB,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,YAAmB,EACnB,UAAU,EACV,SAAS,EACT,eAAe,EACf,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,cAAc,EACd,WAAW,EACX,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,cAAc,CAAC,CAAC,CAAC,qBAmXnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/components/forms/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAKpC,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5F,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wDAAwD;IACxD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,kFAAkF;IAClF,MAAM,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;IAClC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;8DAC8D;AAC9D,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,OAAO,EACP,UAAU,EACV,IAAI,EACJ,KAAK,EACL,MAAkB,EAClB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,cAAc,qBAgChB"}
1
+ {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/components/forms/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAMpC,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5F,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wDAAwD;IACxD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,kFAAkF;IAClF,MAAM,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;IAClC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;8DAC8D;AAC9D,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,OAAO,EACP,UAAU,EACV,IAAI,EACJ,KAAK,EACL,MAAkB,EAClB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,cAAc,qBA4ChB"}
@@ -1,9 +1,36 @@
1
- import type * as React from 'react';
1
+ import * as React from 'react';
2
+ /** A noun in the two forms a count needs. `one` for a grammatically singular count, `other` for the
3
+ * rest — the same split `Intl.PluralRules` makes, which is what picks between them. */
4
+ export interface SelectionBarNoun {
5
+ one: string;
6
+ other: string;
7
+ }
2
8
  export interface SelectionBarProps extends React.HTMLAttributes<HTMLDivElement> {
3
9
  /** Number of selected records. The bar renders nothing at 0. */
4
10
  count: number;
5
- /** Noun for the records, singular. Default "record". */
6
- noun?: string;
11
+ /**
12
+ * The records' noun. Pass both forms — `{ one: 'orden', other: 'órdenes' }` — since a plural is
13
+ * not the singular plus an "s" in any language this library ships for.
14
+ *
15
+ * A bare string is still accepted and pluralised the old English way, by appending "s". That is
16
+ * kept so existing English screens do not change; do not use it for anything else. Defaults to
17
+ * the dictionary's `selectionBarNounOne` / `selectionBarNounOther`.
18
+ */
19
+ noun?: string | SelectionBarNoun;
20
+ /**
21
+ * Grammatical gender of `noun`, for the participle that agrees with it: "2 órdenes
22
+ * seleccionadas", "2 presupuestos seleccionados". Picks the dictionary's `…Feminine` entries.
23
+ * Default `masculine`, which is also the gender of the default noun.
24
+ */
25
+ gender?: 'masculine' | 'feminine';
26
+ /** Replaces the whole sentence, for a screen that needs a phrasing the dictionary cannot build.
27
+ * Called with the raw count; format it yourself. */
28
+ label?: (count: number) => React.ReactNode;
29
+ /** Renders the bar's own "Clear selection" button after the count. Every selection bar needs
30
+ * one, and the bar is the only place on screen that knows it is the selection being cleared. */
31
+ onClear?: () => void;
32
+ /** Overrides the dictionary's `selectionBarClear`. */
33
+ clearLabel?: string;
7
34
  /** What happens on commit — mass posting caveats belong here, not in a toast. */
8
35
  children?: React.ReactNode;
9
36
  /** Buttons, size="sm". Destructive last. */
@@ -11,4 +38,4 @@ export interface SelectionBarProps extends React.HTMLAttributes<HTMLDivElement>
11
38
  }
12
39
  /** Appears above a table once rows are selected and states exactly how many.
13
40
  * The count is announced, so keyboard users know a selection changed. */
14
- export declare function SelectionBar({ count, noun, children, actions, className, ...rest }: SelectionBarProps): React.JSX.Element | null;
41
+ export declare function SelectionBar({ count, noun, gender, label, onClear, clearLabel, children, actions, className, ...rest }: SelectionBarProps): React.JSX.Element | null;
@@ -1,9 +1,36 @@
1
- import type * as React from 'react';
1
+ import * as React from 'react';
2
+ /** A noun in the two forms a count needs. `one` for a grammatically singular count, `other` for the
3
+ * rest — the same split `Intl.PluralRules` makes, which is what picks between them. */
4
+ export interface SelectionBarNoun {
5
+ one: string;
6
+ other: string;
7
+ }
2
8
  export interface SelectionBarProps extends React.HTMLAttributes<HTMLDivElement> {
3
9
  /** Number of selected records. The bar renders nothing at 0. */
4
10
  count: number;
5
- /** Noun for the records, singular. Default "record". */
6
- noun?: string;
11
+ /**
12
+ * The records' noun. Pass both forms — `{ one: 'orden', other: 'órdenes' }` — since a plural is
13
+ * not the singular plus an "s" in any language this library ships for.
14
+ *
15
+ * A bare string is still accepted and pluralised the old English way, by appending "s". That is
16
+ * kept so existing English screens do not change; do not use it for anything else. Defaults to
17
+ * the dictionary's `selectionBarNounOne` / `selectionBarNounOther`.
18
+ */
19
+ noun?: string | SelectionBarNoun;
20
+ /**
21
+ * Grammatical gender of `noun`, for the participle that agrees with it: "2 órdenes
22
+ * seleccionadas", "2 presupuestos seleccionados". Picks the dictionary's `…Feminine` entries.
23
+ * Default `masculine`, which is also the gender of the default noun.
24
+ */
25
+ gender?: 'masculine' | 'feminine';
26
+ /** Replaces the whole sentence, for a screen that needs a phrasing the dictionary cannot build.
27
+ * Called with the raw count; format it yourself. */
28
+ label?: (count: number) => React.ReactNode;
29
+ /** Renders the bar's own "Clear selection" button after the count. Every selection bar needs
30
+ * one, and the bar is the only place on screen that knows it is the selection being cleared. */
31
+ onClear?: () => void;
32
+ /** Overrides the dictionary's `selectionBarClear`. */
33
+ clearLabel?: string;
7
34
  /** What happens on commit — mass posting caveats belong here, not in a toast. */
8
35
  children?: React.ReactNode;
9
36
  /** Buttons, size="sm". Destructive last. */
@@ -11,5 +38,5 @@ export interface SelectionBarProps extends React.HTMLAttributes<HTMLDivElement>
11
38
  }
12
39
  /** Appears above a table once rows are selected and states exactly how many.
13
40
  * The count is announced, so keyboard users know a selection changed. */
14
- export declare function SelectionBar({ count, noun, children, actions, className, ...rest }: SelectionBarProps): React.JSX.Element | null;
41
+ export declare function SelectionBar({ count, noun, gender, label, onClear, clearLabel, children, actions, className, ...rest }: SelectionBarProps): React.JSX.Element | null;
15
42
  //# sourceMappingURL=SelectionBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionBar.d.ts","sourceRoot":"","sources":["../../../src/components/layout/SelectionBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC7E,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iFAAiF;IACjF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,4CAA4C;IAC5C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;0EAC0E;AAC1E,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,IAAe,EACf,QAAQ,EACR,OAAO,EACP,SAAS,EACT,GAAG,IAAI,EACR,EAAE,iBAAiB,4BAcnB"}
1
+ {"version":3,"file":"SelectionBar.d.ts","sourceRoot":"","sources":["../../../src/components/layout/SelectionBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;wFACwF;AACxF,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC7E,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC;IACjC;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IAClC;yDACqD;IACrD,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC3C;qGACiG;IACjG,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,4CAA4C;IAC5C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;0EAC0E;AAC1E,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,IAAI,EACJ,MAAoB,EACpB,KAAK,EACL,OAAO,EACP,UAAU,EACV,QAAQ,EACR,OAAO,EACP,SAAS,EACT,GAAG,IAAI,EACR,EAAE,iBAAiB,4BA6CnB"}
@@ -1,4 +1,4 @@
1
- import type * as React from 'react';
1
+ import * as React from 'react';
2
2
  export interface BreadcrumbItem {
3
3
  id?: string;
4
4
  label: string;
@@ -8,7 +8,17 @@ export interface BreadcrumbProps {
8
8
  /** Ordered trail, current page last. The last item is never a link. */
9
9
  items: BreadcrumbItem[];
10
10
  onNavigate?: (id: string) => void;
11
+ /**
12
+ * Keeps the trail on one line however narrow its container gets. When the whole trail does not
13
+ * fit, the middle steps fold into a "…" button that opens them as a menu, keeping the first and
14
+ * current steps on screen. On a phone-narrow container the first step folds in too. The current
15
+ * step is never folded: it truncates with an ellipsis instead, its full text kept in `title`.
16
+ *
17
+ * Off by default, where the trail wraps instead. `ShellBar`'s `breadcrumb` turns it on, because
18
+ * a 48px bar has no second line to wrap onto.
19
+ */
20
+ isCollapsible?: boolean;
11
21
  className?: string;
12
22
  style?: React.CSSProperties;
13
23
  }
14
- export declare function Breadcrumb({ items, onNavigate, className, style }: BreadcrumbProps): React.JSX.Element;
24
+ export declare function Breadcrumb({ items, onNavigate, isCollapsible, className, style }: BreadcrumbProps): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import type * as React from 'react';
1
+ import * as React from 'react';
2
2
  export interface BreadcrumbItem {
3
3
  id?: string;
4
4
  label: string;
@@ -8,8 +8,18 @@ export interface BreadcrumbProps {
8
8
  /** Ordered trail, current page last. The last item is never a link. */
9
9
  items: BreadcrumbItem[];
10
10
  onNavigate?: (id: string) => void;
11
+ /**
12
+ * Keeps the trail on one line however narrow its container gets. When the whole trail does not
13
+ * fit, the middle steps fold into a "…" button that opens them as a menu, keeping the first and
14
+ * current steps on screen. On a phone-narrow container the first step folds in too. The current
15
+ * step is never folded: it truncates with an ellipsis instead, its full text kept in `title`.
16
+ *
17
+ * Off by default, where the trail wraps instead. `ShellBar`'s `breadcrumb` turns it on, because
18
+ * a 48px bar has no second line to wrap onto.
19
+ */
20
+ isCollapsible?: boolean;
11
21
  className?: string;
12
22
  style?: React.CSSProperties;
13
23
  }
14
- export declare function Breadcrumb({ items, onNavigate, className, style }: BreadcrumbProps): React.JSX.Element;
24
+ export declare function Breadcrumb({ items, onNavigate, isCollapsible, className, style }: BreadcrumbProps): React.JSX.Element;
15
25
  //# sourceMappingURL=Breadcrumb.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/Breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAKpC,MAAM,WAAW,cAAc;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,uEAAuE;IACvE,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,eAAe,qBAmBlF"}
1
+ {"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/Breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,MAAM,WAAW,cAAc;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,uEAAuE;IACvE,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AA0CD,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,eAAe,qBAiHjG"}
@@ -13,6 +13,33 @@ export interface RibbonCommandProps {
13
13
  /** Disables the command while nothing is selected. Use it for anything that acts *on rows* —
14
14
  * a command that fires against an empty selection is the bug this prevents. */
15
15
  requiresSelection?: boolean;
16
+ /**
17
+ * An action the product will have but does not have yet: drawn in the tertiary ink with a "Soon"
18
+ * mark, in the band and in the collapsed bar, focusable with `aria-disabled="true"`, and never
19
+ * pressed. See `Button`'s `isComingSoon` for why this is not `isDisabled`.
20
+ *
21
+ * `requiresSelection` never brings it to life — an action that does not exist does not start
22
+ * existing because rows were selected.
23
+ */
24
+ isComingSoon?: boolean;
25
+ /**
26
+ * The screen's main action — "Nuevo presupuesto", "Facturar", "Aprobar". Declared once and drawn
27
+ * in the primary fill in both modes: as the first large tile of its group while the ribbon is
28
+ * open (it is always `lg`, whatever `size` says), and at the very front of the collapsed bar,
29
+ * before `leading`, without needing `inBar`.
30
+ *
31
+ * One per ribbon. It is what `leading` was being borrowed for, and `leading` keeps its own job:
32
+ * row context such as the saved-view chip, not an action. Ignored on a contextual tab's commands,
33
+ * which never reach the bar.
34
+ */
35
+ isPrimary?: boolean;
36
+ /**
37
+ * Explanation shown on hover and on keyboard focus. Commands are configuration elements, so a
38
+ * `Tooltip` cannot be wrapped around one from outside; this is the slot instead. Its natural
39
+ * partner is `isComingSoon` — "Sends the order PDF to the customer's WhatsApp" — but any command
40
+ * can carry one.
41
+ */
42
+ tooltip?: React.ReactNode;
16
43
  /** Also shows the command in the collapsed bar. Reserve it for the handful a user reaches for
17
44
  * without opening the ribbon; a bar that carries everything is the ribbon again, in one row. */
18
45
  inBar?: boolean;
@@ -13,6 +13,33 @@ export interface RibbonCommandProps {
13
13
  /** Disables the command while nothing is selected. Use it for anything that acts *on rows* —
14
14
  * a command that fires against an empty selection is the bug this prevents. */
15
15
  requiresSelection?: boolean;
16
+ /**
17
+ * An action the product will have but does not have yet: drawn in the tertiary ink with a "Soon"
18
+ * mark, in the band and in the collapsed bar, focusable with `aria-disabled="true"`, and never
19
+ * pressed. See `Button`'s `isComingSoon` for why this is not `isDisabled`.
20
+ *
21
+ * `requiresSelection` never brings it to life — an action that does not exist does not start
22
+ * existing because rows were selected.
23
+ */
24
+ isComingSoon?: boolean;
25
+ /**
26
+ * The screen's main action — "Nuevo presupuesto", "Facturar", "Aprobar". Declared once and drawn
27
+ * in the primary fill in both modes: as the first large tile of its group while the ribbon is
28
+ * open (it is always `lg`, whatever `size` says), and at the very front of the collapsed bar,
29
+ * before `leading`, without needing `inBar`.
30
+ *
31
+ * One per ribbon. It is what `leading` was being borrowed for, and `leading` keeps its own job:
32
+ * row context such as the saved-view chip, not an action. Ignored on a contextual tab's commands,
33
+ * which never reach the bar.
34
+ */
35
+ isPrimary?: boolean;
36
+ /**
37
+ * Explanation shown on hover and on keyboard focus. Commands are configuration elements, so a
38
+ * `Tooltip` cannot be wrapped around one from outside; this is the slot instead. Its natural
39
+ * partner is `isComingSoon` — "Sends the order PDF to the customer's WhatsApp" — but any command
40
+ * can carry one.
41
+ */
42
+ tooltip?: React.ReactNode;
16
43
  /** Also shows the command in the collapsed bar. Reserve it for the handful a user reaches for
17
44
  * without opening the ribbon; a bar that carries everything is the ribbon again, in one row. */
18
45
  inBar?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Ribbon.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/Ribbon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,kBAAkB;IACjC;6FACyF;IACzF,KAAK,EAAE,MAAM,CAAC;IACd,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;kGAC8F;IAC9F,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;oFACgF;IAChF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;qGACiG;IACjG,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B;yEACqE;IACrE,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd;wF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,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,mGAAmG;IACnG,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD;;kBAEc;IACd,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iGAAiG;IACjG,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;4FACwF;IACxF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAqBD,0BAA0B;AAC1B,eAAO,MAAM,SAAS,EAAsC,CAAC,KAAK,EAAE,cAAc,KAAK,KAAK,CAAC,YAAY,CAAC;AAC1G,4BAA4B;AAC5B,eAAO,MAAM,WAAW,EAA4C,CAClE,KAAK,EAAE,gBAAgB,KACpB,KAAK,CAAC,YAAY,CAAC;AACxB,8BAA8B;AAC9B,eAAO,MAAM,aAAa,EAAgD,CACxE,KAAK,EAAE,kBAAkB,KACtB,KAAK,CAAC,YAAY,CAAC;AAsQxB;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,OAAO,EACP,cAAc,EACd,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,WAAW,qBAmLb;yBAhMe,MAAM;aAkMT,SAAS;aACP,WAAW;aACT,aAAa"}
@@ -1,4 +1,5 @@
1
1
  import type * as React from 'react';
2
+ import { type BreadcrumbItem } from './Breadcrumb.cjs';
2
3
  export interface ShellBarProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
3
4
  /** Wordmark at far left, uppercase micro-caps. */
4
5
  product?: string;
@@ -6,6 +7,23 @@ export interface ShellBarProps extends Omit<React.HTMLAttributes<HTMLElement>, '
6
7
  monogram?: string;
7
8
  /** Current app or object title. */
8
9
  title?: React.ReactNode;
10
+ /**
11
+ * Where the user is — "Ventas › Órdenes de venta › OV-000128" — drawn after `product`, behind a
12
+ * separator, in the bar's own colours. Current step last; it is marked `aria-current="page"` and
13
+ * is never a link. `href`s navigate through `RouterProvider`, like every other Pire link.
14
+ *
15
+ * The trail is the part of the bar that gives way: it takes the room the actions leave, folds its
16
+ * middle steps into a "…" menu when it does not fit, and then truncates the current step with an
17
+ * ellipsis. A screen that draws its own `Breadcrumb` above the page can drop it — the bar keeps
18
+ * the trail in one place on every screen without costing a row of height.
19
+ *
20
+ * Prefer this to putting a `Breadcrumb` in `title`, which sets it in bold, on the page's link
21
+ * colours, and with no width management.
22
+ */
23
+ breadcrumb?: BreadcrumbItem[];
24
+ /** Called with a step's `id` (or its `label` when it has none) when it is pressed — for a step
25
+ * without an `href`, or to observe navigation. Same contract as `Breadcrumb`'s `onNavigate`. */
26
+ onBreadcrumbNavigate?: (id: string) => void;
9
27
  /**
10
28
  * The leftmost cell of the bar — pass an `AppLauncher`.
11
29
  *
@@ -41,4 +59,4 @@ export interface ShellBarProps extends Omit<React.HTMLAttributes<HTMLElement>, '
41
59
  userMenuLabel?: string;
42
60
  }
43
61
  /** Fixed 48px application chrome. One per page, always the first landmark. */
44
- export declare function ShellBar({ launcher, product, monogram, title, onMenu, onSearch, menuLabel, searchLabel, actions, user, userMenu, userMenuLabel, className, ...rest }: ShellBarProps): React.JSX.Element;
62
+ export declare function ShellBar({ launcher, product, monogram, title, breadcrumb, onBreadcrumbNavigate, onMenu, onSearch, menuLabel, searchLabel, actions, user, userMenu, userMenuLabel, className, ...rest }: ShellBarProps): React.JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import type * as React from 'react';
2
+ import { type BreadcrumbItem } from './Breadcrumb.js';
2
3
  export interface ShellBarProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
3
4
  /** Wordmark at far left, uppercase micro-caps. */
4
5
  product?: string;
@@ -6,6 +7,23 @@ export interface ShellBarProps extends Omit<React.HTMLAttributes<HTMLElement>, '
6
7
  monogram?: string;
7
8
  /** Current app or object title. */
8
9
  title?: React.ReactNode;
10
+ /**
11
+ * Where the user is — "Ventas › Órdenes de venta › OV-000128" — drawn after `product`, behind a
12
+ * separator, in the bar's own colours. Current step last; it is marked `aria-current="page"` and
13
+ * is never a link. `href`s navigate through `RouterProvider`, like every other Pire link.
14
+ *
15
+ * The trail is the part of the bar that gives way: it takes the room the actions leave, folds its
16
+ * middle steps into a "…" menu when it does not fit, and then truncates the current step with an
17
+ * ellipsis. A screen that draws its own `Breadcrumb` above the page can drop it — the bar keeps
18
+ * the trail in one place on every screen without costing a row of height.
19
+ *
20
+ * Prefer this to putting a `Breadcrumb` in `title`, which sets it in bold, on the page's link
21
+ * colours, and with no width management.
22
+ */
23
+ breadcrumb?: BreadcrumbItem[];
24
+ /** Called with a step's `id` (or its `label` when it has none) when it is pressed — for a step
25
+ * without an `href`, or to observe navigation. Same contract as `Breadcrumb`'s `onNavigate`. */
26
+ onBreadcrumbNavigate?: (id: string) => void;
9
27
  /**
10
28
  * The leftmost cell of the bar — pass an `AppLauncher`.
11
29
  *
@@ -41,5 +59,5 @@ export interface ShellBarProps extends Omit<React.HTMLAttributes<HTMLElement>, '
41
59
  userMenuLabel?: string;
42
60
  }
43
61
  /** Fixed 48px application chrome. One per page, always the first landmark. */
44
- export declare function ShellBar({ launcher, product, monogram, title, onMenu, onSearch, menuLabel, searchLabel, actions, user, userMenu, userMenuLabel, className, ...rest }: ShellBarProps): React.JSX.Element;
62
+ export declare function ShellBar({ launcher, product, monogram, title, breadcrumb, onBreadcrumbNavigate, onMenu, onSearch, menuLabel, searchLabel, actions, user, userMenu, userMenuLabel, className, ...rest }: ShellBarProps): React.JSX.Element;
45
63
  //# sourceMappingURL=ShellBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ShellBar.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/ShellBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAMpC,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IACrF,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;kGAC8F;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;oEAEgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;mGAC+F;IAC/F,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAWD,8EAA8E;AAC9E,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,KAAK,EACL,MAAM,EACN,QAAQ,EACR,SAA6B,EAC7B,WAAsB,EACtB,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,SAAS,EACT,GAAG,IAAI,EACR,EAAE,aAAa,qBAwCf"}
1
+ {"version":3,"file":"ShellBar.d.ts","sourceRoot":"","sources":["../../../src/components/nav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EACJ,QAAQ,EACR,aAAa,EACb,SAAS,EACT,GAAG,IAAI,EACR,EAAE,aAAa,qBAgDf"}
@@ -1,14 +1,28 @@
1
- import type * as React from 'react';
1
+ import * as React from 'react';
2
2
  export interface SidePanelProps {
3
3
  isOpen?: boolean;
4
4
  title?: React.ReactNode;
5
5
  subtitle?: React.ReactNode;
6
6
  /** Panel width in px. 400 default; 560 for editable forms. */
7
7
  width?: number;
8
+ /**
9
+ * `modal` (default) overlays the page: a scrim, a focus trap, the list behind it inert. Right for
10
+ * a detail that interrupts.
11
+ *
12
+ * `docked` puts the panel *in the flow* — place it beside the table in a flex row — with no scrim
13
+ * and no trap, so the list stays usable and choosing another row switches the record being
14
+ * edited. Right for a 4–8 field master (categories, cost centres, cash boxes) that has no page of
15
+ * its own. `Escape` inside the panel still calls `onClose`.
16
+ *
17
+ * Opening a docked panel does not move focus: it opens because the user picked a row, and pulling
18
+ * them out of the table each time they pick another would make the list unusable from the
19
+ * keyboard. At a phone's width (600px or less) the panel falls back to the modal presentation.
20
+ */
21
+ presentation?: 'modal' | 'docked';
8
22
  children?: React.ReactNode;
9
23
  footer?: React.ReactNode;
10
24
  onClose?: () => void;
11
25
  className?: string;
12
26
  }
13
- /** Right-hand overlay for details and edits that must keep the list in view. */
14
- export declare function SidePanel({ isOpen, title, subtitle, width, children, footer, onClose, className, }: SidePanelProps): React.JSX.Element;
27
+ /** Right-hand panel for details and edits that must keep the list in view. */
28
+ export declare function SidePanel({ isOpen, title, subtitle, width, presentation, children, footer, onClose, className, }: SidePanelProps): React.JSX.Element | null;