@ceed/cds 0.0.86 → 0.0.88

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 +125 -10
  2. package/package.json +1 -1
package/framer/index.js CHANGED
@@ -5726,10 +5726,7 @@ var require_createStyled = __commonJS({
5726
5726
 
5727
5727
  // src/framer-entrypoint.ts
5728
5728
  import { ControlType as ControlType28 } from "framer";
5729
- import React184, {
5730
- useEffect as useEffect37,
5731
- useState as useState29
5732
- } from "react";
5729
+ import React184, { useEffect as useEffect37, useState as useState29 } from "react";
5733
5730
 
5734
5731
  // ../../node_modules/@mui/joy/colors/colors.js
5735
5732
  var colors = {
@@ -44467,11 +44464,86 @@ var commonPropertyControls = {
44467
44464
  type: ControlType28.Number,
44468
44465
  defaultValue: 1,
44469
44466
  hidden: ({ useNumbering }) => !useNumbering
44467
+ },
44468
+ useResponsiveMargin: {
44469
+ title: "\u{1F4AB} Responsive Margin",
44470
+ type: ControlType28.Boolean,
44471
+ defaultValue: false
44472
+ },
44473
+ responsiveMargin: {
44474
+ title: " ",
44475
+ type: ControlType28.Object,
44476
+ buttonTitle: "Set Margin",
44477
+ hidden: ({ useResponsiveMargin }) => !useResponsiveMargin,
44478
+ controls: {
44479
+ sm: {
44480
+ type: ControlType28.FusedNumber,
44481
+ defaultValue: 0,
44482
+ toggleKey: "smMixed",
44483
+ toggleTitles: ["All", "Individual"],
44484
+ valueKeys: [
44485
+ "smMarginTop",
44486
+ "smMarginRight",
44487
+ "smMarginBottom",
44488
+ "smMarginLeft"
44489
+ ],
44490
+ valueLabels: ["T", "R", "B", "L"]
44491
+ },
44492
+ md: {
44493
+ type: ControlType28.FusedNumber,
44494
+ defaultValue: 0,
44495
+ toggleKey: "mdMixed",
44496
+ toggleTitles: ["All", "Individual"],
44497
+ valueKeys: [
44498
+ "mdMarginTop",
44499
+ "mdMarginRight",
44500
+ "mdMarginBottom",
44501
+ "mdMarginLeft"
44502
+ ],
44503
+ valueLabels: ["T", "R", "B", "L"]
44504
+ },
44505
+ lg: {
44506
+ type: ControlType28.FusedNumber,
44507
+ defaultValue: 0,
44508
+ toggleKey: "lgMixed",
44509
+ toggleTitles: ["All", "Individual"],
44510
+ valueKeys: [
44511
+ "lgMarginTop",
44512
+ "lgMarginRight",
44513
+ "lgMarginBottom",
44514
+ "lgMarginLeft"
44515
+ ],
44516
+ valueLabels: ["T", "R", "B", "L"]
44517
+ },
44518
+ xl: {
44519
+ type: ControlType28.FusedNumber,
44520
+ defaultValue: 0,
44521
+ toggleKey: "xlMixed",
44522
+ toggleTitles: ["All", "Individual"],
44523
+ valueKeys: [
44524
+ "xlMarginTop",
44525
+ "xlMarginRight",
44526
+ "xlMarginBottom",
44527
+ "xlMarginLeft"
44528
+ ],
44529
+ valueLabels: ["T", "R", "B", "L"]
44530
+ }
44531
+ }
44470
44532
  }
44471
44533
  };
44472
44534
  var withCommonControls = (Component) => {
44473
44535
  return (_a) => {
44474
- var _b = _a, { useNumbering, numbering } = _b, props = __objRest(_b, ["useNumbering", "numbering"]);
44536
+ var _b = _a, {
44537
+ useNumbering,
44538
+ numbering,
44539
+ useResponsiveMargin,
44540
+ responsiveMargin
44541
+ } = _b, props = __objRest(_b, [
44542
+ "useNumbering",
44543
+ "numbering",
44544
+ "useResponsiveMargin",
44545
+ "responsiveMargin"
44546
+ ]);
44475
44547
  const components = [{ Component, props }];
44476
44548
  if (useNumbering) {
44477
44549
  components.push({
@@ -44490,7 +44562,50 @@ var withCommonControls = (Component) => {
44490
44562
  });
44491
44563
  }
44492
44564
  return components.reduce((acc, { Component: Component2, props: props2 }) => {
44493
- return [React184.createElement(Component2, props2, ...acc)];
44565
+ return [
44566
+ React184.createElement(
44567
+ Component2,
44568
+ __spreadProps(__spreadValues({}, props2), {
44569
+ sx: (() => {
44570
+ if (useResponsiveMargin) {
44571
+ return {
44572
+ margin: {
44573
+ sm: !responsiveMargin.smMixed ? responsiveMargin.sm : void 0,
44574
+ md: !responsiveMargin.mdMixed ? responsiveMargin.md : void 0,
44575
+ lg: !responsiveMargin.lgMixed ? responsiveMargin.lg : void 0,
44576
+ xl: !responsiveMargin.xlMixed ? responsiveMargin.xl : void 0
44577
+ },
44578
+ marginLeft: {
44579
+ sm: !responsiveMargin.smMixed ? void 0 : responsiveMargin.smMarginLeft,
44580
+ md: !responsiveMargin.mdMixed ? void 0 : responsiveMargin.mdMarginLeft,
44581
+ lg: !responsiveMargin.lgMixed ? void 0 : responsiveMargin.lgMarginLeft,
44582
+ xl: !responsiveMargin.xlMixed ? void 0 : responsiveMargin.xlMarginLeft
44583
+ },
44584
+ marginRight: {
44585
+ sm: !responsiveMargin.smMixed ? void 0 : responsiveMargin.smMarginRight,
44586
+ md: !responsiveMargin.mdMixed ? void 0 : responsiveMargin.mdMarginRight,
44587
+ lg: !responsiveMargin.lgMixed ? void 0 : responsiveMargin.lgMarginRight,
44588
+ xl: !responsiveMargin.xlMixed ? void 0 : responsiveMargin.xlMarginRight
44589
+ },
44590
+ marginTop: {
44591
+ sm: !responsiveMargin.smMixed ? void 0 : responsiveMargin.smMarginTop,
44592
+ md: !responsiveMargin.mdMixed ? void 0 : responsiveMargin.mdMarginTop,
44593
+ lg: !responsiveMargin.lgMixed ? void 0 : responsiveMargin.lgMarginTop,
44594
+ xl: !responsiveMargin.xlMixed ? void 0 : responsiveMargin.xlMarginTop
44595
+ },
44596
+ marginBottom: {
44597
+ sm: !responsiveMargin.smMixed ? void 0 : responsiveMargin.smMarginBottom,
44598
+ md: !responsiveMargin.mdMixed ? void 0 : responsiveMargin.mdMarginBottom,
44599
+ lg: !responsiveMargin.lgMixed ? void 0 : responsiveMargin.lgMarginBottom,
44600
+ xl: !responsiveMargin.xlMixed ? void 0 : responsiveMargin.xlMarginBottom
44601
+ }
44602
+ };
44603
+ }
44604
+ })()
44605
+ }),
44606
+ ...acc
44607
+ )
44608
+ ];
44494
44609
  }, []);
44495
44610
  };
44496
44611
  };
@@ -44514,19 +44629,19 @@ var ResponsiveEmitter = (props) => {
44514
44629
  const { children, onSmChange, onMdChange, onLgChange, onXlChange } = props;
44515
44630
  const isSm = useResponsive(
44516
44631
  "sm",
44517
- document.querySelector("#canvas-container .groundNodeWrapper") || document.body
44632
+ document.querySelector("#canvas-container .groundNodeWrapper > div[id]") || document.body
44518
44633
  );
44519
44634
  const isMd = useResponsive(
44520
44635
  "md",
44521
- document.querySelector("#canvas-container .groundNodeWrapper") || document.body
44636
+ document.querySelector("#canvas-container .groundNodeWrapper > div[id]") || document.body
44522
44637
  );
44523
44638
  const isLg = useResponsive(
44524
44639
  "lg",
44525
- document.querySelector("#canvas-container .groundNodeWrapper") || document.body
44640
+ document.querySelector("#canvas-container .groundNodeWrapper > div[id]") || document.body
44526
44641
  );
44527
44642
  const isXl = useResponsive(
44528
44643
  "xl",
44529
- document.querySelector("#canvas-container .groundNodeWrapper") || document.body
44644
+ document.querySelector("#canvas-container .groundNodeWrapper > div[id]") || document.body
44530
44645
  );
44531
44646
  useEffect37(() => {
44532
44647
  if (isXl && onXlChange) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceed/cds",
3
- "version": "0.0.86",
3
+ "version": "0.0.88",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",