@makeswift/runtime 0.0.0-6baa2a2 → 0.0.0-7d64672
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/builder.js +1 -0
- 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 +34 -2
- package/dist/actions.cjs.js.map +1 -1
- package/dist/actions.es.js +29 -2
- package/dist/actions.es.js.map +1 -1
- package/dist/api.cjs.js +1 -2
- package/dist/api.cjs.js.map +1 -1
- package/dist/box-model.cjs.js +1 -2
- package/dist/box-model.cjs.js.map +1 -1
- package/dist/box-models.cjs.js +2 -0
- package/dist/box-models.cjs.js.map +1 -1
- package/dist/box-models.es.js +2 -0
- package/dist/box-models.es.js.map +1 -1
- package/dist/builder.cjs.js +9 -0
- package/dist/builder.cjs.js.map +1 -0
- package/dist/builder.es.js +3 -0
- package/dist/builder.es.js.map +1 -0
- package/dist/components.cjs.js +18 -3
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.es.js +8 -2
- package/dist/components.es.js.map +1 -1
- package/dist/constants.cjs.js +96 -1
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.es.js +96 -1
- package/dist/constants.es.js.map +1 -1
- package/dist/control-serialization.cjs.js +147 -0
- package/dist/control-serialization.cjs.js.map +1 -0
- package/dist/control-serialization.es.js +143 -0
- package/dist/control-serialization.es.js.map +1 -0
- package/dist/descriptors.cjs.js +10 -3
- package/dist/descriptors.cjs.js.map +1 -1
- package/dist/descriptors.es.js +8 -4
- 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 +10 -2
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +5 -1
- package/dist/main.es.js.map +1 -1
- package/dist/next.cjs.js +40 -18
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +40 -17
- package/dist/next.es.js.map +1 -1
- package/dist/prop-controllers.cjs.js +2 -2
- package/dist/prop-controllers.es.js +1 -1
- package/dist/react-builder-preview.cjs.js +36 -39
- package/dist/react-builder-preview.cjs.js.map +1 -1
- package/dist/react-builder-preview.es.js +34 -37
- package/dist/react-builder-preview.es.js.map +1 -1
- package/dist/react-page.cjs.js +262 -0
- package/dist/react-page.cjs.js.map +1 -0
- package/dist/react-page.es.js +241 -0
- package/dist/react-page.es.js.map +1 -0
- package/dist/react.cjs.js +10 -4
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.cjs2.js +2424 -534
- package/dist/react.cjs2.js.map +1 -1
- package/dist/react.es.js +7 -2
- package/dist/react.es.js.map +1 -1
- package/dist/react.es2.js +2413 -525
- 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 +59 -0
- package/dist/types/api/generated/graphql.d.ts.map +1 -1
- package/dist/types/api/react.d.ts +24 -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/index.d.ts +2 -0
- package/dist/types/builder/index.d.ts.map +1 -0
- package/dist/types/builder/serialization/control-serialization.d.ts +78 -0
- package/dist/types/builder/serialization/control-serialization.d.ts.map +1 -0
- package/dist/types/builder/serialization/function-serialization.d.ts +11 -0
- package/dist/types/builder/serialization/function-serialization.d.ts.map +1 -0
- package/dist/types/builder/serialization/index.d.ts +3 -0
- package/dist/types/builder/serialization/index.d.ts.map +1 -0
- 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/Form/prop-controllers.d.ts +1 -0
- package/dist/types/components/builtin/Form/prop-controllers.d.ts.map +1 -0
- 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/Video/prop-controllers.d.ts +50 -0
- package/dist/types/components/builtin/Video/prop-controllers.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/hooks/useTableWorkspace.d.ts +14 -0
- package/dist/types/components/hooks/useTableWorkspace.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/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/layout.d.ts +16 -0
- package/dist/types/components/utils/layout.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/pollAnimationFrame.d.ts +2 -0
- package/dist/types/components/utils/pollAnimationFrame.d.ts.map +1 -0
- package/dist/types/components/utils/pollElementLayout.d.ts +8 -0
- package/dist/types/components/utils/pollElementLayout.d.ts.map +1 -0
- 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/requestBatchedAnimationFrame.d.ts +4 -0
- package/dist/types/components/utils/requestBatchedAnimationFrame.d.ts.map +1 -0
- package/dist/types/components/utils/types.d.ts +1 -2
- package/dist/types/components/utils/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/next.d.ts +6 -4
- package/dist/types/next.d.ts.map +1 -1
- package/dist/types/prop-controllers/descriptors.d.ts +31 -12
- 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/page.d.ts +9 -0
- package/dist/types/runtimes/page.d.ts.map +1 -0
- package/dist/types/runtimes/react.d.ts +15 -8
- package/dist/types/runtimes/react.d.ts.map +1 -1
- package/dist/types/state/actions.d.ts +55 -1
- package/dist/types/state/actions.d.ts.map +1 -1
- package/dist/types/state/modules/box-models.d.ts.map +1 -1
- package/dist/types/state/modules/read-only-documents.d.ts +8 -4
- package/dist/types/state/modules/read-only-documents.d.ts.map +1 -1
- package/dist/types/state/modules/read-write-documents.d.ts +1 -1
- package/dist/types/state/modules/read-write-documents.d.ts.map +1 -1
- package/dist/types/state/react-builder-preview.d.ts.map +1 -1
- package/dist/types/state/react-page.d.ts +3 -3
- package/dist/types/state/react-page.d.ts.map +1 -1
- package/dist/types/utils/get-redirect-match.d.ts +10 -0
- package/dist/types/utils/get-redirect-match.d.ts.map +1 -0
- package/dist/types/utils/get-redirect-match.test.d.ts +1 -0
- package/dist/types/utils/get-redirect-match.test.d.ts.map +1 -0
- package/package.json +19 -6
package/dist/react.es2.js
CHANGED
|
@@ -29,239 +29,39 @@ 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 {
|
|
37
|
-
import
|
|
38
|
-
import { A as ActionTypes, r as registerComponentHandleEffect, e as mountComponentEffect, f as registerComponentEffect, g as registerReactComponentEffect } from "./actions.es.js";
|
|
39
|
-
import { T as Types, 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 NavigationLinks, p as SocialLinks$1, q as RichText } from "./descriptors.es.js";
|
|
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";
|
|
41
|
+
import { f as registerComponentHandleEffect, g as mountComponentEffect, h as registerComponentEffect, j as registerReactComponentEffect } from "./actions.es.js";
|
|
40
42
|
import styled, { css, keyframes, createGlobalStyle } from "styled-components";
|
|
41
43
|
import { useReducedMotion, useAnimation, motion } from "framer-motion";
|
|
44
|
+
import { getDataFromTree } from "@apollo/client/react/ssr";
|
|
45
|
+
import uuid from "uuid/v4";
|
|
42
46
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
47
|
+
import "html-react-parser";
|
|
48
|
+
import "next/head";
|
|
43
49
|
import { p as parse, c as createBox, g as getBox } from "./box-models.es.js";
|
|
44
50
|
import NextImage from "next/image";
|
|
45
51
|
import ReactPlayer from "react-player";
|
|
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";
|
|
46
53
|
import ColorHelper from "color";
|
|
47
54
|
import scrollIntoView from "scroll-into-view-if-needed";
|
|
48
55
|
import NextLink from "next/link";
|
|
49
56
|
import { useGesture } from "react-use-gesture";
|
|
50
57
|
import { wrap } from "@popmotion/popcorn";
|
|
51
|
-
import
|
|
58
|
+
import { Field as Field$1, getIn, Formik } from "formik";
|
|
52
59
|
import { normalize } from "polished";
|
|
53
60
|
import { Value } from "slate";
|
|
54
61
|
import Hotkeys from "slate-hotkeys";
|
|
55
62
|
import ipsum from "corporate-ipsum";
|
|
56
63
|
import { Editor } from "slate-react";
|
|
57
64
|
import Lists from "@convertkit/slate-lists";
|
|
58
|
-
function isElementReference(element) {
|
|
59
|
-
return !("props" in element);
|
|
60
|
-
}
|
|
61
|
-
function createDocument(rootElement) {
|
|
62
|
-
return { rootElement };
|
|
63
|
-
}
|
|
64
|
-
function getInitialState$3({
|
|
65
|
-
rootElements = /* @__PURE__ */ new Map()
|
|
66
|
-
} = {}) {
|
|
67
|
-
const initialState = /* @__PURE__ */ new Map();
|
|
68
|
-
rootElements.forEach((rootElement, elementKey) => {
|
|
69
|
-
initialState.set(elementKey, createDocument(rootElement));
|
|
70
|
-
});
|
|
71
|
-
return initialState;
|
|
72
|
-
}
|
|
73
|
-
function getDocuments(state) {
|
|
74
|
-
return state;
|
|
75
|
-
}
|
|
76
|
-
function getDocument(state, documentKey) {
|
|
77
|
-
var _a;
|
|
78
|
-
return (_a = getDocuments(state).get(documentKey)) != null ? _a : null;
|
|
79
|
-
}
|
|
80
|
-
function getDocumentRootElement$1(state, documentKey) {
|
|
81
|
-
var _a, _b;
|
|
82
|
-
return (_b = (_a = getDocument(state, documentKey)) == null ? void 0 : _a.rootElement) != null ? _b : null;
|
|
83
|
-
}
|
|
84
|
-
function reducer$4(state = getInitialState$3(), _action) {
|
|
85
|
-
return state;
|
|
86
|
-
}
|
|
87
|
-
function getInitialState$2({
|
|
88
|
-
reactComponents = /* @__PURE__ */ new Map()
|
|
89
|
-
} = {}) {
|
|
90
|
-
return reactComponents;
|
|
91
|
-
}
|
|
92
|
-
function getReactComponents(state) {
|
|
93
|
-
return state;
|
|
94
|
-
}
|
|
95
|
-
function getReactComponent$1(state, type) {
|
|
96
|
-
var _a;
|
|
97
|
-
return (_a = getReactComponents(state).get(type)) != null ? _a : null;
|
|
98
|
-
}
|
|
99
|
-
function reducer$3(state = getInitialState$2(), action) {
|
|
100
|
-
switch (action.type) {
|
|
101
|
-
case ActionTypes.REGISTER_REACT_COMPONENT:
|
|
102
|
-
return new Map(state).set(action.payload.type, action.payload.component);
|
|
103
|
-
case ActionTypes.UNREGISTER_REACT_COMPONENT: {
|
|
104
|
-
const nextState = new Map(state);
|
|
105
|
-
const deleted = nextState.delete(action.payload.type);
|
|
106
|
-
return deleted ? nextState : state;
|
|
107
|
-
}
|
|
108
|
-
default:
|
|
109
|
-
return state;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
function getInitialState$1({
|
|
113
|
-
componentsMeta = /* @__PURE__ */ new Map()
|
|
114
|
-
} = {}) {
|
|
115
|
-
return componentsMeta;
|
|
116
|
-
}
|
|
117
|
-
function getComponentsMeta(state) {
|
|
118
|
-
return state;
|
|
119
|
-
}
|
|
120
|
-
function reducer$2(state = getInitialState$1(), action) {
|
|
121
|
-
switch (action.type) {
|
|
122
|
-
case ActionTypes.REGISTER_COMPONENT:
|
|
123
|
-
return new Map(state).set(action.payload.type, action.payload.meta);
|
|
124
|
-
case ActionTypes.UNREGISTER_COMPONENT: {
|
|
125
|
-
const nextState = new Map(state);
|
|
126
|
-
const deleted = nextState.delete(action.payload.type);
|
|
127
|
-
return deleted ? nextState : state;
|
|
128
|
-
}
|
|
129
|
-
default:
|
|
130
|
-
return state;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
function getInitialState({
|
|
134
|
-
propControllerDescriptors = /* @__PURE__ */ new Map()
|
|
135
|
-
} = {}) {
|
|
136
|
-
return propControllerDescriptors;
|
|
137
|
-
}
|
|
138
|
-
function getPropControllerDescriptors$1(state) {
|
|
139
|
-
return state;
|
|
140
|
-
}
|
|
141
|
-
function getComponentPropControllerDescriptors$1(state, componentType) {
|
|
142
|
-
var _a;
|
|
143
|
-
return (_a = getPropControllerDescriptors$1(state).get(componentType)) != null ? _a : null;
|
|
144
|
-
}
|
|
145
|
-
function reducer$1(state = getInitialState(), action) {
|
|
146
|
-
switch (action.type) {
|
|
147
|
-
case ActionTypes.REGISTER_COMPONENT:
|
|
148
|
-
return new Map(state).set(action.payload.type, action.payload.propControllerDescriptors);
|
|
149
|
-
case ActionTypes.UNREGISTER_COMPONENT: {
|
|
150
|
-
const nextState = new Map(state);
|
|
151
|
-
const deleted = nextState.delete(action.payload.type);
|
|
152
|
-
return deleted ? nextState : state;
|
|
153
|
-
}
|
|
154
|
-
default:
|
|
155
|
-
return state;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
function getElementChildren(descriptor, prop) {
|
|
159
|
-
if (prop == null)
|
|
160
|
-
return [];
|
|
161
|
-
switch (descriptor.type) {
|
|
162
|
-
case Types.Grid:
|
|
163
|
-
return prop.elements;
|
|
164
|
-
default:
|
|
165
|
-
return [];
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
function getElementId$1(descriptor, prop) {
|
|
169
|
-
if (prop == null)
|
|
170
|
-
return null;
|
|
171
|
-
switch (descriptor.type) {
|
|
172
|
-
case Types.ElementID:
|
|
173
|
-
return prop;
|
|
174
|
-
default:
|
|
175
|
-
return null;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
const reducer = combineReducers({
|
|
179
|
-
documents: reducer$4,
|
|
180
|
-
reactComponents: reducer$3,
|
|
181
|
-
componentsMeta: reducer$2,
|
|
182
|
-
propControllers: reducer$1,
|
|
183
|
-
isInBuilder: (_state = false, _action) => false
|
|
184
|
-
});
|
|
185
|
-
function getDocumentsStateSlice(state) {
|
|
186
|
-
return state.documents;
|
|
187
|
-
}
|
|
188
|
-
function getDocumentRootElement(state, documentKey) {
|
|
189
|
-
return getDocumentRootElement$1(getDocumentsStateSlice(state), documentKey);
|
|
190
|
-
}
|
|
191
|
-
function getReactComponentsStateSlice(state) {
|
|
192
|
-
return state.reactComponents;
|
|
193
|
-
}
|
|
194
|
-
function getReactComponent(state, type) {
|
|
195
|
-
return getReactComponent$1(getReactComponentsStateSlice(state), type);
|
|
196
|
-
}
|
|
197
|
-
function getPropControllersStateSlice(state) {
|
|
198
|
-
return state.propControllers;
|
|
199
|
-
}
|
|
200
|
-
function getPropControllerDescriptors(state) {
|
|
201
|
-
return getPropControllerDescriptors$1(getPropControllersStateSlice(state));
|
|
202
|
-
}
|
|
203
|
-
function getComponentPropControllerDescriptors(state, componentType) {
|
|
204
|
-
return getComponentPropControllerDescriptors$1(getPropControllersStateSlice(state), componentType);
|
|
205
|
-
}
|
|
206
|
-
function normalizeElement(element, descriptors) {
|
|
207
|
-
const elements = /* @__PURE__ */ new Map();
|
|
208
|
-
const remaining = [element];
|
|
209
|
-
let current;
|
|
210
|
-
while (current = remaining.pop()) {
|
|
211
|
-
elements.set(current.key, current);
|
|
212
|
-
if (isElementReference(current))
|
|
213
|
-
continue;
|
|
214
|
-
const elementDescriptors = descriptors.get(element.type);
|
|
215
|
-
if (elementDescriptors == null)
|
|
216
|
-
continue;
|
|
217
|
-
const parent = current;
|
|
218
|
-
const children = Object.entries(elementDescriptors).reduce((acc, [propName, descriptor]) => {
|
|
219
|
-
return [...acc, ...getElementChildren(descriptor, parent.props[propName])];
|
|
220
|
-
}, []);
|
|
221
|
-
remaining.push(...children);
|
|
222
|
-
}
|
|
223
|
-
return elements;
|
|
224
|
-
}
|
|
225
|
-
function getDocumentElements(state, documentKey) {
|
|
226
|
-
const rootElement = getDocumentRootElement(state, documentKey);
|
|
227
|
-
const descriptors = getPropControllerDescriptors(state);
|
|
228
|
-
if (rootElement == null)
|
|
229
|
-
return /* @__PURE__ */ new Map();
|
|
230
|
-
return normalizeElement(rootElement, descriptors);
|
|
231
|
-
}
|
|
232
|
-
function getElement(state, documentKey, elementKey) {
|
|
233
|
-
var _a;
|
|
234
|
-
return (_a = getDocumentElements(state, documentKey).get(elementKey)) != null ? _a : null;
|
|
235
|
-
}
|
|
236
|
-
function getElementPropControllerDescriptors(state, documentKey, elementKey) {
|
|
237
|
-
const element = getElement(state, documentKey, elementKey);
|
|
238
|
-
if (element == null || isElementReference(element))
|
|
239
|
-
return null;
|
|
240
|
-
return getComponentPropControllerDescriptors(state, element.type);
|
|
241
|
-
}
|
|
242
|
-
function getElementId(state, documentKey, elementKey) {
|
|
243
|
-
const element = getElement(state, documentKey, elementKey);
|
|
244
|
-
if (element == null || isElementReference(element))
|
|
245
|
-
return null;
|
|
246
|
-
const descriptors = getComponentPropControllerDescriptors(state, element.type);
|
|
247
|
-
if (descriptors == null)
|
|
248
|
-
return null;
|
|
249
|
-
const elementId = Object.entries(descriptors).reduce((acc, [propName, descriptor]) => {
|
|
250
|
-
if (acc != null)
|
|
251
|
-
return acc;
|
|
252
|
-
return getElementId$1(descriptor, element.props[propName]);
|
|
253
|
-
}, null);
|
|
254
|
-
return elementId;
|
|
255
|
-
}
|
|
256
|
-
function getIsInBuilder(state) {
|
|
257
|
-
return state.isInBuilder;
|
|
258
|
-
}
|
|
259
|
-
function configureStore({
|
|
260
|
-
rootElements,
|
|
261
|
-
preloadedState
|
|
262
|
-
} = {}) {
|
|
263
|
-
return createStore(reducer, __spreadProps(__spreadValues({}, preloadedState), { documents: getInitialState$3({ rootElements }) }), applyMiddleware(thunk));
|
|
264
|
-
}
|
|
265
65
|
const PlaceholderBase$1 = styled.div`
|
|
266
66
|
width: 100%;
|
|
267
67
|
background: rgba(161, 168, 194, 0.18);
|
|
@@ -271,7 +71,7 @@ const PlaceholderBase$1 = styled.div`
|
|
|
271
71
|
hide
|
|
272
72
|
}) => hide === true ? "hidden" : "initial"};
|
|
273
73
|
`;
|
|
274
|
-
var Placeholder$
|
|
74
|
+
var Placeholder$2 = forwardRef(function Placeholder(_a, ref) {
|
|
275
75
|
var _b = _a, {
|
|
276
76
|
hide = false
|
|
277
77
|
} = _b, restOfProps = __objRest(_b, [
|
|
@@ -385,21 +185,157 @@ const TYPOGRAPHIES_BY_ID = gql`
|
|
|
385
185
|
|
|
386
186
|
${TYPOGRAPHY_FRAGMENT}
|
|
387
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
|
+
`;
|
|
388
212
|
function isNonNullable(value) {
|
|
389
213
|
return value != null;
|
|
390
214
|
}
|
|
391
|
-
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
|
+
function createApolloClient({
|
|
285
|
+
uri,
|
|
286
|
+
cacheData
|
|
287
|
+
}) {
|
|
288
|
+
const cache = new InMemoryCache({
|
|
289
|
+
typePolicies
|
|
290
|
+
});
|
|
291
|
+
if (cacheData)
|
|
292
|
+
cache.restore(cacheData);
|
|
293
|
+
return new ApolloClient({
|
|
294
|
+
uri,
|
|
295
|
+
cache
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
class MakeswiftClient {
|
|
299
|
+
constructor({
|
|
300
|
+
uri,
|
|
301
|
+
cacheData
|
|
302
|
+
}) {
|
|
303
|
+
__publicField(this, "apolloClient");
|
|
304
|
+
this.apolloClient = createApolloClient({
|
|
305
|
+
uri,
|
|
306
|
+
cacheData
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
async prefetch(element) {
|
|
310
|
+
const id = uuid();
|
|
311
|
+
await getDataFromTree(/* @__PURE__ */ jsx(RuntimeProvider, {
|
|
312
|
+
client: this,
|
|
313
|
+
defaultRootElements: /* @__PURE__ */ new Map([[id, element]]),
|
|
314
|
+
children: /* @__PURE__ */ jsx(DocumentReference, {
|
|
315
|
+
documentReference: createDocumentReference(id)
|
|
316
|
+
})
|
|
317
|
+
}));
|
|
318
|
+
return this.apolloClient.cache.extract();
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
const Context$2 = createContext(void 0);
|
|
392
322
|
function useQuery(query, options) {
|
|
393
|
-
const client = useContext(Context$
|
|
323
|
+
const client = useContext(Context$2);
|
|
394
324
|
return useQuery$1(query, __spreadValues({
|
|
395
|
-
client
|
|
325
|
+
client: client == null ? void 0 : client.apolloClient
|
|
326
|
+
}, options));
|
|
327
|
+
}
|
|
328
|
+
function useMutation(mutation, options) {
|
|
329
|
+
const client = useContext(Context$2);
|
|
330
|
+
return useMutation$1(mutation, __spreadValues({
|
|
331
|
+
client: client == null ? void 0 : client.apolloClient
|
|
396
332
|
}, options));
|
|
397
333
|
}
|
|
398
|
-
function
|
|
334
|
+
function MakeswiftProvider({
|
|
399
335
|
client,
|
|
400
336
|
children
|
|
401
337
|
}) {
|
|
402
|
-
return /* @__PURE__ */ jsx(Context$
|
|
338
|
+
return /* @__PURE__ */ jsx(Context$2.Provider, {
|
|
403
339
|
value: client,
|
|
404
340
|
children
|
|
405
341
|
});
|
|
@@ -612,8 +548,8 @@ function shallowMerge(a, b) {
|
|
|
612
548
|
}
|
|
613
549
|
const DEVICES = [
|
|
614
550
|
{ id: "desktop", minWidth: 769 },
|
|
615
|
-
{ id: "tablet", minWidth:
|
|
616
|
-
{ id: "mobile", maxWidth:
|
|
551
|
+
{ id: "tablet", minWidth: 576, maxWidth: 768 },
|
|
552
|
+
{ id: "mobile", maxWidth: 575 }
|
|
617
553
|
];
|
|
618
554
|
const getDevice = (deviceId) => {
|
|
619
555
|
const device = DEVICES.find(({ id }) => id === deviceId);
|
|
@@ -687,6 +623,12 @@ function usePage(pageId) {
|
|
|
687
623
|
const { pagePathnamesById: [page] = [] } = data;
|
|
688
624
|
return page;
|
|
689
625
|
}
|
|
626
|
+
function useTable(tableId) {
|
|
627
|
+
return useQuery(TABLE_BY_ID, {
|
|
628
|
+
skip: tableId == null,
|
|
629
|
+
variables: { id: tableId }
|
|
630
|
+
});
|
|
631
|
+
}
|
|
690
632
|
const defaultExitedProps = {
|
|
691
633
|
opacity: 0,
|
|
692
634
|
x: 0,
|
|
@@ -1157,8 +1099,8 @@ function getScrollParent(element) {
|
|
|
1157
1099
|
return element;
|
|
1158
1100
|
return getScrollParent(parentElement);
|
|
1159
1101
|
}
|
|
1160
|
-
function Parallax(
|
|
1161
|
-
var _h =
|
|
1102
|
+
function Parallax(_g2) {
|
|
1103
|
+
var _h = _g2, {
|
|
1162
1104
|
strength,
|
|
1163
1105
|
children
|
|
1164
1106
|
} = _h, rest = __objRest(_h, [
|
|
@@ -1244,7 +1186,7 @@ function Parallax(_g) {
|
|
|
1244
1186
|
children: children(getProps)
|
|
1245
1187
|
}));
|
|
1246
1188
|
}
|
|
1247
|
-
const Container$
|
|
1189
|
+
const Container$d = styled.div`
|
|
1248
1190
|
position: absolute;
|
|
1249
1191
|
top: 0;
|
|
1250
1192
|
left: 0;
|
|
@@ -1298,7 +1240,7 @@ function BackgroundVideo({
|
|
|
1298
1240
|
}, [aspectRatio, zoom]);
|
|
1299
1241
|
if (!ReactPlayer.canPlay(url))
|
|
1300
1242
|
return /* @__PURE__ */ jsx(Fragment, {});
|
|
1301
|
-
return /* @__PURE__ */ jsxs(Container$
|
|
1243
|
+
return /* @__PURE__ */ jsxs(Container$d, {
|
|
1302
1244
|
ref: container,
|
|
1303
1245
|
children: [container.current && /* @__PURE__ */ jsx(ReactPlayer, {
|
|
1304
1246
|
url,
|
|
@@ -1377,10 +1319,10 @@ const AbsoluteFill = styled.div`
|
|
|
1377
1319
|
right: 0;
|
|
1378
1320
|
bottom: 0;
|
|
1379
1321
|
`;
|
|
1380
|
-
const Container$
|
|
1322
|
+
const Container$c = styled(AbsoluteFill)`
|
|
1381
1323
|
border-radius: inherit;
|
|
1382
1324
|
`;
|
|
1383
|
-
const BackgroundsContainer$1 = styled(Container$
|
|
1325
|
+
const BackgroundsContainer$1 = styled(Container$c)`
|
|
1384
1326
|
overflow: hidden;
|
|
1385
1327
|
${(p) => cssMediaRules([p.visibility], ([visibility]) => css`
|
|
1386
1328
|
display: ${visibility === true ? "block" : "none"};
|
|
@@ -1404,7 +1346,7 @@ function Backgrounds({
|
|
|
1404
1346
|
visibility,
|
|
1405
1347
|
children: [...value].reverse().map((bg) => {
|
|
1406
1348
|
if (bg.type === "color") {
|
|
1407
|
-
return /* @__PURE__ */ jsx(Container$
|
|
1349
|
+
return /* @__PURE__ */ jsx(Container$c, {
|
|
1408
1350
|
style: {
|
|
1409
1351
|
backgroundColor: getColor(bg.payload)
|
|
1410
1352
|
}
|
|
@@ -1440,7 +1382,7 @@ function Backgrounds({
|
|
|
1440
1382
|
}
|
|
1441
1383
|
return /* @__PURE__ */ jsx(Parallax, {
|
|
1442
1384
|
strength: parallax,
|
|
1443
|
-
children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$
|
|
1385
|
+
children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$c, __spreadValues({}, getParallaxProps({
|
|
1444
1386
|
style: {
|
|
1445
1387
|
backgroundImage: publicUrl != null ? `url('${publicUrl}')` : void 0,
|
|
1446
1388
|
backgroundPosition,
|
|
@@ -1458,7 +1400,7 @@ function Backgrounds({
|
|
|
1458
1400
|
isRadial
|
|
1459
1401
|
} = bg.payload;
|
|
1460
1402
|
const gradient = `${getStopsStyle(stops)}`;
|
|
1461
|
-
return /* @__PURE__ */ jsx(Container$
|
|
1403
|
+
return /* @__PURE__ */ jsx(Container$c, {
|
|
1462
1404
|
style: {
|
|
1463
1405
|
background: isRadial ? `radial-gradient(${gradient})` : `linear-gradient(${angle}rad, ${gradient})`
|
|
1464
1406
|
}
|
|
@@ -1475,7 +1417,7 @@ function Backgrounds({
|
|
|
1475
1417
|
} = bg.payload;
|
|
1476
1418
|
return /* @__PURE__ */ jsx(Parallax, {
|
|
1477
1419
|
strength: parallax,
|
|
1478
|
-
children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$
|
|
1420
|
+
children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$c, __spreadProps(__spreadValues({}, getParallaxProps({})), {
|
|
1479
1421
|
children: /* @__PURE__ */ jsx(BackgroundVideo, {
|
|
1480
1422
|
url,
|
|
1481
1423
|
zoom,
|
|
@@ -1543,7 +1485,7 @@ const Grid$1 = styled(motion.div)`
|
|
|
1543
1485
|
alignContent
|
|
1544
1486
|
}))}
|
|
1545
1487
|
`;
|
|
1546
|
-
const GridItem$
|
|
1488
|
+
const GridItem$2 = styled(motion.div)`
|
|
1547
1489
|
display: flex;
|
|
1548
1490
|
|
|
1549
1491
|
/* IE11 doesn't recognize space-between and treats it as stretch, so we fall back to flex-start */
|
|
@@ -1654,7 +1596,7 @@ const Box = forwardRef(function Box2({
|
|
|
1654
1596
|
animate: animate == null ? void 0 : animate.parent,
|
|
1655
1597
|
initial: initial == null ? void 0 : initial.parent,
|
|
1656
1598
|
transition: transition == null ? void 0 : transition.parent,
|
|
1657
|
-
children: children && children.elements.length > 0 ? children.elements.map((child, index) => /* @__PURE__ */ jsx(GridItem$
|
|
1599
|
+
children: children && children.elements.length > 0 ? children.elements.map((child, index) => /* @__PURE__ */ jsx(GridItem$2, {
|
|
1658
1600
|
grid: children.columns,
|
|
1659
1601
|
index,
|
|
1660
1602
|
columnGap,
|
|
@@ -1665,13 +1607,13 @@ const Box = forwardRef(function Box2({
|
|
|
1665
1607
|
children: /* @__PURE__ */ jsx(Element$1, {
|
|
1666
1608
|
element: child
|
|
1667
1609
|
})
|
|
1668
|
-
}, child.key)) : /* @__PURE__ */ jsx(Placeholder$
|
|
1610
|
+
}, child.key)) : /* @__PURE__ */ jsx(Placeholder$2, {
|
|
1669
1611
|
hide: hidePlaceholder
|
|
1670
1612
|
})
|
|
1671
1613
|
})
|
|
1672
1614
|
}, key == null ? void 0 : key.container);
|
|
1673
1615
|
});
|
|
1674
|
-
function registerComponent$
|
|
1616
|
+
function registerComponent$c(runtime) {
|
|
1675
1617
|
return runtime.registerComponent(Box, {
|
|
1676
1618
|
type: "./components/Box/index.js",
|
|
1677
1619
|
label: "Box",
|
|
@@ -1843,7 +1785,7 @@ function registerComponent$a(runtime) {
|
|
|
1843
1785
|
suffix: "s",
|
|
1844
1786
|
defaultValue: DEFAULT_ITEM_STAGGER_DURATION
|
|
1845
1787
|
}),
|
|
1846
|
-
hidePlaceholder: Checkbox({
|
|
1788
|
+
hidePlaceholder: Checkbox$1({
|
|
1847
1789
|
label: "Hide placeholder"
|
|
1848
1790
|
}),
|
|
1849
1791
|
children: Grid$2()
|
|
@@ -1936,7 +1878,7 @@ const Link = forwardRef(function Link2(_k, ref) {
|
|
|
1936
1878
|
}))
|
|
1937
1879
|
});
|
|
1938
1880
|
});
|
|
1939
|
-
const StyledButton = styled(Link)`
|
|
1881
|
+
const StyledButton$1 = styled(Link)`
|
|
1940
1882
|
display: table;
|
|
1941
1883
|
border: 0;
|
|
1942
1884
|
outline: 0;
|
|
@@ -2128,7 +2070,7 @@ const StyledButton = styled(Link)`
|
|
|
2128
2070
|
})}
|
|
2129
2071
|
${cssTextStyle()}
|
|
2130
2072
|
`;
|
|
2131
|
-
const Button = forwardRef(function Button2(_m, ref) {
|
|
2073
|
+
const Button$1 = forwardRef(function Button2(_m, ref) {
|
|
2132
2074
|
var _n = _m, {
|
|
2133
2075
|
id,
|
|
2134
2076
|
children,
|
|
@@ -2154,7 +2096,7 @@ const Button = forwardRef(function Button2(_m, ref) {
|
|
|
2154
2096
|
"width",
|
|
2155
2097
|
"margin"
|
|
2156
2098
|
]);
|
|
2157
|
-
return /* @__PURE__ */ jsx(StyledButton, __spreadProps(__spreadValues({}, restOfProps), {
|
|
2099
|
+
return /* @__PURE__ */ jsx(StyledButton$1, __spreadProps(__spreadValues({}, restOfProps), {
|
|
2158
2100
|
ref,
|
|
2159
2101
|
id,
|
|
2160
2102
|
color: useColor(color),
|
|
@@ -2169,8 +2111,8 @@ const Button = forwardRef(function Button2(_m, ref) {
|
|
|
2169
2111
|
children: children == null ? "Button Text" : children
|
|
2170
2112
|
}));
|
|
2171
2113
|
});
|
|
2172
|
-
function registerComponent$
|
|
2173
|
-
return runtime.registerComponent(Button, {
|
|
2114
|
+
function registerComponent$b(runtime) {
|
|
2115
|
+
return runtime.registerComponent(Button$1, {
|
|
2174
2116
|
type: "./components/Button/index.js",
|
|
2175
2117
|
label: "Button",
|
|
2176
2118
|
props: {
|
|
@@ -2265,6 +2207,10 @@ const placeholders = {
|
|
|
2265
2207
|
image: {
|
|
2266
2208
|
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",
|
|
2267
2209
|
dimensions: { width: 360, height: 240 }
|
|
2210
|
+
},
|
|
2211
|
+
video: {
|
|
2212
|
+
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",
|
|
2213
|
+
dimensions: { width: 712, height: 400 }
|
|
2268
2214
|
}
|
|
2269
2215
|
};
|
|
2270
2216
|
function loadImage(src) {
|
|
@@ -2370,7 +2316,7 @@ const ImageComponent = forwardRef(function Image2({
|
|
|
2370
2316
|
})
|
|
2371
2317
|
});
|
|
2372
2318
|
});
|
|
2373
|
-
function registerComponent$
|
|
2319
|
+
function registerComponent$a(runtime) {
|
|
2374
2320
|
return runtime.registerComponent(ImageComponent, {
|
|
2375
2321
|
type: "./components/Image/index.js",
|
|
2376
2322
|
label: "Image",
|
|
@@ -2419,7 +2365,7 @@ const RightChevron = () => /* @__PURE__ */ jsx("svg", {
|
|
|
2419
2365
|
strokeWidth: "2"
|
|
2420
2366
|
})
|
|
2421
2367
|
});
|
|
2422
|
-
const Container$
|
|
2368
|
+
const Container$b = styled.div`
|
|
2423
2369
|
position: relative;
|
|
2424
2370
|
height: 100%;
|
|
2425
2371
|
`;
|
|
@@ -2719,7 +2665,7 @@ const Carousel = forwardRef(function Carousel2({
|
|
|
2719
2665
|
break;
|
|
2720
2666
|
}
|
|
2721
2667
|
},
|
|
2722
|
-
children: [/* @__PURE__ */ jsxs(Container$
|
|
2668
|
+
children: [/* @__PURE__ */ jsxs(Container$b, {
|
|
2723
2669
|
children: [/* @__PURE__ */ jsx(ClipMask, {
|
|
2724
2670
|
children: /* @__PURE__ */ jsx(Page, __spreadProps(__spreadValues({}, bindPage()), {
|
|
2725
2671
|
animate: animation,
|
|
@@ -2795,7 +2741,7 @@ const Carousel = forwardRef(function Carousel2({
|
|
|
2795
2741
|
})]
|
|
2796
2742
|
});
|
|
2797
2743
|
});
|
|
2798
|
-
function registerComponent$
|
|
2744
|
+
function registerComponent$9(runtime) {
|
|
2799
2745
|
return runtime.registerComponent(Carousel, {
|
|
2800
2746
|
type: "./components/Carousel/index.js",
|
|
2801
2747
|
label: "Carousel",
|
|
@@ -2858,7 +2804,7 @@ function registerComponent$7(runtime) {
|
|
|
2858
2804
|
unit: "px"
|
|
2859
2805
|
}
|
|
2860
2806
|
}),
|
|
2861
|
-
autoplay: Checkbox({
|
|
2807
|
+
autoplay: Checkbox$1({
|
|
2862
2808
|
label: "Autoplay"
|
|
2863
2809
|
}),
|
|
2864
2810
|
delay: Number$1({
|
|
@@ -2868,7 +2814,7 @@ function registerComponent$7(runtime) {
|
|
|
2868
2814
|
step: 0.1,
|
|
2869
2815
|
suffix: "seconds"
|
|
2870
2816
|
}),
|
|
2871
|
-
showArrows: Checkbox({
|
|
2817
|
+
showArrows: Checkbox$1({
|
|
2872
2818
|
preset: true,
|
|
2873
2819
|
label: "Show arrows"
|
|
2874
2820
|
}),
|
|
@@ -2897,7 +2843,7 @@ function registerComponent$7(runtime) {
|
|
|
2897
2843
|
label: "Arrow background",
|
|
2898
2844
|
placeholder: "white"
|
|
2899
2845
|
}),
|
|
2900
|
-
showDots: Checkbox({
|
|
2846
|
+
showDots: Checkbox$1({
|
|
2901
2847
|
preset: true,
|
|
2902
2848
|
label: "Show dots"
|
|
2903
2849
|
}),
|
|
@@ -2915,14 +2861,14 @@ const Block$1 = styled.div`
|
|
|
2915
2861
|
padding: 0.5em;
|
|
2916
2862
|
font-size: 1em;
|
|
2917
2863
|
`;
|
|
2918
|
-
const Label = styled.div`
|
|
2864
|
+
const Label$3 = styled.div`
|
|
2919
2865
|
margin-top: 0.25em;
|
|
2920
2866
|
`;
|
|
2921
2867
|
const Segment = styled.div`
|
|
2922
2868
|
flex: 1;
|
|
2923
2869
|
text-align: center;
|
|
2924
2870
|
`;
|
|
2925
|
-
const Container$
|
|
2871
|
+
const Container$a = styled.div`
|
|
2926
2872
|
display: flex;
|
|
2927
2873
|
${cssWidth("560px")}
|
|
2928
2874
|
${cssMargin()}
|
|
@@ -2932,7 +2878,7 @@ const Container$5 = styled.div`
|
|
|
2932
2878
|
return css`
|
|
2933
2879
|
font-size: 18px;
|
|
2934
2880
|
|
|
2935
|
-
${Label} {
|
|
2881
|
+
${Label$3} {
|
|
2936
2882
|
font-size: 14px;
|
|
2937
2883
|
}
|
|
2938
2884
|
`;
|
|
@@ -2940,7 +2886,7 @@ const Container$5 = styled.div`
|
|
|
2940
2886
|
return css`
|
|
2941
2887
|
font-size: 32px;
|
|
2942
2888
|
|
|
2943
|
-
${Label} {
|
|
2889
|
+
${Label$3} {
|
|
2944
2890
|
font-size: 18px;
|
|
2945
2891
|
}
|
|
2946
2892
|
`;
|
|
@@ -2948,7 +2894,7 @@ const Container$5 = styled.div`
|
|
|
2948
2894
|
return css`
|
|
2949
2895
|
font-size: 24px;
|
|
2950
2896
|
|
|
2951
|
-
${Label} {
|
|
2897
|
+
${Label$3} {
|
|
2952
2898
|
font-size: 16px;
|
|
2953
2899
|
}
|
|
2954
2900
|
`;
|
|
@@ -3085,7 +3031,7 @@ const Container$5 = styled.div`
|
|
|
3085
3031
|
})}
|
|
3086
3032
|
}
|
|
3087
3033
|
|
|
3088
|
-
${Label} {
|
|
3034
|
+
${Label$3} {
|
|
3089
3035
|
${(p) => cssMediaRules([p.labelColor, p.labelFont], ([labelColor = {
|
|
3090
3036
|
swatch: {
|
|
3091
3037
|
hue: 0,
|
|
@@ -3162,7 +3108,7 @@ const Countdown = forwardRef(function Countdown2({
|
|
|
3162
3108
|
}, 1e3);
|
|
3163
3109
|
return () => clearInterval(intervalId);
|
|
3164
3110
|
}, [date]);
|
|
3165
|
-
return /* @__PURE__ */ jsxs(Container$
|
|
3111
|
+
return /* @__PURE__ */ jsxs(Container$a, {
|
|
3166
3112
|
ref,
|
|
3167
3113
|
id,
|
|
3168
3114
|
width,
|
|
@@ -3181,7 +3127,7 @@ const Countdown = forwardRef(function Countdown2({
|
|
|
3181
3127
|
children: /* @__PURE__ */ jsx("span", {
|
|
3182
3128
|
children: days
|
|
3183
3129
|
})
|
|
3184
|
-
}), /* @__PURE__ */ jsx(Label, {
|
|
3130
|
+
}), /* @__PURE__ */ jsx(Label$3, {
|
|
3185
3131
|
children: daysLabel == null ? "Days" : daysLabel
|
|
3186
3132
|
})]
|
|
3187
3133
|
}), /* @__PURE__ */ jsxs(Segment, {
|
|
@@ -3189,7 +3135,7 @@ const Countdown = forwardRef(function Countdown2({
|
|
|
3189
3135
|
children: /* @__PURE__ */ jsx("span", {
|
|
3190
3136
|
children: hours
|
|
3191
3137
|
})
|
|
3192
|
-
}), /* @__PURE__ */ jsx(Label, {
|
|
3138
|
+
}), /* @__PURE__ */ jsx(Label$3, {
|
|
3193
3139
|
children: hoursLabel == null ? "Hours" : hoursLabel
|
|
3194
3140
|
})]
|
|
3195
3141
|
}), /* @__PURE__ */ jsxs(Segment, {
|
|
@@ -3197,7 +3143,7 @@ const Countdown = forwardRef(function Countdown2({
|
|
|
3197
3143
|
children: /* @__PURE__ */ jsx("span", {
|
|
3198
3144
|
children: minutes
|
|
3199
3145
|
})
|
|
3200
|
-
}), /* @__PURE__ */ jsx(Label, {
|
|
3146
|
+
}), /* @__PURE__ */ jsx(Label$3, {
|
|
3201
3147
|
children: minutesLabel == null ? "Minutes" : minutesLabel
|
|
3202
3148
|
})]
|
|
3203
3149
|
}), /* @__PURE__ */ jsxs(Segment, {
|
|
@@ -3205,13 +3151,13 @@ const Countdown = forwardRef(function Countdown2({
|
|
|
3205
3151
|
children: /* @__PURE__ */ jsx("span", {
|
|
3206
3152
|
children: seconds
|
|
3207
3153
|
})
|
|
3208
|
-
}), /* @__PURE__ */ jsx(Label, {
|
|
3154
|
+
}), /* @__PURE__ */ jsx(Label$3, {
|
|
3209
3155
|
children: secondsLabel == null ? "Seconds" : secondsLabel
|
|
3210
3156
|
})]
|
|
3211
3157
|
})]
|
|
3212
3158
|
});
|
|
3213
3159
|
});
|
|
3214
|
-
function registerComponent$
|
|
3160
|
+
function registerComponent$8(runtime) {
|
|
3215
3161
|
return runtime.registerComponent(Countdown, {
|
|
3216
3162
|
type: "./components/Countdown/index.js",
|
|
3217
3163
|
label: "Countdown",
|
|
@@ -3347,7 +3293,7 @@ const IE11MinHeightContainer = styled.div`
|
|
|
3347
3293
|
${cssWidth()}
|
|
3348
3294
|
${cssMargin()}
|
|
3349
3295
|
`;
|
|
3350
|
-
const Container$
|
|
3296
|
+
const Container$9 = styled.div`
|
|
3351
3297
|
display: flex;
|
|
3352
3298
|
flex-direction: column;
|
|
3353
3299
|
justify-content: center;
|
|
@@ -3406,7 +3352,7 @@ const Divider = forwardRef(function Divider2({
|
|
|
3406
3352
|
id,
|
|
3407
3353
|
width,
|
|
3408
3354
|
margin,
|
|
3409
|
-
children: /* @__PURE__ */ jsx(Container$
|
|
3355
|
+
children: /* @__PURE__ */ jsx(Container$9, {
|
|
3410
3356
|
children: /* @__PURE__ */ jsx(Line, {
|
|
3411
3357
|
variant,
|
|
3412
3358
|
thickness,
|
|
@@ -3415,7 +3361,7 @@ const Divider = forwardRef(function Divider2({
|
|
|
3415
3361
|
})
|
|
3416
3362
|
});
|
|
3417
3363
|
});
|
|
3418
|
-
function registerComponent$
|
|
3364
|
+
function registerComponent$7(runtime) {
|
|
3419
3365
|
return runtime.registerComponent(Divider, {
|
|
3420
3366
|
type: "./components/Divider/index.js",
|
|
3421
3367
|
label: "Divider",
|
|
@@ -3465,7 +3411,7 @@ function registerComponent$5(runtime) {
|
|
|
3465
3411
|
}
|
|
3466
3412
|
});
|
|
3467
3413
|
}
|
|
3468
|
-
const Container$
|
|
3414
|
+
const Container$8 = styled.div`
|
|
3469
3415
|
min-height: 15px;
|
|
3470
3416
|
${cssWidth()}
|
|
3471
3417
|
${cssMargin()}
|
|
@@ -3545,7 +3491,7 @@ const Embed = forwardRef(function Embed2({
|
|
|
3545
3491
|
}, [container, html]);
|
|
3546
3492
|
if (shouldRender === false)
|
|
3547
3493
|
return null;
|
|
3548
|
-
return /* @__PURE__ */ jsx(Container$
|
|
3494
|
+
return /* @__PURE__ */ jsx(Container$8, {
|
|
3549
3495
|
ref: setContainer,
|
|
3550
3496
|
id,
|
|
3551
3497
|
margin,
|
|
@@ -3555,14 +3501,14 @@ const Embed = forwardRef(function Embed2({
|
|
|
3555
3501
|
}
|
|
3556
3502
|
});
|
|
3557
3503
|
});
|
|
3558
|
-
function registerComponent$
|
|
3504
|
+
function registerComponent$6(runtime) {
|
|
3559
3505
|
return runtime.registerComponent(Embed, {
|
|
3560
3506
|
type: "./components/Embed/index.js",
|
|
3561
3507
|
label: "Embed",
|
|
3562
3508
|
icon: "Code40",
|
|
3563
3509
|
props: {
|
|
3564
3510
|
id: ElementID(),
|
|
3565
|
-
html: TextArea({
|
|
3511
|
+
html: TextArea$1({
|
|
3566
3512
|
label: "Code",
|
|
3567
3513
|
rows: 20
|
|
3568
3514
|
}),
|
|
@@ -3571,9 +3517,9 @@ function registerComponent$4(runtime) {
|
|
|
3571
3517
|
}
|
|
3572
3518
|
});
|
|
3573
3519
|
}
|
|
3574
|
-
var _path$
|
|
3575
|
-
function _extends$
|
|
3576
|
-
_extends$
|
|
3520
|
+
var _path$t;
|
|
3521
|
+
function _extends$u() {
|
|
3522
|
+
_extends$u = Object.assign || function(target) {
|
|
3577
3523
|
for (var i = 1; i < arguments.length; i++) {
|
|
3578
3524
|
var source = arguments[i];
|
|
3579
3525
|
for (var key in source) {
|
|
@@ -3584,82 +3530,1860 @@ function _extends$r() {
|
|
|
3584
3530
|
}
|
|
3585
3531
|
return target;
|
|
3586
3532
|
};
|
|
3587
|
-
return _extends$
|
|
3533
|
+
return _extends$u.apply(this, arguments);
|
|
3588
3534
|
}
|
|
3589
|
-
var
|
|
3590
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
}, props), _path$
|
|
3595
|
-
|
|
3535
|
+
var SvgCheck12 = function SvgCheck122(props) {
|
|
3536
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$u({
|
|
3537
|
+
width: 12,
|
|
3538
|
+
height: 12,
|
|
3539
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
3540
|
+
}, props), _path$t || (_path$t = /* @__PURE__ */ React.createElement("path", {
|
|
3541
|
+
fillRule: "evenodd",
|
|
3542
|
+
clipRule: "evenodd",
|
|
3543
|
+
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"
|
|
3596
3544
|
})));
|
|
3597
3545
|
};
|
|
3598
|
-
const
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
}
|
|
3603
|
-
|
|
3604
|
-
|
|
3546
|
+
const Shapes = Object.freeze({
|
|
3547
|
+
SQUARE: "square",
|
|
3548
|
+
ROUNDED: "rounded",
|
|
3549
|
+
PILL: "pill"
|
|
3550
|
+
});
|
|
3551
|
+
const Sizes = Object.freeze({
|
|
3552
|
+
SMALL: "small",
|
|
3553
|
+
MEDIUM: "medium",
|
|
3554
|
+
LARGE: "large"
|
|
3555
|
+
});
|
|
3556
|
+
const Contrasts = Object.freeze({
|
|
3557
|
+
LIGHT: "light",
|
|
3558
|
+
DARK: "dark"
|
|
3559
|
+
});
|
|
3560
|
+
const Context$1 = createContext({});
|
|
3561
|
+
function useFormContext() {
|
|
3562
|
+
return useContext(Context$1);
|
|
3563
|
+
}
|
|
3564
|
+
const { Provider } = Context$1;
|
|
3565
|
+
function getSizeHeight$2(size) {
|
|
3566
|
+
switch (size) {
|
|
3567
|
+
case Sizes.SMALL:
|
|
3568
|
+
return 30;
|
|
3569
|
+
case Sizes.MEDIUM:
|
|
3570
|
+
return 38;
|
|
3571
|
+
case Sizes.LARGE:
|
|
3572
|
+
return 48;
|
|
3573
|
+
default:
|
|
3574
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3575
|
+
}
|
|
3576
|
+
}
|
|
3577
|
+
function getSizeHorizontalPadding(size) {
|
|
3578
|
+
switch (size) {
|
|
3579
|
+
case Sizes.SMALL:
|
|
3580
|
+
return 8;
|
|
3581
|
+
case Sizes.MEDIUM:
|
|
3582
|
+
return 12;
|
|
3583
|
+
case Sizes.LARGE:
|
|
3584
|
+
return 16;
|
|
3585
|
+
default:
|
|
3586
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3587
|
+
}
|
|
3588
|
+
}
|
|
3589
|
+
function getSizeVerticalPadding(size) {
|
|
3590
|
+
switch (size) {
|
|
3591
|
+
case Sizes.SMALL:
|
|
3592
|
+
return 3;
|
|
3593
|
+
case Sizes.MEDIUM:
|
|
3594
|
+
return 7;
|
|
3595
|
+
case Sizes.LARGE:
|
|
3596
|
+
return 11;
|
|
3597
|
+
default:
|
|
3598
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3599
|
+
}
|
|
3600
|
+
}
|
|
3601
|
+
function getShapeBorderRadius(shape) {
|
|
3602
|
+
switch (shape) {
|
|
3603
|
+
case Shapes.SQUARE:
|
|
3604
|
+
return 0;
|
|
3605
|
+
case Shapes.ROUNDED:
|
|
3606
|
+
return 4;
|
|
3607
|
+
case Shapes.PILL:
|
|
3608
|
+
return 500;
|
|
3609
|
+
default:
|
|
3610
|
+
throw new Error(`Invalid form shape "${shape}"`);
|
|
3611
|
+
}
|
|
3612
|
+
}
|
|
3613
|
+
function getContrastBorderColor(contrast, error) {
|
|
3614
|
+
switch (contrast) {
|
|
3615
|
+
case Contrasts.LIGHT:
|
|
3616
|
+
return error ? "rgba(255, 0, 0, 0.7)" : "rgba(0, 0, 0, 0.25)";
|
|
3617
|
+
case Contrasts.DARK:
|
|
3618
|
+
return error ? "rgba(255, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.6)";
|
|
3619
|
+
default:
|
|
3620
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
function getContrastBackgroundColor(contrast) {
|
|
3624
|
+
switch (contrast) {
|
|
3625
|
+
case Contrasts.LIGHT:
|
|
3626
|
+
return "white";
|
|
3627
|
+
case Contrasts.DARK:
|
|
3628
|
+
return "rgba(0, 0, 0, 0.7)";
|
|
3629
|
+
default:
|
|
3630
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3631
|
+
}
|
|
3632
|
+
}
|
|
3633
|
+
function getContrastColor$1(contrast) {
|
|
3634
|
+
switch (contrast) {
|
|
3635
|
+
case Contrasts.LIGHT:
|
|
3636
|
+
return "rgba(0, 0, 0, 0.95)";
|
|
3637
|
+
case Contrasts.DARK:
|
|
3638
|
+
return "white";
|
|
3639
|
+
default:
|
|
3640
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3641
|
+
}
|
|
3642
|
+
}
|
|
3643
|
+
function getContrastPlaceholderColor(contrast) {
|
|
3644
|
+
switch (contrast) {
|
|
3645
|
+
case Contrasts.LIGHT:
|
|
3646
|
+
return "rgba(0, 0, 0, 0.3)";
|
|
3647
|
+
case Contrasts.DARK:
|
|
3648
|
+
return "rgba(255,255,255,0.3)";
|
|
3649
|
+
default:
|
|
3650
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3651
|
+
}
|
|
3652
|
+
}
|
|
3653
|
+
function cssField() {
|
|
3654
|
+
return css`
|
|
3655
|
+
display: block;
|
|
3656
|
+
width: 100%;
|
|
3657
|
+
outline: none;
|
|
3658
|
+
border-width: 1px;
|
|
3659
|
+
border-style: solid;
|
|
3660
|
+
transition: border-color 200ms;
|
|
3661
|
+
${(props) => cssMediaRules([props.shape, props.size, props.contrast, props.brandColor], ([
|
|
3662
|
+
shape = Shapes.ROUNDED,
|
|
3663
|
+
size = Sizes.MEDIUM,
|
|
3664
|
+
contrast = Contrasts.LIGHT,
|
|
3665
|
+
brandColor = { swatch: { hue: 0, saturation: 0, lightness: 0 }, alpha: 1 }
|
|
3666
|
+
]) => css`
|
|
3667
|
+
padding: ${getSizeVerticalPadding(size)}px ${getSizeHorizontalPadding(size)}px;
|
|
3668
|
+
border-radius: ${getShapeBorderRadius(shape)}px;
|
|
3669
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
3670
|
+
color: ${getContrastColor$1(contrast)};
|
|
3671
|
+
background-color: ${getContrastBackgroundColor(contrast)};
|
|
3672
|
+
|
|
3673
|
+
:focus,
|
|
3674
|
+
:focus-within {
|
|
3675
|
+
border-color: ${colorToString(brandColor)};
|
|
3676
|
+
}
|
|
3677
|
+
|
|
3678
|
+
::placeholder {
|
|
3679
|
+
color: ${getContrastPlaceholderColor(contrast)};
|
|
3680
|
+
}
|
|
3681
|
+
`)}
|
|
3682
|
+
`;
|
|
3683
|
+
}
|
|
3684
|
+
function getSizeHeight$1(size) {
|
|
3685
|
+
switch (size) {
|
|
3686
|
+
case Sizes.SMALL:
|
|
3687
|
+
return 36;
|
|
3688
|
+
case Sizes.MEDIUM:
|
|
3689
|
+
return 42;
|
|
3690
|
+
case Sizes.LARGE:
|
|
3691
|
+
return 48;
|
|
3692
|
+
default:
|
|
3693
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3694
|
+
}
|
|
3695
|
+
}
|
|
3696
|
+
const Base$2 = styled.input`
|
|
3697
|
+
${cssField()}
|
|
3698
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
3699
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
3700
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
3605
3701
|
`)}
|
|
3606
3702
|
`;
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3703
|
+
var Input$2 = forwardRef(function Input(_o, ref) {
|
|
3704
|
+
var _p = _o, {
|
|
3705
|
+
error = false,
|
|
3706
|
+
form
|
|
3707
|
+
} = _p, restOfProps = __objRest(_p, [
|
|
3708
|
+
"error",
|
|
3709
|
+
"form"
|
|
3710
|
+
]);
|
|
3711
|
+
const {
|
|
3712
|
+
shape,
|
|
3713
|
+
size,
|
|
3714
|
+
contrast,
|
|
3715
|
+
brandColor
|
|
3716
|
+
} = useFormContext();
|
|
3717
|
+
return /* @__PURE__ */ jsx(Base$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3718
|
+
ref,
|
|
3719
|
+
error,
|
|
3720
|
+
shape,
|
|
3721
|
+
size,
|
|
3722
|
+
contrast,
|
|
3723
|
+
brandColor
|
|
3724
|
+
}));
|
|
3725
|
+
});
|
|
3726
|
+
const Container$7 = styled.div`
|
|
3727
|
+
display: flex;
|
|
3728
|
+
flex-direction: column;
|
|
3729
|
+
${cssWidth()};
|
|
3730
|
+
${cssMargin()};
|
|
3731
|
+
`;
|
|
3732
|
+
const Label$2 = styled.div`
|
|
3733
|
+
max-width: 120px;
|
|
3734
|
+
min-width: 60px;
|
|
3735
|
+
height: 8px;
|
|
3736
|
+
border-radius: 2px;
|
|
3610
3737
|
background-color: #a1a8c2;
|
|
3611
|
-
border-radius: ${(props) => props.button === true ? 6 : 2}px;
|
|
3612
3738
|
opacity: 0.4;
|
|
3739
|
+
margin-bottom: 8px;
|
|
3613
3740
|
`;
|
|
3614
|
-
const
|
|
3615
|
-
width:
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3741
|
+
const Input$1 = styled.div`
|
|
3742
|
+
min-width: 80px;
|
|
3743
|
+
height: 32px;
|
|
3744
|
+
border-radius: 4px;
|
|
3745
|
+
border-width: 2px;
|
|
3746
|
+
border-style: solid;
|
|
3747
|
+
border-color: #a1a8c2;
|
|
3748
|
+
opacity: 0.4;
|
|
3749
|
+
`;
|
|
3750
|
+
const Button = styled.div`
|
|
3751
|
+
min-width: 140px;
|
|
3752
|
+
height: 32px;
|
|
3753
|
+
border-radius: 4px;
|
|
3754
|
+
background-color: #a1a8c2;
|
|
3755
|
+
opacity: 0.4;
|
|
3756
|
+
`;
|
|
3757
|
+
var Placeholder$1 = forwardRef(function Placeholder2({
|
|
3758
|
+
width,
|
|
3759
|
+
margin
|
|
3760
|
+
}, ref) {
|
|
3761
|
+
return /* @__PURE__ */ jsxs(Container$7, {
|
|
3762
|
+
ref,
|
|
3763
|
+
width,
|
|
3764
|
+
margin,
|
|
3765
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
3766
|
+
style: {
|
|
3767
|
+
display: "flex",
|
|
3768
|
+
flexDirection: "column",
|
|
3769
|
+
marginBottom: 16
|
|
3770
|
+
},
|
|
3771
|
+
children: [/* @__PURE__ */ jsx(Label$2, {}), /* @__PURE__ */ jsx(Input$1, {})]
|
|
3772
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
3773
|
+
style: {
|
|
3774
|
+
display: "flex",
|
|
3775
|
+
flexDirection: "column",
|
|
3776
|
+
marginBottom: 16
|
|
3777
|
+
},
|
|
3778
|
+
children: [/* @__PURE__ */ jsx(Label$2, {}), /* @__PURE__ */ jsx(Input$1, {})]
|
|
3779
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
3780
|
+
style: {
|
|
3781
|
+
display: "flex",
|
|
3782
|
+
flexDirection: "column",
|
|
3783
|
+
justifyContent: "flex-end"
|
|
3784
|
+
},
|
|
3785
|
+
children: /* @__PURE__ */ jsx(Button, {})
|
|
3786
|
+
})]
|
|
3634
3787
|
});
|
|
3788
|
+
});
|
|
3789
|
+
function getSizeHeight(size) {
|
|
3790
|
+
switch (size) {
|
|
3791
|
+
case Sizes.SMALL:
|
|
3792
|
+
return 14;
|
|
3793
|
+
case Sizes.MEDIUM:
|
|
3794
|
+
return 18;
|
|
3795
|
+
case Sizes.LARGE:
|
|
3796
|
+
return 22;
|
|
3797
|
+
default:
|
|
3798
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3799
|
+
}
|
|
3635
3800
|
}
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3801
|
+
function getContrastColor(contrast) {
|
|
3802
|
+
switch (contrast) {
|
|
3803
|
+
case Contrasts.LIGHT:
|
|
3804
|
+
return "rgba(0, 0, 0, 0.8)";
|
|
3805
|
+
case Contrasts.DARK:
|
|
3806
|
+
return "rgba(255, 255, 255, 0.95)";
|
|
3807
|
+
default:
|
|
3808
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3809
|
+
}
|
|
3810
|
+
}
|
|
3811
|
+
const Base$1 = styled.label`
|
|
3812
|
+
display: block;
|
|
3813
|
+
margin: 0 0 0.25em 0;
|
|
3814
|
+
${cssTextStyle()}
|
|
3815
|
+
${(props) => cssMediaRules([props.size, props.contrast, props.textColor], ([size = Sizes.MEDIUM, contrast = Contrasts.LIGHT, textColor]) => css`
|
|
3816
|
+
min-height: ${getSizeHeight(size)}px;
|
|
3817
|
+
color: ${textColor == null ? getContrastColor(contrast) : colorToString(textColor)};
|
|
3818
|
+
`)}
|
|
3819
|
+
`;
|
|
3820
|
+
function Label$1(props) {
|
|
3821
|
+
const {
|
|
3822
|
+
contrast,
|
|
3823
|
+
size,
|
|
3824
|
+
labelTextStyle,
|
|
3825
|
+
labelTextColor
|
|
3826
|
+
} = useFormContext();
|
|
3827
|
+
return /* @__PURE__ */ jsx(Base$1, __spreadProps(__spreadValues({}, props), {
|
|
3828
|
+
contrast,
|
|
3829
|
+
size,
|
|
3830
|
+
textStyle: labelTextStyle,
|
|
3831
|
+
textColor: useColor(labelTextColor)
|
|
3832
|
+
}));
|
|
3833
|
+
}
|
|
3834
|
+
var SingleLineTextTableField = forwardRef(function SingleLineTextTableField2(_q, ref) {
|
|
3835
|
+
var _r = _q, {
|
|
3836
|
+
id,
|
|
3837
|
+
label = "",
|
|
3838
|
+
name,
|
|
3839
|
+
error,
|
|
3840
|
+
hideLabel = false
|
|
3841
|
+
} = _r, restOfProps = __objRest(_r, [
|
|
3842
|
+
"id",
|
|
3843
|
+
"label",
|
|
3844
|
+
"name",
|
|
3845
|
+
"error",
|
|
3846
|
+
"hideLabel"
|
|
3847
|
+
]);
|
|
3848
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
3849
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
3850
|
+
htmlFor: id,
|
|
3851
|
+
children: label
|
|
3852
|
+
}), /* @__PURE__ */ jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3853
|
+
"aria-label": label,
|
|
3854
|
+
ref,
|
|
3855
|
+
id,
|
|
3856
|
+
name,
|
|
3857
|
+
type: "text",
|
|
3858
|
+
error: error != null
|
|
3859
|
+
}))]
|
|
3860
|
+
});
|
|
3861
|
+
});
|
|
3862
|
+
const Base = styled.textarea`
|
|
3863
|
+
resize: vertical;
|
|
3864
|
+
${cssField()}
|
|
3865
|
+
`;
|
|
3866
|
+
var TextArea = forwardRef(function TextArea2(_s, ref) {
|
|
3867
|
+
var _t = _s, {
|
|
3868
|
+
error = false,
|
|
3869
|
+
form
|
|
3870
|
+
} = _t, restOfProps = __objRest(_t, [
|
|
3871
|
+
"error",
|
|
3872
|
+
"form"
|
|
3873
|
+
]);
|
|
3874
|
+
const {
|
|
3875
|
+
shape,
|
|
3876
|
+
size,
|
|
3877
|
+
contrast,
|
|
3878
|
+
brandColor
|
|
3879
|
+
} = useFormContext();
|
|
3880
|
+
return /* @__PURE__ */ jsx(Base, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3881
|
+
ref,
|
|
3882
|
+
rows: 4,
|
|
3883
|
+
error,
|
|
3884
|
+
shape,
|
|
3885
|
+
size,
|
|
3886
|
+
contrast,
|
|
3887
|
+
brandColor
|
|
3888
|
+
}));
|
|
3889
|
+
});
|
|
3890
|
+
var LongTextTableField = forwardRef(function LongTextTableField2(_u, ref) {
|
|
3891
|
+
var _v = _u, {
|
|
3892
|
+
id,
|
|
3893
|
+
label = "",
|
|
3894
|
+
error,
|
|
3895
|
+
hideLabel = false
|
|
3896
|
+
} = _v, restOfProps = __objRest(_v, [
|
|
3897
|
+
"id",
|
|
3898
|
+
"label",
|
|
3899
|
+
"error",
|
|
3900
|
+
"hideLabel"
|
|
3901
|
+
]);
|
|
3902
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
3903
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
3904
|
+
htmlFor: id,
|
|
3905
|
+
children: label
|
|
3906
|
+
}), /* @__PURE__ */ jsx(TextArea, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3907
|
+
"aria-label": label,
|
|
3908
|
+
ref,
|
|
3909
|
+
id,
|
|
3910
|
+
error: error != null
|
|
3911
|
+
}))]
|
|
3912
|
+
});
|
|
3913
|
+
});
|
|
3914
|
+
function getCheckmarkColor$1({
|
|
3915
|
+
swatch: {
|
|
3916
|
+
hue: h,
|
|
3917
|
+
saturation: s,
|
|
3918
|
+
lightness: l
|
|
3919
|
+
},
|
|
3920
|
+
alpha: a
|
|
3921
|
+
}) {
|
|
3922
|
+
return ColorHelper({
|
|
3923
|
+
h,
|
|
3924
|
+
s,
|
|
3925
|
+
l
|
|
3926
|
+
}).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
|
|
3927
|
+
}
|
|
3928
|
+
const Container$6 = styled.div`
|
|
3929
|
+
position: relative;
|
|
3930
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
3931
|
+
height: ${getSizeHeight(size)}px;
|
|
3932
|
+
width: ${getSizeHeight(size)}px;
|
|
3933
|
+
`)}
|
|
3934
|
+
`;
|
|
3935
|
+
const FakeCheckbox = styled.div`
|
|
3936
|
+
position: absolute;
|
|
3937
|
+
width: 100%;
|
|
3938
|
+
height: 100%;
|
|
3939
|
+
border-style: solid;
|
|
3940
|
+
border-radius: 4px;
|
|
3941
|
+
pointer-events: none;
|
|
3942
|
+
border-width: 1px;
|
|
3943
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
|
|
3944
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
3945
|
+
background-color: ${getContrastBackgroundColor(contrast)};
|
|
3946
|
+
`)}
|
|
3947
|
+
`;
|
|
3948
|
+
const HiddenCheckbox = styled.input`
|
|
3949
|
+
position: absolute;
|
|
3950
|
+
opacity: 0;
|
|
3951
|
+
width: 100%;
|
|
3952
|
+
height: 100%;
|
|
3953
|
+
cursor: pointer;
|
|
3954
|
+
|
|
3955
|
+
&:disabled {
|
|
3956
|
+
cursor: no-drop;
|
|
3957
|
+
|
|
3958
|
+
& ~ ${FakeCheckbox} {
|
|
3959
|
+
opacity: 0.5;
|
|
3960
|
+
}
|
|
3961
|
+
}
|
|
3962
|
+
|
|
3963
|
+
&:checked ~ ${FakeCheckbox} {
|
|
3964
|
+
${(props) => cssMediaRules([props.brandColor], ([{
|
|
3965
|
+
swatch = {
|
|
3966
|
+
hue: 0,
|
|
3967
|
+
saturation: 0,
|
|
3968
|
+
lightness: 0
|
|
3969
|
+
},
|
|
3970
|
+
alpha = 1
|
|
3971
|
+
} = {}]) => css`
|
|
3972
|
+
background-color: ${colorToString({
|
|
3973
|
+
swatch,
|
|
3974
|
+
alpha
|
|
3975
|
+
})};
|
|
3976
|
+
`)}
|
|
3977
|
+
border-color: transparent;
|
|
3978
|
+
|
|
3979
|
+
&::after {
|
|
3980
|
+
content: '';
|
|
3981
|
+
position: absolute;
|
|
3982
|
+
box-sizing: content-box;
|
|
3983
|
+
width: 25%;
|
|
3984
|
+
height: 50%;
|
|
3985
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
3986
|
+
border-width: ${getSizeHeight(size) * 0.1}px;
|
|
3987
|
+
border-left: 0;
|
|
3988
|
+
border-top: 0;
|
|
3989
|
+
`)}
|
|
3990
|
+
border-style: solid;
|
|
3991
|
+
${(props) => cssMediaRules([props.brandColor], ([{
|
|
3992
|
+
swatch = {
|
|
3993
|
+
hue: 0,
|
|
3994
|
+
saturation: 0,
|
|
3995
|
+
lightness: 0
|
|
3996
|
+
},
|
|
3997
|
+
alpha = 1
|
|
3998
|
+
} = {}]) => css`
|
|
3999
|
+
border-color: ${getCheckmarkColor$1({
|
|
4000
|
+
swatch,
|
|
4001
|
+
alpha
|
|
4002
|
+
})};
|
|
4003
|
+
`)}
|
|
4004
|
+
transform: rotate(45deg) translate3d(91%, -23%, 0);
|
|
4005
|
+
}
|
|
4006
|
+
}
|
|
4007
|
+
|
|
4008
|
+
&:not(:disabled) {
|
|
4009
|
+
&:focus ~ ${FakeCheckbox} {
|
|
4010
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4011
|
+
swatch: {
|
|
4012
|
+
hue: 0,
|
|
4013
|
+
saturation: 0,
|
|
4014
|
+
lightness: 0
|
|
4015
|
+
},
|
|
4016
|
+
alpha: 1
|
|
4017
|
+
}]) => css`
|
|
4018
|
+
border-color: ${colorToString(brandColor)};
|
|
4019
|
+
`)}
|
|
4020
|
+
}
|
|
4021
|
+
}
|
|
4022
|
+
|
|
4023
|
+
&:not(:disabled):checked {
|
|
4024
|
+
&:focus ~ ${FakeCheckbox} {
|
|
4025
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
|
|
4026
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
4027
|
+
`)}
|
|
4028
|
+
}
|
|
4029
|
+
}
|
|
4030
|
+
`;
|
|
4031
|
+
var Checkbox = forwardRef(function Checkbox2(_w, ref) {
|
|
4032
|
+
var _x = _w, {
|
|
4033
|
+
error,
|
|
4034
|
+
className,
|
|
4035
|
+
style,
|
|
4036
|
+
form
|
|
4037
|
+
} = _x, restOfProps = __objRest(_x, [
|
|
4038
|
+
"error",
|
|
4039
|
+
"className",
|
|
4040
|
+
"style",
|
|
4041
|
+
"form"
|
|
4042
|
+
]);
|
|
4043
|
+
const {
|
|
4044
|
+
size,
|
|
4045
|
+
contrast,
|
|
4046
|
+
brandColor
|
|
4047
|
+
} = useFormContext();
|
|
4048
|
+
return /* @__PURE__ */ jsxs(Container$6, {
|
|
4049
|
+
size,
|
|
4050
|
+
children: [/* @__PURE__ */ jsx(HiddenCheckbox, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4051
|
+
type: "checkbox",
|
|
4052
|
+
ref,
|
|
4053
|
+
error,
|
|
4054
|
+
size,
|
|
4055
|
+
contrast,
|
|
4056
|
+
brandColor
|
|
4057
|
+
})), /* @__PURE__ */ jsx(FakeCheckbox, {
|
|
4058
|
+
className,
|
|
4059
|
+
error,
|
|
4060
|
+
contrast,
|
|
4061
|
+
style
|
|
4062
|
+
})]
|
|
4063
|
+
});
|
|
4064
|
+
});
|
|
4065
|
+
const StyledLabel$2 = styled(Label$1)`
|
|
4066
|
+
display: flex;
|
|
4067
|
+
align-items: center;
|
|
4068
|
+
margin: 0;
|
|
4069
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
4070
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
4071
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
4072
|
+
`)}
|
|
4073
|
+
`;
|
|
4074
|
+
const CheckboxContainer$1 = styled.span`
|
|
4075
|
+
margin-right: 8px;
|
|
4076
|
+
`;
|
|
4077
|
+
var CheckboxTableField = forwardRef(function CheckboxTableField2(_y, ref) {
|
|
4078
|
+
var _z = _y, {
|
|
4079
|
+
form,
|
|
4080
|
+
id,
|
|
4081
|
+
name,
|
|
4082
|
+
label = "",
|
|
4083
|
+
value = false,
|
|
4084
|
+
error
|
|
4085
|
+
} = _z, restOfProps = __objRest(_z, [
|
|
4086
|
+
"form",
|
|
4087
|
+
"id",
|
|
4088
|
+
"name",
|
|
4089
|
+
"label",
|
|
4090
|
+
"value",
|
|
4091
|
+
"error"
|
|
4092
|
+
]);
|
|
4093
|
+
const {
|
|
4094
|
+
size
|
|
4095
|
+
} = useFormContext();
|
|
4096
|
+
function handleChange(event) {
|
|
4097
|
+
form.setFieldValue(name, event.currentTarget.checked);
|
|
4098
|
+
}
|
|
4099
|
+
return /* @__PURE__ */ jsxs(StyledLabel$2, {
|
|
4100
|
+
htmlFor: id,
|
|
4101
|
+
size,
|
|
4102
|
+
children: [/* @__PURE__ */ jsx(CheckboxContainer$1, {
|
|
4103
|
+
children: /* @__PURE__ */ jsx(Checkbox, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4104
|
+
"aria-label": label,
|
|
4105
|
+
checked: value,
|
|
4106
|
+
onChange: handleChange,
|
|
4107
|
+
ref,
|
|
4108
|
+
id,
|
|
4109
|
+
error: error != null
|
|
4110
|
+
}))
|
|
4111
|
+
}), label]
|
|
4112
|
+
});
|
|
4113
|
+
});
|
|
4114
|
+
const MainLabel = styled(Label$1)`
|
|
4115
|
+
margin: 0 0 4px 0;
|
|
4116
|
+
`;
|
|
4117
|
+
const StyledLabel$1 = styled(Label$1)`
|
|
4118
|
+
display: flex;
|
|
4119
|
+
align-items: center;
|
|
4120
|
+
margin: 8px 0;
|
|
4121
|
+
|
|
4122
|
+
&:last-of-type {
|
|
4123
|
+
margin-bottom: 0;
|
|
4124
|
+
}
|
|
4125
|
+
`;
|
|
4126
|
+
const CheckboxContainer = styled.span`
|
|
4127
|
+
margin-right: 8px;
|
|
4128
|
+
`;
|
|
4129
|
+
var MultipleSelectTableField = forwardRef(function MultipleSelectTableField2(_A, ref) {
|
|
4130
|
+
var _B = _A, {
|
|
4131
|
+
tableColumn,
|
|
4132
|
+
label = "",
|
|
4133
|
+
required,
|
|
4134
|
+
value = [],
|
|
4135
|
+
onChange,
|
|
4136
|
+
hideLabel = false
|
|
4137
|
+
} = _B, restOfProps = __objRest(_B, [
|
|
4138
|
+
"tableColumn",
|
|
4139
|
+
"label",
|
|
4140
|
+
"required",
|
|
4141
|
+
"value",
|
|
4142
|
+
"onChange",
|
|
4143
|
+
"hideLabel"
|
|
4144
|
+
]);
|
|
4145
|
+
const handle = useRef({
|
|
4146
|
+
validity: {
|
|
4147
|
+
valueMissing: required === true && value.length === 0,
|
|
4148
|
+
typeMismatch: false
|
|
4149
|
+
}
|
|
4150
|
+
});
|
|
4151
|
+
useImperativeHandle(ref, () => handle.current, []);
|
|
4152
|
+
function handleChange(event) {
|
|
4153
|
+
handle.current.validity.valueMissing = required === true && !event.currentTarget.checked && value.filter((v) => v !== event.currentTarget.value).length === 0;
|
|
4154
|
+
onChange(event);
|
|
4155
|
+
}
|
|
4156
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
4157
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(MainLabel, {
|
|
4158
|
+
children: label
|
|
4159
|
+
}), tableColumn.options.map((option) => /* @__PURE__ */ jsxs(StyledLabel$1, {
|
|
4160
|
+
htmlFor: option.id,
|
|
4161
|
+
children: [/* @__PURE__ */ jsx(CheckboxContainer, {
|
|
4162
|
+
children: /* @__PURE__ */ jsx(Checkbox, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4163
|
+
"aria-label": label,
|
|
4164
|
+
onChange: handleChange,
|
|
4165
|
+
checked: value.includes(option.name),
|
|
4166
|
+
id: option.id,
|
|
4167
|
+
value: option.name
|
|
4168
|
+
}))
|
|
4169
|
+
}), option.name]
|
|
4170
|
+
}, option.id))]
|
|
4171
|
+
});
|
|
4172
|
+
});
|
|
4173
|
+
function getCheckmarkColor({
|
|
4174
|
+
swatch: {
|
|
4175
|
+
hue: h,
|
|
4176
|
+
saturation: s,
|
|
4177
|
+
lightness: l
|
|
4178
|
+
} = {
|
|
4179
|
+
hue: 0,
|
|
4180
|
+
saturation: 0,
|
|
4181
|
+
lightness: 0
|
|
4182
|
+
},
|
|
4183
|
+
alpha: a
|
|
4184
|
+
}) {
|
|
4185
|
+
return ColorHelper({
|
|
4186
|
+
h,
|
|
4187
|
+
s,
|
|
4188
|
+
l
|
|
4189
|
+
}).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
|
|
4190
|
+
}
|
|
4191
|
+
const Container$5 = styled.div`
|
|
4192
|
+
position: relative;
|
|
4193
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
4194
|
+
height: ${getSizeHeight(size)}px;
|
|
4195
|
+
width: ${getSizeHeight(size)}px;
|
|
4196
|
+
`)}
|
|
4197
|
+
`;
|
|
4198
|
+
const FakeRadioButton = styled.div`
|
|
4199
|
+
position: absolute;
|
|
4200
|
+
width: 100%;
|
|
4201
|
+
height: 100%;
|
|
4202
|
+
border-style: solid;
|
|
4203
|
+
border-radius: 50%;
|
|
4204
|
+
pointer-events: none;
|
|
4205
|
+
border-width: 1px;
|
|
4206
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
|
|
4207
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
4208
|
+
background-color: ${getContrastBackgroundColor(contrast)};
|
|
4209
|
+
`)}
|
|
4210
|
+
`;
|
|
4211
|
+
const HiddenRadioButton = styled.input.attrs({
|
|
4212
|
+
type: "radio"
|
|
4213
|
+
})`
|
|
4214
|
+
position: absolute;
|
|
4215
|
+
opacity: 0;
|
|
4216
|
+
width: 100%;
|
|
4217
|
+
height: 100%;
|
|
4218
|
+
cursor: pointer;
|
|
4219
|
+
|
|
4220
|
+
&:disabled {
|
|
4221
|
+
cursor: no-drop;
|
|
4222
|
+
|
|
4223
|
+
& ~ ${FakeRadioButton} {
|
|
4224
|
+
opacity: 0.5;
|
|
4225
|
+
}
|
|
4226
|
+
}
|
|
4227
|
+
|
|
4228
|
+
&:checked ~ ${FakeRadioButton} {
|
|
4229
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4230
|
+
swatch: {
|
|
4231
|
+
hue: 0,
|
|
4232
|
+
saturation: 0,
|
|
4233
|
+
lightness: 0
|
|
4234
|
+
},
|
|
4235
|
+
alpha: 1
|
|
4236
|
+
}]) => css`
|
|
4237
|
+
background-color: ${colorToString(brandColor)};
|
|
4238
|
+
`)}
|
|
4239
|
+
border-color: transparent;
|
|
4240
|
+
|
|
4241
|
+
&::after {
|
|
4242
|
+
content: '';
|
|
4243
|
+
position: absolute;
|
|
4244
|
+
box-sizing: content-box;
|
|
4245
|
+
top: 50%;
|
|
4246
|
+
left: 50%;
|
|
4247
|
+
width: 50%;
|
|
4248
|
+
height: 50%;
|
|
4249
|
+
border-radius: 50%;
|
|
4250
|
+
transform: translate(-50%, -50%);
|
|
4251
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4252
|
+
swatch: {
|
|
4253
|
+
hue: 0,
|
|
4254
|
+
saturation: 0,
|
|
4255
|
+
lightness: 0
|
|
4256
|
+
},
|
|
4257
|
+
alpha: 1
|
|
4258
|
+
}]) => css`
|
|
4259
|
+
background-color: ${getCheckmarkColor(brandColor)};
|
|
4260
|
+
`)}
|
|
4261
|
+
}
|
|
4262
|
+
}
|
|
4263
|
+
|
|
4264
|
+
&:not(:disabled) {
|
|
4265
|
+
&:focus ~ ${FakeRadioButton} {
|
|
4266
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4267
|
+
swatch: {
|
|
4268
|
+
hue: 0,
|
|
4269
|
+
saturation: 0,
|
|
4270
|
+
lightness: 0
|
|
4271
|
+
},
|
|
4272
|
+
alpha: 1
|
|
4273
|
+
}]) => css`
|
|
4274
|
+
border-color: ${colorToString(brandColor)};
|
|
4275
|
+
`)}
|
|
4276
|
+
}
|
|
4277
|
+
}
|
|
4278
|
+
|
|
4279
|
+
&:not(:disabled):checked {
|
|
4280
|
+
&:focus ~ ${FakeRadioButton} {
|
|
4281
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
|
|
4282
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
4283
|
+
`)}
|
|
4284
|
+
}
|
|
4285
|
+
}
|
|
4286
|
+
`;
|
|
4287
|
+
var RadioButton = forwardRef(function RadioButton2(_C, ref) {
|
|
4288
|
+
var _D = _C, {
|
|
4289
|
+
error,
|
|
4290
|
+
className,
|
|
4291
|
+
style,
|
|
4292
|
+
form
|
|
4293
|
+
} = _D, restOfProps = __objRest(_D, [
|
|
4294
|
+
"error",
|
|
4295
|
+
"className",
|
|
4296
|
+
"style",
|
|
4297
|
+
"form"
|
|
4298
|
+
]);
|
|
4299
|
+
const {
|
|
4300
|
+
size,
|
|
4301
|
+
contrast,
|
|
4302
|
+
brandColor
|
|
4303
|
+
} = useFormContext();
|
|
4304
|
+
return /* @__PURE__ */ jsxs(Container$5, {
|
|
4305
|
+
size,
|
|
4306
|
+
children: [/* @__PURE__ */ jsx(HiddenRadioButton, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4307
|
+
ref,
|
|
4308
|
+
error,
|
|
4309
|
+
contrast,
|
|
4310
|
+
brandColor
|
|
4311
|
+
})), /* @__PURE__ */ jsx(FakeRadioButton, {
|
|
4312
|
+
className,
|
|
4313
|
+
error,
|
|
4314
|
+
contrast,
|
|
4315
|
+
style
|
|
4316
|
+
})]
|
|
4317
|
+
});
|
|
4318
|
+
});
|
|
4319
|
+
const StyledLabel = styled(Label$1)`
|
|
4320
|
+
display: flex;
|
|
4321
|
+
align-items: center;
|
|
4322
|
+
margin: 8px 0;
|
|
4323
|
+
|
|
4324
|
+
&:last-of-type {
|
|
4325
|
+
margin-bottom: 0;
|
|
4326
|
+
}
|
|
4327
|
+
`;
|
|
4328
|
+
const RadioButtonContainer = styled.span`
|
|
4329
|
+
margin-right: 8px;
|
|
4330
|
+
`;
|
|
4331
|
+
var TableColumnRadioButtonGroup = forwardRef(function TableColumnRadioButtonGroup2(_E, ref) {
|
|
4332
|
+
var _F = _E, {
|
|
4333
|
+
tableColumn,
|
|
4334
|
+
label = "",
|
|
4335
|
+
value = "",
|
|
4336
|
+
required = false,
|
|
4337
|
+
hideLabel = false,
|
|
4338
|
+
onChange
|
|
4339
|
+
} = _F, restOfProps = __objRest(_F, [
|
|
4340
|
+
"tableColumn",
|
|
4341
|
+
"label",
|
|
4342
|
+
"value",
|
|
4343
|
+
"required",
|
|
4344
|
+
"hideLabel",
|
|
4345
|
+
"onChange"
|
|
4346
|
+
]);
|
|
4347
|
+
const handle = useRef({
|
|
4348
|
+
validity: {
|
|
4349
|
+
valueMissing: required === true && value === "",
|
|
4350
|
+
typeMismatch: false
|
|
4351
|
+
}
|
|
4352
|
+
});
|
|
4353
|
+
useImperativeHandle(ref, () => handle.current, []);
|
|
4354
|
+
function handleChange(event) {
|
|
4355
|
+
handle.current.validity.valueMissing = required === true && !event.currentTarget.checked;
|
|
4356
|
+
onChange(event);
|
|
4357
|
+
}
|
|
4358
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
4359
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4360
|
+
as: "p",
|
|
4361
|
+
children: label
|
|
4362
|
+
}), tableColumn.options.map((option) => /* @__PURE__ */ jsxs(StyledLabel, {
|
|
4363
|
+
htmlFor: option.id,
|
|
4364
|
+
"aria-label": label,
|
|
4365
|
+
children: [/* @__PURE__ */ jsx(RadioButtonContainer, {
|
|
4366
|
+
children: /* @__PURE__ */ jsx(RadioButton, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4367
|
+
onChange: handleChange,
|
|
4368
|
+
checked: value === option.name,
|
|
4369
|
+
id: option.id,
|
|
4370
|
+
value: option.name
|
|
4371
|
+
}))
|
|
4372
|
+
}), option.name]
|
|
4373
|
+
}, option.id))]
|
|
4374
|
+
});
|
|
4375
|
+
});
|
|
4376
|
+
const Container$4 = styled.div`
|
|
4377
|
+
${cssField()}
|
|
4378
|
+
display: flex;
|
|
4379
|
+
align-items: center;
|
|
4380
|
+
position: relative;
|
|
4381
|
+
user-select: none;
|
|
4382
|
+
border-color: #f19eb9;
|
|
4383
|
+
|
|
4384
|
+
&:focus,
|
|
4385
|
+
&:focus-within {
|
|
4386
|
+
border-color: #e54e7f;
|
|
4387
|
+
}
|
|
4388
|
+
|
|
4389
|
+
${(props) => cssMediaRules([props.size, props.contrast], ([size = Sizes.MEDIUM, contrast = Contrasts.LIGHT]) => css`
|
|
4390
|
+
min-height: ${getSizeHeight$2(size)}px;
|
|
4391
|
+
max-height: ${getSizeHeight$2(size)}px;
|
|
4392
|
+
|
|
4393
|
+
&::after {
|
|
4394
|
+
content: '';
|
|
4395
|
+
position: absolute;
|
|
4396
|
+
right: ${getSizeHorizontalPadding(size)}px;
|
|
4397
|
+
top: 50%;
|
|
4398
|
+
transform: translate3d(0, -25%, 0);
|
|
4399
|
+
border: solid 0.35em transparent;
|
|
4400
|
+
border-top-color: ${getContrastColor$1(contrast)};
|
|
4401
|
+
}
|
|
4402
|
+
`)}
|
|
4403
|
+
`;
|
|
4404
|
+
const Select = styled.select`
|
|
4405
|
+
appearance: none;
|
|
4406
|
+
position: absolute;
|
|
4407
|
+
top: 0;
|
|
4408
|
+
left: 0;
|
|
4409
|
+
opacity: 0;
|
|
4410
|
+
width: 100%;
|
|
4411
|
+
height: 100%;
|
|
4412
|
+
`;
|
|
4413
|
+
var TableColumnSingleSelect = forwardRef(function TableColumnSingleSelect2(_G, ref) {
|
|
4414
|
+
var _H = _G, {
|
|
4415
|
+
id,
|
|
4416
|
+
tableColumn,
|
|
4417
|
+
value = "",
|
|
4418
|
+
label = "",
|
|
4419
|
+
error = false,
|
|
4420
|
+
hideLabel = false,
|
|
4421
|
+
form
|
|
4422
|
+
} = _H, restOfProps = __objRest(_H, [
|
|
4423
|
+
"id",
|
|
4424
|
+
"tableColumn",
|
|
4425
|
+
"value",
|
|
4426
|
+
"label",
|
|
4427
|
+
"error",
|
|
4428
|
+
"hideLabel",
|
|
4429
|
+
"form"
|
|
4430
|
+
]);
|
|
4431
|
+
const {
|
|
4432
|
+
shape,
|
|
4433
|
+
size,
|
|
4434
|
+
contrast,
|
|
4435
|
+
brandColor
|
|
4436
|
+
} = useFormContext();
|
|
4437
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4438
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4439
|
+
htmlFor: id,
|
|
4440
|
+
children: label
|
|
4441
|
+
}), /* @__PURE__ */ jsxs(Container$4, {
|
|
4442
|
+
error,
|
|
4443
|
+
shape,
|
|
4444
|
+
size,
|
|
4445
|
+
contrast,
|
|
4446
|
+
brandColor,
|
|
4447
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
4448
|
+
children: value === "" ? "-" : value
|
|
4449
|
+
}), /* @__PURE__ */ jsxs(Select, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4450
|
+
"aria-label": label,
|
|
4451
|
+
ref,
|
|
4452
|
+
id,
|
|
4453
|
+
value,
|
|
4454
|
+
children: [/* @__PURE__ */ jsx("option", {
|
|
4455
|
+
value: "",
|
|
4456
|
+
children: "-"
|
|
4457
|
+
}), tableColumn.options.map((option) => /* @__PURE__ */ jsx("option", {
|
|
4458
|
+
value: option.name,
|
|
4459
|
+
children: option.name
|
|
4460
|
+
}, option.id))]
|
|
4461
|
+
}))]
|
|
4462
|
+
})]
|
|
4463
|
+
});
|
|
4464
|
+
});
|
|
4465
|
+
var SingleSelectTableField = forwardRef(function SingleSelectTableField2(_I, ref) {
|
|
4466
|
+
var _J = _I, {
|
|
4467
|
+
type
|
|
4468
|
+
} = _J, restOfProps = __objRest(_J, [
|
|
4469
|
+
"type"
|
|
4470
|
+
]);
|
|
4471
|
+
return type === "select" ? /* @__PURE__ */ jsx(TableColumnSingleSelect, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4472
|
+
ref
|
|
4473
|
+
})) : /* @__PURE__ */ jsx(TableColumnRadioButtonGroup, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4474
|
+
ref
|
|
4475
|
+
}));
|
|
4476
|
+
});
|
|
4477
|
+
var PhoneNumberTableField = forwardRef(function PhoneNumberTableField2(_K, ref) {
|
|
4478
|
+
var _L = _K, {
|
|
4479
|
+
id,
|
|
4480
|
+
label = "",
|
|
4481
|
+
name,
|
|
4482
|
+
error,
|
|
4483
|
+
hideLabel = false
|
|
4484
|
+
} = _L, restOfProps = __objRest(_L, [
|
|
4485
|
+
"id",
|
|
4486
|
+
"label",
|
|
4487
|
+
"name",
|
|
4488
|
+
"error",
|
|
4489
|
+
"hideLabel"
|
|
4490
|
+
]);
|
|
4491
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4492
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4493
|
+
htmlFor: id,
|
|
4494
|
+
children: label
|
|
4495
|
+
}), /* @__PURE__ */ jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4496
|
+
"aria-label": label,
|
|
4497
|
+
ref,
|
|
4498
|
+
id,
|
|
4499
|
+
name,
|
|
4500
|
+
type: "tel",
|
|
4501
|
+
error: error != null
|
|
4502
|
+
}))]
|
|
4503
|
+
});
|
|
4504
|
+
});
|
|
4505
|
+
var EmailTableField = forwardRef(function EmailTableField2(_M, ref) {
|
|
4506
|
+
var _N = _M, {
|
|
4507
|
+
id,
|
|
4508
|
+
label = "",
|
|
4509
|
+
name,
|
|
4510
|
+
error,
|
|
4511
|
+
hideLabel = false
|
|
4512
|
+
} = _N, restOfProps = __objRest(_N, [
|
|
4513
|
+
"id",
|
|
4514
|
+
"label",
|
|
4515
|
+
"name",
|
|
4516
|
+
"error",
|
|
4517
|
+
"hideLabel"
|
|
4518
|
+
]);
|
|
4519
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4520
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4521
|
+
htmlFor: id,
|
|
4522
|
+
children: label
|
|
4523
|
+
}), /* @__PURE__ */ jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4524
|
+
"aria-label": label,
|
|
4525
|
+
ref,
|
|
4526
|
+
id,
|
|
4527
|
+
name,
|
|
4528
|
+
type: "email",
|
|
4529
|
+
error: error != null
|
|
4530
|
+
}))]
|
|
4531
|
+
});
|
|
4532
|
+
});
|
|
4533
|
+
var URLTableField = forwardRef(function URLTableField2(_O, ref) {
|
|
4534
|
+
var _P = _O, {
|
|
4535
|
+
id,
|
|
4536
|
+
label = "",
|
|
4537
|
+
name,
|
|
4538
|
+
error,
|
|
4539
|
+
hideLabel = false
|
|
4540
|
+
} = _P, restOfProps = __objRest(_P, [
|
|
4541
|
+
"id",
|
|
4542
|
+
"label",
|
|
4543
|
+
"name",
|
|
4544
|
+
"error",
|
|
4545
|
+
"hideLabel"
|
|
4546
|
+
]);
|
|
4547
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4548
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4549
|
+
htmlFor: id,
|
|
4550
|
+
children: label
|
|
4551
|
+
}), /* @__PURE__ */ jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4552
|
+
"aria-label": label,
|
|
4553
|
+
ref,
|
|
4554
|
+
id,
|
|
4555
|
+
name,
|
|
4556
|
+
type: "url",
|
|
4557
|
+
error: error != null
|
|
4558
|
+
}))]
|
|
4559
|
+
});
|
|
4560
|
+
});
|
|
4561
|
+
var NumberTableField = forwardRef(function NumberTableField2(_Q, ref) {
|
|
4562
|
+
var _R = _Q, {
|
|
4563
|
+
id,
|
|
4564
|
+
label = "",
|
|
4565
|
+
name,
|
|
4566
|
+
error,
|
|
4567
|
+
hideLabel = false
|
|
4568
|
+
} = _R, restOfProps = __objRest(_R, [
|
|
4569
|
+
"id",
|
|
4570
|
+
"label",
|
|
4571
|
+
"name",
|
|
4572
|
+
"error",
|
|
4573
|
+
"hideLabel"
|
|
4574
|
+
]);
|
|
4575
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4576
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4577
|
+
htmlFor: id,
|
|
4578
|
+
children: label
|
|
4579
|
+
}), /* @__PURE__ */ jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4580
|
+
"aria-label": label,
|
|
4581
|
+
ref,
|
|
4582
|
+
id,
|
|
4583
|
+
name,
|
|
4584
|
+
type: "number",
|
|
4585
|
+
error: error != null
|
|
4586
|
+
}))]
|
|
4587
|
+
});
|
|
4588
|
+
});
|
|
4589
|
+
const Label = styled.div`
|
|
4590
|
+
display: block;
|
|
4591
|
+
max-width: 120px;
|
|
4592
|
+
min-width: 60px;
|
|
4593
|
+
border-radius: 2px;
|
|
4594
|
+
background-color: #5f49f4;
|
|
4595
|
+
opacity: 0.4;
|
|
4596
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
4597
|
+
margin: calc(0.25 * ${getSizeHeight(size)}px + 2px) 0;
|
|
4598
|
+
min-height: ${0.5 * getSizeHeight(size)}px;
|
|
4599
|
+
max-height: ${0.5 * getSizeHeight(size)}px;
|
|
4600
|
+
`)}
|
|
4601
|
+
`;
|
|
4602
|
+
const Input2 = styled.div`
|
|
4603
|
+
display: block;
|
|
4604
|
+
width: 100%;
|
|
4605
|
+
border-width: 2px;
|
|
4606
|
+
border-style: solid;
|
|
4607
|
+
border-color: #5f49f4;
|
|
4608
|
+
opacity: 0.4;
|
|
4609
|
+
${(props) => cssMediaRules([props.shape, props.size], ([shape = Shapes.ROUNDED, size = Sizes.MEDIUM]) => css`
|
|
4610
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
4611
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
4612
|
+
border-radius: ${getShapeBorderRadius(shape)}px;
|
|
4613
|
+
`)}
|
|
4614
|
+
`;
|
|
4615
|
+
function PlaceholderTableField() {
|
|
4616
|
+
const {
|
|
4617
|
+
size,
|
|
4618
|
+
shape
|
|
4619
|
+
} = useFormContext();
|
|
4620
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4621
|
+
children: [/* @__PURE__ */ jsx(Label, {
|
|
4622
|
+
size
|
|
4623
|
+
}), /* @__PURE__ */ jsx(Input2, {
|
|
4624
|
+
shape,
|
|
4625
|
+
size
|
|
4626
|
+
})]
|
|
4627
|
+
});
|
|
4628
|
+
}
|
|
4629
|
+
function getTypeMismatchErrorMessage(tableColumn, label) {
|
|
4630
|
+
switch ((tableColumn || {}).__typename) {
|
|
4631
|
+
case "PhoneNumberTableColumn":
|
|
4632
|
+
return `${label} field must be a valid phone number.`;
|
|
4633
|
+
case "EmailTableColumn":
|
|
4634
|
+
return `${label} field must be a valid email.`;
|
|
4635
|
+
case "URLTableColumn":
|
|
4636
|
+
return `${label} field must be a valid URL.`;
|
|
4637
|
+
case "NumberTableColumn":
|
|
4638
|
+
return `${label} field must be a valid number.`;
|
|
4639
|
+
case "SingleLineTextTableColumn":
|
|
4640
|
+
case "LongTextTableColumn":
|
|
4641
|
+
case "CheckboxTableColumn":
|
|
4642
|
+
default:
|
|
4643
|
+
return `${label} field is invalid.`;
|
|
4644
|
+
}
|
|
4645
|
+
}
|
|
4646
|
+
function getTableColumnField(tableColumn) {
|
|
4647
|
+
switch ((tableColumn || {}).__typename) {
|
|
4648
|
+
case "SingleLineTextTableColumn":
|
|
4649
|
+
return SingleLineTextTableField;
|
|
4650
|
+
case "LongTextTableColumn":
|
|
4651
|
+
return LongTextTableField;
|
|
4652
|
+
case "CheckboxTableColumn":
|
|
4653
|
+
return CheckboxTableField;
|
|
4654
|
+
case "MultipleSelectTableColumn":
|
|
4655
|
+
return MultipleSelectTableField;
|
|
4656
|
+
case "SingleSelectTableColumn":
|
|
4657
|
+
return SingleSelectTableField;
|
|
4658
|
+
case "PhoneNumberTableColumn":
|
|
4659
|
+
return PhoneNumberTableField;
|
|
4660
|
+
case "EmailTableColumn":
|
|
4661
|
+
return EmailTableField;
|
|
4662
|
+
case "URLTableColumn":
|
|
4663
|
+
return URLTableField;
|
|
4664
|
+
case "NumberTableColumn":
|
|
4665
|
+
return NumberTableField;
|
|
4666
|
+
default:
|
|
4667
|
+
return SingleLineTextTableField;
|
|
4668
|
+
}
|
|
4669
|
+
}
|
|
4670
|
+
function Field({
|
|
4671
|
+
tableColumn,
|
|
4672
|
+
tableFormField: {
|
|
4673
|
+
id,
|
|
4674
|
+
label = "",
|
|
4675
|
+
placeholder: placeholder2,
|
|
4676
|
+
required = false,
|
|
4677
|
+
hidden = false,
|
|
4678
|
+
type = "radio",
|
|
4679
|
+
hideLabel = false
|
|
4680
|
+
}
|
|
4681
|
+
}) {
|
|
4682
|
+
const TableColumnField = getTableColumnField(tableColumn);
|
|
4683
|
+
const input = useRef(null);
|
|
4684
|
+
if (!tableColumn)
|
|
4685
|
+
return /* @__PURE__ */ jsx(PlaceholderTableField, {});
|
|
4686
|
+
function validate() {
|
|
4687
|
+
let errorMessage;
|
|
4688
|
+
if (input.current) {
|
|
4689
|
+
const {
|
|
4690
|
+
validity = {}
|
|
4691
|
+
} = input.current;
|
|
4692
|
+
if (validity.valueMissing)
|
|
4693
|
+
errorMessage = `${label} is required.`;
|
|
4694
|
+
if (validity.typeMismatch)
|
|
4695
|
+
errorMessage = getTypeMismatchErrorMessage(tableColumn, label);
|
|
4696
|
+
}
|
|
4697
|
+
return errorMessage;
|
|
4698
|
+
}
|
|
4699
|
+
return /* @__PURE__ */ jsx(Field$1, {
|
|
4700
|
+
name: tableColumn.name,
|
|
4701
|
+
validate,
|
|
4702
|
+
children: ({
|
|
4703
|
+
field,
|
|
4704
|
+
form
|
|
4705
|
+
}) => hidden ? /* @__PURE__ */ jsx("input", __spreadProps(__spreadValues({}, field), {
|
|
4706
|
+
ref: input,
|
|
4707
|
+
type: "hidden"
|
|
4708
|
+
})) : /* @__PURE__ */ jsx(TableColumnField, __spreadProps(__spreadValues({}, field), {
|
|
4709
|
+
type,
|
|
4710
|
+
form,
|
|
4711
|
+
tableColumn,
|
|
4712
|
+
ref: input,
|
|
4713
|
+
id,
|
|
4714
|
+
error: getIn(form.touched, field.name) && getIn(form.errors, field.name),
|
|
4715
|
+
label,
|
|
4716
|
+
placeholder: placeholder2,
|
|
4717
|
+
required,
|
|
4718
|
+
hideLabel
|
|
4719
|
+
}))
|
|
4720
|
+
});
|
|
4721
|
+
}
|
|
4722
|
+
var _g;
|
|
4723
|
+
function _extends$t() {
|
|
4724
|
+
_extends$t = Object.assign || function(target) {
|
|
4725
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
4726
|
+
var source = arguments[i];
|
|
4727
|
+
for (var key in source) {
|
|
4728
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
4729
|
+
target[key] = source[key];
|
|
4730
|
+
}
|
|
4731
|
+
}
|
|
4732
|
+
}
|
|
4733
|
+
return target;
|
|
4734
|
+
};
|
|
4735
|
+
return _extends$t.apply(this, arguments);
|
|
4736
|
+
}
|
|
4737
|
+
var SvgSpinner20 = function SvgSpinner202(props) {
|
|
4738
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$t({
|
|
4739
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4740
|
+
width: 20,
|
|
4741
|
+
height: 20
|
|
4742
|
+
}, props), _g || (_g = /* @__PURE__ */ React.createElement("g", {
|
|
4743
|
+
fill: "none",
|
|
4744
|
+
strokeWidth: 2,
|
|
4745
|
+
transform: "translate(1 1)"
|
|
4746
|
+
}, /* @__PURE__ */ React.createElement("circle", {
|
|
4747
|
+
stroke: "currentColor",
|
|
4748
|
+
cx: 9,
|
|
4749
|
+
cy: 9,
|
|
4750
|
+
r: 9,
|
|
4751
|
+
strokeOpacity: 0.4
|
|
4752
|
+
}), /* @__PURE__ */ React.createElement("path", {
|
|
4753
|
+
d: "M9 18A9 9 0 0 0 9 0"
|
|
4754
|
+
}))));
|
|
4755
|
+
};
|
|
4756
|
+
const spin = keyframes`
|
|
4757
|
+
from {
|
|
4758
|
+
transform: rotate(0deg);
|
|
4759
|
+
}
|
|
4760
|
+
to {
|
|
4761
|
+
transform: rotate(360deg);
|
|
4762
|
+
}
|
|
4763
|
+
`;
|
|
4764
|
+
const Icon = styled(SvgSpinner20)`
|
|
4765
|
+
display: inline-flex;
|
|
4766
|
+
animation: ${spin} 1s linear infinite;
|
|
4767
|
+
stroke: currentColor;
|
|
4768
|
+
`;
|
|
4769
|
+
function Spinner() {
|
|
4770
|
+
return /* @__PURE__ */ jsx(Icon, {});
|
|
4771
|
+
}
|
|
4772
|
+
function useTableFormFieldRefs(propController, { fieldsCount }) {
|
|
4773
|
+
const [container, setContainer] = useState(null);
|
|
4774
|
+
const [items, setItems] = useState(Array(fieldsCount + 1).fill(null));
|
|
4775
|
+
const isInBuilder = useIsInBuilder();
|
|
4776
|
+
useEffect(() => {
|
|
4777
|
+
if (!isInBuilder)
|
|
4778
|
+
return;
|
|
4779
|
+
let animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
|
|
4780
|
+
return () => {
|
|
4781
|
+
cancelAnimationFrame(animationFrameHandle);
|
|
4782
|
+
};
|
|
4783
|
+
function handleAnimationFrameRequest() {
|
|
4784
|
+
if (propController == null)
|
|
4785
|
+
return;
|
|
4786
|
+
if (container != null)
|
|
4787
|
+
propController.tableFormLayoutChange({ layout: getBox(container) });
|
|
4788
|
+
items.map((item, index) => {
|
|
4789
|
+
if (item == null)
|
|
4790
|
+
return;
|
|
4791
|
+
propController.tableFormFieldLayoutChange({ index, layout: getBox(item) });
|
|
4792
|
+
});
|
|
4793
|
+
animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
|
|
4794
|
+
}
|
|
4795
|
+
}, [propController, container, items, isInBuilder]);
|
|
4796
|
+
const itemRefs = useMemo(() => Array.from({ length: fieldsCount + 1 }).map((_, index) => (item) => {
|
|
4797
|
+
setItems((is) => [...is.slice(0, index), item, ...is.slice(index + 1)]);
|
|
4798
|
+
}), [fieldsCount, setItems]);
|
|
4799
|
+
return { container: setContainer, items: itemRefs };
|
|
4800
|
+
}
|
|
4801
|
+
const LOCAL_STORAGE_NAMESPACE = "@@makeswift/components/form";
|
|
4802
|
+
function getSizeFontSize(size) {
|
|
4803
|
+
switch (size) {
|
|
4804
|
+
case Sizes.SMALL:
|
|
4805
|
+
return 12;
|
|
4806
|
+
case Sizes.MEDIUM:
|
|
4807
|
+
return 14;
|
|
4808
|
+
case Sizes.LARGE:
|
|
4809
|
+
return 18;
|
|
4810
|
+
default:
|
|
4811
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
4812
|
+
}
|
|
4813
|
+
}
|
|
4814
|
+
const Alignments = {
|
|
4815
|
+
LEFT: "left",
|
|
4816
|
+
CENTER: "center",
|
|
4817
|
+
RIGHT: "right"
|
|
4818
|
+
};
|
|
4819
|
+
const GridForm = styled.form`
|
|
4820
|
+
display: flex;
|
|
4821
|
+
flex-wrap: wrap;
|
|
4822
|
+
width: 100%;
|
|
4823
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
4824
|
+
font-size: ${getSizeFontSize(size)}px;
|
|
4825
|
+
`)}
|
|
4826
|
+
${cssWidth()}
|
|
4827
|
+
${cssMargin()}
|
|
4828
|
+
`;
|
|
4829
|
+
const GridItem$1 = styled.div`
|
|
4830
|
+
align-self: flex-end;
|
|
4831
|
+
flex-direction: column;
|
|
4832
|
+
${cssGridItem()}
|
|
4833
|
+
`;
|
|
4834
|
+
function getAlignmentMargin(alignment) {
|
|
4835
|
+
switch (alignment) {
|
|
4836
|
+
case Alignments.LEFT:
|
|
4837
|
+
return "0 auto 0 0";
|
|
4838
|
+
case Alignments.RIGHT:
|
|
4839
|
+
return "0 0 0 auto";
|
|
4840
|
+
default:
|
|
4841
|
+
return "0 auto";
|
|
4842
|
+
}
|
|
4843
|
+
}
|
|
4844
|
+
const StyledButton = styled((props) => /* @__PURE__ */ jsx(Button$1, __spreadProps(__spreadValues({}, props), {
|
|
4845
|
+
as: "button"
|
|
4846
|
+
})))`
|
|
4847
|
+
display: flex;
|
|
4848
|
+
align-items: center;
|
|
4849
|
+
justify-content: center;
|
|
4850
|
+
${(props) => cssMediaRules([props.size, props.alignment], ([size = Sizes.MEDIUM, alignment = Alignments.CENTER]) => css`
|
|
4851
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
4852
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
4853
|
+
margin: ${getAlignmentMargin(alignment)};
|
|
4854
|
+
padding-top: 0;
|
|
4855
|
+
padding-bottom: 0;
|
|
4856
|
+
`)}
|
|
4857
|
+
`;
|
|
4858
|
+
const ErrorContainer = styled.div`
|
|
4859
|
+
padding: 8px 16px;
|
|
4860
|
+
background-color: #f19eb9;
|
|
4861
|
+
border-radius: 4px;
|
|
4862
|
+
margin-top: 16px;
|
|
4863
|
+
`;
|
|
4864
|
+
const IconContainer = styled.div`
|
|
4865
|
+
fill: currentColor;
|
|
4866
|
+
`;
|
|
4867
|
+
const ErrorMessage = styled.p`
|
|
4868
|
+
font-size: 12px;
|
|
4869
|
+
margin: 8px 0;
|
|
4870
|
+
color: rgba(127, 0, 0, 0.95);
|
|
4871
|
+
`;
|
|
4872
|
+
function getTableColumnDefaultValue(tableColumn) {
|
|
4873
|
+
switch (tableColumn.__typename) {
|
|
4874
|
+
case "CheckboxTableColumn":
|
|
4875
|
+
return false;
|
|
4876
|
+
case "MultipleSelectTableColumn":
|
|
4877
|
+
return [];
|
|
4878
|
+
case "SingleLineTextTableColumn":
|
|
4879
|
+
case "LongTextTableColumn":
|
|
4880
|
+
case "SingleSelectTableColumn":
|
|
4881
|
+
case "PhoneNumberTableColumn":
|
|
4882
|
+
case "EmailTableColumn":
|
|
4883
|
+
case "URLTableColumn":
|
|
4884
|
+
case "NumberTableColumn":
|
|
4885
|
+
default:
|
|
4886
|
+
return "";
|
|
4887
|
+
}
|
|
4888
|
+
}
|
|
4889
|
+
const CREATE_TABLE_RECORD = gql`
|
|
4890
|
+
mutation CreateTableRecord($input: CreateTableRecordInput!) {
|
|
4891
|
+
createTableRecord(input: $input) {
|
|
4892
|
+
tableRecord {
|
|
4893
|
+
id
|
|
4894
|
+
}
|
|
4895
|
+
}
|
|
4896
|
+
}
|
|
4897
|
+
`;
|
|
4898
|
+
const Form = forwardRef(function Form2({
|
|
4899
|
+
id,
|
|
4900
|
+
tableId,
|
|
4901
|
+
fields: fieldsProp,
|
|
4902
|
+
submitLabel = "Submit",
|
|
4903
|
+
submitLink,
|
|
4904
|
+
shape,
|
|
4905
|
+
size,
|
|
4906
|
+
contrast,
|
|
4907
|
+
brandColor,
|
|
4908
|
+
gap,
|
|
4909
|
+
width,
|
|
4910
|
+
margin,
|
|
4911
|
+
submitTextStyle,
|
|
4912
|
+
submitVariant,
|
|
4913
|
+
submitTextColor,
|
|
4914
|
+
submitWidth,
|
|
4915
|
+
submitAlignment,
|
|
4916
|
+
labelTextStyle,
|
|
4917
|
+
labelTextColor
|
|
4918
|
+
}, ref) {
|
|
4919
|
+
const fields = useMemo(() => {
|
|
4920
|
+
var _a;
|
|
4921
|
+
return (_a = fieldsProp == null ? void 0 : fieldsProp.fields) != null ? _a : [];
|
|
4922
|
+
}, [fieldsProp]);
|
|
4923
|
+
const grid = useMemo(() => {
|
|
4924
|
+
var _a;
|
|
4925
|
+
return (_a = fieldsProp == null ? void 0 : fieldsProp.grid) != null ? _a : [];
|
|
4926
|
+
}, [fieldsProp]);
|
|
4927
|
+
const {
|
|
4928
|
+
data: {
|
|
4929
|
+
table
|
|
4930
|
+
} = {}
|
|
4931
|
+
} = useTable(tableId);
|
|
4932
|
+
const [createTableRecord] = useMutation(CREATE_TABLE_RECORD);
|
|
4933
|
+
const [refEl, setRefEl] = useState(null);
|
|
4934
|
+
const [propControllers, setPropControllers] = useState(null);
|
|
4935
|
+
const [initialValues, setInitialValues] = useState(() => fields.reduce((acc, formField) => {
|
|
4936
|
+
const tableColumn = table && table.columns.find((field) => field.id === formField.tableColumnId);
|
|
4937
|
+
const defaultValue = formField ? formField.defaultValue : null;
|
|
4938
|
+
if (tableColumn) {
|
|
4939
|
+
acc[tableColumn.name] = defaultValue == null ? getTableColumnDefaultValue(tableColumn) : defaultValue;
|
|
4940
|
+
}
|
|
4941
|
+
return acc;
|
|
4942
|
+
}, {}));
|
|
4943
|
+
const controller = propControllers == null ? void 0 : propControllers.fields;
|
|
4944
|
+
const {
|
|
4945
|
+
container,
|
|
4946
|
+
items
|
|
4947
|
+
} = useTableFormFieldRefs(controller, {
|
|
4948
|
+
fieldsCount: fields.length
|
|
4949
|
+
});
|
|
4950
|
+
const [isDone, setIsDone] = useState(false);
|
|
4951
|
+
const linkRef = useRef(null);
|
|
4952
|
+
useImperativeHandle(ref, () => ({
|
|
4953
|
+
getBoxModel() {
|
|
4954
|
+
return refEl instanceof Element ? getBox(refEl) : null;
|
|
4955
|
+
},
|
|
4956
|
+
setPropControllers
|
|
4957
|
+
}), [refEl, setPropControllers]);
|
|
4958
|
+
useEffect(() => {
|
|
4959
|
+
container(refEl);
|
|
4960
|
+
}, [container, refEl]);
|
|
4961
|
+
useEffect(() => {
|
|
4962
|
+
if (!isDone)
|
|
4963
|
+
return;
|
|
4964
|
+
let timeoutId = setTimeout(() => setIsDone(false), 2500);
|
|
4965
|
+
return () => clearTimeout(timeoutId);
|
|
4966
|
+
}, [isDone]);
|
|
4967
|
+
function getTableColumn({
|
|
4968
|
+
tableColumnId
|
|
4969
|
+
}) {
|
|
4970
|
+
return table && table.columns.find((field) => tableColumnId === field.id);
|
|
4971
|
+
}
|
|
4972
|
+
async function handleSubmit(values, {
|
|
4973
|
+
setSubmitting,
|
|
4974
|
+
resetForm,
|
|
4975
|
+
setStatus
|
|
4976
|
+
}) {
|
|
4977
|
+
if (table) {
|
|
4978
|
+
const columns = [];
|
|
4979
|
+
fields.forEach((field) => {
|
|
4980
|
+
const tableColumn = getTableColumn(field);
|
|
4981
|
+
if (tableColumn) {
|
|
4982
|
+
const data = values[tableColumn.name];
|
|
4983
|
+
if (data) {
|
|
4984
|
+
columns.push({
|
|
4985
|
+
columnId: field.tableColumnId,
|
|
4986
|
+
data
|
|
4987
|
+
});
|
|
4988
|
+
if (field.autofill) {
|
|
4989
|
+
localStorage.setItem(`${LOCAL_STORAGE_NAMESPACE}/${tableColumn.name}`, JSON.stringify(data));
|
|
4990
|
+
}
|
|
4991
|
+
}
|
|
4992
|
+
}
|
|
4993
|
+
});
|
|
4994
|
+
try {
|
|
4995
|
+
await createTableRecord({
|
|
4996
|
+
variables: {
|
|
4997
|
+
input: {
|
|
4998
|
+
data: {
|
|
4999
|
+
tableId: table.id,
|
|
5000
|
+
columns
|
|
5001
|
+
}
|
|
5002
|
+
}
|
|
5003
|
+
}
|
|
5004
|
+
});
|
|
5005
|
+
setIsDone(true);
|
|
5006
|
+
setInitialValues((prev) => fields.reduce((acc, field) => {
|
|
5007
|
+
const tableColumn = getTableColumn(field);
|
|
5008
|
+
if (tableColumn) {
|
|
5009
|
+
const data = values[tableColumn.name];
|
|
5010
|
+
if (data && field.autofill)
|
|
5011
|
+
return __spreadProps(__spreadValues({}, acc), {
|
|
5012
|
+
[tableColumn.name]: data
|
|
5013
|
+
});
|
|
5014
|
+
}
|
|
5015
|
+
return acc;
|
|
5016
|
+
}, __spreadValues({}, prev)));
|
|
5017
|
+
resetForm();
|
|
5018
|
+
if (linkRef.current != null)
|
|
5019
|
+
linkRef.current.click();
|
|
5020
|
+
} catch (error) {
|
|
5021
|
+
setStatus({
|
|
5022
|
+
error: "An unexpected error has occurred, please try again later"
|
|
5023
|
+
});
|
|
5024
|
+
} finally {
|
|
5025
|
+
setSubmitting(false);
|
|
5026
|
+
}
|
|
5027
|
+
}
|
|
5028
|
+
}
|
|
5029
|
+
useEffect(() => {
|
|
5030
|
+
setInitialValues((prev) => fields.reduce((acc, formField) => {
|
|
5031
|
+
const tableColumn = table && table.columns.find((field) => field.id === formField.tableColumnId);
|
|
5032
|
+
if (tableColumn && formField.autofill) {
|
|
5033
|
+
const storedValue = localStorage.getItem(`${LOCAL_STORAGE_NAMESPACE}/${tableColumn.name}`);
|
|
5034
|
+
if (storedValue) {
|
|
5035
|
+
try {
|
|
5036
|
+
acc[tableColumn.name] = JSON.parse(storedValue);
|
|
5037
|
+
} catch (e) {
|
|
5038
|
+
}
|
|
5039
|
+
}
|
|
5040
|
+
}
|
|
5041
|
+
return acc;
|
|
5042
|
+
}, __spreadValues({}, prev)));
|
|
5043
|
+
}, [fields, table]);
|
|
5044
|
+
const brandColorData = useColor(brandColor);
|
|
5045
|
+
return /* @__PURE__ */ jsx(Provider, {
|
|
5046
|
+
value: {
|
|
5047
|
+
shape,
|
|
5048
|
+
size,
|
|
5049
|
+
contrast,
|
|
5050
|
+
brandColor: brandColorData,
|
|
5051
|
+
labelTextStyle,
|
|
5052
|
+
labelTextColor
|
|
5053
|
+
},
|
|
5054
|
+
children: tableId == null ? /* @__PURE__ */ jsx(Placeholder$1, {
|
|
5055
|
+
ref: setRefEl,
|
|
5056
|
+
width,
|
|
5057
|
+
margin
|
|
5058
|
+
}) : /* @__PURE__ */ jsx(Fragment, {
|
|
5059
|
+
children: /* @__PURE__ */ jsx(Formik, {
|
|
5060
|
+
onSubmit: handleSubmit,
|
|
5061
|
+
initialValues,
|
|
5062
|
+
initialStatus: {
|
|
5063
|
+
error: null
|
|
5064
|
+
},
|
|
5065
|
+
enableReinitialize: true,
|
|
5066
|
+
children: (formik) => {
|
|
5067
|
+
const error = formik.status && formik.status.error;
|
|
5068
|
+
const errors = fields.map((field) => {
|
|
5069
|
+
const tableColumn = getTableColumn(field);
|
|
5070
|
+
return tableColumn && getIn(formik.touched, tableColumn.name) && getIn(formik.errors, tableColumn.name);
|
|
5071
|
+
}).filter((message) => typeof message === "string");
|
|
5072
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
5073
|
+
children: [/* @__PURE__ */ jsxs(GridForm, {
|
|
5074
|
+
ref: setRefEl,
|
|
5075
|
+
id,
|
|
5076
|
+
width,
|
|
5077
|
+
margin,
|
|
5078
|
+
size,
|
|
5079
|
+
onSubmit: formik.handleSubmit,
|
|
5080
|
+
onReset: formik.handleReset,
|
|
5081
|
+
noValidate: true,
|
|
5082
|
+
children: [fields.map((field, index) => {
|
|
5083
|
+
const tableColumn = getTableColumn(field);
|
|
5084
|
+
return /* @__PURE__ */ jsx(GridItem$1, {
|
|
5085
|
+
ref: items[index],
|
|
5086
|
+
grid,
|
|
5087
|
+
index,
|
|
5088
|
+
rowGap: gap,
|
|
5089
|
+
columnGap: gap,
|
|
5090
|
+
children: /* @__PURE__ */ jsx(Field, {
|
|
5091
|
+
tableColumn,
|
|
5092
|
+
tableFormField: field
|
|
5093
|
+
})
|
|
5094
|
+
}, field.id);
|
|
5095
|
+
}), /* @__PURE__ */ jsxs(GridItem$1, {
|
|
5096
|
+
ref: items[fields.length],
|
|
5097
|
+
grid,
|
|
5098
|
+
index: fields.length,
|
|
5099
|
+
rowGap: gap,
|
|
5100
|
+
columnGap: gap,
|
|
5101
|
+
children: [/* @__PURE__ */ jsx(StyledButton, {
|
|
5102
|
+
type: "submit",
|
|
5103
|
+
disabled: formik.isSubmitting || isDone,
|
|
5104
|
+
shape,
|
|
5105
|
+
size,
|
|
5106
|
+
color: brandColor,
|
|
5107
|
+
variant: submitVariant,
|
|
5108
|
+
textColor: submitTextColor,
|
|
5109
|
+
width: submitWidth,
|
|
5110
|
+
alignment: submitAlignment,
|
|
5111
|
+
textStyle: submitTextStyle,
|
|
5112
|
+
children: formik.isSubmitting ? /* @__PURE__ */ jsx(Spinner, {}) : isDone ? /* @__PURE__ */ jsx(IconContainer, {
|
|
5113
|
+
children: /* @__PURE__ */ jsx(SvgCheck12, {})
|
|
5114
|
+
}) : submitLabel
|
|
5115
|
+
}), (errors.length > 0 || error) && /* @__PURE__ */ jsxs(ErrorContainer, {
|
|
5116
|
+
children: [errors.map((message) => /* @__PURE__ */ jsx(ErrorMessage, {
|
|
5117
|
+
children: message
|
|
5118
|
+
}, message)), error != null && /* @__PURE__ */ jsx(ErrorMessage, {
|
|
5119
|
+
children: error
|
|
5120
|
+
})]
|
|
5121
|
+
})]
|
|
5122
|
+
})]
|
|
5123
|
+
}), submitLink != null && /* @__PURE__ */ jsx(Link, {
|
|
5124
|
+
ref: linkRef,
|
|
5125
|
+
hidden: true,
|
|
5126
|
+
link: submitLink
|
|
5127
|
+
})]
|
|
5128
|
+
});
|
|
5129
|
+
}
|
|
5130
|
+
})
|
|
5131
|
+
})
|
|
5132
|
+
});
|
|
5133
|
+
});
|
|
5134
|
+
function registerComponent$5(runtime) {
|
|
5135
|
+
return runtime.registerComponent(Form, {
|
|
5136
|
+
type: "./components/Form/index.js",
|
|
5137
|
+
label: "Form",
|
|
5138
|
+
icon: "Form40",
|
|
5139
|
+
props: {
|
|
5140
|
+
id: ElementID(),
|
|
5141
|
+
tableId: Table(),
|
|
5142
|
+
fields: TableFormFields(),
|
|
5143
|
+
submitLink: Link$1({
|
|
5144
|
+
label: "Redirect to",
|
|
5145
|
+
options: [{
|
|
5146
|
+
value: "OPEN_PAGE",
|
|
5147
|
+
label: "Open page"
|
|
5148
|
+
}, {
|
|
5149
|
+
value: "OPEN_URL",
|
|
5150
|
+
label: "Open URL"
|
|
5151
|
+
}]
|
|
5152
|
+
}),
|
|
5153
|
+
gap: GapY({
|
|
5154
|
+
preset: [{
|
|
5155
|
+
deviceId: "desktop",
|
|
5156
|
+
value: {
|
|
5157
|
+
value: 10,
|
|
5158
|
+
unit: "px"
|
|
5159
|
+
}
|
|
5160
|
+
}],
|
|
5161
|
+
label: "Gap",
|
|
5162
|
+
defaultValue: {
|
|
5163
|
+
value: 0,
|
|
5164
|
+
unit: "px"
|
|
5165
|
+
}
|
|
5166
|
+
}),
|
|
5167
|
+
shape: ResponsiveIconRadioGroup({
|
|
5168
|
+
label: "Shape",
|
|
5169
|
+
options: [{
|
|
5170
|
+
label: "Pill",
|
|
5171
|
+
value: Shapes.PILL,
|
|
5172
|
+
icon: "ButtonPill16"
|
|
5173
|
+
}, {
|
|
5174
|
+
label: "Rounded",
|
|
5175
|
+
value: Shapes.ROUNDED,
|
|
5176
|
+
icon: "ButtonRounded16"
|
|
5177
|
+
}, {
|
|
5178
|
+
label: "Square",
|
|
5179
|
+
value: Shapes.SQUARE,
|
|
5180
|
+
icon: "ButtonSquare16"
|
|
5181
|
+
}],
|
|
5182
|
+
defaultValue: Shapes.ROUNDED
|
|
5183
|
+
}),
|
|
5184
|
+
size: ResponsiveIconRadioGroup({
|
|
5185
|
+
label: "Size",
|
|
5186
|
+
options: [{
|
|
5187
|
+
label: "Small",
|
|
5188
|
+
value: Sizes.SMALL,
|
|
5189
|
+
icon: "SizeSmall16"
|
|
5190
|
+
}, {
|
|
5191
|
+
label: "Medium",
|
|
5192
|
+
value: Sizes.MEDIUM,
|
|
5193
|
+
icon: "SizeMedium16"
|
|
5194
|
+
}, {
|
|
5195
|
+
label: "Large",
|
|
5196
|
+
value: Sizes.LARGE,
|
|
5197
|
+
icon: "SizeLarge16"
|
|
5198
|
+
}],
|
|
5199
|
+
defaultValue: Sizes.MEDIUM
|
|
5200
|
+
}),
|
|
5201
|
+
contrast: ResponsiveIconRadioGroup({
|
|
5202
|
+
label: "Color",
|
|
5203
|
+
options: [{
|
|
5204
|
+
label: "Light mode",
|
|
5205
|
+
value: Contrasts.LIGHT,
|
|
5206
|
+
icon: "Sun16"
|
|
5207
|
+
}, {
|
|
5208
|
+
label: "Dark mode",
|
|
5209
|
+
value: Contrasts.DARK,
|
|
5210
|
+
icon: "Moon16"
|
|
5211
|
+
}],
|
|
5212
|
+
defaultValue: Contrasts.LIGHT
|
|
5213
|
+
}),
|
|
5214
|
+
labelTextStyle: TextStyle({
|
|
5215
|
+
label: "Label text style"
|
|
5216
|
+
}),
|
|
5217
|
+
labelTextColor: ResponsiveColor({
|
|
5218
|
+
label: "Label text color"
|
|
5219
|
+
}),
|
|
5220
|
+
submitTextStyle: TextStyle({
|
|
5221
|
+
label: "Button text style"
|
|
5222
|
+
}),
|
|
5223
|
+
brandColor: ResponsiveColor({
|
|
5224
|
+
label: "Button color",
|
|
5225
|
+
placeholder: "black"
|
|
5226
|
+
}),
|
|
5227
|
+
submitTextColor: ResponsiveColor({
|
|
5228
|
+
label: "Button text color",
|
|
5229
|
+
placeholder: "white"
|
|
5230
|
+
}),
|
|
5231
|
+
submitLabel: TextInput({
|
|
5232
|
+
label: "Button label",
|
|
5233
|
+
placeholder: "Submit"
|
|
5234
|
+
}),
|
|
5235
|
+
submitVariant: ResponsiveSelect({
|
|
5236
|
+
label: "Button style",
|
|
5237
|
+
options: [{
|
|
5238
|
+
value: "flat",
|
|
5239
|
+
label: "Flat"
|
|
5240
|
+
}, {
|
|
5241
|
+
value: "outline",
|
|
5242
|
+
label: "Outline"
|
|
5243
|
+
}, {
|
|
5244
|
+
value: "shadow",
|
|
5245
|
+
label: "Floating"
|
|
5246
|
+
}, {
|
|
5247
|
+
value: "clear",
|
|
5248
|
+
label: "Clear"
|
|
5249
|
+
}, {
|
|
5250
|
+
value: "blocky",
|
|
5251
|
+
label: "Blocky"
|
|
5252
|
+
}, {
|
|
5253
|
+
value: "bubbly",
|
|
5254
|
+
label: "Bubbly"
|
|
5255
|
+
}, {
|
|
5256
|
+
value: "skewed",
|
|
5257
|
+
label: "Skewed"
|
|
5258
|
+
}],
|
|
5259
|
+
defaultValue: "flat"
|
|
5260
|
+
}),
|
|
5261
|
+
submitWidth: ResponsiveLength({
|
|
5262
|
+
label: "Button width"
|
|
5263
|
+
}),
|
|
5264
|
+
submitAlignment: ResponsiveIconRadioGroup({
|
|
5265
|
+
label: "Button alignment",
|
|
5266
|
+
options: [{
|
|
5267
|
+
label: "Left",
|
|
5268
|
+
value: Alignments.LEFT,
|
|
5269
|
+
icon: "AlignLeft16"
|
|
5270
|
+
}, {
|
|
5271
|
+
label: "Center",
|
|
5272
|
+
value: Alignments.CENTER,
|
|
5273
|
+
icon: "AlignCenter16"
|
|
5274
|
+
}, {
|
|
5275
|
+
label: "Right",
|
|
5276
|
+
value: Alignments.RIGHT,
|
|
5277
|
+
icon: "AlignRight16"
|
|
5278
|
+
}],
|
|
5279
|
+
defaultValue: Alignments.CENTER
|
|
5280
|
+
}),
|
|
5281
|
+
width: Width({
|
|
5282
|
+
preset: [{
|
|
5283
|
+
deviceId: "desktop",
|
|
5284
|
+
value: {
|
|
5285
|
+
value: 550,
|
|
5286
|
+
unit: "px"
|
|
5287
|
+
}
|
|
5288
|
+
}],
|
|
5289
|
+
defaultValue: {
|
|
5290
|
+
value: 100,
|
|
5291
|
+
unit: "%"
|
|
5292
|
+
}
|
|
5293
|
+
}),
|
|
5294
|
+
margin: Margin()
|
|
5295
|
+
}
|
|
5296
|
+
});
|
|
5297
|
+
}
|
|
5298
|
+
var _path$s;
|
|
5299
|
+
function _extends$s() {
|
|
5300
|
+
_extends$s = Object.assign || function(target) {
|
|
5301
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
5302
|
+
var source = arguments[i];
|
|
5303
|
+
for (var key in source) {
|
|
5304
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5305
|
+
target[key] = source[key];
|
|
5306
|
+
}
|
|
5307
|
+
}
|
|
5308
|
+
}
|
|
3647
5309
|
return target;
|
|
3648
5310
|
};
|
|
3649
|
-
return _extends$
|
|
5311
|
+
return _extends$s.apply(this, arguments);
|
|
5312
|
+
}
|
|
5313
|
+
var SvgMobileMenu28 = function SvgMobileMenu282(props) {
|
|
5314
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$s({
|
|
5315
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5316
|
+
width: 28,
|
|
5317
|
+
height: 28
|
|
5318
|
+
}, props), _path$s || (_path$s = /* @__PURE__ */ React.createElement("path", {
|
|
5319
|
+
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"
|
|
5320
|
+
})));
|
|
5321
|
+
};
|
|
5322
|
+
const GutterContainer = styled.div`
|
|
5323
|
+
${(p) => cssMediaRules([p.gutter], ([gutter = {
|
|
5324
|
+
value: 0,
|
|
5325
|
+
unit: "px"
|
|
5326
|
+
}]) => css`
|
|
5327
|
+
padding-left: ${p.first ? "0px" : `${gutter.value / 2}${gutter.unit}`};
|
|
5328
|
+
padding-right: ${p.last ? "0px" : `${gutter.value / 2}${gutter.unit}`};
|
|
5329
|
+
`)}
|
|
5330
|
+
`;
|
|
5331
|
+
const PlaceholderLink$1 = styled.div`
|
|
5332
|
+
width: ${(props) => props.width}px;
|
|
5333
|
+
height: ${(props) => props.button === true ? 32 : 8}px;
|
|
5334
|
+
background-color: #a1a8c2;
|
|
5335
|
+
border-radius: ${(props) => props.button === true ? 6 : 2}px;
|
|
5336
|
+
opacity: 0.4;
|
|
5337
|
+
`;
|
|
5338
|
+
const links$1 = [{
|
|
5339
|
+
width: 50
|
|
5340
|
+
}, {
|
|
5341
|
+
width: 70
|
|
5342
|
+
}, {
|
|
5343
|
+
width: 60
|
|
5344
|
+
}, {
|
|
5345
|
+
width: 80,
|
|
5346
|
+
button: true
|
|
5347
|
+
}];
|
|
5348
|
+
function LinksPlaceholder({
|
|
5349
|
+
gutter
|
|
5350
|
+
}) {
|
|
5351
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
5352
|
+
children: links$1.map((link, i) => /* @__PURE__ */ jsx(GutterContainer, {
|
|
5353
|
+
gutter,
|
|
5354
|
+
first: i === 0,
|
|
5355
|
+
last: i === links$1.length - 1,
|
|
5356
|
+
children: /* @__PURE__ */ jsx(PlaceholderLink$1, __spreadValues({}, link))
|
|
5357
|
+
}, i))
|
|
5358
|
+
});
|
|
5359
|
+
}
|
|
5360
|
+
var _path$r;
|
|
5361
|
+
function _extends$r() {
|
|
5362
|
+
_extends$r = Object.assign || function(target) {
|
|
5363
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
5364
|
+
var source = arguments[i];
|
|
5365
|
+
for (var key in source) {
|
|
5366
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5367
|
+
target[key] = source[key];
|
|
5368
|
+
}
|
|
5369
|
+
}
|
|
5370
|
+
}
|
|
5371
|
+
return target;
|
|
5372
|
+
};
|
|
5373
|
+
return _extends$r.apply(this, arguments);
|
|
3650
5374
|
}
|
|
3651
5375
|
var SvgCaretDown8 = function SvgCaretDown82(props) {
|
|
3652
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$
|
|
5376
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$r({
|
|
3653
5377
|
width: 8,
|
|
3654
5378
|
height: 8,
|
|
3655
5379
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3656
|
-
}, props), _path$
|
|
5380
|
+
}, props), _path$r || (_path$r = /* @__PURE__ */ React.createElement("path", {
|
|
3657
5381
|
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"
|
|
3658
5382
|
})));
|
|
3659
5383
|
};
|
|
3660
|
-
var _path$
|
|
3661
|
-
function _extends$
|
|
3662
|
-
_extends$
|
|
5384
|
+
var _path$q;
|
|
5385
|
+
function _extends$q() {
|
|
5386
|
+
_extends$q = Object.assign || function(target) {
|
|
3663
5387
|
for (var i = 1; i < arguments.length; i++) {
|
|
3664
5388
|
var source = arguments[i];
|
|
3665
5389
|
for (var key in source) {
|
|
@@ -3670,20 +5394,20 @@ function _extends$p() {
|
|
|
3670
5394
|
}
|
|
3671
5395
|
return target;
|
|
3672
5396
|
};
|
|
3673
|
-
return _extends$
|
|
5397
|
+
return _extends$q.apply(this, arguments);
|
|
3674
5398
|
}
|
|
3675
5399
|
var SvgPlus8 = function SvgPlus82(props) {
|
|
3676
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$
|
|
5400
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$q({
|
|
3677
5401
|
width: 8,
|
|
3678
5402
|
height: 8,
|
|
3679
5403
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3680
|
-
}, props), _path$
|
|
5404
|
+
}, props), _path$q || (_path$q = /* @__PURE__ */ React.createElement("path", {
|
|
3681
5405
|
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"
|
|
3682
5406
|
})));
|
|
3683
5407
|
};
|
|
3684
|
-
var _path$
|
|
3685
|
-
function _extends$
|
|
3686
|
-
_extends$
|
|
5408
|
+
var _path$p;
|
|
5409
|
+
function _extends$p() {
|
|
5410
|
+
_extends$p = Object.assign || function(target) {
|
|
3687
5411
|
for (var i = 1; i < arguments.length; i++) {
|
|
3688
5412
|
var source = arguments[i];
|
|
3689
5413
|
for (var key in source) {
|
|
@@ -3694,20 +5418,20 @@ function _extends$o() {
|
|
|
3694
5418
|
}
|
|
3695
5419
|
return target;
|
|
3696
5420
|
};
|
|
3697
|
-
return _extends$
|
|
5421
|
+
return _extends$p.apply(this, arguments);
|
|
3698
5422
|
}
|
|
3699
5423
|
var SvgArrowDown8 = function SvgArrowDown82(props) {
|
|
3700
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$
|
|
5424
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$p({
|
|
3701
5425
|
width: 8,
|
|
3702
5426
|
height: 8,
|
|
3703
5427
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3704
|
-
}, props), _path$
|
|
5428
|
+
}, props), _path$p || (_path$p = /* @__PURE__ */ React.createElement("path", {
|
|
3705
5429
|
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"
|
|
3706
5430
|
})));
|
|
3707
5431
|
};
|
|
3708
|
-
var _path$
|
|
3709
|
-
function _extends$
|
|
3710
|
-
_extends$
|
|
5432
|
+
var _path$o;
|
|
5433
|
+
function _extends$o() {
|
|
5434
|
+
_extends$o = Object.assign || function(target) {
|
|
3711
5435
|
for (var i = 1; i < arguments.length; i++) {
|
|
3712
5436
|
var source = arguments[i];
|
|
3713
5437
|
for (var key in source) {
|
|
@@ -3718,14 +5442,14 @@ function _extends$n() {
|
|
|
3718
5442
|
}
|
|
3719
5443
|
return target;
|
|
3720
5444
|
};
|
|
3721
|
-
return _extends$
|
|
5445
|
+
return _extends$o.apply(this, arguments);
|
|
3722
5446
|
}
|
|
3723
5447
|
var SvgChevronDown8 = function SvgChevronDown82(props) {
|
|
3724
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$
|
|
5448
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$o({
|
|
3725
5449
|
width: 8,
|
|
3726
5450
|
height: 8,
|
|
3727
5451
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3728
|
-
}, props), _path$
|
|
5452
|
+
}, props), _path$o || (_path$o = /* @__PURE__ */ React.createElement("path", {
|
|
3729
5453
|
fillRule: "evenodd",
|
|
3730
5454
|
clipRule: "evenodd",
|
|
3731
5455
|
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"
|
|
@@ -3800,22 +5524,22 @@ const StyledDropDownItem = styled(Link)`
|
|
|
3800
5524
|
background-color: rgba(0, 0, 0, 0.04);
|
|
3801
5525
|
}
|
|
3802
5526
|
`;
|
|
3803
|
-
function DropDownItem$1(
|
|
3804
|
-
var
|
|
5527
|
+
function DropDownItem$1(_S) {
|
|
5528
|
+
var _T = _S, {
|
|
3805
5529
|
color
|
|
3806
|
-
} =
|
|
5530
|
+
} = _T, restOfProps = __objRest(_T, [
|
|
3807
5531
|
"color"
|
|
3808
5532
|
]);
|
|
3809
5533
|
return /* @__PURE__ */ jsx(StyledDropDownItem, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3810
5534
|
color: useColor(color)
|
|
3811
5535
|
}));
|
|
3812
5536
|
}
|
|
3813
|
-
function DropDownButton(
|
|
3814
|
-
var
|
|
5537
|
+
function DropDownButton(_U) {
|
|
5538
|
+
var _V = _U, {
|
|
3815
5539
|
label,
|
|
3816
5540
|
caret = "caret",
|
|
3817
5541
|
links: links2 = []
|
|
3818
|
-
} =
|
|
5542
|
+
} = _V, restOfProps = __objRest(_V, [
|
|
3819
5543
|
"label",
|
|
3820
5544
|
"caret",
|
|
3821
5545
|
"links"
|
|
@@ -3831,7 +5555,7 @@ function DropDownButton(_q) {
|
|
|
3831
5555
|
}, [setPosition]);
|
|
3832
5556
|
return /* @__PURE__ */ jsxs(DropDownContainer, {
|
|
3833
5557
|
ref: container,
|
|
3834
|
-
children: [/* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({}, restOfProps), {
|
|
5558
|
+
children: [/* @__PURE__ */ jsx(Button$1, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3835
5559
|
children: /* @__PURE__ */ jsxs("div", {
|
|
3836
5560
|
style: {
|
|
3837
5561
|
display: "flex",
|
|
@@ -3861,9 +5585,9 @@ function DropDownButton(_q) {
|
|
|
3861
5585
|
})]
|
|
3862
5586
|
});
|
|
3863
5587
|
}
|
|
3864
|
-
var _path$
|
|
3865
|
-
function _extends$
|
|
3866
|
-
_extends$
|
|
5588
|
+
var _path$n;
|
|
5589
|
+
function _extends$n() {
|
|
5590
|
+
_extends$n = Object.assign || function(target) {
|
|
3867
5591
|
for (var i = 1; i < arguments.length; i++) {
|
|
3868
5592
|
var source = arguments[i];
|
|
3869
5593
|
for (var key in source) {
|
|
@@ -3874,14 +5598,14 @@ function _extends$m() {
|
|
|
3874
5598
|
}
|
|
3875
5599
|
return target;
|
|
3876
5600
|
};
|
|
3877
|
-
return _extends$
|
|
5601
|
+
return _extends$n.apply(this, arguments);
|
|
3878
5602
|
}
|
|
3879
5603
|
var SvgTimes16 = function SvgTimes162(props) {
|
|
3880
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$
|
|
5604
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$n({
|
|
3881
5605
|
width: 16,
|
|
3882
5606
|
height: 16,
|
|
3883
5607
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3884
|
-
}, props), _path$
|
|
5608
|
+
}, props), _path$n || (_path$n = /* @__PURE__ */ React.createElement("path", {
|
|
3885
5609
|
fillRule: "evenodd",
|
|
3886
5610
|
clipRule: "evenodd",
|
|
3887
5611
|
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"
|
|
@@ -3892,7 +5616,7 @@ const DropDownMenu = styled.div`
|
|
|
3892
5616
|
flex-direction: column;
|
|
3893
5617
|
padding: 8px;
|
|
3894
5618
|
`;
|
|
3895
|
-
const ButtonLink$1 = styled(Button)`
|
|
5619
|
+
const ButtonLink$1 = styled(Button$1)`
|
|
3896
5620
|
margin: 8px 0;
|
|
3897
5621
|
`;
|
|
3898
5622
|
const StyledLink$2 = styled(Link)`
|
|
@@ -3905,24 +5629,24 @@ const StyledLink$2 = styled(Link)`
|
|
|
3905
5629
|
color: ${color == null ? "black" : colorToString(color)};
|
|
3906
5630
|
`)}
|
|
3907
5631
|
`;
|
|
3908
|
-
function DropDownItem(
|
|
3909
|
-
var
|
|
5632
|
+
function DropDownItem(_W) {
|
|
5633
|
+
var _X = _W, {
|
|
3910
5634
|
color
|
|
3911
|
-
} =
|
|
5635
|
+
} = _X, restOfProps = __objRest(_X, [
|
|
3912
5636
|
"color"
|
|
3913
5637
|
]);
|
|
3914
5638
|
return /* @__PURE__ */ jsx(StyledLink$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3915
5639
|
color: useColor(color)
|
|
3916
5640
|
}));
|
|
3917
5641
|
}
|
|
3918
|
-
function MobileDropDownButton(
|
|
3919
|
-
var
|
|
5642
|
+
function MobileDropDownButton(_Y) {
|
|
5643
|
+
var _Z = _Y, {
|
|
3920
5644
|
label,
|
|
3921
5645
|
caret,
|
|
3922
5646
|
links: links2 = [],
|
|
3923
5647
|
onClose = () => {
|
|
3924
5648
|
}
|
|
3925
|
-
} =
|
|
5649
|
+
} = _Z, restOfProps = __objRest(_Z, [
|
|
3926
5650
|
"label",
|
|
3927
5651
|
"caret",
|
|
3928
5652
|
"links",
|
|
@@ -3964,10 +5688,10 @@ function MobileDropDownButton(_u) {
|
|
|
3964
5688
|
})]
|
|
3965
5689
|
});
|
|
3966
5690
|
}
|
|
3967
|
-
const ButtonLink = styled(Button)`
|
|
5691
|
+
const ButtonLink = styled(Button$1)`
|
|
3968
5692
|
margin: 8px 0;
|
|
3969
5693
|
`;
|
|
3970
|
-
const Container$
|
|
5694
|
+
const Container$3 = styled.div`
|
|
3971
5695
|
position: fixed;
|
|
3972
5696
|
flex-direction: column;
|
|
3973
5697
|
width: 100%;
|
|
@@ -4021,7 +5745,7 @@ function MobileMenu({
|
|
|
4021
5745
|
onClose = () => {
|
|
4022
5746
|
}
|
|
4023
5747
|
}) {
|
|
4024
|
-
return /* @__PURE__ */ jsxs(Container$
|
|
5748
|
+
return /* @__PURE__ */ jsxs(Container$3, {
|
|
4025
5749
|
animation,
|
|
4026
5750
|
backgroundColor: useColor(backgroundColor),
|
|
4027
5751
|
open,
|
|
@@ -4047,7 +5771,7 @@ function MobileMenu({
|
|
|
4047
5771
|
})]
|
|
4048
5772
|
});
|
|
4049
5773
|
}
|
|
4050
|
-
const Container$
|
|
5774
|
+
const Container$2 = styled.nav`
|
|
4051
5775
|
display: flex;
|
|
4052
5776
|
align-items: center;
|
|
4053
5777
|
${cssWidth()}
|
|
@@ -4104,7 +5828,7 @@ const Navigation = forwardRef(function Navigation2({
|
|
|
4104
5828
|
margin
|
|
4105
5829
|
}, ref) {
|
|
4106
5830
|
const [isOpen, setIsOpen] = useState(false);
|
|
4107
|
-
return /* @__PURE__ */ jsxs(Container$
|
|
5831
|
+
return /* @__PURE__ */ jsxs(Container$2, {
|
|
4108
5832
|
ref,
|
|
4109
5833
|
id,
|
|
4110
5834
|
margin,
|
|
@@ -4129,7 +5853,7 @@ const Navigation = forwardRef(function Navigation2({
|
|
|
4129
5853
|
gutter,
|
|
4130
5854
|
first: i === 0,
|
|
4131
5855
|
last: i === links2.length - 1,
|
|
4132
|
-
children: [link.type === "button" && /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({}, link.payload), {
|
|
5856
|
+
children: [link.type === "button" && /* @__PURE__ */ jsx(Button$1, __spreadProps(__spreadValues({}, link.payload), {
|
|
4133
5857
|
children: link.payload.label
|
|
4134
5858
|
})), link.type === "dropdown" && /* @__PURE__ */ jsx(DropDownButton, __spreadValues({}, link.payload))]
|
|
4135
5859
|
}, link.id)) : /* @__PURE__ */ jsx(LinksPlaceholder, {
|
|
@@ -4152,7 +5876,7 @@ const Navigation = forwardRef(function Navigation2({
|
|
|
4152
5876
|
})]
|
|
4153
5877
|
});
|
|
4154
5878
|
});
|
|
4155
|
-
function registerComponent$
|
|
5879
|
+
function registerComponent$4(runtime) {
|
|
4156
5880
|
return runtime.registerComponent(Navigation, {
|
|
4157
5881
|
type: "./components/Navigation/index.js",
|
|
4158
5882
|
label: "Navigation",
|
|
@@ -4163,7 +5887,7 @@ function registerComponent$3(runtime) {
|
|
|
4163
5887
|
linkTextStyle: TextStyle({
|
|
4164
5888
|
label: "Link text style"
|
|
4165
5889
|
}),
|
|
4166
|
-
showLogo: Checkbox({
|
|
5890
|
+
showLogo: Checkbox$1({
|
|
4167
5891
|
preset: true,
|
|
4168
5892
|
label: "Show logo"
|
|
4169
5893
|
}),
|
|
@@ -4256,7 +5980,7 @@ const PlaceholderBase = styled.div`
|
|
|
4256
5980
|
height: 80px;
|
|
4257
5981
|
padding: 8px;
|
|
4258
5982
|
`;
|
|
4259
|
-
var
|
|
5983
|
+
var Placeholder3 = forwardRef(function Placeholder4(props, ref) {
|
|
4260
5984
|
return /* @__PURE__ */ jsx(PlaceholderBase, __spreadProps(__spreadValues({}, props), {
|
|
4261
5985
|
ref,
|
|
4262
5986
|
children: /* @__PURE__ */ jsx("svg", {
|
|
@@ -4324,12 +6048,12 @@ const Root = forwardRef(function Page2({
|
|
|
4324
6048
|
children: /* @__PURE__ */ jsx(Element$1, {
|
|
4325
6049
|
element: child
|
|
4326
6050
|
})
|
|
4327
|
-
}, child.key)) : /* @__PURE__ */ jsx(
|
|
6051
|
+
}, child.key)) : /* @__PURE__ */ jsx(Placeholder3, {})
|
|
4328
6052
|
})
|
|
4329
6053
|
})]
|
|
4330
6054
|
});
|
|
4331
6055
|
});
|
|
4332
|
-
function registerComponent$
|
|
6056
|
+
function registerComponent$3(runtime) {
|
|
4333
6057
|
return runtime.registerComponent(Root, {
|
|
4334
6058
|
type: "./components/Root/index.js",
|
|
4335
6059
|
label: "Page",
|
|
@@ -4342,6 +6066,30 @@ function registerComponent$2(runtime) {
|
|
|
4342
6066
|
}
|
|
4343
6067
|
});
|
|
4344
6068
|
}
|
|
6069
|
+
var _path$m;
|
|
6070
|
+
function _extends$m() {
|
|
6071
|
+
_extends$m = Object.assign || function(target) {
|
|
6072
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
6073
|
+
var source = arguments[i];
|
|
6074
|
+
for (var key in source) {
|
|
6075
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
6076
|
+
target[key] = source[key];
|
|
6077
|
+
}
|
|
6078
|
+
}
|
|
6079
|
+
}
|
|
6080
|
+
return target;
|
|
6081
|
+
};
|
|
6082
|
+
return _extends$m.apply(this, arguments);
|
|
6083
|
+
}
|
|
6084
|
+
var SvgLogoAngellist20 = function SvgLogoAngellist202(props) {
|
|
6085
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$m({
|
|
6086
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6087
|
+
width: 20,
|
|
6088
|
+
height: 20
|
|
6089
|
+
}, props), _path$m || (_path$m = /* @__PURE__ */ React.createElement("path", {
|
|
6090
|
+
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"
|
|
6091
|
+
})));
|
|
6092
|
+
};
|
|
4345
6093
|
var _path$l;
|
|
4346
6094
|
function _extends$l() {
|
|
4347
6095
|
_extends$l = Object.assign || function(target) {
|
|
@@ -4357,13 +6105,13 @@ function _extends$l() {
|
|
|
4357
6105
|
};
|
|
4358
6106
|
return _extends$l.apply(this, arguments);
|
|
4359
6107
|
}
|
|
4360
|
-
var
|
|
6108
|
+
var SvgLogoCodepen20 = function SvgLogoCodepen202(props) {
|
|
4361
6109
|
return /* @__PURE__ */ React.createElement("svg", _extends$l({
|
|
4362
6110
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4363
6111
|
width: 20,
|
|
4364
6112
|
height: 20
|
|
4365
6113
|
}, props), _path$l || (_path$l = /* @__PURE__ */ React.createElement("path", {
|
|
4366
|
-
d: "
|
|
6114
|
+
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"
|
|
4367
6115
|
})));
|
|
4368
6116
|
};
|
|
4369
6117
|
var _path$k;
|
|
@@ -4381,13 +6129,13 @@ function _extends$k() {
|
|
|
4381
6129
|
};
|
|
4382
6130
|
return _extends$k.apply(this, arguments);
|
|
4383
6131
|
}
|
|
4384
|
-
var
|
|
6132
|
+
var SvgLogoDribbble20 = function SvgLogoDribbble202(props) {
|
|
4385
6133
|
return /* @__PURE__ */ React.createElement("svg", _extends$k({
|
|
4386
6134
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4387
6135
|
width: 20,
|
|
4388
6136
|
height: 20
|
|
4389
6137
|
}, props), _path$k || (_path$k = /* @__PURE__ */ React.createElement("path", {
|
|
4390
|
-
d: "
|
|
6138
|
+
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"
|
|
4391
6139
|
})));
|
|
4392
6140
|
};
|
|
4393
6141
|
var _path$j;
|
|
@@ -4405,13 +6153,13 @@ function _extends$j() {
|
|
|
4405
6153
|
};
|
|
4406
6154
|
return _extends$j.apply(this, arguments);
|
|
4407
6155
|
}
|
|
4408
|
-
var
|
|
6156
|
+
var SvgLogoFacebook20 = function SvgLogoFacebook202(props) {
|
|
4409
6157
|
return /* @__PURE__ */ React.createElement("svg", _extends$j({
|
|
4410
6158
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4411
6159
|
width: 20,
|
|
4412
6160
|
height: 20
|
|
4413
6161
|
}, props), _path$j || (_path$j = /* @__PURE__ */ React.createElement("path", {
|
|
4414
|
-
d: "
|
|
6162
|
+
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"
|
|
4415
6163
|
})));
|
|
4416
6164
|
};
|
|
4417
6165
|
var _path$i;
|
|
@@ -4429,13 +6177,13 @@ function _extends$i() {
|
|
|
4429
6177
|
};
|
|
4430
6178
|
return _extends$i.apply(this, arguments);
|
|
4431
6179
|
}
|
|
4432
|
-
var
|
|
6180
|
+
var SvgLogoGithub20 = function SvgLogoGithub202(props) {
|
|
4433
6181
|
return /* @__PURE__ */ React.createElement("svg", _extends$i({
|
|
4434
6182
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4435
6183
|
width: 20,
|
|
4436
6184
|
height: 20
|
|
4437
6185
|
}, props), _path$i || (_path$i = /* @__PURE__ */ React.createElement("path", {
|
|
4438
|
-
d: "
|
|
6186
|
+
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"
|
|
4439
6187
|
})));
|
|
4440
6188
|
};
|
|
4441
6189
|
var _path$h;
|
|
@@ -4453,13 +6201,13 @@ function _extends$h() {
|
|
|
4453
6201
|
};
|
|
4454
6202
|
return _extends$h.apply(this, arguments);
|
|
4455
6203
|
}
|
|
4456
|
-
var
|
|
6204
|
+
var SvgLogoInstagram20 = function SvgLogoInstagram202(props) {
|
|
4457
6205
|
return /* @__PURE__ */ React.createElement("svg", _extends$h({
|
|
4458
6206
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4459
6207
|
width: 20,
|
|
4460
6208
|
height: 20
|
|
4461
6209
|
}, props), _path$h || (_path$h = /* @__PURE__ */ React.createElement("path", {
|
|
4462
|
-
d: "
|
|
6210
|
+
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"
|
|
4463
6211
|
})));
|
|
4464
6212
|
};
|
|
4465
6213
|
var _path$g;
|
|
@@ -4477,13 +6225,13 @@ function _extends$g() {
|
|
|
4477
6225
|
};
|
|
4478
6226
|
return _extends$g.apply(this, arguments);
|
|
4479
6227
|
}
|
|
4480
|
-
var
|
|
6228
|
+
var SvgLogoLinkedin20 = function SvgLogoLinkedin202(props) {
|
|
4481
6229
|
return /* @__PURE__ */ React.createElement("svg", _extends$g({
|
|
4482
6230
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4483
6231
|
width: 20,
|
|
4484
6232
|
height: 20
|
|
4485
6233
|
}, props), _path$g || (_path$g = /* @__PURE__ */ React.createElement("path", {
|
|
4486
|
-
d: "
|
|
6234
|
+
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"
|
|
4487
6235
|
})));
|
|
4488
6236
|
};
|
|
4489
6237
|
var _path$f;
|
|
@@ -4501,13 +6249,13 @@ function _extends$f() {
|
|
|
4501
6249
|
};
|
|
4502
6250
|
return _extends$f.apply(this, arguments);
|
|
4503
6251
|
}
|
|
4504
|
-
var
|
|
6252
|
+
var SvgLogoMedium20 = function SvgLogoMedium202(props) {
|
|
4505
6253
|
return /* @__PURE__ */ React.createElement("svg", _extends$f({
|
|
4506
6254
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4507
6255
|
width: 20,
|
|
4508
6256
|
height: 20
|
|
4509
6257
|
}, props), _path$f || (_path$f = /* @__PURE__ */ React.createElement("path", {
|
|
4510
|
-
d: "
|
|
6258
|
+
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"
|
|
4511
6259
|
})));
|
|
4512
6260
|
};
|
|
4513
6261
|
var _path$e;
|
|
@@ -4525,13 +6273,13 @@ function _extends$e() {
|
|
|
4525
6273
|
};
|
|
4526
6274
|
return _extends$e.apply(this, arguments);
|
|
4527
6275
|
}
|
|
4528
|
-
var
|
|
6276
|
+
var SvgLogoPinterest20 = function SvgLogoPinterest202(props) {
|
|
4529
6277
|
return /* @__PURE__ */ React.createElement("svg", _extends$e({
|
|
4530
6278
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4531
6279
|
width: 20,
|
|
4532
6280
|
height: 20
|
|
4533
6281
|
}, props), _path$e || (_path$e = /* @__PURE__ */ React.createElement("path", {
|
|
4534
|
-
d: "
|
|
6282
|
+
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"
|
|
4535
6283
|
})));
|
|
4536
6284
|
};
|
|
4537
6285
|
var _path$d;
|
|
@@ -4549,13 +6297,13 @@ function _extends$d() {
|
|
|
4549
6297
|
};
|
|
4550
6298
|
return _extends$d.apply(this, arguments);
|
|
4551
6299
|
}
|
|
4552
|
-
var
|
|
6300
|
+
var SvgLogoReddit20 = function SvgLogoReddit202(props) {
|
|
4553
6301
|
return /* @__PURE__ */ React.createElement("svg", _extends$d({
|
|
4554
6302
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4555
6303
|
width: 20,
|
|
4556
6304
|
height: 20
|
|
4557
6305
|
}, props), _path$d || (_path$d = /* @__PURE__ */ React.createElement("path", {
|
|
4558
|
-
d: "
|
|
6306
|
+
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"
|
|
4559
6307
|
})));
|
|
4560
6308
|
};
|
|
4561
6309
|
var _path$c;
|
|
@@ -4573,13 +6321,13 @@ function _extends$c() {
|
|
|
4573
6321
|
};
|
|
4574
6322
|
return _extends$c.apply(this, arguments);
|
|
4575
6323
|
}
|
|
4576
|
-
var
|
|
6324
|
+
var SvgLogoRss20 = function SvgLogoRss202(props) {
|
|
4577
6325
|
return /* @__PURE__ */ React.createElement("svg", _extends$c({
|
|
4578
6326
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4579
6327
|
width: 20,
|
|
4580
6328
|
height: 20
|
|
4581
6329
|
}, props), _path$c || (_path$c = /* @__PURE__ */ React.createElement("path", {
|
|
4582
|
-
d: "
|
|
6330
|
+
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"
|
|
4583
6331
|
})));
|
|
4584
6332
|
};
|
|
4585
6333
|
var _path$b;
|
|
@@ -4597,13 +6345,13 @@ function _extends$b() {
|
|
|
4597
6345
|
};
|
|
4598
6346
|
return _extends$b.apply(this, arguments);
|
|
4599
6347
|
}
|
|
4600
|
-
var
|
|
6348
|
+
var SvgLogoSnapchat20 = function SvgLogoSnapchat202(props) {
|
|
4601
6349
|
return /* @__PURE__ */ React.createElement("svg", _extends$b({
|
|
4602
6350
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4603
6351
|
width: 20,
|
|
4604
6352
|
height: 20
|
|
4605
6353
|
}, props), _path$b || (_path$b = /* @__PURE__ */ React.createElement("path", {
|
|
4606
|
-
d: "
|
|
6354
|
+
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"
|
|
4607
6355
|
})));
|
|
4608
6356
|
};
|
|
4609
6357
|
var _path$a;
|
|
@@ -4621,13 +6369,13 @@ function _extends$a() {
|
|
|
4621
6369
|
};
|
|
4622
6370
|
return _extends$a.apply(this, arguments);
|
|
4623
6371
|
}
|
|
4624
|
-
var
|
|
6372
|
+
var SvgLogoSoundcloud20 = function SvgLogoSoundcloud202(props) {
|
|
4625
6373
|
return /* @__PURE__ */ React.createElement("svg", _extends$a({
|
|
4626
6374
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4627
6375
|
width: 20,
|
|
4628
6376
|
height: 20
|
|
4629
6377
|
}, props), _path$a || (_path$a = /* @__PURE__ */ React.createElement("path", {
|
|
4630
|
-
d: "
|
|
6378
|
+
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"
|
|
4631
6379
|
})));
|
|
4632
6380
|
};
|
|
4633
6381
|
var _path$9;
|
|
@@ -4645,13 +6393,13 @@ function _extends$9() {
|
|
|
4645
6393
|
};
|
|
4646
6394
|
return _extends$9.apply(this, arguments);
|
|
4647
6395
|
}
|
|
4648
|
-
var
|
|
6396
|
+
var SvgLogoSpotify20 = function SvgLogoSpotify202(props) {
|
|
4649
6397
|
return /* @__PURE__ */ React.createElement("svg", _extends$9({
|
|
4650
6398
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4651
6399
|
width: 20,
|
|
4652
6400
|
height: 20
|
|
4653
6401
|
}, props), _path$9 || (_path$9 = /* @__PURE__ */ React.createElement("path", {
|
|
4654
|
-
d: "
|
|
6402
|
+
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"
|
|
4655
6403
|
})));
|
|
4656
6404
|
};
|
|
4657
6405
|
var _path$8;
|
|
@@ -4669,13 +6417,13 @@ function _extends$8() {
|
|
|
4669
6417
|
};
|
|
4670
6418
|
return _extends$8.apply(this, arguments);
|
|
4671
6419
|
}
|
|
4672
|
-
var
|
|
6420
|
+
var SvgLogoTelegram20 = function SvgLogoTelegram202(props) {
|
|
4673
6421
|
return /* @__PURE__ */ React.createElement("svg", _extends$8({
|
|
4674
6422
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4675
6423
|
width: 20,
|
|
4676
6424
|
height: 20
|
|
4677
6425
|
}, props), _path$8 || (_path$8 = /* @__PURE__ */ React.createElement("path", {
|
|
4678
|
-
d: "
|
|
6426
|
+
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"
|
|
4679
6427
|
})));
|
|
4680
6428
|
};
|
|
4681
6429
|
var _path$7;
|
|
@@ -4693,13 +6441,13 @@ function _extends$7() {
|
|
|
4693
6441
|
};
|
|
4694
6442
|
return _extends$7.apply(this, arguments);
|
|
4695
6443
|
}
|
|
4696
|
-
var
|
|
6444
|
+
var SvgLogoTumblr20 = function SvgLogoTumblr202(props) {
|
|
4697
6445
|
return /* @__PURE__ */ React.createElement("svg", _extends$7({
|
|
4698
6446
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4699
6447
|
width: 20,
|
|
4700
6448
|
height: 20
|
|
4701
6449
|
}, props), _path$7 || (_path$7 = /* @__PURE__ */ React.createElement("path", {
|
|
4702
|
-
d: "
|
|
6450
|
+
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"
|
|
4703
6451
|
})));
|
|
4704
6452
|
};
|
|
4705
6453
|
var _path$6;
|
|
@@ -4717,13 +6465,13 @@ function _extends$6() {
|
|
|
4717
6465
|
};
|
|
4718
6466
|
return _extends$6.apply(this, arguments);
|
|
4719
6467
|
}
|
|
4720
|
-
var
|
|
6468
|
+
var SvgLogoTwitch20 = function SvgLogoTwitch202(props) {
|
|
4721
6469
|
return /* @__PURE__ */ React.createElement("svg", _extends$6({
|
|
4722
6470
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4723
6471
|
width: 20,
|
|
4724
6472
|
height: 20
|
|
4725
6473
|
}, props), _path$6 || (_path$6 = /* @__PURE__ */ React.createElement("path", {
|
|
4726
|
-
d: "
|
|
6474
|
+
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"
|
|
4727
6475
|
})));
|
|
4728
6476
|
};
|
|
4729
6477
|
var _path$5;
|
|
@@ -4741,13 +6489,13 @@ function _extends$5() {
|
|
|
4741
6489
|
};
|
|
4742
6490
|
return _extends$5.apply(this, arguments);
|
|
4743
6491
|
}
|
|
4744
|
-
var
|
|
6492
|
+
var SvgLogoTwitter20 = function SvgLogoTwitter202(props) {
|
|
4745
6493
|
return /* @__PURE__ */ React.createElement("svg", _extends$5({
|
|
4746
6494
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4747
6495
|
width: 20,
|
|
4748
6496
|
height: 20
|
|
4749
6497
|
}, props), _path$5 || (_path$5 = /* @__PURE__ */ React.createElement("path", {
|
|
4750
|
-
d: "
|
|
6498
|
+
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"
|
|
4751
6499
|
})));
|
|
4752
6500
|
};
|
|
4753
6501
|
var _path$4;
|
|
@@ -4765,13 +6513,13 @@ function _extends$4() {
|
|
|
4765
6513
|
};
|
|
4766
6514
|
return _extends$4.apply(this, arguments);
|
|
4767
6515
|
}
|
|
4768
|
-
var
|
|
6516
|
+
var SvgLogoWhatsapp20 = function SvgLogoWhatsapp202(props) {
|
|
4769
6517
|
return /* @__PURE__ */ React.createElement("svg", _extends$4({
|
|
4770
6518
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4771
6519
|
width: 20,
|
|
4772
6520
|
height: 20
|
|
4773
6521
|
}, props), _path$4 || (_path$4 = /* @__PURE__ */ React.createElement("path", {
|
|
4774
|
-
d: "
|
|
6522
|
+
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"
|
|
4775
6523
|
})));
|
|
4776
6524
|
};
|
|
4777
6525
|
var _path$3;
|
|
@@ -4789,13 +6537,13 @@ function _extends$3() {
|
|
|
4789
6537
|
};
|
|
4790
6538
|
return _extends$3.apply(this, arguments);
|
|
4791
6539
|
}
|
|
4792
|
-
var
|
|
6540
|
+
var SvgLogoVimeo20 = function SvgLogoVimeo202(props) {
|
|
4793
6541
|
return /* @__PURE__ */ React.createElement("svg", _extends$3({
|
|
4794
6542
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4795
6543
|
width: 20,
|
|
4796
6544
|
height: 20
|
|
4797
6545
|
}, props), _path$3 || (_path$3 = /* @__PURE__ */ React.createElement("path", {
|
|
4798
|
-
d: "
|
|
6546
|
+
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"
|
|
4799
6547
|
})));
|
|
4800
6548
|
};
|
|
4801
6549
|
var _path$2;
|
|
@@ -4813,13 +6561,13 @@ function _extends$2() {
|
|
|
4813
6561
|
};
|
|
4814
6562
|
return _extends$2.apply(this, arguments);
|
|
4815
6563
|
}
|
|
4816
|
-
var
|
|
6564
|
+
var SvgLogoYelp20 = function SvgLogoYelp202(props) {
|
|
4817
6565
|
return /* @__PURE__ */ React.createElement("svg", _extends$2({
|
|
4818
6566
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4819
6567
|
width: 20,
|
|
4820
6568
|
height: 20
|
|
4821
6569
|
}, props), _path$2 || (_path$2 = /* @__PURE__ */ React.createElement("path", {
|
|
4822
|
-
d: "
|
|
6570
|
+
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"
|
|
4823
6571
|
})));
|
|
4824
6572
|
};
|
|
4825
6573
|
var _path$1;
|
|
@@ -4837,36 +6585,12 @@ function _extends$1() {
|
|
|
4837
6585
|
};
|
|
4838
6586
|
return _extends$1.apply(this, arguments);
|
|
4839
6587
|
}
|
|
4840
|
-
var
|
|
6588
|
+
var SvgLogoYoutube20 = function SvgLogoYoutube202(props) {
|
|
4841
6589
|
return /* @__PURE__ */ React.createElement("svg", _extends$1({
|
|
4842
6590
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4843
6591
|
width: 20,
|
|
4844
6592
|
height: 20
|
|
4845
6593
|
}, props), _path$1 || (_path$1 = /* @__PURE__ */ React.createElement("path", {
|
|
4846
|
-
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"
|
|
4847
|
-
})));
|
|
4848
|
-
};
|
|
4849
|
-
var _path;
|
|
4850
|
-
function _extends() {
|
|
4851
|
-
_extends = Object.assign || function(target) {
|
|
4852
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
4853
|
-
var source = arguments[i];
|
|
4854
|
-
for (var key in source) {
|
|
4855
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
4856
|
-
target[key] = source[key];
|
|
4857
|
-
}
|
|
4858
|
-
}
|
|
4859
|
-
}
|
|
4860
|
-
return target;
|
|
4861
|
-
};
|
|
4862
|
-
return _extends.apply(this, arguments);
|
|
4863
|
-
}
|
|
4864
|
-
var SvgLogoYoutube20 = function SvgLogoYoutube202(props) {
|
|
4865
|
-
return /* @__PURE__ */ React.createElement("svg", _extends({
|
|
4866
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4867
|
-
width: 20,
|
|
4868
|
-
height: 20
|
|
4869
|
-
}, props), _path || (_path = /* @__PURE__ */ React.createElement("path", {
|
|
4870
6594
|
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"
|
|
4871
6595
|
})));
|
|
4872
6596
|
};
|
|
@@ -5006,7 +6730,7 @@ function SocialLinksPlaceholder({
|
|
|
5006
6730
|
}, link.id))
|
|
5007
6731
|
});
|
|
5008
6732
|
}
|
|
5009
|
-
const Container = styled.div`
|
|
6733
|
+
const Container$1 = styled.div`
|
|
5010
6734
|
display: flex;
|
|
5011
6735
|
flex-direction: row;
|
|
5012
6736
|
flex-wrap: wrap;
|
|
@@ -5090,7 +6814,7 @@ const SocialLinks = forwardRef(function SocialLinks2({
|
|
|
5090
6814
|
}, ref) {
|
|
5091
6815
|
const fillData = useColor(fill);
|
|
5092
6816
|
const backgroundColorData = useColor(backgroundColor);
|
|
5093
|
-
return /* @__PURE__ */ jsx(Container, {
|
|
6817
|
+
return /* @__PURE__ */ jsx(Container$1, {
|
|
5094
6818
|
ref,
|
|
5095
6819
|
id,
|
|
5096
6820
|
alignment,
|
|
@@ -5126,7 +6850,7 @@ const SocialLinks = forwardRef(function SocialLinks2({
|
|
|
5126
6850
|
})
|
|
5127
6851
|
});
|
|
5128
6852
|
});
|
|
5129
|
-
function registerComponent$
|
|
6853
|
+
function registerComponent$2(runtime) {
|
|
5130
6854
|
return runtime.registerComponent(SocialLinks, {
|
|
5131
6855
|
type: "./components/SocialLinks/index.js",
|
|
5132
6856
|
label: "Social Links",
|
|
@@ -5374,10 +7098,10 @@ const Span = styled.span`
|
|
|
5374
7098
|
`}
|
|
5375
7099
|
`, shallowMergeFallbacks)}
|
|
5376
7100
|
`;
|
|
5377
|
-
function Mark(
|
|
5378
|
-
var
|
|
7101
|
+
function Mark(__) {
|
|
7102
|
+
var _$ = __, {
|
|
5379
7103
|
value
|
|
5380
|
-
} =
|
|
7104
|
+
} = _$, restOfProps = __objRest(_$, [
|
|
5381
7105
|
"value"
|
|
5382
7106
|
]);
|
|
5383
7107
|
const typographyStyle = useTypographyMark(value);
|
|
@@ -5415,10 +7139,10 @@ const StyledBlock = styled.div`
|
|
|
5415
7139
|
border-left: 5px solid rgba(0, 0, 0, 0.1);
|
|
5416
7140
|
` : ""}
|
|
5417
7141
|
`;
|
|
5418
|
-
var Block = forwardRef(function Block2(
|
|
5419
|
-
var
|
|
7142
|
+
var Block = forwardRef(function Block2(_aa, ref) {
|
|
7143
|
+
var _ba = _aa, {
|
|
5420
7144
|
textAlign
|
|
5421
|
-
} =
|
|
7145
|
+
} = _ba, restOfProps = __objRest(_ba, [
|
|
5422
7146
|
"textAlign"
|
|
5423
7147
|
]);
|
|
5424
7148
|
return /* @__PURE__ */ jsx(StyledBlock, __spreadProps(__spreadValues({}, restOfProps), {
|
|
@@ -5543,10 +7267,10 @@ function Inlines() {
|
|
|
5543
7267
|
}
|
|
5544
7268
|
};
|
|
5545
7269
|
}
|
|
5546
|
-
const RichTextEditor = styled(forwardRef(function RichTextEditor2(
|
|
5547
|
-
var
|
|
7270
|
+
const RichTextEditor = styled(forwardRef(function RichTextEditor2(_ca, ref) {
|
|
7271
|
+
var _da = _ca, {
|
|
5548
7272
|
placeholder: placeholder2 = "Write some text..."
|
|
5549
|
-
} =
|
|
7273
|
+
} = _da, restOfProps = __objRest(_da, [
|
|
5550
7274
|
"placeholder"
|
|
5551
7275
|
]);
|
|
5552
7276
|
const plugins = useMemo(() => [Lists(), LinkPlugin(), Inlines(), DeviceOverridesBlockPlugin(), DeviceOverridesMarksPlugin()], []);
|
|
@@ -5663,7 +7387,7 @@ const Text = forwardRef(function Text2({
|
|
|
5663
7387
|
onKeyDown: handleKeyDown
|
|
5664
7388
|
});
|
|
5665
7389
|
});
|
|
5666
|
-
function registerComponent(runtime) {
|
|
7390
|
+
function registerComponent$1(runtime) {
|
|
5667
7391
|
return runtime.registerComponent(Text, {
|
|
5668
7392
|
type: "./components/Text/index.js",
|
|
5669
7393
|
label: "Text",
|
|
@@ -5741,18 +7465,103 @@ function registerComponent(runtime) {
|
|
|
5741
7465
|
}
|
|
5742
7466
|
});
|
|
5743
7467
|
}
|
|
7468
|
+
const Container = styled.div`
|
|
7469
|
+
display: flex;
|
|
7470
|
+
flex-direction: column;
|
|
7471
|
+
overflow: hidden;
|
|
7472
|
+
${cssWidth("560px")}
|
|
7473
|
+
${cssMargin()}
|
|
7474
|
+
${cssBorderRadius()}
|
|
7475
|
+
`;
|
|
7476
|
+
const ASPECT_RATIO = 16 / 9;
|
|
7477
|
+
const Video = forwardRef(function Video2({
|
|
7478
|
+
id,
|
|
7479
|
+
video,
|
|
7480
|
+
width,
|
|
7481
|
+
margin,
|
|
7482
|
+
borderRadius
|
|
7483
|
+
}, ref) {
|
|
7484
|
+
const canPlayUrl = video && video.url != null && ReactPlayer.canPlay(video.url);
|
|
7485
|
+
return /* @__PURE__ */ jsx(Container, {
|
|
7486
|
+
ref,
|
|
7487
|
+
id,
|
|
7488
|
+
width,
|
|
7489
|
+
margin,
|
|
7490
|
+
borderRadius,
|
|
7491
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
7492
|
+
style: {
|
|
7493
|
+
position: "relative",
|
|
7494
|
+
paddingTop: `${100 / ASPECT_RATIO}%`
|
|
7495
|
+
},
|
|
7496
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
7497
|
+
style: {
|
|
7498
|
+
position: "absolute",
|
|
7499
|
+
top: 0,
|
|
7500
|
+
left: 0,
|
|
7501
|
+
right: 0,
|
|
7502
|
+
bottom: 0
|
|
7503
|
+
},
|
|
7504
|
+
children: canPlayUrl === true ? /* @__PURE__ */ jsx(ReactPlayer, __spreadProps(__spreadValues({}, video), {
|
|
7505
|
+
width: "100%",
|
|
7506
|
+
height: "100%",
|
|
7507
|
+
config: {
|
|
7508
|
+
vimeo: {
|
|
7509
|
+
playerOptions: {
|
|
7510
|
+
background: video != null && !video.controls
|
|
7511
|
+
}
|
|
7512
|
+
},
|
|
7513
|
+
wistia: {
|
|
7514
|
+
options: {
|
|
7515
|
+
endVideoBehavior: video != null && video.loop === true ? "loop" : "default"
|
|
7516
|
+
}
|
|
7517
|
+
}
|
|
7518
|
+
}
|
|
7519
|
+
})) : /* @__PURE__ */ jsx("img", {
|
|
7520
|
+
width: "100%",
|
|
7521
|
+
src: placeholders.video.src,
|
|
7522
|
+
alt: "Video Placeholder"
|
|
7523
|
+
})
|
|
7524
|
+
})
|
|
7525
|
+
})
|
|
7526
|
+
});
|
|
7527
|
+
});
|
|
7528
|
+
function registerComponent(runtime) {
|
|
7529
|
+
return runtime.registerComponent(Video, {
|
|
7530
|
+
type: "./components/Video/index.js",
|
|
7531
|
+
label: "Video",
|
|
7532
|
+
icon: "Video40",
|
|
7533
|
+
props: {
|
|
7534
|
+
id: ElementID(),
|
|
7535
|
+
video: Video$1({
|
|
7536
|
+
preset: {
|
|
7537
|
+
controls: true
|
|
7538
|
+
}
|
|
7539
|
+
}),
|
|
7540
|
+
width: Width({
|
|
7541
|
+
defaultValue: {
|
|
7542
|
+
value: 560,
|
|
7543
|
+
unit: "px"
|
|
7544
|
+
}
|
|
7545
|
+
}),
|
|
7546
|
+
margin: Margin(),
|
|
7547
|
+
borderRadius: BorderRadius()
|
|
7548
|
+
}
|
|
7549
|
+
});
|
|
7550
|
+
}
|
|
5744
7551
|
function registerBuiltinComponents(runtime) {
|
|
5745
|
-
const unregisterBoxComponent = registerComponent$
|
|
5746
|
-
const unregisterButtonComponent = registerComponent$
|
|
5747
|
-
const unregisterCarouselComponent = registerComponent$
|
|
5748
|
-
const unregisterCountdownComponent = registerComponent$
|
|
5749
|
-
const unregisterDividerComponent = registerComponent$
|
|
5750
|
-
const unregisterEmbedComponent = registerComponent$
|
|
5751
|
-
const
|
|
5752
|
-
const
|
|
5753
|
-
const
|
|
5754
|
-
const
|
|
5755
|
-
const
|
|
7552
|
+
const unregisterBoxComponent = registerComponent$c(runtime);
|
|
7553
|
+
const unregisterButtonComponent = registerComponent$b(runtime);
|
|
7554
|
+
const unregisterCarouselComponent = registerComponent$9(runtime);
|
|
7555
|
+
const unregisterCountdownComponent = registerComponent$8(runtime);
|
|
7556
|
+
const unregisterDividerComponent = registerComponent$7(runtime);
|
|
7557
|
+
const unregisterEmbedComponent = registerComponent$6(runtime);
|
|
7558
|
+
const unregisterFormComponent = registerComponent$5(runtime);
|
|
7559
|
+
const unregisterImageComponent = registerComponent$a(runtime);
|
|
7560
|
+
const unregisterNavigationComponent = registerComponent$4(runtime);
|
|
7561
|
+
const unregisterRootComponent = registerComponent$3(runtime);
|
|
7562
|
+
const unregisterSocialLinksComponent = registerComponent$2(runtime);
|
|
7563
|
+
const unregisterTextComponent = registerComponent$1(runtime);
|
|
7564
|
+
const unregisterVideoComponent = registerComponent(runtime);
|
|
5756
7565
|
return () => {
|
|
5757
7566
|
unregisterBoxComponent();
|
|
5758
7567
|
unregisterButtonComponent();
|
|
@@ -5760,13 +7569,66 @@ function registerBuiltinComponents(runtime) {
|
|
|
5760
7569
|
unregisterCountdownComponent();
|
|
5761
7570
|
unregisterDividerComponent();
|
|
5762
7571
|
unregisterEmbedComponent();
|
|
7572
|
+
unregisterFormComponent();
|
|
5763
7573
|
unregisterImageComponent();
|
|
5764
7574
|
unregisterNavigationComponent();
|
|
5765
7575
|
unregisterRootComponent();
|
|
5766
7576
|
unregisterSocialLinksComponent();
|
|
5767
7577
|
unregisterTextComponent();
|
|
7578
|
+
unregisterTextComponent();
|
|
7579
|
+
unregisterVideoComponent();
|
|
7580
|
+
};
|
|
7581
|
+
}
|
|
7582
|
+
var _path;
|
|
7583
|
+
function _extends() {
|
|
7584
|
+
_extends = Object.assign || function(target) {
|
|
7585
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
7586
|
+
var source = arguments[i];
|
|
7587
|
+
for (var key in source) {
|
|
7588
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7589
|
+
target[key] = source[key];
|
|
7590
|
+
}
|
|
7591
|
+
}
|
|
7592
|
+
}
|
|
7593
|
+
return target;
|
|
5768
7594
|
};
|
|
7595
|
+
return _extends.apply(this, arguments);
|
|
5769
7596
|
}
|
|
7597
|
+
var SvgWarning20 = function SvgWarning202(props) {
|
|
7598
|
+
return /* @__PURE__ */ React.createElement("svg", _extends({
|
|
7599
|
+
width: 20,
|
|
7600
|
+
height: 20,
|
|
7601
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
7602
|
+
}, props), _path || (_path = /* @__PURE__ */ React.createElement("path", {
|
|
7603
|
+
fillRule: "evenodd",
|
|
7604
|
+
clipRule: "evenodd",
|
|
7605
|
+
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"
|
|
7606
|
+
})));
|
|
7607
|
+
};
|
|
7608
|
+
const ErrorDiv = styled("div")`
|
|
7609
|
+
width: 100%;
|
|
7610
|
+
height: 54px;
|
|
7611
|
+
background-color: #fcedf2;
|
|
7612
|
+
border-radius: 6px;
|
|
7613
|
+
padding: 16px;
|
|
7614
|
+
display: flex;
|
|
7615
|
+
align-items: center;
|
|
7616
|
+
gap: 8px;
|
|
7617
|
+
color: #c73e6d;
|
|
7618
|
+
fill: currentColor;
|
|
7619
|
+
font-family: Heebo, sans-serif;
|
|
7620
|
+
font-size: 16px;
|
|
7621
|
+
`;
|
|
7622
|
+
const FallbackComponent = forwardRef(function FallbackComponent2({
|
|
7623
|
+
text
|
|
7624
|
+
}, ref) {
|
|
7625
|
+
return /* @__PURE__ */ jsxs(ErrorDiv, {
|
|
7626
|
+
ref,
|
|
7627
|
+
children: [/* @__PURE__ */ jsx(SvgWarning20, {}), /* @__PURE__ */ jsx("span", {
|
|
7628
|
+
children: text
|
|
7629
|
+
})]
|
|
7630
|
+
});
|
|
7631
|
+
});
|
|
5770
7632
|
const contextDefaultValue = configureStore();
|
|
5771
7633
|
function createReactRuntime(store) {
|
|
5772
7634
|
return {
|
|
@@ -5793,10 +7655,9 @@ function createReactRuntime(store) {
|
|
|
5793
7655
|
const ReactRuntime = createReactRuntime(contextDefaultValue);
|
|
5794
7656
|
const Context = createContext(contextDefaultValue);
|
|
5795
7657
|
function RuntimeProvider({
|
|
7658
|
+
client,
|
|
5796
7659
|
children,
|
|
5797
|
-
defaultRootElements
|
|
5798
|
-
registerComponents,
|
|
5799
|
-
makeswiftApiEndpoint
|
|
7660
|
+
defaultRootElements
|
|
5800
7661
|
}) {
|
|
5801
7662
|
const [store, setStore] = useState(() => {
|
|
5802
7663
|
const store2 = configureStore({
|
|
@@ -5805,27 +7666,11 @@ function RuntimeProvider({
|
|
|
5805
7666
|
});
|
|
5806
7667
|
const runtime = createReactRuntime(store2);
|
|
5807
7668
|
registerBuiltinComponents(runtime);
|
|
5808
|
-
registerComponents == null ? void 0 : registerComponents(runtime);
|
|
5809
7669
|
return store2;
|
|
5810
7670
|
});
|
|
5811
|
-
const [client, setClient] = useState(new ApolloClient({
|
|
5812
|
-
uri: makeswiftApiEndpoint,
|
|
5813
|
-
cache: new InMemoryCache()
|
|
5814
|
-
}));
|
|
5815
|
-
useEffect(() => {
|
|
5816
|
-
setClient(({
|
|
5817
|
-
cache
|
|
5818
|
-
}) => new ApolloClient({
|
|
5819
|
-
uri: makeswiftApiEndpoint,
|
|
5820
|
-
cache
|
|
5821
|
-
}));
|
|
5822
|
-
}, [makeswiftApiEndpoint]);
|
|
5823
7671
|
useEffect(() => {
|
|
5824
7672
|
return registerBuiltinComponents(createReactRuntime(store));
|
|
5825
7673
|
}, [store]);
|
|
5826
|
-
useEffect(() => {
|
|
5827
|
-
return registerComponents == null ? void 0 : registerComponents(createReactRuntime(store));
|
|
5828
|
-
}, [store, registerComponents]);
|
|
5829
7674
|
useEffect(() => {
|
|
5830
7675
|
const isInBuilder = window.parent !== window;
|
|
5831
7676
|
if (isInBuilder)
|
|
@@ -5834,7 +7679,7 @@ function RuntimeProvider({
|
|
|
5834
7679
|
const ReactBuilderPreview = await import("./react-builder-preview.es.js");
|
|
5835
7680
|
setStore((store2) => ReactBuilderPreview.configureStore({
|
|
5836
7681
|
preloadedState: store2.getState(),
|
|
5837
|
-
client
|
|
7682
|
+
client: client.apolloClient
|
|
5838
7683
|
}));
|
|
5839
7684
|
}
|
|
5840
7685
|
}, [client]);
|
|
@@ -5861,12 +7706,31 @@ function RuntimeProvider({
|
|
|
5861
7706
|
}, []);
|
|
5862
7707
|
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
5863
7708
|
value: store,
|
|
5864
|
-
children: /* @__PURE__ */ jsx(
|
|
7709
|
+
children: /* @__PURE__ */ jsx(MakeswiftProvider, {
|
|
5865
7710
|
client,
|
|
5866
7711
|
children
|
|
5867
7712
|
})
|
|
5868
7713
|
});
|
|
5869
7714
|
}
|
|
7715
|
+
const PageContext = createContext(null);
|
|
7716
|
+
function usePageIdOrNull() {
|
|
7717
|
+
return useContext(PageContext);
|
|
7718
|
+
}
|
|
7719
|
+
function usePageId() {
|
|
7720
|
+
const pageIdOrNull = usePageIdOrNull();
|
|
7721
|
+
if (pageIdOrNull == null)
|
|
7722
|
+
throw new Error("`usePageId` must be used with `<PageProvider>`");
|
|
7723
|
+
return pageIdOrNull;
|
|
7724
|
+
}
|
|
7725
|
+
function PageProvider({
|
|
7726
|
+
id,
|
|
7727
|
+
children
|
|
7728
|
+
}) {
|
|
7729
|
+
return /* @__PURE__ */ jsx(PageContext.Provider, {
|
|
7730
|
+
value: id,
|
|
7731
|
+
children
|
|
7732
|
+
});
|
|
7733
|
+
}
|
|
5870
7734
|
const DocumentContext = createContext(null);
|
|
5871
7735
|
function useDocumentKey() {
|
|
5872
7736
|
return useContext(DocumentContext);
|
|
@@ -5882,8 +7746,8 @@ function useElementId(elementKey) {
|
|
|
5882
7746
|
const documentKey = useDocumentKey();
|
|
5883
7747
|
return useSelector((state) => documentKey == null || elementKey == null ? null : getElementId(state, documentKey, elementKey));
|
|
5884
7748
|
}
|
|
5885
|
-
function
|
|
5886
|
-
return useSelector((state) =>
|
|
7749
|
+
function useDocument(documentKey) {
|
|
7750
|
+
return useSelector((state) => getDocument(state, documentKey));
|
|
5887
7751
|
}
|
|
5888
7752
|
function useIsInBuilder() {
|
|
5889
7753
|
return useSelector((state) => getIsInBuilder(state));
|
|
@@ -5897,15 +7761,9 @@ const ElementData = memo(forwardRef(function ElementData2({
|
|
|
5897
7761
|
}, ref) {
|
|
5898
7762
|
const Component = useComponent(elementData.type);
|
|
5899
7763
|
if (Component == null) {
|
|
5900
|
-
return /* @__PURE__ */
|
|
7764
|
+
return /* @__PURE__ */ jsx(FallbackComponent, {
|
|
5901
7765
|
ref,
|
|
5902
|
-
|
|
5903
|
-
children: "Component Not Found"
|
|
5904
|
-
}), /* @__PURE__ */ jsx("pre", {
|
|
5905
|
-
children: /* @__PURE__ */ jsx("code", {
|
|
5906
|
-
children: JSON.stringify(elementData, null, 2)
|
|
5907
|
-
})
|
|
5908
|
-
})]
|
|
7766
|
+
text: "Component not found"
|
|
5909
7767
|
});
|
|
5910
7768
|
}
|
|
5911
7769
|
return /* @__PURE__ */ createElement(Component, __spreadProps(__spreadValues({}, elementData.props), {
|
|
@@ -5916,24 +7774,52 @@ const ElementData = memo(forwardRef(function ElementData2({
|
|
|
5916
7774
|
const ElementReference = memo(forwardRef(function ElementReference2({
|
|
5917
7775
|
elementReference
|
|
5918
7776
|
}, ref) {
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
7777
|
+
var _a;
|
|
7778
|
+
const {
|
|
7779
|
+
error,
|
|
7780
|
+
data
|
|
7781
|
+
} = useQuery(gql`
|
|
7782
|
+
query ElementReferenceGlobalElement($id: ID!) {
|
|
7783
|
+
globalElement(id: $id) {
|
|
7784
|
+
id
|
|
7785
|
+
data
|
|
7786
|
+
}
|
|
7787
|
+
}
|
|
7788
|
+
`, {
|
|
7789
|
+
variables: {
|
|
7790
|
+
id: elementReference.value
|
|
7791
|
+
}
|
|
7792
|
+
});
|
|
7793
|
+
const globalElementData = (_a = data == null ? void 0 : data.globalElement) == null ? void 0 : _a.data;
|
|
7794
|
+
const elementReferenceDocument = useDocument(elementReference.key);
|
|
7795
|
+
if (error != null) {
|
|
7796
|
+
return /* @__PURE__ */ jsx(FallbackComponent, {
|
|
7797
|
+
ref,
|
|
7798
|
+
text: "Something went wrong!"
|
|
7799
|
+
});
|
|
7800
|
+
}
|
|
7801
|
+
if (globalElementData == null) {
|
|
7802
|
+
return /* @__PURE__ */ jsx(FallbackComponent, {
|
|
7803
|
+
ref,
|
|
7804
|
+
text: "This global component doesn't exist"
|
|
7805
|
+
});
|
|
7806
|
+
}
|
|
7807
|
+
return elementReferenceDocument != null ? /* @__PURE__ */ jsx(Document, {
|
|
7808
|
+
document: elementReferenceDocument,
|
|
7809
|
+
ref
|
|
7810
|
+
}) : /* @__PURE__ */ jsx(ElementData, {
|
|
7811
|
+
elementData: globalElementData,
|
|
7812
|
+
ref
|
|
5928
7813
|
});
|
|
5929
7814
|
}));
|
|
5930
|
-
const Element$1 = memo(function Element2({
|
|
7815
|
+
const Element$1 = memo(forwardRef(function Element2({
|
|
5931
7816
|
element
|
|
5932
|
-
}) {
|
|
7817
|
+
}, ref) {
|
|
5933
7818
|
const elementKey = element.key;
|
|
5934
7819
|
const dispatch = useDispatch();
|
|
5935
7820
|
const documentKey = useDocumentKey();
|
|
5936
7821
|
const [handle, setHandle] = useState(null);
|
|
7822
|
+
useImperativeHandle(ref, () => handle, [handle]);
|
|
5937
7823
|
useEffect(() => {
|
|
5938
7824
|
if (documentKey == null)
|
|
5939
7825
|
return;
|
|
@@ -5951,30 +7837,32 @@ const Element$1 = memo(function Element2({
|
|
|
5951
7837
|
ref: setHandle,
|
|
5952
7838
|
elementData: element
|
|
5953
7839
|
}, elementKey);
|
|
5954
|
-
});
|
|
5955
|
-
const Document = memo(function Document2({
|
|
5956
|
-
|
|
5957
|
-
}) {
|
|
5958
|
-
const documentRootElement = useDocumentRootElement(documentKey);
|
|
5959
|
-
if (documentRootElement == null) {
|
|
5960
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
5961
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
5962
|
-
children: "Document Not Found"
|
|
5963
|
-
}), /* @__PURE__ */ jsx("pre", {
|
|
5964
|
-
children: /* @__PURE__ */ jsx("code", {
|
|
5965
|
-
children: JSON.stringify({
|
|
5966
|
-
documentKey
|
|
5967
|
-
}, null, 2)
|
|
5968
|
-
})
|
|
5969
|
-
})]
|
|
5970
|
-
});
|
|
5971
|
-
}
|
|
7840
|
+
}));
|
|
7841
|
+
const Document = memo(forwardRef(function Document2({
|
|
7842
|
+
document
|
|
7843
|
+
}, ref) {
|
|
5972
7844
|
return /* @__PURE__ */ jsx(DocumentContext.Provider, {
|
|
5973
|
-
value:
|
|
7845
|
+
value: document.key,
|
|
5974
7846
|
children: /* @__PURE__ */ jsx(Element$1, {
|
|
5975
|
-
|
|
7847
|
+
ref,
|
|
7848
|
+
element: document.rootElement
|
|
5976
7849
|
})
|
|
5977
7850
|
});
|
|
5978
|
-
});
|
|
5979
|
-
|
|
7851
|
+
}));
|
|
7852
|
+
const DocumentReference = memo(forwardRef(function DocumentReference2({
|
|
7853
|
+
documentReference
|
|
7854
|
+
}, ref) {
|
|
7855
|
+
const document = useDocument(documentReference.key);
|
|
7856
|
+
if (document == null) {
|
|
7857
|
+
return /* @__PURE__ */ jsx(FallbackComponent, {
|
|
7858
|
+
ref,
|
|
7859
|
+
text: "Document not found"
|
|
7860
|
+
});
|
|
7861
|
+
}
|
|
7862
|
+
return /* @__PURE__ */ jsx(Document, {
|
|
7863
|
+
ref,
|
|
7864
|
+
document
|
|
7865
|
+
});
|
|
7866
|
+
}));
|
|
7867
|
+
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 };
|
|
5980
7868
|
//# sourceMappingURL=react.es2.js.map
|