@opencxh/ui-kit 3.136.1 → 3.136.3
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 +713 -650
- package/dist/index.js.map +1 -1
- package/dist/src/content/List.d.ts +30 -2
- package/dist/src/index.d.ts +2 -1
- package/dist/src/utils/catTone.d.ts +12 -0
- package/package.json +1 -1
|
@@ -8,14 +8,24 @@ export interface ListGroup {
|
|
|
8
8
|
count?: number;
|
|
9
9
|
/** Start collapsed (only with `collapsible`) */
|
|
10
10
|
defaultCollapsed?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* `danger` tints the label and its count — for a section that is a problem
|
|
13
|
+
* by definition (overdue, failed), where the rows themselves carry no
|
|
14
|
+
* marker that the group is the bad one.
|
|
15
|
+
*/
|
|
16
|
+
tone?: "default" | "danger" | "muted";
|
|
11
17
|
}
|
|
12
18
|
export interface ListProps<T> {
|
|
13
19
|
/** Rows to render */
|
|
14
20
|
items: T[];
|
|
15
21
|
/** Stable key per row */
|
|
16
22
|
getRowKey?: (item: T, index: number) => string | number;
|
|
17
|
-
/**
|
|
18
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Row separation. `inset` gives each row a rounded hover plate held off the
|
|
25
|
+
* edge instead of a rule — the treatment for a list of things you tick off
|
|
26
|
+
* (tasks) rather than a table you scan across (the inbox).
|
|
27
|
+
*/
|
|
28
|
+
variant?: "plain" | "divided" | "bulleted" | "inset";
|
|
19
29
|
/** Leading slot — channel tile, avatar, status dot */
|
|
20
30
|
leading?: (item: T, index: number) => React.ReactNode;
|
|
21
31
|
/** Main content; defaults to `String(item)` */
|
|
@@ -77,6 +87,24 @@ export interface ListProps<T> {
|
|
|
77
87
|
className?: string;
|
|
78
88
|
"aria-label"?: string;
|
|
79
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* One action in the bulk dock. Its own component rather than a `Button`
|
|
92
|
+
* variant: the dock is an ink surface, so every ordinary button variant is a
|
|
93
|
+
* light plate on a dark bar. Use it for the `bulkActions` slot.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```tsx
|
|
97
|
+
* bulkActions={<>
|
|
98
|
+
* <ListBulkAction icon={<Icon icon={UserPlus} size="sm" />} onClick={assign}>Toewijzen</ListBulkAction>
|
|
99
|
+
* <ListBulkAction icon={<Icon icon={Archive} size="sm" />} onClick={archive}>Archiveren</ListBulkAction>
|
|
100
|
+
* </>}
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
export declare function ListBulkAction({ icon, onClick, children, }: {
|
|
104
|
+
icon?: React.ReactNode;
|
|
105
|
+
onClick?: () => void;
|
|
106
|
+
children: React.ReactNode;
|
|
107
|
+
}): React.JSX.Element;
|
|
80
108
|
/**
|
|
81
109
|
* List — one row is one object you open, with content of varying length
|
|
82
110
|
* (inbox conversations, notifications, search results). No column headers:
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { cn, createSizes, createVariants } from './utils/cn';
|
|
2
|
+
export { catTone, type CatTone } from './utils/catTone';
|
|
2
3
|
export { MeetingGrid, type MeetingGridProps } from './meeting/MeetingGrid';
|
|
3
4
|
export { ParticipantTile, type ParticipantTileProps } from './meeting/ParticipantTile';
|
|
4
5
|
export { VideoSurface, type VideoSurfaceProps } from './meeting/VideoSurface';
|
|
@@ -36,7 +37,7 @@ export { AvatarStack, type AvatarStackPerson, type AvatarStackProps } from './co
|
|
|
36
37
|
export { ChannelBadge, type ChannelBadgeProps, type ChannelKey } from './content/ChannelBadge';
|
|
37
38
|
export { Icon, type IconProps } from './content/Icon';
|
|
38
39
|
export { Image, type ImageProps } from './content/Image';
|
|
39
|
-
export { List, type ListProps } from './content/List';
|
|
40
|
+
export { List, ListBulkAction, type ListGroup, type ListProps } from './content/List';
|
|
40
41
|
export { MessageBubble, type MessageBubbleProps } from './content/MessageBubble';
|
|
41
42
|
export { KpiCard, type KpiCardProps } from './content/KpiCard';
|
|
42
43
|
export { PageHeader, type PageHeaderAction, type PageHeaderProps } from './content/PageHeader';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** The categorical set — identity without status. See --color-cat-*. */
|
|
2
|
+
export type CatTone = "cat-1" | "cat-2" | "cat-3" | "cat-4" | "cat-5";
|
|
3
|
+
/**
|
|
4
|
+
* A stable colour for a thing that has an identity but no state — a knowledge
|
|
5
|
+
* base, an inbox, a team, a transcript speaker.
|
|
6
|
+
*
|
|
7
|
+
* Derived from the id, so the colour survives reloads and is the same for every
|
|
8
|
+
* user. Storing one would mean a column per entity that wants a dot; a hash
|
|
9
|
+
* gets the same result for free, and the categorical tokens are equal-weight by
|
|
10
|
+
* construction so no entry can accidentally outrank another.
|
|
11
|
+
*/
|
|
12
|
+
export declare function catTone(id: string): CatTone;
|