dibk-design 0.4.44 → 0.4.47
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.js +109 -109
- package/dist/components/CheckBoxIcon.md +38 -38
- package/dist/components/CheckBoxIcon.module.scss +62 -62
- package/dist/components/CheckBoxInput.js +104 -104
- 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 +60 -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 +29 -0
- package/dist/components/ProgressBar.md +13 -0
- package/dist/components/ProgressBar.module.scss +37 -0
- package/dist/components/RadioButtonIcon.js +10 -4
- package/dist/components/RadioButtonIcon.md +41 -41
- package/dist/components/RadioButtonIcon.module.scss +44 -44
- package/dist/components/RadioButtonInput.js +6 -3
- package/dist/components/RadioButtonInput.md +32 -30
- 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,18 +1,18 @@
|
|
|
1
|
-
@import "../style/global.scss";
|
|
2
|
-
|
|
3
|
-
:local(.paper) {
|
|
4
|
-
line-height: 1.6;
|
|
5
|
-
position: relative;
|
|
6
|
-
width: 100%;
|
|
7
|
-
background: white;
|
|
8
|
-
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.18);
|
|
9
|
-
&:not(:local(.noMargin)) {
|
|
10
|
-
margin: 20px 0;
|
|
11
|
-
}
|
|
12
|
-
&:not(:local(.noPadding)) {
|
|
13
|
-
padding: 12px 12px;
|
|
14
|
-
@media only screen and (min-width: $screen-sm) {
|
|
15
|
-
padding: 24px 28px;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
@import "../style/global.scss";
|
|
2
|
+
|
|
3
|
+
:local(.paper) {
|
|
4
|
+
line-height: 1.6;
|
|
5
|
+
position: relative;
|
|
6
|
+
width: 100%;
|
|
7
|
+
background: white;
|
|
8
|
+
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.18);
|
|
9
|
+
&:not(:local(.noMargin)) {
|
|
10
|
+
margin: 20px 0;
|
|
11
|
+
}
|
|
12
|
+
&:not(:local(.noPadding)) {
|
|
13
|
+
padding: 12px 12px;
|
|
14
|
+
@media only screen and (min-width: $screen-sm) {
|
|
15
|
+
padding: 24px 28px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _ProgressBarModule = _interopRequireDefault(require("./ProgressBar.module.scss"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
+
|
|
14
|
+
var ProgressBar = function ProgressBar(_ref) {
|
|
15
|
+
var progress = _ref.progress,
|
|
16
|
+
hasErrors = _ref.hasErrors;
|
|
17
|
+
var scssValueProperty = '--value';
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: "".concat(_ProgressBarModule.default.progressBar, " ").concat(hasErrors ? _ProgressBarModule.default.hasErrors : ''),
|
|
20
|
+
role: "progressbar",
|
|
21
|
+
"aria-valuenow": progress || 0,
|
|
22
|
+
"aria-valuemin": "0",
|
|
23
|
+
"aria-valuemax": "100",
|
|
24
|
+
style: _defineProperty({}, scssValueProperty, progress || 0)
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var _default = ProgressBar;
|
|
29
|
+
exports.default = _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@import "../style/global.scss";
|
|
2
|
+
|
|
3
|
+
@keyframes growProgressBar {
|
|
4
|
+
0%,
|
|
5
|
+
33% {
|
|
6
|
+
--pgPercentage: 0;
|
|
7
|
+
}
|
|
8
|
+
100% {
|
|
9
|
+
--pgPercentage: var(--value);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:local(.progressBar) {
|
|
14
|
+
--size: 4rem;
|
|
15
|
+
--fg: #{$color-primary};
|
|
16
|
+
--bg: #e2e1e0;
|
|
17
|
+
--pgPercentage: var(--value);
|
|
18
|
+
animation: growProgressBar 0.25s 1 forwards;
|
|
19
|
+
width: var(--size);
|
|
20
|
+
height: var(--size);
|
|
21
|
+
border-radius: 50%;
|
|
22
|
+
display: grid;
|
|
23
|
+
place-items: center;
|
|
24
|
+
background: radial-gradient(closest-side, white 80%, transparent 0 99.9%, white 0),
|
|
25
|
+
conic-gradient(var(--fg) calc(var(--pgPercentage) * 1%), var(--bg) 0);
|
|
26
|
+
font-family: Helvetica, Arial, sans-serif;
|
|
27
|
+
font-size: calc(var(--size) / 4);
|
|
28
|
+
color: var(--fg);
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
&::before {
|
|
31
|
+
counter-reset: percentage var(--value);
|
|
32
|
+
content: counter(percentage) "%";
|
|
33
|
+
}
|
|
34
|
+
&:local(.hasErrors) {
|
|
35
|
+
--fg: #{$color-error};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -69,10 +69,14 @@ var RadioButtonIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
var ariaExpandedIndex = "aria-expanded";
|
|
73
|
+
|
|
74
|
+
var props = _defineProperty({
|
|
73
75
|
className: "".concat(_RadioButtonIconModule.default.radioButtonIcon, " ").concat(this.props.checked ? _RadioButtonIconModule.default.checked : '', " ").concat(this.props.disabled ? _RadioButtonIconModule.default.disabled : '', " ").concat(this.props.hasErrors ? _RadioButtonIconModule.default.hasErrors : ''),
|
|
74
76
|
style: inlineStyle
|
|
75
|
-
});
|
|
77
|
+
}, ariaExpandedIndex, this.props.expandable ? this.props.checked.toString() : null);
|
|
78
|
+
|
|
79
|
+
return /*#__PURE__*/_react.default.createElement("span", props);
|
|
76
80
|
}
|
|
77
81
|
}]);
|
|
78
82
|
|
|
@@ -84,13 +88,15 @@ RadioButtonIcon.propTypes = {
|
|
|
84
88
|
checked: _propTypes.default.bool,
|
|
85
89
|
disabled: _propTypes.default.bool,
|
|
86
90
|
theme: _propTypes.default.object,
|
|
87
|
-
hasErrors: _propTypes.default.bool
|
|
91
|
+
hasErrors: _propTypes.default.bool,
|
|
92
|
+
expandable: _propTypes.default.bool
|
|
88
93
|
};
|
|
89
94
|
RadioButtonIcon.defaultProps = {
|
|
90
95
|
size: '10px',
|
|
91
96
|
checked: false,
|
|
92
97
|
disabled: false,
|
|
93
|
-
hasErrors: false
|
|
98
|
+
hasErrors: false,
|
|
99
|
+
expandable: false
|
|
94
100
|
};
|
|
95
101
|
var _default = RadioButtonIcon;
|
|
96
102
|
exports.default = _default;
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
Regular radio button icons example:
|
|
2
|
-
|
|
3
|
-
```js
|
|
4
|
-
<RadioButtonIcon />
|
|
5
|
-
<RadioButtonIcon checked={true} />
|
|
6
|
-
<RadioButtonIcon disabled={true} />
|
|
7
|
-
<RadioButtonIcon checked={true} disabled={true} />
|
|
8
|
-
<RadioButtonIcon hasErrors={true} />
|
|
9
|
-
<RadioButtonIcon hasErrors={true} disabled={true} />
|
|
10
|
-
<RadioButtonIcon checked={true} hasErrors={true} />
|
|
11
|
-
<RadioButtonIcon checked={true} hasErrors={true} disabled={true} />
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Themed Regular radio button icons example:
|
|
15
|
-
|
|
16
|
-
```js
|
|
17
|
-
import customTheme from 'data/customTheme';
|
|
18
|
-
<React.Fragment>
|
|
19
|
-
<RadioButtonIcon theme={customTheme}/>
|
|
20
|
-
<RadioButtonIcon checked={true} theme={customTheme} />
|
|
21
|
-
<RadioButtonIcon theme={customTheme} disabled={true} />
|
|
22
|
-
<RadioButtonIcon checked={true} theme={customTheme} disabled={true} />
|
|
23
|
-
<RadioButtonIcon hasErrors={true} theme={customTheme} />
|
|
24
|
-
<RadioButtonIcon hasErrors={true} disabled={true} theme={customTheme} />
|
|
25
|
-
<RadioButtonIcon checked={true} hasErrors={true} theme={customTheme} />
|
|
26
|
-
<RadioButtonIcon checked={true} hasErrors={true} disabled={true} theme={customTheme} />
|
|
27
|
-
</React.Fragment>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Radio button icons with custom size example:
|
|
31
|
-
|
|
32
|
-
```js
|
|
33
|
-
<RadioButtonIcon size='36px' />
|
|
34
|
-
<RadioButtonIcon size='36px' checked={true} />
|
|
35
|
-
<RadioButtonIcon size='36px' disabled={true} />
|
|
36
|
-
<RadioButtonIcon size='36px' checked={true} disabled={true} />
|
|
37
|
-
<RadioButtonIcon size='36px' hasErrors={true} />
|
|
38
|
-
<RadioButtonIcon size='36px' hasErrors={true} disabled={true} />
|
|
39
|
-
<RadioButtonIcon size='36px' checked={true} hasErrors={true} />
|
|
40
|
-
<RadioButtonIcon size='36px' checked={true} hasErrors={true} disabled={true} />
|
|
41
|
-
```
|
|
1
|
+
Regular radio button icons example:
|
|
2
|
+
|
|
3
|
+
```js
|
|
4
|
+
<RadioButtonIcon />
|
|
5
|
+
<RadioButtonIcon checked={true} />
|
|
6
|
+
<RadioButtonIcon disabled={true} />
|
|
7
|
+
<RadioButtonIcon checked={true} disabled={true} />
|
|
8
|
+
<RadioButtonIcon hasErrors={true} />
|
|
9
|
+
<RadioButtonIcon hasErrors={true} disabled={true} />
|
|
10
|
+
<RadioButtonIcon checked={true} hasErrors={true} />
|
|
11
|
+
<RadioButtonIcon checked={true} hasErrors={true} disabled={true} />
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Themed Regular radio button icons example:
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import customTheme from 'data/customTheme';
|
|
18
|
+
<React.Fragment>
|
|
19
|
+
<RadioButtonIcon theme={customTheme}/>
|
|
20
|
+
<RadioButtonIcon checked={true} theme={customTheme} />
|
|
21
|
+
<RadioButtonIcon theme={customTheme} disabled={true} />
|
|
22
|
+
<RadioButtonIcon checked={true} theme={customTheme} disabled={true} />
|
|
23
|
+
<RadioButtonIcon hasErrors={true} theme={customTheme} />
|
|
24
|
+
<RadioButtonIcon hasErrors={true} disabled={true} theme={customTheme} />
|
|
25
|
+
<RadioButtonIcon checked={true} hasErrors={true} theme={customTheme} />
|
|
26
|
+
<RadioButtonIcon checked={true} hasErrors={true} disabled={true} theme={customTheme} />
|
|
27
|
+
</React.Fragment>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Radio button icons with custom size example:
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
<RadioButtonIcon size='36px' />
|
|
34
|
+
<RadioButtonIcon size='36px' checked={true} />
|
|
35
|
+
<RadioButtonIcon size='36px' disabled={true} />
|
|
36
|
+
<RadioButtonIcon size='36px' checked={true} disabled={true} />
|
|
37
|
+
<RadioButtonIcon size='36px' hasErrors={true} />
|
|
38
|
+
<RadioButtonIcon size='36px' hasErrors={true} disabled={true} />
|
|
39
|
+
<RadioButtonIcon size='36px' checked={true} hasErrors={true} />
|
|
40
|
+
<RadioButtonIcon size='36px' checked={true} hasErrors={true} disabled={true} />
|
|
41
|
+
```
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
@import "../style/global.scss";
|
|
2
|
-
|
|
3
|
-
:local(.radioButtonIcon) {
|
|
4
|
-
@include border-radius(50%);
|
|
5
|
-
@include transition(all 0.1s ease-in-out);
|
|
6
|
-
@include box-sizing(content-box);
|
|
7
|
-
display: inline-block;
|
|
8
|
-
vertical-align: middle;
|
|
9
|
-
min-width: 10px;
|
|
10
|
-
width: 10px;
|
|
11
|
-
height: 10px;
|
|
12
|
-
background: white;
|
|
13
|
-
margin-right: 0.4em;
|
|
14
|
-
margin-top: 2px;
|
|
15
|
-
border: 0.3em solid white;
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
|
|
18
|
-
&:not(:local(.hasErrors)) {
|
|
19
|
-
@include box-shadow(0 0 0 1px #afaba8);
|
|
20
|
-
}
|
|
21
|
-
&:local(.hasErrors) {
|
|
22
|
-
@include box-shadow(0 0 2px 1px #9d2024);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&:local(.checked) {
|
|
26
|
-
background: $color-primary;
|
|
27
|
-
&:local(.hasErrors) {
|
|
28
|
-
background: #9d2024;
|
|
29
|
-
}
|
|
30
|
-
&:not(:local(.hasErrors)) {
|
|
31
|
-
@include box-shadow(0 0 0 1px $color-dark-blue);
|
|
32
|
-
}
|
|
33
|
-
&:local(.hasErrors) {
|
|
34
|
-
@include box-shadow(0 0 2px 1px #9d2024);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
&:local(.disabled) {
|
|
38
|
-
opacity: 0.5;
|
|
39
|
-
border-color: #bfbfbf;
|
|
40
|
-
&:not(&:local(.checked)) {
|
|
41
|
-
background: #bfbfbf;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
1
|
+
@import "../style/global.scss";
|
|
2
|
+
|
|
3
|
+
:local(.radioButtonIcon) {
|
|
4
|
+
@include border-radius(50%);
|
|
5
|
+
@include transition(all 0.1s ease-in-out);
|
|
6
|
+
@include box-sizing(content-box);
|
|
7
|
+
display: inline-block;
|
|
8
|
+
vertical-align: middle;
|
|
9
|
+
min-width: 10px;
|
|
10
|
+
width: 10px;
|
|
11
|
+
height: 10px;
|
|
12
|
+
background: white;
|
|
13
|
+
margin-right: 0.4em;
|
|
14
|
+
margin-top: 2px;
|
|
15
|
+
border: 0.3em solid white;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
|
|
18
|
+
&:not(:local(.hasErrors)) {
|
|
19
|
+
@include box-shadow(0 0 0 1px #afaba8);
|
|
20
|
+
}
|
|
21
|
+
&:local(.hasErrors) {
|
|
22
|
+
@include box-shadow(0 0 2px 1px #9d2024);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:local(.checked) {
|
|
26
|
+
background: $color-primary;
|
|
27
|
+
&:local(.hasErrors) {
|
|
28
|
+
background: #9d2024;
|
|
29
|
+
}
|
|
30
|
+
&:not(:local(.hasErrors)) {
|
|
31
|
+
@include box-shadow(0 0 0 1px $color-dark-blue);
|
|
32
|
+
}
|
|
33
|
+
&:local(.hasErrors) {
|
|
34
|
+
@include box-shadow(0 0 2px 1px #9d2024);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
&:local(.disabled) {
|
|
38
|
+
opacity: 0.5;
|
|
39
|
+
border-color: #bfbfbf;
|
|
40
|
+
&:not(&:local(.checked)) {
|
|
41
|
+
background: #bfbfbf;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -58,7 +58,8 @@ var RadioButtonInput = /*#__PURE__*/function (_React$Component) {
|
|
|
58
58
|
checked: this.props.checked,
|
|
59
59
|
disabled: this.props.disabled,
|
|
60
60
|
theme: this.props.theme,
|
|
61
|
-
hasErrors: this.props.hasErrors
|
|
61
|
+
hasErrors: this.props.hasErrors,
|
|
62
|
+
expandable: this.props.expandable
|
|
62
63
|
}), /*#__PURE__*/_react.default.createElement("input", {
|
|
63
64
|
type: "radio",
|
|
64
65
|
onChange: this.props.onChange,
|
|
@@ -82,14 +83,16 @@ RadioButtonInput.propTypes = {
|
|
|
82
83
|
onChange: _propTypes.default.func,
|
|
83
84
|
contentOnly: _propTypes.default.bool,
|
|
84
85
|
theme: _propTypes.default.object,
|
|
85
|
-
hasErrors: _propTypes.default.bool
|
|
86
|
+
hasErrors: _propTypes.default.bool,
|
|
87
|
+
expandable: _propTypes.default.bool
|
|
86
88
|
};
|
|
87
89
|
RadioButtonInput.defaultProps = {
|
|
88
90
|
name: '',
|
|
89
91
|
checked: false,
|
|
90
92
|
disabled: false,
|
|
91
93
|
contentOnly: false,
|
|
92
|
-
hasErrors: false
|
|
94
|
+
hasErrors: false,
|
|
95
|
+
expandable: false
|
|
93
96
|
};
|
|
94
97
|
var _default = RadioButtonInput;
|
|
95
98
|
exports.default = _default;
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
Radio button input example:
|
|
2
|
-
|
|
3
|
-
```js
|
|
4
|
-
<div className="flex">
|
|
5
|
-
<RadioButtonInput onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-input" id="radio-button-input-1" checked={true}><span>Checked radio button</span></RadioButtonInput>
|
|
6
|
-
<RadioButtonInput onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-input" id="radio-button-input-2"><span>Unchecked radio button</span></RadioButtonInput>
|
|
7
|
-
<RadioButtonInput onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-input" id="radio-button-input-3" checked={true} disabled={true}><span>Checked disabled radio button</span></RadioButtonInput>
|
|
8
|
-
<RadioButtonInput onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-input" id="radio-button-input-4" disabled={true}><span>Unchecked disabled radio button</span></RadioButtonInput>
|
|
9
|
-
</
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</
|
|
30
|
-
|
|
1
|
+
Radio button input example:
|
|
2
|
+
|
|
3
|
+
```js
|
|
4
|
+
<div className="flex">
|
|
5
|
+
<RadioButtonInput onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-input" id="radio-button-input-1" checked={true}><span>Checked radio button</span></RadioButtonInput>
|
|
6
|
+
<RadioButtonInput onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-input" id="radio-button-input-2"><span>Unchecked radio button</span></RadioButtonInput>
|
|
7
|
+
<RadioButtonInput onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-input" id="radio-button-input-3" checked={true} disabled={true}><span>Checked disabled radio button</span></RadioButtonInput>
|
|
8
|
+
<RadioButtonInput onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-input" id="radio-button-input-4" disabled={true}><span>Unchecked disabled radio button</span></RadioButtonInput>
|
|
9
|
+
<RadioButtonInput onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-input" id="radio-button-input-4" checked={false} expandable={true}><span>Unchecked expandable radio button </span></RadioButtonInput>
|
|
10
|
+
<RadioButtonInput onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-input" id="radio-button-input-4" checked={true} expandable={true}><span>Checked expandable radio button </span></RadioButtonInput>
|
|
11
|
+
</div>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Themed Radio button input example:
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import customTheme from 'data/customTheme';
|
|
18
|
+
<div className="flex">
|
|
19
|
+
<RadioButtonInput onChange={()=>{console.log('onchange')}} inputValue="value 1" name="themed-radio-button-input" id="themed-radio-button-input-1" checked={true} theme={customTheme}>
|
|
20
|
+
<span>Checked radio button</span>
|
|
21
|
+
</RadioButtonInput>
|
|
22
|
+
<RadioButtonInput onChange={()=>{console.log('onchange')}} inputValue="value 2" name="themed-radio-button-input" id="themed-radio-button-input-2" theme={customTheme}>
|
|
23
|
+
<span>Unchecked radio button</span>
|
|
24
|
+
</RadioButtonInput>
|
|
25
|
+
<RadioButtonInput onChange={()=>{console.log('onchange')}} inputValue="value 1" name="themed-radio-button-input" id="themed-radio-button-input-3" checked={true} theme={customTheme} disabled={true}>
|
|
26
|
+
<span>Checked disabled radio button</span>
|
|
27
|
+
</RadioButtonInput>
|
|
28
|
+
<RadioButtonInput onChange={()=>{console.log('onchange')}} inputValue="value 2" name="themed-radio-button-input" id="themed-radio-button-input-4" theme={customTheme} disabled={true}>
|
|
29
|
+
<span>Unchecked disabled radio button</span>
|
|
30
|
+
</RadioButtonInput>
|
|
31
|
+
</div>
|
|
32
|
+
```
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
@import "../style/global.scss";
|
|
2
|
-
|
|
3
|
-
:local(.radioButtonInput) {
|
|
4
|
-
display: flex;
|
|
5
|
-
cursor: pointer;
|
|
6
|
-
margin-right: 1em;
|
|
7
|
-
|
|
8
|
-
&:not(:local(.contentOnly)):not(:local(.disabled)) {
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
input {
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
&:local(.hasErrors) {
|
|
17
|
-
span {
|
|
18
|
-
color: #9d2024;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
input[type="radio"] {
|
|
23
|
-
opacity: 0;
|
|
24
|
-
position: absolute;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
@import "../style/global.scss";
|
|
2
|
+
|
|
3
|
+
:local(.radioButtonInput) {
|
|
4
|
+
display: flex;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
margin-right: 1em;
|
|
7
|
+
|
|
8
|
+
&:not(:local(.contentOnly)):not(:local(.disabled)) {
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
input {
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
&:local(.hasErrors) {
|
|
17
|
+
span {
|
|
18
|
+
color: #9d2024;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
input[type="radio"] {
|
|
23
|
+
opacity: 0;
|
|
24
|
+
position: absolute;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
Radio button list item example:
|
|
2
|
-
|
|
3
|
-
```js
|
|
4
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item" id="radio-button-list-item-1" checked={true}>
|
|
5
|
-
Checked radio button
|
|
6
|
-
</RadioButtonListItem>
|
|
7
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item" id="radio-button-list-item-2">
|
|
8
|
-
Unchecked radio button
|
|
9
|
-
</RadioButtonListItem>
|
|
10
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item" id="radio-button-list-item-3" checked={true} disabled={true}>
|
|
11
|
-
Disabled checked radio button
|
|
12
|
-
</RadioButtonListItem>
|
|
13
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item" id="radio-button-list-item-4" disabled={true}>
|
|
14
|
-
Disabled Unchecked radio button
|
|
15
|
-
</RadioButtonListItem>
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Radio button with errors list item example:
|
|
19
|
-
|
|
20
|
-
```js
|
|
21
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-1" checked={true} hasErrors={true}>
|
|
22
|
-
Checked radio button with errors
|
|
23
|
-
</RadioButtonListItem>
|
|
24
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-2" hasErrors={true}>
|
|
25
|
-
Unchecked radio button with errors
|
|
26
|
-
</RadioButtonListItem>
|
|
27
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-3" checked={true} disabled={true} hasErrors={true}>
|
|
28
|
-
Disabled checked radio button with errors
|
|
29
|
-
</RadioButtonListItem>
|
|
30
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-4" disabled={true} hasErrors={true}>
|
|
31
|
-
Disabled Unchecked radio button with errors
|
|
32
|
-
</RadioButtonListItem>
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Compact radio button list item example:
|
|
36
|
-
|
|
37
|
-
```js
|
|
38
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="compact-radio-button-list-item" id="compact-radio-button-list-item-1" checked={true} compact>
|
|
39
|
-
Checked radio button
|
|
40
|
-
</RadioButtonListItem>
|
|
41
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="compact-radio-button-list-item" id="compact-radio-button-list-item-2" compact>
|
|
42
|
-
Unchecked radio button
|
|
43
|
-
</RadioButtonListItem>
|
|
44
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="compact-radio-button-list-item" id="compact-radio-button-list-item-3" checked={true} compact disabled={true}>
|
|
45
|
-
Disabled checked radio button
|
|
46
|
-
</RadioButtonListItem>
|
|
47
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="compact-radio-button-list-item" id="compact-radio-button-list-item-4" compact disabled={true}>
|
|
48
|
-
Disabled unchecked radio button
|
|
49
|
-
</RadioButtonListItem>
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Themed Radio button list item example:
|
|
53
|
-
|
|
54
|
-
```js
|
|
55
|
-
import customTheme from 'data/customTheme';
|
|
56
|
-
<React.Fragment>
|
|
57
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="themed-radio-button-list-item-" id="themed-radio-button-list-item-1" checked={true} theme={customTheme}>
|
|
58
|
-
Checked radio button
|
|
59
|
-
</RadioButtonListItem>
|
|
60
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="themed-radio-button-list-item" id="themed-radio-button-list-item-2" theme={customTheme}>
|
|
61
|
-
Unchecked radio button
|
|
62
|
-
</RadioButtonListItem>
|
|
63
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="themed-radio-button-list-item-" id="themed-radio-button-list-item-3" checked={true} theme={customTheme} disabled={true}>
|
|
64
|
-
Disabled checked radio button
|
|
65
|
-
</RadioButtonListItem>
|
|
66
|
-
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="themed-radio-button-list-item" id="themed-radio-button-list-item-4" theme={customTheme} disabled={true}>
|
|
67
|
-
Disabled unchecked radio button
|
|
68
|
-
</RadioButtonListItem>
|
|
69
|
-
</React.Fragment>
|
|
70
|
-
```
|
|
1
|
+
Radio button list item example:
|
|
2
|
+
|
|
3
|
+
```js
|
|
4
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item" id="radio-button-list-item-1" checked={true}>
|
|
5
|
+
Checked radio button
|
|
6
|
+
</RadioButtonListItem>
|
|
7
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item" id="radio-button-list-item-2">
|
|
8
|
+
Unchecked radio button
|
|
9
|
+
</RadioButtonListItem>
|
|
10
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item" id="radio-button-list-item-3" checked={true} disabled={true}>
|
|
11
|
+
Disabled checked radio button
|
|
12
|
+
</RadioButtonListItem>
|
|
13
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item" id="radio-button-list-item-4" disabled={true}>
|
|
14
|
+
Disabled Unchecked radio button
|
|
15
|
+
</RadioButtonListItem>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Radio button with errors list item example:
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-1" checked={true} hasErrors={true}>
|
|
22
|
+
Checked radio button with errors
|
|
23
|
+
</RadioButtonListItem>
|
|
24
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-2" hasErrors={true}>
|
|
25
|
+
Unchecked radio button with errors
|
|
26
|
+
</RadioButtonListItem>
|
|
27
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-3" checked={true} disabled={true} hasErrors={true}>
|
|
28
|
+
Disabled checked radio button with errors
|
|
29
|
+
</RadioButtonListItem>
|
|
30
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-4" disabled={true} hasErrors={true}>
|
|
31
|
+
Disabled Unchecked radio button with errors
|
|
32
|
+
</RadioButtonListItem>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Compact radio button list item example:
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="compact-radio-button-list-item" id="compact-radio-button-list-item-1" checked={true} compact>
|
|
39
|
+
Checked radio button
|
|
40
|
+
</RadioButtonListItem>
|
|
41
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="compact-radio-button-list-item" id="compact-radio-button-list-item-2" compact>
|
|
42
|
+
Unchecked radio button
|
|
43
|
+
</RadioButtonListItem>
|
|
44
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="compact-radio-button-list-item" id="compact-radio-button-list-item-3" checked={true} compact disabled={true}>
|
|
45
|
+
Disabled checked radio button
|
|
46
|
+
</RadioButtonListItem>
|
|
47
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="compact-radio-button-list-item" id="compact-radio-button-list-item-4" compact disabled={true}>
|
|
48
|
+
Disabled unchecked radio button
|
|
49
|
+
</RadioButtonListItem>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Themed Radio button list item example:
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
import customTheme from 'data/customTheme';
|
|
56
|
+
<React.Fragment>
|
|
57
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="themed-radio-button-list-item-" id="themed-radio-button-list-item-1" checked={true} theme={customTheme}>
|
|
58
|
+
Checked radio button
|
|
59
|
+
</RadioButtonListItem>
|
|
60
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="themed-radio-button-list-item" id="themed-radio-button-list-item-2" theme={customTheme}>
|
|
61
|
+
Unchecked radio button
|
|
62
|
+
</RadioButtonListItem>
|
|
63
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="themed-radio-button-list-item-" id="themed-radio-button-list-item-3" checked={true} theme={customTheme} disabled={true}>
|
|
64
|
+
Disabled checked radio button
|
|
65
|
+
</RadioButtonListItem>
|
|
66
|
+
<RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="themed-radio-button-list-item" id="themed-radio-button-list-item-4" theme={customTheme} disabled={true}>
|
|
67
|
+
Disabled unchecked radio button
|
|
68
|
+
</RadioButtonListItem>
|
|
69
|
+
</React.Fragment>
|
|
70
|
+
```
|