@coorpacademy/components 11.43.2 → 11.43.4

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 (129) hide show
  1. package/es/atom/radio-with-title/style.css +1 -0
  2. package/es/atom/tag/index.d.ts.map +1 -1
  3. package/es/atom/tag/index.js +4 -1
  4. package/es/atom/tag/index.js.map +1 -1
  5. package/es/atom/tag/style.css +21 -0
  6. package/es/molecule/assignment-status-tag/index.d.ts +2 -1
  7. package/es/molecule/assignment-status-tag/index.d.ts.map +1 -1
  8. package/es/molecule/assignment-status-tag/index.js +19 -5
  9. package/es/molecule/assignment-status-tag/index.js.map +1 -1
  10. package/es/molecule/assignment-status-tag/style.css +28 -0
  11. package/es/molecule/assignment-status-tag/types.d.ts +2 -0
  12. package/es/molecule/assignment-status-tag/types.d.ts.map +1 -1
  13. package/es/molecule/assignment-status-tag/types.js +1 -0
  14. package/es/molecule/assignment-status-tag/types.js.map +1 -1
  15. package/es/molecule/skills-chart-side-information-item/index.d.ts +3 -1
  16. package/es/molecule/skills-chart-side-information-item/index.d.ts.map +1 -1
  17. package/es/molecule/skills-chart-side-information-item/index.js +42 -24
  18. package/es/molecule/skills-chart-side-information-item/index.js.map +1 -1
  19. package/es/molecule/skills-chart-side-information-item/style.css +36 -3
  20. package/es/molecule/skills-chart-side-information-panel/index.d.ts +1 -0
  21. package/es/molecule/split-button/index.d.ts +22 -0
  22. package/es/molecule/split-button/index.d.ts.map +1 -0
  23. package/es/molecule/split-button/index.js +137 -0
  24. package/es/molecule/split-button/index.js.map +1 -0
  25. package/es/molecule/split-button/style.css +75 -0
  26. package/es/molecule/split-button/types.d.ts +39 -0
  27. package/es/molecule/split-button/types.d.ts.map +1 -0
  28. package/es/molecule/split-button/types.js +18 -0
  29. package/es/molecule/split-button/types.js.map +1 -0
  30. package/es/molecule/table/index.d.ts +1 -0
  31. package/es/molecule/table/index.d.ts.map +1 -1
  32. package/es/organism/assignment-edition/index.d.ts +1 -0
  33. package/es/organism/assignment-edition/index.d.ts.map +1 -1
  34. package/es/organism/assignment-edition/types.d.ts +1 -0
  35. package/es/organism/assignment-edition/types.d.ts.map +1 -1
  36. package/es/organism/brand-table/index.d.ts +2 -0
  37. package/es/organism/brand-table/index.d.ts.map +1 -1
  38. package/es/organism/brand-table/index.js +5 -3
  39. package/es/organism/brand-table/index.js.map +1 -1
  40. package/es/organism/content-selection-list/index.d.ts +1 -0
  41. package/es/organism/content-selection-list/index.d.ts.map +1 -1
  42. package/es/organism/content-selection-list/index.js +6 -2
  43. package/es/organism/content-selection-list/index.js.map +1 -1
  44. package/es/organism/content-selection-list/types.d.ts +2 -0
  45. package/es/organism/content-selection-list/types.d.ts.map +1 -1
  46. package/es/organism/content-selection-list/types.js +2 -1
  47. package/es/organism/content-selection-list/types.js.map +1 -1
  48. package/es/organism/header-with-actions/index.d.ts +8 -0
  49. package/es/organism/header-with-actions/index.d.ts.map +1 -1
  50. package/es/organism/header-with-actions/index.js +6 -1
  51. package/es/organism/header-with-actions/index.js.map +1 -1
  52. package/es/organism/header-with-actions/style.css +8 -0
  53. package/es/organism/header-with-actions/types.d.ts +10 -0
  54. package/es/organism/header-with-actions/types.d.ts.map +1 -1
  55. package/es/organism/header-with-actions/types.js +3 -1
  56. package/es/organism/header-with-actions/types.js.map +1 -1
  57. package/es/organism/list-item/index.js +1 -1
  58. package/es/organism/list-item/index.js.map +1 -1
  59. package/es/organism/skill-edition/index.d.ts +1 -0
  60. package/es/organism/skill-edition/index.d.ts.map +1 -1
  61. package/es/organism/skill-edition/types.d.ts +1 -0
  62. package/es/organism/skill-edition/types.d.ts.map +1 -1
  63. package/es/template/back-office/brand-update/index.d.ts +15 -0
  64. package/es/variables/assignment-tracking-colors.css +11 -0
  65. package/lib/atom/radio-with-title/style.css +1 -0
  66. package/lib/atom/tag/index.d.ts.map +1 -1
  67. package/lib/atom/tag/index.js +4 -1
  68. package/lib/atom/tag/index.js.map +1 -1
  69. package/lib/atom/tag/style.css +21 -0
  70. package/lib/molecule/assignment-status-tag/index.d.ts +2 -1
  71. package/lib/molecule/assignment-status-tag/index.d.ts.map +1 -1
  72. package/lib/molecule/assignment-status-tag/index.js +19 -5
  73. package/lib/molecule/assignment-status-tag/index.js.map +1 -1
  74. package/lib/molecule/assignment-status-tag/style.css +28 -0
  75. package/lib/molecule/assignment-status-tag/types.d.ts +2 -0
  76. package/lib/molecule/assignment-status-tag/types.d.ts.map +1 -1
  77. package/lib/molecule/assignment-status-tag/types.js +1 -0
  78. package/lib/molecule/assignment-status-tag/types.js.map +1 -1
  79. package/lib/molecule/skills-chart-side-information-item/index.d.ts +3 -1
  80. package/lib/molecule/skills-chart-side-information-item/index.d.ts.map +1 -1
  81. package/lib/molecule/skills-chart-side-information-item/index.js +42 -24
  82. package/lib/molecule/skills-chart-side-information-item/index.js.map +1 -1
  83. package/lib/molecule/skills-chart-side-information-item/style.css +36 -3
  84. package/lib/molecule/skills-chart-side-information-panel/index.d.ts +1 -0
  85. package/lib/molecule/split-button/index.d.ts +22 -0
  86. package/lib/molecule/split-button/index.d.ts.map +1 -0
  87. package/lib/molecule/split-button/index.js +144 -0
  88. package/lib/molecule/split-button/index.js.map +1 -0
  89. package/lib/molecule/split-button/style.css +75 -0
  90. package/lib/molecule/split-button/types.d.ts +39 -0
  91. package/lib/molecule/split-button/types.d.ts.map +1 -0
  92. package/lib/molecule/split-button/types.js +23 -0
  93. package/lib/molecule/split-button/types.js.map +1 -0
  94. package/lib/molecule/table/index.d.ts +1 -0
  95. package/lib/molecule/table/index.d.ts.map +1 -1
  96. package/lib/organism/assignment-edition/index.d.ts +1 -0
  97. package/lib/organism/assignment-edition/index.d.ts.map +1 -1
  98. package/lib/organism/assignment-edition/types.d.ts +1 -0
  99. package/lib/organism/assignment-edition/types.d.ts.map +1 -1
  100. package/lib/organism/brand-table/index.d.ts +2 -0
  101. package/lib/organism/brand-table/index.d.ts.map +1 -1
  102. package/lib/organism/brand-table/index.js +5 -3
  103. package/lib/organism/brand-table/index.js.map +1 -1
  104. package/lib/organism/content-selection-list/index.d.ts +1 -0
  105. package/lib/organism/content-selection-list/index.d.ts.map +1 -1
  106. package/lib/organism/content-selection-list/index.js +6 -2
  107. package/lib/organism/content-selection-list/index.js.map +1 -1
  108. package/lib/organism/content-selection-list/types.d.ts +2 -0
  109. package/lib/organism/content-selection-list/types.d.ts.map +1 -1
  110. package/lib/organism/content-selection-list/types.js +2 -1
  111. package/lib/organism/content-selection-list/types.js.map +1 -1
  112. package/lib/organism/header-with-actions/index.d.ts +8 -0
  113. package/lib/organism/header-with-actions/index.d.ts.map +1 -1
  114. package/lib/organism/header-with-actions/index.js +6 -1
  115. package/lib/organism/header-with-actions/index.js.map +1 -1
  116. package/lib/organism/header-with-actions/style.css +8 -0
  117. package/lib/organism/header-with-actions/types.d.ts +10 -0
  118. package/lib/organism/header-with-actions/types.d.ts.map +1 -1
  119. package/lib/organism/header-with-actions/types.js +3 -1
  120. package/lib/organism/header-with-actions/types.js.map +1 -1
  121. package/lib/organism/list-item/index.js +1 -1
  122. package/lib/organism/list-item/index.js.map +1 -1
  123. package/lib/organism/skill-edition/index.d.ts +1 -0
  124. package/lib/organism/skill-edition/index.d.ts.map +1 -1
  125. package/lib/organism/skill-edition/types.d.ts +1 -0
  126. package/lib/organism/skill-edition/types.d.ts.map +1 -1
  127. package/lib/template/back-office/brand-update/index.d.ts +15 -0
  128. package/lib/variables/assignment-tracking-colors.css +11 -0
  129. package/package.json +2 -2
@@ -0,0 +1,75 @@
1
+ @value colors: "../../variables/colors.css";
2
+ @value white, cm_primary_blue, cm_blue_600, cm_grey_100, cm_grey_200, cm_grey_700 from colors;
3
+
4
+ .root {
5
+ display: inline-flex;
6
+ position: relative;
7
+ align-items: stretch;
8
+ }
9
+
10
+ .primaryAction {
11
+ width: auto;
12
+ border-radius: 12px 0 0 12px;
13
+ white-space: nowrap;
14
+ }
15
+
16
+ .trigger {
17
+ width: 44px;
18
+ height: 44px;
19
+ border: 0;
20
+ border-left: 1px solid rgba(255, 255, 255, 0.45);
21
+ border-radius: 0 12px 12px 0;
22
+ background: cm_primary_blue;
23
+ color: white;
24
+ cursor: pointer;
25
+ }
26
+
27
+ .trigger:hover {
28
+ background: cm_blue_600;
29
+ }
30
+
31
+ .trigger:disabled {
32
+ opacity: 0.4;
33
+ cursor: not-allowed;
34
+ }
35
+
36
+ .secondary {
37
+ background: cm_grey_100;
38
+ border-left-color: cm_grey_200;
39
+ color: cm_grey_700;
40
+ }
41
+
42
+ .secondary:hover {
43
+ background: cm_grey_200;
44
+ }
45
+
46
+ .menu {
47
+ position: absolute;
48
+ top: 48px;
49
+ right: 0;
50
+ z-index: 99;
51
+ display: flex;
52
+ flex-direction: column;
53
+ min-width: 100%;
54
+ padding: 8px;
55
+ border-radius: 12px;
56
+ background: white;
57
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
58
+ }
59
+
60
+ .option {
61
+ padding: 10px 12px;
62
+ border: 0;
63
+ border-radius: 8px;
64
+ background: white;
65
+ color: cm_grey_700;
66
+ text-align: left;
67
+ white-space: nowrap;
68
+ cursor: pointer;
69
+ font-family: Gilroy;
70
+ font-size: 14px;
71
+ }
72
+
73
+ .option:hover, .option:focus {
74
+ background: cm_grey_100;
75
+ }
@@ -0,0 +1,39 @@
1
+ import PropTypes from 'prop-types';
2
+ export declare const menuPropTypes: PropTypes.Requireable<PropTypes.InferProps<{
3
+ ariaLabel: PropTypes.Validator<string>;
4
+ options: PropTypes.Validator<(PropTypes.InferProps<{
5
+ label: PropTypes.Validator<string>;
6
+ onClick: PropTypes.Validator<(...args: any[]) => any>;
7
+ }> | null | undefined)[]>;
8
+ }>>;
9
+ export declare const propTypes: {
10
+ type: PropTypes.Validator<string>;
11
+ label: PropTypes.Validator<string>;
12
+ onClick: PropTypes.Validator<(...args: any[]) => any>;
13
+ disabled: PropTypes.Requireable<boolean>;
14
+ iconName: PropTypes.Requireable<string>;
15
+ iconColor: PropTypes.Requireable<string>;
16
+ menu: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
17
+ ariaLabel: PropTypes.Validator<string>;
18
+ options: PropTypes.Validator<(PropTypes.InferProps<{
19
+ label: PropTypes.Validator<string>;
20
+ onClick: PropTypes.Validator<(...args: any[]) => any>;
21
+ }> | null | undefined)[]>;
22
+ }>>>;
23
+ };
24
+ export declare type SplitButtonProps = {
25
+ type: 'primary' | 'secondary';
26
+ label: string;
27
+ onClick: () => void;
28
+ disabled?: boolean;
29
+ iconName?: string;
30
+ iconColor?: string;
31
+ menu: {
32
+ ariaLabel: string;
33
+ options: Array<{
34
+ label: string;
35
+ onClick: () => void;
36
+ }>;
37
+ };
38
+ };
39
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/split-button/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,eAAO,MAAM,aAAa;;;;;;GAKxB,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;CAQrB,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,EAAE,SAAS,GAAG,WAAW,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,KAAK,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,IAAI,CAAA;SAAC,CAAC,CAAA;KAAC,CAAC;CACjF,CAAC"}
@@ -0,0 +1,18 @@
1
+ import PropTypes from 'prop-types';
2
+ export const menuPropTypes = PropTypes.shape({
3
+ ariaLabel: PropTypes.string.isRequired,
4
+ options: PropTypes.arrayOf(PropTypes.shape({
5
+ label: PropTypes.string.isRequired,
6
+ onClick: PropTypes.func.isRequired
7
+ })).isRequired
8
+ });
9
+ export const propTypes = {
10
+ type: PropTypes.oneOf(['primary', 'secondary']).isRequired,
11
+ label: PropTypes.string.isRequired,
12
+ onClick: PropTypes.func.isRequired,
13
+ disabled: PropTypes.bool,
14
+ iconName: PropTypes.string,
15
+ iconColor: PropTypes.string,
16
+ menu: menuPropTypes.isRequired
17
+ };
18
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":["PropTypes","menuPropTypes","shape","ariaLabel","string","isRequired","options","arrayOf","label","onClick","func","propTypes","type","oneOf","disabled","bool","iconName","iconColor","menu"],"sources":["../../../src/molecule/split-button/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nexport const menuPropTypes = PropTypes.shape({\n ariaLabel: PropTypes.string.isRequired,\n options: PropTypes.arrayOf(\n PropTypes.shape({label: PropTypes.string.isRequired, onClick: PropTypes.func.isRequired})\n ).isRequired\n});\n\nexport const propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary']).isRequired,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n iconName: PropTypes.string,\n iconColor: PropTypes.string,\n menu: menuPropTypes.isRequired\n};\n\nexport type SplitButtonProps = {\n type: 'primary' | 'secondary';\n label: string;\n onClick: () => void;\n disabled?: boolean;\n iconName?: string;\n iconColor?: string;\n menu: {ariaLabel: string; options: Array<{label: string; onClick: () => void}>};\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,OAAO,MAAMC,aAAa,GAAGD,SAAS,CAACE,KAAK,CAAC;EAC3CC,SAAS,EAAEH,SAAS,CAACI,MAAM,CAACC,UAAU;EACtCC,OAAO,EAAEN,SAAS,CAACO,OAAO,CACxBP,SAAS,CAACE,KAAK,CAAC;IAACM,KAAK,EAAER,SAAS,CAACI,MAAM,CAACC,UAAU;IAAEI,OAAO,EAAET,SAAS,CAACU,IAAI,CAACL;EAAU,CAAC,CAC1F,CAAC,CAACA;AACJ,CAAC,CAAC;AAEF,OAAO,MAAMM,SAAS,GAAG;EACvBC,IAAI,EAAEZ,SAAS,CAACa,KAAK,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAACR,UAAU;EAC1DG,KAAK,EAAER,SAAS,CAACI,MAAM,CAACC,UAAU;EAClCI,OAAO,EAAET,SAAS,CAACU,IAAI,CAACL,UAAU;EAClCS,QAAQ,EAAEd,SAAS,CAACe,IAAI;EACxBC,QAAQ,EAAEhB,SAAS,CAACI,MAAM;EAC1Ba,SAAS,EAAEjB,SAAS,CAACI,MAAM;EAC3Bc,IAAI,EAAEjB,aAAa,CAACI;AACtB,CAAC","ignoreList":[]}
@@ -55,6 +55,7 @@ declare namespace Table {
55
55
  text: PropTypes.Requireable<string>;
56
56
  tags: PropTypes.Requireable<(PropTypes.InferProps<{
57
57
  status: PropTypes.Requireable<string>;
58
+ palette: PropTypes.Requireable<string>;
58
59
  label: PropTypes.Validator<string>;
59
60
  }> | null | undefined)[]>;
60
61
  }> | null | undefined> | null | undefined)[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/table/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA2OA,8DA+KC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOD;;;;;IAKG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/table/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA2OA,8DA+KC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOD;;;;;IAKG"}
@@ -204,6 +204,7 @@ declare const AssignmentEdition: {
204
204
  tags: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
205
205
  label: import("prop-types").Validator<string>;
206
206
  iconName: import("prop-types").Validator<string>;
207
+ level: import("prop-types").Requireable<string>;
207
208
  }>>>;
208
209
  checkbox: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
209
210
  checked: import("prop-types").Validator<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/assignment-edition/index.tsx"],"names":[],"mappings":";AASA,OAAO,EAAC,sBAAsB,EAAY,MAAM,SAAS,CAAC;AAG1D,YAAY,EAAC,sBAAsB,EAAE,6BAA6B,EAAC,MAAM,SAAS,CAAC;AAEnF,QAAA,MAAM,iBAAiB;iFAQpB,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoHxB,CAAC;AAGF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/assignment-edition/index.tsx"],"names":[],"mappings":";AASA,OAAO,EAAC,sBAAsB,EAAY,MAAM,SAAS,CAAC;AAG1D,YAAY,EAAC,sBAAsB,EAAE,6BAA6B,EAAC,MAAM,SAAS,CAAC;AAEnF,QAAA,MAAM,iBAAiB;iFAQpB,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoHxB,CAAC;AAGF,eAAe,iBAAiB,CAAC"}
@@ -257,6 +257,7 @@ export declare const propTypes: {
257
257
  tags: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
258
258
  label: PropTypes.Validator<string>;
259
259
  iconName: PropTypes.Validator<string>;
260
+ level: PropTypes.Requireable<string>;
260
261
  }>>>;
261
262
  checkbox: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
262
263
  checked: PropTypes.Validator<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/assignment-edition/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,WAAW,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAA8B,mBAAmB,EAAC,MAAM,mCAAmC,CAAC;AACnG,OAAoC,EAAC,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AAClG,OAAO,EAAC,gBAAgB,EAAgC,MAAM,iCAAiC,CAAC;AAEhG,aAAK,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC,GAAG;IAC7F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AACF,aAAK,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CA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AC;QACpB,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM,CAAC;YACd,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,QAAQ,CAAC,EAAE,OAAO,CAAC;YACnB,OAAO,EAAE,UAAU,EAAE,CAAC;SACvB,CAAC;QACF,SAAS,EAAE;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,cAAc,EAAE,CAAA;SAAC,CAAC;KACvD,CAAC;IACF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,aAAa,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;CAClE,CAAC;AACF,oBAAY,6BAA6B,GAAG;IAAC,KAAK,EAAE,sBAAsB,CAAA;CAAC,CAAC;AAE5E,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDrB,CAAC"}
@@ -23,6 +23,7 @@ declare namespace BrandTable {
23
23
  }>>;
24
24
  const emptyValue: PropTypes.Validator<string>;
25
25
  const isPending: PropTypes.Requireable<boolean>;
26
+ const keepFiltersWhenEmpty: PropTypes.Requireable<boolean>;
26
27
  const editable: PropTypes.Requireable<boolean>;
27
28
  const rows: PropTypes.Requireable<(PropTypes.InferProps<{
28
29
  fields: PropTypes.Requireable<(NonNullable<string | PropTypes.InferProps<{
@@ -36,6 +37,7 @@ declare namespace BrandTable {
36
37
  text: PropTypes.Requireable<string>;
37
38
  tags: PropTypes.Requireable<(PropTypes.InferProps<{
38
39
  status: PropTypes.Requireable<string>;
40
+ palette: PropTypes.Requireable<string>;
39
41
  label: PropTypes.Validator<string>;
40
42
  }> | null | undefined)[]>;
41
43
  }> | null | undefined> | null | undefined)[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/brand-table/index.js"],"names":[],"mappings":";AAQA,qDAsDC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/brand-table/index.js"],"names":[],"mappings":";AAQA,qDAyDC"}
@@ -15,6 +15,7 @@ const BrandTable = props => {
15
15
  editable,
16
16
  isPending,
17
17
  emptyValue,
18
+ keepFiltersWhenEmpty,
18
19
  onRefresh,
19
20
  refreshLabel,
20
21
  headerTitle = ''
@@ -22,14 +23,14 @@ const BrandTable = props => {
22
23
  const pendingView = /*#__PURE__*/React.createElement("div", {
23
24
  className: style.loading
24
25
  }, /*#__PURE__*/React.createElement(Loader, null));
25
- const tableView = rows.length > 0 ? /*#__PURE__*/React.createElement(Table, {
26
+ const tableView = /*#__PURE__*/React.createElement(React.Fragment, null, rows.length > 0 || keepFiltersWhenEmpty && columns.length > 0 ? /*#__PURE__*/React.createElement(Table, {
26
27
  rows: rows,
27
28
  columns: columns,
28
29
  editable: editable,
29
30
  headerTitle: headerTitle
30
- }) : /*#__PURE__*/React.createElement("div", {
31
+ }) : null, rows.length === 0 ? /*#__PURE__*/React.createElement("div", {
31
32
  className: style.empty
32
- }, emptyValue);
33
+ }, emptyValue) : null);
33
34
  const paginationView = pagination ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Pagination, pagination)) : null;
34
35
  const searchView = search ? /*#__PURE__*/React.createElement("div", {
35
36
  className: style.searchWrapper
@@ -51,6 +52,7 @@ BrandTable.propTypes = process.env.NODE_ENV !== "production" ? {
51
52
  pagination: PropTypes.shape(Pagination.propTypes),
52
53
  emptyValue: PropTypes.string.isRequired,
53
54
  isPending: PropTypes.bool,
55
+ keepFiltersWhenEmpty: PropTypes.bool,
54
56
  editable: PropTypes.bool,
55
57
  rows: Table.propTypes.rows,
56
58
  columns: Table.propTypes.columns,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","Table","Pagination","Search","Loader","style","BrandTable","props","pagination","search","rows","columns","editable","isPending","emptyValue","onRefresh","refreshLabel","headerTitle","pendingView","createElement","className","loading","tableView","length","empty","paginationView","searchView","searchWrapper","_extends","theme","refreshView","refresh","onClick","wrapper","headerWrapper","propTypes","process","env","NODE_ENV","shape","string","isRequired","bool","func"],"sources":["../../../src/organism/brand-table/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Table from '../../molecule/table';\nimport Pagination from '../../molecule/pagination';\nimport Search from '../../atom/input-search';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst BrandTable = props => {\n const {\n pagination,\n search,\n rows = [],\n columns = [],\n editable,\n isPending,\n emptyValue,\n onRefresh,\n refreshLabel,\n headerTitle = ''\n } = props;\n\n const pendingView = (\n <div className={style.loading}>\n <Loader />\n </div>\n );\n\n const tableView =\n rows.length > 0 ? (\n <Table rows={rows} columns={columns} editable={editable} headerTitle={headerTitle} />\n ) : (\n <div className={style.empty}>{emptyValue}</div>\n );\n const paginationView = pagination ? (\n <div>\n <Pagination {...pagination} />\n </div>\n ) : null;\n const searchView = search ? (\n <div className={style.searchWrapper}>\n <Search {...search} theme={'coorpmanager'} />\n </div>\n ) : null;\n\n const refreshView = onRefresh ? (\n <div className={style.refresh} onClick={onRefresh}>\n 🔄 {refreshLabel}\n </div>\n ) : null;\n\n return (\n <div className={style.wrapper}>\n <div className={style.headerWrapper}>\n {refreshView}\n {searchView}\n {paginationView}\n </div>\n <div>{isPending ? pendingView : tableView}</div>\n <div />\n </div>\n );\n};\n\nBrandTable.propTypes = {\n search: PropTypes.shape(Search.propTypes),\n pagination: PropTypes.shape(Pagination.propTypes),\n emptyValue: PropTypes.string.isRequired,\n isPending: PropTypes.bool,\n editable: PropTypes.bool,\n rows: Table.propTypes.rows,\n columns: Table.propTypes.columns,\n onRefresh: PropTypes.func,\n refreshLabel: PropTypes.string,\n headerTitle: PropTypes.string\n};\n\nexport default BrandTable;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,sBAAsB;AACxC,OAAOC,UAAU,MAAM,2BAA2B;AAClD,OAAOC,MAAM,MAAM,yBAAyB;AAC5C,OAAOC,MAAM,MAAM,mBAAmB;AACtC,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,UAAU,GAAGC,KAAK,IAAI;EAC1B,MAAM;IACJC,UAAU;IACVC,MAAM;IACNC,IAAI,GAAG,EAAE;IACTC,OAAO,GAAG,EAAE;IACZC,QAAQ;IACRC,SAAS;IACTC,UAAU;IACVC,SAAS;IACTC,YAAY;IACZC,WAAW,GAAG;EAChB,CAAC,GAAGV,KAAK;EAET,MAAMW,WAAW,gBACfnB,KAAA,CAAAoB,aAAA;IAAKC,SAAS,EAAEf,KAAK,CAACgB;EAAQ,gBAC5BtB,KAAA,CAAAoB,aAAA,CAACf,MAAM,MAAE,CACN,CACN;EAED,MAAMkB,SAAS,GACbZ,IAAI,CAACa,MAAM,GAAG,CAAC,gBACbxB,KAAA,CAAAoB,aAAA,CAAClB,KAAK;IAACS,IAAI,EAAEA,IAAK;IAACC,OAAO,EAAEA,OAAQ;IAACC,QAAQ,EAAEA,QAAS;IAACK,WAAW,EAAEA;EAAY,CAAE,CAAC,gBAErFlB,KAAA,CAAAoB,aAAA;IAAKC,SAAS,EAAEf,KAAK,CAACmB;EAAM,GAAEV,UAAgB,CAC/C;EACH,MAAMW,cAAc,GAAGjB,UAAU,gBAC/BT,KAAA,CAAAoB,aAAA,2BACEpB,KAAA,CAAAoB,aA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AS,CAACxB,OAAO;EAChCI,SAAS,EAAEf,SAAS,CAAC2C,IAAI;EACzB3B,YAAY,EAAEhB,SAAS,CAACwC,MAAM;EAC9BvB,WAAW,EAAEjB,SAAS,CAACwC;AACzB,CAAC;AAED,eAAelC,UAAU","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","Table","Pagination","Search","Loader","style","BrandTable","props","pagination","search","rows","columns","editable","isPending","emptyValue","keepFiltersWhenEmpty","onRefresh","refreshLabel","headerTitle","pendingView","createElement","className","loading","tableView","Fragment","length","empty","paginationView","searchView","searchWrapper","_extends","theme","refreshView","refresh","onClick","wrapper","headerWrapper","propTypes","process","env","NODE_ENV","shape","string","isRequired","bool","func"],"sources":["../../../src/organism/brand-table/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Table from '../../molecule/table';\nimport Pagination from '../../molecule/pagination';\nimport Search from '../../atom/input-search';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst BrandTable = props => {\n const {\n pagination,\n search,\n rows = [],\n columns = [],\n editable,\n isPending,\n emptyValue,\n keepFiltersWhenEmpty,\n onRefresh,\n refreshLabel,\n headerTitle = ''\n } = props;\n\n const pendingView = (\n <div className={style.loading}>\n <Loader />\n </div>\n );\n\n const tableView = (\n <>\n {rows.length > 0 || (keepFiltersWhenEmpty && columns.length > 0) ? (\n <Table rows={rows} columns={columns} editable={editable} headerTitle={headerTitle} />\n ) : null}\n {rows.length === 0 ? <div className={style.empty}>{emptyValue}</div> : null}\n </>\n );\n const paginationView = pagination ? (\n <div>\n <Pagination {...pagination} />\n </div>\n ) : null;\n const searchView = search ? (\n <div className={style.searchWrapper}>\n <Search {...search} theme={'coorpmanager'} />\n </div>\n ) : null;\n\n const refreshView = onRefresh ? (\n <div className={style.refresh} onClick={onRefresh}>\n 🔄 {refreshLabel}\n </div>\n ) : null;\n\n return (\n <div className={style.wrapper}>\n <div className={style.headerWrapper}>\n {refreshView}\n {searchView}\n {paginationView}\n </div>\n <div>{isPending ? pendingView : tableView}</div>\n <div />\n </div>\n );\n};\n\nBrandTable.propTypes = {\n search: PropTypes.shape(Search.propTypes),\n pagination: PropTypes.shape(Pagination.propTypes),\n emptyValue: PropTypes.string.isRequired,\n isPending: PropTypes.bool,\n keepFiltersWhenEmpty: PropTypes.bool,\n editable: PropTypes.bool,\n rows: Table.propTypes.rows,\n columns: Table.propTypes.columns,\n onRefresh: PropTypes.func,\n refreshLabel: PropTypes.string,\n headerTitle: PropTypes.string\n};\n\nexport default BrandTable;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,sBAAsB;AACxC,OAAOC,UAAU,MAAM,2BAA2B;AAClD,OAAOC,MAAM,MAAM,yBAAyB;AAC5C,OAAOC,MAAM,MAAM,mBAAmB;AACtC,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,UAAU,GAAGC,KAAK,IAAI;EAC1B,MAAM;IACJC,UAAU;IACVC,MAAM;IACNC,IAAI,GAAG,EAAE;IACTC,OAAO,GAAG,EAAE;IACZC,QAAQ;IACRC,SAAS;IACTC,UAAU;IACVC,oBAAoB;IACpBC,SAAS;IACTC,YAAY;IACZC,WAAW,GAAG;EAChB,CAAC,GAAGX,KAAK;EAET,MAAMY,WAAW,gBACfpB,KAAA,CAAAqB,aAAA;IAAKC,SAAS,EAAEhB,KAAK,CAACiB;EAAQ,gBAC5BvB,KAAA,CAAAqB,aAAA,CAAChB,MAAM,MAAE,CACN,CACN;EAED,MAAMmB,SAAS,gBACbxB,KAAA,CAAAqB,aAAA,CAAArB,KAAA,CAAAyB,QAAA,QACGd,IAAI,CAACe,MAAM,GAAG,CAAC,IAAKV,oBAAoB,IAAIJ,OAAO,CAACc,MAAM,GAAG,CAAE,gBAC9D1B,KAAA,CAAAqB,aAAA,CAACnB,KAAK;IAACS,IAAI,EAAEA,IAAK;IAACC,OAAO,EAAEA,OAA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,SAAS,CAAC;EACzC7B,UAAU,EAAER,SAAS,CAACyC,KAAK,CAACvC,UAAU,CAACmC,SAAS,CAAC;EACjDvB,UAAU,EAAEd,SAAS,CAAC0C,MAAM,CAACC,UAAU;EACvC9B,SAAS,EAAEb,SAAS,CAAC4C,IAAI;EACzB7B,oBAAoB,EAAEf,SAAS,CAAC4C,IAAI;EACpChC,QAAQ,EAAEZ,SAAS,CAAC4C,IAAI;EACxBlC,IAAI,EAAET,KAAK,CAACoC,SAAS,CAAC3B,IAAI;EAC1BC,OAAO,EAAEV,KAAK,CAACoC,SAAS,CAAC1B,OAAO;EAChCK,SAAS,EAAEhB,SAAS,CAAC6C,IAAI;EACzB5B,YAAY,EAAEjB,SAAS,CAAC0C,MAAM;EAC9BxB,WAAW,EAAElB,SAAS,CAAC0C;AACzB,CAAC;AAED,eAAepC,UAAU","ignoreList":[]}
@@ -55,6 +55,7 @@ declare const ContentSelectionList: {
55
55
  tags: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
56
56
  label: import("prop-types").Validator<string>;
57
57
  iconName: import("prop-types").Validator<string>;
58
+ level: import("prop-types").Requireable<string>;
58
59
  }>>>;
59
60
  checkbox: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
60
61
  checked: import("prop-types").Validator<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-selection-list/index.tsx"],"names":[],"mappings":";AASA,OAAO,EAAC,gBAAgB,EAAqD,MAAM,SAAS,CAAC;AAE7F,eAAO,MAAM,gBAAgB,WAAY;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;;;;;;;;;;;;;;;;;;;;;;;WAHQ,MAAM;qBACG,IAAI;;CAyBpB,CAAC;AAmEH,QAAA,MAAM,oBAAoB;wMAYvB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsElB,CAAC;AAIF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-selection-list/index.tsx"],"names":[],"mappings":";AASA,OAAO,EAAC,gBAAgB,EAAqD,MAAM,SAAS,CAAC;AAE7F,eAAO,MAAM,gBAAgB,WAAY;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;;;;;;;;;;;;;;;;;;;;;;;WAHQ,MAAM;qBACG,IAAI;;CAyBpB,CAAC;AAoEH,QAAA,MAAM,oBAAoB;wMAYvB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsElB,CAAC;AAIF,eAAe,oBAAoB,CAAC"}
@@ -42,7 +42,8 @@ const buildContentItem = (readOnly, hiddenLabel, disabled = false) => ({
42
42
  image,
43
43
  tags: {
44
44
  label,
45
- iconName
45
+ iconName,
46
+ level
46
47
  },
47
48
  checkbox,
48
49
  deleteButton,
@@ -86,8 +87,11 @@ const buildContentItem = (readOnly, hiddenLabel, disabled = false) => ({
86
87
  image,
87
88
  tags: [{
88
89
  label,
89
- type: 'default',
90
+ type: level || 'default',
90
91
  icon: {
92
+ ...(level && {
93
+ iconColor: COLORS.white
94
+ }),
91
95
  iconName,
92
96
  preset: 's',
93
97
  customStyle: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","classnames","ListItems","Title","Notification","COLORS","contentContainer","style","ContentSelectionListPropTypes","buildButtonProps","button","type","label","hoverBackgroundColor","primary_100","hoverColor","cm_primary_blue","icon","position","faIcon","name","color","size","customStyle","padding","width","backgroundColor","cm_blue_50","borderRadius","fontWeight","buildContentItem","readOnly","hiddenLabel","disabled","ref","title","subtitle","image","tags","iconName","checkbox","deleteButton","hidden","hint","secondButtonLink","neutral_500","cm_grey_100","imageOverlay","undefined","contentBadge","category","details","id","preset","ContentSelectionList","list","listTitle","items","search","emptyResult","actionButtons","checkboxWithTitle","checkboxWithTitleProps","isFetching","error","buttonProps","empty","_isEmpty","titleProps","required","listProps","content","_map","theme","actionButton","className","iconColor","createElement","role","message","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/content-selection-list/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {isEmpty, map} from 'lodash/fp';\nimport ListItems from '../list-items';\nimport Title from '../../atom/title';\nimport Notification from '../../atom/notification';\nimport {COLORS} from '../../variables/colors';\nimport {contentContainer} from '../skill-edition/styles';\nimport style from './style.css';\nimport {ContentPropsType, ContentListItemType, ContentSelectionListPropTypes} from './types';\n\nexport const buildButtonProps = (button: {\n label: string;\n onClick?: () => void;\n disabled?: boolean;\n}) => ({\n ...button,\n type: 'primary',\n 'aria-label': button.label,\n 'data-name': `button-${button.label}`,\n hoverBackgroundColor: COLORS.primary_100,\n hoverColor: COLORS.cm_primary_blue,\n icon: {\n position: 'left',\n faIcon: {\n name: 'plus',\n color: COLORS.cm_primary_blue,\n size: 14,\n customStyle: {padding: 0}\n }\n },\n customStyle: {\n width: 'fit-content',\n backgroundColor: COLORS.cm_blue_50,\n color: COLORS.cm_primary_blue,\n borderRadius: '12px',\n fontWeight: 600\n }\n});\n\nconst buildContentItem =\n (readOnly: boolean, hiddenLabel?: string, disabled = false) =>\n ({\n ref,\n title,\n subtitle,\n image,\n tags: {label, iconName},\n checkbox,\n deleteButton,\n hidden,\n hint\n }: ContentListItemType) => {\n return {\n ...(readOnly\n ? {}\n : {\n secondButtonLink: {\n ...deleteButton,\n disabled: disabled || deleteButton?.disabled,\n 'data-name': `button-${deleteButton?.label}`,\n type: 'primary',\n // Grey like the bin icon: the primary type's white text vanished on the grey row.\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent',\n color: COLORS.neutral_500\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n hoverColor: COLORS.neutral_500,\n icon: {\n position: 'left',\n faIcon: {\n name: 'trash',\n color: COLORS.neutral_500,\n size: 16\n }\n }\n }\n }),\n imageOverlay: hidden ? 'hidden' : undefined,\n contentBadge: hidden ? {category: 'hidden', label: hiddenLabel} : undefined,\n details: hint,\n id: ref,\n title,\n subtitle,\n image,\n tags: [\n {\n label,\n type: 'default',\n icon: {\n iconName,\n preset: 's',\n customStyle: {\n padding: 0\n },\n position: 'left'\n }\n }\n ],\n checkbox: readOnly ? undefined : {...checkbox, disabled: disabled || checkbox.disabled}\n };\n };\n\nconst ContentSelectionList = ({\n title,\n subtitle,\n button,\n list: {title: listTitle, items, search, emptyResult},\n actionButtons,\n checkboxWithTitle: checkboxWithTitleProps,\n readOnly = false,\n disabled = false,\n isFetching = false,\n error,\n hiddenLabel\n}: ContentPropsType) => {\n const buttonProps = buildButtonProps({...button, disabled: disabled || button.disabled});\n // Nothing to select or delete in an empty list: it shows its placeholder instead.\n const empty = isEmpty(items);\n\n const titleProps = {\n type: 'form-group',\n title,\n subtitle,\n button: !readOnly ? buttonProps : undefined,\n required: true\n };\n\n const listProps = {\n title: listTitle,\n 'aria-label': 'content list items',\n content: {\n ...(!isEmpty(emptyResult) && {emptyResult: {...emptyResult, button: buttonProps}}),\n items: map(buildContentItem(readOnly, hiddenLabel, disabled), items),\n type: 'list'\n },\n search: search\n ? {\n ...search,\n theme: 'coorpmanager',\n disabled: disabled || search.disabled\n }\n : undefined,\n actionButtons:\n readOnly || empty\n ? []\n : map(\n actionButton => ({\n ...actionButton,\n disabled: disabled || actionButton.disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px',\n width: 'auto'\n }\n }),\n actionButtons\n ),\n\n checkboxWithTitle:\n readOnly || empty\n ? undefined\n : {\n ...checkboxWithTitleProps,\n disabled: disabled || checkboxWithTitleProps?.disabled,\n name: checkboxWithTitleProps?.title,\n 'aria-label': checkboxWithTitleProps?.title,\n 'data-name': checkboxWithTitleProps?.title,\n className: style.checkboxWithTitle,\n icon: {iconName: 'minus', iconColor: 'white', preset: 's'}\n },\n isFetching\n };\n\n return (\n <div className={classnames(contentContainer, style.list)}>\n <Title {...titleProps} />\n {error ? (\n <div role=\"alert\">\n <Notification type=\"error\" message={error} />\n </div>\n ) : null}\n <ListItems {...listProps} />\n </div>\n );\n};\n\nContentSelectionList.propTypes = ContentSelectionListPropTypes;\n\nexport default ContentSelectionList;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAOC,YAAY,MAAM,yBAAyB;AAClD,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,SAAQC,gBAAgB,QAAO,yBAAyB;AACxD,OAAOC,KAAK,MAAM,aAAa;AAC/B,SAA+CC,6BAA6B,QAAO,SAAS;AAE5F,OAAO,MAAMC,gBAAgB,GAAIC,MAIhC,KAAM;EACL,GAAGA,MAAM;EACTC,IAAI,EAAE,SAAS;EACf,YAAY,EAAED,MAAM,CAACE,KAAK;EAC1B,WAAW,EAAE,UAAUF,MAAM,CAACE,KAAK,EAAE;EACrCC,oBAAoB,EAAER,MAAM,CAACS,WAAW;EACxCC,UAAU,EAAEV,MAAM,CAACW,eAAe;EAClCC,IAAI,EAAE;IACJC,QAAQ,EAAE,MAAM;IAChBC,MAAM,EAAE;MACNC,IAAI,EAAE,MAAM;MACZC,KAAK,EAAEhB,MAAM,CAACW,eAAe;MAC7BM,IAAI,EAAE,EAAE;MACRC,WAAW,EAAE;QAACC,OAAO,EAAE;MAAC;IAC1B;EACF,CAAC;EACDD,WAAW,EAAE;IACXE,KAAK,EAAE,aAAa;IACpBC,eAAe,EAAErB,MAAM,CAACsB,UAAU;IAClCN,KAAK,EAAEhB,MAAM,CAACW,eAAe;IAC7BY,YAAY,EAAE,MAAM;IACpBC,UA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AAKC,IAAI,EAAC;EAAO,gBACf9E,KAAA,CAAA6E,aAAA,CAACzE,YAAY;IAACO,IAAI,EAAC,OAAO;IAACoE,OAAO,EAAEf;EAAM,CAAE,CACzC,CAAC,GACJ,IAAI,eACRhE,KAAA,CAAA6E,aAAA,CAAC3E,SAAS,EAAKoE,SAAY,CACxB,CAAC;AAEV,CAAC;AAEDhB,oBAAoB,CAAC0B,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG3E,6BAA6B;AAE9D,eAAe8C,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","classnames","ListItems","Title","Notification","COLORS","contentContainer","style","ContentSelectionListPropTypes","buildButtonProps","button","type","label","hoverBackgroundColor","primary_100","hoverColor","cm_primary_blue","icon","position","faIcon","name","color","size","customStyle","padding","width","backgroundColor","cm_blue_50","borderRadius","fontWeight","buildContentItem","readOnly","hiddenLabel","disabled","ref","title","subtitle","image","tags","iconName","level","checkbox","deleteButton","hidden","hint","secondButtonLink","neutral_500","cm_grey_100","imageOverlay","undefined","contentBadge","category","details","id","iconColor","white","preset","ContentSelectionList","list","listTitle","items","search","emptyResult","actionButtons","checkboxWithTitle","checkboxWithTitleProps","isFetching","error","buttonProps","empty","_isEmpty","titleProps","required","listProps","content","_map","theme","actionButton","className","createElement","role","message","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/content-selection-list/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {isEmpty, map} from 'lodash/fp';\nimport ListItems from '../list-items';\nimport Title from '../../atom/title';\nimport Notification from '../../atom/notification';\nimport {COLORS} from '../../variables/colors';\nimport {contentContainer} from '../skill-edition/styles';\nimport style from './style.css';\nimport {ContentPropsType, ContentListItemType, ContentSelectionListPropTypes} from './types';\n\nexport const buildButtonProps = (button: {\n label: string;\n onClick?: () => void;\n disabled?: boolean;\n}) => ({\n ...button,\n type: 'primary',\n 'aria-label': button.label,\n 'data-name': `button-${button.label}`,\n hoverBackgroundColor: COLORS.primary_100,\n hoverColor: COLORS.cm_primary_blue,\n icon: {\n position: 'left',\n faIcon: {\n name: 'plus',\n color: COLORS.cm_primary_blue,\n size: 14,\n customStyle: {padding: 0}\n }\n },\n customStyle: {\n width: 'fit-content',\n backgroundColor: COLORS.cm_blue_50,\n color: COLORS.cm_primary_blue,\n borderRadius: '12px',\n fontWeight: 600\n }\n});\n\nconst buildContentItem =\n (readOnly: boolean, hiddenLabel?: string, disabled = false) =>\n ({\n ref,\n title,\n subtitle,\n image,\n tags: {label, iconName, level},\n checkbox,\n deleteButton,\n hidden,\n hint\n }: ContentListItemType) => {\n return {\n ...(readOnly\n ? {}\n : {\n secondButtonLink: {\n ...deleteButton,\n disabled: disabled || deleteButton?.disabled,\n 'data-name': `button-${deleteButton?.label}`,\n type: 'primary',\n // Grey like the bin icon: the primary type's white text vanished on the grey row.\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent',\n color: COLORS.neutral_500\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n hoverColor: COLORS.neutral_500,\n icon: {\n position: 'left',\n faIcon: {\n name: 'trash',\n color: COLORS.neutral_500,\n size: 16\n }\n }\n }\n }),\n imageOverlay: hidden ? 'hidden' : undefined,\n contentBadge: hidden ? {category: 'hidden', label: hiddenLabel} : undefined,\n details: hint,\n id: ref,\n title,\n subtitle,\n image,\n tags: [\n {\n label,\n type: level || 'default',\n icon: {\n ...(level && {iconColor: COLORS.white}),\n iconName,\n preset: 's',\n customStyle: {\n padding: 0\n },\n position: 'left'\n }\n }\n ],\n checkbox: readOnly ? undefined : {...checkbox, disabled: disabled || checkbox.disabled}\n };\n };\n\nconst ContentSelectionList = ({\n title,\n subtitle,\n button,\n list: {title: listTitle, items, search, emptyResult},\n actionButtons,\n checkboxWithTitle: checkboxWithTitleProps,\n readOnly = false,\n disabled = false,\n isFetching = false,\n error,\n hiddenLabel\n}: ContentPropsType) => {\n const buttonProps = buildButtonProps({...button, disabled: disabled || button.disabled});\n // Nothing to select or delete in an empty list: it shows its placeholder instead.\n const empty = isEmpty(items);\n\n const titleProps = {\n type: 'form-group',\n title,\n subtitle,\n button: !readOnly ? buttonProps : undefined,\n required: true\n };\n\n const listProps = {\n title: listTitle,\n 'aria-label': 'content list items',\n content: {\n ...(!isEmpty(emptyResult) && {emptyResult: {...emptyResult, button: buttonProps}}),\n items: map(buildContentItem(readOnly, hiddenLabel, disabled), items),\n type: 'list'\n },\n search: search\n ? {\n ...search,\n theme: 'coorpmanager',\n disabled: disabled || search.disabled\n }\n : undefined,\n actionButtons:\n readOnly || empty\n ? []\n : map(\n actionButton => ({\n ...actionButton,\n disabled: disabled || actionButton.disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px',\n width: 'auto'\n }\n }),\n actionButtons\n ),\n\n checkboxWithTitle:\n readOnly || empty\n ? undefined\n : {\n ...checkboxWithTitleProps,\n disabled: disabled || checkboxWithTitleProps?.disabled,\n name: checkboxWithTitleProps?.title,\n 'aria-label': checkboxWithTitleProps?.title,\n 'data-name': checkboxWithTitleProps?.title,\n className: style.checkboxWithTitle,\n icon: {iconName: 'minus', iconColor: 'white', preset: 's'}\n },\n isFetching\n };\n\n return (\n <div className={classnames(contentContainer, style.list)}>\n <Title {...titleProps} />\n {error ? (\n <div role=\"alert\">\n <Notification type=\"error\" message={error} />\n </div>\n ) : null}\n <ListItems {...listProps} />\n </div>\n );\n};\n\nContentSelectionList.propTypes = ContentSelectionListPropTypes;\n\nexport default ContentSelectionList;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAOC,YAAY,MAAM,yBAAyB;AAClD,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,SAAQC,gBAAgB,QAAO,yBAAyB;AACxD,OAAOC,KAAK,MAAM,aAAa;AAC/B,SAA+CC,6BAA6B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ACjBD,YAAY,EAAE,MAAM;QACpBH,KAAK,EAAE;MACT;IACF,CAAC,CAAC,EACFsC,aACF,CAAC;IAEPC,iBAAiB,EACfjC,QAAQ,IAAIsC,KAAK,GACbpB,SAAS,GACT;MACE,GAAGgB,sBAAsB;MACzBhC,QAAQ,EAAEA,QAAQ,IAAIgC,sBAAsB,EAAEhC,QAAQ;MACtDb,IAAI,EAAE6C,sBAAsB,EAAE9B,KAAK;MACnC,YAAY,EAAE8B,sBAAsB,EAAE9B,KAAK;MAC3C,WAAW,EAAE8B,sBAAsB,EAAE9B,KAAK;MAC1C2C,SAAS,EAAEvE,KAAK,CAACyD,iBAAiB;MAClC/C,IAAI,EAAE;QAACsB,QAAQ,EAAE,OAAO;QAAEe,SAAS,EAAE,OAAO;QAAEE,MAAM,EAAE;MAAG;IAC3D,CAAC;IACPU;EACF,CAAC;EAED,oBACElE,KAAA,CAAA+E,aAAA;IAAKD,SAAS,EAAE7E,UAAU,CAACK,gBAAgB,EAAEC,KAAK,CAACmD,IAAI;EAAE,gBACvD1D,KAAA,CAAA+E,aAAA,CAAC5E,KAAK,EAAKoE,UAAa,CAAC,EACxBJ,KAAK,gBACJnE,KAAA,CAAA+E,aAAA;IAAKC,IAAI,EAAC;EAAO,gBACfhF,KAAA,CAAA+E,aAAA,CAAC3E,YAAY;IAACO,IAAI,EAAC,OAAO;IAACsE,OAAO,EAAEd;EAAM,CAAE,CACzC,CAAC,GACJ,IAAI,eACRnE,KAAA,CAAA+E,aAAA,CAAC7E,SAAS,EAAKuE,SAAY,CACxB,CAAC;AAEV,CAAC;AAEDhB,oBAAoB,CAACyB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG7E,6BAA6B;AAE9D,eAAeiD,oBAAoB","ignoreList":[]}
@@ -21,6 +21,7 @@ export declare const ContentSelectionListPropTypes: {
21
21
  tags: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
22
22
  label: PropTypes.Validator<string>;
23
23
  iconName: PropTypes.Validator<string>;
24
+ level: PropTypes.Requireable<string>;
24
25
  }>>>;
25
26
  checkbox: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
26
27
  checked: PropTypes.Validator<boolean>;
@@ -73,6 +74,7 @@ export declare type ContentListItemType = {
73
74
  tags: {
74
75
  label: string;
75
76
  iconName: string;
77
+ level?: 'base' | 'advanced' | 'coach';
76
78
  };
77
79
  checkbox: {
78
80
  checked: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/content-selection-list/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEzC,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,QAAQ,EAAE;QACR,OAAO,EAAE,OAAO,CAAC;QACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;KACpC,CAAC;IACF,YAAY,CAAC,EAAE,eAAe,CAAC;CAChC,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC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AAM,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB,CAAC;IACF,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAC;QAC9B,MAAM,CAAC,EAAE;YACP,KAAK,EAAE,MAAM,CAAC;YACd,WAAW,EAAE,MAAM,CAAC;YACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;YACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;SACnC,CAAC;QACF,WAAW,CAAC,EAAE;YACZ,KAAK,EAAE,MAAM,CAAC;YACd,WAAW,EAAE,MAAM,CAAC;SACrB,CAAC;QACF,QAAQ,CAAC,EAAE;YACT,KAAK,EAAE,MAAM,CAAC;YACd,OAAO,EAAE,OAAO,CAAC;YACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;YACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;SACpC,CAAC;KACH,CAAC;IACF,aAAa,CAAC,EAAE,eAAe,EAAE,CAAC;IAClC,iBAAiB,CAAC,EAAE,sBAAsB,CAAC;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
@@ -19,7 +19,8 @@ export const ContentSelectionListPropTypes = {
19
19
  image: PropTypes.string.isRequired,
20
20
  tags: PropTypes.shape({
21
21
  label: PropTypes.string.isRequired,
22
- iconName: PropTypes.string.isRequired
22
+ iconName: PropTypes.string.isRequired,
23
+ level: PropTypes.oneOf(['base', 'advanced', 'coach'])
23
24
  }).isRequired,
24
25
  checkbox: PropTypes.shape({
25
26
  checked: PropTypes.bool.isRequired,
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["PropTypes","ContentSelectionListPropTypes","disabled","bool","title","string","isRequired","subtitle","button","shape","label","onClick","func","list","items","arrayOf","hidden","hint","ref","image","tags","iconName","checkbox","checked","onChange","deleteButton","search","value","placeholder","emptyResult","description","error","hiddenLabel","isFetching","actionButtons","object","checkboxWithTitle","readOnly"],"sources":["../../../src/organism/content-selection-list/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ButtonLinkProps} from '../../atom/button-link/types';\n\nexport const ContentSelectionListPropTypes = {\n disabled: PropTypes.bool,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string,\n button: PropTypes.shape({\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onClick: PropTypes.func.isRequired\n }).isRequired,\n list: PropTypes.shape({\n title: PropTypes.string,\n items: PropTypes.arrayOf(\n PropTypes.shape({\n hidden: PropTypes.bool,\n hint: PropTypes.string,\n ref: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string.isRequired,\n image: PropTypes.string.isRequired,\n tags: PropTypes.shape({\n label: PropTypes.string.isRequired,\n iconName: PropTypes.string.isRequired\n }).isRequired,\n checkbox: PropTypes.shape({\n checked: PropTypes.bool.isRequired,\n disabled: PropTypes.bool,\n onChange: PropTypes.func.isRequired\n }).isRequired,\n deleteButton: PropTypes.shape({\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n disabled: PropTypes.bool,\n onClick: PropTypes.func\n })\n }).isRequired\n ),\n search: PropTypes.shape({\n value: PropTypes.string.isRequired,\n placeholder: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onChange: PropTypes.func.isRequired\n }),\n emptyResult: PropTypes.shape({\n title: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired\n }),\n checkbox: PropTypes.shape({\n title: PropTypes.string.isRequired,\n checked: PropTypes.bool.isRequired,\n disabled: PropTypes.bool,\n onChange: PropTypes.func.isRequired\n })\n }).isRequired,\n error: PropTypes.string,\n hiddenLabel: PropTypes.string,\n isFetching: PropTypes.bool,\n actionButtons: PropTypes.arrayOf(PropTypes.object),\n checkboxWithTitle: PropTypes.shape({\n title: PropTypes.string,\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func\n }),\n readOnly: PropTypes.bool\n};\n\nexport type ContentListItemType = {\n hidden?: boolean;\n hint?: string;\n ref: string;\n title: string;\n subtitle: string;\n image: string;\n tags: {\n label: string;\n iconName: string;\n };\n checkbox: {\n checked: boolean;\n disabled?: boolean;\n onChange: (value: boolean) => void;\n };\n deleteButton?: ButtonLinkProps;\n};\n\nexport type CheckboxWithTitleProps = {\n title?: string;\n checked?: boolean;\n disabled?: boolean;\n onChange?: (value: boolean) => void;\n};\n\nexport type ContentPropsType = {\n disabled?: boolean;\n error?: string;\n hiddenLabel?: string;\n title: string;\n subtitle?: string;\n button: {\n label: string;\n disabled?: boolean;\n onClick: () => void;\n };\n list: {\n title?: string;\n items?: ContentListItemType[];\n search?: {\n value: string;\n placeholder: string;\n disabled?: boolean;\n onChange: (value: string) => void;\n };\n emptyResult?: {\n title: string;\n description: string;\n };\n checkbox?: {\n title: string;\n checked: boolean;\n disabled?: boolean;\n onChange: (value: boolean) => void;\n };\n };\n actionButtons?: ButtonLinkProps[];\n checkboxWithTitle?: CheckboxWithTitleProps;\n isFetching?: boolean;\n readOnly?: boolean;\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAGlC,OAAO,MAAMC,6BAA6B,GAAG;EAC3CC,QAAQ,EAAEF,SAAS,CAACG,IAAI;EACxBC,KAAK,EAAEJ,SAAS,CAACK,MAAM,CAACC,UAAU;EAClCC,QAAQ,EAAEP,SAAS,CAACK,MAAM;EAC1BG,MAAM,EAAER,SAAS,CAACS,KAAK,CAAC;IACtBC,KAAK,EAAEV,SAAS,CAACK,MAAM,CAACC,UAAU;IAClCJ,QAAQ,EAAEF,SAAS,CAACG,IAAI;IACxBQ,OAAO,EAAEX,SAAS,CAACY,IAAI,CAACN;EAC1B,CAAC,CAAC,CAACA,UAAU;EACbO,IAAI,EAAEb,SAAS,CAACS,KAAK,CAAC;IACpBL,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ExB,SAAS,CAACY,IAAI,CAACN;IAC3B,CAAC,CAAC;IACFuB,WAAW,EAAE7B,SAAS,CAACS,KAAK,CAAC;MAC3BL,KAAK,EAAEJ,SAAS,CAACK,MAAM,CAACC,UAAU;MAClCwB,WAAW,EAAE9B,SAAS,CAACK,MAAM,CAACC;IAChC,CAAC,CAAC;IACFgB,QAAQ,EAAEtB,SAAS,CAACS,KAAK,CAAC;MACxBL,KAAK,EAAEJ,SAAS,CAACK,MAAM,CAACC,UAAU;MAClCiB,OAAO,EAAEvB,SAAS,CAACG,IAAI,CAACG,UAAU;MAClCJ,QAAQ,EAAEF,SAAS,CAACG,IAAI;MACxBqB,QAAQ,EAAExB,SAAS,CAACY,IAAI,CAACN;IAC3B,CAAC;EACH,CAAC,CAAC,CAACA,UAAU;EACbyB,KAAK,EAAE/B,SAAS,CAACK,MAAM;EACvB2B,WAAW,EAAEhC,SAAS,CAACK,MAAM;EAC7B4B,UAAU,EAAEjC,SAAS,CAACG,IAAI;EAC1B+B,aAAa,EAAElC,SAAS,CAACe,OAAO,CAACf,SAAS,CAACmC,MAAM,CAAC;EAClDC,iBAAiB,EAAEpC,SAAS,CAACS,KAAK,CAAC;IACjCL,KAAK,EAAEJ,SAAS,CAACK,MAAM;IACvBkB,OAAO,EAAEvB,SAAS,CAACG,IAAI;IACvBD,QAAQ,EAAEF,SAAS,CAACG,IAAI;IACxBqB,QAAQ,EAAExB,SAAS,CAACY;EACtB,CAAC,CAAC;EACFyB,QAAQ,EAAErC,SAAS,CAACG;AACtB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["PropTypes","ContentSelectionListPropTypes","disabled","bool","title","string","isRequired","subtitle","button","shape","label","onClick","func","list","items","arrayOf","hidden","hint","ref","image","tags","iconName","level","oneOf","checkbox","checked","onChange","deleteButton","search","value","placeholder","emptyResult","description","error","hiddenLabel","isFetching","actionButtons","object","checkboxWithTitle","readOnly"],"sources":["../../../src/organism/content-selection-list/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ButtonLinkProps} from '../../atom/button-link/types';\n\nexport const ContentSelectionListPropTypes = {\n disabled: PropTypes.bool,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string,\n button: PropTypes.shape({\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onClick: PropTypes.func.isRequired\n }).isRequired,\n list: PropTypes.shape({\n title: PropTypes.string,\n items: PropTypes.arrayOf(\n PropTypes.shape({\n hidden: PropTypes.bool,\n hint: PropTypes.string,\n ref: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string.isRequired,\n image: PropTypes.string.isRequired,\n tags: PropTypes.shape({\n label: PropTypes.string.isRequired,\n iconName: PropTypes.string.isRequired,\n level: PropTypes.oneOf(['base', 'advanced', 'coach'])\n }).isRequired,\n checkbox: PropTypes.shape({\n checked: PropTypes.bool.isRequired,\n disabled: PropTypes.bool,\n onChange: PropTypes.func.isRequired\n }).isRequired,\n deleteButton: PropTypes.shape({\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n disabled: PropTypes.bool,\n onClick: PropTypes.func\n })\n }).isRequired\n ),\n search: PropTypes.shape({\n value: PropTypes.string.isRequired,\n placeholder: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onChange: PropTypes.func.isRequired\n }),\n emptyResult: PropTypes.shape({\n title: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired\n }),\n checkbox: PropTypes.shape({\n title: PropTypes.string.isRequired,\n checked: PropTypes.bool.isRequired,\n disabled: PropTypes.bool,\n onChange: PropTypes.func.isRequired\n })\n }).isRequired,\n error: PropTypes.string,\n hiddenLabel: PropTypes.string,\n isFetching: PropTypes.bool,\n actionButtons: PropTypes.arrayOf(PropTypes.object),\n checkboxWithTitle: PropTypes.shape({\n title: PropTypes.string,\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func\n }),\n readOnly: PropTypes.bool\n};\n\nexport type ContentListItemType = {\n hidden?: boolean;\n hint?: string;\n ref: string;\n title: string;\n subtitle: string;\n image: string;\n tags: {\n label: string;\n iconName: string;\n level?: 'base' | 'advanced' | 'coach';\n };\n checkbox: {\n checked: boolean;\n disabled?: boolean;\n onChange: (value: boolean) => void;\n };\n deleteButton?: ButtonLinkProps;\n};\n\nexport type CheckboxWithTitleProps = {\n title?: string;\n checked?: boolean;\n disabled?: boolean;\n onChange?: (value: boolean) => void;\n};\n\nexport type ContentPropsType = {\n disabled?: boolean;\n error?: string;\n hiddenLabel?: string;\n title: string;\n subtitle?: string;\n button: {\n label: string;\n disabled?: boolean;\n onClick: () => void;\n };\n list: {\n title?: string;\n items?: ContentListItemType[];\n search?: {\n value: string;\n placeholder: string;\n disabled?: boolean;\n onChange: (value: string) => void;\n };\n emptyResult?: {\n title: string;\n description: string;\n };\n checkbox?: {\n title: string;\n checked: boolean;\n disabled?: boolean;\n onChange: (value: boolean) => void;\n };\n };\n actionButtons?: ButtonLinkProps[];\n checkboxWithTitle?: CheckboxWithTitleProps;\n isFetching?: boolean;\n readOnly?: boolean;\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAGlC,OAAO,MAAMC,6BAA6B,GAAG;EAC3CC,QAAQ,EAAEF,SAAS,CAACG,IAAI;EACxBC,KAAK,EAAEJ,SAAS,CAACK,MAAM,CAACC,UAAU;EAClCC,QAAQ,EAAEP,SAAS,CAACK,MAAM;EAC1BG,MAAM,EAAER,SAAS,CAACS,KAAK,CAAC;IACtBC,KAAK,EAAEV,SAAS,CAACK,MAAM,CAACC,UAAU;IAClCJ,QAAQ,EAAEF,SAAS,CAACG,IAAI;IACxBQ,OAAO,EAAEX,SAAS,CAACY,IAAI,CAACN;EAC1B,CAAC,CAAC,CAACA,UAAU;EACbO,IAAI,EAAEb,SAAS,CAACS,KAAK,CAAC;IACpBL,KAAK,EAAEJ,SAAS,CAACK,MAAM;IACvBS,KAAK,EAAEd,SAAS,CAACe,OAAO,CACtBf,SAAS,CAACS,KAAK,CA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1B,SAAS,CAACY,IAAI,CAACN;IAC3B,CAAC,CAAC;IACFyB,WAAW,EAAE/B,SAAS,CAACS,KAAK,CAAC;MAC3BL,KAAK,EAAEJ,SAAS,CAACK,MAAM,CAACC,UAAU;MAClC0B,WAAW,EAAEhC,SAAS,CAACK,MAAM,CAACC;IAChC,CAAC,CAAC;IACFkB,QAAQ,EAAExB,SAAS,CAACS,KAAK,CAAC;MACxBL,KAAK,EAAEJ,SAAS,CAACK,MAAM,CAACC,UAAU;MAClCmB,OAAO,EAAEzB,SAAS,CAACG,IAAI,CAACG,UAAU;MAClCJ,QAAQ,EAAEF,SAAS,CAACG,IAAI;MACxBuB,QAAQ,EAAE1B,SAAS,CAACY,IAAI,CAACN;IAC3B,CAAC;EACH,CAAC,CAAC,CAACA,UAAU;EACb2B,KAAK,EAAEjC,SAAS,CAACK,MAAM;EACvB6B,WAAW,EAAElC,SAAS,CAACK,MAAM;EAC7B8B,UAAU,EAAEnC,SAAS,CAACG,IAAI;EAC1BiC,aAAa,EAAEpC,SAAS,CAACe,OAAO,CAACf,SAAS,CAACqC,MAAM,CAAC;EAClDC,iBAAiB,EAAEtC,SAAS,CAACS,KAAK,CAAC;IACjCL,KAAK,EAAEJ,SAAS,CAACK,MAAM;IACvBoB,OAAO,EAAEzB,SAAS,CAACG,IAAI;IACvBD,QAAQ,EAAEF,SAAS,CAACG,IAAI;IACxBuB,QAAQ,EAAE1B,SAAS,CAACY;EACtB,CAAC,CAAC;EACF2B,QAAQ,EAAEvC,SAAS,CAACG;AACtB,CAAC","ignoreList":[]}
@@ -10,6 +10,7 @@ declare const HeaderWithActions: {
10
10
  title: import("prop-types").Validator<string>;
11
11
  tags: import("prop-types").Requireable<(import("prop-types").InferProps<{
12
12
  status: import("prop-types").Requireable<string>;
13
+ palette: import("prop-types").Requireable<string>;
13
14
  label: import("prop-types").Validator<string>;
14
15
  }> | null | undefined)[]>;
15
16
  subtitle: import("prop-types").Requireable<string>;
@@ -29,6 +30,13 @@ declare const HeaderWithActions: {
29
30
  disabled: import("prop-types").Requireable<boolean>;
30
31
  iconName: import("prop-types").Requireable<string>;
31
32
  iconColor: import("prop-types").Requireable<string>;
33
+ menu: import("prop-types").Requireable<import("prop-types").InferProps<{
34
+ ariaLabel: import("prop-types").Validator<string>;
35
+ options: import("prop-types").Validator<(import("prop-types").InferProps<{
36
+ label: import("prop-types").Validator<string>;
37
+ onClick: import("prop-types").Validator<(...args: any[]) => any>;
38
+ }> | null | undefined)[]>;
39
+ }>>;
32
40
  }> | null | undefined)[]>;
33
41
  bulletPointMenuButton: import("prop-types").Requireable<import("prop-types").InferProps<{
34
42
  buttons: import("prop-types").Validator<(import("prop-types").InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/index.tsx"],"names":[],"mappings":";AAQA,OAAmC,EACjC,sBAAsB,EAGvB,MAAM,SAAS,CAAC;AAuEjB,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EvD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/index.tsx"],"names":[],"mappings":";AASA,OAAmC,EACjC,sBAAsB,EAGvB,MAAM,SAAS,CAAC;AAuEjB,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFvD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
@@ -7,6 +7,7 @@ import ButtonLinkIcon from '../../atom/button-link-icon';
7
7
  import Tag from '../../atom/tag';
8
8
  import AssignmentStatusTag from '../../molecule/assignment-status-tag';
9
9
  import BulletPointMenuButton from '../../molecule/bullet-point-menu-button';
10
+ import SplitButton from '../../molecule/split-button';
10
11
  import HeaderWithActionsPropTypes from './types';
11
12
  import style from './style.css';
12
13
  const getDataName = suffix => `header-with-actions-${suffix}`;
@@ -127,7 +128,7 @@ const HeaderWithActions = props => {
127
128
  className: style.title,
128
129
  "data-name": getDataName('title')
129
130
  }, title), hasSubtitle ? /*#__PURE__*/React.createElement("p", {
130
- className: style.subtitle,
131
+ className: subtitle?.includes('\n') ? style.multilineSubtitle : style.subtitle,
131
132
  "data-name": getDataName('subtitle')
132
133
  }, subtitle) : null)), /*#__PURE__*/React.createElement("div", {
133
134
  className: style.buttonsWrapper,
@@ -136,6 +137,10 @@ const HeaderWithActions = props => {
136
137
  buttons: uncappedMap(buildButtonMenu, bulletPointMenuButton.buttons),
137
138
  "data-name": getDataName('bullet-point-menu-button')
138
139
  })) : null, uncappedMap((action, key) => {
140
+ if (action.menu) return /*#__PURE__*/React.createElement(SplitButton, _extends({}, action, {
141
+ menu: action.menu,
142
+ key: key
143
+ }));
139
144
  return /*#__PURE__*/React.createElement(ButtonLink, _extends({}, buildActionButton(action), {
140
145
  key: key
141
146
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","isEmpty","map","ButtonLink","ButtonLinkIcon","Tag","AssignmentStatusTag","BulletPointMenuButton","HeaderWithActionsPropTypes","style","getDataName","suffix","uncappedMap","convert","cap","buildCloseButton","onClick","ariaLabel","size","icon","buildButtonMenu","dataName","label","iconName","iconColor","buttonLinkType","position","faIcon","name","color","type","buildActionButton","disabled","base","customStyle","fontWeight","borderRadius","HeaderWithActions","props","closeButton","title","tag","tags","subtitle","saveStatus","bulletPointMenuButton","actionButtons","isFetching","hasSubtitle","Boolean","trim","hasAdditionalContent","undefined","createElement","className","headerWrapper","extendedTitleAndButtonWrapper","titleAndButtonWrapper","_extends","button","extendedTitleWrapper","titleWrapper","statusWrapper","display","assignmentTitleRow","assignmentTitle","assignmentTags","assignmentTag","index","key","status","buttonsWrapper","buttons","action","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/header-with-actions/index.tsx"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport map from 'lodash/fp/map';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Tag from '../../atom/tag';\nimport AssignmentStatusTag from '../../molecule/assignment-status-tag';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport HeaderWithActionsPropTypes, {\n HeaderWithActionsProps,\n ButtonMenuProps,\n ButtonActionProps\n} from './types';\nimport style from './style.css';\n\nconst getDataName = (suffix: string) => `header-with-actions-${suffix}`;\n// @ts-expect-error (need to get the index)\nconst uncappedMap = map.convert({cap: false});\n\nconst buildCloseButton = ({onClick, ariaLabel}: {onClick: () => void; ariaLabel: string}) => {\n return {\n size: 'default',\n icon: 'close',\n 'data-name': 'close-button',\n 'aria-label': ariaLabel,\n onClick\n };\n};\n\nconst buildButtonMenu = ({dataName, label, iconName, iconColor, onClick}: ButtonMenuProps) => {\n return {\n 'data-name': dataName,\n label,\n buttonLinkType: 'tertiary',\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n },\n onClick,\n type: iconName === 'trash' ? 'dangerousLeft' : 'defaultLeft'\n };\n};\n\nconst buildActionButton = ({\n type,\n label,\n onClick,\n disabled,\n iconName,\n iconColor\n}: ButtonActionProps) => {\n const base = {\n type,\n label,\n onClick,\n disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px'\n }\n };\n\n if (iconName && iconColor) {\n return {\n ...base,\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n }\n };\n }\n\n return base;\n};\n\nconst HeaderWithActions = (props: HeaderWithActionsProps) => {\n const {\n closeButton,\n title,\n tag,\n tags,\n subtitle,\n saveStatus,\n bulletPointMenuButton,\n actionButtons,\n isFetching = false\n } = props;\n const hasSubtitle = Boolean(subtitle?.trim());\n const hasAdditionalContent = tags !== undefined || hasSubtitle;\n\n return !isFetching ? (\n <div className={style.headerWrapper} data-name={getDataName('wrapper')}>\n <div\n className={\n hasAdditionalContent ? style.extendedTitleAndButtonWrapper : style.titleAndButtonWrapper\n }\n data-name={getDataName('title-and-button-wrapper')}\n >\n <ButtonLinkIcon\n {...buildCloseButton({\n onClick: closeButton.onClick,\n ariaLabel: closeButton['aria-label']\n })}\n className={style.button}\n />\n <div className={hasAdditionalContent ? style.extendedTitleWrapper : style.titleWrapper}>\n <div className={style.statusWrapper}>\n {tags === undefined && tag ? <Tag {...tag} /> : null}\n {saveStatus?.display && saveStatus.label ? (\n <p className={style.saveStatus}>{saveStatus.label}</p>\n ) : null}\n </div>\n {tags !== undefined ? (\n <div className={style.assignmentTitleRow}>\n <h3 className={style.assignmentTitle} data-name={getDataName('title')}>\n {title}\n </h3>\n <div className={style.assignmentTags} data-name={getDataName('tags')}>\n {tags.map((assignmentTag, index) => (\n <AssignmentStatusTag\n {...assignmentTag}\n key={`${assignmentTag.status}-${assignmentTag.label}-${index}`}\n />\n ))}\n </div>\n </div>\n ) : (\n <h3 className={style.title} data-name={getDataName('title')}>\n {title}\n </h3>\n )}\n {hasSubtitle ? (\n <p className={style.subtitle} data-name={getDataName('subtitle')}>\n {subtitle}\n </p>\n ) : null}\n </div>\n </div>\n <div className={style.buttonsWrapper} data-name={getDataName('buttons-wrapper')}>\n {bulletPointMenuButton && !isEmpty(bulletPointMenuButton.buttons) ? (\n <BulletPointMenuButton\n {...bulletPointMenuButton}\n buttons={uncappedMap(buildButtonMenu, bulletPointMenuButton.buttons)}\n data-name={getDataName('bullet-point-menu-button')}\n />\n ) : null}\n {uncappedMap((action: ButtonActionProps, key: string) => {\n return <ButtonLink {...buildActionButton(action)} key={key} />;\n }, actionButtons)}\n </div>\n </div>\n ) : null;\n};\n\nHeaderWithActions.propTypes = HeaderWithActionsPropTypes;\n\nexport default HeaderWithActions;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAO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;IAAC,aAAWjC,WAAW,CAAC,UAAU;EAAE,GAC9DiC,QACA,CAAC,GACF,IACD,CACF,CAAC,eACN3C,KAAA,CAAAqD,aAAA;IAAKC,SAAS,EAAE7C,KAAK,CAAC8D,cAAe;IAAC,aAAW7D,WAAW,CAAC,iBAAiB;EAAE,GAC7EmC,qBAAqB,IAAI,CAAC5C,OAAO,CAAC4C,qBAAqB,CAAC2B,OAAO,CAAC,gBAC/DxE,KAAA,CAAAqD,aAAA,CAAC9C,qBAAqB,EAAAmD,QAAA,KAChBb,qBAAqB;IACzB2B,OAAO,EAAE5D,WAAW,CAACQ,eAAe,EAAEyB,qBAAqB,CAAC2B,OAAO,CAAE;IACrE,aAAW9D,WAAW,CAAC,0BAA0B;EAAE,EACpD,CAAC,GACA,IAAI,EACPE,WAAW,CAAC,CAAC6D,MAAyB,EAAEJ,GAAW,KAAK;IACvD,oBAAOrE,KAAA,CAAAqD,aAAA,CAAClD,UAAU,EAAAuD,QAAA,KAAK3B,iBAAiB,CAAC0C,MAAM,CAAC;MAAEJ,GAAG,EAAEA;IAAI,EAAE,CAAC;EAChE,CAAC,EAAEvB,aAAa,CACb,CACF,CAAC,GACJ,IAAI;AACV,CAAC;AAEDT,iBAAiB,CAACqC,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGrE,0BAA0B;AAExD,eAAe6B,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","isEmpty","map","ButtonLink","ButtonLinkIcon","Tag","AssignmentStatusTag","BulletPointMenuButton","SplitButton","HeaderWithActionsPropTypes","style","getDataName","suffix","uncappedMap","convert","cap","buildCloseButton","onClick","ariaLabel","size","icon","buildButtonMenu","dataName","label","iconName","iconColor","buttonLinkType","position","faIcon","name","color","type","buildActionButton","disabled","base","customStyle","fontWeight","borderRadius","HeaderWithActions","props","closeButton","title","tag","tags","subtitle","saveStatus","bulletPointMenuButton","actionButtons","isFetching","hasSubtitle","Boolean","trim","hasAdditionalContent","undefined","createElement","className","headerWrapper","extendedTitleAndButtonWrapper","titleAndButtonWrapper","_extends","button","extendedTitleWrapper","titleWrapper","statusWrapper","display","assignmentTitleRow","assignmentTitle","assignmentTags","assignmentTag","index","key","status","includes","multilineSubtitle","buttonsWrapper","buttons","action","menu","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/header-with-actions/index.tsx"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport map from 'lodash/fp/map';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Tag from '../../atom/tag';\nimport AssignmentStatusTag from '../../molecule/assignment-status-tag';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport SplitButton from '../../molecule/split-button';\nimport HeaderWithActionsPropTypes, {\n HeaderWithActionsProps,\n ButtonMenuProps,\n ButtonActionProps\n} from './types';\nimport style from './style.css';\n\nconst getDataName = (suffix: string) => `header-with-actions-${suffix}`;\n// @ts-expect-error (need to get the index)\nconst uncappedMap = map.convert({cap: false});\n\nconst buildCloseButton = ({onClick, ariaLabel}: {onClick: () => void; ariaLabel: string}) => {\n return {\n size: 'default',\n icon: 'close',\n 'data-name': 'close-button',\n 'aria-label': ariaLabel,\n onClick\n };\n};\n\nconst buildButtonMenu = ({dataName, label, iconName, iconColor, onClick}: ButtonMenuProps) => {\n return {\n 'data-name': dataName,\n label,\n buttonLinkType: 'tertiary',\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n },\n onClick,\n type: iconName === 'trash' ? 'dangerousLeft' : 'defaultLeft'\n };\n};\n\nconst buildActionButton = ({\n type,\n label,\n onClick,\n disabled,\n iconName,\n iconColor\n}: ButtonActionProps) => {\n const base = {\n type,\n label,\n onClick,\n disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px'\n }\n };\n\n if (iconName && iconColor) {\n return {\n ...base,\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n }\n };\n }\n\n return base;\n};\n\nconst HeaderWithActions = (props: HeaderWithActionsProps) => {\n const {\n closeButton,\n title,\n tag,\n tags,\n subtitle,\n saveStatus,\n bulletPointMenuButton,\n actionButtons,\n isFetching = false\n } = props;\n const hasSubtitle = Boolean(subtitle?.trim());\n const hasAdditionalContent = tags !== undefined || hasSubtitle;\n\n return !isFetching ? (\n <div className={style.headerWrapper} data-name={getDataName('wrapper')}>\n <div\n className={\n hasAdditionalContent ? style.extendedTitleAndButtonWrapper : style.titleAndButtonWrapper\n }\n data-name={getDataName('title-and-button-wrapper')}\n >\n <ButtonLinkIcon\n {...buildCloseButton({\n onClick: closeButton.onClick,\n ariaLabel: closeButton['aria-label']\n })}\n className={style.button}\n />\n <div className={hasAdditionalContent ? style.extendedTitleWrapper : style.titleWrapper}>\n <div className={style.statusWrapper}>\n {tags === undefined && tag ? <Tag {...tag} /> : null}\n {saveStatus?.display && saveStatus.label ? (\n <p className={style.saveStatus}>{saveStatus.label}</p>\n ) : null}\n </div>\n {tags !== undefined ? (\n <div className={style.assignmentTitleRow}>\n <h3 className={style.assignmentTitle} data-name={getDataName('title')}>\n {title}\n </h3>\n <div className={style.assignmentTags} data-name={getDataName('tags')}>\n {tags.map((assignmentTag, index) => (\n <AssignmentStatusTag\n {...assignmentTag}\n key={`${assignmentTag.status}-${assignmentTag.label}-${index}`}\n />\n ))}\n </div>\n </div>\n ) : (\n <h3 className={style.title} data-name={getDataName('title')}>\n {title}\n </h3>\n )}\n {hasSubtitle ? (\n <p\n className={subtitle?.includes('\\n') ? style.multilineSubtitle : style.subtitle}\n data-name={getDataName('subtitle')}\n >\n {subtitle}\n </p>\n ) : null}\n </div>\n </div>\n <div className={style.buttonsWrapper} data-name={getDataName('buttons-wrapper')}>\n {bulletPointMenuButton && !isEmpty(bulletPointMenuButton.buttons) ? (\n <BulletPointMenuButton\n {...bulletPointMenuButton}\n buttons={uncappedMap(buildButtonMenu, bulletPointMenuButton.buttons)}\n data-name={getDataName('bullet-point-menu-button')}\n />\n ) : null}\n {uncappedMap((action: ButtonActionProps, key: string) => {\n if (action.menu) return <SplitButton {...action} menu={action.menu} key={key} />;\n return <ButtonLink {...buildActionButton(action)} key={key} />;\n }, actionButtons)}\n </div>\n </div>\n ) : null;\n};\n\nHeaderWithActions.propTypes = HeaderWithActionsPropTypes;\n\nexport default HeaderWithActions;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,GAAG,MAAM,gBAAgB;AAChC,OAAOC,mBAAmB,MAAM,sCAAsC;AACtE,OAAOC,qBAAqB,MAAM,yCAAyC;AAC3E,OAAOC,WAAW,MAAM,6BAA6B;AACrD,OAAOC,0BAA0B,MAI1B,SAAS;AAChB,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,WAAW,GAAIC,MAAc,IAAK,uBAAuBA,MAAM,EAAE;AACvE;AACA,MAAMC,WAAW,GAAGX,GAAG,CAACY,OAAO,CAAC;EAACC,GAAG,EAAE;AAAK,CAAC,CAAC;AAE7C,MAAMC,gBAAgB,GAAGA,CAAC;EAACC,OAAO;EAAEC;AAAmD,CAAC,KAAK;EAC3F,OAAO;IACLC,IAAI,EAAE,SAAS;IACfC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,cAAc;IAC3B,YAAY,EAAEF,SAAS;IACvBD;EACF,CAAC;AACH,CAAC;AAED,MAAMI,eAAe,GAAGA,CAAC;EAACC,QAAQ;EAAEC,KAAK;EAAEC,QAAQ;EAAEC,SAAS;EAAER;AAAwB,CAAC,KAAK;EAC5F,OAAO;IACL,WAAW,EAAEK,QAAQ;IACrBC,KAAK;IACLG,cAAc,EAAE,UAAU;IAC1BN,IAAI,EAAE;MACJO,QAAQ,EA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AAA,CAAAsD,aAAA,CAACnD,UAAU,EAAAwD,QAAA,KAAK3B,iBAAiB,CAAC4C,MAAM,CAAC;MAAEN,GAAG,EAAEA;IAAI,EAAE,CAAC;EAChE,CAAC,EAAEvB,aAAa,CACb,CACF,CAAC,GACJ,IAAI;AACV,CAAC;AAEDT,iBAAiB,CAACwC,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGxE,0BAA0B;AAExD,eAAe6B,iBAAiB","ignoreList":[]}
@@ -95,3 +95,11 @@
95
95
  overflow: hidden;
96
96
  text-overflow: ellipsis;
97
97
  }
98
+
99
+ .multilineSubtitle {
100
+ composes: subtitle;
101
+ white-space: pre-line;
102
+ overflow: visible;
103
+ overflow-wrap: anywhere;
104
+ text-overflow: clip;
105
+ }