dibk-design 0.4.45 → 0.4.46

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 (95) 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/ContentBox.md +46 -46
  14. package/dist/components/ContentBox.module.scss +116 -116
  15. package/dist/components/Dialog.md +5 -5
  16. package/dist/components/Dialog.module.scss +78 -78
  17. package/dist/components/DragAndDropFileInput.js +8 -4
  18. package/dist/components/DragAndDropFileInput.md +13 -13
  19. package/dist/components/DragAndDropFileInput.module.scss +36 -45
  20. package/dist/components/ErrorMessage.js +80 -0
  21. package/dist/components/ErrorMessage.md +15 -0
  22. package/dist/components/ErrorMessage.module.scss +16 -0
  23. package/dist/components/Footer.md +7 -7
  24. package/dist/components/Footer.module.scss +11 -11
  25. package/dist/components/Header.md +11 -11
  26. package/dist/components/Header.module.scss +64 -64
  27. package/dist/components/InputField.js +6 -11
  28. package/dist/components/InputField.md +41 -41
  29. package/dist/components/InputField.module.scss +81 -95
  30. package/dist/components/Label.md +9 -9
  31. package/dist/components/Label.module.scss +16 -16
  32. package/dist/components/List.md +10 -10
  33. package/dist/components/List.module.scss +18 -18
  34. package/dist/components/LoadingAnimation.md +5 -5
  35. package/dist/components/LoadingAnimation.module.scss +26 -26
  36. package/dist/components/NavigationBar.md +42 -42
  37. package/dist/components/NavigationBar.module.scss +176 -176
  38. package/dist/components/NavigationBarListItem.md +15 -15
  39. package/dist/components/Paper.md +9 -9
  40. package/dist/components/Paper.module.scss +18 -18
  41. package/dist/components/RadioButtonIcon.js +101 -101
  42. package/dist/components/RadioButtonIcon.md +41 -41
  43. package/dist/components/RadioButtonIcon.module.scss +44 -44
  44. package/dist/components/RadioButtonInput.js +97 -97
  45. package/dist/components/RadioButtonInput.md +32 -32
  46. package/dist/components/RadioButtonInput.module.scss +26 -26
  47. package/dist/components/RadioButtonListItem.md +70 -70
  48. package/dist/components/RadioButtonListItem.module.scss +71 -71
  49. package/dist/components/Select.js +6 -11
  50. package/dist/components/Select.md +28 -28
  51. package/dist/components/Select.module.scss +86 -100
  52. package/dist/components/Textarea.js +6 -11
  53. package/dist/components/Textarea.md +27 -27
  54. package/dist/components/Textarea.module.scss +58 -72
  55. package/dist/components/Theme.md +12 -12
  56. package/dist/components/Theme.module.scss +76 -76
  57. package/dist/components/WizardNavigation/Step.module.scss +75 -75
  58. package/dist/components/WizardNavigation.md +84 -84
  59. package/dist/components/WizardNavigation.module.scss +3 -3
  60. package/dist/fonts/Altis-Light.svg +326 -326
  61. package/dist/fonts/open-sans-v27-latin-ext_latin-300.svg +346 -346
  62. package/dist/fonts/open-sans-v27-latin-ext_latin-300italic.svg +377 -377
  63. package/dist/fonts/open-sans-v27-latin-ext_latin-700.svg +349 -349
  64. package/dist/fonts/open-sans-v27-latin-ext_latin-700italic.svg +379 -379
  65. package/dist/fonts/open-sans-v27-latin-ext_latin-italic.svg +379 -379
  66. package/dist/fonts/open-sans-v27-latin-ext_latin-regular.svg +349 -349
  67. package/dist/images/dibk-logo-mobile.svg +91 -91
  68. package/dist/images/dibk-logo.svg +991 -991
  69. package/dist/images/spinner.svg +56 -56
  70. package/dist/index.js +8 -0
  71. package/dist/style/abstracts/_all.scss +1 -1
  72. package/dist/style/abstracts/mixins/_all.scss +12 -12
  73. package/dist/style/abstracts/mixins/_animation.scss +6 -6
  74. package/dist/style/abstracts/mixins/_appearance.scss +5 -5
  75. package/dist/style/abstracts/mixins/_border-radius.scss +31 -31
  76. package/dist/style/abstracts/mixins/_box-shadow.scss +5 -5
  77. package/dist/style/abstracts/mixins/_box-sizing.scss +5 -5
  78. package/dist/style/abstracts/mixins/_calc.scss +5 -5
  79. package/dist/style/abstracts/mixins/_keyframes.scss +14 -14
  80. package/dist/style/abstracts/mixins/_opacity.scss +5 -5
  81. package/dist/style/abstracts/mixins/_placeholder.scss +17 -17
  82. package/dist/style/abstracts/mixins/_scrollbar.scss +26 -26
  83. package/dist/style/abstracts/mixins/_transform.scss +6 -6
  84. package/dist/style/abstracts/mixins/_transition.scss +34 -34
  85. package/dist/style/abstracts/variables/_all.scss +2 -2
  86. package/dist/style/abstracts/variables/_colors.scss +29 -29
  87. package/dist/style/abstracts/variables/_typography.scss +1 -1
  88. package/dist/style/abstracts/variables/_viewports.scss +14 -14
  89. package/dist/style/base/_all.scss +1 -1
  90. package/dist/style/base/_reset.scss +15 -15
  91. package/dist/style/base/_typography.scss +6 -6
  92. package/dist/style/base/fonts.css +95 -95
  93. package/dist/style/global.scss +3 -3
  94. package/dist/style/layout/_containers.scss +9 -9
  95. package/package.json +43 -43
@@ -1,102 +1,102 @@
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 _theme = require("../functions/theme");
15
-
16
- var _RadioButtonIconModule = _interopRequireDefault(require("./RadioButtonIcon.module.scss"));
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
21
-
22
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
23
-
24
- 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
-
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 || 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; }
41
-
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; } }
43
-
44
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : 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);
55
- }
56
-
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 ariaExpandedIndex = "aria-expanded";
73
-
74
- var props = _defineProperty({
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 : ''),
76
- style: inlineStyle
77
- }, ariaExpandedIndex, this.props.expandable ? this.props.checked.toString() : null);
78
-
79
- return /*#__PURE__*/_react.default.createElement("span", props);
80
- }
81
- }]);
82
-
83
- return RadioButtonIcon;
84
- }(_react.default.Component);
85
-
86
- RadioButtonIcon.propTypes = {
87
- size: _propTypes.default.string,
88
- checked: _propTypes.default.bool,
89
- disabled: _propTypes.default.bool,
90
- theme: _propTypes.default.object,
91
- hasErrors: _propTypes.default.bool,
92
- expandable: _propTypes.default.bool
93
- };
94
- RadioButtonIcon.defaultProps = {
95
- size: '10px',
96
- checked: false,
97
- disabled: false,
98
- hasErrors: false,
99
- expandable: false
100
- };
101
- var _default = RadioButtonIcon;
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 _theme = require("../functions/theme");
15
+
16
+ var _RadioButtonIconModule = _interopRequireDefault(require("./RadioButtonIcon.module.scss"));
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+
20
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
21
+
22
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
23
+
24
+ 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
+
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 || 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; }
41
+
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; } }
43
+
44
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : 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);
55
+ }
56
+
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 ariaExpandedIndex = "aria-expanded";
73
+
74
+ var props = _defineProperty({
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 : ''),
76
+ style: inlineStyle
77
+ }, ariaExpandedIndex, this.props.expandable ? this.props.checked.toString() : null);
78
+
79
+ return /*#__PURE__*/_react.default.createElement("span", props);
80
+ }
81
+ }]);
82
+
83
+ return RadioButtonIcon;
84
+ }(_react.default.Component);
85
+
86
+ RadioButtonIcon.propTypes = {
87
+ size: _propTypes.default.string,
88
+ checked: _propTypes.default.bool,
89
+ disabled: _propTypes.default.bool,
90
+ theme: _propTypes.default.object,
91
+ hasErrors: _propTypes.default.bool,
92
+ expandable: _propTypes.default.bool
93
+ };
94
+ RadioButtonIcon.defaultProps = {
95
+ size: '10px',
96
+ checked: false,
97
+ disabled: false,
98
+ hasErrors: false,
99
+ expandable: false
100
+ };
101
+ var _default = RadioButtonIcon;
102
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
+ }
@@ -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;