dibk-design 7.7.1 → 8.0.1
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/README.md +66 -0
- package/dist/dibk-design.css +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.cjs.js +21 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.es.js +2421 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.html +38 -0
- package/dist/manifest.json +15 -0
- package/dist/robots.txt +3 -0
- package/package.json +23 -27
- package/dist/assets/fonts/PPMori-Bold.otf +0 -0
- package/dist/assets/fonts/PPMori-Book.otf +0 -0
- package/dist/assets/fonts/PPMori-ExtraBold.otf +0 -0
- package/dist/assets/fonts/PPMori-Light.otf +0 -0
- package/dist/assets/fonts/PPMori-Medium.otf +0 -0
- package/dist/assets/fonts/PPMori-Regular.otf +0 -0
- package/dist/assets/fonts/PPMori-RegularItalic.otf +0 -0
- package/dist/assets/fonts/PPMori-SemiBold.otf +0 -0
- package/dist/assets/png/dibk-logo.png +0 -0
- package/dist/assets/svg/arbeidstilsynet-logo.svg +0 -1
- package/dist/assets/svg/asterisk.svg +0 -1
- package/dist/assets/svg/checkmark-symbol.svg +0 -8
- package/dist/assets/svg/dibk-logo-base64.js +0 -7
- package/dist/assets/svg/dibk-logo-mobile.svg +0 -91
- package/dist/assets/svg/dibk-logo.svg +0 -52
- package/dist/assets/svg/error-sign.svg +0 -15
- package/dist/assets/svg/info-sign.svg +0 -1
- package/dist/assets/svg/spinner.svg +0 -57
- package/dist/assets/svg/x-symbol.svg +0 -1
- package/dist/components/Accordion.js +0 -64
- package/dist/components/Accordion.module.scss +0 -190
- package/dist/components/Button.js +0 -118
- package/dist/components/Button.module.scss +0 -290
- package/dist/components/CheckBoxIcon.js +0 -42
- package/dist/components/CheckBoxIcon.module.scss +0 -69
- package/dist/components/CheckBoxInput.js +0 -70
- package/dist/components/CheckBoxInput.module.scss +0 -53
- package/dist/components/CheckBoxList.js +0 -55
- package/dist/components/CheckBoxList.module.scss +0 -25
- package/dist/components/CheckBoxListItem.js +0 -61
- package/dist/components/CheckBoxListItem.module.scss +0 -84
- package/dist/components/Container.js +0 -24
- package/dist/components/Container.module.scss +0 -15
- package/dist/components/ContentBox.js +0 -56
- package/dist/components/ContentBox.module.scss +0 -60
- package/dist/components/DescriptionDetails.js +0 -32
- package/dist/components/DescriptionDetails.module.scss +0 -22
- package/dist/components/DescriptionList.js +0 -47
- package/dist/components/DescriptionList.module.scss +0 -15
- package/dist/components/DescriptionTerm.js +0 -32
- package/dist/components/DescriptionTerm.module.scss +0 -30
- package/dist/components/Dialog.js +0 -86
- package/dist/components/Dialog.module.scss +0 -178
- package/dist/components/DragAndDropFileInput.js +0 -142
- package/dist/components/DragAndDropFileInput.module.scss +0 -38
- package/dist/components/ErrorBox.js +0 -33
- package/dist/components/ErrorBox.module.scss +0 -68
- package/dist/components/ErrorMessage.js +0 -37
- package/dist/components/ErrorMessage.module.scss +0 -30
- package/dist/components/Footer.js +0 -16
- package/dist/components/Footer.module.scss +0 -21
- package/dist/components/Header.js +0 -42
- package/dist/components/Header.module.scss +0 -79
- package/dist/components/InfoBox.js +0 -23
- package/dist/components/InfoBox.module.scss +0 -44
- package/dist/components/InputField.js +0 -137
- package/dist/components/InputField.module.scss +0 -88
- package/dist/components/Label.js +0 -40
- package/dist/components/Label.module.scss +0 -19
- package/dist/components/Lead.js +0 -31
- package/dist/components/Lead.module.scss +0 -13
- package/dist/components/List.js +0 -46
- package/dist/components/List.module.scss +0 -12
- package/dist/components/ListItem.js +0 -27
- package/dist/components/ListItem.module.scss +0 -10
- package/dist/components/LoadingAnimation.js +0 -26
- package/dist/components/LoadingAnimation.module.scss +0 -28
- package/dist/components/NavigationBar.js +0 -146
- package/dist/components/NavigationBar.module.scss +0 -474
- package/dist/components/NavigationBarListItem.js +0 -24
- package/dist/components/PDF.js +0 -14
- package/dist/components/PDF.scss +0 -765
- package/dist/components/Paper.js +0 -24
- package/dist/components/Paper.module.scss +0 -17
- package/dist/components/ProgressBar.js +0 -32
- package/dist/components/ProgressBar.module.scss +0 -30
- package/dist/components/RadioButtonIcon.js +0 -34
- package/dist/components/RadioButtonIcon.module.scss +0 -49
- package/dist/components/RadioButtonInput.js +0 -68
- package/dist/components/RadioButtonInput.module.scss +0 -53
- package/dist/components/RadioButtonList.js +0 -55
- package/dist/components/RadioButtonList.module.scss +0 -25
- package/dist/components/RadioButtonListItem.js +0 -59
- package/dist/components/RadioButtonListItem.module.scss +0 -84
- package/dist/components/Select.js +0 -224
- package/dist/components/Select.module.scss +0 -118
- package/dist/components/Table.js +0 -31
- package/dist/components/Table.module.scss +0 -65
- package/dist/components/Textarea.js +0 -105
- package/dist/components/Textarea.module.scss +0 -73
- package/dist/components/Theme.js +0 -138
- package/dist/components/Theme.module.scss +0 -103
- package/dist/components/ThemeProvider.js +0 -24
- package/dist/components/ThemeProvider.module.scss +0 -24
- package/dist/components/ToggleNavigationButton.js +0 -44
- package/dist/components/ToggleNavigationButton.module.scss +0 -34
- package/dist/components/WizardNavigation/Step.js +0 -66
- package/dist/components/WizardNavigation/Step.module.scss +0 -175
- package/dist/components/WizardNavigation.js +0 -56
- package/dist/components/WizardNavigation.module.scss +0 -25
- package/dist/functions/generators.js +0 -16
- package/dist/functions/helpers.js +0 -112
- package/dist/functions/theme.js +0 -18
- package/dist/index.js +0 -279
- package/dist/style/abstracts/mixins/_animation.scss +0 -6
- package/dist/style/abstracts/mixins/_appearance.scss +0 -5
- package/dist/style/abstracts/mixins/_border-radius.scss +0 -31
- package/dist/style/abstracts/mixins/_box-shadow.scss +0 -5
- package/dist/style/abstracts/mixins/_box-sizing.scss +0 -5
- package/dist/style/abstracts/mixins/_calc.scss +0 -5
- package/dist/style/abstracts/mixins/_keyframes.scss +0 -14
- package/dist/style/abstracts/mixins/_opacity.scss +0 -5
- package/dist/style/abstracts/mixins/_placeholder.scss +0 -17
- package/dist/style/abstracts/mixins/_scrollbar.scss +0 -26
- package/dist/style/abstracts/mixins/_transform.scss +0 -6
- package/dist/style/abstracts/mixins/_transition.scss +0 -34
- package/dist/style/abstracts/variables/_colors.scss +0 -33
- package/dist/style/abstracts/variables/_sizes.scss +0 -1
- package/dist/style/abstracts/variables/_transitions.scss +0 -2
- package/dist/style/abstracts/variables/_typography.scss +0 -1
- package/dist/style/abstracts/variables/_viewports.scss +0 -14
- package/dist/style/base/_fonts.scss +0 -57
- package/dist/style/base/_reset.scss +0 -15
- package/dist/style/base/_typography.scss +0 -10
- package/dist/style/layout/_containers.scss +0 -11
- package/dist/style/pdf.css +0 -637
- package/dist/style/pdf.css.map +0 -1
|
@@ -1,190 +0,0 @@
|
|
|
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";
|
|
9
|
-
|
|
10
|
-
@keyframes show {
|
|
11
|
-
0% {
|
|
12
|
-
opacity: 0;
|
|
13
|
-
margin-top: 0px;
|
|
14
|
-
padding: 0 15px 0;
|
|
15
|
-
line-height: 0;
|
|
16
|
-
max-height: 0;
|
|
17
|
-
}
|
|
18
|
-
100% {
|
|
19
|
-
opacity: 1;
|
|
20
|
-
margin-top: 0px;
|
|
21
|
-
padding: 8px 15px 15px;
|
|
22
|
-
line-height: inherit;
|
|
23
|
-
max-height: 1000px;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@keyframes hide {
|
|
28
|
-
100% {
|
|
29
|
-
opacity: 0;
|
|
30
|
-
margin-top: 0px;
|
|
31
|
-
padding: 0 15px 0;
|
|
32
|
-
line-height: 0;
|
|
33
|
-
max-height: 0;
|
|
34
|
-
}
|
|
35
|
-
0% {
|
|
36
|
-
opacity: 1;
|
|
37
|
-
margin-top: 0px;
|
|
38
|
-
padding: 8px 15px 15px;
|
|
39
|
-
line-height: inherit;
|
|
40
|
-
max-height: 1000px;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@media only screen and (min-width: viewports.$screen-sm) {
|
|
45
|
-
@keyframes show {
|
|
46
|
-
0% {
|
|
47
|
-
opacity: 0;
|
|
48
|
-
margin-top: 0px;
|
|
49
|
-
padding: 0 30px 0;
|
|
50
|
-
line-height: 0;
|
|
51
|
-
max-height: 0;
|
|
52
|
-
}
|
|
53
|
-
100% {
|
|
54
|
-
opacity: 1;
|
|
55
|
-
margin-top: 0px;
|
|
56
|
-
padding: 8px 30px 15px;
|
|
57
|
-
line-height: inherit;
|
|
58
|
-
max-height: 1000px;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
@keyframes hide {
|
|
62
|
-
100% {
|
|
63
|
-
opacity: 0;
|
|
64
|
-
margin-top: 0px;
|
|
65
|
-
padding: 0 30px 0;
|
|
66
|
-
line-height: 0;
|
|
67
|
-
max-height: 0;
|
|
68
|
-
}
|
|
69
|
-
0% {
|
|
70
|
-
opacity: 1;
|
|
71
|
-
margin-top: 0px;
|
|
72
|
-
padding: 8px 30px 15px;
|
|
73
|
-
line-height: inherit;
|
|
74
|
-
max-height: 1000px;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.accordion {
|
|
80
|
-
font-family: typography.$default-font;
|
|
81
|
-
text-decoration: none;
|
|
82
|
-
width: 100%;
|
|
83
|
-
display: block;
|
|
84
|
-
&.default {
|
|
85
|
-
background-color: var(--color-default-background, colors.$color-default-background);
|
|
86
|
-
.panel span,
|
|
87
|
-
.content {
|
|
88
|
-
color: var(--color-default-text, colors.$color-default-text);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
&.secondary {
|
|
92
|
-
background-color: var(--color-secondary-background, colors.$color-secondary-background);
|
|
93
|
-
color: var(--color-default-text, colors.$color-default-text);
|
|
94
|
-
.panel span,
|
|
95
|
-
.content {
|
|
96
|
-
color: var(--color-default-text, colors.$color-default-text);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
&.margin {
|
|
100
|
-
margin-bottom: 8px;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.panel {
|
|
104
|
-
@include appearance.appearance(none);
|
|
105
|
-
@include border-radius.border-radius(0);
|
|
106
|
-
font-family: typography.$default-font;
|
|
107
|
-
padding: 15px 15px;
|
|
108
|
-
display: flex;
|
|
109
|
-
align-items: center;
|
|
110
|
-
position: relative;
|
|
111
|
-
text-decoration: none;
|
|
112
|
-
overflow-wrap: break-word;
|
|
113
|
-
line-height: 1.7;
|
|
114
|
-
cursor: pointer;
|
|
115
|
-
border: none;
|
|
116
|
-
width: 100%;
|
|
117
|
-
background: none;
|
|
118
|
-
text-align: left;
|
|
119
|
-
@media only screen and (min-width: viewports.$screen-sm) {
|
|
120
|
-
padding: 15px 30px;
|
|
121
|
-
}
|
|
122
|
-
&:focus-visible {
|
|
123
|
-
outline-color: var(--color-primary, colors.$color-primary);
|
|
124
|
-
outline-style: auto;
|
|
125
|
-
outline-width: 2px;
|
|
126
|
-
outline-offset: 0px;
|
|
127
|
-
}
|
|
128
|
-
.panelText {
|
|
129
|
-
font-family: typography.$default-font;
|
|
130
|
-
font-weight: bold;
|
|
131
|
-
font-size: 18px;
|
|
132
|
-
flex: 1;
|
|
133
|
-
}
|
|
134
|
-
.panelChevron {
|
|
135
|
-
@include border-radius.border-radius(100px);
|
|
136
|
-
box-sizing: border-box;
|
|
137
|
-
position: relative;
|
|
138
|
-
display: block;
|
|
139
|
-
width: 18px;
|
|
140
|
-
height: 18px;
|
|
141
|
-
margin-right: 6px;
|
|
142
|
-
@media only screen and (min-width: viewports.$screen-sm) {
|
|
143
|
-
margin-right: 0;
|
|
144
|
-
}
|
|
145
|
-
&::after {
|
|
146
|
-
content: "";
|
|
147
|
-
display: block;
|
|
148
|
-
box-sizing: border-box;
|
|
149
|
-
position: absolute;
|
|
150
|
-
width: 18px;
|
|
151
|
-
height: 18px;
|
|
152
|
-
border-bottom: 2px solid;
|
|
153
|
-
border-right: 2px solid;
|
|
154
|
-
transform: translateY(-30%) rotate(45deg);
|
|
155
|
-
transition: transform 0.3s ease-in-out;
|
|
156
|
-
}
|
|
157
|
-
&.expanded {
|
|
158
|
-
&::after {
|
|
159
|
-
transform: translateY(30%) rotate(225deg);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
.content {
|
|
165
|
-
opacity: 0;
|
|
166
|
-
margin-top: 0px;
|
|
167
|
-
line-height: 0;
|
|
168
|
-
max-height: 0;
|
|
169
|
-
overflow: hidden;
|
|
170
|
-
padding: 0 15px 0;
|
|
171
|
-
@media only screen and (min-width: viewports.$screen-sm) {
|
|
172
|
-
padding: 0 30px 0;
|
|
173
|
-
}
|
|
174
|
-
&.initialized {
|
|
175
|
-
animation: hide 0.3s ease-in-out;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
&.expanded {
|
|
179
|
-
animation: show 0.3s ease-in-out;
|
|
180
|
-
opacity: 1;
|
|
181
|
-
margin-top: 0px;
|
|
182
|
-
padding: 8px 15px 15px;
|
|
183
|
-
line-height: inherit;
|
|
184
|
-
max-height: 10000px;
|
|
185
|
-
@media only screen and (min-width: viewports.$screen-sm) {
|
|
186
|
-
padding: 8px 30px 15px;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _reactRouterDom = require("react-router-dom");
|
|
10
|
-
var _helpers = require("../functions/helpers");
|
|
11
|
-
var _ButtonModule = _interopRequireDefault(require("./Button.module.scss"));
|
|
12
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
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
|
-
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() { 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
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
19
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
20
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
|
-
const Button = props => {
|
|
22
|
-
var _props$href, _props$href2, _props$children;
|
|
23
|
-
const getArrowClass = arrow => {
|
|
24
|
-
switch (arrow) {
|
|
25
|
-
case "left":
|
|
26
|
-
return _ButtonModule.default.hasArrowLeft;
|
|
27
|
-
case "right":
|
|
28
|
-
return _ButtonModule.default.hasArrowRight;
|
|
29
|
-
default:
|
|
30
|
-
return "";
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
let buttonProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
34
|
-
"aria-invalid": props.hasErrors || null,
|
|
35
|
-
href: !props.disabled && (_props$href = props.href) !== null && _props$href !== void 0 && _props$href.length ? props.href : null
|
|
36
|
-
});
|
|
37
|
-
delete buttonProps.noHover;
|
|
38
|
-
delete buttonProps.hasErrors;
|
|
39
|
-
delete buttonProps.rounded;
|
|
40
|
-
delete buttonProps.inputType;
|
|
41
|
-
delete buttonProps.color;
|
|
42
|
-
delete buttonProps.content;
|
|
43
|
-
delete buttonProps.arrow;
|
|
44
|
-
delete buttonProps.noMargin;
|
|
45
|
-
const buttonColor = (props === null || props === void 0 ? void 0 : props.inputType) === "radio" ? props.defaultChecked ? "primary" : "secondary" : props.color;
|
|
46
|
-
const className = (0, _helpers.classNameArrayToClassNameString)([_ButtonModule.default.button, _ButtonModule.default[buttonColor], _ButtonModule.default[props.size], getArrowClass(props.arrow), props.noHover || (props === null || props === void 0 ? void 0 : 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]);
|
|
47
|
-
const renderReactLinkElements = childElements => {
|
|
48
|
-
const childElementsthroughFragments = (0, _helpers.cloneThroughFragments)(childElements);
|
|
49
|
-
return childElementsthroughFragments.map((childElement, index) => {
|
|
50
|
-
var _childElement$props;
|
|
51
|
-
if (!buttonProps.disabled && !!(childElement !== null && childElement !== void 0 && (_childElement$props = childElement.props) !== null && _childElement$props !== void 0 && _childElement$props.to)) {
|
|
52
|
-
var _childElement$props2, _childElement$props3;
|
|
53
|
-
const childElementCopy = _react.default.cloneElement(childElement, {
|
|
54
|
-
className: className,
|
|
55
|
-
key: "button-".concat(index),
|
|
56
|
-
to: !buttonProps.disabled && childElement !== null && childElement !== void 0 && (_childElement$props2 = childElement.props) !== null && _childElement$props2 !== void 0 && _childElement$props2.to ? childElement === null || childElement === void 0 || (_childElement$props3 = childElement.props) === null || _childElement$props3 === void 0 ? void 0 : _childElement$props3.to : null
|
|
57
|
-
});
|
|
58
|
-
return childElementCopy;
|
|
59
|
-
} else {
|
|
60
|
-
return _react.default.createElement("button", _extends({}, buttonProps, {
|
|
61
|
-
key: "button-".concat(index),
|
|
62
|
-
className: className
|
|
63
|
-
}), props.content || childElement.props.children);
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
if (props.inputType === "button") {
|
|
68
|
-
return _react.default.createElement("input", _extends({}, buttonProps, {
|
|
69
|
-
className: className,
|
|
70
|
-
type: "button",
|
|
71
|
-
value: props.content
|
|
72
|
-
}));
|
|
73
|
-
} else if (props.inputType === "radio") {
|
|
74
|
-
return _react.default.createElement("label", {
|
|
75
|
-
className: className
|
|
76
|
-
}, _react.default.createElement("input", _extends({}, buttonProps, {
|
|
77
|
-
type: "radio"
|
|
78
|
-
})), props.content);
|
|
79
|
-
} else if ((_props$href2 = props.href) !== null && _props$href2 !== void 0 && _props$href2.length && !props.disabled) {
|
|
80
|
-
return _react.default.createElement("a", _extends({}, buttonProps, {
|
|
81
|
-
className: className
|
|
82
|
-
}), props.content || props.children);
|
|
83
|
-
} else if ((props === null || props === void 0 || (_props$children = props.children) === null || _props$children === void 0 ? void 0 : _props$children.type) === _reactRouterDom.Link) {
|
|
84
|
-
return _react.default.createElement(_react.Fragment, null, renderReactLinkElements(_react.default.Children.toArray(props.children)));
|
|
85
|
-
} else {
|
|
86
|
-
return _react.default.createElement("button", _extends({}, buttonProps, {
|
|
87
|
-
className: className
|
|
88
|
-
}), props.content || props.children);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
Button.propTypes = {
|
|
92
|
-
content: _propTypes.default.string,
|
|
93
|
-
color: _propTypes.default.oneOf(["primary", "secondary"]),
|
|
94
|
-
size: _propTypes.default.oneOf(["small", "regular"]),
|
|
95
|
-
arrow: _propTypes.default.oneOf(["none", "left", "right"]),
|
|
96
|
-
disabled: _propTypes.default.bool,
|
|
97
|
-
inputType: _propTypes.default.oneOf(["button", "radio"]),
|
|
98
|
-
name: _propTypes.default.string,
|
|
99
|
-
defaultChecked: _propTypes.default.bool,
|
|
100
|
-
required: _propTypes.default.bool,
|
|
101
|
-
hasErrors: _propTypes.default.bool,
|
|
102
|
-
"aria-describedby": _propTypes.default.string,
|
|
103
|
-
noHover: _propTypes.default.bool,
|
|
104
|
-
rounded: _propTypes.default.bool,
|
|
105
|
-
href: _propTypes.default.string,
|
|
106
|
-
onClick: _propTypes.default.func,
|
|
107
|
-
noMargin: _propTypes.default.bool
|
|
108
|
-
};
|
|
109
|
-
Button.defaultProps = {
|
|
110
|
-
color: "primary",
|
|
111
|
-
size: "regular",
|
|
112
|
-
disabled: false,
|
|
113
|
-
hasErrors: false,
|
|
114
|
-
noHover: false,
|
|
115
|
-
arrow: "none",
|
|
116
|
-
noMargin: false
|
|
117
|
-
};
|
|
118
|
-
var _default = exports.default = Button;
|
|
@@ -1,290 +0,0 @@
|
|
|
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";
|
|
9
|
-
|
|
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) {
|
|
17
|
-
0% {
|
|
18
|
-
@include transform.transform(rotate(45deg) translate3d(0, 0, 0));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
50% {
|
|
22
|
-
@include transform.transform(rotate(45deg) translate3d(2px, -2px, 0));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
100% {
|
|
26
|
-
@include transform.transform(rotate(45deg) translate3d(0, 0, 0));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
@include keyframes.keyframes(pushprev) {
|
|
30
|
-
0% {
|
|
31
|
-
@include transform.transform(rotate(-135deg) translate3d(0, 0, 0));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
50% {
|
|
35
|
-
@include transform.transform(rotate(-135deg) translate3d(-2px, 2px, 0));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
100% {
|
|
39
|
-
@include transform.transform(rotate(-135deg) translate3d(0, 0, 0));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.button {
|
|
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
|
|
51
|
-
);
|
|
52
|
-
font-family: typography.$default-font;
|
|
53
|
-
border-style: solid;
|
|
54
|
-
border-width: 1px;
|
|
55
|
-
border-color: var(--color-primary, colors.$color-primary);
|
|
56
|
-
cursor: pointer;
|
|
57
|
-
line-height: 1;
|
|
58
|
-
position: relative;
|
|
59
|
-
text-align: center;
|
|
60
|
-
text-decoration: none;
|
|
61
|
-
display: inline-block;
|
|
62
|
-
|
|
63
|
-
font-size: 17px;
|
|
64
|
-
font-weight: 500;
|
|
65
|
-
@media only screen and (min-width: viewports.$screen-sm) {
|
|
66
|
-
font-size: 20px;
|
|
67
|
-
}
|
|
68
|
-
&:not(.noMargin) {
|
|
69
|
-
margin-right: 5px;
|
|
70
|
-
margin-bottom: 8px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&:focus {
|
|
74
|
-
outline-offset: 3px;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&:focus-visible,
|
|
78
|
-
&:focus-within {
|
|
79
|
-
outline-color: var(--color-primary, colors.$color-primary);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&.regular {
|
|
83
|
-
padding: 16px 24px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&.small {
|
|
87
|
-
padding: 6px 24px;
|
|
88
|
-
min-width: 80px;
|
|
89
|
-
line-height: 18px;
|
|
90
|
-
@media only screen and (min-width: viewports.$screen-sm) {
|
|
91
|
-
line-height: 21px;
|
|
92
|
-
padding: 6px 32px;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
&.primary {
|
|
97
|
-
background-color: var(--color-primary, colors.$color-primary);
|
|
98
|
-
color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
99
|
-
&:hover:not(.noHover),
|
|
100
|
-
&:focus-visible {
|
|
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);
|
|
104
|
-
&:after,
|
|
105
|
-
&:before {
|
|
106
|
-
border-color: var(--color-primary-light, colors.$color-primary-light);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
&:active:not(.noHover),
|
|
110
|
-
&:active:hover:not(.noHover) {
|
|
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);
|
|
114
|
-
&:after,
|
|
115
|
-
&:before {
|
|
116
|
-
border-color: var(--color-primary-x-light, colors.$color-primary-x-light);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
&.secondary {
|
|
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);
|
|
125
|
-
&:hover:not(.noHover),
|
|
126
|
-
&:focus-visible {
|
|
127
|
-
background-color: var(--color-secondary-light, colors.$color-secondary-x-light);
|
|
128
|
-
color: var(--color-secondary-contrast, colors.$color-secondary-contrast);
|
|
129
|
-
&:after,
|
|
130
|
-
&:before {
|
|
131
|
-
border-color: var(--color-secondary-light, colors.$color-secondary-x-light);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
&:active:not(.noHover),
|
|
135
|
-
&:active:hover:not(.noHover) {
|
|
136
|
-
background-color: var(--color-secondary-x-light, colors.$color-secondary-light);
|
|
137
|
-
color: var(--color-secondary-contrast, colors.$color-secondary-contrast);
|
|
138
|
-
&:after,
|
|
139
|
-
&:before {
|
|
140
|
-
border-color: var(--color-secondary-x-light, colors.$color-secondary-light);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
&:disabled,
|
|
146
|
-
&.disabled {
|
|
147
|
-
&.primary,
|
|
148
|
-
&.secondary {
|
|
149
|
-
background-color: var(--color-primary, colors.$color-primary);
|
|
150
|
-
cursor: default;
|
|
151
|
-
color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
152
|
-
border: 1px solid var(--color-primary, colors.$color-primary);
|
|
153
|
-
opacity: 0.2;
|
|
154
|
-
filter: saturate(3);
|
|
155
|
-
&:hover:not(.noHover),
|
|
156
|
-
&:focus-visible,
|
|
157
|
-
&:active:not(.noHover),
|
|
158
|
-
&:active:hover:not(.noHover) {
|
|
159
|
-
background-color: var(--color-primary, colors.$color-primary);
|
|
160
|
-
cursor: default;
|
|
161
|
-
color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
162
|
-
border: 1px solid var(--color-primary, colors.$color-primary);
|
|
163
|
-
&:before,
|
|
164
|
-
&:after {
|
|
165
|
-
border-color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
&:before,
|
|
169
|
-
&:after {
|
|
170
|
-
border-color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&.hasErrors {
|
|
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);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
&.rounded {
|
|
181
|
-
@include border-radius.border-radius(20px);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
&.hasArrowLeft {
|
|
185
|
-
&:before {
|
|
186
|
-
@include transform.transform(rotate(-135deg));
|
|
187
|
-
content: " ";
|
|
188
|
-
display: inline-block;
|
|
189
|
-
margin-right: 1em;
|
|
190
|
-
width: 0.5rem;
|
|
191
|
-
height: 0.5rem;
|
|
192
|
-
vertical-align: middle;
|
|
193
|
-
border-style: solid;
|
|
194
|
-
border-width: 2px 2px 0 0;
|
|
195
|
-
margin-right: 1em;
|
|
196
|
-
@media only screen and (min-width: viewports.$screen-sm) {
|
|
197
|
-
left: 1em;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
&:not(:disabled),
|
|
201
|
-
&:not(.disabled) {
|
|
202
|
-
&.primary {
|
|
203
|
-
&:before {
|
|
204
|
-
border-color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
&.secondary {
|
|
208
|
-
&:before {
|
|
209
|
-
border-color: var(--color-secondary-contrast, colors.$color-secondary-contrast);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
&:hover:not(.noHover),
|
|
213
|
-
&:focus-visible,
|
|
214
|
-
&:active:not(.noHover),
|
|
215
|
-
&:active:hover:not(.noHover) {
|
|
216
|
-
&:before {
|
|
217
|
-
@include animation.animation(pushprev 0.8s linear infinite);
|
|
218
|
-
}
|
|
219
|
-
&.primary {
|
|
220
|
-
&:before {
|
|
221
|
-
border-color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
&.secondary {
|
|
225
|
-
&:before {
|
|
226
|
-
border-color: var(--color-secondary-contrast, colors.$color-secondary-contrast);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
&.hasArrowRight {
|
|
234
|
-
&:after {
|
|
235
|
-
@include transform.transform(rotate(45deg));
|
|
236
|
-
content: " ";
|
|
237
|
-
display: inline-block;
|
|
238
|
-
margin-left: 1em;
|
|
239
|
-
width: 0.5rem;
|
|
240
|
-
height: 0.5rem;
|
|
241
|
-
vertical-align: middle;
|
|
242
|
-
border-style: solid;
|
|
243
|
-
border-width: 2px 2px 0 0;
|
|
244
|
-
margin-left: 1em;
|
|
245
|
-
@media only screen and (min-width: viewports.$screen-sm) {
|
|
246
|
-
right: 1em;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
&:not(:disabled),
|
|
251
|
-
&:not(.disabled) {
|
|
252
|
-
&.primary {
|
|
253
|
-
&:after {
|
|
254
|
-
border-color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
&.secondary {
|
|
258
|
-
&:after {
|
|
259
|
-
border-color: var(--color-secondary-contrast, colors.$color-secondary-contrast);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
&:hover:not(.noHover),
|
|
264
|
-
&:focus-visible,
|
|
265
|
-
&:active:not(.noHover),
|
|
266
|
-
&:active:hover:not(.noHover) {
|
|
267
|
-
&:after {
|
|
268
|
-
@include animation.animation(pushnext 0.8s linear infinite);
|
|
269
|
-
}
|
|
270
|
-
&.primary {
|
|
271
|
-
&:after {
|
|
272
|
-
border-color: var(--color-primary-contrast, colors.$color-primary-contrast);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
&.secondary {
|
|
276
|
-
&:after {
|
|
277
|
-
border-color: var(--color-secondary-contrast, colors.$color-secondary-contrast);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
label.button {
|
|
286
|
-
input[type="radio"] {
|
|
287
|
-
@include appearance.appearance(none);
|
|
288
|
-
margin: 0;
|
|
289
|
-
}
|
|
290
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _CheckBoxIconModule = _interopRequireDefault(require("./CheckBoxIcon.module.scss"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
const CheckBoxIcon = props => {
|
|
12
|
-
let inlineStyle = {
|
|
13
|
-
height: props.size,
|
|
14
|
-
width: props.size,
|
|
15
|
-
fontSize: props.size
|
|
16
|
-
};
|
|
17
|
-
const checkBoxIconProps = {
|
|
18
|
-
className: "".concat(_CheckBoxIconModule.default.checkBoxIcon, " ").concat(props.checked ? _CheckBoxIconModule.default.checked : "", " ").concat(props.disabled ? _CheckBoxIconModule.default.disabled : "", " ").concat(props.showBox ? _CheckBoxIconModule.default.showBox : "", " ").concat(props.hasErrors ? _CheckBoxIconModule.default.hasErrors : ""),
|
|
19
|
-
style: inlineStyle
|
|
20
|
-
};
|
|
21
|
-
return _react.default.createElement("span", checkBoxIconProps, _react.default.createElement("span", {
|
|
22
|
-
"aria-hidden": true,
|
|
23
|
-
className: _CheckBoxIconModule.default.checkmark
|
|
24
|
-
}, props.checked ? props.checkmarkCharacter : ""));
|
|
25
|
-
};
|
|
26
|
-
CheckBoxIcon.propTypes = {
|
|
27
|
-
size: _propTypes.default.string,
|
|
28
|
-
checked: _propTypes.default.bool,
|
|
29
|
-
disabled: _propTypes.default.bool,
|
|
30
|
-
showBox: _propTypes.default.bool,
|
|
31
|
-
hasErrors: _propTypes.default.bool,
|
|
32
|
-
checkmarkCharacter: _propTypes.default.string
|
|
33
|
-
};
|
|
34
|
-
CheckBoxIcon.defaultProps = {
|
|
35
|
-
size: "20px",
|
|
36
|
-
checked: false,
|
|
37
|
-
disabled: false,
|
|
38
|
-
showBox: true,
|
|
39
|
-
hasErrors: false,
|
|
40
|
-
checkmarkCharacter: "✔"
|
|
41
|
-
};
|
|
42
|
-
var _default = exports.default = CheckBoxIcon;
|