@kickstartds/ds-agency-premium 1.7.0--canary.18.1660.0 → 1.7.0--canary.46.1791.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-author/blog-author.schema.dereffed.json +2 -1
- package/dist/components/blog-author/index.d.ts +1 -0
- 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 +2 -2
- 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-post/blog-post.schema.dereffed.json +181 -119
- package/dist/components/blog-post/index.d.ts +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 +4 -4
- 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/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 +2 -1
- package/dist/components/divider/divider.css +1 -1
- package/dist/components/divider/index.d.ts +2 -26
- package/dist/components/faq/index.d.ts +1 -0
- 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 +2 -1
- 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 +11 -2
- package/dist/components/footer/footer.css +4 -4
- package/dist/components/footer/index.d.ts +1 -0
- package/dist/components/gallery/gallery.css +0 -18
- package/dist/components/gallery/index.d.ts +1 -0
- package/dist/components/header/header.css +2 -3
- package/dist/components/header/index.d.ts +4 -3
- package/dist/components/header/index.js +1 -1
- 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 +4 -2
- 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 +17 -3
- 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 +0 -1
- package/dist/components/image-text/index.d.ts +1 -0
- package/dist/components/index/index.d.ts +6 -1
- package/dist/components/logo/index.d.ts +1 -0
- package/dist/components/logos/index.d.ts +1 -0
- package/dist/components/logos/logos.css +2 -2
- package/dist/components/mosaic/index.d.ts +1 -0
- 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-main/index.d.ts +1 -0
- package/dist/components/nav-topbar/index.d.ts +1 -0
- 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 +106 -389
- package/dist/components/page-wrapper/tokens.css +55 -4
- package/dist/components/presets.json +182 -237
- package/dist/components/providers/index.js +1 -1
- package/dist/components/section/index.d.ts +2 -1
- package/dist/components/section/index.js +2 -2
- 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 +12 -3
- 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/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 +2 -1
- package/dist/components/testimonial/index.d.ts +49 -1
- package/dist/components/testimonial/index.js +4 -1
- 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 +2 -2
- 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/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/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/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
|
@@ -4,4 +4,5 @@ import { HTMLAttributes } from "react";
|
|
|
4
4
|
declare const FooterContextDefault: import("react").ForwardRefExoticComponent<FooterProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
5
|
declare const FooterContext: import("react").Context<import("react").ForwardRefExoticComponent<FooterProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
6
6
|
declare const Footer: import("react").ForwardRefExoticComponent<FooterProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export type { FooterProps };
|
|
7
8
|
export { FooterContextDefault, FooterContext, Footer };
|
|
@@ -37,22 +37,4 @@
|
|
|
37
37
|
.dsa-gallery__image--landscape img {
|
|
38
38
|
aspect-ratio: var(--dsa-gallery--image-ratio-landscape);
|
|
39
39
|
object-fit: cover;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.pswp .pswp__img {
|
|
43
|
-
object-fit: contain;
|
|
44
|
-
}
|
|
45
|
-
.pswp .pswp__caption {
|
|
46
|
-
background-color: var(--ks-color-bg-alpha-3);
|
|
47
|
-
color: var(--dsa-text-color-on-primary);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
:root, [ks-inverted], [ks-theme] {
|
|
51
|
-
--c-lightbox--bg: var(--ks-background-color-default) !important;
|
|
52
|
-
--c-lightbox--placeholder-bg: var(--ks-color-fg-to-bg-1) !important;
|
|
53
|
-
--c-lightbox--root-z-index: var(--ks-depth-modal) !important;
|
|
54
|
-
--c-lightbox--icon-color: var(--dsa-text-color-on-primary) !important;
|
|
55
|
-
--c-lightbox--icon-color-secondary: var(--ks-color-fg-inverted) !important;
|
|
56
|
-
--c-lightbox--stroke-width: 0px !important;
|
|
57
|
-
--c-lightbox--error-text-color: var(--ks-color-error) !important;
|
|
58
40
|
}
|
|
@@ -4,4 +4,5 @@ import { GalleryProps } from "../../GalleryProps-76e7de44.js";
|
|
|
4
4
|
declare const GalleryContextDefault: import("react").ForwardRefExoticComponent<GalleryProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
5
|
declare const GalleryContext: import("react").Context<import("react").ForwardRefExoticComponent<GalleryProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
6
6
|
declare const Gallery: import("react").ForwardRefExoticComponent<GalleryProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export type { GalleryProps };
|
|
7
8
|
export { GalleryContextDefault, GalleryContext, Gallery };
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.dsa-header {
|
|
17
|
-
--dsa-header--max-width: var(--
|
|
17
|
+
--dsa-header--max-width: var(--dsa-content--width_max);
|
|
18
18
|
--dsa-header--background: var(--ks-background-color-default);
|
|
19
19
|
--dsa-header_floating--background: linear-gradient(var(--ks-color-bg), transparent);
|
|
20
20
|
--dsa-header__logo--height: var(--dsa-logo--height);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.dsa-header {
|
|
24
|
+
z-index: 999;
|
|
24
25
|
background: var(--dsa-header--background, var(--ks-background-color-default));
|
|
25
|
-
z-index: 1;
|
|
26
26
|
width: 100%;
|
|
27
27
|
display: flex;
|
|
28
28
|
padding: var(--dsa-header--spacing-vertical) 0;
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
.dsa-header--floating {
|
|
32
32
|
background: var(--dsa-header_floating--background, linear-gradient(var(--ks-color-bg-alpha-5), transparent));
|
|
33
33
|
position: absolute;
|
|
34
|
-
z-index: 999;
|
|
35
34
|
}
|
|
36
35
|
.dsa-header--floating .c-nav-main__link {
|
|
37
36
|
text-shadow: 0 0 10px var(--ks-color-bg-alpha-5);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { HTMLAttributes } from "react";
|
|
3
3
|
import { HeaderProps } from "../../HeaderProps-e22382f1.js";
|
|
4
|
-
declare const HeaderContextDefault: import("react").ForwardRefExoticComponent<HeaderProps & HTMLAttributes<
|
|
5
|
-
declare const HeaderContext: import("react").Context<import("react").ForwardRefExoticComponent<HeaderProps & HTMLAttributes<
|
|
6
|
-
declare const Header: import("react").ForwardRefExoticComponent<HeaderProps & HTMLAttributes<
|
|
4
|
+
declare const HeaderContextDefault: import("react").ForwardRefExoticComponent<HeaderProps & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
|
|
5
|
+
declare const HeaderContext: import("react").Context<import("react").ForwardRefExoticComponent<HeaderProps & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>>;
|
|
6
|
+
declare const Header: import("react").ForwardRefExoticComponent<HeaderProps & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
|
|
7
|
+
export type { HeaderProps };
|
|
7
8
|
export { HeaderContextDefault, HeaderContext, Header };
|
|
@@ -17,7 +17,7 @@ import '../nav-dropdown/index.js';
|
|
|
17
17
|
import '../nav-flyout/index.js';
|
|
18
18
|
import '@kickstartds/base/lib/picture';
|
|
19
19
|
|
|
20
|
-
const HeaderContextDefault = forwardRef(({ logo, floating, inverted = false, flyoutInverted = false, dropdownInverted = false, navItems = [], }, ref) => (jsx("
|
|
20
|
+
const HeaderContextDefault = forwardRef(({ logo, floating, inverted = false, flyoutInverted = false, dropdownInverted = false, navItems = [], }, ref) => (jsx("header", { className: classnames("dsa-header", floating ? `dsa-header--floating` : ""), "ks-inverted": inverted.toString(), ref: ref, 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: {
|
|
21
21
|
...logo,
|
|
22
22
|
inverted: flyoutInverted,
|
|
23
23
|
} })] }) })));
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
--dsa-headline--space-after_large: var(--ks-spacing-stack-l);
|
|
7
7
|
--dsa-headline--space-after_small: var(--ks-spacing-stack-m);
|
|
8
8
|
--dsa-headline--space-after_minimum: var(--ks-spacing-stack-s);
|
|
9
|
-
--dsa-headline--higlight-background:
|
|
9
|
+
--dsa-headline--higlight-background: var(--dsa-typo--highlight);
|
|
10
10
|
--dsa-headline__subheadline--color: var(--ks-text-color-primary);
|
|
11
11
|
--dsa-headline__subheadline--font-weight: var(--ks-font-weight-semi-bold);
|
|
12
12
|
--dsa-headline_h1--font: var(--ks-font-display-xxl);
|
|
@@ -53,6 +53,18 @@
|
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
gap: var(--dsa-headline--gap, 0.25em);
|
|
55
55
|
}
|
|
56
|
+
.dsa-headline__inner {
|
|
57
|
+
position: relative;
|
|
58
|
+
}
|
|
59
|
+
.dsa-headline__anchor {
|
|
60
|
+
--g-link--text-decoration: none;
|
|
61
|
+
visibility: hidden;
|
|
62
|
+
position: absolute;
|
|
63
|
+
margin: 0 var(--ks-spacing-inline-s);
|
|
64
|
+
}
|
|
65
|
+
.dsa-headline:hover .dsa-headline__anchor {
|
|
66
|
+
visibility: visible;
|
|
67
|
+
}
|
|
56
68
|
.dsa-headline .dsa-headline__headline {
|
|
57
69
|
font: var(--headline--font);
|
|
58
70
|
text-transform: var(--dsa-headline--text-transform);
|
|
@@ -101,7 +113,7 @@
|
|
|
101
113
|
.dsa-headline .dsa-headline__subheadline {
|
|
102
114
|
font: var(--subheadline--font);
|
|
103
115
|
margin: 0;
|
|
104
|
-
max-width: var(--
|
|
116
|
+
max-width: var(--dsa-content--width_default);
|
|
105
117
|
color: var(--dsa-headline__subheadline--color, var(--ks-text-color-primary));
|
|
106
118
|
font-weight: var(--dsa-headline__subheadline--font-weight, var(--ks-font-weight-semi-bold));
|
|
107
119
|
}
|
|
@@ -128,6 +140,10 @@
|
|
|
128
140
|
text-align: right;
|
|
129
141
|
margin-left: auto;
|
|
130
142
|
}
|
|
143
|
+
.dsa-headline--align-right .dsa-headline__anchor {
|
|
144
|
+
top: 0;
|
|
145
|
+
right: 100%;
|
|
146
|
+
}
|
|
131
147
|
|
|
132
148
|
.dsa-headline strong,
|
|
133
149
|
h1 strong,
|
|
@@ -36,6 +36,10 @@ type SpaceAfter = "minimum" | "small" | "large";
|
|
|
36
36
|
* Set a custom class name
|
|
37
37
|
*/
|
|
38
38
|
type ClassName = string;
|
|
39
|
+
/**
|
|
40
|
+
* Set a custom id attribute
|
|
41
|
+
*/
|
|
42
|
+
type ID = string;
|
|
39
43
|
/**
|
|
40
44
|
* Component used for headlines
|
|
41
45
|
*/
|
|
@@ -48,6 +52,7 @@ interface HeadlineProps {
|
|
|
48
52
|
style?: Style;
|
|
49
53
|
spaceAfter?: SpaceAfter;
|
|
50
54
|
className?: ClassName;
|
|
55
|
+
id?: ID;
|
|
51
56
|
}
|
|
52
57
|
interface RenderFunctions {
|
|
53
58
|
renderContent?: typeof defaultRenderFn;
|
|
@@ -55,4 +60,5 @@ interface RenderFunctions {
|
|
|
55
60
|
}
|
|
56
61
|
declare const Headline: import("react").ForwardRefExoticComponent<HeadlineProps & RenderFunctions & Omit<HTMLAttributes<HTMLElement>, "style"> & import("react").RefAttributes<HTMLElement>>;
|
|
57
62
|
declare const HeadlineProvider: FC<PropsWithChildren>;
|
|
63
|
+
export type { HeadlineProps };
|
|
58
64
|
export { Headline, HeadlineProvider };
|
|
@@ -9,7 +9,7 @@ const Headline = forwardRef(({ content, text = content, sub, align = "left", swi
|
|
|
9
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)
|
|
10
10
|
styleAs, style = styleAs || "h2", spaceAfter = "small", className, renderContent = compiler, renderSubheadline = compiler, ...props }, ref) => {
|
|
11
11
|
const TagName = level;
|
|
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;
|
|
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: jsxs("span", { className: "dsa-headline__inner", children: [renderContent(text), props.id && level === "h2" && (jsx("a", { href: `#${props.id}`, className: "dsa-headline__anchor", "aria-label": "Link to this section", title: "Link to this section", children: "#" }))] }) }), sub && !switchOrder && (jsx("p", { className: "dsa-headline__subheadline", children: renderSubheadline(sub) }))] })) : null;
|
|
13
13
|
});
|
|
14
14
|
Headline.displayName = "Headline";
|
|
15
15
|
const HeadlineProvider = (props) => (jsx(HeadlineContext.Provider, { ...props, value: Headline }));
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
.l-container--visual {
|
|
2
|
+
/* stylelint-disable-next-line property-no-unknown */
|
|
3
|
+
container-name: visual;
|
|
4
|
+
}
|
|
5
|
+
|
|
1
6
|
.dsa-hero {
|
|
7
|
+
--dsa-hero--min-height: 18rem;
|
|
8
|
+
--dsa-hero--min-height_small: 13.2rem;
|
|
2
9
|
--dsa-hero__headline--color: var(--dsa-headline--color);
|
|
3
10
|
--dsa-hero__subheadline--color: var(--dsa-headline__subheadline--color);
|
|
4
11
|
--dsa-hero_color-neutral__headline--color: var(--ks-text-color-default);
|
|
@@ -7,11 +14,30 @@
|
|
|
7
14
|
--dsa-hero__copy--font: var(--dsa-rich-text--font);
|
|
8
15
|
--dsa-hero_highlight-text__copy--font: var(--ks-font-copy-l);
|
|
9
16
|
--dsa-hero_color-neutral__copy--color: var(--ks-text-color-default);
|
|
17
|
+
--dsa-hero__textbox--background-color: var(--ks-color-bg-alpha-2);
|
|
10
18
|
--dsa-hero__textbox--border-radius: var(--ks-border-radius-surface);
|
|
19
|
+
--dsa-hero__textbox--max-width: var(--dsa-content--width_narrow);
|
|
11
20
|
--dsa-hero__textbox--padding: var(--ks-spacing-inset-squish-xl);
|
|
12
|
-
--dsa-hero__texbox--background-color: var(--ks-color-bg-alpha-2);
|
|
13
21
|
--dsa-hero__overlay--background: linear-gradient(0deg, var(--ks-background-color-default) 15%, transparent 50%);
|
|
14
22
|
}
|
|
23
|
+
@container visual (min-width: 640px) {
|
|
24
|
+
.dsa-hero {
|
|
25
|
+
--dsa-hero--min-height: 21rem;
|
|
26
|
+
--dsa-hero--min-height_small: 13.35rem;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
@container visual (min-width: 960px) {
|
|
30
|
+
.dsa-hero {
|
|
31
|
+
--dsa-hero--min-height: 31.5rem;
|
|
32
|
+
--dsa-hero--min-height_small: 15.8rem;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
@container visual (min-width: 1024px) {
|
|
36
|
+
.dsa-hero {
|
|
37
|
+
--dsa-hero--min-height: 35rem;
|
|
38
|
+
--dsa-hero--min-height_small: 20rem;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
15
41
|
|
|
16
42
|
.l-container--visual {
|
|
17
43
|
/* stylelint-disable-next-line property-no-unknown */
|
|
@@ -21,9 +47,10 @@
|
|
|
21
47
|
.c-visual.dsa-hero {
|
|
22
48
|
--c-visual_overlay--background-size: 100%;
|
|
23
49
|
--c-visual_overlay--background: transparent;
|
|
50
|
+
min-height: var(--dsa-hero--min-height);
|
|
24
51
|
}
|
|
25
52
|
.c-visual.dsa-hero .c-visual__box {
|
|
26
|
-
--c-visual_box--background: var(--dsa-
|
|
53
|
+
--c-visual_box--background: var(--dsa-hero__textbox--background-color, var(--ks-color-bg-alpha-2));
|
|
27
54
|
--c-visual_box--color: var(--dsa-hero__copy--color, var(--ks-text-color-default));
|
|
28
55
|
--c-visual_box--border-radius: var(--dsa-hero__textbox--border-radius, var(--ks-border-radius-surface));
|
|
29
56
|
--c-visual_box--padding: var(--dsa-hero__textbox--padding, var(--ks-spacing-inset-squish-xl));
|
|
@@ -37,6 +64,9 @@
|
|
|
37
64
|
--dsa-hero__headline--color: var(--dsa-hero_color-neutral__copy--color, var(--ks-text-color-default));
|
|
38
65
|
--dsa-hero__subheadline--color: var(--dsa-hero_color-neutral__copy--color, var(--ks-text-color-default));
|
|
39
66
|
}
|
|
67
|
+
.c-visual.dsa-hero.c-visual--small {
|
|
68
|
+
min-height: var(--dsa-hero--min-height_small);
|
|
69
|
+
}
|
|
40
70
|
@container visual (min-width: 640px) {
|
|
41
71
|
.c-visual.dsa-hero {
|
|
42
72
|
--c-visual_overlay--background: radial-gradient(
|
|
@@ -52,7 +82,7 @@
|
|
|
52
82
|
);
|
|
53
83
|
}
|
|
54
84
|
.c-visual.dsa-hero .c-visual__box {
|
|
55
|
-
--c-visual_box--max-width:
|
|
85
|
+
--c-visual_box--max-width: var(--dsa-hero__textbox--max-width, var(--dsa-content--width_narrow));
|
|
56
86
|
}
|
|
57
87
|
}
|
|
58
88
|
|
|
@@ -74,7 +104,7 @@
|
|
|
74
104
|
padding: var(--c-visual_box--padding);
|
|
75
105
|
}
|
|
76
106
|
.c-visual.dsa-hero .c-visual__content--indent {
|
|
77
|
-
max-width: var(--
|
|
107
|
+
max-width: var(--dsa-content--width_wide);
|
|
78
108
|
}
|
|
79
109
|
@container visual (min-width: 640px) {
|
|
80
110
|
.c-visual.dsa-hero.dsa-hero--content-below .c-visual__media {
|
|
@@ -89,7 +119,10 @@
|
|
|
89
119
|
position: relative;
|
|
90
120
|
}
|
|
91
121
|
.c-visual.dsa-hero.dsa-hero--content-below .c-visual__content .c-visual__box {
|
|
92
|
-
--c-visual_box--max-width: var(--
|
|
122
|
+
--c-visual_box--max-width: var(--dsa-content--width_default);
|
|
123
|
+
}
|
|
124
|
+
.c-visual.dsa-hero.c-visual--no-crop {
|
|
125
|
+
--c-visual--min-height: 0;
|
|
93
126
|
}
|
|
94
127
|
@container visual (min-width: 640px) {
|
|
95
128
|
.c-visual.dsa-hero.dsa-hero--content-below.c-visual--no-crop .c-visual__media .c-visual__image {
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"icon": {
|
|
69
69
|
"type": "string",
|
|
70
|
+
"format": "icon",
|
|
70
71
|
"title": "Icon",
|
|
71
72
|
"description": "Choose an icon"
|
|
72
73
|
},
|
|
@@ -156,10 +157,11 @@
|
|
|
156
157
|
"center",
|
|
157
158
|
"below",
|
|
158
159
|
"left",
|
|
159
|
-
"right"
|
|
160
|
+
"right",
|
|
161
|
+
"corner"
|
|
160
162
|
],
|
|
161
163
|
"type": "string",
|
|
162
|
-
"default": "
|
|
164
|
+
"default": "below"
|
|
163
165
|
},
|
|
164
166
|
"type": {
|
|
165
167
|
"const": "hero"
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"textPosition": {
|
|
74
74
|
"title": "Module aligment",
|
|
75
75
|
"description": "Choose the alginment of the module content",
|
|
76
|
-
"enum": ["center", "below", "left", "right"],
|
|
76
|
+
"enum": ["center", "below", "left", "right", "corner"],
|
|
77
77
|
"type": "string",
|
|
78
|
-
"default": "
|
|
78
|
+
"default": "below"
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"additionalProperties": false
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { HTMLAttributes } from "react";
|
|
3
|
-
import { HeroProps } from "../../HeroProps-
|
|
3
|
+
import { HeroProps } from "../../HeroProps-f704d270.js";
|
|
4
4
|
declare const HeroContextDefault: import("react").ForwardRefExoticComponent<HeroProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
5
|
declare const HeroContext: import("react").Context<import("react").ForwardRefExoticComponent<HeroProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
6
6
|
declare const Hero: import("react").ForwardRefExoticComponent<HeroProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export type { HeroProps };
|
|
7
8
|
export { HeroContextDefault, HeroContext, Hero };
|
|
@@ -17,8 +17,10 @@ const HeroContextDefault = forwardRef(({ headline, sub, height, text, highlightT
|
|
|
17
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
|
-
vertical: textPosition === "below"
|
|
21
|
-
|
|
20
|
+
vertical: textPosition === "below" || textPosition === "corner"
|
|
21
|
+
? "bottom"
|
|
22
|
+
: "center",
|
|
23
|
+
horizontal: textPosition === "left" || textPosition === "corner"
|
|
22
24
|
? "left"
|
|
23
25
|
: textPosition === "right"
|
|
24
26
|
? "right"
|
|
@@ -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,9 +1,23 @@
|
|
|
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 '@kickstartds/core/lib/component';
|
|
4
9
|
|
|
5
|
-
const HtmlContextDefault = forwardRef(({ html, className, component, ...props }, ref) => {
|
|
6
|
-
return (
|
|
10
|
+
const HtmlContextDefault = forwardRef(({ html, consent, consentText, consentBackgroundImage, consentButtonLabel, consentAspectRatio = "16:9", inverted, className, component = "dsa.html", ...props }, ref) => {
|
|
11
|
+
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: {
|
|
12
|
+
backgroundImage: consentBackgroundImage
|
|
13
|
+
? `url(${consentBackgroundImage})`
|
|
14
|
+
: undefined,
|
|
15
|
+
}, className: classnames("dsa-html__consent", {
|
|
16
|
+
"dsa-html__consent--sixteen-to-nine": consentAspectRatio === "16:9",
|
|
17
|
+
"dsa-html__consent--sixteen-to-ten": consentAspectRatio === "16:10",
|
|
18
|
+
"dsa-html__consent--four-to-three": consentAspectRatio === "4:3",
|
|
19
|
+
"dsa-html__consent--square": consentAspectRatio === "1:1",
|
|
20
|
+
}), children: [consentText && jsx(RichText, { text: consentText }), jsx(Button, { type: "button", label: consentButtonLabel, className: "dsa-html__consent-button", variant: "primary" })] }))] }));
|
|
7
21
|
});
|
|
8
22
|
const HtmlContext = createContext(HtmlContextDefault);
|
|
9
23
|
const Html = forwardRef((props, ref) => {
|
|
@@ -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;
|