@teseor/css 1.5.0 → 1.7.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/compiled.css +1 -1
- package/dist/index.css +16 -0
- package/package.json +1 -1
- package/src/04-components/forms/checkbox-group/checkbox-group-visual.png +0 -0
- package/src/04-components/forms/checkbox-group/checkbox-group.api.json +54 -0
- package/src/04-components/forms/checkbox-group/checkbox-group.docs.json +338 -0
- package/src/04-components/forms/checkbox-group/checkbox-group.visual.spec.ts +14 -0
- package/src/04-components/forms/checkbox-group/index.scss +84 -0
- package/src/04-components/forms/number-input/index.scss +153 -0
- package/src/04-components/forms/number-input/number-input-visual.png +0 -0
- package/src/04-components/forms/number-input/number-input.api.json +74 -0
- package/src/04-components/forms/number-input/number-input.docs.json +262 -0
- package/src/04-components/forms/number-input/number-input.visual.spec.ts +14 -0
- package/src/04-components/forms/password-input/index.scss +138 -0
- package/src/04-components/forms/password-input/password-input-visual.png +0 -0
- package/src/04-components/forms/password-input/password-input.api.json +84 -0
- package/src/04-components/forms/password-input/password-input.docs.json +276 -0
- package/src/04-components/forms/password-input/password-input.visual.spec.ts +14 -0
- package/src/04-components/forms/radio-group/index.scss +84 -0
- package/src/04-components/forms/radio-group/radio-group-visual.png +0 -0
- package/src/04-components/forms/radio-group/radio-group.api.json +54 -0
- package/src/04-components/forms/radio-group/radio-group.docs.json +350 -0
- package/src/04-components/forms/radio-group/radio-group.visual.spec.ts +14 -0
- package/src/04-components/forms/search-input/index.scss +172 -0
- package/src/04-components/forms/search-input/search-input-visual.png +0 -0
- package/src/04-components/forms/search-input/search-input.api.json +85 -0
- package/src/04-components/forms/search-input/search-input.docs.json +257 -0
- package/src/04-components/forms/search-input/search-input.visual.spec.ts +14 -0
- package/src/04-components/forms/slider/index.scss +153 -0
- package/src/04-components/forms/slider/slider-visual.png +0 -0
- package/src/04-components/forms/slider/slider.api.json +70 -0
- package/src/04-components/forms/slider/slider.docs.json +144 -0
- package/src/04-components/forms/slider/slider.visual.spec.ts +14 -0
- package/src/04-components/index.scss +8 -0
- package/src/04-components/layout/scroll-area/index.scss +92 -0
- package/src/04-components/layout/scroll-area/scroll-area-visual.png +0 -0
- package/src/04-components/layout/scroll-area/scroll-area.api.json +63 -0
- package/src/04-components/layout/scroll-area/scroll-area.docs.json +204 -0
- package/src/04-components/layout/scroll-area/scroll-area.visual.spec.ts +14 -0
- package/src/04-components/navigation/dropdown-menu/dropdown-menu-visual.png +0 -0
- package/src/04-components/navigation/dropdown-menu/dropdown-menu.api.json +37 -0
- package/src/04-components/navigation/dropdown-menu/dropdown-menu.docs.json +272 -0
- package/src/04-components/navigation/dropdown-menu/dropdown-menu.visual.spec.ts +14 -0
- package/src/04-components/navigation/dropdown-menu/index.scss +84 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "password-input",
|
|
3
|
+
"element": "div",
|
|
4
|
+
"modifiers": {
|
|
5
|
+
"size": {
|
|
6
|
+
"values": ["sm", "lg"]
|
|
7
|
+
},
|
|
8
|
+
"state": {
|
|
9
|
+
"values": ["error", "success"]
|
|
10
|
+
},
|
|
11
|
+
"block": {
|
|
12
|
+
"type": "boolean"
|
|
13
|
+
},
|
|
14
|
+
"disabled": {
|
|
15
|
+
"type": "boolean"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"elements": {
|
|
19
|
+
"field": {},
|
|
20
|
+
"toggle": {}
|
|
21
|
+
},
|
|
22
|
+
"cssVars": [
|
|
23
|
+
{
|
|
24
|
+
"name": "--ui-password-input-height",
|
|
25
|
+
"default": "var(--ui-row-2)"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "--ui-password-input-height-sm",
|
|
29
|
+
"default": "calc(var(--ui-row) * 1.5)"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "--ui-password-input-height-lg",
|
|
33
|
+
"default": "calc(var(--ui-row) * 2.5)"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "--ui-password-input-padding-x",
|
|
37
|
+
"default": "var(--ui-space-1)"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "--ui-password-input-font-size",
|
|
41
|
+
"default": "var(--ui-font-size-sm)"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "--ui-password-input-radius",
|
|
45
|
+
"default": "var(--ui-radius-md)"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "--ui-password-input-bg",
|
|
49
|
+
"default": "var(--ui-color-bg)"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "--ui-password-input-border-color",
|
|
53
|
+
"default": "var(--ui-color-border-strong)"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "--ui-password-input-border-color-focus",
|
|
57
|
+
"default": "var(--ui-color-primary)"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "--ui-password-input-text",
|
|
61
|
+
"default": "var(--ui-color-text)"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "--ui-password-input-placeholder",
|
|
65
|
+
"default": "var(--ui-color-text-muted)"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "--ui-password-input-error-border",
|
|
69
|
+
"default": "var(--ui-color-danger)"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "--ui-password-input-success-border",
|
|
73
|
+
"default": "var(--ui-color-success)"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "--ui-password-input-toggle-color",
|
|
77
|
+
"default": "var(--ui-color-text-muted)"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "--ui-password-input-toggle-hover-bg",
|
|
81
|
+
"default": "var(--ui-color-bg-muted)"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "password-input",
|
|
3
|
+
"type": "component",
|
|
4
|
+
"title": "Password Input",
|
|
5
|
+
"description": "Secure password field with toggle visibility button.",
|
|
6
|
+
"api": "./password-input.api.json",
|
|
7
|
+
"sections": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Default",
|
|
10
|
+
"examples": [
|
|
11
|
+
{
|
|
12
|
+
"items": [
|
|
13
|
+
{
|
|
14
|
+
"tag": "div",
|
|
15
|
+
"class": "ui-password-input",
|
|
16
|
+
"children": [
|
|
17
|
+
{
|
|
18
|
+
"tag": "input",
|
|
19
|
+
"class": "ui-password-input__field",
|
|
20
|
+
"attrs": { "type": "password", "placeholder": "Enter password" }
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"tag": "button",
|
|
24
|
+
"class": "ui-password-input__toggle",
|
|
25
|
+
"attrs": { "type": "button", "aria-label": "Show password" },
|
|
26
|
+
"children": [
|
|
27
|
+
{
|
|
28
|
+
"tag": "svg",
|
|
29
|
+
"attrs": { "viewBox": "0 0 24 24" },
|
|
30
|
+
"children": [
|
|
31
|
+
{
|
|
32
|
+
"tag": "path",
|
|
33
|
+
"attrs": { "d": "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }
|
|
34
|
+
},
|
|
35
|
+
{ "tag": "circle", "attrs": { "cx": "12", "cy": "12", "r": "3" } }
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"code": "<div class=\"ui-password-input\">\n <input class=\"ui-password-input__field\" type=\"password\" placeholder=\"Enter password\">\n <button class=\"ui-password-input__toggle\" aria-label=\"Show password\"><svg>...</svg></button>\n</div>"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"title": "Sizes",
|
|
49
|
+
"examples": [
|
|
50
|
+
{
|
|
51
|
+
"layout": "stack",
|
|
52
|
+
"items": [
|
|
53
|
+
{
|
|
54
|
+
"tag": "div",
|
|
55
|
+
"class": "ui-password-input ui-password-input--sm",
|
|
56
|
+
"children": [
|
|
57
|
+
{
|
|
58
|
+
"tag": "input",
|
|
59
|
+
"class": "ui-password-input__field",
|
|
60
|
+
"attrs": { "type": "password", "placeholder": "Small" }
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"tag": "button",
|
|
64
|
+
"class": "ui-password-input__toggle",
|
|
65
|
+
"attrs": { "type": "button", "aria-label": "Show password" },
|
|
66
|
+
"children": [
|
|
67
|
+
{
|
|
68
|
+
"tag": "svg",
|
|
69
|
+
"attrs": { "viewBox": "0 0 24 24" },
|
|
70
|
+
"children": [
|
|
71
|
+
{
|
|
72
|
+
"tag": "path",
|
|
73
|
+
"attrs": { "d": "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }
|
|
74
|
+
},
|
|
75
|
+
{ "tag": "circle", "attrs": { "cx": "12", "cy": "12", "r": "3" } }
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"tag": "div",
|
|
84
|
+
"class": "ui-password-input",
|
|
85
|
+
"children": [
|
|
86
|
+
{
|
|
87
|
+
"tag": "input",
|
|
88
|
+
"class": "ui-password-input__field",
|
|
89
|
+
"attrs": { "type": "password", "placeholder": "Default" }
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"tag": "button",
|
|
93
|
+
"class": "ui-password-input__toggle",
|
|
94
|
+
"attrs": { "type": "button", "aria-label": "Show password" },
|
|
95
|
+
"children": [
|
|
96
|
+
{
|
|
97
|
+
"tag": "svg",
|
|
98
|
+
"attrs": { "viewBox": "0 0 24 24" },
|
|
99
|
+
"children": [
|
|
100
|
+
{
|
|
101
|
+
"tag": "path",
|
|
102
|
+
"attrs": { "d": "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }
|
|
103
|
+
},
|
|
104
|
+
{ "tag": "circle", "attrs": { "cx": "12", "cy": "12", "r": "3" } }
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"tag": "div",
|
|
113
|
+
"class": "ui-password-input ui-password-input--lg",
|
|
114
|
+
"children": [
|
|
115
|
+
{
|
|
116
|
+
"tag": "input",
|
|
117
|
+
"class": "ui-password-input__field",
|
|
118
|
+
"attrs": { "type": "password", "placeholder": "Large" }
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"tag": "button",
|
|
122
|
+
"class": "ui-password-input__toggle",
|
|
123
|
+
"attrs": { "type": "button", "aria-label": "Show password" },
|
|
124
|
+
"children": [
|
|
125
|
+
{
|
|
126
|
+
"tag": "svg",
|
|
127
|
+
"attrs": { "viewBox": "0 0 24 24" },
|
|
128
|
+
"children": [
|
|
129
|
+
{
|
|
130
|
+
"tag": "path",
|
|
131
|
+
"attrs": { "d": "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }
|
|
132
|
+
},
|
|
133
|
+
{ "tag": "circle", "attrs": { "cx": "12", "cy": "12", "r": "3" } }
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"code": "<div class=\"ui-password-input ui-password-input--sm\">...</div>\n<div class=\"ui-password-input\">...</div>\n<div class=\"ui-password-input ui-password-input--lg\">...</div>"
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"title": "States",
|
|
147
|
+
"examples": [
|
|
148
|
+
{
|
|
149
|
+
"layout": "stack",
|
|
150
|
+
"items": [
|
|
151
|
+
{
|
|
152
|
+
"tag": "div",
|
|
153
|
+
"class": "ui-password-input ui-password-input--error",
|
|
154
|
+
"children": [
|
|
155
|
+
{
|
|
156
|
+
"tag": "input",
|
|
157
|
+
"class": "ui-password-input__field",
|
|
158
|
+
"attrs": { "type": "password", "value": "wrongpass" }
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"tag": "button",
|
|
162
|
+
"class": "ui-password-input__toggle",
|
|
163
|
+
"attrs": { "type": "button", "aria-label": "Show password" },
|
|
164
|
+
"children": [
|
|
165
|
+
{
|
|
166
|
+
"tag": "svg",
|
|
167
|
+
"attrs": { "viewBox": "0 0 24 24" },
|
|
168
|
+
"children": [
|
|
169
|
+
{
|
|
170
|
+
"tag": "path",
|
|
171
|
+
"attrs": { "d": "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }
|
|
172
|
+
},
|
|
173
|
+
{ "tag": "circle", "attrs": { "cx": "12", "cy": "12", "r": "3" } }
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"tag": "div",
|
|
182
|
+
"class": "ui-password-input ui-password-input--success",
|
|
183
|
+
"children": [
|
|
184
|
+
{
|
|
185
|
+
"tag": "input",
|
|
186
|
+
"class": "ui-password-input__field",
|
|
187
|
+
"attrs": { "type": "password", "value": "correctpass" }
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"tag": "button",
|
|
191
|
+
"class": "ui-password-input__toggle",
|
|
192
|
+
"attrs": { "type": "button", "aria-label": "Show password" },
|
|
193
|
+
"children": [
|
|
194
|
+
{
|
|
195
|
+
"tag": "svg",
|
|
196
|
+
"attrs": { "viewBox": "0 0 24 24" },
|
|
197
|
+
"children": [
|
|
198
|
+
{
|
|
199
|
+
"tag": "path",
|
|
200
|
+
"attrs": { "d": "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }
|
|
201
|
+
},
|
|
202
|
+
{ "tag": "circle", "attrs": { "cx": "12", "cy": "12", "r": "3" } }
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"tag": "div",
|
|
211
|
+
"class": "ui-password-input ui-password-input--disabled",
|
|
212
|
+
"children": [
|
|
213
|
+
{
|
|
214
|
+
"tag": "input",
|
|
215
|
+
"class": "ui-password-input__field",
|
|
216
|
+
"attrs": { "type": "password", "placeholder": "Disabled", "disabled": "" }
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"tag": "button",
|
|
220
|
+
"class": "ui-password-input__toggle",
|
|
221
|
+
"attrs": { "type": "button", "aria-label": "Show password", "disabled": "" },
|
|
222
|
+
"children": [
|
|
223
|
+
{
|
|
224
|
+
"tag": "svg",
|
|
225
|
+
"attrs": { "viewBox": "0 0 24 24" },
|
|
226
|
+
"children": [
|
|
227
|
+
{
|
|
228
|
+
"tag": "path",
|
|
229
|
+
"attrs": { "d": "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }
|
|
230
|
+
},
|
|
231
|
+
{ "tag": "circle", "attrs": { "cx": "12", "cy": "12", "r": "3" } }
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
"code": "<div class=\"ui-password-input ui-password-input--error\">...</div>\n<div class=\"ui-password-input ui-password-input--success\">...</div>\n<div class=\"ui-password-input ui-password-input--disabled\">...</div>"
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
"customization": [
|
|
245
|
+
{
|
|
246
|
+
"token": "--ui-password-input-height",
|
|
247
|
+
"default": "var(--ui-row-2)",
|
|
248
|
+
"description": "Default height"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"token": "--ui-password-input-height-sm",
|
|
252
|
+
"default": "calc(var(--ui-row) * 1.5)",
|
|
253
|
+
"description": "Small height"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"token": "--ui-password-input-height-lg",
|
|
257
|
+
"default": "calc(var(--ui-row) * 2.5)",
|
|
258
|
+
"description": "Large height"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"token": "--ui-password-input-bg",
|
|
262
|
+
"default": "var(--ui-color-bg)",
|
|
263
|
+
"description": "Background color"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"token": "--ui-password-input-border-color",
|
|
267
|
+
"default": "var(--ui-color-border-strong)",
|
|
268
|
+
"description": "Border color"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"token": "--ui-password-input-toggle-color",
|
|
272
|
+
"default": "var(--ui-color-text-muted)",
|
|
273
|
+
"description": "Toggle button color"
|
|
274
|
+
}
|
|
275
|
+
]
|
|
276
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { resolve } from 'node:path';
|
|
2
|
+
import { expect, test } from '@playwright/test';
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
|
|
4
|
+
|
|
5
|
+
const DOCS_PATH = resolve(__dirname, 'password-input.docs.json');
|
|
6
|
+
|
|
7
|
+
test.describe('password-input visual regression', () => {
|
|
8
|
+
test('all variations', async ({ page }) => {
|
|
9
|
+
await setupVisualTestFromDocs(page, DOCS_PATH);
|
|
10
|
+
await validateGridRhythm(page, 'password-input');
|
|
11
|
+
await saveForLostPixel(page, 'password-input');
|
|
12
|
+
await expect(page.locator('body')).toHaveScreenshot('password-input-visual.png');
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@use '../../../00-config/tokens/variables' as t;
|
|
2
|
+
|
|
3
|
+
// @component radio-group
|
|
4
|
+
// @element fieldset
|
|
5
|
+
|
|
6
|
+
@layer components.tokens {
|
|
7
|
+
.radio-group {
|
|
8
|
+
--_spacing: var(--ui-radio-group-spacing, var(--ui-space-1, #{t.$space-1}));
|
|
9
|
+
--_legend-size: var(--ui-radio-group-legend-size, var(--ui-font-size-sm, #{t.$font-size-sm}));
|
|
10
|
+
--_legend-weight: var(--ui-radio-group-legend-weight, var(--ui-weight-medium, #{t.$weight-medium}));
|
|
11
|
+
--_legend-color: var(--ui-radio-group-legend-color, var(--ui-color-text, #{t.$color-text}));
|
|
12
|
+
--_legend-spacing: var(--ui-radio-group-legend-spacing, var(--ui-space-1, #{t.$space-1}));
|
|
13
|
+
--_item-gap: var(--ui-radio-group-item-gap, var(--ui-space-1, #{t.$space-1}));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.radio-group--compact {
|
|
17
|
+
--_spacing: var(--ui-radio-group-spacing-compact, 0);
|
|
18
|
+
--_legend-spacing: var(--ui-radio-group-legend-spacing-compact, 0);
|
|
19
|
+
--_item-gap: var(--ui-radio-group-item-gap-compact, 0);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// @modifier state
|
|
23
|
+
.radio-group--error {
|
|
24
|
+
--_legend-color: var(--ui-radio-group-error-color, var(--ui-color-danger, #{t.$color-danger}));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@layer components.styles {
|
|
29
|
+
.radio-group {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
gap: var(--_legend-spacing);
|
|
33
|
+
|
|
34
|
+
min-inline-size: 0;
|
|
35
|
+
padding: 0;
|
|
36
|
+
margin: 0;
|
|
37
|
+
|
|
38
|
+
border: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.radio-group__legend {
|
|
42
|
+
padding: 0;
|
|
43
|
+
|
|
44
|
+
font-size: var(--_legend-size);
|
|
45
|
+
font-weight: var(--_legend-weight);
|
|
46
|
+
line-height: var(--ui-leading-tight-sm, var(--ui-row-1, #{t.$leading-tight-sm}));
|
|
47
|
+
color: var(--_legend-color);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.radio-group__items {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
gap: var(--_spacing);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.radio-group__item {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
gap: var(--_item-gap);
|
|
60
|
+
|
|
61
|
+
line-height: var(--ui-row-1, #{t.$row-1});
|
|
62
|
+
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.radio-group__item:has(:disabled) {
|
|
67
|
+
opacity: 0.5;
|
|
68
|
+
cursor: not-allowed;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Horizontal layout
|
|
72
|
+
.radio-group--horizontal > .radio-group__items {
|
|
73
|
+
flex-direction: row;
|
|
74
|
+
flex-wrap: wrap;
|
|
75
|
+
gap: var(--ui-space-2, #{t.$space-2});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Disabled group
|
|
79
|
+
.radio-group:disabled,
|
|
80
|
+
.radio-group[aria-disabled='true'] {
|
|
81
|
+
opacity: 0.5;
|
|
82
|
+
cursor: not-allowed;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "radio-group",
|
|
3
|
+
"element": "fieldset",
|
|
4
|
+
"modifiers": {
|
|
5
|
+
"horizontal": {
|
|
6
|
+
"type": "boolean"
|
|
7
|
+
},
|
|
8
|
+
"compact": {
|
|
9
|
+
"type": "boolean"
|
|
10
|
+
},
|
|
11
|
+
"error": {
|
|
12
|
+
"type": "boolean"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"elements": {
|
|
16
|
+
"legend": {},
|
|
17
|
+
"items": {},
|
|
18
|
+
"item": {}
|
|
19
|
+
},
|
|
20
|
+
"cssVars": [
|
|
21
|
+
{
|
|
22
|
+
"name": "--ui-radio-group-spacing",
|
|
23
|
+
"default": "var(--ui-space-1)"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "--ui-radio-group-spacing-compact",
|
|
27
|
+
"default": "0"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "--ui-radio-group-legend-size",
|
|
31
|
+
"default": "var(--ui-font-size-sm)"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "--ui-radio-group-legend-weight",
|
|
35
|
+
"default": "var(--ui-weight-medium)"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "--ui-radio-group-legend-color",
|
|
39
|
+
"default": "var(--ui-color-text)"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "--ui-radio-group-legend-spacing",
|
|
43
|
+
"default": "var(--ui-space-1)"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "--ui-radio-group-item-gap",
|
|
47
|
+
"default": "var(--ui-space-1)"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "--ui-radio-group-error-color",
|
|
51
|
+
"default": "var(--ui-color-danger)"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|