@vodafone_de/brix-components 3.0.1 → 3.0.3
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/icons/index.js +603 -0
- package/dist/index-B5AxA0A-.js +79 -0
- package/dist/index-C0N671c1.js +79 -0
- package/dist/index-Cbojl4_Q.js +7134 -0
- package/dist/index-CeJsIf3Z.js +208 -0
- package/dist/index-Ck2bCrhT.js +32 -0
- package/dist/index-D6hvbziL.js +167 -0
- package/dist/index-DQhtQZ85.js +24 -0
- package/dist/index-DUnDnTyk.js +61 -0
- package/dist/props-Czq9XX2J.js +6 -0
- package/dist/{index-BaPlSfS3.js → renderInlineRichTextFromOpenText-CA52y1-B.js} +3 -105
- package/dist/shadow-u158mzuN.js +4 -0
- package/dist/styled-BPTa90Cm.js +165 -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-Wlt68LfQ.js +133 -0
- package/dist/styled-ZpQohvyx.js +29 -0
- package/dist/tags-DI6H1biK.js +29 -0
- package/package.json +2 -1
- package/dist/index-BoPDwZgt.js +0 -18
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { iv as iconSizeSm, eB as NotificationErrorIcon } from "../../index-Cbojl4_Q.js";
|
|
4
|
+
import { useState, useEffect } from "react";
|
|
5
|
+
import FormHelperMessage from "../FormHelperMessage/index.js";
|
|
6
|
+
import { i as inputStateError } from "../../props-Czq9XX2J.js";
|
|
7
|
+
import styled from "styled-components";
|
|
8
|
+
import Label from "../Label/index.js";
|
|
9
|
+
import forcedColors from "../../foundations/media-query/forcedColors/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 { getBottomSpacing } from "../../foundations/token/getBottomSpacing/index.js";
|
|
15
|
+
import { getIconColor } from "../../foundations/token/getIconColor/index.js";
|
|
16
|
+
import { getObjectColor } from "../../foundations/token/getObjectColor/index.js";
|
|
17
|
+
import { getOpacity } from "../../foundations/token/getOpacity/index.js";
|
|
18
|
+
import { getSpacing } from "../../foundations/token/getSpacing/index.js";
|
|
19
|
+
import { c as colorBorderFocus } from "../../BorderColor-BummoQ1-.js";
|
|
20
|
+
import { d as borderRadiusSm } from "../../BorderRadius-ClUShVLu.js";
|
|
21
|
+
import { a as borderWidthFocus } from "../../BorderWidth-DfOlyKK7.js";
|
|
22
|
+
import { a as opacityDisabled } from "../../Opacity-smkGiwsf.js";
|
|
23
|
+
import { s as spacingMd } from "../../Spacing-D0HQH9YJ.js";
|
|
24
|
+
import { f as filterProps } from "../../filterProps-Cewck8OH.js";
|
|
25
|
+
import { g as getCssVar } from "../../getCssVar-BP6T9pFM.js";
|
|
26
|
+
const CheckboxLabelStyled = styled(Label).withConfig({
|
|
27
|
+
shouldForwardProp: filterProps(),
|
|
28
|
+
displayName: "CheckboxLabelStyled",
|
|
29
|
+
componentId: "sc-1lo7iho-0"
|
|
30
|
+
})({
|
|
31
|
+
cursor: "pointer"
|
|
32
|
+
});
|
|
33
|
+
const CheckboxOuterContainerStyled = styled.div.withConfig({
|
|
34
|
+
shouldForwardProp: filterProps(),
|
|
35
|
+
displayName: "CheckboxOuterContainerStyled",
|
|
36
|
+
componentId: "sc-1lo7iho-1"
|
|
37
|
+
})(({
|
|
38
|
+
bottomSpacing = spacingMd
|
|
39
|
+
}) => getBottomSpacing({
|
|
40
|
+
bottomSpacing
|
|
41
|
+
}));
|
|
42
|
+
const CheckboxInnerContainerStyled = styled.div.withConfig({
|
|
43
|
+
shouldForwardProp: filterProps(),
|
|
44
|
+
displayName: "CheckboxInnerContainerStyled",
|
|
45
|
+
componentId: "sc-1lo7iho-2"
|
|
46
|
+
})({
|
|
47
|
+
display: "flex",
|
|
48
|
+
gap: getSpacing("Xs")
|
|
49
|
+
}, ({
|
|
50
|
+
hasMessage
|
|
51
|
+
}) => {
|
|
52
|
+
return {
|
|
53
|
+
marginBottom: hasMessage ? getSpacing("Md") : getSpacing("None")
|
|
54
|
+
};
|
|
55
|
+
}, ({
|
|
56
|
+
disabled
|
|
57
|
+
}) => {
|
|
58
|
+
if (disabled) {
|
|
59
|
+
return {
|
|
60
|
+
pointerEvents: "none",
|
|
61
|
+
opacity: getOpacity(opacityDisabled)
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
const CheckboxStyled = styled.span.withConfig({
|
|
66
|
+
shouldForwardProp: filterProps(),
|
|
67
|
+
displayName: "CheckboxStyled",
|
|
68
|
+
componentId: "sc-1lo7iho-3"
|
|
69
|
+
})({
|
|
70
|
+
position: "relative",
|
|
71
|
+
width: `calc(${getBodySize("md").fontSize} * ${getBodySize("md").lineHeight})`,
|
|
72
|
+
height: `calc(${getBodySize("md").fontSize} * ${getBodySize("md").lineHeight})`,
|
|
73
|
+
cursor: "pointer",
|
|
74
|
+
borderRadius: getBorderRadius(borderRadiusSm),
|
|
75
|
+
"&:has(:focus-visible)": {
|
|
76
|
+
svg: {
|
|
77
|
+
outline: `${getBorderWidth(borderWidthFocus)} solid ${getBorderColor(colorBorderFocus)}`,
|
|
78
|
+
borderRadius: getBorderRadius(borderRadiusSm),
|
|
79
|
+
...forcedColors({
|
|
80
|
+
outline: `${getBorderWidth(borderWidthFocus)} solid CanvasText`
|
|
81
|
+
})
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
const CheckboxSVGStyled = styled.svg.withConfig({
|
|
86
|
+
shouldForwardProp: filterProps(),
|
|
87
|
+
displayName: "CheckboxSVGStyled",
|
|
88
|
+
componentId: "sc-1lo7iho-4"
|
|
89
|
+
})({
|
|
90
|
+
width: getCssVar(iconSizeSm),
|
|
91
|
+
height: getCssVar(iconSizeSm),
|
|
92
|
+
fill: "none"
|
|
93
|
+
});
|
|
94
|
+
const CheckboxUncheckedSVGStyled = styled.path.withConfig({
|
|
95
|
+
shouldForwardProp: filterProps(),
|
|
96
|
+
displayName: "CheckboxUncheckedSVGStyled",
|
|
97
|
+
componentId: "sc-1lo7iho-5"
|
|
98
|
+
})({
|
|
99
|
+
fill: getObjectColor("colorObjectInverse")
|
|
100
|
+
}, forcedColors({
|
|
101
|
+
fill: "Field"
|
|
102
|
+
}), ({
|
|
103
|
+
status
|
|
104
|
+
}) => {
|
|
105
|
+
return {
|
|
106
|
+
stroke: status === "error" ? getBorderColor("colorBorderCritical") : getBorderColor("colorBorderUnselected"),
|
|
107
|
+
...forcedColors({
|
|
108
|
+
stroke: "FieldText"
|
|
109
|
+
})
|
|
110
|
+
};
|
|
111
|
+
});
|
|
112
|
+
const CheckboxCheckedBorderPathStyled = styled.path.withConfig({
|
|
113
|
+
shouldForwardProp: filterProps(),
|
|
114
|
+
displayName: "CheckboxCheckedBorderPathStyled",
|
|
115
|
+
componentId: "sc-1lo7iho-6"
|
|
116
|
+
})(({
|
|
117
|
+
status
|
|
118
|
+
}) => {
|
|
119
|
+
return {
|
|
120
|
+
stroke: status === "error" ? getBorderColor("colorBorderCritical") : getBorderColor("colorBorderSelected"),
|
|
121
|
+
...forcedColors({
|
|
122
|
+
stroke: "FieldText"
|
|
123
|
+
})
|
|
124
|
+
};
|
|
125
|
+
});
|
|
126
|
+
const CheckboxCheckedFillingPathStyled = styled.path.withConfig({
|
|
127
|
+
shouldForwardProp: filterProps(),
|
|
128
|
+
displayName: "CheckboxCheckedFillingPathStyled",
|
|
129
|
+
componentId: "sc-1lo7iho-7"
|
|
130
|
+
})({
|
|
131
|
+
fill: getObjectColor("colorObjectSelected")
|
|
132
|
+
}, forcedColors({
|
|
133
|
+
fill: "FieldText"
|
|
134
|
+
}));
|
|
135
|
+
const CheckboxCheckedTickPathStyled = styled.path.withConfig({
|
|
136
|
+
shouldForwardProp: filterProps(),
|
|
137
|
+
displayName: "CheckboxCheckedTickPathStyled",
|
|
138
|
+
componentId: "sc-1lo7iho-8"
|
|
139
|
+
})({
|
|
140
|
+
stroke: getIconColor("colorIconInverseStatic")
|
|
141
|
+
}, forcedColors({
|
|
142
|
+
stroke: "Field"
|
|
143
|
+
}));
|
|
144
|
+
const CheckboxInputStyled = styled.input.withConfig({
|
|
145
|
+
shouldForwardProp: filterProps(),
|
|
146
|
+
displayName: "CheckboxInputStyled",
|
|
147
|
+
componentId: "sc-1lo7iho-9"
|
|
148
|
+
})({
|
|
149
|
+
position: "absolute",
|
|
150
|
+
width: "100%",
|
|
151
|
+
height: "100%",
|
|
152
|
+
top: 0,
|
|
153
|
+
left: 0,
|
|
154
|
+
zIndex: 1,
|
|
155
|
+
margin: 0,
|
|
156
|
+
padding: 0,
|
|
157
|
+
cursor: "inherit",
|
|
158
|
+
appearance: "none",
|
|
159
|
+
"&:focus, &:focus-visible": {
|
|
160
|
+
outline: "none"
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
const CheckedBox = ({
|
|
164
|
+
status
|
|
165
|
+
}) => /* @__PURE__ */ jsxs(CheckboxSVGStyled, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "none", children: [
|
|
166
|
+
/* @__PURE__ */ jsx(CheckboxCheckedFillingPathStyled, { d: "M0 3C0 1.34315 1.34315 0 3 0H17C18.6569 0 20 1.34315 20 3V17C20 18.6569 18.6569 20 17 20H3C1.34315 20 0 18.6569 0 17V3Z" }),
|
|
167
|
+
/* @__PURE__ */ jsx(CheckboxCheckedBorderPathStyled, { status, d: "M0.5 3C0.5 1.61929 1.61929 0.5 3 0.5H17C18.3807 0.5 19.5 1.61929 19.5 3V17C19.5 18.3807 18.3807 19.5 17 19.5H3C1.61929 19.5 0.5 18.3807 0.5 17V3Z" }),
|
|
168
|
+
/* @__PURE__ */ jsx(CheckboxCheckedTickPathStyled, { d: "M15 6L8.15789 13L5 9.76923", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })
|
|
169
|
+
] });
|
|
170
|
+
const UncheckedBox = ({
|
|
171
|
+
status
|
|
172
|
+
}) => /* @__PURE__ */ jsx(CheckboxSVGStyled, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx(CheckboxUncheckedSVGStyled, { status, d: "M0.5 3C0.5 1.61929 1.61929 0.5 3 0.5H17C18.3807 0.5 19.5 1.61929 19.5 3V17C19.5 18.3807 18.3807 19.5 17 19.5H3C1.61929 19.5 0.5 18.3807 0.5 17V3Z" }) });
|
|
173
|
+
const Checkbox = ({
|
|
174
|
+
uid,
|
|
175
|
+
status,
|
|
176
|
+
label,
|
|
177
|
+
errorMessage,
|
|
178
|
+
helperText,
|
|
179
|
+
onUpdate,
|
|
180
|
+
disabled,
|
|
181
|
+
bottomSpacing,
|
|
182
|
+
...props
|
|
183
|
+
}) => {
|
|
184
|
+
const [checked, setChecked] = useState(true === props.checked);
|
|
185
|
+
useEffect(() => {
|
|
186
|
+
if (checked === props.checked) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
setChecked(true === props.checked);
|
|
190
|
+
}, [props.checked]);
|
|
191
|
+
const messageId = `text-${uid}`;
|
|
192
|
+
const inputProps = {
|
|
193
|
+
...props,
|
|
194
|
+
id: uid,
|
|
195
|
+
"aria-describedby": inputStateError !== status && helperText || inputStateError === status && errorMessage ? messageId : void 0,
|
|
196
|
+
"aria-invalid": inputStateError === status ? true : void 0
|
|
197
|
+
};
|
|
198
|
+
const handleChange = (event) => {
|
|
199
|
+
setChecked(!checked);
|
|
200
|
+
if (!onUpdate) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
onUpdate(event.target.value, event.target.checked === true);
|
|
204
|
+
};
|
|
205
|
+
return /* @__PURE__ */ jsxs(CheckboxOuterContainerStyled, { className: props.className, bottomSpacing, children: [
|
|
206
|
+
/* @__PURE__ */ jsxs(CheckboxInnerContainerStyled, { hasMessage: inputStateError !== status && helperText || inputStateError === status && errorMessage ? true : false, disabled, children: [
|
|
207
|
+
/* @__PURE__ */ jsxs(CheckboxStyled, { children: [
|
|
208
|
+
/* @__PURE__ */ jsx(CheckboxInputStyled, { ...inputProps, type: "checkbox", onChange: handleChange, checked, disabled }),
|
|
209
|
+
checked ? /* @__PURE__ */ jsx(CheckedBox, { status }) : /* @__PURE__ */ jsx(UncheckedBox, { status })
|
|
210
|
+
] }),
|
|
211
|
+
/* @__PURE__ */ jsx(CheckboxLabelStyled, { htmlFor: uid, children: label })
|
|
212
|
+
] }),
|
|
213
|
+
(inputStateError !== status && helperText || inputStateError === status && errorMessage) && /* @__PURE__ */ jsx(FormHelperMessage, { id: messageId, status, message: inputStateError === status ? errorMessage : helperText, children: inputStateError === status ? /* @__PURE__ */ jsx(NotificationErrorIcon, { size: iconSizeSm }) : null })
|
|
214
|
+
] });
|
|
215
|
+
};
|
|
216
|
+
export {
|
|
217
|
+
Checkbox as default
|
|
218
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useEffect, createElement } from "react";
|
|
4
|
+
import Checkbox from "../Checkbox/index.js";
|
|
5
|
+
import Fieldset from "../Fieldset/index.js";
|
|
6
|
+
import { f as spacingLg, s as spacingMd, b as spacingNone } from "../../Spacing-D0HQH9YJ.js";
|
|
7
|
+
import styled from "styled-components";
|
|
8
|
+
import { F as FlexStyled } from "../../styled-CpoX5USb.js";
|
|
9
|
+
import { getBottomSpacing } from "../../foundations/token/getBottomSpacing/index.js";
|
|
10
|
+
import { getSpacing } from "../../foundations/token/getSpacing/index.js";
|
|
11
|
+
import { f as filterProps } from "../../filterProps-Cewck8OH.js";
|
|
12
|
+
const CheckboxGroupStyled = styled(FlexStyled).withConfig({
|
|
13
|
+
shouldForwardProp: filterProps(),
|
|
14
|
+
displayName: "CheckboxGroupStyled",
|
|
15
|
+
componentId: "sc-b81jcu-0"
|
|
16
|
+
})({
|
|
17
|
+
rowGap: getSpacing(spacingMd),
|
|
18
|
+
columnGap: getSpacing(spacingLg)
|
|
19
|
+
}, getBottomSpacing({
|
|
20
|
+
bottomSpacing: spacingMd
|
|
21
|
+
}));
|
|
22
|
+
const CheckboxGroup = ({
|
|
23
|
+
component: _component,
|
|
24
|
+
checkboxes,
|
|
25
|
+
onUpdate,
|
|
26
|
+
status,
|
|
27
|
+
disabled,
|
|
28
|
+
orientation,
|
|
29
|
+
...props
|
|
30
|
+
}) => {
|
|
31
|
+
const initialCheckedState = () => checkboxes.filter((checkboxes2) => checkboxes2.checked).map((checkboxes2) => checkboxes2.value);
|
|
32
|
+
const [checkedValues, setCheckedValues] = useState(initialCheckedState());
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const values = checkboxes.filter((checkboxes2) => checkboxes2.checked).map((checkboxes2) => checkboxes2.value);
|
|
35
|
+
if (checkedValues === values) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
setCheckedValues(values);
|
|
39
|
+
}, [checkboxes]);
|
|
40
|
+
const handleUpdate = (value, isChecked) => {
|
|
41
|
+
let update = checkedValues;
|
|
42
|
+
if (isChecked) {
|
|
43
|
+
update.push(value);
|
|
44
|
+
} else {
|
|
45
|
+
update = update.filter((val) => val !== value);
|
|
46
|
+
}
|
|
47
|
+
setCheckedValues(update);
|
|
48
|
+
if (onUpdate) {
|
|
49
|
+
onUpdate(update);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
return /* @__PURE__ */ jsx(Fieldset, { ...props, status, disabled, children: /* @__PURE__ */ jsx(CheckboxGroupStyled, { orientation, children: checkboxes.map((checkbox) => {
|
|
53
|
+
return /* @__PURE__ */ createElement(Checkbox, { ...checkbox, onUpdate: handleUpdate, checked: checkedValues.includes(checkbox.value), key: checkbox.uid, status, disabled, bottomSpacing: spacingNone, errorMessage: void 0, helperText: void 0 });
|
|
54
|
+
}) }) });
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
CheckboxGroup as default
|
|
58
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useRef, useEffect } from "react";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
import { noReducedMotion } from "../../foundations/media-query/reducedMotion/index.js";
|
|
6
|
+
import { a as ease_in_out_sine } from "../../easing-Dm-pO8SY.js";
|
|
7
|
+
import { getBorderWidth } from "../../foundations/token/getBorderWidth/index.js";
|
|
8
|
+
import { getSpacing } from "../../foundations/token/getSpacing/index.js";
|
|
9
|
+
import { a as borderWidthFocus } from "../../BorderWidth-DfOlyKK7.js";
|
|
10
|
+
import { b as spacingNone } from "../../Spacing-D0HQH9YJ.js";
|
|
11
|
+
import { f as filterProps } from "../../filterProps-Cewck8OH.js";
|
|
12
|
+
const CollapsibleStyled = styled.div.withConfig({
|
|
13
|
+
shouldForwardProp: filterProps(),
|
|
14
|
+
displayName: "CollapsibleStyled",
|
|
15
|
+
componentId: "sc-12wf2lg-0"
|
|
16
|
+
})({
|
|
17
|
+
display: "grid",
|
|
18
|
+
padding: getSpacing(spacingNone),
|
|
19
|
+
transitionProperty: `grid-template-rows`,
|
|
20
|
+
transitionDuration: `0.001s`,
|
|
21
|
+
transitionTimingFunction: `${ease_in_out_sine}`,
|
|
22
|
+
...noReducedMotion({
|
|
23
|
+
transitionDuration: `0.5s`
|
|
24
|
+
})
|
|
25
|
+
}, ({
|
|
26
|
+
animated = true
|
|
27
|
+
}) => {
|
|
28
|
+
if (animated) {
|
|
29
|
+
return {};
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
...noReducedMotion({
|
|
33
|
+
transitionDuration: `0.001s`
|
|
34
|
+
})
|
|
35
|
+
};
|
|
36
|
+
}, ({
|
|
37
|
+
expanded
|
|
38
|
+
}) => {
|
|
39
|
+
return expanded ? {
|
|
40
|
+
gridTemplateRows: "1fr"
|
|
41
|
+
} : {
|
|
42
|
+
gridTemplateRows: "0fr"
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
const CollapsibleContentStyled = styled.div.withConfig({
|
|
46
|
+
shouldForwardProp: filterProps(),
|
|
47
|
+
displayName: "CollapsibleContentStyled",
|
|
48
|
+
componentId: "sc-12wf2lg-1"
|
|
49
|
+
})({
|
|
50
|
+
overflow: "hidden",
|
|
51
|
+
padding: `${getSpacing(spacingNone)} ${getBorderWidth(borderWidthFocus)}`,
|
|
52
|
+
marginLeft: `calc(${getBorderWidth(borderWidthFocus)} * -1)`
|
|
53
|
+
});
|
|
54
|
+
const Collapsible = ({
|
|
55
|
+
expanded,
|
|
56
|
+
onTransition,
|
|
57
|
+
children,
|
|
58
|
+
animated = true,
|
|
59
|
+
...props
|
|
60
|
+
}) => {
|
|
61
|
+
const ref = useRef(null);
|
|
62
|
+
const isOpenRef = useRef(expanded);
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
isOpenRef.current = expanded;
|
|
65
|
+
}, [expanded]);
|
|
66
|
+
const transitionEndHandler = () => {
|
|
67
|
+
if (onTransition) {
|
|
68
|
+
onTransition(true === isOpenRef.current);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
if (!ref || !ref.current) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const element = ref.current;
|
|
76
|
+
element.addEventListener("transitionend", transitionEndHandler);
|
|
77
|
+
return () => {
|
|
78
|
+
element.removeEventListener("transitionend", transitionEndHandler);
|
|
79
|
+
};
|
|
80
|
+
}, [ref]);
|
|
81
|
+
return /* @__PURE__ */ jsx(CollapsibleStyled, { ref, ...props, expanded, animated, children: /* @__PURE__ */ jsx(CollapsibleContentStyled, { children }) });
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
Collapsible as default
|
|
85
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useRef, useEffect } from "react";
|
|
4
|
+
import { a as getComputedBackgroundColor, p as parseColorToRgbObject, b as getContrastRatio } from "../../colorUtils-uLZF5UIN.js";
|
|
5
|
+
import { iu as iconSizeMd } from "../../index-Cbojl4_Q.js";
|
|
6
|
+
import styled from "styled-components";
|
|
7
|
+
import forcedColors from "../../foundations/media-query/forcedColors/index.js";
|
|
8
|
+
import { getBorderColor } from "../../foundations/token/getBorderColor/index.js";
|
|
9
|
+
import { getBottomSpacing } from "../../foundations/token/getBottomSpacing/index.js";
|
|
10
|
+
import { a as colorBorderNeutral } from "../../BorderColor-BummoQ1-.js";
|
|
11
|
+
import { b as spacingNone } from "../../Spacing-D0HQH9YJ.js";
|
|
12
|
+
import { f as filterProps } from "../../filterProps-Cewck8OH.js";
|
|
13
|
+
import { g as getCssVar } from "../../getCssVar-BP6T9pFM.js";
|
|
14
|
+
const colorSwatchSizeSmall = "sm";
|
|
15
|
+
const colorSwatchSizeMedium = "md";
|
|
16
|
+
const ColorSwatchSVGStyled = styled.svg.withConfig({
|
|
17
|
+
shouldForwardProp: filterProps(),
|
|
18
|
+
displayName: "ColorSwatchSVGStyled",
|
|
19
|
+
componentId: "sc-ghmea2-0"
|
|
20
|
+
})({
|
|
21
|
+
strokeWidth: 1,
|
|
22
|
+
display: "block"
|
|
23
|
+
}, ({
|
|
24
|
+
size
|
|
25
|
+
}) => {
|
|
26
|
+
return {
|
|
27
|
+
width: size === colorSwatchSizeSmall ? "12px" : getCssVar(iconSizeMd),
|
|
28
|
+
height: size === colorSwatchSizeSmall ? "12px" : getCssVar(iconSizeMd)
|
|
29
|
+
};
|
|
30
|
+
}, ({
|
|
31
|
+
needsBorder,
|
|
32
|
+
color
|
|
33
|
+
}) => {
|
|
34
|
+
return {
|
|
35
|
+
...forcedColors({
|
|
36
|
+
stroke: needsBorder ? "CanvasText" : color
|
|
37
|
+
}),
|
|
38
|
+
stroke: needsBorder ? getBorderColor(colorBorderNeutral) : color
|
|
39
|
+
};
|
|
40
|
+
}, ({
|
|
41
|
+
bottomSpacing = spacingNone
|
|
42
|
+
}) => getBottomSpacing({
|
|
43
|
+
bottomSpacing
|
|
44
|
+
}));
|
|
45
|
+
const ColorSwatchCircleStyled = styled.circle.withConfig({
|
|
46
|
+
shouldForwardProp: filterProps(),
|
|
47
|
+
displayName: "ColorSwatchCircleStyled",
|
|
48
|
+
componentId: "sc-ghmea2-1"
|
|
49
|
+
})(({
|
|
50
|
+
size
|
|
51
|
+
}) => {
|
|
52
|
+
const swatchSize = size === colorSwatchSizeSmall ? "12px" : getCssVar(iconSizeMd);
|
|
53
|
+
return {
|
|
54
|
+
cx: `calc(${swatchSize}/2)`,
|
|
55
|
+
cy: `calc(${swatchSize}/2)`,
|
|
56
|
+
r: `calc(${swatchSize}/2 - 0.5px)`,
|
|
57
|
+
width: "100%",
|
|
58
|
+
height: "100%"
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
const ColorSwatch = ({
|
|
62
|
+
color,
|
|
63
|
+
size,
|
|
64
|
+
bottomSpacing,
|
|
65
|
+
...props
|
|
66
|
+
}) => {
|
|
67
|
+
const [needsBorder, setNeedsBorder] = useState(false);
|
|
68
|
+
const ref = useRef(null);
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
if (ref.current) {
|
|
71
|
+
const backgroundColor = getComputedBackgroundColor(ref.current);
|
|
72
|
+
const swatchColor = parseColorToRgbObject(color);
|
|
73
|
+
const contrastRatio = getContrastRatio(backgroundColor, swatchColor);
|
|
74
|
+
if (contrastRatio < 3) {
|
|
75
|
+
setNeedsBorder(true);
|
|
76
|
+
} else {
|
|
77
|
+
setNeedsBorder(false);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
return /* @__PURE__ */ jsx(ColorSwatchSVGStyled, { className: props.className, size, ref, color, needsBorder, role: "img", "aria-label": props["aria-label"], "aria-roledescription": "Farbfeld", bottomSpacing, children: /* @__PURE__ */ jsx(ColorSwatchCircleStyled, { fill: color, size }) });
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
colorSwatchSizeMedium,
|
|
85
|
+
colorSwatchSizeSmall,
|
|
86
|
+
ColorSwatch as default
|
|
87
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { s as spacingMd, e as spacing2Xs } from "../../Spacing-D0HQH9YJ.js";
|
|
4
|
+
import ColorSwatch, { colorSwatchSizeSmall } from "../ColorSwatch/index.js";
|
|
5
|
+
import { iu as iconSizeMd } from "../../index-Cbojl4_Q.js";
|
|
6
|
+
import styled from "styled-components";
|
|
7
|
+
import { F as FlexStyled } from "../../styled-CpoX5USb.js";
|
|
8
|
+
import { getBottomSpacing } from "../../foundations/token/getBottomSpacing/index.js";
|
|
9
|
+
import { f as filterProps } from "../../filterProps-Cewck8OH.js";
|
|
10
|
+
import { g as getCssVar } from "../../getCssVar-BP6T9pFM.js";
|
|
11
|
+
const ColorSwatchListStyled = styled(FlexStyled).withConfig({
|
|
12
|
+
shouldForwardProp: filterProps(),
|
|
13
|
+
displayName: "ColorSwatchListStyled",
|
|
14
|
+
componentId: "sc-vf24mf-0"
|
|
15
|
+
})(({
|
|
16
|
+
bottomSpacing = spacingMd
|
|
17
|
+
}) => getBottomSpacing({
|
|
18
|
+
bottomSpacing
|
|
19
|
+
}));
|
|
20
|
+
const ColorSwatchItemStyled = styled.li.withConfig({
|
|
21
|
+
shouldForwardProp: filterProps(),
|
|
22
|
+
displayName: "ColorSwatchItemStyled",
|
|
23
|
+
componentId: "sc-vf24mf-1"
|
|
24
|
+
})(({
|
|
25
|
+
size
|
|
26
|
+
}) => {
|
|
27
|
+
return {
|
|
28
|
+
width: size === colorSwatchSizeSmall ? "12px" : getCssVar(iconSizeMd),
|
|
29
|
+
height: size === colorSwatchSizeSmall ? "12px" : getCssVar(iconSizeMd)
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
const ColorSwatchGroup = ({
|
|
33
|
+
colorSwatches,
|
|
34
|
+
size,
|
|
35
|
+
bottomSpacing,
|
|
36
|
+
...props
|
|
37
|
+
}) => {
|
|
38
|
+
const colorSwatchesMap = colorSwatches.map((colorSwatch) => /* @__PURE__ */ jsx(ColorSwatchItemStyled, { size, children: /* @__PURE__ */ jsx(ColorSwatch, { ...colorSwatch, size }) }, colorSwatch.color));
|
|
39
|
+
return colorSwatchesMap.length ? /* @__PURE__ */ jsx(ColorSwatchListStyled, { className: props.className, gapSpacing: spacing2Xs, as: "ul", "aria-label": props["aria-label"], bottomSpacing, children: colorSwatchesMap }) : null;
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
ColorSwatchGroup as default
|
|
43
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { getBackgroundColor } from "../../foundations/token/getBackgroundColor/index.js";
|
|
5
|
+
import { getBorderColor } from "../../foundations/token/getBorderColor/index.js";
|
|
6
|
+
import { getBorderWidth } from "../../foundations/token/getBorderWidth/index.js";
|
|
7
|
+
import { getSpacing } from "../../foundations/token/getSpacing/index.js";
|
|
8
|
+
import { getTextColor } from "../../foundations/token/getTextColor/index.js";
|
|
9
|
+
import { j as colorBorderSubtle } from "../../BorderColor-BummoQ1-.js";
|
|
10
|
+
import { e as borderWidthDivider } from "../../BorderWidth-DfOlyKK7.js";
|
|
11
|
+
import { d as spacingXl, s as spacingMd } from "../../Spacing-D0HQH9YJ.js";
|
|
12
|
+
import { a as colorTextNeutral } from "../../TextColor-BXiR5Uq9.js";
|
|
13
|
+
import { f as filterProps } from "../../filterProps-Cewck8OH.js";
|
|
14
|
+
import { e as colorBackgroundBrand, d as colorBackgroundBrandGradient, f as colorBackgroundSubtle, c as colorBackgroundNeutral } from "../../BackgroundColor-JObp_2xA.js";
|
|
15
|
+
const ContainerAppearanceColor = {
|
|
16
|
+
primary: colorBackgroundNeutral,
|
|
17
|
+
secondary: colorBackgroundSubtle,
|
|
18
|
+
tertiary: colorBackgroundBrandGradient,
|
|
19
|
+
alternative: colorBackgroundBrand
|
|
20
|
+
};
|
|
21
|
+
const ContainerBackgroundStyled = styled.div.withConfig({
|
|
22
|
+
shouldForwardProp: filterProps(),
|
|
23
|
+
displayName: "ContainerBackgroundStyled",
|
|
24
|
+
componentId: "sc-a9r652-0"
|
|
25
|
+
})({
|
|
26
|
+
color: getTextColor(colorTextNeutral)
|
|
27
|
+
}, ({
|
|
28
|
+
padding = spacingXl
|
|
29
|
+
}) => ({
|
|
30
|
+
paddingTop: getSpacing(padding),
|
|
31
|
+
paddingBottom: getSpacing(padding)
|
|
32
|
+
}), ({
|
|
33
|
+
appearance = "primary"
|
|
34
|
+
}) => {
|
|
35
|
+
return {
|
|
36
|
+
background: getBackgroundColor(ContainerAppearanceColor[appearance])
|
|
37
|
+
};
|
|
38
|
+
}, ({
|
|
39
|
+
border = false
|
|
40
|
+
}) => {
|
|
41
|
+
if (!border) {
|
|
42
|
+
return {};
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
borderBottom: `${getBorderWidth(borderWidthDivider)} solid ${getBorderColor(colorBorderSubtle)}`
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
const maxWidthBreakpoint = "1280px";
|
|
49
|
+
const maxWidthViewport = (stylesInViewport) => {
|
|
50
|
+
return {
|
|
51
|
+
[`@media screen and (min-width: ${maxWidthBreakpoint})`]: {
|
|
52
|
+
...stylesInViewport
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
const ContainerCenterStyled = styled.div.withConfig({
|
|
57
|
+
displayName: "ContainerCenterStyled",
|
|
58
|
+
componentId: "sc-a9r652-1"
|
|
59
|
+
})({
|
|
60
|
+
marginLeft: getSpacing(spacingMd),
|
|
61
|
+
marginRight: getSpacing(spacingMd)
|
|
62
|
+
}, maxWidthViewport({
|
|
63
|
+
maxWidth: `1240px`,
|
|
64
|
+
marginLeft: "auto",
|
|
65
|
+
marginRight: "auto"
|
|
66
|
+
}));
|
|
67
|
+
const Container = ({
|
|
68
|
+
className,
|
|
69
|
+
children,
|
|
70
|
+
appearance = "primary",
|
|
71
|
+
...props
|
|
72
|
+
}) => /* @__PURE__ */ jsx(ContainerBackgroundStyled, { className: `${className ? className : ""} ${["tertiary", "alternative"].indexOf(appearance) > -1 ? "Dark" : props.theme}`, appearance, ...props, children: /* @__PURE__ */ jsx(ContainerCenterStyled, { children }) });
|
|
73
|
+
export {
|
|
74
|
+
ContainerAppearanceColor,
|
|
75
|
+
Container as default
|
|
76
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { aW as CalendarMonthIcon, iv as iconSizeSm } from "../../index-Cbojl4_Q.js";
|
|
4
|
+
import { forwardRef, useRef, useImperativeHandle } from "react";
|
|
5
|
+
import FormElement from "../FormElement/index.js";
|
|
6
|
+
import FormHelperLabel from "../FormHelperLabel/index.js";
|
|
7
|
+
import FormHelperMessage from "../FormHelperMessage/index.js";
|
|
8
|
+
import FormHelperStatusIcon from "../FormHelperStatusIcon/index.js";
|
|
9
|
+
import { i as inputStateError } from "../../props-Czq9XX2J.js";
|
|
10
|
+
import { a as InputStyled, I as InputWrapperStyled } from "../../styled-CDWclYAa.js";
|
|
11
|
+
import { s as spacingMd, a as spacingXs } from "../../Spacing-D0HQH9YJ.js";
|
|
12
|
+
import styled from "styled-components";
|
|
13
|
+
const CalendarMonthIconStyled = styled(CalendarMonthIcon).withConfig({
|
|
14
|
+
displayName: "CalendarMonthIconStyled",
|
|
15
|
+
componentId: "sc-12ai2q6-0"
|
|
16
|
+
})(() => {
|
|
17
|
+
return {
|
|
18
|
+
"@-moz-document url-prefix()": {
|
|
19
|
+
"&": {
|
|
20
|
+
display: "none",
|
|
21
|
+
opacity: 0
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
const DateInputStyled = styled(InputStyled).withConfig({
|
|
27
|
+
displayName: "DateInputStyled",
|
|
28
|
+
componentId: "sc-12ai2q6-1"
|
|
29
|
+
})({
|
|
30
|
+
"&::-webkit-calendar-picker-indicator": {
|
|
31
|
+
opacity: 0,
|
|
32
|
+
display: "none"
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const DateInput = forwardRef(({
|
|
36
|
+
uid,
|
|
37
|
+
status,
|
|
38
|
+
errorMessage,
|
|
39
|
+
helperText,
|
|
40
|
+
label,
|
|
41
|
+
onUpdate,
|
|
42
|
+
bottomSpacing = spacingMd,
|
|
43
|
+
...props
|
|
44
|
+
}, outerRef) => {
|
|
45
|
+
const innerRef = useRef(null);
|
|
46
|
+
useImperativeHandle(outerRef, () => innerRef.current, []);
|
|
47
|
+
const messageId = `text-${uid}`;
|
|
48
|
+
const inputProps = {
|
|
49
|
+
...props,
|
|
50
|
+
id: uid,
|
|
51
|
+
"aria-describedby": inputStateError !== status && helperText || inputStateError === status && errorMessage ? messageId : void 0,
|
|
52
|
+
"aria-invalid": inputStateError === status ? true : void 0
|
|
53
|
+
};
|
|
54
|
+
const handleCalendarClick = () => {
|
|
55
|
+
if (null === innerRef || null === innerRef.current) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
innerRef.current.showPicker();
|
|
59
|
+
setTimeout(() => {
|
|
60
|
+
if (null === innerRef || null === innerRef.current) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
innerRef.current.focus();
|
|
64
|
+
}, 1);
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ jsxs(FormElement, { className: props.className, bottomSpacing, disabled: props.disabled, children: [
|
|
67
|
+
/* @__PURE__ */ jsx(FormHelperLabel, { label, uid }),
|
|
68
|
+
/* @__PURE__ */ jsxs(InputWrapperStyled, { status, bottomSpacing: inputStateError !== status && helperText || inputStateError === status && errorMessage ? spacingXs : void 0, children: [
|
|
69
|
+
/* @__PURE__ */ jsx(DateInputStyled, { ...inputProps, ref: innerRef, type: "date", onBlur: (event) => {
|
|
70
|
+
if (props.onBlur) {
|
|
71
|
+
props.onBlur(event);
|
|
72
|
+
}
|
|
73
|
+
if (!onUpdate) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
onUpdate(event.target.value);
|
|
77
|
+
} }),
|
|
78
|
+
/* @__PURE__ */ jsx(FormHelperStatusIcon, { status }),
|
|
79
|
+
/* @__PURE__ */ jsx(CalendarMonthIconStyled, { size: iconSizeSm, onClick: handleCalendarClick })
|
|
80
|
+
] }),
|
|
81
|
+
/* @__PURE__ */ jsx(FormHelperMessage, { id: messageId, status, message: inputStateError === status ? errorMessage : helperText })
|
|
82
|
+
] });
|
|
83
|
+
});
|
|
84
|
+
export {
|
|
85
|
+
DateInput as default
|
|
86
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import IconSnippet from "../IconSnippet/index.js";
|
|
4
|
+
import { t as textHeadingXs } from "../../HeadingSize-CfCRn3Lh.js";
|
|
5
|
+
import { g as getUid } from "../../index-D6hvbziL.js";
|
|
6
|
+
import { D as DemoBoxStyled } from "../../styled-CXSdomF5.js";
|
|
7
|
+
const heading = {
|
|
8
|
+
component: "Heading",
|
|
9
|
+
children: "Child component",
|
|
10
|
+
size: textHeadingXs,
|
|
11
|
+
uid: getUid()
|
|
12
|
+
};
|
|
13
|
+
const richText = {
|
|
14
|
+
component: "RichText",
|
|
15
|
+
html: "<p>This is a placeholder.</p>",
|
|
16
|
+
uid: getUid()
|
|
17
|
+
};
|
|
18
|
+
const DemoBox = (props) => /* @__PURE__ */ jsx(DemoBoxStyled, { ...props, children: /* @__PURE__ */ jsx(IconSnippet, { size: "small", icon: "Sync", bottomSpacing: "None", contents: [heading, richText] }) });
|
|
19
|
+
export {
|
|
20
|
+
DemoBox as default
|
|
21
|
+
};
|