dibk-design 6.5.2 → 7.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 (94) hide show
  1. package/dist/components/Accordion.js +4 -4
  2. package/dist/components/Accordion.module.scss +25 -18
  3. package/dist/components/Button.js +11 -14
  4. package/dist/components/Button.module.scss +79 -66
  5. package/dist/components/CheckBoxIcon.js +2 -2
  6. package/dist/components/CheckBoxIcon.module.scss +17 -10
  7. package/dist/components/CheckBoxInput.js +2 -2
  8. package/dist/components/CheckBoxInput.module.scss +5 -4
  9. package/dist/components/CheckBoxList.js +4 -5
  10. package/dist/components/CheckBoxList.module.scss +3 -2
  11. package/dist/components/CheckBoxListItem.js +1 -1
  12. package/dist/components/CheckBoxListItem.module.scss +17 -9
  13. package/dist/components/Container.js +2 -3
  14. package/dist/components/Container.module.scss +5 -3
  15. package/dist/components/ContentBox.js +2 -3
  16. package/dist/components/ContentBox.module.scss +16 -11
  17. package/dist/components/DescriptionDetails.js +1 -1
  18. package/dist/components/DescriptionDetails.module.scss +3 -2
  19. package/dist/components/DescriptionList.js +2 -2
  20. package/dist/components/DescriptionList.module.scss +0 -2
  21. package/dist/components/DescriptionTerm.js +1 -1
  22. package/dist/components/DescriptionTerm.module.scss +3 -2
  23. package/dist/components/Dialog.js +4 -5
  24. package/dist/components/Dialog.module.scss +14 -9
  25. package/dist/components/DragAndDropFileInput.js +6 -7
  26. package/dist/components/DragAndDropFileInput.module.scss +9 -5
  27. package/dist/components/ErrorBox.js +1 -1
  28. package/dist/components/ErrorBox.module.scss +12 -8
  29. package/dist/components/ErrorMessage.js +4 -6
  30. package/dist/components/ErrorMessage.module.scss +5 -3
  31. package/dist/components/Footer.js +1 -1
  32. package/dist/components/Footer.module.scss +3 -2
  33. package/dist/components/Header.js +6 -7
  34. package/dist/components/Header.module.scss +14 -11
  35. package/dist/components/InfoBox.js +1 -1
  36. package/dist/components/InfoBox.module.scss +7 -4
  37. package/dist/components/InputField.js +8 -10
  38. package/dist/components/InputField.module.scss +19 -13
  39. package/dist/components/Label.js +3 -4
  40. package/dist/components/Label.module.scss +3 -2
  41. package/dist/components/Lead.js +1 -1
  42. package/dist/components/Lead.module.scss +5 -3
  43. package/dist/components/List.js +3 -3
  44. package/dist/components/List.module.scss +0 -2
  45. package/dist/components/ListItem.js +1 -1
  46. package/dist/components/ListItem.module.scss +3 -2
  47. package/dist/components/LoadingAnimation.js +1 -1
  48. package/dist/components/LoadingAnimation.module.scss +5 -3
  49. package/dist/components/NavigationBar.js +9 -10
  50. package/dist/components/NavigationBar.module.scss +66 -57
  51. package/dist/components/NavigationBarListItem.js +1 -1
  52. package/dist/components/PDF.scss +14 -6
  53. package/dist/components/Paper.js +2 -2
  54. package/dist/components/Paper.module.scss +3 -2
  55. package/dist/components/ProgressBar.js +2 -2
  56. package/dist/components/ProgressBar.module.scss +8 -4
  57. package/dist/components/RadioButtonIcon.js +2 -2
  58. package/dist/components/RadioButtonIcon.module.scss +18 -10
  59. package/dist/components/RadioButtonInput.js +2 -2
  60. package/dist/components/RadioButtonInput.module.scss +5 -4
  61. package/dist/components/RadioButtonList.js +4 -5
  62. package/dist/components/RadioButtonList.module.scss +3 -2
  63. package/dist/components/RadioButtonListItem.js +1 -1
  64. package/dist/components/RadioButtonListItem.module.scss +17 -9
  65. package/dist/components/Select.js +9 -10
  66. package/dist/components/Select.module.scss +24 -16
  67. package/dist/components/Table.js +3 -3
  68. package/dist/components/Table.module.scss +10 -8
  69. package/dist/components/Textarea.js +7 -8
  70. package/dist/components/Textarea.module.scss +21 -13
  71. package/dist/components/Theme.js +2 -2
  72. package/dist/components/Theme.module.scss +29 -27
  73. package/dist/components/ThemeProvider.js +2 -2
  74. package/dist/components/ThemeProvider.module.scss +7 -5
  75. package/dist/components/ToggleNavigationButton.js +1 -1
  76. package/dist/components/ToggleNavigationButton.module.scss +11 -8
  77. package/dist/components/WizardNavigation/Step.js +1 -1
  78. package/dist/components/WizardNavigation/Step.module.scss +27 -24
  79. package/dist/components/WizardNavigation.js +4 -5
  80. package/dist/components/WizardNavigation.module.scss +3 -2
  81. package/dist/functions/helpers.js +11 -15
  82. package/dist/functions/theme.js +3 -3
  83. package/dist/index.js +1 -1
  84. package/dist/style/base/_typography.scss +5 -2
  85. package/dist/style/layout/_containers.scss +3 -1
  86. package/dist/style/pdf.css +3 -0
  87. package/dist/style/pdf.css.map +1 -1
  88. package/package.json +16 -15
  89. package/dist/style/abstracts/_all.scss +0 -2
  90. package/dist/style/abstracts/mixins/_all.scss +0 -12
  91. package/dist/style/abstracts/variables/_all.scss +0 -5
  92. package/dist/style/base/_all.scss +0 -3
  93. package/dist/style/global.scss +0 -3
  94. package/dist/style/layout/_all.scss +0 -1
@@ -1,4 +1,5 @@
1
- @import "../style/global.scss";
1
+ // Variables
2
+ @use "../style/abstracts/variables/typography";
2
3
 
3
4
  fieldset.radioButtonList {
4
5
  margin: 0;
@@ -11,7 +12,7 @@ fieldset.radioButtonList {
11
12
  font-weight: bold;
12
13
  line-height: 1.2;
13
14
  margin-bottom: 2px;
14
- font-family: $default-font;
15
+ font-family: typography.$default-font;
15
16
  overflow-wrap: break-word;
16
17
  .requiredSymbol {
17
18
  width: 1em;
@@ -9,7 +9,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _RadioButtonInput = _interopRequireDefault(require("./RadioButtonInput"));
10
10
  var _helpers = require("../functions/helpers");
11
11
  var _RadioButtonListItemModule = _interopRequireDefault(require("./RadioButtonListItem.module.scss"));
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
13
  const RadioButtonListItem = props => {
14
14
  const listItemClassNameArray = [_RadioButtonListItemModule.default.radioButtonListItem, props.checked ? _RadioButtonListItemModule.default.checked : null, props.disabled ? _RadioButtonListItemModule.default.disabled : null, props.compact ? _RadioButtonListItemModule.default.compact : null, props.contentOnly ? _RadioButtonListItemModule.default.contentOnly : null, props.hasErrors ? _RadioButtonListItemModule.default.hasErrors : null];
15
15
  const listItemClassNameString = (0, _helpers.classNameArrayToClassNameString)(listItemClassNameArray);
@@ -1,9 +1,17 @@
1
- @import "../style/global.scss";
1
+ // Mixins
2
+ @use "../style/abstracts/mixins/border-radius";
3
+ @use "../style/abstracts/mixins/box-sizing";
4
+ @use "../style/abstracts/mixins/transition";
5
+
6
+ // Variables
7
+ @use "../style/abstracts/variables/colors";
8
+ @use "../style/abstracts/variables/transitions";
9
+ @use "../style/abstracts/variables/typography";
2
10
 
3
11
  .radioButtonListItem {
4
- @include box-sizing(content-box);
5
- @include border-radius(0);
6
- @include transition(all $default-transition);
12
+ @include box-sizing.box-sizing(content-box);
13
+ @include border-radius.border-radius(0);
14
+ @include transition.transition(all transitions.$default-transition);
7
15
  display: -webkit-box;
8
16
  display: -webkit-flex;
9
17
  display: -ms-flexbox;
@@ -13,14 +21,14 @@
13
21
  -ms-flex-align: flex-start;
14
22
  align-items: flex-start;
15
23
  cursor: pointer;
16
- font-family: $default-font;
24
+ font-family: typography.$default-font;
17
25
  position: relative;
18
26
  font-size: 16px;
19
27
  line-height: 24px;
20
28
  color: #000;
21
29
 
22
30
  &:not(.contentOnly):not(.compact) {
23
- border: 1px solid var(--color-secondary-light, $color-secondary-light);
31
+ border: 1px solid var(--color-secondary-light, colors.$color-secondary-light);
24
32
  background: white;
25
33
  margin-bottom: 8px;
26
34
  label {
@@ -43,15 +51,15 @@
43
51
  }
44
52
 
45
53
  &.checked:not(.contentOnly):not(.compact):not(.disabled) {
46
- background-color: var(--color-secondary-light, $color-secondary-light);
54
+ background-color: var(--color-secondary-light, colors.$color-secondary-light);
47
55
  }
48
56
 
49
57
  &:not(.checked):not(.contentOnly):not(.compact):not(.disabled) {
50
58
  &:hover {
51
- background-color: var(--color-secondary-x-light, $color-secondary-x-light);
59
+ background-color: var(--color-secondary-x-light, colors.$color-secondary-x-light);
52
60
  }
53
61
  &:focus-within {
54
- background-color: var(--color-secondary-x-light, $color-secondary-x-light);
62
+ background-color: var(--color-secondary-x-light, colors.$color-secondary-x-light);
55
63
  }
56
64
  }
57
65
 
@@ -14,7 +14,7 @@ var _generators = require("../functions/generators");
14
14
  var _helpers = require("../functions/helpers");
15
15
  var _asterisk = _interopRequireDefault(require("../assets/svg/asterisk.svg?url"));
16
16
  var _SelectModule = _interopRequireDefault(require("./Select.module.scss"));
17
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
18
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
19
19
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
20
  const Select = props => {
@@ -39,7 +39,7 @@ const Select = props => {
39
39
  }
40
40
  };
41
41
  const handleClickOutside = event => {
42
- if (dropdownRef !== null && dropdownRef !== void 0 && dropdownRef.current && !dropdownRef.current.contains(event.target)) {
42
+ if (dropdownRef?.current && !dropdownRef.current.contains(event.target)) {
43
43
  hideDropdownList();
44
44
  }
45
45
  };
@@ -77,7 +77,7 @@ const Select = props => {
77
77
  };
78
78
  const renderSelectedValues = (options, selectElementProps) => {
79
79
  const selectedValues = selectElementProps.defaultValue || selectElementProps.value;
80
- return selectedValues !== null && selectedValues !== void 0 && selectedValues.length ? selectedValues.map(value => {
80
+ return selectedValues?.length ? selectedValues.map(value => {
81
81
  const keyForValue = getKeyByValue(value, options);
82
82
  return keyForValue;
83
83
  }).join(", ") : null;
@@ -89,7 +89,7 @@ const Select = props => {
89
89
  const isSelected = selectedValues && selectedValues.length && selectedValues.includes(optionObject.value);
90
90
  return _react.default.createElement(_CheckBoxListItem.default, {
91
91
  key: index,
92
- id: "".concat(props.id, "-").concat(index),
92
+ id: `${props.id}-${index}`,
93
93
  value: optionObject.value,
94
94
  checked: isSelected,
95
95
  onChange: () => selectElementProps.onChange(optionObject.value)
@@ -112,7 +112,7 @@ const Select = props => {
112
112
  }, placeholder) : "";
113
113
  };
114
114
  const getErrorElementId = () => {
115
- return "".concat(props.id, "-errorMessage");
115
+ return `${props.id}-errorMessage`;
116
116
  };
117
117
  if (props.contentOnly) {
118
118
  const value = props.defaultValue ? props.defaultValue : props.value || null;
@@ -122,10 +122,9 @@ const Select = props => {
122
122
  htmlFor: props.id
123
123
  }, props.label), _react.default.createElement("span", null, value ? props.keyAsContent ? getKeyByValue(value, props.options) : value : props.defaultContent));
124
124
  } else {
125
- var _props$width, _props$errorMessage, _props$ariaDescribed, _props$width2;
126
125
  const defaultValue = !props.value && props.defaultValue ? props.defaultValue : false;
127
126
  const styleRules = {
128
- ...(((_props$width = props.width) === null || _props$width === void 0 ? void 0 : _props$width.length) && {
127
+ ...(props.width?.length && {
129
128
  maxWidth: props.width
130
129
  })
131
130
  };
@@ -139,9 +138,9 @@ const Select = props => {
139
138
  onChange: props.onChange,
140
139
  id: props.id,
141
140
  role: props.role,
142
- key: "".concat(props.id, "-").concat((0, _generators.generateRandomString)(6)),
141
+ key: `${props.id}-${(0, _generators.generateRandomString)(6)}`,
143
142
  className,
144
- "aria-describedby": props.hasErrors && !!((_props$errorMessage = props.errorMessage) !== null && _props$errorMessage !== void 0 && _props$errorMessage.length) ? getErrorElementId() : !!((_props$ariaDescribed = props["aria-describedby"]) !== null && _props$ariaDescribed !== void 0 && _props$ariaDescribed.length) ? props["aria-describedby"] : null,
143
+ "aria-describedby": props.hasErrors && !!props.errorMessage?.length ? getErrorElementId() : !!props["aria-describedby"]?.length ? props["aria-describedby"] : null,
145
144
  "aria-invalid": props.hasErrors ? "true" : null,
146
145
  style: styleRules
147
146
  };
@@ -156,7 +155,7 @@ const Select = props => {
156
155
  })), _react.default.createElement("div", {
157
156
  className: _SelectModule.default.selectContainer,
158
157
  style: {
159
- ...(((_props$width2 = props.width) === null || _props$width2 === void 0 ? void 0 : _props$width2.length) && {
158
+ ...(props.width?.length && {
160
159
  maxWidth: props.width
161
160
  })
162
161
  }
@@ -1,4 +1,13 @@
1
- @import "../style/global.scss";
1
+ // Mixins
2
+ @use "../style/abstracts/mixins/appearance";
3
+ @use "../style/abstracts/mixins/border-radius";
4
+ @use "../style/abstracts/mixins/box-shadow";
5
+ @use "../style/abstracts/mixins/transition";
6
+
7
+ // Variables
8
+ @use "../style/abstracts/variables/colors";
9
+ @use "../style/abstracts/variables/transitions";
10
+ @use "../style/abstracts/variables/viewports";
2
11
 
3
12
  .select {
4
13
  .requiredSymbol {
@@ -12,6 +21,7 @@
12
21
  position: relative;
13
22
 
14
23
  .selectListArrow {
24
+ @include border-radius.border-radius(100px);
15
25
  box-sizing: border-box;
16
26
  position: absolute;
17
27
  top: 15px;
@@ -19,8 +29,7 @@
19
29
  display: block;
20
30
  width: 12px;
21
31
  height: calc(50% - 6px);
22
- border-radius: 100px;
23
- @media only screen and (min-width: $screen-sm) {
32
+ @media only screen and (min-width: viewports.$screen-sm) {
24
33
  top: 20px;
25
34
  right: 20px;
26
35
  }
@@ -40,8 +49,8 @@
40
49
  }
41
50
 
42
51
  .multipleSelectDropdown {
43
- @include border-radius(4px);
44
- @include box-shadow(
52
+ @include border-radius.border-radius(4px);
53
+ @include box-shadow.box-shadow(
45
54
  rgba(0, 0, 0, 0.2) 0px 5px 5px -3px,
46
55
  rgba(0, 0, 0, 0.14) 0px 8px 10px 1px,
47
56
  rgba(0, 0, 0, 0.12) 0px 3px 14px 2px
@@ -54,28 +63,27 @@
54
63
 
55
64
  select,
56
65
  .multipleSelectElement {
57
- @include border-radius(0);
58
- @include transition(background $default-transition);
59
- @include appearance(none);
60
- @include box-shadow(none);
66
+ @include border-radius.border-radius(0);
67
+ @include transition.transition(background transitions.$default-transition);
68
+ @include appearance.appearance(none);
69
+ @include box-shadow.box-shadow(none);
61
70
  color: rgba(0, 0, 0, 0.75);
62
71
  width: 100%;
63
72
  font-family: inherit;
64
73
  font-size: 18px;
65
74
  padding: 10px 40px 10px 10px;
66
- border: 1px solid var(--color-primary, $color-primary);
67
- border-radius: 0;
75
+ border: 1px solid var(--color-primary, colors.$color-primary);
68
76
  line-height: 1.7;
69
77
  background: white;
70
78
  cursor: pointer;
71
79
 
72
80
  &:hover {
73
- border-color: var(--color-primary, $color-primary);
74
- background-color: var(--color-secondary-x-light, $color-secondary-x-light);
81
+ border-color: var(--color-primary, colors.$color-primary);
82
+ background-color: var(--color-secondary-x-light, colors.$color-secondary-x-light);
75
83
  }
76
84
 
77
85
  &:focus {
78
- outline-color: var(--color-primary, $color-primary);
86
+ outline-color: var(--color-primary, colors.$color-primary);
79
87
  }
80
88
 
81
89
  &[disabled],
@@ -93,9 +101,9 @@
93
101
  }
94
102
 
95
103
  &.hasErrors {
96
- border-color: var(--color-error, $color-error);
104
+ border-color: var(--color-error, colors.$color-error);
97
105
  &:focus {
98
- border-color: var(--color-error, $color-error);
106
+ border-color: var(--color-error, colors.$color-error);
99
107
  outline-color: #b8565d;
100
108
  }
101
109
  &[disabled],
@@ -8,16 +8,16 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _helpers = require("../functions/helpers");
10
10
  var _TableModule = _interopRequireDefault(require("./Table.module.scss"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  const getCaptionAlignClass = captionAlign => {
13
13
  const defaultValue = "left";
14
14
  const availableValues = ["left", "center", "right"];
15
- return captionAlign !== null && captionAlign !== void 0 && captionAlign.length && availableValues.includes(captionAlign) ? _TableModule.default["captionAlign-".concat(captionAlign)] : _TableModule.default["captionAlign-".concat(defaultValue)];
15
+ return captionAlign?.length && availableValues.includes(captionAlign) ? _TableModule.default[`captionAlign-${captionAlign}`] : _TableModule.default[`captionAlign-${defaultValue}`];
16
16
  };
17
17
  const getCaptionSideClass = captionSide => {
18
18
  const defaultValue = "top";
19
19
  const availableValues = ["top", "bottom"];
20
- return captionSide !== null && captionSide !== void 0 && captionSide.length && availableValues.includes(captionSide) ? _TableModule.default["captionSide-".concat(captionSide)] : _TableModule.default["captionSide-".concat(defaultValue)];
20
+ return captionSide?.length && availableValues.includes(captionSide) ? _TableModule.default[`captionSide-${captionSide}`] : _TableModule.default[`captionSide-${defaultValue}`];
21
21
  };
22
22
  const Table = props => {
23
23
  return _react.default.createElement("table", {
@@ -1,16 +1,18 @@
1
- @import "../style/global.scss";
1
+ // Variables
2
+ @use "../style/abstracts/variables/colors";
3
+ @use "../style/abstracts/variables/typography";
2
4
 
3
5
  .table {
4
- font-family: $default-font;
6
+ font-family: typography.$default-font;
5
7
  border-collapse: collapse;
6
8
  width: 100%;
7
9
  caption {
8
- font-family: $default-font;
10
+ font-family: typography.$default-font;
9
11
  font-weight: normal;
10
12
  font-style: italic;
11
13
  line-height: 1;
12
14
  font-size: 17px;
13
- color: var(--color-primary, $color-primary);
15
+ color: var(--color-primary, colors.$color-primary);
14
16
  }
15
17
  &.captionSide-top {
16
18
  caption {
@@ -41,8 +43,8 @@
41
43
  }
42
44
  thead {
43
45
  tr {
44
- background-color: var(--color-default-background, $color-default-background);
45
- border: 1px solid var(--color-border, $color-border);
46
+ background-color: var(--color-default-background, colors.$color-default-background);
47
+ border: 1px solid var(--color-border, colors.$color-border);
46
48
  th {
47
49
  text-align: left;
48
50
  font-size: 16px;
@@ -52,8 +54,8 @@
52
54
  }
53
55
  tbody {
54
56
  tr {
55
- background-color: var(--color-default-background, $color-default-background);
56
- border: 1px solid var(--color-border, $color-border);
57
+ background-color: var(--color-default-background, colors.$color-default-background);
58
+ border: 1px solid var(--color-border, colors.$color-border);
57
59
  td {
58
60
  padding: 10px;
59
61
  font-size: 16px;
@@ -11,23 +11,22 @@ var _ErrorMessage = _interopRequireDefault(require("./ErrorMessage"));
11
11
  var _generators = require("../functions/generators");
12
12
  var _asterisk = _interopRequireDefault(require("../assets/svg/asterisk.svg?url"));
13
13
  var _TextareaModule = _interopRequireDefault(require("./Textarea.module.scss"));
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
15
  const Textarea = props => {
16
16
  const renderValueAsText = (value, defaultContent) => {
17
17
  return value ? value : defaultContent;
18
18
  };
19
19
  const getErrorElementId = () => {
20
- return "".concat(props.id, "-errorMessage");
20
+ return `${props.id}-errorMessage`;
21
21
  };
22
22
  const renderInputField = () => {
23
- var _props$value, _props$defaultValue, _props$width, _props$resize, _props$errorMessage, _props$ariaDescribed;
24
- const defaultValue = !((_props$value = props.value) !== null && _props$value !== void 0 && _props$value.length) && (_props$defaultValue = props.defaultValue) !== null && _props$defaultValue !== void 0 && _props$defaultValue.length ? props.defaultValue : false;
23
+ const defaultValue = !props.value?.length && props.defaultValue?.length ? props.defaultValue : false;
25
24
  const defaultKey = props.elementKey || null;
26
25
  const styleRules = {
27
- ...(((_props$width = props.width) === null || _props$width === void 0 ? void 0 : _props$width.length) && {
26
+ ...(props.width?.length && {
28
27
  maxWidth: props.width
29
28
  }),
30
- ...(((_props$resize = props.resize) === null || _props$resize === void 0 ? void 0 : _props$resize.length) && {
29
+ ...(props.resize?.length && {
31
30
  resize: props.resize
32
31
  })
33
32
  };
@@ -38,14 +37,14 @@ const Textarea = props => {
38
37
  required: props.required,
39
38
  type: props.type,
40
39
  id: props.id,
41
- key: defaultKey || "".concat(props.id, "-").concat((0, _generators.generateRandomString)(6)),
40
+ key: defaultKey || `${props.id}-${(0, _generators.generateRandomString)(6)}`,
42
41
  onChange: props.onChange,
43
42
  onBlur: props.onBlur,
44
43
  [defaultValue ? "defaultValue" : "value"]: defaultValue || props.value,
45
44
  placeholder: props.placeholder,
46
45
  rows: props.rows,
47
46
  className: props.hasErrors ? _TextareaModule.default.hasErrors : "",
48
- "aria-describedby": props.hasErrors && !!((_props$errorMessage = props.errorMessage) !== null && _props$errorMessage !== void 0 && _props$errorMessage.length) ? getErrorElementId() : !!((_props$ariaDescribed = props["aria-describedby"]) !== null && _props$ariaDescribed !== void 0 && _props$ariaDescribed.length) ? props["aria-describedby"] : null,
47
+ "aria-describedby": props.hasErrors && !!props.errorMessage?.length ? getErrorElementId() : !!props["aria-describedby"]?.length ? props["aria-describedby"] : null,
49
48
  "aria-invalid": props.hasErrors ? "true" : null,
50
49
  style: styleRules
51
50
  };
@@ -1,4 +1,13 @@
1
- @import "../style/global.scss";
1
+ // Mixins
2
+ @use "../style/abstracts/mixins/appearance";
3
+ @use "../style/abstracts/mixins/border-radius";
4
+ @use "../style/abstracts/mixins/box-shadow";
5
+ @use "../style/abstracts/mixins/box-sizing";
6
+ @use "../style/abstracts/mixins/transition";
7
+
8
+ // Variables
9
+ @use "../style/abstracts/variables/colors";
10
+ @use "../style/abstracts/variables/viewports";
2
11
 
3
12
  .textarea {
4
13
  > div {
@@ -12,10 +21,11 @@
12
21
  margin-top: 2px;
13
22
  }
14
23
  textarea {
15
- @include appearance(none);
16
- @include transition(border-color 0.15s linear, background 0.15s linear);
17
- @include border-radius(0);
18
- @include box-shadow(none);
24
+ @include appearance.appearance(none);
25
+ @include transition.transition(border-color 0.15s linear, background 0.15s linear);
26
+ @include border-radius.border-radius(0);
27
+ @include box-shadow.box-shadow(none);
28
+ @include box-sizing.box-sizing(border-box);
19
29
  height: auto;
20
30
  width: 100%;
21
31
  display: block;
@@ -23,23 +33,21 @@
23
33
  margin-bottom: 0;
24
34
  font-weight: 300;
25
35
  background-color: #fff;
26
- box-shadow: none;
27
36
  color: rgba(0, 0, 0, 0.75);
28
37
  font-family: inherit;
29
38
  font-size: 16px;
30
- box-sizing: border-box;
31
39
  border: 1px solid #afaba8;
32
- @media only screen and (min-width: $screen-sm) {
40
+ @media only screen and (min-width: viewports.$screen-sm) {
33
41
  font-size: 19px;
34
42
  }
35
43
 
36
44
  &:hover {
37
- border-color: var(--color-primary, $color-primary);
45
+ border-color: var(--color-primary, colors.$color-primary);
38
46
  }
39
47
 
40
48
  &:focus {
41
- border-color: var(--color-primary, $color-primary);
42
- outline-color: var(--color-focus, $color-focus);
49
+ border-color: var(--color-primary, colors.$color-primary);
50
+ outline-color: var(--color-focus, colors.$color-focus);
43
51
  }
44
52
 
45
53
  &[disabled],
@@ -49,9 +57,9 @@
49
57
  }
50
58
 
51
59
  &.hasErrors {
52
- border-color: var(--color-error, $color-error);
60
+ border-color: var(--color-error, colors.$color-error);
53
61
  &:focus {
54
- border-color: var(--color-error, $color-error);
62
+ border-color: var(--color-error, colors.$color-error);
55
63
  outline-color: #b8565d;
56
64
  }
57
65
  &[disabled],
@@ -22,7 +22,7 @@ var _Paper = _interopRequireDefault(require("./Paper"));
22
22
  var _RadioButtonList = _interopRequireDefault(require("./RadioButtonList"));
23
23
  var _RadioButtonListItem = _interopRequireDefault(require("./RadioButtonListItem"));
24
24
  var _ThemeModule = _interopRequireDefault(require("./Theme.module.scss"));
25
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
26
26
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
27
27
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
28
28
  const Theme = _ref => {
@@ -35,7 +35,7 @@ const Theme = _ref => {
35
35
  return _react.default.createElement(_react.Fragment, {
36
36
  key: color
37
37
  }, _react.default.createElement("div", null, color), _react.default.createElement("div", {
38
- className: "".concat(_ThemeModule.default.color, " ").concat(colorClassName)
38
+ className: `${_ThemeModule.default.color} ${colorClassName}`
39
39
  }));
40
40
  });
41
41
  };
@@ -1,4 +1,6 @@
1
- @import "../style/global.scss";
1
+ // Variables
2
+ @use "../style/abstracts/variables/colors";
3
+ @use "../style/abstracts/variables/viewports";
2
4
 
3
5
  section:not(:last-of-type) {
4
6
  margin: 24px 0;
@@ -16,86 +18,86 @@ section:last-of-type {
16
18
  padding: 8px;
17
19
  text-align: right;
18
20
  width: 50%;
19
- @media screen and (min-width: $screen-sm) {
21
+ @media screen and (min-width: viewports.$screen-sm) {
20
22
  width: 25%;
21
23
  }
22
- @media screen and (min-width: $screen-md) {
24
+ @media screen and (min-width: viewports.$screen-md) {
23
25
  width: 16.6%;
24
26
  }
25
27
  }
26
28
 
27
29
  .color {
28
30
  &.bodyBackground {
29
- background-color: var(--color-body-background, $color-body-background);
31
+ background-color: var(--color-body-background, colors.$color-body-background);
30
32
  }
31
33
  &.defaultText {
32
- background-color: var(--color-default-text, $color-default-text);
34
+ background-color: var(--color-default-text, colors.$color-default-text);
33
35
  }
34
36
  &.primaryText {
35
- background-color: var(--color-primary-text, $color-primary-text);
37
+ background-color: var(--color-primary-text, colors.$color-primary-text);
36
38
  }
37
39
  &.secondaryText {
38
- background-color: var(--color-border, $color-border);
40
+ background-color: var(--color-border, colors.$color-border);
39
41
  }
40
42
  &.primary {
41
- background-color: var(--color-primary, $color-primary);
43
+ background-color: var(--color-primary, colors.$color-primary);
42
44
  }
43
45
  &.primaryLight {
44
- background-color: var(--color-primary-light, $color-primary-light);
46
+ background-color: var(--color-primary-light, colors.$color-primary-light);
45
47
  }
46
48
  &.primaryXLight {
47
- background-color: var(--color-primary-x-light, $color-primary-x-light);
49
+ background-color: var(--color-primary-x-light, colors.$color-primary-x-light);
48
50
  }
49
51
  &.primaryContrast {
50
- background-color: var(--color-primary-contrast, $color-primary-contrast);
52
+ background-color: var(--color-primary-contrast, colors.$color-primary-contrast);
51
53
  }
52
54
  &.secondary {
53
- background-color: var(--color-secondary, $color-secondary);
55
+ background-color: var(--color-secondary, colors.$color-secondary);
54
56
  }
55
57
  &.secondaryLight {
56
- background-color: var(--color-secondary-light, $color-secondary-light);
58
+ background-color: var(--color-secondary-light, colors.$color-secondary-light);
57
59
  }
58
60
  &.secondaryXLight {
59
- background-color: var(--color-secondary-x-light, $color-secondary-x-light);
61
+ background-color: var(--color-secondary-x-light, colors.$color-secondary-x-light);
60
62
  }
61
63
  &.secondaryContrast {
62
- background-color: var(--color-secondary-contrast, $color-secondary-contrast);
64
+ background-color: var(--color-secondary-contrast, colors.$color-secondary-contrast);
63
65
  }
64
66
  &.focus {
65
- background-color: var(--color-focus, $color-focus);
67
+ background-color: var(--color-focus, colors.$color-focus);
66
68
  }
67
69
  &.defaultBackground {
68
- background-color: var(--color-default-background, $color-default-background);
70
+ background-color: var(--color-default-background, colors.$color-default-background);
69
71
  }
70
72
  &.secondaryBackground {
71
- background-color: var(--color-secondary-background, $color-secondary-background);
73
+ background-color: var(--color-secondary-background, colors.$color-secondary-background);
72
74
  }
73
75
  &.success {
74
- background-color: var(--color-success, $color-success);
76
+ background-color: var(--color-success, colors.$color-success);
75
77
  }
76
78
  &.successLight {
77
- background-color: var(--color-success-light, $color-success-light);
79
+ background-color: var(--color-success-light, colors.$color-success-light);
78
80
  }
79
81
  &.successXLight {
80
- background-color: var(--color-success-x-light, $color-success-x-light);
82
+ background-color: var(--color-success-x-light, colors.$color-success-x-light);
81
83
  }
82
84
  &.warning {
83
- background-color: var(--color-warning, $color-warning);
85
+ background-color: var(--color-warning, colors.$color-warning);
84
86
  }
85
87
  &.warningLight {
86
- background-color: var(--color-warning-light, $color-warning-light);
88
+ background-color: var(--color-warning-light, colors.$color-warning-light);
87
89
  }
88
90
  &.warningXLight {
89
- background-color: var(--color-warning-x-light, $color-warning-x-light);
91
+ background-color: var(--color-warning-x-light, colors.$color-warning-x-light);
90
92
  }
91
93
  &.error {
92
- background-color: var(--color-error, $color-error);
94
+ background-color: var(--color-error, colors.$color-error);
93
95
  }
94
96
  &.errorLight {
95
- background-color: var(--color-error-light, $color-error-light);
97
+ background-color: var(--color-error-light, colors.$color-error-light);
96
98
  }
97
99
  &.errorXLight {
98
- background-color: var(--color-error-x-light, $color-error-x-light);
100
+ background-color: var(--color-error-x-light, colors.$color-error-x-light);
99
101
  }
100
102
  }
101
103
  }
@@ -7,7 +7,7 @@ exports.default = void 0;
7
7
  var _propTypes = _interopRequireDefault(require("prop-types"));
8
8
  var _helpers = require("../functions/helpers");
9
9
  var _ThemeProviderModule = _interopRequireDefault(require("!!raw-loader!sass-loader!./ThemeProvider.module.scss"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  const ThemeProvider = _ref => {
12
12
  let {
13
13
  theme,
@@ -15,7 +15,7 @@ const ThemeProvider = _ref => {
15
15
  } = _ref;
16
16
  const cssVariablesFromTheme = (0, _helpers.getCssVariablesFromTheme)(theme);
17
17
  const cssColorVariablesString = (0, _helpers.stringifyCssColorVariables)(cssVariablesFromTheme);
18
- (0, _helpers.addGlobalStylesheet)("theme-provider", ":root {".concat(cssColorVariablesString, "} ").concat(_ThemeProviderModule.default));
18
+ (0, _helpers.addGlobalStylesheet)("theme-provider", `:root {${cssColorVariablesString}} ${_ThemeProviderModule.default}`);
19
19
  return children;
20
20
  };
21
21
  ThemeProvider.propTypes = {
@@ -1,4 +1,6 @@
1
- @import "../style/abstracts/all";
1
+ // Variables
2
+ @use "../style/abstracts/variables/colors";
3
+ @use "../style/abstracts/variables/typography";
2
4
 
3
5
  *,
4
6
  *::before,
@@ -7,9 +9,9 @@
7
9
  }
8
10
  body {
9
11
  margin: 0;
10
- font-family: $default-font;
11
- background-color: var(--color-body-background, $color-body-background);
12
- color: var(--color-default-text, $color-default-text);
12
+ font-family: typography.$default-font;
13
+ background-color: var(--color-body-background, colors.$color-body-background);
14
+ color: var(--color-default-text, colors.$color-default-text);
13
15
  font-size: 16px;
14
16
  line-height: 24px;
15
17
  -webkit-font-smoothing: antialiased;
@@ -18,5 +20,5 @@ body {
18
20
  letter-spacing: 0.01em;
19
21
  }
20
22
  a {
21
- color: var(--color-primary, $color-primary);
23
+ color: var(--color-primary, colors.$color-primary);
22
24
  }
@@ -7,7 +7,7 @@ exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _ToggleNavigationButtonModule = _interopRequireDefault(require("./ToggleNavigationButton.module.scss"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  const ToggleNavigationButton = _ref => {
12
12
  let {
13
13
  id,