@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.
Files changed (44) hide show
  1. package/dist/compiled.css +1 -1
  2. package/dist/index.css +16 -0
  3. package/package.json +1 -1
  4. package/src/04-components/forms/checkbox-group/checkbox-group-visual.png +0 -0
  5. package/src/04-components/forms/checkbox-group/checkbox-group.api.json +54 -0
  6. package/src/04-components/forms/checkbox-group/checkbox-group.docs.json +338 -0
  7. package/src/04-components/forms/checkbox-group/checkbox-group.visual.spec.ts +14 -0
  8. package/src/04-components/forms/checkbox-group/index.scss +84 -0
  9. package/src/04-components/forms/number-input/index.scss +153 -0
  10. package/src/04-components/forms/number-input/number-input-visual.png +0 -0
  11. package/src/04-components/forms/number-input/number-input.api.json +74 -0
  12. package/src/04-components/forms/number-input/number-input.docs.json +262 -0
  13. package/src/04-components/forms/number-input/number-input.visual.spec.ts +14 -0
  14. package/src/04-components/forms/password-input/index.scss +138 -0
  15. package/src/04-components/forms/password-input/password-input-visual.png +0 -0
  16. package/src/04-components/forms/password-input/password-input.api.json +84 -0
  17. package/src/04-components/forms/password-input/password-input.docs.json +276 -0
  18. package/src/04-components/forms/password-input/password-input.visual.spec.ts +14 -0
  19. package/src/04-components/forms/radio-group/index.scss +84 -0
  20. package/src/04-components/forms/radio-group/radio-group-visual.png +0 -0
  21. package/src/04-components/forms/radio-group/radio-group.api.json +54 -0
  22. package/src/04-components/forms/radio-group/radio-group.docs.json +350 -0
  23. package/src/04-components/forms/radio-group/radio-group.visual.spec.ts +14 -0
  24. package/src/04-components/forms/search-input/index.scss +172 -0
  25. package/src/04-components/forms/search-input/search-input-visual.png +0 -0
  26. package/src/04-components/forms/search-input/search-input.api.json +85 -0
  27. package/src/04-components/forms/search-input/search-input.docs.json +257 -0
  28. package/src/04-components/forms/search-input/search-input.visual.spec.ts +14 -0
  29. package/src/04-components/forms/slider/index.scss +153 -0
  30. package/src/04-components/forms/slider/slider-visual.png +0 -0
  31. package/src/04-components/forms/slider/slider.api.json +70 -0
  32. package/src/04-components/forms/slider/slider.docs.json +144 -0
  33. package/src/04-components/forms/slider/slider.visual.spec.ts +14 -0
  34. package/src/04-components/index.scss +8 -0
  35. package/src/04-components/layout/scroll-area/index.scss +92 -0
  36. package/src/04-components/layout/scroll-area/scroll-area-visual.png +0 -0
  37. package/src/04-components/layout/scroll-area/scroll-area.api.json +63 -0
  38. package/src/04-components/layout/scroll-area/scroll-area.docs.json +204 -0
  39. package/src/04-components/layout/scroll-area/scroll-area.visual.spec.ts +14 -0
  40. package/src/04-components/navigation/dropdown-menu/dropdown-menu-visual.png +0 -0
  41. package/src/04-components/navigation/dropdown-menu/dropdown-menu.api.json +37 -0
  42. package/src/04-components/navigation/dropdown-menu/dropdown-menu.docs.json +272 -0
  43. package/src/04-components/navigation/dropdown-menu/dropdown-menu.visual.spec.ts +14 -0
  44. package/src/04-components/navigation/dropdown-menu/index.scss +84 -0
@@ -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
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "scroll-area",
3
+ "element": "div",
4
+ "modifiers": {
5
+ "size": {
6
+ "values": ["sm", "lg", "xl"]
7
+ },
8
+ "direction": {
9
+ "values": ["horizontal", "both"]
10
+ },
11
+ "thin": {
12
+ "type": "boolean"
13
+ },
14
+ "auto-hide": {
15
+ "type": "boolean"
16
+ }
17
+ },
18
+ "elements": {
19
+ "viewport": {}
20
+ },
21
+ "cssVars": [
22
+ {
23
+ "name": "--ui-scroll-area-max-height",
24
+ "default": "calc(var(--ui-row) * 10)"
25
+ },
26
+ {
27
+ "name": "--ui-scroll-area-max-height-sm",
28
+ "default": "calc(var(--ui-row) * 5)"
29
+ },
30
+ {
31
+ "name": "--ui-scroll-area-max-height-lg",
32
+ "default": "calc(var(--ui-row) * 15)"
33
+ },
34
+ {
35
+ "name": "--ui-scroll-area-max-height-xl",
36
+ "default": "calc(var(--ui-row) * 20)"
37
+ },
38
+ {
39
+ "name": "--ui-scroll-area-scrollbar-size",
40
+ "default": "var(--ui-space-1)"
41
+ },
42
+ {
43
+ "name": "--ui-scroll-area-scrollbar-size-thin",
44
+ "default": "calc(var(--ui-space-1) * 0.5)"
45
+ },
46
+ {
47
+ "name": "--ui-scroll-area-thumb-color",
48
+ "default": "var(--ui-color-border-strong)"
49
+ },
50
+ {
51
+ "name": "--ui-scroll-area-thumb-hover-color",
52
+ "default": "var(--ui-color-neutral-400)"
53
+ },
54
+ {
55
+ "name": "--ui-scroll-area-track-color",
56
+ "default": "transparent"
57
+ },
58
+ {
59
+ "name": "--ui-scroll-area-thumb-radius",
60
+ "default": "var(--ui-radius-full)"
61
+ }
62
+ ]
63
+ }
@@ -0,0 +1,204 @@
1
+ {
2
+ "id": "scroll-area",
3
+ "type": "component",
4
+ "title": "Scroll Area",
5
+ "description": "Scrollable container with styled scrollbar. Provides overflow control and custom scrollbar styling.",
6
+ "api": "./scroll-area.api.json",
7
+ "sections": [
8
+ {
9
+ "title": "Default",
10
+ "examples": [
11
+ {
12
+ "items": [
13
+ {
14
+ "tag": "div",
15
+ "class": "ui-scroll-area",
16
+ "children": [
17
+ {
18
+ "tag": "div",
19
+ "class": "ui-scroll-area__viewport",
20
+ "children": [
21
+ { "tag": "p", "text": "Line 1 of scrollable content" },
22
+ { "tag": "p", "text": "Line 2 of scrollable content" },
23
+ { "tag": "p", "text": "Line 3 of scrollable content" },
24
+ { "tag": "p", "text": "Line 4 of scrollable content" },
25
+ { "tag": "p", "text": "Line 5 of scrollable content" },
26
+ { "tag": "p", "text": "Line 6 of scrollable content" },
27
+ { "tag": "p", "text": "Line 7 of scrollable content" },
28
+ { "tag": "p", "text": "Line 8 of scrollable content" },
29
+ { "tag": "p", "text": "Line 9 of scrollable content" },
30
+ { "tag": "p", "text": "Line 10 of scrollable content" },
31
+ { "tag": "p", "text": "Line 11 of scrollable content" },
32
+ { "tag": "p", "text": "Line 12 of scrollable content" },
33
+ { "tag": "p", "text": "Line 13 of scrollable content" },
34
+ { "tag": "p", "text": "Line 14 of scrollable content" },
35
+ { "tag": "p", "text": "Line 15 of scrollable content" }
36
+ ]
37
+ }
38
+ ]
39
+ }
40
+ ],
41
+ "code": "<div class=\"ui-scroll-area\">\n <div class=\"ui-scroll-area__viewport\">\n Content...\n </div>\n</div>"
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "title": "Sizes",
47
+ "examples": [
48
+ {
49
+ "layout": "stack",
50
+ "items": [
51
+ {
52
+ "tag": "div",
53
+ "class": "ui-scroll-area ui-scroll-area--sm",
54
+ "children": [
55
+ {
56
+ "tag": "div",
57
+ "class": "ui-scroll-area__viewport",
58
+ "children": [
59
+ { "tag": "p", "text": "Small - Line 1" },
60
+ { "tag": "p", "text": "Small - Line 2" },
61
+ { "tag": "p", "text": "Small - Line 3" },
62
+ { "tag": "p", "text": "Small - Line 4" },
63
+ { "tag": "p", "text": "Small - Line 5" },
64
+ { "tag": "p", "text": "Small - Line 6" },
65
+ { "tag": "p", "text": "Small - Line 7" },
66
+ { "tag": "p", "text": "Small - Line 8" }
67
+ ]
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ "tag": "div",
73
+ "class": "ui-scroll-area ui-scroll-area--lg",
74
+ "children": [
75
+ {
76
+ "tag": "div",
77
+ "class": "ui-scroll-area__viewport",
78
+ "children": [
79
+ { "tag": "p", "text": "Large - Line 1" },
80
+ { "tag": "p", "text": "Large - Line 2" },
81
+ { "tag": "p", "text": "Large - Line 3" },
82
+ { "tag": "p", "text": "Large - Line 4" },
83
+ { "tag": "p", "text": "Large - Line 5" },
84
+ { "tag": "p", "text": "Large - Line 6" },
85
+ { "tag": "p", "text": "Large - Line 7" },
86
+ { "tag": "p", "text": "Large - Line 8" },
87
+ { "tag": "p", "text": "Large - Line 9" },
88
+ { "tag": "p", "text": "Large - Line 10" },
89
+ { "tag": "p", "text": "Large - Line 11" },
90
+ { "tag": "p", "text": "Large - Line 12" },
91
+ { "tag": "p", "text": "Large - Line 13" },
92
+ { "tag": "p", "text": "Large - Line 14" },
93
+ { "tag": "p", "text": "Large - Line 15" },
94
+ { "tag": "p", "text": "Large - Line 16" },
95
+ { "tag": "p", "text": "Large - Line 17" },
96
+ { "tag": "p", "text": "Large - Line 18" },
97
+ { "tag": "p", "text": "Large - Line 19" },
98
+ { "tag": "p", "text": "Large - Line 20" }
99
+ ]
100
+ }
101
+ ]
102
+ }
103
+ ],
104
+ "code": "<div class=\"ui-scroll-area ui-scroll-area--sm\">...</div>\n<div class=\"ui-scroll-area ui-scroll-area--lg\">...</div>"
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ "title": "Thin Scrollbar",
110
+ "examples": [
111
+ {
112
+ "items": [
113
+ {
114
+ "tag": "div",
115
+ "class": "ui-scroll-area ui-scroll-area--thin",
116
+ "children": [
117
+ {
118
+ "tag": "div",
119
+ "class": "ui-scroll-area__viewport",
120
+ "children": [
121
+ { "tag": "p", "text": "Thin scrollbar - Line 1" },
122
+ { "tag": "p", "text": "Thin scrollbar - Line 2" },
123
+ { "tag": "p", "text": "Thin scrollbar - Line 3" },
124
+ { "tag": "p", "text": "Thin scrollbar - Line 4" },
125
+ { "tag": "p", "text": "Thin scrollbar - Line 5" },
126
+ { "tag": "p", "text": "Thin scrollbar - Line 6" },
127
+ { "tag": "p", "text": "Thin scrollbar - Line 7" },
128
+ { "tag": "p", "text": "Thin scrollbar - Line 8" },
129
+ { "tag": "p", "text": "Thin scrollbar - Line 9" },
130
+ { "tag": "p", "text": "Thin scrollbar - Line 10" },
131
+ { "tag": "p", "text": "Thin scrollbar - Line 11" },
132
+ { "tag": "p", "text": "Thin scrollbar - Line 12" }
133
+ ]
134
+ }
135
+ ]
136
+ }
137
+ ],
138
+ "code": "<div class=\"ui-scroll-area ui-scroll-area--thin\">...</div>"
139
+ }
140
+ ]
141
+ },
142
+ {
143
+ "title": "Auto-Hide",
144
+ "examples": [
145
+ {
146
+ "items": [
147
+ {
148
+ "tag": "div",
149
+ "class": "ui-scroll-area ui-scroll-area--auto-hide",
150
+ "children": [
151
+ {
152
+ "tag": "div",
153
+ "class": "ui-scroll-area__viewport",
154
+ "children": [
155
+ { "tag": "p", "text": "Scrollbar hidden until hover - Line 1" },
156
+ { "tag": "p", "text": "Scrollbar hidden until hover - Line 2" },
157
+ { "tag": "p", "text": "Scrollbar hidden until hover - Line 3" },
158
+ { "tag": "p", "text": "Scrollbar hidden until hover - Line 4" },
159
+ { "tag": "p", "text": "Scrollbar hidden until hover - Line 5" },
160
+ { "tag": "p", "text": "Scrollbar hidden until hover - Line 6" },
161
+ { "tag": "p", "text": "Scrollbar hidden until hover - Line 7" },
162
+ { "tag": "p", "text": "Scrollbar hidden until hover - Line 8" },
163
+ { "tag": "p", "text": "Scrollbar hidden until hover - Line 9" },
164
+ { "tag": "p", "text": "Scrollbar hidden until hover - Line 10" },
165
+ { "tag": "p", "text": "Scrollbar hidden until hover - Line 11" },
166
+ { "tag": "p", "text": "Scrollbar hidden until hover - Line 12" }
167
+ ]
168
+ }
169
+ ]
170
+ }
171
+ ],
172
+ "code": "<div class=\"ui-scroll-area ui-scroll-area--auto-hide\">...</div>"
173
+ }
174
+ ]
175
+ }
176
+ ],
177
+ "customization": [
178
+ {
179
+ "token": "--ui-scroll-area-max-height",
180
+ "default": "calc(var(--ui-row) * 10)",
181
+ "description": "Default max height"
182
+ },
183
+ {
184
+ "token": "--ui-scroll-area-scrollbar-size",
185
+ "default": "var(--ui-space-1)",
186
+ "description": "Scrollbar width"
187
+ },
188
+ {
189
+ "token": "--ui-scroll-area-thumb-color",
190
+ "default": "var(--ui-color-border-strong)",
191
+ "description": "Scrollbar thumb color"
192
+ },
193
+ {
194
+ "token": "--ui-scroll-area-thumb-hover-color",
195
+ "default": "var(--ui-color-neutral-400)",
196
+ "description": "Scrollbar thumb hover color"
197
+ },
198
+ {
199
+ "token": "--ui-scroll-area-track-color",
200
+ "default": "transparent",
201
+ "description": "Scrollbar track background"
202
+ }
203
+ ]
204
+ }
@@ -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, 'scroll-area.docs.json');
6
+
7
+ test.describe('scroll-area visual regression', () => {
8
+ test('all variations', async ({ page }) => {
9
+ await setupVisualTestFromDocs(page, DOCS_PATH);
10
+ await validateGridRhythm(page, 'scroll-area');
11
+ await saveForLostPixel(page, 'scroll-area');
12
+ await expect(page.locator('body')).toHaveScreenshot('scroll-area-visual.png');
13
+ });
14
+ });
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "dropdown-menu",
3
+ "element": "div",
4
+ "modifiers": {
5
+ "open": {
6
+ "type": "boolean"
7
+ },
8
+ "top": {
9
+ "type": "boolean"
10
+ },
11
+ "align-end": {
12
+ "type": "boolean"
13
+ },
14
+ "full-width": {
15
+ "type": "boolean"
16
+ }
17
+ },
18
+ "elements": {
19
+ "trigger": {},
20
+ "trigger-icon": {},
21
+ "panel": {}
22
+ },
23
+ "cssVars": [
24
+ {
25
+ "name": "--ui-dropdown-menu-z",
26
+ "default": "200"
27
+ },
28
+ {
29
+ "name": "--ui-dropdown-menu-panel-offset",
30
+ "default": "var(--ui-space-1)"
31
+ },
32
+ {
33
+ "name": "--ui-dropdown-menu-panel-min-width",
34
+ "default": "auto"
35
+ }
36
+ ]
37
+ }