tntd 2.8.0-beta.5 → 2.8.0-beta.7
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/check-card/index.js +2 -3
- package/es/check-card/index.js.map +1 -1
- package/es/color-picker/ColorPicker.js +4 -6
- package/es/color-picker/ColorPicker.js.map +1 -1
- package/es/index.js +2 -0
- package/es/index.js.map +1 -1
- 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/page-container/index.js +13 -0
- package/es/page-container/index.js.map +1 -0
- package/es/page-container/index.less +38 -0
- package/es/page-loading/index.js +25 -0
- package/es/page-loading/index.js.map +1 -0
- package/es/page-loading/index.less +22 -0
- package/es/page-loading/loading.gif +0 -0
- package/es/table/table.js +1 -2
- package/es/table/table.js.map +1 -1
- package/es/table-container/index.less +1 -0
- package/es/tabs/tabs.js +4 -2
- package/es/tabs/tabs.js.map +1 -1
- package/es/tntd-cascader/AntdCascader/component/getIcons.js +7 -8
- package/es/tntd-cascader/AntdCascader/component/getIcons.js.map +1 -1
- package/es/tntd-cascader/AntdCascader/index.js +4 -5
- package/es/tntd-cascader/AntdCascader/index.js.map +1 -1
- package/es/tntd-rc-select/_util/getIcons.js +7 -8
- package/es/tntd-rc-select/_util/getIcons.js.map +1 -1
- package/lib/check-card/index.js +1 -2
- package/lib/check-card/index.js.map +1 -1
- package/lib/color-picker/ColorPicker.d.ts.map +1 -1
- package/lib/color-picker/ColorPicker.js +2 -4
- package/lib/color-picker/ColorPicker.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +14 -0
- package/lib/index.js.map +1 -1
- 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/page-container/index.d.ts +4 -0
- package/lib/page-container/index.d.ts.map +1 -0
- package/lib/page-container/index.js +22 -0
- package/lib/page-container/index.js.map +1 -0
- package/lib/page-container/index.less +38 -0
- package/lib/{query-form/Field/Composition/Select.d.ts → page-loading/index.d.ts} +1 -1
- package/lib/page-loading/index.d.ts.map +1 -0
- package/lib/page-loading/index.js +30 -0
- package/lib/page-loading/index.js.map +1 -0
- package/lib/page-loading/index.less +22 -0
- package/lib/page-loading/loading.gif +0 -0
- package/lib/table/table.d.ts.map +1 -1
- package/lib/table/table.js +2 -3
- package/lib/table/table.js.map +1 -1
- package/lib/table-container/index.less +1 -0
- package/lib/tabs/tabs.d.ts.map +1 -1
- package/lib/tabs/tabs.js +3 -1
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js +2 -3
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js.map +1 -1
- package/lib/tntd-cascader/AntdCascader/index.d.ts.map +1 -1
- package/lib/tntd-cascader/AntdCascader/index.js +1 -2
- package/lib/tntd-cascader/AntdCascader/index.js.map +1 -1
- package/lib/tntd-rc-select/_util/getIcons.js +2 -3
- package/lib/tntd-rc-select/_util/getIcons.js.map +1 -1
- package/package.json +2 -2
- package/es/alert/alert.js +0 -70
- package/es/alert/alert.js.map +0 -1
- package/es/alert/alert.less +0 -128
- package/es/button/button.less +0 -72
- package/es/checkbox/check.png +0 -0
- package/es/checkbox/checkbox.js +0 -48
- package/es/checkbox/checkbox.js.map +0 -1
- package/es/checkbox/checkbox.less +0 -69
- package/es/date-picker/DatePicker.js +0 -101
- package/es/date-picker/DatePicker.js.map +0 -1
- package/es/date-picker/index.less +0 -294
- package/es/drawer/index.less +0 -154
- package/es/form/form.less +0 -36
- package/es/grid/RowContext.js +0 -3
- package/es/grid/RowContext.js.map +0 -1
- package/es/grid/col.js +0 -103
- package/es/grid/col.js.map +0 -1
- package/es/grid/hooks/useBreakpoint.js +0 -18
- package/es/grid/hooks/useBreakpoint.js.map +0 -1
- package/es/grid/row.js +0 -154
- package/es/grid/row.js.map +0 -1
- package/es/grid/style/rtl.less +0 -69
- package/es/input-number/inputNumber.js +0 -29
- package/es/input-number/inputNumber.js.map +0 -1
- package/es/input-number/inputNumber.less +0 -12
- package/es/modal/index.less +0 -36
- package/es/notification/assets/index.js +0 -2
- package/es/notification/assets/index.js.map +0 -1
- package/es/notification/assets/svg-error-tip.js +0 -145
- package/es/notification/assets/svg-error-tip.js.map +0 -1
- package/es/notification/assets/svg-success-tip.js +0 -162
- package/es/notification/assets/svg-success-tip.js.map +0 -1
- package/es/notification/notification.js +0 -80
- package/es/notification/notification.js.map +0 -1
- package/es/notification/notification.less +0 -59
- package/es/popconfirm/index.less +0 -32
- package/es/popconfirm/popconfirm.js +0 -43
- package/es/popconfirm/popconfirm.js.map +0 -1
- package/es/popover/index.less +0 -57
- package/es/popover/popover.js +0 -34
- package/es/popover/popover.js.map +0 -1
- package/es/progress/progress.js +0 -132
- package/es/progress/progress.js.map +0 -1
- package/es/progress/progress.less +0 -82
- package/es/query-form/Field/Composition/FieldPopover.js +0 -284
- package/es/query-form/Field/Composition/FieldPopover.js.map +0 -1
- package/es/query-form/Field/Composition/FieldPopover.less +0 -35
- package/es/query-form/Field/Composition/Select.js +0 -108
- package/es/query-form/Field/Composition/Select.js.map +0 -1
- package/es/query-form/Field/Composition/index.js +0 -275
- package/es/query-form/Field/Composition/index.js.map +0 -1
- package/es/query-form/Field/Composition/index.less +0 -106
- package/es/query-form/Field/Composition/utils.js +0 -19
- package/es/query-form/Field/Composition/utils.js.map +0 -1
- package/es/radio/radio.js +0 -57
- package/es/radio/radio.js.map +0 -1
- package/es/radio/radio.less +0 -43
- package/es/steps/assets/background_left.svg +0 -12
- package/es/steps/assets/background_right.svg +0 -12
- package/es/steps/assets/horizontal_line.svg +0 -3
- package/es/steps/assets/vertical_line.svg +0 -3
- package/es/steps/stepStyle/icon.less +0 -51
- package/es/steps/stepStyle/progress-dot.less +0 -10
- package/es/steps/stepStyle/variables.less +0 -8
- package/es/steps/stepStyle/vertical.less +0 -41
- package/es/switch/index.less +0 -46
- package/es/tabs/tabs.less +0 -116
- package/es/tag/color.less +0 -43
- package/es/tag/tag.js +0 -171
- package/es/tag/tag.js.map +0 -1
- package/es/tag/tag.less +0 -193
- package/es/time-picker/TimePicker.js +0 -36
- package/es/time-picker/TimePicker.js.map +0 -1
- package/es/time-picker/index.less +0 -38
- package/es/tntd-action/Action.js +0 -66
- package/es/tntd-action/Action.js.map +0 -1
- package/es/tntd-action/index.less +0 -53
- package/es/tooltip/index.less +0 -29
- package/es/tooltip/tooltip.js +0 -33
- package/es/tooltip/tooltip.js.map +0 -1
- package/lib/alert/alert.d.ts +0 -12
- package/lib/alert/alert.d.ts.map +0 -1
- package/lib/alert/alert.js +0 -92
- package/lib/alert/alert.js.map +0 -1
- package/lib/alert/alert.less +0 -128
- package/lib/button/button.less +0 -72
- package/lib/checkbox/check.png +0 -0
- package/lib/checkbox/checkbox.d.ts +0 -16
- package/lib/checkbox/checkbox.d.ts.map +0 -1
- package/lib/checkbox/checkbox.js +0 -65
- package/lib/checkbox/checkbox.js.map +0 -1
- package/lib/checkbox/checkbox.less +0 -69
- package/lib/date-picker/DatePicker.d.ts +0 -21
- package/lib/date-picker/DatePicker.d.ts.map +0 -1
- package/lib/date-picker/DatePicker.js +0 -128
- package/lib/date-picker/DatePicker.js.map +0 -1
- package/lib/date-picker/index.less +0 -294
- package/lib/drawer/index.less +0 -154
- package/lib/form/form.less +0 -36
- package/lib/grid/RowContext.d.ts +0 -9
- package/lib/grid/RowContext.d.ts.map +0 -1
- package/lib/grid/RowContext.js +0 -9
- package/lib/grid/RowContext.js.map +0 -1
- package/lib/grid/col.d.ts +0 -29
- package/lib/grid/col.d.ts.map +0 -1
- package/lib/grid/col.js +0 -100
- package/lib/grid/col.js.map +0 -1
- package/lib/grid/hooks/useBreakpoint.d.ts +0 -4
- package/lib/grid/hooks/useBreakpoint.d.ts.map +0 -1
- package/lib/grid/hooks/useBreakpoint.js +0 -28
- package/lib/grid/hooks/useBreakpoint.js.map +0 -1
- package/lib/grid/row.d.ts +0 -21
- package/lib/grid/row.d.ts.map +0 -1
- package/lib/grid/row.js +0 -183
- package/lib/grid/row.js.map +0 -1
- package/lib/grid/style/rtl.less +0 -69
- package/lib/input-number/inputNumber.d.ts +0 -10
- package/lib/input-number/inputNumber.d.ts.map +0 -1
- package/lib/input-number/inputNumber.js +0 -48
- package/lib/input-number/inputNumber.js.map +0 -1
- package/lib/input-number/inputNumber.less +0 -12
- package/lib/modal/index.less +0 -36
- package/lib/notification/assets/index.d.ts +0 -3
- package/lib/notification/assets/index.d.ts.map +0 -1
- package/lib/notification/assets/index.js +0 -20
- package/lib/notification/assets/index.js.map +0 -1
- package/lib/notification/assets/svg-error-tip.d.ts +0 -4
- package/lib/notification/assets/svg-error-tip.d.ts.map +0 -1
- package/lib/notification/assets/svg-error-tip.js +0 -154
- package/lib/notification/assets/svg-error-tip.js.map +0 -1
- package/lib/notification/assets/svg-success-tip.d.ts +0 -4
- package/lib/notification/assets/svg-success-tip.d.ts.map +0 -1
- package/lib/notification/assets/svg-success-tip.js +0 -171
- package/lib/notification/assets/svg-success-tip.js.map +0 -1
- package/lib/notification/notification.d.ts +0 -9
- package/lib/notification/notification.d.ts.map +0 -1
- package/lib/notification/notification.js +0 -105
- package/lib/notification/notification.js.map +0 -1
- package/lib/notification/notification.less +0 -59
- package/lib/popconfirm/index.less +0 -32
- package/lib/popconfirm/popconfirm.d.ts +0 -8
- package/lib/popconfirm/popconfirm.d.ts.map +0 -1
- package/lib/popconfirm/popconfirm.js +0 -61
- package/lib/popconfirm/popconfirm.js.map +0 -1
- package/lib/popover/index.less +0 -57
- package/lib/popover/popover.d.ts +0 -14
- package/lib/popover/popover.d.ts.map +0 -1
- package/lib/popover/popover.js +0 -55
- package/lib/popover/popover.js.map +0 -1
- package/lib/progress/progress.d.ts +0 -12
- package/lib/progress/progress.d.ts.map +0 -1
- package/lib/progress/progress.js +0 -148
- package/lib/progress/progress.js.map +0 -1
- package/lib/progress/progress.less +0 -82
- package/lib/query-form/Field/Composition/FieldPopover.d.ts +0 -17
- package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/FieldPopover.js +0 -319
- package/lib/query-form/Field/Composition/FieldPopover.js.map +0 -1
- package/lib/query-form/Field/Composition/FieldPopover.less +0 -35
- package/lib/query-form/Field/Composition/Select.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/Select.js +0 -132
- 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 -330
- package/lib/query-form/Field/Composition/index.js.map +0 -1
- package/lib/query-form/Field/Composition/index.less +0 -106
- 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/lib/radio/radio.d.ts +0 -17
- package/lib/radio/radio.d.ts.map +0 -1
- package/lib/radio/radio.js +0 -75
- package/lib/radio/radio.js.map +0 -1
- package/lib/radio/radio.less +0 -43
- package/lib/steps/assets/background_left.svg +0 -12
- package/lib/steps/assets/background_right.svg +0 -12
- package/lib/steps/assets/horizontal_line.svg +0 -3
- package/lib/steps/assets/vertical_line.svg +0 -3
- package/lib/steps/stepStyle/icon.less +0 -51
- package/lib/steps/stepStyle/progress-dot.less +0 -10
- package/lib/steps/stepStyle/variables.less +0 -8
- package/lib/steps/stepStyle/vertical.less +0 -41
- package/lib/switch/index.less +0 -46
- package/lib/tabs/tabs.less +0 -116
- package/lib/tag/color.less +0 -43
- package/lib/tag/tag.d.ts +0 -41
- package/lib/tag/tag.d.ts.map +0 -1
- package/lib/tag/tag.js +0 -183
- package/lib/tag/tag.js.map +0 -1
- package/lib/tag/tag.less +0 -193
- package/lib/time-picker/TimePicker.d.ts +0 -9
- package/lib/time-picker/TimePicker.d.ts.map +0 -1
- package/lib/time-picker/TimePicker.js +0 -55
- package/lib/time-picker/TimePicker.js.map +0 -1
- package/lib/time-picker/index.less +0 -38
- package/lib/tntd-action/Action.d.ts +0 -6
- package/lib/tntd-action/Action.d.ts.map +0 -1
- package/lib/tntd-action/Action.js +0 -86
- package/lib/tntd-action/Action.js.map +0 -1
- package/lib/tntd-action/index.less +0 -53
- package/lib/tooltip/index.less +0 -29
- package/lib/tooltip/tooltip.d.ts +0 -9
- package/lib/tooltip/tooltip.d.ts.map +0 -1
- package/lib/tooltip/tooltip.js +0 -53
- package/lib/tooltip/tooltip.js.map +0 -1
package/es/radio/radio.less
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
@radio-prefix-cls: ~'@{ant-prefix}-radio';
|
|
2
|
-
@radio-inner-prefix-cls: ~'@{radio-prefix-cls}-inner';
|
|
3
|
-
|
|
4
|
-
// 选中状态
|
|
5
|
-
.tnt-radio,
|
|
6
|
-
.tnt-radio-group {
|
|
7
|
-
.@{radio-prefix-cls}-checked {
|
|
8
|
-
.@{radio-inner-prefix-cls} {
|
|
9
|
-
border-color: @radio-dot-color;
|
|
10
|
-
background-color: @radio-dot-color;
|
|
11
|
-
&::after {
|
|
12
|
-
@radio-dot-size: calc(@radio-size - 12px);
|
|
13
|
-
|
|
14
|
-
width: @radio-dot-size;
|
|
15
|
-
height: @radio-dot-size;
|
|
16
|
-
top: calc((@radio-size - @radio-dot-size) / 2 - 1px);
|
|
17
|
-
left: calc((@radio-size - @radio-dot-size) / 2 - 1px);
|
|
18
|
-
background-color: @radio-button-bg;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&.@{radio-prefix-cls}-disabled {
|
|
23
|
-
.@{radio-inner-prefix-cls} {
|
|
24
|
-
border-color: @checkbox-check-disabled-color !important;
|
|
25
|
-
background-color: @checkbox-check-disabled-color;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.tnt-radio {
|
|
32
|
-
& > span:nth-of-type(2) {
|
|
33
|
-
display: inline-block;
|
|
34
|
-
}
|
|
35
|
-
&-children {
|
|
36
|
-
display: flex;
|
|
37
|
-
flex-direction: column;
|
|
38
|
-
}
|
|
39
|
-
&-desc {
|
|
40
|
-
font-size: @font-size-sm;
|
|
41
|
-
color: @bg-color-spotilight-tint-50;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<svg width="162" height="77" viewBox="0 0 162 77" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g id="Ellipse 27" filter="url(#filter0_f_5274_1997)">
|
|
3
|
-
<ellipse class="test" cx="36.5" cy="-21.5" rx="78.5" ry="51.5" fill="#126BFB" fill-opacity="0.15"/>
|
|
4
|
-
</g>
|
|
5
|
-
<defs>
|
|
6
|
-
<filter id="filter0_f_5274_1997" x="-89" y="-120" width="251" height="197" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
7
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
8
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
9
|
-
<feGaussianBlur stdDeviation="23.5" result="effect1_foregroundBlur_5274_1997"/>
|
|
10
|
-
</filter>
|
|
11
|
-
</defs>
|
|
12
|
-
</svg>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<svg width="131" height="80" viewBox="0 0 131 80" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g id="Ellipse 28" filter="url(#filter0_f_5274_1888)">
|
|
3
|
-
<circle cx="118" cy="100" r="71" fill="#126BFB" fill-opacity="0.08"/>
|
|
4
|
-
</g>
|
|
5
|
-
<defs>
|
|
6
|
-
<filter id="filter0_f_5274_1888" x="0" y="-18" width="236" height="236" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
7
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
8
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
9
|
-
<feGaussianBlur stdDeviation="23.5" result="effect1_foregroundBlur_5274_1888"/>
|
|
10
|
-
</filter>
|
|
11
|
-
</defs>
|
|
12
|
-
</svg>
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
.@{tnt-steps-cls}:not(.@{steps-prefix-cls}-dot).@{steps-prefix-cls}{
|
|
2
|
-
.@{steps-prefix-cls}-item{
|
|
3
|
-
&-icon{
|
|
4
|
-
border: none;
|
|
5
|
-
font-weight: 500;
|
|
6
|
-
margin: 2px 12px 2px 0;
|
|
7
|
-
width: @td-steps-icon-size;
|
|
8
|
-
height: @td-steps-icon-size;
|
|
9
|
-
line-height: @td-steps-icon-size;
|
|
10
|
-
border-radius:@td-steps-icon-size;
|
|
11
|
-
>.@{steps-prefix-cls}-icon{
|
|
12
|
-
top:0;
|
|
13
|
-
i{
|
|
14
|
-
font-size: @td-steps-icon-size;
|
|
15
|
-
font-weight: normal;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
&-finish.@{step-prefix-cls}-default-icon,
|
|
20
|
-
&-error.@{step-prefix-cls}-default-icon {
|
|
21
|
-
.@{steps-prefix-cls}-item-icon {
|
|
22
|
-
background-color: transparent;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&-wait.@{step-prefix-cls}-default-icon {
|
|
27
|
-
.@{steps-prefix-cls}-item-icon {
|
|
28
|
-
background-color: @fill-color-tertiary;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
&-small {
|
|
36
|
-
.@{steps-prefix-cls}-item{
|
|
37
|
-
&-icon{
|
|
38
|
-
width: @td-steps-small-icon-size;
|
|
39
|
-
height: @td-steps-small-icon-size;
|
|
40
|
-
line-height: @td-steps-small-icon-size;
|
|
41
|
-
border-radius:@td-steps-small-icon-size;
|
|
42
|
-
>.@{steps-prefix-cls}-icon{
|
|
43
|
-
i{
|
|
44
|
-
font-size: @td-steps-small-icon-size;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
.@{tnt-steps-cls}.@{steps-prefix-cls}-vertical:not(.@{steps-prefix-cls}-dot):not(.@{steps-prefix-cls}-navigation):not(.@{steps-prefix-cls}-small).@{steps-prefix-cls}{
|
|
2
|
-
.@{steps-prefix-cls}-item{
|
|
3
|
-
&-icon >.@{steps-prefix-cls}-icon{
|
|
4
|
-
i{
|
|
5
|
-
vertical-align: middle;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
&-content {
|
|
10
|
-
min-height: 94px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
> .@{steps-prefix-cls}-item-container > .@{steps-prefix-cls}-item-tail{
|
|
14
|
-
padding: calc(@td-steps-icon-size + 15px) 0 15px;
|
|
15
|
-
left: 18px;
|
|
16
|
-
&::after{
|
|
17
|
-
width:0;
|
|
18
|
-
border-radius: 2px;
|
|
19
|
-
background-color: transparent;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&-finish > .@{steps-prefix-cls}-item-container > .@{steps-prefix-cls}-item-tail {
|
|
24
|
-
&::after {
|
|
25
|
-
border-left: 2px solid @finish-border-color;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&-wait, &-error, &-process {
|
|
30
|
-
> .@{steps-prefix-cls}-item-container > .@{steps-prefix-cls}-item-tail {
|
|
31
|
-
&::after {
|
|
32
|
-
border-left: 2px solid transparent;
|
|
33
|
-
background-color: @border-color;
|
|
34
|
-
mask: url(../assets/vertical_line.svg) repeat-y 0 0;
|
|
35
|
-
-webkit-mask:url(../assets/vertical_line.svg) repeat-y 0 0;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
package/es/switch/index.less
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
@switch-prefix-cls: ~'@{ant-prefix}-switch';
|
|
2
|
-
|
|
3
|
-
.@{switch-prefix-cls} {
|
|
4
|
-
&-small{
|
|
5
|
-
min-width: 36px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
&-checked{
|
|
9
|
-
&:hover{
|
|
10
|
-
background-color:@blue-5;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&-disabled{
|
|
15
|
-
background-color: @blue-5;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
&-wrap{
|
|
20
|
-
display: flex;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&-text-wrap{
|
|
24
|
-
margin-left: @margin-xs;
|
|
25
|
-
font-weight: 400;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&-text{
|
|
29
|
-
font-size: 14px;
|
|
30
|
-
color: @text-color;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&-text-disabled{
|
|
34
|
-
color: @text-color-tertiary;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&-subtext{
|
|
38
|
-
font-size: 12px;
|
|
39
|
-
color: tint(@text-color, 50%);
|
|
40
|
-
line-height: 20px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&-subtext-disabled{
|
|
44
|
-
color: @text-color-tertiary;
|
|
45
|
-
}
|
|
46
|
-
}
|
package/es/tabs/tabs.less
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
// Tabs 自定义梯形页签样式
|
|
2
|
-
@tab-prefix-cls: ~'@{ant-prefix}-tabs';
|
|
3
|
-
|
|
4
|
-
.tnt-tabs.@{tab-prefix-cls}.@{tab-prefix-cls}-ladder-card.@{tab-prefix-cls}-top {
|
|
5
|
-
|
|
6
|
-
padding: 0 12px;
|
|
7
|
-
position: relative;
|
|
8
|
-
left: -12px;
|
|
9
|
-
padding-bottom: 20px;
|
|
10
|
-
|
|
11
|
-
.@{tab-prefix-cls}-tab {
|
|
12
|
-
display: inline-block;
|
|
13
|
-
vertical-align: bottom;
|
|
14
|
-
position: relative;
|
|
15
|
-
min-width: 106px;
|
|
16
|
-
height: 40px;
|
|
17
|
-
line-height: 40px;
|
|
18
|
-
border-top-left-radius: @border-radius-lg;
|
|
19
|
-
filter: drop-shadow(0px 0px 4px rgba(0, 0, 0, 0.10));
|
|
20
|
-
box-shadow: 0px 0px 2px -5px rgba(0, 0, 0, 0.05);
|
|
21
|
-
border: none;
|
|
22
|
-
margin: 0px 30px 0px 0px;
|
|
23
|
-
padding: 0px 12px 0;
|
|
24
|
-
background: @fill-color-quaternary;
|
|
25
|
-
text-align: right;
|
|
26
|
-
color: @text-color-secondary;
|
|
27
|
-
|
|
28
|
-
&::after {
|
|
29
|
-
content: '';
|
|
30
|
-
position: absolute;
|
|
31
|
-
top: 0;
|
|
32
|
-
right: -52px;
|
|
33
|
-
height: 100%;
|
|
34
|
-
width: 64px;
|
|
35
|
-
z-index: 1;
|
|
36
|
-
background: inherit;
|
|
37
|
-
clip-path: path('M0 0H22.3875C28.4632 0 34.2094 2.76179 38.0049 7.5061L64 40H0V0Z');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.@{tab-prefix-cls}-nav {
|
|
43
|
-
margin-top: 12px;
|
|
44
|
-
padding-left: 12px;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.@{tab-prefix-cls}-nav-container {
|
|
48
|
-
height: auto;
|
|
49
|
-
position: relative;
|
|
50
|
-
left: -12px;
|
|
51
|
-
width: calc(100% + 12px);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.@{tab-prefix-cls}-bar.@{tab-prefix-cls}-top-bar.@{tab-prefix-cls}-card-bar {
|
|
55
|
-
border-bottom: none;
|
|
56
|
-
margin-bottom: 0;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
// 鼠标选中时,active状态在上层
|
|
61
|
-
.@{tab-prefix-cls}-tab-active {
|
|
62
|
-
z-index: 3;
|
|
63
|
-
background: @tabs-active-background;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.@{tab-prefix-cls}-tabpane{
|
|
67
|
-
background: @white;
|
|
68
|
-
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);
|
|
69
|
-
padding: 20px 12px 12px;
|
|
70
|
-
border-bottom-right-radius: @border-radius-lg;
|
|
71
|
-
border-bottom-left-radius: @border-radius-lg;
|
|
72
|
-
border-top-right-radius: @border-radius-lg;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// // Tabs top类型 全局样式修改
|
|
77
|
-
.tnt-tabs.@{tab-prefix-cls}.@{tab-prefix-cls}-top.@{tab-prefix-cls}-line {
|
|
78
|
-
.@{tab-prefix-cls}-bar {
|
|
79
|
-
border-bottom: none !important;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.@{tab-prefix-cls}-nav-container {
|
|
83
|
-
margin-bottom: none;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.@{tab-prefix-cls}-tab {
|
|
87
|
-
border-bottom: 1px solid transparent;
|
|
88
|
-
margin-bottom: 1px;
|
|
89
|
-
height: 40px;
|
|
90
|
-
line-height: 37px;
|
|
91
|
-
padding: 2px 12px 0;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.@{tab-prefix-cls}-tab:hover{
|
|
95
|
-
border-color: @border-color-secondary;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.tnt-tabs.@{tab-prefix-cls} {
|
|
100
|
-
.@{tab-prefix-cls}-nav {
|
|
101
|
-
.@{tab-prefix-cls}-tab {
|
|
102
|
-
color: @tabs-tab-color;
|
|
103
|
-
// 自定义图标默认都是 16px
|
|
104
|
-
i.anticon {
|
|
105
|
-
font-size: @font-size-lg;
|
|
106
|
-
margin-right: 4px;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
.@{tab-prefix-cls}-tab.@{tab-prefix-cls}-tab-active {
|
|
110
|
-
color: @tabs-active-color;
|
|
111
|
-
}
|
|
112
|
-
.@{tab-prefix-cls}-tab.@{tab-prefix-cls}-tab:hover {
|
|
113
|
-
color: @tabs-hover-color;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
package/es/tag/color.less
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
@preset-colors-custom: grey, blue, 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
|
-
|
|
3
|
-
|
|
4
|
-
@grey-7: @text-color-secondary;
|
|
5
|
-
@grey-4: @border-color-base;
|
|
6
|
-
@grey-1: @tag-default-bg;
|
|
7
|
-
|
|
8
|
-
@rose-7:#D8395E;
|
|
9
|
-
@rose-4: #FEA3B4;
|
|
10
|
-
@rose-1: #FFF1F3;
|
|
11
|
-
|
|
12
|
-
@lightblue-7: #1AA9E6;
|
|
13
|
-
@lightblue-4: #8FE0FF;
|
|
14
|
-
@lightblue-1: #F0F9FF;
|
|
15
|
-
|
|
16
|
-
@bluegrey-7: #486FBB;
|
|
17
|
-
@bluegrey-4: #A1BCEF;
|
|
18
|
-
@bluegrey-1: #F4F8FF;
|
|
19
|
-
|
|
20
|
-
@purplegrey-7: #4E5BA6;
|
|
21
|
-
@purplegrey-4: #AFB5D9;
|
|
22
|
-
@purplegrey-1: #F8F9FC;
|
|
23
|
-
|
|
24
|
-
@tnt-purple-7: #6E54D4;
|
|
25
|
-
@tnt-purple-4: #BDB4FE;
|
|
26
|
-
@tnt-purple-1: #F4F3FF;
|
|
27
|
-
|
|
28
|
-
@lightpurple-7: #5161D7;
|
|
29
|
-
@lightpurple-4: #A4BCFD;
|
|
30
|
-
@lightpurple-1: #EEF4FF;
|
|
31
|
-
|
|
32
|
-
@lightgreen-7: #2E9C98;
|
|
33
|
-
@lightgreen-4: #8CE0DD;
|
|
34
|
-
@lightgreen-1: #F1FBFB;
|
|
35
|
-
|
|
36
|
-
@tnt-pink-7: #D03E93;
|
|
37
|
-
@tnt-pink-4: #FAA7E0;
|
|
38
|
-
@tnt-pink-1: #FDF2FA;
|
|
39
|
-
|
|
40
|
-
@tnt-orange-7:#DF5F28;
|
|
41
|
-
@tnt-orange-4: #FEB173;
|
|
42
|
-
@tnt-orange-1: #FFF6ED;
|
|
43
|
-
|
package/es/tag/tag.js
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
-
}
|
|
7
|
-
return t;
|
|
8
|
-
};
|
|
9
|
-
/*
|
|
10
|
-
* @Author: 周泽飞 zefei.zhou@tongdun.net
|
|
11
|
-
* @Date: 2024-03-04 19:15:22
|
|
12
|
-
* @LastEditors: 周泽飞 zefei.zhou@tongdun.net
|
|
13
|
-
* @LastEditTime: 2024-03-11 10:10:31
|
|
14
|
-
* @FilePath: /tntd/packages/tntd/src/tag/tag.tsx
|
|
15
|
-
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
16
|
-
*/
|
|
17
|
-
import React, { forwardRef } from 'react';
|
|
18
|
-
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
19
|
-
import { default as AntdTag } from 'antd/es/tag';
|
|
20
|
-
import classNames from 'classnames';
|
|
21
|
-
import Ellipsis from '../ellipsis';
|
|
22
|
-
import Icon from '../icon';
|
|
23
|
-
export * from 'antd/es/tag';
|
|
24
|
-
export var TagColors;
|
|
25
|
-
(function (TagColors) {
|
|
26
|
-
TagColors["grey"] = "grey";
|
|
27
|
-
TagColors["rose"] = "rose";
|
|
28
|
-
TagColors["lightblue"] = "lightblue";
|
|
29
|
-
TagColors["bluegrey"] = "bluegrey";
|
|
30
|
-
TagColors["purplegrey"] = "purplegrey";
|
|
31
|
-
TagColors["lightpurple"] = "lightpurple";
|
|
32
|
-
TagColors["lightgreen"] = "lightgreen";
|
|
33
|
-
TagColors["tnt-pink"] = "tnt-pink";
|
|
34
|
-
TagColors["tnt-orange"] = "tnt-orange";
|
|
35
|
-
TagColors["tnt-purple"] = "tnt-purple";
|
|
36
|
-
})(TagColors || (TagColors = {}));
|
|
37
|
-
// 内置的状态
|
|
38
|
-
const statusMap = {
|
|
39
|
-
success: {
|
|
40
|
-
icon: 'check-circle',
|
|
41
|
-
color: 'green'
|
|
42
|
-
},
|
|
43
|
-
info: {
|
|
44
|
-
icon: 'info-circle',
|
|
45
|
-
color: 'blue'
|
|
46
|
-
},
|
|
47
|
-
error: {
|
|
48
|
-
icon: 'close-circle',
|
|
49
|
-
color: 'red'
|
|
50
|
-
},
|
|
51
|
-
warning: {
|
|
52
|
-
icon: 'info-circle',
|
|
53
|
-
color: 'orange'
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
const getDisplayEllipsisOptions = (props, prefixCls) => {
|
|
57
|
-
var _a;
|
|
58
|
-
const {
|
|
59
|
-
ellipsisOptions,
|
|
60
|
-
addonContent,
|
|
61
|
-
addonType,
|
|
62
|
-
addonPosition,
|
|
63
|
-
children
|
|
64
|
-
} = props || {};
|
|
65
|
-
const options = Object.assign({}, ellipsisOptions);
|
|
66
|
-
let addonContentInfo = null;
|
|
67
|
-
if (addonContent) {
|
|
68
|
-
addonContentInfo = addonContent;
|
|
69
|
-
} else if (addonType && statusMap[addonType]) {
|
|
70
|
-
addonContentInfo = React.createElement(Icon, {
|
|
71
|
-
type: (_a = statusMap[addonType]) === null || _a === void 0 ? void 0 : _a.icon
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
if (addonContentInfo) {
|
|
75
|
-
addonContentInfo = React.createElement("span", {
|
|
76
|
-
className: `${prefixCls}-addon`
|
|
77
|
-
}, addonContentInfo);
|
|
78
|
-
if (addonPosition === 'prefix') {
|
|
79
|
-
options.prefix = addonContentInfo;
|
|
80
|
-
}
|
|
81
|
-
if (addonPosition === 'suffix') {
|
|
82
|
-
options.suffix = addonContentInfo;
|
|
83
|
-
}
|
|
84
|
-
if (options.Popover === true) {
|
|
85
|
-
options.content = children;
|
|
86
|
-
} else {
|
|
87
|
-
options.title = children;
|
|
88
|
-
}
|
|
89
|
-
options.contentInfo = addonContentInfo;
|
|
90
|
-
}
|
|
91
|
-
return options;
|
|
92
|
-
};
|
|
93
|
-
export const Tag = forwardRef((props, ref) => {
|
|
94
|
-
var _a;
|
|
95
|
-
const {
|
|
96
|
-
className,
|
|
97
|
-
border = true,
|
|
98
|
-
size,
|
|
99
|
-
addonType,
|
|
100
|
-
addonContent,
|
|
101
|
-
addonPosition = 'prefix',
|
|
102
|
-
ellipsisOptions,
|
|
103
|
-
children
|
|
104
|
-
} = props,
|
|
105
|
-
restProps = __rest(props, ["className", "border", "size", "addonType", "addonContent", "addonPosition", "ellipsisOptions", "children"]);
|
|
106
|
-
let {
|
|
107
|
-
color
|
|
108
|
-
} = props || {};
|
|
109
|
-
if (!color && addonType) {
|
|
110
|
-
color = (_a = statusMap[addonType]) === null || _a === void 0 ? void 0 : _a.color;
|
|
111
|
-
}
|
|
112
|
-
return React.createElement(ConfigConsumer, null, ({
|
|
113
|
-
getPrefixCls
|
|
114
|
-
}) => {
|
|
115
|
-
var _a, _b, _c, _d, _e;
|
|
116
|
-
const prefixCls = getPrefixCls('tag');
|
|
117
|
-
const displayEllipsisOptions = getDisplayEllipsisOptions({
|
|
118
|
-
ellipsisOptions,
|
|
119
|
-
addonContent,
|
|
120
|
-
addonType,
|
|
121
|
-
addonPosition,
|
|
122
|
-
children
|
|
123
|
-
}, prefixCls);
|
|
124
|
-
// 只有一个icon时 padding距离存在差异
|
|
125
|
-
const onlyIcon = React.isValidElement(children) && React.Children.only(children) && (children === null || children === void 0 ? void 0 : children.type) instanceof Function && ((_c = (_b = (_a = children === null || children === void 0 ? void 0 : children.type) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.toLowerCase) === null || _c === void 0 ? void 0 : _c.call(_b)) === 'icon';
|
|
126
|
-
// 前缀是图片 只处理一层节点下是图片的,否则就用户自定义样式
|
|
127
|
-
const addonIsImg = React.isValidElement(addonContent) && (addonContent === null || addonContent === void 0 ? void 0 : addonContent.type) && typeof (addonContent === null || addonContent === void 0 ? void 0 : addonContent.type) === 'string' && ((_e = (_d = addonContent === null || addonContent === void 0 ? void 0 : addonContent.type) === null || _d === void 0 ? void 0 : _d.toLowerCase) === null || _e === void 0 ? void 0 : _e.call(_d)) === 'img';
|
|
128
|
-
return React.createElement(AntdTag, Object.assign({
|
|
129
|
-
className: classNames({
|
|
130
|
-
[`${prefixCls}-${color}`]: color && !!TagColors[color]
|
|
131
|
-
}, 'tnt-tag', `${prefixCls}-${size || 'middle'}`, {
|
|
132
|
-
[`${prefixCls}-no-border`]: !border
|
|
133
|
-
}, {
|
|
134
|
-
[`${prefixCls}-only-child`]: !children || onlyIcon
|
|
135
|
-
}, {
|
|
136
|
-
[`${prefixCls}-addon-img`]: !!addonIsImg
|
|
137
|
-
}, className || '')
|
|
138
|
-
}, restProps, {
|
|
139
|
-
color: !TagColors[color] ? color : '',
|
|
140
|
-
ref: ref
|
|
141
|
-
}), !addonContent && !addonType && !ellipsisOptions && children, (!!addonContent || !!addonType || !!ellipsisOptions) && React.createElement("span", {
|
|
142
|
-
className: `${prefixCls}-addon-wrap`
|
|
143
|
-
}, !!children && React.createElement(Ellipsis, Object.assign({}, displayEllipsisOptions), children), !children && (displayEllipsisOptions === null || displayEllipsisOptions === void 0 ? void 0 : displayEllipsisOptions.contentInfo)));
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
Tag.CheckableTag = forwardRef((props, ref) => {
|
|
147
|
-
// 默认没有border
|
|
148
|
-
const _a = props || {},
|
|
149
|
-
{
|
|
150
|
-
onChange,
|
|
151
|
-
disabled,
|
|
152
|
-
border = false,
|
|
153
|
-
className
|
|
154
|
-
} = _a,
|
|
155
|
-
rest = __rest(_a, ["onChange", "disabled", "border", "className"]);
|
|
156
|
-
return React.createElement(ConfigConsumer, null, ({
|
|
157
|
-
getPrefixCls
|
|
158
|
-
}) => {
|
|
159
|
-
const prefixCls = getPrefixCls('tag-checkable');
|
|
160
|
-
return React.createElement(AntdTag.CheckableTag, Object.assign({}, !disabled && {
|
|
161
|
-
onChange
|
|
162
|
-
}, {
|
|
163
|
-
className: classNames('tnt-tag', {
|
|
164
|
-
[`${prefixCls}-disabled`]: disabled,
|
|
165
|
-
[`${prefixCls}-border`]: !!border
|
|
166
|
-
})
|
|
167
|
-
}, rest, {
|
|
168
|
-
ref: ref
|
|
169
|
-
}));
|
|
170
|
-
});
|
|
171
|
-
});
|
package/es/tag/tag.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tag.js","sourceRoot":"","sources":["../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AC,SAAS,EAAE;gBAC/B,CAAC,GAAG,SAAS,WAAW,CAAC,EAAE,QAAQ;gBACnC,CAAC,GAAG,SAAS,SAAS,CAAC,EAAE,CAAC,CAAC,MAAM;aAClC,CAAC,IACE,IAAI,IACR,GAAG,EAAE,GAAG,IACR,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CACF,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2024-03-04 19:15:22\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2024-03-11 10:10:31\n * @FilePath: /tntd/packages/tntd/src/tag/tag.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport React, { useMemo, forwardRef } from 'react'\nimport type { TagProps as AntdTagProps } from 'antd/es/tag'\nimport type { CheckableTagProps as AntdCheckableTagProps } from 'antd/es/tag'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport { default as AntdTag } from 'antd/es/tag'\nimport type AntdCheckableTag from 'antd/es/tag/CheckableTag'\nimport classNames from 'classnames'\nimport Ellipsis from '../ellipsis'\nimport Icon from '../icon'\n\nexport * from 'antd/es/tag'\n\nexport enum TagColors {\n grey = 'grey',\n rose = 'rose',\n lightblue = 'lightblue',\n bluegrey = 'bluegrey',\n purplegrey = 'purplegrey',\n lightpurple = 'lightpurple',\n lightgreen = 'lightgreen',\n 'tnt-pink' = 'tnt-pink',\n 'tnt-orange' = 'tnt-orange',\n 'tnt-purple' = 'tnt-purple',\n}\n\n// 内置的状态\nconst statusMap = {\n success: {\n icon: 'check-circle',\n color: 'green',\n },\n info: {\n icon: 'info-circle',\n color: 'blue',\n },\n error: {\n icon: 'close-circle',\n color: 'red',\n },\n warning: {\n icon: 'info-circle',\n color: 'orange',\n },\n}\n\nexport interface TagProps extends AntdTagProps {\n color?: TagColors | string\n size?: 'small' | 'middle' | 'large'\n border?: boolean\n addonContent?: React.ReactNode\n addonPosition?: 'prefix' | 'suffix'\n addonType?: 'success' | 'info' | 'warning' | 'error'\n ellipsisOptions?: {\n Popover?: boolean\n emptyText?: string\n widthLimit?: number | string\n lines?: number\n [key: string]: unknown\n }\n}\n\nexport interface CheckableTagProps extends AntdCheckableTagProps {\n disabled?: boolean\n border?: boolean\n}\n\ninterface TagComponent\n extends React.ForwardRefExoticComponent<TagProps & React.RefAttributes<AntdTag>> {\n CheckableTag: React.FC<CheckableTagProps>\n}\n\nconst getDisplayEllipsisOptions = (props: TagProps, prefixCls: string) => {\n const { ellipsisOptions, addonContent, addonType, addonPosition, children } = props || {}\n const options = {\n ...ellipsisOptions,\n }\n\n let addonContentInfo = null\n if (addonContent) {\n addonContentInfo = addonContent\n } else if (addonType && statusMap[addonType]) {\n addonContentInfo = <Icon type={statusMap[addonType]?.icon} />\n }\n\n if (addonContentInfo) {\n addonContentInfo = <span className={`${prefixCls}-addon`}>{addonContentInfo}</span>\n if (addonPosition === 'prefix') {\n options.prefix = addonContentInfo\n }\n\n if (addonPosition === 'suffix') {\n options.suffix = addonContentInfo\n }\n\n if (options.Popover === true) {\n options.content = children\n } else {\n options.title = children\n }\n options.contentInfo = addonContentInfo\n }\n\n return options\n}\n\nexport const Tag = forwardRef<AntdTag, TagProps & { capitalize?: boolean }>((props, ref) => {\n const {\n className,\n border = true,\n size,\n addonType,\n addonContent,\n addonPosition = 'prefix',\n ellipsisOptions,\n children,\n ...restProps\n } = props\n\n let { color } = props || {}\n if (!color && addonType) {\n color = statusMap[addonType]?.color\n }\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('tag')\n\n const displayEllipsisOptions = getDisplayEllipsisOptions(\n {\n ellipsisOptions,\n addonContent,\n addonType,\n addonPosition,\n children,\n },\n prefixCls\n )\n\n // 只有一个icon时 padding距离存在差异\n const onlyIcon =\n React.isValidElement(children) &&\n React.Children.only(children) &&\n children?.type instanceof Function &&\n children?.type?.name?.toLowerCase?.() === 'icon'\n\n // 前缀是图片 只处理一层节点下是图片的,否则就用户自定义样式\n const addonIsImg =\n React.isValidElement(addonContent) &&\n addonContent?.type &&\n typeof addonContent?.type === 'string' &&\n addonContent?.type?.toLowerCase?.() === 'img'\n\n return (\n <AntdTag\n className={classNames(\n {\n [`${prefixCls}-${color}`]: color && !!TagColors[color as keyof typeof TagColors],\n },\n 'tnt-tag',\n `${prefixCls}-${size || 'middle'}`,\n {\n [`${prefixCls}-no-border`]: !border,\n },\n {\n [`${prefixCls}-only-child`]: !children || onlyIcon,\n },\n {\n [`${prefixCls}-addon-img`]: !!addonIsImg,\n },\n className || ''\n )}\n {...restProps}\n color={!TagColors[color as keyof typeof TagColors] ? color : ''}\n ref={ref}\n >\n {!addonContent && !addonType && !ellipsisOptions && children}\n {(!!addonContent || !!addonType || !!ellipsisOptions) && (\n <span className={`${prefixCls}-addon-wrap`}>\n {!!children && <Ellipsis {...displayEllipsisOptions}>{children}</Ellipsis>}\n {!children && displayEllipsisOptions?.contentInfo}\n </span>\n )}\n </AntdTag>\n )\n }}\n </ConfigConsumer>\n )\n}) as TagComponent\n\nTag.CheckableTag = forwardRef<AntdCheckableTag, CheckableTagProps>(\n (props: CheckableTagProps, ref) => {\n // 默认没有border\n const { onChange, disabled, border = false, className, ...rest } = props || {}\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('tag-checkable')\n return (\n <AntdTag.CheckableTag\n {...(!disabled && { onChange })}\n className={classNames('tnt-tag', {\n [`${prefixCls}-disabled`]: disabled,\n [`${prefixCls}-border`]: !!border,\n })}\n {...rest}\n ref={ref}\n />\n )\n }}\n </ConfigConsumer>\n )\n }\n)\n"]}
|