@kickstartds/ds-agency-premium 1.5.39 → 1.5.41

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.
@@ -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);
@@ -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,
@@ -74,6 +74,11 @@
74
74
  "title": "Class Name",
75
75
  "description": "Set a custom class name"
76
76
  },
77
+ "id": {
78
+ "type": "string",
79
+ "title": "ID",
80
+ "description": "Set a custom id attribute"
81
+ },
77
82
  "type": {
78
83
  "const": "headline"
79
84
  }
@@ -53,6 +53,11 @@
53
53
  "type": "string",
54
54
  "title": "Class Name",
55
55
  "description": "Set a custom class name"
56
+ },
57
+ "id": {
58
+ "type": "string",
59
+ "title": "ID",
60
+ "description": "Set a custom id attribute"
56
61
  }
57
62
  },
58
63
  "additionalProperties": false,
@@ -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;
@@ -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) })), props.id && level === "h2" ? (jsx("a", { href: `#${props.id}`, className: "dsa-headline__anchor", children: jsx(TagName, { className: classnames("dsa-headline__headline"), children: renderContent(text) }) })) : (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,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 24 Oct 2024 10:20:17 GMT
3
+ * Generated on Thu, 24 Oct 2024 11:20:51 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 Thu, 24 Oct 2024 10:20:20 GMT
3
+ * Generated on Thu, 24 Oct 2024 11:20:53 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 Thu, 24 Oct 2024 10:20:24 GMT
2730
+ * Generated on Thu, 24 Oct 2024 11:20:57 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 Thu, 24 Oct 2024 10:20:22 GMT
5461
+ * Generated on Thu, 24 Oct 2024 11:20:55 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 Thu, 24 Oct 2024 10:20:27 GMT
8462
+ * Generated on Thu, 24 Oct 2024 11:20:59 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 Thu, 24 Oct 2024 10:20:17 GMT
3
+ * Generated on Thu, 24 Oct 2024 11:20:51 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 Thu, 24 Oct 2024 10:20:18 GMT
3
+ * Generated on Thu, 24 Oct 2024 11:20:51 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.39",
3
+ "version": "1.5.41",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/kickstartDS/ds-agency-premium#readme",
6
6
  "bugs": {