@kickstartds/ds-agency-premium 1.3.49 → 1.3.50--canary.663.b100f6e.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{FooterProps-10c950a6.d.ts → FooterProps-22e0307b.d.ts} +6 -0
- package/dist/{HeaderProps-7be94a61.d.ts → HeaderProps-dd2071a8.d.ts} +16 -2
- package/dist/components/blog-post/index.d.ts +1 -1
- package/dist/components/footer/footer.schema.dereffed.json +36 -2
- package/dist/components/footer/index.d.ts +1 -1
- package/dist/components/header/header.css +3 -1
- package/dist/components/header/header.schema.dereffed.json +44 -6
- package/dist/components/header/header.schema.json +5 -3
- package/dist/components/header/index.d.ts +1 -1
- package/dist/components/header/index.js +10 -6
- package/dist/components/image/image.css +3 -3
- package/dist/components/index/index.d.ts +3 -3
- package/dist/components/nav-dropdown/index.d.ts +23 -0
- package/dist/components/nav-dropdown/index.js +9 -0
- package/dist/components/nav-flyout/index.d.ts +8 -0
- package/dist/components/nav-flyout/index.js +15 -0
- package/dist/components/nav-flyout/nav-flyout.css +63 -0
- package/dist/components/nav-main/index.d.ts +33 -7
- package/dist/components/nav-main/index.js +14 -14
- package/dist/components/nav-main/nav-main.schema.dereffed.json +70 -2
- package/dist/components/nav-main/nav-main.schema.json +52 -3
- package/dist/components/nav-toggle/index.d.ts +3 -0
- package/dist/components/nav-toggle/index.js +6 -0
- package/dist/components/nav-topbar/index.d.ts +7 -0
- package/dist/components/nav-topbar/index.js +12 -0
- package/dist/components/nav-topbar/nav-topbar.css +139 -0
- package/dist/components/page-wrapper/tokens.css +1 -1
- package/dist/components/presets.json +29 -4
- package/dist/components/settings/settings.schema.dereffed.json +80 -8
- package/dist/tokens/themes.css +4 -4
- package/dist/tokens/tokens.css +1 -1
- package/dist/tokens/tokens.js +1 -1
- package/package.json +1 -1
- package/dist/components/nav-main/nav-main.css +0 -194
- /package/dist/{BlogPostProps-e1cbd5d3.d.ts → BlogPostProps-440f88a5.d.ts} +0 -0
- /package/dist/components/{nav-main → nav}/js/NavToggle.client.d.ts +0 -0
- /package/dist/components/{nav-main → nav}/js/NavToggle.client.js +0 -0
- /package/dist/components/{nav-main → nav}/js/body.client.d.ts +0 -0
- /package/dist/components/{nav-main → nav}/js/body.client.js +0 -0
- /package/dist/components/{nav-main → nav}/js/navMainEvents.client.d.ts +0 -0
- /package/dist/components/{nav-main → nav}/js/navMainEvents.client.js +0 -0
- /package/dist/components/{nav-main → nav-toggle}/nav-toggle.css +0 -0
|
@@ -27,6 +27,10 @@ type Height = number;
|
|
|
27
27
|
* Toggle the inversion of the flyout navigation
|
|
28
28
|
*/
|
|
29
29
|
type FlyoutInverted = boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Toggle the inversion of the dropdown navigation
|
|
32
|
+
*/
|
|
33
|
+
type DropdownInverted = boolean;
|
|
30
34
|
/**
|
|
31
35
|
* Make the header float over the first Section
|
|
32
36
|
*/
|
|
@@ -35,15 +39,25 @@ type Floating = boolean;
|
|
|
35
39
|
* Invert the color scheme of the header
|
|
36
40
|
*/
|
|
37
41
|
type Inverted = boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Header layered on top by the CMS
|
|
44
|
+
*/
|
|
38
45
|
interface HeaderProps {
|
|
39
|
-
logo
|
|
46
|
+
logo?: Logo;
|
|
40
47
|
flyoutInverted?: FlyoutInverted;
|
|
48
|
+
dropdownInverted?: DropdownInverted;
|
|
41
49
|
floating?: Floating;
|
|
42
50
|
inverted?: Inverted;
|
|
43
51
|
navItems?: {
|
|
44
52
|
href: string;
|
|
45
53
|
label: string;
|
|
46
54
|
active?: boolean;
|
|
55
|
+
items?: {
|
|
56
|
+
href?: string;
|
|
57
|
+
id?: string;
|
|
58
|
+
label?: string;
|
|
59
|
+
active?: boolean;
|
|
60
|
+
}[];
|
|
47
61
|
}[];
|
|
48
62
|
}
|
|
49
63
|
interface Logo {
|
|
@@ -54,4 +68,4 @@ interface Logo {
|
|
|
54
68
|
width?: Width;
|
|
55
69
|
height?: Height;
|
|
56
70
|
}
|
|
57
|
-
export { Source, Source1, AltText, Width, Height, FlyoutInverted, Floating, Inverted, HeaderProps, Logo };
|
|
71
|
+
export { Source, Source1, AltText, Width, Height, FlyoutInverted, DropdownInverted, Floating, Inverted, HeaderProps, Logo };
|
|
@@ -77,6 +77,28 @@
|
|
|
77
77
|
},
|
|
78
78
|
"active": {
|
|
79
79
|
"type": "boolean"
|
|
80
|
+
},
|
|
81
|
+
"items": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"items": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"properties": {
|
|
86
|
+
"href": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"format": "uri"
|
|
89
|
+
},
|
|
90
|
+
"id": {
|
|
91
|
+
"type": "string"
|
|
92
|
+
},
|
|
93
|
+
"label": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"active": {
|
|
97
|
+
"type": "boolean"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"additionalProperties": false
|
|
101
|
+
}
|
|
80
102
|
}
|
|
81
103
|
},
|
|
82
104
|
"additionalProperties": false,
|
|
@@ -88,8 +110,20 @@
|
|
|
88
110
|
"examples": [
|
|
89
111
|
[
|
|
90
112
|
{
|
|
91
|
-
"label": "Nav
|
|
92
|
-
"href": "#"
|
|
113
|
+
"label": "Nav With Children",
|
|
114
|
+
"href": "#",
|
|
115
|
+
"items": [
|
|
116
|
+
{
|
|
117
|
+
"label": "TEST1",
|
|
118
|
+
"href": "#",
|
|
119
|
+
"id": "TEST1"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"label": "TEST2",
|
|
123
|
+
"href": "#",
|
|
124
|
+
"id": "TEST2"
|
|
125
|
+
}
|
|
126
|
+
]
|
|
93
127
|
},
|
|
94
128
|
{
|
|
95
129
|
"label": "Active Item",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "http://schema.mydesignsystem.com/header.schema.json",
|
|
4
4
|
"title": "Header",
|
|
5
|
+
"description": "Header layered on top by the CMS",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"properties": {
|
|
7
8
|
"logo": {
|
|
@@ -57,6 +58,12 @@
|
|
|
57
58
|
"description": "Toggle the inversion of the flyout navigation",
|
|
58
59
|
"default": false
|
|
59
60
|
},
|
|
61
|
+
"dropdownInverted": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"title": "Dropdown Inverted",
|
|
64
|
+
"description": "Toggle the inversion of the dropdown navigation",
|
|
65
|
+
"default": false
|
|
66
|
+
},
|
|
60
67
|
"floating": {
|
|
61
68
|
"type": "boolean",
|
|
62
69
|
"title": "Floating",
|
|
@@ -83,6 +90,28 @@
|
|
|
83
90
|
},
|
|
84
91
|
"active": {
|
|
85
92
|
"type": "boolean"
|
|
93
|
+
},
|
|
94
|
+
"items": {
|
|
95
|
+
"type": "array",
|
|
96
|
+
"items": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"properties": {
|
|
99
|
+
"href": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"format": "uri"
|
|
102
|
+
},
|
|
103
|
+
"id": {
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
"label": {
|
|
107
|
+
"type": "string"
|
|
108
|
+
},
|
|
109
|
+
"active": {
|
|
110
|
+
"type": "boolean"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"additionalProperties": false
|
|
114
|
+
}
|
|
86
115
|
}
|
|
87
116
|
},
|
|
88
117
|
"additionalProperties": false,
|
|
@@ -94,8 +123,20 @@
|
|
|
94
123
|
"examples": [
|
|
95
124
|
[
|
|
96
125
|
{
|
|
97
|
-
"label": "Nav
|
|
98
|
-
"href": "#"
|
|
126
|
+
"label": "Nav With Children",
|
|
127
|
+
"href": "#",
|
|
128
|
+
"items": [
|
|
129
|
+
{
|
|
130
|
+
"label": "TEST1",
|
|
131
|
+
"href": "#",
|
|
132
|
+
"id": "TEST1"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"label": "TEST2",
|
|
136
|
+
"href": "#",
|
|
137
|
+
"id": "TEST2"
|
|
138
|
+
}
|
|
139
|
+
]
|
|
99
140
|
},
|
|
100
141
|
{
|
|
101
142
|
"label": "Active Item",
|
|
@@ -121,8 +162,5 @@
|
|
|
121
162
|
"const": "header"
|
|
122
163
|
}
|
|
123
164
|
},
|
|
124
|
-
"additionalProperties": false
|
|
125
|
-
"required": [
|
|
126
|
-
"logo"
|
|
127
|
-
]
|
|
165
|
+
"additionalProperties": false
|
|
128
166
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "http://schema.mydesignsystem.com/header.schema.json",
|
|
4
4
|
"title": "Header",
|
|
5
|
+
"description": "Header layered on top by the CMS",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"properties": {
|
|
7
8
|
"logo": {
|
|
@@ -31,6 +32,9 @@
|
|
|
31
32
|
"flyoutInverted": {
|
|
32
33
|
"$ref": "http://schema.mydesignsystem.com/nav-main.schema.json#/properties/flyoutInverted"
|
|
33
34
|
},
|
|
35
|
+
"dropdownInverted": {
|
|
36
|
+
"$ref": "http://schema.mydesignsystem.com/nav-main.schema.json#/properties/dropdownInverted"
|
|
37
|
+
},
|
|
34
38
|
"floating": {
|
|
35
39
|
"type": "boolean",
|
|
36
40
|
"title": "Floating",
|
|
@@ -46,7 +50,5 @@
|
|
|
46
50
|
"navItems": {
|
|
47
51
|
"$ref": "http://schema.mydesignsystem.com/nav-main.schema.json#/properties/items"
|
|
48
52
|
}
|
|
49
|
-
}
|
|
50
|
-
"additionalProperties": false,
|
|
51
|
-
"required": ["logo"]
|
|
53
|
+
}
|
|
52
54
|
}
|
|
@@ -3,16 +3,20 @@ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { NavMain } from '../nav-main/index.js';
|
|
5
5
|
import { Logo } from '../logo/index.js';
|
|
6
|
-
import '
|
|
7
|
-
import '@kickstartds/base/lib/link';
|
|
8
|
-
import '../nav-main/js/NavToggle.client.js';
|
|
6
|
+
import '../nav/js/NavToggle.client.js';
|
|
9
7
|
import '@kickstartds/core/lib/component';
|
|
10
|
-
import '../nav
|
|
8
|
+
import '../nav/js/navMainEvents.client.js';
|
|
11
9
|
import '@kickstartds/core/lib/core';
|
|
12
|
-
import '../nav
|
|
10
|
+
import '../nav/js/body.client.js';
|
|
11
|
+
import '../nav-toggle/index.js';
|
|
12
|
+
import '../nav-topbar/index.js';
|
|
13
|
+
import '@kickstartds/base/lib/link';
|
|
14
|
+
import '@kickstartds/base/lib/icon';
|
|
15
|
+
import '../nav-dropdown/index.js';
|
|
16
|
+
import '../nav-flyout/index.js';
|
|
13
17
|
import '@kickstartds/base/lib/picture';
|
|
14
18
|
|
|
15
|
-
const Header = ({ logo, floating, inverted = false, flyoutInverted = false, navItems = [], }) => (jsx(Fragment, { children: jsx("div", { className: classnames("dsa-header", floating ? `dsa-header--floating` : ""), "ks-inverted": inverted.toString(), children: jsxs("div", { className: "dsa-header__content", children: [jsx(Logo, { ...logo, className: "dsa-header__logo", inverted: inverted }), jsx(NavMain, { flyoutInverted: flyoutInverted, items: navItems, logo: {
|
|
19
|
+
const Header = ({ logo, floating, inverted = false, flyoutInverted = false, dropdownInverted = false, navItems = [], }) => (jsx(Fragment, { children: jsx("div", { className: classnames("dsa-header", floating ? `dsa-header--floating` : ""), "ks-inverted": inverted.toString(), children: jsxs("div", { className: "dsa-header__content", children: [jsx(Logo, { ...logo, className: "dsa-header__logo", inverted: inverted }), jsx(NavMain, { flyoutInverted: flyoutInverted, dropdownInverted: dropdownInverted, items: navItems, logo: {
|
|
16
20
|
...logo,
|
|
17
21
|
inverted: flyoutInverted,
|
|
18
22
|
} })] }) }) }));
|
|
@@ -12,8 +12,8 @@ import { SeoProps } from "../../SeoProps-f2d6dcaa.js";
|
|
|
12
12
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
13
13
|
* and run json-schema-to-typescript to regenerate this file.
|
|
14
14
|
*/
|
|
15
|
-
import { HeaderProps } from "../../HeaderProps-
|
|
16
|
-
import { FooterProps } from "../../FooterProps-
|
|
15
|
+
import { HeaderProps } from "../../HeaderProps-dd2071a8.js";
|
|
16
|
+
import { FooterProps } from "../../FooterProps-22e0307b.js";
|
|
17
17
|
/**
|
|
18
18
|
* Collection of sections (with their contents) to render on the page
|
|
19
19
|
*/
|
|
@@ -72,6 +72,6 @@ interface SettingsProps {
|
|
|
72
72
|
*/
|
|
73
73
|
seo: SeoProps;
|
|
74
74
|
}
|
|
75
|
-
export * from "../../BlogPostProps-
|
|
75
|
+
export * from "../../BlogPostProps-440f88a5.js";
|
|
76
76
|
export * from "../../BlogOverviewProps-f385fc47.js";
|
|
77
77
|
export { Sections, ToggleFloating, ToggleInverted, ToggleInverted1, PageProps, Header, Footer, SettingsProps };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
5
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
6
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Toggle the inversion of the dropdown navigation
|
|
10
|
+
*/
|
|
11
|
+
type DropdownInverted = boolean;
|
|
12
|
+
interface NavDropdownProps {
|
|
13
|
+
inverted?: DropdownInverted;
|
|
14
|
+
items?: {
|
|
15
|
+
href?: string;
|
|
16
|
+
id?: string;
|
|
17
|
+
label?: string;
|
|
18
|
+
active?: boolean;
|
|
19
|
+
}[];
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const NavDropdown: FC<NavDropdownProps>;
|
|
23
|
+
export { NavDropdown };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { Link } from '@kickstartds/base/lib/link';
|
|
4
|
+
|
|
5
|
+
const NavDropdown = ({ items, inverted }) => (jsx("ul", { "ks-inverted": inverted?.toString(), className: classnames(`dsa-nav-dropdown`), children: items.map(({ label, href, id }) => {
|
|
6
|
+
return (jsx("li", { className: classnames("dsa-nav-dropdown__item"), children: jsx(Link, { href: href, className: `dsa-nav-dropdown__link `, children: label }) }, id));
|
|
7
|
+
}) }));
|
|
8
|
+
|
|
9
|
+
export { NavDropdown };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "./nav-flyout.css";
|
|
2
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import { Link } from '@kickstartds/base/lib/link';
|
|
5
|
+
import { Icon } from '@kickstartds/base/lib/icon';
|
|
6
|
+
import { Logo } from '../logo/index.js';
|
|
7
|
+
import '@kickstartds/base/lib/picture';
|
|
8
|
+
|
|
9
|
+
const NavFlyout = ({ items, inverted, logo, active }) => items && items.length > 0 ? (jsxs("nav", { className: "dsa-nav-flyout", "ks-inverted": inverted.toString(), id: "dsa-nav-main", "aria-label": "Hauptnavigation", children: [jsx(Logo, { ...logo, className: "dsa-nav-main__logo" }), jsx("ul", { className: "dsa-nav-list", children: items.map(({ label, href, id, items: subItems }) => {
|
|
10
|
+
const isActive = active === href ||
|
|
11
|
+
subItems?.some((navItem) => active === navItem.href);
|
|
12
|
+
return (jsxs("li", { className: classnames("dsa-nav-item", isActive && "dsa-nav-item--active"), children: [jsxs(Link, { href: href, className: `dsa-nav-item__link`, children: [label, subItems?.length ? (jsx(Icon, { className: "dsa-nav-item__link__icon", icon: "chevron-down" })) : ("")] }), subItems?.length ? (jsx(Fragment, { children: jsx("div", { className: "dsa-nav-" }) })) : null] }, id));
|
|
13
|
+
}) })] })) : null;
|
|
14
|
+
|
|
15
|
+
export { NavFlyout };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
.dsa-nav-flyout {
|
|
2
|
+
display: none;
|
|
3
|
+
}
|
|
4
|
+
@media (max-width: 62rem) {
|
|
5
|
+
.dsa-nav-flyout {
|
|
6
|
+
display: block;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
@media (max-width: 62em) {
|
|
10
|
+
.dsa-nav-flyout {
|
|
11
|
+
display: block;
|
|
12
|
+
/* critical:start */
|
|
13
|
+
left: -100%;
|
|
14
|
+
/* critical:end */
|
|
15
|
+
height: 100vh;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
position: fixed;
|
|
18
|
+
width: 77vw;
|
|
19
|
+
max-width: 23rem;
|
|
20
|
+
transition: all var(--ks-duration-slow);
|
|
21
|
+
padding: 0 var(--l-section--content-padding);
|
|
22
|
+
right: 0;
|
|
23
|
+
bottom: 0;
|
|
24
|
+
top: 0;
|
|
25
|
+
overflow-y: auto;
|
|
26
|
+
background: var(--dsa-nav-main--background);
|
|
27
|
+
backface-visibility: hidden;
|
|
28
|
+
-webkit-overflow-scrolling: touch;
|
|
29
|
+
box-shadow: 20px 0px 30px rgba(0, 0, 0, 0);
|
|
30
|
+
}
|
|
31
|
+
.dsa-nav-flyout__item--icon {
|
|
32
|
+
border: 0;
|
|
33
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
34
|
+
clip-path: inset(100%);
|
|
35
|
+
height: 1px;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
padding: 0;
|
|
38
|
+
position: absolute;
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
width: 1px;
|
|
41
|
+
}
|
|
42
|
+
.overlay-open .dsa-nav-flyout {
|
|
43
|
+
left: 0;
|
|
44
|
+
box-shadow: var(--dsa-nav-main--shadow);
|
|
45
|
+
}
|
|
46
|
+
.dsa-nav-flyout > .dsa-nav-main__logo {
|
|
47
|
+
margin-top: var(--dsa-header--spacing-vertical);
|
|
48
|
+
margin-bottom: var(--dsa-header--spacing-vertical);
|
|
49
|
+
}
|
|
50
|
+
.dsa-nav-flyout ul.dsa-nav-main__list {
|
|
51
|
+
padding-top: calc(var(--dsa-header--spacing-vertical) - var(--ks-spacing-s));
|
|
52
|
+
}
|
|
53
|
+
.dsa-nav-flyout ul.dsa-nav-main__list .dsa-nav-main--button {
|
|
54
|
+
margin-left: var(--dsa-header--spacing-horizontal);
|
|
55
|
+
margin-top: var(--dsa-header--spacing-vertical);
|
|
56
|
+
}
|
|
57
|
+
.dsa-nav-flyout ul.dsa-nav-main__list .dsa-nav-main--button .button {
|
|
58
|
+
--button--font: var(--ks-font-interface-s);
|
|
59
|
+
}
|
|
60
|
+
.dsa-nav-flyout ul.dsa-nav-main__list .dsa-nav-main--button .button .button__content {
|
|
61
|
+
--button--padding: 0.4rem 1rem;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -10,23 +10,49 @@ import { LogoProps } from "../../LogoProps-01796f0a.js";
|
|
|
10
10
|
* Toggle the inversion of the flyout navigation
|
|
11
11
|
*/
|
|
12
12
|
type FlyoutInverted = boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Toggle the inversion of the dropdown navigation
|
|
15
|
+
*/
|
|
16
|
+
type DropdownInverted = boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Toggle the CTA
|
|
19
|
+
*/
|
|
20
|
+
type ToggleCTA = boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Text content to display inside the button
|
|
23
|
+
*/
|
|
24
|
+
type Label = string;
|
|
25
|
+
/**
|
|
26
|
+
* Target that should be linked, makes the button behave like a link semantically
|
|
27
|
+
*/
|
|
28
|
+
type Target = string;
|
|
13
29
|
interface NavMainProps {
|
|
14
30
|
/**
|
|
15
31
|
* Referenced component LogoProps
|
|
16
32
|
*/
|
|
17
33
|
logo: LogoProps;
|
|
18
34
|
flyoutInverted?: FlyoutInverted;
|
|
35
|
+
dropdownInverted?: DropdownInverted;
|
|
19
36
|
items?: {
|
|
20
37
|
href: string;
|
|
21
38
|
label: string;
|
|
22
39
|
active?: boolean;
|
|
40
|
+
items?: {
|
|
41
|
+
href?: string;
|
|
42
|
+
id?: string;
|
|
43
|
+
label?: string;
|
|
44
|
+
active?: boolean;
|
|
45
|
+
}[];
|
|
23
46
|
}[];
|
|
47
|
+
cta?: CTA;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Add a CTA to the Navigation
|
|
51
|
+
*/
|
|
52
|
+
interface CTA {
|
|
53
|
+
toggle?: ToggleCTA;
|
|
54
|
+
label?: Label;
|
|
55
|
+
target?: Target;
|
|
24
56
|
}
|
|
25
|
-
declare const NavToggleComponent: FC;
|
|
26
|
-
declare const NavMainItem: FC<{
|
|
27
|
-
label: string;
|
|
28
|
-
href: string;
|
|
29
|
-
active: boolean;
|
|
30
|
-
}>;
|
|
31
57
|
declare const NavMain: FC<NavMainProps>;
|
|
32
|
-
export {
|
|
58
|
+
export { NavMain };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import "./nav-main.css";
|
|
2
|
-
import "./nav-toggle.css";
|
|
3
|
-
import { createElement } from 'react';
|
|
4
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import '
|
|
9
|
-
import '
|
|
10
|
-
import '@kickstartds/base/lib/picture';
|
|
2
|
+
import '../nav/js/NavToggle.client.js';
|
|
3
|
+
import '../nav/js/navMainEvents.client.js';
|
|
4
|
+
import { NavToggleComponent } from '../nav-toggle/index.js';
|
|
5
|
+
import { NavTopbar } from '../nav-topbar/index.js';
|
|
6
|
+
import { NavFlyout } from '../nav-flyout/index.js';
|
|
11
7
|
import '@kickstartds/core/lib/component';
|
|
12
|
-
import '
|
|
8
|
+
import '../nav/js/body.client.js';
|
|
13
9
|
import '@kickstartds/core/lib/core';
|
|
10
|
+
import 'classnames';
|
|
11
|
+
import '@kickstartds/base/lib/link';
|
|
12
|
+
import '@kickstartds/base/lib/icon';
|
|
13
|
+
import '../nav-dropdown/index.js';
|
|
14
|
+
import '../logo/index.js';
|
|
15
|
+
import '@kickstartds/base/lib/picture';
|
|
14
16
|
|
|
15
|
-
const
|
|
16
|
-
const NavMainItem = ({ label, href, active }) => (jsx("li", { className: classnames("dsa-nav-main__item", active === true ? "dsa-nav-main__item--active" : ""), children: jsx(Link, { className: "dsa-nav-main__link", href: href, children: label }) }));
|
|
17
|
-
const NavMain = ({ logo, items, flyoutInverted }) => items && items.length > 0 ? (jsxs("div", { className: "dsa-nav-main__wrap", children: [jsx(NavToggleComponent, {}), jsxs("nav", { "ks-inverted": flyoutInverted.toString(), className: classnames("dsa-nav-main", "dsa-nav-main--flyout", items.some((item) => item.active) ? "dsa-nav-main--active" : ""), id: "dsa-nav-main", "aria-label": "Hauptnavigation", children: [jsx(Logo, { ...logo, className: "dsa-nav-main__logo" }), jsx("ul", { className: "dsa-nav-main__list", children: items.map((item) => (createElement(NavMainItem, { ...item, active: item.active ?? false, key: item.href + item.label }))) })] }), jsxs("nav", { className: classnames("dsa-nav-main", "dsa-nav-main--topbar", items.some((item) => item.active) ? "dsa-nav-main--active" : ""), id: "dsa-nav-main", "aria-label": "Hauptnavigation", children: [jsx(Logo, { ...logo, className: "dsa-nav-main__logo" }), jsx("ul", { className: "dsa-nav-main__list", children: items.map((item) => (createElement(NavMainItem, { ...item, active: item.active ?? false, key: item.href + item.label }))) })] })] })) : null;
|
|
17
|
+
const NavMain = ({ logo, items, flyoutInverted, dropdownInverted, }) => items && items.length > 0 ? (jsxs("div", { className: "dsa-nav-main", children: [jsx(NavToggleComponent, {}), jsx(NavTopbar, { items: items, dropdownInverted: dropdownInverted, active: undefined }), jsx(NavFlyout, { items: items, active: undefined, inverted: flyoutInverted, logo: logo })] })) : null;
|
|
18
18
|
|
|
19
|
-
export { NavMain
|
|
19
|
+
export { NavMain };
|
|
@@ -72,6 +72,12 @@
|
|
|
72
72
|
"description": "Toggle the inversion of the flyout navigation",
|
|
73
73
|
"default": false
|
|
74
74
|
},
|
|
75
|
+
"dropdownInverted": {
|
|
76
|
+
"type": "boolean",
|
|
77
|
+
"title": "Dropdown Inverted",
|
|
78
|
+
"description": "Toggle the inversion of the dropdown navigation",
|
|
79
|
+
"default": false
|
|
80
|
+
},
|
|
75
81
|
"items": {
|
|
76
82
|
"type": "array",
|
|
77
83
|
"items": {
|
|
@@ -86,6 +92,28 @@
|
|
|
86
92
|
},
|
|
87
93
|
"active": {
|
|
88
94
|
"type": "boolean"
|
|
95
|
+
},
|
|
96
|
+
"items": {
|
|
97
|
+
"type": "array",
|
|
98
|
+
"items": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"properties": {
|
|
101
|
+
"href": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"format": "uri"
|
|
104
|
+
},
|
|
105
|
+
"id": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
"label": {
|
|
109
|
+
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"active": {
|
|
112
|
+
"type": "boolean"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"additionalProperties": false
|
|
116
|
+
}
|
|
89
117
|
}
|
|
90
118
|
},
|
|
91
119
|
"additionalProperties": false,
|
|
@@ -97,8 +125,20 @@
|
|
|
97
125
|
"examples": [
|
|
98
126
|
[
|
|
99
127
|
{
|
|
100
|
-
"label": "Nav
|
|
101
|
-
"href": "#"
|
|
128
|
+
"label": "Nav With Children",
|
|
129
|
+
"href": "#",
|
|
130
|
+
"items": [
|
|
131
|
+
{
|
|
132
|
+
"label": "TEST1",
|
|
133
|
+
"href": "#",
|
|
134
|
+
"id": "TEST1"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"label": "TEST2",
|
|
138
|
+
"href": "#",
|
|
139
|
+
"id": "TEST2"
|
|
140
|
+
}
|
|
141
|
+
]
|
|
102
142
|
},
|
|
103
143
|
{
|
|
104
144
|
"label": "Active Item",
|
|
@@ -120,6 +160,34 @@
|
|
|
120
160
|
]
|
|
121
161
|
]
|
|
122
162
|
},
|
|
163
|
+
"cta": {
|
|
164
|
+
"type": "object",
|
|
165
|
+
"title": "CTA",
|
|
166
|
+
"description": "Add a CTA to the Navigation",
|
|
167
|
+
"properties": {
|
|
168
|
+
"toggle": {
|
|
169
|
+
"title": "Toggle CTA",
|
|
170
|
+
"description": "Toggle the CTA",
|
|
171
|
+
"type": "boolean",
|
|
172
|
+
"default": false
|
|
173
|
+
},
|
|
174
|
+
"label": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"title": "Label",
|
|
177
|
+
"description": "Text content to display inside the button",
|
|
178
|
+
"examples": [
|
|
179
|
+
"Book a meeting"
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
"target": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"title": "Target",
|
|
185
|
+
"description": "Target that should be linked, makes the button behave like a link semantically",
|
|
186
|
+
"format": "uri"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"additionalProperties": false
|
|
190
|
+
},
|
|
123
191
|
"type": {
|
|
124
192
|
"const": "nav-main"
|
|
125
193
|
}
|