@conduction/components 2.0.6 → 2.0.8

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.
Files changed (30) hide show
  1. package/README.md +8 -1
  2. package/lib/components/badgeCounter/BadgeCounter.d.ts +8 -0
  3. package/lib/components/badgeCounter/BadgeCounter.js +4 -0
  4. package/lib/components/badgeCounter/BadgeCounter.module.css +27 -0
  5. package/lib/components/codeBlock/CodeBlock.d.ts +6 -0
  6. package/lib/components/codeBlock/CodeBlock.js +3 -0
  7. package/lib/components/codeBlock/CodeBlock.module.css +6 -0
  8. package/lib/components/toolTip/ToolTip.d.ts +9 -0
  9. package/lib/components/toolTip/ToolTip.js +7 -0
  10. package/lib/components/toolTip/ToolTip.module.css +4 -0
  11. package/lib/components/topNav/primaryTopNav/PrimaryTopNav.d.ts +2 -0
  12. package/lib/components/topNav/primaryTopNav/PrimaryTopNav.js +1 -1
  13. package/lib/components/topNav/primaryTopNav/PrimaryTopNav.module.css +14 -9
  14. package/lib/components/topNav/secondaryTopNav/SecondaryTopNav.d.ts +1 -0
  15. package/lib/components/topNav/secondaryTopNav/SecondaryTopNav.js +1 -1
  16. package/lib/components/topNav/secondaryTopNav/SecondaryTopNav.module.css +10 -5
  17. package/lib/index.d.ts +4 -1
  18. package/lib/index.js +4 -1
  19. package/package.json +3 -2
  20. package/src/components/badgeCounter/BadgeCounter.module.css +27 -0
  21. package/src/components/badgeCounter/BadgeCounter.tsx +16 -0
  22. package/src/components/codeBlock/CodeBlock.module.css +6 -0
  23. package/src/components/codeBlock/CodeBlock.tsx +8 -0
  24. package/src/components/toolTip/ToolTip.module.css +4 -0
  25. package/src/components/toolTip/ToolTip.tsx +24 -0
  26. package/src/components/topNav/primaryTopNav/PrimaryTopNav.module.css +14 -9
  27. package/src/components/topNav/primaryTopNav/PrimaryTopNav.tsx +6 -4
  28. package/src/components/topNav/secondaryTopNav/SecondaryTopNav.module.css +10 -5
  29. package/src/components/topNav/secondaryTopNav/SecondaryTopNav.tsx +3 -3
  30. package/src/index.ts +6 -0
package/README.md CHANGED
@@ -4,7 +4,14 @@
4
4
 
5
5
  - **Version 2**
6
6
 
7
- - 2.0.6:
7
+ - 2.0.8:
8
+ - added new Tooltip component using React-tooltip.
9
+ - added active status to PrimaryTopNav
10
+ - added active status to SecondaryTopNav
11
+ - 2.0.7:
12
+ - Added new BadgeCounter component.
13
+ - Added CodeBlock component.
14
+ - 2.0.6:
8
15
  - Added optional icon with default icon to the primary and secondary button in NotificationPopUp
9
16
  - Added a handleClick function to the DownloadCard;
10
17
  - Added clickFunction, layoutClassName and renamed tag to label in the Tag component;
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ interface BadgeCounterProps {
3
+ number: string;
4
+ children: React.ReactNode;
5
+ layoutClassName?: string;
6
+ }
7
+ export declare const BadgeCounter: React.FC<BadgeCounterProps>;
8
+ export {};
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as styles from "./BadgeCounter.module.css";
3
+ import clsx from "clsx";
4
+ export const BadgeCounter = ({ number, children, layoutClassName }) => (_jsxs("div", { className: styles.content, children: [children, _jsx("span", { className: clsx([layoutClassName && layoutClassName], styles.badge), children: number })] }));
@@ -0,0 +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
+ }
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ interface CodeBlockProps {
3
+ codeBlock: string | JSX.Element;
4
+ }
5
+ export declare const CodeBlock: React.FC<CodeBlockProps>;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as styles from "./CodeBlock.module.css";
3
+ export const CodeBlock = ({ codeBlock }) => _jsx("div", { className: styles.code, children: codeBlock });
@@ -0,0 +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
+ }
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import ReactTooltip from "react-tooltip";
3
+ interface ToolTipProps {
4
+ children: React.ReactNode;
5
+ tooltip: string;
6
+ layoutClassName?: string;
7
+ }
8
+ export declare const ToolTip: React.FC<ToolTipProps>;
9
+ export { ReactTooltip };
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import ReactTooltip from "react-tooltip";
3
+ import * as styles from "./ToolTip.module.css";
4
+ export const ToolTip = ({ children, layoutClassName, tooltip }) => {
5
+ return (_jsxs("div", { className: styles.wrapper, children: [_jsx("div", { "data-tip": tooltip, className: layoutClassName && layoutClassName, children: children }), _jsx(ReactTooltip, { place: "top", type: "dark", effect: "solid" })] }));
6
+ };
7
+ export { ReactTooltip };
@@ -0,0 +1,4 @@
1
+ .wrapper {
2
+ display: inline-block;
3
+ position: relative;
4
+ }
@@ -2,10 +2,12 @@ import * as React from "react";
2
2
  interface ITopNavItem {
3
3
  label: string;
4
4
  icon?: JSX.Element;
5
+ current?: boolean;
5
6
  handleClick?: () => any;
6
7
  subItems?: {
7
8
  label: string;
8
9
  icon?: JSX.Element;
10
+ current?: boolean;
9
11
  handleClick?: () => any;
10
12
  }[];
11
13
  }
@@ -3,5 +3,5 @@ import { Link } from "@gemeente-denhaag/components-react";
3
3
  import * as styles from "./PrimaryTopNav.module.css";
4
4
  import clsx from "clsx";
5
5
  export const PrimaryTopNav = ({ items, layoutClassName }) => {
6
- return (_jsx("div", { className: clsx(styles.primary, layoutClassName && layoutClassName), children: _jsx("nav", { className: styles.primary, children: _jsx("ul", { className: styles.ul, children: items.map(({ label, icon, handleClick, subItems }, idx) => (_jsxs("li", { className: styles.li, children: [_jsx("div", { onClick: handleClick, children: _jsx(Link, { className: styles.link, icon: icon, iconAlign: "start", children: label }) }), subItems && (_jsx("ul", { className: styles.dropdown, children: subItems.map(({ label, icon, handleClick }, idx) => (_jsx("li", { className: styles.li, onClick: handleClick, children: _jsx(Link, { className: styles.link, icon: icon, iconAlign: "start", children: label }) }, idx))) }))] }, idx))) }) }) }));
6
+ return (_jsx("div", { className: clsx(styles.primary, layoutClassName && layoutClassName), children: _jsx("nav", { className: styles.primary, children: _jsx("ul", { className: styles.ul, children: items.map(({ label, icon, current, handleClick, subItems }, idx) => (_jsxs("li", { className: clsx(styles.li, current && styles.current), children: [_jsx("div", { onClick: handleClick, children: _jsx(Link, { className: styles.link, icon: icon, iconAlign: "start", children: label }) }), subItems && (_jsx("ul", { className: styles.dropdown, children: subItems.map(({ label, icon, current, handleClick }, idx) => (_jsx("li", { className: clsx(styles.li, current && styles.current), onClick: handleClick, children: _jsx(Link, { className: styles.link, icon: icon, iconAlign: "start", children: label }) }, idx))) }))] }, idx))) }) }) }));
7
7
  };
@@ -2,8 +2,15 @@
2
2
  --conduction-primary-top-nav-item-padding: var(--skeleton-size-md);
3
3
  --conduction-primary-top-nav-color: var(--skeleton-color-white);
4
4
  --conduction-primary-top-nav-background-color: var(--skeleton-color-secondary-3);
5
- --conduction-primary-top-nav-background-color-hover: var(--skeleton-color-secondary-5);
5
+ --conduction-primary-top-nav-background-color-hover: rgba(255, 255, 255, 0.2);
6
6
  --conduction-primary-top-nav-dropdown-border-radius: var(--skeleton-border-radius-md);
7
+ --conduction-primary-top-nav-background-color-active: rgba(255, 255, 255, 0.2);
8
+ }
9
+
10
+ .primary {
11
+ font-weight: 500;
12
+ width: fit-content;
13
+ background-color: var(--conduction-primary-top-nav-background-color);
7
14
  }
8
15
 
9
16
  .primary:hover {
@@ -23,10 +30,12 @@
23
30
  position: relative;
24
31
  }
25
32
 
26
- .primary {
27
- font-weight: 500;
28
- width: fit-content;
29
- background-color: var(--conduction-primary-top-nav-background-color);
33
+ .li:hover {
34
+ background-color: var(--conduction-primary-top-nav-background-color-hover);
35
+ }
36
+
37
+ .current {
38
+ background-color: var(--conduction-primary-top-nav-background-color-active);
30
39
  }
31
40
 
32
41
  .primary .link {
@@ -38,10 +47,6 @@
38
47
  padding-block-end: var(--conduction-primary-top-nav-item-padding);
39
48
  }
40
49
 
41
- .primary .li:hover {
42
- background-color: var(--conduction-primary-top-nav-background-color-hover);
43
- }
44
-
45
50
  .primary .li:hover .dropdown {
46
51
  display: block;
47
52
  z-index: 1;
@@ -3,6 +3,7 @@ interface TopNavProps {
3
3
  items: {
4
4
  label: string;
5
5
  icon?: JSX.Element;
6
+ current?: boolean;
6
7
  handleClick: () => any;
7
8
  }[];
8
9
  layoutClassName?: string;
@@ -3,5 +3,5 @@ import * as styles from "./SecondaryTopNav.module.css";
3
3
  import { Link } from "@gemeente-denhaag/components-react";
4
4
  import clsx from "clsx";
5
5
  export const SecondaryTopNav = ({ items, layoutClassName }) => {
6
- return (_jsx("div", { className: clsx(styles.secondary, layoutClassName && layoutClassName), children: _jsx("nav", { children: _jsx("ul", { className: styles.ul, children: items.map(({ label, icon, handleClick }, idx) => (_jsx("li", { className: styles.li, onClick: handleClick, children: _jsx(Link, { className: styles.link, icon: icon, iconAlign: "start", children: label }) }, idx))) }) }) }));
6
+ return (_jsx("div", { className: clsx(styles.secondary, layoutClassName && layoutClassName), children: _jsx("nav", { children: _jsx("ul", { className: styles.ul, children: items.map(({ label, icon, current, handleClick }, idx) => (_jsx("li", { className: clsx(styles.li, current && styles.current), onClick: handleClick, children: _jsx(Link, { className: styles.link, icon: icon, iconAlign: "start", children: label }) }, idx))) }) }) }));
7
7
  };
@@ -3,8 +3,9 @@
3
3
  --conduction-secondary-top-nav-font-size: var(--skeleton-font-size-md);
4
4
  --conduction-secondary-top-nav-color: var(--skeleton-color-white);
5
5
  --conduction-secondary-top-nav-background-color: var(--skeleton-color-secondary-5);
6
- --conduction-secondary-top-nav-background-color-hover: var(--skeleton-color-secondary-3);
6
+ --conduction-secondary-top-nav-background-color-hover: rgba(0, 0, 0, 0.1);
7
7
  --conduction-secondary-top-nav-font-weight: var(--skeleton-font-weight-light);
8
+ --conduction-secondary-top-nav-color-active: rgba(0, 0, 0, 0.1);
8
9
  }
9
10
 
10
11
  .secondary:hover {
@@ -27,6 +28,14 @@
27
28
  padding-block-end: var(--conduction-secondary-top-nav-item-padding);
28
29
  }
29
30
 
31
+ .li:hover {
32
+ background-color: var(--conduction-secondary-top-nav-background-color-hover);
33
+ }
34
+
35
+ .current {
36
+ background-color: var(--conduction-secondary-top-nav-color-active);
37
+ }
38
+
30
39
  .secondary {
31
40
  font-weight: var(--conduction-secondary-top-nav-font-weight);
32
41
  width: fit-content;
@@ -37,7 +46,3 @@
37
46
  .secondary .link {
38
47
  color: var(--conduction-secondary-top-nav-color);
39
48
  }
40
-
41
- .secondary .li:hover {
42
- background-color: var(--conduction-secondary-top-nav-background-color-hover);
43
- }
package/lib/index.d.ts CHANGED
@@ -21,4 +21,7 @@ declare const NotificationPopUp: {
21
21
  };
22
22
  import { QuoteWrapper } from "./components/quoteWrapper/QuoteWrapper";
23
23
  import { Pagination } from "./components/denhaag-wrappers/pagination/Pagination";
24
- export { InputRadio, DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, InfoCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, InputFile, Textarea, InputCheckbox, SelectMultiple, SelectSingle, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, QuoteWrapper, Pagination, };
24
+ import { BadgeCounter } from "./components/badgeCounter/BadgeCounter";
25
+ import { CodeBlock } from "./components/codeBlock/CodeBlock";
26
+ import { ToolTip } from "./components/toolTip/ToolTip";
27
+ export { InputRadio, DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, InfoCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, InputFile, Textarea, InputCheckbox, SelectMultiple, SelectSingle, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, QuoteWrapper, Pagination, BadgeCounter, CodeBlock, ToolTip, };
package/lib/index.js CHANGED
@@ -14,4 +14,7 @@ import { NotificationPopUpController, NotificationPopUp as _NotificationPopUp, }
14
14
  const NotificationPopUp = { controller: NotificationPopUpController, NotificationPopUp: _NotificationPopUp };
15
15
  import { QuoteWrapper } from "./components/quoteWrapper/QuoteWrapper";
16
16
  import { Pagination } from "./components/denhaag-wrappers/pagination/Pagination";
17
- export { InputRadio, DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, InfoCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, InputFile, Textarea, InputCheckbox, SelectMultiple, SelectSingle, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, QuoteWrapper, Pagination, };
17
+ import { BadgeCounter } from "./components/badgeCounter/BadgeCounter";
18
+ import { CodeBlock } from "./components/codeBlock/CodeBlock";
19
+ import { ToolTip } from "./components/toolTip/ToolTip";
20
+ export { InputRadio, DownloadCard, HorizontalImageCard, ImageAndDetailsCard, RichContentCard, DetailsCard, InfoCard, Container, Breadcrumbs, EditableTableRow, InputText, InputPassword, InputEmail, InputDate, InputNumber, InputFile, Textarea, InputCheckbox, SelectMultiple, SelectSingle, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, StatusSteps, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, QuoteWrapper, Pagination, BadgeCounter, CodeBlock, ToolTip, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduction/components",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -30,7 +30,8 @@
30
30
  "gatsby": "^4.11.1",
31
31
  "react": "^17.0.1",
32
32
  "react-hook-form": "7.29.0",
33
- "react-select": "5.3.2"
33
+ "react-select": "5.3.2",
34
+ "react-tooltip": "^4.2.21"
34
35
  },
35
36
  "devDependencies": {
36
37
  "@types/node": "^17.0.23",
@@ -0,0 +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
+ }
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ import * as styles from "./BadgeCounter.module.css";
3
+ import clsx from "clsx";
4
+
5
+ interface BadgeCounterProps {
6
+ number: string;
7
+ children: React.ReactNode;
8
+ layoutClassName?: string;
9
+ }
10
+
11
+ export const BadgeCounter: React.FC<BadgeCounterProps> = ({ number, children, layoutClassName }) => (
12
+ <div className={styles.content}>
13
+ {children}
14
+ <span className={clsx([layoutClassName && layoutClassName], styles.badge)}>{number}</span>
15
+ </div>
16
+ );
@@ -0,0 +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
+ }
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import * as styles from "./CodeBlock.module.css";
3
+
4
+ interface CodeBlockProps {
5
+ codeBlock: string | JSX.Element;
6
+ }
7
+
8
+ export const CodeBlock: React.FC<CodeBlockProps> = ({ codeBlock }) => <div className={styles.code}>{codeBlock}</div>;
@@ -0,0 +1,4 @@
1
+ .wrapper {
2
+ display: inline-block;
3
+ position: relative;
4
+ }
@@ -0,0 +1,24 @@
1
+ import _ from "lodash";
2
+ import * as React from "react";
3
+ import ReactTooltip from "react-tooltip";
4
+ import * as styles from "./ToolTip.module.css";
5
+
6
+ interface ToolTipProps {
7
+ children: React.ReactNode;
8
+ tooltip: string;
9
+ layoutClassName?: string;
10
+ }
11
+
12
+ export const ToolTip: React.FC<ToolTipProps> = ({ children, layoutClassName, tooltip }) => {
13
+ return (
14
+ <div className={styles.wrapper}>
15
+ <div data-tip={tooltip} className={layoutClassName && layoutClassName}>
16
+ {children}
17
+ </div>
18
+
19
+ <ReactTooltip place={"top"} type={"dark"} effect={"solid"} />
20
+ </div>
21
+ );
22
+ };
23
+
24
+ export { ReactTooltip };
@@ -2,8 +2,15 @@
2
2
  --conduction-primary-top-nav-item-padding: var(--skeleton-size-md);
3
3
  --conduction-primary-top-nav-color: var(--skeleton-color-white);
4
4
  --conduction-primary-top-nav-background-color: var(--skeleton-color-secondary-3);
5
- --conduction-primary-top-nav-background-color-hover: var(--skeleton-color-secondary-5);
5
+ --conduction-primary-top-nav-background-color-hover: rgba(255, 255, 255, 0.2);
6
6
  --conduction-primary-top-nav-dropdown-border-radius: var(--skeleton-border-radius-md);
7
+ --conduction-primary-top-nav-background-color-active: rgba(255, 255, 255, 0.2);
8
+ }
9
+
10
+ .primary {
11
+ font-weight: 500;
12
+ width: fit-content;
13
+ background-color: var(--conduction-primary-top-nav-background-color);
7
14
  }
8
15
 
9
16
  .primary:hover {
@@ -23,10 +30,12 @@
23
30
  position: relative;
24
31
  }
25
32
 
26
- .primary {
27
- font-weight: 500;
28
- width: fit-content;
29
- background-color: var(--conduction-primary-top-nav-background-color);
33
+ .li:hover {
34
+ background-color: var(--conduction-primary-top-nav-background-color-hover);
35
+ }
36
+
37
+ .current {
38
+ background-color: var(--conduction-primary-top-nav-background-color-active);
30
39
  }
31
40
 
32
41
  .primary .link {
@@ -38,10 +47,6 @@
38
47
  padding-block-end: var(--conduction-primary-top-nav-item-padding);
39
48
  }
40
49
 
41
- .primary .li:hover {
42
- background-color: var(--conduction-primary-top-nav-background-color-hover);
43
- }
44
-
45
50
  .primary .li:hover .dropdown {
46
51
  display: block;
47
52
  z-index: 1;
@@ -6,10 +6,12 @@ import clsx from "clsx";
6
6
  interface ITopNavItem {
7
7
  label: string;
8
8
  icon?: JSX.Element;
9
+ current?: boolean;
9
10
  handleClick?: () => any;
10
11
  subItems?: {
11
12
  label: string;
12
13
  icon?: JSX.Element;
14
+ current?: boolean;
13
15
  handleClick?: () => any;
14
16
  }[];
15
17
  }
@@ -24,8 +26,8 @@ export const PrimaryTopNav: React.FC<TopNavProps> = ({ items, layoutClassName })
24
26
  <div className={clsx(styles.primary, layoutClassName && layoutClassName)}>
25
27
  <nav className={styles.primary}>
26
28
  <ul className={styles.ul}>
27
- {items.map(({ label, icon, handleClick, subItems }, idx) => (
28
- <li className={styles.li} key={idx}>
29
+ {items.map(({ label, icon, current, handleClick, subItems }, idx) => (
30
+ <li className={clsx(styles.li, current && styles.current)} key={idx}>
29
31
  <div onClick={handleClick}>
30
32
  <Link className={styles.link} icon={icon} iconAlign="start">
31
33
  {label}
@@ -34,8 +36,8 @@ export const PrimaryTopNav: React.FC<TopNavProps> = ({ items, layoutClassName })
34
36
 
35
37
  {subItems && (
36
38
  <ul className={styles.dropdown}>
37
- {subItems.map(({ label, icon, handleClick }, idx) => (
38
- <li key={idx} className={styles.li} onClick={handleClick}>
39
+ {subItems.map(({ label, icon, current, handleClick }, idx) => (
40
+ <li key={idx} className={clsx(styles.li, current && styles.current)} onClick={handleClick}>
39
41
  <Link className={styles.link} icon={icon} iconAlign="start">
40
42
  {label}
41
43
  </Link>
@@ -3,8 +3,9 @@
3
3
  --conduction-secondary-top-nav-font-size: var(--skeleton-font-size-md);
4
4
  --conduction-secondary-top-nav-color: var(--skeleton-color-white);
5
5
  --conduction-secondary-top-nav-background-color: var(--skeleton-color-secondary-5);
6
- --conduction-secondary-top-nav-background-color-hover: var(--skeleton-color-secondary-3);
6
+ --conduction-secondary-top-nav-background-color-hover: rgba(0, 0, 0, 0.1);
7
7
  --conduction-secondary-top-nav-font-weight: var(--skeleton-font-weight-light);
8
+ --conduction-secondary-top-nav-color-active: rgba(0, 0, 0, 0.1);
8
9
  }
9
10
 
10
11
  .secondary:hover {
@@ -27,6 +28,14 @@
27
28
  padding-block-end: var(--conduction-secondary-top-nav-item-padding);
28
29
  }
29
30
 
31
+ .li:hover {
32
+ background-color: var(--conduction-secondary-top-nav-background-color-hover);
33
+ }
34
+
35
+ .current {
36
+ background-color: var(--conduction-secondary-top-nav-color-active);
37
+ }
38
+
30
39
  .secondary {
31
40
  font-weight: var(--conduction-secondary-top-nav-font-weight);
32
41
  width: fit-content;
@@ -37,7 +46,3 @@
37
46
  .secondary .link {
38
47
  color: var(--conduction-secondary-top-nav-color);
39
48
  }
40
-
41
- .secondary .li:hover {
42
- background-color: var(--conduction-secondary-top-nav-background-color-hover);
43
- }
@@ -4,7 +4,7 @@ import { Link } from "@gemeente-denhaag/components-react";
4
4
  import clsx from "clsx";
5
5
 
6
6
  interface TopNavProps {
7
- items: { label: string; icon?: JSX.Element; handleClick: () => any }[];
7
+ items: { label: string; icon?: JSX.Element; current?: boolean; handleClick: () => any }[];
8
8
  layoutClassName?: string;
9
9
  }
10
10
 
@@ -13,8 +13,8 @@ export const SecondaryTopNav: React.FC<TopNavProps> = ({ items, layoutClassName
13
13
  <div className={clsx(styles.secondary, layoutClassName && layoutClassName)}>
14
14
  <nav>
15
15
  <ul className={styles.ul}>
16
- {items.map(({ label, icon, handleClick }, idx) => (
17
- <li className={styles.li} key={idx} onClick={handleClick}>
16
+ {items.map(({ label, icon, current, handleClick }, idx) => (
17
+ <li className={clsx(styles.li, current && styles.current)} key={idx} onClick={handleClick}>
18
18
  <Link className={styles.link} icon={icon} iconAlign="start">
19
19
  {label}
20
20
  </Link>
package/src/index.ts CHANGED
@@ -36,6 +36,9 @@ import {
36
36
  const NotificationPopUp = { controller: NotificationPopUpController, NotificationPopUp: _NotificationPopUp };
37
37
  import { QuoteWrapper } from "./components/quoteWrapper/QuoteWrapper";
38
38
  import { Pagination } from "./components/denhaag-wrappers/pagination/Pagination";
39
+ import { BadgeCounter } from "./components/badgeCounter/BadgeCounter";
40
+ import { CodeBlock } from "./components/codeBlock/CodeBlock";
41
+ import { ToolTip } from "./components/toolTip/ToolTip";
39
42
 
40
43
  export {
41
44
  InputRadio,
@@ -70,4 +73,7 @@ export {
70
73
  NotificationPopUp,
71
74
  QuoteWrapper,
72
75
  Pagination,
76
+ BadgeCounter,
77
+ CodeBlock,
78
+ ToolTip,
73
79
  };