@kickstartds/ds-agency-premium 1.7.0--canary.18.1660.0 → 1.7.0--canary.46.1797.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/{BlogHeadProps-3f6e4072.d.ts → BlogHeadProps-c04a5ed8.d.ts} +6 -1
- package/dist/BlogOverviewProps-9f207f1c.d.ts +1 -1
- package/dist/BlogPostProps-6b3cff22.d.ts +2 -2
- package/dist/BlogTeaserProps-f5855e93.d.ts +9 -4
- package/dist/DividerProps-2ef31901.d.ts +26 -0
- package/dist/FeaturesProps-e58616a5.d.ts +62 -0
- package/dist/{HeroProps-cf82a16d.d.ts → HeroProps-f704d270.d.ts} +1 -1
- package/dist/HtmlProps-9d091769.d.ts +34 -0
- package/dist/PageProps-aa29c554.d.ts +1 -1
- package/dist/{SectionProps-83d399b4.d.ts → SectionProps-1cfcf6e8.d.ts} +12 -5
- package/dist/SliderProps-93230a76.d.ts +4 -4
- package/dist/{StatProps-12a3eae0.d.ts → StatProps-79109ad0.d.ts} +1 -1
- package/dist/StatsProps-bf5ef578.d.ts +1 -1
- package/dist/{TestimonialProps-94bdeac9.d.ts → TestimonialsProps-e344f597.d.ts} +22 -2
- package/dist/components/blog-aside/blog-aside.schema.dereffed.json +3 -1
- package/dist/components/blog-aside/blog-aside.schema.json +1 -0
- package/dist/components/blog-aside/index.d.ts +1 -0
- package/dist/components/blog-aside/index.js +6 -1
- package/dist/components/blog-author/blog-author.schema.dereffed.json +2 -1
- package/dist/components/blog-author/index.d.ts +1 -0
- package/dist/components/blog-author/index.js +10 -1
- package/dist/components/blog-head/blog-head.css +3 -3
- package/dist/components/blog-head/blog-head.schema.dereffed.json +8 -0
- package/dist/components/blog-head/blog-head.schema.json +6 -0
- package/dist/components/blog-head/index.d.ts +2 -1
- package/dist/components/blog-head/index.js +8 -3
- package/dist/components/blog-overview/blog-overview.schema.dereffed.json +212 -136
- package/dist/components/blog-overview/index.d.ts +1 -0
- package/dist/components/blog-overview/index.js +1 -0
- package/dist/components/blog-post/blog-post.schema.dereffed.json +181 -119
- package/dist/components/blog-post/index.d.ts +1 -0
- package/dist/components/blog-post/index.js +1 -0
- package/dist/components/blog-teaser/blog-teaser.css +7 -5
- package/dist/components/blog-teaser/blog-teaser.schema.dereffed.json +14 -6
- package/dist/components/blog-teaser/blog-teaser.schema.json +11 -5
- package/dist/components/blog-teaser/index.d.ts +4 -3
- package/dist/components/blog-teaser/index.js +14 -5
- package/dist/components/button/button.schema.dereffed.json +1 -0
- package/dist/components/button/button.schema.json +1 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button-group/button-group.schema.dereffed.json +1 -0
- package/dist/components/button-group/index.d.ts +1 -0
- package/dist/components/contact/contact.css +2 -0
- package/dist/components/contact/contact.schema.dereffed.json +2 -1
- package/dist/components/contact/contact.schema.json +2 -1
- package/dist/components/contact/index.d.ts +1 -0
- package/dist/components/contact/index.js +10 -1
- package/dist/components/cta/cta.css +3 -3
- package/dist/components/cta/cta.schema.dereffed.json +1 -0
- package/dist/components/cta/index.d.ts +1 -0
- package/dist/components/cta/index.js +20 -2
- package/dist/components/divider/divider.css +1 -1
- package/dist/components/divider/index.d.ts +2 -26
- package/dist/components/divider/index.js +6 -1
- package/dist/components/faq/index.d.ts +1 -0
- package/dist/components/faq/index.js +6 -1
- package/dist/components/feature/feature.schema.dereffed.json +1 -0
- package/dist/components/feature/feature.schema.json +1 -0
- package/dist/components/feature/index.d.ts +53 -1
- package/dist/components/feature/index.js +14 -2
- package/dist/components/features/features.css +43 -10
- package/dist/components/features/features.schema.dereffed.json +3 -40
- package/dist/components/features/features.schema.json +24 -1
- package/dist/components/features/index.d.ts +2 -1
- package/dist/components/features/index.js +23 -3
- package/dist/components/footer/footer.css +4 -4
- package/dist/components/footer/index.d.ts +1 -0
- package/dist/components/footer/index.js +11 -1
- package/dist/components/gallery/gallery.css +0 -18
- package/dist/components/gallery/index.d.ts +1 -0
- package/dist/components/gallery/index.js +8 -1
- package/dist/components/header/header.css +2 -3
- package/dist/components/header/index.d.ts +4 -3
- package/dist/components/header/index.js +14 -2
- package/dist/components/headline/headline.css +18 -2
- package/dist/components/headline/headline.schema.dereffed.json +5 -0
- package/dist/components/headline/headline.schema.json +5 -0
- package/dist/components/headline/index.d.ts +6 -0
- package/dist/components/headline/index.js +1 -1
- package/dist/components/hero/hero.css +38 -5
- package/dist/components/hero/hero.schema.dereffed.json +4 -2
- package/dist/components/hero/hero.schema.json +2 -2
- package/dist/components/hero/index.d.ts +2 -1
- package/dist/components/hero/index.js +19 -3
- package/dist/components/html/Html.client.d.ts +5 -0
- package/dist/components/html/Html.client.js +41 -0
- package/dist/components/html/html.css +52 -0
- package/dist/components/html/html.schema.dereffed.json +61 -0
- package/dist/components/html/html.schema.json +31 -3
- package/dist/components/html/index.d.ts +5 -26
- package/dist/components/html/index.js +25 -4
- package/dist/components/image-story/image-story.css +1 -1
- package/dist/components/image-story/image-story.schema.dereffed.json +1 -0
- package/dist/components/image-story/image-story.schema.json +5 -1
- package/dist/components/image-story/index.d.ts +1 -0
- package/dist/components/image-story/index.js +14 -2
- package/dist/components/image-text/index.d.ts +1 -0
- package/dist/components/image-text/index.js +7 -1
- package/dist/components/index/index.d.ts +6 -1
- package/dist/components/logo/index.d.ts +1 -0
- package/dist/components/logo/index.js +6 -1
- package/dist/components/logos/index.d.ts +1 -0
- package/dist/components/logos/index.js +12 -1
- package/dist/components/logos/logos.css +2 -2
- package/dist/components/mosaic/index.d.ts +1 -0
- package/dist/components/mosaic/index.js +8 -1
- package/dist/components/mosaic/mosaic.css +3 -0
- package/dist/components/mosaic/mosaic.schema.dereffed.json +1 -0
- package/dist/components/nav-dropdown/index.d.ts +1 -0
- package/dist/components/nav-flyout/index.d.ts +1 -0
- package/dist/components/nav-flyout/index.js +7 -1
- package/dist/components/nav-main/index.d.ts +1 -0
- package/dist/components/nav-main/index.js +11 -1
- package/dist/components/nav-topbar/index.d.ts +1 -0
- package/dist/components/nav-topbar/index.js +7 -1
- package/dist/components/page/index.d.ts +1 -0
- package/dist/components/page/page.schema.dereffed.json +169 -118
- package/dist/components/page-wrapper/index.js +107 -389
- package/dist/components/page-wrapper/tokens.css +55 -4
- package/dist/components/presets.json +182 -237
- package/dist/components/providers/index.js +2 -1
- package/dist/components/section/index.d.ts +2 -1
- package/dist/components/section/index.js +27 -3
- package/dist/components/section/js/Section.client.js +1 -1
- package/dist/components/section/section.css +50 -35
- package/dist/components/section/section.schema.dereffed.json +169 -118
- package/dist/components/section/section.schema.json +13 -2
- package/dist/components/settings/settings.schema.dereffed.json +5 -0
- package/dist/components/settings/settings.schema.json +5 -0
- package/dist/components/slider/index.d.ts +1 -0
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/slider.css +5 -0
- package/dist/components/slider/slider.schema.dereffed.json +37 -63
- package/dist/components/slider/slider.schema.json +1 -1
- package/dist/components/split/index.d.ts +1 -0
- package/dist/components/split/split.css +3 -3
- package/dist/components/stat/index.d.ts +2 -1
- package/dist/components/stat/index.js +16 -4
- package/dist/components/stat/stat.schema.dereffed.json +7 -5
- package/dist/components/stat/stat.schema.json +3 -2
- package/dist/components/stats/index.d.ts +1 -0
- package/dist/components/stats/index.js +6 -1
- package/dist/components/stats/stats.css +3 -7
- package/dist/components/stats/stats.schema.dereffed.json +7 -5
- package/dist/components/teaser-card/index.d.ts +1 -0
- package/dist/components/teaser-card/index.js +13 -2
- package/dist/components/testimonial/index.d.ts +49 -1
- package/dist/components/testimonial/index.js +11 -2
- package/dist/components/testimonial/testimonial.schema.dereffed.json +11 -0
- package/dist/components/testimonial/testimonial.schema.json +7 -0
- package/dist/components/testimonials/index.d.ts +2 -1
- package/dist/components/testimonials/index.js +10 -3
- package/dist/components/testimonials/testimonials.css +56 -28
- package/dist/components/testimonials/testimonials.schema.dereffed.json +11 -5
- package/dist/components/testimonials/testimonials.schema.json +30 -1
- package/dist/components/text/index.d.ts +1 -0
- package/dist/components/text/index.js +8 -1
- package/dist/components/tile/tile.schema.dereffed.json +1 -0
- package/dist/components/tile/tile.schema.json +8 -2
- package/dist/components/video-curtain/index.d.ts +1 -0
- package/dist/components/video-curtain/index.js +11 -1
- package/dist/components/video-curtain/video-curtain.css +4 -3
- package/dist/components/video-curtain/video-curtain.schema.dereffed.json +2 -1
- package/dist/components/video-curtain/video-curtain.schema.json +1 -1
- package/dist/global.css +66 -42
- package/dist/helpers-84d80d46.d.ts +5 -0
- package/dist/helpers-84d80d46.js +33 -0
- package/dist/static/img/screenshots/blog-blog-aside--default.png +0 -0
- package/dist/static/img/screenshots/blog-blog-author--default.png +0 -0
- package/dist/static/img/screenshots/blog-blog-head--default.png +0 -0
- package/dist/static/img/screenshots/blog-blog-teaser--default.png +0 -0
- package/dist/static/img/screenshots/components-contact--wide-image.png +0 -0
- package/dist/static/img/screenshots/components-cta--align-bottom.png +0 -0
- package/dist/static/img/screenshots/components-cta--angled-image.png +0 -0
- package/dist/static/img/screenshots/components-cta--banner.png +0 -0
- package/dist/static/img/screenshots/components-cta--colored-banner.png +0 -0
- package/dist/static/img/screenshots/components-cta--contact-banner.png +0 -0
- package/dist/static/img/screenshots/components-cta--highlighted.png +0 -0
- package/dist/static/img/screenshots/components-cta--left-aligned.png +0 -0
- package/dist/static/img/screenshots/components-cta--product-advertisement.png +0 -0
- package/dist/static/img/screenshots/components-cta--split-banner.png +0 -0
- package/dist/static/img/screenshots/components-faq--dropdown-list.png +0 -0
- package/dist/static/img/screenshots/components-faq--single-dropdown.png +0 -0
- package/dist/static/img/screenshots/components-features--icon-beside-with-link-in-text.png +0 -0
- package/dist/static/img/screenshots/components-features--icon-centered.png +0 -0
- package/dist/static/img/screenshots/components-features--icon-intext-with-link.png +0 -0
- package/dist/static/img/screenshots/components-features--list-view.png +0 -0
- package/dist/static/img/screenshots/components-features--stack-with-button.png +0 -0
- package/dist/static/img/screenshots/components-headline--h-1.png +0 -0
- package/dist/static/img/screenshots/components-headline--h-2.png +0 -0
- package/dist/static/img/screenshots/components-headline--h-3.png +0 -0
- package/dist/static/img/screenshots/components-headline--h-4.png +0 -0
- package/dist/static/img/screenshots/components-headline--order-swapped.png +0 -0
- package/dist/static/img/screenshots/components-headline--with-markdown.png +0 -0
- package/dist/static/img/screenshots/components-headline--with-subheadline.png +0 -0
- package/dist/static/img/screenshots/components-hero--text-box-on-full-screen.png +0 -0
- package/dist/static/img/screenshots/components-hero--text-on-image-with-overlay.png +0 -0
- package/dist/static/img/screenshots/components-html--html.png +0 -0
- package/dist/static/img/screenshots/components-html--with-consent.png +0 -0
- package/dist/static/img/screenshots/components-html--with-script.png +0 -0
- package/dist/static/img/screenshots/components-logos--centered-with-button.png +0 -0
- package/dist/static/img/screenshots/components-logos--left-aligned-with-text-link.png +0 -0
- package/dist/static/img/screenshots/components-stats--count-up-with-description.png +0 -0
- package/dist/static/img/screenshots/components-stats--count-up-with-icons.png +0 -0
- package/dist/static/img/screenshots/components-teaser-card--page-navigation.png +0 -0
- package/dist/static/img/screenshots/components-testimonials--alternating-layout.png +0 -0
- package/dist/static/img/screenshots/components-testimonials--list-layout.png +0 -0
- package/dist/static/img/screenshots/components-testimonials--simple.png +0 -0
- package/dist/static/img/screenshots/components-testimonials--slider-layout.png +0 -0
- package/dist/static/img/screenshots/components-testimonials--with-rating.png +0 -0
- package/dist/static/img/screenshots/components-testimonials--with-title.png +0 -0
- package/dist/static/img/screenshots/form-select-field--default.png +0 -0
- package/dist/static/img/screenshots/form-text-area--default.png +0 -0
- package/dist/static/img/screenshots/form-text-field--default.png +0 -0
- package/dist/static/img/screenshots/layout-divider--accent.png +0 -0
- package/dist/static/img/screenshots/layout-divider--default.png +0 -0
- package/dist/static/img/screenshots/layout-header--header.png +0 -0
- package/dist/static/img/screenshots/layout-section--accent-background.png +0 -0
- package/dist/static/img/screenshots/layout-section--background-image.png +0 -0
- package/dist/static/img/screenshots/layout-section--bold-background.png +0 -0
- package/dist/static/img/screenshots/layout-section--cards.png +0 -0
- package/dist/static/img/screenshots/layout-section--colorful-gradient.png +0 -0
- package/dist/static/img/screenshots/layout-section--flex-layout.png +0 -0
- package/dist/static/img/screenshots/layout-section--inverted.png +0 -0
- package/dist/static/img/screenshots/layout-section--list-layout.png +0 -0
- package/dist/static/img/screenshots/layout-section--slider.png +0 -0
- package/dist/static/img/screenshots/layout-section--spotlight.png +0 -0
- package/dist/static/img/screenshots/layout-section--stagelights.png +0 -0
- package/dist/static/img/screenshots/layout-section--tile-layout.png +0 -0
- package/dist/static/img/screenshots/layout-section--with-buttons.png +0 -0
- package/dist/static/img/screenshots/layout-slider--with-arrows.png +0 -0
- package/dist/static/img/screenshots/layout-slider--with-autoplay.png +0 -0
- package/dist/static/img/screenshots/layout-slider--with-nav.png +0 -0
- package/dist/static/img/screenshots/layout-slider--with-teased-neighbours.png +0 -0
- package/dist/static/img/screenshots/{pages-archetypes--blog-overview.png → page-archetypes-blog-overview--blog-overview.png} +0 -0
- package/dist/static/img/screenshots/page-archetypes-blog-post--blog-post.png +0 -0
- package/dist/static/img/screenshots/page-archetypes-landingpage--landingpage.png +0 -0
- package/dist/static/img/screenshots/page-archetypes-overview--overview.png +0 -0
- package/dist/static/img/screenshots/page-archetypes-showcase--showcase.png +0 -0
- package/dist/tokens/IconSprite.js +105 -388
- package/dist/tokens/icon-sprite.html +54 -37
- package/dist/tokens/themes.css +4 -4
- package/dist/tokens/tokens.css +55 -4
- package/dist/tokens/tokens.js +49 -52
- package/package.json +13 -17
- package/dist/FeatureProps-f8a75850.d.ts +0 -52
- package/dist/FeaturesProps-b05859d6.d.ts +0 -34
- package/dist/TestimonialsProps-f7211553.d.ts +0 -22
- package/dist/components/image/image.css +0 -18
- package/dist/components/image/image.schema.dereffed.json +0 -105
- package/dist/components/image/image.schema.json +0 -95
- package/dist/components/image/index.d.ts +0 -87
- package/dist/components/image/index.js +0 -11
- package/dist/components/picture/picture.schema.json +0 -88
- package/dist/static/img/screenshots/components-image--custom-aspect-ratio.png +0 -0
- package/dist/static/img/screenshots/components-image--preset-size.png +0 -0
- package/dist/static/img/screenshots/components-image--responsive-image.png +0 -0
- package/dist/static/img/screenshots/pages-archetypes--blog-post.png +0 -0
- package/dist/static/img/screenshots/pages-archetypes--content.png +0 -0
- package/dist/static/img/screenshots/pages-archetypes--overview.png +0 -0
- package/dist/static/img/screenshots/pages-archetypes--start.png +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { define, Component } from '@kickstartds/core/lib/component';
|
|
2
|
+
|
|
3
|
+
const consentButtonSelector = ".dsa-html__consent-button";
|
|
4
|
+
const copyScriptTag = (original) => {
|
|
5
|
+
if (original.tagName === "SCRIPT") {
|
|
6
|
+
const copy = document.createElement("script");
|
|
7
|
+
for (const attr of original.attributes) {
|
|
8
|
+
copy.setAttribute(attr.name, attr.value);
|
|
9
|
+
}
|
|
10
|
+
copy.textContent = original.textContent;
|
|
11
|
+
return copy;
|
|
12
|
+
}
|
|
13
|
+
return original;
|
|
14
|
+
};
|
|
15
|
+
class Html extends Component {
|
|
16
|
+
constructor(element) {
|
|
17
|
+
super(element);
|
|
18
|
+
const consentButton = element.querySelector(consentButtonSelector);
|
|
19
|
+
const replaceHtml = () => {
|
|
20
|
+
const template = element.querySelector("template");
|
|
21
|
+
if (template) {
|
|
22
|
+
const elements = [...template.content.children].map(copyScriptTag);
|
|
23
|
+
element.replaceChildren(...elements);
|
|
24
|
+
consentButton?.removeEventListener("click", replaceHtml);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
if (consentButton) {
|
|
28
|
+
consentButton.addEventListener("click", replaceHtml);
|
|
29
|
+
this.onDisconnect(() => {
|
|
30
|
+
consentButton.removeEventListener("click", replaceHtml);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
replaceHtml();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
Html.identifier = "dsa.html";
|
|
39
|
+
define(Html.identifier, Html);
|
|
40
|
+
|
|
41
|
+
export { Html as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.dsa-html {
|
|
2
|
+
--dsa-html__consent--color: var(--ks-text-color-display);
|
|
3
|
+
--dsa-html__consent--font: var(--ks-font-copy-m);
|
|
4
|
+
--dsa-html__consent--font-weight: var(--ks-font-weight-regular);
|
|
5
|
+
--dsa-html__consent--background: var(--ks-color-fg-inverted-alpha-2);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.dsa-html__consent {
|
|
9
|
+
position: relative;
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
gap: var(--ks-spacing-stack-s);
|
|
17
|
+
background-position: center;
|
|
18
|
+
background-size: cover;
|
|
19
|
+
padding: var(--ks-spacing-inset-l);
|
|
20
|
+
}
|
|
21
|
+
.dsa-html__consent .c-rich-text {
|
|
22
|
+
color: var(--dsa-html__consent--color, var(--ks-text-color-display));
|
|
23
|
+
font: var(--dsa-html__consent--font, var(--ks-font-interface-m));
|
|
24
|
+
font-weight: var(--dsa-html__consent--font-weight, var(--ks-font-weight-regular));
|
|
25
|
+
text-align: center;
|
|
26
|
+
}
|
|
27
|
+
.dsa-html__consent:after {
|
|
28
|
+
content: "";
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 100%;
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 0;
|
|
33
|
+
background-color: var(--dsa-html__consent--background, var(--ks-color-fg-inverted-alpha-6));
|
|
34
|
+
}
|
|
35
|
+
.dsa-html__consent > * {
|
|
36
|
+
z-index: 1;
|
|
37
|
+
}
|
|
38
|
+
.dsa-html__consent .l-container {
|
|
39
|
+
container-type: normal;
|
|
40
|
+
}
|
|
41
|
+
.dsa-html__consent--sixteen-to-nine {
|
|
42
|
+
aspect-ratio: 16/9;
|
|
43
|
+
}
|
|
44
|
+
.dsa-html__consent--sixteen-to-ten {
|
|
45
|
+
aspect-ratio: 16/10;
|
|
46
|
+
}
|
|
47
|
+
.dsa-html__consent--four-to-three {
|
|
48
|
+
aspect-ratio: 4/3;
|
|
49
|
+
}
|
|
50
|
+
.dsa-html__consent--square {
|
|
51
|
+
aspect-ratio: 1;
|
|
52
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "http://schema.mydesignsystem.com/html.schema.json",
|
|
4
|
+
"title": "Html",
|
|
5
|
+
"description": "Display raw HTML.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"html": {
|
|
9
|
+
"title": "HTML string",
|
|
10
|
+
"type": "string",
|
|
11
|
+
"examples": [
|
|
12
|
+
"<p style=\"color: var(--ks-text-color-default);\">Hello World</p>"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"consent": {
|
|
16
|
+
"title": "Show HTML after consent",
|
|
17
|
+
"type": "boolean",
|
|
18
|
+
"default": false
|
|
19
|
+
},
|
|
20
|
+
"consentText": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"consentButtonLabel": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"consentBackgroundImage": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"format": "image"
|
|
29
|
+
},
|
|
30
|
+
"consentAspectRatio": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": [
|
|
33
|
+
"16:9",
|
|
34
|
+
"16:10",
|
|
35
|
+
"4:3",
|
|
36
|
+
"1:1"
|
|
37
|
+
],
|
|
38
|
+
"default": "16:9"
|
|
39
|
+
},
|
|
40
|
+
"inverted": {
|
|
41
|
+
"title": "Inverted",
|
|
42
|
+
"description": "Invert the colors of the HTML",
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"default": false
|
|
45
|
+
},
|
|
46
|
+
"className": {
|
|
47
|
+
"title": "Additional Classes",
|
|
48
|
+
"description": "Add additional css classes that should be applied to the element",
|
|
49
|
+
"type": "string"
|
|
50
|
+
},
|
|
51
|
+
"component": {
|
|
52
|
+
"title": "`ks-component` attribute",
|
|
53
|
+
"description": "Optional custom component identifier",
|
|
54
|
+
"type": "string"
|
|
55
|
+
},
|
|
56
|
+
"type": {
|
|
57
|
+
"const": "html"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"additionalProperties": false
|
|
61
|
+
}
|
|
@@ -1,14 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "http://schema.
|
|
4
|
-
"title": "
|
|
3
|
+
"$id": "http://schema.mydesignsystem.com/html.schema.json",
|
|
4
|
+
"title": "Html",
|
|
5
5
|
"description": "Display raw HTML.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
8
|
"html": {
|
|
9
9
|
"title": "HTML string",
|
|
10
10
|
"type": "string",
|
|
11
|
-
"examples": [
|
|
11
|
+
"examples": [
|
|
12
|
+
"<p style=\"color: var(--ks-text-color-default);\">Hello World</p>"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"consent": {
|
|
16
|
+
"title": "Show HTML after consent",
|
|
17
|
+
"type": "boolean",
|
|
18
|
+
"default": false
|
|
19
|
+
},
|
|
20
|
+
"consentText": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"consentButtonLabel": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"consentBackgroundImage": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"format": "image"
|
|
29
|
+
},
|
|
30
|
+
"consentAspectRatio": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": ["16:9", "16:10", "4:3", "1:1"],
|
|
33
|
+
"default": "16:9"
|
|
34
|
+
},
|
|
35
|
+
"inverted": {
|
|
36
|
+
"title": "Inverted",
|
|
37
|
+
"description": "Invert the colors of the HTML",
|
|
38
|
+
"type": "boolean",
|
|
39
|
+
"default": false
|
|
12
40
|
},
|
|
13
41
|
"className": {
|
|
14
42
|
"title": "Additional Classes",
|
|
@@ -1,29 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { HTMLAttributes } from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
type HTMLString = string;
|
|
10
|
-
/**
|
|
11
|
-
* Add additional css classes that should be applied to the element
|
|
12
|
-
*/
|
|
13
|
-
type AdditionalClasses = string;
|
|
14
|
-
/**
|
|
15
|
-
* Optional custom component identifier
|
|
16
|
-
*/
|
|
17
|
-
type KsComponentAttribute = string;
|
|
18
|
-
/**
|
|
19
|
-
* Display raw HTML.
|
|
20
|
-
*/
|
|
21
|
-
interface HTMLProps {
|
|
22
|
-
html?: HTMLString;
|
|
23
|
-
className?: AdditionalClasses;
|
|
24
|
-
component?: KsComponentAttribute;
|
|
25
|
-
}
|
|
26
|
-
declare const HtmlContextDefault: import("react").ForwardRefExoticComponent<HTMLProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
27
|
-
declare const HtmlContext: import("react").Context<import("react").ForwardRefExoticComponent<HTMLProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
28
|
-
declare const Html: import("react").ForwardRefExoticComponent<HTMLProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
import { HtmlProps } from "../../HtmlProps-9d091769.js";
|
|
4
|
+
declare const HtmlContextDefault: import("react").ForwardRefExoticComponent<HtmlProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const HtmlContext: import("react").Context<import("react").ForwardRefExoticComponent<HtmlProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
6
|
+
declare const Html: import("react").ForwardRefExoticComponent<HtmlProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export type { HtmlProps };
|
|
29
8
|
export { HtmlContextDefault, HtmlContext, Html };
|
|
@@ -1,14 +1,35 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./html.css";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
3
|
import { forwardRef, createContext, useContext } from 'react';
|
|
3
4
|
import classnames from 'classnames';
|
|
5
|
+
import { Button } from '@kickstartds/base/lib/button';
|
|
6
|
+
import { RichText } from '@kickstartds/base/lib/rich-text';
|
|
7
|
+
import './Html.client.js';
|
|
8
|
+
import { d as deepMergeDefaults } from '../../helpers-84d80d46.js';
|
|
9
|
+
import '@kickstartds/core/lib/component';
|
|
4
10
|
|
|
5
|
-
const
|
|
6
|
-
|
|
11
|
+
const defaults = {
|
|
12
|
+
"consent": false,
|
|
13
|
+
"consentAspectRatio": "16:9",
|
|
14
|
+
"inverted": false
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const HtmlContextDefault = forwardRef(({ html, consent, consentText, consentBackgroundImage, consentButtonLabel, consentAspectRatio = "16:9", inverted, className, component = "dsa.html", ...props }, ref) => {
|
|
18
|
+
return (jsxs("div", { ref: ref, className: classnames("dsa-html", className), "ks-component": component, "ks-inverted": inverted ? "true" : undefined, ...props, children: [jsx("template", { dangerouslySetInnerHTML: { __html: html } }), consent && (jsxs("div", { style: {
|
|
19
|
+
backgroundImage: consentBackgroundImage
|
|
20
|
+
? `url(${consentBackgroundImage})`
|
|
21
|
+
: undefined,
|
|
22
|
+
}, className: classnames("dsa-html__consent", {
|
|
23
|
+
"dsa-html__consent--sixteen-to-nine": consentAspectRatio === "16:9",
|
|
24
|
+
"dsa-html__consent--sixteen-to-ten": consentAspectRatio === "16:10",
|
|
25
|
+
"dsa-html__consent--four-to-three": consentAspectRatio === "4:3",
|
|
26
|
+
"dsa-html__consent--square": consentAspectRatio === "1:1",
|
|
27
|
+
}), children: [consentText && jsx(RichText, { text: consentText }), jsx(Button, { type: "button", label: consentButtonLabel, className: "dsa-html__consent-button", variant: "primary" })] }))] }));
|
|
7
28
|
});
|
|
8
29
|
const HtmlContext = createContext(HtmlContextDefault);
|
|
9
30
|
const Html = forwardRef((props, ref) => {
|
|
10
31
|
const Component = useContext(HtmlContext);
|
|
11
|
-
return jsx(Component, { ...props, ref: ref });
|
|
32
|
+
return jsx(Component, { ...deepMergeDefaults(defaults, props), ref: ref });
|
|
12
33
|
});
|
|
13
34
|
Html.displayName = "Html";
|
|
14
35
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
--c-storytelling--vertical-padding: var(--dsa-image-story--vertical-padding, var(--ks-spacing-xl));
|
|
13
13
|
}
|
|
14
14
|
.c-storytelling.dsa-image-story .c-storytelling__box__content {
|
|
15
|
-
max-width: var(--
|
|
15
|
+
max-width: var(--dsa-content--width_narrow);
|
|
16
16
|
}
|
|
17
17
|
.c-storytelling.dsa-image-story.c-storytelling--three-to-two img {
|
|
18
18
|
aspect-ratio: 3/2;
|
|
@@ -58,7 +58,11 @@
|
|
|
58
58
|
"format": "image"
|
|
59
59
|
},
|
|
60
60
|
"aspectRatio": {
|
|
61
|
-
"
|
|
61
|
+
"type": "string",
|
|
62
|
+
"title": "Aspect Ratio",
|
|
63
|
+
"description": "The aspect ratio of the image",
|
|
64
|
+
"enum": ["unset", "square", "wide", "landscape"],
|
|
65
|
+
"default": "unset"
|
|
62
66
|
},
|
|
63
67
|
"alt": {
|
|
64
68
|
"title": "Alt text",
|
|
@@ -4,4 +4,5 @@ import { ImageStoryProps } from "../../ImageStoryProps-e853e1e7.js";
|
|
|
4
4
|
declare const ImageStoryContextDefault: import("react").ForwardRefExoticComponent<ImageStoryProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
5
|
declare const ImageStoryContext: import("react").Context<import("react").ForwardRefExoticComponent<ImageStoryProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
6
6
|
declare const ImageStory: import("react").ForwardRefExoticComponent<ImageStoryProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export type { ImageStoryProps };
|
|
7
8
|
export { ImageStoryContextDefault, ImageStoryContext, ImageStory };
|
|
@@ -5,8 +5,21 @@ import { Storytelling } from '@kickstartds/content/lib/storytelling';
|
|
|
5
5
|
import { ButtonContext } from '@kickstartds/base/lib/button';
|
|
6
6
|
import classnames from 'classnames';
|
|
7
7
|
import { useButtonGroup } from '../button-group/index.js';
|
|
8
|
+
import { d as deepMergeDefaults } from '../../helpers-84d80d46.js';
|
|
8
9
|
import '@kickstartds/base/lib/button-group';
|
|
9
10
|
|
|
11
|
+
const defaults = {
|
|
12
|
+
"largeHeadline": false,
|
|
13
|
+
"layout": "imageLeft",
|
|
14
|
+
"padding": false,
|
|
15
|
+
"buttons": [],
|
|
16
|
+
"image": {
|
|
17
|
+
"aspectRatio": "unset",
|
|
18
|
+
"vAlign": "top"
|
|
19
|
+
},
|
|
20
|
+
"textAlign": "left"
|
|
21
|
+
};
|
|
22
|
+
|
|
10
23
|
const ImageStoryContextDefault = forwardRef(({ headline, largeHeadline = false, sub, image, padding = false, textAlign = "left", layout = "textLeft", buttons = [], text, ...rest }, ref) => {
|
|
11
24
|
const ButtonGroup = useButtonGroup();
|
|
12
25
|
return (jsx(ButtonContext.Provider
|
|
@@ -32,7 +45,6 @@ const ImageStoryContextDefault = forwardRef(({ headline, largeHeadline = false,
|
|
|
32
45
|
text: text,
|
|
33
46
|
textAlign: textAlign,
|
|
34
47
|
vAlign: "top",
|
|
35
|
-
// @ts-expect-error
|
|
36
48
|
link: { buttons },
|
|
37
49
|
headline: {
|
|
38
50
|
text: headline,
|
|
@@ -47,7 +59,7 @@ const ImageStoryContextDefault = forwardRef(({ headline, largeHeadline = false,
|
|
|
47
59
|
const ImageStoryContext = createContext(ImageStoryContextDefault);
|
|
48
60
|
const ImageStory = forwardRef((props, ref) => {
|
|
49
61
|
const Component = useContext(ImageStoryContext);
|
|
50
|
-
return jsx(Component, { ...props, ref: ref });
|
|
62
|
+
return jsx(Component, { ...deepMergeDefaults(defaults, props), ref: ref });
|
|
51
63
|
});
|
|
52
64
|
ImageStory.displayName = "ImageStory";
|
|
53
65
|
|
|
@@ -5,4 +5,5 @@ declare const ImageTextContextDefault: import("react").ForwardRefExoticComponent
|
|
|
5
5
|
declare const ImageTextContext: import("react").Context<import("react").ForwardRefExoticComponent<ImageTextProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
6
6
|
declare const ImageText: import("react").ForwardRefExoticComponent<ImageTextProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
7
|
declare const ImageTextProvider: FC<ImageTextProps & HTMLAttributes<HTMLDivElement>>;
|
|
8
|
+
export type { ImageTextProps };
|
|
8
9
|
export { ImageTextContextDefault, ImageTextContext, ImageText, ImageTextProvider };
|
|
@@ -4,6 +4,12 @@ import { forwardRef, createContext, useContext } from 'react';
|
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import { TextMediaContextDefault, TextMediaContext } from '@kickstartds/base/lib/text-media';
|
|
6
6
|
import { Container } from '@kickstartds/core/lib/container';
|
|
7
|
+
import { d as deepMergeDefaults } from '../../helpers-84d80d46.js';
|
|
8
|
+
|
|
9
|
+
const defaults = {
|
|
10
|
+
"highlightText": false,
|
|
11
|
+
"image": {}
|
|
12
|
+
};
|
|
7
13
|
|
|
8
14
|
const ImageTextContextDefault = forwardRef(({ text, image, layout, highlightText, ...rest }, ref) => (jsx(Container, { name: "text-media", ref: ref, children: jsx(TextMediaContextDefault, { ...rest, className: classnames(highlightText ? "dsa-image-text--highlight" : "", "dsa-image-text"), text: text, media: [
|
|
9
15
|
{
|
|
@@ -19,7 +25,7 @@ const ImageTextContextDefault = forwardRef(({ text, image, layout, highlightText
|
|
|
19
25
|
const ImageTextContext = createContext(ImageTextContextDefault);
|
|
20
26
|
const ImageText = forwardRef((props, ref) => {
|
|
21
27
|
const Component = useContext(ImageTextContext);
|
|
22
|
-
return jsx(Component, { ...props, ref: ref });
|
|
28
|
+
return jsx(Component, { ...deepMergeDefaults(defaults, props), ref: ref });
|
|
23
29
|
});
|
|
24
30
|
ImageText.displayName = "ImageText";
|
|
25
31
|
const ImageTextProvider = (props) => (jsx(TextMediaContext.Provider, { ...props, value: ImageTextContextDefault }));
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
import { HeaderProps } from "../../HeaderProps-e22382f1.js";
|
|
8
8
|
import { FooterProps } from "../../FooterProps-171a3067.js";
|
|
9
9
|
import { SeoProps } from "../../SeoProps-f2d6dcaa.js";
|
|
10
|
+
/**
|
|
11
|
+
* Content of the icon sprite for this project
|
|
12
|
+
*/
|
|
13
|
+
type IconSprite = string;
|
|
10
14
|
/**
|
|
11
15
|
* Abstracts global settings made for a website into JSON Schema
|
|
12
16
|
*/
|
|
@@ -23,8 +27,9 @@ interface SettingsProps {
|
|
|
23
27
|
* Referenced component SeoProps
|
|
24
28
|
*/
|
|
25
29
|
seo: SeoProps;
|
|
30
|
+
iconSprite?: IconSprite;
|
|
26
31
|
}
|
|
27
32
|
export * from "../../BlogPostProps-6b3cff22.js";
|
|
28
33
|
export * from "../../BlogOverviewProps-9f207f1c.js";
|
|
29
34
|
export * from "../../PageProps-aa29c554.js";
|
|
30
|
-
export { SettingsProps };
|
|
35
|
+
export { IconSprite, SettingsProps };
|
|
@@ -4,4 +4,5 @@ import { LogoProps } from "../../LogoProps-01796f0a.js";
|
|
|
4
4
|
declare const LogoContextDefault: import("react").ForwardRefExoticComponent<LogoProps & ImgHTMLAttributes<HTMLImageElement> & import("react").RefAttributes<HTMLImageElement>>;
|
|
5
5
|
declare const LogoContext: import("react").Context<import("react").ForwardRefExoticComponent<LogoProps & ImgHTMLAttributes<HTMLImageElement> & import("react").RefAttributes<HTMLImageElement>>>;
|
|
6
6
|
declare const Logo: import("react").ForwardRefExoticComponent<LogoProps & ImgHTMLAttributes<HTMLImageElement> & import("react").RefAttributes<HTMLImageElement>>;
|
|
7
|
+
export type { LogoProps };
|
|
7
8
|
export { LogoContextDefault, LogoContext, Logo };
|
|
@@ -4,6 +4,11 @@ import classnames from 'classnames';
|
|
|
4
4
|
import { forwardRef, createContext, useContext } from 'react';
|
|
5
5
|
import { Picture } from '@kickstartds/base/lib/picture';
|
|
6
6
|
import { Link } from '@kickstartds/base/lib/link';
|
|
7
|
+
import { d as deepMergeDefaults } from '../../helpers-84d80d46.js';
|
|
8
|
+
|
|
9
|
+
const defaults = {
|
|
10
|
+
"homepageHref": "/"
|
|
11
|
+
};
|
|
7
12
|
|
|
8
13
|
const LogoContextDefault = forwardRef(({ src, srcInverted, alt, inverted = false, width, height, homepageHref, className, }, ref) => {
|
|
9
14
|
return (jsx(Link, { className: classnames("dsa-logo", className), href: homepageHref, children: jsx(Picture, { ref: ref, className: "dsa-logo__img", src: inverted && srcInverted ? srcInverted : src, alt: alt, width: width, height: height }) }));
|
|
@@ -11,7 +16,7 @@ const LogoContextDefault = forwardRef(({ src, srcInverted, alt, inverted = false
|
|
|
11
16
|
const LogoContext = createContext(LogoContextDefault);
|
|
12
17
|
const Logo = forwardRef((props, ref) => {
|
|
13
18
|
const Component = useContext(LogoContext);
|
|
14
|
-
return jsx(Component, { ...props, ref: ref });
|
|
19
|
+
return jsx(Component, { ...deepMergeDefaults(defaults, props), ref: ref });
|
|
15
20
|
});
|
|
16
21
|
Logo.displayName = "Logo";
|
|
17
22
|
|
|
@@ -4,4 +4,5 @@ import { LogosProps } from "../../LogosProps-f9474fe2.js";
|
|
|
4
4
|
declare const LogosContextDefault: import("react").ForwardRefExoticComponent<LogosProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
5
|
declare const LogosContext: import("react").Context<import("react").ForwardRefExoticComponent<LogosProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
6
6
|
declare const Logos: import("react").ForwardRefExoticComponent<LogosProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export type { LogosProps };
|
|
7
8
|
export { LogosContextDefault, LogosContext, Logos };
|
|
@@ -6,12 +6,23 @@ import { LogoTiles } from '@kickstartds/content/lib/logo-tiles';
|
|
|
6
6
|
import { Button } from '@kickstartds/base/lib/button';
|
|
7
7
|
import { Link } from '@kickstartds/base/lib/link';
|
|
8
8
|
import { Container } from '@kickstartds/core/lib/container';
|
|
9
|
+
import { d as deepMergeDefaults } from '../../helpers-84d80d46.js';
|
|
10
|
+
|
|
11
|
+
const defaults = {
|
|
12
|
+
"logo": [],
|
|
13
|
+
"align": "center",
|
|
14
|
+
"cta": {
|
|
15
|
+
"toggle": false,
|
|
16
|
+
"link": "#",
|
|
17
|
+
"style": "text"
|
|
18
|
+
}
|
|
19
|
+
};
|
|
9
20
|
|
|
10
21
|
const LogosContextDefault = forwardRef(({ logo: logos = [], tagline, align, cta, logosPerRow = "6", ...rest }, ref) => (jsx("div", { ...rest, ref: ref, children: jsx(Container, { name: "logos", children: jsxs("div", { className: classnames(`dsa-logos dsa-logos--align-${align}`), children: [tagline && jsx("div", { className: "dsa-logos__tagline", children: tagline }), jsx(LogoTiles, { className: classnames(`dsa-logo-tiles dsa-logo-tiles--cols-${logosPerRow}`), logos: logos }), cta?.toggle ? (jsxs("div", { className: "dsa-logos__cta", children: [jsxs("div", { className: "dsa-logos__cta__text", children: [cta?.text, cta?.style === "text" ? (jsxs(Fragment, { children: [" ", jsx(Link, { className: "dsa-logos__cta__link", href: cta.link, children: cta.label })] })) : ("")] }), cta?.style === "button" ? (jsx(Button, { href: cta.link, label: cta.label })) : ("")] })) : ("")] }) }) })));
|
|
11
22
|
const LogosContext = createContext(LogosContextDefault);
|
|
12
23
|
const Logos = forwardRef((props, ref) => {
|
|
13
24
|
const Component = useContext(LogosContext);
|
|
14
|
-
return jsx(Component, { ...props, ref: ref });
|
|
25
|
+
return jsx(Component, { ...deepMergeDefaults(defaults, props), ref: ref });
|
|
15
26
|
});
|
|
16
27
|
Logos.displayName = "Logos";
|
|
17
28
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
.dsa-logos__tagline {
|
|
27
27
|
font: var(--dsa-logos__tagline--font, var(--ks-font-display-m));
|
|
28
28
|
font-weight: var(--dsa-logos__tagline--font-weight, var(--dsa-headline--font-weight));
|
|
29
|
-
max-width: var(--
|
|
29
|
+
max-width: var(--dsa-content--width_narrow);
|
|
30
30
|
color: var(--dsa-logos__tagline--color, var(--dsa-headline--color, var(--ks-text-color-display)));
|
|
31
31
|
width: 100%;
|
|
32
32
|
}
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
.dsa-logos__cta__text {
|
|
42
42
|
color: var(--ks-text-color-default);
|
|
43
|
-
max-width: var(--
|
|
43
|
+
max-width: var(--dsa-content--width_narrow);
|
|
44
44
|
}
|
|
45
45
|
.dsa-logos__cta__text, .dsa-logos__cta__link {
|
|
46
46
|
font: var(--ks-font-copy-m);
|
|
@@ -4,4 +4,5 @@ import { MosaicProps } from "../../MosaicProps-d52c7151.js";
|
|
|
4
4
|
declare const MosaicContextDefault: import("react").ForwardRefExoticComponent<MosaicProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
5
|
declare const MosaicContext: import("react").Context<import("react").ForwardRefExoticComponent<MosaicProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
6
6
|
declare const Mosaic: import("react").ForwardRefExoticComponent<MosaicProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export type { MosaicProps };
|
|
7
8
|
export { MosaicContextDefault, MosaicContext, Mosaic };
|
|
@@ -2,6 +2,13 @@ import "./mosaic.css";
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef, createContext, useContext } from 'react';
|
|
4
4
|
import { Storytelling } from '@kickstartds/content/lib/storytelling';
|
|
5
|
+
import { d as deepMergeDefaults } from '../../helpers-84d80d46.js';
|
|
6
|
+
|
|
7
|
+
const defaults = {
|
|
8
|
+
"layout": "alternate",
|
|
9
|
+
"largeHeadlines": false,
|
|
10
|
+
"tile": []
|
|
11
|
+
};
|
|
5
12
|
|
|
6
13
|
const MosaicContextDefault = forwardRef(({ layout, largeHeadlines, tile, ...rest }, ref) => (jsx("div", { ...rest, ref: ref, className: "dsa-mosaic", children: tile.map((tile, index) => (jsx(Storytelling, { full: true, backgroundColor: tile.backgroundColor, backgroundImage: tile.backgroundImage, box: {
|
|
7
14
|
headline: {
|
|
@@ -33,7 +40,7 @@ const MosaicContextDefault = forwardRef(({ layout, largeHeadlines, tile, ...rest
|
|
|
33
40
|
const MosaicContext = createContext(MosaicContextDefault);
|
|
34
41
|
const Mosaic = forwardRef((props, ref) => {
|
|
35
42
|
const Component = useContext(MosaicContext);
|
|
36
|
-
return jsx(Component, { ...props, ref: ref });
|
|
43
|
+
return jsx(Component, { ...deepMergeDefaults(defaults, props), ref: ref });
|
|
37
44
|
});
|
|
38
45
|
Mosaic.displayName = "Mosaic";
|
|
39
46
|
|
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
font: var(--dsa-mosaic__copy--font, var(--dsa-rich-text--font, var(--ks-font-copy-m)));
|
|
24
24
|
color: var(--dsa-mosaic__copy--color, var(--dsa-rich-text--color, var(--ks-text-color-copy)));
|
|
25
25
|
}
|
|
26
|
+
.dsa-mosaic .c-storytelling__box__content {
|
|
27
|
+
max-width: var(--dsa-content--width_narrow);
|
|
28
|
+
}
|
|
26
29
|
.dsa-mosaic .c-storytelling__box__content[style^=color] .dsa-headline__headline,
|
|
27
30
|
.dsa-mosaic .c-storytelling__box__content[style^=color] .dsa-headline__subheadline {
|
|
28
31
|
color: inherit;
|
|
@@ -31,4 +31,5 @@ interface NavFlyoutProps {
|
|
|
31
31
|
declare const NavFlyoutContextDefault: import("react").ForwardRefExoticComponent<NavFlyoutProps & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
|
|
32
32
|
declare const NavFlyoutContext: import("react").Context<import("react").ForwardRefExoticComponent<NavFlyoutProps & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>>;
|
|
33
33
|
declare const NavFlyout: import("react").ForwardRefExoticComponent<NavFlyoutProps & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
|
|
34
|
+
export type { NavFlyoutProps };
|
|
34
35
|
export { NavFlyoutContextDefault, NavFlyoutContext, NavFlyout };
|
|
@@ -4,8 +4,14 @@ import classnames from 'classnames';
|
|
|
4
4
|
import { Link } from '@kickstartds/base/lib/link';
|
|
5
5
|
import { Logo } from '../logo/index.js';
|
|
6
6
|
import { forwardRef, createContext, useContext } from 'react';
|
|
7
|
+
import { d as deepMergeDefaults } from '../../helpers-84d80d46.js';
|
|
7
8
|
import '@kickstartds/base/lib/picture';
|
|
8
9
|
|
|
10
|
+
const defaults = {
|
|
11
|
+
"items": [],
|
|
12
|
+
"inverted": false
|
|
13
|
+
};
|
|
14
|
+
|
|
9
15
|
const NavFlyoutContextDefault = forwardRef(({ items, inverted, logo }, ref) => items && items.length > 0 ? (jsxs("nav", { className: "dsa-nav-flyout", "ks-inverted": inverted.toString(), id: "dsa-nav-flyout", "aria-label": "Hauptnavigation", ref: ref, children: [jsx(Logo, { ...logo, className: "dsa-nav-flyout__logo" }), jsx("ul", { className: "dsa-nav-flyout__list", children: items.map(({ label, href, active, items: subItems }) => {
|
|
10
16
|
return (jsxs("li", { className: classnames("dsa-nav-flyout__item", active && "dsa-nav-flyout__item--active"), children: [subItems?.length ? (jsx("span", { tabIndex: 0, className: "dsa-nav-flyout__label", children: label })) : (jsx(Link, { href: href, className: `dsa-nav-flyout__label dsa-nav-flyout__link`, children: label })), subItems?.length ? (jsx("ul", { className: "dsa-nav-flyout__sublist", children: subItems.map(({ label, href, active }) => {
|
|
11
17
|
return (jsx("li", { className: classnames("dsa-nav-flyout__item", active && "dsa-nav-flyout__item--active"), children: jsx(Link, { href: href, className: `dsa-nav-flyout__label dsa-nav-flyout__link`, children: label }) }, href));
|
|
@@ -14,7 +20,7 @@ const NavFlyoutContextDefault = forwardRef(({ items, inverted, logo }, ref) => i
|
|
|
14
20
|
const NavFlyoutContext = createContext(NavFlyoutContextDefault);
|
|
15
21
|
const NavFlyout = forwardRef((props, ref) => {
|
|
16
22
|
const Component = useContext(NavFlyoutContext);
|
|
17
|
-
return jsx(Component, { ...props, ref: ref });
|
|
23
|
+
return jsx(Component, { ...deepMergeDefaults(defaults, props), ref: ref });
|
|
18
24
|
});
|
|
19
25
|
NavFlyout.displayName = "NavFlyout";
|
|
20
26
|
|
|
@@ -57,4 +57,5 @@ interface CTA {
|
|
|
57
57
|
declare const NavMainContextDefault: import("react").ForwardRefExoticComponent<NavMainProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
58
58
|
declare const NavMainContext: import("react").Context<import("react").ForwardRefExoticComponent<NavMainProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
59
59
|
declare const NavMain: import("react").ForwardRefExoticComponent<NavMainProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
60
|
+
export type { NavMainProps };
|
|
60
61
|
export { NavMainContextDefault, NavMainContext, NavMain };
|
|
@@ -6,6 +6,7 @@ import './js/navMainEvents.client.js';
|
|
|
6
6
|
import { NavToggle } from '../nav-toggle/index.js';
|
|
7
7
|
import { NavTopbar } from '../nav-topbar/index.js';
|
|
8
8
|
import { NavFlyout } from '../nav-flyout/index.js';
|
|
9
|
+
import { d as deepMergeDefaults } from '../../helpers-84d80d46.js';
|
|
9
10
|
import '@kickstartds/core/lib/component';
|
|
10
11
|
import './js/body.client.js';
|
|
11
12
|
import '@kickstartds/core/lib/core';
|
|
@@ -16,11 +17,20 @@ import '../nav-dropdown/index.js';
|
|
|
16
17
|
import '../logo/index.js';
|
|
17
18
|
import '@kickstartds/base/lib/picture';
|
|
18
19
|
|
|
20
|
+
const defaults = {
|
|
21
|
+
"flyoutInverted": false,
|
|
22
|
+
"dropdownInverted": false,
|
|
23
|
+
"items": [],
|
|
24
|
+
"cta": {
|
|
25
|
+
"toggle": false
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
19
29
|
const NavMainContextDefault = forwardRef(({ logo, items, flyoutInverted, dropdownInverted }, ref) => items && items.length > 0 ? (jsxs("div", { ref: ref, className: "dsa-nav-main", children: [jsx(NavToggle, {}), jsx(NavTopbar, { items: items, inverted: dropdownInverted }), jsx(NavFlyout, { items: items, inverted: flyoutInverted, logo: logo })] })) : null);
|
|
20
30
|
const NavMainContext = createContext(NavMainContextDefault);
|
|
21
31
|
const NavMain = forwardRef((props, ref) => {
|
|
22
32
|
const Component = useContext(NavMainContext);
|
|
23
|
-
return jsx(Component, { ...props, ref: ref });
|
|
33
|
+
return jsx(Component, { ...deepMergeDefaults(defaults, props), ref: ref });
|
|
24
34
|
});
|
|
25
35
|
NavMain.displayName = "NavMain";
|
|
26
36
|
|
|
@@ -26,4 +26,5 @@ interface NavTopbarProps {
|
|
|
26
26
|
declare const NavTopbarContextDefault: import("react").ForwardRefExoticComponent<NavTopbarProps & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
|
|
27
27
|
declare const NavTopbarContext: import("react").Context<import("react").ForwardRefExoticComponent<NavTopbarProps & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>>;
|
|
28
28
|
declare const NavTopbar: import("react").ForwardRefExoticComponent<NavTopbarProps & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
|
|
29
|
+
export type { NavTopbarProps };
|
|
29
30
|
export { NavTopbarContextDefault, NavTopbarContext, NavTopbar };
|