@quidgest/ui 0.14.21 → 0.15.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/dist/ui.css +206 -215
- package/dist/ui.esm.js +2022 -1992
- package/dist/ui.js +8 -8
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +652 -651
- package/dist/ui.scss +201 -169
- package/esm/components/QBadge/QBadge.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.vue.js +32 -33
- package/esm/components/QBadge/types.d.ts +5 -5
- package/esm/components/QBadge/types.d.ts.map +1 -1
- package/esm/components/QButton/QButton.d.ts +3 -1
- package/esm/components/QButton/QButton.d.ts.map +1 -1
- package/esm/components/QButton/QButton.vue.js +56 -61
- package/esm/components/QButton/index.d.ts +9 -3
- package/esm/components/QButton/index.d.ts.map +1 -1
- package/esm/components/QButton/types.d.ts +22 -11
- package/esm/components/QButton/types.d.ts.map +1 -1
- package/esm/components/QButtonGroup/QButtonGroup.d.ts.map +1 -1
- package/esm/components/QButtonGroup/QButtonGroup.vue.js +5 -6
- package/esm/components/QButtonToggle/QButtonToggle.d.ts.map +1 -1
- package/esm/components/QButtonToggle/QButtonToggle.vue.js +7 -8
- package/esm/components/QCollapsible/QCollapsible.vue.js +13 -13
- package/esm/components/QCombobox/QCombobox.d.ts +24 -12
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.vue.js +19 -18
- package/esm/components/QCombobox/index.d.ts +12 -6
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.vue.js +10 -10
- package/esm/components/QDialog/types.js +3 -3
- package/esm/components/QIcon/QIcon.vue.js +14 -14
- package/esm/components/QMeter/QMeter.vue.js +19 -19
- package/esm/components/QPropertyList/QPropertyListGroup.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyListGroup.vue.js +15 -16
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +29 -28
- package/esm/components/__internal__/QClearButton/QClearButton.d.ts.map +1 -1
- package/esm/components/__internal__/QClearButton/QClearButton.vue.js +12 -11
- package/esm/composables/useColor/index.d.ts +33 -0
- package/esm/composables/useColor/index.d.ts.map +1 -0
- package/esm/composables/useColor/index.js +39 -0
- package/esm/composables/useColor/types.d.ts +36 -0
- package/esm/composables/useColor/types.d.ts.map +1 -0
- package/esm/templates/theme.d.ts.map +1 -1
- package/esm/templates/theme.js +13 -3
- package/esm/utils/color.d.ts +5 -0
- package/esm/utils/color.d.ts.map +1 -1
- package/package.json +1 -1
- package/esm/composables/useColorStyle/index.d.ts +0 -11
- package/esm/composables/useColorStyle/index.d.ts.map +0 -1
- package/esm/composables/useColorStyle/index.js +0 -33
- package/esm/composables/useColorStyle/types.d.ts +0 -36
- package/esm/composables/useColorStyle/types.d.ts.map +0 -1
package/dist/ui.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quidgest UI v0.
|
|
2
|
+
* Quidgest UI v0.15.0
|
|
3
3
|
* (c) 2025 Quidgest - Consultores de Gestão, S.A.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -125,6 +125,76 @@ progress {
|
|
|
125
125
|
summary {
|
|
126
126
|
display: list-item;
|
|
127
127
|
}
|
|
128
|
+
$primary: var(--q-theme-primary);
|
|
129
|
+
$primary-rgb: var(--q-theme-primary-rgb);
|
|
130
|
+
$primary-light: var(--q-theme-primary-light);
|
|
131
|
+
$primary-light-rgb: var(--q-theme-primary-light-rgb);
|
|
132
|
+
$primary-dark: var(--q-theme-primary-dark);
|
|
133
|
+
$primary-dark-rgb: var(--q-theme-primary-dark-rgb);
|
|
134
|
+
$on-primary: var(--q-theme-on-primary);
|
|
135
|
+
$on-primary-rgb: var(--q-theme-on-primary-rgb);
|
|
136
|
+
$secondary: var(--q-theme-secondary);
|
|
137
|
+
$secondary-rgb: var(--q-theme-secondary-rgb);
|
|
138
|
+
$on-secondary: var(--q-theme-on-secondary);
|
|
139
|
+
$on-secondary-rgb: var(--q-theme-on-secondary-rgb);
|
|
140
|
+
$highlight: var(--q-theme-highlight);
|
|
141
|
+
$highlight-rgb: var(--q-theme-highlight-rgb);
|
|
142
|
+
$on-highlight: var(--q-theme-on-highlight);
|
|
143
|
+
$on-highlight-rgb: var(--q-theme-on-highlight-rgb);
|
|
144
|
+
$background: var(--q-theme-background);
|
|
145
|
+
$background-rgb: var(--q-theme-background-rgb);
|
|
146
|
+
$on-background: var(--q-theme-on-background);
|
|
147
|
+
$on-background-rgb: var(--q-theme-on-background-rgb);
|
|
148
|
+
$container: var(--q-theme-container);
|
|
149
|
+
$container-rgb: var(--q-theme-container-rgb);
|
|
150
|
+
$info: var(--q-theme-info);
|
|
151
|
+
$info-rgb: var(--q-theme-info-rgb);
|
|
152
|
+
$info-light: var(--q-theme-info-light);
|
|
153
|
+
$info-light-rgb: var(--q-theme-info-light-rgb);
|
|
154
|
+
$info-dark: var(--q-theme-info-dark);
|
|
155
|
+
$info-dark-rgb: var(--q-theme-info-dark-rgb);
|
|
156
|
+
$on-info: var(--q-theme-on-info);
|
|
157
|
+
$on-info-rgb: var(--q-theme-on-info-rgb);
|
|
158
|
+
$success: var(--q-theme-success);
|
|
159
|
+
$success-rgb: var(--q-theme-success-rgb);
|
|
160
|
+
$success-light: var(--q-theme-success-light);
|
|
161
|
+
$success-light-rgb: var(--q-theme-success-light-rgb);
|
|
162
|
+
$success-dark: var(--q-theme-success-dark);
|
|
163
|
+
$success-dark-rgb: var(--q-theme-success-dark-rgb);
|
|
164
|
+
$on-success: var(--q-theme-on-success);
|
|
165
|
+
$on-success-rgb: var(--q-theme-on-success-rgb);
|
|
166
|
+
$warning: var(--q-theme-warning);
|
|
167
|
+
$warning-rgb: var(--q-theme-warning-rgb);
|
|
168
|
+
$warning-light: var(--q-theme-warning-light);
|
|
169
|
+
$warning-light-rgb: var(--q-theme-warning-light-rgb);
|
|
170
|
+
$warning-dark: var(--q-theme-warning-dark);
|
|
171
|
+
$warning-dark-rgb: var(--q-theme-warning-dark-rgb);
|
|
172
|
+
$on-warning: var(--q-theme-on-warning);
|
|
173
|
+
$on-warning-rgb: var(--q-theme-on-warning-rgb);
|
|
174
|
+
$danger: var(--q-theme-danger);
|
|
175
|
+
$danger-rgb: var(--q-theme-danger-rgb);
|
|
176
|
+
$danger-light: var(--q-theme-danger-light);
|
|
177
|
+
$danger-light-rgb: var(--q-theme-danger-light-rgb);
|
|
178
|
+
$danger-dark: var(--q-theme-danger-dark);
|
|
179
|
+
$danger-dark-rgb: var(--q-theme-danger-dark-rgb);
|
|
180
|
+
$on-danger: var(--q-theme-on-danger);
|
|
181
|
+
$on-danger-rgb: var(--q-theme-on-danger-rgb);
|
|
182
|
+
$neutral: var(--q-theme-neutral);
|
|
183
|
+
$neutral-rgb: var(--q-theme-neutral-rgb);
|
|
184
|
+
$neutral-light: var(--q-theme-neutral-light);
|
|
185
|
+
$neutral-light-rgb: var(--q-theme-neutral-light-rgb);
|
|
186
|
+
$neutral-dark: var(--q-theme-neutral-dark);
|
|
187
|
+
$neutral-dark-rgb: var(--q-theme-neutral-dark-rgb);
|
|
188
|
+
$theme-colors: (
|
|
189
|
+
'primary': $primary,
|
|
190
|
+
'secondary': $secondary,
|
|
191
|
+
'highlight': $highlight,
|
|
192
|
+
'info': $info,
|
|
193
|
+
'success': $success,
|
|
194
|
+
'warning': $warning,
|
|
195
|
+
'danger': $danger,
|
|
196
|
+
'neutral': $neutral
|
|
197
|
+
);
|
|
128
198
|
$border-radius: 0.25rem !default;
|
|
129
199
|
$compact: true !default;
|
|
130
200
|
$space-base: 0.25rem !default;
|
|
@@ -251,6 +321,14 @@ body {
|
|
|
251
321
|
.fade-leave-active {
|
|
252
322
|
transition: opacity 0.2s;
|
|
253
323
|
}
|
|
324
|
+
@mixin color-variant($prefix, $color) {
|
|
325
|
+
&--#{$color} {
|
|
326
|
+
--#{$prefix}-main-color: var(--q-theme-#{$color});
|
|
327
|
+
--#{$prefix}-on-main-color: var(--q-theme-on-#{$color});
|
|
328
|
+
--#{$prefix}-hover-color: var(--q-theme-#{$color}-dark);
|
|
329
|
+
--#{$prefix}-on-hover-color: var(--q-theme-on-#{$color});
|
|
330
|
+
}
|
|
331
|
+
}
|
|
254
332
|
.q-chevron {
|
|
255
333
|
transition: all 0.2s;
|
|
256
334
|
&--expanded {
|
|
@@ -260,7 +338,7 @@ body {
|
|
|
260
338
|
transition: none;
|
|
261
339
|
}
|
|
262
340
|
}
|
|
263
|
-
.q-clear-btn.q-
|
|
341
|
+
.q-clear-btn.q-button {
|
|
264
342
|
padding: 0.1rem;
|
|
265
343
|
opacity: 0.5;
|
|
266
344
|
&:hover {
|
|
@@ -286,7 +364,6 @@ body {
|
|
|
286
364
|
font-size: 0.75rem;
|
|
287
365
|
line-height: 1;
|
|
288
366
|
position: relative;
|
|
289
|
-
color: var(--q-badge-text-color);
|
|
290
367
|
transition-property: color, background-color, border-color, box-shadow, text-decoration-color,
|
|
291
368
|
fill, stroke;
|
|
292
369
|
transition-duration: 0.15s;
|
|
@@ -297,7 +374,6 @@ body {
|
|
|
297
374
|
width: calc(100% + 2px);
|
|
298
375
|
height: calc(100% + 2px);
|
|
299
376
|
border-radius: inherit;
|
|
300
|
-
background-color: var(--q-badge-color);
|
|
301
377
|
opacity: 0.1;
|
|
302
378
|
}
|
|
303
379
|
&__content {
|
|
@@ -306,61 +382,38 @@ body {
|
|
|
306
382
|
gap: 0.25em;
|
|
307
383
|
z-index: 1;
|
|
308
384
|
}
|
|
309
|
-
&__remove {
|
|
310
|
-
|
|
311
|
-
font-size: inherit;
|
|
312
|
-
}
|
|
313
|
-
&.q-btn:not(:disabled) {
|
|
314
|
-
padding: 0;
|
|
315
|
-
border-radius: 9999px;
|
|
316
|
-
color: inherit;
|
|
317
|
-
&:hover {
|
|
318
|
-
background-color: var(--q-badge-color);
|
|
319
|
-
}
|
|
320
|
-
}
|
|
385
|
+
&__remove.q-button:not(:disabled) {
|
|
386
|
+
padding: 0;
|
|
321
387
|
}
|
|
322
388
|
.q-icon {
|
|
323
389
|
color: currentcolor;
|
|
324
390
|
}
|
|
325
391
|
|
|
326
|
-
&--
|
|
327
|
-
|
|
392
|
+
&--bold {
|
|
393
|
+
background-color: var(--q-badge-main-color);
|
|
394
|
+
border-color: var(--q-badge-main-color);
|
|
395
|
+
color: var(--q-badge-on-main-color);
|
|
328
396
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
border-
|
|
397
|
+
&--outlined {
|
|
398
|
+
background-color: transparent;
|
|
399
|
+
border-color: var(--q-badge-main-color);
|
|
400
|
+
color: var(--q-badge-main-color);
|
|
332
401
|
}
|
|
333
402
|
&--tonal {
|
|
334
|
-
|
|
335
|
-
#{$this}__underlay {
|
|
336
|
-
opacity: 1;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
&--bold {
|
|
403
|
+
color: var(--q-badge-main-color);
|
|
341
404
|
#{$this}__underlay {
|
|
342
|
-
|
|
405
|
+
background-color: var(--q-badge-main-color);
|
|
343
406
|
}
|
|
344
407
|
}
|
|
345
|
-
&--
|
|
346
|
-
border-
|
|
347
|
-
#{$this}__underlay {
|
|
348
|
-
opacity: 0;
|
|
349
|
-
}
|
|
350
|
-
&#{$this}--clickable:hover {
|
|
351
|
-
#{$this}__underlay {
|
|
352
|
-
background-color: var(--q-badge-color);
|
|
353
|
-
opacity: 1;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
408
|
+
&--pill {
|
|
409
|
+
border-radius: 9999px;
|
|
356
410
|
}
|
|
357
411
|
&--clickable {
|
|
358
412
|
cursor: pointer;
|
|
359
413
|
&:hover {
|
|
360
|
-
color: var(--q-badge-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
}
|
|
414
|
+
color: var(--q-badge-on-hover-color, var(--q-badge-on-main-color));
|
|
415
|
+
background-color: var(--q-badge-hover-color);
|
|
416
|
+
border-color: var(--q-badge-hover-color);
|
|
364
417
|
}
|
|
365
418
|
&:focus {
|
|
366
419
|
outline: $outline;
|
|
@@ -369,32 +422,14 @@ body {
|
|
|
369
422
|
}
|
|
370
423
|
}
|
|
371
424
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
&--#{$color}.q-badge--tonal,
|
|
380
|
-
&--#{$color}.q-badge--outlined {
|
|
381
|
-
--q-badge-text-color: var(--q-theme-#{$color});
|
|
382
|
-
}
|
|
383
|
-
&--#{$color}.q-badge--bold,
|
|
384
|
-
&.q-badge--clickable:hover {
|
|
385
|
-
--q-badge-text-color: var(--q-theme-on-#{$color});
|
|
386
|
-
.q-badge__remove.q-btn:not(:disabled):hover {
|
|
387
|
-
background-color: var(--q-badge-text-color);
|
|
388
|
-
color: var(--q-badge-color);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
425
|
+
|
|
426
|
+
@each $color, $value in $theme-colors {
|
|
427
|
+
@include color-variant('q-badge', $color);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
&--large {
|
|
431
|
+
font-size: 0.9rem;
|
|
391
432
|
}
|
|
392
|
-
@include color-variant('primary');
|
|
393
|
-
@include color-variant('info');
|
|
394
|
-
@include color-variant('success');
|
|
395
|
-
@include color-variant('warning');
|
|
396
|
-
@include color-variant('danger');
|
|
397
|
-
@include color-variant('highlight');
|
|
398
433
|
}
|
|
399
434
|
.q-badge-indicator {
|
|
400
435
|
$this: &;
|
|
@@ -468,41 +503,45 @@ body {
|
|
|
468
503
|
transform-origin: 100% 100%;
|
|
469
504
|
}
|
|
470
505
|
}
|
|
471
|
-
|
|
472
|
-
$button-primary-hover: var(--q-theme-primary-dark);
|
|
473
|
-
$button-primary-shadow: var(--q-theme-primary-dark-rgb);
|
|
474
|
-
$button-text-on-primary: var(--q-theme-on-primary);
|
|
475
|
-
$button-text-on-primary-hover: var(--q-theme-background);
|
|
476
|
-
$button-danger: var(--q-theme-danger);
|
|
477
|
-
$button-danger-hover: var(--q-theme-danger-dark);
|
|
478
|
-
$button-danger-shadow: var(--q-theme-danger-dark-rgb);
|
|
479
|
-
$button-text-on-danger: var(--q-theme-on-danger);
|
|
480
|
-
$button-text-on-danger-hover: var(--q-theme-background);
|
|
481
|
-
$button-plain-hover: rgb(var(--q-theme-neutral-rgb) / 10%);
|
|
482
|
-
$button-text-on-plain: var(--q-theme-on-background);
|
|
483
|
-
.q-btn {
|
|
506
|
+
.q-button {
|
|
484
507
|
$this: &;
|
|
485
|
-
--
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
508
|
+
--q-button-main-color: var(--q-theme-primary);
|
|
509
|
+
--q-button-on-main-color: var(--q-theme-on-primary);
|
|
510
|
+
--q-button-hover-color: var(--q-theme-primary-dark);
|
|
511
|
+
--q-button-on-hover-color: var(--q-theme-on-primary);
|
|
512
|
+
display: inline-flex;
|
|
513
|
+
user-select: none;
|
|
489
514
|
align-items: center;
|
|
490
|
-
|
|
515
|
+
justify-content: center;
|
|
516
|
+
overflow: hidden;
|
|
517
|
+
position: relative;
|
|
491
518
|
border-width: 1px;
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
-
|
|
495
|
-
|
|
519
|
+
border-color: transparent;
|
|
520
|
+
padding: 0.4rem;
|
|
521
|
+
line-height: 1;
|
|
522
|
+
gap: $space-base;
|
|
496
523
|
border-radius: var(--border-radius);
|
|
524
|
+
outline: none;
|
|
525
|
+
margin: 0;
|
|
526
|
+
text-decoration: none;
|
|
527
|
+
white-space: nowrap;
|
|
497
528
|
transition-property: color, background-color, border-color, box-shadow, text-decoration-color,
|
|
498
529
|
fill, stroke;
|
|
499
530
|
transition-duration: 0.15s;
|
|
531
|
+
&__content {
|
|
532
|
+
display: inline-flex;
|
|
533
|
+
align-items: center;
|
|
534
|
+
justify-content: center;
|
|
535
|
+
gap: 0.25em;
|
|
536
|
+
width: 100%;
|
|
537
|
+
z-index: 1;
|
|
538
|
+
}
|
|
500
539
|
&:disabled {
|
|
501
540
|
opacity: 0.6;
|
|
502
541
|
}
|
|
503
542
|
&:focus {
|
|
504
543
|
outline: $outline;
|
|
505
|
-
z-index: 3;
|
|
544
|
+
z-index: 3;
|
|
506
545
|
&:not(:focus-visible) {
|
|
507
546
|
outline: 0;
|
|
508
547
|
}
|
|
@@ -510,72 +549,64 @@ $button-text-on-plain: var(--q-theme-on-background);
|
|
|
510
549
|
&:hover:not(:disabled) {
|
|
511
550
|
cursor: pointer;
|
|
512
551
|
}
|
|
513
|
-
&__content {
|
|
514
|
-
position: relative;
|
|
515
|
-
display: flex;
|
|
516
|
-
flex-direction: row;
|
|
517
|
-
align-items: center;
|
|
518
|
-
justify-content: center;
|
|
519
|
-
font-size: $font-size-base;
|
|
520
|
-
white-space: nowrap;
|
|
521
|
-
gap: $space-base;
|
|
522
|
-
pointer-events: none;
|
|
523
|
-
line-height: 1;
|
|
524
|
-
}
|
|
525
552
|
.q-icon {
|
|
526
553
|
color: currentcolor;
|
|
527
554
|
}
|
|
528
|
-
|
|
529
|
-
|
|
555
|
+
&__spinner {
|
|
556
|
+
position: absolute;
|
|
557
|
+
top: 0;
|
|
558
|
+
left: 0;
|
|
559
|
+
width: 100%;
|
|
560
|
+
height: 100%;
|
|
561
|
+
display: inline-flex;
|
|
562
|
+
align-items: center;
|
|
563
|
+
justify-content: center;
|
|
564
|
+
.q-spinner-loader {
|
|
565
|
+
font-size: 1em;
|
|
566
|
+
color: currentcolor;
|
|
567
|
+
}
|
|
530
568
|
}
|
|
531
569
|
|
|
532
|
-
&--
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
color: $button-text-on-primary;
|
|
570
|
+
&--bold {
|
|
571
|
+
background-color: var(--q-button-main-color);
|
|
572
|
+
border-color: var(--q-button-main-color);
|
|
573
|
+
color: var(--q-button-on-main-color);
|
|
537
574
|
&:hover:not(:disabled) {
|
|
538
|
-
background-color:
|
|
539
|
-
|
|
540
|
-
color:
|
|
575
|
+
background-color: var(--q-button-hover-color);
|
|
576
|
+
color: var(--q-button-on-hover-color);
|
|
577
|
+
border-color: var(--q-button-hover-color);
|
|
541
578
|
}
|
|
542
579
|
}
|
|
543
|
-
&--
|
|
544
|
-
|
|
545
|
-
border-color:
|
|
546
|
-
color:
|
|
580
|
+
&--outlined {
|
|
581
|
+
background-color: transparent;
|
|
582
|
+
border-color: var(--q-button-main-color);
|
|
583
|
+
color: var(--q-button-main-color);
|
|
547
584
|
&:hover:not(:disabled) {
|
|
548
|
-
background-color:
|
|
549
|
-
|
|
550
|
-
color:
|
|
585
|
+
background-color: var(--q-button-hover-color);
|
|
586
|
+
color: var(--q-button-on-hover-color);
|
|
587
|
+
border-color: var(--q-button-hover-color);
|
|
551
588
|
}
|
|
552
589
|
}
|
|
553
|
-
&--
|
|
554
|
-
--box-shadow-tint: #{$button-primary-shadow};
|
|
590
|
+
&--text {
|
|
555
591
|
background-color: transparent;
|
|
556
592
|
border-color: transparent;
|
|
557
|
-
color:
|
|
558
|
-
&:hover:not(:disabled),
|
|
559
|
-
&:focus:not(:disabled) {
|
|
560
|
-
color: $button-primary-hover;
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
&--danger {
|
|
564
|
-
--box-shadow-tint: #{$button-danger-shadow};
|
|
565
|
-
background-color: $button-danger;
|
|
566
|
-
border-color: $button-danger;
|
|
567
|
-
color: $button-text-on-danger;
|
|
593
|
+
color: var(--q-button-main-color);
|
|
568
594
|
&:hover:not(:disabled) {
|
|
569
|
-
|
|
570
|
-
border-color: $button-danger-hover;
|
|
571
|
-
color: $button-text-on-danger-hover;
|
|
595
|
+
color: var(--q-button-hover-color);
|
|
572
596
|
}
|
|
573
597
|
}
|
|
574
|
-
&--
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
598
|
+
&--pill {
|
|
599
|
+
border-radius: 9999px;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
@each $color, $value in $theme-colors {
|
|
603
|
+
@include color-variant('q-button', $color);
|
|
604
|
+
}
|
|
605
|
+
&--background {
|
|
606
|
+
--q-button-main-color: var(--q-theme-background);
|
|
607
|
+
--q-button-on-main-color: var(--q-theme-on-background);
|
|
608
|
+
--q-button-hover-color: var(--q-theme-primary-dark);
|
|
609
|
+
--q-button-on-hover-color: var(--q-theme-on-primary);
|
|
579
610
|
}
|
|
580
611
|
|
|
581
612
|
&--active {
|
|
@@ -594,48 +625,49 @@ $button-text-on-plain: var(--q-theme-on-background);
|
|
|
594
625
|
}
|
|
595
626
|
|
|
596
627
|
&--small {
|
|
597
|
-
|
|
598
|
-
span {
|
|
599
|
-
font-size: 0.75rem;
|
|
600
|
-
}
|
|
628
|
+
font-size: 0.8em;
|
|
601
629
|
}
|
|
602
630
|
|
|
603
631
|
&--borderless {
|
|
604
|
-
border-color: transparent
|
|
632
|
+
border-color: transparent;
|
|
605
633
|
}
|
|
606
634
|
&--elevated {
|
|
607
635
|
box-shadow:
|
|
608
|
-
0
|
|
609
|
-
0
|
|
610
|
-
0 1px
|
|
636
|
+
0 3px 1px -2px rgb(var(--q-theme-on-background-rgb) / 20%),
|
|
637
|
+
0 2px 2px 0 rgb(var(--q-theme-on-background-rgb) / 14%),
|
|
638
|
+
0 1px 5px 0 rgb(var(--q-theme-on-background-rgb) / 12%);
|
|
611
639
|
}
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
width: 100%;
|
|
616
|
-
& + & {
|
|
617
|
-
margin-top: 0.5rem;
|
|
640
|
+
&--icon-end {
|
|
641
|
+
#{$this}__content {
|
|
642
|
+
flex-direction: row-reverse;
|
|
618
643
|
}
|
|
619
644
|
}
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
645
|
+
&--icon-top {
|
|
646
|
+
#{$this}__content {
|
|
647
|
+
flex-direction: column;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
&--icon-bottom {
|
|
651
|
+
#{$this}__content {
|
|
652
|
+
flex-direction: column-reverse;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
&--block {
|
|
657
|
+
min-width: 100%;
|
|
624
658
|
}
|
|
625
659
|
}
|
|
626
|
-
.q-
|
|
627
|
-
--box-shadow-tint: 0 0 0;
|
|
660
|
+
.q-button-group {
|
|
628
661
|
position: relative;
|
|
629
662
|
display: inline-flex;
|
|
630
663
|
border-radius: var(--border-radius);
|
|
631
664
|
&--elevated {
|
|
632
|
-
--box-shadow-tint: var(--q-theme-primary-rgb);
|
|
633
665
|
box-shadow:
|
|
634
|
-
0
|
|
635
|
-
0
|
|
636
|
-
0 1px
|
|
666
|
+
0 3px 1px -2px rgb(var(--q-theme-on-background-rgb) / 20%),
|
|
667
|
+
0 2px 2px 0 rgb(var(--q-theme-on-background-rgb) / 14%),
|
|
668
|
+
0 1px 5px 0 rgb(var(--q-theme-on-background-rgb) / 12%);
|
|
637
669
|
}
|
|
638
|
-
> .q-
|
|
670
|
+
> .q-button {
|
|
639
671
|
position: relative;
|
|
640
672
|
flex: 0 1 auto;
|
|
641
673
|
&:not(:last-child) {
|
|
@@ -932,7 +964,7 @@ $button-text-on-plain: var(--q-theme-on-background);
|
|
|
932
964
|
width: 100%;
|
|
933
965
|
margin: 0;
|
|
934
966
|
padding: 0;
|
|
935
|
-
.q-
|
|
967
|
+
.q-button__content {
|
|
936
968
|
gap: 0;
|
|
937
969
|
padding: $btn-padding;
|
|
938
970
|
display: flex;
|
|
@@ -1119,7 +1151,7 @@ $button-text-on-plain: var(--q-theme-on-background);
|
|
|
1119
1151
|
font-size: 1rem;
|
|
1120
1152
|
}
|
|
1121
1153
|
}
|
|
1122
|
-
.q-dialog__header .q-
|
|
1154
|
+
.q-dialog__header .q-button {
|
|
1123
1155
|
align-items: center;
|
|
1124
1156
|
}
|
|
1125
1157
|
.q-dialog__body {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QBadge.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QBadge/QBadge.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QBadge.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QBadge/QBadge.vue"],"names":[],"mappings":"AA2BA;AAqHC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AA6EvD,iBAAS,cAAc;WA4ET,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;yFASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import { defineComponent as q, useAttrs as y, computed as r, toRef as
|
|
1
|
+
import { defineComponent as q, useAttrs as y, computed as r, toRef as h, createElementBlock as d, openBlock as n, withKeys as x, normalizeStyle as z, normalizeClass as B, withModifiers as w, createCommentVNode as u, createElementVNode as E, renderSlot as T, createBlock as N, unref as m, withCtx as S, createVNode as V, normalizeProps as $, guardReactiveProps as A } from "vue";
|
|
2
2
|
import { QButton as I } from "../QButton/index.js";
|
|
3
3
|
import { QIcon as K } from "../QIcon/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const U = ["id", "role", "tabindex", "onKeydown"], D = {
|
|
4
|
+
import { useColor as P } from "../../composables/useColor/index.js";
|
|
5
|
+
import { DEFAULT_TEXTS as Q, DEFAULT_ICONS as R } from "./types.js";
|
|
6
|
+
const U = ["id", "role", "tabindex", "onKeydown"], D = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "q-badge__underlay"
|
|
9
|
+
}, F = { class: "q-badge__content" }, j = /* @__PURE__ */ q({
|
|
7
10
|
__name: "QBadge",
|
|
8
11
|
props: {
|
|
9
12
|
id: {},
|
|
10
13
|
class: {},
|
|
11
|
-
color: { default: "primary" },
|
|
12
14
|
variant: { default: "tonal" },
|
|
15
|
+
color: { default: "primary" },
|
|
13
16
|
removable: { type: Boolean },
|
|
14
17
|
pill: { type: Boolean },
|
|
15
18
|
size: { default: "default" },
|
|
16
|
-
icons: { default: () =>
|
|
17
|
-
texts: { default: () =>
|
|
19
|
+
icons: { default: () => R },
|
|
20
|
+
texts: { default: () => Q }
|
|
18
21
|
},
|
|
19
22
|
emits: ["click:remove"],
|
|
20
23
|
setup(v, { emit: f }) {
|
|
21
|
-
const e = v, p = f, b = y(), a = r(() => !!b.onClick),
|
|
22
|
-
const o =
|
|
24
|
+
const e = v, p = f, b = y(), a = r(() => !!b.onClick), _ = r(() => {
|
|
25
|
+
const o = i.value ? `q-badge--${e.color}` : void 0, t = e.size !== "default" ? `q-badge--${e.size}` : void 0;
|
|
23
26
|
return [
|
|
24
27
|
"q-badge",
|
|
25
28
|
`q-badge--${e.variant}`,
|
|
@@ -31,48 +34,44 @@ const U = ["id", "role", "tabindex", "onKeydown"], D = { class: "q-badge__conten
|
|
|
31
34
|
},
|
|
32
35
|
e.class
|
|
33
36
|
];
|
|
34
|
-
}), { isUtilityColor:
|
|
35
|
-
var o, t, s,
|
|
36
|
-
if (!
|
|
37
|
+
}), { isUtilityColor: i, style: l } = P(h(e, "color")), C = r(() => {
|
|
38
|
+
var o, t, s, c;
|
|
39
|
+
if (!i.value)
|
|
37
40
|
return {
|
|
38
|
-
"--q-badge-color": (o = l.value) == null ? void 0 : o.
|
|
39
|
-
"--q-badge-
|
|
40
|
-
"--q-badge-hover-color": (s = l.value) == null ? void 0 : s.
|
|
41
|
-
"--q-badge-
|
|
41
|
+
"--q-badge-main-color": (o = l.value) == null ? void 0 : o.mainColor,
|
|
42
|
+
"--q-badge-on-main-color": (t = l.value) == null ? void 0 : t.onMainColor,
|
|
43
|
+
"--q-badge-hover-color": (s = l.value) == null ? void 0 : s.hoverColor,
|
|
44
|
+
"--q-badge-on-hover-color": (c = l.value) == null ? void 0 : c.onHoverColor
|
|
42
45
|
};
|
|
43
46
|
});
|
|
44
|
-
function
|
|
47
|
+
function g(o) {
|
|
45
48
|
o.stopImmediatePropagation();
|
|
46
49
|
}
|
|
47
50
|
function k() {
|
|
48
51
|
p("click:remove");
|
|
49
52
|
}
|
|
50
|
-
return (o, t) => (
|
|
53
|
+
return (o, t) => (n(), d("span", {
|
|
51
54
|
id: e.id,
|
|
52
|
-
class:
|
|
55
|
+
class: B(_.value),
|
|
53
56
|
role: a.value ? "button" : "presentation",
|
|
54
|
-
style:
|
|
57
|
+
style: z(C.value),
|
|
55
58
|
tabindex: a.value ? 0 : void 0,
|
|
56
|
-
onKeydown:
|
|
59
|
+
onKeydown: x(w(g, ["stop", "prevent"]), ["enter"])
|
|
57
60
|
}, [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
-1
|
|
63
|
-
/* HOISTED */
|
|
64
|
-
)),
|
|
65
|
-
u("div", D, [
|
|
66
|
-
E(o.$slots, "default"),
|
|
67
|
-
e.removable ? (c(), S(m(I), {
|
|
61
|
+
e.variant === "tonal" ? (n(), d("div", D)) : u("v-if", !0),
|
|
62
|
+
E("div", F, [
|
|
63
|
+
T(o.$slots, "default"),
|
|
64
|
+
e.removable ? (n(), N(m(I), {
|
|
68
65
|
key: 0,
|
|
69
66
|
class: "q-badge__remove",
|
|
67
|
+
pill: "",
|
|
70
68
|
borderless: "",
|
|
71
69
|
tabindex: "0",
|
|
70
|
+
color: e.color,
|
|
72
71
|
"aria-label": e.texts.removeText,
|
|
73
72
|
onClick: k
|
|
74
73
|
}, {
|
|
75
|
-
default:
|
|
74
|
+
default: S(() => [
|
|
76
75
|
V(
|
|
77
76
|
m(K),
|
|
78
77
|
$(A(e.icons.remove)),
|
|
@@ -83,7 +82,7 @@ const U = ["id", "role", "tabindex", "onKeydown"], D = { class: "q-badge__conten
|
|
|
83
82
|
]),
|
|
84
83
|
_: 1
|
|
85
84
|
/* STABLE */
|
|
86
|
-
}, 8, ["aria-label"])) :
|
|
85
|
+
}, 8, ["color", "aria-label"])) : u("v-if", !0)
|
|
87
86
|
])
|
|
88
87
|
], 46, U));
|
|
89
88
|
}
|
|
@@ -2,22 +2,22 @@ import { QBaseComponentProps } from '../../types/component';
|
|
|
2
2
|
export type QBadgeVariant = 'tonal' | 'bold' | 'outlined';
|
|
3
3
|
export type QBadgeSize = 'default' | 'large';
|
|
4
4
|
export type QBadgeProps = QBaseComponentProps & {
|
|
5
|
+
/**
|
|
6
|
+
* Specifies the visual style of the badge.
|
|
7
|
+
*/
|
|
8
|
+
variant?: QBadgeVariant;
|
|
5
9
|
/**
|
|
6
10
|
* The color of the badge.
|
|
7
11
|
* Can be chosen from utility colors like 'success' or 'danger',
|
|
8
12
|
* or specified using CSS color codes.
|
|
9
13
|
*/
|
|
10
14
|
color?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Specifies the visual style of the badge.
|
|
13
|
-
*/
|
|
14
|
-
variant?: QBadgeVariant;
|
|
15
15
|
/**
|
|
16
16
|
* Whether the badge can be removed.
|
|
17
17
|
*/
|
|
18
18
|
removable?: boolean;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Conveys a pill shape to the badge.
|
|
21
21
|
*/
|
|
22
22
|
pill?: boolean;
|
|
23
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QBadge/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAE5D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAA;AAEzD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,CAAA;AAE5C,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG;IAC/C
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QBadge/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAE5D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAA;AAEzD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,CAAA;AAE5C,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG;IAC/C;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAA;IAEvB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;IAE5B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA;AAGD,eAAO,MAAM,aAAa;;;;CAIM,CAAA;AAEhC,eAAO,MAAM,aAAa;;CAEQ,CAAA"}
|
|
@@ -14,7 +14,9 @@ declare const __VLS_component: import('vue').DefineComponent<QButtonProps, {}, {
|
|
|
14
14
|
onClick?: ((event: Event) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
16
|
size: import('./types').QButtonSize;
|
|
17
|
-
|
|
17
|
+
color: string;
|
|
18
|
+
variant: import('./types').QButtonVariant;
|
|
19
|
+
iconPos: import('./types').QButtonIconPosition;
|
|
18
20
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
19
21
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
20
22
|
export default _default;
|