@softwareone/spi-sv5-library 1.14.3 → 1.15.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/components/accordion/Accordion.svelte +14 -23
- package/dist/components/announcement/Announcement.svelte +53 -61
- package/dist/components/avatar/Avatar.svelte +30 -12
- package/dist/components/avatar/Avatar.svelte.d.ts +2 -2
- package/dist/components/button/Button.svelte +41 -44
- package/dist/components/card/Card.svelte +4 -6
- package/dist/components/chips/Chips.svelte +37 -36
- package/dist/components/chips/Chips.svelte.d.ts +1 -1
- package/dist/components/confirmation/Confirmation.svelte +6 -6
- package/dist/components/confirmation/Confirmation.svelte.d.ts +2 -2
- package/dist/components/controls/attach-file/AttachFile.svelte +18 -41
- package/dist/components/controls/attach-file/FileManager.svelte +16 -30
- package/dist/components/controls/attach-file/Warnings.svelte +13 -15
- package/dist/components/controls/input/Input.svelte +46 -72
- package/dist/components/controls/input/InputIcon.svelte +13 -13
- package/dist/components/controls/label/Label.svelte +5 -9
- package/dist/components/controls/radio-group/RadioGroup.svelte +25 -39
- package/dist/components/controls/select/Select.svelte +49 -71
- package/dist/components/controls/textarea/TextArea.svelte +36 -45
- package/dist/components/controls/toggle/Toggle.svelte +35 -37
- package/dist/components/delete-confirmation/DeleteConfirmation.svelte +3 -5
- package/dist/components/error-page/ErrorPage.svelte +9 -18
- package/dist/components/footer/Footer.svelte +9 -14
- package/dist/components/footer/Footer.svelte.d.ts +0 -1
- package/dist/components/footer/FooterLogo.svelte +16 -0
- package/dist/components/footer/FooterLogo.svelte.d.ts +26 -0
- package/dist/components/form/Form.svelte +1 -1
- package/dist/components/header/Header.svelte +39 -45
- package/dist/components/header/HeaderAccount.svelte +21 -33
- package/dist/components/header/HeaderLoader.svelte +13 -8
- package/dist/components/highlight-panel/HighlightPanel.svelte +29 -34
- package/dist/components/home/Home.svelte +18 -36
- package/dist/components/link/Link.svelte +1 -1
- package/dist/components/menu/Menu.svelte +16 -21
- package/dist/components/menu/MenuItem.svelte +25 -29
- package/dist/components/menu/Sidebar.svelte +32 -40
- package/dist/components/menu/utils.d.ts +1 -1
- package/dist/components/menu/utils.js +6 -7
- package/dist/components/modal/Modal.svelte +8 -11
- package/dist/components/modal/ModalContent.svelte +3 -3
- package/dist/components/modal/ModalFooter.svelte +5 -5
- package/dist/components/modal/ModalHeader.svelte +6 -11
- package/dist/components/notification/Notification.svelte +20 -27
- package/dist/components/processing/Processing.svelte +9 -16
- package/dist/components/progress-page/ProgressPage.svelte +13 -18
- package/dist/components/progress-wizard/ProgressWizard.svelte +43 -54
- package/dist/components/search/Search.svelte +24 -29
- package/dist/components/spinner/Spinner.svelte +1 -1
- package/dist/components/switcher/Switcher.svelte +14 -23
- package/dist/components/table/ActionsColumn.svelte +13 -33
- package/dist/components/table/AdvancedFilter.svelte +39 -74
- package/dist/components/table/Body.svelte +9 -18
- package/dist/components/table/ColumnVisibilityDropdown.svelte +24 -55
- package/dist/components/table/Footer.svelte +2 -4
- package/dist/components/table/Header.svelte +23 -44
- package/dist/components/table/PageSize.svelte +24 -36
- package/dist/components/table/Pagination.svelte +49 -35
- package/dist/components/table/RowCheckBox.svelte +5 -12
- package/dist/components/table/Skeleton.svelte +16 -25
- package/dist/components/table/Table.svelte +50 -38
- package/dist/components/table/Table.svelte.d.ts +5 -1
- package/dist/components/table/types.d.ts +9 -1
- package/dist/components/table/utils.d.ts +5 -1
- package/dist/components/table/utils.js +8 -8
- package/dist/components/tabs/Tabs.svelte +16 -20
- package/dist/components/toast/Toast.svelte +27 -30
- package/dist/components/tooltip/Tooltip.svelte +15 -19
- package/dist/components/waffle/Waffle.svelte +9 -13
- package/dist/components/waffle/WaffleItems.svelte +10 -13
- package/dist/styles/index.css +3 -0
- package/dist/styles/reset.css +19 -0
- package/dist/styles/tokens/index.css +2 -0
- package/dist/styles/tokens/primitives/borders.css +17 -0
- package/dist/styles/tokens/primitives/colors.css +41 -0
- package/dist/styles/tokens/primitives/index.css +7 -0
- package/dist/styles/tokens/primitives/motion.css +11 -0
- package/dist/styles/tokens/primitives/opacity.css +6 -0
- package/dist/styles/tokens/primitives/shadows.css +11 -0
- package/dist/styles/tokens/primitives/sizing.css +19 -0
- package/dist/styles/tokens/primitives/typography.css +13 -0
- package/dist/styles/tokens/semantic/colors.css +78 -0
- package/dist/styles/tokens/semantic/index.css +2 -0
- package/dist/styles/tokens/semantic/shadows.css +9 -0
- package/dist/styles/utilities.css +73 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/url.d.ts +3 -0
- package/dist/utils/url.js +15 -0
- package/package.json +3 -2
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
{readonly}
|
|
69
69
|
class={[
|
|
70
70
|
'form-input',
|
|
71
|
+
'spi-text-regular-2',
|
|
71
72
|
disabled && 'form-input-disabled',
|
|
72
73
|
readonly && 'form-input-readonly',
|
|
73
74
|
(showIcon || showDatePicker) && 'form-input-with-icon',
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
/>
|
|
78
79
|
|
|
79
80
|
{#if type === 'money' && currency}
|
|
80
|
-
<div class="form-input-currency">{currency}</div>
|
|
81
|
+
<div class="form-input-currency spi-text-regular-1">{currency}</div>
|
|
81
82
|
{/if}
|
|
82
83
|
|
|
83
84
|
{#if showIcon}
|
|
@@ -102,12 +103,12 @@
|
|
|
102
103
|
</div>
|
|
103
104
|
|
|
104
105
|
{#if description}
|
|
105
|
-
<p class="form-message form-message-description">
|
|
106
|
+
<p class="form-message form-message-description spi-text-regular-1">
|
|
106
107
|
{description}
|
|
107
108
|
</p>
|
|
108
109
|
{/if}
|
|
109
110
|
{#if isInvalid}
|
|
110
|
-
<p class="form-message form-message-error">
|
|
111
|
+
<p class="form-message form-message-error spi-text-regular-1">
|
|
111
112
|
{Array.isArray(error) ? error[0] : error}
|
|
112
113
|
</p>
|
|
113
114
|
{/if}
|
|
@@ -117,13 +118,7 @@
|
|
|
117
118
|
.form-container {
|
|
118
119
|
display: flex;
|
|
119
120
|
flex-direction: column;
|
|
120
|
-
gap:
|
|
121
|
-
font-size: 14px;
|
|
122
|
-
line-height: 20px;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.form-message {
|
|
126
|
-
font-size: 12px;
|
|
121
|
+
gap: var(--spi-size-2);
|
|
127
122
|
}
|
|
128
123
|
|
|
129
124
|
.form-input-wrapper {
|
|
@@ -131,38 +126,30 @@
|
|
|
131
126
|
display: flex;
|
|
132
127
|
align-items: center;
|
|
133
128
|
width: 100%;
|
|
134
|
-
border-radius:
|
|
135
|
-
border:
|
|
136
|
-
background:
|
|
137
|
-
transition: all
|
|
129
|
+
border-radius: var(--spi-rounded-lg);
|
|
130
|
+
border: var(--spi-border-1) solid var(--spi-color-border-strong);
|
|
131
|
+
background: var(--spi-color-surface-default);
|
|
132
|
+
transition: all var(--spi-duration-normal) var(--spi-ease-in-out);
|
|
138
133
|
}
|
|
139
134
|
|
|
140
135
|
.form-input-wrapper:hover:not(:has(.form-input:disabled)):not(:has(.form-input:read-only)),
|
|
141
136
|
.form-input-wrapper:focus-within {
|
|
142
|
-
border-color:
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.form-input-wrapper:focus-within,
|
|
146
|
-
.form-input-wrapper:not(.money-with-icon):not(.error):not(.success) .form-input:focus-visible {
|
|
147
|
-
box-shadow: 0px 0px 0px 3px rgba(149, 155, 255, 0.3);
|
|
137
|
+
border-color: var(--spi-color-border-focus);
|
|
148
138
|
}
|
|
149
139
|
|
|
150
|
-
.form-input-wrapper:
|
|
151
|
-
|
|
152
|
-
border-color: #472aff;
|
|
140
|
+
.form-input-wrapper:focus-within {
|
|
141
|
+
box-shadow: var(--spi-shadow-focus-primary);
|
|
153
142
|
}
|
|
154
143
|
|
|
155
144
|
.form-input {
|
|
156
|
-
font-size: 14px;
|
|
157
|
-
line-height: 20px;
|
|
158
145
|
display: flex;
|
|
159
146
|
width: 100%;
|
|
160
|
-
padding:
|
|
147
|
+
padding: var(--spi-size-2) var(--spi-size-4);
|
|
161
148
|
align-items: center;
|
|
162
149
|
border: none;
|
|
163
|
-
border-radius:
|
|
164
|
-
color:
|
|
165
|
-
transition: all
|
|
150
|
+
border-radius: var(--spi-rounded-lg);
|
|
151
|
+
color: var(--spi-color-text-primary);
|
|
152
|
+
transition: all var(--spi-duration-normal) var(--spi-ease-in-out);
|
|
166
153
|
text-overflow: ellipsis;
|
|
167
154
|
white-space: nowrap;
|
|
168
155
|
overflow: hidden;
|
|
@@ -177,15 +164,15 @@
|
|
|
177
164
|
}
|
|
178
165
|
|
|
179
166
|
.form-input-disabled {
|
|
180
|
-
background-color:
|
|
181
|
-
border-color:
|
|
182
|
-
color:
|
|
167
|
+
background-color: var(--spi-color-disabled-bg);
|
|
168
|
+
border-color: var(--spi-color-disabled-border);
|
|
169
|
+
color: var(--spi-color-text-primary);
|
|
183
170
|
cursor: not-allowed;
|
|
184
171
|
}
|
|
185
172
|
|
|
186
173
|
.form-input-readonly {
|
|
187
|
-
background-color:
|
|
188
|
-
border-color:
|
|
174
|
+
background-color: var(--spi-color-surface-subtle);
|
|
175
|
+
border-color: var(--spi-color-border-default);
|
|
189
176
|
cursor: default;
|
|
190
177
|
}
|
|
191
178
|
|
|
@@ -195,10 +182,10 @@
|
|
|
195
182
|
}
|
|
196
183
|
|
|
197
184
|
.form-input-date::-webkit-calendar-picker-indicator {
|
|
198
|
-
opacity:
|
|
185
|
+
opacity: var(--spi-opacity-100);
|
|
199
186
|
cursor: pointer;
|
|
200
|
-
width:
|
|
201
|
-
height:
|
|
187
|
+
width: var(--spi-size-5);
|
|
188
|
+
height: var(--spi-size-5);
|
|
202
189
|
position: absolute;
|
|
203
190
|
right: 10px;
|
|
204
191
|
top: 50%;
|
|
@@ -206,10 +193,10 @@
|
|
|
206
193
|
}
|
|
207
194
|
|
|
208
195
|
.form-input-date::-moz-calendar-picker-indicator {
|
|
209
|
-
opacity:
|
|
196
|
+
opacity: var(--spi-opacity-100);
|
|
210
197
|
cursor: pointer;
|
|
211
|
-
width:
|
|
212
|
-
height:
|
|
198
|
+
width: var(--spi-size-5);
|
|
199
|
+
height: var(--spi-size-5);
|
|
213
200
|
position: absolute;
|
|
214
201
|
right: 12px;
|
|
215
202
|
top: 50%;
|
|
@@ -234,22 +221,22 @@
|
|
|
234
221
|
top: 0;
|
|
235
222
|
bottom: 0;
|
|
236
223
|
width: 0.5px;
|
|
237
|
-
background-color:
|
|
224
|
+
background-color: var(--spi-color-border-strong);
|
|
238
225
|
z-index: 1;
|
|
239
226
|
}
|
|
240
227
|
|
|
241
228
|
.form-input::placeholder,
|
|
242
229
|
.form-input:disabled::placeholder {
|
|
243
|
-
color:
|
|
244
|
-
opacity:
|
|
230
|
+
color: var(--spi-color-text-placeholder);
|
|
231
|
+
opacity: var(--spi-opacity-100);
|
|
245
232
|
}
|
|
246
233
|
|
|
247
234
|
.form-message-error {
|
|
248
|
-
color:
|
|
235
|
+
color: var(--spi-color-text-danger);
|
|
249
236
|
}
|
|
250
237
|
|
|
251
238
|
.form-message-description {
|
|
252
|
-
color:
|
|
239
|
+
color: var(--spi-color-text-muted);
|
|
253
240
|
}
|
|
254
241
|
|
|
255
242
|
.form-input-icon-container {
|
|
@@ -260,12 +247,12 @@
|
|
|
260
247
|
display: flex;
|
|
261
248
|
align-items: center;
|
|
262
249
|
justify-content: center;
|
|
263
|
-
gap:
|
|
250
|
+
gap: var(--spi-size-6);
|
|
264
251
|
pointer-events: none;
|
|
265
252
|
}
|
|
266
253
|
|
|
267
254
|
.form-input-icon-container-password {
|
|
268
|
-
gap:
|
|
255
|
+
gap: var(--spi-size-2);
|
|
269
256
|
}
|
|
270
257
|
|
|
271
258
|
.form-input-wrapper:has(.form-input-icon-container-password) .form-input {
|
|
@@ -277,19 +264,11 @@
|
|
|
277
264
|
transform: none;
|
|
278
265
|
}
|
|
279
266
|
|
|
280
|
-
.form-input-wrapper:not(.money-with-icon):not(.error):not(.success) .form-input:focus-visible {
|
|
281
|
-
outline: none;
|
|
282
|
-
border-color: #472aff;
|
|
283
|
-
box-shadow: 0px 0px 0px 3px rgba(149, 155, 255, 0.3);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
267
|
.form-input-currency {
|
|
287
268
|
display: flex;
|
|
288
269
|
align-items: center;
|
|
289
|
-
padding: 0 10px
|
|
290
|
-
color:
|
|
291
|
-
font-size: 12px;
|
|
292
|
-
font-weight: 400;
|
|
270
|
+
padding: 0 10px;
|
|
271
|
+
color: var(--spi-color-text-primary);
|
|
293
272
|
height: 100%;
|
|
294
273
|
flex-shrink: 0;
|
|
295
274
|
position: relative;
|
|
@@ -299,28 +278,23 @@
|
|
|
299
278
|
content: '';
|
|
300
279
|
position: absolute;
|
|
301
280
|
left: 0;
|
|
302
|
-
top: -
|
|
303
|
-
bottom: -
|
|
281
|
+
top: -10px;
|
|
282
|
+
bottom: -10px;
|
|
304
283
|
width: 0.5px;
|
|
305
|
-
background-color:
|
|
284
|
+
background-color: var(--spi-color-border-strong);
|
|
306
285
|
z-index: 1;
|
|
307
286
|
}
|
|
308
287
|
|
|
309
|
-
.form-input-wrapper:focus-within {
|
|
310
|
-
border-color: #472aff;
|
|
311
|
-
box-shadow: 0px 0px 0px 3px rgba(149, 155, 255, 0.3);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
288
|
.form-input-wrapper.error,
|
|
315
289
|
.form-input-wrapper.error:hover:not(:has(.form-input:disabled)):not(
|
|
316
290
|
:has(.form-input:read-only)
|
|
317
291
|
),
|
|
318
292
|
.form-input-wrapper.error:focus-within {
|
|
319
|
-
border-color:
|
|
293
|
+
border-color: var(--spi-color-border-danger);
|
|
320
294
|
}
|
|
321
295
|
|
|
322
296
|
.form-input-wrapper.error:focus-within {
|
|
323
|
-
box-shadow:
|
|
297
|
+
box-shadow: var(--spi-shadow-focus-danger);
|
|
324
298
|
}
|
|
325
299
|
|
|
326
300
|
.form-input-wrapper.success,
|
|
@@ -328,11 +302,11 @@
|
|
|
328
302
|
:has(.form-input:read-only)
|
|
329
303
|
),
|
|
330
304
|
.form-input-wrapper.success:focus-within {
|
|
331
|
-
border-color:
|
|
305
|
+
border-color: var(--spi-color-border-success);
|
|
332
306
|
}
|
|
333
307
|
|
|
334
308
|
.form-input-wrapper.success:focus-within {
|
|
335
|
-
box-shadow:
|
|
309
|
+
box-shadow: var(--spi-shadow-focus-success);
|
|
336
310
|
}
|
|
337
311
|
|
|
338
312
|
.form-input-wrapper:has(.form-input-currency) .form-input-icon-container {
|
|
@@ -356,12 +330,12 @@
|
|
|
356
330
|
|
|
357
331
|
@media (prefers-contrast: high) {
|
|
358
332
|
.form-input {
|
|
359
|
-
border-width:
|
|
333
|
+
border-width: var(--spi-border-2);
|
|
360
334
|
}
|
|
361
335
|
|
|
362
336
|
.form-input:focus {
|
|
363
|
-
outline:
|
|
364
|
-
outline-offset:
|
|
337
|
+
outline: var(--spi-border-2) solid;
|
|
338
|
+
outline-offset: var(--spi-border-2);
|
|
365
339
|
}
|
|
366
340
|
}
|
|
367
341
|
|
|
@@ -23,13 +23,15 @@
|
|
|
23
23
|
onclick={() => (isPasswordVisible = !isPasswordVisible)}
|
|
24
24
|
aria-label={isPasswordVisible ? 'Hide password' : 'Show password'}
|
|
25
25
|
>
|
|
26
|
-
<span
|
|
26
|
+
<span
|
|
27
|
+
class="material-icons-outlined form-input-icon spi-text-regular-4 form-input-icon--password"
|
|
28
|
+
>
|
|
27
29
|
{isPasswordVisible ? 'visibility_off' : 'visibility'}
|
|
28
30
|
</span>
|
|
29
31
|
</button>
|
|
30
32
|
{:else}
|
|
31
33
|
<span
|
|
32
|
-
class="material-icons-outlined form-input-icon form-input-icon--{type}"
|
|
34
|
+
class="material-icons-outlined form-input-icon spi-text-regular-4 form-input-icon--{type}"
|
|
33
35
|
class:form-input-icon--date-status={isDateInput &&
|
|
34
36
|
(type === 'error' || type === 'success')}>{icons[type]}</span
|
|
35
37
|
>
|
|
@@ -41,19 +43,17 @@
|
|
|
41
43
|
display: inline-flex;
|
|
42
44
|
align-items: center;
|
|
43
45
|
justify-content: center;
|
|
44
|
-
font-size: 18px;
|
|
45
46
|
height: 18px;
|
|
46
|
-
line-height: 1;
|
|
47
47
|
position: static;
|
|
48
48
|
transform: none;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.form-input-icon--error {
|
|
52
|
-
color:
|
|
52
|
+
color: var(--spi-color-text-danger);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.form-input-icon--success {
|
|
56
|
-
color:
|
|
56
|
+
color: var(--spi-color-text-success);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.form-input-icon--password {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
.form-input-icon--date-status {
|
|
64
|
-
margin-right:
|
|
64
|
+
margin-right: var(--spi-size-10);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
@-moz-document url-prefix() {
|
|
@@ -73,16 +73,16 @@
|
|
|
73
73
|
.form-input-icon-button {
|
|
74
74
|
background: none;
|
|
75
75
|
border: none;
|
|
76
|
-
padding:
|
|
76
|
+
padding: var(--spi-size-1);
|
|
77
77
|
cursor: pointer;
|
|
78
78
|
display: flex;
|
|
79
79
|
align-items: center;
|
|
80
80
|
justify-content: center;
|
|
81
|
-
color:
|
|
82
|
-
transition: color
|
|
83
|
-
width:
|
|
84
|
-
height:
|
|
85
|
-
border-radius:
|
|
81
|
+
color: var(--spi-color-text-primary);
|
|
82
|
+
transition: color var(--spi-duration-normal) var(--spi-ease-default);
|
|
83
|
+
width: var(--spi-size-6);
|
|
84
|
+
height: var(--spi-size-6);
|
|
85
|
+
border-radius: var(--spi-rounded-sm);
|
|
86
86
|
position: relative;
|
|
87
87
|
z-index: 1;
|
|
88
88
|
pointer-events: auto;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
{#if label}
|
|
9
|
-
<div class="form-label-container">
|
|
9
|
+
<div class="form-label-container spi-text-medium-2">
|
|
10
10
|
<label for={id}>{label}</label>
|
|
11
11
|
{#if required}
|
|
12
12
|
<span class="form-label-required">Required</span>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
{/if}
|
|
16
16
|
{#if infoTooltip}
|
|
17
17
|
<Tooltip content={infoTooltip} width="sm">
|
|
18
|
-
<span class="material-icons-outlined">info</span>
|
|
18
|
+
<span class="material-icons-outlined spi-text-medium-2">info</span>
|
|
19
19
|
</Tooltip>
|
|
20
20
|
{/if}
|
|
21
21
|
</div>
|
|
@@ -24,22 +24,18 @@
|
|
|
24
24
|
<style>
|
|
25
25
|
.form-label-container {
|
|
26
26
|
display: flex;
|
|
27
|
-
gap:
|
|
28
|
-
font-weight: 500;
|
|
29
|
-
font-size: 14px;
|
|
30
|
-
line-height: 20px;
|
|
27
|
+
gap: var(--spi-size-2);
|
|
31
28
|
}
|
|
32
29
|
|
|
33
30
|
.form-label-optional {
|
|
34
|
-
color:
|
|
31
|
+
color: var(--spi-color-text-muted);
|
|
35
32
|
}
|
|
36
33
|
|
|
37
34
|
.form-label-required {
|
|
38
|
-
color:
|
|
35
|
+
color: var(--spi-color-text-danger);
|
|
39
36
|
}
|
|
40
37
|
|
|
41
38
|
.material-icons-outlined {
|
|
42
|
-
font-size: 14px;
|
|
43
39
|
vertical-align: middle;
|
|
44
40
|
}
|
|
45
41
|
</style>
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
);
|
|
38
38
|
</script>
|
|
39
39
|
|
|
40
|
-
<div class="form-container">
|
|
40
|
+
<div class="form-container spi-text-regular-2">
|
|
41
41
|
<Label {label} {required} {optional} {infoTooltip} />
|
|
42
42
|
{#if description}
|
|
43
|
-
<p class="message-description">{description}</p>
|
|
43
|
+
<p class="message-description spi-text-regular-1">{description}</p>
|
|
44
44
|
{/if}
|
|
45
45
|
<div class={['radio-group', row && 'row']} role="radiogroup">
|
|
46
46
|
{#each normalizedOptions as option, index (option.value)}
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
disabled && 'disabled'
|
|
63
63
|
]}
|
|
64
64
|
></span>
|
|
65
|
-
<span class="radio-label">{option.label}</span>
|
|
65
|
+
<span class="radio-label spi-text-regular-2">{option.label}</span>
|
|
66
66
|
</label>
|
|
67
67
|
{/each}
|
|
68
68
|
</div>
|
|
@@ -70,47 +70,38 @@
|
|
|
70
70
|
|
|
71
71
|
<style>
|
|
72
72
|
.form-container {
|
|
73
|
-
--primary-color: #472aff;
|
|
74
|
-
--primary-focus: rgba(149, 155, 255, 0.3);
|
|
75
|
-
--gray-4: #6b7180;
|
|
76
|
-
--gray-2: #e0e5e8;
|
|
77
|
-
--white: #fff;
|
|
78
|
-
|
|
79
73
|
display: flex;
|
|
80
74
|
flex-direction: column;
|
|
81
|
-
gap:
|
|
82
|
-
font-size: 14px;
|
|
83
|
-
line-height: 20px;
|
|
75
|
+
gap: var(--spi-size-2);
|
|
84
76
|
}
|
|
85
77
|
|
|
86
78
|
.message-description {
|
|
87
|
-
|
|
88
|
-
color: var(--gray-4);
|
|
79
|
+
color: var(--spi-color-text-muted);
|
|
89
80
|
}
|
|
90
81
|
|
|
91
82
|
.radio-group {
|
|
92
83
|
display: flex;
|
|
93
84
|
flex-direction: column;
|
|
94
|
-
gap:
|
|
85
|
+
gap: var(--spi-size-2);
|
|
95
86
|
}
|
|
96
87
|
|
|
97
88
|
.radio-group.row {
|
|
98
89
|
flex-direction: row;
|
|
99
90
|
flex-wrap: wrap;
|
|
100
|
-
gap:
|
|
91
|
+
gap: var(--spi-size-2) var(--spi-size-6);
|
|
101
92
|
}
|
|
102
93
|
|
|
103
94
|
.radio-option {
|
|
104
95
|
display: flex;
|
|
105
96
|
align-items: center;
|
|
106
|
-
gap:
|
|
97
|
+
gap: var(--spi-size-2);
|
|
107
98
|
cursor: pointer;
|
|
108
99
|
user-select: none;
|
|
109
100
|
}
|
|
110
101
|
|
|
111
102
|
.radio-option.disabled {
|
|
112
103
|
cursor: not-allowed;
|
|
113
|
-
color: var(--
|
|
104
|
+
color: var(--spi-color-text-muted);
|
|
114
105
|
}
|
|
115
106
|
|
|
116
107
|
.radio-input {
|
|
@@ -127,50 +118,45 @@
|
|
|
127
118
|
width: 18px;
|
|
128
119
|
height: 18px;
|
|
129
120
|
min-width: 18px;
|
|
130
|
-
border-radius:
|
|
131
|
-
border:
|
|
132
|
-
background: var(--
|
|
133
|
-
transition: all
|
|
121
|
+
border-radius: var(--spi-rounded-full);
|
|
122
|
+
border: var(--spi-border-2) solid var(--spi-color-border-strong);
|
|
123
|
+
background: var(--spi-color-surface-default);
|
|
124
|
+
transition: all var(--spi-duration-normal) var(--spi-ease-in-out);
|
|
134
125
|
}
|
|
135
126
|
|
|
136
127
|
.radio-indicator::after {
|
|
137
128
|
content: '';
|
|
138
|
-
width:
|
|
139
|
-
height:
|
|
140
|
-
border-radius:
|
|
129
|
+
width: var(--spi-size-2);
|
|
130
|
+
height: var(--spi-size-2);
|
|
131
|
+
border-radius: var(--spi-rounded-full);
|
|
141
132
|
background: transparent;
|
|
142
|
-
transition: background
|
|
133
|
+
transition: background var(--spi-duration-normal) var(--spi-ease-in-out);
|
|
143
134
|
}
|
|
144
135
|
|
|
145
136
|
.radio-option:not(.disabled):hover .radio-indicator {
|
|
146
|
-
border-color: var(--
|
|
137
|
+
border-color: var(--spi-color-border-focus);
|
|
147
138
|
}
|
|
148
139
|
|
|
149
140
|
.radio-input:focus-visible + .radio-indicator {
|
|
150
|
-
box-shadow:
|
|
151
|
-
border-color: var(--
|
|
141
|
+
box-shadow: var(--spi-shadow-focus-primary);
|
|
142
|
+
border-color: var(--spi-color-border-focus);
|
|
152
143
|
}
|
|
153
144
|
|
|
154
145
|
.radio-indicator.checked {
|
|
155
|
-
border-color: var(--
|
|
146
|
+
border-color: var(--spi-color-border-focus);
|
|
156
147
|
}
|
|
157
148
|
|
|
158
149
|
.radio-indicator.checked::after {
|
|
159
|
-
background: var(--primary-
|
|
150
|
+
background: var(--spi-color-primary-base);
|
|
160
151
|
}
|
|
161
152
|
|
|
162
153
|
.radio-indicator.disabled {
|
|
163
|
-
border-color: var(--
|
|
164
|
-
background: var(--
|
|
154
|
+
border-color: var(--spi-color-disabled-border);
|
|
155
|
+
background: var(--spi-color-surface-muted);
|
|
165
156
|
cursor: not-allowed;
|
|
166
157
|
}
|
|
167
158
|
|
|
168
159
|
.radio-indicator.disabled.checked::after {
|
|
169
|
-
background: var(--
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.radio-label {
|
|
173
|
-
font-size: 14px;
|
|
174
|
-
line-height: 20px;
|
|
160
|
+
background: var(--spi-color-text-muted);
|
|
175
161
|
}
|
|
176
162
|
</style>
|