@ceed/cds 0.0.87 → 0.0.89
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 +172 -8
- 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,99 @@ 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
|
+
xs: {
|
|
44480
|
+
type: ControlType28.FusedNumber,
|
|
44481
|
+
defaultValue: 0,
|
|
44482
|
+
toggleKey: "xsMixed",
|
|
44483
|
+
toggleTitles: ["All", "Individual"],
|
|
44484
|
+
valueKeys: [
|
|
44485
|
+
"xsMarginTop",
|
|
44486
|
+
"xsMarginRight",
|
|
44487
|
+
"xsMarginBottom",
|
|
44488
|
+
"xsMarginLeft"
|
|
44489
|
+
],
|
|
44490
|
+
valueLabels: ["T", "R", "B", "L"]
|
|
44491
|
+
},
|
|
44492
|
+
sm: {
|
|
44493
|
+
type: ControlType28.FusedNumber,
|
|
44494
|
+
defaultValue: 0,
|
|
44495
|
+
toggleKey: "smMixed",
|
|
44496
|
+
toggleTitles: ["All", "Individual"],
|
|
44497
|
+
valueKeys: [
|
|
44498
|
+
"smMarginTop",
|
|
44499
|
+
"smMarginRight",
|
|
44500
|
+
"smMarginBottom",
|
|
44501
|
+
"smMarginLeft"
|
|
44502
|
+
],
|
|
44503
|
+
valueLabels: ["T", "R", "B", "L"]
|
|
44504
|
+
},
|
|
44505
|
+
md: {
|
|
44506
|
+
type: ControlType28.FusedNumber,
|
|
44507
|
+
defaultValue: 0,
|
|
44508
|
+
toggleKey: "mdMixed",
|
|
44509
|
+
toggleTitles: ["All", "Individual"],
|
|
44510
|
+
valueKeys: [
|
|
44511
|
+
"mdMarginTop",
|
|
44512
|
+
"mdMarginRight",
|
|
44513
|
+
"mdMarginBottom",
|
|
44514
|
+
"mdMarginLeft"
|
|
44515
|
+
],
|
|
44516
|
+
valueLabels: ["T", "R", "B", "L"]
|
|
44517
|
+
},
|
|
44518
|
+
lg: {
|
|
44519
|
+
type: ControlType28.FusedNumber,
|
|
44520
|
+
defaultValue: 0,
|
|
44521
|
+
toggleKey: "lgMixed",
|
|
44522
|
+
toggleTitles: ["All", "Individual"],
|
|
44523
|
+
valueKeys: [
|
|
44524
|
+
"lgMarginTop",
|
|
44525
|
+
"lgMarginRight",
|
|
44526
|
+
"lgMarginBottom",
|
|
44527
|
+
"lgMarginLeft"
|
|
44528
|
+
],
|
|
44529
|
+
valueLabels: ["T", "R", "B", "L"]
|
|
44530
|
+
},
|
|
44531
|
+
xl: {
|
|
44532
|
+
type: ControlType28.FusedNumber,
|
|
44533
|
+
defaultValue: 0,
|
|
44534
|
+
toggleKey: "xlMixed",
|
|
44535
|
+
toggleTitles: ["All", "Individual"],
|
|
44536
|
+
valueKeys: [
|
|
44537
|
+
"xlMarginTop",
|
|
44538
|
+
"xlMarginRight",
|
|
44539
|
+
"xlMarginBottom",
|
|
44540
|
+
"xlMarginLeft"
|
|
44541
|
+
],
|
|
44542
|
+
valueLabels: ["T", "R", "B", "L"]
|
|
44543
|
+
}
|
|
44544
|
+
}
|
|
44470
44545
|
}
|
|
44471
44546
|
};
|
|
44472
44547
|
var withCommonControls = (Component) => {
|
|
44473
44548
|
return (_a) => {
|
|
44474
|
-
var _b = _a, {
|
|
44549
|
+
var _b = _a, {
|
|
44550
|
+
useNumbering,
|
|
44551
|
+
numbering,
|
|
44552
|
+
useResponsiveMargin,
|
|
44553
|
+
responsiveMargin
|
|
44554
|
+
} = _b, props = __objRest(_b, [
|
|
44555
|
+
"useNumbering",
|
|
44556
|
+
"numbering",
|
|
44557
|
+
"useResponsiveMargin",
|
|
44558
|
+
"responsiveMargin"
|
|
44559
|
+
]);
|
|
44475
44560
|
const components = [{ Component, props }];
|
|
44476
44561
|
if (useNumbering) {
|
|
44477
44562
|
components.push({
|
|
@@ -44490,7 +44575,57 @@ var withCommonControls = (Component) => {
|
|
|
44490
44575
|
});
|
|
44491
44576
|
}
|
|
44492
44577
|
return components.reduce((acc, { Component: Component2, props: props2 }) => {
|
|
44493
|
-
return [
|
|
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
|
+
];
|
|
44494
44629
|
}, []);
|
|
44495
44630
|
};
|
|
44496
44631
|
};
|
|
@@ -44511,7 +44646,18 @@ var useResponsive = (breakpoint, rootElement) => {
|
|
|
44511
44646
|
return matches;
|
|
44512
44647
|
};
|
|
44513
44648
|
var ResponsiveEmitter = (props) => {
|
|
44514
|
-
const {
|
|
44649
|
+
const {
|
|
44650
|
+
children,
|
|
44651
|
+
onXsChange,
|
|
44652
|
+
onSmChange,
|
|
44653
|
+
onMdChange,
|
|
44654
|
+
onLgChange,
|
|
44655
|
+
onXlChange
|
|
44656
|
+
} = props;
|
|
44657
|
+
const isXs = useResponsive(
|
|
44658
|
+
"xs",
|
|
44659
|
+
document.querySelector("#canvas-container .groundNodeWrapper > div[id]") || document.body
|
|
44660
|
+
);
|
|
44515
44661
|
const isSm = useResponsive(
|
|
44516
44662
|
"sm",
|
|
44517
44663
|
document.querySelector("#canvas-container .groundNodeWrapper > div[id]") || document.body
|
|
@@ -44541,11 +44687,29 @@ var ResponsiveEmitter = (props) => {
|
|
|
44541
44687
|
} else if (isSm && onSmChange) {
|
|
44542
44688
|
onSmChange();
|
|
44543
44689
|
return;
|
|
44690
|
+
} else if (isXs && onXsChange) {
|
|
44691
|
+
onXsChange();
|
|
44692
|
+
return;
|
|
44544
44693
|
}
|
|
44545
|
-
}, [
|
|
44694
|
+
}, [
|
|
44695
|
+
isXs,
|
|
44696
|
+
isSm,
|
|
44697
|
+
isMd,
|
|
44698
|
+
isLg,
|
|
44699
|
+
isXl,
|
|
44700
|
+
onXsChange,
|
|
44701
|
+
onSmChange,
|
|
44702
|
+
onMdChange,
|
|
44703
|
+
onLgChange,
|
|
44704
|
+
onXlChange
|
|
44705
|
+
]);
|
|
44546
44706
|
return children;
|
|
44547
44707
|
};
|
|
44548
44708
|
var responsiveEmitterPropertyControls = {
|
|
44709
|
+
onXsChange: {
|
|
44710
|
+
title: "onXsChange",
|
|
44711
|
+
type: ControlType28.EventHandler
|
|
44712
|
+
},
|
|
44549
44713
|
onSmChange: {
|
|
44550
44714
|
title: "onSmChange",
|
|
44551
44715
|
type: ControlType28.EventHandler
|