@vodafone_de/brix-components 3.0.1 → 3.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.
Files changed (139) hide show
  1. package/dist/BackgroundColor-JObp_2xA.js +14 -0
  2. package/dist/BorderColor-BummoQ1-.js +24 -0
  3. package/dist/BorderRadius-ClUShVLu.js +10 -0
  4. package/dist/BorderWidth-DfOlyKK7.js +16 -0
  5. package/dist/CornerStyle-JEbGNArR.js +6 -0
  6. package/dist/FontWeight-CR22KTex.js +8 -0
  7. package/dist/HeadingSize-CfCRn3Lh.js +12 -0
  8. package/dist/IconColor-CtC9WUgr.js +10 -0
  9. package/dist/ObjectColor-BZDBuV8H.js +22 -0
  10. package/dist/Opacity-smkGiwsf.js +6 -0
  11. package/dist/SizeTypes-Ck_RdzIf.js +8 -0
  12. package/dist/Spacing-D0HQH9YJ.js +16 -0
  13. package/dist/TextBodySize-BcZR9mh2.js +6 -0
  14. package/dist/TextColor-BXiR5Uq9.js +16 -0
  15. package/dist/colorUtils-uLZF5UIN.js +94 -0
  16. package/dist/components/Accordion/index.js +195 -0
  17. package/dist/components/AccordionGroup/index.js +59 -0
  18. package/dist/components/Badge/index.js +11 -0
  19. package/dist/components/Body/index.js +72 -6
  20. package/dist/components/BottomBar/index.js +79 -0
  21. package/dist/components/Button/index.js +24 -0
  22. package/dist/components/ButtonAsLink/index.js +7 -0
  23. package/dist/components/ButtonGroup/index.js +34 -0
  24. package/dist/components/Card/index.js +18 -0
  25. package/dist/components/Carousel/index.js +497 -0
  26. package/dist/components/Checkbox/index.js +218 -0
  27. package/dist/components/CheckboxGroup/index.js +58 -0
  28. package/dist/components/Collapsible/index.js +85 -0
  29. package/dist/components/ColorSwatch/index.js +87 -0
  30. package/dist/components/ColorSwatchGroup/index.js +43 -0
  31. package/dist/components/Container/index.js +76 -0
  32. package/dist/components/DateInput/index.js +86 -0
  33. package/dist/components/DemoBox/index.js +21 -0
  34. package/dist/components/Dialog/index.js +172 -0
  35. package/dist/components/DiscoveryCard/index.js +130 -0
  36. package/dist/components/DiscoveryCardGroup/index.js +53 -0
  37. package/dist/components/Divider/index.js +30 -0
  38. package/dist/components/Fieldset/index.js +41 -0
  39. package/dist/components/FilterGroup/index.js +148 -0
  40. package/dist/components/Flex/index.js +17 -0
  41. package/dist/components/FlexItem/index.js +41 -0
  42. package/dist/components/FootnoteContent/index.js +39 -0
  43. package/dist/components/FootnoteLink/index.js +46 -0
  44. package/dist/components/Form/index.js +20 -0
  45. package/dist/components/FormElement/index.js +31 -0
  46. package/dist/components/FormHelperLabel/index.js +21 -0
  47. package/dist/components/FormHelperMessage/index.js +47 -0
  48. package/dist/components/FormHelperStatusIcon/index.js +50 -0
  49. package/dist/components/GoogleMap/index.js +196 -0
  50. package/dist/components/Grid/index.js +39 -0
  51. package/dist/components/GridItem/index.js +12 -0
  52. package/dist/components/Heading/index.js +94 -0
  53. package/dist/components/HifiIcon/index.js +31 -0
  54. package/dist/components/Icon/index.js +38 -0
  55. package/dist/components/IconButton/index.js +85 -0
  56. package/dist/components/IconSnippet/index.js +112 -0
  57. package/dist/components/IconSnippet/styled.d.ts +1 -1
  58. package/dist/components/IconSnippetList/index.js +25 -0
  59. package/dist/components/Image/index.js +84 -0
  60. package/dist/components/ImageHeader/index.js +262 -0
  61. package/dist/components/ImageHeader/styled.d.ts +4 -4
  62. package/dist/components/InlineLink/index.js +43 -0
  63. package/dist/components/Input/index.js +55 -0
  64. package/dist/components/Label/index.js +22 -0
  65. package/dist/components/Legend/index.js +60 -0
  66. package/dist/components/Link/index.js +19 -0
  67. package/dist/components/LinkAsButton/index.js +7 -0
  68. package/dist/components/LinkList/index.js +64 -0
  69. package/dist/components/LinkListItem/index.js +316 -0
  70. package/dist/components/LoadingSpinner/index.js +70 -0
  71. package/dist/components/Notification/index.js +181 -0
  72. package/dist/components/Overlay/index.js +33 -0
  73. package/dist/components/PickerGroup/index.js +282 -0
  74. package/dist/components/Price/index.js +18 -0
  75. package/dist/components/ProductCard/index.js +81 -0
  76. package/dist/components/RadioGroup/index.js +197 -0
  77. package/dist/components/ResponsiveImage/index.js +89 -0
  78. package/dist/components/RichText/index.js +7 -0
  79. package/dist/components/ScreenreaderOnly/index.js +6 -0
  80. package/dist/components/SearchInput/index.js +140 -0
  81. package/dist/components/SelectInput/index.js +160 -0
  82. package/dist/components/Stepper/index.js +205 -0
  83. package/dist/components/SuggestInput/index.js +387 -0
  84. package/dist/components/Switch/index.js +169 -0
  85. package/dist/components/TabularPrice/index.js +8 -0
  86. package/dist/components/TextList/index.js +10 -0
  87. package/dist/components/Textarea/index.js +156 -0
  88. package/dist/components/Tray/index.js +218 -0
  89. package/dist/easing-Dm-pO8SY.js +6 -0
  90. package/dist/filterProps-Cewck8OH.js +13 -0
  91. package/dist/foundations/GlobalStyle/index.js +3 -292
  92. package/dist/foundations/PatternProps/index.js +1 -0
  93. package/dist/foundations/media-query/forcedColors/index.js +12 -0
  94. package/dist/foundations/media-query/reducedMotion/index.js +21 -0
  95. package/dist/foundations/media-query/viewport/index.js +6 -0
  96. package/dist/foundations/token/getBackgroundColor/index.js +5 -0
  97. package/dist/foundations/token/getBodySize/index.js +13 -2
  98. package/dist/foundations/token/getBorderColor/index.js +5 -0
  99. package/dist/foundations/token/getBorderRadius/index.js +15 -0
  100. package/dist/foundations/token/getBorderWidth/index.js +19 -0
  101. package/dist/foundations/token/getBottomSpacing/index.js +14 -0
  102. package/dist/foundations/token/getFontWeight/index.js +13 -0
  103. package/dist/foundations/token/getHeadingSize/index.js +27 -0
  104. package/dist/foundations/token/getHoverColor/index.js +7 -0
  105. package/dist/foundations/token/getIconColor/index.js +5 -0
  106. package/dist/foundations/token/getObjectColor/index.js +5 -0
  107. package/dist/foundations/token/getOpacity/index.js +11 -0
  108. package/dist/foundations/token/getPressColor/index.js +7 -0
  109. package/dist/foundations/token/getSpacing/index.js +5 -0
  110. package/dist/foundations/token/getTextColor/index.js +5 -0
  111. package/dist/foundations/token/getTextDecoration/index.js +13 -0
  112. package/dist/getCssVar-BP6T9pFM.js +6 -0
  113. package/dist/hooks/useFocusWithin/index.js +36 -0
  114. package/dist/hooks/useForcedColors/index.js +9 -0
  115. package/dist/hooks/useMediaQuery/index.js +19 -0
  116. package/dist/hooks/useReducedMotion/index.js +9 -0
  117. package/dist/hooks/useThirdPartyConsent/index.js +54 -0
  118. package/dist/hooks/useViewport/index.js +24 -0
  119. package/dist/index-BXLT6ke-.js +79 -0
  120. package/dist/index-C4XnzWFL.js +61 -0
  121. package/dist/index-CeJsIf3Z.js +208 -0
  122. package/dist/index-Ck2bCrhT.js +32 -0
  123. package/dist/index-CzTqNQTT.js +79 -0
  124. package/dist/index-D6hvbziL.js +167 -0
  125. package/dist/index-DQhtQZ85.js +24 -0
  126. package/dist/props-Czq9XX2J.js +6 -0
  127. package/dist/{index-BaPlSfS3.js → renderInlineRichTextFromOpenText-CA52y1-B.js} +3 -105
  128. package/dist/shadow-u158mzuN.js +4 -0
  129. package/dist/styled-BpvuD699.js +45 -0
  130. package/dist/styled-CDWclYAa.js +124 -0
  131. package/dist/styled-CXSdomF5.js +34 -0
  132. package/dist/styled-CpoX5USb.js +71 -0
  133. package/dist/styled-DZo6MwrF.js +245 -0
  134. package/dist/styled-FNJyDkPV.js +165 -0
  135. package/dist/styled-Wlt68LfQ.js +133 -0
  136. package/dist/styled-ZpQohvyx.js +29 -0
  137. package/dist/tags-DI6H1biK.js +29 -0
  138. package/package.json +2 -1
  139. package/dist/index-BoPDwZgt.js +0 -18
@@ -1,296 +1,7 @@
1
1
  "use client";
2
- import styled, { keyframes, css, createGlobalStyle } from "styled-components";
3
- import { g as getCssVar, a as getBodySize } from "../../index-BoPDwZgt.js";
4
- import { f as filterProps, g as getBottomSpacing, s as spacingNone, B as Body, a as getSpacing } from "../../index-BaPlSfS3.js";
5
- const forcedColorsQuery = `(forced-colors: active)`;
6
- const forcedColors = (stylesInViewport) => {
7
- return {
8
- [`@media ${forcedColorsQuery}`]: {
9
- ...stylesInViewport
10
- }
11
- };
12
- };
13
- const reducedMotionQuery = `(prefers-reduced-motion)`;
14
- const reducedMotion = (stylesInViewport) => {
15
- return {
16
- [`@media ${reducedMotionQuery}`]: {
17
- ...stylesInViewport
18
- }
19
- };
20
- };
21
- const breakpoint_medium_number = 768;
22
- const breakpoint_medium = `${breakpoint_medium_number}px`;
23
- const breakpoint_large_number = 1025;
24
- const breakpoint_large = `${breakpoint_large_number}px`;
25
- const mediumMediaQuery = `screen and (min-width: ${breakpoint_medium})`;
26
- const largeMediaQuery = `screen and (min-width: ${breakpoint_large})`;
27
- const md = (stylesInViewport) => {
28
- return {
29
- [`@media ${mediumMediaQuery}`]: {
30
- ...stylesInViewport
31
- }
32
- };
33
- };
34
- const lg = (stylesInViewport) => {
35
- return {
36
- [`@media ${largeMediaQuery}`]: {
37
- ...stylesInViewport
38
- }
39
- };
40
- };
41
- const viewport = {
42
- md,
43
- lg
44
- };
45
- const getBackgroundColor = (color) => getCssVar(color);
46
- const headingSizes = {
47
- xl: {
48
- fontSize: getCssVar("headingXlFontSize"),
49
- lineHeight: getCssVar("headingXlLineHeight")
50
- },
51
- lg: {
52
- fontSize: getCssVar("headingLgFontSize"),
53
- lineHeight: getCssVar("headingLgLineHeight")
54
- },
55
- md: {
56
- fontSize: getCssVar("headingMdFontSize"),
57
- lineHeight: getCssVar("headingMdLineHeight")
58
- },
59
- sm: {
60
- fontSize: getCssVar("headingSmFontSize"),
61
- lineHeight: getCssVar("headingSmLineHeight")
62
- },
63
- xs: {
64
- fontSize: getCssVar("headingXsFontSize"),
65
- lineHeight: getCssVar("headingXsLineHeight")
66
- }
67
- };
68
- const getHeadingSize = (size) => headingSizes[size];
69
- const getObjectColor = (color) => getCssVar(color);
70
- const baseOpacity60 = "opacity60";
71
- const baseOpacity38 = "opacity38";
72
- const opacities = {
73
- Overlay: baseOpacity60,
74
- Disabled: baseOpacity38
75
- };
76
- const getOpacity = (opacity) => getCssVar(opacities[opacity]);
77
- const colorBackgroundOverlay = "colorBackgroundOverlay";
78
- const opacityOverlay = "Overlay";
79
- const largeSize = "lg";
80
- const loadingSpinnerOverlays = {
81
- Light: `rgba(255, 255, 255, ${getOpacity(opacityOverlay)})`,
82
- Dark: `rgba(38, 38, 38, ${getOpacity(opacityOverlay)})`
83
- };
84
- const loadingSpinnerOverlayCssVar = "loadingSpinnerOverlay";
85
- const calculateSpinnerHeight = (size, bottomSpacing, label) => {
86
- const spinnerHeight = spinnerSvgSizes[size];
87
- const labelHeight = label ? `${mapLabelStyleToSpinnerSize[size].fontSize} * ${mapLabelStyleToSpinnerSize[size].lineHeight}` : "0px";
88
- return `calc(${spinnerHeight} + ${getSpacing(bottomSpacing)} + ${labelHeight})`;
89
- };
90
- const spinnerSvgSizes = {
91
- xs: "24px",
92
- sm: "76px",
93
- md: "148px",
94
- lg: "300px"
95
- };
96
- styled.div.withConfig({
97
- shouldForwardProp: filterProps(),
98
- displayName: "LoadingSpinnerContainerStyled",
99
- componentId: "sc-1bnjzqj-0"
100
- })({
101
- position: "relative",
102
- height: "100%"
103
- }, ({
104
- coversFullPage
105
- }) => {
106
- if (coversFullPage) {
107
- return {
108
- position: "fixed",
109
- zIndex: "1001"
110
- };
111
- }
112
- return {};
113
- }, ({
114
- bottomSpacing = spacingNone
115
- }) => getBottomSpacing({
116
- bottomSpacing
117
- }));
118
- styled.div.withConfig({
119
- shouldForwardProp: filterProps(),
120
- displayName: "LoadingSpinnerContentStyled",
121
- componentId: "sc-1bnjzqj-1"
122
- })({
123
- display: "flex",
124
- flexDirection: "column",
125
- minHeight: "100%",
126
- width: "fit-content",
127
- justifyContent: "center",
128
- alignItems: "center"
129
- }, ({
130
- hasOverlay
131
- }) => {
132
- if (hasOverlay) {
133
- return {
134
- background: getBackgroundColor(colorBackgroundOverlay),
135
- position: "absolute",
136
- zIndex: 1001,
137
- width: "100%",
138
- left: 0,
139
- top: 0
140
- };
141
- } else {
142
- return {};
143
- }
144
- }, ({
145
- coversFullPage
146
- }) => {
147
- if (coversFullPage) {
148
- return {
149
- position: "fixed",
150
- zIndex: "1001"
151
- };
152
- }
153
- return {};
154
- });
155
- styled.div.withConfig({
156
- shouldForwardProp: filterProps(),
157
- displayName: "LoadingSpinnerChildrenStyled",
158
- componentId: "sc-1bnjzqj-2"
159
- })({
160
- width: "100%",
161
- height: "100%",
162
- "> *": {
163
- minHeight: "inherit"
164
- }
165
- }, ({
166
- size = largeSize,
167
- bottomSpacing = spacingNone,
168
- label,
169
- isActive
170
- }) => {
171
- return isActive ? {
172
- minHeight: calculateSpinnerHeight(size, bottomSpacing, label)
173
- } : {};
174
- });
175
- styled.svg.withConfig({
176
- shouldForwardProp: filterProps(),
177
- displayName: "LoadingSpinnerSVGStyled",
178
- componentId: "sc-1bnjzqj-3"
179
- })({
180
- ...forcedColors({
181
- stroke: "CanvasText"
182
- }),
183
- zIndex: 1001,
184
- stroke: getObjectColor("colorObjectBrand")
185
- }, ({
186
- size = largeSize
187
- }) => {
188
- if (size === "xs") {
189
- return {
190
- width: "20px",
191
- height: "20px",
192
- ...viewport.md({
193
- width: spinnerSvgSizes[size],
194
- height: spinnerSvgSizes[size]
195
- })
196
- };
197
- }
198
- return {
199
- width: spinnerSvgSizes[size],
200
- height: spinnerSvgSizes[size]
201
- };
202
- });
203
- const loadingSpinnerRotate = keyframes({
204
- to: {
205
- strokeDashoffset: 610
206
- }
207
- });
208
- const loadingSpinnerXsRotate = keyframes({
209
- to: {
210
- strokeDashoffset: 166
211
- }
212
- });
213
- const LoadingSpinnerPathStyled = styled.path.withConfig({
214
- shouldForwardProp: filterProps(),
215
- displayName: "LoadingSpinnerPathStyled",
216
- componentId: "sc-1bnjzqj-4"
217
- })({
218
- fill: "none",
219
- strokeLinejoin: "round",
220
- strokeLinecap: "round",
221
- strokeDasharray: "120 32",
222
- animationDuration: "5.0s",
223
- animationTimingFunction: "linear",
224
- animationIterationCount: "infinite"
225
- }, reducedMotion({
226
- animation: "none"
227
- }), css(["animation-name:", ";"], loadingSpinnerRotate));
228
- styled(LoadingSpinnerPathStyled).withConfig({
229
- shouldForwardProp: filterProps(),
230
- displayName: "LoadingSpinnerPathOuter3Styled",
231
- componentId: "sc-1bnjzqj-5"
232
- })({
233
- strokeWidth: 2,
234
- opacity: "0.3"
235
- });
236
- styled(LoadingSpinnerPathStyled).withConfig({
237
- shouldForwardProp: filterProps(),
238
- displayName: "LoadingSpinnerPathOuter2Styled",
239
- componentId: "sc-1bnjzqj-6"
240
- })({
241
- strokeWidth: 3,
242
- opacity: "0.6"
243
- });
244
- styled(LoadingSpinnerPathStyled).withConfig({
245
- shouldForwardProp: filterProps(),
246
- displayName: "LoadingSpinnerPathOuter1Styled",
247
- componentId: "sc-1bnjzqj-7"
248
- })({
249
- strokeWidth: 4
250
- });
251
- styled.path.withConfig({
252
- shouldForwardProp: filterProps(),
253
- displayName: "LoadingSpinnerPathCenterStyled",
254
- componentId: "sc-1bnjzqj-8"
255
- })({
256
- ...forcedColors({
257
- fill: "CanvasText"
258
- }),
259
- fill: "#E60000"
260
- });
261
- styled.path.withConfig({
262
- shouldForwardProp: filterProps(),
263
- displayName: "LoadingSpinnerPathXsStyled",
264
- componentId: "sc-1bnjzqj-9"
265
- })({
266
- fill: "none",
267
- strokeLinecap: "butt",
268
- strokeWidth: 2,
269
- strokeDasharray: "48 8",
270
- strokeDashoffset: 56,
271
- animationDuration: "5.0s",
272
- animationTimingFunction: "linear",
273
- animationIterationCount: "infinite"
274
- }, css(["animation-name:", ";"], loadingSpinnerXsRotate));
275
- const mapLabelStyleToSpinnerSize = {
276
- xs: getBodySize("md"),
277
- sm: getHeadingSize("xs"),
278
- md: getHeadingSize("sm"),
279
- lg: getHeadingSize("lg")
280
- };
281
- styled(Body).withConfig({
282
- shouldForwardProp: filterProps(),
283
- displayName: "LoadingSpinnerLabelStyled",
284
- componentId: "sc-1bnjzqj-10"
285
- })(({
286
- size = "lg"
287
- }) => {
288
- return mapLabelStyleToSpinnerSize[size];
289
- }, getBottomSpacing({
290
- bottomSpacing: spacingNone
291
- }), {
292
- textAlign: "center"
293
- });
2
+ import { css, createGlobalStyle } from "styled-components";
3
+ import { l as loadingSpinnerOverlayCssVar, j as loadingSpinnerOverlays } from "../../styled-DZo6MwrF.js";
4
+ import { c as breakpoint_medium, a as breakpoint_large } from "../../index-Ck2bCrhT.js";
294
5
  const colorVodafoneRed = "colorVodafoneRed";
295
6
  const colorVodafoneRedTint = "colorVodafoneRedTint";
296
7
  const colorRed = "colorRed";
@@ -0,0 +1,12 @@
1
+ const forcedColorsQuery = `(forced-colors: active)`;
2
+ const forcedColors = (stylesInViewport) => {
3
+ return {
4
+ [`@media ${forcedColorsQuery}`]: {
5
+ ...stylesInViewport
6
+ }
7
+ };
8
+ };
9
+ export {
10
+ forcedColors as default,
11
+ forcedColorsQuery
12
+ };
@@ -0,0 +1,21 @@
1
+ const reducedMotionQuery = `(prefers-reduced-motion)`;
2
+ const noReducedMotionQuery = `(prefers-reduced-motion: no-preference)`;
3
+ const reducedMotion = (stylesInViewport) => {
4
+ return {
5
+ [`@media ${reducedMotionQuery}`]: {
6
+ ...stylesInViewport
7
+ }
8
+ };
9
+ };
10
+ const noReducedMotion = (stylesInViewport) => {
11
+ return {
12
+ [`@media ${noReducedMotionQuery}`]: {
13
+ ...stylesInViewport
14
+ }
15
+ };
16
+ };
17
+ export {
18
+ reducedMotion as default,
19
+ noReducedMotion,
20
+ reducedMotionQuery
21
+ };
@@ -0,0 +1,6 @@
1
+ import { v, l, m } from "../../../index-Ck2bCrhT.js";
2
+ export {
3
+ v as default,
4
+ l as largeMediaQuery,
5
+ m as mediumMediaQuery
6
+ };
@@ -0,0 +1,5 @@
1
+ import { g as getCssVar } from "../../../getCssVar-BP6T9pFM.js";
2
+ const getBackgroundColor = (color) => getCssVar(color);
3
+ export {
4
+ getBackgroundColor
5
+ };
@@ -1,4 +1,15 @@
1
- import { a } from "../../../index-BoPDwZgt.js";
1
+ import { g as getCssVar } from "../../../getCssVar-BP6T9pFM.js";
2
+ const bodySizes = {
3
+ md: {
4
+ fontSize: getCssVar("bodyMdFontSize"),
5
+ lineHeight: getCssVar("bodyMdLineHeight")
6
+ },
7
+ sm: {
8
+ fontSize: getCssVar("bodySmFontSize"),
9
+ lineHeight: getCssVar("bodySmLineHeight")
10
+ }
11
+ };
12
+ const getBodySize = (size) => bodySizes[size];
2
13
  export {
3
- a as getBodySize
14
+ getBodySize
4
15
  };
@@ -0,0 +1,5 @@
1
+ import { g as getCssVar } from "../../../getCssVar-BP6T9pFM.js";
2
+ const getBorderColor = (color) => getCssVar(color);
3
+ export {
4
+ getBorderColor
5
+ };
@@ -0,0 +1,15 @@
1
+ import { g as getCssVar } from "../../../getCssVar-BP6T9pFM.js";
2
+ const baseBorderRadius0 = "borderRadius0";
3
+ const baseBorderRadius3 = "borderRadius3";
4
+ const baseBorderRadius6 = "borderRadius6";
5
+ const baseBorderRadius100 = "borderRadius100";
6
+ const borderRadii = {
7
+ borderRadiusNone: baseBorderRadius0,
8
+ borderRadiusSm: baseBorderRadius3,
9
+ borderRadiusMd: baseBorderRadius6,
10
+ borderRadiusFull: baseBorderRadius100
11
+ };
12
+ const getBorderRadius = (radius) => getCssVar(borderRadii[radius]);
13
+ export {
14
+ getBorderRadius
15
+ };
@@ -0,0 +1,19 @@
1
+ import { g as getCssVar } from "../../../getCssVar-BP6T9pFM.js";
2
+ const baseBorderWidth0 = "borderWidth0";
3
+ const baseBorderWidth1 = "borderWidth1";
4
+ const baseBorderWidth2 = "borderWidth2";
5
+ const baseBorderWidth4 = "borderWidth4";
6
+ const borderWidths = {
7
+ None: baseBorderWidth0,
8
+ Divider: baseBorderWidth1,
9
+ Unselected: baseBorderWidth1,
10
+ Selected: baseBorderWidth2,
11
+ Navigation: baseBorderWidth4,
12
+ Focus: baseBorderWidth4,
13
+ Sm: baseBorderWidth1,
14
+ Md: baseBorderWidth2
15
+ };
16
+ const getBorderWidth = (borderWidth) => getCssVar(borderWidths[borderWidth]);
17
+ export {
18
+ getBorderWidth
19
+ };
@@ -0,0 +1,14 @@
1
+ import { getSpacing } from "../getSpacing/index.js";
2
+ const getBottomSpacing = ({
3
+ bottomSpacing
4
+ }) => {
5
+ if (!bottomSpacing) {
6
+ return {};
7
+ }
8
+ return {
9
+ marginBottom: getSpacing(bottomSpacing)
10
+ };
11
+ };
12
+ export {
13
+ getBottomSpacing
14
+ };
@@ -0,0 +1,13 @@
1
+ import { g as getCssVar } from "../../../getCssVar-BP6T9pFM.js";
2
+ const baseWeight300 = "fontWeightLight";
3
+ const baseWeight400 = "fontWeightRegular";
4
+ const baseWeight700 = "fontWeightBold";
5
+ const fontWeights = {
6
+ light: baseWeight300,
7
+ regular: baseWeight400,
8
+ bold: baseWeight700
9
+ };
10
+ const getFontWeight = (weight) => getCssVar(fontWeights[weight]);
11
+ export {
12
+ getFontWeight
13
+ };
@@ -0,0 +1,27 @@
1
+ import { g as getCssVar } from "../../../getCssVar-BP6T9pFM.js";
2
+ const headingSizes = {
3
+ xl: {
4
+ fontSize: getCssVar("headingXlFontSize"),
5
+ lineHeight: getCssVar("headingXlLineHeight")
6
+ },
7
+ lg: {
8
+ fontSize: getCssVar("headingLgFontSize"),
9
+ lineHeight: getCssVar("headingLgLineHeight")
10
+ },
11
+ md: {
12
+ fontSize: getCssVar("headingMdFontSize"),
13
+ lineHeight: getCssVar("headingMdLineHeight")
14
+ },
15
+ sm: {
16
+ fontSize: getCssVar("headingSmFontSize"),
17
+ lineHeight: getCssVar("headingSmLineHeight")
18
+ },
19
+ xs: {
20
+ fontSize: getCssVar("headingXsFontSize"),
21
+ lineHeight: getCssVar("headingXsLineHeight")
22
+ }
23
+ };
24
+ const getHeadingSize = (size) => headingSizes[size];
25
+ export {
26
+ getHeadingSize
27
+ };
@@ -0,0 +1,7 @@
1
+ import { g as getCssVar } from "../../../getCssVar-BP6T9pFM.js";
2
+ const getHoverColor = (color) => {
3
+ return getCssVar(`${color}Hover`);
4
+ };
5
+ export {
6
+ getHoverColor
7
+ };
@@ -0,0 +1,5 @@
1
+ import { g as getCssVar } from "../../../getCssVar-BP6T9pFM.js";
2
+ const getIconColor = (color) => getCssVar(color);
3
+ export {
4
+ getIconColor
5
+ };
@@ -0,0 +1,5 @@
1
+ import { g as getCssVar } from "../../../getCssVar-BP6T9pFM.js";
2
+ const getObjectColor = (color) => getCssVar(color);
3
+ export {
4
+ getObjectColor
5
+ };
@@ -0,0 +1,11 @@
1
+ import { g as getCssVar } from "../../../getCssVar-BP6T9pFM.js";
2
+ const baseOpacity60 = "opacity60";
3
+ const baseOpacity38 = "opacity38";
4
+ const opacities = {
5
+ Overlay: baseOpacity60,
6
+ Disabled: baseOpacity38
7
+ };
8
+ const getOpacity = (opacity) => getCssVar(opacities[opacity]);
9
+ export {
10
+ getOpacity
11
+ };
@@ -0,0 +1,7 @@
1
+ import { g as getCssVar } from "../../../getCssVar-BP6T9pFM.js";
2
+ const getPressColor = (color) => {
3
+ return getCssVar(`${color}Press`);
4
+ };
5
+ export {
6
+ getPressColor
7
+ };
@@ -0,0 +1,5 @@
1
+ import { g as getCssVar } from "../../../getCssVar-BP6T9pFM.js";
2
+ const getSpacing = (spacing) => getCssVar(`spacing${spacing}`);
3
+ export {
4
+ getSpacing
5
+ };
@@ -0,0 +1,5 @@
1
+ import { g as getCssVar } from "../../../getCssVar-BP6T9pFM.js";
2
+ const getTextColor = (color) => getCssVar(color);
3
+ export {
4
+ getTextColor
5
+ };
@@ -0,0 +1,13 @@
1
+ import { g as getCssVar } from "../../../getCssVar-BP6T9pFM.js";
2
+ const baseTextDecorationNone = "textDecorationNone";
3
+ const baseTextDecorationUnderline = "textDecorationUnderline";
4
+ const baseTextDecorationStrikethrough = "textDecorationStrikethrough";
5
+ const textDecorations = {
6
+ None: baseTextDecorationNone,
7
+ Underline: baseTextDecorationUnderline,
8
+ Strikethrough: baseTextDecorationStrikethrough
9
+ };
10
+ const getTextDecoration = (textDecoration) => getCssVar(textDecorations[textDecoration]);
11
+ export {
12
+ getTextDecoration
13
+ };
@@ -0,0 +1,6 @@
1
+ const getCssVar = (cssVarName) => {
2
+ return `var(--${cssVarName})`;
3
+ };
4
+ export {
5
+ getCssVar as g
6
+ };
@@ -0,0 +1,36 @@
1
+ import { useState, useEffect } from "react";
2
+ function useFocusWithin(ref) {
3
+ const [isFocused, setIsFocused] = useState(false);
4
+ const hasActiveElement = (element) => {
5
+ if (!document) {
6
+ return false;
7
+ }
8
+ if (!element) {
9
+ return false;
10
+ }
11
+ return element == null ? void 0 : element.contains(document.activeElement);
12
+ };
13
+ const eventHandler = () => {
14
+ if (!ref || !ref.current) {
15
+ return false;
16
+ }
17
+ setTimeout(() => {
18
+ if (!ref || !ref.current) {
19
+ return false;
20
+ }
21
+ setIsFocused(hasActiveElement(ref == null ? void 0 : ref.current));
22
+ }, 300);
23
+ };
24
+ useEffect(() => {
25
+ document.addEventListener("focusin", eventHandler, false);
26
+ document.addEventListener("focusout", eventHandler, false);
27
+ return () => {
28
+ document.removeEventListener("focusin", eventHandler, false);
29
+ document.removeEventListener("focusout", eventHandler, false);
30
+ };
31
+ }, [ref, setIsFocused]);
32
+ return isFocused;
33
+ }
34
+ export {
35
+ useFocusWithin
36
+ };
@@ -0,0 +1,9 @@
1
+ import { forcedColorsQuery } from "../../foundations/media-query/forcedColors/index.js";
2
+ import { useMediaQuery } from "../useMediaQuery/index.js";
3
+ const useForcedColors = () => {
4
+ const [reducedMotion] = useMediaQuery(forcedColorsQuery);
5
+ return reducedMotion;
6
+ };
7
+ export {
8
+ useForcedColors
9
+ };
@@ -0,0 +1,19 @@
1
+ import { useState, useEffect } from "react";
2
+ const useMediaQuery = (query) => {
3
+ const [mediaQueryMatches, setMediaQueryMatches] = useState(false);
4
+ useEffect(() => {
5
+ const mediaQuery = window.matchMedia(query);
6
+ const handleMediaQueryChange = (event) => {
7
+ setMediaQueryMatches(event.matches);
8
+ };
9
+ setMediaQueryMatches(mediaQuery.matches);
10
+ mediaQuery.addEventListener("change", handleMediaQueryChange);
11
+ return () => {
12
+ mediaQuery.removeEventListener("change", handleMediaQueryChange);
13
+ };
14
+ }, [query]);
15
+ return [mediaQueryMatches];
16
+ };
17
+ export {
18
+ useMediaQuery
19
+ };
@@ -0,0 +1,9 @@
1
+ import { reducedMotionQuery } from "../../foundations/media-query/reducedMotion/index.js";
2
+ import { useMediaQuery } from "../useMediaQuery/index.js";
3
+ const useReducedMotion = () => {
4
+ const [reducedMotion] = useMediaQuery(reducedMotionQuery);
5
+ return reducedMotion;
6
+ };
7
+ export {
8
+ useReducedMotion
9
+ };
@@ -0,0 +1,54 @@
1
+ import { useState, useEffect } from "react";
2
+ const consentStorageItemName = "adv_fcData";
3
+ const consentStorageFeature = "permissions";
4
+ const consentStorageKey = "LI-TPV";
5
+ const checkThirdPartyConsentStorage = () => {
6
+ try {
7
+ const raw = sessionStorage.getItem(consentStorageItemName);
8
+ if (!raw) {
9
+ return false;
10
+ }
11
+ try {
12
+ const json = JSON.parse(raw);
13
+ if (!json[consentStorageFeature]) {
14
+ return false;
15
+ }
16
+ if (!json[consentStorageFeature][consentStorageKey]) {
17
+ return false;
18
+ }
19
+ return "true" === json[consentStorageFeature][consentStorageKey];
20
+ } catch (error) {
21
+ return false;
22
+ }
23
+ } catch (error) {
24
+ return false;
25
+ }
26
+ };
27
+ const useThirdPartyConsent = () => {
28
+ const [consent, setConsent] = useState(checkThirdPartyConsentStorage());
29
+ useEffect(() => {
30
+ const handleStorageChange = () => {
31
+ setConsent(checkThirdPartyConsentStorage());
32
+ };
33
+ window.addEventListener("storage", handleStorageChange);
34
+ const originalSetItem = sessionStorage.setItem;
35
+ sessionStorage.setItem = (key, value) => {
36
+ originalSetItem.call(sessionStorage, key, value);
37
+ if (key === consentStorageItemName) {
38
+ handleStorageChange();
39
+ }
40
+ };
41
+ return () => {
42
+ window.removeEventListener("storage", handleStorageChange);
43
+ sessionStorage.setItem = originalSetItem;
44
+ };
45
+ }, []);
46
+ return consent;
47
+ };
48
+ export {
49
+ checkThirdPartyConsentStorage,
50
+ consentStorageFeature,
51
+ consentStorageItemName,
52
+ consentStorageKey,
53
+ useThirdPartyConsent
54
+ };