@mailstep/design-system 0.8.32 → 0.8.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.8.32",
3
+ "version": "0.8.33",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -24,7 +24,7 @@ const StyledColumnButton = styled$1(Button)`
24
24
  margin-left: 8px;
25
25
 
26
26
  > span > svg {
27
- stroke: ${th$1("colors.blue2")};
27
+ stroke: ${th$1("colors.iconStroke")};
28
28
  width: 18px;
29
29
  height: 18px;
30
30
  }
@@ -29,7 +29,7 @@ const StyledIcon = styled$1.div`
29
29
  height: 20px;
30
30
  margin: 9px;
31
31
  & > svg {
32
- stroke: ${({ appearance }) => appearance === "secondary" ? th$1.color("blue2") : appearance === "tertiary" ? th$1.color("red1") : th$1.color("white")};
32
+ stroke: ${({ appearance }) => appearance === "secondary" ? th$1.color("blue2") : appearance === "tertiary" ? th$1.color("red1") : "#ffffff"};
33
33
  }
34
34
  `;
35
35
  const Separator = styled$1.div`
@@ -58,7 +58,7 @@ const DialogOverlay = styled$1.div`
58
58
  width: 100%;
59
59
  height: 100%;
60
60
  overflow: auto;
61
- background-color: ${({ backgroundColor, theme }) => createRgba(backgroundColor || theme.colors.blue2, .6)};
61
+ background-color: ${({ backgroundColor, theme }) => createRgba(backgroundColor || theme.colors.modalBackground, .6)};
62
62
  text-align: center;
63
63
 
64
64
  @media print {
@@ -8,7 +8,7 @@ const Circle = styled$1.div`
8
8
  align-items: center;
9
9
  height: ${({ size }) => size === "small" ? "16px" : "24px"};
10
10
  padding: ${({ size }) => size === "small" ? "0 5px" : "3px 8px"};
11
- color: white;
11
+ color: #fff;
12
12
  gap: 10px;
13
13
  background-color: ${({ color }) => color};
14
14
  border-radius: 29px;
@@ -44,7 +44,7 @@ const StyledButton = styled$1.button`
44
44
  &[data-variant='default'] {
45
45
  &[data-appearance='primary'] {
46
46
  background-color: red1;
47
- color: white;
47
+ color: #fff;
48
48
 
49
49
  :not(:disabled) {
50
50
  @media (hover: hover) {
@@ -26,7 +26,7 @@ const tooltip = css`
26
26
  top: 3px;
27
27
  right: 100%;
28
28
  border: mediumThick;
29
- border-color: transparent ${th.color("red1")} transparent transparent;
29
+ border-color: transparent ${th.color("inputErrorColor")} transparent transparent;
30
30
  }
31
31
  }
32
32
 
@@ -38,7 +38,7 @@ const tooltip = css`
38
38
  }
39
39
  `;
40
40
  const ErrorWrap = styled$1.div`
41
- color: red1;
41
+ color: inputErrorColor;
42
42
  font-size: 1;
43
43
  display: flex;
44
44
  align-items: flex-start;
@@ -45,6 +45,7 @@ type HighlightBoxType = {
45
45
  appearance: FlagAppearanceType;
46
46
  size?: 'default' | 'small' | 'wide' | 'fitContent';
47
47
  className?: string;
48
+ cursor?: string;
48
49
  prefix?: string;
49
50
  };
50
51
  declare const HighlightBox: React.FC<HighlightBoxType>;
@@ -25,7 +25,7 @@ const StyledHighlightBox = styled$1.div`
25
25
  height: 2.75em;
26
26
  display: flex;
27
27
  flex-flow: row wrap;
28
- width: 11rem;
28
+ width: 12rem;
29
29
  align-content: center;
30
30
  line-height: 14px;
31
31
  padding: 0.5px 12px;
@@ -40,6 +40,7 @@ const StyledHighlightBox = styled$1.div`
40
40
  }
41
41
  background-color: ${({ $bgcolor }) => $bgcolor};
42
42
  color: ${({ $fontColor }) => $fontColor};
43
+ cursor: ${({ $cursor }) => $cursor || "auto"};
43
44
  `;
44
45
  const OverflowWrap = styled$1.span`
45
46
  text-overflow: ellipsis;
@@ -47,7 +48,7 @@ const OverflowWrap = styled$1.span`
47
48
  `;
48
49
  const flagAppearanceToColorMap = {
49
50
  neutralBold: "neutral300",
50
- neutralSubtle: "neutral20",
51
+ neutralSubtle: "bgLightGray2",
51
52
  blueBold: "blue70",
52
53
  blueSubtle: "blue20",
53
54
  tealBold: "teal60",
@@ -67,30 +68,31 @@ const flagAppearanceToColorMap = {
67
68
  };
68
69
  const flagAppearanceToFontColorMap = {
69
70
  neutralBold: "white",
70
- neutralSubtle: "typoPrimary",
71
- blueBold: "white",
71
+ neutralSubtle: "#22394E",
72
+ blueBold: "#ffffff",
72
73
  blueSubtle: "blue80",
73
- tealBold: "white",
74
+ tealBold: "#ffffff",
74
75
  tealSubtle: "teal90",
75
- greenBold: "white",
76
+ greenBold: "#ffffff",
76
77
  greenSubtle: "green80",
77
- orangeBold: "white",
78
+ orangeBold: "#ffffff",
78
79
  orangeSubtle: "orange80",
79
- yellowBold: "typoPrimary",
80
- yellowSubtle: "typoPrimary",
80
+ yellowBold: "#22394e",
81
+ yellowSubtle: "#22394e",
81
82
  pinkBold: "white",
82
83
  pinkSubtle: "magenta80",
83
- purpleBold: "white",
84
+ purpleBold: "#ffffff",
84
85
  purpleSubtle: "purple80",
85
- redBold: "white",
86
+ redBold: "#ffffff",
86
87
  redSubtle: "red80"
87
88
  };
88
- const HighlightBox = ({ children, appearance, size = "default", className, prefix }) => {
89
+ const HighlightBox = ({ children, appearance, size = "default", cursor, className, prefix }) => {
89
90
  const theme = useTheme();
90
91
  return /* @__PURE__ */ jsx(StyledHighlightBox, {
91
92
  $bgcolor: th$1.color(appearance ? flagAppearanceToColorMap[appearance] : "transparent")({ theme }),
92
93
  $fontColor: th$1.color(appearance ? flagAppearanceToFontColorMap[appearance] : "typoPrimary")({ theme }),
93
94
  "data-cy": prefix ? `${prefix}Label` : "label",
95
+ $cursor: cursor,
94
96
  children: /* @__PURE__ */ jsx(OverflowWrap, {
95
97
  className: size + " " + (className || ""),
96
98
  children
@@ -5,7 +5,7 @@ const CustomStyles = {
5
5
  const colors = theme.colors;
6
6
  return {
7
7
  ...styles,
8
- borderColor: selectProps.isInvalid ? colors.primary : isFocused ? colors.inputTextColor : colors.inputBorderColor,
8
+ borderColor: selectProps.isInvalid ? colors.errorColor : isFocused ? colors.inputTextColor : colors.inputBorderColor,
9
9
  backgroundColor: isDisabled ? colors.backgroundColorDisabled : colors.backgroundColor,
10
10
  boxShadow: theme.focusBoxShadow,
11
11
  borderRadius: theme.borderRadius,
@@ -36,7 +36,7 @@ const CustomStyles = {
36
36
  position: "absolute",
37
37
  top: "50%",
38
38
  transform: "translateY(-50%)",
39
- color: selectProps.isInvalid ? theme.colors.primary : isDisabled ? theme.colors.disabledTextColor : theme.colors.inputTextColor,
39
+ color: selectProps.isInvalid ? theme.colors.errorColor : isDisabled ? theme.colors.disabledTextColor : theme.colors.inputTextColor,
40
40
  fontSize: "14px",
41
41
  fontWeight: theme.textWeightNormal
42
42
  };
@@ -163,6 +163,7 @@ const CustomStyles = {
163
163
  const getCustomTheme = (theme, optionVariant, useFilterSubvariant) => {
164
164
  const customColors = {
165
165
  primary: th.color("red1")({ theme }),
166
+ errorColor: th.color("inputErrorColor")({ theme }),
166
167
  inputTextColor: th.color("blue1")({ theme }),
167
168
  backgroundColor: th.color("white")({ theme }),
168
169
  backgroundColorDisabled: th.color("neutral20")({ theme }),
@@ -58,6 +58,7 @@ export type SelectProps = {
58
58
  };
59
59
  export type BaseColors = {
60
60
  primary: string;
61
+ errorColor: string;
61
62
  optionTextColor: string;
62
63
  inputDisabledColor: string;
63
64
  inputBorderColor: string;
@@ -6,7 +6,7 @@ import "react";
6
6
  import styled$1, { css } from "@xstyled/styled-components";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region packages/ui/Elements/Toggle/Toggle.tsx
9
- const isHorizontal = (position) => position && ["left", "right"].includes(position);
9
+ const isHorizontal = (position) => !!position && ["left", "right"].includes(position);
10
10
  const StyledSpaceAroundWrap = styled$1(SpaceAroundWrap)`
11
11
  display: flex;
12
12
  flex-direction: ${({ labelPosition }) => labelPosition === "left" ? "row" : labelPosition === "right" ? "row-reverse" : "column"};
@@ -40,7 +40,7 @@ const StyledToggle = styled$1.div`
40
40
 
41
41
  & > span {
42
42
  transform: translate(75%, -50%);
43
- background-color: white;
43
+ background-color: #ffffff;
44
44
  }
45
45
  }
46
46
  `;
@@ -19,7 +19,7 @@ const InputIcon = styled$1.div`
19
19
  svg {
20
20
  stroke: lightGray3;
21
21
  cursor: pointer;
22
- color: ${({ $isInvalid, hasValue, disabled }) => $isInvalid ? th.color("red1") : disabled || !hasValue ? th.color("lightGray6") : th.color("blue2")};
22
+ color: ${({ $isInvalid, hasValue, disabled }) => $isInvalid ? th.color("inputErrorColor") : disabled || !hasValue ? th.color("lightGray6") : th.color("blue2")};
23
23
  }
24
24
  `;
25
25
  const ClearableInputIcon = styled$1(InputIcon)`
@@ -44,7 +44,7 @@ const IconWrapper = styled$1.div`
44
44
  const StyledInput = styled$1.input.attrs((props) => ({ as: props.$asTextArea ? "textarea" : "input" }))`
45
45
  ${system};
46
46
  border: slim;
47
- border-color: ${({ $isInvalid }) => $isInvalid ? th.color("red1") : th.color("lightGray6")};
47
+ border-color: ${({ $isInvalid }) => $isInvalid ? th.color("inputErrorColor") : th.color("lightGray6")};
48
48
  background-color: white;
49
49
  box-sizing: border-box;
50
50
  background-clip: padding-box;
@@ -145,9 +145,9 @@ const Suffix = styled$1.div`
145
145
  `;
146
146
  const InputRow = styled$1.div`
147
147
  position: relative;
148
- color: ${({ $isInvalid }) => $isInvalid ? th.color("red1") : th.color("gray")};
148
+ color: ${({ $isInvalid }) => $isInvalid ? th.color("inputErrorColor") : th.color("gray")};
149
149
  & > * {
150
- border-color: ${({ $isInvalid, variant }) => $isInvalid ? th.color("red1") : variant === "gray" ? th.color("neutral20") : th.color("lightGray6")};
150
+ border-color: ${({ $isInvalid, variant }) => $isInvalid ? th.color("inputErrorColor") : variant === "gray" ? th.color("neutral20") : th.color("lightGray6")};
151
151
  color: ${({ hasValue }) => hasValue ? th.color("typoPrimary") : th.color("gray")};
152
152
  }
153
153
  :hover > * {
@@ -11,33 +11,30 @@ declare const darkTheme: {
11
11
  neutral20: string;
12
12
  neutral30: string;
13
13
  neutral300: string;
14
- red1: string;
15
- red20: string;
16
14
  red30: string;
17
- red60: string;
18
- red70: string;
19
- red80: string;
20
- yellow20: string;
21
- yellow60: string;
22
- neutral500: string;
23
15
  lightGray1: string;
24
16
  lightGray2: string;
25
17
  lightGray3: string;
26
18
  lightGray4: string;
27
19
  lightGray6: string;
28
20
  blue1: string;
29
- blue2: string;
30
21
  blue3: string;
31
22
  blue10: string;
23
+ inputErrorColor: string;
32
24
  sideMenuSelectedText: string;
25
+ dashboardBackground: string;
26
+ iconStroke: string;
27
+ modalBackground: string;
33
28
  black: string;
34
29
  lightGray5: string;
30
+ neutral500: string;
35
31
  gray: string;
36
32
  gray1: string;
37
33
  gray2: string;
38
34
  gray3: string;
39
35
  gray4: string;
40
36
  gray5: string;
37
+ blue2: string;
41
38
  blue4: string;
42
39
  textTertiary: string;
43
40
  blue20: string;
@@ -72,15 +69,22 @@ declare const darkTheme: {
72
69
  orange60: string;
73
70
  orange80: string;
74
71
  yellow10: string;
72
+ yellow20: string;
73
+ yellow60: string;
75
74
  yellow70: string;
76
75
  yellow80: string;
77
76
  yellow90: string;
78
77
  yellow1: string;
79
78
  yellow2: string;
80
79
  red10: string;
80
+ red20: string;
81
81
  red50: string;
82
+ red70: string;
83
+ red1: string;
82
84
  red2: string;
83
85
  red3: string;
86
+ red60: string;
87
+ red80: string;
84
88
  dangerColor: string;
85
89
  purple20: string;
86
90
  purple40: string;
@@ -4,7 +4,7 @@ const darkTheme = {
4
4
  ...defaultTheme,
5
5
  colors: {
6
6
  ...defaultTheme.colors,
7
- bgLightGray: "#355069",
7
+ bgLightGray: "#203444",
8
8
  bgLightGray1: "#3a667b",
9
9
  bgLightGray2: "#F1F5F9",
10
10
  typoPrimary: "#ededed",
@@ -15,25 +15,20 @@ const darkTheme = {
15
15
  neutral20: "#2e475d",
16
16
  neutral30: "#42505d",
17
17
  neutral300: "#d6d9df",
18
- red1: "#73e1ff",
19
- red20: "#3a667b",
20
18
  red30: "#8594A5",
21
- red60: "#55d1f3",
22
- red70: "#d1f5ff",
23
- red80: "#d1f5ff",
24
- yellow20: "#857000",
25
- yellow60: "#e77c00",
26
- neutral500: "#55d1f3",
27
19
  lightGray1: "#162C3F",
28
20
  lightGray2: "#1a2b38",
29
21
  lightGray3: "#7e8489",
30
22
  lightGray4: "#7A90A1",
31
23
  lightGray6: "#7A90A1",
32
24
  blue1: "#ffffff",
33
- blue2: "#d9fffa",
34
- blue3: "#081724",
25
+ blue3: "#05111b",
35
26
  blue10: "#2e475d",
36
- sideMenuSelectedText: "#fff"
27
+ inputErrorColor: "#E94324",
28
+ sideMenuSelectedText: "#ffffff",
29
+ dashboardBackground: "#1b2b38",
30
+ iconStroke: "#d9fffa",
31
+ modalBackground: "#647483"
37
32
  },
38
33
  shadows: {
39
34
  ...defaultTheme.shadows,
@@ -107,7 +107,11 @@ declare const defaultTheme: {
107
107
  magenta80: string;
108
108
  magenta90: string;
109
109
  error: string;
110
+ inputErrorColor: string;
110
111
  sideMenuSelectedText: string;
112
+ dashboardBackground: string;
113
+ iconStroke: string;
114
+ modalBackground: string;
111
115
  };
112
116
  fonts: {
113
117
  primary: string;
@@ -108,7 +108,11 @@ const defaultTheme = {
108
108
  magenta80: "#9F1853",
109
109
  magenta90: "#7B1340",
110
110
  error: "#ea5455",
111
- sideMenuSelectedText: "#ffffff"
111
+ inputErrorColor: "#DB2B19",
112
+ sideMenuSelectedText: "#ffffff",
113
+ dashboardBackground: "#ffffff",
114
+ iconStroke: "#22394E",
115
+ modalBackground: "#22394E"
112
116
  },
113
117
  fonts: {
114
118
  primary: "Inter, sans-serif",
@@ -108,7 +108,11 @@ declare const themes: {
108
108
  magenta80: string;
109
109
  magenta90: string;
110
110
  error: string;
111
+ inputErrorColor: string;
111
112
  sideMenuSelectedText: string;
113
+ dashboardBackground: string;
114
+ iconStroke: string;
115
+ modalBackground: string;
112
116
  };
113
117
  fonts: {
114
118
  primary: string;
@@ -368,7 +372,11 @@ declare const themes: {
368
372
  magenta80: string;
369
373
  magenta90: string;
370
374
  error: string;
375
+ inputErrorColor: string;
371
376
  sideMenuSelectedText: string;
377
+ dashboardBackground: string;
378
+ iconStroke: string;
379
+ modalBackground: string;
372
380
  };
373
381
  fonts: {
374
382
  primary: string;
@@ -400,33 +408,30 @@ declare const themes: {
400
408
  neutral20: string;
401
409
  neutral30: string;
402
410
  neutral300: string;
403
- red1: string;
404
- red20: string;
405
411
  red30: string;
406
- red60: string;
407
- red70: string;
408
- red80: string;
409
- yellow20: string;
410
- yellow60: string;
411
- neutral500: string;
412
412
  lightGray1: string;
413
413
  lightGray2: string;
414
414
  lightGray3: string;
415
415
  lightGray4: string;
416
416
  lightGray6: string;
417
417
  blue1: string;
418
- blue2: string;
419
418
  blue3: string;
420
419
  blue10: string;
420
+ inputErrorColor: string;
421
421
  sideMenuSelectedText: string;
422
+ dashboardBackground: string;
423
+ iconStroke: string;
424
+ modalBackground: string;
422
425
  black: string;
423
426
  lightGray5: string;
427
+ neutral500: string;
424
428
  gray: string;
425
429
  gray1: string;
426
430
  gray2: string;
427
431
  gray3: string;
428
432
  gray4: string;
429
433
  gray5: string;
434
+ blue2: string;
430
435
  blue4: string;
431
436
  textTertiary: string;
432
437
  blue20: string;
@@ -461,15 +466,22 @@ declare const themes: {
461
466
  orange60: string;
462
467
  orange80: string;
463
468
  yellow10: string;
469
+ yellow20: string;
470
+ yellow60: string;
464
471
  yellow70: string;
465
472
  yellow80: string;
466
473
  yellow90: string;
467
474
  yellow1: string;
468
475
  yellow2: string;
469
476
  red10: string;
477
+ red20: string;
470
478
  red50: string;
479
+ red70: string;
480
+ red1: string;
471
481
  red2: string;
472
482
  red3: string;
483
+ red60: string;
484
+ red80: string;
473
485
  dangerColor: string;
474
486
  purple20: string;
475
487
  purple40: string;
@@ -199,7 +199,11 @@ declare const mailwiseTheme: {
199
199
  magenta80: string;
200
200
  magenta90: string;
201
201
  error: string;
202
+ inputErrorColor: string;
202
203
  sideMenuSelectedText: string;
204
+ dashboardBackground: string;
205
+ iconStroke: string;
206
+ modalBackground: string;
203
207
  };
204
208
  fonts: {
205
209
  primary: string;