tntd 3.0.4 → 3.0.6
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/columns/index.less +3 -3
- package/es/drawer/drawer.js +5 -8
- package/es/drawer/drawer.js.map +1 -1
- package/es/drawer/index.less +34 -4
- package/es/modal/index.less +3 -0
- package/es/modal/style/modal.less +15 -1
- package/es/query-list-scene/index.less +1 -1
- package/es/title/index.less +12 -12
- package/es/tntd-cascader/AntdCascader/component/getIcons.js +1 -4
- package/es/tntd-cascader/AntdCascader/component/getIcons.js.map +1 -1
- package/es/tntd-cascader/AntdCascader/index.less +6 -6
- package/es/tntd-layout/Application.js +1 -1
- package/es/tntd-layout/Application.js.map +1 -1
- package/es/tntd-second-page/index.less +2 -2
- package/lib/columns/index.less +3 -3
- package/lib/drawer/drawer.d.ts.map +1 -1
- package/lib/drawer/drawer.js +5 -9
- package/lib/drawer/drawer.js.map +1 -1
- package/lib/drawer/index.less +34 -4
- package/lib/modal/index.less +3 -0
- package/lib/modal/style/modal.less +15 -1
- package/lib/query-list-scene/index.less +1 -1
- package/lib/title/index.less +12 -12
- package/lib/tntd-cascader/AntdCascader/component/getIcons.d.ts +1 -1
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js +1 -4
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js.map +1 -1
- package/lib/tntd-cascader/AntdCascader/index.less +6 -6
- package/lib/tntd-layout/Application.js +1 -1
- package/lib/tntd-layout/Application.js.map +1 -1
- package/lib/tntd-second-page/index.less +2 -2
- package/package.json +1 -1
package/es/columns/index.less
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
.title-left {
|
|
27
27
|
float: left;
|
|
28
|
-
color:
|
|
28
|
+
color: @text-color;
|
|
29
29
|
font-size: 14px;
|
|
30
30
|
}
|
|
31
31
|
.title-extra {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
height: 48px;
|
|
50
50
|
line-height: 48px;
|
|
51
51
|
border-bottom: 1px solid #e1e6ee;
|
|
52
|
-
color:
|
|
52
|
+
color: @text-color;
|
|
53
53
|
font-size: 14px;
|
|
54
54
|
|
|
55
55
|
.tab-item {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
height: calc(~'100% - 48px');
|
|
71
71
|
padding: 10px 20px;
|
|
72
72
|
overflow-y: scroll;
|
|
73
|
-
color:
|
|
73
|
+
color: @text-color;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
package/es/drawer/drawer.js
CHANGED
|
@@ -13,7 +13,7 @@ import classNames from 'classnames';
|
|
|
13
13
|
import { doUpperTitle } from '../utils';
|
|
14
14
|
import React, { useCallback, useEffect } from 'react';
|
|
15
15
|
import { Button } from '../button';
|
|
16
|
-
import
|
|
16
|
+
import '../icon';
|
|
17
17
|
const DefaultFooter = ({
|
|
18
18
|
locale,
|
|
19
19
|
onCancel,
|
|
@@ -50,7 +50,7 @@ export const Drawer = _a => {
|
|
|
50
50
|
cancelText = '',
|
|
51
51
|
locale,
|
|
52
52
|
okType = 'primary',
|
|
53
|
-
cancelType = '
|
|
53
|
+
cancelType = 'tertiary',
|
|
54
54
|
confirmLoading = false,
|
|
55
55
|
okButtonProps = {},
|
|
56
56
|
cancelButtonProps = {},
|
|
@@ -108,18 +108,15 @@ export const Drawer = _a => {
|
|
|
108
108
|
}, React.createElement(AntdDrawer, Object.assign({
|
|
109
109
|
className: classNames(prefixCls, 'tnt-drawer', className, {
|
|
110
110
|
[`${prefixCls}-contain-closable`]: closable !== false,
|
|
111
|
+
[`${prefixCls}-no-header`]: closable === false && !title,
|
|
111
112
|
[`${prefixCls}-footer`]: showFooter || footer
|
|
112
113
|
}),
|
|
113
|
-
closable:
|
|
114
|
+
closable: closable,
|
|
114
115
|
onClose: _onCancel,
|
|
115
116
|
width: 480
|
|
116
117
|
}, rest, {
|
|
117
118
|
title: !unUpperConverted ? doUpperTitle(title, upperCaseIgnore) : title
|
|
118
|
-
}), React.createElement(React.Fragment, null,
|
|
119
|
-
type: "close",
|
|
120
|
-
className: `${prefixCls}-close`,
|
|
121
|
-
onClick: _onCancel
|
|
122
|
-
}), rest.children, (showFooter || footer) && React.createElement("div", {
|
|
119
|
+
}), React.createElement(React.Fragment, null, rest.children, (showFooter || footer) && React.createElement("div", {
|
|
123
120
|
className: `${prefixCls}-footer-style`
|
|
124
121
|
}, footer || React.createElement(DefaultFooter, {
|
|
125
122
|
confirmLoading: confirmLoading,
|
package/es/drawer/drawer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,cAAc,MAAM,wCAAwC,CAAA;AACnE,OAAO,UAAU,MAAM,YAAY,CAAA;AAGnC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,KAAK,EAAE,EAAM,WAAW,EAAE,SAAS,EAAU,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,
|
|
1
|
+
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,cAAc,MAAM,wCAAwC,CAAA;AACnE,OAAO,UAAU,MAAM,YAAY,CAAA;AAGnC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,KAAK,EAAE,EAAM,WAAW,EAAE,SAAS,EAAU,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,MAA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,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { ConfigConsumer } from 'antd/es/config-provider'\nimport type { DrawerProps as AntdDrawerProps } from 'antd/es/drawer'\nimport { default as AntdDrawer } from 'antd/es/drawer'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport type { BaseButtonProps } from 'antd/es/button/button'\nimport type { TntButtonType } from '../button/button'\nimport { doUpperTitle } from '../utils'\nimport React, { FC, useCallback, useEffect, useRef } from 'react'\nimport { Button } from '../button'\nimport Icon from '../icon'\nconst DefaultFooter = ({\n locale,\n onCancel,\n onOk,\n okText,\n okType,\n cancelText,\n confirmLoading,\n okButtonProps,\n cancelButtonProps,\n cancelType,\n}: {\n locale?: {\n okText?: string\n cancelText?: string\n }\n onCancel?: () => void\n onOk?: () => void\n okText: string\n cancelText: string\n okType?: TntButtonType\n cancelType: TntButtonType\n confirmLoading?: boolean\n okButtonProps?: BaseButtonProps\n cancelButtonProps?: BaseButtonProps\n}) => {\n return (\n <>\n <Button onClick={onCancel} type={cancelType || 'tertiary'} {...cancelButtonProps}>\n {cancelText || locale?.cancelText}\n </Button>\n <Button onClick={onOk} type={okType || 'primary'} loading={confirmLoading} {...okButtonProps}>\n {okText || locale?.okText}\n </Button>\n </>\n )\n}\n\ninterface CustomDrawerProps extends AntdDrawerProps {\n footer?: React.ReactNode\n showFooter?: boolean\n onClose?: () => void\n onSubmit?: () => void\n onCancel?: () => void\n afterClose?: () => void\n onOk?: () => void\n okText?: string\n cancelText?: string\n locale?: {\n okText?: string\n cancelText?: string\n }\n okType?: TntButtonType\n cancelType?: TntButtonType\n confirmLoading?: boolean\n okButtonProps?: BaseButtonProps\n cancelButtonProps?: BaseButtonProps\n clickOnBlankToClose: boolean\n upperCaseIgnore?: []\n unUpperConverted: boolean\n}\n\nexport const Drawer: FC<CustomDrawerProps> = ({\n closable = true,\n className,\n footer,\n showFooter,\n onClose,\n afterClose,\n onSubmit,\n onCancel,\n onOk,\n okText = '',\n cancelText = '',\n locale,\n okType = 'primary',\n cancelType = 'tertiary',\n confirmLoading = false,\n okButtonProps = {},\n cancelButtonProps = {},\n clickOnBlankToClose = false,\n upperCaseIgnore,\n unUpperConverted,\n title,\n ...rest\n}) => {\n const drawerDom = React.useRef<EventTarget | null>(null)\n const _onCancel = useCallback(() => {\n if (onCancel) {\n onCancel()\n } else if (onClose) {\n onClose()\n }\n if (afterClose) {\n afterClose()\n }\n }, [onCancel, onClose, afterClose])\n const _onOk = onOk || onSubmit\n\n useEffect(() => {\n if (clickOnBlankToClose) {\n const handleOutsideClick = (event: Event) => {\n const drawer = drawerDom.current as Node\n const targetElement = event.target as Node\n\n let isInDrawer = false\n if (drawer && targetElement) {\n isInDrawer = drawer.contains(targetElement as Node) || targetElement === drawer\n }\n drawerDom.current = null\n if (rest.visible && !isInDrawer && _onCancel) {\n _onCancel()\n }\n }\n document.removeEventListener('click', handleOutsideClick)\n document.addEventListener('click', handleOutsideClick)\n return () => {\n document.removeEventListener('click', handleOutsideClick)\n }\n }\n }, [rest.visible, clickOnBlankToClose, _onCancel])\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('drawer')\n return (\n <LocaleReceiver componentName=\"Drawer\" defaultLocale={locale}>\n {(locale) => {\n return (\n <div\n onClick={(event: React.MouseEvent<HTMLDivElement>) => {\n drawerDom.current = event.target\n }}\n >\n <AntdDrawer\n className={classNames(prefixCls, 'tnt-drawer', className, {\n [`${prefixCls}-contain-closable`]: closable !== false,\n [`${prefixCls}-no-header`]: closable === false && !title,\n [`${prefixCls}-footer`]: showFooter || footer,\n })}\n closable={closable}\n onClose={_onCancel}\n width={480}\n {...rest}\n title={!unUpperConverted ? doUpperTitle(title, upperCaseIgnore) : title}\n >\n <>\n {rest.children}\n {(showFooter || footer) && (\n <div className={`${prefixCls}-footer-style`}>\n {footer || (\n <DefaultFooter\n confirmLoading={confirmLoading}\n okButtonProps={okButtonProps}\n cancelButtonProps={cancelButtonProps}\n okType={okType}\n locale={locale}\n okText={okText}\n cancelType={cancelType}\n cancelText={cancelText}\n onOk={_onOk}\n onCancel={_onCancel}\n />\n )}\n </div>\n )}\n </>\n </AntdDrawer>\n </div>\n )\n }}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n )\n}\n"]}
|
package/es/drawer/index.less
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@drawer-prefix-cls: ~'@{ant-prefix}-drawer';
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
.tnt-drawer.@{drawer-prefix-cls} {
|
|
5
4
|
&-top {
|
|
6
5
|
.@{drawer-prefix-cls}-wrapper-body {
|
|
@@ -23,6 +22,20 @@
|
|
|
23
22
|
max-height: ~'calc(100vh - 48px)';
|
|
24
23
|
}
|
|
25
24
|
|
|
25
|
+
&.@{drawer-prefix-cls}-no-header {
|
|
26
|
+
.@{drawer-prefix-cls}-wrapper-body{
|
|
27
|
+
margin-top: 0;
|
|
28
|
+
max-height: ~'calc(100vh)';
|
|
29
|
+
}
|
|
30
|
+
&.@{drawer-prefix-cls}-footer{
|
|
31
|
+
.@{drawer-prefix-cls}-wrapper-body{
|
|
32
|
+
margin-top:0 !important;
|
|
33
|
+
max-height: ~'calc(100vh - 48px)' !important;
|
|
34
|
+
margin-bottom: 48px !important;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
26
39
|
&-footer {
|
|
27
40
|
.@{drawer-prefix-cls}-header {
|
|
28
41
|
// border-bottom: none;
|
|
@@ -38,7 +51,6 @@
|
|
|
38
51
|
margin-top: 48px !important;
|
|
39
52
|
margin-bottom: 48px !important;
|
|
40
53
|
}
|
|
41
|
-
|
|
42
54
|
}
|
|
43
55
|
|
|
44
56
|
.@{drawer-prefix-cls}-title {
|
|
@@ -59,7 +71,7 @@
|
|
|
59
71
|
font-weight: 700;
|
|
60
72
|
font-size: 20px;
|
|
61
73
|
font-style: normal;
|
|
62
|
-
line-height:
|
|
74
|
+
line-height: 48px;
|
|
63
75
|
text-align: center;
|
|
64
76
|
text-transform: none;
|
|
65
77
|
text-decoration: none;
|
|
@@ -69,10 +81,13 @@
|
|
|
69
81
|
cursor: pointer;
|
|
70
82
|
transition: color 0.3s;
|
|
71
83
|
text-rendering: auto;
|
|
84
|
+
i.tntd-anticon{
|
|
85
|
+
font-size:20px;
|
|
86
|
+
}
|
|
72
87
|
}
|
|
73
88
|
|
|
74
89
|
|
|
75
|
-
|
|
90
|
+
&.@{drawer-prefix-cls}-contain-closable {
|
|
76
91
|
.@{drawer-prefix-cls}-header {
|
|
77
92
|
padding: 12px 36px 12px 20px;
|
|
78
93
|
}
|
|
@@ -148,6 +163,21 @@
|
|
|
148
163
|
.@{ant-prefix}-btn {
|
|
149
164
|
margin-left: 16px;
|
|
150
165
|
}
|
|
166
|
+
|
|
167
|
+
// 如果button没有type类型默认设置为 type: tertiary的样式(兼容老业务用了footer的场景)
|
|
168
|
+
button:not([class*="ant-btn-"]):not([class*="tnt-btn-"]) {
|
|
169
|
+
color: #17233d;
|
|
170
|
+
background-color: #f8f9fb;
|
|
171
|
+
border-color: #f8f9fb;
|
|
172
|
+
text-shadow: none;
|
|
173
|
+
box-shadow: none;
|
|
174
|
+
|
|
175
|
+
&:hover{
|
|
176
|
+
color: var(--blue-6);
|
|
177
|
+
background-color: #f0f5ff;
|
|
178
|
+
border-color: #f0f5ff;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
151
181
|
}
|
|
152
182
|
|
|
153
183
|
}
|
package/es/modal/index.less
CHANGED
|
@@ -106,7 +106,21 @@
|
|
|
106
106
|
border-radius: 0 0 @border-radius-base @border-radius-base;
|
|
107
107
|
button + button {
|
|
108
108
|
margin-bottom: 0;
|
|
109
|
-
margin-left: @margin-
|
|
109
|
+
margin-left: @margin-base;
|
|
110
|
+
}
|
|
111
|
+
// 如果button没有type类型默认设置为type: tertiary的样式(兼容老业务用了footer的场景)
|
|
112
|
+
button:not([class*="ant-btn-"]):not([class*="tnt-btn-"]) {
|
|
113
|
+
color: #17233d;
|
|
114
|
+
background-color: #f8f9fb;
|
|
115
|
+
border-color: #f8f9fb;
|
|
116
|
+
text-shadow: none;
|
|
117
|
+
box-shadow: none;
|
|
118
|
+
|
|
119
|
+
&:hover{
|
|
120
|
+
color: var(--blue-6);
|
|
121
|
+
background-color: #f0f5ff;
|
|
122
|
+
border-color: #f0f5ff;
|
|
123
|
+
}
|
|
110
124
|
}
|
|
111
125
|
}
|
|
112
126
|
|
package/es/title/index.less
CHANGED
|
@@ -80,7 +80,6 @@
|
|
|
80
80
|
top: 45%;
|
|
81
81
|
left: 58%;
|
|
82
82
|
transform: rotate(-45deg);
|
|
83
|
-
-webkit-transform: rotate(-45deg);
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
85
|
&.small {
|
|
@@ -93,8 +92,8 @@
|
|
|
93
92
|
font-size: 14px;
|
|
94
93
|
}
|
|
95
94
|
&::before {
|
|
96
|
-
height:
|
|
97
|
-
top:
|
|
95
|
+
height: 12px;
|
|
96
|
+
top: 8px;
|
|
98
97
|
}
|
|
99
98
|
}
|
|
100
99
|
}
|
|
@@ -108,8 +107,8 @@
|
|
|
108
107
|
font-size: 18px;
|
|
109
108
|
}
|
|
110
109
|
&::before {
|
|
111
|
-
height:
|
|
112
|
-
top:
|
|
110
|
+
height: 14px;
|
|
111
|
+
top: 10px;
|
|
113
112
|
}
|
|
114
113
|
}
|
|
115
114
|
}
|
|
@@ -123,8 +122,8 @@
|
|
|
123
122
|
font-size: 20px;
|
|
124
123
|
}
|
|
125
124
|
&::before {
|
|
126
|
-
height:
|
|
127
|
-
top:
|
|
125
|
+
height: 16px;
|
|
126
|
+
top: 10px;
|
|
128
127
|
}
|
|
129
128
|
}
|
|
130
129
|
}
|
|
@@ -135,7 +134,7 @@
|
|
|
135
134
|
}
|
|
136
135
|
h3 {
|
|
137
136
|
font-size: 16px;
|
|
138
|
-
color:
|
|
137
|
+
color: @text-color;
|
|
139
138
|
font-weight: normal;
|
|
140
139
|
margin: 0;
|
|
141
140
|
margin-right: 10px;
|
|
@@ -153,12 +152,13 @@
|
|
|
153
152
|
&::before {
|
|
154
153
|
position: absolute;
|
|
155
154
|
left: 0;
|
|
156
|
-
top:
|
|
157
|
-
background-color:
|
|
155
|
+
top: 9px;
|
|
156
|
+
background-color: @primary-color;
|
|
158
157
|
content: '';
|
|
159
|
-
width:
|
|
160
|
-
height:
|
|
158
|
+
width: 4px;
|
|
159
|
+
height: 12px;
|
|
161
160
|
margin-right: 8px;
|
|
161
|
+
border-radius: 2px;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
.tntd-title-extra {
|
|
@@ -34,10 +34,7 @@ export default function getIcons({
|
|
|
34
34
|
showSearch
|
|
35
35
|
}) => {
|
|
36
36
|
if (open && showSearch) {
|
|
37
|
-
return
|
|
38
|
-
className: iconCls,
|
|
39
|
-
type: "search"
|
|
40
|
-
}));
|
|
37
|
+
return null;
|
|
41
38
|
}
|
|
42
39
|
return getSuffixIconNode(React.createElement(Icon, {
|
|
43
40
|
className: iconCls,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIcons.js","sourceRoot":"","sources":["../../../../src/tntd-cascader/AntdCascader/component/getIcons.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,IAAI,MAAM,eAAe,CAAA;AAIhC,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAS,EACT,SAAS,EACT,YAAY,GAYb;IACC,aAAa;IACb,MAAM,eAAe,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,oBAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,QAAQ,GAAG,CAAA;IAEhF,2BAA2B;IAC3B,MAAM,iBAAiB,GAAG,CAAC,SAAqB,EAAE,EAAE,CAAC,CACnD;QACG,SAAS,KAAK,KAAK,IAAI,SAAS;QAChC,WAAW,IAAI,YAAY,CAC3B,CACJ,CAAA;IAED,kBAAkB;IAClB,IAAI,gBAAgB,GAAG,IAAI,CAAA;IAC3B,IAAI,UAAU,KAAK,SAAS,EAAE;QAC5B,gBAAgB,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAA;KACjD;SAAM,IAAI,OAAO,EAAE;QAClB,gBAAgB,GAAG,iBAAiB,CAAC,oBAAC,IAAI,IAAC,IAAI,EAAC,SAAS,GAAG,CAAC,CAAA;KAC9D;SAAM;QACL,MAAM,OAAO,GAAG,GAAG,SAAS,SAAS,CAAA;QACrC,gBAAgB,GAAG,CAAC,EAAE,IAAI,EAAE,UAAU,EAA0C,EAAE,EAAE;YAClF,IAAI,IAAI,IAAI,UAAU,EAAE;gBACtB,OAAO,
|
|
1
|
+
{"version":3,"file":"getIcons.js","sourceRoot":"","sources":["../../../../src/tntd-cascader/AntdCascader/component/getIcons.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,IAAI,MAAM,eAAe,CAAA;AAIhC,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAS,EACT,SAAS,EACT,YAAY,GAYb;IACC,aAAa;IACb,MAAM,eAAe,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,oBAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,QAAQ,GAAG,CAAA;IAEhF,2BAA2B;IAC3B,MAAM,iBAAiB,GAAG,CAAC,SAAqB,EAAE,EAAE,CAAC,CACnD;QACG,SAAS,KAAK,KAAK,IAAI,SAAS;QAChC,WAAW,IAAI,YAAY,CAC3B,CACJ,CAAA;IAED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icon from '../../../icon'\n\ntype RenderNode = React.ReactNode | ((props: any) => React.ReactNode)\n\nexport default function getIcons({\n suffixIcon,\n clearIcon,\n menuItemSelectedIcon,\n removeIcon,\n loading,\n multiple,\n hasFeedback,\n prefixCls,\n showArrow,\n feedbackIcon,\n}: {\n suffixIcon?: React.ReactNode\n clearIcon?: RenderNode\n menuItemSelectedIcon?: RenderNode\n removeIcon?: RenderNode\n loading?: boolean\n multiple?: boolean\n hasFeedback?: boolean\n feedbackIcon?: ReactNode\n prefixCls: string\n showArrow?: boolean\n}) {\n // Clear Icon\n const mergedClearIcon = clearIcon ?? <Icon type=\"close-circle\" theme=\"filled\" />\n\n // Validation Feedback Icon\n const getSuffixIconNode = (arrowIcon?: ReactNode) => (\n <>\n {showArrow !== false && arrowIcon}\n {hasFeedback && feedbackIcon}\n </>\n )\n\n // Arrow item icon\n let mergedSuffixIcon = null\n if (suffixIcon !== undefined) {\n mergedSuffixIcon = getSuffixIconNode(suffixIcon)\n } else if (loading) {\n mergedSuffixIcon = getSuffixIconNode(<Icon type=\"loading\" />)\n } else {\n const iconCls = `${prefixCls}-suffix`\n mergedSuffixIcon = ({ open, showSearch }: { open: boolean; showSearch: boolean }) => {\n if (open && showSearch) {\n return null\n }\n return getSuffixIconNode(<Icon className={iconCls} type=\"down\" />)\n }\n }\n\n // Checked item icon\n let mergedItemIcon = null\n if (menuItemSelectedIcon !== undefined) {\n mergedItemIcon = menuItemSelectedIcon\n } else if (multiple) {\n mergedItemIcon = <Icon type=\"check\" />\n } else {\n mergedItemIcon = null\n }\n\n let mergedRemoveIcon = null\n if (removeIcon !== undefined) {\n mergedRemoveIcon = removeIcon\n } else {\n mergedRemoveIcon = <Icon type=\"close\" />\n }\n\n return {\n clearIcon: mergedClearIcon,\n suffixIcon: mergedSuffixIcon,\n itemIcon: mergedItemIcon,\n removeIcon: mergedRemoveIcon,\n }\n}\n"]}
|
|
@@ -1239,7 +1239,7 @@
|
|
|
1239
1239
|
|
|
1240
1240
|
.tntd-cascader-menu {
|
|
1241
1241
|
-ms-overflow-style: -ms-autohiding-scrollbar;
|
|
1242
|
-
border-right:
|
|
1242
|
+
border-right: 1px solid @grey-split;
|
|
1243
1243
|
flex-grow: 1;
|
|
1244
1244
|
height: 180px;
|
|
1245
1245
|
list-style: none;
|
|
@@ -1877,7 +1877,7 @@
|
|
|
1877
1877
|
|
|
1878
1878
|
.tntd-select:not(.tntd-select-customize-input) .tntd-select-selector {
|
|
1879
1879
|
background-color: @white;
|
|
1880
|
-
border:
|
|
1880
|
+
border: @border-width-base @border-style-base @select-border-color;
|
|
1881
1881
|
border-radius: @border-radius-base;
|
|
1882
1882
|
position: relative;
|
|
1883
1883
|
transition: all .3s cubic-bezier(.645, .045, .355, 1)
|
|
@@ -1969,7 +1969,7 @@
|
|
|
1969
1969
|
}
|
|
1970
1970
|
|
|
1971
1971
|
.tntd-select-selection-placeholder {
|
|
1972
|
-
color:
|
|
1972
|
+
color: @input-placeholder-color;;
|
|
1973
1973
|
flex: 1 1;
|
|
1974
1974
|
overflow: hidden;
|
|
1975
1975
|
pointer-events: none;
|
|
@@ -1990,7 +1990,7 @@
|
|
|
1990
1990
|
-moz-osx-font-smoothing: grayscale;
|
|
1991
1991
|
align-items: center;
|
|
1992
1992
|
color: inherit;
|
|
1993
|
-
color:
|
|
1993
|
+
color: @input-placeholder-color;
|
|
1994
1994
|
display: inline-block;
|
|
1995
1995
|
display: flex;
|
|
1996
1996
|
font-size: 12px;
|
|
@@ -2056,10 +2056,10 @@
|
|
|
2056
2056
|
font-style: normal;
|
|
2057
2057
|
height: 12px;
|
|
2058
2058
|
line-height: 1;
|
|
2059
|
-
margin-top: -
|
|
2059
|
+
margin-top: -7px;
|
|
2060
2060
|
opacity: 0;
|
|
2061
2061
|
position: absolute;
|
|
2062
|
-
right:
|
|
2062
|
+
right: 13px;
|
|
2063
2063
|
text-align: center;
|
|
2064
2064
|
text-rendering: auto;
|
|
2065
2065
|
text-transform: none;
|
|
@@ -1 +1 @@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nimport { get } from 'lodash'\nimport React, { useState } from 'react'\nimport styled from 'styled-components'\nimport Popover from '../popover'\nimport Iconfont from './Iconfont'\nimport { defaultLogo } from './images'\n\nconst App = styled.li`\n margin-left: 20px;\n font-size: 20px;\n cursor: pointer;\n .tnt-icon {\n color: #
|
|
1
|
+
{"version":3,"file":"Application.js","sourceRoot":"","sources":["../../src/tntd-layout/Application.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC9D,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAC5B,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,MAAM,MAAM,mBAAmB,CAAA;AACtC,OAAO,OAAO,MAAM,YAAY,CAAA;AAChC,OAAO,QAAQ,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAEtC,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;CAUpB,CAAA;AAED,MAAM,OAAO,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;CAKxB,CAAA;AAED,MAAM,OAAO,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BxB,CAAA;AAED,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAInC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,EAAE;IAC3B,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAA;IAC1C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAClD,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,EAAE;QAC3B,SAAS,CAAC,MAAM,CAAC,CAAA;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oBAAK,KAAK,EAAI,EAClC,OAAO,EAAC,OAAO;QAEf,oBAAC,QAAQ,IAAC,IAAI,EAAC,aAAa,GAAG,CACvB,CACN,CACP,CAAA","sourcesContent":["import { systemMap as applicationsMap } from '@tntx/logo-icon'\nimport cn from 'classnames'\nimport { get } from 'lodash'\nimport React, { useState } from 'react'\nimport styled from 'styled-components'\nimport Popover from '../popover'\nimport Iconfont from './Iconfont'\nimport { defaultLogo } from './images'\n\nconst App = styled.li`\n margin-left: 20px;\n font-size: 20px;\n cursor: pointer;\n .tnt-icon {\n color: #17233d;\n .tnt-themeS1 & {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n`\n\nconst AppList = styled.ul`\n list-style: none;\n width: 264px;\n margin: 0;\n padding: 0;\n`\n\nconst AppItem = styled.li`\n position: relative;\n width: 88px;\n padding: 8px 0;\n cursor: pointer;\n display: inline-block;\n text-align: center;\n &:hover,\n &.active {\n background: #eee;\n }\n &.active:after {\n position: absolute;\n width: 0;\n height: 0;\n border-width: 5px 10px 0 0;\n border-color: #333;\n border-style: solid;\n z-index: 9;\n }\n img {\n width: 44px;\n height: 44px;\n margin-bottom: 6px;\n }\n div {\n line-height: 20px;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n`\n\nconst AppContentWrapper = styled.div`\n background-color: #fff;\n border-radius: 4px;\n z-index: 1;\n`\n\nconst AppContent = (props) => {\n const { language, apps, onChange } = props\n const [appKey, setAppKey] = useState(props.appKey)\n const changeApp = (appKey) => {\n setAppKey(appKey)\n onChange && onChange(appKey)\n }\n\n return (\n <AppContentWrapper>\n <AppList>\n {apps\n .sort(\n (a, b) =>\n get(applicationsMap, `${a.appKey}.sort`, 1) -\n get(applicationsMap, `${b.appKey}.sort`, 1)\n )\n .map(({ appKey: key }) => (\n <AppItem\n key={key}\n className={cn({ active: appKey === key })}\n onClick={changeApp.bind(this, key)}\n >\n <img\n src={get(applicationsMap, `${key}.logo`, defaultLogo)}\n onError={(e) => {\n e.target.onerror = null\n e.target.src = defaultLogo\n }}\n />\n <div>\n {get(\n applicationsMap,\n `${key}.${\n {\n cn: 'name',\n en: 'enName',\n }[language || 'cn']\n }`,\n key\n )}\n </div>\n </AppItem>\n ))}\n </AppList>\n </AppContentWrapper>\n )\n}\n\nexport default (props) => (\n <App>\n <Popover\n placement=\"bottomRight\"\n title={null}\n content={<AppContent {...props} />}\n trigger=\"click\"\n >\n <Iconfont type=\"application\" />\n </Popover>\n </App>\n)\n"]}
|
package/lib/columns/index.less
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
.title-left {
|
|
27
27
|
float: left;
|
|
28
|
-
color:
|
|
28
|
+
color: @text-color;
|
|
29
29
|
font-size: 14px;
|
|
30
30
|
}
|
|
31
31
|
.title-extra {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
height: 48px;
|
|
50
50
|
line-height: 48px;
|
|
51
51
|
border-bottom: 1px solid #e1e6ee;
|
|
52
|
-
color:
|
|
52
|
+
color: @text-color;
|
|
53
53
|
font-size: 14px;
|
|
54
54
|
|
|
55
55
|
.tab-item {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
height: calc(~'100% - 48px');
|
|
71
71
|
padding: 10px 20px;
|
|
72
72
|
overflow-y: scroll;
|
|
73
|
-
color:
|
|
73
|
+
color: @text-color;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAIpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,KAAK,EAAE,EAAE,EAAE,EAAkC,MAAM,OAAO,CAAA;AA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C,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,CAAA;IACD,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,UAAU,CAAC,EAAE,aAAa,CAAA;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,aAAa,CAAC,EAAE,eAAe,CAAA;IAC/B,iBAAiB,CAAC,EAAE,eAAe,CAAA;IACnC,mBAAmB,EAAE,OAAO,CAAA;IAC5B,eAAe,CAAC,EAAE,EAAE,CAAA;IACpB,gBAAgB,EAAE,OAAO,CAAA;CAC1B;AAED,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,iBAAiB,CAmHxC,CAAA"}
|
package/lib/drawer/drawer.js
CHANGED
|
@@ -11,7 +11,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
var _utils = require("../utils");
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _button = require("../button");
|
|
14
|
-
|
|
14
|
+
require("../icon");
|
|
15
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -66,7 +66,7 @@ var Drawer = exports.Drawer = function Drawer(_a) {
|
|
|
66
66
|
_a$okType = _a.okType,
|
|
67
67
|
okType = _a$okType === void 0 ? 'primary' : _a$okType,
|
|
68
68
|
_a$cancelType = _a.cancelType,
|
|
69
|
-
cancelType = _a$cancelType === void 0 ? '
|
|
69
|
+
cancelType = _a$cancelType === void 0 ? 'tertiary' : _a$cancelType,
|
|
70
70
|
_a$confirmLoading = _a.confirmLoading,
|
|
71
71
|
confirmLoading = _a$confirmLoading === void 0 ? false : _a$confirmLoading,
|
|
72
72
|
_a$okButtonProps = _a.okButtonProps,
|
|
@@ -124,17 +124,13 @@ var Drawer = exports.Drawer = function Drawer(_a) {
|
|
|
124
124
|
drawerDom.current = event.target;
|
|
125
125
|
}
|
|
126
126
|
}, _react["default"].createElement(_drawer["default"], Object.assign({
|
|
127
|
-
className: (0, _classnames["default"])(prefixCls, 'tnt-drawer', className, _defineProperty(_defineProperty({}, "".concat(prefixCls, "-contain-closable"), closable !== false), "".concat(prefixCls, "-footer"), showFooter || footer)),
|
|
128
|
-
closable:
|
|
127
|
+
className: (0, _classnames["default"])(prefixCls, 'tnt-drawer', className, _defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-contain-closable"), closable !== false), "".concat(prefixCls, "-no-header"), closable === false && !title), "".concat(prefixCls, "-footer"), showFooter || footer)),
|
|
128
|
+
closable: closable,
|
|
129
129
|
onClose: _onCancel,
|
|
130
130
|
width: 480
|
|
131
131
|
}, rest, {
|
|
132
132
|
title: !unUpperConverted ? (0, _utils.doUpperTitle)(title, upperCaseIgnore) : title
|
|
133
|
-
}), _react["default"].createElement(_react["default"].Fragment, null,
|
|
134
|
-
type: "close",
|
|
135
|
-
className: "".concat(prefixCls, "-close"),
|
|
136
|
-
onClick: _onCancel
|
|
137
|
-
}), rest.children, (showFooter || footer) && _react["default"].createElement("div", {
|
|
133
|
+
}), _react["default"].createElement(_react["default"].Fragment, null, rest.children, (showFooter || footer) && _react["default"].createElement("div", {
|
|
138
134
|
className: "".concat(prefixCls, "-footer-style")
|
|
139
135
|
}, footer || _react["default"].createElement(DefaultFooter, {
|
|
140
136
|
confirmLoading: confirmLoading,
|
package/lib/drawer/drawer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAAwD;AAExD,4DAAsD;AACtD,4FAAmE;AACnE,4DAAmC;AAGnC,oCAAuC;AACvC,+CAAiE;AACjE,sCAAkC;AAClC,
|
|
1
|
+
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAAwD;AAExD,4DAAsD;AACtD,4FAAmE;AACnE,4DAAmC;AAGnC,oCAAuC;AACvC,+CAAiE;AACjE,sCAAkC;AAClC,mBAA0B;AAC1B,MAAM,aAAa,GAAG,CAAC,EACrB,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,MAAM,EACN,UAAU,EACV,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,UAAU,GAeX,EAAE,EAAE;IACH,OAAO,CACL;QACE,8BAAC,eAAM,kBAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,IAAI,U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IAAA,oBAAU,EAAC,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;wBACxD,CAAC,GAAG,SAAS,mBAAmB,CAAC,EAAE,QAAQ,KAAK,KAAK;wBACrD,CAAC,GAAG,SAAS,YAAY,CAAC,EAAE,QAAQ,KAAK,KAAK,IAAI,CAAC,KAAK;wBACxD,CAAC,GAAG,SAAS,SAAS,CAAC,EAAE,UAAU,IAAI,MAAM;qBAC9C,CAAC,EACF,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,GAAG,IACN,IAAI,IACR,KAAK,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAA,oBAAY,EAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,KAAK;oBAEvE;wBACG,IAAI,CAAC,QAAQ;wBACb,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,CACzB,uCAAK,SAAS,EAAE,GAAG,SAAS,eAAe,IACxC,MAAM,IAAI,CACT,8BAAC,aAAa,IACZ,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,iBAAiB,EACpC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,KAAK,EACX,QAAQ,EAAE,SAAS,GACnB,CACH,CACG,CACP,CACA,CACQ,CACT,CACP,CAAA;QACH,CAAC,CACc,CAClB,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAnHY,QAAA,MAAM,UAmHlB","sourcesContent":["import { ConfigConsumer } from 'antd/lib/config-provider'\nimport type { DrawerProps as AntdDrawerProps } from 'antd/lib/drawer'\nimport { default as AntdDrawer } from 'antd/lib/drawer'\nimport LocaleReceiver from 'antd/lib/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport type { BaseButtonProps } from 'antd/lib/button/button'\nimport type { TntButtonType } from '../button/button'\nimport { doUpperTitle } from '../utils'\nimport React, { FC, useCallback, useEffect, useRef } from 'react'\nimport { Button } from '../button'\nimport Icon from '../icon'\nconst DefaultFooter = ({\n locale,\n onCancel,\n onOk,\n okText,\n okType,\n cancelText,\n confirmLoading,\n okButtonProps,\n cancelButtonProps,\n cancelType,\n}: {\n locale?: {\n okText?: string\n cancelText?: string\n }\n onCancel?: () => void\n onOk?: () => void\n okText: string\n cancelText: string\n okType?: TntButtonType\n cancelType: TntButtonType\n confirmLoading?: boolean\n okButtonProps?: BaseButtonProps\n cancelButtonProps?: BaseButtonProps\n}) => {\n return (\n <>\n <Button onClick={onCancel} type={cancelType || 'tertiary'} {...cancelButtonProps}>\n {cancelText || locale?.cancelText}\n </Button>\n <Button onClick={onOk} type={okType || 'primary'} loading={confirmLoading} {...okButtonProps}>\n {okText || locale?.okText}\n </Button>\n </>\n )\n}\n\ninterface CustomDrawerProps extends AntdDrawerProps {\n footer?: React.ReactNode\n showFooter?: boolean\n onClose?: () => void\n onSubmit?: () => void\n onCancel?: () => void\n afterClose?: () => void\n onOk?: () => void\n okText?: string\n cancelText?: string\n locale?: {\n okText?: string\n cancelText?: string\n }\n okType?: TntButtonType\n cancelType?: TntButtonType\n confirmLoading?: boolean\n okButtonProps?: BaseButtonProps\n cancelButtonProps?: BaseButtonProps\n clickOnBlankToClose: boolean\n upperCaseIgnore?: []\n unUpperConverted: boolean\n}\n\nexport const Drawer: FC<CustomDrawerProps> = ({\n closable = true,\n className,\n footer,\n showFooter,\n onClose,\n afterClose,\n onSubmit,\n onCancel,\n onOk,\n okText = '',\n cancelText = '',\n locale,\n okType = 'primary',\n cancelType = 'tertiary',\n confirmLoading = false,\n okButtonProps = {},\n cancelButtonProps = {},\n clickOnBlankToClose = false,\n upperCaseIgnore,\n unUpperConverted,\n title,\n ...rest\n}) => {\n const drawerDom = React.useRef<EventTarget | null>(null)\n const _onCancel = useCallback(() => {\n if (onCancel) {\n onCancel()\n } else if (onClose) {\n onClose()\n }\n if (afterClose) {\n afterClose()\n }\n }, [onCancel, onClose, afterClose])\n const _onOk = onOk || onSubmit\n\n useEffect(() => {\n if (clickOnBlankToClose) {\n const handleOutsideClick = (event: Event) => {\n const drawer = drawerDom.current as Node\n const targetElement = event.target as Node\n\n let isInDrawer = false\n if (drawer && targetElement) {\n isInDrawer = drawer.contains(targetElement as Node) || targetElement === drawer\n }\n drawerDom.current = null\n if (rest.visible && !isInDrawer && _onCancel) {\n _onCancel()\n }\n }\n document.removeEventListener('click', handleOutsideClick)\n document.addEventListener('click', handleOutsideClick)\n return () => {\n document.removeEventListener('click', handleOutsideClick)\n }\n }\n }, [rest.visible, clickOnBlankToClose, _onCancel])\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('drawer')\n return (\n <LocaleReceiver componentName=\"Drawer\" defaultLocale={locale}>\n {(locale) => {\n return (\n <div\n onClick={(event: React.MouseEvent<HTMLDivElement>) => {\n drawerDom.current = event.target\n }}\n >\n <AntdDrawer\n className={classNames(prefixCls, 'tnt-drawer', className, {\n [`${prefixCls}-contain-closable`]: closable !== false,\n [`${prefixCls}-no-header`]: closable === false && !title,\n [`${prefixCls}-footer`]: showFooter || footer,\n })}\n closable={closable}\n onClose={_onCancel}\n width={480}\n {...rest}\n title={!unUpperConverted ? doUpperTitle(title, upperCaseIgnore) : title}\n >\n <>\n {rest.children}\n {(showFooter || footer) && (\n <div className={`${prefixCls}-footer-style`}>\n {footer || (\n <DefaultFooter\n confirmLoading={confirmLoading}\n okButtonProps={okButtonProps}\n cancelButtonProps={cancelButtonProps}\n okType={okType}\n locale={locale}\n okText={okText}\n cancelType={cancelType}\n cancelText={cancelText}\n onOk={_onOk}\n onCancel={_onCancel}\n />\n )}\n </div>\n )}\n </>\n </AntdDrawer>\n </div>\n )\n }}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n )\n}\n"]}
|
package/lib/drawer/index.less
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@drawer-prefix-cls: ~'@{ant-prefix}-drawer';
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
.tnt-drawer.@{drawer-prefix-cls} {
|
|
5
4
|
&-top {
|
|
6
5
|
.@{drawer-prefix-cls}-wrapper-body {
|
|
@@ -23,6 +22,20 @@
|
|
|
23
22
|
max-height: ~'calc(100vh - 48px)';
|
|
24
23
|
}
|
|
25
24
|
|
|
25
|
+
&.@{drawer-prefix-cls}-no-header {
|
|
26
|
+
.@{drawer-prefix-cls}-wrapper-body{
|
|
27
|
+
margin-top: 0;
|
|
28
|
+
max-height: ~'calc(100vh)';
|
|
29
|
+
}
|
|
30
|
+
&.@{drawer-prefix-cls}-footer{
|
|
31
|
+
.@{drawer-prefix-cls}-wrapper-body{
|
|
32
|
+
margin-top:0 !important;
|
|
33
|
+
max-height: ~'calc(100vh - 48px)' !important;
|
|
34
|
+
margin-bottom: 48px !important;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
26
39
|
&-footer {
|
|
27
40
|
.@{drawer-prefix-cls}-header {
|
|
28
41
|
// border-bottom: none;
|
|
@@ -38,7 +51,6 @@
|
|
|
38
51
|
margin-top: 48px !important;
|
|
39
52
|
margin-bottom: 48px !important;
|
|
40
53
|
}
|
|
41
|
-
|
|
42
54
|
}
|
|
43
55
|
|
|
44
56
|
.@{drawer-prefix-cls}-title {
|
|
@@ -59,7 +71,7 @@
|
|
|
59
71
|
font-weight: 700;
|
|
60
72
|
font-size: 20px;
|
|
61
73
|
font-style: normal;
|
|
62
|
-
line-height:
|
|
74
|
+
line-height: 48px;
|
|
63
75
|
text-align: center;
|
|
64
76
|
text-transform: none;
|
|
65
77
|
text-decoration: none;
|
|
@@ -69,10 +81,13 @@
|
|
|
69
81
|
cursor: pointer;
|
|
70
82
|
transition: color 0.3s;
|
|
71
83
|
text-rendering: auto;
|
|
84
|
+
i.tntd-anticon{
|
|
85
|
+
font-size:20px;
|
|
86
|
+
}
|
|
72
87
|
}
|
|
73
88
|
|
|
74
89
|
|
|
75
|
-
|
|
90
|
+
&.@{drawer-prefix-cls}-contain-closable {
|
|
76
91
|
.@{drawer-prefix-cls}-header {
|
|
77
92
|
padding: 12px 36px 12px 20px;
|
|
78
93
|
}
|
|
@@ -148,6 +163,21 @@
|
|
|
148
163
|
.@{ant-prefix}-btn {
|
|
149
164
|
margin-left: 16px;
|
|
150
165
|
}
|
|
166
|
+
|
|
167
|
+
// 如果button没有type类型默认设置为 type: tertiary的样式(兼容老业务用了footer的场景)
|
|
168
|
+
button:not([class*="ant-btn-"]):not([class*="tnt-btn-"]) {
|
|
169
|
+
color: #17233d;
|
|
170
|
+
background-color: #f8f9fb;
|
|
171
|
+
border-color: #f8f9fb;
|
|
172
|
+
text-shadow: none;
|
|
173
|
+
box-shadow: none;
|
|
174
|
+
|
|
175
|
+
&:hover{
|
|
176
|
+
color: var(--blue-6);
|
|
177
|
+
background-color: #f0f5ff;
|
|
178
|
+
border-color: #f0f5ff;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
151
181
|
}
|
|
152
182
|
|
|
153
183
|
}
|
package/lib/modal/index.less
CHANGED
|
@@ -106,7 +106,21 @@
|
|
|
106
106
|
border-radius: 0 0 @border-radius-base @border-radius-base;
|
|
107
107
|
button + button {
|
|
108
108
|
margin-bottom: 0;
|
|
109
|
-
margin-left: @margin-
|
|
109
|
+
margin-left: @margin-base;
|
|
110
|
+
}
|
|
111
|
+
// 如果button没有type类型默认设置为type: tertiary的样式(兼容老业务用了footer的场景)
|
|
112
|
+
button:not([class*="ant-btn-"]):not([class*="tnt-btn-"]) {
|
|
113
|
+
color: #17233d;
|
|
114
|
+
background-color: #f8f9fb;
|
|
115
|
+
border-color: #f8f9fb;
|
|
116
|
+
text-shadow: none;
|
|
117
|
+
box-shadow: none;
|
|
118
|
+
|
|
119
|
+
&:hover{
|
|
120
|
+
color: var(--blue-6);
|
|
121
|
+
background-color: #f0f5ff;
|
|
122
|
+
border-color: #f0f5ff;
|
|
123
|
+
}
|
|
110
124
|
}
|
|
111
125
|
}
|
|
112
126
|
|
package/lib/title/index.less
CHANGED
|
@@ -80,7 +80,6 @@
|
|
|
80
80
|
top: 45%;
|
|
81
81
|
left: 58%;
|
|
82
82
|
transform: rotate(-45deg);
|
|
83
|
-
-webkit-transform: rotate(-45deg);
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
85
|
&.small {
|
|
@@ -93,8 +92,8 @@
|
|
|
93
92
|
font-size: 14px;
|
|
94
93
|
}
|
|
95
94
|
&::before {
|
|
96
|
-
height:
|
|
97
|
-
top:
|
|
95
|
+
height: 12px;
|
|
96
|
+
top: 8px;
|
|
98
97
|
}
|
|
99
98
|
}
|
|
100
99
|
}
|
|
@@ -108,8 +107,8 @@
|
|
|
108
107
|
font-size: 18px;
|
|
109
108
|
}
|
|
110
109
|
&::before {
|
|
111
|
-
height:
|
|
112
|
-
top:
|
|
110
|
+
height: 14px;
|
|
111
|
+
top: 10px;
|
|
113
112
|
}
|
|
114
113
|
}
|
|
115
114
|
}
|
|
@@ -123,8 +122,8 @@
|
|
|
123
122
|
font-size: 20px;
|
|
124
123
|
}
|
|
125
124
|
&::before {
|
|
126
|
-
height:
|
|
127
|
-
top:
|
|
125
|
+
height: 16px;
|
|
126
|
+
top: 10px;
|
|
128
127
|
}
|
|
129
128
|
}
|
|
130
129
|
}
|
|
@@ -135,7 +134,7 @@
|
|
|
135
134
|
}
|
|
136
135
|
h3 {
|
|
137
136
|
font-size: 16px;
|
|
138
|
-
color:
|
|
137
|
+
color: @text-color;
|
|
139
138
|
font-weight: normal;
|
|
140
139
|
margin: 0;
|
|
141
140
|
margin-right: 10px;
|
|
@@ -153,12 +152,13 @@
|
|
|
153
152
|
&::before {
|
|
154
153
|
position: absolute;
|
|
155
154
|
left: 0;
|
|
156
|
-
top:
|
|
157
|
-
background-color:
|
|
155
|
+
top: 9px;
|
|
156
|
+
background-color: @primary-color;
|
|
158
157
|
content: '';
|
|
159
|
-
width:
|
|
160
|
-
height:
|
|
158
|
+
width: 4px;
|
|
159
|
+
height: 12px;
|
|
161
160
|
margin-right: 8px;
|
|
161
|
+
border-radius: 2px;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
.tntd-title-extra {
|
|
@@ -17,7 +17,7 @@ export default function getIcons({ suffixIcon, clearIcon, menuItemSelectedIcon,
|
|
|
17
17
|
suffixIcon: React.JSX.Element | (({ open, showSearch }: {
|
|
18
18
|
open: boolean;
|
|
19
19
|
showSearch: boolean;
|
|
20
|
-
}) => React.JSX.Element);
|
|
20
|
+
}) => React.JSX.Element | null);
|
|
21
21
|
itemIcon: {} | null;
|
|
22
22
|
removeIcon: {} | null;
|
|
23
23
|
};
|
|
@@ -44,10 +44,7 @@ function getIcons(_ref) {
|
|
|
44
44
|
var open = _ref2.open,
|
|
45
45
|
showSearch = _ref2.showSearch;
|
|
46
46
|
if (open && showSearch) {
|
|
47
|
-
return
|
|
48
|
-
className: iconCls,
|
|
49
|
-
type: "search"
|
|
50
|
-
}));
|
|
47
|
+
return null;
|
|
51
48
|
}
|
|
52
49
|
return getSuffixIconNode(React.createElement(_icon["default"], {
|
|
53
50
|
className: iconCls,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIcons.js","sourceRoot":"","sources":["../../../../src/tntd-cascader/AntdCascader/component/getIcons.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAA8B;AAC9B,yDAAgC;AAIhC,SAAwB,QAAQ,CAAC,EAC/B,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAS,EACT,SAAS,EACT,YAAY,GAYb;IACC,aAAa;IACb,MAAM,eAAe,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,oBAAC,cAAI,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,QAAQ,GAAG,CAAA;IAEhF,2BAA2B;IAC3B,MAAM,iBAAiB,GAAG,CAAC,SAAqB,EAAE,EAAE,CAAC,CACnD;QACG,SAAS,KAAK,KAAK,IAAI,SAAS;QAChC,WAAW,IAAI,YAAY,CAC3B,CACJ,CAAA;IAED,kBAAkB;IAClB,IAAI,gBAAgB,GAAG,IAAI,CAAA;IAC3B,IAAI,UAAU,KAAK,SAAS,EAAE;QAC5B,gBAAgB,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAA;KACjD;SAAM,IAAI,OAAO,EAAE;QAClB,gBAAgB,GAAG,iBAAiB,CAAC,oBAAC,cAAI,IAAC,IAAI,EAAC,SAAS,GAAG,CAAC,CAAA;KAC9D;SAAM;QACL,MAAM,OAAO,GAAG,GAAG,SAAS,SAAS,CAAA;QACrC,gBAAgB,GAAG,CAAC,EAAE,IAAI,EAAE,UAAU,EAA0C,EAAE,EAAE;YAClF,IAAI,IAAI,IAAI,UAAU,EAAE;gBACtB,OAAO,
|
|
1
|
+
{"version":3,"file":"getIcons.js","sourceRoot":"","sources":["../../../../src/tntd-cascader/AntdCascader/component/getIcons.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAA8B;AAC9B,yDAAgC;AAIhC,SAAwB,QAAQ,CAAC,EAC/B,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAS,EACT,SAAS,EACT,YAAY,GAYb;IACC,aAAa;IACb,MAAM,eAAe,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,oBAAC,cAAI,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,QAAQ,GAAG,CAAA;IAEhF,2BAA2B;IAC3B,MAAM,iBAAiB,GAAG,CAAC,SAAqB,EAAE,EAAE,CAAC,CACnD;QACG,SAAS,KAAK,KAAK,IAAI,SAAS;QAChC,WAAW,IAAI,YAAY,CAC3B,CACJ,CAAA;IAED,kBA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'react'\nimport Icon from '../../../icon'\n\ntype RenderNode = React.ReactNode | ((props: any) => React.ReactNode)\n\nexport default function getIcons({\n suffixIcon,\n clearIcon,\n menuItemSelectedIcon,\n removeIcon,\n loading,\n multiple,\n hasFeedback,\n prefixCls,\n showArrow,\n feedbackIcon,\n}: {\n suffixIcon?: React.ReactNode\n clearIcon?: RenderNode\n menuItemSelectedIcon?: RenderNode\n removeIcon?: RenderNode\n loading?: boolean\n multiple?: boolean\n hasFeedback?: boolean\n feedbackIcon?: ReactNode\n prefixCls: string\n showArrow?: boolean\n}) {\n // Clear Icon\n const mergedClearIcon = clearIcon ?? <Icon type=\"close-circle\" theme=\"filled\" />\n\n // Validation Feedback Icon\n const getSuffixIconNode = (arrowIcon?: ReactNode) => (\n <>\n {showArrow !== false && arrowIcon}\n {hasFeedback && feedbackIcon}\n </>\n )\n\n // Arrow item icon\n let mergedSuffixIcon = null\n if (suffixIcon !== undefined) {\n mergedSuffixIcon = getSuffixIconNode(suffixIcon)\n } else if (loading) {\n mergedSuffixIcon = getSuffixIconNode(<Icon type=\"loading\" />)\n } else {\n const iconCls = `${prefixCls}-suffix`\n mergedSuffixIcon = ({ open, showSearch }: { open: boolean; showSearch: boolean }) => {\n if (open && showSearch) {\n return null\n }\n return getSuffixIconNode(<Icon className={iconCls} type=\"down\" />)\n }\n }\n\n // Checked item icon\n let mergedItemIcon = null\n if (menuItemSelectedIcon !== undefined) {\n mergedItemIcon = menuItemSelectedIcon\n } else if (multiple) {\n mergedItemIcon = <Icon type=\"check\" />\n } else {\n mergedItemIcon = null\n }\n\n let mergedRemoveIcon = null\n if (removeIcon !== undefined) {\n mergedRemoveIcon = removeIcon\n } else {\n mergedRemoveIcon = <Icon type=\"close\" />\n }\n\n return {\n clearIcon: mergedClearIcon,\n suffixIcon: mergedSuffixIcon,\n itemIcon: mergedItemIcon,\n removeIcon: mergedRemoveIcon,\n }\n}\n"]}
|
|
@@ -1239,7 +1239,7 @@
|
|
|
1239
1239
|
|
|
1240
1240
|
.tntd-cascader-menu {
|
|
1241
1241
|
-ms-overflow-style: -ms-autohiding-scrollbar;
|
|
1242
|
-
border-right:
|
|
1242
|
+
border-right: 1px solid @grey-split;
|
|
1243
1243
|
flex-grow: 1;
|
|
1244
1244
|
height: 180px;
|
|
1245
1245
|
list-style: none;
|
|
@@ -1877,7 +1877,7 @@
|
|
|
1877
1877
|
|
|
1878
1878
|
.tntd-select:not(.tntd-select-customize-input) .tntd-select-selector {
|
|
1879
1879
|
background-color: @white;
|
|
1880
|
-
border:
|
|
1880
|
+
border: @border-width-base @border-style-base @select-border-color;
|
|
1881
1881
|
border-radius: @border-radius-base;
|
|
1882
1882
|
position: relative;
|
|
1883
1883
|
transition: all .3s cubic-bezier(.645, .045, .355, 1)
|
|
@@ -1969,7 +1969,7 @@
|
|
|
1969
1969
|
}
|
|
1970
1970
|
|
|
1971
1971
|
.tntd-select-selection-placeholder {
|
|
1972
|
-
color:
|
|
1972
|
+
color: @input-placeholder-color;;
|
|
1973
1973
|
flex: 1 1;
|
|
1974
1974
|
overflow: hidden;
|
|
1975
1975
|
pointer-events: none;
|
|
@@ -1990,7 +1990,7 @@
|
|
|
1990
1990
|
-moz-osx-font-smoothing: grayscale;
|
|
1991
1991
|
align-items: center;
|
|
1992
1992
|
color: inherit;
|
|
1993
|
-
color:
|
|
1993
|
+
color: @input-placeholder-color;
|
|
1994
1994
|
display: inline-block;
|
|
1995
1995
|
display: flex;
|
|
1996
1996
|
font-size: 12px;
|
|
@@ -2056,10 +2056,10 @@
|
|
|
2056
2056
|
font-style: normal;
|
|
2057
2057
|
height: 12px;
|
|
2058
2058
|
line-height: 1;
|
|
2059
|
-
margin-top: -
|
|
2059
|
+
margin-top: -7px;
|
|
2060
2060
|
opacity: 0;
|
|
2061
2061
|
position: absolute;
|
|
2062
|
-
right:
|
|
2062
|
+
right: 13px;
|
|
2063
2063
|
text-align: center;
|
|
2064
2064
|
text-rendering: auto;
|
|
2065
2065
|
text-transform: none;
|
|
@@ -28,7 +28,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
28
28
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
29
29
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
30
30
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
31
|
-
var App = _styledComponents["default"].li(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-left: 20px;\n font-size: 20px;\n cursor: pointer;\n .tnt-icon {\n color: #
|
|
31
|
+
var App = _styledComponents["default"].li(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-left: 20px;\n font-size: 20px;\n cursor: pointer;\n .tnt-icon {\n color: #17233d;\n .tnt-themeS1 & {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n"])));
|
|
32
32
|
var AppList = _styledComponents["default"].ul(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n list-style: none;\n width: 264px;\n margin: 0;\n padding: 0;\n"])));
|
|
33
33
|
var AppItem = _styledComponents["default"].li(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n width: 88px;\n padding: 8px 0;\n cursor: pointer;\n display: inline-block;\n text-align: center;\n &:hover,\n &.active {\n background: #eee;\n }\n &.active:after {\n position: absolute;\n width: 0;\n height: 0;\n border-width: 5px 10px 0 0;\n border-color: #333;\n border-style: solid;\n z-index: 9;\n }\n img {\n width: 44px;\n height: 44px;\n margin-bottom: 6px;\n }\n div {\n line-height: 20px;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n"])));
|
|
34
34
|
var AppContentWrapper = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: #fff;\n border-radius: 4px;\n z-index: 1;\n"])));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Application.js","sourceRoot":"","sources":["../../src/tntd-layout/Application.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA8D;AAC9D,4DAA2B;AAC3B,mCAA4B;AAC5B,+CAAuC;AACvC,0EAAsC;AACtC,yDAAgC;AAChC,0DAAiC;AACjC,qCAAsC;AAEtC,MAAM,GAAG,GAAG,2BAAM,CAAC,EAAE,CAAA;;;;;;;;;;CAUpB,CAAA;AAED,MAAM,OAAO,GAAG,2BAAM,CAAC,EAAE,CAAA;;;;;CAKxB,CAAA;AAED,MAAM,OAAO,GAAG,2BAAM,CAAC,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BxB,CAAA;AAED,MAAM,iBAAiB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;CAInC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,EAAE;IAC3B,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAA;IAC1C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAClD,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,EAAE;QAC3B,SAAS,CAAC,MAAM,CAAC,CAAA;QACjB,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAA;IAC9B,CAAC,CAAA;IAED,OAAO,CACL,8BAAC,iBAAiB;QAChB,8BAAC,OAAO,QACL,IAAI;aACF,IAAI,CACH,CAAC,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AAA","sourcesContent":["import { systemMap as applicationsMap } from '@tntx/logo-icon'\nimport cn from 'classnames'\nimport { get } from 'lodash'\nimport React, { useState } from 'react'\nimport styled from 'styled-components'\nimport Popover from '../popover'\nimport Iconfont from './Iconfont'\nimport { defaultLogo } from './images'\n\nconst App = styled.li`\n margin-left: 20px;\n font-size: 20px;\n cursor: pointer;\n .tnt-icon {\n color: #
|
|
1
|
+
{"version":3,"file":"Application.js","sourceRoot":"","sources":["../../src/tntd-layout/Application.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA8D;AAC9D,4DAA2B;AAC3B,mCAA4B;AAC5B,+CAAuC;AACvC,0EAAsC;AACtC,yDAAgC;AAChC,0DAAiC;AACjC,qCAAsC;AAEtC,MAAM,GAAG,GAAG,2BAAM,CAAC,EAAE,CAAA;;;;;;;;;;CAUpB,CAAA;AAED,MAAM,OAAO,GAAG,2BAAM,CAAC,EAAE,CAAA;;;;;CAKxB,CAAA;AAED,MAAM,OAAO,GAAG,2BAAM,CAAC,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BxB,CAAA;AAED,MAAM,iBAAiB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;CAInC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,EAAE;IAC3B,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAA;IAC1C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAClD,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,EAAE;QAC3B,SAAS,CAAC,MAAM,CAAC,CAAA;QACjB,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAA;IAC9B,CAAC,CAAA;IAED,OAAO,CACL,8BAAC,iBAAiB;QAChB,8BAAC,OAAO,QACL,IAAI;aACF,IAAI,CACH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,CACP,CAAA","sourcesContent":["import { systemMap as applicationsMap } from '@tntx/logo-icon'\nimport cn from 'classnames'\nimport { get } from 'lodash'\nimport React, { useState } from 'react'\nimport styled from 'styled-components'\nimport Popover from '../popover'\nimport Iconfont from './Iconfont'\nimport { defaultLogo } from './images'\n\nconst App = styled.li`\n margin-left: 20px;\n font-size: 20px;\n cursor: pointer;\n .tnt-icon {\n color: #17233d;\n .tnt-themeS1 & {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n`\n\nconst AppList = styled.ul`\n list-style: none;\n width: 264px;\n margin: 0;\n padding: 0;\n`\n\nconst AppItem = styled.li`\n position: relative;\n width: 88px;\n padding: 8px 0;\n cursor: pointer;\n display: inline-block;\n text-align: center;\n &:hover,\n &.active {\n background: #eee;\n }\n &.active:after {\n position: absolute;\n width: 0;\n height: 0;\n border-width: 5px 10px 0 0;\n border-color: #333;\n border-style: solid;\n z-index: 9;\n }\n img {\n width: 44px;\n height: 44px;\n margin-bottom: 6px;\n }\n div {\n line-height: 20px;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n`\n\nconst AppContentWrapper = styled.div`\n background-color: #fff;\n border-radius: 4px;\n z-index: 1;\n`\n\nconst AppContent = (props) => {\n const { language, apps, onChange } = props\n const [appKey, setAppKey] = useState(props.appKey)\n const changeApp = (appKey) => {\n setAppKey(appKey)\n onChange && onChange(appKey)\n }\n\n return (\n <AppContentWrapper>\n <AppList>\n {apps\n .sort(\n (a, b) =>\n get(applicationsMap, `${a.appKey}.sort`, 1) -\n get(applicationsMap, `${b.appKey}.sort`, 1)\n )\n .map(({ appKey: key }) => (\n <AppItem\n key={key}\n className={cn({ active: appKey === key })}\n onClick={changeApp.bind(this, key)}\n >\n <img\n src={get(applicationsMap, `${key}.logo`, defaultLogo)}\n onError={(e) => {\n e.target.onerror = null\n e.target.src = defaultLogo\n }}\n />\n <div>\n {get(\n applicationsMap,\n `${key}.${\n {\n cn: 'name',\n en: 'enName',\n }[language || 'cn']\n }`,\n key\n )}\n </div>\n </AppItem>\n ))}\n </AppList>\n </AppContentWrapper>\n )\n}\n\nexport default (props) => (\n <App>\n <Popover\n placement=\"bottomRight\"\n title={null}\n content={<AppContent {...props} />}\n trigger=\"click\"\n >\n <Iconfont type=\"application\" />\n </Popover>\n </App>\n)\n"]}
|