@ithinkdt/ui 4.0.7 → 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.
@@ -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 };
@@ -1,2 +1,2 @@
1
- import { i as e, n as t, r as n, t as r } from "./directives-DXNnV4xc.js";
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 };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { n as e, t } from "./use-i18n-Cmb7Xx7d.js";
1
+ import { n as e, t } from "./use-i18n-D1TTDOML.js";
2
2
  import n, { c as r, cB as i, cE as a, cM as o } from "./use-style.js";
3
- import { i as s, n as c, r as l, t as u } from "./directives-DXNnV4xc.js";
3
+ import { i as s, n as c, r as l, t as u } from "./directives-pwYPe_53.js";
4
4
  import { Fragment as d, computed as f, createVNode as p, defineComponent as m, inject as h, isVNode as g, mergeProps as _, provide as v, reactive as y, ref as b, renderSlot as x, shallowRef as ee, toRef as S, toValue as C, unref as w, useTemplateRef as T, watch as E, withDirectives as D } from "vue";
5
5
  import { computedAsync as te, promiseTimeout as O, useElementHover as k, useElementSize as ne, useEventListener as re, useFullscreen as ie, watchDebounced as ae } from "@vueuse/core";
6
6
  import { NAvatar as A, NBadge as oe, NBreadcrumb as se, NBreadcrumbItem as ce, NButton as j, NDrawer as le, NDrawerContent as M, NDropdown as N, NEmpty as P, NIcon as F, NList as I, NListItem as L, NMenu as R, NPagination as z, NPopover as B, NScrollbar as V, NText as H, NThing as U, useThemeVars as W } from "ithinkdt-ui";
@@ -10,10 +10,11 @@ import { walkTree as fe } from "@ithinkdt/common/tree";
10
10
  import { isNullish as pe } from "@ithinkdt/common/object";
11
11
  import { getOpaqueColor as me } from "@ithinkdt/common/color";
12
12
  import { format as he } from "date-fns";
13
+ //#region src/design/Account.jsx
13
14
  function K(e) {
14
15
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
15
16
  }
16
- const ge = m({
17
+ var ge = /* @__PURE__ */ m({
17
18
  name: "AppAccount",
18
19
  props: {
19
20
  username: String,
@@ -47,76 +48,79 @@ const ge = m({
47
48
  fill: "currentColor",
48
49
  d: "M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2a9.99 9.99 0 0 1 8 4h-2.71a8 8 0 1 0 .001 12h2.71A9.99 9.99 0 0 1 12 22m7-6v-3h-8v-2h8V8l5 4z"
49
50
  }, null)]);
50
- return () => p("div", { style: "display: flex; align-items: center" }, [
51
- p(B, { style: "padding: 4px" }, {
52
- trigger: () => p(j, {
53
- quaternary: !0,
54
- style: "--n-padding: 0 12px"
55
- }, { default: () => [p("div", { style: "display: flex; align-items: center; gap: 8px" }, [p(A, {
56
- key: t.head ? "head" : "no-head",
57
- src: t.head,
58
- round: !0,
59
- size: "small",
60
- radix: .78,
61
- color: "var(--color-primary-hover)"
62
- }, {
63
- fallback: () => o,
64
- placeholder: () => o,
65
- default: t.head ? void 0 : () => i.value
66
- }), p("span", { style: "font-size: 14px" }, [t.username ?? ""])])] }),
67
- default: () => {
68
- let e = () => t.showChangePwd ? p(j, {
69
- quaternary: !0,
70
- style: "justify-content: left",
71
- onClick: () => n("change-pwd")
72
- }, {
73
- icon: () => p(F, null, { default: () => [p("svg", {
74
- xmlns: "http://www.w3.org/2000/svg",
75
- width: "1em",
76
- height: "1em",
77
- viewBox: "0 0 32 32"
78
- }, [p("path", {
79
- fill: "currentColor",
80
- d: "M21 2a8.998 8.998 0 0 0-8.612 11.612L2 24v6h6l10.388-10.388A9 9 0 1 0 21 2m0 16a7 7 0 0 1-2.032-.302l-1.147-.348l-.847.847l-3.181 3.181L12.414 20L11 21.414l1.379 1.379l-1.586 1.586L9.414 23L8 24.414l1.379 1.379L7.172 28H4v-3.172l9.802-9.802l.848-.847l-.348-1.147A7 7 0 1 1 21 18"
81
- }, null), p("circle", {
82
- cx: "22",
83
- cy: "10",
84
- r: "2",
85
- fill: "currentColor"
86
- }, null)])] }),
87
- default: () => a("common.account.changePwd")
88
- }) : void 0, i = () => t.showLogoutButton ? void 0 : p(j, {
51
+ return () => {
52
+ let e;
53
+ return p("div", { style: "display: flex; align-items: center" }, [
54
+ p(B, { style: "padding: 4px" }, {
55
+ trigger: () => p(j, {
89
56
  quaternary: !0,
90
- style: "justify-content: left",
91
- onClick: () => n("logout")
57
+ style: "--n-padding: 0 12px"
58
+ }, { default: () => [p("div", { style: "display: flex; align-items: center; gap: 8px" }, [p(A, {
59
+ key: t.head ? "head" : "no-head",
60
+ src: t.head,
61
+ round: !0,
62
+ size: "small",
63
+ radix: .78,
64
+ color: "var(--color-primary-hover)"
92
65
  }, {
93
- icon: () => p(F, null, K(c) ? c : { default: () => [c] }),
94
- default: () => a("common.account.logout")
95
- });
96
- return r.dropdown ? r.dropdown({
97
- pwd: e,
98
- logout: i
99
- }) : p("div", { style: "display: flex; flex-direction: column" }, [
100
- e(),
101
- r.dropdownExtra?.(),
102
- i()
103
- ]);
104
- }
105
- }),
106
- r.extra?.(),
107
- t.showLogoutButton ? D(p(j, {
108
- quaternary: !0,
109
- style: "--n-padding: 0 12px",
110
- onClick: () => t.username && n("logout")
111
- }, { default: () => [r.logoutButton?.() ?? p(F, { size: "16" }, K(c) ? c : { default: () => [c] })] }), [[
112
- s,
113
- a("common.account.logout"),
114
- void 0,
115
- { "bottom-end": !0 }
116
- ]]) : void 0
117
- ]);
66
+ fallback: () => o,
67
+ placeholder: () => o,
68
+ default: t.head ? void 0 : () => i.value
69
+ }), p("span", { style: "font-size: 14px" }, [t.username ?? ""])])] }),
70
+ default: () => {
71
+ let e = () => t.showChangePwd ? p(j, {
72
+ quaternary: !0,
73
+ style: "justify-content: left",
74
+ onClick: () => n("change-pwd")
75
+ }, {
76
+ icon: () => p(F, null, { default: () => [p("svg", {
77
+ xmlns: "http://www.w3.org/2000/svg",
78
+ width: "1em",
79
+ height: "1em",
80
+ viewBox: "0 0 32 32"
81
+ }, [p("path", {
82
+ fill: "currentColor",
83
+ d: "M21 2a8.998 8.998 0 0 0-8.612 11.612L2 24v6h6l10.388-10.388A9 9 0 1 0 21 2m0 16a7 7 0 0 1-2.032-.302l-1.147-.348l-.847.847l-3.181 3.181L12.414 20L11 21.414l1.379 1.379l-1.586 1.586L9.414 23L8 24.414l1.379 1.379L7.172 28H4v-3.172l9.802-9.802l.848-.847l-.348-1.147A7 7 0 1 1 21 18"
84
+ }, null), p("circle", {
85
+ cx: "22",
86
+ cy: "10",
87
+ r: "2",
88
+ fill: "currentColor"
89
+ }, null)])] }),
90
+ default: () => a("common.account.changePwd")
91
+ }) : void 0, i = () => t.showLogoutButton ? void 0 : p(j, {
92
+ quaternary: !0,
93
+ style: "justify-content: left",
94
+ onClick: () => n("logout")
95
+ }, {
96
+ icon: () => p(F, null, K(c) ? c : { default: () => [c] }),
97
+ default: () => [a("common.account.logout")]
98
+ });
99
+ return x(r, "dropdown", {
100
+ pwd: e,
101
+ logout: i
102
+ }, () => [p("div", { style: "display: flex; flex-direction: column" }, [
103
+ e(),
104
+ x(r, "dropdownExtra"),
105
+ i()
106
+ ])]);
107
+ }
108
+ }),
109
+ x(r, "extra"),
110
+ t.showLogoutButton ? D(p(j, {
111
+ quaternary: !0,
112
+ style: "--n-padding: 0 12px",
113
+ onClick: () => t.username && n("logout")
114
+ }, K(e = x(r, "logoutButton", void 0, () => [p(F, { size: "16" }, K(c) ? c : { default: () => [c] })])) ? e : { default: () => [e] }), [[
115
+ s,
116
+ a("common.account.logout"),
117
+ void 0,
118
+ { "bottom-end": !0 }
119
+ ]]) : void 0
120
+ ]);
121
+ };
118
122
  }
119
- }), _e = m({
123
+ }), _e = /* @__PURE__ */ m({
120
124
  name: "AppAppearance",
121
125
  props: { mode: String },
122
126
  emit: ["update:mode"],
@@ -176,10 +180,12 @@ const ge = m({
176
180
  fill: "currentColor",
177
181
  d: "m17 18l-5-2.18L7 18V5h10m0-2H7a2 2 0 0 0-2 2v16l7-3l7 3V5a2 2 0 0 0-2-2Z"
178
182
  }, null)]), Y = "__APP_CTX__", X = () => h(Y);
183
+ //#endregion
184
+ //#region src/design/Breadcrumb.jsx
179
185
  function ve(e) {
180
186
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
181
187
  }
182
- const ye = m({
188
+ var ye = /* @__PURE__ */ m({
183
189
  name: "AppBreadcrumb",
184
190
  props: {
185
191
  items: {
@@ -208,7 +214,7 @@ const ye = m({
208
214
  }, { default: () => [e.icon ? p(d, null, [p(F, { component: e[r] }, null), " "]) : void 0, C(e.title)] }))) ? n : { default: () => [n] });
209
215
  };
210
216
  }
211
- }), be = m({
217
+ }), be = /* @__PURE__ */ m({
212
218
  name: "AppFullscreen",
213
219
  props: {},
214
220
  emit: ["change"],
@@ -251,7 +257,7 @@ const ye = m({
251
257
  { bottom: !0 }
252
258
  ]]);
253
259
  }
254
- }), xe = m({
260
+ }), xe = /* @__PURE__ */ m({
255
261
  name: "AppLanguage",
256
262
  props: {
257
263
  lang: String,
@@ -282,8 +288,7 @@ const ye = m({
282
288
  "stroke-width": "1.5"
283
289
  }, [p("path", { d: "M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2S2 6.477 2 12Z" }, null), p("path", { d: "M13 2.05S16 6 16 12c0 6-3 9.95-3 9.95m-2 0S8 18 8 12c0-6 3-9.95 3-9.95M2.63 15.5h18.74m-18.74-7h18.74" }, null)])])] })] })] });
284
290
  }
285
- });
286
- var Se = r([
291
+ }), Se = /* @__PURE__ */ r([
287
292
  i("layout", {
288
293
  display: "grid",
289
294
  gridTemplateAreas: "\n 'sider header'\n 'sider content'\n 'sider footer'\n ",
@@ -360,8 +365,7 @@ var Se = r([
360
365
  "stroke-width": "1.5",
361
366
  d: "M12.5 18s6-4.419 6-6s-6-6-6-6m-7 12s6-4.419 6-6s-6-6-6-6",
362
367
  color: "currentColor"
363
- }, null)]);
364
- const Te = m({
368
+ }, null)]), Te = /* @__PURE__ */ m({
365
369
  name: "AppLayout",
366
370
  props: {
367
371
  layout: {
@@ -394,7 +398,7 @@ const Te = m({
394
398
  }, [x(t, "default")]);
395
399
  };
396
400
  }
397
- }), Ee = m({
401
+ }), Ee = /* @__PURE__ */ m({
398
402
  name: "AppHeader",
399
403
  props: { height: {
400
404
  type: Number,
@@ -404,7 +408,7 @@ const Te = m({
404
408
  let n = X();
405
409
  return () => (n.headerHeight = e.height + "px", p("div", { class: "app-header" }, [x(t, "default")]));
406
410
  }
407
- }), De = m({
411
+ }), De = /* @__PURE__ */ m({
408
412
  name: "AppSidebar",
409
413
  props: {
410
414
  showCollapseBtn: {
@@ -433,12 +437,12 @@ const Te = m({
433
437
  }
434
438
  }, { default: () => [p(F, { size: "20" }, { default: () => [t.collapsed ? p(we, null, null) : p(Ce, null, null)] })] }), [[s, t.collapsed ? i("common.layout.sider.expand") : i("common.layout.sider.collapse")]]) : void 0]));
435
439
  }
436
- }), Oe = m({
440
+ }), Oe = /* @__PURE__ */ m({
437
441
  name: "AppContent",
438
442
  setup(e, { slots: t }) {
439
443
  return () => p("div", { class: "app-content" }, [x(t, "default")]);
440
444
  }
441
- }), ke = m({
445
+ }), ke = /* @__PURE__ */ m({
442
446
  name: "AppFooter",
443
447
  props: { height: {
444
448
  type: Number,
@@ -449,10 +453,12 @@ const Te = m({
449
453
  return () => (n.footerHeight = e.height + "px", p("div", { class: "app-footer" }, [x(t, "default")]));
450
454
  }
451
455
  });
452
- function Z(e) {
456
+ //#endregion
457
+ //#region src/design/Logo.jsx
458
+ function Ae(e) {
453
459
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
454
460
  }
455
- const Ae = m({
461
+ var je = /* @__PURE__ */ m({
456
462
  name: "AppLogo",
457
463
  props: {
458
464
  src: [String, Function],
@@ -488,7 +494,7 @@ const Ae = m({
488
494
  justifyContent: o ? "center" : "flex-start",
489
495
  cursor: s ? "pointer" : void 0
490
496
  }
491
- }, [t.default ? t.default() : p("div", {
497
+ }, [x(t, "default", void 0, () => [p("div", {
492
498
  class: "app-logo__img",
493
499
  style: `
494
500
  width: ${a ? "var(--app-sider-width, 60px)" : "56px"};
@@ -498,21 +504,23 @@ const Ae = m({
498
504
  display: flex;
499
505
  justify-content: center
500
506
  `
501
- }, [t.icon ? t.icon() : p("img", {
507
+ }, [x(t, "icon", void 0, () => [p("img", {
502
508
  src: n.value,
503
509
  alt: "App Logo",
504
510
  style: `transition: height 0.2s ease-in-out; height: calc(var(--app-logo-img-size) * ${c})`
505
- }, null)]), i ? p(H, {
511
+ }, null)])])]), i ? p(H, {
506
512
  class: "app-logo__name",
507
513
  style: "font-size: var(--app-logo-name-size); font-weight: bold; white-space: nowrap; flex: 0 1 auto; overflow: hidden"
508
- }, Z(i) ? i : { default: () => [i] }) : ""]);
514
+ }, Ae(i) ? i : { default: () => [i] }) : void 0]);
509
515
  };
510
516
  }
511
517
  });
512
- function Q(e) {
518
+ //#endregion
519
+ //#region src/design/Menu.jsx
520
+ function Z(e) {
513
521
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
514
522
  }
515
- const je = m({
523
+ var Me = /* @__PURE__ */ m({
516
524
  name: "AppMenu",
517
525
  props: {
518
526
  menus: Array,
@@ -569,7 +577,7 @@ const je = m({
569
577
  }, [t.label()]);
570
578
  else {
571
579
  let e;
572
- i = p(de, { to: t.path }, Q(e = t.label()) ? e : { default: () => [e] });
580
+ i = p(de, { to: t.path }, Z(e = t.label()) ? e : { default: () => [e] });
573
581
  }
574
582
  else i = p("span", null, [t.label()]);
575
583
  return i.key = `${t.key}:${r ? 1 : 0}`, t.depth === 0 && !r && (i = D(p("div", null, [i]), [[
@@ -606,11 +614,16 @@ const je = m({
606
614
  collapsedWidth: e.collapsedWidth,
607
615
  width: e.width
608
616
  }, null);
609
- return e.horizontal ? i : p(V, null, Q(i) ? i : { default: () => [i] });
617
+ return e.horizontal ? i : p(V, null, Z(i) ? i : { default: () => [i] });
610
618
  };
611
619
  }
612
620
  });
613
- function Me(t, n, r) {
621
+ //#endregion
622
+ //#region src/design/MultiTabs.jsx
623
+ function Ne(e) {
624
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
625
+ }
626
+ function Pe(t, n, r) {
614
627
  let { t: i } = e(), a = y({
615
628
  visible: !1,
616
629
  x: 0,
@@ -782,7 +795,7 @@ function Me(t, n, r) {
782
795
  }
783
796
  };
784
797
  }
785
- function Ne(e, t, n) {
798
+ function Fe(e, t, n) {
786
799
  function r(n) {
787
800
  if (n === -1 || !t.value?.children.length) return;
788
801
  let r = t.value.children[n];
@@ -800,7 +813,7 @@ function Ne(e, t, n) {
800
813
  content: t
801
814
  };
802
815
  }
803
- var Pe = (e) => p("svg", e, [
816
+ var Q = (e) => p("svg", e, [
804
817
  p("defs", null, [
805
818
  p("symbol", {
806
819
  id: "geometry-left",
@@ -836,7 +849,7 @@ var Pe = (e) => p("svg", e, [
836
849
  height: "36",
837
850
  fill: "currentColor"
838
851
  }, null)])])
839
- ]), Fe = m({
852
+ ]), Ie = /* @__PURE__ */ m({
840
853
  name: "AppTab",
841
854
  props: {
842
855
  path: String,
@@ -875,7 +888,7 @@ var Pe = (e) => p("svg", e, [
875
888
  }, [p("div", {
876
889
  ref: o,
877
890
  style: "display: flex; align-items: center; gap: 4px; width: fit-content"
878
- }, [p("span", { style: l.value }, [n.default?.()]), e.closable !== !1 && (e.isCurrent || i.value) ? p("span", { style: "line-height: 0; display: inline-block; text-align: right; padding-top: 2px" }, [p(j, {
891
+ }, [p("span", { style: l.value }, [x(n, "default")]), e.closable !== !1 && (e.isCurrent || i.value) ? p("span", { style: "line-height: 0; display: inline-block; text-align: right; padding-top: 2px" }, [p(j, {
879
892
  text: !0,
880
893
  onClick: (e) => {
881
894
  e.stopPropagation(), t("close");
@@ -890,11 +903,10 @@ var Pe = (e) => p("svg", e, [
890
903
  d: "m6.4 18.308l-.708-.708l5.6-5.6l-5.6-5.6l.708-.708l5.6 5.6l5.6-5.6l.708.708l-5.6 5.6l5.6 5.6l-.708.708l-5.6-5.6z"
891
904
  }, null)])] })] })]) : void 0])]),
892
905
  p("span", { style: "height: 50%; width: 1px; background: #aaa; display: inline-block; position: absolute; top: 20%; right: -4px; z-index: -3" }, null),
893
- p(Pe, { style: u.value }, null)
906
+ p(Q, { style: u.value }, null)
894
907
  ]);
895
908
  }
896
- });
897
- const Ie = m({
909
+ }), Le = /* @__PURE__ */ m({
898
910
  name: "AppMultiTabs",
899
911
  props: {
900
912
  fullTab: Boolean,
@@ -907,8 +919,8 @@ const Ie = m({
907
919
  setup(e, { emit: t, slots: n }) {
908
920
  let r = X();
909
921
  r.hasMultiTab = !0;
910
- let i = G(), { ctx: a, onCtx: o, onClickOutside: s, options: c, onSelect: l } = Me(S(e, "tabs"), f(() => e.current?.key), () => t("update:fullTab", !e.fullTab)), u = f(() => e.current ? e.tabs.findIndex((t) => t.key === e.current?.key) : -1), d = b(), m = b();
911
- return Ne(d, m, u), () => p("div", { style: "width: 100%; height: 100%; overflow: hidden; display: flex; justify-content: space-between" }, [p("div", {
922
+ let i = G(), { ctx: a, onCtx: o, onClickOutside: s, options: c, onSelect: l } = Pe(S(e, "tabs"), f(() => e.current?.key), () => t("update:fullTab", !e.fullTab)), u = f(() => e.current ? e.tabs.findIndex((t) => t.key === e.current?.key) : -1), d = b(), m = b();
923
+ return Fe(d, m, u), () => p("div", { style: "width: 100%; height: 100%; overflow: hidden; display: flex; justify-content: space-between" }, [p("div", {
912
924
  ref: d,
913
925
  style: "flex: 1 1 100%; height: 100%; display: flex; overflow: hidden; align-items: center; position: relative"
914
926
  }, [
@@ -918,23 +930,23 @@ const Ie = m({
918
930
  style: "padding-inline: 12px; flex: 1 1 auto; display: flex; align-items: end; gap: 8px; height: 100%",
919
931
  onContextmenu: (e) => o(e)
920
932
  }, [e.tabs.map((t, r, a) => {
921
- let s = e.current?.key === t.key, c = t.title ?? t.path;
922
- return p(Fe, {
933
+ let s, c = e.current?.key === t.key, l = t.title ?? t.path;
934
+ return p(Ie, {
923
935
  key: t.key,
924
- isCurrent: s,
936
+ isCurrent: c,
925
937
  isLast: r === a.length - 1,
926
938
  onClose: t.close,
927
939
  closable: t.closable,
928
940
  dark: e.dark,
929
941
  onClick: () => {
930
- s || i.push(t.fullPath);
942
+ c || i.push(t.fullPath);
931
943
  },
932
944
  onContextmenu: (e) => o(e, t)
933
- }, { default: () => [n.name ? n.name({
934
- isCurrent: s,
935
- name: c,
945
+ }, Ne(s = x(n, "name", {
946
+ isCurrent: c,
947
+ name: l,
936
948
  tab: t
937
- }) : c] });
949
+ }, () => [l])) ? s : { default: () => [s] });
938
950
  })]),
939
951
  p("div", { style: "height: 100%; flex: 0 0 16px; z-index: 1; position: sticky; right: 0; backdrop-filter: opacity(0.9) blur(5px)" }, null)
940
952
  ]), p(N, {
@@ -949,10 +961,12 @@ const Ie = m({
949
961
  }, null)]);
950
962
  }
951
963
  });
964
+ //#endregion
965
+ //#region src/design/Notification.jsx
952
966
  function $(e) {
953
967
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !g(e);
954
968
  }
955
- const Le = m({
969
+ var Re = /* @__PURE__ */ m({
956
970
  name: "AppNotification",
957
971
  inheritAttrs: !1,
958
972
  props: {
@@ -987,13 +1001,13 @@ const Le = m({
987
1001
  immediate: !0
988
1002
  });
989
1003
  return () => {
990
- let e = D(p(j, _(r, {
1004
+ let e, f = D(p(j, _(r, {
991
1005
  quaternary: !0,
992
1006
  style: "--n-padding: 0 12px",
993
1007
  onClick: () => {
994
1008
  a.value = !0, o.value = l.unread > 0 ? "unread" : "all", setTimeout(u, 300);
995
1009
  }
996
- }), { default: () => [n.icon ? n.icon() : p(oe, {
1010
+ }), $(e = x(n, "icon", void 0, () => [p(oe, {
997
1011
  show: l.unread > 0,
998
1012
  dot: !0,
999
1013
  offset: [-2, 5],
@@ -1010,12 +1024,12 @@ const Le = m({
1010
1024
  "stroke-linejoin": "round",
1011
1025
  "stroke-width": "1.5",
1012
1026
  color: "currentColor"
1013
- }, [p("path", { d: "M2.53 14.77c-.213 1.394.738 2.361 1.902 2.843c4.463 1.85 10.673 1.85 15.136 0c1.164-.482 2.115-1.45 1.902-2.843c-.13-.857-.777-1.57-1.256-2.267c-.627-.924-.689-1.931-.69-3.003C19.525 5.358 16.157 2 12 2S4.475 5.358 4.475 9.5c0 1.072-.062 2.08-.69 3.003c-.478.697-1.124 1.41-1.255 2.267" }, null), p("path", { d: "M8 19c.458 1.725 2.076 3 4 3c1.925 0 3.541-1.275 4-3" }, null)])])] })] })] }), [[
1027
+ }, [p("path", { d: "M2.53 14.77c-.213 1.394.738 2.361 1.902 2.843c4.463 1.85 10.673 1.85 15.136 0c1.164-.482 2.115-1.45 1.902-2.843c-.13-.857-.777-1.57-1.256-2.267c-.627-.924-.689-1.931-.69-3.003C19.525 5.358 16.157 2 12 2S4.475 5.358 4.475 9.5c0 1.072-.062 2.08-.69 3.003c-.478.697-1.124 1.41-1.255 2.267" }, null), p("path", { d: "M8 19c.458 1.725 2.076 3 4 3c1.925 0 3.541-1.275 4-3" }, null)])])] })] })])) ? e : { default: () => [e] }), [[
1014
1028
  s,
1015
1029
  i("common.notification.tip", { count: l.unread }),
1016
1030
  void 0,
1017
1031
  { bottom: !0 }
1018
- ]]), f = () => {
1032
+ ]]), m = () => {
1019
1033
  let e, t;
1020
1034
  return p("div", { style: "display: flex; align-items: baseline; gap: 20px" }, [
1021
1035
  p("div", { style: "padding-right: 12px" }, [i("common.notification.title")]),
@@ -1034,7 +1048,7 @@ const Le = m({
1034
1048
  }
1035
1049
  }, $(t = i("common.notification.unread", { count: l.unread > 99 ? "99+" : l.unread.toString() })) ? t : { default: () => [t] })
1036
1050
  ]);
1037
- }, m = (e) => p(L, {
1051
+ }, h = (e) => p(L, {
1038
1052
  key: e.key,
1039
1053
  onClick: () => {
1040
1054
  e.status === "unread" && (t.markRead?.([e.key]).then(() => {
@@ -1088,14 +1102,14 @@ const Le = m({
1088
1102
  },
1089
1103
  default: e.content,
1090
1104
  footer: () => p("span", { style: "color: gray" }, [e.hover ? he(e.date, i("common.notification.time")) : i("common.timeago", { time: e.date })])
1091
- })] }), h = () => {
1105
+ })] }), g = () => {
1092
1106
  let e;
1093
1107
  return D(l.records.length > 0 ? p(I, {
1094
1108
  clickable: !0,
1095
1109
  hoverable: !0,
1096
1110
  style: "min-height: 50vh"
1097
- }, $(e = l.records.map((e) => m(e))) ? e : { default: () => [e] }) : p(P, { style: "margin-top: 30vh" }, null), [[c, l.loading]]);
1098
- }, g = () => p("div", { style: "display: flex; justify-content: space-between; width: 100%" }, [o.value === "unread" ? p(j, {
1111
+ }, $(e = l.records.map((e) => h(e))) ? e : { default: () => [e] }) : p(P, { style: "margin-top: 30vh" }, null), [[c, l.loading]]);
1112
+ }, v = () => p("div", { style: "display: flex; justify-content: space-between; width: 100%" }, [o.value === "unread" ? p(j, {
1099
1113
  text: !0,
1100
1114
  type: "primary",
1101
1115
  disabled: l.records.length === 0,
@@ -1126,7 +1140,7 @@ const Le = m({
1126
1140
  l.page = e, u();
1127
1141
  }
1128
1142
  }, null)]);
1129
- return p(d, null, [e, p(le, {
1143
+ return p(d, null, [f, p(le, {
1130
1144
  show: a.value,
1131
1145
  "onUpdate:show": (e) => a.value = e,
1132
1146
  showMask: !1,
@@ -1137,14 +1151,13 @@ const Le = m({
1137
1151
  nativeScrollbar: !1,
1138
1152
  bodyContentStyle: { padding: "0" }
1139
1153
  }, {
1140
- header: f,
1141
- default: h,
1142
- footer: g
1154
+ header: m,
1155
+ default: g,
1156
+ footer: v
1143
1157
  })] })]);
1144
1158
  };
1145
1159
  }
1146
- });
1147
- var Re = (e) => p("svg", _({
1160
+ }), ze = (e) => p("svg", _({
1148
1161
  xmlns: "http://www.w3.org/2000/svg",
1149
1162
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
1150
1163
  role: "img",
@@ -1154,8 +1167,7 @@ var Re = (e) => p("svg", _({
1154
1167
  }, e), [p("path", {
1155
1168
  fill: "currentColor",
1156
1169
  d: "m9.55 18l-5.7-5.7l1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"
1157
- }, null)]);
1158
- const ze = m({
1170
+ }, null)]), Be = /* @__PURE__ */ m({
1159
1171
  name: "AppTenant",
1160
1172
  props: {
1161
1173
  options: Array,
@@ -1167,7 +1179,7 @@ const ze = m({
1167
1179
  round: !0,
1168
1180
  size: 22,
1169
1181
  color: "var(--color-primary-hover)"
1170
- }, { default: () => [e.icon?.() || e.name[0]] }), p("span", { style: e.id === t.current ? "color: var(--color-primary)" : "" }, [e.name])]), e.id === t.current ? p(Re, { style: "color: var(--color-primary); font-size: 20px" }, null) : p("div", null, null)]), a = f(() => [{
1182
+ }, { default: () => [e.icon?.() || e.name[0]] }), p("span", { style: e.id === t.current ? "color: var(--color-primary)" : "" }, [e.name])]), e.id === t.current ? p(ze, { style: "color: var(--color-primary); font-size: 20px" }, null) : p("div", null, null)]), a = f(() => [{
1171
1183
  id: "___",
1172
1184
  name: r("common.account.changeTenant"),
1173
1185
  disabled: !0
@@ -1202,11 +1214,12 @@ const ze = m({
1202
1214
  })] });
1203
1215
  };
1204
1216
  }
1205
- }), Be = m({
1217
+ }), Ve = /* @__PURE__ */ m({
1206
1218
  name: "UIProvider",
1207
1219
  props: { i18n: Function },
1208
1220
  setup(e, { slots: n }) {
1209
- return v(t, S(e, "i18n")), () => n.default();
1221
+ return v(t, S(e, "i18n")), () => x(n, "default");
1210
1222
  }
1211
1223
  });
1212
- export { ge as AppAccount, _e as AppAppearance, ye as AppBreadcrumb, Oe as AppContent, ke as AppFooter, be as AppFullscreen, Ee as AppHeader, xe as AppLanguage, Te as AppLayout, Ae as AppLogo, je as AppMenu, Ie as AppMultiTabs, Le as AppNotification, De as AppSidebar, ze as AppTenant, u as SpinDirectiveProvider, l as TooltipDirectiveProvider, Be as UIProvider, c as vSpin, s as vTooltip };
1224
+ //#endregion
1225
+ export { ge as AppAccount, _e as AppAppearance, ye as AppBreadcrumb, Oe as AppContent, ke as AppFooter, be as AppFullscreen, Ee as AppHeader, xe as AppLanguage, Te as AppLayout, je as AppLogo, Me as AppMenu, Le as AppMultiTabs, Re as AppNotification, De as AppSidebar, Be as AppTenant, u as SpinDirectiveProvider, l as TooltipDirectiveProvider, Ve as UIProvider, c as vSpin, s as vTooltip };