@quidgest/ui 0.15.9 → 0.16.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.
Files changed (78) hide show
  1. package/dist/manifest/components.json +4 -1
  2. package/dist/ui.css +9 -6
  3. package/dist/ui.esm.js +3554 -3451
  4. package/dist/ui.js +26 -26
  5. package/dist/ui.min.css +1 -1
  6. package/dist/ui.min.js +738 -731
  7. package/dist/ui.scss +11 -7
  8. package/esm/components/QAccordion/QAccordion.d.ts +4 -3
  9. package/esm/components/QAccordion/QAccordion.d.ts.map +1 -1
  10. package/esm/components/QAccordion/QAccordion.vue.js +21 -17
  11. package/esm/components/QAccordion/QAccordionItem.d.ts +19 -0
  12. package/esm/components/QAccordion/QAccordionItem.d.ts.map +1 -0
  13. package/esm/components/QAccordion/QAccordionItem.vue.js +42 -0
  14. package/esm/components/QAccordion/QAccordionItem.vue2.js +4 -0
  15. package/esm/components/QAccordion/index.d.ts +35 -15
  16. package/esm/components/QAccordion/index.d.ts.map +1 -1
  17. package/esm/components/QAccordion/index.js +6 -4
  18. package/esm/components/QAccordion/types.d.ts +25 -5
  19. package/esm/components/QAccordion/types.d.ts.map +1 -1
  20. package/esm/components/QButton/QButton.d.ts.map +1 -1
  21. package/esm/components/QButton/QButton.vue.js +9 -11
  22. package/esm/components/QButton/types.d.ts +0 -4
  23. package/esm/components/QButton/types.d.ts.map +1 -1
  24. package/esm/components/QCollapsible/QCollapsible.d.ts.map +1 -1
  25. package/esm/components/QCollapsible/QCollapsible.vue.js +60 -65
  26. package/esm/components/QCollapsible/index.d.ts +14 -14
  27. package/esm/components/QCollapsible/index.d.ts.map +1 -1
  28. package/esm/components/QCombobox/QCombobox.d.ts +16 -18
  29. package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
  30. package/esm/components/QCombobox/index.d.ts +8 -9
  31. package/esm/components/QCombobox/index.d.ts.map +1 -1
  32. package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +16 -16
  33. package/esm/components/QList/QList.d.ts +9 -9
  34. package/esm/components/QList/QListItem.d.ts +1 -1
  35. package/esm/components/QList/index.d.ts +10 -10
  36. package/esm/components/QRadioGroup/QRadioButton.vue.js +3 -3
  37. package/esm/components/QRadioGroup/QRadioGroup.vue.js +1 -1
  38. package/esm/components/QSelect/QSelect.d.ts +16 -16
  39. package/esm/components/QSelect/index.d.ts +8 -8
  40. package/esm/components/{QButtonToggle/QButtonToggle.d.ts → QToggle/QToggle.d.ts} +11 -9
  41. package/esm/components/QToggle/QToggle.d.ts.map +1 -0
  42. package/esm/components/QToggle/QToggle.vue.js +40 -0
  43. package/esm/components/QToggle/QToggle.vue2.js +4 -0
  44. package/esm/components/QToggle/index.d.ts +71 -0
  45. package/esm/components/QToggle/index.d.ts.map +1 -0
  46. package/esm/components/{QButtonToggle → QToggle}/index.js +3 -3
  47. package/esm/components/QToggle/types.d.ts +3 -0
  48. package/esm/components/QToggle/types.d.ts.map +1 -0
  49. package/esm/components/QToggleGroup/QToggleGroup.d.ts +28 -0
  50. package/esm/components/QToggleGroup/QToggleGroup.d.ts.map +1 -0
  51. package/esm/components/QToggleGroup/QToggleGroup.vue.js +49 -0
  52. package/esm/components/QToggleGroup/QToggleGroup.vue2.js +4 -0
  53. package/esm/components/QToggleGroup/QToggleGroupItem.d.ts +19 -0
  54. package/esm/components/QToggleGroup/QToggleGroupItem.d.ts.map +1 -0
  55. package/esm/components/QToggleGroup/QToggleGroupItem.vue.js +44 -0
  56. package/esm/components/QToggleGroup/QToggleGroupItem.vue2.js +4 -0
  57. package/esm/components/QToggleGroup/index.d.ts +75 -0
  58. package/esm/components/QToggleGroup/index.d.ts.map +1 -0
  59. package/esm/components/QToggleGroup/index.js +8 -0
  60. package/esm/components/QToggleGroup/types.d.ts +19 -0
  61. package/esm/components/QToggleGroup/types.d.ts.map +1 -0
  62. package/esm/components/index.d.ts +2 -1
  63. package/esm/components/index.d.ts.map +1 -1
  64. package/esm/components/index.js +83 -79
  65. package/esm/composables/{group.d.ts → useGroup/index.d.ts} +11 -3
  66. package/esm/composables/useGroup/index.d.ts.map +1 -0
  67. package/esm/composables/useGroup/index.js +38 -0
  68. package/esm/index.d.ts +4 -1
  69. package/package.json +1 -1
  70. package/esm/components/QButtonToggle/QButtonToggle.d.ts.map +0 -1
  71. package/esm/components/QButtonToggle/QButtonToggle.vue.js +0 -62
  72. package/esm/components/QButtonToggle/QButtonToggle.vue2.js +0 -4
  73. package/esm/components/QButtonToggle/index.d.ts +0 -51
  74. package/esm/components/QButtonToggle/index.d.ts.map +0 -1
  75. package/esm/components/QButtonToggle/types.d.ts +0 -29
  76. package/esm/components/QButtonToggle/types.d.ts.map +0 -1
  77. package/esm/composables/group.d.ts.map +0 -1
  78. package/esm/composables/group.js +0 -31
@@ -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=group.d.ts.map
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,7 +1,7 @@
1
1
  {
2
2
  "name": "@quidgest/ui",
3
3
  "description": "Quidgest's UI framework",
4
- "version": "0.15.9",
4
+ "version": "0.16.0",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "author": "Quidgest",
@@ -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,4 +0,0 @@
1
- import f from "./QButtonToggle.vue.js";
2
- export {
3
- f as default
4
- };
@@ -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"}
@@ -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
- };