neko-ui 2.6.7 → 2.7.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 (139) hide show
  1. package/CHANGELOG.md +24 -6
  2. package/es/@moneko/routes/index.d.ts +1 -1
  3. package/es/back-top/style.js +1 -3
  4. package/es/back-top/style.js.map +1 -1
  5. package/es/button/style.js.map +1 -1
  6. package/es/capture-screen/index.js +1 -1
  7. package/es/capture-screen/index.js.map +1 -1
  8. package/es/cron/begin-interval.d.ts +1 -0
  9. package/es/cron/index.js +1 -1
  10. package/es/cron/index.js.map +1 -1
  11. package/es/cron/item.d.ts +1 -0
  12. package/es/cron/period.d.ts +1 -0
  13. package/es/cron/some.d.ts +1 -0
  14. package/es/date-picker/index.js +1 -1
  15. package/es/date-picker/index.js.map +1 -1
  16. package/es/img/style.js +0 -2
  17. package/es/img/style.js.map +1 -1
  18. package/es/index.d.ts +1 -0
  19. package/es/index.js +1 -1
  20. package/es/index.js.map +1 -1
  21. package/es/md-style/index.js +6 -8
  22. package/es/md-style/index.js.map +1 -1
  23. package/es/modal/hooks.d.ts +5 -0
  24. package/es/modal/hooks.js +2 -0
  25. package/es/modal/hooks.js.map +1 -0
  26. package/es/modal/style.js +3 -4
  27. package/es/modal/style.js.map +1 -1
  28. package/es/notification/index.d.ts +59 -0
  29. package/es/notification/index.js +2 -0
  30. package/es/notification/index.js.map +1 -0
  31. package/es/notification/notification.d.ts +3 -0
  32. package/es/notification/notification.js +2 -0
  33. package/es/notification/notification.js.map +1 -0
  34. package/es/notification/queque.d.ts +46 -0
  35. package/es/notification/queque.js +2 -0
  36. package/es/notification/queque.js.map +1 -0
  37. package/es/notification/styles.d.ts +1 -0
  38. package/es/notification/styles.js +97 -0
  39. package/es/notification/styles.js.map +1 -0
  40. package/es/popover/index.js +1 -1
  41. package/es/popover/index.js.map +1 -1
  42. package/es/popover/style.js +1 -3
  43. package/es/popover/style.js.map +1 -1
  44. package/es/prism/css.js +1 -3
  45. package/es/prism/css.js.map +1 -1
  46. package/es/select/index.js +1 -1
  47. package/es/select/index.js.map +1 -1
  48. package/es/theme/index.js +10 -8
  49. package/es/theme/index.js.map +1 -1
  50. package/es/tree/index.d.ts +3 -99
  51. package/es/tree/index.js +1 -1
  52. package/es/tree/index.js.map +1 -1
  53. package/es/tree/register.d.ts +1 -0
  54. package/es/tree/register.js +2 -0
  55. package/es/tree/register.js.map +1 -0
  56. package/es/tree/type.d.ts +104 -0
  57. package/es/tree/type.js +2 -0
  58. package/es/tree/type.js.map +1 -0
  59. package/lib/@moneko/routes/index.d.ts +1 -1
  60. package/lib/back-top/style.js +1 -3
  61. package/lib/back-top/style.js.map +1 -1
  62. package/lib/button/style.js.map +1 -1
  63. package/lib/capture-screen/index.js +1 -1
  64. package/lib/capture-screen/index.js.map +1 -1
  65. package/lib/cron/begin-interval.d.ts +1 -0
  66. package/lib/cron/index.js +1 -1
  67. package/lib/cron/index.js.map +1 -1
  68. package/lib/cron/item.d.ts +1 -0
  69. package/lib/cron/period.d.ts +1 -0
  70. package/lib/cron/some.d.ts +1 -0
  71. package/lib/img/style.js +0 -2
  72. package/lib/img/style.js.map +1 -1
  73. package/lib/index.d.ts +1 -0
  74. package/lib/index.js +1 -1
  75. package/lib/index.js.map +1 -1
  76. package/lib/md-style/index.js +6 -8
  77. package/lib/md-style/index.js.map +1 -1
  78. package/lib/modal/hooks.d.ts +5 -0
  79. package/lib/modal/hooks.js +2 -0
  80. package/lib/modal/hooks.js.map +1 -0
  81. package/lib/modal/style.js +3 -4
  82. package/lib/modal/style.js.map +1 -1
  83. package/lib/notification/index.d.ts +59 -0
  84. package/lib/notification/index.js +2 -0
  85. package/lib/notification/index.js.map +1 -0
  86. package/lib/notification/notification.d.ts +3 -0
  87. package/lib/notification/notification.js +2 -0
  88. package/lib/notification/notification.js.map +1 -0
  89. package/lib/notification/queque.d.ts +46 -0
  90. package/lib/notification/queque.js +2 -0
  91. package/lib/notification/queque.js.map +1 -0
  92. package/lib/notification/styles.d.ts +1 -0
  93. package/lib/notification/styles.js +97 -0
  94. package/lib/notification/styles.js.map +1 -0
  95. package/lib/popover/index.js +1 -1
  96. package/lib/popover/index.js.map +1 -1
  97. package/lib/popover/style.js +1 -3
  98. package/lib/popover/style.js.map +1 -1
  99. package/lib/prism/css.js +1 -3
  100. package/lib/prism/css.js.map +1 -1
  101. package/lib/theme/index.js +8 -6
  102. package/lib/theme/index.js.map +1 -1
  103. package/lib/tree/index.d.ts +3 -99
  104. package/lib/tree/index.js +1 -1
  105. package/lib/tree/index.js.map +1 -1
  106. package/lib/tree/register.d.ts +1 -0
  107. package/lib/tree/register.js +2 -0
  108. package/lib/tree/register.js.map +1 -0
  109. package/lib/tree/type.d.ts +104 -0
  110. package/lib/tree/type.js +2 -0
  111. package/lib/tree/type.js.map +1 -0
  112. package/package.json +23 -21
  113. package/umd/index.js +1 -1
  114. package/es/@introduce/api.md +0 -158
  115. package/es/@introduce/getting-started/api.md +0 -34
  116. package/es/@introduce/html/doc.md +0 -45
  117. package/es/@introduce/react/doc.md +0 -49
  118. package/es/@introduce/solid/doc.md +0 -39
  119. package/es/@introduce/vue/doc.md +0 -54
  120. package/es/@moneko/cli/doc.md +0 -211
  121. package/es/@moneko/config/api.md +0 -213
  122. package/es/@moneko/locales/doc.md +0 -130
  123. package/es/@moneko/mock/api.md +0 -177
  124. package/es/@moneko/request/api.md +0 -31
  125. package/es/@moneko/routes/doc.md +0 -81
  126. package/es/@moneko/sso/api.md +0 -158
  127. package/lib/@introduce/api.md +0 -158
  128. package/lib/@introduce/getting-started/api.md +0 -34
  129. package/lib/@introduce/html/doc.md +0 -45
  130. package/lib/@introduce/react/doc.md +0 -49
  131. package/lib/@introduce/solid/doc.md +0 -39
  132. package/lib/@introduce/vue/doc.md +0 -54
  133. package/lib/@moneko/cli/doc.md +0 -211
  134. package/lib/@moneko/config/api.md +0 -213
  135. package/lib/@moneko/locales/doc.md +0 -130
  136. package/lib/@moneko/mock/api.md +0 -177
  137. package/lib/@moneko/request/api.md +0 -31
  138. package/lib/@moneko/routes/doc.md +0 -81
  139. package/lib/@moneko/sso/api.md +0 -158
@@ -0,0 +1,104 @@
1
+ import type { BasicConfig } from '../basic-config';
2
+ import type { Schema } from '../from-schema';
3
+ export interface TreeBaseProp {
4
+ /** 自定义类名 */
5
+ class?: string;
6
+ /** 自定义样式表 */
7
+ css?: string;
8
+ /** 尺寸
9
+ * @default 'normal'
10
+ */
11
+ size?: BasicConfig['size'];
12
+ /** 只读 */
13
+ readonly?: boolean;
14
+ /** 开启取消选中, 仅多选模式生效 */
15
+ toggle?: boolean;
16
+ /** 方向
17
+ * @default 'ltr'
18
+ */
19
+ direction?: 'rtl' | 'ltr';
20
+ /** 点击行时的回调函数 */
21
+ onRowClick?: (e: MouseEvent, key: string, item: TreeData) => void;
22
+ /** 双击行时的回调函数 */
23
+ onRowDoubleClick?: (e: MouseEvent, key: string, item: TreeData) => void;
24
+ /** 自定义渲染行 */
25
+ renderRow?: (item: TreeData, title: JSX.Element, subTitle?: JSX.Element) => JSX.Element[];
26
+ /** 开启此选项支持 `JSONSchema`
27
+ * @default false
28
+ */
29
+ fromSchema?: false;
30
+ }
31
+ interface TreeBaseProps extends TreeBaseProp {
32
+ /** 选中的值, 多选模式时为数组 */
33
+ value?: string;
34
+ /** 多选模式
35
+ * @default false
36
+ */
37
+ multiple?: false;
38
+ /** 选中的值发生修改时的回调函数, 多选模式时入参为数组 */
39
+ onChange?(key?: string, item?: TreeData): void;
40
+ }
41
+ interface TreeMultipleBaseProps extends TreeBaseProp {
42
+ /** 选中的值 */
43
+ value?: string[];
44
+ /** 多选模式
45
+ * @default true
46
+ */
47
+ multiple: true;
48
+ onChange?(key?: string[], item?: TreeData): void;
49
+ }
50
+ export interface TreeProps extends TreeBaseProps {
51
+ /** 数据源 */
52
+ data: TreeData[];
53
+ }
54
+ export interface TreeSchemaProps extends Omit<TreeBaseProps, 'fromSchema'> {
55
+ /** 开启此选项支持 `JSONSchema` */
56
+ fromSchema: true;
57
+ /** 数据源 */
58
+ data: Schema;
59
+ }
60
+ export interface TreeStringProps extends TreeBaseProps {
61
+ /** 数据源 */
62
+ data: string;
63
+ }
64
+ export interface TreeMultipleProps extends TreeMultipleBaseProps {
65
+ /** 数据源 */
66
+ data: TreeData[];
67
+ }
68
+ export interface TreeMultipleSchemaProps extends Omit<TreeMultipleBaseProps, 'fromSchema'> {
69
+ /** 开启此选项支持 `JSONSchema` */
70
+ fromSchema: true;
71
+ /** 数据源 */
72
+ data: Schema;
73
+ }
74
+ export interface TreeMultipleStringProps extends TreeMultipleBaseProps {
75
+ /** 数据源 */
76
+ data: string;
77
+ }
78
+ type CustomEvents = 'onChange' | 'onRowDoubleClick' | 'onRowClick';
79
+ export type TreeElement = CustomElement<TreeProps, CustomEvents>;
80
+ export type TreeSchemaElement = CustomElement<TreeSchemaProps, CustomEvents>;
81
+ export type TreeStringElement = CustomElement<TreeStringProps, CustomEvents>;
82
+ export type TreeMultipleElement = CustomElement<TreeMultipleProps, CustomEvents>;
83
+ export type TreeMultipleSchemaElement = CustomElement<TreeMultipleSchemaProps, CustomEvents>;
84
+ export type TreeMultipleStringElement = CustomElement<TreeMultipleStringProps, CustomEvents>;
85
+ export interface TreeStack extends TreeData {
86
+ /** 深度 */
87
+ depth?: number;
88
+ }
89
+ export interface TreeData<T = string> {
90
+ /** key(唯一值) */
91
+ key: T;
92
+ /** 属性 */
93
+ name?: string;
94
+ /** 标题 */
95
+ title?: string;
96
+ /** 副标题 */
97
+ subTitle?: string;
98
+ /** 详细描述 */
99
+ description?: string;
100
+ /** 子项 */
101
+ children?: TreeData<T>[];
102
+ [key: string | number | symbol]: T | string | number | symbol | boolean | TreeData<T>[] | undefined;
103
+ }
104
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
2
+ //# sourceMappingURL=type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../components/tree/type.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "name": "neko-ui",
3
- "version": "2.6.7",
3
+ "version": "2.7.0",
4
4
  "description": "WebComponents UI Libraries",
5
5
  "main": "es/index.js",
6
6
  "scripts": {
7
7
  "build": "mo build library solid",
8
8
  "changelog": "mo changelog CHANGELOG.md && git add CHANGELOG.md",
9
- "lint": "mo eslint components && mo eslint site && mo stylelint components && mo stylelint site && jest --coverage",
9
+ "prelint": "mo eslint components && mo eslint site",
10
+ "stylelint": "mo stylelint components && mo stylelint site",
11
+ "lint": "jest --coverage",
10
12
  "precommit": "yarn lint && yarn changelog",
11
- "prepare": "mo githooks pre-commit=\"yarn precommit\" commit-msg=\"npx --no -- commitlint --edit \\${1}\"",
13
+ "ppprepare": "mo githooks pre-commit=\"yarn precommit\" commit-msg=\"npx --no -- commitlint --edit \\${1}\"",
12
14
  "start": "rm -rf lib && rm -rf es && mo start library solid",
13
15
  "test": "jest --coverage --watchAll"
14
16
  },
@@ -40,34 +42,33 @@
40
42
  "ui libraries"
41
43
  ],
42
44
  "devDependencies": {
43
- "@commitlint/cli": "17.8.1",
44
- "@commitlint/config-conventional": "17.8.1",
45
- "@moneko/cli": "2.6.1",
46
- "@moneko/core": "3.9.10",
47
- "@moneko/solid": "1.4.1",
48
- "@solidjs/testing-library": "0.8.4",
49
- "@swc/jest": "0.2.29",
50
- "@testing-library/jest-dom": "6.1.5",
45
+ "@commitlint/cli": "18.4.4",
46
+ "@commitlint/config-conventional": "18.4.4",
47
+ "@moneko/cli": "2.7.0",
48
+ "@moneko/core": "3.9.22",
49
+ "@moneko/solid": "1.6.1",
50
+ "@solidjs/testing-library": "0.8.5",
51
+ "@swc/jest": "0.2.30",
52
+ "@testing-library/jest-dom": "6.2.0",
51
53
  "@types/jest": "29.5.11",
52
54
  "babel-loader": "9.1.3",
53
- "eslint-config-neko": "2.3.0",
54
- "eslint-plugin-solid": "0.13.0",
55
+ "eslint-config-neko": "2.3.1",
56
+ "eslint-plugin-solid": "0.13.1",
55
57
  "husky": "8.0.3",
56
58
  "jest": "29.7.0",
57
59
  "jest-environment-jsdom": "29.7.0",
58
- "n-code-live": "1.0.8",
60
+ "n-code-live": "1.1.0",
59
61
  "n-katex": "1.0.8",
60
- "shadow-dom-testing-library": "1.11.0",
61
- "stylelint-config-moneko": "1.2.1"
62
+ "shadow-dom-testing-library": "1.11.2"
62
63
  },
63
64
  "dependencies": {
64
- "@moneko/common": "1.3.0",
65
- "@moneko/css": "1.0.5",
65
+ "@moneko/common": "1.3.1",
66
+ "@moneko/css": "1.1.1",
66
67
  "custom-element-type": "1.0.3",
67
68
  "dayjs": "1.11.10",
68
- "marked-completed": "1.2.13",
69
+ "marked-completed": "1.2.14",
69
70
  "solid-element": "1.8.0",
70
- "solid-js": "1.8.7"
71
+ "solid-js": "1.8.11"
71
72
  },
72
73
  "files": [
73
74
  "es",
@@ -79,6 +80,7 @@
79
80
  "LICENSE"
80
81
  ],
81
82
  "browserslist": [
82
- "Chrome >= 86"
83
+ "Chrome >= 86",
84
+ "Safari >= 15"
83
85
  ]
84
86
  }