@vodafone_de/brix-components 7.0.3 → 7.0.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.
Files changed (61) hide show
  1. package/README.md +0 -1
  2. package/dist/{FontWeight-CR22KTex.js → FontWeight-DEBGHbtO.js} +2 -2
  3. package/dist/components/Accordion/index.js +1 -1
  4. package/dist/components/Badge/index.js +1 -1
  5. package/dist/components/Body/index.js +1 -1
  6. package/dist/components/Button/index.js +2 -2
  7. package/dist/components/ButtonAsLink/index.js +1 -1
  8. package/dist/components/ButtonGroup/index.js +1 -1
  9. package/dist/components/ConsentMessage/index.js +1 -1
  10. package/dist/components/ConsentMessage/styled.d.ts +1 -1
  11. package/dist/components/DemoBox/index.js +1 -1
  12. package/dist/components/Dialog/index.js +1 -1
  13. package/dist/components/Dialog/styled.d.ts +1 -1
  14. package/dist/components/DiscoveryCard/index.js +5 -5
  15. package/dist/components/DiscoveryCard/styled.d.ts +1 -1
  16. package/dist/components/DiscoveryCardGroup/index.js +1 -1
  17. package/dist/components/GoogleMap/styled.d.ts +1 -1
  18. package/dist/components/Heading/index.js +1 -1
  19. package/dist/components/IconButton/index.js +1 -1
  20. package/dist/components/IconSnippet/index.js +1 -1
  21. package/dist/components/IconSnippet/styled.d.ts +1 -1
  22. package/dist/components/ImageHeader/index.js +5 -4
  23. package/dist/components/ImageHeader/styled.d.ts +4 -4
  24. package/dist/components/InlineLink/index.js +1 -1
  25. package/dist/components/Legend/index.js +1 -1
  26. package/dist/components/Link/index.js +1 -1
  27. package/dist/components/LinkAsButton/index.js +1 -1
  28. package/dist/components/LinkListItem/index.js +1 -1
  29. package/dist/components/MediaText/index.d.ts +5 -0
  30. package/dist/components/MediaText/index.js +123 -0
  31. package/dist/components/MediaText/props.d.ts +42 -0
  32. package/dist/components/MediaText/styled.d.ts +4 -0
  33. package/dist/components/Notification/index.js +1 -1
  34. package/dist/components/PickerGroup/index.js +2 -2
  35. package/dist/components/Price/index.js +1 -1
  36. package/dist/components/ProductCard/index.js +3 -3
  37. package/dist/components/Rating/assets/StarSVG.d.ts +3 -0
  38. package/dist/components/Rating/index.d.ts +6 -0
  39. package/dist/components/Rating/index.js +154 -0
  40. package/dist/components/Rating/props.d.ts +22 -0
  41. package/dist/components/Rating/styled.d.ts +6 -0
  42. package/dist/components/RichText/index.js +1 -1
  43. package/dist/components/SearchInput/index.js +1 -1
  44. package/dist/components/SearchInput/styled.d.ts +1 -1
  45. package/dist/components/Stepper/index.js +2 -2
  46. package/dist/components/TabularPrice/index.js +1 -1
  47. package/dist/components/TextList/index.js +1 -1
  48. package/dist/components/Tray/index.js +1 -1
  49. package/dist/components/YoutubeVideo/index.js +1 -2
  50. package/dist/hooks/useViewport/index.js +5 -22
  51. package/dist/{index-C7meHOM4.js → index-57IF0yrd.js} +2 -2
  52. package/dist/{index-ZHkR70j3.js → index-CKvLGUdD.js} +1 -1
  53. package/dist/{index-BeSd-V81.js → index-ClmKFtnx.js} +3 -7
  54. package/dist/index-Cs0Hw0dj.js +25 -0
  55. package/dist/index-DR3e19BE.js +7 -0
  56. package/dist/{index-C5GzK6_0.js → index-DrySIh-D.js} +1 -1
  57. package/dist/{index-aUJfXBUI.js → index-WLBo71sp.js} +1 -1
  58. package/dist/index.d.ts +4 -0
  59. package/dist/index.js +129 -119
  60. package/dist/{styled-BSqC5P9h.js → styled-DLS1p_AJ.js} +1 -1
  61. package/package.json +1 -1
@@ -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;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
- import { R } from "../../index-BeSd-V81.js";
4
+ import { R } from "../../index-ClmKFtnx.js";
5
5
  export {
6
6
  R as default
7
7
  };
@@ -5,7 +5,7 @@ import { forwardRef, useState, useRef, useImperativeHandle } from "react";
5
5
  import FormHelperLabel from "../FormHelperLabel/index.js";
6
6
  import IconButton, { iconButtonShapeSquare } from "../IconButton/index.js";
7
7
  import { b as spacingNone, s as spacingMd } from "../../Spacing-D0HQH9YJ.js";
8
- import { p as primaryAppearance } from "../../styled-BSqC5P9h.js";
8
+ import { p as primaryAppearance } from "../../styled-DLS1p_AJ.js";
9
9
  import { r as renderInlineRichTextFromOpenText } from "../../renderInlineRichTextFromOpenText-RvOG3QbI.js";
10
10
  import Form from "../Form/index.js";
11
11
  import styled from "styled-components";
@@ -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";
@@ -12,7 +12,7 @@ import { getBottomSpacing } from "../../foundations/token/getBottomSpacing/index
12
12
  import { getFontWeight } from "../../foundations/token/getFontWeight/index.js";
13
13
  import { getObjectColor } from "../../foundations/token/getObjectColor/index.js";
14
14
  import { g as colorBorderBrand, a as colorBorderNeutral, h as colorBorderInverse } from "../../BorderColor-BummoQ1-.js";
15
- import { f as fontWeightBold } from "../../FontWeight-CR22KTex.js";
15
+ import { f as fontWeightBold } from "../../FontWeight-DEBGHbtO.js";
16
16
  import { c as colorObjectBrand, a as colorObjectInverse } from "../../ObjectColor-BZDBuV8H.js";
17
17
  import { s as spacingMd } from "../../Spacing-D0HQH9YJ.js";
18
18
  import { t as textBodyMd } from "../../TextBodySize-BcZR9mh2.js";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import "react/jsx-runtime";
3
- import { T } from "../../index-aUJfXBUI.js";
3
+ import { T } from "../../index-WLBo71sp.js";
4
4
  import "../../index-DQhtQZ85.js";
5
5
  import "../../renderInlineRichTextFromOpenText-RvOG3QbI.js";
6
6
  export {
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import "react/jsx-runtime";
3
- import { a, T } from "../../index-BeSd-V81.js";
3
+ import { a, T } from "../../index-ClmKFtnx.js";
4
4
  import "../../tags-DI6H1biK.js";
5
5
  import "../../Spacing-D0HQH9YJ.js";
6
6
  import "../../renderInlineRichTextFromOpenText-RvOG3QbI.js";
@@ -4,7 +4,7 @@ import { useState, useRef, useEffect } from "react";
4
4
  import { createPortal } from "react-dom";
5
5
  import ButtonGroup from "../ButtonGroup/index.js";
6
6
  import Heading from "../Heading/index.js";
7
- import { f as fontWeightBold } from "../../FontWeight-CR22KTex.js";
7
+ import { f as fontWeightBold } from "../../FontWeight-DEBGHbtO.js";
8
8
  import { a as textHeadingMd } from "../../HeadingSize-CfCRn3Lh.js";
9
9
  import { s as spacingMd, b as spacingNone } from "../../Spacing-D0HQH9YJ.js";
10
10
  import styled from "styled-components";
@@ -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
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { iv as iconSizeSm } from "./index-Cbojl4_Q.js";
3
- import { l as leftPosition, c as ButtonIconStyled, b as buttonHeight, g as getButtonAppearance, p as primaryAppearance } from "./styled-BSqC5P9h.js";
3
+ import { l as leftPosition, c as ButtonIconStyled, b as buttonHeight, g as getButtonAppearance, p as primaryAppearance } from "./styled-DLS1p_AJ.js";
4
4
  import { r as renderInlineRichTextFromOpenText } from "./renderInlineRichTextFromOpenText-RvOG3QbI.js";
5
5
  import styled from "styled-components";
6
6
  import { getBodySize } from "./foundations/token/getBodySize/index.js";
@@ -9,7 +9,7 @@ import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js"
9
9
  import { getFontWeight } from "./foundations/token/getFontWeight/index.js";
10
10
  import { getSpacing } from "./foundations/token/getSpacing/index.js";
11
11
  import { b as borderRadiusMd } from "./BorderRadius-ClUShVLu.js";
12
- import { b as fontWeightRegular } from "./FontWeight-CR22KTex.js";
12
+ import { a as fontWeightRegular } from "./FontWeight-DEBGHbtO.js";
13
13
  import { a as spacingXs, d as spacingXl, b as spacingNone, s as spacingMd } from "./Spacing-D0HQH9YJ.js";
14
14
  import { t as textBodyMd } from "./TextBodySize-BcZR9mh2.js";
15
15
  import { f as filterProps } from "./filterProps-Cewck8OH.js";
@@ -12,7 +12,7 @@ import { getFontWeight } from "./foundations/token/getFontWeight/index.js";
12
12
  import { getObjectColor } from "./foundations/token/getObjectColor/index.js";
13
13
  import { getSpacing } from "./foundations/token/getSpacing/index.js";
14
14
  import { c as borderRadiusFull } from "./BorderRadius-ClUShVLu.js";
15
- import { f as fontWeightBold } from "./FontWeight-CR22KTex.js";
15
+ import { f as fontWeightBold } from "./FontWeight-DEBGHbtO.js";
16
16
  import { a as textBodySm, t as textBodyMd } from "./TextBodySize-BcZR9mh2.js";
17
17
  import { b as getForegroundColor } from "./colorUtils-BSfFfgbi.js";
18
18
  import { f as filterProps } from "./filterProps-Cewck8OH.js";
@@ -13,14 +13,11 @@ import { getBodySize } from "./foundations/token/getBodySize/index.js";
13
13
  import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
14
14
  import { getFontWeight } from "./foundations/token/getFontWeight/index.js";
15
15
  import { getSpacing } from "./foundations/token/getSpacing/index.js";
16
- import { b as fontWeightRegular } from "./FontWeight-CR22KTex.js";
16
+ import { a as fontWeightRegular } from "./FontWeight-DEBGHbtO.js";
17
17
  import { a as textBodySm, t as textBodyMd } from "./TextBodySize-BcZR9mh2.js";
18
18
  import { f as filterProps } from "./filterProps-Cewck8OH.js";
19
19
  import { t as textHeadingXs, b as textHeadingSm, a as textHeadingMd, c as textHeadingLg, d as textHeadingXl } from "./HeadingSize-CfCRn3Lh.js";
20
- import { v4 } from "uuid";
21
- const getUid = () => {
22
- return v4();
23
- };
20
+ import { g as getUid } from "./index-DR3e19BE.js";
24
21
  const mapSizeToTag = {
25
22
  h1: textHeadingXl,
26
23
  h2: textHeadingLg,
@@ -163,6 +160,5 @@ const TextList = ({
163
160
  export {
164
161
  RichText as R,
165
162
  TextList as T,
166
- TextListItem as a,
167
- getUid as g
163
+ TextListItem as a
168
164
  };
@@ -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
+ };
@@ -0,0 +1,7 @@
1
+ import { v4 } from "uuid";
2
+ const getUid = () => {
3
+ return v4();
4
+ };
5
+ export {
6
+ getUid as g
7
+ };
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { iv as iconSizeSm } from "./index-Cbojl4_Q.js";
3
- import { c as ButtonIconStyled } from "./styled-BSqC5P9h.js";
3
+ import { c as ButtonIconStyled } from "./styled-DLS1p_AJ.js";
4
4
  import { r as renderInlineRichTextFromOpenText } from "./renderInlineRichTextFromOpenText-RvOG3QbI.js";
5
5
  import styled from "styled-components";
6
6
  import { getBottomSpacing } from "./foundations/token/getBottomSpacing/index.js";
@@ -8,7 +8,7 @@ import { getHeadingSize } from "./foundations/token/getHeadingSize/index.js";
8
8
  import { getSpacing } from "./foundations/token/getSpacing/index.js";
9
9
  import { getTextColor } from "./foundations/token/getTextColor/index.js";
10
10
  import { getTextDecoration } from "./foundations/token/getTextDecoration/index.js";
11
- import { f as fontWeightBold, b as fontWeightRegular } from "./FontWeight-CR22KTex.js";
11
+ import { f as fontWeightBold, a as fontWeightRegular } from "./FontWeight-DEBGHbtO.js";
12
12
  import { s as spacingMd, b as spacingNone, a as spacingXs } from "./Spacing-D0HQH9YJ.js";
13
13
  import { g as colorTextCritical, a as colorTextNeutral } from "./TextColor-DsntmDNw.js";
14
14
  import { f as filterProps } from "./filterProps-Cewck8OH.js";
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';
@@ -38,6 +40,8 @@ export * from './components/Overlay';
38
40
  export { default as Overlay } from './components/Overlay';
39
41
  export * from './components/Notification';
40
42
  export { default as Notification } from './components/Notification';
43
+ export * from './components/MediaText';
44
+ export { default as MediaText } from './components/MediaText';
41
45
  export * from './components/LoadingSpinner';
42
46
  export { default as LoadingSpinner } from './components/LoadingSpinner';
43
47
  export * from './components/LinkListItem';