@makeswift/runtime 0.0.0-f5b044f → 0.0.1
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/controls.js +1 -0
- package/dist/Page.cjs.js +10 -3
- package/dist/Page.cjs.js.map +1 -1
- package/dist/Page.es.js +10 -3
- package/dist/Page.es.js.map +1 -1
- package/dist/builder.cjs.js +1 -0
- package/dist/builder.cjs.js.map +1 -1
- package/dist/builder.es.js +1 -0
- package/dist/builder.es.js.map +1 -1
- package/dist/components.cjs.js +1 -0
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.es.js +1 -0
- package/dist/components.es.js.map +1 -1
- package/dist/control-serialization.cjs.js +198 -0
- package/dist/control-serialization.cjs.js.map +1 -1
- package/dist/control-serialization.es.js +198 -0
- package/dist/control-serialization.es.js.map +1 -1
- package/dist/controls.cjs.js +7 -0
- package/dist/controls.cjs.js.map +1 -0
- package/dist/controls.es.js +2 -0
- package/dist/controls.es.js.map +1 -0
- package/dist/descriptors.cjs.js +3 -1
- package/dist/descriptors.cjs.js.map +1 -1
- package/dist/descriptors.es.js +3 -1
- package/dist/descriptors.es.js.map +1 -1
- package/dist/index.cjs.js +320 -153
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +313 -146
- package/dist/index.es.js.map +1 -1
- package/dist/main.cjs.js +1 -0
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +1 -0
- package/dist/main.es.js.map +1 -1
- package/dist/next.cjs.js +1 -0
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +1 -0
- package/dist/next.es.js.map +1 -1
- package/dist/prop-controllers.cjs.js +1 -0
- package/dist/prop-controllers.cjs.js.map +1 -1
- package/dist/prop-controllers.es.js +1 -0
- package/dist/prop-controllers.es.js.map +1 -1
- package/dist/react-builder-preview.cjs.js +1 -0
- package/dist/react-builder-preview.cjs.js.map +1 -1
- package/dist/react-builder-preview.es.js +1 -0
- package/dist/react-builder-preview.es.js.map +1 -1
- package/dist/react.cjs.js +1 -0
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.es.js +1 -0
- package/dist/react.es.js.map +1 -1
- package/dist/style.cjs.js +38 -0
- package/dist/style.cjs.js.map +1 -0
- package/dist/style.es.js +35 -0
- package/dist/style.es.js.map +1 -0
- package/dist/types/builder/serialization/control-serialization.d.ts +156 -3
- package/dist/types/builder/serialization/control-serialization.d.ts.map +1 -1
- package/dist/types/components/builtin/Button/Button.d.ts +2 -1
- package/dist/types/components/builtin/Button/Button.d.ts.map +1 -1
- package/dist/types/components/builtin/Carousel/Carousel.d.ts.map +1 -1
- package/dist/types/components/builtin/Countdown/Countdown.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/Form.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/Navigation.d.ts.map +1 -1
- package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
- package/dist/types/components/builtin/Text/Text.d.ts.map +1 -1
- package/dist/types/components/page/Page.d.ts +4 -0
- package/dist/types/components/page/Page.d.ts.map +1 -1
- package/dist/types/controls/index.d.ts +2 -0
- package/dist/types/controls/index.d.ts.map +1 -0
- package/dist/types/controls/style.d.ts +141 -0
- package/dist/types/controls/style.d.ts.map +1 -0
- package/dist/types/controls/types.d.ts +11 -0
- package/dist/types/controls/types.d.ts.map +1 -0
- package/dist/types/prop-controllers/descriptors.d.ts +32 -27
- package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/prop-controllers/index.d.ts +1 -1
- package/dist/types/prop-controllers/index.d.ts.map +1 -1
- package/dist/types/runtimes/react/controls/style.d.ts +4 -0
- package/dist/types/runtimes/react/controls/style.d.ts.map +1 -0
- package/dist/types/runtimes/react/controls.d.ts +2 -5
- package/dist/types/runtimes/react/controls.d.ts.map +1 -1
- package/dist/types/runtimes/react/index.d.ts +2 -3
- package/dist/types/runtimes/react/index.d.ts.map +1 -1
- package/package.json +10 -3
- package/dist/react.cjs2.js +0 -7992
- package/dist/react.cjs2.js.map +0 -1
- package/dist/react.es2.js +0 -7911
- package/dist/react.es2.js.map +0 -1
- package/dist/types/controls/select.d.ts +0 -19
- package/dist/types/controls/select.d.ts.map +0 -1
- package/dist/types/controls.d.ts +0 -4
- package/dist/types/controls.d.ts.map +0 -1
- package/dist/types/prop-controllers/instances/slot.d.ts +0 -2
- package/dist/types/prop-controllers/instances/slot.d.ts.map +0 -1
- package/dist/types/runtimes/index.d.ts +0 -43
- package/dist/types/runtimes/index.d.ts.map +0 -1
- package/dist/types/runtimes/react/react.d.ts +0 -43
- package/dist/types/runtimes/react/react.d.ts.map +0 -1
- package/dist/types/runtimes/react.d.ts +0 -43
- package/dist/types/runtimes/react.d.ts.map +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -63,6 +63,7 @@ var Hotkeys = require("slate-hotkeys");
|
|
|
63
63
|
var ipsum = require("corporate-ipsum");
|
|
64
64
|
var slateReact = require("slate-react");
|
|
65
65
|
var Lists = require("@convertkit/slate-lists");
|
|
66
|
+
var style = require("./style.cjs.js");
|
|
66
67
|
function _interopDefaultLegacy(e) {
|
|
67
68
|
return e && typeof e === "object" && "default" in e ? e : { "default": e };
|
|
68
69
|
}
|
|
@@ -997,7 +998,7 @@ function cssPadding(defaultValue = {}) {
|
|
|
997
998
|
`;
|
|
998
999
|
}
|
|
999
1000
|
const defaultBorderSide = { width: 0, style: "solid", color: null };
|
|
1000
|
-
const getBorderSide = ({ width, style, color }) => `${width != null ? width : 0}px ${
|
|
1001
|
+
const getBorderSide = ({ width, style: style2, color }) => `${width != null ? width : 0}px ${style2} ${color != null ? colorToString(color) : "black"}`;
|
|
1001
1002
|
function cssBorder(defaultValue = {}) {
|
|
1002
1003
|
const defaultBorderTop = defaultValue.borderTop === void 0 ? defaultBorderSide : defaultValue.borderTop;
|
|
1003
1004
|
const defaultBorderRight = defaultValue.borderRight === void 0 ? defaultBorderSide : defaultValue.borderRight;
|
|
@@ -1202,12 +1203,12 @@ function Parallax(_g2) {
|
|
|
1202
1203
|
}, [strength]);
|
|
1203
1204
|
const getProps = React.useCallback((_a) => {
|
|
1204
1205
|
var _b = _a, {
|
|
1205
|
-
style
|
|
1206
|
+
style: style2
|
|
1206
1207
|
} = _b, restOfChildrenProps = __objRest(_b, [
|
|
1207
1208
|
"style"
|
|
1208
1209
|
]);
|
|
1209
1210
|
return __spreadProps(__spreadValues({}, restOfChildrenProps), {
|
|
1210
|
-
style: __spreadValues(__spreadProps(__spreadValues({},
|
|
1211
|
+
style: __spreadValues(__spreadProps(__spreadValues({}, style2), {
|
|
1211
1212
|
position: "absolute",
|
|
1212
1213
|
left: 0,
|
|
1213
1214
|
right: 0,
|
|
@@ -2272,8 +2273,14 @@ function registerComponent$b(runtime) {
|
|
|
2272
2273
|
}],
|
|
2273
2274
|
defaultValue: "medium"
|
|
2274
2275
|
}),
|
|
2275
|
-
color: descriptors.ResponsiveColor({
|
|
2276
|
-
|
|
2276
|
+
color: descriptors.ResponsiveColor((props, device) => {
|
|
2277
|
+
var _a;
|
|
2278
|
+
const variant = props.variant;
|
|
2279
|
+
const hidden = ((_a = findDeviceOverride(variant, device)) == null ? void 0 : _a.value) === "clear";
|
|
2280
|
+
return {
|
|
2281
|
+
placeholder: "black",
|
|
2282
|
+
hidden
|
|
2283
|
+
};
|
|
2277
2284
|
}),
|
|
2278
2285
|
textColor: descriptors.ResponsiveColor({
|
|
2279
2286
|
label: "Text color",
|
|
@@ -2850,17 +2857,29 @@ function registerComponent$9(runtime) {
|
|
|
2850
2857
|
}
|
|
2851
2858
|
}),
|
|
2852
2859
|
margin: descriptors.Margin(),
|
|
2853
|
-
pageSize: descriptors.ResponsiveNumber({
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2860
|
+
pageSize: descriptors.ResponsiveNumber((props) => {
|
|
2861
|
+
var _a;
|
|
2862
|
+
const images = props.images;
|
|
2863
|
+
const imagesLength = (_a = images == null ? void 0 : images.length) != null ? _a : 0;
|
|
2864
|
+
return {
|
|
2865
|
+
label: "Images shown",
|
|
2866
|
+
defaultValue: 1,
|
|
2867
|
+
min: 1,
|
|
2868
|
+
max: imagesLength,
|
|
2869
|
+
step: 1
|
|
2870
|
+
};
|
|
2858
2871
|
}),
|
|
2859
|
-
step: descriptors.ResponsiveNumber({
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2872
|
+
step: descriptors.ResponsiveNumber((props, device) => {
|
|
2873
|
+
var _a, _b;
|
|
2874
|
+
const pageSize = props.pageSize;
|
|
2875
|
+
const pageSizeValue = (_b = (_a = findDeviceOverride(pageSize, device)) == null ? void 0 : _a.value) != null ? _b : 1;
|
|
2876
|
+
return {
|
|
2877
|
+
label: "Step",
|
|
2878
|
+
defaultValue: 1,
|
|
2879
|
+
min: 1,
|
|
2880
|
+
max: pageSizeValue,
|
|
2881
|
+
step: 1
|
|
2882
|
+
};
|
|
2864
2883
|
}),
|
|
2865
2884
|
slideAlignment: descriptors.ResponsiveIconRadioGroup({
|
|
2866
2885
|
label: "Alignment",
|
|
@@ -2890,18 +2909,19 @@ function registerComponent$9(runtime) {
|
|
|
2890
2909
|
autoplay: descriptors.Checkbox({
|
|
2891
2910
|
label: "Autoplay"
|
|
2892
2911
|
}),
|
|
2893
|
-
delay: descriptors.Number({
|
|
2912
|
+
delay: descriptors.Number((props) => ({
|
|
2894
2913
|
label: "Delay",
|
|
2895
2914
|
preset: 5,
|
|
2896
2915
|
min: 1,
|
|
2897
2916
|
step: 0.1,
|
|
2898
|
-
suffix: "seconds"
|
|
2899
|
-
|
|
2917
|
+
suffix: "seconds",
|
|
2918
|
+
hidden: !props.autoplay
|
|
2919
|
+
})),
|
|
2900
2920
|
showArrows: descriptors.Checkbox({
|
|
2901
2921
|
preset: true,
|
|
2902
2922
|
label: "Show arrows"
|
|
2903
2923
|
}),
|
|
2904
|
-
arrowPosition: descriptors.ResponsiveIconRadioGroup({
|
|
2924
|
+
arrowPosition: descriptors.ResponsiveIconRadioGroup((props) => ({
|
|
2905
2925
|
label: "Arrow position",
|
|
2906
2926
|
options: [{
|
|
2907
2927
|
label: "Inside",
|
|
@@ -2916,24 +2936,28 @@ function registerComponent$9(runtime) {
|
|
|
2916
2936
|
value: "outside",
|
|
2917
2937
|
icon: "ArrowOutside16"
|
|
2918
2938
|
}],
|
|
2919
|
-
defaultValue: "inside"
|
|
2920
|
-
|
|
2921
|
-
|
|
2939
|
+
defaultValue: "inside",
|
|
2940
|
+
hidden: props.showArrows === false
|
|
2941
|
+
})),
|
|
2942
|
+
arrowColor: descriptors.ResponsiveColor((props) => ({
|
|
2922
2943
|
label: "Arrow color",
|
|
2923
|
-
placeholder: "black"
|
|
2924
|
-
|
|
2925
|
-
|
|
2944
|
+
placeholder: "black",
|
|
2945
|
+
hidden: props.showArrows === false
|
|
2946
|
+
})),
|
|
2947
|
+
arrowBackground: descriptors.ResponsiveColor((props) => ({
|
|
2926
2948
|
label: "Arrow background",
|
|
2927
|
-
placeholder: "white"
|
|
2928
|
-
|
|
2949
|
+
placeholder: "white",
|
|
2950
|
+
hidden: props.showArrows === false
|
|
2951
|
+
})),
|
|
2929
2952
|
showDots: descriptors.Checkbox({
|
|
2930
2953
|
preset: true,
|
|
2931
2954
|
label: "Show dots"
|
|
2932
2955
|
}),
|
|
2933
|
-
dotColor: descriptors.ResponsiveColor({
|
|
2956
|
+
dotColor: descriptors.ResponsiveColor((props) => ({
|
|
2934
2957
|
label: "Dot color",
|
|
2935
|
-
placeholder: "black"
|
|
2936
|
-
|
|
2958
|
+
placeholder: "black",
|
|
2959
|
+
hidden: props.showDots === false
|
|
2960
|
+
})),
|
|
2937
2961
|
slideBorder: descriptors.Border(),
|
|
2938
2962
|
slideBorderRadius: descriptors.BorderRadius()
|
|
2939
2963
|
}
|
|
@@ -3246,9 +3270,9 @@ function registerComponent$8(runtime) {
|
|
|
3246
3270
|
icon: "Countdown40",
|
|
3247
3271
|
props: {
|
|
3248
3272
|
id: descriptors.ElementID(),
|
|
3249
|
-
date: descriptors.Date({
|
|
3273
|
+
date: descriptors.Date(() => ({
|
|
3250
3274
|
preset: new Date(Date.now() + 1e3 * 60 * 60 * 24 * 2).toISOString()
|
|
3251
|
-
}),
|
|
3275
|
+
})),
|
|
3252
3276
|
variant: descriptors.ResponsiveIconRadioGroup({
|
|
3253
3277
|
label: "Style",
|
|
3254
3278
|
options: [{
|
|
@@ -4115,7 +4139,7 @@ var Checkbox = React.forwardRef(function Checkbox2(_w, ref) {
|
|
|
4115
4139
|
var _x = _w, {
|
|
4116
4140
|
error,
|
|
4117
4141
|
className,
|
|
4118
|
-
style,
|
|
4142
|
+
style: style2,
|
|
4119
4143
|
form
|
|
4120
4144
|
} = _x, restOfProps = __objRest(_x, [
|
|
4121
4145
|
"error",
|
|
@@ -4141,7 +4165,7 @@ var Checkbox = React.forwardRef(function Checkbox2(_w, ref) {
|
|
|
4141
4165
|
className,
|
|
4142
4166
|
error,
|
|
4143
4167
|
contrast,
|
|
4144
|
-
style
|
|
4168
|
+
style: style2
|
|
4145
4169
|
})]
|
|
4146
4170
|
});
|
|
4147
4171
|
});
|
|
@@ -4371,7 +4395,7 @@ var RadioButton = React.forwardRef(function RadioButton2(_C, ref) {
|
|
|
4371
4395
|
var _D = _C, {
|
|
4372
4396
|
error,
|
|
4373
4397
|
className,
|
|
4374
|
-
style,
|
|
4398
|
+
style: style2,
|
|
4375
4399
|
form
|
|
4376
4400
|
} = _D, restOfProps = __objRest(_D, [
|
|
4377
4401
|
"error",
|
|
@@ -4395,7 +4419,7 @@ var RadioButton = React.forwardRef(function RadioButton2(_C, ref) {
|
|
|
4395
4419
|
className,
|
|
4396
4420
|
error,
|
|
4397
4421
|
contrast,
|
|
4398
|
-
style
|
|
4422
|
+
style: style2
|
|
4399
4423
|
})]
|
|
4400
4424
|
});
|
|
4401
4425
|
});
|
|
@@ -5221,7 +5245,7 @@ function registerComponent$5(runtime) {
|
|
|
5221
5245
|
id: descriptors.ElementID(),
|
|
5222
5246
|
tableId: descriptors.Table(),
|
|
5223
5247
|
fields: descriptors.TableFormFields(),
|
|
5224
|
-
submitLink: descriptors.Link({
|
|
5248
|
+
submitLink: descriptors.Link((props) => ({
|
|
5225
5249
|
label: "Redirect to",
|
|
5226
5250
|
options: [{
|
|
5227
5251
|
value: "OPEN_PAGE",
|
|
@@ -5229,9 +5253,10 @@ function registerComponent$5(runtime) {
|
|
|
5229
5253
|
}, {
|
|
5230
5254
|
value: "OPEN_URL",
|
|
5231
5255
|
label: "Open URL"
|
|
5232
|
-
}]
|
|
5233
|
-
|
|
5234
|
-
|
|
5256
|
+
}],
|
|
5257
|
+
hidden: props.tableId == null
|
|
5258
|
+
})),
|
|
5259
|
+
gap: descriptors.GapY((props) => ({
|
|
5235
5260
|
preset: [{
|
|
5236
5261
|
deviceId: "desktop",
|
|
5237
5262
|
value: {
|
|
@@ -5243,9 +5268,10 @@ function registerComponent$5(runtime) {
|
|
|
5243
5268
|
defaultValue: {
|
|
5244
5269
|
value: 0,
|
|
5245
5270
|
unit: "px"
|
|
5246
|
-
}
|
|
5247
|
-
|
|
5248
|
-
|
|
5271
|
+
},
|
|
5272
|
+
hidden: props.tableId == null
|
|
5273
|
+
})),
|
|
5274
|
+
shape: descriptors.ResponsiveIconRadioGroup((props) => ({
|
|
5249
5275
|
label: "Shape",
|
|
5250
5276
|
options: [{
|
|
5251
5277
|
label: "Pill",
|
|
@@ -5260,9 +5286,10 @@ function registerComponent$5(runtime) {
|
|
|
5260
5286
|
value: Shapes.SQUARE,
|
|
5261
5287
|
icon: "ButtonSquare16"
|
|
5262
5288
|
}],
|
|
5263
|
-
defaultValue: Shapes.ROUNDED
|
|
5264
|
-
|
|
5265
|
-
|
|
5289
|
+
defaultValue: Shapes.ROUNDED,
|
|
5290
|
+
hidden: props.tableId == null
|
|
5291
|
+
})),
|
|
5292
|
+
size: descriptors.ResponsiveIconRadioGroup((props) => ({
|
|
5266
5293
|
label: "Size",
|
|
5267
5294
|
options: [{
|
|
5268
5295
|
label: "Small",
|
|
@@ -5277,9 +5304,10 @@ function registerComponent$5(runtime) {
|
|
|
5277
5304
|
value: Sizes.LARGE,
|
|
5278
5305
|
icon: "SizeLarge16"
|
|
5279
5306
|
}],
|
|
5280
|
-
defaultValue: Sizes.MEDIUM
|
|
5281
|
-
|
|
5282
|
-
|
|
5307
|
+
defaultValue: Sizes.MEDIUM,
|
|
5308
|
+
hidden: (props == null ? void 0 : props.tableId) == null
|
|
5309
|
+
})),
|
|
5310
|
+
contrast: descriptors.ResponsiveIconRadioGroup((props) => ({
|
|
5283
5311
|
label: "Color",
|
|
5284
5312
|
options: [{
|
|
5285
5313
|
label: "Light mode",
|
|
@@ -5290,30 +5318,41 @@ function registerComponent$5(runtime) {
|
|
|
5290
5318
|
value: Contrasts.DARK,
|
|
5291
5319
|
icon: "Moon16"
|
|
5292
5320
|
}],
|
|
5293
|
-
defaultValue: Contrasts.LIGHT
|
|
5294
|
-
|
|
5321
|
+
defaultValue: Contrasts.LIGHT,
|
|
5322
|
+
hidden: props.tableId == null
|
|
5323
|
+
})),
|
|
5295
5324
|
labelTextStyle: descriptors.TextStyle({
|
|
5296
5325
|
label: "Label text style"
|
|
5297
5326
|
}),
|
|
5298
|
-
labelTextColor: descriptors.ResponsiveColor({
|
|
5299
|
-
|
|
5327
|
+
labelTextColor: descriptors.ResponsiveColor((props, device) => {
|
|
5328
|
+
const hidden = props.tableId == null;
|
|
5329
|
+
const responsiveContrast = props.contrast;
|
|
5330
|
+
const contrast = findDeviceOverride(responsiveContrast, device);
|
|
5331
|
+
return {
|
|
5332
|
+
hidden,
|
|
5333
|
+
label: "Label text color",
|
|
5334
|
+
placeholder: (contrast == null ? void 0 : contrast.value) === Contrasts.DARK ? "rgba(255,255,255,0.95)" : "rgba(0,0,0,0.8)"
|
|
5335
|
+
};
|
|
5300
5336
|
}),
|
|
5301
5337
|
submitTextStyle: descriptors.TextStyle({
|
|
5302
5338
|
label: "Button text style"
|
|
5303
5339
|
}),
|
|
5304
|
-
brandColor: descriptors.ResponsiveColor({
|
|
5340
|
+
brandColor: descriptors.ResponsiveColor((props) => ({
|
|
5305
5341
|
label: "Button color",
|
|
5306
|
-
placeholder: "black"
|
|
5307
|
-
|
|
5308
|
-
|
|
5342
|
+
placeholder: "black",
|
|
5343
|
+
hidden: props.tableId == null
|
|
5344
|
+
})),
|
|
5345
|
+
submitTextColor: descriptors.ResponsiveColor((props) => ({
|
|
5309
5346
|
label: "Button text color",
|
|
5310
|
-
placeholder: "white"
|
|
5311
|
-
|
|
5312
|
-
|
|
5347
|
+
placeholder: "white",
|
|
5348
|
+
hidden: props.tableId == null
|
|
5349
|
+
})),
|
|
5350
|
+
submitLabel: descriptors.TextInput((props) => ({
|
|
5313
5351
|
label: "Button label",
|
|
5314
|
-
placeholder: "Submit"
|
|
5315
|
-
|
|
5316
|
-
|
|
5352
|
+
placeholder: "Submit",
|
|
5353
|
+
hidden: props.tableId == null
|
|
5354
|
+
})),
|
|
5355
|
+
submitVariant: descriptors.ResponsiveSelect((props) => ({
|
|
5317
5356
|
label: "Button style",
|
|
5318
5357
|
options: [{
|
|
5319
5358
|
value: "flat",
|
|
@@ -5337,12 +5376,14 @@ function registerComponent$5(runtime) {
|
|
|
5337
5376
|
value: "skewed",
|
|
5338
5377
|
label: "Skewed"
|
|
5339
5378
|
}],
|
|
5340
|
-
defaultValue: "flat"
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5379
|
+
defaultValue: "flat",
|
|
5380
|
+
hidden: props.tableId == null
|
|
5381
|
+
})),
|
|
5382
|
+
submitWidth: descriptors.ResponsiveLength((props) => ({
|
|
5383
|
+
label: "Button width",
|
|
5384
|
+
hidden: props.tableId == null
|
|
5385
|
+
})),
|
|
5386
|
+
submitAlignment: descriptors.ResponsiveIconRadioGroup((props) => ({
|
|
5346
5387
|
label: "Button alignment",
|
|
5347
5388
|
options: [{
|
|
5348
5389
|
label: "Left",
|
|
@@ -5357,8 +5398,9 @@ function registerComponent$5(runtime) {
|
|
|
5357
5398
|
value: Alignments.RIGHT,
|
|
5358
5399
|
icon: "AlignRight16"
|
|
5359
5400
|
}],
|
|
5360
|
-
defaultValue: Alignments.CENTER
|
|
5361
|
-
|
|
5401
|
+
defaultValue: Alignments.CENTER,
|
|
5402
|
+
hidden: props.tableId == null
|
|
5403
|
+
})),
|
|
5362
5404
|
width: descriptors.Width({
|
|
5363
5405
|
format: descriptors.Width.Formats.ClassName,
|
|
5364
5406
|
preset: [{
|
|
@@ -5965,30 +6007,47 @@ function registerComponent$4(runtime) {
|
|
|
5965
6007
|
props: {
|
|
5966
6008
|
id: descriptors.ElementID(),
|
|
5967
6009
|
links: descriptors.NavigationLinks(),
|
|
5968
|
-
linkTextStyle: descriptors.TextStyle({
|
|
5969
|
-
|
|
6010
|
+
linkTextStyle: descriptors.TextStyle((props) => {
|
|
6011
|
+
const links2 = props.links;
|
|
6012
|
+
return {
|
|
6013
|
+
label: "Link text style",
|
|
6014
|
+
hidden: links2 == null || links2.length === 0
|
|
6015
|
+
};
|
|
5970
6016
|
}),
|
|
5971
6017
|
showLogo: descriptors.Checkbox({
|
|
5972
6018
|
preset: true,
|
|
5973
6019
|
label: "Show logo"
|
|
5974
6020
|
}),
|
|
5975
|
-
logoFile: descriptors.Image({
|
|
5976
|
-
label: "Logo"
|
|
5977
|
-
|
|
5978
|
-
|
|
6021
|
+
logoFile: descriptors.Image((props) => ({
|
|
6022
|
+
label: "Logo",
|
|
6023
|
+
hidden: props.showLogo === false
|
|
6024
|
+
})),
|
|
6025
|
+
logoWidth: descriptors.ResponsiveLength((props) => ({
|
|
6026
|
+
preset: [{
|
|
6027
|
+
deviceId: "desktop",
|
|
6028
|
+
value: {
|
|
6029
|
+
value: 100,
|
|
6030
|
+
unit: "px"
|
|
6031
|
+
}
|
|
6032
|
+
}],
|
|
5979
6033
|
label: "Logo width",
|
|
6034
|
+
min: 0,
|
|
6035
|
+
max: 1e3,
|
|
5980
6036
|
options: [{
|
|
5981
6037
|
value: "px",
|
|
5982
6038
|
label: "Pixels",
|
|
5983
6039
|
icon: "Px16"
|
|
5984
|
-
}]
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
6040
|
+
}],
|
|
6041
|
+
hidden: props.showLogo === false
|
|
6042
|
+
})),
|
|
6043
|
+
logoAltText: descriptors.TextInput((props) => ({
|
|
6044
|
+
label: "Logo alt text",
|
|
6045
|
+
hidden: props.showLogo === false
|
|
6046
|
+
})),
|
|
6047
|
+
logoLink: descriptors.Link((props) => ({
|
|
6048
|
+
label: "Logo on click",
|
|
6049
|
+
hidden: props.showLogo === false
|
|
6050
|
+
})),
|
|
5992
6051
|
alignment: descriptors.ResponsiveIconRadioGroup({
|
|
5993
6052
|
label: "Alignment",
|
|
5994
6053
|
options: [{
|
|
@@ -6033,17 +6092,32 @@ function registerComponent$4(runtime) {
|
|
|
6033
6092
|
label: "Cover from left"
|
|
6034
6093
|
}]
|
|
6035
6094
|
}),
|
|
6036
|
-
mobileMenuOpenIconColor: descriptors.ResponsiveColor({
|
|
6037
|
-
|
|
6038
|
-
|
|
6095
|
+
mobileMenuOpenIconColor: descriptors.ResponsiveColor((props, device) => {
|
|
6096
|
+
const mobileMenuAnimation = props.mobileMenuAnimation;
|
|
6097
|
+
const hidden = !findDeviceOverride(mobileMenuAnimation, device);
|
|
6098
|
+
return {
|
|
6099
|
+
label: "Open icon color",
|
|
6100
|
+
placeholder: "rgba(161, 168, 194, 0.5)",
|
|
6101
|
+
hidden
|
|
6102
|
+
};
|
|
6039
6103
|
}),
|
|
6040
|
-
mobileMenuCloseIconColor: descriptors.ResponsiveColor({
|
|
6041
|
-
|
|
6042
|
-
|
|
6104
|
+
mobileMenuCloseIconColor: descriptors.ResponsiveColor((props, device) => {
|
|
6105
|
+
const mobileMenuAnimation = props.mobileMenuAnimation;
|
|
6106
|
+
const hidden = !findDeviceOverride(mobileMenuAnimation, device);
|
|
6107
|
+
return {
|
|
6108
|
+
label: "Close icon color",
|
|
6109
|
+
placeholder: "rgba(161, 168, 194, 0.5)",
|
|
6110
|
+
hidden
|
|
6111
|
+
};
|
|
6043
6112
|
}),
|
|
6044
|
-
mobileMenuBackgroundColor: descriptors.ResponsiveColor({
|
|
6045
|
-
|
|
6046
|
-
|
|
6113
|
+
mobileMenuBackgroundColor: descriptors.ResponsiveColor((props, device) => {
|
|
6114
|
+
const mobileMenuAnimation = props.mobileMenuAnimation;
|
|
6115
|
+
const hidden = !findDeviceOverride(mobileMenuAnimation, device);
|
|
6116
|
+
return {
|
|
6117
|
+
label: "Menu BG color",
|
|
6118
|
+
placeholder: "black",
|
|
6119
|
+
hidden
|
|
6120
|
+
};
|
|
6047
6121
|
}),
|
|
6048
6122
|
width: descriptors.Width({
|
|
6049
6123
|
format: descriptors.Width.Formats.ClassName,
|
|
@@ -6960,67 +7034,90 @@ function registerComponent$2(runtime) {
|
|
|
6960
7034
|
openInNewTab: false
|
|
6961
7035
|
}
|
|
6962
7036
|
}),
|
|
6963
|
-
shape: descriptors.ResponsiveIconRadioGroup({
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
label: "
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
7037
|
+
shape: descriptors.ResponsiveIconRadioGroup((props) => {
|
|
7038
|
+
const links2 = props.links;
|
|
7039
|
+
return {
|
|
7040
|
+
label: "Shape",
|
|
7041
|
+
options: [{
|
|
7042
|
+
label: "Naked",
|
|
7043
|
+
value: "naked",
|
|
7044
|
+
icon: "Star16"
|
|
7045
|
+
}, {
|
|
7046
|
+
label: "Circle",
|
|
7047
|
+
value: "circle",
|
|
7048
|
+
icon: "StarCircle16"
|
|
7049
|
+
}, {
|
|
7050
|
+
label: "Rounded",
|
|
7051
|
+
value: "rounded",
|
|
7052
|
+
icon: "StarRoundedSquare16"
|
|
7053
|
+
}, {
|
|
7054
|
+
label: "Square",
|
|
7055
|
+
value: "square",
|
|
7056
|
+
icon: "StarSquare16"
|
|
7057
|
+
}],
|
|
7058
|
+
defaultValue: "naked",
|
|
7059
|
+
hidden: links2 == null || links2.links.length === 0
|
|
7060
|
+
};
|
|
6983
7061
|
}),
|
|
6984
|
-
size: descriptors.ResponsiveIconRadioGroup({
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
label: "
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7062
|
+
size: descriptors.ResponsiveIconRadioGroup((props) => {
|
|
7063
|
+
const links2 = props.links;
|
|
7064
|
+
return {
|
|
7065
|
+
label: "Size",
|
|
7066
|
+
options: [{
|
|
7067
|
+
label: "Small",
|
|
7068
|
+
value: "small",
|
|
7069
|
+
icon: "SizeSmall16"
|
|
7070
|
+
}, {
|
|
7071
|
+
label: "Medium",
|
|
7072
|
+
value: "medium",
|
|
7073
|
+
icon: "SizeMedium16"
|
|
7074
|
+
}, {
|
|
7075
|
+
label: "Large",
|
|
7076
|
+
value: "large",
|
|
7077
|
+
icon: "SizeLarge16"
|
|
7078
|
+
}],
|
|
7079
|
+
defaultValue: "medium",
|
|
7080
|
+
hidden: links2 == null || links2.links.length === 0
|
|
7081
|
+
};
|
|
7000
7082
|
}),
|
|
7001
|
-
hoverStyle: descriptors.ResponsiveSelect({
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
label: "
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7083
|
+
hoverStyle: descriptors.ResponsiveSelect((props) => {
|
|
7084
|
+
const links2 = props.links;
|
|
7085
|
+
const hidden = links2 == null || links2.links.length === 0;
|
|
7086
|
+
return {
|
|
7087
|
+
label: "On hover",
|
|
7088
|
+
options: [{
|
|
7089
|
+
value: "none",
|
|
7090
|
+
label: "None"
|
|
7091
|
+
}, {
|
|
7092
|
+
value: "grow",
|
|
7093
|
+
label: "Grow"
|
|
7094
|
+
}, {
|
|
7095
|
+
value: "shrink",
|
|
7096
|
+
label: "Shrink"
|
|
7097
|
+
}, {
|
|
7098
|
+
value: "fade",
|
|
7099
|
+
label: "Fade"
|
|
7100
|
+
}],
|
|
7101
|
+
defaultValue: "none",
|
|
7102
|
+
labelOrientation: "horizontal",
|
|
7103
|
+
hidden
|
|
7104
|
+
};
|
|
7018
7105
|
}),
|
|
7019
|
-
fill: descriptors.ResponsiveColor({
|
|
7020
|
-
|
|
7106
|
+
fill: descriptors.ResponsiveColor((props) => {
|
|
7107
|
+
const links2 = props.links;
|
|
7108
|
+
const hidden = links2 == null || links2.links.length === 0;
|
|
7109
|
+
return {
|
|
7110
|
+
label: "Icon color",
|
|
7111
|
+
hidden
|
|
7112
|
+
};
|
|
7021
7113
|
}),
|
|
7022
|
-
backgroundColor: descriptors.ResponsiveColor({
|
|
7023
|
-
|
|
7114
|
+
backgroundColor: descriptors.ResponsiveColor((props) => {
|
|
7115
|
+
const links2 = props.links;
|
|
7116
|
+
const hidden = links2 == null || links2.links.length === 0;
|
|
7117
|
+
return {
|
|
7118
|
+
label: "Shape color",
|
|
7119
|
+
hidden
|
|
7120
|
+
};
|
|
7024
7121
|
}),
|
|
7025
7122
|
alignment: descriptors.ResponsiveIconRadioGroup({
|
|
7026
7123
|
label: "Alignment",
|
|
@@ -7472,7 +7569,7 @@ function registerComponent$1(runtime) {
|
|
|
7472
7569
|
label: "Text",
|
|
7473
7570
|
props: {
|
|
7474
7571
|
id: descriptors.ElementID(),
|
|
7475
|
-
text: descriptors.RichText({
|
|
7572
|
+
text: descriptors.RichText(() => ({
|
|
7476
7573
|
preset: {
|
|
7477
7574
|
document: {
|
|
7478
7575
|
nodes: [{
|
|
@@ -7513,7 +7610,7 @@ function registerComponent$1(runtime) {
|
|
|
7513
7610
|
}]
|
|
7514
7611
|
}
|
|
7515
7612
|
}
|
|
7516
|
-
}),
|
|
7613
|
+
})),
|
|
7517
7614
|
width: descriptors.Width({
|
|
7518
7615
|
format: descriptors.Width.Formats.ClassName,
|
|
7519
7616
|
preset: [{
|
|
@@ -7709,6 +7806,74 @@ const FallbackComponent = React.forwardRef(function FallbackComponent2({
|
|
|
7709
7806
|
})]
|
|
7710
7807
|
});
|
|
7711
7808
|
});
|
|
7809
|
+
function useStyleControlDataClass(style$1, controlDefinition) {
|
|
7810
|
+
const { properties } = controlDefinition.config;
|
|
7811
|
+
return css.css(__spreadValues(__spreadValues({}, properties.includes(style.StyleControlProperty.Width) && {
|
|
7812
|
+
maxWidth: "100%"
|
|
7813
|
+
}), responsiveStyle([
|
|
7814
|
+
style$1 == null ? void 0 : style$1.width,
|
|
7815
|
+
style$1 == null ? void 0 : style$1.margin,
|
|
7816
|
+
style$1 == null ? void 0 : style$1.padding,
|
|
7817
|
+
useBorder(style$1 == null ? void 0 : style$1.border),
|
|
7818
|
+
style$1 == null ? void 0 : style$1.borderRadius
|
|
7819
|
+
], ([width, margin, padding, border, borderRadius]) => {
|
|
7820
|
+
var _a, _b, _c, _d, _e, _f, _g2, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
7821
|
+
return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(style.StyleControlProperty.Width) && {
|
|
7822
|
+
width: (_a = widthToString(width)) != null ? _a : "100%"
|
|
7823
|
+
}), properties.includes(style.StyleControlProperty.Margin) && {
|
|
7824
|
+
marginTop: (_b = marginToString(margin == null ? void 0 : margin.marginTop)) != null ? _b : 0,
|
|
7825
|
+
marginRight: (_c = marginToString(margin == null ? void 0 : margin.marginRight)) != null ? _c : "auto",
|
|
7826
|
+
marginBottom: (_d = marginToString(margin == null ? void 0 : margin.marginBottom)) != null ? _d : 0,
|
|
7827
|
+
marginLeft: (_e = marginToString(margin == null ? void 0 : margin.marginLeft)) != null ? _e : "auto"
|
|
7828
|
+
}), properties.includes(style.StyleControlProperty.Padding) && {
|
|
7829
|
+
paddingTop: (_f = paddingToString(padding == null ? void 0 : padding.paddingTop)) != null ? _f : 0,
|
|
7830
|
+
paddingRight: (_g2 = paddingToString(padding == null ? void 0 : padding.paddingRight)) != null ? _g2 : 0,
|
|
7831
|
+
paddingBottom: (_h = paddingToString(padding == null ? void 0 : padding.paddingBottom)) != null ? _h : 0,
|
|
7832
|
+
paddingLeft: (_i = paddingToString(padding == null ? void 0 : padding.paddingLeft)) != null ? _i : 0
|
|
7833
|
+
}), properties.includes(style.StyleControlProperty.Border) && {
|
|
7834
|
+
borderTop: (_j = borderSideToString(border == null ? void 0 : border.borderTop)) != null ? _j : "0 solid black",
|
|
7835
|
+
borderRight: (_k = borderSideToString(border == null ? void 0 : border.borderRight)) != null ? _k : "0 solid black",
|
|
7836
|
+
borderBottom: (_l = borderSideToString(border == null ? void 0 : border.borderBottom)) != null ? _l : "0 solid black",
|
|
7837
|
+
borderLeft: (_m = borderSideToString(border == null ? void 0 : border.borderLeft)) != null ? _m : "0 solid black"
|
|
7838
|
+
}), properties.includes(style.StyleControlProperty.BorderRadius) && {
|
|
7839
|
+
borderTopLeftRadius: (_n = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopLeftRadius)) != null ? _n : 0,
|
|
7840
|
+
borderTopRightRadius: (_o = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopRightRadius)) != null ? _o : 0,
|
|
7841
|
+
borderBottomRightRadius: (_p = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomRightRadius)) != null ? _p : 0,
|
|
7842
|
+
borderBottomLeftRadius: (_q = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomLeftRadius)) != null ? _q : 0
|
|
7843
|
+
});
|
|
7844
|
+
})));
|
|
7845
|
+
function widthToString(widthProperty) {
|
|
7846
|
+
if (widthProperty == null)
|
|
7847
|
+
return null;
|
|
7848
|
+
return `${widthProperty.value}${widthProperty.unit}`;
|
|
7849
|
+
}
|
|
7850
|
+
function marginToString(marginProperty) {
|
|
7851
|
+
if (marginProperty == null)
|
|
7852
|
+
return null;
|
|
7853
|
+
if (marginProperty === "auto")
|
|
7854
|
+
return marginProperty;
|
|
7855
|
+
return `${marginProperty.value}${marginProperty.unit}`;
|
|
7856
|
+
}
|
|
7857
|
+
function paddingToString(paddingProperty) {
|
|
7858
|
+
if (paddingProperty == null)
|
|
7859
|
+
return null;
|
|
7860
|
+
return `${paddingProperty.value}${paddingProperty.unit}`;
|
|
7861
|
+
}
|
|
7862
|
+
function borderSideToString(borderSide) {
|
|
7863
|
+
if (borderSide == null)
|
|
7864
|
+
return null;
|
|
7865
|
+
const { width, color, style: style2 } = borderSide;
|
|
7866
|
+
return `${width != null ? width : 0}px ${style2} ${color != null ? colorToString(color) : "black"}`;
|
|
7867
|
+
}
|
|
7868
|
+
function borderRadiusToString(borderRadius) {
|
|
7869
|
+
if (borderRadius == null)
|
|
7870
|
+
return null;
|
|
7871
|
+
return `${borderRadius.value}${borderRadius.unit}`;
|
|
7872
|
+
}
|
|
7873
|
+
}
|
|
7874
|
+
function useFormattedStyle(styleControlData, controlDefinition) {
|
|
7875
|
+
return useStyleControlDataClass(styleControlData, controlDefinition);
|
|
7876
|
+
}
|
|
7712
7877
|
function useDeviceMode() {
|
|
7713
7878
|
return "desktop";
|
|
7714
7879
|
}
|
|
@@ -7733,6 +7898,8 @@ function useProps(element) {
|
|
|
7733
7898
|
}
|
|
7734
7899
|
case descriptors.Types.Width:
|
|
7735
7900
|
return [propName, useWidth(props[propName], descriptor, props)];
|
|
7901
|
+
case style.StyleControlType:
|
|
7902
|
+
return [propName, useFormattedStyle(props[propName], descriptor)];
|
|
7736
7903
|
default:
|
|
7737
7904
|
return [propName, props[propName]];
|
|
7738
7905
|
}
|