@osmova/quasar-design-system 0.0.0-stage → 0.8.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/CHANGELOG.md +705 -0
- package/LICENSE +27 -0
- package/README.md +278 -2
- package/dist/icons/quasar-icon-set.d.ts +141 -0
- package/dist/icons/quasar-icon-set.d.ts.map +1 -0
- package/dist/icons/quasar-icon-set.js +168 -0
- package/dist/icons/quasar-icon-set.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/qwindow.d.ts +119 -0
- package/dist/qwindow.d.ts.map +1 -0
- package/dist/qwindow.js +221 -0
- package/dist/qwindow.js.map +1 -0
- package/dist/runtime/theme.d.ts +86 -0
- package/dist/runtime/theme.d.ts.map +1 -0
- package/dist/runtime/theme.js +256 -0
- package/dist/runtime/theme.js.map +1 -0
- package/dist/themes/index.d.ts +51 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/index.js +115 -0
- package/dist/themes/index.js.map +1 -0
- package/dist/tokens/index.d.ts +18 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +570 -0
- package/dist/tokens/index.js.map +1 -0
- package/package.json +148 -4
- package/src/css/_base.scss +108 -0
- package/src/css/_importance.scss +9 -0
- package/src/css/_layers.scss +7 -0
- package/src/css/_materials.scss +21 -0
- package/src/css/_utilities.scss +79 -0
- package/src/css/components/_actions.scss +181 -0
- package/src/css/components/_badge.scss +100 -0
- package/src/css/components/_button.scss +345 -0
- package/src/css/components/_card.scss +150 -0
- package/src/css/components/_chip.scss +162 -0
- package/src/css/components/_complex-media.scss +292 -0
- package/src/css/components/_compositions.scss +169 -0
- package/src/css/components/_dialog.scss +85 -0
- package/src/css/components/_drawer.scss +59 -0
- package/src/css/components/_field.scss +421 -0
- package/src/css/components/_footer.scss +16 -0
- package/src/css/components/_form-field.scss +278 -0
- package/src/css/components/_forms.scss +288 -0
- package/src/css/components/_list.scss +137 -0
- package/src/css/components/_loading-data.scss +132 -0
- package/src/css/components/_menu.scss +69 -0
- package/src/css/components/_notification.scss +78 -0
- package/src/css/components/_pagination.scss +65 -0
- package/src/css/components/_plugins.scss +82 -0
- package/src/css/components/_popup.scss +33 -0
- package/src/css/components/_rating.scss +46 -0
- package/src/css/components/_selection.scss +391 -0
- package/src/css/components/_table.scss +119 -0
- package/src/css/components/_tabs.scss +89 -0
- package/src/css/components/_toolbar.scss +78 -0
- package/src/css/components/variants/_atrium.scss +123 -0
- package/src/css/components/variants/_mechanics.scss +22 -0
- package/src/css/components/variants/_zen.scss +147 -0
- package/src/css/extensions/_qwindow-styles.scss +89 -0
- package/src/css/extensions/qwindow.layered.scss +7 -0
- package/src/css/extensions/qwindow.scss +5 -0
- package/src/css/index.layered.scss +71 -0
- package/src/css/index.scss +62 -0
- package/src/env.d.ts +6 -0
- package/src/fonts/THIRD_PARTY_NOTICES.md +103 -0
- package/src/fonts/files/.gitkeep +0 -0
- package/src/fonts/files/inter-latin-ext-wght-normal.woff2 +0 -0
- package/src/fonts/files/inter-latin-wght-normal.woff2 +0 -0
- package/src/fonts/files/open-sans-latin-ext-wght-normal.woff2 +0 -0
- package/src/fonts/files/open-sans-latin-wght-normal.woff2 +0 -0
- package/src/fonts/files/selawik-bold.woff2 +0 -0
- package/src/fonts/files/selawik-regular.woff2 +0 -0
- package/src/fonts/files/selawik-semibold.woff2 +0 -0
- package/src/fonts/inter.css +19 -0
- package/src/fonts/open-sans.css +19 -0
- package/src/fonts/selawik.css +24 -0
- package/src/icons/quasar-icon-set.ts +245 -0
- package/src/index.ts +35 -0
- package/src/quasar.variables.scss +96 -0
- package/src/qwindow.ts +289 -0
- package/src/runtime/theme.ts +401 -0
- package/src/themes/_shadcn.scss +275 -0
- package/src/themes/default.scss +513 -0
- package/src/themes/fallbacks.scss +492 -0
- package/src/themes/index.ts +155 -0
- package/src/tokens/SHADCN-NOTICE.md +37 -0
- package/src/tokens/_default.scss +246 -0
- package/src/tokens/_shadcn.scss +237 -0
- package/src/tokens/index.ts +637 -0
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use '../materials';
|
|
4
|
+
@use '../importance';
|
|
5
|
+
@use 'variants/mechanics';
|
|
6
|
+
@use 'variants/zen';
|
|
7
|
+
@use 'variants/atrium';
|
|
8
|
+
|
|
9
|
+
$roles: (
|
|
10
|
+
primary: (hover: var(--qds-color-primary-hover), pressed: var(--qds-color-primary-pressed)),
|
|
11
|
+
secondary: (),
|
|
12
|
+
accent: (),
|
|
13
|
+
positive: (),
|
|
14
|
+
negative: (),
|
|
15
|
+
warning: (),
|
|
16
|
+
info: (),
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
@function role-value($role, $key) {
|
|
20
|
+
$defaults: (
|
|
21
|
+
hover: color-mix(in srgb, var(--qds-color-#{$role}) var(--qds-fill-hover-mix), var(--qds-fill-state-base)),
|
|
22
|
+
pressed: color-mix(in srgb, var(--qds-color-#{$role}) var(--qds-fill-pressed-mix), var(--qds-fill-state-base)),
|
|
23
|
+
fg: var(--qds-fg-#{$role}),
|
|
24
|
+
);
|
|
25
|
+
@return map.get(map.merge($defaults, map.get($roles, $role)), $key);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
$soft-surfaces: (primary: surface-brand-soft, secondary: bg-layer, accent: surface-accent-soft, positive: surface-positive-soft, negative: surface-negative-soft, warning: surface-warning-soft, info: surface-info-soft);
|
|
29
|
+
|
|
30
|
+
@function role-soft($role) {
|
|
31
|
+
@return var(--qds-#{map.get($soft-surfaces, $role)});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Quasar `size` sets an inline font-size; map it onto the sm/md/lg height ramp.
|
|
35
|
+
$height: clamp(var(--qds-button-size-sm), calc(var(--qds-button-min-height) + (1em - 0.875rem) * 2), var(--qds-button-size-lg));
|
|
36
|
+
$padding: clamp(var(--qds-button-dense-padding-inline), calc(var(--qds-button-padding-inline) + 1em - 0.875rem), calc(var(--qds-button-padding-inline) + 0.25rem));
|
|
37
|
+
$not-fab: ':where(:not(.q-btn--fab, .q-btn--fab-mini))';
|
|
38
|
+
$filled: ':is(.q-btn--standard, .q-btn--unelevated, .q-btn--push):where(:not(.q-btn-toggle > .q-btn))';
|
|
39
|
+
$shadcn: '.qds-variant-shadcn:is(.qds-ui,.qds-ui *)';
|
|
40
|
+
$shadcn-default: '.q-btn#{$filled}:where(:not([class*="bg-"], .qds-tonal, .qds-button--link, .q-date .q-btn, .q-time .q-btn, .q-pagination .q-btn, .q-btn-toggle .q-btn, .q-editor .q-btn, .q-color-picker .q-btn))';
|
|
41
|
+
$accent-fills: ();
|
|
42
|
+
$role-texts: ();
|
|
43
|
+
|
|
44
|
+
@each $role, $_ in $roles {
|
|
45
|
+
$accent-fills: list.append($accent-fills, '.bg-#{$role}', comma);
|
|
46
|
+
$role-texts: list.append($role-texts, '.text-#{$role}', comma);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Legacy profiles still share Fluent grammar. Only the independent hook omits it.
|
|
50
|
+
@mixin styles($grammar: compatibility) {
|
|
51
|
+
@if $grammar == compatibility { @include compatibility-styles; @include zen.button; @include atrium.button; @include atrium.capability; }
|
|
52
|
+
@else if $grammar == independent { @include mechanics.button; @content; }
|
|
53
|
+
@else { @error 'Unknown button grammar: #{$grammar}'; }
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@mixin compatibility-styles {
|
|
57
|
+
.qds-ui .q-btn {
|
|
58
|
+
border: var(--qds-border-width-control) solid transparent;
|
|
59
|
+
border-radius: var(--qds-button-radius);
|
|
60
|
+
background: linear-gradient(var(--qds-button-state, transparent), var(--qds-button-state, transparent)) transparent;
|
|
61
|
+
font-weight: var(--qds-font-weight-semibold);
|
|
62
|
+
letter-spacing: var(--qds-control-letter-spacing);
|
|
63
|
+
transition:
|
|
64
|
+
background-color var(--qds-motion-fast),
|
|
65
|
+
border-color var(--qds-motion-fast),
|
|
66
|
+
color var(--qds-motion-fast);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.qds-ui .q-btn:where(:not(.q-btn--no-uppercase)) {
|
|
70
|
+
text-transform: var(--qds-control-text-transform);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.qds-ui .q-btn#{$not-fab} {
|
|
74
|
+
min-height: $height;
|
|
75
|
+
padding: 0 $padding;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.qds-ui .q-btn--dense#{$not-fab} {
|
|
79
|
+
min-height: var(--qds-button-dense-min-height);
|
|
80
|
+
padding-inline: var(--qds-button-dense-padding-inline);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.qds-ui .q-btn--round {
|
|
84
|
+
border-radius: 50%;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.qds-ui .q-btn--round#{$not-fab} {
|
|
88
|
+
min-width: $height;
|
|
89
|
+
padding: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.qds-ui .q-btn--round.q-btn--dense#{$not-fab} {
|
|
93
|
+
min-width: var(--qds-button-dense-min-height);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.qds-ui .q-btn--rounded {
|
|
97
|
+
border-radius: var(--qds-radius-full);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.qds-ui .q-btn--square {
|
|
101
|
+
border-radius: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.qds-ui .q-btn::before,
|
|
105
|
+
.qds-ui .q-btn .q-focus-helper {
|
|
106
|
+
display: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.qds-ui .q-btn:not(.disabled):hover {
|
|
110
|
+
--qds-button-state: var(--qds-state-hover);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.qds-ui .q-btn:not(.disabled):active {
|
|
114
|
+
--qds-button-state: var(--qds-state-pressed);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// QBtn carries Quasar's `no-outline` utility.
|
|
118
|
+
.qds-ui .q-btn:focus-visible {
|
|
119
|
+
@include importance.declarations { outline: var(--qds-focus-ring-width) solid var(--qds-stroke-focus) !important; }
|
|
120
|
+
outline-offset: var(--qds-focus-ring-offset);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.qds-ui .q-btn .q-btn__content {
|
|
124
|
+
align-items: center;
|
|
125
|
+
gap: var(--qds-button-icon-gap);
|
|
126
|
+
font-size: clamp(0.75rem, 1em, 1rem);
|
|
127
|
+
line-height: var(--qds-control-content-line-height);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.qds-ui .q-btn--dense .q-btn__content {
|
|
131
|
+
gap: var(--qds-button-dense-icon-gap);
|
|
132
|
+
font-size: var(--qds-button-dense-font-size);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.qds-ui .q-btn .q-btn__content > .q-icon {
|
|
136
|
+
width: var(--qds-button-icon-size);
|
|
137
|
+
min-width: var(--qds-button-icon-size);
|
|
138
|
+
height: var(--qds-button-icon-size);
|
|
139
|
+
margin: 0;
|
|
140
|
+
font-size: var(--qds-button-icon-size);
|
|
141
|
+
opacity: var(--qds-control-icon-opacity);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.qds-ui .q-btn--dense .q-btn__content > .q-icon {
|
|
145
|
+
width: var(--qds-button-dense-icon-size);
|
|
146
|
+
min-width: var(--qds-button-dense-icon-size);
|
|
147
|
+
height: var(--qds-button-dense-icon-size);
|
|
148
|
+
font-size: var(--qds-button-dense-icon-size);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.qds-ui .q-btn:is(:hover, :focus-visible, [aria-expanded='true']) .q-btn__content > .q-icon {
|
|
152
|
+
opacity: var(--qds-control-icon-opacity-active);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.qds-ui .q-btn#{$filled} {
|
|
156
|
+
--qds-button-fill: var(--qds-control-fill-default);
|
|
157
|
+
color: var(--qds-fg-default);
|
|
158
|
+
background: var(--qds-button-fill);
|
|
159
|
+
@include materials.elevation-border;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.qds-ui .q-btn#{$filled}:not(.disabled):hover {
|
|
163
|
+
--qds-button-fill: var(--qds-control-fill-hover);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.qds-ui .q-btn#{$filled}:not(.disabled):active {
|
|
167
|
+
--qds-button-fill: var(--qds-control-fill-pressed);
|
|
168
|
+
color: var(--qds-fg-muted);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.qds-ui .q-btn--outline {
|
|
172
|
+
border-color: var(--qds-stroke-default);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.qds-ui .q-btn--outline::before {
|
|
176
|
+
border: 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.qds-ui .q-btn:is(.q-btn--fab, .q-btn--fab-mini) {
|
|
180
|
+
--qds-button-icon-size: var(--qds-control-icon-size-lg);
|
|
181
|
+
border-radius: var(--qds-radius-lg);
|
|
182
|
+
box-shadow: var(--qds-shadow-4);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.qds-ui .q-btn--fab {
|
|
186
|
+
min-width: var(--qds-fab-size);
|
|
187
|
+
min-height: var(--qds-fab-size);
|
|
188
|
+
padding: 0 var(--qds-space-md);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.qds-ui .q-btn--fab-mini {
|
|
192
|
+
min-width: var(--qds-fab-mini-size);
|
|
193
|
+
min-height: var(--qds-fab-mini-size);
|
|
194
|
+
padding: 0 var(--qds-space-sm);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.qds-ui .q-btn.qds-active {
|
|
198
|
+
color: var(--qds-fg-brand);
|
|
199
|
+
background-color: var(--qds-state-selected);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@each $role, $_ in $roles {
|
|
203
|
+
.qds-ui .q-btn.text-#{$role} {
|
|
204
|
+
@include importance.declarations { color: role-value($role, fg) !important; }
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.qds-ui .q-btn--outline.text-#{$role} {
|
|
208
|
+
border-color: color-mix(in srgb, currentColor 60%, transparent);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// States swap --qds-button-fill/-on-fill so only the base rule needs !important against Quasar's bg-*/text-*.
|
|
212
|
+
$solid-selector: '.qds-ui .q-btn.bg-#{$role}:not(.qds-tonal)';
|
|
213
|
+
@if $role == primary { $solid-selector: '#{$solid-selector}, #{$shadcn} #{$shadcn-default}'; }
|
|
214
|
+
#{$solid-selector} {
|
|
215
|
+
--qds-button-fill: var(--qds-color-#{$role});
|
|
216
|
+
--qds-button-on-fill: var(--qds-text-on-#{$role});
|
|
217
|
+
@include importance.declarations { color: var(--qds-button-on-fill) !important; background-color: var(--qds-button-fill) !important; }
|
|
218
|
+
border-color: transparent;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.qds-ui .q-btn.bg-#{$role}:not(.qds-tonal, .disabled):hover {
|
|
222
|
+
--qds-button-fill: #{role-value($role, hover)};
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.qds-ui .q-btn.bg-#{$role}:not(.qds-tonal, .disabled):active {
|
|
226
|
+
--qds-button-fill: #{role-value($role, pressed)};
|
|
227
|
+
--qds-button-on-fill: color-mix(in srgb, var(--qds-text-on-#{$role}) var(--qds-text-on-fill-pressed-mix), transparent);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.qds-ui .q-btn.bg-#{$role}.qds-tonal {
|
|
231
|
+
--qds-button-fill: #{role-soft($role)};
|
|
232
|
+
@include importance.declarations { color: role-value($role, fg) !important; background-color: var(--qds-button-fill) !important; }
|
|
233
|
+
border-color: transparent;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.qds-ui .q-btn.bg-#{$role}.qds-tonal:not(.disabled):hover {
|
|
237
|
+
--qds-button-fill: color-mix(in srgb, #{role-soft($role)}, var(--qds-color-#{$role}) 10%);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.qds-ui .q-btn.bg-#{$role}.qds-tonal:not(.disabled):active {
|
|
241
|
+
--qds-button-fill: color-mix(in srgb, #{role-soft($role)}, var(--qds-color-#{$role}) 18%);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// WinUI CalendarView selections stay flat accent fills.
|
|
246
|
+
.qds-ui .q-btn:is(#{$accent-fills}):not(.qds-tonal):where(:not(:is(.q-date__calendar-item, .q-date__months-item, .q-date__years-item) > .q-btn)) {
|
|
247
|
+
@include materials.elevation-border($top: var(--qds-control-stroke-on-accent-top), $side: var(--qds-control-stroke-on-accent-top), $bottom: var(--qds-control-stroke-on-accent-bottom));
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// Term role fills carry a rule in their on-fill ink so amber keys stay bounded on cream.
|
|
251
|
+
.qds-ui .qds-variant-term .q-btn:is(#{$accent-fills}):not(.qds-tonal, .disabled),
|
|
252
|
+
.qds-ui.qds-variant-term .q-btn:is(#{$accent-fills}):not(.qds-tonal, .disabled) { border-color: var(--qds-button-on-fill); }
|
|
253
|
+
.qds-ui .qds-variant-term .q-btn--outline:is(#{$role-texts}),
|
|
254
|
+
.qds-ui.qds-variant-term .q-btn--outline:is(#{$role-texts}) { border-color: currentColor; }
|
|
255
|
+
|
|
256
|
+
// Fluent disabled: neutral fill, stroke and foreground instead of Quasar's opacity dimming.
|
|
257
|
+
.qds-ui .q-btn.q-btn-item.disabled {
|
|
258
|
+
@include importance.declarations { color: var(--qds-button-disabled-fg, var(--qds-fg-disabled)) !important; opacity: var(--qds-button-disabled-opacity, 1) !important; }
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.qds-ui .q-btn.q-btn-item.disabled#{$filled} {
|
|
262
|
+
--qds-button-fill: var(--qds-button-disabled-fill, var(--qds-control-fill-disabled));
|
|
263
|
+
@include importance.declarations { background-color: var(--qds-button-fill) !important; }
|
|
264
|
+
border-color: var(--qds-button-disabled-stroke, var(--qds-stroke-subtle));
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.qds-ui .q-btn.q-btn-item.disabled.q-btn--outline:where(:not(.q-btn-toggle > .q-btn)) {
|
|
268
|
+
border-color: var(--qds-stroke-subtle);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.qds-ui .q-btn-dropdown .q-btn-dropdown__arrow {
|
|
272
|
+
width: var(--qds-button-icon-size);
|
|
273
|
+
min-width: var(--qds-button-icon-size);
|
|
274
|
+
margin-inline-start: var(--qds-space-xs);
|
|
275
|
+
font-size: var(--qds-button-icon-size);
|
|
276
|
+
opacity: var(--qds-control-icon-opacity);
|
|
277
|
+
transition: transform var(--qds-motion-fast);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.qds-ui .q-btn-dropdown:is([aria-expanded='true'], .q-btn-dropdown--showing) .q-btn-dropdown__arrow {
|
|
281
|
+
transform: rotate(180deg);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.qds-ui .q-btn-dropdown--split .q-btn-dropdown__arrow-container {
|
|
285
|
+
border-inline-start: var(--qds-border-width-control) solid color-mix(in srgb, currentColor 24%, transparent);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.qds-ui .qds-variant-term .q-btn--flat,
|
|
289
|
+
.qds-ui.qds-variant-term .q-btn--flat {
|
|
290
|
+
color: color-mix(in srgb, var(--qds-color-primary) 40%, var(--qds-text-strong));
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.qds-ui .qds-variant-one .q-btn:where(:not(.q-btn--fab, .q-btn--fab-mini, .q-btn--round, .q-btn--dense)),
|
|
294
|
+
.qds-ui.qds-variant-one .q-btn:where(:not(.q-btn--fab, .q-btn--fab-mini, .q-btn--round, .q-btn--dense)) {
|
|
295
|
+
padding-inline: max(var(--qds-button-padding-inline), var(--qds-space-md));
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
@media (forced-colors: active) {
|
|
299
|
+
.qds-ui .q-btn:is(.q-btn--standard, .q-btn--unelevated, .q-btn--push, .q-btn--outline) {
|
|
300
|
+
border-color: ButtonText;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
#{$shadcn} .q-btn {
|
|
305
|
+
--qds-button-disabled-opacity: 0.5;
|
|
306
|
+
--qds-button-disabled-fg: var(--qds-button-on-fill, var(--qds-fg-default));
|
|
307
|
+
}
|
|
308
|
+
#{$shadcn} .q-btn:where(:not([class*='text-weight-'])) { font-weight: var(--qds-font-weight-medium); }
|
|
309
|
+
@each $weight, $fallback in (thin: 100, light: 300, regular: 400, medium: 500, bold: 700, bolder: 900) {
|
|
310
|
+
#{$shadcn} :is(.q-btn, .q-avatar, .q-badge, .q-chip).text-weight-#{$weight} { font-weight: var(--qds-font-weight-#{$weight}, #{$fallback}); }
|
|
311
|
+
}
|
|
312
|
+
#{$shadcn} .q-btn:where(:not(.text-uppercase, .text-lowercase, .text-capitalize)) { text-transform: none; }
|
|
313
|
+
@each $case in uppercase, lowercase, capitalize { #{$shadcn} .q-btn.text-#{$case} { text-transform: $case; } }
|
|
314
|
+
#{$shadcn} .q-btn.text-bold { font-weight: var(--qds-font-weight-bold); }
|
|
315
|
+
#{$shadcn} .q-btn .q-btn__content { font-size: inherit; }
|
|
316
|
+
#{$shadcn} #{$shadcn-default} {
|
|
317
|
+
--qds-button-disabled-fill: var(--qds-color-primary);
|
|
318
|
+
--qds-button-disabled-stroke: transparent;
|
|
319
|
+
border-color: transparent;
|
|
320
|
+
}
|
|
321
|
+
#{$shadcn} #{$shadcn-default}:not(.disabled):hover { --qds-button-fill: var(--qds-color-primary-hover); }
|
|
322
|
+
#{$shadcn} #{$shadcn-default}:not(.disabled):active { --qds-button-fill: var(--qds-color-primary-pressed); color: var(--qds-button-on-fill); }
|
|
323
|
+
#{$shadcn} .q-btn#{$filled} { box-shadow: var(--qds-button-elevated-shadow); }
|
|
324
|
+
#{$shadcn} .q-btn--push { box-shadow: inset 0 calc(-1 * var(--qds-border-width-control)) 0 currentColor; }
|
|
325
|
+
#{$shadcn} .q-btn--push:not(.disabled):active { transform: translateY(var(--qds-border-width-control)); }
|
|
326
|
+
#{$shadcn} .q-btn--outline { border-color: var(--qds-control-stroke-strong); box-shadow: inset 0 0 0 100vmax var(--qds-button-outline-fill, var(--qds-control-fill-default)); }
|
|
327
|
+
#{$shadcn} .q-btn--outline:not(.disabled):hover { --qds-button-outline-fill: var(--qds-control-fill-hover); }
|
|
328
|
+
#{$shadcn} .q-btn--outline:not(.disabled):active { --qds-button-outline-fill: var(--qds-control-fill-pressed); }
|
|
329
|
+
#{$shadcn} .q-btn:is(.q-btn--flat, .q-btn--outline):not(.disabled):is(:hover, :active) { --qds-button-state: transparent; }
|
|
330
|
+
#{$shadcn} .q-btn--flat:not(.disabled):hover { background-color: var(--qds-control-fill-hover); }
|
|
331
|
+
#{$shadcn} .q-btn--flat:not(.disabled):active { background-color: var(--qds-control-fill-pressed); }
|
|
332
|
+
#{$shadcn} .q-btn.qds-button--link { color: var(--qds-fg-primary); background: transparent; border-color: transparent; box-shadow: none; text-underline-offset: var(--qds-space-xs); }
|
|
333
|
+
#{$shadcn} .q-btn.qds-button--link:hover { text-decoration: underline; }
|
|
334
|
+
#{$shadcn} .q-btn .q-btn__progress-indicator { background: var(--qds-button-progress-fill, var(--qds-color-primary-pressed)); opacity: 1; }
|
|
335
|
+
#{$shadcn} .q-btn:is(#{$accent-fills}):not(.qds-tonal) {
|
|
336
|
+
--qds-button-disabled-fill: var(--_qds-fill);
|
|
337
|
+
--qds-button-disabled-stroke: transparent;
|
|
338
|
+
--qds-button-progress-fill: var(--_qds-pressed);
|
|
339
|
+
--qds-text-on-fill-pressed-mix: var(--_qds-pressed-mix);
|
|
340
|
+
border-color: transparent;
|
|
341
|
+
}
|
|
342
|
+
#{$shadcn} .q-btn:is(#{$accent-fills}):not(.qds-tonal, .disabled):hover { --qds-button-fill: var(--_qds-hover); }
|
|
343
|
+
#{$shadcn} .q-btn:is(#{$accent-fills}):not(.qds-tonal, .disabled):active { --qds-button-fill: var(--_qds-pressed); --qds-button-on-fill: var(--_qds-on); }
|
|
344
|
+
@media (forced-colors: active) { #{$shadcn} .q-btn { --qds-button-disabled-stroke: ButtonText; border-color: ButtonText; box-shadow: none; } }
|
|
345
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
@use '../materials';
|
|
2
|
+
@use '../../themes/shadcn';
|
|
3
|
+
|
|
4
|
+
$ink: ':is(.qds-ui.qds-variant-ink, .qds-ui .qds-variant-ink)';
|
|
5
|
+
$one: ':is(.qds-ui.qds-variant-one, .qds-ui .qds-variant-one)';
|
|
6
|
+
$term: ':is(.qds-ui.qds-variant-term, .qds-ui .qds-variant-term)';
|
|
7
|
+
$atrium: ':is(.qds-ui.qds-variant-atrium, .qds-ui .qds-variant-atrium)';
|
|
8
|
+
$zen: ':is(.qds-ui.qds-variant-zen, .qds-ui .qds-variant-zen)';
|
|
9
|
+
$shadcn: '.qds-variant-shadcn:is(.qds-ui, .qds-ui *)';
|
|
10
|
+
$framed: '.q-card--bordered, .qds-card--readable, .qds-card--contrast, .qds-card--opaque, .qds-card--solid';
|
|
11
|
+
$explicit-dark: '.qds-ui.qds-theme-light :is(.q-card--dark, .q-table--dark, .q-tree--dark, .q-stepper--dark, .q-list--dark, .q-menu--dark, .q-uploader--dark, .q-date--dark, .q-time--dark)';
|
|
12
|
+
|
|
13
|
+
@mixin styles {
|
|
14
|
+
// A `dark` prop on a light page re-points the semantic aliases at an inverted surface.
|
|
15
|
+
#{$explicit-dark} {
|
|
16
|
+
--qds-fg-default: var(--qds-surface-0);
|
|
17
|
+
--qds-fg-strong: var(--qds-surface-0);
|
|
18
|
+
--qds-fg-muted: color-mix(in srgb, var(--qds-surface-0) 72%, var(--qds-text-muted));
|
|
19
|
+
--qds-fg-disabled: color-mix(in srgb, var(--qds-surface-0) 40%, var(--qds-text-strong));
|
|
20
|
+
--qds-fg-brand: var(--qds-fg-primary);
|
|
21
|
+
--qds-bg-canvas: var(--qds-text-strong);
|
|
22
|
+
--qds-bg-card: var(--qds-text-strong);
|
|
23
|
+
--qds-bg-flyout: var(--qds-text-strong);
|
|
24
|
+
--qds-menu-bg: var(--qds-text-strong);
|
|
25
|
+
--qds-material-thin-bg: var(--qds-text-strong);
|
|
26
|
+
--qds-material-regular-bg: var(--qds-text-strong);
|
|
27
|
+
--qds-material-thick-bg: var(--qds-text-strong);
|
|
28
|
+
--qds-material-thin-filter: none;
|
|
29
|
+
--qds-material-regular-filter: none;
|
|
30
|
+
--qds-material-thick-filter: none;
|
|
31
|
+
--qds-material-edge: inset 0 0 0 0 transparent;
|
|
32
|
+
--qds-material-stroke: var(--qds-stroke-subtle);
|
|
33
|
+
--qds-bg-card-hover: color-mix(in srgb, var(--qds-surface-0) 6%, var(--qds-text-strong));
|
|
34
|
+
--qds-bg-surface-1: color-mix(in srgb, var(--qds-surface-0) 6%, var(--qds-text-strong));
|
|
35
|
+
--qds-bg-surface-2: color-mix(in srgb, var(--qds-surface-0) 10%, var(--qds-text-strong));
|
|
36
|
+
--qds-bg-layer: color-mix(in srgb, var(--qds-surface-0) 16%, var(--qds-text-strong));
|
|
37
|
+
--qds-control-fill-default: var(--qds-text-strong);
|
|
38
|
+
--qds-control-fill-hover: color-mix(in srgb, var(--qds-surface-0) 6%, var(--qds-text-strong));
|
|
39
|
+
--qds-control-fill-pressed: color-mix(in srgb, var(--qds-surface-0) 10%, var(--qds-text-strong));
|
|
40
|
+
--qds-control-fill-disabled: color-mix(in srgb, var(--qds-surface-0) 10%, var(--qds-text-strong));
|
|
41
|
+
--qds-control-stroke-default: color-mix(in srgb, var(--qds-surface-0) 8%, transparent);
|
|
42
|
+
--qds-control-stroke-top: color-mix(in srgb, var(--qds-surface-0) 10%, transparent);
|
|
43
|
+
--qds-control-stroke-bottom: var(--qds-control-stroke-default);
|
|
44
|
+
--qds-control-stroke-secondary: color-mix(in srgb, var(--qds-surface-0) 14%, transparent);
|
|
45
|
+
--qds-control-stroke-strong: color-mix(in srgb, var(--qds-surface-0) 54%, transparent);
|
|
46
|
+
--qds-control-stroke-on-accent-top: color-mix(in srgb, var(--qds-surface-0) 14%, transparent);
|
|
47
|
+
--qds-control-stroke-on-accent-bottom: color-mix(in srgb, var(--qds-text-strong) 40%, transparent);
|
|
48
|
+
--qds-control-fill-input-active: color-mix(in srgb, var(--qds-surface-0) 4%, var(--qds-text-strong));
|
|
49
|
+
--qds-card-fill: var(--qds-text-strong);
|
|
50
|
+
--qds-card-stroke: var(--qds-stroke-subtle);
|
|
51
|
+
--qds-field-label-bg: var(--qds-text-strong);
|
|
52
|
+
--qds-stroke-default: color-mix(in srgb, var(--qds-surface-0) 36%, transparent);
|
|
53
|
+
--qds-stroke-subtle: color-mix(in srgb, var(--qds-surface-0) 16%, transparent);
|
|
54
|
+
--qds-stroke-divider: color-mix(in srgb, var(--qds-surface-0) 16%, transparent);
|
|
55
|
+
--qds-stroke-strong: color-mix(in srgb, var(--qds-surface-0) 64%, transparent);
|
|
56
|
+
--qds-stroke-focus: var(--qds-fg-primary);
|
|
57
|
+
--qds-tab-active-rail: var(--qds-fg-primary);
|
|
58
|
+
--qds-state-hover: color-mix(in srgb, var(--qds-surface-0) 8%, transparent);
|
|
59
|
+
--qds-state-pressed: color-mix(in srgb, var(--qds-surface-0) 12%, transparent);
|
|
60
|
+
--qds-state-selected: color-mix(in srgb, var(--qds-fg-primary) 24%, transparent);
|
|
61
|
+
--qds-surface-brand-soft: color-mix(in srgb, var(--qds-color-primary) 36%, var(--qds-text-strong));
|
|
62
|
+
|
|
63
|
+
@each $role in primary, secondary, accent, positive, negative, warning, info {
|
|
64
|
+
--qds-fg-#{$role}: color-mix(in srgb, var(--qds-color-#{$role}) 50%, var(--qds-surface-0));
|
|
65
|
+
}
|
|
66
|
+
@each $role in accent, positive, negative, warning, info {
|
|
67
|
+
--qds-surface-#{$role}-soft: color-mix(in srgb, var(--qds-color-#{$role}) 28%, var(--qds-text-strong));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
color: var(--qds-fg-default);
|
|
71
|
+
}
|
|
72
|
+
#{$explicit-dark} .qds-text-muted { color: var(--qds-fg-muted); }
|
|
73
|
+
#{$explicit-dark} .qds-text-strong { color: var(--qds-fg-strong); }
|
|
74
|
+
|
|
75
|
+
// One palette/material closure after native inversion, with no geometry copies.
|
|
76
|
+
@include shadcn.local-scopes(':is(.q-card--dark, .q-table--dark, .q-tree--dark, .q-stepper--dark, .q-list--dark, .q-menu--dark, .q-uploader--dark, .q-date--dark, .q-time--dark, .q-bar--dark, .q-drawer--dark, .q-tab-panels--dark, .q-timeline--dark, .q-editor--dark)', dark, $shadcn);
|
|
77
|
+
// QBar is the native family with an explicit observable light class.
|
|
78
|
+
@include shadcn.local-scopes('.q-bar--light', light, $shadcn);
|
|
79
|
+
|
|
80
|
+
.qds-ui :is(.q-card, .qds-card, .qds-tile) {
|
|
81
|
+
color: var(--qds-fg-default);
|
|
82
|
+
background: var(--qds-card-fill);
|
|
83
|
+
border: var(--qds-border-width-control) solid var(--qds-card-stroke);
|
|
84
|
+
border-radius: var(--qds-card-radius);
|
|
85
|
+
box-shadow: var(--qds-card-shadow);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.qds-ui .q-card--bordered,
|
|
89
|
+
.qds-ui :is(.q-card, .qds-card):is(.qds-card--readable, .qds-card--contrast, .qds-card--opaque, .qds-card--solid) { border: var(--qds-border-width-control) solid var(--qds-stroke-default); }
|
|
90
|
+
.qds-ui :is(.q-card, .qds-card).qds-card--transient { background: var(--qds-surface-transient); box-shadow: var(--qds-shadow-md); }
|
|
91
|
+
.qds-ui :is(.q-card.cursor-pointer, a.q-card, .q-card[tabindex='0']):hover { background: var(--qds-bg-card-hover); }
|
|
92
|
+
.qds-ui .q-card > .q-card__section:is(.qds-card__header, .qds-card-header) { padding: var(--qds-space-md); border-block-end: var(--qds-border-width-control) solid var(--qds-stroke-divider); }
|
|
93
|
+
.qds-ui .q-card > .q-card__section:is(.qds-card__header--accent, .qds-card-header--accent) { color: var(--qds-fg-strong); background: var(--qds-surface-brand-soft); }
|
|
94
|
+
.qds-ui :is(.q-card, .qds-card) :is(.q-card, .qds-card, .qds-tile) { background: var(--qds-bg-surface-1); box-shadow: none; }
|
|
95
|
+
.qds-ui :is(.q-card, .qds-card) :is(.q-card, .qds-card, .qds-tile):where(:not(#{$framed})) { border: 0; }
|
|
96
|
+
.qds-ui .q-dialog__inner--maximized > .q-card { background: var(--qds-bg-card); }
|
|
97
|
+
|
|
98
|
+
.qds-ui .qds-material {
|
|
99
|
+
border: var(--qds-border-width-control) solid var(--qds-material-stroke);
|
|
100
|
+
box-shadow: var(--qds-material-edge), var(--qds-card-shadow);
|
|
101
|
+
@include materials.material(regular);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@each $level in thin, thick {
|
|
105
|
+
.qds-ui .qds-material.qds-material--#{$level} { @include materials.material($level); }
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
#{$ink} :is(.q-card, .qds-card) :is(.q-card, .qds-card, .qds-tile):where(:not(#{$framed})) { border: var(--qds-border-width-control) solid var(--qds-card-stroke); }
|
|
109
|
+
#{$one} .q-card > .q-card__section:is(.qds-card__header, .qds-card-header) { border-block-end-color: transparent; }
|
|
110
|
+
#{$one} :is(.q-card, .qds-card) :is(.q-card, .qds-card, .qds-tile, .qds-settings-card, .q-carousel) { --qds-card-fill: var(--qds-surface-focus-block); --qds-control-fill-default: var(--qds-surface-0); }
|
|
111
|
+
#{$one} :is(.q-card, .qds-card) :is(.q-card, .qds-card, .qds-tile):where(:not(.qds-material, .qds-card--transient)) { background: var(--qds-card-fill); }
|
|
112
|
+
#{$term} :is(.q-card, .qds-card, .qds-tile):where(:not(.qds-material, .qds-card--transient)) { background: var(--qds-card-fill); }
|
|
113
|
+
#{$term} :is(.q-card, .qds-card) :is(.q-card, .qds-card, .qds-tile):where(:not(.qds-material, .qds-card--transient)) { background: var(--qds-bg-surface-1); }
|
|
114
|
+
#{$term} :is(.q-card, .qds-card) :is(.q-card, .qds-card, .qds-tile):where(:not(#{$framed})) { border: var(--qds-border-width-control) solid var(--qds-card-stroke); }
|
|
115
|
+
|
|
116
|
+
// Panels float: one hairline, a soft drop, no ruled header.
|
|
117
|
+
#{$atrium} :is(.q-card, .qds-card, .qds-tile) { border-color: var(--qds-border-subtle); box-shadow: var(--qds-shadow-md); }
|
|
118
|
+
#{$atrium} .q-card > .q-card__section--vert { padding: var(--qds-space-md) var(--qds-space-lg); }
|
|
119
|
+
#{$atrium} .q-card > .q-card__section:is(.qds-card__header, .qds-card-header) { padding: var(--qds-space-md) var(--qds-space-lg); border-block-end-color: transparent; }
|
|
120
|
+
#{$atrium} .q-card > .q-card__actions { justify-content: flex-end; gap: var(--qds-space-sm); padding: 0 var(--qds-space-lg) var(--qds-space-md); }
|
|
121
|
+
#{$atrium} .q-card > .q-card__actions .q-btn + .q-btn { margin-inline-start: 0; }
|
|
122
|
+
#{$atrium} :is(.q-card, .qds-card) :is(.q-card, .qds-card, .qds-tile) { background: var(--qds-bg-surface-1); border-radius: var(--qds-radius-control); box-shadow: none; }
|
|
123
|
+
#{$atrium} .q-card.q-card--flat { box-shadow: none; }
|
|
124
|
+
#{$atrium} .q-card.q-card--square { border-radius: 0; }
|
|
125
|
+
|
|
126
|
+
// Blocks nest by tone, never by a second drop.
|
|
127
|
+
#{$zen} :is(.q-card, .qds-card, .qds-tile) { border: 1px solid var(--qds-stroke-strong); border-radius: var(--qds-radius-lg); background: var(--qds-bg-card); box-shadow: var(--qds-shadow-sm); }
|
|
128
|
+
#{$zen} .q-card > .q-card__section--vert { padding: var(--qds-space-md) var(--qds-space-lg); }
|
|
129
|
+
#{$zen} .q-card > .q-card__section:is(.qds-card__header, .qds-card-header) { padding: var(--qds-space-md) var(--qds-space-lg); border-block-end: 1px solid var(--qds-stroke-strong); background: none; }
|
|
130
|
+
#{$zen} .q-card > .q-card__actions { gap: var(--qds-space-sm); padding: var(--qds-space-sm) var(--qds-space-lg) var(--qds-space-md); }
|
|
131
|
+
#{$zen} .q-card > .q-card__actions .q-btn + .q-btn { margin-inline-start: 0; }
|
|
132
|
+
#{$zen} :is(.q-card, .qds-card) :is(.q-card, .qds-card, .qds-tile) { border-radius: var(--qds-radius-control); background: var(--qds-bg-surface-1); box-shadow: none; }
|
|
133
|
+
#{$zen} .q-card.q-card--flat { box-shadow: none; }
|
|
134
|
+
#{$zen} .q-card.q-card--square { border-radius: 0; }
|
|
135
|
+
#{$zen} .q-card:focus-visible { outline: var(--qds-focus-ring-width) solid var(--qds-stroke-focus); outline-offset: var(--qds-focus-ring-offset); }
|
|
136
|
+
|
|
137
|
+
#{$shadcn} :is(.q-card, .qds-card, .qds-tile) { color: var(--qds-shadcn-card-foreground); }
|
|
138
|
+
#{$shadcn} .q-card > .q-card__section--vert { padding: var(--qds-space-lg); }
|
|
139
|
+
#{$shadcn} .q-card > .q-card__section--vert:where(:not(.qds-card__header, .qds-card-header)) + .q-card__section--vert { padding-block-start: 0; }
|
|
140
|
+
#{$shadcn} .q-card > .q-card__section:is(.qds-card__header, .qds-card-header) { padding: var(--qds-space-lg); }
|
|
141
|
+
#{$shadcn} .q-card > .q-card__section:is(.qds-card__header--accent, .qds-card-header--accent) { color: var(--qds-fg-default); background: var(--qds-state-selected); }
|
|
142
|
+
#{$shadcn} .q-card > .q-card__actions { padding: var(--qds-space-sm) var(--qds-space-lg) var(--qds-space-lg); gap: var(--qds-space-sm); }
|
|
143
|
+
#{$shadcn} .q-card > .q-card__actions--vert { padding: var(--qds-space-lg); }
|
|
144
|
+
#{$shadcn} .q-card > .q-card__actions .q-btn + .q-btn { margin-inline-start: 0; }
|
|
145
|
+
#{$shadcn} :is(.q-card, .qds-card) :is(.q-card, .qds-card, .qds-tile) { background: var(--qds-card-fill); border: var(--qds-border-width-control) solid var(--qds-card-stroke); box-shadow: var(--qds-shadow-sm); }
|
|
146
|
+
#{$shadcn} :is(.q-card, .qds-card) :is(.q-card, .qds-card).qds-card--transient { background: var(--qds-surface-transient); box-shadow: var(--qds-shadow-md); }
|
|
147
|
+
#{$shadcn} .q-card.q-card--flat { box-shadow: none; }
|
|
148
|
+
#{$shadcn} .q-card.q-card--square { border-radius: 0; }
|
|
149
|
+
#{$shadcn} .q-card:focus-visible { outline: var(--qds-focus-ring-width) solid var(--qds-stroke-focus); outline-offset: var(--qds-focus-ring-offset); }
|
|
150
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'button';
|
|
3
|
+
@use '../materials';
|
|
4
|
+
@use '../importance';
|
|
5
|
+
|
|
6
|
+
// Palette grey takes the neutral layer, as role chips take their tonal fill.
|
|
7
|
+
$tonal-fills: ();
|
|
8
|
+
|
|
9
|
+
@each $role, $_ in button.$roles {
|
|
10
|
+
$tonal-fills: map.set($tonal-fills, $role, (fg: button.role-value($role, fg), bg: button.role-soft($role)));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
$tonal-fills: map.set($tonal-fills, 'grey', (fg: var(--qds-fg-default), bg: var(--qds-bg-layer)));
|
|
14
|
+
$zen: ':is(.qds-ui.qds-variant-zen, .qds-ui .qds-variant-zen)';
|
|
15
|
+
|
|
16
|
+
@mixin styles {
|
|
17
|
+
.qds-ui .q-chip {
|
|
18
|
+
gap: var(--qds-chip-icon-gap);
|
|
19
|
+
height: auto;
|
|
20
|
+
min-height: var(--qds-chip-min-height);
|
|
21
|
+
padding: var(--qds-chip-padding);
|
|
22
|
+
color: var(--qds-fg-default);
|
|
23
|
+
background: var(--qds-control-fill-default);
|
|
24
|
+
border: var(--qds-border-width-control) solid;
|
|
25
|
+
@include materials.elevation-border;
|
|
26
|
+
border-radius: var(--qds-chip-radius);
|
|
27
|
+
font-weight: var(--qds-font-weight-medium);
|
|
28
|
+
letter-spacing: var(--qds-control-letter-spacing);
|
|
29
|
+
transition:
|
|
30
|
+
background-color var(--qds-motion-fast),
|
|
31
|
+
border-color var(--qds-motion-fast),
|
|
32
|
+
box-shadow var(--qds-motion-fast),
|
|
33
|
+
color var(--qds-motion-fast);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.qds-ui .q-chip--square {
|
|
37
|
+
border-radius: var(--qds-radius-sm);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.qds-ui .q-chip--dense,
|
|
41
|
+
.qds-ui .q-field--dense .q-chip {
|
|
42
|
+
min-height: var(--qds-chip-dense-min-height);
|
|
43
|
+
padding: var(--qds-chip-dense-padding);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.qds-ui .q-chip--clickable:where(:not(.q-chip--selected)):hover {
|
|
47
|
+
background-color: var(--qds-control-fill-hover);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.qds-ui .q-chip--clickable:where(:not(.q-chip--selected)):active {
|
|
51
|
+
background-color: var(--qds-control-fill-pressed);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.qds-ui .q-chip:where([class*='bg-']) {
|
|
55
|
+
border-color: transparent;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.qds-ui .q-chip.q-chip--clickable[tabindex]:focus {
|
|
59
|
+
box-shadow: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.qds-ui .q-chip.q-chip--clickable[tabindex]:is(.q-chip--selected, :hover) {
|
|
63
|
+
box-shadow: var(--qds-control-halo);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.qds-ui .q-chip--selected:has(> .q-chip__content > svg:first-child) > .q-chip__icon--left { display: none; }
|
|
67
|
+
|
|
68
|
+
.qds-ui .q-chip:focus-visible {
|
|
69
|
+
outline: var(--qds-focus-ring-width) solid var(--qds-stroke-focus);
|
|
70
|
+
outline-offset: var(--qds-focus-ring-offset);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.qds-ui .q-chip--selected {
|
|
74
|
+
color: var(--qds-fg-brand);
|
|
75
|
+
background-color: var(--qds-surface-brand-soft);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.qds-ui .q-chip--outline {
|
|
79
|
+
background: transparent;
|
|
80
|
+
border-color: var(--qds-stroke-default);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.qds-ui .q-chip .q-chip__content {
|
|
84
|
+
align-items: center;
|
|
85
|
+
gap: var(--qds-chip-icon-gap);
|
|
86
|
+
color: inherit;
|
|
87
|
+
line-height: var(--qds-control-content-line-height);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.qds-ui .q-chip--dense,
|
|
91
|
+
.qds-ui .q-field--dense .q-chip,
|
|
92
|
+
.qds-ui .q-chip--dense .q-chip__content,
|
|
93
|
+
.qds-ui .q-field--dense .q-chip .q-chip__content {
|
|
94
|
+
gap: var(--qds-chip-dense-icon-gap);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.qds-ui .q-chip .q-chip__icon {
|
|
98
|
+
width: var(--qds-chip-icon-size);
|
|
99
|
+
min-width: var(--qds-chip-icon-size);
|
|
100
|
+
height: var(--qds-chip-icon-size);
|
|
101
|
+
margin: 0;
|
|
102
|
+
color: currentColor;
|
|
103
|
+
font-size: var(--qds-chip-icon-size);
|
|
104
|
+
opacity: var(--qds-control-icon-opacity);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.qds-ui .q-chip--dense .q-chip__icon,
|
|
108
|
+
.qds-ui .q-field--dense .q-chip .q-chip__icon {
|
|
109
|
+
width: var(--qds-chip-dense-icon-size);
|
|
110
|
+
min-width: var(--qds-chip-dense-icon-size);
|
|
111
|
+
height: var(--qds-chip-dense-icon-size);
|
|
112
|
+
font-size: var(--qds-chip-dense-icon-size);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.qds-ui .q-chip .q-chip__icon--remove {
|
|
116
|
+
border-radius: var(--qds-radius-full);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.qds-ui .q-chip .q-chip__icon--remove:focus-visible {
|
|
120
|
+
outline: var(--qds-focus-ring-width) solid var(--qds-stroke-focus);
|
|
121
|
+
opacity: 1;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@each $fill, $tone in $tonal-fills {
|
|
125
|
+
.qds-ui .q-chip.bg-#{$fill}:not(.qds-solid) {
|
|
126
|
+
@include importance.declarations { color: map.get($tone, fg) !important; background-color: map.get($tone, bg) !important; }
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@if map.has-key(button.$roles, $fill) {
|
|
130
|
+
.qds-ui .q-chip.bg-#{$fill}.qds-solid {
|
|
131
|
+
@include importance.declarations { color: var(--qds-chip-on-fill, var(--qds-text-on-#{$fill})) !important; background-color: var(--qds-chip-fill, var(--qds-color-#{$fill})) !important; }
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.qds-ui .q-chip.text-#{$fill} {
|
|
135
|
+
@include importance.declarations { color: var(--qds-chip-on-fill, #{button.role-value($fill, fg)}) !important; }
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.qds-ui .q-chip--outline.text-#{$fill} {
|
|
139
|
+
border-color: currentColor;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@media (forced-colors: active) {
|
|
145
|
+
.qds-ui .q-chip {
|
|
146
|
+
border-color: ButtonText;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
#{button.$shadcn} .q-chip { border-color: var(--qds-card-stroke); box-shadow: none; }
|
|
151
|
+
#{button.$shadcn} .q-chip--clickable:where(:not([class*='bg-'])), #{button.$shadcn} .q-chip--clickable.qds-solid:is(.bg-secondary, .bg-accent):not(.disabled) { border-color: var(--qds-control-stroke-strong); }
|
|
152
|
+
#{button.$shadcn} .q-chip .q-chip__icon--remove:hover { background: var(--qds-state-hover); opacity: 1; }
|
|
153
|
+
#{button.$shadcn} .q-chip.q-chip--clickable[tabindex]:is(.q-chip--selected, :hover) { box-shadow: none; }
|
|
154
|
+
#{button.$shadcn} .q-chip:is(#{button.$accent-fills}).qds-solid { --qds-chip-on-fill: var(--_qds-on); border-color: transparent; }
|
|
155
|
+
#{button.$shadcn} .q-chip:is(#{button.$accent-fills}).qds-solid.q-chip--clickable:not(.disabled):hover { --qds-chip-fill: var(--_qds-hover); }
|
|
156
|
+
#{button.$shadcn} .q-chip:is(#{button.$accent-fills}).qds-solid.q-chip--clickable:not(.disabled):active { --qds-chip-fill: var(--_qds-pressed); }
|
|
157
|
+
@media (forced-colors: active) { #{button.$shadcn} .q-chip { border-color: ButtonText; } }
|
|
158
|
+
|
|
159
|
+
#{$zen} .q-chip { border: 1px solid var(--qds-stroke-strong); border-radius: var(--qds-radius-full); background: var(--qds-bg-surface-1); }
|
|
160
|
+
#{$zen} .q-chip:is([class*='bg-']) { border-color: transparent; }
|
|
161
|
+
#{$zen} .q-chip.q-chip--clickable:not(.disabled):hover { background: var(--qds-bg-surface-2); }
|
|
162
|
+
}
|