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.
Files changed (102) hide show
  1. package/LICENSE +674 -674
  2. package/README.md +3 -3
  3. package/dist/components/Accordion.md +15 -15
  4. package/dist/components/Accordion.module.scss +205 -205
  5. package/dist/components/Button.md +75 -75
  6. package/dist/components/Button.module.scss +232 -232
  7. package/dist/components/CheckBoxIcon.md +38 -38
  8. package/dist/components/CheckBoxIcon.module.scss +62 -62
  9. package/dist/components/CheckBoxInput.md +58 -58
  10. package/dist/components/CheckBoxInput.module.scss +24 -24
  11. package/dist/components/CheckBoxListItem.md +82 -82
  12. package/dist/components/CheckBoxListItem.module.scss +71 -71
  13. package/dist/components/Container.js +64 -0
  14. package/dist/components/Container.md +7 -0
  15. package/dist/components/Container.module.scss +10 -0
  16. package/dist/components/ContentBox.md +46 -46
  17. package/dist/components/ContentBox.module.scss +116 -116
  18. package/dist/components/Dialog.md +5 -5
  19. package/dist/components/Dialog.module.scss +78 -78
  20. package/dist/components/DragAndDropFileInput.js +8 -4
  21. package/dist/components/DragAndDropFileInput.md +13 -13
  22. package/dist/components/DragAndDropFileInput.module.scss +36 -45
  23. package/dist/components/ErrorMessage.js +80 -0
  24. package/dist/components/ErrorMessage.md +15 -0
  25. package/dist/components/ErrorMessage.module.scss +16 -0
  26. package/dist/components/Footer.js +3 -3
  27. package/dist/components/Footer.md +7 -7
  28. package/dist/components/Footer.module.scss +20 -11
  29. package/dist/components/Header.md +11 -11
  30. package/dist/components/Header.module.scss +64 -64
  31. package/dist/components/InputField.js +6 -11
  32. package/dist/components/InputField.md +41 -41
  33. package/dist/components/InputField.module.scss +81 -95
  34. package/dist/components/Label.md +9 -9
  35. package/dist/components/Label.module.scss +16 -16
  36. package/dist/components/List.md +10 -10
  37. package/dist/components/List.module.scss +18 -18
  38. package/dist/components/LoadingAnimation.md +5 -5
  39. package/dist/components/LoadingAnimation.module.scss +26 -26
  40. package/dist/components/NavigationBar.md +42 -42
  41. package/dist/components/NavigationBar.module.scss +176 -176
  42. package/dist/components/NavigationBarListItem.md +15 -15
  43. package/dist/components/Paper.md +9 -9
  44. package/dist/components/Paper.module.scss +18 -18
  45. package/dist/components/ProgressBar.js +31 -0
  46. package/dist/components/ProgressBar.md +13 -0
  47. package/dist/components/ProgressBar.module.scss +37 -0
  48. package/dist/components/RadioButtonIcon.js +101 -101
  49. package/dist/components/RadioButtonIcon.md +41 -41
  50. package/dist/components/RadioButtonIcon.module.scss +44 -44
  51. package/dist/components/RadioButtonInput.js +97 -97
  52. package/dist/components/RadioButtonInput.md +32 -32
  53. package/dist/components/RadioButtonInput.module.scss +26 -26
  54. package/dist/components/RadioButtonListItem.md +70 -70
  55. package/dist/components/RadioButtonListItem.module.scss +71 -71
  56. package/dist/components/Select.js +6 -11
  57. package/dist/components/Select.md +28 -28
  58. package/dist/components/Select.module.scss +86 -100
  59. package/dist/components/Textarea.js +6 -11
  60. package/dist/components/Textarea.md +27 -27
  61. package/dist/components/Textarea.module.scss +58 -72
  62. package/dist/components/Theme.md +12 -12
  63. package/dist/components/Theme.module.scss +76 -76
  64. package/dist/components/WizardNavigation/Step.module.scss +75 -75
  65. package/dist/components/WizardNavigation.md +84 -84
  66. package/dist/components/WizardNavigation.module.scss +3 -3
  67. package/dist/fonts/Altis-Light.svg +326 -326
  68. package/dist/fonts/open-sans-v27-latin-ext_latin-300.svg +346 -346
  69. package/dist/fonts/open-sans-v27-latin-ext_latin-300italic.svg +377 -377
  70. package/dist/fonts/open-sans-v27-latin-ext_latin-700.svg +349 -349
  71. package/dist/fonts/open-sans-v27-latin-ext_latin-700italic.svg +379 -379
  72. package/dist/fonts/open-sans-v27-latin-ext_latin-italic.svg +379 -379
  73. package/dist/fonts/open-sans-v27-latin-ext_latin-regular.svg +349 -349
  74. package/dist/images/dibk-logo-mobile.svg +91 -91
  75. package/dist/images/dibk-logo.svg +991 -991
  76. package/dist/images/spinner.svg +56 -56
  77. package/dist/index.js +24 -0
  78. package/dist/style/abstracts/_all.scss +1 -1
  79. package/dist/style/abstracts/mixins/_all.scss +12 -12
  80. package/dist/style/abstracts/mixins/_animation.scss +6 -6
  81. package/dist/style/abstracts/mixins/_appearance.scss +5 -5
  82. package/dist/style/abstracts/mixins/_border-radius.scss +31 -31
  83. package/dist/style/abstracts/mixins/_box-shadow.scss +5 -5
  84. package/dist/style/abstracts/mixins/_box-sizing.scss +5 -5
  85. package/dist/style/abstracts/mixins/_calc.scss +5 -5
  86. package/dist/style/abstracts/mixins/_keyframes.scss +14 -14
  87. package/dist/style/abstracts/mixins/_opacity.scss +5 -5
  88. package/dist/style/abstracts/mixins/_placeholder.scss +17 -17
  89. package/dist/style/abstracts/mixins/_scrollbar.scss +26 -26
  90. package/dist/style/abstracts/mixins/_transform.scss +6 -6
  91. package/dist/style/abstracts/mixins/_transition.scss +34 -34
  92. package/dist/style/abstracts/variables/_all.scss +2 -2
  93. package/dist/style/abstracts/variables/_colors.scss +28 -29
  94. package/dist/style/abstracts/variables/_typography.scss +1 -1
  95. package/dist/style/abstracts/variables/_viewports.scss +14 -14
  96. package/dist/style/base/_all.scss +1 -1
  97. package/dist/style/base/_reset.scss +15 -15
  98. package/dist/style/base/_typography.scss +6 -6
  99. package/dist/style/base/fonts.css +95 -95
  100. package/dist/style/global.scss +3 -3
  101. package/dist/style/layout/_containers.scss +9 -9
  102. package/package.json +43 -43
@@ -1,98 +1,98 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _react = _interopRequireDefault(require("react"));
11
-
12
- var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
- var _RadioButtonIcon = _interopRequireDefault(require("./RadioButtonIcon"));
15
-
16
- var _RadioButtonInputModule = _interopRequireDefault(require("./RadioButtonInput.module.scss"));
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
21
-
22
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
23
-
24
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
-
26
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
27
-
28
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
-
30
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
31
-
32
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
33
-
34
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
35
-
36
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
37
-
38
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
39
-
40
- var RadioButtonInput = /*#__PURE__*/function (_React$Component) {
41
- _inherits(RadioButtonInput, _React$Component);
42
-
43
- var _super = _createSuper(RadioButtonInput);
44
-
45
- function RadioButtonInput() {
46
- _classCallCheck(this, RadioButtonInput);
47
-
48
- return _super.apply(this, arguments);
49
- }
50
-
51
- _createClass(RadioButtonInput, [{
52
- key: "render",
53
- value: function render() {
54
- return /*#__PURE__*/_react.default.createElement("label", {
55
- htmlFor: this.props.id,
56
- className: "".concat(_RadioButtonInputModule.default.radioButtonInput, " ").concat(this.props.checked ? _RadioButtonInputModule.default.checked : '', " ").concat(this.props.disabled ? _RadioButtonInputModule.default.disabled : '', " ").concat(this.props.hasErrors ? _RadioButtonInputModule.default.hasErrors : '')
57
- }, !this.props.contentOnly ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_RadioButtonIcon.default, {
58
- checked: this.props.checked,
59
- disabled: this.props.disabled,
60
- theme: this.props.theme,
61
- hasErrors: this.props.hasErrors,
62
- expandable: this.props.expandable
63
- }), /*#__PURE__*/_react.default.createElement("input", {
64
- type: "radio",
65
- onChange: this.props.onChange,
66
- id: this.props.id,
67
- name: this.props.name,
68
- value: this.props.inputValue,
69
- checked: this.props.checked
70
- })) : '', /*#__PURE__*/_react.default.createElement("span", null, this.props.children));
71
- }
72
- }]);
73
-
74
- return RadioButtonInput;
75
- }(_react.default.Component);
76
-
77
- RadioButtonInput.propTypes = {
78
- checked: _propTypes.default.bool,
79
- disabled: _propTypes.default.bool,
80
- inputValue: _propTypes.default.string.isRequired,
81
- name: _propTypes.default.string,
82
- id: _propTypes.default.string.isRequired,
83
- onChange: _propTypes.default.func,
84
- contentOnly: _propTypes.default.bool,
85
- theme: _propTypes.default.object,
86
- hasErrors: _propTypes.default.bool,
87
- expandable: _propTypes.default.bool
88
- };
89
- RadioButtonInput.defaultProps = {
90
- name: '',
91
- checked: false,
92
- disabled: false,
93
- contentOnly: false,
94
- hasErrors: false,
95
- expandable: false
96
- };
97
- var _default = RadioButtonInput;
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
+
14
+ var _RadioButtonIcon = _interopRequireDefault(require("./RadioButtonIcon"));
15
+
16
+ var _RadioButtonInputModule = _interopRequireDefault(require("./RadioButtonInput.module.scss"));
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+
20
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
21
+
22
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
23
+
24
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
+
26
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
27
+
28
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
+
30
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
31
+
32
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
33
+
34
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
35
+
36
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
37
+
38
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
39
+
40
+ var RadioButtonInput = /*#__PURE__*/function (_React$Component) {
41
+ _inherits(RadioButtonInput, _React$Component);
42
+
43
+ var _super = _createSuper(RadioButtonInput);
44
+
45
+ function RadioButtonInput() {
46
+ _classCallCheck(this, RadioButtonInput);
47
+
48
+ return _super.apply(this, arguments);
49
+ }
50
+
51
+ _createClass(RadioButtonInput, [{
52
+ key: "render",
53
+ value: function render() {
54
+ return /*#__PURE__*/_react.default.createElement("label", {
55
+ htmlFor: this.props.id,
56
+ className: "".concat(_RadioButtonInputModule.default.radioButtonInput, " ").concat(this.props.checked ? _RadioButtonInputModule.default.checked : '', " ").concat(this.props.disabled ? _RadioButtonInputModule.default.disabled : '', " ").concat(this.props.hasErrors ? _RadioButtonInputModule.default.hasErrors : '')
57
+ }, !this.props.contentOnly ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_RadioButtonIcon.default, {
58
+ checked: this.props.checked,
59
+ disabled: this.props.disabled,
60
+ theme: this.props.theme,
61
+ hasErrors: this.props.hasErrors,
62
+ expandable: this.props.expandable
63
+ }), /*#__PURE__*/_react.default.createElement("input", {
64
+ type: "radio",
65
+ onChange: this.props.onChange,
66
+ id: this.props.id,
67
+ name: this.props.name,
68
+ value: this.props.inputValue,
69
+ checked: this.props.checked
70
+ })) : '', /*#__PURE__*/_react.default.createElement("span", null, this.props.children));
71
+ }
72
+ }]);
73
+
74
+ return RadioButtonInput;
75
+ }(_react.default.Component);
76
+
77
+ RadioButtonInput.propTypes = {
78
+ checked: _propTypes.default.bool,
79
+ disabled: _propTypes.default.bool,
80
+ inputValue: _propTypes.default.string.isRequired,
81
+ name: _propTypes.default.string,
82
+ id: _propTypes.default.string.isRequired,
83
+ onChange: _propTypes.default.func,
84
+ contentOnly: _propTypes.default.bool,
85
+ theme: _propTypes.default.object,
86
+ hasErrors: _propTypes.default.bool,
87
+ expandable: _propTypes.default.bool
88
+ };
89
+ RadioButtonInput.defaultProps = {
90
+ name: '',
91
+ checked: false,
92
+ disabled: false,
93
+ contentOnly: false,
94
+ hasErrors: false,
95
+ expandable: false
96
+ };
97
+ var _default = RadioButtonInput;
98
98
  exports.default = _default;
@@ -1,32 +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
- <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
+ 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
+ ```
@@ -1,71 +1,71 @@
1
- @import "../style/global.scss";
2
-
3
- :local(.radioButtonListItem) {
4
- @include box-sizing(content-box);
5
- @include border-radius(5px);
6
- @include transition(all 0.1s ease-in-out);
7
- display: -webkit-box;
8
- display: -webkit-flex;
9
- display: -ms-flexbox;
10
- display: flex;
11
- -webkit-align-items: flex-start;
12
- -webkit-box-align: flex-start;
13
- -ms-flex-align: flex-start;
14
- align-items: flex-start;
15
- cursor: pointer;
16
- font-family: $default-font;
17
- position: relative;
18
- font-size: 17px;
19
- color: #000;
20
-
21
- &:not(:local(.contentOnly)):not(:local(.compact)) {
22
- @include box-shadow(0 0 2px $color-dark-blue);
23
- background: white;
24
- margin-bottom: 10px;
25
- }
26
-
27
- &:local(.contentOnly) {
28
- cursor: auto;
29
- label {
30
- cursor: auto;
31
- padding: 5px 10px;
32
- }
33
- }
34
-
35
- &:local(.disabled) {
36
- label {
37
- cursor: auto;
38
- }
39
- }
40
-
41
- &:local(.checked):not(:local(.contentOnly)):not(:local(.compact)):not(:local(.disabled)) {
42
- @include box-shadow(0 0 0 1px $color-dark-blue, 0 0 4px 0 $color-dark-blue);
43
- }
44
-
45
- &:not(:local(.checked)):not(:local(.contentOnly)):not(:local(.compact)):not(:local(.disabled)):hover {
46
- @include box-shadow(0 0 6px $color-dark-blue);
47
- }
48
-
49
- &:focus {
50
- outline-color: #54acb8;
51
- }
52
-
53
- label {
54
- width: 100%;
55
- padding: 10px;
56
- margin: 0;
57
- cursor: pointer;
58
- }
59
-
60
- &:local(.compact) {
61
- display: table;
62
- label {
63
- padding: 6px 4px;
64
- }
65
- }
66
-
67
- input[type="radio"] {
68
- opacity: 0;
69
- position: absolute;
70
- }
71
- }
1
+ @import "../style/global.scss";
2
+
3
+ :local(.radioButtonListItem) {
4
+ @include box-sizing(content-box);
5
+ @include border-radius(5px);
6
+ @include transition(all 0.1s ease-in-out);
7
+ display: -webkit-box;
8
+ display: -webkit-flex;
9
+ display: -ms-flexbox;
10
+ display: flex;
11
+ -webkit-align-items: flex-start;
12
+ -webkit-box-align: flex-start;
13
+ -ms-flex-align: flex-start;
14
+ align-items: flex-start;
15
+ cursor: pointer;
16
+ font-family: $default-font;
17
+ position: relative;
18
+ font-size: 17px;
19
+ color: #000;
20
+
21
+ &:not(:local(.contentOnly)):not(:local(.compact)) {
22
+ @include box-shadow(0 0 2px $color-dark-blue);
23
+ background: white;
24
+ margin-bottom: 10px;
25
+ }
26
+
27
+ &:local(.contentOnly) {
28
+ cursor: auto;
29
+ label {
30
+ cursor: auto;
31
+ padding: 5px 10px;
32
+ }
33
+ }
34
+
35
+ &:local(.disabled) {
36
+ label {
37
+ cursor: auto;
38
+ }
39
+ }
40
+
41
+ &:local(.checked):not(:local(.contentOnly)):not(:local(.compact)):not(:local(.disabled)) {
42
+ @include box-shadow(0 0 0 1px $color-dark-blue, 0 0 4px 0 $color-dark-blue);
43
+ }
44
+
45
+ &:not(:local(.checked)):not(:local(.contentOnly)):not(:local(.compact)):not(:local(.disabled)):hover {
46
+ @include box-shadow(0 0 6px $color-dark-blue);
47
+ }
48
+
49
+ &:focus {
50
+ outline-color: #54acb8;
51
+ }
52
+
53
+ label {
54
+ width: 100%;
55
+ padding: 10px;
56
+ margin: 0;
57
+ cursor: pointer;
58
+ }
59
+
60
+ &:local(.compact) {
61
+ display: table;
62
+ label {
63
+ padding: 6px 4px;
64
+ }
65
+ }
66
+
67
+ input[type="radio"] {
68
+ opacity: 0;
69
+ position: absolute;
70
+ }
71
+ }
@@ -11,6 +11,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
12
  var _Label = _interopRequireDefault(require("./Label"));
13
13
 
14
+ var _ErrorMessage = _interopRequireDefault(require("./ErrorMessage"));
15
+
14
16
  var _theme = require("../functions/theme");
15
17
 
16
18
  var _generators = require("../functions/generators");
@@ -66,13 +68,6 @@ var Select = /*#__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: "getThemeArrowStyle",
78
73
  value: function getThemeArrowStyle(theme) {
@@ -166,10 +161,10 @@ var Select = /*#__PURE__*/function (_React$Component) {
166
161
  }, /*#__PURE__*/_react.default.createElement("span", {
167
162
  className: _SelectModule.default.selectListArrow,
168
163
  style: this.getThemeArrowStyle(this.props.theme)
169
- }), /*#__PURE__*/_react.default.createElement("select", props, this.renderPlaceholderOption(this.props.placeholder, this.props.placeholderValue), this.renderOptionElements(this.props.options))), /*#__PURE__*/_react.default.createElement("span", {
170
- className: _SelectModule.default.errorMessage,
171
- style: this.getThemeErrorMessageStyle(this.props.theme)
172
- }, this.props.errorMessage ? this.props.errorMessage : ''));
164
+ }), /*#__PURE__*/_react.default.createElement("select", props, this.renderPlaceholderOption(this.props.placeholder, this.props.placeholderValue), this.renderOptionElements(this.props.options))), /*#__PURE__*/_react.default.createElement(_ErrorMessage.default, {
165
+ content: this.props.errorMessage,
166
+ theme: this.props.theme
167
+ }));
173
168
  }
174
169
  }
175
170
  }]);