@vodafone_de/brix-components 3.0.0 → 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.
- package/dist/BackgroundColor-JObp_2xA.js +14 -0
- package/dist/BorderColor-BummoQ1-.js +24 -0
- package/dist/BorderRadius-ClUShVLu.js +10 -0
- package/dist/BorderWidth-DfOlyKK7.js +16 -0
- package/dist/CornerStyle-JEbGNArR.js +6 -0
- package/dist/FontWeight-CR22KTex.js +8 -0
- package/dist/HeadingSize-CfCRn3Lh.js +12 -0
- package/dist/IconColor-CtC9WUgr.js +10 -0
- package/dist/ObjectColor-BZDBuV8H.js +22 -0
- package/dist/Opacity-smkGiwsf.js +6 -0
- package/dist/SizeTypes-Ck_RdzIf.js +8 -0
- package/dist/Spacing-D0HQH9YJ.js +16 -0
- package/dist/TextBodySize-BcZR9mh2.js +6 -0
- package/dist/TextColor-BXiR5Uq9.js +16 -0
- package/dist/colorUtils-uLZF5UIN.js +94 -0
- package/dist/components/Accordion/index.js +195 -0
- package/dist/components/AccordionGroup/index.js +59 -0
- package/dist/components/Badge/index.js +11 -0
- package/dist/components/Body/index.js +72 -6
- package/dist/components/BottomBar/index.js +79 -0
- package/dist/components/Button/index.js +24 -0
- package/dist/components/ButtonAsLink/index.js +7 -0
- package/dist/components/ButtonGroup/index.js +34 -0
- package/dist/components/Card/index.js +18 -0
- package/dist/components/Carousel/index.js +497 -0
- package/dist/components/Checkbox/index.js +218 -0
- package/dist/components/CheckboxGroup/index.js +58 -0
- package/dist/components/Collapsible/index.js +85 -0
- package/dist/components/ColorSwatch/index.js +87 -0
- package/dist/components/ColorSwatchGroup/index.js +43 -0
- package/dist/components/Container/index.js +76 -0
- package/dist/components/DateInput/index.js +86 -0
- package/dist/components/DemoBox/index.js +21 -0
- package/dist/components/Dialog/index.js +172 -0
- package/dist/components/DiscoveryCard/index.js +130 -0
- package/dist/components/DiscoveryCardGroup/index.js +53 -0
- package/dist/components/Divider/index.js +30 -0
- package/dist/components/Fieldset/index.js +41 -0
- package/dist/components/FilterGroup/index.js +148 -0
- package/dist/components/Flex/index.js +17 -0
- package/dist/components/FlexItem/index.js +41 -0
- package/dist/components/FootnoteContent/index.js +39 -0
- package/dist/components/FootnoteLink/index.js +46 -0
- package/dist/components/Form/index.js +20 -0
- package/dist/components/FormElement/index.js +31 -0
- package/dist/components/FormHelperLabel/index.js +21 -0
- package/dist/components/FormHelperMessage/index.js +47 -0
- package/dist/components/FormHelperStatusIcon/index.js +50 -0
- package/dist/components/GoogleMap/index.js +196 -0
- package/dist/components/Grid/index.js +39 -0
- package/dist/components/GridItem/index.js +12 -0
- package/dist/components/Heading/index.js +94 -0
- package/dist/components/HifiIcon/index.js +31 -0
- package/dist/components/Icon/index.js +38 -0
- package/dist/components/IconButton/index.js +85 -0
- package/dist/components/IconSnippet/index.js +112 -0
- package/dist/components/IconSnippet/styled.d.ts +1 -1
- package/dist/components/IconSnippetList/index.js +25 -0
- package/dist/components/Image/index.js +84 -0
- package/dist/components/ImageHeader/index.js +262 -0
- package/dist/components/ImageHeader/styled.d.ts +4 -4
- package/dist/components/InlineLink/index.js +43 -0
- package/dist/components/Input/index.js +55 -0
- package/dist/components/Label/index.js +22 -0
- package/dist/components/Legend/index.js +60 -0
- package/dist/components/Link/index.js +19 -0
- package/dist/components/LinkAsButton/index.js +7 -0
- package/dist/components/LinkList/index.js +64 -0
- package/dist/components/LinkListItem/index.js +316 -0
- package/dist/components/LoadingSpinner/index.js +70 -0
- package/dist/components/Notification/index.js +181 -0
- package/dist/components/Overlay/index.js +33 -0
- package/dist/components/PickerGroup/index.js +282 -0
- package/dist/components/Price/index.js +18 -0
- package/dist/components/ProductCard/index.js +81 -0
- package/dist/components/RadioGroup/index.js +197 -0
- package/dist/components/ResponsiveImage/index.js +89 -0
- package/dist/components/RichText/index.js +7 -0
- package/dist/components/ScreenreaderOnly/index.js +6 -0
- package/dist/components/SearchInput/index.js +140 -0
- package/dist/components/SelectInput/index.js +160 -0
- package/dist/components/Stepper/index.js +205 -0
- package/dist/components/SuggestInput/index.js +387 -0
- package/dist/components/Switch/index.js +169 -0
- package/dist/components/TabularPrice/index.js +8 -0
- package/dist/components/TextList/index.js +10 -0
- package/dist/components/Textarea/index.js +156 -0
- package/dist/components/Tray/index.js +218 -0
- package/dist/easing-Dm-pO8SY.js +6 -0
- package/dist/filterProps-Cewck8OH.js +13 -0
- package/dist/foundations/GlobalStyle/index.js +3 -292
- package/dist/foundations/PatternProps/index.js +1 -0
- package/dist/foundations/media-query/forcedColors/index.js +12 -0
- package/dist/foundations/media-query/reducedMotion/index.js +21 -0
- package/dist/foundations/media-query/viewport/index.js +6 -0
- package/dist/foundations/token/getBackgroundColor/index.js +5 -0
- package/dist/foundations/token/getBodySize/index.js +13 -2
- package/dist/foundations/token/getBorderColor/index.js +5 -0
- package/dist/foundations/token/getBorderRadius/index.js +15 -0
- package/dist/foundations/token/getBorderWidth/index.js +19 -0
- package/dist/foundations/token/getBottomSpacing/index.js +14 -0
- package/dist/foundations/token/getFontWeight/index.js +13 -0
- package/dist/foundations/token/getHeadingSize/index.js +27 -0
- package/dist/foundations/token/getHoverColor/index.js +7 -0
- package/dist/foundations/token/getIconColor/index.js +5 -0
- package/dist/foundations/token/getObjectColor/index.js +5 -0
- package/dist/foundations/token/getOpacity/index.js +11 -0
- package/dist/foundations/token/getPressColor/index.js +7 -0
- package/dist/foundations/token/getSpacing/index.js +5 -0
- package/dist/foundations/token/getTextColor/index.js +5 -0
- package/dist/foundations/token/getTextDecoration/index.js +13 -0
- package/dist/getCssVar-BP6T9pFM.js +6 -0
- package/dist/hooks/useFocusWithin/index.js +36 -0
- package/dist/hooks/useForcedColors/index.js +9 -0
- package/dist/hooks/useMediaQuery/index.js +19 -0
- package/dist/hooks/useReducedMotion/index.js +9 -0
- package/dist/hooks/useThirdPartyConsent/index.js +54 -0
- package/dist/hooks/useViewport/index.js +24 -0
- package/dist/index-BXLT6ke-.js +79 -0
- package/dist/index-C4XnzWFL.js +61 -0
- package/dist/index-CeJsIf3Z.js +208 -0
- package/dist/index-Ck2bCrhT.js +32 -0
- package/dist/index-CzTqNQTT.js +79 -0
- package/dist/index-D6hvbziL.js +167 -0
- package/dist/index-DQhtQZ85.js +24 -0
- package/dist/props-Czq9XX2J.js +6 -0
- package/dist/renderInlineRichTextFromOpenText-CA52y1-B.js +2383 -0
- package/dist/shadow-u158mzuN.js +4 -0
- package/dist/styled-BpvuD699.js +45 -0
- package/dist/styled-CDWclYAa.js +124 -0
- package/dist/styled-CXSdomF5.js +34 -0
- package/dist/styled-CpoX5USb.js +71 -0
- package/dist/styled-DZo6MwrF.js +245 -0
- package/dist/styled-FNJyDkPV.js +165 -0
- package/dist/styled-Wlt68LfQ.js +133 -0
- package/dist/styled-ZpQohvyx.js +29 -0
- package/dist/tags-DI6H1biK.js +29 -0
- package/package.json +1 -2
- package/dist/index-BoPDwZgt.js +0 -18
- package/dist/index-DRj4iUs9.js +0 -117
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useRef, useEffect } from "react";
|
|
4
|
+
import { createPortal } from "react-dom";
|
|
5
|
+
import { f as fontWeightBold } from "../../FontWeight-CR22KTex.js";
|
|
6
|
+
import { a as textHeadingMd } from "../../HeadingSize-CfCRn3Lh.js";
|
|
7
|
+
import { s as spacingMd, b as spacingNone } from "../../Spacing-D0HQH9YJ.js";
|
|
8
|
+
import Heading from "../Heading/index.js";
|
|
9
|
+
import styled from "styled-components";
|
|
10
|
+
import ButtonGroup from "../ButtonGroup/index.js";
|
|
11
|
+
import Card from "../Card/index.js";
|
|
12
|
+
import IconButton from "../IconButton/index.js";
|
|
13
|
+
import { getBackgroundColor } from "../../foundations/token/getBackgroundColor/index.js";
|
|
14
|
+
import { getBorderWidth } from "../../foundations/token/getBorderWidth/index.js";
|
|
15
|
+
import { getSpacing } from "../../foundations/token/getSpacing/index.js";
|
|
16
|
+
import { b as colorBackgroundOverlayStatic } from "../../BackgroundColor-JObp_2xA.js";
|
|
17
|
+
import { a as borderWidthFocus } from "../../BorderWidth-DfOlyKK7.js";
|
|
18
|
+
import { f as filterProps } from "../../filterProps-Cewck8OH.js";
|
|
19
|
+
import Flex from "../Flex/index.js";
|
|
20
|
+
const DialogOverlayStyled = styled.div.withConfig({
|
|
21
|
+
shouldForwardProp: filterProps(),
|
|
22
|
+
displayName: "DialogOverlayStyled",
|
|
23
|
+
componentId: "sc-z6nqyy-0"
|
|
24
|
+
})({
|
|
25
|
+
position: "absolute",
|
|
26
|
+
top: 0,
|
|
27
|
+
left: 0,
|
|
28
|
+
padding: `0 ${getSpacing(spacingMd)}`,
|
|
29
|
+
flexDirection: "column",
|
|
30
|
+
justifyContent: "center",
|
|
31
|
+
background: getBackgroundColor(colorBackgroundOverlayStatic),
|
|
32
|
+
height: "100%",
|
|
33
|
+
width: "100%",
|
|
34
|
+
zIndex: "22"
|
|
35
|
+
}, ({
|
|
36
|
+
open
|
|
37
|
+
}) => ({
|
|
38
|
+
display: open ? "flex" : "none"
|
|
39
|
+
}));
|
|
40
|
+
const DialogCardStyled = styled(Card).withConfig({
|
|
41
|
+
displayName: "DialogCardStyled",
|
|
42
|
+
componentId: "sc-z6nqyy-1"
|
|
43
|
+
})({
|
|
44
|
+
height: "auto",
|
|
45
|
+
maxHeight: `calc(100% - 2*${getSpacing(spacingMd)})`,
|
|
46
|
+
maxWidth: "1240px",
|
|
47
|
+
alignSelf: "center",
|
|
48
|
+
padding: `${getSpacing(spacingMd)} calc(${getSpacing(spacingMd)} - ${getBorderWidth(borderWidthFocus)})`
|
|
49
|
+
});
|
|
50
|
+
const DialogIconButtonStyled = styled(IconButton).withConfig({
|
|
51
|
+
displayName: "DialogIconButtonStyled",
|
|
52
|
+
componentId: "sc-z6nqyy-2"
|
|
53
|
+
})({
|
|
54
|
+
flex: "0 0 auto"
|
|
55
|
+
});
|
|
56
|
+
const DialogButtonGroupStyled = styled(ButtonGroup).withConfig({
|
|
57
|
+
displayName: "DialogButtonGroupStyled",
|
|
58
|
+
componentId: "sc-z6nqyy-3"
|
|
59
|
+
})({
|
|
60
|
+
justifyContent: "flex-end",
|
|
61
|
+
padding: `0 ${getBorderWidth(borderWidthFocus)}`
|
|
62
|
+
});
|
|
63
|
+
const DialogChildrenContainerStyled = styled("div").withConfig({
|
|
64
|
+
displayName: "DialogChildrenContainerStyled",
|
|
65
|
+
componentId: "sc-z6nqyy-4"
|
|
66
|
+
})({
|
|
67
|
+
padding: `${getBorderWidth(borderWidthFocus)} ${getBorderWidth(borderWidthFocus)} 0`,
|
|
68
|
+
marginBottom: getSpacing(spacingMd),
|
|
69
|
+
overflowY: "auto"
|
|
70
|
+
});
|
|
71
|
+
const DialogHeadingContainerStyled = styled(Flex).withConfig({
|
|
72
|
+
displayName: "DialogHeadingContainerStyled",
|
|
73
|
+
componentId: "sc-z6nqyy-5"
|
|
74
|
+
})({
|
|
75
|
+
padding: `0 ${getBorderWidth(borderWidthFocus)}`,
|
|
76
|
+
marginBottom: `calc(${getSpacing(spacingMd)} - ${getBorderWidth(borderWidthFocus)})`
|
|
77
|
+
});
|
|
78
|
+
const Dialog = ({
|
|
79
|
+
heading,
|
|
80
|
+
children,
|
|
81
|
+
uid,
|
|
82
|
+
focusElementOnOpen,
|
|
83
|
+
focusElementOnClose,
|
|
84
|
+
buttons,
|
|
85
|
+
dismissable = true,
|
|
86
|
+
// This default is set as the 'wrapper' element is currently containing the majority of the content of pages from our CMS.
|
|
87
|
+
contentElements = ".wrapper",
|
|
88
|
+
...props
|
|
89
|
+
}) => {
|
|
90
|
+
const [open, setOpen] = useState(props.open === true);
|
|
91
|
+
const invokingElement = useRef(null);
|
|
92
|
+
const headingId = `${uid}-dialog-heading`;
|
|
93
|
+
const headingProps = {
|
|
94
|
+
...heading,
|
|
95
|
+
size: textHeadingMd,
|
|
96
|
+
weight: fontWeightBold,
|
|
97
|
+
uid: headingId,
|
|
98
|
+
bottomSpacing: spacingNone
|
|
99
|
+
};
|
|
100
|
+
const closeWithEscape = (event) => {
|
|
101
|
+
if (event.key !== "Escape") return;
|
|
102
|
+
closeDialog();
|
|
103
|
+
};
|
|
104
|
+
const updateAttributes = (element, open2) => {
|
|
105
|
+
if (open2) {
|
|
106
|
+
element.setAttribute("aria-hidden", "true");
|
|
107
|
+
} else {
|
|
108
|
+
element.removeAttribute("aria-hidden");
|
|
109
|
+
}
|
|
110
|
+
element.toggleAttribute("inert", open2);
|
|
111
|
+
};
|
|
112
|
+
const updateElements = (open2) => {
|
|
113
|
+
const content = document.querySelectorAll(contentElements);
|
|
114
|
+
for (const element of content) {
|
|
115
|
+
updateAttributes(element, open2);
|
|
116
|
+
}
|
|
117
|
+
document.body.classList.toggle("HideOverflowY", open2);
|
|
118
|
+
};
|
|
119
|
+
const openDialog = (event) => {
|
|
120
|
+
if (invokingElement) invokingElement.current = event.target;
|
|
121
|
+
setOpen(true);
|
|
122
|
+
};
|
|
123
|
+
const closeDialog = () => {
|
|
124
|
+
var _a;
|
|
125
|
+
(_a = props.onToggle) == null ? void 0 : _a.call(props, false);
|
|
126
|
+
setOpen(false);
|
|
127
|
+
};
|
|
128
|
+
useEffect(() => {
|
|
129
|
+
setOpen(true === props.open);
|
|
130
|
+
}, [props.open]);
|
|
131
|
+
useEffect(() => {
|
|
132
|
+
const openingElements = document.querySelectorAll(`[data-action='dialog-${uid}']`);
|
|
133
|
+
for (const openingElement of openingElements) {
|
|
134
|
+
openingElement.addEventListener("click", openDialog);
|
|
135
|
+
}
|
|
136
|
+
return () => {
|
|
137
|
+
for (const openingElement of openingElements) {
|
|
138
|
+
openingElement.removeEventListener("click", openDialog);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
}, []);
|
|
142
|
+
useEffect(() => {
|
|
143
|
+
var _a;
|
|
144
|
+
if (open) {
|
|
145
|
+
updateElements(true);
|
|
146
|
+
focusElementOnOpen && ((_a = document.getElementById(focusElementOnOpen)) == null ? void 0 : _a.focus());
|
|
147
|
+
dismissable && document.addEventListener("keydown", closeWithEscape);
|
|
148
|
+
}
|
|
149
|
+
return () => {
|
|
150
|
+
var _a2, _b;
|
|
151
|
+
updateElements(false);
|
|
152
|
+
focusElementOnClose ? (_a2 = document.getElementById(focusElementOnClose)) == null ? void 0 : _a2.focus() : (_b = invokingElement.current) == null ? void 0 : _b.focus();
|
|
153
|
+
dismissable && document.removeEventListener("keydown", closeWithEscape);
|
|
154
|
+
};
|
|
155
|
+
}, [open]);
|
|
156
|
+
const onCloseIconButtonClick = (event) => {
|
|
157
|
+
event.preventDefault();
|
|
158
|
+
closeDialog();
|
|
159
|
+
};
|
|
160
|
+
const dialog = /* @__PURE__ */ jsx(DialogOverlayStyled, { open, id: `dialog-${uid}`, className: props.className, children: /* @__PURE__ */ jsxs(DialogCardStyled, { role: "dialog", "aria-modal": "true", "aria-describedby": headingId, children: [
|
|
161
|
+
/* @__PURE__ */ jsxs(DialogHeadingContainerStyled, { justify: "between", bottomSpacing: spacingNone, children: [
|
|
162
|
+
/* @__PURE__ */ jsx(Heading, { ...headingProps }),
|
|
163
|
+
dismissable && /* @__PURE__ */ jsx(DialogIconButtonStyled, { label: "Schließen", iconName: "Close", appearance: "tertiary", bottomSpacing: spacingNone, onClick: onCloseIconButtonClick })
|
|
164
|
+
] }),
|
|
165
|
+
/* @__PURE__ */ jsx(DialogChildrenContainerStyled, { children }),
|
|
166
|
+
/* @__PURE__ */ jsx(DialogButtonGroupStyled, { ...buttons, orientation: "horizontal", justifyHorizontal: "end", isReversed: true })
|
|
167
|
+
] }) });
|
|
168
|
+
return open ? createPortal(dialog, document.body) : null;
|
|
169
|
+
};
|
|
170
|
+
export {
|
|
171
|
+
Dialog as default
|
|
172
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Fragment } from "react";
|
|
4
|
+
import { R as RichText } from "../../index-D6hvbziL.js";
|
|
5
|
+
import { f as fontWeightBold } from "../../FontWeight-CR22KTex.js";
|
|
6
|
+
import { b as textHeadingSm } from "../../HeadingSize-CfCRn3Lh.js";
|
|
7
|
+
import { s as spacingMd, b as spacingNone, a as spacingXs, c as spacingSm } from "../../Spacing-D0HQH9YJ.js";
|
|
8
|
+
import { s as smallSize } from "../../SizeTypes-Ck_RdzIf.js";
|
|
9
|
+
import { a as BadgeStyled, B as Badge } from "../../index-CzTqNQTT.js";
|
|
10
|
+
import Body, { bodyAlignLeft, bodyAlignCenter } from "../Body/index.js";
|
|
11
|
+
import Heading from "../Heading/index.js";
|
|
12
|
+
import Link from "../Link/index.js";
|
|
13
|
+
import { P as Price, c as priceSizeSm, d as priceAlignLeft, a as priceAlignCenter, b as priceOrientationVertical } from "../../index-CeJsIf3Z.js";
|
|
14
|
+
import Image, { aspectRatio16_9, aspectRatio1_1 } from "../Image/index.js";
|
|
15
|
+
import { a as cornerRounded } from "../../CornerStyle-JEbGNArR.js";
|
|
16
|
+
import styled from "styled-components";
|
|
17
|
+
import { getBottomSpacing } from "../../foundations/token/getBottomSpacing/index.js";
|
|
18
|
+
import { getSpacing } from "../../foundations/token/getSpacing/index.js";
|
|
19
|
+
import { f as filterProps } from "../../filterProps-Cewck8OH.js";
|
|
20
|
+
import Card from "../Card/index.js";
|
|
21
|
+
import { a as LinkStyled } from "../../index-BXLT6ke-.js";
|
|
22
|
+
const discoveryCardOrientationVertical = "vertical";
|
|
23
|
+
const discoveryCardOrientationHorizontal = "horizontal";
|
|
24
|
+
const DiscoveryCardStyled = styled(Card).withConfig({
|
|
25
|
+
shouldForwardProp: filterProps(),
|
|
26
|
+
displayName: "DiscoveryCardStyled",
|
|
27
|
+
componentId: "sc-6ng9yt-0"
|
|
28
|
+
})(({
|
|
29
|
+
orientation
|
|
30
|
+
}) => {
|
|
31
|
+
const isVertical = orientation === discoveryCardOrientationVertical;
|
|
32
|
+
return {
|
|
33
|
+
...isVertical ? {
|
|
34
|
+
[`& ${BadgeStyled}`]: {
|
|
35
|
+
marginLeft: "auto",
|
|
36
|
+
marginRight: "auto"
|
|
37
|
+
},
|
|
38
|
+
[`& ${LinkStyled}`]: {
|
|
39
|
+
marginLeft: "auto",
|
|
40
|
+
marginRight: "auto"
|
|
41
|
+
}
|
|
42
|
+
} : {
|
|
43
|
+
display: "flex",
|
|
44
|
+
flexDirection: "row-reverse",
|
|
45
|
+
gap: getSpacing(spacingMd),
|
|
46
|
+
alignItems: "center",
|
|
47
|
+
textAlign: "center"
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}, ({
|
|
51
|
+
bottomSpacing = spacingMd
|
|
52
|
+
}) => getBottomSpacing({
|
|
53
|
+
bottomSpacing
|
|
54
|
+
}));
|
|
55
|
+
const DiscoveryCardContentyled = styled.div.withConfig({
|
|
56
|
+
displayName: "DiscoveryCardContentyled",
|
|
57
|
+
componentId: "sc-6ng9yt-1"
|
|
58
|
+
})({
|
|
59
|
+
flex: 1,
|
|
60
|
+
display: "flex",
|
|
61
|
+
flexDirection: "column"
|
|
62
|
+
});
|
|
63
|
+
const DiscoveryCardImageLinkStyled = styled.a.withConfig({
|
|
64
|
+
shouldForwardProp: filterProps(),
|
|
65
|
+
displayName: "DiscoveryCardImageLinkStyled",
|
|
66
|
+
componentId: "sc-6ng9yt-2"
|
|
67
|
+
})(({
|
|
68
|
+
orientation
|
|
69
|
+
}) => {
|
|
70
|
+
if (orientation === discoveryCardOrientationVertical) {
|
|
71
|
+
return {
|
|
72
|
+
width: "100%"
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
flex: 1,
|
|
77
|
+
maxWidth: "320px"
|
|
78
|
+
};
|
|
79
|
+
}, ({
|
|
80
|
+
bottomSpacing = spacingNone
|
|
81
|
+
}) => getBottomSpacing({
|
|
82
|
+
bottomSpacing
|
|
83
|
+
}));
|
|
84
|
+
styled(Image).withConfig({
|
|
85
|
+
displayName: "DiscoveryCardImageStyled",
|
|
86
|
+
componentId: "sc-6ng9yt-3"
|
|
87
|
+
})({
|
|
88
|
+
width: "100%",
|
|
89
|
+
height: "100%"
|
|
90
|
+
});
|
|
91
|
+
const DiscoveryCardLinkedImage = ({
|
|
92
|
+
uid,
|
|
93
|
+
image,
|
|
94
|
+
link: {
|
|
95
|
+
icon: _icon,
|
|
96
|
+
component: _component,
|
|
97
|
+
...linkProps
|
|
98
|
+
},
|
|
99
|
+
orientation = discoveryCardOrientationVertical,
|
|
100
|
+
bottomSpacing
|
|
101
|
+
}) => /* @__PURE__ */ jsx(DiscoveryCardImageLinkStyled, { ...linkProps, tabIndex: -1, "aria-describedby": `headingId-${uid}`, orientation, bottomSpacing, children: /* @__PURE__ */ jsx(Image, { ...image, aspectRatio: orientation === discoveryCardOrientationVertical ? aspectRatio16_9 : aspectRatio1_1, corners: cornerRounded }) });
|
|
102
|
+
const DiscoveryCard = ({
|
|
103
|
+
orientation = discoveryCardOrientationVertical,
|
|
104
|
+
uid,
|
|
105
|
+
image,
|
|
106
|
+
heading,
|
|
107
|
+
link,
|
|
108
|
+
badge,
|
|
109
|
+
body,
|
|
110
|
+
price,
|
|
111
|
+
...props
|
|
112
|
+
}) => {
|
|
113
|
+
const ContentWrapper = orientation === discoveryCardOrientationHorizontal ? DiscoveryCardContentyled : Fragment;
|
|
114
|
+
return /* @__PURE__ */ jsxs(DiscoveryCardStyled, { ...props, orientation, children: [
|
|
115
|
+
/* @__PURE__ */ jsx(DiscoveryCardLinkedImage, { uid, orientation, link, image, bottomSpacing: discoveryCardOrientationHorizontal === orientation ? spacingNone : spacingMd }),
|
|
116
|
+
/* @__PURE__ */ jsxs(ContentWrapper, { children: [
|
|
117
|
+
badge && /* @__PURE__ */ jsx(Badge, { ...badge, size: smallSize, bottomSpacing: spacingXs }),
|
|
118
|
+
/* @__PURE__ */ jsx(Heading, { ...heading, size: textHeadingSm, weight: fontWeightBold, align: discoveryCardOrientationHorizontal === orientation ? bodyAlignLeft : bodyAlignCenter, id: `headingId-${uid}`, bottomSpacing: !body && !price ? spacingSm : spacingXs, children: heading.children }),
|
|
119
|
+
body && body.component === "Body" && /* @__PURE__ */ jsx(Body, { ...body, align: discoveryCardOrientationHorizontal === orientation ? bodyAlignLeft : bodyAlignCenter, bottomSpacing: !price ? spacingSm : spacingXs, children: body.children }),
|
|
120
|
+
body && body.component === "RichText" && /* @__PURE__ */ jsx(RichText, { ...body, bottomSpacing: !price ? spacingSm : spacingXs }),
|
|
121
|
+
price && /* @__PURE__ */ jsx(Price, { ...price, orientation: priceOrientationVertical, align: discoveryCardOrientationHorizontal === orientation ? priceAlignLeft : priceAlignCenter, size: priceSizeSm, bottomSpacing: spacingSm }),
|
|
122
|
+
/* @__PURE__ */ jsx(Link, { ...link, "aria-describedby": `headingId-${uid}`, bottomSpacing: spacingNone })
|
|
123
|
+
] })
|
|
124
|
+
] });
|
|
125
|
+
};
|
|
126
|
+
export {
|
|
127
|
+
DiscoveryCard as default,
|
|
128
|
+
discoveryCardOrientationHorizontal,
|
|
129
|
+
discoveryCardOrientationVertical
|
|
130
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import DiscoveryCard, { discoveryCardOrientationVertical } from "../DiscoveryCard/index.js";
|
|
5
|
+
import Grid from "../Grid/index.js";
|
|
6
|
+
import GridItem from "../GridItem/index.js";
|
|
7
|
+
import { getSpacing } from "../../foundations/token/getSpacing/index.js";
|
|
8
|
+
import { s as spacingMd } from "../../Spacing-D0HQH9YJ.js";
|
|
9
|
+
import { a as LinkStyled } from "../../index-BXLT6ke-.js";
|
|
10
|
+
const DiscoveryCardGroupGridStyled = styled(Grid).withConfig({
|
|
11
|
+
displayName: "DiscoveryCardGroupGridStyled",
|
|
12
|
+
componentId: "sc-6axszn-0"
|
|
13
|
+
})({
|
|
14
|
+
alignItems: "stretch"
|
|
15
|
+
});
|
|
16
|
+
const DiscoveryCardGroupGridItemStyled = styled(GridItem).withConfig({
|
|
17
|
+
displayName: "DiscoveryCardGroupGridItemStyled",
|
|
18
|
+
componentId: "sc-6axszn-1"
|
|
19
|
+
})({
|
|
20
|
+
gap: getSpacing(spacingMd)
|
|
21
|
+
});
|
|
22
|
+
const DiscoveryCardStyled = styled(DiscoveryCard).withConfig({
|
|
23
|
+
displayName: "DiscoveryCardStyled",
|
|
24
|
+
componentId: "sc-6axszn-2"
|
|
25
|
+
})({
|
|
26
|
+
flex: 1,
|
|
27
|
+
marginBottom: 0
|
|
28
|
+
}, ({
|
|
29
|
+
orientation
|
|
30
|
+
}) => {
|
|
31
|
+
const css = {};
|
|
32
|
+
if (orientation === discoveryCardOrientationVertical) {
|
|
33
|
+
const buttonSelector = `& ${LinkStyled.toString()}`;
|
|
34
|
+
css[buttonSelector] = {
|
|
35
|
+
marginTop: "auto"
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
return css;
|
|
39
|
+
});
|
|
40
|
+
const DiscoveryCardGroup = ({
|
|
41
|
+
component: _component,
|
|
42
|
+
discoveryCardsList,
|
|
43
|
+
...props
|
|
44
|
+
}) => /* @__PURE__ */ jsxs(DiscoveryCardGroupGridStyled, { ...props, children: [
|
|
45
|
+
/* @__PURE__ */ jsx(DiscoveryCardGroupGridItemStyled, { sm: 12, md: 6, children: /* @__PURE__ */ jsx(DiscoveryCardStyled, { ...discoveryCardsList[0] }) }),
|
|
46
|
+
/* @__PURE__ */ jsxs(DiscoveryCardGroupGridItemStyled, { sm: 12, md: 6, children: [
|
|
47
|
+
/* @__PURE__ */ jsx(DiscoveryCardStyled, { ...discoveryCardsList[1] }),
|
|
48
|
+
/* @__PURE__ */ jsx(DiscoveryCardStyled, { ...discoveryCardsList[2] })
|
|
49
|
+
] })
|
|
50
|
+
] });
|
|
51
|
+
export {
|
|
52
|
+
DiscoveryCardGroup as default
|
|
53
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import forcedColors from "../../foundations/media-query/forcedColors/index.js";
|
|
5
|
+
import { getBorderColor } from "../../foundations/token/getBorderColor/index.js";
|
|
6
|
+
import { getBorderWidth } from "../../foundations/token/getBorderWidth/index.js";
|
|
7
|
+
import { getBottomSpacing } from "../../foundations/token/getBottomSpacing/index.js";
|
|
8
|
+
import { j as colorBorderSubtle } from "../../BorderColor-BummoQ1-.js";
|
|
9
|
+
import { s as spacingMd } from "../../Spacing-D0HQH9YJ.js";
|
|
10
|
+
import { f as filterProps } from "../../filterProps-Cewck8OH.js";
|
|
11
|
+
const DividerLineStyled = styled.hr.withConfig({
|
|
12
|
+
shouldForwardProp: filterProps(),
|
|
13
|
+
displayName: "DividerLineStyled",
|
|
14
|
+
componentId: "sc-1lpd5g7-0"
|
|
15
|
+
})({
|
|
16
|
+
...forcedColors({
|
|
17
|
+
border: `${getBorderWidth("Divider")} solid CanvasText`
|
|
18
|
+
}),
|
|
19
|
+
border: `${getBorderWidth("Divider")} solid ${getBorderColor(colorBorderSubtle)}`,
|
|
20
|
+
borderBottom: "none",
|
|
21
|
+
width: "100%"
|
|
22
|
+
}, ({
|
|
23
|
+
bottomSpacing = spacingMd
|
|
24
|
+
}) => getBottomSpacing({
|
|
25
|
+
bottomSpacing
|
|
26
|
+
}));
|
|
27
|
+
const Divider = (props) => /* @__PURE__ */ jsx(DividerLineStyled, { ...props });
|
|
28
|
+
export {
|
|
29
|
+
Divider as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { NotificationErrorIcon } from "@vfde-react/inline-icon-library";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import FormHelperMessage from "../FormHelperMessage/index.js";
|
|
6
|
+
import { i as inputStateError } from "../../props-Czq9XX2J.js";
|
|
7
|
+
import Legend from "../Legend/index.js";
|
|
8
|
+
import { s as spacingMd } from "../../Spacing-D0HQH9YJ.js";
|
|
9
|
+
import styled from "styled-components";
|
|
10
|
+
import { getBottomSpacing } from "../../foundations/token/getBottomSpacing/index.js";
|
|
11
|
+
import { f as filterProps } from "../../filterProps-Cewck8OH.js";
|
|
12
|
+
const FieldsetStyled = styled.fieldset.withConfig({
|
|
13
|
+
shouldForwardProp: filterProps(),
|
|
14
|
+
displayName: "FieldsetStyled",
|
|
15
|
+
componentId: "sc-1838z8i-0"
|
|
16
|
+
})(
|
|
17
|
+
// Chrome gives a fieldset a min-width equal to its content, so we need to reset it here
|
|
18
|
+
{
|
|
19
|
+
minWidth: "0px"
|
|
20
|
+
},
|
|
21
|
+
getBottomSpacing
|
|
22
|
+
);
|
|
23
|
+
const Fieldset = forwardRef(({
|
|
24
|
+
uid,
|
|
25
|
+
legend,
|
|
26
|
+
errorMessage,
|
|
27
|
+
helperText,
|
|
28
|
+
bottomSpacing = spacingMd,
|
|
29
|
+
children,
|
|
30
|
+
status,
|
|
31
|
+
...props
|
|
32
|
+
}, ref) => {
|
|
33
|
+
return /* @__PURE__ */ jsxs(FieldsetStyled, { ...props, uid, "aria-labelledby": inputStateError !== status && helperText || inputStateError === status && errorMessage ? `fieldset-legend-${uid} fieldset-message-${uid}` : props["aria-labelledby"], bottomSpacing, ref, children: [
|
|
34
|
+
legend && /* @__PURE__ */ jsx(Legend, { ...legend, id: inputStateError !== status && helperText || inputStateError === status && errorMessage ? `fieldset-legend-${uid}` : props["id"] }),
|
|
35
|
+
children,
|
|
36
|
+
inputStateError !== status && helperText || inputStateError === status && errorMessage ? /* @__PURE__ */ jsx(FormHelperMessage, { id: `fieldset-message-${uid}`, message: inputStateError === status ? errorMessage : helperText, status, children: status === inputStateError && /* @__PURE__ */ jsx(NotificationErrorIcon, { size: "iconSizeXs" }) }) : null
|
|
37
|
+
] });
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
Fieldset as default
|
|
41
|
+
};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { IconLoader, iconSizeSm } from "@vfde-react/inline-icon-library";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import Fieldset from "../Fieldset/index.js";
|
|
6
|
+
import styled from "styled-components";
|
|
7
|
+
import { s as screenreaderOnly } from "../../index-DQhtQZ85.js";
|
|
8
|
+
import forcedColors from "../../foundations/media-query/forcedColors/index.js";
|
|
9
|
+
import { getBackgroundColor } from "../../foundations/token/getBackgroundColor/index.js";
|
|
10
|
+
import { getBodySize } from "../../foundations/token/getBodySize/index.js";
|
|
11
|
+
import { getBorderColor } from "../../foundations/token/getBorderColor/index.js";
|
|
12
|
+
import { getBorderRadius } from "../../foundations/token/getBorderRadius/index.js";
|
|
13
|
+
import { getBorderWidth } from "../../foundations/token/getBorderWidth/index.js";
|
|
14
|
+
import { getHoverColor } from "../../foundations/token/getHoverColor/index.js";
|
|
15
|
+
import { getObjectColor } from "../../foundations/token/getObjectColor/index.js";
|
|
16
|
+
import { getSpacing } from "../../foundations/token/getSpacing/index.js";
|
|
17
|
+
import { getTextColor } from "../../foundations/token/getTextColor/index.js";
|
|
18
|
+
import { c as colorBackgroundNeutral } from "../../BackgroundColor-JObp_2xA.js";
|
|
19
|
+
import { b as colorBorderUnselected, i as colorBorderSelected, c as colorBorderFocus } from "../../BorderColor-BummoQ1-.js";
|
|
20
|
+
import { c as borderRadiusFull } from "../../BorderRadius-ClUShVLu.js";
|
|
21
|
+
import { b as borderWidthUnselected, a as borderWidthFocus } from "../../BorderWidth-DfOlyKK7.js";
|
|
22
|
+
import { b as colorObjectSelected } from "../../ObjectColor-BZDBuV8H.js";
|
|
23
|
+
import { a as spacingXs, b as spacingNone, e as spacing2Xs, c as spacingSm } from "../../Spacing-D0HQH9YJ.js";
|
|
24
|
+
import { t as textBodyMd } from "../../TextBodySize-BcZR9mh2.js";
|
|
25
|
+
import { a as colorTextNeutral, c as colorTextInverseStatic } from "../../TextColor-BXiR5Uq9.js";
|
|
26
|
+
import { f as filterProps } from "../../filterProps-Cewck8OH.js";
|
|
27
|
+
const FilterGroupStyled = styled.div.withConfig({
|
|
28
|
+
shouldForwardProp: filterProps(),
|
|
29
|
+
displayName: "FilterGroupStyled",
|
|
30
|
+
componentId: "sc-170zpd1-0"
|
|
31
|
+
})({
|
|
32
|
+
display: "flex",
|
|
33
|
+
flexWrap: "wrap",
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
color: getTextColor(colorTextNeutral)
|
|
36
|
+
}, {
|
|
37
|
+
gap: getSpacing(spacingXs)
|
|
38
|
+
});
|
|
39
|
+
const FilterStyled = styled.label.withConfig({
|
|
40
|
+
shouldForwardProp: filterProps(),
|
|
41
|
+
displayName: "FilterStyled",
|
|
42
|
+
componentId: "sc-170zpd1-1"
|
|
43
|
+
})({
|
|
44
|
+
textDecoration: "none",
|
|
45
|
+
whiteSpace: "nowrap",
|
|
46
|
+
userSelect: "none",
|
|
47
|
+
marginBottom: 0,
|
|
48
|
+
display: "flex",
|
|
49
|
+
alignItems: "center",
|
|
50
|
+
outline: "none",
|
|
51
|
+
cursor: "pointer",
|
|
52
|
+
padding: `${getSpacing(spacingXs)} ${getSpacing(spacingSm)}`,
|
|
53
|
+
borderRadius: getBorderRadius(borderRadiusFull),
|
|
54
|
+
borderStyle: "solid",
|
|
55
|
+
borderWidth: getBorderWidth(borderWidthUnselected),
|
|
56
|
+
gap: `${getSpacing(spacingNone)} ${getSpacing(spacing2Xs)}`
|
|
57
|
+
}, getBodySize(textBodyMd), ({
|
|
58
|
+
checked = false
|
|
59
|
+
}) => {
|
|
60
|
+
if (!checked) {
|
|
61
|
+
return {
|
|
62
|
+
background: getBackgroundColor(colorBackgroundNeutral),
|
|
63
|
+
color: getTextColor(colorTextNeutral),
|
|
64
|
+
borderColor: getBorderColor(colorBorderUnselected),
|
|
65
|
+
"&:hover, &:focus-within": {
|
|
66
|
+
background: getHoverColor(colorBackgroundNeutral)
|
|
67
|
+
},
|
|
68
|
+
...forcedColors({
|
|
69
|
+
color: "CanvasText",
|
|
70
|
+
background: "Canvas"
|
|
71
|
+
})
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
background: getObjectColor(colorObjectSelected),
|
|
76
|
+
color: getTextColor(colorTextInverseStatic),
|
|
77
|
+
borderColor: getBorderColor(colorBorderSelected),
|
|
78
|
+
"&:hover, &:focus-within": {
|
|
79
|
+
background: getHoverColor(colorObjectSelected)
|
|
80
|
+
},
|
|
81
|
+
...forcedColors({
|
|
82
|
+
color: "SelectedItemText",
|
|
83
|
+
background: "SelectedItem",
|
|
84
|
+
"&:hover, &:focus-within": {
|
|
85
|
+
background: "SelectedItem"
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
};
|
|
89
|
+
}, {
|
|
90
|
+
"&:has(:focus-visible)": {
|
|
91
|
+
...forcedColors({
|
|
92
|
+
outline: `${getBorderWidth(borderWidthFocus)} solid CanvasText`
|
|
93
|
+
}),
|
|
94
|
+
boxShadow: `${getBorderColor(colorBorderFocus)} 0px 0px 0px ${getBorderWidth(borderWidthFocus)}`,
|
|
95
|
+
outline: "none"
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
const FilterIconStyled = styled(IconLoader).withConfig({
|
|
99
|
+
displayName: "FilterIconStyled",
|
|
100
|
+
componentId: "sc-170zpd1-2"
|
|
101
|
+
})({
|
|
102
|
+
pointerEvents: "none"
|
|
103
|
+
});
|
|
104
|
+
const FilterInputStyled = styled.input.withConfig({
|
|
105
|
+
shouldForwardProp: filterProps(),
|
|
106
|
+
displayName: "FilterInputStyled",
|
|
107
|
+
componentId: "sc-170zpd1-3"
|
|
108
|
+
})(screenreaderOnly);
|
|
109
|
+
const FilterGroup = ({
|
|
110
|
+
component: _component,
|
|
111
|
+
uid,
|
|
112
|
+
elements,
|
|
113
|
+
onUpdate,
|
|
114
|
+
...props
|
|
115
|
+
}) => {
|
|
116
|
+
const getValuesFromCheckedItems = () => {
|
|
117
|
+
return elements.reduce((valuesArr, element) => {
|
|
118
|
+
if (element.checked) {
|
|
119
|
+
valuesArr.push(element.value);
|
|
120
|
+
}
|
|
121
|
+
return valuesArr;
|
|
122
|
+
}, []);
|
|
123
|
+
};
|
|
124
|
+
const [checkedValues, setCheckedValues] = useState(getValuesFromCheckedItems());
|
|
125
|
+
const handleChange = (evt) => {
|
|
126
|
+
const value = evt.target.value;
|
|
127
|
+
const index = checkedValues.indexOf(value);
|
|
128
|
+
const updateChecked = [...checkedValues];
|
|
129
|
+
index === -1 ? updateChecked.push(value) : updateChecked.splice(index, 1);
|
|
130
|
+
setCheckedValues(updateChecked);
|
|
131
|
+
onUpdate(updateChecked);
|
|
132
|
+
};
|
|
133
|
+
const getFilters = elements.map(({
|
|
134
|
+
children,
|
|
135
|
+
...element
|
|
136
|
+
}) => {
|
|
137
|
+
const isChecked = element.value ? checkedValues.includes(element.value) : false;
|
|
138
|
+
return /* @__PURE__ */ jsxs(FilterStyled, { ...element.optionalLabelProps, checked: isChecked, children: [
|
|
139
|
+
element.iconName ? /* @__PURE__ */ jsx(FilterIconStyled, { name: element.iconName, size: iconSizeSm }) : null,
|
|
140
|
+
/* @__PURE__ */ jsx(FilterInputStyled, { ...element, type: "checkbox", defaultChecked: isChecked, onChange: handleChange }),
|
|
141
|
+
children
|
|
142
|
+
] }, element.value);
|
|
143
|
+
});
|
|
144
|
+
return /* @__PURE__ */ jsx(Fieldset, { ...props, uid: `fieldset-${uid}`, children: /* @__PURE__ */ jsx(FilterGroupStyled, { children: getFilters }) });
|
|
145
|
+
};
|
|
146
|
+
export {
|
|
147
|
+
FilterGroup as default
|
|
148
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { F as FlexStyled } from "../../styled-CpoX5USb.js";
|
|
4
|
+
import { e, d, c, a, f, b } from "../../styled-CpoX5USb.js";
|
|
5
|
+
const Flex = ({
|
|
6
|
+
children,
|
|
7
|
+
...props
|
|
8
|
+
}) => /* @__PURE__ */ jsx(FlexStyled, { ...props, children });
|
|
9
|
+
export {
|
|
10
|
+
Flex as default,
|
|
11
|
+
e as flexJustifyBetween,
|
|
12
|
+
d as flexJustifyCenter,
|
|
13
|
+
c as flexJustifyEnd,
|
|
14
|
+
a as flexJustifyStart,
|
|
15
|
+
f as flexOrientationHorizontal,
|
|
16
|
+
b as flexOrientationVertical
|
|
17
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cloneElement } from "react";
|
|
4
|
+
import { b as spacingNone } from "../../Spacing-D0HQH9YJ.js";
|
|
5
|
+
import styled from "styled-components";
|
|
6
|
+
import { f as filterProps } from "../../filterProps-Cewck8OH.js";
|
|
7
|
+
const flexItemFullGrow = "full";
|
|
8
|
+
const flexItemAutoGrow = "auto";
|
|
9
|
+
const FlexItemStyled = styled.div.withConfig({
|
|
10
|
+
shouldForwardProp: filterProps(),
|
|
11
|
+
displayName: "FlexItemStyled",
|
|
12
|
+
componentId: "sc-1qdfzcw-0"
|
|
13
|
+
})(({
|
|
14
|
+
grow = flexItemAutoGrow
|
|
15
|
+
}) => ({
|
|
16
|
+
flexGrow: grow === "full" ? 1 : 0
|
|
17
|
+
}));
|
|
18
|
+
const removeBottomSpacing = (children) => {
|
|
19
|
+
if (children && Array.isArray(children)) {
|
|
20
|
+
return children.map((child) => {
|
|
21
|
+
return cloneElement(child, {
|
|
22
|
+
bottomSpacing: spacingNone
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
if (children && !Array.isArray(children)) {
|
|
27
|
+
return cloneElement(children, {
|
|
28
|
+
bottomSpacing: spacingNone
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return children;
|
|
32
|
+
};
|
|
33
|
+
const FlexItem = ({
|
|
34
|
+
children,
|
|
35
|
+
...props
|
|
36
|
+
}) => /* @__PURE__ */ jsx(FlexItemStyled, { ...props, children: removeBottomSpacing(children) });
|
|
37
|
+
export {
|
|
38
|
+
FlexItem as default,
|
|
39
|
+
flexItemAutoGrow,
|
|
40
|
+
flexItemFullGrow
|
|
41
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import Link from "../Link/index.js";
|
|
4
|
+
import styled, { keyframes, css } from "styled-components";
|
|
5
|
+
import forcedColors from "../../foundations/media-query/forcedColors/index.js";
|
|
6
|
+
import { getBorderColor } from "../../foundations/token/getBorderColor/index.js";
|
|
7
|
+
import { getBorderWidth } from "../../foundations/token/getBorderWidth/index.js";
|
|
8
|
+
import { c as colorBorderFocus } from "../../BorderColor-BummoQ1-.js";
|
|
9
|
+
import { a as borderWidthFocus } from "../../BorderWidth-DfOlyKK7.js";
|
|
10
|
+
import { f as filterProps } from "../../filterProps-Cewck8OH.js";
|
|
11
|
+
const rotate = keyframes(["0%{box-shadow:transparent 0px 0px 0px 0px;}50%{box-shadow:", " 0px 0px 2px ", ";}100%{box-shadow:transparent 0px 0px 0px 0px;}}"], getBorderColor(colorBorderFocus), getBorderWidth(borderWidthFocus));
|
|
12
|
+
const FootnoteContentStyled = styled.div.withConfig({
|
|
13
|
+
shouldForwardProp: filterProps(),
|
|
14
|
+
displayName: "FootnoteContentStyled",
|
|
15
|
+
componentId: "sc-1everik-0"
|
|
16
|
+
})({
|
|
17
|
+
marginTop: getBorderWidth(borderWidthFocus),
|
|
18
|
+
"&:target": {
|
|
19
|
+
outline: "none",
|
|
20
|
+
...forcedColors({
|
|
21
|
+
outline: `${getBorderWidth(borderWidthFocus)} solid CanvasText`
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
}, css(["&:target{animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:2;animation-name:", ";}"], rotate));
|
|
25
|
+
const FootnoteContent = ({
|
|
26
|
+
linkUid,
|
|
27
|
+
backlinkText,
|
|
28
|
+
children,
|
|
29
|
+
...props
|
|
30
|
+
}) => /* @__PURE__ */ jsxs(FootnoteContentStyled, { id: props.uid, ...props, tabIndex: -1, children: [
|
|
31
|
+
children,
|
|
32
|
+
/* @__PURE__ */ jsx(Link, { id: `back-${props.uid}`, icon: {
|
|
33
|
+
position: "right",
|
|
34
|
+
name: "ArrowUp"
|
|
35
|
+
}, href: `#${linkUid}`, children: backlinkText })
|
|
36
|
+
] });
|
|
37
|
+
export {
|
|
38
|
+
FootnoteContent as default
|
|
39
|
+
};
|