@onewelcome/react-lib-components 1.7.0 → 1.8.0
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/Typography/Typography.d.ts +1 -1
- package/dist/_BaseStyling_/BaseStyling.d.ts +20 -0
- package/dist/react-lib-components.cjs.development.js +89 -64
- package/dist/react-lib-components.cjs.development.js.map +1 -1
- package/dist/react-lib-components.cjs.production.min.js +1 -1
- package/dist/react-lib-components.cjs.production.min.js.map +1 -1
- package/dist/react-lib-components.esm.js +89 -64
- package/dist/react-lib-components.esm.js.map +1 -1
- package/dist/util/helper.d.ts +2 -0
- package/package.json +3 -3
- package/src/Breadcrumbs/Breadcrumbs.module.scss +2 -2
- package/src/Button/Button.module.scss +14 -2
- package/src/ContextMenu/ContextMenuItem.module.scss +1 -0
- package/src/DataGrid/DataGridHeader/DataGridHeader.module.scss +1 -1
- package/src/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +1 -1
- package/src/Form/Fieldset/Fieldset.module.scss +8 -1
- package/src/Form/FileUpload/FileUpload.module.scss +2 -2
- package/src/Form/Input/Input.module.scss +9 -2
- package/src/Form/Select/Select.module.scss +26 -3
- package/src/Form/Wrapper/InputWrapper/InputWrapper.tsx +3 -1
- package/src/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss +9 -1
- package/src/Form/Wrapper/Wrapper/Wrapper.module.scss +11 -2
- package/src/Link/Link.module.scss +1 -1
- package/src/Notifications/Banner/Banner.module.scss +2 -2
- package/src/Pagination/Pagination.module.scss +1 -0
- package/src/Tabs/TabButton.module.scss +3 -3
- package/src/Tabs/Tabs.module.scss +1 -0
- package/src/Typography/Typography.module.scss +2 -2
- package/src/Typography/Typography.tsx +1 -1
- package/src/Wizard/BaseWizardSteps/BaseWizardSteps.module.scss +17 -7
- package/src/_BaseStyling_/BaseStyling.tsx +67 -27
- package/src/mixins.module.scss +2 -2
- package/src/util/helper.test.tsx +34 -17
- package/src/util/helper.tsx +5 -0
- package/src/variables.scss +18 -0
package/dist/util/helper.d.ts
CHANGED
|
@@ -10,4 +10,6 @@ export declare const areArraysDifferent: (arr1: Record<string, any>[], arr2: Rec
|
|
|
10
10
|
export declare const getValueByPath: (obj: {
|
|
11
11
|
[key: string]: any;
|
|
12
12
|
}, path: string) => any;
|
|
13
|
+
/** Source: https://stackoverflow.com/a/42769683/5084110 */
|
|
14
|
+
export declare const remToPx: (rem: number) => number;
|
|
13
15
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"homepage": "http://onewelcome.github.io/react-lib-components",
|
|
3
3
|
"name": "@onewelcome/react-lib-components",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.8.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "OneWelcome B.V.",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@typescript-eslint/eslint-plugin": "^5.53.0",
|
|
84
84
|
"@typescript-eslint/parser": "^5.53.0",
|
|
85
85
|
"babel-loader": "^9.1.2",
|
|
86
|
-
"chromatic": "^6.17.
|
|
86
|
+
"chromatic": "^6.17.1",
|
|
87
87
|
"dts-cli": "^1.6.3",
|
|
88
88
|
"eslint": "^8.34.0",
|
|
89
89
|
"eslint-config-prettier": "^8.6.0",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"react-dom": "^17.0.2",
|
|
103
103
|
"react-is": "^18.2.0",
|
|
104
104
|
"react-router": "^6.6.2",
|
|
105
|
-
"react-router-dom": "^6.8.
|
|
105
|
+
"react-router-dom": "^6.8.2",
|
|
106
106
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
107
107
|
"rollup-plugin-styles": "^4.0.0",
|
|
108
108
|
"sass": "^1.58.3",
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
|
|
17
17
|
.breadcrumbs {
|
|
18
18
|
.last {
|
|
19
|
-
color: var(--
|
|
19
|
+
color: var(--color-primary);
|
|
20
20
|
margin: 0;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.icon {
|
|
24
|
-
color: var(--
|
|
24
|
+
color: var(--color-primary);
|
|
25
25
|
font-size: 0.75rem;
|
|
26
26
|
line-height: 1.5rem;
|
|
27
27
|
margin-left: 0.375rem;
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
align-items: center;
|
|
34
34
|
|
|
35
35
|
&.start-icon {
|
|
36
|
-
padding-left:
|
|
36
|
+
padding-left: 0.75rem;
|
|
37
37
|
padding-right: 1.25rem;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
&.end-icon {
|
|
41
41
|
padding-left: 1.25rem;
|
|
42
|
-
padding-right:
|
|
42
|
+
padding-right: 0.75rem;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
i {
|
|
@@ -51,3 +51,15 @@
|
|
|
51
51
|
margin-right: 0.25rem;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
|
|
55
|
+
@media only screen and (min-width: 30em) {
|
|
56
|
+
.has-icon {
|
|
57
|
+
&.start-icon {
|
|
58
|
+
padding-left: 1rem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.end-icon {
|
|
62
|
+
padding-right: 1rem;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -14,9 +14,11 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
@use "src/variables";
|
|
18
|
+
|
|
17
19
|
.fieldset {
|
|
18
20
|
border: 0;
|
|
19
|
-
padding: 1rem
|
|
21
|
+
padding: 1rem variables.$form-element-horizontal-padding-mobile;
|
|
20
22
|
border-radius: 0.5rem;
|
|
21
23
|
margin: 0;
|
|
22
24
|
|
|
@@ -43,3 +45,8 @@
|
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
}
|
|
48
|
+
@media only screen and (min-width: 30em) {
|
|
49
|
+
.fieldset {
|
|
50
|
+
padding: 1rem variables.$form-element-horizontal-padding-desktop;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
@include transition(all, 0.2s, ease-in-out);
|
|
30
30
|
&.drag-active {
|
|
31
31
|
@include outline(
|
|
32
|
-
var(--
|
|
32
|
+
var(--color-primary),
|
|
33
33
|
var(--drag-border-style),
|
|
34
34
|
var(--input-border-width),
|
|
35
35
|
var(--input-border-radius),
|
|
36
|
-
var(--
|
|
36
|
+
var(--drag-background-color)
|
|
37
37
|
);
|
|
38
38
|
@include outlineStates;
|
|
39
39
|
}
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
@use "
|
|
17
|
+
@use "src/mixins.module";
|
|
18
|
+
@use "src/variables";
|
|
18
19
|
|
|
19
20
|
.input-wrapper {
|
|
20
21
|
position: relative;
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
border: 0;
|
|
25
26
|
border-radius: var(--input-border-radius);
|
|
26
27
|
background-color: var(--input-background-color);
|
|
27
|
-
padding: 0
|
|
28
|
+
padding: 0 variables.$form-element-horizontal-padding-mobile;
|
|
28
29
|
@include mixins.transition(all, 0.2s, ease-in-out);
|
|
29
30
|
|
|
30
31
|
// General autofill styles
|
|
@@ -141,3 +142,9 @@
|
|
|
141
142
|
display: block;
|
|
142
143
|
z-index: 1;
|
|
143
144
|
}
|
|
145
|
+
|
|
146
|
+
@media only screen and (min-width: 30em) {
|
|
147
|
+
.input-wrapper {
|
|
148
|
+
padding: 0 variables.$form-element-horizontal-padding-desktop;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
@use "
|
|
17
|
+
@use "src/mixins.module";
|
|
18
|
+
@use "src/variables";
|
|
18
19
|
|
|
19
20
|
$listItemHeight: 2.125rem;
|
|
20
21
|
|
|
@@ -41,7 +42,11 @@ $listItemHeight: 2.125rem;
|
|
|
41
42
|
&:not(.expanded) {
|
|
42
43
|
button:focus:not(.error) {
|
|
43
44
|
border: var(--input-border-width-focus) solid var(--color-focus);
|
|
44
|
-
padding: 0
|
|
45
|
+
padding: 0
|
|
46
|
+
calc(
|
|
47
|
+
variables.$form-element-horizontal-padding-mobile - var(--input-border-width-focus) +
|
|
48
|
+
var(--input-border-width)
|
|
49
|
+
);
|
|
45
50
|
}
|
|
46
51
|
}
|
|
47
52
|
|
|
@@ -56,7 +61,7 @@ $listItemHeight: 2.125rem;
|
|
|
56
61
|
position: relative;
|
|
57
62
|
width: 100%;
|
|
58
63
|
min-height: calc(4rem - (2 * var(--input-border-width)));
|
|
59
|
-
padding: 0
|
|
64
|
+
padding: 0 variables.$form-element-horizontal-padding-mobile;
|
|
60
65
|
background-color: transparent;
|
|
61
66
|
border-color: var(--light-grey-border);
|
|
62
67
|
border-style: var(--input-border-style);
|
|
@@ -215,3 +220,21 @@ $listItemHeight: 2.125rem;
|
|
|
215
220
|
pointer-events: none;
|
|
216
221
|
}
|
|
217
222
|
}
|
|
223
|
+
|
|
224
|
+
@media only screen and (min-width: 30em) {
|
|
225
|
+
.select {
|
|
226
|
+
.custom-select {
|
|
227
|
+
padding: 0 variables.$form-element-horizontal-padding-desktop;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&:not(.expanded) {
|
|
231
|
+
button:focus:not(.error) {
|
|
232
|
+
padding: 0
|
|
233
|
+
calc(
|
|
234
|
+
variables.$form-element-horizontal-padding-desktop - var(--input-border-width-focus) +
|
|
235
|
+
var(--input-border-width)
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
@@ -25,6 +25,7 @@ import { Input, Type, Props as InputProps } from "../../Input/Input";
|
|
|
25
25
|
import classes from "./InputWrapper.module.scss";
|
|
26
26
|
import { Wrapper, WrapperProps } from "../Wrapper/Wrapper";
|
|
27
27
|
import { useWrapper } from "../../../hooks/useWrapper";
|
|
28
|
+
import { remToPx } from "../../../util/helper";
|
|
28
29
|
|
|
29
30
|
interface PartialInputProps extends Partial<InputProps> {}
|
|
30
31
|
|
|
@@ -95,6 +96,7 @@ const InputWrapperComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
|
95
96
|
const { prefix, suffix } = inputProps || {};
|
|
96
97
|
const input = useRef<HTMLInputElement>(null);
|
|
97
98
|
const hasValueOrActiveFloatingLabel = !!value || floatingLabelActive;
|
|
99
|
+
const helperIndent = window.innerWidth >= remToPx(30) ? remToPx(1.25) : remToPx(1);
|
|
98
100
|
const { labelOffset } = useLabelOffset(
|
|
99
101
|
(inputProps && (inputProps.ref as React.RefObject<HTMLInputElement>)) || input,
|
|
100
102
|
floatingLabelActive,
|
|
@@ -130,7 +132,7 @@ const InputWrapperComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
|
|
|
130
132
|
...helperProps,
|
|
131
133
|
className: `${classes["input-wrapper-helper"]} ${helperProps?.className ?? ""} `
|
|
132
134
|
}}
|
|
133
|
-
helperIndent={
|
|
135
|
+
helperIndent={helperIndent}
|
|
134
136
|
disabled={disabled}
|
|
135
137
|
>
|
|
136
138
|
<Input
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
@use "src/variables";
|
|
18
|
+
|
|
17
19
|
.select-label {
|
|
18
20
|
left: calc(
|
|
19
21
|
1.25rem + 2px
|
|
@@ -22,9 +24,15 @@
|
|
|
22
24
|
|
|
23
25
|
.select-helper-text {
|
|
24
26
|
margin-top: 0.25rem;
|
|
25
|
-
margin-left:
|
|
27
|
+
margin-left: variables.$form-element-horizontal-padding-mobile;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
.floating-label-active [data-display] {
|
|
29
31
|
top: calc(50% + 0.5rem);
|
|
30
32
|
}
|
|
33
|
+
|
|
34
|
+
@media only screen and (min-width: 30em) {
|
|
35
|
+
.select-helper-text {
|
|
36
|
+
margin-left: variables.$form-element-horizontal-padding-desktop;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
@use "
|
|
17
|
+
@use "src/mixins.module";
|
|
18
|
+
@use "src/variables";
|
|
18
19
|
|
|
19
20
|
.floating-wrapper {
|
|
20
21
|
position: relative;
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
position: absolute;
|
|
26
27
|
z-index: 2;
|
|
27
28
|
top: 1.3125rem;
|
|
28
|
-
left:
|
|
29
|
+
left: variables.$form-element-horizontal-padding-mobile;
|
|
29
30
|
transform-origin: left top;
|
|
30
31
|
@include mixins.transition(all, 0.2s, ease-in-out);
|
|
31
32
|
pointer-events: none;
|
|
@@ -56,3 +57,11 @@
|
|
|
56
57
|
content: " *";
|
|
57
58
|
}
|
|
58
59
|
}
|
|
60
|
+
|
|
61
|
+
@media only screen and (min-width: 30em) {
|
|
62
|
+
.floating-wrapper {
|
|
63
|
+
.floating-label {
|
|
64
|
+
left: variables.$form-element-horizontal-padding-desktop;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
padding: 1rem 1.25rem;
|
|
19
19
|
background-color: var(--light);
|
|
20
20
|
display: flex;
|
|
21
|
-
border-width:
|
|
21
|
+
border-width: var(--banner-border-width);
|
|
22
22
|
border-style: solid;
|
|
23
23
|
flex-grow: 0;
|
|
24
24
|
border-radius: var(--banner-border-radius);
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
&.warning {
|
|
57
|
-
border-color: var(--
|
|
57
|
+
border-color: var(--warning);
|
|
58
58
|
.icon {
|
|
59
59
|
color: var(--warning);
|
|
60
60
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
border: 0;
|
|
19
19
|
border-radius: 0;
|
|
20
20
|
font-size: var(--font-size);
|
|
21
|
-
line-height:
|
|
21
|
+
line-height: var(--default-line-height);
|
|
22
22
|
margin: 0;
|
|
23
23
|
padding: 0.25rem 0 1rem 0;
|
|
24
24
|
min-height: 2.5rem;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
background-color: transparent;
|
|
28
28
|
white-space: nowrap;
|
|
29
29
|
position: relative;
|
|
30
|
-
font-weight:
|
|
30
|
+
font-weight: normal;
|
|
31
31
|
color: transparent;
|
|
32
32
|
|
|
33
33
|
&:focus-visible {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
&.selected {
|
|
45
|
-
color: var(--
|
|
45
|
+
color: var(--color-primary);
|
|
46
46
|
|
|
47
47
|
span {
|
|
48
48
|
color: transparent;
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
&body {
|
|
48
|
-
@include fontProperties(var(--font-family), var(--font-size), 400,
|
|
48
|
+
@include fontProperties(var(--font-family), var(--font-size), 400, var(--default-line-height));
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
&body-bold {
|
|
52
|
-
@include fontProperties(var(--font-family), var(--font-size), 700,
|
|
52
|
+
@include fontProperties(var(--font-family), var(--font-size), 700, var(--default-line-height));
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
&sub-text {
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
&:disabled {
|
|
47
47
|
.number-wrapper {
|
|
48
48
|
.number {
|
|
49
|
-
border: 2px solid var(--
|
|
50
|
-
color: var(--
|
|
49
|
+
border: 2px solid var(--disabled);
|
|
50
|
+
color: var(--disabled);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -117,6 +117,10 @@
|
|
|
117
117
|
font-weight: 700;
|
|
118
118
|
color: var(--color-primary);
|
|
119
119
|
}
|
|
120
|
+
|
|
121
|
+
.two-line-text-overflow {
|
|
122
|
+
display: unset;
|
|
123
|
+
}
|
|
120
124
|
}
|
|
121
125
|
|
|
122
126
|
//Future state for clickable elements - future state is a default one
|
|
@@ -165,17 +169,17 @@
|
|
|
165
169
|
.number {
|
|
166
170
|
font-family: var(--font-family);
|
|
167
171
|
font-size: 1rem;
|
|
168
|
-
font-weight:
|
|
172
|
+
font-weight: normal;
|
|
169
173
|
display: flex;
|
|
170
174
|
align-items: center;
|
|
171
175
|
justify-content: center;
|
|
172
|
-
border: 2px solid var(--
|
|
176
|
+
border: 2px solid var(--wizard-step-indicator-future-color);
|
|
173
177
|
border-radius: 50%;
|
|
174
178
|
min-width: 1.5rem;
|
|
175
179
|
min-height: 1.5rem;
|
|
176
180
|
width: 1.5rem;
|
|
177
181
|
height: 1.5rem;
|
|
178
|
-
color: var(--
|
|
182
|
+
color: var(--wizard-step-indicator-future-color);
|
|
179
183
|
line-height: 1.5rem;
|
|
180
184
|
background-color: var(--light);
|
|
181
185
|
box-sizing: content-box;
|
|
@@ -183,7 +187,7 @@
|
|
|
183
187
|
|
|
184
188
|
.two-line-text-overflow {
|
|
185
189
|
max-height: 2rem;
|
|
186
|
-
display:
|
|
190
|
+
display: none;
|
|
187
191
|
-webkit-line-clamp: 2;
|
|
188
192
|
-webkit-box-orient: vertical;
|
|
189
193
|
overflow: hidden;
|
|
@@ -195,10 +199,16 @@
|
|
|
195
199
|
font-size: 0.75rem;
|
|
196
200
|
line-height: 1rem;
|
|
197
201
|
overflow: hidden;
|
|
198
|
-
color: var(--
|
|
202
|
+
color: var(--default);
|
|
199
203
|
text-align: center;
|
|
200
204
|
}
|
|
201
205
|
|
|
202
206
|
.checkmark {
|
|
203
207
|
font-size: 0.875rem;
|
|
204
208
|
}
|
|
209
|
+
|
|
210
|
+
@media only screen and (min-width: 30em) {
|
|
211
|
+
.two-line-text-overflow {
|
|
212
|
+
display: unset;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
@@ -28,6 +28,23 @@ interface CSSProperties {
|
|
|
28
28
|
colorTertiary?: string;
|
|
29
29
|
lightPink?: string;
|
|
30
30
|
vividViolet?: string;
|
|
31
|
+
colorPrimary300?: string;
|
|
32
|
+
colorPrimary500?: string;
|
|
33
|
+
colorPrimary600?: string;
|
|
34
|
+
colorPrimary700?: string;
|
|
35
|
+
colorPrimary900?: string;
|
|
36
|
+
colorBlueGrey100?: string;
|
|
37
|
+
colorBlueGrey200?: string;
|
|
38
|
+
colorBlueGrey400?: string;
|
|
39
|
+
colorBlueGrey25?: string;
|
|
40
|
+
colorBlueGrey500?: string;
|
|
41
|
+
colorBlueGrey700?: string;
|
|
42
|
+
colorBlueGrey900?: string;
|
|
43
|
+
colorGreen500?: string;
|
|
44
|
+
colorLightBlue500?: string;
|
|
45
|
+
colorLightBlue600?: string;
|
|
46
|
+
colorOrange500?: string;
|
|
47
|
+
colorRed500?: string;
|
|
31
48
|
defaultLineHeight?: string;
|
|
32
49
|
buttonBorderRadius?: string;
|
|
33
50
|
buttonBorderWidth?: string;
|
|
@@ -41,6 +58,7 @@ interface CSSProperties {
|
|
|
41
58
|
inputBorderWidthFocus?: string;
|
|
42
59
|
inputBorderStyle?: string;
|
|
43
60
|
inputBackgroundColor?: string;
|
|
61
|
+
dragBackgroundColor?: string;
|
|
44
62
|
dragBorderStyle?: string;
|
|
45
63
|
modalShadowColor?: string;
|
|
46
64
|
modalBackgroundColor?: string;
|
|
@@ -53,6 +71,7 @@ interface CSSProperties {
|
|
|
53
71
|
snackbarErrorBackgroundColor?: string;
|
|
54
72
|
snackbarBorderRadius?: string;
|
|
55
73
|
bannerBorderRadius?: string;
|
|
74
|
+
bannerBorderWidth?: string;
|
|
56
75
|
dataGridRowBackgroundColor?: string;
|
|
57
76
|
dataGridRowHoverBackgroundColor?: string;
|
|
58
77
|
tabsBackgroundColor?: string;
|
|
@@ -62,6 +81,7 @@ interface CSSProperties {
|
|
|
62
81
|
tablistBorderStyle?: string;
|
|
63
82
|
tablistBorderColor?: string;
|
|
64
83
|
tabTextColor?: string;
|
|
84
|
+
wizardStepIndicatorFutureColor?: string;
|
|
65
85
|
default?: string;
|
|
66
86
|
success?: string;
|
|
67
87
|
error?: string;
|
|
@@ -90,53 +110,74 @@ export interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
|
90
110
|
|
|
91
111
|
export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
92
112
|
const defaultProperties: CSSProperties = {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
113
|
+
colorPrimary300: "#6871BF",
|
|
114
|
+
colorPrimary500: "#041295",
|
|
115
|
+
colorPrimary600: "#030F77",
|
|
116
|
+
colorPrimary700: "#020B59",
|
|
117
|
+
colorPrimary900: "#01041E",
|
|
118
|
+
colorBlueGrey25: "#F7F7F9",
|
|
119
|
+
colorBlueGrey100: "#DEDEE6",
|
|
120
|
+
colorBlueGrey200: "#BCBECE",
|
|
121
|
+
colorBlueGrey400: "#797D9C",
|
|
122
|
+
colorBlueGrey500: "#5D607E",
|
|
123
|
+
colorBlueGrey700: "#383A4B",
|
|
124
|
+
colorBlueGrey900: "#131319",
|
|
125
|
+
colorGreen500: "#178244",
|
|
126
|
+
colorLightBlue500: "#00BCDD",
|
|
127
|
+
colorLightBlue600: "#0096B1",
|
|
128
|
+
colorOrange500: "#E07900",
|
|
129
|
+
colorRed500: "#E01E00",
|
|
130
|
+
colorFocus: "var(--color-primary300)",
|
|
131
|
+
colorPrimary: "var(--color-primary500)",
|
|
132
|
+
colorSecondary: "var(--color-blue-grey700)",
|
|
133
|
+
colorTertiary: "var(--color-light-blue600)",
|
|
97
134
|
lightPink: "#9E006B1A",
|
|
98
135
|
vividViolet: "#9E006B",
|
|
99
|
-
defaultLineHeight: "
|
|
100
|
-
buttonBorderRadius: "
|
|
136
|
+
defaultLineHeight: "1.5",
|
|
137
|
+
buttonBorderRadius: "2px",
|
|
101
138
|
buttonBorderWidth: "2px",
|
|
102
139
|
buttonFontSize: "1rem",
|
|
103
140
|
buttonBorderStyle: "solid",
|
|
104
141
|
buttonFillTextColor: "var(--light)",
|
|
105
142
|
buttonFillHoverBackgroundColor: "var(--light)",
|
|
106
143
|
buttonOutlineHoverTextColor: "var(--light)",
|
|
107
|
-
inputBorderRadius: "
|
|
144
|
+
inputBorderRadius: "2px",
|
|
108
145
|
inputBorderWidth: "1px",
|
|
109
146
|
inputBorderWidthFocus: "2px",
|
|
110
147
|
inputBorderStyle: "solid",
|
|
111
148
|
inputBackgroundColor: "var(--light)",
|
|
149
|
+
dragBackgroundColor: "#1313191A",
|
|
150
|
+
dragBorderStyle: "dashed",
|
|
112
151
|
modalShadowColor: "rgba(0, 0, 0, 0.16)",
|
|
113
|
-
modalBackgroundColor: "
|
|
152
|
+
modalBackgroundColor: "var(--color-blue-grey25)",
|
|
114
153
|
modalHeaderBackgroundColor: "var(--light)",
|
|
115
154
|
skeletonBackgroundColor: "var(--disabled)",
|
|
116
155
|
skeletonAnimationColorRgb: "255, 255, 255",
|
|
117
156
|
snackbarTextColor: "var(--light)",
|
|
118
|
-
snackbarInfoBackgroundColor: "
|
|
119
|
-
snackbarSuccessBackgroundColor: "
|
|
120
|
-
snackbarErrorBackgroundColor: "
|
|
121
|
-
snackbarBorderRadius: "
|
|
122
|
-
bannerBorderRadius: "
|
|
157
|
+
snackbarInfoBackgroundColor: "var(--color-primary500)",
|
|
158
|
+
snackbarSuccessBackgroundColor: "var(--color-green500)",
|
|
159
|
+
snackbarErrorBackgroundColor: "var(--color-red500)",
|
|
160
|
+
snackbarBorderRadius: "2px",
|
|
161
|
+
bannerBorderRadius: "2px",
|
|
162
|
+
bannerBorderWidth: "0 0 0 4px",
|
|
123
163
|
dataGridRowBackgroundColor: "transparent",
|
|
124
|
-
dataGridRowHoverBackgroundColor: "
|
|
164
|
+
dataGridRowHoverBackgroundColor: "var(--color-blue-grey25)",
|
|
125
165
|
tabsBackgroundColor: "var(--light)",
|
|
126
|
-
tabActiveBorderHeight: "
|
|
166
|
+
tabActiveBorderHeight: "4px",
|
|
127
167
|
tabActiveBorderColor: "var(--color-primary)",
|
|
128
168
|
tablistBorderWidth: "1px",
|
|
129
169
|
tablistBorderStyle: "solid",
|
|
130
|
-
tablistBorderColor: "
|
|
131
|
-
tabTextColor: "
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
170
|
+
tablistBorderColor: "var(--color-blue-grey100)",
|
|
171
|
+
tabTextColor: "var(--color-blue-grey900)",
|
|
172
|
+
wizardStepIndicatorFutureColor: "var(--color-blue-grey200)",
|
|
173
|
+
default: "var(--color-blue-grey900)",
|
|
174
|
+
success: "var(--color-green500)",
|
|
175
|
+
error: "var(--color-red500)",
|
|
176
|
+
info: "var(--color-primary500)",
|
|
177
|
+
disabled: "var(--color-blue-grey100)",
|
|
178
|
+
greyedOut: "var(--color-blue-grey500)",
|
|
179
|
+
lightGreyBorder: "var(--color-blue-grey100)",
|
|
180
|
+
warning: "var(--color-orange500)",
|
|
140
181
|
light: "#FFF",
|
|
141
182
|
grey: "#c3c3c7",
|
|
142
183
|
fontFamily: "Roboto, sans-serif",
|
|
@@ -147,8 +188,7 @@ export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
|
147
188
|
fontSizeH3: "1.5rem",
|
|
148
189
|
fontSizeH4: "1.25rem",
|
|
149
190
|
fontSizeSub: ".75rem",
|
|
150
|
-
fontSizeCode: "1rem"
|
|
151
|
-
dragBorderStyle: "dashed"
|
|
191
|
+
fontSizeCode: "1rem"
|
|
152
192
|
};
|
|
153
193
|
|
|
154
194
|
/** We need a loading state, because otherwise you see the colors flash from the default to the possible overridden ones. */
|
package/src/mixins.module.scss
CHANGED
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
color: var(--button-fill-text-color);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
font-weight:
|
|
33
|
+
font-weight: 500;
|
|
34
34
|
} @else if $variant == "outline" {
|
|
35
35
|
background-color: var(--white);
|
|
36
|
-
font-weight:
|
|
36
|
+
font-weight: 500;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
&.primary:not(#{$disabledSelector}) {
|