@quidgest/ui 0.14.13 → 0.14.15
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 +156 -123
- package/dist/ui.esm.js +3809 -3681
- package/dist/ui.js +22 -22
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +645 -634
- package/dist/ui.scss +176 -142
- package/esm/components/QAccordion/QAccordion.d.ts.map +1 -1
- package/esm/components/QAccordion/QAccordion.vue.js +26 -13
- package/esm/components/QAccordion/index.d.ts +15 -3
- package/esm/components/QAccordion/index.d.ts.map +1 -1
- package/esm/components/QAccordion/types.d.ts +13 -3
- package/esm/components/QAccordion/types.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.d.ts +2 -1
- package/esm/components/QBadge/QBadge.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.vue.js +33 -27
- package/esm/components/QBadge/index.d.ts +6 -3
- package/esm/components/QBadge/index.d.ts.map +1 -1
- package/esm/components/QBadge/types.d.ts +13 -5
- package/esm/components/QBadge/types.d.ts.map +1 -1
- package/esm/components/QBadgeIndicator/QBadgeIndicator.d.ts +1 -1
- package/esm/components/QBadgeIndicator/QBadgeIndicator.d.ts.map +1 -1
- package/esm/components/QBadgeIndicator/QBadgeIndicator.vue.js +19 -14
- package/esm/components/QBadgeIndicator/index.d.ts +3 -3
- package/esm/components/QBadgeIndicator/types.d.ts +6 -4
- package/esm/components/QBadgeIndicator/types.d.ts.map +1 -1
- package/esm/components/QButton/QButton.d.ts +2 -2
- package/esm/components/QButton/QButton.d.ts.map +1 -1
- package/esm/components/QButton/QButton.vue.js +17 -15
- package/esm/components/QButton/index.d.ts +6 -6
- package/esm/components/QButton/types.d.ts +6 -7
- 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 +19 -24
- package/esm/components/QButtonGroup/types.d.ts +2 -5
- package/esm/components/QButtonGroup/types.d.ts.map +1 -1
- package/esm/components/QButtonToggle/QButtonToggle.d.ts.map +1 -1
- package/esm/components/QButtonToggle/QButtonToggle.vue.js +24 -22
- package/esm/components/QButtonToggle/index.d.ts +21 -3
- package/esm/components/QButtonToggle/index.d.ts.map +1 -1
- package/esm/components/QButtonToggle/types.d.ts +4 -7
- package/esm/components/QButtonToggle/types.d.ts.map +1 -1
- package/esm/components/QCard/QCard.d.ts +2 -2
- package/esm/components/QCard/QCard.d.ts.map +1 -1
- package/esm/components/QCard/QCard.vue.js +48 -46
- package/esm/components/QCard/index.d.ts +6 -6
- package/esm/components/QCard/types.d.ts +6 -7
- package/esm/components/QCard/types.d.ts.map +1 -1
- package/esm/components/QCheckbox/QCheckbox.d.ts +2 -2
- package/esm/components/QCheckbox/QCheckbox.d.ts.map +1 -1
- package/esm/components/QCheckbox/QCheckbox.vue.js +72 -78
- package/esm/components/QCheckbox/QCheckboxLabel.vue.js +9 -7
- package/esm/components/QCheckbox/index.d.ts +21 -21
- package/esm/components/QCheckbox/types.d.ts +10 -15
- package/esm/components/QCheckbox/types.d.ts.map +1 -1
- package/esm/components/QCollapsible/QCollapsible.d.ts +2 -2
- package/esm/components/QCollapsible/QCollapsible.d.ts.map +1 -1
- package/esm/components/QCollapsible/QCollapsible.vue.js +12 -9
- package/esm/components/QCollapsible/index.d.ts +33 -6
- package/esm/components/QCollapsible/index.d.ts.map +1 -1
- package/esm/components/QCollapsible/types.d.ts +15 -15
- package/esm/components/QCollapsible/types.d.ts.map +1 -1
- package/esm/components/QColorPicker/QColorPicker.d.ts.map +1 -1
- package/esm/components/QColorPicker/QColorPicker.vue.js +16 -15
- package/esm/components/QColorPicker/index.d.ts +27 -3
- package/esm/components/QColorPicker/index.d.ts.map +1 -1
- package/esm/components/QColorPicker/types.d.ts +2 -9
- package/esm/components/QColorPicker/types.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.d.ts +209 -75
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.vue.js +64 -68
- package/esm/components/QCombobox/index.d.ts +331 -89
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QCombobox/types.d.ts +14 -51
- package/esm/components/QCombobox/types.d.ts.map +1 -1
- package/esm/components/QCombobox/types.js +3 -3
- package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +2 -1
- package/esm/components/QDateTimePicker/index.d.ts +51 -3
- package/esm/components/QDateTimePicker/index.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/types.d.ts +2 -31
- package/esm/components/QDateTimePicker/types.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.d.ts +1 -1
- package/esm/components/QDialog/QDialog.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.vue.js +36 -37
- package/esm/components/QDialog/index.d.ts +39 -6
- package/esm/components/QDialog/index.d.ts.map +1 -1
- package/esm/components/QDialog/types.d.ts +14 -21
- package/esm/components/QDialog/types.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenu.d.ts +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenu.vue.js +4 -3
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +60 -26
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +68 -63
- package/esm/components/QDropdownMenu/index.d.ts +27 -3
- package/esm/components/QDropdownMenu/index.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/types.d.ts +3 -6
- package/esm/components/QDropdownMenu/types.d.ts.map +1 -1
- package/esm/components/QField/QField.d.ts.map +1 -1
- package/esm/components/QField/QField.vue.js +34 -35
- package/esm/components/QField/types.d.ts +2 -9
- package/esm/components/QField/types.d.ts.map +1 -1
- package/esm/components/QFileUpload/QFileUpload.d.ts +1 -1
- package/esm/components/QFileUpload/QFileUpload.vue.js +2 -1
- package/esm/components/QFileUpload/index.d.ts +39 -6
- package/esm/components/QFileUpload/index.d.ts.map +1 -1
- package/esm/components/QFileUpload/types.d.ts +3 -30
- package/esm/components/QFileUpload/types.d.ts.map +1 -1
- package/esm/components/QIcon/QIcon.d.ts +2 -2
- package/esm/components/QIcon/QIcon.d.ts.map +1 -1
- package/esm/components/QIcon/QIcon.vue.js +7 -5
- package/esm/components/QIcon/QIconFont.d.ts.map +1 -1
- package/esm/components/QIcon/QIconFont.vue.js +12 -16
- package/esm/components/QIcon/QIconImg.d.ts +2 -2
- package/esm/components/QIcon/QIconImg.d.ts.map +1 -1
- package/esm/components/QIcon/QIconImg.vue.js +8 -6
- package/esm/components/QIcon/QIconSvg.d.ts.map +1 -1
- package/esm/components/QIcon/QIconSvg.vue.js +12 -10
- package/esm/components/QIcon/index.d.ts +4 -4
- package/esm/components/QIcon/index.d.ts.map +1 -1
- package/esm/components/QIcon/types.d.ts +6 -8
- package/esm/components/QIcon/types.d.ts.map +1 -1
- package/esm/components/QInputGroup/QInputGroup.vue.js +21 -18
- package/esm/components/QInputGroup/types.d.ts +2 -23
- package/esm/components/QInputGroup/types.d.ts.map +1 -1
- package/esm/components/QLineLoader/QLineLoader.d.ts +1 -2
- package/esm/components/QLineLoader/QLineLoader.d.ts.map +1 -1
- package/esm/components/QLineLoader/QLineLoader.vue.js +10 -14
- package/esm/components/QLineLoader/index.d.ts +1 -1
- package/esm/components/QLineLoader/index.d.ts.map +1 -1
- package/esm/components/QLineLoader/types.d.ts +2 -6
- package/esm/components/QLineLoader/types.d.ts.map +1 -1
- package/esm/components/QList/QList.d.ts +3 -3
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QList.vue.js +30 -26
- package/esm/components/QList/index.d.ts +35 -11
- package/esm/components/QList/index.d.ts.map +1 -1
- package/esm/components/QList/types.d.ts +3 -6
- package/esm/components/QList/types.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.d.ts +1 -1
- package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.vue.js +93 -97
- package/esm/components/QOverlay/index.d.ts +63 -6
- package/esm/components/QOverlay/index.d.ts.map +1 -1
- package/esm/components/QOverlay/types.d.ts +2 -5
- package/esm/components/QOverlay/types.d.ts.map +1 -1
- package/esm/components/QPopover/QPopover.d.ts +1 -1
- package/esm/components/QPopover/QPopover.d.ts.map +1 -1
- package/esm/components/QPopover/QPopover.vue.js +23 -20
- package/esm/components/QPopover/index.d.ts +36 -6
- package/esm/components/QPopover/index.d.ts.map +1 -1
- package/esm/components/QPopover/types.d.ts +2 -1
- package/esm/components/QPopover/types.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyList.d.ts +2 -2
- package/esm/components/QPropertyList/QPropertyList.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyList.vue.js +126 -115
- package/esm/components/QPropertyList/QPropertyListGroup.d.ts +2 -2
- package/esm/components/QPropertyList/QPropertyListGroup.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyListGroup.vue.js +19 -17
- package/esm/components/QPropertyList/QPropertyListPanel.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyListPanel.vue.js +19 -14
- package/esm/components/QPropertyList/QPropertyListRow.d.ts +6 -3
- package/esm/components/QPropertyList/QPropertyListRow.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyListRow.vue.js +33 -23
- package/esm/components/QPropertyList/index.d.ts +8 -7
- package/esm/components/QPropertyList/index.d.ts.map +1 -1
- package/esm/components/QPropertyList/types.d.ts +35 -21
- package/esm/components/QPropertyList/types.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.d.ts +63 -29
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +49 -48
- package/esm/components/QSelect/index.d.ts +104 -24
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSelect/types.d.ts +10 -39
- package/esm/components/QSelect/types.d.ts.map +1 -1
- package/esm/components/QSkeletonLoader/QSkeletonLoader.d.ts.map +1 -1
- package/esm/components/QSkeletonLoader/QSkeletonLoader.vue.js +20 -23
- package/esm/components/QSkeletonLoader/types.d.ts +2 -1
- package/esm/components/QSkeletonLoader/types.d.ts.map +1 -1
- package/esm/components/QSpinnerLoader/QSpinnerLoader.d.ts.map +1 -1
- package/esm/components/QSpinnerLoader/QSpinnerLoader.vue.js +13 -17
- package/esm/components/QSpinnerLoader/types.d.ts +2 -5
- package/esm/components/QSpinnerLoader/types.d.ts.map +1 -1
- package/esm/components/QTextField/QTextField.d.ts +2 -2
- package/esm/components/QTextField/QTextField.d.ts.map +1 -1
- package/esm/components/QTextField/QTextField.vue.js +27 -30
- package/esm/components/QTextField/index.d.ts +40 -4
- package/esm/components/QTextField/index.d.ts.map +1 -1
- package/esm/components/QTextField/types.d.ts +2 -40
- package/esm/components/QTextField/types.d.ts.map +1 -1
- package/esm/components/QThemeProvider/QThemeProvider.d.ts.map +1 -1
- package/esm/components/QThemeProvider/QThemeProvider.vue.js +13 -16
- package/esm/components/QThemeProvider/types.d.ts +2 -1
- package/esm/components/QThemeProvider/types.d.ts.map +1 -1
- package/esm/components/QTooltip/QTooltip.d.ts +1 -1
- package/esm/components/QTooltip/QTooltip.d.ts.map +1 -1
- package/esm/components/QTooltip/QTooltip.vue.js +52 -31
- package/esm/components/QTooltip/index.d.ts +45 -6
- package/esm/components/QTooltip/index.d.ts.map +1 -1
- package/esm/components/QTooltip/types.d.ts +2 -9
- package/esm/components/QTooltip/types.d.ts.map +1 -1
- package/esm/components/__internal__/QChevron/QChevron.d.ts.map +1 -1
- package/esm/components/__internal__/QChevron/QChevron.vue.js +19 -11
- package/esm/components/__internal__/QChevron/index.d.ts +6 -2
- package/esm/components/__internal__/QChevron/index.d.ts.map +1 -1
- package/esm/components/__internal__/QChevron/types.d.ts +2 -5
- package/esm/components/__internal__/QChevron/types.d.ts.map +1 -1
- package/esm/components/__internal__/QClearButton/QClearButton.d.ts.map +1 -1
- package/esm/components/__internal__/QClearButton/QClearButton.vue.js +23 -18
- package/esm/components/__internal__/QClearButton/types.d.ts +2 -5
- package/esm/components/__internal__/QClearButton/types.d.ts.map +1 -1
- package/esm/composables/group.d.ts +88 -8
- package/esm/composables/group.d.ts.map +1 -1
- package/esm/composables/group.js +19 -22
- package/esm/composables/uid.d.ts +3 -2
- package/esm/composables/uid.d.ts.map +1 -1
- package/esm/composables/uid.js +5 -4
- package/esm/types/component.d.ts +18 -0
- package/esm/types/component.d.ts.map +1 -0
- package/package.json +11 -11
|
@@ -1,27 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideDefaults as
|
|
3
|
-
import { useGroup as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as l, mergeModels as c, toRef as t, useModel as n, watch as r, createElementBlock as d, openBlock as m, normalizeClass as p, renderSlot as u } from "vue";
|
|
2
|
+
import { provideDefaults as f } from "../../composables/defaults.js";
|
|
3
|
+
import { useGroup as v } from "../../composables/group.js";
|
|
4
|
+
const g = ["id"], B = /* @__PURE__ */ l({
|
|
5
5
|
__name: "QAccordion",
|
|
6
|
-
props: /* @__PURE__ */
|
|
6
|
+
props: /* @__PURE__ */ c({
|
|
7
|
+
id: {},
|
|
8
|
+
class: {},
|
|
9
|
+
iconRight: { type: Boolean },
|
|
10
|
+
spacing: {},
|
|
7
11
|
variant: {}
|
|
8
12
|
}, {
|
|
9
13
|
modelValue: {},
|
|
10
14
|
modelModifiers: {}
|
|
11
15
|
}),
|
|
12
16
|
emits: ["update:modelValue"],
|
|
13
|
-
setup(
|
|
14
|
-
|
|
17
|
+
setup(i) {
|
|
18
|
+
const e = i;
|
|
19
|
+
f({
|
|
15
20
|
QCollapsible: {
|
|
16
|
-
|
|
21
|
+
iconRight: t(e, "iconRight"),
|
|
22
|
+
spacing: t(e, "spacing"),
|
|
23
|
+
variant: t(e, "variant"),
|
|
24
|
+
width: "block"
|
|
17
25
|
}
|
|
18
26
|
});
|
|
19
|
-
const
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
27
|
+
const a = n(i, "modelValue"), { active: s } = v({ active: a });
|
|
28
|
+
return r(s, (o) => {
|
|
29
|
+
a.value = o;
|
|
30
|
+
}), (o, h) => (m(), d("div", {
|
|
31
|
+
id: e.id,
|
|
32
|
+
class: p(["q-accordion", e.class])
|
|
33
|
+
}, [
|
|
34
|
+
u(o.$slots, "default")
|
|
35
|
+
], 10, g));
|
|
23
36
|
}
|
|
24
37
|
});
|
|
25
38
|
export {
|
|
26
|
-
|
|
39
|
+
B as default
|
|
27
40
|
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
declare const QAccordion: {
|
|
2
2
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
3
3
|
modelValue?: string;
|
|
4
|
-
} & import('
|
|
4
|
+
} & import('../../types/component').QBaseComponentProps & {
|
|
5
|
+
iconRight?: boolean;
|
|
6
|
+
spacing?: import('../QCollapsible/types').QCollapsibleSpacing;
|
|
7
|
+
variant?: import('../QCollapsible/types').QCollapsibleVariant;
|
|
8
|
+
}> & Readonly<{
|
|
5
9
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
6
10
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
11
|
"update:modelValue": (value: string) => any;
|
|
@@ -14,7 +18,11 @@ declare const QAccordion: {
|
|
|
14
18
|
Defaults: {};
|
|
15
19
|
}, Readonly<{
|
|
16
20
|
modelValue?: string;
|
|
17
|
-
} & import('
|
|
21
|
+
} & import('../../types/component').QBaseComponentProps & {
|
|
22
|
+
iconRight?: boolean;
|
|
23
|
+
spacing?: import('../QCollapsible/types').QCollapsibleSpacing;
|
|
24
|
+
variant?: import('../QCollapsible/types').QCollapsibleVariant;
|
|
25
|
+
}> & Readonly<{
|
|
18
26
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
19
27
|
}>, {}, {}, {}, {}, {}>;
|
|
20
28
|
__isFragment?: never;
|
|
@@ -22,7 +30,11 @@ declare const QAccordion: {
|
|
|
22
30
|
__isSuspense?: never;
|
|
23
31
|
} & import('vue').ComponentOptionsBase<Readonly<{
|
|
24
32
|
modelValue?: string;
|
|
25
|
-
} & import('
|
|
33
|
+
} & import('../../types/component').QBaseComponentProps & {
|
|
34
|
+
iconRight?: boolean;
|
|
35
|
+
spacing?: import('../QCollapsible/types').QCollapsibleSpacing;
|
|
36
|
+
variant?: import('../QCollapsible/types').QCollapsibleVariant;
|
|
37
|
+
}> & Readonly<{
|
|
26
38
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
27
39
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
40
|
"update:modelValue": (value: string) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QAccordion/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QAccordion/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA+B,CAAA;AAG/C,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import { QCollapsibleSpacing, QCollapsibleVariant } from '../QCollapsible/types';
|
|
2
|
+
import { QBaseComponentProps } from '../../types/component';
|
|
3
|
+
export type QAccordionProps = QBaseComponentProps & {
|
|
2
4
|
/**
|
|
3
|
-
*
|
|
5
|
+
* If true, positions the expand/collapse icon on the right.
|
|
4
6
|
*/
|
|
5
|
-
|
|
7
|
+
iconRight?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Defines the spacing around the title of each collapsible panel.
|
|
10
|
+
*/
|
|
11
|
+
spacing?: QCollapsibleSpacing;
|
|
12
|
+
/**
|
|
13
|
+
* Specifies the visual style of the collapsible sections.
|
|
14
|
+
*/
|
|
15
|
+
variant?: QCollapsibleVariant;
|
|
6
16
|
};
|
|
7
17
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QAccordion/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QAccordion/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAC/F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAE5D,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAAG;IACnD;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAA;IAE7B;;OAEG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC7B,CAAA"}
|
|
@@ -13,7 +13,8 @@ declare const __VLS_component: import('vue').DefineComponent<QBadgeProps, {}, {}
|
|
|
13
13
|
}, string, import('vue').PublicProps, Readonly<QBadgeProps> & Readonly<{
|
|
14
14
|
"onClick:remove"?: (() => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
|
-
|
|
16
|
+
size: import('./types').QBadgeSize;
|
|
17
|
+
variant: import('./types').QBadgeVariant;
|
|
17
18
|
color: string;
|
|
18
19
|
icons: typeof DEFAULT_ICONS;
|
|
19
20
|
texts: typeof DEFAULT_TEXTS;
|
|
@@ -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":"AAuBA;AA2HC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAK1C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AA4FvD,iBAAS,cAAc;WAsET,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,39 +1,44 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { QButton as
|
|
3
|
-
import { QIcon as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const O = ["role", "tabindex", "onKeydown"], X = { class: "q-badge__content" }, Z = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as y, useAttrs as h, computed as n, createElementBlock as z, openBlock as c, withKeys as B, normalizeStyle as T, normalizeClass as w, withModifiers as E, createElementVNode as u, renderSlot as N, createBlock as S, createCommentVNode as $, unref as m, withCtx as A, createVNode as H, normalizeProps as I, guardReactiveProps as K } from "vue";
|
|
2
|
+
import { QButton as P } from "../QButton/index.js";
|
|
3
|
+
import { QIcon as Q } from "../QIcon/index.js";
|
|
4
|
+
import { parseColor as U, rgbToHsl as V, colorToHex as D, darken as F, getContrastingColor as L } from "../../utils/color.js";
|
|
5
|
+
import { DEFAULT_TEXTS as R, DEFAULT_ICONS as M } from "./types.js";
|
|
6
|
+
const O = ["id", "role", "tabindex", "onKeydown"], X = { class: "q-badge__content" }, Z = /* @__PURE__ */ y({
|
|
7
7
|
__name: "QBadge",
|
|
8
8
|
props: {
|
|
9
|
+
id: {},
|
|
10
|
+
class: {},
|
|
9
11
|
color: { default: "primary" },
|
|
10
12
|
variant: { default: "tonal" },
|
|
11
13
|
removable: { type: Boolean },
|
|
12
14
|
pill: { type: Boolean },
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
size: { default: "default" },
|
|
16
|
+
icons: { default: () => M },
|
|
17
|
+
texts: { default: () => R }
|
|
15
18
|
},
|
|
16
19
|
emits: ["click:remove"],
|
|
17
20
|
setup(f, { emit: p }) {
|
|
18
|
-
const e = f, v = p, b = h(), l =
|
|
21
|
+
const e = f, v = p, b = h(), l = n(() => !!b.onClick), r = n(
|
|
19
22
|
() => ["primary", "info", "success", "warning", "danger", "highlight"].includes(e.color)
|
|
20
|
-
), g =
|
|
21
|
-
const o =
|
|
23
|
+
), g = n(() => {
|
|
24
|
+
const o = r.value ? `q-badge--${e.color}` : void 0, t = e.size !== "default" ? `q-badge--${e.size}` : void 0;
|
|
22
25
|
return [
|
|
23
26
|
"q-badge",
|
|
24
27
|
`q-badge--${e.variant}`,
|
|
25
28
|
o,
|
|
29
|
+
t,
|
|
26
30
|
{
|
|
27
31
|
"q-badge--pill": e.pill,
|
|
28
32
|
"q-badge--clickable": l.value
|
|
29
|
-
}
|
|
33
|
+
},
|
|
34
|
+
e.class
|
|
30
35
|
];
|
|
31
|
-
}), C =
|
|
36
|
+
}), C = n(() => {
|
|
32
37
|
let o, t, a, i;
|
|
33
|
-
if (!
|
|
38
|
+
if (!r.value) {
|
|
34
39
|
o = e.color;
|
|
35
|
-
const s =
|
|
36
|
-
e.variant === "tonal" || e.variant === "outlined" ? (t = o, l.value && (i =
|
|
40
|
+
const s = U(o), q = V(s), d = L(q.l), x = D(F(s, 25));
|
|
41
|
+
e.variant === "tonal" || e.variant === "outlined" ? (t = o, l.value && (i = d)) : (t = d, l.value && (a = x));
|
|
37
42
|
}
|
|
38
43
|
return {
|
|
39
44
|
"--q-badge-color": o,
|
|
@@ -48,12 +53,13 @@ const O = ["role", "tabindex", "onKeydown"], X = { class: "q-badge__content" },
|
|
|
48
53
|
function k(o) {
|
|
49
54
|
o.stopImmediatePropagation();
|
|
50
55
|
}
|
|
51
|
-
return (o, t) => (
|
|
52
|
-
|
|
56
|
+
return (o, t) => (c(), z("span", {
|
|
57
|
+
id: e.id,
|
|
58
|
+
class: w(g.value),
|
|
53
59
|
role: l.value ? "button" : "presentation",
|
|
54
|
-
style:
|
|
60
|
+
style: T(C.value),
|
|
55
61
|
tabindex: l.value ? 0 : void 0,
|
|
56
|
-
onKeydown:
|
|
62
|
+
onKeydown: B(E(k, ["stop", "prevent"]), ["enter"])
|
|
57
63
|
}, [
|
|
58
64
|
t[0] || (t[0] = u(
|
|
59
65
|
"div",
|
|
@@ -63,8 +69,8 @@ const O = ["role", "tabindex", "onKeydown"], X = { class: "q-badge__content" },
|
|
|
63
69
|
/* HOISTED */
|
|
64
70
|
)),
|
|
65
71
|
u("div", X, [
|
|
66
|
-
|
|
67
|
-
e.removable ? (
|
|
72
|
+
N(o.$slots, "default"),
|
|
73
|
+
e.removable ? (c(), S(m(P), {
|
|
68
74
|
key: 0,
|
|
69
75
|
class: "q-badge__remove",
|
|
70
76
|
borderless: "",
|
|
@@ -72,10 +78,10 @@ const O = ["role", "tabindex", "onKeydown"], X = { class: "q-badge__content" },
|
|
|
72
78
|
onClick: _,
|
|
73
79
|
"aria-label": e.texts.removeText
|
|
74
80
|
}, {
|
|
75
|
-
default:
|
|
76
|
-
|
|
77
|
-
m(
|
|
78
|
-
K(
|
|
81
|
+
default: A(() => [
|
|
82
|
+
H(
|
|
83
|
+
m(Q),
|
|
84
|
+
I(K(e.icons.remove)),
|
|
79
85
|
null,
|
|
80
86
|
16
|
|
81
87
|
/* FULL_PROPS */
|
|
@@ -83,7 +89,7 @@ const O = ["role", "tabindex", "onKeydown"], X = { class: "q-badge__content" },
|
|
|
83
89
|
]),
|
|
84
90
|
_: 1
|
|
85
91
|
/* STABLE */
|
|
86
|
-
}, 8, ["aria-label"])) :
|
|
92
|
+
}, 8, ["aria-label"])) : $("v-if", !0)
|
|
87
93
|
])
|
|
88
94
|
], 46, O));
|
|
89
95
|
}
|
|
@@ -4,7 +4,8 @@ declare const QBadge: {
|
|
|
4
4
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
5
5
|
"click:remove": () => any;
|
|
6
6
|
}, import('vue').PublicProps, {
|
|
7
|
-
|
|
7
|
+
size: import('./types').QBadgeSize;
|
|
8
|
+
variant: import('./types').QBadgeVariant;
|
|
8
9
|
color: string;
|
|
9
10
|
icons: typeof import('./types').DEFAULT_ICONS;
|
|
10
11
|
texts: typeof import('./types').DEFAULT_TEXTS;
|
|
@@ -18,7 +19,8 @@ declare const QBadge: {
|
|
|
18
19
|
}, Readonly<import('./types').QBadgeProps> & Readonly<{
|
|
19
20
|
"onClick:remove"?: (() => any) | undefined;
|
|
20
21
|
}>, {}, {}, {}, {}, {
|
|
21
|
-
|
|
22
|
+
size: import('./types').QBadgeSize;
|
|
23
|
+
variant: import('./types').QBadgeVariant;
|
|
22
24
|
color: string;
|
|
23
25
|
icons: typeof import('./types').DEFAULT_ICONS;
|
|
24
26
|
texts: typeof import('./types').DEFAULT_TEXTS;
|
|
@@ -31,7 +33,8 @@ declare const QBadge: {
|
|
|
31
33
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
32
34
|
"click:remove": () => any;
|
|
33
35
|
}, string, {
|
|
34
|
-
|
|
36
|
+
size: import('./types').QBadgeSize;
|
|
37
|
+
variant: import('./types').QBadgeVariant;
|
|
35
38
|
color: string;
|
|
36
39
|
icons: typeof import('./types').DEFAULT_ICONS;
|
|
37
40
|
texts: typeof import('./types').DEFAULT_TEXTS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QBadge/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QBadge/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA2B,CAAA;AAGvC,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
import { QBaseComponentProps } from '../../types/component';
|
|
2
|
+
export type QBadgeVariant = 'tonal' | 'bold' | 'outlined';
|
|
3
|
+
export type QBadgeSize = 'default' | 'large';
|
|
4
|
+
export type QBadgeProps = QBaseComponentProps & {
|
|
2
5
|
/**
|
|
3
6
|
* The color of the badge.
|
|
4
|
-
* Can be chosen from utility colors like 'success' or 'danger',
|
|
7
|
+
* Can be chosen from utility colors like 'success' or 'danger',
|
|
8
|
+
* or specified using CSS color codes.
|
|
5
9
|
*/
|
|
6
10
|
color?: string;
|
|
7
11
|
/**
|
|
8
|
-
*
|
|
12
|
+
* Specifies the visual style of the badge.
|
|
9
13
|
*/
|
|
10
|
-
variant?:
|
|
14
|
+
variant?: QBadgeVariant;
|
|
11
15
|
/**
|
|
12
|
-
*
|
|
16
|
+
* Whether the badge can be removed.
|
|
13
17
|
*/
|
|
14
18
|
removable?: boolean;
|
|
15
19
|
/**
|
|
16
20
|
* Whether to convey a pill shape to the badge.
|
|
17
21
|
*/
|
|
18
22
|
pill?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The size of the badge.
|
|
25
|
+
*/
|
|
26
|
+
size?: QBadgeSize;
|
|
19
27
|
/**
|
|
20
28
|
* Custom icon configurations.
|
|
21
29
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QBadge/types.ts"],"names":[],"mappings":"
|
|
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;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAA;IAEvB;;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"}
|
|
@@ -10,7 +10,7 @@ declare function __VLS_template(): {
|
|
|
10
10
|
};
|
|
11
11
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
12
|
declare const __VLS_component: import('vue').DefineComponent<QBadgeIndicatorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<QBadgeIndicatorProps> & Readonly<{}>, {
|
|
13
|
-
|
|
13
|
+
placement: import('./types').QBadgeIndicatorPlacement;
|
|
14
14
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
15
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
16
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QBadgeIndicator.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QBadgeIndicator/QBadgeIndicator.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QBadgeIndicator.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QBadgeIndicator/QBadgeIndicator.vue"],"names":[],"mappings":"AAgBA;AAmDC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AA6BpD,iBAAS,cAAc;WA+CT,OAAO,IAA6B;;yBAXrB,GAAG;yBACH,GAAG;;;;EAe/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;wFAQnB,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,32 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as d, useSlots as i, computed as o, createElementBlock as p, openBlock as m, normalizeClass as a, renderSlot as n, createVNode as u, unref as f, withCtx as _, createTextVNode as g, toDisplayString as b } from "vue";
|
|
2
2
|
import { QBadge as h } from "../QBadge/index.js";
|
|
3
|
-
const q =
|
|
3
|
+
const q = ["id"], S = /* @__PURE__ */ d({
|
|
4
4
|
__name: "QBadgeIndicator",
|
|
5
5
|
props: {
|
|
6
|
+
id: {},
|
|
7
|
+
class: {},
|
|
6
8
|
content: {},
|
|
7
|
-
|
|
9
|
+
placement: { default: "top-right" },
|
|
8
10
|
color: {}
|
|
9
11
|
},
|
|
10
12
|
setup(s) {
|
|
11
|
-
const
|
|
13
|
+
const t = s, c = i(), l = o(() => !t.content && !c.content), r = o(() => [
|
|
12
14
|
"q-badge-indicator",
|
|
13
|
-
`q-badge-indicator--${
|
|
15
|
+
`q-badge-indicator--${t.placement}`,
|
|
14
16
|
{
|
|
15
|
-
"q-badge-indicator--dot":
|
|
17
|
+
"q-badge-indicator--dot": l.value
|
|
16
18
|
}
|
|
17
19
|
]);
|
|
18
|
-
return (
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
return (e, v) => (m(), p("div", {
|
|
21
|
+
id: t.id,
|
|
22
|
+
class: a(["q-badge-indicator__wrapper", t.class])
|
|
23
|
+
}, [
|
|
24
|
+
n(e.$slots, "default"),
|
|
25
|
+
u(f(h), {
|
|
21
26
|
pill: "",
|
|
22
27
|
variant: "bold",
|
|
23
|
-
class:
|
|
24
|
-
color:
|
|
28
|
+
class: a(r.value),
|
|
29
|
+
color: t.color
|
|
25
30
|
}, {
|
|
26
31
|
default: _(() => [
|
|
27
|
-
n(
|
|
32
|
+
n(e.$slots, "content", {}, () => [
|
|
28
33
|
g(
|
|
29
|
-
b(
|
|
34
|
+
b(t.content),
|
|
30
35
|
1
|
|
31
36
|
/* TEXT */
|
|
32
37
|
)
|
|
@@ -35,7 +40,7 @@ const q = { class: "q-badge-indicator__wrapper" }, S = /* @__PURE__ */ l({
|
|
|
35
40
|
_: 3
|
|
36
41
|
/* FORWARDED */
|
|
37
42
|
}, 8, ["class", "color"])
|
|
38
|
-
]));
|
|
43
|
+
], 10, q));
|
|
39
44
|
}
|
|
40
45
|
});
|
|
41
46
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { QBadgeIndicatorProps } from './types';
|
|
2
2
|
declare const QBadgeIndicator: {
|
|
3
3
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<QBadgeIndicatorProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
4
|
-
|
|
4
|
+
placement: import('./types').QBadgeIndicatorPlacement;
|
|
5
5
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
6
6
|
P: {};
|
|
7
7
|
B: {};
|
|
@@ -10,13 +10,13 @@ declare const QBadgeIndicator: {
|
|
|
10
10
|
M: {};
|
|
11
11
|
Defaults: {};
|
|
12
12
|
}, Readonly<QBadgeIndicatorProps> & Readonly<{}>, {}, {}, {}, {}, {
|
|
13
|
-
|
|
13
|
+
placement: import('./types').QBadgeIndicatorPlacement;
|
|
14
14
|
}>;
|
|
15
15
|
__isFragment?: never;
|
|
16
16
|
__isTeleport?: never;
|
|
17
17
|
__isSuspense?: never;
|
|
18
18
|
} & import('vue').ComponentOptionsBase<Readonly<QBadgeIndicatorProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
19
|
-
|
|
19
|
+
placement: import('./types').QBadgeIndicatorPlacement;
|
|
20
20
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
21
21
|
$slots: {
|
|
22
22
|
default?(_: {}): any;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { QBaseComponentProps } from '../../types/component';
|
|
2
|
+
/** The possible placements for a QBadgeIndicator component. */
|
|
3
|
+
export type QBadgeIndicatorPlacement = 'top-right' | 'top-center' | 'top-left' | 'middle-right' | 'middle-left' | 'bottom-right' | 'bottom-center' | 'bottom-left';
|
|
4
|
+
export type QBadgeIndicatorProps = QBaseComponentProps & {
|
|
3
5
|
/**
|
|
4
6
|
* The content to display inside the badge.
|
|
5
7
|
* If omitted, the badge appears as a small dot.
|
|
6
8
|
*/
|
|
7
9
|
content?: string;
|
|
8
10
|
/**
|
|
9
|
-
* The
|
|
11
|
+
* The placement of the badge relative to the wrapped element.
|
|
10
12
|
* Defaults to `top-right`.
|
|
11
13
|
*/
|
|
12
|
-
|
|
14
|
+
placement?: QBadgeIndicatorPlacement;
|
|
13
15
|
/**
|
|
14
16
|
* The color of the badge.
|
|
15
17
|
* Can be chosen from utility colors like 'success' or 'danger', or specified using CSS color codes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QBadgeIndicator/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QBadgeIndicator/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAE5D,+DAA+D;AAC/D,MAAM,MAAM,wBAAwB,GACjC,WAAW,GACX,YAAY,GACZ,UAAU,GACV,cAAc,GACd,aAAa,GACb,cAAc,GACd,eAAe,GACf,aAAa,CAAA;AAEhB,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG;IACxD;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,SAAS,CAAC,EAAE,wBAAwB,CAAA;IAEpC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA"}
|
|
@@ -13,8 +13,8 @@ declare const __VLS_component: import('vue').DefineComponent<QButtonProps, {}, {
|
|
|
13
13
|
}, string, import('vue').PublicProps, Readonly<QButtonProps> & Readonly<{
|
|
14
14
|
onClick?: ((event: Event) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
|
-
size:
|
|
17
|
-
bStyle:
|
|
16
|
+
size: import('./types').QButtonSize;
|
|
17
|
+
bStyle: import('./types').QButtonVariant;
|
|
18
18
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
19
19
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
20
20
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QButton/QButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QButton/QButton.vue"],"names":[],"mappings":"AAyBA;AA2EC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AA8C5C,iBAAS,cAAc;WAmDT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;2FASnB,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,11 +1,13 @@
|
|
|
1
|
-
import { defineComponent as f, computed as
|
|
1
|
+
import { defineComponent as f, computed as s, createElementBlock as o, openBlock as n, withModifiers as y, normalizeClass as v, createCommentVNode as l, createElementVNode as g, createVNode as k, unref as _, renderSlot as q, Fragment as a, createTextVNode as d, toDisplayString as r } from "vue";
|
|
2
2
|
import { QSpinnerLoader as B } from "../QSpinnerLoader/index.js";
|
|
3
|
-
const h = ["disabled"], z = {
|
|
3
|
+
const h = ["id", "disabled"], z = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "q-btn__spinner"
|
|
6
6
|
}, C = { class: "q-btn__content" }, O = /* @__PURE__ */ f({
|
|
7
7
|
__name: "QButton",
|
|
8
8
|
props: {
|
|
9
|
+
id: {},
|
|
10
|
+
class: {},
|
|
9
11
|
active: { type: Boolean },
|
|
10
12
|
bStyle: { default: "secondary" },
|
|
11
13
|
label: {},
|
|
@@ -15,16 +17,15 @@ const h = ["disabled"], z = {
|
|
|
15
17
|
elevated: { type: Boolean },
|
|
16
18
|
block: { type: Boolean },
|
|
17
19
|
loading: { type: Boolean },
|
|
18
|
-
size: { default: "regular" }
|
|
19
|
-
class: {}
|
|
20
|
+
size: { default: "regular" }
|
|
20
21
|
},
|
|
21
22
|
emits: ["click"],
|
|
22
|
-
setup(
|
|
23
|
-
const e =
|
|
23
|
+
setup(c, { emit: b }) {
|
|
24
|
+
const e = c, p = b, i = s(() => e.disabled || e.loading);
|
|
24
25
|
function u(t) {
|
|
25
|
-
|
|
26
|
+
i.value || p("click", t);
|
|
26
27
|
}
|
|
27
|
-
const m =
|
|
28
|
+
const m = s(() => {
|
|
28
29
|
const t = e.size !== "regular" ? `q-btn--${e.size}` : void 0;
|
|
29
30
|
return [
|
|
30
31
|
"q-btn",
|
|
@@ -41,9 +42,10 @@ const h = ["disabled"], z = {
|
|
|
41
42
|
];
|
|
42
43
|
});
|
|
43
44
|
return (t, S) => (n(), o("button", {
|
|
45
|
+
id: e.id,
|
|
44
46
|
type: "button",
|
|
45
47
|
class: v(m.value),
|
|
46
|
-
disabled:
|
|
48
|
+
disabled: i.value,
|
|
47
49
|
onClick: y(u, ["stop", "prevent"])
|
|
48
50
|
}, [
|
|
49
51
|
t.loading ? (n(), o("div", z, [
|
|
@@ -51,11 +53,11 @@ const h = ["disabled"], z = {
|
|
|
51
53
|
])) : l("v-if", !0),
|
|
52
54
|
g("span", C, [
|
|
53
55
|
t.iconOnRight ? (n(), o(
|
|
54
|
-
|
|
56
|
+
a,
|
|
55
57
|
{ key: 0 },
|
|
56
58
|
[
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
d(
|
|
60
|
+
r(e.label),
|
|
59
61
|
1
|
|
60
62
|
/* TEXT */
|
|
61
63
|
)
|
|
@@ -65,11 +67,11 @@ const h = ["disabled"], z = {
|
|
|
65
67
|
)) : l("v-if", !0),
|
|
66
68
|
q(t.$slots, "default"),
|
|
67
69
|
t.iconOnRight ? l("v-if", !0) : (n(), o(
|
|
68
|
-
|
|
70
|
+
a,
|
|
69
71
|
{ key: 1 },
|
|
70
72
|
[
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
d(
|
|
74
|
+
r(e.label),
|
|
73
75
|
1
|
|
74
76
|
/* TEXT */
|
|
75
77
|
)
|
|
@@ -5,8 +5,8 @@ declare const QButton: {
|
|
|
5
5
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
6
6
|
click: (event: Event) => any;
|
|
7
7
|
}, import('vue').PublicProps, {
|
|
8
|
-
size:
|
|
9
|
-
bStyle:
|
|
8
|
+
size: import('./types').QButtonSize;
|
|
9
|
+
bStyle: import('./types').QButtonVariant;
|
|
10
10
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLButtonElement, import('vue').ComponentProvideOptions, {
|
|
11
11
|
P: {};
|
|
12
12
|
B: {};
|
|
@@ -17,8 +17,8 @@ declare const QButton: {
|
|
|
17
17
|
}, Readonly<QButtonProps> & Readonly<{
|
|
18
18
|
onClick?: ((event: Event) => any) | undefined;
|
|
19
19
|
}>, {}, {}, {}, {}, {
|
|
20
|
-
size:
|
|
21
|
-
bStyle:
|
|
20
|
+
size: import('./types').QButtonSize;
|
|
21
|
+
bStyle: import('./types').QButtonVariant;
|
|
22
22
|
}>;
|
|
23
23
|
__isFragment?: never;
|
|
24
24
|
__isTeleport?: never;
|
|
@@ -28,8 +28,8 @@ declare const QButton: {
|
|
|
28
28
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
29
29
|
click: (event: Event) => any;
|
|
30
30
|
}, string, {
|
|
31
|
-
size:
|
|
32
|
-
bStyle:
|
|
31
|
+
size: import('./types').QButtonSize;
|
|
32
|
+
bStyle: import('./types').QButtonVariant;
|
|
33
33
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
34
34
|
$slots: {
|
|
35
35
|
default?(_: {}): any;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { QBaseComponentProps } from '../../types/component';
|
|
2
|
+
export type QButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'danger' | 'plain';
|
|
3
|
+
export type QButtonSize = 'small' | 'regular';
|
|
4
|
+
export type QButtonProps = QBaseComponentProps & {
|
|
2
5
|
/**
|
|
3
6
|
* Indicates whether the button is active or not.
|
|
4
7
|
*/
|
|
@@ -6,7 +9,7 @@ export type QButtonProps = {
|
|
|
6
9
|
/**
|
|
7
10
|
* The style of the button.
|
|
8
11
|
*/
|
|
9
|
-
bStyle?:
|
|
12
|
+
bStyle?: QButtonVariant;
|
|
10
13
|
/**
|
|
11
14
|
* The text content of the button.
|
|
12
15
|
*/
|
|
@@ -38,10 +41,6 @@ export type QButtonProps = {
|
|
|
38
41
|
/**
|
|
39
42
|
* The size of the button, either 'regular' or 'small'.
|
|
40
43
|
*/
|
|
41
|
-
size?:
|
|
42
|
-
/**
|
|
43
|
-
* Custom set of classes to apply to the component.
|
|
44
|
-
*/
|
|
45
|
-
class?: string | unknown[];
|
|
44
|
+
size?: QButtonSize;
|
|
46
45
|
};
|
|
47
46
|
//# sourceMappingURL=types.d.ts.map
|