venice-ui 1.1.5 → 1.2.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/cjs/Theme/Theme.js +3 -1
  2. package/dist/cjs/components/Chips/Chips.js +1 -1
  3. package/dist/cjs/components/DropdownMenu/DropdownMenu.js +3 -2
  4. package/dist/cjs/components/ElementHeader/ElementHeader.js +2 -2
  5. package/dist/cjs/components/Filters/Filters.js +1 -1
  6. package/dist/cjs/components/Icons/Icon.js +5 -3
  7. package/dist/cjs/components/Icons/Icon.styles.js +6 -29
  8. package/dist/cjs/components/Icons/IconsPath.js +5 -3
  9. package/dist/cjs/components/Input/Input.js +23 -3
  10. package/dist/cjs/components/Input/Input.styles.js +38 -26
  11. package/dist/cjs/components/Section/Section.js +5 -3
  12. package/dist/cjs/components/Section/Section.styles.js +17 -11
  13. package/dist/cjs/components/Table/Table.js +2 -2
  14. package/dist/esm/Theme/Theme.js +3 -1
  15. package/dist/esm/components/Chips/Chips.js +1 -1
  16. package/dist/esm/components/DropdownMenu/DropdownMenu.js +4 -3
  17. package/dist/esm/components/ElementHeader/ElementHeader.js +2 -2
  18. package/dist/esm/components/Filters/Filters.js +1 -1
  19. package/dist/esm/components/Icons/Icon.js +5 -3
  20. package/dist/esm/components/Icons/Icon.styles.js +6 -29
  21. package/dist/esm/components/Icons/IconsPath.js +5 -3
  22. package/dist/esm/components/Input/Input.js +24 -4
  23. package/dist/esm/components/Input/Input.styles.js +41 -29
  24. package/dist/esm/components/Section/Section.js +5 -3
  25. package/dist/esm/components/Section/Section.styles.js +19 -13
  26. package/dist/esm/components/Table/Table.js +2 -2
  27. package/dist/types/Theme/Theme.d.ts +3 -1
  28. package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +3 -2
  29. package/dist/types/components/Icons/Icon.d.ts +5 -4
  30. package/dist/types/components/Icons/Icon.styles.d.ts +5 -3
  31. package/dist/types/components/Icons/IconsPath.d.ts +2 -0
  32. package/dist/types/components/Input/Input.styles.d.ts +4 -2
  33. package/dist/types/components/Section/Section.d.ts +2 -0
  34. package/dist/types/components/Section/Section.styles.d.ts +1 -0
  35. package/dist/types/types/types.d.ts +1 -1
  36. package/package.json +1 -1
@@ -72,8 +72,10 @@ exports.mainTheme = {
72
72
  disabledText: exports.Theme.colors.gray_1,
73
73
  //icon
74
74
  iconColor: exports.Theme.colors.text,
75
+ iconHoverColor: exports.Theme.colors.primary,
76
+ iconBgColor: 'transparent',
75
77
  iconDisabledColor: exports.Theme.colors.gray_4,
76
- iconHoverColor: exports.Theme.colors.primary_10,
78
+ iconBgHoverColor: exports.Theme.colors.primary_10,
77
79
  //text
78
80
  textColor: exports.Theme.colors.text,
79
81
  // input
@@ -15,6 +15,6 @@ const Chips = ({ theme = Theme_1.mainTheme, label, handleClose, }) => {
15
15
  react_1.default.createElement(Chips_styles_1.ChipsElement, { onClick: () => handleClose() },
16
16
  react_1.default.createElement(Aligment_1.Aligment, { gap: 4 },
17
17
  react_1.default.createElement(Chips_styles_1.ChipsLabel, null, label),
18
- react_1.default.createElement(Icons_1.Icon, { name: 'close', color: theme.chipsNeutralTextColor, size: 14 })))));
18
+ react_1.default.createElement(Icons_1.Icon, { name: "close", iconColor: theme.chipsNeutralTextColor, iconHoverColor: theme.chipsNeutralTextColor, iconBgHoverColor: theme.iconBgColor, size: 14 })))));
19
19
  };
20
20
  exports.Chips = Chips;
@@ -31,7 +31,7 @@ const Icons_1 = require("../Icons");
31
31
  const DropdownMenu_styles_1 = require("./DropdownMenu.styles");
32
32
  const Aligment_1 = require("../Aligment");
33
33
  const Typography_1 = require("../Typography");
34
- const DropdownMenu = ({ size = 'medium', iconName = 'more_vert', color = Theme_1.Theme.colors.text, header = false, headerTitle, headerSubtitle, footer = false, footerText, footerAction, options, right = false, left = false, iconInverseMode = false, iconHoverColor = Theme_1.Theme.colors.primary_10, targetID }) => {
34
+ const DropdownMenu = ({ size = 'medium', iconName = 'more_vert', header = false, headerTitle, headerSubtitle, footer = false, footerText, footerAction, options, right = false, left = false, targetID, iconColor = Theme_1.mainTheme.iconColor, iconHoverColor = Theme_1.mainTheme.iconHoverColor, iconBgColor = Theme_1.mainTheme.iconBgColor, iconBgHoverColor = Theme_1.mainTheme.iconBgHoverColor, }) => {
35
35
  const [open, toogleOpen] = (0, react_1.useState)(false);
36
36
  const ref = (0, react_1.useRef)(null);
37
37
  const close = () => {
@@ -56,8 +56,9 @@ const DropdownMenu = ({ size = 'medium', iconName = 'more_vert', color = Theme_1
56
56
  document.removeEventListener('click', handleClickOutside, true);
57
57
  };
58
58
  }, [open]);
59
+ console.log(open);
59
60
  return (react_1.default.createElement(DropdownMenu_styles_1.DropdownMenuElement, null,
60
- react_1.default.createElement(Icons_1.Icon, { name: iconName, onClick: () => toogleOpen(!open), color: color, hoverColor: iconHoverColor, size: (0, common_1.setIconSize)(size), active: open, right: right, left: left, inverseMode: iconInverseMode }),
61
+ react_1.default.createElement(Icons_1.Icon, { name: iconName, onClick: () => toogleOpen(!open), size: (0, common_1.setIconSize)(size), isActive: open, right: right, left: left, iconColor: iconColor, iconHoverColor: iconHoverColor, iconBgColor: iconBgColor, iconBgHoverColor: iconBgHoverColor }),
61
62
  open && (react_1.default.createElement(common_1.Panel, { ref: ref, size: size, position: "right" },
62
63
  react_1.default.createElement(Aligment_1.Aligment, { direction: "column" },
63
64
  header && (react_1.default.createElement(DropdownMenu_styles_1.DropdownMenuHeader, null,
@@ -24,12 +24,12 @@ const ElementHeader = ({ title, actionLabel = '', handleClose, handleClick, hand
24
24
  };
25
25
  const rightSide = () => {
26
26
  if (handleClose) {
27
- return (react_1.default.createElement(Icons_1.Icon, { onClick: () => handleClose(), name: "close", color: Theme_1.Theme.colors.text }));
27
+ return (react_1.default.createElement(Icons_1.Icon, { onClick: () => handleClose(), name: "close", iconColor: Theme_1.Theme.colors.text }));
28
28
  }
29
29
  else if (!handleClose && handleClick && actionLabel) {
30
30
  return (react_1.default.createElement(Aligment_1.Aligment, { align: "center", width: "auto" },
31
31
  react_1.default.createElement(Button_1.Button, { mode: "secondary", text: actionLabel, onClick: () => handleClick() }),
32
- options && (react_1.default.createElement(DropdownMenu_1.DropdownMenu, { options: options, right: true, color: iconColor, iconHoverColor: iconHoverColor, iconInverseMode: true }))));
32
+ options && (react_1.default.createElement(DropdownMenu_1.DropdownMenu, { options: options, right: true, iconColor: iconColor }))));
33
33
  }
34
34
  };
35
35
  return (react_1.default.createElement(Aligment_1.Aligment, { justify: !title && !children ? 'flex-end' : 'space-between', vPadding: Theme_1.Theme.padding.m, hPadding: Theme_1.Theme.padding.l, backgroundColor: backgroundColor },
@@ -177,7 +177,7 @@ const Filters = ({ theme = Theme_1.mainTheme, title = 'Select filters', labelCon
177
177
  };
178
178
  return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme },
179
179
  react_1.default.createElement(Filters_styles_1.FilterIconArea, null,
180
- react_1.default.createElement(Icons_1.Icon, { name: "filters", onClick: toogleFilter, color: setIconColor() }),
180
+ react_1.default.createElement(Icons_1.Icon, { name: "filters", onClick: toogleFilter, iconColor: setIconColor() }),
181
181
  isAnyFilterActive() && (react_1.default.createElement(Chips_1.Chips, { label: labelClearAll, handleClose: resetAllFiltersAndSubmit }))),
182
182
  openFilters && (react_1.default.createElement(Modal_1.Modal, { title: title, handleConfirm: applyFilter, handleClose: toogleFilter, handleAdditional: resetAllFilters, labelConfirm: labelConfirm, labelClose: labelClose, labelAdditional: labelClearAll },
183
183
  react_1.default.createElement(Aligment_1.Aligment, { direction: "column", align: 'flex-end' },
@@ -8,14 +8,16 @@ const react_1 = __importDefault(require("react"));
8
8
  const Theme_1 = require("../../Theme/Theme");
9
9
  const Icon_styles_1 = require("./Icon.styles");
10
10
  const IconsPath_1 = require("./IconsPath");
11
- const Icon = ({ size = 24, name, right = false, left = false, hoverColor = Theme_1.mainTheme.iconHoverColor, active = false, inverseMode = false, onClick, isDisabled = false, color = isDisabled ? Theme_1.mainTheme.iconDisabledColor : Theme_1.mainTheme.iconColor, }) => {
11
+ const Icon = ({ size = 24, name = 'person', right = false, left = false, isActive = false, onClick, isDisabled = false, iconColor = isDisabled ? Theme_1.mainTheme.iconDisabledColor : Theme_1.mainTheme.iconColor, iconHoverColor = Theme_1.mainTheme.iconHoverColor, iconBgColor = Theme_1.mainTheme.iconBgColor, iconBgHoverColor = isDisabled
12
+ ? Theme_1.mainTheme.iconBgColor
13
+ : Theme_1.mainTheme.iconBgHoverColor, }) => {
12
14
  const handleClick = () => {
13
15
  if (!isDisabled && !!onClick) {
14
16
  onClick();
15
17
  }
16
18
  };
17
- return (react_1.default.createElement(Icon_styles_1.IconElement, { onClick: handleClick, right: right, left: left, active: active, hoverColor: hoverColor, inverseMode: inverseMode, isDisabled: isDisabled },
19
+ return (react_1.default.createElement(Icon_styles_1.IconElement, { onClick: handleClick, right: right, left: left, isDisabled: isDisabled, iconColor: iconColor, iconHoverColor: iconHoverColor, iconBgColor: iconBgColor, iconBgHoverColor: iconBgHoverColor, isActive: isActive },
18
20
  react_1.default.createElement("svg", { width: size, height: size, viewBox: '0 0 24 24', preserveAspectRatio: "xMidYMid meet", x: "0", y: "0", name: name },
19
- react_1.default.createElement("path", { d: IconsPath_1.iconsPath[name], fill: color }))));
21
+ react_1.default.createElement("path", { d: IconsPath_1.iconsPath[name], fill: isActive ? iconHoverColor : iconColor }))));
20
22
  };
21
23
  exports.Icon = Icon;
@@ -15,35 +15,12 @@ exports.IconElement = styled_components_1.default.div `
15
15
  margin-left: ${(p) => (p.right ? Theme_1.Theme.padding.m : '0')};
16
16
  margin-right: ${(p) => (p.left ? Theme_1.Theme.padding.m : '0')};
17
17
  padding: 4px;
18
-
19
- ${(p) => p.onClick !== undefined &&
20
- `
21
- cursor: ${(p) => (!p.isDisabled ? 'pointer' : 'not-allowed')};
18
+ cursor: ${(p) => (!p.isDisabled ? 'pointer' : 'not-allowed')};
19
+ background-color: ${(p) => (p.isActive ? p.iconBgHoverColor : p.iconBgColor)};
20
+ :hover {
21
+ background-color: ${(p) => !p.isDisabled && p.iconBgHoverColor};
22
22
  path {
23
- fill: ${(p) => (p.color ? p.color : Theme_1.Theme.colors.primary)};
23
+ fill: ${(p) => !p.isDisabled && p.iconHoverColor};
24
24
  }
25
-
26
- ${!p.isDisabled &&
27
- `
28
- &:hover {
29
- cursor: ${(!p.isDisabled ? 'pointer' : 'not-allowed')};
30
- ${!p.inverseMode
31
- ? `
32
- background-color: ${p.hoverColor};
33
- `
34
- : `
35
- path {
36
- fill: ${p.hoverColor};
37
- }
38
- `}
39
- }
40
- `}
41
- `}
42
-
43
- ${(p) => p.active &&
44
- `
45
- background-color: ${p.hoverColor};
46
- path {
47
- }
48
- `}
25
+ }
49
26
  `;
@@ -34,10 +34,12 @@ exports.iconsPath = {
34
34
  unlock: 'M6 8h9V6q0-1.25-.875-2.125T12 3q-1.25 0-2.125.875T9 6H7q0-2.075 1.463-3.538Q9.925 1 12 1t3.538 1.462Q17 3.925 17 6v2h1q.825 0 1.413.587Q20 9.175 20 10v10q0 .825-.587 1.413Q18.825 22 18 22H6q-.825 0-1.412-.587Q4 20.825 4 20V10q0-.825.588-1.413Q5.175 8 6 8Zm0 12h12V10H6v10Zm6-3q.825 0 1.413-.587Q14 15.825 14 15q0-.825-.587-1.413Q12.825 13 12 13q-.825 0-1.412.587Q10 14.175 10 15q0 .825.588 1.413Q11.175 17 12 17Zm-6 3V10v10Z',
35
35
  lock: 'M6 22q-.825 0-1.412-.587Q4 20.825 4 20V10q0-.825.588-1.413Q5.175 8 6 8h1V6q0-2.075 1.463-3.538Q9.925 1 12 1t3.538 1.462Q17 3.925 17 6v2h1q.825 0 1.413.587Q20 9.175 20 10v10q0 .825-.587 1.413Q18.825 22 18 22Zm0-2h12V10H6v10Zm6-3q.825 0 1.413-.587Q14 15.825 14 15q0-.825-.587-1.413Q12.825 13 12 13q-.825 0-1.412.587Q10 14.175 10 15q0 .825.588 1.413Q11.175 17 12 17ZM9 8h6V6q0-1.25-.875-2.125T12 3q-1.25 0-2.125.875T9 6ZM6 20V10v10Z',
36
36
  person: 'M12 12q-1.65 0-2.825-1.175Q8 9.65 8 8q0-1.65 1.175-2.825Q10.35 4 12 4q1.65 0 2.825 1.175Q16 6.35 16 8q0 1.65-1.175 2.825Q13.65 12 12 12Zm-8 8v-2.8q0-.85.438-1.563.437-.712 1.162-1.087 1.55-.775 3.15-1.163Q10.35 13 12 13t3.25.387q1.6.388 3.15 1.163.725.375 1.162 1.087Q20 16.35 20 17.2V20Zm2-2h12v-.8q0-.275-.137-.5-.138-.225-.363-.35-1.35-.675-2.725-1.013Q13.4 15 12 15t-2.775.337Q7.85 15.675 6.5 16.35q-.225.125-.362.35-.138.225-.138.5Zm6-8q.825 0 1.413-.588Q14 8.825 14 8t-.587-1.412Q12.825 6 12 6q-.825 0-1.412.588Q10 7.175 10 8t.588 1.412Q11.175 10 12 10Zm0-2Zm0 10Z',
37
- radio_checked: 'M10 15C11.3833 15 12.5625 14.5125 13.5375 13.5375C14.5125 12.5625 15 11.3833 15 10C15 8.61667 14.5125 7.4375 13.5375 6.4625C12.5625 5.4875 11.3833 5 10 5C8.61667 5 7.4375 5.4875 6.4625 6.4625C5.4875 7.4375 5 8.61667 5 10C5 11.3833 5.4875 12.5625 6.4625 13.5375C7.4375 14.5125 8.61667 15 10 15ZM10 20C8.61667 20 7.31667 19.7375 6.1 19.2125C4.88333 18.6875 3.825 17.975 2.925 17.075C2.025 16.175 1.3125 15.1167 0.7875 13.9C0.2625 12.6833 0 11.3833 0 10C0 8.61667 0.2625 7.31667 0.7875 6.1C1.3125 4.88333 2.025 3.825 2.925 2.925C3.825 2.025 4.88333 1.3125 6.1 0.7875C7.31667 0.2625 8.61667 0 10 0C11.3833 0 12.6833 0.2625 13.9 0.7875C15.1167 1.3125 16.175 2.025 17.075 2.925C17.975 3.825 18.6875 4.88333 19.2125 6.1C19.7375 7.31667 20 8.61667 20 10C20 11.3833 19.7375 12.6833 19.2125 13.9C18.6875 15.1167 17.975 16.175 17.075 17.075C16.175 17.975 15.1167 18.6875 13.9 19.2125C12.6833 19.7375 11.3833 20 10 20ZM10 18C12.2333 18 14.125 17.225 15.675 15.675C17.225 14.125 18 12.2333 18 10C18 7.76667 17.225 5.875 15.675 4.325C14.125 2.775 12.2333 2 10 2C7.76667 2 5.875 2.775 4.325 4.325C2.775 5.875 2 7.76667 2 10C2 12.2333 2.775 14.125 4.325 15.675C5.875 17.225 7.76667 18 10 18Z',
38
- radio_unchecked: 'M10 20C8.61667 20 7.31667 19.7375 6.1 19.2125C4.88333 18.6875 3.825 17.975 2.925 17.075C2.025 16.175 1.3125 15.1167 0.7875 13.9C0.2625 12.6833 0 11.3833 0 10C0 8.61667 0.2625 7.31667 0.7875 6.1C1.3125 4.88333 2.025 3.825 2.925 2.925C3.825 2.025 4.88333 1.3125 6.1 0.7875C7.31667 0.2625 8.61667 0 10 0C11.3833 0 12.6833 0.2625 13.9 0.7875C15.1167 1.3125 16.175 2.025 17.075 2.925C17.975 3.825 18.6875 4.88333 19.2125 6.1C19.7375 7.31667 20 8.61667 20 10C20 11.3833 19.7375 12.6833 19.2125 13.9C18.6875 15.1167 17.975 16.175 17.075 17.075C16.175 17.975 15.1167 18.6875 13.9 19.2125C12.6833 19.7375 11.3833 20 10 20ZM10 18C12.2333 18 14.125 17.225 15.675 15.675C17.225 14.125 18 12.2333 18 10C18 7.76667 17.225 5.875 15.675 4.325C14.125 2.775 12.2333 2 10 2C7.76667 2 5.875 2.775 4.325 4.325C2.775 5.875 2 7.76667 2 10C2 12.2333 2.775 14.125 4.325 15.675C5.875 17.225 7.76667 18 10 18Z',
37
+ radio_checked: 'M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20ZM12 17C14.7614 17 17 14.7614 17 12C17 9.23858 14.7614 7 12 7C9.23858 7 7 9.23858 7 12C7 14.7614 9.23858 17 12 17Z',
38
+ radio_unchecked: 'M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z',
39
+ remove: 'M19 13H5V11H19V13Z',
40
+ remove_circle: 'M7 11V13H17V11H7ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z',
39
41
  new_tab: 'M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H12V5H5V19H19V12H21V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM9.7 15.7L8.3 14.3L17.6 5H14V3H21V10H19V6.4L9.7 15.7Z',
40
- triage: "M12 7.77L18.39 18H5.61L12 7.77ZM12 4L2 20H22L12 4Z",
42
+ triage: 'M12 7.77L18.39 18H5.61L12 7.77ZM12 4L2 20H22L12 4Z',
41
43
  upgrade: 'M8.6 22.5L6.7 19.3L3.1 18.5L3.45 14.8L1 12L3.45 9.2L3.1 5.5L6.7 4.7L8.6 1.5L12 2.95L15.4 1.5L17.3 4.7L20.9 5.5L20.55 9.2L23 12L20.55 14.8L20.9 18.5L17.3 19.3L15.4 22.5L12 21.05L8.6 22.5ZM9.45 19.95L12 18.85L14.6 19.95L16 17.55L18.75 16.9L18.5 14.1L20.35 12L18.5 9.85L18.75 7.05L16 6.45L14.55 4.05L12 5.15L9.4 4.05L8 6.45L5.25 7.05L5.5 9.85L3.65 12L5.5 14.1L5.25 16.95L8 17.55L9.45 19.95ZM10.95 15.55L16.6 9.9L15.2 8.45L10.95 12.7L8.8 10.6L7.4 12L10.95 15.55Z',
42
44
  visibility: 'M12 16q1.875 0 3.188-1.312Q16.5 13.375 16.5 11.5q0-1.875-1.312-3.188Q13.875 7 12 7q-1.875 0-3.188 1.312Q7.5 9.625 7.5 11.5q0 1.875 1.312 3.188Q10.125 16 12 16Zm0-1.8q-1.125 0-1.912-.788Q9.3 12.625 9.3 11.5t.788-1.913Q10.875 8.8 12 8.8t1.913.787q.787.788.787 1.913t-.787 1.912q-.788.788-1.913.788Zm0 4.8q-3.65 0-6.65-2.038-3-2.037-4.35-5.462 1.35-3.425 4.35-5.463Q8.35 4 12 4q3.65 0 6.65 2.037 3 2.038 4.35 5.463-1.35 3.425-4.35 5.462Q15.65 19 12 19Zm0-7.5Zm0 5.5q2.825 0 5.188-1.488Q19.55 14.025 20.8 11.5q-1.25-2.525-3.612-4.013Q14.825 6 12 6 9.175 6 6.812 7.487 4.45 8.975 3.2 11.5q1.25 2.525 3.612 4.012Q9.175 17 12 17Z',
43
45
  visability_off: 'M16.1 13.3L14.65 11.85C14.8 11.0667 14.575 10.3333 13.975 9.65C13.375 8.96667 12.6 8.7 11.65 8.85L10.2 7.4C10.4833 7.26667 10.7708 7.16667 11.0625 7.1C11.3542 7.03333 11.6667 7 12 7C13.25 7 14.3125 7.4375 15.1875 8.3125C16.0625 9.1875 16.5 10.25 16.5 11.5C16.5 11.8333 16.4667 12.1458 16.4 12.4375C16.3333 12.7292 16.2333 13.0167 16.1 13.3ZM19.3 16.45L17.85 15.05C18.4833 14.5667 19.0458 14.0375 19.5375 13.4625C20.0292 12.8875 20.45 12.2333 20.8 11.5C19.9667 9.81667 18.7708 8.47917 17.2125 7.4875C15.6542 6.49583 13.9167 6 12 6C11.5167 6 11.0417 6.03333 10.575 6.1C10.1083 6.16667 9.65 6.26667 9.2 6.4L7.65 4.85C8.33333 4.56667 9.03333 4.35417 9.75 4.2125C10.4667 4.07083 11.2167 4 12 4C14.5167 4 16.7583 4.69583 18.725 6.0875C20.6917 7.47917 22.1167 9.28333 23 11.5C22.6167 12.4833 22.1125 13.3958 21.4875 14.2375C20.8625 15.0792 20.1333 15.8167 19.3 16.45ZM19.8 22.6L15.6 18.45C15.0167 18.6333 14.4292 18.7708 13.8375 18.8625C13.2458 18.9542 12.6333 19 12 19C9.48333 19 7.24167 18.3042 5.275 16.9125C3.30833 15.5208 1.88333 13.7167 1 11.5C1.35 10.6167 1.79167 9.79583 2.325 9.0375C2.85833 8.27917 3.46667 7.6 4.15 7L1.4 4.2L2.8 2.8L21.2 21.2L19.8 22.6ZM5.55 8.4C5.06667 8.83333 4.625 9.30833 4.225 9.825C3.825 10.3417 3.48333 10.9 3.2 11.5C4.03333 13.1833 5.22917 14.5208 6.7875 15.5125C8.34583 16.5042 10.0833 17 12 17C12.3333 17 12.6583 16.9792 12.975 16.9375C13.2917 16.8958 13.6167 16.85 13.95 16.8L13.05 15.85C12.8667 15.9 12.6917 15.9375 12.525 15.9625C12.3583 15.9875 12.1833 16 12 16C10.75 16 9.6875 15.5625 8.8125 14.6875C7.9375 13.8125 7.5 12.75 7.5 11.5C7.5 11.3167 7.5125 11.1417 7.5375 10.975C7.5625 10.8083 7.6 10.6333 7.65 10.45L5.55 8.4Z',
@@ -30,7 +30,7 @@ const Aligment_1 = require("../Aligment");
30
30
  const Input_styles_1 = require("./Input.styles");
31
31
  const Icons_1 = require("../Icons");
32
32
  const Theme_1 = require("../../Theme");
33
- const Input = ({ label, labelPosition = 'top', value, type = 'text', name, disabled = false, size = 'medium', handleChange, handleSubmit, width, error, placeholder, min, max, step, autoFocus, theme = Theme_1.mainTheme, }) => {
33
+ const Input = ({ label, labelPosition = 'top', value, type = 'text', name, disabled = false, size = 'medium', handleChange, handleSubmit, width, error, placeholder, min, max, step = 0.1, autoFocus, theme = Theme_1.mainTheme, }) => {
34
34
  const onChange = (e) => {
35
35
  handleChange(name, e.target.value);
36
36
  };
@@ -39,18 +39,38 @@ const Input = ({ label, labelPosition = 'top', value, type = 'text', name, disab
39
39
  handleSubmit();
40
40
  }
41
41
  };
42
- const [inputType] = (0, react_1.useState)(type);
42
+ const getFiledType = (filedType) => {
43
+ return filedType === 'increase' ? 'number' : filedType;
44
+ };
45
+ const [inputType] = (0, react_1.useState)(getFiledType(type));
43
46
  const [showPassword, setShowPassword] = (0, react_1.useState)(false);
44
47
  const tooglePassword = () => {
45
48
  setShowPassword(!showPassword);
46
49
  };
50
+ const increaseValue = (filedValue) => {
51
+ let newValue = parseFloat((filedValue + step).toFixed(2));
52
+ if (max !== undefined && newValue >= max) {
53
+ newValue = max;
54
+ }
55
+ handleChange(name, newValue);
56
+ };
57
+ const decreaseValue = (filedValue) => {
58
+ let newValue = parseFloat((filedValue - step).toFixed(2));
59
+ if (min !== undefined && newValue < min) {
60
+ newValue = min;
61
+ }
62
+ handleChange(name, newValue);
63
+ };
47
64
  return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme },
48
65
  react_1.default.createElement(Aligment_1.Aligment, { align: labelPosition === 'top' ? 'flex-start' : 'center', direction: labelPosition === 'top' ? 'column' : 'row', wrap: 'nowrap' },
49
66
  label && (react_1.default.createElement(Input_styles_1.InputLabelElement, { size: size, labelPosition: labelPosition }, label)),
50
67
  react_1.default.createElement(Input_styles_1.InputWrapper, { width: width },
51
68
  react_1.default.createElement(Input_styles_1.InputTextElement, { autoFocus: autoFocus, inputSize: size, type: showPassword ? 'text' : inputType, disabled: disabled, name: name, value: value, onChange: onChange, onKeyDown: onKeyDown, error: error, placeholder: placeholder, min: min, max: max, step: step }),
52
69
  inputType === 'password' && (react_1.default.createElement(Input_styles_1.EyeIconWrapper, { size: size },
53
- react_1.default.createElement(Icons_1.Icon, { name: showPassword ? 'visability_off' : 'visibility', size: 24, onClick: tooglePassword, color: theme.inputDefaultTextColor, inverseMode: true }))),
70
+ react_1.default.createElement(Icons_1.Icon, { name: showPassword ? 'visability_off' : 'visibility', size: 24, onClick: tooglePassword, iconColor: theme.inputDefaultTextColor, iconBgHoverColor: 'transparent' }))),
71
+ type === 'increase' && (react_1.default.createElement(Input_styles_1.IconsWrapper, null,
72
+ react_1.default.createElement(Icons_1.Icon, { name: "add", size: 24, onClick: () => increaseValue(value), iconColor: theme.inputDefaultTextColor }),
73
+ react_1.default.createElement(Icons_1.Icon, { name: "remove", size: 24, onClick: () => decreaseValue(value), iconColor: theme.inputDefaultTextColor }))),
54
74
  error && react_1.default.createElement(Input_styles_1.InputErrorMsg, null, error)))));
55
75
  };
56
76
  exports.Input = Input;
@@ -3,62 +3,74 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.EyeIconWrapper = exports.InputErrorMsg = exports.InputWrapper = exports.InputLabelElement = exports.InputTextElement = void 0;
6
+ exports.IconsWrapper = exports.EyeIconWrapper = exports.InputErrorMsg = exports.InputWrapper = exports.InputLabelElement = exports.InputTextElement = void 0;
7
7
  const common_1 = require("../common");
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
9
  const Theme_1 = require("../../Theme");
10
10
  const Typography_1 = require("../Typography");
11
11
  exports.InputTextElement = styled_components_1.default.input `
12
- position:relative;
12
+ position: relative;
13
13
  box-sizing: border-box;
14
- background-color: ${p => p.theme.inputDefaultBackground};
15
- border: 1px solid ${p => p.theme.inputDefaultBorder};
14
+ background-color: ${(p) => p.theme.inputDefaultBackground};
15
+ border: 1px solid ${(p) => p.theme.inputDefaultBorder};
16
16
  border-radius: ${Theme_1.Theme.borderRadius.m};
17
17
  width: 100%;
18
- font-family: "Lato", sans-serif;
18
+ font-family: 'Lato', sans-serif;
19
19
  outline: 0;
20
20
  white-space: nowrap;
21
21
  overflow: hidden;
22
22
  text-overflow: ellipsis;
23
-
24
23
  ${(p) => (0, common_1.setSize)(p.inputSize)}
25
- color: ${p => p.theme.inputDefaultTextColor};
26
- width: ${p => p.width ? p.width : '100%'};
27
- ${p => p.type === 'password' && `padding-right:32px;`}
24
+ color: ${(p) => p.theme.inputDefaultTextColor};
25
+ width: ${(p) => (p.width ? p.width : '100%')};
26
+ ${(p) => p.type === 'password' && `padding-right:32px;`}
28
27
  :focus {
29
- border-color: ${p => p.theme.inputFocusBorder};
30
- background-color: ${p => p.theme.inputFocusBackground};
31
- color:${p => p.theme.inputFocusTextColor};
28
+ border-color: ${(p) => p.theme.inputFocusBorder};
29
+ background-color: ${(p) => p.theme.inputFocusBackground};
30
+ color: ${(p) => p.theme.inputFocusTextColor};
32
31
  }
33
- :disabled{
34
- background-color: ${p => p.theme.inputDisabledBackground};
35
- border-color: ${p => p.theme.inputDisabledBorder};
36
- color:${p => p.theme.inputDisabledTextColor};
32
+ :disabled {
33
+ background-color: ${(p) => p.theme.inputDisabledBackground};
34
+ border-color: ${(p) => p.theme.inputDisabledBorder};
35
+ color: ${(p) => p.theme.inputDisabledTextColor};
37
36
  cursor: not-allowed;
38
37
  }
39
- ${p => p.error && `
38
+ ${(p) => p.error &&
39
+ `
40
40
  background-color: ${p.theme.inputErrorBackground};
41
41
  border-color: ${p.theme.inputErrorBorder};
42
42
  color:${p.theme.inputErrorTextColor};
43
43
  `}
44
+ ::-webkit-outer-spin-button,
45
+ ::-webkit-inner-spin-button {
46
+ -webkit-appearance: none;
47
+ margin: 0;
48
+ }
49
+ -moz-appearance: textfield;
50
+ appearance: textfield;
44
51
  `;
45
52
  exports.InputLabelElement = (0, styled_components_1.default)(Typography_1.TextLabel) `
46
- ${p => p.labelPosition === 'top' && `margin-bottom: ${Theme_1.Theme.padding.s};`}
47
- ${p => p.labelPosition === 'left' && `margin-right: ${Theme_1.Theme.padding.s};`}
53
+ ${(p) => p.labelPosition === 'top' && `margin-bottom: ${Theme_1.Theme.padding.s};`}
54
+ ${(p) => p.labelPosition === 'left' && `margin-right: ${Theme_1.Theme.padding.s};`}
48
55
  `;
49
56
  exports.InputWrapper = styled_components_1.default.div `
50
- display:flex;
51
- position:relative;
52
- width: ${p => p.width ? p.width : '100%'};
57
+ display: flex;
58
+ position: relative;
59
+ width: ${(p) => (p.width ? p.width : '100%')};
53
60
  `;
54
61
  exports.InputErrorMsg = styled_components_1.default.div `
55
- color: ${p => p.theme.inputErrorTextColor};
62
+ color: ${(p) => p.theme.inputErrorTextColor};
56
63
  font-size: ${Theme_1.Theme.fontSize.s};
57
64
  position: absolute;
58
65
  bottom: -20px;
59
66
  `;
60
67
  exports.EyeIconWrapper = styled_components_1.default.div `
61
- position: absolute;
62
- right: 2px;
63
- ${(p) => (0, common_1.setEyeTopPosition)(p.size)}
68
+ position: absolute;
69
+ right: 2px;
70
+ ${(p) => (0, common_1.setEyeTopPosition)(p.size)}
71
+ `;
72
+ exports.IconsWrapper = styled_components_1.default.div `
73
+ display:flex;
74
+ align-items: center;
75
+
64
76
  `;
@@ -8,10 +8,12 @@ const Typography_1 = require("../Typography");
8
8
  const react_1 = __importDefault(require("react"));
9
9
  const Section_styles_1 = require("./Section.styles");
10
10
  const Theme_1 = require("../../Theme");
11
- const Section = ({ title, children, titlePosition = "left", noPadding = false, theme = Theme_1.mainTheme, backgroundColor = theme.contentBackground, }) => {
11
+ const Button_1 = require("../Button");
12
+ const Section = ({ title, children, titlePosition = 'left', noPadding = false, theme = Theme_1.mainTheme, backgroundColor = theme.contentBackground, action, actionLabel = 'action', }) => {
12
13
  return (react_1.default.createElement(Section_styles_1.SectionElement, { backgroundColor: backgroundColor },
13
- title && (react_1.default.createElement(Section_styles_1.SectionTitle, { titlePosition: titlePosition, noPadding: noPadding },
14
- react_1.default.createElement(Typography_1.TextSubHeader, null, title))),
14
+ title && (react_1.default.createElement(Section_styles_1.SectionTitle, { titlePosition: titlePosition, noPadding: noPadding, withAction: titlePosition === 'left' && !!action },
15
+ react_1.default.createElement(Typography_1.TextSubHeader, null, title),
16
+ titlePosition === 'left' && !!action && (react_1.default.createElement(Button_1.Button, { text: actionLabel, onClick: action, size: "small", mode: "inverse" })))),
15
17
  react_1.default.createElement(Section_styles_1.SectionContent, { noPadding: noPadding }, children)));
16
18
  };
17
19
  exports.Section = Section;
@@ -7,21 +7,27 @@ exports.SectionContent = exports.SectionTitle = exports.SectionElement = void 0;
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
8
  const Theme_1 = require("../../Theme");
9
9
  exports.SectionElement = styled_components_1.default.div `
10
- width:100%;
11
- box-sizing:border-box;
12
- overflow:auto;
10
+ width: 100%;
11
+ box-sizing: border-box;
12
+ overflow: auto;
13
13
  padding: ${Theme_1.Theme.padding.l} 0;
14
14
  background-color: ${(p) => p.backgroundColor};
15
15
  `;
16
16
  exports.SectionTitle = styled_components_1.default.div `
17
- width:100%;
18
- padding:0 ${p => p.noPadding ? 0 : Theme_1.Theme.padding.l} ${Theme_1.Theme.padding.l} ${p => p.noPadding ? 0 : Theme_1.Theme.padding.l} ;
19
- text-align:${p => p.titlePosition};
20
- box-sizing:border-box;
17
+ width: 100%;
18
+ padding: 0 ${(p) => (p.noPadding ? 0 : Theme_1.Theme.padding.l)} ${Theme_1.Theme.padding.l}
19
+ ${(p) => (p.noPadding ? 0 : Theme_1.Theme.padding.l)};
20
+ text-align: ${(p) => p.titlePosition};
21
+ box-sizing: border-box;
22
+ ${(p) => p.withAction &&
23
+ `display:flex;
24
+ align-items: center;
25
+ justify-content: space-between;
26
+ `};
21
27
  `;
22
28
  exports.SectionContent = styled_components_1.default.div `
23
- box-sizing:border-box;
24
- width:100%;
25
- display:flex;
26
- padding: 0 ${p => p.noPadding ? 0 : Theme_1.Theme.padding.l};
29
+ box-sizing: border-box;
30
+ width: 100%;
31
+ display: flex;
32
+ padding: 0 ${(p) => (p.noPadding ? 0 : Theme_1.Theme.padding.l)};
27
33
  `;
@@ -126,10 +126,10 @@ hover = true, selectable = true, sortable = true, filtrable = false, sort = {
126
126
  tableProps.sort.order != 'none' && (react_1.default.createElement(Table_styles_1.TableHeaderSortIcon, null,
127
127
  react_1.default.createElement(Icons_1.Icon, { name: tableProps.sort.order === 'asc'
128
128
  ? 'arrow_drop_down'
129
- : 'arrow_drop_up', color: theme.tableCellSortIcon, size: 20 })))))))))),
129
+ : 'arrow_drop_up', iconColor: theme.tableCellSortIcon, size: 20 })))))))))),
130
130
  react_1.default.createElement("tbody", null, tableProps.elements.map((item) => (react_1.default.createElement(Table_styles_1.TableRow, { key: item.id, hover: hover, active: selectedRow === item.id, selectable: selectable, onClick: () => handleRowClick(item.id) }, tableProps.headers.map((header) => (react_1.default.createElement(react_1.default.Fragment, null, header.action ? (react_1.default.createElement(Table_styles_1.OptionTableCell, null,
131
131
  react_1.default.createElement(Table_styles_1.OptionTableCellWrapper, { onClick: (e) => e.stopPropagation() },
132
- react_1.default.createElement(DropdownMenu_1.DropdownMenu, { options: moreActions, targetID: item.id, iconName: "more_vert", color: theme.tableMoreIconColor, iconInverseMode: true })))) : (react_1.default.createElement(Table_styles_1.TableCell, { key: `${item.id}-${header.name}` }, header.date
132
+ react_1.default.createElement(DropdownMenu_1.DropdownMenu, { options: moreActions, targetID: item.id, iconName: "more_vert", iconColor: theme.tableMoreIconColor })))) : (react_1.default.createElement(Table_styles_1.TableCell, { key: `${item.id}-${header.name}` }, header.date
133
133
  ? (0, date_fns_1.format)(item[header.valueSource], 'dd-MM-yyyy')
134
134
  : item[header.valueSource]))))))))))));
135
135
  };
@@ -69,8 +69,10 @@ export const mainTheme = {
69
69
  disabledText: Theme.colors.gray_1,
70
70
  //icon
71
71
  iconColor: Theme.colors.text,
72
+ iconHoverColor: Theme.colors.primary,
73
+ iconBgColor: 'transparent',
72
74
  iconDisabledColor: Theme.colors.gray_4,
73
- iconHoverColor: Theme.colors.primary_10,
75
+ iconBgHoverColor: Theme.colors.primary_10,
74
76
  //text
75
77
  textColor: Theme.colors.text,
76
78
  // input
@@ -9,5 +9,5 @@ export const Chips = ({ theme = mainTheme, label, handleClose, }) => {
9
9
  React.createElement(ChipsElement, { onClick: () => handleClose() },
10
10
  React.createElement(Aligment, { gap: 4 },
11
11
  React.createElement(ChipsLabel, null, label),
12
- React.createElement(Icon, { name: 'close', color: theme.chipsNeutralTextColor, size: 14 })))));
12
+ React.createElement(Icon, { name: "close", iconColor: theme.chipsNeutralTextColor, iconHoverColor: theme.chipsNeutralTextColor, iconBgHoverColor: theme.iconBgColor, size: 14 })))));
13
13
  };
@@ -1,11 +1,11 @@
1
1
  import { Panel, setIconSize } from '../common';
2
2
  import React, { useState, useRef, useEffect } from 'react';
3
- import { Theme } from '../../Theme';
3
+ import { Theme, mainTheme } from '../../Theme';
4
4
  import { Icon } from '../Icons';
5
5
  import { DropdownMenuOption, DropdownMenuElement, DropdownMenuContent, DropdownMenuFooter, DropdownMenuHeader, } from './DropdownMenu.styles';
6
6
  import { Aligment } from '../Aligment';
7
7
  import { TextAccent, TextLabel, Text } from '../Typography';
8
- export const DropdownMenu = ({ size = 'medium', iconName = 'more_vert', color = Theme.colors.text, header = false, headerTitle, headerSubtitle, footer = false, footerText, footerAction, options, right = false, left = false, iconInverseMode = false, iconHoverColor = Theme.colors.primary_10, targetID }) => {
8
+ export const DropdownMenu = ({ size = 'medium', iconName = 'more_vert', header = false, headerTitle, headerSubtitle, footer = false, footerText, footerAction, options, right = false, left = false, targetID, iconColor = mainTheme.iconColor, iconHoverColor = mainTheme.iconHoverColor, iconBgColor = mainTheme.iconBgColor, iconBgHoverColor = mainTheme.iconBgHoverColor, }) => {
9
9
  const [open, toogleOpen] = useState(false);
10
10
  const ref = useRef(null);
11
11
  const close = () => {
@@ -30,8 +30,9 @@ export const DropdownMenu = ({ size = 'medium', iconName = 'more_vert', color =
30
30
  document.removeEventListener('click', handleClickOutside, true);
31
31
  };
32
32
  }, [open]);
33
+ console.log(open);
33
34
  return (React.createElement(DropdownMenuElement, null,
34
- React.createElement(Icon, { name: iconName, onClick: () => toogleOpen(!open), color: color, hoverColor: iconHoverColor, size: setIconSize(size), active: open, right: right, left: left, inverseMode: iconInverseMode }),
35
+ React.createElement(Icon, { name: iconName, onClick: () => toogleOpen(!open), size: setIconSize(size), isActive: open, right: right, left: left, iconColor: iconColor, iconHoverColor: iconHoverColor, iconBgColor: iconBgColor, iconBgHoverColor: iconBgHoverColor }),
35
36
  open && (React.createElement(Panel, { ref: ref, size: size, position: "right" },
36
37
  React.createElement(Aligment, { direction: "column" },
37
38
  header && (React.createElement(DropdownMenuHeader, null,
@@ -18,12 +18,12 @@ export const ElementHeader = ({ title, actionLabel = '', handleClose, handleClic
18
18
  };
19
19
  const rightSide = () => {
20
20
  if (handleClose) {
21
- return (React.createElement(Icon, { onClick: () => handleClose(), name: "close", color: Theme.colors.text }));
21
+ return (React.createElement(Icon, { onClick: () => handleClose(), name: "close", iconColor: Theme.colors.text }));
22
22
  }
23
23
  else if (!handleClose && handleClick && actionLabel) {
24
24
  return (React.createElement(Aligment, { align: "center", width: "auto" },
25
25
  React.createElement(Button, { mode: "secondary", text: actionLabel, onClick: () => handleClick() }),
26
- options && (React.createElement(DropdownMenu, { options: options, right: true, color: iconColor, iconHoverColor: iconHoverColor, iconInverseMode: true }))));
26
+ options && (React.createElement(DropdownMenu, { options: options, right: true, iconColor: iconColor }))));
27
27
  }
28
28
  };
29
29
  return (React.createElement(Aligment, { justify: !title && !children ? 'flex-end' : 'space-between', vPadding: Theme.padding.m, hPadding: Theme.padding.l, backgroundColor: backgroundColor },
@@ -151,7 +151,7 @@ export const Filters = ({ theme = mainTheme, title = 'Select filters', labelConf
151
151
  };
152
152
  return (React.createElement(ThemeProvider, { theme: theme },
153
153
  React.createElement(FilterIconArea, null,
154
- React.createElement(Icon, { name: "filters", onClick: toogleFilter, color: setIconColor() }),
154
+ React.createElement(Icon, { name: "filters", onClick: toogleFilter, iconColor: setIconColor() }),
155
155
  isAnyFilterActive() && (React.createElement(Chips, { label: labelClearAll, handleClose: resetAllFiltersAndSubmit }))),
156
156
  openFilters && (React.createElement(Modal, { title: title, handleConfirm: applyFilter, handleClose: toogleFilter, handleAdditional: resetAllFilters, labelConfirm: labelConfirm, labelClose: labelClose, labelAdditional: labelClearAll },
157
157
  React.createElement(Aligment, { direction: "column", align: 'flex-end' },
@@ -2,13 +2,15 @@ import React from 'react';
2
2
  import { mainTheme } from '../../Theme/Theme';
3
3
  import { IconElement } from './Icon.styles';
4
4
  import { iconsPath } from './IconsPath';
5
- export const Icon = ({ size = 24, name, right = false, left = false, hoverColor = mainTheme.iconHoverColor, active = false, inverseMode = false, onClick, isDisabled = false, color = isDisabled ? mainTheme.iconDisabledColor : mainTheme.iconColor, }) => {
5
+ export const Icon = ({ size = 24, name = 'person', right = false, left = false, isActive = false, onClick, isDisabled = false, iconColor = isDisabled ? mainTheme.iconDisabledColor : mainTheme.iconColor, iconHoverColor = mainTheme.iconHoverColor, iconBgColor = mainTheme.iconBgColor, iconBgHoverColor = isDisabled
6
+ ? mainTheme.iconBgColor
7
+ : mainTheme.iconBgHoverColor, }) => {
6
8
  const handleClick = () => {
7
9
  if (!isDisabled && !!onClick) {
8
10
  onClick();
9
11
  }
10
12
  };
11
- return (React.createElement(IconElement, { onClick: handleClick, right: right, left: left, active: active, hoverColor: hoverColor, inverseMode: inverseMode, isDisabled: isDisabled },
13
+ return (React.createElement(IconElement, { onClick: handleClick, right: right, left: left, isDisabled: isDisabled, iconColor: iconColor, iconHoverColor: iconHoverColor, iconBgColor: iconBgColor, iconBgHoverColor: iconBgHoverColor, isActive: isActive },
12
14
  React.createElement("svg", { width: size, height: size, viewBox: '0 0 24 24', preserveAspectRatio: "xMidYMid meet", x: "0", y: "0", name: name },
13
- React.createElement("path", { d: iconsPath[name], fill: color }))));
15
+ React.createElement("path", { d: iconsPath[name], fill: isActive ? iconHoverColor : iconColor }))));
14
16
  };
@@ -9,35 +9,12 @@ export const IconElement = styled.div `
9
9
  margin-left: ${(p) => (p.right ? Theme.padding.m : '0')};
10
10
  margin-right: ${(p) => (p.left ? Theme.padding.m : '0')};
11
11
  padding: 4px;
12
-
13
- ${(p) => p.onClick !== undefined &&
14
- `
15
- cursor: ${(p) => (!p.isDisabled ? 'pointer' : 'not-allowed')};
12
+ cursor: ${(p) => (!p.isDisabled ? 'pointer' : 'not-allowed')};
13
+ background-color: ${(p) => (p.isActive ? p.iconBgHoverColor : p.iconBgColor)};
14
+ :hover {
15
+ background-color: ${(p) => !p.isDisabled && p.iconBgHoverColor};
16
16
  path {
17
- fill: ${(p) => (p.color ? p.color : Theme.colors.primary)};
17
+ fill: ${(p) => !p.isDisabled && p.iconHoverColor};
18
18
  }
19
-
20
- ${!p.isDisabled &&
21
- `
22
- &:hover {
23
- cursor: ${(!p.isDisabled ? 'pointer' : 'not-allowed')};
24
- ${!p.inverseMode
25
- ? `
26
- background-color: ${p.hoverColor};
27
- `
28
- : `
29
- path {
30
- fill: ${p.hoverColor};
31
- }
32
- `}
33
- }
34
- `}
35
- `}
36
-
37
- ${(p) => p.active &&
38
- `
39
- background-color: ${p.hoverColor};
40
- path {
41
- }
42
- `}
19
+ }
43
20
  `;
@@ -31,10 +31,12 @@ export const iconsPath = {
31
31
  unlock: 'M6 8h9V6q0-1.25-.875-2.125T12 3q-1.25 0-2.125.875T9 6H7q0-2.075 1.463-3.538Q9.925 1 12 1t3.538 1.462Q17 3.925 17 6v2h1q.825 0 1.413.587Q20 9.175 20 10v10q0 .825-.587 1.413Q18.825 22 18 22H6q-.825 0-1.412-.587Q4 20.825 4 20V10q0-.825.588-1.413Q5.175 8 6 8Zm0 12h12V10H6v10Zm6-3q.825 0 1.413-.587Q14 15.825 14 15q0-.825-.587-1.413Q12.825 13 12 13q-.825 0-1.412.587Q10 14.175 10 15q0 .825.588 1.413Q11.175 17 12 17Zm-6 3V10v10Z',
32
32
  lock: 'M6 22q-.825 0-1.412-.587Q4 20.825 4 20V10q0-.825.588-1.413Q5.175 8 6 8h1V6q0-2.075 1.463-3.538Q9.925 1 12 1t3.538 1.462Q17 3.925 17 6v2h1q.825 0 1.413.587Q20 9.175 20 10v10q0 .825-.587 1.413Q18.825 22 18 22Zm0-2h12V10H6v10Zm6-3q.825 0 1.413-.587Q14 15.825 14 15q0-.825-.587-1.413Q12.825 13 12 13q-.825 0-1.412.587Q10 14.175 10 15q0 .825.588 1.413Q11.175 17 12 17ZM9 8h6V6q0-1.25-.875-2.125T12 3q-1.25 0-2.125.875T9 6ZM6 20V10v10Z',
33
33
  person: 'M12 12q-1.65 0-2.825-1.175Q8 9.65 8 8q0-1.65 1.175-2.825Q10.35 4 12 4q1.65 0 2.825 1.175Q16 6.35 16 8q0 1.65-1.175 2.825Q13.65 12 12 12Zm-8 8v-2.8q0-.85.438-1.563.437-.712 1.162-1.087 1.55-.775 3.15-1.163Q10.35 13 12 13t3.25.387q1.6.388 3.15 1.163.725.375 1.162 1.087Q20 16.35 20 17.2V20Zm2-2h12v-.8q0-.275-.137-.5-.138-.225-.363-.35-1.35-.675-2.725-1.013Q13.4 15 12 15t-2.775.337Q7.85 15.675 6.5 16.35q-.225.125-.362.35-.138.225-.138.5Zm6-8q.825 0 1.413-.588Q14 8.825 14 8t-.587-1.412Q12.825 6 12 6q-.825 0-1.412.588Q10 7.175 10 8t.588 1.412Q11.175 10 12 10Zm0-2Zm0 10Z',
34
- radio_checked: 'M10 15C11.3833 15 12.5625 14.5125 13.5375 13.5375C14.5125 12.5625 15 11.3833 15 10C15 8.61667 14.5125 7.4375 13.5375 6.4625C12.5625 5.4875 11.3833 5 10 5C8.61667 5 7.4375 5.4875 6.4625 6.4625C5.4875 7.4375 5 8.61667 5 10C5 11.3833 5.4875 12.5625 6.4625 13.5375C7.4375 14.5125 8.61667 15 10 15ZM10 20C8.61667 20 7.31667 19.7375 6.1 19.2125C4.88333 18.6875 3.825 17.975 2.925 17.075C2.025 16.175 1.3125 15.1167 0.7875 13.9C0.2625 12.6833 0 11.3833 0 10C0 8.61667 0.2625 7.31667 0.7875 6.1C1.3125 4.88333 2.025 3.825 2.925 2.925C3.825 2.025 4.88333 1.3125 6.1 0.7875C7.31667 0.2625 8.61667 0 10 0C11.3833 0 12.6833 0.2625 13.9 0.7875C15.1167 1.3125 16.175 2.025 17.075 2.925C17.975 3.825 18.6875 4.88333 19.2125 6.1C19.7375 7.31667 20 8.61667 20 10C20 11.3833 19.7375 12.6833 19.2125 13.9C18.6875 15.1167 17.975 16.175 17.075 17.075C16.175 17.975 15.1167 18.6875 13.9 19.2125C12.6833 19.7375 11.3833 20 10 20ZM10 18C12.2333 18 14.125 17.225 15.675 15.675C17.225 14.125 18 12.2333 18 10C18 7.76667 17.225 5.875 15.675 4.325C14.125 2.775 12.2333 2 10 2C7.76667 2 5.875 2.775 4.325 4.325C2.775 5.875 2 7.76667 2 10C2 12.2333 2.775 14.125 4.325 15.675C5.875 17.225 7.76667 18 10 18Z',
35
- radio_unchecked: 'M10 20C8.61667 20 7.31667 19.7375 6.1 19.2125C4.88333 18.6875 3.825 17.975 2.925 17.075C2.025 16.175 1.3125 15.1167 0.7875 13.9C0.2625 12.6833 0 11.3833 0 10C0 8.61667 0.2625 7.31667 0.7875 6.1C1.3125 4.88333 2.025 3.825 2.925 2.925C3.825 2.025 4.88333 1.3125 6.1 0.7875C7.31667 0.2625 8.61667 0 10 0C11.3833 0 12.6833 0.2625 13.9 0.7875C15.1167 1.3125 16.175 2.025 17.075 2.925C17.975 3.825 18.6875 4.88333 19.2125 6.1C19.7375 7.31667 20 8.61667 20 10C20 11.3833 19.7375 12.6833 19.2125 13.9C18.6875 15.1167 17.975 16.175 17.075 17.075C16.175 17.975 15.1167 18.6875 13.9 19.2125C12.6833 19.7375 11.3833 20 10 20ZM10 18C12.2333 18 14.125 17.225 15.675 15.675C17.225 14.125 18 12.2333 18 10C18 7.76667 17.225 5.875 15.675 4.325C14.125 2.775 12.2333 2 10 2C7.76667 2 5.875 2.775 4.325 4.325C2.775 5.875 2 7.76667 2 10C2 12.2333 2.775 14.125 4.325 15.675C5.875 17.225 7.76667 18 10 18Z',
34
+ radio_checked: 'M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20ZM12 17C14.7614 17 17 14.7614 17 12C17 9.23858 14.7614 7 12 7C9.23858 7 7 9.23858 7 12C7 14.7614 9.23858 17 12 17Z',
35
+ radio_unchecked: 'M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z',
36
+ remove: 'M19 13H5V11H19V13Z',
37
+ remove_circle: 'M7 11V13H17V11H7ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z',
36
38
  new_tab: 'M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H12V5H5V19H19V12H21V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM9.7 15.7L8.3 14.3L17.6 5H14V3H21V10H19V6.4L9.7 15.7Z',
37
- triage: "M12 7.77L18.39 18H5.61L12 7.77ZM12 4L2 20H22L12 4Z",
39
+ triage: 'M12 7.77L18.39 18H5.61L12 7.77ZM12 4L2 20H22L12 4Z',
38
40
  upgrade: 'M8.6 22.5L6.7 19.3L3.1 18.5L3.45 14.8L1 12L3.45 9.2L3.1 5.5L6.7 4.7L8.6 1.5L12 2.95L15.4 1.5L17.3 4.7L20.9 5.5L20.55 9.2L23 12L20.55 14.8L20.9 18.5L17.3 19.3L15.4 22.5L12 21.05L8.6 22.5ZM9.45 19.95L12 18.85L14.6 19.95L16 17.55L18.75 16.9L18.5 14.1L20.35 12L18.5 9.85L18.75 7.05L16 6.45L14.55 4.05L12 5.15L9.4 4.05L8 6.45L5.25 7.05L5.5 9.85L3.65 12L5.5 14.1L5.25 16.95L8 17.55L9.45 19.95ZM10.95 15.55L16.6 9.9L15.2 8.45L10.95 12.7L8.8 10.6L7.4 12L10.95 15.55Z',
39
41
  visibility: 'M12 16q1.875 0 3.188-1.312Q16.5 13.375 16.5 11.5q0-1.875-1.312-3.188Q13.875 7 12 7q-1.875 0-3.188 1.312Q7.5 9.625 7.5 11.5q0 1.875 1.312 3.188Q10.125 16 12 16Zm0-1.8q-1.125 0-1.912-.788Q9.3 12.625 9.3 11.5t.788-1.913Q10.875 8.8 12 8.8t1.913.787q.787.788.787 1.913t-.787 1.912q-.788.788-1.913.788Zm0 4.8q-3.65 0-6.65-2.038-3-2.037-4.35-5.462 1.35-3.425 4.35-5.463Q8.35 4 12 4q3.65 0 6.65 2.037 3 2.038 4.35 5.463-1.35 3.425-4.35 5.462Q15.65 19 12 19Zm0-7.5Zm0 5.5q2.825 0 5.188-1.488Q19.55 14.025 20.8 11.5q-1.25-2.525-3.612-4.013Q14.825 6 12 6 9.175 6 6.812 7.487 4.45 8.975 3.2 11.5q1.25 2.525 3.612 4.012Q9.175 17 12 17Z',
40
42
  visability_off: 'M16.1 13.3L14.65 11.85C14.8 11.0667 14.575 10.3333 13.975 9.65C13.375 8.96667 12.6 8.7 11.65 8.85L10.2 7.4C10.4833 7.26667 10.7708 7.16667 11.0625 7.1C11.3542 7.03333 11.6667 7 12 7C13.25 7 14.3125 7.4375 15.1875 8.3125C16.0625 9.1875 16.5 10.25 16.5 11.5C16.5 11.8333 16.4667 12.1458 16.4 12.4375C16.3333 12.7292 16.2333 13.0167 16.1 13.3ZM19.3 16.45L17.85 15.05C18.4833 14.5667 19.0458 14.0375 19.5375 13.4625C20.0292 12.8875 20.45 12.2333 20.8 11.5C19.9667 9.81667 18.7708 8.47917 17.2125 7.4875C15.6542 6.49583 13.9167 6 12 6C11.5167 6 11.0417 6.03333 10.575 6.1C10.1083 6.16667 9.65 6.26667 9.2 6.4L7.65 4.85C8.33333 4.56667 9.03333 4.35417 9.75 4.2125C10.4667 4.07083 11.2167 4 12 4C14.5167 4 16.7583 4.69583 18.725 6.0875C20.6917 7.47917 22.1167 9.28333 23 11.5C22.6167 12.4833 22.1125 13.3958 21.4875 14.2375C20.8625 15.0792 20.1333 15.8167 19.3 16.45ZM19.8 22.6L15.6 18.45C15.0167 18.6333 14.4292 18.7708 13.8375 18.8625C13.2458 18.9542 12.6333 19 12 19C9.48333 19 7.24167 18.3042 5.275 16.9125C3.30833 15.5208 1.88333 13.7167 1 11.5C1.35 10.6167 1.79167 9.79583 2.325 9.0375C2.85833 8.27917 3.46667 7.6 4.15 7L1.4 4.2L2.8 2.8L21.2 21.2L19.8 22.6ZM5.55 8.4C5.06667 8.83333 4.625 9.30833 4.225 9.825C3.825 10.3417 3.48333 10.9 3.2 11.5C4.03333 13.1833 5.22917 14.5208 6.7875 15.5125C8.34583 16.5042 10.0833 17 12 17C12.3333 17 12.6583 16.9792 12.975 16.9375C13.2917 16.8958 13.6167 16.85 13.95 16.8L13.05 15.85C12.8667 15.9 12.6917 15.9375 12.525 15.9625C12.3583 15.9875 12.1833 16 12 16C10.75 16 9.6875 15.5625 8.8125 14.6875C7.9375 13.8125 7.5 12.75 7.5 11.5C7.5 11.3167 7.5125 11.1417 7.5375 10.975C7.5625 10.8083 7.6 10.6333 7.65 10.45L5.55 8.4Z',
@@ -1,10 +1,10 @@
1
1
  import React, { useState } from 'react';
2
2
  import { ThemeProvider } from 'styled-components';
3
3
  import { Aligment } from '../Aligment';
4
- import { InputTextElement, InputLabelElement, InputErrorMsg, InputWrapper, EyeIconWrapper, } from './Input.styles';
4
+ import { InputTextElement, InputLabelElement, InputErrorMsg, InputWrapper, EyeIconWrapper, IconsWrapper, } from './Input.styles';
5
5
  import { Icon } from '../Icons';
6
6
  import { mainTheme } from '../../Theme';
7
- export const Input = ({ label, labelPosition = 'top', value, type = 'text', name, disabled = false, size = 'medium', handleChange, handleSubmit, width, error, placeholder, min, max, step, autoFocus, theme = mainTheme, }) => {
7
+ export const Input = ({ label, labelPosition = 'top', value, type = 'text', name, disabled = false, size = 'medium', handleChange, handleSubmit, width, error, placeholder, min, max, step = 0.1, autoFocus, theme = mainTheme, }) => {
8
8
  const onChange = (e) => {
9
9
  handleChange(name, e.target.value);
10
10
  };
@@ -13,17 +13,37 @@ export const Input = ({ label, labelPosition = 'top', value, type = 'text', name
13
13
  handleSubmit();
14
14
  }
15
15
  };
16
- const [inputType] = useState(type);
16
+ const getFiledType = (filedType) => {
17
+ return filedType === 'increase' ? 'number' : filedType;
18
+ };
19
+ const [inputType] = useState(getFiledType(type));
17
20
  const [showPassword, setShowPassword] = useState(false);
18
21
  const tooglePassword = () => {
19
22
  setShowPassword(!showPassword);
20
23
  };
24
+ const increaseValue = (filedValue) => {
25
+ let newValue = parseFloat((filedValue + step).toFixed(2));
26
+ if (max !== undefined && newValue >= max) {
27
+ newValue = max;
28
+ }
29
+ handleChange(name, newValue);
30
+ };
31
+ const decreaseValue = (filedValue) => {
32
+ let newValue = parseFloat((filedValue - step).toFixed(2));
33
+ if (min !== undefined && newValue < min) {
34
+ newValue = min;
35
+ }
36
+ handleChange(name, newValue);
37
+ };
21
38
  return (React.createElement(ThemeProvider, { theme: theme },
22
39
  React.createElement(Aligment, { align: labelPosition === 'top' ? 'flex-start' : 'center', direction: labelPosition === 'top' ? 'column' : 'row', wrap: 'nowrap' },
23
40
  label && (React.createElement(InputLabelElement, { size: size, labelPosition: labelPosition }, label)),
24
41
  React.createElement(InputWrapper, { width: width },
25
42
  React.createElement(InputTextElement, { autoFocus: autoFocus, inputSize: size, type: showPassword ? 'text' : inputType, disabled: disabled, name: name, value: value, onChange: onChange, onKeyDown: onKeyDown, error: error, placeholder: placeholder, min: min, max: max, step: step }),
26
43
  inputType === 'password' && (React.createElement(EyeIconWrapper, { size: size },
27
- React.createElement(Icon, { name: showPassword ? 'visability_off' : 'visibility', size: 24, onClick: tooglePassword, color: theme.inputDefaultTextColor, inverseMode: true }))),
44
+ React.createElement(Icon, { name: showPassword ? 'visability_off' : 'visibility', size: 24, onClick: tooglePassword, iconColor: theme.inputDefaultTextColor, iconBgHoverColor: 'transparent' }))),
45
+ type === 'increase' && (React.createElement(IconsWrapper, null,
46
+ React.createElement(Icon, { name: "add", size: 24, onClick: () => increaseValue(value), iconColor: theme.inputDefaultTextColor }),
47
+ React.createElement(Icon, { name: "remove", size: 24, onClick: () => decreaseValue(value), iconColor: theme.inputDefaultTextColor }))),
28
48
  error && React.createElement(InputErrorMsg, null, error)))));
29
49
  };
@@ -1,58 +1,70 @@
1
- import { setSize, setEyeTopPosition } from "../common";
2
- import styled from "styled-components";
3
- import { Theme } from "../../Theme";
4
- import { TextLabel } from "../Typography";
1
+ import { setSize, setEyeTopPosition } from '../common';
2
+ import styled from 'styled-components';
3
+ import { Theme } from '../../Theme';
4
+ import { TextLabel } from '../Typography';
5
5
  export const InputTextElement = styled.input `
6
- position:relative;
6
+ position: relative;
7
7
  box-sizing: border-box;
8
- background-color: ${p => p.theme.inputDefaultBackground};
9
- border: 1px solid ${p => p.theme.inputDefaultBorder};
8
+ background-color: ${(p) => p.theme.inputDefaultBackground};
9
+ border: 1px solid ${(p) => p.theme.inputDefaultBorder};
10
10
  border-radius: ${Theme.borderRadius.m};
11
11
  width: 100%;
12
- font-family: "Lato", sans-serif;
12
+ font-family: 'Lato', sans-serif;
13
13
  outline: 0;
14
14
  white-space: nowrap;
15
15
  overflow: hidden;
16
16
  text-overflow: ellipsis;
17
-
18
17
  ${(p) => setSize(p.inputSize)}
19
- color: ${p => p.theme.inputDefaultTextColor};
20
- width: ${p => p.width ? p.width : '100%'};
21
- ${p => p.type === 'password' && `padding-right:32px;`}
18
+ color: ${(p) => p.theme.inputDefaultTextColor};
19
+ width: ${(p) => (p.width ? p.width : '100%')};
20
+ ${(p) => p.type === 'password' && `padding-right:32px;`}
22
21
  :focus {
23
- border-color: ${p => p.theme.inputFocusBorder};
24
- background-color: ${p => p.theme.inputFocusBackground};
25
- color:${p => p.theme.inputFocusTextColor};
22
+ border-color: ${(p) => p.theme.inputFocusBorder};
23
+ background-color: ${(p) => p.theme.inputFocusBackground};
24
+ color: ${(p) => p.theme.inputFocusTextColor};
26
25
  }
27
- :disabled{
28
- background-color: ${p => p.theme.inputDisabledBackground};
29
- border-color: ${p => p.theme.inputDisabledBorder};
30
- color:${p => p.theme.inputDisabledTextColor};
26
+ :disabled {
27
+ background-color: ${(p) => p.theme.inputDisabledBackground};
28
+ border-color: ${(p) => p.theme.inputDisabledBorder};
29
+ color: ${(p) => p.theme.inputDisabledTextColor};
31
30
  cursor: not-allowed;
32
31
  }
33
- ${p => p.error && `
32
+ ${(p) => p.error &&
33
+ `
34
34
  background-color: ${p.theme.inputErrorBackground};
35
35
  border-color: ${p.theme.inputErrorBorder};
36
36
  color:${p.theme.inputErrorTextColor};
37
37
  `}
38
+ ::-webkit-outer-spin-button,
39
+ ::-webkit-inner-spin-button {
40
+ -webkit-appearance: none;
41
+ margin: 0;
42
+ }
43
+ -moz-appearance: textfield;
44
+ appearance: textfield;
38
45
  `;
39
46
  export const InputLabelElement = styled(TextLabel) `
40
- ${p => p.labelPosition === 'top' && `margin-bottom: ${Theme.padding.s};`}
41
- ${p => p.labelPosition === 'left' && `margin-right: ${Theme.padding.s};`}
47
+ ${(p) => p.labelPosition === 'top' && `margin-bottom: ${Theme.padding.s};`}
48
+ ${(p) => p.labelPosition === 'left' && `margin-right: ${Theme.padding.s};`}
42
49
  `;
43
50
  export const InputWrapper = styled.div `
44
- display:flex;
45
- position:relative;
46
- width: ${p => p.width ? p.width : '100%'};
51
+ display: flex;
52
+ position: relative;
53
+ width: ${(p) => (p.width ? p.width : '100%')};
47
54
  `;
48
55
  export const InputErrorMsg = styled.div `
49
- color: ${p => p.theme.inputErrorTextColor};
56
+ color: ${(p) => p.theme.inputErrorTextColor};
50
57
  font-size: ${Theme.fontSize.s};
51
58
  position: absolute;
52
59
  bottom: -20px;
53
60
  `;
54
61
  export const EyeIconWrapper = styled.div `
55
- position: absolute;
56
- right: 2px;
57
- ${(p) => setEyeTopPosition(p.size)}
62
+ position: absolute;
63
+ right: 2px;
64
+ ${(p) => setEyeTopPosition(p.size)}
65
+ `;
66
+ export const IconsWrapper = styled.div `
67
+ display:flex;
68
+ align-items: center;
69
+
58
70
  `;
@@ -2,9 +2,11 @@ import { TextSubHeader } from '../Typography';
2
2
  import React from 'react';
3
3
  import { SectionElement, SectionTitle, SectionContent } from './Section.styles';
4
4
  import { mainTheme } from '../../Theme';
5
- export const Section = ({ title, children, titlePosition = "left", noPadding = false, theme = mainTheme, backgroundColor = theme.contentBackground, }) => {
5
+ import { Button } from '../Button';
6
+ export const Section = ({ title, children, titlePosition = 'left', noPadding = false, theme = mainTheme, backgroundColor = theme.contentBackground, action, actionLabel = 'action', }) => {
6
7
  return (React.createElement(SectionElement, { backgroundColor: backgroundColor },
7
- title && (React.createElement(SectionTitle, { titlePosition: titlePosition, noPadding: noPadding },
8
- React.createElement(TextSubHeader, null, title))),
8
+ title && (React.createElement(SectionTitle, { titlePosition: titlePosition, noPadding: noPadding, withAction: titlePosition === 'left' && !!action },
9
+ React.createElement(TextSubHeader, null, title),
10
+ titlePosition === 'left' && !!action && (React.createElement(Button, { text: actionLabel, onClick: action, size: "small", mode: "inverse" })))),
9
11
  React.createElement(SectionContent, { noPadding: noPadding }, children)));
10
12
  };
@@ -1,21 +1,27 @@
1
- import styled from "styled-components";
2
- import { Theme } from "../../Theme";
1
+ import styled from 'styled-components';
2
+ import { Theme } from '../../Theme';
3
3
  export const SectionElement = styled.div `
4
- width:100%;
5
- box-sizing:border-box;
6
- overflow:auto;
4
+ width: 100%;
5
+ box-sizing: border-box;
6
+ overflow: auto;
7
7
  padding: ${Theme.padding.l} 0;
8
8
  background-color: ${(p) => p.backgroundColor};
9
9
  `;
10
10
  export const SectionTitle = styled.div `
11
- width:100%;
12
- padding:0 ${p => p.noPadding ? 0 : Theme.padding.l} ${Theme.padding.l} ${p => p.noPadding ? 0 : Theme.padding.l} ;
13
- text-align:${p => p.titlePosition};
14
- box-sizing:border-box;
11
+ width: 100%;
12
+ padding: 0 ${(p) => (p.noPadding ? 0 : Theme.padding.l)} ${Theme.padding.l}
13
+ ${(p) => (p.noPadding ? 0 : Theme.padding.l)};
14
+ text-align: ${(p) => p.titlePosition};
15
+ box-sizing: border-box;
16
+ ${(p) => p.withAction &&
17
+ `display:flex;
18
+ align-items: center;
19
+ justify-content: space-between;
20
+ `};
15
21
  `;
16
22
  export const SectionContent = styled.div `
17
- box-sizing:border-box;
18
- width:100%;
19
- display:flex;
20
- padding: 0 ${p => p.noPadding ? 0 : Theme.padding.l};
23
+ box-sizing: border-box;
24
+ width: 100%;
25
+ display: flex;
26
+ padding: 0 ${(p) => (p.noPadding ? 0 : Theme.padding.l)};
21
27
  `;
@@ -100,10 +100,10 @@ hover = true, selectable = true, sortable = true, filtrable = false, sort = {
100
100
  tableProps.sort.order != 'none' && (React.createElement(TableHeaderSortIcon, null,
101
101
  React.createElement(Icon, { name: tableProps.sort.order === 'asc'
102
102
  ? 'arrow_drop_down'
103
- : 'arrow_drop_up', color: theme.tableCellSortIcon, size: 20 })))))))))),
103
+ : 'arrow_drop_up', iconColor: theme.tableCellSortIcon, size: 20 })))))))))),
104
104
  React.createElement("tbody", null, tableProps.elements.map((item) => (React.createElement(TableRow, { key: item.id, hover: hover, active: selectedRow === item.id, selectable: selectable, onClick: () => handleRowClick(item.id) }, tableProps.headers.map((header) => (React.createElement(React.Fragment, null, header.action ? (React.createElement(OptionTableCell, null,
105
105
  React.createElement(OptionTableCellWrapper, { onClick: (e) => e.stopPropagation() },
106
- React.createElement(DropdownMenu, { options: moreActions, targetID: item.id, iconName: "more_vert", color: theme.tableMoreIconColor, iconInverseMode: true })))) : (React.createElement(TableCell, { key: `${item.id}-${header.name}` }, header.date
106
+ React.createElement(DropdownMenu, { options: moreActions, targetID: item.id, iconName: "more_vert", iconColor: theme.tableMoreIconColor })))) : (React.createElement(TableCell, { key: `${item.id}-${header.name}` }, header.date
107
107
  ? format(item[header.valueSource], 'dd-MM-yyyy')
108
108
  : item[header.valueSource]))))))))))));
109
109
  };
@@ -66,8 +66,10 @@ export declare const mainTheme: {
66
66
  disabledBackground: string;
67
67
  disabledText: string;
68
68
  iconColor: string;
69
- iconDisabledColor: string;
70
69
  iconHoverColor: string;
70
+ iconBgColor: string;
71
+ iconDisabledColor: string;
72
+ iconBgHoverColor: string;
71
73
  textColor: string;
72
74
  inputDefaultBackground: string;
73
75
  inputDefaultBorder: string;
@@ -3,7 +3,6 @@ import { InputSize, IAction } from '../../types';
3
3
  interface IDropdownMenuProps {
4
4
  size?: InputSize;
5
5
  iconName?: string;
6
- color?: string;
7
6
  header?: boolean;
8
7
  headerTitle?: string;
9
8
  headerSubtitle?: string;
@@ -14,8 +13,10 @@ interface IDropdownMenuProps {
14
13
  right?: boolean;
15
14
  left?: boolean;
16
15
  targetID?: string;
17
- iconInverseMode?: boolean;
16
+ iconColor?: string;
18
17
  iconHoverColor?: string;
18
+ iconBgColor?: string;
19
+ iconBgHoverColor?: string;
19
20
  }
20
21
  export declare const DropdownMenu: FC<IDropdownMenuProps>;
21
22
  export {};
@@ -2,13 +2,14 @@ import { FC } from 'react';
2
2
  export interface IIconActionProps {
3
3
  name: string;
4
4
  size?: number;
5
- color?: string;
6
- hoverColor?: string;
5
+ iconColor?: string;
6
+ iconHoverColor?: string;
7
+ iconBgColor?: string;
8
+ iconBgHoverColor?: string;
7
9
  right?: boolean;
8
10
  left?: boolean;
9
11
  onClick?: () => void;
10
- active?: boolean;
11
- inverseMode?: boolean;
12
12
  isDisabled?: boolean;
13
+ isActive?: boolean;
13
14
  }
14
15
  export declare const Icon: FC<IIconActionProps>;
@@ -2,10 +2,12 @@ interface IIconElementProps {
2
2
  onClick?: () => void;
3
3
  right: boolean;
4
4
  left: boolean;
5
- hoverColor: string;
6
- active: boolean;
7
- inverseMode: boolean;
8
5
  isDisabled: boolean;
6
+ iconColor: string;
7
+ iconHoverColor: string;
8
+ iconBgColor: string;
9
+ iconBgHoverColor: string;
10
+ isActive: boolean;
9
11
  }
10
12
  export declare const IconElement: import("styled-components").StyledComponent<"div", any, IIconElementProps, never>;
11
13
  export {};
@@ -33,6 +33,8 @@ export declare const iconsPath: {
33
33
  person: string;
34
34
  radio_checked: string;
35
35
  radio_unchecked: string;
36
+ remove: string;
37
+ remove_circle: string;
36
38
  new_tab: string;
37
39
  triage: string;
38
40
  upgrade: string;
@@ -1,5 +1,5 @@
1
- import { InputHTMLAttributes } from "react";
2
- import { InputSize, InputType } from "../../types";
1
+ import { InputHTMLAttributes } from 'react';
2
+ import { InputSize, InputType } from '../../types';
3
3
  interface IInputTextElementProps extends InputHTMLAttributes<HTMLInputElement> {
4
4
  inputSize: InputSize;
5
5
  disabled: boolean;
@@ -8,6 +8,7 @@ interface IInputTextElementProps extends InputHTMLAttributes<HTMLInputElement> {
8
8
  type: InputType;
9
9
  theme: any;
10
10
  onKeyDown: any;
11
+ inputmode?: any;
11
12
  }
12
13
  export declare const InputTextElement: import("styled-components").StyledComponent<"input", any, IInputTextElementProps, never>;
13
14
  export declare const InputLabelElement: import("styled-components").StyledComponent<"div", any, import("../Typography").ITextLabelProps, never>;
@@ -20,4 +21,5 @@ interface IEyeIconWrapperProps {
20
21
  size: InputSize;
21
22
  }
22
23
  export declare const EyeIconWrapper: import("styled-components").StyledComponent<"div", any, IEyeIconWrapperProps, never>;
24
+ export declare const IconsWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
23
25
  export {};
@@ -7,5 +7,7 @@ export interface ISectionProps {
7
7
  backgroundColor?: string;
8
8
  children: React.ReactNode;
9
9
  theme?: any;
10
+ action?: () => void;
11
+ actionLabel?: string;
10
12
  }
11
13
  export declare const Section: FC<ISectionProps>;
@@ -6,6 +6,7 @@ export declare const SectionElement: import("styled-components").StyledComponent
6
6
  interface ISectionTitleStyle {
7
7
  titlePosition?: TitlePosition;
8
8
  noPadding?: boolean;
9
+ withAction?: boolean;
9
10
  }
10
11
  export declare const SectionTitle: import("styled-components").StyledComponent<"div", any, ISectionTitleStyle, never>;
11
12
  interface ISectionContentStyles {
@@ -1,6 +1,6 @@
1
1
  export type ButtonMode = 'primary' | 'secondary' | 'inverse';
2
2
  export type InputSize = 'large' | 'medium' | 'small';
3
- export type InputType = "text" | "password" | "email" | "number";
3
+ export type InputType = "text" | "password" | "email" | "number" | "increase";
4
4
  export type LabelPosition = "top" | "left";
5
5
  export type TitlePosition = "left" | "center" | "right";
6
6
  export type PanelPosition = 'left' | 'right';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venice-ui",
3
- "version": "1.1.5",
3
+ "version": "1.2.0",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "module": "./dist/esm/index.js",