@volverjs/style 0.0.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 (104) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +139 -0
  3. package/package.json +158 -0
  4. package/src/_config.scss +32 -0
  5. package/src/_context.scss +11 -0
  6. package/src/assets/24consulting.svg +63 -0
  7. package/src/assets/volverjs.svg +15 -0
  8. package/src/components/index.scss +17 -0
  9. package/src/components/vv-badge.scss +12 -0
  10. package/src/components/vv-button-group.scss +115 -0
  11. package/src/components/vv-button.scss +57 -0
  12. package/src/components/vv-card.scss +12 -0
  13. package/src/components/vv-collapse.scss +12 -0
  14. package/src/components/vv-dialog.scss +12 -0
  15. package/src/components/vv-dropdown.scss +12 -0
  16. package/src/components/vv-input-checkbox-group.scss +12 -0
  17. package/src/components/vv-input-checkbox.scss +28 -0
  18. package/src/components/vv-input-radio-group.scss +12 -0
  19. package/src/components/vv-input-radio.scss +20 -0
  20. package/src/components/vv-input-text.scss +49 -0
  21. package/src/components/vv-progress.scss +12 -0
  22. package/src/components/vv-select.scss +49 -0
  23. package/src/components/vv-table.scss +12 -0
  24. package/src/components/vv-text.scss +12 -0
  25. package/src/components/vv-textarea.scss +49 -0
  26. package/src/export.scss +411 -0
  27. package/src/preflight.scss +281 -0
  28. package/src/props/animation.scss +80 -0
  29. package/src/props/background.scss +5 -0
  30. package/src/props/borders.scss +6 -0
  31. package/src/props/colors.scss +5 -0
  32. package/src/props/effects.scss +5 -0
  33. package/src/props/filters.scss +6 -0
  34. package/src/props/index.scss +12 -0
  35. package/src/props/input.scss +5 -0
  36. package/src/props/layout.scss +6 -0
  37. package/src/props/media.scss +49 -0
  38. package/src/props/sizing.scss +6 -0
  39. package/src/props/spacing.scss +27 -0
  40. package/src/props/typography.scss +38 -0
  41. package/src/reset.scss +88 -0
  42. package/src/settings/_animation.scss +9 -0
  43. package/src/settings/_background.scss +56 -0
  44. package/src/settings/_borders.scss +24 -0
  45. package/src/settings/_breakpoints.scss +13 -0
  46. package/src/settings/_colors.scss +39 -0
  47. package/src/settings/_effects.scss +39 -0
  48. package/src/settings/_filters.scss +26 -0
  49. package/src/settings/_flexbox.scss +66 -0
  50. package/src/settings/_grid.scss +104 -0
  51. package/src/settings/_index.scss +34 -0
  52. package/src/settings/_input.scss +51 -0
  53. package/src/settings/_layout.scss +109 -0
  54. package/src/settings/_sizing.scss +99 -0
  55. package/src/settings/_spacing.scss +77 -0
  56. package/src/settings/_typography.scss +179 -0
  57. package/src/settings/components/_vv-badge.scss +43 -0
  58. package/src/settings/components/_vv-button-group.scss +20 -0
  59. package/src/settings/components/_vv-button.scss +214 -0
  60. package/src/settings/components/_vv-card.scss +74 -0
  61. package/src/settings/components/_vv-collapse.scss +111 -0
  62. package/src/settings/components/_vv-dialog.scss +183 -0
  63. package/src/settings/components/_vv-dropdown.scss +37 -0
  64. package/src/settings/components/_vv-input-checkbox-group.scss +60 -0
  65. package/src/settings/components/_vv-input-checkbox.scss +92 -0
  66. package/src/settings/components/_vv-input-radio-group.scss +1 -0
  67. package/src/settings/components/_vv-input-radio.scss +60 -0
  68. package/src/settings/components/_vv-input-text.scss +327 -0
  69. package/src/settings/components/_vv-progress.scss +45 -0
  70. package/src/settings/components/_vv-select.scss +216 -0
  71. package/src/settings/components/_vv-table.scss +29 -0
  72. package/src/settings/components/_vv-text.scss +42 -0
  73. package/src/settings/components/_vv-textarea.scss +275 -0
  74. package/src/style.scss +14 -0
  75. package/src/themes/dark/_context.scss +8 -0
  76. package/src/themes/dark/components/_vv-button.scss +24 -0
  77. package/src/themes/dark/components/_vv-input-checkbox.scss +24 -0
  78. package/src/themes/dark/components/index.scss +2 -0
  79. package/src/themes/dark/props/_background.scss +15 -0
  80. package/src/themes/dark/props/_colors.scss +15 -0
  81. package/src/themes/dark/props/index.scss +2 -0
  82. package/src/themes/dark/settings/_background.scss +12 -0
  83. package/src/themes/dark/settings/_colors.scss +15 -0
  84. package/src/themes/dark/settings/_index.scss +5 -0
  85. package/src/themes/dark/settings/components/_vv-button.scss +58 -0
  86. package/src/themes/dark/settings/components/_vv-input-checkbox.scss +26 -0
  87. package/src/themes/dark/style.scss +5 -0
  88. package/src/tools/_breakpoints.scss +126 -0
  89. package/src/tools/_functions.scss +138 -0
  90. package/src/tools/_index.scss +3 -0
  91. package/src/tools/_mixins.scss +902 -0
  92. package/src/utilities/animation.scss +8 -0
  93. package/src/utilities/backgrounds.scss +50 -0
  94. package/src/utilities/borders.scss +79 -0
  95. package/src/utilities/colors.scss +33 -0
  96. package/src/utilities/effects.scss +15 -0
  97. package/src/utilities/filters.scss +22 -0
  98. package/src/utilities/flexbox.scss +113 -0
  99. package/src/utilities/grid.scss +68 -0
  100. package/src/utilities/index.scss +12 -0
  101. package/src/utilities/layout.scss +188 -0
  102. package/src/utilities/sizing.scss +80 -0
  103. package/src/utilities/spacing.scss +109 -0
  104. package/src/utilities/typography.scss +226 -0
@@ -0,0 +1,216 @@
1
+ $vv-select: (
2
+ display: var(--input-display),
3
+ flex: var(--input-flex),
4
+ flex-direction: var(--input-flex-direction),
5
+ margin-bottom: var(--input-gap),
6
+ font-size: var(--input-font-size),
7
+ line-height: var(--input-line-height),
8
+ user-select: none,
9
+ element: (
10
+ label: (
11
+ _alias: '> label',
12
+ display: var(--input-label-display),
13
+ font-size: var(--input-label-font-size),
14
+ color: var(--input-label-color),
15
+ margin: 0 0 var(--input-label-gap) 0,
16
+ white-space: var(--input-label-white-space),
17
+ text-overflow: var(--input-label-text-overflow),
18
+ overflow: var(--input-label-overflow),
19
+ max-width: var(--input-label-max-width),
20
+ ),
21
+ wrapper: (
22
+ position: relative,
23
+ display: flex,
24
+ align-items: center,
25
+ flex: 1,
26
+ background-color: var(--input-background-color),
27
+ will-change: background-color,
28
+ transition: background-color 0.2s ease-in-out,
29
+ pseudo: (
30
+ before: (
31
+ position: absolute,
32
+ height: var(--spacing-1),
33
+ inset: auto 0 0 0,
34
+ background: var(--color-word-5),
35
+ ),
36
+ after: (
37
+ position: absolute,
38
+ height: var(--spacing-2),
39
+ inset: auto 0 0 0,
40
+ background: var(--color-brand),
41
+ transform: scaleX(0),
42
+ transform-origin: left,
43
+ will-change: transform,
44
+ transition: transform 0.2s ease-in-out,
45
+ ),
46
+ ),
47
+ state: (
48
+ hover: (
49
+ background-color: var(--color-surface-3),
50
+ ),
51
+ focus-within: (
52
+ background-color: var(--color-surface-2),
53
+ pseudo: (
54
+ after: (
55
+ transform: scaleX(1),
56
+ ),
57
+ ),
58
+ ),
59
+ open: (
60
+ background-color: var(--color-surface-2),
61
+ pseudo: (
62
+ after: (
63
+ transform: scaleX(1),
64
+ ),
65
+ ),
66
+ ),
67
+ ),
68
+ ),
69
+ input: (
70
+ _alias: 'select',
71
+ display: block,
72
+ flex: 1,
73
+ color: var(--input-placeholder-color),
74
+ [padding]: var(--input-padding-top) var(--input-padding-right)
75
+ var(--input-padding-bottom) var(--input-padding-left),
76
+ min-height: var(--spacing-50),
77
+ background-image: var(--bg-chevron),
78
+ background-repeat: no-repeat,
79
+ [background-position]: right var(--input-padding-right) center,
80
+ background-size: 1em,
81
+ state: (
82
+ disabled: (
83
+ cursor: not-allowed,
84
+ ),
85
+ ),
86
+ ),
87
+ icon: (
88
+ _alias: ':where(svg, [data-icon])',
89
+ margin: var(--input-padding-top) var(--input-padding-right)
90
+ var(--input-padding-bottom) var(--input-padding-left),
91
+ position: var(--input-icon-position),
92
+ width: var(--input-icon-width),
93
+ height: var(--input-icon-height),
94
+ padding: var(--input-icon-padding),
95
+ pointer-events: var(--input-icon-pointer-events),
96
+ ),
97
+ icon-right: (
98
+ _alias: 'select + :where(svg, [data-icon])',
99
+ right: 0,
100
+ ),
101
+ hint: (
102
+ _alias: '> small',
103
+ display: var(--input-hint-display),
104
+ font-size: var(--input-hint-font-size),
105
+ color: var(--input-hint-color),
106
+ padding-top: var(--input-hint-gap),
107
+ padding-inline: var(--spacing-xs),
108
+ white-space: var(--input-hint-white-space),
109
+ text-overflow: var(--input-hint-text-overflow),
110
+ overflow: var(--input-hint-overflow),
111
+ max-width: var(--input-hint-max-width),
112
+ ),
113
+ ),
114
+ modifier: (
115
+ dirty: (
116
+ element: (
117
+ input: (
118
+ color: var(--input-color),
119
+ ),
120
+ ),
121
+ ),
122
+ icon-left: (
123
+ --input-padding-left: calc(var(--spacing-sm) * 2 + 1em),
124
+ ),
125
+ icon-right: (
126
+ --input-padding-right: calc(var(--spacing-sm) * 2 + 1em),
127
+ ),
128
+ valid: (
129
+ element: (
130
+ wrapper: (
131
+ pseudo: (
132
+ after: (
133
+ background: var(--input-valid-color),
134
+ transform: scaleX(1),
135
+ ),
136
+ ),
137
+ ),
138
+ hint: (
139
+ color: var(--input-valid-color),
140
+ ),
141
+ icon-right: (
142
+ color: var(--input-valid-color),
143
+ ),
144
+ ),
145
+ ),
146
+ invalid: (
147
+ element: (
148
+ wrapper: (
149
+ pseudo: (
150
+ after: (
151
+ background: var(--input-invalid-color),
152
+ transform: scaleX(1),
153
+ ),
154
+ ),
155
+ ),
156
+ hint: (
157
+ color: var(--input-invalid-color),
158
+ ),
159
+ icon-right: (
160
+ color: var(--input-invalid-color),
161
+ ),
162
+ ),
163
+ ),
164
+ loading: (
165
+ element: (
166
+ wrapper: (
167
+ pseudo: (
168
+ before: (
169
+ height: 2px,
170
+ background: var(--color-brand-lighten-5),
171
+ ),
172
+ after: (
173
+ animation: progress 2.2s infinite,
174
+ ),
175
+ ),
176
+ ),
177
+ ),
178
+ ),
179
+ readonly: (
180
+ opacity: 1,
181
+ user-select: text,
182
+ element: (
183
+ wrapper: (
184
+ pseudo: (
185
+ after: (
186
+ opacity: 0,
187
+ ),
188
+ ),
189
+ state: (
190
+ hover: (
191
+ background-color: var(--color-surface-1),
192
+ ),
193
+ ),
194
+ ),
195
+ input: (
196
+ background-image: none,
197
+ cursor: 'text',
198
+ ),
199
+ ),
200
+ ),
201
+ ),
202
+ state: (
203
+ disabled: (
204
+ opacity: 0.5,
205
+ element: (
206
+ wrapper: (
207
+ state: (
208
+ hover: (
209
+ background-color: var(--color-surface-1),
210
+ ),
211
+ ),
212
+ ),
213
+ ),
214
+ ),
215
+ ),
216
+ ) !default;
@@ -0,0 +1,29 @@
1
+ $vv-table: (
2
+ width: 100%,
3
+ element: (
4
+ tr: (
5
+ _alias: 'tr',
6
+ border-width: 0 0 1px 0,
7
+ border-style: solid,
8
+ border-color: var(--color-alpha-1),
9
+ state: (
10
+ last-child: (
11
+ border-width: 0,
12
+ ),
13
+ ),
14
+ ),
15
+ th: (
16
+ _alias: 'th',
17
+ font-weight: semibold,
18
+ padding-block: var(--spacing-md),
19
+ font-size: var(--text-sm),
20
+ color: var(--color-word-2),
21
+ ),
22
+ td: (
23
+ _alias: 'td',
24
+ padding-block: var(--spacing-md),
25
+ border-style: solid,
26
+ font-size: var(--text-xs),
27
+ ),
28
+ ),
29
+ ) !default;
@@ -0,0 +1,42 @@
1
+ $vv-text: (
2
+ font-family: var(--font-sans),
3
+ font-weight: var(--font-normal),
4
+ line-height: var(--leading-normal),
5
+ modifier: (
6
+ headline: (
7
+ font-family: var(--font-serif),
8
+ font-weight: var(--font-semibold),
9
+ line-height: var(--leading-tight),
10
+ margin-top: var(--spacing-24),
11
+ margin-bottom: var(--spacing-16),
12
+ ),
13
+ copy: (
14
+ margin-block: var(--spacing-16),
15
+ ),
16
+ quote: (
17
+ font-family: var(--font-serif),
18
+ border-left: var(--spacing-4) solid var(--color-surface-3),
19
+ padding-left: var(--spacing-16),
20
+ margin-block: var(--spacing-16),
21
+ margin-inline: var(--spacing-40),
22
+ ),
23
+ size-1: (
24
+ font-size: var(--text-32),
25
+ ),
26
+ size-2: (
27
+ font-size: var(--text-24),
28
+ ),
29
+ size-3: (
30
+ font-size: var(--text-20),
31
+ ),
32
+ size-4: (
33
+ font-size: var(--text-16),
34
+ ),
35
+ size-5: (
36
+ font-size: var(--text-14),
37
+ ),
38
+ size-6: (
39
+ font-size: var(--text-12),
40
+ ),
41
+ ),
42
+ ) !default;
@@ -0,0 +1,275 @@
1
+ $vv-textarea: (
2
+ display: var(--input-display),
3
+ flex: var(--input-flex),
4
+ flex-direction: var(--input-flex-direction),
5
+ margin-bottom: var(--input-gap),
6
+ font-size: var(--input-font-size),
7
+ line-height: var(--input-line-height),
8
+ element: (
9
+ label: (
10
+ _alias: '> label',
11
+ display: var(--input-label-display),
12
+ font-size: var(--input-label-font-size),
13
+ color: var(--input-label-color),
14
+ margin: 0 0 var(--input-label-gap) 0,
15
+ white-space: var(--input-label-white-space),
16
+ text-overflow: var(--input-label-text-overflow),
17
+ overflow: var(--input-label-overflow),
18
+ max-width: var(--input-label-max-width),
19
+ ),
20
+ wrapper: (
21
+ position: relative,
22
+ display: flex,
23
+ align-items: flex-start,
24
+ flex: 1,
25
+ overflow: hidden,
26
+ background-color: var(--input-background-color),
27
+ will-change: background-color,
28
+ transition: background-color 0.2s ease-in-out,
29
+ pseudo: (
30
+ before: (
31
+ position: absolute,
32
+ height: var(--spacing-1),
33
+ inset: auto 0 0 0,
34
+ background: var(--color-word-5),
35
+ ),
36
+ after: (
37
+ position: absolute,
38
+ height: var(--spacing-2),
39
+ inset: auto 0 0 0,
40
+ background: var(--color-brand),
41
+ transform: scaleX(0),
42
+ transform-origin: left,
43
+ will-change: transform,
44
+ transition: transform 0.2s ease-in-out,
45
+ ),
46
+ ),
47
+ state: (
48
+ hover: (
49
+ background-color: var(--color-surface-3),
50
+ ),
51
+ focus-within: (
52
+ background-color: var(--color-surface-2),
53
+ pseudo: (
54
+ after: (
55
+ transform: scaleX(1),
56
+ ),
57
+ ),
58
+ ),
59
+ ),
60
+ ),
61
+ input: (
62
+ _alias: 'textarea',
63
+ display: block,
64
+ flex: 1,
65
+ color: var(--input-color),
66
+ [padding]: var(--input-padding-top) var(--input-padding-right)
67
+ var(--input-padding-bottom) var(--input-padding-left),
68
+ min-height: var(--spacing-50),
69
+ pseudo: (
70
+ placeholder: (
71
+ color: var(--input-placeholder-color),
72
+ ),
73
+ ),
74
+ state: (
75
+ disabled: (
76
+ cursor: not-allowed,
77
+ ),
78
+ readonly: (
79
+ cursor: text,
80
+ ),
81
+ ),
82
+ ),
83
+ icon: (
84
+ _alias: ':where(svg, [data-icon])',
85
+ margin: var(--input-padding-top) var(--input-padding-right)
86
+ var(--input-padding-bottom) var(--input-padding-left),
87
+ position: var(--input-icon-position),
88
+ width: var(--input-icon-width),
89
+ height: var(--input-icon-height),
90
+ padding: var(--input-icon-padding),
91
+ pointer-events: var(--input-icon-pointer-events),
92
+ ),
93
+ icon-right: (
94
+ _alias: 'textarea + :where(svg, [data-icon])',
95
+ right: 0,
96
+ ),
97
+ actions-group: (
98
+ display: flex,
99
+ flex-direction: column,
100
+ position: absolute,
101
+ right: 0,
102
+ top: 0,
103
+ bottom: var(--spacing-px),
104
+ ),
105
+ hint: (
106
+ _alias: '> small',
107
+ display: var(--input-hint-display),
108
+ font-size: var(--input-hint-font-size),
109
+ color: var(--input-hint-color),
110
+ padding-top: var(--input-hint-gap),
111
+ padding-inline: var(--spacing-xs),
112
+ white-space: var(--input-hint-white-space),
113
+ text-overflow: var(--input-hint-text-overflow),
114
+ overflow: var(--input-hint-overflow),
115
+ max-width: var(--input-hint-max-width),
116
+ ),
117
+ ),
118
+ modifier: (
119
+ icon-left: (
120
+ --input-padding-left: calc(var(--spacing-sm) * 2 + 1em),
121
+ ),
122
+ icon-right: (
123
+ --input-padding-right: calc(var(--spacing-sm) * 2 + 1em),
124
+ ),
125
+ valid: (
126
+ element: (
127
+ wrapper: (
128
+ pseudo: (
129
+ after: (
130
+ background: var(--input-valid-color),
131
+ transform: scaleX(1),
132
+ ),
133
+ ),
134
+ ),
135
+ hint: (
136
+ color: var(--input-valid-color),
137
+ ),
138
+ icon-right: (
139
+ color: var(--input-valid-color),
140
+ ),
141
+ ),
142
+ ),
143
+ invalid: (
144
+ element: (
145
+ wrapper: (
146
+ pseudo: (
147
+ after: (
148
+ background: var(--input-invalid-color),
149
+ transform: scaleX(1),
150
+ ),
151
+ ),
152
+ ),
153
+ hint: (
154
+ color: var(--input-invalid-color),
155
+ ),
156
+ icon-right: (
157
+ color: var(--input-invalid-color),
158
+ ),
159
+ ),
160
+ ),
161
+ loading: (
162
+ element: (
163
+ wrapper: (
164
+ pseudo: (
165
+ before: (
166
+ height: 2px,
167
+ background: var(--color-brand-lighten-5),
168
+ ),
169
+ after: (
170
+ animation: var(--animate-indeterminate),
171
+ ),
172
+ ),
173
+ ),
174
+ ),
175
+ ),
176
+ floating: (
177
+ [margin-left]: var(--input-padding-left),
178
+ [margin-right]: var(--input-padding-right),
179
+ element: (
180
+ wrapper: (
181
+ [margin-left]: calc(var(--input-padding-left) * -1),
182
+ [margin-right]: calc(var(--input-padding-right) * -1),
183
+ ),
184
+ hint: (
185
+ [margin-left]: calc(var(--input-padding-left) * -1),
186
+ [margin-right]: calc(var(--input-padding-right) * -1),
187
+ ),
188
+ label: (
189
+ position: absolute,
190
+ z-index: 1,
191
+ pointer-events: none,
192
+ font-size: inherit,
193
+ [padding-top]: var(--input-padding-top),
194
+ [padding-bottom]: var(--input-padding-bottom),
195
+ padding-inline: 0,
196
+ margin: 0,
197
+ will-change: 'transform',
198
+ transform-origin: left,
199
+ transition: all 0.2s ease-in-out,
200
+ ),
201
+ input: (
202
+ pseudo: (
203
+ placeholder: (
204
+ opacity: 0,
205
+ ),
206
+ ),
207
+ ),
208
+ ),
209
+ state: (
210
+ focus-within: (
211
+ element: (
212
+ label: (
213
+ transform: translateY(-1.2ch),
214
+ font-size: var(--text-12),
215
+ ),
216
+ input: (
217
+ transform: translateY(0.85ch),
218
+ pseudo: (
219
+ placeholder: (
220
+ opacity: 1,
221
+ ),
222
+ ),
223
+ ),
224
+ ),
225
+ ),
226
+ dirty: (
227
+ element: (
228
+ label: (
229
+ transform: translateY(-1.2ch),
230
+ font-size: var(--text-12),
231
+ ),
232
+ input: (
233
+ transform: translateY(0.85ch),
234
+ pseudo: (
235
+ placeholder: (
236
+ opacity: 1,
237
+ ),
238
+ ),
239
+ ),
240
+ ),
241
+ ),
242
+ ),
243
+ ),
244
+ ),
245
+ state: (
246
+ disabled: (
247
+ opacity: 0.5,
248
+ element: (
249
+ wrapper: (
250
+ state: (
251
+ hover: (
252
+ background-color: var(--color-surface-1),
253
+ ),
254
+ ),
255
+ ),
256
+ ),
257
+ ),
258
+ readonly: (
259
+ element: (
260
+ wrapper: (
261
+ pseudo: (
262
+ after: (
263
+ opacity: 0,
264
+ ),
265
+ ),
266
+ state: (
267
+ hover: (
268
+ background-color: var(--color-surface-1),
269
+ ),
270
+ ),
271
+ ),
272
+ ),
273
+ ),
274
+ ),
275
+ ) !default;
package/src/style.scss ADDED
@@ -0,0 +1,14 @@
1
+ // reset
2
+ @import 'reset';
3
+
4
+ // props
5
+ @import 'props';
6
+
7
+ // preflight
8
+ @import 'preflight';
9
+
10
+ // components
11
+ @import 'components';
12
+
13
+ // utilities (must be the last one)
14
+ @import 'utilities';
@@ -0,0 +1,8 @@
1
+ // configuration
2
+ @import '../../config';
3
+
4
+ // tools (mixins, functions, recipes)
5
+ @import '../../tools';
6
+
7
+ // settings
8
+ @import 'settings';
@@ -0,0 +1,24 @@
1
+ @use 'sass:map';
2
+ @import '../context';
3
+
4
+ $component-name: map.get($components-names, vv-button);
5
+ $component-map: $vv-button;
6
+ $props: true;
7
+
8
+ @mixin theme-dark-vv-button {
9
+ @include spread-map-into-props(
10
+ $map: $component-map,
11
+ $prefix: $component-name,
12
+ $deep: $props
13
+ );
14
+ }
15
+
16
+ :where(:host, :root, .theme):not(.theme--light) {
17
+ @media (prefers-color-scheme: dark) {
18
+ @include theme-dark-vv-button;
19
+ }
20
+ }
21
+
22
+ :where(.theme.theme--dark) {
23
+ @include theme-dark-vv-button;
24
+ }
@@ -0,0 +1,24 @@
1
+ @use 'sass:map';
2
+ @import '../context';
3
+
4
+ $component-name: map.get($components-names, vv-input-checkbox);
5
+ $component-map: $vv-input-checkbox;
6
+ $props: true;
7
+
8
+ @mixin theme-dark-vv-input-checkbox {
9
+ @include spread-map-into-props(
10
+ $map: $component-map,
11
+ $prefix: $component-name,
12
+ $deep: $props
13
+ );
14
+ }
15
+
16
+ :where(:host, :root, .theme):not(.theme--light) {
17
+ @media (prefers-color-scheme: dark) {
18
+ @include theme-dark-vv-input-checkbox;
19
+ }
20
+ }
21
+
22
+ :where(.theme.theme--dark) {
23
+ @include theme-dark-vv-input-checkbox;
24
+ }
@@ -0,0 +1,2 @@
1
+ @import 'vv-button';
2
+ @import 'vv-input-checkbox';
@@ -0,0 +1,15 @@
1
+ @import '../context';
2
+
3
+ @mixin theme-dark-bg {
4
+ @include spread-map-into-props($background-image, 'bg');
5
+ }
6
+
7
+ :where(:host, :root, .theme):not(.theme--light) {
8
+ @media (prefers-color-scheme: dark) {
9
+ @include theme-dark-bg;
10
+ }
11
+ }
12
+
13
+ :where(.theme.theme--dark) {
14
+ @include theme-dark-bg;
15
+ }
@@ -0,0 +1,15 @@
1
+ @import '../context';
2
+
3
+ @mixin theme-dark-colors {
4
+ @include spread-map-into-props($colors, 'color');
5
+ }
6
+
7
+ :where(:host, :root, .theme):not(.theme--light) {
8
+ @media (prefers-color-scheme: dark) {
9
+ @include theme-dark-colors;
10
+ }
11
+ }
12
+
13
+ :where(.theme.theme--dark) {
14
+ @include theme-dark-colors;
15
+ }
@@ -0,0 +1,2 @@
1
+ @import 'background';
2
+ @import 'colors';
@@ -0,0 +1,12 @@
1
+ // background-image
2
+ $background-image: (
3
+ none: none,
4
+ chevron:
5
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(#{hex-to-rgb($color-word)})' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"),
6
+ grid:
7
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='32' height='32' fill='none' stroke='rgb(51 65 85 / 0.25)'%3E%3Cpath d='M0 .5H31.5V32'/%3E%3C/svg%3E"),
8
+ check:
9
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(#{hex-to-rgb($color-word)})' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E"),
10
+ minus:
11
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(#{hex-to-rgb($color-word)})' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E"),
12
+ ) !default;
@@ -0,0 +1,15 @@
1
+ @use 'sass:color';
2
+
3
+ $color-scheme: dark !default;
4
+ $color-brand: #1976d2 !default;
5
+ $color-word: hsl(color.hue($color-brand) 15% 85%) !default;
6
+ $color-surface: hsl(color.hue($color-brand) 10% 5%) !default;
7
+ $color-alpha: hsla(0deg 0% 100% / 0%) !default;
8
+
9
+ // color map
10
+ $colors: (
11
+ scheme: $color-scheme,
12
+ word: color-darken-map($color-word, 'word', $scale: 15%),
13
+ surface: color-lighten-map($color-surface, 'surface', $scale: 5%),
14
+ alpha: color-alpha-map($color-alpha, 'alpha', $steps: 5, $scale: 5%),
15
+ ) !default;