@worknice/whiteboard 0.61.0 → 0.63.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.
Files changed (36) hide show
  1. package/dist/icons/components/ArrowsCompress.d.ts +5 -0
  2. package/dist/icons/components/ArrowsCompress.js +14 -0
  3. package/dist/icons/components/ArrowsExpand.d.ts +5 -0
  4. package/dist/icons/components/ArrowsExpand.js +14 -0
  5. package/dist/icons/components/FitView.d.ts +5 -0
  6. package/dist/icons/components/FitView.js +14 -0
  7. package/dist/icons/components/index.d.ts +3 -0
  8. package/dist/icons/components/index.js +7 -1
  9. package/dist/icons/svgs/ArrowsCompress.js +2 -0
  10. package/dist/icons/svgs/ArrowsExpand.js +2 -0
  11. package/dist/icons/svgs/FitView.js +2 -0
  12. package/dist/presentation/CustomizableTable/CustomizableTable.js +2 -1
  13. package/dist/presentation/RichList/RichList.d.ts +8 -2
  14. package/dist/presentation/RichList/RichList.js +43 -29
  15. package/dist/presentation/RichList/RichListDisplayModal.d.ts +11 -3
  16. package/dist/presentation/RichList/RichListDisplayModal.js +59 -6
  17. package/dist/presentation/RichList/RichListRow.d.ts +7 -4
  18. package/dist/presentation/RichList/RichListRow.js +42 -54
  19. package/dist/presentation/RichList/RichListRow.module.js +2 -1
  20. package/dist/presentation/RichList/RichListRow_module.css +23 -11
  21. package/dist/presentation/RichList/RichList_module.css +1 -0
  22. package/dist/presentation/RichList/helpers.d.ts +18 -2
  23. package/dist/presentation/RichList/helpers.js +14 -4
  24. package/dist/presentation/RichList/stories/EmployeePeople.d.ts +2 -0
  25. package/dist/presentation/RichList/stories/EmployeePeople.js +49 -17
  26. package/dist/presentation/RichList/stories/shared.d.ts +2 -1
  27. package/dist/presentation/RichList/types.d.ts +12 -0
  28. package/dist/presentation/SheetHeader_module.css +10 -0
  29. package/dist/presentation/TagSet.d.ts +7 -1
  30. package/dist/presentation/TagSet.js +70 -7
  31. package/dist/presentation/TagSet.module.js +2 -1
  32. package/dist/presentation/TagSet_module.css +10 -0
  33. package/dist/static/svg/ArrowsCompress.svg +3 -0
  34. package/dist/static/svg/ArrowsExpand.svg +3 -0
  35. package/dist/static/svg/FitView.svg +3 -0
  36. package/package.json +2 -2
@@ -1,18 +1,81 @@
1
+ "use client";
1
2
  import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
2
3
  import * as __WEBPACK_EXTERNAL_MODULE_clsx__ from "clsx";
3
4
  import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
5
+ import * as __WEBPACK_EXTERNAL_MODULE__controls_Button_js_f591ba2e__ from "../controls/Button.js";
6
+ import * as __WEBPACK_EXTERNAL_MODULE__icons_components_Close_js_7809217d__ from "../icons/components/Close.js";
7
+ import * as __WEBPACK_EXTERNAL_MODULE__Card_js_d67c086a__ from "./Card.js";
8
+ import * as __WEBPACK_EXTERNAL_MODULE__CardContent_js_20e3f6de__ from "./CardContent.js";
9
+ import * as __WEBPACK_EXTERNAL_MODULE__Modal_js_50f53bdf__ from "./Modal.js";
10
+ import * as __WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__ from "./PlainText.js";
4
11
  import * as __WEBPACK_EXTERNAL_MODULE__TagSet_module_js_d14b95cb__ from "./TagSet.module.js";
5
- const TagSet = ({ tags, direction = "row" })=>{
12
+ const TagSet = ({ tags, direction = "row", maxVisibleTags })=>{
13
+ const [isModalOpen, setIsModalOpen] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
6
14
  const nonNullTags = tags.filter((badge)=>null !== badge && void 0 !== badge.value && null !== badge.value);
7
- return nonNullTags.length > 0 ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
8
- className: (0, __WEBPACK_EXTERNAL_MODULE_clsx__["default"])([
9
- __WEBPACK_EXTERNAL_MODULE__TagSet_module_js_d14b95cb__["default"].container,
10
- "row" === direction ? __WEBPACK_EXTERNAL_MODULE__TagSet_module_js_d14b95cb__["default"].directionRow : __WEBPACK_EXTERNAL_MODULE__TagSet_module_js_d14b95cb__["default"].directionColumn
11
- ]),
15
+ if (0 === nonNullTags.length) return null;
16
+ const containerClassName = (0, __WEBPACK_EXTERNAL_MODULE_clsx__["default"])([
17
+ __WEBPACK_EXTERNAL_MODULE__TagSet_module_js_d14b95cb__["default"].container,
18
+ "row" === direction ? __WEBPACK_EXTERNAL_MODULE__TagSet_module_js_d14b95cb__["default"].directionRow : __WEBPACK_EXTERNAL_MODULE__TagSet_module_js_d14b95cb__["default"].directionColumn
19
+ ]);
20
+ const hiddenTagCount = void 0 === maxVisibleTags ? 0 : Math.max(nonNullTags.length - maxVisibleTags, 0);
21
+ if (0 === hiddenTagCount) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
22
+ className: containerClassName,
12
23
  children: nonNullTags.map(({ key, value })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_react__.Fragment, {
13
24
  children: value
14
25
  }, key))
15
- }) : null;
26
+ });
27
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
28
+ children: [
29
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("button", {
30
+ "aria-label": `Show all ${nonNullTags.length} tags`,
31
+ className: (0, __WEBPACK_EXTERNAL_MODULE_clsx__["default"])(containerClassName, __WEBPACK_EXTERNAL_MODULE__TagSet_module_js_d14b95cb__["default"].overflowTrigger),
32
+ onClick: (event)=>{
33
+ event.stopPropagation();
34
+ setIsModalOpen(true);
35
+ },
36
+ title: `Show all ${nonNullTags.length} tags`,
37
+ type: "button",
38
+ children: [
39
+ nonNullTags.slice(0, maxVisibleTags).map(({ key, value })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_react__.Fragment, {
40
+ children: value
41
+ }, key)),
42
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
43
+ font: "small-semibold",
44
+ children: [
45
+ "+",
46
+ hiddenTagCount
47
+ ]
48
+ })
49
+ ]
50
+ }),
51
+ isModalOpen ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Modal_js_50f53bdf__["default"], {
52
+ onClose: ()=>setIsModalOpen(false),
53
+ size: "small",
54
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Card_js_d67c086a__["default"], {
55
+ header: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
56
+ font: "h6",
57
+ children: "Tags"
58
+ }),
59
+ actions: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__controls_Button_js_f591ba2e__["default"], {
60
+ icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__icons_components_Close_js_7809217d__["default"], {}),
61
+ onClick: ()=>setIsModalOpen(false),
62
+ type: "ghost"
63
+ }),
64
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__CardContent_js_20e3f6de__["default"], {
65
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
66
+ className: (0, __WEBPACK_EXTERNAL_MODULE_clsx__["default"])([
67
+ __WEBPACK_EXTERNAL_MODULE__TagSet_module_js_d14b95cb__["default"].container,
68
+ __WEBPACK_EXTERNAL_MODULE__TagSet_module_js_d14b95cb__["default"].directionRow
69
+ ]),
70
+ children: nonNullTags.map(({ key, value })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_react__.Fragment, {
71
+ children: value
72
+ }, key))
73
+ })
74
+ })
75
+ })
76
+ }) : null
77
+ ]
78
+ });
16
79
  };
17
80
  const TagSet_rslib_entry_ = TagSet;
18
81
  export { TagSet_rslib_entry_ as default };
@@ -2,6 +2,7 @@ import "./TagSet_module.css";
2
2
  const TagSet_module_rslib_entry_ = {
3
3
  container: "container-L0HAwG",
4
4
  directionRow: "directionRow-gPULoA",
5
- directionColumn: "directionColumn-YfoXcq"
5
+ directionColumn: "directionColumn-YfoXcq",
6
+ overflowTrigger: "overflowTrigger-GgLKSJ"
6
7
  };
7
8
  export { TagSet_module_rslib_entry_ as default };
@@ -13,3 +13,13 @@
13
13
  flex-direction: column;
14
14
  }
15
15
 
16
+ .overflowTrigger-GgLKSJ {
17
+ cursor: pointer;
18
+ align-items: center;
19
+ }
20
+
21
+ .overflowTrigger-GgLKSJ:focus-visible {
22
+ border-radius: var(--size-n3);
23
+ box-shadow: 0px 0px 0px 2px var(--color-white), 0px 0px 0px 4px var(--color-purple-000);
24
+ }
25
+
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" fill="currentColor">
2
+ <path d="M553.5 121C562.9 111.6 562.9 96.4 553.5 87.1C544.1 77.8 528.9 77.7 519.6 87.1L384.6 222.1L384.6 136C384.6 122.7 373.9 112 360.6 112C347.3 112 336.6 122.7 336.6 136L336.6 280C336.6 293.3 347.3 304 360.6 304L504.6 304C517.9 304 528.6 293.3 528.6 280C528.6 266.7 517.9 256 504.6 256L418.5 256L553.5 121zM87.5 519C78.1 528.4 78.1 543.6 87.5 552.9C96.9 562.2 112.1 562.3 121.4 552.9L256.4 417.9L256.4 504C256.4 517.3 267.1 528 280.4 528C293.7 528 304.4 517.3 304.4 504L304.4 360C304.4 346.7 293.7 336 280.4 336L136.4 336C123.1 336 112.4 346.7 112.4 360C112.4 373.3 123.1 384 136.4 384L222.5 384L87.5 519z" />
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" fill="currentColor">
2
+ <path d="M359 247C349.6 256.4 349.6 271.6 359 280.9C368.4 290.2 383.6 290.3 392.9 280.9L527.9 145.9L527.9 232C527.9 245.3 538.6 256 551.9 256C565.2 256 575.9 245.3 575.9 232L575.9 88C575.9 74.7 565.2 64 551.9 64L408 64C394.7 64 384 74.7 384 88C384 101.3 394.7 112 408 112L494.1 112L359.1 247zM281 393C290.4 383.6 290.4 368.4 281 359.1C271.6 349.8 256.4 349.7 247.1 359.1L112 494.1L112 408C112 394.7 101.3 384 88 384C74.7 384 64 394.7 64 408L64 552C64 565.3 74.7 576 88 576L232 576C245.3 576 256 565.3 256 552C256 538.7 245.3 528 232 528L145.9 528L280.9 393z" />
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" fill="currentColor">
2
+ <path d="M232 96C245.3 96 256 106.7 256 120C256 133.3 245.3 144 232 144L144 144L144 232C144 245.3 133.3 256 120 256C106.7 256 96 245.3 96 232L96 120C96 106.7 106.7 96 120 96L232 96zM96 408C96 394.7 106.7 384 120 384C133.3 384 144 394.7 144 408L144 496L232 496C245.3 496 256 506.7 256 520C256 533.3 245.3 544 232 544L120 544C106.7 544 96 533.3 96 520L96 408zM520 96C533.3 96 544 106.7 544 120L544 232C544 245.3 533.3 256 520 256C506.7 256 496 245.3 496 232L496 144L408 144C394.7 144 384 133.3 384 120C384 106.7 394.7 96 408 96L520 96zM496 408C496 394.7 506.7 384 520 384C533.3 384 544 394.7 544 408L544 520C544 533.3 533.3 544 520 544L408 544C394.7 544 384 533.3 384 520C384 506.7 394.7 496 408 496L496 496L496 408z" />
3
+ </svg>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@worknice/whiteboard",
3
3
  "description": "",
4
- "version": "0.61.0",
4
+ "version": "0.63.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.44.0"
42
+ "@worknice/utils": "^0.46.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@anolilab/semantic-release-pnpm": "^3.2.2",