@quidgest/ui 0.16.12 → 0.16.14

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 (50) hide show
  1. package/dist/manifest/components.json +2 -0
  2. package/dist/ui.css +234 -0
  3. package/dist/ui.esm.js +5093 -4831
  4. package/dist/ui.js +18 -18
  5. package/dist/ui.min.css +1 -1
  6. package/dist/ui.min.js +1042 -1022
  7. package/dist/ui.scss +159 -1
  8. package/esm/components/QAccordion/QAccordionItem.vue.js +13 -15
  9. package/esm/components/QCombobox/QCombobox.d.ts +40 -0
  10. package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
  11. package/esm/components/QCombobox/QCombobox.vue.js +126 -117
  12. package/esm/components/QCombobox/index.d.ts +20 -0
  13. package/esm/components/QCombobox/index.d.ts.map +1 -1
  14. package/esm/components/QSelect/QSelect.d.ts.map +1 -1
  15. package/esm/components/QSelect/QSelect.vue.js +133 -118
  16. package/esm/components/QSidebar/QSidebarPanel.d.ts +2 -2
  17. package/esm/components/QSidebar/QSidebarPanel.vue.js +24 -25
  18. package/esm/components/QToast/QToast.d.ts +33 -0
  19. package/esm/components/QToast/QToast.d.ts.map +1 -0
  20. package/esm/components/QToast/QToast.vue.js +212 -0
  21. package/esm/components/QToast/QToast.vue2.js +4 -0
  22. package/esm/components/QToast/QToaster.d.ts +6 -0
  23. package/esm/components/QToast/QToaster.d.ts.map +1 -0
  24. package/esm/components/QToast/QToaster.vue.js +48 -0
  25. package/esm/components/QToast/QToaster.vue2.js +4 -0
  26. package/esm/components/QToast/index.d.ts +56 -0
  27. package/esm/components/QToast/index.d.ts.map +1 -0
  28. package/esm/components/QToast/index.js +8 -0
  29. package/esm/components/QToast/types.d.ts +69 -0
  30. package/esm/components/QToast/types.d.ts.map +1 -0
  31. package/esm/components/QToast/types.js +8 -0
  32. package/esm/components/index.d.ts +1 -0
  33. package/esm/components/index.d.ts.map +1 -1
  34. package/esm/components/index.js +15 -12
  35. package/esm/composables/index.d.ts +1 -0
  36. package/esm/composables/index.d.ts.map +1 -1
  37. package/esm/composables/useDialog/types.d.ts +1 -1
  38. package/esm/composables/useDialog/types.d.ts.map +1 -1
  39. package/esm/composables/useToast/index.d.ts +33 -0
  40. package/esm/composables/useToast/index.d.ts.map +1 -0
  41. package/esm/composables/useToast/index.js +35 -0
  42. package/esm/composables/useToast/types.d.ts +40 -0
  43. package/esm/composables/useToast/types.d.ts.map +1 -0
  44. package/esm/composables/useToast/types.js +4 -0
  45. package/esm/framework.d.ts.map +1 -1
  46. package/esm/framework.js +25 -19
  47. package/esm/index.d.ts +2 -0
  48. package/esm/index.js +7 -5
  49. package/esm/utils/color.js +29 -24
  50. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ const o = Symbol.for("q-toast");
2
+ export {
3
+ o as ToastSymbol
4
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"framework.d.ts","sourceRoot":"","sources":["../src/framework.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAO,SAAS,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,qBAAqB,CAAA;AAMrE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,qFAAqF;IACrF,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAEtC,gFAAgF;IAChF,MAAM,CAAC,EAAE,SAAS,CAAA;IAElB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACnB,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,MAAM,GAAE,eAAoB,GAAG,MAAM,CAqBpE"}
1
+ {"version":3,"file":"framework.d.ts","sourceRoot":"","sources":["../src/framework.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAO,SAAS,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,qBAAqB,CAAA;AAMrE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,qFAAqF;IACrF,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAEtC,gFAAgF;IAChF,MAAM,CAAC,EAAE,SAAS,CAAA;IAElB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACnB,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,MAAM,GAAE,eAAoB,GAAG,MAAM,CAwBpE"}
package/esm/framework.js CHANGED
@@ -1,48 +1,54 @@
1
1
  import { DEFAULTS_SYMBOL as i } from "./composables/defaults.js";
2
2
  import { ThemeSymbol as c } from "./composables/theme.js";
3
- import { DismissibleLayerKey as h } from "./symbols/dismissibleLayer.js";
4
- import { useDismissibleLayerStack as f } from "./composables/useDismissibleLayerStack/index.js";
5
- import { defaultLightColorScheme as a, defaultDarkColorScheme as d } from "./templates/theme.js";
6
- import { ref as r, watch as u } from "vue";
7
- import { createThemeInstance as p, generateRootStyle as L } from "./utils/theme.js";
8
- function q(m = {}) {
3
+ import { DismissibleLayerKey as f } from "./symbols/dismissibleLayer.js";
4
+ import { ToastSymbol as h } from "./composables/useToast/types.js";
5
+ import { useDismissibleLayerStack as d } from "./composables/useDismissibleLayerStack/index.js";
6
+ import { createToastInstance as u } from "./composables/useToast/index.js";
7
+ import { defaultLightColorScheme as r, defaultDarkColorScheme as p } from "./templates/theme.js";
8
+ import { ref as l, watch as S } from "vue";
9
+ import { createThemeInstance as L, generateRootStyle as T } from "./utils/theme.js";
10
+ function N(m = {}) {
9
11
  return { install: (t) => {
10
12
  const s = m.components || {};
11
- for (const n in s)
12
- t.component(n, s[n]);
13
+ for (const a in s)
14
+ t.component(a, s[a]);
13
15
  const e = m.defaults || {};
14
- t.provide(i, r(e)), S(t, m.themes);
15
- const l = f();
16
- t.provide(h, l);
16
+ t.provide(i, l(e)), y(t, m.themes);
17
+ const n = d();
18
+ t.provide(f, n), b(t);
17
19
  } };
18
20
  }
19
- function S(m, o) {
21
+ function y(m, o) {
20
22
  const t = [];
21
23
  let s;
22
24
  if (!o)
23
25
  s = "default", t.push({
24
26
  name: s,
25
27
  mode: "light",
26
- scheme: a
28
+ scheme: r
27
29
  });
28
30
  else
29
31
  for (const e of o.themes) {
30
- const n = { ...e.mode === "light" ? a : d, ...e.colors };
32
+ const a = { ...e.mode === "light" ? r : p, ...e.colors };
31
33
  t.push({
32
34
  name: e.name,
33
35
  mode: e.mode,
34
- scheme: n
36
+ scheme: a
35
37
  }), e.name === o.defaultTheme && (s = e.name);
36
38
  }
37
39
  if (s) {
38
- const e = r(s), l = p(e, t);
39
- L(t), u(l.name, y, { immediate: !0 }), m.provide(c, l);
40
+ const e = l(s), n = L(e, t);
41
+ T(t), S(n.name, C, { immediate: !0 }), m.provide(c, n);
40
42
  }
41
43
  }
42
- function y(m) {
44
+ function b(m) {
45
+ const o = u();
46
+ m.provide(h, o);
47
+ }
48
+ function C(m) {
43
49
  const o = document.documentElement, s = Array.from(o.classList).filter((e) => !e.startsWith("q-theme"));
44
50
  o.className = s.join(" "), o.classList.add(`q-theme--${m}`);
45
51
  }
46
52
  export {
47
- q as createFramework
53
+ N as createFramework
48
54
  };
package/esm/index.d.ts CHANGED
@@ -59,6 +59,8 @@ declare module '@vue/runtime-core' {
59
59
  QTextArea: typeof import('@quidgest/ui/components')['QTextArea']
60
60
  QTextField: typeof import('@quidgest/ui/components')['QTextField']
61
61
  QThemeProvider: typeof import('@quidgest/ui/components')['QThemeProvider']
62
+ QToast: typeof import('@quidgest/ui/components')['QToast']
63
+ QToaster: typeof import('@quidgest/ui/components')['QToaster']
62
64
  QToggle: typeof import('@quidgest/ui/components')['QToggle']
63
65
  QToggleGroup: typeof import('@quidgest/ui/components')['QToggleGroup']
64
66
  QToggleGroupItem: typeof import('@quidgest/ui/components')['QToggleGroupItem']
package/esm/index.js CHANGED
@@ -1,14 +1,16 @@
1
- import * as m from "./templates/index.js";
1
+ import * as t from "./templates/index.js";
2
2
  import * as r from "./components/index.js";
3
3
  import { createFramework as o } from "./framework.js";
4
4
  import { provideTheme as n, useTheme as i } from "./composables/theme.js";
5
- import { useDialog as x } from "./composables/useDialog/index.js";
5
+ import { useDialog as c } from "./composables/useDialog/index.js";
6
+ import { useToast as u } from "./composables/useToast/index.js";
6
7
  const a = (e = {}) => o({ components: r, ...e });
7
8
  export {
8
9
  r as components,
9
10
  a as createFramework,
10
11
  n as provideTheme,
11
- m as templates,
12
- x as useDialog,
13
- i as useTheme
12
+ t as templates,
13
+ c as useDialog,
14
+ i as useTheme,
15
+ u as useToast
14
16
  };
@@ -1,7 +1,7 @@
1
- function h(t, r = !1) {
1
+ function d(t, r = !1) {
2
2
  return r ? /^#[a-fA-F0-9]{6}$/.test(t) : /^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(t);
3
3
  }
4
- function d(t) {
4
+ function g(t) {
5
5
  const r = t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
6
6
  if (r) {
7
7
  const n = parseInt(r[1], 10), s = parseInt(r[2], 10), e = parseInt(r[3], 10);
@@ -9,36 +9,40 @@ function d(t) {
9
9
  }
10
10
  }
11
11
  function b(t) {
12
- if (h(t)) {
12
+ if (d(t)) {
13
13
  t.length === 4 && (t = "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3]);
14
14
  const r = parseInt(t.slice(1, 3), 16), n = parseInt(t.slice(3, 5), 16), s = parseInt(t.slice(5, 7), 16);
15
15
  return { r, g: n, b: s };
16
16
  } else {
17
- const r = d(t);
17
+ const r = g(t);
18
18
  if (r) return r;
19
19
  }
20
20
  throw new Error("Invalid color format");
21
21
  }
22
22
  function $(t, r) {
23
- const n = g(t), s = r / 100;
23
+ const n = h(t), s = r / 100;
24
+ return n.l = n.l + s * (100 - n.l), l(n);
25
+ }
26
+ function p(t, r) {
27
+ const n = h(t), s = r / 100;
24
28
  return n.l = n.l - s * n.l, l(n);
25
29
  }
26
- function p(t) {
30
+ function M(t) {
27
31
  const r = t.r.toString(16).padStart(2, "0"), n = t.g.toString(16).padStart(2, "0"), s = t.b.toString(16).padStart(2, "0");
28
32
  return `#${r}${n}${s}`;
29
33
  }
30
- function M(t) {
34
+ function m(t) {
31
35
  return `${t.r} ${t.g} ${t.b}`;
32
36
  }
33
- function g(t) {
37
+ function h(t) {
34
38
  const r = t.r / 255, n = t.g / 255, s = t.b / 255, e = Math.max(r, n, s), o = Math.min(r, n, s);
35
- let a = 0, i;
36
- const c = (e + o) / 2;
39
+ let a = 0, c;
40
+ const i = (e + o) / 2;
37
41
  if (e === o)
38
- a = i = 0;
42
+ a = c = 0;
39
43
  else {
40
44
  const u = e - o;
41
- switch (i = c > 0.5 ? u / (2 - e - o) : u / (e + o), e) {
45
+ switch (c = i > 0.5 ? u / (2 - e - o) : u / (e + o), e) {
42
46
  case r:
43
47
  a = (n - s) / u + (n < s ? 6 : 0);
44
48
  break;
@@ -53,8 +57,8 @@ function g(t) {
53
57
  }
54
58
  return {
55
59
  h: Math.round(a * 360),
56
- s: Math.round(i * 100),
57
- l: Math.round(c * 100)
60
+ s: Math.round(c * 100),
61
+ l: Math.round(i * 100)
58
62
  };
59
63
  }
60
64
  function l(t) {
@@ -63,8 +67,8 @@ function l(t) {
63
67
  if (n === 0)
64
68
  e = o = a = s;
65
69
  else {
66
- const i = s < 0.5 ? s * (1 + n) : s + n - s * n, c = 2 * s - i;
67
- e = f(c, i, r + 1 / 3), o = f(c, i, r), a = f(c, i, r - 1 / 3);
70
+ const c = s < 0.5 ? s * (1 + n) : s + n - s * n, i = 2 * s - c;
71
+ e = f(i, c, r + 1 / 3), o = f(i, c, r), a = f(i, c, r - 1 / 3);
68
72
  }
69
73
  return {
70
74
  r: Math.round(e * 255),
@@ -75,18 +79,19 @@ function l(t) {
75
79
  function f(t, r, n) {
76
80
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (r - t) * 6 * n : n < 1 / 2 ? r : n < 2 / 3 ? t + (r - t) * (2 / 3 - n) * 6 : t;
77
81
  }
78
- function m(t) {
82
+ function I(t) {
79
83
  return t > 50 ? "#000" : "#fff";
80
84
  }
81
85
  export {
82
- p as colorToHex,
83
- $ as darken,
84
- m as getContrastingColor,
86
+ M as colorToHex,
87
+ p as darken,
88
+ I as getContrastingColor,
85
89
  l as hslToRgb,
86
90
  f as hueToRgb,
87
- h as isValidHex,
91
+ d as isValidHex,
92
+ $ as lighten,
88
93
  b as parseColor,
89
- g as rgbToHsl,
90
- M as rgbToVariableString,
91
- d as tryParseRgb
94
+ h as rgbToHsl,
95
+ m as rgbToVariableString,
96
+ g as tryParseRgb
92
97
  };
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.12",
4
+ "version": "0.16.14",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "author": "Quidgest",