@ceed/cds 0.0.92 → 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.
Files changed (2) hide show
  1. package/framer/index.js +39 -26
  2. 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
44562
  if (!(responsiveMargin == null ? void 0 : responsiveMargin.xsMixed)) {
44563
- style4["margin"] = responsiveMargin == null ? void 0 : responsiveMargin.xs;
44563
+ setStyle({ margin: responsiveMargin == null ? void 0 : responsiveMargin.xs });
44564
44564
  } else {
44565
- style4["marginLeft"] = responsiveMargin == null ? void 0 : responsiveMargin.xsMarginLeft;
44566
- style4["marginRight"] = responsiveMargin == null ? void 0 : responsiveMargin.xsMarginRight;
44567
- style4["marginTop"] = responsiveMargin == null ? void 0 : responsiveMargin.xsMarginTop;
44568
- style4["marginBottom"] = responsiveMargin == null ? void 0 : responsiveMargin.xsMarginBottom;
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
44574
  if (!(responsiveMargin == null ? void 0 : responsiveMargin.smMixed)) {
44573
- style4["margin"] = responsiveMargin == null ? void 0 : responsiveMargin.sm;
44575
+ setStyle({ margin: responsiveMargin == null ? void 0 : responsiveMargin.sm });
44574
44576
  } else {
44575
- style4["marginLeft"] = responsiveMargin == null ? void 0 : responsiveMargin.smMarginLeft;
44576
- style4["marginRight"] = responsiveMargin == null ? void 0 : responsiveMargin.smMarginRight;
44577
- style4["marginTop"] = responsiveMargin == null ? void 0 : responsiveMargin.smMarginTop;
44578
- style4["marginBottom"] = responsiveMargin == null ? void 0 : responsiveMargin.smMarginBottom;
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
44586
  if (!(responsiveMargin == null ? void 0 : responsiveMargin.mdMixed)) {
44583
- style4["margin"] = responsiveMargin == null ? void 0 : responsiveMargin.md;
44587
+ setStyle({ margin: responsiveMargin == null ? void 0 : responsiveMargin.md });
44584
44588
  } else {
44585
- style4["marginLeft"] = responsiveMargin == null ? void 0 : responsiveMargin.mdMarginLeft;
44586
- style4["marginRight"] = responsiveMargin == null ? void 0 : responsiveMargin.mdMarginRight;
44587
- style4["marginTop"] = responsiveMargin == null ? void 0 : responsiveMargin.mdMarginTop;
44588
- style4["marginBottom"] = responsiveMargin == null ? void 0 : responsiveMargin.mdMarginBottom;
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
44598
  if (!(responsiveMargin == null ? void 0 : responsiveMargin.lgMixed)) {
44593
- style4["margin"] = responsiveMargin == null ? void 0 : responsiveMargin.lg;
44599
+ setStyle({ margin: responsiveMargin == null ? void 0 : responsiveMargin.lg });
44594
44600
  } else {
44595
- style4["marginLeft"] = responsiveMargin == null ? void 0 : responsiveMargin.lgMarginLeft;
44596
- style4["marginRight"] = responsiveMargin == null ? void 0 : responsiveMargin.lgMarginRight;
44597
- style4["marginTop"] = responsiveMargin == null ? void 0 : responsiveMargin.lgMarginTop;
44598
- style4["marginBottom"] = responsiveMargin == null ? void 0 : responsiveMargin.lgMarginBottom;
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
44610
  if (!(responsiveMargin == null ? void 0 : responsiveMargin.xlMixed)) {
44603
- style4["margin"] = responsiveMargin == null ? void 0 : responsiveMargin.xl;
44611
+ setStyle({ margin: responsiveMargin == null ? void 0 : responsiveMargin.xl });
44604
44612
  } else {
44605
- style4["marginLeft"] = responsiveMargin == null ? void 0 : responsiveMargin.xlMarginLeft;
44606
- style4["marginRight"] = responsiveMargin == null ? void 0 : responsiveMargin.xlMarginRight;
44607
- style4["marginTop"] = responsiveMargin == null ? void 0 : responsiveMargin.xlMarginTop;
44608
- style4["marginBottom"] = responsiveMargin == null ? void 0 : responsiveMargin.xlMarginBottom;
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceed/cds",
3
- "version": "0.0.92",
3
+ "version": "0.0.93",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",