@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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface MenuItemAction {
|
|
3
|
-
/**
|
|
3
|
+
/** Icon on the right side of the row. */
|
|
4
4
|
icon: React.ReactNode;
|
|
5
|
-
/**
|
|
5
|
+
/** Required: aria-label + tooltip — the button is icon-only. */
|
|
6
6
|
label: string;
|
|
7
7
|
onClick: () => void;
|
|
8
|
-
/** "hover" (default) =
|
|
8
|
+
/** "hover" (default) = only visible on hover/focus, "always" = always visible. */
|
|
9
9
|
visibility?: "hover" | "always";
|
|
10
10
|
}
|
|
11
11
|
export interface MenuItem {
|
|
@@ -13,24 +13,22 @@ export interface MenuItem {
|
|
|
13
13
|
label: string;
|
|
14
14
|
count?: number;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* De count wint als beide gezet zijn: een aantal is preciezer dan een label.
|
|
16
|
+
* Short hint on the right of the row, where the count normally sits — for
|
|
17
|
+
* rows where the number is not the interesting fact, or cannot be known
|
|
18
|
+
* without loading everything. When both are set the count wins.
|
|
21
19
|
*/
|
|
22
20
|
meta?: React.ReactNode;
|
|
23
21
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
22
|
+
* Optional action on the right of the row — delete, pin, mute. Does not
|
|
23
|
+
* navigate: the button stops propagation and only calls its own onClick.
|
|
26
24
|
*/
|
|
27
25
|
action?: MenuItemAction;
|
|
28
26
|
children?: MenuItem[];
|
|
29
27
|
path?: string;
|
|
30
28
|
/**
|
|
31
|
-
* @deprecated
|
|
32
|
-
*
|
|
33
|
-
*
|
|
29
|
+
* @deprecated Groups no longer collapse — a section with children renders as
|
|
30
|
+
* a heading with its items below. Kept so existing call sites keep
|
|
31
|
+
* compiling; the value is ignored.
|
|
34
32
|
*/
|
|
35
33
|
defaultCollapsed?: boolean;
|
|
36
34
|
}
|
|
@@ -48,12 +46,10 @@ interface SidebarMenuProps {
|
|
|
48
46
|
loading?: boolean;
|
|
49
47
|
}
|
|
50
48
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* gebruikersvoet zijn shell-chrome en staan in `NavigationPanel`. Dit component
|
|
56
|
-
* vult alleen het middenstuk van die kolom.
|
|
49
|
+
* A free slot (search) with the nav items below. Sections with children are
|
|
50
|
+
* headings, not buttons. No title or action icons here: the app switcher and
|
|
51
|
+
* user footer are shell chrome in `NavigationPanel`; this only fills the
|
|
52
|
+
* middle of that column.
|
|
57
53
|
*/
|
|
58
54
|
export declare const SidebarMenu: React.FC<SidebarMenuProps>;
|
|
59
55
|
export default SidebarMenu;
|
|
@@ -21,9 +21,9 @@ export interface TabsProps {
|
|
|
21
21
|
/** Tab change handler */
|
|
22
22
|
onTabChange?: (tabId: string) => void;
|
|
23
23
|
/** Tabs variant */
|
|
24
|
-
variant?:
|
|
24
|
+
variant?: "default" | "pills" | "underline";
|
|
25
25
|
/** Tabs size */
|
|
26
|
-
size?:
|
|
26
|
+
size?: "sm" | "md" | "lg";
|
|
27
27
|
/** Additional CSS classes */
|
|
28
28
|
className?: string;
|
|
29
29
|
}
|
|
@@ -21,18 +21,5 @@ export interface ConfirmDialogProps {
|
|
|
21
21
|
* Note the shape difference: `confirm()` returns a boolean inline, so callers
|
|
22
22
|
* written as `if (!confirm(...)) return;` have to split into a request step
|
|
23
23
|
* and a confirm step.
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```tsx
|
|
27
|
-
* <ConfirmDialog
|
|
28
|
-
* open={pendingDelete !== null}
|
|
29
|
-
* tone="danger"
|
|
30
|
-
* title={t("channel_delete_title")}
|
|
31
|
-
* description={t("channel_delete_description")}
|
|
32
|
-
* confirmLabel={t("delete")}
|
|
33
|
-
* onConfirm={() => remove(pendingDelete!)}
|
|
34
|
-
* onCancel={() => setPendingDelete(null)}
|
|
35
|
-
* />
|
|
36
|
-
* ```
|
|
37
24
|
*/
|
|
38
25
|
export declare function ConfirmDialog({ open, title, description, confirmLabel, cancelLabel, tone, loading, onConfirm, onCancel, }: ConfirmDialogProps): React.JSX.Element;
|
|
@@ -1,41 +1,23 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface DropdownOption {
|
|
3
|
-
/** Option value */
|
|
4
3
|
value: string;
|
|
5
|
-
/** Option label */
|
|
6
4
|
label: string;
|
|
7
|
-
/** Option icon */
|
|
8
5
|
icon?: React.ReactNode;
|
|
9
|
-
/** Whether option is disabled */
|
|
10
6
|
disabled?: boolean;
|
|
11
|
-
/** Whether option is a divider */
|
|
12
7
|
divider?: boolean;
|
|
13
|
-
/** Optional description for the option */
|
|
14
8
|
description?: string;
|
|
15
|
-
/** Nested sub-options */
|
|
16
9
|
children?: DropdownOption[];
|
|
17
10
|
}
|
|
18
11
|
export interface DropdownProps {
|
|
19
|
-
/** Dropdown trigger element */
|
|
20
12
|
trigger: React.ReactNode;
|
|
21
|
-
/** Dropdown options */
|
|
22
13
|
options: DropdownOption[];
|
|
23
|
-
/** Selected value */
|
|
24
14
|
value?: string | Record<string, string | string[]>;
|
|
25
|
-
/** Change handler */
|
|
26
15
|
onSelect?: (value: string, parentValue?: string) => void;
|
|
27
|
-
/** Dropdown placement */
|
|
28
16
|
placement?: "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
29
|
-
/** Whether dropdown is disabled */
|
|
30
17
|
disabled?: boolean;
|
|
31
|
-
/** Additional CSS classes */
|
|
32
18
|
className?: string;
|
|
33
|
-
/** Show check mark for selected option */
|
|
34
19
|
showCheck?: boolean;
|
|
35
|
-
/** Header text for the dropdown */
|
|
36
20
|
header?: string | React.ReactNode;
|
|
37
21
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Dropdown component for menus and select-like interfaces
|
|
40
|
-
*/
|
|
22
|
+
/** Menu dropdown with optional nested submenus and roving keyboard focus. */
|
|
41
23
|
export declare const Dropdown: React.FC<DropdownProps>;
|
|
@@ -1,82 +1,18 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface ModalProps {
|
|
3
|
-
/**
|
|
4
|
-
* Whether the modal is open
|
|
5
|
-
*/
|
|
6
3
|
open: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Callback fired when the modal should be closed
|
|
9
|
-
*/
|
|
10
4
|
onClose: () => void;
|
|
11
|
-
/**
|
|
12
|
-
* The title of the modal
|
|
13
|
-
*/
|
|
14
5
|
title?: string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
19
|
-
/**
|
|
20
|
-
* Whether clicking the backdrop should close the modal
|
|
21
|
-
*/
|
|
6
|
+
size?: "sm" | "md" | "lg" | "xl" | "full";
|
|
7
|
+
/** Close when the backdrop is clicked. */
|
|
22
8
|
closeOnBackdropClick?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Whether pressing escape should close the modal
|
|
25
|
-
*/
|
|
9
|
+
/** Close on Escape. */
|
|
26
10
|
closeOnEscape?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Additional class name for the modal content
|
|
29
|
-
*/
|
|
30
11
|
className?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Additional class name for the modal backdrop
|
|
33
|
-
*/
|
|
34
12
|
backdropClassName?: string;
|
|
35
|
-
/**
|
|
36
|
-
* The content of the modal
|
|
37
|
-
*/
|
|
38
13
|
children: React.ReactNode;
|
|
39
|
-
/**
|
|
40
|
-
* Footer content for the modal
|
|
41
|
-
*/
|
|
42
14
|
footer?: React.ReactNode;
|
|
43
|
-
/**
|
|
44
|
-
* Whether to show the close button
|
|
45
|
-
*/
|
|
46
15
|
showCloseButton?: boolean;
|
|
47
16
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Modal component with theme integration and accessibility features
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```tsx
|
|
53
|
-
* <Modal
|
|
54
|
-
* open={isOpen}
|
|
55
|
-
* onClose={() => setIsOpen(false)}
|
|
56
|
-
* title="Confirm Action"
|
|
57
|
-
* size="md"
|
|
58
|
-
* >
|
|
59
|
-
* <p>Are you sure you want to delete this item?</p>
|
|
60
|
-
* </Modal>
|
|
61
|
-
*
|
|
62
|
-
* <Modal
|
|
63
|
-
* open={isOpen}
|
|
64
|
-
* onClose={() => setIsOpen(false)}
|
|
65
|
-
* title="Settings"
|
|
66
|
-
* size="lg"
|
|
67
|
-
* footer={
|
|
68
|
-
* <div className="flex justify-end space-x-2">
|
|
69
|
-
* <Button variant="outline" onClick={() => setIsOpen(false)}>
|
|
70
|
-
* Cancel
|
|
71
|
-
* </Button>
|
|
72
|
-
* <Button onClick={handleSave}>
|
|
73
|
-
* Save
|
|
74
|
-
* </Button>
|
|
75
|
-
* </div>
|
|
76
|
-
* }
|
|
77
|
-
* >
|
|
78
|
-
* <SettingsForm />
|
|
79
|
-
* </Modal>
|
|
80
|
-
* ```
|
|
81
|
-
*/
|
|
17
|
+
/** Dialog overlay with focus management, Escape/backdrop close, and body-scroll lock. */
|
|
82
18
|
export declare function Modal({ open, onClose, title, size, closeOnBackdropClick, closeOnEscape, className, backdropClassName, children, footer, showCloseButton, }: ModalProps): React.JSX.Element | null;
|
|
@@ -9,7 +9,6 @@ export interface PopoverProps {
|
|
|
9
9
|
children: React.ReactNode | ((close: () => void) => React.ReactNode);
|
|
10
10
|
/** Panel placement relative to the trigger. Flips when there is no room. */
|
|
11
11
|
placement?: "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
12
|
-
/** Additional CSS classes for the panel */
|
|
13
12
|
className?: string;
|
|
14
13
|
/**
|
|
15
14
|
* Layout classes for the wrapper around the trigger. Needed when the trigger
|
|
@@ -19,7 +18,6 @@ export interface PopoverProps {
|
|
|
19
18
|
rootClassName?: string;
|
|
20
19
|
/** Layout classes for the trigger button itself. */
|
|
21
20
|
triggerClassName?: string;
|
|
22
|
-
/** Whether the trigger is disabled */
|
|
23
21
|
disabled?: boolean;
|
|
24
22
|
/**
|
|
25
23
|
* Accessible name for the trigger button. Needed when the trigger is
|
|
@@ -3,31 +3,31 @@ export interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
3
3
|
/**
|
|
4
4
|
* Padding size
|
|
5
5
|
*/
|
|
6
|
-
padding?:
|
|
6
|
+
padding?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
7
7
|
/**
|
|
8
8
|
* Margin size
|
|
9
9
|
*/
|
|
10
|
-
margin?:
|
|
10
|
+
margin?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
11
11
|
/**
|
|
12
12
|
* Background color
|
|
13
13
|
*/
|
|
14
|
-
background?:
|
|
14
|
+
background?: "none" | "primary" | "secondary" | "accent" | "success" | "warning" | "error" | "info" | "neutral" | "white" | "module" | "module-subtle" | "backdrop" | "editor" | "input";
|
|
15
15
|
/**
|
|
16
16
|
* Border radius
|
|
17
17
|
*/
|
|
18
|
-
radius?:
|
|
18
|
+
radius?: "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
19
19
|
/**
|
|
20
20
|
* Shadow size
|
|
21
21
|
*/
|
|
22
|
-
shadow?:
|
|
22
|
+
shadow?: "none" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
23
23
|
/**
|
|
24
24
|
* Border width
|
|
25
25
|
*/
|
|
26
|
-
border?:
|
|
26
|
+
border?: "none" | "sm" | "md" | "lg";
|
|
27
27
|
/**
|
|
28
28
|
* Border color
|
|
29
29
|
*/
|
|
30
|
-
borderColor?:
|
|
30
|
+
borderColor?: "primary" | "secondary" | "accent" | "success" | "warning" | "error" | "info" | "neutral" | "white";
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Box primitive component for layout and styling
|
|
File without changes
|
|
@@ -3,13 +3,13 @@ export interface HeadingProps {
|
|
|
3
3
|
/** Heading level */
|
|
4
4
|
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
5
|
/** Visual size (can be different from semantic level) */
|
|
6
|
-
size?:
|
|
6
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
|
|
7
7
|
/** Font weight */
|
|
8
|
-
weight?:
|
|
8
|
+
weight?: "light" | "normal" | "medium" | "semibold" | "bold";
|
|
9
9
|
/** Text color */
|
|
10
|
-
color?:
|
|
10
|
+
color?: "primary" | "secondary" | "accent" | "success" | "warning" | "error" | "info" | "neutral" | "current";
|
|
11
11
|
/** Text alignment */
|
|
12
|
-
align?:
|
|
12
|
+
align?: "left" | "center" | "right";
|
|
13
13
|
/** Whether to truncate text with ellipsis */
|
|
14
14
|
truncate?: boolean;
|
|
15
15
|
/** Additional CSS classes */
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface TextProps {
|
|
3
3
|
/** Text variant */
|
|
4
|
-
variant?:
|
|
4
|
+
variant?: "body" | "caption" | "label" | "code";
|
|
5
5
|
/** Text size */
|
|
6
|
-
size?:
|
|
6
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
7
7
|
/** Font weight */
|
|
8
|
-
weight?:
|
|
8
|
+
weight?: "light" | "normal" | "medium" | "semibold" | "bold";
|
|
9
9
|
/** Text color */
|
|
10
|
-
color?:
|
|
10
|
+
color?: "primary" | "secondary" | "accent" | "success" | "warning" | "error" | "info" | "neutral" | "current" | "muted";
|
|
11
11
|
/** Text alignment */
|
|
12
|
-
align?:
|
|
12
|
+
align?: "left" | "center" | "right" | "justify";
|
|
13
13
|
/** Whether to truncate text with ellipsis */
|
|
14
14
|
truncate?: boolean;
|
|
15
15
|
/** Whether text should be italic */
|
|
@@ -17,9 +17,9 @@ export interface TextProps {
|
|
|
17
17
|
/** Whether text should be underlined */
|
|
18
18
|
underline?: boolean;
|
|
19
19
|
/** Line height */
|
|
20
|
-
lineHeight?:
|
|
20
|
+
lineHeight?: "tight" | "normal" | "relaxed";
|
|
21
21
|
/** HTML element to render */
|
|
22
|
-
as?:
|
|
22
|
+
as?: "p" | "span" | "div" | "code" | "pre";
|
|
23
23
|
/** Additional CSS classes */
|
|
24
24
|
className?: string;
|
|
25
25
|
/** Child content */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencxh/ui-kit",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.175.2",
|
|
4
4
|
"description": "Theme-aware UI component library for OpenCXH platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"test": "vitest",
|
|
25
25
|
"test:run": "vitest run",
|
|
26
26
|
"test:watch": "vitest --watch",
|
|
27
|
-
"test:coverage": "vitest --coverage"
|
|
27
|
+
"test:coverage": "vitest --coverage",
|
|
28
|
+
"lint": "biome check ."
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
31
|
"clsx": "^2.1.0",
|
|
@@ -37,18 +38,17 @@
|
|
|
37
38
|
"remark-gfm": "^4.0.1"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
41
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
42
|
+
"@testing-library/react": "^16.3.0",
|
|
43
|
+
"@testing-library/user-event": "^14.6.1",
|
|
40
44
|
"@types/react": "^19.1.8",
|
|
41
45
|
"@types/react-dom": "^19.2.3",
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
|
43
|
-
"@typescript-eslint/parser": "^8.15.0",
|
|
44
46
|
"@vitejs/plugin-react": "^5.0.4",
|
|
45
|
-
"
|
|
46
|
-
"eslint-plugin-react": "^7.37.2",
|
|
47
|
-
"eslint-plugin-react-hooks": "^5.0.0",
|
|
47
|
+
"jsdom": "^26.1.0",
|
|
48
48
|
"typescript": "6.0.3",
|
|
49
49
|
"vite": "7.1.7",
|
|
50
50
|
"vite-plugin-dts": "^5.0.3",
|
|
51
|
-
"vitest": "^
|
|
51
|
+
"vitest": "^4.0.18"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"react": ">=19.2.4",
|