@ithinkdt/ui 4.0.6 → 4.0.8
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/{DataTable-D6hPSWvx.js → DataTable-DEb9CRCZ.js} +6 -5
- package/dist/{assets-_Fpf0gbI.js → assets-bJgPKDh1.js} +3 -1
- package/dist/components.js +185 -173
- package/dist/composables.js +2 -0
- package/dist/{directives-DXNnV4xc.js → directives-pwYPe_53.js} +11 -16
- package/dist/directives.js +1 -1
- package/dist/index.js +155 -141
- package/dist/page.js +184 -183
- package/dist/{use-i18n-Cmb7Xx7d.js → use-i18n-D1TTDOML.js} +3 -1
- package/dist/use-style.js +3 -1
- package/esm/page.d.ts +2 -2
- package/package.json +10 -10
- package/unocss-preset.js +1 -1
package/dist/composables.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { nextTick as e, ref as t, watch as n } from "vue";
|
|
2
2
|
import { unrefElement as r } from "@vueuse/core";
|
|
3
3
|
import { Sortable as i } from "sortablejs";
|
|
4
|
+
//#region src/composables/use-data-table-drag.js
|
|
4
5
|
function a(a, { data: o, onSort: s, ...c }) {
|
|
5
6
|
n([t(o), a], async ([t, n]) => {
|
|
6
7
|
if (t.length === 0) return;
|
|
@@ -22,4 +23,5 @@ function a(a, { data: o, onSort: s, ...c }) {
|
|
|
22
23
|
};
|
|
23
24
|
}, { immediate: !0 });
|
|
24
25
|
}
|
|
26
|
+
//#endregion
|
|
25
27
|
export { a as useDataTableDrag };
|
|
@@ -6,11 +6,12 @@ import { nanoid as v } from "nanoid";
|
|
|
6
6
|
import { debounce as y, throttle as b } from "@ithinkdt/common/fn";
|
|
7
7
|
import { useElementIntersectionRect as x } from "@ithinkdt/common/composables";
|
|
8
8
|
import { string2dom as S } from "@ithinkdt/common/dom";
|
|
9
|
+
//#region src/directives/tooltip.jsx
|
|
9
10
|
var C = [
|
|
10
11
|
2,
|
|
11
12
|
3,
|
|
12
13
|
5
|
|
13
|
-
], w = t([
|
|
14
|
+
], w = /* @__PURE__ */ t([
|
|
14
15
|
t(({ props: e }) => `:where(span${e.bPrefix}tooltip-host)`, { display: "inline-block" }),
|
|
15
16
|
t(({ props: e }) => `:where(${e.bPrefix}tooltip-host)`, {
|
|
16
17
|
maxWidth: "100%",
|
|
@@ -30,7 +31,7 @@ var C = [
|
|
|
30
31
|
whiteSpace: "normal",
|
|
31
32
|
lineHeight: "1.25"
|
|
32
33
|
})
|
|
33
|
-
]), T = Symbol("tooltip-dir"), E = f();
|
|
34
|
+
]), T = /* @__PURE__ */ Symbol("tooltip-dir"), E = /* @__PURE__ */ f();
|
|
34
35
|
function D(e) {
|
|
35
36
|
let t = e.firstChild;
|
|
36
37
|
if (!t) return !1;
|
|
@@ -43,8 +44,7 @@ function D(e) {
|
|
|
43
44
|
};
|
|
44
45
|
return n.width >= e.clientWidth + 1 || n.height >= e.clientHeight + 2;
|
|
45
46
|
}
|
|
46
|
-
var O, k, A
|
|
47
|
-
const j = s({
|
|
47
|
+
var O, k, A, j = /* @__PURE__ */ s({
|
|
48
48
|
name: "TooltipDirectiveProvider",
|
|
49
49
|
props: { delay: {
|
|
50
50
|
type: Number,
|
|
@@ -111,13 +111,11 @@ const j = s({
|
|
|
111
111
|
style: "max-width: 61.8vw; max-height: 61.8vh"
|
|
112
112
|
}, { default: () => [o("div", { class: i }, [n.value?.()])] });
|
|
113
113
|
}
|
|
114
|
-
})
|
|
115
|
-
var M = (e) => {
|
|
114
|
+
}), M = (e) => {
|
|
116
115
|
k = void 0, E.value = e.target, O?.();
|
|
117
116
|
}, N = (e) => {
|
|
118
117
|
e.target.classList.contains(`${A.value}-tooltip-expandable`) ? (e.target.classList.remove(`${A.value}-tooltip-expandable`), e.target.classList.add(`${A.value}-tooltip-expanded`), O()) : e.target.classList.contains(`${A.value}-tooltip-expanded`) && (e.target.classList.remove(`${A.value}-tooltip-expanded`), e.target.classList.add(`${A.value}-tooltip-expandable`), O());
|
|
119
|
-
}
|
|
120
|
-
const P = {
|
|
118
|
+
}, P = {
|
|
121
119
|
mounted(e, t) {
|
|
122
120
|
e[T] = {
|
|
123
121
|
binding: t,
|
|
@@ -135,8 +133,7 @@ const P = {
|
|
|
135
133
|
beforeUnmount(e) {
|
|
136
134
|
E.value === e && (E.value = void 0), e[T] && (e.removeEventListener("mouseenter", M), e.bindClick = !1, e.removeEventListener("click", N), e.classList.remove(`${A.value}-tooltip-host`, `${A.value}-tooltip-expandable`, `${A.value}-tooltip-expanded`, ...C.map((e) => `${A.value}-tooltip-ell${e}`)), delete e[T]);
|
|
137
135
|
}
|
|
138
|
-
}
|
|
139
|
-
var F, I, L = t([t(({ props: e }) => `:where(${e.bPrefix}spin-host)`, { position: "relative" }), n("spin-directive", {
|
|
136
|
+
}, F, I, L = /* @__PURE__ */ t([t(({ props: e }) => `:where(${e.bPrefix}spin-host)`, { position: "relative" }), n("spin-directive", {
|
|
140
137
|
zIndex: "999999",
|
|
141
138
|
position: "absolute",
|
|
142
139
|
color: "var(--color-primary)",
|
|
@@ -156,20 +153,17 @@ var F, I, L = t([t(({ props: e }) => `:where(${e.bPrefix}spin-host)`, { position
|
|
|
156
153
|
}),
|
|
157
154
|
r("tip:empty", { display: "none" }),
|
|
158
155
|
i("spining", { backgroundColor: "rgb(var(--host-bg, 255 255 255) / 0.5)" }, [r("tip, icon", { opacity: "1" })])
|
|
159
|
-
])])
|
|
160
|
-
const R = s({
|
|
156
|
+
])]), R = /* @__PURE__ */ s({
|
|
161
157
|
name: "SpinDirectiveProvider",
|
|
162
158
|
props: { dark: Boolean },
|
|
163
159
|
setup(t) {
|
|
164
160
|
return F = e("-spin-directive", L), I = p(t, "dark"), () => c(a);
|
|
165
161
|
}
|
|
166
|
-
})
|
|
167
|
-
var z = Symbol("spin-dir"), B = (e, { value: t, modifiers: n }) => {
|
|
162
|
+
}), z = /* @__PURE__ */ Symbol("spin-dir"), B = (e, { value: t, modifiers: n }) => {
|
|
168
163
|
if (e[z].loading.value = !!t, !e[z].loading.value) return;
|
|
169
164
|
let r = n.dark || !n.light && I.value;
|
|
170
165
|
e[z].spinEl.style.setProperty("--host-bg", r ? "0 0 0" : "255 255 255");
|
|
171
|
-
}
|
|
172
|
-
const V = {
|
|
166
|
+
}, V = {
|
|
173
167
|
beforeMount(e) {
|
|
174
168
|
if (e.classList.add(`${F.value}-spin-host`), e[z]) return;
|
|
175
169
|
let t = d(!1), n = S(`
|
|
@@ -237,4 +231,5 @@ const V = {
|
|
|
237
231
|
e[z] && (e[z].loading.value = !1, e[z].stop(), e[z].observer?.disconnect(), delete e[z]);
|
|
238
232
|
}
|
|
239
233
|
};
|
|
234
|
+
//#endregion
|
|
240
235
|
export { P as i, V as n, j as r, R as t };
|
package/dist/directives.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "./directives-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./directives-pwYPe_53.js";
|
|
2
2
|
export { r as SpinDirectiveProvider, n as TooltipDirectiveProvider, t as vSpin, e as vTooltip };
|