@makeswift/runtime 0.0.0-afbfa6b → 0.0.0-b87dd43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Page.cjs.js +215 -0
- package/dist/Page.cjs.js.map +1 -0
- package/dist/Page.es.js +209 -0
- package/dist/Page.es.js.map +1 -0
- package/dist/actions.cjs.js +21 -1
- package/dist/actions.cjs.js.map +1 -1
- package/dist/actions.es.js +18 -2
- package/dist/actions.es.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 +1 -0
- package/dist/builder.cjs.js.map +1 -1
- package/dist/builder.es.js +1 -1
- package/dist/components.cjs.js +17 -1
- 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 +137 -5
- package/dist/control-serialization.cjs.js.map +1 -1
- package/dist/control-serialization.es.js +137 -6
- package/dist/control-serialization.es.js.map +1 -1
- package/dist/descriptors.cjs.js +8 -0
- package/dist/descriptors.cjs.js.map +1 -1
- package/dist/descriptors.es.js +6 -1
- package/dist/descriptors.es.js.map +1 -1
- package/dist/instances.cjs.js +17 -0
- package/dist/instances.cjs.js.map +1 -1
- package/dist/instances.es.js +17 -1
- package/dist/instances.es.js.map +1 -1
- package/dist/main.cjs.js +9 -0
- 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 +34 -13
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +35 -14
- package/dist/next.es.js.map +1 -1
- package/dist/prop-controllers.cjs.js +1 -0
- package/dist/prop-controllers.cjs.js.map +1 -1
- package/dist/prop-controllers.es.js +1 -1
- package/dist/react-builder-preview.cjs.js +23 -35
- package/dist/react-builder-preview.cjs.js.map +1 -1
- package/dist/react-builder-preview.es.js +22 -34
- 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 +7 -2
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.cjs2.js +2464 -565
- 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 +2453 -554
- 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 +25 -4
- package/dist/types/api/react.d.ts.map +1 -1
- package/dist/types/api/types.d.ts +2 -2
- package/dist/types/api/types.d.ts.map +1 -1
- package/dist/types/builder/serialization/control-serialization.d.ts +121 -7
- package/dist/types/builder/serialization/control-serialization.d.ts.map +1 -1
- package/dist/types/builder/serialization/function-serialization.d.ts +1 -0
- package/dist/types/builder/serialization/function-serialization.d.ts.map +1 -1
- package/dist/types/components/builtin/Box/Box.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/Form.d.ts +41 -0
- package/dist/types/components/builtin/Form/Form.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +15 -0
- package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts +15 -0
- package/dist/types/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts +14 -0
- package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts +16 -0
- package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts +10 -0
- package/dist/types/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts +23 -0
- package/dist/types/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts +3 -0
- package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts +17 -0
- package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts +23 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts +19 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts +24 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts +13 -0
- package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/URLTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/URLTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/index.d.ts +19 -0
- package/dist/types/components/builtin/Form/components/Field/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Placeholder/index.d.ts +9 -0
- package/dist/types/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Spinner/index.d.ts +3 -0
- package/dist/types/components/builtin/Form/components/Spinner/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/context/FormContext.d.ts +32 -0
- package/dist/types/components/builtin/Form/context/FormContext.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/index.d.ts +2 -0
- package/dist/types/components/builtin/Form/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Image/Image.d.ts.map +1 -1
- package/dist/types/components/builtin/Video/Video.d.ts +15 -0
- package/dist/types/components/builtin/Video/Video.d.ts.map +1 -0
- package/dist/types/components/builtin/Video/index.d.ts +2 -0
- package/dist/types/components/builtin/Video/index.d.ts.map +1 -0
- package/dist/types/components/builtin/index.d.ts +1 -0
- package/dist/types/components/builtin/index.d.ts.map +1 -1
- package/dist/types/components/hooks/index.d.ts +1 -0
- package/dist/types/components/hooks/index.d.ts.map +1 -1
- package/dist/types/components/hooks/useTable.d.ts +66 -0
- package/dist/types/components/hooks/useTable.d.ts.map +1 -0
- package/dist/types/components/hooks/useTableFormFieldRefs.d.ts +8 -0
- package/dist/types/components/hooks/useTableFormFieldRefs.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/page/BodySnippet.d.ts +7 -0
- package/dist/types/components/page/BodySnippet.d.ts.map +1 -0
- package/dist/types/components/page/Page.d.ts +45 -0
- package/dist/types/components/page/Page.d.ts.map +1 -0
- package/dist/types/components/page/index.d.ts +2 -0
- package/dist/types/components/page/index.d.ts.map +1 -0
- package/dist/types/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -1
- package/dist/types/components/shared/FallbackComponent/FallbackComponent.d.ts +7 -0
- package/dist/types/components/shared/FallbackComponent/FallbackComponent.d.ts.map +1 -0
- package/dist/types/components/shared/FallbackComponent/index.d.ts +2 -0
- package/dist/types/components/shared/FallbackComponent/index.d.ts.map +1 -0
- package/dist/types/components/utils/placeholders.d.ts +7 -0
- package/dist/types/components/utils/placeholders.d.ts.map +1 -1
- package/dist/types/components/utils/queries.d.ts +1 -0
- package/dist/types/components/utils/queries.d.ts.map +1 -1
- package/dist/types/components/utils/types.d.ts +1 -2
- package/dist/types/components/utils/types.d.ts.map +1 -1
- package/dist/types/controls.d.ts +4 -0
- package/dist/types/controls.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/next.d.ts +5 -4
- package/dist/types/next.d.ts.map +1 -1
- package/dist/types/prop-controllers/descriptors.d.ts +34 -16
- package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/prop-controllers/index.d.ts +3 -3
- package/dist/types/prop-controllers/index.d.ts.map +1 -1
- package/dist/types/prop-controllers/instances.d.ts +36 -4
- package/dist/types/prop-controllers/instances.d.ts.map +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/react.d.ts.map +1 -1
- package/dist/types/runtimes/react.d.ts +7 -7
- package/dist/types/runtimes/react.d.ts.map +1 -1
- package/dist/types/state/actions.d.ts +36 -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/package.json +4 -2
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,164 @@ 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
|
+
const PrefetchContext = createContext(false);
|
|
285
|
+
function useIsPrefetching() {
|
|
286
|
+
return useContext(PrefetchContext);
|
|
287
|
+
}
|
|
288
|
+
function createApolloClient({
|
|
289
|
+
uri,
|
|
290
|
+
cacheData
|
|
291
|
+
}) {
|
|
292
|
+
const cache = new InMemoryCache({
|
|
293
|
+
typePolicies
|
|
294
|
+
});
|
|
295
|
+
if (cacheData)
|
|
296
|
+
cache.restore(cacheData);
|
|
297
|
+
return new ApolloClient({
|
|
298
|
+
uri,
|
|
299
|
+
cache
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
class MakeswiftClient {
|
|
303
|
+
constructor({
|
|
304
|
+
uri,
|
|
305
|
+
cacheData
|
|
306
|
+
}) {
|
|
307
|
+
__publicField(this, "apolloClient");
|
|
308
|
+
this.apolloClient = createApolloClient({
|
|
309
|
+
uri,
|
|
310
|
+
cacheData
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
async prefetch(element) {
|
|
314
|
+
const id = uuid();
|
|
315
|
+
await getDataFromTree(/* @__PURE__ */ jsx(PrefetchContext.Provider, {
|
|
316
|
+
value: true,
|
|
317
|
+
children: /* @__PURE__ */ jsx(RuntimeProvider, {
|
|
318
|
+
client: this,
|
|
319
|
+
defaultRootElements: /* @__PURE__ */ new Map([[id, element]]),
|
|
320
|
+
children: /* @__PURE__ */ jsx(DocumentReference, {
|
|
321
|
+
documentReference: createDocumentReference(id)
|
|
322
|
+
})
|
|
323
|
+
})
|
|
324
|
+
}));
|
|
325
|
+
return this.apolloClient.cache.extract();
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
const Context$2 = createContext(void 0);
|
|
392
329
|
function useQuery(query, options) {
|
|
393
|
-
const client = useContext(Context$
|
|
330
|
+
const client = useContext(Context$2);
|
|
394
331
|
return useQuery$1(query, __spreadValues({
|
|
395
|
-
client
|
|
332
|
+
client: client == null ? void 0 : client.apolloClient
|
|
396
333
|
}, options));
|
|
397
334
|
}
|
|
398
|
-
function
|
|
335
|
+
function useMutation(mutation, options) {
|
|
336
|
+
const client = useContext(Context$2);
|
|
337
|
+
return useMutation$1(mutation, __spreadValues({
|
|
338
|
+
client: client == null ? void 0 : client.apolloClient
|
|
339
|
+
}, options));
|
|
340
|
+
}
|
|
341
|
+
function MakeswiftProvider({
|
|
399
342
|
client,
|
|
400
343
|
children
|
|
401
344
|
}) {
|
|
402
|
-
return /* @__PURE__ */ jsx(Context$
|
|
345
|
+
return /* @__PURE__ */ jsx(Context$2.Provider, {
|
|
403
346
|
value: client,
|
|
404
347
|
children
|
|
405
348
|
});
|
|
@@ -687,6 +630,12 @@ function usePage(pageId) {
|
|
|
687
630
|
const { pagePathnamesById: [page] = [] } = data;
|
|
688
631
|
return page;
|
|
689
632
|
}
|
|
633
|
+
function useTable(tableId) {
|
|
634
|
+
return useQuery(TABLE_BY_ID, {
|
|
635
|
+
skip: tableId == null,
|
|
636
|
+
variables: { id: tableId }
|
|
637
|
+
});
|
|
638
|
+
}
|
|
690
639
|
const defaultExitedProps = {
|
|
691
640
|
opacity: 0,
|
|
692
641
|
x: 0,
|
|
@@ -1157,8 +1106,8 @@ function getScrollParent(element) {
|
|
|
1157
1106
|
return element;
|
|
1158
1107
|
return getScrollParent(parentElement);
|
|
1159
1108
|
}
|
|
1160
|
-
function Parallax(
|
|
1161
|
-
var _h =
|
|
1109
|
+
function Parallax(_g2) {
|
|
1110
|
+
var _h = _g2, {
|
|
1162
1111
|
strength,
|
|
1163
1112
|
children
|
|
1164
1113
|
} = _h, rest = __objRest(_h, [
|
|
@@ -1244,7 +1193,7 @@ function Parallax(_g) {
|
|
|
1244
1193
|
children: children(getProps)
|
|
1245
1194
|
}));
|
|
1246
1195
|
}
|
|
1247
|
-
const Container$
|
|
1196
|
+
const Container$d = styled.div`
|
|
1248
1197
|
position: absolute;
|
|
1249
1198
|
top: 0;
|
|
1250
1199
|
left: 0;
|
|
@@ -1298,7 +1247,7 @@ function BackgroundVideo({
|
|
|
1298
1247
|
}, [aspectRatio, zoom]);
|
|
1299
1248
|
if (!ReactPlayer.canPlay(url))
|
|
1300
1249
|
return /* @__PURE__ */ jsx(Fragment, {});
|
|
1301
|
-
return /* @__PURE__ */ jsxs(Container$
|
|
1250
|
+
return /* @__PURE__ */ jsxs(Container$d, {
|
|
1302
1251
|
ref: container,
|
|
1303
1252
|
children: [container.current && /* @__PURE__ */ jsx(ReactPlayer, {
|
|
1304
1253
|
url,
|
|
@@ -1377,10 +1326,10 @@ const AbsoluteFill = styled.div`
|
|
|
1377
1326
|
right: 0;
|
|
1378
1327
|
bottom: 0;
|
|
1379
1328
|
`;
|
|
1380
|
-
const Container$
|
|
1329
|
+
const Container$c = styled(AbsoluteFill)`
|
|
1381
1330
|
border-radius: inherit;
|
|
1382
1331
|
`;
|
|
1383
|
-
const BackgroundsContainer$1 = styled(Container$
|
|
1332
|
+
const BackgroundsContainer$1 = styled(Container$c)`
|
|
1384
1333
|
overflow: hidden;
|
|
1385
1334
|
${(p) => cssMediaRules([p.visibility], ([visibility]) => css`
|
|
1386
1335
|
display: ${visibility === true ? "block" : "none"};
|
|
@@ -1389,6 +1338,9 @@ const BackgroundsContainer$1 = styled(Container$7)`
|
|
|
1389
1338
|
function Backgrounds({
|
|
1390
1339
|
backgrounds
|
|
1391
1340
|
}) {
|
|
1341
|
+
const isPrefetching = useIsPrefetching();
|
|
1342
|
+
if (isPrefetching)
|
|
1343
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
1392
1344
|
if (backgrounds == null)
|
|
1393
1345
|
return /* @__PURE__ */ jsx(Fragment, {});
|
|
1394
1346
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
@@ -1404,7 +1356,7 @@ function Backgrounds({
|
|
|
1404
1356
|
visibility,
|
|
1405
1357
|
children: [...value].reverse().map((bg) => {
|
|
1406
1358
|
if (bg.type === "color") {
|
|
1407
|
-
return /* @__PURE__ */ jsx(Container$
|
|
1359
|
+
return /* @__PURE__ */ jsx(Container$c, {
|
|
1408
1360
|
style: {
|
|
1409
1361
|
backgroundColor: getColor(bg.payload)
|
|
1410
1362
|
}
|
|
@@ -1440,7 +1392,7 @@ function Backgrounds({
|
|
|
1440
1392
|
}
|
|
1441
1393
|
return /* @__PURE__ */ jsx(Parallax, {
|
|
1442
1394
|
strength: parallax,
|
|
1443
|
-
children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$
|
|
1395
|
+
children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$c, __spreadValues({}, getParallaxProps({
|
|
1444
1396
|
style: {
|
|
1445
1397
|
backgroundImage: publicUrl != null ? `url('${publicUrl}')` : void 0,
|
|
1446
1398
|
backgroundPosition,
|
|
@@ -1458,7 +1410,7 @@ function Backgrounds({
|
|
|
1458
1410
|
isRadial
|
|
1459
1411
|
} = bg.payload;
|
|
1460
1412
|
const gradient = `${getStopsStyle(stops)}`;
|
|
1461
|
-
return /* @__PURE__ */ jsx(Container$
|
|
1413
|
+
return /* @__PURE__ */ jsx(Container$c, {
|
|
1462
1414
|
style: {
|
|
1463
1415
|
background: isRadial ? `radial-gradient(${gradient})` : `linear-gradient(${angle}rad, ${gradient})`
|
|
1464
1416
|
}
|
|
@@ -1475,7 +1427,7 @@ function Backgrounds({
|
|
|
1475
1427
|
} = bg.payload;
|
|
1476
1428
|
return /* @__PURE__ */ jsx(Parallax, {
|
|
1477
1429
|
strength: parallax,
|
|
1478
|
-
children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$
|
|
1430
|
+
children: (getParallaxProps) => /* @__PURE__ */ jsx(Container$c, __spreadProps(__spreadValues({}, getParallaxProps({})), {
|
|
1479
1431
|
children: /* @__PURE__ */ jsx(BackgroundVideo, {
|
|
1480
1432
|
url,
|
|
1481
1433
|
zoom,
|
|
@@ -1543,7 +1495,7 @@ const Grid$1 = styled(motion.div)`
|
|
|
1543
1495
|
alignContent
|
|
1544
1496
|
}))}
|
|
1545
1497
|
`;
|
|
1546
|
-
const GridItem$
|
|
1498
|
+
const GridItem$2 = styled(motion.div)`
|
|
1547
1499
|
display: flex;
|
|
1548
1500
|
|
|
1549
1501
|
/* IE11 doesn't recognize space-between and treats it as stretch, so we fall back to flex-start */
|
|
@@ -1654,7 +1606,7 @@ const Box = forwardRef(function Box2({
|
|
|
1654
1606
|
animate: animate == null ? void 0 : animate.parent,
|
|
1655
1607
|
initial: initial == null ? void 0 : initial.parent,
|
|
1656
1608
|
transition: transition == null ? void 0 : transition.parent,
|
|
1657
|
-
children: children && children.elements.length > 0 ? children.elements.map((child, index) => /* @__PURE__ */ jsx(GridItem$
|
|
1609
|
+
children: children && children.elements.length > 0 ? children.elements.map((child, index) => /* @__PURE__ */ jsx(GridItem$2, {
|
|
1658
1610
|
grid: children.columns,
|
|
1659
1611
|
index,
|
|
1660
1612
|
columnGap,
|
|
@@ -1665,13 +1617,20 @@ const Box = forwardRef(function Box2({
|
|
|
1665
1617
|
children: /* @__PURE__ */ jsx(Element$1, {
|
|
1666
1618
|
element: child
|
|
1667
1619
|
})
|
|
1668
|
-
}, child.key)) : /* @__PURE__ */ jsx(Placeholder$
|
|
1620
|
+
}, child.key)) : /* @__PURE__ */ jsx(Placeholder$2, {
|
|
1669
1621
|
hide: hidePlaceholder
|
|
1670
1622
|
})
|
|
1671
1623
|
})
|
|
1672
1624
|
}, key == null ? void 0 : key.container);
|
|
1673
1625
|
});
|
|
1674
|
-
function registerComponent$
|
|
1626
|
+
function registerComponent$c(runtime) {
|
|
1627
|
+
function isHiddenBasedOnAnimationType(props, deviceId, property) {
|
|
1628
|
+
var _a, _b;
|
|
1629
|
+
const animateIn = props[property];
|
|
1630
|
+
return ((_b = (_a = findDeviceOverride(animateIn, deviceId)) == null ? void 0 : _a.value) != null ? _b : "none") === "none";
|
|
1631
|
+
}
|
|
1632
|
+
const isHiddenBasedOnBoxAnimation = (props, deviceId) => isHiddenBasedOnAnimationType(props, deviceId, "boxAnimateType");
|
|
1633
|
+
const isHiddenBasedOnItemAnimation = (props, deviceId) => isHiddenBasedOnAnimationType(props, deviceId, "itemAnimateType");
|
|
1675
1634
|
return runtime.registerComponent(Box, {
|
|
1676
1635
|
type: "./components/Box/index.js",
|
|
1677
1636
|
label: "Box",
|
|
@@ -1740,8 +1699,12 @@ function registerComponent$a(runtime) {
|
|
|
1740
1699
|
border: Border(),
|
|
1741
1700
|
borderRadius: BorderRadius(),
|
|
1742
1701
|
boxShadow: Shadows(),
|
|
1743
|
-
rowGap: GapY({
|
|
1744
|
-
|
|
1702
|
+
rowGap: GapY((props) => ({
|
|
1703
|
+
hidden: props.children == null
|
|
1704
|
+
})),
|
|
1705
|
+
columnGap: GapX((props) => ({
|
|
1706
|
+
hidden: props.children == null
|
|
1707
|
+
})),
|
|
1745
1708
|
boxAnimateType: ResponsiveSelect({
|
|
1746
1709
|
label: "Animate box in",
|
|
1747
1710
|
labelOrientation: "vertical",
|
|
@@ -1775,20 +1738,22 @@ function registerComponent$a(runtime) {
|
|
|
1775
1738
|
}],
|
|
1776
1739
|
defaultValue: "none"
|
|
1777
1740
|
}),
|
|
1778
|
-
boxAnimateDuration: ResponsiveNumber({
|
|
1741
|
+
boxAnimateDuration: ResponsiveNumber((props, device) => ({
|
|
1779
1742
|
label: "Box duration",
|
|
1780
1743
|
defaultValue: DEFAULT_BOX_ANIMATE_DURATION,
|
|
1781
1744
|
min: 0.1,
|
|
1782
1745
|
step: 0.05,
|
|
1783
|
-
suffix: "s"
|
|
1784
|
-
|
|
1785
|
-
|
|
1746
|
+
suffix: "s",
|
|
1747
|
+
hidden: isHiddenBasedOnBoxAnimation(props, device)
|
|
1748
|
+
})),
|
|
1749
|
+
boxAnimateDelay: ResponsiveNumber((props, device) => ({
|
|
1786
1750
|
label: "Box delay",
|
|
1787
1751
|
defaultValue: DEFAULT_BOX_ANIMATE_DELAY,
|
|
1788
1752
|
min: 0,
|
|
1789
1753
|
step: 0.05,
|
|
1790
|
-
suffix: "s"
|
|
1791
|
-
|
|
1754
|
+
suffix: "s",
|
|
1755
|
+
hidden: isHiddenBasedOnBoxAnimation(props, device)
|
|
1756
|
+
})),
|
|
1792
1757
|
itemAnimateType: ResponsiveSelect({
|
|
1793
1758
|
label: "Animate items in",
|
|
1794
1759
|
labelOrientation: "vertical",
|
|
@@ -1822,30 +1787,34 @@ function registerComponent$a(runtime) {
|
|
|
1822
1787
|
}],
|
|
1823
1788
|
defaultValue: "none"
|
|
1824
1789
|
}),
|
|
1825
|
-
itemAnimateDuration: ResponsiveNumber({
|
|
1790
|
+
itemAnimateDuration: ResponsiveNumber((props, device) => ({
|
|
1826
1791
|
label: "Items duration",
|
|
1827
1792
|
defaultValue: DEFAULT_BOX_ANIMATE_DURATION,
|
|
1828
1793
|
min: 0.1,
|
|
1829
1794
|
step: 0.05,
|
|
1830
|
-
suffix: "s"
|
|
1831
|
-
|
|
1832
|
-
|
|
1795
|
+
suffix: "s",
|
|
1796
|
+
hidden: isHiddenBasedOnItemAnimation(props, device)
|
|
1797
|
+
})),
|
|
1798
|
+
itemAnimateDelay: ResponsiveNumber((props, device) => ({
|
|
1833
1799
|
label: "Items delay",
|
|
1834
1800
|
defaultValue: DEFAULT_ITEM_ANIMATE_DELAY,
|
|
1835
1801
|
min: 0,
|
|
1836
1802
|
step: 0.05,
|
|
1837
|
-
suffix: "s"
|
|
1838
|
-
|
|
1839
|
-
|
|
1803
|
+
suffix: "s",
|
|
1804
|
+
hidden: isHiddenBasedOnItemAnimation(props, device)
|
|
1805
|
+
})),
|
|
1806
|
+
itemStaggerDuration: ResponsiveNumber((props, device) => ({
|
|
1840
1807
|
label: "Stagger",
|
|
1841
1808
|
min: 0,
|
|
1842
1809
|
step: 0.05,
|
|
1843
1810
|
suffix: "s",
|
|
1844
|
-
defaultValue: DEFAULT_ITEM_STAGGER_DURATION
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1811
|
+
defaultValue: DEFAULT_ITEM_STAGGER_DURATION,
|
|
1812
|
+
hidden: isHiddenBasedOnItemAnimation(props, device)
|
|
1813
|
+
})),
|
|
1814
|
+
hidePlaceholder: Checkbox$1((props) => ({
|
|
1815
|
+
label: "Hide placeholder",
|
|
1816
|
+
hidden: props.children != null
|
|
1817
|
+
})),
|
|
1849
1818
|
children: Grid$2()
|
|
1850
1819
|
}
|
|
1851
1820
|
});
|
|
@@ -1936,7 +1905,7 @@ const Link = forwardRef(function Link2(_k, ref) {
|
|
|
1936
1905
|
}))
|
|
1937
1906
|
});
|
|
1938
1907
|
});
|
|
1939
|
-
const StyledButton = styled(Link)`
|
|
1908
|
+
const StyledButton$1 = styled(Link)`
|
|
1940
1909
|
display: table;
|
|
1941
1910
|
border: 0;
|
|
1942
1911
|
outline: 0;
|
|
@@ -2128,7 +2097,7 @@ const StyledButton = styled(Link)`
|
|
|
2128
2097
|
})}
|
|
2129
2098
|
${cssTextStyle()}
|
|
2130
2099
|
`;
|
|
2131
|
-
const Button = forwardRef(function Button2(_m, ref) {
|
|
2100
|
+
const Button$1 = forwardRef(function Button2(_m, ref) {
|
|
2132
2101
|
var _n = _m, {
|
|
2133
2102
|
id,
|
|
2134
2103
|
children,
|
|
@@ -2154,7 +2123,7 @@ const Button = forwardRef(function Button2(_m, ref) {
|
|
|
2154
2123
|
"width",
|
|
2155
2124
|
"margin"
|
|
2156
2125
|
]);
|
|
2157
|
-
return /* @__PURE__ */ jsx(StyledButton, __spreadProps(__spreadValues({}, restOfProps), {
|
|
2126
|
+
return /* @__PURE__ */ jsx(StyledButton$1, __spreadProps(__spreadValues({}, restOfProps), {
|
|
2158
2127
|
ref,
|
|
2159
2128
|
id,
|
|
2160
2129
|
color: useColor(color),
|
|
@@ -2169,8 +2138,8 @@ const Button = forwardRef(function Button2(_m, ref) {
|
|
|
2169
2138
|
children: children == null ? "Button Text" : children
|
|
2170
2139
|
}));
|
|
2171
2140
|
});
|
|
2172
|
-
function registerComponent$
|
|
2173
|
-
return runtime.registerComponent(Button, {
|
|
2141
|
+
function registerComponent$b(runtime) {
|
|
2142
|
+
return runtime.registerComponent(Button$1, {
|
|
2174
2143
|
type: "./components/Button/index.js",
|
|
2175
2144
|
label: "Button",
|
|
2176
2145
|
props: {
|
|
@@ -2265,6 +2234,10 @@ const placeholders = {
|
|
|
2265
2234
|
image: {
|
|
2266
2235
|
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
2236
|
dimensions: { width: 360, height: 240 }
|
|
2237
|
+
},
|
|
2238
|
+
video: {
|
|
2239
|
+
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",
|
|
2240
|
+
dimensions: { width: 712, height: 400 }
|
|
2268
2241
|
}
|
|
2269
2242
|
};
|
|
2270
2243
|
function loadImage(src) {
|
|
@@ -2324,6 +2297,7 @@ const ImageComponent = forwardRef(function Image2({
|
|
|
2324
2297
|
const dataDimensions = (fileData == null ? void 0 : fileData.publicUrl) ? fileData == null ? void 0 : fileData.dimensions : placeholder2.dimensions;
|
|
2325
2298
|
const [measuredDimensions, setMeasuredDimensions] = useState(null);
|
|
2326
2299
|
const isInBuilder = useIsInBuilder();
|
|
2300
|
+
const isPrefetching = useIsPrefetching();
|
|
2327
2301
|
useEffect(() => {
|
|
2328
2302
|
if (dataDimensions)
|
|
2329
2303
|
return;
|
|
@@ -2343,6 +2317,8 @@ const ImageComponent = forwardRef(function Image2({
|
|
|
2343
2317
|
const dimensions = dataDimensions != null ? dataDimensions : measuredDimensions;
|
|
2344
2318
|
if (!dimensions)
|
|
2345
2319
|
return null;
|
|
2320
|
+
if (isPrefetching)
|
|
2321
|
+
return null;
|
|
2346
2322
|
return /* @__PURE__ */ jsx(ImageContainer, {
|
|
2347
2323
|
as: link ? Link : "div",
|
|
2348
2324
|
link,
|
|
@@ -2370,7 +2346,7 @@ const ImageComponent = forwardRef(function Image2({
|
|
|
2370
2346
|
})
|
|
2371
2347
|
});
|
|
2372
2348
|
});
|
|
2373
|
-
function registerComponent$
|
|
2349
|
+
function registerComponent$a(runtime) {
|
|
2374
2350
|
return runtime.registerComponent(ImageComponent, {
|
|
2375
2351
|
type: "./components/Image/index.js",
|
|
2376
2352
|
label: "Image",
|
|
@@ -2419,7 +2395,7 @@ const RightChevron = () => /* @__PURE__ */ jsx("svg", {
|
|
|
2419
2395
|
strokeWidth: "2"
|
|
2420
2396
|
})
|
|
2421
2397
|
});
|
|
2422
|
-
const Container$
|
|
2398
|
+
const Container$b = styled.div`
|
|
2423
2399
|
position: relative;
|
|
2424
2400
|
height: 100%;
|
|
2425
2401
|
`;
|
|
@@ -2719,7 +2695,7 @@ const Carousel = forwardRef(function Carousel2({
|
|
|
2719
2695
|
break;
|
|
2720
2696
|
}
|
|
2721
2697
|
},
|
|
2722
|
-
children: [/* @__PURE__ */ jsxs(Container$
|
|
2698
|
+
children: [/* @__PURE__ */ jsxs(Container$b, {
|
|
2723
2699
|
children: [/* @__PURE__ */ jsx(ClipMask, {
|
|
2724
2700
|
children: /* @__PURE__ */ jsx(Page, __spreadProps(__spreadValues({}, bindPage()), {
|
|
2725
2701
|
animate: animation,
|
|
@@ -2795,7 +2771,7 @@ const Carousel = forwardRef(function Carousel2({
|
|
|
2795
2771
|
})]
|
|
2796
2772
|
});
|
|
2797
2773
|
});
|
|
2798
|
-
function registerComponent$
|
|
2774
|
+
function registerComponent$9(runtime) {
|
|
2799
2775
|
return runtime.registerComponent(Carousel, {
|
|
2800
2776
|
type: "./components/Carousel/index.js",
|
|
2801
2777
|
label: "Carousel",
|
|
@@ -2858,7 +2834,7 @@ function registerComponent$7(runtime) {
|
|
|
2858
2834
|
unit: "px"
|
|
2859
2835
|
}
|
|
2860
2836
|
}),
|
|
2861
|
-
autoplay: Checkbox({
|
|
2837
|
+
autoplay: Checkbox$1({
|
|
2862
2838
|
label: "Autoplay"
|
|
2863
2839
|
}),
|
|
2864
2840
|
delay: Number$1({
|
|
@@ -2868,7 +2844,7 @@ function registerComponent$7(runtime) {
|
|
|
2868
2844
|
step: 0.1,
|
|
2869
2845
|
suffix: "seconds"
|
|
2870
2846
|
}),
|
|
2871
|
-
showArrows: Checkbox({
|
|
2847
|
+
showArrows: Checkbox$1({
|
|
2872
2848
|
preset: true,
|
|
2873
2849
|
label: "Show arrows"
|
|
2874
2850
|
}),
|
|
@@ -2897,7 +2873,7 @@ function registerComponent$7(runtime) {
|
|
|
2897
2873
|
label: "Arrow background",
|
|
2898
2874
|
placeholder: "white"
|
|
2899
2875
|
}),
|
|
2900
|
-
showDots: Checkbox({
|
|
2876
|
+
showDots: Checkbox$1({
|
|
2901
2877
|
preset: true,
|
|
2902
2878
|
label: "Show dots"
|
|
2903
2879
|
}),
|
|
@@ -2915,14 +2891,14 @@ const Block$1 = styled.div`
|
|
|
2915
2891
|
padding: 0.5em;
|
|
2916
2892
|
font-size: 1em;
|
|
2917
2893
|
`;
|
|
2918
|
-
const Label = styled.div`
|
|
2894
|
+
const Label$3 = styled.div`
|
|
2919
2895
|
margin-top: 0.25em;
|
|
2920
2896
|
`;
|
|
2921
2897
|
const Segment = styled.div`
|
|
2922
2898
|
flex: 1;
|
|
2923
2899
|
text-align: center;
|
|
2924
2900
|
`;
|
|
2925
|
-
const Container$
|
|
2901
|
+
const Container$a = styled.div`
|
|
2926
2902
|
display: flex;
|
|
2927
2903
|
${cssWidth("560px")}
|
|
2928
2904
|
${cssMargin()}
|
|
@@ -2932,7 +2908,7 @@ const Container$5 = styled.div`
|
|
|
2932
2908
|
return css`
|
|
2933
2909
|
font-size: 18px;
|
|
2934
2910
|
|
|
2935
|
-
${Label} {
|
|
2911
|
+
${Label$3} {
|
|
2936
2912
|
font-size: 14px;
|
|
2937
2913
|
}
|
|
2938
2914
|
`;
|
|
@@ -2940,7 +2916,7 @@ const Container$5 = styled.div`
|
|
|
2940
2916
|
return css`
|
|
2941
2917
|
font-size: 32px;
|
|
2942
2918
|
|
|
2943
|
-
${Label} {
|
|
2919
|
+
${Label$3} {
|
|
2944
2920
|
font-size: 18px;
|
|
2945
2921
|
}
|
|
2946
2922
|
`;
|
|
@@ -2948,7 +2924,7 @@ const Container$5 = styled.div`
|
|
|
2948
2924
|
return css`
|
|
2949
2925
|
font-size: 24px;
|
|
2950
2926
|
|
|
2951
|
-
${Label} {
|
|
2927
|
+
${Label$3} {
|
|
2952
2928
|
font-size: 16px;
|
|
2953
2929
|
}
|
|
2954
2930
|
`;
|
|
@@ -3085,7 +3061,7 @@ const Container$5 = styled.div`
|
|
|
3085
3061
|
})}
|
|
3086
3062
|
}
|
|
3087
3063
|
|
|
3088
|
-
${Label} {
|
|
3064
|
+
${Label$3} {
|
|
3089
3065
|
${(p) => cssMediaRules([p.labelColor, p.labelFont], ([labelColor = {
|
|
3090
3066
|
swatch: {
|
|
3091
3067
|
hue: 0,
|
|
@@ -3162,7 +3138,7 @@ const Countdown = forwardRef(function Countdown2({
|
|
|
3162
3138
|
}, 1e3);
|
|
3163
3139
|
return () => clearInterval(intervalId);
|
|
3164
3140
|
}, [date]);
|
|
3165
|
-
return /* @__PURE__ */ jsxs(Container$
|
|
3141
|
+
return /* @__PURE__ */ jsxs(Container$a, {
|
|
3166
3142
|
ref,
|
|
3167
3143
|
id,
|
|
3168
3144
|
width,
|
|
@@ -3181,7 +3157,7 @@ const Countdown = forwardRef(function Countdown2({
|
|
|
3181
3157
|
children: /* @__PURE__ */ jsx("span", {
|
|
3182
3158
|
children: days
|
|
3183
3159
|
})
|
|
3184
|
-
}), /* @__PURE__ */ jsx(Label, {
|
|
3160
|
+
}), /* @__PURE__ */ jsx(Label$3, {
|
|
3185
3161
|
children: daysLabel == null ? "Days" : daysLabel
|
|
3186
3162
|
})]
|
|
3187
3163
|
}), /* @__PURE__ */ jsxs(Segment, {
|
|
@@ -3189,7 +3165,7 @@ const Countdown = forwardRef(function Countdown2({
|
|
|
3189
3165
|
children: /* @__PURE__ */ jsx("span", {
|
|
3190
3166
|
children: hours
|
|
3191
3167
|
})
|
|
3192
|
-
}), /* @__PURE__ */ jsx(Label, {
|
|
3168
|
+
}), /* @__PURE__ */ jsx(Label$3, {
|
|
3193
3169
|
children: hoursLabel == null ? "Hours" : hoursLabel
|
|
3194
3170
|
})]
|
|
3195
3171
|
}), /* @__PURE__ */ jsxs(Segment, {
|
|
@@ -3197,7 +3173,7 @@ const Countdown = forwardRef(function Countdown2({
|
|
|
3197
3173
|
children: /* @__PURE__ */ jsx("span", {
|
|
3198
3174
|
children: minutes
|
|
3199
3175
|
})
|
|
3200
|
-
}), /* @__PURE__ */ jsx(Label, {
|
|
3176
|
+
}), /* @__PURE__ */ jsx(Label$3, {
|
|
3201
3177
|
children: minutesLabel == null ? "Minutes" : minutesLabel
|
|
3202
3178
|
})]
|
|
3203
3179
|
}), /* @__PURE__ */ jsxs(Segment, {
|
|
@@ -3205,13 +3181,13 @@ const Countdown = forwardRef(function Countdown2({
|
|
|
3205
3181
|
children: /* @__PURE__ */ jsx("span", {
|
|
3206
3182
|
children: seconds
|
|
3207
3183
|
})
|
|
3208
|
-
}), /* @__PURE__ */ jsx(Label, {
|
|
3184
|
+
}), /* @__PURE__ */ jsx(Label$3, {
|
|
3209
3185
|
children: secondsLabel == null ? "Seconds" : secondsLabel
|
|
3210
3186
|
})]
|
|
3211
3187
|
})]
|
|
3212
3188
|
});
|
|
3213
3189
|
});
|
|
3214
|
-
function registerComponent$
|
|
3190
|
+
function registerComponent$8(runtime) {
|
|
3215
3191
|
return runtime.registerComponent(Countdown, {
|
|
3216
3192
|
type: "./components/Countdown/index.js",
|
|
3217
3193
|
label: "Countdown",
|
|
@@ -3347,7 +3323,7 @@ const IE11MinHeightContainer = styled.div`
|
|
|
3347
3323
|
${cssWidth()}
|
|
3348
3324
|
${cssMargin()}
|
|
3349
3325
|
`;
|
|
3350
|
-
const Container$
|
|
3326
|
+
const Container$9 = styled.div`
|
|
3351
3327
|
display: flex;
|
|
3352
3328
|
flex-direction: column;
|
|
3353
3329
|
justify-content: center;
|
|
@@ -3406,7 +3382,7 @@ const Divider = forwardRef(function Divider2({
|
|
|
3406
3382
|
id,
|
|
3407
3383
|
width,
|
|
3408
3384
|
margin,
|
|
3409
|
-
children: /* @__PURE__ */ jsx(Container$
|
|
3385
|
+
children: /* @__PURE__ */ jsx(Container$9, {
|
|
3410
3386
|
children: /* @__PURE__ */ jsx(Line, {
|
|
3411
3387
|
variant,
|
|
3412
3388
|
thickness,
|
|
@@ -3415,7 +3391,7 @@ const Divider = forwardRef(function Divider2({
|
|
|
3415
3391
|
})
|
|
3416
3392
|
});
|
|
3417
3393
|
});
|
|
3418
|
-
function registerComponent$
|
|
3394
|
+
function registerComponent$7(runtime) {
|
|
3419
3395
|
return runtime.registerComponent(Divider, {
|
|
3420
3396
|
type: "./components/Divider/index.js",
|
|
3421
3397
|
label: "Divider",
|
|
@@ -3465,7 +3441,7 @@ function registerComponent$5(runtime) {
|
|
|
3465
3441
|
}
|
|
3466
3442
|
});
|
|
3467
3443
|
}
|
|
3468
|
-
const Container$
|
|
3444
|
+
const Container$8 = styled.div`
|
|
3469
3445
|
min-height: 15px;
|
|
3470
3446
|
${cssWidth()}
|
|
3471
3447
|
${cssMargin()}
|
|
@@ -3545,7 +3521,7 @@ const Embed = forwardRef(function Embed2({
|
|
|
3545
3521
|
}, [container, html]);
|
|
3546
3522
|
if (shouldRender === false)
|
|
3547
3523
|
return null;
|
|
3548
|
-
return /* @__PURE__ */ jsx(Container$
|
|
3524
|
+
return /* @__PURE__ */ jsx(Container$8, {
|
|
3549
3525
|
ref: setContainer,
|
|
3550
3526
|
id,
|
|
3551
3527
|
margin,
|
|
@@ -3555,14 +3531,14 @@ const Embed = forwardRef(function Embed2({
|
|
|
3555
3531
|
}
|
|
3556
3532
|
});
|
|
3557
3533
|
});
|
|
3558
|
-
function registerComponent$
|
|
3534
|
+
function registerComponent$6(runtime) {
|
|
3559
3535
|
return runtime.registerComponent(Embed, {
|
|
3560
3536
|
type: "./components/Embed/index.js",
|
|
3561
3537
|
label: "Embed",
|
|
3562
3538
|
icon: "Code40",
|
|
3563
3539
|
props: {
|
|
3564
3540
|
id: ElementID(),
|
|
3565
|
-
html: TextArea({
|
|
3541
|
+
html: TextArea$1({
|
|
3566
3542
|
label: "Code",
|
|
3567
3543
|
rows: 20
|
|
3568
3544
|
}),
|
|
@@ -3571,9 +3547,9 @@ function registerComponent$4(runtime) {
|
|
|
3571
3547
|
}
|
|
3572
3548
|
});
|
|
3573
3549
|
}
|
|
3574
|
-
var _path$
|
|
3575
|
-
function _extends$
|
|
3576
|
-
_extends$
|
|
3550
|
+
var _path$t;
|
|
3551
|
+
function _extends$u() {
|
|
3552
|
+
_extends$u = Object.assign || function(target) {
|
|
3577
3553
|
for (var i = 1; i < arguments.length; i++) {
|
|
3578
3554
|
var source = arguments[i];
|
|
3579
3555
|
for (var key in source) {
|
|
@@ -3584,82 +3560,1774 @@ function _extends$r() {
|
|
|
3584
3560
|
}
|
|
3585
3561
|
return target;
|
|
3586
3562
|
};
|
|
3587
|
-
return _extends$
|
|
3563
|
+
return _extends$u.apply(this, arguments);
|
|
3588
3564
|
}
|
|
3589
|
-
var
|
|
3590
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
}, props), _path$
|
|
3595
|
-
|
|
3565
|
+
var SvgCheck12 = function SvgCheck122(props) {
|
|
3566
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$u({
|
|
3567
|
+
width: 12,
|
|
3568
|
+
height: 12,
|
|
3569
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
3570
|
+
}, props), _path$t || (_path$t = /* @__PURE__ */ React.createElement("path", {
|
|
3571
|
+
fillRule: "evenodd",
|
|
3572
|
+
clipRule: "evenodd",
|
|
3573
|
+
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
3574
|
})));
|
|
3597
3575
|
};
|
|
3598
|
-
const
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
}
|
|
3603
|
-
|
|
3604
|
-
|
|
3576
|
+
const Shapes = Object.freeze({
|
|
3577
|
+
SQUARE: "square",
|
|
3578
|
+
ROUNDED: "rounded",
|
|
3579
|
+
PILL: "pill"
|
|
3580
|
+
});
|
|
3581
|
+
const Sizes = Object.freeze({
|
|
3582
|
+
SMALL: "small",
|
|
3583
|
+
MEDIUM: "medium",
|
|
3584
|
+
LARGE: "large"
|
|
3585
|
+
});
|
|
3586
|
+
const Contrasts = Object.freeze({
|
|
3587
|
+
LIGHT: "light",
|
|
3588
|
+
DARK: "dark"
|
|
3589
|
+
});
|
|
3590
|
+
const Context$1 = createContext({});
|
|
3591
|
+
function useFormContext() {
|
|
3592
|
+
return useContext(Context$1);
|
|
3593
|
+
}
|
|
3594
|
+
const { Provider } = Context$1;
|
|
3595
|
+
function getSizeHeight$2(size) {
|
|
3596
|
+
switch (size) {
|
|
3597
|
+
case Sizes.SMALL:
|
|
3598
|
+
return 30;
|
|
3599
|
+
case Sizes.MEDIUM:
|
|
3600
|
+
return 38;
|
|
3601
|
+
case Sizes.LARGE:
|
|
3602
|
+
return 48;
|
|
3603
|
+
default:
|
|
3604
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3605
|
+
}
|
|
3606
|
+
}
|
|
3607
|
+
function getSizeHorizontalPadding(size) {
|
|
3608
|
+
switch (size) {
|
|
3609
|
+
case Sizes.SMALL:
|
|
3610
|
+
return 8;
|
|
3611
|
+
case Sizes.MEDIUM:
|
|
3612
|
+
return 12;
|
|
3613
|
+
case Sizes.LARGE:
|
|
3614
|
+
return 16;
|
|
3615
|
+
default:
|
|
3616
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3617
|
+
}
|
|
3618
|
+
}
|
|
3619
|
+
function getSizeVerticalPadding(size) {
|
|
3620
|
+
switch (size) {
|
|
3621
|
+
case Sizes.SMALL:
|
|
3622
|
+
return 3;
|
|
3623
|
+
case Sizes.MEDIUM:
|
|
3624
|
+
return 7;
|
|
3625
|
+
case Sizes.LARGE:
|
|
3626
|
+
return 11;
|
|
3627
|
+
default:
|
|
3628
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3629
|
+
}
|
|
3630
|
+
}
|
|
3631
|
+
function getShapeBorderRadius(shape) {
|
|
3632
|
+
switch (shape) {
|
|
3633
|
+
case Shapes.SQUARE:
|
|
3634
|
+
return 0;
|
|
3635
|
+
case Shapes.ROUNDED:
|
|
3636
|
+
return 4;
|
|
3637
|
+
case Shapes.PILL:
|
|
3638
|
+
return 500;
|
|
3639
|
+
default:
|
|
3640
|
+
throw new Error(`Invalid form shape "${shape}"`);
|
|
3641
|
+
}
|
|
3642
|
+
}
|
|
3643
|
+
function getContrastBorderColor(contrast, error) {
|
|
3644
|
+
switch (contrast) {
|
|
3645
|
+
case Contrasts.LIGHT:
|
|
3646
|
+
return error ? "rgba(255, 0, 0, 0.7)" : "rgba(0, 0, 0, 0.25)";
|
|
3647
|
+
case Contrasts.DARK:
|
|
3648
|
+
return error ? "rgba(255, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.6)";
|
|
3649
|
+
default:
|
|
3650
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3651
|
+
}
|
|
3652
|
+
}
|
|
3653
|
+
function getContrastBackgroundColor(contrast) {
|
|
3654
|
+
switch (contrast) {
|
|
3655
|
+
case Contrasts.LIGHT:
|
|
3656
|
+
return "white";
|
|
3657
|
+
case Contrasts.DARK:
|
|
3658
|
+
return "rgba(0, 0, 0, 0.7)";
|
|
3659
|
+
default:
|
|
3660
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3661
|
+
}
|
|
3662
|
+
}
|
|
3663
|
+
function getContrastColor$1(contrast) {
|
|
3664
|
+
switch (contrast) {
|
|
3665
|
+
case Contrasts.LIGHT:
|
|
3666
|
+
return "rgba(0, 0, 0, 0.95)";
|
|
3667
|
+
case Contrasts.DARK:
|
|
3668
|
+
return "white";
|
|
3669
|
+
default:
|
|
3670
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3671
|
+
}
|
|
3672
|
+
}
|
|
3673
|
+
function getContrastPlaceholderColor(contrast) {
|
|
3674
|
+
switch (contrast) {
|
|
3675
|
+
case Contrasts.LIGHT:
|
|
3676
|
+
return "rgba(0, 0, 0, 0.3)";
|
|
3677
|
+
case Contrasts.DARK:
|
|
3678
|
+
return "rgba(255,255,255,0.3)";
|
|
3679
|
+
default:
|
|
3680
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3681
|
+
}
|
|
3682
|
+
}
|
|
3683
|
+
function cssField() {
|
|
3684
|
+
return css`
|
|
3685
|
+
display: block;
|
|
3686
|
+
width: 100%;
|
|
3687
|
+
outline: none;
|
|
3688
|
+
border-width: 1px;
|
|
3689
|
+
border-style: solid;
|
|
3690
|
+
transition: border-color 200ms;
|
|
3691
|
+
${(props) => cssMediaRules([props.shape, props.size, props.contrast, props.brandColor], ([
|
|
3692
|
+
shape = Shapes.ROUNDED,
|
|
3693
|
+
size = Sizes.MEDIUM,
|
|
3694
|
+
contrast = Contrasts.LIGHT,
|
|
3695
|
+
brandColor = { swatch: { hue: 0, saturation: 0, lightness: 0 }, alpha: 1 }
|
|
3696
|
+
]) => css`
|
|
3697
|
+
padding: ${getSizeVerticalPadding(size)}px ${getSizeHorizontalPadding(size)}px;
|
|
3698
|
+
border-radius: ${getShapeBorderRadius(shape)}px;
|
|
3699
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
3700
|
+
color: ${getContrastColor$1(contrast)};
|
|
3701
|
+
background-color: ${getContrastBackgroundColor(contrast)};
|
|
3702
|
+
|
|
3703
|
+
:focus,
|
|
3704
|
+
:focus-within {
|
|
3705
|
+
border-color: ${colorToString(brandColor)};
|
|
3706
|
+
}
|
|
3707
|
+
|
|
3708
|
+
::placeholder {
|
|
3709
|
+
color: ${getContrastPlaceholderColor(contrast)};
|
|
3710
|
+
}
|
|
3711
|
+
`)}
|
|
3712
|
+
`;
|
|
3713
|
+
}
|
|
3714
|
+
function getSizeHeight$1(size) {
|
|
3715
|
+
switch (size) {
|
|
3716
|
+
case Sizes.SMALL:
|
|
3717
|
+
return 36;
|
|
3718
|
+
case Sizes.MEDIUM:
|
|
3719
|
+
return 42;
|
|
3720
|
+
case Sizes.LARGE:
|
|
3721
|
+
return 48;
|
|
3722
|
+
default:
|
|
3723
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3724
|
+
}
|
|
3725
|
+
}
|
|
3726
|
+
const Base$2 = styled.input`
|
|
3727
|
+
${cssField()}
|
|
3728
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
3729
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
3730
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
3605
3731
|
`)}
|
|
3606
3732
|
`;
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3733
|
+
var Input$2 = forwardRef(function Input(_o, ref) {
|
|
3734
|
+
var _p = _o, {
|
|
3735
|
+
error = false,
|
|
3736
|
+
form
|
|
3737
|
+
} = _p, restOfProps = __objRest(_p, [
|
|
3738
|
+
"error",
|
|
3739
|
+
"form"
|
|
3740
|
+
]);
|
|
3741
|
+
const {
|
|
3742
|
+
shape,
|
|
3743
|
+
size,
|
|
3744
|
+
contrast,
|
|
3745
|
+
brandColor
|
|
3746
|
+
} = useFormContext();
|
|
3747
|
+
return /* @__PURE__ */ jsx(Base$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3748
|
+
ref,
|
|
3749
|
+
error,
|
|
3750
|
+
shape,
|
|
3751
|
+
size,
|
|
3752
|
+
contrast,
|
|
3753
|
+
brandColor
|
|
3754
|
+
}));
|
|
3755
|
+
});
|
|
3756
|
+
const Container$7 = styled.div`
|
|
3757
|
+
display: flex;
|
|
3758
|
+
flex-direction: column;
|
|
3759
|
+
${cssWidth()};
|
|
3760
|
+
${cssMargin()};
|
|
3761
|
+
`;
|
|
3762
|
+
const Label$2 = styled.div`
|
|
3763
|
+
max-width: 120px;
|
|
3764
|
+
min-width: 60px;
|
|
3765
|
+
height: 8px;
|
|
3766
|
+
border-radius: 2px;
|
|
3610
3767
|
background-color: #a1a8c2;
|
|
3611
|
-
border-radius: ${(props) => props.button === true ? 6 : 2}px;
|
|
3612
3768
|
opacity: 0.4;
|
|
3769
|
+
margin-bottom: 8px;
|
|
3613
3770
|
`;
|
|
3614
|
-
const
|
|
3615
|
-
width:
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
}
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
}
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3771
|
+
const Input$1 = styled.div`
|
|
3772
|
+
min-width: 80px;
|
|
3773
|
+
height: 32px;
|
|
3774
|
+
border-radius: 4px;
|
|
3775
|
+
border-width: 2px;
|
|
3776
|
+
border-style: solid;
|
|
3777
|
+
border-color: #a1a8c2;
|
|
3778
|
+
opacity: 0.4;
|
|
3779
|
+
`;
|
|
3780
|
+
const Button = styled.div`
|
|
3781
|
+
min-width: 140px;
|
|
3782
|
+
height: 32px;
|
|
3783
|
+
border-radius: 4px;
|
|
3784
|
+
background-color: #a1a8c2;
|
|
3785
|
+
opacity: 0.4;
|
|
3786
|
+
`;
|
|
3787
|
+
var Placeholder$1 = forwardRef(function Placeholder2({
|
|
3788
|
+
width,
|
|
3789
|
+
margin
|
|
3790
|
+
}, ref) {
|
|
3791
|
+
return /* @__PURE__ */ jsxs(Container$7, {
|
|
3792
|
+
ref,
|
|
3793
|
+
width,
|
|
3794
|
+
margin,
|
|
3795
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
3796
|
+
style: {
|
|
3797
|
+
display: "flex",
|
|
3798
|
+
flexDirection: "column",
|
|
3799
|
+
marginBottom: 16
|
|
3800
|
+
},
|
|
3801
|
+
children: [/* @__PURE__ */ jsx(Label$2, {}), /* @__PURE__ */ jsx(Input$1, {})]
|
|
3802
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
3803
|
+
style: {
|
|
3804
|
+
display: "flex",
|
|
3805
|
+
flexDirection: "column",
|
|
3806
|
+
marginBottom: 16
|
|
3807
|
+
},
|
|
3808
|
+
children: [/* @__PURE__ */ jsx(Label$2, {}), /* @__PURE__ */ jsx(Input$1, {})]
|
|
3809
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
3810
|
+
style: {
|
|
3811
|
+
display: "flex",
|
|
3812
|
+
flexDirection: "column",
|
|
3813
|
+
justifyContent: "flex-end"
|
|
3814
|
+
},
|
|
3815
|
+
children: /* @__PURE__ */ jsx(Button, {})
|
|
3816
|
+
})]
|
|
3817
|
+
});
|
|
3818
|
+
});
|
|
3819
|
+
function getSizeHeight(size) {
|
|
3820
|
+
switch (size) {
|
|
3821
|
+
case Sizes.SMALL:
|
|
3822
|
+
return 14;
|
|
3823
|
+
case Sizes.MEDIUM:
|
|
3824
|
+
return 18;
|
|
3825
|
+
case Sizes.LARGE:
|
|
3826
|
+
return 22;
|
|
3827
|
+
default:
|
|
3828
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3829
|
+
}
|
|
3830
|
+
}
|
|
3831
|
+
function getContrastColor(contrast) {
|
|
3832
|
+
switch (contrast) {
|
|
3833
|
+
case Contrasts.LIGHT:
|
|
3834
|
+
return "rgba(0, 0, 0, 0.8)";
|
|
3835
|
+
case Contrasts.DARK:
|
|
3836
|
+
return "rgba(255, 255, 255, 0.95)";
|
|
3837
|
+
default:
|
|
3838
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3839
|
+
}
|
|
3840
|
+
}
|
|
3841
|
+
const Base$1 = styled.label`
|
|
3842
|
+
display: block;
|
|
3843
|
+
margin: 0 0 0.25em 0;
|
|
3844
|
+
${cssTextStyle()}
|
|
3845
|
+
${(props) => cssMediaRules([props.size, props.contrast, props.textColor], ([size = Sizes.MEDIUM, contrast = Contrasts.LIGHT, textColor]) => css`
|
|
3846
|
+
min-height: ${getSizeHeight(size)}px;
|
|
3847
|
+
color: ${textColor == null ? getContrastColor(contrast) : colorToString(textColor)};
|
|
3848
|
+
`)}
|
|
3849
|
+
`;
|
|
3850
|
+
function Label$1(props) {
|
|
3851
|
+
const {
|
|
3852
|
+
contrast,
|
|
3853
|
+
size,
|
|
3854
|
+
labelTextStyle,
|
|
3855
|
+
labelTextColor
|
|
3856
|
+
} = useFormContext();
|
|
3857
|
+
return /* @__PURE__ */ jsx(Base$1, __spreadProps(__spreadValues({}, props), {
|
|
3858
|
+
contrast,
|
|
3859
|
+
size,
|
|
3860
|
+
textStyle: labelTextStyle,
|
|
3861
|
+
textColor: useColor(labelTextColor)
|
|
3862
|
+
}));
|
|
3863
|
+
}
|
|
3864
|
+
var SingleLineTextTableField = forwardRef(function SingleLineTextTableField2(_q, ref) {
|
|
3865
|
+
var _r = _q, {
|
|
3866
|
+
id,
|
|
3867
|
+
label = "",
|
|
3868
|
+
name,
|
|
3869
|
+
error,
|
|
3870
|
+
hideLabel = false
|
|
3871
|
+
} = _r, restOfProps = __objRest(_r, [
|
|
3872
|
+
"id",
|
|
3873
|
+
"label",
|
|
3874
|
+
"name",
|
|
3875
|
+
"error",
|
|
3876
|
+
"hideLabel"
|
|
3877
|
+
]);
|
|
3878
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
3879
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
3880
|
+
htmlFor: id,
|
|
3881
|
+
children: label
|
|
3882
|
+
}), /* @__PURE__ */ jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3883
|
+
"aria-label": label,
|
|
3884
|
+
ref,
|
|
3885
|
+
id,
|
|
3886
|
+
name,
|
|
3887
|
+
type: "text",
|
|
3888
|
+
error: error != null
|
|
3889
|
+
}))]
|
|
3890
|
+
});
|
|
3891
|
+
});
|
|
3892
|
+
const Base = styled.textarea`
|
|
3893
|
+
resize: vertical;
|
|
3894
|
+
${cssField()}
|
|
3895
|
+
`;
|
|
3896
|
+
var TextArea = forwardRef(function TextArea2(_s, ref) {
|
|
3897
|
+
var _t = _s, {
|
|
3898
|
+
error = false,
|
|
3899
|
+
form
|
|
3900
|
+
} = _t, restOfProps = __objRest(_t, [
|
|
3901
|
+
"error",
|
|
3902
|
+
"form"
|
|
3903
|
+
]);
|
|
3904
|
+
const {
|
|
3905
|
+
shape,
|
|
3906
|
+
size,
|
|
3907
|
+
contrast,
|
|
3908
|
+
brandColor
|
|
3909
|
+
} = useFormContext();
|
|
3910
|
+
return /* @__PURE__ */ jsx(Base, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3911
|
+
ref,
|
|
3912
|
+
rows: 4,
|
|
3913
|
+
error,
|
|
3914
|
+
shape,
|
|
3915
|
+
size,
|
|
3916
|
+
contrast,
|
|
3917
|
+
brandColor
|
|
3918
|
+
}));
|
|
3919
|
+
});
|
|
3920
|
+
var LongTextTableField = forwardRef(function LongTextTableField2(_u, ref) {
|
|
3921
|
+
var _v = _u, {
|
|
3922
|
+
id,
|
|
3923
|
+
label = "",
|
|
3924
|
+
error,
|
|
3925
|
+
hideLabel = false
|
|
3926
|
+
} = _v, restOfProps = __objRest(_v, [
|
|
3927
|
+
"id",
|
|
3928
|
+
"label",
|
|
3929
|
+
"error",
|
|
3930
|
+
"hideLabel"
|
|
3931
|
+
]);
|
|
3932
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
3933
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
3934
|
+
htmlFor: id,
|
|
3935
|
+
children: label
|
|
3936
|
+
}), /* @__PURE__ */ jsx(TextArea, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3937
|
+
"aria-label": label,
|
|
3938
|
+
ref,
|
|
3939
|
+
id,
|
|
3940
|
+
error: error != null
|
|
3941
|
+
}))]
|
|
3942
|
+
});
|
|
3943
|
+
});
|
|
3944
|
+
function getCheckmarkColor$1({
|
|
3945
|
+
swatch: {
|
|
3946
|
+
hue: h,
|
|
3947
|
+
saturation: s,
|
|
3948
|
+
lightness: l
|
|
3949
|
+
},
|
|
3950
|
+
alpha: a
|
|
3951
|
+
}) {
|
|
3952
|
+
return ColorHelper({
|
|
3953
|
+
h,
|
|
3954
|
+
s,
|
|
3955
|
+
l
|
|
3956
|
+
}).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
|
|
3957
|
+
}
|
|
3958
|
+
const Container$6 = styled.div`
|
|
3959
|
+
position: relative;
|
|
3960
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
3961
|
+
height: ${getSizeHeight(size)}px;
|
|
3962
|
+
width: ${getSizeHeight(size)}px;
|
|
3963
|
+
`)}
|
|
3964
|
+
`;
|
|
3965
|
+
const FakeCheckbox = styled.div`
|
|
3966
|
+
position: absolute;
|
|
3967
|
+
width: 100%;
|
|
3968
|
+
height: 100%;
|
|
3969
|
+
border-style: solid;
|
|
3970
|
+
border-radius: 4px;
|
|
3971
|
+
pointer-events: none;
|
|
3972
|
+
border-width: 1px;
|
|
3973
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
|
|
3974
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
3975
|
+
background-color: ${getContrastBackgroundColor(contrast)};
|
|
3976
|
+
`)}
|
|
3977
|
+
`;
|
|
3978
|
+
const HiddenCheckbox = styled.input`
|
|
3979
|
+
position: absolute;
|
|
3980
|
+
opacity: 0;
|
|
3981
|
+
width: 100%;
|
|
3982
|
+
height: 100%;
|
|
3983
|
+
cursor: pointer;
|
|
3984
|
+
|
|
3985
|
+
&:disabled {
|
|
3986
|
+
cursor: no-drop;
|
|
3987
|
+
|
|
3988
|
+
& ~ ${FakeCheckbox} {
|
|
3989
|
+
opacity: 0.5;
|
|
3990
|
+
}
|
|
3991
|
+
}
|
|
3992
|
+
|
|
3993
|
+
&:checked ~ ${FakeCheckbox} {
|
|
3994
|
+
${(props) => cssMediaRules([props.brandColor], ([{
|
|
3995
|
+
swatch = {
|
|
3996
|
+
hue: 0,
|
|
3997
|
+
saturation: 0,
|
|
3998
|
+
lightness: 0
|
|
3999
|
+
},
|
|
4000
|
+
alpha = 1
|
|
4001
|
+
} = {}]) => css`
|
|
4002
|
+
background-color: ${colorToString({
|
|
4003
|
+
swatch,
|
|
4004
|
+
alpha
|
|
4005
|
+
})};
|
|
4006
|
+
`)}
|
|
4007
|
+
border-color: transparent;
|
|
4008
|
+
|
|
4009
|
+
&::after {
|
|
4010
|
+
content: '';
|
|
4011
|
+
position: absolute;
|
|
4012
|
+
box-sizing: content-box;
|
|
4013
|
+
width: 25%;
|
|
4014
|
+
height: 50%;
|
|
4015
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
4016
|
+
border-width: ${getSizeHeight(size) * 0.1}px;
|
|
4017
|
+
border-left: 0;
|
|
4018
|
+
border-top: 0;
|
|
4019
|
+
`)}
|
|
4020
|
+
border-style: solid;
|
|
4021
|
+
${(props) => cssMediaRules([props.brandColor], ([{
|
|
4022
|
+
swatch = {
|
|
4023
|
+
hue: 0,
|
|
4024
|
+
saturation: 0,
|
|
4025
|
+
lightness: 0
|
|
4026
|
+
},
|
|
4027
|
+
alpha = 1
|
|
4028
|
+
} = {}]) => css`
|
|
4029
|
+
border-color: ${getCheckmarkColor$1({
|
|
4030
|
+
swatch,
|
|
4031
|
+
alpha
|
|
4032
|
+
})};
|
|
4033
|
+
`)}
|
|
4034
|
+
transform: rotate(45deg) translate3d(91%, -23%, 0);
|
|
4035
|
+
}
|
|
4036
|
+
}
|
|
4037
|
+
|
|
4038
|
+
&:not(:disabled) {
|
|
4039
|
+
&:focus ~ ${FakeCheckbox} {
|
|
4040
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4041
|
+
swatch: {
|
|
4042
|
+
hue: 0,
|
|
4043
|
+
saturation: 0,
|
|
4044
|
+
lightness: 0
|
|
4045
|
+
},
|
|
4046
|
+
alpha: 1
|
|
4047
|
+
}]) => css`
|
|
4048
|
+
border-color: ${colorToString(brandColor)};
|
|
4049
|
+
`)}
|
|
4050
|
+
}
|
|
4051
|
+
}
|
|
4052
|
+
|
|
4053
|
+
&:not(:disabled):checked {
|
|
4054
|
+
&:focus ~ ${FakeCheckbox} {
|
|
4055
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
|
|
4056
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
4057
|
+
`)}
|
|
4058
|
+
}
|
|
4059
|
+
}
|
|
4060
|
+
`;
|
|
4061
|
+
var Checkbox = forwardRef(function Checkbox2(_w, ref) {
|
|
4062
|
+
var _x = _w, {
|
|
4063
|
+
error,
|
|
4064
|
+
className,
|
|
4065
|
+
style,
|
|
4066
|
+
form
|
|
4067
|
+
} = _x, restOfProps = __objRest(_x, [
|
|
4068
|
+
"error",
|
|
4069
|
+
"className",
|
|
4070
|
+
"style",
|
|
4071
|
+
"form"
|
|
4072
|
+
]);
|
|
4073
|
+
const {
|
|
4074
|
+
size,
|
|
4075
|
+
contrast,
|
|
4076
|
+
brandColor
|
|
4077
|
+
} = useFormContext();
|
|
4078
|
+
return /* @__PURE__ */ jsxs(Container$6, {
|
|
4079
|
+
size,
|
|
4080
|
+
children: [/* @__PURE__ */ jsx(HiddenCheckbox, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4081
|
+
type: "checkbox",
|
|
4082
|
+
ref,
|
|
4083
|
+
error,
|
|
4084
|
+
size,
|
|
4085
|
+
contrast,
|
|
4086
|
+
brandColor
|
|
4087
|
+
})), /* @__PURE__ */ jsx(FakeCheckbox, {
|
|
4088
|
+
className,
|
|
4089
|
+
error,
|
|
4090
|
+
contrast,
|
|
4091
|
+
style
|
|
4092
|
+
})]
|
|
4093
|
+
});
|
|
4094
|
+
});
|
|
4095
|
+
const StyledLabel$2 = styled(Label$1)`
|
|
4096
|
+
display: flex;
|
|
4097
|
+
align-items: center;
|
|
4098
|
+
margin: 0;
|
|
4099
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
4100
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
4101
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
4102
|
+
`)}
|
|
4103
|
+
`;
|
|
4104
|
+
const CheckboxContainer$1 = styled.span`
|
|
4105
|
+
margin-right: 8px;
|
|
4106
|
+
`;
|
|
4107
|
+
var CheckboxTableField = forwardRef(function CheckboxTableField2(_y, ref) {
|
|
4108
|
+
var _z = _y, {
|
|
4109
|
+
form,
|
|
4110
|
+
id,
|
|
4111
|
+
name,
|
|
4112
|
+
label = "",
|
|
4113
|
+
value = false,
|
|
4114
|
+
error
|
|
4115
|
+
} = _z, restOfProps = __objRest(_z, [
|
|
4116
|
+
"form",
|
|
4117
|
+
"id",
|
|
4118
|
+
"name",
|
|
4119
|
+
"label",
|
|
4120
|
+
"value",
|
|
4121
|
+
"error"
|
|
4122
|
+
]);
|
|
4123
|
+
const {
|
|
4124
|
+
size
|
|
4125
|
+
} = useFormContext();
|
|
4126
|
+
function handleChange(event) {
|
|
4127
|
+
form.setFieldValue(name, event.currentTarget.checked);
|
|
4128
|
+
}
|
|
4129
|
+
return /* @__PURE__ */ jsxs(StyledLabel$2, {
|
|
4130
|
+
htmlFor: id,
|
|
4131
|
+
size,
|
|
4132
|
+
children: [/* @__PURE__ */ jsx(CheckboxContainer$1, {
|
|
4133
|
+
children: /* @__PURE__ */ jsx(Checkbox, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4134
|
+
"aria-label": label,
|
|
4135
|
+
checked: value,
|
|
4136
|
+
onChange: handleChange,
|
|
4137
|
+
ref,
|
|
4138
|
+
id,
|
|
4139
|
+
error: error != null
|
|
4140
|
+
}))
|
|
4141
|
+
}), label]
|
|
4142
|
+
});
|
|
4143
|
+
});
|
|
4144
|
+
const MainLabel = styled(Label$1)`
|
|
4145
|
+
margin: 0 0 4px 0;
|
|
4146
|
+
`;
|
|
4147
|
+
const StyledLabel$1 = styled(Label$1)`
|
|
4148
|
+
display: flex;
|
|
4149
|
+
align-items: center;
|
|
4150
|
+
margin: 8px 0;
|
|
4151
|
+
|
|
4152
|
+
&:last-of-type {
|
|
4153
|
+
margin-bottom: 0;
|
|
4154
|
+
}
|
|
4155
|
+
`;
|
|
4156
|
+
const CheckboxContainer = styled.span`
|
|
4157
|
+
margin-right: 8px;
|
|
4158
|
+
`;
|
|
4159
|
+
var MultipleSelectTableField = forwardRef(function MultipleSelectTableField2(_A, ref) {
|
|
4160
|
+
var _B = _A, {
|
|
4161
|
+
tableColumn,
|
|
4162
|
+
label = "",
|
|
4163
|
+
required,
|
|
4164
|
+
value = [],
|
|
4165
|
+
onChange,
|
|
4166
|
+
hideLabel = false
|
|
4167
|
+
} = _B, restOfProps = __objRest(_B, [
|
|
4168
|
+
"tableColumn",
|
|
4169
|
+
"label",
|
|
4170
|
+
"required",
|
|
4171
|
+
"value",
|
|
4172
|
+
"onChange",
|
|
4173
|
+
"hideLabel"
|
|
4174
|
+
]);
|
|
4175
|
+
const handle = useRef({
|
|
4176
|
+
validity: {
|
|
4177
|
+
valueMissing: required === true && value.length === 0,
|
|
4178
|
+
typeMismatch: false
|
|
4179
|
+
}
|
|
4180
|
+
});
|
|
4181
|
+
useImperativeHandle(ref, () => handle.current, []);
|
|
4182
|
+
function handleChange(event) {
|
|
4183
|
+
handle.current.validity.valueMissing = required === true && !event.currentTarget.checked && value.filter((v) => v !== event.currentTarget.value).length === 0;
|
|
4184
|
+
onChange(event);
|
|
4185
|
+
}
|
|
4186
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
4187
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(MainLabel, {
|
|
4188
|
+
children: label
|
|
4189
|
+
}), tableColumn.options.map((option) => /* @__PURE__ */ jsxs(StyledLabel$1, {
|
|
4190
|
+
htmlFor: option.id,
|
|
4191
|
+
children: [/* @__PURE__ */ jsx(CheckboxContainer, {
|
|
4192
|
+
children: /* @__PURE__ */ jsx(Checkbox, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4193
|
+
"aria-label": label,
|
|
4194
|
+
onChange: handleChange,
|
|
4195
|
+
checked: value.includes(option.name),
|
|
4196
|
+
id: option.id,
|
|
4197
|
+
value: option.name
|
|
4198
|
+
}))
|
|
4199
|
+
}), option.name]
|
|
4200
|
+
}, option.id))]
|
|
4201
|
+
});
|
|
4202
|
+
});
|
|
4203
|
+
function getCheckmarkColor({
|
|
4204
|
+
swatch: {
|
|
4205
|
+
hue: h,
|
|
4206
|
+
saturation: s,
|
|
4207
|
+
lightness: l
|
|
4208
|
+
} = {
|
|
4209
|
+
hue: 0,
|
|
4210
|
+
saturation: 0,
|
|
4211
|
+
lightness: 0
|
|
4212
|
+
},
|
|
4213
|
+
alpha: a
|
|
4214
|
+
}) {
|
|
4215
|
+
return ColorHelper({
|
|
4216
|
+
h,
|
|
4217
|
+
s,
|
|
4218
|
+
l
|
|
4219
|
+
}).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
|
|
4220
|
+
}
|
|
4221
|
+
const Container$5 = styled.div`
|
|
4222
|
+
position: relative;
|
|
4223
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
4224
|
+
height: ${getSizeHeight(size)}px;
|
|
4225
|
+
width: ${getSizeHeight(size)}px;
|
|
4226
|
+
`)}
|
|
4227
|
+
`;
|
|
4228
|
+
const FakeRadioButton = styled.div`
|
|
4229
|
+
position: absolute;
|
|
4230
|
+
width: 100%;
|
|
4231
|
+
height: 100%;
|
|
4232
|
+
border-style: solid;
|
|
4233
|
+
border-radius: 50%;
|
|
4234
|
+
pointer-events: none;
|
|
4235
|
+
border-width: 1px;
|
|
4236
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
|
|
4237
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
4238
|
+
background-color: ${getContrastBackgroundColor(contrast)};
|
|
4239
|
+
`)}
|
|
4240
|
+
`;
|
|
4241
|
+
const HiddenRadioButton = styled.input.attrs({
|
|
4242
|
+
type: "radio"
|
|
4243
|
+
})`
|
|
4244
|
+
position: absolute;
|
|
4245
|
+
opacity: 0;
|
|
4246
|
+
width: 100%;
|
|
4247
|
+
height: 100%;
|
|
4248
|
+
cursor: pointer;
|
|
4249
|
+
|
|
4250
|
+
&:disabled {
|
|
4251
|
+
cursor: no-drop;
|
|
4252
|
+
|
|
4253
|
+
& ~ ${FakeRadioButton} {
|
|
4254
|
+
opacity: 0.5;
|
|
4255
|
+
}
|
|
4256
|
+
}
|
|
4257
|
+
|
|
4258
|
+
&:checked ~ ${FakeRadioButton} {
|
|
4259
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4260
|
+
swatch: {
|
|
4261
|
+
hue: 0,
|
|
4262
|
+
saturation: 0,
|
|
4263
|
+
lightness: 0
|
|
4264
|
+
},
|
|
4265
|
+
alpha: 1
|
|
4266
|
+
}]) => css`
|
|
4267
|
+
background-color: ${colorToString(brandColor)};
|
|
4268
|
+
`)}
|
|
4269
|
+
border-color: transparent;
|
|
4270
|
+
|
|
4271
|
+
&::after {
|
|
4272
|
+
content: '';
|
|
4273
|
+
position: absolute;
|
|
4274
|
+
box-sizing: content-box;
|
|
4275
|
+
top: 50%;
|
|
4276
|
+
left: 50%;
|
|
4277
|
+
width: 50%;
|
|
4278
|
+
height: 50%;
|
|
4279
|
+
border-radius: 50%;
|
|
4280
|
+
transform: translate(-50%, -50%);
|
|
4281
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4282
|
+
swatch: {
|
|
4283
|
+
hue: 0,
|
|
4284
|
+
saturation: 0,
|
|
4285
|
+
lightness: 0
|
|
4286
|
+
},
|
|
4287
|
+
alpha: 1
|
|
4288
|
+
}]) => css`
|
|
4289
|
+
background-color: ${getCheckmarkColor(brandColor)};
|
|
4290
|
+
`)}
|
|
4291
|
+
}
|
|
4292
|
+
}
|
|
4293
|
+
|
|
4294
|
+
&:not(:disabled) {
|
|
4295
|
+
&:focus ~ ${FakeRadioButton} {
|
|
4296
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4297
|
+
swatch: {
|
|
4298
|
+
hue: 0,
|
|
4299
|
+
saturation: 0,
|
|
4300
|
+
lightness: 0
|
|
4301
|
+
},
|
|
4302
|
+
alpha: 1
|
|
4303
|
+
}]) => css`
|
|
4304
|
+
border-color: ${colorToString(brandColor)};
|
|
4305
|
+
`)}
|
|
4306
|
+
}
|
|
4307
|
+
}
|
|
4308
|
+
|
|
4309
|
+
&:not(:disabled):checked {
|
|
4310
|
+
&:focus ~ ${FakeRadioButton} {
|
|
4311
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
|
|
4312
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
4313
|
+
`)}
|
|
4314
|
+
}
|
|
4315
|
+
}
|
|
4316
|
+
`;
|
|
4317
|
+
var RadioButton = forwardRef(function RadioButton2(_C, ref) {
|
|
4318
|
+
var _D = _C, {
|
|
4319
|
+
error,
|
|
4320
|
+
className,
|
|
4321
|
+
style,
|
|
4322
|
+
form
|
|
4323
|
+
} = _D, restOfProps = __objRest(_D, [
|
|
4324
|
+
"error",
|
|
4325
|
+
"className",
|
|
4326
|
+
"style",
|
|
4327
|
+
"form"
|
|
4328
|
+
]);
|
|
4329
|
+
const {
|
|
4330
|
+
size,
|
|
4331
|
+
contrast,
|
|
4332
|
+
brandColor
|
|
4333
|
+
} = useFormContext();
|
|
4334
|
+
return /* @__PURE__ */ jsxs(Container$5, {
|
|
4335
|
+
size,
|
|
4336
|
+
children: [/* @__PURE__ */ jsx(HiddenRadioButton, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4337
|
+
ref,
|
|
4338
|
+
error,
|
|
4339
|
+
contrast,
|
|
4340
|
+
brandColor
|
|
4341
|
+
})), /* @__PURE__ */ jsx(FakeRadioButton, {
|
|
4342
|
+
className,
|
|
4343
|
+
error,
|
|
4344
|
+
contrast,
|
|
4345
|
+
style
|
|
4346
|
+
})]
|
|
4347
|
+
});
|
|
4348
|
+
});
|
|
4349
|
+
const StyledLabel = styled(Label$1)`
|
|
4350
|
+
display: flex;
|
|
4351
|
+
align-items: center;
|
|
4352
|
+
margin: 8px 0;
|
|
4353
|
+
|
|
4354
|
+
&:last-of-type {
|
|
4355
|
+
margin-bottom: 0;
|
|
4356
|
+
}
|
|
4357
|
+
`;
|
|
4358
|
+
const RadioButtonContainer = styled.span`
|
|
4359
|
+
margin-right: 8px;
|
|
4360
|
+
`;
|
|
4361
|
+
var TableColumnRadioButtonGroup = forwardRef(function TableColumnRadioButtonGroup2(_E, ref) {
|
|
4362
|
+
var _F = _E, {
|
|
4363
|
+
tableColumn,
|
|
4364
|
+
label = "",
|
|
4365
|
+
value = "",
|
|
4366
|
+
required = false,
|
|
4367
|
+
hideLabel = false,
|
|
4368
|
+
onChange
|
|
4369
|
+
} = _F, restOfProps = __objRest(_F, [
|
|
4370
|
+
"tableColumn",
|
|
4371
|
+
"label",
|
|
4372
|
+
"value",
|
|
4373
|
+
"required",
|
|
4374
|
+
"hideLabel",
|
|
4375
|
+
"onChange"
|
|
4376
|
+
]);
|
|
4377
|
+
const handle = useRef({
|
|
4378
|
+
validity: {
|
|
4379
|
+
valueMissing: required === true && value === "",
|
|
4380
|
+
typeMismatch: false
|
|
4381
|
+
}
|
|
4382
|
+
});
|
|
4383
|
+
useImperativeHandle(ref, () => handle.current, []);
|
|
4384
|
+
function handleChange(event) {
|
|
4385
|
+
handle.current.validity.valueMissing = required === true && !event.currentTarget.checked;
|
|
4386
|
+
onChange(event);
|
|
4387
|
+
}
|
|
4388
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
4389
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4390
|
+
as: "p",
|
|
4391
|
+
children: label
|
|
4392
|
+
}), tableColumn.options.map((option) => /* @__PURE__ */ jsxs(StyledLabel, {
|
|
4393
|
+
htmlFor: option.id,
|
|
4394
|
+
"aria-label": label,
|
|
4395
|
+
children: [/* @__PURE__ */ jsx(RadioButtonContainer, {
|
|
4396
|
+
children: /* @__PURE__ */ jsx(RadioButton, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4397
|
+
onChange: handleChange,
|
|
4398
|
+
checked: value === option.name,
|
|
4399
|
+
id: option.id,
|
|
4400
|
+
value: option.name
|
|
4401
|
+
}))
|
|
4402
|
+
}), option.name]
|
|
4403
|
+
}, option.id))]
|
|
4404
|
+
});
|
|
4405
|
+
});
|
|
4406
|
+
const Container$4 = styled.div`
|
|
4407
|
+
${cssField()}
|
|
4408
|
+
display: flex;
|
|
4409
|
+
align-items: center;
|
|
4410
|
+
position: relative;
|
|
4411
|
+
user-select: none;
|
|
4412
|
+
border-color: #f19eb9;
|
|
4413
|
+
|
|
4414
|
+
&:focus,
|
|
4415
|
+
&:focus-within {
|
|
4416
|
+
border-color: #e54e7f;
|
|
4417
|
+
}
|
|
4418
|
+
|
|
4419
|
+
${(props) => cssMediaRules([props.size, props.contrast], ([size = Sizes.MEDIUM, contrast = Contrasts.LIGHT]) => css`
|
|
4420
|
+
min-height: ${getSizeHeight$2(size)}px;
|
|
4421
|
+
max-height: ${getSizeHeight$2(size)}px;
|
|
4422
|
+
|
|
4423
|
+
&::after {
|
|
4424
|
+
content: '';
|
|
4425
|
+
position: absolute;
|
|
4426
|
+
right: ${getSizeHorizontalPadding(size)}px;
|
|
4427
|
+
top: 50%;
|
|
4428
|
+
transform: translate3d(0, -25%, 0);
|
|
4429
|
+
border: solid 0.35em transparent;
|
|
4430
|
+
border-top-color: ${getContrastColor$1(contrast)};
|
|
4431
|
+
}
|
|
4432
|
+
`)}
|
|
4433
|
+
`;
|
|
4434
|
+
const Select = styled.select`
|
|
4435
|
+
appearance: none;
|
|
4436
|
+
position: absolute;
|
|
4437
|
+
top: 0;
|
|
4438
|
+
left: 0;
|
|
4439
|
+
opacity: 0;
|
|
4440
|
+
width: 100%;
|
|
4441
|
+
height: 100%;
|
|
4442
|
+
`;
|
|
4443
|
+
var TableColumnSingleSelect = forwardRef(function TableColumnSingleSelect2(_G, ref) {
|
|
4444
|
+
var _H = _G, {
|
|
4445
|
+
id,
|
|
4446
|
+
tableColumn,
|
|
4447
|
+
value = "",
|
|
4448
|
+
label = "",
|
|
4449
|
+
error = false,
|
|
4450
|
+
hideLabel = false,
|
|
4451
|
+
form
|
|
4452
|
+
} = _H, restOfProps = __objRest(_H, [
|
|
4453
|
+
"id",
|
|
4454
|
+
"tableColumn",
|
|
4455
|
+
"value",
|
|
4456
|
+
"label",
|
|
4457
|
+
"error",
|
|
4458
|
+
"hideLabel",
|
|
4459
|
+
"form"
|
|
4460
|
+
]);
|
|
4461
|
+
const {
|
|
4462
|
+
shape,
|
|
4463
|
+
size,
|
|
4464
|
+
contrast,
|
|
4465
|
+
brandColor
|
|
4466
|
+
} = useFormContext();
|
|
4467
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4468
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4469
|
+
htmlFor: id,
|
|
4470
|
+
children: label
|
|
4471
|
+
}), /* @__PURE__ */ jsxs(Container$4, {
|
|
4472
|
+
error,
|
|
4473
|
+
shape,
|
|
4474
|
+
size,
|
|
4475
|
+
contrast,
|
|
4476
|
+
brandColor,
|
|
4477
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
4478
|
+
children: value === "" ? "-" : value
|
|
4479
|
+
}), /* @__PURE__ */ jsxs(Select, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4480
|
+
"aria-label": label,
|
|
4481
|
+
ref,
|
|
4482
|
+
id,
|
|
4483
|
+
value,
|
|
4484
|
+
children: [/* @__PURE__ */ jsx("option", {
|
|
4485
|
+
value: "",
|
|
4486
|
+
children: "-"
|
|
4487
|
+
}), tableColumn.options.map((option) => /* @__PURE__ */ jsx("option", {
|
|
4488
|
+
value: option.name,
|
|
4489
|
+
children: option.name
|
|
4490
|
+
}, option.id))]
|
|
4491
|
+
}))]
|
|
4492
|
+
})]
|
|
4493
|
+
});
|
|
4494
|
+
});
|
|
4495
|
+
var SingleSelectTableField = forwardRef(function SingleSelectTableField2(_I, ref) {
|
|
4496
|
+
var _J = _I, {
|
|
4497
|
+
type
|
|
4498
|
+
} = _J, restOfProps = __objRest(_J, [
|
|
4499
|
+
"type"
|
|
4500
|
+
]);
|
|
4501
|
+
return type === "select" ? /* @__PURE__ */ jsx(TableColumnSingleSelect, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4502
|
+
ref
|
|
4503
|
+
})) : /* @__PURE__ */ jsx(TableColumnRadioButtonGroup, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4504
|
+
ref
|
|
4505
|
+
}));
|
|
4506
|
+
});
|
|
4507
|
+
var PhoneNumberTableField = forwardRef(function PhoneNumberTableField2(_K, ref) {
|
|
4508
|
+
var _L = _K, {
|
|
4509
|
+
id,
|
|
4510
|
+
label = "",
|
|
4511
|
+
name,
|
|
4512
|
+
error,
|
|
4513
|
+
hideLabel = false
|
|
4514
|
+
} = _L, restOfProps = __objRest(_L, [
|
|
4515
|
+
"id",
|
|
4516
|
+
"label",
|
|
4517
|
+
"name",
|
|
4518
|
+
"error",
|
|
4519
|
+
"hideLabel"
|
|
4520
|
+
]);
|
|
4521
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4522
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4523
|
+
htmlFor: id,
|
|
4524
|
+
children: label
|
|
4525
|
+
}), /* @__PURE__ */ jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4526
|
+
"aria-label": label,
|
|
4527
|
+
ref,
|
|
4528
|
+
id,
|
|
4529
|
+
name,
|
|
4530
|
+
type: "tel",
|
|
4531
|
+
error: error != null
|
|
4532
|
+
}))]
|
|
4533
|
+
});
|
|
4534
|
+
});
|
|
4535
|
+
var EmailTableField = forwardRef(function EmailTableField2(_M, ref) {
|
|
4536
|
+
var _N = _M, {
|
|
4537
|
+
id,
|
|
4538
|
+
label = "",
|
|
4539
|
+
name,
|
|
4540
|
+
error,
|
|
4541
|
+
hideLabel = false
|
|
4542
|
+
} = _N, restOfProps = __objRest(_N, [
|
|
4543
|
+
"id",
|
|
4544
|
+
"label",
|
|
4545
|
+
"name",
|
|
4546
|
+
"error",
|
|
4547
|
+
"hideLabel"
|
|
4548
|
+
]);
|
|
4549
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4550
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4551
|
+
htmlFor: id,
|
|
4552
|
+
children: label
|
|
4553
|
+
}), /* @__PURE__ */ jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4554
|
+
"aria-label": label,
|
|
4555
|
+
ref,
|
|
4556
|
+
id,
|
|
4557
|
+
name,
|
|
4558
|
+
type: "email",
|
|
4559
|
+
error: error != null
|
|
4560
|
+
}))]
|
|
4561
|
+
});
|
|
4562
|
+
});
|
|
4563
|
+
var URLTableField = forwardRef(function URLTableField2(_O, ref) {
|
|
4564
|
+
var _P = _O, {
|
|
4565
|
+
id,
|
|
4566
|
+
label = "",
|
|
4567
|
+
name,
|
|
4568
|
+
error,
|
|
4569
|
+
hideLabel = false
|
|
4570
|
+
} = _P, restOfProps = __objRest(_P, [
|
|
4571
|
+
"id",
|
|
4572
|
+
"label",
|
|
4573
|
+
"name",
|
|
4574
|
+
"error",
|
|
4575
|
+
"hideLabel"
|
|
4576
|
+
]);
|
|
4577
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4578
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4579
|
+
htmlFor: id,
|
|
4580
|
+
children: label
|
|
4581
|
+
}), /* @__PURE__ */ jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4582
|
+
"aria-label": label,
|
|
4583
|
+
ref,
|
|
4584
|
+
id,
|
|
4585
|
+
name,
|
|
4586
|
+
type: "url",
|
|
4587
|
+
error: error != null
|
|
4588
|
+
}))]
|
|
4589
|
+
});
|
|
4590
|
+
});
|
|
4591
|
+
var NumberTableField = forwardRef(function NumberTableField2(_Q, ref) {
|
|
4592
|
+
var _R = _Q, {
|
|
4593
|
+
id,
|
|
4594
|
+
label = "",
|
|
4595
|
+
name,
|
|
4596
|
+
error,
|
|
4597
|
+
hideLabel = false
|
|
4598
|
+
} = _R, restOfProps = __objRest(_R, [
|
|
4599
|
+
"id",
|
|
4600
|
+
"label",
|
|
4601
|
+
"name",
|
|
4602
|
+
"error",
|
|
4603
|
+
"hideLabel"
|
|
4604
|
+
]);
|
|
4605
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4606
|
+
children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
|
|
4607
|
+
htmlFor: id,
|
|
4608
|
+
children: label
|
|
4609
|
+
}), /* @__PURE__ */ jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4610
|
+
"aria-label": label,
|
|
4611
|
+
ref,
|
|
4612
|
+
id,
|
|
4613
|
+
name,
|
|
4614
|
+
type: "number",
|
|
4615
|
+
error: error != null
|
|
4616
|
+
}))]
|
|
4617
|
+
});
|
|
4618
|
+
});
|
|
4619
|
+
const Label = styled.div`
|
|
4620
|
+
display: block;
|
|
4621
|
+
max-width: 120px;
|
|
4622
|
+
min-width: 60px;
|
|
4623
|
+
border-radius: 2px;
|
|
4624
|
+
background-color: #5f49f4;
|
|
4625
|
+
opacity: 0.4;
|
|
4626
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
4627
|
+
margin: calc(0.25 * ${getSizeHeight(size)}px + 2px) 0;
|
|
4628
|
+
min-height: ${0.5 * getSizeHeight(size)}px;
|
|
4629
|
+
max-height: ${0.5 * getSizeHeight(size)}px;
|
|
4630
|
+
`)}
|
|
4631
|
+
`;
|
|
4632
|
+
const Input2 = styled.div`
|
|
4633
|
+
display: block;
|
|
4634
|
+
width: 100%;
|
|
4635
|
+
border-width: 2px;
|
|
4636
|
+
border-style: solid;
|
|
4637
|
+
border-color: #5f49f4;
|
|
4638
|
+
opacity: 0.4;
|
|
4639
|
+
${(props) => cssMediaRules([props.shape, props.size], ([shape = Shapes.ROUNDED, size = Sizes.MEDIUM]) => css`
|
|
4640
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
4641
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
4642
|
+
border-radius: ${getShapeBorderRadius(shape)}px;
|
|
4643
|
+
`)}
|
|
4644
|
+
`;
|
|
4645
|
+
function PlaceholderTableField() {
|
|
4646
|
+
const {
|
|
4647
|
+
size,
|
|
4648
|
+
shape
|
|
4649
|
+
} = useFormContext();
|
|
4650
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
4651
|
+
children: [/* @__PURE__ */ jsx(Label, {
|
|
4652
|
+
size
|
|
4653
|
+
}), /* @__PURE__ */ jsx(Input2, {
|
|
4654
|
+
shape,
|
|
4655
|
+
size
|
|
4656
|
+
})]
|
|
4657
|
+
});
|
|
4658
|
+
}
|
|
4659
|
+
function getTypeMismatchErrorMessage(tableColumn, label) {
|
|
4660
|
+
switch ((tableColumn || {}).__typename) {
|
|
4661
|
+
case "PhoneNumberTableColumn":
|
|
4662
|
+
return `${label} field must be a valid phone number.`;
|
|
4663
|
+
case "EmailTableColumn":
|
|
4664
|
+
return `${label} field must be a valid email.`;
|
|
4665
|
+
case "URLTableColumn":
|
|
4666
|
+
return `${label} field must be a valid URL.`;
|
|
4667
|
+
case "NumberTableColumn":
|
|
4668
|
+
return `${label} field must be a valid number.`;
|
|
4669
|
+
case "SingleLineTextTableColumn":
|
|
4670
|
+
case "LongTextTableColumn":
|
|
4671
|
+
case "CheckboxTableColumn":
|
|
4672
|
+
default:
|
|
4673
|
+
return `${label} field is invalid.`;
|
|
4674
|
+
}
|
|
4675
|
+
}
|
|
4676
|
+
function getTableColumnField(tableColumn) {
|
|
4677
|
+
switch ((tableColumn || {}).__typename) {
|
|
4678
|
+
case "SingleLineTextTableColumn":
|
|
4679
|
+
return SingleLineTextTableField;
|
|
4680
|
+
case "LongTextTableColumn":
|
|
4681
|
+
return LongTextTableField;
|
|
4682
|
+
case "CheckboxTableColumn":
|
|
4683
|
+
return CheckboxTableField;
|
|
4684
|
+
case "MultipleSelectTableColumn":
|
|
4685
|
+
return MultipleSelectTableField;
|
|
4686
|
+
case "SingleSelectTableColumn":
|
|
4687
|
+
return SingleSelectTableField;
|
|
4688
|
+
case "PhoneNumberTableColumn":
|
|
4689
|
+
return PhoneNumberTableField;
|
|
4690
|
+
case "EmailTableColumn":
|
|
4691
|
+
return EmailTableField;
|
|
4692
|
+
case "URLTableColumn":
|
|
4693
|
+
return URLTableField;
|
|
4694
|
+
case "NumberTableColumn":
|
|
4695
|
+
return NumberTableField;
|
|
4696
|
+
default:
|
|
4697
|
+
return SingleLineTextTableField;
|
|
4698
|
+
}
|
|
4699
|
+
}
|
|
4700
|
+
function Field({
|
|
4701
|
+
tableColumn,
|
|
4702
|
+
tableFormField: {
|
|
4703
|
+
id,
|
|
4704
|
+
label = "",
|
|
4705
|
+
placeholder: placeholder2,
|
|
4706
|
+
required = false,
|
|
4707
|
+
hidden = false,
|
|
4708
|
+
type = "radio",
|
|
4709
|
+
hideLabel = false
|
|
4710
|
+
}
|
|
4711
|
+
}) {
|
|
4712
|
+
const TableColumnField = getTableColumnField(tableColumn);
|
|
4713
|
+
const input = useRef(null);
|
|
4714
|
+
if (!tableColumn)
|
|
4715
|
+
return /* @__PURE__ */ jsx(PlaceholderTableField, {});
|
|
4716
|
+
function validate() {
|
|
4717
|
+
let errorMessage;
|
|
4718
|
+
if (input.current) {
|
|
4719
|
+
const {
|
|
4720
|
+
validity = {}
|
|
4721
|
+
} = input.current;
|
|
4722
|
+
if (validity.valueMissing)
|
|
4723
|
+
errorMessage = `${label} is required.`;
|
|
4724
|
+
if (validity.typeMismatch)
|
|
4725
|
+
errorMessage = getTypeMismatchErrorMessage(tableColumn, label);
|
|
4726
|
+
}
|
|
4727
|
+
return errorMessage;
|
|
4728
|
+
}
|
|
4729
|
+
return /* @__PURE__ */ jsx(Field$1, {
|
|
4730
|
+
name: tableColumn.name,
|
|
4731
|
+
validate,
|
|
4732
|
+
children: ({
|
|
4733
|
+
field,
|
|
4734
|
+
form
|
|
4735
|
+
}) => hidden ? /* @__PURE__ */ jsx("input", __spreadProps(__spreadValues({}, field), {
|
|
4736
|
+
ref: input,
|
|
4737
|
+
type: "hidden"
|
|
4738
|
+
})) : /* @__PURE__ */ jsx(TableColumnField, __spreadProps(__spreadValues({}, field), {
|
|
4739
|
+
type,
|
|
4740
|
+
form,
|
|
4741
|
+
tableColumn,
|
|
4742
|
+
ref: input,
|
|
4743
|
+
id,
|
|
4744
|
+
error: getIn(form.touched, field.name) && getIn(form.errors, field.name),
|
|
4745
|
+
label,
|
|
4746
|
+
placeholder: placeholder2,
|
|
4747
|
+
required,
|
|
4748
|
+
hideLabel
|
|
4749
|
+
}))
|
|
4750
|
+
});
|
|
4751
|
+
}
|
|
4752
|
+
var _g;
|
|
4753
|
+
function _extends$t() {
|
|
4754
|
+
_extends$t = Object.assign || function(target) {
|
|
4755
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
4756
|
+
var source = arguments[i];
|
|
4757
|
+
for (var key in source) {
|
|
4758
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
4759
|
+
target[key] = source[key];
|
|
4760
|
+
}
|
|
4761
|
+
}
|
|
4762
|
+
}
|
|
4763
|
+
return target;
|
|
4764
|
+
};
|
|
4765
|
+
return _extends$t.apply(this, arguments);
|
|
4766
|
+
}
|
|
4767
|
+
var SvgSpinner20 = function SvgSpinner202(props) {
|
|
4768
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$t({
|
|
4769
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4770
|
+
width: 20,
|
|
4771
|
+
height: 20
|
|
4772
|
+
}, props), _g || (_g = /* @__PURE__ */ React.createElement("g", {
|
|
4773
|
+
fill: "none",
|
|
4774
|
+
strokeWidth: 2,
|
|
4775
|
+
transform: "translate(1 1)"
|
|
4776
|
+
}, /* @__PURE__ */ React.createElement("circle", {
|
|
4777
|
+
stroke: "currentColor",
|
|
4778
|
+
cx: 9,
|
|
4779
|
+
cy: 9,
|
|
4780
|
+
r: 9,
|
|
4781
|
+
strokeOpacity: 0.4
|
|
4782
|
+
}), /* @__PURE__ */ React.createElement("path", {
|
|
4783
|
+
d: "M9 18A9 9 0 0 0 9 0"
|
|
4784
|
+
}))));
|
|
4785
|
+
};
|
|
4786
|
+
const spin = keyframes`
|
|
4787
|
+
from {
|
|
4788
|
+
transform: rotate(0deg);
|
|
4789
|
+
}
|
|
4790
|
+
to {
|
|
4791
|
+
transform: rotate(360deg);
|
|
4792
|
+
}
|
|
4793
|
+
`;
|
|
4794
|
+
const Icon = styled(SvgSpinner20)`
|
|
4795
|
+
display: inline-flex;
|
|
4796
|
+
animation: ${spin} 1s linear infinite;
|
|
4797
|
+
stroke: currentColor;
|
|
4798
|
+
`;
|
|
4799
|
+
function Spinner() {
|
|
4800
|
+
return /* @__PURE__ */ jsx(Icon, {});
|
|
4801
|
+
}
|
|
4802
|
+
function useTableFormFieldRefs(propController, { fieldsCount }) {
|
|
4803
|
+
const [container, setContainer] = useState(null);
|
|
4804
|
+
const [items, setItems] = useState(Array(fieldsCount + 1).fill(null));
|
|
4805
|
+
const isInBuilder = useIsInBuilder();
|
|
4806
|
+
useEffect(() => {
|
|
4807
|
+
if (!isInBuilder)
|
|
4808
|
+
return;
|
|
4809
|
+
let animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
|
|
4810
|
+
return () => {
|
|
4811
|
+
cancelAnimationFrame(animationFrameHandle);
|
|
4812
|
+
};
|
|
4813
|
+
function handleAnimationFrameRequest() {
|
|
4814
|
+
if (propController == null)
|
|
4815
|
+
return;
|
|
4816
|
+
if (container != null)
|
|
4817
|
+
propController.tableFormLayoutChange({ layout: getBox(container) });
|
|
4818
|
+
items.map((item, index) => {
|
|
4819
|
+
if (item == null)
|
|
4820
|
+
return;
|
|
4821
|
+
propController.tableFormFieldLayoutChange({ index, layout: getBox(item) });
|
|
4822
|
+
});
|
|
4823
|
+
animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
|
|
4824
|
+
}
|
|
4825
|
+
}, [propController, container, items, isInBuilder]);
|
|
4826
|
+
const itemRefs = useMemo(() => Array.from({ length: fieldsCount + 1 }).map((_, index) => (item) => {
|
|
4827
|
+
setItems((is) => [...is.slice(0, index), item, ...is.slice(index + 1)]);
|
|
4828
|
+
}), [fieldsCount, setItems]);
|
|
4829
|
+
return { container: setContainer, items: itemRefs };
|
|
4830
|
+
}
|
|
4831
|
+
const LOCAL_STORAGE_NAMESPACE = "@@makeswift/components/form";
|
|
4832
|
+
function getSizeFontSize(size) {
|
|
4833
|
+
switch (size) {
|
|
4834
|
+
case Sizes.SMALL:
|
|
4835
|
+
return 12;
|
|
4836
|
+
case Sizes.MEDIUM:
|
|
4837
|
+
return 14;
|
|
4838
|
+
case Sizes.LARGE:
|
|
4839
|
+
return 18;
|
|
4840
|
+
default:
|
|
4841
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
4842
|
+
}
|
|
4843
|
+
}
|
|
4844
|
+
const Alignments = {
|
|
4845
|
+
LEFT: "left",
|
|
4846
|
+
CENTER: "center",
|
|
4847
|
+
RIGHT: "right"
|
|
4848
|
+
};
|
|
4849
|
+
const GridForm = styled.form`
|
|
4850
|
+
display: flex;
|
|
4851
|
+
flex-wrap: wrap;
|
|
4852
|
+
width: 100%;
|
|
4853
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
|
|
4854
|
+
font-size: ${getSizeFontSize(size)}px;
|
|
4855
|
+
`)}
|
|
4856
|
+
${cssWidth()}
|
|
4857
|
+
${cssMargin()}
|
|
4858
|
+
`;
|
|
4859
|
+
const GridItem$1 = styled.div`
|
|
4860
|
+
align-self: flex-end;
|
|
4861
|
+
flex-direction: column;
|
|
4862
|
+
${cssGridItem()}
|
|
4863
|
+
`;
|
|
4864
|
+
function getAlignmentMargin(alignment) {
|
|
4865
|
+
switch (alignment) {
|
|
4866
|
+
case Alignments.LEFT:
|
|
4867
|
+
return "0 auto 0 0";
|
|
4868
|
+
case Alignments.RIGHT:
|
|
4869
|
+
return "0 0 0 auto";
|
|
4870
|
+
default:
|
|
4871
|
+
return "0 auto";
|
|
4872
|
+
}
|
|
4873
|
+
}
|
|
4874
|
+
const StyledButton = styled((props) => /* @__PURE__ */ jsx(Button$1, __spreadProps(__spreadValues({}, props), {
|
|
4875
|
+
as: "button"
|
|
4876
|
+
})))`
|
|
4877
|
+
display: flex;
|
|
4878
|
+
align-items: center;
|
|
4879
|
+
justify-content: center;
|
|
4880
|
+
${(props) => cssMediaRules([props.size, props.alignment], ([size = Sizes.MEDIUM, alignment = Alignments.CENTER]) => css`
|
|
4881
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
4882
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
4883
|
+
margin: ${getAlignmentMargin(alignment)};
|
|
4884
|
+
padding-top: 0;
|
|
4885
|
+
padding-bottom: 0;
|
|
4886
|
+
`)}
|
|
4887
|
+
`;
|
|
4888
|
+
const ErrorContainer = styled.div`
|
|
4889
|
+
padding: 8px 16px;
|
|
4890
|
+
background-color: #f19eb9;
|
|
4891
|
+
border-radius: 4px;
|
|
4892
|
+
margin-top: 16px;
|
|
4893
|
+
`;
|
|
4894
|
+
const IconContainer = styled.div`
|
|
4895
|
+
fill: currentColor;
|
|
4896
|
+
`;
|
|
4897
|
+
const ErrorMessage = styled.p`
|
|
4898
|
+
font-size: 12px;
|
|
4899
|
+
margin: 8px 0;
|
|
4900
|
+
color: rgba(127, 0, 0, 0.95);
|
|
4901
|
+
`;
|
|
4902
|
+
function getTableColumnDefaultValue(tableColumn) {
|
|
4903
|
+
switch (tableColumn.__typename) {
|
|
4904
|
+
case "CheckboxTableColumn":
|
|
4905
|
+
return false;
|
|
4906
|
+
case "MultipleSelectTableColumn":
|
|
4907
|
+
return [];
|
|
4908
|
+
case "SingleLineTextTableColumn":
|
|
4909
|
+
case "LongTextTableColumn":
|
|
4910
|
+
case "SingleSelectTableColumn":
|
|
4911
|
+
case "PhoneNumberTableColumn":
|
|
4912
|
+
case "EmailTableColumn":
|
|
4913
|
+
case "URLTableColumn":
|
|
4914
|
+
case "NumberTableColumn":
|
|
4915
|
+
default:
|
|
4916
|
+
return "";
|
|
4917
|
+
}
|
|
4918
|
+
}
|
|
4919
|
+
const CREATE_TABLE_RECORD = gql`
|
|
4920
|
+
mutation CreateTableRecord($input: CreateTableRecordInput!) {
|
|
4921
|
+
createTableRecord(input: $input) {
|
|
4922
|
+
tableRecord {
|
|
4923
|
+
id
|
|
4924
|
+
}
|
|
4925
|
+
}
|
|
4926
|
+
}
|
|
4927
|
+
`;
|
|
4928
|
+
const Form = forwardRef(function Form2({
|
|
4929
|
+
id,
|
|
4930
|
+
tableId,
|
|
4931
|
+
fields: fieldsProp,
|
|
4932
|
+
submitLabel = "Submit",
|
|
4933
|
+
submitLink,
|
|
4934
|
+
shape,
|
|
4935
|
+
size,
|
|
4936
|
+
contrast,
|
|
4937
|
+
brandColor,
|
|
4938
|
+
gap,
|
|
4939
|
+
width,
|
|
4940
|
+
margin,
|
|
4941
|
+
submitTextStyle,
|
|
4942
|
+
submitVariant,
|
|
4943
|
+
submitTextColor,
|
|
4944
|
+
submitWidth,
|
|
4945
|
+
submitAlignment,
|
|
4946
|
+
labelTextStyle,
|
|
4947
|
+
labelTextColor
|
|
4948
|
+
}, ref) {
|
|
4949
|
+
const fields = useMemo(() => {
|
|
4950
|
+
var _a;
|
|
4951
|
+
return (_a = fieldsProp == null ? void 0 : fieldsProp.fields) != null ? _a : [];
|
|
4952
|
+
}, [fieldsProp]);
|
|
4953
|
+
const grid = useMemo(() => {
|
|
4954
|
+
var _a;
|
|
4955
|
+
return (_a = fieldsProp == null ? void 0 : fieldsProp.grid) != null ? _a : [];
|
|
4956
|
+
}, [fieldsProp]);
|
|
4957
|
+
const {
|
|
4958
|
+
data: {
|
|
4959
|
+
table
|
|
4960
|
+
} = {}
|
|
4961
|
+
} = useTable(tableId);
|
|
4962
|
+
const [createTableRecord] = useMutation(CREATE_TABLE_RECORD);
|
|
4963
|
+
const [refEl, setRefEl] = useState(null);
|
|
4964
|
+
const [propControllers, setPropControllers] = useState(null);
|
|
4965
|
+
const [initialValues, setInitialValues] = useState(() => fields.reduce((acc, formField) => {
|
|
4966
|
+
const tableColumn = table && table.columns.find((field) => field.id === formField.tableColumnId);
|
|
4967
|
+
const defaultValue = formField ? formField.defaultValue : null;
|
|
4968
|
+
if (tableColumn) {
|
|
4969
|
+
acc[tableColumn.name] = defaultValue == null ? getTableColumnDefaultValue(tableColumn) : defaultValue;
|
|
4970
|
+
}
|
|
4971
|
+
return acc;
|
|
4972
|
+
}, {}));
|
|
4973
|
+
const controller = propControllers == null ? void 0 : propControllers.fields;
|
|
4974
|
+
const {
|
|
4975
|
+
container,
|
|
4976
|
+
items
|
|
4977
|
+
} = useTableFormFieldRefs(controller, {
|
|
4978
|
+
fieldsCount: fields.length
|
|
4979
|
+
});
|
|
4980
|
+
const [isDone, setIsDone] = useState(false);
|
|
4981
|
+
const linkRef = useRef(null);
|
|
4982
|
+
useImperativeHandle(ref, () => ({
|
|
4983
|
+
getBoxModel() {
|
|
4984
|
+
return refEl instanceof Element ? getBox(refEl) : null;
|
|
4985
|
+
},
|
|
4986
|
+
setPropControllers
|
|
4987
|
+
}), [refEl, setPropControllers]);
|
|
4988
|
+
useEffect(() => {
|
|
4989
|
+
container(refEl);
|
|
4990
|
+
}, [container, refEl]);
|
|
4991
|
+
useEffect(() => {
|
|
4992
|
+
if (!isDone)
|
|
4993
|
+
return;
|
|
4994
|
+
let timeoutId = setTimeout(() => setIsDone(false), 2500);
|
|
4995
|
+
return () => clearTimeout(timeoutId);
|
|
4996
|
+
}, [isDone]);
|
|
4997
|
+
function getTableColumn({
|
|
4998
|
+
tableColumnId
|
|
4999
|
+
}) {
|
|
5000
|
+
return table && table.columns.find((field) => tableColumnId === field.id);
|
|
5001
|
+
}
|
|
5002
|
+
async function handleSubmit(values, {
|
|
5003
|
+
setSubmitting,
|
|
5004
|
+
resetForm,
|
|
5005
|
+
setStatus
|
|
5006
|
+
}) {
|
|
5007
|
+
if (table) {
|
|
5008
|
+
const columns = [];
|
|
5009
|
+
fields.forEach((field) => {
|
|
5010
|
+
const tableColumn = getTableColumn(field);
|
|
5011
|
+
if (tableColumn) {
|
|
5012
|
+
const data = values[tableColumn.name];
|
|
5013
|
+
if (data) {
|
|
5014
|
+
columns.push({
|
|
5015
|
+
columnId: field.tableColumnId,
|
|
5016
|
+
data
|
|
5017
|
+
});
|
|
5018
|
+
if (field.autofill) {
|
|
5019
|
+
localStorage.setItem(`${LOCAL_STORAGE_NAMESPACE}/${tableColumn.name}`, JSON.stringify(data));
|
|
5020
|
+
}
|
|
5021
|
+
}
|
|
5022
|
+
}
|
|
5023
|
+
});
|
|
5024
|
+
try {
|
|
5025
|
+
await createTableRecord({
|
|
5026
|
+
variables: {
|
|
5027
|
+
input: {
|
|
5028
|
+
data: {
|
|
5029
|
+
tableId: table.id,
|
|
5030
|
+
columns
|
|
5031
|
+
}
|
|
5032
|
+
}
|
|
5033
|
+
}
|
|
5034
|
+
});
|
|
5035
|
+
setIsDone(true);
|
|
5036
|
+
setInitialValues((prev) => fields.reduce((acc, field) => {
|
|
5037
|
+
const tableColumn = getTableColumn(field);
|
|
5038
|
+
if (tableColumn) {
|
|
5039
|
+
const data = values[tableColumn.name];
|
|
5040
|
+
if (data && field.autofill)
|
|
5041
|
+
return __spreadProps(__spreadValues({}, acc), {
|
|
5042
|
+
[tableColumn.name]: data
|
|
5043
|
+
});
|
|
5044
|
+
}
|
|
5045
|
+
return acc;
|
|
5046
|
+
}, __spreadValues({}, prev)));
|
|
5047
|
+
resetForm();
|
|
5048
|
+
if (linkRef.current != null)
|
|
5049
|
+
linkRef.current.click();
|
|
5050
|
+
} catch (error) {
|
|
5051
|
+
setStatus({
|
|
5052
|
+
error: "An unexpected error has occurred, please try again later"
|
|
5053
|
+
});
|
|
5054
|
+
} finally {
|
|
5055
|
+
setSubmitting(false);
|
|
5056
|
+
}
|
|
5057
|
+
}
|
|
5058
|
+
}
|
|
5059
|
+
useEffect(() => {
|
|
5060
|
+
setInitialValues((prev) => fields.reduce((acc, formField) => {
|
|
5061
|
+
const tableColumn = table && table.columns.find((field) => field.id === formField.tableColumnId);
|
|
5062
|
+
if (tableColumn && formField.autofill) {
|
|
5063
|
+
const storedValue = localStorage.getItem(`${LOCAL_STORAGE_NAMESPACE}/${tableColumn.name}`);
|
|
5064
|
+
if (storedValue) {
|
|
5065
|
+
try {
|
|
5066
|
+
acc[tableColumn.name] = JSON.parse(storedValue);
|
|
5067
|
+
} catch (e) {
|
|
5068
|
+
}
|
|
5069
|
+
}
|
|
5070
|
+
}
|
|
5071
|
+
return acc;
|
|
5072
|
+
}, __spreadValues({}, prev)));
|
|
5073
|
+
}, [fields, table]);
|
|
5074
|
+
const brandColorData = useColor(brandColor);
|
|
5075
|
+
return /* @__PURE__ */ jsx(Provider, {
|
|
5076
|
+
value: {
|
|
5077
|
+
shape,
|
|
5078
|
+
size,
|
|
5079
|
+
contrast,
|
|
5080
|
+
brandColor: brandColorData,
|
|
5081
|
+
labelTextStyle,
|
|
5082
|
+
labelTextColor
|
|
5083
|
+
},
|
|
5084
|
+
children: tableId == null ? /* @__PURE__ */ jsx(Placeholder$1, {
|
|
5085
|
+
ref: setRefEl,
|
|
5086
|
+
width,
|
|
5087
|
+
margin
|
|
5088
|
+
}) : /* @__PURE__ */ jsx(Fragment, {
|
|
5089
|
+
children: /* @__PURE__ */ jsx(Formik, {
|
|
5090
|
+
onSubmit: handleSubmit,
|
|
5091
|
+
initialValues,
|
|
5092
|
+
initialStatus: {
|
|
5093
|
+
error: null
|
|
5094
|
+
},
|
|
5095
|
+
enableReinitialize: true,
|
|
5096
|
+
children: (formik) => {
|
|
5097
|
+
const error = formik.status && formik.status.error;
|
|
5098
|
+
const errors = fields.map((field) => {
|
|
5099
|
+
const tableColumn = getTableColumn(field);
|
|
5100
|
+
return tableColumn && getIn(formik.touched, tableColumn.name) && getIn(formik.errors, tableColumn.name);
|
|
5101
|
+
}).filter((message) => typeof message === "string");
|
|
5102
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
5103
|
+
children: [/* @__PURE__ */ jsxs(GridForm, {
|
|
5104
|
+
ref: setRefEl,
|
|
5105
|
+
id,
|
|
5106
|
+
width,
|
|
5107
|
+
margin,
|
|
5108
|
+
size,
|
|
5109
|
+
onSubmit: formik.handleSubmit,
|
|
5110
|
+
onReset: formik.handleReset,
|
|
5111
|
+
noValidate: true,
|
|
5112
|
+
children: [fields.map((field, index) => {
|
|
5113
|
+
const tableColumn = getTableColumn(field);
|
|
5114
|
+
return /* @__PURE__ */ jsx(GridItem$1, {
|
|
5115
|
+
ref: items[index],
|
|
5116
|
+
grid,
|
|
5117
|
+
index,
|
|
5118
|
+
rowGap: gap,
|
|
5119
|
+
columnGap: gap,
|
|
5120
|
+
children: /* @__PURE__ */ jsx(Field, {
|
|
5121
|
+
tableColumn,
|
|
5122
|
+
tableFormField: field
|
|
5123
|
+
})
|
|
5124
|
+
}, field.id);
|
|
5125
|
+
}), /* @__PURE__ */ jsxs(GridItem$1, {
|
|
5126
|
+
ref: items[fields.length],
|
|
5127
|
+
grid,
|
|
5128
|
+
index: fields.length,
|
|
5129
|
+
rowGap: gap,
|
|
5130
|
+
columnGap: gap,
|
|
5131
|
+
children: [/* @__PURE__ */ jsx(StyledButton, {
|
|
5132
|
+
type: "submit",
|
|
5133
|
+
disabled: formik.isSubmitting || isDone,
|
|
5134
|
+
shape,
|
|
5135
|
+
size,
|
|
5136
|
+
color: brandColor,
|
|
5137
|
+
variant: submitVariant,
|
|
5138
|
+
textColor: submitTextColor,
|
|
5139
|
+
width: submitWidth,
|
|
5140
|
+
alignment: submitAlignment,
|
|
5141
|
+
textStyle: submitTextStyle,
|
|
5142
|
+
children: formik.isSubmitting ? /* @__PURE__ */ jsx(Spinner, {}) : isDone ? /* @__PURE__ */ jsx(IconContainer, {
|
|
5143
|
+
children: /* @__PURE__ */ jsx(SvgCheck12, {})
|
|
5144
|
+
}) : submitLabel
|
|
5145
|
+
}), (errors.length > 0 || error) && /* @__PURE__ */ jsxs(ErrorContainer, {
|
|
5146
|
+
children: [errors.map((message) => /* @__PURE__ */ jsx(ErrorMessage, {
|
|
5147
|
+
children: message
|
|
5148
|
+
}, message)), error != null && /* @__PURE__ */ jsx(ErrorMessage, {
|
|
5149
|
+
children: error
|
|
5150
|
+
})]
|
|
5151
|
+
})]
|
|
5152
|
+
})]
|
|
5153
|
+
}), submitLink != null && /* @__PURE__ */ jsx(Link, {
|
|
5154
|
+
ref: linkRef,
|
|
5155
|
+
hidden: true,
|
|
5156
|
+
link: submitLink
|
|
5157
|
+
})]
|
|
5158
|
+
});
|
|
5159
|
+
}
|
|
5160
|
+
})
|
|
5161
|
+
})
|
|
5162
|
+
});
|
|
5163
|
+
});
|
|
5164
|
+
function registerComponent$5(runtime) {
|
|
5165
|
+
return runtime.registerComponent(Form, {
|
|
5166
|
+
type: "./components/Form/index.js",
|
|
5167
|
+
label: "Form",
|
|
5168
|
+
icon: "Form40",
|
|
5169
|
+
props: {
|
|
5170
|
+
id: ElementID(),
|
|
5171
|
+
tableId: Table(),
|
|
5172
|
+
fields: TableFormFields(),
|
|
5173
|
+
submitLink: Link$1({
|
|
5174
|
+
label: "Redirect to",
|
|
5175
|
+
options: [{
|
|
5176
|
+
value: "OPEN_PAGE",
|
|
5177
|
+
label: "Open page"
|
|
5178
|
+
}, {
|
|
5179
|
+
value: "OPEN_URL",
|
|
5180
|
+
label: "Open URL"
|
|
5181
|
+
}]
|
|
5182
|
+
}),
|
|
5183
|
+
gap: GapY({
|
|
5184
|
+
preset: [{
|
|
5185
|
+
deviceId: "desktop",
|
|
5186
|
+
value: {
|
|
5187
|
+
value: 10,
|
|
5188
|
+
unit: "px"
|
|
5189
|
+
}
|
|
5190
|
+
}],
|
|
5191
|
+
label: "Gap",
|
|
5192
|
+
defaultValue: {
|
|
5193
|
+
value: 0,
|
|
5194
|
+
unit: "px"
|
|
5195
|
+
}
|
|
5196
|
+
}),
|
|
5197
|
+
shape: ResponsiveIconRadioGroup({
|
|
5198
|
+
label: "Shape",
|
|
5199
|
+
options: [{
|
|
5200
|
+
label: "Pill",
|
|
5201
|
+
value: Shapes.PILL,
|
|
5202
|
+
icon: "ButtonPill16"
|
|
5203
|
+
}, {
|
|
5204
|
+
label: "Rounded",
|
|
5205
|
+
value: Shapes.ROUNDED,
|
|
5206
|
+
icon: "ButtonRounded16"
|
|
5207
|
+
}, {
|
|
5208
|
+
label: "Square",
|
|
5209
|
+
value: Shapes.SQUARE,
|
|
5210
|
+
icon: "ButtonSquare16"
|
|
5211
|
+
}],
|
|
5212
|
+
defaultValue: Shapes.ROUNDED
|
|
5213
|
+
}),
|
|
5214
|
+
size: ResponsiveIconRadioGroup({
|
|
5215
|
+
label: "Size",
|
|
5216
|
+
options: [{
|
|
5217
|
+
label: "Small",
|
|
5218
|
+
value: Sizes.SMALL,
|
|
5219
|
+
icon: "SizeSmall16"
|
|
5220
|
+
}, {
|
|
5221
|
+
label: "Medium",
|
|
5222
|
+
value: Sizes.MEDIUM,
|
|
5223
|
+
icon: "SizeMedium16"
|
|
5224
|
+
}, {
|
|
5225
|
+
label: "Large",
|
|
5226
|
+
value: Sizes.LARGE,
|
|
5227
|
+
icon: "SizeLarge16"
|
|
5228
|
+
}],
|
|
5229
|
+
defaultValue: Sizes.MEDIUM
|
|
5230
|
+
}),
|
|
5231
|
+
contrast: ResponsiveIconRadioGroup({
|
|
5232
|
+
label: "Color",
|
|
5233
|
+
options: [{
|
|
5234
|
+
label: "Light mode",
|
|
5235
|
+
value: Contrasts.LIGHT,
|
|
5236
|
+
icon: "Sun16"
|
|
5237
|
+
}, {
|
|
5238
|
+
label: "Dark mode",
|
|
5239
|
+
value: Contrasts.DARK,
|
|
5240
|
+
icon: "Moon16"
|
|
5241
|
+
}],
|
|
5242
|
+
defaultValue: Contrasts.LIGHT
|
|
5243
|
+
}),
|
|
5244
|
+
labelTextStyle: TextStyle({
|
|
5245
|
+
label: "Label text style"
|
|
5246
|
+
}),
|
|
5247
|
+
labelTextColor: ResponsiveColor({
|
|
5248
|
+
label: "Label text color"
|
|
5249
|
+
}),
|
|
5250
|
+
submitTextStyle: TextStyle({
|
|
5251
|
+
label: "Button text style"
|
|
5252
|
+
}),
|
|
5253
|
+
brandColor: ResponsiveColor({
|
|
5254
|
+
label: "Button color",
|
|
5255
|
+
placeholder: "black"
|
|
5256
|
+
}),
|
|
5257
|
+
submitTextColor: ResponsiveColor({
|
|
5258
|
+
label: "Button text color",
|
|
5259
|
+
placeholder: "white"
|
|
5260
|
+
}),
|
|
5261
|
+
submitLabel: TextInput({
|
|
5262
|
+
label: "Button label",
|
|
5263
|
+
placeholder: "Submit"
|
|
5264
|
+
}),
|
|
5265
|
+
submitVariant: ResponsiveSelect({
|
|
5266
|
+
label: "Button style",
|
|
5267
|
+
options: [{
|
|
5268
|
+
value: "flat",
|
|
5269
|
+
label: "Flat"
|
|
5270
|
+
}, {
|
|
5271
|
+
value: "outline",
|
|
5272
|
+
label: "Outline"
|
|
5273
|
+
}, {
|
|
5274
|
+
value: "shadow",
|
|
5275
|
+
label: "Floating"
|
|
5276
|
+
}, {
|
|
5277
|
+
value: "clear",
|
|
5278
|
+
label: "Clear"
|
|
5279
|
+
}, {
|
|
5280
|
+
value: "blocky",
|
|
5281
|
+
label: "Blocky"
|
|
5282
|
+
}, {
|
|
5283
|
+
value: "bubbly",
|
|
5284
|
+
label: "Bubbly"
|
|
5285
|
+
}, {
|
|
5286
|
+
value: "skewed",
|
|
5287
|
+
label: "Skewed"
|
|
5288
|
+
}],
|
|
5289
|
+
defaultValue: "flat"
|
|
5290
|
+
}),
|
|
5291
|
+
submitWidth: ResponsiveLength({
|
|
5292
|
+
label: "Button width"
|
|
5293
|
+
}),
|
|
5294
|
+
submitAlignment: ResponsiveIconRadioGroup({
|
|
5295
|
+
label: "Button alignment",
|
|
5296
|
+
options: [{
|
|
5297
|
+
label: "Left",
|
|
5298
|
+
value: Alignments.LEFT,
|
|
5299
|
+
icon: "AlignLeft16"
|
|
5300
|
+
}, {
|
|
5301
|
+
label: "Center",
|
|
5302
|
+
value: Alignments.CENTER,
|
|
5303
|
+
icon: "AlignCenter16"
|
|
5304
|
+
}, {
|
|
5305
|
+
label: "Right",
|
|
5306
|
+
value: Alignments.RIGHT,
|
|
5307
|
+
icon: "AlignRight16"
|
|
5308
|
+
}],
|
|
5309
|
+
defaultValue: Alignments.CENTER
|
|
5310
|
+
}),
|
|
5311
|
+
width: Width({
|
|
5312
|
+
preset: [{
|
|
5313
|
+
deviceId: "desktop",
|
|
5314
|
+
value: {
|
|
5315
|
+
value: 550,
|
|
5316
|
+
unit: "px"
|
|
5317
|
+
}
|
|
5318
|
+
}],
|
|
5319
|
+
defaultValue: {
|
|
5320
|
+
value: 100,
|
|
5321
|
+
unit: "%"
|
|
5322
|
+
}
|
|
5323
|
+
}),
|
|
5324
|
+
margin: Margin()
|
|
5325
|
+
}
|
|
5326
|
+
});
|
|
5327
|
+
}
|
|
5328
|
+
var _path$s;
|
|
5329
|
+
function _extends$s() {
|
|
5330
|
+
_extends$s = Object.assign || function(target) {
|
|
3663
5331
|
for (var i = 1; i < arguments.length; i++) {
|
|
3664
5332
|
var source = arguments[i];
|
|
3665
5333
|
for (var key in source) {
|
|
@@ -3670,20 +5338,106 @@ function _extends$p() {
|
|
|
3670
5338
|
}
|
|
3671
5339
|
return target;
|
|
3672
5340
|
};
|
|
3673
|
-
return _extends$
|
|
5341
|
+
return _extends$s.apply(this, arguments);
|
|
5342
|
+
}
|
|
5343
|
+
var SvgMobileMenu28 = function SvgMobileMenu282(props) {
|
|
5344
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$s({
|
|
5345
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5346
|
+
width: 28,
|
|
5347
|
+
height: 28
|
|
5348
|
+
}, props), _path$s || (_path$s = /* @__PURE__ */ React.createElement("path", {
|
|
5349
|
+
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"
|
|
5350
|
+
})));
|
|
5351
|
+
};
|
|
5352
|
+
const GutterContainer = styled.div`
|
|
5353
|
+
${(p) => cssMediaRules([p.gutter], ([gutter = {
|
|
5354
|
+
value: 0,
|
|
5355
|
+
unit: "px"
|
|
5356
|
+
}]) => css`
|
|
5357
|
+
padding-left: ${p.first ? "0px" : `${gutter.value / 2}${gutter.unit}`};
|
|
5358
|
+
padding-right: ${p.last ? "0px" : `${gutter.value / 2}${gutter.unit}`};
|
|
5359
|
+
`)}
|
|
5360
|
+
`;
|
|
5361
|
+
const PlaceholderLink$1 = styled.div`
|
|
5362
|
+
width: ${(props) => props.width}px;
|
|
5363
|
+
height: ${(props) => props.button === true ? 32 : 8}px;
|
|
5364
|
+
background-color: #a1a8c2;
|
|
5365
|
+
border-radius: ${(props) => props.button === true ? 6 : 2}px;
|
|
5366
|
+
opacity: 0.4;
|
|
5367
|
+
`;
|
|
5368
|
+
const links$1 = [{
|
|
5369
|
+
width: 50
|
|
5370
|
+
}, {
|
|
5371
|
+
width: 70
|
|
5372
|
+
}, {
|
|
5373
|
+
width: 60
|
|
5374
|
+
}, {
|
|
5375
|
+
width: 80,
|
|
5376
|
+
button: true
|
|
5377
|
+
}];
|
|
5378
|
+
function LinksPlaceholder({
|
|
5379
|
+
gutter
|
|
5380
|
+
}) {
|
|
5381
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
5382
|
+
children: links$1.map((link, i) => /* @__PURE__ */ jsx(GutterContainer, {
|
|
5383
|
+
gutter,
|
|
5384
|
+
first: i === 0,
|
|
5385
|
+
last: i === links$1.length - 1,
|
|
5386
|
+
children: /* @__PURE__ */ jsx(PlaceholderLink$1, __spreadValues({}, link))
|
|
5387
|
+
}, i))
|
|
5388
|
+
});
|
|
5389
|
+
}
|
|
5390
|
+
var _path$r;
|
|
5391
|
+
function _extends$r() {
|
|
5392
|
+
_extends$r = Object.assign || function(target) {
|
|
5393
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
5394
|
+
var source = arguments[i];
|
|
5395
|
+
for (var key in source) {
|
|
5396
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5397
|
+
target[key] = source[key];
|
|
5398
|
+
}
|
|
5399
|
+
}
|
|
5400
|
+
}
|
|
5401
|
+
return target;
|
|
5402
|
+
};
|
|
5403
|
+
return _extends$r.apply(this, arguments);
|
|
5404
|
+
}
|
|
5405
|
+
var SvgCaretDown8 = function SvgCaretDown82(props) {
|
|
5406
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$r({
|
|
5407
|
+
width: 8,
|
|
5408
|
+
height: 8,
|
|
5409
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
5410
|
+
}, props), _path$r || (_path$r = /* @__PURE__ */ React.createElement("path", {
|
|
5411
|
+
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"
|
|
5412
|
+
})));
|
|
5413
|
+
};
|
|
5414
|
+
var _path$q;
|
|
5415
|
+
function _extends$q() {
|
|
5416
|
+
_extends$q = Object.assign || function(target) {
|
|
5417
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
5418
|
+
var source = arguments[i];
|
|
5419
|
+
for (var key in source) {
|
|
5420
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5421
|
+
target[key] = source[key];
|
|
5422
|
+
}
|
|
5423
|
+
}
|
|
5424
|
+
}
|
|
5425
|
+
return target;
|
|
5426
|
+
};
|
|
5427
|
+
return _extends$q.apply(this, arguments);
|
|
3674
5428
|
}
|
|
3675
5429
|
var SvgPlus8 = function SvgPlus82(props) {
|
|
3676
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$
|
|
5430
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$q({
|
|
3677
5431
|
width: 8,
|
|
3678
5432
|
height: 8,
|
|
3679
5433
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3680
|
-
}, props), _path$
|
|
5434
|
+
}, props), _path$q || (_path$q = /* @__PURE__ */ React.createElement("path", {
|
|
3681
5435
|
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
5436
|
})));
|
|
3683
5437
|
};
|
|
3684
|
-
var _path$
|
|
3685
|
-
function _extends$
|
|
3686
|
-
_extends$
|
|
5438
|
+
var _path$p;
|
|
5439
|
+
function _extends$p() {
|
|
5440
|
+
_extends$p = Object.assign || function(target) {
|
|
3687
5441
|
for (var i = 1; i < arguments.length; i++) {
|
|
3688
5442
|
var source = arguments[i];
|
|
3689
5443
|
for (var key in source) {
|
|
@@ -3694,20 +5448,20 @@ function _extends$o() {
|
|
|
3694
5448
|
}
|
|
3695
5449
|
return target;
|
|
3696
5450
|
};
|
|
3697
|
-
return _extends$
|
|
5451
|
+
return _extends$p.apply(this, arguments);
|
|
3698
5452
|
}
|
|
3699
5453
|
var SvgArrowDown8 = function SvgArrowDown82(props) {
|
|
3700
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$
|
|
5454
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$p({
|
|
3701
5455
|
width: 8,
|
|
3702
5456
|
height: 8,
|
|
3703
5457
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3704
|
-
}, props), _path$
|
|
5458
|
+
}, props), _path$p || (_path$p = /* @__PURE__ */ React.createElement("path", {
|
|
3705
5459
|
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
5460
|
})));
|
|
3707
5461
|
};
|
|
3708
|
-
var _path$
|
|
3709
|
-
function _extends$
|
|
3710
|
-
_extends$
|
|
5462
|
+
var _path$o;
|
|
5463
|
+
function _extends$o() {
|
|
5464
|
+
_extends$o = Object.assign || function(target) {
|
|
3711
5465
|
for (var i = 1; i < arguments.length; i++) {
|
|
3712
5466
|
var source = arguments[i];
|
|
3713
5467
|
for (var key in source) {
|
|
@@ -3718,14 +5472,14 @@ function _extends$n() {
|
|
|
3718
5472
|
}
|
|
3719
5473
|
return target;
|
|
3720
5474
|
};
|
|
3721
|
-
return _extends$
|
|
5475
|
+
return _extends$o.apply(this, arguments);
|
|
3722
5476
|
}
|
|
3723
5477
|
var SvgChevronDown8 = function SvgChevronDown82(props) {
|
|
3724
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$
|
|
5478
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$o({
|
|
3725
5479
|
width: 8,
|
|
3726
5480
|
height: 8,
|
|
3727
5481
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3728
|
-
}, props), _path$
|
|
5482
|
+
}, props), _path$o || (_path$o = /* @__PURE__ */ React.createElement("path", {
|
|
3729
5483
|
fillRule: "evenodd",
|
|
3730
5484
|
clipRule: "evenodd",
|
|
3731
5485
|
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 +5554,22 @@ const StyledDropDownItem = styled(Link)`
|
|
|
3800
5554
|
background-color: rgba(0, 0, 0, 0.04);
|
|
3801
5555
|
}
|
|
3802
5556
|
`;
|
|
3803
|
-
function DropDownItem$1(
|
|
3804
|
-
var
|
|
5557
|
+
function DropDownItem$1(_S) {
|
|
5558
|
+
var _T = _S, {
|
|
3805
5559
|
color
|
|
3806
|
-
} =
|
|
5560
|
+
} = _T, restOfProps = __objRest(_T, [
|
|
3807
5561
|
"color"
|
|
3808
5562
|
]);
|
|
3809
5563
|
return /* @__PURE__ */ jsx(StyledDropDownItem, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3810
5564
|
color: useColor(color)
|
|
3811
5565
|
}));
|
|
3812
5566
|
}
|
|
3813
|
-
function DropDownButton(
|
|
3814
|
-
var
|
|
5567
|
+
function DropDownButton(_U) {
|
|
5568
|
+
var _V = _U, {
|
|
3815
5569
|
label,
|
|
3816
5570
|
caret = "caret",
|
|
3817
5571
|
links: links2 = []
|
|
3818
|
-
} =
|
|
5572
|
+
} = _V, restOfProps = __objRest(_V, [
|
|
3819
5573
|
"label",
|
|
3820
5574
|
"caret",
|
|
3821
5575
|
"links"
|
|
@@ -3831,7 +5585,7 @@ function DropDownButton(_q) {
|
|
|
3831
5585
|
}, [setPosition]);
|
|
3832
5586
|
return /* @__PURE__ */ jsxs(DropDownContainer, {
|
|
3833
5587
|
ref: container,
|
|
3834
|
-
children: [/* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({}, restOfProps), {
|
|
5588
|
+
children: [/* @__PURE__ */ jsx(Button$1, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3835
5589
|
children: /* @__PURE__ */ jsxs("div", {
|
|
3836
5590
|
style: {
|
|
3837
5591
|
display: "flex",
|
|
@@ -3861,9 +5615,9 @@ function DropDownButton(_q) {
|
|
|
3861
5615
|
})]
|
|
3862
5616
|
});
|
|
3863
5617
|
}
|
|
3864
|
-
var _path$
|
|
3865
|
-
function _extends$
|
|
3866
|
-
_extends$
|
|
5618
|
+
var _path$n;
|
|
5619
|
+
function _extends$n() {
|
|
5620
|
+
_extends$n = Object.assign || function(target) {
|
|
3867
5621
|
for (var i = 1; i < arguments.length; i++) {
|
|
3868
5622
|
var source = arguments[i];
|
|
3869
5623
|
for (var key in source) {
|
|
@@ -3874,14 +5628,14 @@ function _extends$m() {
|
|
|
3874
5628
|
}
|
|
3875
5629
|
return target;
|
|
3876
5630
|
};
|
|
3877
|
-
return _extends$
|
|
5631
|
+
return _extends$n.apply(this, arguments);
|
|
3878
5632
|
}
|
|
3879
5633
|
var SvgTimes16 = function SvgTimes162(props) {
|
|
3880
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$
|
|
5634
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$n({
|
|
3881
5635
|
width: 16,
|
|
3882
5636
|
height: 16,
|
|
3883
5637
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3884
|
-
}, props), _path$
|
|
5638
|
+
}, props), _path$n || (_path$n = /* @__PURE__ */ React.createElement("path", {
|
|
3885
5639
|
fillRule: "evenodd",
|
|
3886
5640
|
clipRule: "evenodd",
|
|
3887
5641
|
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 +5646,7 @@ const DropDownMenu = styled.div`
|
|
|
3892
5646
|
flex-direction: column;
|
|
3893
5647
|
padding: 8px;
|
|
3894
5648
|
`;
|
|
3895
|
-
const ButtonLink$1 = styled(Button)`
|
|
5649
|
+
const ButtonLink$1 = styled(Button$1)`
|
|
3896
5650
|
margin: 8px 0;
|
|
3897
5651
|
`;
|
|
3898
5652
|
const StyledLink$2 = styled(Link)`
|
|
@@ -3905,24 +5659,24 @@ const StyledLink$2 = styled(Link)`
|
|
|
3905
5659
|
color: ${color == null ? "black" : colorToString(color)};
|
|
3906
5660
|
`)}
|
|
3907
5661
|
`;
|
|
3908
|
-
function DropDownItem(
|
|
3909
|
-
var
|
|
5662
|
+
function DropDownItem(_W) {
|
|
5663
|
+
var _X = _W, {
|
|
3910
5664
|
color
|
|
3911
|
-
} =
|
|
5665
|
+
} = _X, restOfProps = __objRest(_X, [
|
|
3912
5666
|
"color"
|
|
3913
5667
|
]);
|
|
3914
5668
|
return /* @__PURE__ */ jsx(StyledLink$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3915
5669
|
color: useColor(color)
|
|
3916
5670
|
}));
|
|
3917
5671
|
}
|
|
3918
|
-
function MobileDropDownButton(
|
|
3919
|
-
var
|
|
5672
|
+
function MobileDropDownButton(_Y) {
|
|
5673
|
+
var _Z = _Y, {
|
|
3920
5674
|
label,
|
|
3921
5675
|
caret,
|
|
3922
5676
|
links: links2 = [],
|
|
3923
5677
|
onClose = () => {
|
|
3924
5678
|
}
|
|
3925
|
-
} =
|
|
5679
|
+
} = _Z, restOfProps = __objRest(_Z, [
|
|
3926
5680
|
"label",
|
|
3927
5681
|
"caret",
|
|
3928
5682
|
"links",
|
|
@@ -3964,10 +5718,10 @@ function MobileDropDownButton(_u) {
|
|
|
3964
5718
|
})]
|
|
3965
5719
|
});
|
|
3966
5720
|
}
|
|
3967
|
-
const ButtonLink = styled(Button)`
|
|
5721
|
+
const ButtonLink = styled(Button$1)`
|
|
3968
5722
|
margin: 8px 0;
|
|
3969
5723
|
`;
|
|
3970
|
-
const Container$
|
|
5724
|
+
const Container$3 = styled.div`
|
|
3971
5725
|
position: fixed;
|
|
3972
5726
|
flex-direction: column;
|
|
3973
5727
|
width: 100%;
|
|
@@ -4021,7 +5775,7 @@ function MobileMenu({
|
|
|
4021
5775
|
onClose = () => {
|
|
4022
5776
|
}
|
|
4023
5777
|
}) {
|
|
4024
|
-
return /* @__PURE__ */ jsxs(Container$
|
|
5778
|
+
return /* @__PURE__ */ jsxs(Container$3, {
|
|
4025
5779
|
animation,
|
|
4026
5780
|
backgroundColor: useColor(backgroundColor),
|
|
4027
5781
|
open,
|
|
@@ -4047,7 +5801,7 @@ function MobileMenu({
|
|
|
4047
5801
|
})]
|
|
4048
5802
|
});
|
|
4049
5803
|
}
|
|
4050
|
-
const Container$
|
|
5804
|
+
const Container$2 = styled.nav`
|
|
4051
5805
|
display: flex;
|
|
4052
5806
|
align-items: center;
|
|
4053
5807
|
${cssWidth()}
|
|
@@ -4104,7 +5858,7 @@ const Navigation = forwardRef(function Navigation2({
|
|
|
4104
5858
|
margin
|
|
4105
5859
|
}, ref) {
|
|
4106
5860
|
const [isOpen, setIsOpen] = useState(false);
|
|
4107
|
-
return /* @__PURE__ */ jsxs(Container$
|
|
5861
|
+
return /* @__PURE__ */ jsxs(Container$2, {
|
|
4108
5862
|
ref,
|
|
4109
5863
|
id,
|
|
4110
5864
|
margin,
|
|
@@ -4129,7 +5883,7 @@ const Navigation = forwardRef(function Navigation2({
|
|
|
4129
5883
|
gutter,
|
|
4130
5884
|
first: i === 0,
|
|
4131
5885
|
last: i === links2.length - 1,
|
|
4132
|
-
children: [link.type === "button" && /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({}, link.payload), {
|
|
5886
|
+
children: [link.type === "button" && /* @__PURE__ */ jsx(Button$1, __spreadProps(__spreadValues({}, link.payload), {
|
|
4133
5887
|
children: link.payload.label
|
|
4134
5888
|
})), link.type === "dropdown" && /* @__PURE__ */ jsx(DropDownButton, __spreadValues({}, link.payload))]
|
|
4135
5889
|
}, link.id)) : /* @__PURE__ */ jsx(LinksPlaceholder, {
|
|
@@ -4152,7 +5906,7 @@ const Navigation = forwardRef(function Navigation2({
|
|
|
4152
5906
|
})]
|
|
4153
5907
|
});
|
|
4154
5908
|
});
|
|
4155
|
-
function registerComponent$
|
|
5909
|
+
function registerComponent$4(runtime) {
|
|
4156
5910
|
return runtime.registerComponent(Navigation, {
|
|
4157
5911
|
type: "./components/Navigation/index.js",
|
|
4158
5912
|
label: "Navigation",
|
|
@@ -4163,7 +5917,7 @@ function registerComponent$3(runtime) {
|
|
|
4163
5917
|
linkTextStyle: TextStyle({
|
|
4164
5918
|
label: "Link text style"
|
|
4165
5919
|
}),
|
|
4166
|
-
showLogo: Checkbox({
|
|
5920
|
+
showLogo: Checkbox$1({
|
|
4167
5921
|
preset: true,
|
|
4168
5922
|
label: "Show logo"
|
|
4169
5923
|
}),
|
|
@@ -4256,7 +6010,7 @@ const PlaceholderBase = styled.div`
|
|
|
4256
6010
|
height: 80px;
|
|
4257
6011
|
padding: 8px;
|
|
4258
6012
|
`;
|
|
4259
|
-
var
|
|
6013
|
+
var Placeholder3 = forwardRef(function Placeholder4(props, ref) {
|
|
4260
6014
|
return /* @__PURE__ */ jsx(PlaceholderBase, __spreadProps(__spreadValues({}, props), {
|
|
4261
6015
|
ref,
|
|
4262
6016
|
children: /* @__PURE__ */ jsx("svg", {
|
|
@@ -4324,12 +6078,12 @@ const Root = forwardRef(function Page2({
|
|
|
4324
6078
|
children: /* @__PURE__ */ jsx(Element$1, {
|
|
4325
6079
|
element: child
|
|
4326
6080
|
})
|
|
4327
|
-
}, child.key)) : /* @__PURE__ */ jsx(
|
|
6081
|
+
}, child.key)) : /* @__PURE__ */ jsx(Placeholder3, {})
|
|
4328
6082
|
})
|
|
4329
6083
|
})]
|
|
4330
6084
|
});
|
|
4331
6085
|
});
|
|
4332
|
-
function registerComponent$
|
|
6086
|
+
function registerComponent$3(runtime) {
|
|
4333
6087
|
return runtime.registerComponent(Root, {
|
|
4334
6088
|
type: "./components/Root/index.js",
|
|
4335
6089
|
label: "Page",
|
|
@@ -4342,6 +6096,30 @@ function registerComponent$2(runtime) {
|
|
|
4342
6096
|
}
|
|
4343
6097
|
});
|
|
4344
6098
|
}
|
|
6099
|
+
var _path$m;
|
|
6100
|
+
function _extends$m() {
|
|
6101
|
+
_extends$m = Object.assign || function(target) {
|
|
6102
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
6103
|
+
var source = arguments[i];
|
|
6104
|
+
for (var key in source) {
|
|
6105
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
6106
|
+
target[key] = source[key];
|
|
6107
|
+
}
|
|
6108
|
+
}
|
|
6109
|
+
}
|
|
6110
|
+
return target;
|
|
6111
|
+
};
|
|
6112
|
+
return _extends$m.apply(this, arguments);
|
|
6113
|
+
}
|
|
6114
|
+
var SvgLogoAngellist20 = function SvgLogoAngellist202(props) {
|
|
6115
|
+
return /* @__PURE__ */ React.createElement("svg", _extends$m({
|
|
6116
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6117
|
+
width: 20,
|
|
6118
|
+
height: 20
|
|
6119
|
+
}, props), _path$m || (_path$m = /* @__PURE__ */ React.createElement("path", {
|
|
6120
|
+
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"
|
|
6121
|
+
})));
|
|
6122
|
+
};
|
|
4345
6123
|
var _path$l;
|
|
4346
6124
|
function _extends$l() {
|
|
4347
6125
|
_extends$l = Object.assign || function(target) {
|
|
@@ -4357,13 +6135,13 @@ function _extends$l() {
|
|
|
4357
6135
|
};
|
|
4358
6136
|
return _extends$l.apply(this, arguments);
|
|
4359
6137
|
}
|
|
4360
|
-
var
|
|
6138
|
+
var SvgLogoCodepen20 = function SvgLogoCodepen202(props) {
|
|
4361
6139
|
return /* @__PURE__ */ React.createElement("svg", _extends$l({
|
|
4362
6140
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4363
6141
|
width: 20,
|
|
4364
6142
|
height: 20
|
|
4365
6143
|
}, props), _path$l || (_path$l = /* @__PURE__ */ React.createElement("path", {
|
|
4366
|
-
d: "
|
|
6144
|
+
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
6145
|
})));
|
|
4368
6146
|
};
|
|
4369
6147
|
var _path$k;
|
|
@@ -4381,13 +6159,13 @@ function _extends$k() {
|
|
|
4381
6159
|
};
|
|
4382
6160
|
return _extends$k.apply(this, arguments);
|
|
4383
6161
|
}
|
|
4384
|
-
var
|
|
6162
|
+
var SvgLogoDribbble20 = function SvgLogoDribbble202(props) {
|
|
4385
6163
|
return /* @__PURE__ */ React.createElement("svg", _extends$k({
|
|
4386
6164
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4387
6165
|
width: 20,
|
|
4388
6166
|
height: 20
|
|
4389
6167
|
}, props), _path$k || (_path$k = /* @__PURE__ */ React.createElement("path", {
|
|
4390
|
-
d: "
|
|
6168
|
+
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
6169
|
})));
|
|
4392
6170
|
};
|
|
4393
6171
|
var _path$j;
|
|
@@ -4405,13 +6183,13 @@ function _extends$j() {
|
|
|
4405
6183
|
};
|
|
4406
6184
|
return _extends$j.apply(this, arguments);
|
|
4407
6185
|
}
|
|
4408
|
-
var
|
|
6186
|
+
var SvgLogoFacebook20 = function SvgLogoFacebook202(props) {
|
|
4409
6187
|
return /* @__PURE__ */ React.createElement("svg", _extends$j({
|
|
4410
6188
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4411
6189
|
width: 20,
|
|
4412
6190
|
height: 20
|
|
4413
6191
|
}, props), _path$j || (_path$j = /* @__PURE__ */ React.createElement("path", {
|
|
4414
|
-
d: "
|
|
6192
|
+
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
6193
|
})));
|
|
4416
6194
|
};
|
|
4417
6195
|
var _path$i;
|
|
@@ -4429,13 +6207,13 @@ function _extends$i() {
|
|
|
4429
6207
|
};
|
|
4430
6208
|
return _extends$i.apply(this, arguments);
|
|
4431
6209
|
}
|
|
4432
|
-
var
|
|
6210
|
+
var SvgLogoGithub20 = function SvgLogoGithub202(props) {
|
|
4433
6211
|
return /* @__PURE__ */ React.createElement("svg", _extends$i({
|
|
4434
6212
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4435
6213
|
width: 20,
|
|
4436
6214
|
height: 20
|
|
4437
6215
|
}, props), _path$i || (_path$i = /* @__PURE__ */ React.createElement("path", {
|
|
4438
|
-
d: "
|
|
6216
|
+
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
6217
|
})));
|
|
4440
6218
|
};
|
|
4441
6219
|
var _path$h;
|
|
@@ -4453,13 +6231,13 @@ function _extends$h() {
|
|
|
4453
6231
|
};
|
|
4454
6232
|
return _extends$h.apply(this, arguments);
|
|
4455
6233
|
}
|
|
4456
|
-
var
|
|
6234
|
+
var SvgLogoInstagram20 = function SvgLogoInstagram202(props) {
|
|
4457
6235
|
return /* @__PURE__ */ React.createElement("svg", _extends$h({
|
|
4458
6236
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4459
6237
|
width: 20,
|
|
4460
6238
|
height: 20
|
|
4461
6239
|
}, props), _path$h || (_path$h = /* @__PURE__ */ React.createElement("path", {
|
|
4462
|
-
d: "
|
|
6240
|
+
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
6241
|
})));
|
|
4464
6242
|
};
|
|
4465
6243
|
var _path$g;
|
|
@@ -4477,13 +6255,13 @@ function _extends$g() {
|
|
|
4477
6255
|
};
|
|
4478
6256
|
return _extends$g.apply(this, arguments);
|
|
4479
6257
|
}
|
|
4480
|
-
var
|
|
6258
|
+
var SvgLogoLinkedin20 = function SvgLogoLinkedin202(props) {
|
|
4481
6259
|
return /* @__PURE__ */ React.createElement("svg", _extends$g({
|
|
4482
6260
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4483
6261
|
width: 20,
|
|
4484
6262
|
height: 20
|
|
4485
6263
|
}, props), _path$g || (_path$g = /* @__PURE__ */ React.createElement("path", {
|
|
4486
|
-
d: "
|
|
6264
|
+
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
6265
|
})));
|
|
4488
6266
|
};
|
|
4489
6267
|
var _path$f;
|
|
@@ -4501,13 +6279,13 @@ function _extends$f() {
|
|
|
4501
6279
|
};
|
|
4502
6280
|
return _extends$f.apply(this, arguments);
|
|
4503
6281
|
}
|
|
4504
|
-
var
|
|
6282
|
+
var SvgLogoMedium20 = function SvgLogoMedium202(props) {
|
|
4505
6283
|
return /* @__PURE__ */ React.createElement("svg", _extends$f({
|
|
4506
6284
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4507
6285
|
width: 20,
|
|
4508
6286
|
height: 20
|
|
4509
6287
|
}, props), _path$f || (_path$f = /* @__PURE__ */ React.createElement("path", {
|
|
4510
|
-
d: "
|
|
6288
|
+
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
6289
|
})));
|
|
4512
6290
|
};
|
|
4513
6291
|
var _path$e;
|
|
@@ -4525,13 +6303,13 @@ function _extends$e() {
|
|
|
4525
6303
|
};
|
|
4526
6304
|
return _extends$e.apply(this, arguments);
|
|
4527
6305
|
}
|
|
4528
|
-
var
|
|
6306
|
+
var SvgLogoPinterest20 = function SvgLogoPinterest202(props) {
|
|
4529
6307
|
return /* @__PURE__ */ React.createElement("svg", _extends$e({
|
|
4530
6308
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4531
6309
|
width: 20,
|
|
4532
6310
|
height: 20
|
|
4533
6311
|
}, props), _path$e || (_path$e = /* @__PURE__ */ React.createElement("path", {
|
|
4534
|
-
d: "
|
|
6312
|
+
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
6313
|
})));
|
|
4536
6314
|
};
|
|
4537
6315
|
var _path$d;
|
|
@@ -4549,13 +6327,13 @@ function _extends$d() {
|
|
|
4549
6327
|
};
|
|
4550
6328
|
return _extends$d.apply(this, arguments);
|
|
4551
6329
|
}
|
|
4552
|
-
var
|
|
6330
|
+
var SvgLogoReddit20 = function SvgLogoReddit202(props) {
|
|
4553
6331
|
return /* @__PURE__ */ React.createElement("svg", _extends$d({
|
|
4554
6332
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4555
6333
|
width: 20,
|
|
4556
6334
|
height: 20
|
|
4557
6335
|
}, props), _path$d || (_path$d = /* @__PURE__ */ React.createElement("path", {
|
|
4558
|
-
d: "
|
|
6336
|
+
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
6337
|
})));
|
|
4560
6338
|
};
|
|
4561
6339
|
var _path$c;
|
|
@@ -4573,13 +6351,13 @@ function _extends$c() {
|
|
|
4573
6351
|
};
|
|
4574
6352
|
return _extends$c.apply(this, arguments);
|
|
4575
6353
|
}
|
|
4576
|
-
var
|
|
6354
|
+
var SvgLogoRss20 = function SvgLogoRss202(props) {
|
|
4577
6355
|
return /* @__PURE__ */ React.createElement("svg", _extends$c({
|
|
4578
6356
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4579
6357
|
width: 20,
|
|
4580
6358
|
height: 20
|
|
4581
6359
|
}, props), _path$c || (_path$c = /* @__PURE__ */ React.createElement("path", {
|
|
4582
|
-
d: "
|
|
6360
|
+
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
6361
|
})));
|
|
4584
6362
|
};
|
|
4585
6363
|
var _path$b;
|
|
@@ -4597,13 +6375,13 @@ function _extends$b() {
|
|
|
4597
6375
|
};
|
|
4598
6376
|
return _extends$b.apply(this, arguments);
|
|
4599
6377
|
}
|
|
4600
|
-
var
|
|
6378
|
+
var SvgLogoSnapchat20 = function SvgLogoSnapchat202(props) {
|
|
4601
6379
|
return /* @__PURE__ */ React.createElement("svg", _extends$b({
|
|
4602
6380
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4603
6381
|
width: 20,
|
|
4604
6382
|
height: 20
|
|
4605
6383
|
}, props), _path$b || (_path$b = /* @__PURE__ */ React.createElement("path", {
|
|
4606
|
-
d: "
|
|
6384
|
+
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
6385
|
})));
|
|
4608
6386
|
};
|
|
4609
6387
|
var _path$a;
|
|
@@ -4621,13 +6399,13 @@ function _extends$a() {
|
|
|
4621
6399
|
};
|
|
4622
6400
|
return _extends$a.apply(this, arguments);
|
|
4623
6401
|
}
|
|
4624
|
-
var
|
|
6402
|
+
var SvgLogoSoundcloud20 = function SvgLogoSoundcloud202(props) {
|
|
4625
6403
|
return /* @__PURE__ */ React.createElement("svg", _extends$a({
|
|
4626
6404
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4627
6405
|
width: 20,
|
|
4628
6406
|
height: 20
|
|
4629
6407
|
}, props), _path$a || (_path$a = /* @__PURE__ */ React.createElement("path", {
|
|
4630
|
-
d: "
|
|
6408
|
+
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
6409
|
})));
|
|
4632
6410
|
};
|
|
4633
6411
|
var _path$9;
|
|
@@ -4645,13 +6423,13 @@ function _extends$9() {
|
|
|
4645
6423
|
};
|
|
4646
6424
|
return _extends$9.apply(this, arguments);
|
|
4647
6425
|
}
|
|
4648
|
-
var
|
|
6426
|
+
var SvgLogoSpotify20 = function SvgLogoSpotify202(props) {
|
|
4649
6427
|
return /* @__PURE__ */ React.createElement("svg", _extends$9({
|
|
4650
6428
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4651
6429
|
width: 20,
|
|
4652
6430
|
height: 20
|
|
4653
6431
|
}, props), _path$9 || (_path$9 = /* @__PURE__ */ React.createElement("path", {
|
|
4654
|
-
d: "
|
|
6432
|
+
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
6433
|
})));
|
|
4656
6434
|
};
|
|
4657
6435
|
var _path$8;
|
|
@@ -4669,13 +6447,13 @@ function _extends$8() {
|
|
|
4669
6447
|
};
|
|
4670
6448
|
return _extends$8.apply(this, arguments);
|
|
4671
6449
|
}
|
|
4672
|
-
var
|
|
6450
|
+
var SvgLogoTelegram20 = function SvgLogoTelegram202(props) {
|
|
4673
6451
|
return /* @__PURE__ */ React.createElement("svg", _extends$8({
|
|
4674
6452
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4675
6453
|
width: 20,
|
|
4676
6454
|
height: 20
|
|
4677
6455
|
}, props), _path$8 || (_path$8 = /* @__PURE__ */ React.createElement("path", {
|
|
4678
|
-
d: "
|
|
6456
|
+
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
6457
|
})));
|
|
4680
6458
|
};
|
|
4681
6459
|
var _path$7;
|
|
@@ -4693,13 +6471,13 @@ function _extends$7() {
|
|
|
4693
6471
|
};
|
|
4694
6472
|
return _extends$7.apply(this, arguments);
|
|
4695
6473
|
}
|
|
4696
|
-
var
|
|
6474
|
+
var SvgLogoTumblr20 = function SvgLogoTumblr202(props) {
|
|
4697
6475
|
return /* @__PURE__ */ React.createElement("svg", _extends$7({
|
|
4698
6476
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4699
6477
|
width: 20,
|
|
4700
6478
|
height: 20
|
|
4701
6479
|
}, props), _path$7 || (_path$7 = /* @__PURE__ */ React.createElement("path", {
|
|
4702
|
-
d: "
|
|
6480
|
+
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
6481
|
})));
|
|
4704
6482
|
};
|
|
4705
6483
|
var _path$6;
|
|
@@ -4717,13 +6495,13 @@ function _extends$6() {
|
|
|
4717
6495
|
};
|
|
4718
6496
|
return _extends$6.apply(this, arguments);
|
|
4719
6497
|
}
|
|
4720
|
-
var
|
|
6498
|
+
var SvgLogoTwitch20 = function SvgLogoTwitch202(props) {
|
|
4721
6499
|
return /* @__PURE__ */ React.createElement("svg", _extends$6({
|
|
4722
6500
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4723
6501
|
width: 20,
|
|
4724
6502
|
height: 20
|
|
4725
6503
|
}, props), _path$6 || (_path$6 = /* @__PURE__ */ React.createElement("path", {
|
|
4726
|
-
d: "
|
|
6504
|
+
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
6505
|
})));
|
|
4728
6506
|
};
|
|
4729
6507
|
var _path$5;
|
|
@@ -4741,13 +6519,13 @@ function _extends$5() {
|
|
|
4741
6519
|
};
|
|
4742
6520
|
return _extends$5.apply(this, arguments);
|
|
4743
6521
|
}
|
|
4744
|
-
var
|
|
6522
|
+
var SvgLogoTwitter20 = function SvgLogoTwitter202(props) {
|
|
4745
6523
|
return /* @__PURE__ */ React.createElement("svg", _extends$5({
|
|
4746
6524
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4747
6525
|
width: 20,
|
|
4748
6526
|
height: 20
|
|
4749
6527
|
}, props), _path$5 || (_path$5 = /* @__PURE__ */ React.createElement("path", {
|
|
4750
|
-
d: "
|
|
6528
|
+
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
6529
|
})));
|
|
4752
6530
|
};
|
|
4753
6531
|
var _path$4;
|
|
@@ -4765,13 +6543,13 @@ function _extends$4() {
|
|
|
4765
6543
|
};
|
|
4766
6544
|
return _extends$4.apply(this, arguments);
|
|
4767
6545
|
}
|
|
4768
|
-
var
|
|
6546
|
+
var SvgLogoWhatsapp20 = function SvgLogoWhatsapp202(props) {
|
|
4769
6547
|
return /* @__PURE__ */ React.createElement("svg", _extends$4({
|
|
4770
6548
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4771
6549
|
width: 20,
|
|
4772
6550
|
height: 20
|
|
4773
6551
|
}, props), _path$4 || (_path$4 = /* @__PURE__ */ React.createElement("path", {
|
|
4774
|
-
d: "
|
|
6552
|
+
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
6553
|
})));
|
|
4776
6554
|
};
|
|
4777
6555
|
var _path$3;
|
|
@@ -4789,13 +6567,13 @@ function _extends$3() {
|
|
|
4789
6567
|
};
|
|
4790
6568
|
return _extends$3.apply(this, arguments);
|
|
4791
6569
|
}
|
|
4792
|
-
var
|
|
6570
|
+
var SvgLogoVimeo20 = function SvgLogoVimeo202(props) {
|
|
4793
6571
|
return /* @__PURE__ */ React.createElement("svg", _extends$3({
|
|
4794
6572
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4795
6573
|
width: 20,
|
|
4796
6574
|
height: 20
|
|
4797
6575
|
}, props), _path$3 || (_path$3 = /* @__PURE__ */ React.createElement("path", {
|
|
4798
|
-
d: "
|
|
6576
|
+
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
6577
|
})));
|
|
4800
6578
|
};
|
|
4801
6579
|
var _path$2;
|
|
@@ -4813,13 +6591,13 @@ function _extends$2() {
|
|
|
4813
6591
|
};
|
|
4814
6592
|
return _extends$2.apply(this, arguments);
|
|
4815
6593
|
}
|
|
4816
|
-
var
|
|
6594
|
+
var SvgLogoYelp20 = function SvgLogoYelp202(props) {
|
|
4817
6595
|
return /* @__PURE__ */ React.createElement("svg", _extends$2({
|
|
4818
6596
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4819
6597
|
width: 20,
|
|
4820
6598
|
height: 20
|
|
4821
6599
|
}, props), _path$2 || (_path$2 = /* @__PURE__ */ React.createElement("path", {
|
|
4822
|
-
d: "
|
|
6600
|
+
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
6601
|
})));
|
|
4824
6602
|
};
|
|
4825
6603
|
var _path$1;
|
|
@@ -4837,36 +6615,12 @@ function _extends$1() {
|
|
|
4837
6615
|
};
|
|
4838
6616
|
return _extends$1.apply(this, arguments);
|
|
4839
6617
|
}
|
|
4840
|
-
var
|
|
6618
|
+
var SvgLogoYoutube20 = function SvgLogoYoutube202(props) {
|
|
4841
6619
|
return /* @__PURE__ */ React.createElement("svg", _extends$1({
|
|
4842
6620
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4843
6621
|
width: 20,
|
|
4844
6622
|
height: 20
|
|
4845
6623
|
}, 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
6624
|
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
6625
|
})));
|
|
4872
6626
|
};
|
|
@@ -5006,7 +6760,7 @@ function SocialLinksPlaceholder({
|
|
|
5006
6760
|
}, link.id))
|
|
5007
6761
|
});
|
|
5008
6762
|
}
|
|
5009
|
-
const Container = styled.div`
|
|
6763
|
+
const Container$1 = styled.div`
|
|
5010
6764
|
display: flex;
|
|
5011
6765
|
flex-direction: row;
|
|
5012
6766
|
flex-wrap: wrap;
|
|
@@ -5090,7 +6844,7 @@ const SocialLinks = forwardRef(function SocialLinks2({
|
|
|
5090
6844
|
}, ref) {
|
|
5091
6845
|
const fillData = useColor(fill);
|
|
5092
6846
|
const backgroundColorData = useColor(backgroundColor);
|
|
5093
|
-
return /* @__PURE__ */ jsx(Container, {
|
|
6847
|
+
return /* @__PURE__ */ jsx(Container$1, {
|
|
5094
6848
|
ref,
|
|
5095
6849
|
id,
|
|
5096
6850
|
alignment,
|
|
@@ -5126,7 +6880,7 @@ const SocialLinks = forwardRef(function SocialLinks2({
|
|
|
5126
6880
|
})
|
|
5127
6881
|
});
|
|
5128
6882
|
});
|
|
5129
|
-
function registerComponent$
|
|
6883
|
+
function registerComponent$2(runtime) {
|
|
5130
6884
|
return runtime.registerComponent(SocialLinks, {
|
|
5131
6885
|
type: "./components/SocialLinks/index.js",
|
|
5132
6886
|
label: "Social Links",
|
|
@@ -5374,10 +7128,10 @@ const Span = styled.span`
|
|
|
5374
7128
|
`}
|
|
5375
7129
|
`, shallowMergeFallbacks)}
|
|
5376
7130
|
`;
|
|
5377
|
-
function Mark(
|
|
5378
|
-
var
|
|
7131
|
+
function Mark(__) {
|
|
7132
|
+
var _$ = __, {
|
|
5379
7133
|
value
|
|
5380
|
-
} =
|
|
7134
|
+
} = _$, restOfProps = __objRest(_$, [
|
|
5381
7135
|
"value"
|
|
5382
7136
|
]);
|
|
5383
7137
|
const typographyStyle = useTypographyMark(value);
|
|
@@ -5415,10 +7169,10 @@ const StyledBlock = styled.div`
|
|
|
5415
7169
|
border-left: 5px solid rgba(0, 0, 0, 0.1);
|
|
5416
7170
|
` : ""}
|
|
5417
7171
|
`;
|
|
5418
|
-
var Block = forwardRef(function Block2(
|
|
5419
|
-
var
|
|
7172
|
+
var Block = forwardRef(function Block2(_aa, ref) {
|
|
7173
|
+
var _ba = _aa, {
|
|
5420
7174
|
textAlign
|
|
5421
|
-
} =
|
|
7175
|
+
} = _ba, restOfProps = __objRest(_ba, [
|
|
5422
7176
|
"textAlign"
|
|
5423
7177
|
]);
|
|
5424
7178
|
return /* @__PURE__ */ jsx(StyledBlock, __spreadProps(__spreadValues({}, restOfProps), {
|
|
@@ -5543,10 +7297,10 @@ function Inlines() {
|
|
|
5543
7297
|
}
|
|
5544
7298
|
};
|
|
5545
7299
|
}
|
|
5546
|
-
const RichTextEditor = styled(forwardRef(function RichTextEditor2(
|
|
5547
|
-
var
|
|
7300
|
+
const RichTextEditor = styled(forwardRef(function RichTextEditor2(_ca, ref) {
|
|
7301
|
+
var _da = _ca, {
|
|
5548
7302
|
placeholder: placeholder2 = "Write some text..."
|
|
5549
|
-
} =
|
|
7303
|
+
} = _da, restOfProps = __objRest(_da, [
|
|
5550
7304
|
"placeholder"
|
|
5551
7305
|
]);
|
|
5552
7306
|
const plugins = useMemo(() => [Lists(), LinkPlugin(), Inlines(), DeviceOverridesBlockPlugin(), DeviceOverridesMarksPlugin()], []);
|
|
@@ -5663,7 +7417,7 @@ const Text = forwardRef(function Text2({
|
|
|
5663
7417
|
onKeyDown: handleKeyDown
|
|
5664
7418
|
});
|
|
5665
7419
|
});
|
|
5666
|
-
function registerComponent(runtime) {
|
|
7420
|
+
function registerComponent$1(runtime) {
|
|
5667
7421
|
return runtime.registerComponent(Text, {
|
|
5668
7422
|
type: "./components/Text/index.js",
|
|
5669
7423
|
label: "Text",
|
|
@@ -5741,18 +7495,103 @@ function registerComponent(runtime) {
|
|
|
5741
7495
|
}
|
|
5742
7496
|
});
|
|
5743
7497
|
}
|
|
7498
|
+
const Container = styled.div`
|
|
7499
|
+
display: flex;
|
|
7500
|
+
flex-direction: column;
|
|
7501
|
+
overflow: hidden;
|
|
7502
|
+
${cssWidth("560px")}
|
|
7503
|
+
${cssMargin()}
|
|
7504
|
+
${cssBorderRadius()}
|
|
7505
|
+
`;
|
|
7506
|
+
const ASPECT_RATIO = 16 / 9;
|
|
7507
|
+
const Video = forwardRef(function Video2({
|
|
7508
|
+
id,
|
|
7509
|
+
video,
|
|
7510
|
+
width,
|
|
7511
|
+
margin,
|
|
7512
|
+
borderRadius
|
|
7513
|
+
}, ref) {
|
|
7514
|
+
const canPlayUrl = video && video.url != null && ReactPlayer.canPlay(video.url);
|
|
7515
|
+
return /* @__PURE__ */ jsx(Container, {
|
|
7516
|
+
ref,
|
|
7517
|
+
id,
|
|
7518
|
+
width,
|
|
7519
|
+
margin,
|
|
7520
|
+
borderRadius,
|
|
7521
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
7522
|
+
style: {
|
|
7523
|
+
position: "relative",
|
|
7524
|
+
paddingTop: `${100 / ASPECT_RATIO}%`
|
|
7525
|
+
},
|
|
7526
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
7527
|
+
style: {
|
|
7528
|
+
position: "absolute",
|
|
7529
|
+
top: 0,
|
|
7530
|
+
left: 0,
|
|
7531
|
+
right: 0,
|
|
7532
|
+
bottom: 0
|
|
7533
|
+
},
|
|
7534
|
+
children: canPlayUrl === true ? /* @__PURE__ */ jsx(ReactPlayer, __spreadProps(__spreadValues({}, video), {
|
|
7535
|
+
width: "100%",
|
|
7536
|
+
height: "100%",
|
|
7537
|
+
config: {
|
|
7538
|
+
vimeo: {
|
|
7539
|
+
playerOptions: {
|
|
7540
|
+
background: video != null && !video.controls
|
|
7541
|
+
}
|
|
7542
|
+
},
|
|
7543
|
+
wistia: {
|
|
7544
|
+
options: {
|
|
7545
|
+
endVideoBehavior: video != null && video.loop === true ? "loop" : "default"
|
|
7546
|
+
}
|
|
7547
|
+
}
|
|
7548
|
+
}
|
|
7549
|
+
})) : /* @__PURE__ */ jsx("img", {
|
|
7550
|
+
width: "100%",
|
|
7551
|
+
src: placeholders.video.src,
|
|
7552
|
+
alt: "Video Placeholder"
|
|
7553
|
+
})
|
|
7554
|
+
})
|
|
7555
|
+
})
|
|
7556
|
+
});
|
|
7557
|
+
});
|
|
7558
|
+
function registerComponent(runtime) {
|
|
7559
|
+
return runtime.registerComponent(Video, {
|
|
7560
|
+
type: "./components/Video/index.js",
|
|
7561
|
+
label: "Video",
|
|
7562
|
+
icon: "Video40",
|
|
7563
|
+
props: {
|
|
7564
|
+
id: ElementID(),
|
|
7565
|
+
video: Video$1({
|
|
7566
|
+
preset: {
|
|
7567
|
+
controls: true
|
|
7568
|
+
}
|
|
7569
|
+
}),
|
|
7570
|
+
width: Width({
|
|
7571
|
+
defaultValue: {
|
|
7572
|
+
value: 560,
|
|
7573
|
+
unit: "px"
|
|
7574
|
+
}
|
|
7575
|
+
}),
|
|
7576
|
+
margin: Margin(),
|
|
7577
|
+
borderRadius: BorderRadius()
|
|
7578
|
+
}
|
|
7579
|
+
});
|
|
7580
|
+
}
|
|
5744
7581
|
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
|
|
7582
|
+
const unregisterBoxComponent = registerComponent$c(runtime);
|
|
7583
|
+
const unregisterButtonComponent = registerComponent$b(runtime);
|
|
7584
|
+
const unregisterCarouselComponent = registerComponent$9(runtime);
|
|
7585
|
+
const unregisterCountdownComponent = registerComponent$8(runtime);
|
|
7586
|
+
const unregisterDividerComponent = registerComponent$7(runtime);
|
|
7587
|
+
const unregisterEmbedComponent = registerComponent$6(runtime);
|
|
7588
|
+
const unregisterFormComponent = registerComponent$5(runtime);
|
|
7589
|
+
const unregisterImageComponent = registerComponent$a(runtime);
|
|
7590
|
+
const unregisterNavigationComponent = registerComponent$4(runtime);
|
|
7591
|
+
const unregisterRootComponent = registerComponent$3(runtime);
|
|
7592
|
+
const unregisterSocialLinksComponent = registerComponent$2(runtime);
|
|
7593
|
+
const unregisterTextComponent = registerComponent$1(runtime);
|
|
7594
|
+
const unregisterVideoComponent = registerComponent(runtime);
|
|
5756
7595
|
return () => {
|
|
5757
7596
|
unregisterBoxComponent();
|
|
5758
7597
|
unregisterButtonComponent();
|
|
@@ -5760,13 +7599,66 @@ function registerBuiltinComponents(runtime) {
|
|
|
5760
7599
|
unregisterCountdownComponent();
|
|
5761
7600
|
unregisterDividerComponent();
|
|
5762
7601
|
unregisterEmbedComponent();
|
|
7602
|
+
unregisterFormComponent();
|
|
5763
7603
|
unregisterImageComponent();
|
|
5764
7604
|
unregisterNavigationComponent();
|
|
5765
7605
|
unregisterRootComponent();
|
|
5766
7606
|
unregisterSocialLinksComponent();
|
|
5767
7607
|
unregisterTextComponent();
|
|
7608
|
+
unregisterTextComponent();
|
|
7609
|
+
unregisterVideoComponent();
|
|
5768
7610
|
};
|
|
5769
7611
|
}
|
|
7612
|
+
var _path;
|
|
7613
|
+
function _extends() {
|
|
7614
|
+
_extends = Object.assign || function(target) {
|
|
7615
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
7616
|
+
var source = arguments[i];
|
|
7617
|
+
for (var key in source) {
|
|
7618
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7619
|
+
target[key] = source[key];
|
|
7620
|
+
}
|
|
7621
|
+
}
|
|
7622
|
+
}
|
|
7623
|
+
return target;
|
|
7624
|
+
};
|
|
7625
|
+
return _extends.apply(this, arguments);
|
|
7626
|
+
}
|
|
7627
|
+
var SvgWarning20 = function SvgWarning202(props) {
|
|
7628
|
+
return /* @__PURE__ */ React.createElement("svg", _extends({
|
|
7629
|
+
width: 20,
|
|
7630
|
+
height: 20,
|
|
7631
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
7632
|
+
}, props), _path || (_path = /* @__PURE__ */ React.createElement("path", {
|
|
7633
|
+
fillRule: "evenodd",
|
|
7634
|
+
clipRule: "evenodd",
|
|
7635
|
+
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"
|
|
7636
|
+
})));
|
|
7637
|
+
};
|
|
7638
|
+
const ErrorDiv = styled("div")`
|
|
7639
|
+
width: 100%;
|
|
7640
|
+
height: 54px;
|
|
7641
|
+
background-color: #fcedf2;
|
|
7642
|
+
border-radius: 6px;
|
|
7643
|
+
padding: 16px;
|
|
7644
|
+
display: flex;
|
|
7645
|
+
align-items: center;
|
|
7646
|
+
gap: 8px;
|
|
7647
|
+
color: #c73e6d;
|
|
7648
|
+
fill: currentColor;
|
|
7649
|
+
font-family: Heebo, sans-serif;
|
|
7650
|
+
font-size: 16px;
|
|
7651
|
+
`;
|
|
7652
|
+
const FallbackComponent = forwardRef(function FallbackComponent2({
|
|
7653
|
+
text
|
|
7654
|
+
}, ref) {
|
|
7655
|
+
return /* @__PURE__ */ jsxs(ErrorDiv, {
|
|
7656
|
+
ref,
|
|
7657
|
+
children: [/* @__PURE__ */ jsx(SvgWarning20, {}), /* @__PURE__ */ jsx("span", {
|
|
7658
|
+
children: text
|
|
7659
|
+
})]
|
|
7660
|
+
});
|
|
7661
|
+
});
|
|
5770
7662
|
const contextDefaultValue = configureStore();
|
|
5771
7663
|
function createReactRuntime(store) {
|
|
5772
7664
|
return {
|
|
@@ -5793,10 +7685,9 @@ function createReactRuntime(store) {
|
|
|
5793
7685
|
const ReactRuntime = createReactRuntime(contextDefaultValue);
|
|
5794
7686
|
const Context = createContext(contextDefaultValue);
|
|
5795
7687
|
function RuntimeProvider({
|
|
7688
|
+
client,
|
|
5796
7689
|
children,
|
|
5797
|
-
defaultRootElements
|
|
5798
|
-
registerComponents,
|
|
5799
|
-
makeswiftApiEndpoint
|
|
7690
|
+
defaultRootElements
|
|
5800
7691
|
}) {
|
|
5801
7692
|
const [store, setStore] = useState(() => {
|
|
5802
7693
|
const store2 = configureStore({
|
|
@@ -5805,27 +7696,11 @@ function RuntimeProvider({
|
|
|
5805
7696
|
});
|
|
5806
7697
|
const runtime = createReactRuntime(store2);
|
|
5807
7698
|
registerBuiltinComponents(runtime);
|
|
5808
|
-
registerComponents == null ? void 0 : registerComponents(runtime);
|
|
5809
7699
|
return store2;
|
|
5810
7700
|
});
|
|
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
7701
|
useEffect(() => {
|
|
5824
7702
|
return registerBuiltinComponents(createReactRuntime(store));
|
|
5825
7703
|
}, [store]);
|
|
5826
|
-
useEffect(() => {
|
|
5827
|
-
return registerComponents == null ? void 0 : registerComponents(createReactRuntime(store));
|
|
5828
|
-
}, [store, registerComponents]);
|
|
5829
7704
|
useEffect(() => {
|
|
5830
7705
|
const isInBuilder = window.parent !== window;
|
|
5831
7706
|
if (isInBuilder)
|
|
@@ -5834,7 +7709,7 @@ function RuntimeProvider({
|
|
|
5834
7709
|
const ReactBuilderPreview = await import("./react-builder-preview.es.js");
|
|
5835
7710
|
setStore((store2) => ReactBuilderPreview.configureStore({
|
|
5836
7711
|
preloadedState: store2.getState(),
|
|
5837
|
-
client
|
|
7712
|
+
client: client.apolloClient
|
|
5838
7713
|
}));
|
|
5839
7714
|
}
|
|
5840
7715
|
}, [client]);
|
|
@@ -5861,7 +7736,7 @@ function RuntimeProvider({
|
|
|
5861
7736
|
}, []);
|
|
5862
7737
|
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
5863
7738
|
value: store,
|
|
5864
|
-
children: /* @__PURE__ */ jsx(
|
|
7739
|
+
children: /* @__PURE__ */ jsx(MakeswiftProvider, {
|
|
5865
7740
|
client,
|
|
5866
7741
|
children
|
|
5867
7742
|
})
|
|
@@ -5901,8 +7776,8 @@ function useElementId(elementKey) {
|
|
|
5901
7776
|
const documentKey = useDocumentKey();
|
|
5902
7777
|
return useSelector((state) => documentKey == null || elementKey == null ? null : getElementId(state, documentKey, elementKey));
|
|
5903
7778
|
}
|
|
5904
|
-
function
|
|
5905
|
-
return useSelector((state) =>
|
|
7779
|
+
function useDocument(documentKey) {
|
|
7780
|
+
return useSelector((state) => getDocument(state, documentKey));
|
|
5906
7781
|
}
|
|
5907
7782
|
function useIsInBuilder() {
|
|
5908
7783
|
return useSelector((state) => getIsInBuilder(state));
|
|
@@ -5916,15 +7791,9 @@ const ElementData = memo(forwardRef(function ElementData2({
|
|
|
5916
7791
|
}, ref) {
|
|
5917
7792
|
const Component = useComponent(elementData.type);
|
|
5918
7793
|
if (Component == null) {
|
|
5919
|
-
return /* @__PURE__ */
|
|
7794
|
+
return /* @__PURE__ */ jsx(FallbackComponent, {
|
|
5920
7795
|
ref,
|
|
5921
|
-
|
|
5922
|
-
children: "Component Not Found"
|
|
5923
|
-
}), /* @__PURE__ */ jsx("pre", {
|
|
5924
|
-
children: /* @__PURE__ */ jsx("code", {
|
|
5925
|
-
children: JSON.stringify(elementData, null, 2)
|
|
5926
|
-
})
|
|
5927
|
-
})]
|
|
7796
|
+
text: "Component not found"
|
|
5928
7797
|
});
|
|
5929
7798
|
}
|
|
5930
7799
|
return /* @__PURE__ */ createElement(Component, __spreadProps(__spreadValues({}, elementData.props), {
|
|
@@ -5935,24 +7804,52 @@ const ElementData = memo(forwardRef(function ElementData2({
|
|
|
5935
7804
|
const ElementReference = memo(forwardRef(function ElementReference2({
|
|
5936
7805
|
elementReference
|
|
5937
7806
|
}, ref) {
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
7807
|
+
var _a;
|
|
7808
|
+
const {
|
|
7809
|
+
error,
|
|
7810
|
+
data
|
|
7811
|
+
} = useQuery(gql`
|
|
7812
|
+
query ElementReferenceGlobalElement($id: ID!) {
|
|
7813
|
+
globalElement(id: $id) {
|
|
7814
|
+
id
|
|
7815
|
+
data
|
|
7816
|
+
}
|
|
7817
|
+
}
|
|
7818
|
+
`, {
|
|
7819
|
+
variables: {
|
|
7820
|
+
id: elementReference.value
|
|
7821
|
+
}
|
|
7822
|
+
});
|
|
7823
|
+
const globalElementData = (_a = data == null ? void 0 : data.globalElement) == null ? void 0 : _a.data;
|
|
7824
|
+
const elementReferenceDocument = useDocument(elementReference.key);
|
|
7825
|
+
if (error != null) {
|
|
7826
|
+
return /* @__PURE__ */ jsx(FallbackComponent, {
|
|
7827
|
+
ref,
|
|
7828
|
+
text: "Something went wrong!"
|
|
7829
|
+
});
|
|
7830
|
+
}
|
|
7831
|
+
if (globalElementData == null) {
|
|
7832
|
+
return /* @__PURE__ */ jsx(FallbackComponent, {
|
|
7833
|
+
ref,
|
|
7834
|
+
text: "This global component doesn't exist"
|
|
7835
|
+
});
|
|
7836
|
+
}
|
|
7837
|
+
return elementReferenceDocument != null ? /* @__PURE__ */ jsx(Document, {
|
|
7838
|
+
document: elementReferenceDocument,
|
|
7839
|
+
ref
|
|
7840
|
+
}) : /* @__PURE__ */ jsx(ElementData, {
|
|
7841
|
+
elementData: globalElementData,
|
|
7842
|
+
ref
|
|
5947
7843
|
});
|
|
5948
7844
|
}));
|
|
5949
|
-
const Element$1 = memo(function Element2({
|
|
7845
|
+
const Element$1 = memo(forwardRef(function Element2({
|
|
5950
7846
|
element
|
|
5951
|
-
}) {
|
|
7847
|
+
}, ref) {
|
|
5952
7848
|
const elementKey = element.key;
|
|
5953
7849
|
const dispatch = useDispatch();
|
|
5954
7850
|
const documentKey = useDocumentKey();
|
|
5955
7851
|
const [handle, setHandle] = useState(null);
|
|
7852
|
+
useImperativeHandle(ref, () => handle, [handle]);
|
|
5956
7853
|
useEffect(() => {
|
|
5957
7854
|
if (documentKey == null)
|
|
5958
7855
|
return;
|
|
@@ -5970,30 +7867,32 @@ const Element$1 = memo(function Element2({
|
|
|
5970
7867
|
ref: setHandle,
|
|
5971
7868
|
elementData: element
|
|
5972
7869
|
}, elementKey);
|
|
5973
|
-
});
|
|
5974
|
-
const Document = memo(function Document2({
|
|
5975
|
-
|
|
5976
|
-
}) {
|
|
5977
|
-
const documentRootElement = useDocumentRootElement(documentKey);
|
|
5978
|
-
if (documentRootElement == null) {
|
|
5979
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
5980
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
5981
|
-
children: "Document Not Found"
|
|
5982
|
-
}), /* @__PURE__ */ jsx("pre", {
|
|
5983
|
-
children: /* @__PURE__ */ jsx("code", {
|
|
5984
|
-
children: JSON.stringify({
|
|
5985
|
-
documentKey
|
|
5986
|
-
}, null, 2)
|
|
5987
|
-
})
|
|
5988
|
-
})]
|
|
5989
|
-
});
|
|
5990
|
-
}
|
|
7870
|
+
}));
|
|
7871
|
+
const Document = memo(forwardRef(function Document2({
|
|
7872
|
+
document
|
|
7873
|
+
}, ref) {
|
|
5991
7874
|
return /* @__PURE__ */ jsx(DocumentContext.Provider, {
|
|
5992
|
-
value:
|
|
7875
|
+
value: document.key,
|
|
5993
7876
|
children: /* @__PURE__ */ jsx(Element$1, {
|
|
5994
|
-
|
|
7877
|
+
ref,
|
|
7878
|
+
element: document.rootElement
|
|
5995
7879
|
})
|
|
5996
7880
|
});
|
|
5997
|
-
});
|
|
5998
|
-
|
|
7881
|
+
}));
|
|
7882
|
+
const DocumentReference = memo(forwardRef(function DocumentReference2({
|
|
7883
|
+
documentReference
|
|
7884
|
+
}, ref) {
|
|
7885
|
+
const document = useDocument(documentReference.key);
|
|
7886
|
+
if (document == null) {
|
|
7887
|
+
return /* @__PURE__ */ jsx(FallbackComponent, {
|
|
7888
|
+
ref,
|
|
7889
|
+
text: "Document not found"
|
|
7890
|
+
});
|
|
7891
|
+
}
|
|
7892
|
+
return /* @__PURE__ */ jsx(Document, {
|
|
7893
|
+
ref,
|
|
7894
|
+
document
|
|
7895
|
+
});
|
|
7896
|
+
}));
|
|
7897
|
+
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 };
|
|
5999
7898
|
//# sourceMappingURL=react.es2.js.map
|