@fvc/utils 1.1.0 → 1.1.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/lib/index.js CHANGED
@@ -1 +1 @@
1
- var t=function(t){return"number"==typeof t||n(t)?"".concat(t,"px"):t},n=function(t){return/^[0-9]+$/.test(t)};export{t as cssVarResolver,n as isNumeric};
1
+ var t=function(t){return/^[0-9]+$/.test(t)},n=function(n){return"number"==typeof n||t(n)?"".concat(n,"px"):n};export{n as cssVarResolver,t as isNumeric};
@@ -3,6 +3,7 @@
3
3
  src: url('../fonts/Montserrat/Montserrat-Regular.ttf') format('truetype');
4
4
  font-weight: 400;
5
5
  font-style: normal;
6
+ font-display: swap;
6
7
  }
7
8
 
8
9
  @font-face {
@@ -10,6 +11,7 @@
10
11
  src: url('../fonts/Montserrat/Montserrat-Italic.ttf') format('truetype');
11
12
  font-weight: 400;
12
13
  font-style: italic;
14
+ font-display: swap;
13
15
  }
14
16
 
15
17
  @font-face {
@@ -17,6 +19,7 @@
17
19
  src: url('../fonts/Montserrat/Montserrat-Medium.ttf') format('truetype');
18
20
  font-weight: 500;
19
21
  font-style: normal;
22
+ font-display: swap;
20
23
  }
21
24
 
22
25
  @font-face {
@@ -24,6 +27,7 @@
24
27
  src: url('../fonts/Montserrat/Montserrat-MediumItalic.ttf') format('truetype');
25
28
  font-weight: 500;
26
29
  font-style: italic;
30
+ font-display: swap;
27
31
  }
28
32
 
29
33
  @font-face {
@@ -31,6 +35,7 @@
31
35
  src: url('../fonts/Montserrat/Montserrat-SemiBold.ttf') format('truetype');
32
36
  font-weight: 600;
33
37
  font-style: normal;
38
+ font-display: swap;
34
39
  }
35
40
 
36
41
  @font-face {
@@ -39,6 +44,7 @@
39
44
  format('truetype');
40
45
  font-weight: 600;
41
46
  font-style: italic;
47
+ font-display: swap;
42
48
  }
43
49
 
44
50
  @font-face {
@@ -46,6 +52,7 @@
46
52
  src: url('../fonts/Montserrat/Montserrat-Bold.ttf') format('truetype');
47
53
  font-weight: 700;
48
54
  font-style: normal;
55
+ font-display: swap;
49
56
  }
50
57
 
51
58
  @font-face {
@@ -53,6 +60,7 @@
53
60
  src: url('../fonts/Montserrat/Montserrat-BoldItalic.ttf') format('truetype');
54
61
  font-weight: 700;
55
62
  font-style: italic;
63
+ font-display: swap;
56
64
  }
57
65
 
58
66
  @font-face {
@@ -60,6 +68,7 @@
60
68
  src: url('../fonts/Montserrat/Montserrat-ExtraBold.ttf') format('truetype');
61
69
  font-weight: 800;
62
70
  font-style: normal;
71
+ font-display: swap;
63
72
  }
64
73
 
65
74
  @font-face {
@@ -68,6 +77,7 @@
68
77
  format('truetype');
69
78
  font-weight: 800;
70
79
  font-style: italic;
80
+ font-display: swap;
71
81
  }
72
82
 
73
83
  @font-face {
@@ -75,6 +85,7 @@
75
85
  src: url('../fonts/Montserrat/Montserrat-Black.ttf') format('truetype');
76
86
  font-weight: 900;
77
87
  font-style: normal;
88
+ font-display: swap;
78
89
  }
79
90
 
80
91
  @font-face {
@@ -82,6 +93,7 @@
82
93
  src: url('../fonts/Montserrat/Montserrat-BlackItalic.ttf') format('truetype');
83
94
  font-weight: 900;
84
95
  font-style: italic;
96
+ font-display: swap;
85
97
  }
86
98
 
87
99
  @font-face {
@@ -89,6 +101,7 @@
89
101
  src: url('../fonts/Montserrat/Montserrat-Light.ttf') format('truetype');
90
102
  font-weight: 300;
91
103
  font-style: normal;
104
+ font-display: swap;
92
105
  }
93
106
 
94
107
  @font-face {
@@ -96,6 +109,7 @@
96
109
  src: url('../fonts/Montserrat/Montserrat-LightItalic.ttf') format('truetype');
97
110
  font-weight: 300;
98
111
  font-style: italic;
112
+ font-display: swap;
99
113
  }
100
114
 
101
115
  @font-face {
@@ -103,6 +117,7 @@
103
117
  src: url('../fonts/Montserrat/Montserrat-Thin.ttf') format('truetype');
104
118
  font-weight: 100;
105
119
  font-style: normal;
120
+ font-display: swap;
106
121
  }
107
122
 
108
123
  @font-face {
@@ -110,6 +125,7 @@
110
125
  src: url('../fonts/Montserrat/Montserrat-ThinItalic.ttf') format('truetype');
111
126
  font-weight: 100;
112
127
  font-style: italic;
128
+ font-display: swap;
113
129
  }
114
130
 
115
131
  @font-face {
@@ -117,6 +133,7 @@
117
133
  src: url('../fonts/Roboto/Roboto-Regular.ttf') format('truetype');
118
134
  font-weight: 400;
119
135
  font-style: normal;
136
+ font-display: swap;
120
137
  }
121
138
 
122
139
  @font-face {
@@ -124,6 +141,7 @@
124
141
  src: url('../fonts/Roboto/Roboto-Italic.ttf') format('truetype');
125
142
  font-weight: 400;
126
143
  font-style: italic;
144
+ font-display: swap;
127
145
  }
128
146
 
129
147
  @font-face {
@@ -131,6 +149,7 @@
131
149
  src: url('../fonts/Roboto/Roboto-Medium.ttf') format('truetype');
132
150
  font-weight: 500;
133
151
  font-style: normal;
152
+ font-display: swap;
134
153
  }
135
154
 
136
155
  @font-face {
@@ -138,6 +157,7 @@
138
157
  src: url('../fonts/Roboto/Roboto-MediumItalic.ttf') format('truetype');
139
158
  font-weight: 500;
140
159
  font-style: italic;
160
+ font-display: swap;
141
161
  }
142
162
 
143
163
  @font-face {
@@ -145,6 +165,7 @@
145
165
  src: url('../fonts/Roboto/Roboto-SemiBold.ttf') format('truetype');
146
166
  font-weight: 600;
147
167
  font-style: normal;
168
+ font-display: swap;
148
169
  }
149
170
 
150
171
  @font-face {
@@ -152,6 +173,7 @@
152
173
  src: url('../fonts/Roboto/Roboto-SemiBoldItalic.ttf') format('truetype');
153
174
  font-weight: 600;
154
175
  font-style: italic;
176
+ font-display: swap;
155
177
  }
156
178
 
157
179
  @font-face {
@@ -159,6 +181,7 @@
159
181
  src: url('../fonts/Roboto/Roboto-Bold.ttf') format('truetype');
160
182
  font-weight: 700;
161
183
  font-style: normal;
184
+ font-display: swap;
162
185
  }
163
186
 
164
187
  @font-face {
@@ -166,6 +189,7 @@
166
189
  src: url('../fonts/Roboto/Roboto-BoldItalic.ttf') format('truetype');
167
190
  font-weight: 700;
168
191
  font-style: italic;
192
+ font-display: swap;
169
193
  }
170
194
 
171
195
  @font-face {
@@ -173,6 +197,7 @@
173
197
  src: url('../fonts/Roboto/Roboto-Black.ttf') format('truetype');
174
198
  font-weight: 900;
175
199
  font-style: normal;
200
+ font-display: swap;
176
201
  }
177
202
 
178
203
  @font-face {
@@ -180,6 +205,7 @@
180
205
  src: url('../fonts/Roboto/Roboto-BlackItalic.ttf') format('truetype');
181
206
  font-weight: 900;
182
207
  font-style: italic;
208
+ font-display: swap;
183
209
  }
184
210
 
185
211
  @font-face {
@@ -187,6 +213,7 @@
187
213
  src: url('../fonts/Roboto/Roboto-Light.ttf') format('truetype');
188
214
  font-weight: 300;
189
215
  font-style: normal;
216
+ font-display: swap;
190
217
  }
191
218
 
192
219
  @font-face {
@@ -194,6 +221,7 @@
194
221
  src: url('../fonts/Roboto/Roboto-LightItalic.ttf') format('truetype');
195
222
  font-weight: 300;
196
223
  font-style: italic;
224
+ font-display: swap;
197
225
  }
198
226
 
199
227
  @font-face {
@@ -201,6 +229,7 @@
201
229
  src: url('../fonts/Roboto/Roboto-ExtraLight.ttf') format('truetype');
202
230
  font-weight: 200;
203
231
  font-style: normal;
232
+ font-display: swap;
204
233
  }
205
234
 
206
235
  @font-face {
@@ -208,6 +237,7 @@
208
237
  src: url('../fonts/Roboto/Roboto-ExtraLightItalic.ttf') format('truetype');
209
238
  font-weight: 200;
210
239
  font-style: italic;
240
+ font-display: swap;
211
241
  }
212
242
 
213
243
  @font-face {
@@ -215,6 +245,7 @@
215
245
  src: url('../fonts/Roboto/Roboto-Thin.ttf') format('truetype');
216
246
  font-weight: 100;
217
247
  font-style: normal;
248
+ font-display: swap;
218
249
  }
219
250
 
220
251
  @font-face {
@@ -222,4 +253,5 @@
222
253
  src: url('../fonts/Roboto/Roboto-ThinItalic.ttf') format('truetype');
223
254
  font-weight: 100;
224
255
  font-style: italic;
256
+ font-display: swap;
225
257
  }
@@ -120,6 +120,7 @@ input[type='text'],
120
120
  input[type='password'],
121
121
  input[type='number'],
122
122
  textarea {
123
+ appearance: none;
123
124
  -webkit-appearance: none;
124
125
  }
125
126
 
@@ -273,6 +274,7 @@ button,
273
274
  html [type='button'],
274
275
  [type='reset'],
275
276
  [type='submit'] {
277
+ appearance: button;
276
278
  -webkit-appearance: button;
277
279
  }
278
280
 
@@ -295,6 +297,7 @@ input[type='time'],
295
297
  input[type='datetime-local'],
296
298
  input[type='month'] {
297
299
  -webkit-appearance: listbox;
300
+ appearance: listbox;
298
301
  }
299
302
 
300
303
  textarea {
@@ -333,16 +336,19 @@ progress {
333
336
  [type='search'] {
334
337
  outline-offset: -2px;
335
338
  -webkit-appearance: none;
339
+ appearance: none;
336
340
  }
337
341
 
338
342
  [type='search']::-webkit-search-cancel-button,
339
343
  [type='search']::-webkit-search-decoration {
340
344
  -webkit-appearance: none;
345
+ appearance: none;
341
346
  }
342
347
 
343
348
  ::-webkit-file-upload-button {
344
349
  font: inherit;
345
350
  -webkit-appearance: button;
351
+ appearance: button;
346
352
  }
347
353
 
348
354
  output {
@@ -1,115 +1,144 @@
1
1
  :root {
2
2
  /* Blue */
3
- --blue-20: #eeeff6;
4
- --blue-50: #e8edf6;
5
- --blue-100: #e4e6f4;
6
- --blue-150: #e5e9fc;
7
- --blue-200: #daddec;
8
- --blue-250: #d9deef;
9
- --blue-300: #cdd1e4;
10
- --blue-400: #4271a5;
11
- --blue-500: #395ca6;
12
- --blue-600: #4054b2;
13
- --blue-700: #303f9f;
3
+ --blue-20: #EEEFF6;
4
+ --blue-50: #EBEDF6;
5
+ --blue-100: #E4E6F4;
6
+ --blue-150: #E5E9FC;
7
+ --blue-200: #DADDEC;
8
+ --blue-250: #D9DEEF;
9
+ --blue-300: #CDD1E4;
10
+ --blue-400: #4271A5;
11
+ --blue-500: #395CA6;
12
+ --blue-600: #4054B2;
13
+ --blue-700: #303F9F;
14
14
 
15
15
  /* Gray */
16
- --gray-50: #f2f2f2;
17
- --gray-100: #fafafa;
18
- --gray-150: #ececec;
19
- --gray-200: #dfdfdf;
20
- --gray-250: #ebebeb;
21
- --gray-300: #dadada;
22
- --gray-400: #bbbbbb;
16
+ --gray-50: #F2F2F2;
17
+ --gray-100: #FAFAFA;
18
+ --gray-150: #ECECEC;
19
+ --gray-200: #DFDFDF;
20
+ --gray-250: #EBEBEB;
21
+ --gray-300: #DADADA;
22
+ --gray-400: #BBBBBB;
23
23
  --gray-500: #787878;
24
24
  --gray-600: #949494;
25
- --gray-700: #7b7b7b;
26
- --gray-800: #6d6d6d;
27
- --gray-900: #4a4a4a;
25
+ --gray-700: #7B7B7B;
26
+ --gray-800: #6D6D6D;
27
+ --gray-900: #4A4A4A;
28
28
 
29
29
  /* Blue-gray */
30
- --blue-gray-200: #d9deef;
31
- --blue-gray-250: #dddaec;
32
- --blue-gray-300: #cdd1e4;
33
- --blue-gray-400: #75849a;
34
- --blue-gray-500: #69778c;
35
- --blue-gray-600: #696b78;
36
- --blue-gray-700: #4d5868;
37
- --blue-gray-800: #3d4655;
38
- --blue-gray-900: #2e3848;
30
+ --blue-gray-200: #D9DEEF;
31
+ --blue-gray-250: #DDDAEC;
32
+ --blue-gray-300: #CDD1E4;
33
+ --blue-gray-400: #75849A;
34
+ --blue-gray-500: #69778C;
35
+ --blue-gray-600: #696878;
36
+ --blue-gray-700: #4D5868;
37
+ --blue-gray-800: #3D4655;
38
+ --blue-gray-900: #2E3848;
39
39
 
40
40
  /* Green */
41
- --green-100: #d8fcd2;
42
- --green-400: #400fa2;
43
- --green-600: #200661;
44
- --green-700: #268061;
41
+ --green-100: #D8FCD2;
42
+ --green-200: #DEEDEX;
43
+ --green-250: #C9E1D7;
44
+ --green-300: #93C3B0;
45
+ --green-400: #40DFA2;
46
+ --green-600: #268661;
47
+ --green-700: #176647;
48
+ --green-800: #396F65;
45
49
 
46
50
  /* Yellow-green */
47
- --yellow-green-400: #c0dc39;
48
- --yellow-green-500: #afb42b;
51
+ --yellow-green-400: #CDDC39;
52
+ --yellow-green-500: #AFB42B;
49
53
 
50
54
  /* Red */
51
- --red-400: #f9daab;
52
- --red-600: #ff1f48;
53
- --red-800: #b00020;
55
+ --red-100: #F5ECE6;
56
+ --red-200: #FDEAED;
57
+ --red-250: #FBE0E3;
58
+ --red-300: #F9CBD1;
59
+ --red-400: #FF9DA9;
60
+ --red-600: #FF1F48;
61
+ --red-800: #B00020;
54
62
 
55
63
  /* Orange */
56
- --orange-100: #f8ece8;
57
- --orange-200: #fff59b;
58
- --orange-600: #dd1323;
64
+ --orange-100: #F5ECE6;
65
+ --orange-200: #FFF59B;
66
+ --orange-600: #DD9323;
59
67
 
60
68
  /* Neutrals */
61
- --neutral-0: #ffffff;
69
+ --neutral-0: #FFFFFF;
70
+ --neutral-0-20: #FFFFFF33;
71
+ --neutral-0-40: #FFFFFF66;
62
72
  --neutral-1000: #000000;
63
-
73
+
64
74
  /* Black */
65
- --black-1000: #2a2b37;
75
+ --black-1000: #2A2D37;
66
76
 
67
77
  /* Text */
68
- --body-text-color-1000: #2a2d37;
69
- --secondary-text-color-600: #696878;
70
- --support-text-color-300: #cdd1e4;
71
- --white-text-color-0: #ffffff;
72
- --link-on-dark-bg-color-400: #40dfa2;
73
- --link-on-light-bg-color-500: #395ca6;
74
- --menu-2nd-level-color-200: #daddec;
75
- --warning-text-color-800: #b00020;
76
- --warning-text-on-dark-bg-color-400: #ff9da9;
77
- --button-text-color-500: #268661;
78
+ --body-text-color-1000: #2A2D37; /* Used for body text and headlines on a light background */
79
+ --secondary-text-color-600: #696878; /* Used in labels and headings in tables */
80
+ --support-text-color-300: #CDD1E4; /* Used as a label color on a dark background and into Default UI elements */
81
+ --white-text-color-0: #FFFFFF; /* Used for body texts and headlines on a light background on a dark background */
82
+ --link-on-dark-bg-color-400: #40DFA2; /* Used on a dark background */
83
+ --link-on-light-bg-color-500: #395CA6; /* Used on a light background */
84
+ --menu-2nd-level-color-200: #DADDEC; /* Used in a default secondary menu */
85
+ --warning-text-color-800: #B00020; /* Used to draw attention to the text most often in a negative aspect (on a white bg) */
86
+ --warning-text-on-dark-bg-color-400: #FF9DA9; /* Used to draw attention to the text most often in a negative aspect (on a dark bg) */
87
+ --button-text-color-600: #268661; /* Used for the text in the secondary button */
78
88
 
79
89
  /* Background */
80
- --card-bg-color-20: #eeeff6;
81
- --main-content-bg-color-0: #ffffff;
82
- --header-bg-color-700: #405868;
83
- --task-overview-bg-color-800: #3d4655;
84
- --primary-bg-color-900: #2e3848;
90
+ --card-bg-color-20: #EEEFF6; /* The primary color is text, which is used in many situations */
91
+ --main-content-bg-color-0: #FFFFFF; /* Used in labels and headings in tables on dark background */
92
+ --header-bg-color-700: #405868; /* More often used as a label color on a dark background and into Default UI elements */
93
+ --task-overview-bg-color-800: #3D4655; /* Used on a dark background */
94
+ --primary-bg-color-900: #2E3848; /* Used on a dark background */
95
+ --alert-bg-color-50: #F2F2F2; /* Alert message default background. */
85
96
 
86
97
  /* Overlay */
87
- --tooltip-bg-color-900: #4a4a4a;
88
- --popup-bg-color-20: #eeeff6;
98
+ --tooltip-bg-color-900: #4A4A4A; /* The primary color is text, which is used in many situations. */
99
+ --popup-bg-color-20: #EEEFF6;
89
100
 
90
101
  /* Border-line */
91
- --element-b-line-color-400: #2a2d37;
92
- --element-selected-b-line-color-400: #4271a5;
93
- --frame-b-line-color-250: #d0deef;
94
- --warning-b-line-on-light-bg-color-800: #b00020;
95
- --warning-b-line-on-dark-bg-color-400: #ff9da9;
102
+ --element-b-line-color-400: #2A2D37; /* Border-line for default state of Text field. */
103
+ --element-selected-b-line-color-400: #4271A5; /* Border-line for selected state of Text field, Text area, Dropdown, Datetimepicker, Field range */
104
+ --frame-b-line-color-250: #D9DEEF; /* Border-line for Cards, Tables and Sections */
105
+ --warning-b-line-on-light-bg-color-800: #800020; /* Warning border-line for all elements on light background */
106
+ --warning-b-line-on-dark-bg-color-400: #FF9DA9; /* Warning border line for all elements on dark background */
96
107
 
97
108
  /* Icon */
98
- --white-icon-color-0: #ffffff;
99
- --warning-icon-color-800: #b00020;
100
- --warning-icon-on-dark-bg-color-400: #ff9da9;
101
- --primary-icon-color-1000: #2a2d37;
102
- --link-icon-color-500: #395ca6;
103
- --secondary-icon-on-dark-bg-color-500: #696878;
104
- --secondary-icon-on-light-bg-color-500: #787878;
109
+ --white-icon-color-0: #FFFFFF; /* The primary color is text, which is used in many situations. */
110
+ --warning-icon-color-800: #800020; /* Most often used in labels and headings in tables */
111
+ --warning-icon-on-dark-bg-color-400: #FF9DA9; /* More often used as a label color on a dark background and into Default UI elements */
112
+ --primary-icon-color-1000: #2A2D37; /* Used on a dark background */
113
+ --link-icon-color-500: #395CA6; /* Used on a dark background */
114
+ --secondary-icon-on-dark-bg-color-600: #696878; /* Used for text and icon on dark backgrounds */
115
+ --secondary-icon-on-light-bg-color-500: #787878; /* Used for text and icon on light backgrounds */
105
116
 
106
117
  /* Badge (for Task overview, Cards & Table) */
107
- --badge-card-table-0: #2a2d37;
108
- --badge-success-color-600: #268661;
109
- --badge-active-color-100: #2a2d37;
110
- --badge-cancel-color-900: #4a4a4a;
111
- --badge-in-progress-color-500: #949494;
112
- --badge-warning-color-800: #b00020;
113
- --badge-basic-color-400: #4271a5;
114
- --badge-paused-color-100: #fff598;
118
+ --badge-success-color-600: #268661; /* The primary color is text, which is used in many situations */
119
+ --badge-active-color-100: #2A2D37; /* Used in labels and headings in tables. */
120
+ --badge-cancel-color-900: #4A4A4A; /* Used as a label color on a stark background and into Default UI elements */
121
+ --badge-in-progress-color-600: #949494; /* Used for states with "in progress" state. */
122
+ --badge-warning-color-800: #800020; /* used for warned states */
123
+ --badge-basic-color-400: #4271A5; /* Used for regular states */
124
+ --badge-paused-color-100: #FFF59B; /* Used for suspended or paused states */
125
+
126
+ /* Button Background */
127
+ --button-disabled-secondary-color-300: #93C3B04D; /* Used as a stroke color for Secondary button. */
128
+ --button-hover-secondary-color-300: #93C3B080; /* Used as a background color for Secondary button. */
129
+ --button-pressed-secondary-color-300: #93C3B0; /* Used as a background color for Secondary button */
130
+ --button-enable-color-600: #268661; /* Used as a background color for Primary button */
131
+ --button-hover-color-700: #176647; /* Used as a background color for Primary button */
132
+ --button-disabled-color-800: #396F65; /* Used as a background color for Primary button */
133
+ --button-enable-second-on-dark-bg-color-0: #FFFFFF; /* Used as a stroke color for Secondary button. (on Dark bg) */
134
+ --button-hover-second-on-dark-bg-color-20: #FFFFFF33; /* Used as a background color for Secondary button. (on Dark bg) */
135
+ --button-pressed-second-on-dark-bg-color-40: #FFFFFF66; /* Used as a background color for Secondary button. (on Dark bg) */
136
+ --button-disabled-second-on-dark-bg-color-50: #F2F2F2; /* Used as a stroke color for Secondary button. (on Dark bg) */
137
+ --button-enable-second-error-color-800: #800020; /* Used as a stroke color for Secondary button */
138
+ --button-hover-second-error-color-300: #F9C801; /* Used as a background color for Secondary button */
139
+ --button-pressed-second-error-color-400: #FF9DA9; /* Used as a background color for Secondary button */
140
+ --button-disabled-second-error-color-400: #FF9D49; /* Used as a stroke color for Secondary button. */
141
+ --button-hover-second-error-on-dark-bg-color-300-40: #F9C80166; /* Used as a background color for Secondary button, (on Dark bg) */
142
+ --button-pressed-second-error-on-dark-bg-color-300-60: #F9CBD199; /* Used as a background color for Secondary button, (on Dark bg) */
143
+ --button-disabled-second-error-on-dark-bg-color-300: #F9C801; /* Used as a stroke color for Secondary button. (on Dark bg) */
115
144
  }
@@ -1,2 +1,2 @@
1
- export { cssVarResolver } from './cssVarResolver/cssVarResolver';
2
- export { isNumeric } from './isNumeric/isNumeric';
1
+ export { cssVarResolver } from './cssVarResolver';
2
+ export { isNumeric } from './isNumeric';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fvc/utils",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "main": "./dist/lib/index.js",
5
5
  "types": "./dist/lib/utils/src/index.d.ts",
6
6
  "exports": {
@@ -21,4 +21,4 @@
21
21
  "dependencies": {
22
22
  "react": "^18.0.0"
23
23
  }
24
- }
24
+ }