@worknice/whiteboard 0.56.0 → 0.58.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
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worknice/whiteboard",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.58.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"files": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"react-markdown": "^10.1.0",
|
|
40
40
|
"utf8": "^3.0.0",
|
|
41
41
|
"zod": "^4.1.13",
|
|
42
|
-
"@worknice/utils": "^0.
|
|
42
|
+
"@worknice/utils": "^0.41.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@anolilab/semantic-release-pnpm": "^3.2.2",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
type Props = {
|
|
3
|
-
id: string;
|
|
4
|
-
size?: keyof typeof SIZES;
|
|
5
|
-
name: string;
|
|
6
|
-
imageUrl?: string | null;
|
|
7
|
-
children?: (onClose: () => void) => ReactNode;
|
|
8
|
-
hue: string;
|
|
9
|
-
};
|
|
10
|
-
declare const SIZES: {
|
|
11
|
-
xtiny: number;
|
|
12
|
-
tiny: number;
|
|
13
|
-
small: number;
|
|
14
|
-
large: number;
|
|
15
|
-
xlarge: number;
|
|
16
|
-
};
|
|
17
|
-
declare const PersonAvatar: ({ id, size, name, imageUrl, children, hue }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export default PersonAvatar;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
4
|
-
const SIZES = {
|
|
5
|
-
xtiny: 16,
|
|
6
|
-
tiny: 24,
|
|
7
|
-
small: 48,
|
|
8
|
-
large: 96,
|
|
9
|
-
xlarge: 192
|
|
10
|
-
};
|
|
11
|
-
const getInitials = (name)=>{
|
|
12
|
-
const names = name.trim().split(/[\s-]+/);
|
|
13
|
-
return names.length <= 3 ? names.map((name)=>[
|
|
14
|
-
...name
|
|
15
|
-
][0]).join("") : [
|
|
16
|
-
...names[0]
|
|
17
|
-
][0] + [
|
|
18
|
-
...names[names.length - 1]
|
|
19
|
-
][0];
|
|
20
|
-
};
|
|
21
|
-
const PersonAvatar = ({ id, size = "large", name, imageUrl, children, hue })=>{
|
|
22
|
-
const [showProfile, setShowProfile] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
|
|
23
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
|
|
24
|
-
children: [
|
|
25
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", {
|
|
26
|
-
style: {
|
|
27
|
-
cursor: children ? "pointer" : "inherit"
|
|
28
|
-
},
|
|
29
|
-
width: SIZES[size],
|
|
30
|
-
height: SIZES[size],
|
|
31
|
-
viewBox: "0 0 96 96",
|
|
32
|
-
onClick: children ? ()=>{
|
|
33
|
-
setShowProfile(true);
|
|
34
|
-
} : void 0,
|
|
35
|
-
children: imageUrl ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
|
|
36
|
-
children: [
|
|
37
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("defs", {
|
|
38
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("pattern", {
|
|
39
|
-
id: `${id}-pattern`,
|
|
40
|
-
patternUnits: "userSpaceOnUse",
|
|
41
|
-
width: "96",
|
|
42
|
-
height: "96",
|
|
43
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("image", {
|
|
44
|
-
href: imageUrl,
|
|
45
|
-
height: "96",
|
|
46
|
-
width: "96",
|
|
47
|
-
preserveAspectRatio: "xMidYMid slice"
|
|
48
|
-
})
|
|
49
|
-
})
|
|
50
|
-
}),
|
|
51
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("circle", {
|
|
52
|
-
cx: "48",
|
|
53
|
-
cy: "48",
|
|
54
|
-
r: "48",
|
|
55
|
-
fill: "none"
|
|
56
|
-
}),
|
|
57
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("circle", {
|
|
58
|
-
cx: "48",
|
|
59
|
-
cy: "48",
|
|
60
|
-
r: "48",
|
|
61
|
-
fill: `url(#${id}-pattern)`
|
|
62
|
-
})
|
|
63
|
-
]
|
|
64
|
-
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
|
|
65
|
-
children: [
|
|
66
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("circle", {
|
|
67
|
-
cx: "48",
|
|
68
|
-
cy: "48",
|
|
69
|
-
r: "48",
|
|
70
|
-
fill: `oklch(67.4% 0.1215 ${hue})`
|
|
71
|
-
}),
|
|
72
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("text", {
|
|
73
|
-
fill: "#fff",
|
|
74
|
-
x: 48,
|
|
75
|
-
y: 62,
|
|
76
|
-
fontSize: 36,
|
|
77
|
-
textAnchor: "middle",
|
|
78
|
-
children: getInitials(name)
|
|
79
|
-
})
|
|
80
|
-
]
|
|
81
|
-
})
|
|
82
|
-
}),
|
|
83
|
-
showProfile && children ? children(()=>{
|
|
84
|
-
setShowProfile(false);
|
|
85
|
-
}) : null
|
|
86
|
-
]
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
const PersonAvatar_rslib_entry_ = PersonAvatar;
|
|
90
|
-
export { PersonAvatar_rslib_entry_ as default };
|