dibk-design 0.4.45 → 0.4.48
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/LICENSE +674 -674
- package/README.md +3 -3
- package/dist/components/Accordion.md +15 -15
- package/dist/components/Accordion.module.scss +205 -205
- package/dist/components/Button.md +75 -75
- package/dist/components/Button.module.scss +232 -232
- package/dist/components/CheckBoxIcon.md +38 -38
- package/dist/components/CheckBoxIcon.module.scss +62 -62
- package/dist/components/CheckBoxInput.md +58 -58
- package/dist/components/CheckBoxInput.module.scss +24 -24
- package/dist/components/CheckBoxListItem.md +82 -82
- package/dist/components/CheckBoxListItem.module.scss +71 -71
- package/dist/components/Container.js +64 -0
- package/dist/components/Container.md +7 -0
- package/dist/components/Container.module.scss +10 -0
- package/dist/components/ContentBox.md +46 -46
- package/dist/components/ContentBox.module.scss +116 -116
- package/dist/components/Dialog.md +5 -5
- package/dist/components/Dialog.module.scss +78 -78
- package/dist/components/DragAndDropFileInput.js +8 -4
- package/dist/components/DragAndDropFileInput.md +13 -13
- package/dist/components/DragAndDropFileInput.module.scss +36 -45
- package/dist/components/ErrorMessage.js +80 -0
- package/dist/components/ErrorMessage.md +15 -0
- package/dist/components/ErrorMessage.module.scss +16 -0
- package/dist/components/Footer.js +3 -3
- package/dist/components/Footer.md +7 -7
- package/dist/components/Footer.module.scss +20 -11
- package/dist/components/Header.md +11 -11
- package/dist/components/Header.module.scss +64 -64
- package/dist/components/InputField.js +6 -11
- package/dist/components/InputField.md +41 -41
- package/dist/components/InputField.module.scss +81 -95
- package/dist/components/Label.md +9 -9
- package/dist/components/Label.module.scss +16 -16
- package/dist/components/List.md +10 -10
- package/dist/components/List.module.scss +18 -18
- package/dist/components/LoadingAnimation.md +5 -5
- package/dist/components/LoadingAnimation.module.scss +26 -26
- package/dist/components/NavigationBar.md +42 -42
- package/dist/components/NavigationBar.module.scss +176 -176
- package/dist/components/NavigationBarListItem.md +15 -15
- package/dist/components/Paper.md +9 -9
- package/dist/components/Paper.module.scss +18 -18
- package/dist/components/ProgressBar.js +31 -0
- package/dist/components/ProgressBar.md +13 -0
- package/dist/components/ProgressBar.module.scss +37 -0
- package/dist/components/RadioButtonIcon.js +101 -101
- package/dist/components/RadioButtonIcon.md +41 -41
- package/dist/components/RadioButtonIcon.module.scss +44 -44
- package/dist/components/RadioButtonInput.js +97 -97
- package/dist/components/RadioButtonInput.md +32 -32
- package/dist/components/RadioButtonInput.module.scss +26 -26
- package/dist/components/RadioButtonListItem.md +70 -70
- package/dist/components/RadioButtonListItem.module.scss +71 -71
- package/dist/components/Select.js +6 -11
- package/dist/components/Select.md +28 -28
- package/dist/components/Select.module.scss +86 -100
- package/dist/components/Textarea.js +6 -11
- package/dist/components/Textarea.md +27 -27
- package/dist/components/Textarea.module.scss +58 -72
- package/dist/components/Theme.md +12 -12
- package/dist/components/Theme.module.scss +76 -76
- package/dist/components/WizardNavigation/Step.module.scss +75 -75
- package/dist/components/WizardNavigation.md +84 -84
- package/dist/components/WizardNavigation.module.scss +3 -3
- package/dist/fonts/Altis-Light.svg +326 -326
- package/dist/fonts/open-sans-v27-latin-ext_latin-300.svg +346 -346
- package/dist/fonts/open-sans-v27-latin-ext_latin-300italic.svg +377 -377
- package/dist/fonts/open-sans-v27-latin-ext_latin-700.svg +349 -349
- package/dist/fonts/open-sans-v27-latin-ext_latin-700italic.svg +379 -379
- package/dist/fonts/open-sans-v27-latin-ext_latin-italic.svg +379 -379
- package/dist/fonts/open-sans-v27-latin-ext_latin-regular.svg +349 -349
- package/dist/images/dibk-logo-mobile.svg +91 -91
- package/dist/images/dibk-logo.svg +991 -991
- package/dist/images/spinner.svg +56 -56
- package/dist/index.js +24 -0
- package/dist/style/abstracts/_all.scss +1 -1
- package/dist/style/abstracts/mixins/_all.scss +12 -12
- package/dist/style/abstracts/mixins/_animation.scss +6 -6
- package/dist/style/abstracts/mixins/_appearance.scss +5 -5
- package/dist/style/abstracts/mixins/_border-radius.scss +31 -31
- package/dist/style/abstracts/mixins/_box-shadow.scss +5 -5
- package/dist/style/abstracts/mixins/_box-sizing.scss +5 -5
- package/dist/style/abstracts/mixins/_calc.scss +5 -5
- package/dist/style/abstracts/mixins/_keyframes.scss +14 -14
- package/dist/style/abstracts/mixins/_opacity.scss +5 -5
- package/dist/style/abstracts/mixins/_placeholder.scss +17 -17
- package/dist/style/abstracts/mixins/_scrollbar.scss +26 -26
- package/dist/style/abstracts/mixins/_transform.scss +6 -6
- package/dist/style/abstracts/mixins/_transition.scss +34 -34
- package/dist/style/abstracts/variables/_all.scss +2 -2
- package/dist/style/abstracts/variables/_colors.scss +28 -29
- package/dist/style/abstracts/variables/_typography.scss +1 -1
- package/dist/style/abstracts/variables/_viewports.scss +14 -14
- package/dist/style/base/_all.scss +1 -1
- package/dist/style/base/_reset.scss +15 -15
- package/dist/style/base/_typography.scss +6 -6
- package/dist/style/base/fonts.css +95 -95
- package/dist/style/global.scss +3 -3
- package/dist/style/layout/_containers.scss +9 -9
- package/package.json +43 -43
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
Select example:
|
|
2
|
-
|
|
3
|
-
```js
|
|
4
|
-
<Select id="select1" onChange={()=>{console.log('onchange')}} options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
5
|
-
<Select id="select2" onChange={()=>{console.log('onchange')}} label="Select with label" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
6
|
-
<Select id="select3" onChange={()=>{console.log('onchange')}} label="Select with label and selected value" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
7
|
-
<Select id="select4" onChange={()=>{console.log('onchange')}} label="Select with label and defaultValue" defaultValue="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
8
|
-
<Select id="select5" onChange={()=>{console.log('onchange')}} label="Select with label, selected value, errors and error message" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} hasErrors={true} errorMessage="Wrong value selected" />
|
|
9
|
-
<Select id="select6" onChange={()=>{console.log('onchange')}} label={['Select with ', <a key="labelLink" href="#">link</a>, ' in label']} value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
10
|
-
<Select id="select7" onChange={()=>{console.log('onchange')}} label="Select with label and placeholder" placeholder="Select from list" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
11
|
-
<Select id="select8" onChange={()=>{console.log('onchange')}} label="Select with label, placeholder and placeholderValue" placeholder="Select from list" placeholderValue="notSelected" value="notSelected" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
12
|
-
<Select id="select9" onChange={()=>{console.log('onchange')}} label="Select with label, selected value and contentOnly set to true" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} contentOnly={true} />
|
|
13
|
-
<Select id="select10" onChange={()=>{console.log('onchange')}} label="Select with label, selected value, contentOnly set to true and keyAsContent set to true" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} contentOnly={true} keyAsContent={true} />
|
|
14
|
-
<Select id="select11" onChange={()=>{console.log('onchange')}} label="Select with label, selected value is string, contentOnly set to true and keyAsContent set to true" value="option 2" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} contentOnly={true} keyAsContent={true} />
|
|
15
|
-
<Select id="select12" onChange={()=>{console.log('onchange')}} label="Select with label, contentOnly set to true, no value and defaultContent" contentOnly={true} defaultContent="No value selected" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
16
|
-
<Select id="select2" onChange={()=>{console.log('onchange')}} label="Select with custom width" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} width="250px" />
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Themed select example:
|
|
20
|
-
|
|
21
|
-
```js
|
|
22
|
-
import customTheme from 'data/customTheme';
|
|
23
|
-
<React.Fragment>
|
|
24
|
-
<Select id="themedSelect3" onChange={()=>{console.log('onchange')}} label="Select with label and selected value" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} theme={customTheme} />
|
|
25
|
-
<Select id="themedSelect4" onChange={()=>{console.log('onchange')}} label="Select with label, selected value, errors and error message" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} hasErrors={true} errorMessage="Wrong value selected" theme={customTheme} />
|
|
26
|
-
<Select id="themedSelect5" onChange={()=>{console.log('onchange')}} label={['Select with ', <a key="labelLink" href="#">link</a>, ' in label']} value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} theme={customTheme} />
|
|
27
|
-
</React.Fragment>
|
|
28
|
-
```
|
|
1
|
+
Select example:
|
|
2
|
+
|
|
3
|
+
```js
|
|
4
|
+
<Select id="select1" onChange={()=>{console.log('onchange')}} options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
5
|
+
<Select id="select2" onChange={()=>{console.log('onchange')}} label="Select with label" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
6
|
+
<Select id="select3" onChange={()=>{console.log('onchange')}} label="Select with label and selected value" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
7
|
+
<Select id="select4" onChange={()=>{console.log('onchange')}} label="Select with label and defaultValue" defaultValue="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
8
|
+
<Select id="select5" onChange={()=>{console.log('onchange')}} label="Select with label, selected value, errors and error message" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} hasErrors={true} errorMessage="Wrong value selected" />
|
|
9
|
+
<Select id="select6" onChange={()=>{console.log('onchange')}} label={['Select with ', <a key="labelLink" href="#">link</a>, ' in label']} value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
10
|
+
<Select id="select7" onChange={()=>{console.log('onchange')}} label="Select with label and placeholder" placeholder="Select from list" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
11
|
+
<Select id="select8" onChange={()=>{console.log('onchange')}} label="Select with label, placeholder and placeholderValue" placeholder="Select from list" placeholderValue="notSelected" value="notSelected" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
12
|
+
<Select id="select9" onChange={()=>{console.log('onchange')}} label="Select with label, selected value and contentOnly set to true" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} contentOnly={true} />
|
|
13
|
+
<Select id="select10" onChange={()=>{console.log('onchange')}} label="Select with label, selected value, contentOnly set to true and keyAsContent set to true" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} contentOnly={true} keyAsContent={true} />
|
|
14
|
+
<Select id="select11" onChange={()=>{console.log('onchange')}} label="Select with label, selected value is string, contentOnly set to true and keyAsContent set to true" value="option 2" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} contentOnly={true} keyAsContent={true} />
|
|
15
|
+
<Select id="select12" onChange={()=>{console.log('onchange')}} label="Select with label, contentOnly set to true, no value and defaultContent" contentOnly={true} defaultContent="No value selected" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
|
|
16
|
+
<Select id="select2" onChange={()=>{console.log('onchange')}} label="Select with custom width" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} width="250px" />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Themed select example:
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import customTheme from 'data/customTheme';
|
|
23
|
+
<React.Fragment>
|
|
24
|
+
<Select id="themedSelect3" onChange={()=>{console.log('onchange')}} label="Select with label and selected value" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} theme={customTheme} />
|
|
25
|
+
<Select id="themedSelect4" onChange={()=>{console.log('onchange')}} label="Select with label, selected value, errors and error message" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} hasErrors={true} errorMessage="Wrong value selected" theme={customTheme} />
|
|
26
|
+
<Select id="themedSelect5" onChange={()=>{console.log('onchange')}} label={['Select with ', <a key="labelLink" href="#">link</a>, ' in label']} value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} theme={customTheme} />
|
|
27
|
+
</React.Fragment>
|
|
28
|
+
```
|
|
@@ -1,100 +1,86 @@
|
|
|
1
|
-
@import "../style/global.scss";
|
|
2
|
-
|
|
3
|
-
:local(.select) {
|
|
4
|
-
:local(.selectContainer) {
|
|
5
|
-
position: relative;
|
|
6
|
-
|
|
7
|
-
:local(.selectListArrow) {
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
position: absolute;
|
|
10
|
-
top: 15px;
|
|
11
|
-
right: 15px;
|
|
12
|
-
display: block;
|
|
13
|
-
width: 12px;
|
|
14
|
-
height: 12px;
|
|
15
|
-
border-radius: 100px;
|
|
16
|
-
@media only screen and (min-width: $screen-sm) {
|
|
17
|
-
top: 20px;
|
|
18
|
-
right: 20px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&::after {
|
|
22
|
-
content: "";
|
|
23
|
-
display: block;
|
|
24
|
-
box-sizing: border-box;
|
|
25
|
-
position: absolute;
|
|
26
|
-
width: 12px;
|
|
27
|
-
height: 12px;
|
|
28
|
-
border-bottom: 2px solid;
|
|
29
|
-
border-right: 2px solid;
|
|
30
|
-
transform: translateY(-30%) rotate(45deg);
|
|
31
|
-
transition: transform 0.3s ease-in-out;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
select {
|
|
36
|
-
@include border-radius(0);
|
|
37
|
-
@include transition(border-color 0.15s linear);
|
|
38
|
-
@include appearance(none);
|
|
39
|
-
@include box-shadow(none);
|
|
40
|
-
height: 47px;
|
|
41
|
-
color: rgba(0, 0, 0, 0.75);
|
|
42
|
-
width: 100%;
|
|
43
|
-
font-family: inherit;
|
|
44
|
-
font-size: 16px;
|
|
45
|
-
padding: 10px 40px 10px 10px;
|
|
46
|
-
border: 1px solid #afaba8;
|
|
47
|
-
border-radius: 0;
|
|
48
|
-
line-height: normal;
|
|
49
|
-
background: white;
|
|
50
|
-
cursor: pointer;
|
|
51
|
-
@media only screen and (min-width: $screen-sm) {
|
|
52
|
-
font-size: 19px;
|
|
53
|
-
height: 56px;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&:hover {
|
|
57
|
-
border-color: $color-dark-blue;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&:focus {
|
|
61
|
-
border-color: $color-dark-blue;
|
|
62
|
-
outline-color: #54acb8;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
&[disabled],
|
|
66
|
-
&[readonly] {
|
|
67
|
-
background-color: #ddd;
|
|
68
|
-
cursor: default;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&:local(.hasErrors) {
|
|
72
|
-
border-color: $color-error;
|
|
73
|
-
&:focus {
|
|
74
|
-
border-color: $color-error;
|
|
75
|
-
outline-color: #b8565d;
|
|
76
|
-
}
|
|
77
|
-
&[disabled],
|
|
78
|
-
&[readonly] {
|
|
79
|
-
background-color: #ddd;
|
|
80
|
-
cursor: default;
|
|
81
|
-
border-color: #afaba8;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
display: block;
|
|
88
|
-
color: $color-error-text;
|
|
89
|
-
font-size: 16px;
|
|
90
|
-
font-weight: 400;
|
|
91
|
-
line-height: 1.2;
|
|
92
|
-
margin: 4px 0;
|
|
93
|
-
font-family: "Open Sans", sans-serif;
|
|
94
|
-
font-style: italic;
|
|
95
|
-
overflow-wrap: break-word;
|
|
96
|
-
@media only screen and (min-width: $screen-sm) {
|
|
97
|
-
font-size: 19px;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
1
|
+
@import "../style/global.scss";
|
|
2
|
+
|
|
3
|
+
:local(.select) {
|
|
4
|
+
:local(.selectContainer) {
|
|
5
|
+
position: relative;
|
|
6
|
+
|
|
7
|
+
:local(.selectListArrow) {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
position: absolute;
|
|
10
|
+
top: 15px;
|
|
11
|
+
right: 15px;
|
|
12
|
+
display: block;
|
|
13
|
+
width: 12px;
|
|
14
|
+
height: 12px;
|
|
15
|
+
border-radius: 100px;
|
|
16
|
+
@media only screen and (min-width: $screen-sm) {
|
|
17
|
+
top: 20px;
|
|
18
|
+
right: 20px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&::after {
|
|
22
|
+
content: "";
|
|
23
|
+
display: block;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
position: absolute;
|
|
26
|
+
width: 12px;
|
|
27
|
+
height: 12px;
|
|
28
|
+
border-bottom: 2px solid;
|
|
29
|
+
border-right: 2px solid;
|
|
30
|
+
transform: translateY(-30%) rotate(45deg);
|
|
31
|
+
transition: transform 0.3s ease-in-out;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
select {
|
|
36
|
+
@include border-radius(0);
|
|
37
|
+
@include transition(border-color 0.15s linear);
|
|
38
|
+
@include appearance(none);
|
|
39
|
+
@include box-shadow(none);
|
|
40
|
+
height: 47px;
|
|
41
|
+
color: rgba(0, 0, 0, 0.75);
|
|
42
|
+
width: 100%;
|
|
43
|
+
font-family: inherit;
|
|
44
|
+
font-size: 16px;
|
|
45
|
+
padding: 10px 40px 10px 10px;
|
|
46
|
+
border: 1px solid #afaba8;
|
|
47
|
+
border-radius: 0;
|
|
48
|
+
line-height: normal;
|
|
49
|
+
background: white;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
@media only screen and (min-width: $screen-sm) {
|
|
52
|
+
font-size: 19px;
|
|
53
|
+
height: 56px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:hover {
|
|
57
|
+
border-color: $color-dark-blue;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:focus {
|
|
61
|
+
border-color: $color-dark-blue;
|
|
62
|
+
outline-color: #54acb8;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&[disabled],
|
|
66
|
+
&[readonly] {
|
|
67
|
+
background-color: #ddd;
|
|
68
|
+
cursor: default;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:local(.hasErrors) {
|
|
72
|
+
border-color: $color-error;
|
|
73
|
+
&:focus {
|
|
74
|
+
border-color: $color-error;
|
|
75
|
+
outline-color: #b8565d;
|
|
76
|
+
}
|
|
77
|
+
&[disabled],
|
|
78
|
+
&[readonly] {
|
|
79
|
+
background-color: #ddd;
|
|
80
|
+
cursor: default;
|
|
81
|
+
border-color: #afaba8;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -13,6 +13,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _Label = _interopRequireDefault(require("./Label"));
|
|
15
15
|
|
|
16
|
+
var _ErrorMessage = _interopRequireDefault(require("./ErrorMessage"));
|
|
17
|
+
|
|
16
18
|
var _theme = require("../functions/theme");
|
|
17
19
|
|
|
18
20
|
var _generators = require("../functions/generators");
|
|
@@ -66,13 +68,6 @@ var Textarea = /*#__PURE__*/function (_React$Component) {
|
|
|
66
68
|
borderColor: (0, _theme.getThemePaletteBackgroundColor)(theme, 'warning')
|
|
67
69
|
};
|
|
68
70
|
}
|
|
69
|
-
}, {
|
|
70
|
-
key: "getThemeErrorMessageStyle",
|
|
71
|
-
value: function getThemeErrorMessageStyle(theme) {
|
|
72
|
-
return {
|
|
73
|
-
color: (0, _theme.getThemePaletteBackgroundColor)(theme, 'warning')
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
71
|
}, {
|
|
77
72
|
key: "renderValueAsText",
|
|
78
73
|
value: function renderValueAsText(value, defaultContent) {
|
|
@@ -111,10 +106,10 @@ var Textarea = /*#__PURE__*/function (_React$Component) {
|
|
|
111
106
|
className: _TextareaModule.default.textarea
|
|
112
107
|
}, /*#__PURE__*/_react.default.createElement(_Label.default, {
|
|
113
108
|
htmlFor: this.props.id
|
|
114
|
-
}, this.props.label), !this.props.contentOnly ? this.renderInputField() : /*#__PURE__*/_react.default.createElement("span", null, this.renderValueAsText(this.props.value || this.props.defaultValue, this.props.defaultContent)), /*#__PURE__*/_react.default.createElement(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
109
|
+
}, this.props.label), !this.props.contentOnly ? this.renderInputField() : /*#__PURE__*/_react.default.createElement("span", null, this.renderValueAsText(this.props.value || this.props.defaultValue, this.props.defaultContent)), /*#__PURE__*/_react.default.createElement(_ErrorMessage.default, {
|
|
110
|
+
content: this.props.errorMessage,
|
|
111
|
+
theme: this.props.theme
|
|
112
|
+
}));
|
|
118
113
|
}
|
|
119
114
|
}]);
|
|
120
115
|
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
Input field example:
|
|
2
|
-
|
|
3
|
-
```js
|
|
4
|
-
<Textarea id="textInput1" onChange={()=>{console.log('onchange')}} mandatory={true} />
|
|
5
|
-
<Textarea id="textInput2" onChange={()=>{console.log('onchange')}} value="Textarea with value" />
|
|
6
|
-
<Textarea id="textInput3" onChange={()=>{console.log('onchange')}} defaultValue="Textarea with defaultValue" />
|
|
7
|
-
<Textarea id="textInput4" onChange={()=>{console.log('onchange')}} value="Textarea with label and value" label="Textarea with label and value" />
|
|
8
|
-
<Textarea id="textInput5" onChange={()=>{console.log('onchange')}} value="Textarea with link in label" label={['Textarea with ', <a key="labelLink" href="#">link</a>, ' in label']} />
|
|
9
|
-
<Textarea id="textInput6" onChange={()=>{console.log('onchange')}} value="Textarea with label, value, errors and error message" label="Textarea with label, value, errors and error message" hasErrors={true} errorMessage="Wrong value" />
|
|
10
|
-
<Textarea id="textInput7" onChange={()=>{console.log('onchange')}} readOnly value="Read only Textarea with label and value" label="Read only Textarea with label and value" />
|
|
11
|
-
<Textarea id="textInput8" onChange={()=>{console.log('onchange')}} disabled value="Disabled Textarea with label and value" label="Disabled Textarea with label and value" />
|
|
12
|
-
<Textarea id="textInput9" onChange={()=>{console.log('onchange')}} value="Value for Textarea" label="Textarea with label, value and contentOnly set to true" contentOnly={true} />
|
|
13
|
-
<Textarea id="textInput10" onChange={() => {console.log('onChange')}} label="Textarea without value, contentOnly set to true and defaultContent" contentOnly={true} defaultContent="Please insert a value" />
|
|
14
|
-
<Textarea id="textInput11" onChange={()=>{console.log('onchange')}} value="Textarea with custom width" width="320px" />
|
|
15
|
-
<Textarea id="textInput11" onChange={()=>{console.log('onchange')}} value="Textarea with custom width and vertical resizing" width="450px" resize="vertical" />
|
|
16
|
-
<Textarea id="textInput11" onChange={()=>{console.log('onchange')}} value="Textarea with a not auto generated key" elementKey="textareaKeyHere" />
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Themed Input field example:
|
|
20
|
-
|
|
21
|
-
```js
|
|
22
|
-
import customTheme from 'data/customTheme';
|
|
23
|
-
<React.Fragment>
|
|
24
|
-
<Textarea id="themedTextInput4" onChange={()=>{console.log('onchange')}} value="Textarea with link in label" label={['Textarea with ', <a key="labelLink" href="#">link</a>, ' in label']} theme={customTheme} />
|
|
25
|
-
<Textarea id="themedTextInput5" onChange={()=>{console.log('onchange')}} value="Textarea with label, value, errors and error message" label="Textarea with label, value, errors and error message" hasErrors={true} errorMessage="Wrong value" theme={customTheme} />
|
|
26
|
-
</React.Fragment>
|
|
27
|
-
```
|
|
1
|
+
Input field example:
|
|
2
|
+
|
|
3
|
+
```js
|
|
4
|
+
<Textarea id="textInput1" onChange={()=>{console.log('onchange')}} mandatory={true} />
|
|
5
|
+
<Textarea id="textInput2" onChange={()=>{console.log('onchange')}} value="Textarea with value" />
|
|
6
|
+
<Textarea id="textInput3" onChange={()=>{console.log('onchange')}} defaultValue="Textarea with defaultValue" />
|
|
7
|
+
<Textarea id="textInput4" onChange={()=>{console.log('onchange')}} value="Textarea with label and value" label="Textarea with label and value" />
|
|
8
|
+
<Textarea id="textInput5" onChange={()=>{console.log('onchange')}} value="Textarea with link in label" label={['Textarea with ', <a key="labelLink" href="#">link</a>, ' in label']} />
|
|
9
|
+
<Textarea id="textInput6" onChange={()=>{console.log('onchange')}} value="Textarea with label, value, errors and error message" label="Textarea with label, value, errors and error message" hasErrors={true} errorMessage="Wrong value" />
|
|
10
|
+
<Textarea id="textInput7" onChange={()=>{console.log('onchange')}} readOnly value="Read only Textarea with label and value" label="Read only Textarea with label and value" />
|
|
11
|
+
<Textarea id="textInput8" onChange={()=>{console.log('onchange')}} disabled value="Disabled Textarea with label and value" label="Disabled Textarea with label and value" />
|
|
12
|
+
<Textarea id="textInput9" onChange={()=>{console.log('onchange')}} value="Value for Textarea" label="Textarea with label, value and contentOnly set to true" contentOnly={true} />
|
|
13
|
+
<Textarea id="textInput10" onChange={() => {console.log('onChange')}} label="Textarea without value, contentOnly set to true and defaultContent" contentOnly={true} defaultContent="Please insert a value" />
|
|
14
|
+
<Textarea id="textInput11" onChange={()=>{console.log('onchange')}} value="Textarea with custom width" width="320px" />
|
|
15
|
+
<Textarea id="textInput11" onChange={()=>{console.log('onchange')}} value="Textarea with custom width and vertical resizing" width="450px" resize="vertical" />
|
|
16
|
+
<Textarea id="textInput11" onChange={()=>{console.log('onchange')}} value="Textarea with a not auto generated key" elementKey="textareaKeyHere" />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Themed Input field example:
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import customTheme from 'data/customTheme';
|
|
23
|
+
<React.Fragment>
|
|
24
|
+
<Textarea id="themedTextInput4" onChange={()=>{console.log('onchange')}} value="Textarea with link in label" label={['Textarea with ', <a key="labelLink" href="#">link</a>, ' in label']} theme={customTheme} />
|
|
25
|
+
<Textarea id="themedTextInput5" onChange={()=>{console.log('onchange')}} value="Textarea with label, value, errors and error message" label="Textarea with label, value, errors and error message" hasErrors={true} errorMessage="Wrong value" theme={customTheme} />
|
|
26
|
+
</React.Fragment>
|
|
27
|
+
```
|
|
@@ -1,72 +1,58 @@
|
|
|
1
|
-
@import "../style/global.scss";
|
|
2
|
-
|
|
3
|
-
:local(.textarea) {
|
|
4
|
-
> div {
|
|
5
|
-
display: block;
|
|
6
|
-
}
|
|
7
|
-
textarea {
|
|
8
|
-
@include appearance(none);
|
|
9
|
-
@include transition(border-color 0.15s linear, background 0.15s linear);
|
|
10
|
-
@include border-radius(0);
|
|
11
|
-
@include box-shadow(none);
|
|
12
|
-
height: auto;
|
|
13
|
-
width: 100%;
|
|
14
|
-
display: block;
|
|
15
|
-
padding: 10px;
|
|
16
|
-
margin-bottom: 0;
|
|
17
|
-
font-weight: 300;
|
|
18
|
-
background-color: #fff;
|
|
19
|
-
box-shadow: none;
|
|
20
|
-
color: rgba(0, 0, 0, 0.75);
|
|
21
|
-
font-family: inherit;
|
|
22
|
-
font-size: 16px;
|
|
23
|
-
box-sizing: border-box;
|
|
24
|
-
border: 1px solid #afaba8;
|
|
25
|
-
@media only screen and (min-width: $screen-sm) {
|
|
26
|
-
font-size: 19px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&:hover {
|
|
30
|
-
border-color: $color-dark-blue;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&:focus {
|
|
34
|
-
border-color: $color-dark-blue;
|
|
35
|
-
outline-color: #54acb8;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&[disabled],
|
|
39
|
-
&[readonly] {
|
|
40
|
-
background-color: #ddd;
|
|
41
|
-
cursor: default;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&:local(.hasErrors) {
|
|
45
|
-
border-color: $color-error;
|
|
46
|
-
&:focus {
|
|
47
|
-
border-color: $color-error;
|
|
48
|
-
outline-color: #b8565d;
|
|
49
|
-
}
|
|
50
|
-
&[disabled],
|
|
51
|
-
&[readonly] {
|
|
52
|
-
background-color: #ddd;
|
|
53
|
-
cursor: default;
|
|
54
|
-
border-color: #afaba8;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
display: block;
|
|
60
|
-
color: $color-error-text;
|
|
61
|
-
font-size: 16px;
|
|
62
|
-
font-weight: 400;
|
|
63
|
-
line-height: 1.2;
|
|
64
|
-
margin: 4px 0;
|
|
65
|
-
font-family: "Open Sans", sans-serif;
|
|
66
|
-
font-style: italic;
|
|
67
|
-
overflow-wrap: break-word;
|
|
68
|
-
@media only screen and (min-width: $screen-sm) {
|
|
69
|
-
font-size: 19px;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
1
|
+
@import "../style/global.scss";
|
|
2
|
+
|
|
3
|
+
:local(.textarea) {
|
|
4
|
+
> div {
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
textarea {
|
|
8
|
+
@include appearance(none);
|
|
9
|
+
@include transition(border-color 0.15s linear, background 0.15s linear);
|
|
10
|
+
@include border-radius(0);
|
|
11
|
+
@include box-shadow(none);
|
|
12
|
+
height: auto;
|
|
13
|
+
width: 100%;
|
|
14
|
+
display: block;
|
|
15
|
+
padding: 10px;
|
|
16
|
+
margin-bottom: 0;
|
|
17
|
+
font-weight: 300;
|
|
18
|
+
background-color: #fff;
|
|
19
|
+
box-shadow: none;
|
|
20
|
+
color: rgba(0, 0, 0, 0.75);
|
|
21
|
+
font-family: inherit;
|
|
22
|
+
font-size: 16px;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
border: 1px solid #afaba8;
|
|
25
|
+
@media only screen and (min-width: $screen-sm) {
|
|
26
|
+
font-size: 19px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
border-color: $color-dark-blue;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:focus {
|
|
34
|
+
border-color: $color-dark-blue;
|
|
35
|
+
outline-color: #54acb8;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&[disabled],
|
|
39
|
+
&[readonly] {
|
|
40
|
+
background-color: #ddd;
|
|
41
|
+
cursor: default;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:local(.hasErrors) {
|
|
45
|
+
border-color: $color-error;
|
|
46
|
+
&:focus {
|
|
47
|
+
border-color: $color-error;
|
|
48
|
+
outline-color: #b8565d;
|
|
49
|
+
}
|
|
50
|
+
&[disabled],
|
|
51
|
+
&[readonly] {
|
|
52
|
+
background-color: #ddd;
|
|
53
|
+
cursor: default;
|
|
54
|
+
border-color: #afaba8;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
package/dist/components/Theme.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
Default theme:
|
|
2
|
-
```js
|
|
3
|
-
<Theme />
|
|
4
|
-
```
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Custom theme:
|
|
9
|
-
```js
|
|
10
|
-
import customTheme from 'data/customTheme';
|
|
11
|
-
<Theme theme={customTheme} />
|
|
12
|
-
```
|
|
1
|
+
Default theme:
|
|
2
|
+
```js
|
|
3
|
+
<Theme />
|
|
4
|
+
```
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Custom theme:
|
|
9
|
+
```js
|
|
10
|
+
import customTheme from 'data/customTheme';
|
|
11
|
+
<Theme theme={customTheme} />
|
|
12
|
+
```
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
@import "../style/global.scss";
|
|
2
|
-
|
|
3
|
-
* {
|
|
4
|
-
color: $color-default-text;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
a {
|
|
8
|
-
color: $color-link;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
img {
|
|
12
|
-
max-width: 200px;
|
|
13
|
-
max-height: 150px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
:local(.colorPalette) {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-wrap: wrap;
|
|
19
|
-
|
|
20
|
-
:local(.color) {
|
|
21
|
-
width: 20%;
|
|
22
|
-
min-width: 120px;
|
|
23
|
-
text-align: center;
|
|
24
|
-
line-height: 3em;
|
|
25
|
-
|
|
26
|
-
&:local(.default) {
|
|
27
|
-
background-color: $color-default;
|
|
28
|
-
color: #000;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&:local(.primary) {
|
|
32
|
-
background-color: $color-primary;
|
|
33
|
-
color: #fff;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&:local(.success) {
|
|
37
|
-
background-color: $color-success;
|
|
38
|
-
color: #fff;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&:local(.warning) {
|
|
42
|
-
background-color: $color-warning;
|
|
43
|
-
color: #fff;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&:local(.info) {
|
|
47
|
-
background-color: $color-info;
|
|
48
|
-
color: #000;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&:local(.lightCyan) {
|
|
52
|
-
background-color: $color-light-cyan;
|
|
53
|
-
color: #000;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&:local(.orange) {
|
|
57
|
-
background-color: $color-orange;
|
|
58
|
-
color: #fff;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&:local(.lightOrange) {
|
|
62
|
-
background-color: $color-light-orange;
|
|
63
|
-
color: #000;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
&:local(.lime) {
|
|
67
|
-
background-color: $color-lime;
|
|
68
|
-
color: #fff;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&:local(.lightLime) {
|
|
72
|
-
background-color: $color-light-lime;
|
|
73
|
-
color: #000;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
1
|
+
@import "../style/global.scss";
|
|
2
|
+
|
|
3
|
+
* {
|
|
4
|
+
color: $color-default-text;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
a {
|
|
8
|
+
color: $color-link;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
img {
|
|
12
|
+
max-width: 200px;
|
|
13
|
+
max-height: 150px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:local(.colorPalette) {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-wrap: wrap;
|
|
19
|
+
|
|
20
|
+
:local(.color) {
|
|
21
|
+
width: 20%;
|
|
22
|
+
min-width: 120px;
|
|
23
|
+
text-align: center;
|
|
24
|
+
line-height: 3em;
|
|
25
|
+
|
|
26
|
+
&:local(.default) {
|
|
27
|
+
background-color: $color-default;
|
|
28
|
+
color: #000;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:local(.primary) {
|
|
32
|
+
background-color: $color-primary;
|
|
33
|
+
color: #fff;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:local(.success) {
|
|
37
|
+
background-color: $color-success;
|
|
38
|
+
color: #fff;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:local(.warning) {
|
|
42
|
+
background-color: $color-warning;
|
|
43
|
+
color: #fff;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:local(.info) {
|
|
47
|
+
background-color: $color-info;
|
|
48
|
+
color: #000;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:local(.lightCyan) {
|
|
52
|
+
background-color: $color-light-cyan;
|
|
53
|
+
color: #000;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:local(.orange) {
|
|
57
|
+
background-color: $color-orange;
|
|
58
|
+
color: #fff;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:local(.lightOrange) {
|
|
62
|
+
background-color: $color-light-orange;
|
|
63
|
+
color: #000;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:local(.lime) {
|
|
67
|
+
background-color: $color-lime;
|
|
68
|
+
color: #fff;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:local(.lightLime) {
|
|
72
|
+
background-color: $color-light-lime;
|
|
73
|
+
color: #000;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|