forstok-ui-lib 5.1.15 → 5.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +8 -1
- package/dist/index.js +50 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +118 -85
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
- package/src/assets/images/icons/alert.svg +10 -0
- package/src/assets/stylesheets/shares.styles.ts +79 -1
- package/src/components/icon/styles.ts +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forstok-ui-lib",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.2",
|
|
4
4
|
"description": "Forstok UI Components Library",
|
|
5
5
|
"path": "dist",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
11
|
"build": "rollup -c --bundleConfigAsCjs",
|
|
12
|
-
"
|
|
12
|
+
"patch": "npm run build && npm version patch && npm publish",
|
|
13
|
+
"master": "git add . && git commit -m 'patch' && git push origin master"
|
|
13
14
|
},
|
|
14
15
|
"repository": {
|
|
15
16
|
"type": "git",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
|
|
3
|
+
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
4
|
+
<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<g id="style=fill">
|
|
6
|
+
<g id="warning-circle">
|
|
7
|
+
<path id="Subtract" fill-rule="evenodd" clip-rule="evenodd" d="M1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12ZM12 6.25C12.4142 6.25 12.75 6.58579 12.75 7L12.75 14.1046C12.75 14.5189 12.4142 14.8547 12 14.8547C11.5858 14.8547 11.25 14.5189 11.25 14.1047L11.25 7C11.25 6.58579 11.5858 6.25 12 6.25ZM12 16C11.4477 16 11 16.4477 11 17C11 17.5523 11.4477 18 12 18L12.01 18C12.5623 18 13.01 17.5523 13.01 17C13.01 16.4477 12.5623 16 12.01 16L12 16Z" fill="#fc5c64"/>
|
|
8
|
+
</g>
|
|
9
|
+
</g>
|
|
10
|
+
</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import { responseWidth} from './bases.styles';
|
|
2
|
+
import { responseWidth, formLabel} from './bases.styles';
|
|
3
3
|
|
|
4
4
|
const getTabsContentModFunc = ({ $mode }:{ $mode?: string }) => {
|
|
5
5
|
let style = ``
|
|
@@ -20,6 +20,46 @@ const getTabsContentModFunc = ({ $mode }:{ $mode?: string }) => {
|
|
|
20
20
|
}
|
|
21
21
|
return style
|
|
22
22
|
}
|
|
23
|
+
const getInputGroupModFunc = ({ $mode, $required }:{ $mode?: string, $required?: boolean }) => {
|
|
24
|
+
let style = ``
|
|
25
|
+
if ($mode === 'column') {
|
|
26
|
+
style +=`
|
|
27
|
+
display: grid;
|
|
28
|
+
grid-auto-flow: column;
|
|
29
|
+
grid-template-columns: 1.1fr 2fr;
|
|
30
|
+
align-items: baseline;
|
|
31
|
+
grid-gap: 10px;
|
|
32
|
+
> label, > aside {
|
|
33
|
+
padding: 0;
|
|
34
|
+
margin: 0;
|
|
35
|
+
}
|
|
36
|
+
`
|
|
37
|
+
} else if ($mode === 'column-product') {
|
|
38
|
+
style +=`
|
|
39
|
+
> div {
|
|
40
|
+
display: grid;
|
|
41
|
+
grid-auto-flow: column;
|
|
42
|
+
grid-template-columns: max-content auto;
|
|
43
|
+
grid-gap: 10px;
|
|
44
|
+
${MuteLabel} {
|
|
45
|
+
display: grid;
|
|
46
|
+
align-items: center;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
`
|
|
50
|
+
}
|
|
51
|
+
if ($required) {
|
|
52
|
+
style +=`
|
|
53
|
+
> label, > aside {
|
|
54
|
+
&:after {
|
|
55
|
+
content: '*';
|
|
56
|
+
color: red;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
`
|
|
60
|
+
}
|
|
61
|
+
return style
|
|
62
|
+
}
|
|
23
63
|
|
|
24
64
|
export const PanelContainer = styled.section`
|
|
25
65
|
position: relative;
|
|
@@ -166,4 +206,42 @@ export const InfoGroup = styled.div`
|
|
|
166
206
|
overflow-wrap: break-word;
|
|
167
207
|
word-break: break-word;
|
|
168
208
|
}
|
|
209
|
+
`
|
|
210
|
+
export const MuteLabel = styled.span<{ $size?: string }>`
|
|
211
|
+
color: var(--mt-clr);
|
|
212
|
+
font-size: 12px;
|
|
213
|
+
word-break: break-all;
|
|
214
|
+
&._refWithIcon {
|
|
215
|
+
display: grid;
|
|
216
|
+
grid-auto-flow: column;
|
|
217
|
+
justify-content: start;
|
|
218
|
+
grid-gap: 4px;
|
|
219
|
+
* {
|
|
220
|
+
margin-right: 0;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
${({ $size }:{ $size?: string }) => {
|
|
224
|
+
if ($size === 'medium')
|
|
225
|
+
return css`
|
|
226
|
+
font-size: 13px;
|
|
227
|
+
line-height: 12px;
|
|
228
|
+
* {
|
|
229
|
+
margin-right: 4px;
|
|
230
|
+
}
|
|
231
|
+
`
|
|
232
|
+
}}
|
|
233
|
+
`
|
|
234
|
+
export const InputGroup = styled.article<{ $mode?: string, $required?: boolean }>`
|
|
235
|
+
> label,
|
|
236
|
+
> aside {
|
|
237
|
+
${formLabel}
|
|
238
|
+
margin-bottom: 6px;
|
|
239
|
+
padding: 0 6px;
|
|
240
|
+
display: block;
|
|
241
|
+
font-size: 14px;
|
|
242
|
+
}
|
|
243
|
+
> div {
|
|
244
|
+
display: grid;
|
|
245
|
+
}
|
|
246
|
+
${getInputGroupModFunc}
|
|
169
247
|
`
|
|
@@ -19,6 +19,7 @@ import IconSuccess from '../../assets/images/icons/success.svg';
|
|
|
19
19
|
import IconEmail from '../../assets/images/icons/email.svg';
|
|
20
20
|
import IconPrint from '../../assets/images/icons/print.svg';
|
|
21
21
|
import IconWarning from '../../assets/images/icons/warning.svg';
|
|
22
|
+
import IconAlert from '../../assets/images/icons/alert.svg';
|
|
22
23
|
import IconBarcode from '../../assets/images/icons/barcode.svg';
|
|
23
24
|
|
|
24
25
|
const getIconContainerStyled = ({ $mode, $name, $width, onClick }:{ $mode?: string, $name: string, $width?: string | number, onClick?: (e: MouseEvent<HTMLElement>) => void }) => {
|
|
@@ -150,6 +151,13 @@ const getIconContainerStyled = ({ $mode, $name, $width, onClick }:{ $mode?: stri
|
|
|
150
151
|
}
|
|
151
152
|
`
|
|
152
153
|
break;
|
|
154
|
+
case 'alert':
|
|
155
|
+
style += `
|
|
156
|
+
&:before {
|
|
157
|
+
content: url(${IconAlert});
|
|
158
|
+
}
|
|
159
|
+
`
|
|
160
|
+
break;
|
|
153
161
|
case 'barcode':
|
|
154
162
|
style += `
|
|
155
163
|
&:before {
|