@pungfe/element 0.0.1-alpha.9 → 0.1.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 (82) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +151 -1
  3. package/dist/advance-C3UkhTla.js +1896 -0
  4. package/dist/advance-C3UkhTla.js.map +1 -0
  5. package/dist/advance-DIZmFb3t.cjs +2 -0
  6. package/dist/advance-DIZmFb3t.cjs.map +1 -0
  7. package/dist/advance.cjs +1 -0
  8. package/dist/advance.d.ts +23 -0
  9. package/dist/advance.js +2 -0
  10. package/dist/basic-BfqwJFE_.cjs +2 -0
  11. package/dist/basic-BfqwJFE_.cjs.map +1 -0
  12. package/dist/basic-CZ74BN1R.js +1008 -0
  13. package/dist/basic-CZ74BN1R.js.map +1 -0
  14. package/dist/basic.cjs +1 -0
  15. package/dist/basic.d.ts +33 -0
  16. package/dist/basic.js +2 -0
  17. package/dist/components/advance/XButtonAsync.vue.d.ts +21 -0
  18. package/dist/{basic/XReconfirm.vue.d.ts → components/advance/XButtonConfirm.vue.d.ts} +6 -5
  19. package/dist/components/advance/XCascaderRequest.vue.d.ts +55 -0
  20. package/dist/components/advance/XFormFlex.vue.d.ts +19 -0
  21. package/dist/components/advance/XFormRequestNext.vue.d.ts +53 -0
  22. package/dist/components/advance/XRequest.vue.d.ts +74 -0
  23. package/dist/components/advance/XSelectRequest.vue.d.ts +53 -0
  24. package/dist/components/advance/XTableFlex.vue.d.ts +53 -0
  25. package/dist/components/advance/XTableRequestConfigNext.vue.d.ts +68 -0
  26. package/dist/components/advance/XTableRequestNext.vue.d.ts +89 -0
  27. package/dist/components/advance/XUploadOssNext.vue.d.ts +29 -0
  28. package/dist/{basic/XButton.vue.d.ts → components/basic/Button.vue.d.ts} +15 -4
  29. package/dist/{basic/XSelect.vue.d.ts → components/basic/Cascader.vue.d.ts} +16 -12
  30. package/dist/components/basic/Checkbox.vue.d.ts +22 -0
  31. package/dist/components/basic/ConfigProvider.vue.d.ts +21 -0
  32. package/dist/components/basic/DatePicker.vue.d.ts +34 -0
  33. package/dist/{basic/XDialog.vue.d.ts → components/basic/Dialog.vue.d.ts} +17 -9
  34. package/dist/{basic/XForm.vue.d.ts → components/basic/Form.vue.d.ts} +3 -27
  35. package/dist/components/basic/FormItem.vue.d.ts +34 -0
  36. package/dist/components/basic/Input.vue.d.ts +44 -0
  37. package/dist/components/basic/InputNumber.vue.d.ts +48 -0
  38. package/dist/components/basic/Pagination.vue.d.ts +41 -0
  39. package/dist/components/basic/Select.vue.d.ts +51 -0
  40. package/dist/components/basic/TabPane.vue.d.ts +32 -0
  41. package/dist/components/basic/Table.vue.d.ts +105 -0
  42. package/dist/{basic/XTabs.vue.d.ts → components/basic/Tabs.vue.d.ts} +9 -11
  43. package/dist/components/basic/Upload.vue.d.ts +47 -0
  44. package/dist/constants/index.d.ts +15 -9
  45. package/dist/index.cjs +2 -0
  46. package/dist/index.cjs.map +1 -0
  47. package/dist/index.d.ts +4 -42
  48. package/dist/index.js +27 -1192
  49. package/dist/index.js.map +1 -0
  50. package/dist/install.d.ts +12 -0
  51. package/dist/locales/en.d.ts +2 -0
  52. package/dist/locales/zh-cn.d.ts +2 -0
  53. package/dist/locales-CPrLlnob.js +391 -0
  54. package/dist/locales-CPrLlnob.js.map +1 -0
  55. package/dist/locales-fS7f5AIx.cjs +2 -0
  56. package/dist/locales-fS7f5AIx.cjs.map +1 -0
  57. package/dist/locales.cjs +1 -0
  58. package/dist/locales.d.ts +2 -0
  59. package/dist/locales.js +2 -0
  60. package/dist/resolver.cjs +2 -0
  61. package/dist/resolver.cjs.map +1 -0
  62. package/dist/resolver.d.ts +3 -1
  63. package/dist/resolver.js +58 -34
  64. package/dist/resolver.js.map +1 -0
  65. package/dist/style.css +3 -0
  66. package/dist/types.d.ts +30 -0
  67. package/package.json +120 -80
  68. package/dist/basic/XCascader.vue.d.ts +0 -26
  69. package/dist/basic/XCheckbox.vue.d.ts +0 -28
  70. package/dist/basic/XColorPicker.vue.d.ts +0 -21
  71. package/dist/basic/XDivider.vue.d.ts +0 -20
  72. package/dist/basic/XImage.vue.d.ts +0 -5
  73. package/dist/basic/XInput.vue.d.ts +0 -29
  74. package/dist/basic/XInputNumber.vue.d.ts +0 -31
  75. package/dist/basic/XPagination.vue.d.ts +0 -21
  76. package/dist/basic/XRate.vue.d.ts +0 -20
  77. package/dist/basic/XScrollbar.vue.d.ts +0 -415
  78. package/dist/basic/XSpace.vue.d.ts +0 -20
  79. package/dist/basic/XTable.vue.d.ts +0 -55
  80. package/dist/basic/XTag.vue.d.ts +0 -28
  81. package/dist/basic/XText.vue.d.ts +0 -23
  82. package/dist/basic/XUpload.vue.d.ts +0 -41
package/dist/resolver.js CHANGED
@@ -1,34 +1,58 @@
1
- const X = [
2
- "XButton",
3
- "XCascader",
4
- "XCheckbox",
5
- "XColorPicker",
6
- "XDatePicker",
7
- "XDialog",
8
- "XDivider",
9
- "XForm",
10
- "XImage",
11
- "XInput",
12
- "XInputNumber",
13
- "XPagination",
14
- "XScrollbar",
15
- "XSelect",
16
- "XSpace",
17
- "XTable",
18
- "XTabs",
19
- "XTag",
20
- "XText",
21
- "XUpload"
22
- ], r = () => ({
23
- type: "component",
24
- resolve: (e) => {
25
- if (X.includes(e))
26
- return {
27
- name: e,
28
- from: "@pungfe/element"
29
- };
30
- }
31
- });
32
- export {
33
- r as default
34
- };
1
+ //#region src/resolver.ts
2
+ var e = ["element-plus/es/components/base/style/css"], t = {
3
+ XButton: [...e, "element-plus/es/components/button/style/css"],
4
+ XCascader: [...e, "element-plus/es/components/cascader/style/css"],
5
+ XButtonPopconfirm: [
6
+ ...e,
7
+ "element-plus/es/components/button/style/css",
8
+ "element-plus/es/components/popconfirm/style/css"
9
+ ],
10
+ XCheckbox: [...e, "element-plus/es/components/checkbox/style/css"],
11
+ XConfigProvider: [],
12
+ XDatePicker: [...e, "element-plus/es/components/date-picker/style/css"],
13
+ XDialog: [...e, "element-plus/es/components/dialog/style/css"],
14
+ XForm: [...e, "element-plus/es/components/form/style/css"],
15
+ XFormItem: [...e, "element-plus/es/components/form-item/style/css"],
16
+ XInput: [...e, "element-plus/es/components/input/style/css"],
17
+ XInputNumber: [...e, "element-plus/es/components/input-number/style/css"],
18
+ XPagination: [...e, "element-plus/es/components/pagination/style/css"],
19
+ XSelect: [...e, "element-plus/es/components/select/style/css"],
20
+ XTable: [
21
+ ...e,
22
+ "element-plus/es/components/table/style/css",
23
+ "element-plus/es/components/table-column/style/css"
24
+ ],
25
+ XTabs: [...e, "element-plus/es/components/tabs/style/css"],
26
+ XTabPane: [...e, "element-plus/es/components/tab-pane/style/css"],
27
+ XUpload: [...e, "element-plus/es/components/upload/style/css"]
28
+ }, n = {
29
+ XButtonAsync: [...t.XButton],
30
+ XButtonConfirm: [...t.XButton],
31
+ XCascaderRequest: [...t.XCascader],
32
+ XFormFlex: [...t.XForm],
33
+ XFormRequestNext: [...t.XForm],
34
+ XRequest: [],
35
+ XSelectRequest: [...t.XSelect],
36
+ XTableFlex: [...t.XTable],
37
+ XTableRequestNext: [...t.XTable, ...t.XPagination],
38
+ XTableRequestConfigNext: [...t.XTable, ...t.XPagination],
39
+ XUploadOssNext: [...t.XUpload]
40
+ }, r = (e) => [{
41
+ type: "component",
42
+ resolve: (r) => {
43
+ if (r in t) return {
44
+ name: r,
45
+ from: "@pungfe/element/basic",
46
+ sideEffects: t[r]
47
+ };
48
+ if (e?.advance && r in n) return {
49
+ name: r,
50
+ from: "@pungfe/element/advance",
51
+ sideEffects: n[r]
52
+ };
53
+ }
54
+ }];
55
+ //#endregion
56
+ export { r as default };
57
+
58
+ //# sourceMappingURL=resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolver.js","names":[],"sources":["../src/resolver.ts"],"sourcesContent":["import type { ComponentResolver } from 'unplugin-vue-components'\n\nconst base = ['element-plus/es/components/base/style/css']\n\nconst XBasicResolve: Record<string, string[]> = {\n XButton: [...base, 'element-plus/es/components/button/style/css'],\n XCascader: [...base, 'element-plus/es/components/cascader/style/css'],\n XButtonPopconfirm: [\n ...base,\n 'element-plus/es/components/button/style/css',\n 'element-plus/es/components/popconfirm/style/css'\n ],\n XCheckbox: [...base, 'element-plus/es/components/checkbox/style/css'],\n XConfigProvider: [],\n XDatePicker: [...base, 'element-plus/es/components/date-picker/style/css'],\n XDialog: [...base, 'element-plus/es/components/dialog/style/css'],\n XForm: [...base, 'element-plus/es/components/form/style/css'],\n XFormItem: [...base, 'element-plus/es/components/form-item/style/css'],\n XInput: [...base, 'element-plus/es/components/input/style/css'],\n XInputNumber: [...base, 'element-plus/es/components/input-number/style/css'],\n XPagination: [...base, 'element-plus/es/components/pagination/style/css'],\n XSelect: [...base, 'element-plus/es/components/select/style/css'],\n XTable: [\n ...base,\n 'element-plus/es/components/table/style/css',\n 'element-plus/es/components/table-column/style/css'\n ],\n XTabs: [...base, 'element-plus/es/components/tabs/style/css'],\n XTabPane: [...base, 'element-plus/es/components/tab-pane/style/css'],\n XUpload: [...base, 'element-plus/es/components/upload/style/css']\n}\n\nconst XAdvanceResolve: Record<string, string[]> = {\n XButtonAsync: [...XBasicResolve.XButton],\n XButtonConfirm: [...XBasicResolve.XButton],\n XCascaderRequest: [...XBasicResolve.XCascader],\n XFormFlex: [...XBasicResolve.XForm],\n XFormRequestNext: [...XBasicResolve.XForm],\n XRequest: [],\n XSelectRequest: [...XBasicResolve.XSelect],\n XTableFlex: [...XBasicResolve.XTable],\n XTableRequestNext: [...XBasicResolve.XTable, ...XBasicResolve.XPagination],\n XTableRequestConfigNext: [...XBasicResolve.XTable, ...XBasicResolve.XPagination],\n XUploadOssNext: [...XBasicResolve.XUpload]\n}\n\nexport default (options?: { advance?: boolean }): ComponentResolver[] => {\n return [\n {\n type: 'component',\n resolve: (name) => {\n if (name in XBasicResolve) {\n return {\n name,\n from: '@pungfe/element/basic',\n sideEffects: XBasicResolve[name]\n }\n } else if (options?.advance && name in XAdvanceResolve) {\n return {\n name,\n from: '@pungfe/element/advance',\n sideEffects: XAdvanceResolve[name]\n }\n }\n }\n }\n ]\n}\n"],"mappings":";AAEA,IAAM,IAAO,CAAC,4CAA4C,EAEpD,IAA0C;CAC9C,SAAS,CAAC,GAAG,GAAM,8CAA8C;CACjE,WAAW,CAAC,GAAG,GAAM,gDAAgD;CACrE,mBAAmB;EACjB,GAAG;EACH;EACA;EACD;CACD,WAAW,CAAC,GAAG,GAAM,gDAAgD;CACrE,iBAAiB,EAAE;CACnB,aAAa,CAAC,GAAG,GAAM,mDAAmD;CAC1E,SAAS,CAAC,GAAG,GAAM,8CAA8C;CACjE,OAAO,CAAC,GAAG,GAAM,4CAA4C;CAC7D,WAAW,CAAC,GAAG,GAAM,iDAAiD;CACtE,QAAQ,CAAC,GAAG,GAAM,6CAA6C;CAC/D,cAAc,CAAC,GAAG,GAAM,oDAAoD;CAC5E,aAAa,CAAC,GAAG,GAAM,kDAAkD;CACzE,SAAS,CAAC,GAAG,GAAM,8CAA8C;CACjE,QAAQ;EACN,GAAG;EACH;EACA;EACD;CACD,OAAO,CAAC,GAAG,GAAM,4CAA4C;CAC7D,UAAU,CAAC,GAAG,GAAM,gDAAgD;CACpE,SAAS,CAAC,GAAG,GAAM,8CAA8C;CAClE,EAEK,IAA4C;CAChD,cAAc,CAAC,GAAG,EAAc,QAAQ;CACxC,gBAAgB,CAAC,GAAG,EAAc,QAAQ;CAC1C,kBAAkB,CAAC,GAAG,EAAc,UAAU;CAC9C,WAAW,CAAC,GAAG,EAAc,MAAM;CACnC,kBAAkB,CAAC,GAAG,EAAc,MAAM;CAC1C,UAAU,EAAE;CACZ,gBAAgB,CAAC,GAAG,EAAc,QAAQ;CAC1C,YAAY,CAAC,GAAG,EAAc,OAAO;CACrC,mBAAmB,CAAC,GAAG,EAAc,QAAQ,GAAG,EAAc,YAAY;CAC1E,yBAAyB,CAAC,GAAG,EAAc,QAAQ,GAAG,EAAc,YAAY;CAChF,gBAAgB,CAAC,GAAG,EAAc,QAAQ;CAC3C,EAED,KAAgB,MACP,CACL;CACE,MAAM;CACN,UAAU,MAAS;AACjB,MAAI,KAAQ,EACV,QAAO;GACL;GACA,MAAM;GACN,aAAa,EAAc;GAC5B;MACQ,GAAS,WAAW,KAAQ,EACrC,QAAO;GACL;GACA,MAAM;GACN,aAAa,EAAgB;GAC9B;;CAGN,CACF"}
package/dist/style.css ADDED
@@ -0,0 +1,3 @@
1
+ /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--spacing:.25rem}}@layer base,components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.right-0{right:calc(var(--spacing) * 0)}.z-1000{z-index:1000}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.contents{display:contents}.flex{display:flex}.grid{display:grid}.table{display:table}.w-50{width:calc(var(--spacing) * 50)}.flex-1{flex:1}.cursor-grab{cursor:grab}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-2{gap:calc(var(--spacing) * 2)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-\[\#f2f6fc\]>:not(:last-child)){border-color:#f2f6fc}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.bg-\(--el-bg-color\){background-color:var(--el-bg-color)}.bg-\(--el-color-primary-light-7\){background-color:var(--el-color-primary-light-7)}.bg-\(--el-fill-color-light\){background-color:var(--el-fill-color-light)}.px-2{padding-inline:calc(var(--spacing) * 2)}.py-2{padding-block:calc(var(--spacing) * 2)}.pt-4{padding-top:calc(var(--spacing) * 4)}.overflow-ellipsis{text-overflow:ellipsis}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}@media (width>=48rem){.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (width>=64rem){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (width>=80rem){.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}
3
+ /*$vite$:1*/
@@ -0,0 +1,30 @@
1
+ import { XButtonConfig, XTableConfig } from './basic';
2
+ export interface ElementConfig {
3
+ button?: XButtonConfig;
4
+ table?: XTableConfig;
5
+ oss?: OssInfo | (() => OssInfo);
6
+ }
7
+ export interface Paging {
8
+ pageIndex: number;
9
+ pageSize: number;
10
+ itemCount: number;
11
+ }
12
+ export interface TableColumnField {
13
+ code: string;
14
+ width?: number;
15
+ visible?: boolean;
16
+ label?: string;
17
+ prop?: string;
18
+ search?: boolean;
19
+ }
20
+ export interface OssInfo {
21
+ accessId?: string;
22
+ accessSecret?: string;
23
+ host?: string;
24
+ dir?: string;
25
+ policy?: string;
26
+ expire?: number;
27
+ signature?: string;
28
+ accessKeyId?: string;
29
+ accessKeySecret?: string;
30
+ }
package/package.json CHANGED
@@ -1,80 +1,120 @@
1
- {
2
- "name": "@pungfe/element",
3
- "type": "module",
4
- "version": "0.0.1-alpha.9",
5
- "description": "Element Plus Components",
6
- "author": "pungfen <fp94214@gmail.com> (https://github.com/pungfen/)",
7
- "license": "MIT",
8
- "homepage": "https://github.com/pungfen/element",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/pungfen/element.git"
12
- },
13
- "bugs": {
14
- "url": "https://github.com/pungfen/element/issues"
15
- },
16
- "keywords": [
17
- "Element Plus",
18
- "typescript",
19
- "vue"
20
- ],
21
- "exports": {
22
- ".": {
23
- "types": "./dist/index.d.ts",
24
- "import": "./dist/index.js"
25
- },
26
- "./resolver": {
27
- "types": "./dist/resolver.d.ts",
28
- "import": "./dist/resolver.js"
29
- },
30
- "./package.json": "./package.json"
31
- },
32
- "typings": "./dist/index.d.ts",
33
- "module": "./dist/index.js",
34
- "files": [
35
- "dist"
36
- ],
37
- "scripts": {
38
- "build": "vite build",
39
- "lint": "eslint .",
40
- "prepare": "simple-git-hooks",
41
- "typecheck": "vue-tsc --noEmit",
42
- "release": "bumpp"
43
- },
44
- "peerDependencies": {
45
- "element-plus": "^2.13.1",
46
- "vue": "^3.5.27"
47
- },
48
- "dependencies": {
49
- "@vueuse/components": "^14.1.0",
50
- "@vueuse/core": "^14.1.0",
51
- "element-plus": "^2.13.1",
52
- "unplugin-vue-components": "^31.0.0",
53
- "vue": "^3.5.27"
54
- },
55
- "devDependencies": {
56
- "@antfu/eslint-config": "^7.2.0",
57
- "@vitejs/plugin-vue": "^6.0.3",
58
- "@vitejs/plugin-vue-jsx": "^5.1.3",
59
- "@vue/tsconfig": "^0.8.1",
60
- "bumpp": "^10.4.0",
61
- "eslint": "^9.39.2",
62
- "eslint-plugin-format": "^1.3.1",
63
- "jiti": "^2.6.1",
64
- "lint-staged": "^16.2.7",
65
- "simple-git-hooks": "^2.13.1",
66
- "typescript": "^5.9.3",
67
- "vite": "^7.3.1",
68
- "vite-plugin-dts": "^4.5.4",
69
- "vue-tsc": "^3.2.4"
70
- },
71
- "publishConfig": {
72
- "access": "public"
73
- },
74
- "simple-git-hooks": {
75
- "pre-commit": "npx lint-staged"
76
- },
77
- "lint-staged": {
78
- "*": "eslint --fix"
79
- }
80
- }
1
+ {
2
+ "name": "@pungfe/element",
3
+ "version": "0.1.0",
4
+ "description": "Element Plus Components",
5
+ "keywords": [
6
+ "Element Plus",
7
+ "typescript",
8
+ "vue"
9
+ ],
10
+ "homepage": "https://github.com/pungfen/element",
11
+ "bugs": {
12
+ "url": "https://github.com/pungfen/element/issues"
13
+ },
14
+ "license": "MIT",
15
+ "author": "pungfeng <fp94214@gmail.com>",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/pungfen/element.git"
19
+ },
20
+ "files": [
21
+ "dist",
22
+ "package.json"
23
+ ],
24
+ "type": "module",
25
+ "main": "./dist/index.cjs",
26
+ "module": "./dist/index.js",
27
+ "types": "./dist/index.d.ts",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/index.d.ts",
31
+ "import": "./dist/index.js",
32
+ "require": "./dist/index.cjs"
33
+ },
34
+ "./advance": {
35
+ "types": "./dist/advance.d.ts",
36
+ "import": "./dist/advance.js",
37
+ "require": "./dist/advance.js"
38
+ },
39
+ "./basic": {
40
+ "types": "./dist/basic.d.ts",
41
+ "import": "./dist/basic.js",
42
+ "require": "./dist/basic.js"
43
+ },
44
+ "./locales": {
45
+ "types": "./dist/locales.d.ts",
46
+ "import": "./dist/locales.js",
47
+ "require": "./dist/locales.js"
48
+ },
49
+ "./resolver": {
50
+ "types": "./dist/resolver.d.ts",
51
+ "import": "./dist/resolver.js",
52
+ "require": "./dist/resolver.js"
53
+ },
54
+ "./style.css": {
55
+ "import": "./dist/style.css",
56
+ "require": "./dist/style.css"
57
+ },
58
+ "./package.json": "./package.json"
59
+ },
60
+ "publishConfig": {
61
+ "access": "public"
62
+ },
63
+ "scripts": {
64
+ "build": "vite build",
65
+ "fmt": "oxfmt",
66
+ "lint": "oxlint -c oxlint.config.ts --type-aware",
67
+ "lint:fix": "oxlint --fix",
68
+ "prepare": "simple-git-hooks",
69
+ "release": "npm run build && bumpp",
70
+ "test": "vitest",
71
+ "test:ci": "vitest run",
72
+ "typecheck": "vue-tsc --noEmit"
73
+ },
74
+ "dependencies": {
75
+ "@element-plus/icons-vue": "^2.3.2",
76
+ "@vueuse/core": "^14.2.1",
77
+ "@vueuse/integrations": "^14.2.1",
78
+ "element-plus": "^2.13.1",
79
+ "sortablejs": "^1.15.7",
80
+ "vue": "^3.5.27"
81
+ },
82
+ "devDependencies": {
83
+ "@tailwindcss/vite": "^4.2.2",
84
+ "@types/node": "^25.5.0",
85
+ "@types/sortablejs": "^1.15.9",
86
+ "@vitejs/plugin-vue": "^6.0.5",
87
+ "@vitejs/plugin-vue-jsx": "^5.1.5",
88
+ "@vue/language-core": "^3.2.6",
89
+ "@vue/test-utils": "^2.4.6",
90
+ "@vue/tsconfig": "^0.9.1",
91
+ "bumpp": "^11.0.1",
92
+ "eslint-plugin-perfectionist": "^5.7.0",
93
+ "jsdom": "^29.0.1",
94
+ "lint-staged": "^16.4.0",
95
+ "oxfmt": "^0.43.0",
96
+ "oxlint": "^1.58.0",
97
+ "oxlint-tsgolint": "^0.19.0",
98
+ "simple-git-hooks": "^2.13.1",
99
+ "tailwindcss": "^4.2.2",
100
+ "typescript": "^6.0.2",
101
+ "unplugin-raw": "^0.7.0",
102
+ "unplugin-vue": "^7.1.1",
103
+ "unplugin-vue-components": "^32.0.0",
104
+ "vite": "^8.0.3",
105
+ "vite-plugin-dts": "^4.5.4",
106
+ "vitest": "^4.1.2",
107
+ "vue-component-type-helpers": "^3.2.6",
108
+ "vue-tsc": "^3.2.6"
109
+ },
110
+ "peerDependencies": {
111
+ "element-plus": "^2.13.1",
112
+ "vue": "^3.5.27"
113
+ },
114
+ "simple-git-hooks": {
115
+ "pre-commit": "npx lint-staged"
116
+ },
117
+ "lint-staged": {
118
+ "*.{js,ts,mjs,cjs,vue,tsx,jsx}": "oxlint --fix"
119
+ }
120
+ }
@@ -1,26 +0,0 @@
1
- import { CascaderProps } from 'element-plus';
2
- export interface XCascaderProps {
3
- clearable?: boolean;
4
- placeholder?: string;
5
- disabled?: boolean;
6
- props?: CascaderProps;
7
- }
8
- declare const _default: <D, V extends string>(__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<{
9
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
10
- readonly "onUpdate:modelValue"?: ((value: V) => any) | undefined;
11
- readonly onBlur?: (() => any) | undefined;
12
- readonly onChange?: ((value: V) => any) | undefined;
13
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onBlur" | "onChange"> & ({
14
- modelValue?: V;
15
- } & XCascaderProps) & Partial<{}>> & import('vue').PublicProps;
16
- expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
17
- attrs: any;
18
- slots: {};
19
- emit: (((evt: "blur") => void) & ((evt: "change", value: V) => void)) & ((evt: "update:modelValue", value: V) => void);
20
- }>) => import('vue').VNode & {
21
- __ctx?: Awaited<typeof __VLS_setup>;
22
- };
23
- export default _default;
24
- type __VLS_PrettifyLocal<T> = {
25
- [K in keyof T]: T[K];
26
- } & {};
@@ -1,28 +0,0 @@
1
- import { CheckboxProps } from 'element-plus';
2
- export interface XCheckboxOptionProps<V> {
3
- disabled?: boolean;
4
- label?: number | string;
5
- value: V;
6
- }
7
- export interface XCheckboxProps<D, V> extends Partial<Omit<CheckboxProps, 'options' | 'modelValue'>> {
8
- data: D[];
9
- factory: (option: D) => XCheckboxOptionProps<V>;
10
- identify?: (value: V) => number | string;
11
- }
12
- declare const _default: <D, V, MV extends V>(__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<{
13
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
14
- readonly "onUpdate:modelValue"?: ((value: MV[]) => any) | undefined;
15
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> & ({
16
- modelValue?: MV[];
17
- } & XCheckboxProps<D, V>) & Partial<{}>> & import('vue').PublicProps;
18
- expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
19
- attrs: any;
20
- slots: {};
21
- emit: (evt: "update:modelValue", value: MV[]) => void;
22
- }>) => import('vue').VNode & {
23
- __ctx?: Awaited<typeof __VLS_setup>;
24
- };
25
- export default _default;
26
- type __VLS_PrettifyLocal<T> = {
27
- [K in keyof T]: T[K];
28
- } & {};
@@ -1,21 +0,0 @@
1
- export interface XColorPickerProps {
2
- clearable?: boolean;
3
- disabled?: boolean;
4
- }
5
- declare const _default: <D, V extends string>(__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<{
6
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
7
- readonly "onUpdate:modelValue"?: ((value: V) => any) | undefined;
8
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> & ({
9
- modelValue?: V;
10
- } & XColorPickerProps) & Partial<{}>> & import('vue').PublicProps;
11
- expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
12
- attrs: any;
13
- slots: {};
14
- emit: (evt: "update:modelValue", value: V) => void;
15
- }>) => import('vue').VNode & {
16
- __ctx?: Awaited<typeof __VLS_setup>;
17
- };
18
- export default _default;
19
- type __VLS_PrettifyLocal<T> = {
20
- [K in keyof T]: T[K];
21
- } & {};
@@ -1,20 +0,0 @@
1
- import { DividerProps } from 'element-plus';
2
- export interface XDividerProps extends Partial<DividerProps> {
3
- }
4
- declare function __VLS_template(): {
5
- attrs: Partial<{}>;
6
- slots: {
7
- default?(_: {}): any;
8
- };
9
- refs: {};
10
- rootEl: any;
11
- };
12
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
- declare const __VLS_component: import('vue').DefineComponent<XDividerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<XDividerProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
- export default _default;
16
- type __VLS_WithTemplateSlots<T, S> = T & {
17
- new (): {
18
- $slots: S;
19
- };
20
- };
@@ -1,5 +0,0 @@
1
- import { ImageProps } from 'element-plus';
2
- export interface XImageProps extends Partial<ImageProps> {
3
- }
4
- declare const _default: import('vue').DefineComponent<XImageProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<XImageProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5
- export default _default;
@@ -1,29 +0,0 @@
1
- import { InputProps } from 'element-plus';
2
- export interface XInputProps {
3
- clearable?: boolean;
4
- placeholder?: string;
5
- disabled?: boolean;
6
- size?: InputProps['size'];
7
- type?: InputProps['type'];
8
- showPassword?: boolean;
9
- autosize?: InputProps['autosize'];
10
- }
11
- declare const _default: <V extends string>(__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<{
12
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
13
- readonly "onUpdate:modelValue"?: ((value: V) => any) | undefined;
14
- readonly onBlur?: (() => any) | undefined;
15
- readonly onChange?: ((value: V) => any) | undefined;
16
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onBlur" | "onChange"> & ({
17
- modelValue?: V;
18
- } & XInputProps) & Partial<{}>> & import('vue').PublicProps;
19
- expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
20
- attrs: any;
21
- slots: {};
22
- emit: (((evt: "blur") => void) & ((evt: "change", value: V) => void)) & ((evt: "update:modelValue", value: V) => void);
23
- }>) => import('vue').VNode & {
24
- __ctx?: Awaited<typeof __VLS_setup>;
25
- };
26
- export default _default;
27
- type __VLS_PrettifyLocal<T> = {
28
- [K in keyof T]: T[K];
29
- } & {};
@@ -1,31 +0,0 @@
1
- import { InputNumberProps } from 'element-plus';
2
- export interface XInputNumberProps {
3
- placeholder?: string;
4
- disabled?: boolean;
5
- align?: InputNumberProps['align'];
6
- size?: InputNumberProps['size'];
7
- step?: number;
8
- max?: number;
9
- min?: number;
10
- controls?: boolean;
11
- precision?: number;
12
- stepStrictly?: boolean;
13
- }
14
- declare const _default: <V extends number>(__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<{
15
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
16
- readonly "onUpdate:modelValue"?: ((value: V) => any) | undefined;
17
- readonly onBlur?: (() => any) | undefined;
18
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onBlur"> & ({
19
- modelValue?: V;
20
- } & XInputNumberProps) & Partial<{}>> & import('vue').PublicProps;
21
- expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
22
- attrs: any;
23
- slots: {};
24
- emit: ((evt: "blur") => void) & ((evt: "update:modelValue", value: V) => void);
25
- }>) => import('vue').VNode & {
26
- __ctx?: Awaited<typeof __VLS_setup>;
27
- };
28
- export default _default;
29
- type __VLS_PrettifyLocal<T> = {
30
- [K in keyof T]: T[K];
31
- } & {};
@@ -1,21 +0,0 @@
1
- import { PaginationProps } from 'element-plus';
2
- export interface XPaginationProps extends Partial<Omit<PaginationProps, 'pageSizes'>> {
3
- sizes?: number[];
4
- }
5
- type __VLS_Props = XPaginationProps;
6
- type __VLS_PublicProps = {
7
- 'size'?: number;
8
- 'current'?: number;
9
- } & __VLS_Props;
10
- declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
- sizeChange: (size: number) => any;
12
- currentChange: (current: number) => any;
13
- "update:size": (value: number) => any;
14
- "update:current": (value: number) => any;
15
- }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
16
- onSizeChange?: ((size: number) => any) | undefined;
17
- onCurrentChange?: ((current: number) => any) | undefined;
18
- "onUpdate:size"?: ((value: number) => any) | undefined;
19
- "onUpdate:current"?: ((value: number) => any) | undefined;
20
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
- export default _default;
@@ -1,20 +0,0 @@
1
- import { RateProps } from 'element-plus';
2
- export interface XRateProps extends Partial<Omit<RateProps, 'modelValue'>> {
3
- }
4
- declare const _default: <V extends number>(__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<{
5
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
6
- readonly "onUpdate:modelValue"?: ((value: V) => any) | undefined;
7
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> & ({
8
- modelValue?: V;
9
- } & XRateProps) & Partial<{}>> & import('vue').PublicProps;
10
- expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
11
- attrs: any;
12
- slots: {};
13
- emit: (evt: "update:modelValue", value: V) => void;
14
- }>) => import('vue').VNode & {
15
- __ctx?: Awaited<typeof __VLS_setup>;
16
- };
17
- export default _default;
18
- type __VLS_PrettifyLocal<T> = {
19
- [K in keyof T]: T[K];
20
- } & {};