@vodafone_de/brix-components 7.0.0 → 7.0.2

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,7 @@ import "../../index-Cbojl4_Q.js";
4
4
  import "../../Spacing-D0HQH9YJ.js";
5
5
  import "../../SizeTypes-Ck_RdzIf.js";
6
6
  import "../../renderInlineRichTextFromOpenText-RvOG3QbI.js";
7
- import { a, B } from "../../index-ZHkR70j3.js";
7
+ import { a, B } from "../../index-B7B_2CjL.js";
8
8
  export {
9
9
  a as BadgeAppearanceColor,
10
10
  B as default
@@ -6,7 +6,7 @@ import { f as fontWeightBold } from "../../FontWeight-CR22KTex.js";
6
6
  import { b as textHeadingSm } from "../../HeadingSize-CfCRn3Lh.js";
7
7
  import { s as spacingMd, b as spacingNone, a as spacingXs, c as spacingSm } from "../../Spacing-D0HQH9YJ.js";
8
8
  import { s as smallSize } from "../../SizeTypes-Ck_RdzIf.js";
9
- import { b as BadgeStyled, B as Badge } from "../../index-ZHkR70j3.js";
9
+ import { b as BadgeStyled, B as Badge } from "../../index-B7B_2CjL.js";
10
10
  import Body, { bodyAlignLeft, bodyAlignCenter } from "../Body/index.js";
11
11
  import Heading from "../Heading/index.js";
12
12
  import Link from "../Link/index.js";
@@ -10,7 +10,7 @@ import Container from "../Container/index.js";
10
10
  import Heading, { headingAlignCenter } from "../Heading/index.js";
11
11
  import { P as Price, b as priceSizeSm } from "../../index-aUJfXBUI.js";
12
12
  import styled from "styled-components";
13
- import { B as Badge } from "../../index-ZHkR70j3.js";
13
+ import { B as Badge } from "../../index-B7B_2CjL.js";
14
14
  import ButtonGroup from "../ButtonGroup/index.js";
15
15
  import Grid from "../Grid/index.js";
16
16
  import GridItem from "../GridItem/index.js";
@@ -4,7 +4,7 @@ import { iu as iconSizeMd, df as IconLoader } from "../../index-Cbojl4_Q.js";
4
4
  import { s as spanTagName } from "../../tags-DI6H1biK.js";
5
5
  import { s as spacingMd, a as spacingXs, b as spacingNone } from "../../Spacing-D0HQH9YJ.js";
6
6
  import { s as smallSize } from "../../SizeTypes-Ck_RdzIf.js";
7
- import { B as Badge } from "../../index-ZHkR70j3.js";
7
+ import { B as Badge } from "../../index-B7B_2CjL.js";
8
8
  import styled from "styled-components";
9
9
  import forcedColors from "../../foundations/media-query/forcedColors/index.js";
10
10
  import { e as ease_in_sine } from "../../easing-Dm-pO8SY.js";
@@ -6,7 +6,7 @@ import { e as spacing2Xs, s as spacingMd, c as spacingSm, b as spacingNone } fro
6
6
  import { useState, useEffect } from "react";
7
7
  import Grid from "../Grid/index.js";
8
8
  import { df as IconLoader, iu as iconSizeMd } from "../../index-Cbojl4_Q.js";
9
- import { B as Badge } from "../../index-ZHkR70j3.js";
9
+ import { B as Badge } from "../../index-B7B_2CjL.js";
10
10
  import ColorSwatch from "../ColorSwatch/index.js";
11
11
  import { r as renderInlineRichTextFromOpenText } from "../../renderInlineRichTextFromOpenText-RvOG3QbI.js";
12
12
  import styled from "styled-components";
@@ -5,7 +5,7 @@ import Image, { aspectRatio1_1 } from "../Image/index.js";
5
5
  import { f as fontWeightBold } from "../../FontWeight-CR22KTex.js";
6
6
  import { a as textHeadingMd } from "../../HeadingSize-CfCRn3Lh.js";
7
7
  import { s as spacingMd, b as spacingNone } from "../../Spacing-D0HQH9YJ.js";
8
- import { B as Badge } from "../../index-ZHkR70j3.js";
8
+ import { B as Badge } from "../../index-B7B_2CjL.js";
9
9
  import Body from "../Body/index.js";
10
10
  import ColorSwatchGroup from "../ColorSwatchGroup/index.js";
11
11
  import Heading from "../Heading/index.js";
@@ -1,2 +1,7 @@
1
1
  import { RefObject } from 'react';
2
+ /**
3
+ * The useFocusWithin hook is a custom React Hook that tracks
4
+ * whether any element inside a given DOM node currently has focus (i.e., focus is "within" that node).
5
+ * This is useful for building components like dropdowns, modals, or form sections that should respond to focus in their subtree.
6
+ */
2
7
  export declare function useFocusWithin(ref: RefObject<HTMLElement>): boolean;
@@ -1 +1,4 @@
1
+ /**
2
+ * the useForcedColors hook to detect if forced colors mode is active in the browser.
3
+ */
1
4
  export declare const useForcedColors: () => boolean;
@@ -1,7 +1,7 @@
1
1
  import { forcedColorsQuery } from "../../foundations/media-query/forcedColors/index.js";
2
2
  import { useMediaQuery } from "../useMediaQuery/index.js";
3
3
  const useForcedColors = () => {
4
- const [reducedMotion] = useMediaQuery(forcedColorsQuery);
4
+ const reducedMotion = useMediaQuery(forcedColorsQuery);
5
5
  return reducedMotion;
6
6
  };
7
7
  export {
@@ -1 +1,7 @@
1
- export declare const useMediaQuery: (query: string, initialState?: boolean) => boolean[];
1
+ /**
2
+ * The useMediaQuery hook is a custom React Hook that allows
3
+ * to respond to changes in a CSS media query.
4
+ *
5
+ * It's useful for building responsive UIs that adapt to screen size, orientation, or other media features.
6
+ */
7
+ export declare const useMediaQuery: (query: string, initialState?: boolean) => boolean;
@@ -12,7 +12,7 @@ const useMediaQuery = (query, initialState = false) => {
12
12
  mediaQuery.removeEventListener("change", handleMediaQueryChange);
13
13
  };
14
14
  }, [query]);
15
- return [mediaQueryMatches];
15
+ return mediaQueryMatches;
16
16
  };
17
17
  export {
18
18
  useMediaQuery
@@ -1 +1,5 @@
1
+ /**
2
+ * The useReducedMotion hook is a custom React Hook that detects
3
+ * whether the user has requested reduced motion in their system accessibility settings—typically to minimize animations and transitions.
4
+ */
1
5
  export declare const useReducedMotion: () => boolean;
@@ -1,7 +1,7 @@
1
1
  import { reducedMotionQuery } from "../../foundations/media-query/reducedMotion/index.js";
2
2
  import { useMediaQuery } from "../useMediaQuery/index.js";
3
3
  const useReducedMotion = () => {
4
- const [reducedMotion] = useMediaQuery(reducedMotionQuery);
4
+ const reducedMotion = useMediaQuery(reducedMotionQuery);
5
5
  return reducedMotion;
6
6
  };
7
7
  export {
@@ -15,4 +15,8 @@ export interface WindowWithScodeLoaded extends Window {
15
15
  };
16
16
  }
17
17
  export declare const checkThirdPartyConsentStorage: () => boolean;
18
+ /**
19
+ * The useThirdPartyConsent hook is a custom React Hook designed to
20
+ * track and respond to changes in a user's third-party consent status,
21
+ */
18
22
  export declare const useThirdPartyConsent: () => boolean;
@@ -1,2 +1,7 @@
1
1
  import { ViewportName } from '../../foundations/token/types/Viewport';
2
+ /**
3
+ * The useViewport hook is a custom React Hook that determines the current viewport size
4
+ * is matching one of our three size categories:
5
+ * sm, md or lg
6
+ */
2
7
  export declare const useViewport: () => ViewportName;
@@ -5,8 +5,8 @@ const viewportSm = "sm";
5
5
  const viewportMd = "md";
6
6
  const viewportLg = "lg";
7
7
  const useViewport = () => {
8
- const [tablet] = useMediaQuery(mediumMediaQuery);
9
- const [desktop] = useMediaQuery(largeMediaQuery);
8
+ const tablet = useMediaQuery(mediumMediaQuery);
9
+ const desktop = useMediaQuery(largeMediaQuery);
10
10
  const [viewportState, setViewportState] = useState(viewportSm);
11
11
  useEffect(() => {
12
12
  if (desktop) {
@@ -64,12 +64,14 @@ const BadgeStyled = styled.span.withConfig({
64
64
  color: foregroundColor
65
65
  };
66
66
  }, getBottomSpacing);
67
+ const SECRET = "chpt_619be55aeaf9c59";
67
68
  const Badge = ({
68
69
  children,
69
70
  bottomSpacing = spacingMd,
70
71
  ...props
71
72
  }) => /* @__PURE__ */ jsxs(BadgeStyled, { ...props, bottomSpacing, children: [
72
73
  props.icon ? /* @__PURE__ */ jsx(IconLoader, { name: props.icon, size: props.size === smallSize ? iconSizeXs : iconSizeSm }) : null,
74
+ SECRET,
73
75
  renderInlineRichTextFromOpenText(children)
74
76
  ] });
75
77
  export {
package/dist/index.js CHANGED
@@ -64,7 +64,7 @@ import { B } from "./index-VyKg-44v.js";
64
64
  import { default as default60, buttonAutoWidth, buttonFullWidth } from "./components/Button/index.js";
65
65
  import { default as default61 } from "./components/BottomBar/index.js";
66
66
  import { default as default62, bodyAlignCenter, bodyAlignLeft, bodyAlignRight } from "./components/Body/index.js";
67
- import { B as B2, a as a3 } from "./index-ZHkR70j3.js";
67
+ import { B as B2, a as a3 } from "./index-B7B_2CjL.js";
68
68
  import { default as default63 } from "./components/AccordionGroup/index.js";
69
69
  import { default as default64, accordionToggleCollapsed, accordionToggleCollapsing, accordionToggleExpanded } from "./components/Accordion/index.js";
70
70
  import { getTextDecoration } from "./foundations/token/getTextDecoration/index.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vodafone_de/brix-components",
3
3
  "description": "Brix is the digital design system for vodafone.de",
4
- "version": "7.0.0",
4
+ "version": "7.0.2",
5
5
  "exports": {
6
6
  "./package.json": "./package.json",
7
7
  ".": {