@conduction/components 2.1.30 → 2.1.31

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 CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  - **Version 2.1 (breaking changes from 2.0.x)**
6
6
 
7
+ - 2.1.31: Removed Den Haag implementations which hold shapeRendering warnings.
7
8
  - 2.1.29/2.1.30: Added optional menuPlacement to all select elements.
8
9
  - 2.1.28: Fixed PrimaryTopNav dropdown token and added new features for dropdown.
9
10
  - 2.1.27: TimeFormat in DatePicker is now consistant with DateFormat.
@@ -1,10 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as styles from "./DetailsCard.module.css";
3
+ import { Link } from "@utrecht/component-library-react/dist/css-module";
3
4
  import clsx from "clsx";
4
- import { Link } from "@gemeente-denhaag/link";
5
5
  import { navigate } from "gatsby";
6
- import { ArrowRightIcon } from "@gemeente-denhaag/icons";
7
6
  import { Tag } from "../../tag/Tag";
7
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
8
+ import { faArrowRight } from "@fortawesome/free-solid-svg-icons";
8
9
  export const DetailsCard = ({ title, subHeader, introduction, link, tags, layoutClassName, }) => {
9
- return (_jsx("div", { className: clsx(styles.container, [layoutClassName && layoutClassName]), onClick: () => navigate(link.href), children: _jsxs("div", { className: styles.content, children: [_jsxs("div", { children: [_jsx("div", { className: styles.title, children: title }), _jsx("span", { className: styles.subHeader, children: subHeader })] }), tags && (_jsx("div", { className: styles.tags, children: tags.map((tag, idx) => (_jsx(Tag, { label: tag }, idx))) })), _jsx("div", { className: styles.introduction, children: introduction }), _jsx("div", { className: styles.link, children: _jsx(Link, { icon: _jsx(ArrowRightIcon, {}), iconAlign: "start", children: link.label }) })] }) }));
10
+ return (_jsx("div", { className: clsx(styles.container, [layoutClassName && layoutClassName]), onClick: () => navigate(link.href), children: _jsxs("div", { className: styles.content, children: [_jsxs("div", { children: [_jsx("div", { className: styles.title, children: title }), _jsx("span", { className: styles.subHeader, children: subHeader })] }), tags && (_jsx("div", { className: styles.tags, children: tags.map((tag, idx) => (_jsx(Tag, { label: tag }, idx))) })), _jsx("div", { className: styles.introduction, children: introduction }), _jsx("div", { className: styles.link, children: _jsxs(Link, { onClick: () => navigate(link.href), children: [_jsx(FontAwesomeIcon, { className: styles.icon, icon: faArrowRight }), " ", link.label] }) })] }) }));
10
11
  };
@@ -1,6 +1,7 @@
1
1
  :root {
2
2
  --conduction-details-card-border: 1px solid var(--skeleton-color-grey-2);
3
3
  --conduction-details-card-introduction-lines-clamp: 3;
4
+ --conduction-details-card-icon-gap: 8px;
4
5
  }
5
6
 
6
7
  .container {
@@ -49,3 +50,7 @@
49
50
  display: flex;
50
51
  justify-content: flex-end;
51
52
  }
53
+
54
+ .icon {
55
+ margin-inline-end: var(--conduction-details-card-icon-gap);
56
+ }
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as styles from "./DownloadCard.module.css";
3
- import { DownloadIcon } from "@gemeente-denhaag/icons";
4
- import { Link } from "@gemeente-denhaag/link";
3
+ import { Link } from "@utrecht/component-library-react/dist/css-module";
5
4
  import clsx from "clsx";
5
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
6
+ import { faDownload } from "@fortawesome/free-solid-svg-icons";
6
7
  export const DownloadCard = ({ icon, label, sizeKb, layoutClassName, downloadLabel, handleClick, }) => {
7
- return (_jsxs("div", { className: clsx(styles.container, [layoutClassName && layoutClassName]), children: [_jsxs("div", { className: styles.content, children: [_jsx("div", { className: styles.icon, children: icon }), _jsxs("div", { children: [label, " (", sizeKb, "kb)"] })] }), _jsx("div", { onClick: handleClick, children: _jsx(Link, { icon: _jsx(DownloadIcon, {}), iconAlign: "start", children: downloadLabel }) })] }));
8
+ return (_jsxs("div", { className: clsx(styles.container, [layoutClassName && layoutClassName]), children: [_jsxs("div", { className: styles.content, children: [_jsx("div", { className: styles.icon, children: icon }), _jsxs("div", { children: [label, " (", sizeKb, "kb)"] })] }), _jsxs(Link, { onClick: handleClick, children: [_jsx(FontAwesomeIcon, { className: styles.icon, icon: faDownload }), " ", downloadLabel] })] }));
8
9
  };
@@ -1,5 +1,7 @@
1
1
  :root {
2
2
  --conduction-download-card-border: 1px solid var(--skeleton-color-grey-2);
3
+ --conduction-download-card-icon-gap: 8px;
4
+ --conduction-download-card-padding: 14px;
3
5
  }
4
6
 
5
7
  .container {
@@ -8,7 +10,7 @@
8
10
  justify-content: space-between;
9
11
  border: var(--conduction-download-card-border);
10
12
  border-radius: var(--skeleton-border-radius-md);
11
- padding-inline-end: var(--skeleton-size-sm);
13
+ padding: var(--conduction-download-card-padding);
12
14
  }
13
15
 
14
16
  .content {
@@ -21,7 +23,5 @@
21
23
  }
22
24
 
23
25
  .icon {
24
- padding-inline: var(--skeleton-size-sm);
25
- padding-block: var(--skeleton-size-sm);
26
- background-color: var(--skeleton-color-grey-1);
26
+ margin-inline-end: var(--conduction-download-card-icon-gap);
27
27
  }
@@ -1,9 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as styles from "./ImageAndDetailsCard.module.css";
3
3
  import clsx from "clsx";
4
- import { Link } from "@gemeente-denhaag/link";
4
+ import { Link } from "@utrecht/component-library-react/dist/css-module";
5
5
  import { navigate } from "gatsby";
6
- import { ArrowRightIcon } from "@gemeente-denhaag/icons";
6
+ import { faArrowRight } from "@fortawesome/free-solid-svg-icons";
7
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
7
8
  export const ImageAndDetailsCard = ({ image, title, subHeader, introduction, link, layoutClassName, }) => {
8
- return (_jsxs("div", { className: clsx(styles.container, [layoutClassName && layoutClassName]), onClick: () => navigate(link.href), children: [_jsx("div", { className: styles.image, children: image }), _jsxs("div", { className: styles.content, children: [_jsxs("div", { children: [_jsx("div", { className: styles.title, children: title }), _jsx("span", { className: styles.subHeader, children: subHeader })] }), _jsx("div", { className: styles.introduction, children: introduction }), _jsx("div", { className: styles.link, children: _jsx(Link, { icon: _jsx(ArrowRightIcon, {}), iconAlign: "start", children: link.label }) })] })] }));
9
+ return (_jsxs("div", { className: clsx(styles.container, [layoutClassName && layoutClassName]), onClick: () => navigate(link.href), children: [_jsx("div", { className: styles.image, children: image }), _jsxs("div", { className: styles.content, children: [_jsxs("div", { children: [_jsx("div", { className: styles.title, children: title }), _jsx("span", { className: styles.subHeader, children: subHeader })] }), _jsx("div", { className: styles.introduction, children: introduction }), _jsx("div", { className: styles.link, children: _jsxs(Link, { onClick: () => navigate(link.href), children: [_jsx(FontAwesomeIcon, { className: styles.icon, icon: faArrowRight }), " ", link.label] }) })] })] }));
9
10
  };
@@ -3,6 +3,7 @@
3
3
  --conduction-image-and-details-card-title-font-weight: bold;
4
4
  --conduction-image-and-details-card-introduction-lines-clamp: 3;
5
5
  --conduction-image-and-details-card-border: 1px solid var(--skeleton-color-grey-2);
6
+ --conduction-image-and-details-icon-gap: 8px;
6
7
  }
7
8
 
8
9
  .container {
@@ -61,3 +62,7 @@
61
62
  justify-content: flex-end;
62
63
  margin-block-start: auto;
63
64
  }
65
+
66
+ .icon {
67
+ margin-inline-end: var(--conduction-image-and-details-icon-gap);
68
+ }
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { Control, FieldValues } from "react-hook-form";
3
+ import { MenuPlacement } from "react-select";
3
4
  import { IReactHookFormProps } from "../types";
4
5
  interface ISelectProps {
5
6
  control: Control<FieldValues, any>;
@@ -13,7 +14,7 @@ interface ISelectProps {
13
14
  disabled?: boolean;
14
15
  isClearable?: boolean;
15
16
  hideErrorMessage?: boolean;
16
- menuPlacement?: "auto" | "bottom" | "top";
17
+ menuPlacement?: MenuPlacement;
17
18
  }
18
19
  export declare const SelectMultiple: ({ id, name, options, errors, control, validation, defaultValue, disabled, hideErrorMessage, menuPlacement, }: ISelectProps & IReactHookFormProps) => JSX.Element;
19
20
  export declare const SelectCreate: ({ id, name, options, errors, control, validation, defaultValue, disabled, hideErrorMessage, menuPlacement, }: ISelectProps & IReactHookFormProps) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduction/components",
3
- "version": "2.1.30",
3
+ "version": "2.1.31",
4
4
  "description": "React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -24,18 +24,19 @@
24
24
  "@fortawesome/free-solid-svg-icons": "^6.2.0",
25
25
  "@fortawesome/react-fontawesome": "^0.2.0",
26
26
  "@gemeente-denhaag/button": "0.2.3-alpha.205",
27
- "@gemeente-denhaag/link": "0.2.3-alpha.205",
28
- "@gemeente-denhaag/divider": "0.2.3-alpha.205",
29
- "@gemeente-denhaag/textfield": "0.2.3-alpha.205",
30
- "@gemeente-denhaag/typography": "0.2.3-alpha.205",
31
- "@gemeente-denhaag/stylesprovider": "0.1.1-alpha.222",
32
27
  "@gemeente-denhaag/design-tokens-components": "0.2.3-alpha.222",
28
+ "@gemeente-denhaag/divider": "0.2.3-alpha.205",
33
29
  "@gemeente-denhaag/form-field": "0.1.1-alpha.98",
34
30
  "@gemeente-denhaag/formcontrollabel": "0.2.3-alpha.222",
31
+ "@gemeente-denhaag/link": "0.2.3-alpha.205",
35
32
  "@gemeente-denhaag/process-steps": "0.1.0-alpha.51",
36
33
  "@gemeente-denhaag/sidenav": "0.1.0-alpha.40",
34
+ "@gemeente-denhaag/stylesprovider": "0.1.1-alpha.222",
37
35
  "@gemeente-denhaag/table": "0.1.1-alpha.123",
38
36
  "@gemeente-denhaag/textarea": "0.1.1-alpha.95",
37
+ "@gemeente-denhaag/textfield": "0.2.3-alpha.205",
38
+ "@gemeente-denhaag/typography": "0.2.3-alpha.205",
39
+ "@utrecht/component-library-react": "^1.0.0-alpha.319",
39
40
  "clsx": "^1.1.1",
40
41
  "gatsby": "^4.11.1",
41
42
  "react": "^17.0.1",
@@ -1,6 +1,7 @@
1
1
  :root {
2
2
  --conduction-details-card-border: 1px solid var(--skeleton-color-grey-2);
3
3
  --conduction-details-card-introduction-lines-clamp: 3;
4
+ --conduction-details-card-icon-gap: 8px;
4
5
  }
5
6
 
6
7
  .container {
@@ -49,3 +50,7 @@
49
50
  display: flex;
50
51
  justify-content: flex-end;
51
52
  }
53
+
54
+ .icon {
55
+ margin-inline-end: var(--conduction-details-card-icon-gap);
56
+ }
@@ -1,10 +1,11 @@
1
1
  import * as React from "react";
2
2
  import * as styles from "./DetailsCard.module.css";
3
+ import { Link } from "@utrecht/component-library-react/dist/css-module";
3
4
  import clsx from "clsx";
4
- import { Link } from "@gemeente-denhaag/link";
5
5
  import { navigate } from "gatsby";
6
- import { ArrowRightIcon } from "@gemeente-denhaag/icons";
7
6
  import { Tag } from "../../tag/Tag";
7
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
8
+ import { faArrowRight } from "@fortawesome/free-solid-svg-icons";
8
9
 
9
10
  interface DetailsCardProps {
10
11
  title: string;
@@ -46,8 +47,8 @@ export const DetailsCard = ({
46
47
  <div className={styles.introduction}>{introduction}</div>
47
48
 
48
49
  <div className={styles.link}>
49
- <Link icon={<ArrowRightIcon />} iconAlign="start">
50
- {link.label}
50
+ <Link onClick={() => navigate(link.href)}>
51
+ <FontAwesomeIcon className={styles.icon} icon={faArrowRight} /> {link.label}
51
52
  </Link>
52
53
  </div>
53
54
  </div>
@@ -1,5 +1,7 @@
1
1
  :root {
2
2
  --conduction-download-card-border: 1px solid var(--skeleton-color-grey-2);
3
+ --conduction-download-card-icon-gap: 8px;
4
+ --conduction-download-card-padding: 14px;
3
5
  }
4
6
 
5
7
  .container {
@@ -8,7 +10,7 @@
8
10
  justify-content: space-between;
9
11
  border: var(--conduction-download-card-border);
10
12
  border-radius: var(--skeleton-border-radius-md);
11
- padding-inline-end: var(--skeleton-size-sm);
13
+ padding: var(--conduction-download-card-padding);
12
14
  }
13
15
 
14
16
  .content {
@@ -21,7 +23,5 @@
21
23
  }
22
24
 
23
25
  .icon {
24
- padding-inline: var(--skeleton-size-sm);
25
- padding-block: var(--skeleton-size-sm);
26
- background-color: var(--skeleton-color-grey-1);
26
+ margin-inline-end: var(--conduction-download-card-icon-gap);
27
27
  }
@@ -1,8 +1,9 @@
1
1
  import * as React from "react";
2
2
  import * as styles from "./DownloadCard.module.css";
3
- import { DownloadIcon } from "@gemeente-denhaag/icons";
4
- import { Link } from "@gemeente-denhaag/link";
3
+ import { Link } from "@utrecht/component-library-react/dist/css-module";
5
4
  import clsx from "clsx";
5
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
6
+ import { faDownload } from "@fortawesome/free-solid-svg-icons";
6
7
 
7
8
  interface DownloadCardProps {
8
9
  icon: JSX.Element;
@@ -30,11 +31,10 @@ export const DownloadCard = ({
30
31
  {label} ({sizeKb}kb)
31
32
  </div>
32
33
  </div>
33
- <div onClick={handleClick}>
34
- <Link icon={<DownloadIcon />} iconAlign="start">
35
- {downloadLabel}
36
- </Link>
37
- </div>
34
+
35
+ <Link onClick={handleClick}>
36
+ <FontAwesomeIcon className={styles.icon} icon={faDownload} /> {downloadLabel}
37
+ </Link>
38
38
  </div>
39
39
  );
40
40
  };
@@ -3,6 +3,7 @@
3
3
  --conduction-image-and-details-card-title-font-weight: bold;
4
4
  --conduction-image-and-details-card-introduction-lines-clamp: 3;
5
5
  --conduction-image-and-details-card-border: 1px solid var(--skeleton-color-grey-2);
6
+ --conduction-image-and-details-icon-gap: 8px;
6
7
  }
7
8
 
8
9
  .container {
@@ -61,3 +62,7 @@
61
62
  justify-content: flex-end;
62
63
  margin-block-start: auto;
63
64
  }
65
+
66
+ .icon {
67
+ margin-inline-end: var(--conduction-image-and-details-icon-gap);
68
+ }
@@ -1,9 +1,10 @@
1
1
  import * as React from "react";
2
2
  import * as styles from "./ImageAndDetailsCard.module.css";
3
3
  import clsx from "clsx";
4
- import { Link } from "@gemeente-denhaag/link";
4
+ import { Link } from "@utrecht/component-library-react/dist/css-module";
5
5
  import { navigate } from "gatsby";
6
- import { ArrowRightIcon } from "@gemeente-denhaag/icons";
6
+ import { faArrowRight } from "@fortawesome/free-solid-svg-icons";
7
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
7
8
 
8
9
  interface ImageAndDetailsCardProps {
9
10
  title: string;
@@ -39,8 +40,8 @@ export const ImageAndDetailsCard = ({
39
40
  <div className={styles.introduction}>{introduction}</div>
40
41
 
41
42
  <div className={styles.link}>
42
- <Link icon={<ArrowRightIcon />} iconAlign="start">
43
- {link.label}
43
+ <Link onClick={() => navigate(link.href)}>
44
+ <FontAwesomeIcon className={styles.icon} icon={faArrowRight} /> {link.label}
44
45
  </Link>
45
46
  </div>
46
47
  </div>
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import * as styles from "./select.module.css";
3
3
  import { Control, Controller, FieldValues } from "react-hook-form";
4
- import ReactSelect from "react-select";
4
+ import ReactSelect, { MenuPlacement } from "react-select";
5
5
  import CreatableSelect from "react-select/creatable";
6
6
  import { IReactHookFormProps } from "../types";
7
7
  import clsx from "clsx";
@@ -16,7 +16,7 @@ interface ISelectProps {
16
16
  disabled?: boolean;
17
17
  isClearable?: boolean;
18
18
  hideErrorMessage?: boolean;
19
- menuPlacement?: "auto" | "bottom" | "top";
19
+ menuPlacement?: MenuPlacement;
20
20
  }
21
21
 
22
22
  export const SelectMultiple = ({