@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { Icon } from '~components/Icon'
|
|
3
|
-
import styles from '../GenericNotification/GenericNotification.module.
|
|
3
|
+
import styles from '../GenericNotification/GenericNotification.module.css'
|
|
4
4
|
|
|
5
5
|
type CancelButtonProps = {
|
|
6
6
|
onClick: (e: React.MouseEvent<HTMLButtonElement>) => void
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--border-width: var(--border-width-1);
|
|
3
|
+
--notification-vertical-padding: calc(var(--spacing-6) - var(--border-width));
|
|
4
|
+
--notification-fade-out: opacity 200ms ease;
|
|
5
|
+
--notification-collapse-height: margin-top 200ms ease, margin-bottom 200ms ease;
|
|
6
|
+
--notification-collapse-height-delayed: margin-top 200ms ease 200ms, margin-bottom 200ms ease;
|
|
7
|
+
--notification-pop-up: transform 200ms ease-out;
|
|
8
|
+
--notification-slide-right: transform 300ms ease-out;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@layer kz-components {
|
|
12
|
+
/* Replace @extend %ca-notification from _mixin.scss */
|
|
13
|
+
.notification {
|
|
14
|
+
display: flex;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
pointer-events: all;
|
|
17
|
+
|
|
18
|
+
&:focus {
|
|
19
|
+
outline-offset: 1px;
|
|
20
|
+
outline: 2px solid var(--color-blue-500);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Variants */
|
|
25
|
+
.inline,
|
|
26
|
+
.toast {
|
|
27
|
+
margin-bottom: var(--spacing-24);
|
|
28
|
+
border-width: var(--border-width);
|
|
29
|
+
border-style: solid;
|
|
30
|
+
border-radius: var(--border-solid-border-radius);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.inline {
|
|
34
|
+
width: auto;
|
|
35
|
+
min-height: 46px;
|
|
36
|
+
padding: var(--notification-vertical-padding) var(--spacing-12);
|
|
37
|
+
transition:
|
|
38
|
+
var(--notification-fade-out), var(--notification-pop-up), var(--notification-collapse-height);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.toast {
|
|
42
|
+
container-type: inline-size;
|
|
43
|
+
width: 25rem;
|
|
44
|
+
box-shadow: var(--shadow-small-box-shadow);
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
padding: var(--notification-vertical-padding) 10px;
|
|
47
|
+
transition:
|
|
48
|
+
var(--notification-fade-out), var(--notification-slide-right),
|
|
49
|
+
var(--notification-collapse-height-delayed);
|
|
50
|
+
will-change: transform;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.global {
|
|
54
|
+
width: 100%;
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
border-width: 0;
|
|
58
|
+
border-radius: 0;
|
|
59
|
+
margin-bottom: 0;
|
|
60
|
+
padding-top: var(--spacing-16);
|
|
61
|
+
padding-bottom: var(--spacing-16);
|
|
62
|
+
padding-inline-start: var(--spacing-8);
|
|
63
|
+
transition: var(--notification-collapse-height);
|
|
64
|
+
position: relative;
|
|
65
|
+
z-index: 1030;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Types (colors) */
|
|
69
|
+
.success {
|
|
70
|
+
background: var(--color-green-100);
|
|
71
|
+
border-color: var(--color-green-500);
|
|
72
|
+
color: var(--color-purple-800);
|
|
73
|
+
|
|
74
|
+
--icon-color: var(--color-green-500);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.informative {
|
|
78
|
+
background: var(--color-blue-100);
|
|
79
|
+
border-color: var(--color-blue-500);
|
|
80
|
+
color: var(--color-purple-800);
|
|
81
|
+
|
|
82
|
+
--icon-color: var(--color-blue-500);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.cautionary,
|
|
86
|
+
.security {
|
|
87
|
+
background: var(--color-yellow-100);
|
|
88
|
+
border-color: var(--color-yellow-700);
|
|
89
|
+
color: var(--color-purple-800);
|
|
90
|
+
|
|
91
|
+
--icon-color: var(--color-yellow-700);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.warning {
|
|
95
|
+
background: var(--color-red-100);
|
|
96
|
+
border-color: var(--color-red-500);
|
|
97
|
+
color: var(--color-purple-800);
|
|
98
|
+
|
|
99
|
+
--icon-color: var(--color-red-500);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Hidden state */
|
|
103
|
+
.hidden {
|
|
104
|
+
opacity: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.hidden.inline,
|
|
108
|
+
.hidden.global {
|
|
109
|
+
margin-bottom: 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.hidden.inline {
|
|
113
|
+
/*
|
|
114
|
+
When entering we use "ease-out", but when transitioning to hidden we want to use "ease-in".
|
|
115
|
+
We want it moving the fastest when it is the furthest off screen.
|
|
116
|
+
*/
|
|
117
|
+
transition-timing-function: ease-in;
|
|
118
|
+
transform: translateY(-50%);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.hidden.toast {
|
|
122
|
+
/*
|
|
123
|
+
When entering we use "ease-out", but when transitioning to hidden we want to use "ease-in".
|
|
124
|
+
We want it moving the fastest when it is the furthest off screen.
|
|
125
|
+
*/
|
|
126
|
+
transition-timing-function: ease-in;
|
|
127
|
+
transform: translateX(50%);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.hidden.global {
|
|
131
|
+
z-index: 1029;
|
|
132
|
+
opacity: 1;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Structure: .icon (from %ca-notification__icon) */
|
|
136
|
+
.icon {
|
|
137
|
+
align-items: flex-start;
|
|
138
|
+
box-sizing: content-box;
|
|
139
|
+
color: var(--icon-color);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.inline .icon,
|
|
143
|
+
.toast .icon {
|
|
144
|
+
width: 22px;
|
|
145
|
+
height: 22px;
|
|
146
|
+
font-size: 22px;
|
|
147
|
+
margin-top: var(--spacing-6);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.global .icon {
|
|
151
|
+
width: 24px;
|
|
152
|
+
height: 24px;
|
|
153
|
+
font-size: 24px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* Structure: .textContainer from %ca-notification__text-container */
|
|
157
|
+
.textContainer {
|
|
158
|
+
box-sizing: content-box;
|
|
159
|
+
display: flex;
|
|
160
|
+
flex-flow: row wrap;
|
|
161
|
+
flex: 1 0 0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.inline .textContainer,
|
|
165
|
+
.toast .textContainer {
|
|
166
|
+
margin-inline-start: var(--spacing-6);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.toast .textContainer {
|
|
170
|
+
max-width: calc(100% - var(--spacing-48));
|
|
171
|
+
overflow-wrap: break-word;
|
|
172
|
+
hyphens: auto;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.global .textContainer {
|
|
176
|
+
margin-inline-start: var(--spacing-8);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.inline .textContainer {
|
|
180
|
+
/*
|
|
181
|
+
Inline notifications often fade onto a white background.
|
|
182
|
+
Fading the higher-contrast text out at, as well as the whole container, makes for a smoother animation.
|
|
183
|
+
*/
|
|
184
|
+
transition: var(--notification-fade-out);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.forceMultiline {
|
|
188
|
+
flex-direction: column;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* Structure: .title from %ca-notification__title */
|
|
192
|
+
.title {
|
|
193
|
+
position: relative;
|
|
194
|
+
font-family: var(--typography-heading-6-font-family);
|
|
195
|
+
font-weight: var(--typography-heading-6-font-weight);
|
|
196
|
+
font-size: var(--typography-heading-6-font-size);
|
|
197
|
+
line-height: var(--typography-heading-6-line-height);
|
|
198
|
+
letter-spacing: var(--typography-heading-6-letter-spacing);
|
|
199
|
+
margin: 0;
|
|
200
|
+
padding-right: 6px;
|
|
201
|
+
|
|
202
|
+
/* overriding Bootstrap style that changes h6s to text-transform: uppercase */
|
|
203
|
+
text-transform: none;
|
|
204
|
+
color: inherit;
|
|
205
|
+
top: 0.37em;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.notificationTitle {
|
|
209
|
+
top: 0.42em;
|
|
210
|
+
position: relative;
|
|
211
|
+
margin-inline-end: var(--spacing-6);
|
|
212
|
+
line-height: var(--typography-heading-6-line-height);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@container (max-width: 25rem) {
|
|
216
|
+
.notificationTitle {
|
|
217
|
+
width: 100%;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* Structure: .text from %ca-notification__text */
|
|
222
|
+
.text {
|
|
223
|
+
position: relative;
|
|
224
|
+
font-family: var(--typography-paragraph-small-font-family);
|
|
225
|
+
font-weight: var(--typography-paragraph-small-font-weight);
|
|
226
|
+
font-size: var(--typography-paragraph-small-font-size);
|
|
227
|
+
line-height: var(--typography-paragraph-small-line-height);
|
|
228
|
+
letter-spacing: var(--typography-paragraph-small-letter-spacing);
|
|
229
|
+
margin: 0;
|
|
230
|
+
color: inherit;
|
|
231
|
+
|
|
232
|
+
a[href]:not([data-rac]) {
|
|
233
|
+
border-bottom: var(--spacing-1) solid var(--color-blue-500);
|
|
234
|
+
text-decoration: none;
|
|
235
|
+
color: var(--color-blue-500);
|
|
236
|
+
|
|
237
|
+
&:hover {
|
|
238
|
+
text-decoration: none;
|
|
239
|
+
color: var(--color-blue-600);
|
|
240
|
+
border-bottom: var(--spacing-1) solid var(--color-blue-600);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
strong {
|
|
245
|
+
font-weight: var(--typography-button-secondary-font-weight);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
p {
|
|
249
|
+
font-weight: inherit;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.inline .text,
|
|
254
|
+
.toast .text {
|
|
255
|
+
position: relative;
|
|
256
|
+
font-family: var(--typography-paragraph-small-font-family);
|
|
257
|
+
font-weight: var(--typography-paragraph-small-font-weight);
|
|
258
|
+
font-size: var(--typography-paragraph-small-font-size);
|
|
259
|
+
line-height: var(--typography-paragraph-small-line-height);
|
|
260
|
+
letter-spacing: var(--typography-paragraph-small-letter-spacing);
|
|
261
|
+
|
|
262
|
+
/*
|
|
263
|
+
When the title and text are on different lines this ensures the baselines of the first lines are exactly 1 grid unit apart.
|
|
264
|
+
When they are both on a single line it ensures both are 1 grid unit tall.
|
|
265
|
+
*/
|
|
266
|
+
margin-top: var(--spacing-6);
|
|
267
|
+
flex: 0 1 auto;
|
|
268
|
+
padding-bottom: var(--spacing-12);
|
|
269
|
+
top: 0.21em;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.toast .text {
|
|
273
|
+
width: 100%;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.global .text {
|
|
277
|
+
position: static;
|
|
278
|
+
font-weight: var(--typography-paragraph-body-font-weight);
|
|
279
|
+
font-size: var(--typography-paragraph-body-font-size);
|
|
280
|
+
line-height: var(--typography-paragraph-body-line-height);
|
|
281
|
+
letter-spacing: var(--typography-paragraph-body-letter-spacing);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/* Structure: .cancel from %ca-notification__cancel */
|
|
285
|
+
.cancel {
|
|
286
|
+
cursor: pointer;
|
|
287
|
+
appearance: none;
|
|
288
|
+
transition: none;
|
|
289
|
+
transform: none;
|
|
290
|
+
margin: 0;
|
|
291
|
+
padding: 0;
|
|
292
|
+
border: none;
|
|
293
|
+
background: transparent;
|
|
294
|
+
font: inherit;
|
|
295
|
+
color: var(--color-purple-800);
|
|
296
|
+
position: relative;
|
|
297
|
+
display: flex;
|
|
298
|
+
align-items: center;
|
|
299
|
+
justify-content: center;
|
|
300
|
+
border-radius: var(--border-solid-border-radius);
|
|
301
|
+
|
|
302
|
+
.icon {
|
|
303
|
+
opacity: 0.7;
|
|
304
|
+
transition: var(--animation-duration-fast) opacity;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
&:disabled,
|
|
308
|
+
&.disabled {
|
|
309
|
+
.icon {
|
|
310
|
+
opacity: 0.3;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
&:not(:disabled, .disabled) {
|
|
315
|
+
&:hover,
|
|
316
|
+
&:focus,
|
|
317
|
+
&.hover {
|
|
318
|
+
.icon {
|
|
319
|
+
opacity: 1;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
&:active,
|
|
324
|
+
&.active {
|
|
325
|
+
.icon {
|
|
326
|
+
opacity: 1;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
&:active {
|
|
332
|
+
transform: translateY(1px);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
&:focus-visible {
|
|
336
|
+
outline: var(--border-focus-ring-border-width) var(--border-focus-ring-border-style)
|
|
337
|
+
var(--color-blue-500);
|
|
338
|
+
outline-offset: -4px;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.inline .cancel,
|
|
343
|
+
.toast .cancel {
|
|
344
|
+
width: var(--spacing-48);
|
|
345
|
+
height: var(--spacing-48);
|
|
346
|
+
margin-top: calc(-1 * var(--spacing-6));
|
|
347
|
+
margin-bottom: calc(-1 * var(--spacing-6));
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.inline .cancel {
|
|
351
|
+
margin-inline-end: calc(-1 * var(--spacing-12));
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.toast .cancel {
|
|
355
|
+
margin-inline-end: -10px;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.global .cancel {
|
|
359
|
+
width: var(--spacing-48);
|
|
360
|
+
height: var(--spacing-48);
|
|
361
|
+
margin-top: calc(-1 * var(--spacing-24));
|
|
362
|
+
margin-bottom: calc(-1 * var(--spacing-24));
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/* Structure: .cancelLabel from %ca-notification__cancel__label */
|
|
366
|
+
.cancelLabel {
|
|
367
|
+
position: absolute;
|
|
368
|
+
width: 1px;
|
|
369
|
+
height: 1px;
|
|
370
|
+
padding: 0;
|
|
371
|
+
margin: -1px;
|
|
372
|
+
overflow: hidden;
|
|
373
|
+
clip-path: rect(0 0 0 0);
|
|
374
|
+
border: 0;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/* Modifiers */
|
|
378
|
+
.noBottomMargin {
|
|
379
|
+
margin-bottom: 0;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.persistent {
|
|
383
|
+
transition: none;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/* This is only for inline notifications */
|
|
387
|
+
.subtle {
|
|
388
|
+
background: none;
|
|
389
|
+
border: none;
|
|
390
|
+
padding: 0;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
@@ -7,7 +7,7 @@ import { isRefObject } from '~components/utils/isRefObject'
|
|
|
7
7
|
import { CancelButton } from '../CancelButton'
|
|
8
8
|
import { NotificationHeading } from '../NotificationHeading'
|
|
9
9
|
import { NotificationIconVariant } from '../NotificationIcon'
|
|
10
|
-
import styles from './GenericNotification.module.
|
|
10
|
+
import styles from './GenericNotification.module.css'
|
|
11
11
|
|
|
12
12
|
type GenericNotificationBase = {
|
|
13
13
|
style: 'global' | 'inline' | 'toast'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { Heading, type HeadingProps } from '~components/Heading'
|
|
3
|
-
import styles from '../GenericNotification/GenericNotification.module.
|
|
3
|
+
import styles from '../GenericNotification/GenericNotification.module.css'
|
|
4
4
|
|
|
5
5
|
type NotificationHeadingProps = {
|
|
6
6
|
titleProp?: HeadingProps['children']
|
|
@@ -22,8 +22,6 @@
|
|
|
22
22
|
|
|
23
23
|
// Should match the values for the Input component
|
|
24
24
|
$input-height: 48px;
|
|
25
|
-
$input-placeholder-opacity: 0.7;
|
|
26
|
-
|
|
27
25
|
$focus-border-color: $color-blue-500;
|
|
28
26
|
|
|
29
27
|
%focus-border {
|
|
@@ -106,12 +104,6 @@ $focus-border-color: $color-blue-500;
|
|
|
106
104
|
}
|
|
107
105
|
}
|
|
108
106
|
|
|
109
|
-
.placeholder {
|
|
110
|
-
@include base-font-style;
|
|
111
|
-
|
|
112
|
-
opacity: $input-placeholder-opacity;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
107
|
.menu {
|
|
116
108
|
// Temporary 6px until we redesign this component with Inter
|
|
117
109
|
border: 6px $border-solid-border-style transparent;
|
|
@@ -227,10 +219,6 @@ $focus-border-color: $color-blue-500;
|
|
|
227
219
|
color: $color-white;
|
|
228
220
|
}
|
|
229
221
|
|
|
230
|
-
.placeholder {
|
|
231
|
-
color: $color-white;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
222
|
&.error {
|
|
235
223
|
.control {
|
|
236
224
|
border: $border-solid-border-width $border-solid-border-style $color-red-300;
|
|
@@ -304,10 +292,6 @@ $focus-border-color: $color-blue-500;
|
|
|
304
292
|
border-color: $secondary-reversed-focus-color;
|
|
305
293
|
}
|
|
306
294
|
}
|
|
307
|
-
|
|
308
|
-
.placeholder {
|
|
309
|
-
color: $color-white;
|
|
310
|
-
}
|
|
311
295
|
}
|
|
312
296
|
}
|
|
313
297
|
|
package/src/Select/Select.tsx
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React, { useId, useState } from 'react'
|
|
2
2
|
import classnames from 'classnames'
|
|
3
|
+
import { useButton } from 'react-aria'
|
|
3
4
|
import ReactSelect, {
|
|
4
5
|
components,
|
|
5
6
|
type NoticeProps,
|
|
6
7
|
type Props as ReactSelectProps,
|
|
7
8
|
} from 'react-select'
|
|
8
9
|
import Async, { type AsyncProps as ReactAsyncSelectProps } from 'react-select/async'
|
|
10
|
+
import { ClearButton } from '~components/ClearButton'
|
|
9
11
|
import { FieldMessage } from '~components/FieldMessage'
|
|
10
12
|
import { Icon } from '~components/Icon'
|
|
11
13
|
import { Label } from '~components/Label'
|
|
@@ -35,12 +37,14 @@ export type SelectProps = {
|
|
|
35
37
|
* @default false
|
|
36
38
|
*/
|
|
37
39
|
fullWidth?: boolean
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
} & Omit<ReactSelectProps<any, boolean>, 'placeholder'>
|
|
41
|
+
|
|
42
|
+
// react-select defaults to showing "Select..." placeholder text, which goes against our a11y
|
|
43
|
+
// standards — use `label` for the field name and `description` for help text instead.
|
|
44
|
+
// `noPlaceholderText` overrides the default string; `NullPlaceholder` removes the empty DOM node
|
|
45
|
+
// that react-select still renders even when the text is empty.
|
|
46
|
+
const noPlaceholderText = ''
|
|
47
|
+
const NullPlaceholder = (): null => null
|
|
44
48
|
|
|
45
49
|
/**
|
|
46
50
|
* {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3081896474/Select Guidance} |
|
|
@@ -57,7 +61,6 @@ export const Select = React.forwardRef<any, SelectProps>(
|
|
|
57
61
|
description,
|
|
58
62
|
fullWidth: propsFullWidth,
|
|
59
63
|
className: propsClassName,
|
|
60
|
-
placeholder,
|
|
61
64
|
...props
|
|
62
65
|
},
|
|
63
66
|
ref,
|
|
@@ -92,10 +95,10 @@ export const Select = React.forwardRef<any, SelectProps>(
|
|
|
92
95
|
{...props}
|
|
93
96
|
ref={ref}
|
|
94
97
|
aria-labelledby={labelId}
|
|
95
|
-
placeholder={
|
|
98
|
+
placeholder={noPlaceholderText}
|
|
96
99
|
components={{
|
|
97
100
|
Control,
|
|
98
|
-
Placeholder,
|
|
101
|
+
Placeholder: NullPlaceholder,
|
|
99
102
|
DropdownIndicator,
|
|
100
103
|
Menu,
|
|
101
104
|
GroupHeading,
|
|
@@ -120,17 +123,19 @@ export const Select = React.forwardRef<any, SelectProps>(
|
|
|
120
123
|
Select.displayName = 'Select'
|
|
121
124
|
|
|
122
125
|
interface AsyncProps
|
|
123
|
-
extends
|
|
126
|
+
extends
|
|
127
|
+
Omit<ReactAsyncSelectProps<any, boolean, any>, 'placeholder'>,
|
|
128
|
+
Omit<ReactSelectProps<any, boolean, any>, 'placeholder'> {}
|
|
124
129
|
|
|
125
130
|
export const AsyncSelect = React.forwardRef(
|
|
126
|
-
({ className: propsClassName,
|
|
131
|
+
({ className: propsClassName, ...props }: AsyncProps, ref: React.Ref<any>) => (
|
|
127
132
|
<Async
|
|
128
133
|
{...props}
|
|
129
134
|
ref={ref}
|
|
130
|
-
placeholder={
|
|
135
|
+
placeholder={noPlaceholderText}
|
|
131
136
|
components={{
|
|
132
137
|
Control,
|
|
133
|
-
Placeholder,
|
|
138
|
+
Placeholder: NullPlaceholder,
|
|
134
139
|
DropdownIndicator,
|
|
135
140
|
Menu,
|
|
136
141
|
Option,
|
|
@@ -140,7 +145,7 @@ export const AsyncSelect = React.forwardRef(
|
|
|
140
145
|
MultiValue,
|
|
141
146
|
IndicatorsContainer,
|
|
142
147
|
ValueContainer,
|
|
143
|
-
ClearIndicator
|
|
148
|
+
ClearIndicator,
|
|
144
149
|
IndicatorSeparator: null,
|
|
145
150
|
LoadingMessage,
|
|
146
151
|
}}
|
|
@@ -163,12 +168,6 @@ const Control: typeof components.Control = (props) => (
|
|
|
163
168
|
</div>
|
|
164
169
|
)
|
|
165
170
|
|
|
166
|
-
const Placeholder: typeof components.Placeholder = (props) => (
|
|
167
|
-
<components.Placeholder {...props} className={styles.placeholderOverrides}>
|
|
168
|
-
<span className={styles.placeholder}>{props.children}</span>
|
|
169
|
-
</components.Placeholder>
|
|
170
|
-
)
|
|
171
|
-
|
|
172
171
|
const DropdownIndicator: typeof components.DropdownIndicator = (props) => (
|
|
173
172
|
<components.DropdownIndicator {...props} className={styles.dropdownIndicator}>
|
|
174
173
|
<Icon
|
|
@@ -235,8 +234,8 @@ const Input: typeof components.Input = (props) => (
|
|
|
235
234
|
const ValueContainer: typeof components.ValueContainer = (props) => (
|
|
236
235
|
<components.ValueContainer {...props} className={styles.valueContainer} />
|
|
237
236
|
)
|
|
238
|
-
const ClearIndicator: typeof components.ClearIndicator = (props) =>
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
237
|
+
const ClearIndicator: typeof components.ClearIndicator = (props) => {
|
|
238
|
+
const buttonRef = React.useRef<HTMLButtonElement>(null)
|
|
239
|
+
const { buttonProps } = useButton({ ...props, onClick: props.clearValue }, buttonRef)
|
|
240
|
+
return <ClearButton {...buttonProps} classNameOverride={styles.clearIndicator} />
|
|
241
|
+
}
|
|
@@ -10,7 +10,6 @@ import { Popover, useFloating } from '~components/MultiSelect/subcomponents/Popo
|
|
|
10
10
|
import { type OverrideClassName } from '~components/types/OverrideClassName'
|
|
11
11
|
import { SelectProvider } from './context'
|
|
12
12
|
import {
|
|
13
|
-
ListBox,
|
|
14
13
|
ListBoxSection,
|
|
15
14
|
ListItem,
|
|
16
15
|
Option,
|
|
@@ -69,16 +68,11 @@ export type SingleSelectProps<Option extends SingleSelectOption = SingleSelectOp
|
|
|
69
68
|
* Creates a portal for the Popover to the matching element id
|
|
70
69
|
*/
|
|
71
70
|
portalContainerId?: string
|
|
72
|
-
/**
|
|
73
|
-
* @deprecated Use of placeholder text goes against our a11y standards.
|
|
74
|
-
* Use the `labelText` prop to provide a concise name, and the `description` prop for any help text.
|
|
75
|
-
*/
|
|
76
|
-
placeholder?: string
|
|
77
71
|
/**
|
|
78
72
|
* Handler that is called when the selection changes.
|
|
79
73
|
*/
|
|
80
74
|
onSelectionChange?: (key: Key) => void
|
|
81
|
-
} & OverrideClassName<Omit<AriaSelectProps<Option>, OmittedAriaSelectProps>>
|
|
75
|
+
} & OverrideClassName<Omit<AriaSelectProps<Option>, OmittedAriaSelectProps | 'placeholder'>>
|
|
82
76
|
|
|
83
77
|
/**
|
|
84
78
|
* {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3081896474/Select Guidance} |
|
|
@@ -98,7 +92,6 @@ export const SingleSelect = <Option extends SingleSelectOption = SingleSelectOpt
|
|
|
98
92
|
classNameOverride,
|
|
99
93
|
selectedKey,
|
|
100
94
|
description,
|
|
101
|
-
placeholder = '',
|
|
102
95
|
isDisabled,
|
|
103
96
|
onSelectionChange,
|
|
104
97
|
portalContainerId,
|
|
@@ -121,7 +114,6 @@ export const SingleSelect = <Option extends SingleSelectOption = SingleSelectOpt
|
|
|
121
114
|
disabledKeys: disabledKeys,
|
|
122
115
|
selectedKey: typeof selectedKey === 'number' ? selectedKey.toString() : selectedKey,
|
|
123
116
|
description,
|
|
124
|
-
placeholder,
|
|
125
117
|
isDisabled,
|
|
126
118
|
isRequired,
|
|
127
119
|
onSelectionChange: onSelectionChange ? (key) => onSelectionChange(key!) : undefined,
|
|
@@ -158,7 +150,6 @@ export const SingleSelect = <Option extends SingleSelectOption = SingleSelectOpt
|
|
|
158
150
|
'value': state?.selectedItem?.rendered,
|
|
159
151
|
valueProps,
|
|
160
152
|
'isOpen': state.isOpen,
|
|
161
|
-
placeholder,
|
|
162
153
|
status,
|
|
163
154
|
'isDisabled': triggerProps.isDisabled,
|
|
164
155
|
isReversed,
|
|
@@ -225,7 +216,3 @@ SingleSelect.Section = ListBoxSection
|
|
|
225
216
|
SingleSelect.SectionDivider = SectionDivider
|
|
226
217
|
SingleSelect.Option = Option
|
|
227
218
|
SingleSelect.ItemDefaultRender = ListItem
|
|
228
|
-
|
|
229
|
-
// @deprecated Legacy exported aliases
|
|
230
|
-
SingleSelect.TriggerButton = SelectToggle
|
|
231
|
-
SingleSelect.ListBox = ListBox
|
|
@@ -6,6 +6,7 @@ import { FieldMessage } from '~components/FieldMessage'
|
|
|
6
6
|
import { ContextModal } from '~components/Modal'
|
|
7
7
|
import { RadioField, RadioGroup } from '~components/Radio'
|
|
8
8
|
import { SingleSelect } from '../SingleSelect'
|
|
9
|
+
import { SelectToggle } from '../subcomponents'
|
|
9
10
|
import { type SingleSelectOption } from '../types'
|
|
10
11
|
import { groupedMockItems, mixedMockItemsDisabled, singleMockItems } from './mockData'
|
|
11
12
|
|
|
@@ -125,13 +126,15 @@ export const AdditionalProperties: Story = {
|
|
|
125
126
|
}
|
|
126
127
|
|
|
127
128
|
const sourceCodeCustomiseTrigger = `
|
|
129
|
+
import { SelectToggle } from '@kaizen/components/subcomponents'
|
|
130
|
+
|
|
128
131
|
<SingleSelect
|
|
129
|
-
trigger={props => <
|
|
132
|
+
trigger={props => <SelectToggle {...props} id="select--custom-trigger" />}
|
|
130
133
|
/>
|
|
131
134
|
`
|
|
132
135
|
export const CustomiseTrigger: Story = {
|
|
133
136
|
args: {
|
|
134
|
-
trigger: (props) => <
|
|
137
|
+
trigger: (props) => <SelectToggle {...props} id="select--custom-trigger" />,
|
|
135
138
|
},
|
|
136
139
|
parameters: {
|
|
137
140
|
docs: {
|
|
@@ -63,10 +63,6 @@
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.placeholder {
|
|
67
|
-
color: rgb($color-purple-800-rgb, 0.7);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
66
|
.error {
|
|
71
67
|
border: $border-solid-border-width $border-solid-border-style $color-red-500;
|
|
72
68
|
}
|
|
@@ -87,10 +83,6 @@
|
|
|
87
83
|
background-color: transparent;
|
|
88
84
|
color: $color-white;
|
|
89
85
|
|
|
90
|
-
&.placeholder {
|
|
91
|
-
color: rgba($color-white-rgb, 0.65);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
86
|
&.selectToggle .icon {
|
|
95
87
|
color: rgb(255, 255, 255, 0.8);
|
|
96
88
|
}
|