@quidgest/ui 0.12.1 → 0.13.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/manifest/components.json +2 -0
- package/dist/ui.css +161 -0
- package/dist/ui.esm.js +1066 -873
- package/dist/ui.js +6 -6
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +134 -127
- package/dist/ui.scss +117 -1
- package/esm/components/QBadge/QBadge.d.ts +72 -0
- package/esm/components/QBadge/QBadge.d.ts.map +1 -0
- package/esm/components/QBadge/QBadge.vue.js +87 -0
- package/esm/components/QBadge/QBadge.vue2.js +4 -0
- package/esm/components/QBadge/index.d.ts +119 -0
- package/esm/components/QBadge/index.d.ts.map +1 -0
- package/esm/components/QBadge/index.js +6 -0
- package/esm/components/QButton/QButton.vue.js +14 -15
- package/esm/components/QButton/index.d.ts +198 -1
- package/esm/components/QButton/index.d.ts.map +1 -1
- package/esm/components/QButton/index.js +6 -0
- package/esm/components/QButtonGroup/index.d.ts +79 -2
- package/esm/components/QButtonGroup/index.d.ts.map +1 -1
- package/esm/components/QButtonGroup/index.js +6 -0
- package/esm/components/QButtonToggle/QButtonToggle.vue.js +17 -17
- package/esm/components/QButtonToggle/index.d.ts +115 -2
- package/esm/components/QButtonToggle/index.d.ts.map +1 -1
- package/esm/components/QButtonToggle/index.js +6 -0
- package/esm/components/QCombobox/QCombobox.d.ts +10 -10
- package/esm/components/QCombobox/QCombobox.vue.js +106 -111
- package/esm/components/QCombobox/index.d.ts +1083 -2
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QCombobox/index.js +6 -0
- package/esm/components/QDialog/QDialog.d.ts +180 -0
- package/esm/components/QDialog/QDialog.d.ts.map +1 -0
- package/esm/components/QDialog/QDialog.vue.js +146 -0
- package/esm/components/QDialog/QDialog.vue2.js +4 -0
- package/esm/components/QDialog/index.d.ts +237 -0
- package/esm/components/QDialog/index.d.ts.map +1 -0
- package/esm/components/QDialog/index.js +6 -0
- package/esm/components/QField/index.d.ts +168 -1
- package/esm/components/QField/index.d.ts.map +1 -1
- package/esm/components/QField/index.js +2 -2
- package/esm/components/QIcon/QIcon.vue.js +9 -12
- package/esm/components/QIcon/index.d.ts +156 -4
- package/esm/components/QIcon/index.d.ts.map +1 -1
- package/esm/components/QIcon/index.js +8 -11
- package/esm/components/QInputGroup/QInputGroup.vue.js +25 -27
- package/esm/components/QInputGroup/index.d.ts +153 -2
- package/esm/components/QInputGroup/index.d.ts.map +1 -1
- package/esm/components/QInputGroup/index.js +6 -0
- package/esm/components/QLineLoader/index.d.ts +13 -2
- package/esm/components/QLineLoader/index.d.ts.map +1 -1
- package/esm/components/QLineLoader/index.js +6 -0
- package/esm/components/QList/QList.vue.js +43 -45
- package/esm/components/QList/QListItem.vue.js +9 -10
- package/esm/components/QList/index.d.ts +418 -3
- package/esm/components/QList/index.d.ts.map +1 -1
- package/esm/components/QList/index.js +8 -10
- package/esm/components/QOverlay/index.d.ts +320 -2
- package/esm/components/QOverlay/index.d.ts.map +1 -1
- package/esm/components/QOverlay/index.js +4 -4
- package/esm/components/QPopover/QPopover.vue.js +11 -12
- package/esm/components/QPopover/index.d.ts +180 -2
- package/esm/components/QPopover/index.d.ts.map +1 -1
- package/esm/components/QPopover/index.js +6 -0
- package/esm/components/QSelect/QSelect.vue.js +68 -73
- package/esm/components/QSelect/index.d.ts +377 -2
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSelect/index.js +6 -0
- package/esm/components/QSkeletonLoader/index.d.ts +31 -2
- package/esm/components/QSkeletonLoader/index.d.ts.map +1 -1
- package/esm/components/QSkeletonLoader/index.js +6 -0
- package/esm/components/QSpinnerLoader/index.d.ts +22 -2
- package/esm/components/QSpinnerLoader/index.d.ts.map +1 -1
- package/esm/components/QSpinnerLoader/index.js +4 -4
- package/esm/components/QTextField/QTextField.d.ts +5 -5
- package/esm/components/QTextField/QTextField.vue.js +7 -8
- package/esm/components/QTextField/index.d.ts +229 -2
- package/esm/components/QTextField/index.d.ts.map +1 -1
- package/esm/components/QTextField/index.js +2 -2
- package/esm/components/QThemeProvider/index.d.ts +37 -2
- package/esm/components/QThemeProvider/index.d.ts.map +1 -1
- package/esm/components/QThemeProvider/index.js +6 -0
- package/esm/components/QTooltip/QTooltip.vue.js +8 -9
- package/esm/components/QTooltip/index.d.ts +259 -2
- package/esm/components/QTooltip/index.d.ts.map +1 -1
- package/esm/components/QTooltip/index.js +6 -0
- package/esm/components/index.d.ts +2 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +43 -44
- package/esm/composables/defaults.js +5 -5
- package/esm/index.d.ts +2 -0
- package/esm/utils/color.d.ts +7 -1
- package/esm/utils/color.d.ts.map +1 -1
- package/esm/utils/color.js +54 -9
- package/package.json +1 -1
package/dist/ui.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quidgest UI v0.
|
|
2
|
+
* Quidgest UI v0.13.0
|
|
3
3
|
* (c) 2024 Quidgest - Consultores de Gestão, S.A.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -238,6 +238,79 @@ body {
|
|
|
238
238
|
.fade-leave-active {
|
|
239
239
|
transition: opacity 0.2s;
|
|
240
240
|
}
|
|
241
|
+
.q-badge {
|
|
242
|
+
$this: &;
|
|
243
|
+
display: inline-flex;
|
|
244
|
+
border-width: 1px;
|
|
245
|
+
border-color: transparent;
|
|
246
|
+
border-radius: $border-radius;
|
|
247
|
+
padding: 0.25em 0.5em;
|
|
248
|
+
line-height: 1rem;
|
|
249
|
+
font-size: 0.75rem;
|
|
250
|
+
position: relative;
|
|
251
|
+
color: var(--q-badge-text-color);
|
|
252
|
+
&__underlay {
|
|
253
|
+
position: absolute;
|
|
254
|
+
top: 0;
|
|
255
|
+
left: 0;
|
|
256
|
+
width: 100%;
|
|
257
|
+
height: 100%;
|
|
258
|
+
border-radius: inherit;
|
|
259
|
+
background-color: var(--q-badge-color);
|
|
260
|
+
opacity: 0.1;
|
|
261
|
+
}
|
|
262
|
+
&__content {
|
|
263
|
+
display: inline-flex;
|
|
264
|
+
align-items: center;
|
|
265
|
+
gap: 0.25rem;
|
|
266
|
+
min-height: 1rem;
|
|
267
|
+
z-index: 1;
|
|
268
|
+
}
|
|
269
|
+
&__remove.q-btn:not(:disabled) {
|
|
270
|
+
padding: 0;
|
|
271
|
+
border-radius: 9999px;
|
|
272
|
+
color: inherit;
|
|
273
|
+
&:hover {
|
|
274
|
+
background-color: var(--q-badge-color);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
&--pill {
|
|
279
|
+
border-radius: 9999px;
|
|
280
|
+
}
|
|
281
|
+
&--bold {
|
|
282
|
+
#{$this}__underlay {
|
|
283
|
+
opacity: 1;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
&--outlined {
|
|
287
|
+
border-color: currentColor;
|
|
288
|
+
#{$this}__underlay {
|
|
289
|
+
opacity: 0;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
@mixin color-variant($color) {
|
|
293
|
+
&--#{$color} {
|
|
294
|
+
--q-badge-color: var(--q-theme-#{$color});
|
|
295
|
+
}
|
|
296
|
+
&--#{$color}.q-badge--tonal,
|
|
297
|
+
&--#{$color}.q-badge--outlined {
|
|
298
|
+
--q-badge-text-color: var(--q-theme-#{$color});
|
|
299
|
+
}
|
|
300
|
+
&--#{$color}.q-badge--bold {
|
|
301
|
+
--q-badge-text-color: var(--q-theme-on-#{$color});
|
|
302
|
+
.q-badge__remove.q-btn:not(:disabled):hover {
|
|
303
|
+
background-color: var(--q-badge-text-color);
|
|
304
|
+
color: var(--q-badge-color);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
@include color-variant(primary);
|
|
309
|
+
@include color-variant(info);
|
|
310
|
+
@include color-variant(success);
|
|
311
|
+
@include color-variant(warning);
|
|
312
|
+
@include color-variant(danger);
|
|
313
|
+
}
|
|
241
314
|
$button-primary: var(--q-theme-primary);
|
|
242
315
|
$button-primary-hover: var(--q-theme-primary-dark);
|
|
243
316
|
$button-primary-shadow: var(--q-theme-primary-dark-rgb);
|
|
@@ -453,6 +526,49 @@ $button-text-on-plain: var(--q-theme-on-background);
|
|
|
453
526
|
.q-combobox__chevron svg {
|
|
454
527
|
transition: all 0.2s;
|
|
455
528
|
}
|
|
529
|
+
.q-dialog {
|
|
530
|
+
display: flex;
|
|
531
|
+
flex-direction: column;
|
|
532
|
+
align-items: center;
|
|
533
|
+
justify-content: center;
|
|
534
|
+
max-width: 50rem;
|
|
535
|
+
min-width: 20rem;
|
|
536
|
+
padding: $space-base;
|
|
537
|
+
}
|
|
538
|
+
.q-dialog__header {
|
|
539
|
+
display: flex;
|
|
540
|
+
width: 100%;
|
|
541
|
+
justify-content: space-between;
|
|
542
|
+
padding: 0.4rem $space-base;
|
|
543
|
+
&-title {
|
|
544
|
+
align-self: flex-start;
|
|
545
|
+
font-weight: $font-weight-bold;
|
|
546
|
+
padding: 0.4rem;
|
|
547
|
+
font-size: 1rem;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
.q-dialog__header .q-btn {
|
|
551
|
+
align-items: baseline;
|
|
552
|
+
}
|
|
553
|
+
.q-dialog__body {
|
|
554
|
+
display: flex;
|
|
555
|
+
flex-direction: column;
|
|
556
|
+
align-items: center;
|
|
557
|
+
padding: $space-base 0.65rem;
|
|
558
|
+
gap: 0.4rem;
|
|
559
|
+
&-icon svg {
|
|
560
|
+
height: 5em;
|
|
561
|
+
width: 5em;
|
|
562
|
+
}
|
|
563
|
+
&-actions {
|
|
564
|
+
display: flex;
|
|
565
|
+
justify-content: center;
|
|
566
|
+
flex-wrap: wrap;
|
|
567
|
+
gap: 0.5rem;
|
|
568
|
+
padding: 0.65rem;
|
|
569
|
+
padding-bottom: 0.5rem;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
456
572
|
.q-field {
|
|
457
573
|
$this: &;
|
|
458
574
|
display: flex;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Icon } from '../QIcon';
|
|
2
|
+
|
|
3
|
+
export type QBadgeProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The color of the badge.
|
|
6
|
+
* Can be chosen from utility colors like 'success' or 'danger', or specified using CSS color codes.
|
|
7
|
+
*/
|
|
8
|
+
color?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The visual style variant of the badge.
|
|
11
|
+
*/
|
|
12
|
+
variant?: 'tonal' | 'bold' | 'outlined';
|
|
13
|
+
/**
|
|
14
|
+
* Indicates if the badge can be removed.
|
|
15
|
+
*/
|
|
16
|
+
removable?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to convey a pill shape to the badge.
|
|
19
|
+
*/
|
|
20
|
+
pill?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The icons of the component.
|
|
23
|
+
*/
|
|
24
|
+
icons?: Icons;
|
|
25
|
+
};
|
|
26
|
+
declare const DEFAULT_ICONS: Record<string, Icon>;
|
|
27
|
+
type Icons = typeof DEFAULT_ICONS;
|
|
28
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<QBadgeProps>, {
|
|
29
|
+
text: string;
|
|
30
|
+
icons: () => Record<string, Icon>;
|
|
31
|
+
color: string;
|
|
32
|
+
variant: string;
|
|
33
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
34
|
+
"click:remove": () => void;
|
|
35
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<QBadgeProps>, {
|
|
36
|
+
text: string;
|
|
37
|
+
icons: () => Record<string, Icon>;
|
|
38
|
+
color: string;
|
|
39
|
+
variant: string;
|
|
40
|
+
}>>> & {
|
|
41
|
+
"onClick:remove"?: (() => any) | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
variant: "bold" | "tonal" | "outlined";
|
|
44
|
+
color: string;
|
|
45
|
+
icons: Record<string, Icon>;
|
|
46
|
+
}, {}>, {
|
|
47
|
+
default?(_: {}): any;
|
|
48
|
+
}>;
|
|
49
|
+
export default _default;
|
|
50
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
51
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
52
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
53
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
54
|
+
} : {
|
|
55
|
+
type: import('vue').PropType<T[K]>;
|
|
56
|
+
required: true;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
type __VLS_WithDefaults<P, D> = {
|
|
60
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
61
|
+
default: D[K];
|
|
62
|
+
}> : P[K];
|
|
63
|
+
};
|
|
64
|
+
type __VLS_Prettify<T> = {
|
|
65
|
+
[K in keyof T]: T[K];
|
|
66
|
+
} & {};
|
|
67
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
68
|
+
new (): {
|
|
69
|
+
$slots: S;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=QBadge.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QBadge.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QBadge/QBadge.vue"],"names":[],"mappings":"AAmBA;AAOC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAM9C,MAAM,MAAM,WAAW,GAAG;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,UAAU,CAAA;IAEvC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAA;CACb,CAAA;AAKD,QAAA,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAIvC,CAAA;AAED,KAAK,KAAK,GAAG,OAAO,aAAa,CAAA;;;;;;;;;;;;;;;;;;;;qBAkJJ,GAAG;;AAjJjC,wBA2KI;AAAA,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACrE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AACxD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { defineComponent as g, computed as l, openBlock as a, createElementBlock as _, normalizeClass as b, normalizeStyle as C, createElementVNode as s, renderSlot as y, createBlock as q, unref as n, withCtx as k, createVNode as B, normalizeProps as h, guardReactiveProps as x, createCommentVNode as N } from "vue";
|
|
2
|
+
import { QButton as z } from "../QButton/index.js";
|
|
3
|
+
import { QIcon as E } from "../QIcon/index.js";
|
|
4
|
+
import { parseColor as Q, rgbToHsl as S, getContrastingColor as V } from "../../utils/color.js";
|
|
5
|
+
const $ = /* @__PURE__ */ s(
|
|
6
|
+
"div",
|
|
7
|
+
{ class: "q-badge__underlay" },
|
|
8
|
+
null,
|
|
9
|
+
-1
|
|
10
|
+
/* HOISTED */
|
|
11
|
+
), w = { class: "q-badge__content" }, I = {
|
|
12
|
+
remove: {
|
|
13
|
+
icon: "close"
|
|
14
|
+
}
|
|
15
|
+
}, A = /* @__PURE__ */ g({
|
|
16
|
+
__name: "QBadge",
|
|
17
|
+
props: {
|
|
18
|
+
color: { default: "primary" },
|
|
19
|
+
variant: { default: "tonal" },
|
|
20
|
+
removable: { type: Boolean },
|
|
21
|
+
pill: { type: Boolean },
|
|
22
|
+
icons: { default: () => I }
|
|
23
|
+
},
|
|
24
|
+
emits: ["click:remove"],
|
|
25
|
+
setup(c, { emit: i }) {
|
|
26
|
+
const e = c, d = i, r = l(
|
|
27
|
+
() => ["primary", "info", "success", "warning", "danger"].includes(e.color)
|
|
28
|
+
), m = l(() => {
|
|
29
|
+
const o = r.value ? `q-badge--${e.color}` : void 0;
|
|
30
|
+
return ["q-badge", `q-badge--${e.variant}`, o, { "q-badge--pill": e.pill }];
|
|
31
|
+
}), u = l(() => {
|
|
32
|
+
let o, t;
|
|
33
|
+
if (!r.value)
|
|
34
|
+
if (o = e.color, e.variant === "tonal")
|
|
35
|
+
t = e.color;
|
|
36
|
+
else {
|
|
37
|
+
const v = Q(o), f = S(v);
|
|
38
|
+
t = V(f.l);
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
"--q-badge-color": o,
|
|
42
|
+
"--q-badge-text-color": t
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
function p() {
|
|
46
|
+
d("click:remove");
|
|
47
|
+
}
|
|
48
|
+
return (o, t) => (a(), _(
|
|
49
|
+
"span",
|
|
50
|
+
{
|
|
51
|
+
class: b(m.value),
|
|
52
|
+
role: "presentation",
|
|
53
|
+
style: C(u.value)
|
|
54
|
+
},
|
|
55
|
+
[
|
|
56
|
+
$,
|
|
57
|
+
s("div", w, [
|
|
58
|
+
y(o.$slots, "default"),
|
|
59
|
+
e.removable ? (a(), q(n(z), {
|
|
60
|
+
key: 0,
|
|
61
|
+
class: "q-badge__remove",
|
|
62
|
+
borderless: "",
|
|
63
|
+
tabindex: "0",
|
|
64
|
+
onClick: p
|
|
65
|
+
}, {
|
|
66
|
+
default: k(() => [
|
|
67
|
+
B(
|
|
68
|
+
n(E),
|
|
69
|
+
h(x(e.icons.remove)),
|
|
70
|
+
null,
|
|
71
|
+
16
|
|
72
|
+
/* FULL_PROPS */
|
|
73
|
+
)
|
|
74
|
+
]),
|
|
75
|
+
_: 1
|
|
76
|
+
/* STABLE */
|
|
77
|
+
})) : N("v-if", !0)
|
|
78
|
+
])
|
|
79
|
+
],
|
|
80
|
+
6
|
|
81
|
+
/* CLASS, STYLE */
|
|
82
|
+
));
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
export {
|
|
86
|
+
A as default
|
|
87
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
declare const QBadge: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstance<Readonly<import('vue').ExtractPropTypes<{
|
|
3
|
+
variant: {
|
|
4
|
+
type: import('vue').PropType<"bold" | "tonal" | "outlined">;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
color: {
|
|
8
|
+
type: import('vue').PropType<string>;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
removable: {
|
|
12
|
+
type: import('vue').PropType<boolean>;
|
|
13
|
+
};
|
|
14
|
+
pill: {
|
|
15
|
+
type: import('vue').PropType<boolean>;
|
|
16
|
+
};
|
|
17
|
+
icons: {
|
|
18
|
+
type: import('vue').PropType<Record<string, import('..').Icon>>;
|
|
19
|
+
default: () => Record<string, import('..').Icon>;
|
|
20
|
+
};
|
|
21
|
+
}>> & {
|
|
22
|
+
"onClick:remove"?: (() => any) | undefined;
|
|
23
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
|
+
"click:remove": () => void;
|
|
25
|
+
}, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
|
|
26
|
+
variant: {
|
|
27
|
+
type: import('vue').PropType<"bold" | "tonal" | "outlined">;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
color: {
|
|
31
|
+
type: import('vue').PropType<string>;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
removable: {
|
|
35
|
+
type: import('vue').PropType<boolean>;
|
|
36
|
+
};
|
|
37
|
+
pill: {
|
|
38
|
+
type: import('vue').PropType<boolean>;
|
|
39
|
+
};
|
|
40
|
+
icons: {
|
|
41
|
+
type: import('vue').PropType<Record<string, import('..').Icon>>;
|
|
42
|
+
default: () => Record<string, import('..').Icon>;
|
|
43
|
+
};
|
|
44
|
+
}>> & {
|
|
45
|
+
"onClick:remove"?: (() => any) | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
variant: "bold" | "tonal" | "outlined";
|
|
48
|
+
color: string;
|
|
49
|
+
icons: Record<string, import('..').Icon>;
|
|
50
|
+
}, true, {}, {}, {
|
|
51
|
+
P: {};
|
|
52
|
+
B: {};
|
|
53
|
+
D: {};
|
|
54
|
+
C: {};
|
|
55
|
+
M: {};
|
|
56
|
+
Defaults: {};
|
|
57
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
58
|
+
variant: {
|
|
59
|
+
type: import('vue').PropType<"bold" | "tonal" | "outlined">;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
color: {
|
|
63
|
+
type: import('vue').PropType<string>;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
removable: {
|
|
67
|
+
type: import('vue').PropType<boolean>;
|
|
68
|
+
};
|
|
69
|
+
pill: {
|
|
70
|
+
type: import('vue').PropType<boolean>;
|
|
71
|
+
};
|
|
72
|
+
icons: {
|
|
73
|
+
type: import('vue').PropType<Record<string, import('..').Icon>>;
|
|
74
|
+
default: () => Record<string, import('..').Icon>;
|
|
75
|
+
};
|
|
76
|
+
}>> & {
|
|
77
|
+
"onClick:remove"?: (() => any) | undefined;
|
|
78
|
+
}, {}, {}, {}, {}, {
|
|
79
|
+
variant: "bold" | "tonal" | "outlined";
|
|
80
|
+
color: string;
|
|
81
|
+
icons: Record<string, import('..').Icon>;
|
|
82
|
+
}>;
|
|
83
|
+
__isFragment?: undefined;
|
|
84
|
+
__isTeleport?: undefined;
|
|
85
|
+
__isSuspense?: undefined;
|
|
86
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
87
|
+
variant: {
|
|
88
|
+
type: import('vue').PropType<"bold" | "tonal" | "outlined">;
|
|
89
|
+
default: string;
|
|
90
|
+
};
|
|
91
|
+
color: {
|
|
92
|
+
type: import('vue').PropType<string>;
|
|
93
|
+
default: string;
|
|
94
|
+
};
|
|
95
|
+
removable: {
|
|
96
|
+
type: import('vue').PropType<boolean>;
|
|
97
|
+
};
|
|
98
|
+
pill: {
|
|
99
|
+
type: import('vue').PropType<boolean>;
|
|
100
|
+
};
|
|
101
|
+
icons: {
|
|
102
|
+
type: import('vue').PropType<Record<string, import('..').Icon>>;
|
|
103
|
+
default: () => Record<string, import('..').Icon>;
|
|
104
|
+
};
|
|
105
|
+
}>> & {
|
|
106
|
+
"onClick:remove"?: (() => any) | undefined;
|
|
107
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
108
|
+
"click:remove": () => void;
|
|
109
|
+
}, string, {
|
|
110
|
+
variant: "bold" | "tonal" | "outlined";
|
|
111
|
+
color: string;
|
|
112
|
+
icons: Record<string, import('..').Icon>;
|
|
113
|
+
}, {}, string, {}> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
114
|
+
$slots: {
|
|
115
|
+
default?(_: {}): any;
|
|
116
|
+
};
|
|
117
|
+
});
|
|
118
|
+
export { QBadge };
|
|
119
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QBadge/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA6C,CAAA;AAGzD,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import "../QSpinnerLoader/index.js";
|
|
3
|
-
import B from "../QSpinnerLoader/QSpinnerLoader.vue.js";
|
|
1
|
+
import { defineComponent as m, computed as s, openBlock as o, createElementBlock as n, normalizeClass as v, withModifiers as y, createVNode as g, unref as k, createCommentVNode as l, createElementVNode as _, Fragment as i, createTextVNode as r, toDisplayString as d, renderSlot as q } from "vue";
|
|
2
|
+
import { QSpinnerLoader as B } from "../QSpinnerLoader/index.js";
|
|
4
3
|
const h = ["disabled"], z = {
|
|
5
4
|
key: 0,
|
|
6
5
|
class: "q-btn__spinner"
|
|
7
|
-
}, C = { class: "q-btn__content" }, O = /* @__PURE__ */
|
|
6
|
+
}, C = { class: "q-btn__content" }, O = /* @__PURE__ */ m({
|
|
8
7
|
__name: "QButton",
|
|
9
8
|
props: {
|
|
10
9
|
active: { type: Boolean },
|
|
@@ -20,12 +19,12 @@ const h = ["disabled"], z = {
|
|
|
20
19
|
class: { default: void 0 }
|
|
21
20
|
},
|
|
22
21
|
emits: ["click"],
|
|
23
|
-
setup(
|
|
24
|
-
const e =
|
|
22
|
+
setup(c, { emit: b }) {
|
|
23
|
+
const e = c, p = b, a = s(() => e.disabled || e.loading);
|
|
25
24
|
function u(t) {
|
|
26
25
|
a.value || p("click", t);
|
|
27
26
|
}
|
|
28
|
-
const
|
|
27
|
+
const f = s(() => {
|
|
29
28
|
const t = e.size !== "regular" ? `q-btn--${e.size}` : void 0;
|
|
30
29
|
return [
|
|
31
30
|
"q-btn",
|
|
@@ -41,22 +40,22 @@ const h = ["disabled"], z = {
|
|
|
41
40
|
e.class
|
|
42
41
|
];
|
|
43
42
|
});
|
|
44
|
-
return (t,
|
|
43
|
+
return (t, S) => (o(), n("button", {
|
|
45
44
|
type: "button",
|
|
46
|
-
class: v(
|
|
45
|
+
class: v(f.value),
|
|
47
46
|
disabled: a.value,
|
|
48
47
|
onClick: y(u, ["stop", "prevent"])
|
|
49
48
|
}, [
|
|
50
49
|
t.loading ? (o(), n("div", z, [
|
|
51
|
-
|
|
50
|
+
g(k(B), { size: 20 })
|
|
52
51
|
])) : l("v-if", !0),
|
|
53
|
-
|
|
52
|
+
_("span", C, [
|
|
54
53
|
t.iconOnRight ? (o(), n(
|
|
55
54
|
i,
|
|
56
55
|
{ key: 0 },
|
|
57
56
|
[
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
r(
|
|
58
|
+
d(e.label),
|
|
60
59
|
1
|
|
61
60
|
/* TEXT */
|
|
62
61
|
)
|
|
@@ -69,8 +68,8 @@ const h = ["disabled"], z = {
|
|
|
69
68
|
i,
|
|
70
69
|
{ key: 1 },
|
|
71
70
|
[
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
r(
|
|
72
|
+
d(e.label),
|
|
74
73
|
1
|
|
75
74
|
/* TEXT */
|
|
76
75
|
)
|