@owocow/saber-ui 0.1.13 → 0.1.14

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