forstok-ui-lib 6.7.5 → 6.7.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/dist/index.d.ts +2 -1
- package/dist/index.js +157 -157
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +148 -148
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/button/styles.ts +26 -0
- package/src/components/image/channel.tsx +17 -5
package/package.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import { buttonActiveStyle, buttonHoverStyle, buttonStyle } from '../../assets';
|
|
3
|
+
import IconAgent from '../../assets/images/icons/agent.svg'
|
|
4
|
+
import IconReport from '../../assets/images/icons/report.svg'
|
|
3
5
|
|
|
4
6
|
const IconStyles = css`
|
|
5
7
|
display: inline-block;
|
|
@@ -256,6 +258,30 @@ const getButtonModifiedStyled = ({ $mode, $isIndicatorArrow, $isShown, $isLoadin
|
|
|
256
258
|
font-size: 16px;
|
|
257
259
|
}
|
|
258
260
|
`
|
|
261
|
+
} else if ($iconLeft === 'agent') {
|
|
262
|
+
style += `
|
|
263
|
+
&:before {
|
|
264
|
+
content: url(${IconAgent});
|
|
265
|
+
position: absolute;
|
|
266
|
+
left: 12px;
|
|
267
|
+
top: 50%;
|
|
268
|
+
margin-top: -8px;
|
|
269
|
+
width: 14px;
|
|
270
|
+
height: 16px;
|
|
271
|
+
}
|
|
272
|
+
`
|
|
273
|
+
} else if ($iconLeft === 'report') {
|
|
274
|
+
style += `
|
|
275
|
+
&:before {
|
|
276
|
+
content: url(${IconReport});
|
|
277
|
+
position: absolute;
|
|
278
|
+
left: 12px;
|
|
279
|
+
top: 50%;
|
|
280
|
+
margin-top: -8px;
|
|
281
|
+
width: 14px;
|
|
282
|
+
height: 16px;
|
|
283
|
+
}
|
|
284
|
+
`
|
|
259
285
|
}
|
|
260
286
|
}
|
|
261
287
|
if ($isIndicatorArrow) {
|
|
@@ -4,7 +4,7 @@ import { InitialContainer, APILabel } from '../../assets/stylesheets/shares.styl
|
|
|
4
4
|
|
|
5
5
|
import { ImageMode } from './type'
|
|
6
6
|
|
|
7
|
-
const ImageChannelComponent = ({ data, label, size, isImageOnly, $mode }:{ data?: any, label?: string, size?: string, isImageOnly?: boolean, $mode?: ImageMode }) => {
|
|
7
|
+
const ImageChannelComponent = ({ data, label, size, isImageOnly, $mode, $isPhone }:{ data?: any, label?: string, size?: string, isImageOnly?: boolean, $mode?: ImageMode, $isPhone?: boolean }) => {
|
|
8
8
|
const fontSize = size ? ((parseInt(size) / 2) > 10 ? (parseInt(size) / 2) : 10) : 10
|
|
9
9
|
const defSize = size || '20px'
|
|
10
10
|
|
|
@@ -18,6 +18,7 @@ const ImageChannelComponent = ({ data, label, size, isImageOnly, $mode }:{ data?
|
|
|
18
18
|
const defSrc = data?.icon || data?.imageUrl || data?.channelImage || data?.channel_image || ''
|
|
19
19
|
const defColor = data?.color || data?.channelColor || data?.channel_color || '#ooo'
|
|
20
20
|
const defInitial = data?.channelInitials || data?.channelInitial || data?.channel_initials || data?.initials || ''
|
|
21
|
+
const defPhone = data?.phone || data?.storeId || '-'
|
|
21
22
|
const isAPI = data?.availableAPI
|
|
22
23
|
|
|
23
24
|
return (
|
|
@@ -50,10 +51,21 @@ const ImageChannelComponent = ({ data, label, size, isImageOnly, $mode }:{ data?
|
|
|
50
51
|
)}
|
|
51
52
|
</div>
|
|
52
53
|
{!isImageOnly && (
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
$isPhone ? (
|
|
55
|
+
<>
|
|
56
|
+
<span className='multi-elipsis' title={defName}>
|
|
57
|
+
{defName}
|
|
58
|
+
</span>
|
|
59
|
+
<aside className='multi-elipsis' title={defPhone}>
|
|
60
|
+
{defPhone}
|
|
61
|
+
</aside>
|
|
62
|
+
</>
|
|
63
|
+
) : (
|
|
64
|
+
<span className='multi-elipsis' title={defName}>
|
|
65
|
+
{defName}
|
|
66
|
+
{isAPI && <APILabel className='_refLabel'>API</APILabel>}
|
|
67
|
+
</span>
|
|
68
|
+
)
|
|
57
69
|
)}
|
|
58
70
|
</>
|
|
59
71
|
)
|