@quidgest/ui 0.16.8 → 0.16.9

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.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quidgest UI v0.16.8
2
+ * Quidgest UI v0.16.9
3
3
  * (c) 2025 Quidgest - Consultores de Gestão, S.A.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,4 +1,4 @@
1
- import { defineComponent as F, mergeModels as U, useModel as g, computed as t, ref as w, createBlock as D, openBlock as O, unref as r, normalizeClass as P, createSlots as E, withCtx as n, createVNode as s, createElementVNode as N, mergeProps as y, renderSlot as Q } from "vue";
1
+ import { defineComponent as C, mergeModels as O, useModel as F, computed as t, ref as U, createBlock as w, openBlock as D, unref as r, normalizeClass as P, createSlots as E, withCtx as n, createVNode as s, createElementVNode as N, mergeProps as y, renderSlot as Q } from "vue";
2
2
  import { DEFAULT_TEXTS as H, DEFAULT_ICONS as I } from "./types.js";
3
3
  import { QClearButton as Z } from "../__internal__/QClearButton/index.js";
4
4
  import { QField as $ } from "../QField/index.js";
@@ -9,10 +9,10 @@ import { convertDatePatternToMask as X } from "../../utils/date/date.js";
9
9
  import { isTimeOnlyFormat as j } from "../../utils/date/tokens.js";
10
10
  import { formatUsesTime as G, formatUsesSeconds as W, uses12HourFormat as J } from "../../utils/time.js";
11
11
  import { useTheme as Y } from "../../composables/theme.js";
12
- const ee = ["value", "placeholder", "disabled", "readonly", "required", "onInput", "onBlur", "onFocus", "onKeypress", "onKeydown", "onPaste"], pe = /* @__PURE__ */ F({
12
+ const ee = ["value", "placeholder", "disabled", "readonly", "required", "onInput", "onBlur", "onFocus", "onKeypress", "onKeydown", "onPaste"], ce = /* @__PURE__ */ C({
13
13
  inheritAttrs: !1,
14
14
  __name: "QDateTimePicker",
15
- props: /* @__PURE__ */ U({
15
+ props: /* @__PURE__ */ O({
16
16
  id: {},
17
17
  class: {},
18
18
  label: {},
@@ -28,6 +28,7 @@ const ee = ["value", "placeholder", "disabled", "readonly", "required", "onInput
28
28
  locale: { default: "en-US" },
29
29
  placeholder: {},
30
30
  inline: { type: Boolean },
31
+ closeOnSelect: { type: Boolean },
31
32
  icons: { default: () => I },
32
33
  texts: { default: () => H }
33
34
  }, {
@@ -36,12 +37,12 @@ const ee = ["value", "placeholder", "disabled", "readonly", "required", "onInput
36
37
  }),
37
38
  emits: ["update:modelValue"],
38
39
  setup(d) {
39
- const e = d, m = g(d, "modelValue"), u = t({
40
+ const e = d, m = F(d, "modelValue"), u = t({
40
41
  get: () => m.value,
41
42
  set: (o) => m.value = o || void 0
42
- }), k = t(() => i.value ? "format" : void 0), v = {
43
- closeOnAutoApply: !1
44
- }, b = Y(), T = t(() => b.current.value.mode === "dark"), x = t(() => G(e.format)), h = t(() => W(e.format)), i = t(() => j(e.format)), z = t(() => J(e.format)), _ = t(() => c(e.minTime)), A = t(() => c(e.maxTime)), B = t(() => i.value ? e.icons.clock : e.icons.calendar), M = t(() => ({
43
+ }), k = t(() => i.value ? "format" : void 0), v = t(() => ({
44
+ closeOnAutoApply: e.closeOnSelect
45
+ })), b = Y(), T = t(() => b.current.value.mode === "dark"), x = t(() => G(e.format)), h = t(() => W(e.format)), i = t(() => j(e.format)), z = t(() => J(e.format)), B = t(() => p(e.minTime)), _ = t(() => p(e.maxTime)), A = t(() => i.value ? e.icons.clock : e.icons.calendar), M = t(() => ({
45
46
  mask: X(e.format),
46
47
  tokens: {
47
48
  // Default tokens
@@ -69,9 +70,9 @@ const ee = ["value", "placeholder", "disabled", "readonly", "required", "onInput
69
70
  },
70
71
  eager: !0
71
72
  // Show static characters before the user types them
72
- })), p = w();
73
- R(p, M);
74
- function c(o) {
73
+ })), c = U();
74
+ R(c, M);
75
+ function p(o) {
75
76
  if (!o) return;
76
77
  const a = o.split(":");
77
78
  return {
@@ -80,7 +81,7 @@ const ee = ["value", "placeholder", "disabled", "readonly", "required", "onInput
80
81
  seconds: a[2]
81
82
  };
82
83
  }
83
- return (o, a) => (O(), D(r($), {
84
+ return (o, a) => (D(), w(r($), {
84
85
  id: e.id,
85
86
  class: P(e.class),
86
87
  label: e.label,
@@ -93,7 +94,7 @@ const ee = ["value", "placeholder", "disabled", "readonly", "required", "onInput
93
94
  prepend: n(() => [
94
95
  s(
95
96
  r(K),
96
- y({ class: "q-date-time-picker__input-icon" }, B.value),
97
+ y({ class: "q-date-time-picker__input-icon" }, A.value),
97
98
  null,
98
99
  16
99
100
  /* FULL_PROPS */
@@ -104,8 +105,8 @@ const ee = ["value", "placeholder", "disabled", "readonly", "required", "onInput
104
105
  modelValue: u.value,
105
106
  "onUpdate:modelValue": a[0] || (a[0] = (l) => u.value = l),
106
107
  "model-type": k.value,
107
- "min-time": _.value,
108
- "max-time": A.value,
108
+ "min-time": B.value,
109
+ "max-time": _.value,
109
110
  disabled: e.disabled,
110
111
  readonly: e.readonly,
111
112
  format: e.format,
@@ -114,7 +115,7 @@ const ee = ["value", "placeholder", "disabled", "readonly", "required", "onInput
114
115
  "enable-time-picker": x.value,
115
116
  "enable-seconds": h.value,
116
117
  "time-picker": i.value,
117
- config: v,
118
+ config: v.value,
118
119
  teleport: !e.inline,
119
120
  offset: 16,
120
121
  dark: T.value,
@@ -123,10 +124,10 @@ const ee = ["value", "placeholder", "disabled", "readonly", "required", "onInput
123
124
  clearable: "",
124
125
  "auto-apply": ""
125
126
  }, {
126
- "dp-input": n(({ value: l, onInput: q, onBlur: V, onFocus: C, onKeypress: f, onPaste: S }) => [
127
+ "dp-input": n(({ value: l, onInput: S, onBlur: q, onFocus: V, onKeypress: f, onPaste: g }) => [
127
128
  N("input", y({
128
129
  ref_key: "inputRef",
129
- ref: p,
130
+ ref: c,
130
131
  "data-test-id": "dp-input",
131
132
  class: "dp__input",
132
133
  type: "text",
@@ -136,12 +137,12 @@ const ee = ["value", "placeholder", "disabled", "readonly", "required", "onInput
136
137
  readonly: e.readonly,
137
138
  required: e.required
138
139
  }, o.$attrs, {
139
- onInput: q,
140
- onBlur: V,
141
- onFocus: C,
140
+ onInput: S,
141
+ onBlur: q,
142
+ onFocus: V,
142
143
  onKeypress: f,
143
144
  onKeydown: f,
144
- onPaste: S
145
+ onPaste: g
145
146
  }), null, 16, ee)
146
147
  ]),
147
148
  "clear-icon": n(({ clear: l }) => [
@@ -152,7 +153,7 @@ const ee = ["value", "placeholder", "disabled", "readonly", "required", "onInput
152
153
  ]),
153
154
  _: 1
154
155
  /* STABLE */
155
- }, 8, ["modelValue", "model-type", "min-time", "max-time", "disabled", "readonly", "format", "is24", "locale", "enable-time-picker", "enable-seconds", "time-picker", "teleport", "dark"])
156
+ }, 8, ["modelValue", "model-type", "min-time", "max-time", "disabled", "readonly", "format", "is24", "locale", "enable-time-picker", "enable-seconds", "time-picker", "config", "teleport", "dark"])
156
157
  ]),
157
158
  _: 2
158
159
  /* DYNAMIC */
@@ -168,5 +169,5 @@ const ee = ["value", "placeholder", "disabled", "readonly", "required", "onInput
168
169
  }
169
170
  });
170
171
  export {
171
- pe as default
172
+ ce as default
172
173
  };
@@ -19,6 +19,7 @@ declare const QDateTimePicker: {
19
19
  locale?: string;
20
20
  placeholder?: string;
21
21
  inline?: boolean;
22
+ closeOnSelect?: boolean;
22
23
  icons?: typeof import('./types').DEFAULT_ICONS;
23
24
  texts?: typeof import('./types').DEFAULT_TEXTS;
24
25
  }> & Readonly<{
@@ -58,6 +59,7 @@ declare const QDateTimePicker: {
58
59
  locale?: string;
59
60
  placeholder?: string;
60
61
  inline?: boolean;
62
+ closeOnSelect?: boolean;
61
63
  icons?: typeof import('./types').DEFAULT_ICONS;
62
64
  texts?: typeof import('./types').DEFAULT_TEXTS;
63
65
  }> & Readonly<{
@@ -90,6 +92,7 @@ declare const QDateTimePicker: {
90
92
  locale?: string;
91
93
  placeholder?: string;
92
94
  inline?: boolean;
95
+ closeOnSelect?: boolean;
93
96
  icons?: typeof import('./types').DEFAULT_ICONS;
94
97
  texts?: typeof import('./types').DEFAULT_TEXTS;
95
98
  }> & Readonly<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QDateTimePicker/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAKnD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoC,CAAA;AAGzD,OAAO,EAAE,eAAe,EAAE,CAAA;AAG1B,YAAY,EAAE,oBAAoB,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QDateTimePicker/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAKnD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoC,CAAA;AAGzD,OAAO,EAAE,eAAe,EAAE,CAAA;AAG1B,YAAY,EAAE,oBAAoB,EAAE,CAAA"}
@@ -41,6 +41,10 @@ export type QDateTimePickerProps = QFieldProps & {
41
41
  * Whether to disable teleport.
42
42
  */
43
43
  inline?: boolean;
44
+ /**
45
+ * Whether to close the popup when selecting the date.
46
+ */
47
+ closeOnSelect?: boolean;
44
48
  /**
45
49
  * Custom icon configurations.
46
50
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QDateTimePicker/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAG5C,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG;IAChD;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,EA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7 +5,7 @@ declare function __VLS_template(): {
5
5
  default?(_: {}): any;
6
6
  };
7
7
  refs: {
8
- layerRef: HTMLDivElement;
8
+ layer: HTMLDivElement;
9
9
  };
10
10
  rootEl: HTMLDivElement;
11
11
  };
@@ -23,7 +23,7 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {},
23
23
  "onInteract-outside"?: ((event: PointerDownOutsideEvent | FocusOutsideEvent) => any) | undefined;
24
24
  onDismiss?: ((event: KeyboardEvent | PointerDownOutsideEvent | FocusOutsideEvent) => any) | undefined;
25
25
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
26
- layerRef: HTMLDivElement;
26
+ layer: HTMLDivElement;
27
27
  }, HTMLDivElement>;
28
28
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
29
29
  export default _default;
@@ -1,18 +1,18 @@
1
- import { defineComponent as p, useTemplateRef as m, useId as v, onMounted as E, onUnmounted as w, createElementBlock as y, openBlock as b, renderSlot as h } from "vue";
2
- import { useDismissibleLayerStackItem as g } from "../../composables/useDismissibleLayerStack/index.js";
3
- const C = /* @__PURE__ */ p({
1
+ import { defineComponent as p, useTemplateRef as m, useId as v, onMounted as E, onUnmounted as w, createElementBlock as h, openBlock as y, renderSlot as b } from "vue";
2
+ import { useDismissibleLayerStackItem as _ } from "../../composables/useDismissibleLayerStack/index.js";
3
+ const g = { ref: "layer" }, P = /* @__PURE__ */ p({
4
4
  __name: "QDismissibleLayer",
5
5
  emits: ["escape-key-down", "pointer-down-outside", "focus-outside", "interact-outside", "dismiss"],
6
6
  setup(L, { emit: c }) {
7
- const o = c, i = m("layerRef"), l = v(), e = g(l);
8
- let u = [];
7
+ const o = c, u = m("layer"), l = v(), e = _(l);
8
+ let i = [];
9
9
  function r(t) {
10
10
  t.key === "Escape" && (e != null && e.isTop()) && (o("escape-key-down", t), t.defaultPrevented || o("dismiss", t));
11
11
  }
12
12
  function d(t) {
13
- if (!i.value) return;
13
+ if (!u.value) return;
14
14
  const s = t.target;
15
- if (!i.value.contains(s) && (e != null && e.isTop())) {
15
+ if (!u.value.contains(s) && (e != null && e.isTop())) {
16
16
  const n = new CustomEvent("focus-outside", {
17
17
  bubbles: !1,
18
18
  cancelable: !0,
@@ -22,9 +22,9 @@ const C = /* @__PURE__ */ p({
22
22
  }
23
23
  }
24
24
  function a(t) {
25
- if (!i.value || !(e != null && e.isTop())) return;
25
+ if (!u.value || !(e != null && e.isTop())) return;
26
26
  const s = t.target;
27
- if (!i.value.contains(s)) {
27
+ if (!u.value.contains(s)) {
28
28
  const n = new CustomEvent("pointer-down-outside", {
29
29
  bubbles: !1,
30
30
  cancelable: !0,
@@ -39,7 +39,7 @@ const C = /* @__PURE__ */ p({
39
39
  passive: !0,
40
40
  capture: !0
41
41
  // Use capture phase to ensure we catch the event
42
- }), u.push(() => {
42
+ }), i.push(() => {
43
43
  document.removeEventListener(s, a, {
44
44
  capture: !0
45
45
  });
@@ -47,21 +47,18 @@ const C = /* @__PURE__ */ p({
47
47
  });
48
48
  }
49
49
  return E(() => {
50
- e == null || e.register(), document.addEventListener("keydown", r), u.push(() => {
50
+ e == null || e.register(), document.addEventListener("keydown", r), i.push(() => {
51
51
  document.removeEventListener("keydown", r);
52
- }), document.addEventListener("focusin", d), u.push(() => {
52
+ }), document.addEventListener("focusin", d), i.push(() => {
53
53
  document.removeEventListener("focusin", d);
54
54
  }), f();
55
55
  }), w(() => {
56
- e == null || e.unregister(), u.forEach((t) => t()), u = [];
57
- }), (t, s) => (b(), y(
56
+ e == null || e.unregister(), i.forEach((t) => t()), i = [];
57
+ }), (t, s) => (y(), h(
58
58
  "div",
59
- {
60
- ref_key: "layerRef",
61
- ref: i
62
- },
59
+ g,
63
60
  [
64
- h(t.$slots, "default")
61
+ b(t.$slots, "default")
65
62
  ],
66
63
  512
67
64
  /* NEED_PATCH */
@@ -69,5 +66,5 @@ const C = /* @__PURE__ */ p({
69
66
  }
70
67
  });
71
68
  export {
72
- C as default
69
+ P as default
73
70
  };
@@ -13,7 +13,7 @@ declare const QDismissibleLayer: {
13
13
  "interact-outside": (event: PointerDownOutsideEvent | FocusOutsideEvent) => any;
14
14
  dismiss: (event: KeyboardEvent | PointerDownOutsideEvent | FocusOutsideEvent) => any;
15
15
  }, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
16
- layerRef: HTMLDivElement;
16
+ layer: HTMLDivElement;
17
17
  }, HTMLDivElement, import('vue').ComponentProvideOptions, {
18
18
  P: {};
19
19
  B: {};
@@ -4,9 +4,9 @@ import F from "./QSidebarPanel.vue.js";
4
4
  const K = /* @__PURE__ */ P({
5
5
  __name: "QSidebar",
6
6
  props: /* @__PURE__ */ z({
7
+ panels: {},
7
8
  anchorWidth: { default: 50 },
8
9
  showLabels: { type: Boolean },
9
- panels: {},
10
10
  position: { default: "left" }
11
11
  }, {
12
12
  modelValue: {},
@@ -22,18 +22,21 @@ const K = /* @__PURE__ */ P({
22
22
  },
23
23
  { immediate: !0 }
24
24
  );
25
- const i = r(() => a.panels.find((e) => e.id === m.value)), h = r(() => !!i.value), t = b(), q = r(() => {
26
- if (t.value !== void 0)
27
- return h.value ? typeof t.value == "number" ? `${a.anchorWidth + t.value}px` : `calc(${a.anchorWidth}px + ${t.value})` : `${a.anchorWidth}px`;
25
+ const i = r(() => {
26
+ var e;
27
+ return (e = a.panels) == null ? void 0 : e.find((t) => t.id === m.value);
28
+ }), h = r(() => !!i.value), l = b(), q = r(() => {
29
+ if (l.value !== void 0)
30
+ return h.value ? typeof l.value == "number" ? `${a.anchorWidth + l.value}px` : `calc(${a.anchorWidth}px + ${l.value})` : `${a.anchorWidth}px`;
28
31
  }), C = r(() => {
29
- var e, l, d, v, p, c, $;
32
+ var e, t, d, v, p, c, $;
30
33
  return [
31
34
  "q-sidebar",
32
35
  `q-sidebar--${((e = i.value) == null ? void 0 : e.initialWidth) ?? "small"}`,
33
36
  `q-sidebar--${a.position}`,
34
37
  {
35
38
  "q-sidebar--expanded": h.value,
36
- [`q-sidebar--min-${(l = i.value) == null ? void 0 : l.minWidth}`]: ((d = i.value) == null ? void 0 : d.resizable) && ((v = i.value) == null ? void 0 : v.minWidth) !== void 0,
39
+ [`q-sidebar--min-${(t = i.value) == null ? void 0 : t.minWidth}`]: ((d = i.value) == null ? void 0 : d.resizable) && ((v = i.value) == null ? void 0 : v.minWidth) !== void 0,
37
40
  [`q-sidebar--max-${(p = i.value) == null ? void 0 : p.maxWidth}`]: ((c = i.value) == null ? void 0 : c.resizable) && (($ = i.value) == null ? void 0 : $.maxWidth) !== void 0
38
41
  }
39
42
  ];
@@ -42,10 +45,10 @@ const K = /* @__PURE__ */ P({
42
45
  u("resize:start");
43
46
  }
44
47
  function g(e) {
45
- t.value = e, u("resize", e);
48
+ l.value = e, u("resize", e);
46
49
  }
47
50
  function B() {
48
- u("resize:end", t.value);
51
+ u("resize:end", l.value);
49
52
  }
50
53
  function L(e) {
51
54
  u("click:item", e);
@@ -54,11 +57,11 @@ const K = /* @__PURE__ */ P({
54
57
  n.value || (m.value = void 0);
55
58
  }
56
59
  function M() {
57
- var l;
58
- const e = (l = i.value) == null ? void 0 : l.initialWidth;
59
- typeof e == "number" ? t.value = e : t.value = void 0;
60
+ var t;
61
+ const e = (t = i.value) == null ? void 0 : t.initialWidth;
62
+ typeof e == "number" ? l.value = e : l.value = void 0;
60
63
  }
61
- return W([() => a.anchorWidth, i], M, { immediate: !0, deep: !0 }), (e, l) => (w(), A(
64
+ return W([() => a.anchorWidth, i], M, { immediate: !0, deep: !0 }), (e, t) => (w(), A(
62
65
  "div",
63
66
  {
64
67
  class: I(C.value),
@@ -67,7 +70,7 @@ const K = /* @__PURE__ */ P({
67
70
  [
68
71
  k(D, {
69
72
  modelValue: n.value,
70
- "onUpdate:modelValue": l[0] || (l[0] = (d) => n.value = d),
73
+ "onUpdate:modelValue": t[0] || (t[0] = (d) => n.value = d),
71
74
  panels: a.panels,
72
75
  "anchor-width": a.anchorWidth,
73
76
  "show-labels": a.showLabels,
@@ -1 +1 @@
1
- {"version":3,"file":"QSidebarAnchor.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QSidebar/QSidebarAnchor.vue"],"names":[],"mappings":"AA8BA;AA+HC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAGlD,OAAO,EAAE,QAAQ,EAAc,MAAM,KAAK,CAAA;AAE1C,KAAK,WAAW,GAAG,mBAAmB,CAAC;AAmFxC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAoFT,OAAO,IAA6B;;;UAZoC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAyD09e,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;EAxCxqf;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAwB8hf,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;kBAfvqf,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
+ {"version":3,"file":"QSidebarAnchor.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QSidebar/QSidebarAnchor.vue"],"names":[],"mappings":"AA8BA;AA+HC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAGlD,OAAO,EAAE,QAAQ,EAAc,MAAM,KAAK,CAAA;AAE1C,KAAK,WAAW,GAAG,mBAAmB,CAAC;AAmFxC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAoFT,OAAO,IAA6B;;;UAZoC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAyD48e,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;EAxC1pf;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAwBghf,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;kBAfzpf,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,28 +1,29 @@
1
- import { defineComponent as w, mergeModels as c, useModel as C, ref as d, watch as L, nextTick as q, createElementBlock as u, openBlock as s, normalizeStyle as f, createElementVNode as m, Fragment as I, renderList as V, createBlock as p, unref as h, withCtx as B, renderSlot as S, createCommentVNode as $, mergeProps as E } from "vue";
2
- import { QIcon as M } from "../QIcon/index.js";
3
- import { QToggle as Q } from "../QToggle/index.js";
4
- const T = { class: "q-sidebar__items" }, W = /* @__PURE__ */ w({
1
+ import { defineComponent as C, mergeModels as d, useModel as L, ref as u, watch as q, nextTick as I, createElementBlock as f, openBlock as s, normalizeStyle as m, createElementVNode as p, Fragment as V, renderList as B, createBlock as h, unref as v, withCtx as S, renderSlot as $, createCommentVNode as E, mergeProps as M } from "vue";
2
+ import { QIcon as Q } from "../QIcon/index.js";
3
+ import { QToggle as T } from "../QToggle/index.js";
4
+ const H = { class: "q-sidebar__items" }, Y = /* @__PURE__ */ C({
5
5
  __name: "QSidebarAnchor",
6
- props: /* @__PURE__ */ c({
6
+ props: /* @__PURE__ */ d({
7
+ panels: {},
7
8
  anchorWidth: {},
8
- showLabels: { type: Boolean },
9
- panels: {}
9
+ showLabels: { type: Boolean }
10
10
  }, {
11
11
  modelValue: {},
12
12
  modelModifiers: {}
13
13
  }),
14
- emits: /* @__PURE__ */ c(["click:item"], ["update:modelValue"]),
15
- setup(r, { emit: v }) {
16
- const i = r, _ = v, o = C(r, "modelValue"), a = d({
14
+ emits: /* @__PURE__ */ d(["click:item"], ["update:modelValue"]),
15
+ setup(r, { emit: _ }) {
16
+ const i = r, g = _, o = L(r, "modelValue"), a = u({
17
17
  height: "0",
18
18
  transform: "translateY(0)",
19
19
  opacity: "0",
20
20
  transition: "transform 0.3s ease, height 0.3s ease, opacity 0.2s ease"
21
- }), l = d([]);
22
- function g(e) {
23
- o.value = o.value === e ? void 0 : e, _("click:item", e);
21
+ }), l = u([]);
22
+ function b(e) {
23
+ o.value = o.value === e ? void 0 : e, g("click:item", e);
24
24
  }
25
- function b() {
25
+ function k() {
26
+ var c;
26
27
  if (!o.value) {
27
28
  a.value = {
28
29
  ...a.value,
@@ -31,41 +32,41 @@ const T = { class: "q-sidebar__items" }, W = /* @__PURE__ */ w({
31
32
  };
32
33
  return;
33
34
  }
34
- const e = i.panels.findIndex((x) => x.id === o.value);
35
+ const e = ((c = i.panels) == null ? void 0 : c.findIndex((w) => w.id === o.value)) ?? -1;
35
36
  if (e === -1 || !l.value[e])
36
37
  return;
37
38
  const n = l.value[e].$el || l.value[e];
38
39
  if (!n) return;
39
- const k = e === l.value.length - 1 ? n.offsetHeight : n.offsetHeight - 1, y = n.offsetTop;
40
+ const y = e === l.value.length - 1 ? n.offsetHeight : n.offsetHeight - 1, x = n.offsetTop;
40
41
  a.value = {
41
42
  ...a.value,
42
- height: `${k}px`,
43
- transform: `translateY(${y}px)`,
43
+ height: `${y}px`,
44
+ transform: `translateY(${x}px)`,
44
45
  opacity: "1"
45
46
  };
46
47
  }
47
- return L(o, () => q(b), { immediate: !0 }), (e, n) => (s(), u(
48
+ return q(o, () => I(k), { immediate: !0 }), (e, n) => (s(), f(
48
49
  "div",
49
50
  {
50
51
  class: "q-sidebar-anchor",
51
- style: f({ width: i.anchorWidth + "px" })
52
+ style: m({ width: i.anchorWidth + "px" })
52
53
  },
53
54
  [
54
- m("div", T, [
55
- m(
55
+ p("div", H, [
56
+ p(
56
57
  "div",
57
58
  {
58
59
  class: "q-sidebar__indicator",
59
- style: f(a.value)
60
+ style: m(a.value)
60
61
  },
61
62
  null,
62
63
  4
63
64
  /* STYLE */
64
65
  ),
65
- (s(!0), u(
66
- I,
66
+ (s(!0), f(
67
+ V,
67
68
  null,
68
- V(e.panels, (t) => (s(), p(h(Q), {
69
+ B(e.panels, (t) => (s(), h(v(T), {
69
70
  key: t.id,
70
71
  ref_for: !0,
71
72
  ref_key: "itemRefs",
@@ -76,20 +77,20 @@ const T = { class: "q-sidebar__items" }, W = /* @__PURE__ */ w({
76
77
  title: i.showLabels ? void 0 : t.title,
77
78
  "icon-pos": "top",
78
79
  class: "q-sidebar__item",
79
- onClick: () => g(t.id)
80
+ onClick: () => b(t.id)
80
81
  }, {
81
- default: B(() => [
82
- S(e.$slots, t.id, { item: t }, () => [
83
- t.icon ? (s(), p(
84
- h(M),
85
- E({
82
+ default: S(() => [
83
+ $(e.$slots, t.id, { item: t }, () => [
84
+ t.icon ? (s(), h(
85
+ v(Q),
86
+ M({
86
87
  key: 0,
87
88
  ref_for: !0
88
89
  }, t.icon),
89
90
  null,
90
91
  16
91
92
  /* FULL_PROPS */
92
- )) : $("v-if", !0)
93
+ )) : E("v-if", !0)
93
94
  ])
94
95
  ]),
95
96
  _: 2
@@ -106,5 +107,5 @@ const T = { class: "q-sidebar__items" }, W = /* @__PURE__ */ w({
106
107
  }
107
108
  });
108
109
  export {
109
- W as default
110
+ Y as default
110
111
  };
@@ -44,12 +44,12 @@ export type QSidebarPanelProps = Omit<QSidebarAnchorItemProps, 'id'> & {
44
44
  * Includes the width of the anchor section and panel configurations.
45
45
  */
46
46
  export type QSidebarAnchorProps = {
47
+ /** List of panels that can be anchored in the sidebar. */
48
+ panels?: QSidebarAnchorItemProps[];
47
49
  /** Width of the anchor section (in pixels). */
48
50
  anchorWidth?: number;
49
51
  /** Whether to display labels alongside icons in anchor items. */
50
52
  showLabels?: boolean;
51
- /** List of panels that can be anchored in the sidebar. */
52
- panels: QSidebarAnchorItemProps[];
53
53
  };
54
54
  /**
55
55
  * Complete set of props for the `QSidebar` component, combining anchor section props
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QSidebar/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAEpC;;GAEG;AACH,KAAK,2BAA2B,GAAG;IAClC,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAA;IACV,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,IAAI,CAAC,EAAE,IAAI,CAAA;CACX,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE5D;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,GAAG;IACnE,kDAAkD;IAClD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,+EAA+E;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O,CAAA;IACnB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yDAAyD;IACzD,YAAY,CAAC,EAAE,iBAAiB,CAAA;IAChC,gEAAgE;IAChE,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B,gEAAgE;IAChE,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAC5B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,uBAAuB,EAAE,IAAI,CAAC,GAAG;IACtE,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACjC,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IACjC,0DAA0D;IAC1D,MAAM,CAAC,EAAE,uBAAuB,EAAE,CAAA;IAClC,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iEAAiE;IACjE,UAAU,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG;IACjD,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAC3B,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.8",
4
+ "version": "0.16.9",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "author": "Quidgest",