@vodafone_de/brix-components 7.0.3 → 7.0.4

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/README.md CHANGED
@@ -1,4 +1,3 @@
1
1
  # Highly experimental build
2
2
 
3
3
  Very likely no one will use this build in production.
4
-
@@ -5,7 +5,7 @@ import Flex from "../Flex/index.js";
5
5
  import { f as flexOrientationHorizontal, b as flexJustifyStart } from "../../styled-B0YKfXTz.js";
6
6
  import FlexItem from "../FlexItem/index.js";
7
7
  import { c as spacingSm, s as spacingMd } from "../../Spacing-D0HQH9YJ.js";
8
- import { useViewport } from "../../hooks/useViewport/index.js";
8
+ import { u as useViewport } from "../../index-Cs0Hw0dj.js";
9
9
  const renderButtons = (buttons, isMobile, isReversed = false) => {
10
10
  if (!isMobile && isReversed) {
11
11
  buttons = buttons.slice().reverse();
@@ -4,5 +4,5 @@ export declare const ConsentMessageBackgroundStyled: import('styled-components/d
4
4
  * Blurring the image create artifacts on the edges,
5
5
  * so I position these edges outside the visible area with 16px from each side to hide them
6
6
  */
7
- export declare const ConsentMessageBackgroundMapStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<ConsentMessageProps, "backgroundImage" | "theme">>> & string;
7
+ export declare const ConsentMessageBackgroundMapStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<ConsentMessageProps, "theme" | "backgroundImage">>> & string;
8
8
  export declare const ConsentMessageStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -1,5 +1,5 @@
1
1
  import { DialogProps } from './props';
2
- export declare const DialogOverlayStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<DialogProps, "heading" | "buttons"> & {
2
+ export declare const DialogOverlayStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<DialogProps, "buttons" | "heading"> & {
3
3
  open: boolean;
4
4
  }>> & string;
5
5
  export declare const DialogCardStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('../Card').CardProps, never>> & string & Omit<import('react').FC<import('../Card').CardProps>, keyof import('react').Component<any, {}, any>>;
@@ -1,6 +1,6 @@
1
1
  import { AnchorHTMLAttributes } from 'react';
2
2
  import { DiscoveryCardProps } from './props';
3
- export declare const DiscoveryCardStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('../Card').CardProps, Omit<DiscoveryCardProps, "heading" | "body" | "uid" | "badge" | "price" | "link" | "image">>> & string & Omit<import('react').FC<import('../Card').CardProps>, keyof import('react').Component<any, {}, any>>;
3
+ export declare const DiscoveryCardStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('../Card').CardProps, Omit<DiscoveryCardProps, "badge" | "heading" | "price" | "uid" | "body" | "link" | "image">>> & string & Omit<import('react').FC<import('../Card').CardProps>, keyof import('react').Component<any, {}, any>>;
4
4
  export declare const DiscoveryCardContentyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
5
  export declare const DiscoveryCardImageLinkStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, Pick<DiscoveryCardProps, "orientation" | "bottomSpacing"> & AnchorHTMLAttributes<HTMLAnchorElement>>> & string;
6
6
  export declare const DiscoveryCardImageStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('../Image').ImageProps, never>> & string & Omit<import('react').FC<import('../Image').ImageProps>, keyof import('react').Component<any, {}, any>>;
@@ -1,2 +1,2 @@
1
1
  import { GoogleMapProps } from './props';
2
- export declare const GoogleMapStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<GoogleMapProps, "consentMessage" | "apiKey">>> & string;
2
+ export declare const GoogleMapStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<GoogleMapProps, "apiKey" | "consentMessage">>> & string;
@@ -1,5 +1,5 @@
1
1
  import { IconSnippetPosition, IconSnippetProps } from './props';
2
- export declare const IconSnippetStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<IconSnippetProps, "size" | "contents" | "icon">>> & string;
2
+ export declare const IconSnippetStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<IconSnippetProps, "size" | "icon" | "contents">>> & string;
3
3
  export declare const IconLoaderStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('@vfde-react/inline-icon-library').IconLoaderProps, never>> & string & Omit<import('react').FC<import('@vfde-react/inline-icon-library').IconLoaderProps>, keyof import('react').Component<any, {}, any>>;
4
4
  export declare const IconSnippetContentStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
5
5
  iconPosition: IconSnippetPosition;
@@ -1,9 +1,9 @@
1
1
  import { ImageHeaderProps } from './props';
2
2
  export declare const getBadgeTopPosition: () => string;
3
- export declare const ImageHeaderStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('../Grid').GridProps, Pick<ImageHeaderProps, "position" | "variant">>> & string & Omit<import('react').FC<import('../Grid').GridProps>, keyof import('react').Component<any, {}, any>>;
4
- export declare const ImageHeaderImagesContainerStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('../GridItem').GridItemProps, Pick<ImageHeaderProps, "position" | "variant">>> & string & Omit<import('react').FC<import('../GridItem').GridItemProps>, keyof import('react').Component<any, {}, any>>;
5
- export declare const ImageHeaderResponsiveImageStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('../ResponsiveImage').ResponsiveImageProps, Pick<ImageHeaderProps, "position" | "variant">>> & string & Omit<import('react').FC<import('../ResponsiveImage').ResponsiveImageProps>, keyof import('react').Component<any, {}, any>>;
6
- export declare const ImageHeaderContentStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('../GridItem').GridItemProps, Pick<ImageHeaderProps, "position" | "variant" | "contentGridDesktopColumns">>> & string & Omit<import('react').FC<import('../GridItem').GridItemProps>, keyof import('react').Component<any, {}, any>>;
3
+ export declare const ImageHeaderStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('../Grid').GridProps, Pick<ImageHeaderProps, "variant" | "position">>> & string & Omit<import('react').FC<import('../Grid').GridProps>, keyof import('react').Component<any, {}, any>>;
4
+ export declare const ImageHeaderImagesContainerStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('../GridItem').GridItemProps, Pick<ImageHeaderProps, "variant" | "position">>> & string & Omit<import('react').FC<import('../GridItem').GridItemProps>, keyof import('react').Component<any, {}, any>>;
5
+ export declare const ImageHeaderResponsiveImageStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('../ResponsiveImage').ResponsiveImageProps, Pick<ImageHeaderProps, "variant" | "position">>> & string & Omit<import('react').FC<import('../ResponsiveImage').ResponsiveImageProps>, keyof import('react').Component<any, {}, any>>;
6
+ export declare const ImageHeaderContentStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('../GridItem').GridItemProps, Pick<ImageHeaderProps, "variant" | "position" | "contentGridDesktopColumns">>> & string & Omit<import('react').FC<import('../GridItem').GridItemProps>, keyof import('react').Component<any, {}, any>>;
7
7
  export declare const ImageHeaderBadgeStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('../Badge').BadgeProps, never>> & string & Omit<import('react').FC<import('../Badge').BadgeProps>, keyof import('react').Component<any, {}, any>>;
8
8
  export declare const ImageHeaderHeadingStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('../Heading').HeadingProps, never>> & string & Omit<import('react').FC<import('../Heading').HeadingProps>, keyof import('react').Component<any, {}, any>>;
9
9
  export declare const ImageHeaderButtonGroupStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('../ButtonGroup').ButtonGroupProps, never>> & string & Omit<import('react').FC<import('../ButtonGroup').ButtonGroupProps>, keyof import('react').Component<any, {}, any>>;
@@ -8,7 +8,7 @@ import { getBorderWidth } from "../../foundations/token/getBorderWidth/index.js"
8
8
  import { getTextColor } from "../../foundations/token/getTextColor/index.js";
9
9
  import { c as colorBorderFocus } from "../../BorderColor-BummoQ1-.js";
10
10
  import { a as borderWidthFocus } from "../../BorderWidth-DfOlyKK7.js";
11
- import { a as colorTextNeutral, f as colorTextBrand } from "../../TextColor-DsntmDNw.js";
11
+ import { f as colorTextBrand, a as colorTextNeutral } from "../../TextColor-DsntmDNw.js";
12
12
  import { f as filterProps } from "../../filterProps-Cewck8OH.js";
13
13
  const hover = {
14
14
  textDecoration: "none",
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ declare const StarSVG: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ export default StarSVG;
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ import { RatingProps } from './props';
3
+ declare const Rating: FC<RatingProps>;
4
+ export default Rating;
5
+ export * from './props';
6
+ export * from './styled';
@@ -0,0 +1,154 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useState, useEffect, useRef } from "react";
4
+ import { u as useViewport, v as viewportSm } from "../../index-Cs0Hw0dj.js";
5
+ import Fieldset from "../Fieldset/index.js";
6
+ import styled from "styled-components";
7
+ import { getBorderColor } from "../../foundations/token/getBorderColor/index.js";
8
+ import { getBorderWidth } from "../../foundations/token/getBorderWidth/index.js";
9
+ import { getHoverColor } from "../../foundations/token/getHoverColor/index.js";
10
+ import { getObjectColor } from "../../foundations/token/getObjectColor/index.js";
11
+ import { getSpacing } from "../../foundations/token/getSpacing/index.js";
12
+ import { c as colorBackgroundNeutral } from "../../BackgroundColor-e0N9tdDR.js";
13
+ import { c as colorBorderFocus, i as colorBorderSelected, a as colorBorderNeutral, b as colorBorderUnselected } from "../../BorderColor-BummoQ1-.js";
14
+ import { a as borderWidthFocus } from "../../BorderWidth-DfOlyKK7.js";
15
+ import { b as colorObjectSelected } from "../../ObjectColor-BZDBuV8H.js";
16
+ import { a as spacingXs } from "../../Spacing-D0HQH9YJ.js";
17
+ const StarSVG = (props) => /* @__PURE__ */ jsx("svg", { style: {
18
+ display: "inline-block"
19
+ }, width: "26", height: "25", viewBox: "0 0 26 25", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsx("path", { d: "M1 9.95223L9.26911 8.58599L12.8296 1L16.6847 8.44108L25 9.48408L19.1147 15.449L20.6911 23.6799L13.199 19.9252L5.85987 23.9682L7.11465 15.6831L1 9.95223Z", fill: "white", stroke: "#7E7E7E", strokeLinecap: "round", strokeLinejoin: "round" }) });
20
+ const getSvgPathStyles = (props) => ({
21
+ fill: props.selected ? getObjectColor(colorObjectSelected) : props.isInHoverRange ? getHoverColor(colorBackgroundNeutral) : "transparent",
22
+ strokeWidth: "1px",
23
+ stroke: props.selected ? getBorderColor(colorBorderSelected) : props.isInHoverRange ? getBorderColor(colorBorderNeutral) : getBorderColor(colorBorderUnselected)
24
+ });
25
+ const getHoverSvgPathStyles = (props) => ({
26
+ fill: props.selected ? getHoverColor(colorObjectSelected) : getHoverColor(colorBackgroundNeutral),
27
+ strokeWidth: "1px",
28
+ stroke: props.selected ? getBorderColor(colorBorderSelected) : getBorderColor(colorBorderNeutral)
29
+ });
30
+ const StarsWrapperStyled = styled.div.withConfig({
31
+ displayName: "StarsWrapperStyled",
32
+ componentId: "sc-1nbg0l6-0"
33
+ })({
34
+ display: "flex",
35
+ gap: getSpacing(spacingXs)
36
+ });
37
+ const StarLabelStyled = styled.label.withConfig({
38
+ displayName: "StarLabelStyled",
39
+ componentId: "sc-1nbg0l6-1"
40
+ })(({
41
+ selected,
42
+ isInHoverRange
43
+ }) => {
44
+ const normalStyles = getSvgPathStyles({
45
+ selected,
46
+ isInHoverRange
47
+ });
48
+ const hoverStyles = getHoverSvgPathStyles({
49
+ selected
50
+ });
51
+ return {
52
+ cursor: "pointer",
53
+ display: "inline-flex",
54
+ alignItems: "center",
55
+ justifyContent: "center",
56
+ svg: {
57
+ path: {
58
+ ...normalStyles,
59
+ transition: "fill 200ms, stroke 200ms"
60
+ }
61
+ },
62
+ "&:hover svg path": {
63
+ ...hoverStyles,
64
+ transition: "fill 200ms, stroke 200ms"
65
+ },
66
+ // Apply focus-visible styles on label when input is focused
67
+ "&:has(:focus-visible)": {
68
+ outline: `${getBorderWidth(borderWidthFocus)} solid ${getBorderColor(colorBorderFocus)}`,
69
+ outlineOffset: "2px"
70
+ }
71
+ };
72
+ });
73
+ const HiddenRadioStyled = styled.input.withConfig({
74
+ displayName: "HiddenRadioStyled",
75
+ componentId: "sc-1nbg0l6-2"
76
+ })({
77
+ border: 0,
78
+ clip: "rect(0 0 0 0)",
79
+ clipPath: "inset(50%)",
80
+ height: "1px",
81
+ margin: "-1px",
82
+ overflow: "hidden",
83
+ padding: 0,
84
+ position: "absolute",
85
+ whiteSpace: "nowrap",
86
+ width: "1px"
87
+ });
88
+ const useStarSize = () => {
89
+ const viewport = useViewport();
90
+ if (viewport === viewportSm) {
91
+ return {
92
+ width: 24,
93
+ height: 22.968
94
+ };
95
+ }
96
+ return {
97
+ width: 32,
98
+ height: 30.624
99
+ };
100
+ };
101
+ const Rating = ({
102
+ value,
103
+ onValueChange,
104
+ className,
105
+ groupName,
106
+ uid,
107
+ component: _component,
108
+ ...props
109
+ }) => {
110
+ const [internalValue, setInternalValue] = useState(value ?? 0);
111
+ const [hoverValue, setHoverValue] = useState(null);
112
+ const starSize = useStarSize();
113
+ useEffect(() => {
114
+ if (value !== void 0) {
115
+ setInternalValue(value);
116
+ }
117
+ }, [value]);
118
+ const handleChange = (event) => {
119
+ const newValue = Number(event.target.value);
120
+ setInternalValue(newValue);
121
+ if (onValueChange) {
122
+ onValueChange(newValue);
123
+ }
124
+ };
125
+ const handleMouseEnter = (index) => {
126
+ setHoverValue(index + 1);
127
+ };
128
+ const handleMouseLeave = () => {
129
+ setHoverValue(null);
130
+ };
131
+ const handleClick = (starValue) => {
132
+ if (starValue === internalValue) {
133
+ setInternalValue(0);
134
+ if (onValueChange) {
135
+ onValueChange(0);
136
+ }
137
+ }
138
+ };
139
+ const ref = useRef(null);
140
+ return /* @__PURE__ */ jsx(Fieldset, { ...props, uid, ref, children: /* @__PURE__ */ jsx(StarsWrapperStyled, { className, role: "radiogroup", children: [...Array(5)].map((_, index) => {
141
+ const starValue = index + 1;
142
+ const isInHoverRange = hoverValue !== null && starValue <= hoverValue;
143
+ return /* @__PURE__ */ jsxs(StarLabelStyled, { selected: starValue <= internalValue, isInHoverRange, htmlFor: `${uid}-star-${starValue}`, onMouseEnter: () => handleMouseEnter(index), onMouseLeave: handleMouseLeave, "aria-label": `${starValue} von 5 Sternen`, children: [
144
+ /* @__PURE__ */ jsx(HiddenRadioStyled, { type: "radio", id: `${uid}-star-${starValue}`, name: groupName || uid, value: starValue, checked: starValue === internalValue, onChange: handleChange, onClick: () => handleClick(starValue) }),
145
+ /* @__PURE__ */ jsx(StarSVG, { width: starSize.width, height: starSize.height })
146
+ ] }, `star-${starValue}-${uid}`);
147
+ }) }) });
148
+ };
149
+ export {
150
+ HiddenRadioStyled,
151
+ StarLabelStyled,
152
+ StarsWrapperStyled,
153
+ Rating as default
154
+ };
@@ -0,0 +1,22 @@
1
+ import { FieldsetSharedProps } from '../Fieldset';
2
+ /**
3
+ * Props for the Rating component
4
+ */
5
+ export interface RatingProps extends Omit<FieldsetSharedProps, 'status' | 'errorMessage' | 'disabled'> {
6
+ /**
7
+ * The current rating value (number of stars selected)
8
+ */
9
+ value?: number;
10
+ /**
11
+ * Callback fired when the rating value changes
12
+ */
13
+ onValueChange?: (value: number) => void;
14
+ /**
15
+ * Optional group name to identify the rating group for accessibility
16
+ */
17
+ groupName?: string;
18
+ /**
19
+ * Pin component's name from string to the concrete name
20
+ */
21
+ component?: 'Rating';
22
+ }
@@ -0,0 +1,6 @@
1
+ export declare const StarsWrapperStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
+ export declare const StarLabelStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {
3
+ selected: boolean;
4
+ isInHoverRange?: boolean;
5
+ }>> & string;
6
+ export declare const HiddenRadioStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
@@ -10,4 +10,4 @@ export declare const CloseIconStyled: import('styled-components/dist/types').ISt
10
10
  value: string;
11
11
  }>> & string & Omit<import('react').FC<InlineIconProps>, keyof import('react').Component<any, {}, any>>;
12
12
  export declare const SearchInputCloseButtonStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Pick<SearchInputProps, "disabled">>> & string;
13
- export declare const SearchInputStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, keyof import('react').InputHTMLAttributes<HTMLInputElement>> & import('react').InputHTMLAttributes<HTMLInputElement>, Omit<SearchInputProps, "uid" | "onReset" | "label" | "searchButtonLabel" | "onSearch">>> & string;
13
+ export declare const SearchInputStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, keyof import('react').InputHTMLAttributes<HTMLInputElement>> & import('react').InputHTMLAttributes<HTMLInputElement>, Omit<SearchInputProps, "uid" | "label" | "onReset" | "searchButtonLabel" | "onSearch">>> & string;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { useState, useRef, useEffect } from "react";
4
- import { useViewport } from "../../hooks/useViewport/index.js";
4
+ import { u as useViewport } from "../../index-Cs0Hw0dj.js";
5
5
  import { r as renderInlineRichTextFromOpenText } from "../../renderInlineRichTextFromOpenText-RvOG3QbI.js";
6
6
  import styled from "styled-components";
7
7
  import forcedColors from "../../foundations/media-query/forcedColors/index.js";
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { useThirdPartyConsent } from "../../hooks/useThirdPartyConsent/index.js";
4
+ import ConsentMessage from "../ConsentMessage/index.js";
4
5
  import styled from "styled-components";
5
6
  import { getBorderRadius } from "../../foundations/token/getBorderRadius/index.js";
6
7
  import { getBottomSpacing } from "../../foundations/token/getBottomSpacing/index.js";
7
8
  import { b as borderRadiusMd } from "../../BorderRadius-ClUShVLu.js";
8
9
  import { s as spacingMd } from "../../Spacing-D0HQH9YJ.js";
9
- import ConsentMessage from "../ConsentMessage/index.js";
10
10
  const YoutubeVideoStyled = styled.div.withConfig({
11
11
  displayName: "YoutubeVideoStyled",
12
12
  componentId: "sc-1q2uytw-0"
@@ -17,7 +17,6 @@ const YoutubeVideoStyled = styled.div.withConfig({
17
17
  position: "relative",
18
18
  width: "100%",
19
19
  paddingBottom: "56.25%",
20
- /* 16:9 aspect ratio */
21
20
  height: 0,
22
21
  overflow: "hidden",
23
22
  ...roundedCorner && {
@@ -1,24 +1,7 @@
1
- import { useState, useEffect } from "react";
2
- import { l as largeMediaQuery, m as mediumMediaQuery } from "../../index-Ck2bCrhT.js";
3
- import { useMediaQuery } from "../useMediaQuery/index.js";
4
- const viewportSm = "sm";
5
- const viewportMd = "md";
6
- const viewportLg = "lg";
7
- const useViewport = () => {
8
- const tablet = useMediaQuery(mediumMediaQuery);
9
- const desktop = useMediaQuery(largeMediaQuery);
10
- const [viewportState, setViewportState] = useState(viewportSm);
11
- useEffect(() => {
12
- if (desktop) {
13
- setViewportState(viewportLg);
14
- } else if (tablet) {
15
- setViewportState(viewportMd);
16
- } else {
17
- setViewportState(viewportSm);
18
- }
19
- }, [tablet, desktop]);
20
- return viewportState;
21
- };
1
+ import "react";
2
+ import "../../index-Ck2bCrhT.js";
3
+ import { u } from "../../index-Cs0Hw0dj.js";
4
+ import "../useMediaQuery/index.js";
22
5
  export {
23
- useViewport
6
+ u as useViewport
24
7
  };
@@ -0,0 +1,25 @@
1
+ import { useState, useEffect } from "react";
2
+ import { l as largeMediaQuery, m as mediumMediaQuery } from "./index-Ck2bCrhT.js";
3
+ import { useMediaQuery } from "./hooks/useMediaQuery/index.js";
4
+ const viewportSm = "sm";
5
+ const viewportMd = "md";
6
+ const viewportLg = "lg";
7
+ const useViewport = () => {
8
+ const tablet = useMediaQuery(mediumMediaQuery);
9
+ const desktop = useMediaQuery(largeMediaQuery);
10
+ const [viewportState, setViewportState] = useState(viewportSm);
11
+ useEffect(() => {
12
+ if (desktop) {
13
+ setViewportState(viewportLg);
14
+ } else if (tablet) {
15
+ setViewportState(viewportMd);
16
+ } else {
17
+ setViewportState(viewportSm);
18
+ }
19
+ }, [tablet, desktop]);
20
+ return viewportState;
21
+ };
22
+ export {
23
+ useViewport as u,
24
+ viewportSm as v
25
+ };
package/dist/index.d.ts CHANGED
@@ -26,6 +26,8 @@ export * from './components/RichText';
26
26
  export { default as RichText } from './components/RichText';
27
27
  export * from './components/ResponsiveImage';
28
28
  export { default as ResponsiveImage } from './components/ResponsiveImage';
29
+ export * from './components/Rating';
30
+ export { default as Rating } from './components/Rating';
29
31
  export * from './components/RadioGroup';
30
32
  export { default as RadioGroup } from './components/RadioGroup';
31
33
  export * from './components/ProductCard';
package/dist/index.js CHANGED
@@ -11,65 +11,66 @@ import { default as default9 } from "./components/SelectInput/index.js";
11
11
  import { default as default10 } from "./components/SearchInput/index.js";
12
12
  import { S } from "./index-DQhtQZ85.js";
13
13
  import { default as default11 } from "./components/ResponsiveImage/index.js";
14
- import { default as default12 } from "./components/RadioGroup/index.js";
15
- import { default as default13 } from "./components/ProductCard/index.js";
16
- import { default as default14 } from "./components/PickerGroup/index.js";
17
- import { default as default15, overlayAppearancePrimary, overlayAppearanceSecondary } from "./components/Overlay/index.js";
18
- import { default as default16, notificationStatusError, notificationStatusInfo, notificationStatusSuccess, notificationStatusWarning } from "./components/Notification/index.js";
19
- import { default as default17 } from "./components/LoadingSpinner/index.js";
20
- import { default as default18, linkListItemVariantHorizontal, linkListItemVariantVertical } from "./components/LinkListItem/index.js";
21
- import { default as default19, linkListVariantColumn, linkListVariantRow } from "./components/LinkList/index.js";
14
+ import { HiddenRadioStyled, default as default12, StarLabelStyled, StarsWrapperStyled } from "./components/Rating/index.js";
15
+ import { default as default13 } from "./components/RadioGroup/index.js";
16
+ import { default as default14 } from "./components/ProductCard/index.js";
17
+ import { default as default15 } from "./components/PickerGroup/index.js";
18
+ import { default as default16, overlayAppearancePrimary, overlayAppearanceSecondary } from "./components/Overlay/index.js";
19
+ import { default as default17, notificationStatusError, notificationStatusInfo, notificationStatusSuccess, notificationStatusWarning } from "./components/Notification/index.js";
20
+ import { default as default18 } from "./components/LoadingSpinner/index.js";
21
+ import { default as default19, linkListItemVariantHorizontal, linkListItemVariantVertical } from "./components/LinkListItem/index.js";
22
+ import { default as default20, linkListVariantColumn, linkListVariantRow } from "./components/LinkList/index.js";
22
23
  import { L } from "./index-C5GzK6_0.js";
23
- import { default as default20 } from "./components/Link/index.js";
24
- import { default as default21 } from "./components/Legend/index.js";
25
- import { default as default22 } from "./components/Label/index.js";
26
- import { default as default23 } from "./components/Input/index.js";
27
- import { default as default24 } from "./components/InlineLink/index.js";
28
- import { default as default25, imageHeaderPositionLeft, imageHeaderPositionRight, imageHeaderVariantFull, imageHeaderVariantSplit } from "./components/ImageHeader/index.js";
29
- import { default as default26, aspectRatio16_9, aspectRatio1_1, aspectRatio21_9, aspectRatio32_9, aspectRatio3_4, aspectRatio48_9, horizontalAlignmentCenter, horizontalAlignmentLeft, horizontalAlignmentRight, objectFitContain, objectFitCover, objectFitNone, objectPositionCenter, objectPositionLeftBottom, objectPositionLeftCenter, objectPositionLeftTop, objectPositionRightBottom, objectPositionRightCenter, objectPositionRightTop } from "./components/Image/index.js";
30
- import { default as default27 } from "./components/IconSnippetList/index.js";
31
- import { default as default28, iconSnippetAlignCenter, iconSnippetAlignTop, iconSnippetPositionCenter, iconSnippetPositionLeft, iconSnippetSize3Xl, iconSnippetSizeLarge, iconSnippetSizeSmall } from "./components/IconSnippet/index.js";
32
- import { default as default29, iconButtonShapeCircle, iconButtonShapeSquare } from "./components/IconButton/index.js";
33
- import { default as default30, iconSize5xl, iconSize6xl, iconSize7xl, iconSize8xl, iconSize9xl } from "./components/Icon/index.js";
34
- import { default as default31 } from "./components/HifiIcon/index.js";
35
- import { default as default32, headingAlignCenter, headingAlignLeft } from "./components/Heading/index.js";
36
- import { default as default33 } from "./components/GridItem/index.js";
37
- import { default as default34 } from "./components/Grid/index.js";
38
- import { default as default35 } from "./components/GoogleMap/index.js";
39
- import { default as default36, inputStatusIcons } from "./components/FormHelperStatusIcon/index.js";
40
- import { default as default37 } from "./components/FormHelperMessage/index.js";
41
- import { default as default38 } from "./components/FormHelperLabel/index.js";
42
- import { default as default39 } from "./components/FormElement/index.js";
43
- import { default as default40 } from "./components/Form/index.js";
44
- import { default as default41 } from "./components/FootnoteLink/index.js";
45
- import { default as default42 } from "./components/FootnoteContent/index.js";
46
- import { default as default43, flexItemAutoGrow, flexItemFullGrow } from "./components/FlexItem/index.js";
47
- import { default as default44 } from "./components/Flex/index.js";
48
- import { default as default45 } from "./components/FilterGroup/index.js";
49
- import { default as default46 } from "./components/Fieldset/index.js";
50
- import { default as default47 } from "./components/Divider/index.js";
51
- import { default as default48 } from "./components/DiscoveryCardGroup/index.js";
52
- import { default as default49, discoveryCardOrientationHorizontal, discoveryCardOrientationVertical } from "./components/DiscoveryCard/index.js";
53
- import { default as default50 } from "./components/Dialog/index.js";
54
- import { default as default51 } from "./components/DemoBox/index.js";
55
- import { default as default52 } from "./components/DateInput/index.js";
56
- import { default as default53, ContainerAppearanceColor } from "./components/Container/index.js";
57
- import { default as default54 } from "./components/ConsentMessage/index.js";
58
- import { default as default55 } from "./components/ColorSwatchGroup/index.js";
59
- import { default as default56, colorSwatchSizeMedium, colorSwatchSizeSmall } from "./components/ColorSwatch/index.js";
60
- import { default as default57 } from "./components/Collapsible/index.js";
61
- import { default as default58 } from "./components/CheckboxGroup/index.js";
62
- import { default as default59 } from "./components/Checkbox/index.js";
63
- import { default as default60 } from "./components/Carousel/index.js";
64
- import { default as default61 } from "./components/Card/index.js";
65
- import { default as default62 } from "./components/ButtonGroup/index.js";
24
+ import { default as default21 } from "./components/Link/index.js";
25
+ import { default as default22 } from "./components/Legend/index.js";
26
+ import { default as default23 } from "./components/Label/index.js";
27
+ import { default as default24 } from "./components/Input/index.js";
28
+ import { default as default25 } from "./components/InlineLink/index.js";
29
+ import { default as default26, imageHeaderPositionLeft, imageHeaderPositionRight, imageHeaderVariantFull, imageHeaderVariantSplit } from "./components/ImageHeader/index.js";
30
+ import { default as default27, aspectRatio16_9, aspectRatio1_1, aspectRatio21_9, aspectRatio32_9, aspectRatio3_4, aspectRatio48_9, horizontalAlignmentCenter, horizontalAlignmentLeft, horizontalAlignmentRight, objectFitContain, objectFitCover, objectFitNone, objectPositionCenter, objectPositionLeftBottom, objectPositionLeftCenter, objectPositionLeftTop, objectPositionRightBottom, objectPositionRightCenter, objectPositionRightTop } from "./components/Image/index.js";
31
+ import { default as default28 } from "./components/IconSnippetList/index.js";
32
+ import { default as default29, iconSnippetAlignCenter, iconSnippetAlignTop, iconSnippetPositionCenter, iconSnippetPositionLeft, iconSnippetSize3Xl, iconSnippetSizeLarge, iconSnippetSizeSmall } from "./components/IconSnippet/index.js";
33
+ import { default as default30, iconButtonShapeCircle, iconButtonShapeSquare } from "./components/IconButton/index.js";
34
+ import { default as default31, iconSize5xl, iconSize6xl, iconSize7xl, iconSize8xl, iconSize9xl } from "./components/Icon/index.js";
35
+ import { default as default32 } from "./components/HifiIcon/index.js";
36
+ import { default as default33, headingAlignCenter, headingAlignLeft } from "./components/Heading/index.js";
37
+ import { default as default34 } from "./components/GridItem/index.js";
38
+ import { default as default35 } from "./components/Grid/index.js";
39
+ import { default as default36 } from "./components/GoogleMap/index.js";
40
+ import { default as default37, inputStatusIcons } from "./components/FormHelperStatusIcon/index.js";
41
+ import { default as default38 } from "./components/FormHelperMessage/index.js";
42
+ import { default as default39 } from "./components/FormHelperLabel/index.js";
43
+ import { default as default40 } from "./components/FormElement/index.js";
44
+ import { default as default41 } from "./components/Form/index.js";
45
+ import { default as default42 } from "./components/FootnoteLink/index.js";
46
+ import { default as default43 } from "./components/FootnoteContent/index.js";
47
+ import { default as default44, flexItemAutoGrow, flexItemFullGrow } from "./components/FlexItem/index.js";
48
+ import { default as default45 } from "./components/Flex/index.js";
49
+ import { default as default46 } from "./components/FilterGroup/index.js";
50
+ import { default as default47 } from "./components/Fieldset/index.js";
51
+ import { default as default48 } from "./components/Divider/index.js";
52
+ import { default as default49 } from "./components/DiscoveryCardGroup/index.js";
53
+ import { default as default50, discoveryCardOrientationHorizontal, discoveryCardOrientationVertical } from "./components/DiscoveryCard/index.js";
54
+ import { default as default51 } from "./components/Dialog/index.js";
55
+ import { default as default52 } from "./components/DemoBox/index.js";
56
+ import { default as default53 } from "./components/DateInput/index.js";
57
+ import { default as default54, ContainerAppearanceColor } from "./components/Container/index.js";
58
+ import { default as default55 } from "./components/ConsentMessage/index.js";
59
+ import { default as default56 } from "./components/ColorSwatchGroup/index.js";
60
+ import { default as default57, colorSwatchSizeMedium, colorSwatchSizeSmall } from "./components/ColorSwatch/index.js";
61
+ import { default as default58 } from "./components/Collapsible/index.js";
62
+ import { default as default59 } from "./components/CheckboxGroup/index.js";
63
+ import { default as default60 } from "./components/Checkbox/index.js";
64
+ import { default as default61 } from "./components/Carousel/index.js";
65
+ import { default as default62 } from "./components/Card/index.js";
66
+ import { default as default63 } from "./components/ButtonGroup/index.js";
66
67
  import { B } from "./index-C7meHOM4.js";
67
- import { default as default63, buttonAutoWidth, buttonFullWidth } from "./components/Button/index.js";
68
- import { default as default64 } from "./components/BottomBar/index.js";
69
- import { default as default65, bodyAlignCenter, bodyAlignLeft, bodyAlignRight } from "./components/Body/index.js";
68
+ import { default as default64, buttonAutoWidth, buttonFullWidth } from "./components/Button/index.js";
69
+ import { default as default65 } from "./components/BottomBar/index.js";
70
+ import { default as default66, bodyAlignCenter, bodyAlignLeft, bodyAlignRight } from "./components/Body/index.js";
70
71
  import { B as B2, a as a3 } from "./index-ZHkR70j3.js";
71
- import { default as default66 } from "./components/AccordionGroup/index.js";
72
- import { default as default67, accordionToggleCollapsed, accordionToggleCollapsing, accordionToggleExpanded } from "./components/Accordion/index.js";
72
+ import { default as default67 } from "./components/AccordionGroup/index.js";
73
+ import { default as default68, accordionToggleCollapsed, accordionToggleCollapsing, accordionToggleExpanded } from "./components/Accordion/index.js";
73
74
  import { getTextDecoration } from "./foundations/token/getTextDecoration/index.js";
74
75
  import { getTextColor } from "./foundations/token/getTextColor/index.js";
75
76
  import { getSpacing } from "./foundations/token/getSpacing/index.js";
@@ -90,7 +91,7 @@ import { l, m } from "./index-Ck2bCrhT.js";
90
91
  import { noReducedMotion, reducedMotionQuery } from "./foundations/media-query/reducedMotion/index.js";
91
92
  import { forcedColorsQuery } from "./foundations/media-query/forcedColors/index.js";
92
93
  import { GlobalStyle } from "./foundations/GlobalStyle/index.js";
93
- import { useViewport } from "./hooks/useViewport/index.js";
94
+ import { u } from "./index-Cs0Hw0dj.js";
94
95
  import { checkThirdPartyConsentStorage, consentStorageFeature, consentStorageItemName, consentStorageKey, useThirdPartyConsent } from "./hooks/useThirdPartyConsent/index.js";
95
96
  import { useReducedMotion } from "./hooks/useReducedMotion/index.js";
96
97
  import { useMediaQuery } from "./hooks/useMediaQuery/index.js";
@@ -100,75 +101,79 @@ import { a as a4, i as i2 } from "./props-DDpgcryb.js";
100
101
  import { e as e2, d as d2, c as c2, b as b2, f as f2, a as a5 } from "./styled-B0YKfXTz.js";
101
102
  import { C } from "./styled-CYugcGtx.js";
102
103
  export {
103
- default67 as Accordion,
104
- default66 as AccordionGroup,
104
+ default68 as Accordion,
105
+ default67 as AccordionGroup,
105
106
  B2 as Badge,
106
107
  a3 as BadgeAppearanceColor,
107
- default65 as Body,
108
- default64 as BottomBar,
109
- default63 as Button,
108
+ default66 as Body,
109
+ default65 as BottomBar,
110
+ default64 as Button,
110
111
  B as ButtonAsLink,
111
- default62 as ButtonGroup,
112
- default61 as Card,
112
+ default63 as ButtonGroup,
113
+ default62 as Card,
113
114
  C as CardAppearanceColor,
114
- default60 as Carousel,
115
- default59 as Checkbox,
116
- default58 as CheckboxGroup,
117
- default57 as Collapsible,
118
- default56 as ColorSwatch,
119
- default55 as ColorSwatchGroup,
120
- default54 as ConsentMessage,
121
- default53 as Container,
115
+ default61 as Carousel,
116
+ default60 as Checkbox,
117
+ default59 as CheckboxGroup,
118
+ default58 as Collapsible,
119
+ default57 as ColorSwatch,
120
+ default56 as ColorSwatchGroup,
121
+ default55 as ConsentMessage,
122
+ default54 as Container,
122
123
  ContainerAppearanceColor,
123
- default52 as DateInput,
124
- default51 as DemoBox,
125
- default50 as Dialog,
126
- default49 as DiscoveryCard,
127
- default48 as DiscoveryCardGroup,
128
- default47 as Divider,
129
- default46 as Fieldset,
130
- default45 as FilterGroup,
131
- default44 as Flex,
132
- default43 as FlexItem,
133
- default42 as FootnoteContent,
134
- default41 as FootnoteLink,
135
- default40 as Form,
136
- default39 as FormElement,
137
- default38 as FormHelperLabel,
138
- default37 as FormHelperMessage,
139
- default36 as FormHelperStatusIcon,
124
+ default53 as DateInput,
125
+ default52 as DemoBox,
126
+ default51 as Dialog,
127
+ default50 as DiscoveryCard,
128
+ default49 as DiscoveryCardGroup,
129
+ default48 as Divider,
130
+ default47 as Fieldset,
131
+ default46 as FilterGroup,
132
+ default45 as Flex,
133
+ default44 as FlexItem,
134
+ default43 as FootnoteContent,
135
+ default42 as FootnoteLink,
136
+ default41 as Form,
137
+ default40 as FormElement,
138
+ default39 as FormHelperLabel,
139
+ default38 as FormHelperMessage,
140
+ default37 as FormHelperStatusIcon,
140
141
  GlobalStyle,
141
- default35 as GoogleMap,
142
- default34 as Grid,
143
- default33 as GridItem,
144
- default32 as Heading,
145
- default31 as HifiIcon,
146
- default30 as Icon,
147
- default29 as IconButton,
148
- default28 as IconSnippet,
149
- default27 as IconSnippetList,
150
- default26 as Image,
151
- default25 as ImageHeader,
152
- default24 as InlineLink,
153
- default23 as Input,
154
- default22 as Label,
155
- default21 as Legend,
156
- default20 as Link,
142
+ default36 as GoogleMap,
143
+ default35 as Grid,
144
+ default34 as GridItem,
145
+ default33 as Heading,
146
+ HiddenRadioStyled,
147
+ default32 as HifiIcon,
148
+ default31 as Icon,
149
+ default30 as IconButton,
150
+ default29 as IconSnippet,
151
+ default28 as IconSnippetList,
152
+ default27 as Image,
153
+ default26 as ImageHeader,
154
+ default25 as InlineLink,
155
+ default24 as Input,
156
+ default23 as Label,
157
+ default22 as Legend,
158
+ default21 as Link,
157
159
  L as LinkAsButton,
158
- default19 as LinkList,
159
- default18 as LinkListItem,
160
- default17 as LoadingSpinner,
161
- default16 as Notification,
162
- default15 as Overlay,
163
- default14 as PickerGroup,
160
+ default20 as LinkList,
161
+ default19 as LinkListItem,
162
+ default18 as LoadingSpinner,
163
+ default17 as Notification,
164
+ default16 as Overlay,
165
+ default15 as PickerGroup,
164
166
  P as Price,
165
- default13 as ProductCard,
166
- default12 as RadioGroup,
167
+ default14 as ProductCard,
168
+ default13 as RadioGroup,
169
+ default12 as Rating,
167
170
  default11 as ResponsiveImage,
168
171
  R as RichText,
169
172
  S as ScreenreaderOnly,
170
173
  default10 as SearchInput,
171
174
  default9 as SelectInput,
175
+ StarLabelStyled,
176
+ StarsWrapperStyled,
172
177
  default8 as Stepper,
173
178
  default7 as SuggestInput,
174
179
  default6 as Switch,
@@ -293,5 +298,5 @@ export {
293
298
  useMediaQuery,
294
299
  useReducedMotion,
295
300
  useThirdPartyConsent,
296
- useViewport
301
+ u as useViewport
297
302
  };
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.3",
4
+ "version": "7.0.4",
5
5
  "exports": {
6
6
  "./package.json": "./package.json",
7
7
  ".": {