@kickstartds/ds-agency-premium 1.5.4 → 1.5.5

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.
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
+ import { HTMLAttributes } from "react";
2
3
  import { BlogAuthorProps } from "../../BlogAuthorProps-88a11566.js";
3
- declare const BlogAuthorContextDefault: import("react").ForwardRefExoticComponent<BlogAuthorProps & import("react").RefAttributes<HTMLDivElement>>;
4
- declare const BlogAuthorContext: import("react").Context<import("react").ForwardRefExoticComponent<BlogAuthorProps & import("react").RefAttributes<HTMLDivElement>>>;
4
+ declare const BlogAuthorContextDefault: import("react").ForwardRefExoticComponent<BlogAuthorProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
5
+ declare const BlogAuthorContext: import("react").Context<import("react").ForwardRefExoticComponent<BlogAuthorProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>>;
5
6
  declare const BlogAuthor: import("react").ForwardRefExoticComponent<BlogAuthorProps & import("react").RefAttributes<HTMLDivElement>>;
6
7
  export { BlogAuthorContextDefault, BlogAuthorContext, BlogAuthor };
@@ -9,8 +9,8 @@ import '@kickstartds/base/lib/icon';
9
9
  import '@kickstartds/base/lib/rich-text';
10
10
  import '@kickstartds/core/lib/container';
11
11
 
12
- const BlogAuthorContextDefault = forwardRef(({ name, byline, image, links }) => {
13
- return (jsx(Contact, { className: "dsa-blog-aside__author", title: name, subtitle: byline, image: image, links: links }));
12
+ const BlogAuthorContextDefault = forwardRef(({ name, byline, image, links }, ref) => {
13
+ return (jsx(Contact, { ref: ref, className: "dsa-blog-aside__author", title: name, subtitle: byline, image: image, links: links }));
14
14
  });
15
15
  const BlogAuthorContext = createContext(BlogAuthorContextDefault);
16
16
  const BlogAuthor = forwardRef((props, ref) => {
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
+ import { HTMLAttributes } from "react";
2
3
  import { BlogTeaserProps } from "../../BlogTeaserProps-f5855e93.js";
3
- declare const BlogTeaserContextDefault: import("react").ForwardRefExoticComponent<BlogTeaserProps & import("react").RefAttributes<HTMLDivElement>>;
4
- declare const BlogTeaserContext: import("react").Context<import("react").ForwardRefExoticComponent<BlogTeaserProps & import("react").RefAttributes<HTMLDivElement>>>;
4
+ declare const BlogTeaserContextDefault: import("react").ForwardRefExoticComponent<BlogTeaserProps & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLDivElement>>;
5
+ declare const BlogTeaserContext: import("react").Context<import("react").ForwardRefExoticComponent<BlogTeaserProps & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLDivElement>>>;
5
6
  declare const BlogTeaser: import("react").ForwardRefExoticComponent<BlogTeaserProps & import("react").RefAttributes<HTMLDivElement>>;
6
7
  export { BlogTeaserContextDefault, BlogTeaserContext, BlogTeaser };
@@ -1,6 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { HTMLAttributes, FC, PropsWithChildren } from "react";
3
3
  import { ContactProps } from "../../ContactProps-68c71984.js";
4
- declare const Contact: import("react").ForwardRefExoticComponent<ContactProps & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLAnchorElement>>;
4
+ declare const ContactContextDefault: import("react").ForwardRefExoticComponent<ContactProps & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
5
+ declare const ContactContext: import("react").Context<import("react").ForwardRefExoticComponent<ContactProps & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>>;
6
+ declare const Contact: import("react").ForwardRefExoticComponent<ContactProps & import("react").RefAttributes<HTMLDivElement>>;
5
7
  declare const ContactProvider: FC<PropsWithChildren>;
6
- export { Contact, ContactProvider };
8
+ export { ContactContextDefault, ContactContext, Contact, ContactProvider };
@@ -1,16 +1,21 @@
1
1
  import "./contact.css";
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
- import { forwardRef } from 'react';
3
+ import { forwardRef, createContext, useContext } from 'react';
4
4
  import classnames from 'classnames';
5
5
  import { Picture } from '@kickstartds/base/lib/picture';
6
- import { ContactContext } from '@kickstartds/base/lib/contact';
6
+ import { ContactContext as ContactContext$1 } from '@kickstartds/base/lib/contact';
7
7
  import { Link } from '@kickstartds/base/lib/link';
8
8
  import { Icon } from '@kickstartds/base/lib/icon';
9
9
  import { RichText } from '@kickstartds/base/lib/rich-text';
10
10
  import { Container } from '@kickstartds/core/lib/container';
11
11
 
12
- const Contact = forwardRef(({ title, subtitle, image, links, copy, className, ...props }, ref) => (jsx(Container, { name: "contact", children: jsxs("address", { className: classnames("dsa-contact", image?.aspectRatio && `dsa-contact--image-${image?.aspectRatio}`, image?.fullWidth && `dsa-contact--image-full-width`, className), ref: ref, ...props, children: [image && image.src ? (jsx("div", { className: "dsa-contact__image-wrap", children: jsx(Picture, { ...image, className: "dsa-contact__image" }) })) : (""), jsxs("div", { className: "dsa-contact__body", children: [title && (jsxs("div", { className: "dsa-contact__header", children: [jsx("span", { className: "dsa-contact__title", children: title }), jsx("span", { className: "dsa-contact__subtitle", children: subtitle })] })), copy && jsx(RichText, { text: copy, className: "dsa-contact__copy" }), links && links.length ? (jsx("ul", { className: "dsa-contact__links", children: links.map(({ icon, href, label, newTab }, i) => (jsx("li", { children: jsxs(Link, { className: "dsa-contact__link", href: href, ...(newTab ? { target: "_blank", rel: "noopener" } : {}), children: [jsx(Icon, { icon: icon }), label] }) }, i))) })) : ("")] })] }) })));
12
+ const ContactContextDefault = forwardRef(({ title, subtitle, image, links, copy, className, ...props }, ref) => (jsx(Container, { name: "contact", children: jsxs("address", { className: classnames("dsa-contact", image?.aspectRatio && `dsa-contact--image-${image?.aspectRatio}`, image?.fullWidth && `dsa-contact--image-full-width`, className), ref: ref, ...props, children: [image && image.src ? (jsx("div", { className: "dsa-contact__image-wrap", children: jsx(Picture, { ...image, className: "dsa-contact__image" }) })) : (""), jsxs("div", { className: "dsa-contact__body", children: [title && (jsxs("div", { className: "dsa-contact__header", children: [jsx("span", { className: "dsa-contact__title", children: title }), jsx("span", { className: "dsa-contact__subtitle", children: subtitle })] })), copy && jsx(RichText, { text: copy, className: "dsa-contact__copy" }), links && links.length ? (jsx("ul", { className: "dsa-contact__links", children: links.map(({ icon, href, label, newTab }, i) => (jsx("li", { children: jsxs(Link, { className: "dsa-contact__link", href: href, ...(newTab ? { target: "_blank", rel: "noopener" } : {}), children: [jsx(Icon, { icon: icon }), label] }) }, i))) })) : ("")] })] }) })));
13
+ const ContactContext = createContext(ContactContextDefault);
14
+ const Contact = forwardRef((props, ref) => {
15
+ const Component = useContext(ContactContext);
16
+ return jsx(Component, { ...props, ref: ref });
17
+ });
13
18
  Contact.displayName = "Contact";
14
- const ContactProvider = (props) => (jsx(ContactContext.Provider, { ...props, value: Contact }));
19
+ const ContactProvider = (props) => (jsx(ContactContext$1.Provider, { ...props, value: Contact }));
15
20
 
16
- export { Contact, ContactProvider };
21
+ export { Contact, ContactContext, ContactContextDefault, ContactProvider };
@@ -1,4 +1,5 @@
1
- import { ForwardRefRenderFunction, HTMLAttributes } from 'react';
1
+ /// <reference types="react" />
2
+ import { HTMLAttributes } from "react";
2
3
  /* eslint-disable */
3
4
  /**
4
5
  * This file was automatically generated by json-schema-to-typescript.
@@ -22,5 +23,7 @@ interface HTMLProps {
22
23
  className?: AdditionalClasses;
23
24
  component?: KsComponentAttribute;
24
25
  }
25
- declare const HtmlComponent: ForwardRefRenderFunction<HTMLDivElement, HTMLProps & HTMLAttributes<HTMLDivElement>>;
26
- export { HTMLProps, HtmlComponent };
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 & import("react").RefAttributes<HTMLDivElement>>;
29
+ export { HtmlContextDefault, HtmlContext, Html };
@@ -1,6 +1,15 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
+ import { forwardRef, createContext, useContext } from 'react';
2
3
  import classnames from 'classnames';
3
4
 
4
- const HtmlComponent = ({ html, className, component, ...props }, ref) => (jsx("div", { className: classnames('c-html', className), dangerouslySetInnerHTML: { __html: html }, "ks-component": component, ref: ref, ...props }));
5
+ const HtmlContextDefault = forwardRef(({ html, className, component, ...props }, ref) => {
6
+ return (jsx("div", { ref: ref, className: classnames("c-html", className), dangerouslySetInnerHTML: { __html: html }, "ks-component": component, ...props }));
7
+ });
8
+ const HtmlContext = createContext(HtmlContextDefault);
9
+ const Html = forwardRef((props, ref) => {
10
+ const Component = useContext(HtmlContext);
11
+ return jsx(Component, { ...props, ref: ref });
12
+ });
13
+ Html.displayName = "Html";
5
14
 
6
- export { HtmlComponent };
15
+ export { Html, HtmlContext, HtmlContextDefault };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 04 Sep 2024 07:02:33 GMT
3
+ * Generated on Wed, 04 Sep 2024 07:32:05 GMT
4
4
  */
5
5
  :root, [ks-theme] {
6
6
  --ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 04 Sep 2024 07:02:36 GMT
3
+ * Generated on Wed, 04 Sep 2024 07:32:08 GMT
4
4
  */
5
5
  :root [ks-theme=business] {
6
6
  --ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
@@ -2727,7 +2727,7 @@
2727
2727
  }
2728
2728
  /**
2729
2729
  * Do not edit directly
2730
- * Generated on Wed, 04 Sep 2024 07:02:40 GMT
2730
+ * Generated on Wed, 04 Sep 2024 07:32:13 GMT
2731
2731
  */
2732
2732
  :root [ks-theme=google] {
2733
2733
  --ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
@@ -5458,7 +5458,7 @@
5458
5458
  }
5459
5459
  /**
5460
5460
  * Do not edit directly
5461
- * Generated on Wed, 04 Sep 2024 07:02:38 GMT
5461
+ * Generated on Wed, 04 Sep 2024 07:32:10 GMT
5462
5462
  */
5463
5463
  :root [ks-theme=ngo] {
5464
5464
  --ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
@@ -8459,7 +8459,7 @@
8459
8459
  }
8460
8460
  /**
8461
8461
  * Do not edit directly
8462
- * Generated on Wed, 04 Sep 2024 07:02:42 GMT
8462
+ * Generated on Wed, 04 Sep 2024 07:32:15 GMT
8463
8463
  */
8464
8464
  :root [ks-theme=telekom] {
8465
8465
  --ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 04 Sep 2024 07:02:33 GMT
3
+ * Generated on Wed, 04 Sep 2024 07:32:05 GMT
4
4
  */
5
5
 
6
6
  :root, [ks-theme] {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 04 Sep 2024 07:02:33 GMT
3
+ * Generated on Wed, 04 Sep 2024 07:32:06 GMT
4
4
  */
5
5
 
6
6
  export const KsBackgroundColorAccentBase = "#230a2b";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kickstartds/ds-agency-premium",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/kickstartDS/ds-agency-premium#readme",
6
6
  "bugs": {