@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
package/locales/ms.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "Buka menu sekunder dan limpahan"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "Kosongkan pilihan: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "Tunjukkan cadangan untuk {field}"
|
package/locales/nb.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "Åpne sekundær- og mer-menyen"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "Fjern valg: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "Vis forslag for {field}"
|
package/locales/nl.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "Open het secundaire en overloopmenu"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "Selectie wissen: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "Suggesties voor {field} weergeven"
|
package/locales/pl.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "Otwórz menu drugorzędne i nadmiarowe"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "Wyczyść zaznaczenie: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "Pokaż sugestie dla {field}"
|
package/locales/pt-BR.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "Abre o menu secundário e de conteúdo adicional"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "Limpar seleção: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "Mostrar sugestões para {field}"
|
package/locales/pt.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "Abre o menu secundário e de conteúdo adicional"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "Limpar seleção: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "Mostrar sugestões para {field}"
|
package/locales/ro.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "Deschideți meniul secundar și meniul extins"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "Ștergeți selecția: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "Afișați sugestii pentru {field}"
|
package/locales/ru.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "Открыть дополнительное и раскрывающееся меню"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "Очистить выбор: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "Показать предложения для {field}"
|
package/locales/si-LK.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "ද්විතියික සහ පිටාර මෙනුව විවෘත කරන්න"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "තේරීම ඉවත් කරන්න: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "{field} සඳහා යෝජනා පෙන්වන්න"
|
package/locales/sk.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "Otvoriť sekundárnu a rozšírenú ponuku"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "Zrušiť výber: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "Zobraziť návrhy pre {field}"
|
package/locales/sr.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "Otvori sekundarni i meni sa dodatnim radnjama"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "Obriši izbor: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "Prikaži predloge za {field}"
|
package/locales/sv.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "Öppna sekundär meny och överflödesmeny"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "Rensa val: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "Visa förslag för {field}"
|
package/locales/th.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "เปิดเมนูรองและโอเวอร์โฟลว์"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "ล้างรายการที่เลือก: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "แสดงคำแนะนำสำหรับ {field}"
|
package/locales/tl.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "Buksan ang sekundaryong menu at overflow menu"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "I-clear ang napili: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "Ipakita ang mga mungkahi para sa {field}"
|
package/locales/tr.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "İkincil ve taşma menüsünü açın"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "Seçimi temizle: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "{field} için önerileri göster"
|
package/locales/uk.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "Відкрити додаткове меню та меню переповнення"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "Скасувати виділення: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "Показати пропозиції для {field}"
|
package/locales/vi.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "Mở menu phụ và menu tùy chọn"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "Xóa lựa chọn: {field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "Hiển thị gợi ý cho {field}"
|
package/locales/zh-TW.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "開啟副選單和溢出選單"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "清除選擇:{field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "顯示對 {field} 的建議"
|
package/locales/zh.json
CHANGED
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"description" : "Label for the dropdown menu which displays additional actions",
|
|
245
245
|
"message" : "打开二级菜单和溢出菜单"
|
|
246
246
|
},
|
|
247
|
+
"select.clearButtonAlt" : {
|
|
248
|
+
"description" : "Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.",
|
|
249
|
+
"message" : "清除选择:{field}"
|
|
250
|
+
},
|
|
247
251
|
"singleSelect.chevronButton" : {
|
|
248
252
|
"description" : "Aria label text for the SingleSelect button to open and close suggestions list",
|
|
249
253
|
"message" : "显示{field}的建议"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaizen/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Kaizen component library",
|
|
5
5
|
"author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
|
|
6
6
|
"homepage": "https://cultureamp.design",
|
|
@@ -122,7 +122,6 @@
|
|
|
122
122
|
"react-popper": "^2.3.0",
|
|
123
123
|
"react-select": "^5.10.2",
|
|
124
124
|
"react-textfit": "^1.1.1",
|
|
125
|
-
"resize-observer-polyfill": "^1.5.1",
|
|
126
125
|
"use-debounce": "^10.0.6",
|
|
127
126
|
"uuid": "^13.0.0"
|
|
128
127
|
},
|
package/src/Button/Button.tsx
CHANGED
|
@@ -22,11 +22,6 @@ export type ButtonUIProps = {
|
|
|
22
22
|
iconPosition?: 'start' | 'end'
|
|
23
23
|
/** Controls if the button inherits width from its parent. @default "false" */
|
|
24
24
|
isFullWidth?: boolean
|
|
25
|
-
/**
|
|
26
|
-
* Controls the reversed style of Button
|
|
27
|
-
* @deprecated Use the ReversedColors Provider instead. This is here to support gradual migration to the ReversedColors Provider and will take precedence if a value is provided. {@link https://cultureamp.design/?path=/docs/actions-button-button-next-api-specification--docs#variants}
|
|
28
|
-
*/
|
|
29
|
-
isReversed?: boolean
|
|
30
25
|
}
|
|
31
26
|
|
|
32
27
|
export type ButtonProps = ButtonUIProps &
|
|
@@ -51,13 +46,11 @@ export const Button = forwardRef(
|
|
|
51
46
|
isPending,
|
|
52
47
|
hasHiddenPendingLabel: propsHasHiddenPendingLabel = false,
|
|
53
48
|
pendingLabel,
|
|
54
|
-
isReversed,
|
|
55
49
|
...restProps
|
|
56
50
|
}: ButtonProps,
|
|
57
51
|
ref: React.ForwardedRef<HTMLButtonElement>,
|
|
58
52
|
) => {
|
|
59
|
-
const
|
|
60
|
-
const isReversedVariant = isReversed ?? shouldUseReverse
|
|
53
|
+
const isReversedVariant = useReversedColors()
|
|
61
54
|
const pendingProps: PendingButtonProps = isPending
|
|
62
55
|
? {
|
|
63
56
|
isPending,
|
|
@@ -4,6 +4,7 @@ import { DayPicker, type PropsBase, type PropsRange } from 'react-day-picker'
|
|
|
4
4
|
import { Icon } from '~components/Icon'
|
|
5
5
|
import { type OverrideClassName } from '~components/types/OverrideClassName'
|
|
6
6
|
import { baseCalendarClassNames } from '../baseCalendarClassNames'
|
|
7
|
+
import { type DeprecatedReactDayPickerProps } from '../types'
|
|
7
8
|
import { isInvalidDate } from '../utils'
|
|
8
9
|
import styles from './CalendarRange.module.scss'
|
|
9
10
|
|
|
@@ -13,7 +14,9 @@ export type CalendarRangeProps = {
|
|
|
13
14
|
id?: string
|
|
14
15
|
onMount?: (calendarElement: CalendarRangeElement) => void
|
|
15
16
|
hasDivider?: boolean
|
|
16
|
-
} & OverrideClassName<
|
|
17
|
+
} & OverrideClassName<
|
|
18
|
+
Omit<PropsRange & Omit<PropsBase, 'mode'>, 'mode' | DeprecatedReactDayPickerProps>
|
|
19
|
+
>
|
|
17
20
|
|
|
18
21
|
export const CalendarRange = ({
|
|
19
22
|
id,
|
|
@@ -4,6 +4,7 @@ import { DayPicker, type PropsBase, type PropsSingle } from 'react-day-picker'
|
|
|
4
4
|
import { Icon } from '~components/Icon'
|
|
5
5
|
import { type OverrideClassName } from '~components/types/OverrideClassName'
|
|
6
6
|
import { baseCalendarClassNames } from '../baseCalendarClassNames'
|
|
7
|
+
import { type DeprecatedReactDayPickerProps } from '../types'
|
|
7
8
|
import { isInvalidDate, isValidWeekStartsOn } from '../utils'
|
|
8
9
|
import styles from './CalendarSingle.module.scss'
|
|
9
10
|
|
|
@@ -14,7 +15,9 @@ export type CalendarSingleProps = {
|
|
|
14
15
|
onMount?: (calendarElement: CalendarSingleElement) => void
|
|
15
16
|
/** Exposes the react-day-picker component prop. Please be aware, consumers using this will have to guarentee functions as expected */
|
|
16
17
|
components?: PropsBase['components']
|
|
17
|
-
} & OverrideClassName<
|
|
18
|
+
} & OverrideClassName<
|
|
19
|
+
Omit<PropsSingle & Omit<PropsBase, 'mode'>, 'mode' | DeprecatedReactDayPickerProps>
|
|
20
|
+
>
|
|
18
21
|
|
|
19
22
|
export const CalendarSingle = ({
|
|
20
23
|
id,
|
package/src/Calendar/types.ts
CHANGED
|
@@ -5,6 +5,24 @@ export type { DateInterval, DateRange }
|
|
|
5
5
|
|
|
6
6
|
export type DisabledDays = DayPickerProps['disabled']
|
|
7
7
|
|
|
8
|
+
export type DeprecatedReactDayPickerProps =
|
|
9
|
+
| 'fromDate'
|
|
10
|
+
| 'fromMonth'
|
|
11
|
+
| 'fromYear'
|
|
12
|
+
| 'toDate'
|
|
13
|
+
| 'toMonth'
|
|
14
|
+
| 'toYear'
|
|
15
|
+
| 'initialFocus'
|
|
16
|
+
| 'onDayKeyUp'
|
|
17
|
+
| 'onDayKeyPress'
|
|
18
|
+
| 'onDayPointerEnter'
|
|
19
|
+
| 'onDayPointerLeave'
|
|
20
|
+
| 'onDayTouchCancel'
|
|
21
|
+
| 'onDayTouchEnd'
|
|
22
|
+
| 'onDayTouchMove'
|
|
23
|
+
| 'onDayTouchStart'
|
|
24
|
+
| 'onWeekNumberClick'
|
|
25
|
+
|
|
8
26
|
export type DisabledDayMatchers = {
|
|
9
27
|
/**
|
|
10
28
|
* Accepts an array of singluar dates and disables them.
|
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
box-shadow: var(--shadow-small-box-shadow);
|
|
19
19
|
position: relative;
|
|
20
20
|
top: -1px;
|
|
21
|
-
transition:
|
|
22
|
-
opacity var(--animation-duration-slow) ease,
|
|
23
|
-
margin-top var(--animation-duration-fast) var(--animation-duration-slow) ease;
|
|
24
21
|
color: var(--color-purple-800);
|
|
25
22
|
|
|
26
23
|
@media (width >= 1024px) {
|
|
@@ -130,11 +127,6 @@
|
|
|
130
127
|
}
|
|
131
128
|
}
|
|
132
129
|
|
|
133
|
-
.hidden {
|
|
134
|
-
opacity: 0;
|
|
135
|
-
margin-bottom: 0;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
130
|
.headingWrapper {
|
|
139
131
|
margin-bottom: var(--spacing-24);
|
|
140
132
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { cleanup, render
|
|
3
|
-
import userEvent from '@testing-library/user-event'
|
|
2
|
+
import { cleanup, render } from '@testing-library/react'
|
|
4
3
|
import { vi } from 'vitest'
|
|
5
4
|
import { Informative } from '~components/Illustration'
|
|
6
5
|
import { GuidanceBlock } from './GuidanceBlock'
|
|
7
|
-
const user = userEvent.setup()
|
|
8
6
|
|
|
9
7
|
window.matchMedia = vi.fn().mockImplementation(() => ({
|
|
10
8
|
matches: false,
|
|
@@ -17,29 +15,6 @@ window.matchMedia = vi.fn().mockImplementation(() => ({
|
|
|
17
15
|
describe('GuidanceBlock', () => {
|
|
18
16
|
afterEach(cleanup)
|
|
19
17
|
|
|
20
|
-
it('calls the action function when action button is clicked', async () => {
|
|
21
|
-
const onAction = vi.fn()
|
|
22
|
-
const { container } = render(
|
|
23
|
-
<GuidanceBlock
|
|
24
|
-
illustration={<Informative alt="" />}
|
|
25
|
-
text={{
|
|
26
|
-
title: 'This is the call to action title',
|
|
27
|
-
description:
|
|
28
|
-
'Mussum Ipsum, cacilds vidis litro abertis. Suco de cevadiss, é um leite divinis.',
|
|
29
|
-
}}
|
|
30
|
-
actions={{
|
|
31
|
-
primary: { label: 'Action!', onClick: onAction },
|
|
32
|
-
}}
|
|
33
|
-
/>,
|
|
34
|
-
)
|
|
35
|
-
const actionButton = container.querySelector('button')
|
|
36
|
-
if (actionButton) await user.click(actionButton)
|
|
37
|
-
|
|
38
|
-
await waitFor(() => {
|
|
39
|
-
expect(onAction).toHaveBeenCalledTimes(1)
|
|
40
|
-
})
|
|
41
|
-
})
|
|
42
|
-
|
|
43
18
|
it('has a default title tag of h3', () => {
|
|
44
19
|
const { getByRole } = render(
|
|
45
20
|
<GuidanceBlock
|
|
@@ -1,36 +1,18 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react'
|
|
2
2
|
import classNames from 'classnames'
|
|
3
|
-
import { Button as V1Button, type ButtonProps as V1ButtonProps } from '~components/ButtonV1'
|
|
4
3
|
import { Heading, type HeadingProps } from '~components/Heading'
|
|
5
|
-
import { Icon } from '~components/Icon'
|
|
6
4
|
import { type SceneProps, type SpotProps } from '~components/Illustration'
|
|
7
5
|
import { Text } from '~components/Text'
|
|
8
|
-
import { Tooltip, type TooltipProps } from '~components/TooltipV1'
|
|
9
6
|
import { useMediaQueries } from '~components/utils/useMediaQueries'
|
|
10
7
|
import { type VariantType } from './types'
|
|
11
8
|
import styles from './GuidanceBlock.module.css'
|
|
12
9
|
|
|
13
|
-
export type ActionProps = V1ButtonProps & {
|
|
14
|
-
'tooltip'?: TooltipProps
|
|
15
|
-
'aria-label'?: string
|
|
16
|
-
'aria-labelledby'?: string
|
|
17
|
-
'aria-describedby'?: string
|
|
18
|
-
}
|
|
19
|
-
|
|
20
10
|
type LayoutType = 'default' | 'inline' | 'stacked'
|
|
21
11
|
|
|
22
12
|
type IllustrationType = 'spot' | 'scene'
|
|
23
13
|
|
|
24
14
|
type TextAlignment = 'center' | 'left'
|
|
25
15
|
|
|
26
|
-
type GuidanceBlockActions = {
|
|
27
|
-
primary: ActionProps
|
|
28
|
-
secondary?: ActionProps
|
|
29
|
-
dismiss?: {
|
|
30
|
-
onClick: () => void
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
16
|
type BaseGuidanceBlockProps = {
|
|
35
17
|
layout?: LayoutType
|
|
36
18
|
illustration: React.ReactElement<SpotProps | SceneProps>
|
|
@@ -39,15 +21,9 @@ type BaseGuidanceBlockProps = {
|
|
|
39
21
|
*/
|
|
40
22
|
illustrationType?: IllustrationType
|
|
41
23
|
smallScreenTextAlignment?: TextAlignment
|
|
42
|
-
/** @deprecated use the `actionsSlot` prop with Button/next instead */
|
|
43
|
-
actions?: GuidanceBlockActions
|
|
44
24
|
/** A slot for the primary and secondary action. It is recommended to use the {@link https://cultureamp.design/?path=/docs/components-button-button-next-api-specification--docs | Button} or {@link https://cultureamp.design/?path=/docs/components-linkbutton-usage-guidelines--docs | LinkButton} wrapped in fragment. */
|
|
45
25
|
actionsSlot?: React.ReactNode
|
|
46
|
-
/** @deprecated this is no longer a used feature and is only the deprecated `actions` prop, ie: {secondary: { label: "Dismiss action" }}` */
|
|
47
|
-
secondaryDismiss?: boolean
|
|
48
26
|
variant?: VariantType
|
|
49
|
-
/** @deprecated use the `actionsSlot` and pass the icon into the JSX elements */
|
|
50
|
-
withActionButtonArrow?: boolean
|
|
51
27
|
noMaxWidth?: boolean
|
|
52
28
|
}
|
|
53
29
|
|
|
@@ -65,19 +41,6 @@ type GuidanceBlockPropsWithContent = {
|
|
|
65
41
|
|
|
66
42
|
export type GuidanceBlockProps = GuidanceBlockWithText | GuidanceBlockPropsWithContent
|
|
67
43
|
|
|
68
|
-
export type GuidanceBlockState = {
|
|
69
|
-
hidden: boolean
|
|
70
|
-
removed: boolean
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
type WithTooltipProps = {
|
|
74
|
-
children: React.ReactNode
|
|
75
|
-
tooltipProps?: TooltipProps
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const WithTooltip = ({ tooltipProps, children }: WithTooltipProps): JSX.Element =>
|
|
79
|
-
tooltipProps ? <Tooltip {...tooltipProps}>{children}</Tooltip> : <>{children}</>
|
|
80
|
-
|
|
81
44
|
/**
|
|
82
45
|
* {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082093807/Guidance+Block Guidance} |
|
|
83
46
|
* {@link https://cultureamp.design/?path=/docs/components-guidanceblock--docs Storybook}
|
|
@@ -85,63 +48,26 @@ const WithTooltip = ({ tooltipProps, children }: WithTooltipProps): JSX.Element
|
|
|
85
48
|
export const GuidanceBlock = ({
|
|
86
49
|
layout = 'default',
|
|
87
50
|
variant = 'default',
|
|
88
|
-
withActionButtonArrow = true,
|
|
89
51
|
noMaxWidth = false,
|
|
90
52
|
illustrationType = 'spot',
|
|
91
53
|
smallScreenTextAlignment = 'center',
|
|
92
|
-
actions,
|
|
93
54
|
illustration,
|
|
94
|
-
secondaryDismiss,
|
|
95
55
|
actionsSlot,
|
|
96
56
|
...restProps
|
|
97
57
|
}: GuidanceBlockProps): JSX.Element => {
|
|
98
|
-
const [hidden, setHidden] = useState<boolean>(false)
|
|
99
|
-
const [removed, setRemoved] = useState<boolean>(false)
|
|
100
58
|
const { queries } = useMediaQueries()
|
|
101
59
|
|
|
102
|
-
const containerRef = React.createRef<HTMLDivElement>()
|
|
103
|
-
|
|
104
|
-
const handleDismissBanner = (): void => {
|
|
105
|
-
setHidden(true)
|
|
106
|
-
actions?.dismiss?.onClick()
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const onTransitionEnd = (e: React.TransitionEvent<HTMLDivElement>): void => {
|
|
110
|
-
// Be careful: this assumes the final CSS property to be animated is "margin-top".
|
|
111
|
-
if (hidden && e.propertyName === 'margin-top') {
|
|
112
|
-
setRemoved(true)
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const marginTop = (): string => {
|
|
117
|
-
if (hidden && containerRef.current) {
|
|
118
|
-
return -containerRef.current.clientHeight + 'px'
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
return '0'
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (removed) {
|
|
125
|
-
return <></>
|
|
126
|
-
}
|
|
127
|
-
|
|
128
60
|
return (
|
|
129
61
|
<div
|
|
130
62
|
className={classNames(
|
|
131
63
|
styles.banner,
|
|
132
64
|
variant && styles[variant],
|
|
133
65
|
layout && styles[layout],
|
|
134
|
-
hidden && styles.hidden,
|
|
135
66
|
queries.isSmall && styles.centerContent,
|
|
136
67
|
noMaxWidth && styles.noMaxWidth,
|
|
137
68
|
illustrationType === 'scene' && styles.hasSceneIllustration,
|
|
138
69
|
smallScreenTextAlignment === 'left' && styles.smallScreenTextAlignment,
|
|
139
70
|
)}
|
|
140
|
-
style={{
|
|
141
|
-
marginTop: marginTop(),
|
|
142
|
-
}}
|
|
143
|
-
ref={containerRef}
|
|
144
|
-
onTransitionEnd={onTransitionEnd}
|
|
145
71
|
>
|
|
146
72
|
<div className={styles.illustrationWrapper}>
|
|
147
73
|
<div className={styles.illustration}>
|
|
@@ -166,43 +92,7 @@ export const GuidanceBlock = ({
|
|
|
166
92
|
</>
|
|
167
93
|
)}
|
|
168
94
|
</div>
|
|
169
|
-
{
|
|
170
|
-
<div className={styles.buttonContainer}>
|
|
171
|
-
{actions?.primary && (
|
|
172
|
-
<>
|
|
173
|
-
<WithTooltip tooltipProps={actions.primary.tooltip}>
|
|
174
|
-
<V1Button
|
|
175
|
-
icon={
|
|
176
|
-
withActionButtonArrow ? (
|
|
177
|
-
<Icon name="arrow_forward" isPresentational shouldMirrorInRTL />
|
|
178
|
-
) : undefined
|
|
179
|
-
}
|
|
180
|
-
iconPosition="end"
|
|
181
|
-
{...actions.primary}
|
|
182
|
-
fullWidth={queries.isSmall}
|
|
183
|
-
/>
|
|
184
|
-
</WithTooltip>
|
|
185
|
-
{actions?.secondary && (
|
|
186
|
-
<WithTooltip tooltipProps={actions.secondary.tooltip}>
|
|
187
|
-
<div className={styles.secondaryAction}>
|
|
188
|
-
<V1Button
|
|
189
|
-
secondary
|
|
190
|
-
{...actions.secondary}
|
|
191
|
-
onClick={
|
|
192
|
-
secondaryDismiss
|
|
193
|
-
? (): void => handleDismissBanner()
|
|
194
|
-
: actions?.secondary?.onClick
|
|
195
|
-
}
|
|
196
|
-
fullWidth={queries.isSmall}
|
|
197
|
-
/>
|
|
198
|
-
</div>
|
|
199
|
-
</WithTooltip>
|
|
200
|
-
)}
|
|
201
|
-
</>
|
|
202
|
-
)}
|
|
203
|
-
{!actions && actionsSlot && actionsSlot}
|
|
204
|
-
</div>
|
|
205
|
-
) : null}
|
|
95
|
+
{actionsSlot && <div className={styles.buttonContainer}>{actionsSlot}</div>}
|
|
206
96
|
</div>
|
|
207
97
|
</div>
|
|
208
98
|
)
|