dibk-design 6.5.3 → 7.1.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.
- package/dist/components/Accordion.js +4 -4
- package/dist/components/Accordion.module.scss +25 -18
- package/dist/components/Button.js +11 -14
- package/dist/components/Button.module.scss +79 -66
- package/dist/components/CheckBoxIcon.js +2 -2
- package/dist/components/CheckBoxIcon.module.scss +17 -10
- package/dist/components/CheckBoxInput.js +2 -2
- package/dist/components/CheckBoxInput.module.scss +5 -4
- package/dist/components/CheckBoxList.js +4 -5
- package/dist/components/CheckBoxList.module.scss +3 -2
- package/dist/components/CheckBoxListItem.js +1 -1
- package/dist/components/CheckBoxListItem.module.scss +17 -9
- package/dist/components/Container.js +2 -3
- package/dist/components/Container.module.scss +5 -3
- package/dist/components/ContentBox.js +2 -3
- package/dist/components/ContentBox.module.scss +16 -11
- package/dist/components/DescriptionDetails.js +1 -1
- package/dist/components/DescriptionDetails.module.scss +3 -2
- package/dist/components/DescriptionList.js +2 -2
- package/dist/components/DescriptionList.module.scss +0 -2
- package/dist/components/DescriptionTerm.js +1 -1
- package/dist/components/DescriptionTerm.module.scss +3 -2
- package/dist/components/Dialog.js +4 -5
- package/dist/components/Dialog.module.scss +14 -9
- package/dist/components/DragAndDropFileInput.js +6 -7
- package/dist/components/DragAndDropFileInput.module.scss +9 -5
- package/dist/components/ErrorBox.js +1 -1
- package/dist/components/ErrorBox.module.scss +12 -8
- package/dist/components/ErrorMessage.js +4 -6
- package/dist/components/ErrorMessage.module.scss +5 -3
- package/dist/components/Footer.js +1 -1
- package/dist/components/Footer.module.scss +3 -2
- package/dist/components/Header.js +6 -7
- package/dist/components/Header.module.scss +14 -11
- package/dist/components/InfoBox.js +1 -1
- package/dist/components/InfoBox.module.scss +7 -4
- package/dist/components/InputField.js +8 -10
- package/dist/components/InputField.module.scss +19 -13
- package/dist/components/Label.js +3 -4
- package/dist/components/Label.module.scss +3 -2
- package/dist/components/Lead.js +1 -1
- package/dist/components/Lead.module.scss +5 -3
- package/dist/components/List.js +3 -3
- package/dist/components/List.module.scss +0 -2
- package/dist/components/ListItem.js +1 -1
- package/dist/components/ListItem.module.scss +3 -2
- package/dist/components/LoadingAnimation.js +1 -1
- package/dist/components/LoadingAnimation.module.scss +5 -3
- package/dist/components/NavigationBar.js +9 -10
- package/dist/components/NavigationBar.module.scss +66 -57
- package/dist/components/NavigationBarListItem.js +1 -1
- package/dist/components/PDF.scss +37 -17
- package/dist/components/Paper.js +2 -2
- package/dist/components/Paper.module.scss +3 -2
- package/dist/components/ProgressBar.js +2 -2
- package/dist/components/ProgressBar.module.scss +8 -4
- package/dist/components/RadioButtonIcon.js +2 -2
- package/dist/components/RadioButtonIcon.module.scss +18 -10
- package/dist/components/RadioButtonInput.js +2 -2
- package/dist/components/RadioButtonInput.module.scss +5 -4
- package/dist/components/RadioButtonList.js +4 -5
- package/dist/components/RadioButtonList.module.scss +3 -2
- package/dist/components/RadioButtonListItem.js +1 -1
- package/dist/components/RadioButtonListItem.module.scss +17 -9
- package/dist/components/Select.js +9 -10
- package/dist/components/Select.module.scss +24 -16
- package/dist/components/Table.js +3 -3
- package/dist/components/Table.module.scss +10 -8
- package/dist/components/Textarea.js +7 -8
- package/dist/components/Textarea.module.scss +21 -13
- package/dist/components/Theme.js +2 -2
- package/dist/components/Theme.module.scss +29 -27
- package/dist/components/ThemeProvider.js +2 -2
- package/dist/components/ThemeProvider.module.scss +7 -5
- package/dist/components/ToggleNavigationButton.js +1 -1
- package/dist/components/ToggleNavigationButton.module.scss +11 -8
- package/dist/components/WizardNavigation/Step.js +1 -1
- package/dist/components/WizardNavigation/Step.module.scss +27 -24
- package/dist/components/WizardNavigation.js +4 -5
- package/dist/components/WizardNavigation.module.scss +3 -2
- package/dist/functions/helpers.js +11 -15
- package/dist/functions/theme.js +3 -3
- package/dist/index.js +1 -1
- package/dist/style/base/_typography.scss +5 -2
- package/dist/style/layout/_containers.scss +3 -1
- package/dist/style/pdf.css +41 -18
- package/dist/style/pdf.css.map +1 -1
- package/package.json +16 -15
- package/dist/style/abstracts/_all.scss +0 -2
- package/dist/style/abstracts/mixins/_all.scss +0 -12
- package/dist/style/abstracts/variables/_all.scss +0 -5
- package/dist/style/base/_all.scss +0 -3
- package/dist/style/global.scss +0 -3
- package/dist/style/layout/_all.scss +0 -1
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
// Mixins
|
|
2
|
+
@use "../style/abstracts/mixins/border-radius";
|
|
3
|
+
@use "../style/abstracts/mixins/box-shadow";
|
|
4
|
+
@use "../style/abstracts/mixins/box-sizing";
|
|
5
|
+
@use "../style/abstracts/mixins/transition";
|
|
6
|
+
|
|
7
|
+
// Variables
|
|
8
|
+
@use "../style/abstracts/variables/colors";
|
|
9
|
+
@use "../style/abstracts/variables/transitions";
|
|
2
10
|
|
|
3
11
|
.radioButtonIcon {
|
|
4
|
-
@include border-radius(50%);
|
|
5
|
-
@include transition(all
|
|
6
|
-
@include box-sizing(content-box);
|
|
12
|
+
@include border-radius.border-radius(50%);
|
|
13
|
+
@include transition.transition(all transitions.$default-transition);
|
|
14
|
+
@include box-sizing.box-sizing(content-box);
|
|
7
15
|
display: inline-block;
|
|
8
16
|
vertical-align: middle;
|
|
9
17
|
min-width: 10px;
|
|
@@ -16,22 +24,22 @@
|
|
|
16
24
|
cursor: pointer;
|
|
17
25
|
|
|
18
26
|
&:not(.hasErrors) {
|
|
19
|
-
@include box-shadow(0 0 0 1px var(--color-form-element,
|
|
27
|
+
@include box-shadow.box-shadow(0 0 0 1px var(--color-form-element, colors.$color-form-element));
|
|
20
28
|
}
|
|
21
29
|
&.hasErrors {
|
|
22
|
-
@include box-shadow(0 0 0 1px var(--color-error,
|
|
30
|
+
@include box-shadow.box-shadow(0 0 0 1px var(--color-error, colors.$color-error));
|
|
23
31
|
}
|
|
24
32
|
|
|
25
33
|
&.checked {
|
|
26
|
-
background: var(--color-primary,
|
|
34
|
+
background: var(--color-primary, colors.$color-primary);
|
|
27
35
|
&.hasErrors {
|
|
28
|
-
background: var(--color-error,
|
|
36
|
+
background: var(--color-error, colors.$color-error);
|
|
29
37
|
}
|
|
30
38
|
&:not(.hasErrors) {
|
|
31
|
-
@include box-shadow(0 0 0 1px var(--color-form-element,
|
|
39
|
+
@include box-shadow.box-shadow(0 0 0 1px var(--color-form-element, colors.$color-form-element));
|
|
32
40
|
}
|
|
33
41
|
&.hasErrors {
|
|
34
|
-
@include box-shadow(0 0 0 1px var(--color-error,
|
|
42
|
+
@include box-shadow.box-shadow(0 0 0 1px var(--color-error, colors.$color-error));
|
|
35
43
|
}
|
|
36
44
|
}
|
|
37
45
|
&.disabled {
|
|
@@ -9,10 +9,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
9
|
var _RadioButtonIcon = _interopRequireDefault(require("./RadioButtonIcon"));
|
|
10
10
|
var _asterisk = _interopRequireDefault(require("../assets/svg/asterisk.svg?url"));
|
|
11
11
|
var _RadioButtonInputModule = _interopRequireDefault(require("./RadioButtonInput.module.scss"));
|
|
12
|
-
function _interopRequireDefault(
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
const RadioButtonInput = props => {
|
|
14
14
|
const labelProps = {
|
|
15
|
-
className:
|
|
15
|
+
className: `${_RadioButtonInputModule.default.radioButtonInput} ${props.checked ? _RadioButtonInputModule.default.checked : ""} ${props.disabled ? _RadioButtonInputModule.default.disabled : ""} ${props.hasErrors ? _RadioButtonInputModule.default.hasErrors : ""}`,
|
|
16
16
|
htmlFor: props.id
|
|
17
17
|
};
|
|
18
18
|
const iconProps = {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// Variables
|
|
2
|
+
@use "../style/abstracts/variables/colors";
|
|
2
3
|
|
|
3
4
|
.radioButtonInput {
|
|
4
5
|
display: flex;
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
.labelText {
|
|
24
25
|
font-size: 16px;
|
|
25
26
|
line-height: 24px;
|
|
26
|
-
color: var(--color-form-element,
|
|
27
|
+
color: var(--color-form-element, colors.$color-form-element);
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
&.disabled {
|
|
@@ -34,13 +35,13 @@
|
|
|
34
35
|
|
|
35
36
|
&.hasErrors {
|
|
36
37
|
span {
|
|
37
|
-
color: var(--color-error,
|
|
38
|
+
color: var(--color-error, colors.$color-error);
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
&:focus-within {
|
|
42
43
|
outline-width: 2px;
|
|
43
|
-
outline-color: var(--color-focus,
|
|
44
|
+
outline-color: var(--color-focus, colors.$color-focus);
|
|
44
45
|
outline-style: auto;
|
|
45
46
|
outline-offset: 1px;
|
|
46
47
|
}
|
|
@@ -10,7 +10,7 @@ var _helpers = require("../functions/helpers");
|
|
|
10
10
|
var _asterisk = _interopRequireDefault(require("../assets/svg/asterisk.svg?url"));
|
|
11
11
|
var _RadioButtonListModule = _interopRequireDefault(require("./RadioButtonList.module.scss"));
|
|
12
12
|
var _Header = _interopRequireDefault(require("./Header"));
|
|
13
|
-
function _interopRequireDefault(
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
14
|
const RadioButtonList = _ref => {
|
|
15
15
|
let {
|
|
16
16
|
required,
|
|
@@ -22,13 +22,12 @@ const RadioButtonList = _ref => {
|
|
|
22
22
|
const renderChildElements = childElements => {
|
|
23
23
|
const childElementsthroughFragments = (0, _helpers.cloneThroughFragments)(childElements);
|
|
24
24
|
return childElementsthroughFragments.map((childElement, index) => {
|
|
25
|
-
|
|
26
|
-
const isRadioButtonListItem = (childElement === null || childElement === void 0 || (_childElement$props = childElement.props) === null || _childElement$props === void 0 ? void 0 : _childElement$props.type) === "RadioButtonListItem";
|
|
25
|
+
const isRadioButtonListItem = childElement?.props?.type === "RadioButtonListItem";
|
|
27
26
|
if (isRadioButtonListItem) {
|
|
28
27
|
const childElementCopy = _react.default.cloneElement(childElement, {
|
|
29
28
|
requiredGroup: required,
|
|
30
29
|
compact: compact,
|
|
31
|
-
key:
|
|
30
|
+
key: `radioButtonListItem-${index}`
|
|
32
31
|
});
|
|
33
32
|
return childElementCopy;
|
|
34
33
|
} else {
|
|
@@ -38,7 +37,7 @@ const RadioButtonList = _ref => {
|
|
|
38
37
|
};
|
|
39
38
|
return _react.default.createElement("fieldset", {
|
|
40
39
|
className: _RadioButtonListModule.default.radioButtonList
|
|
41
|
-
}, !!
|
|
40
|
+
}, !!legend?.length ? _react.default.createElement("legend", null, legendSize ? _react.default.createElement(_Header.default, {
|
|
42
41
|
size: legendSize
|
|
43
42
|
}, legend) : legend, required && _react.default.createElement("img", {
|
|
44
43
|
src: _asterisk.default,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
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:
|
|
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(
|
|
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
|
-
|
|
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
|
|
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:
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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(
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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
|
-
...(
|
|
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:
|
|
141
|
+
key: `${props.id}-${(0, _generators.generateRandomString)(6)}`,
|
|
143
142
|
className,
|
|
144
|
-
"aria-describedby": props.hasErrors && !!
|
|
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
|
-
...(
|
|
158
|
+
...(props.width?.length && {
|
|
160
159
|
maxWidth: props.width
|
|
161
160
|
})
|
|
162
161
|
}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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
|
|
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,
|
|
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,
|
|
74
|
-
background-color: var(--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,
|
|
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,
|
|
104
|
+
border-color: var(--color-error, colors.$color-error);
|
|
97
105
|
&:focus {
|
|
98
|
-
border-color: var(--color-error,
|
|
106
|
+
border-color: var(--color-error, colors.$color-error);
|
|
99
107
|
outline-color: #b8565d;
|
|
100
108
|
}
|
|
101
109
|
&[disabled],
|
package/dist/components/Table.js
CHANGED
|
@@ -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(
|
|
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
|
|
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
|
|
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
|
-
|
|
1
|
+
// Variables
|
|
2
|
+
@use "../style/abstracts/variables/colors";
|
|
3
|
+
@use "../style/abstracts/variables/typography";
|
|
2
4
|
|
|
3
5
|
.table {
|
|
4
|
-
font-family:
|
|
6
|
+
font-family: typography.$default-font;
|
|
5
7
|
border-collapse: collapse;
|
|
6
8
|
width: 100%;
|
|
7
9
|
caption {
|
|
8
|
-
font-family:
|
|
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,
|
|
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,
|
|
45
|
-
border: 1px solid var(--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,
|
|
56
|
-
border: 1px solid var(--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(
|
|
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
|
|
20
|
+
return `${props.id}-errorMessage`;
|
|
21
21
|
};
|
|
22
22
|
const renderInputField = () => {
|
|
23
|
-
|
|
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
|
-
...(
|
|
26
|
+
...(props.width?.length && {
|
|
28
27
|
maxWidth: props.width
|
|
29
28
|
}),
|
|
30
|
-
...(
|
|
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 ||
|
|
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 && !!
|
|
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
|
-
|
|
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:
|
|
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,
|
|
45
|
+
border-color: var(--color-primary, colors.$color-primary);
|
|
38
46
|
}
|
|
39
47
|
|
|
40
48
|
&:focus {
|
|
41
|
-
border-color: var(--color-primary,
|
|
42
|
-
outline-color: var(--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,
|
|
60
|
+
border-color: var(--color-error, colors.$color-error);
|
|
53
61
|
&:focus {
|
|
54
|
-
border-color: var(--color-error,
|
|
62
|
+
border-color: var(--color-error, colors.$color-error);
|
|
55
63
|
outline-color: #b8565d;
|
|
56
64
|
}
|
|
57
65
|
&[disabled],
|
package/dist/components/Theme.js
CHANGED
|
@@ -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(
|
|
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:
|
|
38
|
+
className: `${_ThemeModule.default.color} ${colorClassName}`
|
|
39
39
|
}));
|
|
40
40
|
});
|
|
41
41
|
};
|