@ceed/cds 0.0.89 → 0.0.91

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 +78 -58
  2. package/package.json +1 -1
package/framer/index.js CHANGED
@@ -5726,7 +5726,11 @@ var require_createStyled = __commonJS({
5726
5726
 
5727
5727
  // src/framer-entrypoint.ts
5728
5728
  import { ControlType as ControlType28 } from "framer";
5729
- import React184, { useEffect as useEffect37, useState as useState29 } from "react";
5729
+ import React184, {
5730
+ createElement as createElement4,
5731
+ useEffect as useEffect37,
5732
+ useState as useState29
5733
+ } from "react";
5730
5734
 
5731
5735
  // ../../node_modules/@mui/joy/colors/colors.js
5732
5736
  var colors = {
@@ -44544,20 +44548,86 @@ var commonPropertyControls = {
44544
44548
  }
44545
44549
  }
44546
44550
  };
44547
- var withCommonControls = (Component) => {
44551
+ var withResponsiveMargin = (Component) => {
44548
44552
  return (_a) => {
44549
44553
  var _b = _a, {
44550
- useNumbering,
44551
- numbering,
44552
44554
  useResponsiveMargin,
44553
44555
  responsiveMargin
44554
44556
  } = _b, props = __objRest(_b, [
44555
- "useNumbering",
44556
- "numbering",
44557
44557
  "useResponsiveMargin",
44558
44558
  "responsiveMargin"
44559
44559
  ]);
44560
- const components = [{ Component, props }];
44560
+ const style4 = {};
44561
+ const handleXsChange = () => {
44562
+ if (responsiveMargin == null ? void 0 : responsiveMargin.xsMixed) {
44563
+ style4["margin"] = responsiveMargin == null ? void 0 : responsiveMargin.xs;
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;
44569
+ }
44570
+ };
44571
+ const handleSmChange = () => {
44572
+ if (responsiveMargin == null ? void 0 : responsiveMargin.smMixed) {
44573
+ style4["margin"] = responsiveMargin == null ? void 0 : responsiveMargin.sm;
44574
+ } 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;
44579
+ }
44580
+ };
44581
+ const handleMdChange = () => {
44582
+ if (responsiveMargin == null ? void 0 : responsiveMargin.mdMixed) {
44583
+ style4["margin"] = responsiveMargin == null ? void 0 : responsiveMargin.md;
44584
+ } 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
+ }
44590
+ };
44591
+ const handleLgChange = () => {
44592
+ if (responsiveMargin == null ? void 0 : responsiveMargin.lgMixed) {
44593
+ style4["margin"] = responsiveMargin == null ? void 0 : responsiveMargin.lg;
44594
+ } 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;
44599
+ }
44600
+ };
44601
+ const handleXlChange = () => {
44602
+ if (responsiveMargin == null ? void 0 : responsiveMargin.xlMixed) {
44603
+ style4["margin"] = responsiveMargin == null ? void 0 : responsiveMargin.xl;
44604
+ } 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;
44609
+ }
44610
+ };
44611
+ return createElement4(ResponsiveEmitter, {
44612
+ onXsChange: handleXsChange,
44613
+ onSmChange: handleSmChange,
44614
+ onMdChange: handleMdChange,
44615
+ onLgChange: handleLgChange,
44616
+ onXlChange: handleXlChange,
44617
+ children: createElement4(Component, __spreadProps(__spreadValues({}, props), { sx: style4 }))
44618
+ });
44619
+ };
44620
+ };
44621
+ var withCommonControls = (Component) => {
44622
+ const wrappedComponent = withResponsiveMargin(Component);
44623
+ return (_a) => {
44624
+ var _b = _a, { useNumbering, numbering } = _b, props = __objRest(_b, ["useNumbering", "numbering"]);
44625
+ const components = [
44626
+ {
44627
+ Component: wrappedComponent,
44628
+ props
44629
+ }
44630
+ ];
44561
44631
  if (useNumbering) {
44562
44632
  components.push({
44563
44633
  Component: Badge_default,
@@ -44575,57 +44645,7 @@ var withCommonControls = (Component) => {
44575
44645
  });
44576
44646
  }
44577
44647
  return components.reduce((acc, { Component: Component2, props: props2 }) => {
44578
- return [
44579
- React184.createElement(
44580
- Component2,
44581
- __spreadProps(__spreadValues({}, props2), {
44582
- sx: (() => {
44583
- let styles2 = {};
44584
- if (useResponsiveMargin) {
44585
- styles2 = __spreadProps(__spreadValues({}, styles2), {
44586
- margin: {
44587
- xs: !responsiveMargin.xsMixed ? responsiveMargin.xs : void 0,
44588
- sm: !responsiveMargin.smMixed ? responsiveMargin.sm : void 0,
44589
- md: !responsiveMargin.mdMixed ? responsiveMargin.md : void 0,
44590
- lg: !responsiveMargin.lgMixed ? responsiveMargin.lg : void 0,
44591
- xl: !responsiveMargin.xlMixed ? responsiveMargin.xl : void 0
44592
- },
44593
- marginLeft: {
44594
- xs: !responsiveMargin.xsMixed ? void 0 : responsiveMargin.xsMarginLeft,
44595
- sm: !responsiveMargin.smMixed ? void 0 : responsiveMargin.smMarginLeft,
44596
- md: !responsiveMargin.mdMixed ? void 0 : responsiveMargin.mdMarginLeft,
44597
- lg: !responsiveMargin.lgMixed ? void 0 : responsiveMargin.lgMarginLeft,
44598
- xl: !responsiveMargin.xlMixed ? void 0 : responsiveMargin.xlMarginLeft
44599
- },
44600
- marginRight: {
44601
- xs: !responsiveMargin.xsMixed ? void 0 : responsiveMargin.xsMarginRight,
44602
- sm: !responsiveMargin.smMixed ? void 0 : responsiveMargin.smMarginRight,
44603
- md: !responsiveMargin.mdMixed ? void 0 : responsiveMargin.mdMarginRight,
44604
- lg: !responsiveMargin.lgMixed ? void 0 : responsiveMargin.lgMarginRight,
44605
- xl: !responsiveMargin.xlMixed ? void 0 : responsiveMargin.xlMarginRight
44606
- },
44607
- marginTop: {
44608
- xs: !responsiveMargin.xsMixed ? void 0 : responsiveMargin.xsMarginTop,
44609
- sm: !responsiveMargin.smMixed ? void 0 : responsiveMargin.smMarginTop,
44610
- md: !responsiveMargin.mdMixed ? void 0 : responsiveMargin.mdMarginTop,
44611
- lg: !responsiveMargin.lgMixed ? void 0 : responsiveMargin.lgMarginTop,
44612
- xl: !responsiveMargin.xlMixed ? void 0 : responsiveMargin.xlMarginTop
44613
- },
44614
- marginBottom: {
44615
- xs: !responsiveMargin.xsMixed ? void 0 : responsiveMargin.xsMarginBottom,
44616
- sm: !responsiveMargin.smMixed ? void 0 : responsiveMargin.smMarginBottom,
44617
- md: !responsiveMargin.mdMixed ? void 0 : responsiveMargin.mdMarginBottom,
44618
- lg: !responsiveMargin.lgMixed ? void 0 : responsiveMargin.lgMarginBottom,
44619
- xl: !responsiveMargin.xlMixed ? void 0 : responsiveMargin.xlMarginBottom
44620
- }
44621
- });
44622
- }
44623
- return styles2;
44624
- })()
44625
- }),
44626
- ...acc
44627
- )
44628
- ];
44648
+ return [React184.createElement(Component2, props2, ...acc)];
44629
44649
  }, []);
44630
44650
  };
44631
44651
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceed/cds",
3
- "version": "0.0.89",
3
+ "version": "0.0.91",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",