little-dizzy 2.2.0 → 2.3.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.
@@ -1,23 +1,23 @@
1
- import { createElementBlock as a, openBlock as n, normalizeClass as m, renderSlot as r, createCommentVNode as i, createElementVNode as e, toDisplayString as f, createTextVNode as v } from "vue";
2
- const d = (t, o) => {
3
- const s = t.__vccOpts || t;
4
- for (const [l, c] of o)
5
- s[l] = c;
1
+ import { createElementBlock as l, openBlock as a, normalizeClass as y, renderSlot as u, createCommentVNode as m, createElementVNode as o, toDisplayString as w, normalizeStyle as M, ref as k, createBlock as $, Teleport as S, createVNode as L, TransitionGroup as I, withCtx as E, Fragment as T, renderList as V, createTextVNode as j, createStaticVNode as O } from "vue";
2
+ const g = (e, t) => {
3
+ const s = e.__vccOpts || e;
4
+ for (const [i, d] of t)
5
+ s[i] = d;
6
6
  return s;
7
- }, g = ["disabled"], B = {
7
+ }, A = ["disabled"], N = {
8
8
  __name: "Button",
9
9
  props: {
10
10
  // 按钮类型
11
11
  type: {
12
12
  type: String,
13
13
  default: "primary",
14
- validator: (t) => ["primary", "success", "warning", "danger", "info", "secondary"].includes(t)
14
+ validator: (e) => ["primary", "success", "warning", "danger", "info", "secondary"].includes(e)
15
15
  },
16
16
  // 按钮尺寸
17
17
  size: {
18
18
  type: String,
19
19
  default: "medium",
20
- validator: (t) => ["small", "medium", "large"].includes(t)
20
+ validator: (e) => ["small", "medium", "large"].includes(e)
21
21
  },
22
22
  // 是否为块级按钮
23
23
  block: {
@@ -31,30 +31,30 @@ const d = (t, o) => {
31
31
  }
32
32
  },
33
33
  emits: ["click"],
34
- setup(t, { emit: o }) {
35
- return (s, l) => (n(), a("button", {
36
- class: m(["btn", [
37
- `btn-${t.type}`,
38
- `btn-${t.size}`,
39
- { "btn-block": t.block },
40
- { "btn-disabled": t.disabled }
34
+ setup(e, { emit: t }) {
35
+ return (s, i) => (a(), l("button", {
36
+ class: y(["btn", [
37
+ `btn-${e.type}`,
38
+ `btn-${e.size}`,
39
+ { "btn-block": e.block },
40
+ { "btn-disabled": e.disabled }
41
41
  ]]),
42
- disabled: t.disabled,
43
- onClick: l[0] || (l[0] = (c) => s.$emit("click", c))
42
+ disabled: e.disabled,
43
+ onClick: i[0] || (i[0] = (d) => s.$emit("click", d))
44
44
  }, [
45
- r(s.$slots, "default", {}, void 0, !0)
46
- ], 10, g));
45
+ u(s.$slots, "default", {}, void 0, !0)
46
+ ], 10, A));
47
47
  }
48
- }, $ = /* @__PURE__ */ d(B, [["__scopeId", "data-v-75f082b2"]]), z = {
48
+ }, H = /* @__PURE__ */ g(N, [["__scopeId", "data-v-75f082b2"]]), F = {
49
49
  key: 0,
50
50
  class: "card-header"
51
- }, k = {
51
+ }, Y = {
52
52
  key: 0,
53
53
  class: "card-header-title"
54
- }, w = { class: "card-body" }, C = {
54
+ }, D = { class: "card-body" }, G = {
55
55
  key: 1,
56
56
  class: "card-footer"
57
- }, S = {
57
+ }, R = {
58
58
  __name: "Card",
59
59
  props: {
60
60
  // 卡片标题
@@ -68,32 +68,32 @@ const d = (t, o) => {
68
68
  default: !0
69
69
  }
70
70
  },
71
- setup(t) {
72
- return (o, s) => (n(), a("div", {
73
- class: m(["card", { "card-shadow": t.shadow }])
71
+ setup(e) {
72
+ return (t, s) => (a(), l("div", {
73
+ class: y(["card", { "card-shadow": e.shadow }])
74
74
  }, [
75
- o.$slots.header || t.title ? (n(), a("div", z, [
76
- t.title ? (n(), a("h3", k, f(t.title), 1)) : i("", !0),
77
- r(o.$slots, "header", {}, void 0, !0)
78
- ])) : i("", !0),
79
- e("div", w, [
80
- r(o.$slots, "default", {}, void 0, !0)
75
+ t.$slots.header || e.title ? (a(), l("div", F, [
76
+ e.title ? (a(), l("h3", Y, w(e.title), 1)) : m("", !0),
77
+ u(t.$slots, "header", {}, void 0, !0)
78
+ ])) : m("", !0),
79
+ o("div", D, [
80
+ u(t.$slots, "default", {}, void 0, !0)
81
81
  ]),
82
- o.$slots.footer ? (n(), a("div", C, [
83
- r(o.$slots, "footer", {}, void 0, !0)
84
- ])) : i("", !0)
82
+ t.$slots.footer ? (a(), l("div", G, [
83
+ u(t.$slots, "footer", {}, void 0, !0)
84
+ ])) : m("", !0)
85
85
  ], 2));
86
86
  }
87
- }, M = /* @__PURE__ */ d(S, [["__scopeId", "data-v-2d83e63a"]]), L = { class: "modal-dialog" }, x = { class: "modal-content" }, E = { class: "modal-header" }, I = {
87
+ }, U = /* @__PURE__ */ g(R, [["__scopeId", "data-v-2d83e63a"]]), W = { class: "modal-dialog" }, q = { class: "modal-header" }, P = {
88
88
  key: 0,
89
89
  class: "modal-header-title"
90
- }, O = { class: "modal-body" }, j = {
90
+ }, X = { class: "modal-body" }, J = {
91
91
  key: 0,
92
92
  class: "modal-footer"
93
- }, D = {
93
+ }, K = {
94
94
  key: 1,
95
95
  class: "modal-footer"
96
- }, N = {
96
+ }, Q = {
97
97
  __name: "Modal",
98
98
  props: {
99
99
  // 是否显示模态框
@@ -106,6 +106,10 @@ const d = (t, o) => {
106
106
  type: String,
107
107
  default: ""
108
108
  },
109
+ width: {
110
+ type: String,
111
+ default: "500px"
112
+ },
109
113
  // 是否显示默认底部按钮
110
114
  showFooter: {
111
115
  type: Boolean,
@@ -113,75 +117,297 @@ const d = (t, o) => {
113
117
  }
114
118
  },
115
119
  emits: ["close", "cancel", "confirm"],
116
- setup(t, { emit: o }) {
117
- const s = o, l = () => {
120
+ setup(e, { emit: t }) {
121
+ const s = t, i = () => {
118
122
  s("close");
119
- }, c = () => {
123
+ }, d = () => {
120
124
  s("cancel");
121
- }, b = () => {
125
+ }, f = () => {
122
126
  s("confirm");
123
127
  };
124
- return (u, Y) => t.visible ? (n(), a("div", {
128
+ return (c, h) => e.visible ? (a(), l("div", {
125
129
  key: 0,
126
- class: m(["modal", { "modal-show": t.visible }])
130
+ class: y(["modal", { "modal-show": e.visible }])
127
131
  }, [
128
- e("div", L, [
129
- e("div", x, [
130
- e("div", E, [
131
- t.title ? (n(), a("h3", I, f(t.title), 1)) : i("", !0),
132
- e("button", {
132
+ o("div", W, [
133
+ o("div", {
134
+ class: "modal-content",
135
+ style: M({ width: e.width })
136
+ }, [
137
+ o("div", q, [
138
+ e.title ? (a(), l("h3", P, w(e.title), 1)) : m("", !0),
139
+ o("button", {
133
140
  class: "modal-header-close",
134
- onClick: l
141
+ onClick: i
135
142
  }, "×")
136
143
  ]),
137
- e("div", O, [
138
- r(u.$slots, "default", {}, void 0, !0)
144
+ o("div", X, [
145
+ u(c.$slots, "default", {}, void 0, !0)
139
146
  ]),
140
- u.$slots.footer ? (n(), a("div", j, [
141
- r(u.$slots, "footer", {}, void 0, !0)
142
- ])) : t.showFooter ? (n(), a("div", D, [
143
- e("button", {
147
+ c.$slots.footer ? (a(), l("div", J, [
148
+ u(c.$slots, "footer", {}, void 0, !0)
149
+ ])) : e.showFooter ? (a(), l("div", K, [
150
+ o("button", {
144
151
  class: "btn btn-secondary",
145
- onClick: c
152
+ onClick: d
146
153
  }, "取消"),
147
- e("button", {
154
+ o("button", {
148
155
  class: "btn btn-primary",
149
- onClick: b
156
+ onClick: f
150
157
  }, "确定")
151
- ])) : i("", !0)
152
- ])
158
+ ])) : m("", !0)
159
+ ], 4)
153
160
  ])
154
- ], 2)) : i("", !0);
161
+ ], 2)) : m("", !0);
162
+ }
163
+ }, Z = /* @__PURE__ */ g(Q, [["__scopeId", "data-v-39af2dcd"]]), ee = ["innerHTML"], te = { class: "text-sm font-medium" }, se = ["onClick"], oe = /* @__PURE__ */ Object.assign({
164
+ name: "Message"
165
+ }, {
166
+ __name: "Message",
167
+ setup(e, { expose: t }) {
168
+ const s = k([]), i = {
169
+ success: "bg-emerald-500/95 text-white",
170
+ warning: "bg-amber-500/95 text-white",
171
+ error: "bg-rose-500/95 text-white",
172
+ info: "bg-sky-500/95 text-white"
173
+ }, d = {
174
+ success: `<svg class="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
175
+ <path d="M20 6L9 17l-5-5" stroke-linecap="round" stroke-linejoin="round"/>
176
+ </svg>`,
177
+ warning: `<svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor">
178
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>
179
+ </svg>`,
180
+ error: `<svg class="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
181
+ <circle cx="12" cy="12" r="10"/>
182
+ <path d="M15 9l-6 6M9 9l6 6" stroke-linecap="round"/>
183
+ </svg>`,
184
+ info: `<svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor">
185
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>
186
+ </svg>`
187
+ };
188
+ let f = 0;
189
+ const c = (r) => {
190
+ const n = ++f, p = {
191
+ id: n,
192
+ type: r.type || "info",
193
+ content: r.content || "",
194
+ duration: r.duration ?? 3e3,
195
+ closable: r.closable ?? !1
196
+ };
197
+ return s.value.push(p), p.duration > 0 && setTimeout(() => {
198
+ h(n);
199
+ }, p.duration), n;
200
+ }, h = (r) => {
201
+ const n = s.value.findIndex((p) => p.id === r);
202
+ n > -1 && s.value.splice(n, 1);
203
+ };
204
+ return t({
205
+ addMessage: c,
206
+ removeMessage: h,
207
+ clearAll: () => {
208
+ s.value = [];
209
+ },
210
+ // Shorthand methods
211
+ success: (r, n = {}) => c({ ...n, type: "success", content: r }),
212
+ warning: (r, n = {}) => c({ ...n, type: "warning", content: r }),
213
+ error: (r, n = {}) => c({ ...n, type: "error", content: r }),
214
+ info: (r, n = {}) => c({ ...n, type: "info", content: r })
215
+ }), (r, n) => (a(), $(S, { to: "body" }, [
216
+ L(I, {
217
+ name: "message",
218
+ tag: "div",
219
+ class: "fixed top-4 left-1/2 -translate-x-1/2 z-[9999] flex flex-col items-center gap-3 pointer-events-none"
220
+ }, {
221
+ default: E(() => [
222
+ (a(!0), l(T, null, V(s.value, (p) => (a(), l("div", {
223
+ key: p.id,
224
+ class: y(["pointer-events-auto flex items-center gap-3 px-5 py-3 rounded-lg shadow-lg backdrop-blur-sm transition-all duration-300", i[p.type]])
225
+ }, [
226
+ o("span", {
227
+ class: "flex-shrink-0",
228
+ innerHTML: d[p.type]
229
+ }, null, 8, ee),
230
+ o("span", te, w(p.content), 1),
231
+ p.closable ? (a(), l("button", {
232
+ key: 0,
233
+ onClick: (Me) => h(p.id),
234
+ class: "flex-shrink-0 ml-2 p-1 rounded-full hover:bg-black/10 transition-colors"
235
+ }, [...n[0] || (n[0] = [
236
+ o("svg", {
237
+ class: "w-4 h-4",
238
+ viewBox: "0 0 24 24",
239
+ fill: "none",
240
+ stroke: "currentColor",
241
+ "stroke-width": "2"
242
+ }, [
243
+ o("path", { d: "M18 6L6 18M6 6l12 12" })
244
+ ], -1)
245
+ ])], 8, se)) : m("", !0)
246
+ ], 2))), 128))
247
+ ]),
248
+ _: 1
249
+ })
250
+ ]));
155
251
  }
156
- }, V = /* @__PURE__ */ d(N, [["__scopeId", "data-v-c66cec30"]]), A = { class: "lzbutton-wrapper" }, F = /* @__PURE__ */ Object.assign({
252
+ }), ne = /* @__PURE__ */ g(oe, [["__scopeId", "data-v-d727fd6c"]]);
253
+ k([]);
254
+ let ae = 0;
255
+ const re = (e) => {
256
+ const t = ++ae, s = e.type || "info", i = e.content || "", d = e.duration ?? 3e3, f = e.closable ?? !1, c = document.createElement("div");
257
+ c.className = `ld-message ld-message--${s}`, c.setAttribute("data-id", t);
258
+ let b = `${{
259
+ success: `<svg class="ld-message-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
260
+ <path d="M20 6L9 17l-5-5" stroke-linecap="round" stroke-linejoin="round"/>
261
+ </svg>`,
262
+ warning: `<svg class="ld-message-icon" viewBox="0 0 24 24" fill="currentColor">
263
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>
264
+ </svg>`,
265
+ error: `<svg class="ld-message-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
266
+ <circle cx="12" cy="12" r="10"/>
267
+ <path d="M15 9l-6 6M9 9l6 6" stroke-linecap="round"/>
268
+ </svg>`,
269
+ info: `<svg class="ld-message-icon" viewBox="0 0 24 24" fill="currentColor">
270
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>
271
+ </svg>`
272
+ }[s]}<span class="ld-message-content">${i}</span>`;
273
+ return f && (b += `<button class="ld-message-close" onclick="window.__ldMessageClose(${t})">
274
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
275
+ <path d="M18 6L6 18M6 6l12 12"/>
276
+ </svg>
277
+ </button>`), c.innerHTML = b, { id: t, element: c, duration: d };
278
+ }, le = () => {
279
+ let e = document.getElementById("ld-message-root");
280
+ if (!e) {
281
+ e = document.createElement("div"), e.id = "ld-message-root", document.body.appendChild(e);
282
+ const t = document.createElement("style");
283
+ t.textContent = `
284
+ #ld-message-root {
285
+ position: fixed;
286
+ top: 16px;
287
+ left: 50%;
288
+ transform: translateX(-50%);
289
+ z-index: 9999;
290
+ display: flex;
291
+ flex-direction: column;
292
+ align-items: center;
293
+ gap: 12px;
294
+ pointer-events: none;
295
+ }
296
+ .ld-message {
297
+ pointer-events: auto;
298
+ display: flex;
299
+ align-items: center;
300
+ gap: 12px;
301
+ padding: 12px 20px;
302
+ border-radius: 8px;
303
+ box-shadow: 0 4px 12px rgba(0,0,0,0.15);
304
+ backdrop-filter: blur(8px);
305
+ animation: ldMessageIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
306
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
307
+ font-size: 14px;
308
+ font-weight: 500;
309
+ }
310
+ .ld-message.ld-message--closing {
311
+ animation: ldMessageOut 0.2s ease-in forwards;
312
+ }
313
+ .ld-message--success { background: rgba(16, 185, 129, 0.95); color: white; }
314
+ .ld-message--warning { background: rgba(245, 158, 11, 0.95); color: white; }
315
+ .ld-message--error { background: rgba(239, 68, 68, 0.95); color: white; }
316
+ .ld-message--info { background: rgba(14, 165, 233, 0.95); color: white; }
317
+ .ld-message-icon { width: 20px; height: 20px; flex-shrink: 0; }
318
+ .ld-message-content { white-space: nowrap; }
319
+ .ld-message-close {
320
+ display: flex;
321
+ align-items: center;
322
+ justify-content: center;
323
+ width: 20px;
324
+ height: 20px;
325
+ margin-left: 4px;
326
+ padding: 0;
327
+ border: none;
328
+ background: transparent;
329
+ color: currentColor;
330
+ cursor: pointer;
331
+ border-radius: 50%;
332
+ transition: background 0.2s;
333
+ }
334
+ .ld-message-close:hover { background: rgba(255,255,255,0.2); }
335
+ .ld-message-close svg { width: 14px; height: 14px; }
336
+ @keyframes ldMessageIn {
337
+ from { opacity: 0; transform: translateY(-20px) scale(0.9); }
338
+ to { opacity: 1; transform: translateY(0) scale(1); }
339
+ }
340
+ @keyframes ldMessageOut {
341
+ from { opacity: 1; transform: translateY(0) scale(1); }
342
+ to { opacity: 0; transform: translateY(-10px) scale(0.95); }
343
+ }
344
+ `, document.head.appendChild(t);
345
+ }
346
+ return e;
347
+ }, _ = (e) => {
348
+ const t = document.getElementById("ld-message-root");
349
+ if (!t) return;
350
+ const s = t.querySelector(`[data-id="${e}"]`);
351
+ s && (s.classList.add("ld-message--closing"), setTimeout(() => {
352
+ s.remove();
353
+ }, 200));
354
+ };
355
+ typeof window < "u" && (window.__ldMessageClose = _);
356
+ const v = (e) => {
357
+ const t = le(), { id: s, element: i, duration: d } = re(e);
358
+ return t.appendChild(i), d > 0 && setTimeout(() => {
359
+ _(s);
360
+ }, d), s;
361
+ }, Se = {
362
+ success: (e, t = {}) => v({ ...t, type: "success", content: e }),
363
+ warning: (e, t = {}) => v({ ...t, type: "warning", content: e }),
364
+ error: (e, t = {}) => v({ ...t, type: "error", content: e }),
365
+ info: (e, t = {}) => v({ ...t, type: "info", content: e }),
366
+ close: _,
367
+ closeAll: () => {
368
+ const e = document.getElementById("ld-message-root");
369
+ e && (e.innerHTML = "");
370
+ }
371
+ }, ie = { class: "lzbutton-wrapper" }, ce = { class: "button" }, de = /* @__PURE__ */ Object.assign({
157
372
  name: "Lzbutton"
158
373
  }, {
159
374
  __name: "lzbutton",
160
- setup(t) {
161
- return (o, s) => (n(), a("div", A, [...s[0] || (s[0] = [
162
- e("button", { class: "button" }, [
163
- e("svg", {
375
+ setup(e) {
376
+ return (t, s) => (a(), l("div", ie, [
377
+ o("button", ce, [
378
+ s[1] || (s[1] = o("svg", {
164
379
  xmlns: "http://www.w3.org/2000/svg",
165
380
  viewBox: "0 0 36 24"
166
381
  }, [
167
- e("path", { d: "m18 0 8 12 10-8-4 20H4L0 4l10 8 8-12z" })
168
- ]),
169
- v(" Unlock Pro ")
170
- ], -1)
382
+ o("path", { d: "m18 0 8 12 10-8-4 20H4L0 4l10 8 8-12z" })
383
+ ], -1)),
384
+ u(t.$slots, "default", {}, () => [
385
+ s[0] || (s[0] = j("Unlock Pro", -1))
386
+ ], !0)
387
+ ])
388
+ ]));
389
+ }
390
+ }), pe = /* @__PURE__ */ g(de, [["__scopeId", "data-v-7124b716"]]), ue = { class: "Lztext-wrapper" }, me = /* @__PURE__ */ Object.assign({
391
+ name: "Lztext"
392
+ }, {
393
+ __name: "Lztext",
394
+ setup(e) {
395
+ return (t, s) => (a(), l("div", ue, [...s[0] || (s[0] = [
396
+ O('<div class="loader-wrapper" data-v-f22456dd><span class="loader-letter" data-v-f22456dd>G</span><span class="loader-letter" data-v-f22456dd>e</span><span class="loader-letter" data-v-f22456dd>n</span><span class="loader-letter" data-v-f22456dd>e</span><span class="loader-letter" data-v-f22456dd>r</span><span class="loader-letter" data-v-f22456dd>a</span><span class="loader-letter" data-v-f22456dd>t</span><span class="loader-letter" data-v-f22456dd>i</span><span class="loader-letter" data-v-f22456dd>n</span><span class="loader-letter" data-v-f22456dd>g</span><div class="loader" data-v-f22456dd></div></div>', 1)
171
397
  ])]));
172
398
  }
173
- }), H = /* @__PURE__ */ d(F, [["__scopeId", "data-v-c2498af3"]]), P = { class: "lztheme-wrapper" }, R = /* @__PURE__ */ Object.assign({
399
+ }), ge = /* @__PURE__ */ g(me, [["__scopeId", "data-v-f22456dd"]]), fe = { class: "lztheme-wrapper" }, he = /* @__PURE__ */ Object.assign({
174
400
  name: "Lztheme"
175
401
  }, {
176
402
  __name: "lztheme",
177
- setup(t) {
178
- return (o, s) => (n(), a("div", P, [...s[0] || (s[0] = [
179
- e("label", {
403
+ setup(e) {
404
+ return (t, s) => (a(), l("div", fe, [...s[0] || (s[0] = [
405
+ o("label", {
180
406
  for: "theme",
181
407
  class: "theme"
182
408
  }, [
183
- e("span", { class: "theme__toggle-wrap" }, [
184
- e("input", {
409
+ o("span", { class: "theme__toggle-wrap" }, [
410
+ o("input", {
185
411
  id: "theme",
186
412
  class: "theme__toggle",
187
413
  type: "checkbox",
@@ -189,26 +415,27 @@ const d = (t, o) => {
189
415
  name: "theme",
190
416
  value: "dark"
191
417
  }),
192
- e("span", { class: "theme__fill" }),
193
- e("span", { class: "theme__icon" }, [
194
- e("span", { class: "theme__icon-part" }),
195
- e("span", { class: "theme__icon-part" }),
196
- e("span", { class: "theme__icon-part" }),
197
- e("span", { class: "theme__icon-part" }),
198
- e("span", { class: "theme__icon-part" }),
199
- e("span", { class: "theme__icon-part" }),
200
- e("span", { class: "theme__icon-part" }),
201
- e("span", { class: "theme__icon-part" }),
202
- e("span", { class: "theme__icon-part" })
418
+ o("span", { class: "theme__fill" }),
419
+ o("span", { class: "theme__icon" }, [
420
+ o("span", { class: "theme__icon-part" }),
421
+ o("span", { class: "theme__icon-part" }),
422
+ o("span", { class: "theme__icon-part" }),
423
+ o("span", { class: "theme__icon-part" }),
424
+ o("span", { class: "theme__icon-part" }),
425
+ o("span", { class: "theme__icon-part" }),
426
+ o("span", { class: "theme__icon-part" }),
427
+ o("span", { class: "theme__icon-part" }),
428
+ o("span", { class: "theme__icon-part" })
203
429
  ])
204
430
  ])
205
431
  ], -1)
206
432
  ])]));
207
433
  }
208
- }), T = /* @__PURE__ */ d(R, [["__scopeId", "data-v-0b85d094"]]), U = {
209
- Lzbutton: H,
210
- Lztheme: T
211
- }, q = {
434
+ }), ve = /* @__PURE__ */ g(he, [["__scopeId", "data-v-0b85d094"]]), ye = {
435
+ Lzbutton: pe,
436
+ Lztext: ge,
437
+ Lztheme: ve
438
+ }, be = {
212
439
  name: "Button",
213
440
  type: "vue",
214
441
  label: "Button 按钮",
@@ -222,7 +449,7 @@ const d = (t, o) => {
222
449
  <script setup>
223
450
  import { Button } from 'little-dizzy'
224
451
  <\/script>`
225
- }, G = {
452
+ }, we = {
226
453
  name: "Card",
227
454
  type: "vue",
228
455
  label: "Card 卡片",
@@ -242,7 +469,7 @@ import { Button } from 'little-dizzy'
242
469
  <script setup>
243
470
  import { Card, Button } from 'little-dizzy'
244
471
  <\/script>`
245
- }, J = {
472
+ }, _e = {
246
473
  name: "Modal",
247
474
  type: "vue",
248
475
  label: "Modal 模态框",
@@ -267,62 +494,107 @@ import { Modal, Button } from 'little-dizzy'
267
494
 
268
495
  const visible = ref(false)
269
496
  <\/script>`
270
- }, K = [
271
- q,
272
- G,
273
- J
274
- ], p = /* @__PURE__ */ new Map();
275
- function _(t) {
276
- return !t || !t.name ? (console.warn("[LittleDizzy] Snippet must have a name property"), !1) : (p.set(t.name, {
277
- name: t.name,
278
- type: t.type || "html",
279
- label: t.label || t.name,
280
- code: t.code || "",
281
- isCustom: t.isCustom || !1,
282
- ...t
497
+ }, xe = {
498
+ name: "Message",
499
+ type: "vue",
500
+ label: "Message 消息提示",
501
+ code: `<template>
502
+ <div class="message-demo">
503
+ <Button type="success" @click="showSuccess">成功提示</Button>
504
+ <Button type="warning" @click="showWarning">警告提示</Button>
505
+ <Button type="danger" @click="showError">错误提示</Button>
506
+ <Button type="info" @click="showInfo">信息提示</Button>
507
+ </div>
508
+ </template>
509
+
510
+ <script setup>
511
+ import { Button, message } from 'little-dizzy'
512
+
513
+ const showSuccess = () => {
514
+ message.success('操作成功!')
515
+ }
516
+
517
+ const showWarning = () => {
518
+ message.warning('请注意!')
519
+ }
520
+
521
+ const showError = () => {
522
+ message.error('操作失败!')
523
+ }
524
+
525
+ const showInfo = () => {
526
+ message.info('这是一条提示信息', { duration: 5000, closable: true })
527
+ }
528
+ <\/script>
529
+
530
+ <style scoped>
531
+ .message-demo {
532
+ display: flex;
533
+ gap: 12px;
534
+ flex-wrap: wrap;
535
+ }
536
+ </style>`
537
+ }, ke = [
538
+ be,
539
+ we,
540
+ _e,
541
+ xe
542
+ ], x = /* @__PURE__ */ new Map();
543
+ function B(e) {
544
+ return !e || !e.name ? (console.warn("[LittleDizzy] Snippet must have a name property"), !1) : (x.set(e.name, {
545
+ name: e.name,
546
+ type: e.type || "html",
547
+ label: e.label || e.name,
548
+ code: e.code || "",
549
+ isCustom: e.isCustom || !1,
550
+ ...e
283
551
  }), !0);
284
552
  }
285
- function h(t) {
286
- if (!Array.isArray(t))
553
+ function z(e) {
554
+ if (!Array.isArray(e))
287
555
  return console.warn("[LittleDizzy] registerSnippets expects an array"), 0;
288
- let o = 0;
289
- return t.forEach((s) => {
290
- _(s) && o++;
291
- }), o;
292
- }
293
- function Q() {
294
- const t = {};
295
- return p.forEach((o, s) => {
296
- t[s] = o;
556
+ let t = 0;
557
+ return e.forEach((s) => {
558
+ B(s) && t++;
297
559
  }), t;
298
560
  }
299
- function W(t) {
300
- return p.get(t);
561
+ function Be() {
562
+ const e = {};
563
+ return x.forEach((t, s) => {
564
+ e[s] = t;
565
+ }), e;
566
+ }
567
+ function ze(e) {
568
+ return x.get(e);
301
569
  }
302
- h(K);
303
- const y = {
304
- Button: $,
305
- Card: M,
306
- Modal: V,
307
- ...U
308
- }, X = (t, o = {}) => {
309
- Object.entries(y).forEach(([s, l]) => {
310
- t.component(o.prefix ? `${o.prefix}${s}` : s, l);
570
+ z(ke);
571
+ const C = {
572
+ Button: H,
573
+ Card: U,
574
+ Modal: Z,
575
+ Message: ne,
576
+ ...ye
577
+ }, Ce = (e, t = {}) => {
578
+ Object.entries(C).forEach(([s, i]) => {
579
+ e.component(t.prefix ? `${t.prefix}${s}` : s, i);
311
580
  });
312
- }, tt = Q, et = _, st = h, ot = W, at = {
313
- install: X,
314
- ...y
581
+ }, Le = Be, Ie = B, Ee = z, Te = ze, Ve = {
582
+ install: Ce,
583
+ ...C
315
584
  };
316
585
  export {
317
- $ as Button,
318
- M as Card,
319
- H as Lzbutton,
320
- T as Lztheme,
321
- V as Modal,
322
- U as customComponents,
323
- at as default,
324
- ot as getSnippet,
325
- et as registerSnippet,
326
- st as registerSnippets,
327
- tt as snippets
586
+ H as Button,
587
+ U as Card,
588
+ pe as Lzbutton,
589
+ ge as Lztext,
590
+ ve as Lztheme,
591
+ ne as Message,
592
+ Z as Modal,
593
+ ye as customComponents,
594
+ Ve as default,
595
+ Te as getSnippet,
596
+ Se as message,
597
+ Ie as registerSnippet,
598
+ Ee as registerSnippets,
599
+ Le as snippets
328
600
  };