@kickstartds/ds-agency-premium 1.6.14 → 1.6.16

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.
@@ -4,7 +4,6 @@ import { Section } from '../section/index.js';
4
4
  import { BlogTeaser } from '../blog-teaser/index.js';
5
5
  import { Cta } from '../cta/index.js';
6
6
  import { Divider } from '@kickstartds/base/lib/divider';
7
- import '../section/js/spotlight.client.js';
8
7
  import 'classnames';
9
8
  import '@kickstartds/core/lib/react';
10
9
  import '@kickstartds/base/lib/section';
@@ -8,7 +8,6 @@ import { Cta } from '../cta/index.js';
8
8
  import 'classnames';
9
9
  import 'react';
10
10
  import '@kickstartds/blog/lib/post-head';
11
- import '../section/js/spotlight.client.js';
12
11
  import '@kickstartds/core/lib/react';
13
12
  import '@kickstartds/base/lib/section';
14
13
  import '../section/js/Section.client.js';
@@ -28,7 +28,7 @@
28
28
  }
29
29
  .dsa-footer__content {
30
30
  padding: var(--l-section--space-small) var(--dsa-content--spacing);
31
- border-top: var(--dsa-footer--border-top, 1px solid var(--ks-border-color-accent));
31
+ border-top: var(--dsa-footer--border-top, 1px solid var(--ks-border-color-default));
32
32
  max-width: var(--dsa-footer--max-width, var(--l-section--content-width-wide));
33
33
  width: 100%;
34
34
  margin: auto;
@@ -8,7 +8,6 @@ import 'react';
8
8
  import 'classnames';
9
9
  import '@kickstartds/base/lib/button';
10
10
  import '../section/index.js';
11
- import '../section/js/spotlight.client.js';
12
11
  import '@kickstartds/core/lib/react';
13
12
  import '@kickstartds/base/lib/section';
14
13
  import '../section/js/Section.client.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 20 Nov 2024 12:15:04 GMT
3
+ * Generated on Wed, 20 Nov 2024 14:22:09 GMT
4
4
  */
5
5
  :root, [ks-theme] {
6
6
  --ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
@@ -9,7 +9,6 @@ import { ButtonGroupProvider } from '../button-group/index.js';
9
9
  import 'react';
10
10
  import 'classnames';
11
11
  import '@kickstartds/base/lib/button';
12
- import '../section/js/spotlight.client.js';
13
12
  import '@kickstartds/core/lib/react';
14
13
  import '@kickstartds/base/lib/section';
15
14
  import '../section/js/Section.client.js';
@@ -1,7 +1,6 @@
1
1
  import "./section.css";
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import { addSpotlightEffect } from './js/spotlight.client.js';
4
- import { forwardRef, useEffect, createContext, useContext } from 'react';
3
+ import { forwardRef, createContext, useContext } from 'react';
5
4
  import classnames from 'classnames';
6
5
  import { useKsComponent } from '@kickstartds/core/lib/react';
7
6
  import { SectionContextDefault as SectionContextDefault$1, SectionContext as SectionContext$1 } from '@kickstartds/base/lib/section';
@@ -17,11 +16,6 @@ const SectionContextDefault = forwardRef(({ headline, content, headerSpacing, wi
17
16
  spotlight,
18
17
  content?.mode === "slider",
19
18
  ]);
20
- useEffect(() => {
21
- if (spotlight) {
22
- addSpotlightEffect();
23
- }
24
- }, [spotlight]);
25
19
  return (jsx(SectionContextDefault$1, { ...props, ...componentProps, className: classnames("dsa-section", style &&
26
20
  style !== "default" &&
27
21
  `dsa-section-style--${style === "verticalGradient"
@@ -1,2 +1,2 @@
1
- declare function addSpotlightEffect(): void;
2
- export { addSpotlightEffect };
1
+ declare function initSpotlight(element: any): () => void;
2
+ export { initSpotlight };
@@ -1,22 +1,14 @@
1
- const addSpotlightEffect = () => {
2
- const initializeSpotlightEffect = () => {
3
- const sections = document.querySelectorAll(".dsa-section--spotlight");
4
- sections.forEach((section) => {
5
- section.addEventListener("mousemove", (event) => {
6
- const rect = section.getBoundingClientRect();
7
- const x = event.clientX - rect.left;
8
- const y = event.clientY - rect.top;
9
- section.style.setProperty("--dsa-section__spotlight--position-x", `${x}px`);
10
- section.style.setProperty("--dsa-section__spotlight--position-y", `${y}px`);
11
- });
12
- });
1
+ function onMousemove(event) {
2
+ this.style.setProperty("--dsa-section__spotlight--top", `${event.clientY - this.getBoundingClientRect().top}px`);
3
+ this.style.setProperty("--dsa-section__spotlight--left", `${event.clientX - this.getBoundingClientRect().left}px`);
4
+ }
5
+ const initSpotlight = (element) => {
6
+ element.addEventListener("mousemove", onMousemove, { passive: true });
7
+ return () => {
8
+ element.style.removeProperty("--dsa-section__spotlight--top");
9
+ element.style.removeProperty("--dsa-section__spotlight--left");
10
+ element.removeEventListener("mousemove", onMousemove, { passive: true });
13
11
  };
14
- if (document.readyState === "loading") {
15
- document.addEventListener("DOMContentLoaded", initializeSpotlightEffect);
16
- }
17
- else {
18
- initializeSpotlightEffect();
19
- }
20
12
  };
21
13
 
22
- export { addSpotlightEffect };
14
+ export { initSpotlight };
@@ -167,7 +167,7 @@
167
167
  width: 100%;
168
168
  height: 100%;
169
169
  position: absolute;
170
- background-image: radial-gradient(var(--dsa-section__spotlight--size) circle at var(--dsa-section__spotlight--position-x) var(--dsa-section__spotlight--position-y), var(--dsa-section__spotlight--color) 0%, var(--dsa-section__spotlight--color) calc(100% - var(--dsa-section__spotlight--blur)), transparent 100%, transparent 100%);
170
+ background-image: radial-gradient(var(--dsa-section__spotlight--size) circle, var(--dsa-section__spotlight--color) 0%, var(--dsa-section__spotlight--color) calc(100% - var(--dsa-section__spotlight--blur)), transparent 100%, transparent 100%);
171
171
  }
172
172
  .l-section.dsa-section .l-section__content {
173
173
  --l-section_buttons--space-before: var(--dsa-section__buttons--space-before, var(--l-section--gutter));
package/dist/global.css CHANGED
@@ -739,7 +739,9 @@ hr.c-divider {
739
739
  --c-rich-text_headline--margin: var(--dsa-rich-text__headline--margin, 0.75em 0 0.5em);
740
740
  }
741
741
 
742
- [ks-inverted=false] {
742
+ [ks-inverted=false],
743
+ :root,
744
+ #root {
743
745
  --dsa-text-color-on-primary: var(--dsa-text-color-on-primary-base);
744
746
  --dsa-text-color-on-primary-inverted: var(--dsa-text-color-on-primary-inverted-base);
745
747
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 20 Nov 2024 12:15:07 GMT
3
+ * Generated on Wed, 20 Nov 2024 14:22:12 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, 20 Nov 2024 12:15:11 GMT
2730
+ * Generated on Wed, 20 Nov 2024 14:22:16 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, 20 Nov 2024 12:15:09 GMT
5461
+ * Generated on Wed, 20 Nov 2024 14:22:14 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, 20 Nov 2024 12:15:13 GMT
8462
+ * Generated on Wed, 20 Nov 2024 14:22:19 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, 20 Nov 2024 12:15:04 GMT
3
+ * Generated on Wed, 20 Nov 2024 14:22:09 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, 20 Nov 2024 12:15:04 GMT
3
+ * Generated on Wed, 20 Nov 2024 14:22:10 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.6.14",
3
+ "version": "1.6.16",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/kickstartDS/ds-agency-premium#readme",
6
6
  "bugs": {