@orianatech/pire 0.13.0 → 0.15.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 (35) hide show
  1. package/dist/components/core/Icon.d.ts.map +1 -1
  2. package/dist/components/core/Kbd.d.cts +17 -0
  3. package/dist/components/core/Kbd.d.ts +18 -0
  4. package/dist/components/core/Kbd.d.ts.map +1 -0
  5. package/dist/components/core/icon-data.generated.d.ts.map +1 -1
  6. package/dist/components/core/icon-map.d.cts +9 -0
  7. package/dist/components/core/icon-map.d.ts +9 -0
  8. package/dist/components/core/icon-map.d.ts.map +1 -1
  9. package/dist/components/forms/ValueHelpField.d.cts +12 -1
  10. package/dist/components/forms/ValueHelpField.d.ts +12 -1
  11. package/dist/components/forms/ValueHelpField.d.ts.map +1 -1
  12. package/dist/components/navigation/Menu.d.cts +7 -2
  13. package/dist/components/navigation/Menu.d.ts +7 -2
  14. package/dist/components/navigation/Menu.d.ts.map +1 -1
  15. package/dist/components/navigation/ShellBar.d.cts +13 -1
  16. package/dist/components/navigation/ShellBar.d.ts +13 -1
  17. package/dist/components/navigation/ShellBar.d.ts.map +1 -1
  18. package/dist/components/patterns/CommandPalette.d.cts +97 -0
  19. package/dist/components/patterns/CommandPalette.d.ts +98 -0
  20. package/dist/components/patterns/CommandPalette.d.ts.map +1 -0
  21. package/dist/components/patterns/ValueHelpDialog.d.cts +22 -1
  22. package/dist/components/patterns/ValueHelpDialog.d.ts +22 -1
  23. package/dist/components/patterns/ValueHelpDialog.d.ts.map +1 -1
  24. package/dist/components.css +76 -2
  25. package/dist/i18n/messages.d.cts +26 -0
  26. package/dist/i18n/messages.d.ts +26 -0
  27. package/dist/i18n/messages.d.ts.map +1 -1
  28. package/dist/index.cjs +909 -521
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.cts +3 -0
  31. package/dist/index.d.ts +3 -0
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +803 -408
  34. package/dist/index.js.map +1 -1
  35. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/core/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AA2BpC;6FAC6F;AAC7F,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE3C,MAAM,WAAW,UAAU;IACzB;wEACoE;IACpE,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;yEAEqE;IACrE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;qFAEiF;IACjF,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CAChD;AAID;2CAC2C;AAC3C,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAerD;AAED,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC;IACxF,kGAAkG;IAClG,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED;;;;;4EAK4E;AAC5E,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,IAAS,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,qBAqC/E"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/core/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AA2BpC;6FAC6F;AAC7F,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE3C,MAAM,WAAW,UAAU;IACzB;wEACoE;IACpE,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;yEAEqE;IACrE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;qFAEiF;IACjF,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CAChD;AAID;2CAC2C;AAC3C,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAerD;AAED,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC;IACxF,kGAAkG;IAClG,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED;;;;;4EAK4E;AAC5E,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,IAAS,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,qBA4C/E"}
@@ -0,0 +1,17 @@
1
+ import type * as React from 'react';
2
+ export interface KbdProps extends React.HTMLAttributes<HTMLElement> {
3
+ /** One key per element — compose several for a chord: `<Kbd>⌘</Kbd><Kbd>K</Kbd>`. */
4
+ children: React.ReactNode;
5
+ /** `sm` for inline use inside running text, where a full-size cap sits taller than the line. */
6
+ size?: 'sm' | 'md';
7
+ }
8
+ /**
9
+ * A single key, drawn as a key cap.
10
+ *
11
+ * Renders a real `<kbd>`, so assistive tech announces it as keyboard input rather than as loose
12
+ * text. It is painted only — nothing here binds a shortcut; that stays with the app.
13
+ *
14
+ * One key per element. A chord is several of these side by side, which keeps each cap the size of
15
+ * its own glyph instead of stretching one cap across "Ctrl+Shift+K".
16
+ */
17
+ export declare function Kbd({ children, size, className, ...rest }: KbdProps): React.JSX.Element;
@@ -0,0 +1,18 @@
1
+ import type * as React from 'react';
2
+ export interface KbdProps extends React.HTMLAttributes<HTMLElement> {
3
+ /** One key per element — compose several for a chord: `<Kbd>⌘</Kbd><Kbd>K</Kbd>`. */
4
+ children: React.ReactNode;
5
+ /** `sm` for inline use inside running text, where a full-size cap sits taller than the line. */
6
+ size?: 'sm' | 'md';
7
+ }
8
+ /**
9
+ * A single key, drawn as a key cap.
10
+ *
11
+ * Renders a real `<kbd>`, so assistive tech announces it as keyboard input rather than as loose
12
+ * text. It is painted only — nothing here binds a shortcut; that stays with the app.
13
+ *
14
+ * One key per element. A chord is several of these side by side, which keeps each cap the size of
15
+ * its own glyph instead of stretching one cap across "Ctrl+Shift+K".
16
+ */
17
+ export declare function Kbd({ children, size, className, ...rest }: KbdProps): React.JSX.Element;
18
+ //# sourceMappingURL=Kbd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Kbd.d.ts","sourceRoot":"","sources":["../../../src/components/core/Kbd.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,QAAS,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACjE,qFAAqF;IACrF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,gGAAgG;IAChG,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAW,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,qBAI1E"}
@@ -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,CAgE9C,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,CA2I9C,CAAC"}
@@ -11,3 +11,12 @@
11
11
  * point at one slug (`boxes` and `package` both mean `box`); the generator de-duplicates.
12
12
  */
13
13
  export declare const CARBON_MAP: Record<string, string>;
14
+ /**
15
+ * Every name `Icon` can render, frozen and sorted.
16
+ *
17
+ * Exported because an unknown slug fails quietly — an empty box and one dev-only console warning,
18
+ * which is easy to lose in a busy log. A consumer that generates icon names from data can assert
19
+ * against this list at build time instead of discovering the gap in production, which is how
20
+ * `credit-card` shipped as a blank square.
21
+ */
22
+ export declare const ICON_NAMES: readonly string[];
@@ -11,4 +11,13 @@
11
11
  * point at one slug (`boxes` and `package` both mean `box`); the generator de-duplicates.
12
12
  */
13
13
  export declare const CARBON_MAP: Record<string, string>;
14
+ /**
15
+ * Every name `Icon` can render, frozen and sorted.
16
+ *
17
+ * Exported because an unknown slug fails quietly — an empty box and one dev-only console warning,
18
+ * which is easy to lose in a busy log. A consumer that generates icon names from data can assert
19
+ * against this list at build time instead of discovering the gap in production, which is how
20
+ * `credit-card` shipped as a blank square.
21
+ */
22
+ export declare const ICON_NAMES: readonly string[];
14
23
  //# sourceMappingURL=icon-map.d.ts.map
@@ -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,CAiB7C,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,CAuD7C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAAkD,CAAC"}
@@ -13,6 +13,17 @@ export interface ValueHelpFieldProps<T extends {
13
13
  rows?: T[];
14
14
  columns?: DataTableColumn<T>[];
15
15
  dialogTitle?: React.ReactNode;
16
+ /**
17
+ * Forwarded to {@link ValueHelpDialog}. Set `isFilteredExternally` and feed `rows` from
18
+ * `onSearch` when the list is too large to sit in the browser — which is the usual case for
19
+ * suppliers, customers and products.
20
+ */
21
+ onSearch?: (query: string) => void;
22
+ isFilteredExternally?: boolean;
23
+ isLoading?: boolean;
24
+ onLoadMore?: () => void;
25
+ /** Shown in the dialog when the search returns nothing. */
26
+ emptyLabel?: string;
16
27
  placeholder?: string;
17
28
  description?: React.ReactNode;
18
29
  errorMessage?: React.ReactNode;
@@ -28,4 +39,4 @@ export interface ValueHelpFieldProps<T extends {
28
39
  * the value-help trigger. Pairs Input with ValueHelpDialog so screens stop rewiring both. */
29
40
  export declare function ValueHelpField<T extends {
30
41
  id: string | number;
31
- }>({ label, value, onChange, format, rows, columns, dialogTitle, placeholder, description, errorMessage, isInvalid, isDisabled, isRequired, allowsClear, className, style }: ValueHelpFieldProps<T>): React.JSX.Element;
42
+ }>({ label, value, onChange, format, rows, columns, dialogTitle, onSearch, isFilteredExternally, isLoading, onLoadMore, emptyLabel, placeholder, description, errorMessage, isInvalid, isDisabled, isRequired, allowsClear, className, style }: ValueHelpFieldProps<T>): React.JSX.Element;
@@ -13,6 +13,17 @@ export interface ValueHelpFieldProps<T extends {
13
13
  rows?: T[];
14
14
  columns?: DataTableColumn<T>[];
15
15
  dialogTitle?: React.ReactNode;
16
+ /**
17
+ * Forwarded to {@link ValueHelpDialog}. Set `isFilteredExternally` and feed `rows` from
18
+ * `onSearch` when the list is too large to sit in the browser — which is the usual case for
19
+ * suppliers, customers and products.
20
+ */
21
+ onSearch?: (query: string) => void;
22
+ isFilteredExternally?: boolean;
23
+ isLoading?: boolean;
24
+ onLoadMore?: () => void;
25
+ /** Shown in the dialog when the search returns nothing. */
26
+ emptyLabel?: string;
16
27
  placeholder?: string;
17
28
  description?: React.ReactNode;
18
29
  errorMessage?: React.ReactNode;
@@ -28,5 +39,5 @@ export interface ValueHelpFieldProps<T extends {
28
39
  * the value-help trigger. Pairs Input with ValueHelpDialog so screens stop rewiring both. */
29
40
  export declare function ValueHelpField<T extends {
30
41
  id: string | number;
31
- }>({ label, value, onChange, format, rows, columns, dialogTitle, placeholder, description, errorMessage, isInvalid, isDisabled, isRequired, allowsClear, className, style }: ValueHelpFieldProps<T>): React.JSX.Element;
42
+ }>({ label, value, onChange, format, rows, columns, dialogTitle, onSearch, isFilteredExternally, isLoading, onLoadMore, emptyLabel, placeholder, description, errorMessage, isInvalid, isDisabled, isRequired, allowsClear, className, style }: ValueHelpFieldProps<T>): React.JSX.Element;
32
43
  //# sourceMappingURL=ValueHelpField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ValueHelpField.d.ts","sourceRoot":"","sources":["../../../src/components/forms/ValueHelpField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIzD,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,GAAG;IAC1E,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,kCAAkC;IAClC,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACnC,6EAA6E;IAC7E,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;IAC5B,yEAAyE;IACzE,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;IACX,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,KA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AU,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,mBAAmB,CAAC,CAAC,CAAC,qBAiC3F"}
@@ -16,8 +16,13 @@ export interface MenuItemProps extends Omit<AriaMenuItemProps, 'className' | 'ch
16
16
  icon?: string;
17
17
  /** Second line, for an action whose effect is not obvious from its label. */
18
18
  description?: React.ReactNode;
19
- /** Keyboard shortcut, right-aligned. Painted only — it registers nothing. */
20
- shortcut?: string;
19
+ /**
20
+ * Keyboard shortcut, right-aligned and drawn as key caps. Painted only — it registers nothing.
21
+ *
22
+ * A string is split on `+` and spaces, so `"Ctrl+Shift+P"` renders as three caps. Pass an array
23
+ * when the split cannot be inferred: `['⌘', 'N']`, since `"⌘N"` has no separator to split on.
24
+ */
25
+ shortcut?: string | string[];
21
26
  /** `danger` for a destructive action. Put it last, behind a `MenuSeparator`. */
22
27
  tone?: 'default' | 'danger';
23
28
  className?: string;
@@ -16,8 +16,13 @@ export interface MenuItemProps extends Omit<AriaMenuItemProps, 'className' | 'ch
16
16
  icon?: string;
17
17
  /** Second line, for an action whose effect is not obvious from its label. */
18
18
  description?: React.ReactNode;
19
- /** Keyboard shortcut, right-aligned. Painted only — it registers nothing. */
20
- shortcut?: string;
19
+ /**
20
+ * Keyboard shortcut, right-aligned and drawn as key caps. Painted only — it registers nothing.
21
+ *
22
+ * A string is split on `+` and spaces, so `"Ctrl+Shift+P"` renders as three caps. Pass an array
23
+ * when the split cannot be inferred: `['⌘', 'N']`, since `"⌘N"` has no separator to split on.
24
+ */
25
+ shortcut?: string | string[];
21
26
  /** `danger` for a destructive action. Put it last, behind a `MenuSeparator`. */
22
27
  tone?: 'default' | 'danger';
23
28
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,EAGL,KAAK,SAAS,IAAI,aAAa,EA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AAiB,EAAE,WAAW,GAAG,UAAU,CAAC;IACtF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC7B,gFAAgF;IAChF,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAUD,kFAAkF;AAClF,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAgB,EAAE,SAAS,EAAE,GAAG,IAAI,EAC5E,EAAE,aAAa,qBAqBf;AAGD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IACxF,wEAAwE;IACxE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,yDAAyD;AACzD,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,qBAOpF;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,EAAE,kBAAkB,qBAE9D"}
@@ -19,6 +19,18 @@ export interface ShellBarProps extends Omit<React.HTMLAttributes<HTMLElement>, '
19
19
  actions?: React.ReactNode;
20
20
  /** Full name — initials render into the avatar. */
21
21
  user?: string;
22
+ /**
23
+ * Turns the avatar into a menu trigger. Pass a `Menu` — the entries are the product's, because
24
+ * they differ per app; only the trigger belongs here.
25
+ *
26
+ * Without it the avatar stays a plain `role="img"`, so nothing that renders a bare `user` today
27
+ * changes. With it the avatar becomes a real `<button>` carrying `aria-haspopup` and
28
+ * `aria-expanded`.
29
+ */
30
+ userMenu?: React.ReactNode;
31
+ /** Accessible name of the avatar button. `{user}` is replaced with the name. Defaults to the
32
+ * dictionary's `shellBarUserMenu`, for the same reason as {@link ShellBarProps.menuLabel}. */
33
+ userMenuLabel?: string;
22
34
  }
23
35
  /** Fixed 48px application chrome. One per page, always the first landmark. */
24
- export declare function ShellBar({ product, monogram, title, onMenu, onSearch, menuLabel, searchLabel, actions, user, className, ...rest }: ShellBarProps): React.JSX.Element;
36
+ export declare function ShellBar({ product, monogram, title, onMenu, onSearch, menuLabel, searchLabel, actions, user, userMenu, userMenuLabel, className, ...rest }: ShellBarProps): React.JSX.Element;
@@ -19,7 +19,19 @@ export interface ShellBarProps extends Omit<React.HTMLAttributes<HTMLElement>, '
19
19
  actions?: React.ReactNode;
20
20
  /** Full name — initials render into the avatar. */
21
21
  user?: string;
22
+ /**
23
+ * Turns the avatar into a menu trigger. Pass a `Menu` — the entries are the product's, because
24
+ * they differ per app; only the trigger belongs here.
25
+ *
26
+ * Without it the avatar stays a plain `role="img"`, so nothing that renders a bare `user` today
27
+ * changes. With it the avatar becomes a real `<button>` carrying `aria-haspopup` and
28
+ * `aria-expanded`.
29
+ */
30
+ userMenu?: React.ReactNode;
31
+ /** Accessible name of the avatar button. `{user}` is replaced with the name. Defaults to the
32
+ * dictionary's `shellBarUserMenu`, for the same reason as {@link ShellBarProps.menuLabel}. */
33
+ userMenuLabel?: string;
22
34
  }
23
35
  /** Fixed 48px application chrome. One per page, always the first landmark. */
24
- export declare function ShellBar({ product, monogram, title, onMenu, onSearch, menuLabel, searchLabel, actions, user, className, ...rest }: ShellBarProps): React.JSX.Element;
36
+ export declare function ShellBar({ product, monogram, title, onMenu, onSearch, menuLabel, searchLabel, actions, user, userMenu, userMenuLabel, className, ...rest }: ShellBarProps): React.JSX.Element;
25
37
  //# 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;AAIpC,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,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;CACf;AAID,8EAA8E;AAC9E,wBAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAA6B,EAClG,WAAsB,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa,qBAa3E"}
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,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;AAID,8EAA8E;AAC9E,wBAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAA6B,EAClG,WAAsB,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa,qBA2BpG"}
@@ -0,0 +1,97 @@
1
+ import * as React from 'react';
2
+ export interface CommandPaletteItem {
3
+ /** Passed back to `onAction`. Must be unique across every group in the palette. */
4
+ id: string;
5
+ label: string;
6
+ /** Second line — what the command does, or what identifies the record. */
7
+ description?: string;
8
+ /** Icon slug, same vocabulary as `Button.icon`. */
9
+ icon?: string;
10
+ /**
11
+ * Painted on the right as key caps. Registers nothing; bind the key yourself.
12
+ *
13
+ * A string is split on `+` and spaces; pass an array when it cannot be — `['⌘', 'N']`.
14
+ */
15
+ shortcut?: string | string[];
16
+ /**
17
+ * Extra terms this item should match on, beyond its label. The place to put synonyms, the
18
+ * English name of a Spanish command, and the abbreviations people actually type — a palette
19
+ * that only matches the visible label makes users guess the wording.
20
+ *
21
+ * Matched against, never announced: the accessible name stays the label alone.
22
+ */
23
+ keywords?: string;
24
+ isDisabled?: boolean;
25
+ }
26
+ export interface CommandPaletteGroup {
27
+ id: string;
28
+ /** Heading above the group. Omit for a single unlabelled list. */
29
+ label?: string;
30
+ items: CommandPaletteItem[];
31
+ }
32
+ export interface CommandPaletteProps {
33
+ isOpen?: boolean;
34
+ onOpenChange?: (isOpen: boolean) => void;
35
+ /**
36
+ * Static groups — navigation targets and actions. Filtered locally as the user types, so these
37
+ * are the whole list, not a page of it.
38
+ */
39
+ groups?: CommandPaletteGroup[];
40
+ /**
41
+ * Server-backed results, appended after the static groups and **never filtered locally**: the
42
+ * server already ranked them, and a local "contains" pass would drop fuzzy and synonym matches.
43
+ * Feed it from `onSearch`.
44
+ */
45
+ resultsGroup?: CommandPaletteGroup;
46
+ /** The chosen item's `id`. The palette does not close itself — decide in the handler. */
47
+ onAction?: (id: string) => void;
48
+ /**
49
+ * The query on every keystroke. **Debounce before calling the server.**
50
+ *
51
+ * Only needed for `resultsGroup`; the static groups filter without it.
52
+ */
53
+ onSearch?: (query: string) => void;
54
+ /** Shows a status row rather than an empty list while a request is in flight. */
55
+ isLoading?: boolean;
56
+ /** Overrides the dictionary's `commandPaletteEmpty`. */
57
+ emptyLabel?: React.ReactNode;
58
+ /** Overrides the dictionary's `commandPaletteLoading`. */
59
+ loadingLabel?: string;
60
+ placeholder?: string;
61
+ /**
62
+ * Replaces the default key hints along the bottom. Use it for a product-specific affordance —
63
+ * a scope switch, a "search everything" toggle.
64
+ */
65
+ footer?: React.ReactNode;
66
+ /** Drops the footer entirely. The hints are worth their space until an app teaches the keys elsewhere. */
67
+ showFooter?: boolean;
68
+ /** Names the dialog for assistive tech. Defaults to the dictionary's `commandPaletteLabel`. */
69
+ 'aria-label'?: string;
70
+ className?: string;
71
+ style?: React.CSSProperties;
72
+ }
73
+ /**
74
+ * Application-wide search over commands, navigation targets and records — the Cmd/Ctrl+K surface.
75
+ *
76
+ * Behaviour is React Aria's `Autocomplete`: focus stays in the input while the arrow keys move
77
+ * `aria-activedescendant` through the list, so typing and choosing never fight each other. Pire
78
+ * supplies the overlay, the grouping and the empty/loading states.
79
+ *
80
+ * Open state is always the product's. Bind the shortcut with {@link useCommandPaletteShortcut},
81
+ * or with anything else — an ERP may already own that key.
82
+ */
83
+ export declare function CommandPalette({ isOpen, onOpenChange, groups, resultsGroup, onAction, onSearch, isLoading, emptyLabel, loadingLabel, placeholder, footer, showFooter, 'aria-label': ariaLabel, className, style, }: CommandPaletteProps): React.JSX.Element;
84
+ export interface CommandPaletteShortcutOptions {
85
+ /** The key pressed with Cmd (macOS) or Ctrl. Single character, matched case-insensitively. */
86
+ key?: string;
87
+ /** Stop listening — while a modal owns the keyboard, for instance. */
88
+ isDisabled?: boolean;
89
+ }
90
+ /**
91
+ * Binds Cmd+K / Ctrl+K to open the palette.
92
+ *
93
+ * Opt-in rather than built into {@link CommandPalette}, because a global key listener is the
94
+ * component's to grant and the app's to own: an ERP may already bind that combination, and a
95
+ * component that claims it on mount takes it silently.
96
+ */
97
+ export declare function useCommandPaletteShortcut(onTrigger: () => void, { key, isDisabled }?: CommandPaletteShortcutOptions): void;
@@ -0,0 +1,98 @@
1
+ import * as React from 'react';
2
+ export interface CommandPaletteItem {
3
+ /** Passed back to `onAction`. Must be unique across every group in the palette. */
4
+ id: string;
5
+ label: string;
6
+ /** Second line — what the command does, or what identifies the record. */
7
+ description?: string;
8
+ /** Icon slug, same vocabulary as `Button.icon`. */
9
+ icon?: string;
10
+ /**
11
+ * Painted on the right as key caps. Registers nothing; bind the key yourself.
12
+ *
13
+ * A string is split on `+` and spaces; pass an array when it cannot be — `['⌘', 'N']`.
14
+ */
15
+ shortcut?: string | string[];
16
+ /**
17
+ * Extra terms this item should match on, beyond its label. The place to put synonyms, the
18
+ * English name of a Spanish command, and the abbreviations people actually type — a palette
19
+ * that only matches the visible label makes users guess the wording.
20
+ *
21
+ * Matched against, never announced: the accessible name stays the label alone.
22
+ */
23
+ keywords?: string;
24
+ isDisabled?: boolean;
25
+ }
26
+ export interface CommandPaletteGroup {
27
+ id: string;
28
+ /** Heading above the group. Omit for a single unlabelled list. */
29
+ label?: string;
30
+ items: CommandPaletteItem[];
31
+ }
32
+ export interface CommandPaletteProps {
33
+ isOpen?: boolean;
34
+ onOpenChange?: (isOpen: boolean) => void;
35
+ /**
36
+ * Static groups — navigation targets and actions. Filtered locally as the user types, so these
37
+ * are the whole list, not a page of it.
38
+ */
39
+ groups?: CommandPaletteGroup[];
40
+ /**
41
+ * Server-backed results, appended after the static groups and **never filtered locally**: the
42
+ * server already ranked them, and a local "contains" pass would drop fuzzy and synonym matches.
43
+ * Feed it from `onSearch`.
44
+ */
45
+ resultsGroup?: CommandPaletteGroup;
46
+ /** The chosen item's `id`. The palette does not close itself — decide in the handler. */
47
+ onAction?: (id: string) => void;
48
+ /**
49
+ * The query on every keystroke. **Debounce before calling the server.**
50
+ *
51
+ * Only needed for `resultsGroup`; the static groups filter without it.
52
+ */
53
+ onSearch?: (query: string) => void;
54
+ /** Shows a status row rather than an empty list while a request is in flight. */
55
+ isLoading?: boolean;
56
+ /** Overrides the dictionary's `commandPaletteEmpty`. */
57
+ emptyLabel?: React.ReactNode;
58
+ /** Overrides the dictionary's `commandPaletteLoading`. */
59
+ loadingLabel?: string;
60
+ placeholder?: string;
61
+ /**
62
+ * Replaces the default key hints along the bottom. Use it for a product-specific affordance —
63
+ * a scope switch, a "search everything" toggle.
64
+ */
65
+ footer?: React.ReactNode;
66
+ /** Drops the footer entirely. The hints are worth their space until an app teaches the keys elsewhere. */
67
+ showFooter?: boolean;
68
+ /** Names the dialog for assistive tech. Defaults to the dictionary's `commandPaletteLabel`. */
69
+ 'aria-label'?: string;
70
+ className?: string;
71
+ style?: React.CSSProperties;
72
+ }
73
+ /**
74
+ * Application-wide search over commands, navigation targets and records — the Cmd/Ctrl+K surface.
75
+ *
76
+ * Behaviour is React Aria's `Autocomplete`: focus stays in the input while the arrow keys move
77
+ * `aria-activedescendant` through the list, so typing and choosing never fight each other. Pire
78
+ * supplies the overlay, the grouping and the empty/loading states.
79
+ *
80
+ * Open state is always the product's. Bind the shortcut with {@link useCommandPaletteShortcut},
81
+ * or with anything else — an ERP may already own that key.
82
+ */
83
+ export declare function CommandPalette({ isOpen, onOpenChange, groups, resultsGroup, onAction, onSearch, isLoading, emptyLabel, loadingLabel, placeholder, footer, showFooter, 'aria-label': ariaLabel, className, style, }: CommandPaletteProps): React.JSX.Element;
84
+ export interface CommandPaletteShortcutOptions {
85
+ /** The key pressed with Cmd (macOS) or Ctrl. Single character, matched case-insensitively. */
86
+ key?: string;
87
+ /** Stop listening — while a modal owns the keyboard, for instance. */
88
+ isDisabled?: boolean;
89
+ }
90
+ /**
91
+ * Binds Cmd+K / Ctrl+K to open the palette.
92
+ *
93
+ * Opt-in rather than built into {@link CommandPalette}, because a global key listener is the
94
+ * component's to grant and the app's to own: an ERP may already bind that combination, and a
95
+ * component that claims it on mount takes it silently.
96
+ */
97
+ export declare function useCommandPaletteShortcut(onTrigger: () => void, { key, isDisabled }?: CommandPaletteShortcutOptions): void;
98
+ //# sourceMappingURL=CommandPalette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandPalette.d.ts","sourceRoot":"","sources":["../../../src/components/patterns/CommandPalette.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,MAAM,WAAW,kBAAkB;IACjC,mFAAmF;IACnF,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC7B;;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S,EAC9E,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,UAAiB,EAChE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,GAC1C,EAAE,mBAAmB,qBAsFrB;AAED,MAAM,WAAW,6BAA6B;IAC5C,8FAA8F;IAC9F,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,IAAI,EAAE,EAAE,GAAS,EAAE,UAAU,EAAE,GAAE,6BAAkC,GACnF,IAAI,CAiBN"}
@@ -10,6 +10,27 @@ export interface ValueHelpDialogProps<T extends {
10
10
  rows?: T[];
11
11
  searchPlaceholder?: string;
12
12
  emptyLabel?: string;
13
+ /**
14
+ * The query on every keystroke. **Debounce before calling the server.**
15
+ *
16
+ * On its own this only observes; it does not change how `rows` is treated. Pair it with
17
+ * `isFilteredExternally` to actually hand filtering to the server.
18
+ */
19
+ onSearch?: (query: string) => void;
20
+ /**
21
+ * `rows` is the final list and the dialog filters nothing locally. Required for server search:
22
+ * fuzzy matches, synonyms, code-to-description and server ranking do not survive a local
23
+ * "contains" pass over the fields that happen to be in the row.
24
+ *
25
+ * Named to match `ComboBox`, deliberately. The same idea under two names is worse than either
26
+ * name — the ERP's supplier, customer, product and purchase-order pickers all need this, and
27
+ * they already know the ComboBox spelling.
28
+ */
29
+ isFilteredExternally?: boolean;
30
+ /** Keeps the table's skeleton up instead of showing "no records" while a request is in flight. */
31
+ isLoading?: boolean;
32
+ /** Called when the table is scrolled near its end, for paginated results. */
33
+ onLoadMore?: () => void;
13
34
  /** Receives the picked row. */
14
35
  onSelect?: (row: T) => void;
15
36
  onClose?: () => void;
@@ -17,4 +38,4 @@ export interface ValueHelpDialogProps<T extends {
17
38
  /** The ERP value help: search a master-data list and pick one record back into a field. */
18
39
  export declare function ValueHelpDialog<T extends {
19
40
  id: string | number;
20
- }>({ isOpen, title, columns, rows, searchPlaceholder, emptyLabel, onSelect, onClose }: ValueHelpDialogProps<T>): React.JSX.Element;
41
+ }>({ isOpen, title, columns, rows, searchPlaceholder, emptyLabel, onSearch, isFilteredExternally, isLoading, onLoadMore, onSelect, onClose }: ValueHelpDialogProps<T>): React.JSX.Element;
@@ -10,6 +10,27 @@ export interface ValueHelpDialogProps<T extends {
10
10
  rows?: T[];
11
11
  searchPlaceholder?: string;
12
12
  emptyLabel?: string;
13
+ /**
14
+ * The query on every keystroke. **Debounce before calling the server.**
15
+ *
16
+ * On its own this only observes; it does not change how `rows` is treated. Pair it with
17
+ * `isFilteredExternally` to actually hand filtering to the server.
18
+ */
19
+ onSearch?: (query: string) => void;
20
+ /**
21
+ * `rows` is the final list and the dialog filters nothing locally. Required for server search:
22
+ * fuzzy matches, synonyms, code-to-description and server ranking do not survive a local
23
+ * "contains" pass over the fields that happen to be in the row.
24
+ *
25
+ * Named to match `ComboBox`, deliberately. The same idea under two names is worse than either
26
+ * name — the ERP's supplier, customer, product and purchase-order pickers all need this, and
27
+ * they already know the ComboBox spelling.
28
+ */
29
+ isFilteredExternally?: boolean;
30
+ /** Keeps the table's skeleton up instead of showing "no records" while a request is in flight. */
31
+ isLoading?: boolean;
32
+ /** Called when the table is scrolled near its end, for paginated results. */
33
+ onLoadMore?: () => void;
13
34
  /** Receives the picked row. */
14
35
  onSelect?: (row: T) => void;
15
36
  onClose?: () => void;
@@ -17,5 +38,5 @@ export interface ValueHelpDialogProps<T extends {
17
38
  /** The ERP value help: search a master-data list and pick one record back into a field. */
18
39
  export declare function ValueHelpDialog<T extends {
19
40
  id: string | number;
20
- }>({ isOpen, title, columns, rows, searchPlaceholder, emptyLabel, onSelect, onClose }: ValueHelpDialogProps<T>): React.JSX.Element;
41
+ }>({ isOpen, title, columns, rows, searchPlaceholder, emptyLabel, onSearch, isFilteredExternally, isLoading, onLoadMore, onSelect, onClose }: ValueHelpDialogProps<T>): React.JSX.Element;
21
42
  //# sourceMappingURL=ValueHelpDialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ValueHelpDialog.d.ts","sourceRoot":"","sources":["../../../src/components/patterns/ValueHelpDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAa,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIpE,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,GAAG;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,sDAAsD;IACtD,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;IACX,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,2FAA2F;AAC3F,wBAAgB,eAAe,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,EAAE,MAAM,EAAE,KAAyB,EACpG,OAAY,EAAE,IAAS,EAAE,iBAA0C,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC,qBAqB9H"}
1
+ {"version":3,"file":"ValueHelpDialog.d.ts","sourceRoot":"","sources":["../../../src/components/patterns/ValueHelpDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAa,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIpE,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,GAAG;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,sDAAsD;IACtD,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;IACX,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;;;;;;OAQG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,kGAAkG;IAClG,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,2FAA2F;AAC3F,wBAAgB,eAAe,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAChF,OAAY,EAAE,IAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,QAAQ,EAAE,oBAAoB,EACtF,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC,qBAkCpE"}
@@ -195,6 +195,13 @@
195
195
  .pire-shellbar-title{font:var(--type-body-strong)}
196
196
  .pire-shellbar-spacer{flex:1}
197
197
  .pire-avatar{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-pill);background:var(--blue-60);color:var(--text-inverse);font:var(--type-label)}
198
+ /* The avatar as a real button, once ShellBar is given a userMenu. Resets the UA button styling the
199
+ span never carried, and adds what a span cannot: a pointer, interaction states, and a focus ring
200
+ that reads against the dark shell instead of against the page. */
201
+ .pire-avatar-trigger{border:0;padding:0;cursor:pointer;transition:var(--transition-control)}
202
+ .pire-avatar-trigger[data-hovered]{background:var(--blue-50)}
203
+ .pire-avatar-trigger[data-pressed]{background:var(--blue-70)}
204
+ .pire-avatar-trigger[data-focus-visible]{outline:var(--focus-w) solid var(--text-inverse);outline-offset:2px}
198
205
  .pire-sidenav{display:flex;flex-direction:column;width:var(--sidenav-w);flex:0 0 auto;background:var(--surface-nav);border-right:1px solid var(--border-subtle);overflow:auto}
199
206
  .pire-sidenav[data-collapsed="true"]{width:var(--sidenav-w-collapsed)}
200
207
  .pire-sidenav-group{padding:var(--sp-3) 0}
@@ -504,7 +511,9 @@
504
511
  .pire-menu-item-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
505
512
  .pire-menu-item-desc{font:var(--type-caption);color:var(--text-secondary)}
506
513
  .pire-menu-item[data-disabled] .pire-menu-item-desc{color:var(--text-disabled)}
507
- .pire-menu-item-shortcut{flex:0 0 auto;align-self:center;font:var(--type-code);color:var(--text-tertiary)}
514
+ /* A row of Kbd caps rather than a run of mono text, so a shortcut is drawn the same way
515
+ everywhere — including beside the command palette's key hints, in the same panel. */
516
+ .pire-menu-item-shortcut{flex:0 0 auto;align-self:center;display:flex;align-items:center;gap:2px}
508
517
  .pire-menu-section-title{display:block;padding:var(--sp-1) var(--sp-3);font:var(--type-label);letter-spacing:var(--ls-caps);text-transform:uppercase;color:var(--text-secondary)}
509
518
  .pire-menu-separator{border:0;border-top:var(--border-w-hairline) solid var(--border-subtle);margin:var(--sp-1) 0}
510
519
 
@@ -665,8 +674,73 @@
665
674
  .pire-chart-table th,.pire-chart-table td{padding:var(--sp-1) var(--sp-2);border-block-end:1px solid var(--border-subtle);text-align:left;color:var(--text-primary)}
666
675
  .pire-chart-table td{font-variant-numeric:tabular-nums}
667
676
 
677
+ /* ---- ValueHelpField ------------------------------------------------------ */
678
+ /* The triggers sit inside .pire-control, flush with its trailing edge. `stretch` makes them the
679
+ control's full height whatever the size, and the negative margins cancel the control's own
680
+ padding and gap so there is no seam between the input and the first button. */
681
+ .pire-valuehelp-actions{display:flex;align-items:stretch;align-self:stretch;margin-inline-start:calc(var(--sp-2) * -1);margin-inline-end:calc(var(--control-pad-x) * -1)}
682
+ .pire-valuehelp-actions .pire-iconbtn{height:auto;border-radius:0;border-inline-start:1px solid var(--border-field)}
683
+ /* Only the last button rounds, so the group follows the control's own corner instead of cutting it. */
684
+ .pire-valuehelp-actions .pire-iconbtn:last-child{border-start-end-radius:var(--radius-1);border-end-end-radius:var(--radius-1)}
685
+ /* `.pire-control :focus-visible` clears inner rings so the whole control shows one. That is right
686
+ with a single input, but here two buttons share the control and the outer ring cannot say which
687
+ is focused — so each gets its own, drawn inside its own box. */
688
+ .pire-valuehelp-actions .pire-iconbtn[data-focus-visible]{outline:var(--focus-w) solid var(--focus-color);outline-offset:calc(var(--focus-w) * -1)}
689
+
690
+ /* ---- Icon --------------------------------------------------------------- */
691
+ /* Development-only marker for a name that resolved to no glyph. Rendered by Icon in dev builds
692
+ only, so it never reaches a user; it exists so a typo is visible on the page rather than only in
693
+ a console warning. Sized from the host span, so the box a typo leaves stays the icon's size. */
694
+ .pire-icon-missing{display:block;width:100%;height:100%;box-sizing:border-box;border:1px dashed var(--status-negative-fg);border-radius:2px}
695
+
696
+ /* ---- Kbd ---------------------------------------------------------------- */
697
+ /* min-width equals the height, so a single character is a square cap and a word like "esc" grows
698
+ sideways from it rather than every cap being sized for the longest one. */
699
+ .pire-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 var(--sp-1);border:1px solid var(--border-default);border-radius:var(--radius-1);background:var(--surface-card);font:var(--type-code);color:var(--text-secondary);white-space:nowrap}
700
+ .pire-kbd[data-size="sm"]{min-width:16px;height:16px;font-size:11px}
701
+ /* Lives here rather than in the Menu section so it follows the base rule it refines. A disabled
702
+ row must fade its caps too, or the shortcut is the one part of the row still looking live on a
703
+ command the user cannot run. */
704
+ .pire-menu-item[data-disabled] .pire-kbd{color:var(--text-disabled);border-color:var(--border-subtle)}
705
+
706
+ /* ---- CommandPalette ----------------------------------------------------- */
707
+ /* Anchored near the top rather than centred: the list grows downwards as it fills, and a centred
708
+ palette would shift its own input under the caret while the user is still typing. */
709
+ .pire-cp-overlay{position:fixed;inset:0;z-index:950;display:flex;align-items:flex-start;justify-content:center;padding:var(--sp-6);padding-block-start:12vh;background:var(--surface-overlay);animation:pire-fade-in var(--dur-fast) var(--ease-entrance)}
710
+ .pire-cp-modal{display:flex;flex-direction:column;width:min(640px,100%);max-height:min(60vh,480px);background:var(--surface-raised);border-radius:var(--radius-2);box-shadow:var(--shadow-3);animation:pire-dialog-in var(--dur-base) var(--ease-entrance);outline:none;overflow:hidden}
711
+ .pire-cp-dialog{display:flex;flex-direction:column;min-height:0;outline:none}
712
+ .pire-cp-search{display:flex;align-items:center;gap:var(--sp-2);padding:0 var(--sp-4);border-block-end:1px solid var(--border-subtle);flex:0 0 auto}
713
+ .pire-cp-search-icon{flex:0 0 auto;color:var(--text-tertiary)}
714
+ /* Borderless by design: the modal edge is the field's boundary, and a second border inside it
715
+ would read as a control within a control. */
716
+ .pire-cp-input{flex:1;min-width:0;height:var(--control-h-lg);border:0;background:transparent;font:var(--type-h4);color:var(--text-primary)}
717
+ /* No ring here, deliberately overriding base.css's global input outline. The palette takes the
718
+ caret on open, and the input is the only focusable thing in it — the list is navigated by
719
+ virtual focus, which never moves real focus off the input. So focus cannot be anywhere else
720
+ while this is on screen, the caret is the indicator, and a ring around a full-width borderless
721
+ field reads as a stray box rather than as focus. This reasoning does not transfer: on any field
722
+ sitting among other controls, the ring is what says which one is live. */
723
+ .pire-cp-input:focus-visible{outline:none}
724
+ .pire-cp-input::placeholder{font:var(--type-body);color:var(--text-tertiary)}
725
+ /* React Aria's SearchField renders type="search", which Chrome decorates with its own clear
726
+ affordance. It cannot be styled, does not exist in Firefox, and ignores every token here, so a
727
+ design system is better off without it. Escape closes the palette. */
728
+ .pire-cp-input::-webkit-search-cancel-button{display:none}
729
+ .pire-cp-list{flex:1;min-height:0;overflow:auto;padding:var(--sp-1) 0;outline:none;display:flex;flex-direction:column}
730
+ /* Explicitly a column: the section is a flex child of .pire-cp-list, and leaving it as a block
731
+ makes its rows depend on the default layout of whatever React Aria renders for a section. */
732
+ .pire-cp-section{display:flex;flex-direction:column}
733
+ .pire-cp-section-title{display:block;padding:var(--sp-1) var(--sp-4);font:var(--type-label);letter-spacing:var(--ls-caps);text-transform:uppercase;color:var(--text-secondary)}
734
+ /* The rows are Menu's, so they inherit its focus, tone and disabled treatment; only the gutter
735
+ widens to match the palette's larger input. */
736
+ .pire-cp-list .pire-menu-item{padding-inline:var(--sp-4)}
737
+ .pire-cp-status{padding:var(--sp-4);text-align:center;font:var(--type-body);color:var(--text-secondary)}
738
+ .pire-cp-foot{flex:0 0 auto;display:flex;align-items:center;gap:var(--sp-4);padding:var(--sp-2) var(--sp-4);border-block-start:1px solid var(--border-subtle);background:var(--surface-sunken)}
739
+ .pire-cp-hint{display:flex;align-items:center;gap:var(--sp-1);font:var(--type-caption);color:var(--text-secondary)}
740
+ .pire-cp-loading{padding:var(--sp-1) var(--sp-4);font:var(--type-caption);color:var(--text-secondary);border-block-end:1px solid var(--border-subtle)}
741
+
668
742
  /* ---- Reduced motion --------------------------------------------------- */
669
- @media (prefers-reduced-motion: reduce){.pire-modal,.pire-toast,.pire-popover,.pire-tooltip,.pire-sidepanel{animation:none}
743
+ @media (prefers-reduced-motion: reduce){.pire-modal,.pire-toast,.pire-popover,.pire-tooltip,.pire-sidepanel,.pire-cp-overlay,.pire-cp-modal{animation:none}
670
744
  /* The skeleton also drops its background sweep, not just the animation: an infinite shimmer is
671
745
  exactly the "large, repeated motion" the preference is asking us to stop, and the placeholder
672
746
  still reads from its shape and surface contrast alone. */