@makeswift/runtime 0.0.0-a0e5297 → 0.0.0-a49c3c6
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/Page.cjs.js +215 -0
- package/dist/Page.cjs.js.map +1 -0
- package/dist/Page.es.js +209 -0
- package/dist/Page.es.js.map +1 -0
- package/dist/actions.cjs.js +5 -0
- package/dist/actions.cjs.js.map +1 -1
- package/dist/actions.es.js +5 -1
- package/dist/actions.es.js.map +1 -1
- package/dist/components.cjs.js +16 -1
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.es.js +7 -2
- package/dist/components.es.js.map +1 -1
- package/dist/constants.cjs.js +77 -1
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.es.js +77 -1
- package/dist/constants.es.js.map +1 -1
- package/dist/control-serialization.cjs.js +61 -5
- package/dist/control-serialization.cjs.js.map +1 -1
- package/dist/control-serialization.es.js +61 -5
- package/dist/control-serialization.es.js.map +1 -1
- package/dist/descriptors.cjs.js +8 -0
- package/dist/descriptors.cjs.js.map +1 -1
- package/dist/descriptors.es.js +6 -1
- package/dist/descriptors.es.js.map +1 -1
- package/dist/instances.cjs.js +17 -0
- package/dist/instances.cjs.js.map +1 -1
- package/dist/instances.es.js +17 -1
- package/dist/instances.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 -1
- package/dist/next.cjs.js +37 -17
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +38 -18
- 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 -1
- package/dist/react-builder-preview.cjs.js +3 -0
- package/dist/react-builder-preview.cjs.js.map +1 -1
- package/dist/react-builder-preview.es.js +4 -1
- package/dist/react-builder-preview.es.js.map +1 -1
- package/dist/react-page.cjs.js +1 -1
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +2 -2
- package/dist/react-page.es.js.map +1 -1
- package/dist/react.cjs.js +6 -1
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.cjs2.js +2371 -319
- package/dist/react.cjs2.js.map +1 -1
- package/dist/react.es.js +6 -2
- package/dist/react.es.js.map +1 -1
- package/dist/react.es2.js +2369 -327
- package/dist/react.es2.js.map +1 -1
- package/dist/types/api/constants.d.ts.map +1 -1
- package/dist/types/api/generated/graphql.d.ts +53 -0
- package/dist/types/api/generated/graphql.d.ts.map +1 -1
- package/dist/types/api/react.d.ts +25 -4
- package/dist/types/api/react.d.ts.map +1 -1
- package/dist/types/api/types.d.ts +2 -2
- package/dist/types/api/types.d.ts.map +1 -1
- package/dist/types/builder/serialization/control-serialization.d.ts +55 -7
- package/dist/types/builder/serialization/control-serialization.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/Form.d.ts +41 -0
- package/dist/types/components/builtin/Form/Form.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +15 -0
- package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts +15 -0
- package/dist/types/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts +14 -0
- package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts +16 -0
- package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts +10 -0
- package/dist/types/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts +23 -0
- package/dist/types/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts +3 -0
- package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts +17 -0
- package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts +23 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts +19 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts +24 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts +13 -0
- package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/URLTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/URLTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/index.d.ts +19 -0
- package/dist/types/components/builtin/Form/components/Field/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Placeholder/index.d.ts +9 -0
- package/dist/types/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Spinner/index.d.ts +3 -0
- package/dist/types/components/builtin/Form/components/Spinner/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/context/FormContext.d.ts +32 -0
- package/dist/types/components/builtin/Form/context/FormContext.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/index.d.ts +2 -0
- package/dist/types/components/builtin/Form/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Image/Image.d.ts.map +1 -1
- package/dist/types/components/builtin/Video/Video.d.ts +15 -0
- package/dist/types/components/builtin/Video/Video.d.ts.map +1 -0
- package/dist/types/components/builtin/Video/index.d.ts +2 -0
- package/dist/types/components/builtin/Video/index.d.ts.map +1 -0
- package/dist/types/components/builtin/index.d.ts +1 -0
- package/dist/types/components/builtin/index.d.ts.map +1 -1
- package/dist/types/components/hooks/index.d.ts +1 -0
- package/dist/types/components/hooks/index.d.ts.map +1 -1
- package/dist/types/components/hooks/useTable.d.ts +66 -0
- package/dist/types/components/hooks/useTable.d.ts.map +1 -0
- package/dist/types/components/hooks/useTableFormFieldRefs.d.ts +8 -0
- package/dist/types/components/hooks/useTableFormFieldRefs.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/page/BodySnippet.d.ts +7 -0
- package/dist/types/components/page/BodySnippet.d.ts.map +1 -0
- package/dist/types/components/page/Page.d.ts +45 -0
- package/dist/types/components/page/Page.d.ts.map +1 -0
- package/dist/types/components/page/index.d.ts +2 -0
- package/dist/types/components/page/index.d.ts.map +1 -0
- package/dist/types/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -1
- package/dist/types/components/shared/FallbackComponent/FallbackComponent.d.ts +7 -0
- package/dist/types/components/shared/FallbackComponent/FallbackComponent.d.ts.map +1 -0
- package/dist/types/components/shared/FallbackComponent/index.d.ts +2 -0
- package/dist/types/components/shared/FallbackComponent/index.d.ts.map +1 -0
- package/dist/types/components/utils/placeholders.d.ts +7 -0
- package/dist/types/components/utils/placeholders.d.ts.map +1 -1
- package/dist/types/components/utils/queries.d.ts +1 -0
- package/dist/types/components/utils/queries.d.ts.map +1 -1
- package/dist/types/components/utils/types.d.ts +1 -2
- package/dist/types/components/utils/types.d.ts.map +1 -1
- package/dist/types/controls.d.ts +4 -0
- package/dist/types/controls.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/next.d.ts +5 -4
- package/dist/types/next.d.ts.map +1 -1
- package/dist/types/prop-controllers/descriptors.d.ts +24 -6
- package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/prop-controllers/index.d.ts +3 -3
- package/dist/types/prop-controllers/index.d.ts.map +1 -1
- package/dist/types/prop-controllers/instances.d.ts +36 -4
- package/dist/types/prop-controllers/instances.d.ts.map +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/react.d.ts.map +1 -1
- package/dist/types/runtimes/react.d.ts +3 -3
- package/dist/types/runtimes/react.d.ts.map +1 -1
- package/dist/types/state/actions.d.ts +9 -1
- package/dist/types/state/actions.d.ts.map +1 -1
- package/dist/types/state/react-builder-preview.d.ts.map +1 -1
- package/package.json +3 -1
- package/dist/graphql.cjs.js +0 -162
- package/dist/graphql.cjs.js.map +0 -1
- package/dist/graphql.es.js +0 -157
- package/dist/graphql.es.js.map +0 -1
package/dist/react.es2.js
CHANGED
|
@@ -29,25 +29,33 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
+
var __publicField = (obj, key, value) => {
|
|
33
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
34
|
+
return value;
|
|
35
|
+
};
|
|
32
36
|
import * as React from "react";
|
|
33
37
|
import { forwardRef, createContext, useContext, useMemo, useState, useLayoutEffect, useCallback, useEffect, useRef, useImperativeHandle, Children, createElement, Fragment as Fragment$1, memo } from "react";
|
|
34
38
|
import { useSyncExternalStoreWithSelector } from "use-sync-external-store/shim/with-selector";
|
|
35
|
-
import { gql, useQuery as useQuery$1, ApolloClient, InMemoryCache } from "@apollo/client";
|
|
36
|
-
import { g as getIsInBuilder,
|
|
39
|
+
import { gql, useQuery as useQuery$1, useMutation as useMutation$1, ApolloClient, InMemoryCache } from "@apollo/client";
|
|
40
|
+
import { a as createDocumentReference, g as getIsInBuilder, b as configureStore, d as getElementId, e as getReactComponent, f as getDocument, i as isElementReference } from "./react-page.es.js";
|
|
37
41
|
import { f as registerComponentHandleEffect, g as mountComponentEffect, h as registerComponentEffect, j as registerReactComponentEffect } from "./actions.es.js";
|
|
38
42
|
import styled, { css, keyframes, createGlobalStyle } from "styled-components";
|
|
39
43
|
import { useReducedMotion, useAnimation, motion } from "framer-motion";
|
|
44
|
+
import { getDataFromTree } from "@apollo/client/react/ssr";
|
|
45
|
+
import uuid from "uuid/v4";
|
|
40
46
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
47
|
+
import "html-react-parser";
|
|
48
|
+
import "next/head";
|
|
41
49
|
import { p as parse, c as createBox, g as getBox } from "./box-models.es.js";
|
|
42
50
|
import NextImage from "next/image";
|
|
43
51
|
import ReactPlayer from "react-player";
|
|
44
|
-
import { E as ElementID, B as Backgrounds$1, W as Width, R as ResponsiveIconRadioGroup, M as Margin, P as Padding, a as Border, b as BorderRadius, S as Shadows, G as GapY, c as GapX, e as ResponsiveSelect, f as ResponsiveNumber, C as Checkbox, g as Grid$2, h as TextInput, L as Link$1, i as ResponsiveColor, j as TextStyle, I as Image$1, k as ResponsiveOpacity, l as Images, N as Number$1, D as Date$1, F as Font, m as ResponsiveLength, n as TextArea, o as
|
|
52
|
+
import { E as ElementID, B as Backgrounds$1, W as Width, R as ResponsiveIconRadioGroup, M as Margin, P as Padding, a as Border, b as BorderRadius, S as Shadows, G as GapY, c as GapX, e as ResponsiveSelect, f as ResponsiveNumber, C as Checkbox$1, g as Grid$2, h as TextInput, L as Link$1, i as ResponsiveColor, j as TextStyle, I as Image$1, k as ResponsiveOpacity, l as Images, N as Number$1, D as Date$1, F as Font, m as ResponsiveLength, n as TextArea$1, o as Table, p as TableFormFields, q as NavigationLinks, r as SocialLinks$1, s as RichText, V as Video$1 } from "./descriptors.es.js";
|
|
45
53
|
import ColorHelper from "color";
|
|
46
54
|
import scrollIntoView from "scroll-into-view-if-needed";
|
|
47
55
|
import NextLink from "next/link";
|
|
48
56
|
import { useGesture } from "react-use-gesture";
|
|
49
57
|
import { wrap } from "@popmotion/popcorn";
|
|
50
|
-
import
|
|
58
|
+
import { Field as Field$1, getIn, Formik } from "formik";
|
|
51
59
|
import { normalize } from "polished";
|
|
52
60
|
import { Value } from "slate";
|
|
53
61
|
import Hotkeys from "slate-hotkeys";
|
|
@@ -63,7 +71,7 @@ const PlaceholderBase$1 = styled.div`
|
|
|
63
71
|
hide
|
|
64
72
|
}) => hide === true ? "hidden" : "initial"};
|
|
65
73
|
`;
|
|
66
|
-
var Placeholder$
|
|
74
|
+
var Placeholder$2 = forwardRef(function Placeholder(_a, ref) {
|
|
67
75
|
var _b = _a, {
|
|
68
76
|
hide = false
|
|
69
77
|
} = _b, restOfProps = __objRest(_b, [
|
|
@@ -177,21 +185,164 @@ const TYPOGRAPHIES_BY_ID = gql`
|
|
|
177
185
|
|
|
178
186
|
${TYPOGRAPHY_FRAGMENT}
|
|
179
187
|
`;
|
|
188
|
+
const TABLE_BY_ID = gql`
|
|
189
|
+
query TableById($id: ID!) {
|
|
190
|
+
table(id: $id) {
|
|
191
|
+
id
|
|
192
|
+
name
|
|
193
|
+
columns {
|
|
194
|
+
id
|
|
195
|
+
name
|
|
196
|
+
... on MultipleSelectTableColumn {
|
|
197
|
+
options {
|
|
198
|
+
id
|
|
199
|
+
name
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
... on SingleSelectTableColumn {
|
|
203
|
+
options {
|
|
204
|
+
id
|
|
205
|
+
name
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
`;
|
|
180
212
|
function isNonNullable(value) {
|
|
181
213
|
return value != null;
|
|
182
214
|
}
|
|
183
|
-
const
|
|
215
|
+
const typePolicies = {
|
|
216
|
+
Query: {
|
|
217
|
+
fields: {
|
|
218
|
+
swatches(existingData, {
|
|
219
|
+
args,
|
|
220
|
+
toReference
|
|
221
|
+
}) {
|
|
222
|
+
return existingData != null ? existingData : args == null ? void 0 : args.ids.map((id) => toReference({
|
|
223
|
+
__typename: "Swatch",
|
|
224
|
+
id
|
|
225
|
+
}, true));
|
|
226
|
+
},
|
|
227
|
+
file(existingData, {
|
|
228
|
+
args,
|
|
229
|
+
toReference
|
|
230
|
+
}) {
|
|
231
|
+
return existingData != null ? existingData : toReference({
|
|
232
|
+
__typename: "File",
|
|
233
|
+
id: args == null ? void 0 : args.id
|
|
234
|
+
}, true);
|
|
235
|
+
},
|
|
236
|
+
files(existingData, {
|
|
237
|
+
args,
|
|
238
|
+
toReference
|
|
239
|
+
}) {
|
|
240
|
+
return existingData != null ? existingData : args == null ? void 0 : args.ids.map((id) => toReference({
|
|
241
|
+
__typename: "File",
|
|
242
|
+
id
|
|
243
|
+
}, true));
|
|
244
|
+
},
|
|
245
|
+
typographies(existingData, {
|
|
246
|
+
args,
|
|
247
|
+
toReference
|
|
248
|
+
}) {
|
|
249
|
+
return existingData != null ? existingData : args == null ? void 0 : args.ids.map((id) => toReference({
|
|
250
|
+
__typename: "Typography",
|
|
251
|
+
id
|
|
252
|
+
}, true));
|
|
253
|
+
},
|
|
254
|
+
pagePathnamesById(existingData, {
|
|
255
|
+
args,
|
|
256
|
+
toReference
|
|
257
|
+
}) {
|
|
258
|
+
return existingData != null ? existingData : args == null ? void 0 : args.ids.map((id) => toReference({
|
|
259
|
+
__typename: "PagePathnameSlice",
|
|
260
|
+
id
|
|
261
|
+
}, true));
|
|
262
|
+
},
|
|
263
|
+
globalElement(existingData, {
|
|
264
|
+
args,
|
|
265
|
+
toReference
|
|
266
|
+
}) {
|
|
267
|
+
return existingData != null ? existingData : toReference({
|
|
268
|
+
__typename: "GlobalElement",
|
|
269
|
+
id: args == null ? void 0 : args.id
|
|
270
|
+
}, true);
|
|
271
|
+
},
|
|
272
|
+
table(existingData, {
|
|
273
|
+
args,
|
|
274
|
+
toReference
|
|
275
|
+
}) {
|
|
276
|
+
return existingData != null ? existingData : toReference({
|
|
277
|
+
__typename: "Table",
|
|
278
|
+
id: args == null ? void 0 : args.id
|
|
279
|
+
}, true);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
const PrefetchContext = createContext(false);
|
|
285
|
+
function useIsPrefetching() {
|
|
286
|
+
return useContext(PrefetchContext);
|
|
287
|
+
}
|
|
288
|
+
function createApolloClient({
|
|
289
|
+
uri,
|
|
290
|
+
cacheData
|
|
291
|
+
}) {
|
|
292
|
+
const cache = new InMemoryCache({
|
|
293
|
+
typePolicies
|
|
294
|
+
});
|
|
295
|
+
if (cacheData)
|
|
296
|
+
cache.restore(cacheData);
|
|
297
|
+
return new ApolloClient({
|
|
298
|
+
uri,
|
|
299
|
+
cache
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
class MakeswiftClient {
|
|
303
|
+
constructor({
|
|
304
|
+
uri,
|
|
305
|
+
cacheData
|
|
306
|
+
}) {
|
|
307
|
+
__publicField(this, "apolloClient");
|
|
308
|
+
this.apolloClient = createApolloClient({
|
|
309
|
+
uri,
|
|
310
|
+
cacheData
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
async prefetch(element) {
|
|
314
|
+
const id = uuid();
|
|
315
|
+
await getDataFromTree(/* @__PURE__ */ jsx(PrefetchContext.Provider, {
|
|
316
|
+
value: true,
|
|
317
|
+
children: /* @__PURE__ */ jsx(RuntimeProvider, {
|
|
318
|
+
client: this,
|
|
319
|
+
defaultRootElements: /* @__PURE__ */ new Map([[id, element]]),
|
|
320
|
+
children: /* @__PURE__ */ jsx(DocumentReference, {
|
|
321
|
+
documentReference: createDocumentReference(id)
|
|
322
|
+
})
|
|
323
|
+
})
|
|
324
|
+
}));
|
|
325
|
+
return this.apolloClient.cache.extract();
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
const Context$2 = createContext(void 0);
|
|
184
329
|
function useQuery(query, options) {
|
|
185
|
-
const client = useContext(Context$
|
|
330
|
+
const client = useContext(Context$2);
|
|
186
331
|
return useQuery$1(query, __spreadValues({
|
|
187
|
-
client
|
|
332
|
+
client: client == null ? void 0 : client.apolloClient
|
|
333
|
+
}, options));
|
|
334
|
+
}
|
|
335
|
+
function useMutation(mutation, options) {
|
|
336
|
+
const client = useContext(Context$2);
|
|
337
|
+
return useMutation$1(mutation, __spreadValues({
|
|
338
|
+
client: client == null ? void 0 : client.apolloClient
|
|
188
339
|
}, options));
|
|
189
340
|
}
|
|
190
|
-
function
|
|
341
|
+
function MakeswiftProvider({
|
|
191
342
|
client,
|
|
192
343
|
children
|
|
193
344
|
}) {
|
|
194
|
-
return /* @__PURE__ */ jsx(Context$
|
|
345
|
+
return /* @__PURE__ */ jsx(Context$2.Provider, {
|
|
195
346
|
value: client,
|
|
196
347
|
children
|
|
197
348
|
});
|
|
@@ -479,6 +630,12 @@ function usePage(pageId) {
|
|
|
479
630
|
const { pagePathnamesById: [page] = [] } = data;
|
|
480
631
|
return page;
|
|
481
632
|
}
|
|
633
|
+
function useTable(tableId) {
|
|
634
|
+
return useQuery(TABLE_BY_ID, {
|
|
635
|
+
skip: tableId == null,
|
|
636
|
+
variables: { id: tableId }
|
|
637
|
+
});
|
|
638
|
+
}
|
|
482
639
|
const defaultExitedProps = {
|
|
483
640
|
opacity: 0,
|
|
484
641
|
x: 0,
|
|
@@ -949,8 +1106,8 @@ function getScrollParent(element) {
|
|
|
949
1106
|
return element;
|
|
950
1107
|
return getScrollParent(parentElement);
|
|
951
1108
|
}
|
|
952
|
-
function Parallax(
|
|
953
|
-
var _h =
|
|
1109
|
+
function Parallax(_g2) {
|
|
1110
|
+
var _h = _g2, {
|
|
954
1111
|
strength,
|
|
955
1112
|
children
|
|
956
1113
|
} = _h, rest = __objRest(_h, [
|
|
@@ -1036,7 +1193,7 @@ function Parallax(_g) {
|
|
|
1036
1193
|
children: children(getProps)
|
|
1037
1194
|
}));
|
|
1038
1195
|
}
|
|
1039
|
-
const Container$
|
|
1196
|
+
const Container$d = styled.div`
|
|
1040
1197
|
position: absolute;
|
|
1041
1198
|
top: 0;
|
|
1042
1199
|
left: 0;
|
|
@@ -1090,7 +1247,7 @@ function BackgroundVideo({
|
|
|
1090
1247
|
}, [aspectRatio, zoom]);
|
|
1091
1248
|
if (!ReactPlayer.canPlay(url))
|
|
1092
1249
|
return /* @__PURE__ */ jsx(Fragment, {});
|
|
1093
|
-
return /* @__PURE__ */ jsxs(Container$
|
|
1250
|
+
return /* @__PURE__ */ jsxs(Container$d, {
|
|
1094
1251
|
ref: container,
|
|
1095
1252
|
children: [container.current && /* @__PURE__ */ jsx(ReactPlayer, {
|
|
1096
1253
|
url,
|
|
@@ -1169,10 +1326,10 @@ const AbsoluteFill = styled.div`
|
|
|
1169
1326
|
right: 0;
|
|
1170
1327
|
bottom: 0;
|
|
1171
1328
|
`;
|
|
1172
|
-
const Container$
|
|
1329
|
+
const Container$c = styled(AbsoluteFill)`
|
|
1173
1330
|
border-radius: inherit;
|
|
1174
1331
|
`;
|
|
1175
|
-
const BackgroundsContainer$1 = styled(Container$
|
|
1332
|
+
const BackgroundsContainer$1 = styled(Container$c)`
|
|
1176
1333
|
overflow: hidden;
|
|
1177
1334
|
${(p) => cssMediaRules([p.visibility], ([visibility]) => css`
|
|
1178
1335
|
display: ${visibility === true ? "block" : "none"};
|
|
@@ -1181,6 +1338,9 @@ const BackgroundsContainer$1 = styled(Container$7)`
|
|
|
1181
1338
|
function Backgrounds({
|
|
1182
1339
|
backgrounds
|
|
1183
1340
|
}) {
|
|
1341
|
+
const isPrefetching = useIsPrefetching();
|
|
1342
|
+
if (isPrefetching)
|
|
1343
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
1184
1344
|
if (backgrounds == null)
|
|
1185
1345
|
return /* @__PURE__ */ jsx(Fragment, {});
|
|
1186
1346
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
@@ -1196,7 +1356,7 @@ function Backgrounds({
|
|
|
1196
1356
|
visibility,
|
|
1197
1357
|
children: [...value].reverse().map((bg) => {
|
|
1198
1358
|
if (bg.type === "color") {
|
|
1199
|
-
return /* @__PURE__ */ jsx(Container$
|
|
1359
|
+
return /* @__PURE__ */ jsx(Container$c, {
|
|
1200
1360
|
style: {
|
|
1201
1361
|
backgroundColor: getColor(bg.payload)
|
|
1202
1362
|
}
|
|
@@ -1232,7 +1392,7 @@ function Backgrounds({
|
|
|
1232
1392
|
}
|
|
1233
1393
|
return /* @__PURE__ */ jsx(Parallax, {
|
|
1234
1394
|
strength: parallax,
|
|
1235
|
-
children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$
|
|
1395
|
+
children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$c, __spreadValues({}, getParallaxProps({
|
|
1236
1396
|
style: {
|
|
1237
1397
|
backgroundImage: publicUrl != null ? `url('${publicUrl}')` : void 0,
|
|
1238
1398
|
backgroundPosition,
|
|
@@ -1250,7 +1410,7 @@ function Backgrounds({
|
|
|
1250
1410
|
isRadial
|
|
1251
1411
|
} = bg.payload;
|
|
1252
1412
|
const gradient = `${getStopsStyle(stops)}`;
|
|
1253
|
-
return /* @__PURE__ */ jsx(Container$
|
|
1413
|
+
return /* @__PURE__ */ jsx(Container$c, {
|
|
1254
1414
|
style: {
|
|
1255
1415
|
background: isRadial ? `radial-gradient(${gradient})` : `linear-gradient(${angle}rad, ${gradient})`
|
|
1256
1416
|
}
|
|
@@ -1267,7 +1427,7 @@ function Backgrounds({
|
|
|
1267
1427
|
} = bg.payload;
|
|
1268
1428
|
return /* @__PURE__ */ jsx(Parallax, {
|
|
1269
1429
|
strength: parallax,
|
|
1270
|
-
children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$
|
|
1430
|
+
children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$c, __spreadProps(__spreadValues({}, getParallaxProps({})), {
|
|
1271
1431
|
children: /* @__PURE__ */ jsx(BackgroundVideo, {
|
|
1272
1432
|
url,
|
|
1273
1433
|
zoom,
|
|
@@ -1335,7 +1495,7 @@ const Grid$1 = styled(motion.div)`
|
|
|
1335
1495
|
alignContent
|
|
1336
1496
|
}))}
|
|
1337
1497
|
`;
|
|
1338
|
-
const GridItem$
|
|
1498
|
+
const GridItem$2 = styled(motion.div)`
|
|
1339
1499
|
display: flex;
|
|
1340
1500
|
|
|
1341
1501
|
/* IE11 doesn't recognize space-between and treats it as stretch, so we fall back to flex-start */
|
|
@@ -1446,7 +1606,7 @@ const Box = forwardRef(function Box2({
|
|
|
1446
1606
|
animate: animate == null ? void 0 : animate.parent,
|
|
1447
1607
|
initial: initial == null ? void 0 : initial.parent,
|
|
1448
1608
|
transition: transition == null ? void 0 : transition.parent,
|
|
1449
|
-
children: children && children.elements.length > 0 ? children.elements.map((child, index) => /* @__PURE__ */ jsx(GridItem$
|
|
1609
|
+
children: children && children.elements.length > 0 ? children.elements.map((child, index) => /* @__PURE__ */ jsx(GridItem$2, {
|
|
1450
1610
|
grid: children.columns,
|
|
1451
1611
|
index,
|
|
1452
1612
|
columnGap,
|
|
@@ -1457,13 +1617,13 @@ const Box = forwardRef(function Box2({
|
|
|
1457
1617
|
children: /* @__PURE__ */ jsx(Element$1, {
|
|
1458
1618
|
element: child
|
|
1459
1619
|
})
|
|
1460
|
-
}, child.key)) : /* @__PURE__ */ jsx(Placeholder$
|
|
1620
|
+
}, child.key)) : /* @__PURE__ */ jsx(Placeholder$2, {
|
|
1461
1621
|
hide: hidePlaceholder
|
|
1462
1622
|
})
|
|
1463
1623
|
})
|
|
1464
1624
|
}, key == null ? void 0 : key.container);
|
|
1465
1625
|
});
|
|
1466
|
-
function registerComponent$
|
|
1626
|
+
function registerComponent$c(runtime) {
|
|
1467
1627
|
return runtime.registerComponent(Box, {
|
|
1468
1628
|
type: "./components/Box/index.js",
|
|
1469
1629
|
label: "Box",
|
|
@@ -1635,7 +1795,7 @@ function registerComponent$a(runtime) {
|
|
|
1635
1795
|
suffix: "s",
|
|
1636
1796
|
defaultValue: DEFAULT_ITEM_STAGGER_DURATION
|
|
1637
1797
|
}),
|
|
1638
|
-
hidePlaceholder: Checkbox({
|
|
1798
|
+
hidePlaceholder: Checkbox$1({
|
|
1639
1799
|
label: "Hide placeholder"
|
|
1640
1800
|
}),
|
|
1641
1801
|
children: Grid$2()
|
|
@@ -1728,7 +1888,7 @@ const Link = forwardRef(function Link2(_k, ref) {
|
|
|
1728
1888
|
}))
|
|
1729
1889
|
});
|
|
1730
1890
|
});
|
|
1731
|
-
const StyledButton = styled(Link)`
|
|
1891
|
+
const StyledButton$1 = styled(Link)`
|
|
1732
1892
|
display: table;
|
|
1733
1893
|
border: 0;
|
|
1734
1894
|
outline: 0;
|
|
@@ -1920,7 +2080,7 @@ const StyledButton = styled(Link)`
|
|
|
1920
2080
|
})}
|
|
1921
2081
|
${cssTextStyle()}
|
|
1922
2082
|
`;
|
|
1923
|
-
const Button = forwardRef(function Button2(_m, ref) {
|
|
2083
|
+
const Button$1 = forwardRef(function Button2(_m, ref) {
|
|
1924
2084
|
var _n = _m, {
|
|
1925
2085
|
id,
|
|
1926
2086
|
children,
|
|
@@ -1946,7 +2106,7 @@ const Button = forwardRef(function Button2(_m, ref) {
|
|
|
1946
2106
|
"width",
|
|
1947
2107
|
"margin"
|
|
1948
2108
|
]);
|
|
1949
|
-
return /* @__PURE__ */ jsx(StyledButton, __spreadProps(__spreadValues({}, restOfProps), {
|
|
2109
|
+
return /* @__PURE__ */ jsx(StyledButton$1, __spreadProps(__spreadValues({}, restOfProps), {
|
|
1950
2110
|
ref,
|
|
1951
2111
|
id,
|
|
1952
2112
|
color: useColor(color),
|
|
@@ -1961,8 +2121,8 @@ const Button = forwardRef(function Button2(_m, ref) {
|
|
|
1961
2121
|
children: children == null ? "Button Text" : children
|
|
1962
2122
|
}));
|
|
1963
2123
|
});
|
|
1964
|
-
function registerComponent$
|
|
1965
|
-
return runtime.registerComponent(Button, {
|
|
2124
|
+
function registerComponent$b(runtime) {
|
|
2125
|
+
return runtime.registerComponent(Button$1, {
|
|
1966
2126
|
type: "./components/Button/index.js",
|
|
1967
2127
|
label: "Button",
|
|
1968
2128
|
props: {
|
|
@@ -2057,6 +2217,10 @@ const placeholders = {
|
|
|
2057
2217
|
image: {
|
|
2058
2218
|
src: "data:image/svg+xml,%3Csvg width='360' height='240' viewBox='0 0 360 240' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M0 0H360V240H0V0Z' fill='%23A1A8C2' fill-opacity='0.18'/%3E%3Cpath d='M260 59C260 78.33 244.33 94 225 94C205.67 94 190 78.33 190 59C190 39.67 205.67 24 225 24C244.33 24 260 39.67 260 59Z' fill='%23A1A8C2' fill-opacity='0.25'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M319 250H417L291.485 124.485C286.799 119.799 279.201 119.799 274.515 124.485L234 165L319 250Z' fill='%23A1A8C2' fill-opacity='0.25'/%3E%3Cpath d='M311 250L-89 250L102.515 58.4853C107.201 53.799 114.799 53.799 119.485 58.4853L311 250Z' fill='%23A1A8C2' fill-opacity='0.25'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath d='M0 0H360V240H0V0Z' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A",
|
|
2059
2219
|
dimensions: { width: 360, height: 240 }
|
|
2220
|
+
},
|
|
2221
|
+
video: {
|
|
2222
|
+
src: "data:image/svg+xml,%3Csvg width='712' height='400' viewBox='0 0 712 400' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M712 0H0V400H712V0ZM356 240C378.091 240 396 222.091 396 200C396 177.909 378.091 160 356 160C333.909 160 316 177.909 316 200C316 222.091 333.909 240 356 240Z' fill='%23A1A8C2' fill-opacity='0.18'/%3E%3Cpath d='M344 216.503V183.497C344 181.95 345.681 180.989 347.014 181.773L375.069 198.276C376.384 199.049 376.384 200.951 375.069 201.724L347.014 218.227C345.681 219.011 344 218.05 344 216.503Z' fill='%23A1A8C2' fill-opacity='0.4'/%3E%3C/svg%3E%0A",
|
|
2223
|
+
dimensions: { width: 712, height: 400 }
|
|
2060
2224
|
}
|
|
2061
2225
|
};
|
|
2062
2226
|
function loadImage(src) {
|
|
@@ -2116,6 +2280,7 @@ const ImageComponent = forwardRef(function Image2({
|
|
|
2116
2280
|
const dataDimensions = (fileData == null ? void 0 : fileData.publicUrl) ? fileData == null ? void 0 : fileData.dimensions : placeholder2.dimensions;
|
|
2117
2281
|
const [measuredDimensions, setMeasuredDimensions] = useState(null);
|
|
2118
2282
|
const isInBuilder = useIsInBuilder();
|
|
2283
|
+
const isPrefetching = useIsPrefetching();
|
|
2119
2284
|
useEffect(() => {
|
|
2120
2285
|
if (dataDimensions)
|
|
2121
2286
|
return;
|
|
@@ -2135,6 +2300,8 @@ const ImageComponent = forwardRef(function Image2({
|
|
|
2135
2300
|
const dimensions = dataDimensions != null ? dataDimensions : measuredDimensions;
|
|
2136
2301
|
if (!dimensions)
|
|
2137
2302
|
return null;
|
|
2303
|
+
if (isPrefetching)
|
|
2304
|
+
return null;
|
|
2138
2305
|
return /* @__PURE__ */ jsx(ImageContainer, {
|
|
2139
2306
|
as: link ? Link : "div",
|
|
2140
2307
|
link,
|
|
@@ -2162,7 +2329,7 @@ const ImageComponent = forwardRef(function Image2({
|
|
|
2162
2329
|
})
|
|
2163
2330
|
});
|
|
2164
2331
|
});
|
|
2165
|
-
function registerComponent$
|
|
2332
|
+
function registerComponent$a(runtime) {
|
|
2166
2333
|
return runtime.registerComponent(ImageComponent, {
|
|
2167
2334
|
type: "./components/Image/index.js",
|
|
2168
2335
|
label: "Image",
|
|
@@ -2211,7 +2378,7 @@ const RightChevron = () => /* @__PURE__ */ jsx("svg", {
|
|
|
2211
2378
|
strokeWidth: "2"
|
|
2212
2379
|
})
|
|
2213
2380
|
});
|
|
2214
|
-
const Container$
|
|
2381
|
+
const Container$b = styled.div`
|
|
2215
2382
|
position: relative;
|
|
2216
2383
|
height: 100%;
|
|
2217
2384
|
`;
|
|
@@ -2511,7 +2678,7 @@ const Carousel = forwardRef(function Carousel2({
|
|
|
2511
2678
|
break;
|
|
2512
2679
|
}
|
|
2513
2680
|
},
|
|
2514
|
-
children: [/* @__PURE__ */ jsxs(Container$
|
|
2681
|
+
children: [/* @__PURE__ */ jsxs(Container$b, {
|
|
2515
2682
|
children: [/* @__PURE__ */ jsx(ClipMask, {
|
|
2516
2683
|
children: /* @__PURE__ */ jsx(Page, __spreadProps(__spreadValues({}, bindPage()), {
|
|
2517
2684
|
animate: animation,
|
|
@@ -2587,7 +2754,7 @@ const Carousel = forwardRef(function Carousel2({
|
|
|
2587
2754
|
})]
|
|
2588
2755
|
});
|
|
2589
2756
|
});
|
|
2590
|
-
function registerComponent$
|
|
2757
|
+
function registerComponent$9(runtime) {
|
|
2591
2758
|
return runtime.registerComponent(Carousel, {
|
|
2592
2759
|
type: "./components/Carousel/index.js",
|
|
2593
2760
|
label: "Carousel",
|
|
@@ -2650,7 +2817,7 @@ function registerComponent$7(runtime) {
|
|
|
2650
2817
|
unit: "px"
|
|
2651
2818
|
}
|
|
2652
2819
|
}),
|
|
2653
|
-
autoplay: Checkbox({
|
|
2820
|
+
autoplay: Checkbox$1({
|
|
2654
2821
|
label: "Autoplay"
|
|
2655
2822
|
}),
|
|
2656
2823
|
delay: Number$1({
|
|
@@ -2660,7 +2827,7 @@ function registerComponent$7(runtime) {
|
|
|
2660
2827
|
step: 0.1,
|
|
2661
2828
|
suffix: "seconds"
|
|
2662
2829
|
}),
|
|
2663
|
-
showArrows: Checkbox({
|
|
2830
|
+
showArrows: Checkbox$1({
|
|
2664
2831
|
preset: true,
|
|
2665
2832
|
label: "Show arrows"
|
|
2666
2833
|
}),
|
|
@@ -2689,7 +2856,7 @@ function registerComponent$7(runtime) {
|
|
|
2689
2856
|
label: "Arrow background",
|
|
2690
2857
|
placeholder: "white"
|
|
2691
2858
|
}),
|
|
2692
|
-
showDots: Checkbox({
|
|
2859
|
+
showDots: Checkbox$1({
|
|
2693
2860
|
preset: true,
|
|
2694
2861
|
label: "Show dots"
|
|
2695
2862
|
}),
|
|
@@ -2707,14 +2874,14 @@ const Block$1 = styled.div`
|
|
|
2707
2874
|
padding: 0.5em;
|
|
2708
2875
|
font-size: 1em;
|
|
2709
2876
|
`;
|
|
2710
|
-
const Label = styled.div`
|
|
2877
|
+
const Label$3 = styled.div`
|
|
2711
2878
|
margin-top: 0.25em;
|
|
2712
2879
|
`;
|
|
2713
2880
|
const Segment = styled.div`
|
|
2714
2881
|
flex: 1;
|
|
2715
2882
|
text-align: center;
|
|
2716
2883
|
`;
|
|
2717
|
-
const Container$
|
|
2884
|
+
const Container$a = styled.div`
|
|
2718
2885
|
display: flex;
|
|
2719
2886
|
${cssWidth("560px")}
|
|
2720
2887
|
${cssMargin()}
|
|
@@ -2724,7 +2891,7 @@ const Container$5 = styled.div`
|
|
|
2724
2891
|
return css`
|
|
2725
2892
|
font-size: 18px;
|
|
2726
2893
|
|
|
2727
|
-
${Label} {
|
|
2894
|
+
${Label$3} {
|
|
2728
2895
|
font-size: 14px;
|
|
2729
2896
|
}
|
|
2730
2897
|
`;
|
|
@@ -2732,7 +2899,7 @@ const Container$5 = styled.div`
|
|
|
2732
2899
|
return css`
|
|
2733
2900
|
font-size: 32px;
|
|
2734
2901
|
|
|
2735
|
-
${Label} {
|
|
2902
|
+
${Label$3} {
|
|
2736
2903
|
font-size: 18px;
|
|
2737
2904
|
}
|
|
2738
2905
|
`;
|
|
@@ -2740,7 +2907,7 @@ const Container$5 = styled.div`
|
|
|
2740
2907
|
return css`
|
|
2741
2908
|
font-size: 24px;
|
|
2742
2909
|
|
|
2743
|
-
${Label} {
|
|
2910
|
+
${Label$3} {
|
|
2744
2911
|
font-size: 16px;
|
|
2745
2912
|
}
|
|
2746
2913
|
`;
|
|
@@ -2877,7 +3044,7 @@ const Container$5 = styled.div`
|
|
|
2877
3044
|
})}
|
|
2878
3045
|
}
|
|
2879
3046
|
|
|
2880
|
-
${Label} {
|
|
3047
|
+
${Label$3} {
|
|
2881
3048
|
${(p) => cssMediaRules([p.labelColor, p.labelFont], ([labelColor = {
|
|
2882
3049
|
swatch: {
|
|
2883
3050
|
hue: 0,
|
|
@@ -2954,7 +3121,7 @@ const Countdown = forwardRef(function Countdown2({
|
|
|
2954
3121
|
}, 1e3);
|
|
2955
3122
|
return () => clearInterval(intervalId);
|
|
2956
3123
|
}, [date]);
|
|
2957
|
-
return /* @__PURE__ */ jsxs(Container$
|
|
3124
|
+
return /* @__PURE__ */ jsxs(Container$a, {
|
|
2958
3125
|
ref,
|
|
2959
3126
|
id,
|
|
2960
3127
|
width,
|
|
@@ -2973,7 +3140,7 @@ const Countdown = forwardRef(function Countdown2({
|
|
|
2973
3140
|
children: /* @__PURE__ */ jsx("span", {
|
|
2974
3141
|
children: days
|
|
2975
3142
|
})
|
|
2976
|
-
}), /* @__PURE__ */ jsx(Label, {
|
|
3143
|
+
}), /* @__PURE__ */ jsx(Label$3, {
|
|
2977
3144
|
children: daysLabel == null ? "Days" : daysLabel
|
|
2978
3145
|
})]
|
|
2979
3146
|
}), /* @__PURE__ */ jsxs(Segment, {
|
|
@@ -2981,7 +3148,7 @@ const Countdown = forwardRef(function Countdown2({
|
|
|
2981
3148
|
children: /* @__PURE__ */ jsx("span", {
|
|
2982
3149
|
children: hours
|
|
2983
3150
|
})
|
|
2984
|
-
}), /* @__PURE__ */ jsx(Label, {
|
|
3151
|
+
}), /* @__PURE__ */ jsx(Label$3, {
|
|
2985
3152
|
children: hoursLabel == null ? "Hours" : hoursLabel
|
|
2986
3153
|
})]
|
|
2987
3154
|
}), /* @__PURE__ */ jsxs(Segment, {
|
|
@@ -2989,7 +3156,7 @@ const Countdown = forwardRef(function Countdown2({
|
|
|
2989
3156
|
children: /* @__PURE__ */ jsx("span", {
|
|
2990
3157
|
children: minutes
|
|
2991
3158
|
})
|
|
2992
|
-
}), /* @__PURE__ */ jsx(Label, {
|
|
3159
|
+
}), /* @__PURE__ */ jsx(Label$3, {
|
|
2993
3160
|
children: minutesLabel == null ? "Minutes" : minutesLabel
|
|
2994
3161
|
})]
|
|
2995
3162
|
}), /* @__PURE__ */ jsxs(Segment, {
|
|
@@ -2997,13 +3164,13 @@ const Countdown = forwardRef(function Countdown2({
|
|
|
2997
3164
|
children: /* @__PURE__ */ jsx("span", {
|
|
2998
3165
|
children: seconds
|
|
2999
3166
|
})
|
|
3000
|
-
}), /* @__PURE__ */ jsx(Label, {
|
|
3167
|
+
}), /* @__PURE__ */ jsx(Label$3, {
|
|
3001
3168
|
children: secondsLabel == null ? "Seconds" : secondsLabel
|
|
3002
3169
|
})]
|
|
3003
3170
|
})]
|
|
3004
3171
|
});
|
|
3005
3172
|
});
|
|
3006
|
-
function registerComponent$
|
|
3173
|
+
function registerComponent$8(runtime) {
|
|
3007
3174
|
return runtime.registerComponent(Countdown, {
|
|
3008
3175
|
type: "./components/Countdown/index.js",
|
|
3009
3176
|
label: "Countdown",
|
|
@@ -3139,7 +3306,7 @@ const IE11MinHeightContainer = styled.div`
|
|
|
3139
3306
|
${cssWidth()}
|
|
3140
3307
|
${cssMargin()}
|
|
3141
3308
|
`;
|
|
3142
|
-
const Container$
|
|
3309
|
+
const Container$9 = styled.div`
|
|
3143
3310
|
display: flex;
|
|
3144
3311
|
flex-direction: column;
|
|
3145
3312
|
justify-content: center;
|
|
@@ -3198,7 +3365,7 @@ const Divider = forwardRef(function Divider2({
|
|
|
3198
3365
|
id,
|
|
3199
3366
|
width,
|
|
3200
3367
|
margin,
|
|
3201
|
-
children: /* @__PURE__ */ jsx(Container$
|
|
3368
|
+
children: /* @__PURE__ */ jsx(Container$9, {
|
|
3202
3369
|
children: /* @__PURE__ */ jsx(Line, {
|
|
3203
3370
|
variant,
|
|
3204
3371
|
thickness,
|
|
@@ -3207,7 +3374,7 @@ const Divider = forwardRef(function Divider2({
|
|
|
3207
3374
|
})
|
|
3208
3375
|
});
|
|
3209
3376
|
});
|
|
3210
|
-
function registerComponent$
|
|
3377
|
+
function registerComponent$7(runtime) {
|
|
3211
3378
|
return runtime.registerComponent(Divider, {
|
|
3212
3379
|
type: "./components/Divider/index.js",
|
|
3213
3380
|
label: "Divider",
|
|
@@ -3257,7 +3424,7 @@ function registerComponent$5(runtime) {
|
|
|
3257
3424
|
}
|
|
3258
3425
|
});
|
|
3259
3426
|
}
|
|
3260
|
-
const Container$
|
|
3427
|
+
const Container$8 = styled.div`
|
|
3261
3428
|
min-height: 15px;
|
|
3262
3429
|
${cssWidth()}
|
|
3263
3430
|
${cssMargin()}
|
|
@@ -3337,7 +3504,7 @@ const Embed = forwardRef(function Embed2({
|
|
|
3337
3504
|
}, [container, html]);
|
|
3338
3505
|
if (shouldRender === false)
|
|
3339
3506
|
return null;
|
|
3340
|
-
return /* @__PURE__ */ jsx(Container$
|
|
3507
|
+
return /* @__PURE__ */ jsx(Container$8, {
|
|
3341
3508
|
ref: setContainer,
|
|
3342
3509
|
id,
|
|
3343
3510
|
margin,
|
|
@@ -3347,14 +3514,14 @@ const Embed = forwardRef(function Embed2({
|
|
|
3347
3514
|
}
|
|
3348
3515
|
});
|
|
3349
3516
|
});
|
|
3350
|
-
function registerComponent$
|
|
3517
|
+
function registerComponent$6(runtime) {
|
|
3351
3518
|
return runtime.registerComponent(Embed, {
|
|
3352
3519
|
type: "./components/Embed/index.js",
|
|
3353
3520
|
label: "Embed",
|
|
3354
3521
|
icon: "Code40",
|
|
3355
3522
|
props: {
|
|
3356
3523
|
id: ElementID(),
|
|
3357
|
-
html: TextArea({
|
|
3524
|
+
html: TextArea$1({
|
|
3358
3525
|
label: "Code",
|
|
3359
3526
|
rows: 20
|
|
3360
3527
|
}),
|
|
@@ -3363,9 +3530,9 @@ function registerComponent$4(runtime) {
|
|
|
3363
3530
|
}
|
|
3364
3531
|
});
|
|
3365
3532
|
}
|
|
3366
|
-
var _path$
|
|
3367
|
-
function _extends$
|
|
3368
|
-
_extends$
|
|
3533
|
+
var _path$t;
|
|
3534
|
+
function _extends$u() {
|
|
3535
|
+
_extends$u = Object.assign || function(target) {
|
|
3369
3536
|
for (var i = 1; i < arguments.length; i++) {
|
|
3370
3537
|
var source = arguments[i];
|
|
3371
3538
|
for (var key in source) {
|
|
@@ -3376,106 +3543,1884 @@ function _extends$r() {
|
|
|
3376
3543
|
}
|
|
3377
3544
|
return target;
|
|
3378
3545
|
};
|
|
3379
|
-
return _extends$
|
|
3546
|
+
return _extends$u.apply(this, arguments);
|
|
3380
3547
|
}
|
|
3381
|
-
var
|
|
3382
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
}, props), _path$
|
|
3387
|
-
|
|
3548
|
+
var SvgCheck12 = function SvgCheck122(props) {
|
|
3549
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$u({
|
|
3550
|
+
width: 12,
|
|
3551
|
+
height: 12,
|
|
3552
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
3553
|
+
}, props), _path$t || (_path$t = /* @__PURE__ */ React.createElement("path", {
|
|
3554
|
+
fillRule: "evenodd",
|
|
3555
|
+
clipRule: "evenodd",
|
|
3556
|
+
d: "M11.707 1.793a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414 0l-3-3a1 1 0 0 1 1.414-1.414L4 8.086l6.293-6.293a1 1 0 0 1 1.414 0Z"
|
|
3388
3557
|
})));
|
|
3389
3558
|
};
|
|
3390
|
-
const
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
}
|
|
3395
|
-
|
|
3396
|
-
|
|
3559
|
+
const Shapes = Object.freeze({
|
|
3560
|
+
SQUARE: "square",
|
|
3561
|
+
ROUNDED: "rounded",
|
|
3562
|
+
PILL: "pill"
|
|
3563
|
+
});
|
|
3564
|
+
const Sizes = Object.freeze({
|
|
3565
|
+
SMALL: "small",
|
|
3566
|
+
MEDIUM: "medium",
|
|
3567
|
+
LARGE: "large"
|
|
3568
|
+
});
|
|
3569
|
+
const Contrasts = Object.freeze({
|
|
3570
|
+
LIGHT: "light",
|
|
3571
|
+
DARK: "dark"
|
|
3572
|
+
});
|
|
3573
|
+
const Context$1 = createContext({});
|
|
3574
|
+
function useFormContext() {
|
|
3575
|
+
return useContext(Context$1);
|
|
3576
|
+
}
|
|
3577
|
+
const { Provider } = Context$1;
|
|
3578
|
+
function getSizeHeight$2(size) {
|
|
3579
|
+
switch (size) {
|
|
3580
|
+
case Sizes.SMALL:
|
|
3581
|
+
return 30;
|
|
3582
|
+
case Sizes.MEDIUM:
|
|
3583
|
+
return 38;
|
|
3584
|
+
case Sizes.LARGE:
|
|
3585
|
+
return 48;
|
|
3586
|
+
default:
|
|
3587
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3588
|
+
}
|
|
3589
|
+
}
|
|
3590
|
+
function getSizeHorizontalPadding(size) {
|
|
3591
|
+
switch (size) {
|
|
3592
|
+
case Sizes.SMALL:
|
|
3593
|
+
return 8;
|
|
3594
|
+
case Sizes.MEDIUM:
|
|
3595
|
+
return 12;
|
|
3596
|
+
case Sizes.LARGE:
|
|
3597
|
+
return 16;
|
|
3598
|
+
default:
|
|
3599
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3600
|
+
}
|
|
3601
|
+
}
|
|
3602
|
+
function getSizeVerticalPadding(size) {
|
|
3603
|
+
switch (size) {
|
|
3604
|
+
case Sizes.SMALL:
|
|
3605
|
+
return 3;
|
|
3606
|
+
case Sizes.MEDIUM:
|
|
3607
|
+
return 7;
|
|
3608
|
+
case Sizes.LARGE:
|
|
3609
|
+
return 11;
|
|
3610
|
+
default:
|
|
3611
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3612
|
+
}
|
|
3613
|
+
}
|
|
3614
|
+
function getShapeBorderRadius(shape) {
|
|
3615
|
+
switch (shape) {
|
|
3616
|
+
case Shapes.SQUARE:
|
|
3617
|
+
return 0;
|
|
3618
|
+
case Shapes.ROUNDED:
|
|
3619
|
+
return 4;
|
|
3620
|
+
case Shapes.PILL:
|
|
3621
|
+
return 500;
|
|
3622
|
+
default:
|
|
3623
|
+
throw new Error(`Invalid form shape "${shape}"`);
|
|
3624
|
+
}
|
|
3625
|
+
}
|
|
3626
|
+
function getContrastBorderColor(contrast, error) {
|
|
3627
|
+
switch (contrast) {
|
|
3628
|
+
case Contrasts.LIGHT:
|
|
3629
|
+
return error ? "rgba(255, 0, 0, 0.7)" : "rgba(0, 0, 0, 0.25)";
|
|
3630
|
+
case Contrasts.DARK:
|
|
3631
|
+
return error ? "rgba(255, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.6)";
|
|
3632
|
+
default:
|
|
3633
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3634
|
+
}
|
|
3635
|
+
}
|
|
3636
|
+
function getContrastBackgroundColor(contrast) {
|
|
3637
|
+
switch (contrast) {
|
|
3638
|
+
case Contrasts.LIGHT:
|
|
3639
|
+
return "white";
|
|
3640
|
+
case Contrasts.DARK:
|
|
3641
|
+
return "rgba(0, 0, 0, 0.7)";
|
|
3642
|
+
default:
|
|
3643
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3644
|
+
}
|
|
3645
|
+
}
|
|
3646
|
+
function getContrastColor$1(contrast) {
|
|
3647
|
+
switch (contrast) {
|
|
3648
|
+
case Contrasts.LIGHT:
|
|
3649
|
+
return "rgba(0, 0, 0, 0.95)";
|
|
3650
|
+
case Contrasts.DARK:
|
|
3651
|
+
return "white";
|
|
3652
|
+
default:
|
|
3653
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3654
|
+
}
|
|
3655
|
+
}
|
|
3656
|
+
function getContrastPlaceholderColor(contrast) {
|
|
3657
|
+
switch (contrast) {
|
|
3658
|
+
case Contrasts.LIGHT:
|
|
3659
|
+
return "rgba(0, 0, 0, 0.3)";
|
|
3660
|
+
case Contrasts.DARK:
|
|
3661
|
+
return "rgba(255,255,255,0.3)";
|
|
3662
|
+
default:
|
|
3663
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3664
|
+
}
|
|
3665
|
+
}
|
|
3666
|
+
function cssField() {
|
|
3667
|
+
return css`
|
|
3668
|
+
display: block;
|
|
3669
|
+
width: 100%;
|
|
3670
|
+
outline: none;
|
|
3671
|
+
border-width: 1px;
|
|
3672
|
+
border-style: solid;
|
|
3673
|
+
transition: border-color 200ms;
|
|
3674
|
+
${(props) => cssMediaRules([props.shape, props.size, props.contrast, props.brandColor], ([
|
|
3675
|
+
shape = Shapes.ROUNDED,
|
|
3676
|
+
size = Sizes.MEDIUM,
|
|
3677
|
+
contrast = Contrasts.LIGHT,
|
|
3678
|
+
brandColor = { swatch: { hue: 0, saturation: 0, lightness: 0 }, alpha: 1 }
|
|
3679
|
+
]) => css`
|
|
3680
|
+
padding: ${getSizeVerticalPadding(size)}px ${getSizeHorizontalPadding(size)}px;
|
|
3681
|
+
border-radius: ${getShapeBorderRadius(shape)}px;
|
|
3682
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
3683
|
+
color: ${getContrastColor$1(contrast)};
|
|
3684
|
+
background-color: ${getContrastBackgroundColor(contrast)};
|
|
3685
|
+
|
|
3686
|
+
:focus,
|
|
3687
|
+
:focus-within {
|
|
3688
|
+
border-color: ${colorToString(brandColor)};
|
|
3689
|
+
}
|
|
3690
|
+
|
|
3691
|
+
::placeholder {
|
|
3692
|
+
color: ${getContrastPlaceholderColor(contrast)};
|
|
3693
|
+
}
|
|
3694
|
+
`)}
|
|
3695
|
+
`;
|
|
3696
|
+
}
|
|
3697
|
+
function getSizeHeight$1(size) {
|
|
3698
|
+
switch (size) {
|
|
3699
|
+
case Sizes.SMALL:
|
|
3700
|
+
return 36;
|
|
3701
|
+
case Sizes.MEDIUM:
|
|
3702
|
+
return 42;
|
|
3703
|
+
case Sizes.LARGE:
|
|
3704
|
+
return 48;
|
|
3705
|
+
default:
|
|
3706
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3707
|
+
}
|
|
3708
|
+
}
|
|
3709
|
+
const Base$2 = styled.input`
|
|
3710
|
+
${cssField()}
|
|
3711
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
3712
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
3713
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
3397
3714
|
`)}
|
|
3398
3715
|
`;
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3716
|
+
var Input$2 = forwardRef(function Input(_o, ref) {
|
|
3717
|
+
var _p = _o, {
|
|
3718
|
+
error = false,
|
|
3719
|
+
form
|
|
3720
|
+
} = _p, restOfProps = __objRest(_p, [
|
|
3721
|
+
"error",
|
|
3722
|
+
"form"
|
|
3723
|
+
]);
|
|
3724
|
+
const {
|
|
3725
|
+
shape,
|
|
3726
|
+
size,
|
|
3727
|
+
contrast,
|
|
3728
|
+
brandColor
|
|
3729
|
+
} = useFormContext();
|
|
3730
|
+
return /* @__PURE__ */ jsx(Base$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3731
|
+
ref,
|
|
3732
|
+
error,
|
|
3733
|
+
shape,
|
|
3734
|
+
size,
|
|
3735
|
+
contrast,
|
|
3736
|
+
brandColor
|
|
3737
|
+
}));
|
|
3738
|
+
});
|
|
3739
|
+
const Container$7 = styled.div`
|
|
3740
|
+
display: flex;
|
|
3741
|
+
flex-direction: column;
|
|
3742
|
+
${cssWidth()};
|
|
3743
|
+
${cssMargin()};
|
|
3744
|
+
`;
|
|
3745
|
+
const Label$2 = styled.div`
|
|
3746
|
+
max-width: 120px;
|
|
3747
|
+
min-width: 60px;
|
|
3748
|
+
height: 8px;
|
|
3749
|
+
border-radius: 2px;
|
|
3402
3750
|
background-color: #a1a8c2;
|
|
3403
|
-
border-radius: ${(props) => props.button === true ? 6 : 2}px;
|
|
3404
3751
|
opacity: 0.4;
|
|
3752
|
+
margin-bottom: 8px;
|
|
3405
3753
|
`;
|
|
3406
|
-
const
|
|
3407
|
-
width:
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3754
|
+
const Input$1 = styled.div`
|
|
3755
|
+
min-width: 80px;
|
|
3756
|
+
height: 32px;
|
|
3757
|
+
border-radius: 4px;
|
|
3758
|
+
border-width: 2px;
|
|
3759
|
+
border-style: solid;
|
|
3760
|
+
border-color: #a1a8c2;
|
|
3761
|
+
opacity: 0.4;
|
|
3762
|
+
`;
|
|
3763
|
+
const Button = styled.div`
|
|
3764
|
+
min-width: 140px;
|
|
3765
|
+
height: 32px;
|
|
3766
|
+
border-radius: 4px;
|
|
3767
|
+
background-color: #a1a8c2;
|
|
3768
|
+
opacity: 0.4;
|
|
3769
|
+
`;
|
|
3770
|
+
var Placeholder$1 = forwardRef(function Placeholder2({
|
|
3771
|
+
width,
|
|
3772
|
+
margin
|
|
3773
|
+
}, ref) {
|
|
3774
|
+
return /* @__PURE__ */ jsxs(Container$7, {
|
|
3775
|
+
ref,
|
|
3776
|
+
width,
|
|
3777
|
+
margin,
|
|
3778
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
3779
|
+
style: {
|
|
3780
|
+
display: "flex",
|
|
3781
|
+
flexDirection: "column",
|
|
3782
|
+
marginBottom: 16
|
|
3783
|
+
},
|
|
3784
|
+
children: [/* @__PURE__ */ jsx(Label$2, {}), /* @__PURE__ */ jsx(Input$1, {})]
|
|
3785
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
3786
|
+
style: {
|
|
3787
|
+
display: "flex",
|
|
3788
|
+
flexDirection: "column",
|
|
3789
|
+
marginBottom: 16
|
|
3790
|
+
},
|
|
3791
|
+
children: [/* @__PURE__ */ jsx(Label$2, {}), /* @__PURE__ */ jsx(Input$1, {})]
|
|
3792
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
3793
|
+
style: {
|
|
3794
|
+
display: "flex",
|
|
3795
|
+
flexDirection: "column",
|
|
3796
|
+
justifyContent: "flex-end"
|
|
3797
|
+
},
|
|
3798
|
+
children: /* @__PURE__ */ jsx(Button, {})
|
|
3799
|
+
})]
|
|
3426
3800
|
});
|
|
3801
|
+
});
|
|
3802
|
+
function getSizeHeight(size) {
|
|
3803
|
+
switch (size) {
|
|
3804
|
+
case Sizes.SMALL:
|
|
3805
|
+
return 14;
|
|
3806
|
+
case Sizes.MEDIUM:
|
|
3807
|
+
return 18;
|
|
3808
|
+
case Sizes.LARGE:
|
|
3809
|
+
return 22;
|
|
3810
|
+
default:
|
|
3811
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3812
|
+
}
|
|
3427
3813
|
}
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
}
|
|
3438
|
-
}
|
|
3439
|
-
return target;
|
|
3440
|
-
};
|
|
3441
|
-
return _extends$q.apply(this, arguments);
|
|
3814
|
+
function getContrastColor(contrast) {
|
|
3815
|
+
switch (contrast) {
|
|
3816
|
+
case Contrasts.LIGHT:
|
|
3817
|
+
return "rgba(0, 0, 0, 0.8)";
|
|
3818
|
+
case Contrasts.DARK:
|
|
3819
|
+
return "rgba(255, 255, 255, 0.95)";
|
|
3820
|
+
default:
|
|
3821
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3822
|
+
}
|
|
3442
3823
|
}
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
};
|
|
3465
|
-
return _extends$p.apply(this, arguments);
|
|
3824
|
+
const Base$1 = styled.label`
|
|
3825
|
+
display: block;
|
|
3826
|
+
margin: 0 0 0.25em 0;
|
|
3827
|
+
${cssTextStyle()}
|
|
3828
|
+
${(props) => cssMediaRules([props.size, props.contrast, props.textColor], ([size = Sizes.MEDIUM, contrast = Contrasts.LIGHT, textColor]) => css`
|
|
3829
|
+
min-height: ${getSizeHeight(size)}px;
|
|
3830
|
+
color: ${textColor == null ? getContrastColor(contrast) : colorToString(textColor)};
|
|
3831
|
+
`)}
|
|
3832
|
+
`;
|
|
3833
|
+
function Label$1(props) {
|
|
3834
|
+
const {
|
|
3835
|
+
contrast,
|
|
3836
|
+
size,
|
|
3837
|
+
labelTextStyle,
|
|
3838
|
+
labelTextColor
|
|
3839
|
+
} = useFormContext();
|
|
3840
|
+
return /* @__PURE__ */ jsx(Base$1, __spreadProps(__spreadValues({}, props), {
|
|
3841
|
+
contrast,
|
|
3842
|
+
size,
|
|
3843
|
+
textStyle: labelTextStyle,
|
|
3844
|
+
textColor: useColor(labelTextColor)
|
|
3845
|
+
}));
|
|
3466
3846
|
}
|
|
3467
|
-
var
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3847
|
+
var SingleLineTextTableField = forwardRef(function SingleLineTextTableField2(_q, ref) {
|
|
3848
|
+
var _r = _q, {
|
|
3849
|
+
id,
|
|
3850
|
+
label = "",
|
|
3851
|
+
name,
|
|
3852
|
+
error,
|
|
3853
|
+
hideLabel = false
|
|
3854
|
+
} = _r, restOfProps = __objRest(_r, [
|
|
3855
|
+
"id",
|
|
3856
|
+
"label",
|
|
3857
|
+
"name",
|
|
3858
|
+
"error",
|
|
3859
|
+
"hideLabel"
|
|
3860
|
+
]);
|
|
3861
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
3862
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
3863
|
+
htmlFor: id,
|
|
3864
|
+
children: label
|
|
3865
|
+
}), /* @__PURE__ */ jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3866
|
+
"aria-label": label,
|
|
3867
|
+
ref,
|
|
3868
|
+
id,
|
|
3869
|
+
name,
|
|
3870
|
+
type: "text",
|
|
3871
|
+
error: error != null
|
|
3872
|
+
}))]
|
|
3873
|
+
});
|
|
3874
|
+
});
|
|
3875
|
+
const Base = styled.textarea`
|
|
3876
|
+
resize: vertical;
|
|
3877
|
+
${cssField()}
|
|
3878
|
+
`;
|
|
3879
|
+
var TextArea = forwardRef(function TextArea2(_s, ref) {
|
|
3880
|
+
var _t = _s, {
|
|
3881
|
+
error = false,
|
|
3882
|
+
form
|
|
3883
|
+
} = _t, restOfProps = __objRest(_t, [
|
|
3884
|
+
"error",
|
|
3885
|
+
"form"
|
|
3886
|
+
]);
|
|
3887
|
+
const {
|
|
3888
|
+
shape,
|
|
3889
|
+
size,
|
|
3890
|
+
contrast,
|
|
3891
|
+
brandColor
|
|
3892
|
+
} = useFormContext();
|
|
3893
|
+
return /* @__PURE__ */ jsx(Base, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3894
|
+
ref,
|
|
3895
|
+
rows: 4,
|
|
3896
|
+
error,
|
|
3897
|
+
shape,
|
|
3898
|
+
size,
|
|
3899
|
+
contrast,
|
|
3900
|
+
brandColor
|
|
3901
|
+
}));
|
|
3902
|
+
});
|
|
3903
|
+
var LongTextTableField = forwardRef(function LongTextTableField2(_u, ref) {
|
|
3904
|
+
var _v = _u, {
|
|
3905
|
+
id,
|
|
3906
|
+
label = "",
|
|
3907
|
+
error,
|
|
3908
|
+
hideLabel = false
|
|
3909
|
+
} = _v, restOfProps = __objRest(_v, [
|
|
3910
|
+
"id",
|
|
3911
|
+
"label",
|
|
3912
|
+
"error",
|
|
3913
|
+
"hideLabel"
|
|
3914
|
+
]);
|
|
3915
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
3916
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
3917
|
+
htmlFor: id,
|
|
3918
|
+
children: label
|
|
3919
|
+
}), /* @__PURE__ */ jsx(TextArea, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3920
|
+
"aria-label": label,
|
|
3921
|
+
ref,
|
|
3922
|
+
id,
|
|
3923
|
+
error: error != null
|
|
3924
|
+
}))]
|
|
3925
|
+
});
|
|
3926
|
+
});
|
|
3927
|
+
function getCheckmarkColor$1({
|
|
3928
|
+
swatch: {
|
|
3929
|
+
hue: h,
|
|
3930
|
+
saturation: s,
|
|
3931
|
+
lightness: l
|
|
3932
|
+
},
|
|
3933
|
+
alpha: a
|
|
3934
|
+
}) {
|
|
3935
|
+
return ColorHelper({
|
|
3936
|
+
h,
|
|
3937
|
+
s,
|
|
3938
|
+
l
|
|
3939
|
+
}).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
|
|
3940
|
+
}
|
|
3941
|
+
const Container$6 = styled.div`
|
|
3942
|
+
position: relative;
|
|
3943
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
3944
|
+
height: ${getSizeHeight(size)}px;
|
|
3945
|
+
width: ${getSizeHeight(size)}px;
|
|
3946
|
+
`)}
|
|
3947
|
+
`;
|
|
3948
|
+
const FakeCheckbox = styled.div`
|
|
3949
|
+
position: absolute;
|
|
3950
|
+
width: 100%;
|
|
3951
|
+
height: 100%;
|
|
3952
|
+
border-style: solid;
|
|
3953
|
+
border-radius: 4px;
|
|
3954
|
+
pointer-events: none;
|
|
3955
|
+
border-width: 1px;
|
|
3956
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
|
|
3957
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
3958
|
+
background-color: ${getContrastBackgroundColor(contrast)};
|
|
3959
|
+
`)}
|
|
3960
|
+
`;
|
|
3961
|
+
const HiddenCheckbox = styled.input`
|
|
3962
|
+
position: absolute;
|
|
3963
|
+
opacity: 0;
|
|
3964
|
+
width: 100%;
|
|
3965
|
+
height: 100%;
|
|
3966
|
+
cursor: pointer;
|
|
3967
|
+
|
|
3968
|
+
&:disabled {
|
|
3969
|
+
cursor: no-drop;
|
|
3970
|
+
|
|
3971
|
+
& ~ ${FakeCheckbox} {
|
|
3972
|
+
opacity: 0.5;
|
|
3973
|
+
}
|
|
3974
|
+
}
|
|
3975
|
+
|
|
3976
|
+
&:checked ~ ${FakeCheckbox} {
|
|
3977
|
+
${(props) => cssMediaRules([props.brandColor], ([{
|
|
3978
|
+
swatch = {
|
|
3979
|
+
hue: 0,
|
|
3980
|
+
saturation: 0,
|
|
3981
|
+
lightness: 0
|
|
3982
|
+
},
|
|
3983
|
+
alpha = 1
|
|
3984
|
+
} = {}]) => css`
|
|
3985
|
+
background-color: ${colorToString({
|
|
3986
|
+
swatch,
|
|
3987
|
+
alpha
|
|
3988
|
+
})};
|
|
3989
|
+
`)}
|
|
3990
|
+
border-color: transparent;
|
|
3991
|
+
|
|
3992
|
+
&::after {
|
|
3993
|
+
content: '';
|
|
3994
|
+
position: absolute;
|
|
3995
|
+
box-sizing: content-box;
|
|
3996
|
+
width: 25%;
|
|
3997
|
+
height: 50%;
|
|
3998
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
3999
|
+
border-width: ${getSizeHeight(size) * 0.1}px;
|
|
4000
|
+
border-left: 0;
|
|
4001
|
+
border-top: 0;
|
|
4002
|
+
`)}
|
|
4003
|
+
border-style: solid;
|
|
4004
|
+
${(props) => cssMediaRules([props.brandColor], ([{
|
|
4005
|
+
swatch = {
|
|
4006
|
+
hue: 0,
|
|
4007
|
+
saturation: 0,
|
|
4008
|
+
lightness: 0
|
|
4009
|
+
},
|
|
4010
|
+
alpha = 1
|
|
4011
|
+
} = {}]) => css`
|
|
4012
|
+
border-color: ${getCheckmarkColor$1({
|
|
4013
|
+
swatch,
|
|
4014
|
+
alpha
|
|
4015
|
+
})};
|
|
4016
|
+
`)}
|
|
4017
|
+
transform: rotate(45deg) translate3d(91%, -23%, 0);
|
|
4018
|
+
}
|
|
4019
|
+
}
|
|
4020
|
+
|
|
4021
|
+
&:not(:disabled) {
|
|
4022
|
+
&:focus ~ ${FakeCheckbox} {
|
|
4023
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4024
|
+
swatch: {
|
|
4025
|
+
hue: 0,
|
|
4026
|
+
saturation: 0,
|
|
4027
|
+
lightness: 0
|
|
4028
|
+
},
|
|
4029
|
+
alpha: 1
|
|
4030
|
+
}]) => css`
|
|
4031
|
+
border-color: ${colorToString(brandColor)};
|
|
4032
|
+
`)}
|
|
4033
|
+
}
|
|
4034
|
+
}
|
|
4035
|
+
|
|
4036
|
+
&:not(:disabled):checked {
|
|
4037
|
+
&:focus ~ ${FakeCheckbox} {
|
|
4038
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
|
|
4039
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
4040
|
+
`)}
|
|
4041
|
+
}
|
|
4042
|
+
}
|
|
4043
|
+
`;
|
|
4044
|
+
var Checkbox = forwardRef(function Checkbox2(_w, ref) {
|
|
4045
|
+
var _x = _w, {
|
|
4046
|
+
error,
|
|
4047
|
+
className,
|
|
4048
|
+
style,
|
|
4049
|
+
form
|
|
4050
|
+
} = _x, restOfProps = __objRest(_x, [
|
|
4051
|
+
"error",
|
|
4052
|
+
"className",
|
|
4053
|
+
"style",
|
|
4054
|
+
"form"
|
|
4055
|
+
]);
|
|
4056
|
+
const {
|
|
4057
|
+
size,
|
|
4058
|
+
contrast,
|
|
4059
|
+
brandColor
|
|
4060
|
+
} = useFormContext();
|
|
4061
|
+
return /* @__PURE__ */ jsxs(Container$6, {
|
|
4062
|
+
size,
|
|
4063
|
+
children: [/* @__PURE__ */ jsx(HiddenCheckbox, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4064
|
+
type: "checkbox",
|
|
4065
|
+
ref,
|
|
4066
|
+
error,
|
|
4067
|
+
size,
|
|
4068
|
+
contrast,
|
|
4069
|
+
brandColor
|
|
4070
|
+
})), /* @__PURE__ */ jsx(FakeCheckbox, {
|
|
4071
|
+
className,
|
|
4072
|
+
error,
|
|
4073
|
+
contrast,
|
|
4074
|
+
style
|
|
4075
|
+
})]
|
|
4076
|
+
});
|
|
4077
|
+
});
|
|
4078
|
+
const StyledLabel$2 = styled(Label$1)`
|
|
4079
|
+
display: flex;
|
|
4080
|
+
align-items: center;
|
|
4081
|
+
margin: 0;
|
|
4082
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
4083
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
4084
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
4085
|
+
`)}
|
|
4086
|
+
`;
|
|
4087
|
+
const CheckboxContainer$1 = styled.span`
|
|
4088
|
+
margin-right: 8px;
|
|
4089
|
+
`;
|
|
4090
|
+
var CheckboxTableField = forwardRef(function CheckboxTableField2(_y, ref) {
|
|
4091
|
+
var _z = _y, {
|
|
4092
|
+
form,
|
|
4093
|
+
id,
|
|
4094
|
+
name,
|
|
4095
|
+
label = "",
|
|
4096
|
+
value = false,
|
|
4097
|
+
error
|
|
4098
|
+
} = _z, restOfProps = __objRest(_z, [
|
|
4099
|
+
"form",
|
|
4100
|
+
"id",
|
|
4101
|
+
"name",
|
|
4102
|
+
"label",
|
|
4103
|
+
"value",
|
|
4104
|
+
"error"
|
|
4105
|
+
]);
|
|
4106
|
+
const {
|
|
4107
|
+
size
|
|
4108
|
+
} = useFormContext();
|
|
4109
|
+
function handleChange(event) {
|
|
4110
|
+
form.setFieldValue(name, event.currentTarget.checked);
|
|
4111
|
+
}
|
|
4112
|
+
return /* @__PURE__ */ jsxs(StyledLabel$2, {
|
|
4113
|
+
htmlFor: id,
|
|
4114
|
+
size,
|
|
4115
|
+
children: [/* @__PURE__ */ jsx(CheckboxContainer$1, {
|
|
4116
|
+
children: /* @__PURE__ */ jsx(Checkbox, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4117
|
+
"aria-label": label,
|
|
4118
|
+
checked: value,
|
|
4119
|
+
onChange: handleChange,
|
|
4120
|
+
ref,
|
|
4121
|
+
id,
|
|
4122
|
+
error: error != null
|
|
4123
|
+
}))
|
|
4124
|
+
}), label]
|
|
4125
|
+
});
|
|
4126
|
+
});
|
|
4127
|
+
const MainLabel = styled(Label$1)`
|
|
4128
|
+
margin: 0 0 4px 0;
|
|
4129
|
+
`;
|
|
4130
|
+
const StyledLabel$1 = styled(Label$1)`
|
|
4131
|
+
display: flex;
|
|
4132
|
+
align-items: center;
|
|
4133
|
+
margin: 8px 0;
|
|
4134
|
+
|
|
4135
|
+
&:last-of-type {
|
|
4136
|
+
margin-bottom: 0;
|
|
4137
|
+
}
|
|
4138
|
+
`;
|
|
4139
|
+
const CheckboxContainer = styled.span`
|
|
4140
|
+
margin-right: 8px;
|
|
4141
|
+
`;
|
|
4142
|
+
var MultipleSelectTableField = forwardRef(function MultipleSelectTableField2(_A, ref) {
|
|
4143
|
+
var _B = _A, {
|
|
4144
|
+
tableColumn,
|
|
4145
|
+
label = "",
|
|
4146
|
+
required,
|
|
4147
|
+
value = [],
|
|
4148
|
+
onChange,
|
|
4149
|
+
hideLabel = false
|
|
4150
|
+
} = _B, restOfProps = __objRest(_B, [
|
|
4151
|
+
"tableColumn",
|
|
4152
|
+
"label",
|
|
4153
|
+
"required",
|
|
4154
|
+
"value",
|
|
4155
|
+
"onChange",
|
|
4156
|
+
"hideLabel"
|
|
4157
|
+
]);
|
|
4158
|
+
const handle = useRef({
|
|
4159
|
+
validity: {
|
|
4160
|
+
valueMissing: required === true && value.length === 0,
|
|
4161
|
+
typeMismatch: false
|
|
4162
|
+
}
|
|
4163
|
+
});
|
|
4164
|
+
useImperativeHandle(ref, () => handle.current, []);
|
|
4165
|
+
function handleChange(event) {
|
|
4166
|
+
handle.current.validity.valueMissing = required === true && !event.currentTarget.checked && value.filter((v) => v !== event.currentTarget.value).length === 0;
|
|
4167
|
+
onChange(event);
|
|
4168
|
+
}
|
|
4169
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
4170
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(MainLabel, {
|
|
4171
|
+
children: label
|
|
4172
|
+
}), tableColumn.options.map((option) => /* @__PURE__ */ jsxs(StyledLabel$1, {
|
|
4173
|
+
htmlFor: option.id,
|
|
4174
|
+
children: [/* @__PURE__ */ jsx(CheckboxContainer, {
|
|
4175
|
+
children: /* @__PURE__ */ jsx(Checkbox, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4176
|
+
"aria-label": label,
|
|
4177
|
+
onChange: handleChange,
|
|
4178
|
+
checked: value.includes(option.name),
|
|
4179
|
+
id: option.id,
|
|
4180
|
+
value: option.name
|
|
4181
|
+
}))
|
|
4182
|
+
}), option.name]
|
|
4183
|
+
}, option.id))]
|
|
4184
|
+
});
|
|
4185
|
+
});
|
|
4186
|
+
function getCheckmarkColor({
|
|
4187
|
+
swatch: {
|
|
4188
|
+
hue: h,
|
|
4189
|
+
saturation: s,
|
|
4190
|
+
lightness: l
|
|
4191
|
+
} = {
|
|
4192
|
+
hue: 0,
|
|
4193
|
+
saturation: 0,
|
|
4194
|
+
lightness: 0
|
|
4195
|
+
},
|
|
4196
|
+
alpha: a
|
|
4197
|
+
}) {
|
|
4198
|
+
return ColorHelper({
|
|
4199
|
+
h,
|
|
4200
|
+
s,
|
|
4201
|
+
l
|
|
4202
|
+
}).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
|
|
4203
|
+
}
|
|
4204
|
+
const Container$5 = styled.div`
|
|
4205
|
+
position: relative;
|
|
4206
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
4207
|
+
height: ${getSizeHeight(size)}px;
|
|
4208
|
+
width: ${getSizeHeight(size)}px;
|
|
4209
|
+
`)}
|
|
4210
|
+
`;
|
|
4211
|
+
const FakeRadioButton = styled.div`
|
|
4212
|
+
position: absolute;
|
|
4213
|
+
width: 100%;
|
|
4214
|
+
height: 100%;
|
|
4215
|
+
border-style: solid;
|
|
4216
|
+
border-radius: 50%;
|
|
4217
|
+
pointer-events: none;
|
|
4218
|
+
border-width: 1px;
|
|
4219
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
|
|
4220
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
4221
|
+
background-color: ${getContrastBackgroundColor(contrast)};
|
|
4222
|
+
`)}
|
|
4223
|
+
`;
|
|
4224
|
+
const HiddenRadioButton = styled.input.attrs({
|
|
4225
|
+
type: "radio"
|
|
4226
|
+
})`
|
|
4227
|
+
position: absolute;
|
|
4228
|
+
opacity: 0;
|
|
4229
|
+
width: 100%;
|
|
4230
|
+
height: 100%;
|
|
4231
|
+
cursor: pointer;
|
|
4232
|
+
|
|
4233
|
+
&:disabled {
|
|
4234
|
+
cursor: no-drop;
|
|
4235
|
+
|
|
4236
|
+
& ~ ${FakeRadioButton} {
|
|
4237
|
+
opacity: 0.5;
|
|
4238
|
+
}
|
|
4239
|
+
}
|
|
4240
|
+
|
|
4241
|
+
&:checked ~ ${FakeRadioButton} {
|
|
4242
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4243
|
+
swatch: {
|
|
4244
|
+
hue: 0,
|
|
4245
|
+
saturation: 0,
|
|
4246
|
+
lightness: 0
|
|
4247
|
+
},
|
|
4248
|
+
alpha: 1
|
|
4249
|
+
}]) => css`
|
|
4250
|
+
background-color: ${colorToString(brandColor)};
|
|
4251
|
+
`)}
|
|
4252
|
+
border-color: transparent;
|
|
4253
|
+
|
|
4254
|
+
&::after {
|
|
4255
|
+
content: '';
|
|
4256
|
+
position: absolute;
|
|
4257
|
+
box-sizing: content-box;
|
|
4258
|
+
top: 50%;
|
|
4259
|
+
left: 50%;
|
|
4260
|
+
width: 50%;
|
|
4261
|
+
height: 50%;
|
|
4262
|
+
border-radius: 50%;
|
|
4263
|
+
transform: translate(-50%, -50%);
|
|
4264
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4265
|
+
swatch: {
|
|
4266
|
+
hue: 0,
|
|
4267
|
+
saturation: 0,
|
|
4268
|
+
lightness: 0
|
|
4269
|
+
},
|
|
4270
|
+
alpha: 1
|
|
4271
|
+
}]) => css`
|
|
4272
|
+
background-color: ${getCheckmarkColor(brandColor)};
|
|
4273
|
+
`)}
|
|
4274
|
+
}
|
|
4275
|
+
}
|
|
4276
|
+
|
|
4277
|
+
&:not(:disabled) {
|
|
4278
|
+
&:focus ~ ${FakeRadioButton} {
|
|
4279
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4280
|
+
swatch: {
|
|
4281
|
+
hue: 0,
|
|
4282
|
+
saturation: 0,
|
|
4283
|
+
lightness: 0
|
|
4284
|
+
},
|
|
4285
|
+
alpha: 1
|
|
4286
|
+
}]) => css`
|
|
4287
|
+
border-color: ${colorToString(brandColor)};
|
|
4288
|
+
`)}
|
|
4289
|
+
}
|
|
4290
|
+
}
|
|
4291
|
+
|
|
4292
|
+
&:not(:disabled):checked {
|
|
4293
|
+
&:focus ~ ${FakeRadioButton} {
|
|
4294
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
|
|
4295
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
4296
|
+
`)}
|
|
4297
|
+
}
|
|
4298
|
+
}
|
|
4299
|
+
`;
|
|
4300
|
+
var RadioButton = forwardRef(function RadioButton2(_C, ref) {
|
|
4301
|
+
var _D = _C, {
|
|
4302
|
+
error,
|
|
4303
|
+
className,
|
|
4304
|
+
style,
|
|
4305
|
+
form
|
|
4306
|
+
} = _D, restOfProps = __objRest(_D, [
|
|
4307
|
+
"error",
|
|
4308
|
+
"className",
|
|
4309
|
+
"style",
|
|
4310
|
+
"form"
|
|
4311
|
+
]);
|
|
4312
|
+
const {
|
|
4313
|
+
size,
|
|
4314
|
+
contrast,
|
|
4315
|
+
brandColor
|
|
4316
|
+
} = useFormContext();
|
|
4317
|
+
return /* @__PURE__ */ jsxs(Container$5, {
|
|
4318
|
+
size,
|
|
4319
|
+
children: [/* @__PURE__ */ jsx(HiddenRadioButton, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4320
|
+
ref,
|
|
4321
|
+
error,
|
|
4322
|
+
contrast,
|
|
4323
|
+
brandColor
|
|
4324
|
+
})), /* @__PURE__ */ jsx(FakeRadioButton, {
|
|
4325
|
+
className,
|
|
4326
|
+
error,
|
|
4327
|
+
contrast,
|
|
4328
|
+
style
|
|
4329
|
+
})]
|
|
4330
|
+
});
|
|
4331
|
+
});
|
|
4332
|
+
const StyledLabel = styled(Label$1)`
|
|
4333
|
+
display: flex;
|
|
4334
|
+
align-items: center;
|
|
4335
|
+
margin: 8px 0;
|
|
4336
|
+
|
|
4337
|
+
&:last-of-type {
|
|
4338
|
+
margin-bottom: 0;
|
|
4339
|
+
}
|
|
4340
|
+
`;
|
|
4341
|
+
const RadioButtonContainer = styled.span`
|
|
4342
|
+
margin-right: 8px;
|
|
4343
|
+
`;
|
|
4344
|
+
var TableColumnRadioButtonGroup = forwardRef(function TableColumnRadioButtonGroup2(_E, ref) {
|
|
4345
|
+
var _F = _E, {
|
|
4346
|
+
tableColumn,
|
|
4347
|
+
label = "",
|
|
4348
|
+
value = "",
|
|
4349
|
+
required = false,
|
|
4350
|
+
hideLabel = false,
|
|
4351
|
+
onChange
|
|
4352
|
+
} = _F, restOfProps = __objRest(_F, [
|
|
4353
|
+
"tableColumn",
|
|
4354
|
+
"label",
|
|
4355
|
+
"value",
|
|
4356
|
+
"required",
|
|
4357
|
+
"hideLabel",
|
|
4358
|
+
"onChange"
|
|
4359
|
+
]);
|
|
4360
|
+
const handle = useRef({
|
|
4361
|
+
validity: {
|
|
4362
|
+
valueMissing: required === true && value === "",
|
|
4363
|
+
typeMismatch: false
|
|
4364
|
+
}
|
|
4365
|
+
});
|
|
4366
|
+
useImperativeHandle(ref, () => handle.current, []);
|
|
4367
|
+
function handleChange(event) {
|
|
4368
|
+
handle.current.validity.valueMissing = required === true && !event.currentTarget.checked;
|
|
4369
|
+
onChange(event);
|
|
4370
|
+
}
|
|
4371
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
4372
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4373
|
+
as: "p",
|
|
4374
|
+
children: label
|
|
4375
|
+
}), tableColumn.options.map((option) => /* @__PURE__ */ jsxs(StyledLabel, {
|
|
4376
|
+
htmlFor: option.id,
|
|
4377
|
+
"aria-label": label,
|
|
4378
|
+
children: [/* @__PURE__ */ jsx(RadioButtonContainer, {
|
|
4379
|
+
children: /* @__PURE__ */ jsx(RadioButton, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4380
|
+
onChange: handleChange,
|
|
4381
|
+
checked: value === option.name,
|
|
4382
|
+
id: option.id,
|
|
4383
|
+
value: option.name
|
|
4384
|
+
}))
|
|
4385
|
+
}), option.name]
|
|
4386
|
+
}, option.id))]
|
|
4387
|
+
});
|
|
4388
|
+
});
|
|
4389
|
+
const Container$4 = styled.div`
|
|
4390
|
+
${cssField()}
|
|
4391
|
+
display: flex;
|
|
4392
|
+
align-items: center;
|
|
4393
|
+
position: relative;
|
|
4394
|
+
user-select: none;
|
|
4395
|
+
border-color: #f19eb9;
|
|
4396
|
+
|
|
4397
|
+
&:focus,
|
|
4398
|
+
&:focus-within {
|
|
4399
|
+
border-color: #e54e7f;
|
|
4400
|
+
}
|
|
4401
|
+
|
|
4402
|
+
${(props) => cssMediaRules([props.size, props.contrast], ([size = Sizes.MEDIUM, contrast = Contrasts.LIGHT]) => css`
|
|
4403
|
+
min-height: ${getSizeHeight$2(size)}px;
|
|
4404
|
+
max-height: ${getSizeHeight$2(size)}px;
|
|
4405
|
+
|
|
4406
|
+
&::after {
|
|
4407
|
+
content: '';
|
|
4408
|
+
position: absolute;
|
|
4409
|
+
right: ${getSizeHorizontalPadding(size)}px;
|
|
4410
|
+
top: 50%;
|
|
4411
|
+
transform: translate3d(0, -25%, 0);
|
|
4412
|
+
border: solid 0.35em transparent;
|
|
4413
|
+
border-top-color: ${getContrastColor$1(contrast)};
|
|
4414
|
+
}
|
|
4415
|
+
`)}
|
|
4416
|
+
`;
|
|
4417
|
+
const Select = styled.select`
|
|
4418
|
+
appearance: none;
|
|
4419
|
+
position: absolute;
|
|
4420
|
+
top: 0;
|
|
4421
|
+
left: 0;
|
|
4422
|
+
opacity: 0;
|
|
4423
|
+
width: 100%;
|
|
4424
|
+
height: 100%;
|
|
4425
|
+
`;
|
|
4426
|
+
var TableColumnSingleSelect = forwardRef(function TableColumnSingleSelect2(_G, ref) {
|
|
4427
|
+
var _H = _G, {
|
|
4428
|
+
id,
|
|
4429
|
+
tableColumn,
|
|
4430
|
+
value = "",
|
|
4431
|
+
label = "",
|
|
4432
|
+
error = false,
|
|
4433
|
+
hideLabel = false,
|
|
4434
|
+
form
|
|
4435
|
+
} = _H, restOfProps = __objRest(_H, [
|
|
4436
|
+
"id",
|
|
4437
|
+
"tableColumn",
|
|
4438
|
+
"value",
|
|
4439
|
+
"label",
|
|
4440
|
+
"error",
|
|
4441
|
+
"hideLabel",
|
|
4442
|
+
"form"
|
|
4443
|
+
]);
|
|
4444
|
+
const {
|
|
4445
|
+
shape,
|
|
4446
|
+
size,
|
|
4447
|
+
contrast,
|
|
4448
|
+
brandColor
|
|
4449
|
+
} = useFormContext();
|
|
4450
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4451
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4452
|
+
htmlFor: id,
|
|
4453
|
+
children: label
|
|
4454
|
+
}), /* @__PURE__ */ jsxs(Container$4, {
|
|
4455
|
+
error,
|
|
4456
|
+
shape,
|
|
4457
|
+
size,
|
|
4458
|
+
contrast,
|
|
4459
|
+
brandColor,
|
|
4460
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
4461
|
+
children: value === "" ? "-" : value
|
|
4462
|
+
}), /* @__PURE__ */ jsxs(Select, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4463
|
+
"aria-label": label,
|
|
4464
|
+
ref,
|
|
4465
|
+
id,
|
|
4466
|
+
value,
|
|
4467
|
+
children: [/* @__PURE__ */ jsx("option", {
|
|
4468
|
+
value: "",
|
|
4469
|
+
children: "-"
|
|
4470
|
+
}), tableColumn.options.map((option) => /* @__PURE__ */ jsx("option", {
|
|
4471
|
+
value: option.name,
|
|
4472
|
+
children: option.name
|
|
4473
|
+
}, option.id))]
|
|
4474
|
+
}))]
|
|
4475
|
+
})]
|
|
4476
|
+
});
|
|
4477
|
+
});
|
|
4478
|
+
var SingleSelectTableField = forwardRef(function SingleSelectTableField2(_I, ref) {
|
|
4479
|
+
var _J = _I, {
|
|
4480
|
+
type
|
|
4481
|
+
} = _J, restOfProps = __objRest(_J, [
|
|
4482
|
+
"type"
|
|
4483
|
+
]);
|
|
4484
|
+
return type === "select" ? /* @__PURE__ */ jsx(TableColumnSingleSelect, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4485
|
+
ref
|
|
4486
|
+
})) : /* @__PURE__ */ jsx(TableColumnRadioButtonGroup, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4487
|
+
ref
|
|
4488
|
+
}));
|
|
4489
|
+
});
|
|
4490
|
+
var PhoneNumberTableField = forwardRef(function PhoneNumberTableField2(_K, ref) {
|
|
4491
|
+
var _L = _K, {
|
|
4492
|
+
id,
|
|
4493
|
+
label = "",
|
|
4494
|
+
name,
|
|
4495
|
+
error,
|
|
4496
|
+
hideLabel = false
|
|
4497
|
+
} = _L, restOfProps = __objRest(_L, [
|
|
4498
|
+
"id",
|
|
4499
|
+
"label",
|
|
4500
|
+
"name",
|
|
4501
|
+
"error",
|
|
4502
|
+
"hideLabel"
|
|
4503
|
+
]);
|
|
4504
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4505
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4506
|
+
htmlFor: id,
|
|
4507
|
+
children: label
|
|
4508
|
+
}), /* @__PURE__ */ jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4509
|
+
"aria-label": label,
|
|
4510
|
+
ref,
|
|
4511
|
+
id,
|
|
4512
|
+
name,
|
|
4513
|
+
type: "tel",
|
|
4514
|
+
error: error != null
|
|
4515
|
+
}))]
|
|
4516
|
+
});
|
|
4517
|
+
});
|
|
4518
|
+
var EmailTableField = forwardRef(function EmailTableField2(_M, ref) {
|
|
4519
|
+
var _N = _M, {
|
|
4520
|
+
id,
|
|
4521
|
+
label = "",
|
|
4522
|
+
name,
|
|
4523
|
+
error,
|
|
4524
|
+
hideLabel = false
|
|
4525
|
+
} = _N, restOfProps = __objRest(_N, [
|
|
4526
|
+
"id",
|
|
4527
|
+
"label",
|
|
4528
|
+
"name",
|
|
4529
|
+
"error",
|
|
4530
|
+
"hideLabel"
|
|
4531
|
+
]);
|
|
4532
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4533
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4534
|
+
htmlFor: id,
|
|
4535
|
+
children: label
|
|
4536
|
+
}), /* @__PURE__ */ jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4537
|
+
"aria-label": label,
|
|
4538
|
+
ref,
|
|
4539
|
+
id,
|
|
4540
|
+
name,
|
|
4541
|
+
type: "email",
|
|
4542
|
+
error: error != null
|
|
4543
|
+
}))]
|
|
4544
|
+
});
|
|
4545
|
+
});
|
|
4546
|
+
var URLTableField = forwardRef(function URLTableField2(_O, ref) {
|
|
4547
|
+
var _P = _O, {
|
|
4548
|
+
id,
|
|
4549
|
+
label = "",
|
|
4550
|
+
name,
|
|
4551
|
+
error,
|
|
4552
|
+
hideLabel = false
|
|
4553
|
+
} = _P, restOfProps = __objRest(_P, [
|
|
4554
|
+
"id",
|
|
4555
|
+
"label",
|
|
4556
|
+
"name",
|
|
4557
|
+
"error",
|
|
4558
|
+
"hideLabel"
|
|
4559
|
+
]);
|
|
4560
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4561
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4562
|
+
htmlFor: id,
|
|
4563
|
+
children: label
|
|
4564
|
+
}), /* @__PURE__ */ jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4565
|
+
"aria-label": label,
|
|
4566
|
+
ref,
|
|
4567
|
+
id,
|
|
4568
|
+
name,
|
|
4569
|
+
type: "url",
|
|
4570
|
+
error: error != null
|
|
4571
|
+
}))]
|
|
4572
|
+
});
|
|
4573
|
+
});
|
|
4574
|
+
var NumberTableField = forwardRef(function NumberTableField2(_Q, ref) {
|
|
4575
|
+
var _R = _Q, {
|
|
4576
|
+
id,
|
|
4577
|
+
label = "",
|
|
4578
|
+
name,
|
|
4579
|
+
error,
|
|
4580
|
+
hideLabel = false
|
|
4581
|
+
} = _R, restOfProps = __objRest(_R, [
|
|
4582
|
+
"id",
|
|
4583
|
+
"label",
|
|
4584
|
+
"name",
|
|
4585
|
+
"error",
|
|
4586
|
+
"hideLabel"
|
|
4587
|
+
]);
|
|
4588
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4589
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4590
|
+
htmlFor: id,
|
|
4591
|
+
children: label
|
|
4592
|
+
}), /* @__PURE__ */ jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4593
|
+
"aria-label": label,
|
|
4594
|
+
ref,
|
|
4595
|
+
id,
|
|
4596
|
+
name,
|
|
4597
|
+
type: "number",
|
|
4598
|
+
error: error != null
|
|
4599
|
+
}))]
|
|
4600
|
+
});
|
|
4601
|
+
});
|
|
4602
|
+
const Label = styled.div`
|
|
4603
|
+
display: block;
|
|
4604
|
+
max-width: 120px;
|
|
4605
|
+
min-width: 60px;
|
|
4606
|
+
border-radius: 2px;
|
|
4607
|
+
background-color: #5f49f4;
|
|
4608
|
+
opacity: 0.4;
|
|
4609
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
4610
|
+
margin: calc(0.25 * ${getSizeHeight(size)}px + 2px) 0;
|
|
4611
|
+
min-height: ${0.5 * getSizeHeight(size)}px;
|
|
4612
|
+
max-height: ${0.5 * getSizeHeight(size)}px;
|
|
4613
|
+
`)}
|
|
4614
|
+
`;
|
|
4615
|
+
const Input2 = styled.div`
|
|
4616
|
+
display: block;
|
|
4617
|
+
width: 100%;
|
|
4618
|
+
border-width: 2px;
|
|
4619
|
+
border-style: solid;
|
|
4620
|
+
border-color: #5f49f4;
|
|
4621
|
+
opacity: 0.4;
|
|
4622
|
+
${(props) => cssMediaRules([props.shape, props.size], ([shape = Shapes.ROUNDED, size = Sizes.MEDIUM]) => css`
|
|
4623
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
4624
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
4625
|
+
border-radius: ${getShapeBorderRadius(shape)}px;
|
|
4626
|
+
`)}
|
|
4627
|
+
`;
|
|
4628
|
+
function PlaceholderTableField() {
|
|
4629
|
+
const {
|
|
4630
|
+
size,
|
|
4631
|
+
shape
|
|
4632
|
+
} = useFormContext();
|
|
4633
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4634
|
+
children: [/* @__PURE__ */ jsx(Label, {
|
|
4635
|
+
size
|
|
4636
|
+
}), /* @__PURE__ */ jsx(Input2, {
|
|
4637
|
+
shape,
|
|
4638
|
+
size
|
|
4639
|
+
})]
|
|
4640
|
+
});
|
|
4641
|
+
}
|
|
4642
|
+
function getTypeMismatchErrorMessage(tableColumn, label) {
|
|
4643
|
+
switch ((tableColumn || {}).__typename) {
|
|
4644
|
+
case "PhoneNumberTableColumn":
|
|
4645
|
+
return `${label} field must be a valid phone number.`;
|
|
4646
|
+
case "EmailTableColumn":
|
|
4647
|
+
return `${label} field must be a valid email.`;
|
|
4648
|
+
case "URLTableColumn":
|
|
4649
|
+
return `${label} field must be a valid URL.`;
|
|
4650
|
+
case "NumberTableColumn":
|
|
4651
|
+
return `${label} field must be a valid number.`;
|
|
4652
|
+
case "SingleLineTextTableColumn":
|
|
4653
|
+
case "LongTextTableColumn":
|
|
4654
|
+
case "CheckboxTableColumn":
|
|
4655
|
+
default:
|
|
4656
|
+
return `${label} field is invalid.`;
|
|
4657
|
+
}
|
|
4658
|
+
}
|
|
4659
|
+
function getTableColumnField(tableColumn) {
|
|
4660
|
+
switch ((tableColumn || {}).__typename) {
|
|
4661
|
+
case "SingleLineTextTableColumn":
|
|
4662
|
+
return SingleLineTextTableField;
|
|
4663
|
+
case "LongTextTableColumn":
|
|
4664
|
+
return LongTextTableField;
|
|
4665
|
+
case "CheckboxTableColumn":
|
|
4666
|
+
return CheckboxTableField;
|
|
4667
|
+
case "MultipleSelectTableColumn":
|
|
4668
|
+
return MultipleSelectTableField;
|
|
4669
|
+
case "SingleSelectTableColumn":
|
|
4670
|
+
return SingleSelectTableField;
|
|
4671
|
+
case "PhoneNumberTableColumn":
|
|
4672
|
+
return PhoneNumberTableField;
|
|
4673
|
+
case "EmailTableColumn":
|
|
4674
|
+
return EmailTableField;
|
|
4675
|
+
case "URLTableColumn":
|
|
4676
|
+
return URLTableField;
|
|
4677
|
+
case "NumberTableColumn":
|
|
4678
|
+
return NumberTableField;
|
|
4679
|
+
default:
|
|
4680
|
+
return SingleLineTextTableField;
|
|
4681
|
+
}
|
|
4682
|
+
}
|
|
4683
|
+
function Field({
|
|
4684
|
+
tableColumn,
|
|
4685
|
+
tableFormField: {
|
|
4686
|
+
id,
|
|
4687
|
+
label = "",
|
|
4688
|
+
placeholder: placeholder2,
|
|
4689
|
+
required = false,
|
|
4690
|
+
hidden = false,
|
|
4691
|
+
type = "radio",
|
|
4692
|
+
hideLabel = false
|
|
4693
|
+
}
|
|
4694
|
+
}) {
|
|
4695
|
+
const TableColumnField = getTableColumnField(tableColumn);
|
|
4696
|
+
const input = useRef(null);
|
|
4697
|
+
if (!tableColumn)
|
|
4698
|
+
return /* @__PURE__ */ jsx(PlaceholderTableField, {});
|
|
4699
|
+
function validate() {
|
|
4700
|
+
let errorMessage;
|
|
4701
|
+
if (input.current) {
|
|
4702
|
+
const {
|
|
4703
|
+
validity = {}
|
|
4704
|
+
} = input.current;
|
|
4705
|
+
if (validity.valueMissing)
|
|
4706
|
+
errorMessage = `${label} is required.`;
|
|
4707
|
+
if (validity.typeMismatch)
|
|
4708
|
+
errorMessage = getTypeMismatchErrorMessage(tableColumn, label);
|
|
4709
|
+
}
|
|
4710
|
+
return errorMessage;
|
|
4711
|
+
}
|
|
4712
|
+
return /* @__PURE__ */ jsx(Field$1, {
|
|
4713
|
+
name: tableColumn.name,
|
|
4714
|
+
validate,
|
|
4715
|
+
children: ({
|
|
4716
|
+
field,
|
|
4717
|
+
form
|
|
4718
|
+
}) => hidden ? /* @__PURE__ */ jsx("input", __spreadProps(__spreadValues({}, field), {
|
|
4719
|
+
ref: input,
|
|
4720
|
+
type: "hidden"
|
|
4721
|
+
})) : /* @__PURE__ */ jsx(TableColumnField, __spreadProps(__spreadValues({}, field), {
|
|
4722
|
+
type,
|
|
4723
|
+
form,
|
|
4724
|
+
tableColumn,
|
|
4725
|
+
ref: input,
|
|
4726
|
+
id,
|
|
4727
|
+
error: getIn(form.touched, field.name) && getIn(form.errors, field.name),
|
|
4728
|
+
label,
|
|
4729
|
+
placeholder: placeholder2,
|
|
4730
|
+
required,
|
|
4731
|
+
hideLabel
|
|
4732
|
+
}))
|
|
4733
|
+
});
|
|
4734
|
+
}
|
|
4735
|
+
var _g;
|
|
4736
|
+
function _extends$t() {
|
|
4737
|
+
_extends$t = Object.assign || function(target) {
|
|
4738
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
4739
|
+
var source = arguments[i];
|
|
4740
|
+
for (var key in source) {
|
|
4741
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
4742
|
+
target[key] = source[key];
|
|
4743
|
+
}
|
|
4744
|
+
}
|
|
4745
|
+
}
|
|
4746
|
+
return target;
|
|
4747
|
+
};
|
|
4748
|
+
return _extends$t.apply(this, arguments);
|
|
4749
|
+
}
|
|
4750
|
+
var SvgSpinner20 = function SvgSpinner202(props) {
|
|
4751
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$t({
|
|
4752
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4753
|
+
width: 20,
|
|
4754
|
+
height: 20
|
|
4755
|
+
}, props), _g || (_g = /* @__PURE__ */ React.createElement("g", {
|
|
4756
|
+
fill: "none",
|
|
4757
|
+
strokeWidth: 2,
|
|
4758
|
+
transform: "translate(1 1)"
|
|
4759
|
+
}, /* @__PURE__ */ React.createElement("circle", {
|
|
4760
|
+
stroke: "currentColor",
|
|
4761
|
+
cx: 9,
|
|
4762
|
+
cy: 9,
|
|
4763
|
+
r: 9,
|
|
4764
|
+
strokeOpacity: 0.4
|
|
4765
|
+
}), /* @__PURE__ */ React.createElement("path", {
|
|
4766
|
+
d: "M9 18A9 9 0 0 0 9 0"
|
|
4767
|
+
}))));
|
|
4768
|
+
};
|
|
4769
|
+
const spin = keyframes`
|
|
4770
|
+
from {
|
|
4771
|
+
transform: rotate(0deg);
|
|
4772
|
+
}
|
|
4773
|
+
to {
|
|
4774
|
+
transform: rotate(360deg);
|
|
4775
|
+
}
|
|
4776
|
+
`;
|
|
4777
|
+
const Icon = styled(SvgSpinner20)`
|
|
4778
|
+
display: inline-flex;
|
|
4779
|
+
animation: ${spin} 1s linear infinite;
|
|
4780
|
+
stroke: currentColor;
|
|
4781
|
+
`;
|
|
4782
|
+
function Spinner() {
|
|
4783
|
+
return /* @__PURE__ */ jsx(Icon, {});
|
|
4784
|
+
}
|
|
4785
|
+
function useTableFormFieldRefs(propController, { fieldsCount }) {
|
|
4786
|
+
const [container, setContainer] = useState(null);
|
|
4787
|
+
const [items, setItems] = useState(Array(fieldsCount + 1).fill(null));
|
|
4788
|
+
const isInBuilder = useIsInBuilder();
|
|
4789
|
+
useEffect(() => {
|
|
4790
|
+
if (!isInBuilder)
|
|
4791
|
+
return;
|
|
4792
|
+
let animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
|
|
4793
|
+
return () => {
|
|
4794
|
+
cancelAnimationFrame(animationFrameHandle);
|
|
4795
|
+
};
|
|
4796
|
+
function handleAnimationFrameRequest() {
|
|
4797
|
+
if (propController == null)
|
|
4798
|
+
return;
|
|
4799
|
+
if (container != null)
|
|
4800
|
+
propController.tableFormLayoutChange({ layout: getBox(container) });
|
|
4801
|
+
items.map((item, index) => {
|
|
4802
|
+
if (item == null)
|
|
4803
|
+
return;
|
|
4804
|
+
propController.tableFormFieldLayoutChange({ index, layout: getBox(item) });
|
|
4805
|
+
});
|
|
4806
|
+
animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
|
|
4807
|
+
}
|
|
4808
|
+
}, [propController, container, items, isInBuilder]);
|
|
4809
|
+
const itemRefs = useMemo(() => Array.from({ length: fieldsCount + 1 }).map((_, index) => (item) => {
|
|
4810
|
+
setItems((is) => [...is.slice(0, index), item, ...is.slice(index + 1)]);
|
|
4811
|
+
}), [fieldsCount, setItems]);
|
|
4812
|
+
return { container: setContainer, items: itemRefs };
|
|
4813
|
+
}
|
|
4814
|
+
const LOCAL_STORAGE_NAMESPACE = "@@makeswift/components/form";
|
|
4815
|
+
function getSizeFontSize(size) {
|
|
4816
|
+
switch (size) {
|
|
4817
|
+
case Sizes.SMALL:
|
|
4818
|
+
return 12;
|
|
4819
|
+
case Sizes.MEDIUM:
|
|
4820
|
+
return 14;
|
|
4821
|
+
case Sizes.LARGE:
|
|
4822
|
+
return 18;
|
|
4823
|
+
default:
|
|
4824
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
4825
|
+
}
|
|
4826
|
+
}
|
|
4827
|
+
const Alignments = {
|
|
4828
|
+
LEFT: "left",
|
|
4829
|
+
CENTER: "center",
|
|
4830
|
+
RIGHT: "right"
|
|
4831
|
+
};
|
|
4832
|
+
const GridForm = styled.form`
|
|
4833
|
+
display: flex;
|
|
4834
|
+
flex-wrap: wrap;
|
|
4835
|
+
width: 100%;
|
|
4836
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
4837
|
+
font-size: ${getSizeFontSize(size)}px;
|
|
4838
|
+
`)}
|
|
4839
|
+
${cssWidth()}
|
|
4840
|
+
${cssMargin()}
|
|
4841
|
+
`;
|
|
4842
|
+
const GridItem$1 = styled.div`
|
|
4843
|
+
align-self: flex-end;
|
|
4844
|
+
flex-direction: column;
|
|
4845
|
+
${cssGridItem()}
|
|
4846
|
+
`;
|
|
4847
|
+
function getAlignmentMargin(alignment) {
|
|
4848
|
+
switch (alignment) {
|
|
4849
|
+
case Alignments.LEFT:
|
|
4850
|
+
return "0 auto 0 0";
|
|
4851
|
+
case Alignments.RIGHT:
|
|
4852
|
+
return "0 0 0 auto";
|
|
4853
|
+
default:
|
|
4854
|
+
return "0 auto";
|
|
4855
|
+
}
|
|
4856
|
+
}
|
|
4857
|
+
const StyledButton = styled((props) => /* @__PURE__ */ jsx(Button$1, __spreadProps(__spreadValues({}, props), {
|
|
4858
|
+
as: "button"
|
|
4859
|
+
})))`
|
|
4860
|
+
display: flex;
|
|
4861
|
+
align-items: center;
|
|
4862
|
+
justify-content: center;
|
|
4863
|
+
${(props) => cssMediaRules([props.size, props.alignment], ([size = Sizes.MEDIUM, alignment = Alignments.CENTER]) => css`
|
|
4864
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
4865
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
4866
|
+
margin: ${getAlignmentMargin(alignment)};
|
|
4867
|
+
padding-top: 0;
|
|
4868
|
+
padding-bottom: 0;
|
|
4869
|
+
`)}
|
|
4870
|
+
`;
|
|
4871
|
+
const ErrorContainer = styled.div`
|
|
4872
|
+
padding: 8px 16px;
|
|
4873
|
+
background-color: #f19eb9;
|
|
4874
|
+
border-radius: 4px;
|
|
4875
|
+
margin-top: 16px;
|
|
4876
|
+
`;
|
|
4877
|
+
const IconContainer = styled.div`
|
|
4878
|
+
fill: currentColor;
|
|
4879
|
+
`;
|
|
4880
|
+
const ErrorMessage = styled.p`
|
|
4881
|
+
font-size: 12px;
|
|
4882
|
+
margin: 8px 0;
|
|
4883
|
+
color: rgba(127, 0, 0, 0.95);
|
|
4884
|
+
`;
|
|
4885
|
+
function getTableColumnDefaultValue(tableColumn) {
|
|
4886
|
+
switch (tableColumn.__typename) {
|
|
4887
|
+
case "CheckboxTableColumn":
|
|
4888
|
+
return false;
|
|
4889
|
+
case "MultipleSelectTableColumn":
|
|
4890
|
+
return [];
|
|
4891
|
+
case "SingleLineTextTableColumn":
|
|
4892
|
+
case "LongTextTableColumn":
|
|
4893
|
+
case "SingleSelectTableColumn":
|
|
4894
|
+
case "PhoneNumberTableColumn":
|
|
4895
|
+
case "EmailTableColumn":
|
|
4896
|
+
case "URLTableColumn":
|
|
4897
|
+
case "NumberTableColumn":
|
|
4898
|
+
default:
|
|
4899
|
+
return "";
|
|
4900
|
+
}
|
|
4901
|
+
}
|
|
4902
|
+
const CREATE_TABLE_RECORD = gql`
|
|
4903
|
+
mutation CreateTableRecord($input: CreateTableRecordInput!) {
|
|
4904
|
+
createTableRecord(input: $input) {
|
|
4905
|
+
tableRecord {
|
|
4906
|
+
id
|
|
4907
|
+
}
|
|
4908
|
+
}
|
|
4909
|
+
}
|
|
4910
|
+
`;
|
|
4911
|
+
const Form = forwardRef(function Form2({
|
|
4912
|
+
id,
|
|
4913
|
+
tableId,
|
|
4914
|
+
fields: fieldsProp,
|
|
4915
|
+
submitLabel = "Submit",
|
|
4916
|
+
submitLink,
|
|
4917
|
+
shape,
|
|
4918
|
+
size,
|
|
4919
|
+
contrast,
|
|
4920
|
+
brandColor,
|
|
4921
|
+
gap,
|
|
4922
|
+
width,
|
|
4923
|
+
margin,
|
|
4924
|
+
submitTextStyle,
|
|
4925
|
+
submitVariant,
|
|
4926
|
+
submitTextColor,
|
|
4927
|
+
submitWidth,
|
|
4928
|
+
submitAlignment,
|
|
4929
|
+
labelTextStyle,
|
|
4930
|
+
labelTextColor
|
|
4931
|
+
}, ref) {
|
|
4932
|
+
const fields = useMemo(() => {
|
|
4933
|
+
var _a;
|
|
4934
|
+
return (_a = fieldsProp == null ? void 0 : fieldsProp.fields) != null ? _a : [];
|
|
4935
|
+
}, [fieldsProp]);
|
|
4936
|
+
const grid = useMemo(() => {
|
|
4937
|
+
var _a;
|
|
4938
|
+
return (_a = fieldsProp == null ? void 0 : fieldsProp.grid) != null ? _a : [];
|
|
4939
|
+
}, [fieldsProp]);
|
|
4940
|
+
const {
|
|
4941
|
+
data: {
|
|
4942
|
+
table
|
|
4943
|
+
} = {}
|
|
4944
|
+
} = useTable(tableId);
|
|
4945
|
+
const [createTableRecord] = useMutation(CREATE_TABLE_RECORD);
|
|
4946
|
+
const [refEl, setRefEl] = useState(null);
|
|
4947
|
+
const [propControllers, setPropControllers] = useState(null);
|
|
4948
|
+
const [initialValues, setInitialValues] = useState(() => fields.reduce((acc, formField) => {
|
|
4949
|
+
const tableColumn = table && table.columns.find((field) => field.id === formField.tableColumnId);
|
|
4950
|
+
const defaultValue = formField ? formField.defaultValue : null;
|
|
4951
|
+
if (tableColumn) {
|
|
4952
|
+
acc[tableColumn.name] = defaultValue == null ? getTableColumnDefaultValue(tableColumn) : defaultValue;
|
|
4953
|
+
}
|
|
4954
|
+
return acc;
|
|
4955
|
+
}, {}));
|
|
4956
|
+
const controller = propControllers == null ? void 0 : propControllers.fields;
|
|
4957
|
+
const {
|
|
4958
|
+
container,
|
|
4959
|
+
items
|
|
4960
|
+
} = useTableFormFieldRefs(controller, {
|
|
4961
|
+
fieldsCount: fields.length
|
|
4962
|
+
});
|
|
4963
|
+
const [isDone, setIsDone] = useState(false);
|
|
4964
|
+
const linkRef = useRef(null);
|
|
4965
|
+
useImperativeHandle(ref, () => ({
|
|
4966
|
+
getBoxModel() {
|
|
4967
|
+
return refEl instanceof Element ? getBox(refEl) : null;
|
|
4968
|
+
},
|
|
4969
|
+
setPropControllers
|
|
4970
|
+
}), [refEl, setPropControllers]);
|
|
4971
|
+
useEffect(() => {
|
|
4972
|
+
container(refEl);
|
|
4973
|
+
}, [container, refEl]);
|
|
4974
|
+
useEffect(() => {
|
|
4975
|
+
if (!isDone)
|
|
4976
|
+
return;
|
|
4977
|
+
let timeoutId = setTimeout(() => setIsDone(false), 2500);
|
|
4978
|
+
return () => clearTimeout(timeoutId);
|
|
4979
|
+
}, [isDone]);
|
|
4980
|
+
function getTableColumn({
|
|
4981
|
+
tableColumnId
|
|
4982
|
+
}) {
|
|
4983
|
+
return table && table.columns.find((field) => tableColumnId === field.id);
|
|
4984
|
+
}
|
|
4985
|
+
async function handleSubmit(values, {
|
|
4986
|
+
setSubmitting,
|
|
4987
|
+
resetForm,
|
|
4988
|
+
setStatus
|
|
4989
|
+
}) {
|
|
4990
|
+
if (table) {
|
|
4991
|
+
const columns = [];
|
|
4992
|
+
fields.forEach((field) => {
|
|
4993
|
+
const tableColumn = getTableColumn(field);
|
|
4994
|
+
if (tableColumn) {
|
|
4995
|
+
const data = values[tableColumn.name];
|
|
4996
|
+
if (data) {
|
|
4997
|
+
columns.push({
|
|
4998
|
+
columnId: field.tableColumnId,
|
|
4999
|
+
data
|
|
5000
|
+
});
|
|
5001
|
+
if (field.autofill) {
|
|
5002
|
+
localStorage.setItem(`${LOCAL_STORAGE_NAMESPACE}/${tableColumn.name}`, JSON.stringify(data));
|
|
5003
|
+
}
|
|
5004
|
+
}
|
|
5005
|
+
}
|
|
5006
|
+
});
|
|
5007
|
+
try {
|
|
5008
|
+
await createTableRecord({
|
|
5009
|
+
variables: {
|
|
5010
|
+
input: {
|
|
5011
|
+
data: {
|
|
5012
|
+
tableId: table.id,
|
|
5013
|
+
columns
|
|
5014
|
+
}
|
|
5015
|
+
}
|
|
5016
|
+
}
|
|
5017
|
+
});
|
|
5018
|
+
setIsDone(true);
|
|
5019
|
+
setInitialValues((prev) => fields.reduce((acc, field) => {
|
|
5020
|
+
const tableColumn = getTableColumn(field);
|
|
5021
|
+
if (tableColumn) {
|
|
5022
|
+
const data = values[tableColumn.name];
|
|
5023
|
+
if (data && field.autofill)
|
|
5024
|
+
return __spreadProps(__spreadValues({}, acc), {
|
|
5025
|
+
[tableColumn.name]: data
|
|
5026
|
+
});
|
|
5027
|
+
}
|
|
5028
|
+
return acc;
|
|
5029
|
+
}, __spreadValues({}, prev)));
|
|
5030
|
+
resetForm();
|
|
5031
|
+
if (linkRef.current != null)
|
|
5032
|
+
linkRef.current.click();
|
|
5033
|
+
} catch (error) {
|
|
5034
|
+
setStatus({
|
|
5035
|
+
error: "An unexpected error has occurred, please try again later"
|
|
5036
|
+
});
|
|
5037
|
+
} finally {
|
|
5038
|
+
setSubmitting(false);
|
|
5039
|
+
}
|
|
5040
|
+
}
|
|
5041
|
+
}
|
|
5042
|
+
useEffect(() => {
|
|
5043
|
+
setInitialValues((prev) => fields.reduce((acc, formField) => {
|
|
5044
|
+
const tableColumn = table && table.columns.find((field) => field.id === formField.tableColumnId);
|
|
5045
|
+
if (tableColumn && formField.autofill) {
|
|
5046
|
+
const storedValue = localStorage.getItem(`${LOCAL_STORAGE_NAMESPACE}/${tableColumn.name}`);
|
|
5047
|
+
if (storedValue) {
|
|
5048
|
+
try {
|
|
5049
|
+
acc[tableColumn.name] = JSON.parse(storedValue);
|
|
5050
|
+
} catch (e) {
|
|
5051
|
+
}
|
|
5052
|
+
}
|
|
5053
|
+
}
|
|
5054
|
+
return acc;
|
|
5055
|
+
}, __spreadValues({}, prev)));
|
|
5056
|
+
}, [fields, table]);
|
|
5057
|
+
const brandColorData = useColor(brandColor);
|
|
5058
|
+
return /* @__PURE__ */ jsx(Provider, {
|
|
5059
|
+
value: {
|
|
5060
|
+
shape,
|
|
5061
|
+
size,
|
|
5062
|
+
contrast,
|
|
5063
|
+
brandColor: brandColorData,
|
|
5064
|
+
labelTextStyle,
|
|
5065
|
+
labelTextColor
|
|
5066
|
+
},
|
|
5067
|
+
children: tableId == null ? /* @__PURE__ */ jsx(Placeholder$1, {
|
|
5068
|
+
ref: setRefEl,
|
|
5069
|
+
width,
|
|
5070
|
+
margin
|
|
5071
|
+
}) : /* @__PURE__ */ jsx(Fragment, {
|
|
5072
|
+
children: /* @__PURE__ */ jsx(Formik, {
|
|
5073
|
+
onSubmit: handleSubmit,
|
|
5074
|
+
initialValues,
|
|
5075
|
+
initialStatus: {
|
|
5076
|
+
error: null
|
|
5077
|
+
},
|
|
5078
|
+
enableReinitialize: true,
|
|
5079
|
+
children: (formik) => {
|
|
5080
|
+
const error = formik.status && formik.status.error;
|
|
5081
|
+
const errors = fields.map((field) => {
|
|
5082
|
+
const tableColumn = getTableColumn(field);
|
|
5083
|
+
return tableColumn && getIn(formik.touched, tableColumn.name) && getIn(formik.errors, tableColumn.name);
|
|
5084
|
+
}).filter((message) => typeof message === "string");
|
|
5085
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
5086
|
+
children: [/* @__PURE__ */ jsxs(GridForm, {
|
|
5087
|
+
ref: setRefEl,
|
|
5088
|
+
id,
|
|
5089
|
+
width,
|
|
5090
|
+
margin,
|
|
5091
|
+
size,
|
|
5092
|
+
onSubmit: formik.handleSubmit,
|
|
5093
|
+
onReset: formik.handleReset,
|
|
5094
|
+
noValidate: true,
|
|
5095
|
+
children: [fields.map((field, index) => {
|
|
5096
|
+
const tableColumn = getTableColumn(field);
|
|
5097
|
+
return /* @__PURE__ */ jsx(GridItem$1, {
|
|
5098
|
+
ref: items[index],
|
|
5099
|
+
grid,
|
|
5100
|
+
index,
|
|
5101
|
+
rowGap: gap,
|
|
5102
|
+
columnGap: gap,
|
|
5103
|
+
children: /* @__PURE__ */ jsx(Field, {
|
|
5104
|
+
tableColumn,
|
|
5105
|
+
tableFormField: field
|
|
5106
|
+
})
|
|
5107
|
+
}, field.id);
|
|
5108
|
+
}), /* @__PURE__ */ jsxs(GridItem$1, {
|
|
5109
|
+
ref: items[fields.length],
|
|
5110
|
+
grid,
|
|
5111
|
+
index: fields.length,
|
|
5112
|
+
rowGap: gap,
|
|
5113
|
+
columnGap: gap,
|
|
5114
|
+
children: [/* @__PURE__ */ jsx(StyledButton, {
|
|
5115
|
+
type: "submit",
|
|
5116
|
+
disabled: formik.isSubmitting || isDone,
|
|
5117
|
+
shape,
|
|
5118
|
+
size,
|
|
5119
|
+
color: brandColor,
|
|
5120
|
+
variant: submitVariant,
|
|
5121
|
+
textColor: submitTextColor,
|
|
5122
|
+
width: submitWidth,
|
|
5123
|
+
alignment: submitAlignment,
|
|
5124
|
+
textStyle: submitTextStyle,
|
|
5125
|
+
children: formik.isSubmitting ? /* @__PURE__ */ jsx(Spinner, {}) : isDone ? /* @__PURE__ */ jsx(IconContainer, {
|
|
5126
|
+
children: /* @__PURE__ */ jsx(SvgCheck12, {})
|
|
5127
|
+
}) : submitLabel
|
|
5128
|
+
}), (errors.length > 0 || error) && /* @__PURE__ */ jsxs(ErrorContainer, {
|
|
5129
|
+
children: [errors.map((message) => /* @__PURE__ */ jsx(ErrorMessage, {
|
|
5130
|
+
children: message
|
|
5131
|
+
}, message)), error != null && /* @__PURE__ */ jsx(ErrorMessage, {
|
|
5132
|
+
children: error
|
|
5133
|
+
})]
|
|
5134
|
+
})]
|
|
5135
|
+
})]
|
|
5136
|
+
}), submitLink != null && /* @__PURE__ */ jsx(Link, {
|
|
5137
|
+
ref: linkRef,
|
|
5138
|
+
hidden: true,
|
|
5139
|
+
link: submitLink
|
|
5140
|
+
})]
|
|
5141
|
+
});
|
|
5142
|
+
}
|
|
5143
|
+
})
|
|
5144
|
+
})
|
|
5145
|
+
});
|
|
5146
|
+
});
|
|
5147
|
+
function registerComponent$5(runtime) {
|
|
5148
|
+
return runtime.registerComponent(Form, {
|
|
5149
|
+
type: "./components/Form/index.js",
|
|
5150
|
+
label: "Form",
|
|
5151
|
+
icon: "Form40",
|
|
5152
|
+
props: {
|
|
5153
|
+
id: ElementID(),
|
|
5154
|
+
tableId: Table(),
|
|
5155
|
+
fields: TableFormFields(),
|
|
5156
|
+
submitLink: Link$1({
|
|
5157
|
+
label: "Redirect to",
|
|
5158
|
+
options: [{
|
|
5159
|
+
value: "OPEN_PAGE",
|
|
5160
|
+
label: "Open page"
|
|
5161
|
+
}, {
|
|
5162
|
+
value: "OPEN_URL",
|
|
5163
|
+
label: "Open URL"
|
|
5164
|
+
}]
|
|
5165
|
+
}),
|
|
5166
|
+
gap: GapY({
|
|
5167
|
+
preset: [{
|
|
5168
|
+
deviceId: "desktop",
|
|
5169
|
+
value: {
|
|
5170
|
+
value: 10,
|
|
5171
|
+
unit: "px"
|
|
5172
|
+
}
|
|
5173
|
+
}],
|
|
5174
|
+
label: "Gap",
|
|
5175
|
+
defaultValue: {
|
|
5176
|
+
value: 0,
|
|
5177
|
+
unit: "px"
|
|
5178
|
+
}
|
|
5179
|
+
}),
|
|
5180
|
+
shape: ResponsiveIconRadioGroup({
|
|
5181
|
+
label: "Shape",
|
|
5182
|
+
options: [{
|
|
5183
|
+
label: "Pill",
|
|
5184
|
+
value: Shapes.PILL,
|
|
5185
|
+
icon: "ButtonPill16"
|
|
5186
|
+
}, {
|
|
5187
|
+
label: "Rounded",
|
|
5188
|
+
value: Shapes.ROUNDED,
|
|
5189
|
+
icon: "ButtonRounded16"
|
|
5190
|
+
}, {
|
|
5191
|
+
label: "Square",
|
|
5192
|
+
value: Shapes.SQUARE,
|
|
5193
|
+
icon: "ButtonSquare16"
|
|
5194
|
+
}],
|
|
5195
|
+
defaultValue: Shapes.ROUNDED
|
|
5196
|
+
}),
|
|
5197
|
+
size: ResponsiveIconRadioGroup({
|
|
5198
|
+
label: "Size",
|
|
5199
|
+
options: [{
|
|
5200
|
+
label: "Small",
|
|
5201
|
+
value: Sizes.SMALL,
|
|
5202
|
+
icon: "SizeSmall16"
|
|
5203
|
+
}, {
|
|
5204
|
+
label: "Medium",
|
|
5205
|
+
value: Sizes.MEDIUM,
|
|
5206
|
+
icon: "SizeMedium16"
|
|
5207
|
+
}, {
|
|
5208
|
+
label: "Large",
|
|
5209
|
+
value: Sizes.LARGE,
|
|
5210
|
+
icon: "SizeLarge16"
|
|
5211
|
+
}],
|
|
5212
|
+
defaultValue: Sizes.MEDIUM
|
|
5213
|
+
}),
|
|
5214
|
+
contrast: ResponsiveIconRadioGroup({
|
|
5215
|
+
label: "Color",
|
|
5216
|
+
options: [{
|
|
5217
|
+
label: "Light mode",
|
|
5218
|
+
value: Contrasts.LIGHT,
|
|
5219
|
+
icon: "Sun16"
|
|
5220
|
+
}, {
|
|
5221
|
+
label: "Dark mode",
|
|
5222
|
+
value: Contrasts.DARK,
|
|
5223
|
+
icon: "Moon16"
|
|
5224
|
+
}],
|
|
5225
|
+
defaultValue: Contrasts.LIGHT
|
|
5226
|
+
}),
|
|
5227
|
+
labelTextStyle: TextStyle({
|
|
5228
|
+
label: "Label text style"
|
|
5229
|
+
}),
|
|
5230
|
+
labelTextColor: ResponsiveColor({
|
|
5231
|
+
label: "Label text color"
|
|
5232
|
+
}),
|
|
5233
|
+
submitTextStyle: TextStyle({
|
|
5234
|
+
label: "Button text style"
|
|
5235
|
+
}),
|
|
5236
|
+
brandColor: ResponsiveColor({
|
|
5237
|
+
label: "Button color",
|
|
5238
|
+
placeholder: "black"
|
|
5239
|
+
}),
|
|
5240
|
+
submitTextColor: ResponsiveColor({
|
|
5241
|
+
label: "Button text color",
|
|
5242
|
+
placeholder: "white"
|
|
5243
|
+
}),
|
|
5244
|
+
submitLabel: TextInput({
|
|
5245
|
+
label: "Button label",
|
|
5246
|
+
placeholder: "Submit"
|
|
5247
|
+
}),
|
|
5248
|
+
submitVariant: ResponsiveSelect({
|
|
5249
|
+
label: "Button style",
|
|
5250
|
+
options: [{
|
|
5251
|
+
value: "flat",
|
|
5252
|
+
label: "Flat"
|
|
5253
|
+
}, {
|
|
5254
|
+
value: "outline",
|
|
5255
|
+
label: "Outline"
|
|
5256
|
+
}, {
|
|
5257
|
+
value: "shadow",
|
|
5258
|
+
label: "Floating"
|
|
5259
|
+
}, {
|
|
5260
|
+
value: "clear",
|
|
5261
|
+
label: "Clear"
|
|
5262
|
+
}, {
|
|
5263
|
+
value: "blocky",
|
|
5264
|
+
label: "Blocky"
|
|
5265
|
+
}, {
|
|
5266
|
+
value: "bubbly",
|
|
5267
|
+
label: "Bubbly"
|
|
5268
|
+
}, {
|
|
5269
|
+
value: "skewed",
|
|
5270
|
+
label: "Skewed"
|
|
5271
|
+
}],
|
|
5272
|
+
defaultValue: "flat"
|
|
5273
|
+
}),
|
|
5274
|
+
submitWidth: ResponsiveLength({
|
|
5275
|
+
label: "Button width"
|
|
5276
|
+
}),
|
|
5277
|
+
submitAlignment: ResponsiveIconRadioGroup({
|
|
5278
|
+
label: "Button alignment",
|
|
5279
|
+
options: [{
|
|
5280
|
+
label: "Left",
|
|
5281
|
+
value: Alignments.LEFT,
|
|
5282
|
+
icon: "AlignLeft16"
|
|
5283
|
+
}, {
|
|
5284
|
+
label: "Center",
|
|
5285
|
+
value: Alignments.CENTER,
|
|
5286
|
+
icon: "AlignCenter16"
|
|
5287
|
+
}, {
|
|
5288
|
+
label: "Right",
|
|
5289
|
+
value: Alignments.RIGHT,
|
|
5290
|
+
icon: "AlignRight16"
|
|
5291
|
+
}],
|
|
5292
|
+
defaultValue: Alignments.CENTER
|
|
5293
|
+
}),
|
|
5294
|
+
width: Width({
|
|
5295
|
+
preset: [{
|
|
5296
|
+
deviceId: "desktop",
|
|
5297
|
+
value: {
|
|
5298
|
+
value: 550,
|
|
5299
|
+
unit: "px"
|
|
5300
|
+
}
|
|
5301
|
+
}],
|
|
5302
|
+
defaultValue: {
|
|
5303
|
+
value: 100,
|
|
5304
|
+
unit: "%"
|
|
5305
|
+
}
|
|
5306
|
+
}),
|
|
5307
|
+
margin: Margin()
|
|
5308
|
+
}
|
|
5309
|
+
});
|
|
5310
|
+
}
|
|
5311
|
+
var _path$s;
|
|
5312
|
+
function _extends$s() {
|
|
5313
|
+
_extends$s = Object.assign || function(target) {
|
|
5314
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
5315
|
+
var source = arguments[i];
|
|
5316
|
+
for (var key in source) {
|
|
5317
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5318
|
+
target[key] = source[key];
|
|
5319
|
+
}
|
|
5320
|
+
}
|
|
5321
|
+
}
|
|
5322
|
+
return target;
|
|
5323
|
+
};
|
|
5324
|
+
return _extends$s.apply(this, arguments);
|
|
5325
|
+
}
|
|
5326
|
+
var SvgMobileMenu28 = function SvgMobileMenu282(props) {
|
|
5327
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$s({
|
|
5328
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5329
|
+
width: 28,
|
|
5330
|
+
height: 28
|
|
5331
|
+
}, props), _path$s || (_path$s = /* @__PURE__ */ React.createElement("path", {
|
|
5332
|
+
d: "M27 15H1a1 1 0 0 1-1-1 1 1 0 0 1 1-1h26a1 1 0 0 1 1 1 1 1 0 0 1-1 1zm0-10H1a1 1 0 0 0-1 1 1 1 0 0 0 1 1h26a1 1 0 0 0 1-1 1 1 0 0 0-1-1zm0 16H1a1 1 0 0 0-1 1 1 1 0 0 0 1 1h26a1 1 0 0 0 1-1 1 1 0 0 0-1-1z"
|
|
5333
|
+
})));
|
|
5334
|
+
};
|
|
5335
|
+
const GutterContainer = styled.div`
|
|
5336
|
+
${(p) => cssMediaRules([p.gutter], ([gutter = {
|
|
5337
|
+
value: 0,
|
|
5338
|
+
unit: "px"
|
|
5339
|
+
}]) => css`
|
|
5340
|
+
padding-left: ${p.first ? "0px" : `${gutter.value / 2}${gutter.unit}`};
|
|
5341
|
+
padding-right: ${p.last ? "0px" : `${gutter.value / 2}${gutter.unit}`};
|
|
5342
|
+
`)}
|
|
5343
|
+
`;
|
|
5344
|
+
const PlaceholderLink$1 = styled.div`
|
|
5345
|
+
width: ${(props) => props.width}px;
|
|
5346
|
+
height: ${(props) => props.button === true ? 32 : 8}px;
|
|
5347
|
+
background-color: #a1a8c2;
|
|
5348
|
+
border-radius: ${(props) => props.button === true ? 6 : 2}px;
|
|
5349
|
+
opacity: 0.4;
|
|
5350
|
+
`;
|
|
5351
|
+
const links$1 = [{
|
|
5352
|
+
width: 50
|
|
5353
|
+
}, {
|
|
5354
|
+
width: 70
|
|
5355
|
+
}, {
|
|
5356
|
+
width: 60
|
|
5357
|
+
}, {
|
|
5358
|
+
width: 80,
|
|
5359
|
+
button: true
|
|
5360
|
+
}];
|
|
5361
|
+
function LinksPlaceholder({
|
|
5362
|
+
gutter
|
|
5363
|
+
}) {
|
|
5364
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
5365
|
+
children: links$1.map((link, i) => /* @__PURE__ */ jsx(GutterContainer, {
|
|
5366
|
+
gutter,
|
|
5367
|
+
first: i === 0,
|
|
5368
|
+
last: i === links$1.length - 1,
|
|
5369
|
+
children: /* @__PURE__ */ jsx(PlaceholderLink$1, __spreadValues({}, link))
|
|
5370
|
+
}, i))
|
|
5371
|
+
});
|
|
5372
|
+
}
|
|
5373
|
+
var _path$r;
|
|
5374
|
+
function _extends$r() {
|
|
5375
|
+
_extends$r = Object.assign || function(target) {
|
|
5376
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
5377
|
+
var source = arguments[i];
|
|
5378
|
+
for (var key in source) {
|
|
5379
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5380
|
+
target[key] = source[key];
|
|
5381
|
+
}
|
|
5382
|
+
}
|
|
5383
|
+
}
|
|
5384
|
+
return target;
|
|
5385
|
+
};
|
|
5386
|
+
return _extends$r.apply(this, arguments);
|
|
5387
|
+
}
|
|
5388
|
+
var SvgCaretDown8 = function SvgCaretDown82(props) {
|
|
5389
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$r({
|
|
5390
|
+
width: 8,
|
|
5391
|
+
height: 8,
|
|
5392
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
5393
|
+
}, props), _path$r || (_path$r = /* @__PURE__ */ React.createElement("path", {
|
|
5394
|
+
d: "M1 2a1 1 0 0 0-.707 1.707l3 3a1 1 0 0 0 1.414 0l3-3A1 1 0 0 0 7 2H1z"
|
|
5395
|
+
})));
|
|
5396
|
+
};
|
|
5397
|
+
var _path$q;
|
|
5398
|
+
function _extends$q() {
|
|
5399
|
+
_extends$q = Object.assign || function(target) {
|
|
5400
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
5401
|
+
var source = arguments[i];
|
|
5402
|
+
for (var key in source) {
|
|
5403
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5404
|
+
target[key] = source[key];
|
|
5405
|
+
}
|
|
5406
|
+
}
|
|
5407
|
+
}
|
|
5408
|
+
return target;
|
|
5409
|
+
};
|
|
5410
|
+
return _extends$q.apply(this, arguments);
|
|
5411
|
+
}
|
|
5412
|
+
var SvgPlus8 = function SvgPlus82(props) {
|
|
5413
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$q({
|
|
5414
|
+
width: 8,
|
|
5415
|
+
height: 8,
|
|
5416
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
5417
|
+
}, props), _path$q || (_path$q = /* @__PURE__ */ React.createElement("path", {
|
|
3473
5418
|
d: "M4 0a1 1 0 0 0-1 1v2H1a1 1 0 1 0 0 2h2v2a1 1 0 0 0 2 0V5h2a1 1 0 0 0 0-2H5V1a1 1 0 0 0-1-1z"
|
|
3474
5419
|
})));
|
|
3475
5420
|
};
|
|
3476
|
-
var _path$
|
|
3477
|
-
function _extends$
|
|
3478
|
-
_extends$
|
|
5421
|
+
var _path$p;
|
|
5422
|
+
function _extends$p() {
|
|
5423
|
+
_extends$p = Object.assign || function(target) {
|
|
3479
5424
|
for (var i = 1; i < arguments.length; i++) {
|
|
3480
5425
|
var source = arguments[i];
|
|
3481
5426
|
for (var key in source) {
|
|
@@ -3486,20 +5431,20 @@ function _extends$o() {
|
|
|
3486
5431
|
}
|
|
3487
5432
|
return target;
|
|
3488
5433
|
};
|
|
3489
|
-
return _extends$
|
|
5434
|
+
return _extends$p.apply(this, arguments);
|
|
3490
5435
|
}
|
|
3491
5436
|
var SvgArrowDown8 = function SvgArrowDown82(props) {
|
|
3492
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$
|
|
5437
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$p({
|
|
3493
5438
|
width: 8,
|
|
3494
5439
|
height: 8,
|
|
3495
5440
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3496
|
-
}, props), _path$
|
|
5441
|
+
}, props), _path$p || (_path$p = /* @__PURE__ */ React.createElement("path", {
|
|
3497
5442
|
d: "M5 1a1 1 0 0 0-2 0v3.586l-.293-.293a1 1 0 0 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l2-2a1 1 0 0 0-1.414-1.414L5 4.586V1z"
|
|
3498
5443
|
})));
|
|
3499
5444
|
};
|
|
3500
|
-
var _path$
|
|
3501
|
-
function _extends$
|
|
3502
|
-
_extends$
|
|
5445
|
+
var _path$o;
|
|
5446
|
+
function _extends$o() {
|
|
5447
|
+
_extends$o = Object.assign || function(target) {
|
|
3503
5448
|
for (var i = 1; i < arguments.length; i++) {
|
|
3504
5449
|
var source = arguments[i];
|
|
3505
5450
|
for (var key in source) {
|
|
@@ -3510,14 +5455,14 @@ function _extends$n() {
|
|
|
3510
5455
|
}
|
|
3511
5456
|
return target;
|
|
3512
5457
|
};
|
|
3513
|
-
return _extends$
|
|
5458
|
+
return _extends$o.apply(this, arguments);
|
|
3514
5459
|
}
|
|
3515
5460
|
var SvgChevronDown8 = function SvgChevronDown82(props) {
|
|
3516
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$
|
|
5461
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$o({
|
|
3517
5462
|
width: 8,
|
|
3518
5463
|
height: 8,
|
|
3519
5464
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3520
|
-
}, props), _path$
|
|
5465
|
+
}, props), _path$o || (_path$o = /* @__PURE__ */ React.createElement("path", {
|
|
3521
5466
|
fillRule: "evenodd",
|
|
3522
5467
|
clipRule: "evenodd",
|
|
3523
5468
|
d: "M.293 2.293a1 1 0 0 1 1.414 0L4 4.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-3 3a1 1 0 0 1-1.414 0l-3-3a1 1 0 0 1 0-1.414z"
|
|
@@ -3592,22 +5537,22 @@ const StyledDropDownItem = styled(Link)`
|
|
|
3592
5537
|
background-color: rgba(0, 0, 0, 0.04);
|
|
3593
5538
|
}
|
|
3594
5539
|
`;
|
|
3595
|
-
function DropDownItem$1(
|
|
3596
|
-
var
|
|
5540
|
+
function DropDownItem$1(_S) {
|
|
5541
|
+
var _T = _S, {
|
|
3597
5542
|
color
|
|
3598
|
-
} =
|
|
5543
|
+
} = _T, restOfProps = __objRest(_T, [
|
|
3599
5544
|
"color"
|
|
3600
5545
|
]);
|
|
3601
5546
|
return /* @__PURE__ */ jsx(StyledDropDownItem, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3602
5547
|
color: useColor(color)
|
|
3603
5548
|
}));
|
|
3604
5549
|
}
|
|
3605
|
-
function DropDownButton(
|
|
3606
|
-
var
|
|
5550
|
+
function DropDownButton(_U) {
|
|
5551
|
+
var _V = _U, {
|
|
3607
5552
|
label,
|
|
3608
5553
|
caret = "caret",
|
|
3609
5554
|
links: links2 = []
|
|
3610
|
-
} =
|
|
5555
|
+
} = _V, restOfProps = __objRest(_V, [
|
|
3611
5556
|
"label",
|
|
3612
5557
|
"caret",
|
|
3613
5558
|
"links"
|
|
@@ -3623,7 +5568,7 @@ function DropDownButton(_q) {
|
|
|
3623
5568
|
}, [setPosition]);
|
|
3624
5569
|
return /* @__PURE__ */ jsxs(DropDownContainer, {
|
|
3625
5570
|
ref: container,
|
|
3626
|
-
children: [/* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({}, restOfProps), {
|
|
5571
|
+
children: [/* @__PURE__ */ jsx(Button$1, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3627
5572
|
children: /* @__PURE__ */ jsxs("div", {
|
|
3628
5573
|
style: {
|
|
3629
5574
|
display: "flex",
|
|
@@ -3653,9 +5598,9 @@ function DropDownButton(_q) {
|
|
|
3653
5598
|
})]
|
|
3654
5599
|
});
|
|
3655
5600
|
}
|
|
3656
|
-
var _path$
|
|
3657
|
-
function _extends$
|
|
3658
|
-
_extends$
|
|
5601
|
+
var _path$n;
|
|
5602
|
+
function _extends$n() {
|
|
5603
|
+
_extends$n = Object.assign || function(target) {
|
|
3659
5604
|
for (var i = 1; i < arguments.length; i++) {
|
|
3660
5605
|
var source = arguments[i];
|
|
3661
5606
|
for (var key in source) {
|
|
@@ -3666,14 +5611,14 @@ function _extends$m() {
|
|
|
3666
5611
|
}
|
|
3667
5612
|
return target;
|
|
3668
5613
|
};
|
|
3669
|
-
return _extends$
|
|
5614
|
+
return _extends$n.apply(this, arguments);
|
|
3670
5615
|
}
|
|
3671
5616
|
var SvgTimes16 = function SvgTimes162(props) {
|
|
3672
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$
|
|
5617
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$n({
|
|
3673
5618
|
width: 16,
|
|
3674
5619
|
height: 16,
|
|
3675
5620
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3676
|
-
}, props), _path$
|
|
5621
|
+
}, props), _path$n || (_path$n = /* @__PURE__ */ React.createElement("path", {
|
|
3677
5622
|
fillRule: "evenodd",
|
|
3678
5623
|
clipRule: "evenodd",
|
|
3679
5624
|
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"
|
|
@@ -3684,7 +5629,7 @@ const DropDownMenu = styled.div`
|
|
|
3684
5629
|
flex-direction: column;
|
|
3685
5630
|
padding: 8px;
|
|
3686
5631
|
`;
|
|
3687
|
-
const ButtonLink$1 = styled(Button)`
|
|
5632
|
+
const ButtonLink$1 = styled(Button$1)`
|
|
3688
5633
|
margin: 8px 0;
|
|
3689
5634
|
`;
|
|
3690
5635
|
const StyledLink$2 = styled(Link)`
|
|
@@ -3697,24 +5642,24 @@ const StyledLink$2 = styled(Link)`
|
|
|
3697
5642
|
color: ${color == null ? "black" : colorToString(color)};
|
|
3698
5643
|
`)}
|
|
3699
5644
|
`;
|
|
3700
|
-
function DropDownItem(
|
|
3701
|
-
var
|
|
5645
|
+
function DropDownItem(_W) {
|
|
5646
|
+
var _X = _W, {
|
|
3702
5647
|
color
|
|
3703
|
-
} =
|
|
5648
|
+
} = _X, restOfProps = __objRest(_X, [
|
|
3704
5649
|
"color"
|
|
3705
5650
|
]);
|
|
3706
5651
|
return /* @__PURE__ */ jsx(StyledLink$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3707
5652
|
color: useColor(color)
|
|
3708
5653
|
}));
|
|
3709
5654
|
}
|
|
3710
|
-
function MobileDropDownButton(
|
|
3711
|
-
var
|
|
5655
|
+
function MobileDropDownButton(_Y) {
|
|
5656
|
+
var _Z = _Y, {
|
|
3712
5657
|
label,
|
|
3713
5658
|
caret,
|
|
3714
5659
|
links: links2 = [],
|
|
3715
5660
|
onClose = () => {
|
|
3716
5661
|
}
|
|
3717
|
-
} =
|
|
5662
|
+
} = _Z, restOfProps = __objRest(_Z, [
|
|
3718
5663
|
"label",
|
|
3719
5664
|
"caret",
|
|
3720
5665
|
"links",
|
|
@@ -3756,10 +5701,10 @@ function MobileDropDownButton(_u) {
|
|
|
3756
5701
|
})]
|
|
3757
5702
|
});
|
|
3758
5703
|
}
|
|
3759
|
-
const ButtonLink = styled(Button)`
|
|
5704
|
+
const ButtonLink = styled(Button$1)`
|
|
3760
5705
|
margin: 8px 0;
|
|
3761
5706
|
`;
|
|
3762
|
-
const Container$
|
|
5707
|
+
const Container$3 = styled.div`
|
|
3763
5708
|
position: fixed;
|
|
3764
5709
|
flex-direction: column;
|
|
3765
5710
|
width: 100%;
|
|
@@ -3813,7 +5758,7 @@ function MobileMenu({
|
|
|
3813
5758
|
onClose = () => {
|
|
3814
5759
|
}
|
|
3815
5760
|
}) {
|
|
3816
|
-
return /* @__PURE__ */ jsxs(Container$
|
|
5761
|
+
return /* @__PURE__ */ jsxs(Container$3, {
|
|
3817
5762
|
animation,
|
|
3818
5763
|
backgroundColor: useColor(backgroundColor),
|
|
3819
5764
|
open,
|
|
@@ -3839,7 +5784,7 @@ function MobileMenu({
|
|
|
3839
5784
|
})]
|
|
3840
5785
|
});
|
|
3841
5786
|
}
|
|
3842
|
-
const Container$
|
|
5787
|
+
const Container$2 = styled.nav`
|
|
3843
5788
|
display: flex;
|
|
3844
5789
|
align-items: center;
|
|
3845
5790
|
${cssWidth()}
|
|
@@ -3896,7 +5841,7 @@ const Navigation = forwardRef(function Navigation2({
|
|
|
3896
5841
|
margin
|
|
3897
5842
|
}, ref) {
|
|
3898
5843
|
const [isOpen, setIsOpen] = useState(false);
|
|
3899
|
-
return /* @__PURE__ */ jsxs(Container$
|
|
5844
|
+
return /* @__PURE__ */ jsxs(Container$2, {
|
|
3900
5845
|
ref,
|
|
3901
5846
|
id,
|
|
3902
5847
|
margin,
|
|
@@ -3921,7 +5866,7 @@ const Navigation = forwardRef(function Navigation2({
|
|
|
3921
5866
|
gutter,
|
|
3922
5867
|
first: i === 0,
|
|
3923
5868
|
last: i === links2.length - 1,
|
|
3924
|
-
children: [link.type === "button" && /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({}, link.payload), {
|
|
5869
|
+
children: [link.type === "button" && /* @__PURE__ */ jsx(Button$1, __spreadProps(__spreadValues({}, link.payload), {
|
|
3925
5870
|
children: link.payload.label
|
|
3926
5871
|
})), link.type === "dropdown" && /* @__PURE__ */ jsx(DropDownButton, __spreadValues({}, link.payload))]
|
|
3927
5872
|
}, link.id)) : /* @__PURE__ */ jsx(LinksPlaceholder, {
|
|
@@ -3944,7 +5889,7 @@ const Navigation = forwardRef(function Navigation2({
|
|
|
3944
5889
|
})]
|
|
3945
5890
|
});
|
|
3946
5891
|
});
|
|
3947
|
-
function registerComponent$
|
|
5892
|
+
function registerComponent$4(runtime) {
|
|
3948
5893
|
return runtime.registerComponent(Navigation, {
|
|
3949
5894
|
type: "./components/Navigation/index.js",
|
|
3950
5895
|
label: "Navigation",
|
|
@@ -3955,7 +5900,7 @@ function registerComponent$3(runtime) {
|
|
|
3955
5900
|
linkTextStyle: TextStyle({
|
|
3956
5901
|
label: "Link text style"
|
|
3957
5902
|
}),
|
|
3958
|
-
showLogo: Checkbox({
|
|
5903
|
+
showLogo: Checkbox$1({
|
|
3959
5904
|
preset: true,
|
|
3960
5905
|
label: "Show logo"
|
|
3961
5906
|
}),
|
|
@@ -4048,7 +5993,7 @@ const PlaceholderBase = styled.div`
|
|
|
4048
5993
|
height: 80px;
|
|
4049
5994
|
padding: 8px;
|
|
4050
5995
|
`;
|
|
4051
|
-
var
|
|
5996
|
+
var Placeholder3 = forwardRef(function Placeholder4(props, ref) {
|
|
4052
5997
|
return /* @__PURE__ */ jsx(PlaceholderBase, __spreadProps(__spreadValues({}, props), {
|
|
4053
5998
|
ref,
|
|
4054
5999
|
children: /* @__PURE__ */ jsx("svg", {
|
|
@@ -4116,12 +6061,12 @@ const Root = forwardRef(function Page2({
|
|
|
4116
6061
|
children: /* @__PURE__ */ jsx(Element$1, {
|
|
4117
6062
|
element: child
|
|
4118
6063
|
})
|
|
4119
|
-
}, child.key)) : /* @__PURE__ */ jsx(
|
|
6064
|
+
}, child.key)) : /* @__PURE__ */ jsx(Placeholder3, {})
|
|
4120
6065
|
})
|
|
4121
6066
|
})]
|
|
4122
6067
|
});
|
|
4123
6068
|
});
|
|
4124
|
-
function registerComponent$
|
|
6069
|
+
function registerComponent$3(runtime) {
|
|
4125
6070
|
return runtime.registerComponent(Root, {
|
|
4126
6071
|
type: "./components/Root/index.js",
|
|
4127
6072
|
label: "Page",
|
|
@@ -4134,6 +6079,30 @@ function registerComponent$2(runtime) {
|
|
|
4134
6079
|
}
|
|
4135
6080
|
});
|
|
4136
6081
|
}
|
|
6082
|
+
var _path$m;
|
|
6083
|
+
function _extends$m() {
|
|
6084
|
+
_extends$m = Object.assign || function(target) {
|
|
6085
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
6086
|
+
var source = arguments[i];
|
|
6087
|
+
for (var key in source) {
|
|
6088
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
6089
|
+
target[key] = source[key];
|
|
6090
|
+
}
|
|
6091
|
+
}
|
|
6092
|
+
}
|
|
6093
|
+
return target;
|
|
6094
|
+
};
|
|
6095
|
+
return _extends$m.apply(this, arguments);
|
|
6096
|
+
}
|
|
6097
|
+
var SvgLogoAngellist20 = function SvgLogoAngellist202(props) {
|
|
6098
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$m({
|
|
6099
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6100
|
+
width: 20,
|
|
6101
|
+
height: 20
|
|
6102
|
+
}, props), _path$m || (_path$m = /* @__PURE__ */ React.createElement("path", {
|
|
6103
|
+
d: "M13.741 8.297a96.837 96.837 0 0 0 1.443-4.128c.345-1.085.518-1.751.518-1.998 0-.266-.058-.472-.173-.62a.572.572 0 0 0-.476-.218c-.257 0-.52.213-.787.638-.267.426-.56 1.11-.883 2.054l-1.38 3.97 1.738.302Zm-1.836 3.695a8.343 8.343 0 0 1-1.125-.124 5.915 5.915 0 0 1-1.015-.274c.147.293.278.586.393.879.116.293.21.582.284.866.22-.275.453-.525.696-.75.245-.224.5-.423.767-.597Zm-1.56-4.162-1.49-4.286c-.388-1.09-.687-1.801-.899-2.136-.212-.334-.442-.501-.69-.501a.575.575 0 0 0-.469.22c-.12.146-.18.343-.18.59 0 .422.161 1.154.483 2.198.323 1.044.806 2.413 1.45 4.107a.464.464 0 0 1 .235-.213 1.13 1.13 0 0 1 .414-.061c.055 0 .166.005.332.013.165.01.437.033.814.069Zm-1.353 6.634c.156 0 .3-.07.428-.212a.672.672 0 0 0 .193-.46c0-.174-.126-.58-.379-1.216a12.3 12.3 0 0 0-.946-1.875c-.276-.458-.548-.803-.815-1.037-.267-.234-.52-.35-.759-.35-.194 0-.408.12-.642.363-.235.243-.352.47-.352.68 0 .22.115.55.345.989.23.44.538.907.925 1.402.405.54.787.96 1.146 1.263.36.303.644.453.856.453Zm-4.142-.33c.13.157.308.386.538.688.608.833 1.17 1.25 1.685 1.25a.734.734 0 0 0 .47-.165c.137-.11.206-.224.206-.343 0-.138-.092-.367-.276-.687a8.797 8.797 0 0 0-.759-1.085c-.369-.467-.675-.808-.918-1.024-.244-.215-.44-.323-.587-.323-.322 0-.619.172-.89.516a1.902 1.902 0 0 0-.408 1.215c0 .376.094.795.283 1.257.19.463.463.927.821 1.394a5.472 5.472 0 0 0 2.023 1.669c.806.39 1.696.584 2.672.584 1.795 0 3.298-.666 4.508-1.998 1.21-1.333 1.815-3.002 1.815-5.008 0-.613-.046-1.1-.138-1.463-.09-.361-.244-.625-.456-.79-.377-.311-1.11-.59-2.202-.837a15.366 15.366 0 0 0-3.417-.371c-.33 0-.566.055-.704.165-.138.11-.207.297-.207.563 0 .623.35 1.074 1.05 1.353.7.28 1.831.419 3.396.419h.566a.38.38 0 0 1 .31.144c.078.096.132.24.16.433-.158.147-.479.314-.967.502-.488.187-.86.373-1.119.556a4.957 4.957 0 0 0-1.332 1.435c-.336.554-.504 1.078-.504 1.573 0 .302.071.666.214 1.092.143.426.214.689.214.79v.096l-.028.124c-.404-.028-.724-.264-.959-.708-.235-.444-.352-1.037-.352-1.78v-.122a.758.758 0 0 1-.214.137.6.6 0 0 1-.228.04c-.083 0-.16-.005-.234-.02a2.287 2.287 0 0 1-.249-.061c.027.1.048.199.062.295.014.096.021.172.021.227 0 .339-.134.63-.4.872a1.366 1.366 0 0 1-.953.364c-.58 0-1.169-.282-1.768-.845-.598-.563-.897-1.114-.897-1.655 0-.101.012-.19.035-.268a.45.45 0 0 1 .117-.2Zm9.885-5.604c.83.157 1.413.504 1.754 1.044.34.54.511 1.393.511 2.556 0 2.307-.697 4.196-2.092 5.666C13.513 19.265 11.73 20 9.558 20a6.938 6.938 0 0 1-2.492-.46 6.169 6.169 0 0 1-2.078-1.284c-.663-.605-1.16-1.243-1.49-1.916A4.622 4.622 0 0 1 3 14.273c0-.788.17-1.397.511-1.828.34-.43.878-.723 1.615-.878a7.523 7.523 0 0 1-.304-.811 1.986 1.986 0 0 1-.097-.508c0-.412.22-.833.657-1.264.437-.431.85-.646 1.235-.646.166 0 .34.03.525.089.184.06.395.159.635.296C7.068 6.727 6.553 5.186 6.231 4.1c-.323-1.086-.484-1.834-.484-2.246 0-.568.147-1.02.442-1.353C6.484.168 6.884 0 7.39 0c.865 0 1.961 1.923 3.286 5.77.23.659.405 1.167.525 1.525.102-.285.244-.687.428-1.21 1.326-3.81 2.466-5.714 3.424-5.714.47 0 .844.158 1.126.474.28.316.42.74.42 1.27 0 .404-.154 1.14-.462 2.212-.309 1.072-.776 2.473-1.402 4.203Z"
|
|
6104
|
+
})));
|
|
6105
|
+
};
|
|
4137
6106
|
var _path$l;
|
|
4138
6107
|
function _extends$l() {
|
|
4139
6108
|
_extends$l = Object.assign || function(target) {
|
|
@@ -4149,13 +6118,13 @@ function _extends$l() {
|
|
|
4149
6118
|
};
|
|
4150
6119
|
return _extends$l.apply(this, arguments);
|
|
4151
6120
|
}
|
|
4152
|
-
var
|
|
6121
|
+
var SvgLogoCodepen20 = function SvgLogoCodepen202(props) {
|
|
4153
6122
|
return /* @__PURE__ */ React.createElement("svg", _extends$l({
|
|
4154
6123
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4155
6124
|
width: 20,
|
|
4156
6125
|
height: 20
|
|
4157
6126
|
}, props), _path$l || (_path$l = /* @__PURE__ */ React.createElement("path", {
|
|
4158
|
-
d: "
|
|
6127
|
+
d: "M18.281 11.438 16.132 10l2.149-1.438v2.876Zm-7.422 6.096v-4.008l3.727-2.492 3.008 2.011-6.735 4.49Zm-.859-5.5L6.961 10 10 7.966 13.04 10 10 12.033Zm-.859 5.5-6.734-4.489 3.008-2.01 3.726 2.491v4.008ZM1.719 8.562 3.869 10l-2.15 1.438V8.562Zm7.422-6.097v4.01L5.415 8.965 2.407 6.954l6.734-4.489Zm1.718 0 6.735 4.49-3.008 2.011-3.727-2.492V2.465Zm9.126 4.338a.857.857 0 0 0-.368-.565L10.477.144a.862.862 0 0 0-.954 0L.383 6.238A.872.872 0 0 0 0 6.953v6.093c0 .282.148.56.383.715l9.14 6.094a.856.856 0 0 0 .954 0l9.14-6.094a.863.863 0 0 0 .383-.715V6.953a.631.631 0 0 0-.015-.15Z"
|
|
4159
6128
|
})));
|
|
4160
6129
|
};
|
|
4161
6130
|
var _path$k;
|
|
@@ -4173,13 +6142,13 @@ function _extends$k() {
|
|
|
4173
6142
|
};
|
|
4174
6143
|
return _extends$k.apply(this, arguments);
|
|
4175
6144
|
}
|
|
4176
|
-
var
|
|
6145
|
+
var SvgLogoDribbble20 = function SvgLogoDribbble202(props) {
|
|
4177
6146
|
return /* @__PURE__ */ React.createElement("svg", _extends$k({
|
|
4178
6147
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4179
6148
|
width: 20,
|
|
4180
6149
|
height: 20
|
|
4181
6150
|
}, props), _path$k || (_path$k = /* @__PURE__ */ React.createElement("path", {
|
|
4182
|
-
d: "
|
|
6151
|
+
d: "M19.797 7.988a10.062 10.062 0 0 0-.585-1.88 9.886 9.886 0 0 0-.922-1.698C15.203-.169 8.988-1.378 4.409 1.71a9.985 9.985 0 0 0-2.7 2.7A9.965 9.965 0 0 0 .202 7.988a10.148 10.148 0 0 0 0 4.027 10.008 10.008 0 0 0 13.691 7.2 10.002 10.002 0 0 0 5.904-11.226Zm-1.26 1.927a19.75 19.75 0 0 0-5.947-.28c-.062-.145-.121-.293-.182-.439a30.32 30.32 0 0 0-.568-1.24 10.978 10.978 0 0 0 4.758-3.379 8.502 8.502 0 0 1 1.942 5.338h-.003Zm-2.896-6.322a9.298 9.298 0 0 1-4.462 3.09 43.362 43.362 0 0 0-3.192-4.98 8.523 8.523 0 0 1 7.654 1.89ZM6.357 2.28A51.177 51.177 0 0 1 9.528 7.2 31.562 31.562 0 0 1 1.643 8.24 8.542 8.542 0 0 1 6.357 2.28ZM1.461 10c0-.09.004-.182.007-.273a31.285 31.285 0 0 0 8.767-1.217c.245.48.479.967.693 1.454-.112.03-.225.065-.336.102a13.512 13.512 0 0 0-6.946 5.636A8.508 8.508 0 0 1 1.465 10h-.004Zm8.544 8.545a8.508 8.508 0 0 1-5.44-1.958c.112.09.191.15.191.15s1.637-3.57 6.702-5.336c.019-.007.039-.012.058-.017a35.57 35.57 0 0 1 1.823 6.484 8.525 8.525 0 0 1-3.334.677Zm4.772-1.463a36.725 36.725 0 0 0-1.662-6.099 12.377 12.377 0 0 1 5.323.373 8.546 8.546 0 0 1-3.661 5.727Z"
|
|
4183
6152
|
})));
|
|
4184
6153
|
};
|
|
4185
6154
|
var _path$j;
|
|
@@ -4197,13 +6166,13 @@ function _extends$j() {
|
|
|
4197
6166
|
};
|
|
4198
6167
|
return _extends$j.apply(this, arguments);
|
|
4199
6168
|
}
|
|
4200
|
-
var
|
|
6169
|
+
var SvgLogoFacebook20 = function SvgLogoFacebook202(props) {
|
|
4201
6170
|
return /* @__PURE__ */ React.createElement("svg", _extends$j({
|
|
4202
6171
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4203
6172
|
width: 20,
|
|
4204
6173
|
height: 20
|
|
4205
6174
|
}, props), _path$j || (_path$j = /* @__PURE__ */ React.createElement("path", {
|
|
4206
|
-
d: "
|
|
6175
|
+
d: "M18.896 0H1.104C.494 0 0 .494 0 1.104v17.792C0 19.506.494 20 1.104 20h9.58v-7.734H8.086V9.238h2.598V7.01c0-2.583 1.577-3.989 3.881-3.989 1.104 0 2.053.082 2.33.119v2.699l-1.59.001c-1.254 0-1.496.596-1.496 1.47v1.928h2.997l-.39 3.028h-2.607V20h5.087c.61 0 1.104-.494 1.104-1.104V1.104C20 .494 19.506 0 18.896 0"
|
|
4207
6176
|
})));
|
|
4208
6177
|
};
|
|
4209
6178
|
var _path$i;
|
|
@@ -4221,13 +6190,13 @@ function _extends$i() {
|
|
|
4221
6190
|
};
|
|
4222
6191
|
return _extends$i.apply(this, arguments);
|
|
4223
6192
|
}
|
|
4224
|
-
var
|
|
6193
|
+
var SvgLogoGithub20 = function SvgLogoGithub202(props) {
|
|
4225
6194
|
return /* @__PURE__ */ React.createElement("svg", _extends$i({
|
|
4226
6195
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4227
6196
|
width: 20,
|
|
4228
6197
|
height: 20
|
|
4229
6198
|
}, props), _path$i || (_path$i = /* @__PURE__ */ React.createElement("path", {
|
|
4230
|
-
d: "
|
|
6199
|
+
d: "M9.996.003a9.762 9.762 0 0 0-3.16 19.072.5.5 0 0 0 .683-.47c0-.234-.01-.85-.013-1.665-2.782.59-3.37-1.313-3.37-1.313a2.608 2.608 0 0 0-1.11-1.431c-.908-.607.07-.594.07-.594a2.098 2.098 0 0 1 1.53 1.007 2.155 2.155 0 0 0 2.91.814c.047-.5.273-.964.636-1.31-2.221-.246-4.554-1.09-4.554-4.836a3.735 3.735 0 0 1 1.028-2.625 3.448 3.448 0 0 1 .098-2.59s.84-.263 2.75 1a9.704 9.704 0 0 1 5.007 0c1.909-1.266 2.747-1 2.747-1 .369.817.404 1.747.099 2.59a3.726 3.726 0 0 1 1.028 2.625c0 3.76-2.338 4.588-4.566 4.83.482.475.73 1.138.68 1.812 0 1.31-.013 2.363-.013 2.686a.498.498 0 0 0 .688.469A9.76 9.76 0 0 0 9.996.003"
|
|
4231
6200
|
})));
|
|
4232
6201
|
};
|
|
4233
6202
|
var _path$h;
|
|
@@ -4245,13 +6214,13 @@ function _extends$h() {
|
|
|
4245
6214
|
};
|
|
4246
6215
|
return _extends$h.apply(this, arguments);
|
|
4247
6216
|
}
|
|
4248
|
-
var
|
|
6217
|
+
var SvgLogoInstagram20 = function SvgLogoInstagram202(props) {
|
|
4249
6218
|
return /* @__PURE__ */ React.createElement("svg", _extends$h({
|
|
4250
6219
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4251
6220
|
width: 20,
|
|
4252
6221
|
height: 20
|
|
4253
6222
|
}, props), _path$h || (_path$h = /* @__PURE__ */ React.createElement("path", {
|
|
4254
|
-
d: "
|
|
6223
|
+
d: "M15.338 3.462a1.2 1.2 0 1 0 0 2.4 1.2 1.2 0 0 0 0-2.4M10 13.332a3.333 3.333 0 1 1 0-6.664 3.333 3.333 0 0 1 0 6.665m0-8.468a5.135 5.135 0 1 0 0 10.27 5.135 5.135 0 0 0 0-10.27M10 0C7.284 0 6.943.012 5.877.06 4.813.109 4.086.278 3.45.525a4.919 4.919 0 0 0-1.772 1.153A4.905 4.905 0 0 0 .525 3.45C.278 4.086.109 4.813.06 5.877.011 6.944 0 7.284 0 10s.011 3.057.06 4.123c.049 1.065.218 1.79.465 2.428a4.898 4.898 0 0 0 1.153 1.77 4.882 4.882 0 0 0 1.772 1.154c.636.248 1.363.417 2.427.465 1.066.048 1.407.06 4.123.06s3.056-.012 4.123-.06c1.065-.048 1.791-.217 2.427-.465a4.87 4.87 0 0 0 1.771-1.154 4.888 4.888 0 0 0 1.154-1.77c.247-.637.416-1.363.465-2.428.048-1.066.06-1.407.06-4.123s-.012-3.056-.06-4.123c-.049-1.064-.218-1.791-.465-2.427a4.895 4.895 0 0 0-1.154-1.772A4.907 4.907 0 0 0 16.55.525C15.914.278 15.188.109 14.123.06 13.056.012 12.716 0 10 0m0 1.802c2.67 0 2.986.01 4.041.058.975.045 1.505.207 1.857.345.466.18.799.398 1.149.748.351.349.567.683.749 1.149.137.353.299.882.344 1.857.048 1.055.058 1.37.058 4.04s-.01 2.987-.058 4.042c-.045.975-.207 1.504-.344 1.857a3.11 3.11 0 0 1-.749 1.15c-.35.35-.683.566-1.149.748-.352.137-.882.3-1.857.344-1.055.049-1.37.058-4.041.058-2.67 0-2.987-.01-4.041-.058-.975-.044-1.504-.207-1.857-.344a3.104 3.104 0 0 1-1.15-.748 3.133 3.133 0 0 1-.748-1.15c-.137-.353-.3-.882-.344-1.857-.048-1.055-.058-1.371-.058-4.041 0-2.67.01-2.986.058-4.041.044-.975.207-1.504.344-1.857.182-.466.399-.8.748-1.15a3.09 3.09 0 0 1 1.15-.747c.353-.138.882-.3 1.857-.345C7.014 1.812 7.33 1.802 10 1.802"
|
|
4255
6224
|
})));
|
|
4256
6225
|
};
|
|
4257
6226
|
var _path$g;
|
|
@@ -4269,13 +6238,13 @@ function _extends$g() {
|
|
|
4269
6238
|
};
|
|
4270
6239
|
return _extends$g.apply(this, arguments);
|
|
4271
6240
|
}
|
|
4272
|
-
var
|
|
6241
|
+
var SvgLogoLinkedin20 = function SvgLogoLinkedin202(props) {
|
|
4273
6242
|
return /* @__PURE__ */ React.createElement("svg", _extends$g({
|
|
4274
6243
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4275
6244
|
width: 20,
|
|
4276
6245
|
height: 20
|
|
4277
6246
|
}, props), _path$g || (_path$g = /* @__PURE__ */ React.createElement("path", {
|
|
4278
|
-
d: "
|
|
6247
|
+
d: "M.516 19.639h3.896V7.296H.516v12.343ZM2.365 5.752h-.028a2.153 2.153 0 0 1-2.325-2.14 2.376 2.376 0 1 1 2.353 2.14ZM20 19.64h-4.417v-6.388c0-1.672-.692-2.816-2.211-2.816-.954 0-1.803.608-2.11 1.512-.09.328-.122.67-.09 1.009v6.683H6.791s.056-11.315 0-12.344h4.376v1.937c.259-.846 1.657-2.056 3.888-2.056 2.769 0 4.945 1.776 4.945 5.599v6.864Z"
|
|
4279
6248
|
})));
|
|
4280
6249
|
};
|
|
4281
6250
|
var _path$f;
|
|
@@ -4293,13 +6262,13 @@ function _extends$f() {
|
|
|
4293
6262
|
};
|
|
4294
6263
|
return _extends$f.apply(this, arguments);
|
|
4295
6264
|
}
|
|
4296
|
-
var
|
|
6265
|
+
var SvgLogoMedium20 = function SvgLogoMedium202(props) {
|
|
4297
6266
|
return /* @__PURE__ */ React.createElement("svg", _extends$f({
|
|
4298
6267
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4299
6268
|
width: 20,
|
|
4300
6269
|
height: 20
|
|
4301
6270
|
}, props), _path$f || (_path$f = /* @__PURE__ */ React.createElement("path", {
|
|
4302
|
-
d: "
|
|
6271
|
+
d: "M2.372 5.264a.785.785 0 0 0-.252-.659L.252 2.34V2H6.05l4.482 9.905L14.473 2H20v.34L18.404 3.88a.472.472 0 0 0-.178.451v11.335a.474.474 0 0 0 .178.452l1.559 1.542v.34H12.12v-.34l1.615-1.58c.159-.16.159-.207.159-.45V6.467L9.403 17.962h-.607L3.566 6.468v7.704c-.043.323.064.65.29.884l2.1 2.568v.338H0v-.338l2.1-2.568a1.03 1.03 0 0 0 .272-.884V5.264Z"
|
|
4303
6272
|
})));
|
|
4304
6273
|
};
|
|
4305
6274
|
var _path$e;
|
|
@@ -4317,13 +6286,13 @@ function _extends$e() {
|
|
|
4317
6286
|
};
|
|
4318
6287
|
return _extends$e.apply(this, arguments);
|
|
4319
6288
|
}
|
|
4320
|
-
var
|
|
6289
|
+
var SvgLogoPinterest20 = function SvgLogoPinterest202(props) {
|
|
4321
6290
|
return /* @__PURE__ */ React.createElement("svg", _extends$e({
|
|
4322
6291
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4323
6292
|
width: 20,
|
|
4324
6293
|
height: 20
|
|
4325
6294
|
}, props), _path$e || (_path$e = /* @__PURE__ */ React.createElement("path", {
|
|
4326
|
-
d: "
|
|
6295
|
+
d: "M9.995 0A9.996 9.996 0 0 0 5.984 19.15a8.848 8.848 0 0 1 .172-2.296c.193-.811 1.286-5.445 1.286-5.445a3.863 3.863 0 0 1-.32-1.583c0-1.481.86-2.587 1.928-2.587a1.34 1.34 0 0 1 1.349 1.5 21.432 21.432 0 0 1-.883 3.545 1.547 1.547 0 0 0 1.578 1.925c1.894 0 3.17-2.432 3.17-5.314 0-2.19-1.475-3.83-4.16-3.83a4.733 4.733 0 0 0-4.917 4.54c-.003.082-.004.164-.003.245a2.882 2.882 0 0 0 .659 1.962c.165.135.223.36.143.558-.047.182-.157.628-.203.802a.342.342 0 0 1-.5.25c-1.397-.57-2.047-2.098-2.047-3.816 0-2.84 2.394-6.246 7.143-6.246 3.816 0 6.329 2.764 6.329 5.725 0 3.92-2.181 6.85-5.394 6.85a2.873 2.873 0 0 1-2.442-1.244s-.58 2.303-.703 2.747a8.331 8.331 0 0 1-1.006 2.14c5.293 1.569 10.855-1.452 12.423-6.745C21.153 7.542 18.134 1.979 12.84.412A10.007 10.007 0 0 0 9.995 0"
|
|
4327
6296
|
})));
|
|
4328
6297
|
};
|
|
4329
6298
|
var _path$d;
|
|
@@ -4341,13 +6310,13 @@ function _extends$d() {
|
|
|
4341
6310
|
};
|
|
4342
6311
|
return _extends$d.apply(this, arguments);
|
|
4343
6312
|
}
|
|
4344
|
-
var
|
|
6313
|
+
var SvgLogoReddit20 = function SvgLogoReddit202(props) {
|
|
4345
6314
|
return /* @__PURE__ */ React.createElement("svg", _extends$d({
|
|
4346
6315
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4347
6316
|
width: 20,
|
|
4348
6317
|
height: 20
|
|
4349
6318
|
}, props), _path$d || (_path$d = /* @__PURE__ */ React.createElement("path", {
|
|
4350
|
-
d: "
|
|
6319
|
+
d: "M13.438 13.082a1.501 1.501 0 1 1 1.502-1.502 1.503 1.503 0 0 1-1.44 1.562c-.026 0-.05.002-.077 0l.015-.06Zm.271 2.567A5.774 5.774 0 0 1 10 16.808a5.768 5.768 0 0 1-3.708-1.157.404.404 0 0 1 .57-.57 4.903 4.903 0 0 0 3.123.944 4.916 4.916 0 0 0 3.138-.915.419.419 0 1 1 .586.6v-.06Zm-8.724-4.128a1.501 1.501 0 1 1 3.002 0 1.501 1.501 0 0 1-3.002 0ZM20 10.018a2.192 2.192 0 0 0-3.709-1.5 10.681 10.681 0 0 0-5.78-1.848l.975-4.685 3.214.677a1.5 1.5 0 1 0 .194-.916l-3.678-.737a.466.466 0 0 0-.554.355v.006l-1.113 5.21a10.71 10.71 0 0 0-5.855 1.847 2.192 2.192 0 1 0-2.418 3.588 4.557 4.557 0 0 0 0 .662c0 3.363 3.92 6.095 8.754 6.095 4.835 0 8.753-2.732 8.753-6.095a4.29 4.29 0 0 0 0-.662A2.194 2.194 0 0 0 20 10.02Z"
|
|
4351
6320
|
})));
|
|
4352
6321
|
};
|
|
4353
6322
|
var _path$c;
|
|
@@ -4365,13 +6334,13 @@ function _extends$c() {
|
|
|
4365
6334
|
};
|
|
4366
6335
|
return _extends$c.apply(this, arguments);
|
|
4367
6336
|
}
|
|
4368
|
-
var
|
|
6337
|
+
var SvgLogoRss20 = function SvgLogoRss202(props) {
|
|
4369
6338
|
return /* @__PURE__ */ React.createElement("svg", _extends$c({
|
|
4370
6339
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4371
6340
|
width: 20,
|
|
4372
6341
|
height: 20
|
|
4373
6342
|
}, props), _path$c || (_path$c = /* @__PURE__ */ React.createElement("path", {
|
|
4374
|
-
d: "
|
|
6343
|
+
d: "M15 19C15 11.28 8.72 5 1 5a1 1 0 1 0 0 2c6.617 0 12 5.383 12 12a1 1 0 1 0 2 0m5 0C20 8.523 11.477 0 1 0a1 1 0 1 0 0 2c9.374 0 17 7.626 17 17a1 1 0 1 0 2 0m-10 0c0-4.963-4.037-9-9-9a1 1 0 1 0 0 2c3.859 0 7 3.141 7 7a1 1 0 1 0 2 0m-5-1.5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0"
|
|
4375
6344
|
})));
|
|
4376
6345
|
};
|
|
4377
6346
|
var _path$b;
|
|
@@ -4389,13 +6358,13 @@ function _extends$b() {
|
|
|
4389
6358
|
};
|
|
4390
6359
|
return _extends$b.apply(this, arguments);
|
|
4391
6360
|
}
|
|
4392
|
-
var
|
|
6361
|
+
var SvgLogoSnapchat20 = function SvgLogoSnapchat202(props) {
|
|
4393
6362
|
return /* @__PURE__ */ React.createElement("svg", _extends$b({
|
|
4394
6363
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4395
6364
|
width: 20,
|
|
4396
6365
|
height: 20
|
|
4397
6366
|
}, props), _path$b || (_path$b = /* @__PURE__ */ React.createElement("path", {
|
|
4398
|
-
d: "
|
|
6367
|
+
d: "M10.126 19c-.051 0-.102-.002-.153-.004a1.674 1.674 0 0 1-.099.004c-1.185 0-1.946-.516-2.68-1.014-.509-.345-.988-.669-1.553-.76a5.282 5.282 0 0 0-.814-.065c-.478 0-.855.07-1.13.122-.167.031-.31.06-.42.06-.115 0-.239-.026-.293-.201-.046-.155-.08-.302-.113-.445-.084-.37-.143-.596-.305-.62C.687 15.797.15 15.42.03 15.148A.325.325 0 0 1 0 15.034a.205.205 0 0 1 .177-.21c2.89-.457 4.184-3.288 4.238-3.408l.005-.01c.177-.344.211-.642.103-.886-.198-.449-.845-.646-1.272-.775-.105-.033-.205-.062-.283-.092-.854-.324-.925-.656-.89-.825.056-.288.458-.49.783-.49a.57.57 0 0 1 .234.044c.384.173.73.26 1.03.26.412 0 .592-.166.614-.188-.01-.187-.023-.382-.037-.585-.086-1.31-.192-2.937.24-3.866 1.295-2.783 4.041-3 4.852-3L10.15 1h.048c.813 0 3.565.216 4.86 3.001.433.93.326 2.559.24 3.867l-.004.057-.033.53c.02.018.187.173.56.186.286-.01.613-.097.972-.259a.755.755 0 0 1 .3-.056c.122 0 .245.023.347.063l.007.003c.29.098.48.292.484.497.004.191-.15.48-.898.764-.078.029-.177.06-.282.092-.43.13-1.075.326-1.273.774-.11.244-.074.543.103.887 0 .003.003.006.004.01.054.12 1.349 2.95 4.239 3.407a.206.206 0 0 1 .177.211.356.356 0 0 1-.03.116c-.12.268-.656.646-2.536.925-.154.023-.214.215-.305.617-.033.147-.067.29-.114.442-.04.13-.125.193-.268.193h-.024c-.1 0-.241-.018-.421-.052a5.942 5.942 0 0 0-1.13-.114c-.264 0-.538.022-.814.065-.564.091-1.043.415-1.549.759-.737.5-1.497 1.015-2.683 1.015"
|
|
4399
6368
|
})));
|
|
4400
6369
|
};
|
|
4401
6370
|
var _path$a;
|
|
@@ -4413,13 +6382,13 @@ function _extends$a() {
|
|
|
4413
6382
|
};
|
|
4414
6383
|
return _extends$a.apply(this, arguments);
|
|
4415
6384
|
}
|
|
4416
|
-
var
|
|
6385
|
+
var SvgLogoSoundcloud20 = function SvgLogoSoundcloud202(props) {
|
|
4417
6386
|
return /* @__PURE__ */ React.createElement("svg", _extends$a({
|
|
4418
6387
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4419
6388
|
width: 20,
|
|
4420
6389
|
height: 20
|
|
4421
6390
|
}, props), _path$a || (_path$a = /* @__PURE__ */ React.createElement("path", {
|
|
4422
|
-
d: "
|
|
6391
|
+
d: "M0 13.23c0 .252.09.442.27.571.18.129.372.175.577.137.192-.038.327-.107.405-.208.077-.101.116-.267.116-.5v-2.736a.68.68 0 0 0-.2-.496.661.661 0 0 0-.489-.204.65.65 0 0 0-.479.204.68.68 0 0 0-.2.496v2.736Zm2.141 1.171c0 .183.063.319.19.41.127.092.29.137.489.137.204 0 .37-.045.498-.137.127-.091.191-.227.191-.41v-6.38a.67.67 0 0 0-.2-.487.663.663 0 0 0-.489-.202.648.648 0 0 0-.479.202.667.667 0 0 0-.2.487v6.38Zm2.13.302c0 .182.066.319.196.41a.854.854 0 0 0 .503.137.812.812 0 0 0 .488-.137c.127-.091.191-.228.191-.41V8.879a.693.693 0 0 0-.2-.5.645.645 0 0 0-.479-.208.667.667 0 0 0-.493.208.686.686 0 0 0-.206.5v5.824Zm2.141.028c0 .346.23.519.689.519.459 0 .689-.173.689-.519V5.293c0-.529-.17-.889-.479-.928-.209-.028-.402-.027-.601.143-.198.17-.298.477-.298.785v9.438Zm2.178.273V4.736c0-.327.096-.522.288-.585a5.392 5.392 0 0 1 3.891.529 5.487 5.487 0 0 1 1.986 1.854 5.58 5.58 0 0 1 .88 2.591 3.01 3.01 0 0 1 1.21-.246c.868 0 1.612.312 2.229.935S20 11.185 20 12.06a3.09 3.09 0 0 1-.926 2.256c-.617.623-1.358.935-2.22.935l-8.096-.01a.221.221 0 0 1-.126-.104.285.285 0 0 1-.042-.133Z"
|
|
4423
6392
|
})));
|
|
4424
6393
|
};
|
|
4425
6394
|
var _path$9;
|
|
@@ -4437,13 +6406,13 @@ function _extends$9() {
|
|
|
4437
6406
|
};
|
|
4438
6407
|
return _extends$9.apply(this, arguments);
|
|
4439
6408
|
}
|
|
4440
|
-
var
|
|
6409
|
+
var SvgLogoSpotify20 = function SvgLogoSpotify202(props) {
|
|
4441
6410
|
return /* @__PURE__ */ React.createElement("svg", _extends$9({
|
|
4442
6411
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4443
6412
|
width: 20,
|
|
4444
6413
|
height: 20
|
|
4445
6414
|
}, props), _path$9 || (_path$9 = /* @__PURE__ */ React.createElement("path", {
|
|
4446
|
-
d: "
|
|
6415
|
+
d: "M10 0C4.477 0 0 4.477 0 10c0 5.522 4.477 10 10 10 5.522 0 10-4.478 10-10-.016-5.516-4.483-9.984-10-10m4.6 14.454a.594.594 0 0 1-.81.225c-.014-.007-.027-.016-.04-.025-2.35-1.454-5.3-1.75-8.8-.95a.618.618 0 1 1-.3-1.199c3.8-.851 7.1-.5 9.7 1.099a.6.6 0 0 1 .277.801c-.008.017-.018.033-.027.049m1.205-2.754a.753.753 0 0 1-1.034.26l-.016-.01A12.959 12.959 0 0 0 4.8 10.8a.76.76 0 0 1-.455-1.45A14.625 14.625 0 0 1 15.6 10.7a.706.706 0 0 1 .216.975c-.004.009-.01.016-.016.025m.1-2.8C12.7 7 7.35 6.8 4.3 7.75a.918.918 0 0 1-.617-1.728c.024-.008.047-.016.071-.022 3.551-1.05 9.4-.85 13.1 1.35.45.267.605.843.35 1.3a1.047 1.047 0 0 1-1.3.25"
|
|
4447
6416
|
})));
|
|
4448
6417
|
};
|
|
4449
6418
|
var _path$8;
|
|
@@ -4461,13 +6430,13 @@ function _extends$8() {
|
|
|
4461
6430
|
};
|
|
4462
6431
|
return _extends$8.apply(this, arguments);
|
|
4463
6432
|
}
|
|
4464
|
-
var
|
|
6433
|
+
var SvgLogoTelegram20 = function SvgLogoTelegram202(props) {
|
|
4465
6434
|
return /* @__PURE__ */ React.createElement("svg", _extends$8({
|
|
4466
6435
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4467
6436
|
width: 20,
|
|
4468
6437
|
height: 20
|
|
4469
6438
|
}, props), _path$8 || (_path$8 = /* @__PURE__ */ React.createElement("path", {
|
|
4470
|
-
d: "
|
|
6439
|
+
d: "M18.54 1.2.778 8.458s-.84.3-.774.852c.066.553.752.807.752.807l4.468 1.566 10.728-7.096s.62-.392.597 0c0 0 .111.07-.22.391-.333.324-8.429 7.904-8.429 7.904l-.583 5.182c.247.112.473-.066.473-.066l2.887-2.742 4.501 3.593c1.216.554 1.66-.598 1.66-.598L20 1.638c0-1.106-1.46-.438-1.46-.438"
|
|
4471
6440
|
})));
|
|
4472
6441
|
};
|
|
4473
6442
|
var _path$7;
|
|
@@ -4485,13 +6454,13 @@ function _extends$7() {
|
|
|
4485
6454
|
};
|
|
4486
6455
|
return _extends$7.apply(this, arguments);
|
|
4487
6456
|
}
|
|
4488
|
-
var
|
|
6457
|
+
var SvgLogoTumblr20 = function SvgLogoTumblr202(props) {
|
|
4489
6458
|
return /* @__PURE__ */ React.createElement("svg", _extends$7({
|
|
4490
6459
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4491
6460
|
width: 20,
|
|
4492
6461
|
height: 20
|
|
4493
6462
|
}, props), _path$7 || (_path$7 = /* @__PURE__ */ React.createElement("path", {
|
|
4494
|
-
d: "
|
|
6463
|
+
d: "M15.083 15.965a4.357 4.357 0 0 1-1.543.345 1.728 1.728 0 0 1-1.842-1.97V8.115h3.844V5.087h-3.835V0H8.904a.154.154 0 0 0-.138.15A6.12 6.12 0 0 1 5 5.533v2.582h1.937v6.533c-.034 2.921 2.329 5.318 5.278 5.351.157.002.314-.003.472-.014 1.407-.025 2.968-.636 3.313-1.171l-.917-2.851"
|
|
4495
6464
|
})));
|
|
4496
6465
|
};
|
|
4497
6466
|
var _path$6;
|
|
@@ -4509,13 +6478,13 @@ function _extends$6() {
|
|
|
4509
6478
|
};
|
|
4510
6479
|
return _extends$6.apply(this, arguments);
|
|
4511
6480
|
}
|
|
4512
|
-
var
|
|
6481
|
+
var SvgLogoTwitch20 = function SvgLogoTwitch202(props) {
|
|
4513
6482
|
return /* @__PURE__ */ React.createElement("svg", _extends$6({
|
|
4514
6483
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4515
6484
|
width: 20,
|
|
4516
6485
|
height: 20
|
|
4517
6486
|
}, props), _path$6 || (_path$6 = /* @__PURE__ */ React.createElement("path", {
|
|
4518
|
-
d: "
|
|
6487
|
+
d: "M1.406 0 0 3.433v14.03h5.001V20h2.812l2.656-2.537h4.063L20 12.238V0H1.406zm1.719 1.791h15v9.552L15 14.328h-5l-2.656 2.537v-2.537H3.125V1.791zm10 8.651h1.876V5.224h-1.876v5.218zm-5 0H10V5.224H8.125v5.218z"
|
|
4519
6488
|
})));
|
|
4520
6489
|
};
|
|
4521
6490
|
var _path$5;
|
|
@@ -4533,13 +6502,13 @@ function _extends$5() {
|
|
|
4533
6502
|
};
|
|
4534
6503
|
return _extends$5.apply(this, arguments);
|
|
4535
6504
|
}
|
|
4536
|
-
var
|
|
6505
|
+
var SvgLogoTwitter20 = function SvgLogoTwitter202(props) {
|
|
4537
6506
|
return /* @__PURE__ */ React.createElement("svg", _extends$5({
|
|
4538
6507
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4539
6508
|
width: 20,
|
|
4540
6509
|
height: 20
|
|
4541
6510
|
}, props), _path$5 || (_path$5 = /* @__PURE__ */ React.createElement("path", {
|
|
4542
|
-
d: "
|
|
6511
|
+
d: "M6.29 18.254c7.547 0 11.675-6.253 11.675-11.675 0-.178-.004-.354-.012-.53A8.339 8.339 0 0 0 20 3.924a8.165 8.165 0 0 1-2.356.646 4.12 4.12 0 0 0 1.804-2.27 8.198 8.198 0 0 1-2.606.996A4.104 4.104 0 0 0 9.85 7.039a11.652 11.652 0 0 1-8.458-4.287 4.101 4.101 0 0 0 1.27 5.477 4.058 4.058 0 0 1-1.858-.513l-.001.052a4.104 4.104 0 0 0 3.292 4.023 4.107 4.107 0 0 1-1.853.07 4.107 4.107 0 0 0 3.833 2.85 8.233 8.233 0 0 1-5.096 1.757A8.33 8.33 0 0 1 0 16.411a11.614 11.614 0 0 0 6.29 1.843"
|
|
4543
6512
|
})));
|
|
4544
6513
|
};
|
|
4545
6514
|
var _path$4;
|
|
@@ -4557,13 +6526,13 @@ function _extends$4() {
|
|
|
4557
6526
|
};
|
|
4558
6527
|
return _extends$4.apply(this, arguments);
|
|
4559
6528
|
}
|
|
4560
|
-
var
|
|
6529
|
+
var SvgLogoWhatsapp20 = function SvgLogoWhatsapp202(props) {
|
|
4561
6530
|
return /* @__PURE__ */ React.createElement("svg", _extends$4({
|
|
4562
6531
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4563
6532
|
width: 20,
|
|
4564
6533
|
height: 20
|
|
4565
6534
|
}, props), _path$4 || (_path$4 = /* @__PURE__ */ React.createElement("path", {
|
|
4566
|
-
d: "
|
|
6535
|
+
d: "M14.785 11.957c-.246-.135-1.455-.783-1.683-.873-.226-.091-.39-.14-.568.104-.177.242-.679.784-.83.944-.152.162-.3.177-.546.043-.246-.135-1.043-.428-1.969-1.31-.719-.687-1.192-1.52-1.329-1.774-.137-.255 0-.384.13-.503.116-.107.261-.281.392-.421.13-.142.176-.244.266-.406.09-.163.054-.31-.005-.437-.058-.125-.512-1.369-.703-1.875-.19-.505-.4-.43-.548-.436-.146-.005-.312-.032-.479-.037a.925.925 0 0 0-.68.285c-.24.24-.909.819-.956 2.042-.046 1.224.807 2.44.926 2.61.12.17 1.63 2.822 4.14 3.913 2.51 1.091 2.523.758 2.984.734.461-.024 1.505-.546 1.736-1.12.231-.572.25-1.07.191-1.175-.059-.107-.223-.176-.469-.309m-4.604 5.896a8.18 8.18 0 0 1-4.497-1.34l-3.14.997 1.02-3.011a8.025 8.025 0 0 1-1.556-4.755c0-4.474 3.667-8.112 8.173-8.112 4.507 0 8.173 3.638 8.173 8.111 0 4.472-3.666 8.11-8.173 8.11m0-17.852C4.76 0 .363 4.362.363 9.742c0 1.841.515 3.563 1.41 5.03L0 20l5.435-1.727a9.838 9.838 0 0 0 4.746 1.212c5.423 0 9.82-4.362 9.82-9.742 0-5.381-4.397-9.744-9.82-9.744"
|
|
4567
6536
|
})));
|
|
4568
6537
|
};
|
|
4569
6538
|
var _path$3;
|
|
@@ -4581,13 +6550,13 @@ function _extends$3() {
|
|
|
4581
6550
|
};
|
|
4582
6551
|
return _extends$3.apply(this, arguments);
|
|
4583
6552
|
}
|
|
4584
|
-
var
|
|
6553
|
+
var SvgLogoVimeo20 = function SvgLogoVimeo202(props) {
|
|
4585
6554
|
return /* @__PURE__ */ React.createElement("svg", _extends$3({
|
|
4586
6555
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4587
6556
|
width: 20,
|
|
4588
6557
|
height: 20
|
|
4589
6558
|
}, props), _path$3 || (_path$3 = /* @__PURE__ */ React.createElement("path", {
|
|
4590
|
-
d: "
|
|
6559
|
+
d: "M19.992 5.157c-.087 2.029-1.445 4.804-4.076 8.323C13.197 17.16 10.895 19 9.011 19c-1.165 0-2.151-1.121-2.957-3.364-.54-2.06-1.08-4.12-1.615-6.174-.6-2.246-1.244-3.37-1.93-3.37-.57.248-1.1.58-1.568.985L0 5.816c.986-.9 1.958-1.804 2.916-2.71 1.313-1.184 2.299-1.808 2.958-1.871 1.553-.158 2.51.948 2.87 3.319.386 2.558.654 4.148.805 4.772.45 2.12.943 3.18 1.479 3.178.417 0 1.045-.685 1.883-2.055a8.28 8.28 0 0 0 1.345-3.134c.12-1.186-.329-1.775-1.345-1.775a3.7 3.7 0 0 0-1.48.326c.989-3.336 2.873-4.957 5.652-4.862 2.059.06 3.027 1.446 2.907 4.159"
|
|
4591
6560
|
})));
|
|
4592
6561
|
};
|
|
4593
6562
|
var _path$2;
|
|
@@ -4605,13 +6574,13 @@ function _extends$2() {
|
|
|
4605
6574
|
};
|
|
4606
6575
|
return _extends$2.apply(this, arguments);
|
|
4607
6576
|
}
|
|
4608
|
-
var
|
|
6577
|
+
var SvgLogoYelp20 = function SvgLogoYelp202(props) {
|
|
4609
6578
|
return /* @__PURE__ */ React.createElement("svg", _extends$2({
|
|
4610
6579
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4611
6580
|
width: 20,
|
|
4612
6581
|
height: 20
|
|
4613
6582
|
}, props), _path$2 || (_path$2 = /* @__PURE__ */ React.createElement("path", {
|
|
4614
|
-
d: "
|
|
6583
|
+
d: "M6.861.39a14.07 14.07 0 0 0-2.298.789c-.504.223-.693.8-.415 1.25l4.37 7.047c.49.79 1.787.467 1.787-.446V.894c0-.52-.475-.932-1.03-.891C8.471.062 7.665.19 6.86.39m11.06 8.885a7.736 7.736 0 0 0-2.116-2.71c-.433-.355-1.104-.273-1.427.173l-2.6 3.59c-.5.69.198 1.585 1.058 1.356l4.47-1.193c.557-.15.844-.721.614-1.216m-6.22 5.164 2.465 3.673c.307.458.977.558 1.425.215a7.851 7.851 0 0 0 2.21-2.638c.25-.486-.019-1.067-.569-1.234l-4.422-1.337c-.85-.258-1.583.615-1.109 1.32m-6.099 4.295a8.681 8.681 0 0 0 3.332 1.255c.572.089 1.098-.31 1.118-.85l.163-4.328c.031-.833-1.072-1.247-1.67-.628L5.432 17.4c-.386.4-.307 1.027.17 1.333M3.758 9.387l4.18 1.899c.804.365.68 1.465-.188 1.667L3.24 14c-.563.13-1.118-.23-1.185-.767a7.178 7.178 0 0 1 .377-3.33c.184-.51.81-.751 1.328-.516"
|
|
4615
6584
|
})));
|
|
4616
6585
|
};
|
|
4617
6586
|
var _path$1;
|
|
@@ -4629,36 +6598,12 @@ function _extends$1() {
|
|
|
4629
6598
|
};
|
|
4630
6599
|
return _extends$1.apply(this, arguments);
|
|
4631
6600
|
}
|
|
4632
|
-
var
|
|
6601
|
+
var SvgLogoYoutube20 = function SvgLogoYoutube202(props) {
|
|
4633
6602
|
return /* @__PURE__ */ React.createElement("svg", _extends$1({
|
|
4634
6603
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4635
6604
|
width: 20,
|
|
4636
6605
|
height: 20
|
|
4637
6606
|
}, props), _path$1 || (_path$1 = /* @__PURE__ */ React.createElement("path", {
|
|
4638
|
-
d: "M6.861.39a14.07 14.07 0 0 0-2.298.789c-.504.223-.693.8-.415 1.25l4.37 7.047c.49.79 1.787.467 1.787-.446V.894c0-.52-.475-.932-1.03-.891C8.471.062 7.665.19 6.86.39m11.06 8.885a7.736 7.736 0 0 0-2.116-2.71c-.433-.355-1.104-.273-1.427.173l-2.6 3.59c-.5.69.198 1.585 1.058 1.356l4.47-1.193c.557-.15.844-.721.614-1.216m-6.22 5.164 2.465 3.673c.307.458.977.558 1.425.215a7.851 7.851 0 0 0 2.21-2.638c.25-.486-.019-1.067-.569-1.234l-4.422-1.337c-.85-.258-1.583.615-1.109 1.32m-6.099 4.295a8.681 8.681 0 0 0 3.332 1.255c.572.089 1.098-.31 1.118-.85l.163-4.328c.031-.833-1.072-1.247-1.67-.628L5.432 17.4c-.386.4-.307 1.027.17 1.333M3.758 9.387l4.18 1.899c.804.365.68 1.465-.188 1.667L3.24 14c-.563.13-1.118-.23-1.185-.767a7.178 7.178 0 0 1 .377-3.33c.184-.51.81-.751 1.328-.516"
|
|
4639
|
-
})));
|
|
4640
|
-
};
|
|
4641
|
-
var _path;
|
|
4642
|
-
function _extends() {
|
|
4643
|
-
_extends = Object.assign || function(target) {
|
|
4644
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
4645
|
-
var source = arguments[i];
|
|
4646
|
-
for (var key in source) {
|
|
4647
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
4648
|
-
target[key] = source[key];
|
|
4649
|
-
}
|
|
4650
|
-
}
|
|
4651
|
-
}
|
|
4652
|
-
return target;
|
|
4653
|
-
};
|
|
4654
|
-
return _extends.apply(this, arguments);
|
|
4655
|
-
}
|
|
4656
|
-
var SvgLogoYoutube20 = function SvgLogoYoutube202(props) {
|
|
4657
|
-
return /* @__PURE__ */ React.createElement("svg", _extends({
|
|
4658
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4659
|
-
width: 20,
|
|
4660
|
-
height: 20
|
|
4661
|
-
}, props), _path || (_path = /* @__PURE__ */ React.createElement("path", {
|
|
4662
6607
|
d: "M8 13V7l5 3-5 3Zm11.582-7.814a2.502 2.502 0 0 0-1.769-1.768C16.254 3 10 3 10 3s-6.254 0-7.814.418c-.86.23-1.538.908-1.768 1.768C0 6.746 0 10 0 10s0 3.254.418 4.813c.23.862.908 1.54 1.768 1.769C3.746 17 10 17 10 17s6.254 0 7.813-.418a2.498 2.498 0 0 0 1.769-1.769C20 13.254 20 10 20 10s0-3.254-.418-4.814Z"
|
|
4663
6608
|
})));
|
|
4664
6609
|
};
|
|
@@ -4798,7 +6743,7 @@ function SocialLinksPlaceholder({
|
|
|
4798
6743
|
}, link.id))
|
|
4799
6744
|
});
|
|
4800
6745
|
}
|
|
4801
|
-
const Container = styled.div`
|
|
6746
|
+
const Container$1 = styled.div`
|
|
4802
6747
|
display: flex;
|
|
4803
6748
|
flex-direction: row;
|
|
4804
6749
|
flex-wrap: wrap;
|
|
@@ -4882,7 +6827,7 @@ const SocialLinks = forwardRef(function SocialLinks2({
|
|
|
4882
6827
|
}, ref) {
|
|
4883
6828
|
const fillData = useColor(fill);
|
|
4884
6829
|
const backgroundColorData = useColor(backgroundColor);
|
|
4885
|
-
return /* @__PURE__ */ jsx(Container, {
|
|
6830
|
+
return /* @__PURE__ */ jsx(Container$1, {
|
|
4886
6831
|
ref,
|
|
4887
6832
|
id,
|
|
4888
6833
|
alignment,
|
|
@@ -4918,7 +6863,7 @@ const SocialLinks = forwardRef(function SocialLinks2({
|
|
|
4918
6863
|
})
|
|
4919
6864
|
});
|
|
4920
6865
|
});
|
|
4921
|
-
function registerComponent$
|
|
6866
|
+
function registerComponent$2(runtime) {
|
|
4922
6867
|
return runtime.registerComponent(SocialLinks, {
|
|
4923
6868
|
type: "./components/SocialLinks/index.js",
|
|
4924
6869
|
label: "Social Links",
|
|
@@ -5166,10 +7111,10 @@ const Span = styled.span`
|
|
|
5166
7111
|
`}
|
|
5167
7112
|
`, shallowMergeFallbacks)}
|
|
5168
7113
|
`;
|
|
5169
|
-
function Mark(
|
|
5170
|
-
var
|
|
7114
|
+
function Mark(__) {
|
|
7115
|
+
var _$ = __, {
|
|
5171
7116
|
value
|
|
5172
|
-
} =
|
|
7117
|
+
} = _$, restOfProps = __objRest(_$, [
|
|
5173
7118
|
"value"
|
|
5174
7119
|
]);
|
|
5175
7120
|
const typographyStyle = useTypographyMark(value);
|
|
@@ -5207,10 +7152,10 @@ const StyledBlock = styled.div`
|
|
|
5207
7152
|
border-left: 5px solid rgba(0, 0, 0, 0.1);
|
|
5208
7153
|
` : ""}
|
|
5209
7154
|
`;
|
|
5210
|
-
var Block = forwardRef(function Block2(
|
|
5211
|
-
var
|
|
7155
|
+
var Block = forwardRef(function Block2(_aa, ref) {
|
|
7156
|
+
var _ba = _aa, {
|
|
5212
7157
|
textAlign
|
|
5213
|
-
} =
|
|
7158
|
+
} = _ba, restOfProps = __objRest(_ba, [
|
|
5214
7159
|
"textAlign"
|
|
5215
7160
|
]);
|
|
5216
7161
|
return /* @__PURE__ */ jsx(StyledBlock, __spreadProps(__spreadValues({}, restOfProps), {
|
|
@@ -5335,10 +7280,10 @@ function Inlines() {
|
|
|
5335
7280
|
}
|
|
5336
7281
|
};
|
|
5337
7282
|
}
|
|
5338
|
-
const RichTextEditor = styled(forwardRef(function RichTextEditor2(
|
|
5339
|
-
var
|
|
7283
|
+
const RichTextEditor = styled(forwardRef(function RichTextEditor2(_ca, ref) {
|
|
7284
|
+
var _da = _ca, {
|
|
5340
7285
|
placeholder: placeholder2 = "Write some text..."
|
|
5341
|
-
} =
|
|
7286
|
+
} = _da, restOfProps = __objRest(_da, [
|
|
5342
7287
|
"placeholder"
|
|
5343
7288
|
]);
|
|
5344
7289
|
const plugins = useMemo(() => [Lists(), LinkPlugin(), Inlines(), DeviceOverridesBlockPlugin(), DeviceOverridesMarksPlugin()], []);
|
|
@@ -5455,7 +7400,7 @@ const Text = forwardRef(function Text2({
|
|
|
5455
7400
|
onKeyDown: handleKeyDown
|
|
5456
7401
|
});
|
|
5457
7402
|
});
|
|
5458
|
-
function registerComponent(runtime) {
|
|
7403
|
+
function registerComponent$1(runtime) {
|
|
5459
7404
|
return runtime.registerComponent(Text, {
|
|
5460
7405
|
type: "./components/Text/index.js",
|
|
5461
7406
|
label: "Text",
|
|
@@ -5533,18 +7478,103 @@ function registerComponent(runtime) {
|
|
|
5533
7478
|
}
|
|
5534
7479
|
});
|
|
5535
7480
|
}
|
|
7481
|
+
const Container = styled.div`
|
|
7482
|
+
display: flex;
|
|
7483
|
+
flex-direction: column;
|
|
7484
|
+
overflow: hidden;
|
|
7485
|
+
${cssWidth("560px")}
|
|
7486
|
+
${cssMargin()}
|
|
7487
|
+
${cssBorderRadius()}
|
|
7488
|
+
`;
|
|
7489
|
+
const ASPECT_RATIO = 16 / 9;
|
|
7490
|
+
const Video = forwardRef(function Video2({
|
|
7491
|
+
id,
|
|
7492
|
+
video,
|
|
7493
|
+
width,
|
|
7494
|
+
margin,
|
|
7495
|
+
borderRadius
|
|
7496
|
+
}, ref) {
|
|
7497
|
+
const canPlayUrl = video && video.url != null && ReactPlayer.canPlay(video.url);
|
|
7498
|
+
return /* @__PURE__ */ jsx(Container, {
|
|
7499
|
+
ref,
|
|
7500
|
+
id,
|
|
7501
|
+
width,
|
|
7502
|
+
margin,
|
|
7503
|
+
borderRadius,
|
|
7504
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
7505
|
+
style: {
|
|
7506
|
+
position: "relative",
|
|
7507
|
+
paddingTop: `${100 / ASPECT_RATIO}%`
|
|
7508
|
+
},
|
|
7509
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
7510
|
+
style: {
|
|
7511
|
+
position: "absolute",
|
|
7512
|
+
top: 0,
|
|
7513
|
+
left: 0,
|
|
7514
|
+
right: 0,
|
|
7515
|
+
bottom: 0
|
|
7516
|
+
},
|
|
7517
|
+
children: canPlayUrl === true ? /* @__PURE__ */ jsx(ReactPlayer, __spreadProps(__spreadValues({}, video), {
|
|
7518
|
+
width: "100%",
|
|
7519
|
+
height: "100%",
|
|
7520
|
+
config: {
|
|
7521
|
+
vimeo: {
|
|
7522
|
+
playerOptions: {
|
|
7523
|
+
background: video != null && !video.controls
|
|
7524
|
+
}
|
|
7525
|
+
},
|
|
7526
|
+
wistia: {
|
|
7527
|
+
options: {
|
|
7528
|
+
endVideoBehavior: video != null && video.loop === true ? "loop" : "default"
|
|
7529
|
+
}
|
|
7530
|
+
}
|
|
7531
|
+
}
|
|
7532
|
+
})) : /* @__PURE__ */ jsx("img", {
|
|
7533
|
+
width: "100%",
|
|
7534
|
+
src: placeholders.video.src,
|
|
7535
|
+
alt: "Video Placeholder"
|
|
7536
|
+
})
|
|
7537
|
+
})
|
|
7538
|
+
})
|
|
7539
|
+
});
|
|
7540
|
+
});
|
|
7541
|
+
function registerComponent(runtime) {
|
|
7542
|
+
return runtime.registerComponent(Video, {
|
|
7543
|
+
type: "./components/Video/index.js",
|
|
7544
|
+
label: "Video",
|
|
7545
|
+
icon: "Video40",
|
|
7546
|
+
props: {
|
|
7547
|
+
id: ElementID(),
|
|
7548
|
+
video: Video$1({
|
|
7549
|
+
preset: {
|
|
7550
|
+
controls: true
|
|
7551
|
+
}
|
|
7552
|
+
}),
|
|
7553
|
+
width: Width({
|
|
7554
|
+
defaultValue: {
|
|
7555
|
+
value: 560,
|
|
7556
|
+
unit: "px"
|
|
7557
|
+
}
|
|
7558
|
+
}),
|
|
7559
|
+
margin: Margin(),
|
|
7560
|
+
borderRadius: BorderRadius()
|
|
7561
|
+
}
|
|
7562
|
+
});
|
|
7563
|
+
}
|
|
5536
7564
|
function registerBuiltinComponents(runtime) {
|
|
5537
|
-
const unregisterBoxComponent = registerComponent$
|
|
5538
|
-
const unregisterButtonComponent = registerComponent$
|
|
5539
|
-
const unregisterCarouselComponent = registerComponent$
|
|
5540
|
-
const unregisterCountdownComponent = registerComponent$
|
|
5541
|
-
const unregisterDividerComponent = registerComponent$
|
|
5542
|
-
const unregisterEmbedComponent = registerComponent$
|
|
5543
|
-
const
|
|
5544
|
-
const
|
|
5545
|
-
const
|
|
5546
|
-
const
|
|
5547
|
-
const
|
|
7565
|
+
const unregisterBoxComponent = registerComponent$c(runtime);
|
|
7566
|
+
const unregisterButtonComponent = registerComponent$b(runtime);
|
|
7567
|
+
const unregisterCarouselComponent = registerComponent$9(runtime);
|
|
7568
|
+
const unregisterCountdownComponent = registerComponent$8(runtime);
|
|
7569
|
+
const unregisterDividerComponent = registerComponent$7(runtime);
|
|
7570
|
+
const unregisterEmbedComponent = registerComponent$6(runtime);
|
|
7571
|
+
const unregisterFormComponent = registerComponent$5(runtime);
|
|
7572
|
+
const unregisterImageComponent = registerComponent$a(runtime);
|
|
7573
|
+
const unregisterNavigationComponent = registerComponent$4(runtime);
|
|
7574
|
+
const unregisterRootComponent = registerComponent$3(runtime);
|
|
7575
|
+
const unregisterSocialLinksComponent = registerComponent$2(runtime);
|
|
7576
|
+
const unregisterTextComponent = registerComponent$1(runtime);
|
|
7577
|
+
const unregisterVideoComponent = registerComponent(runtime);
|
|
5548
7578
|
return () => {
|
|
5549
7579
|
unregisterBoxComponent();
|
|
5550
7580
|
unregisterButtonComponent();
|
|
@@ -5552,13 +7582,66 @@ function registerBuiltinComponents(runtime) {
|
|
|
5552
7582
|
unregisterCountdownComponent();
|
|
5553
7583
|
unregisterDividerComponent();
|
|
5554
7584
|
unregisterEmbedComponent();
|
|
7585
|
+
unregisterFormComponent();
|
|
5555
7586
|
unregisterImageComponent();
|
|
5556
7587
|
unregisterNavigationComponent();
|
|
5557
7588
|
unregisterRootComponent();
|
|
5558
7589
|
unregisterSocialLinksComponent();
|
|
5559
7590
|
unregisterTextComponent();
|
|
7591
|
+
unregisterTextComponent();
|
|
7592
|
+
unregisterVideoComponent();
|
|
7593
|
+
};
|
|
7594
|
+
}
|
|
7595
|
+
var _path;
|
|
7596
|
+
function _extends() {
|
|
7597
|
+
_extends = Object.assign || function(target) {
|
|
7598
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
7599
|
+
var source = arguments[i];
|
|
7600
|
+
for (var key in source) {
|
|
7601
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7602
|
+
target[key] = source[key];
|
|
7603
|
+
}
|
|
7604
|
+
}
|
|
7605
|
+
}
|
|
7606
|
+
return target;
|
|
5560
7607
|
};
|
|
7608
|
+
return _extends.apply(this, arguments);
|
|
5561
7609
|
}
|
|
7610
|
+
var SvgWarning20 = function SvgWarning202(props) {
|
|
7611
|
+
return /* @__PURE__ */ React.createElement("svg", _extends({
|
|
7612
|
+
width: 20,
|
|
7613
|
+
height: 20,
|
|
7614
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
7615
|
+
}, props), _path || (_path = /* @__PURE__ */ React.createElement("path", {
|
|
7616
|
+
fillRule: "evenodd",
|
|
7617
|
+
clipRule: "evenodd",
|
|
7618
|
+
d: "M2.899 18H17.1a1.75 1.75 0 0 0 1.549-2.565L11.549 1.942c-.656-1.246-2.442-1.246-3.098 0L1.35 15.435A1.75 1.75 0 0 0 2.899 18ZM9 6a1 1 0 1 1 2 0v5a1 1 0 1 1-2 0V6Zm2.25 8.75a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Z"
|
|
7619
|
+
})));
|
|
7620
|
+
};
|
|
7621
|
+
const ErrorDiv = styled("div")`
|
|
7622
|
+
width: 100%;
|
|
7623
|
+
height: 54px;
|
|
7624
|
+
background-color: #fcedf2;
|
|
7625
|
+
border-radius: 6px;
|
|
7626
|
+
padding: 16px;
|
|
7627
|
+
display: flex;
|
|
7628
|
+
align-items: center;
|
|
7629
|
+
gap: 8px;
|
|
7630
|
+
color: #c73e6d;
|
|
7631
|
+
fill: currentColor;
|
|
7632
|
+
font-family: Heebo, sans-serif;
|
|
7633
|
+
font-size: 16px;
|
|
7634
|
+
`;
|
|
7635
|
+
const FallbackComponent = forwardRef(function FallbackComponent2({
|
|
7636
|
+
text
|
|
7637
|
+
}, ref) {
|
|
7638
|
+
return /* @__PURE__ */ jsxs(ErrorDiv, {
|
|
7639
|
+
ref,
|
|
7640
|
+
children: [/* @__PURE__ */ jsx(SvgWarning20, {}), /* @__PURE__ */ jsx("span", {
|
|
7641
|
+
children: text
|
|
7642
|
+
})]
|
|
7643
|
+
});
|
|
7644
|
+
});
|
|
5562
7645
|
const contextDefaultValue = configureStore();
|
|
5563
7646
|
function createReactRuntime(store) {
|
|
5564
7647
|
return {
|
|
@@ -5585,10 +7668,9 @@ function createReactRuntime(store) {
|
|
|
5585
7668
|
const ReactRuntime = createReactRuntime(contextDefaultValue);
|
|
5586
7669
|
const Context = createContext(contextDefaultValue);
|
|
5587
7670
|
function RuntimeProvider({
|
|
7671
|
+
client,
|
|
5588
7672
|
children,
|
|
5589
|
-
defaultRootElements
|
|
5590
|
-
registerComponents,
|
|
5591
|
-
makeswiftApiEndpoint
|
|
7673
|
+
defaultRootElements
|
|
5592
7674
|
}) {
|
|
5593
7675
|
const [store, setStore] = useState(() => {
|
|
5594
7676
|
const store2 = configureStore({
|
|
@@ -5597,27 +7679,11 @@ function RuntimeProvider({
|
|
|
5597
7679
|
});
|
|
5598
7680
|
const runtime = createReactRuntime(store2);
|
|
5599
7681
|
registerBuiltinComponents(runtime);
|
|
5600
|
-
registerComponents == null ? void 0 : registerComponents(runtime);
|
|
5601
7682
|
return store2;
|
|
5602
7683
|
});
|
|
5603
|
-
const [client, setClient] = useState(new ApolloClient({
|
|
5604
|
-
uri: makeswiftApiEndpoint,
|
|
5605
|
-
cache: new InMemoryCache()
|
|
5606
|
-
}));
|
|
5607
|
-
useEffect(() => {
|
|
5608
|
-
setClient(({
|
|
5609
|
-
cache
|
|
5610
|
-
}) => new ApolloClient({
|
|
5611
|
-
uri: makeswiftApiEndpoint,
|
|
5612
|
-
cache
|
|
5613
|
-
}));
|
|
5614
|
-
}, [makeswiftApiEndpoint]);
|
|
5615
7684
|
useEffect(() => {
|
|
5616
7685
|
return registerBuiltinComponents(createReactRuntime(store));
|
|
5617
7686
|
}, [store]);
|
|
5618
|
-
useEffect(() => {
|
|
5619
|
-
return registerComponents == null ? void 0 : registerComponents(createReactRuntime(store));
|
|
5620
|
-
}, [store, registerComponents]);
|
|
5621
7687
|
useEffect(() => {
|
|
5622
7688
|
const isInBuilder = window.parent !== window;
|
|
5623
7689
|
if (isInBuilder)
|
|
@@ -5626,7 +7692,7 @@ function RuntimeProvider({
|
|
|
5626
7692
|
const ReactBuilderPreview = await import("./react-builder-preview.es.js");
|
|
5627
7693
|
setStore((store2) => ReactBuilderPreview.configureStore({
|
|
5628
7694
|
preloadedState: store2.getState(),
|
|
5629
|
-
client
|
|
7695
|
+
client: client.apolloClient
|
|
5630
7696
|
}));
|
|
5631
7697
|
}
|
|
5632
7698
|
}, [client]);
|
|
@@ -5653,7 +7719,7 @@ function RuntimeProvider({
|
|
|
5653
7719
|
}, []);
|
|
5654
7720
|
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
5655
7721
|
value: store,
|
|
5656
|
-
children: /* @__PURE__ */ jsx(
|
|
7722
|
+
children: /* @__PURE__ */ jsx(MakeswiftProvider, {
|
|
5657
7723
|
client,
|
|
5658
7724
|
children
|
|
5659
7725
|
})
|
|
@@ -5708,15 +7774,9 @@ const ElementData = memo(forwardRef(function ElementData2({
|
|
|
5708
7774
|
}, ref) {
|
|
5709
7775
|
const Component = useComponent(elementData.type);
|
|
5710
7776
|
if (Component == null) {
|
|
5711
|
-
return /* @__PURE__ */
|
|
7777
|
+
return /* @__PURE__ */ jsx(FallbackComponent, {
|
|
5712
7778
|
ref,
|
|
5713
|
-
|
|
5714
|
-
children: "Component Not Found"
|
|
5715
|
-
}), /* @__PURE__ */ jsx("pre", {
|
|
5716
|
-
children: /* @__PURE__ */ jsx("code", {
|
|
5717
|
-
children: JSON.stringify(elementData, null, 2)
|
|
5718
|
-
})
|
|
5719
|
-
})]
|
|
7779
|
+
text: "Component not found"
|
|
5720
7780
|
});
|
|
5721
7781
|
}
|
|
5722
7782
|
return /* @__PURE__ */ createElement(Component, __spreadProps(__spreadValues({}, elementData.props), {
|
|
@@ -5746,27 +7806,15 @@ const ElementReference = memo(forwardRef(function ElementReference2({
|
|
|
5746
7806
|
const globalElementData = (_a = data == null ? void 0 : data.globalElement) == null ? void 0 : _a.data;
|
|
5747
7807
|
const elementReferenceDocument = useDocument(elementReference.key);
|
|
5748
7808
|
if (error != null) {
|
|
5749
|
-
return /* @__PURE__ */
|
|
7809
|
+
return /* @__PURE__ */ jsx(FallbackComponent, {
|
|
5750
7810
|
ref,
|
|
5751
|
-
|
|
5752
|
-
children: "Something went wrong!"
|
|
5753
|
-
}), /* @__PURE__ */ jsx("pre", {
|
|
5754
|
-
children: /* @__PURE__ */ jsx("code", {
|
|
5755
|
-
children: JSON.stringify(error, null, 2)
|
|
5756
|
-
})
|
|
5757
|
-
})]
|
|
7811
|
+
text: "Something went wrong!"
|
|
5758
7812
|
});
|
|
5759
7813
|
}
|
|
5760
7814
|
if (globalElementData == null) {
|
|
5761
|
-
return /* @__PURE__ */
|
|
7815
|
+
return /* @__PURE__ */ jsx(FallbackComponent, {
|
|
5762
7816
|
ref,
|
|
5763
|
-
|
|
5764
|
-
children: "Not Found"
|
|
5765
|
-
}), /* @__PURE__ */ jsx("pre", {
|
|
5766
|
-
children: /* @__PURE__ */ jsx("code", {
|
|
5767
|
-
children: JSON.stringify(elementReference, null, 2)
|
|
5768
|
-
})
|
|
5769
|
-
})]
|
|
7817
|
+
text: "This global component doesn't exist"
|
|
5770
7818
|
});
|
|
5771
7819
|
}
|
|
5772
7820
|
return elementReferenceDocument != null ? /* @__PURE__ */ jsx(Document, {
|
|
@@ -5819,15 +7867,9 @@ const DocumentReference = memo(forwardRef(function DocumentReference2({
|
|
|
5819
7867
|
}, ref) {
|
|
5820
7868
|
const document = useDocument(documentReference.key);
|
|
5821
7869
|
if (document == null) {
|
|
5822
|
-
return /* @__PURE__ */
|
|
7870
|
+
return /* @__PURE__ */ jsx(FallbackComponent, {
|
|
5823
7871
|
ref,
|
|
5824
|
-
|
|
5825
|
-
children: "Document Not Found"
|
|
5826
|
-
}), /* @__PURE__ */ jsx("pre", {
|
|
5827
|
-
children: /* @__PURE__ */ jsx("code", {
|
|
5828
|
-
children: JSON.stringify(documentReference, null, 2)
|
|
5829
|
-
})
|
|
5830
|
-
})]
|
|
7872
|
+
text: "Document not found"
|
|
5831
7873
|
});
|
|
5832
7874
|
}
|
|
5833
7875
|
return /* @__PURE__ */ jsx(Document, {
|
|
@@ -5835,5 +7877,5 @@ const DocumentReference = memo(forwardRef(function DocumentReference2({
|
|
|
5835
7877
|
document
|
|
5836
7878
|
});
|
|
5837
7879
|
}));
|
|
5838
|
-
export { Box as B, Carousel as C,
|
|
7880
|
+
export { useBackgrounds as A, Box as B, Carousel as C, DocumentReference as D, Element$1 as E, Form as F, useBorder as G, useBoxShadow as H, ImageComponent as I, useColor as J, useFile as K, useMediaQuery as L, usePage as M, Navigation as N, useTable as O, PageProvider as P, MakeswiftClient as Q, RuntimeProvider as R, SocialLinks as S, Text as T, ReactRuntime as a, usePageId as b, Button$1 as c, Countdown as d, Divider as e, Embed as f, Root as g, registerComponent$c as h, DEFAULT_BOX_ANIMATE_TYPE as i, DEFAULT_BOX_ANIMATE_DELAY as j, DEFAULT_BOX_ANIMATE_DURATION as k, DEFAULT_ITEM_ANIMATE_TYPE as l, DEFAULT_ITEM_ANIMATE_DELAY as m, DEFAULT_ITEM_ANIMATE_DURATION as n, DEFAULT_ITEM_STAGGER_DURATION as o, cssMediaRules as p, cssWidth as q, registerBuiltinComponents as r, cssMargin as s, cssPadding as t, useIsInBuilder as u, cssBorder as v, cssBorderRadius as w, cssBoxShadow as x, cssGridItem as y, cssTextStyle as z };
|
|
5839
7881
|
//# sourceMappingURL=react.es2.js.map
|