@kaizen/components 2.4.0 → 3.0.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 (216) hide show
  1. package/dist/cjs/src/Button/Button.cjs +2 -4
  2. package/dist/cjs/src/GuidanceBlock/GuidanceBlock.cjs +16 -82
  3. package/dist/cjs/src/GuidanceBlock/GuidanceBlock.module.css.cjs +0 -1
  4. package/dist/cjs/src/Heading/Heading.cjs +1 -1
  5. package/dist/cjs/src/Heading/Heading.module.css.cjs +22 -0
  6. package/dist/cjs/src/Label/Label.cjs +1 -1
  7. package/dist/cjs/src/Label/Label.module.css.cjs +16 -0
  8. package/dist/cjs/src/LabelledMessage/LabelledMessage.cjs +1 -1
  9. package/dist/cjs/src/LabelledMessage/LabelledMessage.module.css.cjs +7 -0
  10. package/dist/cjs/src/LinkButton/LinkButton.cjs +2 -4
  11. package/dist/cjs/src/Modal/ConfirmationModal/ConfirmationModal.cjs +3 -2
  12. package/dist/cjs/src/Modal/ContextModal/ContextModal.cjs +0 -1
  13. package/dist/cjs/src/Modal/GenericModal/GenericModal.cjs +2 -2
  14. package/dist/cjs/src/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.cjs +3 -6
  15. package/dist/cjs/src/Notification/InlineNotification/InlineNotification.cjs +1 -1
  16. package/dist/cjs/src/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.cjs +1 -1
  17. package/dist/cjs/src/Notification/ToastNotification/ToastNotificationsList/{ToastNotificationsList.module.scss.cjs → ToastNotificationsList.module.css.cjs} +1 -1
  18. package/dist/cjs/src/Notification/subcomponents/CancelButton/CancelButton.cjs +1 -1
  19. package/dist/cjs/src/Notification/subcomponents/GenericNotification/GenericNotification.cjs +1 -1
  20. package/dist/cjs/src/Notification/subcomponents/GenericNotification/GenericNotification.module.css.cjs +29 -0
  21. package/dist/cjs/src/Notification/subcomponents/NotificationHeading/NotificationHeading.cjs +1 -1
  22. package/dist/cjs/src/Select/Select.cjs +23 -22
  23. package/dist/cjs/src/Select/Select.module.scss.cjs +0 -1
  24. package/dist/cjs/src/SingleSelect/SingleSelect.cjs +12 -19
  25. package/dist/cjs/src/SingleSelect/subcomponents/SelectToggle/SelectToggle.cjs +3 -5
  26. package/dist/cjs/src/SingleSelect/subcomponents/SelectToggle/SelectToggle.module.scss.cjs +0 -1
  27. package/dist/cjs/src/Text/Text.cjs +1 -1
  28. package/dist/cjs/src/Text/Text.module.css.cjs +16 -0
  29. package/dist/cjs/src/TimeField/TimeField.cjs +2 -3
  30. package/dist/cjs/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.cjs +1 -1
  31. package/dist/cjs/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.css.cjs +13 -0
  32. package/dist/cjs/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.cjs +1 -1
  33. package/dist/cjs/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.module.css.cjs +9 -0
  34. package/dist/cjs/src/Tooltip/OverlayArrow.cjs +1 -1
  35. package/dist/cjs/src/Tooltip/OverlayArrow.module.css.cjs +7 -0
  36. package/dist/cjs/src/Tooltip/Tooltip.cjs +1 -1
  37. package/dist/cjs/src/Tooltip/Tooltip.module.css.cjs +7 -0
  38. package/dist/esm/src/Button/Button.mjs +2 -4
  39. package/dist/esm/src/GuidanceBlock/GuidanceBlock.mjs +18 -84
  40. package/dist/esm/src/GuidanceBlock/GuidanceBlock.module.css.mjs +0 -1
  41. package/dist/esm/src/Heading/Heading.mjs +1 -1
  42. package/dist/esm/src/Heading/Heading.module.css.mjs +20 -0
  43. package/dist/esm/src/Label/Label.mjs +1 -1
  44. package/dist/esm/src/Label/Label.module.css.mjs +14 -0
  45. package/dist/esm/src/LabelledMessage/LabelledMessage.mjs +1 -1
  46. package/dist/esm/src/LabelledMessage/LabelledMessage.module.css.mjs +5 -0
  47. package/dist/esm/src/LinkButton/LinkButton.mjs +2 -4
  48. package/dist/esm/src/Modal/ConfirmationModal/ConfirmationModal.mjs +3 -2
  49. package/dist/esm/src/Modal/ContextModal/ContextModal.mjs +0 -1
  50. package/dist/esm/src/Modal/GenericModal/GenericModal.mjs +2 -2
  51. package/dist/esm/src/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.mjs +3 -6
  52. package/dist/esm/src/Notification/InlineNotification/InlineNotification.mjs +1 -1
  53. package/dist/esm/src/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.mjs +1 -1
  54. package/dist/esm/src/Notification/ToastNotification/ToastNotificationsList/{ToastNotificationsList.module.scss.mjs → ToastNotificationsList.module.css.mjs} +1 -1
  55. package/dist/esm/src/Notification/subcomponents/CancelButton/CancelButton.mjs +1 -1
  56. package/dist/esm/src/Notification/subcomponents/GenericNotification/GenericNotification.mjs +1 -1
  57. package/dist/esm/src/Notification/subcomponents/GenericNotification/GenericNotification.module.css.mjs +27 -0
  58. package/dist/esm/src/Notification/subcomponents/NotificationHeading/NotificationHeading.mjs +1 -1
  59. package/dist/esm/src/Select/Select.mjs +23 -22
  60. package/dist/esm/src/Select/Select.module.scss.mjs +0 -1
  61. package/dist/esm/src/SingleSelect/SingleSelect.mjs +12 -19
  62. package/dist/esm/src/SingleSelect/subcomponents/SelectToggle/SelectToggle.mjs +3 -5
  63. package/dist/esm/src/SingleSelect/subcomponents/SelectToggle/SelectToggle.module.scss.mjs +0 -1
  64. package/dist/esm/src/Text/Text.mjs +1 -1
  65. package/dist/esm/src/Text/Text.module.css.mjs +14 -0
  66. package/dist/esm/src/TimeField/TimeField.mjs +2 -3
  67. package/dist/esm/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.mjs +1 -1
  68. package/dist/esm/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.css.mjs +11 -0
  69. package/dist/esm/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.mjs +1 -1
  70. package/dist/esm/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.module.css.mjs +7 -0
  71. package/dist/esm/src/Tooltip/OverlayArrow.mjs +1 -1
  72. package/dist/esm/src/Tooltip/OverlayArrow.module.css.mjs +5 -0
  73. package/dist/esm/src/Tooltip/Tooltip.mjs +1 -1
  74. package/dist/esm/src/Tooltip/Tooltip.module.css.mjs +5 -0
  75. package/dist/styles.css +725 -613
  76. package/dist/types/Button/Button.d.ts +0 -5
  77. package/dist/types/Calendar/CalendarRange/CalendarRange.d.ts +2 -1
  78. package/dist/types/Calendar/CalendarSingle/CalendarSingle.d.ts +2 -1
  79. package/dist/types/Calendar/types.d.ts +1 -0
  80. package/dist/types/GuidanceBlock/GuidanceBlock.d.ts +1 -26
  81. package/dist/types/Input/Input/Input.d.ts +1 -6
  82. package/dist/types/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.d.ts +1 -5
  83. package/dist/types/Select/Select.d.ts +3 -13
  84. package/dist/types/SingleSelect/SingleSelect.d.ts +2 -24
  85. package/dist/types/SingleSelect/subcomponents/SelectToggle/SelectToggle.d.ts +2 -12
  86. package/dist/types/TextArea/TextArea.d.ts +1 -6
  87. package/dist/types/TimeField/TimeField.d.ts +1 -1
  88. package/locales/ar.json +4 -0
  89. package/locales/bg.json +4 -0
  90. package/locales/cs.json +4 -0
  91. package/locales/cy.json +4 -0
  92. package/locales/da.json +4 -0
  93. package/locales/de.json +4 -0
  94. package/locales/el.json +4 -0
  95. package/locales/en-GB.json +4 -0
  96. package/locales/en.json +4 -0
  97. package/locales/es-419.json +4 -0
  98. package/locales/es.json +4 -0
  99. package/locales/et.json +4 -0
  100. package/locales/fi.json +4 -0
  101. package/locales/fr-CA.json +4 -0
  102. package/locales/fr.json +4 -0
  103. package/locales/he.json +4 -0
  104. package/locales/hi.json +4 -0
  105. package/locales/ht.json +4 -0
  106. package/locales/hu.json +4 -0
  107. package/locales/id.json +4 -0
  108. package/locales/it.json +4 -0
  109. package/locales/ja.json +4 -0
  110. package/locales/km-KH.json +4 -0
  111. package/locales/ko.json +4 -0
  112. package/locales/lt.json +4 -0
  113. package/locales/lv.json +4 -0
  114. package/locales/mi.json +4 -0
  115. package/locales/ms.json +4 -0
  116. package/locales/nb.json +4 -0
  117. package/locales/nl.json +4 -0
  118. package/locales/pl.json +4 -0
  119. package/locales/pt-BR.json +4 -0
  120. package/locales/pt.json +4 -0
  121. package/locales/ro.json +4 -0
  122. package/locales/ru.json +4 -0
  123. package/locales/si-LK.json +4 -0
  124. package/locales/sk.json +4 -0
  125. package/locales/sr.json +4 -0
  126. package/locales/sv.json +4 -0
  127. package/locales/th.json +4 -0
  128. package/locales/tl.json +4 -0
  129. package/locales/tr.json +4 -0
  130. package/locales/uk.json +4 -0
  131. package/locales/vi.json +4 -0
  132. package/locales/zh-TW.json +4 -0
  133. package/locales/zh.json +4 -0
  134. package/package.json +1 -2
  135. package/src/Button/Button.tsx +1 -8
  136. package/src/Button/_docs/Button--api-specification.mdx +0 -1
  137. package/src/Calendar/CalendarRange/CalendarRange.tsx +4 -1
  138. package/src/Calendar/CalendarSingle/CalendarSingle.tsx +4 -1
  139. package/src/Calendar/types.ts +18 -0
  140. package/src/GuidanceBlock/GuidanceBlock.module.css +0 -8
  141. package/src/GuidanceBlock/GuidanceBlock.spec.tsx +1 -26
  142. package/src/GuidanceBlock/GuidanceBlock.tsx +2 -112
  143. package/src/GuidanceBlock/_docs/GuidanceBlock.stories.tsx +0 -90
  144. package/src/Heading/Heading.module.css +111 -0
  145. package/src/Heading/Heading.tsx +1 -1
  146. package/src/Input/Input/Input.module.scss +0 -31
  147. package/src/Input/Input/Input.tsx +1 -6
  148. package/src/Label/Label.module.css +97 -0
  149. package/src/Label/Label.tsx +1 -1
  150. package/src/Label/_docs/Label.stickersheet.stories.tsx +9 -4
  151. package/src/LabelledMessage/{LabelledMessage.module.scss → LabelledMessage.module.css} +1 -3
  152. package/src/LabelledMessage/LabelledMessage.tsx +1 -1
  153. package/src/LinkButton/LinkButton.tsx +1 -3
  154. package/src/LinkButton/_docs/LinkButton--api-specification.mdx +0 -1
  155. package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +7 -6
  156. package/src/Modal/ContextModal/ContextModal.tsx +0 -1
  157. package/src/Modal/GenericModal/GenericModal.tsx +3 -4
  158. package/src/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.tsx +2 -8
  159. package/src/Notification/InlineNotification/InlineNotification.tsx +1 -1
  160. package/src/Notification/InlineNotification/_docs/InlineNotification.stickersheet.stories.tsx +1 -1
  161. package/src/Notification/ToastNotification/ToastNotificationsList/{ToastNotificationsList.module.scss → ToastNotificationsList.module.css} +6 -8
  162. package/src/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.tsx +1 -1
  163. package/src/Notification/subcomponents/CancelButton/CancelButton.tsx +1 -1
  164. package/src/Notification/subcomponents/GenericNotification/GenericNotification.module.css +392 -0
  165. package/src/Notification/subcomponents/GenericNotification/GenericNotification.tsx +1 -1
  166. package/src/Notification/subcomponents/NotificationHeading/NotificationHeading.tsx +1 -1
  167. package/src/Select/Select.module.scss +0 -16
  168. package/src/Select/Select.tsx +24 -25
  169. package/src/SingleSelect/SingleSelect.tsx +1 -14
  170. package/src/SingleSelect/_docs/SingleSelect.stories.tsx +5 -2
  171. package/src/SingleSelect/subcomponents/SelectToggle/SelectToggle.module.scss +0 -8
  172. package/src/SingleSelect/subcomponents/SelectToggle/SelectToggle.tsx +2 -9
  173. package/src/Text/Text.module.css +71 -0
  174. package/src/Text/Text.tsx +1 -1
  175. package/src/TextArea/TextArea.tsx +1 -6
  176. package/src/TimeField/TimeField.tsx +2 -9
  177. package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.css +141 -0
  178. package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.tsx +1 -1
  179. package/src/ToggleSwitch/ToggleSwitchField/{ToggleSwitchField.module.scss → ToggleSwitchField.module.css} +1 -3
  180. package/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.tsx +1 -1
  181. package/src/Tooltip/OverlayArrow.module.css +45 -0
  182. package/src/Tooltip/OverlayArrow.tsx +1 -1
  183. package/src/Tooltip/Tooltip.module.css +62 -0
  184. package/src/Tooltip/Tooltip.tsx +1 -1
  185. package/dist/cjs/src/Heading/Heading.module.scss.cjs +0 -22
  186. package/dist/cjs/src/Label/Label.module.scss.cjs +0 -15
  187. package/dist/cjs/src/LabelledMessage/LabelledMessage.module.scss.cjs +0 -7
  188. package/dist/cjs/src/Modal/util/console.cjs +0 -16
  189. package/dist/cjs/src/Notification/subcomponents/GenericNotification/GenericNotification.module.scss.cjs +0 -29
  190. package/dist/cjs/src/Text/Text.module.scss.cjs +0 -16
  191. package/dist/cjs/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss.cjs +0 -13
  192. package/dist/cjs/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.module.scss.cjs +0 -9
  193. package/dist/cjs/src/Tooltip/OverlayArrow.module.scss.cjs +0 -7
  194. package/dist/cjs/src/Tooltip/Tooltip.module.scss.cjs +0 -7
  195. package/dist/esm/src/Heading/Heading.module.scss.mjs +0 -20
  196. package/dist/esm/src/Label/Label.module.scss.mjs +0 -13
  197. package/dist/esm/src/LabelledMessage/LabelledMessage.module.scss.mjs +0 -5
  198. package/dist/esm/src/Modal/util/console.mjs +0 -13
  199. package/dist/esm/src/Notification/subcomponents/GenericNotification/GenericNotification.module.scss.mjs +0 -27
  200. package/dist/esm/src/Text/Text.module.scss.mjs +0 -14
  201. package/dist/esm/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss.mjs +0 -11
  202. package/dist/esm/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.module.scss.mjs +0 -7
  203. package/dist/esm/src/Tooltip/OverlayArrow.module.scss.mjs +0 -5
  204. package/dist/esm/src/Tooltip/Tooltip.module.scss.mjs +0 -5
  205. package/dist/types/Modal/util/console.d.ts +0 -5
  206. package/dist/types/utils/useResizeObserver.d.ts +0 -22
  207. package/src/Heading/Heading.module.scss +0 -115
  208. package/src/Label/Label.module.scss +0 -105
  209. package/src/Modal/util/console.ts +0 -13
  210. package/src/Notification/subcomponents/GenericNotification/GenericNotification.module.scss +0 -138
  211. package/src/Notification/subcomponents/GenericNotification/_mixins.scss +0 -366
  212. package/src/Text/Text.module.scss +0 -74
  213. package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss +0 -139
  214. package/src/Tooltip/OverlayArrow.module.scss +0 -45
  215. package/src/Tooltip/Tooltip.module.scss +0 -68
  216. package/src/utils/useResizeObserver.ts +0 -73
@@ -39,9 +39,6 @@ const meta = {
39
39
  illustration: <Informative alt="" />,
40
40
  },
41
41
  argTypes: {
42
- actions: {
43
- control: false,
44
- },
45
42
  illustrationType: {
46
43
  description:
47
44
  'Sets the how the width and aspect ratio will respond to the Illustration passed in.',
@@ -138,42 +135,6 @@ export const Playground: Story = {
138
135
  },
139
136
  }
140
137
 
141
- export const Actions: Story = {
142
- args: {
143
- content: <ContentComponent />,
144
- actions: {
145
- primary: {
146
- label: 'Label',
147
- onClick: () => alert('tada: 🎉'),
148
- },
149
- secondary: {
150
- label: 'Label',
151
- href: '#',
152
- },
153
- },
154
- },
155
- }
156
-
157
- export const Tooltip: Story = {
158
- args: {
159
- content: <ContentComponent />,
160
- actions: {
161
- primary: {
162
- label: 'Label',
163
- onClick: () => alert('tada: 🎉'),
164
- tooltip: {
165
- text: 'Opens in a new tab',
166
- mood: 'cautionary',
167
- },
168
- },
169
- secondary: {
170
- label: 'Label',
171
- href: '#',
172
- },
173
- },
174
- },
175
- }
176
-
177
138
  export const CustomContent: Story = {
178
139
  args: {
179
140
  content: <ContentComponent />,
@@ -214,57 +175,6 @@ export const Variants: Story = {
214
175
  },
215
176
  }
216
177
 
217
- export const ActionsVsActionsSlot: Story = {
218
- args: {
219
- layout: 'default',
220
- illustration: <Informative alt="" />,
221
- content: <ContentComponent />,
222
- actions: {
223
- dismiss: {
224
- onClick: () => {
225
- alert('Dismissed')
226
- },
227
- },
228
- primary: {
229
- label: 'Label',
230
- onClick: () => alert('tada: 🎉'),
231
- },
232
- secondary: {
233
- label: 'Label',
234
- href: '#',
235
- },
236
- },
237
- secondaryDismiss: true,
238
- },
239
- render: (args) => (
240
- <div className="flex flex-col gap-16">
241
- <GuidanceBlock
242
- layout="default"
243
- illustration={<Informative alt="" />}
244
- content={<ContentComponent />}
245
- actions={args.actions}
246
- secondaryDismiss
247
- />
248
- <GuidanceBlock
249
- layout="default"
250
- illustration={<Informative alt="" />}
251
- content={<ContentComponent />}
252
- secondaryDismiss={true}
253
- actionsSlot={
254
- <>
255
- <Button size="large" onPress={() => alert('tada: 🎉')} slot="primary">
256
- Label
257
- </Button>
258
- <Button variant="tertiary" size="large" onPress={() => alert('tada: 🎉')}>
259
- Label
260
- </Button>
261
- </>
262
- }
263
- />
264
- </div>
265
- ),
266
- }
267
-
268
178
  export const ActionsSlot: Story = {
269
179
  args: {
270
180
  layout: 'default',
@@ -0,0 +1,111 @@
1
+ @layer reset {
2
+ .heading {
3
+ margin: 0;
4
+ }
5
+ }
6
+
7
+ @layer kz-components {
8
+ .display-0 {
9
+ font-family: var(--typography-display-0-font-family);
10
+ font-weight: var(--typography-display-0-font-weight);
11
+ font-size: var(--typography-display-0-font-size);
12
+ line-height: var(--typography-display-0-line-height);
13
+ letter-spacing: var(--typography-display-0-letter-spacing);
14
+ }
15
+
16
+ .composable-header-title {
17
+ font-family: var(--typography-display-0-font-family); /* Tiempos */
18
+ font-weight: 500; /* Medium */
19
+ font-size: var(--typography-heading-1-font-size);
20
+ line-height: var(--typography-heading-1-line-height);
21
+ letter-spacing: var(--typography-heading-1-letter-spacing);
22
+ }
23
+
24
+ .heading-1 {
25
+ font-family: var(--typography-heading-1-font-family);
26
+ font-weight: var(--typography-heading-1-font-weight);
27
+ font-size: var(--typography-heading-1-font-size);
28
+ line-height: var(--typography-heading-1-line-height);
29
+ letter-spacing: var(--typography-heading-1-letter-spacing);
30
+ }
31
+
32
+ .heading-2 {
33
+ font-family: var(--typography-heading-2-font-family);
34
+ font-weight: var(--typography-heading-2-font-weight);
35
+ font-size: var(--typography-heading-2-font-size);
36
+ line-height: var(--typography-heading-2-line-height);
37
+ letter-spacing: var(--typography-heading-2-letter-spacing);
38
+ }
39
+
40
+ .heading-3 {
41
+ font-family: var(--typography-heading-3-font-family);
42
+ font-weight: var(--typography-heading-3-font-weight);
43
+ font-size: var(--typography-heading-3-font-size);
44
+ line-height: var(--typography-heading-3-line-height);
45
+ letter-spacing: var(--typography-heading-3-letter-spacing);
46
+ }
47
+
48
+ .heading-4 {
49
+ font-family: var(--typography-heading-4-font-family);
50
+ font-weight: var(--typography-heading-4-font-weight);
51
+ font-size: var(--typography-heading-4-font-size);
52
+ line-height: var(--typography-heading-4-line-height);
53
+ letter-spacing: var(--typography-heading-4-letter-spacing);
54
+ }
55
+
56
+ .heading-5 {
57
+ font-family: var(--typography-heading-5-font-family);
58
+ font-weight: var(--typography-heading-5-font-weight);
59
+ font-size: var(--typography-heading-5-font-size);
60
+ line-height: var(--typography-heading-5-line-height);
61
+ letter-spacing: var(--typography-heading-5-letter-spacing);
62
+ }
63
+
64
+ .heading-6 {
65
+ font-family: var(--typography-heading-6-font-family);
66
+ font-weight: var(--typography-heading-6-font-weight);
67
+ font-size: var(--typography-heading-6-font-size);
68
+ line-height: var(--typography-heading-6-line-height);
69
+ letter-spacing: var(--typography-heading-6-letter-spacing);
70
+ }
71
+
72
+ .dark {
73
+ color: var(--color-purple-800);
74
+ opacity: 1;
75
+ }
76
+
77
+ .dark-reduced-opacity {
78
+ color: var(--color-purple-800);
79
+ opacity: 0.7;
80
+ }
81
+
82
+ .white {
83
+ color: var(--color-white);
84
+ opacity: 1;
85
+ }
86
+
87
+ .white-reduced-opacity {
88
+ color: var(--color-white);
89
+ opacity: 0.8;
90
+ }
91
+
92
+ .positive {
93
+ &.small {
94
+ color: var(--color-green-600);
95
+ }
96
+
97
+ &.large {
98
+ color: var(--color-green-500);
99
+ }
100
+ }
101
+
102
+ .negative {
103
+ &.small {
104
+ color: var(--color-red-600);
105
+ }
106
+
107
+ &.large {
108
+ color: var(--color-red-500);
109
+ }
110
+ }
111
+ }
@@ -1,7 +1,7 @@
1
1
  import { createElement, type HTMLAttributes } from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { type OverrideClassName } from '~components/types/OverrideClassName'
4
- import styles from './Heading.module.scss'
4
+ import styles from './Heading.module.css'
5
5
 
6
6
  const VARIANTS_24PX_OR_GREATER = ['display-0', 'heading-1', 'heading-2']
7
7
 
@@ -8,7 +8,6 @@
8
8
  $input-height: 48px;
9
9
  $input-base-padding-horizontal: $spacing-sm;
10
10
  $input-icon-size: 1.25rem; // 20px
11
- $input-placeholder-opacity: 0.5;
12
11
  $input-disabled-background: $color-gray-300;
13
12
  $input-disabled-opacity: 0.3;
14
13
  $input-disabled-border-alpha: 50%;
@@ -45,29 +44,17 @@
45
44
  width: 100%;
46
45
  margin-bottom: 2px;
47
46
 
48
- @include form-input-placeholder {
49
- opacity: 100%;
50
- }
51
-
52
47
  &:focus:not([disabled]),
53
48
  &:hover:focus:not([disabled]) {
54
49
  outline: var(--border-focus-ring-border-width) var(--border-focus-ring-border-style)
55
50
  var(--color-blue-500);
56
51
  outline-offset: 1px;
57
-
58
- @include form-input-placeholder {
59
- opacity: 0%;
60
- }
61
52
  }
62
53
 
63
54
  &.disabled {
64
55
  &:not(.reversed) {
65
56
  background: $input-disabled-background;
66
57
  }
67
-
68
- @include form-input-placeholder {
69
- color: rgba($color-purple-800-rgb, $input-disabled-opacity);
70
- }
71
58
  }
72
59
  }
73
60
 
@@ -204,11 +191,6 @@
204
191
  display: flex;
205
192
  align-items: center;
206
193
 
207
- @include form-input-placeholder {
208
- color: $color-purple-800;
209
- opacity: $input-placeholder-opacity;
210
- }
211
-
212
194
  @include form-input-focus-state {
213
195
  background-color: $color-gray-200;
214
196
  }
@@ -221,10 +203,6 @@
221
203
  background-color: $color-white;
222
204
  border-color: rgba($color-gray-500-rgb, $input-disabled-opacity);
223
205
  color: rgba($color-purple-800-rgb, $input-disabled-opacity);
224
-
225
- @include form-input-placeholder {
226
- opacity: $input-disabled-opacity;
227
- }
228
206
  }
229
207
 
230
208
  &:not(.error, .caution) {
@@ -261,11 +239,6 @@
261
239
  background: transparent;
262
240
  color: $color-white;
263
241
 
264
- @include form-input-placeholder {
265
- color: $color-white;
266
- opacity: $input-placeholder-opacity;
267
- }
268
-
269
242
  @include form-input-focus-state {
270
243
  background: rgba($color-white-rgb, 0.1);
271
244
  }
@@ -289,10 +262,6 @@
289
262
  &.disabled {
290
263
  background: transparent;
291
264
  color: rgba($color-white-rgb, $input-disabled-opacity);
292
-
293
- @include form-input-placeholder {
294
- opacity: $input-disabled-opacity;
295
- }
296
265
  }
297
266
 
298
267
  &.error {
@@ -14,12 +14,7 @@ export type InputProps = {
14
14
  endIconAdornment?: React.ReactNode
15
15
  reversed?: boolean
16
16
  type?: InputType
17
- /**
18
- * @deprecated Use of placeholder text goes against our a11y standards.
19
- * Use the `labelText` prop to provide a concise name, and the `description` prop for any help text.
20
- */
21
- placeholder?: string
22
- } & OverrideClassName<InputHTMLAttributes<HTMLInputElement>>
17
+ } & OverrideClassName<Omit<InputHTMLAttributes<HTMLInputElement>, 'placeholder'>>
23
18
 
24
19
  export const Input = ({
25
20
  inputRef,
@@ -0,0 +1,97 @@
1
+ @layer kz-components {
2
+ :root {
3
+ --label-start-margin: var(--spacing-xs);
4
+ --dt-color-form-text-color: var(--color-purple-800);
5
+ }
6
+
7
+ .label {
8
+ --icon-vertical-align: text-bottom;
9
+ }
10
+
11
+ .label,
12
+ :global(.ideal-sans) .label {
13
+ /* override Murmur global styles :( */
14
+ opacity: inherit;
15
+ color: var(--dt-color-form-text-color);
16
+ visibility: visible;
17
+ width: 100%;
18
+ text-align: start;
19
+ }
20
+
21
+ .reversed {
22
+ color: var(--color-white);
23
+
24
+ a {
25
+ color: var(--color-white);
26
+
27
+ &:hover {
28
+ text-decoration: none;
29
+ }
30
+ }
31
+ }
32
+
33
+ .disabled {
34
+ opacity: 0.3;
35
+ }
36
+
37
+ /* ///////////////////////////////////////////////////
38
+ //// LABEL TYPES
39
+ //////////////////////////////////////////////////// */
40
+
41
+ /* This is to override bootstrap styles. Remove when appropriate */
42
+ .text,
43
+ :global(.ideal-sans) .text {
44
+ font-family: var(--typography-heading-6-font-family);
45
+ font-size: var(--typography-heading-6-font-size);
46
+ line-height: var(--typography-heading-6-line-height);
47
+ letter-spacing: var(--typography-heading-6-letter-spacing);
48
+ font-weight: var(--typography-heading-6-font-weight);
49
+ }
50
+
51
+ .checkboxOrRadio,
52
+ .checkbox,
53
+ .radio,
54
+ :global(.ideal-sans) .checkboxOrRadio {
55
+ display: flex;
56
+ font-family: var(--typography-paragraph-body-font-family);
57
+ font-size: var(--typography-paragraph-body-font-size);
58
+ line-height: var(--typography-paragraph-body-line-height);
59
+ letter-spacing: var(--typography-paragraph-body-letter-spacing);
60
+ font-weight: var(--typography-paragraph-body-font-weight);
61
+ }
62
+
63
+ .toggle {
64
+ display: flex;
65
+ justify-content: space-between;
66
+ align-items: center;
67
+ font-family: var(--typography-paragraph-body-font-family);
68
+ font-size: var(--typography-paragraph-body-font-size);
69
+ line-height: var(--typography-paragraph-body-line-height);
70
+ letter-spacing: var(--typography-paragraph-body-letter-spacing);
71
+ font-weight: var(--typography-paragraph-body-font-weight);
72
+ }
73
+
74
+ .checkbox,
75
+ .radio,
76
+ .toggle {
77
+ /* apply padding when label is inline with form control */
78
+ .prependedLabel {
79
+ order: -1; /* place label before the control */
80
+ margin-inline-end: var(--label-start-margin);
81
+ }
82
+
83
+ .appendedLabel {
84
+ margin-inline-start: var(--label-start-margin);
85
+ }
86
+ }
87
+
88
+ .prominent {
89
+ font-family: var(--typography-heading-4-font-family);
90
+ font-weight: var(--typography-heading-4-font-weight);
91
+ font-size: var(--typography-heading-4-font-size);
92
+ line-height: var(--typography-heading-4-line-height);
93
+ letter-spacing: var(--typography-heading-4-letter-spacing);
94
+ display: block;
95
+ margin-bottom: var(--spacing-xs);
96
+ }
97
+ }
@@ -1,7 +1,7 @@
1
1
  import React, { type LabelHTMLAttributes } from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { type OverrideClassName } from '~components/types/OverrideClassName'
4
- import styles from './Label.module.scss'
4
+ import styles from './Label.module.css'
5
5
 
6
6
  type LabelType = 'text' | 'checkbox' | 'toggle' | 'radio'
7
7
 
@@ -1,5 +1,6 @@
1
1
  import React from 'react'
2
2
  import { type Meta } from '@storybook/react'
3
+ import { Link } from '~components/Link'
3
4
  import { StickerSheet, type StickerSheetStory } from '~storybook/components/StickerSheet'
4
5
  import { Label, type LabelProps } from '../index'
5
6
  import { BlockLabelTypes, InlineLabelTypes } from '../types'
@@ -35,12 +36,14 @@ const InlineControl = ({ labelText, ...props }: WrapperProps): JSX.Element => (
35
36
  labelText={
36
37
  <span data-sb-a11y-color-contrast-disable={props['data-sb-a11y-color-contrast-disable']}>
37
38
  {labelText}{' '}
38
- <a
39
+ <Link
39
40
  href="/"
41
+ isInline={true}
42
+ {...(props.reversed ? { variant: 'white' } : {})}
40
43
  data-sb-a11y-color-contrast-disable={props['data-sb-a11y-color-contrast-disable']}
41
44
  >
42
45
  a
43
- </a>
46
+ </Link>
44
47
  </span>
45
48
  }
46
49
  >
@@ -55,12 +58,14 @@ const BlockControl = ({ labelText, ...props }: WrapperProps): JSX.Element => (
55
58
  labelText={
56
59
  <span data-sb-a11y-color-contrast-disable={props['data-sb-a11y-color-contrast-disable']}>
57
60
  {labelText}{' '}
58
- <a
61
+ <Link
59
62
  href="/"
63
+ isInline={true}
64
+ {...(props.reversed ? { variant: 'white' } : {})}
60
65
  data-sb-a11y-color-contrast-disable={props['data-sb-a11y-color-contrast-disable']}
61
66
  >
62
67
  anchor
63
- </a>
68
+ </Link>
64
69
  </span>
65
70
  }
66
71
  />
@@ -1,5 +1,3 @@
1
- @import '~@kaizen/design-tokens/sass/spacing';
2
-
3
1
  @layer kz-components {
4
2
  .labelledMessage {
5
3
  display: inline-flex;
@@ -7,6 +5,6 @@
7
5
  }
8
6
 
9
7
  .labelSeparator {
10
- margin-inline-end: $spacing-6;
8
+ margin-inline-end: var(--spacing-6);
11
9
  }
12
10
  }
@@ -1,7 +1,7 @@
1
1
  import React, { type HTMLAttributes } from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { type OverrideClassName } from '~components/types/OverrideClassName'
4
- import styles from './LabelledMessage.module.scss'
4
+ import styles from './LabelledMessage.module.css'
5
5
 
6
6
  export type LabelledMessageProps = {
7
7
  label: string | React.ReactElement
@@ -25,13 +25,11 @@ export const LinkButton = forwardRef(
25
25
  isFullWidth = false,
26
26
  isDisabled,
27
27
  className,
28
- isReversed,
29
28
  ...otherProps
30
29
  }: LinkButtonProps,
31
30
  ref: React.ForwardedRef<HTMLAnchorElement>,
32
31
  ) => {
33
- const shouldUseReverse = useReversedColors()
34
- const isReversedVariant = isReversed ?? shouldUseReverse
32
+ const isReversedVariant = useReversedColors()
35
33
 
36
34
  return (
37
35
  <RACLink
@@ -39,7 +39,6 @@ The following example and table showcases the essential props that enable the co
39
39
  'variant',
40
40
  'icon',
41
41
  'iconPosition',
42
- 'isReversed',
43
42
  'isFullWidth',
44
43
  'isDisabled',
45
44
  ]}
@@ -102,7 +102,12 @@ export const ConfirmationModal = ({
102
102
  const footerActions: ButtonProps[] = []
103
103
 
104
104
  if (onConfirm) {
105
- const confirmAction = { label: confirmLabel, onClick: onConfirm }
105
+ const confirmAction = {
106
+ label: confirmLabel,
107
+ onClick: onConfirm,
108
+ destructive: variant === 'warning',
109
+ primary: variant !== 'warning',
110
+ }
106
111
  const workingProps = confirmWorking
107
112
  ? {
108
113
  working: true,
@@ -154,11 +159,7 @@ export const ConfirmationModal = ({
154
159
  <ModalAccessibleDescription>{children}</ModalAccessibleDescription>
155
160
  </div>
156
161
  </ModalBody>
157
- <ModalFooter
158
- actions={footerActions}
159
- appearance={variant == 'warning' ? 'destructive' : 'primary'}
160
- unpadded={unpadded}
161
- />
162
+ <ModalFooter actions={footerActions} unpadded={unpadded} />
162
163
  </div>
163
164
  </GenericModal>
164
165
  )
@@ -133,7 +133,6 @@ export const ContextModal = ({
133
133
  <ModalFooter
134
134
  variant={image ? 'context' : undefined}
135
135
  actions={footerActions}
136
- appearance="primary"
137
136
  unpadded={unpadded}
138
137
  />
139
138
  </div>
@@ -5,7 +5,6 @@ import classnames from 'classnames'
5
5
  import { FocusOn } from 'react-focus-on'
6
6
  import { useIsClientReady } from '../../utils/useIsClientReady'
7
7
 
8
- import { warn } from '../util/console'
9
8
  import { ModalContext } from './context/ModalContext'
10
9
  import styles from './GenericModal.module.scss'
11
10
 
@@ -63,9 +62,9 @@ export const GenericModal = ({
63
62
  // Ensure that consumers have provided an element that labels the modal
64
63
  // to meet ARIA accessibility guidelines.
65
64
  if (!document.getElementById(labelledByID)) {
66
- warn(
67
- `When using the Modal component, you must provide a label for the modal.
68
- Make sure you have a <ModalAccessibleLabel /> component with content that labels the modal.`,
65
+ // eslint-disable-next-line no-console
66
+ console.warn(
67
+ 'When using the Modal component, you must provide a label for the modal. Make sure you have a <ModalAccessibleLabel /> component with content that labels the modal.',
69
68
  )
70
69
  }
71
70
  }
@@ -18,10 +18,6 @@ export type ModalFooterProps = {
18
18
  'variant'?: ActionsVariantProps
19
19
  'unpadded'?: boolean
20
20
  'actions': ButtonProps[]
21
- /**
22
- * @deprecated we are no longer supporting different appearances for ModalFooter, instead there will only be a single default appearance set by the Button.
23
- */
24
- 'appearance'?: 'primary' | 'destructive'
25
21
  'data-testid'?: string
26
22
  'alignStart'?: boolean
27
23
  } & HTMLAttributes<HTMLDivElement>
@@ -29,7 +25,6 @@ export type ModalFooterProps = {
29
25
  export const ModalFooter = ({
30
26
  unpadded,
31
27
  actions,
32
- appearance = 'primary',
33
28
  alignStart,
34
29
  variant,
35
30
  ...props
@@ -51,9 +46,8 @@ export const ModalFooter = ({
51
46
  <div className={styles.actionButton} key={index}>
52
47
  <Button
53
48
  type="button"
54
- primary={index === 0 && appearance === 'primary'}
55
- destructive={index === 0 && appearance === 'destructive'}
56
- secondary={index > 0}
49
+ primary={index === 0 && !action.destructive && !action.secondary}
50
+ secondary={index > 0 && !action.destructive && !action.primary}
57
51
  fullWidth={queries.isSmall}
58
52
  {...action}
59
53
  />
@@ -6,7 +6,7 @@ import {
6
6
  GenericNotification,
7
7
  type GenericNotificationVariant,
8
8
  } from '../subcomponents/GenericNotification'
9
- import styles from '../subcomponents/GenericNotification/GenericNotification.module.scss'
9
+ import styles from '../subcomponents/GenericNotification/GenericNotification.module.css'
10
10
 
11
11
  export type InlineNotificationBase = {
12
12
  children?: React.ReactNode
@@ -7,7 +7,7 @@ import { InlineNotification, type InlineNotificationProps } from '../InlineNotif
7
7
  export default {
8
8
  title: 'Components/Notifications/InlineNotification',
9
9
  parameters: {
10
- chromatic: { disable: false },
10
+ chromatic: { disable: false, viewports: [767, 1079, 1200] },
11
11
  controls: { disable: true },
12
12
  a11y: {
13
13
  // Fade-in animation has colour contrast issues.
@@ -1,6 +1,3 @@
1
- @import '~@kaizen/design-tokens/sass/spacing';
2
- @import '~@kaizen/design-tokens/sass/layout';
3
-
4
1
  @layer kz-components {
5
2
  .toastNotificationsList {
6
3
  display: flex;
@@ -8,21 +5,22 @@
8
5
  align-items: flex-end;
9
6
  overflow: hidden;
10
7
  padding-bottom: 0;
11
- padding-top: 160px + 12px;
8
+ padding-top: 172px;
12
9
  position: fixed;
13
- right: $spacing-md;
10
+ right: var(--spacing-md);
14
11
  top: 0;
15
12
  bottom: 0;
16
13
  z-index: 1100;
17
14
  max-width: 100%;
18
15
  pointer-events: none;
19
16
 
20
- @media (max-width: ($layout-breakpoints-large - 1px)) {
17
+ /* Media queries can’t perform this calculation yet. Update when CSS supports it. */
18
+ @media (width <= 1079px) {
21
19
  padding-top: 108px;
22
20
  }
23
21
 
24
- @media (max-width: ($layout-breakpoints-medium - 1px)) {
25
- left: $spacing-md;
22
+ @media (width <= 767px) {
23
+ left: var(--spacing-md);
26
24
  }
27
25
  }
28
26
  }
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useState } from 'react'
2
2
  import { useToastNotificationContext } from '../context/ToastNotificationContext'
3
3
  import { ToastNotificationsMap } from './subcomponents/ToastNotificationsMap'
4
- import styles from './ToastNotificationsList.module.scss'
4
+ import styles from './ToastNotificationsList.module.css'
5
5
 
6
6
  const toastNotificationListId = 'toast-notifications-list'
7
7