@gradient-ui/core 0.2.0 → 0.4.0
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/README.md +2 -0
- package/dist/{GLoading.vue_vue_type_style_index_0_lang-DDqJEYGf.js → GLoading.vue_vue_type_style_index_0_lang-CPzo3WD3.js} +195 -206
- package/dist/GLoading.vue_vue_type_style_index_0_lang-cokm-HBh.cjs +1 -0
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-BmbKqNgm.js +6421 -0
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-By_7hZOW.cjs +4 -0
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +39 -38
- package/dist/directives.cjs +1 -1
- package/dist/directives.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +92 -88
- package/dist/{mask-BgaDaVWU.js → mask-Bu8cjwwH.js} +22 -21
- package/dist/mask-D1vJj5Hl.cjs +1 -0
- package/dist/propsFactory-DyyboUaC.cjs +1 -0
- package/dist/propsFactory-UhcvubZJ.js +13 -0
- package/dist/services.cjs +1 -1
- package/dist/services.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/tagName-CYG1CUfd.js +103 -0
- package/dist/tagName-CbsvFHGg.cjs +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/ui/GButton/GButton.vue.d.ts +62 -2
- package/dist/types/components/ui/GButton/types.d.ts +76 -40
- package/dist/types/components/ui/GNavbar/GNavbarItem.vue.d.ts +3 -3
- package/dist/types/components/ui/GNavbar/GNavbarMenu.vue.d.ts +3 -3
- package/dist/types/components/ui/GTable/GTable.vue.d.ts +143 -0
- package/dist/types/components/ui/GTable/GTableBody.vue.d.ts +69 -0
- package/dist/types/components/ui/GTable/GTableCell.vue.d.ts +35 -0
- package/dist/types/components/ui/GTable/GTableExpandedRow.vue.d.ts +25 -0
- package/dist/types/components/ui/GTable/GTableHead.vue.d.ts +30 -0
- package/dist/types/components/ui/GTable/GTableRow.vue.d.ts +40 -0
- package/dist/types/components/ui/GTable/context.d.ts +25 -0
- package/dist/types/components/ui/GTable/index.d.ts +3 -0
- package/dist/types/components/ui/GTable/types.d.ts +318 -0
- package/dist/types/components/ui/GTable/useTable.d.ts +22 -0
- package/dist/types/components/ui/GTable/useTableExpansion.d.ts +17 -0
- package/dist/types/components/ui/GTable/useTableSpans.d.ts +12 -0
- package/dist/types/use/index.d.ts +1 -0
- package/dist/types/use/tagName.d.ts +47 -0
- package/dist/use.cjs +1 -1
- package/dist/use.mjs +15 -12
- package/dist/useSnackbar-2iJU4bdd.js +769 -0
- package/dist/useSnackbar-3QuH25xm.cjs +1 -0
- package/package.json +2 -2
- package/dist/GLoading.vue_vue_type_style_index_0_lang-CqbeZChH.cjs +0 -1
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-Bufs8uqY.js +0 -5633
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-CH9jX5W1.cjs +0 -4
- package/dist/icon-0-mbYGMr.cjs +0 -1
- package/dist/icon-BrFRYYf3.js +0 -66
- package/dist/mask-pzGv8apS.cjs +0 -1
- package/dist/useSnackbar-CFrWSpt4.cjs +0 -1
- package/dist/useSnackbar-lGrTDbl-.js +0 -763
package/dist/index.mjs
CHANGED
|
@@ -1,134 +1,138 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { u as
|
|
5
|
-
import { g as
|
|
6
|
-
import { a as
|
|
7
|
-
import { d as
|
|
8
|
-
import { i as
|
|
9
|
-
import { c as Ms, p as
|
|
10
|
-
import { i as rs, d as
|
|
11
|
-
import { D as
|
|
12
|
-
import { i as
|
|
13
|
-
import { c as
|
|
14
|
-
function a(s, e,
|
|
15
|
-
s.component(e,
|
|
16
|
-
}
|
|
17
|
-
function Gs(s) {
|
|
18
|
-
a(s, "BaseOverlay", i), a(s, "GAlert", o), a(s, "GAside", n), a(s, "GAsideGroup", G), a(s, "GAsideItem", u), a(s, "GBadge", c), a(s, "GButton", J), a(s, "GCheckbox", l), a(s, "GCheckboxGroup", d), a(s, "GChip", f), a(s, "GDrawer", m), a(s, "GDropdownGroup", v), a(s, "GExpansion", b), a(s, "GExpansionGroup", T), a(s, "GFAB", _), a(s, "GGradient", K), a(s, "GIcon", V), a(s, "GInput", x), a(s, "GLoading", Q), a(s, "GMenu", I), a(s, "GModal", k), a(s, "GNavbar", g), a(s, "GNavbarItem", D), a(s, "GNavbarMenu", h), a(s, "GNavbarSubItem", A), a(s, "GNavGroup", N), a(s, "GNavItem", S), a(s, "GNavList", B), a(s, "GProgress", z), a(s, "GQuickActions", C), a(s, "GRadio", E), a(s, "GSelect", L), a(s, "GSnackbar", W), a(s, "GSquircle", M), a(s, "GSwitch", $), a(s, "GTab", w), a(s, "GTabList", y), a(s, "GTabPanel", P), a(s, "GTabPanels", F), a(s, "GTabs", q), a(s, "GText", O), a(s, "GTextarea", R), a(s, "GTooltip", es), a(s, "GTransition", H), a(s, "GTransitionGroup", U), a(s, "GExpandTransition", j);
|
|
1
|
+
import { B as r, G as o, a as n, b as G, c as u, d as c, _ as l, e as d, f as m, g as f, h as b, j as T, k as v, l as _, m as x, n as k, o as I, s as g, t as D, u as h, v as N, p as A, q as L, r as S, w as B, x as $, y as C, z as E, A as M, C as w, D as y, E as P, F, H as q, I as O, J as R, K as U, L as j, i as Q } from "./GSwitch.vue_vue_type_script_setup_true_lang-BmbKqNgm.js";
|
|
2
|
+
import { _ as z, G as H, a as J } from "./GLoading.vue_vue_type_style_index_0_lang-CPzo3WD3.js";
|
|
3
|
+
import { _ as K, G as V, a as W, b as X } from "./useSnackbar-2iJU4bdd.js";
|
|
4
|
+
import { u as gs, c as Ds } from "./useSnackbar-2iJU4bdd.js";
|
|
5
|
+
import { g as Y, v as Z, l as p, a as ss, r as as, b as es, G as ts } from "./mask-Bu8cjwwH.js";
|
|
6
|
+
import { a as Ns, d as As, u as Ls, b as Ss } from "./index-Cs3XQ3JB.js";
|
|
7
|
+
import { d as $s, u as Cs } from "./index-BtCLucTD.js";
|
|
8
|
+
import { i as is } from "./tagName-CYG1CUfd.js";
|
|
9
|
+
import { c as Ms, m as ws, p as ys, u as Ps, a as Fs, b as qs, d as Os } from "./tagName-CYG1CUfd.js";
|
|
10
|
+
import { i as rs, d as os } from "./default-585QCoXx.js";
|
|
11
|
+
import { D as Us, c as js, a as Qs, b as zs, p as Hs, u as Js } from "./default-585QCoXx.js";
|
|
12
|
+
import { i as ns, w as Gs } from "./defaults-DMi34V8q.js";
|
|
13
|
+
import { c as Vs, p as Ws, u as Xs } from "./defaults-DMi34V8q.js";
|
|
14
|
+
function a(s, e, i) {
|
|
15
|
+
s.component(e, Gs(e, i));
|
|
19
16
|
}
|
|
20
17
|
function us(s) {
|
|
18
|
+
a(s, "BaseOverlay", r), a(s, "GAlert", o), a(s, "GAside", n), a(s, "GAsideGroup", G), a(s, "GAsideItem", u), a(s, "GBadge", c), a(s, "GButton", K), a(s, "GCheckbox", l), a(s, "GCheckboxGroup", d), a(s, "GChip", m), a(s, "GDrawer", f), a(s, "GDropdownGroup", b), a(s, "GExpansion", T), a(s, "GExpansionGroup", v), a(s, "GFAB", _), a(s, "GGradient", V), a(s, "GIcon", W), a(s, "GInput", x), a(s, "GLoading", z), a(s, "GMenu", k), a(s, "GModal", I), a(s, "GNavbar", g), a(s, "GNavbarItem", D), a(s, "GNavbarMenu", h), a(s, "GNavbarSubItem", N), a(s, "GNavGroup", A), a(s, "GNavItem", L), a(s, "GNavList", S), a(s, "GProgress", H), a(s, "GQuickActions", B), a(s, "GRadio", $), a(s, "GSelect", C), a(s, "GSnackbar", X), a(s, "GSquircle", E), a(s, "GSwitch", M), a(s, "GTab", w), a(s, "GTabList", y), a(s, "GTabPanel", P), a(s, "GTabPanels", F), a(s, "GTable", q), a(s, "GTabs", O), a(s, "GText", R), a(s, "GTextarea", U), a(s, "GTooltip", ts), a(s, "GTransition", J), a(s, "GTransitionGroup", j), a(s, "GExpandTransition", Q);
|
|
19
|
+
}
|
|
20
|
+
function cs(s) {
|
|
21
21
|
return s == null || s === !1 ? {} : typeof s == "string" || typeof s == "number" ? {
|
|
22
22
|
seed: s
|
|
23
23
|
} : s;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function ls(s = {}) {
|
|
26
26
|
return {
|
|
27
|
-
install(e,
|
|
27
|
+
install(e, i = {}) {
|
|
28
28
|
const t = {
|
|
29
29
|
...s,
|
|
30
|
-
...
|
|
30
|
+
...i,
|
|
31
31
|
defaults: {
|
|
32
32
|
...s.defaults ?? {},
|
|
33
|
-
...
|
|
33
|
+
...i.defaults ?? {}
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
ns(e, t.defaults), us(e), e.directive("gradient-icon", Y), e.directive("gradient-text", Z), e.directive("loading", p), e.directive("mask", ss), e.directive("ripple", as), e.directive("tooltip", es), t.icons !== !1 && is(
|
|
37
37
|
e,
|
|
38
38
|
typeof t.icons == "object" ? t.icons : void 0
|
|
39
39
|
), t.theme !== !1 && rs(
|
|
40
40
|
e,
|
|
41
|
-
|
|
41
|
+
os(cs(t.theme))
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const xs = {
|
|
47
47
|
install(s, e = {}) {
|
|
48
|
-
var
|
|
49
|
-
(t = (
|
|
48
|
+
var i, t;
|
|
49
|
+
(t = (i = ls(e)).install) == null || t.call(i, s);
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
r as BaseOverlay,
|
|
54
|
+
Us as DEFAULT_SEED,
|
|
55
55
|
o as GAlert,
|
|
56
56
|
n as GAside,
|
|
57
57
|
G as GAsideGroup,
|
|
58
58
|
u as GAsideItem,
|
|
59
59
|
c as GBadge,
|
|
60
|
-
|
|
60
|
+
K as GButton,
|
|
61
61
|
l as GCheckbox,
|
|
62
62
|
d as GCheckboxGroup,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
m as GChip,
|
|
64
|
+
f as GDrawer,
|
|
65
|
+
b as GDropdownGroup,
|
|
66
|
+
Q as GExpandTransition,
|
|
67
|
+
T as GExpansion,
|
|
68
|
+
v as GExpansionGroup,
|
|
69
69
|
_ as GFAB,
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
V as GGradient,
|
|
71
|
+
W as GIcon,
|
|
72
72
|
x as GInput,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
z as GLoading,
|
|
74
|
+
k as GMenu,
|
|
75
|
+
I as GModal,
|
|
76
|
+
A as GNavGroup,
|
|
77
|
+
L as GNavItem,
|
|
78
|
+
S as GNavList,
|
|
79
79
|
g as GNavbar,
|
|
80
80
|
D as GNavbarItem,
|
|
81
81
|
h as GNavbarMenu,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
N as GNavbarSubItem,
|
|
83
|
+
H as GProgress,
|
|
84
|
+
B as GQuickActions,
|
|
85
|
+
$ as GRadio,
|
|
86
|
+
C as GSelect,
|
|
87
|
+
X as GSnackbar,
|
|
88
|
+
E as GSquircle,
|
|
89
|
+
M as GSwitch,
|
|
90
90
|
w as GTab,
|
|
91
91
|
y as GTabList,
|
|
92
92
|
P as GTabPanel,
|
|
93
93
|
F as GTabPanels,
|
|
94
|
-
q as
|
|
95
|
-
O as
|
|
96
|
-
R as
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
zs as
|
|
106
|
-
|
|
94
|
+
q as GTable,
|
|
95
|
+
O as GTabs,
|
|
96
|
+
R as GText,
|
|
97
|
+
U as GTextarea,
|
|
98
|
+
ts as GTooltip,
|
|
99
|
+
J as GTransition,
|
|
100
|
+
j as GTransitionGroup,
|
|
101
|
+
xs as GradientUI,
|
|
102
|
+
Ns as applyMask,
|
|
103
|
+
js as createDefaultDarkTheme,
|
|
104
|
+
Qs as createDefaultLightTheme,
|
|
105
|
+
zs as createDefaultTheme,
|
|
106
|
+
Vs as createDefaults,
|
|
107
|
+
ls as createGradientUI,
|
|
107
108
|
Ms as createIcons,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
os as createTheme,
|
|
110
|
+
xs as default,
|
|
111
|
+
$s as defaultBreakpoints,
|
|
111
112
|
As as defaultMaskTokens,
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
ns as installDefaults,
|
|
114
|
+
is as installIcons,
|
|
114
115
|
rs as installTheme,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
116
|
+
ws as makeTagNameProps,
|
|
117
|
+
Ws as provideDefaults,
|
|
118
|
+
ys as provideIcons,
|
|
119
|
+
Hs as provideTheme,
|
|
120
|
+
Ls as unmaskValue,
|
|
121
|
+
Ps as useAsLink,
|
|
122
|
+
Cs as useBreakpoints,
|
|
123
|
+
Xs as useComponentDefaults,
|
|
124
|
+
Fs as useIcon,
|
|
125
|
+
qs as useIcons,
|
|
126
|
+
gs as useLoading,
|
|
124
127
|
Ss as useMask,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
Y as
|
|
129
|
-
Z as
|
|
130
|
-
p as
|
|
131
|
-
ss as
|
|
132
|
-
as as
|
|
133
|
-
|
|
128
|
+
Ds as useSnackbar,
|
|
129
|
+
Os as useTagName,
|
|
130
|
+
Js as useTheme,
|
|
131
|
+
Y as vGradientIcon,
|
|
132
|
+
Z as vGradientText,
|
|
133
|
+
p as vLoading,
|
|
134
|
+
ss as vMask,
|
|
135
|
+
as as vRipple,
|
|
136
|
+
es as vTooltip,
|
|
137
|
+
Gs as withGradientDefaults
|
|
134
138
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { r as z, b as $, _ as fe,
|
|
2
|
-
import { createApp as
|
|
1
|
+
import { r as z, b as $, _ as fe, m as pe, a as G, c as Q } from "./GLoading.vue_vue_type_style_index_0_lang-CPzo3WD3.js";
|
|
2
|
+
import { createApp as ee, ref as v, computed as p, onMounted as me, onBeforeUnmount as S, watch as te, defineComponent as ne, toRef as ge, openBlock as L, createElementBlock as ye, Fragment as ve, createElementVNode as _, normalizeClass as _e, renderSlot as C, unref as y, createBlock as A, Teleport as be, createVNode as ke, withCtx as D, withDirectives as K, normalizeStyle as W, vShow as j, mergeProps as P, createSlots as he, toDisplayString as xe, h as we } from "vue";
|
|
3
|
+
import { p as oe } from "./propsFactory-UhcvubZJ.js";
|
|
3
4
|
import { offset as Te, flip as Ee, shift as Le, size as Ce, useFloating as De, autoUpdate as Be } from "@floating-ui/vue";
|
|
4
5
|
import { d as Me, a as Fe } from "./index-Cs3XQ3JB.js";
|
|
5
6
|
const U = "var(--g-gradient-current, var(--g-gradient-main))", Ie = "135deg";
|
|
@@ -99,7 +100,7 @@ function Se(e, t) {
|
|
|
99
100
|
function Re(e, t) {
|
|
100
101
|
e.style.backgroundImage = t, e.style.backgroundClip = "text", e.style.color = "transparent", e.style.setProperty("-webkit-background-clip", "text"), e.style.setProperty("-webkit-text-fill-color", "transparent");
|
|
101
102
|
}
|
|
102
|
-
const
|
|
103
|
+
const Tt = re(), Et = re(".mdi");
|
|
103
104
|
function ze(e) {
|
|
104
105
|
const t = e == null ? void 0 : e.isVisible;
|
|
105
106
|
return typeof t == "object" && t !== null && "value" in t ? !!t.value : !!t;
|
|
@@ -164,7 +165,7 @@ function He(e, t) {
|
|
|
164
165
|
je(e);
|
|
165
166
|
const o = document.createElement("div");
|
|
166
167
|
o.className = "g-loading__container";
|
|
167
|
-
const r =
|
|
168
|
+
const r = ee(fe, {
|
|
168
169
|
text: t.text,
|
|
169
170
|
noText: t.noText,
|
|
170
171
|
color: t.color,
|
|
@@ -193,7 +194,7 @@ function H(e, t, n) {
|
|
|
193
194
|
}
|
|
194
195
|
B(e), He(e, r);
|
|
195
196
|
}
|
|
196
|
-
const
|
|
197
|
+
const Lt = {
|
|
197
198
|
mounted(e, t) {
|
|
198
199
|
e.__gLoading__ = {
|
|
199
200
|
originalPosition: e.style.position
|
|
@@ -319,7 +320,7 @@ function tt(e) {
|
|
|
319
320
|
const t = e.__gRipple__;
|
|
320
321
|
t && (e.removeEventListener("pointerdown", t.onPointerDown), e.removeEventListener("keydown", t.onKeyDown), ae(e), e.style.position = t.originalPosition, delete e.__gRipple__);
|
|
321
322
|
}
|
|
322
|
-
const
|
|
323
|
+
const Ct = {
|
|
323
324
|
mounted(e, t) {
|
|
324
325
|
et(e, t.value);
|
|
325
326
|
},
|
|
@@ -329,7 +330,7 @@ const Lt = {
|
|
|
329
330
|
unmounted(e) {
|
|
330
331
|
tt(e);
|
|
331
332
|
}
|
|
332
|
-
}, ue =
|
|
333
|
+
}, ue = oe({
|
|
333
334
|
...pe(),
|
|
334
335
|
modelValue: {
|
|
335
336
|
type: Boolean,
|
|
@@ -504,7 +505,7 @@ function ut(e) {
|
|
|
504
505
|
}), c = p(
|
|
505
506
|
() => o === "overlay" && ce.value === r
|
|
506
507
|
);
|
|
507
|
-
return
|
|
508
|
+
return te(
|
|
508
509
|
t,
|
|
509
510
|
(d) => {
|
|
510
511
|
d ? l() : s();
|
|
@@ -520,7 +521,7 @@ function ut(e) {
|
|
|
520
521
|
bringToFront: a
|
|
521
522
|
};
|
|
522
523
|
}
|
|
523
|
-
const ct = /* @__PURE__ */
|
|
524
|
+
const ct = /* @__PURE__ */ ne({
|
|
524
525
|
__name: "BaseFloating",
|
|
525
526
|
props: ue(),
|
|
526
527
|
emits: ["update:modelValue"],
|
|
@@ -550,7 +551,7 @@ const ct = /* @__PURE__ */ oe({
|
|
|
550
551
|
function E() {
|
|
551
552
|
a.value = !1;
|
|
552
553
|
}
|
|
553
|
-
return
|
|
554
|
+
return te(
|
|
554
555
|
o,
|
|
555
556
|
(f) => {
|
|
556
557
|
f && (c.value = f);
|
|
@@ -611,7 +612,7 @@ const ct = /* @__PURE__ */ oe({
|
|
|
611
612
|
}, 8, ["transition"]))
|
|
612
613
|
], 64));
|
|
613
614
|
}
|
|
614
|
-
}), dt = /* @__PURE__ */
|
|
615
|
+
}), dt = /* @__PURE__ */ Q(ct, [["__scopeId", "data-v-d9f4cacd"]]), ft = oe({
|
|
615
616
|
...ue(),
|
|
616
617
|
openDelay: {
|
|
617
618
|
type: Number,
|
|
@@ -671,7 +672,7 @@ function pt(e, t) {
|
|
|
671
672
|
floatingAttrs: E
|
|
672
673
|
};
|
|
673
674
|
}
|
|
674
|
-
const mt = { class: "g-tooltip__content" }, gt = /* @__PURE__ */
|
|
675
|
+
const mt = { class: "g-tooltip__content" }, gt = /* @__PURE__ */ ne({
|
|
675
676
|
__name: "GTooltip",
|
|
676
677
|
props: ft(),
|
|
677
678
|
setup(e, { expose: t }) {
|
|
@@ -718,12 +719,12 @@ const mt = { class: "g-tooltip__content" }, gt = /* @__PURE__ */ oe({
|
|
|
718
719
|
} : void 0
|
|
719
720
|
]), 1040, ["model-value", "transition"]));
|
|
720
721
|
}
|
|
721
|
-
}), yt = /* @__PURE__ */
|
|
722
|
+
}), yt = /* @__PURE__ */ Q(gt, [["__scopeId", "data-v-578012d6"]]), Dt = {
|
|
722
723
|
mounted(e, t) {
|
|
723
724
|
if (!t.value) return;
|
|
724
725
|
const n = typeof t.value == "string" ? { content: t.value } : t.value, o = v(!1), r = document.createElement("div");
|
|
725
726
|
document.body.appendChild(r);
|
|
726
|
-
const i = v(null), l =
|
|
727
|
+
const i = v(null), l = ee({
|
|
727
728
|
setup() {
|
|
728
729
|
return () => we(
|
|
729
730
|
yt,
|
|
@@ -789,7 +790,7 @@ function _t(e, t) {
|
|
|
789
790
|
n.removeEventListener("input", o);
|
|
790
791
|
}, O(e, t);
|
|
791
792
|
}
|
|
792
|
-
const
|
|
793
|
+
const Bt = {
|
|
793
794
|
mounted: _t,
|
|
794
795
|
updated(e, t) {
|
|
795
796
|
O(e, t);
|
|
@@ -802,15 +803,15 @@ const Dt = {
|
|
|
802
803
|
export {
|
|
803
804
|
dt as B,
|
|
804
805
|
yt as G,
|
|
805
|
-
|
|
806
|
-
|
|
806
|
+
Bt as a,
|
|
807
|
+
Dt as b,
|
|
807
808
|
ot as c,
|
|
808
809
|
ut as d,
|
|
809
810
|
pt as e,
|
|
810
|
-
|
|
811
|
-
|
|
811
|
+
Et as g,
|
|
812
|
+
Lt as l,
|
|
812
813
|
ue as m,
|
|
813
|
-
|
|
814
|
+
Ct as r,
|
|
814
815
|
rt as u,
|
|
815
|
-
|
|
816
|
+
Tt as v
|
|
816
817
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const y=require("./GLoading.vue_vue_type_style_index_0_lang-cokm-HBh.cjs"),o=require("vue"),z=require("./propsFactory-DyyboUaC.cjs"),_=require("@floating-ui/vue"),M=require("./index-DN5ngVtp.cjs"),P="var(--g-gradient-current, var(--g-gradient-main))",ne="135deg";function oe(){return new WeakMap}function K(e){const t=oe();function n(i){const s=t.get(i);if(s){for(const[u,a]of s.targets)ue(u,a);t.delete(i)}}function r(i,s){const u=re(s,e);if(n(i),u.disabled)return;const a=ae(i,u.selector),l={targets:new Map};for(const c of a)l.targets.set(c,le(c)),ce(c,u.gradient);t.set(i,l)}return{mounted(i,s){r(i,s.value)},updated(i,s){r(i,s.value)},unmounted(i){n(i)}}}function re(e,t){if(typeof e=="string")return{gradient:y.resolveGradientValue(e),disabled:!1,selector:t};if(!e)return{gradient:P,disabled:!1,selector:t};const n=ie(e);return{gradient:e.gradient??(n.length?se(n,e.direction):void 0)??y.resolveGradientValue(e.state??e.color)??P,disabled:e.disabled??!1,selector:e.selector??t}}function ie(e){var t;return(t=e.colors)!=null&&t.length?e.colors:[e.from,e.to].filter(n=>!!n)}function se(e,t=ne){const n=e.length===1?[e[0],e[0]]:e;return`linear-gradient(${t}, ${n.map(r=>y.resolveColorValue(r)).join(", ")})`}function ae(e,t){if(!t)return[e];const n=[];return e.matches(t)&&n.push(e),n.push(...Array.from(e.querySelectorAll(t))),n}function le(e){return{backgroundClip:e.style.backgroundClip,backgroundImage:e.style.backgroundImage,color:e.style.color,webkitBackgroundClip:e.style.getPropertyValue("-webkit-background-clip"),webkitTextFillColor:e.style.getPropertyValue("-webkit-text-fill-color")}}function ue(e,t){e.style.backgroundClip=t.backgroundClip,e.style.backgroundImage=t.backgroundImage,e.style.color=t.color,e.style.setProperty("-webkit-background-clip",t.webkitBackgroundClip),e.style.setProperty("-webkit-text-fill-color",t.webkitTextFillColor)}function ce(e,t){e.style.backgroundImage=t,e.style.backgroundClip="text",e.style.color="transparent",e.style.setProperty("-webkit-background-clip","text"),e.style.setProperty("-webkit-text-fill-color","transparent")}const de=K(),fe=K(".mdi");function pe(e){const t=e==null?void 0:e.isVisible;return typeof t=="object"&&t!==null&&"value"in t?!!t.value:!!t}const me={active:!1,text:"Loading...",noText:!1,color:"primary",dark:!1,opacity:void 0,blur:void 0,progressView:"glow"};function ge(e,t={}){const n=typeof e=="object"&&e!==null?e:{},r=typeof e=="boolean"?e:n.active??n.value??!1;return{...me,...n,active:r,dark:n.dark??!!t.dark,noText:n.noText??!!t.noText}}function U(e){return JSON.stringify({text:e.text,noText:e.noText,color:e.color,dark:e.dark,opacity:e.opacity,blur:e.blur,progressView:e.progressView})}function ye(e){return["relative","absolute","fixed","sticky"].includes(getComputedStyle(e).position)}function ve(e){ye(e)||(e.style.position="relative")}function T(e){var n,r;const t=e.__gLoading__;t&&((n=t.app)==null||n.unmount(),(r=t.container)==null||r.remove(),t.app=void 0,t.container=void 0,t.component=void 0,t.optionsKey=void 0,e.style.position=t.originalPosition)}function _e(e){const t=e.__gLoading__;if(t){if(!t.component){T(e);return}t.component.hide()}}function ke(e,t){const n=e.__gLoading__;if(!n)return;ve(e);const r=document.createElement("div");r.className="g-loading__container";const i=o.createApp(y._sfc_main,{text:t.text,noText:t.noText,color:t.color,dark:t.dark,opacity:t.opacity,blur:t.blur,progressView:t.progressView,onClose:()=>{pe(n.component)||T(e)}});n.app=i,n.container=r,n.optionsKey=U(t),e.appendChild(r),n.component=i.mount(r),n.component.show()}function I(e,t,n){var u;const r=e.__gLoading__;if(!r)return;const i=ge(t,n),s=U(i);if(!i.active){_e(e);return}if(r.app&&r.optionsKey===s){(u=r.component)==null||u.show();return}T(e),ke(e,i)}const be={mounted(e,t){e.__gLoading__={originalPosition:e.style.position},I(e,t.value,t.modifiers)},updated(e,t){t.value===t.oldValue&&(typeof t.value!="object"||t.value===null)||I(e,t.value,t.modifiers)},unmounted(e){T(e),delete e.__gLoading__}},b={center:!1,color:"currentcolor",disabled:!1,duration:520,easing:"var(--g-token-easing-standard)",opacity:.16};function W(e){if(typeof e=="boolean")return{...b,disabled:!e};if(typeof e=="string")return{...b,color:y.resolveColorValue(e)};const t=e!=null&&e.color?y.resolveColorValue(e.color):b.color;return{...b,...e,color:t}}function he(e){getComputedStyle(e).position==="static"&&(e.style.position="relative")}function xe(e){return typeof e=="number"?`${e}ms`:e}function we(e){if(typeof e=="number")return e;const t=e.trim();if(t.endsWith("ms"))return Number.parseFloat(t);if(t.endsWith("s"))return Number.parseFloat(t)*1e3;const n=Number.parseFloat(t);return Number.isNaN(n)?Number(b.duration):n}function Ee(e,t,n){const r=e.getBoundingClientRect(),i=Math.hypot(r.width,r.height)*2,s=t.x-r.left-i/2,u=t.y-r.top-i/2,a=document.createElement("span"),l=document.createElement("span");return a.className="g-ripple__container",a.style.setProperty("--g-ripple-color",n.color),a.style.setProperty("--g-ripple-duration",xe(n.duration)),a.style.setProperty("--g-ripple-easing",n.easing),a.style.setProperty("--g-ripple-opacity",String(n.opacity)),l.className="g-ripple__animation",l.style.width=`${i}px`,l.style.height=`${i}px`,l.style.left=`${s}px`,l.style.top=`${u}px`,a.appendChild(l),e.appendChild(a),a}function Te(e,t){var n;t.remove(),(n=e.__gRipple__)==null||n.ripples.delete(t)}function j(e){const t=e.__gRipple__;if(t){for(const n of t.ripples)n.remove();t.ripples.clear()}}function A(e){const t=e.getBoundingClientRect();return{x:t.left+t.width/2,y:t.top+t.height/2}}function Ce(e){return e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"||e.classList.contains("g-button_disabled")}function $(e,t,n){var i;if(n.disabled||Ce(e))return;he(e);const r=Ee(e,t,n);(i=e.__gRipple__)==null||i.ripples.add(r),window.setTimeout(()=>Te(e,r),we(n.duration))}function Le(e,t){if(e.__gRipple__){q(e,t);return}const n=W(t),r={originalPosition:e.style.position,options:n,onKeyDown:i=>{i.key!=="Enter"&&i.key!==" "||$(e,A(e),r.options)},onPointerDown:i=>{i.button!==0||e.hasAttribute("disabled")||$(e,r.options.center?A(e):{x:i.clientX,y:i.clientY},r.options)},ripples:new Set};e.addEventListener("pointerdown",r.onPointerDown),e.addEventListener("keydown",r.onKeyDown),e.__gRipple__=r}function q(e,t){const n=e.__gRipple__;n&&(n.options=W(t),n.options.disabled&&j(e))}function Be(e){const t=e.__gRipple__;t&&(e.removeEventListener("pointerdown",t.onPointerDown),e.removeEventListener("keydown",t.onKeyDown),j(e),e.style.position=t.originalPosition,delete e.__gRipple__)}const Ve={mounted(e,t){Le(e,t.value)},updated(e,t){q(e,t.value)},unmounted(e){Be(e)}},N=z.propsFactory({...y.makeTransitionProps(),modelValue:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},placement:{type:String,default:"bottom"},strategy:{type:String,default:"absolute"},offset:{type:Number,default:8},shift:{type:Boolean,default:!0},flip:{type:Boolean,default:!0},sameWidth:{type:Boolean,default:!1},referenceFullWidth:{type:Boolean,default:!1},appendTo:{type:String,default:""},zIndexBase:{type:Number,default:1e3},disabled:Boolean,content:String,reference:Object}),De=e=>{const t=o.ref(null),n=o.ref(null),r=o.computed(()=>{const c=[];return e.offset&&c.push(_.offset(e.offset)),e.flip&&c.push(_.flip()),e.shift&&c.push(_.shift({padding:4,crossAxis:!0})),e.sameWidth&&c.push(_.size({apply({rects:d,elements:f}){Object.assign(f.floating.style,{width:`${d.reference.width}px`})}})),c}),{x:i,y:s,strategy:u,placement:a,update:l}=_.useFloating(t,n,{...e,middleware:r,whileElementsMounted:_.autoUpdate});return{reference:t,floating:n,x:i,y:s,strategy:u,placement:a,update:l}};function H(e){const t=o.computed(()=>!!e),n=o.computed(()=>e||"body");return{hasAppendTarget:t,appendTarget:n}}function J(e,t){const n=o.computed(()=>e.modelValue!==void 0),r=o.ref(e.defaultOpen??!1);return{open:o.computed({get(){return n.value?e.modelValue??!1:r.value},set(s){n.value||(r.value=s),t("update:modelValue",s)}}),isControlled:n}}function Fe(e){return e instanceof HTMLElement}function Ne(e){return!!e&&typeof e=="object"&&"$el"in e}function O(e){return e?Fe(e)?e:Ne(e)?e.$el:null:null}function Se({open:e,reference:t,floating:n,escapeKey:r=!0,outsideClick:i=!0}){if(!e||!t||!n)throw new Error("useDismiss: open, reference, and floating are required");const s=a=>{if(!i)return;const l=O(t.value),c=O(n.value),d=a.target;l&&c&&!l.contains(d)&&!c.contains(d)&&(e.value=!1)},u=a=>{r&&a.key==="Escape"&&(e.value=!1)};o.onMounted(()=>{document.addEventListener("click",s),document.addEventListener("keydown",u)}),o.onBeforeUnmount(()=>{document.removeEventListener("click",s),document.removeEventListener("keydown",u)})}let Me=0;const g=[],X=o.ref(null);function R(e){const t=g.find(i=>i.id===e);if(!t)return;const r=g.filter(i=>i.kind===t.kind).findIndex(i=>i.id===e);return t.base+r+1}function D(){const e=[...g].reverse().find(t=>t.kind==="overlay"&&t.open.value);X.value=(e==null?void 0:e.id)??null}function G(e){const t=g.findIndex(r=>r.id===e);if(t===-1)return;const[n]=g.splice(t,1);g.push(n),D()}function Y(e){const{open:t,base:n=1e3,kind:r="floating"}=e,i=++Me,s=o.ref();function u(){g.findIndex(m=>m.id===i)===-1?g.push({id:i,kind:r,base:n,open:t}):G(i),s.value=R(i),D()}function a(){const f=g.findIndex(m=>m.id===i);f!==-1&&g.splice(f,1),s.value=void 0,D()}function l(){t.value&&(G(i),s.value=R(i))}const c=o.computed(()=>{var m;return((m=g.filter(v=>v.kind===r).at(-1))==null?void 0:m.id)===i}),d=o.computed(()=>r==="overlay"&&X.value===i);return o.watch(t,f=>{f?u():a()},{immediate:!0}),o.onBeforeUnmount(()=>{a()}),{id:i,zIndex:s,isTop:c,isTopOverlay:d,bringToFront:l}}const Pe=o.defineComponent({__name:"BaseFloating",props:N(),emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=o.toRef(n,"reference"),i=t,{open:s}=J(n,i),{hasAppendTarget:u,appendTarget:a}=H(n.appendTo),l=o.ref(!1),c=o.computed(()=>s.value||l.value),{reference:d,floating:f,x:m,y:v,strategy:C,update:L}=De(n);Se({open:s,reference:d,floating:f});const{zIndex:h}=Y({open:c,base:n.zIndexBase,kind:"floating"}),k=o.computed(()=>({position:C.value,top:v.value!=null?`${v.value}px`:"",left:m.value!=null?`${m.value}px`:"",minWidth:n.sameWidth&&d.value instanceof HTMLElement?`${d.value.offsetWidth}px`:void 0,zIndex:h.value}));function B(p){p&&("$el"in p||p instanceof HTMLElement)?d.value=p:(d.value=n.reference,L())}function x(){l.value=!0}function w(){l.value=!1}function E(){l.value=!1}return o.watch(r,p=>{p&&(d.value=p)},{deep:!0,immediate:!0}),(p,V)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",{class:o.normalizeClass(["base-floating__reference",{"base-floating__reference_full":n.referenceFullWidth}])},[o.renderSlot(p.$slots,"reference",{ref:B},void 0,!0)],2),o.unref(u)?(o.openBlock(),o.createBlock(o.Teleport,{key:0,to:o.unref(a)},[o.createVNode(o.unref(y._sfc_main$1),{transition:n.transition,name:"scale",onBeforeLeave:x,onAfterLeave:w,onLeaveCancelled:E},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",{ref_key:"floating",ref:f,style:o.normalizeStyle(k.value)},[o.renderSlot(p.$slots,"default",{},void 0,!0)],4),[[o.vShow,o.unref(s)]])]),_:3},8,["transition"])],8,["to"])):(o.openBlock(),o.createBlock(o.unref(y._sfc_main$1),{key:1,transition:n.transition,name:"scale",onBeforeLeave:x,onAfterLeave:w,onLeaveCancelled:E},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",{ref_key:"floating",ref:f,style:o.normalizeStyle(k.value)},[o.renderSlot(p.$slots,"default",{},void 0,!0)],4),[[o.vShow,o.unref(s)]])]),_:3},8,["transition"]))],64))}}),Z=y._export_sfc(Pe,[["__scopeId","data-v-d9f4cacd"]]),Ie=z.propsFactory({...N(),openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0}});function Q(e,t){const{click:n,hover:r,focus:i,contextmenu:s,disabled:u=!1}=t;let a=null,l=null;function c(){a&&clearTimeout(a),l&&clearTimeout(l),a=null,l=null}function d(p,V=0){if(c(),V===0){e.value=p;return}const S=window.setTimeout(()=>{e.value=p},V);p?a=S:l=S}const f=typeof r=="object"?r:{},m=f.openDelay??0,v=f.closeDelay??0;function C(){u||!n||(e.value=!e.value)}function L(p){u||!s||(p.preventDefault(),e.value=!0)}function h(){u||!r||d(!0,m)}function k(){r&&d(!1,v)}function B(){u||!i||(e.value=!0)}function x(){i&&(e.value=!1)}o.onBeforeUnmount(c);const w=o.computed(()=>({...n?{onClick:C}:{},...s?{onContextmenu:L}:{},...r?{onMouseenter:h,onMouseleave:k}:{},...i?{onFocus:B,onBlur:x}:{}})),E=o.computed(()=>({...r?{onMouseenter:h,onMouseleave:k}:{}}));return{triggerAttrs:w,floatingAttrs:E}}const Ae={class:"g-tooltip__content"},$e=o.defineComponent({__name:"GTooltip",props:Ie(),setup(e,{expose:t}){const n=e,r=o.ref(!1),i=o.computed(()=>n.transition??{name:"scale-only",scale:.96}),{triggerAttrs:s,floatingAttrs:u}=Q(r,{hover:{openDelay:n.openDelay,closeDelay:n.closeDelay},focus:!0});function a(){r.value=!1}function l(){r.value=!0}return t({hide:a,show:l,open:r}),(c,d)=>(o.openBlock(),o.createBlock(o.unref(Z),o.mergeProps(n,{"model-value":r.value,"onUpdate:modelValue":d[0]||(d[0]=f=>r.value=f),transition:i.value}),o.createSlots({default:o.withCtx(()=>[o.createElementVNode("div",o.mergeProps({class:"g-tooltip"},o.unref(u),{role:"tooltip"}),[d[1]||(d[1]=o.createElementVNode("div",{class:"g-tooltip__underlay"},null,-1)),o.createElementVNode("span",Ae,o.toDisplayString(n.content),1)],16)]),_:2},[c.$slots.default?{name:"reference",fn:o.withCtx(({ref:f})=>[o.createElementVNode("div",o.mergeProps({ref:f,class:"g-tooltip__trigger",tabindex:"0"},o.unref(s)),[o.renderSlot(c.$slots,"default",{},void 0,!0)],16)]),key:"0"}:void 0]),1040,["model-value","transition"]))}}),ee=y._export_sfc($e,[["__scopeId","data-v-578012d6"]]),Oe={mounted(e,t){if(!t.value)return;const n=typeof t.value=="string"?{content:t.value}:t.value,r=o.ref(!1),i=document.createElement("div");document.body.appendChild(i);const s=o.ref(null),u=o.createApp({setup(){return()=>o.h(ee,{...n,reference:e,ref:c=>{c&&(s.value=c)}},{reference:({ref:c})=>(c(e),e)})}});u.mount(i);const a=()=>{s.value&&s.value.show()},l=()=>{s.value&&s.value.hide()};e.addEventListener("mouseenter",a),e.addEventListener("mouseleave",l),e.addEventListener("focus",a),e.addEventListener("blur",l),e.__tooltip__={app:u,container:i,open:r,cleanup(){e.removeEventListener("mouseenter",a),e.removeEventListener("mouseleave",l),e.removeEventListener("focus",a),e.removeEventListener("blur",l),u.unmount(),i.remove()}}},unmounted(e){var t;(t=e.__tooltip__)==null||t.cleanup()}};function Re(e){return typeof e=="string"||Array.isArray(e)||e===void 0?{mask:e}:e}function te(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e:e.querySelector("input, textarea")}function F(e,t){const n=te(e);if(!n)return;const r=Re(t.value),i={...M.defaultMaskTokens,...r.tokens??{}},s=M.applyMask(n.value,r.mask,i);n.value!==s&&(n.value=s)}function Ge(e,t){const n=te(e);if(!n)return;const r=()=>{e._gMaskFormatting||(e._gMaskFormatting=!0,F(e,t),n.dispatchEvent(new Event("input",{bubbles:!0})),e._gMaskFormatting=!1)};n.addEventListener("input",r),e._gMaskCleanup=()=>{n.removeEventListener("input",r)},F(e,t)}const ze={mounted:Ge,updated(e,t){F(e,t)},beforeUnmount(e){var t;(t=e._gMaskCleanup)==null||t.call(e),delete e._gMaskCleanup,delete e._gMaskFormatting}};exports.BaseFloating=Z;exports.GTooltip=ee;exports.gradientIcon=fe;exports.loading=be;exports.makeFloatingProps=N;exports.ripple=Ve;exports.useAppendTarget=H;exports.useControllableOpen=J;exports.useLayerStack=Y;exports.useTriggerFactory=Q;exports.vGradientText=de;exports.vMask=ze;exports.vTooltip=Oe;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function o(n,e){return c=>{const r={};for(const t in n){const i=typeof n[t]=="object"&&n[t]!==null&&!Array.isArray(n[t])?{...n[t]}:{type:n[t]};c&&t in c&&(i.default=c[t]),e&&!i.source&&(i.source=e),r[t]=i}return r}}exports.propsFactory=o;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function f(t, c) {
|
|
2
|
+
return (i) => {
|
|
3
|
+
const o = {};
|
|
4
|
+
for (const n in t) {
|
|
5
|
+
const e = typeof t[n] == "object" && t[n] !== null && !Array.isArray(t[n]) ? { ...t[n] } : { type: t[n] };
|
|
6
|
+
i && n in i && (e.default = i[n]), c && !e.source && (e.source = c), o[n] = e;
|
|
7
|
+
}
|
|
8
|
+
return o;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
f as p
|
|
13
|
+
};
|
package/dist/services.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useSnackbar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useSnackbar-3QuH25xm.cjs");exports.useLoading=e.useLoading;exports.useSnackbar=e.useSnackbar;
|
package/dist/services.mjs
CHANGED