procode-vs-theme 2.2.0 → 2.4.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 +214 -45
- package/dist/components.esm.js +28 -4
- package/dist/components.esm.js.map +1 -1
- package/dist/components.js +35 -3
- package/dist/components.js.map +1 -1
- package/dist/index.esm.js +41 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +41 -5
- package/dist/index.js.map +1 -1
- package/dist/src/base/_border.scss +21 -12
- package/dist/src/base/_color.scss +106 -47
- package/dist/src/base/_custom-properties.scss +166 -111
- package/dist/src/base/_font.scss +61 -37
- package/dist/src/base/_size.scss +30 -17
- package/dist/src/base/_space.scss +53 -33
- package/dist/src/base/_variants.scss +128 -0
- package/dist/src/components/_alert.scss +83 -0
- package/dist/src/components/_badge.scss +100 -0
- package/dist/src/components/_buttons.scss +189 -420
- package/dist/src/components/_cards.scss +130 -0
- package/dist/src/components/_input.scss +186 -32
- package/dist/src/components/_link.scss +34 -0
- package/dist/src/components/_page.scss +87 -0
- package/dist/src/components/_pagination.scss +71 -0
- package/dist/src/components/_table.scss +171 -0
- package/dist/src/components/_tabs.scss +77 -0
- package/dist/src/components.ts +47 -23
- package/dist/src/index.scss +82 -71
- package/dist/src/utilities/_interaction.scss +72 -0
- package/dist/src/utilities/background-color/index.scss +13 -0
- package/dist/src/utilities/border/_border-color.scss +2 -0
- package/dist/src/utilities/box-shadow/index.scss +8 -8
- package/dist/src/utilities/typography/_color.scss +38 -34
- package/dist/src/variables.ts +38 -35
- package/dist/types/components.d.ts +18 -2
- package/dist/types/variables.d.ts +2 -0
- package/dist/variables.esm.js +4 -1
- package/dist/variables.esm.js.map +1 -1
- package/dist/variables.js +4 -0
- package/dist/variables.js.map +1 -1
- package/package.json +84 -84
- package/src/base/_border.scss +21 -12
- package/src/base/_color.scss +106 -47
- package/src/base/_custom-properties.scss +166 -111
- package/src/base/_font.scss +61 -37
- package/src/base/_size.scss +30 -17
- package/src/base/_space.scss +53 -33
- package/src/base/_variants.scss +128 -0
- package/src/components/_alert.scss +83 -0
- package/src/components/_badge.scss +100 -0
- package/src/components/_buttons.scss +189 -420
- package/src/components/_cards.scss +130 -0
- package/src/components/_input.scss +186 -32
- package/src/components/_link.scss +34 -0
- package/src/components/_page.scss +87 -0
- package/src/components/_pagination.scss +71 -0
- package/src/components/_table.scss +171 -0
- package/src/components/_tabs.scss +77 -0
- package/src/components.ts +47 -23
- package/src/index.scss +82 -71
- package/src/utilities/_interaction.scss +72 -0
- package/src/utilities/background-color/index.scss +13 -0
- package/src/utilities/border/_border-color.scss +2 -0
- package/src/utilities/box-shadow/index.scss +8 -8
- package/src/utilities/typography/_color.scss +38 -34
- package/src/variables.ts +38 -35
|
@@ -1,420 +1,189 @@
|
|
|
1
|
-
@use "sass:
|
|
2
|
-
@use "../base/
|
|
3
|
-
@use "../base/
|
|
4
|
-
@use "../base/
|
|
5
|
-
@use "../base/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
color:
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
color:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
&:hover {
|
|
192
|
-
background-color: color.adjust(cl.$background-info, $lightness: -8%);
|
|
193
|
-
border-color: color.adjust(cl.$border-info, $lightness: -8%);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
&:active {
|
|
197
|
-
background-color: color.adjust(cl.$background-info, $lightness: -12%);
|
|
198
|
-
border-color: color.adjust(cl.$border-info, $lightness: -12%);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
&:disabled {
|
|
202
|
-
opacity: 0.5;
|
|
203
|
-
cursor: not-allowed;
|
|
204
|
-
border-color: cl.$border-info;
|
|
205
|
-
color: cl.$border-info;
|
|
206
|
-
|
|
207
|
-
&:hover {
|
|
208
|
-
background-color: cl.$background-info;
|
|
209
|
-
border-color: cl.$border-info;
|
|
210
|
-
color: cl.$border-info;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
// Outline variants: transparent bg + colored border/text → hover fills color + white text
|
|
216
|
-
|
|
217
|
-
&.qo-btn-outline-primary {
|
|
218
|
-
background-color: transparent;
|
|
219
|
-
border: bo.$border-width-sm solid cl.$border-primary;
|
|
220
|
-
color: cl.$text-primary;
|
|
221
|
-
cursor: pointer;
|
|
222
|
-
transition: background-color 0.2s ease, border-color 0.2s ease,
|
|
223
|
-
color 0.2s ease;
|
|
224
|
-
|
|
225
|
-
&:hover {
|
|
226
|
-
background-color: cl.$background-primary;
|
|
227
|
-
border-color: cl.$border-primary;
|
|
228
|
-
color: cl.$text-light;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
&:active {
|
|
232
|
-
background-color: color.adjust(cl.$background-primary, $lightness: -8%);
|
|
233
|
-
border-color: color.adjust(cl.$border-primary, $lightness: -8%);
|
|
234
|
-
color: cl.$text-light;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
&:disabled {
|
|
238
|
-
opacity: 0.5;
|
|
239
|
-
cursor: not-allowed;
|
|
240
|
-
border-color: cl.$border-primary;
|
|
241
|
-
color: cl.$border-primary;
|
|
242
|
-
|
|
243
|
-
&:hover {
|
|
244
|
-
background-color: transparent;
|
|
245
|
-
border-color: cl.$border-primary;
|
|
246
|
-
color: cl.$border-primary;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
&.qo-btn-outline-default {
|
|
252
|
-
background-color: transparent;
|
|
253
|
-
border: bo.$border-width-sm solid cl.$border-default;
|
|
254
|
-
color: cl.$text-light;
|
|
255
|
-
cursor: pointer;
|
|
256
|
-
transition: background-color 0.2s ease, border-color 0.2s ease,
|
|
257
|
-
color 0.2s ease;
|
|
258
|
-
|
|
259
|
-
&:hover {
|
|
260
|
-
background-color: cl.$background-secondary;
|
|
261
|
-
border-color: cl.$border-secondary;
|
|
262
|
-
color: color.adjust(cl.$text-dark, $lightness: 20%);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
&:active {
|
|
266
|
-
background-color: color.adjust(cl.$background-secondary, $lightness: -4%);
|
|
267
|
-
border-color: cl.$border-secondary;
|
|
268
|
-
color: cl.$text-light;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
&:disabled {
|
|
272
|
-
opacity: 0.5;
|
|
273
|
-
cursor: not-allowed;
|
|
274
|
-
border-color: cl.$border-default;
|
|
275
|
-
color: cl.$border-default;
|
|
276
|
-
|
|
277
|
-
&:hover {
|
|
278
|
-
background-color: transparent;
|
|
279
|
-
border-color: cl.$border-default;
|
|
280
|
-
color: cl.$border-default;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
&.qo-btn-outline-danger {
|
|
286
|
-
background-color: transparent;
|
|
287
|
-
border: bo.$border-width-sm solid cl.$border-danger;
|
|
288
|
-
color: cl.$text-danger;
|
|
289
|
-
cursor: pointer;
|
|
290
|
-
transition: background-color 0.2s ease, border-color 0.2s ease,
|
|
291
|
-
color 0.2s ease;
|
|
292
|
-
|
|
293
|
-
&:hover {
|
|
294
|
-
background-color: cl.$background-danger;
|
|
295
|
-
border-color: cl.$border-danger;
|
|
296
|
-
color: cl.$text-light;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
&:active {
|
|
300
|
-
background-color: color.adjust(cl.$background-danger, $lightness: -8%);
|
|
301
|
-
border-color: color.adjust(cl.$border-danger, $lightness: -8%);
|
|
302
|
-
color: cl.$text-light;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
&:disabled {
|
|
306
|
-
opacity: 0.5;
|
|
307
|
-
cursor: not-allowed;
|
|
308
|
-
border-color: cl.$border-danger;
|
|
309
|
-
color: cl.$border-danger;
|
|
310
|
-
|
|
311
|
-
&:hover {
|
|
312
|
-
background-color: transparent;
|
|
313
|
-
border-color: cl.$border-danger;
|
|
314
|
-
color: cl.$border-danger;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
&.qo-btn-outline-success {
|
|
320
|
-
background-color: transparent;
|
|
321
|
-
border: bo.$border-width-sm solid cl.$border-success;
|
|
322
|
-
color: cl.$text-success;
|
|
323
|
-
cursor: pointer;
|
|
324
|
-
transition: background-color 0.2s ease, border-color 0.2s ease,
|
|
325
|
-
color 0.2s ease;
|
|
326
|
-
|
|
327
|
-
&:hover {
|
|
328
|
-
background-color: cl.$background-success;
|
|
329
|
-
border-color: cl.$border-success;
|
|
330
|
-
color: cl.$text-light;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
&:active {
|
|
334
|
-
background-color: color.adjust(cl.$background-success, $lightness: -8%);
|
|
335
|
-
border-color: color.adjust(cl.$border-success, $lightness: -8%);
|
|
336
|
-
color: cl.$text-light;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
&:disabled {
|
|
340
|
-
opacity: 0.5;
|
|
341
|
-
cursor: not-allowed;
|
|
342
|
-
border-color: cl.$border-success;
|
|
343
|
-
color: cl.$border-success;
|
|
344
|
-
|
|
345
|
-
&:hover {
|
|
346
|
-
background-color: transparent;
|
|
347
|
-
border-color: cl.$border-success;
|
|
348
|
-
color: cl.$border-success;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
&.qo-btn-outline-warning {
|
|
354
|
-
background-color: transparent;
|
|
355
|
-
border: bo.$border-width-sm solid cl.$border-warning;
|
|
356
|
-
color: cl.$text-warning;
|
|
357
|
-
cursor: pointer;
|
|
358
|
-
transition: background-color 0.2s ease, border-color 0.2s ease,
|
|
359
|
-
color 0.2s ease;
|
|
360
|
-
|
|
361
|
-
&:hover {
|
|
362
|
-
background-color: cl.$background-warning;
|
|
363
|
-
border-color: cl.$border-warning;
|
|
364
|
-
color: cl.$text-light;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
&:active {
|
|
368
|
-
background-color: color.adjust(cl.$background-warning, $lightness: -8%);
|
|
369
|
-
border-color: color.adjust(cl.$border-warning, $lightness: -8%);
|
|
370
|
-
color: cl.$text-light;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
&:disabled {
|
|
374
|
-
opacity: 0.5;
|
|
375
|
-
cursor: not-allowed;
|
|
376
|
-
border-color: cl.$border-warning;
|
|
377
|
-
color: cl.$border-warning;
|
|
378
|
-
|
|
379
|
-
&:hover {
|
|
380
|
-
background-color: transparent;
|
|
381
|
-
border-color: cl.$border-warning;
|
|
382
|
-
color: cl.$border-warning;
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
&.qo-btn-outline-info {
|
|
388
|
-
background-color: transparent;
|
|
389
|
-
border: bo.$border-width-sm solid cl.$border-info;
|
|
390
|
-
color: cl.$text-info;
|
|
391
|
-
cursor: pointer;
|
|
392
|
-
transition: background-color 0.2s ease, border-color 0.2s ease,
|
|
393
|
-
color 0.2s ease;
|
|
394
|
-
|
|
395
|
-
&:hover {
|
|
396
|
-
background-color: cl.$background-info;
|
|
397
|
-
border-color: cl.$border-info;
|
|
398
|
-
color: cl.$text-light;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
&:active {
|
|
402
|
-
background-color: color.adjust(cl.$background-info, $lightness: -8%);
|
|
403
|
-
border-color: color.adjust(cl.$border-info, $lightness: -8%);
|
|
404
|
-
color: cl.$text-light;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
&:disabled {
|
|
408
|
-
opacity: 0.5;
|
|
409
|
-
cursor: not-allowed;
|
|
410
|
-
border-color: cl.$border-info;
|
|
411
|
-
color: cl.$border-info;
|
|
412
|
-
|
|
413
|
-
&:hover {
|
|
414
|
-
background-color: transparent;
|
|
415
|
-
border-color: cl.$border-info;
|
|
416
|
-
color: cl.$border-info;
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
}
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "../base/color" as cl;
|
|
3
|
+
@use "../base/border" as bo;
|
|
4
|
+
@use "../base/font" as ft;
|
|
5
|
+
@use "../base/space" as sp;
|
|
6
|
+
@use "../base/size" as sz;
|
|
7
|
+
@use "../base/variants" as vr;
|
|
8
|
+
|
|
9
|
+
// Buttons
|
|
10
|
+
//
|
|
11
|
+
// Bootstrap-shaped: one base class plus a variant class, e.g.
|
|
12
|
+
// <button class="qo-btn qo-btn-primary">
|
|
13
|
+
// <button class="qo-btn qo-btn-outline-danger qo-btn-sm">
|
|
14
|
+
//
|
|
15
|
+
// Every variant carries its own :hover, :active, :focus-visible and :disabled
|
|
16
|
+
// states — there are no separate state classes to add.
|
|
17
|
+
//
|
|
18
|
+
// Four families are generated from `$variants` (base/2.3.0):
|
|
19
|
+
// qo-btn-<v> solid fill
|
|
20
|
+
// qo-btn-outline-<v> transparent, coloured border, fills on hover
|
|
21
|
+
// qo-btn-soft-<v> tint fill, deepens on hover
|
|
22
|
+
// qo-btn-link-<v> text only, underlines on hover
|
|
23
|
+
|
|
24
|
+
$btn-padding-x: sp.$space-4 !default; // 16px
|
|
25
|
+
$btn-padding-x-sm: sp.$space-3 !default;
|
|
26
|
+
$btn-gap: sp.$space-2 !default;
|
|
27
|
+
|
|
28
|
+
// Size ramp: (height, horizontal padding, font-size, line-height)
|
|
29
|
+
$btn-sizes: (
|
|
30
|
+
xs: (24px, sp.$space-2, ft.$font-size-xs, ft.$line-height-xs),
|
|
31
|
+
sm: (sz.$control-height-sm, $btn-padding-x-sm, ft.$font-size-sm, ft.$line-height-sm),
|
|
32
|
+
md: (sz.$control-height, $btn-padding-x, ft.$font-size-md, ft.$line-height-md),
|
|
33
|
+
lg: (48px, sp.$space-5, ft.$font-size-lg, ft.$line-height-lg),
|
|
34
|
+
) !default;
|
|
35
|
+
|
|
36
|
+
.qo-btn {
|
|
37
|
+
min-height: sz.$control-height;
|
|
38
|
+
padding: 0 $btn-padding-x;
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
gap: $btn-gap;
|
|
43
|
+
border: bo.$border-width-sm solid transparent;
|
|
44
|
+
border-radius: bo.$border-radius-md;
|
|
45
|
+
background: transparent;
|
|
46
|
+
color: cl.$text-dark;
|
|
47
|
+
font-family: ft.$font-family-primary;
|
|
48
|
+
font-size: ft.$font-size-md;
|
|
49
|
+
font-weight: ft.$font-weight-medium;
|
|
50
|
+
line-height: 1;
|
|
51
|
+
white-space: nowrap;
|
|
52
|
+
text-decoration: none;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
transition: background-color 0.2s ease, border-color 0.2s ease,
|
|
55
|
+
color 0.2s ease, box-shadow 0.2s ease;
|
|
56
|
+
|
|
57
|
+
// The one focus treatment for every button. `:focus-visible` so a mouse
|
|
58
|
+
// click does not leave a ring behind, which is why the old hand-rolled
|
|
59
|
+
// `:focus` rings were being removed screen by screen.
|
|
60
|
+
&:focus-visible {
|
|
61
|
+
outline: 0;
|
|
62
|
+
box-shadow: cl.$focus-ring;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:disabled,
|
|
66
|
+
&.qo-disabled {
|
|
67
|
+
opacity: 0.48;
|
|
68
|
+
cursor: not-allowed;
|
|
69
|
+
box-shadow: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// ---- sizes ----
|
|
73
|
+
@each $name, $spec in $btn-sizes {
|
|
74
|
+
&.qo-btn-#{$name} {
|
|
75
|
+
min-height: nth($spec, 1);
|
|
76
|
+
padding: 0 nth($spec, 2);
|
|
77
|
+
font-size: nth($spec, 3);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Square icon-only button — one per size, so an icon button always lines up
|
|
82
|
+
// with the text button beside it.
|
|
83
|
+
&.qo-btn-icon {
|
|
84
|
+
width: sz.$control-height;
|
|
85
|
+
padding: 0;
|
|
86
|
+
@each $name, $spec in $btn-sizes {
|
|
87
|
+
&.qo-btn-#{$name} { width: nth($spec, 1); }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&.qo-btn-full {
|
|
92
|
+
display: flex;
|
|
93
|
+
width: 100%;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.qo-btn-pill { border-radius: bo.$border-radius-pill; }
|
|
97
|
+
&.qo-btn-square { border-radius: bo.$border-radius-0; }
|
|
98
|
+
|
|
99
|
+
// ---- solid ----
|
|
100
|
+
@each $name, $spec in vr.$variants {
|
|
101
|
+
&.qo-btn-#{$name} {
|
|
102
|
+
background-color: map.get($spec, base);
|
|
103
|
+
border-color: if($name == default, cl.$border-default, map.get($spec, base));
|
|
104
|
+
color: map.get($spec, on);
|
|
105
|
+
|
|
106
|
+
&:hover:not(:disabled):not(.qo-disabled) {
|
|
107
|
+
background-color: map.get($spec, hover);
|
|
108
|
+
border-color: if($name == default, cl.$border-secondary, map.get($spec, hover));
|
|
109
|
+
}
|
|
110
|
+
&:active:not(:disabled):not(.qo-disabled) {
|
|
111
|
+
background-color: map.get($spec, active);
|
|
112
|
+
border-color: if($name == default, cl.$border-secondary, map.get($spec, active));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// ---- outline ----
|
|
118
|
+
@each $name, $spec in vr.$variants {
|
|
119
|
+
&.qo-btn-outline-#{$name} {
|
|
120
|
+
background-color: transparent;
|
|
121
|
+
border-color: if($name == default, cl.$border-default, map.get($spec, base));
|
|
122
|
+
// `ink` rather than `base`: a pale variant's own fill is unreadable as
|
|
123
|
+
// text on a white page. This is what made `qo-btn-outline-default`
|
|
124
|
+
// invisible before 2.3.0 — it used $text-light on a transparent ground.
|
|
125
|
+
color: map.get($spec, ink);
|
|
126
|
+
|
|
127
|
+
&:hover:not(:disabled):not(.qo-disabled) {
|
|
128
|
+
background-color: map.get($spec, base);
|
|
129
|
+
border-color: map.get($spec, base);
|
|
130
|
+
color: map.get($spec, on);
|
|
131
|
+
}
|
|
132
|
+
&:active:not(:disabled):not(.qo-disabled) {
|
|
133
|
+
background-color: map.get($spec, active);
|
|
134
|
+
border-color: map.get($spec, active);
|
|
135
|
+
color: map.get($spec, on);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// ---- soft / tint ----
|
|
141
|
+
@each $name, $spec in vr.$variants {
|
|
142
|
+
&.qo-btn-soft-#{$name} {
|
|
143
|
+
background-color: map.get($spec, soft);
|
|
144
|
+
border-color: transparent;
|
|
145
|
+
color: map.get($spec, ink);
|
|
146
|
+
|
|
147
|
+
&:hover:not(:disabled):not(.qo-disabled) {
|
|
148
|
+
background-color: map.get($spec, base);
|
|
149
|
+
color: map.get($spec, on);
|
|
150
|
+
}
|
|
151
|
+
&:active:not(:disabled):not(.qo-disabled) {
|
|
152
|
+
background-color: map.get($spec, active);
|
|
153
|
+
color: map.get($spec, on);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// ---- link ----
|
|
159
|
+
@each $name, $spec in vr.$variants {
|
|
160
|
+
&.qo-btn-link-#{$name} {
|
|
161
|
+
min-height: auto;
|
|
162
|
+
padding: 0;
|
|
163
|
+
background: transparent;
|
|
164
|
+
border-color: transparent;
|
|
165
|
+
color: map.get($spec, ink);
|
|
166
|
+
|
|
167
|
+
&:hover:not(:disabled):not(.qo-disabled) {
|
|
168
|
+
color: map.get($spec, hover);
|
|
169
|
+
text-decoration: underline;
|
|
170
|
+
}
|
|
171
|
+
&:active:not(:disabled):not(.qo-disabled) { color: map.get($spec, active); }
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// A button group — adjacent buttons sharing one outline.
|
|
177
|
+
.qo-btn-group {
|
|
178
|
+
display: inline-flex;
|
|
179
|
+
align-items: center;
|
|
180
|
+
|
|
181
|
+
> .qo-btn {
|
|
182
|
+
border-radius: 0;
|
|
183
|
+
&:first-child { border-radius: bo.$border-radius-md 0 0 bo.$border-radius-md; }
|
|
184
|
+
&:last-child { border-radius: 0 bo.$border-radius-md bo.$border-radius-md 0; }
|
|
185
|
+
&:only-child { border-radius: bo.$border-radius-md; }
|
|
186
|
+
&:not(:first-child) { margin-left: -#{bo.$border-width-sm}; }
|
|
187
|
+
&:hover, &:focus-visible { z-index: 1; }
|
|
188
|
+
}
|
|
189
|
+
}
|