@worknice/whiteboard 0.64.0 → 0.66.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/icons/components/AssignmentCertificate.js +2 -2
- package/dist/icons/components/AssignmentDocument.js +2 -2
- package/dist/icons/components/AssignmentForm.js +2 -2
- package/dist/icons/components/AssignmentQuestionnaire.js +2 -2
- package/dist/icons/components/Bolt.d.ts +5 -0
- package/dist/icons/components/Bolt.js +14 -0
- package/dist/icons/components/Events.js +1 -1
- package/dist/icons/components/History.d.ts +5 -0
- package/dist/icons/components/History.js +14 -0
- package/dist/icons/components/LocationCheck.js +1 -1
- package/dist/icons/components/QuestionMark.d.ts +5 -0
- package/dist/icons/components/QuestionMark.js +14 -0
- package/dist/icons/components/UserPlus.d.ts +5 -0
- package/dist/icons/components/UserPlus.js +14 -0
- package/dist/icons/components/index.d.ts +4 -0
- package/dist/icons/components/index.js +9 -1
- package/dist/icons/svgs/Bolt.js +2 -0
- package/dist/icons/svgs/History.js +2 -0
- package/dist/icons/svgs/QuestionMark.js +2 -0
- package/dist/icons/svgs/UserPlus.js +2 -0
- package/dist/inputs/NumberInput.d.ts +2 -1
- package/dist/inputs/NumberInput.js +2 -1
- package/dist/inputs/SelectInput.d.ts +2 -1
- package/dist/inputs/SelectInput.js +2 -1
- package/dist/layouts/FullLayout_module.css +2 -1
- package/dist/presentation/Avatar.d.ts +7 -1
- package/dist/presentation/Avatar.js +13 -3
- package/dist/presentation/Avatar.module.js +9 -0
- package/dist/presentation/Avatar.stories.d.ts +5 -1
- package/dist/presentation/Avatar.stories.js +7 -1
- package/dist/presentation/Avatar_module.css +45 -0
- package/dist/presentation/CardGrid.d.ts +12 -0
- package/dist/presentation/CardGrid.js +12 -0
- package/dist/presentation/CardGrid.module.js +5 -0
- package/dist/presentation/CardGrid.stories.d.ts +6 -0
- package/dist/presentation/CardGrid.stories.js +34 -0
- package/dist/presentation/CardGrid_module.css +6 -0
- package/dist/presentation/HeadlineStatisticCard.d.ts +3 -1
- package/dist/presentation/HeadlineStatisticCard.js +2 -2
- package/dist/presentation/IconBadge.d.ts +2 -1
- package/dist/presentation/IconBadge.js +2 -1
- package/dist/presentation/IconBadge.module.js +1 -0
- package/dist/presentation/IconBadge.stories.d.ts +44 -0
- package/dist/presentation/IconBadge.stories.js +135 -0
- package/dist/presentation/IconBadge_module.css +5 -0
- package/dist/presentation/PersonCover.stories.d.ts +4 -0
- package/dist/presentation/ProgressBar.d.ts +6 -2
- package/dist/presentation/ProgressBar.js +8 -3
- package/dist/presentation/ProgressBar.module.js +2 -1
- package/dist/presentation/ProgressBar.stories.d.ts +5 -1
- package/dist/presentation/ProgressBar_module.css +5 -1
- package/dist/presentation/RichList/RichList.js +1 -0
- package/dist/presentation/RichList/RichListRow.d.ts +7 -1
- package/dist/presentation/RichList/RichListRow.js +3 -2
- package/dist/presentation/RichList/RichListRow.module.js +1 -0
- package/dist/presentation/RichList/RichListRow_module.css +4 -0
- package/dist/presentation/RichList/RichList_module.css +5 -3
- package/dist/presentation/RichList/types.d.ts +17 -0
- package/dist/static/svg/AssignmentCertificate.svg +2 -2
- package/dist/static/svg/AssignmentDocument.svg +2 -2
- package/dist/static/svg/AssignmentForm.svg +2 -2
- package/dist/static/svg/AssignmentQuestionnaire.svg +2 -2
- package/dist/static/svg/Bolt.svg +1 -0
- package/dist/static/svg/History.svg +3 -0
- package/dist/static/svg/QuestionMark.svg +3 -0
- package/dist/static/svg/UserPlus.svg +1 -0
- package/package.json +3 -3
|
@@ -92,6 +92,51 @@
|
|
|
92
92
|
transform: scale(.87);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
.badgeBlue-nMftx7 {
|
|
96
|
+
background: var(--color-blue-t09);
|
|
97
|
+
color: var(--color-blue-s04);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.badgeGreen-IcxnbE {
|
|
101
|
+
background: var(--color-green-t09);
|
|
102
|
+
color: var(--color-green-s04);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.badgeGrey-N5rCOW {
|
|
106
|
+
background: var(--color-grey-t09);
|
|
107
|
+
color: var(--color-grey-s04);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.badgeMaroon-Jqd9h0 {
|
|
111
|
+
background: var(--color-maroon-t09);
|
|
112
|
+
color: var(--color-maroon-s04);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.badgeOrange-hCLkRt {
|
|
116
|
+
background: var(--color-orange-t09);
|
|
117
|
+
color: var(--color-orange-s04);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.badgePurple-y1GraZ {
|
|
121
|
+
background: var(--color-purple-t09);
|
|
122
|
+
color: var(--color-purple-s04);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.badgeRed-VV8VMx {
|
|
126
|
+
background: var(--color-red-t09);
|
|
127
|
+
color: var(--color-red-s04);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.badgeTeal-nMwmCt {
|
|
131
|
+
background: var(--color-teal-t09);
|
|
132
|
+
color: var(--color-teal-s04);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.badgeYellow-RNUX_f {
|
|
136
|
+
background: var(--color-yellow-t09);
|
|
137
|
+
color: var(--color-yellow-s04);
|
|
138
|
+
}
|
|
139
|
+
|
|
95
140
|
.hoverIconOverlay-VNqOuN {
|
|
96
141
|
background: color-mix(in oklch, var(--color-grey-s04) 35%, transparent);
|
|
97
142
|
color: var(--color-white);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
type Props = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/** Minimum width of each column before the grid drops one. Defaults to 280. */
|
|
5
|
+
minColumnWidth?: number;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* A responsive grid of cards. Columns reflow automatically by available width
|
|
9
|
+
* (down to a single column on narrow/mobile viewports) based on `minColumnWidth`.
|
|
10
|
+
*/
|
|
11
|
+
declare const CardGrid: ({ children, minColumnWidth }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default CardGrid;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__utils_customProperties_js_aeb40bdf__ from "../utils/customProperties.js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__CardGrid_module_js_156110b7__ from "./CardGrid.module.js";
|
|
4
|
+
const CardGrid = ({ children, minColumnWidth = 280 })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
5
|
+
className: __WEBPACK_EXTERNAL_MODULE__CardGrid_module_js_156110b7__["default"].grid,
|
|
6
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE__utils_customProperties_js_aeb40bdf__["default"])({
|
|
7
|
+
"--min-column-width": `${minColumnWidth}px`
|
|
8
|
+
}),
|
|
9
|
+
children: children
|
|
10
|
+
});
|
|
11
|
+
const CardGrid_rslib_entry_ = CardGrid;
|
|
12
|
+
export { CardGrid_rslib_entry_ as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Card_js_d67c086a__ from "./Card.js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__CardContent_js_20e3f6de__ from "./CardContent.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__CardGrid_js_b1a4dbda__ from "./CardGrid.js";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__ from "./PlainText.js";
|
|
6
|
+
const meta = {
|
|
7
|
+
title: "Presentation/CardGrid",
|
|
8
|
+
component: __WEBPACK_EXTERNAL_MODULE__CardGrid_js_b1a4dbda__["default"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
children: {
|
|
11
|
+
control: false
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const CardGrid_stories_rslib_entry_ = meta;
|
|
16
|
+
const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
minColumnWidth: 280
|
|
19
|
+
},
|
|
20
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__CardGrid_js_b1a4dbda__["default"], {
|
|
21
|
+
...args,
|
|
22
|
+
children: Array.from({
|
|
23
|
+
length: 7
|
|
24
|
+
}).map((_, index)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Card_js_d67c086a__["default"], {
|
|
25
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__CardContent_js_20e3f6de__["default"], {
|
|
26
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
|
|
27
|
+
font: "h5",
|
|
28
|
+
children: `Card ${index + 1}`
|
|
29
|
+
})
|
|
30
|
+
})
|
|
31
|
+
}, index))
|
|
32
|
+
})
|
|
33
|
+
};
|
|
34
|
+
export { Default, CardGrid_stories_rslib_entry_ as default };
|
|
@@ -5,6 +5,8 @@ type Props = {
|
|
|
5
5
|
disclaimer?: string;
|
|
6
6
|
subtext?: string;
|
|
7
7
|
trailing?: ReactNode;
|
|
8
|
+
/** Heading level for the card's heading, so it nests correctly under its section. Defaults to "h2". */
|
|
9
|
+
headingLevel?: "h2" | "h3" | "h4";
|
|
8
10
|
};
|
|
9
|
-
declare const HeadlineStatisticCard: ({ heading, statistic, disclaimer, subtext, trailing }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const HeadlineStatisticCard: ({ heading, statistic, disclaimer, subtext, trailing, headingLevel, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export default HeadlineStatisticCard;
|
|
@@ -4,14 +4,14 @@ import * as __WEBPACK_EXTERNAL_MODULE__CardContent_js_20e3f6de__ from "./CardCon
|
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE__HStack_js_cc26058d__ from "./HStack.js";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__ from "./PlainText.js";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE__VStack_js_02eb6792__ from "./VStack.js";
|
|
7
|
-
const HeadlineStatisticCard = ({ heading, statistic, disclaimer, subtext, trailing })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Card_js_d67c086a__["default"], {
|
|
7
|
+
const HeadlineStatisticCard = ({ heading, statistic, disclaimer, subtext, trailing, headingLevel = "h2" })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Card_js_d67c086a__["default"], {
|
|
8
8
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__CardContent_js_20e3f6de__["default"], {
|
|
9
9
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__VStack_js_02eb6792__["default"], {
|
|
10
10
|
spacing: "n3",
|
|
11
11
|
children: [
|
|
12
12
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
|
|
13
13
|
font: "small-bold",
|
|
14
|
-
tagName:
|
|
14
|
+
tagName: headingLevel,
|
|
15
15
|
children: heading
|
|
16
16
|
}),
|
|
17
17
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
|
|
@@ -3,6 +3,7 @@ type Props = {
|
|
|
3
3
|
icon: ReactNode;
|
|
4
4
|
id?: string;
|
|
5
5
|
color: "blue" | "green" | "grey" | "maroon" | "orange" | "purple" | "red" | "teal" | "yellow";
|
|
6
|
+
size?: "default" | "large";
|
|
6
7
|
};
|
|
7
|
-
declare const IconBadge: ({ icon, id, color }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const IconBadge: ({ icon, id, color, size }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export default IconBadge;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE_clsx__ from "clsx";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE__IconBadge_module_js_cbb5a845__ from "./IconBadge.module.js";
|
|
4
|
-
const IconBadge = ({ icon, id, color = "grey" })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
4
|
+
const IconBadge = ({ icon, id, color = "grey", size = "default" })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
5
5
|
id: id,
|
|
6
6
|
className: (0, __WEBPACK_EXTERNAL_MODULE_clsx__["default"])(__WEBPACK_EXTERNAL_MODULE__IconBadge_module_js_cbb5a845__["default"].badge, {
|
|
7
|
+
[__WEBPACK_EXTERNAL_MODULE__IconBadge_module_js_cbb5a845__["default"].large]: "large" === size,
|
|
7
8
|
[__WEBPACK_EXTERNAL_MODULE__IconBadge_module_js_cbb5a845__["default"].blue]: "blue" === color,
|
|
8
9
|
[__WEBPACK_EXTERNAL_MODULE__IconBadge_module_js_cbb5a845__["default"].green]: "green" === color,
|
|
9
10
|
[__WEBPACK_EXTERNAL_MODULE__IconBadge_module_js_cbb5a845__["default"].grey]: "grey" === color,
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/nextjs-vite";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
component: ({ icon, id, color, size }: {
|
|
4
|
+
icon: import("react").ReactNode;
|
|
5
|
+
id?: string;
|
|
6
|
+
color: "blue" | "green" | "grey" | "maroon" | "orange" | "purple" | "red" | "teal" | "yellow";
|
|
7
|
+
size?: "default" | "large";
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
title: string;
|
|
10
|
+
args: {
|
|
11
|
+
color: "grey";
|
|
12
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
id: string;
|
|
14
|
+
size: "default";
|
|
15
|
+
};
|
|
16
|
+
argTypes: {
|
|
17
|
+
color: {
|
|
18
|
+
control: "select";
|
|
19
|
+
options: ["blue", "green", "grey", "maroon", "orange", "purple", "red", "teal", "yellow"];
|
|
20
|
+
};
|
|
21
|
+
icon: {
|
|
22
|
+
control: false;
|
|
23
|
+
table: {
|
|
24
|
+
type: {
|
|
25
|
+
summary: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
size: {
|
|
30
|
+
control: "radio";
|
|
31
|
+
options: string[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
parameters: {
|
|
35
|
+
layout: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export default meta;
|
|
39
|
+
type Story = StoryObj<typeof meta>;
|
|
40
|
+
export declare const Default: Story;
|
|
41
|
+
/** Matches paperwork list leading icons (`PaperworkAssignmentIcon`). */
|
|
42
|
+
export declare const Large: Story;
|
|
43
|
+
export declare const Colors: Story;
|
|
44
|
+
export declare const PaperworkTypes: Story;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__icons_components_AssignmentCertificate_js_fa8a03f5__ from "../icons/components/AssignmentCertificate.js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__icons_components_AssignmentDocument_js_77dafcc0__ from "../icons/components/AssignmentDocument.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__icons_components_AssignmentForm_js_bea25b7b__ from "../icons/components/AssignmentForm.js";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__icons_components_AssignmentQuestionnaire_js_c3311bf3__ from "../icons/components/AssignmentQuestionnaire.js";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__icons_components_Paperwork_js_65e48fee__ from "../icons/components/Paperwork.js";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__HStack_js_cc26058d__ from "./HStack.js";
|
|
8
|
+
import * as __WEBPACK_EXTERNAL_MODULE__IconBadge_js_a428a515__ from "./IconBadge.js";
|
|
9
|
+
import * as __WEBPACK_EXTERNAL_MODULE__VStack_js_02eb6792__ from "./VStack.js";
|
|
10
|
+
const COLORS = [
|
|
11
|
+
"blue",
|
|
12
|
+
"green",
|
|
13
|
+
"grey",
|
|
14
|
+
"maroon",
|
|
15
|
+
"orange",
|
|
16
|
+
"purple",
|
|
17
|
+
"red",
|
|
18
|
+
"teal",
|
|
19
|
+
"yellow"
|
|
20
|
+
];
|
|
21
|
+
const defaultIcon = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__icons_components_AssignmentForm_js_bea25b7b__["default"], {
|
|
22
|
+
tone: "muted"
|
|
23
|
+
});
|
|
24
|
+
const meta = {
|
|
25
|
+
component: __WEBPACK_EXTERNAL_MODULE__IconBadge_js_a428a515__["default"],
|
|
26
|
+
title: "Presentation/IconBadge",
|
|
27
|
+
args: {
|
|
28
|
+
color: "grey",
|
|
29
|
+
icon: defaultIcon,
|
|
30
|
+
id: "icon-badge-story",
|
|
31
|
+
size: "default"
|
|
32
|
+
},
|
|
33
|
+
argTypes: {
|
|
34
|
+
color: {
|
|
35
|
+
control: "select",
|
|
36
|
+
options: COLORS
|
|
37
|
+
},
|
|
38
|
+
icon: {
|
|
39
|
+
control: false,
|
|
40
|
+
table: {
|
|
41
|
+
type: {
|
|
42
|
+
summary: "ReactNode"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
size: {
|
|
47
|
+
control: "radio",
|
|
48
|
+
options: [
|
|
49
|
+
"default",
|
|
50
|
+
"large"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
parameters: {
|
|
55
|
+
layout: "padded"
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const IconBadge_stories_rslib_entry_ = meta;
|
|
59
|
+
const Default = {};
|
|
60
|
+
const Large = {
|
|
61
|
+
args: {
|
|
62
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__icons_components_AssignmentForm_js_bea25b7b__["default"], {
|
|
63
|
+
size: "large",
|
|
64
|
+
tone: "muted"
|
|
65
|
+
}),
|
|
66
|
+
size: "large"
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const Colors = {
|
|
70
|
+
args: {},
|
|
71
|
+
render: ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__HStack_js_cc26058d__["default"], {
|
|
72
|
+
spacing: "n2",
|
|
73
|
+
children: COLORS.map((color)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__IconBadge_js_a428a515__["default"], {
|
|
74
|
+
color: color,
|
|
75
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__icons_components_AssignmentDocument_js_77dafcc0__["default"], {
|
|
76
|
+
tone: "muted"
|
|
77
|
+
}),
|
|
78
|
+
id: `icon-badge-${color}`
|
|
79
|
+
}, color))
|
|
80
|
+
})
|
|
81
|
+
};
|
|
82
|
+
const PaperworkTypes = {
|
|
83
|
+
args: {},
|
|
84
|
+
render: ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__VStack_js_02eb6792__["default"], {
|
|
85
|
+
spacing: "n2",
|
|
86
|
+
children: [
|
|
87
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__IconBadge_js_a428a515__["default"], {
|
|
88
|
+
color: "grey",
|
|
89
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__icons_components_AssignmentCertificate_js_fa8a03f5__["default"], {
|
|
90
|
+
size: "large",
|
|
91
|
+
tone: "muted"
|
|
92
|
+
}),
|
|
93
|
+
id: "icon-badge-certificate",
|
|
94
|
+
size: "large"
|
|
95
|
+
}),
|
|
96
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__IconBadge_js_a428a515__["default"], {
|
|
97
|
+
color: "grey",
|
|
98
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__icons_components_AssignmentDocument_js_77dafcc0__["default"], {
|
|
99
|
+
size: "large",
|
|
100
|
+
tone: "muted"
|
|
101
|
+
}),
|
|
102
|
+
id: "icon-badge-document",
|
|
103
|
+
size: "large"
|
|
104
|
+
}),
|
|
105
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__IconBadge_js_a428a515__["default"], {
|
|
106
|
+
color: "grey",
|
|
107
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__icons_components_AssignmentForm_js_bea25b7b__["default"], {
|
|
108
|
+
size: "large",
|
|
109
|
+
tone: "muted"
|
|
110
|
+
}),
|
|
111
|
+
id: "icon-badge-form",
|
|
112
|
+
size: "large"
|
|
113
|
+
}),
|
|
114
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__IconBadge_js_a428a515__["default"], {
|
|
115
|
+
color: "grey",
|
|
116
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__icons_components_AssignmentQuestionnaire_js_c3311bf3__["default"], {
|
|
117
|
+
size: "large",
|
|
118
|
+
tone: "muted"
|
|
119
|
+
}),
|
|
120
|
+
id: "icon-badge-questionnaire",
|
|
121
|
+
size: "large"
|
|
122
|
+
}),
|
|
123
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__IconBadge_js_a428a515__["default"], {
|
|
124
|
+
color: "grey",
|
|
125
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__icons_components_Paperwork_js_65e48fee__["default"], {
|
|
126
|
+
size: "large",
|
|
127
|
+
tone: "muted"
|
|
128
|
+
}),
|
|
129
|
+
id: "icon-badge-paperwork",
|
|
130
|
+
size: "large"
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
})
|
|
134
|
+
};
|
|
135
|
+
export { Colors, Default, Large, PaperworkTypes, IconBadge_stories_rslib_entry_ as default };
|
|
@@ -7,6 +7,7 @@ declare const meta: {
|
|
|
7
7
|
imageUrl?: string | null;
|
|
8
8
|
hue?: string;
|
|
9
9
|
badgeIconComponent?: import("react").ComponentType<import("../icons/types").IconProps>;
|
|
10
|
+
badgeIconTone?: import("./Avatar").BadgeIconTone;
|
|
10
11
|
hoverIconComponent?: import("react").ComponentType<import("../icons/types").IconProps>;
|
|
11
12
|
onClick?: (event: import("react").MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
|
|
12
13
|
} & {
|
|
@@ -19,6 +20,7 @@ declare const meta: {
|
|
|
19
20
|
imageUrl?: string | null;
|
|
20
21
|
hue?: string;
|
|
21
22
|
badgeIconComponent?: import("react").ComponentType<import("../icons/types").IconProps>;
|
|
23
|
+
badgeIconTone?: import("./Avatar").BadgeIconTone;
|
|
22
24
|
hoverIconComponent?: import("react").ComponentType<import("../icons/types").IconProps>;
|
|
23
25
|
onClick?: (event: import("react").MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
|
|
24
26
|
} & {
|
|
@@ -31,6 +33,7 @@ declare const meta: {
|
|
|
31
33
|
imageUrl?: string | null;
|
|
32
34
|
hue?: string;
|
|
33
35
|
badgeIconComponent?: import("react").ComponentType<import("../icons/types").IconProps>;
|
|
36
|
+
badgeIconTone?: import("./Avatar").BadgeIconTone;
|
|
34
37
|
hoverIconComponent?: import("react").ComponentType<import("../icons/types").IconProps>;
|
|
35
38
|
onClick?: (event: import("react").MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
|
|
36
39
|
} & {
|
|
@@ -53,6 +56,7 @@ declare const meta: {
|
|
|
53
56
|
href?: string | undefined;
|
|
54
57
|
imageUrl?: string | null | undefined;
|
|
55
58
|
badgeIconComponent?: import("react").ComponentType<import("../icons/types").IconProps> | undefined;
|
|
59
|
+
badgeIconTone?: import("./Avatar").BadgeIconTone | undefined;
|
|
56
60
|
hoverIconComponent?: import("react").ComponentType<import("../icons/types").IconProps> | undefined;
|
|
57
61
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
58
62
|
parameters: {
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
type Props = {
|
|
2
2
|
/** Progress from 0 to 1 (e.g. 0.4 for 40%) */
|
|
3
3
|
percentage: number;
|
|
4
|
+
/** Optional human-readable description of progress for assistive tech (e.g. "3/5 steps complete"). */
|
|
5
|
+
ariaValueText?: string;
|
|
6
|
+
/** Fill colour of the bar. @default "green" */
|
|
7
|
+
color?: "green" | "purple";
|
|
4
8
|
};
|
|
5
9
|
/**
|
|
6
|
-
* Renders a horizontal progress bar with
|
|
10
|
+
* Renders a horizontal progress bar with rounded sides and a configurable fill colour.
|
|
7
11
|
*/
|
|
8
|
-
declare const ProgressBar: ({ percentage }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const ProgressBar: ({ percentage, ariaValueText, color }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
13
|
export default ProgressBar;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE__ProgressBar_module_js_913c4023__ from "./ProgressBar.module.js";
|
|
3
|
-
const
|
|
3
|
+
const FILL_CLASS = {
|
|
4
|
+
green: __WEBPACK_EXTERNAL_MODULE__ProgressBar_module_js_913c4023__["default"].fill,
|
|
5
|
+
purple: __WEBPACK_EXTERNAL_MODULE__ProgressBar_module_js_913c4023__["default"].fillPurple
|
|
6
|
+
};
|
|
7
|
+
const ProgressBar = ({ percentage, ariaValueText, color = "green" })=>{
|
|
4
8
|
const clamped = Math.max(0, Math.min(1, percentage)) || 0;
|
|
5
9
|
const percent = 100 * clamped;
|
|
6
10
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
7
11
|
className: __WEBPACK_EXTERNAL_MODULE__ProgressBar_module_js_913c4023__["default"].track,
|
|
8
12
|
role: "progressbar",
|
|
9
|
-
"aria-valuenow": percent,
|
|
13
|
+
"aria-valuenow": Math.round(percent),
|
|
10
14
|
"aria-valuemin": 0,
|
|
11
15
|
"aria-valuemax": 100,
|
|
16
|
+
"aria-valuetext": ariaValueText,
|
|
12
17
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
13
|
-
className:
|
|
18
|
+
className: FILL_CLASS[color],
|
|
14
19
|
style: {
|
|
15
20
|
width: `${percent}%`
|
|
16
21
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { StoryObj } from "@storybook/nextjs-vite";
|
|
2
2
|
declare const meta: {
|
|
3
|
-
component: ({ percentage }: {
|
|
3
|
+
component: ({ percentage, ariaValueText, color }: {
|
|
4
4
|
percentage: number;
|
|
5
|
+
ariaValueText?: string;
|
|
6
|
+
color?: "green" | "purple";
|
|
5
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
args: {
|
|
7
9
|
percentage: number;
|
|
@@ -19,6 +21,8 @@ declare const meta: {
|
|
|
19
21
|
};
|
|
20
22
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/nextjs-vite").ReactRenderer, {
|
|
21
23
|
percentage: number;
|
|
24
|
+
ariaValueText?: string | undefined;
|
|
25
|
+
color?: "green" | "purple" | undefined;
|
|
22
26
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
23
27
|
};
|
|
24
28
|
export default meta;
|
|
@@ -7,9 +7,13 @@
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.fill-ureadD {
|
|
10
|
-
background-color: var(--color-green-
|
|
10
|
+
background-color: var(--color-green-t05);
|
|
11
11
|
border-radius: var(--size-n2);
|
|
12
12
|
height: 100%;
|
|
13
13
|
transition: width .2s;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
.fillPurple-fmJtA1 {
|
|
17
|
+
background-color: var(--color-purple-000);
|
|
18
|
+
}
|
|
19
|
+
|
|
@@ -587,6 +587,7 @@ const RichList = ({ data, getRowId, leadingSlot, mainSlot, contentSlots = EMPTY_
|
|
|
587
587
|
normalizedPrimary: normalizedPrimary,
|
|
588
588
|
normalizedSecondary: normalizedSecondary,
|
|
589
589
|
mainSlotMaxWidthPx: mainSlot.size,
|
|
590
|
+
shouldFillMainSlot: mainSlot.fill ?? false,
|
|
590
591
|
normalizedContentSlots: normalizedContentSlots,
|
|
591
592
|
normalizedTrailingSlots: normalizedTrailingSlots,
|
|
592
593
|
isCompactContentSlots: isCompactContentSlots,
|
|
@@ -21,6 +21,12 @@ type Props<Type> = {
|
|
|
21
21
|
* From `mainSlot.size`: max width (px) of the main-slot grid column (`--richlist-primary-track`).
|
|
22
22
|
*/
|
|
23
23
|
mainSlotMaxWidthPx: number | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* From `mainSlot.fill`: when `true` (and no `mainSlotMaxWidthPx`), the main slot column
|
|
26
|
+
* grows to absorb the row's leftover width instead of being capped. See
|
|
27
|
+
* `RichListMainSlot.fill` in types.ts for the usage contract.
|
|
28
|
+
*/
|
|
29
|
+
shouldFillMainSlot: boolean;
|
|
24
30
|
normalizedContentSlots: Array<NormalizedSlot<Type>>;
|
|
25
31
|
normalizedTrailingSlots: Array<NormalizedSlot<Type>>;
|
|
26
32
|
/**
|
|
@@ -39,5 +45,5 @@ type Props<Type> = {
|
|
|
39
45
|
actionsForRow: Array<RichListRowAction<Type>>;
|
|
40
46
|
lastSelectedRowRef: MutableRefObject<Row<Type> | undefined>;
|
|
41
47
|
};
|
|
42
|
-
declare const RichListRow: <Type>({ row, table, groupEntry, enableRowSelection, href, onClick, normalizedLeadingSlots, normalizedPrimary, normalizedSecondary, mainSlotMaxWidthPx, normalizedContentSlots, normalizedTrailingSlots, isCompactContentSlots, rowMainHidesContentSlotColumns, contentSlotsJustifyContent, actionsForRow, lastSelectedRowRef, }: Props<Type>) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
declare const RichListRow: <Type>({ row, table, groupEntry, enableRowSelection, href, onClick, normalizedLeadingSlots, normalizedPrimary, normalizedSecondary, mainSlotMaxWidthPx, shouldFillMainSlot, normalizedContentSlots, normalizedTrailingSlots, isCompactContentSlots, rowMainHidesContentSlotColumns, contentSlotsJustifyContent, actionsForRow, lastSelectedRowRef, }: Props<Type>) => import("react/jsx-runtime").JSX.Element;
|
|
43
49
|
export default RichListRow;
|
|
@@ -20,7 +20,7 @@ function contentSlotAlignClass(align) {
|
|
|
20
20
|
return __WEBPACK_EXTERNAL_MODULE__RichListRow_module_js_3bb1d324__["default"].contentSlotStart;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
const RichListRow = ({ row, table, groupEntry, enableRowSelection, href, onClick, normalizedLeadingSlots, normalizedPrimary, normalizedSecondary, mainSlotMaxWidthPx, normalizedContentSlots, normalizedTrailingSlots, isCompactContentSlots, rowMainHidesContentSlotColumns, contentSlotsJustifyContent, actionsForRow, lastSelectedRowRef })=>{
|
|
23
|
+
const RichListRow = ({ row, table, groupEntry, enableRowSelection, href, onClick, normalizedLeadingSlots, normalizedPrimary, normalizedSecondary, mainSlotMaxWidthPx, shouldFillMainSlot, normalizedContentSlots, normalizedTrailingSlots, isCompactContentSlots, rowMainHidesContentSlotColumns, contentSlotsJustifyContent, actionsForRow, lastSelectedRowRef })=>{
|
|
24
24
|
const { Link } = (0, __WEBPACK_EXTERNAL_MODULE__utils_useNextContext_js_c6ca8eb1__["default"])();
|
|
25
25
|
const rowOriginal = row.original;
|
|
26
26
|
const hrefValue = href ? href(rowOriginal) : void 0;
|
|
@@ -113,6 +113,7 @@ const RichListRow = ({ row, table, groupEntry, enableRowSelection, href, onClick
|
|
|
113
113
|
const rowMainStyle = void 0 !== mainSlotMaxWidthPx ? {
|
|
114
114
|
["--richlist-primary-track"]: `${mainSlotMaxWidthPx}px`
|
|
115
115
|
} : void 0;
|
|
116
|
+
const shouldFillMainSlotColumn = shouldFillMainSlot && void 0 === mainSlotMaxWidthPx && !rowMainHidesContentSlotColumns;
|
|
116
117
|
const rowOverlay = hrefValue ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Link, {
|
|
117
118
|
className: __WEBPACK_EXTERNAL_MODULE__RichListRow_module_js_3bb1d324__["default"].rowLink,
|
|
118
119
|
href: hrefValue,
|
|
@@ -177,7 +178,7 @@ const RichListRow = ({ row, table, groupEntry, enableRowSelection, href, onClick
|
|
|
177
178
|
children: slot.render(rowOriginal)
|
|
178
179
|
}, slot.id)),
|
|
179
180
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
180
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE_clsx__["default"])(__WEBPACK_EXTERNAL_MODULE__RichListRow_module_js_3bb1d324__["default"].rowMain, rowMainHidesContentSlotColumns && __WEBPACK_EXTERNAL_MODULE__RichListRow_module_js_3bb1d324__["default"].rowMainCompact),
|
|
181
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE_clsx__["default"])(__WEBPACK_EXTERNAL_MODULE__RichListRow_module_js_3bb1d324__["default"].rowMain, rowMainHidesContentSlotColumns && __WEBPACK_EXTERNAL_MODULE__RichListRow_module_js_3bb1d324__["default"].rowMainCompact, shouldFillMainSlotColumn && __WEBPACK_EXTERNAL_MODULE__RichListRow_module_js_3bb1d324__["default"].rowMainFill),
|
|
181
182
|
style: rowMainStyle,
|
|
182
183
|
children: [
|
|
183
184
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
@@ -18,6 +18,7 @@ const RichListRow_module_rslib_entry_ = {
|
|
|
18
18
|
checkboxLaneActive: "checkboxLaneActive-SAAKUd",
|
|
19
19
|
slotCell: "slotCell-nFtJJc",
|
|
20
20
|
rowMainCompact: "rowMainCompact-FP1jUy",
|
|
21
|
+
rowMainFill: "rowMainFill-qeFQ1h",
|
|
21
22
|
mainSlot: "mainSlot-G9ZgMV",
|
|
22
23
|
contentSlots: "contentSlots-_4Kf6I",
|
|
23
24
|
contentSlotFixed: "contentSlotFixed-Saogio",
|
|
@@ -38,12 +38,14 @@
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.listHeader-LmUwi0 {
|
|
41
|
-
border-bottom: solid var(--size-n5) var(--color-grey-
|
|
41
|
+
border-bottom: solid var(--size-n5) var(--color-grey-t08);
|
|
42
42
|
box-sizing: border-box;
|
|
43
|
-
|
|
44
|
-
padding
|
|
43
|
+
min-height: var(--row-height);
|
|
44
|
+
padding: var(--size-00);
|
|
45
45
|
flex-shrink: 0;
|
|
46
|
+
align-items: center;
|
|
46
47
|
width: 100%;
|
|
48
|
+
display: grid;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
.toolbarStatus-OBimHB {
|
|
@@ -127,6 +127,23 @@ export type RichListMainSlot<Type> = {
|
|
|
127
127
|
* Omit to let the layout choose a width (see `RichListRow` / grid track fallback).
|
|
128
128
|
*/
|
|
129
129
|
size?: number;
|
|
130
|
+
/**
|
|
131
|
+
* When `true`, the main slot column **grows to absorb the row's leftover width** instead
|
|
132
|
+
* of being capped — the main slot takes `1fr` while the content track sizes to its content,
|
|
133
|
+
* so the main slot only truncates when it runs out of room.
|
|
134
|
+
*
|
|
135
|
+
* To keep the columns aligned across rows, pair this with:
|
|
136
|
+
* - **fixed-size content slots**, so the `auto` content track (which lives inside the main
|
|
137
|
+
* grid) stays a constant width; and
|
|
138
|
+
* - **fixed-size trailing slots**, so the row's leftover width — the `1fr` the main slot
|
|
139
|
+
* absorbs — is constant. (Trailing slots sit outside the main grid in the outer row flex,
|
|
140
|
+
* so they affect the leftover width rather than the content track.)
|
|
141
|
+
*
|
|
142
|
+
* Ignored when `size` is set (an explicit cap takes precedence), and in the compact
|
|
143
|
+
* (single-track) layout.
|
|
144
|
+
* @default `false`
|
|
145
|
+
*/
|
|
146
|
+
fill?: boolean;
|
|
130
147
|
};
|
|
131
148
|
/**
|
|
132
149
|
* Common fields shared by leading, content (`contentSlots`), and trailing slots in
|