@opencxh/ui-kit 3.172.0 → 3.175.2
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/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5040 -5072
- package/dist/index.js.map +1 -1
- package/dist/src/action/Button.d.ts +3 -3
- package/dist/src/action/ButtonGroup.d.ts +2 -2
- package/dist/src/action/Link.d.ts +3 -3
- package/dist/src/action/SplitButton.d.ts +10 -10
- package/dist/src/content/ArtifactView.d.ts +1 -1
- package/dist/src/content/Avatar.d.ts +7 -15
- package/dist/src/content/ChannelBadge.d.ts +1 -1
- package/dist/src/content/Icon.d.ts +3 -3
- package/dist/src/content/Image.d.ts +3 -3
- package/dist/src/content/MessageBubble.d.ts +4 -13
- package/dist/src/content/Page.d.ts +8 -28
- package/dist/src/content/PageHeader.d.ts +0 -19
- package/dist/src/content/PageToolbar.d.ts +0 -2
- package/dist/src/content/RichText.d.ts +5 -8
- package/dist/src/content/SectionDivider.d.ts +1 -1
- package/dist/src/content/SettingsPage.d.ts +6 -10
- package/dist/src/content/tableColumns.d.ts +6 -8
- package/dist/src/federated-resource/index.d.ts +5 -7
- package/dist/src/feedback/Badge.d.ts +4 -41
- package/dist/src/feedback/EmptyState.d.ts +1 -11
- package/dist/src/feedback/Kbd.d.ts +1 -8
- package/dist/src/feedback/ProgressBar.d.ts +0 -6
- package/dist/src/feedback/Spinner.d.ts +4 -26
- package/dist/src/feedback/StatusDot.d.ts +1 -12
- package/dist/src/feedback/StepIndicator.d.ts +1 -9
- package/dist/src/forms/Form.d.ts +39 -37
- package/dist/src/index.d.ts +49 -49
- package/dist/src/input/Checkbox.d.ts +5 -32
- package/dist/src/input/DatePicker.d.ts +2 -15
- package/dist/src/input/SearchField.d.ts +0 -5
- package/dist/src/input/SearchableTextField.d.ts +3 -4
- package/dist/src/input/Select.d.ts +2 -2
- package/dist/src/input/StorageInput.d.ts +1 -1
- package/dist/src/input/TextArea.d.ts +4 -29
- package/dist/src/input/TextField.d.ts +5 -42
- package/dist/src/meeting/MeetingGrid.d.ts +20 -19
- package/dist/src/meeting/ParticipantTile.d.ts +5 -9
- package/dist/src/meeting/VideoSurface.d.ts +1 -1
- package/dist/src/navigation/Sidebar.d.ts +15 -19
- package/dist/src/navigation/Tabs.d.ts +2 -2
- package/dist/src/overlays/ConfirmDialog.d.ts +0 -13
- package/dist/src/overlays/Dropdown.d.ts +1 -19
- package/dist/src/overlays/Modal.d.ts +4 -68
- package/dist/src/overlays/Popover.d.ts +0 -2
- package/dist/src/primitives/Box.d.ts +7 -7
- package/dist/src/test/setup.d.ts +0 -0
- package/dist/src/typography/Heading.d.ts +4 -4
- package/dist/src/typography/Text.d.ts +7 -7
- package/package.json +8 -8
|
@@ -3,11 +3,11 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
3
3
|
/**
|
|
4
4
|
* The visual style variant of the button
|
|
5
5
|
*/
|
|
6
|
-
variant?:
|
|
6
|
+
variant?: "primary" | "secondary" | "outline" | "ghost" | "destructive" | "success" | "warning" | "danger-solid";
|
|
7
7
|
/**
|
|
8
8
|
* The size of the button
|
|
9
9
|
*/
|
|
10
|
-
size?:
|
|
10
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
|
|
11
11
|
/**
|
|
12
12
|
* Whether the button should take the full width of its container
|
|
13
13
|
*/
|
|
@@ -29,7 +29,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
29
29
|
*/
|
|
30
30
|
iconOnly?: boolean;
|
|
31
31
|
/** `circle` is for a control that is only ever an icon: call answer/reject. */
|
|
32
|
-
shape?:
|
|
32
|
+
shape?: "default" | "circle";
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* Button component with theme integration and multiple variants
|
|
@@ -3,9 +3,9 @@ export interface ButtonGroupProps {
|
|
|
3
3
|
/** Child buttons to group */
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
/** Size of the button group */
|
|
6
|
-
size?:
|
|
6
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
7
7
|
/** Orientation of the button group */
|
|
8
|
-
orientation?:
|
|
8
|
+
orientation?: "horizontal" | "vertical";
|
|
9
9
|
/** Whether buttons should be attached (no gap) */
|
|
10
10
|
attached?: boolean;
|
|
11
11
|
/** Additional CSS classes */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
3
3
|
/** Link variant */
|
|
4
|
-
variant?:
|
|
4
|
+
variant?: "default" | "subtle" | "underline" | "button";
|
|
5
5
|
/** Link size */
|
|
6
|
-
size?:
|
|
6
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
7
7
|
/** Color theme */
|
|
8
|
-
color?:
|
|
8
|
+
color?: "primary" | "secondary" | "accent" | "success" | "warning" | "error" | "info" | "neutral";
|
|
9
9
|
/** Whether the link is disabled */
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
/** Whether to show external link icon */
|
|
@@ -4,7 +4,7 @@ export interface SplitButtonOption {
|
|
|
4
4
|
label: string;
|
|
5
5
|
onClick: () => void;
|
|
6
6
|
variant?: "default" | "destructive";
|
|
7
|
-
/**
|
|
7
|
+
/** Optional icon before the label in the menu. */
|
|
8
8
|
icon?: React.ReactNode;
|
|
9
9
|
}
|
|
10
10
|
export interface SplitButtonProps {
|
|
@@ -15,22 +15,22 @@ export interface SplitButtonProps {
|
|
|
15
15
|
icon?: React.ReactNode;
|
|
16
16
|
options: SplitButtonOption[];
|
|
17
17
|
disabled?: boolean;
|
|
18
|
-
/** Spinner in
|
|
18
|
+
/** Spinner in the primary half; blocks both halves. */
|
|
19
19
|
loading?: boolean;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
21
|
+
* Where the options menu opens. Use a `top-*` placement when the button sits
|
|
22
|
+
* at the bottom of its container (e.g. a sticky send bar).
|
|
23
23
|
*/
|
|
24
24
|
menuPlacement?: "bottom-end" | "bottom-start" | "top-end" | "top-start";
|
|
25
|
-
/** Accessible
|
|
25
|
+
/** Accessible name for the chevron button. */
|
|
26
26
|
menuLabel?: string;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
29
|
+
* Button with a primary action plus a chevron menu of variants. The primary half
|
|
30
|
+
* is a plain `Button` (same variants/loading behavior); the menu goes through
|
|
31
|
+
* `Popover`, so it is `position: fixed` and never clipped by a scrolling or
|
|
32
|
+
* overflow-hidden ancestor.
|
|
33
33
|
*
|
|
34
|
-
*
|
|
34
|
+
* Without options this renders exactly a `Button` — no chevron.
|
|
35
35
|
*/
|
|
36
36
|
export declare function SplitButton({ label, onClick, variant, size, icon, options, disabled, loading, menuPlacement, menuLabel, }: SplitButtonProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ArtifactBlock, ArtifactRuntime } from '@opencxh/domain';
|
|
2
2
|
export interface ArtifactViewProps {
|
|
3
3
|
blocks: ArtifactBlock[];
|
|
4
|
-
/**
|
|
4
|
+
/** Everything except `"inert"` is rejected. See the class note above. */
|
|
5
5
|
runtime?: ArtifactRuntime;
|
|
6
6
|
className?: string;
|
|
7
7
|
}
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* Plate colour. `default` is the neutral disc
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* The other three are for a message thread, where the plate answers "which side
|
|
12
|
-
* is this from" before you read a word: `in` is the other party, `out` is us
|
|
13
|
-
* (ink, so it reads as ours in both themes) and `note` is an internal remark.
|
|
14
|
-
* Each is a fill with its own foreground — a fill cannot borrow a colour from
|
|
15
|
-
* the ramp, because the ramp does not change between light and dark.
|
|
3
|
+
* Plate colour. `default` is the neutral disc for a lone monogram; `identity`
|
|
4
|
+
* derives the colour from `name` so the same person or team is the same colour
|
|
5
|
+
* on every surface (see {@link identityPlateClass}) — use it in a list of many
|
|
6
|
+
* people. The other three are for a message thread, where the plate answers
|
|
7
|
+
* "which side is this from": `in` is the other party, `out` is us (ink, so it
|
|
8
|
+
* reads as ours in both themes), `note` an internal remark. Each is a fill with
|
|
9
|
+
* its own foreground — the ramp does not change between light and dark.
|
|
16
10
|
*/
|
|
17
11
|
export type AvatarTone = "default" | "identity" | "in" | "out" | "note";
|
|
18
12
|
export interface AvatarProps {
|
|
@@ -22,9 +16,7 @@ export interface AvatarProps {
|
|
|
22
16
|
src?: string;
|
|
23
17
|
/** Plate colour; see {@link AvatarTone}. */
|
|
24
18
|
tone?: AvatarTone;
|
|
25
|
-
/** Size preset */
|
|
26
19
|
size?: "xs" | "sm" | "md" | "lg";
|
|
27
|
-
/** Additional CSS classes */
|
|
28
20
|
className?: string;
|
|
29
21
|
/** Override the title attribute (defaults to `name`) */
|
|
30
22
|
title?: string;
|
|
@@ -27,4 +27,4 @@ export interface ChannelBadgeProps {
|
|
|
27
27
|
* <ChannelBadge channel="mail" size="lg"><MailIcon /></ChannelBadge>
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
export declare function ChannelBadge({ channel, children, size, className, title }: ChannelBadgeProps): React.JSX.Element;
|
|
30
|
+
export declare function ChannelBadge({ channel, children, size, className, title, }: ChannelBadgeProps): React.JSX.Element;
|
|
@@ -12,9 +12,9 @@ export interface IconProps {
|
|
|
12
12
|
/** Icon component from lucide-react or custom icon */
|
|
13
13
|
icon: React.ComponentType<any>;
|
|
14
14
|
/** Icon size */
|
|
15
|
-
size?:
|
|
15
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | number;
|
|
16
16
|
/** Icon color */
|
|
17
|
-
color?:
|
|
17
|
+
color?: "primary" | "secondary" | "accent" | "success" | "warning" | "error" | "info" | "neutral" | "current";
|
|
18
18
|
/** Whether the icon should be clickable */
|
|
19
19
|
clickable?: boolean;
|
|
20
20
|
/** Click handler */
|
|
@@ -22,6 +22,6 @@ export interface IconProps {
|
|
|
22
22
|
/** Additional CSS classes */
|
|
23
23
|
className?: string;
|
|
24
24
|
/** Accessibility label */
|
|
25
|
-
|
|
25
|
+
"aria-label"?: string;
|
|
26
26
|
}
|
|
27
27
|
export declare const Icon: React.FC<IconProps>;
|
|
@@ -5,11 +5,11 @@ export interface ImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
|
5
5
|
/** Alt text for accessibility */
|
|
6
6
|
alt: string;
|
|
7
7
|
/** Image size preset */
|
|
8
|
-
size?:
|
|
8
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
9
9
|
/** Aspect ratio */
|
|
10
|
-
aspectRatio?:
|
|
10
|
+
aspectRatio?: "square" | "video" | "portrait" | "landscape" | "auto";
|
|
11
11
|
/** Border radius */
|
|
12
|
-
radius?:
|
|
12
|
+
radius?: "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
13
13
|
/** Whether to show loading state */
|
|
14
14
|
showLoading?: boolean;
|
|
15
15
|
/** Whether to show error state */
|
|
@@ -25,18 +25,9 @@ export interface MessageBubbleProps {
|
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* A single message in a conversation: chat, email and call transcript all use
|
|
28
|
-
* the same shape.
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* `
|
|
32
|
-
* messages sit on `bg-bubble-out-soft`, a 4% ink wash — deliberately lighter than
|
|
33
|
-
* `accent-soft`, which reads as heavy on every message you have ever sent.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```tsx
|
|
37
|
-
* <MessageBubble side="out" className="max-w-bubble px-4 py-3">
|
|
38
|
-
* <Text>{body}</Text>
|
|
39
|
-
* </MessageBubble>
|
|
40
|
-
* ```
|
|
28
|
+
* the same shape. The corner facing the sender is tight (`rounded-sm`), the
|
|
29
|
+
* other three `rounded-lg` — that is what makes direction readable without a
|
|
30
|
+
* tail. Sent messages sit on `bg-bubble-out-soft`, a 4% ink wash — deliberately
|
|
31
|
+
* lighter than `accent-soft`, which reads as heavy on every sent message.
|
|
41
32
|
*/
|
|
42
33
|
export declare function MessageBubble({ side, continued, tone, className, children, }: MessageBubbleProps): React.JSX.Element;
|
|
@@ -22,12 +22,8 @@ export interface PageProps {
|
|
|
22
22
|
actions?: PageHeaderAction[];
|
|
23
23
|
/** Renders the back chevron beside the title. */
|
|
24
24
|
onBack?: () => void;
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* clickable and grows a pencil beside it. `PageHeader` has had this for a
|
|
28
|
-
* while; `Page` simply never forwarded it, so any page built on `Page` had to
|
|
29
|
-
* put a rename somewhere else.
|
|
30
|
-
*/
|
|
25
|
+
/** Lets the user rename the record from the header: the title becomes
|
|
26
|
+
* clickable and grows a pencil beside it. Forwarded to `PageHeader`. */
|
|
31
27
|
editable?: boolean;
|
|
32
28
|
/** Called with the trimmed new title. Only fires when it actually changed. */
|
|
33
29
|
onTitleChange?: (title: string) => void;
|
|
@@ -71,28 +67,12 @@ export interface PageProps {
|
|
|
71
67
|
}
|
|
72
68
|
/**
|
|
73
69
|
* One app page: the header, the content gutter, the scroll container, and the
|
|
74
|
-
* loading and empty states.
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* Settings panels are the exception: they live inside the settings frame, which
|
|
82
|
-
* draws its own title and scrolls itself, so they use `SettingsPage`.
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
* ```tsx
|
|
86
|
-
* <Page
|
|
87
|
-
* title={t("interactions")}
|
|
88
|
-
* subtitle={t("interactions_description")}
|
|
89
|
-
* actions={[{ id: "refresh", label: t("refresh"), onClick: reload }]}
|
|
90
|
-
* loading={loading}
|
|
91
|
-
* empty={!interactions.length && <EmptyState title={t("interaction_no_records_found")} />}
|
|
92
|
-
* >
|
|
93
|
-
* <InteractionsTable interactions={interactions} />
|
|
94
|
-
* </Page>
|
|
95
|
-
* ```
|
|
70
|
+
* loading and empty states. These four were re-invented per page — 24 times in
|
|
71
|
+
* `eylo-voip` alone, each with its own gutter — which is how `p-4` there and
|
|
72
|
+
* `px-5` everywhere else ended up side by side. Reach for this instead of
|
|
73
|
+
* pairing a `PageHeader` with a padded `div`. Settings panels are the
|
|
74
|
+
* exception: they live inside the settings frame, which draws its own title
|
|
75
|
+
* and scrolls itself, so they use `SettingsPage`.
|
|
96
76
|
*/
|
|
97
77
|
export declare const Page: React.FC<PageProps>;
|
|
98
78
|
export {};
|
|
@@ -2,19 +2,13 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { ButtonProps } from '../action/Button';
|
|
3
3
|
import { SplitButtonOption } from '../action/SplitButton';
|
|
4
4
|
export interface PageHeaderAction {
|
|
5
|
-
/** Action identifier */
|
|
6
5
|
id: string;
|
|
7
|
-
/** Action label */
|
|
8
6
|
label: string;
|
|
9
|
-
/** Action icon */
|
|
10
7
|
icon?: React.ReactNode;
|
|
11
|
-
/** Action handler */
|
|
12
8
|
onClick: () => void;
|
|
13
9
|
/** Action variant. Tracks Button, so the two cannot drift apart. */
|
|
14
10
|
variant?: ButtonProps["variant"];
|
|
15
|
-
/** Whether action is disabled */
|
|
16
11
|
disabled?: boolean;
|
|
17
|
-
/** Dropdown options for split button */
|
|
18
12
|
splitOptions?: SplitButtonOption[];
|
|
19
13
|
/**
|
|
20
14
|
* Render this action yourself instead of as a Button — a filter chip, a
|
|
@@ -30,7 +24,6 @@ export interface PageHeaderProps {
|
|
|
30
24
|
* its own background, full-bleed, closed off with a bottom border.
|
|
31
25
|
*/
|
|
32
26
|
surface?: boolean;
|
|
33
|
-
/** Page title */
|
|
34
27
|
title: string;
|
|
35
28
|
/** Page subtitle/description. Sits beside the title. */
|
|
36
29
|
subtitle?: string;
|
|
@@ -43,30 +36,18 @@ export interface PageHeaderProps {
|
|
|
43
36
|
* an inline row of properties survives a narrow window.
|
|
44
37
|
*/
|
|
45
38
|
meta?: React.ReactNode;
|
|
46
|
-
/** Breadcrumb items */
|
|
47
39
|
breadcrumbs?: Array<{
|
|
48
40
|
label: string;
|
|
49
41
|
href?: string;
|
|
50
42
|
}>;
|
|
51
|
-
/** Action buttons */
|
|
52
43
|
actions?: PageHeaderAction[];
|
|
53
|
-
/** Additional content to render in the header */
|
|
54
44
|
children?: React.ReactNode;
|
|
55
|
-
/** Additional CSS classes */
|
|
56
45
|
className?: string;
|
|
57
|
-
/** Back button label */
|
|
58
46
|
backLabel?: string;
|
|
59
|
-
/** Back button handler */
|
|
60
47
|
onBack?: () => void;
|
|
61
|
-
/** Back button class name */
|
|
62
48
|
backClassName?: string;
|
|
63
|
-
/** Whether the title is editable */
|
|
64
49
|
editable?: boolean;
|
|
65
|
-
/** Callback when title is changed */
|
|
66
50
|
onTitleChange?: (newTitle: string) => void;
|
|
67
51
|
}
|
|
68
52
|
export declare const ChevronLeftIcon: () => React.JSX.Element;
|
|
69
|
-
/**
|
|
70
|
-
* PageHeader component for consistent page layouts with title, actions, and breadcrumbs
|
|
71
|
-
*/
|
|
72
53
|
export declare const PageHeader: React.FC<PageHeaderProps>;
|
|
@@ -23,9 +23,7 @@ export interface PageToolbarProps {
|
|
|
23
23
|
onBack?: () => void;
|
|
24
24
|
/** Back button label (visually hidden on small screens) */
|
|
25
25
|
backLabel?: string;
|
|
26
|
-
/** Additional CSS classes */
|
|
27
26
|
className?: string;
|
|
28
|
-
/** Padding on the left and right of the toolbar */
|
|
29
27
|
padding?: "none" | "sm" | "md" | "lg";
|
|
30
28
|
/** Optional extra content placed between back button and actions */
|
|
31
29
|
children?: React.ReactNode;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
export interface RichTextProps {
|
|
2
|
-
/** Markdown
|
|
2
|
+
/** Markdown or HTML; which of the two is auto-detected. */
|
|
3
3
|
text: string | null | undefined;
|
|
4
|
-
/** Extra classes
|
|
4
|
+
/** Extra classes on the wrapper (e.g. `text-sm` or a line-clamp). */
|
|
5
5
|
className?: string;
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* weet wat je hebt en de heuristiek in de weg zit (bv. platte tekst die
|
|
9
|
-
* toevallig op een tag lijkt).
|
|
10
|
-
*/
|
|
6
|
+
/** Force a branch instead of detecting — only when the heuristic gets in
|
|
7
|
+
* the way (e.g. plain text that happens to look like a tag). */
|
|
11
8
|
as?: "markdown" | "html";
|
|
12
9
|
}
|
|
13
|
-
/**
|
|
10
|
+
/** Safely rendered markdown-or-HTML text. */
|
|
14
11
|
export declare function RichText({ text, className, as }: RichTextProps): import("react").JSX.Element;
|
|
@@ -18,4 +18,4 @@ export interface SectionDividerProps {
|
|
|
18
18
|
* <SectionDivider label="Gesprekken" align="start" trailing={<Badge>12</Badge>} />
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export declare function SectionDivider({ label, trailing, align, className }: SectionDividerProps): React.JSX.Element;
|
|
21
|
+
export declare function SectionDivider({ label, trailing, align, className, }: SectionDividerProps): React.JSX.Element;
|
|
@@ -60,18 +60,14 @@ export interface SettingsPageProps {
|
|
|
60
60
|
/** Left-aligned footer actions, set apart from the primary pair (e.g. Delete). */
|
|
61
61
|
secondaryActions?: PageHeaderAction[];
|
|
62
62
|
/**
|
|
63
|
-
* Where the actions go
|
|
64
|
-
*
|
|
65
|
-
* the title, which is where the design system puts detail actions.
|
|
63
|
+
* Where the actions go: `footer` (default) is the sticky bar at the bottom
|
|
64
|
+
* of the panel; `header` hands them to the frame beside the title.
|
|
66
65
|
*
|
|
67
|
-
* Reach for `header` when the
|
|
68
|
-
*
|
|
66
|
+
* Reach for `header` when the body contains an anchored overlay (a `Select`,
|
|
67
|
+
* a `Popover`) inside a `sticky` or `z-index`-bearing element:
|
|
69
68
|
* `position: sticky` creates a stacking context even at `z-index: auto`, so
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* panels are `position: fixed`, so they escape clipping but not stacking.
|
|
73
|
-
* Removing the footer removes the competitor rather than starting a
|
|
74
|
-
* z-index race that neither side can win.
|
|
69
|
+
* the menu paints behind the footer's own `sticky … z-10`. Removing the
|
|
70
|
+
* footer removes the competitor rather than starting a z-index race.
|
|
75
71
|
*/
|
|
76
72
|
actionsPlacement?: "footer" | "header";
|
|
77
73
|
/** Renders the back affordance in the frame header (or inline when unframed). */
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { BadgeProps } from '../feedback/Badge';
|
|
2
2
|
import { TableColumn } from './Table';
|
|
3
3
|
/**
|
|
4
|
-
* Column builders for the three things table configs kept getting wrong
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Column builders for the three things table configs kept getting wrong across
|
|
5
|
+
* apps: a state rendered as prose, a stored code shown raw, and an id shown
|
|
6
|
+
* instead of the name it points at.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* what the row actually shows — which is exactly what a raw `enabled` boolean
|
|
12
|
-
* or a bare `teamId` used to break.
|
|
8
|
+
* All keep the *label* in `accessor` and render only the decoration in `cell`,
|
|
9
|
+
* because `Table` searches and sorts on the accessor value — so a search for
|
|
10
|
+
* "Active" or a team's name matches what the row actually shows.
|
|
13
11
|
*/
|
|
14
12
|
export interface BadgeColumnConfig<T, V = unknown> {
|
|
15
13
|
id: string;
|
|
@@ -2,15 +2,13 @@ import { default as React } from 'react';
|
|
|
2
2
|
interface FederatedResourceProps {
|
|
3
3
|
identifier: string;
|
|
4
4
|
resourceLoader: () => Promise<any>;
|
|
5
|
-
framework?:
|
|
6
|
-
/**
|
|
5
|
+
framework?: "react" | "svelte" | "vanilla";
|
|
6
|
+
/** Shown while the remote loads. */
|
|
7
7
|
fallback?: React.ReactNode;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* iets had moeten staan zonder spoor in de UI. Dat is precies het verschil tussen "de
|
|
13
|
-
* app is er niet" en "er is niks aan de hand".
|
|
9
|
+
* Shown when the remote cannot load — app disabled, bundle broken, wrong key.
|
|
10
|
+
* Without it a failure renders nothing, and the spot where something should have
|
|
11
|
+
* been disappears without a trace in the UI.
|
|
14
12
|
*/
|
|
15
13
|
errorFallback?: React.ReactNode;
|
|
16
14
|
componentProps?: Record<string, any>;
|
|
@@ -5,50 +5,13 @@ import { default as React } from 'react';
|
|
|
5
5
|
* doing nothing at all — the badge silently rendered as `default`. Omitting it
|
|
6
6
|
* turns that mistake into a compile error pointing at `variant`.
|
|
7
7
|
*/
|
|
8
|
-
export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
variant?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'note';
|
|
13
|
-
/**
|
|
14
|
-
* The size of the badge
|
|
15
|
-
*/
|
|
16
|
-
size?: 'sm' | 'md' | 'lg';
|
|
17
|
-
/**
|
|
18
|
-
* Whether the badge should have a dot indicator
|
|
19
|
-
*/
|
|
8
|
+
export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "color"> {
|
|
9
|
+
variant?: "default" | "primary" | "secondary" | "success" | "warning" | "error" | "info" | "note";
|
|
10
|
+
size?: "sm" | "md" | "lg";
|
|
20
11
|
dot?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Icon to display in the badge
|
|
23
|
-
*/
|
|
24
12
|
icon?: React.ReactNode;
|
|
25
|
-
/**
|
|
26
|
-
* Whether the badge can be dismissed
|
|
27
|
-
*/
|
|
28
13
|
dismissible?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Callback fired when the badge is dismissed
|
|
31
|
-
*/
|
|
32
14
|
onDismiss?: () => void;
|
|
33
15
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Badge component for displaying status indicators and labels
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```tsx
|
|
39
|
-
* <Badge variant="success">Active</Badge>
|
|
40
|
-
*
|
|
41
|
-
* <Badge variant="warning" dot>
|
|
42
|
-
* Pending
|
|
43
|
-
* </Badge>
|
|
44
|
-
*
|
|
45
|
-
* <Badge variant="error" dismissible onDismiss={() => console.log('dismissed')}>
|
|
46
|
-
* Error
|
|
47
|
-
* </Badge>
|
|
48
|
-
*
|
|
49
|
-
* <Badge variant="primary" icon={<StarIcon />}>
|
|
50
|
-
* Featured
|
|
51
|
-
* </Badge>
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
16
|
+
/** Badge for status indicators and labels. */
|
|
54
17
|
export declare function Badge({ variant, size, dot, icon, dismissible, onDismiss, className, children, ...props }: BadgeProps): React.JSX.Element;
|
|
@@ -13,15 +13,5 @@ export interface EmptyStateProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
13
13
|
/** Render inside a raised card (focus "done" state) vs. plain centered block. */
|
|
14
14
|
card?: boolean;
|
|
15
15
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Centered empty / completion state (focus queue done, no-results lists).
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```tsx
|
|
21
|
-
* <EmptyState card tone="success" icon={<Icon icon={Check} size="lg" />}
|
|
22
|
-
* title="Wachtrij leeg — 7 afgehandeld"
|
|
23
|
-
* description="Nieuwe gesprekken verschijnen hier vanzelf."
|
|
24
|
-
* actions={<Button>Terug naar Mijn dag</Button>} />
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
16
|
+
/** Centered empty / completion state (focus queue done, no-results lists). */
|
|
27
17
|
export declare function EmptyState({ icon, tone, title, description, actions, card, className, ...props }: EmptyStateProps): React.JSX.Element;
|
|
@@ -3,12 +3,5 @@ export interface KbdProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
3
3
|
/** Key label, e.g. "⌘K", "E", "↵". */
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
}
|
|
6
|
-
/**
|
|
7
|
-
* Keyboard-shortcut chip (the `⌘K` / `E` / `↵` hints in the redesign).
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```tsx
|
|
11
|
-
* Zoeken <Kbd>⌘K</Kbd>
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
6
|
+
/** Keyboard-shortcut chip (the `⌘K` / `E` / `↵` hints). */
|
|
14
7
|
export declare function Kbd({ children, className, ...props }: KbdProps): React.JSX.Element;
|
|
@@ -10,11 +10,5 @@ export interface ProgressBarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
10
10
|
/**
|
|
11
11
|
* Slim determinate progress bar (focus queue progress, subtask completion).
|
|
12
12
|
* Token-driven and mode-aware.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```tsx
|
|
16
|
-
* <ProgressBar value={40} />
|
|
17
|
-
* <ProgressBar value={3 / 7 * 100} variant="success" size="sm" />
|
|
18
|
-
* ```
|
|
19
13
|
*/
|
|
20
14
|
export declare function ProgressBar({ value, variant, size, className, ...props }: ProgressBarProps): React.JSX.Element;
|
|
@@ -1,32 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface SpinnerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
7
|
-
/**
|
|
8
|
-
* The color variant of the spinner
|
|
9
|
-
*/
|
|
10
|
-
variant?: 'primary' | 'secondary' | 'white' | 'current';
|
|
11
|
-
/**
|
|
12
|
-
* Optional label for accessibility
|
|
13
|
-
*/
|
|
3
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
4
|
+
variant?: "primary" | "secondary" | "white" | "current";
|
|
5
|
+
/** Accessible label; rendered visually only with `showLabel`. */
|
|
14
6
|
label?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Whether to show the spinner with a label
|
|
17
|
-
*/
|
|
18
7
|
showLabel?: boolean;
|
|
19
8
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Spinner component for loading states
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```tsx
|
|
25
|
-
* <Spinner size="md" variant="primary" />
|
|
26
|
-
*
|
|
27
|
-
* <Spinner size="lg" variant="primary" showLabel label="Loading..." />
|
|
28
|
-
*
|
|
29
|
-
* <Spinner size="sm" variant="white" />
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
9
|
+
/** Spinner for loading states. */
|
|
32
10
|
export declare function Spinner({ size, variant, label, showLabel, className, ...props }: SpinnerProps): React.JSX.Element;
|
|
@@ -18,16 +18,5 @@ export interface StatusDotProps {
|
|
|
18
18
|
label?: string;
|
|
19
19
|
className?: string;
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Small state marker: presence, session state, unread, live recording.
|
|
23
|
-
*
|
|
24
|
-
* Replaces a scatter of hand-rolled `h-2 w-2 rounded-full bg-green-500` spans
|
|
25
|
-
* that used raw palette colours and disagreed on size (8px vs 10px).
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```tsx
|
|
29
|
-
* <StatusDot tone="success" label="Online" />
|
|
30
|
-
* <StatusDot tone="danger" pulse label="Opname loopt" />
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
21
|
+
/** Small state marker: presence, session state, unread, live recording. */
|
|
33
22
|
export declare function StatusDot({ tone, shape, pulse, label, className, }: StatusDotProps): React.JSX.Element;
|
|
@@ -17,13 +17,5 @@ export interface StepIndicatorProps {
|
|
|
17
17
|
label?: string;
|
|
18
18
|
className?: string;
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Progress through a short, linear flow.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```tsx
|
|
25
|
-
* <StepIndicator steps={["provider", "channel", "owner"]} current={step} />
|
|
26
|
-
* <StepIndicator steps={["intent", "channel", "address"]} current={step} variant="dots" />
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
20
|
+
/** Progress through a short, linear flow. */
|
|
29
21
|
export declare function StepIndicator({ steps, current, variant, label, className, }: StepIndicatorProps): React.JSX.Element;
|