@teseor/css 1.6.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.
Files changed (24) hide show
  1. package/dist/compiled.css +1 -1
  2. package/dist/index.css +8 -0
  3. package/package.json +1 -1
  4. package/src/04-components/forms/number-input/index.scss +153 -0
  5. package/src/04-components/forms/number-input/number-input-visual.png +0 -0
  6. package/src/04-components/forms/number-input/number-input.api.json +74 -0
  7. package/src/04-components/forms/number-input/number-input.docs.json +262 -0
  8. package/src/04-components/forms/number-input/number-input.visual.spec.ts +14 -0
  9. package/src/04-components/forms/password-input/index.scss +138 -0
  10. package/src/04-components/forms/password-input/password-input-visual.png +0 -0
  11. package/src/04-components/forms/password-input/password-input.api.json +84 -0
  12. package/src/04-components/forms/password-input/password-input.docs.json +276 -0
  13. package/src/04-components/forms/password-input/password-input.visual.spec.ts +14 -0
  14. package/src/04-components/index.scss +4 -0
  15. package/src/04-components/layout/scroll-area/index.scss +92 -0
  16. package/src/04-components/layout/scroll-area/scroll-area-visual.png +0 -0
  17. package/src/04-components/layout/scroll-area/scroll-area.api.json +63 -0
  18. package/src/04-components/layout/scroll-area/scroll-area.docs.json +204 -0
  19. package/src/04-components/layout/scroll-area/scroll-area.visual.spec.ts +14 -0
  20. package/src/04-components/navigation/dropdown-menu/dropdown-menu-visual.png +0 -0
  21. package/src/04-components/navigation/dropdown-menu/dropdown-menu.api.json +37 -0
  22. package/src/04-components/navigation/dropdown-menu/dropdown-menu.docs.json +272 -0
  23. package/src/04-components/navigation/dropdown-menu/dropdown-menu.visual.spec.ts +14 -0
  24. package/src/04-components/navigation/dropdown-menu/index.scss +84 -0
@@ -0,0 +1,138 @@
1
+ @use '../../../00-config/tokens/variables' as t;
2
+
3
+ // @component password-input
4
+ // @element div
5
+
6
+ @layer components.tokens {
7
+ .password-input {
8
+ --_height: var(--ui-password-input-height, var(--ui-row-2, #{t.$row-2}));
9
+ --_padding-x: var(--ui-password-input-padding-x, var(--ui-space-1, #{t.$space-1}));
10
+ --_font-size: var(--ui-password-input-font-size, var(--ui-font-size-sm, #{t.$font-size-sm}));
11
+ --_radius: var(--ui-password-input-radius, var(--ui-radius-md, #{t.$radius-md}));
12
+ --_bg: var(--ui-password-input-bg, var(--ui-color-bg, #{t.$color-bg}));
13
+ --_border-color: var(--ui-password-input-border-color, var(--ui-color-border-strong, #{t.$color-border-strong}));
14
+ --_border-color-focus: var(--ui-password-input-border-color-focus, var(--ui-color-primary, #{t.$color-primary}));
15
+ --_text: var(--ui-password-input-text, var(--ui-color-text, #{t.$color-text}));
16
+ --_placeholder: var(--ui-password-input-placeholder, var(--ui-color-text-muted, #{t.$color-text-muted}));
17
+ --_toggle-color: var(--ui-password-input-toggle-color, var(--ui-color-text-muted, #{t.$color-text-muted}));
18
+ --_toggle-hover-bg: var(--ui-password-input-toggle-hover-bg, var(--ui-color-bg-muted, #{t.$color-bg-muted}));
19
+ }
20
+
21
+ // @modifier size
22
+ .password-input--sm {
23
+ --_height: var(--ui-password-input-height-sm, calc(#{t.$row} * 1.5));
24
+ --_font-size: var(--ui-password-input-font-size-sm, var(--ui-font-size-xs, #{t.$font-size-xs}));
25
+ }
26
+
27
+ .password-input--lg {
28
+ --_height: var(--ui-password-input-height-lg, calc(#{t.$row} * 2.5));
29
+ --_padding-x: var(--ui-password-input-padding-x-lg, var(--ui-space-2, #{t.$space-2}));
30
+ --_font-size: var(--ui-password-input-font-size-lg, var(--ui-font-size-md, #{t.$font-size-md}));
31
+ }
32
+
33
+ // @modifier state
34
+ .password-input--error {
35
+ --_border-color: var(--ui-password-input-error-border, var(--ui-color-danger, #{t.$color-danger}));
36
+ --_border-color-focus: var(--ui-password-input-error-border, var(--ui-color-danger, #{t.$color-danger}));
37
+ }
38
+
39
+ .password-input--success {
40
+ --_border-color: var(--ui-password-input-success-border, var(--ui-color-success, #{t.$color-success}));
41
+ --_border-color-focus: var(--ui-password-input-success-border, var(--ui-color-success, #{t.$color-success}));
42
+ }
43
+ }
44
+
45
+ @layer components.styles {
46
+ .password-input {
47
+ display: inline-flex;
48
+ align-items: center;
49
+
50
+ block-size: var(--_height);
51
+
52
+ background: var(--_bg);
53
+ border: var(--ui-border-width-sm, #{t.$border-width-sm}) solid var(--_border-color);
54
+ border-radius: var(--_radius);
55
+
56
+ transition:
57
+ border-color var(--ui-duration-fast, 150ms) var(--ui-ease-default, ease),
58
+ box-shadow var(--ui-duration-fast, 150ms) var(--ui-ease-default, ease);
59
+
60
+ &:focus-within,
61
+ &--focus {
62
+ border-color: var(--_border-color-focus);
63
+ box-shadow: 0 0 0 var(--ui-border-width-md, #{t.$border-width-md}) var(--ui-color-focus, #{t.$color-focus});
64
+ }
65
+
66
+ &--block {
67
+ inline-size: 100%;
68
+ }
69
+
70
+ &--disabled,
71
+ &:has(.password-input__field:disabled) {
72
+ opacity: 0.5;
73
+ cursor: not-allowed;
74
+ }
75
+ }
76
+
77
+ .password-input__field {
78
+ flex: 1;
79
+
80
+ block-size: 100%;
81
+ min-inline-size: 0;
82
+ padding: 0;
83
+ padding-inline-start: var(--_padding-x);
84
+
85
+ font-family: inherit;
86
+ font-size: var(--_font-size);
87
+ line-height: 1;
88
+ color: var(--_text);
89
+
90
+ background: transparent;
91
+ border: none;
92
+ outline: none;
93
+
94
+ &::placeholder {
95
+ color: var(--_placeholder);
96
+ }
97
+ }
98
+
99
+ .password-input__toggle {
100
+ display: flex;
101
+ flex-shrink: 0;
102
+ align-items: center;
103
+ justify-content: center;
104
+
105
+ block-size: calc(var(--_height) - var(--ui-space-half, #{t.$space-0}) * 2);
106
+ inline-size: calc(var(--_height) - var(--ui-space-half, #{t.$space-0}) * 2);
107
+ margin-inline-end: calc(var(--ui-space-half, #{t.$space-0}));
108
+
109
+ color: var(--_toggle-color);
110
+
111
+ background: transparent;
112
+ border: none;
113
+ border-radius: var(--ui-radius-sm, #{t.$radius-sm});
114
+ cursor: pointer;
115
+
116
+ transition: background var(--ui-duration-fast, 150ms) var(--ui-ease-default, ease);
117
+
118
+ &:hover {
119
+ background: var(--_toggle-hover-bg);
120
+ }
121
+
122
+ &:focus-visible {
123
+ outline: 2px solid var(--ui-color-focus, #{t.$color-focus});
124
+ outline-offset: -2px;
125
+ }
126
+
127
+ svg {
128
+ block-size: var(--ui-size-md, #{t.size(md)});
129
+ inline-size: var(--ui-size-md, #{t.size(md)});
130
+
131
+ fill: none;
132
+ stroke: currentcolor;
133
+ stroke-width: 2;
134
+ stroke-linecap: round;
135
+ stroke-linejoin: round;
136
+ }
137
+ }
138
+ }
@@ -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
+ });
@@ -28,6 +28,8 @@
28
28
  @forward './forms/form-helper/index';
29
29
  @forward './forms/input/index';
30
30
  @forward './forms/label/index';
31
+ @forward './forms/number-input/index';
32
+ @forward './forms/password-input/index';
31
33
  @forward './forms/radio/index';
32
34
  @forward './forms/radio-group/index';
33
35
  @forward './forms/search-input/index';
@@ -36,8 +38,10 @@
36
38
  @forward './forms/textarea/index';
37
39
  @forward './forms/toggle/index';
38
40
  @forward './layout/divider/index';
41
+ @forward './layout/scroll-area/index';
39
42
  @forward './layout/spacer/index';
40
43
  @forward './navigation/breadcrumb/index';
44
+ @forward './navigation/dropdown-menu/index';
41
45
  @forward './navigation/menu/index';
42
46
  @forward './navigation/nav/index';
43
47
  @forward './navigation/pagination/index';
@@ -0,0 +1,92 @@
1
+ @use '../../../00-config/tokens/variables' as t;
2
+
3
+ // @component scroll-area
4
+ // @element div
5
+
6
+ @layer components.tokens {
7
+ .scroll-area {
8
+ --_max-height: var(--ui-scroll-area-max-height, calc(#{t.$row} * 10));
9
+ --_scrollbar-size: var(--ui-scroll-area-scrollbar-size, calc(#{t.$unit} * 1));
10
+ --_thumb-color: var(--ui-scroll-area-thumb-color, var(--ui-color-border-strong, #{t.$color-border-strong}));
11
+ --_thumb-hover-color: var(--ui-scroll-area-thumb-hover-color, var(--ui-color-neutral-400, #{t.$color-neutral-400}));
12
+ --_track-color: var(--ui-scroll-area-track-color, transparent);
13
+ --_thumb-radius: var(--ui-scroll-area-thumb-radius, var(--ui-radius-full, #{t.$radius-full}));
14
+ }
15
+
16
+ // @modifier size
17
+ .scroll-area--sm {
18
+ --_max-height: var(--ui-scroll-area-max-height-sm, calc(#{t.$row} * 5));
19
+ }
20
+
21
+ .scroll-area--lg {
22
+ --_max-height: var(--ui-scroll-area-max-height-lg, calc(#{t.$row} * 15));
23
+ }
24
+
25
+ .scroll-area--xl {
26
+ --_max-height: var(--ui-scroll-area-max-height-xl, calc(#{t.$row} * 20));
27
+ }
28
+
29
+ // @modifier thin scrollbar
30
+ .scroll-area--thin {
31
+ --_scrollbar-size: var(--ui-scroll-area-scrollbar-size-thin, calc(#{t.$unit} * 0.5));
32
+ }
33
+ }
34
+
35
+ @layer components.styles {
36
+ .scroll-area {
37
+ overflow: hidden;
38
+ }
39
+
40
+ .scroll-area__viewport {
41
+ max-block-size: var(--_max-height);
42
+ overflow-x: hidden;
43
+ overflow-y: auto;
44
+
45
+ // Firefox
46
+ scrollbar-width: thin;
47
+ scrollbar-color: var(--_thumb-color) var(--_track-color);
48
+ }
49
+
50
+ // WebKit scrollbar styles
51
+ .scroll-area__viewport::-webkit-scrollbar {
52
+ block-size: var(--_scrollbar-size);
53
+ inline-size: var(--_scrollbar-size);
54
+ }
55
+
56
+ .scroll-area__viewport::-webkit-scrollbar-track {
57
+ background: var(--_track-color);
58
+ }
59
+
60
+ .scroll-area__viewport::-webkit-scrollbar-thumb {
61
+ background: var(--_thumb-color);
62
+ border-radius: var(--_thumb-radius);
63
+ }
64
+
65
+ .scroll-area__viewport::-webkit-scrollbar-thumb:hover {
66
+ background: var(--_thumb-hover-color);
67
+ }
68
+
69
+ // Horizontal scrolling
70
+ .scroll-area--horizontal > .scroll-area__viewport {
71
+ max-block-size: none;
72
+ overflow-x: auto;
73
+ overflow-y: hidden;
74
+ }
75
+
76
+ // Both directions
77
+ .scroll-area--both > .scroll-area__viewport {
78
+ overflow-x: auto;
79
+ overflow-y: auto;
80
+ }
81
+
82
+ // Auto-hide: fade scrollbar until hover
83
+ .scroll-area--auto-hide > .scroll-area__viewport::-webkit-scrollbar-thumb {
84
+ background: transparent;
85
+
86
+ transition: background var(--ui-duration-fast, 150ms) var(--ui-ease-default, ease);
87
+ }
88
+
89
+ .scroll-area--auto-hide > .scroll-area__viewport:hover::-webkit-scrollbar-thumb {
90
+ background: var(--_thumb-color);
91
+ }
92
+ }