@owocow/saber-ui 0.1.13 → 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/{SaberDictSelect.vue_vue_type_script_setup_true_lang-B8PTKNKX.js → SaberDictSelect.vue_vue_type_script_setup_true_lang-BKdOdlFX.js} +1 -1
- package/dist/SaberDistrictSelect.vue_vue_type_script_setup_true_lang-jkl2AOay.js +272 -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/SaberPopSelect.vue_vue_type_script_setup_true_lang-eH8jkkzK.js +162 -0
- package/dist/SaberSwitchBar.vue_vue_type_script_setup_true_lang-CIbFBx5r.js +47 -0
- package/dist/components/SaberAppLayout.mjs +1 -1
- package/dist/components/SaberInfo.mjs +1 -1
- package/dist/components/SaberPagination.vue.d.ts +48 -0
- package/dist/components/SaberSwitchBar.mjs +1 -1
- 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/control-size.d.ts +33 -0
- package/dist/forms/components/SaberFilterBar.vue.d.ts +3 -0
- package/dist/forms/components/SaberFormModal.vue.d.ts +2 -0
- package/dist/forms/components/fields/SaberDistrictSelect.vue.d.ts +5 -0
- package/dist/forms/components/fields/SaberInput.vue.d.ts +5 -0
- package/dist/forms/components/fields/SaberInputNumber.vue.d.ts +10 -2
- package/dist/forms/components/fields/SaberPopSelect.vue.d.ts +4 -1
- package/dist/forms/components/fields/SaberSelect.vue.d.ts +10 -2
- package/dist/forms/dict-select.mjs +1 -1
- package/dist/forms/district-select.mjs +1 -1
- package/dist/forms/index.d.ts +1 -0
- package/dist/forms/pop-select.mjs +1 -1
- package/dist/forms.mjs +4 -4
- package/dist/index.d.ts +4 -1
- package/dist/index.mjs +175 -98
- package/dist/plugin-Cg7MKH3t.js +438 -0
- package/package.json +1 -1
- package/dist/SaberAppLayout.vue_vue_type_script_setup_true_lang-R7F5K7kj.js +0 -418
- package/dist/SaberDistrictSelect.vue_vue_type_script_setup_true_lang-BX8nLC35.js +0 -257
- package/dist/SaberPopSelect.vue_vue_type_script_setup_true_lang-BcS27NXI.js +0 -125
- package/dist/SaberSwitchBar.vue_vue_type_script_setup_true_lang-CDx3Dcas.js +0 -47
- package/dist/plugin-Dr3z0YFg.js +0 -396
package/dist/index.mjs
CHANGED
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
import
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { _ as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { _ as
|
|
15
|
-
import {
|
|
16
|
-
import { _ as
|
|
17
|
-
import {
|
|
18
|
-
import { _ as
|
|
19
|
-
import { _ as
|
|
20
|
-
import { _ as
|
|
21
|
-
import { _ as
|
|
22
|
-
import { _ as
|
|
23
|
-
|
|
1
|
+
import M from "@nuxt/ui/vue-plugin";
|
|
2
|
+
import V from "@nuxt/ui/components/Badge.vue";
|
|
3
|
+
import { defineComponent as z, computed as p, openBlock as m, createBlock as A, normalizeStyle as F, withCtx as L, createTextVNode as x, toDisplayString as S, createElementBlock as d, normalizeClass as c, createElementVNode as u, createVNode as v, createCommentVNode as f, renderSlot as $ } from "vue";
|
|
4
|
+
import W from "@nuxt/ui/runtime/vue/components/Icon.vue";
|
|
5
|
+
import { _ as j } from "./SaberConfirmModal.vue_vue_type_script_setup_true_lang-Cqp9krYl.js";
|
|
6
|
+
import { _ as H } from "./SaberConfirmProvider.vue_vue_type_script_setup_true_lang-DUJ6ftNJ.js";
|
|
7
|
+
import { _ as R } from "./SaberInfo.vue_vue_type_script_setup_true_lang-B_1ugpqI.js";
|
|
8
|
+
import { _ as T } from "./SaberInfoProvider.vue_vue_type_script_setup_true_lang-3rF6bSCn.js";
|
|
9
|
+
import { _ as E } from "./SaberModalWithMobile.vue_vue_type_script_setup_true_lang-aQlToncY.js";
|
|
10
|
+
import O from "@nuxt/ui/components/Pagination.vue";
|
|
11
|
+
import G from "@nuxt/ui/components/Select.vue";
|
|
12
|
+
import { _ as K } from "./SaberStatus.vue_vue_type_script_setup_true_lang-D9aRVCow.js";
|
|
13
|
+
import { _ as q } from "./SaberSwitchBar.vue_vue_type_script_setup_true_lang-CIbFBx5r.js";
|
|
14
|
+
import { _ as J } from "./SaberAppLayout.vue_vue_type_script_setup_true_lang-Hr4TdNqR.js";
|
|
15
|
+
import { _ as Q } from "./SaberAppSidebar.vue_vue_type_script_setup_true_lang-Cwuj9VNi.js";
|
|
16
|
+
import { _ as X } from "./SaberNavigationSearch.vue_vue_type_script_setup_true_lang-Bj96kMla.js";
|
|
17
|
+
import { k as Y } from "./plugin-Cg7MKH3t.js";
|
|
18
|
+
import { _ as Ne, a as Pe, b as we, c as De, d as Me, e as Ve } from "./plugin-Cg7MKH3t.js";
|
|
19
|
+
import { _ as Fe } from "./SaberModal.vue_vue_type_script_setup_true_lang-DJno3jA3.js";
|
|
20
|
+
import { _ as We } from "./SaberDictCheckbox.vue_vue_type_script_setup_true_lang-DUbzy_C6.js";
|
|
21
|
+
import { _ as He, a as Re } from "./SaberDictRadio.vue_vue_type_script_setup_true_lang-DR6-jSID.js";
|
|
22
|
+
import { _ as Ee } from "./SaberDictSelect.vue_vue_type_script_setup_true_lang-BKdOdlFX.js";
|
|
23
|
+
import { _ as Ge } from "./SaberDistrictSelect.vue_vue_type_script_setup_true_lang-jkl2AOay.js";
|
|
24
|
+
import { _ as qe } from "./SaberPopSelect.vue_vue_type_script_setup_true_lang-eH8jkkzK.js";
|
|
25
|
+
const y = {
|
|
24
26
|
red: { 500: "#ef4444", 600: "#dc2626" },
|
|
25
27
|
orange: { 500: "#f97316", 600: "#ea580c" },
|
|
26
28
|
amber: { 500: "#f59e0b", 600: "#d97706" },
|
|
@@ -43,16 +45,16 @@ const d = {
|
|
|
43
45
|
zinc: { 500: "#71717a", 600: "#52525b" },
|
|
44
46
|
neutral: { 500: "#737373", 600: "#525252" },
|
|
45
47
|
stone: { 500: "#78716c", 600: "#57534e" }
|
|
46
|
-
},
|
|
47
|
-
function
|
|
48
|
-
var
|
|
49
|
-
return ((
|
|
48
|
+
}, Z = y.gray;
|
|
49
|
+
function w(e, a) {
|
|
50
|
+
var t, s;
|
|
51
|
+
return ((t = y[e]) == null ? void 0 : t[a]) ?? ((s = y[e]) == null ? void 0 : s[500]) ?? Z[500];
|
|
50
52
|
}
|
|
51
|
-
function
|
|
52
|
-
const
|
|
53
|
-
return `rgba(${
|
|
53
|
+
function ee(e, a) {
|
|
54
|
+
const t = parseInt(e.slice(1, 3), 16), s = parseInt(e.slice(3, 5), 16), n = parseInt(e.slice(5, 7), 16);
|
|
55
|
+
return `rgba(${t}, ${s}, ${n}, ${a / 100})`;
|
|
54
56
|
}
|
|
55
|
-
const
|
|
57
|
+
const te = /* @__PURE__ */ z({
|
|
56
58
|
__name: "BadgeStatus",
|
|
57
59
|
props: {
|
|
58
60
|
value: {},
|
|
@@ -61,40 +63,40 @@ const T = /* @__PURE__ */ _({
|
|
|
61
63
|
textColorWeight: { default: 500 }
|
|
62
64
|
},
|
|
63
65
|
setup(e) {
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
for (const
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
69
|
-
const
|
|
70
|
-
if (
|
|
71
|
-
return { label:
|
|
66
|
+
const a = e, t = p(() => {
|
|
67
|
+
const n = String(a.value);
|
|
68
|
+
for (const l of a.config) {
|
|
69
|
+
const i = l.split(":");
|
|
70
|
+
if (i.length < 2) continue;
|
|
71
|
+
const g = i[0], o = i[1], r = i[2] || "gray";
|
|
72
|
+
if (o === n)
|
|
73
|
+
return { label: g, color: r };
|
|
72
74
|
}
|
|
73
|
-
return { label:
|
|
74
|
-
}),
|
|
75
|
-
const { color:
|
|
75
|
+
return { label: n, color: "gray" };
|
|
76
|
+
}), s = p(() => {
|
|
77
|
+
const { color: n } = t.value, l = w(n, 500), i = w(n, a.textColorWeight);
|
|
76
78
|
return {
|
|
77
|
-
backgroundColor:
|
|
78
|
-
color:
|
|
79
|
+
backgroundColor: ee(l, a.bgOpacity),
|
|
80
|
+
color: i
|
|
79
81
|
};
|
|
80
82
|
});
|
|
81
|
-
return (
|
|
82
|
-
const
|
|
83
|
-
return
|
|
84
|
-
style:
|
|
83
|
+
return (n, l) => {
|
|
84
|
+
const i = V;
|
|
85
|
+
return m(), A(i, {
|
|
86
|
+
style: F(s.value),
|
|
85
87
|
class: "inline-flex items-center rounded-full border-0 pt-0.75 pb-0.75 px-2 text-xs font-medium"
|
|
86
88
|
}, {
|
|
87
|
-
default:
|
|
88
|
-
|
|
89
|
+
default: L(() => [
|
|
90
|
+
x(S(t.value.label), 1)
|
|
89
91
|
]),
|
|
90
92
|
_: 1
|
|
91
93
|
}, 8, ["style"]);
|
|
92
94
|
};
|
|
93
95
|
}
|
|
94
|
-
}),
|
|
96
|
+
}), ae = { class: "rounded-md border border-accented p-3" }, oe = { class: "flex flex-col gap-1" }, re = { class: "text-base font-semibold mb-2 text-highlighted w-60" }, se = {
|
|
95
97
|
key: 0,
|
|
96
98
|
class: "text-sm text-muted w-60"
|
|
97
|
-
},
|
|
99
|
+
}, ne = { key: 0 }, ie = { key: 1 }, le = /* @__PURE__ */ z({
|
|
98
100
|
name: "SaberNoData",
|
|
99
101
|
__name: "SaberNoData",
|
|
100
102
|
props: {
|
|
@@ -105,65 +107,140 @@ const T = /* @__PURE__ */ _({
|
|
|
105
107
|
description: { default: "当前列表为空,还没有任何数据" }
|
|
106
108
|
},
|
|
107
109
|
setup(e) {
|
|
108
|
-
return (
|
|
109
|
-
const
|
|
110
|
-
return
|
|
111
|
-
class:
|
|
110
|
+
return (a, t) => {
|
|
111
|
+
const s = W;
|
|
112
|
+
return m(), d("div", {
|
|
113
|
+
class: c([
|
|
112
114
|
"flex flex-col items-center justify-center gap-6 rounded-md p-10 text-center bg-default",
|
|
113
115
|
e.border && "border border-accented",
|
|
114
|
-
|
|
116
|
+
a.$props.class
|
|
115
117
|
])
|
|
116
118
|
}, [
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
u("div", ae, [
|
|
120
|
+
v(s, {
|
|
119
121
|
name: e.icon,
|
|
120
122
|
class: "size-5"
|
|
121
123
|
}, null, 8, ["name"])
|
|
122
124
|
]),
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
e.description ? (
|
|
125
|
+
u("div", oe, [
|
|
126
|
+
u("h4", re, S(e.title), 1),
|
|
127
|
+
e.description ? (m(), d("p", se, S(e.description), 1)) : f("", !0)
|
|
126
128
|
]),
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
])) :
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
])) :
|
|
129
|
+
a.$slots.default ? (m(), d("div", ne, [
|
|
130
|
+
$(a.$slots, "default")
|
|
131
|
+
])) : f("", !0),
|
|
132
|
+
a.$slots.extra ? (m(), d("p", ie, [
|
|
133
|
+
$(a.$slots, "extra")
|
|
134
|
+
])) : f("", !0)
|
|
133
135
|
], 2);
|
|
134
136
|
};
|
|
135
137
|
}
|
|
136
|
-
}),
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
}), ce = /* @__PURE__ */ z({
|
|
139
|
+
__name: "SaberPagination",
|
|
140
|
+
props: {
|
|
141
|
+
page: { default: 1 },
|
|
142
|
+
pageSize: { default: 10 },
|
|
143
|
+
total: {},
|
|
144
|
+
pageSizes: { default: () => [10, 20, 50, 100] },
|
|
145
|
+
size: { default: "sm" },
|
|
146
|
+
ui: {}
|
|
147
|
+
},
|
|
148
|
+
emits: ["update:page", "update:pageSize"],
|
|
149
|
+
setup(e, { emit: a }) {
|
|
150
|
+
const t = e, s = a, n = p({
|
|
151
|
+
get: () => t.page,
|
|
152
|
+
set: (o) => s("update:page", o)
|
|
153
|
+
}), l = p({
|
|
154
|
+
get: () => t.pageSize,
|
|
155
|
+
set: (o) => s("update:pageSize", o)
|
|
156
|
+
}), i = p(() => t.pageSizes.map((o) => ({ label: `${o} 条/页`, value: o }))), g = p(() => {
|
|
157
|
+
var o, r, b;
|
|
158
|
+
return {
|
|
159
|
+
...(o = t.ui) == null ? void 0 : o.pageSizeUi,
|
|
160
|
+
base: ["text-sm rounded-sm h-auto saberButton", (b = (r = t.ui) == null ? void 0 : r.pageSizeUi) == null ? void 0 : b.base].filter(Boolean).join(" ")
|
|
161
|
+
};
|
|
162
|
+
});
|
|
163
|
+
return (o, r) => {
|
|
164
|
+
var h, B, k, C, I, U, N, P;
|
|
165
|
+
const b = G, D = O;
|
|
166
|
+
return m(), d("div", {
|
|
167
|
+
class: c(["flex w-full items-center justify-between", (h = t.ui) == null ? void 0 : h.root])
|
|
168
|
+
}, [
|
|
169
|
+
u("div", {
|
|
170
|
+
class: c(["flex flex-col gap-1", (B = t.ui) == null ? void 0 : B.info])
|
|
171
|
+
}, [
|
|
172
|
+
u("span", {
|
|
173
|
+
class: c(["text-xs mr-4", (k = t.ui) == null ? void 0 : k.total])
|
|
174
|
+
}, [
|
|
175
|
+
r[2] || (r[2] = x("总计 ", -1)),
|
|
176
|
+
u("b", null, S(t.total), 1),
|
|
177
|
+
r[3] || (r[3] = x(" 条", -1))
|
|
178
|
+
], 2),
|
|
179
|
+
o.$slots.tips ? (m(), d("div", {
|
|
180
|
+
key: 0,
|
|
181
|
+
class: c((C = t.ui) == null ? void 0 : C.tips)
|
|
182
|
+
}, [
|
|
183
|
+
$(o.$slots, "tips")
|
|
184
|
+
], 2)) : f("", !0)
|
|
185
|
+
], 2),
|
|
186
|
+
u("div", {
|
|
187
|
+
class: c(["flex items-center gap-2", (I = t.ui) == null ? void 0 : I.controls])
|
|
188
|
+
}, [
|
|
189
|
+
v(b, {
|
|
190
|
+
modelValue: l.value,
|
|
191
|
+
"onUpdate:modelValue": r[0] || (r[0] = (_) => l.value = _),
|
|
192
|
+
items: i.value,
|
|
193
|
+
ui: g.value,
|
|
194
|
+
size: t.size,
|
|
195
|
+
class: c(["w-28 max-[768px]:hidden", (U = t.ui) == null ? void 0 : U.pageSize])
|
|
196
|
+
}, null, 8, ["modelValue", "items", "ui", "size", "class"]),
|
|
197
|
+
v(D, {
|
|
198
|
+
page: n.value,
|
|
199
|
+
"onUpdate:page": r[1] || (r[1] = (_) => n.value = _),
|
|
200
|
+
size: t.size,
|
|
201
|
+
"active-color": "primary",
|
|
202
|
+
"active-variant": "subtle",
|
|
203
|
+
total: t.total,
|
|
204
|
+
"items-per-page": l.value,
|
|
205
|
+
ui: (N = t.ui) == null ? void 0 : N.paginationUi,
|
|
206
|
+
class: c((P = t.ui) == null ? void 0 : P.pagination)
|
|
207
|
+
}, null, 8, ["page", "size", "total", "items-per-page", "ui", "class"])
|
|
208
|
+
], 2)
|
|
209
|
+
], 2);
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}), Ce = {
|
|
213
|
+
install(e, a = {}) {
|
|
214
|
+
e.use(M), e.component("SaberBadgeStatus", te), e.component("SaberNoData", le), e.component("SaberConfirmModal", j), e.component("SaberConfirmProvider", H), e.component("SaberInfo", R), e.component("SaberInfoProvider", T), e.component("SaberModalWithMobile", E), e.component("SaberPagination", ce), e.component("SaberStatus", K), e.component("SaberSwitchBar", q), e.component("SaberAppSidebar", Q), e.component("SaberNavigationSearch", X), e.component("SaberAppLayout", J), Y(e, a.forms);
|
|
139
215
|
}
|
|
140
216
|
};
|
|
141
217
|
export {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
218
|
+
J as SaberAppLayout,
|
|
219
|
+
Q as SaberAppSidebar,
|
|
220
|
+
te as SaberBadgeStatus,
|
|
221
|
+
j as SaberConfirmModal,
|
|
222
|
+
H as SaberConfirmProvider,
|
|
223
|
+
We as SaberDictCheckbox,
|
|
224
|
+
He as SaberDictRadio,
|
|
225
|
+
Ee as SaberDictSelect,
|
|
226
|
+
Ge as SaberDistrictSelect,
|
|
227
|
+
Ne as SaberFilterBar,
|
|
228
|
+
Pe as SaberFormModal,
|
|
229
|
+
R as SaberInfo,
|
|
230
|
+
T as SaberInfoProvider,
|
|
231
|
+
we as SaberInput,
|
|
232
|
+
De as SaberInputNumber,
|
|
233
|
+
Fe as SaberModal,
|
|
234
|
+
E as SaberModalWithMobile,
|
|
235
|
+
X as SaberNavigationSearch,
|
|
236
|
+
le as SaberNoData,
|
|
237
|
+
ce as SaberPagination,
|
|
238
|
+
qe as SaberPopSelect,
|
|
239
|
+
Re as SaberRadioGroup,
|
|
240
|
+
Me as SaberSelect,
|
|
241
|
+
K as SaberStatus,
|
|
242
|
+
q as SaberSwitchBar,
|
|
243
|
+
Ve as SaberTextarea,
|
|
244
|
+
Ce as default,
|
|
245
|
+
Y as installSaberForms
|
|
169
246
|
};
|