@makeswift/runtime 0.0.16 → 0.0.19
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/dist/api.cjs.js +1 -0
- package/dist/api.cjs.js.map +1 -1
- package/dist/api.es.js +1 -0
- package/dist/api.es.js.map +1 -1
- package/dist/builder.cjs.js +1 -1
- package/dist/builder.es.js +1 -1
- package/dist/components.cjs.js +6 -4
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.es.js +6 -4
- package/dist/components.es.js.map +1 -1
- package/dist/constants.cjs.js +10 -363
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.es.js +1 -354
- package/dist/constants.es.js.map +1 -1
- package/dist/control-serialization.cjs.js +43 -3
- package/dist/control-serialization.cjs.js.map +1 -1
- package/dist/control-serialization.es.js +41 -1
- package/dist/control-serialization.es.js.map +1 -1
- package/dist/controls.cjs.js +12 -9
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +3 -2
- package/dist/controls.es.js.map +1 -1
- package/dist/descriptors.cjs.js.map +1 -1
- package/dist/descriptors.es.js.map +1 -1
- package/dist/graphql.cjs.js +365 -0
- package/dist/graphql.cjs.js.map +1 -0
- package/dist/graphql.es.js +356 -0
- package/dist/graphql.es.js.map +1 -0
- package/dist/image.cjs.js +14 -0
- package/dist/image.cjs.js.map +1 -0
- package/dist/image.es.js +10 -0
- package/dist/image.es.js.map +1 -0
- package/dist/index.cjs.js +404 -152
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +358 -106
- 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 +6 -4
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +6 -4
- package/dist/next.es.js.map +1 -1
- package/dist/react-builder-preview.cjs.js +8 -6
- package/dist/react-builder-preview.cjs.js.map +1 -1
- package/dist/react-builder-preview.es.js +9 -7
- package/dist/react-builder-preview.es.js.map +1 -1
- package/dist/react-page.cjs.js +260 -0
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +254 -1
- package/dist/react-page.es.js.map +1 -1
- package/dist/react.cjs.js +6 -4
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.es.js +6 -4
- package/dist/react.es.js.map +1 -1
- package/dist/shape.cjs.js +20 -0
- package/dist/shape.cjs.js.map +1 -0
- package/dist/shape.es.js +14 -0
- package/dist/shape.es.js.map +1 -0
- package/dist/text-input.cjs.js +0 -18
- package/dist/text-input.cjs.js.map +1 -1
- package/dist/text-input.es.js +1 -13
- package/dist/text-input.es.js.map +1 -1
- package/dist/types/api/introspection.d.ts +10 -0
- package/dist/types/api/introspection.d.ts.map +1 -0
- package/dist/types/api/react.d.ts +0 -1
- package/dist/types/api/react.d.ts.map +1 -1
- package/dist/types/builder/serialization/control-serialization.d.ts +3 -3
- package/dist/types/builder/serialization/control-serialization.d.ts.map +1 -1
- package/dist/types/builder/serialization/controls/combobox.d.ts +5 -0
- package/dist/types/builder/serialization/controls/combobox.d.ts.map +1 -0
- package/dist/types/builder/serialization/controls/shape.d.ts +5 -0
- package/dist/types/builder/serialization/controls/shape.d.ts.map +1 -0
- package/dist/types/components/builtin/Box/Box.d.ts.map +1 -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/Divider/Divider.d.ts.map +1 -1
- package/dist/types/components/builtin/Embed/Embed.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/Form.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts +1 -1
- package/dist/types/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Image/Image.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/Navigation.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/components/DropDownButton/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/components/MobileMenu/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Root/Root.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/builtin/Video/Video.d.ts.map +1 -1
- package/dist/types/components/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/dist/types/components/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/dist/types/components/hooks/useMediaQuery.d.ts.map +1 -1
- package/dist/types/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +1 -1
- package/dist/types/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -1
- package/dist/types/components/shared/BackgroundsContainer/components/Parallax/index.d.ts.map +1 -1
- package/dist/types/components/utils/queries.d.ts +2 -0
- package/dist/types/components/utils/queries.d.ts.map +1 -1
- package/dist/types/controls/combobox.d.ts +22 -0
- package/dist/types/controls/combobox.d.ts.map +1 -0
- package/dist/types/controls/control.d.ts +3 -2
- package/dist/types/controls/control.d.ts.map +1 -1
- package/dist/types/controls/index.d.ts +1 -0
- package/dist/types/controls/index.d.ts.map +1 -1
- package/dist/types/controls/types.d.ts +3 -0
- package/dist/types/controls/types.d.ts.map +1 -1
- package/dist/types/prop-controllers/descriptors.d.ts +4 -3
- package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/prop-controllers/introspection.d.ts +5 -0
- package/dist/types/prop-controllers/introspection.d.ts.map +1 -1
- package/dist/types/runtimes/react/controls/combobox.d.ts +4 -0
- package/dist/types/runtimes/react/controls/combobox.d.ts.map +1 -0
- package/dist/types/runtimes/react/controls/control.d.ts +3 -2
- package/dist/types/runtimes/react/controls/control.d.ts.map +1 -1
- package/dist/types/runtimes/react/controls.d.ts.map +1 -1
- package/dist/types/runtimes/react/index.d.ts +1 -1
- package/dist/types/runtimes/react/index.d.ts.map +1 -1
- package/dist/types/state/react-page.d.ts +1 -0
- package/dist/types/state/react-page.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/list.cjs.js +0 -8
- package/dist/list.cjs.js.map +0 -1
- package/dist/list.es.js +0 -6
- package/dist/list.es.js.map +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -37,24 +37,27 @@ var __publicField = (obj, key, value) => {
|
|
|
37
37
|
var _ea;
|
|
38
38
|
var React = require("react");
|
|
39
39
|
var withSelector = require("use-sync-external-store/shim/with-selector");
|
|
40
|
-
var client = require("@apollo/client");
|
|
41
40
|
var reactPage = require("./react-page.cjs.js");
|
|
42
41
|
var actions = require("./actions.cjs.js");
|
|
43
42
|
var styled = require("styled-components");
|
|
44
43
|
var framerMotion = require("framer-motion");
|
|
45
44
|
var css = require("@emotion/css");
|
|
46
|
-
var
|
|
45
|
+
var client = require("@apollo/client");
|
|
46
|
+
var batchHttp = require("@apollo/client/link/batch-http");
|
|
47
47
|
var slate = require("slate");
|
|
48
|
-
var
|
|
48
|
+
var graphql = require("./graphql.cjs.js");
|
|
49
|
+
var shape = require("./shape.cjs.js");
|
|
50
|
+
var style = require("./style.cjs.js");
|
|
51
|
+
var descriptors = require("./descriptors.cjs.js");
|
|
49
52
|
var jsxRuntime = require("react/jsx-runtime");
|
|
50
53
|
var parse = require("html-react-parser");
|
|
51
54
|
var Head = require("next/head");
|
|
52
|
-
var descriptors = require("./descriptors.cjs.js");
|
|
53
55
|
var ColorHelper = require("color");
|
|
54
56
|
var scrollIntoView = require("scroll-into-view-if-needed");
|
|
55
57
|
var NextLink = require("next/link");
|
|
56
58
|
var reactUseGesture = require("react-use-gesture");
|
|
57
59
|
var popcorn = require("@popmotion/popcorn");
|
|
60
|
+
var uuid = require("uuid/v4");
|
|
58
61
|
var NextImage = require("next/image");
|
|
59
62
|
var formik = require("formik");
|
|
60
63
|
var boxModels = require("./box-models.cjs.js");
|
|
@@ -66,8 +69,7 @@ var isHotkey = require("is-hotkey");
|
|
|
66
69
|
var slateReact = require("slate-react");
|
|
67
70
|
var Lists = require("@convertkit/slate-lists");
|
|
68
71
|
var textInput = require("./text-input.cjs.js");
|
|
69
|
-
var
|
|
70
|
-
var style = require("./style.cjs.js");
|
|
72
|
+
var image = require("./image.cjs.js");
|
|
71
73
|
var reactDom = require("react-dom");
|
|
72
74
|
function _interopDefaultLegacy(e) {
|
|
73
75
|
return e && typeof e === "object" && "default" in e ? e : { "default": e };
|
|
@@ -94,12 +96,12 @@ function _interopNamespace(e) {
|
|
|
94
96
|
}
|
|
95
97
|
var React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
|
96
98
|
var styled__default = /* @__PURE__ */ _interopDefaultLegacy(styled);
|
|
97
|
-
var uuid__default = /* @__PURE__ */ _interopDefaultLegacy(uuid);
|
|
98
99
|
var parse__default = /* @__PURE__ */ _interopDefaultLegacy(parse);
|
|
99
100
|
var Head__default = /* @__PURE__ */ _interopDefaultLegacy(Head);
|
|
100
101
|
var ColorHelper__default = /* @__PURE__ */ _interopDefaultLegacy(ColorHelper);
|
|
101
102
|
var scrollIntoView__default = /* @__PURE__ */ _interopDefaultLegacy(scrollIntoView);
|
|
102
103
|
var NextLink__default = /* @__PURE__ */ _interopDefaultLegacy(NextLink);
|
|
104
|
+
var uuid__default = /* @__PURE__ */ _interopDefaultLegacy(uuid);
|
|
103
105
|
var NextImage__default = /* @__PURE__ */ _interopDefaultLegacy(NextImage);
|
|
104
106
|
var ReactPlayer__default = /* @__PURE__ */ _interopDefaultLegacy(ReactPlayer);
|
|
105
107
|
var Hotkeys__default = /* @__PURE__ */ _interopDefaultLegacy(Hotkeys);
|
|
@@ -252,9 +254,165 @@ const TABLE_BY_ID = client.gql`
|
|
|
252
254
|
}
|
|
253
255
|
}
|
|
254
256
|
`;
|
|
257
|
+
const ELEMENT_REFERENCE_GLOBAL_ELEMENT = client.gql`
|
|
258
|
+
query ElementReferenceGlobalElement($id: ID!) {
|
|
259
|
+
globalElement(id: $id) {
|
|
260
|
+
id
|
|
261
|
+
data
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
`;
|
|
265
|
+
const INTROSPECTION_QUERY = client.gql`
|
|
266
|
+
query Introspection(
|
|
267
|
+
$swatchIds: [ID!]!
|
|
268
|
+
$fileIds: [ID!]!
|
|
269
|
+
$pageIds: [ID!]!
|
|
270
|
+
$typographyIds: [ID!]!
|
|
271
|
+
$tableIds: [ID!]!
|
|
272
|
+
) {
|
|
273
|
+
swatches(ids: $swatchIds) {
|
|
274
|
+
id
|
|
275
|
+
hue
|
|
276
|
+
saturation
|
|
277
|
+
lightness
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
files(ids: $fileIds) {
|
|
281
|
+
id
|
|
282
|
+
name
|
|
283
|
+
publicUrl
|
|
284
|
+
extension
|
|
285
|
+
dimensions {
|
|
286
|
+
width
|
|
287
|
+
height
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
pagePathnamesById(ids: $pageIds) {
|
|
292
|
+
id
|
|
293
|
+
pathname
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
typographies(ids: $typographyIds) {
|
|
297
|
+
...Typography
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
tables(ids: $tableIds) {
|
|
301
|
+
id
|
|
302
|
+
name
|
|
303
|
+
columns {
|
|
304
|
+
id
|
|
305
|
+
name
|
|
306
|
+
... on MultipleSelectTableColumn {
|
|
307
|
+
options {
|
|
308
|
+
id
|
|
309
|
+
name
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
... on SingleSelectTableColumn {
|
|
313
|
+
options {
|
|
314
|
+
id
|
|
315
|
+
name
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
${TYPOGRAPHY_FRAGMENT}
|
|
323
|
+
`;
|
|
255
324
|
function isNonNullable(value) {
|
|
256
325
|
return value != null;
|
|
257
326
|
}
|
|
327
|
+
async function introspect(element, client2, store) {
|
|
328
|
+
var _a, _b, _c;
|
|
329
|
+
const descriptors$1 = reactPage.getPropControllerDescriptors(store.getState());
|
|
330
|
+
const swatchIds = /* @__PURE__ */ new Set();
|
|
331
|
+
const fileIds = /* @__PURE__ */ new Set();
|
|
332
|
+
const typographyIds = /* @__PURE__ */ new Set();
|
|
333
|
+
const tableIds = /* @__PURE__ */ new Set();
|
|
334
|
+
const pageIds = /* @__PURE__ */ new Set();
|
|
335
|
+
const remaining = [element];
|
|
336
|
+
let current;
|
|
337
|
+
while (current = remaining.pop()) {
|
|
338
|
+
let getResourcesFromElementDescriptors = function(elementDescriptors2, props) {
|
|
339
|
+
Object.entries(elementDescriptors2).forEach(([propName, descriptor]) => {
|
|
340
|
+
reactPage.getElementSwatchIds(descriptor, props[propName]).forEach((swatchId) => {
|
|
341
|
+
swatchIds.add(swatchId);
|
|
342
|
+
});
|
|
343
|
+
reactPage.getFileIds(descriptor, props[propName]).forEach((fileId) => fileIds.add(fileId));
|
|
344
|
+
reactPage.getTypographyIds(descriptor, props[propName]).forEach((typographyId) => typographyIds.add(typographyId));
|
|
345
|
+
reactPage.getTableIds(descriptor, props[propName]).forEach((tableId) => tableIds.add(tableId));
|
|
346
|
+
reactPage.getPageIds(descriptor, props[propName]).forEach((pageId) => pageIds.add(pageId));
|
|
347
|
+
reactPage.getElementChildren(descriptor, props[propName]).forEach((child) => remaining.push(child));
|
|
348
|
+
if (descriptor.type === shape.ShapeControlType) {
|
|
349
|
+
const prop = props[propName];
|
|
350
|
+
if (prop == null)
|
|
351
|
+
return;
|
|
352
|
+
getResourcesFromElementDescriptors(descriptor.config.type, prop);
|
|
353
|
+
}
|
|
354
|
+
if (descriptor.type === shape.ListControlType) {
|
|
355
|
+
const prop = props[propName];
|
|
356
|
+
if (prop == null)
|
|
357
|
+
return;
|
|
358
|
+
prop.forEach((item) => {
|
|
359
|
+
getResourcesFromElementDescriptors({ propName: descriptor.config.type }, { propName: item.value });
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
if (descriptor.type === descriptors.Types.Shape) {
|
|
363
|
+
const prop = props[propName];
|
|
364
|
+
if (prop == null)
|
|
365
|
+
return;
|
|
366
|
+
getResourcesFromElementDescriptors(descriptor.options.type, prop);
|
|
367
|
+
}
|
|
368
|
+
if (descriptor.type === descriptors.Types.List) {
|
|
369
|
+
const prop = props[propName];
|
|
370
|
+
if (prop == null)
|
|
371
|
+
return;
|
|
372
|
+
prop.forEach((item) => {
|
|
373
|
+
getResourcesFromElementDescriptors({ propName: descriptor.options.type }, { propName: item.value });
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
};
|
|
378
|
+
let element2;
|
|
379
|
+
if (reactPage.isElementReference(current)) {
|
|
380
|
+
const query = await client2.query({
|
|
381
|
+
query: ELEMENT_REFERENCE_GLOBAL_ELEMENT,
|
|
382
|
+
variables: { id: current.value }
|
|
383
|
+
});
|
|
384
|
+
const elementData = (_b = (_a = query.data) == null ? void 0 : _a.globalElement) == null ? void 0 : _b.data;
|
|
385
|
+
if (elementData == null)
|
|
386
|
+
continue;
|
|
387
|
+
element2 = elementData;
|
|
388
|
+
} else {
|
|
389
|
+
element2 = current;
|
|
390
|
+
}
|
|
391
|
+
const elementDescriptors = descriptors$1.get(element2.type);
|
|
392
|
+
if (elementDescriptors == null)
|
|
393
|
+
continue;
|
|
394
|
+
getResourcesFromElementDescriptors(elementDescriptors, element2.props);
|
|
395
|
+
}
|
|
396
|
+
const typographiesResult = await client2.query({
|
|
397
|
+
query: TYPOGRAPHIES_BY_ID,
|
|
398
|
+
variables: { ids: [...typographyIds] }
|
|
399
|
+
});
|
|
400
|
+
(_c = typographiesResult == null ? void 0 : typographiesResult.data) == null ? void 0 : _c.typographies.forEach((typography) => {
|
|
401
|
+
typography.style.forEach((style2) => {
|
|
402
|
+
var _a2;
|
|
403
|
+
const swatchId = (_a2 = style2.value.color) == null ? void 0 : _a2.swatchId;
|
|
404
|
+
if (swatchId != null)
|
|
405
|
+
swatchIds.add(swatchId);
|
|
406
|
+
});
|
|
407
|
+
});
|
|
408
|
+
return {
|
|
409
|
+
swatchIds: [...swatchIds],
|
|
410
|
+
fileIds: [...fileIds],
|
|
411
|
+
typographyIds: [...typographyIds],
|
|
412
|
+
tableIds: [...tableIds],
|
|
413
|
+
pageIds: [...pageIds]
|
|
414
|
+
};
|
|
415
|
+
}
|
|
258
416
|
const typePolicies = {
|
|
259
417
|
Query: {
|
|
260
418
|
fields: {
|
|
@@ -342,10 +500,6 @@ const typePolicies = {
|
|
|
342
500
|
}
|
|
343
501
|
}
|
|
344
502
|
};
|
|
345
|
-
const PrefetchContext = React.createContext(false);
|
|
346
|
-
function useIsPrefetching() {
|
|
347
|
-
return React.useContext(PrefetchContext);
|
|
348
|
-
}
|
|
349
503
|
function createApolloClient({
|
|
350
504
|
uri,
|
|
351
505
|
cacheData
|
|
@@ -356,7 +510,10 @@ function createApolloClient({
|
|
|
356
510
|
if (cacheData)
|
|
357
511
|
cache.restore(cacheData);
|
|
358
512
|
return new client.ApolloClient({
|
|
359
|
-
|
|
513
|
+
link: new batchHttp.BatchHttpLink({
|
|
514
|
+
uri,
|
|
515
|
+
batchMax: 100
|
|
516
|
+
}),
|
|
360
517
|
cache
|
|
361
518
|
});
|
|
362
519
|
}
|
|
@@ -372,17 +529,20 @@ class MakeswiftClient {
|
|
|
372
529
|
});
|
|
373
530
|
}
|
|
374
531
|
async prefetch(element) {
|
|
375
|
-
const
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
532
|
+
const introspectionData = await introspect(element, this.apolloClient, storeContextDefaultValue);
|
|
533
|
+
const res = await this.apolloClient.query({
|
|
534
|
+
query: INTROSPECTION_QUERY,
|
|
535
|
+
variables: introspectionData
|
|
536
|
+
});
|
|
537
|
+
res.data.pagePathnamesById.forEach((pagePathnameSlice) => {
|
|
538
|
+
const id = Buffer.from(`Page:${pagePathnameSlice.id}`).toString("base64");
|
|
539
|
+
this.apolloClient.cache.writeFragment({
|
|
540
|
+
fragment: graphql.PagePathnameSliceFragmentDoc,
|
|
541
|
+
data: __spreadProps(__spreadValues({}, pagePathnameSlice), {
|
|
542
|
+
id
|
|
383
543
|
})
|
|
384
|
-
})
|
|
385
|
-
})
|
|
544
|
+
});
|
|
545
|
+
});
|
|
386
546
|
slate.KeyUtils.resetGenerator();
|
|
387
547
|
return this.apolloClient.cache.extract();
|
|
388
548
|
}
|
|
@@ -664,10 +824,12 @@ const getDeviceMediaQuery = (device) => {
|
|
|
664
824
|
}
|
|
665
825
|
return parts.join(" and ");
|
|
666
826
|
};
|
|
827
|
+
const isSSR = typeof window === "undefined" || /ServerSideRendering/.test(window.navigator && window.navigator.userAgent);
|
|
828
|
+
const useIsomorphicLayoutEffect = isSSR ? React.useEffect : React.useLayoutEffect;
|
|
667
829
|
function useMediaQuery(responsiveValue) {
|
|
668
830
|
const [deviceId, setDeviceId] = React.useState(DEVICES[0].id);
|
|
669
831
|
const { value } = findDeviceOverride(responsiveValue, deviceId) || {};
|
|
670
|
-
|
|
832
|
+
useIsomorphicLayoutEffect(() => {
|
|
671
833
|
if (responsiveValue == null || window == null)
|
|
672
834
|
return () => {
|
|
673
835
|
};
|
|
@@ -1182,7 +1344,7 @@ function Parallax(_g2) {
|
|
|
1182
1344
|
const container = React.useRef(null);
|
|
1183
1345
|
const [containerScrollTop, setContainerScrollTop] = React.useState(strength == null ? 0 : strength);
|
|
1184
1346
|
const lastScrollParentScrollTop = React.useRef(0);
|
|
1185
|
-
|
|
1347
|
+
useIsomorphicLayoutEffect(() => {
|
|
1186
1348
|
if (!container.current || strength == null || strength === 0)
|
|
1187
1349
|
return void 0;
|
|
1188
1350
|
const containerDocument = container.current.ownerDocument;
|
|
@@ -1296,7 +1458,7 @@ function BackgroundVideo({
|
|
|
1296
1458
|
const [ready, setReady] = React.useState(false);
|
|
1297
1459
|
const [scale, setScale] = React.useState(1);
|
|
1298
1460
|
const container = React.useRef(null);
|
|
1299
|
-
|
|
1461
|
+
useIsomorphicLayoutEffect(() => {
|
|
1300
1462
|
const {
|
|
1301
1463
|
current: containerEl
|
|
1302
1464
|
} = container;
|
|
@@ -1403,9 +1565,6 @@ const BackgroundsContainer$1 = styled__default["default"](Container$c)`
|
|
|
1403
1565
|
function Backgrounds({
|
|
1404
1566
|
backgrounds
|
|
1405
1567
|
}) {
|
|
1406
|
-
const isPrefetching = useIsPrefetching();
|
|
1407
|
-
if (isPrefetching)
|
|
1408
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
1409
1568
|
if (backgrounds == null)
|
|
1410
1569
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
1411
1570
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
@@ -1540,7 +1699,9 @@ var BackgroundsContainer = React.forwardRef(function BackgroundsContainer2(_i, r
|
|
|
1540
1699
|
}), React.Children.only(children)]
|
|
1541
1700
|
}));
|
|
1542
1701
|
});
|
|
1543
|
-
const StyledBackgroundsContainer = styled__default["default"](BackgroundsContainer)
|
|
1702
|
+
const StyledBackgroundsContainer = styled__default["default"](BackgroundsContainer).withConfig({
|
|
1703
|
+
shouldForwardProp: (prop) => !["margin", "borderRadius", "alignSelf"].includes(prop.toString())
|
|
1704
|
+
})`
|
|
1544
1705
|
display: flex;
|
|
1545
1706
|
${cssMargin()}
|
|
1546
1707
|
${cssBorderRadius()}
|
|
@@ -1548,7 +1709,9 @@ const StyledBackgroundsContainer = styled__default["default"](BackgroundsContain
|
|
|
1548
1709
|
alignSelf
|
|
1549
1710
|
}))}
|
|
1550
1711
|
`;
|
|
1551
|
-
const Grid$1 = styled__default["default"](framerMotion.motion.div)
|
|
1712
|
+
const Grid$1 = styled__default["default"](framerMotion.motion.div).withConfig({
|
|
1713
|
+
shouldForwardProp: (prop) => !["padding", "border", "boxShadow", "alignContent"].includes(prop)
|
|
1714
|
+
})`
|
|
1552
1715
|
display: flex;
|
|
1553
1716
|
flex-wrap: wrap;
|
|
1554
1717
|
width: 100%;
|
|
@@ -1559,7 +1722,9 @@ const Grid$1 = styled__default["default"](framerMotion.motion.div)`
|
|
|
1559
1722
|
alignContent
|
|
1560
1723
|
}))}
|
|
1561
1724
|
`;
|
|
1562
|
-
const GridItem$2 = styled__default["default"](framerMotion.motion.div)
|
|
1725
|
+
const GridItem$2 = styled__default["default"](framerMotion.motion.div).withConfig({
|
|
1726
|
+
shouldForwardProp: (prop) => !["grid", "alignItems", "index", "columnGap", "rowGap"].includes(prop)
|
|
1727
|
+
})`
|
|
1563
1728
|
display: flex;
|
|
1564
1729
|
|
|
1565
1730
|
/* IE11 doesn't recognize space-between and treats it as stretch, so we fall back to flex-start */
|
|
@@ -1987,7 +2152,9 @@ function responsiveWidth(widthData, defaultValue = "100%") {
|
|
|
1987
2152
|
width: typeof width === "object" ? `${width.value}${width.unit}` : width
|
|
1988
2153
|
})));
|
|
1989
2154
|
}
|
|
1990
|
-
const StyledButton$1 = styled__default["default"](Link)
|
|
2155
|
+
const StyledButton$1 = styled__default["default"](Link).withConfig({
|
|
2156
|
+
shouldForwardProp: (prop) => !["margin", "variant", "shape", "size", "textColor", "color", "textStyle"].includes(prop.toString())
|
|
2157
|
+
})`
|
|
1991
2158
|
display: table;
|
|
1992
2159
|
border: 0;
|
|
1993
2160
|
outline: 0;
|
|
@@ -1997,7 +2164,7 @@ const StyledButton$1 = styled__default["default"](Link)`
|
|
|
1997
2164
|
text-decoration: none;
|
|
1998
2165
|
text-align: center;
|
|
1999
2166
|
${cssMargin()}
|
|
2000
|
-
${(p) => cssMediaRules([p.variant, p.shape, p.size, p.textColor, p.color], ([variant = "flat",
|
|
2167
|
+
${(p) => cssMediaRules([p.variant, p.shape, p.size, p.textColor, p.color], ([variant = "flat", shape2 = "rounded", size = "medium", textColor = {
|
|
2001
2168
|
swatch: {
|
|
2002
2169
|
hue: 0,
|
|
2003
2170
|
saturation: 0,
|
|
@@ -2026,14 +2193,13 @@ const StyledButton$1 = styled__default["default"](Link)`
|
|
|
2026
2193
|
square: 0,
|
|
2027
2194
|
rounded: 4,
|
|
2028
2195
|
pill: 500
|
|
2029
|
-
}[
|
|
2196
|
+
}[shape2]}px;
|
|
2030
2197
|
padding: ${{
|
|
2031
2198
|
small: "8px 12px",
|
|
2032
2199
|
medium: "12px 16px",
|
|
2033
2200
|
large: "16px 20px"
|
|
2034
2201
|
}[size]};
|
|
2035
2202
|
font-size: ${`${fontSize.value}${fontSize.unit}`};
|
|
2036
|
-
|
|
2037
2203
|
${{
|
|
2038
2204
|
flat: styled.css`
|
|
2039
2205
|
background: ${colorToString(color)};
|
|
@@ -2176,7 +2342,7 @@ const StyledButton$1 = styled__default["default"](Link)`
|
|
|
2176
2342
|
}[variant]}
|
|
2177
2343
|
`;
|
|
2178
2344
|
})}
|
|
2179
|
-
|
|
2345
|
+
${cssTextStyle()}
|
|
2180
2346
|
`;
|
|
2181
2347
|
const Button$1 = React.forwardRef(function Button2(_m, ref) {
|
|
2182
2348
|
var _n = _m, {
|
|
@@ -2184,7 +2350,7 @@ const Button$1 = React.forwardRef(function Button2(_m, ref) {
|
|
|
2184
2350
|
children,
|
|
2185
2351
|
link,
|
|
2186
2352
|
variant,
|
|
2187
|
-
shape,
|
|
2353
|
+
shape: shape2,
|
|
2188
2354
|
size,
|
|
2189
2355
|
textColor,
|
|
2190
2356
|
color,
|
|
@@ -2213,7 +2379,7 @@ const Button$1 = React.forwardRef(function Button2(_m, ref) {
|
|
|
2213
2379
|
color,
|
|
2214
2380
|
link,
|
|
2215
2381
|
margin,
|
|
2216
|
-
shape,
|
|
2382
|
+
shape: shape2,
|
|
2217
2383
|
size,
|
|
2218
2384
|
textColor,
|
|
2219
2385
|
textStyle,
|
|
@@ -2331,10 +2497,10 @@ const placeholders = {
|
|
|
2331
2497
|
};
|
|
2332
2498
|
function loadImage(src) {
|
|
2333
2499
|
return new Promise((resolve, reject) => {
|
|
2334
|
-
const
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2500
|
+
const image2 = new Image();
|
|
2501
|
+
image2.onload = () => resolve(image2);
|
|
2502
|
+
image2.onerror = reject;
|
|
2503
|
+
image2.src = src;
|
|
2338
2504
|
});
|
|
2339
2505
|
}
|
|
2340
2506
|
function imageSizes(width) {
|
|
@@ -2348,7 +2514,9 @@ function imageSizes(width) {
|
|
|
2348
2514
|
return `(max-width: ${device.maxWidth}px) ${Math.min(device.maxWidth, override.value.value)}px`;
|
|
2349
2515
|
}).filter((size) => size != null).reduce((sourceSizes, sourceSize) => `${sourceSize}, ${sourceSizes}`, baseWidthSize);
|
|
2350
2516
|
}
|
|
2351
|
-
const ImageContainer = styled__default["default"].div
|
|
2517
|
+
const ImageContainer = styled__default["default"].div.withConfig({
|
|
2518
|
+
shouldForwardProp: (prop) => !["margin", "padding", "border", "borderRadius", "boxShadow", "opacity", "dimensions"].includes(prop.toString())
|
|
2519
|
+
})`
|
|
2352
2520
|
line-height: 0;
|
|
2353
2521
|
overflow: hidden;
|
|
2354
2522
|
${cssMargin()}
|
|
@@ -2385,16 +2553,15 @@ const ImageComponent = React.forwardRef(function Image2({
|
|
|
2385
2553
|
const dataDimensions = (fileData == null ? void 0 : fileData.publicUrl) ? fileData == null ? void 0 : fileData.dimensions : placeholder2.dimensions;
|
|
2386
2554
|
const [measuredDimensions, setMeasuredDimensions] = React.useState(null);
|
|
2387
2555
|
const isInBuilder = useIsInBuilder();
|
|
2388
|
-
const isPrefetching = useIsPrefetching();
|
|
2389
2556
|
React.useEffect(() => {
|
|
2390
2557
|
if (dataDimensions)
|
|
2391
2558
|
return;
|
|
2392
2559
|
let cleanedUp = false;
|
|
2393
|
-
loadImage(imageSrc).then((
|
|
2560
|
+
loadImage(imageSrc).then((image2) => {
|
|
2394
2561
|
if (!cleanedUp) {
|
|
2395
2562
|
setMeasuredDimensions({
|
|
2396
|
-
width:
|
|
2397
|
-
height:
|
|
2563
|
+
width: image2.naturalWidth,
|
|
2564
|
+
height: image2.naturalHeight
|
|
2398
2565
|
});
|
|
2399
2566
|
}
|
|
2400
2567
|
}).catch(console.error);
|
|
@@ -2406,8 +2573,6 @@ const ImageComponent = React.forwardRef(function Image2({
|
|
|
2406
2573
|
if (!dimensions)
|
|
2407
2574
|
return null;
|
|
2408
2575
|
const widthClass = css.css(responsiveWidth(width, `${dimensions.width}px`));
|
|
2409
|
-
if (isPrefetching)
|
|
2410
|
-
return null;
|
|
2411
2576
|
return /* @__PURE__ */ jsxRuntime.jsx(ImageContainer, {
|
|
2412
2577
|
as: link ? Link : "div",
|
|
2413
2578
|
link,
|
|
@@ -2486,7 +2651,9 @@ const Container$b = styled__default["default"].div`
|
|
|
2486
2651
|
position: relative;
|
|
2487
2652
|
height: 100%;
|
|
2488
2653
|
`;
|
|
2489
|
-
const Wrapper = styled__default["default"].div
|
|
2654
|
+
const Wrapper = styled__default["default"].div.withConfig({
|
|
2655
|
+
shouldForwardProp: (prop) => !["margin"].includes(prop)
|
|
2656
|
+
})`
|
|
2490
2657
|
position: relative;
|
|
2491
2658
|
display: flex;
|
|
2492
2659
|
flex-direction: column;
|
|
@@ -2496,7 +2663,9 @@ const Wrapper = styled__default["default"].div`
|
|
|
2496
2663
|
outline: 0;
|
|
2497
2664
|
}
|
|
2498
2665
|
`;
|
|
2499
|
-
const Arrow = styled__default["default"].div
|
|
2666
|
+
const Arrow = styled__default["default"].div.withConfig({
|
|
2667
|
+
shouldForwardProp: (prop) => !["background"].includes(prop)
|
|
2668
|
+
})`
|
|
2500
2669
|
padding: 10px;
|
|
2501
2670
|
border-radius: 50%;
|
|
2502
2671
|
outline: 0;
|
|
@@ -2524,7 +2693,9 @@ const Arrow = styled__default["default"].div`
|
|
|
2524
2693
|
stroke: currentColor;
|
|
2525
2694
|
}
|
|
2526
2695
|
`;
|
|
2527
|
-
const Slop = styled__default["default"].div
|
|
2696
|
+
const Slop = styled__default["default"].div.withConfig({
|
|
2697
|
+
shouldForwardProp: (prop) => !["color"].includes(prop)
|
|
2698
|
+
})`
|
|
2528
2699
|
position: absolute;
|
|
2529
2700
|
top: 0;
|
|
2530
2701
|
bottom: 0;
|
|
@@ -2543,7 +2714,9 @@ const Slop = styled__default["default"].div`
|
|
|
2543
2714
|
color: ${colorToString(color)};
|
|
2544
2715
|
`)}
|
|
2545
2716
|
`;
|
|
2546
|
-
const Slide = styled__default["default"](framerMotion.motion.div)
|
|
2717
|
+
const Slide = styled__default["default"](framerMotion.motion.div).withConfig({
|
|
2718
|
+
shouldForwardProp: (prop) => !["pageSize", "alignItems"].includes(prop)
|
|
2719
|
+
})`
|
|
2547
2720
|
display: flex;
|
|
2548
2721
|
${(p) => cssMediaRules([p.pageSize], ([pageSize = 1]) => styled.css`
|
|
2549
2722
|
flex-basis: ${100 / pageSize}%;
|
|
@@ -2555,7 +2728,9 @@ const Slide = styled__default["default"](framerMotion.motion.div)`
|
|
|
2555
2728
|
alignItems
|
|
2556
2729
|
}))}
|
|
2557
2730
|
`;
|
|
2558
|
-
const Reel = styled__default["default"](framerMotion.motion.div)
|
|
2731
|
+
const Reel = styled__default["default"](framerMotion.motion.div).withConfig({
|
|
2732
|
+
shouldForwardProp: (prop) => !["gap"].includes(prop)
|
|
2733
|
+
})`
|
|
2559
2734
|
display: flex;
|
|
2560
2735
|
position: relative;
|
|
2561
2736
|
flex-wrap: nowrap;
|
|
@@ -2574,7 +2749,9 @@ const Page$1 = styled__default["default"](framerMotion.motion.div)`
|
|
|
2574
2749
|
position: relative;
|
|
2575
2750
|
width: 100%;
|
|
2576
2751
|
`;
|
|
2577
|
-
const LeftSlop = styled__default["default"](Slop)
|
|
2752
|
+
const LeftSlop = styled__default["default"](Slop).withConfig({
|
|
2753
|
+
shouldForwardProp: (prop) => !["position"].includes(prop)
|
|
2754
|
+
})`
|
|
2578
2755
|
${(p) => cssMediaRules([p.position], ([position = "inside"]) => {
|
|
2579
2756
|
switch (position) {
|
|
2580
2757
|
case "inside":
|
|
@@ -2599,7 +2776,9 @@ const LeftSlop = styled__default["default"](Slop)`
|
|
|
2599
2776
|
}
|
|
2600
2777
|
}
|
|
2601
2778
|
`;
|
|
2602
|
-
const RightSlop = styled__default["default"](Slop)
|
|
2779
|
+
const RightSlop = styled__default["default"](Slop).withConfig({
|
|
2780
|
+
shouldForwardProp: (prop) => !["position"].includes(prop)
|
|
2781
|
+
})`
|
|
2603
2782
|
${(p) => cssMediaRules([p.position], ([position = "inside"]) => {
|
|
2604
2783
|
switch (position) {
|
|
2605
2784
|
case "inside":
|
|
@@ -2627,7 +2806,9 @@ const RightSlop = styled__default["default"](Slop)`
|
|
|
2627
2806
|
const ClipMask = styled__default["default"].div`
|
|
2628
2807
|
overflow: hidden;
|
|
2629
2808
|
`;
|
|
2630
|
-
const Dots = styled__default["default"].div
|
|
2809
|
+
const Dots = styled__default["default"].div.withConfig({
|
|
2810
|
+
shouldForwardProp: (prop) => !["color"].includes(prop)
|
|
2811
|
+
})`
|
|
2631
2812
|
display: ${(props) => props.hidden ? "none" : "flex"};
|
|
2632
2813
|
justify-content: center;
|
|
2633
2814
|
margin-top: 20px;
|
|
@@ -2642,7 +2823,9 @@ const Dots = styled__default["default"].div`
|
|
|
2642
2823
|
color: ${colorToString(color)};
|
|
2643
2824
|
`)}
|
|
2644
2825
|
`;
|
|
2645
|
-
const Dot = styled__default["default"].div
|
|
2826
|
+
const Dot = styled__default["default"].div.withConfig({
|
|
2827
|
+
shouldForwardProp: (prop) => !["active"].includes(prop)
|
|
2828
|
+
})`
|
|
2646
2829
|
position: relative;
|
|
2647
2830
|
margin: 0 6px;
|
|
2648
2831
|
border-radius: 50%;
|
|
@@ -3002,7 +3185,9 @@ const Segment = styled__default["default"].div`
|
|
|
3002
3185
|
flex: 1;
|
|
3003
3186
|
text-align: center;
|
|
3004
3187
|
`;
|
|
3005
|
-
const Container$a = styled__default["default"].div
|
|
3188
|
+
const Container$a = styled__default["default"].div.withConfig({
|
|
3189
|
+
shouldForwardProp: (prop) => !["margin", "variant", "size", "shape", "gap", "labelColor", "numberFont", "numberColor", "blockColor", "labelFont"].includes(prop)
|
|
3190
|
+
})`
|
|
3006
3191
|
display: flex;
|
|
3007
3192
|
${cssMargin()}
|
|
3008
3193
|
${(p) => cssMediaRules([p.size], ([size = "medium"]) => {
|
|
@@ -3049,8 +3234,8 @@ const Container$a = styled__default["default"].div`
|
|
|
3049
3234
|
}
|
|
3050
3235
|
|
|
3051
3236
|
${Block$1} {
|
|
3052
|
-
${(p) => cssMediaRules([p.shape], ([
|
|
3053
|
-
switch (
|
|
3237
|
+
${(p) => cssMediaRules([p.shape], ([shape2 = "rounded"]) => {
|
|
3238
|
+
switch (shape2) {
|
|
3054
3239
|
case "pill":
|
|
3055
3240
|
return styled.css`
|
|
3056
3241
|
border-radius: 500px;
|
|
@@ -3098,7 +3283,7 @@ const Container$a = styled__default["default"].div`
|
|
|
3098
3283
|
z-index: 1;
|
|
3099
3284
|
}
|
|
3100
3285
|
|
|
3101
|
-
|
|
3286
|
+
::before {
|
|
3102
3287
|
content: '';
|
|
3103
3288
|
position: absolute;
|
|
3104
3289
|
top: 0;
|
|
@@ -3110,7 +3295,7 @@ const Container$a = styled__default["default"].div`
|
|
|
3110
3295
|
background: ${colorToString(blockColor)};
|
|
3111
3296
|
}
|
|
3112
3297
|
|
|
3113
|
-
|
|
3298
|
+
::after {
|
|
3114
3299
|
content: '';
|
|
3115
3300
|
position: absolute;
|
|
3116
3301
|
left: 0;
|
|
@@ -3141,7 +3326,7 @@ const Container$a = styled__default["default"].div`
|
|
|
3141
3326
|
z-index: 1;
|
|
3142
3327
|
}
|
|
3143
3328
|
|
|
3144
|
-
|
|
3329
|
+
::before {
|
|
3145
3330
|
content: '';
|
|
3146
3331
|
position: absolute;
|
|
3147
3332
|
top: 50%;
|
|
@@ -3216,7 +3401,7 @@ const Countdown = React.forwardRef(function Countdown2({
|
|
|
3216
3401
|
date,
|
|
3217
3402
|
variant,
|
|
3218
3403
|
size,
|
|
3219
|
-
shape,
|
|
3404
|
+
shape: shape2,
|
|
3220
3405
|
gap,
|
|
3221
3406
|
labelColor,
|
|
3222
3407
|
labelFont,
|
|
@@ -3248,7 +3433,7 @@ const Countdown = React.forwardRef(function Countdown2({
|
|
|
3248
3433
|
margin,
|
|
3249
3434
|
variant,
|
|
3250
3435
|
size,
|
|
3251
|
-
shape,
|
|
3436
|
+
shape: shape2,
|
|
3252
3437
|
labelColor,
|
|
3253
3438
|
labelFont,
|
|
3254
3439
|
numberColor,
|
|
@@ -3421,7 +3606,9 @@ function registerComponent$8(runtime) {
|
|
|
3421
3606
|
}
|
|
3422
3607
|
});
|
|
3423
3608
|
}
|
|
3424
|
-
const IE11MinHeightContainer = styled__default["default"].div
|
|
3609
|
+
const IE11MinHeightContainer = styled__default["default"].div.withConfig({
|
|
3610
|
+
shouldForwardProp: (prop) => !["margin"].includes(prop)
|
|
3611
|
+
})`
|
|
3425
3612
|
display: flex;
|
|
3426
3613
|
width: 100%;
|
|
3427
3614
|
${cssMargin()}
|
|
@@ -3433,7 +3620,9 @@ const Container$9 = styled__default["default"].div`
|
|
|
3433
3620
|
min-height: 40px;
|
|
3434
3621
|
width: 100%;
|
|
3435
3622
|
`;
|
|
3436
|
-
const Line = styled__default["default"].div
|
|
3623
|
+
const Line = styled__default["default"].div.withConfig({
|
|
3624
|
+
shouldForwardProp: (prop) => !["variant", "color", "thickness"].includes(prop)
|
|
3625
|
+
})`
|
|
3437
3626
|
${(p) => cssMediaRules([p.variant, p.thickness, p.color], ([variant = "solid", thickness = {
|
|
3438
3627
|
value: 1,
|
|
3439
3628
|
unit: "px"
|
|
@@ -3545,7 +3734,9 @@ function registerComponent$7(runtime) {
|
|
|
3545
3734
|
}
|
|
3546
3735
|
});
|
|
3547
3736
|
}
|
|
3548
|
-
const Container$8 = styled__default["default"].div
|
|
3737
|
+
const Container$8 = styled__default["default"].div.withConfig({
|
|
3738
|
+
shouldForwardProp: (prop) => !["margin"].includes(prop)
|
|
3739
|
+
})`
|
|
3549
3740
|
min-height: 15px;
|
|
3550
3741
|
${cssMargin()}
|
|
3551
3742
|
`;
|
|
@@ -3581,7 +3772,7 @@ const Embed = React.forwardRef(function Embed2({
|
|
|
3581
3772
|
}, ref) {
|
|
3582
3773
|
const [container, setContainer] = React.useState(null);
|
|
3583
3774
|
const [shouldRender, setShouldRender] = React.useState(false);
|
|
3584
|
-
|
|
3775
|
+
useIsomorphicLayoutEffect(() => {
|
|
3585
3776
|
setShouldRender(true);
|
|
3586
3777
|
}, []);
|
|
3587
3778
|
React.useImperativeHandle(ref, () => container, [container]);
|
|
@@ -3734,8 +3925,8 @@ function getSizeVerticalPadding(size) {
|
|
|
3734
3925
|
throw new Error(`Invalid form size "${size}"`);
|
|
3735
3926
|
}
|
|
3736
3927
|
}
|
|
3737
|
-
function getShapeBorderRadius(
|
|
3738
|
-
switch (
|
|
3928
|
+
function getShapeBorderRadius(shape2) {
|
|
3929
|
+
switch (shape2) {
|
|
3739
3930
|
case Shapes.SQUARE:
|
|
3740
3931
|
return 0;
|
|
3741
3932
|
case Shapes.ROUNDED:
|
|
@@ -3743,7 +3934,7 @@ function getShapeBorderRadius(shape) {
|
|
|
3743
3934
|
case Shapes.PILL:
|
|
3744
3935
|
return 500;
|
|
3745
3936
|
default:
|
|
3746
|
-
throw new Error(`Invalid form shape "${
|
|
3937
|
+
throw new Error(`Invalid form shape "${shape2}"`);
|
|
3747
3938
|
}
|
|
3748
3939
|
}
|
|
3749
3940
|
function getContrastBorderColor(contrast, error) {
|
|
@@ -3795,13 +3986,13 @@ function cssField() {
|
|
|
3795
3986
|
border-style: solid;
|
|
3796
3987
|
transition: border-color 200ms;
|
|
3797
3988
|
${(props) => cssMediaRules([props.shape, props.size, props.contrast, props.brandColor], ([
|
|
3798
|
-
|
|
3989
|
+
shape2 = Shapes.ROUNDED,
|
|
3799
3990
|
size = Sizes.MEDIUM,
|
|
3800
3991
|
contrast = Contrasts.LIGHT,
|
|
3801
3992
|
brandColor = { swatch: { hue: 0, saturation: 0, lightness: 0 }, alpha: 1 }
|
|
3802
3993
|
]) => styled.css`
|
|
3803
3994
|
padding: ${getSizeVerticalPadding(size)}px ${getSizeHorizontalPadding(size)}px;
|
|
3804
|
-
border-radius: ${getShapeBorderRadius(
|
|
3995
|
+
border-radius: ${getShapeBorderRadius(shape2)}px;
|
|
3805
3996
|
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
3806
3997
|
color: ${getContrastColor$1(contrast)};
|
|
3807
3998
|
background-color: ${getContrastBackgroundColor(contrast)};
|
|
@@ -3829,7 +4020,9 @@ function getSizeHeight$1(size) {
|
|
|
3829
4020
|
throw new Error(`Invalid form size "${size}"`);
|
|
3830
4021
|
}
|
|
3831
4022
|
}
|
|
3832
|
-
const Base$2 = styled__default["default"].input
|
|
4023
|
+
const Base$2 = styled__default["default"].input.withConfig({
|
|
4024
|
+
shouldForwardProp: (prop, defaultValidator) => !["shape", "size", "contrast", "brandColor", "error"].includes(prop.toString()) && defaultValidator(prop)
|
|
4025
|
+
})`
|
|
3833
4026
|
${cssField()}
|
|
3834
4027
|
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => styled.css`
|
|
3835
4028
|
min-height: ${getSizeHeight$1(size)}px;
|
|
@@ -3845,7 +4038,7 @@ var Input$2 = React.forwardRef(function Input2(_o, ref) {
|
|
|
3845
4038
|
"form"
|
|
3846
4039
|
]);
|
|
3847
4040
|
const {
|
|
3848
|
-
shape,
|
|
4041
|
+
shape: shape2,
|
|
3849
4042
|
size,
|
|
3850
4043
|
contrast,
|
|
3851
4044
|
brandColor
|
|
@@ -3853,13 +4046,15 @@ var Input$2 = React.forwardRef(function Input2(_o, ref) {
|
|
|
3853
4046
|
return /* @__PURE__ */ jsxRuntime.jsx(Base$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3854
4047
|
ref,
|
|
3855
4048
|
error,
|
|
3856
|
-
shape,
|
|
4049
|
+
shape: shape2,
|
|
3857
4050
|
size,
|
|
3858
4051
|
contrast,
|
|
3859
4052
|
brandColor
|
|
3860
4053
|
}));
|
|
3861
4054
|
});
|
|
3862
|
-
const Container$7 = styled__default["default"].div
|
|
4055
|
+
const Container$7 = styled__default["default"].div.withConfig({
|
|
4056
|
+
shouldForwardProp: (prop) => !["width", "margin"].includes(prop.toString())
|
|
4057
|
+
})`
|
|
3863
4058
|
display: flex;
|
|
3864
4059
|
flex-direction: column;
|
|
3865
4060
|
${cssMargin()};
|
|
@@ -3943,7 +4138,9 @@ function getContrastColor(contrast) {
|
|
|
3943
4138
|
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3944
4139
|
}
|
|
3945
4140
|
}
|
|
3946
|
-
const Base$1 = styled__default["default"].label
|
|
4141
|
+
const Base$1 = styled__default["default"].label.withConfig({
|
|
4142
|
+
shouldForwardProp: (prop, defaultValidator) => !["contrast", "size", "textStyle", "textColor"].includes(prop.toString()) && defaultValidator(prop)
|
|
4143
|
+
})`
|
|
3947
4144
|
display: block;
|
|
3948
4145
|
margin: 0 0 0.25em 0;
|
|
3949
4146
|
${cssTextStyle()}
|
|
@@ -3994,7 +4191,9 @@ var SingleLineTextTableField = React.forwardRef(function SingleLineTextTableFiel
|
|
|
3994
4191
|
}))]
|
|
3995
4192
|
});
|
|
3996
4193
|
});
|
|
3997
|
-
const Base = styled__default["default"].textarea
|
|
4194
|
+
const Base = styled__default["default"].textarea.withConfig({
|
|
4195
|
+
shouldForwardProp: (prop, defaultValidator) => !["error", "shape", "size", "contrast", "brandColor"].includes(prop.toString()) && defaultValidator(prop)
|
|
4196
|
+
})`
|
|
3998
4197
|
resize: vertical;
|
|
3999
4198
|
${cssField()}
|
|
4000
4199
|
`;
|
|
@@ -4007,7 +4206,7 @@ var TextArea = React.forwardRef(function TextArea2(_s, ref) {
|
|
|
4007
4206
|
"form"
|
|
4008
4207
|
]);
|
|
4009
4208
|
const {
|
|
4010
|
-
shape,
|
|
4209
|
+
shape: shape2,
|
|
4011
4210
|
size,
|
|
4012
4211
|
contrast,
|
|
4013
4212
|
brandColor
|
|
@@ -4016,7 +4215,7 @@ var TextArea = React.forwardRef(function TextArea2(_s, ref) {
|
|
|
4016
4215
|
ref,
|
|
4017
4216
|
rows: 4,
|
|
4018
4217
|
error,
|
|
4019
|
-
shape,
|
|
4218
|
+
shape: shape2,
|
|
4020
4219
|
size,
|
|
4021
4220
|
contrast,
|
|
4022
4221
|
brandColor
|
|
@@ -4060,14 +4259,18 @@ function getCheckmarkColor$1({
|
|
|
4060
4259
|
l
|
|
4061
4260
|
}).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
|
|
4062
4261
|
}
|
|
4063
|
-
const Container$6 = styled__default["default"].div
|
|
4262
|
+
const Container$6 = styled__default["default"].div.withConfig({
|
|
4263
|
+
shouldForwardProp: (prop) => !["size"].includes(prop)
|
|
4264
|
+
})`
|
|
4064
4265
|
position: relative;
|
|
4065
4266
|
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => styled.css`
|
|
4066
4267
|
height: ${getSizeHeight(size)}px;
|
|
4067
4268
|
width: ${getSizeHeight(size)}px;
|
|
4068
4269
|
`)}
|
|
4069
4270
|
`;
|
|
4070
|
-
const FakeCheckbox = styled__default["default"].div
|
|
4271
|
+
const FakeCheckbox = styled__default["default"].div.withConfig({
|
|
4272
|
+
shouldForwardProp: (prop) => !["contrast", "error"].includes(prop)
|
|
4273
|
+
})`
|
|
4071
4274
|
position: absolute;
|
|
4072
4275
|
width: 100%;
|
|
4073
4276
|
height: 100%;
|
|
@@ -4080,7 +4283,9 @@ const FakeCheckbox = styled__default["default"].div`
|
|
|
4080
4283
|
background-color: ${getContrastBackgroundColor(contrast)};
|
|
4081
4284
|
`)}
|
|
4082
4285
|
`;
|
|
4083
|
-
const HiddenCheckbox = styled__default["default"].input
|
|
4286
|
+
const HiddenCheckbox = styled__default["default"].input.withConfig({
|
|
4287
|
+
shouldForwardProp: (prop, defaultValidator) => !["size", "brandColor", "contrast", "error"].includes(prop) && defaultValidator(prop)
|
|
4288
|
+
})`
|
|
4084
4289
|
position: absolute;
|
|
4085
4290
|
opacity: 0;
|
|
4086
4291
|
width: 100%;
|
|
@@ -4323,14 +4528,18 @@ function getCheckmarkColor({
|
|
|
4323
4528
|
l
|
|
4324
4529
|
}).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
|
|
4325
4530
|
}
|
|
4326
|
-
const Container$5 = styled__default["default"].div
|
|
4531
|
+
const Container$5 = styled__default["default"].div.withConfig({
|
|
4532
|
+
shouldForwardProp: (prop) => !["size"].includes(prop.toString())
|
|
4533
|
+
})`
|
|
4327
4534
|
position: relative;
|
|
4328
4535
|
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => styled.css`
|
|
4329
4536
|
height: ${getSizeHeight(size)}px;
|
|
4330
4537
|
width: ${getSizeHeight(size)}px;
|
|
4331
4538
|
`)}
|
|
4332
4539
|
`;
|
|
4333
|
-
const FakeRadioButton = styled__default["default"].div
|
|
4540
|
+
const FakeRadioButton = styled__default["default"].div.withConfig({
|
|
4541
|
+
shouldForwardProp: (prop) => !["contrast", "error"].includes(prop.toString())
|
|
4542
|
+
})`
|
|
4334
4543
|
position: absolute;
|
|
4335
4544
|
width: 100%;
|
|
4336
4545
|
height: 100%;
|
|
@@ -4343,7 +4552,9 @@ const FakeRadioButton = styled__default["default"].div`
|
|
|
4343
4552
|
background-color: ${getContrastBackgroundColor(contrast)};
|
|
4344
4553
|
`)}
|
|
4345
4554
|
`;
|
|
4346
|
-
const HiddenRadioButton = styled__default["default"].input.
|
|
4555
|
+
const HiddenRadioButton = styled__default["default"].input.withConfig({
|
|
4556
|
+
shouldForwardProp: (prop) => !["brandColor", "contrast", "error"].includes(prop.toString())
|
|
4557
|
+
}).attrs({
|
|
4347
4558
|
type: "radio"
|
|
4348
4559
|
})`
|
|
4349
4560
|
position: absolute;
|
|
@@ -4508,7 +4719,9 @@ var TableColumnRadioButtonGroup = React.forwardRef(function TableColumnRadioButt
|
|
|
4508
4719
|
}, option.id))]
|
|
4509
4720
|
});
|
|
4510
4721
|
});
|
|
4511
|
-
const Container$4 = styled__default["default"].div
|
|
4722
|
+
const Container$4 = styled__default["default"].div.withConfig({
|
|
4723
|
+
shouldForwardProp: (prop) => !["error", "shape", "size", "contrast", "brandColor"].includes(prop.toString())
|
|
4724
|
+
})`
|
|
4512
4725
|
${cssField()}
|
|
4513
4726
|
display: flex;
|
|
4514
4727
|
align-items: center;
|
|
@@ -4564,7 +4777,7 @@ var TableColumnSingleSelect = React.forwardRef(function TableColumnSingleSelect2
|
|
|
4564
4777
|
"form"
|
|
4565
4778
|
]);
|
|
4566
4779
|
const {
|
|
4567
|
-
shape,
|
|
4780
|
+
shape: shape2,
|
|
4568
4781
|
size,
|
|
4569
4782
|
contrast,
|
|
4570
4783
|
brandColor
|
|
@@ -4575,7 +4788,7 @@ var TableColumnSingleSelect = React.forwardRef(function TableColumnSingleSelect2
|
|
|
4575
4788
|
children: label
|
|
4576
4789
|
}), /* @__PURE__ */ jsxRuntime.jsxs(Container$4, {
|
|
4577
4790
|
error,
|
|
4578
|
-
shape,
|
|
4791
|
+
shape: shape2,
|
|
4579
4792
|
size,
|
|
4580
4793
|
contrast,
|
|
4581
4794
|
brandColor,
|
|
@@ -4721,7 +4934,9 @@ var NumberTableField = React.forwardRef(function NumberTableField2(_Q, ref) {
|
|
|
4721
4934
|
}))]
|
|
4722
4935
|
});
|
|
4723
4936
|
});
|
|
4724
|
-
const Label = styled__default["default"].div
|
|
4937
|
+
const Label = styled__default["default"].div.withConfig({
|
|
4938
|
+
shouldForwardProp: (prop) => !["size"].includes(prop.toString())
|
|
4939
|
+
})`
|
|
4725
4940
|
display: block;
|
|
4726
4941
|
max-width: 120px;
|
|
4727
4942
|
min-width: 60px;
|
|
@@ -4734,29 +4949,31 @@ const Label = styled__default["default"].div`
|
|
|
4734
4949
|
max-height: ${0.5 * getSizeHeight(size)}px;
|
|
4735
4950
|
`)}
|
|
4736
4951
|
`;
|
|
4737
|
-
const Input = styled__default["default"].div
|
|
4952
|
+
const Input = styled__default["default"].div.withConfig({
|
|
4953
|
+
shouldForwardProp: (prop) => !["shape", "size"].includes(prop.toString())
|
|
4954
|
+
})`
|
|
4738
4955
|
display: block;
|
|
4739
4956
|
width: 100%;
|
|
4740
4957
|
border-width: 2px;
|
|
4741
4958
|
border-style: solid;
|
|
4742
4959
|
border-color: #5f49f4;
|
|
4743
4960
|
opacity: 0.4;
|
|
4744
|
-
${(props) => cssMediaRules([props.shape, props.size], ([
|
|
4961
|
+
${(props) => cssMediaRules([props.shape, props.size], ([shape2 = Shapes.ROUNDED, size = Sizes.MEDIUM]) => styled.css`
|
|
4745
4962
|
min-height: ${getSizeHeight$1(size)}px;
|
|
4746
4963
|
max-height: ${getSizeHeight$1(size)}px;
|
|
4747
|
-
border-radius: ${getShapeBorderRadius(
|
|
4964
|
+
border-radius: ${getShapeBorderRadius(shape2)}px;
|
|
4748
4965
|
`)}
|
|
4749
4966
|
`;
|
|
4750
4967
|
function PlaceholderTableField() {
|
|
4751
4968
|
const {
|
|
4752
4969
|
size,
|
|
4753
|
-
shape
|
|
4970
|
+
shape: shape2
|
|
4754
4971
|
} = useFormContext();
|
|
4755
4972
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4756
4973
|
children: [/* @__PURE__ */ jsxRuntime.jsx(Label, {
|
|
4757
4974
|
size
|
|
4758
4975
|
}), /* @__PURE__ */ jsxRuntime.jsx(Input, {
|
|
4759
|
-
shape,
|
|
4976
|
+
shape: shape2,
|
|
4760
4977
|
size
|
|
4761
4978
|
})]
|
|
4762
4979
|
});
|
|
@@ -4952,7 +5169,9 @@ const Alignments = {
|
|
|
4952
5169
|
CENTER: "center",
|
|
4953
5170
|
RIGHT: "right"
|
|
4954
5171
|
};
|
|
4955
|
-
const GridForm = styled__default["default"].form
|
|
5172
|
+
const GridForm = styled__default["default"].form.withConfig({
|
|
5173
|
+
shouldForwardProp: (prop) => !["size", "width", "margin"].includes(prop)
|
|
5174
|
+
})`
|
|
4956
5175
|
display: flex;
|
|
4957
5176
|
flex-wrap: wrap;
|
|
4958
5177
|
width: 100%;
|
|
@@ -4961,7 +5180,9 @@ const GridForm = styled__default["default"].form`
|
|
|
4961
5180
|
`)}
|
|
4962
5181
|
${cssMargin()}
|
|
4963
5182
|
`;
|
|
4964
|
-
const GridItem$1 = styled__default["default"].div
|
|
5183
|
+
const GridItem$1 = styled__default["default"].div.withConfig({
|
|
5184
|
+
shouldForwardProp: (prop) => !["grid", "index", "rowGap", "columnGap"].includes(prop)
|
|
5185
|
+
})`
|
|
4965
5186
|
align-self: flex-end;
|
|
4966
5187
|
flex-direction: column;
|
|
4967
5188
|
${cssGridItem()}
|
|
@@ -4978,7 +5199,9 @@ function getAlignmentMargin(alignment) {
|
|
|
4978
5199
|
}
|
|
4979
5200
|
const StyledButton = styled__default["default"]((props) => /* @__PURE__ */ jsxRuntime.jsx(Button$1, __spreadProps(__spreadValues({}, props), {
|
|
4980
5201
|
as: "button"
|
|
4981
|
-
})))
|
|
5202
|
+
}))).withConfig({
|
|
5203
|
+
shouldForwardProp: (prop) => !["alignment"].includes(prop.toString())
|
|
5204
|
+
})`
|
|
4982
5205
|
display: flex;
|
|
4983
5206
|
align-items: center;
|
|
4984
5207
|
justify-content: center;
|
|
@@ -5036,7 +5259,7 @@ const Form = React.forwardRef(function Form2({
|
|
|
5036
5259
|
fields: fieldsProp,
|
|
5037
5260
|
submitLabel = "Submit",
|
|
5038
5261
|
submitLink,
|
|
5039
|
-
shape,
|
|
5262
|
+
shape: shape2,
|
|
5040
5263
|
size,
|
|
5041
5264
|
contrast,
|
|
5042
5265
|
brandColor,
|
|
@@ -5178,7 +5401,7 @@ const Form = React.forwardRef(function Form2({
|
|
|
5178
5401
|
}, [fields, table]);
|
|
5179
5402
|
return /* @__PURE__ */ jsxRuntime.jsx(Provider, {
|
|
5180
5403
|
value: {
|
|
5181
|
-
shape,
|
|
5404
|
+
shape: shape2,
|
|
5182
5405
|
size,
|
|
5183
5406
|
contrast,
|
|
5184
5407
|
brandColor,
|
|
@@ -5235,7 +5458,7 @@ const Form = React.forwardRef(function Form2({
|
|
|
5235
5458
|
children: [/* @__PURE__ */ jsxRuntime.jsx(StyledButton, {
|
|
5236
5459
|
type: "submit",
|
|
5237
5460
|
disabled: formik$1.isSubmitting || isDone,
|
|
5238
|
-
shape,
|
|
5461
|
+
shape: shape2,
|
|
5239
5462
|
size,
|
|
5240
5463
|
color: brandColor,
|
|
5241
5464
|
variant: submitVariant,
|
|
@@ -5481,7 +5704,9 @@ const GutterContainer = styled__default["default"].div`
|
|
|
5481
5704
|
padding-right: ${p.last ? "0px" : `${gutter.value / 2}${gutter.unit}`};
|
|
5482
5705
|
`)}
|
|
5483
5706
|
`;
|
|
5484
|
-
const PlaceholderLink$1 = styled__default["default"].div
|
|
5707
|
+
const PlaceholderLink$1 = styled__default["default"].div.withConfig({
|
|
5708
|
+
shouldForwardProp: (prop) => !["width", "button"].includes(prop.toString())
|
|
5709
|
+
})`
|
|
5485
5710
|
width: ${(props) => props.width}px;
|
|
5486
5711
|
height: ${(props) => props.button === true ? 32 : 8}px;
|
|
5487
5712
|
background-color: #a1a8c2;
|
|
@@ -5609,7 +5834,9 @@ var SvgChevronDown8 = function SvgChevronDown82(props) {
|
|
|
5609
5834
|
})));
|
|
5610
5835
|
};
|
|
5611
5836
|
const DROP_DOWN_MENU_WIDTH = 200;
|
|
5612
|
-
const DropDownMenu$1 = styled__default["default"].div
|
|
5837
|
+
const DropDownMenu$1 = styled__default["default"].div.withConfig({
|
|
5838
|
+
shouldForwardProp: (prop) => !["position"].includes(prop.toString())
|
|
5839
|
+
})`
|
|
5613
5840
|
position: absolute;
|
|
5614
5841
|
top: 100%;
|
|
5615
5842
|
left: ${(props) => props.position === "left" ? 0 : "auto"};
|
|
@@ -5646,7 +5873,9 @@ const DropDownContainer = styled__default["default"].div`
|
|
|
5646
5873
|
animation: ${dropIn} 0.25s;
|
|
5647
5874
|
}
|
|
5648
5875
|
`;
|
|
5649
|
-
const StyledDropDownItem = styled__default["default"](Link)
|
|
5876
|
+
const StyledDropDownItem = styled__default["default"](Link).withConfig({
|
|
5877
|
+
shouldForwardProp: (prop) => !["color", "textStyle"].includes(prop.toString())
|
|
5878
|
+
})`
|
|
5650
5879
|
display: block;
|
|
5651
5880
|
text-decoration: none;
|
|
5652
5881
|
line-height: 1.4;
|
|
@@ -5704,7 +5933,7 @@ function DropDownButton(_U) {
|
|
|
5704
5933
|
]);
|
|
5705
5934
|
const container = React.useRef(null);
|
|
5706
5935
|
const [position, setPosition] = React.useState("left");
|
|
5707
|
-
|
|
5936
|
+
useIsomorphicLayoutEffect(() => {
|
|
5708
5937
|
if (container.current && container.current.ownerDocument.defaultView.innerWidth < container.current.offsetLeft + DROP_DOWN_MENU_WIDTH) {
|
|
5709
5938
|
setPosition("right");
|
|
5710
5939
|
} else {
|
|
@@ -5771,7 +6000,9 @@ var SvgTimes16 = function SvgTimes162(props) {
|
|
|
5771
6000
|
d: "M13.707 3.707a1 1 0 0 0-1.414-1.414L8 6.586 3.707 2.293a1 1 0 0 0-1.414 1.414L6.586 8l-4.293 4.293a1 1 0 1 0 1.414 1.414L8 9.414l4.293 4.293a1 1 0 0 0 1.414-1.414L9.414 8l4.293-4.293Z"
|
|
5772
6001
|
})));
|
|
5773
6002
|
};
|
|
5774
|
-
const DropDownMenu = styled__default["default"].div
|
|
6003
|
+
const DropDownMenu = styled__default["default"].div.withConfig({
|
|
6004
|
+
shouldForwardProp: (prop) => !["open"].includes(prop.toString())
|
|
6005
|
+
})`
|
|
5775
6006
|
display: ${(props) => props.open ? "flex" : "none"};
|
|
5776
6007
|
flex-direction: column;
|
|
5777
6008
|
padding: 8px;
|
|
@@ -5779,7 +6010,9 @@ const DropDownMenu = styled__default["default"].div`
|
|
|
5779
6010
|
const ButtonLink$1 = styled__default["default"](Button$1)`
|
|
5780
6011
|
margin: 8px 0;
|
|
5781
6012
|
`;
|
|
5782
|
-
const StyledLink$2 = styled__default["default"](Link)
|
|
6013
|
+
const StyledLink$2 = styled__default["default"](Link).withConfig({
|
|
6014
|
+
shouldForwardProp: (prop) => !["textStyle", "color"].includes(prop.toString())
|
|
6015
|
+
})`
|
|
5783
6016
|
text-decoration: none;
|
|
5784
6017
|
line-height: 1.4;
|
|
5785
6018
|
padding: 8px 16px;
|
|
@@ -5870,7 +6103,9 @@ function NavigationButton$1(props) {
|
|
|
5870
6103
|
const ButtonLink = styled__default["default"](NavigationButton$1)`
|
|
5871
6104
|
margin: 8px 0;
|
|
5872
6105
|
`;
|
|
5873
|
-
const Container$3 = styled__default["default"].div
|
|
6106
|
+
const Container$3 = styled__default["default"].div.withConfig({
|
|
6107
|
+
shouldForwardProp: (prop) => !["animation", "backgroundColor", "open"].includes(prop.toString())
|
|
6108
|
+
})`
|
|
5874
6109
|
position: fixed;
|
|
5875
6110
|
flex-direction: column;
|
|
5876
6111
|
width: 100%;
|
|
@@ -5902,7 +6137,9 @@ const Container$3 = styled__default["default"].div`
|
|
|
5902
6137
|
}[animation]}
|
|
5903
6138
|
`)}
|
|
5904
6139
|
`;
|
|
5905
|
-
const CloseIconContainer = styled__default["default"].button
|
|
6140
|
+
const CloseIconContainer = styled__default["default"].button.withConfig({
|
|
6141
|
+
shouldForwardProp: (prop) => !["color"].includes(prop.toString())
|
|
6142
|
+
})`
|
|
5906
6143
|
position: absolute;
|
|
5907
6144
|
top: 15px;
|
|
5908
6145
|
right: 15px;
|
|
@@ -5950,7 +6187,9 @@ function MobileMenu({
|
|
|
5950
6187
|
})]
|
|
5951
6188
|
});
|
|
5952
6189
|
}
|
|
5953
|
-
const Container$2 = styled__default["default"].nav
|
|
6190
|
+
const Container$2 = styled__default["default"].nav.withConfig({
|
|
6191
|
+
shouldForwardProp: (prop) => !["margin", "textStyle", "gutter"].includes(prop.toString())
|
|
6192
|
+
})`
|
|
5954
6193
|
display: flex;
|
|
5955
6194
|
align-items: center;
|
|
5956
6195
|
${cssMargin()}
|
|
@@ -5962,7 +6201,9 @@ const Container$2 = styled__default["default"].nav`
|
|
|
5962
6201
|
gap: ${gutter.value}${gutter.unit};
|
|
5963
6202
|
`)}
|
|
5964
6203
|
`;
|
|
5965
|
-
const LinksContainer = styled__default["default"].div
|
|
6204
|
+
const LinksContainer = styled__default["default"].div.withConfig({
|
|
6205
|
+
shouldForwardProp: (prop) => !["alignment", "mobileMenuAnimation"].includes(prop.toString())
|
|
6206
|
+
})`
|
|
5966
6207
|
display: flex;
|
|
5967
6208
|
align-items: center;
|
|
5968
6209
|
flex-grow: 1;
|
|
@@ -5971,7 +6212,9 @@ const LinksContainer = styled__default["default"].div`
|
|
|
5971
6212
|
justify-content: ${alignment};
|
|
5972
6213
|
`)}
|
|
5973
6214
|
`;
|
|
5974
|
-
const OpenIconContainer = styled__default["default"].button
|
|
6215
|
+
const OpenIconContainer = styled__default["default"].button.withConfig({
|
|
6216
|
+
shouldForwardProp: (prop) => !["mobileMenuAnimation", "alignment", "color"].includes(prop.toString())
|
|
6217
|
+
})`
|
|
5975
6218
|
display: none;
|
|
5976
6219
|
flex-grow: 1;
|
|
5977
6220
|
align-items: center;
|
|
@@ -6252,7 +6495,9 @@ const Grid = styled__default["default"].div`
|
|
|
6252
6495
|
flex-wrap: wrap;
|
|
6253
6496
|
width: 100%;
|
|
6254
6497
|
`;
|
|
6255
|
-
const GridItem = styled__default["default"].div
|
|
6498
|
+
const GridItem = styled__default["default"].div.withConfig({
|
|
6499
|
+
shouldForwardProp: (prop) => !["grid", "index", "rowGap", "columnGap"].includes(prop.toString())
|
|
6500
|
+
})`
|
|
6256
6501
|
display: flex;
|
|
6257
6502
|
align-items: flex-start;
|
|
6258
6503
|
${cssGridItem()}
|
|
@@ -6983,7 +7228,9 @@ function SocialLinksPlaceholder({
|
|
|
6983
7228
|
}, link.id))
|
|
6984
7229
|
});
|
|
6985
7230
|
}
|
|
6986
|
-
const Container$1 = styled__default["default"].div
|
|
7231
|
+
const Container$1 = styled__default["default"].div.withConfig({
|
|
7232
|
+
shouldForwardProp: (prop) => !["width", "margin", "alignment"].includes(prop.toString())
|
|
7233
|
+
})`
|
|
6987
7234
|
display: flex;
|
|
6988
7235
|
flex-direction: row;
|
|
6989
7236
|
flex-wrap: wrap;
|
|
@@ -6992,7 +7239,9 @@ const Container$1 = styled__default["default"].div`
|
|
|
6992
7239
|
justify-content: ${alignment};
|
|
6993
7240
|
`)}
|
|
6994
7241
|
`;
|
|
6995
|
-
const StyledLink$1 = styled__default["default"](Link)
|
|
7242
|
+
const StyledLink$1 = styled__default["default"](Link).withConfig({
|
|
7243
|
+
shouldForwardProp: (prop) => !["brandColor", "shape", "size", "hoverStyle", "fill", "backgroundColor"].includes(prop.toString())
|
|
7244
|
+
})`
|
|
6996
7245
|
display: block;
|
|
6997
7246
|
color: ${(props) => props.brandColor};
|
|
6998
7247
|
transition: transform, opacity 0.18s;
|
|
@@ -7001,8 +7250,8 @@ const StyledLink$1 = styled__default["default"](Link)`
|
|
|
7001
7250
|
display: block;
|
|
7002
7251
|
}
|
|
7003
7252
|
|
|
7004
|
-
${(p) => cssMediaRules([p.shape, p.size, p.hoverStyle, p.fill, p.backgroundColor], ([
|
|
7005
|
-
padding: ${
|
|
7253
|
+
${(p) => cssMediaRules([p.shape, p.size, p.hoverStyle, p.fill, p.backgroundColor], ([shape2 = "naked", size = "medium", hoverStyle = "none", fill, backgroundColor]) => styled.css`
|
|
7254
|
+
padding: ${shape2 === "naked" ? 0 : {
|
|
7006
7255
|
small: 10,
|
|
7007
7256
|
medium: 12,
|
|
7008
7257
|
large: 14
|
|
@@ -7012,8 +7261,8 @@ const StyledLink$1 = styled__default["default"](Link)`
|
|
|
7012
7261
|
rounded: "8px",
|
|
7013
7262
|
naked: 0,
|
|
7014
7263
|
square: 0
|
|
7015
|
-
}[
|
|
7016
|
-
background: ${
|
|
7264
|
+
}[shape2]};
|
|
7265
|
+
background: ${shape2 === "naked" ? "transparent" : backgroundColor == null ? "currentColor" : colorToString(backgroundColor)};
|
|
7017
7266
|
|
|
7018
7267
|
:hover {
|
|
7019
7268
|
${{
|
|
@@ -7031,7 +7280,7 @@ const StyledLink$1 = styled__default["default"](Link)`
|
|
|
7031
7280
|
}
|
|
7032
7281
|
|
|
7033
7282
|
svg {
|
|
7034
|
-
fill: ${fill == null ?
|
|
7283
|
+
fill: ${fill == null ? shape2 === "naked" || backgroundColor != null ? "currentColor" : "white" : colorToString(fill)};
|
|
7035
7284
|
width: ${{
|
|
7036
7285
|
small: 16,
|
|
7037
7286
|
medium: 20,
|
|
@@ -7054,7 +7303,7 @@ const SocialLinks = React.forwardRef(function SocialLinks2({
|
|
|
7054
7303
|
links: [],
|
|
7055
7304
|
openInNewTab: false
|
|
7056
7305
|
},
|
|
7057
|
-
shape,
|
|
7306
|
+
shape: shape2,
|
|
7058
7307
|
size,
|
|
7059
7308
|
hoverStyle,
|
|
7060
7309
|
fill,
|
|
@@ -7090,7 +7339,7 @@ const SocialLinks = React.forwardRef(function SocialLinks2({
|
|
|
7090
7339
|
openInNewTab
|
|
7091
7340
|
}
|
|
7092
7341
|
},
|
|
7093
|
-
shape,
|
|
7342
|
+
shape: shape2,
|
|
7094
7343
|
size,
|
|
7095
7344
|
children: option == null ? null : option.icon
|
|
7096
7345
|
})
|
|
@@ -7560,7 +7809,9 @@ const RichTextEditor = styled__default["default"](React.forwardRef(function Rich
|
|
|
7560
7809
|
margin: 0;
|
|
7561
7810
|
}
|
|
7562
7811
|
`;
|
|
7563
|
-
const StyledRichTextEditor = styled__default["default"](RichTextEditor)
|
|
7812
|
+
const StyledRichTextEditor = styled__default["default"](RichTextEditor).withConfig({
|
|
7813
|
+
shouldForwardProp: (prop) => !["margin"].includes(prop.toString())
|
|
7814
|
+
})`
|
|
7564
7815
|
${cssMargin()}
|
|
7565
7816
|
`;
|
|
7566
7817
|
const defaultText = {
|
|
@@ -7744,7 +7995,9 @@ function registerComponent$1(runtime) {
|
|
|
7744
7995
|
}
|
|
7745
7996
|
});
|
|
7746
7997
|
}
|
|
7747
|
-
const Container = styled__default["default"].div
|
|
7998
|
+
const Container = styled__default["default"].div.withConfig({
|
|
7999
|
+
shouldForwardProp: (prop) => !["margin", "borderRadius"].includes(prop.toString())
|
|
8000
|
+
})`
|
|
7748
8001
|
display: flex;
|
|
7749
8002
|
flex-direction: column;
|
|
7750
8003
|
overflow: hidden;
|
|
@@ -8595,6 +8848,9 @@ function useColorValue(data, definition) {
|
|
|
8595
8848
|
const [swatch] = (_b = (_a = result.data) == null ? void 0 : _a.swatches) != null ? _b : [null];
|
|
8596
8849
|
return ColorHelper__default["default"]({ h: swatch == null ? void 0 : swatch.hue, s: swatch == null ? void 0 : swatch.saturation, l: swatch == null ? void 0 : swatch.lightness }).alpha(data.alpha).rgb().string();
|
|
8597
8850
|
}
|
|
8851
|
+
function useComboboxControlValue(data) {
|
|
8852
|
+
return data == null ? void 0 : data.value;
|
|
8853
|
+
}
|
|
8598
8854
|
function useImageControlValue(data) {
|
|
8599
8855
|
var _a;
|
|
8600
8856
|
return (_a = useFile(data)) == null ? void 0 : _a.publicUrl;
|
|
@@ -8671,25 +8927,31 @@ function ControlValue({
|
|
|
8671
8927
|
parameters: [data, definition],
|
|
8672
8928
|
children: (value) => children(value)
|
|
8673
8929
|
}, definition.type);
|
|
8674
|
-
case
|
|
8930
|
+
case image.ColorControlType:
|
|
8675
8931
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
8676
8932
|
hook: useColorValue,
|
|
8677
8933
|
parameters: [data, definition],
|
|
8678
8934
|
children: (value) => children(value)
|
|
8679
8935
|
}, definition.type);
|
|
8680
|
-
case
|
|
8936
|
+
case image.ImageControlType:
|
|
8681
8937
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
8682
8938
|
hook: useImageControlValue,
|
|
8683
8939
|
parameters: [data],
|
|
8684
8940
|
children: (value) => children(value)
|
|
8685
8941
|
}, definition.type);
|
|
8686
|
-
case
|
|
8942
|
+
case shape.ComboboxControlType:
|
|
8943
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
8944
|
+
hook: useComboboxControlValue,
|
|
8945
|
+
parameters: [data],
|
|
8946
|
+
children: (value) => children(value)
|
|
8947
|
+
}, definition.type);
|
|
8948
|
+
case shape.ShapeControlType:
|
|
8687
8949
|
return /* @__PURE__ */ jsxRuntime.jsx(ShapeControlValue, {
|
|
8688
8950
|
definition,
|
|
8689
8951
|
data,
|
|
8690
8952
|
children: (value) => children(value)
|
|
8691
8953
|
});
|
|
8692
|
-
case
|
|
8954
|
+
case shape.ListControlType:
|
|
8693
8955
|
return /* @__PURE__ */ jsxRuntime.jsx(ListControlValue, {
|
|
8694
8956
|
definition,
|
|
8695
8957
|
data,
|
|
@@ -8722,10 +8984,11 @@ function PropsValue({
|
|
|
8722
8984
|
case textInput.TextInputControlType:
|
|
8723
8985
|
case textInput.TextAreaControlType:
|
|
8724
8986
|
case textInput.SelectControlType:
|
|
8725
|
-
case
|
|
8726
|
-
case
|
|
8727
|
-
case
|
|
8728
|
-
case
|
|
8987
|
+
case image.ColorControlType:
|
|
8988
|
+
case image.ImageControlType:
|
|
8989
|
+
case shape.ComboboxControlType:
|
|
8990
|
+
case shape.ShapeControlType:
|
|
8991
|
+
case shape.ListControlType:
|
|
8729
8992
|
return /* @__PURE__ */ jsxRuntime.jsx(ControlValue, {
|
|
8730
8993
|
definition: descriptor,
|
|
8731
8994
|
data: props[propName],
|
|
@@ -8804,7 +9067,7 @@ const FindDomNode = React.forwardRef(function FindDomNode2(props, ref) {
|
|
|
8804
9067
|
innerRef: ref
|
|
8805
9068
|
}));
|
|
8806
9069
|
});
|
|
8807
|
-
const
|
|
9070
|
+
const storeContextDefaultValue = reactPage.configureStore();
|
|
8808
9071
|
function createReactRuntime(store) {
|
|
8809
9072
|
return {
|
|
8810
9073
|
registerComponent(component, {
|
|
@@ -8827,8 +9090,9 @@ function createReactRuntime(store) {
|
|
|
8827
9090
|
}
|
|
8828
9091
|
};
|
|
8829
9092
|
}
|
|
8830
|
-
const ReactRuntime = createReactRuntime(
|
|
8831
|
-
|
|
9093
|
+
const ReactRuntime = createReactRuntime(storeContextDefaultValue);
|
|
9094
|
+
registerBuiltinComponents(ReactRuntime);
|
|
9095
|
+
const Context = React.createContext(storeContextDefaultValue);
|
|
8832
9096
|
function RuntimeProvider({
|
|
8833
9097
|
client: client2,
|
|
8834
9098
|
children,
|
|
@@ -8836,16 +9100,11 @@ function RuntimeProvider({
|
|
|
8836
9100
|
}) {
|
|
8837
9101
|
const [store, setStore] = React.useState(() => {
|
|
8838
9102
|
const store2 = reactPage.configureStore({
|
|
8839
|
-
preloadedState:
|
|
9103
|
+
preloadedState: storeContextDefaultValue.getState(),
|
|
8840
9104
|
rootElements
|
|
8841
9105
|
});
|
|
8842
|
-
const runtime = createReactRuntime(store2);
|
|
8843
|
-
registerBuiltinComponents(runtime);
|
|
8844
9106
|
return store2;
|
|
8845
9107
|
});
|
|
8846
|
-
React.useEffect(() => {
|
|
8847
|
-
return registerBuiltinComponents(createReactRuntime(store));
|
|
8848
|
-
}, [store]);
|
|
8849
9108
|
React.useEffect(() => {
|
|
8850
9109
|
var _a;
|
|
8851
9110
|
const unregisterDocuments = Array.from((_a = rootElements == null ? void 0 : rootElements.entries()) != null ? _a : []).map(([documentKey, rootElement]) => store.dispatch(actions.registerDocumentEffect(reactPage.createDocument(documentKey, rootElement))));
|
|
@@ -8970,14 +9229,7 @@ const ElementReference = React.memo(React.forwardRef(function ElementReference2(
|
|
|
8970
9229
|
const {
|
|
8971
9230
|
error,
|
|
8972
9231
|
data
|
|
8973
|
-
} = useQuery(
|
|
8974
|
-
query ElementReferenceGlobalElement($id: ID!) {
|
|
8975
|
-
globalElement(id: $id) {
|
|
8976
|
-
id
|
|
8977
|
-
data
|
|
8978
|
-
}
|
|
8979
|
-
}
|
|
8980
|
-
`, {
|
|
9232
|
+
} = useQuery(ELEMENT_REFERENCE_GLOBAL_ELEMENT, {
|
|
8981
9233
|
variables: {
|
|
8982
9234
|
id: elementReference.value
|
|
8983
9235
|
}
|