@kaizen/components 2.4.0 → 2.5.1

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 (150) hide show
  1. package/dist/cjs/src/Heading/Heading.cjs +1 -1
  2. package/dist/cjs/src/Heading/Heading.module.css.cjs +22 -0
  3. package/dist/cjs/src/Label/Label.cjs +1 -1
  4. package/dist/cjs/src/Label/Label.module.css.cjs +16 -0
  5. package/dist/cjs/src/LabelledMessage/LabelledMessage.cjs +1 -1
  6. package/dist/cjs/src/LabelledMessage/LabelledMessage.module.css.cjs +7 -0
  7. package/dist/cjs/src/Notification/InlineNotification/InlineNotification.cjs +1 -1
  8. package/dist/cjs/src/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.cjs +1 -1
  9. package/dist/cjs/src/Notification/ToastNotification/ToastNotificationsList/{ToastNotificationsList.module.scss.cjs → ToastNotificationsList.module.css.cjs} +1 -1
  10. package/dist/cjs/src/Notification/subcomponents/CancelButton/CancelButton.cjs +1 -1
  11. package/dist/cjs/src/Notification/subcomponents/GenericNotification/GenericNotification.cjs +1 -1
  12. package/dist/cjs/src/Notification/subcomponents/GenericNotification/GenericNotification.module.css.cjs +29 -0
  13. package/dist/cjs/src/Notification/subcomponents/NotificationHeading/NotificationHeading.cjs +1 -1
  14. package/dist/cjs/src/Select/Select.cjs +9 -7
  15. package/dist/cjs/src/Text/Text.cjs +1 -1
  16. package/dist/cjs/src/Text/Text.module.css.cjs +16 -0
  17. package/dist/cjs/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.cjs +1 -1
  18. package/dist/cjs/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.css.cjs +13 -0
  19. package/dist/cjs/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.cjs +1 -1
  20. package/dist/cjs/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.module.css.cjs +9 -0
  21. package/dist/cjs/src/Tooltip/OverlayArrow.cjs +1 -1
  22. package/dist/cjs/src/Tooltip/OverlayArrow.module.css.cjs +7 -0
  23. package/dist/cjs/src/Tooltip/Tooltip.cjs +1 -1
  24. package/dist/cjs/src/Tooltip/Tooltip.module.css.cjs +7 -0
  25. package/dist/esm/src/Heading/Heading.mjs +1 -1
  26. package/dist/esm/src/Heading/Heading.module.css.mjs +20 -0
  27. package/dist/esm/src/Label/Label.mjs +1 -1
  28. package/dist/esm/src/Label/Label.module.css.mjs +14 -0
  29. package/dist/esm/src/LabelledMessage/LabelledMessage.mjs +1 -1
  30. package/dist/esm/src/LabelledMessage/LabelledMessage.module.css.mjs +5 -0
  31. package/dist/esm/src/Notification/InlineNotification/InlineNotification.mjs +1 -1
  32. package/dist/esm/src/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.mjs +1 -1
  33. package/dist/esm/src/Notification/ToastNotification/ToastNotificationsList/{ToastNotificationsList.module.scss.mjs → ToastNotificationsList.module.css.mjs} +1 -1
  34. package/dist/esm/src/Notification/subcomponents/CancelButton/CancelButton.mjs +1 -1
  35. package/dist/esm/src/Notification/subcomponents/GenericNotification/GenericNotification.mjs +1 -1
  36. package/dist/esm/src/Notification/subcomponents/GenericNotification/GenericNotification.module.css.mjs +27 -0
  37. package/dist/esm/src/Notification/subcomponents/NotificationHeading/NotificationHeading.mjs +1 -1
  38. package/dist/esm/src/Select/Select.mjs +9 -7
  39. package/dist/esm/src/Text/Text.mjs +1 -1
  40. package/dist/esm/src/Text/Text.module.css.mjs +14 -0
  41. package/dist/esm/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.mjs +1 -1
  42. package/dist/esm/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.css.mjs +11 -0
  43. package/dist/esm/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.mjs +1 -1
  44. package/dist/esm/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.module.css.mjs +7 -0
  45. package/dist/esm/src/Tooltip/OverlayArrow.mjs +1 -1
  46. package/dist/esm/src/Tooltip/OverlayArrow.module.css.mjs +5 -0
  47. package/dist/esm/src/Tooltip/Tooltip.mjs +1 -1
  48. package/dist/esm/src/Tooltip/Tooltip.module.css.mjs +5 -0
  49. package/dist/styles.css +726 -520
  50. package/locales/ar.json +4 -0
  51. package/locales/bg.json +4 -0
  52. package/locales/cs.json +4 -0
  53. package/locales/cy.json +4 -0
  54. package/locales/da.json +4 -0
  55. package/locales/de.json +4 -0
  56. package/locales/el.json +4 -0
  57. package/locales/en-GB.json +4 -0
  58. package/locales/en.json +4 -0
  59. package/locales/es-419.json +4 -0
  60. package/locales/es.json +4 -0
  61. package/locales/et.json +4 -0
  62. package/locales/fi.json +4 -0
  63. package/locales/fr-CA.json +4 -0
  64. package/locales/fr.json +4 -0
  65. package/locales/he.json +4 -0
  66. package/locales/hi.json +4 -0
  67. package/locales/ht.json +4 -0
  68. package/locales/hu.json +4 -0
  69. package/locales/id.json +4 -0
  70. package/locales/it.json +4 -0
  71. package/locales/ja.json +4 -0
  72. package/locales/km-KH.json +4 -0
  73. package/locales/ko.json +4 -0
  74. package/locales/lt.json +4 -0
  75. package/locales/lv.json +4 -0
  76. package/locales/mi.json +4 -0
  77. package/locales/ms.json +4 -0
  78. package/locales/nb.json +4 -0
  79. package/locales/nl.json +4 -0
  80. package/locales/pl.json +4 -0
  81. package/locales/pt-BR.json +4 -0
  82. package/locales/pt.json +4 -0
  83. package/locales/ro.json +4 -0
  84. package/locales/ru.json +4 -0
  85. package/locales/si-LK.json +4 -0
  86. package/locales/sk.json +4 -0
  87. package/locales/sr.json +4 -0
  88. package/locales/sv.json +4 -0
  89. package/locales/th.json +4 -0
  90. package/locales/tl.json +4 -0
  91. package/locales/tr.json +4 -0
  92. package/locales/uk.json +4 -0
  93. package/locales/vi.json +4 -0
  94. package/locales/zh-TW.json +4 -0
  95. package/locales/zh.json +4 -0
  96. package/package.json +1 -1
  97. package/src/Content/Content.module.css +1 -1
  98. package/src/Heading/Heading.module.css +111 -0
  99. package/src/Heading/Heading.tsx +1 -1
  100. package/src/Label/Label.module.css +97 -0
  101. package/src/Label/Label.tsx +1 -1
  102. package/src/Label/_docs/Label.stickersheet.stories.tsx +9 -4
  103. package/src/LabelledMessage/{LabelledMessage.module.scss → LabelledMessage.module.css} +1 -3
  104. package/src/LabelledMessage/LabelledMessage.tsx +1 -1
  105. package/src/Notification/InlineNotification/InlineNotification.tsx +1 -1
  106. package/src/Notification/InlineNotification/_docs/InlineNotification.stickersheet.stories.tsx +1 -1
  107. package/src/Notification/ToastNotification/ToastNotificationsList/{ToastNotificationsList.module.scss → ToastNotificationsList.module.css} +6 -8
  108. package/src/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.tsx +1 -1
  109. package/src/Notification/subcomponents/CancelButton/CancelButton.tsx +1 -1
  110. package/src/Notification/subcomponents/GenericNotification/GenericNotification.module.css +392 -0
  111. package/src/Notification/subcomponents/GenericNotification/GenericNotification.tsx +1 -1
  112. package/src/Notification/subcomponents/NotificationHeading/NotificationHeading.tsx +1 -1
  113. package/src/Select/Select.tsx +8 -6
  114. package/src/Text/Text.module.css +71 -0
  115. package/src/Text/Text.tsx +1 -1
  116. package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.css +141 -0
  117. package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.tsx +1 -1
  118. package/src/ToggleSwitch/ToggleSwitchField/{ToggleSwitchField.module.scss → ToggleSwitchField.module.css} +1 -3
  119. package/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.tsx +1 -1
  120. package/src/Tooltip/OverlayArrow.module.css +45 -0
  121. package/src/Tooltip/OverlayArrow.tsx +1 -1
  122. package/src/Tooltip/Tooltip.module.css +62 -0
  123. package/src/Tooltip/Tooltip.tsx +1 -1
  124. package/dist/cjs/src/Heading/Heading.module.scss.cjs +0 -22
  125. package/dist/cjs/src/Label/Label.module.scss.cjs +0 -15
  126. package/dist/cjs/src/LabelledMessage/LabelledMessage.module.scss.cjs +0 -7
  127. package/dist/cjs/src/Notification/subcomponents/GenericNotification/GenericNotification.module.scss.cjs +0 -29
  128. package/dist/cjs/src/Text/Text.module.scss.cjs +0 -16
  129. package/dist/cjs/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss.cjs +0 -13
  130. package/dist/cjs/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.module.scss.cjs +0 -9
  131. package/dist/cjs/src/Tooltip/OverlayArrow.module.scss.cjs +0 -7
  132. package/dist/cjs/src/Tooltip/Tooltip.module.scss.cjs +0 -7
  133. package/dist/esm/src/Heading/Heading.module.scss.mjs +0 -20
  134. package/dist/esm/src/Label/Label.module.scss.mjs +0 -13
  135. package/dist/esm/src/LabelledMessage/LabelledMessage.module.scss.mjs +0 -5
  136. package/dist/esm/src/Notification/subcomponents/GenericNotification/GenericNotification.module.scss.mjs +0 -27
  137. package/dist/esm/src/Text/Text.module.scss.mjs +0 -14
  138. package/dist/esm/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss.mjs +0 -11
  139. package/dist/esm/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.module.scss.mjs +0 -7
  140. package/dist/esm/src/Tooltip/OverlayArrow.module.scss.mjs +0 -5
  141. package/dist/esm/src/Tooltip/Tooltip.module.scss.mjs +0 -5
  142. package/src/Content/_variables.css +0 -5
  143. package/src/Heading/Heading.module.scss +0 -115
  144. package/src/Label/Label.module.scss +0 -105
  145. package/src/Notification/subcomponents/GenericNotification/GenericNotification.module.scss +0 -138
  146. package/src/Notification/subcomponents/GenericNotification/_mixins.scss +0 -366
  147. package/src/Text/Text.module.scss +0 -74
  148. package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss +0 -139
  149. package/src/Tooltip/OverlayArrow.module.scss +0 -45
  150. package/src/Tooltip/Tooltip.module.scss +0 -68
@@ -1,138 +0,0 @@
1
- @import '~@kaizen/design-tokens/sass/typography';
2
- @import '~@kaizen/design-tokens/sass/border';
3
- @import '~@kaizen/design-tokens/sass/color';
4
- @import '~@kaizen/design-tokens/sass/spacing';
5
- @import './mixins';
6
-
7
- @layer kz-components {
8
- .notification {
9
- @extend %ca-notification;
10
- }
11
-
12
- // Structure
13
- .icon {
14
- @extend %ca-notification__icon;
15
-
16
- color: var(--icon-color);
17
- }
18
-
19
- .textContainer {
20
- @extend %ca-notification__text-container;
21
- }
22
-
23
- .title {
24
- @extend %ca-notification__title;
25
- }
26
-
27
- .text {
28
- @extend %ca-notification__text;
29
- }
30
-
31
- .cancel {
32
- @extend %ca-notification__cancel;
33
-
34
- position: relative;
35
- display: flex;
36
- align-items: center;
37
- justify-content: center;
38
- border-radius: var(--border-solid-border-radius);
39
-
40
- &:focus-visible {
41
- outline: var(--border-focus-ring-border-width) var(--border-focus-ring-border-style)
42
- var(--color-blue-500);
43
- outline-offset: -4px;
44
- }
45
- }
46
-
47
- .cancelLabel {
48
- @extend %ca-notification__cancel__label;
49
- }
50
-
51
- .notificationTitle {
52
- top: 0.42em;
53
- position: relative;
54
- margin-inline-end: $spacing-6;
55
- line-height: $typography-heading-6-line-height;
56
- }
57
-
58
- @container (max-width: 25rem) {
59
- .notificationTitle {
60
- width: 100%;
61
- }
62
- }
63
-
64
- // Animation
65
- .hidden {
66
- @extend %ca-notification---hidden;
67
- }
68
-
69
- // Variant
70
- .inline {
71
- @extend %ca-notification---inline;
72
- }
73
-
74
- .toast {
75
- @extend %ca-notification---toast;
76
- }
77
-
78
- .global {
79
- @extend %ca-notification---global;
80
- }
81
-
82
- // ------------------------------
83
- // Variant
84
- // ------------------------------
85
- .success {
86
- background: $color-green-100;
87
- border-color: var(--color-green-500);
88
- color: $color-purple-800;
89
-
90
- --icon-color: var(--color-green-500);
91
- }
92
-
93
- .informative {
94
- background: $color-blue-100;
95
- border-color: var(--color-blue-500);
96
- color: $color-purple-800;
97
-
98
- --icon-color: var(--color-blue-500);
99
- }
100
-
101
- .cautionary {
102
- background: $color-yellow-100;
103
- border-color: var(--color-yellow-700);
104
- color: $color-purple-800;
105
-
106
- --icon-color: var(--color-yellow-700);
107
- }
108
-
109
- .warning {
110
- background: $color-red-100;
111
- border-color: var(--color-red-500);
112
- color: $color-purple-800;
113
-
114
- --icon-color: var(--color-red-500);
115
- }
116
-
117
- .security {
118
- @extend %ca-notification---cautionary;
119
- }
120
-
121
- // Modifiers
122
- .noBottomMargin {
123
- @extend %ca-notification---noBottomMargin;
124
- }
125
-
126
- .forceMultiline {
127
- @extend %ca-notification---forceMultiline;
128
- }
129
-
130
- .persistent {
131
- @extend %ca-notification---persistent;
132
- }
133
-
134
- // this is only for inline notifications, but is here due to specificity issues in the _styles.scss file
135
- .subtle {
136
- @extend %ca-notification---subtle;
137
- }
138
- }
@@ -1,366 +0,0 @@
1
- @import '~@kaizen/design-tokens/sass/typography';
2
- @import '~@kaizen/design-tokens/sass/color';
3
- @import '~@kaizen/design-tokens/sass/shadow';
4
- @import '~@kaizen/design-tokens/sass/spacing';
5
- @import '~@kaizen/design-tokens/sass/border';
6
- @import '~@kaizen/design-tokens/sass/animation';
7
-
8
- $border-width: var(--border-width-1);
9
- $notification-vertical-padding: calc(#{$spacing-6} - #{$border-width});
10
- $notification-fade-out: opacity 200ms ease;
11
- $notification-collapse-height:
12
- margin-top 200ms ease,
13
- margin-bottom 200ms ease;
14
- $notification-collapse-height-delayed:
15
- margin-top 200ms ease 200ms,
16
- margin-bottom 200ms ease;
17
- $notification-pop-up: transform 200ms ease-out;
18
- $notification-slide-right: transform 300ms ease-out;
19
-
20
- @layer kz-components {
21
- %ca-notification {
22
- display: flex;
23
- box-sizing: border-box;
24
- pointer-events: all;
25
-
26
- &:focus {
27
- outline-offset: 1px;
28
- outline: 2px solid var(--color-blue-500);
29
- }
30
-
31
- // Variants
32
- &%ca-notification---inline,
33
- &%ca-notification---toast {
34
- margin-bottom: $spacing-24;
35
- border-width: $border-width;
36
- border-style: solid;
37
- border-radius: $border-solid-border-radius;
38
- }
39
-
40
- &%ca-notification---inline {
41
- width: auto;
42
- min-height: 46px;
43
- padding: $notification-vertical-padding $spacing-12;
44
- transition: $notification-fade-out, $notification-pop-up, $notification-collapse-height;
45
- }
46
-
47
- &%ca-notification---toast {
48
- container-type: inline-size;
49
- width: 25rem;
50
- box-shadow: $shadow-small-box-shadow;
51
- max-width: 100%;
52
- padding: $notification-vertical-padding 10px;
53
- transition:
54
- $notification-fade-out, $notification-slide-right, $notification-collapse-height-delayed;
55
- will-change: transform;
56
- }
57
-
58
- &%ca-notification---global {
59
- width: 100%;
60
- display: flex;
61
- align-items: center;
62
- border-width: 0;
63
- border-radius: 0;
64
- margin-bottom: 0;
65
- padding-top: var(--spacing-16);
66
- padding-bottom: var(--spacing-16);
67
- padding-inline-start: var(--spacing-8);
68
- transition: $notification-collapse-height;
69
- position: relative;
70
- z-index: 1030;
71
- }
72
-
73
- // Types
74
- &%ca-notification---positive {
75
- background: $color-green-100;
76
- border-color: var(--color-green-500);
77
- color: $color-purple-800;
78
- }
79
-
80
- &%ca-notification---informative {
81
- background: $color-blue-100;
82
- border-color: var(--color-blue-400);
83
- color: $color-purple-800;
84
- }
85
-
86
- &%ca-notification---cautionary {
87
- background: $color-yellow-100;
88
- border-color: var(--color-yellow-700);
89
- color: $color-purple-800;
90
- }
91
-
92
- &%ca-notification---negative {
93
- background: $color-red-100;
94
- border-color: var(--color-red-500);
95
- color: $color-purple-800;
96
- }
97
-
98
- // Hidden state
99
- &%ca-notification---hidden {
100
- opacity: 0%;
101
-
102
- &%ca-notification---inline,
103
- &%ca-notification---global {
104
- margin-bottom: 0;
105
- }
106
-
107
- &%ca-notification---inline {
108
- // When entering we use "ease-out", but when transitioning to hidden we want to use "ease-in".
109
- // We want it moving the fastest when it is the furthest off screen.
110
- transition-timing-function: ease-in;
111
- transform: translateY(-50%);
112
- }
113
-
114
- &%ca-notification---toast {
115
- // When entering we use "ease-out", but when transitioning to hidden we want to use "ease-in".
116
- // We want it moving the fastest when it is the furthest off screen.
117
- transition-timing-function: ease-in;
118
- transform: translateX(50%);
119
- }
120
-
121
- &%ca-notification---global {
122
- z-index: 1029;
123
- opacity: 100%;
124
- }
125
- }
126
-
127
- // Modifiers
128
- &%ca-notification---noBottomMargin {
129
- margin-bottom: 0;
130
- }
131
-
132
- &%ca-notification---persistent {
133
- transition: none;
134
- }
135
-
136
- // this is only for inline notifications
137
- &%ca-notification---subtle {
138
- background: none;
139
- border: none;
140
- padding: 0;
141
- }
142
- }
143
-
144
- %ca-notification__icon {
145
- align-items: flex-start;
146
- box-sizing: content-box;
147
-
148
- %ca-notification---positive & {
149
- color: $color-green-500;
150
- }
151
-
152
- %ca-notification---informative & {
153
- color: $color-blue-500;
154
- }
155
-
156
- %ca-notification---cautionary & {
157
- color: var(--color-yellow-700);
158
- }
159
-
160
- %ca-notification---negative & {
161
- color: $color-red-500;
162
- }
163
-
164
- %ca-notification---inline &,
165
- %ca-notification---toast & {
166
- width: 22px;
167
- height: 22px;
168
- font-size: 22px;
169
- margin-top: $spacing-6;
170
- }
171
-
172
- %ca-notification---global & {
173
- width: 24px;
174
- height: 24px;
175
- font-size: 24px;
176
- }
177
- }
178
-
179
- %ca-notification__text-container {
180
- box-sizing: content-box;
181
- display: flex;
182
- flex-flow: row wrap;
183
- flex: 1 0 0;
184
-
185
- %ca-notification---inline &,
186
- %ca-notification---toast & {
187
- margin-inline-start: $spacing-6;
188
- }
189
-
190
- %ca-notification---toast & {
191
- margin-inline-start: $spacing-6;
192
- max-width: calc(100% - #{$spacing-48});
193
- overflow-wrap: break-word;
194
- hyphens: auto;
195
- }
196
-
197
- %ca-notification---global & {
198
- margin-inline-start: var(--spacing-8);
199
- }
200
-
201
- %ca-notification---inline & {
202
- // Inline notifications often fade onto a white background.
203
- // Fading the higher-contrast text out at, as well as the whole container, makes for a smoother animation.
204
- transition: $notification-fade-out;
205
- }
206
-
207
- &%ca-notification---forceMultiline {
208
- flex-direction: column;
209
- }
210
- }
211
-
212
- %ca-notification__title {
213
- position: relative;
214
- font-family: $typography-heading-6-font-family;
215
- font-weight: $typography-heading-6-font-weight;
216
- font-size: $typography-heading-6-font-size;
217
- line-height: $typography-heading-6-line-height;
218
- letter-spacing: $typography-heading-6-letter-spacing;
219
- margin: 0;
220
- padding-right: 6px;
221
- // overriding Bootstrap style that changes h6s to text-transform: uppercase
222
- text-transform: none;
223
- color: inherit;
224
- top: 0.37em;
225
- }
226
-
227
- %ca-notification__text {
228
- position: relative;
229
- font-family: $typography-paragraph-small-font-family;
230
- font-weight: $typography-paragraph-small-font-weight;
231
- font-size: $typography-paragraph-small-font-size;
232
- line-height: $typography-paragraph-small-line-height;
233
- letter-spacing: $typography-paragraph-small-letter-spacing;
234
- margin: 0;
235
- color: inherit;
236
-
237
- %ca-notification---inline &,
238
- %ca-notification---toast & {
239
- position: relative;
240
- font-family: $typography-paragraph-small-font-family;
241
- font-weight: $typography-paragraph-small-font-weight;
242
- font-size: $typography-paragraph-small-font-size;
243
- line-height: $typography-paragraph-small-line-height;
244
- letter-spacing: $typography-paragraph-small-letter-spacing;
245
- // When the title and text are on different lines this ensures the baselines of the first lines are exactly 1 grid unit apart.
246
- // When they are both on a single line it ensures both are 1 grid unit tall.
247
- margin-top: $spacing-6;
248
- flex: 0 1 auto;
249
- padding-bottom: $spacing-12;
250
- top: 0.21em;
251
- }
252
- %ca-notification---toast & {
253
- width: 100%;
254
- }
255
-
256
- %ca-notification---global & {
257
- // Inherit baseline because the parent selector doesn't.
258
- position: static;
259
- font-weight: $typography-paragraph-body-font-weight;
260
- font-size: $typography-paragraph-body-font-size;
261
- line-height: $typography-paragraph-body-line-height;
262
- letter-spacing: $typography-paragraph-body-letter-spacing;
263
- }
264
-
265
- a[href]:not([data-rac]) {
266
- border-bottom: var(--spacing-1) solid $color-blue-500;
267
- text-decoration: none;
268
- color: $color-blue-500;
269
-
270
- &:hover {
271
- text-decoration: none;
272
- color: $color-blue-600;
273
- border-bottom: var(--spacing-1) solid $color-blue-600;
274
- }
275
- }
276
-
277
- strong {
278
- font-weight: $typography-button-secondary-font-weight;
279
- }
280
-
281
- p {
282
- font-weight: inherit;
283
- }
284
- }
285
-
286
- %ca-notification__cancel {
287
- cursor: pointer;
288
- appearance: none;
289
- transition: none;
290
- transform: none;
291
- margin: 0;
292
- padding: 0;
293
- border: none;
294
- background: transparent;
295
- font: inherit;
296
- color: $color-purple-800;
297
-
298
- .icon {
299
- opacity: 70%;
300
- transition: $animation-duration-fast opacity;
301
- }
302
-
303
- &:disabled,
304
- &.disabled {
305
- .icon {
306
- opacity: 30%;
307
- }
308
- }
309
-
310
- &:not(:disabled, .disabled) {
311
- &:hover,
312
- &:focus,
313
- &.hover {
314
- .icon {
315
- opacity: 100%;
316
- }
317
- }
318
-
319
- &:active,
320
- &.active {
321
- .icon {
322
- opacity: 100%;
323
- }
324
- }
325
- }
326
-
327
- &:active {
328
- transform: translateY(1px);
329
- }
330
-
331
- // The negative margins below are so that our clickable area will overlap the notification padding
332
- %ca-notification---inline &,
333
- %ca-notification---toast & {
334
- width: var(--spacing-48);
335
- height: var(--spacing-48);
336
- margin-top: calc(-1 * var(--spacing-6));
337
- margin-bottom: calc(-1 * var(--spacing-6));
338
- }
339
-
340
- %ca-notification---inline & {
341
- margin-inline-end: calc(-1 * var(--spacing-12));
342
- }
343
-
344
- %ca-notification---toast & {
345
- margin-inline-end: -10px;
346
- }
347
-
348
- %ca-notification---global & {
349
- width: var(--spacing-48);
350
- height: var(--spacing-48);
351
- margin-top: calc(-1 * var(--spacing-24));
352
- margin-bottom: calc(-1 * var(--spacing-24));
353
- }
354
- }
355
-
356
- %ca-notification__cancel__label {
357
- position: absolute;
358
- width: 1px;
359
- height: 1px;
360
- padding: 0;
361
- margin: -1px;
362
- overflow: hidden;
363
- clip-path: rect(0 0 0 0);
364
- border: 0;
365
- }
366
- }
@@ -1,74 +0,0 @@
1
- @import '~@kaizen/design-tokens/sass/color';
2
- @import '~@kaizen/design-tokens/sass/typography';
3
-
4
- @layer kz-components {
5
- .text {
6
- --icon-vertical-align: text-bottom;
7
-
8
- margin: 0;
9
-
10
- strong {
11
- font-weight: $typography-paragraph-bold-font-weight;
12
- }
13
- }
14
-
15
- .intro-lede {
16
- font-family: $typography-paragraph-intro-lede-font-family;
17
- font-weight: $typography-paragraph-intro-lede-font-weight;
18
- font-size: $typography-paragraph-intro-lede-font-size;
19
- line-height: $typography-paragraph-intro-lede-line-height;
20
- letter-spacing: $typography-paragraph-intro-lede-letter-spacing;
21
- }
22
-
23
- .body {
24
- font-family: $typography-paragraph-body-font-family;
25
- font-weight: $typography-paragraph-body-font-weight;
26
- font-size: $typography-paragraph-body-font-size;
27
- line-height: $typography-paragraph-body-line-height;
28
- letter-spacing: $typography-paragraph-body-letter-spacing;
29
- }
30
-
31
- .small {
32
- font-family: $typography-paragraph-small-font-family;
33
- font-weight: $typography-paragraph-small-font-weight;
34
- font-size: $typography-paragraph-small-font-size;
35
- line-height: $typography-paragraph-small-line-height;
36
- letter-spacing: $typography-paragraph-small-letter-spacing;
37
- }
38
-
39
- .extra-small {
40
- font-family: $typography-paragraph-extra-small-font-family;
41
- font-weight: $typography-paragraph-extra-small-font-weight;
42
- font-size: $typography-paragraph-extra-small-font-size;
43
- line-height: $typography-paragraph-extra-small-line-height;
44
- letter-spacing: $typography-paragraph-extra-small-letter-spacing;
45
- }
46
-
47
- .dark {
48
- color: $color-purple-800;
49
- opacity: 100%;
50
- }
51
-
52
- .dark-reduced-opacity {
53
- color: $color-purple-800;
54
- opacity: 70%;
55
- }
56
-
57
- .white {
58
- color: $color-white;
59
- opacity: 100%;
60
- }
61
-
62
- .white-reduced-opacity {
63
- color: $color-white;
64
- opacity: 80%;
65
- }
66
-
67
- .positive {
68
- color: $color-green-600;
69
- }
70
-
71
- .negative {
72
- color: $color-red-600;
73
- }
74
- }
@@ -1,139 +0,0 @@
1
- @import '~@kaizen/design-tokens/sass/color';
2
- @import '~@kaizen/design-tokens/sass/border';
3
- @import '~@kaizen/design-tokens/sass/spacing';
4
- @import '~@kaizen/design-tokens/sass/animation';
5
- @import '../../../styles/utils/forms';
6
-
7
- @layer kz-components {
8
- $animation-timing: $animation-duration-immediate $animation-easing-function-linear;
9
- $focus-ring-offset: 1px;
10
-
11
- .checkbox {
12
- @include form-input-visually-hidden;
13
- }
14
-
15
- .track {
16
- position: relative;
17
- background-color: $color-gray-500;
18
- border: $border-borderless-border-width $border-borderless-border-style
19
- $border-borderless-border-color;
20
- border-radius: $spacing-md;
21
- box-sizing: content-box;
22
- width: calc((#{$spacing-md} * 1.05) * 2);
23
- height: calc(#{$spacing-md} * 1.25);
24
- padding: 0 calc(#{$spacing-md} * 0.15);
25
- display: flex;
26
- align-items: center;
27
- transition: background-color $animation-timing;
28
-
29
- /* TODO: Fix */
30
- /* stylelint-disable no-descending-specificity */
31
- .checkbox:not(.disabled):focus + &,
32
- .checkbox:not(.disabled):hover:focus + & {
33
- border-color: transparent;
34
- outline: 2px solid $color-blue-500;
35
- outline-offset: $focus-ring-offset;
36
- background-color: $color-gray-600;
37
- }
38
-
39
- .checkbox:not(.disabled) + &:hover,
40
- label:hover .checkbox:not(.disabled) + & {
41
- background-color: $color-purple-500;
42
- background-color: $color-gray-600;
43
- }
44
-
45
- /* stylelint-enable no-descending-specificity */
46
- }
47
-
48
- .thumb {
49
- display: flex;
50
- align-items: center;
51
- justify-content: center;
52
- background-color: $color-white;
53
- border: $border-borderless-border-width $border-borderless-border-style
54
- $border-borderless-border-color;
55
- border-radius: $spacing-md;
56
- transition:
57
- left $animation-timing,
58
- right $animation-timing;
59
- cursor: default;
60
- }
61
-
62
- .checkIcon {
63
- color: $color-green-500;
64
- opacity: 0%;
65
- transition-duration: $animation-duration-rapid;
66
- }
67
-
68
- /* stylelint-disable no-descending-specificity */
69
- .on {
70
- .checkbox + .track {
71
- border-color: $border-borderless-border-color;
72
- background-color: $color-green-500;
73
- }
74
-
75
- .checkbox:focus + .track {
76
- border-color: transparent;
77
- background-color: $color-green-600;
78
- }
79
-
80
- .thumb {
81
- position: relative;
82
- right: auto;
83
- inset-inline-start: calc(#{$spacing-md} * 1.1);
84
- }
85
-
86
- .checkIcon {
87
- opacity: 100%;
88
- transition-delay: $animation-duration-immediate;
89
- transition-duration: $animation-duration-fast;
90
- }
91
-
92
- .checkbox:not(.disabled) + .track:hover,
93
- label:hover & .checkbox:not(.disabled) + .track {
94
- background-color: $color-green-600;
95
- }
96
- }
97
-
98
- .off {
99
- .thumb {
100
- position: relative;
101
- right: auto;
102
- inset-inline-start: calc(#{$spacing-md} * -0.05);
103
- }
104
- }
105
-
106
- .reversed {
107
- .checkbox:focus + .track,
108
- .checkbox:hover:focus + .track {
109
- outline-color: $color-blue-300;
110
- }
111
-
112
- &.off {
113
- .track {
114
- background-color: rgba($color-white-rgb, 0.2);
115
- }
116
-
117
- .checkbox:focus + .track,
118
- .checkbox:hover:focus + .track {
119
- background-color: rgba($color-white-rgb, 0.65);
120
- }
121
-
122
- .checkbox:not(.disabled) + .track:hover,
123
- label:hover & .checkbox:not(.disabled) + .track {
124
- background-color: rgba($color-white-rgb, 0.65);
125
- }
126
- }
127
- }
128
-
129
- // When the ToggleSwitch is used as part of the ToggleSwitchField, the disabled state opacity is set on the Label component
130
- label .disabled.track {
131
- opacity: 100%;
132
- }
133
-
134
- .disabled.track {
135
- opacity: 30%;
136
- }
137
-
138
- /* stylelint-enable no-descending-specificity */
139
- }