@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.
- package/dist/cjs/src/Button/Button.cjs +2 -4
- package/dist/cjs/src/GuidanceBlock/GuidanceBlock.cjs +16 -82
- package/dist/cjs/src/GuidanceBlock/GuidanceBlock.module.css.cjs +0 -1
- package/dist/cjs/src/Heading/Heading.cjs +1 -1
- package/dist/cjs/src/Heading/Heading.module.css.cjs +22 -0
- package/dist/cjs/src/Label/Label.cjs +1 -1
- package/dist/cjs/src/Label/Label.module.css.cjs +16 -0
- package/dist/cjs/src/LabelledMessage/LabelledMessage.cjs +1 -1
- package/dist/cjs/src/LabelledMessage/LabelledMessage.module.css.cjs +7 -0
- package/dist/cjs/src/LinkButton/LinkButton.cjs +2 -4
- package/dist/cjs/src/Modal/ConfirmationModal/ConfirmationModal.cjs +3 -2
- package/dist/cjs/src/Modal/ContextModal/ContextModal.cjs +0 -1
- package/dist/cjs/src/Modal/GenericModal/GenericModal.cjs +2 -2
- package/dist/cjs/src/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.cjs +3 -6
- package/dist/cjs/src/Notification/InlineNotification/InlineNotification.cjs +1 -1
- package/dist/cjs/src/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.cjs +1 -1
- package/dist/cjs/src/Notification/ToastNotification/ToastNotificationsList/{ToastNotificationsList.module.scss.cjs → ToastNotificationsList.module.css.cjs} +1 -1
- package/dist/cjs/src/Notification/subcomponents/CancelButton/CancelButton.cjs +1 -1
- package/dist/cjs/src/Notification/subcomponents/GenericNotification/GenericNotification.cjs +1 -1
- package/dist/cjs/src/Notification/subcomponents/GenericNotification/GenericNotification.module.css.cjs +29 -0
- package/dist/cjs/src/Notification/subcomponents/NotificationHeading/NotificationHeading.cjs +1 -1
- package/dist/cjs/src/Select/Select.cjs +23 -22
- package/dist/cjs/src/Select/Select.module.scss.cjs +0 -1
- package/dist/cjs/src/SingleSelect/SingleSelect.cjs +12 -19
- package/dist/cjs/src/SingleSelect/subcomponents/SelectToggle/SelectToggle.cjs +3 -5
- package/dist/cjs/src/SingleSelect/subcomponents/SelectToggle/SelectToggle.module.scss.cjs +0 -1
- package/dist/cjs/src/Text/Text.cjs +1 -1
- package/dist/cjs/src/Text/Text.module.css.cjs +16 -0
- package/dist/cjs/src/TimeField/TimeField.cjs +2 -3
- package/dist/cjs/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.cjs +1 -1
- package/dist/cjs/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.css.cjs +13 -0
- package/dist/cjs/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.cjs +1 -1
- package/dist/cjs/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.module.css.cjs +9 -0
- package/dist/cjs/src/Tooltip/OverlayArrow.cjs +1 -1
- package/dist/cjs/src/Tooltip/OverlayArrow.module.css.cjs +7 -0
- package/dist/cjs/src/Tooltip/Tooltip.cjs +1 -1
- package/dist/cjs/src/Tooltip/Tooltip.module.css.cjs +7 -0
- package/dist/esm/src/Button/Button.mjs +2 -4
- package/dist/esm/src/GuidanceBlock/GuidanceBlock.mjs +18 -84
- package/dist/esm/src/GuidanceBlock/GuidanceBlock.module.css.mjs +0 -1
- package/dist/esm/src/Heading/Heading.mjs +1 -1
- package/dist/esm/src/Heading/Heading.module.css.mjs +20 -0
- package/dist/esm/src/Label/Label.mjs +1 -1
- package/dist/esm/src/Label/Label.module.css.mjs +14 -0
- package/dist/esm/src/LabelledMessage/LabelledMessage.mjs +1 -1
- package/dist/esm/src/LabelledMessage/LabelledMessage.module.css.mjs +5 -0
- package/dist/esm/src/LinkButton/LinkButton.mjs +2 -4
- package/dist/esm/src/Modal/ConfirmationModal/ConfirmationModal.mjs +3 -2
- package/dist/esm/src/Modal/ContextModal/ContextModal.mjs +0 -1
- package/dist/esm/src/Modal/GenericModal/GenericModal.mjs +2 -2
- package/dist/esm/src/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.mjs +3 -6
- package/dist/esm/src/Notification/InlineNotification/InlineNotification.mjs +1 -1
- package/dist/esm/src/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.mjs +1 -1
- package/dist/esm/src/Notification/ToastNotification/ToastNotificationsList/{ToastNotificationsList.module.scss.mjs → ToastNotificationsList.module.css.mjs} +1 -1
- package/dist/esm/src/Notification/subcomponents/CancelButton/CancelButton.mjs +1 -1
- package/dist/esm/src/Notification/subcomponents/GenericNotification/GenericNotification.mjs +1 -1
- package/dist/esm/src/Notification/subcomponents/GenericNotification/GenericNotification.module.css.mjs +27 -0
- package/dist/esm/src/Notification/subcomponents/NotificationHeading/NotificationHeading.mjs +1 -1
- package/dist/esm/src/Select/Select.mjs +23 -22
- package/dist/esm/src/Select/Select.module.scss.mjs +0 -1
- package/dist/esm/src/SingleSelect/SingleSelect.mjs +12 -19
- package/dist/esm/src/SingleSelect/subcomponents/SelectToggle/SelectToggle.mjs +3 -5
- package/dist/esm/src/SingleSelect/subcomponents/SelectToggle/SelectToggle.module.scss.mjs +0 -1
- package/dist/esm/src/Text/Text.mjs +1 -1
- package/dist/esm/src/Text/Text.module.css.mjs +14 -0
- package/dist/esm/src/TimeField/TimeField.mjs +2 -3
- package/dist/esm/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.mjs +1 -1
- package/dist/esm/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.css.mjs +11 -0
- package/dist/esm/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.mjs +1 -1
- package/dist/esm/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.module.css.mjs +7 -0
- package/dist/esm/src/Tooltip/OverlayArrow.mjs +1 -1
- package/dist/esm/src/Tooltip/OverlayArrow.module.css.mjs +5 -0
- package/dist/esm/src/Tooltip/Tooltip.mjs +1 -1
- package/dist/esm/src/Tooltip/Tooltip.module.css.mjs +5 -0
- package/dist/styles.css +725 -613
- package/dist/types/Button/Button.d.ts +0 -5
- package/dist/types/Calendar/CalendarRange/CalendarRange.d.ts +2 -1
- package/dist/types/Calendar/CalendarSingle/CalendarSingle.d.ts +2 -1
- package/dist/types/Calendar/types.d.ts +1 -0
- package/dist/types/GuidanceBlock/GuidanceBlock.d.ts +1 -26
- package/dist/types/Input/Input/Input.d.ts +1 -6
- package/dist/types/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.d.ts +1 -5
- package/dist/types/Select/Select.d.ts +3 -13
- package/dist/types/SingleSelect/SingleSelect.d.ts +2 -24
- package/dist/types/SingleSelect/subcomponents/SelectToggle/SelectToggle.d.ts +2 -12
- package/dist/types/TextArea/TextArea.d.ts +1 -6
- package/dist/types/TimeField/TimeField.d.ts +1 -1
- package/locales/ar.json +4 -0
- package/locales/bg.json +4 -0
- package/locales/cs.json +4 -0
- package/locales/cy.json +4 -0
- package/locales/da.json +4 -0
- package/locales/de.json +4 -0
- package/locales/el.json +4 -0
- package/locales/en-GB.json +4 -0
- package/locales/en.json +4 -0
- package/locales/es-419.json +4 -0
- package/locales/es.json +4 -0
- package/locales/et.json +4 -0
- package/locales/fi.json +4 -0
- package/locales/fr-CA.json +4 -0
- package/locales/fr.json +4 -0
- package/locales/he.json +4 -0
- package/locales/hi.json +4 -0
- package/locales/ht.json +4 -0
- package/locales/hu.json +4 -0
- package/locales/id.json +4 -0
- package/locales/it.json +4 -0
- package/locales/ja.json +4 -0
- package/locales/km-KH.json +4 -0
- package/locales/ko.json +4 -0
- package/locales/lt.json +4 -0
- package/locales/lv.json +4 -0
- package/locales/mi.json +4 -0
- package/locales/ms.json +4 -0
- package/locales/nb.json +4 -0
- package/locales/nl.json +4 -0
- package/locales/pl.json +4 -0
- package/locales/pt-BR.json +4 -0
- package/locales/pt.json +4 -0
- package/locales/ro.json +4 -0
- package/locales/ru.json +4 -0
- package/locales/si-LK.json +4 -0
- package/locales/sk.json +4 -0
- package/locales/sr.json +4 -0
- package/locales/sv.json +4 -0
- package/locales/th.json +4 -0
- package/locales/tl.json +4 -0
- package/locales/tr.json +4 -0
- package/locales/uk.json +4 -0
- package/locales/vi.json +4 -0
- package/locales/zh-TW.json +4 -0
- package/locales/zh.json +4 -0
- package/package.json +1 -2
- package/src/Button/Button.tsx +1 -8
- package/src/Button/_docs/Button--api-specification.mdx +0 -1
- package/src/Calendar/CalendarRange/CalendarRange.tsx +4 -1
- package/src/Calendar/CalendarSingle/CalendarSingle.tsx +4 -1
- package/src/Calendar/types.ts +18 -0
- package/src/GuidanceBlock/GuidanceBlock.module.css +0 -8
- package/src/GuidanceBlock/GuidanceBlock.spec.tsx +1 -26
- package/src/GuidanceBlock/GuidanceBlock.tsx +2 -112
- package/src/GuidanceBlock/_docs/GuidanceBlock.stories.tsx +0 -90
- package/src/Heading/Heading.module.css +111 -0
- package/src/Heading/Heading.tsx +1 -1
- package/src/Input/Input/Input.module.scss +0 -31
- package/src/Input/Input/Input.tsx +1 -6
- package/src/Label/Label.module.css +97 -0
- package/src/Label/Label.tsx +1 -1
- package/src/Label/_docs/Label.stickersheet.stories.tsx +9 -4
- package/src/LabelledMessage/{LabelledMessage.module.scss → LabelledMessage.module.css} +1 -3
- package/src/LabelledMessage/LabelledMessage.tsx +1 -1
- package/src/LinkButton/LinkButton.tsx +1 -3
- package/src/LinkButton/_docs/LinkButton--api-specification.mdx +0 -1
- package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +7 -6
- package/src/Modal/ContextModal/ContextModal.tsx +0 -1
- package/src/Modal/GenericModal/GenericModal.tsx +3 -4
- package/src/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.tsx +2 -8
- package/src/Notification/InlineNotification/InlineNotification.tsx +1 -1
- package/src/Notification/InlineNotification/_docs/InlineNotification.stickersheet.stories.tsx +1 -1
- package/src/Notification/ToastNotification/ToastNotificationsList/{ToastNotificationsList.module.scss → ToastNotificationsList.module.css} +6 -8
- package/src/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.tsx +1 -1
- package/src/Notification/subcomponents/CancelButton/CancelButton.tsx +1 -1
- package/src/Notification/subcomponents/GenericNotification/GenericNotification.module.css +392 -0
- package/src/Notification/subcomponents/GenericNotification/GenericNotification.tsx +1 -1
- package/src/Notification/subcomponents/NotificationHeading/NotificationHeading.tsx +1 -1
- package/src/Select/Select.module.scss +0 -16
- package/src/Select/Select.tsx +24 -25
- package/src/SingleSelect/SingleSelect.tsx +1 -14
- package/src/SingleSelect/_docs/SingleSelect.stories.tsx +5 -2
- package/src/SingleSelect/subcomponents/SelectToggle/SelectToggle.module.scss +0 -8
- package/src/SingleSelect/subcomponents/SelectToggle/SelectToggle.tsx +2 -9
- package/src/Text/Text.module.css +71 -0
- package/src/Text/Text.tsx +1 -1
- package/src/TextArea/TextArea.tsx +1 -6
- package/src/TimeField/TimeField.tsx +2 -9
- package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.css +141 -0
- package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.tsx +1 -1
- package/src/ToggleSwitch/ToggleSwitchField/{ToggleSwitchField.module.scss → ToggleSwitchField.module.css} +1 -3
- package/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.tsx +1 -1
- package/src/Tooltip/OverlayArrow.module.css +45 -0
- package/src/Tooltip/OverlayArrow.tsx +1 -1
- package/src/Tooltip/Tooltip.module.css +62 -0
- package/src/Tooltip/Tooltip.tsx +1 -1
- package/dist/cjs/src/Heading/Heading.module.scss.cjs +0 -22
- package/dist/cjs/src/Label/Label.module.scss.cjs +0 -15
- package/dist/cjs/src/LabelledMessage/LabelledMessage.module.scss.cjs +0 -7
- package/dist/cjs/src/Modal/util/console.cjs +0 -16
- package/dist/cjs/src/Notification/subcomponents/GenericNotification/GenericNotification.module.scss.cjs +0 -29
- package/dist/cjs/src/Text/Text.module.scss.cjs +0 -16
- package/dist/cjs/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss.cjs +0 -13
- package/dist/cjs/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.module.scss.cjs +0 -9
- package/dist/cjs/src/Tooltip/OverlayArrow.module.scss.cjs +0 -7
- package/dist/cjs/src/Tooltip/Tooltip.module.scss.cjs +0 -7
- package/dist/esm/src/Heading/Heading.module.scss.mjs +0 -20
- package/dist/esm/src/Label/Label.module.scss.mjs +0 -13
- package/dist/esm/src/LabelledMessage/LabelledMessage.module.scss.mjs +0 -5
- package/dist/esm/src/Modal/util/console.mjs +0 -13
- package/dist/esm/src/Notification/subcomponents/GenericNotification/GenericNotification.module.scss.mjs +0 -27
- package/dist/esm/src/Text/Text.module.scss.mjs +0 -14
- package/dist/esm/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss.mjs +0 -11
- package/dist/esm/src/ToggleSwitch/ToggleSwitchField/ToggleSwitchField.module.scss.mjs +0 -7
- package/dist/esm/src/Tooltip/OverlayArrow.module.scss.mjs +0 -5
- package/dist/esm/src/Tooltip/Tooltip.module.scss.mjs +0 -5
- package/dist/types/Modal/util/console.d.ts +0 -5
- package/dist/types/utils/useResizeObserver.d.ts +0 -22
- package/src/Heading/Heading.module.scss +0 -115
- package/src/Label/Label.module.scss +0 -105
- package/src/Modal/util/console.ts +0 -13
- package/src/Notification/subcomponents/GenericNotification/GenericNotification.module.scss +0 -138
- package/src/Notification/subcomponents/GenericNotification/_mixins.scss +0 -366
- package/src/Text/Text.module.scss +0 -74
- package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss +0 -139
- package/src/Tooltip/OverlayArrow.module.scss +0 -45
- package/src/Tooltip/Tooltip.module.scss +0 -68
- 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
|
+
}
|
package/src/Heading/Heading.tsx
CHANGED
|
@@ -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.
|
|
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
|
+
}
|
package/src/Label/Label.tsx
CHANGED
|
@@ -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.
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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
|
-
<
|
|
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
|
-
</
|
|
68
|
+
</Link>
|
|
64
69
|
</span>
|
|
65
70
|
}
|
|
66
71
|
/>
|
|
@@ -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.
|
|
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
|
|
34
|
-
const isReversedVariant = isReversed ?? shouldUseReverse
|
|
32
|
+
const isReversedVariant = useReversedColors()
|
|
35
33
|
|
|
36
34
|
return (
|
|
37
35
|
<RACLink
|
|
@@ -102,7 +102,12 @@ export const ConfirmationModal = ({
|
|
|
102
102
|
const footerActions: ButtonProps[] = []
|
|
103
103
|
|
|
104
104
|
if (onConfirm) {
|
|
105
|
-
const confirmAction = {
|
|
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
|
)
|
|
@@ -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
|
-
|
|
67
|
-
|
|
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 &&
|
|
55
|
-
|
|
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.
|
|
9
|
+
import styles from '../subcomponents/GenericNotification/GenericNotification.module.css'
|
|
10
10
|
|
|
11
11
|
export type InlineNotificationBase = {
|
|
12
12
|
children?: React.ReactNode
|
package/src/Notification/InlineNotification/_docs/InlineNotification.stickersheet.stories.tsx
CHANGED
|
@@ -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:
|
|
8
|
+
padding-top: 172px;
|
|
12
9
|
position: fixed;
|
|
13
|
-
right:
|
|
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
|
-
|
|
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 (
|
|
25
|
-
left:
|
|
22
|
+
@media (width <= 767px) {
|
|
23
|
+
left: var(--spacing-md);
|
|
26
24
|
}
|
|
27
25
|
}
|
|
28
26
|
}
|
package/src/Notification/ToastNotification/ToastNotificationsList/ToastNotificationsList.tsx
CHANGED
|
@@ -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.
|
|
4
|
+
import styles from './ToastNotificationsList.module.css'
|
|
5
5
|
|
|
6
6
|
const toastNotificationListId = 'toast-notifications-list'
|
|
7
7
|
|