@kaizen/components 1.74.0 → 1.74.2

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 (70) hide show
  1. package/dist/cjs/Input/Input/Input.cjs +1 -3
  2. package/dist/cjs/Input/Input/Input.module.scss.cjs +1 -1
  3. package/dist/cjs/Input/InputSearch/InputSearch.cjs +1 -3
  4. package/dist/cjs/Input/InputSearch/InputSearch.module.scss.cjs +0 -1
  5. package/dist/esm/Input/Input/Input.mjs +1 -3
  6. package/dist/esm/Input/Input/Input.module.scss.mjs +1 -1
  7. package/dist/esm/Input/InputSearch/InputSearch.mjs +1 -3
  8. package/dist/esm/Input/InputSearch/InputSearch.module.scss.mjs +0 -1
  9. package/dist/styles.css +8398 -8515
  10. package/locales/ar.json +12 -0
  11. package/locales/bg.json +12 -0
  12. package/locales/cs.json +12 -0
  13. package/locales/cy.json +12 -0
  14. package/locales/da.json +12 -0
  15. package/locales/de.json +12 -0
  16. package/locales/el.json +12 -0
  17. package/locales/en-GB.json +13 -1
  18. package/locales/es-419.json +12 -0
  19. package/locales/es.json +12 -0
  20. package/locales/et.json +12 -0
  21. package/locales/fi.json +12 -0
  22. package/locales/fr-CA.json +12 -0
  23. package/locales/fr.json +12 -0
  24. package/locales/he.json +12 -0
  25. package/locales/hi.json +12 -0
  26. package/locales/ht.json +12 -0
  27. package/locales/hu.json +12 -0
  28. package/locales/id.json +12 -0
  29. package/locales/it.json +12 -0
  30. package/locales/ja.json +12 -0
  31. package/locales/km-KH.json +12 -0
  32. package/locales/ko.json +12 -0
  33. package/locales/lt.json +12 -0
  34. package/locales/lv.json +12 -0
  35. package/locales/mi.json +12 -0
  36. package/locales/ms.json +12 -0
  37. package/locales/nb.json +12 -0
  38. package/locales/nl.json +12 -0
  39. package/locales/pl.json +12 -0
  40. package/locales/pt-BR.json +12 -0
  41. package/locales/pt.json +12 -0
  42. package/locales/ro.json +12 -0
  43. package/locales/ru.json +12 -0
  44. package/locales/si-LK.json +12 -0
  45. package/locales/sk.json +12 -0
  46. package/locales/sr.json +12 -0
  47. package/locales/sv.json +12 -0
  48. package/locales/th.json +12 -0
  49. package/locales/tl.json +12 -0
  50. package/locales/tr.json +12 -0
  51. package/locales/uk.json +12 -0
  52. package/locales/vi.json +12 -0
  53. package/locales/zh-TW.json +12 -0
  54. package/locales/zh.json +12 -0
  55. package/package.json +1 -1
  56. package/src/Checkbox/Checkbox/Checkbox.module.scss +7 -19
  57. package/src/ClearButton/ClearButton.module.scss +5 -24
  58. package/src/Input/Input/Input.module.scss +6 -15
  59. package/src/Input/Input/Input.tsx +0 -4
  60. package/src/Input/InputSearch/InputSearch.module.scss +7 -23
  61. package/src/Input/InputSearch/InputSearch.tsx +0 -3
  62. package/src/Link/Link.module.css +8 -13
  63. package/src/Modal/GenericModal/GenericModal.module.scss +5 -11
  64. package/src/Notification/subcomponents/GenericNotification/GenericNotification.module.scss +4 -16
  65. package/src/Radio/Radio/Radio.module.scss +4 -20
  66. package/src/__next__/Button/Button.module.css +6 -11
  67. package/src/__next__/Icon/_docs/Icon.docs.module.css +3 -5
  68. package/src/__next__/Select/subcomponents/Option/Option.module.scss +2 -12
  69. package/src/__next__/Select/subcomponents/SelectToggle/SelectToggle.module.scss +4 -15
  70. package/src/__next__/Tag/RemovableTag/subcomponents/RemoveButton.module.scss +3 -14
@@ -7,27 +7,16 @@
7
7
 
8
8
  position: relative;
9
9
  display: inline-flex;
10
+ border-radius: 100%;
10
11
 
11
12
  &:hover {
12
13
  cursor: pointer;
13
14
  }
14
15
 
15
- &:focus {
16
- outline: none;
17
- }
18
-
19
16
  &:focus-visible {
20
- &::after {
21
- $focus-ring-offset: -1px;
22
-
23
- content: '';
24
- position: absolute;
25
- background: transparent;
26
- border-width: $border-focus-ring-border-width;
27
- border-style: $border-focus-ring-border-style;
28
- border-radius: 50%;
29
- inset: $focus-ring-offset;
30
- }
17
+ outline: var(--border-focus-ring-border-width) var(--border-focus-ring-border-style)
18
+ var(--color-blue-500);
19
+ outline-offset: -1px;
31
20
  }
32
21
  }
33
22
 
@@ -38,12 +27,6 @@
38
27
  &:focus-visible {
39
28
  color: $color-purple-800;
40
29
  }
41
-
42
- &:focus-visible {
43
- &::after {
44
- border-color: $color-blue-500;
45
- }
46
- }
47
30
  }
48
31
 
49
32
  .reversed {
@@ -55,8 +38,6 @@
55
38
  }
56
39
 
57
40
  &:focus-visible {
58
- &::after {
59
- border-color: $color-blue-300;
60
- }
41
+ outline-color: var(--color-blue-300);
61
42
  }
62
43
  }
@@ -50,6 +50,10 @@ $input-with-icon-padding: calc(#{$input-icon-size} + calc(#{$spacing-md} * 0.75)
50
50
 
51
51
  &:focus:not([disabled]),
52
52
  &:hover:focus:not([disabled]) {
53
+ outline: var(--border-focus-ring-border-width) var(--border-focus-ring-border-style)
54
+ var(--color-blue-500);
55
+ outline-offset: 1px;
56
+
53
57
  @include form-input-placeholder {
54
58
  opacity: 0%;
55
59
  }
@@ -66,19 +70,6 @@ $input-with-icon-padding: calc(#{$input-icon-size} + calc(#{$spacing-md} * 0.75)
66
70
  }
67
71
  }
68
72
 
69
- .input:focus + .focusRing {
70
- $focus-ring-offset: 3px;
71
-
72
- position: absolute;
73
- background: transparent;
74
- border-radius: $border-focus-ring-border-radius;
75
- border-width: $border-focus-ring-border-width;
76
- border-style: $border-focus-ring-border-style;
77
- border-color: transparent;
78
- inset: -$focus-ring-offset;
79
- pointer-events: none;
80
- }
81
-
82
73
  /* stylelint-disable no-descending-specificity */
83
74
  ///////////////////////////////////////////////////
84
75
  // ICON ADORNMENT STYLES
@@ -278,8 +269,8 @@ $input-with-icon-padding: calc(#{$input-icon-size} + calc(#{$spacing-md} * 0.75)
278
269
  background: rgba($color-white-rgb, 0.1);
279
270
  }
280
271
 
281
- &:focus + .focusRing {
282
- border-color: $color-blue-300;
272
+ &:focus {
273
+ outline-color: var(--color-blue-300);
283
274
  }
284
275
 
285
276
  &:not(.error, .caution) {
@@ -62,10 +62,6 @@ export const Input = ({
62
62
  {...restProps}
63
63
  />
64
64
 
65
- {/* Inputs aren't able to have pseudo elements like ::after on them,
66
- so we have to create an element ourselves for the focus ring */}
67
- <div className={styles.focusRing} />
68
-
69
65
  {endIconAdornment && <div className={styles.endIconAdornment}>{endIconAdornment}</div>}
70
66
  </div>
71
67
  )
@@ -60,19 +60,11 @@ $classname--input: '.input[type="search"]';
60
60
  opacity: 0%;
61
61
  }
62
62
  }
63
- }
64
63
 
65
- .focusRing {
66
- #{$classname--input}:focus + & {
67
- $focus-ring-offset: 3px;
68
-
69
- position: absolute;
70
- background: transparent;
71
- border-radius: $border-solid-border-radius-curved;
72
- border-width: $border-focus-ring-border-width;
73
- border-style: $border-focus-ring-border-style;
74
- inset: -$focus-ring-offset;
75
- pointer-events: none;
64
+ &:focus {
65
+ outline: var(--border-focus-ring-border-width) var(--border-focus-ring-border-style)
66
+ var(--color-blue-500);
67
+ outline-offset: 1px;
76
68
  }
77
69
  }
78
70
 
@@ -123,10 +115,6 @@ $classname--input: '.input[type="search"]';
123
115
  }
124
116
  }
125
117
 
126
- .focusRing {
127
- border-color: $color-blue-500;
128
- }
129
-
130
118
  .startIconAdornment {
131
119
  color: $color-purple-800;
132
120
  opacity: $start-icon-opacity--default;
@@ -162,10 +150,6 @@ $classname--input: '.input[type="search"]';
162
150
  }
163
151
  }
164
152
 
165
- .focusRing {
166
- border-color: $color-blue-500;
167
- }
168
-
169
153
  .startIconAdornment {
170
154
  color: $color-purple-800;
171
155
  opacity: $start-icon-opacity--default;
@@ -198,10 +182,10 @@ $classname--input: '.input[type="search"]';
198
182
  color: $color-white;
199
183
  opacity: $input-placeholder-opacity--reversed;
200
184
  }
201
- }
202
185
 
203
- .focusRing {
204
- border-color: $color-blue-300;
186
+ &:focus {
187
+ outline-color: var(--color-blue-300);
188
+ }
205
189
  }
206
190
 
207
191
  .startIconAdornment {
@@ -75,9 +75,6 @@ export const InputSearch = (props: InputSearchProps): JSX.Element => {
75
75
  readOnly={onChange === undefined}
76
76
  {...restProps}
77
77
  />
78
- {/* Inputs aren't able to have pseudo elements like ::after on them,
79
- so we have to create an element ourselves for the focus ring */}
80
- <div className={styles.focusRing} />
81
78
 
82
79
  {value && (
83
80
  <ClearButton
@@ -10,15 +10,10 @@
10
10
  outline: 0;
11
11
  }
12
12
 
13
- .link[data-focus-visible]::after {
14
- content: '';
15
- position: absolute;
16
- background: transparent;
17
- border-color: var(--color-blue-500);
18
- border-radius: 0;
19
- border-width: var(--border-focus-ring-border-width);
20
- border-style: var(--border-focus-ring-border-style);
21
- inset: calc(-1 * (var(--border-focus-ring-border-width) * 2) - 1px);
13
+ .link[data-focus-visible] {
14
+ outline: var(--border-focus-ring-border-width) var(--border-focus-ring-border-style)
15
+ var(--color-blue-500);
16
+ outline-offset: 3px;
22
17
  }
23
18
 
24
19
  .isUnderlined {
@@ -94,8 +89,8 @@
94
89
  --link-text-color: var(--color-white);
95
90
  }
96
91
 
97
- .white[data-focus-visible]::after {
98
- border-color: var(--color-blue-300);
92
+ .white[data-focus-visible] {
93
+ outline-color: var(--color-blue-300);
99
94
  }
100
95
 
101
96
  .white.isDisabled {
@@ -106,8 +101,8 @@
106
101
  --link-text-color: var(--color-white);
107
102
  }
108
103
 
109
- .reversed[data-focus-visible]::after {
110
- border-color: var(--color-blue-300);
104
+ .reversed[data-focus-visible] {
105
+ outline-color: var(--color-blue-300);
111
106
  }
112
107
 
113
108
  .link.isDisabled {
@@ -56,17 +56,11 @@
56
56
  }
57
57
 
58
58
  // wrap the modal container with a focus ring when the title has focus
59
- // don't copy this over on the rebuild
60
- // rather than putting the focus on the title, put it on the role=dialog element itself
61
- &:has(:global([class*='modalLabel']):focus-visible)::after {
62
- content: '';
63
- position: absolute;
64
- background: transparent;
65
- border-radius: $border-focus-ring-border-radius;
66
- border-width: $border-focus-ring-border-width;
67
- border-style: $border-focus-ring-border-style;
68
- border-color: $color-blue-300;
69
- inset: -4px;
59
+ // for the rebuild: rather than putting the focus on the title, put it on the role=dialog element itself
60
+ &:has(:global([class*='modalLabel']):focus-visible) {
61
+ outline: var(--border-focus-ring-border-width) var(--border-focus-ring-border-style)
62
+ var(--color-blue-300);
63
+ outline-offset: 2px;
70
64
  }
71
65
  }
72
66
 
@@ -34,24 +34,12 @@
34
34
  display: flex;
35
35
  align-items: center;
36
36
  justify-content: center;
37
+ border-radius: var(--border-solid-border-radius);
37
38
 
38
- &:focus,
39
39
  &:focus-visible {
40
- outline: none;
41
- }
42
-
43
- &:focus-visible::after {
44
- $focus-ring-offset: var(--spacing-2);
45
-
46
- content: '';
47
- pointer-events: none;
48
- position: absolute;
49
- background: transparent;
50
- border-radius: $border-focus-ring-border-radius;
51
- border-width: $border-focus-ring-border-width;
52
- border-style: $border-focus-ring-border-style;
53
- border-color: $color-blue-500;
54
- inset: $focus-ring-offset;
40
+ outline: var(--border-focus-ring-border-width) var(--border-focus-ring-border-style)
41
+ var(--color-blue-500);
42
+ outline-offset: -4px;
55
43
  }
56
44
  }
57
45
 
@@ -52,22 +52,9 @@ $dt-color-radio-border-color-focus-reversed: $color-blue-300;
52
52
 
53
53
  .radioInput:focus:not([disabled]) + & {
54
54
  border-color: $dt-color-radio-disc-color-base;
55
- }
56
-
57
- .radioInput:focus:not([disabled]) + &::after {
58
- pointer-events: none;
59
- content: '';
60
- box-sizing: border-box;
61
- position: absolute;
62
- background: transparent;
63
- border-radius: $radio-size + $focus-ring-offset;
64
- border-width: $border-focus-ring-border-width;
65
- border-style: $border-focus-ring-border-style;
66
- border-color: $dt-color-radio-border-color-focus;
67
- top: calc(-#{$focus-ring-offset} - calc(#{$radio-size} / 8));
68
- left: calc(-#{$focus-ring-offset} - calc(#{$radio-size} / 8));
69
- width: calc(#{$radio-size} + #{$focus-ring-offset} + #{$border-solid-border-width} * 2);
70
- height: calc(#{$radio-size} + #{$focus-ring-offset} + #{$border-solid-border-width} * 2);
55
+ outline: var(--border-focus-ring-border-width) var(--border-focus-ring-border-style)
56
+ var(--color-blue-500);
57
+ outline-offset: 1px;
71
58
  }
72
59
 
73
60
  .radioInput:not([disabled]) + &:hover {
@@ -81,10 +68,7 @@ $dt-color-radio-border-color-focus-reversed: $color-blue-300;
81
68
 
82
69
  .radioInput:focus:not([disabled]) + & {
83
70
  border-color: $color-white;
84
- }
85
-
86
- .radioInput:focus:not([disabled]) + &::after {
87
- border-color: $dt-color-radio-border-color-focus-reversed;
71
+ outline-color: $dt-color-radio-border-color-focus-reversed;
88
72
  }
89
73
 
90
74
  .radioInput:not([disabled]) + &:hover {
@@ -53,15 +53,10 @@
53
53
  --button-text-color: var(--color-white);
54
54
  }
55
55
 
56
- &[data-focus-visible]::after {
57
- content: '';
58
- position: absolute;
59
- background: transparent;
60
- border-color: var(--color-blue-500);
61
- border-radius: var(--border-focus-ring-border-radius);
62
- border-width: var(--border-focus-ring-border-width);
63
- border-style: var(--border-focus-ring-border-style);
64
- inset: calc(-1 * (var(--border-focus-ring-border-width) * 2) - 1px);
56
+ &[data-focus-visible] {
57
+ outline: var(--border-focus-ring-border-width) var(--border-focus-ring-border-style)
58
+ var(--color-blue-500);
59
+ outline-offset: 1px;
65
60
  }
66
61
  }
67
62
 
@@ -164,8 +159,8 @@
164
159
  .primaryReversed,
165
160
  .secondaryReversed,
166
161
  .tertiaryReversed {
167
- &[data-focus-visible]::after {
168
- border-color: var(--color-blue-300);
162
+ &[data-focus-visible] {
163
+ outline-color: var(--color-blue-300);
169
164
  }
170
165
  }
171
166
 
@@ -9,9 +9,7 @@
9
9
  }
10
10
  }
11
11
 
12
- .interactiveIcon:focus::after {
13
- position: absolute;
14
- content: '';
15
- border: var(--border-focus-ring-border-width) solid var(--color-blue-500);
16
- inset: -2px;
12
+ .interactiveIcon:focus {
13
+ outline: var(--border-focus-ring-border-width) var(--border-focus-ring-border-style)
14
+ var(--color-blue-500);
17
15
  }
@@ -40,18 +40,8 @@ $iconAndBadgeHeight: $spacing-md;
40
40
  &.isFocusVisible {
41
41
  background-color: $color-blue-100;
42
42
  color: $color-blue-500;
43
-
44
- &::after {
45
- $focus-ring-offset: calc((#{$border-focus-ring-border-width} * 2) + 1px);
46
-
47
- content: '';
48
- position: absolute;
49
- background: transparent;
50
- border: $border-focus-ring-border-width $border-focus-ring-border-style $color-blue-500;
51
- border-radius: 4px;
52
- inset: calc(-1 * #{$focus-ring-offset});
53
- z-index: 1; // show border when sibling option is hovered
54
- }
43
+ outline: var(--border-focus-ring-border-width) var(--border-focus-ring-border-style)
44
+ var(--color-blue-500);
55
45
 
56
46
  .icon {
57
47
  color: $color-blue-500;
@@ -54,20 +54,11 @@
54
54
  }
55
55
 
56
56
  &:focus {
57
- outline: none;
57
+ outline: var(--border-focus-ring-border-width) var(--border-focus-ring-border-style)
58
+ var(--color-blue-500);
59
+ outline-offset: 1px;
58
60
  background-color: $color-gray-200;
59
61
  border-color: $color-gray-600;
60
-
61
- &::after {
62
- $focus-ring-offset: calc((#{$border-focus-ring-border-width} * 2) + 1px);
63
-
64
- content: '';
65
- position: absolute;
66
- background: transparent;
67
- border: $border-focus-ring-border-width $border-focus-ring-border-style $color-blue-500;
68
- border-radius: $border-focus-ring-border-radius;
69
- inset: calc(-1 * #{$focus-ring-offset});
70
- }
71
62
  }
72
63
  }
73
64
 
@@ -115,9 +106,7 @@
115
106
  }
116
107
 
117
108
  &:focus {
118
- &::after {
119
- border-color: $color-blue-300;
120
- }
109
+ outline-color: var(--color-blue-300);
121
110
  }
122
111
 
123
112
  .error {
@@ -12,20 +12,9 @@
12
12
 
13
13
  &:focus,
14
14
  &:focus-visible {
15
- outline: none;
16
-
17
- &::after {
18
- $focus-ring-offset: -3px;
19
-
20
- border-color: $color-blue-500;
21
- content: '';
22
- position: absolute;
23
- background: transparent;
24
- border-width: $border-focus-ring-border-width;
25
- border-style: $border-focus-ring-border-style;
26
- border-radius: 50%;
27
- inset: $focus-ring-offset;
28
- }
15
+ outline: var(--border-focus-ring-border-width) var(--border-focus-ring-border-style)
16
+ var(--color-blue-500);
17
+ outline-offset: 1px;
29
18
  }
30
19
 
31
20
  &::before {