@licklist/design 0.78.32 → 0.78.34
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/Maintenance/MaintenancePage.js +1 -0
- package/dist/index.js +8 -1
- package/dist/v2/components/ActionMenu/ActionMenu.d.ts +14 -0
- package/dist/v2/components/ActionMenu/ActionMenu.d.ts.map +1 -0
- package/dist/v2/components/ActionMenu/ActionMenu.js +159 -0
- package/dist/v2/components/ActionMenu/ActionMenu.scss.js +6 -0
- package/dist/v2/components/ActionMenu/index.d.ts +2 -0
- package/dist/v2/components/ActionMenu/index.d.ts.map +1 -0
- package/dist/v2/components/Alert/Alert.d.ts.map +1 -1
- package/dist/v2/components/Alert/Alert.js +48 -1
- package/dist/v2/components/Alert/Alert.scss.js +1 -1
- package/dist/v2/components/Badge/Badge.d.ts +10 -0
- package/dist/v2/components/Badge/Badge.d.ts.map +1 -0
- package/dist/v2/components/Badge/Badge.js +19 -0
- package/dist/v2/components/Badge/Badge.scss.js +6 -0
- package/dist/v2/components/Badge/index.d.ts +2 -0
- package/dist/v2/components/Badge/index.d.ts.map +1 -0
- package/dist/v2/components/Button/Button.d.ts +3 -2
- package/dist/v2/components/Button/Button.d.ts.map +1 -1
- package/dist/v2/components/Button/Button.js +13 -6
- package/dist/v2/components/Button/Button.scss.js +1 -1
- package/dist/v2/components/Button/GhostButton.scss.js +1 -1
- package/dist/v2/components/Button/index.d.ts +2 -0
- package/dist/v2/components/Button/index.d.ts.map +1 -1
- package/dist/v2/components/Checkbox/Checkbox.scss.js +1 -1
- package/dist/v2/components/FormField/FormField.d.ts.map +1 -1
- package/dist/v2/components/FormField/FormField.scss.js +1 -1
- package/dist/v2/components/Modal/DeleteModal.d.ts +15 -0
- package/dist/v2/components/Modal/DeleteModal.d.ts.map +1 -0
- package/dist/v2/components/Modal/DeleteModal.js +151 -0
- package/dist/v2/components/Modal/DeleteModal.scss.js +6 -0
- package/dist/v2/components/Modal/index.d.ts +3 -0
- package/dist/v2/components/Modal/index.d.ts.map +1 -0
- package/dist/v2/components/NPSScore/NPSScore.d.ts +3 -1
- package/dist/v2/components/NPSScore/NPSScore.d.ts.map +1 -1
- package/dist/v2/components/NPSScore/NPSScore.js +11 -27
- package/dist/v2/components/NPSScore/NPSScore.scss.js +1 -1
- package/dist/v2/components/NewInput/NewInput.d.ts +2 -0
- package/dist/v2/components/NewInput/NewInput.d.ts.map +1 -1
- package/dist/v2/components/NewInput/NewInput.js +37 -12
- package/dist/v2/components/NewPageHeader/NewPageHeader.d.ts +4 -1
- package/dist/v2/components/NewPageHeader/NewPageHeader.d.ts.map +1 -1
- package/dist/v2/components/NewPageHeader/NewPageHeader.js +18 -11
- package/dist/v2/components/NewPageHeader/NewPageHeader.scss.js +1 -1
- package/dist/v2/components/NewTable/NewTable.d.ts +21 -0
- package/dist/v2/components/NewTable/NewTable.d.ts.map +1 -0
- package/dist/v2/components/NewTable/NewTable.js +63 -0
- package/dist/v2/components/NewTable/NewTable.scss.js +6 -0
- package/dist/v2/components/NewTable/index.d.ts +2 -0
- package/dist/v2/components/NewTable/index.d.ts.map +1 -0
- package/dist/v2/components/Pagination/Pagination.d.ts +13 -0
- package/dist/v2/components/Pagination/Pagination.d.ts.map +1 -0
- package/dist/v2/components/Pagination/Pagination.js +76 -0
- package/dist/v2/components/Pagination/Pagination.scss.js +6 -0
- package/dist/v2/components/Pagination/index.d.ts +2 -0
- package/dist/v2/components/Pagination/index.d.ts.map +1 -0
- package/dist/v2/components/QuickFilter/QuickFilter.d.ts +14 -0
- package/dist/v2/components/QuickFilter/QuickFilter.d.ts.map +1 -0
- package/dist/v2/components/QuickFilter/QuickFilter.js +70 -0
- package/dist/v2/components/QuickFilter/QuickFilter.scss.js +6 -0
- package/dist/v2/components/QuickFilter/index.d.ts +2 -0
- package/dist/v2/components/QuickFilter/index.d.ts.map +1 -0
- package/dist/v2/components/SectionHeader/SectionHeader.d.ts.map +1 -1
- package/dist/v2/components/Select/Select.d.ts +7 -4
- package/dist/v2/components/Select/Select.d.ts.map +1 -1
- package/dist/v2/components/Select/Select.js +53 -24
- package/dist/v2/components/Select/Select.scss.js +1 -1
- package/dist/v2/components/TableSortIcon/TableSortIcon.d.ts +9 -0
- package/dist/v2/components/TableSortIcon/TableSortIcon.d.ts.map +1 -0
- package/dist/v2/components/TableSortIcon/TableSortIcon.js +14 -0
- package/dist/v2/components/TableSortIcon/index.d.ts +2 -0
- package/dist/v2/components/TableSortIcon/index.d.ts.map +1 -0
- package/dist/v2/components/WYSIWYGEditor/Icons.js +2 -2
- package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.scss.js +1 -1
- package/dist/v2/components/index.d.ts +17 -4
- package/dist/v2/components/index.d.ts.map +1 -1
- package/dist/v2/icons/index.d.ts +46 -0
- package/dist/v2/icons/index.d.ts.map +1 -1
- package/dist/v2/icons/index.js +358 -4
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.js +4 -8
- package/dist/v2/pages/Settings/SettingsPage.scss.js +1 -1
- package/dist/v2/pages/Settings/SettingsTabs.scss.js +1 -1
- package/dist/v2/pages/Settings/components/SidebarCustomisation.js +9 -3
- package/dist/v2/pages/Settings/components/SidebarCustomisation.scss.js +1 -1
- package/dist/v2/pages/Settings/components/SidebarNavItem.js +9 -3
- package/dist/v2/pages/Settings/components/SidebarNavItem.scss.js +1 -1
- package/dist/v2/styles/form/NewInput.scss.js +1 -1
- package/package.json +3 -3
- package/src/v2/components/ActionMenu/ActionMenu.scss +106 -0
- package/src/v2/components/ActionMenu/ActionMenu.tsx +115 -0
- package/src/v2/components/ActionMenu/index.ts +1 -0
- package/src/v2/components/Alert/Alert.scss +8 -19
- package/src/v2/components/Alert/Alert.tsx +24 -1
- package/src/v2/components/Badge/Badge.scss +82 -0
- package/src/v2/components/Badge/Badge.tsx +25 -0
- package/src/v2/components/Badge/index.ts +1 -0
- package/src/v2/components/Button/Button.tsx +18 -4
- package/src/v2/components/Button/GhostButton.scss +11 -1
- package/src/v2/components/Button/index.ts +2 -0
- package/src/v2/components/Customer/CustomerDetail.scss +319 -0
- package/src/v2/components/Customer/CustomersList.scss +815 -0
- package/src/v2/components/FormField/FormField.tsx +19 -21
- package/src/v2/components/Modal/DeleteModal.scss +254 -0
- package/src/v2/components/Modal/DeleteModal.tsx +102 -0
- package/src/v2/components/Modal/index.ts +3 -0
- package/src/v2/components/NPSScore/NPSScore.scss +40 -59
- package/src/v2/components/NPSScore/NPSScore.tsx +15 -16
- package/src/v2/components/NewInput/NewInput.stories.tsx +3 -18
- package/src/v2/components/NewInput/NewInput.tsx +35 -12
- package/src/v2/components/NewPageHeader/NewPageHeader.scss +17 -8
- package/src/v2/components/NewPageHeader/NewPageHeader.tsx +17 -10
- package/src/v2/components/NewTable/NewTable.scss +126 -0
- package/src/v2/components/NewTable/NewTable.tsx +92 -0
- package/src/v2/components/NewTable/index.ts +1 -0
- package/src/v2/components/Pagination/Pagination.scss +142 -0
- package/src/v2/components/Pagination/Pagination.tsx +80 -0
- package/src/v2/components/Pagination/index.ts +1 -0
- package/src/v2/components/QuickFilter/QuickFilter.scss +67 -0
- package/src/v2/components/QuickFilter/QuickFilter.tsx +51 -0
- package/src/v2/components/QuickFilter/index.ts +1 -0
- package/src/v2/components/SectionHeader/SectionHeader.tsx +5 -7
- package/src/v2/components/Select/Select.scss +61 -24
- package/src/v2/components/Select/Select.stories.tsx +77 -1
- package/src/v2/components/Select/Select.tsx +63 -34
- package/src/v2/components/TableSortIcon/TableSortIcon.tsx +20 -0
- package/src/v2/components/TableSortIcon/index.ts +1 -0
- package/src/v2/components/WYSIWYGEditor/Icons.tsx +2 -2
- package/src/v2/components/index.ts +44 -5
- package/src/v2/icons/index.tsx +123 -3
- package/src/v2/navigation/DashboardLayout/ProviderSidebar.tsx +3 -1
- package/src/v2/navigation/config.tsx +1 -1
- package/src/v2/pages/Settings/components/SidebarCustomisation.tsx +1 -1
- package/src/v2/styles/common.scss +7 -0
- package/src/v2/styles/components/Button.scss +34 -2
- package/src/v2/styles/form/NewInput.scss +45 -21
- package/src/v2/styles/index.scss +1 -0
- package/src/v2/styles/tokens/_colors.scss +6 -0
|
@@ -9,27 +9,25 @@ export interface FormFieldProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export const FormField = forwardRef<HTMLInputElement, FormFieldProps>(
|
|
12
|
-
({ label, error, helpText, required, className = '', ...props }, ref) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{helpText
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
)
|
|
32
|
-
}
|
|
12
|
+
({ label, error, helpText, required, className = '', ...props }, ref) => (
|
|
13
|
+
<div className={`form-field ${className}`}>
|
|
14
|
+
{label && (
|
|
15
|
+
<label className="form-field__label">
|
|
16
|
+
{label}
|
|
17
|
+
{required && <span className="form-field__required">*</span>}
|
|
18
|
+
</label>
|
|
19
|
+
)}
|
|
20
|
+
<input
|
|
21
|
+
ref={ref}
|
|
22
|
+
className={`form-field__input ${error ? 'form-field__input--error' : ''}`}
|
|
23
|
+
{...props}
|
|
24
|
+
/>
|
|
25
|
+
{helpText && !error && (
|
|
26
|
+
<span className="form-field__help-text">{helpText}</span>
|
|
27
|
+
)}
|
|
28
|
+
{error && <span className="form-field__error-text">{error}</span>}
|
|
29
|
+
</div>
|
|
30
|
+
)
|
|
33
31
|
)
|
|
34
32
|
|
|
35
33
|
FormField.displayName = 'FormField'
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
.delete-modal-overlay {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
z-index: 1000;
|
|
12
|
+
animation: fadeIn 0.2s ease-in-out;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@keyframes fadeIn {
|
|
16
|
+
from { opacity: 0; }
|
|
17
|
+
to { opacity: 1; }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.delete-modal {
|
|
21
|
+
background: white;
|
|
22
|
+
border-radius: 12px;
|
|
23
|
+
width: 95%;
|
|
24
|
+
max-width: 800px;
|
|
25
|
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
26
|
+
animation: slideUp 0.2s ease-in-out;
|
|
27
|
+
font-family: var(--font-family-sans, 'Geist', sans-serif);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@keyframes slideUp {
|
|
31
|
+
from {
|
|
32
|
+
transform: translateY(10px);
|
|
33
|
+
opacity: 0;
|
|
34
|
+
}
|
|
35
|
+
to {
|
|
36
|
+
transform: translateY(0);
|
|
37
|
+
opacity: 1;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.delete-modal__content {
|
|
42
|
+
padding: 48px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.delete-modal__title {
|
|
46
|
+
font-family: var(--font-family-sans, 'Geist', sans-serif);
|
|
47
|
+
font-size: 32px;
|
|
48
|
+
font-weight: 700;
|
|
49
|
+
color: #14215A;
|
|
50
|
+
margin: 0 0 24px 0;
|
|
51
|
+
line-height: 40px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.delete-modal__description-group {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
gap: 24px;
|
|
58
|
+
margin-bottom: 32px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.delete-modal__description {
|
|
62
|
+
font-family: var(--font-family-sans, 'Geist', sans-serif);
|
|
63
|
+
font-size: 20px;
|
|
64
|
+
font-weight: 400;
|
|
65
|
+
color: #626A90;
|
|
66
|
+
margin: 0;
|
|
67
|
+
line-height: 28px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.delete-modal__confirmation {
|
|
71
|
+
margin-bottom: 40px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.delete-modal__label {
|
|
75
|
+
font-family: var(--font-family-sans, 'Geist', sans-serif);
|
|
76
|
+
display: block;
|
|
77
|
+
font-size: 20px;
|
|
78
|
+
color: #14215A;
|
|
79
|
+
margin-bottom: 16px;
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
|
|
82
|
+
strong {
|
|
83
|
+
font-weight: 700;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.delete-modal__input {
|
|
88
|
+
font-family: var(--font-family-sans, 'Geist', sans-serif);
|
|
89
|
+
width: 100%;
|
|
90
|
+
padding: 16px 24px;
|
|
91
|
+
font-size: 20px;
|
|
92
|
+
border: 1px solid #E8E9EF;
|
|
93
|
+
border-radius: 12px;
|
|
94
|
+
outline: none;
|
|
95
|
+
transition: all 0.2s ease-in-out;
|
|
96
|
+
font-family: inherit;
|
|
97
|
+
color: #14215A;
|
|
98
|
+
|
|
99
|
+
&::placeholder {
|
|
100
|
+
color: #626A90;
|
|
101
|
+
opacity: 0.6;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:focus {
|
|
105
|
+
border-color: #D2D5E3;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.delete-modal__actions {
|
|
110
|
+
display: flex;
|
|
111
|
+
gap: 16px;
|
|
112
|
+
align-items: center;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.delete-modal__button {
|
|
116
|
+
font-family: var(--font-family-sans, 'Geist', sans-serif);
|
|
117
|
+
padding: 12px 32px;
|
|
118
|
+
font-size: 20px;
|
|
119
|
+
font-weight: 600;
|
|
120
|
+
border-radius: 12px;
|
|
121
|
+
border: none;
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
transition: all 0.2s ease-in-out;
|
|
124
|
+
font-family: inherit;
|
|
125
|
+
outline: none;
|
|
126
|
+
min-height: 64px;
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: center;
|
|
130
|
+
|
|
131
|
+
&:disabled {
|
|
132
|
+
opacity: 0.6;
|
|
133
|
+
cursor: not-allowed;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&--delete {
|
|
137
|
+
background-color: #CC3C35;
|
|
138
|
+
color: white;
|
|
139
|
+
|
|
140
|
+
&:disabled {
|
|
141
|
+
opacity: 0.5;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&:hover:not(:disabled) {
|
|
145
|
+
background-color: #b33630;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&--cancel {
|
|
150
|
+
background-color: transparent;
|
|
151
|
+
color: var(--label-primary);
|
|
152
|
+
border: 2px solid #D2D5E3;
|
|
153
|
+
|
|
154
|
+
&:hover:not(:disabled) {
|
|
155
|
+
background-color: var(--surface-secondary);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Mobile styles
|
|
161
|
+
@media (max-width: 768px) {
|
|
162
|
+
.delete-modal {
|
|
163
|
+
max-width: 90%;
|
|
164
|
+
width: 90%;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.delete-modal__content {
|
|
168
|
+
padding: 32px 24px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.delete-modal__title {
|
|
172
|
+
font-size: 24px;
|
|
173
|
+
line-height: 32px;
|
|
174
|
+
margin-bottom: 16px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.delete-modal__description-group {
|
|
178
|
+
gap: 16px;
|
|
179
|
+
margin-bottom: 24px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.delete-modal__description {
|
|
183
|
+
font-size: 16px;
|
|
184
|
+
line-height: 24px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.delete-modal__confirmation {
|
|
188
|
+
margin-bottom: 32px;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.delete-modal__label {
|
|
192
|
+
font-size: 16px;
|
|
193
|
+
margin-bottom: 12px;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.delete-modal__actions {
|
|
197
|
+
gap: 12px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.delete-modal__button {
|
|
201
|
+
padding: 10px 24px;
|
|
202
|
+
font-size: 16px;
|
|
203
|
+
min-height: 52px;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@media (max-width: 480px) {
|
|
208
|
+
.delete-modal {
|
|
209
|
+
max-width: 95%;
|
|
210
|
+
width: 95%;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.delete-modal__content {
|
|
214
|
+
padding: 24px 16px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.delete-modal__title {
|
|
218
|
+
font-size: 20px;
|
|
219
|
+
line-height: 28px;
|
|
220
|
+
margin-bottom: 12px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.delete-modal__description-group {
|
|
224
|
+
gap: 12px;
|
|
225
|
+
margin-bottom: 20px;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.delete-modal__description {
|
|
229
|
+
font-size: 14px;
|
|
230
|
+
line-height: 20px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.delete-modal__confirmation {
|
|
234
|
+
margin-bottom: 24px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.delete-modal__label {
|
|
238
|
+
font-size: 14px;
|
|
239
|
+
margin-bottom: 10px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.delete-modal__actions {
|
|
243
|
+
flex-direction: column;
|
|
244
|
+
gap: 8px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.delete-modal__button {
|
|
248
|
+
width: 100%;
|
|
249
|
+
padding: 8px 20px;
|
|
250
|
+
font-size: 14px;
|
|
251
|
+
min-height: 48px;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import './DeleteModal.scss'
|
|
3
|
+
import { NewInput } from '../NewInput'
|
|
4
|
+
|
|
5
|
+
export interface DeleteModalProps {
|
|
6
|
+
isOpen: boolean
|
|
7
|
+
onClose: () => void
|
|
8
|
+
onConfirm: () => void
|
|
9
|
+
title: string
|
|
10
|
+
description?: string
|
|
11
|
+
description_1?: string
|
|
12
|
+
confirmationText: string
|
|
13
|
+
confirmationPlaceholder?: string
|
|
14
|
+
isDeleting?: boolean
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const DeleteModal: React.FC<DeleteModalProps> = ({
|
|
18
|
+
isOpen,
|
|
19
|
+
onClose,
|
|
20
|
+
onConfirm,
|
|
21
|
+
title,
|
|
22
|
+
description,
|
|
23
|
+
description_1,
|
|
24
|
+
confirmationText,
|
|
25
|
+
confirmationPlaceholder,
|
|
26
|
+
isDeleting = false,
|
|
27
|
+
}) => {
|
|
28
|
+
const [inputValue, setInputValue] = useState('')
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (!isOpen) {
|
|
32
|
+
setInputValue('')
|
|
33
|
+
}
|
|
34
|
+
}, [isOpen])
|
|
35
|
+
|
|
36
|
+
const handleClose = () => {
|
|
37
|
+
onClose()
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const handleConfirm = () => {
|
|
41
|
+
if (inputValue === confirmationText) {
|
|
42
|
+
onConfirm()
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const isConfirmDisabled = inputValue !== confirmationText || isDeleting
|
|
47
|
+
|
|
48
|
+
if (!isOpen) return null
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<div className="delete-modal-overlay" role="presentation" onClick={handleClose}>
|
|
52
|
+
<div className="delete-modal" role="presentation" onClick={(e) => e.stopPropagation()}>
|
|
53
|
+
<div className="delete-modal__content">
|
|
54
|
+
<h2 className="delete-modal__title">{title}</h2>
|
|
55
|
+
|
|
56
|
+
<div className="delete-modal__description-group">
|
|
57
|
+
{description && (
|
|
58
|
+
<p className="delete-modal__description">{description}</p>
|
|
59
|
+
)}
|
|
60
|
+
|
|
61
|
+
{description_1 && (
|
|
62
|
+
<p className="delete-modal__description">{description_1}</p>
|
|
63
|
+
)}
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div className="delete-modal__confirmation">
|
|
67
|
+
<p className="delete-modal__label">
|
|
68
|
+
Type <strong>{confirmationText}</strong> to confirm deletion
|
|
69
|
+
</p>
|
|
70
|
+
<NewInput
|
|
71
|
+
type="text"
|
|
72
|
+
placeholder={confirmationPlaceholder || confirmationText}
|
|
73
|
+
value={inputValue}
|
|
74
|
+
onChange={(e) => setInputValue(e.target.value)}
|
|
75
|
+
autoFocus
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div className="delete-modal__actions">
|
|
80
|
+
<button
|
|
81
|
+
type="button"
|
|
82
|
+
className="delete-modal__button delete-modal__button--delete"
|
|
83
|
+
onClick={handleConfirm}
|
|
84
|
+
disabled={isConfirmDisabled}
|
|
85
|
+
>
|
|
86
|
+
{isDeleting ? 'Deleting...' : 'Delete'}
|
|
87
|
+
</button>
|
|
88
|
+
<button
|
|
89
|
+
type="button"
|
|
90
|
+
className="delete-modal__button delete-modal__button--cancel"
|
|
91
|
+
onClick={handleClose}
|
|
92
|
+
disabled={isDeleting}
|
|
93
|
+
>
|
|
94
|
+
Cancel
|
|
95
|
+
</button>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
.nps-score {
|
|
2
2
|
width: 100%;
|
|
3
3
|
margin-top: 24px;
|
|
4
|
+
padding: 0 1rem;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
|
|
7
|
+
@media (max-width: 576px) {
|
|
8
|
+
padding: 0 16px;
|
|
9
|
+
}
|
|
4
10
|
|
|
5
11
|
&__container {
|
|
6
|
-
background: var(--
|
|
12
|
+
background: var(--surface-secondary);
|
|
7
13
|
border-radius: 16px;
|
|
8
14
|
padding: 24px;
|
|
9
|
-
border: 1px solid var(--
|
|
15
|
+
border: 1px solid var(--border-primary);
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
&__question {
|
|
@@ -14,7 +20,7 @@
|
|
|
14
20
|
font-size: 18px;
|
|
15
21
|
font-weight: 600;
|
|
16
22
|
line-height: 24px;
|
|
17
|
-
color: var(--
|
|
23
|
+
color: var(--label-primary);
|
|
18
24
|
margin: 0 0 16px 0;
|
|
19
25
|
}
|
|
20
26
|
|
|
@@ -34,7 +40,7 @@
|
|
|
34
40
|
font-family: var(--font-family-sans);
|
|
35
41
|
font-size: 14px;
|
|
36
42
|
font-weight: 500;
|
|
37
|
-
color: var(--
|
|
43
|
+
color: var(--label-secondary);
|
|
38
44
|
}
|
|
39
45
|
|
|
40
46
|
&--desktop {
|
|
@@ -57,7 +63,7 @@
|
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
&__label-icon {
|
|
60
|
-
color: var(--
|
|
66
|
+
color: var(--fill-secondary);
|
|
61
67
|
flex-shrink: 0;
|
|
62
68
|
}
|
|
63
69
|
|
|
@@ -79,18 +85,18 @@
|
|
|
79
85
|
font-weight: 600;
|
|
80
86
|
transition: all 0.2s ease;
|
|
81
87
|
cursor: pointer;
|
|
82
|
-
background: var(--
|
|
83
|
-
border: 1px solid var(--
|
|
84
|
-
color: var(--
|
|
88
|
+
background: var(--surface-primary);
|
|
89
|
+
border: 1px solid var(--border-primary);
|
|
90
|
+
color: var(--label-primary);
|
|
85
91
|
|
|
86
92
|
&:hover:not(&--selected) {
|
|
87
|
-
background: var(--
|
|
93
|
+
background: var(--surface-primary-hover);
|
|
88
94
|
}
|
|
89
95
|
|
|
90
96
|
&--selected {
|
|
91
|
-
background: var(--
|
|
97
|
+
background: var(--fill-primary);
|
|
92
98
|
border-color: transparent;
|
|
93
|
-
color:
|
|
99
|
+
color: var(--label-primary-alt);
|
|
94
100
|
}
|
|
95
101
|
}
|
|
96
102
|
|
|
@@ -113,7 +119,7 @@
|
|
|
113
119
|
font-family: var(--font-family-sans);
|
|
114
120
|
font-size: 14px;
|
|
115
121
|
font-weight: 500;
|
|
116
|
-
color: var(--
|
|
122
|
+
color: var(--label-primary);
|
|
117
123
|
margin-bottom: 8px;
|
|
118
124
|
}
|
|
119
125
|
|
|
@@ -127,7 +133,7 @@
|
|
|
127
133
|
&__optional {
|
|
128
134
|
font-family: var(--font-family-sans);
|
|
129
135
|
font-size: 14px;
|
|
130
|
-
color: var(--
|
|
136
|
+
color: var(--label-secondary);
|
|
131
137
|
}
|
|
132
138
|
|
|
133
139
|
&__textarea {
|
|
@@ -135,39 +141,39 @@
|
|
|
135
141
|
min-height: 100px;
|
|
136
142
|
padding: 12px;
|
|
137
143
|
border-radius: 8px;
|
|
138
|
-
border: 1px solid var(--
|
|
139
|
-
background: var(--
|
|
144
|
+
border: 1px solid var(--border-primary);
|
|
145
|
+
background: var(--surface-primary);
|
|
140
146
|
font-family: var(--font-family-sans);
|
|
141
147
|
font-size: 14px;
|
|
142
|
-
color: var(--
|
|
148
|
+
color: var(--label-primary);
|
|
143
149
|
resize: vertical;
|
|
144
150
|
box-sizing: border-box;
|
|
145
151
|
|
|
146
152
|
&::placeholder {
|
|
147
|
-
color: var(--
|
|
153
|
+
color: var(--label-secondary);
|
|
148
154
|
}
|
|
149
155
|
|
|
150
156
|
&:focus {
|
|
151
157
|
outline: none;
|
|
152
|
-
border-color: var(--
|
|
158
|
+
border-color: var(--fill-primary);
|
|
153
159
|
}
|
|
154
160
|
|
|
155
161
|
&--error {
|
|
156
|
-
border-color: var(--
|
|
162
|
+
border-color: var(--fill-danger);
|
|
157
163
|
}
|
|
158
164
|
}
|
|
159
165
|
|
|
160
166
|
&__hint {
|
|
161
167
|
font-family: var(--font-family-sans);
|
|
162
168
|
font-size: 14px;
|
|
163
|
-
color: var(--
|
|
169
|
+
color: var(--label-secondary);
|
|
164
170
|
margin: 4px 0 0 0;
|
|
165
171
|
}
|
|
166
172
|
|
|
167
173
|
&__error {
|
|
168
174
|
font-family: var(--font-family-sans);
|
|
169
175
|
font-size: 14px;
|
|
170
|
-
color: var(--
|
|
176
|
+
color: var(--fill-danger);
|
|
171
177
|
margin: 4px 0 0 0;
|
|
172
178
|
}
|
|
173
179
|
|
|
@@ -175,7 +181,7 @@
|
|
|
175
181
|
font-family: var(--font-family-sans);
|
|
176
182
|
font-size: 14px;
|
|
177
183
|
font-weight: 500;
|
|
178
|
-
color: var(--
|
|
184
|
+
color: var(--label-action);
|
|
179
185
|
text-decoration: underline;
|
|
180
186
|
background: none;
|
|
181
187
|
border: none;
|
|
@@ -184,17 +190,18 @@
|
|
|
184
190
|
transition: color 0.2s ease;
|
|
185
191
|
|
|
186
192
|
&:hover {
|
|
187
|
-
color: var(--
|
|
193
|
+
color: var(--label-action);
|
|
188
194
|
}
|
|
189
195
|
}
|
|
190
196
|
|
|
191
197
|
&__roles {
|
|
192
198
|
display: grid;
|
|
193
199
|
grid-template-columns: 1fr;
|
|
194
|
-
gap:
|
|
200
|
+
gap: 8px;
|
|
195
201
|
|
|
196
202
|
@media (min-width: 640px) {
|
|
197
203
|
grid-template-columns: repeat(2, 1fr);
|
|
204
|
+
gap: 4px;
|
|
198
205
|
}
|
|
199
206
|
|
|
200
207
|
@media (min-width: 1024px) {
|
|
@@ -217,8 +224,8 @@
|
|
|
217
224
|
width: 20px;
|
|
218
225
|
height: 20px;
|
|
219
226
|
border-radius: 50%;
|
|
220
|
-
border: 2px solid var(--
|
|
221
|
-
background: var(--
|
|
227
|
+
border: 2px solid var(--border-primary);
|
|
228
|
+
background: var(--surface-primary);
|
|
222
229
|
margin: 0;
|
|
223
230
|
cursor: pointer;
|
|
224
231
|
flex-shrink: 0;
|
|
@@ -234,12 +241,12 @@
|
|
|
234
241
|
width: 10px;
|
|
235
242
|
height: 10px;
|
|
236
243
|
border-radius: 50%;
|
|
237
|
-
background: var(--
|
|
244
|
+
background: var(--fill-primary);
|
|
238
245
|
transition: transform 0.2s ease;
|
|
239
246
|
}
|
|
240
247
|
|
|
241
248
|
&:checked {
|
|
242
|
-
border-color: var(--
|
|
249
|
+
border-color: var(--fill-primary);
|
|
243
250
|
|
|
244
251
|
&::before {
|
|
245
252
|
transform: translate(-50%, -50%) scale(1);
|
|
@@ -248,7 +255,7 @@
|
|
|
248
255
|
|
|
249
256
|
&:focus {
|
|
250
257
|
outline: none;
|
|
251
|
-
box-shadow: 0 0 0 2px var(--
|
|
258
|
+
box-shadow: 0 0 0 2px var(--border-action);
|
|
252
259
|
}
|
|
253
260
|
}
|
|
254
261
|
|
|
@@ -259,33 +266,7 @@
|
|
|
259
266
|
&__role-label {
|
|
260
267
|
font-family: var(--font-family-sans);
|
|
261
268
|
font-size: 14px;
|
|
262
|
-
color: var(--
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
&__submit {
|
|
266
|
-
display: inline-flex;
|
|
267
|
-
align-items: center;
|
|
268
|
-
justify-content: center;
|
|
269
|
-
padding: 12px 24px;
|
|
270
|
-
border-radius: 8px;
|
|
271
|
-
border: none;
|
|
272
|
-
background: var(--fills-main-fill-primary, #14215A);
|
|
273
|
-
color: #FFFFFF;
|
|
274
|
-
font-family: var(--font-family-sans);
|
|
275
|
-
font-size: 14px;
|
|
276
|
-
font-weight: 600;
|
|
277
|
-
cursor: pointer;
|
|
278
|
-
transition: background 0.2s ease;
|
|
279
|
-
width: fit-content;
|
|
280
|
-
|
|
281
|
-
&:hover:not(:disabled) {
|
|
282
|
-
background: var(--fills-main-fill-primary-hover, #1a2a6e);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
&:disabled {
|
|
286
|
-
opacity: 0.6;
|
|
287
|
-
cursor: not-allowed;
|
|
288
|
-
}
|
|
269
|
+
color: var(--label-primary);
|
|
289
270
|
}
|
|
290
271
|
|
|
291
272
|
&__success {
|
|
@@ -298,7 +279,7 @@
|
|
|
298
279
|
}
|
|
299
280
|
|
|
300
281
|
&__success-icon {
|
|
301
|
-
color: var(--
|
|
282
|
+
color: var(--fill-status-success);
|
|
302
283
|
margin-bottom: 16px;
|
|
303
284
|
}
|
|
304
285
|
|
|
@@ -306,14 +287,14 @@
|
|
|
306
287
|
font-family: var(--font-family-sans);
|
|
307
288
|
font-size: 24px;
|
|
308
289
|
font-weight: 600;
|
|
309
|
-
color: var(--
|
|
290
|
+
color: var(--label-primary);
|
|
310
291
|
margin: 0 0 8px 0;
|
|
311
292
|
}
|
|
312
293
|
|
|
313
294
|
&__success-message {
|
|
314
295
|
font-family: var(--font-family-sans);
|
|
315
296
|
font-size: 14px;
|
|
316
|
-
color: var(--
|
|
297
|
+
color: var(--label-secondary);
|
|
317
298
|
margin: 0;
|
|
318
299
|
}
|
|
319
300
|
}
|