@worknice/whiteboard 0.56.0 → 0.57.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/controls/ButtonCard.stories.js +2 -2
- package/dist/icons/ArrowTurnLeftUpIcon.d.ts +3 -0
- package/dist/icons/ArrowTurnLeftUpIcon.js +12 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +2 -1
- package/dist/layouts/FullLayout.js +5 -2
- package/dist/presentation/Avatar.d.ts +41 -6
- package/dist/presentation/Avatar.js +206 -20
- package/dist/presentation/Avatar.module.js +10 -1
- package/dist/presentation/Avatar.stories.d.ts +63 -0
- package/dist/presentation/Avatar.stories.js +94 -0
- package/dist/presentation/Avatar_module.css +123 -7
- package/dist/presentation/Logo.d.ts +8 -0
- package/dist/presentation/Logo.js +27 -0
- package/dist/presentation/Logo.module.js +5 -0
- package/dist/presentation/Logo.stories.d.ts +22 -0
- package/dist/presentation/Logo.stories.js +24 -0
- package/dist/presentation/Logo_module.css +10 -0
- package/dist/presentation/PersonCover.d.ts +2 -2
- package/dist/presentation/PersonCover.js +2 -2
- package/dist/presentation/PersonCover.stories.d.ts +67 -0
- package/dist/presentation/PersonCover.stories.js +39 -0
- package/dist/presentation/RichList/RichList.js +11 -1
- package/dist/presentation/RichList/RichListRow.js +16 -3
- package/dist/presentation/RichList/stories/ComplianceGroups.js +21 -1
- package/dist/presentation/RichList/stories/CustomFields.js +1 -0
- package/dist/presentation/RichList/stories/EmployeePeople.js +20 -18
- package/dist/presentation/RichList/stories/Leave.js +23 -23
- package/dist/presentation/RichList/stories/Paperwork.js +18 -18
- package/dist/presentation/RichList/stories/PaperworkApprovals.js +52 -50
- package/dist/presentation/RichList/stories/PeopleList.js +19 -19
- package/dist/presentation/RichList/stories/PeopleTags.js +1 -0
- package/dist/presentation/RichList/stories/Positions.js +53 -53
- package/dist/presentation/RichList/stories/Reviews.js +11 -11
- package/dist/presentation/RichList/stories/SavedQuestions.js +1 -0
- package/dist/presentation/RichList/stories/Tasks.js +34 -34
- package/dist/presentation/RichList/stories/shared.d.ts +0 -1
- package/dist/presentation/RichList/stories/shared.js +0 -2
- package/dist/presentation/RichList/types.d.ts +7 -2
- package/dist/utils/storybook.d.ts +2 -0
- package/dist/utils/storybook.js +2 -1
- package/package.json +2 -2
- package/dist/presentation/PersonAvatar.d.ts +0 -18
- package/dist/presentation/PersonAvatar.js +0 -90
|
@@ -1,10 +1,126 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
.root-EiaKry {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
height: var(--avatar-size);
|
|
4
|
+
vertical-align: middle;
|
|
5
|
+
width: var(--avatar-size);
|
|
6
|
+
flex-shrink: 0;
|
|
7
|
+
line-height: 0;
|
|
8
|
+
display: inline-block;
|
|
9
|
+
position: relative;
|
|
8
10
|
overflow: hidden;
|
|
9
11
|
}
|
|
10
12
|
|
|
13
|
+
.media-wRrTVs {
|
|
14
|
+
color: inherit;
|
|
15
|
+
border-radius: 50%;
|
|
16
|
+
line-height: 0;
|
|
17
|
+
text-decoration: none;
|
|
18
|
+
display: block;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.mediaInteractive-dZHNzy {
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
font: inherit;
|
|
25
|
+
text-align: inherit;
|
|
26
|
+
background: none;
|
|
27
|
+
border: none;
|
|
28
|
+
padding: 0;
|
|
29
|
+
position: relative;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.mediaInteractive-dZHNzy:after {
|
|
33
|
+
box-shadow: inset 0 0 0 2px var(--tone-primary);
|
|
34
|
+
content: "";
|
|
35
|
+
opacity: 0;
|
|
36
|
+
pointer-events: none;
|
|
37
|
+
z-index: 1;
|
|
38
|
+
border-radius: 50%;
|
|
39
|
+
transition: opacity .12s;
|
|
40
|
+
position: absolute;
|
|
41
|
+
inset: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.mediaInteractive-dZHNzy:hover:after, .mediaInteractive-dZHNzy:focus-visible:after {
|
|
45
|
+
opacity: 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.mediaInteractive-dZHNzy:focus-visible {
|
|
49
|
+
outline: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.avatarInner-IL2fkD {
|
|
53
|
+
line-height: 0;
|
|
54
|
+
display: inline-block;
|
|
55
|
+
position: relative;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.svg-ffgue0 {
|
|
59
|
+
display: block;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.placeholderIconWrap-i2HHwu {
|
|
63
|
+
pointer-events: none;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
align-items: center;
|
|
66
|
+
display: flex;
|
|
67
|
+
position: absolute;
|
|
68
|
+
inset: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.badge-f6Iksi {
|
|
72
|
+
background: var(--color-grey-t08);
|
|
73
|
+
border: 2px solid var(--color-white);
|
|
74
|
+
box-sizing: border-box;
|
|
75
|
+
height: max(14px, calc(var(--avatar-size) * .31));
|
|
76
|
+
pointer-events: none;
|
|
77
|
+
width: max(14px, calc(var(--avatar-size) * .31));
|
|
78
|
+
border-radius: 50%;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
align-items: center;
|
|
81
|
+
display: flex;
|
|
82
|
+
position: absolute;
|
|
83
|
+
bottom: 0;
|
|
84
|
+
right: 0;
|
|
85
|
+
transform: translateX(8%);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.badgeGlyph-hnwtyd {
|
|
89
|
+
transform-origin: center;
|
|
90
|
+
line-height: 0;
|
|
91
|
+
display: inline-flex;
|
|
92
|
+
transform: scale(.87);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.hoverIconOverlay-VNqOuN {
|
|
96
|
+
background: color-mix(in oklch, var(--color-grey-s04) 35%, transparent);
|
|
97
|
+
color: var(--color-white);
|
|
98
|
+
opacity: 0;
|
|
99
|
+
pointer-events: none;
|
|
100
|
+
border-radius: 50%;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
align-items: center;
|
|
103
|
+
transition: opacity .15s;
|
|
104
|
+
display: flex;
|
|
105
|
+
position: absolute;
|
|
106
|
+
inset: 0;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.hoverIconScaled-hPDNBn {
|
|
111
|
+
transform-origin: center;
|
|
112
|
+
line-height: 0;
|
|
113
|
+
display: inline-flex;
|
|
114
|
+
transform: scale(1.5);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.root-EiaKry:hover .hoverIconOverlay-VNqOuN {
|
|
118
|
+
opacity: 1;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@media (prefers-reduced-motion: reduce) {
|
|
122
|
+
.hoverIconOverlay-VNqOuN, .mediaInteractive-dZHNzy:after {
|
|
123
|
+
transition: none;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
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__utils_useNextContext_js_47529181__ from "../utils/useNextContext.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Logo_module_js_d7038cf3__ from "./Logo.module.js";
|
|
5
|
+
const Logo = ({ src, width = 48, height = 48, alt })=>{
|
|
6
|
+
const { Image } = (0, __WEBPACK_EXTERNAL_MODULE__utils_useNextContext_js_47529181__["default"])();
|
|
7
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
8
|
+
className: __WEBPACK_EXTERNAL_MODULE__Logo_module_js_d7038cf3__["default"].container,
|
|
9
|
+
style: (0, __WEBPACK_EXTERNAL_MODULE__utils_customProperties_js_aeb40bdf__["default"])({
|
|
10
|
+
"--height": `${height}px`,
|
|
11
|
+
"--width": `${width}px`
|
|
12
|
+
}),
|
|
13
|
+
children: src ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Image, {
|
|
14
|
+
alt: alt ?? "",
|
|
15
|
+
height: height,
|
|
16
|
+
quality: 100,
|
|
17
|
+
src: src,
|
|
18
|
+
style: {
|
|
19
|
+
width,
|
|
20
|
+
height
|
|
21
|
+
},
|
|
22
|
+
width: width
|
|
23
|
+
}) : null
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
const Logo_rslib_entry_ = Logo;
|
|
27
|
+
export { Logo_rslib_entry_ as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/nextjs-vite";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
component: ({ src, width, height, alt }: {
|
|
4
|
+
alt?: string;
|
|
5
|
+
height?: number;
|
|
6
|
+
src?: string;
|
|
7
|
+
width?: number;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
args: {
|
|
10
|
+
alt: string;
|
|
11
|
+
height: number;
|
|
12
|
+
src: string;
|
|
13
|
+
width: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
/** Framed square logo area with an image (`<img>` in Storybook via `NextContext`). */
|
|
19
|
+
export declare const WithImage: Story;
|
|
20
|
+
/** Empty frame when `src` is omitted (for example a missing org logo). */
|
|
21
|
+
export declare const Placeholder: Story;
|
|
22
|
+
export declare const Large: Story;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Logo_js_fd146899__ from "./Logo.js";
|
|
2
|
+
const meta = {
|
|
3
|
+
component: __WEBPACK_EXTERNAL_MODULE__Logo_js_fd146899__["default"],
|
|
4
|
+
args: {
|
|
5
|
+
alt: "Logo",
|
|
6
|
+
height: 48,
|
|
7
|
+
src: "/worknice-logo.png",
|
|
8
|
+
width: 48
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const Logo_stories_rslib_entry_ = meta;
|
|
12
|
+
const WithImage = {};
|
|
13
|
+
const Placeholder = {
|
|
14
|
+
args: {
|
|
15
|
+
src: void 0
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const Large = {
|
|
19
|
+
args: {
|
|
20
|
+
height: 80,
|
|
21
|
+
width: 80
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export { Large, Placeholder, WithImage, Logo_stories_rslib_entry_ as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
.container-R9ljQG {
|
|
2
|
+
background: var(--color-grey-t09);
|
|
3
|
+
border-radius: var(--size-n2);
|
|
4
|
+
height: var(--height);
|
|
5
|
+
outline-offset: -1px;
|
|
6
|
+
outline: var(--size-n5) solid color-mix(in oklch, var(--color-grey-s04) 10%, transparent);
|
|
7
|
+
width: var(--width);
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from "react";
|
|
2
|
-
import
|
|
3
|
-
type Props = ComponentProps<typeof
|
|
2
|
+
import Avatar from "./Avatar";
|
|
3
|
+
type Props = ComponentProps<typeof Avatar>;
|
|
4
4
|
declare const PersonCover: ({ id, size, name, imageUrl, hue }: Omit<Props, "children">) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export default PersonCover;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Avatar_js_7e0bab6d__ from "./Avatar.js";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE__PersonCover_module_js_e0f8db03__ from "./PersonCover.module.js";
|
|
4
4
|
const PersonCover = ({ id, size = "xlarge", name, imageUrl, hue })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
5
5
|
className: __WEBPACK_EXTERNAL_MODULE__PersonCover_module_js_e0f8db03__["default"].container,
|
|
@@ -17,7 +17,7 @@ const PersonCover = ({ id, size = "xlarge", name, imageUrl, hue })=>/*#__PURE__*
|
|
|
17
17
|
}),
|
|
18
18
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
19
19
|
className: __WEBPACK_EXTERNAL_MODULE__PersonCover_module_js_e0f8db03__["default"].avatarContainer,
|
|
20
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
20
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Avatar_js_7e0bab6d__["default"], {
|
|
21
21
|
id: id,
|
|
22
22
|
size: size,
|
|
23
23
|
name: name,
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/nextjs-vite";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
component: ({ id, size, name, imageUrl, hue }: Omit<({
|
|
4
|
+
id: string;
|
|
5
|
+
size?: "small" | "large" | "xlarge" | "tiny" | "xtiny";
|
|
6
|
+
name?: string;
|
|
7
|
+
imageUrl?: string | null;
|
|
8
|
+
hue?: string;
|
|
9
|
+
badgeIcon?: import("./Avatar").IconSymbol;
|
|
10
|
+
hoverIcon?: import("./Avatar").IconSymbol;
|
|
11
|
+
onClick?: (event: import("react").MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
|
|
12
|
+
} & {
|
|
13
|
+
href: string;
|
|
14
|
+
children?: never;
|
|
15
|
+
}) | ({
|
|
16
|
+
id: string;
|
|
17
|
+
size?: "small" | "large" | "xlarge" | "tiny" | "xtiny";
|
|
18
|
+
name?: string;
|
|
19
|
+
imageUrl?: string | null;
|
|
20
|
+
hue?: string;
|
|
21
|
+
badgeIcon?: import("./Avatar").IconSymbol;
|
|
22
|
+
hoverIcon?: import("./Avatar").IconSymbol;
|
|
23
|
+
onClick?: (event: import("react").MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
|
|
24
|
+
} & {
|
|
25
|
+
href?: never;
|
|
26
|
+
children: (onClose: () => void) => import("react").ReactNode;
|
|
27
|
+
}) | ({
|
|
28
|
+
id: string;
|
|
29
|
+
size?: "small" | "large" | "xlarge" | "tiny" | "xtiny";
|
|
30
|
+
name?: string;
|
|
31
|
+
imageUrl?: string | null;
|
|
32
|
+
hue?: string;
|
|
33
|
+
badgeIcon?: import("./Avatar").IconSymbol;
|
|
34
|
+
hoverIcon?: import("./Avatar").IconSymbol;
|
|
35
|
+
onClick?: (event: import("react").MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
|
|
36
|
+
} & {
|
|
37
|
+
href?: never;
|
|
38
|
+
children?: never;
|
|
39
|
+
}), "children">) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
args: {
|
|
41
|
+
hue: string;
|
|
42
|
+
id: string;
|
|
43
|
+
imageUrl: string;
|
|
44
|
+
name: string;
|
|
45
|
+
size: "xlarge";
|
|
46
|
+
};
|
|
47
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/nextjs-vite").ReactRenderer, {
|
|
48
|
+
id: string;
|
|
49
|
+
size?: ("small" | "large" | "xlarge" | "tiny" | "xtiny") | undefined;
|
|
50
|
+
onClick?: ((event: import("react").MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
51
|
+
name?: string | undefined;
|
|
52
|
+
hue?: string | undefined;
|
|
53
|
+
href?: string | undefined;
|
|
54
|
+
imageUrl?: string | null | undefined;
|
|
55
|
+
badgeIcon?: import("./Avatar").IconSymbol | undefined;
|
|
56
|
+
hoverIcon?: import("./Avatar").IconSymbol | undefined;
|
|
57
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
58
|
+
parameters: {
|
|
59
|
+
layout: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export default meta;
|
|
63
|
+
type Story = StoryObj<typeof meta>;
|
|
64
|
+
/** Blurred photo behind the avatar, or gradient + initials when there is no photo. */
|
|
65
|
+
export declare const WithPhoto: Story;
|
|
66
|
+
export declare const GradientOnly: Story;
|
|
67
|
+
export declare const SmallAvatar: Story;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_3cc1ba9c__ from "../utils/storybook.js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__PersonCover_js_004529cf__ from "./PersonCover.js";
|
|
4
|
+
const meta = {
|
|
5
|
+
component: __WEBPACK_EXTERNAL_MODULE__PersonCover_js_004529cf__["default"],
|
|
6
|
+
args: {
|
|
7
|
+
hue: "280",
|
|
8
|
+
id: "person-cover-story",
|
|
9
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_3cc1ba9c__.avatarUrl)(12),
|
|
10
|
+
name: "Alex Morgan",
|
|
11
|
+
size: "xlarge"
|
|
12
|
+
},
|
|
13
|
+
decorators: [
|
|
14
|
+
(Story)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
15
|
+
style: {
|
|
16
|
+
margin: "0 auto",
|
|
17
|
+
maxWidth: 420,
|
|
18
|
+
width: "100%"
|
|
19
|
+
},
|
|
20
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Story, {})
|
|
21
|
+
})
|
|
22
|
+
],
|
|
23
|
+
parameters: {
|
|
24
|
+
layout: "padded"
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const PersonCover_stories_rslib_entry_ = meta;
|
|
28
|
+
const WithPhoto = {};
|
|
29
|
+
const GradientOnly = {
|
|
30
|
+
args: {
|
|
31
|
+
imageUrl: void 0
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const SmallAvatar = {
|
|
35
|
+
args: {
|
|
36
|
+
size: "large"
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
export { GradientOnly, SmallAvatar, WithPhoto, PersonCover_stories_rslib_entry_ as default };
|
|
@@ -52,7 +52,16 @@ const RichList = ({ data, getRowId, leadingSlot, mainSlot, contentSlots = [], co
|
|
|
52
52
|
const listScopeRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
53
53
|
const [isCompactContentSlots, setIsCompactContentSlots] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
|
|
54
54
|
const compactBreakpointPx = compactBreakpointProp ?? __WEBPACK_EXTERNAL_MODULE__helpers_js_87289b43__.RICH_LIST_CONTENT_COMPACT_MAX_PX;
|
|
55
|
+
const renderableContentSlots = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>contentSlots.filter((slot)=>{
|
|
56
|
+
if ("object" != typeof slot) return true;
|
|
57
|
+
if (!Object.hasOwn(slot, "hiddenByDefault") || !slot.hiddenByDefault) return true;
|
|
58
|
+
if (Object.hasOwn(slot, "canToggleVisibility") && !slot.canToggleVisibility) return true;
|
|
59
|
+
return false;
|
|
60
|
+
}), [
|
|
61
|
+
contentSlots
|
|
62
|
+
]);
|
|
55
63
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect)(()=>{
|
|
64
|
+
if (0 === renderableContentSlots.length) return;
|
|
56
65
|
const el = listScopeRef.current;
|
|
57
66
|
if (!el) return;
|
|
58
67
|
const update = ()=>{
|
|
@@ -64,6 +73,7 @@ const RichList = ({ data, getRowId, leadingSlot, mainSlot, contentSlots = [], co
|
|
|
64
73
|
ro.observe(el);
|
|
65
74
|
return ()=>ro.disconnect();
|
|
66
75
|
}, [
|
|
76
|
+
renderableContentSlots,
|
|
67
77
|
compactBreakpointPx
|
|
68
78
|
]);
|
|
69
79
|
const enableRowSelection = bulkActions.length + secondaryBulkActions.length > 0;
|
|
@@ -92,7 +102,7 @@ const RichList = ({ data, getRowId, leadingSlot, mainSlot, contentSlots = [], co
|
|
|
92
102
|
}, [
|
|
93
103
|
trailingSlot
|
|
94
104
|
]);
|
|
95
|
-
const rowMainHidesContentSlotColumns = isCompactContentSlots && !normalizedContentSlots.some((s)=>(0, __WEBPACK_EXTERNAL_MODULE__helpers_js_87289b43__.isVisibleAtBreakpoint)(s.layoutVisibility, true));
|
|
105
|
+
const rowMainHidesContentSlotColumns = 0 === renderableContentSlots.length || isCompactContentSlots && !normalizedContentSlots.some((s)=>(0, __WEBPACK_EXTERNAL_MODULE__helpers_js_87289b43__.isVisibleAtBreakpoint)(s.layoutVisibility, true));
|
|
96
106
|
const allEntries = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>[
|
|
97
107
|
...normalizedLeadingSlots,
|
|
98
108
|
normalizedPrimary,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_clsx__ from "clsx";
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE__controls_Button_js_2f50b64a__ from "../../controls/Button.js";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__controls_Disclosure_js_07249afc__ from "../../controls/Disclosure.js";
|
|
5
6
|
import * as __WEBPACK_EXTERNAL_MODULE__controls_MenuButton_js_fa7c5c89__ from "../../controls/MenuButton.js";
|
|
6
7
|
import * as __WEBPACK_EXTERNAL_MODULE__inputs_CheckboxInput_js_0c849015__ from "../../inputs/CheckboxInput.js";
|
|
7
8
|
import * as __WEBPACK_EXTERNAL_MODULE__utils_useNextContext_js_c6ca8eb1__ from "../../utils/useNextContext.js";
|
|
@@ -218,13 +219,20 @@ const RichListRow = ({ row, table, enableRowSelection, href, normalizedLeadingSl
|
|
|
218
219
|
className: __WEBPACK_EXTERNAL_MODULE__RichListRow_module_js_3bb1d324__["default"].actionsLane,
|
|
219
220
|
onClick: (event)=>event.stopPropagation(),
|
|
220
221
|
children: [
|
|
221
|
-
alwaysVisibleActions.map((action)
|
|
222
|
+
alwaysVisibleActions.map((action)=>"onClick" === action.type ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__controls_Button_js_2f50b64a__["default"], {
|
|
222
223
|
id: action.id,
|
|
223
224
|
type: "ghost",
|
|
224
225
|
size: "small",
|
|
225
226
|
icon: action.icon,
|
|
226
227
|
tooltip: action.label,
|
|
227
228
|
onClick: ()=>action.onClick(rowOriginal)
|
|
229
|
+
}, action.id) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__controls_Disclosure_js_07249afc__["default"], {
|
|
230
|
+
id: action.id,
|
|
231
|
+
type: "ghost",
|
|
232
|
+
size: "small",
|
|
233
|
+
icon: action.icon,
|
|
234
|
+
tooltip: action.label,
|
|
235
|
+
render: (onClose)=>action.render(onClose)
|
|
228
236
|
}, action.id)),
|
|
229
237
|
Array.from({
|
|
230
238
|
length: alwaysVisiblePlaceholderCount
|
|
@@ -252,8 +260,13 @@ const RichListRow = ({ row, table, enableRowSelection, href, normalizedLeadingSl
|
|
|
252
260
|
id: action.id,
|
|
253
261
|
label: action.label,
|
|
254
262
|
icon: action.icon,
|
|
255
|
-
|
|
256
|
-
|
|
263
|
+
..."onClick" === action.type ? {
|
|
264
|
+
onClick: ()=>action.onClick(rowOriginal),
|
|
265
|
+
type: "onClick"
|
|
266
|
+
} : {
|
|
267
|
+
render: (onClose)=>action.render(onClose),
|
|
268
|
+
type: "render"
|
|
269
|
+
}
|
|
257
270
|
})),
|
|
258
271
|
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_e5f9af80__["default"], {
|
|
259
272
|
symbol: "Overflow"
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Card_js_30fa518e__ from "../../Card.js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__CardContent_js_a2c43d68__ from "../../CardContent.js";
|
|
2
4
|
import * as __WEBPACK_EXTERNAL_MODULE__HStack_js_d2f77bae__ from "../../HStack.js";
|
|
3
5
|
import * as __WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__ from "../../Icon.js";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Modal_js_ddbcc46a__ from "../../Modal.js";
|
|
4
7
|
import * as __WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__ from "../../PlainText.js";
|
|
5
8
|
import * as __WEBPACK_EXTERNAL_MODULE__RichList_js_64f3f04c__ from "../RichList.js";
|
|
6
9
|
function requirementsLabel(n) {
|
|
@@ -73,7 +76,23 @@ const rowActions = ()=>[
|
|
|
73
76
|
symbol: "Visible"
|
|
74
77
|
}),
|
|
75
78
|
alwaysVisible: false,
|
|
76
|
-
|
|
79
|
+
type: "render",
|
|
80
|
+
render: (onClose)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Modal_js_ddbcc46a__["default"], {
|
|
81
|
+
onClose: onClose,
|
|
82
|
+
size: "small",
|
|
83
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Card_js_30fa518e__["default"], {
|
|
84
|
+
header: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
|
|
85
|
+
font: "h6",
|
|
86
|
+
tagName: "h6",
|
|
87
|
+
children: "View group"
|
|
88
|
+
}),
|
|
89
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__CardContent_js_a2c43d68__["default"], {
|
|
90
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
|
|
91
|
+
children: "This is a compliance group."
|
|
92
|
+
})
|
|
93
|
+
})
|
|
94
|
+
})
|
|
95
|
+
})
|
|
77
96
|
},
|
|
78
97
|
{
|
|
79
98
|
id: "edit",
|
|
@@ -82,6 +101,7 @@ const rowActions = ()=>[
|
|
|
82
101
|
symbol: "Edit"
|
|
83
102
|
}),
|
|
84
103
|
alwaysVisible: false,
|
|
104
|
+
type: "onClick",
|
|
85
105
|
onClick: ()=>void 0
|
|
86
106
|
}
|
|
87
107
|
];
|
|
@@ -1,99 +1,99 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__ from "../../../utils/storybook.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Avatar_js_1229b6e4__ from "../../Avatar.js";
|
|
3
5
|
import * as __WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__ from "../../Icon.js";
|
|
4
|
-
import * as __WEBPACK_EXTERNAL_MODULE__PersonAvatar_js_0117b3ba__ from "../../PersonAvatar.js";
|
|
5
6
|
import * as __WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__ from "../../PlainText.js";
|
|
6
7
|
import * as __WEBPACK_EXTERNAL_MODULE__RichList_js_64f3f04c__ from "../RichList.js";
|
|
7
|
-
import * as __WEBPACK_EXTERNAL_MODULE__shared_js_cc7b7cda__ from "./shared.js";
|
|
8
8
|
const employees = [
|
|
9
9
|
{
|
|
10
10
|
id: "e1",
|
|
11
11
|
name: "Sarah Jenkins",
|
|
12
|
-
imageUrl: (0,
|
|
12
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__.avatarUrl)(19),
|
|
13
13
|
line: "VP of Engineering at New York"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
id: "e2",
|
|
17
17
|
name: "David Miller",
|
|
18
|
-
imageUrl: (0,
|
|
18
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__.avatarUrl)(20),
|
|
19
19
|
line: "Product Manager at London"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
id: "e3",
|
|
23
23
|
name: "Emily Chen",
|
|
24
|
-
imageUrl: (0,
|
|
24
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__.avatarUrl)(21),
|
|
25
25
|
line: "Frontend Developer at Remote"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
id: "e4",
|
|
29
29
|
name: "James Washington",
|
|
30
|
-
imageUrl: (0,
|
|
30
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__.avatarUrl)(22),
|
|
31
31
|
line: "HR Specialist at Chicago"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
id: "e5",
|
|
35
35
|
name: "Priya Shah",
|
|
36
|
-
imageUrl: (0,
|
|
36
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__.avatarUrl)(23),
|
|
37
37
|
line: "Director of Finance at Sydney"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
id: "e6",
|
|
41
41
|
name: "Marcus Webb",
|
|
42
|
-
imageUrl: (0,
|
|
42
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__.avatarUrl)(24),
|
|
43
43
|
line: "Warehouse Lead at Melbourne"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
id: "e7",
|
|
47
47
|
name: "Nina Okonkwo",
|
|
48
|
-
imageUrl: (0,
|
|
48
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__.avatarUrl)(25),
|
|
49
49
|
line: "Legal Counsel at Head Office"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
id: "e8",
|
|
53
53
|
name: "Oliver Grant",
|
|
54
|
-
imageUrl: (0,
|
|
54
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__.avatarUrl)(26),
|
|
55
55
|
line: "Sales Manager at Remote"
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
id: "e9",
|
|
59
59
|
name: "Rachel Kim",
|
|
60
|
-
imageUrl: (0,
|
|
60
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__.avatarUrl)(27),
|
|
61
61
|
line: "UX Researcher at San Francisco"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
id: "e10",
|
|
65
65
|
name: "Samuel Ortiz",
|
|
66
|
-
imageUrl: (0,
|
|
66
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__.avatarUrl)(28),
|
|
67
67
|
line: "DevOps Engineer at Austin"
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
id: "e11",
|
|
71
71
|
name: "Tessa Bloom",
|
|
72
|
-
imageUrl: (0,
|
|
72
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__.avatarUrl)(29),
|
|
73
73
|
line: "Chief of Staff at Seattle"
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
id: "e12",
|
|
77
77
|
name: "Victor Ng",
|
|
78
|
-
imageUrl: (0,
|
|
78
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__.avatarUrl)(30),
|
|
79
79
|
line: "Data Analyst at Singapore"
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
id: "e13",
|
|
83
83
|
name: "Yuki Tanaka",
|
|
84
|
-
imageUrl: (0,
|
|
84
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__.avatarUrl)(31),
|
|
85
85
|
line: "Account Executive at Tokyo"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
id: "e14",
|
|
89
89
|
name: "Zara Ali",
|
|
90
|
-
imageUrl: (0,
|
|
90
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__.avatarUrl)(32),
|
|
91
91
|
line: "Customer Success at Dubai"
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
id: "e15",
|
|
95
95
|
name: "Ben Carter",
|
|
96
|
-
imageUrl: (0,
|
|
96
|
+
imageUrl: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_9566133d__.avatarUrl)(33),
|
|
97
97
|
line: "Facilities Coordinator at Manchester"
|
|
98
98
|
}
|
|
99
99
|
];
|
|
@@ -105,6 +105,7 @@ const rowActions = ()=>[
|
|
|
105
105
|
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__["default"], {
|
|
106
106
|
symbol: "Email"
|
|
107
107
|
}),
|
|
108
|
+
type: "onClick",
|
|
108
109
|
onClick: ()=>void 0
|
|
109
110
|
},
|
|
110
111
|
{
|
|
@@ -114,12 +115,13 @@ const rowActions = ()=>[
|
|
|
114
115
|
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__["default"], {
|
|
115
116
|
symbol: "Phone"
|
|
116
117
|
}),
|
|
118
|
+
type: "onClick",
|
|
117
119
|
onClick: ()=>void 0
|
|
118
120
|
}
|
|
119
121
|
];
|
|
120
122
|
const leadingSlot = {
|
|
121
123
|
id: "avatar",
|
|
122
|
-
render: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
124
|
+
render: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Avatar_js_1229b6e4__["default"], {
|
|
123
125
|
id: r.id,
|
|
124
126
|
name: r.name,
|
|
125
127
|
imageUrl: r.imageUrl,
|