tntd 3.0.0-beta.9 → 3.0.2
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/es/array-input/index.js +57 -42
- package/es/array-input/index.js.map +1 -1
- package/es/array-input/index.less +4 -1
- package/es/button/button.js +3 -7
- package/es/button/button.js.map +1 -1
- package/es/button/button.less +17 -12
- package/es/collapse/collapse.less +3 -3
- package/es/date-picker/index.less +6 -6
- package/es/date-picker/style/Calendar.less +1 -1
- package/es/date-picker/style/RangePicker.less +3 -3
- package/es/descriptions/descriptions.js +36 -18
- package/es/descriptions/descriptions.js.map +1 -1
- package/es/descriptions/descriptions.less +6 -2
- package/es/descriptions/style/index.less +1 -0
- package/es/drawer/drawer.js +32 -22
- package/es/drawer/drawer.js.map +1 -1
- package/es/drawer/index.less +13 -14
- package/es/drawer/style/drawer.less +2 -4
- package/es/form/form.less +12 -6
- package/es/form/style/index.less +6 -6
- package/es/handle-icon/index.js +201 -0
- package/es/handle-icon/index.js.map +1 -0
- package/es/handle-icon/index.less +53 -0
- package/es/icon/style/style.less +1 -1
- package/es/index.js +1 -0
- package/es/index.js.map +1 -1
- package/es/input/input.js +10 -6
- package/es/input/input.js.map +1 -1
- package/es/input/style/mixin.less +1 -2
- package/es/locale/en_US.js +3 -0
- package/es/locale/en_US.js.map +1 -1
- package/es/locale/zh_CN.js +3 -0
- package/es/locale/zh_CN.js.map +1 -1
- package/es/mentions/style/index.less +1 -0
- package/es/modal/style/confirm.less +6 -10
- package/es/modal/style/modal.less +1 -1
- package/es/page-container/index.js +1 -1
- package/es/page-container/index.js.map +1 -1
- package/es/page-container/index.less +1 -0
- package/es/page-loading/index.js +1 -1
- package/es/page-loading/index.js.map +1 -1
- package/es/query-form/Field/SelectInput.js +4 -22
- package/es/query-form/Field/SelectInput.js.map +1 -1
- package/es/query-form/Field/fieldsMap.js +2 -2
- package/es/query-form/Field/fieldsMap.js.map +1 -1
- package/es/query-form/Field/index.js +0 -1
- package/es/query-form/Field/index.js.map +1 -1
- package/es/query-form/index.js +127 -117
- package/es/query-form/index.js.map +1 -1
- package/es/query-form/index.less +9 -12
- package/es/{query-form → query-form-backup}/Field/Composition/index.less +1 -1
- package/es/query-form-backup/index.less +90 -0
- package/es/query-list-scene/QueryForm.js +1 -3
- package/es/query-list-scene/QueryForm.js.map +1 -1
- package/es/select/select.js +5 -3
- package/es/select/select.js.map +1 -1
- package/es/select/select.less +1 -3
- package/es/select/style/index.less +7 -6
- package/es/spin/index.js +3 -2
- package/es/spin/index.js.map +1 -1
- package/es/spin/spin.js +36 -0
- package/es/spin/spin.js.map +1 -0
- package/es/spin/spin.less +9 -0
- package/es/style/themes/default.less +1 -1
- package/es/table/expand.less +49 -0
- package/es/table/hooks/index.js +2 -1
- package/es/table/hooks/index.js.map +1 -1
- package/es/table/hooks/use-expand-fixed.js +80 -0
- package/es/table/hooks/use-expand-fixed.js.map +1 -0
- package/es/table/index.js +1 -0
- package/es/table/index.js.map +1 -1
- package/es/table/style/index.less +58 -88
- package/es/table/table.js +48 -14
- package/es/table/table.js.map +1 -1
- package/es/table/table.less +13 -22
- package/es/table/table.stories.js +413 -2
- package/es/table/table.stories.js.map +1 -1
- package/es/table/utils.js +11 -0
- package/es/table/utils.js.map +1 -1
- package/es/table-container/index.js +1 -1
- package/es/table-container/index.js.map +1 -1
- package/es/table-container/index.less +14 -14
- package/es/tabs/tabs.js +9 -1
- package/es/tabs/tabs.js.map +1 -1
- package/es/tabs/tabs.less +52 -62
- package/es/tabs-container/index.js +1 -1
- package/es/tabs-container/index.js.map +1 -1
- package/es/tag/color.less +28 -18
- package/es/tag/index.js +1 -1
- package/es/tag/index.js.map +1 -1
- package/es/tag/tag.less +41 -5
- package/es/title/index.js +4 -3
- package/es/title/index.js.map +1 -1
- package/es/tntd-action/Action.js +58 -12
- package/es/tntd-action/Action.js.map +1 -1
- package/es/tntd-action/index.less +5 -3
- package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +5 -11
- package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js.map +1 -1
- package/es/tntd-cascader/AntdCascader/index.less +14 -2
- package/es/tntd-cascader/rc-cascader/OptionList/Column.js +3 -2
- package/es/tntd-cascader/rc-cascader/OptionList/Column.js.map +1 -1
- package/es/tntd-cascader/rc-cascader/OptionList/index.js +1 -0
- package/es/tntd-cascader/rc-cascader/OptionList/index.js.map +1 -1
- package/es/tntd-form/FormItem/ItemHolder.js +1 -6
- package/es/tntd-form/FormItem/ItemHolder.js.map +1 -1
- package/es/tntd-form/FormItemLabel.js +2 -0
- package/es/tntd-form/FormItemLabel.js.map +1 -1
- package/es/tntd-select/index.js +13 -9
- package/es/tntd-select/index.js.map +1 -1
- package/es/tntd-select/index.less +7 -0
- package/es/tooltip/index.js +1 -0
- package/es/tooltip/index.js.map +1 -1
- package/es/tooltip/index.less +1 -2
- package/lib/array-input/index.d.ts +1 -12
- package/lib/array-input/index.d.ts.map +1 -1
- package/lib/array-input/index.js +62 -55
- package/lib/array-input/index.js.map +1 -1
- package/lib/array-input/index.less +4 -1
- package/lib/button/button.d.ts.map +1 -1
- package/lib/button/button.js +3 -15
- package/lib/button/button.js.map +1 -1
- package/lib/button/button.less +17 -12
- package/lib/collapse/collapse.less +3 -3
- package/lib/date-picker/index.less +6 -6
- package/lib/date-picker/style/Calendar.less +1 -1
- package/lib/date-picker/style/RangePicker.less +3 -3
- package/lib/descriptions/descriptions.d.ts.map +1 -1
- package/lib/descriptions/descriptions.js +40 -20
- package/lib/descriptions/descriptions.js.map +1 -1
- package/lib/descriptions/descriptions.less +6 -2
- package/lib/descriptions/style/index.less +1 -0
- package/lib/drawer/drawer.d.ts +3 -0
- package/lib/drawer/drawer.d.ts.map +1 -1
- package/lib/drawer/drawer.js +30 -20
- package/lib/drawer/drawer.js.map +1 -1
- package/lib/drawer/index.less +13 -14
- package/lib/drawer/style/drawer.less +2 -4
- package/lib/form/form.less +12 -6
- package/lib/form/style/index.less +6 -6
- package/lib/handle-icon/index.d.ts +7 -0
- package/lib/handle-icon/index.d.ts.map +1 -0
- package/lib/handle-icon/index.js +221 -0
- package/lib/handle-icon/index.js.map +1 -0
- package/lib/handle-icon/index.less +53 -0
- package/lib/icon/style/style.less +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -1
- package/lib/input/input.js +8 -4
- package/lib/input/input.js.map +1 -1
- package/lib/input/style/mixin.less +1 -2
- package/lib/locale/default.d.ts +3 -0
- package/lib/locale/default.d.ts.map +1 -1
- package/lib/locale/en_US.d.ts +3 -0
- package/lib/locale/en_US.d.ts.map +1 -1
- package/lib/locale/en_US.js +3 -0
- package/lib/locale/en_US.js.map +1 -1
- package/lib/locale/zh_CN.d.ts +3 -0
- package/lib/locale/zh_CN.d.ts.map +1 -1
- package/lib/locale/zh_CN.js +3 -0
- package/lib/locale/zh_CN.js.map +1 -1
- package/lib/mentions/style/index.less +1 -0
- package/lib/modal/style/confirm.less +6 -10
- package/lib/modal/style/modal.less +1 -1
- package/lib/page-container/index.js +1 -1
- package/lib/page-container/index.js.map +1 -1
- package/lib/page-container/index.less +1 -0
- package/lib/page-loading/index.js +1 -1
- package/lib/page-loading/index.js.map +1 -1
- package/lib/query-form/Field/SelectInput.d.ts.map +1 -1
- package/lib/query-form/Field/SelectInput.js +3 -15
- package/lib/query-form/Field/SelectInput.js.map +1 -1
- package/lib/query-form/Field/fieldsMap.d.ts +3 -6
- package/lib/query-form/Field/fieldsMap.js +2 -2
- package/lib/query-form/Field/fieldsMap.js.map +1 -1
- package/lib/query-form/Field/index.d.ts.map +1 -1
- package/lib/query-form/Field/index.js +0 -1
- package/lib/query-form/Field/index.js.map +1 -1
- package/lib/query-form/index.d.ts +7 -4
- package/lib/query-form/index.d.ts.map +1 -1
- package/lib/query-form/index.js +149 -143
- package/lib/query-form/index.js.map +1 -1
- package/lib/query-form/index.less +9 -12
- package/lib/{query-form → query-form-backup}/Field/Composition/index.less +1 -1
- package/lib/query-form-backup/index.less +90 -0
- package/lib/query-list-scene/QueryForm.js +2 -3
- package/lib/query-list-scene/QueryForm.js.map +1 -1
- package/lib/select/select.d.ts.map +1 -1
- package/lib/select/select.js +4 -2
- package/lib/select/select.js.map +1 -1
- package/lib/select/select.less +1 -3
- package/lib/select/style/index.less +7 -6
- package/lib/spin/index.d.ts +3 -2
- package/lib/spin/index.d.ts.map +1 -1
- package/lib/spin/index.js +4 -6
- package/lib/spin/index.js.map +1 -1
- package/lib/spin/spin.d.ts +9 -0
- package/lib/spin/spin.d.ts.map +1 -0
- package/lib/spin/spin.js +44 -0
- package/lib/spin/spin.js.map +1 -0
- package/lib/spin/spin.less +9 -0
- package/lib/style/themes/default.less +1 -1
- package/lib/table/expand.less +49 -0
- package/lib/table/hooks/index.d.ts +1 -0
- package/lib/table/hooks/index.d.ts.map +1 -1
- package/lib/table/hooks/index.js +11 -0
- package/lib/table/hooks/index.js.map +1 -1
- package/lib/table/hooks/use-expand-fixed.d.ts +4 -0
- package/lib/table/hooks/use-expand-fixed.d.ts.map +1 -0
- package/lib/table/hooks/use-expand-fixed.js +110 -0
- package/lib/table/hooks/use-expand-fixed.js.map +1 -0
- package/lib/table/index.d.ts +1 -0
- package/lib/table/index.d.ts.map +1 -1
- package/lib/table/index.js +1 -0
- package/lib/table/index.js.map +1 -1
- package/lib/table/style/index.less +58 -88
- package/lib/table/table.d.ts +3 -1
- package/lib/table/table.d.ts.map +1 -1
- package/lib/table/table.js +49 -11
- package/lib/table/table.js.map +1 -1
- package/lib/table/table.less +13 -22
- package/lib/table/table.stories.d.ts +106 -29
- package/lib/table/table.stories.d.ts.map +1 -1
- package/lib/table/table.stories.js +426 -3
- package/lib/table/table.stories.js.map +1 -1
- package/lib/table/utils.d.ts +1 -0
- package/lib/table/utils.d.ts.map +1 -1
- package/lib/table/utils.js +13 -0
- package/lib/table/utils.js.map +1 -1
- package/lib/table-container/index.d.ts.map +1 -1
- package/lib/table-container/index.js +1 -1
- package/lib/table-container/index.js.map +1 -1
- package/lib/table-container/index.less +14 -14
- package/lib/tabs/tabs.d.ts.map +1 -1
- package/lib/tabs/tabs.js +8 -0
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/tabs/tabs.less +52 -62
- package/lib/tabs-container/index.js +1 -1
- package/lib/tabs-container/index.js.map +1 -1
- package/lib/tag/color.less +28 -18
- package/lib/tag/index.js +1 -1
- package/lib/tag/index.js.map +1 -1
- package/lib/tag/tag.less +41 -5
- package/lib/title/index.d.ts +1 -0
- package/lib/title/index.d.ts.map +1 -1
- package/lib/title/index.js +3 -2
- package/lib/title/index.js.map +1 -1
- package/lib/tntd-action/Action.d.ts +1 -1
- package/lib/tntd-action/Action.js +63 -13
- package/lib/tntd-action/Action.js.map +1 -1
- package/lib/tntd-action/index.less +5 -3
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.d.ts.map +1 -1
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +5 -11
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js.map +1 -1
- package/lib/tntd-cascader/AntdCascader/index.less +14 -2
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.d.ts +1 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.d.ts.map +1 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +3 -2
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.js.map +1 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/index.d.ts.map +1 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/index.js +1 -0
- package/lib/tntd-cascader/rc-cascader/OptionList/index.js.map +1 -1
- package/lib/tntd-form/FormItem/ItemHolder.js +1 -6
- package/lib/tntd-form/FormItem/ItemHolder.js.map +1 -1
- package/lib/tntd-form/FormItemLabel.d.ts.map +1 -1
- package/lib/tntd-form/FormItemLabel.js +2 -0
- package/lib/tntd-form/FormItemLabel.js.map +1 -1
- package/lib/tntd-select/index.d.ts.map +1 -1
- package/lib/tntd-select/index.js +12 -8
- package/lib/tntd-select/index.js.map +1 -1
- package/lib/tntd-select/index.less +7 -0
- package/lib/tooltip/index.d.ts +1 -0
- package/lib/tooltip/index.d.ts.map +1 -1
- package/lib/tooltip/index.js +1 -0
- package/lib/tooltip/index.js.map +1 -1
- package/lib/tooltip/index.less +1 -2
- package/package.json +4 -3
- package/themes/default/variables.less +2 -2
- package/themes/default/variablesVar.less +2 -2
- package/es/array-input/1.png +0 -1
- package/es/array-input/111.gif +0 -0
- package/es/array-input/icon.js +0 -25
- package/es/array-input/icon.js.map +0 -1
- package/es/query-form/Field/Composition/FieldPopover.js +0 -308
- package/es/query-form/Field/Composition/FieldPopover.js.map +0 -1
- package/es/query-form/Field/Composition/Select.js +0 -104
- package/es/query-form/Field/Composition/Select.js.map +0 -1
- package/es/query-form/Field/Composition/index.js +0 -299
- package/es/query-form/Field/Composition/index.js.map +0 -1
- package/es/query-form/Field/Composition/utils.js +0 -19
- package/es/query-form/Field/Composition/utils.js.map +0 -1
- package/lib/array-input/1.png +0 -1
- package/lib/array-input/111.gif +0 -0
- package/lib/array-input/icon.d.ts +0 -4
- package/lib/array-input/icon.d.ts.map +0 -1
- package/lib/array-input/icon.js +0 -32
- package/lib/array-input/icon.js.map +0 -1
- package/lib/query-form/Field/Composition/FieldPopover.d.ts +0 -19
- package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/FieldPopover.js +0 -347
- package/lib/query-form/Field/Composition/FieldPopover.js.map +0 -1
- package/lib/query-form/Field/Composition/Select.d.ts +0 -4
- package/lib/query-form/Field/Composition/Select.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/Select.js +0 -128
- package/lib/query-form/Field/Composition/Select.js.map +0 -1
- package/lib/query-form/Field/Composition/index.d.ts +0 -14
- package/lib/query-form/Field/Composition/index.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/index.js +0 -349
- package/lib/query-form/Field/Composition/index.js.map +0 -1
- package/lib/query-form/Field/Composition/utils.d.ts +0 -6
- package/lib/query-form/Field/Composition/utils.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/utils.js +0 -27
- package/lib/query-form/Field/Composition/utils.js.map +0 -1
- /package/es/{query-form → query-form-backup}/Field/Composition/FieldPopover.less +0 -0
- /package/lib/{query-form → query-form-backup}/Field/Composition/FieldPopover.less +0 -0
package/es/tabs/tabs.less
CHANGED
|
@@ -7,74 +7,68 @@
|
|
|
7
7
|
left: -12px;
|
|
8
8
|
padding-bottom: 20px;
|
|
9
9
|
|
|
10
|
-
.@{tab-prefix-cls}-
|
|
11
|
-
display: inline-block;
|
|
12
|
-
vertical-align: bottom;
|
|
13
|
-
position: relative;
|
|
14
|
-
min-width: 106px;
|
|
15
|
-
height: 40px;
|
|
16
|
-
line-height: 40px;
|
|
17
|
-
border-top-left-radius: @border-radius-lg;
|
|
18
|
-
filter: drop-shadow(0px 0px 4px rgba(0, 0, 0, 0.1));
|
|
19
|
-
box-shadow: 0px 0px 2px -5px rgba(0, 0, 0, 0.05);
|
|
20
|
-
border: none;
|
|
21
|
-
margin: 0px 30px 0px 0px;
|
|
22
|
-
padding: 0px 12px 0 48px;
|
|
23
|
-
background: @fill-color-quaternary;
|
|
24
|
-
text-align: right;
|
|
25
|
-
color: @text-color-secondary;
|
|
26
|
-
|
|
27
|
-
&::after {
|
|
28
|
-
content: '';
|
|
29
|
-
position: absolute;
|
|
30
|
-
top: 0;
|
|
31
|
-
right: -52px;
|
|
32
|
-
height: 100%;
|
|
33
|
-
width: 64px;
|
|
34
|
-
z-index: 1;
|
|
35
|
-
background: inherit;
|
|
36
|
-
clip-path: path('M0 0H22.3875C28.4632 0 34.2094 2.76179 38.0049 7.5061L64 40H0V0Z');
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.@{tab-prefix-cls}-nav {
|
|
41
|
-
margin-top: 12px;
|
|
42
|
-
padding-left: 12px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.@{tab-prefix-cls}-nav-container {
|
|
46
|
-
height: auto;
|
|
47
|
-
position: relative;
|
|
48
|
-
left: -12px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.@{tab-prefix-cls}-bar.@{tab-prefix-cls}-top-bar.@{tab-prefix-cls}-card-bar {
|
|
10
|
+
> .@{tab-prefix-cls}-top-bar {
|
|
52
11
|
border-bottom: none;
|
|
53
12
|
margin-bottom: 0;
|
|
54
|
-
|
|
13
|
+
.@{tab-prefix-cls}-tab {
|
|
14
|
+
// display: inline-block;
|
|
15
|
+
vertical-align: bottom;
|
|
16
|
+
// position: relative;
|
|
17
|
+
min-width: 106px;
|
|
18
|
+
height: 40px;
|
|
19
|
+
line-height: 40px;
|
|
20
|
+
border-top-left-radius: @border-radius-lg;
|
|
21
|
+
filter: drop-shadow(0px 0px 4px rgba(0, 0, 0, 0.1));
|
|
22
|
+
box-shadow: 0px 0px 2px -5px rgba(0, 0, 0, 0.05);
|
|
23
|
+
border: none;
|
|
24
|
+
margin: 0px 30px 0px 0px;
|
|
25
|
+
padding: 0px 12px 0 48px;
|
|
26
|
+
// background: @fill-color-quaternary;
|
|
27
|
+
text-align: right;
|
|
28
|
+
// color: @text-color-secondary;
|
|
55
29
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
30
|
+
&::after {
|
|
31
|
+
content: '';
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 0;
|
|
34
|
+
right: -52px;
|
|
35
|
+
height: 100%;
|
|
36
|
+
width: 64px;
|
|
37
|
+
z-index: 1;
|
|
38
|
+
background: inherit;
|
|
39
|
+
clip-path: path('M0 0H22.3875C28.4632 0 34.2094 2.76179 38.0049 7.5061L64 40H0V0Z');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.@{tab-prefix-cls}-nav {
|
|
43
|
+
margin-top: 12px;
|
|
44
|
+
padding-left: 12px;
|
|
45
|
+
}
|
|
46
|
+
.@{tab-prefix-cls}-nav-container {
|
|
47
|
+
height: auto;
|
|
48
|
+
position: relative;
|
|
49
|
+
left: -12px;
|
|
50
|
+
}
|
|
51
|
+
// 鼠标选中时,active状态在上层
|
|
52
|
+
.@{tab-prefix-cls}-tab-active {
|
|
53
|
+
z-index: 9999999 !important;
|
|
54
|
+
background: @tabs-active-background;
|
|
55
|
+
}
|
|
60
56
|
}
|
|
61
57
|
|
|
62
|
-
.@{tab-prefix-cls}-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
58
|
+
& > .@{tab-prefix-cls}-content {
|
|
59
|
+
& > .@{tab-prefix-cls}-tabpane {
|
|
60
|
+
background: @white;
|
|
61
|
+
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);
|
|
62
|
+
padding: 20px 12px 12px;
|
|
63
|
+
border-bottom-right-radius: @border-radius-lg;
|
|
64
|
+
border-bottom-left-radius: @border-radius-lg;
|
|
65
|
+
border-top-right-radius: @border-radius-lg;
|
|
66
|
+
}
|
|
69
67
|
}
|
|
70
68
|
}
|
|
71
69
|
|
|
72
70
|
// // Tabs top类型 全局样式修改
|
|
73
71
|
.tnt-tabs.@{tab-prefix-cls}.@{tab-prefix-cls}-top.@{tab-prefix-cls}-line {
|
|
74
|
-
.@{tab-prefix-cls}-bar {
|
|
75
|
-
border-bottom: none !important;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
72
|
.@{tab-prefix-cls}-nav-container {
|
|
79
73
|
margin-bottom: none;
|
|
80
74
|
}
|
|
@@ -86,10 +80,6 @@
|
|
|
86
80
|
line-height: 37px;
|
|
87
81
|
padding: 2px 12px 0;
|
|
88
82
|
}
|
|
89
|
-
|
|
90
|
-
.@{tab-prefix-cls}-tab:hover {
|
|
91
|
-
border-color: @border-color-secondary;
|
|
92
|
-
}
|
|
93
83
|
}
|
|
94
84
|
|
|
95
85
|
.tnt-tabs.@{tab-prefix-cls} {
|
|
@@ -6,7 +6,7 @@ export default ((WrappedComponent, options = {}) => {
|
|
|
6
6
|
version,
|
|
7
7
|
className = ''
|
|
8
8
|
} = options;
|
|
9
|
-
const currentVersion = version ||
|
|
9
|
+
const currentVersion = version || 'v3';
|
|
10
10
|
return props => React.createElement("div", {
|
|
11
11
|
className: cn('tnt-tabs-v-container', 'tnt-current-' + currentVersion, className)
|
|
12
12
|
}, React.createElement(WrappedComponent, Object.assign({}, props, options)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tabs-container/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tabs-container/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,cAAc,CAAA;AAErB,eAAe,CAAC,gBAAgB,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE;IAC9C,MAAM,EAAE,OAAO,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,OAAO,CAAA;IAC3C,MAAM,cAAc,GAAG,OAAO,IAAI,IAAI,CAAC;IAEzC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAChB,6BAAK,SAAS,EAAE,EAAE,CAAC,sBAAsB,EAAE,cAAc,GAAG,cAAc,EAAE,SAAS,CAAC;QACpF,oBAAC,gBAAgB,oBAAK,KAAK,EAAM,OAAO,EAAI,CACxC,CACP,CAAA;AACH,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport cn from 'classnames'\n\nimport './index.less'\n\nexport default (WrappedComponent, options = {}) => {\n const { version, className = '' } = options\n const currentVersion = version || 'v3';\n\n return (props) => (\n <div className={cn('tnt-tabs-v-container', 'tnt-current-' + currentVersion, className)}>\n <WrappedComponent {...props} {...options} />\n </div>\n )\n}\n"]}
|
package/es/tag/color.less
CHANGED
|
@@ -1,43 +1,53 @@
|
|
|
1
|
-
@preset-colors-custom: grey,
|
|
1
|
+
@preset-colors-custom: grey, green, red, gold, lightblue, bluegrey, purplegrey, purple, lightpurple, lightgreen, pink, rose, orange, magenta, volcano, yellow, cyan, lime, geekblue, tnt-pink, tnt-orange, tnt-purple;
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
@grey-7: @text-color-secondary;
|
|
5
|
+
@grey-5: #8b919e;
|
|
5
6
|
@grey-4: @border-color-base;
|
|
6
7
|
@grey-1: @tag-default-bg;
|
|
7
8
|
|
|
8
|
-
@rose-7:#D8395E;
|
|
9
|
+
@rose-7:#D8395E;
|
|
10
|
+
@rose-5: #EE3E67;
|
|
9
11
|
@rose-4: #FEA3B4;
|
|
10
|
-
@rose-1: #FFF1F3;
|
|
12
|
+
@rose-1: #FFF1F3;
|
|
11
13
|
|
|
12
|
-
@lightblue-7: #1AA9E6;
|
|
14
|
+
@lightblue-7: #1AA9E6;
|
|
15
|
+
@lightblue-5: #36BFFA;
|
|
13
16
|
@lightblue-4: #8FE0FF;
|
|
14
|
-
@lightblue-1: #F0F9FF;
|
|
17
|
+
@lightblue-1: #F0F9FF;
|
|
15
18
|
|
|
16
|
-
@bluegrey-7: #486FBB;
|
|
19
|
+
@bluegrey-7: #486FBB;
|
|
20
|
+
@bluegrey-5: #628FE4;
|
|
17
21
|
@bluegrey-4: #A1BCEF;
|
|
18
|
-
@bluegrey-1: #F4F8FF;
|
|
22
|
+
@bluegrey-1: #F4F8FF;
|
|
19
23
|
|
|
20
|
-
@purplegrey-7: #4E5BA6;
|
|
24
|
+
@purplegrey-7: #4E5BA6;
|
|
25
|
+
@purplegrey-5: #717BBC;
|
|
21
26
|
@purplegrey-4: #AFB5D9;
|
|
22
|
-
@purplegrey-1: #F8F9FC;
|
|
27
|
+
@purplegrey-1: #F8F9FC;
|
|
23
28
|
|
|
24
|
-
@tnt-purple-7: #6E54D4;
|
|
29
|
+
@tnt-purple-7: #6E54D4;
|
|
30
|
+
@tnt-purple-5: #7A5AF8;
|
|
25
31
|
@tnt-purple-4: #BDB4FE;
|
|
26
|
-
@tnt-purple-1: #F4F3FF;
|
|
32
|
+
@tnt-purple-1: #F4F3FF;
|
|
27
33
|
|
|
28
|
-
@lightpurple-7: #5161D7;
|
|
34
|
+
@lightpurple-7: #5161D7;
|
|
35
|
+
@lightpurple-5: #6172F3;
|
|
29
36
|
@lightpurple-4: #A4BCFD;
|
|
30
|
-
@lightpurple-1: #EEF4FF;
|
|
37
|
+
@lightpurple-1: #EEF4FF;
|
|
31
38
|
|
|
32
|
-
@lightgreen-7: #2E9C98;
|
|
39
|
+
@lightgreen-7: #2E9C98;
|
|
40
|
+
@lightgreen-5: #3AB4AF;
|
|
33
41
|
@lightgreen-4: #8CE0DD;
|
|
34
|
-
@lightgreen-1: #F1FBFB;
|
|
42
|
+
@lightgreen-1: #F1FBFB;
|
|
35
43
|
|
|
36
|
-
@tnt-pink-7: #D03E93;
|
|
44
|
+
@tnt-pink-7: #D03E93;
|
|
45
|
+
@tnt-pink-5: #E844B7;
|
|
37
46
|
@tnt-pink-4: #FAA7E0;
|
|
38
47
|
@tnt-pink-1: #FDF2FA;
|
|
39
48
|
|
|
40
|
-
@tnt-orange-7:#DF5F28;
|
|
49
|
+
@tnt-orange-7:#DF5F28;
|
|
50
|
+
@tnt-orange-5:#F47345;
|
|
41
51
|
@tnt-orange-4: #FEB173;
|
|
42
|
-
@tnt-orange-1: #FFF6ED;
|
|
52
|
+
@tnt-orange-1: #FFF6ED;
|
|
43
53
|
|
package/es/tag/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: 周泽飞 zefei.zhou@tongdun.net
|
|
3
3
|
* @Date: 2024-02-29 14:21:28
|
|
4
4
|
* @LastEditors: 周泽飞 zefei.zhou@tongdun.net
|
|
5
|
-
* @LastEditTime: 2024-
|
|
5
|
+
* @LastEditTime: 2024-05-24 23:01:30
|
|
6
6
|
* @FilePath: /tntd/packages/tntd/src/tag/index.ts
|
|
7
7
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
8
8
|
*/
|
package/es/tag/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tag/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,SAAS,CAAA;AAChB,OAAO,YAAY,CAAA;AACnB,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE3B,cAAc,OAAO,CAAA;AAErB,eAAe,GAAG,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2024-02-29 14:21:28\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2024-
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tag/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,SAAS,CAAA;AAChB,OAAO,YAAY,CAAA;AACnB,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE3B,cAAc,OAAO,CAAA;AAErB,eAAe,GAAG,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2024-02-29 14:21:28\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2024-05-24 23:01:30\n * @FilePath: /tntd/packages/tntd/src/tag/index.ts\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport './style'\nimport './tag.less'\nimport { Tag } from './tag'\n\nexport * from './tag'\n\nexport default Tag\n"]}
|
package/es/tag/tag.less
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
.@{iconfont-css-prefix}-close {
|
|
24
24
|
.iconfont-size-under-12px(12px);
|
|
25
|
+
font-size: @font-size-sm !important;
|
|
25
26
|
vertical-align: middle;
|
|
26
27
|
line-height: 1;
|
|
27
28
|
}
|
|
@@ -112,6 +113,29 @@
|
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
115
|
|
|
116
|
+
&.@{tag-prefix-cls}-blue {
|
|
117
|
+
color: @blue-6;
|
|
118
|
+
background: @blue-1;
|
|
119
|
+
border-color: @blue-3;
|
|
120
|
+
>.@{iconfont-css-prefix}-close {
|
|
121
|
+
color: @blue-5;
|
|
122
|
+
}
|
|
123
|
+
&.@{tag-prefix-cls}-no-border{
|
|
124
|
+
border-color:transparent;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
&.@{tag-prefix-cls}-blue-inverse {
|
|
128
|
+
color: @text-color-inverse;
|
|
129
|
+
background: @blue-6;
|
|
130
|
+
border-color: @blue-6;
|
|
131
|
+
>.@{iconfont-css-prefix}-close {
|
|
132
|
+
color: @text-color-inverse;
|
|
133
|
+
}
|
|
134
|
+
&.@{tag-prefix-cls}-no-border{
|
|
135
|
+
border-color:transparent;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
115
139
|
// mixin to iterate over colors and create CSS class for each one
|
|
116
140
|
.make-color-classes(@i: length(@preset-colors-custom)) when (@i > 0) {
|
|
117
141
|
.make-color-classes(@i - 1);
|
|
@@ -119,13 +143,13 @@
|
|
|
119
143
|
@lightColor: '@{color}-1';
|
|
120
144
|
@lightBorderColor: '@{color}-4';
|
|
121
145
|
@darkColor: '@{color}-7';
|
|
146
|
+
@closeColor:'@{color}-5';
|
|
122
147
|
&.@{tag-prefix-cls}-@{color} {
|
|
123
148
|
color: @@darkColor;
|
|
124
149
|
background: @@lightColor;
|
|
125
150
|
border-color: @@lightBorderColor;
|
|
126
151
|
>.@{iconfont-css-prefix}-close {
|
|
127
|
-
color: @@
|
|
128
|
-
opacity: .8;
|
|
152
|
+
color: @@closeColor;
|
|
129
153
|
}
|
|
130
154
|
&.@{tag-prefix-cls}-no-border{
|
|
131
155
|
border-color:transparent;
|
|
@@ -135,7 +159,9 @@
|
|
|
135
159
|
color: @text-color-inverse;
|
|
136
160
|
background: @@darkColor;
|
|
137
161
|
border-color: @@darkColor;
|
|
138
|
-
|
|
162
|
+
>.@{iconfont-css-prefix}-close {
|
|
163
|
+
color: @text-color-inverse;
|
|
164
|
+
}
|
|
139
165
|
&.@{tag-prefix-cls}-no-border{
|
|
140
166
|
border-color:transparent;
|
|
141
167
|
}
|
|
@@ -154,11 +180,21 @@
|
|
|
154
180
|
cursor: pointer;
|
|
155
181
|
&-border{
|
|
156
182
|
border-color: @border-color-base;
|
|
183
|
+
// 非disabled
|
|
184
|
+
&:not(.@{tag-prefix-cls}-checkable-disabled):hover {
|
|
185
|
+
border-color: @primary-3;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&:not(.@{tag-prefix-cls}-checkable-disabled):hover {
|
|
190
|
+
color: @primary-6;
|
|
191
|
+
background-color: @primary-1;
|
|
192
|
+
transition: all 0.3s @ease-in-out-circ;
|
|
157
193
|
}
|
|
158
194
|
|
|
159
195
|
&:active,
|
|
160
196
|
&-checked {
|
|
161
|
-
color: @primary-
|
|
197
|
+
color: @primary-6;
|
|
162
198
|
background-color: @primary-1;
|
|
163
199
|
&.@{tag-prefix-cls}-checkable-border{
|
|
164
200
|
border-color: @primary-3;
|
|
@@ -167,7 +203,7 @@
|
|
|
167
203
|
|
|
168
204
|
&-checked {
|
|
169
205
|
&.@{tag-prefix-cls}-checkable-disabled:hover {
|
|
170
|
-
color: @primary-
|
|
206
|
+
color: @primary-6;
|
|
171
207
|
}
|
|
172
208
|
}
|
|
173
209
|
|
package/es/title/index.js
CHANGED
|
@@ -18,11 +18,12 @@ export default (props => {
|
|
|
18
18
|
size = 'default',
|
|
19
19
|
extra,
|
|
20
20
|
number,
|
|
21
|
-
simple
|
|
21
|
+
simple,
|
|
22
|
+
className
|
|
22
23
|
} = _a,
|
|
23
|
-
rest = __rest(_a, ["title", "subTitle", "size", "extra", "number", "simple"]);
|
|
24
|
+
rest = __rest(_a, ["title", "subTitle", "size", "extra", "number", "simple", "className"]);
|
|
24
25
|
return React.createElement("div", Object.assign({
|
|
25
|
-
className: cn('tntd-title', size, {
|
|
26
|
+
className: cn('tntd-title', className, size, {
|
|
26
27
|
'has-number': number
|
|
27
28
|
}, {
|
|
28
29
|
'is-simple': simple
|
package/es/title/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/title/index.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AACjD,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/title/index.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AACjD,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,cAAc,CAAA;AAYrB,eAAe,CAAC,KAAiB,EAAE,EAAE;IACnC,MAAM,KASF,KAAK,IAAI,EAAE,EATT,EACJ,KAAK,GAAG,MAAM,EACd,QAAQ,EACR,IAAI,GAAG,SAAS,EAChB,KAAK,EACL,MAAM,EACN,MAAM,EACN,SAAS,OAEI,EADV,IAAI,cARH,uEASL,CAAc,CAAA;IAEf,OAAO,CACL,2CACE,SAAS,EAAE,EAAE,CACX,YAAY,EACZ,SAAS,EACT,IAAI,EACJ,EAAE,YAAY,EAAE,MAAM,EAAE,EACxB,EAAE,WAAW,EAAE,MAAM,EAAE,CACxB,IACG,IAAI;QAER,6BAAK,SAAS,EAAC,iBAAiB;YAC7B,MAAM,IAAI,2BAAG,SAAS,EAAC,OAAO,IAAE,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAK;YACzE,gCAAK,YAAY,CAAC,KAAK,CAAC,CAAM;YAC9B,kCAAO,QAAQ,CAAQ,CACnB;QACL,KAAK,IAAI,6BAAK,SAAS,EAAC,kBAAkB,IAAE,KAAK,CAAO,CACrD,CACP,CAAA;AACH,CAAC,CAAA","sourcesContent":["import React, { FC, ComponentProps } from 'react'\nimport cn from 'classnames'\nimport { doUpperTitle } from '../utils'\nimport './index.less'\n\nexport interface TitleProps extends ComponentProps<'div'> {\n title?: string\n subTitle?: string\n className?: string\n size?: 'default' | 'small' | 'middle' | 'large'\n extra?: React.ReactNode\n number?: number\n simple?: boolean\n}\n\nexport default (props: TitleProps) => {\n const {\n title = '暂无标题',\n subTitle,\n size = 'default',\n extra,\n number,\n simple,\n className,\n ...rest\n } = props || {}\n\n return (\n <div\n className={cn(\n 'tntd-title',\n className,\n size,\n { 'has-number': number },\n { 'is-simple': simple }\n )}\n {...rest}\n >\n <div className=\"tntd-title-text\">\n {number && <i className=\"count\">{number <= 9 ? `0${number}` : number}</i>}\n <h3>{doUpperTitle(title)}</h3>\n <span>{subTitle}</span>\n </div>\n {extra && <div className=\"tntd-title-extra\">{extra}</div>}\n </div>\n )\n}\n"]}
|
package/es/tntd-action/Action.js
CHANGED
|
@@ -12,7 +12,7 @@ import { ConfigConsumer } from 'antd/es/config-provider';
|
|
|
12
12
|
import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import { Button } from '../button';
|
|
15
|
-
const defaultGetContainer = () => document.body;
|
|
15
|
+
const defaultGetContainer = () => document.querySelector('.tnt-current-v3') || document.body;
|
|
16
16
|
export default function WarpAction(_a) {
|
|
17
17
|
var {
|
|
18
18
|
getContainer = defaultGetContainer
|
|
@@ -26,9 +26,10 @@ export default function WarpAction(_a) {
|
|
|
26
26
|
return React.createElement(LocaleReceiver, {
|
|
27
27
|
componentName: "TntdAction"
|
|
28
28
|
}, locale => {
|
|
29
|
-
return React.createElement(Action, Object.assign({
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
return React.createElement(Action, Object.assign({
|
|
30
|
+
getPopupContainer: _getContainer
|
|
31
|
+
}, other, {
|
|
32
|
+
locale: locale
|
|
32
33
|
}));
|
|
33
34
|
});
|
|
34
35
|
});
|
|
@@ -37,28 +38,73 @@ function Action({
|
|
|
37
38
|
title,
|
|
38
39
|
hidden,
|
|
39
40
|
data,
|
|
41
|
+
afterClose,
|
|
40
42
|
locale,
|
|
41
43
|
className,
|
|
42
|
-
|
|
44
|
+
width = 700,
|
|
45
|
+
getPopupContainer
|
|
43
46
|
}) {
|
|
44
47
|
const [visible, setVisible] = useState(false);
|
|
48
|
+
const [offset, setOffset] = useState({
|
|
49
|
+
left: 400,
|
|
50
|
+
bottom: 100,
|
|
51
|
+
width
|
|
52
|
+
});
|
|
45
53
|
const ref = useRef();
|
|
54
|
+
const refDom = useRef();
|
|
46
55
|
useEffect(() => {
|
|
47
|
-
ref.current =
|
|
48
|
-
}, [
|
|
56
|
+
ref.current = getPopupContainer();
|
|
57
|
+
}, [getPopupContainer]);
|
|
49
58
|
useEffect(() => {
|
|
50
|
-
|
|
51
|
-
|
|
59
|
+
const visible = data.length > 0;
|
|
60
|
+
if (visible && ref.current) {
|
|
61
|
+
const offset = ref.current.getBoundingClientRect();
|
|
62
|
+
setOffset({
|
|
63
|
+
left: offset.left + (offset.width - width) / 2,
|
|
64
|
+
bottom: 100,
|
|
65
|
+
width
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
setVisible(visible);
|
|
69
|
+
}, [data, width]);
|
|
70
|
+
const onMouseDown = e => {
|
|
71
|
+
const startX = e.clientX - offset.left;
|
|
72
|
+
const startY = e.clientY + offset.bottom;
|
|
73
|
+
const onmousemove = e => {
|
|
74
|
+
refDom.current.style.left = e.clientX - startX + 'px';
|
|
75
|
+
refDom.current.style.bottom = startY - e.clientY + 'px';
|
|
76
|
+
};
|
|
77
|
+
const onmouseup = e => {
|
|
78
|
+
setOffset(offset => Object.assign(Object.assign({}, offset), {
|
|
79
|
+
left: e.clientX - startX,
|
|
80
|
+
bottom: startY - e.clientY
|
|
81
|
+
}));
|
|
82
|
+
document.removeEventListener('mousemove', onmousemove);
|
|
83
|
+
document.removeEventListener('mouseup', onmouseup);
|
|
84
|
+
};
|
|
85
|
+
document.addEventListener('mousemove', onmousemove);
|
|
86
|
+
document.addEventListener('mouseup', onmouseup);
|
|
87
|
+
};
|
|
52
88
|
if (ref.current && visible && !hidden) {
|
|
53
89
|
return ReactDOM.createPortal(React.createElement("div", {
|
|
54
|
-
className: classNames('tnt-action', className)
|
|
90
|
+
className: classNames('tnt-action', className),
|
|
91
|
+
style: offset,
|
|
92
|
+
onMouseDown: onMouseDown,
|
|
93
|
+
ref: refDom
|
|
55
94
|
}, React.createElement("div", {
|
|
56
|
-
className: "fr"
|
|
95
|
+
className: "fr",
|
|
96
|
+
onClick: e => {
|
|
97
|
+
e.stopPropagation();
|
|
98
|
+
}
|
|
57
99
|
}, data), React.createElement(Button, {
|
|
58
100
|
shape: "circle",
|
|
59
101
|
icon: "close",
|
|
60
102
|
type: "tertiary",
|
|
61
|
-
onClick:
|
|
103
|
+
onClick: e => {
|
|
104
|
+
e.stopPropagation();
|
|
105
|
+
setVisible(false);
|
|
106
|
+
afterClose && afterClose();
|
|
107
|
+
}
|
|
62
108
|
}), React.createElement("span", {
|
|
63
109
|
className: "tnt-action-text"
|
|
64
110
|
}, title)), ref.current);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.js","sourceRoot":"","sources":["../../src/tntd-action/Action.js"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SA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EAAE,CAAC,CAAC,EAAE,EAAE;oBACb,CAAC,CAAC,eAAe,EAAE,CAAA;gBACrB,CAAC,IAEA,IAAI,CACD;YACN,oBAAC,MAAM,IACL,KAAK,EAAC,QAAQ,EACd,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACb,CAAC,CAAC,eAAe,EAAE,CAAA;oBACnB,UAAU,CAAC,KAAK,CAAC,CAAA;oBACjB,UAAU,IAAI,UAAU,EAAE,CAAA;gBAC5B,CAAC,GACD;YACF,8BAAM,SAAS,EAAC,iBAAiB,IAAE,KAAK,CAAQ,CAC5C,EACN,GAAG,CAAC,OAAO,CACZ,CAAA;KACF;IACD,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["import React, { useState, useEffect, useRef } from 'react'\nimport ReactDOM from 'react-dom'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport { Button } from '../button'\n\nconst defaultGetContainer = () => document.querySelector('.tnt-current-v3') || document.body\n\nexport default function WarpAction({ getContainer = defaultGetContainer, ...other }) {\n return (\n <ConfigConsumer>\n {({ getPrefixCls, getPopupContainer: getContextPopupContainer }) => {\n const _getContainer = getContainer === undefined ? getContextPopupContainer : getContainer\n\n return (\n <LocaleReceiver componentName=\"TntdAction\">\n {(locale) => {\n return <Action getPopupContainer={_getContainer} {...other} locale={locale} />\n }}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n )\n}\n\nfunction Action({\n title,\n hidden,\n data,\n afterClose,\n locale,\n className,\n width = 700,\n getPopupContainer,\n}) {\n const [visible, setVisible] = useState(false)\n const [offset, setOffset] = useState({ left: 400, bottom: 100, width })\n const ref = useRef()\n const refDom = useRef()\n\n useEffect(() => {\n ref.current = getPopupContainer()\n }, [getPopupContainer])\n\n useEffect(() => {\n const visible = data.length > 0\n if (visible && ref.current) {\n const offset = ref.current.getBoundingClientRect()\n setOffset({ left: offset.left + (offset.width - width) / 2, bottom: 100, width })\n }\n setVisible(visible)\n }, [data, width])\n\n const onMouseDown = (e) => {\n const startX = e.clientX - offset.left\n const startY = e.clientY + offset.bottom\n const onmousemove = (e) => {\n refDom.current.style.left = e.clientX - startX + 'px'\n refDom.current.style.bottom = startY - e.clientY + 'px'\n }\n const onmouseup = (e) => {\n setOffset((offset) => ({ ...offset, left: e.clientX - startX, bottom: startY - e.clientY }))\n document.removeEventListener('mousemove', onmousemove)\n document.removeEventListener('mouseup', onmouseup)\n }\n document.addEventListener('mousemove', onmousemove)\n document.addEventListener('mouseup', onmouseup)\n }\n\n if (ref.current && visible && !hidden) {\n return ReactDOM.createPortal(\n <div\n className={classNames('tnt-action', className)}\n style={offset}\n onMouseDown={onMouseDown}\n ref={refDom}\n >\n <div\n className=\"fr\"\n onClick={(e) => {\n e.stopPropagation()\n }}\n >\n {data}\n </div>\n <Button\n shape=\"circle\"\n icon=\"close\"\n type=\"tertiary\"\n onClick={(e) => {\n e.stopPropagation()\n setVisible(false)\n afterClose && afterClose()\n }}\n />\n <span className=\"tnt-action-text\">{title}</span>\n </div>,\n ref.current\n )\n }\n return null\n}\n"]}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
.tnt-action {
|
|
2
2
|
position: fixed;
|
|
3
|
-
bottom: 100px;
|
|
4
|
-
width: @tnt-action-width;
|
|
5
|
-
left: calc(50vw - @tnt-action-width / 2);
|
|
3
|
+
// bottom: 100px;
|
|
4
|
+
// width: @tnt-action-width;
|
|
5
|
+
// left: calc(50vw - @tnt-action-width / 2);
|
|
6
6
|
padding: 10px 16px;
|
|
7
7
|
background-color: @text-color;
|
|
8
8
|
border-radius: @border-radius-base;
|
|
9
9
|
z-index: 200;
|
|
10
|
+
cursor: grab;
|
|
10
11
|
&-text {
|
|
11
12
|
color: @white;
|
|
12
13
|
margin-left: 20px;
|
|
13
14
|
font-size: 14px;
|
|
15
|
+
user-select: none;
|
|
14
16
|
.num {
|
|
15
17
|
display: inline-block;
|
|
16
18
|
width: 16px;
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
* @Author: 郑泳健
|
|
4
4
|
* @Date: 2022-12-19 16:45:16
|
|
5
5
|
* @LastEditors: 郑泳健
|
|
6
|
-
* @LastEditTime:
|
|
6
|
+
* @LastEditTime: 2024-07-22 16:43:38
|
|
7
7
|
*/
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { ConfigConsumer } from './context';
|
|
10
10
|
import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
|
|
11
|
+
import Empty from '../../../empty';
|
|
11
12
|
const defaultRenderEmpty = conponentName => React.createElement(ConfigConsumer, null, ({
|
|
12
13
|
getPrefixCls
|
|
13
14
|
}) => {
|
|
@@ -17,16 +18,9 @@ const defaultRenderEmpty = conponentName => React.createElement(ConfigConsumer,
|
|
|
17
18
|
}, locale => {
|
|
18
19
|
return React.createElement("div", {
|
|
19
20
|
className: `tntd-cascader-no-data-wrapper ${prefix}`
|
|
20
|
-
}, React.createElement(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
height: 50,
|
|
24
|
-
marginTop: 35
|
|
25
|
-
},
|
|
26
|
-
src: require('../../img/no-data-s.png').default
|
|
27
|
-
}), React.createElement("div", {
|
|
28
|
-
className: "tntd-cascader-no-data-content"
|
|
29
|
-
}, locale.noData));
|
|
21
|
+
}, React.createElement(Empty, {
|
|
22
|
+
size: "mini"
|
|
23
|
+
}));
|
|
30
24
|
});
|
|
31
25
|
});
|
|
32
26
|
export default defaultRenderEmpty;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultRenderEmpty.js","sourceRoot":"","sources":["../../../../src/tntd-cascader/AntdCascader/component/defaultRenderEmpty.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,cAAc,MAAM,wCAAwC,CAAA;
|
|
1
|
+
{"version":3,"file":"defaultRenderEmpty.js","sourceRoot":"","sources":["../../../../src/tntd-cascader/AntdCascader/component/defaultRenderEmpty.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,cAAc,MAAM,wCAAwC,CAAA;AACnE,OAAO,KAAK,MAAM,gBAAgB,CAAA;AAElC,MAAM,kBAAkB,GAAG,CAAC,aAAqB,EAAE,EAAE,CAAC,CACpD,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;IACpB,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAA;IAEpC,OAAO,CACL,oBAAC,cAAc,IAAC,aAAa,EAAC,cAAc,IACzC,CAAC,MAAM,EAAE,EAAE;QACV,OAAO,CACL,6BAAK,SAAS,EAAE,iCAAiC,MAAM,EAAE;YACvD,oBAAC,KAAK,IAAC,IAAI,EAAC,MAAM,GAAG,CACjB,CACP,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CACc,CAClB,CAAA;AAID,eAAe,kBAAkB,CAAA","sourcesContent":["/*\n * @Descripttion: 空状态\n * @Author: 郑泳健\n * @Date: 2022-12-19 16:45:16\n * @LastEditors: 郑泳健\n * @LastEditTime: 2024-07-22 16:43:38\n */\nimport * as React from 'react'\nimport { ConfigConsumer } from './context'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\nimport Empty from '../../../empty'\n\nconst defaultRenderEmpty = (conponentName: string) => (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefix = getPrefixCls('empty')\n\n return (\n <LocaleReceiver componentName=\"TntdCascader\">\n {(locale) => {\n return (\n <div className={`tntd-cascader-no-data-wrapper ${prefix}`}>\n <Empty size=\"mini\" />\n </div>\n )\n }}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n)\n\nexport type RenderEmptyHandler = typeof defaultRenderEmpty\n\nexport default defaultRenderEmpty\n"]}
|
|
@@ -1289,7 +1289,7 @@
|
|
|
1289
1289
|
.tntd-cascader-menu-item-active:not(.tntd-cascader-menu-item-disabled),
|
|
1290
1290
|
.tntd-cascader-menu-item-active:not(.tntd-cascader-menu-item-disabled):hover {
|
|
1291
1291
|
background-color: @bg-grey-second;
|
|
1292
|
-
font-weight: 600
|
|
1292
|
+
// font-weight: 600
|
|
1293
1293
|
}
|
|
1294
1294
|
|
|
1295
1295
|
.tntd-cascader-menu-item-content {
|
|
@@ -1886,6 +1886,18 @@
|
|
|
1886
1886
|
.tntd-select:not(.tntd-select-customize-input) .tntd-select-selector input {
|
|
1887
1887
|
cursor: pointer
|
|
1888
1888
|
}
|
|
1889
|
+
// compact的样式 start
|
|
1890
|
+
.ant-input-group.ant-input-group-compact>.tntd-select>.tntd-select-selector{
|
|
1891
|
+
border-radius: 0;
|
|
1892
|
+
padding-top: 3px;
|
|
1893
|
+
padding-bottom: 3px;
|
|
1894
|
+
}
|
|
1895
|
+
.ant-input-group.ant-input-group-compact>*:last-child,
|
|
1896
|
+
.ant-input-group.ant-input-group-compact>.tntd-select:last-child>.tntd-select-selector{
|
|
1897
|
+
border-top-right-radius: @border-radius-base;
|
|
1898
|
+
border-bottom-right-radius: @border-radius-base;
|
|
1899
|
+
}
|
|
1900
|
+
// compact的样式 end
|
|
1889
1901
|
|
|
1890
1902
|
.tntd-select-show-search.tntd-select:not(.tntd-select-customize-input) .tntd-select-selector {
|
|
1891
1903
|
cursor: text
|
|
@@ -2323,7 +2335,7 @@
|
|
|
2323
2335
|
.tntd-cascader-no-data-content{
|
|
2324
2336
|
font-family: PingFangSC-Regular;
|
|
2325
2337
|
font-size: 14px;
|
|
2326
|
-
color:
|
|
2338
|
+
color: rgba(0, 0, 0, 0.25);
|
|
2327
2339
|
margin-top: 6
|
|
2328
2340
|
}
|
|
2329
2341
|
|
|
@@ -24,7 +24,8 @@ export default function Column({
|
|
|
24
24
|
searchValue,
|
|
25
25
|
level,
|
|
26
26
|
dropdownVisible,
|
|
27
|
-
optionHeight
|
|
27
|
+
optionHeight,
|
|
28
|
+
isEmpty
|
|
28
29
|
}) {
|
|
29
30
|
const ref = React.useRef(null);
|
|
30
31
|
const menuPrefixCls = `${prefixCls}-menu ${prefixCls}-menu-${level}`;
|
|
@@ -96,7 +97,7 @@ export default function Column({
|
|
|
96
97
|
}, React.createElement(List, {
|
|
97
98
|
className: optionInfoList[0].fullPathKey === '__EMPTY__' || !!searchValue ? 'rc-virtual-list-full' : '',
|
|
98
99
|
data: optionInfoList,
|
|
99
|
-
height: 180,
|
|
100
|
+
height: isEmpty ? 'auto' : 180,
|
|
100
101
|
itemHeight: optionHeight || 36,
|
|
101
102
|
itemKey: "value",
|
|
102
103
|
ref: ref
|