dibk-design 1.1.9 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/{fonts → assets/fonts}/Altis-Light.eot +0 -0
  2. package/dist/{fonts → assets/fonts}/Altis-Light.svg +0 -0
  3. package/dist/{fonts → assets/fonts}/Altis-Light.ttf +0 -0
  4. package/dist/{fonts → assets/fonts}/Altis-Light.woff +0 -0
  5. package/dist/{fonts → assets/fonts}/Altis.eot +0 -0
  6. package/dist/{fonts → assets/fonts}/Altis.svg +0 -0
  7. package/dist/{fonts → assets/fonts}/Altis.ttf +0 -0
  8. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300.eot +0 -0
  9. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300.svg +0 -0
  10. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300.ttf +0 -0
  11. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300.woff +0 -0
  12. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300.woff2 +0 -0
  13. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300italic.eot +0 -0
  14. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300italic.svg +0 -0
  15. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300italic.ttf +0 -0
  16. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300italic.woff +0 -0
  17. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-300italic.woff2 +0 -0
  18. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700.eot +0 -0
  19. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700.svg +0 -0
  20. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700.ttf +0 -0
  21. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700.woff +0 -0
  22. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700.woff2 +0 -0
  23. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700italic.eot +0 -0
  24. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700italic.svg +0 -0
  25. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700italic.ttf +0 -0
  26. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700italic.woff +0 -0
  27. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-700italic.woff2 +0 -0
  28. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-italic.eot +0 -0
  29. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-italic.svg +0 -0
  30. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-italic.ttf +0 -0
  31. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-italic.woff +0 -0
  32. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-italic.woff2 +0 -0
  33. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-regular.eot +0 -0
  34. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-regular.svg +0 -0
  35. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-regular.ttf +0 -0
  36. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-regular.woff +0 -0
  37. package/dist/{fonts → assets/fonts}/open-sans-v27-latin-ext_latin-regular.woff2 +0 -0
  38. package/dist/assets/png/dibk-logo.png +0 -0
  39. package/dist/{images → assets/svg}/dibk-logo-mobile.svg +0 -0
  40. package/dist/{images → assets/svg}/dibk-logo.svg +0 -0
  41. package/dist/{images → assets/svg}/spinner.svg +0 -0
  42. package/dist/components/Accordion.js +61 -92
  43. package/dist/components/Accordion.module.scss +40 -39
  44. package/dist/components/Button.js +44 -84
  45. package/dist/components/Button.module.scss +24 -18
  46. package/dist/components/CheckBoxIcon.js +20 -61
  47. package/dist/components/CheckBoxIcon.module.scss +52 -52
  48. package/dist/components/CheckBoxInput.js +25 -64
  49. package/dist/components/CheckBoxInput.module.scss +23 -23
  50. package/dist/components/CheckBoxList.js +9 -2
  51. package/dist/components/CheckBoxList.module.scss +14 -2
  52. package/dist/components/CheckBoxListItem.js +2 -6
  53. package/dist/components/CheckBoxListItem.module.scss +53 -53
  54. package/dist/components/Container.js +6 -49
  55. package/dist/components/Container.module.scss +1 -1
  56. package/dist/components/ContentBox.js +38 -77
  57. package/dist/components/ContentBox.module.scss +35 -35
  58. package/dist/components/Dialog.js +38 -106
  59. package/dist/components/Dialog.module.scss +14 -12
  60. package/dist/components/DragAndDropFileInput.js +86 -147
  61. package/dist/components/DragAndDropFileInput.module.scss +28 -28
  62. package/dist/components/ErrorBox.js +5 -11
  63. package/dist/components/ErrorBox.module.scss +1 -1
  64. package/dist/components/ErrorMessage.js +13 -54
  65. package/dist/components/ErrorMessage.module.scss +1 -1
  66. package/dist/components/Footer.js +5 -44
  67. package/dist/components/Footer.module.scss +1 -1
  68. package/dist/components/Header.js +3 -5
  69. package/dist/components/Header.module.scss +9 -9
  70. package/dist/components/InputField.js +69 -120
  71. package/dist/components/InputField.module.scss +69 -69
  72. package/dist/components/Label.js +9 -48
  73. package/dist/components/Label.module.scss +3 -3
  74. package/dist/components/List.js +1 -1
  75. package/dist/components/List.module.scss +17 -17
  76. package/dist/components/ListItem.js +1 -1
  77. package/dist/components/LoadingAnimation.js +6 -47
  78. package/dist/components/LoadingAnimation.module.scss +23 -23
  79. package/dist/components/NavigationBar.js +137 -190
  80. package/dist/components/NavigationBar.module.scss +165 -165
  81. package/dist/components/NavigationBarListItem.js +22 -60
  82. package/dist/components/Paper.js +5 -45
  83. package/dist/components/Paper.module.scss +14 -14
  84. package/dist/components/ProgressBar.js +16 -8
  85. package/dist/components/ProgressBar.module.scss +2 -2
  86. package/dist/components/RadioButtonIcon.js +15 -55
  87. package/dist/components/RadioButtonIcon.module.scss +36 -36
  88. package/dist/components/RadioButtonInput.js +24 -63
  89. package/dist/components/RadioButtonInput.module.scss +23 -25
  90. package/dist/components/RadioButtonList.js +9 -2
  91. package/dist/components/RadioButtonList.module.scss +14 -2
  92. package/dist/components/RadioButtonListItem.js +3 -6
  93. package/dist/components/RadioButtonListItem.module.scss +7 -7
  94. package/dist/components/Select.js +98 -140
  95. package/dist/components/Select.module.scss +76 -76
  96. package/dist/components/Table.js +1 -3
  97. package/dist/components/Table.module.scss +1 -1
  98. package/dist/components/Textarea.js +54 -96
  99. package/dist/components/Textarea.module.scss +2 -2
  100. package/dist/components/Theme.js +60 -106
  101. package/dist/components/Theme.module.scss +12 -12
  102. package/dist/components/WizardNavigation/Step.js +34 -80
  103. package/dist/components/WizardNavigation/Step.module.scss +12 -12
  104. package/dist/components/WizardNavigation.js +19 -63
  105. package/dist/components/WizardNavigation.module.scss +1 -1
  106. package/dist/functions/theme.js +24 -10
  107. package/dist/index.js +0 -2
  108. package/dist/style/base/_all.scss +1 -0
  109. package/dist/style/base/_fonts.scss +97 -0
  110. package/package.json +63 -28
  111. package/dist/components/Accordion.md +0 -15
  112. package/dist/components/Button.md +0 -78
  113. package/dist/components/CheckBoxIcon.md +0 -38
  114. package/dist/components/CheckBoxInput.md +0 -51
  115. package/dist/components/CheckBoxList.md +0 -26
  116. package/dist/components/CheckBoxListItem.md +0 -82
  117. package/dist/components/Container.md +0 -7
  118. package/dist/components/ContentBox.md +0 -46
  119. package/dist/components/Dialog.md +0 -6
  120. package/dist/components/DragAndDropFileInput.md +0 -13
  121. package/dist/components/ErrorBox.md +0 -27
  122. package/dist/components/ErrorMessage.md +0 -15
  123. package/dist/components/Footer.md +0 -7
  124. package/dist/components/Header.md +0 -12
  125. package/dist/components/InputField.md +0 -40
  126. package/dist/components/Label.md +0 -9
  127. package/dist/components/List.md +0 -71
  128. package/dist/components/LoadingAnimation.md +0 -5
  129. package/dist/components/NavigationBar.md +0 -42
  130. package/dist/components/NavigationBarListItem.md +0 -16
  131. package/dist/components/Paper.md +0 -9
  132. package/dist/components/ProgressBar.md +0 -13
  133. package/dist/components/RadioButtonIcon.md +0 -41
  134. package/dist/components/RadioButtonInput.md +0 -30
  135. package/dist/components/RadioButtonList.md +0 -28
  136. package/dist/components/RadioButtonListItem.md +0 -70
  137. package/dist/components/Select.md +0 -28
  138. package/dist/components/Table.md +0 -26
  139. package/dist/components/Textarea.md +0 -27
  140. package/dist/components/Theme.md +0 -12
  141. package/dist/components/WizardNavigation.md +0 -84
  142. package/dist/style/base/fonts.css +0 -95
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
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
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -23,62 +21,24 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
23
21
 
24
22
  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; }
25
23
 
26
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
27
-
28
- 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); } }
29
-
30
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
31
-
32
- 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); }
33
-
34
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
-
36
- 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); }; }
37
-
38
- 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); }
39
-
40
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
24
+ var RadioButtonIcon = function RadioButtonIcon(props) {
25
+ var inlineStyle = {
26
+ height: props.size,
27
+ width: props.size
28
+ };
41
29
 
42
- 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; } }
30
+ if (props.theme && props.checked) {
31
+ var _objectSpread2;
43
32
 
44
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
45
-
46
- var RadioButtonIcon = /*#__PURE__*/function (_React$Component) {
47
- _inherits(RadioButtonIcon, _React$Component);
48
-
49
- var _super = _createSuper(RadioButtonIcon);
50
-
51
- function RadioButtonIcon() {
52
- _classCallCheck(this, RadioButtonIcon);
53
-
54
- return _super.apply(this, arguments);
33
+ inlineStyle = _objectSpread(_objectSpread({}, inlineStyle), {}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, !props.hasErrors && "background", (0, _theme.getThemePaletteBackgroundColor)(props.theme, "primary")), _defineProperty(_objectSpread2, !props.hasErrors && "boxShadow", "0 0 0 1px ".concat((0, _theme.getThemePaletteBackgroundColor)(props.theme, "primary"))), _objectSpread2));
55
34
  }
56
35
 
57
- _createClass(RadioButtonIcon, [{
58
- key: "render",
59
- value: function render() {
60
- var inlineStyle = {
61
- height: this.props.size,
62
- width: this.props.size
63
- };
64
-
65
- if (this.props.theme && this.props.checked) {
66
- inlineStyle = _objectSpread(_objectSpread({}, inlineStyle), {}, {
67
- background: (0, _theme.getThemePaletteBackgroundColor)(this.props.theme, 'primary'),
68
- boxShadow: "0 0 0 1px ".concat((0, _theme.getThemePaletteBackgroundColor)(this.props.theme, 'primary'))
69
- });
70
- }
71
-
72
- var props = {
73
- 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
- style: inlineStyle
75
- };
76
- return /*#__PURE__*/_react.default.createElement("span", props);
77
- }
78
- }]);
79
-
80
- return RadioButtonIcon;
81
- }(_react.default.Component);
36
+ var radioButtonIconProps = {
37
+ className: "".concat(_RadioButtonIconModule.default.radioButtonIcon, " ").concat(props.checked ? _RadioButtonIconModule.default.checked : "", " ").concat(props.disabled ? _RadioButtonIconModule.default.disabled : "", " ").concat(props.hasErrors ? _RadioButtonIconModule.default.hasErrors : ""),
38
+ style: inlineStyle
39
+ };
40
+ return _react.default.createElement("span", radioButtonIconProps);
41
+ };
82
42
 
83
43
  RadioButtonIcon.propTypes = {
84
44
  size: _propTypes.default.string,
@@ -88,7 +48,7 @@ RadioButtonIcon.propTypes = {
88
48
  hasErrors: _propTypes.default.bool
89
49
  };
90
50
  RadioButtonIcon.defaultProps = {
91
- size: '10px',
51
+ size: "10px",
92
52
  checked: false,
93
53
  disabled: false,
94
54
  hasErrors: false
@@ -1,44 +1,44 @@
1
1
  @import "../style/global.scss";
2
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;
3
+ .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
17
 
18
- &:not(:local(.hasErrors)) {
19
- @include box-shadow(0 0 0 1px #6A6262);
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;
18
+ &:not(.hasErrors) {
19
+ @include box-shadow(0 0 0 1px #6a6262);
29
20
  }
30
- &:not(:local(.hasErrors)) {
31
- @include box-shadow(0 0 0 1px $color-dark-blue);
21
+ &.hasErrors {
22
+ @include box-shadow(0 0 2px 1px $color-error);
32
23
  }
33
- &:local(.hasErrors) {
34
- @include box-shadow(0 0 2px 1px #9d2024);
24
+
25
+ &.checked {
26
+ background: $color-primary;
27
+ &.hasErrors {
28
+ background: $color-error;
29
+ }
30
+ &:not(.hasErrors) {
31
+ @include box-shadow(0 0 0 1px $color-dark-blue);
32
+ }
33
+ &.hasErrors {
34
+ @include box-shadow(0 0 2px 1px $color-error);
35
+ }
35
36
  }
36
- }
37
- &:local(.disabled) {
38
- opacity: 0.5;
39
- border-color: #bfbfbf;
40
- &:not(&:local(.checked)) {
41
- background: #bfbfbf;
37
+ &.disabled {
38
+ opacity: 0.5;
39
+ border-color: #bfbfbf;
40
+ &:not(.checked) {
41
+ background: #bfbfbf;
42
+ }
42
43
  }
43
- }
44
44
  }
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
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
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -17,67 +15,30 @@ var _RadioButtonInputModule = _interopRequireDefault(require("./RadioButtonInput
17
15
 
18
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
17
 
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 ? Object.setPrototypeOf.bind() : 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.bind() : 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
- var labelProps = {
55
- 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 : ""),
56
- htmlFor: this.props.id
57
- };
58
- var iconProps = {
59
- checked: this.props.checked,
60
- disabled: this.props.disabled,
61
- theme: this.props.theme,
62
- hasErrors: this.props.contentOnly && this.props.hasErrors
63
- };
64
- var inputProps = {
65
- id: this.props.id,
66
- name: this.props.name || null,
67
- type: "radio",
68
- value: this.props.inputValue,
69
- checked: this.props.checked,
70
- disabled: this.props.disabled,
71
- onChange: this.props.onChange,
72
- tabIndex: this.props.tabIndex || null,
73
- "aria-controls": this.props["aria-controls"]
74
- };
75
- return /*#__PURE__*/_react.default.createElement("label", labelProps, !this.props.contentOnly ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_RadioButtonIcon.default, iconProps), /*#__PURE__*/_react.default.createElement("input", inputProps)) : null, /*#__PURE__*/_react.default.createElement("span", null, this.props.children));
76
- }
77
- }]);
78
-
79
- return RadioButtonInput;
80
- }(_react.default.Component);
18
+ var RadioButtonInput = function RadioButtonInput(props) {
19
+ var labelProps = {
20
+ className: "".concat(_RadioButtonInputModule.default.radioButtonInput, " ").concat(props.checked ? _RadioButtonInputModule.default.checked : "", " ").concat(props.disabled ? _RadioButtonInputModule.default.disabled : "", " ").concat(props.hasErrors ? _RadioButtonInputModule.default.hasErrors : ""),
21
+ htmlFor: props.id
22
+ };
23
+ var iconProps = {
24
+ checked: props.checked,
25
+ disabled: props.disabled,
26
+ theme: props.theme,
27
+ hasErrors: !props.contentOnly && props.hasErrors
28
+ };
29
+ var inputProps = {
30
+ id: props.id,
31
+ name: props.name || null,
32
+ type: "radio",
33
+ value: props.inputValue,
34
+ checked: props.checked,
35
+ disabled: props.disabled,
36
+ onChange: props.onChange,
37
+ tabIndex: props.tabIndex || null,
38
+ "aria-controls": props["aria-controls"]
39
+ };
40
+ return _react.default.createElement("label", labelProps, !props.contentOnly ? _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_RadioButtonIcon.default, iconProps), _react.default.createElement("input", inputProps)) : null, _react.default.createElement("span", null, props.children));
41
+ };
81
42
 
82
43
  RadioButtonInput.propTypes = {
83
44
  checked: _propTypes.default.bool,
@@ -1,34 +1,32 @@
1
1
  @import "../style/global.scss";
2
2
 
3
- :local(.radioButtonInput) {
4
- display: flex;
5
- cursor: pointer;
6
- margin-right: 1em;
7
- border: 1px solid transparent;
3
+ .radioButtonInput {
4
+ display: flex;
5
+ margin-right: 1em;
6
+ border: 1px solid transparent;
8
7
 
9
- &:not(:local(.contentOnly)):not(:local(.disabled)) {
10
- cursor: pointer;
11
- input {
12
- cursor: pointer;
8
+ &:not(.contentOnly):not(.disabled) {
9
+ cursor: pointer;
10
+ input {
11
+ cursor: pointer;
12
+ }
13
13
  }
14
- }
15
14
 
16
-
17
- &:local(.hasErrors) {
18
- span {
19
- color: #9d2024;
15
+ &.hasErrors {
16
+ span {
17
+ color: $color-error;
18
+ }
20
19
  }
21
- }
22
20
 
23
- &:focus-within{
24
- outline-width: 2px;
25
- outline-color: $color-focus-outline;
26
- outline-style: auto;
27
- outline-offset: 1px;
28
- }
21
+ &:focus-within {
22
+ outline-width: 2px;
23
+ outline-color: $color-focus-outline;
24
+ outline-style: auto;
25
+ outline-offset: 1px;
26
+ }
29
27
 
30
- input[type="radio"] {
31
- opacity: 0;
32
- position: absolute;
33
- }
28
+ input[type="radio"] {
29
+ opacity: 0;
30
+ position: absolute;
31
+ }
34
32
  }
@@ -7,15 +7,22 @@ exports.default = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
10
12
  var _RadioButtonListModule = _interopRequireDefault(require("./RadioButtonList.module.scss"));
11
13
 
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
15
 
14
16
  var RadioButtonList = function RadioButtonList(props) {
15
- return /*#__PURE__*/_react.default.createElement("ul", {
17
+ var _props$legend;
18
+
19
+ return _react.default.createElement("fieldset", {
16
20
  className: _RadioButtonListModule.default.radioButtonList
17
- }, props.children);
21
+ }, !!((_props$legend = props.legend) !== null && _props$legend !== void 0 && _props$legend.length) ? _react.default.createElement("legend", null, props.legend) : null, props.children);
18
22
  };
19
23
 
24
+ RadioButtonList.propTypes = {
25
+ legend: _propTypes.default.string
26
+ };
20
27
  var _default = RadioButtonList;
21
28
  exports.default = _default;
@@ -1,5 +1,17 @@
1
- :local(.radioButtonList) {
1
+ @import "../style/global.scss";
2
+
3
+ fieldset.radioButtonList {
2
4
  margin: 0;
3
5
  padding: 0;
4
- list-style: none;
6
+ border: none;
7
+ legend {
8
+ color: #000;
9
+ display: block;
10
+ font-size: 1rem;
11
+ font-weight: bold;
12
+ line-height: 1.2;
13
+ margin-bottom: 2px;
14
+ font-family: $default-font;
15
+ overflow-wrap: break-word;
16
+ }
5
17
  }
@@ -17,10 +17,6 @@ var _RadioButtonListItemModule = _interopRequireDefault(require("./RadioButtonLi
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
20
- // Dependencies
21
- // Components
22
- // Functions
23
- // Stylesheets
24
20
  var RadioButtonListItem = function RadioButtonListItem(props) {
25
21
  var listItemClassNameArray = [_RadioButtonListItemModule.default.radioButtonListItem, props.disabled ? _RadioButtonListItemModule.default.disabled : null, props.compact ? _RadioButtonListItemModule.default.compact : null, props.contentOnly ? _RadioButtonListItemModule.default.contentOnly : null, props.hasErrors ? _RadioButtonListItemModule.default.hasErrors : null];
26
22
  var listItemClassNameString = (0, _helpers.classNameArrayToClassNameString)(listItemClassNameArray);
@@ -35,9 +31,9 @@ var RadioButtonListItem = function RadioButtonListItem(props) {
35
31
  name: props.name,
36
32
  theme: props.theme
37
33
  };
38
- return /*#__PURE__*/_react.default.createElement("li", {
34
+ return _react.default.createElement("div", {
39
35
  className: listItemClassNameString
40
- }, /*#__PURE__*/_react.default.createElement(_RadioButtonInput.default, inputProps, props.children));
36
+ }, _react.default.createElement(_RadioButtonInput.default, inputProps, props.children));
41
37
  };
42
38
 
43
39
  RadioButtonListItem.propTypes = {
@@ -48,6 +44,7 @@ RadioButtonListItem.propTypes = {
48
44
  id: _propTypes.default.string.isRequired,
49
45
  onChange: _propTypes.default.func,
50
46
  contentOnly: _propTypes.default.bool,
47
+ compact: _propTypes.default.bool,
51
48
  theme: _propTypes.default.object,
52
49
  hasErrors: _propTypes.default.bool
53
50
  };
@@ -1,6 +1,6 @@
1
1
  @import "../style/global.scss";
2
2
 
3
- :local(.radioButtonListItem) {
3
+ .radioButtonListItem {
4
4
  @include box-sizing(content-box);
5
5
  @include border-radius(5px);
6
6
  @include transition(all 0.1s ease-in-out);
@@ -18,13 +18,13 @@
18
18
  font-size: 17px;
19
19
  color: #000;
20
20
 
21
- &:not(:local(.contentOnly)):not(:local(.compact)) {
21
+ &:not(.contentOnly):not(.compact) {
22
22
  @include box-shadow(0 0 2px $color-dark-blue);
23
23
  background: white;
24
24
  margin-bottom: 10px;
25
25
  }
26
26
 
27
- &:local(.contentOnly) {
27
+ &.contentOnly {
28
28
  cursor: auto;
29
29
  label {
30
30
  cursor: auto;
@@ -32,17 +32,17 @@
32
32
  }
33
33
  }
34
34
 
35
- &:local(.disabled) {
35
+ &.disabled {
36
36
  label {
37
37
  cursor: auto;
38
38
  }
39
39
  }
40
40
 
41
- &:local(.checked):not(:local(.contentOnly)):not(:local(.compact)):not(:local(.disabled)) {
41
+ &.checked:not(.contentOnly):not(.compact):not(.disabled) {
42
42
  @include box-shadow(0 0 0 1px $color-dark-blue, 0 0 4px 0 $color-dark-blue);
43
43
  }
44
44
 
45
- &:not(:local(.checked)):not(:local(.contentOnly)):not(:local(.compact)):not(:local(.disabled)):hover {
45
+ &:not(.checked):not(.contentOnly):not(.compact):not(.disabled):hover {
46
46
  @include box-shadow(0 0 6px $color-dark-blue);
47
47
  }
48
48
 
@@ -53,7 +53,7 @@
53
53
  cursor: pointer;
54
54
  }
55
55
 
56
- &:local(.compact) {
56
+ &.compact {
57
57
  display: table;
58
58
  label {
59
59
  padding: 6px 4px;