savor-ui 0.2.0 → 0.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/es/components/index.d.ts +1 -0
  3. package/dist/es/components/index.mjs +5 -3
  4. package/dist/es/components/src/anchor/anchor.vue_vue_type_script_setup_true_vapor_true_lang.mjs +46 -35
  5. package/dist/es/components/src/avatar/types.d.ts +1 -1
  6. package/dist/es/components/src/button/button.vue_vue_type_script_setup_true_vapor_true_lang.mjs +29 -32
  7. package/dist/es/components/src/color-picker/color-picker.vue_vue_type_script_setup_true_vapor_true_lang.mjs +91 -94
  8. package/dist/es/components/src/config-provider/config-provider.d.ts +9 -17
  9. package/dist/es/components/src/config-provider/config-provider.vue.mjs +1 -1
  10. package/dist/es/components/src/config-provider/config-provider.vue_vue_type_script_setup_true_lang.mjs +24 -0
  11. package/dist/es/components/src/config-provider/index.d.ts +17 -20
  12. package/dist/es/components/src/config-provider-vapor/config-provider-vapor.d.ts +20 -0
  13. package/dist/es/components/src/config-provider-vapor/config-provider-vapor.vue.mjs +5 -0
  14. package/dist/es/components/src/{config-provider/config-provider.vue_vue_type_script_setup_true_vapor_true_lang.mjs → config-provider-vapor/config-provider-vapor.vue_vue_type_script_setup_true_vapor_true_lang.mjs} +4 -4
  15. package/dist/es/components/src/config-provider-vapor/index.d.ts +21 -0
  16. package/dist/es/components/src/config-provider-vapor/index.mjs +8 -0
  17. package/dist/es/components/src/config-provider-vapor/types.d.ts +17 -0
  18. package/dist/es/components/src/config-provider-vapor/types.mjs +4 -0
  19. package/dist/es/components/src/drawer/drawer.vue_vue_type_script_setup_true_vapor_true_lang.mjs +4 -4
  20. package/dist/es/components/src/dropdown/doption.vue_vue_type_script_setup_true_vapor_true_lang.mjs +20 -23
  21. package/dist/es/components/src/dropdown/dsubmenu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +27 -30
  22. package/dist/es/components/src/layout/index.d.ts +1 -0
  23. package/dist/es/components/src/layout/layout.vue_vue_type_script_setup_true_vapor_true_lang.mjs +11 -5
  24. package/dist/es/components/src/layout/types.d.ts +2 -0
  25. package/dist/es/components/src/message/types.d.ts +2 -2
  26. package/dist/es/components/src/scrollbar/index.d.ts +3 -0
  27. package/dist/es/components/src/scrollbar/scrollbar.vue_vue_type_script_setup_true_vapor_true_lang.mjs +35 -29
  28. package/dist/es/components/src/scrollbar/types.d.ts +7 -0
  29. package/dist/es/components/src/select/index.d.ts +6 -5
  30. package/dist/es/components/src/select/select.d.ts +5 -5
  31. package/dist/es/components/src/select/select.vue_vue_type_script_setup_true_vapor_true_lang.mjs +189 -125
  32. package/dist/es/components/src/select/types.d.ts +6 -4
  33. package/dist/es/components/src/space/index.d.ts +1 -0
  34. package/dist/es/components/src/space/space.vue_vue_type_script_setup_true_vapor_true_lang.mjs +3 -1
  35. package/dist/es/components/src/space/types.d.ts +2 -0
  36. package/dist/es/components/src/table/table.vue_vue_type_script_setup_true_vapor_true_lang.mjs +10 -12
  37. package/dist/es/components/src/table/types.d.ts +2 -2
  38. package/dist/es/core/components.mjs +66 -64
  39. package/dist/es/core/global.d.ts +1 -0
  40. package/dist/es/core/index.mjs +61 -59
  41. package/dist/es/hooks/index.d.ts +0 -1
  42. package/dist/es/hooks/index.mjs +0 -1
  43. package/dist/es/theme/components/button.scss +22 -3
  44. package/dist/es/theme/components/cascader.scss +3 -0
  45. package/dist/es/theme/components/collapse.scss +16 -17
  46. package/dist/es/theme/components/color-picker.scss +4 -1
  47. package/dist/es/theme/components/dropdown.scss +34 -24
  48. package/dist/es/theme/components/layout.scss +0 -1
  49. package/dist/es/theme/components/pagination.scss +5 -0
  50. package/dist/es/theme/components/segmented.scss +1 -1
  51. package/dist/es/theme/components/select.scss +92 -1
  52. package/dist/es/theme/components/space.scss +4 -0
  53. package/dist/es/theme/components/tabs.scss +3 -3
  54. package/dist/es/theme/components/wheel.scss +12 -9
  55. package/dist/es/theme/mixins/function.scss +9 -4
  56. package/dist/es/utils/src/theme/themeMap.mjs +4 -4
  57. package/dist/json/vetur-attributes.json +28 -2
  58. package/dist/json/vetur-tags.json +15 -4
  59. package/dist/json/web-types.json +75 -3
  60. package/package.json +1 -1
  61. package/dist/es/hooks/src/use-ripple.d.ts +0 -15
  62. package/dist/es/hooks/src/use-ripple.mjs +0 -86
@@ -0,0 +1,24 @@
1
+ import { initTheme as e } from "../../../utils/src/theme/themeMap.mjs";
2
+ import "../../../utils/index.mjs";
3
+ import { configProviderContextKey as t } from "./types.mjs";
4
+ import { defineComponent as n, provide as r, renderSlot as i, toRefs as a, watch as o } from "vue";
5
+ //#region ../components/src/config-provider/config-provider.vue?vue&type=script&setup=true&lang.ts
6
+ var s = /* @__PURE__ */ n({
7
+ name: "SConfigProvider",
8
+ __name: "config-provider",
9
+ props: {
10
+ inputFilled: { type: Boolean },
11
+ theme: {}
12
+ },
13
+ setup(n) {
14
+ let s = n, { inputFilled: c } = a(s);
15
+ return r(t, { inputFilled: c }), o(() => s.theme, (t) => {
16
+ e(t?.lightTheme, t?.darkTheme);
17
+ }, {
18
+ immediate: !0,
19
+ deep: !0
20
+ }), (e, t) => i(e.$slots, "default");
21
+ }
22
+ });
23
+ //#endregion
24
+ export { s as default };
@@ -1,21 +1,18 @@
1
- import { ConfigProviderSlots, ConfigProviderTheme } from './types';
2
- import { PublicProps, VNode, Plugin } from 'vue';
3
- export declare const SConfigProvider: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
4
- attrs: any;
5
- slots: ConfigProviderSlots;
6
- emit: {};
7
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
8
- props: PublicProps & {
9
- inputFilled?: boolean | undefined;
10
- theme?: ConfigProviderTheme | undefined;
11
- } & (typeof globalThis extends {
12
- __VLS_PROPS_FALLBACK: infer P;
13
- } ? P : {});
14
- expose: (exposed: {}) => void;
15
- attrs: any;
16
- slots: ConfigProviderSlots;
17
- emit: {};
18
- }>) => VNode & {
19
- __ctx?: Awaited<typeof __VLS_setup>;
1
+ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
2
+ import { ConfigProviderProps, ConfigProviderSlots } from './types.js';
3
+ export declare const SConfigProvider: {
4
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ConfigProviderProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
5
+ P: {};
6
+ B: {};
7
+ D: {};
8
+ C: {};
9
+ M: {};
10
+ Defaults: {};
11
+ }, Readonly< ConfigProviderProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
12
+ __isFragment?: never;
13
+ __isTeleport?: never;
14
+ __isSuspense?: never;
15
+ } & ComponentOptionsBase<Readonly< ConfigProviderProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
16
+ $slots: ConfigProviderSlots;
20
17
  }) & Plugin;
21
- export * from './types';
18
+ export * from './types.js';
@@ -0,0 +1,20 @@
1
+ import { ConfigProviderVaporProps, ConfigProviderVaporSlots } from './types';
2
+ import { PublicProps, VNode } from 'vue';
3
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: PublicProps & __VLS_PrettifyLocal<ConfigProviderVaporProps> & (typeof globalThis extends {
5
+ __VLS_PROPS_FALLBACK: infer P;
6
+ } ? P : {});
7
+ expose: (exposed: {}) => void;
8
+ attrs: any;
9
+ slots: ConfigProviderVaporSlots;
10
+ emit: {};
11
+ }>) => VNode & {
12
+ __ctx?: Awaited<typeof __VLS_setup>;
13
+ };
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
17
+ [K in keyof T]: T[K];
18
+ } : {
19
+ [K in keyof T as K]: T[K];
20
+ }) & {};
@@ -0,0 +1,5 @@
1
+ import e from "./config-provider-vapor.vue_vue_type_script_setup_true_vapor_true_lang.mjs";
2
+ //#region ../components/src/config-provider-vapor/config-provider-vapor.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -1,11 +1,11 @@
1
1
  import { initTheme as e } from "../../../utils/src/theme/themeMap.mjs";
2
2
  import "../../../utils/index.mjs";
3
- import { configProviderContextKey as t } from "./types.mjs";
3
+ import { configProviderVaporContextKey as t } from "./types.mjs";
4
4
  import { createSlot as n, defineVaporComponent as r, provide as i, toRefs as a, watch as o } from "vue";
5
- //#region ../components/src/config-provider/config-provider.vue?vue&type=script&setup=true&vapor=true&lang.ts
5
+ //#region ../components/src/config-provider-vapor/config-provider-vapor.vue?vue&type=script&setup=true&vapor=true&lang.ts
6
6
  var s = /* @__PURE__ */ r({
7
- name: "SConfigProvider",
8
- __name: "config-provider",
7
+ name: "SConfigProviderVapor",
8
+ __name: "config-provider-vapor",
9
9
  props: {
10
10
  inputFilled: { type: Boolean },
11
11
  theme: {}
@@ -0,0 +1,21 @@
1
+ import { ConfigProviderVaporSlots, ConfigProviderVaporTheme } from './types';
2
+ import { PublicProps, VNode, Plugin } from 'vue';
3
+ export declare const SConfigProviderVapor: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
4
+ attrs: any;
5
+ slots: ConfigProviderVaporSlots;
6
+ emit: {};
7
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
8
+ props: PublicProps & {
9
+ inputFilled?: boolean | undefined;
10
+ theme?: ConfigProviderVaporTheme | undefined;
11
+ } & (typeof globalThis extends {
12
+ __VLS_PROPS_FALLBACK: infer P;
13
+ } ? P : {});
14
+ expose: (exposed: {}) => void;
15
+ attrs: any;
16
+ slots: ConfigProviderVaporSlots;
17
+ emit: {};
18
+ }>) => VNode & {
19
+ __ctx?: Awaited<typeof __VLS_setup>;
20
+ }) & Plugin;
21
+ export * from './types';
@@ -0,0 +1,8 @@
1
+ import { withInstall as e } from "../../../utils/src/install.mjs";
2
+ import "../../../utils/index.mjs";
3
+ import "./types.mjs";
4
+ import t from "./config-provider-vapor.vue.mjs";
5
+ //#region ../components/src/config-provider-vapor/index.ts
6
+ var n = e(t);
7
+ //#endregion
8
+ export { n as SConfigProviderVapor };
@@ -0,0 +1,17 @@
1
+ import { ThemeTokens } from '../../../utils/index.ts';
2
+ import { InjectionKey, Ref } from 'vue';
3
+ export interface ConfigProviderVaporTheme {
4
+ lightTheme?: Partial<ThemeTokens>;
5
+ darkTheme?: Partial<ThemeTokens>;
6
+ }
7
+ export interface ConfigProviderVaporProps {
8
+ inputFilled?: boolean;
9
+ theme?: ConfigProviderVaporTheme;
10
+ }
11
+ export interface ConfigProviderVaporSlots {
12
+ default?: () => any;
13
+ }
14
+ export interface ConfigProviderVaporContext {
15
+ inputFilled?: Ref<boolean>;
16
+ }
17
+ export declare const configProviderVaporContextKey: InjectionKey<ConfigProviderVaporContext>;
@@ -0,0 +1,4 @@
1
+ //#region ../components/src/config-provider-vapor/types.ts
2
+ var e = Symbol("configProviderVaporContextKey");
3
+ //#endregion
4
+ export { e as configProviderVaporContextKey };
@@ -6,8 +6,8 @@ import { useZIndex as r } from "../../../hooks/src/use-zIndex.mjs";
6
6
  import "../../../hooks/index.mjs";
7
7
  import i from "../../../icons/src/close.vue.mjs";
8
8
  import "../../../icons/index.mjs";
9
- import a from "../scrollbar/scrollbar.vue.mjs";
10
- import ee from "../button/button.vue.mjs";
9
+ import a from "../button/button.vue.mjs";
10
+ import ee from "../scrollbar/scrollbar.vue.mjs";
11
11
  import o from "../_comp/OpacityTransition.vue.mjs";
12
12
  import s from "../_comp/SideTransition.vue.mjs";
13
13
  import { VaporTeleport as te, applyVShow as c, child as l, computed as u, createComponent as d, createIf as f, createInvoker as p, createSlot as m, createTemplateRefSetter as h, defineVaporComponent as g, delegateEvents as _, mergeModels as v, next as y, nextTick as b, onMounted as ne, onUnmounted as re, ref as x, renderEffect as S, setClass as C, setInsertionState as w, setStyle as T, setText as ie, template as E, toDisplayString as ae, txt as oe, unref as D, useModel as se, watch as O, withVaporCtx as k } from "vue";
@@ -176,12 +176,12 @@ var N = /* @__PURE__ */ g({
176
176
  return S(() => {
177
177
  C(e, [D(N).e("title")]), ie(t, ae(g.header));
178
178
  }), e;
179
- }), w(n, null, 1), f(() => g.closable, () => d(ee, {
179
+ }), w(n, null, 1), f(() => g.closable, () => d(a, {
180
180
  circle: () => "",
181
181
  text: () => "",
182
182
  size: () => "small",
183
183
  onClick: () => G
184
- }, { icon: k(() => d(D(i))) }), null, 1), S(() => C(r, [D(N).e("body")])), w(r, null, 0), f(() => g.bodyScroll, () => d(a, { $: [() => ({ ...g.scrollbarProps })] }, { default: k(() => {
184
+ }, { icon: k(() => d(D(i))) }), null, 1), S(() => C(r, [D(N).e("body")])), w(r, null, 0), f(() => g.bodyScroll, () => d(ee, { $: [() => ({ ...g.scrollbarProps })] }, { default: k(() => {
185
185
  let e = A();
186
186
  return S(() => C(e, [D(N).e("content")])), w(e, null, 0), m("default", null), e;
187
187
  }) }), () => {
@@ -1,33 +1,30 @@
1
1
  import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
2
- import { useRipple as t } from "../../../hooks/src/use-ripple.mjs";
3
2
  import "../../../hooks/index.mjs";
4
- import { dropdownContextKey as n } from "./types.mjs";
5
- import { child as r, createIf as i, createInvoker as a, createSlot as o, createTemplateRefSetter as s, defineVaporComponent as c, delegateEvents as l, inject as u, renderEffect as d, setClass as f, setInsertionState as p, setText as m, template as h, toDisplayString as g, unref as _, useTemplateRef as v } from "vue";
3
+ import { dropdownContextKey as t } from "./types.mjs";
4
+ import { child as n, createIf as r, createInvoker as i, createSlot as a, defineVaporComponent as o, delegateEvents as s, inject as c, renderEffect as l, setClass as u, setInsertionState as d, setText as f, template as p, toDisplayString as m, unref as h } from "vue";
6
5
  //#region ../components/src/dropdown/doption.vue?vue&type=script&setup=true&vapor=true&lang.ts
7
- var y = h("<div>"), b = h(" "), x = h("<div><div></div>", !0);
8
- l("click");
9
- var S = /* @__PURE__ */ c({
6
+ var g = p("<div>"), _ = p(" "), v = p("<div><div></div>", !0);
7
+ s("click");
8
+ var y = /* @__PURE__ */ o({
10
9
  name: "SDoption",
11
10
  __name: "doption",
12
11
  props: { title: {} },
13
12
  __multiRoot: !1,
14
- setup(c, { slots: l }) {
15
- let h = e("droption"), S = v("droptionRef");
16
- t(S);
17
- let C = u(n, void 0), w = () => {
18
- C?.itemClick?.();
19
- }, T = s(), E = x(), D = r(E, 1);
20
- return d(() => f(E, [_(h).b()])), p(E, 0, 0), i(() => l.icon, () => {
21
- let e = y();
22
- return d(() => f(e, [_(h).e("icon")])), p(e, null, 0), o("icon", null), e;
23
- }, null, 1), d(() => f(D, [_(h).e("title")])), p(D, null, 0), o("default", null, () => {
24
- let e = b();
25
- return d(() => m(e, g(c.title))), e;
26
- }), p(E, null, 2), i(() => l.extra, () => {
27
- let e = y();
28
- return d(() => f(e, [_(h).e("extra")])), p(e, null, 0), o("extra", null), e;
29
- }, null, 1), E.$evtclick = a(w), T(E, S, null, "droptionRef"), E;
13
+ setup(o, { slots: s }) {
14
+ let p = e("droption"), y = c(t, void 0), b = () => {
15
+ y?.itemClick?.();
16
+ }, x = v(), S = n(x, 1);
17
+ return l(() => u(x, [h(p).b()])), d(x, 0, 0), r(() => s.icon, () => {
18
+ let e = g();
19
+ return l(() => u(e, [h(p).e("icon")])), d(e, null, 0), a("icon", null), e;
20
+ }, null, 1), l(() => u(S, [h(p).e("title")])), d(S, null, 0), a("default", null, () => {
21
+ let e = _();
22
+ return l(() => f(e, m(o.title))), e;
23
+ }), d(x, null, 2), r(() => s.extra, () => {
24
+ let e = g();
25
+ return l(() => u(e, [h(p).e("extra")])), d(e, null, 0), a("extra", null), e;
26
+ }, null, 1), x.$evtclick = i(b), x;
30
27
  }
31
28
  });
32
29
  //#endregion
33
- export { S as default };
30
+ export { y as default };
@@ -1,15 +1,14 @@
1
1
  import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
2
- import { useRipple as t } from "../../../hooks/src/use-ripple.mjs";
3
2
  import "../../../hooks/index.mjs";
4
- import n from "../../../icons/src/right.vue.mjs";
3
+ import t from "../../../icons/src/right.vue.mjs";
5
4
  import "../../../icons/index.mjs";
6
- import { SPopover as r } from "../popover/index.mjs";
7
- import { dropdownContextKey as i } from "./types.mjs";
8
- import { child as a, createComponent as o, createIf as s, createInvoker as c, createSlot as l, createTemplateRefSetter as u, defineVaporComponent as d, delegateEvents as f, inject as p, next as m, renderEffect as h, setClass as g, setInsertionState as _, setText as v, template as y, toDisplayString as b, unref as x, useTemplateRef as S, withVaporCtx as C } from "vue";
5
+ import { SPopover as n } from "../popover/index.mjs";
6
+ import { dropdownContextKey as r } from "./types.mjs";
7
+ import { child as i, createComponent as a, createIf as o, createInvoker as s, createSlot as c, defineVaporComponent as l, delegateEvents as u, inject as d, next as f, renderEffect as p, setClass as m, setInsertionState as h, setText as g, template as _, toDisplayString as v, unref as y, withVaporCtx as b } from "vue";
9
8
  //#region ../components/src/dropdown/dsubmenu.vue?vue&type=script&setup=true&vapor=true&lang.ts
10
- var w = y("<div>"), T = y(" "), E = y("<div><div></div><div></div></div>"), D = y("<div>", !0);
11
- f("click");
12
- var O = /* @__PURE__ */ d({
9
+ var x = _("<div>"), S = _(" "), C = _("<div><div></div><div></div></div>"), w = _("<div>", !0);
10
+ u("click");
11
+ var T = /* @__PURE__ */ l({
13
12
  name: "SDsubmenu",
14
13
  __name: "dsubmenu",
15
14
  props: {
@@ -17,34 +16,32 @@ var O = /* @__PURE__ */ d({
17
16
  popoverProps: {}
18
17
  },
19
18
  __multiRoot: !1,
20
- setup(d, { slots: f }) {
21
- let y = e("dsubmenu"), O = S("dsubmenuRef");
22
- t(O);
23
- let k = p(i, void 0), A = () => {
24
- k?.itemClick?.();
25
- }, j = u(), M = D();
26
- return h(() => g(M, [x(y).b()])), _(M, null, 0), o(x(r), { $: [() => ({
19
+ setup(l, { slots: u }) {
20
+ let _ = e("dsubmenu"), T = d(r, void 0), E = () => {
21
+ T?.itemClick?.();
22
+ }, D = w();
23
+ return p(() => m(D, [y(_).b()])), h(D, null, 0), a(y(n), { $: [() => ({
27
24
  teleportBody: !1,
28
25
  trigger: "hover",
29
26
  placement: "right-start",
30
- ...d.popoverProps
27
+ ...l.popoverProps
31
28
  })] }, {
32
- content: C(() => {
33
- let e = w();
34
- return h(() => g(e, x(y).e("list"))), _(e, null, 0), l("content", null), e;
29
+ content: b(() => {
30
+ let e = x();
31
+ return p(() => m(e, y(_).e("list"))), h(e, null, 0), c("content", null), e;
35
32
  }),
36
- default: C(() => {
37
- let e = E(), t = a(e, 1), r = m(t, 2);
38
- return h(() => g(e, x(y).e("item"))), _(e, 0, 0), s(() => f.icon, () => {
39
- let e = w();
40
- return h(() => g(e, [x(y).e("icon")])), _(e, null, 0), l("icon", null), e;
41
- }, null, 1), h(() => g(t, [x(y).e("title")])), _(t, null, 0), l("title", null, () => {
42
- let e = T();
43
- return h(() => v(e, b(d.title))), e;
44
- }), h(() => g(r, [x(y).e("arrow")])), _(r, null, 0), o(x(n)), e.$evtclick = c(A), j(e, O, null, "dsubmenuRef"), e;
33
+ default: b(() => {
34
+ let e = C(), n = i(e, 1), r = f(n, 2);
35
+ return p(() => m(e, y(_).e("item"))), h(e, 0, 0), o(() => u.icon, () => {
36
+ let e = x();
37
+ return p(() => m(e, [y(_).e("icon")])), h(e, null, 0), c("icon", null), e;
38
+ }, null, 1), p(() => m(n, [y(_).e("title")])), h(n, null, 0), c("title", null, () => {
39
+ let e = S();
40
+ return p(() => g(e, v(l.title))), e;
41
+ }), p(() => m(r, [y(_).e("arrow")])), h(r, null, 0), a(y(t)), e.$evtclick = s(E), e;
45
42
  })
46
- }), M;
43
+ }), D;
47
44
  }
48
45
  });
49
46
  //#endregion
50
- export { O as default };
47
+ export { T as default };
@@ -9,6 +9,7 @@ export declare const SLayout: ((__VLS_props: NonNullable<Awaited<typeof __VLS_se
9
9
  }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
10
10
  props: PublicProps & {
11
11
  height?: string | number | undefined;
12
+ bgColor?: string | undefined;
12
13
  } & (typeof globalThis extends {
13
14
  __VLS_PROPS_FALLBACK: infer P;
14
15
  } ? P : {});
@@ -8,14 +8,20 @@ import { computed as r, createSlot as i, defineVaporComponent as a, renderEffect
8
8
  var p = u("<div>", !0), m = /* @__PURE__ */ a({
9
9
  name: "SLayout",
10
10
  __name: "layout",
11
- props: { height: { default: "100%" } },
11
+ props: {
12
+ height: { default: "100%" },
13
+ bgColor: {}
14
+ },
12
15
  __multiRoot: !1,
13
16
  setup(a) {
14
- let u = t("layout"), m = f(), h = r(() => (m.default?.({}) || []).some((e) => e.type === n)), g = p();
17
+ let u = a, m = t("layout"), h = f(), g = r(() => ({
18
+ height: e(u.height),
19
+ backgroundColor: u.bgColor
20
+ })), _ = r(() => (h.default?.({}) || []).some((e) => e.type === n)), v = p();
15
21
  return o(() => {
16
- let t = d(u);
17
- s(g, [t.b(), t.is("horizontal", h.value)]), l(g, { height: d(e)(a.height) });
18
- }), c(g, null, 0), i("default", null), g;
22
+ let e = d(m);
23
+ s(v, [e.b(), e.is("horizontal", _.value)]), l(v, g.value);
24
+ }), c(v, null, 0), i("default", null), v;
19
25
  }
20
26
  });
21
27
  //#endregion
@@ -1,6 +1,8 @@
1
1
  export interface LayoutProps {
2
2
  /** 布局高度 */
3
3
  height?: string | number;
4
+ /** 背景颜色 */
5
+ bgColor?: string;
4
6
  }
5
7
  export interface LayoutHeaderProps {
6
8
  /** 布局头高度 */
@@ -1,7 +1,7 @@
1
1
  import { VNode } from 'vue';
2
2
  export interface MessageProps {
3
3
  /** 消息类型
4
- * @default 'info'
4
+ * @default info
5
5
  */
6
6
  type?: "default" | "primary" | "success" | "danger" | "warning" | "info";
7
7
  /** 消息内容
@@ -19,7 +19,7 @@ export interface MessageProps {
19
19
  */
20
20
  offset?: number;
21
21
  /** 消息位置
22
- * @default 'top'
22
+ * @default top
23
23
  */
24
24
  placement?: "top" | "bottom" | "center";
25
25
  /** 是否开启悬停不关闭
@@ -1,5 +1,6 @@
1
1
  import { ScrollbarSlots, ScrollbarExpose } from './types';
2
2
  import { PublicProps, ShallowUnwrapRef, VNode, Plugin } from 'vue';
3
+ import { BackTopProps } from '../back-top';
3
4
  export declare const SScrollbar: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
4
5
  attrs: any;
5
6
  slots: ScrollbarSlots;
@@ -12,6 +13,8 @@ export declare const SScrollbar: ((__VLS_props: NonNullable<Awaited<typeof __VLS
12
13
  padding?: string | undefined;
13
14
  always?: boolean | undefined;
14
15
  id?: string | undefined;
16
+ backtop?: boolean | undefined;
17
+ backtopProps?: BackTopProps | undefined;
15
18
  } & (typeof globalThis extends {
16
19
  __VLS_PROPS_FALLBACK: infer P;
17
20
  } ? P : {});
@@ -2,11 +2,12 @@ import { getSize as e } from "../../../utils/src/tool.mjs";
2
2
  import "../../../utils/index.mjs";
3
3
  import { useNamespace as t } from "../../../hooks/src/use-namespace.mjs";
4
4
  import "../../../hooks/index.mjs";
5
- import { applyVShow as n, child as r, createInvoker as i, createSlot as a, createTemplateRefSetter as o, defineVaporComponent as s, delegateEvents as c, next as l, nextTick as u, on as d, onMounted as ee, onUnmounted as f, ref as p, renderEffect as m, setClass as h, setInsertionState as te, setProp as g, setStyle as _, template as v, unref as y, watch as ne } from "vue";
5
+ import { SBackTop as n } from "../back-top/index.mjs";
6
+ import { applyVShow as r, child as i, createComponent as a, createIf as o, createInvoker as s, createSlot as c, createTemplateRefSetter as ee, defineVaporComponent as l, delegateEvents as u, next as d, nextTick as f, on as te, onMounted as ne, onUnmounted as re, ref as p, renderEffect as m, setClass as h, setInsertionState as g, setProp as ie, setStyle as _, template as v, unref as y, useId as ae, watch as oe, withVaporCtx as se } from "vue";
6
7
  //#region ../components/src/scrollbar/scrollbar.vue?vue&type=script&setup=true&vapor=true&lang.ts
7
- var b = v("<div><div></div><div><div><div></div></div></div><div><div><div>", !0);
8
- c("mousedown");
9
- var x = /* @__PURE__ */ s({
8
+ var ce = v("<div><div></div><!><div><div><div></div></div></div><div><div><div>", !0);
9
+ u("mousedown");
10
+ var b = /* @__PURE__ */ l({
10
11
  name: "SScrollbar",
11
12
  __name: "scrollbar",
12
13
  props: {
@@ -15,11 +16,13 @@ var x = /* @__PURE__ */ s({
15
16
  maxHeight: { default: "" },
16
17
  padding: {},
17
18
  always: { type: Boolean },
18
- id: {}
19
+ id: {},
20
+ backtop: { type: Boolean },
21
+ backtopProps: {}
19
22
  },
20
23
  __multiRoot: !1,
21
- setup(s, { expose: c }) {
22
- let v = s, x = t("scrollbar"), S = p(null), C = p(null), w = p(null), T = p(!1), E = p(0), D = p(20), O = p(!1), k = p(0), A = p(20), j = p(!1), M = p(""), N = 0, P = 0, F = null, I = () => {
24
+ setup(l, { expose: u }) {
25
+ let v = l, b = t("scrollbar"), x = "scrollbar_" + ae(), S = p(null), C = p(null), w = p(null), T = p(!1), E = p(0), D = p(20), O = p(!1), k = p(0), A = p(20), j = p(!1), M = p(""), N = 0, P = 0, F = null, I = () => {
23
26
  F && clearTimeout(F), F = window.setTimeout(() => {
24
27
  L();
25
28
  }, 10);
@@ -65,8 +68,8 @@ var x = /* @__PURE__ */ s({
65
68
  }, V = () => {
66
69
  j.value = !1, M.value = "";
67
70
  }, H = p(null), U = p(null);
68
- ee(() => {
69
- u(() => {
71
+ ne(() => {
72
+ f(() => {
70
73
  L(), I();
71
74
  });
72
75
  let e = S.value?.parentElement;
@@ -79,9 +82,9 @@ var x = /* @__PURE__ */ s({
79
82
  subtree: !0,
80
83
  attributes: !0
81
84
  })), document.addEventListener("mousemove", B), document.addEventListener("mouseup", V);
82
- }), f(() => {
85
+ }), re(() => {
83
86
  F && clearTimeout(F), H.value?.disconnect(), U.value?.disconnect(), document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", V);
84
- }), ne([
87
+ }), oe([
85
88
  () => v.width,
86
89
  () => v.height,
87
90
  () => v.maxHeight,
@@ -95,9 +98,9 @@ var x = /* @__PURE__ */ s({
95
98
  top: Math.min(e, i),
96
99
  left: Math.min(t, a),
97
100
  behavior: n ? "smooth" : "auto"
98
- }), u(R);
101
+ }), f(R);
99
102
  };
100
- c({
103
+ u({
101
104
  scrollTo: W,
102
105
  scrollToEl: (e, t = !0) => {
103
106
  let n = S.value;
@@ -106,30 +109,33 @@ var x = /* @__PURE__ */ s({
106
109
  r && W(r.offsetTop, 0, t);
107
110
  }
108
111
  });
109
- let G = o(), K = b(), q = r(K), J = l(q, 1), Y = r(J), X = r(Y), Z = l(J, 2), Q = r(Z), $ = r(Q);
112
+ let G = ee(), K = ce(), q = i(K), J = d(q, 1), Y = d(J, 2), X = i(Y), Z = i(X), Q = d(Y, 3), le = i(Q), $ = i(le);
110
113
  return m(() => {
111
- let t = y(x), n = y(e);
114
+ let t = y(b), n = y(e);
112
115
  h(K, [t.b()]), _(K, {
113
- width: n(s.width),
114
- height: n(s.height)
116
+ width: n(l.width),
117
+ height: n(l.height)
115
118
  }), h(q, [t.e("content")]), _(q, {
116
- padding: s.padding,
117
- maxHeight: n(s.maxHeight)
118
- }), g(q, "id", s.id);
119
- }), te(q, null, 0), a("default", null), d(q, "scroll", i(R)), G(q, S, null, "contentRef"), G(X, C, null, "thumbYRef"), n(J, () => T.value), J.$evtmousedown = i((e) => z(e, "y")), G($, w, null, "thumbXRef"), n(Z, () => O.value), Z.$evtmousedown = i((e) => z(e, "x")), m(() => {
120
- let e = y(x), t = [e.e("track")], n = [e.e("thumb")];
121
- h(J, [
119
+ padding: l.padding,
120
+ maxHeight: n(l.maxHeight)
121
+ }), ie(q, "id", l.id || x);
122
+ }), g(q, null, 0), c("default", null), te(q, "scroll", s(R)), G(q, S, null, "contentRef"), g(K, J, 1), o(() => l.backtop, () => a(y(n), {
123
+ target: () => `#${l.id || x}`,
124
+ $: [() => l.backtopProps]
125
+ }, { default: se(() => c("backtop", null)) }), null, 1), G(Z, C, null, "thumbYRef"), r(Y, () => T.value), Y.$evtmousedown = s((e) => z(e, "y")), G($, w, null, "thumbXRef"), r(Q, () => O.value), Q.$evtmousedown = s((e) => z(e, "x")), m(() => {
126
+ let e = y(b), t = [e.e("track")], n = [e.e("thumb")];
127
+ h(Y, [
122
128
  e.e("scroll-bar"),
123
129
  e.e("y"),
124
- { [e.m("always")]: s.always }
125
- ]), h(Y, t), h(X, n), _(X, {
130
+ { [e.m("always")]: l.always }
131
+ ]), h(X, t), h(Z, n), _(Z, {
126
132
  top: E.value + "px",
127
133
  height: D.value + "px"
128
- }), h(Z, [
134
+ }), h(Q, [
129
135
  e.e("scroll-bar"),
130
136
  e.e("x"),
131
- { [e.m("always")]: s.always }
132
- ]), h(Q, t), h($, n), _($, {
137
+ { [e.m("always")]: l.always }
138
+ ]), h(le, t), h($, n), _($, {
133
139
  left: k.value + "px",
134
140
  width: A.value + "px"
135
141
  });
@@ -137,4 +143,4 @@ var x = /* @__PURE__ */ s({
137
143
  }
138
144
  });
139
145
  //#endregion
140
- export { x as default };
146
+ export { b as default };
@@ -1,3 +1,4 @@
1
+ import { BackTopProps } from '../back-top';
1
2
  export interface ScrollbarProps {
2
3
  /** 滚动条宽度 */
3
4
  width?: string | number;
@@ -11,10 +12,16 @@ export interface ScrollbarProps {
11
12
  always?: boolean;
12
13
  /** 滚动容器id */
13
14
  id?: string;
15
+ /** 是否显示返回顶部按钮 */
16
+ backtop?: boolean;
17
+ /** 返回顶部按钮属性 */
18
+ backtopProps?: BackTopProps;
14
19
  }
15
20
  export interface ScrollbarSlots {
16
21
  /** 默认 */
17
22
  default?: () => any;
23
+ /** 返回顶部按钮 */
24
+ backtop?: () => any;
18
25
  }
19
26
  export interface ScrollbarExpose {
20
27
  /** 滚动到指定位置 */
@@ -4,13 +4,14 @@ import { PopoverProps } from '../popover';
4
4
  export declare const SSelect: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
5
5
  attrs: any;
6
6
  slots: SelectSlots;
7
- emit: (((evt: "clear") => void) & ((evt: "change", value: string | number | boolean) => void) & ((evt: "selectOption", option: any) => void)) & ((event: "update:modelValue", value: string | number | boolean) => void);
7
+ emit: (((evt: "clear") => void) & ((evt: "change", value: string | number | boolean | (string | number | boolean)[]) => void) & ((evt: "remove", value: string | number | boolean) => void)) & ((event: "update:modelValue", value: string | number | boolean | (string | number | boolean)[]) => void);
8
8
  }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
9
9
  props: PublicProps & {
10
10
  modelValue?: any;
11
11
  size?: "mini" | "small" | "medium" | "large" | undefined;
12
12
  placeholder?: string | undefined;
13
13
  options: any[];
14
+ multiple?: boolean | undefined;
14
15
  clearable?: boolean | undefined;
15
16
  maxHeight?: string | undefined;
16
17
  disabled?: boolean | undefined;
@@ -26,16 +27,16 @@ export declare const SSelect: ((__VLS_props: NonNullable<Awaited<typeof __VLS_se
26
27
  remoteMethod?: ((value: string) => Promise<any[]>) | undefined;
27
28
  popoverProps?: Partial< PopoverProps> | undefined;
28
29
  onClear?: (() => any) | undefined;
29
- onChange?: ((value: string | number | boolean) => any) | undefined;
30
- "onUpdate:modelValue"?: ((value: string | number | boolean) => any) | undefined;
31
- onSelectOption?: ((option: any) => any) | undefined;
30
+ onChange?: ((value: string | number | boolean | (string | number | boolean)[]) => any) | undefined;
31
+ onRemove?: ((value: string | number | boolean) => any) | undefined;
32
+ "onUpdate:modelValue"?: ((value: string | number | boolean | (string | number | boolean)[]) => any) | undefined;
32
33
  } & (typeof globalThis extends {
33
34
  __VLS_PROPS_FALLBACK: infer P;
34
35
  } ? P : {});
35
36
  expose: (exposed: ShallowUnwrapRef<SelectExpose>) => void;
36
37
  attrs: any;
37
38
  slots: SelectSlots;
38
- emit: (((evt: "clear") => void) & ((evt: "change", value: string | number | boolean) => void) & ((evt: "selectOption", option: any) => void)) & ((event: "update:modelValue", value: string | number | boolean) => void);
39
+ emit: (((evt: "clear") => void) & ((evt: "change", value: string | number | boolean | (string | number | boolean)[]) => void) & ((evt: "remove", value: string | number | boolean) => void)) & ((event: "update:modelValue", value: string | number | boolean | (string | number | boolean)[]) => void);
39
40
  }>) => VNode & {
40
41
  __ctx?: Awaited<typeof __VLS_setup>;
41
42
  }) & Plugin;
@@ -2,19 +2,19 @@ import { SelectExpose, SelectProps, SelectSlots } from './types';
2
2
  import { PublicProps, ShallowUnwrapRef, VNode } from 'vue';
3
3
  declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
4
  props: PublicProps & __VLS_PrettifyLocal<(SelectProps & {
5
- modelValue?: string | number | boolean;
5
+ modelValue?: string | number | boolean | (string | number | boolean)[];
6
6
  }) & {
7
7
  onClear?: (() => any) | undefined;
8
- onChange?: ((value: string | number | boolean) => any) | undefined;
9
- "onUpdate:modelValue"?: ((value: string | number | boolean) => any) | undefined;
10
- onSelectOption?: ((option: any) => any) | undefined;
8
+ onChange?: ((value: string | number | boolean | (string | number | boolean)[]) => any) | undefined;
9
+ onRemove?: ((value: string | number | boolean) => any) | undefined;
10
+ "onUpdate:modelValue"?: ((value: string | number | boolean | (string | number | boolean)[]) => any) | undefined;
11
11
  }> & (typeof globalThis extends {
12
12
  __VLS_PROPS_FALLBACK: infer P;
13
13
  } ? P : {});
14
14
  expose: (exposed: ShallowUnwrapRef<SelectExpose>) => void;
15
15
  attrs: any;
16
16
  slots: SelectSlots;
17
- emit: (((evt: "clear") => void) & ((evt: "change", value: string | number | boolean) => void) & ((evt: "selectOption", option: any) => void)) & ((event: "update:modelValue", value: string | number | boolean) => void);
17
+ emit: (((evt: "clear") => void) & ((evt: "change", value: string | number | boolean | (string | number | boolean)[]) => void) & ((evt: "remove", value: string | number | boolean) => void)) & ((event: "update:modelValue", value: string | number | boolean | (string | number | boolean)[]) => void);
18
18
  }>) => VNode & {
19
19
  __ctx?: Awaited<typeof __VLS_setup>;
20
20
  };