@quidgest/ui 0.16.13 → 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.
- package/dist/manifest/components.json +2 -0
- package/dist/ui.css +229 -0
- package/dist/ui.esm.js +5025 -4776
- package/dist/ui.js +18 -18
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +1041 -1021
- package/dist/ui.scss +154 -1
- package/esm/components/QCombobox/QCombobox.d.ts +40 -0
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.vue.js +126 -117
- package/esm/components/QCombobox/index.d.ts +20 -0
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarPanel.d.ts +2 -2
- package/esm/components/QSidebar/QSidebarPanel.vue.js +24 -25
- package/esm/components/QToast/QToast.d.ts +33 -0
- package/esm/components/QToast/QToast.d.ts.map +1 -0
- package/esm/components/QToast/QToast.vue.js +212 -0
- package/esm/components/QToast/QToast.vue2.js +4 -0
- package/esm/components/QToast/QToaster.d.ts +6 -0
- package/esm/components/QToast/QToaster.d.ts.map +1 -0
- package/esm/components/QToast/QToaster.vue.js +48 -0
- package/esm/components/QToast/QToaster.vue2.js +4 -0
- package/esm/components/QToast/index.d.ts +56 -0
- package/esm/components/QToast/index.d.ts.map +1 -0
- package/esm/components/QToast/index.js +8 -0
- package/esm/components/QToast/types.d.ts +69 -0
- package/esm/components/QToast/types.d.ts.map +1 -0
- package/esm/components/QToast/types.js +8 -0
- package/esm/components/index.d.ts +1 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +15 -12
- package/esm/composables/index.d.ts +1 -0
- package/esm/composables/index.d.ts.map +1 -1
- package/esm/composables/useDialog/types.d.ts +1 -1
- package/esm/composables/useDialog/types.d.ts.map +1 -1
- package/esm/composables/useToast/index.d.ts +33 -0
- package/esm/composables/useToast/index.d.ts.map +1 -0
- package/esm/composables/useToast/index.js +35 -0
- package/esm/composables/useToast/types.d.ts +40 -0
- package/esm/composables/useToast/types.d.ts.map +1 -0
- package/esm/composables/useToast/types.js +4 -0
- package/esm/framework.d.ts.map +1 -1
- package/esm/framework.js +25 -19
- package/esm/index.d.ts +2 -0
- package/esm/index.js +7 -5
- package/esm/utils/color.js +29 -24
- package/package.json +1 -1
package/esm/framework.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework.d.ts","sourceRoot":"","sources":["../src/framework.ts"],"names":[],"mappings":"
|
|
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
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
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
|
|
12
|
-
t.component(
|
|
13
|
+
for (const a in s)
|
|
14
|
+
t.component(a, s[a]);
|
|
13
15
|
const e = m.defaults || {};
|
|
14
|
-
t.provide(i,
|
|
15
|
-
const
|
|
16
|
-
t.provide(
|
|
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
|
|
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:
|
|
28
|
+
scheme: r
|
|
27
29
|
});
|
|
28
30
|
else
|
|
29
31
|
for (const e of o.themes) {
|
|
30
|
-
const
|
|
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:
|
|
36
|
+
scheme: a
|
|
35
37
|
}), e.name === o.defaultTheme && (s = e.name);
|
|
36
38
|
}
|
|
37
39
|
if (s) {
|
|
38
|
-
const e =
|
|
39
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
i as useTheme
|
|
12
|
+
t as templates,
|
|
13
|
+
c as useDialog,
|
|
14
|
+
i as useTheme,
|
|
15
|
+
u as useToast
|
|
14
16
|
};
|
package/esm/utils/color.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
function
|
|
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
|
|
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 (
|
|
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 =
|
|
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 =
|
|
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
|
|
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
|
|
34
|
+
function m(t) {
|
|
31
35
|
return `${t.r} ${t.g} ${t.b}`;
|
|
32
36
|
}
|
|
33
|
-
function
|
|
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,
|
|
36
|
-
const
|
|
39
|
+
let a = 0, c;
|
|
40
|
+
const i = (e + o) / 2;
|
|
37
41
|
if (e === o)
|
|
38
|
-
a =
|
|
42
|
+
a = c = 0;
|
|
39
43
|
else {
|
|
40
44
|
const u = e - o;
|
|
41
|
-
switch (
|
|
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(
|
|
57
|
-
l: Math.round(
|
|
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
|
|
67
|
-
e = f(
|
|
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
|
|
82
|
+
function I(t) {
|
|
79
83
|
return t > 50 ? "#000" : "#fff";
|
|
80
84
|
}
|
|
81
85
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
M as colorToHex,
|
|
87
|
+
p as darken,
|
|
88
|
+
I as getContrastingColor,
|
|
85
89
|
l as hslToRgb,
|
|
86
90
|
f as hueToRgb,
|
|
87
|
-
|
|
91
|
+
d as isValidHex,
|
|
92
|
+
$ as lighten,
|
|
88
93
|
b as parseColor,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
h as rgbToHsl,
|
|
95
|
+
m as rgbToVariableString,
|
|
96
|
+
g as tryParseRgb
|
|
92
97
|
};
|