@owocow/saber-ui 0.1.14 → 0.1.15
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/SaberAppLayout.vue_vue_type_script_setup_true_lang-Hr4TdNqR.js +487 -0
- package/dist/{SaberInfo.vue_vue_type_script_setup_true_lang-B3W5VsGR.js → SaberInfo.vue_vue_type_script_setup_true_lang-B_1ugpqI.js} +1 -1
- package/dist/components/SaberAppLayout.mjs +1 -1
- package/dist/components/SaberInfo.mjs +1 -1
- package/dist/components/SaberPagination.vue.d.ts +2 -3
- package/dist/components/layout/SaberAppLayout.types.d.ts +8 -0
- package/dist/components/layout/SaberAppLayout.vue.d.ts +5 -0
- package/dist/composables/index.d.ts +1 -1
- package/dist/composables/use-page-header.d.ts +3 -1
- package/dist/composables/use-page-header.mjs +27 -15
- package/dist/composables/use-table.d.ts +1 -0
- package/dist/composables/use-table.mjs +45 -42
- package/dist/composables.mjs +22 -20
- package/dist/forms.mjs +1 -1
- package/dist/index.mjs +125 -126
- package/dist/{plugin-DvH6j00c.js → plugin-Cg7MKH3t.js} +44 -48
- package/package.json +1 -1
- package/dist/SaberAppLayout.vue_vue_type_script_setup_true_lang-DaxscIFe.js +0 -418
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import B from "@nuxt/ui/components/Button.vue";
|
|
2
|
-
import { inject as de, h as pe, defineComponent as F, useModel as
|
|
2
|
+
import { inject as de, h as pe, defineComponent as F, useModel as x, computed as h, openBlock as v, createElementBlock as D, renderSlot as A, Fragment as T, renderList as K, createBlock as y, resolveDynamicComponent as W, unref as k, mergeProps as V, toHandlers as G, createVNode as $, normalizeClass as J, mergeModels as b, ref as O, watch as j, useTemplateRef as fe, withCtx as z, createTextVNode as R, toDisplayString as N, useAttrs as ve, createSlots as be, withModifiers as L } from "vue";
|
|
3
3
|
import { S as w, _ as P } from "./SaberPopSelect.vue_vue_type_script_setup_true_lang-eH8jkkzK.js";
|
|
4
4
|
import _e from "@nuxt/ui/components/Form.vue";
|
|
5
5
|
import Se from "@nuxt/ui/components/FormField.vue";
|
|
@@ -19,7 +19,7 @@ import { _ as ne } from "./SaberDistrictSelect.vue_vue_type_script_setup_true_la
|
|
|
19
19
|
function M(e) {
|
|
20
20
|
return e == null ? !1 : typeof e == "string" ? e.trim() !== "" : Array.isArray(e) ? e.some(M) : typeof e == "object" ? Object.values(e).some(M) : !0;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function xe(e, o) {
|
|
23
23
|
if (e === o) return !0;
|
|
24
24
|
try {
|
|
25
25
|
return JSON.stringify(e) === JSON.stringify(o);
|
|
@@ -27,11 +27,11 @@ function $e(e, o) {
|
|
|
27
27
|
return !1;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
return t != null ? o.some((n) =>
|
|
30
|
+
function $e(e, o, t) {
|
|
31
|
+
return t != null ? o.some((n) => !xe(e[n.key], t[n.key])) : o.some((n) => M(e[n.key]));
|
|
32
32
|
}
|
|
33
33
|
const ae = Symbol("SaberFormRegistry");
|
|
34
|
-
function
|
|
34
|
+
function ke(e = {}) {
|
|
35
35
|
const o = new Map(Object.entries(e));
|
|
36
36
|
return {
|
|
37
37
|
register(t, n) {
|
|
@@ -62,10 +62,10 @@ function se(e, o) {
|
|
|
62
62
|
const t = e == null ? void 0 : e.resolve(o);
|
|
63
63
|
return t || (E.has(o) || (E.add(o), console.warn(`[SaberUI] Form component "${o}" is not registered.`)), we);
|
|
64
64
|
}
|
|
65
|
-
const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
65
|
+
const Ue = { class: "flex gap-2 flex-wrap" }, Ce = /* @__PURE__ */ F({
|
|
66
66
|
name: "SaberFilterBar",
|
|
67
67
|
__name: "SaberFilterBar",
|
|
68
|
-
props: /* @__PURE__ */
|
|
68
|
+
props: /* @__PURE__ */ b({
|
|
69
69
|
fields: {},
|
|
70
70
|
initialParams: { default: null },
|
|
71
71
|
size: { default: "lg" }
|
|
@@ -73,9 +73,9 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
73
73
|
modelValue: { default: () => ({}) },
|
|
74
74
|
modelModifiers: {}
|
|
75
75
|
}),
|
|
76
|
-
emits: /* @__PURE__ */
|
|
76
|
+
emits: /* @__PURE__ */ b(["search", "reset", "refresh"], ["update:modelValue"]),
|
|
77
77
|
setup(e, { expose: o, emit: t }) {
|
|
78
|
-
const n = e, r = t, i =
|
|
78
|
+
const n = e, r = t, i = x(e, "modelValue"), d = re(), l = h(() => w[n.size]), s = h(() => $e(i.value, n.fields, n.initialParams));
|
|
79
79
|
o({ hasActiveFilters: s });
|
|
80
80
|
function _(c = "change") {
|
|
81
81
|
return c === "manual" ? {} : c === "update:model-value" ? { "update:modelValue": () => r("search") } : { change: () => r("search") };
|
|
@@ -90,9 +90,9 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
90
90
|
}
|
|
91
91
|
return (c, g) => {
|
|
92
92
|
const S = B;
|
|
93
|
-
return
|
|
93
|
+
return v(), D("div", Ue, [
|
|
94
94
|
A(c.$slots, "leading"),
|
|
95
|
-
(
|
|
95
|
+
(v(!0), D(T, null, K(e.fields, (a) => (v(), y(W(k(se)(k(d), a.which)), V({
|
|
96
96
|
key: a.key,
|
|
97
97
|
modelValue: i.value[a.key],
|
|
98
98
|
"onUpdate:modelValue": (u) => i.value[a.key] = u
|
|
@@ -100,7 +100,7 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
100
100
|
size: f(a),
|
|
101
101
|
class: a.class
|
|
102
102
|
}, G(_(a.searchOn))), null, 16, ["modelValue", "onUpdate:modelValue", "size", "class"]))), 128)),
|
|
103
|
-
|
|
103
|
+
$(S, {
|
|
104
104
|
icon: s.value ? "i-mdi:close" : "i-solar:refresh-bold",
|
|
105
105
|
variant: "outline",
|
|
106
106
|
color: "neutral",
|
|
@@ -117,7 +117,7 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
117
117
|
name: "SaberFormModal",
|
|
118
118
|
inheritAttrs: !1,
|
|
119
119
|
__name: "SaberFormModal",
|
|
120
|
-
props: /* @__PURE__ */
|
|
120
|
+
props: /* @__PURE__ */ b({
|
|
121
121
|
fields: {},
|
|
122
122
|
model: { default: void 0 },
|
|
123
123
|
validate: { type: Function, default: void 0 },
|
|
@@ -133,9 +133,9 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
133
133
|
open: { type: Boolean, default: !1 },
|
|
134
134
|
openModifiers: {}
|
|
135
135
|
}),
|
|
136
|
-
emits: /* @__PURE__ */
|
|
136
|
+
emits: /* @__PURE__ */ b(["success", "error"], ["update:open"]),
|
|
137
137
|
setup(e, { emit: o }) {
|
|
138
|
-
const t = e, n = o, r =
|
|
138
|
+
const t = e, n = o, r = x(e, "open"), i = re();
|
|
139
139
|
function d() {
|
|
140
140
|
return { ...t.model ?? {} };
|
|
141
141
|
}
|
|
@@ -182,7 +182,7 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
182
182
|
}
|
|
183
183
|
return (a, u) => {
|
|
184
184
|
const U = Se, me = _e, I = B;
|
|
185
|
-
return
|
|
185
|
+
return v(), y(q, {
|
|
186
186
|
open: r.value,
|
|
187
187
|
"onUpdate:open": u[2] || (u[2] = (m) => r.value = m),
|
|
188
188
|
title: e.title,
|
|
@@ -190,7 +190,7 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
190
190
|
width: e.width
|
|
191
191
|
}, {
|
|
192
192
|
footer: z(() => [
|
|
193
|
-
|
|
193
|
+
$(I, {
|
|
194
194
|
color: "neutral",
|
|
195
195
|
variant: "outline",
|
|
196
196
|
class: "h-10 px-12",
|
|
@@ -201,7 +201,7 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
201
201
|
]),
|
|
202
202
|
_: 1
|
|
203
203
|
}),
|
|
204
|
-
|
|
204
|
+
$(I, {
|
|
205
205
|
color: "primary",
|
|
206
206
|
class: "h-10 px-12",
|
|
207
207
|
loading: _.value,
|
|
@@ -217,7 +217,7 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
217
217
|
}, 8, ["loading"])
|
|
218
218
|
]),
|
|
219
219
|
default: z(() => [
|
|
220
|
-
|
|
220
|
+
$(me, V({ ref: "form" }, a.$attrs, {
|
|
221
221
|
validate: s,
|
|
222
222
|
state: l.value,
|
|
223
223
|
"validate-on": ["blur"],
|
|
@@ -225,7 +225,7 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
225
225
|
onSubmit: S
|
|
226
226
|
}), {
|
|
227
227
|
default: z(() => [
|
|
228
|
-
(
|
|
228
|
+
(v(!0), D(T, null, K(e.fields, (m) => (v(), y(U, {
|
|
229
229
|
key: String(m.key),
|
|
230
230
|
name: String(m.key),
|
|
231
231
|
label: m.label,
|
|
@@ -233,7 +233,7 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
233
233
|
ui: { label: "text-muted mb-1" }
|
|
234
234
|
}, {
|
|
235
235
|
default: z(() => [
|
|
236
|
-
(
|
|
236
|
+
(v(), y(W(k(se)(k(i), m.which)), V({
|
|
237
237
|
modelValue: l.value[m.key],
|
|
238
238
|
"onUpdate:modelValue": (C) => l.value[m.key] = C
|
|
239
239
|
}, { ref_for: !0 }, m.props, {
|
|
@@ -253,7 +253,7 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
253
253
|
}), ie = /* @__PURE__ */ F({
|
|
254
254
|
inheritAttrs: !1,
|
|
255
255
|
__name: "SaberInput",
|
|
256
|
-
props: /* @__PURE__ */
|
|
256
|
+
props: /* @__PURE__ */ b({
|
|
257
257
|
clearable: { type: Boolean, default: !0 },
|
|
258
258
|
size: { default: "lg" },
|
|
259
259
|
ui: {}
|
|
@@ -261,13 +261,13 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
261
261
|
modelValue: { default: "" },
|
|
262
262
|
modelModifiers: {}
|
|
263
263
|
}),
|
|
264
|
-
emits: /* @__PURE__ */
|
|
264
|
+
emits: /* @__PURE__ */ b(["change"], ["update:modelValue"]),
|
|
265
265
|
setup(e, { emit: o }) {
|
|
266
|
-
const t = e, n =
|
|
266
|
+
const t = e, n = x(e, "modelValue"), r = o, i = ve(), d = h(() => w[t.size]), l = h(() => {
|
|
267
267
|
var p;
|
|
268
268
|
return {
|
|
269
269
|
...t.ui,
|
|
270
|
-
base: [d.value.height, (p = t.ui) == null ? void 0 : p.base].filter(Boolean).join(" ")
|
|
270
|
+
base: [d.value.height, "text-sm/5", (p = t.ui) == null ? void 0 : p.base].filter(Boolean).join(" ")
|
|
271
271
|
};
|
|
272
272
|
}), s = h(() => !t.clearable || i.disabled != null || i.readonly != null ? !1 : n.value !== void 0 && n.value !== null && String(n.value) !== "");
|
|
273
273
|
function _() {
|
|
@@ -275,19 +275,18 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
275
275
|
}
|
|
276
276
|
return (p, f) => {
|
|
277
277
|
const c = B, g = H;
|
|
278
|
-
return
|
|
278
|
+
return v(), y(g, V({
|
|
279
279
|
modelValue: n.value,
|
|
280
280
|
"onUpdate:modelValue": f[1] || (f[1] = (S) => n.value = S)
|
|
281
|
-
},
|
|
281
|
+
}, k(i), {
|
|
282
282
|
size: d.value.nuxtSize,
|
|
283
283
|
ui: l.value,
|
|
284
|
-
class: "saberInput",
|
|
285
284
|
onChange: f[2] || (f[2] = (S) => r("change", n.value))
|
|
286
|
-
}),
|
|
285
|
+
}), be({ _: 2 }, [
|
|
287
286
|
s.value ? {
|
|
288
287
|
name: "trailing",
|
|
289
288
|
fn: z(() => [
|
|
290
|
-
|
|
289
|
+
$(c, {
|
|
291
290
|
tabindex: "-1",
|
|
292
291
|
color: "neutral",
|
|
293
292
|
variant: "ghost",
|
|
@@ -306,16 +305,16 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
306
305
|
}), le = /* @__PURE__ */ F({
|
|
307
306
|
inheritAttrs: !1,
|
|
308
307
|
__name: "SaberInputNumber",
|
|
309
|
-
props: /* @__PURE__ */
|
|
308
|
+
props: /* @__PURE__ */ b({
|
|
310
309
|
size: { default: "lg" },
|
|
311
310
|
ui: {}
|
|
312
311
|
}, {
|
|
313
312
|
modelValue: { default: void 0 },
|
|
314
313
|
modelModifiers: {}
|
|
315
314
|
}),
|
|
316
|
-
emits: /* @__PURE__ */
|
|
315
|
+
emits: /* @__PURE__ */ b(["change"], ["update:modelValue"]),
|
|
317
316
|
setup(e, { emit: o }) {
|
|
318
|
-
const t = e, n =
|
|
317
|
+
const t = e, n = x(e, "modelValue"), r = o, i = h(() => w[t.size]), d = h(() => {
|
|
319
318
|
var s;
|
|
320
319
|
return {
|
|
321
320
|
...t.ui,
|
|
@@ -327,7 +326,7 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
327
326
|
}
|
|
328
327
|
return (s, _) => {
|
|
329
328
|
const p = Z;
|
|
330
|
-
return
|
|
329
|
+
return v(), y(p, V({ "model-value": n.value }, s.$attrs, {
|
|
331
330
|
size: i.value.nuxtSize,
|
|
332
331
|
ui: d.value,
|
|
333
332
|
"onUpdate:modelValue": l
|
|
@@ -337,16 +336,16 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
337
336
|
}), ue = /* @__PURE__ */ F({
|
|
338
337
|
inheritAttrs: !1,
|
|
339
338
|
__name: "SaberSelect",
|
|
340
|
-
props: /* @__PURE__ */
|
|
339
|
+
props: /* @__PURE__ */ b({
|
|
341
340
|
size: { default: "lg" },
|
|
342
341
|
ui: {}
|
|
343
342
|
}, {
|
|
344
343
|
modelValue: { default: void 0 },
|
|
345
344
|
modelModifiers: {}
|
|
346
345
|
}),
|
|
347
|
-
emits: /* @__PURE__ */
|
|
346
|
+
emits: /* @__PURE__ */ b(["change"], ["update:modelValue"]),
|
|
348
347
|
setup(e, { emit: o }) {
|
|
349
|
-
const t = e, n =
|
|
348
|
+
const t = e, n = x(e, "modelValue"), r = o, i = h(() => w[t.size]), d = h(() => {
|
|
350
349
|
var s;
|
|
351
350
|
return {
|
|
352
351
|
...t.ui,
|
|
@@ -358,7 +357,7 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
358
357
|
}
|
|
359
358
|
return (s, _) => {
|
|
360
359
|
const p = Q;
|
|
361
|
-
return
|
|
360
|
+
return v(), y(p, V({ "model-value": n.value }, s.$attrs, {
|
|
362
361
|
size: i.value.nuxtSize,
|
|
363
362
|
ui: d.value,
|
|
364
363
|
class: "saberButton",
|
|
@@ -373,18 +372,15 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
373
372
|
modelValue: { default: "" },
|
|
374
373
|
modelModifiers: {}
|
|
375
374
|
},
|
|
376
|
-
emits: /* @__PURE__ */
|
|
375
|
+
emits: /* @__PURE__ */ b(["change"], ["update:modelValue"]),
|
|
377
376
|
setup(e, { emit: o }) {
|
|
378
|
-
const t =
|
|
377
|
+
const t = x(e, "modelValue"), n = o;
|
|
379
378
|
function r(i) {
|
|
380
379
|
t.value = i, n("change", i);
|
|
381
380
|
}
|
|
382
381
|
return (i, d) => {
|
|
383
382
|
const l = X;
|
|
384
|
-
return
|
|
385
|
-
class: "saberInput",
|
|
386
|
-
"onUpdate:modelValue": r
|
|
387
|
-
}), null, 16, ["model-value"]);
|
|
383
|
+
return v(), y(l, V({ "model-value": t.value }, i.$attrs, { "onUpdate:modelValue": r }), null, 16, ["model-value"]);
|
|
388
384
|
};
|
|
389
385
|
}
|
|
390
386
|
}), Me = {
|
|
@@ -416,7 +412,7 @@ const Ue = { class: "flex gap-2" }, Ce = /* @__PURE__ */ F({
|
|
|
416
412
|
SaberRadioGroup: ee
|
|
417
413
|
};
|
|
418
414
|
function Xe(e, o = {}) {
|
|
419
|
-
const t =
|
|
415
|
+
const t = ke({
|
|
420
416
|
...Me,
|
|
421
417
|
...o.components
|
|
422
418
|
});
|
|
@@ -432,11 +428,11 @@ export {
|
|
|
432
428
|
ce as e,
|
|
433
429
|
Me as f,
|
|
434
430
|
Be as g,
|
|
435
|
-
|
|
436
|
-
|
|
431
|
+
ke as h,
|
|
432
|
+
$e as i,
|
|
437
433
|
M as j,
|
|
438
434
|
Xe as k,
|
|
439
|
-
|
|
435
|
+
xe as l,
|
|
440
436
|
se as r,
|
|
441
437
|
re as u
|
|
442
438
|
};
|