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,18 +1,18 @@
1
- @import "../style/global.scss";
2
-
3
- :local(.paper) {
4
- line-height: 1.6;
5
- position: relative;
6
- width: 100%;
7
- background: white;
8
- box-shadow: 0 2px 3px rgba(0, 0, 0, 0.18);
9
- &:not(:local(.noMargin)) {
10
- margin: 20px 0;
11
- }
12
- &:not(:local(.noPadding)) {
13
- padding: 12px 12px;
14
- @media only screen and (min-width: $screen-sm) {
15
- padding: 24px 28px;
16
- }
17
- }
18
- }
1
+ @import "../style/global.scss";
2
+
3
+ :local(.paper) {
4
+ line-height: 1.6;
5
+ position: relative;
6
+ width: 100%;
7
+ background: white;
8
+ box-shadow: 0 2px 3px rgba(0, 0, 0, 0.18);
9
+ &:not(:local(.noMargin)) {
10
+ margin: 20px 0;
11
+ }
12
+ &:not(:local(.noPadding)) {
13
+ padding: 12px 12px;
14
+ @media only screen and (min-width: $screen-sm) {
15
+ padding: 24px 28px;
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _ProgressBarModule = _interopRequireDefault(require("./ProgressBar.module.scss"));
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
14
+ 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; }
15
+
16
+ var ProgressBar = function ProgressBar(_ref) {
17
+ var progress = _ref.progress,
18
+ hasErrors = _ref.hasErrors;
19
+ var scssValueProperty = '--value';
20
+ return /*#__PURE__*/_react.default.createElement("div", {
21
+ className: "".concat(_ProgressBarModule.default.progressBar, " ").concat(hasErrors ? _ProgressBarModule.default.hasErrors : ''),
22
+ role: "progressbar",
23
+ "aria-valuenow": progress || 0,
24
+ "aria-valuemin": "0",
25
+ "aria-valuemax": "100",
26
+ style: _defineProperty({}, scssValueProperty, progress || 0)
27
+ });
28
+ };
29
+
30
+ var _default = ProgressBar;
31
+ exports.default = _default;
@@ -0,0 +1,13 @@
1
+ Progress bar examples:
2
+
3
+ ```js
4
+ <ProgressBar progress={0} />
5
+ <ProgressBar progress={25} />
6
+ <ProgressBar progress={100} />
7
+ ```
8
+
9
+ Progress bar with error example:
10
+
11
+ ```js
12
+ <ProgressBar progress={60} hasErrors />
13
+ ```
@@ -0,0 +1,37 @@
1
+ @import "../style/global.scss";
2
+
3
+ @keyframes growProgressBar {
4
+ 0%,
5
+ 33% {
6
+ --pgPercentage: 0;
7
+ }
8
+ 100% {
9
+ --pgPercentage: var(--value);
10
+ }
11
+ }
12
+
13
+ :local(.progressBar) {
14
+ --size: 4rem;
15
+ --fg: #{$color-primary};
16
+ --bg: #e2e1e0;
17
+ --pgPercentage: var(--value);
18
+ animation: growProgressBar 0.25s 1 forwards;
19
+ width: var(--size);
20
+ height: var(--size);
21
+ border-radius: 50%;
22
+ display: grid;
23
+ place-items: center;
24
+ background: radial-gradient(closest-side, white 80%, transparent 0 99.9%, white 0),
25
+ conic-gradient(var(--fg) calc(var(--pgPercentage) * 1%), var(--bg) 0);
26
+ font-family: Helvetica, Arial, sans-serif;
27
+ font-size: calc(var(--size) / 4);
28
+ color: var(--fg);
29
+ flex-shrink: 0;
30
+ &::before {
31
+ counter-reset: percentage var(--value);
32
+ content: counter(percentage) "%";
33
+ }
34
+ &:local(.hasErrors) {
35
+ --fg: #{$color-error};
36
+ }
37
+ }
@@ -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
+ }