@quidgest/ui 0.14.9 → 0.14.11

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 (47) hide show
  1. package/dist/manifest/components.json +1 -0
  2. package/dist/ui.css +30 -4
  3. package/dist/ui.esm.js +1228 -1028
  4. package/dist/ui.js +22 -22
  5. package/dist/ui.min.css +1 -1
  6. package/dist/ui.min.js +90 -74
  7. package/dist/ui.scss +30 -5
  8. package/esm/components/QCombobox/QCombobox.d.ts +5 -0
  9. package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
  10. package/esm/components/QDropdownMenu/QDropdownMenu.d.ts +16 -0
  11. package/esm/components/QDropdownMenu/QDropdownMenu.d.ts.map +1 -0
  12. package/esm/components/QDropdownMenu/QDropdownMenu.vue.js +38 -0
  13. package/esm/components/QDropdownMenu/QDropdownMenu.vue2.js +4 -0
  14. package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +148 -0
  15. package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -0
  16. package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +153 -0
  17. package/esm/components/QDropdownMenu/QDropdownMenuContent.vue2.js +4 -0
  18. package/esm/components/QDropdownMenu/index.d.ts +4 -0
  19. package/esm/components/QDropdownMenu/index.d.ts.map +1 -0
  20. package/esm/components/QDropdownMenu/index.js +6 -0
  21. package/esm/components/QDropdownMenu/types.d.ts +95 -0
  22. package/esm/components/QDropdownMenu/types.d.ts.map +1 -0
  23. package/esm/components/QDropdownMenu/types.js +8 -0
  24. package/esm/components/QList/QList.d.ts +74 -0
  25. package/esm/components/QList/QList.d.ts.map +1 -1
  26. package/esm/components/QList/QList.vue.js +118 -100
  27. package/esm/components/QList/QListItem.d.ts +2 -0
  28. package/esm/components/QList/QListItem.d.ts.map +1 -1
  29. package/esm/components/QList/QListItem.vue.js +32 -30
  30. package/esm/components/QList/types.d.ts +0 -7
  31. package/esm/components/QList/types.d.ts.map +1 -1
  32. package/esm/components/QOverlay/QOverlay.d.ts +1 -0
  33. package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
  34. package/esm/components/QOverlay/QOverlay.vue.js +87 -82
  35. package/esm/components/QOverlay/types.d.ts +4 -0
  36. package/esm/components/QOverlay/types.d.ts.map +1 -1
  37. package/esm/components/QSelect/QSelect.d.ts +5 -0
  38. package/esm/components/QSelect/QSelect.d.ts.map +1 -1
  39. package/esm/components/index.d.ts +1 -0
  40. package/esm/components/index.d.ts.map +1 -1
  41. package/esm/components/index.js +44 -42
  42. package/esm/composables/overlay.d.ts +4 -0
  43. package/esm/composables/overlay.d.ts.map +1 -1
  44. package/esm/composables/overlay.js +69 -62
  45. package/esm/index.d.ts +1 -0
  46. package/package.json +2 -33
  47. /package/{LICENSE.md → LICENSE} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"QCombobox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QCombobox/QCombobox.vue"],"names":[],"mappings":"AA6HA;AAwlBC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAIlD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACtD,OAAO,EAAY,QAAQ,EAAyB,MAAM,KAAK,CAAA;AAIhE,KAAK,WAAW,GAAG,cAAc,CAAC;AAydlC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,WAAW,CAAC;AAOhB,iBAAS,cAAc;WAuTT,OAAO,IAA6B;;iCAnBZ,GAAG;gCACJ,GAAG;yBACV,GAAG;wBACJ,GAAG;wBACH,GAAG;gCACK,GAAG;;;YACb,GAAG;+BACM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C,8CACD,GAAA,yBACoB,GAAG,6DAGH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCALvB,GAAC,8CACD,GAAA,yBACoB,GAAG,6DAGH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAycvB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { QDropdownMenuProps } from './types';
2
+ import { Primitive } from '../../types/primitive';
3
+ type __VLS_Props = QDropdownMenuProps;
4
+ type __VLS_PublicProps = {
5
+ modelValue?: boolean;
6
+ } & __VLS_Props;
7
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
+ "update:modelValue": (value: boolean) => any;
9
+ } & {
10
+ select: (item: Primitive | undefined) => any;
11
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
13
+ onSelect?: ((item: Primitive | undefined) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
+ export default _default;
16
+ //# sourceMappingURL=QDropdownMenu.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QDropdownMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDropdownMenu/QDropdownMenu.vue"],"names":[],"mappings":"AAMA;AAqCC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAInD,KAAK,WAAW,GAAG,kBAAkB,CAAC;AAyBtC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;;;;;;;;;AA0EhB,wBAOG"}
@@ -0,0 +1,38 @@
1
+ import { defineComponent as u, mergeModels as n, useModel as c, openBlock as p, createBlock as d, mergeProps as f } from "vue";
2
+ import V from "./QDropdownMenuContent.vue.js";
3
+ const _ = /* @__PURE__ */ u({
4
+ inheritAttrs: !1,
5
+ __name: "QDropdownMenu",
6
+ props: /* @__PURE__ */ n({
7
+ activator: {},
8
+ appearance: {},
9
+ inline: { type: Boolean },
10
+ delay: {},
11
+ placement: {},
12
+ transition: {},
13
+ class: {},
14
+ items: {},
15
+ groups: {},
16
+ itemValue: {},
17
+ itemLabel: {},
18
+ icons: {}
19
+ }, {
20
+ modelValue: { type: Boolean },
21
+ modelModifiers: {}
22
+ }),
23
+ emits: /* @__PURE__ */ n(["select"], ["update:modelValue"]),
24
+ setup(e, { emit: a }) {
25
+ const m = e, s = a, o = c(e, "modelValue");
26
+ function i(t) {
27
+ s("select", t);
28
+ }
29
+ return (t, l) => (p(), d(V, f(m, {
30
+ modelValue: o.value,
31
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => o.value = r),
32
+ onSelect: i
33
+ }), null, 16, ["modelValue"]));
34
+ }
35
+ });
36
+ export {
37
+ _ as default
38
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./QDropdownMenu.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,148 @@
1
+ import { QDropdownMenuContentProps, DEFAULT_ICONS } from './types';
2
+ import { Primitive } from '../../types/primitive';
3
+ type __VLS_Props = QDropdownMenuContentProps;
4
+ type __VLS_PublicProps = {
5
+ modelValue?: boolean;
6
+ } & __VLS_Props;
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ item?(_: {
11
+ item: import('../QList/types').Item;
12
+ }): any;
13
+ "item.append"?(_: {
14
+ item: import('../QList/types').Item;
15
+ }): any;
16
+ };
17
+ refs: {
18
+ contentRef: HTMLDivElement;
19
+ listRef: ({
20
+ $: import('vue').ComponentInternalInstance;
21
+ $data: {};
22
+ $props: {
23
+ readonly modelValue?: any;
24
+ readonly highlighted?: Primitive | undefined;
25
+ readonly items: import('../QList/types').Item[];
26
+ readonly groups?: import('../QList/types').Group[] | undefined;
27
+ readonly itemValue?: string | undefined;
28
+ readonly itemLabel?: string | undefined;
29
+ readonly disabled?: boolean | undefined;
30
+ readonly class?: (string | unknown[]) | undefined;
31
+ readonly selectable?: boolean | undefined;
32
+ readonly "onUpdate:modelValue"?: ((value: any) => any) | undefined;
33
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
34
+ $attrs: {
35
+ [x: string]: unknown;
36
+ };
37
+ $refs: {
38
+ [x: string]: unknown;
39
+ };
40
+ $slots: Readonly<{
41
+ [name: string]: import('vue').Slot<any> | undefined;
42
+ }>;
43
+ $root: import('vue').ComponentPublicInstance | null;
44
+ $parent: import('vue').ComponentPublicInstance | null;
45
+ $host: Element | null;
46
+ $emit: (event: "update:modelValue", value: any) => void;
47
+ $el: any;
48
+ $options: import('vue').ComponentOptionsBase<Readonly<{
49
+ modelValue?: any;
50
+ } & import('../QList').QListProps> & Readonly<{
51
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
52
+ }>, {
53
+ focusItem: (itemIdx: number, preventScroll?: boolean) => void;
54
+ getItem: (idx: number) => HTMLElement | undefined;
55
+ getAdjacentItemIndex: (idx: number, direction: "next" | "prev") => number;
56
+ getFirstFocusableItemIndex: () => number;
57
+ getLastFocusableItemIndex: () => number;
58
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
59
+ "update:modelValue": (value: any) => any;
60
+ }, string, {
61
+ class: string | unknown[];
62
+ highlighted: Primitive;
63
+ groups: import('../QList/types').Group[];
64
+ itemValue: string;
65
+ itemLabel: string;
66
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
67
+ beforeCreate?: (() => void) | (() => void)[];
68
+ created?: (() => void) | (() => void)[];
69
+ beforeMount?: (() => void) | (() => void)[];
70
+ mounted?: (() => void) | (() => void)[];
71
+ beforeUpdate?: (() => void) | (() => void)[];
72
+ updated?: (() => void) | (() => void)[];
73
+ activated?: (() => void) | (() => void)[];
74
+ deactivated?: (() => void) | (() => void)[];
75
+ beforeDestroy?: (() => void) | (() => void)[];
76
+ beforeUnmount?: (() => void) | (() => void)[];
77
+ destroyed?: (() => void) | (() => void)[];
78
+ unmounted?: (() => void) | (() => void)[];
79
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
80
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
81
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
82
+ };
83
+ $forceUpdate: () => void;
84
+ $nextTick: typeof import('vue').nextTick;
85
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
86
+ } & Readonly<{
87
+ class: string | unknown[];
88
+ highlighted: Primitive;
89
+ groups: import('../QList/types').Group[];
90
+ itemValue: string;
91
+ itemLabel: string;
92
+ }> & Omit<Readonly<{
93
+ modelValue?: any;
94
+ } & import('../QList').QListProps> & Readonly<{
95
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
96
+ }>, "focusItem" | "getItem" | "getAdjacentItemIndex" | "getFirstFocusableItemIndex" | "getLastFocusableItemIndex" | ("class" | "highlighted" | "groups" | "itemValue" | "itemLabel")> & import('vue').ShallowUnwrapRef<{
97
+ focusItem: (itemIdx: number, preventScroll?: boolean) => void;
98
+ getItem: (idx: number) => HTMLElement | undefined;
99
+ getAdjacentItemIndex: (idx: number, direction: "next" | "prev") => number;
100
+ getFirstFocusableItemIndex: () => number;
101
+ getLastFocusableItemIndex: () => number;
102
+ }> & {} & import('vue').ComponentCustomProperties & {} & {
103
+ $slots: {
104
+ item?(_: {
105
+ item: import('../QList/types').Item;
106
+ element: HTMLLIElement | undefined;
107
+ }): any;
108
+ "item.append"?(_: {
109
+ item: import('../QList/types').Item;
110
+ element: HTMLLIElement | undefined;
111
+ }): any;
112
+ };
113
+ }) | null;
114
+ };
115
+ rootEl: any;
116
+ };
117
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
118
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
119
+ "update:modelValue": (value: boolean) => any;
120
+ } & {
121
+ select: (item: Primitive | undefined) => any;
122
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
123
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
124
+ onSelect?: ((item: Primitive | undefined) => any) | undefined;
125
+ }>, {
126
+ class: string | unknown[];
127
+ transition: string;
128
+ icons: typeof DEFAULT_ICONS;
129
+ groups: import('./types').QDropdownMenuGroupProps[];
130
+ itemValue: string;
131
+ itemLabel: string;
132
+ appearance: import('../../composables/overlay').Appearance;
133
+ delay: number;
134
+ offset: number;
135
+ crossOffset: number;
136
+ placement: import('../../composables/overlay').Placement;
137
+ trigger: import('../../composables/overlay').Trigger;
138
+ activator: import('../../utils/getElement').Selector;
139
+ depth: number;
140
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
141
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
142
+ export default _default;
143
+ type __VLS_WithTemplateSlots<T, S> = T & {
144
+ new (): {
145
+ $slots: S;
146
+ };
147
+ };
148
+ //# sourceMappingURL=QDropdownMenuContent.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QDropdownMenuContent.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QDropdownMenu/QDropdownMenuContent.vue"],"names":[],"mappings":"AAqDA;AAkNC,OAAO,KAAK,EAAE,yBAAyB,EAA0B,MAAM,SAAS,CAAA;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAGlD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAKxC,KAAK,WAAW,GAAG,yBAAyB,CAAC;AAiK7C,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WA8HT,OAAO,IAA6B;;;;YAXvB,GAAG;;;YACM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwEogQ,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAzDhqQ;AAuBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;6EASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,153 @@
1
+ import { defineComponent as B, mergeModels as v, useModel as M, ref as l, computed as g, openBlock as h, createBlock as T, unref as y, normalizeClass as N, withCtx as f, createElementVNode as R, withModifiers as S, createVNode as U, renderSlot as w, createElementBlock as $, toDisplayString as A, createCommentVNode as F } from "vue";
2
+ import { QList as Q } from "../QList/index.js";
3
+ import { QOverlay as q } from "../QOverlay/index.js";
4
+ import { DEFAULT_ICONS as z } from "./types.js";
5
+ const K = {
6
+ key: 0,
7
+ class: "q-dropdown-menu__extra"
8
+ }, G = /* @__PURE__ */ B({
9
+ __name: "QDropdownMenuContent",
10
+ props: /* @__PURE__ */ v({
11
+ activator: { default: void 0 },
12
+ appearance: { default: "regular" },
13
+ inline: { type: Boolean },
14
+ delay: { default: 500 },
15
+ placement: { default: "right-start" },
16
+ transition: { default: "fade" },
17
+ class: { default: void 0 },
18
+ items: {},
19
+ groups: { default: () => [] },
20
+ itemValue: { default: "key" },
21
+ itemLabel: { default: "label" },
22
+ icons: { default: () => z },
23
+ trigger: { default: "click" },
24
+ offset: { default: 0 },
25
+ crossOffset: { default: -5 },
26
+ depth: { default: 0 }
27
+ }, {
28
+ modelValue: { type: Boolean },
29
+ modelModifiers: {}
30
+ }),
31
+ emits: /* @__PURE__ */ v(["select"], ["update:modelValue"]),
32
+ setup(d, { emit: k }) {
33
+ const e = d, _ = k, a = M(d, "modelValue"), s = l(void 0), c = l([]), r = l(""), b = g(() => e.depth !== 0 ? e.offset : 4), L = g(() => e.depth !== 0 ? e.crossOffset : void 0);
34
+ let m;
35
+ const u = l(null), p = l(null);
36
+ function V(t) {
37
+ s.value = t;
38
+ const o = e.items.find((n) => n[e.itemValue] === t);
39
+ o && (c.value = (o == null ? void 0 : o.items) ?? []), c.value.length || (_("select", t), s.value = void 0, i());
40
+ }
41
+ function C() {
42
+ a.value || (a.value = !0);
43
+ }
44
+ function i() {
45
+ a.value && (a.value = !1);
46
+ }
47
+ function E() {
48
+ a.value ? i() : C();
49
+ }
50
+ function I(t) {
51
+ if (t.key) {
52
+ if (window.clearTimeout(m), ["Escape", "Tab", "Delete"].includes(t.key)) {
53
+ i();
54
+ return;
55
+ }
56
+ if (["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(t.key) && (t.preventDefault(), t.stopPropagation()), /^[a-z]$/i.test(t.key)) {
57
+ r.value += t.key.toLowerCase();
58
+ for (let o = 0; o < e.items.length; o++) {
59
+ const n = e.items[o];
60
+ if (n[e.itemLabel] && n[e.itemLabel].toLowerCase().startsWith(r.value)) {
61
+ x(o);
62
+ break;
63
+ }
64
+ }
65
+ }
66
+ m = window.setTimeout(function() {
67
+ r.value = "";
68
+ }, 500);
69
+ }
70
+ }
71
+ function D(t) {
72
+ var o;
73
+ (o = p.value) != null && o.contains(t.relatedTarget) || i();
74
+ }
75
+ function O() {
76
+ var t;
77
+ (t = u.value) == null || t.$el.focus();
78
+ }
79
+ function x(t) {
80
+ var o;
81
+ (o = u.value) == null || o.focusItem(t);
82
+ }
83
+ return (t, o) => (h(), T(y(q), {
84
+ "model-value": a.value,
85
+ anchor: e.activator,
86
+ appearance: e.appearance,
87
+ inline: e.inline,
88
+ delay: e.delay,
89
+ offset: b.value,
90
+ "cross-offset": L.value,
91
+ placement: e.placement,
92
+ transition: e.transition,
93
+ class: N(e.class),
94
+ trigger: e.trigger,
95
+ "non-modal": "",
96
+ "scroll-lock": "",
97
+ persistent: "",
98
+ "onUpdate:modelValue": E,
99
+ onEnter: O
100
+ }, {
101
+ default: f(() => [
102
+ R(
103
+ "div",
104
+ {
105
+ ref_key: "contentRef",
106
+ ref: p,
107
+ "data-testid": "dropdown-content",
108
+ tabindex: "-1",
109
+ onFocusout: D,
110
+ onKeydown: S(I, ["stop"])
111
+ },
112
+ [
113
+ U(y(Q), {
114
+ ref_key: "listRef",
115
+ ref: u,
116
+ class: "q-dropdown-menu__items",
117
+ highlighted: s.value,
118
+ items: e.items,
119
+ groups: e.groups,
120
+ "item-label": e.itemLabel,
121
+ "item-value": e.itemValue,
122
+ "onUpdate:modelValue": V
123
+ }, {
124
+ item: f(({ item: n }) => [
125
+ w(t.$slots, "item", { item: n })
126
+ ]),
127
+ "item.append": f(({ item: n }) => [
128
+ w(t.$slots, "item.append", { item: n }, () => [
129
+ n.extraInfo ? (h(), $(
130
+ "span",
131
+ K,
132
+ A(n.extraInfo),
133
+ 1
134
+ /* TEXT */
135
+ )) : F("v-if", !0)
136
+ ])
137
+ ]),
138
+ _: 3
139
+ /* FORWARDED */
140
+ }, 8, ["highlighted", "items", "groups", "item-label", "item-value"])
141
+ ],
142
+ 544
143
+ /* NEED_HYDRATION, NEED_PATCH */
144
+ )
145
+ ]),
146
+ _: 3
147
+ /* FORWARDED */
148
+ }, 8, ["model-value", "anchor", "appearance", "inline", "delay", "offset", "cross-offset", "placement", "transition", "class", "trigger"]));
149
+ }
150
+ });
151
+ export {
152
+ G as default
153
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./QDropdownMenuContent.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { default as _QDropdownMenu } from './QDropdownMenu';
2
+ declare const QDropdownMenu: typeof _QDropdownMenu;
3
+ export { QDropdownMenu };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QDropdownMenu/index.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAKhD,QAAA,MAAM,aAAa,EAAsC,OAAO,cAAc,CAAA;AAG9E,OAAO,EAAE,aAAa,EAAE,CAAA"}
@@ -0,0 +1,6 @@
1
+ import o from "./QDropdownMenu.vue.js";
2
+ import { setupPropsProxy as r } from "../../utils/setupPropsProxy.js";
3
+ const t = r(o);
4
+ export {
5
+ t as QDropdownMenu
6
+ };
@@ -0,0 +1,95 @@
1
+ import { Icon } from '../QIcon';
2
+ import { QListItemGroupProps, QListItemProps } from '../QList';
3
+ import { Appearance, Placement, Trigger } from '../../composables/overlay';
4
+ import { Selector } from '../../utils/getElement';
5
+ export type QDropdownMenuProps = {
6
+ /**
7
+ * The DOM element used to activate the dropdown menu.
8
+ */
9
+ activator?: Selector;
10
+ /**
11
+ * The appearance of the dropdown menu.
12
+ * 'regular' uses body text color for background and body background color for text.
13
+ * 'inverted' matches body color scheme.
14
+ */
15
+ appearance?: Appearance;
16
+ /**
17
+ * Whether to disable teleport.
18
+ */
19
+ inline?: boolean;
20
+ /**
21
+ * The delay in milliseconds before showing the dropdown menu.
22
+ */
23
+ delay?: number;
24
+ /**
25
+ * The placement of the dropdown menu.
26
+ */
27
+ placement?: Placement;
28
+ /**
29
+ * The name of the transition to apply.
30
+ */
31
+ transition?: string;
32
+ /**
33
+ * Custom set of classes to apply to the component.
34
+ */
35
+ class?: string | unknown[];
36
+ /**
37
+ * The list of available items for selection.
38
+ */
39
+ items: QDropdownMenuItemProps[];
40
+ /**
41
+ * The item groups used for organizing the available items.
42
+ */
43
+ groups?: QDropdownMenuGroupProps[];
44
+ /**
45
+ * Property on each item that contains its value.
46
+ */
47
+ itemValue?: string;
48
+ /**
49
+ * Property on each item that contains its title.
50
+ */
51
+ itemLabel?: string;
52
+ /**
53
+ * Custom icon configurations.
54
+ */
55
+ icons?: typeof DEFAULT_ICONS;
56
+ };
57
+ export type QDropdownMenuContentProps = QDropdownMenuProps & {
58
+ /**
59
+ * The method to trigger the dropdown menu.
60
+ */
61
+ trigger?: Trigger;
62
+ /**
63
+ * Offset the dropdown menu in the given amount of pixels.
64
+ */
65
+ offset?: number;
66
+ /**
67
+ * Offset the dropdown menu in the given amount of pixels (opposite to the main axis).
68
+ */
69
+ crossOffset?: number;
70
+ /**
71
+ * Depth for recursive nesting
72
+ */
73
+ depth?: number;
74
+ };
75
+ export type QDropdownMenuItemProps = Omit<QListItemProps, 'value' | 'label'> & {
76
+ /**
77
+ * The list of available items for selection.
78
+ */
79
+ items?: QDropdownMenuItemProps[];
80
+ /**
81
+ * The item groups used for organizing the available items.
82
+ */
83
+ groups?: QDropdownMenuGroupProps[];
84
+ [key: string]: any;
85
+ };
86
+ export type QDropdownMenuGroupProps = QListItemGroupProps & {
87
+ /**
88
+ * Whether the entire item group is disabled.
89
+ */
90
+ disabled?: boolean;
91
+ };
92
+ type IconKeys = 'expand';
93
+ export declare const DEFAULT_ICONS: Record<IconKeys, Icon>;
94
+ export {};
95
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QDropdownMenu/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC3E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAElD,MAAM,MAAM,kBAAkB,GAAG;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAA;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAA;IAEvB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,CAAA;IAE1B;;OAEG;IACH,KAAK,EAAE,sBAAsB,EAAE,CAAA;IAE/B;;OAEG;IACH,MAAM,CAAC,EAAE,uBAAuB,EAAE,CAAA;IAElC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,kBAAkB,GAAG;IAC5D;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG;IAC9E;;OAEG;IACH,KAAK,CAAC,EAAE,sBAAsB,EAAE,CAAA;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,uBAAuB,EAAE,CAAA;IAIlC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,mBAAmB,GAAG;IAC3D;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,KAAK,QAAQ,GAAG,QAAQ,CAAA;AAGxB,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,QAAQ,EAAE,IAAI,CAIhD,CAAA"}
@@ -0,0 +1,8 @@
1
+ const n = {
2
+ expand: {
3
+ icon: "chevron-right"
4
+ }
5
+ };
6
+ export {
7
+ n as DEFAULT_ICONS
8
+ };
@@ -44,10 +44,84 @@ declare function __VLS_template(): {
44
44
  slots: {
45
45
  item?(_: {
46
46
  item: import('./types').Item;
47
+ element: HTMLLIElement | undefined;
48
+ }): any;
49
+ "item.append"?(_: {
50
+ item: import('./types').Item;
51
+ element: HTMLLIElement | undefined;
47
52
  }): any;
48
53
  };
49
54
  refs: {
50
55
  listRef: unknown;
56
+ listItemsRef: (({
57
+ $: import('vue').ComponentInternalInstance;
58
+ $data: {};
59
+ $props: {
60
+ readonly value: Primitive;
61
+ readonly label: string;
62
+ readonly icon?: import('..').Icon | undefined;
63
+ readonly selected?: boolean | undefined;
64
+ readonly highlighted?: boolean | undefined;
65
+ readonly disabled?: boolean | undefined;
66
+ readonly description?: string | undefined;
67
+ readonly icons?: typeof import('./types').DEFAULT_ICONS | undefined;
68
+ readonly onSelect?: ((value: Primitive) => any) | undefined;
69
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
70
+ $attrs: {
71
+ [x: string]: unknown;
72
+ };
73
+ $refs: {
74
+ [x: string]: unknown;
75
+ };
76
+ $slots: Readonly<{
77
+ [name: string]: import('vue').Slot<any> | undefined;
78
+ }>;
79
+ $root: import('vue').ComponentPublicInstance | null;
80
+ $parent: import('vue').ComponentPublicInstance | null;
81
+ $host: Element | null;
82
+ $emit: (event: "select", value: Primitive) => void;
83
+ $el: HTMLLIElement;
84
+ $options: import('vue').ComponentOptionsBase<Readonly<import('./types').QListItemProps> & Readonly<{
85
+ onSelect?: ((value: Primitive) => any) | undefined;
86
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
87
+ select: (value: Primitive) => any;
88
+ }, string, {
89
+ icon: import('..').Icon;
90
+ description: string;
91
+ icons: typeof import('./types').DEFAULT_ICONS;
92
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
93
+ beforeCreate?: (() => void) | (() => void)[];
94
+ created?: (() => void) | (() => void)[];
95
+ beforeMount?: (() => void) | (() => void)[];
96
+ mounted?: (() => void) | (() => void)[];
97
+ beforeUpdate?: (() => void) | (() => void)[];
98
+ updated?: (() => void) | (() => void)[];
99
+ activated?: (() => void) | (() => void)[];
100
+ deactivated?: (() => void) | (() => void)[];
101
+ beforeDestroy?: (() => void) | (() => void)[];
102
+ beforeUnmount?: (() => void) | (() => void)[];
103
+ destroyed?: (() => void) | (() => void)[];
104
+ unmounted?: (() => void) | (() => void)[];
105
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
106
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
107
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
108
+ };
109
+ $forceUpdate: () => void;
110
+ $nextTick: typeof import('vue').nextTick;
111
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
112
+ } & Readonly<{
113
+ icon: import('..').Icon;
114
+ description: string;
115
+ icons: typeof import('./types').DEFAULT_ICONS;
116
+ }> & Omit<Readonly<import('./types').QListItemProps> & Readonly<{
117
+ onSelect?: ((value: Primitive) => any) | undefined;
118
+ }>, "icon" | "description" | "icons"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
119
+ $slots: {
120
+ prepend?(_: {}): any;
121
+ default?(_: {}): any;
122
+ append?(_: {}): any;
123
+ };
124
+ }) | null)[];
51
125
  };
52
126
  rootEl: any;
53
127
  };
@@ -1 +1 @@
1
- {"version":3,"file":"QList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QList/QList.vue"],"names":[],"mappings":"AAmCA;AA0XC,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAQnD,KAAK,WAAW,GAAG,UAAU,CAAC;AA8I7B;;;;;;GAMG;AACH,iBAAS,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,GAAE,OAAe,GAAG,IAAI,CAGxE;AAmBD,iBAAS,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW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