sunyard-szyy-ui 0.3.4 → 0.4.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.
@@ -1,4 +1,4 @@
1
1
  (function(e,u){typeof exports=="object"&&typeof module!="undefined"?u(exports,require("element-plus"),require("vue"),require("@sunyard-szyy-ui/hooks"),require("@sunyard-szyy-ui/utils")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue","@sunyard-szyy-ui/hooks","@sunyard-szyy-ui/utils"],u):(e=typeof globalThis!="undefined"?globalThis:e||self,u(e.SunyardSzyyUI={},e.ElementPlus,e.Vue,e.hooks,e.utils))})(this,function(e,u,n,i,d){"use strict";/*!
2
- * sunyard-szyy-ui v0.3.4
2
+ * sunyard-szyy-ui v0.4.0
3
3
  * (c) 2026 Sunyard SZYY Base Team
4
4
  */const y=n.defineComponent({name:"SySearchBar",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"请输入关键字"},buttonText:{type:String,default:"搜索"}},emits:["update:modelValue","search"],setup(r,{emit:s}){const l=i.useNamespace("search-bar"),a=n.ref(r.modelValue);n.watch(()=>r.modelValue,t=>{t!==a.value&&(a.value=t)});function o(){s("search",a.value)}return()=>n.h("div",{class:l.b()},[n.h(u.ElInput,{class:l.e("input"),modelValue:a.value,placeholder:r.placeholder,clearable:!0,"onUpdate:modelValue":t=>{a.value=t,s("update:modelValue",t)},onKeydown:t=>{t.key==="Enter"&&o()}}),n.h(u.ElButton,{class:l.e("button"),type:"primary",onClick:o},()=>r.buttonText)])}}),c=d.withInstall(y);e.SySearchBar=c,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
@@ -3,7 +3,7 @@ import { defineComponent as d, ref as m, watch as i, h as o } from "vue";
3
3
  import { useNamespace as p } from "@sunyard-szyy-ui/hooks";
4
4
  import { withInstall as s } from "@sunyard-szyy-ui/utils";
5
5
  /*!
6
- * sunyard-szyy-ui v0.3.4
6
+ * sunyard-szyy-ui v0.4.0
7
7
  * (c) 2026 Sunyard SZYY Base Team
8
8
  */
9
9
  const h = d({
@@ -57,8 +57,8 @@ function SunyardSzyyUIResolver(options = {}) {
57
57
  actualDirResolver = (name) => {
58
58
  const styleFile = importStyle === "scss" ? "index.ts" : "css.ts";
59
59
  return {
60
- componentPath: fileURLToPath(new URL(`../packages/components/src/${name}/index.ts`, importMetaUrl)),
61
- stylePath: fileURLToPath(new URL(`../packages/components/src/${name}/style/${styleFile}`, importMetaUrl))
60
+ componentPath: fileURLToPath(new URL(`../packages/core/components/src/${name}/index.ts`, importMetaUrl)),
61
+ stylePath: fileURLToPath(new URL(`../packages/core/components/src/${name}/style/${styleFile}`, importMetaUrl))
62
62
  };
63
63
  };
64
64
  }
@@ -4,101 +4,101 @@ import * as vue from 'vue';
4
4
  * 组件解析器类型(兼容 unplugin-vue-components)
5
5
  */
6
6
  interface ComponentResolver {
7
- type: 'component' | 'directive';
8
- resolve: (name: string) => ComponentResolveResult | void | null | undefined;
7
+ type: 'component' | 'directive';
8
+ resolve: (name: string) => ComponentResolveResult | void | null | undefined;
9
9
  }
10
10
  /**
11
11
  * 组件解析结果
12
12
  */
13
13
  interface ComponentResolveResult {
14
- name?: string;
15
- from: string;
16
- sideEffects?: string | string[];
17
- [key: string]: any;
14
+ name?: string;
15
+ from: string;
16
+ sideEffects?: string | string[];
17
+ [key: string]: any;
18
18
  }
19
19
  /**
20
20
  * Resolver 配置选项
21
21
  */
22
22
  interface SunyardSzyyUIResolverOptions {
23
+ /**
24
+ * 组件前缀
25
+ * @default 'Sy'
26
+ */
27
+ prefix?: string;
28
+ /**
29
+ * 是否导入样式
30
+ * @default true
31
+ */
32
+ importStyle?: boolean | 'css' | 'scss';
33
+ /**
34
+ * 组件库名称
35
+ * @default 'sunyard-szyy-ui'
36
+ */
37
+ libraryName?: string;
38
+ /**
39
+ * 样式包名称
40
+ * @default 'sunyard-szyy-ui/theme-chalk'
41
+ */
42
+ styleLibraryName?: string;
43
+ /**
44
+ * 组件目录名称
45
+ * @default '@sunyard-szyy-ui/components'
46
+ */
47
+ componentsLibraryName?: string;
48
+ /**
49
+ * 是否为源码开发模式(monorepo 内部开发)
50
+ *
51
+ * 启用后会自动使用 monorepo 源码路径,无需手动配置 dirResolver
52
+ *
53
+ * @default false
54
+ *
55
+ * @example
56
+ * // 在 monorepo 开发环境中使用
57
+ * import { fileURLToPath } from 'node:url';
58
+ *
59
+ * SunyardSzyyUIResolver({
60
+ * devMode: true,
61
+ * importMetaUrl: import.meta.url,
62
+ * fileURLToPath: fileURLToPath
63
+ * })
64
+ */
65
+ devMode?: boolean;
66
+ /**
67
+ * import.meta.url(devMode 启用时必须提供)
68
+ *
69
+ * 用于解析 monorepo 源码的绝对路径
70
+ *
71
+ * @example
72
+ * import.meta.url
73
+ */
74
+ importMetaUrl?: string;
75
+ /**
76
+ * fileURLToPath 函数(devMode 启用时必须提供)
77
+ *
78
+ * 用于将 URL 转换为文件系统路径
79
+ *
80
+ * @example
81
+ * import { fileURLToPath } from 'node:url';
82
+ * // 然后传入: fileURLToPath: fileURLToPath
83
+ */
84
+ fileURLToPath?: (url: string | URL) => string;
85
+ /**
86
+ * 自定义目录解析器(高级用法,一般不需要)
87
+ *
88
+ * 如果提供了此选项,会覆盖 devMode 的默认行为
89
+ *
90
+ * @deprecated 推荐使用 devMode + importMetaUrl 替代
91
+ */
92
+ dirResolver?: (name: string) => {
23
93
  /**
24
- * 组件前缀
25
- * @default 'Sy'
26
- */
27
- prefix?: string;
28
- /**
29
- * 是否导入样式
30
- * @default true
31
- */
32
- importStyle?: boolean | 'css' | 'scss';
33
- /**
34
- * 组件库名称
35
- * @default 'sunyard-szyy-ui'
36
- */
37
- libraryName?: string;
38
- /**
39
- * 样式包名称
40
- * @default 'sunyard-szyy-ui/theme-chalk'
41
- */
42
- styleLibraryName?: string;
43
- /**
44
- * 组件目录名称
45
- * @default '@sunyard-szyy-ui/components'
46
- */
47
- componentsLibraryName?: string;
48
- /**
49
- * 是否为源码开发模式(monorepo 内部开发)
50
- *
51
- * 启用后会自动使用 monorepo 源码路径,无需手动配置 dirResolver
52
- *
53
- * @default false
54
- *
55
- * @example
56
- * // 在 monorepo 开发环境中使用
57
- * import { fileURLToPath } from 'node:url';
58
- *
59
- * SunyardSzyyUIResolver({
60
- * devMode: true,
61
- * importMetaUrl: import.meta.url,
62
- * fileURLToPath: fileURLToPath
63
- * })
64
- */
65
- devMode?: boolean;
66
- /**
67
- * import.meta.url(devMode 启用时必须提供)
68
- *
69
- * 用于解析 monorepo 源码的绝对路径
70
- *
71
- * @example
72
- * import.meta.url
73
- */
74
- importMetaUrl?: string;
75
- /**
76
- * fileURLToPath 函数(devMode 启用时必须提供)
77
- *
78
- * 用于将 URL 转换为文件系统路径
79
- *
80
- * @example
81
- * import { fileURLToPath } from 'node:url';
82
- * // 然后传入: fileURLToPath: fileURLToPath
94
+ * 组件源码路径(开发模式使用)
83
95
  */
84
- fileURLToPath?: (url: string | URL) => string;
96
+ componentPath?: string;
85
97
  /**
86
- * 自定义目录解析器(高级用法,一般不需要)
87
- *
88
- * 如果提供了此选项,会覆盖 devMode 的默认行为
89
- *
90
- * @deprecated 推荐使用 devMode + importMetaUrl 替代
98
+ * 样式源码路径(开发模式使用)
91
99
  */
92
- dirResolver?: (name: string) => {
93
- /**
94
- * 组件源码路径(开发模式使用)
95
- */
96
- componentPath?: string;
97
- /**
98
- * 样式源码路径(开发模式使用)
99
- */
100
- stylePath?: string;
101
- };
100
+ stylePath?: string;
101
+ };
102
102
  }
103
103
  /**
104
104
  * sunyard-szyy-ui 组件自动导入 resolver
@@ -151,11 +151,13 @@ interface SunyardSzyyUIResolverOptions {
151
151
  declare function SunyardSzyyUIResolver(options?: SunyardSzyyUIResolverOptions): ComponentResolver;
152
152
 
153
153
  type SFCWithInstall<T> = T & {
154
- install(app: vue.App): void;
154
+ install(app: vue.App): void;
155
155
  };
156
- declare function withInstall<T>(component: T & {
156
+ declare function withInstall<T>(
157
+ component: T & {
157
158
  name?: string;
158
- }): SFCWithInstall<T>;
159
+ }
160
+ ): SFCWithInstall<T>;
159
161
 
160
162
  /**
161
163
  * 防抖函数
@@ -26,8 +26,8 @@ function SunyardSzyyUIResolver(options = {}) {
26
26
  actualDirResolver = (name) => {
27
27
  const styleFile = importStyle === "scss" ? "index.ts" : "css.ts";
28
28
  return {
29
- componentPath: fileURLToPath(new URL(`../packages/components/src/${name}/index.ts`, importMetaUrl)),
30
- stylePath: fileURLToPath(new URL(`../packages/components/src/${name}/style/${styleFile}`, importMetaUrl))
29
+ componentPath: fileURLToPath(new URL(`../packages/core/components/src/${name}/index.ts`, importMetaUrl)),
30
+ stylePath: fileURLToPath(new URL(`../packages/core/components/src/${name}/style/${styleFile}`, importMetaUrl))
31
31
  };
32
32
  };
33
33
  }
@@ -1,4 +1,4 @@
1
1
  import{ref as c,watch as r}from"vue";import{debounce as s}from"../../utils/dist/index.mjs";/*!
2
- * sunyard-szyy-ui v0.3.4
3
- * (c) 2026 Sunyard SZYY UI Team
2
+ * sunyard-szyy-ui v0.4.0
3
+ * (c) 2026 Sunyard SZYY Base Team
4
4
  */function d(o){const n=`sy-${o}`;return{namespace:n,b:()=>n,e:e=>`${n}__${e}`,m:e=>`${n}--${e}`,is:(e,t=!0)=>t?`is-${e}`:""}}function i(o,n=300){const e=c(o.value),t=s(u=>{e.value=u},n);return r(o,u=>{t(u)}),e}export{i as useDebounce,d as useNamespace};
package/es/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  import{SySearchBar as r}from"@sunyard-szyy-ui/components";import{SySearchBar as _}from"@sunyard-szyy-ui/components";import{version as e}from"./version.mjs";import{useDebounce as m,useNamespace as p}from"./hooks/dist/index.mjs";import{SunyardSzyyUIResolver as y,debounce as S,deepClone as w,formatDate as Y,throttle as h,withInstall as U}from"./utils/dist/index.mjs";import{makeInstaller as g}from"./make-installer.mjs";/*!
2
- * sunyard-szyy-ui v0.3.4
3
- * (c) 2026 Sunyard SZYY UI Team
2
+ * sunyard-szyy-ui v0.4.0
3
+ * (c) 2026 Sunyard SZYY Base Team
4
4
  */const t=[r],a=n=>{if(typeof window!="undefined"&&(console.log(`%c[Sunyard SZYY UI]%c v${e} %cinstalled`,"color: #409eff; font-weight: bold","color: #67c23a","color: #909399"),window.__SUNYARD_SZYY_UI_VERSION__=e,window.__SUNYARD_SZYY_UI__={version:e,components:t.map(o=>o.name||"Unknown")}),t.forEach(o=>n.use(o)),typeof window!="undefined"){const o=window.__VUE_DEVTOOLS_GLOBAL_HOOK__;o&&o.emit("app:init",n,e,{label:"Sunyard SZYY UI",packageName:"sunyard-szyy-ui",homepage:"https://github.com/your-org/sunyard-szyy-ui"})}},c={version:e,install:a};export{y as SunyardSzyyUIResolver,_ as SySearchBar,S as debounce,w as deepClone,c as default,Y as formatDate,a as install,g as makeInstaller,h as throttle,m as useDebounce,p as useNamespace,e as version,U as withInstall};
@@ -1,4 +1,4 @@
1
1
  /*!
2
- * sunyard-szyy-ui v0.3.4
3
- * (c) 2026 Sunyard SZYY UI Team
2
+ * sunyard-szyy-ui v0.4.0
3
+ * (c) 2026 Sunyard SZYY Base Team
4
4
  */const n=Symbol("SUNYARD_SZYY_UI_INSTALLED"),o=(r=[],e="0.0.0")=>({version:e,install:t=>{t[n]||(t[n]=!0,r.forEach(l=>t.use(l)))}});export{o as makeInstaller};
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * sunyard-szyy-ui v0.3.4
3
- * (c) 2026 Sunyard SZYY UI Team
4
- */function h(e,n="Sy"){return e.slice(n.length).replace(/([A-Z])/g,"-$1").toLowerCase().slice(1)}function S(e={}){const{prefix:n="Sy",importStyle:t=!0,libraryName:r="sunyard-szyy-ui",styleLibraryName:c="sunyard-szyy-ui/theme-chalk",componentsLibraryName:m="@sunyard-szyy-ui/components",devMode:l=!1,importMetaUrl:o,fileURLToPath:i,dirResolver:p}=e;if(l&&!p&&(!o||!i))throw new Error(`[SunyardSzyyUIResolver] devMode 启用时必须提供 importMetaUrl 和 fileURLToPath 参数
2
+ * sunyard-szyy-ui v0.4.0
3
+ * (c) 2026 Sunyard SZYY Base Team
4
+ */function h(e,n="Sy"){return e.slice(n.length).replace(/([A-Z])/g,"-$1").toLowerCase().slice(1)}function S(e={}){const{prefix:n="Sy",importStyle:t=!0,libraryName:r="sunyard-szyy-ui",styleLibraryName:a="sunyard-szyy-ui/theme-chalk",componentsLibraryName:m="@sunyard-szyy-ui/components",devMode:l=!1,importMetaUrl:o,fileURLToPath:i,dirResolver:p}=e;if(l&&!p&&(!o||!i))throw new Error(`[SunyardSzyyUIResolver] devMode 启用时必须提供 importMetaUrl 和 fileURLToPath 参数
5
5
  示例:
6
6
  import { fileURLToPath } from 'node:url';
7
- SunyardSzyyUIResolver({ devMode: true, importMetaUrl: import.meta.url, fileURLToPath })`);let y=p;return l&&o&&i&&!p&&(y=s=>{const a=t==="scss"?"index.ts":"css.ts";return{componentPath:i(new URL(`../packages/components/src/${s}/index.ts`,o)),stylePath:i(new URL(`../packages/components/src/${s}/style/${a}`,o))}}),{type:"component",resolve:s=>{if(s.startsWith(n)){const a=h(s,n);if(y){const f=y(a);if(f.componentPath)return{name:s,from:f.componentPath,sideEffects:t&&f.stylePath?f.stylePath:void 0}}const u={name:s,from:r};return t&&(t==="css"?u.sideEffects=`${r}/es/components/${a}/style/css`:t==="scss"?u.sideEffects=`${r}/es/components/${a}/style/index`:t===!0&&(u.sideEffects=`${r}/es/components/${a}/style/css`)),u}}}}function g(e){const n=e;return n.install=t=>{const r=e.name;r&&t.component(r,e)},n}function D(e,n=300){let t=null;return function(...r){t&&clearTimeout(t),t=setTimeout(()=>{e.apply(this,r),t=null},n)}}function M(e,n=300){let t=0;return function(...r){const c=Date.now();c-t>=n&&(e.apply(this,r),t=c)}}function U(e,n="YYYY-MM-DD HH:mm:ss"){const t=typeof e=="number"?new Date(e):e,r=t.getFullYear(),c=String(t.getMonth()+1).padStart(2,"0"),m=String(t.getDate()).padStart(2,"0"),l=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0"),i=String(t.getSeconds()).padStart(2,"0");return n.replace("YYYY",String(r)).replace("MM",c).replace("DD",m).replace("HH",l).replace("mm",o).replace("ss",i)}function d(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array)return e.map(n=>d(n));if(typeof e=="object"){const n={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=d(e[t]));return n}return e}export{S as SunyardSzyyUIResolver,D as debounce,d as deepClone,U as formatDate,M as throttle,g as withInstall};
7
+ SunyardSzyyUIResolver({ devMode: true, importMetaUrl: import.meta.url, fileURLToPath })`);let y=p;return l&&o&&i&&!p&&(y=s=>{const c=t==="scss"?"index.ts":"css.ts";return{componentPath:i(new URL(`../packages/core/components/src/${s}/index.ts`,o)),stylePath:i(new URL(`../packages/core/components/src/${s}/style/${c}`,o))}}),{type:"component",resolve:s=>{if(s.startsWith(n)){const c=h(s,n);if(y){const f=y(c);if(f.componentPath)return{name:s,from:f.componentPath,sideEffects:t&&f.stylePath?f.stylePath:void 0}}const u={name:s,from:r};return t&&(t==="css"?u.sideEffects=`${r}/es/components/${c}/style/css`:t==="scss"?u.sideEffects=`${r}/es/components/${c}/style/index`:t===!0&&(u.sideEffects=`${r}/es/components/${c}/style/css`)),u}}}}function g(e){const n=e;return n.install=t=>{const r=e.name;r&&t.component(r,e)},n}function D(e,n=300){let t=null;return function(...r){t&&clearTimeout(t),t=setTimeout(()=>{e.apply(this,r),t=null},n)}}function M(e,n=300){let t=0;return function(...r){const a=Date.now();a-t>=n&&(e.apply(this,r),t=a)}}function U(e,n="YYYY-MM-DD HH:mm:ss"){const t=typeof e=="number"?new Date(e):e,r=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),m=String(t.getDate()).padStart(2,"0"),l=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0"),i=String(t.getSeconds()).padStart(2,"0");return n.replace("YYYY",String(r)).replace("MM",a).replace("DD",m).replace("HH",l).replace("mm",o).replace("ss",i)}function d(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array)return e.map(n=>d(n));if(typeof e=="object"){const n={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=d(e[t]));return n}return e}export{S as SunyardSzyyUIResolver,D as debounce,d as deepClone,U as formatDate,M as throttle,g as withInstall};
package/es/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "0.3.4";
1
+ export declare const version = "0.4.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/es/version.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  /*!
2
- * sunyard-szyy-ui v0.3.4
3
- * (c) 2026 Sunyard SZYY UI Team
4
- */const o="0.3.4";export{o as version};
2
+ * sunyard-szyy-ui v0.4.0
3
+ * (c) 2026 Sunyard SZYY Base Team
4
+ */const o="0.4.0";export{o as version};
@@ -1,4 +1,4 @@
1
1
  "use strict";/*!
2
- * sunyard-szyy-ui v0.3.4
3
- * (c) 2026 Sunyard SZYY UI Team
2
+ * sunyard-szyy-ui v0.4.0
3
+ * (c) 2026 Sunyard SZYY Base Team
4
4
  */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("../../utils/dist/index.js");function r(n){const u=`sy-${n}`;return{namespace:u,b:()=>u,e:e=>`${u}__${e}`,m:e=>`${u}--${e}`,is:(e,c=!0)=>c?`is-${e}`:""}}function a(n,u=300){const e=t.ref(n.value),c=o.debounce(s=>{e.value=s},u);return t.watch(n,s=>{c(s)}),e}exports.useDebounce=a;exports.useNamespace=r;
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";/*!
2
- * sunyard-szyy-ui v0.3.4
3
- * (c) 2026 Sunyard SZYY UI Team
2
+ * sunyard-szyy-ui v0.4.0
3
+ * (c) 2026 Sunyard SZYY Base Team
4
4
  */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("@sunyard-szyy-ui/components"),o=require("./version.js"),a=require("./hooks/dist/index.js"),n=require("./utils/dist/index.js"),l=require("./make-installer.js"),t=[s.SySearchBar],i=r=>{if(typeof window!="undefined"&&(console.log(`%c[Sunyard SZYY UI]%c v${o.version} %cinstalled`,"color: #409eff; font-weight: bold","color: #67c23a","color: #909399"),window.__SUNYARD_SZYY_UI_VERSION__=o.version,window.__SUNYARD_SZYY_UI__={version:o.version,components:t.map(e=>e.name||"Unknown")}),t.forEach(e=>r.use(e)),typeof window!="undefined"){const e=window.__VUE_DEVTOOLS_GLOBAL_HOOK__;e&&e.emit("app:init",r,o.version,{label:"Sunyard SZYY UI",packageName:"sunyard-szyy-ui",homepage:"https://github.com/your-org/sunyard-szyy-ui"})}},c={version:o.version,install:i};Object.defineProperty(exports,"SySearchBar",{enumerable:!0,get:()=>s.SySearchBar});exports.version=o.version;exports.useDebounce=a.useDebounce;exports.useNamespace=a.useNamespace;exports.SunyardSzyyUIResolver=n.SunyardSzyyUIResolver;exports.debounce=n.debounce;exports.deepClone=n.deepClone;exports.formatDate=n.formatDate;exports.throttle=n.throttle;exports.withInstall=n.withInstall;exports.makeInstaller=l.makeInstaller;exports.default=c;exports.install=i;
@@ -1,4 +1,4 @@
1
1
  "use strict";/*!
2
- * sunyard-szyy-ui v0.3.4
3
- * (c) 2026 Sunyard SZYY UI Team
2
+ * sunyard-szyy-ui v0.4.0
3
+ * (c) 2026 Sunyard SZYY Base Team
4
4
  */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Symbol("SUNYARD_SZYY_UI_INSTALLED"),s=(l=[],r="0.0.0")=>({version:r,install:t=>{t[e]||(t[e]=!0,l.forEach(n=>t.use(n)))}});exports.makeInstaller=s;
@@ -1,7 +1,7 @@
1
1
  "use strict";/*!
2
- * sunyard-szyy-ui v0.3.4
3
- * (c) 2026 Sunyard SZYY UI Team
2
+ * sunyard-szyy-ui v0.4.0
3
+ * (c) 2026 Sunyard SZYY Base Team
4
4
  */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function h(e,n="Sy"){return e.slice(n.length).replace(/([A-Z])/g,"-$1").toLowerCase().slice(1)}function S(e={}){const{prefix:n="Sy",importStyle:t=!0,libraryName:r="sunyard-szyy-ui",styleLibraryName:c="sunyard-szyy-ui/theme-chalk",componentsLibraryName:d="@sunyard-szyy-ui/components",devMode:l=!1,importMetaUrl:o,fileURLToPath:a,dirResolver:y}=e;if(l&&!y&&(!o||!a))throw new Error(`[SunyardSzyyUIResolver] devMode 启用时必须提供 importMetaUrl 和 fileURLToPath 参数
5
5
  示例:
6
6
  import { fileURLToPath } from 'node:url';
7
- SunyardSzyyUIResolver({ devMode: true, importMetaUrl: import.meta.url, fileURLToPath })`);let p=y;return l&&o&&a&&!y&&(p=s=>{const i=t==="scss"?"index.ts":"css.ts";return{componentPath:a(new URL(`../packages/components/src/${s}/index.ts`,o)),stylePath:a(new URL(`../packages/components/src/${s}/style/${i}`,o))}}),{type:"component",resolve:s=>{if(s.startsWith(n)){const i=h(s,n);if(p){const f=p(i);if(f.componentPath)return{name:s,from:f.componentPath,sideEffects:t&&f.stylePath?f.stylePath:void 0}}const u={name:s,from:r};return t&&(t==="css"?u.sideEffects=`${r}/es/components/${i}/style/css`:t==="scss"?u.sideEffects=`${r}/es/components/${i}/style/index`:t===!0&&(u.sideEffects=`${r}/es/components/${i}/style/css`)),u}}}}function g(e){const n=e;return n.install=t=>{const r=e.name;r&&t.component(r,e)},n}function D(e,n=300){let t=null;return function(...r){t&&clearTimeout(t),t=setTimeout(()=>{e.apply(this,r),t=null},n)}}function M(e,n=300){let t=0;return function(...r){const c=Date.now();c-t>=n&&(e.apply(this,r),t=c)}}function U(e,n="YYYY-MM-DD HH:mm:ss"){const t=typeof e=="number"?new Date(e):e,r=t.getFullYear(),c=String(t.getMonth()+1).padStart(2,"0"),d=String(t.getDate()).padStart(2,"0"),l=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0"),a=String(t.getSeconds()).padStart(2,"0");return n.replace("YYYY",String(r)).replace("MM",c).replace("DD",d).replace("HH",l).replace("mm",o).replace("ss",a)}function m(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array)return e.map(n=>m(n));if(typeof e=="object"){const n={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=m(e[t]));return n}return e}exports.SunyardSzyyUIResolver=S;exports.debounce=D;exports.deepClone=m;exports.formatDate=U;exports.throttle=M;exports.withInstall=g;
7
+ SunyardSzyyUIResolver({ devMode: true, importMetaUrl: import.meta.url, fileURLToPath })`);let p=y;return l&&o&&a&&!y&&(p=s=>{const i=t==="scss"?"index.ts":"css.ts";return{componentPath:a(new URL(`../packages/core/components/src/${s}/index.ts`,o)),stylePath:a(new URL(`../packages/core/components/src/${s}/style/${i}`,o))}}),{type:"component",resolve:s=>{if(s.startsWith(n)){const i=h(s,n);if(p){const f=p(i);if(f.componentPath)return{name:s,from:f.componentPath,sideEffects:t&&f.stylePath?f.stylePath:void 0}}const u={name:s,from:r};return t&&(t==="css"?u.sideEffects=`${r}/es/components/${i}/style/css`:t==="scss"?u.sideEffects=`${r}/es/components/${i}/style/index`:t===!0&&(u.sideEffects=`${r}/es/components/${i}/style/css`)),u}}}}function g(e){const n=e;return n.install=t=>{const r=e.name;r&&t.component(r,e)},n}function D(e,n=300){let t=null;return function(...r){t&&clearTimeout(t),t=setTimeout(()=>{e.apply(this,r),t=null},n)}}function M(e,n=300){let t=0;return function(...r){const c=Date.now();c-t>=n&&(e.apply(this,r),t=c)}}function U(e,n="YYYY-MM-DD HH:mm:ss"){const t=typeof e=="number"?new Date(e):e,r=t.getFullYear(),c=String(t.getMonth()+1).padStart(2,"0"),d=String(t.getDate()).padStart(2,"0"),l=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0"),a=String(t.getSeconds()).padStart(2,"0");return n.replace("YYYY",String(r)).replace("MM",c).replace("DD",d).replace("HH",l).replace("mm",o).replace("ss",a)}function m(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array)return e.map(n=>m(n));if(typeof e=="object"){const n={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=m(e[t]));return n}return e}exports.SunyardSzyyUIResolver=S;exports.debounce=D;exports.deepClone=m;exports.formatDate=U;exports.throttle=M;exports.withInstall=g;
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "0.3.4";
1
+ export declare const version = "0.4.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/lib/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";/*!
2
- * sunyard-szyy-ui v0.3.4
3
- * (c) 2026 Sunyard SZYY UI Team
4
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.3.4";exports.version=e;
2
+ * sunyard-szyy-ui v0.4.0
3
+ * (c) 2026 Sunyard SZYY Base Team
4
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.4.0";exports.version=e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sunyard-szyy-ui",
3
- "version": "0.3.4",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.mjs",
@@ -83,9 +83,9 @@
83
83
  "vue": "^3.0.0"
84
84
  },
85
85
  "dependencies": {
86
- "@sunyard-szyy-ui/components": "0.3.4",
87
- "@sunyard-szyy-ui/hooks": "0.3.4",
88
- "@sunyard-szyy-ui/utils": "0.3.4"
86
+ "@sunyard-szyy-ui/components": "0.4.0",
87
+ "@sunyard-szyy-ui/hooks": "0.4.0",
88
+ "@sunyard-szyy-ui/utils": "0.4.0"
89
89
  },
90
90
  "publishConfig": {
91
91
  "access": "public"
@@ -1 +0,0 @@
1
- *,*::before,*::after{box-sizing:border-box}:root{--el-color-primary: #2b6ef6 !important;--el-color-primary-light-3: #6b9bf8 !important;--el-color-primary-light-5: #95b8fa !important;--el-color-primary-light-7: #bfd5fc !important;--el-color-primary-light-8: #d2e2fd !important;--el-color-primary-light-9: #e6f0fe !important;--el-color-primary-dark-2: #2358c5 !important;--el-color-success: #16a34a !important;--el-color-success-light-3: #4ec277 !important;--el-color-success-light-5: #76d196 !important;--el-color-success-light-7: #9fe0b5 !important;--el-color-success-light-8: #b7e8c7 !important;--el-color-success-light-9: #d0f0d9 !important;--el-color-success-dark-2: #12823b !important;--el-color-warning: #f59e0b !important;--el-color-warning-light-3: #f8b84b !important;--el-color-warning-light-5: #fac776 !important;--el-color-warning-light-7: #fcd5a1 !important;--el-color-warning-light-8: #fde0b7 !important;--el-color-warning-light-9: #feeacc !important;--el-color-warning-dark-2: #c47e09 !important;--el-color-danger: #ef4444 !important;--el-color-danger-light-3: #f47777 !important;--el-color-danger-light-5: #f79a9a !important;--el-color-danger-light-7: #fabbbb !important;--el-color-danger-light-8: #fccccc !important;--el-color-danger-light-9: #fddddd !important;--el-color-danger-dark-2: #bf3636 !important;--el-color-error: #ef4444 !important;--el-color-error-light-3: #f47777 !important;--el-color-error-light-5: #f79a9a !important;--el-color-error-light-7: #fabbbb !important;--el-color-error-light-8: #fccccc !important;--el-color-error-light-9: #fddddd !important;--el-color-error-dark-2: #bf3636 !important;--el-color-info: #64748b !important;--el-color-info-light-3: #8c99a9 !important;--el-color-info-light-5: #a5b0bc !important;--el-color-info-light-7: #bec6d0 !important;--el-color-info-light-8: #ced4db !important;--el-color-info-light-9: #dee2e7 !important;--el-color-info-dark-2: #505d6f !important}
@@ -1 +0,0 @@
1
- *,*::before,*::after{box-sizing:border-box}:root{--el-color-primary: #2b6ef6 !important;--el-color-primary-light-3: #6b9bf8 !important;--el-color-primary-light-5: #95b8fa !important;--el-color-primary-light-7: #bfd5fc !important;--el-color-primary-light-8: #d2e2fd !important;--el-color-primary-light-9: #e6f0fe !important;--el-color-primary-dark-2: #2358c5 !important;--el-color-success: #16a34a !important;--el-color-success-light-3: #4ec277 !important;--el-color-success-light-5: #76d196 !important;--el-color-success-light-7: #9fe0b5 !important;--el-color-success-light-8: #b7e8c7 !important;--el-color-success-light-9: #d0f0d9 !important;--el-color-success-dark-2: #12823b !important;--el-color-warning: #f59e0b !important;--el-color-warning-light-3: #f8b84b !important;--el-color-warning-light-5: #fac776 !important;--el-color-warning-light-7: #fcd5a1 !important;--el-color-warning-light-8: #fde0b7 !important;--el-color-warning-light-9: #feeacc !important;--el-color-warning-dark-2: #c47e09 !important;--el-color-danger: #ef4444 !important;--el-color-danger-light-3: #f47777 !important;--el-color-danger-light-5: #f79a9a !important;--el-color-danger-light-7: #fabbbb !important;--el-color-danger-light-8: #fccccc !important;--el-color-danger-light-9: #fddddd !important;--el-color-danger-dark-2: #bf3636 !important;--el-color-error: #ef4444 !important;--el-color-error-light-3: #f47777 !important;--el-color-error-light-5: #f79a9a !important;--el-color-error-light-7: #fabbbb !important;--el-color-error-light-8: #fccccc !important;--el-color-error-light-9: #fddddd !important;--el-color-error-dark-2: #bf3636 !important;--el-color-info: #64748b !important;--el-color-info-light-3: #8c99a9 !important;--el-color-info-light-5: #a5b0bc !important;--el-color-info-light-7: #bec6d0 !important;--el-color-info-light-8: #ced4db !important;--el-color-info-light-9: #dee2e7 !important;--el-color-info-dark-2: #505d6f !important}.sy-search-bar{display:flex;gap:8px;align-items:center}.sy-search-bar__input{flex:1;min-width:0}.sy-search-bar__button{flex:none}
@@ -1 +0,0 @@
1
- .sy-search-bar{display:flex;gap:8px;align-items:center}.sy-search-bar__input{flex:1;min-width:0}.sy-search-bar__button{flex:none}
@@ -1,22 +0,0 @@
1
- @forward 'element-plus/theme-chalk/src/common/var.scss' with (
2
- $colors: (
3
- 'primary': (
4
- 'base': #2b6ef6
5
- ),
6
- 'success': (
7
- 'base': #16a34a
8
- ),
9
- 'warning': (
10
- 'base': #f59e0b
11
- ),
12
- 'danger': (
13
- 'base': #ef4444
14
- ),
15
- 'error': (
16
- 'base': #ef4444
17
- ),
18
- 'info': (
19
- 'base': #64748b
20
- )
21
- )
22
- );
@@ -1,22 +0,0 @@
1
- @forward 'element-plus/theme-chalk/src/common/var.scss' with (
2
- $colors: (
3
- 'primary': (
4
- 'base': #2b6ef6
5
- ),
6
- 'success': (
7
- 'base': #16a34a
8
- ),
9
- 'warning': (
10
- 'base': #f59e0b
11
- ),
12
- 'danger': (
13
- 'base': #ef4444
14
- ),
15
- 'error': (
16
- 'base': #ef4444
17
- ),
18
- 'info': (
19
- 'base': #64748b
20
- )
21
- )
22
- );