@kdcloudjs/kdesign 1.6.40 → 1.7.1
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.
- package/CHANGELOG.md +32 -0
- package/dist/default-theme.js +4 -5
- package/dist/kdesign-complete.less +806 -35
- package/dist/kdesign.css +1051 -35
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +59352 -40542
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +9 -9
- package/dist/kdesign.min.js.map +1 -1
- package/es/alert/style/index.css +2 -0
- package/es/anchor/style/index.css +2 -0
- package/es/avatar/style/index.css +2 -0
- package/es/badge/style/index.css +2 -0
- package/es/base-data/style/index.css +2 -0
- package/es/button/style/index.css +2 -0
- package/es/card/style/index.css +2 -0
- package/es/carousel/style/index.css +2 -0
- package/es/cascader/cascader.js +14 -3
- package/es/cascader/style/index.css +2 -0
- package/es/cascader/util.js +13 -4
- package/es/checkbox/style/index.css +2 -0
- package/es/city-picker/style/index.css +2 -0
- package/es/collapse/style/index.css +2 -0
- package/es/color-picker/color-picker-panel.d.ts +4 -0
- package/es/color-picker/color-picker-panel.js +239 -0
- package/es/color-picker/color-picker.d.ts +4 -0
- package/es/color-picker/color-picker.js +201 -0
- package/es/color-picker/constant/colorTypes.d.ts +4 -0
- package/es/color-picker/constant/colorTypes.js +13 -0
- package/es/color-picker/constant/defaultColor.d.ts +1 -0
- package/es/color-picker/constant/defaultColor.js +1 -0
- package/es/color-picker/constant/systemPresetColor.d.ts +1 -0
- package/es/color-picker/constant/systemPresetColor.js +1 -0
- package/es/color-picker/index.d.ts +3 -0
- package/es/color-picker/index.js +3 -0
- package/es/color-picker/interface.d.ts +64 -0
- package/es/color-picker/interface.js +3 -0
- package/es/color-picker/style/css.js +2 -0
- package/es/color-picker/style/index.css +317 -0
- package/es/color-picker/style/index.d.ts +2 -0
- package/es/color-picker/style/index.js +2 -0
- package/es/color-picker/style/index.less +253 -0
- package/es/color-picker/style/mixin.less +5 -0
- package/es/color-picker/style/token.less +22 -0
- package/es/color-picker/utils/colorFormat.d.ts +18 -0
- package/es/color-picker/utils/colorFormat.js +153 -0
- package/es/color-picker/utils/convertLetters.d.ts +1 -0
- package/es/color-picker/utils/convertLetters.js +12 -0
- package/es/color-picker/utils/hooks/useOnClickOutside.d.ts +2 -0
- package/es/color-picker/utils/hooks/useOnClickOutside.js +16 -0
- package/es/color-picker/utils/validateColor.d.ts +1 -0
- package/es/color-picker/utils/validateColor.js +24 -0
- package/es/config-provider/compDefaultProps.d.ts +25 -0
- package/es/config-provider/compDefaultProps.js +29 -0
- package/es/date-picker/style/index.css +2 -0
- package/es/drawer/style/index.css +2 -0
- package/es/dropdown/style/index.css +2 -0
- package/es/empty/style/index.css +2 -0
- package/es/filter/style/index.css +2 -0
- package/es/form/style/index.css +2 -0
- package/es/grid/style/index.css +2 -0
- package/es/icon/style/index.css +2 -0
- package/es/image/style/index.css +2 -0
- package/es/image-cropper/style/index.css +2 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/input/ClearableLabeledInput.js +8 -2
- package/es/input/input.js +1 -5
- package/es/input/style/index.css +2 -0
- package/es/input-number/style/index.css +2 -0
- package/es/layout/style/index.css +2 -0
- package/es/link/style/index.css +2 -0
- package/es/locale/locale.d.ts +4 -0
- package/es/locale/locale.js +6 -4
- package/es/locale/zh-CN.d.ts +1 -0
- package/es/locale/zh-CN.js +1 -0
- package/es/menu/style/index.css +2 -0
- package/es/message/style/index.css +2 -0
- package/es/modal/style/index.css +2 -0
- package/es/notification/style/index.css +2 -0
- package/es/pagination/style/index.css +116 -29
- package/es/pagination/style/index.less +38 -29
- package/es/popconfirm/style/index.css +2 -0
- package/es/progress/style/index.css +2 -0
- package/es/radio/style/index.css +2 -0
- package/es/rate/style/index.css +2 -0
- package/es/search/style/index.css +2 -0
- package/es/select/style/index.css +2 -0
- package/es/slider/style/index.css +2 -0
- package/es/space/style/index.css +2 -0
- package/es/spin/style/index.css +2 -0
- package/es/split-panel/style/index.css +2 -0
- package/es/stepper/style/index.css +2 -0
- package/es/steps/style/index.css +2 -0
- package/es/style/index.css +2 -0
- package/es/style/themes/default.less +10 -6
- package/es/switch/style/index.css +2 -0
- package/es/table/style/index.css +2 -0
- package/es/tabs/style/index.css +2 -0
- package/es/tag/style/index.css +2 -0
- package/es/timeline/style/index.css +2 -0
- package/es/tooltip/style/index.css +2 -0
- package/es/transfer/style/index.css +2 -0
- package/es/tree/style/index.css +2 -0
- package/es/tree/tree.d.ts +2 -1
- package/es/tree/tree.js +4 -3
- package/es/tree-select/index.d.ts +3 -0
- package/es/tree-select/index.js +3 -0
- package/es/tree-select/interface.d.ts +68 -0
- package/es/tree-select/interface.js +4 -0
- package/es/tree-select/style/css.js +2 -0
- package/es/tree-select/style/index.css +504 -0
- package/es/tree-select/style/index.d.ts +2 -0
- package/es/tree-select/style/index.js +2 -0
- package/es/tree-select/style/index.less +392 -0
- package/es/tree-select/style/mixin.less +29 -0
- package/es/tree-select/style/token.less +54 -0
- package/es/tree-select/tree-select.d.ts +4 -0
- package/es/tree-select/tree-select.js +506 -0
- package/es/typography/style/index.css +2 -0
- package/es/upload/style/index.css +2 -0
- package/lib/alert/style/index.css +2 -0
- package/lib/anchor/style/index.css +2 -0
- package/lib/avatar/style/index.css +2 -0
- package/lib/badge/style/index.css +2 -0
- package/lib/base-data/style/index.css +2 -0
- package/lib/button/style/index.css +2 -0
- package/lib/card/style/index.css +2 -0
- package/lib/carousel/style/index.css +2 -0
- package/lib/cascader/cascader.js +14 -3
- package/lib/cascader/style/index.css +2 -0
- package/lib/cascader/util.js +13 -4
- package/lib/checkbox/style/index.css +2 -0
- package/lib/city-picker/style/index.css +2 -0
- package/lib/collapse/style/index.css +2 -0
- package/lib/color-picker/color-picker-panel.d.ts +4 -0
- package/lib/color-picker/color-picker-panel.js +253 -0
- package/lib/color-picker/color-picker.d.ts +4 -0
- package/lib/color-picker/color-picker.js +214 -0
- package/lib/color-picker/constant/colorTypes.d.ts +4 -0
- package/lib/color-picker/constant/colorTypes.js +20 -0
- package/lib/color-picker/constant/defaultColor.d.ts +1 -0
- package/lib/color-picker/constant/defaultColor.js +8 -0
- package/lib/color-picker/constant/systemPresetColor.d.ts +1 -0
- package/lib/color-picker/constant/systemPresetColor.js +8 -0
- package/lib/color-picker/index.d.ts +3 -0
- package/lib/color-picker/index.js +27 -0
- package/lib/color-picker/interface.d.ts +64 -0
- package/lib/color-picker/interface.js +11 -0
- package/lib/color-picker/style/css.js +4 -0
- package/lib/color-picker/style/index.css +317 -0
- package/lib/color-picker/style/index.d.ts +2 -0
- package/lib/color-picker/style/index.js +4 -0
- package/lib/color-picker/style/index.less +253 -0
- package/lib/color-picker/style/mixin.less +5 -0
- package/lib/color-picker/style/token.less +22 -0
- package/lib/color-picker/utils/colorFormat.d.ts +18 -0
- package/lib/color-picker/utils/colorFormat.js +166 -0
- package/lib/color-picker/utils/convertLetters.d.ts +1 -0
- package/lib/color-picker/utils/convertLetters.js +18 -0
- package/lib/color-picker/utils/hooks/useOnClickOutside.d.ts +2 -0
- package/lib/color-picker/utils/hooks/useOnClickOutside.js +23 -0
- package/lib/color-picker/utils/validateColor.d.ts +1 -0
- package/lib/color-picker/utils/validateColor.js +30 -0
- package/lib/config-provider/compDefaultProps.d.ts +25 -0
- package/lib/config-provider/compDefaultProps.js +29 -0
- package/lib/date-picker/style/index.css +2 -0
- package/lib/drawer/style/index.css +2 -0
- package/lib/dropdown/style/index.css +2 -0
- package/lib/empty/style/index.css +2 -0
- package/lib/filter/style/index.css +2 -0
- package/lib/form/style/index.css +2 -0
- package/lib/grid/style/index.css +2 -0
- package/lib/icon/style/index.css +2 -0
- package/lib/image/style/index.css +2 -0
- package/lib/image-cropper/style/index.css +2 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +14 -0
- package/lib/input/ClearableLabeledInput.js +8 -2
- package/lib/input/input.js +1 -5
- package/lib/input/style/index.css +2 -0
- package/lib/input-number/style/index.css +2 -0
- package/lib/layout/style/index.css +2 -0
- package/lib/link/style/index.css +2 -0
- package/lib/locale/locale.d.ts +4 -0
- package/lib/locale/locale.js +6 -4
- package/lib/locale/zh-CN.d.ts +1 -0
- package/lib/locale/zh-CN.js +1 -0
- package/lib/menu/style/index.css +2 -0
- package/lib/message/style/index.css +2 -0
- package/lib/modal/style/index.css +2 -0
- package/lib/notification/style/index.css +2 -0
- package/lib/pagination/style/index.css +116 -29
- package/lib/pagination/style/index.less +38 -29
- package/lib/popconfirm/style/index.css +2 -0
- package/lib/progress/style/index.css +2 -0
- package/lib/radio/style/index.css +2 -0
- package/lib/rate/style/index.css +2 -0
- package/lib/search/style/index.css +2 -0
- package/lib/select/style/index.css +2 -0
- package/lib/slider/style/index.css +2 -0
- package/lib/space/style/index.css +2 -0
- package/lib/spin/style/index.css +2 -0
- package/lib/split-panel/style/index.css +2 -0
- package/lib/stepper/style/index.css +2 -0
- package/lib/steps/style/index.css +2 -0
- package/lib/style/components.less +2 -0
- package/lib/style/index.css +2 -0
- package/lib/style/themes/default.less +10 -6
- package/lib/switch/style/index.css +2 -0
- package/lib/table/style/index.css +2 -0
- package/lib/tabs/style/index.css +2 -0
- package/lib/tag/style/index.css +2 -0
- package/lib/timeline/style/index.css +2 -0
- package/lib/tooltip/style/index.css +2 -0
- package/lib/transfer/style/index.css +2 -0
- package/lib/tree/style/index.css +2 -0
- package/lib/tree/tree.d.ts +2 -1
- package/lib/tree/tree.js +4 -3
- package/lib/tree-select/index.d.ts +3 -0
- package/lib/tree-select/index.js +27 -0
- package/lib/tree-select/interface.d.ts +68 -0
- package/lib/tree-select/interface.js +13 -0
- package/lib/tree-select/style/css.js +4 -0
- package/lib/tree-select/style/index.css +504 -0
- package/lib/tree-select/style/index.d.ts +2 -0
- package/lib/tree-select/style/index.js +4 -0
- package/lib/tree-select/style/index.less +392 -0
- package/lib/tree-select/style/mixin.less +29 -0
- package/lib/tree-select/style/token.less +54 -0
- package/lib/tree-select/tree-select.d.ts +4 -0
- package/lib/tree-select/tree-select.js +519 -0
- package/lib/typography/style/index.css +2 -0
- package/lib/upload/style/index.css +2 -0
- package/package.json +5 -1
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
@import "../checkbox/style/index.less";
|
|
11
11
|
@import "../city-picker/style/index.less";
|
|
12
12
|
@import "../collapse/style/index.less";
|
|
13
|
+
@import "../color-picker/style/index.less";
|
|
13
14
|
@import "../date-picker/style/index.less";
|
|
14
15
|
@import "../drawer/style/index.less";
|
|
15
16
|
@import "../dropdown/style/index.less";
|
|
@@ -49,5 +50,6 @@
|
|
|
49
50
|
@import "../tooltip/style/index.less";
|
|
50
51
|
@import "../transfer/style/index.less";
|
|
51
52
|
@import "../tree/style/index.less";
|
|
53
|
+
@import "../tree-select/style/index.less";
|
|
52
54
|
@import "../typography/style/index.less";
|
|
53
55
|
@import "../upload/style/index.less";
|
package/lib/style/index.css
CHANGED
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
/* ----------- Transfer ——————---- end */
|
|
57
57
|
/* ----------- DatePicker ——————---- start */
|
|
58
58
|
/* ----------- DatePicker ——————---- end */
|
|
59
|
+
/* ----------- ColorPicker ——————---- start */
|
|
60
|
+
/* ----------- ColorPicker ——————---- end */
|
|
59
61
|
/* ----------- Tree ——————---- start */
|
|
60
62
|
/* ----------- Tree ——————---- end */
|
|
61
63
|
/* ----------- Alert ——————---- start */
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
@kd-prefix: kd;
|
|
3
2
|
|
|
4
3
|
/* ----------- color ——————---- start */
|
|
@@ -18,7 +17,7 @@
|
|
|
18
17
|
|
|
19
18
|
@theme-color-disabled: @theme-color-level3;
|
|
20
19
|
@theme-color-hover: @theme-color-level5;
|
|
21
|
-
@theme-color-click: @theme-color-level7
|
|
20
|
+
@theme-color-click: @theme-color-level7; // 点击色
|
|
22
21
|
@theme-color-active-light: @theme-color-level1; // 浅色选中
|
|
23
22
|
@theme-color-active-dark: @theme-color; // 深色选中
|
|
24
23
|
@hover-color: #f5f5f5; // 中性的悬停色
|
|
@@ -68,9 +67,9 @@
|
|
|
68
67
|
/* ----------- color ——————---- end */
|
|
69
68
|
|
|
70
69
|
/* ----------- motion ——————---- start */
|
|
71
|
-
@ease-out: cubic-bezier(0
|
|
72
|
-
@ease-in: cubic-bezier(0.4,0,1,0.6);
|
|
73
|
-
@ease: cubic-bezier(0.4,0,0.6,1);
|
|
70
|
+
@ease-out: cubic-bezier(0, .4, .4, 1);
|
|
71
|
+
@ease-in: cubic-bezier(0.4, 0, 1, 0.6);
|
|
72
|
+
@ease: cubic-bezier(0.4, 0, 0.6, 1);
|
|
74
73
|
/* ----------- motion ——————---- end */
|
|
75
74
|
|
|
76
75
|
/* ----------- transition ——————---- start */
|
|
@@ -488,6 +487,11 @@
|
|
|
488
487
|
@date-ranges-width: 160px;
|
|
489
488
|
|
|
490
489
|
/* ----------- DatePicker ——————---- end */
|
|
490
|
+
|
|
491
|
+
/* ----------- ColorPicker ——————---- start */
|
|
492
|
+
|
|
493
|
+
/* ----------- ColorPicker ——————---- end */
|
|
494
|
+
|
|
491
495
|
/* ----------- Tree ——————---- start */
|
|
492
496
|
@tree-node-height: 28px;
|
|
493
497
|
@tree-font-size: @font-size;
|
|
@@ -702,4 +706,4 @@
|
|
|
702
706
|
@advancedSelector-dropdown-options-height: 32px;
|
|
703
707
|
@advancedSelector-hover-bg: @hover-color;
|
|
704
708
|
|
|
705
|
-
/* ----------- AdvancedSelector ——————---- end */
|
|
709
|
+
/* ----------- AdvancedSelector ——————---- end */
|
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
/* ----------- Transfer ——————---- end */
|
|
57
57
|
/* ----------- DatePicker ——————---- start */
|
|
58
58
|
/* ----------- DatePicker ——————---- end */
|
|
59
|
+
/* ----------- ColorPicker ——————---- start */
|
|
60
|
+
/* ----------- ColorPicker ——————---- end */
|
|
59
61
|
/* ----------- Tree ——————---- start */
|
|
60
62
|
/* ----------- Tree ——————---- end */
|
|
61
63
|
/* ----------- Alert ——————---- start */
|
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
/* ----------- Transfer ——————---- end */
|
|
57
57
|
/* ----------- DatePicker ——————---- start */
|
|
58
58
|
/* ----------- DatePicker ——————---- end */
|
|
59
|
+
/* ----------- ColorPicker ——————---- start */
|
|
60
|
+
/* ----------- ColorPicker ——————---- end */
|
|
59
61
|
/* ----------- Tree ——————---- start */
|
|
60
62
|
/* ----------- Tree ——————---- end */
|
|
61
63
|
/* ----------- Alert ——————---- start */
|
package/lib/tabs/style/index.css
CHANGED
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
/* ----------- Transfer ——————---- end */
|
|
57
57
|
/* ----------- DatePicker ——————---- start */
|
|
58
58
|
/* ----------- DatePicker ——————---- end */
|
|
59
|
+
/* ----------- ColorPicker ——————---- start */
|
|
60
|
+
/* ----------- ColorPicker ——————---- end */
|
|
59
61
|
/* ----------- Tree ——————---- start */
|
|
60
62
|
/* ----------- Tree ——————---- end */
|
|
61
63
|
/* ----------- Alert ——————---- start */
|
package/lib/tag/style/index.css
CHANGED
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
/* ----------- Transfer ——————---- end */
|
|
57
57
|
/* ----------- DatePicker ——————---- start */
|
|
58
58
|
/* ----------- DatePicker ——————---- end */
|
|
59
|
+
/* ----------- ColorPicker ——————---- start */
|
|
60
|
+
/* ----------- ColorPicker ——————---- end */
|
|
59
61
|
/* ----------- Tree ——————---- start */
|
|
60
62
|
/* ----------- Tree ——————---- end */
|
|
61
63
|
/* ----------- Alert ——————---- start */
|
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
/* ----------- Transfer ——————---- end */
|
|
57
57
|
/* ----------- DatePicker ——————---- start */
|
|
58
58
|
/* ----------- DatePicker ——————---- end */
|
|
59
|
+
/* ----------- ColorPicker ——————---- start */
|
|
60
|
+
/* ----------- ColorPicker ——————---- end */
|
|
59
61
|
/* ----------- Tree ——————---- start */
|
|
60
62
|
/* ----------- Tree ——————---- end */
|
|
61
63
|
/* ----------- Alert ——————---- start */
|
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
/* ----------- Transfer ——————---- end */
|
|
57
57
|
/* ----------- DatePicker ——————---- start */
|
|
58
58
|
/* ----------- DatePicker ——————---- end */
|
|
59
|
+
/* ----------- ColorPicker ——————---- start */
|
|
60
|
+
/* ----------- ColorPicker ——————---- end */
|
|
59
61
|
/* ----------- Tree ——————---- start */
|
|
60
62
|
/* ----------- Tree ——————---- end */
|
|
61
63
|
/* ----------- Alert ——————---- start */
|
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
/* ----------- Transfer ——————---- end */
|
|
57
57
|
/* ----------- DatePicker ——————---- start */
|
|
58
58
|
/* ----------- DatePicker ——————---- end */
|
|
59
|
+
/* ----------- ColorPicker ——————---- start */
|
|
60
|
+
/* ----------- ColorPicker ——————---- end */
|
|
59
61
|
/* ----------- Tree ——————---- start */
|
|
60
62
|
/* ----------- Tree ——————---- end */
|
|
61
63
|
/* ----------- Alert ——————---- start */
|
package/lib/tree/style/index.css
CHANGED
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
/* ----------- Transfer ——————---- end */
|
|
57
57
|
/* ----------- DatePicker ——————---- start */
|
|
58
58
|
/* ----------- DatePicker ——————---- end */
|
|
59
|
+
/* ----------- ColorPicker ——————---- start */
|
|
60
|
+
/* ----------- ColorPicker ——————---- end */
|
|
59
61
|
/* ----------- Tree ——————---- start */
|
|
60
62
|
/* ----------- Tree ——————---- end */
|
|
61
63
|
/* ----------- Alert ——————---- start */
|
package/lib/tree/tree.d.ts
CHANGED
|
@@ -24,10 +24,11 @@ export interface TreeProps {
|
|
|
24
24
|
virtual?: boolean;
|
|
25
25
|
scrollToKey?: string;
|
|
26
26
|
selectedKeys?: string[];
|
|
27
|
+
notFoundContent?: ReactNode;
|
|
27
28
|
loadData?: () => void;
|
|
28
29
|
onCheck?: (checkedKeys: string[], { checked, node, event, halfCheckedKeys }: any) => void;
|
|
29
30
|
onExpand?: (expandedKeys: string[], { expanded, node }: any) => void;
|
|
30
|
-
onSelect?: ({ checked, node, event }: any) => void;
|
|
31
|
+
onSelect?: (keys: string[], { checked, node, event }: any) => void;
|
|
31
32
|
onDragStart?: ({ event, node }: any) => void;
|
|
32
33
|
onDragOver?: ({ event, node }: any) => void;
|
|
33
34
|
onDragLeave?: ({ event, node }: any) => void;
|
package/lib/tree/tree.js
CHANGED
|
@@ -76,7 +76,8 @@ var InternalTree = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
76
76
|
filterTreeNode = TreeProps.filterTreeNode,
|
|
77
77
|
filterValue = TreeProps.filterValue,
|
|
78
78
|
expandOnClickNode = TreeProps.expandOnClickNode,
|
|
79
|
-
loadData = TreeProps.loadData
|
|
79
|
+
loadData = TreeProps.loadData,
|
|
80
|
+
notFoundContent = TreeProps.notFoundContent;
|
|
80
81
|
var treePrefixCls = getPrefixCls(prefixCls, 'tree', customPrefixcls); // 树样式前缀
|
|
81
82
|
var treeNodePrefixCls = getPrefixCls(prefixCls, 'tree-node', customPrefixcls); // 树节点样式前缀
|
|
82
83
|
var treeNodeClassName = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(treePrefixCls), true));
|
|
@@ -132,7 +133,7 @@ var InternalTree = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
132
133
|
searchExpandedKeys = _React$useState16[0],
|
|
133
134
|
setSearchExpandedKeys = _React$useState16[1];
|
|
134
135
|
var isSearching = _react.default.useMemo(function () {
|
|
135
|
-
return typeof filterTreeNode === 'function' && filterValue;
|
|
136
|
+
return typeof filterTreeNode === 'function' && !!filterValue;
|
|
136
137
|
}, [filterValue]);
|
|
137
138
|
(0, _react.useEffect)(function () {
|
|
138
139
|
setSearchExpandedKeys([]);
|
|
@@ -383,7 +384,7 @@ var InternalTree = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
383
384
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
384
385
|
className: treeRootClassName,
|
|
385
386
|
ref: listRef
|
|
386
|
-
}, visibleData && (0, _map.default)(visibleData).call(visibleData, function (item) {
|
|
387
|
+
}, !(visibleData === null || visibleData === void 0 ? void 0 : visibleData.length) && notFoundContent, visibleData && (0, _map.default)(visibleData).call(visibleData, function (item) {
|
|
387
388
|
var checked = (0, _treeUtils.getChecked)(checkedKeys, item.key);
|
|
388
389
|
var indeterminate = (0, _treeUtils.getHalfChecked)(halfCheckedKeys, item.key);
|
|
389
390
|
item.nodeKey = item.key;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
4
|
+
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
5
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
6
|
+
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
var _exportNames = {};
|
|
11
|
+
exports.default = void 0;
|
|
12
|
+
var _treeSelect = _interopRequireWildcard(require("./tree-select"));
|
|
13
|
+
_Object$keys(_treeSelect).forEach(function (key) {
|
|
14
|
+
if (key === "default" || key === "__esModule") return;
|
|
15
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
16
|
+
if (key in exports && exports[key] === _treeSelect[key]) return;
|
|
17
|
+
Object.defineProperty(exports, key, {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function get() {
|
|
20
|
+
return _treeSelect[key];
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
26
|
+
var _default = _treeSelect.default;
|
|
27
|
+
exports.default = _default;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { PopperProps } from '../_utils/usePopper';
|
|
3
|
+
import { TreeNodeData } from '../tree';
|
|
4
|
+
export declare const SelectSizes: ["large", "middle", "small"];
|
|
5
|
+
export declare type SelectSize = typeof SelectSizes[number];
|
|
6
|
+
export declare const BorderTypes: ["none", "underline", "bordered"];
|
|
7
|
+
export declare type BorderType = typeof BorderTypes[number];
|
|
8
|
+
export declare const Modes: ["multiple", "single"];
|
|
9
|
+
export declare type Mode = typeof Modes[number];
|
|
10
|
+
export interface AbstractSelectProps extends PopperProps {
|
|
11
|
+
prefixCls?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
size?: SelectSize;
|
|
14
|
+
borderType?: BorderType;
|
|
15
|
+
notFoundContent?: React.ReactNode | null;
|
|
16
|
+
showSearch?: boolean;
|
|
17
|
+
showArrow?: boolean;
|
|
18
|
+
defaultOpen?: boolean;
|
|
19
|
+
allowClear?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
placeholder?: string | React.ReactNode;
|
|
23
|
+
dropdownClassName?: string;
|
|
24
|
+
dropdownStyle?: React.CSSProperties;
|
|
25
|
+
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
26
|
+
dropdownRender?: (menu: React.ReactElement) => React.ReactElement;
|
|
27
|
+
id?: string;
|
|
28
|
+
clearIcon?: React.ReactNode;
|
|
29
|
+
searchIcon?: React.ReactNode;
|
|
30
|
+
suffixIcon?: React.ReactNode;
|
|
31
|
+
maxTagCount?: number;
|
|
32
|
+
labelInValue?: boolean;
|
|
33
|
+
maxTagPlaceholder?: React.ReactNode | ((omittedValues: TreeNodeData[]) => React.ReactNode);
|
|
34
|
+
}
|
|
35
|
+
export declare type ITreeProps = {
|
|
36
|
+
treeData?: TreeNodeData;
|
|
37
|
+
treeDefaultExpandAll?: boolean;
|
|
38
|
+
treeDefaultExpandedKeys?: string[];
|
|
39
|
+
treeExpandedKeys?: string[];
|
|
40
|
+
treeIcon?: ReactNode | ((props: any) => ReactNode);
|
|
41
|
+
virtual?: boolean;
|
|
42
|
+
checkStrictly?: boolean;
|
|
43
|
+
filterTreeNode?: (treeNode: TreeNodeData, searchValue: string) => boolean;
|
|
44
|
+
treeNodeFilterProp?: string;
|
|
45
|
+
treeNodeLabelProp?: string;
|
|
46
|
+
expandOnClickNode?: boolean;
|
|
47
|
+
};
|
|
48
|
+
export declare type TreeSelectValue = string | string[] | number | number[] | undefined;
|
|
49
|
+
export interface ITreeSelectProps<T extends TreeSelectValue> extends AbstractSelectProps, ITreeProps {
|
|
50
|
+
value?: T;
|
|
51
|
+
defaultValue?: T;
|
|
52
|
+
mode?: Mode;
|
|
53
|
+
autoFocus?: boolean;
|
|
54
|
+
onChange?: (value: T, treeNode: TreeNodeData) => void;
|
|
55
|
+
onSelect?: (value: T extends (infer I)[] ? I : T, { checked, node, event }: any) => void;
|
|
56
|
+
onBlur?: (value?: T) => void;
|
|
57
|
+
onFocus?: () => void;
|
|
58
|
+
onSearch?: (value?: string) => void;
|
|
59
|
+
onClear?: () => void;
|
|
60
|
+
tagRender?: (props: TagProps) => void;
|
|
61
|
+
}
|
|
62
|
+
export interface TagProps {
|
|
63
|
+
value?: string;
|
|
64
|
+
label?: React.ReactNode;
|
|
65
|
+
disabled: boolean;
|
|
66
|
+
size: SelectSize;
|
|
67
|
+
onClose: () => void;
|
|
68
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SelectSizes = exports.Modes = exports.BorderTypes = void 0;
|
|
7
|
+
var _type = require("../_utils/type");
|
|
8
|
+
var SelectSizes = (0, _type.tuple)('large', 'middle', 'small'); // 选择框大小
|
|
9
|
+
exports.SelectSizes = SelectSizes;
|
|
10
|
+
var BorderTypes = (0, _type.tuple)('none', 'underline', 'bordered');
|
|
11
|
+
exports.BorderTypes = BorderTypes;
|
|
12
|
+
var Modes = (0, _type.tuple)('multiple', 'single');
|
|
13
|
+
exports.Modes = Modes;
|