@kickstartds/ds-agency-premium 1.4.0--canary.12.465.0 → 1.4.0--canary.14.680.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/BlogPostProps-e1cbd5d3.d.ts +8 -2
- package/dist/{FooterProps-9f94ed98.d.ts → FooterProps-2d0b03c2.d.ts} +14 -2
- package/dist/HeaderProps-c6c32ccf.d.ts +72 -0
- package/dist/{ImageStoryProps-24e0335c.d.ts → ImageStoryProps-e853e1e7.d.ts} +9 -4
- package/dist/{HeaderProps-34d278ee.d.ts → LogoProps-01796f0a.d.ts} +16 -19
- package/dist/LogosProps-f9474fe2.d.ts +97 -0
- package/dist/{SectionProps-93230a76.d.ts → SectionProps-83d399b4.d.ts} +2 -2
- package/dist/SliderProps-93230a76.d.ts +1 -1
- package/dist/components/blog-aside/index.js +2 -2
- package/dist/components/blog-head/index.js +2 -2
- package/dist/components/blog-overview/index.js +0 -1
- package/dist/components/blog-post/blog-post.schema.dereffed.json +3095 -1
- package/dist/components/blog-post/blog-post.schema.json +9 -1
- package/dist/components/blog-post/index.d.ts +2 -5
- package/dist/components/blog-post/index.js +1 -2
- package/dist/components/blog-teaser/index.js +2 -2
- package/dist/components/button/button.css +15 -1
- package/dist/components/cta/cta.css +38 -38
- package/dist/components/feature/index.js +7 -7
- package/dist/components/features/features.css +26 -28
- package/dist/components/features/index.js +1 -1
- package/dist/components/footer/footer.css +23 -18
- package/dist/components/footer/footer.schema.dereffed.json +65 -14
- package/dist/components/footer/footer.schema.json +11 -25
- package/dist/components/footer/index.d.ts +1 -1
- package/dist/components/footer/index.js +3 -2
- package/dist/components/gallery/gallery.css +1 -1
- package/dist/components/header/header.css +14 -10
- package/dist/components/header/header.schema.dereffed.json +78 -17
- package/dist/components/header/header.schema.json +18 -25
- package/dist/components/header/index.d.ts +1 -1
- package/dist/components/header/index.js +15 -7
- package/dist/components/headline/headline.css +18 -21
- package/dist/components/headline/index.js +1 -7
- package/dist/components/hero/index.js +3 -2
- package/dist/components/image/image.css +8 -8
- package/dist/components/image/image.schema.dereffed.json +1 -1
- package/dist/components/image/image.schema.json +1 -1
- package/dist/components/image/index.d.ts +1 -1
- package/dist/components/image/index.js +1 -1
- package/dist/components/image-story/image-story.css +14 -1
- package/dist/components/image-story/image-story.schema.dereffed.json +19 -9
- package/dist/components/image-story/image-story.schema.json +9 -6
- package/dist/components/image-story/index.d.ts +1 -1
- package/dist/components/image-story/index.js +10 -1
- package/dist/components/index/index.d.ts +13 -13
- package/dist/components/logo/index.d.ts +4 -0
- package/dist/components/logo/index.js +12 -0
- package/dist/components/logo/logo.css +7 -0
- package/dist/components/logo/logo.schema.dereffed.json +43 -19
- package/dist/components/logo/logo.schema.json +41 -17
- package/dist/components/logos/index.d.ts +1 -1
- package/dist/components/logos/index.js +1 -1
- package/dist/components/logos/logos.css +11 -7
- package/dist/components/logos/logos.schema.dereffed.json +0 -5
- package/dist/components/logos/logos.schema.json +27 -1
- package/dist/components/nav-dropdown/index.d.ts +23 -0
- package/dist/components/nav-dropdown/index.js +10 -0
- package/dist/components/nav-dropdown/nav-dropdown.css +48 -0
- package/dist/components/nav-flyout/index.d.ts +7 -0
- package/dist/components/nav-flyout/index.js +17 -0
- package/dist/components/nav-flyout/nav-flyout.css +124 -0
- package/dist/components/nav-main/index.d.ts +42 -11
- package/dist/components/nav-main/index.js +14 -13
- package/dist/components/nav-main/nav-main.schema.dereffed.json +110 -85
- package/dist/components/nav-main/nav-main.schema.json +73 -11
- package/dist/components/nav-toggle/index.d.ts +3 -0
- package/dist/components/nav-toggle/index.js +6 -0
- package/dist/components/{nav-main → nav-toggle}/nav-toggle.css +22 -22
- package/dist/components/nav-topbar/index.d.ts +6 -0
- package/dist/components/nav-topbar/index.js +14 -0
- package/dist/components/nav-topbar/nav-topbar.css +95 -0
- package/dist/components/page/page.schema.dereffed.json +25 -25
- package/dist/components/page/page.schema.json +6 -6
- package/dist/components/page-wrapper/index.js +2 -3
- package/dist/components/page-wrapper/tokens.css +38 -38
- package/dist/components/picture/picture.schema.json +1 -1
- package/dist/components/presets.json +197 -19
- package/dist/components/providers/index.js +0 -1
- package/dist/components/section/index.d.ts +5 -3
- package/dist/components/section/index.js +35 -31
- package/dist/components/section/section.css +3 -3
- package/dist/components/section/section.schema.dereffed.json +19 -19
- package/dist/components/settings/settings.schema.dereffed.json +143 -31
- package/dist/components/slider/slider.schema.dereffed.json +0 -5
- package/dist/components/teaser-card/teaser-card.css +2 -2
- package/dist/components/text/text.css +1 -1
- package/dist/global.css +14 -14
- package/dist/static/favicon/favicon-192-192.png +1 -1
- package/dist/static/logo-inverted.svg +26 -0
- package/dist/tokens/themes.css +4 -4
- package/dist/tokens/tokens.css +38 -38
- package/dist/tokens/tokens.js +70 -70
- package/package.json +1 -1
- package/dist/LogosProps-58c84ccc.d.ts +0 -242
- package/dist/components/headline-level-context/index.d.ts +0 -4
- package/dist/components/headline-level-context/index.js +0 -33
- package/dist/components/nav-main/nav-main.css +0 -191
- /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
|
@@ -9,38 +9,24 @@
|
|
|
9
9
|
"type": "object",
|
|
10
10
|
"properties": {
|
|
11
11
|
"src": {
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"examples": ["https://picsum.photos/seed/kdspicture/300/300"]
|
|
12
|
+
"$ref": "http://schema.mydesignsystem.com/logo.schema.json#/properties/src"
|
|
13
|
+
},
|
|
14
|
+
"srcInverted": {
|
|
15
|
+
"$ref": "http://schema.mydesignsystem.com/logo.schema.json#/properties/srcInverted"
|
|
17
16
|
},
|
|
18
17
|
"alt": {
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
"$ref": "http://schema.mydesignsystem.com/logo.schema.json#/properties/alt"
|
|
19
|
+
},
|
|
20
|
+
"homepageHref": {
|
|
21
|
+
"$ref": "http://schema.mydesignsystem.com/logo.schema.json#/properties/homepageHref"
|
|
22
22
|
},
|
|
23
23
|
"width": {
|
|
24
|
-
"
|
|
25
|
-
"description": "Width of the picture",
|
|
26
|
-
"type": "integer",
|
|
27
|
-
"minimum": 0,
|
|
28
|
-
"examples": [300]
|
|
24
|
+
"$ref": "http://schema.mydesignsystem.com/logo.schema.json#/properties/width"
|
|
29
25
|
},
|
|
30
26
|
"height": {
|
|
31
|
-
"
|
|
32
|
-
"description": "Height of the picture",
|
|
33
|
-
"type": "integer",
|
|
34
|
-
"minimum": 0,
|
|
35
|
-
"examples": [300]
|
|
27
|
+
"$ref": "http://schema.mydesignsystem.com/logo.schema.json#/properties/height"
|
|
36
28
|
}
|
|
37
|
-
}
|
|
38
|
-
"additionalProperties": false
|
|
39
|
-
},
|
|
40
|
-
"logoHref": {
|
|
41
|
-
"type": "string",
|
|
42
|
-
"format": "uri",
|
|
43
|
-
"default": "/"
|
|
29
|
+
}
|
|
44
30
|
},
|
|
45
31
|
"byline": {
|
|
46
32
|
"title": "Byline",
|
|
@@ -2,10 +2,11 @@ import "./footer.css";
|
|
|
2
2
|
import { createElement } from 'react';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
|
-
import { Picture } from '@kickstartds/base/lib/picture';
|
|
6
5
|
import { Link } from '@kickstartds/base/lib/link';
|
|
6
|
+
import { Logo } from '../logo/index.js';
|
|
7
|
+
import '@kickstartds/base/lib/picture';
|
|
7
8
|
|
|
8
|
-
const Footer = ({ logo,
|
|
9
|
+
const Footer = ({ logo, byline, inverted = false, navItems = [], }) => (jsx("div", { className: classnames("dsa-footer"), "ks-inverted": inverted.toString(), children: jsxs("div", { className: "dsa-footer__content", children: [jsx(Logo, { ...logo, inverted: inverted }), byline && jsx("span", { className: "dsa-footer__byline", children: byline }), navItems.length > 0 ? (jsx("div", { className: "dsa-footer__links", children: navItems.map(({ label, active, ...linkProps }) => (createElement(Link, { ...linkProps, className: "dsa-footer__link", key: linkProps.href + label }, label))) })) : null] }) }));
|
|
9
10
|
Footer.displayName = "Footer";
|
|
10
11
|
|
|
11
12
|
export { Footer };
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
color: var(--dsa-text-color-on-primary);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
:root,
|
|
50
|
+
:root, [ks-inverted], [ks-theme] {
|
|
51
51
|
--c-lightbox--bg: var(--ks-background-color-default) !important;
|
|
52
52
|
--c-lightbox--placeholder-bg: var(--ks-color-fg-to-bg-1) !important;
|
|
53
53
|
--c-lightbox--root-z-index: var(--ks-depth-modal) !important;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
:root,
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
:root,
|
|
2
|
+
[ks-theme],
|
|
3
|
+
[ks-inverted] {
|
|
4
|
+
--dsa-header--spacing-vertical: var(--ks-spacing-inset-m);
|
|
5
|
+
--dsa-header--spacing-horizontal: var(--ks-spacing-inset-xl);
|
|
6
|
+
}
|
|
7
|
+
@media (min-width: 62em) {
|
|
8
|
+
:root,
|
|
9
|
+
[ks-theme],
|
|
10
|
+
[ks-inverted] {
|
|
11
|
+
--dsa-header--spacing-vertical: var(--ks-spacing-stack-s);
|
|
12
|
+
--dsa-header--spacing-horizontal: var(--l-section--content-padding);
|
|
13
|
+
}
|
|
4
14
|
}
|
|
5
15
|
|
|
6
16
|
.dsa-header {
|
|
@@ -32,13 +42,7 @@
|
|
|
32
42
|
margin: auto;
|
|
33
43
|
display: flex;
|
|
34
44
|
justify-content: space-between;
|
|
35
|
-
|
|
36
|
-
.dsa-header__logo {
|
|
37
|
-
display: block;
|
|
38
|
-
}
|
|
39
|
-
.dsa-header__logo img {
|
|
40
|
-
height: var(--dsa-header__logo--height);
|
|
41
|
-
width: auto;
|
|
45
|
+
align-items: center;
|
|
42
46
|
}
|
|
43
47
|
|
|
44
48
|
.dsa-header--spacer {
|
|
@@ -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": {
|
|
@@ -12,16 +13,24 @@
|
|
|
12
13
|
"title": "Source",
|
|
13
14
|
"description": "Picture source",
|
|
14
15
|
"type": "string",
|
|
15
|
-
"format": "image"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
"format": "image"
|
|
17
|
+
},
|
|
18
|
+
"srcInverted": {
|
|
19
|
+
"title": "Source",
|
|
20
|
+
"description": "Picture source",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"format": "image"
|
|
19
23
|
},
|
|
20
24
|
"alt": {
|
|
21
25
|
"title": "Alt text",
|
|
22
26
|
"description": "Alt text to display for picture",
|
|
23
27
|
"type": "string"
|
|
24
28
|
},
|
|
29
|
+
"homepageHref": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"format": "uri",
|
|
32
|
+
"default": "/"
|
|
33
|
+
},
|
|
25
34
|
"width": {
|
|
26
35
|
"title": "Width",
|
|
27
36
|
"description": "Width of the picture",
|
|
@@ -43,10 +52,17 @@
|
|
|
43
52
|
},
|
|
44
53
|
"additionalProperties": false
|
|
45
54
|
},
|
|
46
|
-
"
|
|
47
|
-
"type": "
|
|
48
|
-
"
|
|
49
|
-
"
|
|
55
|
+
"flyoutInverted": {
|
|
56
|
+
"type": "boolean",
|
|
57
|
+
"title": "Flyout Inverted",
|
|
58
|
+
"description": "Toggle the inversion of the flyout navigation",
|
|
59
|
+
"default": false
|
|
60
|
+
},
|
|
61
|
+
"dropdownInverted": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"title": "Dropdown Inverted",
|
|
64
|
+
"description": "Toggle the inversion of the dropdown navigation",
|
|
65
|
+
"default": false
|
|
50
66
|
},
|
|
51
67
|
"floating": {
|
|
52
68
|
"type": "boolean",
|
|
@@ -74,6 +90,31 @@
|
|
|
74
90
|
},
|
|
75
91
|
"active": {
|
|
76
92
|
"type": "boolean"
|
|
93
|
+
},
|
|
94
|
+
"id": {
|
|
95
|
+
"type": "string"
|
|
96
|
+
},
|
|
97
|
+
"items": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"properties": {
|
|
102
|
+
"href": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"format": "uri"
|
|
105
|
+
},
|
|
106
|
+
"label": {
|
|
107
|
+
"type": "string"
|
|
108
|
+
},
|
|
109
|
+
"active": {
|
|
110
|
+
"type": "boolean"
|
|
111
|
+
},
|
|
112
|
+
"id": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"additionalProperties": false
|
|
117
|
+
}
|
|
77
118
|
}
|
|
78
119
|
},
|
|
79
120
|
"additionalProperties": false,
|
|
@@ -84,19 +125,42 @@
|
|
|
84
125
|
},
|
|
85
126
|
"examples": [
|
|
86
127
|
[
|
|
87
|
-
{
|
|
88
|
-
"label": "Nav Item",
|
|
89
|
-
"href": "#"
|
|
90
|
-
},
|
|
91
128
|
{
|
|
92
129
|
"label": "Active Item",
|
|
93
130
|
"href": "#",
|
|
94
131
|
"active": true
|
|
95
132
|
},
|
|
96
133
|
{
|
|
97
|
-
"label": "
|
|
134
|
+
"label": "Navigation Item",
|
|
98
135
|
"href": "#"
|
|
99
136
|
},
|
|
137
|
+
{
|
|
138
|
+
"label": "Dropdown",
|
|
139
|
+
"href": "#",
|
|
140
|
+
"items": [
|
|
141
|
+
{
|
|
142
|
+
"label": "Level 2 Item",
|
|
143
|
+
"href": "#",
|
|
144
|
+
"id": ""
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"label": "Active Item",
|
|
148
|
+
"active": true,
|
|
149
|
+
"href": "#",
|
|
150
|
+
"id": ""
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"label": "An Item with a longer Label",
|
|
154
|
+
"href": "#",
|
|
155
|
+
"id": ""
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"label": "And One last one",
|
|
159
|
+
"href": "#",
|
|
160
|
+
"id": ""
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
},
|
|
100
164
|
{
|
|
101
165
|
"label": "One more Item",
|
|
102
166
|
"href": "#"
|
|
@@ -112,8 +176,5 @@
|
|
|
112
176
|
"const": "header"
|
|
113
177
|
}
|
|
114
178
|
},
|
|
115
|
-
"additionalProperties": false
|
|
116
|
-
"required": [
|
|
117
|
-
"logo"
|
|
118
|
-
]
|
|
179
|
+
"additionalProperties": false
|
|
119
180
|
}
|
|
@@ -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": {
|
|
@@ -9,36 +10,30 @@
|
|
|
9
10
|
"type": "object",
|
|
10
11
|
"properties": {
|
|
11
12
|
"src": {
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"examples": ["https://picsum.photos/seed/kdspicture/300/300"]
|
|
13
|
+
"$ref": "http://schema.mydesignsystem.com/logo.schema.json#/properties/src"
|
|
14
|
+
},
|
|
15
|
+
"srcInverted": {
|
|
16
|
+
"$ref": "http://schema.mydesignsystem.com/logo.schema.json#/properties/srcInverted"
|
|
17
17
|
},
|
|
18
18
|
"alt": {
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
"$ref": "http://schema.mydesignsystem.com/logo.schema.json#/properties/alt"
|
|
20
|
+
},
|
|
21
|
+
"homepageHref": {
|
|
22
|
+
"$ref": "http://schema.mydesignsystem.com/logo.schema.json#/properties/homepageHref"
|
|
22
23
|
},
|
|
23
24
|
"width": {
|
|
24
|
-
"
|
|
25
|
-
"description": "Width of the picture",
|
|
26
|
-
"type": "integer",
|
|
27
|
-
"minimum": 0,
|
|
28
|
-
"examples": [300]
|
|
25
|
+
"$ref": "http://schema.mydesignsystem.com/logo.schema.json#/properties/width"
|
|
29
26
|
},
|
|
30
27
|
"height": {
|
|
31
|
-
"
|
|
32
|
-
"description": "Height of the picture",
|
|
33
|
-
"type": "integer",
|
|
34
|
-
"minimum": 0,
|
|
35
|
-
"examples": [300]
|
|
28
|
+
"$ref": "http://schema.mydesignsystem.com/logo.schema.json#/properties/height"
|
|
36
29
|
}
|
|
37
|
-
}
|
|
38
|
-
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"flyoutInverted": {
|
|
33
|
+
"$ref": "http://schema.mydesignsystem.com/nav-main.schema.json#/properties/flyoutInverted"
|
|
39
34
|
},
|
|
40
|
-
"
|
|
41
|
-
"$ref": "http://schema.mydesignsystem.com/nav-main.schema.json#/properties/
|
|
35
|
+
"dropdownInverted": {
|
|
36
|
+
"$ref": "http://schema.mydesignsystem.com/nav-main.schema.json#/properties/dropdownInverted"
|
|
42
37
|
},
|
|
43
38
|
"floating": {
|
|
44
39
|
"type": "boolean",
|
|
@@ -55,7 +50,5 @@
|
|
|
55
50
|
"navItems": {
|
|
56
51
|
"$ref": "http://schema.mydesignsystem.com/nav-main.schema.json#/properties/items"
|
|
57
52
|
}
|
|
58
|
-
}
|
|
59
|
-
"additionalProperties": false,
|
|
60
|
-
"required": ["logo"]
|
|
53
|
+
}
|
|
61
54
|
}
|
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
import "./header.css";
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
import { Picture } from '@kickstartds/base/lib/picture';
|
|
5
|
-
import { Link } from '@kickstartds/base/lib/link';
|
|
6
4
|
import { NavMain } from '../nav-main/index.js';
|
|
7
|
-
import '
|
|
8
|
-
import '../nav
|
|
5
|
+
import { Logo } from '../logo/index.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';
|
|
17
|
+
import '@kickstartds/base/lib/picture';
|
|
13
18
|
|
|
14
|
-
const Header = ({ 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: {
|
|
20
|
+
...logo,
|
|
21
|
+
inverted: flyoutInverted,
|
|
22
|
+
} })] }) }) }));
|
|
15
23
|
Header.displayName = "Header";
|
|
16
24
|
|
|
17
25
|
export { Header };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
:root,
|
|
1
|
+
:root, [ks-inverted], [ks-theme] {
|
|
2
2
|
--dsa-headline--color: var(--ks-text-color-display);
|
|
3
3
|
--dsa-headline--font-weight: var(--ks-font-weight-medium);
|
|
4
4
|
--dsa-headline--text-transform: none;
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
--dsa-headline_h4--font: var(--ks-font-display-m);
|
|
16
16
|
--dsa-headline__p--font: var(--ks-font-copy-m);
|
|
17
17
|
}
|
|
18
|
-
@media (min-width:
|
|
19
|
-
:root,
|
|
18
|
+
@media (min-width: 48em) {
|
|
19
|
+
:root, [ks-inverted], [ks-theme] {
|
|
20
20
|
--dsa-headline_h1__subheadline--font: var(--ks-font-copy-xl);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
@media (min-width:
|
|
24
|
-
:root,
|
|
23
|
+
@media (min-width: 48em) {
|
|
24
|
+
:root, [ks-inverted], [ks-theme] {
|
|
25
25
|
--dsa-headline_h2__subheadline--font: var(--ks-font-copy-l);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -33,40 +33,37 @@
|
|
|
33
33
|
gap: var(--dsa-headline--gap, 0.25em);
|
|
34
34
|
}
|
|
35
35
|
.dsa-headline .dsa-headline__headline {
|
|
36
|
-
font: var(--
|
|
36
|
+
font: var(--headline--font);
|
|
37
37
|
text-transform: var(--dsa-headline--text-transform);
|
|
38
38
|
}
|
|
39
|
-
.dsa-headline .dsa-headline__subheadline {
|
|
40
|
-
font: var(--dsa-headline__subheadline--font);
|
|
41
|
-
}
|
|
42
39
|
.dsa-headline--h1 {
|
|
43
|
-
--
|
|
44
|
-
--
|
|
40
|
+
--headline--font: var(--dsa-headline_h1--font, var(--ks-font-display-xxl));
|
|
41
|
+
--subheadline--font: var(--dsa-headline_h1__subheadline--font, var(--ks-font-copy-xl));
|
|
45
42
|
}
|
|
46
43
|
.dsa-headline--h2 {
|
|
47
|
-
--
|
|
48
|
-
--
|
|
44
|
+
--headline--font: var(--dsa-headline_h2--font, var(--ks-font-display-xl));
|
|
45
|
+
--subheadline--font: var(--dsa-headline_h2__subheadline--font, var(--ks-font-copy-l));
|
|
49
46
|
}
|
|
50
47
|
.dsa-headline--h3 {
|
|
51
|
-
--
|
|
52
|
-
--
|
|
48
|
+
--headline--font: var(--dsa-headline_h3--font, var(--ks-font-display-l));
|
|
49
|
+
--subheadline--font: var(--dsa-headline_h3__subheadline--font, var(--ks-font-copy-l));
|
|
53
50
|
}
|
|
54
51
|
.dsa-headline--h4 {
|
|
55
|
-
--
|
|
56
|
-
--
|
|
52
|
+
--headline--font: var(--dsa-headline_h4--font, var(--ks-font-display-m));
|
|
53
|
+
--subheadline--font: var(--dsa-headline_h4__subheadline--font, var(--ks-font-copy-m));
|
|
57
54
|
}
|
|
58
55
|
.dsa-headline--p {
|
|
59
|
-
--
|
|
60
|
-
--
|
|
56
|
+
--headline--font: var(--dsa-headline__p--font, var(--ks-font-copy-m));
|
|
57
|
+
--subheadline--font: var(--dsa-headline__p__subheadline--font, var(--ks-font-copy-s));
|
|
61
58
|
}
|
|
62
59
|
.dsa-headline .dsa-headline__headline {
|
|
63
|
-
font: var(--
|
|
60
|
+
font: var(--headline--font);
|
|
64
61
|
color: var(--dsa-headline--color, var(--ks-text-color-display));
|
|
65
62
|
font-weight: var(--dsa-headline--font-weight);
|
|
66
63
|
margin: 0;
|
|
67
64
|
}
|
|
68
65
|
.dsa-headline .dsa-headline__subheadline {
|
|
69
|
-
font: var(--
|
|
66
|
+
font: var(--subheadline--font);
|
|
70
67
|
margin: 0;
|
|
71
68
|
max-width: var(--l-section--content-width-default);
|
|
72
69
|
color: var(--dsa-headline__subheadline--color, var(--ks-text-color-primary));
|
|
@@ -4,17 +4,11 @@ import classnames from 'classnames';
|
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
5
|
import { compiler } from 'markdown-to-jsx';
|
|
6
6
|
import { HeadlineContext } from '@kickstartds/base/lib/headline';
|
|
7
|
-
import { useHeadlineLevel } from '../headline-level-context/index.js';
|
|
8
7
|
|
|
9
8
|
const Headline = forwardRef(({ content, text = content, sub, align = "left", switchOrder = false, level = "h2",
|
|
10
9
|
// @ts-expect-error: Some kDS Components set the `styleAs`Props (e.g. https://github.com/kickstartDS/content/blob/next/source/storytelling/StorytellingComponent.tsx#L146)
|
|
11
10
|
styleAs, style = styleAs || "h2", spaceAfter = "small", className, renderContent = compiler, renderSubheadline = compiler, ...props }, ref) => {
|
|
12
|
-
const
|
|
13
|
-
const TagName = level === "p"
|
|
14
|
-
? level
|
|
15
|
-
: computedLevel
|
|
16
|
-
? ("h" + computedLevel)
|
|
17
|
-
: level;
|
|
11
|
+
const TagName = level;
|
|
18
12
|
return text || sub ? (jsxs("header", { className: classnames("dsa-headline", `dsa-headline--${style}`, style !== "none" && style !== level && `dsa-headline--${style}`, `dsa-headline--align-${align}`, spaceAfter && `dsa-headline--space-after-${spaceAfter}`, className), ref: ref, ...props, children: [sub && switchOrder && (jsx("p", { className: "dsa-headline__subheadline", children: renderSubheadline(sub) })), jsx(TagName, { className: classnames("dsa-headline__headline"), children: renderContent(text) }), sub && !switchOrder && (jsx("p", { className: "dsa-headline__subheadline", children: renderSubheadline(sub) }))] })) : null;
|
|
19
13
|
});
|
|
20
14
|
Headline.displayName = "Headline";
|
|
@@ -8,13 +8,13 @@ import { ButtonContext } from '@kickstartds/base/lib/button';
|
|
|
8
8
|
import { useButtonGroup } from '../button-group/index.js';
|
|
9
9
|
import '@kickstartds/base/lib/button-group';
|
|
10
10
|
|
|
11
|
-
const HeroContextDefault = forwardRef(({ headline, sub, height, text, highlightText, textPosition = "center", colorNeutral, image, overlay, textbox, buttons = [], ...rest }, ref) => {
|
|
11
|
+
const HeroContextDefault = forwardRef(({ headline, sub, height, text, highlightText, textPosition = "center", colorNeutral, image, overlay, textbox, className, buttons = [], ...rest }, ref) => {
|
|
12
12
|
const ButtonGroup = useButtonGroup();
|
|
13
13
|
return (jsx(ButtonContext.Provider
|
|
14
14
|
// @ts-expect-error
|
|
15
15
|
, {
|
|
16
16
|
// @ts-expect-error
|
|
17
|
-
value: ButtonGroup, children: jsx(Container, { name: "visual", children: jsx(VisualContextDefault, { ...rest, ref: ref, className: classnames(`dsa-hero dsa-hero--content-${textPosition}`, highlightText ? `dsa-hero--highlight-text` : "", colorNeutral ? `dsa-hero--color-neutral` : ""), height: height, overlay: overlay, box: {
|
|
17
|
+
value: ButtonGroup, children: jsx(Container, { name: "visual", children: jsx(VisualContextDefault, { ...rest, ref: ref, className: classnames(`dsa-hero dsa-hero--content-${textPosition}`, highlightText ? `dsa-hero--highlight-text` : "", colorNeutral ? `dsa-hero--color-neutral` : "", className), height: height, overlay: overlay, box: {
|
|
18
18
|
background: textbox === true ? "solid" : "transparent",
|
|
19
19
|
enabled: true,
|
|
20
20
|
vertical: textPosition === "below" ? "bottom" : "center",
|
|
@@ -48,6 +48,7 @@ const HeroContextDefault = forwardRef(({ headline, sub, height, text, highlightT
|
|
|
48
48
|
srcMobile: image.srcMobile,
|
|
49
49
|
srcTablet: image.srcTablet,
|
|
50
50
|
srcDesktop: image.srcDesktop,
|
|
51
|
+
src: image.src,
|
|
51
52
|
},
|
|
52
53
|
} }) }) }));
|
|
53
54
|
});
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
.
|
|
2
|
-
--
|
|
3
|
-
--
|
|
4
|
-
--
|
|
1
|
+
.dsa-image {
|
|
2
|
+
--dsa-image--ratio-square: 1/1;
|
|
3
|
+
--dsa-image--ratio-wide: 4/3;
|
|
4
|
+
--dsa-image--ratio-landscape: 16/9;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.
|
|
7
|
+
.dsa-image {
|
|
8
8
|
object-fit: cover;
|
|
9
9
|
}
|
|
10
|
-
.
|
|
10
|
+
.dsa-image--square {
|
|
11
11
|
aspect-ratio: var(--c-image--ratio-square);
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
.dsa-image--wide {
|
|
14
14
|
aspect-ratio: var(--c-image--ratio-wide);
|
|
15
15
|
}
|
|
16
|
-
.
|
|
16
|
+
.dsa-image--landscape {
|
|
17
17
|
aspect-ratio: var(--c-image--ratio-landscape);
|
|
18
18
|
}
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"className": {
|
|
53
53
|
"title": "Additional Classes",
|
|
54
|
-
"description": "Add additional css classes that should be applied to the
|
|
54
|
+
"description": "Add additional css classes that should be applied to the image",
|
|
55
55
|
"type": "string"
|
|
56
56
|
},
|
|
57
57
|
"style": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"className": {
|
|
46
46
|
"title": "Additional Classes",
|
|
47
|
-
"description": "Add additional css classes that should be applied to the
|
|
47
|
+
"description": "Add additional css classes that should be applied to the image",
|
|
48
48
|
"type": "string"
|
|
49
49
|
},
|
|
50
50
|
"style": {
|
|
@@ -31,7 +31,7 @@ type Height = number;
|
|
|
31
31
|
*/
|
|
32
32
|
type AspectRatio = "unset" | "square" | "wide" | "landscape";
|
|
33
33
|
/**
|
|
34
|
-
* Add additional css classes that should be applied to the
|
|
34
|
+
* Add additional css classes that should be applied to the image
|
|
35
35
|
*/
|
|
36
36
|
type AdditionalClasses = string;
|
|
37
37
|
/**
|
|
@@ -4,7 +4,7 @@ import classnames from 'classnames';
|
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
5
|
import { PictureContextDefault, PictureContext } from '@kickstartds/base/lib/picture';
|
|
6
6
|
|
|
7
|
-
const Image = forwardRef(({ src, srcSet, alt, width, height, aspectRatio, className, id, itemProp, style, lazy, sources, pictureClassName, ...props }, ref) => (jsx(PictureContextDefault, { ...props, src: src, srcSet: srcSet, alt: alt, width: width, height: height, id: id, itemProp: itemProp, style: style, lazy: lazy, sources: sources, pictureClassName: pictureClassName, ref: ref, className: classnames("
|
|
7
|
+
const Image = forwardRef(({ src, srcSet, alt, width, height, aspectRatio, className, id, itemProp, style, lazy, sources, pictureClassName, ...props }, ref) => (jsx(PictureContextDefault, { ...props, src: src, srcSet: srcSet, alt: alt, width: width, height: height, id: id, itemProp: itemProp, style: style, lazy: lazy, sources: sources, pictureClassName: pictureClassName, ref: ref, className: classnames("dsa-image", aspectRatio !== "unset" && `dsa-image--${aspectRatio}`, className) })));
|
|
8
8
|
Image.displayName = "Image";
|
|
9
9
|
const ImageProvider = (props) => (jsx(PictureContext.Provider, { ...props, value: Image }));
|
|
10
10
|
|
|
@@ -14,6 +14,18 @@
|
|
|
14
14
|
.c-storytelling.dsa-image-story .c-storytelling__box__content {
|
|
15
15
|
max-width: var(--l-section--content-width-narrow);
|
|
16
16
|
}
|
|
17
|
+
.c-storytelling.dsa-image-story.c-storytelling--three-to-two img {
|
|
18
|
+
aspect-ratio: 3/2;
|
|
19
|
+
}
|
|
20
|
+
.c-storytelling.dsa-image-story.c-storytelling--four-to-three img {
|
|
21
|
+
aspect-ratio: 4/3;
|
|
22
|
+
}
|
|
23
|
+
.c-storytelling.dsa-image-story.c-storytelling--sixteen-to-nine img {
|
|
24
|
+
aspect-ratio: 16/9;
|
|
25
|
+
}
|
|
26
|
+
.c-storytelling.dsa-image-story.c-storytelling--square img {
|
|
27
|
+
aspect-ratio: 1/1;
|
|
28
|
+
}
|
|
17
29
|
.c-storytelling.dsa-image-story .c-rich-text {
|
|
18
30
|
font: var(--dsa-image-story__copy--font, var(--dsa-rich-text--font));
|
|
19
31
|
color: var(--dsa-image-story__copy--color, var(--dsa-rich-text--color));
|
|
@@ -24,7 +36,8 @@
|
|
|
24
36
|
}
|
|
25
37
|
.c-storytelling.dsa-image-story .c-storytelling__image img {
|
|
26
38
|
position: sticky;
|
|
27
|
-
|
|
39
|
+
height: auto;
|
|
40
|
+
top: 0;
|
|
28
41
|
}
|
|
29
42
|
.c-storytelling.dsa-image-story.c-storytelling--full {
|
|
30
43
|
--c-storytelling--vertical-padding: 0px;
|
|
@@ -129,23 +129,33 @@
|
|
|
129
129
|
"type": "string",
|
|
130
130
|
"format": "image"
|
|
131
131
|
},
|
|
132
|
-
"
|
|
133
|
-
"title": "Image aspect ratio",
|
|
134
|
-
"description": "Select an aspect ratio to use for cropping and displaying the image",
|
|
132
|
+
"aspectRatio": {
|
|
135
133
|
"type": "string",
|
|
134
|
+
"title": "Aspect Ratio",
|
|
135
|
+
"description": "The aspect ratio of the image",
|
|
136
136
|
"enum": [
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"none"
|
|
137
|
+
"unset",
|
|
138
|
+
"square",
|
|
139
|
+
"wide",
|
|
140
|
+
"landscape"
|
|
142
141
|
],
|
|
143
|
-
"default": "
|
|
142
|
+
"default": "unset"
|
|
144
143
|
},
|
|
145
144
|
"alt": {
|
|
146
145
|
"title": "Alt text",
|
|
147
146
|
"description": "Image description",
|
|
148
147
|
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"vAlign": {
|
|
150
|
+
"title": "Image vertical alignment",
|
|
151
|
+
"description": "Select a vertical alignment for the image",
|
|
152
|
+
"type": "string",
|
|
153
|
+
"enum": [
|
|
154
|
+
"center",
|
|
155
|
+
"top",
|
|
156
|
+
"bottom"
|
|
157
|
+
],
|
|
158
|
+
"default": "top"
|
|
149
159
|
}
|
|
150
160
|
},
|
|
151
161
|
"additionalProperties": false
|