forstok-ui-lib 8.7.0 → 8.7.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 +2 -1
- package/dist/index.js +24 -42
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +434 -452
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/assets/javascripts/function.ts +14 -0
- package/src/assets/stylesheets/bases.styles.ts +40 -41
- package/src/components/upload/drag.drop.tsx +1 -1
- package/src/components/upload/styles.tsx +0 -17
package/package.json
CHANGED
|
@@ -1269,3 +1269,17 @@ export const getFileType = (file?: File | null): string => {
|
|
|
1269
1269
|
return mimeType.includes("application/") ? "document" : "";
|
|
1270
1270
|
}
|
|
1271
1271
|
};
|
|
1272
|
+
|
|
1273
|
+
export function capitalizeWords(text: string, ignoreWords = []): string {
|
|
1274
|
+
const ignoreSet = new Set<string>(ignoreWords);
|
|
1275
|
+
|
|
1276
|
+
return text.replace(/\S+/g, (word, offset) => {
|
|
1277
|
+
const lower = word.toLowerCase();
|
|
1278
|
+
|
|
1279
|
+
if (ignoreSet.has(lower) && offset !== 0) {
|
|
1280
|
+
return lower;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
return lower.charAt(0).toUpperCase() + lower.slice(1);
|
|
1284
|
+
});
|
|
1285
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { css } from
|
|
1
|
+
import { css } from "styled-components";
|
|
2
2
|
|
|
3
|
-
import IconEditWhite from
|
|
4
|
-
import IconLoadingRed from
|
|
3
|
+
import IconEditWhite from "../../assets/images/icons/edit-white.svg";
|
|
4
|
+
import IconLoadingRed from "../../assets/images/icons/loading-red.svg";
|
|
5
5
|
|
|
6
6
|
export const clearList = css`
|
|
7
7
|
list-style: none;
|
|
8
8
|
padding: 0;
|
|
9
9
|
margin: 0;
|
|
10
|
-
|
|
11
|
-
export const responseWidth = css
|
|
10
|
+
`;
|
|
11
|
+
export const responseWidth = css`
|
|
12
12
|
width: 100%;
|
|
13
|
-
|
|
14
|
-
export const elipsis = css
|
|
13
|
+
`;
|
|
14
|
+
export const elipsis = css`
|
|
15
15
|
overflow: hidden;
|
|
16
16
|
text-overflow: ellipsis;
|
|
17
17
|
white-space: nowrap;
|
|
18
18
|
display: block;
|
|
19
19
|
max-width: 100%;
|
|
20
20
|
width: auto;
|
|
21
|
-
|
|
21
|
+
`;
|
|
22
22
|
export const multiElipsis = css`
|
|
23
23
|
display: -webkit-box !important;
|
|
24
24
|
-webkit-line-clamp: 2;
|
|
@@ -28,7 +28,7 @@ export const multiElipsis = css`
|
|
|
28
28
|
overflow-wrap: anywhere;
|
|
29
29
|
word-break: break-all;
|
|
30
30
|
line-height: 16px;
|
|
31
|
-
|
|
31
|
+
`;
|
|
32
32
|
export const thirdElipsis = css`
|
|
33
33
|
display: -webkit-box !important;
|
|
34
34
|
-webkit-line-clamp: 3 !important;
|
|
@@ -38,46 +38,55 @@ export const thirdElipsis = css`
|
|
|
38
38
|
overflow-wrap: anywhere !important;
|
|
39
39
|
word-break: break-word !important;
|
|
40
40
|
line-height: 16px;
|
|
41
|
-
|
|
41
|
+
`;
|
|
42
42
|
export const dropBase = css`
|
|
43
43
|
background-color: var(--sec-clr-bg);
|
|
44
44
|
border: 1px solid var(--sec-clr-ln);
|
|
45
45
|
box-shadow: var(--sec-shd-bx);
|
|
46
46
|
border-radius: var(--sec-rd);
|
|
47
|
-
|
|
47
|
+
`;
|
|
48
48
|
export const headTable = css`
|
|
49
49
|
font-size: 12px;
|
|
50
50
|
font-weight: 600;
|
|
51
51
|
text-transform: capitalize;
|
|
52
|
-
|
|
52
|
+
`;
|
|
53
53
|
export const formLabel = css`
|
|
54
54
|
color: var(--hd-clr);
|
|
55
55
|
font-weight: 600;
|
|
56
56
|
font-size: 13px;
|
|
57
57
|
text-transform: capitalize;
|
|
58
|
-
|
|
58
|
+
`;
|
|
59
59
|
export const buttonStyle = css`
|
|
60
60
|
border: none;
|
|
61
|
-
border-radius: .5rem;
|
|
62
|
-
box-shadow:
|
|
61
|
+
border-radius: 0.5rem;
|
|
62
|
+
box-shadow:
|
|
63
|
+
0rem -0.0625rem 0rem 0rem #b5b5b5 inset,
|
|
64
|
+
0rem 0rem 0rem 0.0625rem rgba(0, 0, 0, 0.1) inset,
|
|
65
|
+
0rem 0.03125rem 0rem 0.09375rem #fff inset;
|
|
63
66
|
color: rgba(74, 74, 74, 1);
|
|
64
67
|
cursor: pointer;
|
|
65
68
|
user-select: none;
|
|
66
69
|
touch-action: manipulation;
|
|
67
|
-
background-color: #ffffff;
|
|
68
|
-
|
|
70
|
+
background-color: #ffffff;
|
|
71
|
+
`;
|
|
69
72
|
export const buttonHoverStyle = css`
|
|
70
73
|
color: rgba(48, 48, 48, 1);
|
|
71
74
|
background-color: rgba(250, 250, 250, 1);
|
|
72
|
-
|
|
75
|
+
`;
|
|
73
76
|
export const buttonActiveStyle = css`
|
|
74
77
|
color: rgba(48, 48, 48, 1);
|
|
75
78
|
background: rgba(247, 247, 247, 1);
|
|
76
|
-
box-shadow:
|
|
77
|
-
|
|
79
|
+
box-shadow:
|
|
80
|
+
-0.0625rem 0rem 0.0625rem 0rem rgba(26, 26, 26, 0.122) inset,
|
|
81
|
+
0.0625rem 0rem 0.0625rem 0rem rgba(26, 26, 26, 0.122) inset,
|
|
82
|
+
0rem 0.125rem 0.0625rem 0rem rgba(26, 26, 26, 0.2) inset;
|
|
83
|
+
`;
|
|
78
84
|
export const buttonActiveShadowStyle = css`
|
|
79
|
-
box-shadow:
|
|
80
|
-
|
|
85
|
+
box-shadow:
|
|
86
|
+
-0.0625rem 0rem 0.0625rem 0rem rgba(26, 26, 26, 0.122) inset,
|
|
87
|
+
0.0625rem 0rem 0.0625rem 0rem rgba(26, 26, 26, 0.122) inset,
|
|
88
|
+
0rem 0.125rem 0.0625rem 0rem rgba(26, 26, 26, 0.2) inset;
|
|
89
|
+
`;
|
|
81
90
|
export const commonCSSLists = css`
|
|
82
91
|
.table-image-figure {
|
|
83
92
|
display: block;
|
|
@@ -89,7 +98,9 @@ export const commonCSSLists = css`
|
|
|
89
98
|
border: 1px solid var(--pri-clr-ln);
|
|
90
99
|
background-color: var(--pri-clr-bg);
|
|
91
100
|
border-radius: var(--ter-rd);
|
|
92
|
-
&.edit,
|
|
101
|
+
&.edit,
|
|
102
|
+
&.add,
|
|
103
|
+
&.loading {
|
|
93
104
|
width: 70px;
|
|
94
105
|
height: 70px;
|
|
95
106
|
cursor: pointer;
|
|
@@ -113,10 +124,10 @@ export const commonCSSLists = css`
|
|
|
113
124
|
}
|
|
114
125
|
}
|
|
115
126
|
&.edit {
|
|
116
|
-
border: 1px solid rgba(0, 0, 0, .04);
|
|
127
|
+
border: 1px solid rgba(0, 0, 0, 0.04);
|
|
117
128
|
&:hover {
|
|
118
129
|
position: relative;
|
|
119
|
-
span {
|
|
130
|
+
span {
|
|
120
131
|
width: 100%;
|
|
121
132
|
height: 100%;
|
|
122
133
|
position: absolute;
|
|
@@ -125,7 +136,7 @@ export const commonCSSLists = css`
|
|
|
125
136
|
z-index: 1;
|
|
126
137
|
background-color: var(--ov-clr-bg);
|
|
127
138
|
}
|
|
128
|
-
&::after {
|
|
139
|
+
&::after {
|
|
129
140
|
content: url(${IconEditWhite});
|
|
130
141
|
height: 14px;
|
|
131
142
|
width: 14px;
|
|
@@ -140,9 +151,9 @@ export const commonCSSLists = css`
|
|
|
140
151
|
}
|
|
141
152
|
}
|
|
142
153
|
&.loading {
|
|
143
|
-
border: 1px solid rgba(0, 0, 0, .04);
|
|
154
|
+
border: 1px solid rgba(0, 0, 0, 0.04);
|
|
144
155
|
cursor: default;
|
|
145
|
-
&::after {
|
|
156
|
+
&::after {
|
|
146
157
|
content: url(${IconLoadingRed});
|
|
147
158
|
height: 14px;
|
|
148
159
|
width: 14px;
|
|
@@ -163,19 +174,7 @@ export const commonCSSLists = css`
|
|
|
163
174
|
}
|
|
164
175
|
}
|
|
165
176
|
.remove {
|
|
166
|
-
font-style: normal;
|
|
167
|
-
position: absolute;
|
|
168
177
|
top: -6px;
|
|
169
178
|
right: -6px;
|
|
170
|
-
background: #000;
|
|
171
|
-
color: var(--sec-clr);
|
|
172
|
-
border-radius: 50%;
|
|
173
|
-
width: 14px;
|
|
174
|
-
height: 14px;
|
|
175
|
-
padding: 3px 5px;
|
|
176
|
-
font-weight: 600;
|
|
177
|
-
font-size: 7px;
|
|
178
|
-
z-index: 1;
|
|
179
|
-
cursor: pointer;
|
|
180
179
|
}
|
|
181
|
-
|
|
180
|
+
`;
|
|
@@ -117,23 +117,6 @@ export const UploadDragDropImagePreview = styled.div`
|
|
|
117
117
|
object-fit: cover;
|
|
118
118
|
border-radius: 4px;
|
|
119
119
|
}
|
|
120
|
-
.remove {
|
|
121
|
-
font-style: normal;
|
|
122
|
-
position: absolute;
|
|
123
|
-
top: 8px;
|
|
124
|
-
right: 10px;
|
|
125
|
-
background: #444;
|
|
126
|
-
color: var(--sec-clr);
|
|
127
|
-
border-radius: 50%;
|
|
128
|
-
width: 15px;
|
|
129
|
-
height: 15px;
|
|
130
|
-
padding: 3px 5px;
|
|
131
|
-
font-weight: 700;
|
|
132
|
-
font-size: 8px;
|
|
133
|
-
z-index: 1;
|
|
134
|
-
cursor: pointer;
|
|
135
|
-
line-height: 9px;
|
|
136
|
-
}
|
|
137
120
|
`;
|
|
138
121
|
export const UploadDragDropFilePreviewCard = styled.div<{
|
|
139
122
|
$backgroundSrc?: string;
|