bkui-vue 2.0.2-beta.2 → 2.0.2-beta.20

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 (54) hide show
  1. package/dist/{style.css → cli.css} +1 -1
  2. package/dist/index.cjs.js +159 -133
  3. package/dist/index.esm.js +23728 -18774
  4. package/dist/index.umd.js +164 -138
  5. package/dist/style.variable.css +1 -1
  6. package/lib/cascader/cascader.d.ts +1 -0
  7. package/lib/cascader/index.d.ts +3 -0
  8. package/lib/cascader/index.js +97 -54
  9. package/lib/checkbox/index.js +1 -1
  10. package/lib/color-picker/index.js +20 -16
  11. package/lib/components.d.ts +1 -2
  12. package/lib/components.js +1 -2
  13. package/lib/date-picker/date-picker.css +220 -4
  14. package/lib/date-picker/date-picker.less +5 -5
  15. package/lib/date-picker/date-picker.variable.css +237 -21
  16. package/lib/date-picker/index.js +20 -16
  17. package/lib/directives/index.js +17 -13
  18. package/lib/form/form-item.d.ts +16 -0
  19. package/lib/form/index.d.ts +11 -0
  20. package/lib/form/index.js +26 -18
  21. package/lib/image/index.js +7 -10
  22. package/lib/index.d.ts +0 -1
  23. package/lib/index.js +1 -2
  24. package/lib/input/index.d.ts +19 -0
  25. package/lib/input/index.js +18 -15
  26. package/lib/input/input.d.ts +15 -1
  27. package/lib/message/index.js +1 -1
  28. package/lib/modal/index.js +2 -1
  29. package/lib/pop-confirm/index.d.ts +600 -2
  30. package/lib/pop-confirm/index.js +20 -8
  31. package/lib/pop-confirm/pop-confirm.d.ts +297 -1
  32. package/lib/pop-confirm/props.d.ts +146 -0
  33. package/lib/popover/index.js +8 -10
  34. package/lib/search-select/index.js +7 -15
  35. package/lib/select/index.d.ts +19 -0
  36. package/lib/select/index.js +15 -16
  37. package/lib/select/select.d.ts +10 -0
  38. package/lib/slider/index.js +2 -1
  39. package/lib/tab/index.js +7 -10
  40. package/lib/table/index.js +7 -15
  41. package/lib/tag-input/index.js +7 -15
  42. package/lib/tree/index.d.ts +4 -0
  43. package/lib/tree/index.js +17396 -57
  44. package/lib/tree/props.d.ts +1 -0
  45. package/lib/tree/tree.css +46 -0
  46. package/lib/tree/tree.d.ts +2 -0
  47. package/lib/tree/tree.less +57 -2
  48. package/lib/tree/tree.variable.css +46 -0
  49. package/lib/tree/use-node-action.d.ts +2 -2
  50. package/package.json +1 -1
  51. package/lib/plugin-popover/index.d.ts +0 -27
  52. package/lib/plugin-popover/index.js +0 -65
  53. package/lib/plugins/index.d.ts +0 -1
  54. package/lib/plugins/index.js +0 -64
@@ -240,6 +240,7 @@ type AsyncOption = {
240
240
  callback: (item: any, cb: any) => Promise<VNode | string>;
241
241
  cache: boolean;
242
242
  deepAutoOpen?: string;
243
+ trigger?: string[];
243
244
  };
244
245
  export type IIntersectionObserver = {
245
246
  enabled: boolean;
package/lib/tree/tree.css CHANGED
@@ -257,13 +257,33 @@
257
257
  }
258
258
  .bk-tree {
259
259
  font-size: 14px;
260
+ position: relative;
260
261
  }
261
262
  .bk-tree .bk-node-row {
262
263
  padding-left: calc(var(--offset-left));
264
+ position: relative;
263
265
  }
264
266
  .bk-tree .bk-node-row.is-selected {
265
267
  background-color: #ebf2ff;
266
268
  }
269
+ .bk-tree .bk-node-row.drop-before::before {
270
+ content: '';
271
+ position: absolute;
272
+ top: 0;
273
+ left: 0;
274
+ right: 0;
275
+ height: 1px;
276
+ background-color: #2196F3;
277
+ }
278
+ .bk-tree .bk-node-row.drop-after::before {
279
+ content: '';
280
+ position: absolute;
281
+ bottom: 0;
282
+ left: 0;
283
+ right: 0;
284
+ height: 1px;
285
+ background-color: #2196F3;
286
+ }
267
287
  .bk-tree-node {
268
288
  position: relative;
269
289
  display: flex;
@@ -276,6 +296,20 @@
276
296
  .bk-tree-node:not(.is-root) {
277
297
  margin-left: calc(var(--depth)*var(--indent));
278
298
  }
299
+ .bk-tree-node:not(.is-root).level-line .bk-node-action.empty-child {
300
+ position: relative;
301
+ }
302
+ .bk-tree-node:not(.is-root).level-line .bk-node-action.empty-child::before {
303
+ position: absolute;
304
+ top: calc(50% + 1px);
305
+ left: 0;
306
+ right: 0;
307
+ z-index: 1;
308
+ height: 0;
309
+ pointer-events: none;
310
+ border-bottom: var(--level-line);
311
+ content: '';
312
+ }
279
313
  .bk-tree-node:not(.is-root).level-line::before {
280
314
  position: absolute;
281
315
  top: calc(50% + 1px);
@@ -309,6 +343,7 @@
309
343
  .bk-tree-node .bk-node-action {
310
344
  margin-right: 6px;
311
345
  color: #979ba5;
346
+ min-width: 14px;
312
347
  }
313
348
  .bk-tree-node .bk-tree-icon {
314
349
  margin: 0 6px 0 4px;
@@ -319,6 +354,9 @@
319
354
  align-items: center;
320
355
  min-width: 0;
321
356
  }
357
+ .bk-tree-node .bk-node-content .node-check-box {
358
+ display: inline-flex;
359
+ }
322
360
  .bk-tree-node .bk-node-content .bk-checkbox {
323
361
  margin: 0;
324
362
  }
@@ -340,3 +378,11 @@
340
378
  .bk-tree-drop-disabled .bk-tree-node {
341
379
  cursor: no-drop;
342
380
  }
381
+ .bk-tree .insert-line {
382
+ position: absolute;
383
+ height: 2px;
384
+ background: #2196F3;
385
+ display: none;
386
+ pointer-events: none;
387
+ z-index: 999;
388
+ }
@@ -49,6 +49,7 @@ declare const _default: import("vue").DefineComponent<{
49
49
  }>>;
50
50
  cache: boolean;
51
51
  deepAutoOpen?: string;
52
+ trigger?: string[];
52
53
  }>;
53
54
  offsetLeft: import("vue-types").VueTypeValidableDef<number> & {
54
55
  default: number;
@@ -186,6 +187,7 @@ declare const _default: import("vue").DefineComponent<{
186
187
  }>>;
187
188
  cache: boolean;
188
189
  deepAutoOpen?: string;
190
+ trigger?: string[];
189
191
  }>;
190
192
  offsetLeft: import("vue-types").VueTypeValidableDef<number> & {
191
193
  default: number;
@@ -5,13 +5,38 @@
5
5
 
6
6
  .@{bk-prefix}-tree {
7
7
  font-size: 14px;
8
+ position: relative;
8
9
 
9
10
  .@{bk-prefix}-node-row {
10
11
  padding-left: calc(var(--offset-left));
12
+ position: relative;
11
13
 
12
14
  &.is-selected {
13
15
  background-color: #ebf2ff;
14
16
  }
17
+
18
+ &.drop-before {
19
+ &::before {
20
+ content: '';
21
+ position: absolute;
22
+ top: 0;
23
+ left: 0;
24
+ right: 0;
25
+ height: 1px;
26
+ background-color: #2196F3;
27
+ }
28
+ }
29
+ &.drop-after {
30
+ &::before {
31
+ content: '';
32
+ position: absolute;
33
+ bottom: 0;
34
+ left: 0;
35
+ right: 0;
36
+ height: 1px;
37
+ background-color: #2196F3;
38
+ }
39
+ }
15
40
  }
16
41
 
17
42
  &-node {
@@ -27,6 +52,25 @@
27
52
  margin-left: calc(var(--depth)*var(--indent));
28
53
 
29
54
  &.level-line {
55
+
56
+ .@{bk-prefix}-node-action {
57
+ &.empty-child {
58
+ position: relative;
59
+
60
+ &::before {
61
+ position: absolute;
62
+ top: calc(50% + 1px);
63
+ left: 0;
64
+ right: 0;
65
+ z-index: 1;
66
+ height: 0;
67
+ pointer-events: none;
68
+ border-bottom: var(--level-line);
69
+ content: '';
70
+ }
71
+ }
72
+ }
73
+
30
74
  &::before {
31
75
  position: absolute;
32
76
  top: calc(50% + 1px);
@@ -47,6 +91,7 @@
47
91
  }
48
92
  }
49
93
 
94
+
50
95
  .node-virtual-line {
51
96
  position: absolute;
52
97
  top: -12px;
@@ -68,6 +113,7 @@
68
113
  .@{bk-prefix}-node-action {
69
114
  margin-right: 6px;
70
115
  color: #979ba5;
116
+ min-width: 14px;
71
117
  }
72
118
 
73
119
  .@{bk-prefix}-tree-icon {
@@ -80,6 +126,10 @@
80
126
  align-items: center;
81
127
  min-width: 0;
82
128
 
129
+ .node-check-box {
130
+ display: inline-flex;
131
+ }
132
+
83
133
  .@{bk-prefix}-checkbox {
84
134
  margin: 0;
85
135
 
@@ -108,7 +158,12 @@
108
158
  }
109
159
  }
110
160
 
111
- &-drag-disabled {
112
-
161
+ .insert-line {
162
+ position: absolute;
163
+ height: 2px;
164
+ background: #2196F3;
165
+ display: none;
166
+ pointer-events: none;
167
+ z-index: 999;
113
168
  }
114
169
  }
@@ -387,13 +387,33 @@
387
387
  }
388
388
  .bk-tree {
389
389
  font-size: 14px;
390
+ position: relative;
390
391
  }
391
392
  .bk-tree .bk-node-row {
392
393
  padding-left: calc(var(--offset-left));
394
+ position: relative;
393
395
  }
394
396
  .bk-tree .bk-node-row.is-selected {
395
397
  background-color: #ebf2ff;
396
398
  }
399
+ .bk-tree .bk-node-row.drop-before::before {
400
+ content: '';
401
+ position: absolute;
402
+ top: 0;
403
+ left: 0;
404
+ right: 0;
405
+ height: 1px;
406
+ background-color: #2196F3;
407
+ }
408
+ .bk-tree .bk-node-row.drop-after::before {
409
+ content: '';
410
+ position: absolute;
411
+ bottom: 0;
412
+ left: 0;
413
+ right: 0;
414
+ height: 1px;
415
+ background-color: #2196F3;
416
+ }
397
417
  .bk-tree-node {
398
418
  position: relative;
399
419
  display: flex;
@@ -406,6 +426,20 @@
406
426
  .bk-tree-node:not(.is-root) {
407
427
  margin-left: calc(var(--depth)*var(--indent));
408
428
  }
429
+ .bk-tree-node:not(.is-root).level-line .bk-node-action.empty-child {
430
+ position: relative;
431
+ }
432
+ .bk-tree-node:not(.is-root).level-line .bk-node-action.empty-child::before {
433
+ position: absolute;
434
+ top: calc(50% + 1px);
435
+ left: 0;
436
+ right: 0;
437
+ z-index: 1;
438
+ height: 0;
439
+ pointer-events: none;
440
+ border-bottom: var(--level-line);
441
+ content: '';
442
+ }
409
443
  .bk-tree-node:not(.is-root).level-line::before {
410
444
  position: absolute;
411
445
  top: calc(50% + 1px);
@@ -439,6 +473,7 @@
439
473
  .bk-tree-node .bk-node-action {
440
474
  margin-right: 6px;
441
475
  color: #979ba5;
476
+ min-width: 14px;
442
477
  }
443
478
  .bk-tree-node .bk-tree-icon {
444
479
  margin: 0 6px 0 4px;
@@ -449,6 +484,9 @@
449
484
  align-items: center;
450
485
  min-width: 0;
451
486
  }
487
+ .bk-tree-node .bk-node-content .node-check-box {
488
+ display: inline-flex;
489
+ }
452
490
  .bk-tree-node .bk-node-content .bk-checkbox {
453
491
  margin: 0;
454
492
  }
@@ -470,3 +508,11 @@
470
508
  .bk-tree-drop-disabled .bk-tree-node {
471
509
  cursor: no-drop;
472
510
  }
511
+ .bk-tree .insert-line {
512
+ position: absolute;
513
+ height: 2px;
514
+ background: #2196F3;
515
+ display: none;
516
+ pointer-events: none;
517
+ z-index: 999;
518
+ }
@@ -2,12 +2,12 @@ import { TreeNode, TreePropTypes } from './props';
2
2
  import { IFlatData } from './util';
3
3
  declare const _default: (props: TreePropTypes, ctx: any, flatData: IFlatData, _renderData: any, initOption: any) => {
4
4
  renderTreeNode: (item: TreeNode, showTree?: boolean) => JSX.Element;
5
- handleTreeNodeClick: (item: TreeNode, e: MouseEvent) => void;
5
+ handleTreeNodeClick: (item: TreeNode, e: MouseEvent, event?: string) => void;
6
6
  deepAutoOpen: () => void;
7
7
  asyncNodeClick: (item: TreeNode) => Promise<boolean> | Promise<void | Record<string, unknown>>;
8
8
  setNodeAction: (args: TreeNode | TreeNode[], action: string, value: unknown) => void;
9
9
  setNodeOpened: (item: TreeNode, isOpen?: any, e?: MouseEvent, fireEmit?: boolean) => void;
10
- setSelect: (nodes: TreeNode | TreeNode[], selected?: boolean, autoOpen?: boolean, triggerEvent?: boolean) => void;
10
+ setSelect: (nodes: TreeNode | TreeNode[], selected?: boolean, autoOpen?: boolean, triggerEvent?: boolean, event?: string) => void;
11
11
  setOpen: (item: TreeNode, isOpen?: boolean, autoOpenParents?: boolean) => void;
12
12
  setNodeAttribute: (node: TreeNode, attrName: string | string[], value: (boolean | number | string)[] | boolean | number | string, loopParent?: boolean) => void;
13
13
  isIndeterminate: (item: TreeNode) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "2.0.2-beta.2",
3
+ "version": "2.0.2-beta.20",
4
4
  "workspaces": [
5
5
  "packages/**",
6
6
  "scripts/cli",
@@ -1,27 +0,0 @@
1
- /**
2
- * Tencent is pleased to support the open source community by making
3
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
4
- *
5
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
6
- *
7
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
8
- *
9
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
10
- *
11
- * ---------------------------------------------------
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
13
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
14
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
15
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
16
- *
17
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
18
- * the Software.
19
- *
20
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
21
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
23
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24
- * IN THE SOFTWARE.
25
- */
26
- import { $bkPopover } from '../popover';
27
- export default $bkPopover;
@@ -1,65 +0,0 @@
1
- import "../styles/reset.css";
2
- import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__ from "../popover";
3
- /******/ // The require scope
4
- /******/ var __webpack_require__ = {};
5
- /******/
6
- /************************************************************************/
7
- /******/ /* webpack/runtime/define property getters */
8
- /******/ (() => {
9
- /******/ // define getter functions for harmony exports
10
- /******/ __webpack_require__.d = (exports, definition) => {
11
- /******/ for(var key in definition) {
12
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
14
- /******/ }
15
- /******/ }
16
- /******/ };
17
- /******/ })();
18
- /******/
19
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
20
- /******/ (() => {
21
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
22
- /******/ })();
23
- /******/
24
- /************************************************************************/
25
- var __webpack_exports__ = {};
26
-
27
- // EXPORTS
28
- __webpack_require__.d(__webpack_exports__, {
29
- "default": () => (/* binding */ src)
30
- });
31
-
32
- ;// CONCATENATED MODULE: external "../popover"
33
- var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
34
- var y = x => () => x
35
- const popover_namespaceObject = x({ ["$bkPopover"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__.$bkPopover });
36
- ;// CONCATENATED MODULE: ../../packages/plugin-popover/src/index.ts
37
- /**
38
- * Tencent is pleased to support the open source community by making
39
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
40
- *
41
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
42
- *
43
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
44
- *
45
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
46
- *
47
- * ---------------------------------------------------
48
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
49
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
50
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
51
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
52
- *
53
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
54
- * the Software.
55
- *
56
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
57
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
58
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
59
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
60
- * IN THE SOFTWARE.
61
- */
62
-
63
- /* harmony default export */ const src = (popover_namespaceObject.$bkPopover);
64
- var __webpack_exports__default = __webpack_exports__["default"];
65
- export { __webpack_exports__default as default };
@@ -1 +0,0 @@
1
- export { default as $bkPopover } from '../plugin-popover';
@@ -1,64 +0,0 @@
1
- import "../styles/reset.css";
2
- import * as __WEBPACK_EXTERNAL_MODULE__plugin_popover_d49f5bb2__ from "../plugin-popover";
3
- /******/ // The require scope
4
- /******/ var __webpack_require__ = {};
5
- /******/
6
- /************************************************************************/
7
- /******/ /* webpack/runtime/define property getters */
8
- /******/ (() => {
9
- /******/ // define getter functions for harmony exports
10
- /******/ __webpack_require__.d = (exports, definition) => {
11
- /******/ for(var key in definition) {
12
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
14
- /******/ }
15
- /******/ }
16
- /******/ };
17
- /******/ })();
18
- /******/
19
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
20
- /******/ (() => {
21
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
22
- /******/ })();
23
- /******/
24
- /************************************************************************/
25
- var __webpack_exports__ = {};
26
-
27
- // EXPORTS
28
- __webpack_require__.d(__webpack_exports__, {
29
- $bkPopover: () => (/* reexport */ external_plugin_popover_namespaceObject["default"])
30
- });
31
-
32
- ;// CONCATENATED MODULE: external "../plugin-popover"
33
- var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
34
- var y = x => () => x
35
- const external_plugin_popover_namespaceObject = x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE__plugin_popover_d49f5bb2__["default"] });
36
- ;// CONCATENATED MODULE: ../../packages/plugins/src/index.ts
37
- /*
38
- * Tencent is pleased to support the open source community by making
39
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
40
- *
41
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
42
- *
43
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
44
- *
45
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
46
- *
47
- * ---------------------------------------------------
48
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
49
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
50
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
51
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
52
- *
53
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
54
- * the Software.
55
- *
56
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
57
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
58
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
59
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
60
- * IN THE SOFTWARE.
61
- */
62
-
63
- var __webpack_exports__$bkPopover = __webpack_exports__.$bkPopover;
64
- export { __webpack_exports__$bkPopover as $bkPopover };