react-os-shell 4.21.1 → 4.41.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 (54) hide show
  1. package/dist/{Browser-2GQLOOS7.js → Browser-TKBH4DZ3.js} +6 -6
  2. package/dist/{Browser-2GQLOOS7.js.map → Browser-TKBH4DZ3.js.map} +1 -1
  3. package/dist/{Calculator-QCAJ6ITI.js → Calculator-XERXEV35.js} +5 -5
  4. package/dist/{Calculator-QCAJ6ITI.js.map → Calculator-XERXEV35.js.map} +1 -1
  5. package/dist/ConfirmDialog-EEH4CWSW.js +3 -0
  6. package/dist/{ConfirmDialog-WAM5OKAV.js.map → ConfirmDialog-EEH4CWSW.js.map} +1 -1
  7. package/dist/{CurrencyConverter-PCYC6RL5.js → CurrencyConverter-OSZISLHT.js} +5 -5
  8. package/dist/{CurrencyConverter-PCYC6RL5.js.map → CurrencyConverter-OSZISLHT.js.map} +1 -1
  9. package/dist/{Documents-MOQNF6HE.js → Documents-YRTLDTLX.js} +6 -6
  10. package/dist/{Documents-MOQNF6HE.js.map → Documents-YRTLDTLX.js.map} +1 -1
  11. package/dist/{Files-YBH6XKXE.js → Files-WHYCDRYU.js} +7 -7
  12. package/dist/{Files-YBH6XKXE.js.map → Files-WHYCDRYU.js.map} +1 -1
  13. package/dist/{Notepad-E3L6AOGU.js → Notepad-6UAWRNZH.js} +6 -6
  14. package/dist/{Notepad-E3L6AOGU.js.map → Notepad-6UAWRNZH.js.map} +1 -1
  15. package/dist/{PomodoroTimer-YABFEPEV.js → PomodoroTimer-5ZSIG7SQ.js} +5 -5
  16. package/dist/{PomodoroTimer-YABFEPEV.js.map → PomodoroTimer-5ZSIG7SQ.js.map} +1 -1
  17. package/dist/{Preview-SNPHS4PS.js → Preview-VBIWWJLK.js} +6 -6
  18. package/dist/{Preview-SNPHS4PS.js.map → Preview-VBIWWJLK.js.map} +1 -1
  19. package/dist/{Spreadsheet-JXQCWZES.js → Spreadsheet-GRD4P3OI.js} +6 -6
  20. package/dist/{Spreadsheet-JXQCWZES.js.map → Spreadsheet-GRD4P3OI.js.map} +1 -1
  21. package/dist/{Stock-IPLLRUOC.js → Stock-4BORXILI.js} +5 -5
  22. package/dist/{Stock-IPLLRUOC.js.map → Stock-4BORXILI.js.map} +1 -1
  23. package/dist/{Weather-SI5QN7X2.js → Weather-ZPPSEUIY.js} +5 -5
  24. package/dist/{Weather-SI5QN7X2.js.map → Weather-ZPPSEUIY.js.map} +1 -1
  25. package/dist/{WorldClock-WYDSMUWX.js → WorldClock-LBKYWDWE.js} +5 -5
  26. package/dist/{WorldClock-WYDSMUWX.js.map → WorldClock-LBKYWDWE.js.map} +1 -1
  27. package/dist/apps/index.js +16 -16
  28. package/dist/{chunk-XRBJARD7.js → chunk-COTCIYLS.js} +4 -4
  29. package/dist/{chunk-XRBJARD7.js.map → chunk-COTCIYLS.js.map} +1 -1
  30. package/dist/{chunk-XBV7NUZK.js → chunk-D4WFGAUW.js} +556 -131
  31. package/dist/chunk-D4WFGAUW.js.map +1 -0
  32. package/dist/{chunk-IGPSRRL7.js → chunk-GUWAKATU.js} +10 -7
  33. package/dist/chunk-GUWAKATU.js.map +1 -0
  34. package/dist/{chunk-HYAW6KIL.js → chunk-HNH7FOYB.js} +16 -4
  35. package/dist/chunk-HNH7FOYB.js.map +1 -0
  36. package/dist/{chunk-L2O6B5KT.js → chunk-OXLLRKBC.js} +24 -4
  37. package/dist/chunk-OXLLRKBC.js.map +1 -0
  38. package/dist/chunk-TQFUNASX.js +7 -0
  39. package/dist/{chunk-CM2NWGYZ.js.map → chunk-TQFUNASX.js.map} +1 -1
  40. package/dist/{chunk-Q3AOIJ7B.js → chunk-X6DOWIY2.js} +3 -3
  41. package/dist/{chunk-Q3AOIJ7B.js.map → chunk-X6DOWIY2.js.map} +1 -1
  42. package/dist/{index-Czn1re5M.d.ts → index-B4RRJ5bp.d.ts} +300 -64
  43. package/dist/index.d.ts +53 -29
  44. package/dist/index.js +54 -146
  45. package/dist/index.js.map +1 -1
  46. package/dist/ui/index.d.ts +1 -1
  47. package/dist/ui/index.js +4 -4
  48. package/package.json +1 -1
  49. package/dist/ConfirmDialog-WAM5OKAV.js +0 -3
  50. package/dist/chunk-CM2NWGYZ.js +0 -7
  51. package/dist/chunk-HYAW6KIL.js.map +0 -1
  52. package/dist/chunk-IGPSRRL7.js.map +0 -1
  53. package/dist/chunk-L2O6B5KT.js.map +0 -1
  54. package/dist/chunk-XBV7NUZK.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, LabelHTMLAttributes, ElementType, CSSProperties, RefObject } from 'react';
2
+ import { ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, LabelHTMLAttributes, ElementType, MouseEvent, CSSProperties, RefObject } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
 
5
5
  /**
@@ -10,9 +10,9 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
10
10
  * it lets someone tell what the button costs WITHOUT reading it, which under
11
11
  * time pressure is what actually happens.
12
12
  */
13
- type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'ghost-danger' | 'danger';
13
+ type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'ghost-danger' | 'danger' | 'link';
14
14
  /**
15
- * `sm`/`md` are the desktop scale. The `touch-*` rungs are for a finger on
15
+ * `sm`/`md`/`lg` are the desktop scale. The `touch-*` rungs are for a finger on
16
16
  * glass — a till, a warehouse tablet — and are a SEPARATE ladder on purpose:
17
17
  * a till's idea of "medium" is 56px, and naming it `md` would have made the
18
18
  * same word mean two sizes depending on which app you were reading.
@@ -20,7 +20,7 @@ type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'ghost-danger' | 'dange
20
20
  * Nothing picks a touch size automatically. An app that wants them asks for
21
21
  * them, so a desktop portal cannot grow finger-sized buttons by accident.
22
22
  */
23
- type ButtonSize = 'sm' | 'md' | 'touch-sm' | 'touch' | 'touch-lg' | 'touch-xl';
23
+ type ButtonSize = 'sm' | 'md' | 'lg' | 'touch-sm' | 'touch' | 'touch-lg' | 'touch-xl';
24
24
  interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className'> {
25
25
  variant?: ButtonVariant;
26
26
  size?: ButtonSize;
@@ -45,6 +45,31 @@ interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'cla
45
45
  }
46
46
  declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
47
47
 
48
+ interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'children'> {
49
+ /** The icon. Sized by the caller — the kit does not resize what it is given. */
50
+ children: ReactNode;
51
+ /**
52
+ * What the button does, in words. Required: there is no text to read, so
53
+ * without this the control is unusable to anyone not looking at it.
54
+ */
55
+ 'aria-label': string;
56
+ /**
57
+ * Defaults to `ghost`, where `Button` defaults to `primary`. An icon with no
58
+ * label is almost always a secondary action — a row's overflow menu, a copy
59
+ * affordance, a close — and a grid of solid blue squares is not what any of
60
+ * those want. Ask for `primary` on the rare icon-only main action.
61
+ */
62
+ /**
63
+ * `link` is excluded: it exists to shed the box, and a square icon button is
64
+ * nothing but the box. Asking for it would produce a bare coloured glyph
65
+ * with a 40px hit area it no longer draws.
66
+ */
67
+ variant?: Exclude<ButtonVariant, 'link'>;
68
+ size?: ButtonSize;
69
+ className?: string;
70
+ }
71
+ declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
72
+
48
73
  /**
49
74
  * Shared form-control styling — the single source of truth for the kit's
50
75
  * text-input look. Promoted out of SearchableSelect so every form control
@@ -55,15 +80,17 @@ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAtt
55
80
  * so the classes survive both the dark-mode allow-list and the design-sync
56
81
  * compiled stylesheet.
57
82
  */
58
- /** `md` is the desktop control; `touch` is a finger on glass. See ButtonSize
59
- * for why the touch scale is a separate ladder rather than a bigger `lg`. */
60
- type InputSize = 'md' | 'touch';
83
+ /** `sm`/`md`/`lg` are the desktop ladder; `touch` is a finger on glass. See
84
+ * ButtonSize for why touch is a separate rung rather than the top of this
85
+ * ladder a till's idea of "large" is 56px, and one word cannot mean both. */
86
+ type InputSize = 'sm' | 'md' | 'lg' | 'touch';
61
87
  declare const INPUT_SIZES: Record<InputSize, string>;
62
88
  /** Base look for a text-bearing form control. Native <input>/<select>/<textarea>
63
89
  * also receive dark styling for free via the global rule in styles.css. */
64
90
  declare const INPUT_BASE: string;
65
- /** Compose the input classes for a control. Omitting `size` yields exactly
66
- * `INPUT_BASE`, so every existing caller is unaffected. */
91
+ /** Compose the input classes for a control. Omitting `size` or passing the
92
+ * default `md` — yields exactly `INPUT_BASE`, so every existing caller is
93
+ * unaffected. */
67
94
  declare function inputClasses(opts?: {
68
95
  invalid?: boolean;
69
96
  size?: InputSize;
@@ -95,6 +122,8 @@ interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>
95
122
  invalid?: boolean;
96
123
  /** Grow the field to fit its content instead of scrolling. */
97
124
  autoGrow?: boolean;
125
+ /** Desktop rung, or `touch`. Defaults to `md`. */
126
+ size?: InputSize;
98
127
  className?: string;
99
128
  }
100
129
  declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
@@ -104,9 +133,18 @@ interface SelectOption {
104
133
  label: string;
105
134
  disabled?: boolean;
106
135
  }
107
- interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'onChange' | 'value' | 'className'> {
136
+ interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'onChange' | 'value' | 'className' | 'size'> {
108
137
  value: string;
109
138
  onChange: (value: string) => void;
139
+ /**
140
+ * Desktop rung, or `touch`. Defaults to `md`.
141
+ *
142
+ * This shadows the native `size` attribute (the number of rows a select
143
+ * shows when it is rendered as a list box), which is omitted above rather
144
+ * than left to collide. Nothing here has ever rendered as a list box — the
145
+ * kit's Select is a dropdown — so no capability is lost.
146
+ */
147
+ size?: InputSize;
110
148
  options: SelectOption[];
111
149
  /** Shown as a disabled first option when no value is selected. */
112
150
  placeholder?: string;
@@ -125,6 +163,20 @@ declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAtt
125
163
  interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange' | 'checked' | 'className'> {
126
164
  checked: boolean;
127
165
  onChange: (checked: boolean) => void;
166
+ /**
167
+ * Neither checked nor unchecked — the "some of the rows below are selected"
168
+ * state on a select-all box.
169
+ *
170
+ * It has to be a prop because it cannot be an attribute: `indeterminate`
171
+ * exists only as a DOM property, so passing it through JSX sets a bogus
172
+ * attribute, logs "Received `true` for a non-boolean attribute", and leaves
173
+ * the box looking unchecked. Set here through a ref instead.
174
+ *
175
+ * A native checkbox in this state reports itself as `mixed` to assistive
176
+ * technology on its own, so no `aria-checked` is added — writing one would
177
+ * risk contradicting the element.
178
+ */
179
+ indeterminate?: boolean;
128
180
  label?: ReactNode;
129
181
  description?: ReactNode;
130
182
  className?: string;
@@ -333,6 +385,29 @@ interface DateRangePickerProps {
333
385
  declare function toISODate(d: Date): string;
334
386
  declare function DateRangePicker({ from, to, onChange, formatDisplay, clearable, placeholder, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
335
387
 
388
+ interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'size' | 'type' | 'value' | 'onChange' | 'min' | 'max'> {
389
+ /** A Date, a `YYYY-MM-DD` string, or nothing. */
390
+ value?: Date | string | null;
391
+ /**
392
+ * The chosen date at local midnight, or `null` when the field is empty.
393
+ *
394
+ * A native date input also reports `''` mid-entry, while a partly typed date
395
+ * is not yet a date. Both arrive here as `null`: "no date yet" and "cleared"
396
+ * are the same thing to a caller storing a value.
397
+ */
398
+ onChange?: (value: Date | null) => void;
399
+ /** Earliest selectable date. */
400
+ min?: Date | string | null;
401
+ /** Latest selectable date. */
402
+ max?: Date | string | null;
403
+ /** Error state — red border + ring, matching Input. */
404
+ invalid?: boolean;
405
+ /** `touch` gives a 56px field for a finger. Defaults to the desktop size. */
406
+ size?: InputSize;
407
+ className?: string;
408
+ }
409
+ declare const DatePicker: react.ForwardRefExoticComponent<DatePickerProps & react.RefAttributes<HTMLInputElement>>;
410
+
336
411
  interface NumericKeypadProps {
337
412
  value: string;
338
413
  onChange: (next: string) => void;
@@ -405,7 +480,7 @@ interface SegmentedProps<T extends string = string> {
405
480
  declare function Segmented<T extends string = string>({ value, onChange, options, name, size, block, label, className, }: SegmentedProps<T>): react_jsx_runtime.JSX.Element;
406
481
 
407
482
  type SwitchSize = 'sm' | 'md' | 'touch';
408
- interface SwitchProps {
483
+ interface SwitchProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'type' | 'className'> {
409
484
  checked: boolean;
410
485
  onChange: (checked: boolean) => void;
411
486
  disabled?: boolean;
@@ -417,7 +492,16 @@ interface SwitchProps {
417
492
  id?: string;
418
493
  className?: string;
419
494
  }
420
- declare function Switch({ checked, onChange, disabled, size, label, hint, id, className, }: SwitchProps): react_jsx_runtime.JSX.Element;
495
+ /**
496
+ * Forwards its ref, and spreads the rest onto the button.
497
+ *
498
+ * A form library hands a field three things: a change handler, a name, and a
499
+ * ref it uses to move focus to the field when validation fails. The first was
500
+ * here; the other two had nowhere to go, so this control could not be a form
501
+ * field at all — which contradicts the kit's own guidance that its controls
502
+ * drop into react-hook-form.
503
+ */
504
+ declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLButtonElement>>;
421
505
 
422
506
  interface InputNumberProps {
423
507
  value: number | null;
@@ -644,10 +728,19 @@ interface DescriptionListProps {
644
728
  /** Hairline-separated rows in a bordered panel. */
645
729
  bordered?: boolean;
646
730
  size?: 'sm' | 'md';
731
+ /**
732
+ * Shown in place of a value that is `null`, `undefined` or `''`. Defaults to
733
+ * an em dash.
734
+ *
735
+ * A blank cell answers nothing — and inside `bordered`, where the cell has
736
+ * an outline of its own, it reads as a rendering fault rather than as "there
737
+ * is no tracking number". Pass `emptyText={null}` for the old behaviour.
738
+ */
739
+ emptyText?: ReactNode;
647
740
  title?: ReactNode;
648
741
  className?: string;
649
742
  }
650
- declare function DescriptionList({ items, columns, bordered, size, title, className, }: DescriptionListProps): react_jsx_runtime.JSX.Element;
743
+ declare function DescriptionList({ items, columns, bordered, size, title, className, emptyText: empty, }: DescriptionListProps): react_jsx_runtime.JSX.Element;
651
744
 
652
745
  type ResultStatus = 'success' | 'error' | 'warning' | 'info' | '404' | '403' | '500';
653
746
  interface ResultProps {
@@ -699,7 +792,14 @@ type AvatarSize = 'xs' | 'sm' | 'md' | 'lg';
699
792
  type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
700
793
  interface AvatarProps {
701
794
  src?: string;
702
- /** Used for the initials fallback and the image alt text. */
795
+ /**
796
+ * Who this is. It names the avatar to assistive technology and supplies the
797
+ * initials when there is no usable image.
798
+ *
799
+ * Without it the avatar is hidden from assistive technology rather than
800
+ * announced as "question mark" — an avatar nobody can name carries nothing
801
+ * a screen-reader user needs.
802
+ */
703
803
  name?: string;
704
804
  size?: AvatarSize;
705
805
  status?: AvatarStatus;
@@ -750,6 +850,16 @@ interface BannerProps {
750
850
  }
751
851
  declare function Banner({ tone, emphasis, title, children, icon, onDismiss, sticky, className, }: BannerProps): react_jsx_runtime.JSX.Element;
752
852
 
853
+ /**
854
+ * The DOM id of a tab and of the panel it controls, derived from the same
855
+ * prefix so a consumer rendering the panel cannot mismatch them.
856
+ *
857
+ * Exported rather than inlined: the panel is rendered by the CONSUMER, so both
858
+ * sides have to agree on the string, and agreeing by convention in a comment
859
+ * is how these drift.
860
+ */
861
+ declare const tabButtonId: (prefix: string, id: string) => string;
862
+ declare const tabPanelId: (prefix: string, id: string) => string;
753
863
  interface TabItem {
754
864
  id: string;
755
865
  label: ReactNode;
@@ -761,9 +871,27 @@ interface TabsProps {
761
871
  value: string;
762
872
  onChange: (id: string) => void;
763
873
  variant?: 'underline' | 'pill';
874
+ /**
875
+ * Enables the tab/panel association. With it each tab gains a stable id and
876
+ * an `aria-controls` pointing at `tabPanelId(idPrefix, item.id)`; the
877
+ * consumer gives its panel that id and names it with
878
+ * `aria-labelledby={tabButtonId(idPrefix, item.id)}`.
879
+ *
880
+ * Omitted, nothing is emitted. A tab strip used purely as a filter — no
881
+ * panel to point at — should not claim to control an element that does not
882
+ * exist, which is a dangling reference rather than a helpful one.
883
+ */
884
+ idPrefix?: string;
885
+ /**
886
+ * Names the strip. A page with more than one — order sections above, media
887
+ * types below — gives a screen-reader user two "tab list"s with nothing to
888
+ * tell them apart, and there was no way to pass a name at all.
889
+ */
890
+ 'aria-label'?: string;
891
+ 'aria-labelledby'?: string;
764
892
  className?: string;
765
893
  }
766
- declare function Tabs({ items, value, onChange, variant, className }: TabsProps): react_jsx_runtime.JSX.Element;
894
+ declare function Tabs({ items, value, onChange, variant, idPrefix, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: TabsProps): react_jsx_runtime.JSX.Element;
767
895
 
768
896
  interface AccordionItem {
769
897
  id: string;
@@ -791,10 +919,37 @@ interface TooltipProps {
791
919
  }
792
920
  declare function Tooltip({ content, side, delay, children }: TooltipProps): react_jsx_runtime.JSX.Element;
793
921
 
922
+ type SemanticGroup = 'success' | 'active' | 'queued' | 'info' | 'pending' | 'warning' | 'danger' | 'draft' | 'neutral';
923
+ /**
924
+ * The one table. `ColoredBadge` reads it too, through its `tone` prop, so a
925
+ * badge given a tone directly and a badge given a status string that maps to
926
+ * that tone are the same colour — which is the promise this component's
927
+ * docblock makes and could not keep for anything that was not a status.
928
+ */
929
+ declare const GROUP_COLORS: Record<SemanticGroup, string>;
930
+ declare function StatusBadgeProvider({ groups, children, }: {
931
+ groups: Record<string, SemanticGroup>;
932
+ children: ReactNode;
933
+ }): react_jsx_runtime.JSX.Element;
934
+ interface StatusBadgeProps {
935
+ status: string;
936
+ }
937
+ declare function StatusBadge({ status }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
938
+
794
939
  interface ColoredBadgeProps {
940
+ /**
941
+ * A semantic tone, resolved through the same table `StatusBadge` uses — so a
942
+ * badge given `tone="success"` and one given a status string that maps to
943
+ * success are the same green.
944
+ *
945
+ * Prefer this to `colorClass`. Raw classes are the escape hatch for a colour
946
+ * the system has no name for, and every consumer reaching for them is a
947
+ * place the theme system cannot follow.
948
+ */
949
+ tone?: SemanticGroup;
795
950
  /** Tailwind classes for the badge color, e.g. `bg-green-100 text-green-800`.
796
- * Keep a per-app palette map rather than hardcoding colors at call sites. */
797
- colorClass: string;
951
+ * Wins over `tone` when both are given. */
952
+ colorClass?: string;
798
953
  children: ReactNode;
799
954
  /** `xs` = 10px (dense list cells), `sm` = 12px / px-2 (default), `md` =
800
955
  * 12px / px-2.5 (matches StatusBadge). */
@@ -802,23 +957,29 @@ interface ColoredBadgeProps {
802
957
  /** Capitalize each word — useful for raw status strings like `in_progress`
803
958
  * (rendered as `In Progress`). Default false. */
804
959
  capitalize?: boolean;
960
+ /**
961
+ * Render a close control — a filter chip the user can drop.
962
+ *
963
+ * Its accessible name is derived from the badge's own text: "Remove Winter
964
+ * tyres", not "Remove". A row of filter chips otherwise gives a screen-reader
965
+ * user five identical buttons and no way to tell which one drops which
966
+ * filter. `closeLabel` overrides it, and is required in practice whenever
967
+ * the children are not plain text — there is nothing to derive from.
968
+ */
969
+ closable?: boolean;
970
+ onClose?: () => void;
971
+ closeLabel?: string;
972
+ className?: string;
805
973
  }
806
974
  /**
807
- * ColoredBadge — a small rounded-full pill whose colors are supplied as a
808
- * Tailwind class string. Generic counterpart to StatusBadge (which maps status
809
- * strings to semantic groups); use this when the caller already knows the color.
975
+ * ColoredBadge — a small rounded-full pill. Give it a `tone` from the shell's
976
+ * semantic vocabulary, or raw Tailwind classes when the colour has no name.
977
+ *
978
+ * Counterpart to StatusBadge, which takes a domain status STRING and maps it
979
+ * through a provider. Both read the same colour table, so the two never
980
+ * disagree about what success looks like.
810
981
  */
811
- declare function ColoredBadge({ colorClass, children, size, capitalize }: ColoredBadgeProps): react_jsx_runtime.JSX.Element;
812
-
813
- type SemanticGroup = 'success' | 'active' | 'queued' | 'info' | 'pending' | 'warning' | 'danger' | 'draft' | 'neutral';
814
- declare function StatusBadgeProvider({ groups, children, }: {
815
- groups: Record<string, SemanticGroup>;
816
- children: ReactNode;
817
- }): react_jsx_runtime.JSX.Element;
818
- interface StatusBadgeProps {
819
- status: string;
820
- }
821
- declare function StatusBadge({ status }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
982
+ declare function ColoredBadge({ colorClass, tone, children, size, capitalize, closable, onClose, closeLabel, className, }: ColoredBadgeProps): react_jsx_runtime.JSX.Element;
822
983
 
823
984
  interface EmptyStateProps {
824
985
  /** Bold heading, e.g. "No invoices yet". */
@@ -835,8 +996,16 @@ interface EmptyStateProps {
835
996
  variant?: 'dashed' | 'card' | 'none';
836
997
  /** @deprecated set `variant="none"` instead. */
837
998
  frameless?: boolean;
838
- /** Show the placeholder icon. Defaults to true (false for `variant="card"`). */
839
- icon?: boolean;
999
+ /**
1000
+ * `true`/omitted shows the placeholder inbox, `false` shows nothing, and an
1001
+ * element shows that instead.
1002
+ *
1003
+ * The boolean alone meant every empty state in every app was an inbox — an
1004
+ * empty catalogue, an empty invoice list and an empty inbox drawn
1005
+ * identically, when the icon is the fastest thing on the screen to read.
1006
+ * Defaults to the placeholder (to nothing for `variant="card"`).
1007
+ */
1008
+ icon?: boolean | ReactNode;
840
1009
  /** Action(s) rendered under the text. */
841
1010
  children?: ReactNode;
842
1011
  }
@@ -847,6 +1016,53 @@ interface EmptyStateProps {
847
1016
  */
848
1017
  declare function EmptyState({ title, message, description, hint, variant, frameless, icon, children, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
849
1018
 
1019
+ /**
1020
+ * Generic breadcrumb trail. Self-contained and styled with the same Tailwind
1021
+ * utilities the shell already ships, so consumers get it for free.
1022
+ *
1023
+ * Pass an ordered list of `items` from root → current. Every crumb except the
1024
+ * last renders as a button when it has an `onClick`; the last crumb is treated
1025
+ * as the current location — rendered inert with `aria-current="page"`. When the
1026
+ * trail is long, set `maxItems` to collapse the middle into an ellipsis
1027
+ * (`first … last-n` ), keeping the first and the tail visible.
1028
+ */
1029
+ interface BreadcrumbItem {
1030
+ /** Visible label. */
1031
+ label: ReactNode;
1032
+ /** Optional leading icon (typically a 3.5×3.5 svg). */
1033
+ icon?: ReactNode;
1034
+ /**
1035
+ * Navigate to this crumb. Omitted on the current (last) crumb.
1036
+ *
1037
+ * Receives the event, which is what makes `href` usable from a routed app:
1038
+ * the handler calls `preventDefault()` on a plain click and hands the
1039
+ * navigation to its router, while ctrl/middle/right clicks fall through to
1040
+ * the browser untouched. Without the argument an anchor could only ever do a
1041
+ * full page load, which is the thing a single-page app is avoiding.
1042
+ */
1043
+ onClick?: (event: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
1044
+ /**
1045
+ * Where this crumb goes, when it is a real destination.
1046
+ *
1047
+ * A routed app needs this rather than `onClick` alone: an `<a href>` can be
1048
+ * middle-clicked into a new tab, copied, and read off the status bar before
1049
+ * committing to it — none of which a button offers, however well it behaves
1050
+ * once pressed. Given both, the anchor still calls `onClick`, so a client-side
1051
+ * router can intercept the plain-click case and leave the rest to the browser.
1052
+ */
1053
+ href?: string;
1054
+ }
1055
+ interface BreadcrumbsProps {
1056
+ items: BreadcrumbItem[];
1057
+ /** Node rendered between crumbs. Defaults to a chevron. */
1058
+ separator?: ReactNode;
1059
+ /** Collapse the middle to an ellipsis when there are more than this many
1060
+ * crumbs. `0` (default) never collapses. */
1061
+ maxItems?: number;
1062
+ className?: string;
1063
+ }
1064
+ declare function Breadcrumbs({ items, separator, maxItems, className }: BreadcrumbsProps): react_jsx_runtime.JSX.Element | null;
1065
+
850
1066
  interface PageHeaderProps {
851
1067
  title: string;
852
1068
  /** Muted line under the title. (`subtitle` is an accepted alias.) */
@@ -856,13 +1072,27 @@ interface PageHeaderProps {
856
1072
  /** Right-aligned actions. (`children` is also accepted.) */
857
1073
  actions?: ReactNode;
858
1074
  children?: ReactNode;
1075
+ /**
1076
+ * Icon beside the title — a marker for the page, not a second headline.
1077
+ * Rendered muted and at the title's own size, so it labels the words rather
1078
+ * than competing with them.
1079
+ */
1080
+ icon?: ReactNode;
1081
+ /**
1082
+ * Trail above the title, root → current, rendered with the kit's own
1083
+ * `Breadcrumbs`. Not a second implementation: the collapsing behaviour, the
1084
+ * `aria-current="page"` on the last crumb and the separator all come from
1085
+ * that component, so a trail in a header and a trail anywhere else stay the
1086
+ * same thing.
1087
+ */
1088
+ breadcrumbs?: BreadcrumbItem[];
859
1089
  }
860
1090
  /**
861
1091
  * PageHeader — a page/section title with an optional muted description and a
862
1092
  * right-aligned actions slot. Accepts both the `description`/`actions` and the
863
1093
  * `subtitle`/`children` prop shapes the portals previously used locally.
864
1094
  */
865
- declare function PageHeader({ title, description, subtitle, actions, children }: PageHeaderProps): react_jsx_runtime.JSX.Element;
1095
+ declare function PageHeader({ title, description, subtitle, actions, children, icon, breadcrumbs, }: PageHeaderProps): react_jsx_runtime.JSX.Element;
866
1096
 
867
1097
  interface LoadingSpinnerProps {
868
1098
  /** Ring diameter: `sm` = 20px, `md` = 32px (default), `lg` = 48px. */
@@ -1276,35 +1506,6 @@ interface TopNavProps {
1276
1506
  }
1277
1507
  declare function TopNav({ items, activeKey, onSelect, brand, actions, className }: TopNavProps): react_jsx_runtime.JSX.Element;
1278
1508
 
1279
- /**
1280
- * Generic breadcrumb trail. Self-contained and styled with the same Tailwind
1281
- * utilities the shell already ships, so consumers get it for free.
1282
- *
1283
- * Pass an ordered list of `items` from root → current. Every crumb except the
1284
- * last renders as a button when it has an `onClick`; the last crumb is treated
1285
- * as the current location — rendered inert with `aria-current="page"`. When the
1286
- * trail is long, set `maxItems` to collapse the middle into an ellipsis
1287
- * (`first … last-n` ), keeping the first and the tail visible.
1288
- */
1289
- interface BreadcrumbItem {
1290
- /** Visible label. */
1291
- label: ReactNode;
1292
- /** Optional leading icon (typically a 3.5×3.5 svg). */
1293
- icon?: ReactNode;
1294
- /** Navigate to this crumb. Omitted on the current (last) crumb. */
1295
- onClick?: () => void;
1296
- }
1297
- interface BreadcrumbsProps {
1298
- items: BreadcrumbItem[];
1299
- /** Node rendered between crumbs. Defaults to a chevron. */
1300
- separator?: ReactNode;
1301
- /** Collapse the middle to an ellipsis when there are more than this many
1302
- * crumbs. `0` (default) never collapses. */
1303
- maxItems?: number;
1304
- className?: string;
1305
- }
1306
- declare function Breadcrumbs({ items, separator, maxItems, className }: BreadcrumbsProps): react_jsx_runtime.JSX.Element | null;
1307
-
1308
1509
  /**
1309
1510
  * Unified popup menu component — used for all context menus, dropdowns, and flyouts.
1310
1511
  * Reads --menu-density CSS variable: 'tight', 'normal' (default), or 'large'.
@@ -1501,6 +1702,41 @@ declare function ConfirmProvider({ children }: {
1501
1702
  children: React.ReactNode;
1502
1703
  }): react_jsx_runtime.JSX.Element;
1503
1704
 
1705
+ interface SearchResult {
1706
+ /** Category label, e.g. "Sales Order". */
1707
+ type: string;
1708
+ /** Primary text shown in the result row. */
1709
+ label: string;
1710
+ /** Optional secondary line. */
1711
+ sub?: string;
1712
+ /** Window-registry key passed to openEntity. */
1713
+ entity_type: string;
1714
+ entity_id: string;
1715
+ }
1716
+ /** A search provider — given a query, returns matching results. The shell
1717
+ * calls every provider in parallel and concatenates the responses. */
1718
+ type SearchProvider = (query: string) => Promise<SearchResult[]>;
1719
+ /** Bundle of search-related consumer config. */
1720
+ interface SearchConfig {
1721
+ providers: SearchProvider[];
1722
+ /** Per-result-type icon (SVG path `d` attribute). Unmatched types fall
1723
+ * back to a generic magnifier glyph. */
1724
+ typeIcons?: Record<string, string>;
1725
+ placeholder?: string;
1726
+ }
1727
+ interface GlobalSearchProps extends Partial<SearchConfig> {
1728
+ /**
1729
+ * What to do with the chosen result. Called after the overlay closes.
1730
+ *
1731
+ * Supplied by whoever renders the overlay, not by the consumer's
1732
+ * `SearchConfig`: inside the desktop shell `Layout` passes `openEntity`, and
1733
+ * a routed app passes its own navigation. Omitted, selecting a result just
1734
+ * closes the overlay — which is what a search with nowhere to go should do.
1735
+ */
1736
+ onSelect?: (result: SearchResult) => void;
1737
+ }
1738
+ declare function GlobalSearch({ providers, typeIcons, placeholder, onSelect }?: GlobalSearchProps): react_jsx_runtime.JSX.Element | null;
1739
+
1504
1740
  interface GridColumn {
1505
1741
  key: string;
1506
1742
  title: string;
@@ -1936,4 +2172,4 @@ declare const ALT_SHIFT_N: string;
1936
2172
  * string when the source is consumed without a build (e.g. tests). */
1937
2173
  declare const VERSION: string;
1938
2174
 
1939
- export { type CountBadgeTone as $, ALT as A, Banner as B, type ColumnDef as C, type ButtonVariant as D, CMD_A as E, CMD_DOT as F, CMD_ENTER as G, CMD_K as H, CMD_S as I, Card as J, type CardPadding as K, type CardProps as L, type CellStyle as M, ChatTemplate as N, Checkbox as O, type PaginatedResponse as P, type CheckboxProps as Q, CheckoutTemplate as R, type SortState as S, ColoredBadge as T, type ColoredBadgeProps as U, ConfirmProvider as V, ContainerFillChart as W, type ContainerFillChartProps as X, type ContainerFillItem as Y, CountBadge as Z, type CountBadgeProps as _, ALT_SHIFT_D as a, ListFooter as a$, DashboardTemplate as a0, DataTable as a1, type DataTableColumn as a2, DataTablePage as a3, type DataTableProps as a4, DateRangePicker as a5, type DateRangePickerProps as a6, type DescriptionColumns as a7, type DescriptionItem as a8, DescriptionList as a9, FormLayoutPage as aA, GLASS_DIVIDER as aB, GLASS_INPUT_BG as aC, GalleryTemplate as aD, type Gap as aE, Grid as aF, type GridCols as aG, type GridColumn as aH, type GridProps as aI, HelpCenter as aJ, type HelpCenterDoc as aK, type HelpCenterProps as aL, INPUT_BASE as aM, INPUT_SIZES as aN, Inline as aO, type InlineProps as aP, Input as aQ, InputNumber as aR, type InputNumberProps as aS, type InputProps as aT, type InputSize as aU, type Justify as aV, Kanban as aW, type KanbanColumn as aX, type KanbanProps as aY, Label as aZ, type LabelProps as a_, type DescriptionListProps as aa, Dialog as ab, type DialogProps as ac, type DialogSize as ad, Divider as ae, type DividerProps as af, type DividerSpacing as ag, DonutChart as ah, type DonutChartProps as ai, type DonutSegment as aj, Drawer as ak, type DrawerProps as al, type DrawerSide as am, type DrawerSize as an, ENTER as ao, EditableGrid as ap, type EditableGridProps as aq, EmailTemplate as ar, EmptyState as as, type EmptyStateProps as at, ErrorPage as au, type ErrorPageProps as av, FilePicker as aw, type FilePickerProps as ax, FormField as ay, type FormFieldProps as az, ALT_SHIFT_E as b, Stack as b$, ListLoadError as b0, type ListLoadErrorProps as b1, LoadingSpinner as b2, type LoadingSpinnerProps as b3, MAX_FRACTION_DIGITS as b4, MOD as b5, Markdown as b6, type MarkdownProps as b7, MediaUploadField as b8, type MediaUploadFieldProps as b9, type ResultStatus as bA, SHIFT as bB, type SearchableOption as bC, SearchableSelect as bD, type SearchableSelectProps as bE, Segmented as bF, type SegmentedOption as bG, type SegmentedProps as bH, type SegmentedSize as bI, Select as bJ, type SelectOption as bK, type SelectProps as bL, type SemanticGroup as bM, type SeverityTone as bN, type ShellPrefsAdapter as bO, ShellPrefsProvider as bP, SidebarActionButton as bQ, type SidebarActionButtonProps as bR, SidebarGroupLabel as bS, SidebarLayout as bT, type SidebarLayoutProps as bU, SidebarNavItem as bV, Skeleton as bW, type SkeletonProps as bX, type SkeletonVariant as bY, Sparkline as bZ, type SparklineProps as b_, MediaUploadGrid as ba, type MediaUploadGridItem as bb, type MediaUploadGridProps as bc, MetricBar as bd, type MetricBarProps as be, type Milestone as bf, type MilestoneKind as bg, MilestoneTimeline as bh, type MilestoneTimelineProps as bi, NativeSelect as bj, NumericKeypad as bk, type NumericKeypadProps as bl, PageHeader as bm, type PageHeaderProps as bn, Pagination as bo, type PaginationProps as bp, Paragraph as bq, type ParagraphProps as br, PopupMenu as bs, PopupMenuDivider as bt, PopupMenuItem as bu, PopupMenuLabel as bv, Radio as bw, type RadioProps as bx, Result as by, type ResultProps as bz, ALT_SHIFT_N as c, type StackProps as c0, StatCard as c1, type StatCardProps as c2, Statistic as c3, type StatisticProps as c4, type StatisticSize as c5, type StatisticTone as c6, StatusBadge as c7, StatusBadgeProvider as c8, Switch as c9, VERSION as cA, appendKey as cB, applyThemePrefs as cC, backspace as cD, confirm as cE, confirmDestructive as cF, formatDate as cG, glassStyle as cH, inputClasses as cI, isMac as cJ, isSeverityTone as cK, mediaFileName as cL, prompt as cM, resolveTheme as cN, severityOf as cO, toISODate as cP, toast as cQ, useClickOutside as cR, useConfirm as cS, useFocusTrap as cT, useIsMobile as cU, useLocalStoragePrefs as cV, useScrollLock as cW, useShellPrefs as cX, useTheme as cY, type SwitchProps as ca, type SwitchSize as cb, type TabItem as cc, Tabs as cd, type TabsProps as ce, Text as cf, type TextProps as cg, type TextSize as ch, type TextTone as ci, type TextWeight as cj, Textarea as ck, type TextareaProps as cl, type Theme as cm, TileButton as cn, type TileButtonProps as co, type TileSize as cp, Title as cq, type TitleLevel as cr, type TitleProps as cs, type ToastOptions as ct, type ToastPlacement as cu, Tooltip as cv, type TooltipProps as cw, TopNav as cx, type TopNavItem as cy, type TopNavProps as cz, Accordion as d, type AccordionItem as e, type AccordionProps as f, type Align as g, AuthScreen as h, type AuthScreenProps as i, Avatar as j, AvatarGroup as k, type AvatarGroupProps as l, type AvatarProps as m, type AvatarSize as n, type AvatarStatus as o, type BannerEmphasis as p, type BannerProps as q, type BannerTone as r, BarChart as s, type BarChartProps as t, type BreadcrumbItem as u, Breadcrumbs as v, type BreadcrumbsProps as w, Button as x, type ButtonProps as y, type ButtonSize as z };
2175
+ export { type CountBadgeProps as $, ALT as A, Banner as B, type ColumnDef as C, type ButtonSize as D, type ButtonVariant as E, CMD_A as F, CMD_DOT as G, CMD_ENTER as H, CMD_K as I, CMD_S as J, Card as K, type CardPadding as L, type CardProps as M, type CellStyle as N, ChatTemplate as O, type PaginatedResponse as P, Checkbox as Q, type CheckboxProps as R, type SearchConfig as S, CheckoutTemplate as T, ColoredBadge as U, type ColoredBadgeProps as V, ConfirmProvider as W, ContainerFillChart as X, type ContainerFillChartProps as Y, type ContainerFillItem as Z, CountBadge as _, type SortState as a, type InputProps as a$, type CountBadgeTone as a0, DashboardTemplate as a1, DataTable as a2, type DataTableColumn as a3, DataTablePage as a4, type DataTableProps as a5, DatePicker as a6, type DatePickerProps as a7, DateRangePicker as a8, type DateRangePickerProps as a9, type FilePickerProps as aA, FormField as aB, type FormFieldProps as aC, FormLayoutPage as aD, GLASS_DIVIDER as aE, GLASS_INPUT_BG as aF, GROUP_COLORS as aG, GalleryTemplate as aH, type Gap as aI, GlobalSearch as aJ, type GlobalSearchProps as aK, Grid as aL, type GridCols as aM, type GridColumn as aN, type GridProps as aO, HelpCenter as aP, type HelpCenterDoc as aQ, type HelpCenterProps as aR, INPUT_BASE as aS, INPUT_SIZES as aT, IconButton as aU, type IconButtonProps as aV, Inline as aW, type InlineProps as aX, Input as aY, InputNumber as aZ, type InputNumberProps as a_, type DescriptionColumns as aa, type DescriptionItem as ab, DescriptionList as ac, type DescriptionListProps as ad, Dialog as ae, type DialogProps as af, type DialogSize as ag, Divider as ah, type DividerProps as ai, type DividerSpacing as aj, DonutChart as ak, type DonutChartProps as al, type DonutSegment as am, Drawer as an, type DrawerProps as ao, type DrawerSide as ap, type DrawerSize as aq, ENTER as ar, EditableGrid as as, type EditableGridProps as at, EmailTemplate as au, EmptyState as av, type EmptyStateProps as aw, ErrorPage as ax, type ErrorPageProps as ay, FilePicker as az, ALT_SHIFT_D as b, type SidebarActionButtonProps as b$, type InputSize as b0, type Justify as b1, Kanban as b2, type KanbanColumn as b3, type KanbanProps as b4, Label as b5, type LabelProps as b6, ListFooter as b7, ListLoadError as b8, type ListLoadErrorProps as b9, PopupMenu as bA, PopupMenuDivider as bB, PopupMenuItem as bC, PopupMenuLabel as bD, Radio as bE, type RadioProps as bF, Result as bG, type ResultProps as bH, type ResultStatus as bI, SHIFT as bJ, type SearchProvider as bK, type SearchResult as bL, type SearchableOption as bM, SearchableSelect as bN, type SearchableSelectProps as bO, Segmented as bP, type SegmentedOption as bQ, type SegmentedProps as bR, type SegmentedSize as bS, Select as bT, type SelectOption as bU, type SelectProps as bV, type SemanticGroup as bW, type SeverityTone as bX, type ShellPrefsAdapter as bY, ShellPrefsProvider as bZ, SidebarActionButton as b_, LoadingSpinner as ba, type LoadingSpinnerProps as bb, MAX_FRACTION_DIGITS as bc, MOD as bd, Markdown as be, type MarkdownProps as bf, MediaUploadField as bg, type MediaUploadFieldProps as bh, MediaUploadGrid as bi, type MediaUploadGridItem as bj, type MediaUploadGridProps as bk, MetricBar as bl, type MetricBarProps as bm, type Milestone as bn, type MilestoneKind as bo, MilestoneTimeline as bp, type MilestoneTimelineProps as bq, NativeSelect as br, NumericKeypad as bs, type NumericKeypadProps as bt, PageHeader as bu, type PageHeaderProps as bv, Pagination as bw, type PaginationProps as bx, Paragraph as by, type ParagraphProps as bz, ALT_SHIFT_E as c, toISODate as c$, SidebarGroupLabel as c0, SidebarLayout as c1, type SidebarLayoutProps as c2, SidebarNavItem as c3, Skeleton as c4, type SkeletonProps as c5, type SkeletonVariant as c6, Sparkline as c7, type SparklineProps as c8, Stack as c9, Title as cA, type TitleLevel as cB, type TitleProps as cC, type ToastOptions as cD, type ToastPlacement as cE, Tooltip as cF, type TooltipProps as cG, TopNav as cH, type TopNavItem as cI, type TopNavProps as cJ, VERSION as cK, appendKey as cL, applyThemePrefs as cM, backspace as cN, confirm as cO, confirmDestructive as cP, formatDate as cQ, glassStyle as cR, inputClasses as cS, isMac as cT, isSeverityTone as cU, mediaFileName as cV, prompt as cW, resolveTheme as cX, severityOf as cY, tabButtonId as cZ, tabPanelId as c_, type StackProps as ca, StatCard as cb, type StatCardProps as cc, Statistic as cd, type StatisticProps as ce, type StatisticSize as cf, type StatisticTone as cg, StatusBadge as ch, StatusBadgeProvider as ci, Switch as cj, type SwitchProps as ck, type SwitchSize as cl, type TabItem as cm, Tabs as cn, type TabsProps as co, Text as cp, type TextProps as cq, type TextSize as cr, type TextTone as cs, type TextWeight as ct, Textarea as cu, type TextareaProps as cv, type Theme as cw, TileButton as cx, type TileButtonProps as cy, type TileSize as cz, ALT_SHIFT_N as d, toast as d0, useClickOutside as d1, useConfirm as d2, useFocusTrap as d3, useIsMobile as d4, useLocalStoragePrefs as d5, useScrollLock as d6, useShellPrefs as d7, useTheme as d8, Accordion as e, type AccordionItem as f, type AccordionProps as g, type Align as h, AuthScreen as i, type AuthScreenProps as j, Avatar as k, AvatarGroup as l, type AvatarGroupProps as m, type AvatarProps as n, type AvatarSize as o, type AvatarStatus as p, type BannerEmphasis as q, type BannerProps as r, type BannerTone as s, BarChart as t, type BarChartProps as u, type BreadcrumbItem as v, Breadcrumbs as w, type BreadcrumbsProps as x, Button as y, type ButtonProps as z };