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.
- 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 +14 -6
- 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 +3 -0
- 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
|
@@ -8,10 +8,10 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _helpers = require("../functions/helpers");
|
|
10
10
|
var _AccordionModule = _interopRequireDefault(require("./Accordion.module.scss"));
|
|
11
|
-
function _interopRequireDefault(
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
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); }
|
|
13
13
|
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; }
|
|
14
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
14
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
15
15
|
const Accordion = props => {
|
|
16
16
|
const [expanded, setExpanded] = (0, _react.useState)(props.expanded);
|
|
17
17
|
const [initialized, setInitialized] = (0, _react.useState)(props.initialized);
|
|
@@ -33,14 +33,14 @@ const Accordion = props => {
|
|
|
33
33
|
}), _react.default.createElement("span", {
|
|
34
34
|
className: _AccordionModule.default.panelText
|
|
35
35
|
}, props.title), _react.default.createElement("span", {
|
|
36
|
-
className:
|
|
36
|
+
className: `${_AccordionModule.default.panelChevron} ${expanded ? _AccordionModule.default.expanded : ""}`
|
|
37
37
|
}));
|
|
38
38
|
};
|
|
39
39
|
const className = (0, _helpers.classNameArrayToClassNameString)([_AccordionModule.default.accordion, props.color && _AccordionModule.default[props.color], !props.noMargin && _AccordionModule.default.margin]);
|
|
40
40
|
return _react.default.createElement("div", {
|
|
41
41
|
className: className
|
|
42
42
|
}, renderPanel(), _react.default.createElement("div", {
|
|
43
|
-
className:
|
|
43
|
+
className: `${_AccordionModule.default.content} ${initialized ? _AccordionModule.default.initialized : ""} ${expanded ? _AccordionModule.default.expanded : ""}`
|
|
44
44
|
}, props.children));
|
|
45
45
|
};
|
|
46
46
|
Accordion.propTypes = {
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
// Mixins
|
|
2
|
+
@use "../style/abstracts/mixins/appearance";
|
|
3
|
+
@use "../style/abstracts/mixins/border-radius";
|
|
4
|
+
|
|
5
|
+
// Variables
|
|
6
|
+
@use "../style/abstracts/variables/colors";
|
|
7
|
+
@use "../style/abstracts/variables/viewports";
|
|
8
|
+
@use "../style/abstracts/variables/typography";
|
|
2
9
|
|
|
3
10
|
@keyframes show {
|
|
4
11
|
0% {
|
|
@@ -34,7 +41,7 @@
|
|
|
34
41
|
}
|
|
35
42
|
}
|
|
36
43
|
|
|
37
|
-
@media only screen and (min-width:
|
|
44
|
+
@media only screen and (min-width: viewports.$screen-sm) {
|
|
38
45
|
@keyframes show {
|
|
39
46
|
0% {
|
|
40
47
|
opacity: 0;
|
|
@@ -70,23 +77,23 @@
|
|
|
70
77
|
}
|
|
71
78
|
|
|
72
79
|
.accordion {
|
|
73
|
-
font-family:
|
|
80
|
+
font-family: typography.$default-font;
|
|
74
81
|
text-decoration: none;
|
|
75
82
|
width: 100%;
|
|
76
83
|
display: block;
|
|
77
84
|
&.default {
|
|
78
|
-
background-color: var(--color-default-background,
|
|
85
|
+
background-color: var(--color-default-background, colors.$color-default-background);
|
|
79
86
|
.panel span,
|
|
80
87
|
.content {
|
|
81
|
-
color: var(--color-default-text,
|
|
88
|
+
color: var(--color-default-text, colors.$color-default-text);
|
|
82
89
|
}
|
|
83
90
|
}
|
|
84
91
|
&.secondary {
|
|
85
|
-
background-color: var(--color-secondary-background,
|
|
86
|
-
color: var(--color-default-text,
|
|
92
|
+
background-color: var(--color-secondary-background, colors.$color-secondary-background);
|
|
93
|
+
color: var(--color-default-text, colors.$color-default-text);
|
|
87
94
|
.panel span,
|
|
88
95
|
.content {
|
|
89
|
-
color: var(--color-default-text,
|
|
96
|
+
color: var(--color-default-text, colors.$color-default-text);
|
|
90
97
|
}
|
|
91
98
|
}
|
|
92
99
|
&.margin {
|
|
@@ -94,9 +101,9 @@
|
|
|
94
101
|
}
|
|
95
102
|
|
|
96
103
|
.panel {
|
|
97
|
-
@include appearance(none);
|
|
98
|
-
@include border-radius(0);
|
|
99
|
-
font-family:
|
|
104
|
+
@include appearance.appearance(none);
|
|
105
|
+
@include border-radius.border-radius(0);
|
|
106
|
+
font-family: typography.$default-font;
|
|
100
107
|
padding: 15px 15px;
|
|
101
108
|
display: flex;
|
|
102
109
|
align-items: center;
|
|
@@ -109,30 +116,30 @@
|
|
|
109
116
|
width: 100%;
|
|
110
117
|
background: none;
|
|
111
118
|
text-align: left;
|
|
112
|
-
@media only screen and (min-width:
|
|
119
|
+
@media only screen and (min-width: viewports.$screen-sm) {
|
|
113
120
|
padding: 15px 30px;
|
|
114
121
|
}
|
|
115
122
|
&:focus-visible {
|
|
116
|
-
outline-color: var(--color-primary,
|
|
123
|
+
outline-color: var(--color-primary, colors.$color-primary);
|
|
117
124
|
outline-style: auto;
|
|
118
125
|
outline-width: 2px;
|
|
119
126
|
outline-offset: 0px;
|
|
120
127
|
}
|
|
121
128
|
.panelText {
|
|
122
|
-
font-family:
|
|
129
|
+
font-family: typography.$default-font;
|
|
123
130
|
font-weight: bold;
|
|
124
131
|
font-size: 18px;
|
|
125
132
|
flex: 1;
|
|
126
133
|
}
|
|
127
134
|
.panelChevron {
|
|
135
|
+
@include border-radius.border-radius(100px);
|
|
128
136
|
box-sizing: border-box;
|
|
129
137
|
position: relative;
|
|
130
138
|
display: block;
|
|
131
139
|
width: 18px;
|
|
132
140
|
height: 18px;
|
|
133
|
-
border-radius: 100px;
|
|
134
141
|
margin-right: 6px;
|
|
135
|
-
@media only screen and (min-width:
|
|
142
|
+
@media only screen and (min-width: viewports.$screen-sm) {
|
|
136
143
|
margin-right: 0;
|
|
137
144
|
}
|
|
138
145
|
&::after {
|
|
@@ -161,7 +168,7 @@
|
|
|
161
168
|
max-height: 0;
|
|
162
169
|
overflow: hidden;
|
|
163
170
|
padding: 0 15px 0;
|
|
164
|
-
@media only screen and (min-width:
|
|
171
|
+
@media only screen and (min-width: viewports.$screen-sm) {
|
|
165
172
|
padding: 0 30px 0;
|
|
166
173
|
}
|
|
167
174
|
&.initialized {
|
|
@@ -175,7 +182,7 @@
|
|
|
175
182
|
padding: 8px 15px 15px;
|
|
176
183
|
line-height: inherit;
|
|
177
184
|
max-height: 10000px;
|
|
178
|
-
@media only screen and (min-width:
|
|
185
|
+
@media only screen and (min-width: viewports.$screen-sm) {
|
|
179
186
|
padding: 8px 30px 15px;
|
|
180
187
|
}
|
|
181
188
|
}
|
|
@@ -9,12 +9,11 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
9
|
var _reactRouterDom = require("react-router-dom");
|
|
10
10
|
var _helpers = require("../functions/helpers");
|
|
11
11
|
var _ButtonModule = _interopRequireDefault(require("./Button.module.scss"));
|
|
12
|
-
function _interopRequireDefault(
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
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); }
|
|
14
14
|
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; }
|
|
15
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
15
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
16
16
|
const Button = props => {
|
|
17
|
-
var _props$href, _props$href2, _props$children;
|
|
18
17
|
const getArrowClass = arrow => {
|
|
19
18
|
switch (arrow) {
|
|
20
19
|
case "left":
|
|
@@ -28,7 +27,7 @@ const Button = props => {
|
|
|
28
27
|
let buttonProps = {
|
|
29
28
|
...props,
|
|
30
29
|
"aria-invalid": props.hasErrors || null,
|
|
31
|
-
href: !props.disabled &&
|
|
30
|
+
href: !props.disabled && props.href?.length ? props.href : null
|
|
32
31
|
};
|
|
33
32
|
delete buttonProps.noHover;
|
|
34
33
|
delete buttonProps.hasErrors;
|
|
@@ -38,23 +37,21 @@ const Button = props => {
|
|
|
38
37
|
delete buttonProps.content;
|
|
39
38
|
delete buttonProps.arrow;
|
|
40
39
|
delete buttonProps.noMargin;
|
|
41
|
-
const buttonColor =
|
|
42
|
-
const className = (0, _helpers.classNameArrayToClassNameString)([_ButtonModule.default.button, _ButtonModule.default[buttonColor], _ButtonModule.default[props.size], getArrowClass(props.arrow), props.noHover ||
|
|
40
|
+
const buttonColor = props?.inputType === "radio" ? props.defaultChecked ? "primary" : "secondary" : props.color;
|
|
41
|
+
const className = (0, _helpers.classNameArrayToClassNameString)([_ButtonModule.default.button, _ButtonModule.default[buttonColor], _ButtonModule.default[props.size], getArrowClass(props.arrow), props.noHover || props?.inputType === "radio" ? _ButtonModule.default.noHover : null, props.rounded && _ButtonModule.default.rounded, props.hasErrors && _ButtonModule.default.hasErrors, props.disabled && _ButtonModule.default.disabled, props.noMargin && _ButtonModule.default.noMargin]);
|
|
43
42
|
const renderReactLinkElements = childElements => {
|
|
44
43
|
const childElementsthroughFragments = (0, _helpers.cloneThroughFragments)(childElements);
|
|
45
44
|
return childElementsthroughFragments.map((childElement, index) => {
|
|
46
|
-
|
|
47
|
-
if (!buttonProps.disabled && !!(childElement !== null && childElement !== void 0 && (_childElement$props = childElement.props) !== null && _childElement$props !== void 0 && _childElement$props.to)) {
|
|
48
|
-
var _childElement$props2, _childElement$props3;
|
|
45
|
+
if (!buttonProps.disabled && !!childElement?.props?.to) {
|
|
49
46
|
const childElementCopy = _react.default.cloneElement(childElement, {
|
|
50
47
|
className: className,
|
|
51
|
-
key:
|
|
52
|
-
to: !buttonProps.disabled && childElement
|
|
48
|
+
key: `button-${index}`,
|
|
49
|
+
to: !buttonProps.disabled && childElement?.props?.to ? childElement?.props?.to : null
|
|
53
50
|
});
|
|
54
51
|
return childElementCopy;
|
|
55
52
|
} else {
|
|
56
53
|
return _react.default.createElement("button", _extends({}, buttonProps, {
|
|
57
|
-
key:
|
|
54
|
+
key: `button-${index}`,
|
|
58
55
|
className: className
|
|
59
56
|
}), props.content || childElement.props.children);
|
|
60
57
|
}
|
|
@@ -72,11 +69,11 @@ const Button = props => {
|
|
|
72
69
|
}, _react.default.createElement("input", _extends({}, buttonProps, {
|
|
73
70
|
type: "radio"
|
|
74
71
|
})), props.content);
|
|
75
|
-
} else if (
|
|
72
|
+
} else if (props.href?.length && !props.disabled) {
|
|
76
73
|
return _react.default.createElement("a", _extends({}, buttonProps, {
|
|
77
74
|
className: className
|
|
78
75
|
}), props.content || props.children);
|
|
79
|
-
} else if (
|
|
76
|
+
} else if (props?.children?.type === _reactRouterDom.Link) {
|
|
80
77
|
return _react.default.createElement(_react.Fragment, null, renderReactLinkElements(_react.default.Children.toArray(props.children)));
|
|
81
78
|
} else {
|
|
82
79
|
return _react.default.createElement("button", _extends({}, buttonProps, {
|
|
@@ -1,45 +1,58 @@
|
|
|
1
|
-
|
|
1
|
+
// Mixins
|
|
2
|
+
@use "../style/abstracts/mixins/animation";
|
|
3
|
+
@use "../style/abstracts/mixins/appearance";
|
|
4
|
+
@use "../style/abstracts/mixins/border-radius";
|
|
5
|
+
@use "../style/abstracts/mixins/box-shadow";
|
|
6
|
+
@use "../style/abstracts/mixins/keyframes";
|
|
7
|
+
@use "../style/abstracts/mixins/transform";
|
|
8
|
+
@use "../style/abstracts/mixins/transition";
|
|
2
9
|
|
|
3
|
-
|
|
10
|
+
// Variables
|
|
11
|
+
@use "../style/abstracts/variables/colors";
|
|
12
|
+
@use "../style/abstracts/variables/transitions";
|
|
13
|
+
@use "../style/abstracts/variables/typography";
|
|
14
|
+
@use "../style/abstracts/variables/viewports";
|
|
15
|
+
|
|
16
|
+
@include keyframes.keyframes(pushnext) {
|
|
4
17
|
0% {
|
|
5
|
-
@include transform(rotate(45deg) translate3d(0, 0, 0));
|
|
18
|
+
@include transform.transform(rotate(45deg) translate3d(0, 0, 0));
|
|
6
19
|
}
|
|
7
20
|
|
|
8
21
|
50% {
|
|
9
|
-
@include transform(rotate(45deg) translate3d(2px, -2px, 0));
|
|
22
|
+
@include transform.transform(rotate(45deg) translate3d(2px, -2px, 0));
|
|
10
23
|
}
|
|
11
24
|
|
|
12
25
|
100% {
|
|
13
|
-
@include transform(rotate(45deg) translate3d(0, 0, 0));
|
|
26
|
+
@include transform.transform(rotate(45deg) translate3d(0, 0, 0));
|
|
14
27
|
}
|
|
15
28
|
}
|
|
16
|
-
@include keyframes(pushprev) {
|
|
29
|
+
@include keyframes.keyframes(pushprev) {
|
|
17
30
|
0% {
|
|
18
|
-
@include transform(rotate(-135deg) translate3d(0, 0, 0));
|
|
31
|
+
@include transform.transform(rotate(-135deg) translate3d(0, 0, 0));
|
|
19
32
|
}
|
|
20
33
|
|
|
21
34
|
50% {
|
|
22
|
-
@include transform(rotate(-135deg) translate3d(-2px, 2px, 0));
|
|
35
|
+
@include transform.transform(rotate(-135deg) translate3d(-2px, 2px, 0));
|
|
23
36
|
}
|
|
24
37
|
|
|
25
38
|
100% {
|
|
26
|
-
@include transform(rotate(-135deg) translate3d(0, 0, 0));
|
|
39
|
+
@include transform.transform(rotate(-135deg) translate3d(0, 0, 0));
|
|
27
40
|
}
|
|
28
41
|
}
|
|
29
42
|
|
|
30
43
|
.button {
|
|
31
|
-
@include appearance(none);
|
|
32
|
-
@include border-radius(0);
|
|
33
|
-
@include transition(
|
|
34
|
-
filter
|
|
35
|
-
background-color
|
|
36
|
-
color
|
|
37
|
-
border-color
|
|
44
|
+
@include appearance.appearance(none);
|
|
45
|
+
@include border-radius.border-radius(0);
|
|
46
|
+
@include transition.transition(
|
|
47
|
+
filter transitions.$default-transition,
|
|
48
|
+
background-color transitions.$default-transition,
|
|
49
|
+
color transitions.$default-transition,
|
|
50
|
+
border-color transitions.$default-transition
|
|
38
51
|
);
|
|
39
|
-
font-family:
|
|
52
|
+
font-family: typography.$default-font;
|
|
40
53
|
border-style: solid;
|
|
41
54
|
border-width: 1px;
|
|
42
|
-
border-color: var(--color-primary,
|
|
55
|
+
border-color: var(--color-primary, colors.$color-primary);
|
|
43
56
|
cursor: pointer;
|
|
44
57
|
line-height: 1;
|
|
45
58
|
position: relative;
|
|
@@ -49,7 +62,7 @@
|
|
|
49
62
|
|
|
50
63
|
font-size: 17px;
|
|
51
64
|
font-weight: 500;
|
|
52
|
-
@media only screen and (min-width:
|
|
65
|
+
@media only screen and (min-width: viewports.$screen-sm) {
|
|
53
66
|
font-size: 20px;
|
|
54
67
|
}
|
|
55
68
|
&:not(.noMargin) {
|
|
@@ -63,7 +76,7 @@
|
|
|
63
76
|
|
|
64
77
|
&:focus-visible,
|
|
65
78
|
&:focus-within {
|
|
66
|
-
outline-color: var(--color-primary,
|
|
79
|
+
outline-color: var(--color-primary, colors.$color-primary);
|
|
67
80
|
}
|
|
68
81
|
|
|
69
82
|
&.regular {
|
|
@@ -74,57 +87,57 @@
|
|
|
74
87
|
padding: 6px 24px;
|
|
75
88
|
min-width: 80px;
|
|
76
89
|
line-height: 18px;
|
|
77
|
-
@media only screen and (min-width:
|
|
90
|
+
@media only screen and (min-width: viewports.$screen-sm) {
|
|
78
91
|
line-height: 21px;
|
|
79
92
|
padding: 6px 32px;
|
|
80
93
|
}
|
|
81
94
|
}
|
|
82
95
|
|
|
83
96
|
&.primary {
|
|
84
|
-
background-color: var(--color-primary,
|
|
85
|
-
color: var(--color-primary-contrast,
|
|
97
|
+
background-color: var(--color-primary, colors.$color-primary);
|
|
98
|
+
color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
86
99
|
&:hover:not(.noHover),
|
|
87
100
|
&:focus-visible {
|
|
88
|
-
background-color: var(--color-primary-light,
|
|
89
|
-
border-color: var(--color-primary-light,
|
|
90
|
-
color: var(--color-primary-contrast,
|
|
101
|
+
background-color: var(--color-primary-light, colors.$color-primary-light);
|
|
102
|
+
border-color: var(--color-primary-light, colors.$color-primary-light);
|
|
103
|
+
color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
91
104
|
&:after,
|
|
92
105
|
&:before {
|
|
93
|
-
border-color: var(--color-primary-light,
|
|
106
|
+
border-color: var(--color-primary-light, colors.$color-primary-light);
|
|
94
107
|
}
|
|
95
108
|
}
|
|
96
109
|
&:active:not(.noHover),
|
|
97
110
|
&:active:hover:not(.noHover) {
|
|
98
|
-
background-color: var(--color-primary-x-light,
|
|
99
|
-
border-color: var(--color-primary-x-light,
|
|
100
|
-
color: var(--color-primary-contrast,
|
|
111
|
+
background-color: var(--color-primary-x-light, colors.$color-primary-x-light);
|
|
112
|
+
border-color: var(--color-primary-x-light, colors.$color-primary-x-light);
|
|
113
|
+
color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
101
114
|
&:after,
|
|
102
115
|
&:before {
|
|
103
|
-
border-color: var(--color-primary-x-light,
|
|
116
|
+
border-color: var(--color-primary-x-light, colors.$color-primary-x-light);
|
|
104
117
|
}
|
|
105
118
|
}
|
|
106
119
|
}
|
|
107
120
|
|
|
108
121
|
&.secondary {
|
|
109
|
-
background-color: var(--color-secondary,
|
|
110
|
-
color: var(--color-secondary-contrast,
|
|
111
|
-
border-color: var(--color-secondary-x-light,
|
|
122
|
+
background-color: var(--color-secondary, colors.$color-secondary);
|
|
123
|
+
color: var(--color-secondary-contrast, colors.$color-secondary-contrast);
|
|
124
|
+
border-color: var(--color-secondary-x-light, colors.$color-secondary-x-light);
|
|
112
125
|
&:hover:not(.noHover),
|
|
113
126
|
&:focus-visible {
|
|
114
|
-
background-color: var(--color-secondary-light,
|
|
115
|
-
color: var(--color-secondary-contrast,
|
|
127
|
+
background-color: var(--color-secondary-light, colors.$color-secondary-x-light);
|
|
128
|
+
color: var(--color-secondary-contrast, colors.$color-secondary-contrast);
|
|
116
129
|
&:after,
|
|
117
130
|
&:before {
|
|
118
|
-
border-color: var(--color-secondary-light,
|
|
131
|
+
border-color: var(--color-secondary-light, colors.$color-secondary-x-light);
|
|
119
132
|
}
|
|
120
133
|
}
|
|
121
134
|
&:active:not(.noHover),
|
|
122
135
|
&:active:hover:not(.noHover) {
|
|
123
|
-
background-color: var(--color-secondary-x-light,
|
|
124
|
-
color: var(--color-secondary-contrast,
|
|
136
|
+
background-color: var(--color-secondary-x-light, colors.$color-secondary-light);
|
|
137
|
+
color: var(--color-secondary-contrast, colors.$color-secondary-contrast);
|
|
125
138
|
&:after,
|
|
126
139
|
&:before {
|
|
127
|
-
border-color: var(--color-secondary-x-light,
|
|
140
|
+
border-color: var(--color-secondary-x-light, colors.$color-secondary-light);
|
|
128
141
|
}
|
|
129
142
|
}
|
|
130
143
|
}
|
|
@@ -133,44 +146,44 @@
|
|
|
133
146
|
&.disabled {
|
|
134
147
|
&.primary,
|
|
135
148
|
&.secondary {
|
|
136
|
-
background-color: var(--color-primary,
|
|
149
|
+
background-color: var(--color-primary, colors.$color-primary);
|
|
137
150
|
cursor: default;
|
|
138
|
-
color: var(--color-primary-contrast,
|
|
139
|
-
border: 1px solid var(--color-primary,
|
|
151
|
+
color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
152
|
+
border: 1px solid var(--color-primary, colors.$color-primary);
|
|
140
153
|
opacity: 0.2;
|
|
141
154
|
filter: saturate(3);
|
|
142
155
|
&:hover:not(.noHover),
|
|
143
156
|
&:focus-visible,
|
|
144
157
|
&:active:not(.noHover),
|
|
145
158
|
&:active:hover:not(.noHover) {
|
|
146
|
-
background-color: var(--color-primary,
|
|
159
|
+
background-color: var(--color-primary, colors.$color-primary);
|
|
147
160
|
cursor: default;
|
|
148
|
-
color: var(--color-primary-contrast,
|
|
149
|
-
border: 1px solid var(--color-primary,
|
|
161
|
+
color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
162
|
+
border: 1px solid var(--color-primary, colors.$color-primary);
|
|
150
163
|
&:before,
|
|
151
164
|
&:after {
|
|
152
|
-
border-color: var(--color-primary-contrast,
|
|
165
|
+
border-color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
153
166
|
}
|
|
154
167
|
}
|
|
155
168
|
&:before,
|
|
156
169
|
&:after {
|
|
157
|
-
border-color: var(--color-primary-contrast,
|
|
170
|
+
border-color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
158
171
|
}
|
|
159
172
|
}
|
|
160
173
|
}
|
|
161
174
|
|
|
162
175
|
&.hasErrors {
|
|
163
|
-
@include box-shadow(0 0 2px 1px var(--color-error,
|
|
164
|
-
border-color: var(--color-error,
|
|
176
|
+
@include box-shadow.box-shadow(0 0 2px 1px var(--color-error, colors.$color-error));
|
|
177
|
+
border-color: var(--color-error, colors.$color-error);
|
|
165
178
|
}
|
|
166
179
|
|
|
167
180
|
&.rounded {
|
|
168
|
-
border-radius
|
|
181
|
+
@include border-radius.border-radius(20px);
|
|
169
182
|
}
|
|
170
183
|
|
|
171
184
|
&.hasArrowLeft {
|
|
172
185
|
&:before {
|
|
173
|
-
@include transform(rotate(-135deg));
|
|
186
|
+
@include transform.transform(rotate(-135deg));
|
|
174
187
|
content: " ";
|
|
175
188
|
display: inline-block;
|
|
176
189
|
margin-right: 1em;
|
|
@@ -180,7 +193,7 @@
|
|
|
180
193
|
border-style: solid;
|
|
181
194
|
border-width: 2px 2px 0 0;
|
|
182
195
|
margin-right: 1em;
|
|
183
|
-
@media only screen and (min-width:
|
|
196
|
+
@media only screen and (min-width: viewports.$screen-sm) {
|
|
184
197
|
left: 1em;
|
|
185
198
|
}
|
|
186
199
|
}
|
|
@@ -188,12 +201,12 @@
|
|
|
188
201
|
&:not(.disabled) {
|
|
189
202
|
&.primary {
|
|
190
203
|
&:before {
|
|
191
|
-
border-color: var(--color-primary-contrast,
|
|
204
|
+
border-color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
192
205
|
}
|
|
193
206
|
}
|
|
194
207
|
&.secondary {
|
|
195
208
|
&:before {
|
|
196
|
-
border-color: var(--color-secondary-contrast,
|
|
209
|
+
border-color: var(--color-secondary-contrast, colors.$color-secondary-contrast);
|
|
197
210
|
}
|
|
198
211
|
}
|
|
199
212
|
&:hover:not(.noHover),
|
|
@@ -201,16 +214,16 @@
|
|
|
201
214
|
&:active:not(.noHover),
|
|
202
215
|
&:active:hover:not(.noHover) {
|
|
203
216
|
&:before {
|
|
204
|
-
@include animation(pushprev 0.8s linear infinite);
|
|
217
|
+
@include animation.animation(pushprev 0.8s linear infinite);
|
|
205
218
|
}
|
|
206
219
|
&.primary {
|
|
207
220
|
&:before {
|
|
208
|
-
border-color: var(--color-primary-contrast,
|
|
221
|
+
border-color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
209
222
|
}
|
|
210
223
|
}
|
|
211
224
|
&.secondary {
|
|
212
225
|
&:before {
|
|
213
|
-
border-color: var(--color-secondary-contrast,
|
|
226
|
+
border-color: var(--color-secondary-contrast, colors.$color-secondary-contrast);
|
|
214
227
|
}
|
|
215
228
|
}
|
|
216
229
|
}
|
|
@@ -219,7 +232,7 @@
|
|
|
219
232
|
|
|
220
233
|
&.hasArrowRight {
|
|
221
234
|
&:after {
|
|
222
|
-
@include transform(rotate(45deg));
|
|
235
|
+
@include transform.transform(rotate(45deg));
|
|
223
236
|
content: " ";
|
|
224
237
|
display: inline-block;
|
|
225
238
|
margin-left: 1em;
|
|
@@ -229,7 +242,7 @@
|
|
|
229
242
|
border-style: solid;
|
|
230
243
|
border-width: 2px 2px 0 0;
|
|
231
244
|
margin-left: 1em;
|
|
232
|
-
@media only screen and (min-width:
|
|
245
|
+
@media only screen and (min-width: viewports.$screen-sm) {
|
|
233
246
|
right: 1em;
|
|
234
247
|
}
|
|
235
248
|
}
|
|
@@ -238,12 +251,12 @@
|
|
|
238
251
|
&:not(.disabled) {
|
|
239
252
|
&.primary {
|
|
240
253
|
&:after {
|
|
241
|
-
border-color: var(--color-primary-contrast,
|
|
254
|
+
border-color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
242
255
|
}
|
|
243
256
|
}
|
|
244
257
|
&.secondary {
|
|
245
258
|
&:after {
|
|
246
|
-
border-color: var(--color-secondary-contrast,
|
|
259
|
+
border-color: var(--color-secondary-contrast, colors.$color-secondary-contrast);
|
|
247
260
|
}
|
|
248
261
|
}
|
|
249
262
|
|
|
@@ -252,16 +265,16 @@
|
|
|
252
265
|
&:active:not(.noHover),
|
|
253
266
|
&:active:hover:not(.noHover) {
|
|
254
267
|
&:after {
|
|
255
|
-
@include animation(pushnext 0.8s linear infinite);
|
|
268
|
+
@include animation.animation(pushnext 0.8s linear infinite);
|
|
256
269
|
}
|
|
257
270
|
&.primary {
|
|
258
271
|
&:after {
|
|
259
|
-
border-color: var(--color-primary-contrast,
|
|
272
|
+
border-color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
260
273
|
}
|
|
261
274
|
}
|
|
262
275
|
&.secondary {
|
|
263
276
|
&:after {
|
|
264
|
-
border-color: var(--color-secondary-contrast,
|
|
277
|
+
border-color: var(--color-secondary-contrast, colors.$color-secondary-contrast);
|
|
265
278
|
}
|
|
266
279
|
}
|
|
267
280
|
}
|
|
@@ -271,7 +284,7 @@
|
|
|
271
284
|
|
|
272
285
|
label.button {
|
|
273
286
|
input[type="radio"] {
|
|
274
|
-
@include appearance(none);
|
|
287
|
+
@include appearance.appearance(none);
|
|
275
288
|
margin: 0;
|
|
276
289
|
}
|
|
277
290
|
}
|
|
@@ -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 _CheckBoxIconModule = _interopRequireDefault(require("./CheckBoxIcon.module.scss"));
|
|
10
|
-
function _interopRequireDefault(
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
const CheckBoxIcon = props => {
|
|
12
12
|
let inlineStyle = {
|
|
13
13
|
height: props.size,
|
|
@@ -15,7 +15,7 @@ const CheckBoxIcon = props => {
|
|
|
15
15
|
fontSize: props.size
|
|
16
16
|
};
|
|
17
17
|
const checkBoxIconProps = {
|
|
18
|
-
className:
|
|
18
|
+
className: `${_CheckBoxIconModule.default.checkBoxIcon} ${props.checked ? _CheckBoxIconModule.default.checked : ""} ${props.disabled ? _CheckBoxIconModule.default.disabled : ""} ${props.showBox ? _CheckBoxIconModule.default.showBox : ""} ${props.hasErrors ? _CheckBoxIconModule.default.hasErrors : ""}`,
|
|
19
19
|
style: inlineStyle
|
|
20
20
|
};
|
|
21
21
|
return _react.default.createElement("span", checkBoxIconProps, _react.default.createElement("span", {
|
|
@@ -1,9 +1,16 @@
|
|
|
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";
|
|
2
9
|
|
|
3
10
|
.checkBoxIcon {
|
|
4
|
-
@include border-radius(0);
|
|
5
|
-
@include transition(all 0.1s ease-in-out);
|
|
6
|
-
@include box-sizing(content-box);
|
|
11
|
+
@include border-radius.border-radius(0);
|
|
12
|
+
@include transition.transition(all 0.1s ease-in-out);
|
|
13
|
+
@include box-sizing.box-sizing(content-box);
|
|
7
14
|
display: inline-block;
|
|
8
15
|
vertical-align: middle;
|
|
9
16
|
min-width: 10px;
|
|
@@ -20,26 +27,26 @@
|
|
|
20
27
|
margin-top: 2px;
|
|
21
28
|
background: white;
|
|
22
29
|
&:not(.hasErrors) {
|
|
23
|
-
@include box-shadow(0 0 0 1px var(--color-form-element,
|
|
30
|
+
@include box-shadow.box-shadow(0 0 0 1px var(--color-form-element, colors.$color-form-element));
|
|
24
31
|
}
|
|
25
32
|
&.hasErrors {
|
|
26
|
-
@include box-shadow(0 0 0 1px var(--color-error,
|
|
33
|
+
@include box-shadow.box-shadow(0 0 0 1px var(--color-error, colors.$color-error));
|
|
27
34
|
}
|
|
28
35
|
}
|
|
29
36
|
|
|
30
37
|
&.checked {
|
|
31
|
-
color: var(--color-primary,
|
|
38
|
+
color: var(--color-primary, colors.$color-primary);
|
|
32
39
|
&.hasErrors {
|
|
33
40
|
span {
|
|
34
|
-
color: var(--color-error,
|
|
41
|
+
color: var(--color-error, colors.$color-error);
|
|
35
42
|
}
|
|
36
43
|
}
|
|
37
44
|
&.showBox {
|
|
38
45
|
&:not(.hasErrors) {
|
|
39
|
-
@include box-shadow(0 0 0 1px var(--color-form-element,
|
|
46
|
+
@include box-shadow.box-shadow(0 0 0 1px var(--color-form-element, colors.$color-form-element));
|
|
40
47
|
}
|
|
41
48
|
&.hasErrors {
|
|
42
|
-
@include box-shadow(0 0 0 1px var(--color-error,
|
|
49
|
+
@include box-shadow.box-shadow(0 0 0 1px var(--color-error, colors.$color-error));
|
|
43
50
|
}
|
|
44
51
|
}
|
|
45
52
|
}
|
|
@@ -9,10 +9,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
9
|
var _CheckBoxIcon = _interopRequireDefault(require("./CheckBoxIcon"));
|
|
10
10
|
var _asterisk = _interopRequireDefault(require("../assets/svg/asterisk.svg?url"));
|
|
11
11
|
var _CheckBoxInputModule = _interopRequireDefault(require("./CheckBoxInput.module.scss"));
|
|
12
|
-
function _interopRequireDefault(
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
const CheckBoxInput = props => {
|
|
14
14
|
const labelProps = {
|
|
15
|
-
className:
|
|
15
|
+
className: `${_CheckBoxInputModule.default.checkBoxInput} ${props.contentOnly ? _CheckBoxInputModule.default.contentOnly : ""} ${props.disabled ? _CheckBoxInputModule.default.disabled : ""} ${props.hasErrors ? _CheckBoxInputModule.default.hasErrors : ""}`,
|
|
16
16
|
htmlFor: props.id
|
|
17
17
|
};
|
|
18
18
|
const iconProps = {
|