@quidgest/ui 0.16.30 → 0.16.31

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.
@@ -1,14 +1,14 @@
1
- import { defineComponent as Q, mergeModels as V, useModel as _, ref as x, computed as I, useTemplateRef as T, resolveComponent as F, createBlock as L, openBlock as u, unref as v, normalizeClass as U, withCtx as g, createElementVNode as $, withModifiers as z, createVNode as C, renderSlot as A, createElementBlock as M, createCommentVNode as w, toDisplayString as H, Fragment as j, normalizeProps as G, guardReactiveProps as J, mergeProps as W, nextTick as X } from "vue";
2
- import { QList as Y } from "../QList/index.js";
3
- import { QOverlay as Z } from "../QOverlay/index.js";
4
- import { QIcon as K } from "../QIcon/index.js";
5
- import { DEFAULT_ICONS as ee } from "./types.js";
6
- const te = {
1
+ import { defineComponent as F, mergeModels as x, useModel as C, ref as A, computed as M, useTemplateRef as U, resolveComponent as z, createBlock as q, openBlock as d, unref as y, normalizeClass as H, withCtx as r, createElementVNode as j, withModifiers as G, createVNode as E, renderSlot as f, createElementBlock as R, createCommentVNode as k, toDisplayString as J, Fragment as W, normalizeProps as b, guardReactiveProps as V, mergeProps as X, nextTick as Y } from "vue";
2
+ import { QList as Z } from "../QList/index.js";
3
+ import { QOverlay as K } from "../QOverlay/index.js";
4
+ import { QIcon as ee } from "../QIcon/index.js";
5
+ import { DEFAULT_ICONS as te } from "./types.js";
6
+ const oe = {
7
7
  key: 0,
8
8
  class: "q-dropdown-menu__extra"
9
- }, se = /* @__PURE__ */ Q({
9
+ }, re = /* @__PURE__ */ F({
10
10
  __name: "QDropdownMenuContent",
11
- props: /* @__PURE__ */ V({
11
+ props: /* @__PURE__ */ x({
12
12
  id: {},
13
13
  class: {},
14
14
  activator: {},
@@ -23,7 +23,7 @@ const te = {
23
23
  delay: { default: 500 },
24
24
  trigger: { default: "hover" },
25
25
  depth: { default: 0 },
26
- icons: { default: () => ee },
26
+ icons: { default: () => te },
27
27
  offset: { default: 0 },
28
28
  crossOffset: { default: -5 }
29
29
  }, {
@@ -32,139 +32,139 @@ const te = {
32
32
  highlighted: {},
33
33
  highlightedModifiers: {}
34
34
  }),
35
- emits: /* @__PURE__ */ V(["select", "hide", "focus-previous"], ["update:modelValue", "update:highlighted"]),
36
- setup(r, { emit: q }) {
37
- const e = r, d = q, c = _(r, "modelValue"), l = _(r, "highlighted"), i = x(void 0), y = x([]), E = I(() => e.depth !== 0 ? e.offset : 4), R = I(() => e.depth !== 0 ? e.crossOffset : void 0), f = T("qListRef");
38
- function P(t) {
35
+ emits: /* @__PURE__ */ x(["select", "hide", "focus-previous"], ["update:modelValue", "update:highlighted"]),
36
+ setup(u, { emit: P }) {
37
+ const e = u, c = P, m = C(u, "modelValue"), i = C(u, "highlighted"), s = A(void 0), _ = A([]), S = M(() => e.depth !== 0 ? e.offset : 4), B = M(() => e.depth !== 0 ? e.crossOffset : void 0), p = U("qListRef");
38
+ function D(t) {
39
39
  var o;
40
- const n = (o = e.items) == null ? void 0 : o.find((s) => s[e.itemValue] === t);
41
- y.value = (n == null ? void 0 : n.items) ?? [];
42
- const a = y.value.length > 0;
43
- l.value = t, a ? h(t) : k(t);
40
+ const n = (o = e.items) == null ? void 0 : o.find((l) => l[e.itemValue] === t);
41
+ _.value = (n == null ? void 0 : n.items) ?? [];
42
+ const a = _.value.length > 0;
43
+ i.value = t, a ? g(t) : I(t);
44
44
  }
45
- function S(t) {
45
+ function O(t) {
46
46
  var n;
47
47
  if (t.key)
48
48
  switch (["Enter", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"].includes(t.key) && (t.preventDefault(), t.stopPropagation()), t.key) {
49
49
  case "ArrowRight":
50
- const a = (n = f.value) == null ? void 0 : n.getActiveItemIndex();
51
- e.items && (a || a === 0) && e.items[a] && (l.value = e.items[a].key, h(e.items[a].key));
50
+ const a = (n = p.value) == null ? void 0 : n.getActiveItemIndex();
51
+ e.items && (a || a === 0) && e.items[a] && (i.value = e.items[a].key, g(e.items[a].key));
52
52
  break;
53
53
  case "ArrowLeft":
54
- m();
54
+ h();
55
55
  break;
56
56
  case "Escape":
57
57
  case "Tab":
58
- p();
58
+ v();
59
59
  break;
60
60
  }
61
61
  }
62
- function B(t) {
63
- e.trigger === "hover" && (l.value = t, h(t));
62
+ function $(t) {
63
+ e.trigger === "hover" && (i.value = t, g(t));
64
64
  }
65
- function k(t) {
66
- d("select", t), p();
65
+ function I(t) {
66
+ c("select", t), v();
67
67
  }
68
- function D() {
69
- m();
68
+ function N() {
69
+ h();
70
70
  }
71
- function m() {
72
- i.value = void 0, l.value = void 0, c.value = !1, d("focus-previous");
71
+ function h() {
72
+ s.value = void 0, i.value = void 0, m.value = !1, c("focus-previous");
73
73
  }
74
- function p() {
75
- m(), d("hide");
74
+ function v() {
75
+ h(), c("hide");
76
76
  }
77
- function h(t) {
78
- i.value = t;
77
+ function g(t) {
78
+ s.value = t;
79
79
  }
80
- function O() {
80
+ function Q() {
81
81
  var a, o;
82
82
  const t = (a = e.items) == null ? void 0 : a.findIndex(
83
- (s) => s[e.itemValue] === i.value
83
+ (l) => l[e.itemValue] === s.value
84
84
  );
85
85
  if (!t && t !== 0) return;
86
- const n = (o = f.value) == null ? void 0 : o.getItem(t);
87
- i.value = void 0, l.value = void 0, n == null || n.focus();
86
+ const n = (o = p.value) == null ? void 0 : o.getItem(t);
87
+ s.value = void 0, i.value = void 0, n == null || n.focus();
88
88
  }
89
- function N() {
90
- X(() => {
89
+ function T() {
90
+ Y(() => {
91
91
  var t;
92
- return (t = f.value) == null ? void 0 : t.$el.focus();
92
+ return (t = p.value) == null ? void 0 : t.$el.focus();
93
93
  });
94
94
  }
95
95
  return (t, n) => {
96
- const a = F("q-dropdown-menu-content", !0);
97
- return u(), L(v(Z), {
96
+ const a = z("q-dropdown-menu-content", !0);
97
+ return d(), q(y(K), {
98
98
  id: e.id,
99
- modelValue: c.value,
100
- "onUpdate:modelValue": n[0] || (n[0] = (o) => c.value = o),
99
+ modelValue: m.value,
100
+ "onUpdate:modelValue": n[0] || (n[0] = (o) => m.value = o),
101
101
  anchor: e.activator,
102
102
  appearance: e.appearance,
103
103
  inline: e.inline,
104
104
  delay: e.delay,
105
- offset: E.value,
106
- "cross-offset": R.value,
105
+ offset: S.value,
106
+ "cross-offset": B.value,
107
107
  placement: e.placement,
108
108
  transition: e.transition,
109
- class: U(e.class),
109
+ class: H(e.class),
110
110
  "scroll-lock": "",
111
111
  "non-modal": "",
112
- onEnter: N,
113
- onLeave: D
112
+ onEnter: T,
113
+ onLeave: N
114
114
  }, {
115
- default: g(() => [
116
- $(
115
+ default: r(() => [
116
+ j(
117
117
  "div",
118
118
  {
119
119
  class: "q-dropdown-menu__body",
120
120
  "data-testid": "dropdown-content",
121
121
  tabindex: "-1",
122
- onKeydown: z(S, ["stop"])
122
+ onKeydown: G(O, ["stop"])
123
123
  },
124
124
  [
125
- C(v(Y), {
125
+ E(y(Z), {
126
126
  ref: "qListRef",
127
127
  class: "q-dropdown-menu__items",
128
- highlighted: l.value,
128
+ highlighted: i.value,
129
129
  items: e.items,
130
130
  groups: e.groups,
131
131
  "item-label": e.itemLabel,
132
132
  "item-value": e.itemValue,
133
133
  selectable: !1,
134
- onClick: P,
135
- "onMouseenter:item": B
134
+ onClick: D,
135
+ "onMouseenter:item": $
136
136
  }, {
137
- item: g(({ item: o }) => [
138
- A(t.$slots, "item", { item: o })
137
+ item: r(({ item: o }) => [
138
+ f(t.$slots, "item", { item: o })
139
139
  ]),
140
- "item.append": g(({ item: o, element: s }) => {
141
- var b;
140
+ "item.append": r(({ item: o, element: l }) => {
141
+ var L;
142
142
  return [
143
- A(t.$slots, "item.append", { item: o }, () => [
144
- o.extraInfo ? (u(), M(
143
+ f(t.$slots, "item.append", { item: o }, () => [
144
+ o.extraInfo ? (d(), R(
145
145
  "span",
146
- te,
147
- H(o.extraInfo),
146
+ oe,
147
+ J(o.extraInfo),
148
148
  1
149
149
  /* TEXT */
150
- )) : w("v-if", !0)
150
+ )) : k("v-if", !0)
151
151
  ]),
152
- ((b = o.items) == null ? void 0 : b.length) > 0 ? (u(), M(
153
- j,
152
+ ((L = o.items) == null ? void 0 : L.length) > 0 ? (d(), R(
153
+ W,
154
154
  { key: 0 },
155
155
  [
156
- C(
157
- v(K),
158
- G(J(e.icons.expand)),
156
+ E(
157
+ y(ee),
158
+ b(V(e.icons.expand)),
159
159
  null,
160
160
  16
161
161
  /* FULL_PROPS */
162
162
  ),
163
- i.value === o.key ? (u(), L(a, W({
163
+ s.value === o.key ? (d(), q(a, X({
164
164
  key: 0,
165
- "model-value": r.modelValue
165
+ "model-value": u.modelValue
166
166
  }, e, {
167
- activator: s,
167
+ activator: l,
168
168
  items: o.items,
169
169
  groups: o.groups,
170
170
  depth: e.depth + 1,
@@ -172,14 +172,23 @@ const te = {
172
172
  placement: "right-start",
173
173
  "non-modal": "",
174
174
  inline: "",
175
- onHide: p,
176
- onSelect: k,
177
- onFocusPrevious: O
178
- }), null, 16, ["model-value", "activator", "items", "groups", "depth", "delay"])) : w("v-if", !0)
175
+ onHide: v,
176
+ onSelect: I,
177
+ onFocusPrevious: Q
178
+ }), {
179
+ item: r((w) => [
180
+ f(t.$slots, "item", b(V(w)))
181
+ ]),
182
+ "item.append": r((w) => [
183
+ f(t.$slots, "item.append", b(V(w)))
184
+ ]),
185
+ _: 2
186
+ /* DYNAMIC */
187
+ }, 1040, ["model-value", "activator", "items", "groups", "depth", "delay"])) : k("v-if", !0)
179
188
  ],
180
189
  64
181
190
  /* STABLE_FRAGMENT */
182
- )) : w("v-if", !0)
191
+ )) : k("v-if", !0)
183
192
  ];
184
193
  }),
185
194
  _: 3
@@ -197,5 +206,5 @@ const te = {
197
206
  }
198
207
  });
199
208
  export {
200
- se as default
209
+ re as default
201
210
  };
@@ -1,24 +1,58 @@
1
- declare const QDropdownMenu: import('vue').DefineComponent<{
2
- modelValue?: boolean;
3
- } & import('../../types/component').QBaseComponentProps & {
4
- activator?: import('../../utils/getElement').Selector;
5
- itemValue?: string;
6
- itemLabel?: string;
7
- items?: import('../QList/types').Item[];
8
- groups?: import('../QList/types').Group[];
9
- appearance?: import('../../composables/overlay').Appearance;
10
- placement?: import('../../composables/overlay').Placement;
11
- transition?: string;
12
- inline?: boolean;
13
- delay?: number;
14
- trigger?: import('../../composables/overlay').Trigger;
15
- depth?: number;
16
- icons?: typeof import('./types').DEFAULT_ICONS;
17
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
- "update:modelValue": (value: boolean) => any;
19
- } & {
20
- select: (item: any) => any;
21
- }, string, import('vue').PublicProps, Readonly<{
1
+ declare const QDropdownMenu: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
3
+ modelValue?: boolean;
4
+ } & import('../../types/component').QBaseComponentProps & {
5
+ activator?: import('../../utils/getElement').Selector;
6
+ itemValue?: string;
7
+ itemLabel?: string;
8
+ items?: import('../QList/types').Item[];
9
+ groups?: import('../QList/types').Group[];
10
+ appearance?: import('../../composables/overlay').Appearance;
11
+ placement?: import('../../composables/overlay').Placement;
12
+ transition?: string;
13
+ inline?: boolean;
14
+ delay?: number;
15
+ trigger?: import('../../composables/overlay').Trigger;
16
+ depth?: number;
17
+ icons?: typeof import('./types').DEFAULT_ICONS;
18
+ }> & Readonly<{
19
+ onSelect?: ((item: any) => any) | undefined;
20
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
21
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
22
+ "update:modelValue": (value: boolean) => any;
23
+ } & {
24
+ select: (item: any) => any;
25
+ }, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
26
+ P: {};
27
+ B: {};
28
+ D: {};
29
+ C: {};
30
+ M: {};
31
+ Defaults: {};
32
+ }, Readonly<{
33
+ modelValue?: boolean;
34
+ } & import('../../types/component').QBaseComponentProps & {
35
+ activator?: import('../../utils/getElement').Selector;
36
+ itemValue?: string;
37
+ itemLabel?: string;
38
+ items?: import('../QList/types').Item[];
39
+ groups?: import('../QList/types').Group[];
40
+ appearance?: import('../../composables/overlay').Appearance;
41
+ placement?: import('../../composables/overlay').Placement;
42
+ transition?: string;
43
+ inline?: boolean;
44
+ delay?: number;
45
+ trigger?: import('../../composables/overlay').Trigger;
46
+ depth?: number;
47
+ icons?: typeof import('./types').DEFAULT_ICONS;
48
+ }> & Readonly<{
49
+ onSelect?: ((item: any) => any) | undefined;
50
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
51
+ }>, {}, {}, {}, {}, {}>;
52
+ __isFragment?: never;
53
+ __isTeleport?: never;
54
+ __isSuspense?: never;
55
+ } & import('vue').ComponentOptionsBase<Readonly<{
22
56
  modelValue?: boolean;
23
57
  } & import('../../types/component').QBaseComponentProps & {
24
58
  activator?: import('../../utils/getElement').Selector;
@@ -37,6 +71,19 @@ declare const QDropdownMenu: import('vue').DefineComponent<{
37
71
  }> & Readonly<{
38
72
  onSelect?: ((item: any) => any) | undefined;
39
73
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
40
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
74
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
75
+ "update:modelValue": (value: boolean) => any;
76
+ } & {
77
+ select: (item: any) => any;
78
+ }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
79
+ $slots: {
80
+ item?(_: {
81
+ item: import('../QList/types').Item;
82
+ }): any;
83
+ 'item.append'?(_: {
84
+ item: import('../QList/types').Item;
85
+ }): any;
86
+ };
87
+ });
41
88
  export { QDropdownMenu };
42
89
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QDropdownMenu/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kFAAkC,CAAA;AAGrD,OAAO,EAAE,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QDropdownMenu/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAkC,CAAA;AAGrD,OAAO,EAAE,aAAa,EAAE,CAAA"}
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.16.30",
4
+ "version": "0.16.31",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "author": "Quidgest",