@conduction/components 2.2.31 → 2.2.34
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/.prettierrc +30 -30
- package/README.md +5 -0
- package/lib/components/badgeCounter/BadgeCounter.module.css +27 -27
- package/lib/components/card/downloadCard/DownloadCard.js +3 -3
- package/lib/components/card/downloadCard/DownloadCard.module.css +32 -10
- package/lib/components/card/infoCard/InfoCard.module.css +26 -26
- package/lib/components/codeBlock/CodeBlock.module.css +6 -6
- package/lib/components/formFields/date/Date.module.css +12 -12
- package/lib/components/formFields/select/select.d.ts +9 -4
- package/lib/components/formFields/select/select.js +8 -3
- package/lib/components/formFields/select/select.module.css +10 -0
- package/lib/components/imageDivider/imageDivider.module.css +5 -5
- package/lib/components/metaIcon/MetaIcon.module.css +29 -29
- package/lib/components/notificationPopUp/NotificationPopUp.d.ts +1 -1
- package/lib/components/quoteWrapper/QuoteWrapper.module.css +12 -12
- package/lib/components/tag/Tag.module.css +44 -44
- package/package.json +2 -7
- package/src/components/badgeCounter/BadgeCounter.module.css +27 -27
- package/src/components/card/downloadCard/DownloadCard.module.css +32 -10
- package/src/components/card/downloadCard/DownloadCard.tsx +5 -6
- package/src/components/card/infoCard/InfoCard.module.css +26 -26
- package/src/components/codeBlock/CodeBlock.module.css +6 -6
- package/src/components/formFields/date/Date.module.css +12 -12
- package/src/components/formFields/select/select.module.css +10 -0
- package/src/components/formFields/select/select.tsx +14 -2
- package/src/components/imageDivider/imageDivider.module.css +5 -5
- package/src/components/metaIcon/MetaIcon.module.css +29 -29
- package/src/components/notificationPopUp/NotificationPopUp.tsx +1 -1
- package/src/components/quoteWrapper/QuoteWrapper.module.css +12 -12
- package/src/components/tag/Tag.module.css +44 -44
- package/src/components/topNav/index.ts +4 -4
- package/src/custom.d.ts +4 -4
- package/tsconfig.json +5 -16
- /package/lib/components/formFields/checkbox/{checkbox.module.css → Checkbox.module.css} +0 -0
- /package/src/components/formFields/checkbox/{checkbox.module.css → Checkbox.module.css} +0 -0
package/.prettierrc
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
{
|
|
2
|
-
"overrides": [
|
|
3
|
-
{
|
|
4
|
-
"files": ["*.json"],
|
|
5
|
-
"options": {
|
|
6
|
-
"parser": "json",
|
|
7
|
-
"printWidth": 120,
|
|
8
|
-
"tabWidth": 2
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"files": ["*.ts", "*.tsx"],
|
|
13
|
-
"options": {
|
|
14
|
-
"parser": "typescript",
|
|
15
|
-
"printWidth": 120,
|
|
16
|
-
"trailingComma": "all",
|
|
17
|
-
"tabWidth": 2,
|
|
18
|
-
"singleQuote": false
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"files": ["*.css", "*.scss"],
|
|
23
|
-
"options": {
|
|
24
|
-
"parser": "css",
|
|
25
|
-
"tabWidth": 2,
|
|
26
|
-
"printWidth": 180
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
]
|
|
30
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"overrides": [
|
|
3
|
+
{
|
|
4
|
+
"files": ["*.json"],
|
|
5
|
+
"options": {
|
|
6
|
+
"parser": "json",
|
|
7
|
+
"printWidth": 120,
|
|
8
|
+
"tabWidth": 2
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"files": ["*.ts", "*.tsx"],
|
|
13
|
+
"options": {
|
|
14
|
+
"parser": "typescript",
|
|
15
|
+
"printWidth": 120,
|
|
16
|
+
"trailingComma": "all",
|
|
17
|
+
"tabWidth": 2,
|
|
18
|
+
"singleQuote": false
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"files": ["*.css", "*.scss"],
|
|
23
|
+
"options": {
|
|
24
|
+
"parser": "css",
|
|
25
|
+
"tabWidth": 2,
|
|
26
|
+
"printWidth": 180
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
package/README.md
CHANGED
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
- **Version 2.2 (breaking changes from 2.1.x)**
|
|
6
6
|
|
|
7
|
+
- 2.2.34:
|
|
8
|
+
- Added select options grouping logic.
|
|
9
|
+
- 2.2.33:
|
|
10
|
+
- Refactored DownloadCard.
|
|
11
|
+
- 2.2.32: Added more tokens to DownloadCard.
|
|
7
12
|
- 2.2.31:
|
|
8
13
|
- Added custom content to NotificationPopUp.
|
|
9
14
|
- Refactored DownloadCard to NLDS.
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--conduction-badge-counter-color: hsl(0 0% 0%);
|
|
3
|
-
--conduction-badge-counter-background-color: var(--skeleton-color-grey-1);
|
|
4
|
-
--conduction-badge-counter-height: var(--skeleton-size-md);
|
|
5
|
-
--conduction-badge-counter-width: var(--skeleton-size-md);
|
|
6
|
-
--conduction-badge-counter-font-size: var(--skeleton-font-size-xs);
|
|
7
|
-
--conduction-badge-counter-max-number-font-size: var(--skeleton-font-size-2xs);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.content {
|
|
11
|
-
display: flex;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.badge {
|
|
15
|
-
height: var(--conduction-badge-counter-height);
|
|
16
|
-
width: var(--conduction-badge-counter-width);
|
|
17
|
-
border-radius: 50%;
|
|
18
|
-
font-size: var(--conduction-badge-counter-font-size);
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
justify-content: space-around;
|
|
22
|
-
background-color: var(--conduction-badge-counter-background-color);
|
|
23
|
-
color: var(--conduction-badge-counter-color);
|
|
24
|
-
}
|
|
25
|
-
.maxNumber {
|
|
26
|
-
font-size: var(--conduction-badge-counter-max-number-font-size);
|
|
27
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-badge-counter-color: hsl(0 0% 0%);
|
|
3
|
+
--conduction-badge-counter-background-color: var(--skeleton-color-grey-1);
|
|
4
|
+
--conduction-badge-counter-height: var(--skeleton-size-md);
|
|
5
|
+
--conduction-badge-counter-width: var(--skeleton-size-md);
|
|
6
|
+
--conduction-badge-counter-font-size: var(--skeleton-font-size-xs);
|
|
7
|
+
--conduction-badge-counter-max-number-font-size: var(--skeleton-font-size-2xs);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.content {
|
|
11
|
+
display: flex;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.badge {
|
|
15
|
+
height: var(--conduction-badge-counter-height);
|
|
16
|
+
width: var(--conduction-badge-counter-width);
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
font-size: var(--conduction-badge-counter-font-size);
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: space-around;
|
|
22
|
+
background-color: var(--conduction-badge-counter-background-color);
|
|
23
|
+
color: var(--conduction-badge-counter-color);
|
|
24
|
+
}
|
|
25
|
+
.maxNumber {
|
|
26
|
+
font-size: var(--conduction-badge-counter-max-number-font-size);
|
|
27
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as styles from "./DownloadCard.module.css";
|
|
3
|
-
import
|
|
3
|
+
import _ from "lodash";
|
|
4
4
|
import clsx from "clsx";
|
|
5
|
+
import { Heading3, Link } from "@utrecht/component-library-react/dist/css-module";
|
|
5
6
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
6
7
|
import { faDatabase, faDownload, faFileAudio, faFileCsv, faFileImage, faFilePdf, faFileVideo, faFileWord, faFileZipper, } from "@fortawesome/free-solid-svg-icons";
|
|
7
|
-
import _ from "lodash";
|
|
8
8
|
export const DownloadCard = ({ icon, label, size, type, layoutClassName, handleClick, }) => {
|
|
9
9
|
const onClick = (e) => {
|
|
10
10
|
e.preventDefault();
|
|
@@ -43,5 +43,5 @@ export const DownloadCard = ({ icon, label, size, type, layoutClassName, handleC
|
|
|
43
43
|
return faDatabase;
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
return (_jsxs("div", { className: clsx(styles.container, [layoutClassName && layoutClassName]), children: [
|
|
46
|
+
return (_jsxs("div", { className: clsx(styles.container, [layoutClassName && layoutClassName]), children: [_jsx("div", { className: styles.icon, children: icon ?? _jsx(FontAwesomeIcon, { icon: getIconFromType(type) }) }), _jsxs("div", { className: styles.content, children: [_jsx(Heading3, { className: styles.title, children: label }), _jsxs("div", { children: ["(", _.toUpper(type), size && `, ${size}kB`, ")"] })] }), _jsxs(Link, { className: styles.link, href: "", onClick: (e) => onClick(e), children: [_jsx(FontAwesomeIcon, { className: styles.icon, icon: faDownload }), " Download"] })] }));
|
|
47
47
|
};
|
|
@@ -1,41 +1,63 @@
|
|
|
1
1
|
:root {
|
|
2
|
+
/* --conduction-download-card-background-color: #ffffff; */
|
|
2
3
|
--conduction-download-card-title-color: #000000;
|
|
3
4
|
--conduction-download-card-title-font-size: 20px;
|
|
4
5
|
--conduction-download-card-title-font-weight: bold;
|
|
5
6
|
/* --conduction-download-card-title-font-family: ; */
|
|
6
7
|
--conduction-download-card-title-margin-inline-end: var(--skeleton-size-sm);
|
|
7
8
|
|
|
8
|
-
--conduction-download-card-border: 1px
|
|
9
|
+
--conduction-download-card-border-width: 1px;
|
|
10
|
+
--conduction-download-card-border-style: solid;
|
|
11
|
+
--conduction-download-card-border-color: var(--skeleton-color-grey-2);
|
|
12
|
+
--conduction-download-card-border-radius: var(--skeleton-border-radius-md);
|
|
13
|
+
|
|
14
|
+
--conduction-download-card-padding-inline-end: 14px;
|
|
15
|
+
--conduction-download-card-padding-inline-start: 14px;
|
|
16
|
+
--conduction-download-card-padding-block-end: 14px;
|
|
17
|
+
--conduction-download-card-padding-block-start: 14px;
|
|
18
|
+
|
|
9
19
|
--conduction-download-card-icon-gap: 8px;
|
|
10
|
-
--conduction-download-card-padding: 14px;
|
|
11
20
|
}
|
|
12
21
|
|
|
13
22
|
.container {
|
|
23
|
+
background-color: var(--conduction-download-card-background-color, var(--conduction-card-wrapper-background-color));
|
|
14
24
|
display: flex;
|
|
15
25
|
align-items: center;
|
|
16
26
|
justify-content: space-between;
|
|
17
|
-
border: var(--conduction-download-card-border);
|
|
18
|
-
border-
|
|
19
|
-
|
|
27
|
+
border-width: var(--conduction-download-card-border-width, var(--conduction-card-wrapper-border-width));
|
|
28
|
+
border-style: var(--conduction-download-card-border-style, var(--conduction-card-wrapper-border-style));
|
|
29
|
+
border-color: var(--conduction-download-card-border-color, var(--conduction-card-wrapper-border-color));
|
|
30
|
+
border-radius: var(--conduction-download-card-border-radius, --conduction-card-wrapper-border-radius);
|
|
31
|
+
padding-inline-start: var(--conduction-download-card-padding-inline-start);
|
|
32
|
+
padding-inline-end: var(--conduction-download-card-padding-inline-end);
|
|
33
|
+
padding-block-start: var(--conduction-download-card-padding-block-start);
|
|
34
|
+
padding-block-end: var(--conduction-download-card-padding-block-end);
|
|
20
35
|
}
|
|
21
36
|
|
|
22
37
|
.title {
|
|
23
|
-
color: var(--conduction-download-card-title-color);
|
|
24
|
-
font-size: var(--conduction-download-card-title-font-size);
|
|
25
|
-
font-weight: var(--conduction-download-card-title-font-weight);
|
|
26
|
-
font-family: var(--conduction-download-card-title-font-family);
|
|
27
|
-
margin-inline-end: var(--conduction-download-card-title-margin-inline-end);
|
|
38
|
+
color: var(--conduction-download-card-title-color) !important;
|
|
39
|
+
font-size: var(--conduction-download-card-title-font-size) !important;
|
|
40
|
+
font-weight: var(--conduction-download-card-title-font-weight) !important;
|
|
41
|
+
font-family: var(--conduction-download-card-title-font-family) !important;
|
|
42
|
+
margin-inline-end: var(--conduction-download-card-title-margin-inline-end) !important;
|
|
43
|
+
word-break: break-word;
|
|
28
44
|
}
|
|
29
45
|
|
|
30
46
|
.content {
|
|
31
47
|
display: flex;
|
|
32
48
|
align-items: center;
|
|
49
|
+
width: 100%;
|
|
50
|
+
flex-wrap: wrap;
|
|
33
51
|
}
|
|
34
52
|
|
|
35
53
|
.icon {
|
|
36
54
|
margin-inline-end: var(--conduction-download-card-icon-gap);
|
|
37
55
|
}
|
|
38
56
|
|
|
57
|
+
.link {
|
|
58
|
+
display: inherit;
|
|
59
|
+
}
|
|
60
|
+
|
|
39
61
|
.link:hover {
|
|
40
62
|
cursor: pointer;
|
|
41
63
|
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
background-color: var(--skeleton-color-grey-1);
|
|
3
|
-
border-radius: var(--skeleton-border-radius-md);
|
|
4
|
-
padding-inline-start: var(--skeleton-size-md);
|
|
5
|
-
padding-inline-end: var(--skeleton-size-md);
|
|
6
|
-
padding-block-start: var(--skeleton-size-md);
|
|
7
|
-
padding-block-end: var(--skeleton-size-md);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.container > * {
|
|
11
|
-
display: block;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.container > *:not(:last-child) {
|
|
15
|
-
margin-block-end: var(--skeleton-size-xs);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.container > .title {
|
|
19
|
-
font-weight: var(--skeleton-font-weight-bold);
|
|
20
|
-
font-size: var(--skeleton-font-size-xl);
|
|
21
|
-
color: var(--skeleton-color-black);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.content {
|
|
25
|
-
color: var(--skeleton-color-black);
|
|
26
|
-
}
|
|
1
|
+
.container {
|
|
2
|
+
background-color: var(--skeleton-color-grey-1);
|
|
3
|
+
border-radius: var(--skeleton-border-radius-md);
|
|
4
|
+
padding-inline-start: var(--skeleton-size-md);
|
|
5
|
+
padding-inline-end: var(--skeleton-size-md);
|
|
6
|
+
padding-block-start: var(--skeleton-size-md);
|
|
7
|
+
padding-block-end: var(--skeleton-size-md);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.container > * {
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.container > *:not(:last-child) {
|
|
15
|
+
margin-block-end: var(--skeleton-size-xs);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.container > .title {
|
|
19
|
+
font-weight: var(--skeleton-font-weight-bold);
|
|
20
|
+
font-size: var(--skeleton-font-size-xl);
|
|
21
|
+
color: var(--skeleton-color-black);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.content {
|
|
25
|
+
color: var(--skeleton-color-black);
|
|
26
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.code {
|
|
2
|
-
margin-block: var(--skeleton-size-sm);
|
|
3
|
-
background-color: var(--skeleton-color-grey-1);
|
|
4
|
-
border-radius: var(--skeleton-size-2xs);
|
|
5
|
-
padding: var(--skeleton-size-lg);
|
|
6
|
-
}
|
|
1
|
+
.code {
|
|
2
|
+
margin-block: var(--skeleton-size-sm);
|
|
3
|
+
background-color: var(--skeleton-color-grey-1);
|
|
4
|
+
border-radius: var(--skeleton-size-2xs);
|
|
5
|
+
padding: var(--skeleton-size-lg);
|
|
6
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
display: flex;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.calendar {
|
|
6
|
-
display: flex;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.calendar > div::before,
|
|
10
|
-
.calendar > div::after {
|
|
11
|
-
display: none;
|
|
12
|
-
}
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.calendar {
|
|
6
|
+
display: flex;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.calendar > div::before,
|
|
10
|
+
.calendar > div::after {
|
|
11
|
+
display: none;
|
|
12
|
+
}
|
|
@@ -2,12 +2,17 @@
|
|
|
2
2
|
import { MenuPlacement } from "react-select";
|
|
3
3
|
import { Control, FieldValues } from "react-hook-form";
|
|
4
4
|
import { IReactHookFormProps } from "../types";
|
|
5
|
+
export type TSelectOption = {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
};
|
|
9
|
+
export type TGroupedSelectOption = {
|
|
10
|
+
label: string;
|
|
11
|
+
options: TSelectOption[];
|
|
12
|
+
};
|
|
5
13
|
interface ISelectProps {
|
|
6
14
|
control: Control<FieldValues, any>;
|
|
7
|
-
options:
|
|
8
|
-
label: string;
|
|
9
|
-
value: string;
|
|
10
|
-
}[];
|
|
15
|
+
options: TSelectOption[] | TGroupedSelectOption[];
|
|
11
16
|
name: string;
|
|
12
17
|
ariaLabel: string;
|
|
13
18
|
id?: string;
|
|
@@ -53,7 +53,7 @@ export const SelectMultiple = ({ id, name, options, errors, control, validation,
|
|
|
53
53
|
setAttributes();
|
|
54
54
|
}, []);
|
|
55
55
|
return (_jsx(Controller, { control, name, defaultValue, rules: validation, render: ({ field: { onChange, value } }) => {
|
|
56
|
-
return (_jsxs(_Fragment, { children: [_jsx(ReactSelect, { "aria-label": ariaLabel, inputId: id, value: value ?? "", className: clsx(styles.select, errors[name] && styles.error), isMulti: true, isDisabled: disabled, options, onChange, errors, menuPortalTarget: document.body, menuPlacement: menuPlacement, styles: selectStyles, placeholder: disabled ? "Disabled..." : placeholder ?? "Select one or more options..." }), errors[name] && !hideErrorMessage && _jsx(ErrorMessage, { message: errors[name]?.message })] }));
|
|
56
|
+
return (_jsxs(_Fragment, { children: [_jsx(ReactSelect, { "aria-label": ariaLabel, inputId: id, value: value ?? "", className: clsx(styles.select, errors[name] && styles.error), isMulti: true, isDisabled: disabled, options, onChange, errors, menuPortalTarget: document.body, menuPlacement: menuPlacement, styles: selectStyles, placeholder: disabled ? "Disabled..." : placeholder ?? "Select one or more options...", formatGroupLabel: (group) => _jsx(GroupLabel, { group }) }), errors[name] && !hideErrorMessage && _jsx(ErrorMessage, { message: errors[name]?.message })] }));
|
|
57
57
|
} }));
|
|
58
58
|
};
|
|
59
59
|
export const SelectCreate = ({ id, name, options, errors, control, validation, defaultValue, disabled, hideErrorMessage, menuPlacement, placeholder, ariaLabel, }) => {
|
|
@@ -61,7 +61,7 @@ export const SelectCreate = ({ id, name, options, errors, control, validation, d
|
|
|
61
61
|
setAttributes();
|
|
62
62
|
}, []);
|
|
63
63
|
return (_jsx(Controller, { control, name, defaultValue, rules: validation, render: ({ field: { onChange, value } }) => {
|
|
64
|
-
return (_jsxs(_Fragment, { children: [_jsx(CreatableSelect, { "aria-label": ariaLabel, inputId: id, value: value ?? "", placeholder: disabled ? "Disabled..." : placeholder ?? "Select one or more options...", className: clsx(styles.select, errors[name] && styles.error), isMulti: true, isDisabled: disabled, options, onChange, errors, menuPortalTarget: document.body, menuPlacement: menuPlacement, styles: selectStyles }), errors[name] && !hideErrorMessage && _jsx(ErrorMessage, { message: errors[name]?.message })] }));
|
|
64
|
+
return (_jsxs(_Fragment, { children: [_jsx(CreatableSelect, { "aria-label": ariaLabel, inputId: id, value: value ?? "", placeholder: disabled ? "Disabled..." : placeholder ?? "Select one or more options...", className: clsx(styles.select, errors[name] && styles.error), isMulti: true, isDisabled: disabled, options, onChange, errors, menuPortalTarget: document.body, menuPlacement: menuPlacement, styles: selectStyles, formatGroupLabel: (group) => _jsx(GroupLabel, { group }) }), errors[name] && !hideErrorMessage && _jsx(ErrorMessage, { message: errors[name]?.message })] }));
|
|
65
65
|
} }));
|
|
66
66
|
};
|
|
67
67
|
export const SelectSingle = ({ id, name, options, errors, control, validation, isClearable, defaultValue, disabled, hideErrorMessage, menuPlacement, placeholder, ariaLabel, }) => {
|
|
@@ -69,6 +69,11 @@ export const SelectSingle = ({ id, name, options, errors, control, validation, i
|
|
|
69
69
|
setAttributes();
|
|
70
70
|
}, []);
|
|
71
71
|
return (_jsx(Controller, { control, name, defaultValue, rules: validation, render: ({ field: { onChange, value } }) => {
|
|
72
|
-
return (_jsxs(_Fragment, { children: [_jsx(ReactSelect, { "aria-label": ariaLabel, inputId: id, value: value ?? "", className: clsx(styles.select, errors[name] && styles.error), isDisabled: disabled, options, onChange, errors, isClearable, menuPortalTarget: document.body, menuPlacement: menuPlacement, styles: selectStyles, placeholder: disabled ? "Disabled..." : placeholder ?? "Select one or more options..." }), errors[name] && !hideErrorMessage && _jsx(ErrorMessage, { message: errors[name]?.message })] }));
|
|
72
|
+
return (_jsxs(_Fragment, { children: [_jsx(ReactSelect, { "aria-label": ariaLabel, inputId: id, value: value ?? "", className: clsx(styles.select, errors[name] && styles.error), isDisabled: disabled, options, onChange, errors, isClearable, menuPortalTarget: document.body, menuPlacement: menuPlacement, styles: selectStyles, placeholder: disabled ? "Disabled..." : placeholder ?? "Select one or more options...", formatGroupLabel: (group) => _jsx(GroupLabel, { group }) }), errors[name] && !hideErrorMessage && _jsx(ErrorMessage, { message: errors[name]?.message })] }));
|
|
73
73
|
} }));
|
|
74
74
|
};
|
|
75
|
+
const GroupLabel = ({ group }) => {
|
|
76
|
+
if (!group.label)
|
|
77
|
+
return _jsx(_Fragment, {});
|
|
78
|
+
return _jsx("span", { className: styles.groupLabel, children: group.label });
|
|
79
|
+
};
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
|
|
25
25
|
--conduction-input-select-placeholder-font-family: "Noto Sans", Arial, sans-serif;
|
|
26
26
|
--conduction-input-select-placeholder-color: #757575;
|
|
27
|
+
|
|
28
|
+
--conduction-input-select-group-font-size: 12px;
|
|
29
|
+
--conduction-input-select-group-text-color: grey;
|
|
30
|
+
--conduction-input-select-group-font-family: "Noto Sans", Arial, sans-serif;
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
.select > div {
|
|
@@ -56,3 +60,9 @@
|
|
|
56
60
|
border: var(--conduction-input-select-border-focus);
|
|
57
61
|
border-radius: var(--conduction-input-select-border-radius);
|
|
58
62
|
}
|
|
63
|
+
|
|
64
|
+
.groupLabel {
|
|
65
|
+
font-size: var(--conduction-input-select-group-font-size);
|
|
66
|
+
color: var(--conduction-input-select-group-text-color);
|
|
67
|
+
font-family: var(--conduction-input-select-group-font-family);
|
|
68
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.divider {
|
|
2
|
-
display: block;
|
|
3
|
-
object-fit: cover;
|
|
4
|
-
width: 100%;
|
|
5
|
-
}
|
|
1
|
+
.divider {
|
|
2
|
+
display: block;
|
|
3
|
+
object-fit: cover;
|
|
4
|
+
width: 100%;
|
|
5
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--conduction-meta-icon-icon-size: var(--skeleton-size-lg);
|
|
3
|
-
--conduction-meta-icon-icon-color: var(--skeleton-color-secondary-4);
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.container {
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.container > *:not(:last-child) {
|
|
13
|
-
margin-block-end: var(--skeleton-size-xs);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.icon {
|
|
17
|
-
color: var(--conduction-meta-icon-icon-color);
|
|
18
|
-
height: var(--conduction-meta-icon-icon-size);
|
|
19
|
-
width: var(--conduction-meta-icon-icon-size);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.icon > svg {
|
|
23
|
-
height: 100%;
|
|
24
|
-
width: 100%;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.value {
|
|
28
|
-
font-weight: var(--skeleton-font-weight-bold);
|
|
29
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-meta-icon-icon-size: var(--skeleton-size-lg);
|
|
3
|
+
--conduction-meta-icon-icon-color: var(--skeleton-color-secondary-4);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.container {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.container > *:not(:last-child) {
|
|
13
|
+
margin-block-end: var(--skeleton-size-xs);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.icon {
|
|
17
|
+
color: var(--conduction-meta-icon-icon-color);
|
|
18
|
+
height: var(--conduction-meta-icon-icon-size);
|
|
19
|
+
width: var(--conduction-meta-icon-icon-size);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.icon > svg {
|
|
23
|
+
height: 100%;
|
|
24
|
+
width: 100%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.value {
|
|
28
|
+
font-weight: var(--skeleton-font-weight-bold);
|
|
29
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--conduction-quote-wrapper-border-width: var(--skeleton-size-sm);
|
|
3
|
-
--conduction-quote-wrapper-border-color: var(--skeleton-color-grey-1);
|
|
4
|
-
--conduction-quote-wrapper-padding-inline: var(--skeleton-size-lg);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.container {
|
|
8
|
-
border-left-width: var(--conduction-quote-wrapper-border-width);
|
|
9
|
-
border-left-style: solid;
|
|
10
|
-
border-left-color: var(--conduction-quote-wrapper-border-color);
|
|
11
|
-
padding-inline-start: var(--conduction-quote-wrapper-padding-inline);
|
|
12
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-quote-wrapper-border-width: var(--skeleton-size-sm);
|
|
3
|
+
--conduction-quote-wrapper-border-color: var(--skeleton-color-grey-1);
|
|
4
|
+
--conduction-quote-wrapper-padding-inline: var(--skeleton-size-lg);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.container {
|
|
8
|
+
border-left-width: var(--conduction-quote-wrapper-border-width);
|
|
9
|
+
border-left-style: solid;
|
|
10
|
+
border-left-color: var(--conduction-quote-wrapper-border-color);
|
|
11
|
+
padding-inline-start: var(--conduction-quote-wrapper-padding-inline);
|
|
12
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--conduction-tag-font-size: var(--skeleton-font-size-sm);
|
|
3
|
-
--conduction-tag-color: var(--skeleton-black);
|
|
4
|
-
--conduction-tag-background-color: var(--skeleton-color-grey-1);
|
|
5
|
-
--conduction-tag-border-radius: var(--skeleton-border-radius-md);
|
|
6
|
-
--conduction-tag-padding: var(--skeleton-size-xs);
|
|
7
|
-
--conduction-tag-icon-margin-inline-end: var(--skeleton-size-2xs);
|
|
8
|
-
--conduction-tag-remove-background-color: #ffbdad;
|
|
9
|
-
--conduction-tag-remove-text-color: #e44f2a;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.tag {
|
|
13
|
-
display: inline-block;
|
|
14
|
-
width: fit-content;
|
|
15
|
-
font-size: var(--conduction-tag-font-size);
|
|
16
|
-
color: var(--conduction-tag-color);
|
|
17
|
-
background-color: var(--conduction-tag-background-color);
|
|
18
|
-
padding-inline-start: var(--conduction-tag-padding);
|
|
19
|
-
padding-inline-end: var(--conduction-tag-padding);
|
|
20
|
-
padding-block-start: var(--conduction-tag-padding);
|
|
21
|
-
padding-block-end: var(--conduction-tag-padding);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.tag > *:not(:last-child) {
|
|
25
|
-
margin-inline-end: var(--conduction-tag-icon-margin-inline-end);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.clickable :hover {
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.remove {
|
|
33
|
-
padding-inline-end: 4px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.tagContainer {
|
|
37
|
-
display: flex;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.removeTag:hover {
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
background-color: var(--conduction-tag-remove-background-color);
|
|
43
|
-
color: var(--conduction-tag-remove-text-color);
|
|
44
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-tag-font-size: var(--skeleton-font-size-sm);
|
|
3
|
+
--conduction-tag-color: var(--skeleton-black);
|
|
4
|
+
--conduction-tag-background-color: var(--skeleton-color-grey-1);
|
|
5
|
+
--conduction-tag-border-radius: var(--skeleton-border-radius-md);
|
|
6
|
+
--conduction-tag-padding: var(--skeleton-size-xs);
|
|
7
|
+
--conduction-tag-icon-margin-inline-end: var(--skeleton-size-2xs);
|
|
8
|
+
--conduction-tag-remove-background-color: #ffbdad;
|
|
9
|
+
--conduction-tag-remove-text-color: #e44f2a;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.tag {
|
|
13
|
+
display: inline-block;
|
|
14
|
+
width: fit-content;
|
|
15
|
+
font-size: var(--conduction-tag-font-size);
|
|
16
|
+
color: var(--conduction-tag-color);
|
|
17
|
+
background-color: var(--conduction-tag-background-color);
|
|
18
|
+
padding-inline-start: var(--conduction-tag-padding);
|
|
19
|
+
padding-inline-end: var(--conduction-tag-padding);
|
|
20
|
+
padding-block-start: var(--conduction-tag-padding);
|
|
21
|
+
padding-block-end: var(--conduction-tag-padding);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.tag > *:not(:last-child) {
|
|
25
|
+
margin-inline-end: var(--conduction-tag-icon-margin-inline-end);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.clickable :hover {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.remove {
|
|
33
|
+
padding-inline-end: 4px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.tagContainer {
|
|
37
|
+
display: flex;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.removeTag:hover {
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
background-color: var(--conduction-tag-remove-background-color);
|
|
43
|
+
color: var(--conduction-tag-remove-text-color);
|
|
44
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conduction/components",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.34",
|
|
4
4
|
"description": "React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -14,12 +14,7 @@
|
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git+https://github.com/ConductionNL/conduction-components.git"
|
|
16
16
|
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"React",
|
|
19
|
-
"Gatsby",
|
|
20
|
-
"Conduction",
|
|
21
|
-
"Components"
|
|
22
|
-
],
|
|
17
|
+
"keywords": ["React", "Gatsby", "Conduction", "Components"],
|
|
23
18
|
"author": "Conduction B.V.",
|
|
24
19
|
"license": "ISC",
|
|
25
20
|
"bugs": {
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--conduction-badge-counter-color: hsl(0 0% 0%);
|
|
3
|
-
--conduction-badge-counter-background-color: var(--skeleton-color-grey-1);
|
|
4
|
-
--conduction-badge-counter-height: var(--skeleton-size-md);
|
|
5
|
-
--conduction-badge-counter-width: var(--skeleton-size-md);
|
|
6
|
-
--conduction-badge-counter-font-size: var(--skeleton-font-size-xs);
|
|
7
|
-
--conduction-badge-counter-max-number-font-size: var(--skeleton-font-size-2xs);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.content {
|
|
11
|
-
display: flex;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.badge {
|
|
15
|
-
height: var(--conduction-badge-counter-height);
|
|
16
|
-
width: var(--conduction-badge-counter-width);
|
|
17
|
-
border-radius: 50%;
|
|
18
|
-
font-size: var(--conduction-badge-counter-font-size);
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
justify-content: space-around;
|
|
22
|
-
background-color: var(--conduction-badge-counter-background-color);
|
|
23
|
-
color: var(--conduction-badge-counter-color);
|
|
24
|
-
}
|
|
25
|
-
.maxNumber {
|
|
26
|
-
font-size: var(--conduction-badge-counter-max-number-font-size);
|
|
27
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-badge-counter-color: hsl(0 0% 0%);
|
|
3
|
+
--conduction-badge-counter-background-color: var(--skeleton-color-grey-1);
|
|
4
|
+
--conduction-badge-counter-height: var(--skeleton-size-md);
|
|
5
|
+
--conduction-badge-counter-width: var(--skeleton-size-md);
|
|
6
|
+
--conduction-badge-counter-font-size: var(--skeleton-font-size-xs);
|
|
7
|
+
--conduction-badge-counter-max-number-font-size: var(--skeleton-font-size-2xs);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.content {
|
|
11
|
+
display: flex;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.badge {
|
|
15
|
+
height: var(--conduction-badge-counter-height);
|
|
16
|
+
width: var(--conduction-badge-counter-width);
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
font-size: var(--conduction-badge-counter-font-size);
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: space-around;
|
|
22
|
+
background-color: var(--conduction-badge-counter-background-color);
|
|
23
|
+
color: var(--conduction-badge-counter-color);
|
|
24
|
+
}
|
|
25
|
+
.maxNumber {
|
|
26
|
+
font-size: var(--conduction-badge-counter-max-number-font-size);
|
|
27
|
+
}
|
|
@@ -1,41 +1,63 @@
|
|
|
1
1
|
:root {
|
|
2
|
+
/* --conduction-download-card-background-color: #ffffff; */
|
|
2
3
|
--conduction-download-card-title-color: #000000;
|
|
3
4
|
--conduction-download-card-title-font-size: 20px;
|
|
4
5
|
--conduction-download-card-title-font-weight: bold;
|
|
5
6
|
/* --conduction-download-card-title-font-family: ; */
|
|
6
7
|
--conduction-download-card-title-margin-inline-end: var(--skeleton-size-sm);
|
|
7
8
|
|
|
8
|
-
--conduction-download-card-border: 1px
|
|
9
|
+
--conduction-download-card-border-width: 1px;
|
|
10
|
+
--conduction-download-card-border-style: solid;
|
|
11
|
+
--conduction-download-card-border-color: var(--skeleton-color-grey-2);
|
|
12
|
+
--conduction-download-card-border-radius: var(--skeleton-border-radius-md);
|
|
13
|
+
|
|
14
|
+
--conduction-download-card-padding-inline-end: 14px;
|
|
15
|
+
--conduction-download-card-padding-inline-start: 14px;
|
|
16
|
+
--conduction-download-card-padding-block-end: 14px;
|
|
17
|
+
--conduction-download-card-padding-block-start: 14px;
|
|
18
|
+
|
|
9
19
|
--conduction-download-card-icon-gap: 8px;
|
|
10
|
-
--conduction-download-card-padding: 14px;
|
|
11
20
|
}
|
|
12
21
|
|
|
13
22
|
.container {
|
|
23
|
+
background-color: var(--conduction-download-card-background-color, var(--conduction-card-wrapper-background-color));
|
|
14
24
|
display: flex;
|
|
15
25
|
align-items: center;
|
|
16
26
|
justify-content: space-between;
|
|
17
|
-
border: var(--conduction-download-card-border);
|
|
18
|
-
border-
|
|
19
|
-
|
|
27
|
+
border-width: var(--conduction-download-card-border-width, var(--conduction-card-wrapper-border-width));
|
|
28
|
+
border-style: var(--conduction-download-card-border-style, var(--conduction-card-wrapper-border-style));
|
|
29
|
+
border-color: var(--conduction-download-card-border-color, var(--conduction-card-wrapper-border-color));
|
|
30
|
+
border-radius: var(--conduction-download-card-border-radius, --conduction-card-wrapper-border-radius);
|
|
31
|
+
padding-inline-start: var(--conduction-download-card-padding-inline-start);
|
|
32
|
+
padding-inline-end: var(--conduction-download-card-padding-inline-end);
|
|
33
|
+
padding-block-start: var(--conduction-download-card-padding-block-start);
|
|
34
|
+
padding-block-end: var(--conduction-download-card-padding-block-end);
|
|
20
35
|
}
|
|
21
36
|
|
|
22
37
|
.title {
|
|
23
|
-
color: var(--conduction-download-card-title-color);
|
|
24
|
-
font-size: var(--conduction-download-card-title-font-size);
|
|
25
|
-
font-weight: var(--conduction-download-card-title-font-weight);
|
|
26
|
-
font-family: var(--conduction-download-card-title-font-family);
|
|
27
|
-
margin-inline-end: var(--conduction-download-card-title-margin-inline-end);
|
|
38
|
+
color: var(--conduction-download-card-title-color) !important;
|
|
39
|
+
font-size: var(--conduction-download-card-title-font-size) !important;
|
|
40
|
+
font-weight: var(--conduction-download-card-title-font-weight) !important;
|
|
41
|
+
font-family: var(--conduction-download-card-title-font-family) !important;
|
|
42
|
+
margin-inline-end: var(--conduction-download-card-title-margin-inline-end) !important;
|
|
43
|
+
word-break: break-word;
|
|
28
44
|
}
|
|
29
45
|
|
|
30
46
|
.content {
|
|
31
47
|
display: flex;
|
|
32
48
|
align-items: center;
|
|
49
|
+
width: 100%;
|
|
50
|
+
flex-wrap: wrap;
|
|
33
51
|
}
|
|
34
52
|
|
|
35
53
|
.icon {
|
|
36
54
|
margin-inline-end: var(--conduction-download-card-icon-gap);
|
|
37
55
|
}
|
|
38
56
|
|
|
57
|
+
.link {
|
|
58
|
+
display: inherit;
|
|
59
|
+
}
|
|
60
|
+
|
|
39
61
|
.link:hover {
|
|
40
62
|
cursor: pointer;
|
|
41
63
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as styles from "./DownloadCard.module.css";
|
|
3
|
-
import
|
|
3
|
+
import _ from "lodash";
|
|
4
4
|
import clsx from "clsx";
|
|
5
|
+
import { Heading3, Link } from "@utrecht/component-library-react/dist/css-module";
|
|
5
6
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
6
7
|
import {
|
|
7
8
|
faDatabase,
|
|
@@ -14,7 +15,6 @@ import {
|
|
|
14
15
|
faFileWord,
|
|
15
16
|
faFileZipper,
|
|
16
17
|
} from "@fortawesome/free-solid-svg-icons";
|
|
17
|
-
import _ from "lodash";
|
|
18
18
|
|
|
19
19
|
interface DownloadCardProps {
|
|
20
20
|
label: string;
|
|
@@ -74,18 +74,17 @@ export const DownloadCard = ({
|
|
|
74
74
|
|
|
75
75
|
return (
|
|
76
76
|
<div className={clsx(styles.container, [layoutClassName && layoutClassName])}>
|
|
77
|
+
<div className={styles.icon}>{icon ?? <FontAwesomeIcon icon={getIconFromType(type)} />}</div>
|
|
77
78
|
<div className={styles.content}>
|
|
78
|
-
<div className={styles.icon}>{icon ?? <FontAwesomeIcon icon={getIconFromType(type)} />}</div>
|
|
79
|
-
|
|
80
79
|
<Heading3 className={styles.title}>{label}</Heading3>
|
|
81
80
|
|
|
82
81
|
<div>
|
|
83
82
|
({_.toUpper(type)}
|
|
84
|
-
{size && `, ${size}
|
|
83
|
+
{size && `, ${size}kB`})
|
|
85
84
|
</div>
|
|
86
85
|
</div>
|
|
87
86
|
|
|
88
|
-
<Link className={styles.link} href="" onClick={(e) => onClick(e)}>
|
|
87
|
+
<Link className={styles.link} href="" onClick={(e: any) => onClick(e)}>
|
|
89
88
|
<FontAwesomeIcon className={styles.icon} icon={faDownload} /> Download
|
|
90
89
|
</Link>
|
|
91
90
|
</div>
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
background-color: var(--skeleton-color-grey-1);
|
|
3
|
-
border-radius: var(--skeleton-border-radius-md);
|
|
4
|
-
padding-inline-start: var(--skeleton-size-md);
|
|
5
|
-
padding-inline-end: var(--skeleton-size-md);
|
|
6
|
-
padding-block-start: var(--skeleton-size-md);
|
|
7
|
-
padding-block-end: var(--skeleton-size-md);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.container > * {
|
|
11
|
-
display: block;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.container > *:not(:last-child) {
|
|
15
|
-
margin-block-end: var(--skeleton-size-xs);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.container > .title {
|
|
19
|
-
font-weight: var(--skeleton-font-weight-bold);
|
|
20
|
-
font-size: var(--skeleton-font-size-xl);
|
|
21
|
-
color: var(--skeleton-color-black);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.content {
|
|
25
|
-
color: var(--skeleton-color-black);
|
|
26
|
-
}
|
|
1
|
+
.container {
|
|
2
|
+
background-color: var(--skeleton-color-grey-1);
|
|
3
|
+
border-radius: var(--skeleton-border-radius-md);
|
|
4
|
+
padding-inline-start: var(--skeleton-size-md);
|
|
5
|
+
padding-inline-end: var(--skeleton-size-md);
|
|
6
|
+
padding-block-start: var(--skeleton-size-md);
|
|
7
|
+
padding-block-end: var(--skeleton-size-md);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.container > * {
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.container > *:not(:last-child) {
|
|
15
|
+
margin-block-end: var(--skeleton-size-xs);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.container > .title {
|
|
19
|
+
font-weight: var(--skeleton-font-weight-bold);
|
|
20
|
+
font-size: var(--skeleton-font-size-xl);
|
|
21
|
+
color: var(--skeleton-color-black);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.content {
|
|
25
|
+
color: var(--skeleton-color-black);
|
|
26
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.code {
|
|
2
|
-
margin-block: var(--skeleton-size-sm);
|
|
3
|
-
background-color: var(--skeleton-color-grey-1);
|
|
4
|
-
border-radius: var(--skeleton-size-2xs);
|
|
5
|
-
padding: var(--skeleton-size-lg);
|
|
6
|
-
}
|
|
1
|
+
.code {
|
|
2
|
+
margin-block: var(--skeleton-size-sm);
|
|
3
|
+
background-color: var(--skeleton-color-grey-1);
|
|
4
|
+
border-radius: var(--skeleton-size-2xs);
|
|
5
|
+
padding: var(--skeleton-size-lg);
|
|
6
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
display: flex;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.calendar {
|
|
6
|
-
display: flex;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.calendar > div::before,
|
|
10
|
-
.calendar > div::after {
|
|
11
|
-
display: none;
|
|
12
|
-
}
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.calendar {
|
|
6
|
+
display: flex;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.calendar > div::before,
|
|
10
|
+
.calendar > div::after {
|
|
11
|
+
display: none;
|
|
12
|
+
}
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
|
|
25
25
|
--conduction-input-select-placeholder-font-family: "Noto Sans", Arial, sans-serif;
|
|
26
26
|
--conduction-input-select-placeholder-color: #757575;
|
|
27
|
+
|
|
28
|
+
--conduction-input-select-group-font-size: 12px;
|
|
29
|
+
--conduction-input-select-group-text-color: grey;
|
|
30
|
+
--conduction-input-select-group-font-family: "Noto Sans", Arial, sans-serif;
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
.select > div {
|
|
@@ -56,3 +60,9 @@
|
|
|
56
60
|
border: var(--conduction-input-select-border-focus);
|
|
57
61
|
border-radius: var(--conduction-input-select-border-radius);
|
|
58
62
|
}
|
|
63
|
+
|
|
64
|
+
.groupLabel {
|
|
65
|
+
font-size: var(--conduction-input-select-group-font-size);
|
|
66
|
+
color: var(--conduction-input-select-group-text-color);
|
|
67
|
+
font-family: var(--conduction-input-select-group-font-family);
|
|
68
|
+
}
|
|
@@ -2,14 +2,17 @@ import * as React from "react";
|
|
|
2
2
|
import * as styles from "./select.module.css";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import CreatableSelect from "react-select/creatable";
|
|
5
|
-
import ReactSelect, { MenuPlacement, StylesConfig } from "react-select";
|
|
5
|
+
import ReactSelect, { MenuPlacement, StylesConfig, GroupBase } from "react-select";
|
|
6
6
|
import { Control, Controller, FieldValues } from "react-hook-form";
|
|
7
7
|
import { IReactHookFormProps } from "../types";
|
|
8
8
|
import { ErrorMessage } from "../errorMessage/ErrorMessage";
|
|
9
9
|
|
|
10
|
+
export type TSelectOption = { label: string; value: string };
|
|
11
|
+
export type TGroupedSelectOption = { label: string; options: TSelectOption[] };
|
|
12
|
+
|
|
10
13
|
interface ISelectProps {
|
|
11
14
|
control: Control<FieldValues, any>;
|
|
12
|
-
options:
|
|
15
|
+
options: TSelectOption[] | TGroupedSelectOption[];
|
|
13
16
|
name: string;
|
|
14
17
|
ariaLabel: string;
|
|
15
18
|
id?: string;
|
|
@@ -103,6 +106,7 @@ export const SelectMultiple = ({
|
|
|
103
106
|
menuPlacement={menuPlacement}
|
|
104
107
|
styles={selectStyles}
|
|
105
108
|
placeholder={disabled ? "Disabled..." : placeholder ?? "Select one or more options..."}
|
|
109
|
+
formatGroupLabel={(group) => <GroupLabel {...{ group }} />}
|
|
106
110
|
/>
|
|
107
111
|
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name]?.message as string} />}
|
|
108
112
|
</>
|
|
@@ -148,6 +152,7 @@ export const SelectCreate = ({
|
|
|
148
152
|
menuPortalTarget={document.body}
|
|
149
153
|
menuPlacement={menuPlacement}
|
|
150
154
|
styles={selectStyles}
|
|
155
|
+
formatGroupLabel={(group) => <GroupLabel {...{ group }} />}
|
|
151
156
|
/>
|
|
152
157
|
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name]?.message as string} />}
|
|
153
158
|
</>
|
|
@@ -193,6 +198,7 @@ export const SelectSingle = ({
|
|
|
193
198
|
menuPlacement={menuPlacement}
|
|
194
199
|
styles={selectStyles}
|
|
195
200
|
placeholder={disabled ? "Disabled..." : placeholder ?? "Select one or more options..."}
|
|
201
|
+
formatGroupLabel={(group) => <GroupLabel {...{ group }} />}
|
|
196
202
|
/>
|
|
197
203
|
{errors[name] && !hideErrorMessage && <ErrorMessage message={errors[name]?.message as string} />}
|
|
198
204
|
</>
|
|
@@ -201,3 +207,9 @@ export const SelectSingle = ({
|
|
|
201
207
|
/>
|
|
202
208
|
);
|
|
203
209
|
};
|
|
210
|
+
|
|
211
|
+
const GroupLabel: React.FC<{ group: GroupBase<unknown> }> = ({ group }) => {
|
|
212
|
+
if (!group.label) return <></>;
|
|
213
|
+
|
|
214
|
+
return <span className={styles.groupLabel}>{group.label}</span>;
|
|
215
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.divider {
|
|
2
|
-
display: block;
|
|
3
|
-
object-fit: cover;
|
|
4
|
-
width: 100%;
|
|
5
|
-
}
|
|
1
|
+
.divider {
|
|
2
|
+
display: block;
|
|
3
|
+
object-fit: cover;
|
|
4
|
+
width: 100%;
|
|
5
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--conduction-meta-icon-icon-size: var(--skeleton-size-lg);
|
|
3
|
-
--conduction-meta-icon-icon-color: var(--skeleton-color-secondary-4);
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.container {
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.container > *:not(:last-child) {
|
|
13
|
-
margin-block-end: var(--skeleton-size-xs);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.icon {
|
|
17
|
-
color: var(--conduction-meta-icon-icon-color);
|
|
18
|
-
height: var(--conduction-meta-icon-icon-size);
|
|
19
|
-
width: var(--conduction-meta-icon-icon-size);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.icon > svg {
|
|
23
|
-
height: 100%;
|
|
24
|
-
width: 100%;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.value {
|
|
28
|
-
font-weight: var(--skeleton-font-weight-bold);
|
|
29
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-meta-icon-icon-size: var(--skeleton-size-lg);
|
|
3
|
+
--conduction-meta-icon-icon-color: var(--skeleton-color-secondary-4);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.container {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.container > *:not(:last-child) {
|
|
13
|
+
margin-block-end: var(--skeleton-size-xs);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.icon {
|
|
17
|
+
color: var(--conduction-meta-icon-icon-color);
|
|
18
|
+
height: var(--conduction-meta-icon-icon-size);
|
|
19
|
+
width: var(--conduction-meta-icon-icon-size);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.icon > svg {
|
|
23
|
+
height: 100%;
|
|
24
|
+
width: 100%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.value {
|
|
28
|
+
font-weight: var(--skeleton-font-weight-bold);
|
|
29
|
+
}
|
|
@@ -8,7 +8,7 @@ import { faArrowRight, faClose } from "@fortawesome/free-solid-svg-icons";
|
|
|
8
8
|
|
|
9
9
|
export interface NotificationPopUpProps {
|
|
10
10
|
title: string;
|
|
11
|
-
description?: string
|
|
11
|
+
description?: string;
|
|
12
12
|
customContent?: JSX.Element;
|
|
13
13
|
isVisible: boolean;
|
|
14
14
|
hide: () => void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--conduction-quote-wrapper-border-width: var(--skeleton-size-sm);
|
|
3
|
-
--conduction-quote-wrapper-border-color: var(--skeleton-color-grey-1);
|
|
4
|
-
--conduction-quote-wrapper-padding-inline: var(--skeleton-size-lg);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.container {
|
|
8
|
-
border-left-width: var(--conduction-quote-wrapper-border-width);
|
|
9
|
-
border-left-style: solid;
|
|
10
|
-
border-left-color: var(--conduction-quote-wrapper-border-color);
|
|
11
|
-
padding-inline-start: var(--conduction-quote-wrapper-padding-inline);
|
|
12
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-quote-wrapper-border-width: var(--skeleton-size-sm);
|
|
3
|
+
--conduction-quote-wrapper-border-color: var(--skeleton-color-grey-1);
|
|
4
|
+
--conduction-quote-wrapper-padding-inline: var(--skeleton-size-lg);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.container {
|
|
8
|
+
border-left-width: var(--conduction-quote-wrapper-border-width);
|
|
9
|
+
border-left-style: solid;
|
|
10
|
+
border-left-color: var(--conduction-quote-wrapper-border-color);
|
|
11
|
+
padding-inline-start: var(--conduction-quote-wrapper-padding-inline);
|
|
12
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--conduction-tag-font-size: var(--skeleton-font-size-sm);
|
|
3
|
-
--conduction-tag-color: var(--skeleton-black);
|
|
4
|
-
--conduction-tag-background-color: var(--skeleton-color-grey-1);
|
|
5
|
-
--conduction-tag-border-radius: var(--skeleton-border-radius-md);
|
|
6
|
-
--conduction-tag-padding: var(--skeleton-size-xs);
|
|
7
|
-
--conduction-tag-icon-margin-inline-end: var(--skeleton-size-2xs);
|
|
8
|
-
--conduction-tag-remove-background-color: #ffbdad;
|
|
9
|
-
--conduction-tag-remove-text-color: #e44f2a;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.tag {
|
|
13
|
-
display: inline-block;
|
|
14
|
-
width: fit-content;
|
|
15
|
-
font-size: var(--conduction-tag-font-size);
|
|
16
|
-
color: var(--conduction-tag-color);
|
|
17
|
-
background-color: var(--conduction-tag-background-color);
|
|
18
|
-
padding-inline-start: var(--conduction-tag-padding);
|
|
19
|
-
padding-inline-end: var(--conduction-tag-padding);
|
|
20
|
-
padding-block-start: var(--conduction-tag-padding);
|
|
21
|
-
padding-block-end: var(--conduction-tag-padding);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.tag > *:not(:last-child) {
|
|
25
|
-
margin-inline-end: var(--conduction-tag-icon-margin-inline-end);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.clickable :hover {
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.remove {
|
|
33
|
-
padding-inline-end: 4px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.tagContainer {
|
|
37
|
-
display: flex;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.removeTag:hover {
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
background-color: var(--conduction-tag-remove-background-color);
|
|
43
|
-
color: var(--conduction-tag-remove-text-color);
|
|
44
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--conduction-tag-font-size: var(--skeleton-font-size-sm);
|
|
3
|
+
--conduction-tag-color: var(--skeleton-black);
|
|
4
|
+
--conduction-tag-background-color: var(--skeleton-color-grey-1);
|
|
5
|
+
--conduction-tag-border-radius: var(--skeleton-border-radius-md);
|
|
6
|
+
--conduction-tag-padding: var(--skeleton-size-xs);
|
|
7
|
+
--conduction-tag-icon-margin-inline-end: var(--skeleton-size-2xs);
|
|
8
|
+
--conduction-tag-remove-background-color: #ffbdad;
|
|
9
|
+
--conduction-tag-remove-text-color: #e44f2a;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.tag {
|
|
13
|
+
display: inline-block;
|
|
14
|
+
width: fit-content;
|
|
15
|
+
font-size: var(--conduction-tag-font-size);
|
|
16
|
+
color: var(--conduction-tag-color);
|
|
17
|
+
background-color: var(--conduction-tag-background-color);
|
|
18
|
+
padding-inline-start: var(--conduction-tag-padding);
|
|
19
|
+
padding-inline-end: var(--conduction-tag-padding);
|
|
20
|
+
padding-block-start: var(--conduction-tag-padding);
|
|
21
|
+
padding-block-end: var(--conduction-tag-padding);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.tag > *:not(:last-child) {
|
|
25
|
+
margin-inline-end: var(--conduction-tag-icon-margin-inline-end);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.clickable :hover {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.remove {
|
|
33
|
+
padding-inline-end: 4px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.tagContainer {
|
|
37
|
+
display: flex;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.removeTag:hover {
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
background-color: var(--conduction-tag-remove-background-color);
|
|
43
|
+
color: var(--conduction-tag-remove-text-color);
|
|
44
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PrimaryTopNav } from "./primaryTopNav/PrimaryTopNav";
|
|
2
|
-
import { SecondaryTopNav } from "./secondaryTopNav/SecondaryTopNav";
|
|
3
|
-
|
|
4
|
-
export { PrimaryTopNav, SecondaryTopNav };
|
|
1
|
+
import { PrimaryTopNav } from "./primaryTopNav/PrimaryTopNav";
|
|
2
|
+
import { SecondaryTopNav } from "./secondaryTopNav/SecondaryTopNav";
|
|
3
|
+
|
|
4
|
+
export { PrimaryTopNav, SecondaryTopNav };
|
package/src/custom.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare module "*.svg";
|
|
2
|
-
declare module "*.jpg";
|
|
3
|
-
declare module "*.png";
|
|
4
|
-
declare module "*.module.css";
|
|
1
|
+
declare module "*.svg";
|
|
2
|
+
declare module "*.jpg";
|
|
3
|
+
declare module "*.png";
|
|
4
|
+
declare module "*.module.css";
|
package/tsconfig.json
CHANGED
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
"declaration": true,
|
|
4
4
|
"outDir": "./lib",
|
|
5
5
|
"target": "esnext",
|
|
6
|
-
"lib": [
|
|
7
|
-
"dom",
|
|
8
|
-
"esnext"
|
|
9
|
-
],
|
|
6
|
+
"lib": ["dom", "esnext"],
|
|
10
7
|
"jsx": "react-jsx",
|
|
11
8
|
"module": "esnext",
|
|
12
9
|
"moduleResolution": "node",
|
|
@@ -15,15 +12,7 @@
|
|
|
15
12
|
"strict": true,
|
|
16
13
|
"skipLibCheck": true
|
|
17
14
|
},
|
|
18
|
-
"hooks": [
|
|
19
|
-
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
"src",
|
|
23
|
-
"src/**/*.css"
|
|
24
|
-
],
|
|
25
|
-
"exclude": [
|
|
26
|
-
"node_modules",
|
|
27
|
-
"**/__tests__/*"
|
|
28
|
-
]
|
|
29
|
-
}
|
|
15
|
+
"hooks": ["copy-files"],
|
|
16
|
+
"include": ["src", "src/**/*.css"],
|
|
17
|
+
"exclude": ["**/__tests__/*"]
|
|
18
|
+
}
|
|
File without changes
|
|
File without changes
|