gridsmith-ui 0.6.6 → 0.7.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.
- package/dist/charts.js +2 -2
- package/dist/chat.d.ts +12 -0
- package/dist/chat.js +94 -0
- package/dist/chat.js.map +1 -0
- package/dist/{chunk-TTZSZNJ6.js → chunk-4KVFH5KC.js} +7 -3
- package/dist/chunk-4KVFH5KC.js.map +1 -0
- package/dist/chunk-G6KC5YNY.js +156 -0
- package/dist/chunk-G6KC5YNY.js.map +1 -0
- package/dist/{chunk-QGBG72OB.js → chunk-M3AARGLI.js} +3 -3
- package/dist/{chunk-QGBG72OB.js.map → chunk-M3AARGLI.js.map} +1 -1
- package/dist/{chunk-GYVBRUO2.js → chunk-NRHIYS5W.js} +14 -3
- package/dist/chunk-NRHIYS5W.js.map +1 -0
- package/dist/{chunk-6UZZYWTY.js → chunk-QVNGQ64Q.js} +5 -5
- package/dist/{chunk-6UZZYWTY.js.map → chunk-QVNGQ64Q.js.map} +1 -1
- package/dist/{chunk-DDKCQVKO.js → chunk-RLNIRPOH.js} +67 -22
- package/dist/chunk-RLNIRPOH.js.map +1 -0
- package/dist/chunk-RLUK575N.js +136 -0
- package/dist/chunk-RLUK575N.js.map +1 -0
- package/dist/chunk-WH2FUFAC.js +14 -0
- package/dist/chunk-WH2FUFAC.js.map +1 -0
- package/dist/{chunk-GX6O72IV.js → chunk-X4CNZFWC.js} +20 -28
- package/dist/chunk-X4CNZFWC.js.map +1 -0
- package/dist/data-grid.js +4 -3
- package/dist/data-grid.js.map +1 -1
- package/dist/editor.js +17 -13
- package/dist/editor.js.map +1 -1
- package/dist/feather-B65FI6CY.js +76 -0
- package/dist/feather-B65FI6CY.js.map +1 -0
- package/dist/heroicons-DIR7PXCR.js +76 -0
- package/dist/heroicons-DIR7PXCR.js.map +1 -0
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +522 -21
- package/dist/index.js +4938 -3510
- package/dist/index.js.map +1 -1
- package/dist/kanban.js +5 -4
- package/dist/kanban.js.map +1 -1
- package/dist/lucide-JH2R3TFV.js +76 -0
- package/dist/lucide-JH2R3TFV.js.map +1 -0
- package/dist/phosphor-HCVUMVT5.js +76 -0
- package/dist/phosphor-HCVUMVT5.js.map +1 -0
- package/dist/resizable.js +2 -2
- package/dist/roots.css +97 -22
- package/dist/tabler-HHIXSM73.js +76 -0
- package/dist/tabler-HHIXSM73.js.map +1 -0
- package/dist/tokens.css +14 -7
- package/dist/utils.js +1 -1
- package/dist/virtualized.js +1 -1
- package/dist-static/tokens.css +14 -7
- package/package.json +15 -3
- package/dist/chunk-DDKCQVKO.js.map +0 -1
- package/dist/chunk-GX6O72IV.js.map +0 -1
- package/dist/chunk-GYVBRUO2.js.map +0 -1
- package/dist/chunk-TTZSZNJ6.js.map +0 -1
- package/dist/feather-U45EQTAU.js +0 -72
- package/dist/feather-U45EQTAU.js.map +0 -1
- package/dist/heroicons-D3G7QU45.js +0 -72
- package/dist/heroicons-D3G7QU45.js.map +0 -1
- package/dist/lucide-OGUV44TQ.js +0 -72
- package/dist/lucide-OGUV44TQ.js.map +0 -1
- package/dist/phosphor-QG2ZMEMZ.js +0 -72
- package/dist/phosphor-QG2ZMEMZ.js.map +0 -1
- package/dist/tabler-MW2HN55L.js +0 -72
- package/dist/tabler-MW2HN55L.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, LabelHTMLAttributes, TextareaHTMLAttributes, Ref, ReactElement, HTMLAttributes, AnchorHTMLAttributes, ComponentType } from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, LabelHTMLAttributes, TextareaHTMLAttributes, Ref, CSSProperties, ReactElement, HTMLAttributes, AnchorHTMLAttributes, ComponentType } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { IconName } from './icons.js';
|
|
5
5
|
import { B as BreakpointKey } from './use-breakpoint-BfKzmkxx.js';
|
|
6
6
|
export { a as BreakpointWidthProvider, u as useBreakpoint } from './use-breakpoint-BfKzmkxx.js';
|
|
7
7
|
|
|
8
8
|
type ButtonVariant = "default" | "secondary" | "tertiary" | "outline" | "ghost" | "destructive" | "success" | "warning" | "link";
|
|
9
|
-
type ButtonSize = "sm" | "md" | "lg" | "icon-sm" | "icon" | "icon-lg";
|
|
9
|
+
type ButtonSize = "xs" | "sm" | "md" | "lg" | "icon-xs" | "icon-sm" | "icon" | "icon-lg";
|
|
10
10
|
declare const ButtonSizeContext: react.Context<ButtonSize | null>;
|
|
11
11
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
12
12
|
variant?: ButtonVariant;
|
|
@@ -65,18 +65,21 @@ declare function Input({ className, size, error, prefix, suffix, ...props }: Omi
|
|
|
65
65
|
interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
66
66
|
autoResize?: boolean;
|
|
67
67
|
maxRows?: number;
|
|
68
|
+
error?: boolean;
|
|
68
69
|
ref?: Ref<HTMLTextAreaElement>;
|
|
69
70
|
}
|
|
70
|
-
declare function Textarea({ className, autoResize, maxRows, ref, ...props }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
71
|
+
declare function Textarea({ className, autoResize, maxRows, error, ref, ...props }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
71
72
|
declare function Label({ className, children, ...props }: LabelHTMLAttributes<HTMLLabelElement>): react_jsx_runtime.JSX.Element;
|
|
72
73
|
type ToggleLayout = "full" | "compact";
|
|
73
|
-
|
|
74
|
+
type ToggleSize = "sm" | "md";
|
|
75
|
+
declare function Toggle({ checked, onChange, label, disabled, error, layout, size, "aria-labelledby": ariaLabelledBy, ...rest }: {
|
|
74
76
|
checked: boolean;
|
|
75
77
|
onChange: (v: boolean) => void;
|
|
76
78
|
label?: string;
|
|
77
79
|
disabled?: boolean;
|
|
78
80
|
error?: boolean;
|
|
79
81
|
layout?: ToggleLayout;
|
|
82
|
+
size?: ToggleSize;
|
|
80
83
|
"aria-labelledby"?: string;
|
|
81
84
|
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange">): react_jsx_runtime.JSX.Element;
|
|
82
85
|
|
|
@@ -102,8 +105,10 @@ interface DropdownProps {
|
|
|
102
105
|
error?: boolean;
|
|
103
106
|
/** When multiple, show removable chips below the trigger. Defaults to true. Set false in toolbar contexts where chips are shown elsewhere. */
|
|
104
107
|
showChips?: boolean;
|
|
108
|
+
/** Accessible name for the trigger, for when there is no visible `label` (e.g. in a toolbar). */
|
|
109
|
+
"aria-label"?: string;
|
|
105
110
|
}
|
|
106
|
-
declare function Dropdown({ options, value, onChange, label, disabled, placeholder, multiple, searchable, size, className, ref, container, error, showChips, }: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
111
|
+
declare function Dropdown({ options, value, onChange, label, disabled, placeholder, multiple, searchable, size, className, ref, container, error, showChips, "aria-label": ariaLabel, }: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
107
112
|
|
|
108
113
|
interface ComboboxOption {
|
|
109
114
|
value: string;
|
|
@@ -124,16 +129,18 @@ interface ComboboxProps {
|
|
|
124
129
|
}
|
|
125
130
|
declare function Combobox({ value, onChange, options, placeholder, disabled, loading, className, ref, container, error }: ComboboxProps): react_jsx_runtime.JSX.Element;
|
|
126
131
|
|
|
132
|
+
type CheckboxSize = "sm" | "md";
|
|
127
133
|
interface CheckboxProps {
|
|
128
134
|
checked: boolean;
|
|
129
135
|
onChange: (checked: boolean) => void;
|
|
130
136
|
label?: string;
|
|
137
|
+
size?: CheckboxSize;
|
|
131
138
|
disabled?: boolean;
|
|
132
139
|
indeterminate?: boolean;
|
|
133
140
|
className?: string;
|
|
134
141
|
ref?: Ref<HTMLInputElement>;
|
|
135
142
|
}
|
|
136
|
-
declare function Checkbox({ checked, onChange, label, disabled, indeterminate, className, ref }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
143
|
+
declare function Checkbox({ checked, onChange, label, size, disabled, indeterminate, className, ref }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
137
144
|
interface CheckboxGroupProps {
|
|
138
145
|
value: string[];
|
|
139
146
|
onChange: (value: string[]) => void;
|
|
@@ -257,8 +264,13 @@ interface SliderRangeProps {
|
|
|
257
264
|
className?: string;
|
|
258
265
|
ref?: Ref<HTMLDivElement>;
|
|
259
266
|
error?: boolean;
|
|
267
|
+
/**
|
|
268
|
+
* Paint the track yourself (e.g. a hue spectrum for a colour slider). The
|
|
269
|
+
* accent fill is hidden so the custom track stays fully visible.
|
|
270
|
+
*/
|
|
271
|
+
trackStyle?: CSSProperties;
|
|
260
272
|
}
|
|
261
|
-
declare function SliderRange({ value, onChange, min, max, step, disabled, showValue, className, ref, error, label }: SliderRangeProps): react_jsx_runtime.JSX.Element;
|
|
273
|
+
declare function SliderRange({ value, onChange, min, max, step, disabled, showValue, className, ref, error, label, trackStyle }: SliderRangeProps): react_jsx_runtime.JSX.Element;
|
|
262
274
|
|
|
263
275
|
interface TimePickerProps {
|
|
264
276
|
value: string;
|
|
@@ -699,14 +711,97 @@ interface AvatarGroupProps {
|
|
|
699
711
|
declare function AvatarGroup({ items, max, size, ring, onOverflowClick, className }: AvatarGroupProps): react_jsx_runtime.JSX.Element;
|
|
700
712
|
|
|
701
713
|
interface EmptyStateProps {
|
|
702
|
-
|
|
714
|
+
/**
|
|
715
|
+
* An icon name from the theme's pack ("inbox", "filter") or an element. A
|
|
716
|
+
* name is the easy path: the state renders it at the frame's size. An `Icon`
|
|
717
|
+
* element is resized to match; any other element is rendered as given. A
|
|
718
|
+
* string that is not an icon name is a type error, not a printed word.
|
|
719
|
+
* (The Sprint 22 bench saw builders pass names into a ReactNode prop and
|
|
720
|
+
* React print the word — 14 Sep 2026.)
|
|
721
|
+
*/
|
|
722
|
+
icon?: IconName | Exclude<ReactNode, string>;
|
|
723
|
+
/** How the icon is framed: the neutral circle (default), or none when the icon element brings its own frame. */
|
|
724
|
+
iconFrame?: "circle" | "none";
|
|
703
725
|
title: string;
|
|
704
726
|
description?: string;
|
|
705
727
|
action?: ReactNode;
|
|
706
728
|
variant?: "empty" | "filtered" | "error" | "no-permission";
|
|
729
|
+
/**
|
|
730
|
+
* Draw a subtle solid border around the state. Off by default: the icon,
|
|
731
|
+
* centred title and padding already read as "nothing here", and a dashed
|
|
732
|
+
* frame (the old default) is what FileUpload uses to mean "drop here".
|
|
733
|
+
*/
|
|
734
|
+
bordered?: boolean;
|
|
735
|
+
className?: string;
|
|
736
|
+
}
|
|
737
|
+
declare function EmptyState({ icon, iconFrame, title, description, action, variant, bordered, className }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
738
|
+
|
|
739
|
+
interface SkipLinkProps {
|
|
740
|
+
/** The id of the main region (AppShell names its <main> "main"). */
|
|
741
|
+
href?: string;
|
|
742
|
+
children?: string;
|
|
743
|
+
className?: string;
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* The first focusable element on a page with repeated navigation: invisible
|
|
747
|
+
* until it receives keyboard focus, then a small floating button that jumps
|
|
748
|
+
* past the sidebar and navbar to the main content (WCAG 2.4.1). AppShell
|
|
749
|
+
* renders one by default; a page outside AppShell composes it first.
|
|
750
|
+
*/
|
|
751
|
+
declare function SkipLink({ href, children, className }: SkipLinkProps): react_jsx_runtime.JSX.Element;
|
|
752
|
+
|
|
753
|
+
interface TableToolbarFilterOption {
|
|
754
|
+
value: string;
|
|
755
|
+
label: string;
|
|
756
|
+
}
|
|
757
|
+
interface TableToolbarActiveFilter {
|
|
758
|
+
id: string;
|
|
759
|
+
label: string;
|
|
760
|
+
onRemove: () => void;
|
|
761
|
+
}
|
|
762
|
+
interface TableToolbarProps {
|
|
763
|
+
/** The search box. `label` is its accessible name and the default placeholder. */
|
|
764
|
+
search?: {
|
|
765
|
+
value: string;
|
|
766
|
+
onChange: (value: string) => void;
|
|
767
|
+
label: string;
|
|
768
|
+
placeholder?: string;
|
|
769
|
+
};
|
|
770
|
+
/** The one filter worth showing inline: a SegmentedControl, or a Dropdown when the toolbar is narrow. */
|
|
771
|
+
primaryFilter?: {
|
|
772
|
+
label: string;
|
|
773
|
+
options: TableToolbarFilterOption[];
|
|
774
|
+
value: string;
|
|
775
|
+
onChange: (value: string) => void;
|
|
776
|
+
};
|
|
777
|
+
/** Further filters, one click away behind the Filters button. */
|
|
778
|
+
filters?: ReactNode;
|
|
779
|
+
filtersOpen?: boolean;
|
|
780
|
+
onFiltersOpenChange?: (open: boolean) => void;
|
|
781
|
+
/** Shown on the Filters button while the row is collapsed. */
|
|
782
|
+
activeFilterCount?: number;
|
|
783
|
+
/** Chips for the filters in force, each removable. */
|
|
784
|
+
activeFilters?: TableToolbarActiveFilter[];
|
|
785
|
+
onClearAll?: () => void;
|
|
786
|
+
/** How many rows match; shown with `resultNoun`. */
|
|
787
|
+
resultCount?: number;
|
|
788
|
+
resultNoun?: [singular: string, plural: string];
|
|
789
|
+
/** Utility actions on the right — an overflow DropdownMenu, an export button. Primary actions belong in the PageHeader. */
|
|
790
|
+
actions?: ReactNode;
|
|
791
|
+
size?: "sm" | "md";
|
|
792
|
+
/** Container width below which the primary filter becomes a Dropdown. */
|
|
793
|
+
compactBreakpoint?: number;
|
|
707
794
|
className?: string;
|
|
708
795
|
}
|
|
709
|
-
|
|
796
|
+
/**
|
|
797
|
+
* The toolbar above a table or list: search, one inline filter, further
|
|
798
|
+
* filters behind a Filters button, the result count with removable chips for
|
|
799
|
+
* the filters in force, and utility actions on the right. The corpus's
|
|
800
|
+
* progressive-disclosure toolbar (search#1, search#3, search#12) as one
|
|
801
|
+
* component, so a page never hand-rolls the row. Primary actions belong in
|
|
802
|
+
* the PageHeader, not here.
|
|
803
|
+
*/
|
|
804
|
+
declare function TableToolbar({ search, primaryFilter, filters, filtersOpen, onFiltersOpenChange, activeFilterCount, activeFilters, onClearAll, resultCount, resultNoun, actions, size, compactBreakpoint, className, }: TableToolbarProps): react_jsx_runtime.JSX.Element;
|
|
710
805
|
|
|
711
806
|
interface TimelineItem {
|
|
712
807
|
title: string;
|
|
@@ -805,38 +900,221 @@ interface CarouselProps {
|
|
|
805
900
|
}
|
|
806
901
|
declare function Carousel({ children, autoPlay, autoPlayInterval, loop, showIndicators, showArrows, className, ref, }: CarouselProps): react_jsx_runtime.JSX.Element;
|
|
807
902
|
|
|
903
|
+
interface ChatMessageSender {
|
|
904
|
+
name: string;
|
|
905
|
+
avatar?: string;
|
|
906
|
+
/** Glyph for a sender with no photo — an assistant or system sender. */
|
|
907
|
+
icon?: IconName;
|
|
908
|
+
}
|
|
909
|
+
/** bubble: a speech bubble (people talking). block: full width, no bubble — assistant replies that carry Cards, charts, code and links. */
|
|
910
|
+
type ChatMessageLayout = "bubble" | "block";
|
|
911
|
+
/** streaming: still arriving (caret, aria-busy, Stop in the composer). error: delivery failed. */
|
|
912
|
+
type ChatMessageStatus = "sent" | "streaming" | "error";
|
|
913
|
+
type ChatMessageAction = "copy" | "regenerate" | "thumbs-up" | "thumbs-down" | "retry" | {
|
|
914
|
+
id: string;
|
|
915
|
+
label: string;
|
|
916
|
+
icon: IconName;
|
|
917
|
+
};
|
|
918
|
+
interface ChatMessageSource {
|
|
919
|
+
label: string;
|
|
920
|
+
href: string;
|
|
921
|
+
}
|
|
808
922
|
interface ChatMessage {
|
|
809
923
|
id: string;
|
|
810
|
-
sender:
|
|
811
|
-
name: string;
|
|
812
|
-
avatar?: string;
|
|
813
|
-
};
|
|
924
|
+
sender: ChatMessageSender;
|
|
814
925
|
content: string | ReactNode;
|
|
815
926
|
timestamp: Date;
|
|
816
927
|
isOwn?: boolean;
|
|
928
|
+
/** Overrides the list's defaultLayout for this message. */
|
|
929
|
+
layout?: ChatMessageLayout;
|
|
930
|
+
status?: ChatMessageStatus;
|
|
931
|
+
/** Citation row rendered under the content. */
|
|
932
|
+
sources?: ChatMessageSource[];
|
|
933
|
+
/** Controls under the content — revealed on hover or keyboard focus, always in the DOM. */
|
|
934
|
+
actions?: ChatMessageAction[];
|
|
817
935
|
}
|
|
818
936
|
interface ChatMessageListProps {
|
|
819
937
|
messages: ChatMessage[];
|
|
820
938
|
typingUser?: string;
|
|
821
939
|
showInput?: boolean;
|
|
822
940
|
onSend?: (text: string) => void;
|
|
941
|
+
/** A built-in action id ("copy", "regenerate", …) or a custom action's id. */
|
|
942
|
+
onAction?: (messageId: string, action: string) => void;
|
|
943
|
+
/** While a reply is arriving: send is disabled and a Stop control appears (calls onStop). */
|
|
944
|
+
busy?: boolean;
|
|
945
|
+
onStop?: () => void;
|
|
946
|
+
/** The attachment and voice controls render only when a handler is given. */
|
|
947
|
+
onAttach?: () => void;
|
|
948
|
+
onVoice?: () => void;
|
|
949
|
+
placeholder?: string;
|
|
950
|
+
/** Starter prompts; clicking one sends it. Part of the empty state, and optionally shown after every reply. */
|
|
951
|
+
suggestions?: string[];
|
|
952
|
+
/** Default "empty-only". */
|
|
953
|
+
suggestionsMode?: "empty-only" | "always";
|
|
954
|
+
/** Replaces the default empty state (an EmptyState with the suggestions). */
|
|
955
|
+
emptyState?: ReactNode;
|
|
956
|
+
/** Layout for messages that do not set their own. Default "bubble". */
|
|
957
|
+
defaultLayout?: ChatMessageLayout;
|
|
958
|
+
/** Hook for markdown or custom rendering of a message's content. */
|
|
959
|
+
renderContent?: (message: ChatMessage) => ReactNode;
|
|
960
|
+
/** Keep the newest message in view while the reader is at the bottom; otherwise offer "Jump to latest". Default true. */
|
|
961
|
+
autoScroll?: boolean;
|
|
823
962
|
className?: string;
|
|
824
963
|
}
|
|
825
|
-
declare function ChatMessageList({ messages, typingUser, showInput, onSend, className, }: ChatMessageListProps): react_jsx_runtime.JSX.Element;
|
|
964
|
+
declare function ChatMessageList({ messages, typingUser, showInput, onSend, onAction, busy, onStop, onAttach, onVoice, placeholder, suggestions, suggestionsMode, emptyState, defaultLayout, renderContent, autoScroll, className, }: ChatMessageListProps): react_jsx_runtime.JSX.Element;
|
|
965
|
+
|
|
966
|
+
type ChatPanelStatusTone = "success" | "warning" | "error" | "neutral";
|
|
967
|
+
interface ChatPanelProps {
|
|
968
|
+
/** Heading text, rendered as an h2 whose id is `${id}-title` — pass that id to the surface's labelledBy. */
|
|
969
|
+
title: string;
|
|
970
|
+
/** Short line under the title: the model, the team, "Support". */
|
|
971
|
+
description?: string;
|
|
972
|
+
/** Presence or health beside the title, rendered with StatusDot. */
|
|
973
|
+
status?: {
|
|
974
|
+
label: string;
|
|
975
|
+
tone?: ChatPanelStatusTone;
|
|
976
|
+
};
|
|
977
|
+
/** Leading visual: a curated icon name or an element such as an Avatar. Default "sparkles". */
|
|
978
|
+
icon?: IconName | ReactNode;
|
|
979
|
+
/** Extra header controls, rendered before the built-in ones. */
|
|
980
|
+
actions?: ReactNode;
|
|
981
|
+
onClose: () => void;
|
|
982
|
+
/** Shows a "New conversation" control when given. */
|
|
983
|
+
onNewConversation?: () => void;
|
|
984
|
+
/** Shows an expand / collapse control when given (CornerPanel and full-page layouts use it). */
|
|
985
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
986
|
+
expanded?: boolean;
|
|
987
|
+
/** The conversation — usually ChatMessageList. Laid out as a column that fills the panel. */
|
|
988
|
+
children: ReactNode;
|
|
989
|
+
/** Small muted footer, e.g. an AI disclaimer. */
|
|
990
|
+
footer?: ReactNode;
|
|
991
|
+
id?: string;
|
|
992
|
+
className?: string;
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* The chrome around a conversation: header (icon, title, status, description,
|
|
996
|
+
* controls), a body that fills the remaining height, and an optional footer.
|
|
997
|
+
* Surface-agnostic — it never positions itself. Put it inside a non-modal
|
|
998
|
+
* Drawer, a CornerPanel, or a page column, and give ChatMessageList as children.
|
|
999
|
+
*/
|
|
1000
|
+
declare function ChatPanel({ title, description, status, icon, actions, onClose, onNewConversation, onExpandedChange, expanded, children, footer, id, className, }: ChatPanelProps): react_jsx_runtime.JSX.Element;
|
|
1001
|
+
|
|
1002
|
+
/**
|
|
1003
|
+
* Where the window anchors. bottom-right / bottom-left: above a bubble or pill Launcher
|
|
1004
|
+
* (anchorInset keeps the launcher clear). top-right / top-left: hanging under the top bar,
|
|
1005
|
+
* for an assistant opened from a Navbar button — pass offset.y as the bar's height plus a gap.
|
|
1006
|
+
* right / left: beside a ribbon Launcher on that edge, inset by the ribbon's width; `align`
|
|
1007
|
+
* places it near the end of the edge or mid-edge, like the ribbon.
|
|
1008
|
+
*/
|
|
1009
|
+
type CornerPanelEdge = "bottom-right" | "bottom-left" | "top-right" | "top-left" | "right" | "left";
|
|
1010
|
+
interface CornerPanelProps {
|
|
1011
|
+
open: boolean;
|
|
1012
|
+
onClose: () => void;
|
|
1013
|
+
/** Where to anchor — match the Launcher's edge (see CornerPanelEdge). Default "bottom-right". */
|
|
1014
|
+
edge?: CornerPanelEdge;
|
|
1015
|
+
/** Side edges (right / left) only: near the end of the edge (default) or mid-edge — match the ribbon's align. */
|
|
1016
|
+
align?: "end" | "center";
|
|
1017
|
+
/** Default "380px". */
|
|
1018
|
+
width?: string;
|
|
1019
|
+
/** Default "600px"; never taller than the viewport minus the offsets. */
|
|
1020
|
+
height?: string;
|
|
1021
|
+
/** Distance from the viewport edges — match the Launcher's offset. Default var(--ds-space-4) on both axes. */
|
|
1022
|
+
offset?: {
|
|
1023
|
+
x?: string;
|
|
1024
|
+
y?: string;
|
|
1025
|
+
};
|
|
1026
|
+
/** Space reserved below the window for the launcher: its height plus a gap. Default the lg launcher (48px) + one step; pass "0px" when no launcher sits in the corner. */
|
|
1027
|
+
anchorInset?: string;
|
|
1028
|
+
/** Fills the viewport, inset by offset. Controlled — ChatPanel's expand control drives it. */
|
|
1029
|
+
expanded?: boolean;
|
|
1030
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
1031
|
+
/** id applied to the dialog element, for the Launcher's aria-controls. */
|
|
1032
|
+
id?: string;
|
|
1033
|
+
/** id of the element that names the dialog — ChatPanel's heading. */
|
|
1034
|
+
labelledBy: string;
|
|
1035
|
+
/** Keep the window mounted while closed (hidden, out of the tab order) so drafts and scroll survive. Default true — this surface exists for persistent assistants. */
|
|
1036
|
+
keepMounted?: boolean;
|
|
1037
|
+
/** Render inside this element (absolute) instead of document.body (fixed) — preview frames. */
|
|
1038
|
+
container?: Element | DocumentFragment;
|
|
1039
|
+
children: ReactNode;
|
|
1040
|
+
className?: string;
|
|
1041
|
+
}
|
|
1042
|
+
/**
|
|
1043
|
+
* A compact non-modal window anchored above a bubble or pill Launcher — the
|
|
1044
|
+
* Intercom shape. Same contract as Drawer with modal={false}: the page stays
|
|
1045
|
+
* operable, nothing traps focus, Escape closes only while focus is inside,
|
|
1046
|
+
* focus returns to the opener, an outside click does nothing. Toasts move above
|
|
1047
|
+
* it while it is open. At phone width it is the modal Sheet.
|
|
1048
|
+
*/
|
|
1049
|
+
declare function CornerPanel({ open, onClose, edge, align, width, height, offset, anchorInset, expanded, id, labelledBy, keepMounted, container, children, className, }: CornerPanelProps): react_jsx_runtime.JSX.Element;
|
|
1050
|
+
|
|
1051
|
+
type AsidePanelSide = "right" | "left";
|
|
1052
|
+
type AsidePanelPosition = "flush" | "floating";
|
|
1053
|
+
interface AsidePanelProps {
|
|
1054
|
+
open: boolean;
|
|
1055
|
+
onClose: () => void;
|
|
1056
|
+
/** Which side of the content column. Default "right". Pass the same value as AppShell's asideSide. */
|
|
1057
|
+
side?: AsidePanelSide;
|
|
1058
|
+
/** Column width while open. Default "420px" — the same as the side panel. */
|
|
1059
|
+
width?: string;
|
|
1060
|
+
/**
|
|
1061
|
+
* flush (default, edge-to-edge with one border) or floating (inset by the shell gutter, rounded, glass —
|
|
1062
|
+
* the same card as a floating Sidebar). Give it the Sidebar's position: the column is the sidebar's mirror.
|
|
1063
|
+
*/
|
|
1064
|
+
position?: AsidePanelPosition;
|
|
1065
|
+
/** Whether the navbar above is floating — its bottom gutter is then the gap, so the floating column drops its top inset (as Sidebar does). */
|
|
1066
|
+
navbarFloating?: boolean;
|
|
1067
|
+
/** Whether the sidebar is floating — a left-docked floating column then drops its outer gutter, because the sidebar's own gutter is the gap (as PageHeader does). */
|
|
1068
|
+
sidebarFloating?: boolean;
|
|
1069
|
+
/** Below this breakpoint the page is too narrow to share: the panel renders as a non-modal Drawer instead (and as the modal Sheet at or below sm, as Drawer does). Default "lg". */
|
|
1070
|
+
collapseBelow?: BreakpointKey;
|
|
1071
|
+
/** Keep the content mounted while closed (hidden) so drafts and scroll survive. Default true — the column exists for persistent assistants. */
|
|
1072
|
+
keepMounted?: boolean;
|
|
1073
|
+
/** Let the user drag the page-side edge to widen the column, between width and maxWidth. Default true. */
|
|
1074
|
+
resizable?: boolean;
|
|
1075
|
+
/** Upper bound for resizing. Default 60% of the viewport (or of the container). */
|
|
1076
|
+
maxWidth?: string;
|
|
1077
|
+
/** Accessible name of the landmark — ChatPanel's heading id. */
|
|
1078
|
+
labelledBy: string;
|
|
1079
|
+
id?: string;
|
|
1080
|
+
children: ReactNode;
|
|
1081
|
+
className?: string;
|
|
1082
|
+
}
|
|
1083
|
+
/**
|
|
1084
|
+
* A docked column beside the page content: the page narrows to make room
|
|
1085
|
+
* instead of being covered (the Copilot / Sidekick layout). In-flow, so it is
|
|
1086
|
+
* a landmark (`role="complementary"`), not a dialog. Same non-modal contract as
|
|
1087
|
+
* Drawer modal={false}: no focus trap, Escape closes only from inside, focus
|
|
1088
|
+
* returns to the opener, an outside click does nothing, drafts survive closing.
|
|
1089
|
+
* Below `collapseBelow` it becomes the overlay Drawer; on phones the Sheet.
|
|
1090
|
+
*/
|
|
1091
|
+
declare function AsidePanel({ open, onClose, side, width, position, navbarFloating: navbarFloatingProp, sidebarFloating: sidebarFloatingProp, collapseBelow, keepMounted, resizable, maxWidth, labelledBy, id, children, className, }: AsidePanelProps): react_jsx_runtime.JSX.Element;
|
|
826
1092
|
|
|
827
1093
|
interface StackedListItem {
|
|
828
1094
|
id: string | number;
|
|
829
1095
|
leading?: ReactNode;
|
|
830
1096
|
title: string;
|
|
831
1097
|
subtitle?: string;
|
|
1098
|
+
/** Third line under the subtitle (a message preview, a summary). Rows with one align their leading element to the top. */
|
|
1099
|
+
description?: string;
|
|
832
1100
|
meta?: ReactNode;
|
|
833
1101
|
actions?: ReactNode;
|
|
1102
|
+
/**
|
|
1103
|
+
* Read/unread emphasis for inbox-style lists: unread rows take a bold title
|
|
1104
|
+
* and an accent dot before the meta; read rows drop the title to secondary
|
|
1105
|
+
* text. Leave undefined for lists without that distinction.
|
|
1106
|
+
*/
|
|
1107
|
+
unread?: boolean;
|
|
1108
|
+
/** Marks this row as the current one (aria-current). `selectedId` on the list is the usual way to set it. */
|
|
1109
|
+
selected?: boolean;
|
|
834
1110
|
onClick?: () => void;
|
|
835
1111
|
}
|
|
836
1112
|
interface StackedListProps {
|
|
837
1113
|
items: StackedListItem[];
|
|
838
1114
|
divided?: boolean;
|
|
839
1115
|
flush?: boolean;
|
|
1116
|
+
/** The current row in a master-detail list. Its treatment follows the theme's in-page vertical active style (rail, tint or pill), like Tabs. */
|
|
1117
|
+
selectedId?: string | number;
|
|
840
1118
|
className?: string;
|
|
841
1119
|
}
|
|
842
1120
|
declare const StackedList: react.ForwardRefExoticComponent<StackedListProps & react.RefAttributes<HTMLUListElement>>;
|
|
@@ -873,6 +1151,47 @@ interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
873
1151
|
*/
|
|
874
1152
|
declare const Link: react.ForwardRefExoticComponent<LinkProps & react.RefAttributes<HTMLAnchorElement>>;
|
|
875
1153
|
|
|
1154
|
+
type LauncherVariant = "bubble" | "pill" | "ribbon";
|
|
1155
|
+
type LauncherEdge = "bottom-right" | "bottom-left" | "right" | "left" | "bottom";
|
|
1156
|
+
type LauncherWhenOpen = "close" | "hide" | "keep";
|
|
1157
|
+
type LauncherTone = "neutral" | "neutral-accent" | "subtle" | "accent";
|
|
1158
|
+
type LauncherSize = "md" | "lg";
|
|
1159
|
+
interface LauncherProps {
|
|
1160
|
+
/** Visual form. bubble: a square the height of a Button, icon only. pill: icon + label at Button proportions. ribbon: flush to an edge — sideways label on a side edge, horizontal on the bottom edge. Default "bubble". */
|
|
1161
|
+
variant?: LauncherVariant;
|
|
1162
|
+
/** Height, matching Button's md (40px) and lg (48px) steps; the bubble is that size square. Default "lg". Ribbons are unaffected. */
|
|
1163
|
+
size?: LauncherSize;
|
|
1164
|
+
/** Colour weight. neutral (default): surface background, border, primary text — present without competing with the page's primary action. neutral-accent: the same surface with only the icon in the accent (gradient included). subtle: accent tint. accent: the primary fill (gradient included), for products that want the assistant prominent. */
|
|
1165
|
+
tone?: LauncherTone;
|
|
1166
|
+
/** bubble and pill accept the two bottom corners; ribbon accepts right, left and bottom. Default "bottom-right" (or "right" for ribbon). */
|
|
1167
|
+
edge?: LauncherEdge;
|
|
1168
|
+
/** ribbon only: where along the edge. "end" (default) sits near the bottom of a side edge or near the right of the bottom edge; "center" is mid-edge. */
|
|
1169
|
+
align?: "center" | "end";
|
|
1170
|
+
/** Accessible name for every variant; visible text for pill and ribbon. */
|
|
1171
|
+
label: string;
|
|
1172
|
+
/** bubble and pill default to "sparkles" (curated; the Feather pack substitutes a star). A ribbon shows only its label unless an icon is given. */
|
|
1173
|
+
icon?: IconName | ReactNode;
|
|
1174
|
+
/** Unread count (number) or a dot (true). */
|
|
1175
|
+
badge?: number | boolean;
|
|
1176
|
+
open: boolean;
|
|
1177
|
+
onOpenChange: (open: boolean) => void;
|
|
1178
|
+
/** id of the panel this launcher controls — emitted as aria-controls while open (the panel may not be in the DOM while closed). */
|
|
1179
|
+
panelId?: string;
|
|
1180
|
+
/** While the panel is open: close morphs the launcher into a close button (default); hide keeps it mounted but invisible and out of the tab order; keep leaves it unchanged. */
|
|
1181
|
+
whenOpen?: LauncherWhenOpen;
|
|
1182
|
+
/** Distance from the edges. Default var(--ds-space-4) on both axes; safe-area insets are added on top. */
|
|
1183
|
+
offset?: {
|
|
1184
|
+
x?: string;
|
|
1185
|
+
y?: string;
|
|
1186
|
+
};
|
|
1187
|
+
/** Keyboard shortcut such as "mod+." (mod is ⌘ on macOS, Ctrl elsewhere; avoid keys the browser owns, like Ctrl+J). Toggles when closed; with the panel open it moves focus into the panel, or closes when focus is already inside. Shown in the bubble's tooltip. */
|
|
1188
|
+
shortcut?: string;
|
|
1189
|
+
/** Render inside this element (absolute) instead of document.body (fixed) — preview frames and the BuilderShell. */
|
|
1190
|
+
container?: Element | DocumentFragment;
|
|
1191
|
+
className?: string;
|
|
1192
|
+
}
|
|
1193
|
+
declare function Launcher({ variant, size, tone, edge, align, label, icon, badge, open, onOpenChange, panelId, whenOpen, offset, shortcut, container, className, }: LauncherProps): react.ReactPortal | null;
|
|
1194
|
+
|
|
876
1195
|
type TabsOverflow = "scroll" | "hidden" | "truncate";
|
|
877
1196
|
interface Tab {
|
|
878
1197
|
id: string;
|
|
@@ -993,6 +1312,10 @@ interface SidebarContextValue {
|
|
|
993
1312
|
onCollapsedChange: (collapsed: boolean) => void;
|
|
994
1313
|
portalContainer: Element | null;
|
|
995
1314
|
type: SidebarType;
|
|
1315
|
+
/** flush or floating — with a floating navbar, a minimal flush sidebar drops its top inset; floating keeps it inside the card. */
|
|
1316
|
+
position: SidebarPosition;
|
|
1317
|
+
/** Whether the adjacent navbar is floating (the floating navbar carries its own inset below it). */
|
|
1318
|
+
navbarFloating: boolean;
|
|
996
1319
|
navSize?: "sm" | "md";
|
|
997
1320
|
}
|
|
998
1321
|
declare function useSidebar(): SidebarContextValue | null;
|
|
@@ -1001,7 +1324,13 @@ interface SidebarProps {
|
|
|
1001
1324
|
header?: ReactNode;
|
|
1002
1325
|
footer?: ReactNode;
|
|
1003
1326
|
children: ReactNode;
|
|
1327
|
+
/** Controlled collapse state. */
|
|
1004
1328
|
collapsed?: boolean;
|
|
1329
|
+
/**
|
|
1330
|
+
* Initial collapse state for a locally-owned Sidebar. Passing this opts out of
|
|
1331
|
+
* the AppShell's responsive collapse (auto-rail between md and lg) in favour of
|
|
1332
|
+
* plain local state.
|
|
1333
|
+
*/
|
|
1005
1334
|
defaultCollapsed?: boolean;
|
|
1006
1335
|
onCollapsedChange?: (collapsed: boolean) => void;
|
|
1007
1336
|
variant?: SidebarVariant;
|
|
@@ -1061,15 +1390,26 @@ interface SegmentedControlOption {
|
|
|
1061
1390
|
label: string;
|
|
1062
1391
|
disabled?: boolean;
|
|
1063
1392
|
}
|
|
1393
|
+
type SegmentedControlSize = "xs" | "sm" | "md" | "lg";
|
|
1064
1394
|
interface SegmentedControlProps {
|
|
1065
1395
|
value: string;
|
|
1066
1396
|
onChange: (value: string) => void;
|
|
1067
1397
|
options: SegmentedControlOption[];
|
|
1068
|
-
|
|
1398
|
+
/** xs is for dense tool chrome (toolbars, inspectors): 24px tall. */
|
|
1399
|
+
size?: SegmentedControlSize;
|
|
1069
1400
|
variant?: "default" | "ghost";
|
|
1401
|
+
/** Stretch to the container and share the width equally between options. */
|
|
1402
|
+
fullWidth?: boolean;
|
|
1403
|
+
/**
|
|
1404
|
+
* Called with an option's value while the pointer is over it and with null
|
|
1405
|
+
* when it leaves, so a picker can preview a choice before committing it.
|
|
1406
|
+
*/
|
|
1407
|
+
onHoverChange?: (value: string | null) => void;
|
|
1070
1408
|
className?: string;
|
|
1409
|
+
/** Accessible name for the radiogroup, for when there is no visible label (e.g. in a toolbar). */
|
|
1410
|
+
"aria-label"?: string;
|
|
1071
1411
|
}
|
|
1072
|
-
declare function SegmentedControl({ value, onChange, options, size, variant, className, }: SegmentedControlProps): react_jsx_runtime.JSX.Element;
|
|
1412
|
+
declare function SegmentedControl({ value, onChange, options, size, variant, fullWidth, onHoverChange, className, "aria-label": ariaLabel, }: SegmentedControlProps): react_jsx_runtime.JSX.Element;
|
|
1073
1413
|
|
|
1074
1414
|
interface BottomNavItem {
|
|
1075
1415
|
label: string;
|
|
@@ -1257,7 +1597,15 @@ interface DialogProps {
|
|
|
1257
1597
|
size?: DialogSize;
|
|
1258
1598
|
alert?: boolean;
|
|
1259
1599
|
container?: Element | DocumentFragment;
|
|
1260
|
-
/**
|
|
1600
|
+
/**
|
|
1601
|
+
* Primary action for Enter. Dialog owns the form's default button, so Enter in
|
|
1602
|
+
* any single-line field runs this regardless of how the footer is typed, and a
|
|
1603
|
+
* footer button without an explicit `type` never submits when clicked. Ignored
|
|
1604
|
+
* for `variant="destructive"`: Enter in a field must not perform a destructive
|
|
1605
|
+
* action (Apple HIG: Cancel is the default; APG: focus the least destructive
|
|
1606
|
+
* action). If the footer has a `type="submit"` button and it is disabled, Enter
|
|
1607
|
+
* does nothing, mirroring native implicit submission.
|
|
1608
|
+
*/
|
|
1261
1609
|
onSubmit?: () => void;
|
|
1262
1610
|
}
|
|
1263
1611
|
declare function Dialog({ open, onClose, title, description, children, footer, variant, size, alert, container, onSubmit }: DialogProps): react.ReactPortal | null;
|
|
@@ -1286,18 +1634,47 @@ interface DrawerProps {
|
|
|
1286
1634
|
mobile?: "sheet" | "panel";
|
|
1287
1635
|
/** Snap points for the phone-width Sheet, as fractions of the viewport. Default [0.5, 0.92]. */
|
|
1288
1636
|
snapPoints?: number[];
|
|
1637
|
+
/**
|
|
1638
|
+
* Default true. false makes the drawer a persistent, non-modal panel the user works alongside
|
|
1639
|
+
* (an assistant, help): no backdrop, no scroll lock, no focus trap — the page stays operable.
|
|
1640
|
+
* It closes only on Escape while focus is inside it, its close control, or onClose from the
|
|
1641
|
+
* consumer; an outside click does nothing. At phone width the Sheet is always modal.
|
|
1642
|
+
*/
|
|
1643
|
+
modal?: boolean;
|
|
1644
|
+
/**
|
|
1645
|
+
* Keep the panel in the DOM while closed (hidden and out of the tab order) so a half-typed
|
|
1646
|
+
* message, the scroll position and any in-progress rendering survive close and reopen.
|
|
1647
|
+
* Default false — the panel unmounts after its close transition, as it always has.
|
|
1648
|
+
*/
|
|
1649
|
+
keepMounted?: boolean;
|
|
1650
|
+
/** id applied to the dialog element, for an opener's aria-controls. */
|
|
1651
|
+
id?: string;
|
|
1652
|
+
/** id of the element that names the dialog when no title is rendered — e.g. ChatPanel's heading. */
|
|
1653
|
+
labelledBy?: string;
|
|
1654
|
+
/**
|
|
1655
|
+
* Let the user drag the page-side edge to widen a non-modal side drawer,
|
|
1656
|
+
* between `width` and maxWidth (default 60% of the viewport). Default false —
|
|
1657
|
+
* ordinary drawers keep the one shared width. Ignored when modal or at phone width.
|
|
1658
|
+
*/
|
|
1659
|
+
resizable?: boolean;
|
|
1660
|
+
maxWidth?: string;
|
|
1289
1661
|
}
|
|
1290
1662
|
declare function Drawer(props: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
1291
1663
|
|
|
1292
|
-
interface TooltipProps {
|
|
1664
|
+
interface TooltipProps extends Omit<HTMLAttributes<HTMLElement>, "content"> {
|
|
1293
1665
|
content: ReactNode;
|
|
1294
1666
|
children: ReactNode;
|
|
1295
1667
|
side?: Side;
|
|
1296
1668
|
delay?: number;
|
|
1297
1669
|
className?: string;
|
|
1298
1670
|
container?: Element | DocumentFragment;
|
|
1671
|
+
/**
|
|
1672
|
+
* A Tooltip can itself be the child of a Slot — `<DropdownMenu trigger={<Tooltip …><Button/></Tooltip>}>` —
|
|
1673
|
+
* so the ref and handlers a parent merges onto it are passed through to its own trigger (14 Sep 2026).
|
|
1674
|
+
*/
|
|
1675
|
+
ref?: Ref<HTMLElement>;
|
|
1299
1676
|
}
|
|
1300
|
-
declare function Tooltip({ content, children, side, delay, className, container }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
1677
|
+
declare function Tooltip({ content, children, side, delay, className, container, ref: forwardedRef, ...slotProps }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
1301
1678
|
|
|
1302
1679
|
interface PopoverProps {
|
|
1303
1680
|
open: boolean;
|
|
@@ -1375,8 +1752,14 @@ interface SheetProps {
|
|
|
1375
1752
|
container?: Element | DocumentFragment;
|
|
1376
1753
|
/** Remove default content padding — use when the child handles its own spacing. */
|
|
1377
1754
|
flush?: boolean;
|
|
1755
|
+
/** Keep the sheet in the DOM while closed (hidden, out of the tab order) so its content's state survives close and reopen. Default false. */
|
|
1756
|
+
keepMounted?: boolean;
|
|
1757
|
+
/** id applied to the dialog element, for an opener's aria-controls. */
|
|
1758
|
+
id?: string;
|
|
1759
|
+
/** id of the element that names the dialog when no title is rendered. */
|
|
1760
|
+
labelledBy?: string;
|
|
1378
1761
|
}
|
|
1379
|
-
declare function Sheet({ open, onClose, title, children, footer, snapPoints, container, flush }: SheetProps): react.ReactPortal | null;
|
|
1762
|
+
declare function Sheet({ open, onClose, title, children, footer, snapPoints, container, flush, keepMounted, id, labelledBy }: SheetProps): react.ReactPortal | null;
|
|
1380
1763
|
|
|
1381
1764
|
interface Notification {
|
|
1382
1765
|
id: string;
|
|
@@ -1560,6 +1943,46 @@ interface ScrollAreaProps {
|
|
|
1560
1943
|
}
|
|
1561
1944
|
declare function ScrollArea({ children, className, orientation, maxHeight, maxWidth, }: ScrollAreaProps): react_jsx_runtime.JSX.Element;
|
|
1562
1945
|
|
|
1946
|
+
/**
|
|
1947
|
+
* The theme's shell-level decisions, carried once by AppShell so that
|
|
1948
|
+
* PageHeader and PageContainer can render a page the way the builder preview
|
|
1949
|
+
* renders it without the page passing a single flag (Sprint 25, 14 Sep 2026).
|
|
1950
|
+
*
|
|
1951
|
+
* The generated shell passes the object the template emits; the builder
|
|
1952
|
+
* preview passes the same values from the theme state. Every field is
|
|
1953
|
+
* optional: a page's own props always win over the theme, and a header
|
|
1954
|
+
* outside any shell falls back to the component defaults it always had.
|
|
1955
|
+
*/
|
|
1956
|
+
type ChromePosition = "flush" | "floating";
|
|
1957
|
+
type ThemePageHeaderVariant = "default" | "colourful" | "minimal" | "tabs-integrated";
|
|
1958
|
+
type ThemePageHeaderBehavior = "static" | "snapping";
|
|
1959
|
+
type ThemePageHeaderIntensity = "subtle" | "bold";
|
|
1960
|
+
type ThemeBreadcrumbPosition = "inline" | "contained";
|
|
1961
|
+
type ThemeBreadcrumbStyle = "default" | "pill";
|
|
1962
|
+
type ThemeBreadcrumbSeparator = "chevron" | "slash" | "dot" | "arrow";
|
|
1963
|
+
interface AppShellTheme {
|
|
1964
|
+
/** Where the navbar sits; a floating navbar's gutter is the gap above a floating header. Confirmed by the rendered Navbar. */
|
|
1965
|
+
navbarPosition?: ChromePosition;
|
|
1966
|
+
/** Where the sidebar sits; a floating sidebar's gutter is the gap beside a floating header. Confirmed by the rendered Sidebar. */
|
|
1967
|
+
sidebarPosition?: ChromePosition;
|
|
1968
|
+
pageHeader?: {
|
|
1969
|
+
variant?: ThemePageHeaderVariant;
|
|
1970
|
+
behavior?: ThemePageHeaderBehavior;
|
|
1971
|
+
position?: ChromePosition;
|
|
1972
|
+
/** Colourful only. */
|
|
1973
|
+
intensity?: ThemePageHeaderIntensity;
|
|
1974
|
+
/** Colourful on the home page only; other pages take `otherPagesVariant`. The shell decides which page is home. */
|
|
1975
|
+
colourfulHomeOnly?: boolean;
|
|
1976
|
+
otherPagesVariant?: "default" | "minimal";
|
|
1977
|
+
};
|
|
1978
|
+
breadcrumbs?: {
|
|
1979
|
+
/** Inline in the header, or a contained strip the container renders above it. */
|
|
1980
|
+
position?: ThemeBreadcrumbPosition;
|
|
1981
|
+
style?: ThemeBreadcrumbStyle;
|
|
1982
|
+
separator?: ThemeBreadcrumbSeparator;
|
|
1983
|
+
};
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1563
1986
|
interface AppShellContextValue {
|
|
1564
1987
|
hasSidebar: boolean;
|
|
1565
1988
|
hasMobileMenu: boolean;
|
|
@@ -1569,6 +1992,42 @@ interface AppShellContextValue {
|
|
|
1569
1992
|
isMobile: boolean;
|
|
1570
1993
|
/** True only for tablet-sized viewports (between sm and md breakpoints). Drawer shows here, not on small mobile. */
|
|
1571
1994
|
isTablet: boolean;
|
|
1995
|
+
/**
|
|
1996
|
+
* Effective sidebar collapse for a traditional Sidebar rendered in the shell.
|
|
1997
|
+
* The user's explicit choice wins; otherwise the auto tier applies — collapsed
|
|
1998
|
+
* to a rail at or below the `lg` breakpoint, expanded above it. Lives here rather
|
|
1999
|
+
* than in Sidebar so it survives the sidebar unmounting in the drawer range.
|
|
2000
|
+
*/
|
|
2001
|
+
sidebarCollapsed: boolean;
|
|
2002
|
+
/** Records an explicit user choice. Overrides the auto tier in both directions for the session. */
|
|
2003
|
+
setSidebarCollapsed: (collapsed: boolean) => void;
|
|
2004
|
+
/** True while a docked AsidePanel in the aside slot is open beside the content. Pages may hide non-essential chrome on it. */
|
|
2005
|
+
asideOpen: boolean;
|
|
2006
|
+
/** Set by AsidePanel; not for pages to call. */
|
|
2007
|
+
setAsideOpen: (open: boolean) => void;
|
|
2008
|
+
/** Which side the aside slot is on (AppShell's asideSide). */
|
|
2009
|
+
asideSide: "right" | "left";
|
|
2010
|
+
/** True while the docked AsidePanel is floating — a floating PageHeader drops its gutter on that side, as it does beside a floating Sidebar. */
|
|
2011
|
+
asideFloating: boolean;
|
|
2012
|
+
/** Set by AsidePanel; not for pages to call. */
|
|
2013
|
+
setAsideFloating: (floating: boolean) => void;
|
|
2014
|
+
/**
|
|
2015
|
+
* The shell's root element, for previews that need to render overlays inside their frame
|
|
2016
|
+
* (the dashboard builder passes it to Launcher, CornerPanel and Drawer as `container`).
|
|
2017
|
+
* Components never read it themselves: a container moves the toast-inset claim onto that
|
|
2018
|
+
* element, where a body-level ToastProvider cannot see it.
|
|
2019
|
+
*/
|
|
2020
|
+
container: HTMLElement | null;
|
|
2021
|
+
/** The theme's shell-level decisions (Sprint 25). PageHeader and PageContainer resolve their defaults from it. */
|
|
2022
|
+
theme: AppShellTheme | null;
|
|
2023
|
+
/** The current route is the home page (`currentPath === homePath`); decides `colourfulHomeOnly`. */
|
|
2024
|
+
isHome: boolean;
|
|
2025
|
+
/** The rendered Navbar floats (registered by the Navbar; the theme's `navbarPosition` until it has). */
|
|
2026
|
+
navbarFloating: boolean;
|
|
2027
|
+
/** The rendered Sidebar floats, and is a sidebar rather than a drawer: false below md and in stacked layouts. */
|
|
2028
|
+
sidebarFloating: boolean;
|
|
2029
|
+
/** Called by Sidebar and Navbar so the shell knows the chrome that is actually rendered. Returns the unregister. */
|
|
2030
|
+
registerChrome: (kind: "navbar" | "sidebar", position: ChromePosition) => () => void;
|
|
1572
2031
|
}
|
|
1573
2032
|
declare function useAppShell(): AppShellContextValue | null;
|
|
1574
2033
|
type AppShellLayout = "sidebar" | "stacked" | "sidebar-header" | "multi-column";
|
|
@@ -1585,10 +2044,32 @@ interface AppShellProps {
|
|
|
1585
2044
|
mobileMenuFlush?: boolean;
|
|
1586
2045
|
navbar?: ReactNode;
|
|
1587
2046
|
mobileNav?: ReactNode;
|
|
2047
|
+
/** Rendered below the page content inside the scrolling region and pinned to the bottom on short pages. Ignored when `scrollable` is false. */
|
|
2048
|
+
footer?: ReactNode;
|
|
2049
|
+
/** Render a SkipLink as the first focusable element (default true); it targets `mainId`. */
|
|
2050
|
+
skipLink?: boolean;
|
|
2051
|
+
/** The id of the <main> region the skip link jumps to. */
|
|
2052
|
+
mainId?: string;
|
|
2053
|
+
/** A docked AsidePanel rendered beside the content column: the page narrows to make room. Rendered at every width — the panel decides its own fallbacks. */
|
|
2054
|
+
aside?: ReactNode;
|
|
2055
|
+
/** Which side of the content the aside sits on. Default "right". Pass the same value to the AsidePanel. */
|
|
2056
|
+
asideSide?: "right" | "left";
|
|
2057
|
+
/**
|
|
2058
|
+
* A Launcher for the assistant. Rendered only above the sm breakpoint — a conditional render,
|
|
2059
|
+
* because the Launcher portals out of any wrapper — so on phones the Navbar button is the entry point
|
|
2060
|
+
* and it never collides with BottomNav.
|
|
2061
|
+
*/
|
|
2062
|
+
launcher?: ReactNode;
|
|
1588
2063
|
children: ReactNode;
|
|
1589
2064
|
className?: string;
|
|
1590
2065
|
/** When false, main area won't scroll — use for full-height layouts like ResizablePanelGroup. Default true. */
|
|
1591
2066
|
scrollable?: boolean;
|
|
2067
|
+
/** The theme's shell-level decisions: what the generated shell passes once so pages carry nothing (Sprint 25). */
|
|
2068
|
+
theme?: AppShellTheme;
|
|
2069
|
+
/** The current route's path, so the shell knows which page is home. */
|
|
2070
|
+
currentPath?: string;
|
|
2071
|
+
/** The home page's path. Default "/". */
|
|
2072
|
+
homePath?: string;
|
|
1592
2073
|
}
|
|
1593
2074
|
declare const AppShell: react.ForwardRefExoticComponent<AppShellProps & react.RefAttributes<HTMLDivElement>>;
|
|
1594
2075
|
|
|
@@ -1602,11 +2083,31 @@ interface PageContainerProps {
|
|
|
1602
2083
|
/** Lower-level max-width escape hatch. Use `width` for standard cases. */
|
|
1603
2084
|
maxWidth?: MaxWidth;
|
|
1604
2085
|
padding?: Padding;
|
|
2086
|
+
/**
|
|
2087
|
+
* Vertical padding of the content column. With a PageHeader as a direct child the header owns the space under the
|
|
2088
|
+
* navbar, so only the bottom value applies; without one the default is the usual top and bottom padding.
|
|
2089
|
+
*/
|
|
1605
2090
|
verticalPadding?: VerticalPadding;
|
|
1606
2091
|
centered?: boolean;
|
|
1607
2092
|
children: ReactNode;
|
|
1608
2093
|
className?: string;
|
|
2094
|
+
/**
|
|
2095
|
+
* Wraps the PageHeader the container found among its children — for previews that need a badge or a ref on it.
|
|
2096
|
+
* The header keeps reading the container's context through the wrapper. The wrapper must not form a box
|
|
2097
|
+
* (`display: contents`): a snapping header sticks within its containing block, which has to be this container.
|
|
2098
|
+
*/
|
|
2099
|
+
renderHeader?: (header: ReactNode) => ReactNode;
|
|
1609
2100
|
}
|
|
2101
|
+
/**
|
|
2102
|
+
* The page's width constraint, and — when a PageHeader is among its direct
|
|
2103
|
+
* children — the page's composition: the header is placed inside the column
|
|
2104
|
+
* (default, minimal, tabs-integrated) or above it spanning the page
|
|
2105
|
+
* (colourful, snapping, floating), contained breadcrumbs become a strip above
|
|
2106
|
+
* the header, a floating header's content is inset by the shell gutter, and a
|
|
2107
|
+
* colourful overlap pulls the content up. The decisions come from the theme
|
|
2108
|
+
* the AppShell carries; a page writes `<PageContainer><PageHeader title />…`
|
|
2109
|
+
* and nothing else (Sprint 25).
|
|
2110
|
+
*/
|
|
1610
2111
|
declare const PageContainer: react.ForwardRefExoticComponent<PageContainerProps & react.RefAttributes<HTMLDivElement>>;
|
|
1611
2112
|
|
|
1612
2113
|
interface SectionHeadingProps {
|
|
@@ -1678,4 +2179,4 @@ interface UseTextOverflowResult {
|
|
|
1678
2179
|
*/
|
|
1679
2180
|
declare function useTextOverflow(options?: UseTextOverflowOptions): UseTextOverflowResult;
|
|
1680
2181
|
|
|
1681
|
-
export { Accordion, ActionPanel, ActionPanelGroup, Alert, type AlertPlacement, AppShell, type AppShellContextValue, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarStatus, Badge, type BadgePaletteColor, type BadgeSize, type BadgeVariant, BottomNav, type BottomNavItem, type BreadcrumbItem$1 as BreadcrumbItem, Breadcrumbs, type BreadcrumbsSeparator, type BreadcrumbsSize, type BreadcrumbsVariant, BreakpointKey, BulkActionBar, Button, ButtonSizeContext, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardSelectType, CardTitle, type CardVariant, Carousel, ChatMessageList, Checkbox, CheckboxGroup, CheckboxGroupItem, CodeBlock, Collapsible, ColorPicker, type Column, Combobox, CommandPalette, ContextMenu, DEFAULT_DATE_RANGE_PRESETS, DataList, DatePicker, type DateRange, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DescriptionItem, DescriptionList, type DescriptionListOrientation, type DescriptionListSize, Dialog, Divider, Dock, Drawer, Dropdown, DropdownMenu, type DropdownMenuDivider, type DropdownMenuEntry, type DropdownMenuItem, EmptyState, Field, type FieldControlProps, type FieldProps, FileUpload, FormWrapper, HoverCard, InlineFieldError, Input, Kbd, Label, Link, type LinkProps, MentionInput, MobileHeaderMenu, type MobileHeaderMenuItemData, type MobileHeaderMenuType, NavItem, type NavItemProps, type NavItemType, NavMenu, type NavMenuItem, Navbar, type NavbarSize, type NavbarType, type NavbarVariant, NotificationCenter, NumberInput, PageContainer, type PageContainerWidth, PageHeader, type PageHeaderBehavior, type PageHeaderIntensity, type PageHeaderProps, type PageHeaderVariant, Pagination, PinInput, Popover, Progress, type PromiseToastMessages, RadioGroup, Rating, ScrollArea, SectionHeading, SegmentedControl, Sheet, Sidebar, type SidebarContextValue, type SidebarItem, SidebarNav, type SidebarNavSize, type SidebarPosition, type SidebarSection, type SidebarType, Skeleton, SliderRange, Spinner, StackedList, StatsCard, StatusDot, type StatusDotVariant, Stepper, type Tab, Table, type TableDensity, type TableProps, Tabs, Tag, TagInput, type TagPaletteColor, type TagVariant, TextOverflow, type TextOverflowProps, Textarea, TimePicker, Timeline, Toast, type ToastAction, type ToastApi, type ToastOptions, type ToastPosition, ToastProvider, type ToastVariant, Toggle, Tooltip, Tour, TransferList, TreeView, type UseTextOverflowOptions, type UseTextOverflowResult, useAppShell, useFormContext, useSidebar, useTextOverflow, useToast };
|
|
2182
|
+
export { Accordion, ActionPanel, ActionPanelGroup, Alert, type AlertPlacement, AppShell, type AppShellContextValue, type AppShellTheme, AsidePanel, type AsidePanelProps, type AsidePanelSide, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarStatus, Badge, type BadgePaletteColor, type BadgeSize, type BadgeVariant, BottomNav, type BottomNavItem, type BreadcrumbItem$1 as BreadcrumbItem, Breadcrumbs, type BreadcrumbsSeparator, type BreadcrumbsSize, type BreadcrumbsVariant, BreakpointKey, BulkActionBar, Button, ButtonSizeContext, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardSelectType, CardTitle, type CardVariant, Carousel, type ChatMessage, type ChatMessageAction, type ChatMessageLayout, ChatMessageList, type ChatMessageSender, type ChatMessageSource, type ChatMessageStatus, ChatPanel, type ChatPanelProps, type ChatPanelStatusTone, Checkbox, CheckboxGroup, CheckboxGroupItem, CodeBlock, Collapsible, ColorPicker, type Column, Combobox, CommandPalette, ContextMenu, CornerPanel, type CornerPanelEdge, type CornerPanelProps, DEFAULT_DATE_RANGE_PRESETS, DataList, DatePicker, type DateRange, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DescriptionItem, DescriptionList, type DescriptionListOrientation, type DescriptionListSize, Dialog, Divider, Dock, Drawer, Dropdown, DropdownMenu, type DropdownMenuDivider, type DropdownMenuEntry, type DropdownMenuItem, EmptyState, Field, type FieldControlProps, type FieldProps, FileUpload, FormWrapper, HoverCard, InlineFieldError, Input, Kbd, Label, Launcher, type LauncherEdge, type LauncherProps, type LauncherVariant, type LauncherWhenOpen, Link, type LinkProps, MentionInput, MobileHeaderMenu, type MobileHeaderMenuItemData, type MobileHeaderMenuType, NavItem, type NavItemProps, type NavItemType, NavMenu, type NavMenuItem, Navbar, type NavbarSize, type NavbarType, type NavbarVariant, NotificationCenter, NumberInput, PageContainer, type PageContainerWidth, PageHeader, type PageHeaderBehavior, type PageHeaderIntensity, type PageHeaderProps, type PageHeaderVariant, Pagination, PinInput, Popover, Progress, type PromiseToastMessages, RadioGroup, Rating, ScrollArea, SectionHeading, SegmentedControl, Sheet, Sidebar, type SidebarContextValue, type SidebarItem, SidebarNav, type SidebarNavSize, type SidebarPosition, type SidebarSection, type SidebarType, Skeleton, SkipLink, SliderRange, Spinner, StackedList, StatsCard, StatusDot, type StatusDotVariant, Stepper, type Tab, Table, type TableDensity, type TableProps, TableToolbar, type TableToolbarActiveFilter, type TableToolbarFilterOption, Tabs, Tag, TagInput, type TagPaletteColor, type TagVariant, TextOverflow, type TextOverflowProps, Textarea, TimePicker, Timeline, Toast, type ToastAction, type ToastApi, type ToastOptions, type ToastPosition, ToastProvider, type ToastVariant, Toggle, Tooltip, Tour, TransferList, TreeView, type UseTextOverflowOptions, type UseTextOverflowResult, useAppShell, useFormContext, useSidebar, useTextOverflow, useToast };
|