@owocow/saber-ui 0.1.12 → 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 (37) hide show
  1. package/dist/SaberAppLayout.vue_vue_type_script_setup_true_lang-DaxscIFe.js +418 -0
  2. package/dist/{SaberAppSidebar.vue_vue_type_script_setup_true_lang-HXyIXiau.js → SaberAppSidebar.vue_vue_type_script_setup_true_lang-Cwuj9VNi.js} +104 -95
  3. package/dist/{SaberDictSelect.vue_vue_type_script_setup_true_lang-B8PTKNKX.js → SaberDictSelect.vue_vue_type_script_setup_true_lang-BKdOdlFX.js} +1 -1
  4. package/dist/SaberDistrictSelect.vue_vue_type_script_setup_true_lang-jkl2AOay.js +272 -0
  5. package/dist/SaberPopSelect.vue_vue_type_script_setup_true_lang-eH8jkkzK.js +162 -0
  6. package/dist/SaberSwitchBar.vue_vue_type_script_setup_true_lang-CIbFBx5r.js +47 -0
  7. package/dist/components/SaberAppLayout.mjs +4 -0
  8. package/dist/components/SaberAppSidebar.mjs +1 -1
  9. package/dist/components/SaberPagination.vue.d.ts +49 -0
  10. package/dist/components/SaberSwitchBar.mjs +1 -1
  11. package/dist/components/layout/SaberAppLayout.types.d.ts +51 -0
  12. package/dist/components/layout/SaberAppLayout.vue.d.ts +78 -0
  13. package/dist/components/navigation/SaberAppSidebar.types.d.ts +1 -0
  14. package/dist/components/navigation/SaberAppSidebar.vue.d.ts +1 -0
  15. package/dist/composables/use-page-header.mjs +10 -8
  16. package/dist/control-size.d.ts +33 -0
  17. package/dist/forms/components/SaberFilterBar.vue.d.ts +3 -0
  18. package/dist/forms/components/SaberFormModal.vue.d.ts +2 -0
  19. package/dist/forms/components/fields/SaberDistrictSelect.vue.d.ts +5 -0
  20. package/dist/forms/components/fields/SaberInput.vue.d.ts +5 -0
  21. package/dist/forms/components/fields/SaberInputNumber.vue.d.ts +10 -2
  22. package/dist/forms/components/fields/SaberPopSelect.vue.d.ts +5 -2
  23. package/dist/forms/components/fields/SaberSelect.vue.d.ts +10 -2
  24. package/dist/forms/components/fields/SaberUploadImage.vue.d.ts +2 -2
  25. package/dist/forms/dict-select.mjs +1 -1
  26. package/dist/forms/district-select.mjs +1 -1
  27. package/dist/forms/index.d.ts +1 -0
  28. package/dist/forms/pop-select.mjs +1 -1
  29. package/dist/forms.mjs +4 -4
  30. package/dist/index.d.ts +7 -1
  31. package/dist/index.mjs +176 -96
  32. package/dist/plugin-DvH6j00c.js +442 -0
  33. package/package.json +6 -1
  34. package/dist/SaberDistrictSelect.vue_vue_type_script_setup_true_lang-BX8nLC35.js +0 -257
  35. package/dist/SaberPopSelect.vue_vue_type_script_setup_true_lang-BcS27NXI.js +0 -125
  36. package/dist/SaberSwitchBar.vue_vue_type_script_setup_true_lang-CDx3Dcas.js +0 -47
  37. package/dist/plugin-Dr3z0YFg.js +0 -396
@@ -0,0 +1,162 @@
1
+ import M from "@nuxt/ui/components/Popover.vue";
2
+ import N from "@nuxt/ui/runtime/vue/components/Icon.vue";
3
+ import P from "@nuxt/ui/components/Button.vue";
4
+ import { defineComponent as U, useModel as E, ref as L, useAttrs as j, computed as i, openBlock as u, createBlock as x, withCtx as r, createVNode as y, mergeProps as $, unref as F, createSlots as R, createElementVNode as p, normalizeClass as z, toDisplayString as S, withModifiers as m, createElementBlock as v, Fragment as D, renderList as G, createCommentVNode as T, mergeModels as k } from "vue";
5
+ const Z = {
6
+ xs: {
7
+ height: "h-6",
8
+ square: "size-6",
9
+ paginationButtons: "[&_button]:h-6",
10
+ nuxtSize: "xs"
11
+ },
12
+ sm: {
13
+ height: "h-7",
14
+ square: "size-7",
15
+ paginationButtons: "[&_button]:h-7",
16
+ nuxtSize: "sm"
17
+ },
18
+ sl: {
19
+ height: "h-8",
20
+ square: "size-8",
21
+ paginationButtons: "[&_button]:h-8",
22
+ nuxtSize: "sm"
23
+ },
24
+ md: {
25
+ height: "h-9",
26
+ square: "size-9",
27
+ paginationButtons: "[&_button]:h-9",
28
+ nuxtSize: "md"
29
+ },
30
+ lg: {
31
+ height: "h-10",
32
+ square: "size-10",
33
+ paginationButtons: "[&_button]:h-10",
34
+ nuxtSize: "lg"
35
+ }
36
+ }, H = {
37
+ style: { width: "var(--reka-popper-anchor-width)" },
38
+ class: "p-2 max-h-60 overflow-y-auto flex flex-col gap-0.5"
39
+ }, J = ["onClick"], K = { class: "flex-1 truncate" }, Q = {
40
+ key: 1,
41
+ class: "flex items-center justify-center h-10 text-sm text-muted px-3"
42
+ }, ne = /* @__PURE__ */ U({
43
+ name: "SaberPopSelect",
44
+ inheritAttrs: !1,
45
+ __name: "SaberPopSelect",
46
+ props: /* @__PURE__ */ k({
47
+ items: { default: () => [] },
48
+ placeholder: { default: "请选择" },
49
+ multiple: { type: Boolean, default: !1 },
50
+ clearable: { type: Boolean, default: !0 },
51
+ disabled: { type: Boolean, default: !1 },
52
+ size: { default: "lg" }
53
+ }, {
54
+ modelValue: {},
55
+ modelModifiers: {}
56
+ }),
57
+ emits: /* @__PURE__ */ k(["change"], ["update:modelValue"]),
58
+ setup(s, { emit: B }) {
59
+ const l = s, c = B, n = E(s, "modelValue"), d = L(!1), h = j(), f = i(() => Z[l.size]), w = i(() => ({
60
+ base: `${f.value.height} rounded-sm justify-between`,
61
+ trailingIcon: "size-4"
62
+ }));
63
+ function g(t) {
64
+ return l.multiple ? Array.isArray(n.value) && n.value.includes(t.value) : n.value === t.value;
65
+ }
66
+ function A(t) {
67
+ if (!t.disabled) {
68
+ if (l.multiple) {
69
+ const e = Array.isArray(n.value) ? [...n.value] : [], a = e.indexOf(t.value);
70
+ a === -1 ? e.push(t.value) : e.splice(a, 1), n.value = e, c("change", e);
71
+ return;
72
+ }
73
+ n.value = t.value, d.value = !1, c("change", t.value);
74
+ }
75
+ }
76
+ function C() {
77
+ const t = l.multiple ? [] : void 0;
78
+ n.value = t, c("change", t);
79
+ }
80
+ const b = i(() => {
81
+ if (l.multiple) {
82
+ const e = Array.isArray(n.value) ? n.value : [];
83
+ return l.items.filter((a) => e.includes(a.value)).map((a) => a.label);
84
+ }
85
+ const t = l.items.find((e) => e.value === n.value);
86
+ return t ? [t.label] : [];
87
+ }), V = i(() => b.value.length > 0 ? b.value.join(", ") : l.placeholder), _ = i(() => l.multiple ? Array.isArray(n.value) && n.value.length > 0 : n.value != null && n.value !== ""), O = i(() => {
88
+ const { class: t, ...e } = h;
89
+ return e;
90
+ });
91
+ return (t, e) => {
92
+ const a = P, q = N, I = M;
93
+ return u(), x(I, {
94
+ open: d.value,
95
+ "onUpdate:open": e[2] || (e[2] = (o) => d.value = o),
96
+ content: { align: "start", sideOffset: 4 }
97
+ }, {
98
+ content: r(() => [
99
+ p("div", H, [
100
+ s.items.length > 0 ? (u(!0), v(D, { key: 0 }, G(s.items, (o) => (u(), v("div", {
101
+ key: String(o.value),
102
+ class: z(["flex items-center h-10 px-3 rounded-sm select-none text-sm", [
103
+ o.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
104
+ g(o) ? "bg-accented/70" : o.disabled ? "" : "hover:bg-muted"
105
+ ]]),
106
+ onClick: (W) => A(o)
107
+ }, [
108
+ p("span", K, S(o.label), 1),
109
+ g(o) ? (u(), x(q, {
110
+ key: 0,
111
+ name: "i-lucide:check",
112
+ class: "size-4 shrink-0 ml-2"
113
+ })) : T("", !0)
114
+ ], 10, J))), 128)) : (u(), v("div", Q, "暂无数据"))
115
+ ])
116
+ ]),
117
+ default: r(() => [
118
+ y(a, $({
119
+ color: "neutral",
120
+ variant: "outline",
121
+ disabled: s.disabled,
122
+ size: f.value.nuxtSize,
123
+ ui: w.value,
124
+ "trailing-icon": "i-lucide:chevron-down"
125
+ }, O.value, {
126
+ class: F(h).class || "w-full"
127
+ }), R({
128
+ default: r(() => [
129
+ p("span", {
130
+ class: z(["truncate", _.value ? "" : "text-muted/60 font-normal"])
131
+ }, S(V.value), 3)
132
+ ]),
133
+ _: 2
134
+ }, [
135
+ _.value && s.clearable ? {
136
+ name: "trailing",
137
+ fn: r(() => [
138
+ y(a, {
139
+ color: "neutral",
140
+ variant: "ghost",
141
+ icon: "i-solar:close-circle-outline",
142
+ ui: { base: "p-1 min-w-0 -mr-1.5", leadingIcon: "size-4" },
143
+ onPointerdown: e[0] || (e[0] = m(() => {
144
+ }, ["stop", "prevent"])),
145
+ onMousedown: e[1] || (e[1] = m(() => {
146
+ }, ["stop", "prevent"])),
147
+ onClick: m(C, ["stop", "prevent"])
148
+ })
149
+ ]),
150
+ key: "0"
151
+ } : void 0
152
+ ]), 1040, ["disabled", "size", "ui", "class"])
153
+ ]),
154
+ _: 1
155
+ }, 8, ["open"]);
156
+ };
157
+ }
158
+ });
159
+ export {
160
+ Z as S,
161
+ ne as _
162
+ };
@@ -0,0 +1,47 @@
1
+ import { defineComponent as p, useModel as b, computed as f, openBlock as r, createElementBlock as i, normalizeClass as a, createElementVNode as s, Fragment as h, renderList as w, toDisplayString as x, mergeModels as c } from "vue";
2
+ const g = ["onClick"], C = /* @__PURE__ */ p({
3
+ name: "SaberSwitchBar",
4
+ __name: "SaberSwitchBar",
5
+ props: /* @__PURE__ */ c({
6
+ tabs: {},
7
+ ui: { default: () => ({}) }
8
+ }, {
9
+ modelValue: { required: !0 },
10
+ modelModifiers: {}
11
+ }),
12
+ emits: /* @__PURE__ */ c(["change"], ["update:modelValue"]),
13
+ setup(o, { emit: u }) {
14
+ const d = o, m = u, n = b(o, "modelValue"), e = f(() => ({
15
+ root: "rounded-full bg-accented/80 p-1.25",
16
+ scroller: "w-full overflow-x-auto touch-pan-x [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
17
+ list: "inline-flex w-max min-w-max items-center gap-1",
18
+ tab: "shrink-0 whitespace-nowrap rounded-full px-4 py-2.5 text-sm leading-none transition-colors duration-100",
19
+ tabActive: "bg-primary text-white font-bold cursor-default",
20
+ tabInactive: "text-muted hover:text-default cursor-pointer font-bold",
21
+ ...d.ui
22
+ }));
23
+ function v(t) {
24
+ n.value !== t && (n.value = t, m("change", t));
25
+ }
26
+ return (t, k) => (r(), i("div", {
27
+ class: a(e.value.root)
28
+ }, [
29
+ s("div", {
30
+ class: a(e.value.scroller)
31
+ }, [
32
+ s("div", {
33
+ class: a(e.value.list)
34
+ }, [
35
+ (r(!0), i(h, null, w(o.tabs, (l) => (r(), i("span", {
36
+ key: String(l.value),
37
+ class: a([e.value.tab, n.value === l.value ? e.value.tabActive : e.value.tabInactive]),
38
+ onClick: (S) => v(l.value)
39
+ }, x(l.label), 11, g))), 128))
40
+ ], 2)
41
+ ], 2)
42
+ ], 2));
43
+ }
44
+ });
45
+ export {
46
+ C as _
47
+ };
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "../SaberAppLayout.vue_vue_type_script_setup_true_lang-DaxscIFe.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "../SaberAppSidebar.vue_vue_type_script_setup_true_lang-HXyIXiau.js";
1
+ import { _ as f } from "../SaberAppSidebar.vue_vue_type_script_setup_true_lang-Cwuj9VNi.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -0,0 +1,49 @@
1
+ import { SaberControlSize } from '../control-size';
2
+ type SaberPaginationComponentUI = Record<string, string | undefined>;
3
+ interface SaberPaginationUI {
4
+ root?: string;
5
+ info?: string;
6
+ total?: string;
7
+ tips?: string;
8
+ controls?: string;
9
+ pageSize?: string;
10
+ pageSizeUi?: SaberPaginationComponentUI;
11
+ pagination?: string;
12
+ paginationUi?: SaberPaginationComponentUI;
13
+ }
14
+ type __VLS_Props = {
15
+ page?: number;
16
+ pageSize?: number;
17
+ total: number;
18
+ pageSizes?: number[];
19
+ size?: SaberControlSize;
20
+ ui?: SaberPaginationUI;
21
+ };
22
+ declare function __VLS_template(): {
23
+ attrs: Partial<{}>;
24
+ slots: {
25
+ tips?(_: {}): any;
26
+ };
27
+ refs: {};
28
+ rootEl: HTMLDivElement;
29
+ };
30
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
31
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
32
+ "update:page": (value: number) => any;
33
+ "update:pageSize": (value: number) => any;
34
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
35
+ "onUpdate:page"?: ((value: number) => any) | undefined;
36
+ "onUpdate:pageSize"?: ((value: number) => any) | undefined;
37
+ }>, {
38
+ page: number;
39
+ pageSize: number;
40
+ pageSizes: number[];
41
+ size: SaberControlSize;
42
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
43
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
44
+ export default _default;
45
+ type __VLS_WithTemplateSlots<T, S> = T & {
46
+ new (): {
47
+ $slots: S;
48
+ };
49
+ };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "../SaberSwitchBar.vue_vue_type_script_setup_true_lang-CDx3Dcas.js";
1
+ import { _ as f } from "../SaberSwitchBar.vue_vue_type_script_setup_true_lang-CIbFBx5r.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -0,0 +1,51 @@
1
+ import { ButtonProps } from '@nuxt/ui/components/Button.vue';
2
+ import { DrawerProps } from '@nuxt/ui/components/Drawer.vue';
3
+ import { SaberNavigationSearchGroup, SaberNavigationSearchUI } from '../navigation/SaberAppSidebar.types';
4
+ export type SaberAppLayoutMode = 'phone' | 'pad' | 'desktop';
5
+ export type SaberAppLayoutMaxWidth = number | string | 'full' | false;
6
+ export interface SaberAppLayoutProps {
7
+ title?: string;
8
+ description?: string;
9
+ maxWidth?: SaberAppLayoutMaxWidth;
10
+ navigationKey?: string | number;
11
+ sidebarWidth?: number | string;
12
+ phoneBreakpoint?: number;
13
+ padBreakpoint?: number;
14
+ searchGroups?: SaberNavigationSearchGroup[];
15
+ searchShortcut?: string;
16
+ searchLabel?: string;
17
+ menuOpenLabel?: string;
18
+ menuCloseLabel?: string;
19
+ menuOpenIcon?: string;
20
+ menuCloseIcon?: string;
21
+ ui?: SaberAppLayoutUI;
22
+ }
23
+ export interface SaberAppLayoutNavigationSlotContext {
24
+ mode: SaberAppLayoutMode;
25
+ drawerOpen: boolean;
26
+ openDrawer: () => void;
27
+ closeDrawer: () => void;
28
+ toggleDrawer: () => void;
29
+ }
30
+ export interface SaberAppLayoutUI {
31
+ root?: string;
32
+ desktopSidebar?: string;
33
+ main?: string;
34
+ header?: string;
35
+ headerHeading?: string;
36
+ title?: string;
37
+ description?: string;
38
+ headerSuffix?: string;
39
+ pageHeaderSuffixTarget?: string;
40
+ content?: string;
41
+ phoneDrawer?: DrawerProps['ui'];
42
+ phoneDrawerContent?: string;
43
+ phoneSidebarFrame?: string;
44
+ padDrawer?: DrawerProps['ui'];
45
+ padDrawerContent?: string;
46
+ padSidebarFrame?: string;
47
+ overlay?: string;
48
+ dock?: string;
49
+ search?: SaberNavigationSearchUI;
50
+ menuButton?: ButtonProps['ui'];
51
+ }
@@ -0,0 +1,78 @@
1
+ import { SaberNavigationSelectPayload } from '../navigation/SaberAppSidebar.types';
2
+ import { SaberAppLayoutNavigationSlotContext, SaberAppLayoutProps } from './SaberAppLayout.types';
3
+ type __VLS_Props = SaberAppLayoutProps;
4
+ type __VLS_PublicProps = {
5
+ 'drawerOpen'?: boolean;
6
+ 'searchOpen'?: boolean;
7
+ } & __VLS_Props;
8
+ declare function __VLS_template(): {
9
+ attrs: Partial<{}>;
10
+ slots: Readonly<{
11
+ default?: () => unknown;
12
+ sidebar?: (props: SaberAppLayoutNavigationSlotContext) => unknown;
13
+ 'phone-sidebar'?: (props: SaberAppLayoutNavigationSlotContext) => unknown;
14
+ 'pad-sidebar'?: (props: SaberAppLayoutNavigationSlotContext) => unknown;
15
+ 'header-title'?: (props: {
16
+ title?: string;
17
+ }) => unknown;
18
+ 'header-description'?: (props: {
19
+ description?: string;
20
+ }) => unknown;
21
+ 'header-suffix'?: () => unknown;
22
+ dock?: (props: SaberAppLayoutNavigationSlotContext) => unknown;
23
+ }> & {
24
+ default?: () => unknown;
25
+ sidebar?: (props: SaberAppLayoutNavigationSlotContext) => unknown;
26
+ 'phone-sidebar'?: (props: SaberAppLayoutNavigationSlotContext) => unknown;
27
+ 'pad-sidebar'?: (props: SaberAppLayoutNavigationSlotContext) => unknown;
28
+ 'header-title'?: (props: {
29
+ title?: string;
30
+ }) => unknown;
31
+ 'header-description'?: (props: {
32
+ description?: string;
33
+ }) => unknown;
34
+ 'header-suffix'?: () => unknown;
35
+ dock?: (props: SaberAppLayoutNavigationSlotContext) => unknown;
36
+ };
37
+ refs: {
38
+ suffixTarget: HTMLDivElement;
39
+ menuButton: unknown;
40
+ };
41
+ rootEl: HTMLDivElement;
42
+ };
43
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
44
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
45
+ searchSelect: (payload: SaberNavigationSelectPayload) => any;
46
+ "update:drawerOpen": (value: boolean) => any;
47
+ "update:searchOpen": (value: boolean) => any;
48
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
49
+ onSearchSelect?: ((payload: SaberNavigationSelectPayload) => any) | undefined;
50
+ "onUpdate:drawerOpen"?: ((value: boolean) => any) | undefined;
51
+ "onUpdate:searchOpen"?: ((value: boolean) => any) | undefined;
52
+ }>, {
53
+ title: string;
54
+ description: string;
55
+ ui: import('./SaberAppLayout.types').SaberAppLayoutUI;
56
+ maxWidth: import('./SaberAppLayout.types').SaberAppLayoutMaxWidth;
57
+ navigationKey: string | number;
58
+ sidebarWidth: number | string;
59
+ phoneBreakpoint: number;
60
+ padBreakpoint: number;
61
+ searchGroups: import('../..').SaberNavigationSearchGroup[];
62
+ searchShortcut: string;
63
+ searchLabel: string;
64
+ menuOpenLabel: string;
65
+ menuCloseLabel: string;
66
+ menuOpenIcon: string;
67
+ menuCloseIcon: string;
68
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
69
+ suffixTarget: HTMLDivElement;
70
+ menuButton: unknown;
71
+ }, HTMLDivElement>;
72
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
73
+ export default _default;
74
+ type __VLS_WithTemplateSlots<T, S> = T & {
75
+ new (): {
76
+ $slots: S;
77
+ };
78
+ };
@@ -49,6 +49,7 @@ export interface SaberAppSidebarUI {
49
49
  viewport?: string;
50
50
  panel?: string;
51
51
  sectionList?: string;
52
+ rootFooter?: string;
52
53
  group?: string;
53
54
  groupLabel?: string;
54
55
  childList?: string;
@@ -16,6 +16,7 @@ declare function __VLS_template(): {
16
16
  'search-empty'?(_: {
17
17
  searchTerm: string;
18
18
  }): any;
19
+ 'root-footer'?(_: {}): any;
19
20
  footer?(_: {}): any;
20
21
  };
21
22
  refs: {};
@@ -1,19 +1,21 @@
1
- import { reactive as c, provide as i, inject as o, watchEffect as d, toValue as r, onBeforeUnmount as s, ref as u } from "vue";
2
- const n = Symbol("saber-page-header-state"), a = Symbol("saber-page-header-suffix-target");
1
+ import { reactive as c, provide as o, inject as r, watchEffect as u, toValue as i, onBeforeUnmount as d, ref as f } from "vue";
2
+ const n = Symbol.for("@owocow/saber-ui:page-header-state"), a = Symbol.for(
3
+ "@owocow/saber-ui:page-header-suffix-target"
4
+ );
3
5
  function l(t) {
4
6
  const e = c({ title: void 0, description: void 0 });
5
- return i(n, e), i(a, t), e;
7
+ return o(n, e), o(a, t), e;
6
8
  }
7
9
  function E(t) {
8
- const e = o(n, null);
9
- e && (d(() => {
10
- e.title = r(t.title), e.description = r(t.description);
11
- }), s(() => {
10
+ const e = r(n, null);
11
+ e && (u(() => {
12
+ e.title = i(t.title), e.description = i(t.description);
13
+ }), d(() => {
12
14
  e.title = void 0, e.description = void 0;
13
15
  }));
14
16
  }
15
17
  function p() {
16
- return o(a, u(null));
18
+ return r(a, f(null));
17
19
  }
18
20
  export {
19
21
  l as providePageHeader,
@@ -0,0 +1,33 @@
1
+ export declare const SABER_CONTROL_SIZE_CONFIG: {
2
+ readonly xs: {
3
+ readonly height: "h-6";
4
+ readonly square: "size-6";
5
+ readonly paginationButtons: "[&_button]:h-6";
6
+ readonly nuxtSize: "xs";
7
+ };
8
+ readonly sm: {
9
+ readonly height: "h-7";
10
+ readonly square: "size-7";
11
+ readonly paginationButtons: "[&_button]:h-7";
12
+ readonly nuxtSize: "sm";
13
+ };
14
+ readonly sl: {
15
+ readonly height: "h-8";
16
+ readonly square: "size-8";
17
+ readonly paginationButtons: "[&_button]:h-8";
18
+ readonly nuxtSize: "sm";
19
+ };
20
+ readonly md: {
21
+ readonly height: "h-9";
22
+ readonly square: "size-9";
23
+ readonly paginationButtons: "[&_button]:h-9";
24
+ readonly nuxtSize: "md";
25
+ };
26
+ readonly lg: {
27
+ readonly height: "h-10";
28
+ readonly square: "size-10";
29
+ readonly paginationButtons: "[&_button]:h-10";
30
+ readonly nuxtSize: "lg";
31
+ };
32
+ };
33
+ export type SaberControlSize = keyof typeof SABER_CONTROL_SIZE_CONFIG;
@@ -1,8 +1,10 @@
1
+ import { SaberControlSize } from '../../control-size';
1
2
  import { FilterField } from '../types';
2
3
  type __VLS_Props = {
3
4
  fields: FilterField[];
4
5
  /** 与该值相同的字段视为未筛选。 */
5
6
  initialParams?: Record<string, unknown> | null;
7
+ size?: SaberControlSize;
6
8
  };
7
9
  type __VLS_PublicProps = {
8
10
  modelValue?: Record<string, unknown>;
@@ -30,6 +32,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
30
32
  onReset?: (() => any) | undefined;
31
33
  onRefresh?: (() => any) | undefined;
32
34
  }>, {
35
+ size: SaberControlSize;
33
36
  initialParams: Record<string, unknown> | null;
34
37
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
35
38
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,3 +1,4 @@
1
+ import { SaberControlSize } from '../../control-size';
1
2
  import { FormField, FormSubmitHandler, FormValidator } from '../types';
2
3
  declare const _default: <T extends Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
@@ -17,6 +18,7 @@ declare const _default: <T extends Record<string, unknown>>(__VLS_props: NonNull
17
18
  cancelLabel?: string;
18
19
  submitLabel?: string;
19
20
  closeOnSuccess?: boolean;
21
+ fieldSize?: SaberControlSize;
20
22
  }) & Partial<{}>> & import('vue').PublicProps;
21
23
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
22
24
  attrs: any;
@@ -1,10 +1,14 @@
1
1
  import { DistrictNode, DistrictValue } from '../../types';
2
+ type SaberDistrictSelectSize = 'xs' | 'sm' | 'md' | 'lg';
3
+ type SaberDistrictSelectUI = Record<string, string | undefined>;
2
4
  type __VLS_Props = {
3
5
  districts?: readonly DistrictNode[];
4
6
  placeholder?: string;
5
7
  clearable?: boolean;
6
8
  disabled?: boolean;
7
9
  loading?: boolean;
10
+ size?: SaberDistrictSelectSize;
11
+ ui?: SaberDistrictSelectUI;
8
12
  };
9
13
  type __VLS_PublicProps = {
10
14
  modelValue?: DistrictValue | undefined;
@@ -23,6 +27,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
23
27
  }>, {
24
28
  loading: boolean;
25
29
  placeholder: string;
30
+ size: SaberDistrictSelectSize;
26
31
  disabled: boolean;
27
32
  clearable: boolean;
28
33
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
@@ -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;
20
- multiple: boolean;
22
+ size: SaberControlSize;
23
+ items: PopSelectOption[];
21
24
  disabled: boolean;
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;
@@ -102,9 +102,9 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
102
102
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
103
103
  onRemoveError?: ((error: Error, value: any) => any) | undefined;
104
104
  }>, {
105
- multiple: boolean;
106
- disabled: boolean;
107
105
  size: string;
106
+ disabled: boolean;
107
+ multiple: boolean;
108
108
  dataSource: UploadImageDataSource<any>;
109
109
  max: number;
110
110
  maxSize: number;
@@ -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
  };