@ceed/cds 0.0.91 → 0.0.93
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/framer/index.js +44 -31
- package/package.json +1 -1
package/framer/index.js
CHANGED
|
@@ -44557,57 +44557,70 @@ var withResponsiveMargin = (Component) => {
|
|
|
44557
44557
|
"useResponsiveMargin",
|
|
44558
44558
|
"responsiveMargin"
|
|
44559
44559
|
]);
|
|
44560
|
-
const style4 = {};
|
|
44560
|
+
const [style4, setStyle] = useState29({});
|
|
44561
44561
|
const handleXsChange = () => {
|
|
44562
|
-
if (responsiveMargin == null ? void 0 : responsiveMargin.xsMixed) {
|
|
44563
|
-
|
|
44562
|
+
if (!(responsiveMargin == null ? void 0 : responsiveMargin.xsMixed)) {
|
|
44563
|
+
setStyle({ margin: responsiveMargin == null ? void 0 : responsiveMargin.xs });
|
|
44564
44564
|
} else {
|
|
44565
|
-
|
|
44566
|
-
|
|
44567
|
-
|
|
44568
|
-
|
|
44565
|
+
setStyle({
|
|
44566
|
+
marginLeft: responsiveMargin == null ? void 0 : responsiveMargin.xsMarginLeft,
|
|
44567
|
+
marginRight: responsiveMargin == null ? void 0 : responsiveMargin.xsMarginRight,
|
|
44568
|
+
marginTop: responsiveMargin == null ? void 0 : responsiveMargin.xsMarginTop,
|
|
44569
|
+
marginBottom: responsiveMargin == null ? void 0 : responsiveMargin.xsMarginBottom
|
|
44570
|
+
});
|
|
44569
44571
|
}
|
|
44570
44572
|
};
|
|
44571
44573
|
const handleSmChange = () => {
|
|
44572
|
-
if (responsiveMargin == null ? void 0 : responsiveMargin.smMixed) {
|
|
44573
|
-
|
|
44574
|
+
if (!(responsiveMargin == null ? void 0 : responsiveMargin.smMixed)) {
|
|
44575
|
+
setStyle({ margin: responsiveMargin == null ? void 0 : responsiveMargin.sm });
|
|
44574
44576
|
} else {
|
|
44575
|
-
|
|
44576
|
-
|
|
44577
|
-
|
|
44578
|
-
|
|
44577
|
+
setStyle({
|
|
44578
|
+
marginLeft: responsiveMargin == null ? void 0 : responsiveMargin.smMarginLeft,
|
|
44579
|
+
marginRight: responsiveMargin == null ? void 0 : responsiveMargin.smMarginRight,
|
|
44580
|
+
marginTop: responsiveMargin == null ? void 0 : responsiveMargin.smMarginTop,
|
|
44581
|
+
marginBottom: responsiveMargin == null ? void 0 : responsiveMargin.smMarginBottom
|
|
44582
|
+
});
|
|
44579
44583
|
}
|
|
44580
44584
|
};
|
|
44581
44585
|
const handleMdChange = () => {
|
|
44582
|
-
if (responsiveMargin == null ? void 0 : responsiveMargin.mdMixed) {
|
|
44583
|
-
|
|
44586
|
+
if (!(responsiveMargin == null ? void 0 : responsiveMargin.mdMixed)) {
|
|
44587
|
+
setStyle({ margin: responsiveMargin == null ? void 0 : responsiveMargin.md });
|
|
44584
44588
|
} else {
|
|
44585
|
-
|
|
44586
|
-
|
|
44587
|
-
|
|
44588
|
-
|
|
44589
|
+
setStyle({
|
|
44590
|
+
marginLeft: responsiveMargin == null ? void 0 : responsiveMargin.mdMarginLeft,
|
|
44591
|
+
marginRight: responsiveMargin == null ? void 0 : responsiveMargin.mdMarginRight,
|
|
44592
|
+
marginTop: responsiveMargin == null ? void 0 : responsiveMargin.mdMarginTop,
|
|
44593
|
+
marginBottom: responsiveMargin == null ? void 0 : responsiveMargin.mdMarginBottom
|
|
44594
|
+
});
|
|
44589
44595
|
}
|
|
44590
44596
|
};
|
|
44591
44597
|
const handleLgChange = () => {
|
|
44592
|
-
if (responsiveMargin == null ? void 0 : responsiveMargin.lgMixed) {
|
|
44593
|
-
|
|
44598
|
+
if (!(responsiveMargin == null ? void 0 : responsiveMargin.lgMixed)) {
|
|
44599
|
+
setStyle({ margin: responsiveMargin == null ? void 0 : responsiveMargin.lg });
|
|
44594
44600
|
} else {
|
|
44595
|
-
|
|
44596
|
-
|
|
44597
|
-
|
|
44598
|
-
|
|
44601
|
+
setStyle({
|
|
44602
|
+
marginLeft: responsiveMargin == null ? void 0 : responsiveMargin.lgMarginLeft,
|
|
44603
|
+
marginRight: responsiveMargin == null ? void 0 : responsiveMargin.lgMarginRight,
|
|
44604
|
+
marginTop: responsiveMargin == null ? void 0 : responsiveMargin.lgMarginTop,
|
|
44605
|
+
marginBottom: responsiveMargin == null ? void 0 : responsiveMargin.lgMarginBottom
|
|
44606
|
+
});
|
|
44599
44607
|
}
|
|
44600
44608
|
};
|
|
44601
44609
|
const handleXlChange = () => {
|
|
44602
|
-
if (responsiveMargin == null ? void 0 : responsiveMargin.xlMixed) {
|
|
44603
|
-
|
|
44610
|
+
if (!(responsiveMargin == null ? void 0 : responsiveMargin.xlMixed)) {
|
|
44611
|
+
setStyle({ margin: responsiveMargin == null ? void 0 : responsiveMargin.xl });
|
|
44604
44612
|
} else {
|
|
44605
|
-
|
|
44606
|
-
|
|
44607
|
-
|
|
44608
|
-
|
|
44613
|
+
setStyle({
|
|
44614
|
+
marginLeft: responsiveMargin == null ? void 0 : responsiveMargin.xlMarginLeft,
|
|
44615
|
+
marginRight: responsiveMargin == null ? void 0 : responsiveMargin.xlMarginRight,
|
|
44616
|
+
marginTop: responsiveMargin == null ? void 0 : responsiveMargin.xlMarginTop,
|
|
44617
|
+
marginBottom: responsiveMargin == null ? void 0 : responsiveMargin.xlMarginBottom
|
|
44618
|
+
});
|
|
44609
44619
|
}
|
|
44610
44620
|
};
|
|
44621
|
+
if (!useResponsiveMargin) {
|
|
44622
|
+
return createElement4(Component, props);
|
|
44623
|
+
}
|
|
44611
44624
|
return createElement4(ResponsiveEmitter, {
|
|
44612
44625
|
onXsChange: handleXsChange,
|
|
44613
44626
|
onSmChange: handleSmChange,
|