akeneo-design-system 0.1.228 → 0.1.230

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. package/lib/components/Dropdown/Item/Item.js +1 -1
  2. package/lib/components/Dropdown/Item/Item.js.map +1 -1
  3. package/lib/components/Input/MultiSelectInput/ChipInput.d.ts +1 -0
  4. package/lib/components/Input/MultiSelectInput/ChipInput.js +9 -7
  5. package/lib/components/Input/MultiSelectInput/ChipInput.js.map +1 -1
  6. package/lib/components/Input/MultiSelectInput/MultiSelectInput.d.ts +2 -1
  7. package/lib/components/Input/MultiSelectInput/MultiSelectInput.js +4 -4
  8. package/lib/components/Input/MultiSelectInput/MultiSelectInput.js.map +1 -1
  9. package/lib/components/KeyFigure/KeyFigure.js +1 -1
  10. package/lib/components/KeyFigure/KeyFigure.js.map +1 -1
  11. package/lib/components/ProgressBar/ProgressBar.js +4 -4
  12. package/lib/components/ProgressBar/ProgressBar.js.map +1 -1
  13. package/lib/components/SwitcherButton/SwitcherButton.js +1 -1
  14. package/lib/components/SwitcherButton/SwitcherButton.js.map +1 -1
  15. package/lib/components/Table/Table.d.ts +3 -2
  16. package/lib/components/Table/Table.js +2 -2
  17. package/lib/components/Table/Table.js.map +1 -1
  18. package/lib/components/Table/TableContext.d.ts +1 -0
  19. package/lib/components/Table/TableContext.js +1 -0
  20. package/lib/components/Table/TableContext.js.map +1 -1
  21. package/lib/components/Table/TableHeader/TableHeader.js +6 -4
  22. package/lib/components/Table/TableHeader/TableHeader.js.map +1 -1
  23. package/lib/components/Table/TableRow/TableRow.d.ts +2 -2
  24. package/lib/components/Table/TableRow/TableRow.js +19 -9
  25. package/lib/components/Table/TableRow/TableRow.js.map +1 -1
  26. package/lib/components/Tooltip/Tooltip.d.ts +4 -1
  27. package/lib/components/Tooltip/Tooltip.js +3 -1
  28. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  29. package/lib/icons/ChecklistIcon.d.ts +4 -0
  30. package/lib/icons/ChecklistIcon.js +38 -0
  31. package/lib/icons/ChecklistIcon.js.map +1 -0
  32. package/lib/icons/WorkflowIcon.d.ts +4 -0
  33. package/lib/icons/WorkflowIcon.js +40 -0
  34. package/lib/icons/WorkflowIcon.js.map +1 -0
  35. package/lib/icons/index.d.ts +2 -0
  36. package/lib/icons/index.js +2 -0
  37. package/lib/icons/index.js.map +1 -1
  38. package/package.json +1 -1
  39. package/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-inputs-multi-select-input-locked-values-correctly-1-snap.png +0 -0
  40. package/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-progress-bar-width-correctly-1-snap.png +0 -0
  41. package/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-table-warning-and-locked-rows-correctly-1-snap.png +0 -0
  42. package/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-tooltip-with-title-correctly-1-snap.png +0 -0
  43. package/src/components/Dropdown/Item/Item.tsx +1 -0
  44. package/src/components/Input/MultiSelectInput/ChipInput.tsx +14 -4
  45. package/src/components/Input/MultiSelectInput/MultiSelectInput.stories.mdx +24 -0
  46. package/src/components/Input/MultiSelectInput/MultiSelectInput.tsx +7 -0
  47. package/src/components/Input/MultiSelectInput/MultiSelectInput.unit.tsx +20 -0
  48. package/src/components/KeyFigure/KeyFigure.stories.mdx +5 -1
  49. package/src/components/KeyFigure/KeyFigure.tsx +2 -0
  50. package/src/components/ProgressBar/ProgressBar.tsx +4 -22
  51. package/src/components/SwitcherButton/SwitcherButton.tsx +1 -1
  52. package/src/components/Table/Table.stories.mdx +17 -3
  53. package/src/components/Table/Table.tsx +8 -2
  54. package/src/components/Table/TableContext.ts +2 -0
  55. package/src/components/Table/TableHeader/TableHeader.tsx +6 -1
  56. package/src/components/Table/TableRow/TableRow.tsx +38 -13
  57. package/src/components/Table/TableRow/TableRow.unit.tsx +30 -0
  58. package/src/components/Tooltip/Tooltip.stories.mdx +15 -0
  59. package/src/components/Tooltip/Tooltip.tsx +9 -1
  60. package/src/icons/ChecklistIcon.tsx +16 -0
  61. package/src/icons/WorkflowIcon.tsx +39 -0
  62. package/src/icons/index.ts +2 -0
@@ -43,3 +43,18 @@ It's a complementary information that will help the user better understand what
43
43
  </Canvas>
44
44
 
45
45
  <ArgsTable story="Standard" />
46
+
47
+ ## With a title
48
+
49
+ <Canvas>
50
+ <Story name="With title">
51
+ {args => {
52
+ return (
53
+ <Tooltip>
54
+ <Tooltip.Title>My wonderful title</Tooltip.Title>
55
+ The rest of the amazing content
56
+ </Tooltip>
57
+ );
58
+ }}
59
+ </Story>
60
+ </Canvas>
@@ -40,6 +40,12 @@ const TooltipContent = styled.div<{direction: Direction; width: number; top: num
40
40
  opacity: ${({top, left}) => (-1 === top && -1 === left ? 0 : 1)};
41
41
  `;
42
42
 
43
+ const TooltipTitle = styled.div`
44
+ color: ${getColor('blue', 120)};
45
+ font-weight: 700;
46
+ margin-bottom: 5px;
47
+ `;
48
+
43
49
  const computePosition = (
44
50
  direction: Direction,
45
51
  parentRef?: RefObject<HTMLDivElement>,
@@ -104,7 +110,7 @@ export type TooltipProps = Override<
104
110
  }
105
111
  >;
106
112
 
107
- const Tooltip: React.FC<TooltipProps> = ({direction = 'top', iconSize = 24, width = 200, children, ...rest}) => {
113
+ const Tooltip = ({direction = 'top', iconSize = 24, width = 200, children, ...rest}: TooltipProps) => {
108
114
  const [isVisible, showTooltip, hideTooltip] = useBooleanState(false);
109
115
  const portalNode = document.createElement('div');
110
116
  portalNode.setAttribute('id', 'tooltip-root');
@@ -148,4 +154,6 @@ const Tooltip: React.FC<TooltipProps> = ({direction = 'top', iconSize = 24, widt
148
154
  );
149
155
  };
150
156
 
157
+ Tooltip.Title = TooltipTitle;
158
+
151
159
  export {Tooltip};
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import {IconProps} from './IconProps';
3
+
4
+ const ChecklistIcon = ({title, size = 24, color = 'currentColor', ...props}: IconProps) => (
5
+ <svg viewBox="0 0 24 24" width={size} height={size} {...props}>
6
+ {title && <title>{title}</title>}
7
+ <g stroke="none" strokeWidth="1" fill="none" fillRule="evenodd" strokeLinecap="round" strokeLinejoin="round">
8
+ <path
9
+ d="M9.48723 4.21967C9.78012 4.51256 9.78012 4.98744 9.48723 5.28033L6.0564 8.71115C5.37299 9.39457 4.26495 9.39457 3.58153 8.71115L2.21967 7.3493C1.92678 7.0564 1.92678 6.58153 2.21967 6.28864C2.51256 5.99574 2.98744 5.99574 3.28033 6.28864L4.64219 7.65049C4.73982 7.74812 4.89811 7.74813 4.99574 7.65049L8.42657 4.21967C8.71946 3.92678 9.19433 3.92678 9.48723 4.21967ZM12 6.68066C12 6.40452 12.2239 6.18066 12.5 6.18066H21.5C21.7761 6.18066 22 6.40452 22 6.68066C22 6.95681 21.7761 7.18066 21.5 7.18066H12.5C12.2239 7.18066 12 6.95681 12 6.68066ZM10 12.6807C10 12.4045 10.2239 12.1807 10.5 12.1807H21.5C21.7761 12.1807 22 12.4045 22 12.6807C22 12.9568 21.7761 13.1807 21.5 13.1807H10.5C10.2239 13.1807 10 12.9568 10 12.6807ZM10 18.6807C10 18.4045 10.2239 18.1807 10.5 18.1807H21.5C21.7761 18.1807 22 18.4045 22 18.6807C22 18.9568 21.7761 19.1807 21.5 19.1807H10.5C10.2239 19.1807 10 18.9568 10 18.6807ZM6.47409 18.681C6.47409 17.9954 5.91831 17.4396 5.23271 17.4396C4.54712 17.4396 3.99133 17.9954 3.99133 18.681C3.99133 19.3666 4.54712 19.9224 5.23271 19.9224C5.91831 19.9224 6.47409 19.3666 6.47409 18.681ZM6.47409 12.6807C6.47409 11.9951 5.91831 11.4393 5.23271 11.4393C4.54712 11.4393 3.99133 11.9951 3.99133 12.6807C3.99133 13.3663 4.54712 13.922 5.23271 13.922C5.91831 13.922 6.47409 13.3663 6.47409 12.6807Z"
10
+ stroke={color}
11
+ />
12
+ </g>
13
+ </svg>
14
+ );
15
+
16
+ export {ChecklistIcon};
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import {IconProps} from './IconProps';
3
+
4
+ const WorkflowIcon = ({title, size = 24, color = 'currentColor', ...props}: IconProps) => (
5
+ <svg viewBox="0 0 24 24" width={size} height={size} {...props}>
6
+ <path
7
+ fillRule="evenodd"
8
+ clipRule="evenodd"
9
+ d="M17.1379 5.49999H8V4.49999H17.1379C19.2709 4.49999 21 6.29085 21 8.49999C21 10.7091 19.2709 12.5 17.1379 12.5H14V11.5H17.1379C18.7377 11.5 20.0345 10.1568 20.0345 8.49999C20.0345 6.84313 18.7377 5.49999 17.1379 5.49999Z"
10
+ fill={color}
11
+ />
12
+ <path
13
+ fillRule="evenodd"
14
+ clipRule="evenodd"
15
+ d="M5.88571 18H19.3408L19.83 18.5L19.3408 19H5.88571C3.73969 19 2 17.7091 2 15.5C2 13.2908 3.73969 11.5 5.88571 11.5H8V12.5H5.88571C4.2762 12.5 2.97143 13.8431 2.97143 15.5C2.97143 17.1568 4.2762 18 5.88571 18Z"
16
+ fill={color}
17
+ />
18
+ <path
19
+ fillRule="evenodd"
20
+ clipRule="evenodd"
21
+ d="M7 3H3L3 7H7V3ZM3 2C2.44772 2 2 2.44772 2 3V7C2 7.55228 2.44772 8 3 8H7C7.55228 8 8 7.55228 8 7V3C8 2.44772 7.55228 2 7 2H3Z"
22
+ fill={color}
23
+ />
24
+ <path
25
+ fillRule="evenodd"
26
+ clipRule="evenodd"
27
+ d="M13 10.2H9V13.8H13V10.2ZM9 9C8.44772 9 8 9.53726 8 10.2V13.8C8 14.4627 8.44772 15 9 15H13C13.5523 15 14 14.4627 14 13.8V10.2C14 9.53726 13.5523 9 13 9H9Z"
28
+ fill={color}
29
+ />
30
+ <path
31
+ fillRule="evenodd"
32
+ clipRule="evenodd"
33
+ d="M20.8731 18.1966C21.0423 18.3695 21.0423 18.6305 20.8731 18.8034L18.8731 20.8476C18.6893 21.0355 18.3733 21.0519 18.1672 20.8843C17.9611 20.7168 17.9431 20.4286 18.1269 20.2407L19.83 18.5L18.1269 16.7593C17.9431 16.5714 17.9611 16.2832 18.1672 16.1157C18.3733 15.9481 18.6893 15.9645 18.8731 16.1524L20.8731 18.1966Z"
34
+ fill={color}
35
+ />
36
+ </svg>
37
+ );
38
+
39
+ export {WorkflowIcon};
@@ -51,6 +51,7 @@ export * from './DownloadIcon';
51
51
  export * from './DragDropIcon';
52
52
  export * from './EditIcon';
53
53
  export * from './EntityIcon';
54
+ export * from './ChecklistIcon';
54
55
  export * from './EntityMultiIcon';
55
56
  export * from './EraseIcon';
56
57
  export * from './ExpandIcon';
@@ -119,3 +120,4 @@ export * from './UserIcon';
119
120
  export * from './ValueIcon';
120
121
  export * from './ViewIcon';
121
122
  export * from './WaveIcon';
123
+ export * from './WorkflowIcon';