@quidgest/ui 0.15.9 → 0.16.1
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 +4 -1
- package/dist/ui.css +11 -12
- package/dist/ui.esm.js +3758 -3654
- package/dist/ui.js +26 -26
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +748 -741
- package/dist/ui.scss +34 -31
- package/esm/components/QAccordion/QAccordion.d.ts +4 -3
- package/esm/components/QAccordion/QAccordion.d.ts.map +1 -1
- package/esm/components/QAccordion/QAccordion.vue.js +21 -17
- package/esm/components/QAccordion/QAccordionItem.d.ts +19 -0
- package/esm/components/QAccordion/QAccordionItem.d.ts.map +1 -0
- package/esm/components/QAccordion/QAccordionItem.vue.js +42 -0
- package/esm/components/QAccordion/QAccordionItem.vue2.js +4 -0
- package/esm/components/QAccordion/index.d.ts +35 -15
- package/esm/components/QAccordion/index.d.ts.map +1 -1
- package/esm/components/QAccordion/index.js +6 -4
- package/esm/components/QAccordion/types.d.ts +25 -5
- package/esm/components/QAccordion/types.d.ts.map +1 -1
- package/esm/components/QButton/QButton.d.ts.map +1 -1
- package/esm/components/QButton/QButton.vue.js +9 -11
- package/esm/components/QButton/types.d.ts +0 -4
- package/esm/components/QButton/types.d.ts.map +1 -1
- package/esm/components/QCollapsible/QCollapsible.d.ts.map +1 -1
- package/esm/components/QCollapsible/QCollapsible.vue.js +60 -65
- package/esm/components/QCollapsible/index.d.ts +14 -14
- package/esm/components/QCollapsible/index.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.d.ts +16 -18
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.vue.js +59 -57
- package/esm/components/QCombobox/index.d.ts +11 -9
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QCombobox/types.d.ts +4 -0
- package/esm/components/QCombobox/types.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +16 -16
- package/esm/components/QList/QList.d.ts +9 -9
- package/esm/components/QList/QListItem.d.ts +1 -1
- package/esm/components/QList/index.d.ts +10 -10
- package/esm/components/QOverlay/QOverlay.vue.js +15 -16
- package/esm/components/QOverlay/index.d.ts +0 -3
- package/esm/components/QOverlay/index.d.ts.map +1 -1
- package/esm/components/QOverlay/types.d.ts +0 -4
- package/esm/components/QOverlay/types.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue.js +12 -13
- package/esm/components/QPopover/QPopover.d.ts.map +1 -1
- package/esm/components/QPopover/QPopover.vue.js +31 -34
- package/esm/components/QRadioGroup/QRadioButton.vue.js +3 -3
- package/esm/components/QRadioGroup/QRadioGroup.vue.js +1 -1
- package/esm/components/QSelect/QSelect.d.ts +16 -16
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +58 -56
- package/esm/components/QSelect/index.d.ts +11 -8
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSelect/types.d.ts +4 -0
- package/esm/components/QSelect/types.d.ts.map +1 -1
- package/esm/components/{QButtonToggle/QButtonToggle.d.ts → QToggle/QToggle.d.ts} +11 -9
- package/esm/components/QToggle/QToggle.d.ts.map +1 -0
- package/esm/components/QToggle/QToggle.vue.js +40 -0
- package/esm/components/QToggle/QToggle.vue2.js +4 -0
- package/esm/components/QToggle/index.d.ts +71 -0
- package/esm/components/QToggle/index.d.ts.map +1 -0
- package/esm/components/{QButtonToggle → QToggle}/index.js +3 -3
- package/esm/components/QToggle/types.d.ts +3 -0
- package/esm/components/QToggle/types.d.ts.map +1 -0
- package/esm/components/QToggleGroup/QToggleGroup.d.ts +28 -0
- package/esm/components/QToggleGroup/QToggleGroup.d.ts.map +1 -0
- package/esm/components/QToggleGroup/QToggleGroup.vue.js +49 -0
- package/esm/components/QToggleGroup/QToggleGroup.vue2.js +4 -0
- package/esm/components/QToggleGroup/QToggleGroupItem.d.ts +19 -0
- package/esm/components/QToggleGroup/QToggleGroupItem.d.ts.map +1 -0
- package/esm/components/QToggleGroup/QToggleGroupItem.vue.js +44 -0
- package/esm/components/QToggleGroup/QToggleGroupItem.vue2.js +4 -0
- package/esm/components/QToggleGroup/index.d.ts +75 -0
- package/esm/components/QToggleGroup/index.d.ts.map +1 -0
- package/esm/components/QToggleGroup/index.js +8 -0
- package/esm/components/QToggleGroup/types.d.ts +19 -0
- package/esm/components/QToggleGroup/types.d.ts.map +1 -0
- package/esm/components/QTooltip/QTooltip.d.ts.map +1 -1
- package/esm/components/QTooltip/QTooltip.vue.js +42 -40
- package/esm/components/index.d.ts +2 -1
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +83 -79
- package/esm/composables/{group.d.ts → useGroup/index.d.ts} +11 -3
- package/esm/composables/useGroup/index.d.ts.map +1 -0
- package/esm/composables/useGroup/index.js +38 -0
- package/esm/index.d.ts +4 -1
- package/package.json +1 -1
- package/esm/components/QButtonToggle/QButtonToggle.d.ts.map +0 -1
- package/esm/components/QButtonToggle/QButtonToggle.vue.js +0 -62
- package/esm/components/QButtonToggle/QButtonToggle.vue2.js +0 -4
- package/esm/components/QButtonToggle/index.d.ts +0 -51
- package/esm/components/QButtonToggle/index.d.ts.map +0 -1
- package/esm/components/QButtonToggle/types.d.ts +0 -29
- package/esm/components/QButtonToggle/types.d.ts.map +0 -1
- package/esm/composables/group.d.ts.map +0 -1
- package/esm/composables/group.js +0 -31
package/esm/components/index.js
CHANGED
|
@@ -1,84 +1,88 @@
|
|
|
1
|
-
import { QAccordion as e } from "./QAccordion/index.js";
|
|
2
|
-
import { QBadge as
|
|
3
|
-
import { QBadgeIndicator as
|
|
4
|
-
import { QButton as
|
|
5
|
-
import { QButtonGroup as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { QField as w } from "./QField/index.js";
|
|
1
|
+
import { QAccordion as e, QAccordionItem as t } from "./QAccordion/index.js";
|
|
2
|
+
import { QBadge as Q } from "./QBadge/index.js";
|
|
3
|
+
import { QBadgeIndicator as x } from "./QBadgeIndicator/index.js";
|
|
4
|
+
import { QButton as i } from "./QButton/index.js";
|
|
5
|
+
import { QButtonGroup as l } from "./QButtonGroup/index.js";
|
|
6
|
+
import { QCard as d } from "./QCard/index.js";
|
|
7
|
+
import { QCheckbox as s, QCheckboxLabel as L } from "./QCheckbox/index.js";
|
|
8
|
+
import { QCollapsible as g } from "./QCollapsible/index.js";
|
|
9
|
+
import { QColorPicker as P } from "./QColorPicker/index.js";
|
|
10
|
+
import { QCombobox as b } from "./QCombobox/index.js";
|
|
11
|
+
import { QDateTimePicker as y } from "./QDateTimePicker/index.js";
|
|
12
|
+
import { QDialog as F } from "./QDialog/index.js";
|
|
13
|
+
import { QDismissibleLayer as B } from "./QDismissibleLayer/index.js";
|
|
14
|
+
import { QDropdownMenu as D } from "./QDropdownMenu/index.js";
|
|
15
|
+
import { QField as h } from "./QField/index.js";
|
|
17
16
|
import { QFileUpload as A } from "./QFileUpload/index.js";
|
|
18
|
-
import { QFocusTrap as
|
|
19
|
-
import { QIcon as
|
|
20
|
-
import { QInputGroup as
|
|
21
|
-
import { QLabel as
|
|
22
|
-
import { QLineLoader as
|
|
23
|
-
import { QList as
|
|
24
|
-
import { QMeter as
|
|
25
|
-
import { QOverlay as
|
|
26
|
-
import { QPasswordField as
|
|
27
|
-
import { QPopover as
|
|
28
|
-
import { QPropertyList as
|
|
29
|
-
import { QRadioButton as
|
|
30
|
-
import { QSelect as
|
|
31
|
-
import { QSkeletonLoader as
|
|
32
|
-
import { QSpinnerLoader as
|
|
33
|
-
import { QTextArea as
|
|
34
|
-
import { QTextField as
|
|
35
|
-
import { QThemeProvider as
|
|
36
|
-
import {
|
|
17
|
+
import { QFocusTrap as M } from "./QFocusTrap/index.js";
|
|
18
|
+
import { QIcon as U, QIconFont as j, QIconImg as q, QIconSvg as z } from "./QIcon/index.js";
|
|
19
|
+
import { QInputGroup as H } from "./QInputGroup/index.js";
|
|
20
|
+
import { QLabel as K } from "./QLabel/index.js";
|
|
21
|
+
import { QLineLoader as V } from "./QLineLoader/index.js";
|
|
22
|
+
import { QList as X, QListItem as Y, QListItemGroup as Z } from "./QList/index.js";
|
|
23
|
+
import { QMeter as $ } from "./QMeter/index.js";
|
|
24
|
+
import { QOverlay as ro } from "./QOverlay/index.js";
|
|
25
|
+
import { QPasswordField as to } from "./QPasswordField/index.js";
|
|
26
|
+
import { QPopover as Qo } from "./QPopover/index.js";
|
|
27
|
+
import { QPropertyList as xo, QPropertyListGroup as fo, QPropertyListPanel as io, QPropertyListRow as ao } from "./QPropertyList/index.js";
|
|
28
|
+
import { QRadioButton as no, QRadioGroup as co } from "./QRadioGroup/index.js";
|
|
29
|
+
import { QSelect as Lo } from "./QSelect/index.js";
|
|
30
|
+
import { QSkeletonLoader as go } from "./QSkeletonLoader/index.js";
|
|
31
|
+
import { QSpinnerLoader as Po } from "./QSpinnerLoader/index.js";
|
|
32
|
+
import { QTextArea as bo } from "./QTextArea/index.js";
|
|
33
|
+
import { QTextField as yo } from "./QTextField/index.js";
|
|
34
|
+
import { QThemeProvider as Fo } from "./QThemeProvider/index.js";
|
|
35
|
+
import { QToggle as Bo } from "./QToggle/index.js";
|
|
36
|
+
import { QToggleGroup as Do, QToggleGroupItem as So } from "./QToggleGroup/index.js";
|
|
37
|
+
import { QTooltip as wo } from "./QTooltip/index.js";
|
|
37
38
|
export {
|
|
38
39
|
e as QAccordion,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
40
|
+
t as QAccordionItem,
|
|
41
|
+
Q as QBadge,
|
|
42
|
+
x as QBadgeIndicator,
|
|
43
|
+
i as QButton,
|
|
44
|
+
l as QButtonGroup,
|
|
45
|
+
d as QCard,
|
|
46
|
+
s as QCheckbox,
|
|
47
|
+
L as QCheckboxLabel,
|
|
48
|
+
g as QCollapsible,
|
|
49
|
+
P as QColorPicker,
|
|
50
|
+
b as QCombobox,
|
|
51
|
+
y as QDateTimePicker,
|
|
52
|
+
F as QDialog,
|
|
53
|
+
B as QDismissibleLayer,
|
|
54
|
+
D as QDropdownMenu,
|
|
55
|
+
h as QField,
|
|
55
56
|
A as QFileUpload,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
57
|
+
M as QFocusTrap,
|
|
58
|
+
U as QIcon,
|
|
59
|
+
j as QIconFont,
|
|
60
|
+
q as QIconImg,
|
|
61
|
+
z as QIconSvg,
|
|
62
|
+
H as QInputGroup,
|
|
63
|
+
K as QLabel,
|
|
64
|
+
V as QLineLoader,
|
|
65
|
+
X as QList,
|
|
66
|
+
Y as QListItem,
|
|
67
|
+
Z as QListItemGroup,
|
|
68
|
+
$ as QMeter,
|
|
69
|
+
ro as QOverlay,
|
|
70
|
+
to as QPasswordField,
|
|
71
|
+
Qo as QPopover,
|
|
72
|
+
xo as QPropertyList,
|
|
73
|
+
fo as QPropertyListGroup,
|
|
74
|
+
io as QPropertyListPanel,
|
|
75
|
+
ao as QPropertyListRow,
|
|
76
|
+
no as QRadioButton,
|
|
77
|
+
co as QRadioGroup,
|
|
78
|
+
Lo as QSelect,
|
|
79
|
+
go as QSkeletonLoader,
|
|
80
|
+
Po as QSpinnerLoader,
|
|
81
|
+
bo as QTextArea,
|
|
82
|
+
yo as QTextField,
|
|
83
|
+
Fo as QThemeProvider,
|
|
84
|
+
Bo as QToggle,
|
|
85
|
+
Do as QToggleGroup,
|
|
86
|
+
So as QToggleGroupItem,
|
|
87
|
+
wo as QTooltip
|
|
84
88
|
};
|
|
@@ -11,7 +11,7 @@ export interface GroupProps<T> {
|
|
|
11
11
|
* - When multiple is false: A single active item of type T
|
|
12
12
|
* - When multiple is true: An array of active items of type T[]
|
|
13
13
|
*/
|
|
14
|
-
active: MaybeRef<T | T[]>;
|
|
14
|
+
active: MaybeRef<T | T[] | undefined>;
|
|
15
15
|
/**
|
|
16
16
|
* Whether multiple items can be active simultaneously
|
|
17
17
|
* - When true: active will be treated as T[]
|
|
@@ -19,6 +19,10 @@ export interface GroupProps<T> {
|
|
|
19
19
|
* @default false
|
|
20
20
|
*/
|
|
21
21
|
multiple?: MaybeRef<boolean>;
|
|
22
|
+
/**
|
|
23
|
+
* Specifies whether at least one item must be active.
|
|
24
|
+
*/
|
|
25
|
+
required?: MaybeRef<boolean>;
|
|
22
26
|
}
|
|
23
27
|
/**
|
|
24
28
|
* Interface for the group state
|
|
@@ -35,6 +39,10 @@ export interface Group<T> {
|
|
|
35
39
|
* Computed boolean indicating if multiple selection is enabled
|
|
36
40
|
*/
|
|
37
41
|
multiple: ComputedRef<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* Specifies whether at least one item must be active.
|
|
44
|
+
*/
|
|
45
|
+
required?: ComputedRef<boolean>;
|
|
38
46
|
}
|
|
39
47
|
/**
|
|
40
48
|
* Interface for the values provided to child components via provide/inject
|
|
@@ -92,5 +100,5 @@ export declare function useGroup<T>(options: GroupProps<T>): Group<T>;
|
|
|
92
100
|
* - In single selection mode, activating an item deactivates others
|
|
93
101
|
* - In multiple selection mode, multiple items can be active simultaneously
|
|
94
102
|
*/
|
|
95
|
-
export declare function useGroupItem(itemId: string): GroupProvide | undefined;
|
|
96
|
-
//# sourceMappingURL=
|
|
103
|
+
export declare function useGroupItem(itemId: MaybeRef<string>): GroupProvide | undefined;
|
|
104
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/useGroup/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAKnE,qDAAqD;AACrD,eAAO,MAAM,WAAW,EAAE,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAyB,CAAA;AAE9E;;;GAGG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC;IAC5B;;;;OAIG;IACH,MAAM,EAAE,QAAQ,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC,CAAA;IAErC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,KAAK,CAAC,CAAC;IACvB;;;;OAIG;IACH,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC,CAAA;IAEhC;;OAEG;IACH,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAE9B;;OAEG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAA;IAElB;;OAEG;IACH,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAiC5D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,YAAY,GAAG,SAAS,CAyC/E"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { inject as d, computed as l, unref as u, ref as s, watch as o, provide as m } from "vue";
|
|
2
|
+
const n = Symbol.for("q-group");
|
|
3
|
+
function p(a) {
|
|
4
|
+
const e = {
|
|
5
|
+
active: s(
|
|
6
|
+
u(a.multiple) ? Array.isArray(u(a.active)) ? u(a.active) : u(a.active) !== void 0 ? [u(a.active)] : [] : u(a.active)
|
|
7
|
+
),
|
|
8
|
+
multiple: l(() => u(a.multiple) || !1),
|
|
9
|
+
required: l(() => u(a.required) || !1)
|
|
10
|
+
};
|
|
11
|
+
return o(
|
|
12
|
+
() => e.multiple.value,
|
|
13
|
+
(i) => {
|
|
14
|
+
i && e.active.value ? e.active.value = [e.active.value] : i ? e.active.value = [] : Array.isArray(e.active.value) && e.active.value.length === 1 ? e.active.value = e.active.value[0] : e.active.value = void 0;
|
|
15
|
+
}
|
|
16
|
+
), m(n, e), e;
|
|
17
|
+
}
|
|
18
|
+
function q(a) {
|
|
19
|
+
const e = d(n, void 0);
|
|
20
|
+
if (!e) return;
|
|
21
|
+
const i = l(() => {
|
|
22
|
+
var r;
|
|
23
|
+
const v = u(a);
|
|
24
|
+
return Array.isArray(e.active.value) ? (r = e.active.value) == null ? void 0 : r.includes(v) : e.active.value === v;
|
|
25
|
+
});
|
|
26
|
+
return { isActive: i, toggle: () => {
|
|
27
|
+
var r, t, c;
|
|
28
|
+
const v = u(a);
|
|
29
|
+
Array.isArray(e.active.value) ? i.value ? (!((r = e.required) != null && r.value) || e.active.value.length > 1) && (e.active.value = (t = e.active.value) == null ? void 0 : t.filter(
|
|
30
|
+
(f) => f !== v
|
|
31
|
+
)) : e.active.value.push(v) : e.active.value !== v ? e.active.value = v : (c = e.required) != null && c.value || (e.active.value = void 0);
|
|
32
|
+
} };
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
n as GroupSymbol,
|
|
36
|
+
p as useGroup,
|
|
37
|
+
q as useGroupItem
|
|
38
|
+
};
|
package/esm/index.d.ts
CHANGED
|
@@ -8,11 +8,11 @@ export * from './composables';
|
|
|
8
8
|
declare module '@vue/runtime-core' {
|
|
9
9
|
export interface GlobalComponents {
|
|
10
10
|
QAccordion: typeof import('@quidgest/ui/components')['QAccordion']
|
|
11
|
+
QAccordionItem: typeof import('@quidgest/ui/components')['QAccordionItem']
|
|
11
12
|
QBadge: typeof import('@quidgest/ui/components')['QBadge']
|
|
12
13
|
QBadgeIndicator: typeof import('@quidgest/ui/components')['QBadgeIndicator']
|
|
13
14
|
QButton: typeof import('@quidgest/ui/components')['QButton']
|
|
14
15
|
QButtonGroup: typeof import('@quidgest/ui/components')['QButtonGroup']
|
|
15
|
-
QButtonToggle: typeof import('@quidgest/ui/components')['QButtonToggle']
|
|
16
16
|
QCard: typeof import('@quidgest/ui/components')['QCard']
|
|
17
17
|
QCheckbox: typeof import('@quidgest/ui/components')['QCheckbox']
|
|
18
18
|
QCheckboxLabel: typeof import('@quidgest/ui/components')['QCheckboxLabel']
|
|
@@ -52,6 +52,9 @@ declare module '@vue/runtime-core' {
|
|
|
52
52
|
QTextArea: typeof import('@quidgest/ui/components')['QTextArea']
|
|
53
53
|
QTextField: typeof import('@quidgest/ui/components')['QTextField']
|
|
54
54
|
QThemeProvider: typeof import('@quidgest/ui/components')['QThemeProvider']
|
|
55
|
+
QToggle: typeof import('@quidgest/ui/components')['QToggle']
|
|
56
|
+
QToggleGroup: typeof import('@quidgest/ui/components')['QToggleGroup']
|
|
57
|
+
QToggleGroupItem: typeof import('@quidgest/ui/components')['QToggleGroupItem']
|
|
55
58
|
QTooltip: typeof import('@quidgest/ui/components')['QTooltip']
|
|
56
59
|
}
|
|
57
60
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QButtonToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QButtonToggle/QButtonToggle.vue"],"names":[],"mappings":"AAqBA;AA8CC,OAAO,KAAK,EAAuB,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAEtE,KAAK,WAAW,GAAG,kBAAkB,CAAC;AAavC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAyET,OAAO,IAA6B;6CAXqC,GAAG;;;EAgBzF;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;6FAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { defineComponent as u, mergeModels as c, useModel as m, createBlock as s, openBlock as o, unref as d, normalizeClass as f, withCtx as i, createElementBlock as b, Fragment as k, renderList as p, renderSlot as v } from "vue";
|
|
2
|
-
import { QButton as y } from "../QButton/index.js";
|
|
3
|
-
import { QButtonGroup as B } from "../QButtonGroup/index.js";
|
|
4
|
-
const M = /* @__PURE__ */ u({
|
|
5
|
-
__name: "QButtonToggle",
|
|
6
|
-
props: /* @__PURE__ */ c({
|
|
7
|
-
id: {},
|
|
8
|
-
class: {},
|
|
9
|
-
options: {},
|
|
10
|
-
disabled: { type: Boolean },
|
|
11
|
-
borderless: { type: Boolean },
|
|
12
|
-
elevated: { type: Boolean },
|
|
13
|
-
required: { type: Boolean }
|
|
14
|
-
}, {
|
|
15
|
-
modelValue: {},
|
|
16
|
-
modelModifiers: {}
|
|
17
|
-
}),
|
|
18
|
-
emits: ["update:modelValue"],
|
|
19
|
-
setup(r) {
|
|
20
|
-
const e = r, t = m(r, "modelValue");
|
|
21
|
-
function n(a) {
|
|
22
|
-
t.value === a.key && !e.required ? t.value = void 0 : t.value = a.key;
|
|
23
|
-
}
|
|
24
|
-
return (a, g) => (o(), s(d(B), {
|
|
25
|
-
id: e.id,
|
|
26
|
-
class: f(e.class),
|
|
27
|
-
disabled: e.disabled,
|
|
28
|
-
borderless: e.borderless,
|
|
29
|
-
elevated: e.elevated,
|
|
30
|
-
role: "listbox"
|
|
31
|
-
}, {
|
|
32
|
-
default: i(() => [
|
|
33
|
-
(o(!0), b(
|
|
34
|
-
k,
|
|
35
|
-
null,
|
|
36
|
-
p(e.options, (l) => (o(), s(d(y), {
|
|
37
|
-
key: l.key,
|
|
38
|
-
title: l.title,
|
|
39
|
-
label: l.label,
|
|
40
|
-
active: t.value === l.key,
|
|
41
|
-
role: "option",
|
|
42
|
-
"aria-selected": t.value === l.key,
|
|
43
|
-
onClick: () => n(l)
|
|
44
|
-
}, {
|
|
45
|
-
default: i(() => [
|
|
46
|
-
v(a.$slots, l.key)
|
|
47
|
-
]),
|
|
48
|
-
_: 2
|
|
49
|
-
/* DYNAMIC */
|
|
50
|
-
}, 1032, ["title", "label", "active", "aria-selected", "onClick"]))),
|
|
51
|
-
128
|
|
52
|
-
/* KEYED_FRAGMENT */
|
|
53
|
-
))
|
|
54
|
-
]),
|
|
55
|
-
_: 3
|
|
56
|
-
/* FORWARDED */
|
|
57
|
-
}, 8, ["id", "class", "disabled", "borderless", "elevated"]));
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
export {
|
|
61
|
-
M as default
|
|
62
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
declare const QButtonToggle: {
|
|
2
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
3
|
-
modelValue?: string;
|
|
4
|
-
} & import('../../types/component').QBaseComponentProps & {
|
|
5
|
-
options: Array<import('./types').QButtonToggleOption>;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
borderless?: boolean;
|
|
8
|
-
elevated?: boolean;
|
|
9
|
-
required?: boolean;
|
|
10
|
-
}> & Readonly<{
|
|
11
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
12
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
-
"update:modelValue": (value: string) => any;
|
|
14
|
-
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
15
|
-
P: {};
|
|
16
|
-
B: {};
|
|
17
|
-
D: {};
|
|
18
|
-
C: {};
|
|
19
|
-
M: {};
|
|
20
|
-
Defaults: {};
|
|
21
|
-
}, Readonly<{
|
|
22
|
-
modelValue?: string;
|
|
23
|
-
} & import('../../types/component').QBaseComponentProps & {
|
|
24
|
-
options: Array<import('./types').QButtonToggleOption>;
|
|
25
|
-
disabled?: boolean;
|
|
26
|
-
borderless?: boolean;
|
|
27
|
-
elevated?: boolean;
|
|
28
|
-
required?: boolean;
|
|
29
|
-
}> & Readonly<{
|
|
30
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
31
|
-
}>, {}, {}, {}, {}, {}>;
|
|
32
|
-
__isFragment?: never;
|
|
33
|
-
__isTeleport?: never;
|
|
34
|
-
__isSuspense?: never;
|
|
35
|
-
} & import('vue').ComponentOptionsBase<Readonly<{
|
|
36
|
-
modelValue?: string;
|
|
37
|
-
} & import('../../types/component').QBaseComponentProps & {
|
|
38
|
-
options: Array<import('./types').QButtonToggleOption>;
|
|
39
|
-
disabled?: boolean;
|
|
40
|
-
borderless?: boolean;
|
|
41
|
-
elevated?: boolean;
|
|
42
|
-
required?: boolean;
|
|
43
|
-
}> & Readonly<{
|
|
44
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
45
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
46
|
-
"update:modelValue": (value: string) => any;
|
|
47
|
-
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
48
|
-
$slots: Partial<Record<string, (_: {}) => any>>;
|
|
49
|
-
});
|
|
50
|
-
export { QButtonToggle };
|
|
51
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QButtonToggle/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAkC,CAAA;AAGrD,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { QBaseComponentProps } from '../../types/component';
|
|
2
|
-
export type QButtonToggleOption = {
|
|
3
|
-
key: string;
|
|
4
|
-
title?: string;
|
|
5
|
-
label?: string;
|
|
6
|
-
};
|
|
7
|
-
export type QButtonToggleProps = QBaseComponentProps & {
|
|
8
|
-
/**
|
|
9
|
-
* The list of available options to display
|
|
10
|
-
*/
|
|
11
|
-
options: Array<QButtonToggleOption>;
|
|
12
|
-
/**
|
|
13
|
-
* Indicates if the button toggle is disabled.
|
|
14
|
-
*/
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Indicates if the buttons' border should be removed.
|
|
18
|
-
*/
|
|
19
|
-
borderless?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Indicates if the buttons should have an elevated appearance.
|
|
22
|
-
*/
|
|
23
|
-
elevated?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Indicates if options can be deselected.
|
|
26
|
-
*/
|
|
27
|
-
required?: boolean;
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QButtonToggle/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhE,MAAM,MAAM,mBAAmB,GAAG;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG;IACtD;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAA;IAEnC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../src/composables/group.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAKnE,qDAAqD;AACrD,eAAO,MAAM,WAAW,EAAE,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAyB,CAAA;AAE9E;;;GAGG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC;IAC5B;;;;OAIG;IACH,MAAM,EAAE,QAAQ,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IAEzB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,KAAK,CAAC,CAAC;IACvB;;;;OAIG;IACH,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC,CAAA;IAEhC;;OAEG;IACH,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAA;IAElB;;OAEG;IACH,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CA0B5D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAyBrE"}
|
package/esm/composables/group.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { inject as c, computed as v, unref as t, ref as n, watch as f, provide as o } from "vue";
|
|
2
|
-
const l = Symbol.for("q-group");
|
|
3
|
-
function g(u) {
|
|
4
|
-
const e = {
|
|
5
|
-
active: n(t(u.active) ?? (t(u.multiple) ? [] : void 0)),
|
|
6
|
-
multiple: v(() => t(u.multiple) || !1)
|
|
7
|
-
};
|
|
8
|
-
return f(
|
|
9
|
-
() => e.multiple.value,
|
|
10
|
-
(a) => {
|
|
11
|
-
a && e.active.value ? e.active.value = [e.active.value] : a ? e.active.value = [] : Array.isArray(e.active.value) && e.active.value.length === 1 ? e.active.value = e.active.value[0] : e.active.value = void 0;
|
|
12
|
-
}
|
|
13
|
-
), o(l, e), e;
|
|
14
|
-
}
|
|
15
|
-
function y(u) {
|
|
16
|
-
const e = c(l, void 0);
|
|
17
|
-
if (!e) return;
|
|
18
|
-
const a = v(() => {
|
|
19
|
-
var i;
|
|
20
|
-
return Array.isArray(e.active.value) ? (i = e.active.value) == null ? void 0 : i.includes(u) : e.active.value === u;
|
|
21
|
-
});
|
|
22
|
-
return { isActive: a, toggle: () => {
|
|
23
|
-
var i;
|
|
24
|
-
Array.isArray(e.active.value) ? a.value ? e.active.value = (i = e.active.value) == null ? void 0 : i.filter((r) => r !== u) : e.active.value.push(u) : e.active.value = u;
|
|
25
|
-
} };
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
l as GroupSymbol,
|
|
29
|
-
g as useGroup,
|
|
30
|
-
y as useGroupItem
|
|
31
|
-
};
|