@makeswift/runtime 0.0.0-6baa2a2 → 0.0.0-7d64672
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/builder.js +1 -0
- package/dist/Page.cjs.js +215 -0
- package/dist/Page.cjs.js.map +1 -0
- package/dist/Page.es.js +209 -0
- package/dist/Page.es.js.map +1 -0
- package/dist/actions.cjs.js +34 -2
- package/dist/actions.cjs.js.map +1 -1
- package/dist/actions.es.js +29 -2
- package/dist/actions.es.js.map +1 -1
- package/dist/api.cjs.js +1 -2
- package/dist/api.cjs.js.map +1 -1
- package/dist/box-model.cjs.js +1 -2
- package/dist/box-model.cjs.js.map +1 -1
- package/dist/box-models.cjs.js +2 -0
- package/dist/box-models.cjs.js.map +1 -1
- package/dist/box-models.es.js +2 -0
- package/dist/box-models.es.js.map +1 -1
- package/dist/builder.cjs.js +9 -0
- package/dist/builder.cjs.js.map +1 -0
- package/dist/builder.es.js +3 -0
- package/dist/builder.es.js.map +1 -0
- package/dist/components.cjs.js +18 -3
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.es.js +8 -2
- package/dist/components.es.js.map +1 -1
- package/dist/constants.cjs.js +96 -1
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.es.js +96 -1
- package/dist/constants.es.js.map +1 -1
- package/dist/control-serialization.cjs.js +147 -0
- package/dist/control-serialization.cjs.js.map +1 -0
- package/dist/control-serialization.es.js +143 -0
- package/dist/control-serialization.es.js.map +1 -0
- package/dist/descriptors.cjs.js +10 -3
- package/dist/descriptors.cjs.js.map +1 -1
- package/dist/descriptors.es.js +8 -4
- package/dist/descriptors.es.js.map +1 -1
- package/dist/instances.cjs.js +17 -0
- package/dist/instances.cjs.js.map +1 -1
- package/dist/instances.es.js +17 -1
- package/dist/instances.es.js.map +1 -1
- package/dist/main.cjs.js +10 -2
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +5 -1
- package/dist/main.es.js.map +1 -1
- package/dist/next.cjs.js +40 -18
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +40 -17
- package/dist/next.es.js.map +1 -1
- package/dist/prop-controllers.cjs.js +2 -2
- package/dist/prop-controllers.es.js +1 -1
- package/dist/react-builder-preview.cjs.js +36 -39
- package/dist/react-builder-preview.cjs.js.map +1 -1
- package/dist/react-builder-preview.es.js +34 -37
- package/dist/react-builder-preview.es.js.map +1 -1
- package/dist/react-page.cjs.js +262 -0
- package/dist/react-page.cjs.js.map +1 -0
- package/dist/react-page.es.js +241 -0
- package/dist/react-page.es.js.map +1 -0
- package/dist/react.cjs.js +10 -4
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.cjs2.js +2424 -534
- package/dist/react.cjs2.js.map +1 -1
- package/dist/react.es.js +7 -2
- package/dist/react.es.js.map +1 -1
- package/dist/react.es2.js +2413 -525
- package/dist/react.es2.js.map +1 -1
- package/dist/types/api/constants.d.ts.map +1 -1
- package/dist/types/api/generated/graphql.d.ts +59 -0
- package/dist/types/api/generated/graphql.d.ts.map +1 -1
- package/dist/types/api/react.d.ts +24 -4
- package/dist/types/api/react.d.ts.map +1 -1
- package/dist/types/api/types.d.ts +2 -2
- package/dist/types/api/types.d.ts.map +1 -1
- package/dist/types/builder/index.d.ts +2 -0
- package/dist/types/builder/index.d.ts.map +1 -0
- package/dist/types/builder/serialization/control-serialization.d.ts +78 -0
- package/dist/types/builder/serialization/control-serialization.d.ts.map +1 -0
- package/dist/types/builder/serialization/function-serialization.d.ts +11 -0
- package/dist/types/builder/serialization/function-serialization.d.ts.map +1 -0
- package/dist/types/builder/serialization/index.d.ts +3 -0
- package/dist/types/builder/serialization/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/Form.d.ts +41 -0
- package/dist/types/components/builtin/Form/Form.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +15 -0
- package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts +15 -0
- package/dist/types/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts +14 -0
- package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts +16 -0
- package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts +10 -0
- package/dist/types/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts +23 -0
- package/dist/types/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts +3 -0
- package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts +17 -0
- package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts +23 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts +19 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts +24 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts +13 -0
- package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/URLTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/URLTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/index.d.ts +19 -0
- package/dist/types/components/builtin/Form/components/Field/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Placeholder/index.d.ts +9 -0
- package/dist/types/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Spinner/index.d.ts +3 -0
- package/dist/types/components/builtin/Form/components/Spinner/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/context/FormContext.d.ts +32 -0
- package/dist/types/components/builtin/Form/context/FormContext.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/index.d.ts +2 -0
- package/dist/types/components/builtin/Form/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/prop-controllers.d.ts +1 -0
- package/dist/types/components/builtin/Form/prop-controllers.d.ts.map +1 -0
- package/dist/types/components/builtin/Video/Video.d.ts +15 -0
- package/dist/types/components/builtin/Video/Video.d.ts.map +1 -0
- package/dist/types/components/builtin/Video/index.d.ts +2 -0
- package/dist/types/components/builtin/Video/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Video/prop-controllers.d.ts +50 -0
- package/dist/types/components/builtin/Video/prop-controllers.d.ts.map +1 -0
- package/dist/types/components/builtin/index.d.ts +1 -0
- package/dist/types/components/builtin/index.d.ts.map +1 -1
- package/dist/types/components/hooks/index.d.ts +1 -0
- package/dist/types/components/hooks/index.d.ts.map +1 -1
- package/dist/types/components/hooks/useTable.d.ts +66 -0
- package/dist/types/components/hooks/useTable.d.ts.map +1 -0
- package/dist/types/components/hooks/useTableFormFieldRefs.d.ts +8 -0
- package/dist/types/components/hooks/useTableFormFieldRefs.d.ts.map +1 -0
- package/dist/types/components/hooks/useTableWorkspace.d.ts +14 -0
- package/dist/types/components/hooks/useTableWorkspace.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/page/BodySnippet.d.ts +7 -0
- package/dist/types/components/page/BodySnippet.d.ts.map +1 -0
- package/dist/types/components/page/Page.d.ts +45 -0
- package/dist/types/components/page/Page.d.ts.map +1 -0
- package/dist/types/components/page/index.d.ts +2 -0
- package/dist/types/components/page/index.d.ts.map +1 -0
- package/dist/types/components/shared/FallbackComponent/FallbackComponent.d.ts +7 -0
- package/dist/types/components/shared/FallbackComponent/FallbackComponent.d.ts.map +1 -0
- package/dist/types/components/shared/FallbackComponent/index.d.ts +2 -0
- package/dist/types/components/shared/FallbackComponent/index.d.ts.map +1 -0
- package/dist/types/components/utils/layout.d.ts +16 -0
- package/dist/types/components/utils/layout.d.ts.map +1 -0
- package/dist/types/components/utils/placeholders.d.ts +7 -0
- package/dist/types/components/utils/placeholders.d.ts.map +1 -1
- package/dist/types/components/utils/pollAnimationFrame.d.ts +2 -0
- package/dist/types/components/utils/pollAnimationFrame.d.ts.map +1 -0
- package/dist/types/components/utils/pollElementLayout.d.ts +8 -0
- package/dist/types/components/utils/pollElementLayout.d.ts.map +1 -0
- package/dist/types/components/utils/queries.d.ts +1 -0
- package/dist/types/components/utils/queries.d.ts.map +1 -1
- package/dist/types/components/utils/requestBatchedAnimationFrame.d.ts +4 -0
- package/dist/types/components/utils/requestBatchedAnimationFrame.d.ts.map +1 -0
- package/dist/types/components/utils/types.d.ts +1 -2
- package/dist/types/components/utils/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/next.d.ts +6 -4
- package/dist/types/next.d.ts.map +1 -1
- package/dist/types/prop-controllers/descriptors.d.ts +31 -12
- package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/prop-controllers/index.d.ts +3 -3
- package/dist/types/prop-controllers/index.d.ts.map +1 -1
- package/dist/types/prop-controllers/instances.d.ts +36 -4
- package/dist/types/prop-controllers/instances.d.ts.map +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/react.d.ts.map +1 -1
- package/dist/types/runtimes/page.d.ts +9 -0
- package/dist/types/runtimes/page.d.ts.map +1 -0
- package/dist/types/runtimes/react.d.ts +15 -8
- package/dist/types/runtimes/react.d.ts.map +1 -1
- package/dist/types/state/actions.d.ts +55 -1
- package/dist/types/state/actions.d.ts.map +1 -1
- package/dist/types/state/modules/box-models.d.ts.map +1 -1
- package/dist/types/state/modules/read-only-documents.d.ts +8 -4
- package/dist/types/state/modules/read-only-documents.d.ts.map +1 -1
- package/dist/types/state/modules/read-write-documents.d.ts +1 -1
- package/dist/types/state/modules/read-write-documents.d.ts.map +1 -1
- package/dist/types/state/react-builder-preview.d.ts.map +1 -1
- package/dist/types/state/react-page.d.ts +3 -3
- package/dist/types/state/react-page.d.ts.map +1 -1
- package/dist/types/utils/get-redirect-match.d.ts +10 -0
- package/dist/types/utils/get-redirect-match.d.ts.map +1 -0
- package/dist/types/utils/get-redirect-match.test.d.ts +1 -0
- package/dist/types/utils/get-redirect-match.test.d.ts.map +1 -0
- package/package.json +19 -6
package/dist/react.cjs2.js
CHANGED
|
@@ -30,25 +30,32 @@ var __objRest = (source, exclude) => {
|
|
|
30
30
|
}
|
|
31
31
|
return target;
|
|
32
32
|
};
|
|
33
|
+
var __publicField = (obj, key, value) => {
|
|
34
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
35
|
+
return value;
|
|
36
|
+
};
|
|
33
37
|
var React = require("react");
|
|
34
38
|
var withSelector = require("use-sync-external-store/shim/with-selector");
|
|
35
39
|
var client = require("@apollo/client");
|
|
36
|
-
var
|
|
37
|
-
var thunk = require("redux-thunk");
|
|
40
|
+
var reactPage = require("./react-page.cjs.js");
|
|
38
41
|
var actions = require("./actions.cjs.js");
|
|
39
|
-
var descriptors = require("./descriptors.cjs.js");
|
|
40
42
|
var styled = require("styled-components");
|
|
41
43
|
var framerMotion = require("framer-motion");
|
|
44
|
+
var ssr = require("@apollo/client/react/ssr");
|
|
45
|
+
var uuid = require("uuid/v4");
|
|
42
46
|
var jsxRuntime = require("react/jsx-runtime");
|
|
47
|
+
require("html-react-parser");
|
|
48
|
+
require("next/head");
|
|
43
49
|
var boxModels = require("./box-models.cjs.js");
|
|
44
50
|
var NextImage = require("next/image");
|
|
45
51
|
var ReactPlayer = require("react-player");
|
|
52
|
+
var descriptors = require("./descriptors.cjs.js");
|
|
46
53
|
var ColorHelper = require("color");
|
|
47
54
|
var scrollIntoView = require("scroll-into-view-if-needed");
|
|
48
55
|
var NextLink = require("next/link");
|
|
49
56
|
var reactUseGesture = require("react-use-gesture");
|
|
50
57
|
var popcorn = require("@popmotion/popcorn");
|
|
51
|
-
var
|
|
58
|
+
var formik = require("formik");
|
|
52
59
|
var polished = require("polished");
|
|
53
60
|
var slate = require("slate");
|
|
54
61
|
var Hotkeys = require("slate-hotkeys");
|
|
@@ -61,7 +68,7 @@ function _interopDefaultLegacy(e) {
|
|
|
61
68
|
function _interopNamespace(e) {
|
|
62
69
|
if (e && e.__esModule)
|
|
63
70
|
return e;
|
|
64
|
-
var n =
|
|
71
|
+
var n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
65
72
|
if (e) {
|
|
66
73
|
Object.keys(e).forEach(function(k) {
|
|
67
74
|
if (k !== "default") {
|
|
@@ -79,224 +86,16 @@ function _interopNamespace(e) {
|
|
|
79
86
|
return Object.freeze(n);
|
|
80
87
|
}
|
|
81
88
|
var React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
|
82
|
-
var thunk__default = /* @__PURE__ */ _interopDefaultLegacy(thunk);
|
|
83
89
|
var styled__default = /* @__PURE__ */ _interopDefaultLegacy(styled);
|
|
90
|
+
var uuid__default = /* @__PURE__ */ _interopDefaultLegacy(uuid);
|
|
84
91
|
var NextImage__default = /* @__PURE__ */ _interopDefaultLegacy(NextImage);
|
|
85
92
|
var ReactPlayer__default = /* @__PURE__ */ _interopDefaultLegacy(ReactPlayer);
|
|
86
93
|
var ColorHelper__default = /* @__PURE__ */ _interopDefaultLegacy(ColorHelper);
|
|
87
94
|
var scrollIntoView__default = /* @__PURE__ */ _interopDefaultLegacy(scrollIntoView);
|
|
88
95
|
var NextLink__default = /* @__PURE__ */ _interopDefaultLegacy(NextLink);
|
|
89
|
-
var uuid__default = /* @__PURE__ */ _interopDefaultLegacy(uuid);
|
|
90
96
|
var Hotkeys__default = /* @__PURE__ */ _interopDefaultLegacy(Hotkeys);
|
|
91
97
|
var ipsum__default = /* @__PURE__ */ _interopDefaultLegacy(ipsum);
|
|
92
98
|
var Lists__default = /* @__PURE__ */ _interopDefaultLegacy(Lists);
|
|
93
|
-
function isElementReference(element) {
|
|
94
|
-
return !("props" in element);
|
|
95
|
-
}
|
|
96
|
-
function createDocument(rootElement) {
|
|
97
|
-
return { rootElement };
|
|
98
|
-
}
|
|
99
|
-
function getInitialState$3({
|
|
100
|
-
rootElements = /* @__PURE__ */ new Map()
|
|
101
|
-
} = {}) {
|
|
102
|
-
const initialState = /* @__PURE__ */ new Map();
|
|
103
|
-
rootElements.forEach((rootElement, elementKey) => {
|
|
104
|
-
initialState.set(elementKey, createDocument(rootElement));
|
|
105
|
-
});
|
|
106
|
-
return initialState;
|
|
107
|
-
}
|
|
108
|
-
function getDocuments(state) {
|
|
109
|
-
return state;
|
|
110
|
-
}
|
|
111
|
-
function getDocument(state, documentKey) {
|
|
112
|
-
var _a;
|
|
113
|
-
return (_a = getDocuments(state).get(documentKey)) != null ? _a : null;
|
|
114
|
-
}
|
|
115
|
-
function getDocumentRootElement$1(state, documentKey) {
|
|
116
|
-
var _a, _b;
|
|
117
|
-
return (_b = (_a = getDocument(state, documentKey)) == null ? void 0 : _a.rootElement) != null ? _b : null;
|
|
118
|
-
}
|
|
119
|
-
function reducer$4(state = getInitialState$3(), _action) {
|
|
120
|
-
return state;
|
|
121
|
-
}
|
|
122
|
-
function getInitialState$2({
|
|
123
|
-
reactComponents = /* @__PURE__ */ new Map()
|
|
124
|
-
} = {}) {
|
|
125
|
-
return reactComponents;
|
|
126
|
-
}
|
|
127
|
-
function getReactComponents(state) {
|
|
128
|
-
return state;
|
|
129
|
-
}
|
|
130
|
-
function getReactComponent$1(state, type) {
|
|
131
|
-
var _a;
|
|
132
|
-
return (_a = getReactComponents(state).get(type)) != null ? _a : null;
|
|
133
|
-
}
|
|
134
|
-
function reducer$3(state = getInitialState$2(), action) {
|
|
135
|
-
switch (action.type) {
|
|
136
|
-
case actions.ActionTypes.REGISTER_REACT_COMPONENT:
|
|
137
|
-
return new Map(state).set(action.payload.type, action.payload.component);
|
|
138
|
-
case actions.ActionTypes.UNREGISTER_REACT_COMPONENT: {
|
|
139
|
-
const nextState = new Map(state);
|
|
140
|
-
const deleted = nextState.delete(action.payload.type);
|
|
141
|
-
return deleted ? nextState : state;
|
|
142
|
-
}
|
|
143
|
-
default:
|
|
144
|
-
return state;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
function getInitialState$1({
|
|
148
|
-
componentsMeta = /* @__PURE__ */ new Map()
|
|
149
|
-
} = {}) {
|
|
150
|
-
return componentsMeta;
|
|
151
|
-
}
|
|
152
|
-
function getComponentsMeta(state) {
|
|
153
|
-
return state;
|
|
154
|
-
}
|
|
155
|
-
function reducer$2(state = getInitialState$1(), action) {
|
|
156
|
-
switch (action.type) {
|
|
157
|
-
case actions.ActionTypes.REGISTER_COMPONENT:
|
|
158
|
-
return new Map(state).set(action.payload.type, action.payload.meta);
|
|
159
|
-
case actions.ActionTypes.UNREGISTER_COMPONENT: {
|
|
160
|
-
const nextState = new Map(state);
|
|
161
|
-
const deleted = nextState.delete(action.payload.type);
|
|
162
|
-
return deleted ? nextState : state;
|
|
163
|
-
}
|
|
164
|
-
default:
|
|
165
|
-
return state;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
function getInitialState({
|
|
169
|
-
propControllerDescriptors = /* @__PURE__ */ new Map()
|
|
170
|
-
} = {}) {
|
|
171
|
-
return propControllerDescriptors;
|
|
172
|
-
}
|
|
173
|
-
function getPropControllerDescriptors$1(state) {
|
|
174
|
-
return state;
|
|
175
|
-
}
|
|
176
|
-
function getComponentPropControllerDescriptors$1(state, componentType) {
|
|
177
|
-
var _a;
|
|
178
|
-
return (_a = getPropControllerDescriptors$1(state).get(componentType)) != null ? _a : null;
|
|
179
|
-
}
|
|
180
|
-
function reducer$1(state = getInitialState(), action) {
|
|
181
|
-
switch (action.type) {
|
|
182
|
-
case actions.ActionTypes.REGISTER_COMPONENT:
|
|
183
|
-
return new Map(state).set(action.payload.type, action.payload.propControllerDescriptors);
|
|
184
|
-
case actions.ActionTypes.UNREGISTER_COMPONENT: {
|
|
185
|
-
const nextState = new Map(state);
|
|
186
|
-
const deleted = nextState.delete(action.payload.type);
|
|
187
|
-
return deleted ? nextState : state;
|
|
188
|
-
}
|
|
189
|
-
default:
|
|
190
|
-
return state;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
function getElementChildren(descriptor, prop) {
|
|
194
|
-
if (prop == null)
|
|
195
|
-
return [];
|
|
196
|
-
switch (descriptor.type) {
|
|
197
|
-
case descriptors.Types.Grid:
|
|
198
|
-
return prop.elements;
|
|
199
|
-
default:
|
|
200
|
-
return [];
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
function getElementId$1(descriptor, prop) {
|
|
204
|
-
if (prop == null)
|
|
205
|
-
return null;
|
|
206
|
-
switch (descriptor.type) {
|
|
207
|
-
case descriptors.Types.ElementID:
|
|
208
|
-
return prop;
|
|
209
|
-
default:
|
|
210
|
-
return null;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
const reducer = redux.combineReducers({
|
|
214
|
-
documents: reducer$4,
|
|
215
|
-
reactComponents: reducer$3,
|
|
216
|
-
componentsMeta: reducer$2,
|
|
217
|
-
propControllers: reducer$1,
|
|
218
|
-
isInBuilder: (_state = false, _action) => false
|
|
219
|
-
});
|
|
220
|
-
function getDocumentsStateSlice(state) {
|
|
221
|
-
return state.documents;
|
|
222
|
-
}
|
|
223
|
-
function getDocumentRootElement(state, documentKey) {
|
|
224
|
-
return getDocumentRootElement$1(getDocumentsStateSlice(state), documentKey);
|
|
225
|
-
}
|
|
226
|
-
function getReactComponentsStateSlice(state) {
|
|
227
|
-
return state.reactComponents;
|
|
228
|
-
}
|
|
229
|
-
function getReactComponent(state, type) {
|
|
230
|
-
return getReactComponent$1(getReactComponentsStateSlice(state), type);
|
|
231
|
-
}
|
|
232
|
-
function getPropControllersStateSlice(state) {
|
|
233
|
-
return state.propControllers;
|
|
234
|
-
}
|
|
235
|
-
function getPropControllerDescriptors(state) {
|
|
236
|
-
return getPropControllerDescriptors$1(getPropControllersStateSlice(state));
|
|
237
|
-
}
|
|
238
|
-
function getComponentPropControllerDescriptors(state, componentType) {
|
|
239
|
-
return getComponentPropControllerDescriptors$1(getPropControllersStateSlice(state), componentType);
|
|
240
|
-
}
|
|
241
|
-
function normalizeElement(element, descriptors2) {
|
|
242
|
-
const elements = /* @__PURE__ */ new Map();
|
|
243
|
-
const remaining = [element];
|
|
244
|
-
let current;
|
|
245
|
-
while (current = remaining.pop()) {
|
|
246
|
-
elements.set(current.key, current);
|
|
247
|
-
if (isElementReference(current))
|
|
248
|
-
continue;
|
|
249
|
-
const elementDescriptors = descriptors2.get(element.type);
|
|
250
|
-
if (elementDescriptors == null)
|
|
251
|
-
continue;
|
|
252
|
-
const parent = current;
|
|
253
|
-
const children = Object.entries(elementDescriptors).reduce((acc, [propName, descriptor]) => {
|
|
254
|
-
return [...acc, ...getElementChildren(descriptor, parent.props[propName])];
|
|
255
|
-
}, []);
|
|
256
|
-
remaining.push(...children);
|
|
257
|
-
}
|
|
258
|
-
return elements;
|
|
259
|
-
}
|
|
260
|
-
function getDocumentElements(state, documentKey) {
|
|
261
|
-
const rootElement = getDocumentRootElement(state, documentKey);
|
|
262
|
-
const descriptors2 = getPropControllerDescriptors(state);
|
|
263
|
-
if (rootElement == null)
|
|
264
|
-
return /* @__PURE__ */ new Map();
|
|
265
|
-
return normalizeElement(rootElement, descriptors2);
|
|
266
|
-
}
|
|
267
|
-
function getElement(state, documentKey, elementKey) {
|
|
268
|
-
var _a;
|
|
269
|
-
return (_a = getDocumentElements(state, documentKey).get(elementKey)) != null ? _a : null;
|
|
270
|
-
}
|
|
271
|
-
function getElementPropControllerDescriptors(state, documentKey, elementKey) {
|
|
272
|
-
const element = getElement(state, documentKey, elementKey);
|
|
273
|
-
if (element == null || isElementReference(element))
|
|
274
|
-
return null;
|
|
275
|
-
return getComponentPropControllerDescriptors(state, element.type);
|
|
276
|
-
}
|
|
277
|
-
function getElementId(state, documentKey, elementKey) {
|
|
278
|
-
const element = getElement(state, documentKey, elementKey);
|
|
279
|
-
if (element == null || isElementReference(element))
|
|
280
|
-
return null;
|
|
281
|
-
const descriptors2 = getComponentPropControllerDescriptors(state, element.type);
|
|
282
|
-
if (descriptors2 == null)
|
|
283
|
-
return null;
|
|
284
|
-
const elementId = Object.entries(descriptors2).reduce((acc, [propName, descriptor]) => {
|
|
285
|
-
if (acc != null)
|
|
286
|
-
return acc;
|
|
287
|
-
return getElementId$1(descriptor, element.props[propName]);
|
|
288
|
-
}, null);
|
|
289
|
-
return elementId;
|
|
290
|
-
}
|
|
291
|
-
function getIsInBuilder(state) {
|
|
292
|
-
return state.isInBuilder;
|
|
293
|
-
}
|
|
294
|
-
function configureStore({
|
|
295
|
-
rootElements,
|
|
296
|
-
preloadedState
|
|
297
|
-
} = {}) {
|
|
298
|
-
return redux.createStore(reducer, __spreadProps(__spreadValues({}, preloadedState), { documents: getInitialState$3({ rootElements }) }), redux.applyMiddleware(thunk__default["default"]));
|
|
299
|
-
}
|
|
300
99
|
const PlaceholderBase$1 = styled__default["default"].div`
|
|
301
100
|
width: 100%;
|
|
302
101
|
background: rgba(161, 168, 194, 0.18);
|
|
@@ -306,7 +105,7 @@ const PlaceholderBase$1 = styled__default["default"].div`
|
|
|
306
105
|
hide
|
|
307
106
|
}) => hide === true ? "hidden" : "initial"};
|
|
308
107
|
`;
|
|
309
|
-
var Placeholder$
|
|
108
|
+
var Placeholder$2 = React.forwardRef(function Placeholder2(_a, ref) {
|
|
310
109
|
var _b = _a, {
|
|
311
110
|
hide = false
|
|
312
111
|
} = _b, restOfProps = __objRest(_b, [
|
|
@@ -420,21 +219,157 @@ const TYPOGRAPHIES_BY_ID = client.gql`
|
|
|
420
219
|
|
|
421
220
|
${TYPOGRAPHY_FRAGMENT}
|
|
422
221
|
`;
|
|
222
|
+
const TABLE_BY_ID = client.gql`
|
|
223
|
+
query TableById($id: ID!) {
|
|
224
|
+
table(id: $id) {
|
|
225
|
+
id
|
|
226
|
+
name
|
|
227
|
+
columns {
|
|
228
|
+
id
|
|
229
|
+
name
|
|
230
|
+
... on MultipleSelectTableColumn {
|
|
231
|
+
options {
|
|
232
|
+
id
|
|
233
|
+
name
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
... on SingleSelectTableColumn {
|
|
237
|
+
options {
|
|
238
|
+
id
|
|
239
|
+
name
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
`;
|
|
423
246
|
function isNonNullable(value) {
|
|
424
247
|
return value != null;
|
|
425
248
|
}
|
|
426
|
-
const
|
|
249
|
+
const typePolicies = {
|
|
250
|
+
Query: {
|
|
251
|
+
fields: {
|
|
252
|
+
swatches(existingData, {
|
|
253
|
+
args,
|
|
254
|
+
toReference
|
|
255
|
+
}) {
|
|
256
|
+
return existingData != null ? existingData : args == null ? void 0 : args.ids.map((id) => toReference({
|
|
257
|
+
__typename: "Swatch",
|
|
258
|
+
id
|
|
259
|
+
}, true));
|
|
260
|
+
},
|
|
261
|
+
file(existingData, {
|
|
262
|
+
args,
|
|
263
|
+
toReference
|
|
264
|
+
}) {
|
|
265
|
+
return existingData != null ? existingData : toReference({
|
|
266
|
+
__typename: "File",
|
|
267
|
+
id: args == null ? void 0 : args.id
|
|
268
|
+
}, true);
|
|
269
|
+
},
|
|
270
|
+
files(existingData, {
|
|
271
|
+
args,
|
|
272
|
+
toReference
|
|
273
|
+
}) {
|
|
274
|
+
return existingData != null ? existingData : args == null ? void 0 : args.ids.map((id) => toReference({
|
|
275
|
+
__typename: "File",
|
|
276
|
+
id
|
|
277
|
+
}, true));
|
|
278
|
+
},
|
|
279
|
+
typographies(existingData, {
|
|
280
|
+
args,
|
|
281
|
+
toReference
|
|
282
|
+
}) {
|
|
283
|
+
return existingData != null ? existingData : args == null ? void 0 : args.ids.map((id) => toReference({
|
|
284
|
+
__typename: "Typography",
|
|
285
|
+
id
|
|
286
|
+
}, true));
|
|
287
|
+
},
|
|
288
|
+
pagePathnamesById(existingData, {
|
|
289
|
+
args,
|
|
290
|
+
toReference
|
|
291
|
+
}) {
|
|
292
|
+
return existingData != null ? existingData : args == null ? void 0 : args.ids.map((id) => toReference({
|
|
293
|
+
__typename: "PagePathnameSlice",
|
|
294
|
+
id
|
|
295
|
+
}, true));
|
|
296
|
+
},
|
|
297
|
+
globalElement(existingData, {
|
|
298
|
+
args,
|
|
299
|
+
toReference
|
|
300
|
+
}) {
|
|
301
|
+
return existingData != null ? existingData : toReference({
|
|
302
|
+
__typename: "GlobalElement",
|
|
303
|
+
id: args == null ? void 0 : args.id
|
|
304
|
+
}, true);
|
|
305
|
+
},
|
|
306
|
+
table(existingData, {
|
|
307
|
+
args,
|
|
308
|
+
toReference
|
|
309
|
+
}) {
|
|
310
|
+
return existingData != null ? existingData : toReference({
|
|
311
|
+
__typename: "Table",
|
|
312
|
+
id: args == null ? void 0 : args.id
|
|
313
|
+
}, true);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
function createApolloClient({
|
|
319
|
+
uri,
|
|
320
|
+
cacheData
|
|
321
|
+
}) {
|
|
322
|
+
const cache = new client.InMemoryCache({
|
|
323
|
+
typePolicies
|
|
324
|
+
});
|
|
325
|
+
if (cacheData)
|
|
326
|
+
cache.restore(cacheData);
|
|
327
|
+
return new client.ApolloClient({
|
|
328
|
+
uri,
|
|
329
|
+
cache
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
class MakeswiftClient {
|
|
333
|
+
constructor({
|
|
334
|
+
uri,
|
|
335
|
+
cacheData
|
|
336
|
+
}) {
|
|
337
|
+
__publicField(this, "apolloClient");
|
|
338
|
+
this.apolloClient = createApolloClient({
|
|
339
|
+
uri,
|
|
340
|
+
cacheData
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
async prefetch(element) {
|
|
344
|
+
const id = uuid__default["default"]();
|
|
345
|
+
await ssr.getDataFromTree(/* @__PURE__ */ jsxRuntime.jsx(RuntimeProvider, {
|
|
346
|
+
client: this,
|
|
347
|
+
defaultRootElements: /* @__PURE__ */ new Map([[id, element]]),
|
|
348
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DocumentReference, {
|
|
349
|
+
documentReference: reactPage.createDocumentReference(id)
|
|
350
|
+
})
|
|
351
|
+
}));
|
|
352
|
+
return this.apolloClient.cache.extract();
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
const Context$2 = React.createContext(void 0);
|
|
427
356
|
function useQuery(query, options) {
|
|
428
|
-
const client$1 = React.useContext(Context$
|
|
357
|
+
const client$1 = React.useContext(Context$2);
|
|
429
358
|
return client.useQuery(query, __spreadValues({
|
|
430
|
-
client: client$1
|
|
359
|
+
client: client$1 == null ? void 0 : client$1.apolloClient
|
|
360
|
+
}, options));
|
|
361
|
+
}
|
|
362
|
+
function useMutation(mutation, options) {
|
|
363
|
+
const client$1 = React.useContext(Context$2);
|
|
364
|
+
return client.useMutation(mutation, __spreadValues({
|
|
365
|
+
client: client$1 == null ? void 0 : client$1.apolloClient
|
|
431
366
|
}, options));
|
|
432
367
|
}
|
|
433
|
-
function
|
|
368
|
+
function MakeswiftProvider({
|
|
434
369
|
client: client2,
|
|
435
370
|
children
|
|
436
371
|
}) {
|
|
437
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Context$
|
|
372
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Context$2.Provider, {
|
|
438
373
|
value: client2,
|
|
439
374
|
children
|
|
440
375
|
});
|
|
@@ -647,8 +582,8 @@ function shallowMerge(a, b) {
|
|
|
647
582
|
}
|
|
648
583
|
const DEVICES = [
|
|
649
584
|
{ id: "desktop", minWidth: 769 },
|
|
650
|
-
{ id: "tablet", minWidth:
|
|
651
|
-
{ id: "mobile", maxWidth:
|
|
585
|
+
{ id: "tablet", minWidth: 576, maxWidth: 768 },
|
|
586
|
+
{ id: "mobile", maxWidth: 575 }
|
|
652
587
|
];
|
|
653
588
|
const getDevice = (deviceId) => {
|
|
654
589
|
const device = DEVICES.find(({ id }) => id === deviceId);
|
|
@@ -722,6 +657,12 @@ function usePage(pageId) {
|
|
|
722
657
|
const { pagePathnamesById: [page] = [] } = data;
|
|
723
658
|
return page;
|
|
724
659
|
}
|
|
660
|
+
function useTable(tableId) {
|
|
661
|
+
return useQuery(TABLE_BY_ID, {
|
|
662
|
+
skip: tableId == null,
|
|
663
|
+
variables: { id: tableId }
|
|
664
|
+
});
|
|
665
|
+
}
|
|
725
666
|
const defaultExitedProps = {
|
|
726
667
|
opacity: 0,
|
|
727
668
|
x: 0,
|
|
@@ -1192,8 +1133,8 @@ function getScrollParent(element) {
|
|
|
1192
1133
|
return element;
|
|
1193
1134
|
return getScrollParent(parentElement);
|
|
1194
1135
|
}
|
|
1195
|
-
function Parallax(
|
|
1196
|
-
var _h =
|
|
1136
|
+
function Parallax(_g2) {
|
|
1137
|
+
var _h = _g2, {
|
|
1197
1138
|
strength,
|
|
1198
1139
|
children
|
|
1199
1140
|
} = _h, rest = __objRest(_h, [
|
|
@@ -1279,7 +1220,7 @@ function Parallax(_g) {
|
|
|
1279
1220
|
children: children(getProps)
|
|
1280
1221
|
}));
|
|
1281
1222
|
}
|
|
1282
|
-
const Container$
|
|
1223
|
+
const Container$d = styled__default["default"].div`
|
|
1283
1224
|
position: absolute;
|
|
1284
1225
|
top: 0;
|
|
1285
1226
|
left: 0;
|
|
@@ -1333,7 +1274,7 @@ function BackgroundVideo({
|
|
|
1333
1274
|
}, [aspectRatio, zoom]);
|
|
1334
1275
|
if (!ReactPlayer__default["default"].canPlay(url))
|
|
1335
1276
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
1336
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Container$
|
|
1277
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Container$d, {
|
|
1337
1278
|
ref: container,
|
|
1338
1279
|
children: [container.current && /* @__PURE__ */ jsxRuntime.jsx(ReactPlayer__default["default"], {
|
|
1339
1280
|
url,
|
|
@@ -1412,10 +1353,10 @@ const AbsoluteFill = styled__default["default"].div`
|
|
|
1412
1353
|
right: 0;
|
|
1413
1354
|
bottom: 0;
|
|
1414
1355
|
`;
|
|
1415
|
-
const Container$
|
|
1356
|
+
const Container$c = styled__default["default"](AbsoluteFill)`
|
|
1416
1357
|
border-radius: inherit;
|
|
1417
1358
|
`;
|
|
1418
|
-
const BackgroundsContainer$1 = styled__default["default"](Container$
|
|
1359
|
+
const BackgroundsContainer$1 = styled__default["default"](Container$c)`
|
|
1419
1360
|
overflow: hidden;
|
|
1420
1361
|
${(p) => cssMediaRules([p.visibility], ([visibility]) => styled.css`
|
|
1421
1362
|
display: ${visibility === true ? "block" : "none"};
|
|
@@ -1439,7 +1380,7 @@ function Backgrounds({
|
|
|
1439
1380
|
visibility,
|
|
1440
1381
|
children: [...value].reverse().map((bg) => {
|
|
1441
1382
|
if (bg.type === "color") {
|
|
1442
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Container$
|
|
1383
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Container$c, {
|
|
1443
1384
|
style: {
|
|
1444
1385
|
backgroundColor: getColor(bg.payload)
|
|
1445
1386
|
}
|
|
@@ -1475,7 +1416,7 @@ function Backgrounds({
|
|
|
1475
1416
|
}
|
|
1476
1417
|
return /* @__PURE__ */ jsxRuntime.jsx(Parallax, {
|
|
1477
1418
|
strength: parallax,
|
|
1478
|
-
children: (getParallaxProps) => /* @__PURE__ */ jsxRuntime.jsx(Container$
|
|
1419
|
+
children: (getParallaxProps) => /* @__PURE__ */ jsxRuntime.jsx(Container$c, __spreadValues({}, getParallaxProps({
|
|
1479
1420
|
style: {
|
|
1480
1421
|
backgroundImage: publicUrl != null ? `url('${publicUrl}')` : void 0,
|
|
1481
1422
|
backgroundPosition,
|
|
@@ -1493,7 +1434,7 @@ function Backgrounds({
|
|
|
1493
1434
|
isRadial
|
|
1494
1435
|
} = bg.payload;
|
|
1495
1436
|
const gradient = `${getStopsStyle(stops)}`;
|
|
1496
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Container$
|
|
1437
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Container$c, {
|
|
1497
1438
|
style: {
|
|
1498
1439
|
background: isRadial ? `radial-gradient(${gradient})` : `linear-gradient(${angle}rad, ${gradient})`
|
|
1499
1440
|
}
|
|
@@ -1510,7 +1451,7 @@ function Backgrounds({
|
|
|
1510
1451
|
} = bg.payload;
|
|
1511
1452
|
return /* @__PURE__ */ jsxRuntime.jsx(Parallax, {
|
|
1512
1453
|
strength: parallax,
|
|
1513
|
-
children: (getParallaxProps) => /* @__PURE__ */ jsxRuntime.jsx(Container$
|
|
1454
|
+
children: (getParallaxProps) => /* @__PURE__ */ jsxRuntime.jsx(Container$c, __spreadProps(__spreadValues({}, getParallaxProps({})), {
|
|
1514
1455
|
children: /* @__PURE__ */ jsxRuntime.jsx(BackgroundVideo, {
|
|
1515
1456
|
url,
|
|
1516
1457
|
zoom,
|
|
@@ -1578,7 +1519,7 @@ const Grid$1 = styled__default["default"](framerMotion.motion.div)`
|
|
|
1578
1519
|
alignContent
|
|
1579
1520
|
}))}
|
|
1580
1521
|
`;
|
|
1581
|
-
const GridItem$
|
|
1522
|
+
const GridItem$2 = styled__default["default"](framerMotion.motion.div)`
|
|
1582
1523
|
display: flex;
|
|
1583
1524
|
|
|
1584
1525
|
/* IE11 doesn't recognize space-between and treats it as stretch, so we fall back to flex-start */
|
|
@@ -1689,7 +1630,7 @@ const Box = React.forwardRef(function Box2({
|
|
|
1689
1630
|
animate: animate == null ? void 0 : animate.parent,
|
|
1690
1631
|
initial: initial == null ? void 0 : initial.parent,
|
|
1691
1632
|
transition: transition == null ? void 0 : transition.parent,
|
|
1692
|
-
children: children && children.elements.length > 0 ? children.elements.map((child, index) => /* @__PURE__ */ jsxRuntime.jsx(GridItem$
|
|
1633
|
+
children: children && children.elements.length > 0 ? children.elements.map((child, index) => /* @__PURE__ */ jsxRuntime.jsx(GridItem$2, {
|
|
1693
1634
|
grid: children.columns,
|
|
1694
1635
|
index,
|
|
1695
1636
|
columnGap,
|
|
@@ -1700,13 +1641,13 @@ const Box = React.forwardRef(function Box2({
|
|
|
1700
1641
|
children: /* @__PURE__ */ jsxRuntime.jsx(Element$1, {
|
|
1701
1642
|
element: child
|
|
1702
1643
|
})
|
|
1703
|
-
}, child.key)) : /* @__PURE__ */ jsxRuntime.jsx(Placeholder$
|
|
1644
|
+
}, child.key)) : /* @__PURE__ */ jsxRuntime.jsx(Placeholder$2, {
|
|
1704
1645
|
hide: hidePlaceholder
|
|
1705
1646
|
})
|
|
1706
1647
|
})
|
|
1707
1648
|
}, key == null ? void 0 : key.container);
|
|
1708
1649
|
});
|
|
1709
|
-
function registerComponent$
|
|
1650
|
+
function registerComponent$c(runtime) {
|
|
1710
1651
|
return runtime.registerComponent(Box, {
|
|
1711
1652
|
type: "./components/Box/index.js",
|
|
1712
1653
|
label: "Box",
|
|
@@ -1971,7 +1912,7 @@ const Link = React.forwardRef(function Link2(_k, ref) {
|
|
|
1971
1912
|
}))
|
|
1972
1913
|
});
|
|
1973
1914
|
});
|
|
1974
|
-
const StyledButton = styled__default["default"](Link)`
|
|
1915
|
+
const StyledButton$1 = styled__default["default"](Link)`
|
|
1975
1916
|
display: table;
|
|
1976
1917
|
border: 0;
|
|
1977
1918
|
outline: 0;
|
|
@@ -2163,7 +2104,7 @@ const StyledButton = styled__default["default"](Link)`
|
|
|
2163
2104
|
})}
|
|
2164
2105
|
${cssTextStyle()}
|
|
2165
2106
|
`;
|
|
2166
|
-
const Button = React.forwardRef(function Button2(_m, ref) {
|
|
2107
|
+
const Button$1 = React.forwardRef(function Button2(_m, ref) {
|
|
2167
2108
|
var _n = _m, {
|
|
2168
2109
|
id,
|
|
2169
2110
|
children,
|
|
@@ -2189,7 +2130,7 @@ const Button = React.forwardRef(function Button2(_m, ref) {
|
|
|
2189
2130
|
"width",
|
|
2190
2131
|
"margin"
|
|
2191
2132
|
]);
|
|
2192
|
-
return /* @__PURE__ */ jsxRuntime.jsx(StyledButton, __spreadProps(__spreadValues({}, restOfProps), {
|
|
2133
|
+
return /* @__PURE__ */ jsxRuntime.jsx(StyledButton$1, __spreadProps(__spreadValues({}, restOfProps), {
|
|
2193
2134
|
ref,
|
|
2194
2135
|
id,
|
|
2195
2136
|
color: useColor(color),
|
|
@@ -2204,8 +2145,8 @@ const Button = React.forwardRef(function Button2(_m, ref) {
|
|
|
2204
2145
|
children: children == null ? "Button Text" : children
|
|
2205
2146
|
}));
|
|
2206
2147
|
});
|
|
2207
|
-
function registerComponent$
|
|
2208
|
-
return runtime.registerComponent(Button, {
|
|
2148
|
+
function registerComponent$b(runtime) {
|
|
2149
|
+
return runtime.registerComponent(Button$1, {
|
|
2209
2150
|
type: "./components/Button/index.js",
|
|
2210
2151
|
label: "Button",
|
|
2211
2152
|
props: {
|
|
@@ -2300,6 +2241,10 @@ const placeholders = {
|
|
|
2300
2241
|
image: {
|
|
2301
2242
|
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",
|
|
2302
2243
|
dimensions: { width: 360, height: 240 }
|
|
2244
|
+
},
|
|
2245
|
+
video: {
|
|
2246
|
+
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",
|
|
2247
|
+
dimensions: { width: 712, height: 400 }
|
|
2303
2248
|
}
|
|
2304
2249
|
};
|
|
2305
2250
|
function loadImage(src) {
|
|
@@ -2405,7 +2350,7 @@ const ImageComponent = React.forwardRef(function Image2({
|
|
|
2405
2350
|
})
|
|
2406
2351
|
});
|
|
2407
2352
|
});
|
|
2408
|
-
function registerComponent$
|
|
2353
|
+
function registerComponent$a(runtime) {
|
|
2409
2354
|
return runtime.registerComponent(ImageComponent, {
|
|
2410
2355
|
type: "./components/Image/index.js",
|
|
2411
2356
|
label: "Image",
|
|
@@ -2454,7 +2399,7 @@ const RightChevron = () => /* @__PURE__ */ jsxRuntime.jsx("svg", {
|
|
|
2454
2399
|
strokeWidth: "2"
|
|
2455
2400
|
})
|
|
2456
2401
|
});
|
|
2457
|
-
const Container$
|
|
2402
|
+
const Container$b = styled__default["default"].div`
|
|
2458
2403
|
position: relative;
|
|
2459
2404
|
height: 100%;
|
|
2460
2405
|
`;
|
|
@@ -2754,7 +2699,7 @@ const Carousel = React.forwardRef(function Carousel2({
|
|
|
2754
2699
|
break;
|
|
2755
2700
|
}
|
|
2756
2701
|
},
|
|
2757
|
-
children: [/* @__PURE__ */ jsxRuntime.jsxs(Container$
|
|
2702
|
+
children: [/* @__PURE__ */ jsxRuntime.jsxs(Container$b, {
|
|
2758
2703
|
children: [/* @__PURE__ */ jsxRuntime.jsx(ClipMask, {
|
|
2759
2704
|
children: /* @__PURE__ */ jsxRuntime.jsx(Page, __spreadProps(__spreadValues({}, bindPage()), {
|
|
2760
2705
|
animate: animation,
|
|
@@ -2830,7 +2775,7 @@ const Carousel = React.forwardRef(function Carousel2({
|
|
|
2830
2775
|
})]
|
|
2831
2776
|
});
|
|
2832
2777
|
});
|
|
2833
|
-
function registerComponent$
|
|
2778
|
+
function registerComponent$9(runtime) {
|
|
2834
2779
|
return runtime.registerComponent(Carousel, {
|
|
2835
2780
|
type: "./components/Carousel/index.js",
|
|
2836
2781
|
label: "Carousel",
|
|
@@ -2950,14 +2895,14 @@ const Block$1 = styled__default["default"].div`
|
|
|
2950
2895
|
padding: 0.5em;
|
|
2951
2896
|
font-size: 1em;
|
|
2952
2897
|
`;
|
|
2953
|
-
const Label = styled__default["default"].div`
|
|
2898
|
+
const Label$3 = styled__default["default"].div`
|
|
2954
2899
|
margin-top: 0.25em;
|
|
2955
2900
|
`;
|
|
2956
2901
|
const Segment = styled__default["default"].div`
|
|
2957
2902
|
flex: 1;
|
|
2958
2903
|
text-align: center;
|
|
2959
2904
|
`;
|
|
2960
|
-
const Container$
|
|
2905
|
+
const Container$a = styled__default["default"].div`
|
|
2961
2906
|
display: flex;
|
|
2962
2907
|
${cssWidth("560px")}
|
|
2963
2908
|
${cssMargin()}
|
|
@@ -2967,7 +2912,7 @@ const Container$5 = styled__default["default"].div`
|
|
|
2967
2912
|
return styled.css`
|
|
2968
2913
|
font-size: 18px;
|
|
2969
2914
|
|
|
2970
|
-
${Label} {
|
|
2915
|
+
${Label$3} {
|
|
2971
2916
|
font-size: 14px;
|
|
2972
2917
|
}
|
|
2973
2918
|
`;
|
|
@@ -2975,7 +2920,7 @@ const Container$5 = styled__default["default"].div`
|
|
|
2975
2920
|
return styled.css`
|
|
2976
2921
|
font-size: 32px;
|
|
2977
2922
|
|
|
2978
|
-
${Label} {
|
|
2923
|
+
${Label$3} {
|
|
2979
2924
|
font-size: 18px;
|
|
2980
2925
|
}
|
|
2981
2926
|
`;
|
|
@@ -2983,7 +2928,7 @@ const Container$5 = styled__default["default"].div`
|
|
|
2983
2928
|
return styled.css`
|
|
2984
2929
|
font-size: 24px;
|
|
2985
2930
|
|
|
2986
|
-
${Label} {
|
|
2931
|
+
${Label$3} {
|
|
2987
2932
|
font-size: 16px;
|
|
2988
2933
|
}
|
|
2989
2934
|
`;
|
|
@@ -3120,7 +3065,7 @@ const Container$5 = styled__default["default"].div`
|
|
|
3120
3065
|
})}
|
|
3121
3066
|
}
|
|
3122
3067
|
|
|
3123
|
-
${Label} {
|
|
3068
|
+
${Label$3} {
|
|
3124
3069
|
${(p) => cssMediaRules([p.labelColor, p.labelFont], ([labelColor = {
|
|
3125
3070
|
swatch: {
|
|
3126
3071
|
hue: 0,
|
|
@@ -3197,7 +3142,7 @@ const Countdown = React.forwardRef(function Countdown2({
|
|
|
3197
3142
|
}, 1e3);
|
|
3198
3143
|
return () => clearInterval(intervalId);
|
|
3199
3144
|
}, [date]);
|
|
3200
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Container$
|
|
3145
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Container$a, {
|
|
3201
3146
|
ref,
|
|
3202
3147
|
id,
|
|
3203
3148
|
width,
|
|
@@ -3216,7 +3161,7 @@ const Countdown = React.forwardRef(function Countdown2({
|
|
|
3216
3161
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
3217
3162
|
children: days
|
|
3218
3163
|
})
|
|
3219
|
-
}), /* @__PURE__ */ jsxRuntime.jsx(Label, {
|
|
3164
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Label$3, {
|
|
3220
3165
|
children: daysLabel == null ? "Days" : daysLabel
|
|
3221
3166
|
})]
|
|
3222
3167
|
}), /* @__PURE__ */ jsxRuntime.jsxs(Segment, {
|
|
@@ -3224,7 +3169,7 @@ const Countdown = React.forwardRef(function Countdown2({
|
|
|
3224
3169
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
3225
3170
|
children: hours
|
|
3226
3171
|
})
|
|
3227
|
-
}), /* @__PURE__ */ jsxRuntime.jsx(Label, {
|
|
3172
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Label$3, {
|
|
3228
3173
|
children: hoursLabel == null ? "Hours" : hoursLabel
|
|
3229
3174
|
})]
|
|
3230
3175
|
}), /* @__PURE__ */ jsxRuntime.jsxs(Segment, {
|
|
@@ -3232,7 +3177,7 @@ const Countdown = React.forwardRef(function Countdown2({
|
|
|
3232
3177
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
3233
3178
|
children: minutes
|
|
3234
3179
|
})
|
|
3235
|
-
}), /* @__PURE__ */ jsxRuntime.jsx(Label, {
|
|
3180
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Label$3, {
|
|
3236
3181
|
children: minutesLabel == null ? "Minutes" : minutesLabel
|
|
3237
3182
|
})]
|
|
3238
3183
|
}), /* @__PURE__ */ jsxRuntime.jsxs(Segment, {
|
|
@@ -3240,13 +3185,13 @@ const Countdown = React.forwardRef(function Countdown2({
|
|
|
3240
3185
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
3241
3186
|
children: seconds
|
|
3242
3187
|
})
|
|
3243
|
-
}), /* @__PURE__ */ jsxRuntime.jsx(Label, {
|
|
3188
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Label$3, {
|
|
3244
3189
|
children: secondsLabel == null ? "Seconds" : secondsLabel
|
|
3245
3190
|
})]
|
|
3246
3191
|
})]
|
|
3247
3192
|
});
|
|
3248
3193
|
});
|
|
3249
|
-
function registerComponent$
|
|
3194
|
+
function registerComponent$8(runtime) {
|
|
3250
3195
|
return runtime.registerComponent(Countdown, {
|
|
3251
3196
|
type: "./components/Countdown/index.js",
|
|
3252
3197
|
label: "Countdown",
|
|
@@ -3382,7 +3327,7 @@ const IE11MinHeightContainer = styled__default["default"].div`
|
|
|
3382
3327
|
${cssWidth()}
|
|
3383
3328
|
${cssMargin()}
|
|
3384
3329
|
`;
|
|
3385
|
-
const Container$
|
|
3330
|
+
const Container$9 = styled__default["default"].div`
|
|
3386
3331
|
display: flex;
|
|
3387
3332
|
flex-direction: column;
|
|
3388
3333
|
justify-content: center;
|
|
@@ -3441,7 +3386,7 @@ const Divider = React.forwardRef(function Divider2({
|
|
|
3441
3386
|
id,
|
|
3442
3387
|
width,
|
|
3443
3388
|
margin,
|
|
3444
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Container$
|
|
3389
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Container$9, {
|
|
3445
3390
|
children: /* @__PURE__ */ jsxRuntime.jsx(Line, {
|
|
3446
3391
|
variant,
|
|
3447
3392
|
thickness,
|
|
@@ -3450,7 +3395,7 @@ const Divider = React.forwardRef(function Divider2({
|
|
|
3450
3395
|
})
|
|
3451
3396
|
});
|
|
3452
3397
|
});
|
|
3453
|
-
function registerComponent$
|
|
3398
|
+
function registerComponent$7(runtime) {
|
|
3454
3399
|
return runtime.registerComponent(Divider, {
|
|
3455
3400
|
type: "./components/Divider/index.js",
|
|
3456
3401
|
label: "Divider",
|
|
@@ -3500,7 +3445,7 @@ function registerComponent$5(runtime) {
|
|
|
3500
3445
|
}
|
|
3501
3446
|
});
|
|
3502
3447
|
}
|
|
3503
|
-
const Container$
|
|
3448
|
+
const Container$8 = styled__default["default"].div`
|
|
3504
3449
|
min-height: 15px;
|
|
3505
3450
|
${cssWidth()}
|
|
3506
3451
|
${cssMargin()}
|
|
@@ -3580,7 +3525,7 @@ const Embed = React.forwardRef(function Embed2({
|
|
|
3580
3525
|
}, [container, html]);
|
|
3581
3526
|
if (shouldRender === false)
|
|
3582
3527
|
return null;
|
|
3583
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Container$
|
|
3528
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Container$8, {
|
|
3584
3529
|
ref: setContainer,
|
|
3585
3530
|
id,
|
|
3586
3531
|
margin,
|
|
@@ -3590,7 +3535,7 @@ const Embed = React.forwardRef(function Embed2({
|
|
|
3590
3535
|
}
|
|
3591
3536
|
});
|
|
3592
3537
|
});
|
|
3593
|
-
function registerComponent$
|
|
3538
|
+
function registerComponent$6(runtime) {
|
|
3594
3539
|
return runtime.registerComponent(Embed, {
|
|
3595
3540
|
type: "./components/Embed/index.js",
|
|
3596
3541
|
label: "Embed",
|
|
@@ -3606,9 +3551,9 @@ function registerComponent$4(runtime) {
|
|
|
3606
3551
|
}
|
|
3607
3552
|
});
|
|
3608
3553
|
}
|
|
3609
|
-
var _path$
|
|
3610
|
-
function _extends$
|
|
3611
|
-
_extends$
|
|
3554
|
+
var _path$t;
|
|
3555
|
+
function _extends$u() {
|
|
3556
|
+
_extends$u = Object.assign || function(target) {
|
|
3612
3557
|
for (var i = 1; i < arguments.length; i++) {
|
|
3613
3558
|
var source = arguments[i];
|
|
3614
3559
|
for (var key in source) {
|
|
@@ -3619,82 +3564,1860 @@ function _extends$r() {
|
|
|
3619
3564
|
}
|
|
3620
3565
|
return target;
|
|
3621
3566
|
};
|
|
3622
|
-
return _extends$
|
|
3567
|
+
return _extends$u.apply(this, arguments);
|
|
3623
3568
|
}
|
|
3624
|
-
var
|
|
3625
|
-
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
}, props), _path$
|
|
3630
|
-
|
|
3569
|
+
var SvgCheck12 = function SvgCheck122(props) {
|
|
3570
|
+
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$u({
|
|
3571
|
+
width: 12,
|
|
3572
|
+
height: 12,
|
|
3573
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
3574
|
+
}, props), _path$t || (_path$t = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
3575
|
+
fillRule: "evenodd",
|
|
3576
|
+
clipRule: "evenodd",
|
|
3577
|
+
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"
|
|
3631
3578
|
})));
|
|
3632
3579
|
};
|
|
3633
|
-
const
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
}
|
|
3638
|
-
|
|
3639
|
-
|
|
3580
|
+
const Shapes = Object.freeze({
|
|
3581
|
+
SQUARE: "square",
|
|
3582
|
+
ROUNDED: "rounded",
|
|
3583
|
+
PILL: "pill"
|
|
3584
|
+
});
|
|
3585
|
+
const Sizes = Object.freeze({
|
|
3586
|
+
SMALL: "small",
|
|
3587
|
+
MEDIUM: "medium",
|
|
3588
|
+
LARGE: "large"
|
|
3589
|
+
});
|
|
3590
|
+
const Contrasts = Object.freeze({
|
|
3591
|
+
LIGHT: "light",
|
|
3592
|
+
DARK: "dark"
|
|
3593
|
+
});
|
|
3594
|
+
const Context$1 = React.createContext({});
|
|
3595
|
+
function useFormContext() {
|
|
3596
|
+
return React.useContext(Context$1);
|
|
3597
|
+
}
|
|
3598
|
+
const { Provider } = Context$1;
|
|
3599
|
+
function getSizeHeight$2(size) {
|
|
3600
|
+
switch (size) {
|
|
3601
|
+
case Sizes.SMALL:
|
|
3602
|
+
return 30;
|
|
3603
|
+
case Sizes.MEDIUM:
|
|
3604
|
+
return 38;
|
|
3605
|
+
case Sizes.LARGE:
|
|
3606
|
+
return 48;
|
|
3607
|
+
default:
|
|
3608
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3609
|
+
}
|
|
3610
|
+
}
|
|
3611
|
+
function getSizeHorizontalPadding(size) {
|
|
3612
|
+
switch (size) {
|
|
3613
|
+
case Sizes.SMALL:
|
|
3614
|
+
return 8;
|
|
3615
|
+
case Sizes.MEDIUM:
|
|
3616
|
+
return 12;
|
|
3617
|
+
case Sizes.LARGE:
|
|
3618
|
+
return 16;
|
|
3619
|
+
default:
|
|
3620
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
function getSizeVerticalPadding(size) {
|
|
3624
|
+
switch (size) {
|
|
3625
|
+
case Sizes.SMALL:
|
|
3626
|
+
return 3;
|
|
3627
|
+
case Sizes.MEDIUM:
|
|
3628
|
+
return 7;
|
|
3629
|
+
case Sizes.LARGE:
|
|
3630
|
+
return 11;
|
|
3631
|
+
default:
|
|
3632
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3633
|
+
}
|
|
3634
|
+
}
|
|
3635
|
+
function getShapeBorderRadius(shape) {
|
|
3636
|
+
switch (shape) {
|
|
3637
|
+
case Shapes.SQUARE:
|
|
3638
|
+
return 0;
|
|
3639
|
+
case Shapes.ROUNDED:
|
|
3640
|
+
return 4;
|
|
3641
|
+
case Shapes.PILL:
|
|
3642
|
+
return 500;
|
|
3643
|
+
default:
|
|
3644
|
+
throw new Error(`Invalid form shape "${shape}"`);
|
|
3645
|
+
}
|
|
3646
|
+
}
|
|
3647
|
+
function getContrastBorderColor(contrast, error) {
|
|
3648
|
+
switch (contrast) {
|
|
3649
|
+
case Contrasts.LIGHT:
|
|
3650
|
+
return error ? "rgba(255, 0, 0, 0.7)" : "rgba(0, 0, 0, 0.25)";
|
|
3651
|
+
case Contrasts.DARK:
|
|
3652
|
+
return error ? "rgba(255, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.6)";
|
|
3653
|
+
default:
|
|
3654
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3655
|
+
}
|
|
3656
|
+
}
|
|
3657
|
+
function getContrastBackgroundColor(contrast) {
|
|
3658
|
+
switch (contrast) {
|
|
3659
|
+
case Contrasts.LIGHT:
|
|
3660
|
+
return "white";
|
|
3661
|
+
case Contrasts.DARK:
|
|
3662
|
+
return "rgba(0, 0, 0, 0.7)";
|
|
3663
|
+
default:
|
|
3664
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3665
|
+
}
|
|
3666
|
+
}
|
|
3667
|
+
function getContrastColor$1(contrast) {
|
|
3668
|
+
switch (contrast) {
|
|
3669
|
+
case Contrasts.LIGHT:
|
|
3670
|
+
return "rgba(0, 0, 0, 0.95)";
|
|
3671
|
+
case Contrasts.DARK:
|
|
3672
|
+
return "white";
|
|
3673
|
+
default:
|
|
3674
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3675
|
+
}
|
|
3676
|
+
}
|
|
3677
|
+
function getContrastPlaceholderColor(contrast) {
|
|
3678
|
+
switch (contrast) {
|
|
3679
|
+
case Contrasts.LIGHT:
|
|
3680
|
+
return "rgba(0, 0, 0, 0.3)";
|
|
3681
|
+
case Contrasts.DARK:
|
|
3682
|
+
return "rgba(255,255,255,0.3)";
|
|
3683
|
+
default:
|
|
3684
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3685
|
+
}
|
|
3686
|
+
}
|
|
3687
|
+
function cssField() {
|
|
3688
|
+
return styled.css`
|
|
3689
|
+
display: block;
|
|
3690
|
+
width: 100%;
|
|
3691
|
+
outline: none;
|
|
3692
|
+
border-width: 1px;
|
|
3693
|
+
border-style: solid;
|
|
3694
|
+
transition: border-color 200ms;
|
|
3695
|
+
${(props) => cssMediaRules([props.shape, props.size, props.contrast, props.brandColor], ([
|
|
3696
|
+
shape = Shapes.ROUNDED,
|
|
3697
|
+
size = Sizes.MEDIUM,
|
|
3698
|
+
contrast = Contrasts.LIGHT,
|
|
3699
|
+
brandColor = { swatch: { hue: 0, saturation: 0, lightness: 0 }, alpha: 1 }
|
|
3700
|
+
]) => styled.css`
|
|
3701
|
+
padding: ${getSizeVerticalPadding(size)}px ${getSizeHorizontalPadding(size)}px;
|
|
3702
|
+
border-radius: ${getShapeBorderRadius(shape)}px;
|
|
3703
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
3704
|
+
color: ${getContrastColor$1(contrast)};
|
|
3705
|
+
background-color: ${getContrastBackgroundColor(contrast)};
|
|
3706
|
+
|
|
3707
|
+
:focus,
|
|
3708
|
+
:focus-within {
|
|
3709
|
+
border-color: ${colorToString(brandColor)};
|
|
3710
|
+
}
|
|
3711
|
+
|
|
3712
|
+
::placeholder {
|
|
3713
|
+
color: ${getContrastPlaceholderColor(contrast)};
|
|
3714
|
+
}
|
|
3715
|
+
`)}
|
|
3716
|
+
`;
|
|
3717
|
+
}
|
|
3718
|
+
function getSizeHeight$1(size) {
|
|
3719
|
+
switch (size) {
|
|
3720
|
+
case Sizes.SMALL:
|
|
3721
|
+
return 36;
|
|
3722
|
+
case Sizes.MEDIUM:
|
|
3723
|
+
return 42;
|
|
3724
|
+
case Sizes.LARGE:
|
|
3725
|
+
return 48;
|
|
3726
|
+
default:
|
|
3727
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3728
|
+
}
|
|
3729
|
+
}
|
|
3730
|
+
const Base$2 = styled__default["default"].input`
|
|
3731
|
+
${cssField()}
|
|
3732
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => styled.css`
|
|
3733
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
3734
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
3640
3735
|
`)}
|
|
3641
3736
|
`;
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3737
|
+
var Input$2 = React.forwardRef(function Input2(_o, ref) {
|
|
3738
|
+
var _p = _o, {
|
|
3739
|
+
error = false,
|
|
3740
|
+
form
|
|
3741
|
+
} = _p, restOfProps = __objRest(_p, [
|
|
3742
|
+
"error",
|
|
3743
|
+
"form"
|
|
3744
|
+
]);
|
|
3745
|
+
const {
|
|
3746
|
+
shape,
|
|
3747
|
+
size,
|
|
3748
|
+
contrast,
|
|
3749
|
+
brandColor
|
|
3750
|
+
} = useFormContext();
|
|
3751
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Base$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3752
|
+
ref,
|
|
3753
|
+
error,
|
|
3754
|
+
shape,
|
|
3755
|
+
size,
|
|
3756
|
+
contrast,
|
|
3757
|
+
brandColor
|
|
3758
|
+
}));
|
|
3759
|
+
});
|
|
3760
|
+
const Container$7 = styled__default["default"].div`
|
|
3761
|
+
display: flex;
|
|
3762
|
+
flex-direction: column;
|
|
3763
|
+
${cssWidth()};
|
|
3764
|
+
${cssMargin()};
|
|
3765
|
+
`;
|
|
3766
|
+
const Label$2 = styled__default["default"].div`
|
|
3767
|
+
max-width: 120px;
|
|
3768
|
+
min-width: 60px;
|
|
3769
|
+
height: 8px;
|
|
3770
|
+
border-radius: 2px;
|
|
3645
3771
|
background-color: #a1a8c2;
|
|
3646
|
-
border-radius: ${(props) => props.button === true ? 6 : 2}px;
|
|
3647
3772
|
opacity: 0.4;
|
|
3773
|
+
margin-bottom: 8px;
|
|
3648
3774
|
`;
|
|
3649
|
-
const
|
|
3650
|
-
width:
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3775
|
+
const Input$1 = styled__default["default"].div`
|
|
3776
|
+
min-width: 80px;
|
|
3777
|
+
height: 32px;
|
|
3778
|
+
border-radius: 4px;
|
|
3779
|
+
border-width: 2px;
|
|
3780
|
+
border-style: solid;
|
|
3781
|
+
border-color: #a1a8c2;
|
|
3782
|
+
opacity: 0.4;
|
|
3783
|
+
`;
|
|
3784
|
+
const Button = styled__default["default"].div`
|
|
3785
|
+
min-width: 140px;
|
|
3786
|
+
height: 32px;
|
|
3787
|
+
border-radius: 4px;
|
|
3788
|
+
background-color: #a1a8c2;
|
|
3789
|
+
opacity: 0.4;
|
|
3790
|
+
`;
|
|
3791
|
+
var Placeholder$1 = React.forwardRef(function Placeholder3({
|
|
3792
|
+
width,
|
|
3793
|
+
margin
|
|
3794
|
+
}, ref) {
|
|
3795
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Container$7, {
|
|
3796
|
+
ref,
|
|
3797
|
+
width,
|
|
3798
|
+
margin,
|
|
3799
|
+
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
3800
|
+
style: {
|
|
3801
|
+
display: "flex",
|
|
3802
|
+
flexDirection: "column",
|
|
3803
|
+
marginBottom: 16
|
|
3804
|
+
},
|
|
3805
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(Label$2, {}), /* @__PURE__ */ jsxRuntime.jsx(Input$1, {})]
|
|
3806
|
+
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
3807
|
+
style: {
|
|
3808
|
+
display: "flex",
|
|
3809
|
+
flexDirection: "column",
|
|
3810
|
+
marginBottom: 16
|
|
3811
|
+
},
|
|
3812
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(Label$2, {}), /* @__PURE__ */ jsxRuntime.jsx(Input$1, {})]
|
|
3813
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
3814
|
+
style: {
|
|
3815
|
+
display: "flex",
|
|
3816
|
+
flexDirection: "column",
|
|
3817
|
+
justifyContent: "flex-end"
|
|
3818
|
+
},
|
|
3819
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Button, {})
|
|
3820
|
+
})]
|
|
3669
3821
|
});
|
|
3822
|
+
});
|
|
3823
|
+
function getSizeHeight(size) {
|
|
3824
|
+
switch (size) {
|
|
3825
|
+
case Sizes.SMALL:
|
|
3826
|
+
return 14;
|
|
3827
|
+
case Sizes.MEDIUM:
|
|
3828
|
+
return 18;
|
|
3829
|
+
case Sizes.LARGE:
|
|
3830
|
+
return 22;
|
|
3831
|
+
default:
|
|
3832
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
3833
|
+
}
|
|
3670
3834
|
}
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3835
|
+
function getContrastColor(contrast) {
|
|
3836
|
+
switch (contrast) {
|
|
3837
|
+
case Contrasts.LIGHT:
|
|
3838
|
+
return "rgba(0, 0, 0, 0.8)";
|
|
3839
|
+
case Contrasts.DARK:
|
|
3840
|
+
return "rgba(255, 255, 255, 0.95)";
|
|
3841
|
+
default:
|
|
3842
|
+
throw new Error(`Invalid form contrast "${contrast}"`);
|
|
3843
|
+
}
|
|
3844
|
+
}
|
|
3845
|
+
const Base$1 = styled__default["default"].label`
|
|
3846
|
+
display: block;
|
|
3847
|
+
margin: 0 0 0.25em 0;
|
|
3848
|
+
${cssTextStyle()}
|
|
3849
|
+
${(props) => cssMediaRules([props.size, props.contrast, props.textColor], ([size = Sizes.MEDIUM, contrast = Contrasts.LIGHT, textColor]) => styled.css`
|
|
3850
|
+
min-height: ${getSizeHeight(size)}px;
|
|
3851
|
+
color: ${textColor == null ? getContrastColor(contrast) : colorToString(textColor)};
|
|
3852
|
+
`)}
|
|
3853
|
+
`;
|
|
3854
|
+
function Label$1(props) {
|
|
3855
|
+
const {
|
|
3856
|
+
contrast,
|
|
3857
|
+
size,
|
|
3858
|
+
labelTextStyle,
|
|
3859
|
+
labelTextColor
|
|
3860
|
+
} = useFormContext();
|
|
3861
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Base$1, __spreadProps(__spreadValues({}, props), {
|
|
3862
|
+
contrast,
|
|
3863
|
+
size,
|
|
3864
|
+
textStyle: labelTextStyle,
|
|
3865
|
+
textColor: useColor(labelTextColor)
|
|
3866
|
+
}));
|
|
3867
|
+
}
|
|
3868
|
+
var SingleLineTextTableField = React.forwardRef(function SingleLineTextTableField2(_q, ref) {
|
|
3869
|
+
var _r = _q, {
|
|
3870
|
+
id,
|
|
3871
|
+
label = "",
|
|
3872
|
+
name,
|
|
3873
|
+
error,
|
|
3874
|
+
hideLabel = false
|
|
3875
|
+
} = _r, restOfProps = __objRest(_r, [
|
|
3876
|
+
"id",
|
|
3877
|
+
"label",
|
|
3878
|
+
"name",
|
|
3879
|
+
"error",
|
|
3880
|
+
"hideLabel"
|
|
3881
|
+
]);
|
|
3882
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3883
|
+
children: [!hideLabel && /* @__PURE__ */ jsxRuntime.jsx(Label$1, {
|
|
3884
|
+
htmlFor: id,
|
|
3885
|
+
children: label
|
|
3886
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3887
|
+
"aria-label": label,
|
|
3888
|
+
ref,
|
|
3889
|
+
id,
|
|
3890
|
+
name,
|
|
3891
|
+
type: "text",
|
|
3892
|
+
error: error != null
|
|
3893
|
+
}))]
|
|
3894
|
+
});
|
|
3895
|
+
});
|
|
3896
|
+
const Base = styled__default["default"].textarea`
|
|
3897
|
+
resize: vertical;
|
|
3898
|
+
${cssField()}
|
|
3899
|
+
`;
|
|
3900
|
+
var TextArea = React.forwardRef(function TextArea2(_s, ref) {
|
|
3901
|
+
var _t = _s, {
|
|
3902
|
+
error = false,
|
|
3903
|
+
form
|
|
3904
|
+
} = _t, restOfProps = __objRest(_t, [
|
|
3905
|
+
"error",
|
|
3906
|
+
"form"
|
|
3907
|
+
]);
|
|
3908
|
+
const {
|
|
3909
|
+
shape,
|
|
3910
|
+
size,
|
|
3911
|
+
contrast,
|
|
3912
|
+
brandColor
|
|
3913
|
+
} = useFormContext();
|
|
3914
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Base, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3915
|
+
ref,
|
|
3916
|
+
rows: 4,
|
|
3917
|
+
error,
|
|
3918
|
+
shape,
|
|
3919
|
+
size,
|
|
3920
|
+
contrast,
|
|
3921
|
+
brandColor
|
|
3922
|
+
}));
|
|
3923
|
+
});
|
|
3924
|
+
var LongTextTableField = React.forwardRef(function LongTextTableField2(_u, ref) {
|
|
3925
|
+
var _v = _u, {
|
|
3926
|
+
id,
|
|
3927
|
+
label = "",
|
|
3928
|
+
error,
|
|
3929
|
+
hideLabel = false
|
|
3930
|
+
} = _v, restOfProps = __objRest(_v, [
|
|
3931
|
+
"id",
|
|
3932
|
+
"label",
|
|
3933
|
+
"error",
|
|
3934
|
+
"hideLabel"
|
|
3935
|
+
]);
|
|
3936
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3937
|
+
children: [!hideLabel && /* @__PURE__ */ jsxRuntime.jsx(Label$1, {
|
|
3938
|
+
htmlFor: id,
|
|
3939
|
+
children: label
|
|
3940
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(TextArea, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3941
|
+
"aria-label": label,
|
|
3942
|
+
ref,
|
|
3943
|
+
id,
|
|
3944
|
+
error: error != null
|
|
3945
|
+
}))]
|
|
3946
|
+
});
|
|
3947
|
+
});
|
|
3948
|
+
function getCheckmarkColor$1({
|
|
3949
|
+
swatch: {
|
|
3950
|
+
hue: h,
|
|
3951
|
+
saturation: s,
|
|
3952
|
+
lightness: l
|
|
3953
|
+
},
|
|
3954
|
+
alpha: a
|
|
3955
|
+
}) {
|
|
3956
|
+
return ColorHelper__default["default"]({
|
|
3957
|
+
h,
|
|
3958
|
+
s,
|
|
3959
|
+
l
|
|
3960
|
+
}).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
|
|
3961
|
+
}
|
|
3962
|
+
const Container$6 = styled__default["default"].div`
|
|
3963
|
+
position: relative;
|
|
3964
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => styled.css`
|
|
3965
|
+
height: ${getSizeHeight(size)}px;
|
|
3966
|
+
width: ${getSizeHeight(size)}px;
|
|
3967
|
+
`)}
|
|
3968
|
+
`;
|
|
3969
|
+
const FakeCheckbox = styled__default["default"].div`
|
|
3970
|
+
position: absolute;
|
|
3971
|
+
width: 100%;
|
|
3972
|
+
height: 100%;
|
|
3973
|
+
border-style: solid;
|
|
3974
|
+
border-radius: 4px;
|
|
3975
|
+
pointer-events: none;
|
|
3976
|
+
border-width: 1px;
|
|
3977
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => styled.css`
|
|
3978
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
3979
|
+
background-color: ${getContrastBackgroundColor(contrast)};
|
|
3980
|
+
`)}
|
|
3981
|
+
`;
|
|
3982
|
+
const HiddenCheckbox = styled__default["default"].input`
|
|
3983
|
+
position: absolute;
|
|
3984
|
+
opacity: 0;
|
|
3985
|
+
width: 100%;
|
|
3986
|
+
height: 100%;
|
|
3987
|
+
cursor: pointer;
|
|
3988
|
+
|
|
3989
|
+
&:disabled {
|
|
3990
|
+
cursor: no-drop;
|
|
3991
|
+
|
|
3992
|
+
& ~ ${FakeCheckbox} {
|
|
3993
|
+
opacity: 0.5;
|
|
3994
|
+
}
|
|
3995
|
+
}
|
|
3996
|
+
|
|
3997
|
+
&:checked ~ ${FakeCheckbox} {
|
|
3998
|
+
${(props) => cssMediaRules([props.brandColor], ([{
|
|
3999
|
+
swatch = {
|
|
4000
|
+
hue: 0,
|
|
4001
|
+
saturation: 0,
|
|
4002
|
+
lightness: 0
|
|
4003
|
+
},
|
|
4004
|
+
alpha = 1
|
|
4005
|
+
} = {}]) => styled.css`
|
|
4006
|
+
background-color: ${colorToString({
|
|
4007
|
+
swatch,
|
|
4008
|
+
alpha
|
|
4009
|
+
})};
|
|
4010
|
+
`)}
|
|
4011
|
+
border-color: transparent;
|
|
4012
|
+
|
|
4013
|
+
&::after {
|
|
4014
|
+
content: '';
|
|
4015
|
+
position: absolute;
|
|
4016
|
+
box-sizing: content-box;
|
|
4017
|
+
width: 25%;
|
|
4018
|
+
height: 50%;
|
|
4019
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => styled.css`
|
|
4020
|
+
border-width: ${getSizeHeight(size) * 0.1}px;
|
|
4021
|
+
border-left: 0;
|
|
4022
|
+
border-top: 0;
|
|
4023
|
+
`)}
|
|
4024
|
+
border-style: solid;
|
|
4025
|
+
${(props) => cssMediaRules([props.brandColor], ([{
|
|
4026
|
+
swatch = {
|
|
4027
|
+
hue: 0,
|
|
4028
|
+
saturation: 0,
|
|
4029
|
+
lightness: 0
|
|
4030
|
+
},
|
|
4031
|
+
alpha = 1
|
|
4032
|
+
} = {}]) => styled.css`
|
|
4033
|
+
border-color: ${getCheckmarkColor$1({
|
|
4034
|
+
swatch,
|
|
4035
|
+
alpha
|
|
4036
|
+
})};
|
|
4037
|
+
`)}
|
|
4038
|
+
transform: rotate(45deg) translate3d(91%, -23%, 0);
|
|
4039
|
+
}
|
|
4040
|
+
}
|
|
4041
|
+
|
|
4042
|
+
&:not(:disabled) {
|
|
4043
|
+
&:focus ~ ${FakeCheckbox} {
|
|
4044
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4045
|
+
swatch: {
|
|
4046
|
+
hue: 0,
|
|
4047
|
+
saturation: 0,
|
|
4048
|
+
lightness: 0
|
|
4049
|
+
},
|
|
4050
|
+
alpha: 1
|
|
4051
|
+
}]) => styled.css`
|
|
4052
|
+
border-color: ${colorToString(brandColor)};
|
|
4053
|
+
`)}
|
|
4054
|
+
}
|
|
4055
|
+
}
|
|
4056
|
+
|
|
4057
|
+
&:not(:disabled):checked {
|
|
4058
|
+
&:focus ~ ${FakeCheckbox} {
|
|
4059
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => styled.css`
|
|
4060
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
4061
|
+
`)}
|
|
4062
|
+
}
|
|
4063
|
+
}
|
|
4064
|
+
`;
|
|
4065
|
+
var Checkbox = React.forwardRef(function Checkbox2(_w, ref) {
|
|
4066
|
+
var _x = _w, {
|
|
4067
|
+
error,
|
|
4068
|
+
className,
|
|
4069
|
+
style,
|
|
4070
|
+
form
|
|
4071
|
+
} = _x, restOfProps = __objRest(_x, [
|
|
4072
|
+
"error",
|
|
4073
|
+
"className",
|
|
4074
|
+
"style",
|
|
4075
|
+
"form"
|
|
4076
|
+
]);
|
|
4077
|
+
const {
|
|
4078
|
+
size,
|
|
4079
|
+
contrast,
|
|
4080
|
+
brandColor
|
|
4081
|
+
} = useFormContext();
|
|
4082
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Container$6, {
|
|
4083
|
+
size,
|
|
4084
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(HiddenCheckbox, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4085
|
+
type: "checkbox",
|
|
4086
|
+
ref,
|
|
4087
|
+
error,
|
|
4088
|
+
size,
|
|
4089
|
+
contrast,
|
|
4090
|
+
brandColor
|
|
4091
|
+
})), /* @__PURE__ */ jsxRuntime.jsx(FakeCheckbox, {
|
|
4092
|
+
className,
|
|
4093
|
+
error,
|
|
4094
|
+
contrast,
|
|
4095
|
+
style
|
|
4096
|
+
})]
|
|
4097
|
+
});
|
|
4098
|
+
});
|
|
4099
|
+
const StyledLabel$2 = styled__default["default"](Label$1)`
|
|
4100
|
+
display: flex;
|
|
4101
|
+
align-items: center;
|
|
4102
|
+
margin: 0;
|
|
4103
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => styled.css`
|
|
4104
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
4105
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
4106
|
+
`)}
|
|
4107
|
+
`;
|
|
4108
|
+
const CheckboxContainer$1 = styled__default["default"].span`
|
|
4109
|
+
margin-right: 8px;
|
|
4110
|
+
`;
|
|
4111
|
+
var CheckboxTableField = React.forwardRef(function CheckboxTableField2(_y, ref) {
|
|
4112
|
+
var _z = _y, {
|
|
4113
|
+
form,
|
|
4114
|
+
id,
|
|
4115
|
+
name,
|
|
4116
|
+
label = "",
|
|
4117
|
+
value = false,
|
|
4118
|
+
error
|
|
4119
|
+
} = _z, restOfProps = __objRest(_z, [
|
|
4120
|
+
"form",
|
|
4121
|
+
"id",
|
|
4122
|
+
"name",
|
|
4123
|
+
"label",
|
|
4124
|
+
"value",
|
|
4125
|
+
"error"
|
|
4126
|
+
]);
|
|
4127
|
+
const {
|
|
4128
|
+
size
|
|
4129
|
+
} = useFormContext();
|
|
4130
|
+
function handleChange(event) {
|
|
4131
|
+
form.setFieldValue(name, event.currentTarget.checked);
|
|
4132
|
+
}
|
|
4133
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(StyledLabel$2, {
|
|
4134
|
+
htmlFor: id,
|
|
4135
|
+
size,
|
|
4136
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(CheckboxContainer$1, {
|
|
4137
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Checkbox, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4138
|
+
"aria-label": label,
|
|
4139
|
+
checked: value,
|
|
4140
|
+
onChange: handleChange,
|
|
4141
|
+
ref,
|
|
4142
|
+
id,
|
|
4143
|
+
error: error != null
|
|
4144
|
+
}))
|
|
4145
|
+
}), label]
|
|
4146
|
+
});
|
|
4147
|
+
});
|
|
4148
|
+
const MainLabel = styled__default["default"](Label$1)`
|
|
4149
|
+
margin: 0 0 4px 0;
|
|
4150
|
+
`;
|
|
4151
|
+
const StyledLabel$1 = styled__default["default"](Label$1)`
|
|
4152
|
+
display: flex;
|
|
4153
|
+
align-items: center;
|
|
4154
|
+
margin: 8px 0;
|
|
4155
|
+
|
|
4156
|
+
&:last-of-type {
|
|
4157
|
+
margin-bottom: 0;
|
|
4158
|
+
}
|
|
4159
|
+
`;
|
|
4160
|
+
const CheckboxContainer = styled__default["default"].span`
|
|
4161
|
+
margin-right: 8px;
|
|
4162
|
+
`;
|
|
4163
|
+
var MultipleSelectTableField = React.forwardRef(function MultipleSelectTableField2(_A, ref) {
|
|
4164
|
+
var _B = _A, {
|
|
4165
|
+
tableColumn,
|
|
4166
|
+
label = "",
|
|
4167
|
+
required,
|
|
4168
|
+
value = [],
|
|
4169
|
+
onChange,
|
|
4170
|
+
hideLabel = false
|
|
4171
|
+
} = _B, restOfProps = __objRest(_B, [
|
|
4172
|
+
"tableColumn",
|
|
4173
|
+
"label",
|
|
4174
|
+
"required",
|
|
4175
|
+
"value",
|
|
4176
|
+
"onChange",
|
|
4177
|
+
"hideLabel"
|
|
4178
|
+
]);
|
|
4179
|
+
const handle = React.useRef({
|
|
4180
|
+
validity: {
|
|
4181
|
+
valueMissing: required === true && value.length === 0,
|
|
4182
|
+
typeMismatch: false
|
|
4183
|
+
}
|
|
4184
|
+
});
|
|
4185
|
+
React.useImperativeHandle(ref, () => handle.current, []);
|
|
4186
|
+
function handleChange(event) {
|
|
4187
|
+
handle.current.validity.valueMissing = required === true && !event.currentTarget.checked && value.filter((v) => v !== event.currentTarget.value).length === 0;
|
|
4188
|
+
onChange(event);
|
|
4189
|
+
}
|
|
4190
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
4191
|
+
children: [!hideLabel && /* @__PURE__ */ jsxRuntime.jsx(MainLabel, {
|
|
4192
|
+
children: label
|
|
4193
|
+
}), tableColumn.options.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(StyledLabel$1, {
|
|
4194
|
+
htmlFor: option.id,
|
|
4195
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(CheckboxContainer, {
|
|
4196
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Checkbox, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4197
|
+
"aria-label": label,
|
|
4198
|
+
onChange: handleChange,
|
|
4199
|
+
checked: value.includes(option.name),
|
|
4200
|
+
id: option.id,
|
|
4201
|
+
value: option.name
|
|
4202
|
+
}))
|
|
4203
|
+
}), option.name]
|
|
4204
|
+
}, option.id))]
|
|
4205
|
+
});
|
|
4206
|
+
});
|
|
4207
|
+
function getCheckmarkColor({
|
|
4208
|
+
swatch: {
|
|
4209
|
+
hue: h,
|
|
4210
|
+
saturation: s,
|
|
4211
|
+
lightness: l
|
|
4212
|
+
} = {
|
|
4213
|
+
hue: 0,
|
|
4214
|
+
saturation: 0,
|
|
4215
|
+
lightness: 0
|
|
4216
|
+
},
|
|
4217
|
+
alpha: a
|
|
4218
|
+
}) {
|
|
4219
|
+
return ColorHelper__default["default"]({
|
|
4220
|
+
h,
|
|
4221
|
+
s,
|
|
4222
|
+
l
|
|
4223
|
+
}).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
|
|
4224
|
+
}
|
|
4225
|
+
const Container$5 = styled__default["default"].div`
|
|
4226
|
+
position: relative;
|
|
4227
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => styled.css`
|
|
4228
|
+
height: ${getSizeHeight(size)}px;
|
|
4229
|
+
width: ${getSizeHeight(size)}px;
|
|
4230
|
+
`)}
|
|
4231
|
+
`;
|
|
4232
|
+
const FakeRadioButton = styled__default["default"].div`
|
|
4233
|
+
position: absolute;
|
|
4234
|
+
width: 100%;
|
|
4235
|
+
height: 100%;
|
|
4236
|
+
border-style: solid;
|
|
4237
|
+
border-radius: 50%;
|
|
4238
|
+
pointer-events: none;
|
|
4239
|
+
border-width: 1px;
|
|
4240
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => styled.css`
|
|
4241
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
4242
|
+
background-color: ${getContrastBackgroundColor(contrast)};
|
|
4243
|
+
`)}
|
|
4244
|
+
`;
|
|
4245
|
+
const HiddenRadioButton = styled__default["default"].input.attrs({
|
|
4246
|
+
type: "radio"
|
|
4247
|
+
})`
|
|
4248
|
+
position: absolute;
|
|
4249
|
+
opacity: 0;
|
|
4250
|
+
width: 100%;
|
|
4251
|
+
height: 100%;
|
|
4252
|
+
cursor: pointer;
|
|
4253
|
+
|
|
4254
|
+
&:disabled {
|
|
4255
|
+
cursor: no-drop;
|
|
4256
|
+
|
|
4257
|
+
& ~ ${FakeRadioButton} {
|
|
4258
|
+
opacity: 0.5;
|
|
4259
|
+
}
|
|
4260
|
+
}
|
|
4261
|
+
|
|
4262
|
+
&:checked ~ ${FakeRadioButton} {
|
|
4263
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4264
|
+
swatch: {
|
|
4265
|
+
hue: 0,
|
|
4266
|
+
saturation: 0,
|
|
4267
|
+
lightness: 0
|
|
4268
|
+
},
|
|
4269
|
+
alpha: 1
|
|
4270
|
+
}]) => styled.css`
|
|
4271
|
+
background-color: ${colorToString(brandColor)};
|
|
4272
|
+
`)}
|
|
4273
|
+
border-color: transparent;
|
|
4274
|
+
|
|
4275
|
+
&::after {
|
|
4276
|
+
content: '';
|
|
4277
|
+
position: absolute;
|
|
4278
|
+
box-sizing: content-box;
|
|
4279
|
+
top: 50%;
|
|
4280
|
+
left: 50%;
|
|
4281
|
+
width: 50%;
|
|
4282
|
+
height: 50%;
|
|
4283
|
+
border-radius: 50%;
|
|
4284
|
+
transform: translate(-50%, -50%);
|
|
4285
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4286
|
+
swatch: {
|
|
4287
|
+
hue: 0,
|
|
4288
|
+
saturation: 0,
|
|
4289
|
+
lightness: 0
|
|
4290
|
+
},
|
|
4291
|
+
alpha: 1
|
|
4292
|
+
}]) => styled.css`
|
|
4293
|
+
background-color: ${getCheckmarkColor(brandColor)};
|
|
4294
|
+
`)}
|
|
4295
|
+
}
|
|
4296
|
+
}
|
|
4297
|
+
|
|
4298
|
+
&:not(:disabled) {
|
|
4299
|
+
&:focus ~ ${FakeRadioButton} {
|
|
4300
|
+
${(props) => cssMediaRules([props.brandColor], ([brandColor = {
|
|
4301
|
+
swatch: {
|
|
4302
|
+
hue: 0,
|
|
4303
|
+
saturation: 0,
|
|
4304
|
+
lightness: 0
|
|
4305
|
+
},
|
|
4306
|
+
alpha: 1
|
|
4307
|
+
}]) => styled.css`
|
|
4308
|
+
border-color: ${colorToString(brandColor)};
|
|
4309
|
+
`)}
|
|
4310
|
+
}
|
|
4311
|
+
}
|
|
4312
|
+
|
|
4313
|
+
&:not(:disabled):checked {
|
|
4314
|
+
&:focus ~ ${FakeRadioButton} {
|
|
4315
|
+
${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => styled.css`
|
|
4316
|
+
border-color: ${getContrastBorderColor(contrast, props.error)};
|
|
4317
|
+
`)}
|
|
4318
|
+
}
|
|
4319
|
+
}
|
|
4320
|
+
`;
|
|
4321
|
+
var RadioButton = React.forwardRef(function RadioButton2(_C, ref) {
|
|
4322
|
+
var _D = _C, {
|
|
4323
|
+
error,
|
|
4324
|
+
className,
|
|
4325
|
+
style,
|
|
4326
|
+
form
|
|
4327
|
+
} = _D, restOfProps = __objRest(_D, [
|
|
4328
|
+
"error",
|
|
4329
|
+
"className",
|
|
4330
|
+
"style",
|
|
4331
|
+
"form"
|
|
4332
|
+
]);
|
|
4333
|
+
const {
|
|
4334
|
+
size,
|
|
4335
|
+
contrast,
|
|
4336
|
+
brandColor
|
|
4337
|
+
} = useFormContext();
|
|
4338
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Container$5, {
|
|
4339
|
+
size,
|
|
4340
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(HiddenRadioButton, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4341
|
+
ref,
|
|
4342
|
+
error,
|
|
4343
|
+
contrast,
|
|
4344
|
+
brandColor
|
|
4345
|
+
})), /* @__PURE__ */ jsxRuntime.jsx(FakeRadioButton, {
|
|
4346
|
+
className,
|
|
4347
|
+
error,
|
|
4348
|
+
contrast,
|
|
4349
|
+
style
|
|
4350
|
+
})]
|
|
4351
|
+
});
|
|
4352
|
+
});
|
|
4353
|
+
const StyledLabel = styled__default["default"](Label$1)`
|
|
4354
|
+
display: flex;
|
|
4355
|
+
align-items: center;
|
|
4356
|
+
margin: 8px 0;
|
|
4357
|
+
|
|
4358
|
+
&:last-of-type {
|
|
4359
|
+
margin-bottom: 0;
|
|
4360
|
+
}
|
|
4361
|
+
`;
|
|
4362
|
+
const RadioButtonContainer = styled__default["default"].span`
|
|
4363
|
+
margin-right: 8px;
|
|
4364
|
+
`;
|
|
4365
|
+
var TableColumnRadioButtonGroup = React.forwardRef(function TableColumnRadioButtonGroup2(_E, ref) {
|
|
4366
|
+
var _F = _E, {
|
|
4367
|
+
tableColumn,
|
|
4368
|
+
label = "",
|
|
4369
|
+
value = "",
|
|
4370
|
+
required = false,
|
|
4371
|
+
hideLabel = false,
|
|
4372
|
+
onChange
|
|
4373
|
+
} = _F, restOfProps = __objRest(_F, [
|
|
4374
|
+
"tableColumn",
|
|
4375
|
+
"label",
|
|
4376
|
+
"value",
|
|
4377
|
+
"required",
|
|
4378
|
+
"hideLabel",
|
|
4379
|
+
"onChange"
|
|
4380
|
+
]);
|
|
4381
|
+
const handle = React.useRef({
|
|
4382
|
+
validity: {
|
|
4383
|
+
valueMissing: required === true && value === "",
|
|
4384
|
+
typeMismatch: false
|
|
4385
|
+
}
|
|
4386
|
+
});
|
|
4387
|
+
React.useImperativeHandle(ref, () => handle.current, []);
|
|
4388
|
+
function handleChange(event) {
|
|
4389
|
+
handle.current.validity.valueMissing = required === true && !event.currentTarget.checked;
|
|
4390
|
+
onChange(event);
|
|
4391
|
+
}
|
|
4392
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
4393
|
+
children: [!hideLabel && /* @__PURE__ */ jsxRuntime.jsx(Label$1, {
|
|
4394
|
+
as: "p",
|
|
4395
|
+
children: label
|
|
4396
|
+
}), tableColumn.options.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(StyledLabel, {
|
|
4397
|
+
htmlFor: option.id,
|
|
4398
|
+
"aria-label": label,
|
|
4399
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(RadioButtonContainer, {
|
|
4400
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(RadioButton, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4401
|
+
onChange: handleChange,
|
|
4402
|
+
checked: value === option.name,
|
|
4403
|
+
id: option.id,
|
|
4404
|
+
value: option.name
|
|
4405
|
+
}))
|
|
4406
|
+
}), option.name]
|
|
4407
|
+
}, option.id))]
|
|
4408
|
+
});
|
|
4409
|
+
});
|
|
4410
|
+
const Container$4 = styled__default["default"].div`
|
|
4411
|
+
${cssField()}
|
|
4412
|
+
display: flex;
|
|
4413
|
+
align-items: center;
|
|
4414
|
+
position: relative;
|
|
4415
|
+
user-select: none;
|
|
4416
|
+
border-color: #f19eb9;
|
|
4417
|
+
|
|
4418
|
+
&:focus,
|
|
4419
|
+
&:focus-within {
|
|
4420
|
+
border-color: #e54e7f;
|
|
4421
|
+
}
|
|
4422
|
+
|
|
4423
|
+
${(props) => cssMediaRules([props.size, props.contrast], ([size = Sizes.MEDIUM, contrast = Contrasts.LIGHT]) => styled.css`
|
|
4424
|
+
min-height: ${getSizeHeight$2(size)}px;
|
|
4425
|
+
max-height: ${getSizeHeight$2(size)}px;
|
|
4426
|
+
|
|
4427
|
+
&::after {
|
|
4428
|
+
content: '';
|
|
4429
|
+
position: absolute;
|
|
4430
|
+
right: ${getSizeHorizontalPadding(size)}px;
|
|
4431
|
+
top: 50%;
|
|
4432
|
+
transform: translate3d(0, -25%, 0);
|
|
4433
|
+
border: solid 0.35em transparent;
|
|
4434
|
+
border-top-color: ${getContrastColor$1(contrast)};
|
|
4435
|
+
}
|
|
4436
|
+
`)}
|
|
4437
|
+
`;
|
|
4438
|
+
const Select = styled__default["default"].select`
|
|
4439
|
+
appearance: none;
|
|
4440
|
+
position: absolute;
|
|
4441
|
+
top: 0;
|
|
4442
|
+
left: 0;
|
|
4443
|
+
opacity: 0;
|
|
4444
|
+
width: 100%;
|
|
4445
|
+
height: 100%;
|
|
4446
|
+
`;
|
|
4447
|
+
var TableColumnSingleSelect = React.forwardRef(function TableColumnSingleSelect2(_G, ref) {
|
|
4448
|
+
var _H = _G, {
|
|
4449
|
+
id,
|
|
4450
|
+
tableColumn,
|
|
4451
|
+
value = "",
|
|
4452
|
+
label = "",
|
|
4453
|
+
error = false,
|
|
4454
|
+
hideLabel = false,
|
|
4455
|
+
form
|
|
4456
|
+
} = _H, restOfProps = __objRest(_H, [
|
|
4457
|
+
"id",
|
|
4458
|
+
"tableColumn",
|
|
4459
|
+
"value",
|
|
4460
|
+
"label",
|
|
4461
|
+
"error",
|
|
4462
|
+
"hideLabel",
|
|
4463
|
+
"form"
|
|
4464
|
+
]);
|
|
4465
|
+
const {
|
|
4466
|
+
shape,
|
|
4467
|
+
size,
|
|
4468
|
+
contrast,
|
|
4469
|
+
brandColor
|
|
4470
|
+
} = useFormContext();
|
|
4471
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4472
|
+
children: [!hideLabel && /* @__PURE__ */ jsxRuntime.jsx(Label$1, {
|
|
4473
|
+
htmlFor: id,
|
|
4474
|
+
children: label
|
|
4475
|
+
}), /* @__PURE__ */ jsxRuntime.jsxs(Container$4, {
|
|
4476
|
+
error,
|
|
4477
|
+
shape,
|
|
4478
|
+
size,
|
|
4479
|
+
contrast,
|
|
4480
|
+
brandColor,
|
|
4481
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
4482
|
+
children: value === "" ? "-" : value
|
|
4483
|
+
}), /* @__PURE__ */ jsxRuntime.jsxs(Select, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4484
|
+
"aria-label": label,
|
|
4485
|
+
ref,
|
|
4486
|
+
id,
|
|
4487
|
+
value,
|
|
4488
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("option", {
|
|
4489
|
+
value: "",
|
|
4490
|
+
children: "-"
|
|
4491
|
+
}), tableColumn.options.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", {
|
|
4492
|
+
value: option.name,
|
|
4493
|
+
children: option.name
|
|
4494
|
+
}, option.id))]
|
|
4495
|
+
}))]
|
|
4496
|
+
})]
|
|
4497
|
+
});
|
|
4498
|
+
});
|
|
4499
|
+
var SingleSelectTableField = React.forwardRef(function SingleSelectTableField2(_I, ref) {
|
|
4500
|
+
var _J = _I, {
|
|
4501
|
+
type
|
|
4502
|
+
} = _J, restOfProps = __objRest(_J, [
|
|
4503
|
+
"type"
|
|
4504
|
+
]);
|
|
4505
|
+
return type === "select" ? /* @__PURE__ */ jsxRuntime.jsx(TableColumnSingleSelect, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4506
|
+
ref
|
|
4507
|
+
})) : /* @__PURE__ */ jsxRuntime.jsx(TableColumnRadioButtonGroup, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4508
|
+
ref
|
|
4509
|
+
}));
|
|
4510
|
+
});
|
|
4511
|
+
var PhoneNumberTableField = React.forwardRef(function PhoneNumberTableField2(_K, ref) {
|
|
4512
|
+
var _L = _K, {
|
|
4513
|
+
id,
|
|
4514
|
+
label = "",
|
|
4515
|
+
name,
|
|
4516
|
+
error,
|
|
4517
|
+
hideLabel = false
|
|
4518
|
+
} = _L, restOfProps = __objRest(_L, [
|
|
4519
|
+
"id",
|
|
4520
|
+
"label",
|
|
4521
|
+
"name",
|
|
4522
|
+
"error",
|
|
4523
|
+
"hideLabel"
|
|
4524
|
+
]);
|
|
4525
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4526
|
+
children: [!hideLabel && /* @__PURE__ */ jsxRuntime.jsx(Label$1, {
|
|
4527
|
+
htmlFor: id,
|
|
4528
|
+
children: label
|
|
4529
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4530
|
+
"aria-label": label,
|
|
4531
|
+
ref,
|
|
4532
|
+
id,
|
|
4533
|
+
name,
|
|
4534
|
+
type: "tel",
|
|
4535
|
+
error: error != null
|
|
4536
|
+
}))]
|
|
4537
|
+
});
|
|
4538
|
+
});
|
|
4539
|
+
var EmailTableField = React.forwardRef(function EmailTableField2(_M, ref) {
|
|
4540
|
+
var _N = _M, {
|
|
4541
|
+
id,
|
|
4542
|
+
label = "",
|
|
4543
|
+
name,
|
|
4544
|
+
error,
|
|
4545
|
+
hideLabel = false
|
|
4546
|
+
} = _N, restOfProps = __objRest(_N, [
|
|
4547
|
+
"id",
|
|
4548
|
+
"label",
|
|
4549
|
+
"name",
|
|
4550
|
+
"error",
|
|
4551
|
+
"hideLabel"
|
|
4552
|
+
]);
|
|
4553
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4554
|
+
children: [!hideLabel && /* @__PURE__ */ jsxRuntime.jsx(Label$1, {
|
|
4555
|
+
htmlFor: id,
|
|
4556
|
+
children: label
|
|
4557
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4558
|
+
"aria-label": label,
|
|
4559
|
+
ref,
|
|
4560
|
+
id,
|
|
4561
|
+
name,
|
|
4562
|
+
type: "email",
|
|
4563
|
+
error: error != null
|
|
4564
|
+
}))]
|
|
4565
|
+
});
|
|
4566
|
+
});
|
|
4567
|
+
var URLTableField = React.forwardRef(function URLTableField2(_O, ref) {
|
|
4568
|
+
var _P = _O, {
|
|
4569
|
+
id,
|
|
4570
|
+
label = "",
|
|
4571
|
+
name,
|
|
4572
|
+
error,
|
|
4573
|
+
hideLabel = false
|
|
4574
|
+
} = _P, restOfProps = __objRest(_P, [
|
|
4575
|
+
"id",
|
|
4576
|
+
"label",
|
|
4577
|
+
"name",
|
|
4578
|
+
"error",
|
|
4579
|
+
"hideLabel"
|
|
4580
|
+
]);
|
|
4581
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4582
|
+
children: [!hideLabel && /* @__PURE__ */ jsxRuntime.jsx(Label$1, {
|
|
4583
|
+
htmlFor: id,
|
|
4584
|
+
children: label
|
|
4585
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4586
|
+
"aria-label": label,
|
|
4587
|
+
ref,
|
|
4588
|
+
id,
|
|
4589
|
+
name,
|
|
4590
|
+
type: "url",
|
|
4591
|
+
error: error != null
|
|
4592
|
+
}))]
|
|
4593
|
+
});
|
|
4594
|
+
});
|
|
4595
|
+
var NumberTableField = React.forwardRef(function NumberTableField2(_Q, ref) {
|
|
4596
|
+
var _R = _Q, {
|
|
4597
|
+
id,
|
|
4598
|
+
label = "",
|
|
4599
|
+
name,
|
|
4600
|
+
error,
|
|
4601
|
+
hideLabel = false
|
|
4602
|
+
} = _R, restOfProps = __objRest(_R, [
|
|
4603
|
+
"id",
|
|
4604
|
+
"label",
|
|
4605
|
+
"name",
|
|
4606
|
+
"error",
|
|
4607
|
+
"hideLabel"
|
|
4608
|
+
]);
|
|
4609
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4610
|
+
children: [!hideLabel && /* @__PURE__ */ jsxRuntime.jsx(Label$1, {
|
|
4611
|
+
htmlFor: id,
|
|
4612
|
+
children: label
|
|
4613
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Input$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
4614
|
+
"aria-label": label,
|
|
4615
|
+
ref,
|
|
4616
|
+
id,
|
|
4617
|
+
name,
|
|
4618
|
+
type: "number",
|
|
4619
|
+
error: error != null
|
|
4620
|
+
}))]
|
|
4621
|
+
});
|
|
4622
|
+
});
|
|
4623
|
+
const Label = styled__default["default"].div`
|
|
4624
|
+
display: block;
|
|
4625
|
+
max-width: 120px;
|
|
4626
|
+
min-width: 60px;
|
|
4627
|
+
border-radius: 2px;
|
|
4628
|
+
background-color: #5f49f4;
|
|
4629
|
+
opacity: 0.4;
|
|
4630
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => styled.css`
|
|
4631
|
+
margin: calc(0.25 * ${getSizeHeight(size)}px + 2px) 0;
|
|
4632
|
+
min-height: ${0.5 * getSizeHeight(size)}px;
|
|
4633
|
+
max-height: ${0.5 * getSizeHeight(size)}px;
|
|
4634
|
+
`)}
|
|
4635
|
+
`;
|
|
4636
|
+
const Input = styled__default["default"].div`
|
|
4637
|
+
display: block;
|
|
4638
|
+
width: 100%;
|
|
4639
|
+
border-width: 2px;
|
|
4640
|
+
border-style: solid;
|
|
4641
|
+
border-color: #5f49f4;
|
|
4642
|
+
opacity: 0.4;
|
|
4643
|
+
${(props) => cssMediaRules([props.shape, props.size], ([shape = Shapes.ROUNDED, size = Sizes.MEDIUM]) => styled.css`
|
|
4644
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
4645
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
4646
|
+
border-radius: ${getShapeBorderRadius(shape)}px;
|
|
4647
|
+
`)}
|
|
4648
|
+
`;
|
|
4649
|
+
function PlaceholderTableField() {
|
|
4650
|
+
const {
|
|
4651
|
+
size,
|
|
4652
|
+
shape
|
|
4653
|
+
} = useFormContext();
|
|
4654
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4655
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(Label, {
|
|
4656
|
+
size
|
|
4657
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Input, {
|
|
4658
|
+
shape,
|
|
4659
|
+
size
|
|
4660
|
+
})]
|
|
4661
|
+
});
|
|
4662
|
+
}
|
|
4663
|
+
function getTypeMismatchErrorMessage(tableColumn, label) {
|
|
4664
|
+
switch ((tableColumn || {}).__typename) {
|
|
4665
|
+
case "PhoneNumberTableColumn":
|
|
4666
|
+
return `${label} field must be a valid phone number.`;
|
|
4667
|
+
case "EmailTableColumn":
|
|
4668
|
+
return `${label} field must be a valid email.`;
|
|
4669
|
+
case "URLTableColumn":
|
|
4670
|
+
return `${label} field must be a valid URL.`;
|
|
4671
|
+
case "NumberTableColumn":
|
|
4672
|
+
return `${label} field must be a valid number.`;
|
|
4673
|
+
case "SingleLineTextTableColumn":
|
|
4674
|
+
case "LongTextTableColumn":
|
|
4675
|
+
case "CheckboxTableColumn":
|
|
4676
|
+
default:
|
|
4677
|
+
return `${label} field is invalid.`;
|
|
4678
|
+
}
|
|
4679
|
+
}
|
|
4680
|
+
function getTableColumnField(tableColumn) {
|
|
4681
|
+
switch ((tableColumn || {}).__typename) {
|
|
4682
|
+
case "SingleLineTextTableColumn":
|
|
4683
|
+
return SingleLineTextTableField;
|
|
4684
|
+
case "LongTextTableColumn":
|
|
4685
|
+
return LongTextTableField;
|
|
4686
|
+
case "CheckboxTableColumn":
|
|
4687
|
+
return CheckboxTableField;
|
|
4688
|
+
case "MultipleSelectTableColumn":
|
|
4689
|
+
return MultipleSelectTableField;
|
|
4690
|
+
case "SingleSelectTableColumn":
|
|
4691
|
+
return SingleSelectTableField;
|
|
4692
|
+
case "PhoneNumberTableColumn":
|
|
4693
|
+
return PhoneNumberTableField;
|
|
4694
|
+
case "EmailTableColumn":
|
|
4695
|
+
return EmailTableField;
|
|
4696
|
+
case "URLTableColumn":
|
|
4697
|
+
return URLTableField;
|
|
4698
|
+
case "NumberTableColumn":
|
|
4699
|
+
return NumberTableField;
|
|
4700
|
+
default:
|
|
4701
|
+
return SingleLineTextTableField;
|
|
4702
|
+
}
|
|
4703
|
+
}
|
|
4704
|
+
function Field({
|
|
4705
|
+
tableColumn,
|
|
4706
|
+
tableFormField: {
|
|
4707
|
+
id,
|
|
4708
|
+
label = "",
|
|
4709
|
+
placeholder: placeholder2,
|
|
4710
|
+
required = false,
|
|
4711
|
+
hidden = false,
|
|
4712
|
+
type = "radio",
|
|
4713
|
+
hideLabel = false
|
|
4714
|
+
}
|
|
4715
|
+
}) {
|
|
4716
|
+
const TableColumnField = getTableColumnField(tableColumn);
|
|
4717
|
+
const input = React.useRef(null);
|
|
4718
|
+
if (!tableColumn)
|
|
4719
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PlaceholderTableField, {});
|
|
4720
|
+
function validate() {
|
|
4721
|
+
let errorMessage;
|
|
4722
|
+
if (input.current) {
|
|
4723
|
+
const {
|
|
4724
|
+
validity = {}
|
|
4725
|
+
} = input.current;
|
|
4726
|
+
if (validity.valueMissing)
|
|
4727
|
+
errorMessage = `${label} is required.`;
|
|
4728
|
+
if (validity.typeMismatch)
|
|
4729
|
+
errorMessage = getTypeMismatchErrorMessage(tableColumn, label);
|
|
4730
|
+
}
|
|
4731
|
+
return errorMessage;
|
|
4732
|
+
}
|
|
4733
|
+
return /* @__PURE__ */ jsxRuntime.jsx(formik.Field, {
|
|
4734
|
+
name: tableColumn.name,
|
|
4735
|
+
validate,
|
|
4736
|
+
children: ({
|
|
4737
|
+
field,
|
|
4738
|
+
form
|
|
4739
|
+
}) => hidden ? /* @__PURE__ */ jsxRuntime.jsx("input", __spreadProps(__spreadValues({}, field), {
|
|
4740
|
+
ref: input,
|
|
4741
|
+
type: "hidden"
|
|
4742
|
+
})) : /* @__PURE__ */ jsxRuntime.jsx(TableColumnField, __spreadProps(__spreadValues({}, field), {
|
|
4743
|
+
type,
|
|
4744
|
+
form,
|
|
4745
|
+
tableColumn,
|
|
4746
|
+
ref: input,
|
|
4747
|
+
id,
|
|
4748
|
+
error: formik.getIn(form.touched, field.name) && formik.getIn(form.errors, field.name),
|
|
4749
|
+
label,
|
|
4750
|
+
placeholder: placeholder2,
|
|
4751
|
+
required,
|
|
4752
|
+
hideLabel
|
|
4753
|
+
}))
|
|
4754
|
+
});
|
|
4755
|
+
}
|
|
4756
|
+
var _g;
|
|
4757
|
+
function _extends$t() {
|
|
4758
|
+
_extends$t = Object.assign || function(target) {
|
|
4759
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
4760
|
+
var source = arguments[i];
|
|
4761
|
+
for (var key in source) {
|
|
4762
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
4763
|
+
target[key] = source[key];
|
|
4764
|
+
}
|
|
4765
|
+
}
|
|
4766
|
+
}
|
|
4767
|
+
return target;
|
|
4768
|
+
};
|
|
4769
|
+
return _extends$t.apply(this, arguments);
|
|
4770
|
+
}
|
|
4771
|
+
var SvgSpinner20 = function SvgSpinner202(props) {
|
|
4772
|
+
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$t({
|
|
4773
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4774
|
+
width: 20,
|
|
4775
|
+
height: 20
|
|
4776
|
+
}, props), _g || (_g = /* @__PURE__ */ React__namespace.createElement("g", {
|
|
4777
|
+
fill: "none",
|
|
4778
|
+
strokeWidth: 2,
|
|
4779
|
+
transform: "translate(1 1)"
|
|
4780
|
+
}, /* @__PURE__ */ React__namespace.createElement("circle", {
|
|
4781
|
+
stroke: "currentColor",
|
|
4782
|
+
cx: 9,
|
|
4783
|
+
cy: 9,
|
|
4784
|
+
r: 9,
|
|
4785
|
+
strokeOpacity: 0.4
|
|
4786
|
+
}), /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4787
|
+
d: "M9 18A9 9 0 0 0 9 0"
|
|
4788
|
+
}))));
|
|
4789
|
+
};
|
|
4790
|
+
const spin = styled.keyframes`
|
|
4791
|
+
from {
|
|
4792
|
+
transform: rotate(0deg);
|
|
4793
|
+
}
|
|
4794
|
+
to {
|
|
4795
|
+
transform: rotate(360deg);
|
|
4796
|
+
}
|
|
4797
|
+
`;
|
|
4798
|
+
const Icon = styled__default["default"](SvgSpinner20)`
|
|
4799
|
+
display: inline-flex;
|
|
4800
|
+
animation: ${spin} 1s linear infinite;
|
|
4801
|
+
stroke: currentColor;
|
|
4802
|
+
`;
|
|
4803
|
+
function Spinner() {
|
|
4804
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Icon, {});
|
|
4805
|
+
}
|
|
4806
|
+
function useTableFormFieldRefs(propController, { fieldsCount }) {
|
|
4807
|
+
const [container, setContainer] = React.useState(null);
|
|
4808
|
+
const [items, setItems] = React.useState(Array(fieldsCount + 1).fill(null));
|
|
4809
|
+
const isInBuilder = useIsInBuilder();
|
|
4810
|
+
React.useEffect(() => {
|
|
4811
|
+
if (!isInBuilder)
|
|
4812
|
+
return;
|
|
4813
|
+
let animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
|
|
4814
|
+
return () => {
|
|
4815
|
+
cancelAnimationFrame(animationFrameHandle);
|
|
4816
|
+
};
|
|
4817
|
+
function handleAnimationFrameRequest() {
|
|
4818
|
+
if (propController == null)
|
|
4819
|
+
return;
|
|
4820
|
+
if (container != null)
|
|
4821
|
+
propController.tableFormLayoutChange({ layout: boxModels.getBox(container) });
|
|
4822
|
+
items.map((item, index) => {
|
|
4823
|
+
if (item == null)
|
|
4824
|
+
return;
|
|
4825
|
+
propController.tableFormFieldLayoutChange({ index, layout: boxModels.getBox(item) });
|
|
4826
|
+
});
|
|
4827
|
+
animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
|
|
4828
|
+
}
|
|
4829
|
+
}, [propController, container, items, isInBuilder]);
|
|
4830
|
+
const itemRefs = React.useMemo(() => Array.from({ length: fieldsCount + 1 }).map((_, index) => (item) => {
|
|
4831
|
+
setItems((is) => [...is.slice(0, index), item, ...is.slice(index + 1)]);
|
|
4832
|
+
}), [fieldsCount, setItems]);
|
|
4833
|
+
return { container: setContainer, items: itemRefs };
|
|
4834
|
+
}
|
|
4835
|
+
const LOCAL_STORAGE_NAMESPACE = "@@makeswift/components/form";
|
|
4836
|
+
function getSizeFontSize(size) {
|
|
4837
|
+
switch (size) {
|
|
4838
|
+
case Sizes.SMALL:
|
|
4839
|
+
return 12;
|
|
4840
|
+
case Sizes.MEDIUM:
|
|
4841
|
+
return 14;
|
|
4842
|
+
case Sizes.LARGE:
|
|
4843
|
+
return 18;
|
|
4844
|
+
default:
|
|
4845
|
+
throw new Error(`Invalid form size "${size}"`);
|
|
4846
|
+
}
|
|
4847
|
+
}
|
|
4848
|
+
const Alignments = {
|
|
4849
|
+
LEFT: "left",
|
|
4850
|
+
CENTER: "center",
|
|
4851
|
+
RIGHT: "right"
|
|
4852
|
+
};
|
|
4853
|
+
const GridForm = styled__default["default"].form`
|
|
4854
|
+
display: flex;
|
|
4855
|
+
flex-wrap: wrap;
|
|
4856
|
+
width: 100%;
|
|
4857
|
+
${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => styled.css`
|
|
4858
|
+
font-size: ${getSizeFontSize(size)}px;
|
|
4859
|
+
`)}
|
|
4860
|
+
${cssWidth()}
|
|
4861
|
+
${cssMargin()}
|
|
4862
|
+
`;
|
|
4863
|
+
const GridItem$1 = styled__default["default"].div`
|
|
4864
|
+
align-self: flex-end;
|
|
4865
|
+
flex-direction: column;
|
|
4866
|
+
${cssGridItem()}
|
|
4867
|
+
`;
|
|
4868
|
+
function getAlignmentMargin(alignment) {
|
|
4869
|
+
switch (alignment) {
|
|
4870
|
+
case Alignments.LEFT:
|
|
4871
|
+
return "0 auto 0 0";
|
|
4872
|
+
case Alignments.RIGHT:
|
|
4873
|
+
return "0 0 0 auto";
|
|
4874
|
+
default:
|
|
4875
|
+
return "0 auto";
|
|
4876
|
+
}
|
|
4877
|
+
}
|
|
4878
|
+
const StyledButton = styled__default["default"]((props) => /* @__PURE__ */ jsxRuntime.jsx(Button$1, __spreadProps(__spreadValues({}, props), {
|
|
4879
|
+
as: "button"
|
|
4880
|
+
})))`
|
|
4881
|
+
display: flex;
|
|
4882
|
+
align-items: center;
|
|
4883
|
+
justify-content: center;
|
|
4884
|
+
${(props) => cssMediaRules([props.size, props.alignment], ([size = Sizes.MEDIUM, alignment = Alignments.CENTER]) => styled.css`
|
|
4885
|
+
min-height: ${getSizeHeight$1(size)}px;
|
|
4886
|
+
max-height: ${getSizeHeight$1(size)}px;
|
|
4887
|
+
margin: ${getAlignmentMargin(alignment)};
|
|
4888
|
+
padding-top: 0;
|
|
4889
|
+
padding-bottom: 0;
|
|
4890
|
+
`)}
|
|
4891
|
+
`;
|
|
4892
|
+
const ErrorContainer = styled__default["default"].div`
|
|
4893
|
+
padding: 8px 16px;
|
|
4894
|
+
background-color: #f19eb9;
|
|
4895
|
+
border-radius: 4px;
|
|
4896
|
+
margin-top: 16px;
|
|
4897
|
+
`;
|
|
4898
|
+
const IconContainer = styled__default["default"].div`
|
|
4899
|
+
fill: currentColor;
|
|
4900
|
+
`;
|
|
4901
|
+
const ErrorMessage = styled__default["default"].p`
|
|
4902
|
+
font-size: 12px;
|
|
4903
|
+
margin: 8px 0;
|
|
4904
|
+
color: rgba(127, 0, 0, 0.95);
|
|
4905
|
+
`;
|
|
4906
|
+
function getTableColumnDefaultValue(tableColumn) {
|
|
4907
|
+
switch (tableColumn.__typename) {
|
|
4908
|
+
case "CheckboxTableColumn":
|
|
4909
|
+
return false;
|
|
4910
|
+
case "MultipleSelectTableColumn":
|
|
4911
|
+
return [];
|
|
4912
|
+
case "SingleLineTextTableColumn":
|
|
4913
|
+
case "LongTextTableColumn":
|
|
4914
|
+
case "SingleSelectTableColumn":
|
|
4915
|
+
case "PhoneNumberTableColumn":
|
|
4916
|
+
case "EmailTableColumn":
|
|
4917
|
+
case "URLTableColumn":
|
|
4918
|
+
case "NumberTableColumn":
|
|
4919
|
+
default:
|
|
4920
|
+
return "";
|
|
4921
|
+
}
|
|
4922
|
+
}
|
|
4923
|
+
const CREATE_TABLE_RECORD = client.gql`
|
|
4924
|
+
mutation CreateTableRecord($input: CreateTableRecordInput!) {
|
|
4925
|
+
createTableRecord(input: $input) {
|
|
4926
|
+
tableRecord {
|
|
4927
|
+
id
|
|
4928
|
+
}
|
|
4929
|
+
}
|
|
4930
|
+
}
|
|
4931
|
+
`;
|
|
4932
|
+
const Form = React.forwardRef(function Form2({
|
|
4933
|
+
id,
|
|
4934
|
+
tableId,
|
|
4935
|
+
fields: fieldsProp,
|
|
4936
|
+
submitLabel = "Submit",
|
|
4937
|
+
submitLink,
|
|
4938
|
+
shape,
|
|
4939
|
+
size,
|
|
4940
|
+
contrast,
|
|
4941
|
+
brandColor,
|
|
4942
|
+
gap,
|
|
4943
|
+
width,
|
|
4944
|
+
margin,
|
|
4945
|
+
submitTextStyle,
|
|
4946
|
+
submitVariant,
|
|
4947
|
+
submitTextColor,
|
|
4948
|
+
submitWidth,
|
|
4949
|
+
submitAlignment,
|
|
4950
|
+
labelTextStyle,
|
|
4951
|
+
labelTextColor
|
|
4952
|
+
}, ref) {
|
|
4953
|
+
const fields = React.useMemo(() => {
|
|
4954
|
+
var _a;
|
|
4955
|
+
return (_a = fieldsProp == null ? void 0 : fieldsProp.fields) != null ? _a : [];
|
|
4956
|
+
}, [fieldsProp]);
|
|
4957
|
+
const grid = React.useMemo(() => {
|
|
4958
|
+
var _a;
|
|
4959
|
+
return (_a = fieldsProp == null ? void 0 : fieldsProp.grid) != null ? _a : [];
|
|
4960
|
+
}, [fieldsProp]);
|
|
4961
|
+
const {
|
|
4962
|
+
data: {
|
|
4963
|
+
table
|
|
4964
|
+
} = {}
|
|
4965
|
+
} = useTable(tableId);
|
|
4966
|
+
const [createTableRecord] = useMutation(CREATE_TABLE_RECORD);
|
|
4967
|
+
const [refEl, setRefEl] = React.useState(null);
|
|
4968
|
+
const [propControllers, setPropControllers] = React.useState(null);
|
|
4969
|
+
const [initialValues, setInitialValues] = React.useState(() => fields.reduce((acc, formField) => {
|
|
4970
|
+
const tableColumn = table && table.columns.find((field) => field.id === formField.tableColumnId);
|
|
4971
|
+
const defaultValue = formField ? formField.defaultValue : null;
|
|
4972
|
+
if (tableColumn) {
|
|
4973
|
+
acc[tableColumn.name] = defaultValue == null ? getTableColumnDefaultValue(tableColumn) : defaultValue;
|
|
4974
|
+
}
|
|
4975
|
+
return acc;
|
|
4976
|
+
}, {}));
|
|
4977
|
+
const controller = propControllers == null ? void 0 : propControllers.fields;
|
|
4978
|
+
const {
|
|
4979
|
+
container,
|
|
4980
|
+
items
|
|
4981
|
+
} = useTableFormFieldRefs(controller, {
|
|
4982
|
+
fieldsCount: fields.length
|
|
4983
|
+
});
|
|
4984
|
+
const [isDone, setIsDone] = React.useState(false);
|
|
4985
|
+
const linkRef = React.useRef(null);
|
|
4986
|
+
React.useImperativeHandle(ref, () => ({
|
|
4987
|
+
getBoxModel() {
|
|
4988
|
+
return refEl instanceof Element ? boxModels.getBox(refEl) : null;
|
|
4989
|
+
},
|
|
4990
|
+
setPropControllers
|
|
4991
|
+
}), [refEl, setPropControllers]);
|
|
4992
|
+
React.useEffect(() => {
|
|
4993
|
+
container(refEl);
|
|
4994
|
+
}, [container, refEl]);
|
|
4995
|
+
React.useEffect(() => {
|
|
4996
|
+
if (!isDone)
|
|
4997
|
+
return;
|
|
4998
|
+
let timeoutId = setTimeout(() => setIsDone(false), 2500);
|
|
4999
|
+
return () => clearTimeout(timeoutId);
|
|
5000
|
+
}, [isDone]);
|
|
5001
|
+
function getTableColumn({
|
|
5002
|
+
tableColumnId
|
|
5003
|
+
}) {
|
|
5004
|
+
return table && table.columns.find((field) => tableColumnId === field.id);
|
|
5005
|
+
}
|
|
5006
|
+
async function handleSubmit(values, {
|
|
5007
|
+
setSubmitting,
|
|
5008
|
+
resetForm,
|
|
5009
|
+
setStatus
|
|
5010
|
+
}) {
|
|
5011
|
+
if (table) {
|
|
5012
|
+
const columns = [];
|
|
5013
|
+
fields.forEach((field) => {
|
|
5014
|
+
const tableColumn = getTableColumn(field);
|
|
5015
|
+
if (tableColumn) {
|
|
5016
|
+
const data = values[tableColumn.name];
|
|
5017
|
+
if (data) {
|
|
5018
|
+
columns.push({
|
|
5019
|
+
columnId: field.tableColumnId,
|
|
5020
|
+
data
|
|
5021
|
+
});
|
|
5022
|
+
if (field.autofill) {
|
|
5023
|
+
localStorage.setItem(`${LOCAL_STORAGE_NAMESPACE}/${tableColumn.name}`, JSON.stringify(data));
|
|
5024
|
+
}
|
|
5025
|
+
}
|
|
5026
|
+
}
|
|
5027
|
+
});
|
|
5028
|
+
try {
|
|
5029
|
+
await createTableRecord({
|
|
5030
|
+
variables: {
|
|
5031
|
+
input: {
|
|
5032
|
+
data: {
|
|
5033
|
+
tableId: table.id,
|
|
5034
|
+
columns
|
|
5035
|
+
}
|
|
5036
|
+
}
|
|
5037
|
+
}
|
|
5038
|
+
});
|
|
5039
|
+
setIsDone(true);
|
|
5040
|
+
setInitialValues((prev) => fields.reduce((acc, field) => {
|
|
5041
|
+
const tableColumn = getTableColumn(field);
|
|
5042
|
+
if (tableColumn) {
|
|
5043
|
+
const data = values[tableColumn.name];
|
|
5044
|
+
if (data && field.autofill)
|
|
5045
|
+
return __spreadProps(__spreadValues({}, acc), {
|
|
5046
|
+
[tableColumn.name]: data
|
|
5047
|
+
});
|
|
5048
|
+
}
|
|
5049
|
+
return acc;
|
|
5050
|
+
}, __spreadValues({}, prev)));
|
|
5051
|
+
resetForm();
|
|
5052
|
+
if (linkRef.current != null)
|
|
5053
|
+
linkRef.current.click();
|
|
5054
|
+
} catch (error) {
|
|
5055
|
+
setStatus({
|
|
5056
|
+
error: "An unexpected error has occurred, please try again later"
|
|
5057
|
+
});
|
|
5058
|
+
} finally {
|
|
5059
|
+
setSubmitting(false);
|
|
5060
|
+
}
|
|
5061
|
+
}
|
|
5062
|
+
}
|
|
5063
|
+
React.useEffect(() => {
|
|
5064
|
+
setInitialValues((prev) => fields.reduce((acc, formField) => {
|
|
5065
|
+
const tableColumn = table && table.columns.find((field) => field.id === formField.tableColumnId);
|
|
5066
|
+
if (tableColumn && formField.autofill) {
|
|
5067
|
+
const storedValue = localStorage.getItem(`${LOCAL_STORAGE_NAMESPACE}/${tableColumn.name}`);
|
|
5068
|
+
if (storedValue) {
|
|
5069
|
+
try {
|
|
5070
|
+
acc[tableColumn.name] = JSON.parse(storedValue);
|
|
5071
|
+
} catch (e) {
|
|
5072
|
+
}
|
|
5073
|
+
}
|
|
5074
|
+
}
|
|
5075
|
+
return acc;
|
|
5076
|
+
}, __spreadValues({}, prev)));
|
|
5077
|
+
}, [fields, table]);
|
|
5078
|
+
const brandColorData = useColor(brandColor);
|
|
5079
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Provider, {
|
|
5080
|
+
value: {
|
|
5081
|
+
shape,
|
|
5082
|
+
size,
|
|
5083
|
+
contrast,
|
|
5084
|
+
brandColor: brandColorData,
|
|
5085
|
+
labelTextStyle,
|
|
5086
|
+
labelTextColor
|
|
5087
|
+
},
|
|
5088
|
+
children: tableId == null ? /* @__PURE__ */ jsxRuntime.jsx(Placeholder$1, {
|
|
5089
|
+
ref: setRefEl,
|
|
5090
|
+
width,
|
|
5091
|
+
margin
|
|
5092
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
5093
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(formik.Formik, {
|
|
5094
|
+
onSubmit: handleSubmit,
|
|
5095
|
+
initialValues,
|
|
5096
|
+
initialStatus: {
|
|
5097
|
+
error: null
|
|
5098
|
+
},
|
|
5099
|
+
enableReinitialize: true,
|
|
5100
|
+
children: (formik$1) => {
|
|
5101
|
+
const error = formik$1.status && formik$1.status.error;
|
|
5102
|
+
const errors = fields.map((field) => {
|
|
5103
|
+
const tableColumn = getTableColumn(field);
|
|
5104
|
+
return tableColumn && formik.getIn(formik$1.touched, tableColumn.name) && formik.getIn(formik$1.errors, tableColumn.name);
|
|
5105
|
+
}).filter((message) => typeof message === "string");
|
|
5106
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5107
|
+
children: [/* @__PURE__ */ jsxRuntime.jsxs(GridForm, {
|
|
5108
|
+
ref: setRefEl,
|
|
5109
|
+
id,
|
|
5110
|
+
width,
|
|
5111
|
+
margin,
|
|
5112
|
+
size,
|
|
5113
|
+
onSubmit: formik$1.handleSubmit,
|
|
5114
|
+
onReset: formik$1.handleReset,
|
|
5115
|
+
noValidate: true,
|
|
5116
|
+
children: [fields.map((field, index) => {
|
|
5117
|
+
const tableColumn = getTableColumn(field);
|
|
5118
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GridItem$1, {
|
|
5119
|
+
ref: items[index],
|
|
5120
|
+
grid,
|
|
5121
|
+
index,
|
|
5122
|
+
rowGap: gap,
|
|
5123
|
+
columnGap: gap,
|
|
5124
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Field, {
|
|
5125
|
+
tableColumn,
|
|
5126
|
+
tableFormField: field
|
|
5127
|
+
})
|
|
5128
|
+
}, field.id);
|
|
5129
|
+
}), /* @__PURE__ */ jsxRuntime.jsxs(GridItem$1, {
|
|
5130
|
+
ref: items[fields.length],
|
|
5131
|
+
grid,
|
|
5132
|
+
index: fields.length,
|
|
5133
|
+
rowGap: gap,
|
|
5134
|
+
columnGap: gap,
|
|
5135
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(StyledButton, {
|
|
5136
|
+
type: "submit",
|
|
5137
|
+
disabled: formik$1.isSubmitting || isDone,
|
|
5138
|
+
shape,
|
|
5139
|
+
size,
|
|
5140
|
+
color: brandColor,
|
|
5141
|
+
variant: submitVariant,
|
|
5142
|
+
textColor: submitTextColor,
|
|
5143
|
+
width: submitWidth,
|
|
5144
|
+
alignment: submitAlignment,
|
|
5145
|
+
textStyle: submitTextStyle,
|
|
5146
|
+
children: formik$1.isSubmitting ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) : isDone ? /* @__PURE__ */ jsxRuntime.jsx(IconContainer, {
|
|
5147
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(SvgCheck12, {})
|
|
5148
|
+
}) : submitLabel
|
|
5149
|
+
}), (errors.length > 0 || error) && /* @__PURE__ */ jsxRuntime.jsxs(ErrorContainer, {
|
|
5150
|
+
children: [errors.map((message) => /* @__PURE__ */ jsxRuntime.jsx(ErrorMessage, {
|
|
5151
|
+
children: message
|
|
5152
|
+
}, message)), error != null && /* @__PURE__ */ jsxRuntime.jsx(ErrorMessage, {
|
|
5153
|
+
children: error
|
|
5154
|
+
})]
|
|
5155
|
+
})]
|
|
5156
|
+
})]
|
|
5157
|
+
}), submitLink != null && /* @__PURE__ */ jsxRuntime.jsx(Link, {
|
|
5158
|
+
ref: linkRef,
|
|
5159
|
+
hidden: true,
|
|
5160
|
+
link: submitLink
|
|
5161
|
+
})]
|
|
5162
|
+
});
|
|
5163
|
+
}
|
|
5164
|
+
})
|
|
5165
|
+
})
|
|
5166
|
+
});
|
|
5167
|
+
});
|
|
5168
|
+
function registerComponent$5(runtime) {
|
|
5169
|
+
return runtime.registerComponent(Form, {
|
|
5170
|
+
type: "./components/Form/index.js",
|
|
5171
|
+
label: "Form",
|
|
5172
|
+
icon: "Form40",
|
|
5173
|
+
props: {
|
|
5174
|
+
id: descriptors.ElementID(),
|
|
5175
|
+
tableId: descriptors.Table(),
|
|
5176
|
+
fields: descriptors.TableFormFields(),
|
|
5177
|
+
submitLink: descriptors.Link({
|
|
5178
|
+
label: "Redirect to",
|
|
5179
|
+
options: [{
|
|
5180
|
+
value: "OPEN_PAGE",
|
|
5181
|
+
label: "Open page"
|
|
5182
|
+
}, {
|
|
5183
|
+
value: "OPEN_URL",
|
|
5184
|
+
label: "Open URL"
|
|
5185
|
+
}]
|
|
5186
|
+
}),
|
|
5187
|
+
gap: descriptors.GapY({
|
|
5188
|
+
preset: [{
|
|
5189
|
+
deviceId: "desktop",
|
|
5190
|
+
value: {
|
|
5191
|
+
value: 10,
|
|
5192
|
+
unit: "px"
|
|
5193
|
+
}
|
|
5194
|
+
}],
|
|
5195
|
+
label: "Gap",
|
|
5196
|
+
defaultValue: {
|
|
5197
|
+
value: 0,
|
|
5198
|
+
unit: "px"
|
|
5199
|
+
}
|
|
5200
|
+
}),
|
|
5201
|
+
shape: descriptors.ResponsiveIconRadioGroup({
|
|
5202
|
+
label: "Shape",
|
|
5203
|
+
options: [{
|
|
5204
|
+
label: "Pill",
|
|
5205
|
+
value: Shapes.PILL,
|
|
5206
|
+
icon: "ButtonPill16"
|
|
5207
|
+
}, {
|
|
5208
|
+
label: "Rounded",
|
|
5209
|
+
value: Shapes.ROUNDED,
|
|
5210
|
+
icon: "ButtonRounded16"
|
|
5211
|
+
}, {
|
|
5212
|
+
label: "Square",
|
|
5213
|
+
value: Shapes.SQUARE,
|
|
5214
|
+
icon: "ButtonSquare16"
|
|
5215
|
+
}],
|
|
5216
|
+
defaultValue: Shapes.ROUNDED
|
|
5217
|
+
}),
|
|
5218
|
+
size: descriptors.ResponsiveIconRadioGroup({
|
|
5219
|
+
label: "Size",
|
|
5220
|
+
options: [{
|
|
5221
|
+
label: "Small",
|
|
5222
|
+
value: Sizes.SMALL,
|
|
5223
|
+
icon: "SizeSmall16"
|
|
5224
|
+
}, {
|
|
5225
|
+
label: "Medium",
|
|
5226
|
+
value: Sizes.MEDIUM,
|
|
5227
|
+
icon: "SizeMedium16"
|
|
5228
|
+
}, {
|
|
5229
|
+
label: "Large",
|
|
5230
|
+
value: Sizes.LARGE,
|
|
5231
|
+
icon: "SizeLarge16"
|
|
5232
|
+
}],
|
|
5233
|
+
defaultValue: Sizes.MEDIUM
|
|
5234
|
+
}),
|
|
5235
|
+
contrast: descriptors.ResponsiveIconRadioGroup({
|
|
5236
|
+
label: "Color",
|
|
5237
|
+
options: [{
|
|
5238
|
+
label: "Light mode",
|
|
5239
|
+
value: Contrasts.LIGHT,
|
|
5240
|
+
icon: "Sun16"
|
|
5241
|
+
}, {
|
|
5242
|
+
label: "Dark mode",
|
|
5243
|
+
value: Contrasts.DARK,
|
|
5244
|
+
icon: "Moon16"
|
|
5245
|
+
}],
|
|
5246
|
+
defaultValue: Contrasts.LIGHT
|
|
5247
|
+
}),
|
|
5248
|
+
labelTextStyle: descriptors.TextStyle({
|
|
5249
|
+
label: "Label text style"
|
|
5250
|
+
}),
|
|
5251
|
+
labelTextColor: descriptors.ResponsiveColor({
|
|
5252
|
+
label: "Label text color"
|
|
5253
|
+
}),
|
|
5254
|
+
submitTextStyle: descriptors.TextStyle({
|
|
5255
|
+
label: "Button text style"
|
|
5256
|
+
}),
|
|
5257
|
+
brandColor: descriptors.ResponsiveColor({
|
|
5258
|
+
label: "Button color",
|
|
5259
|
+
placeholder: "black"
|
|
5260
|
+
}),
|
|
5261
|
+
submitTextColor: descriptors.ResponsiveColor({
|
|
5262
|
+
label: "Button text color",
|
|
5263
|
+
placeholder: "white"
|
|
5264
|
+
}),
|
|
5265
|
+
submitLabel: descriptors.TextInput({
|
|
5266
|
+
label: "Button label",
|
|
5267
|
+
placeholder: "Submit"
|
|
5268
|
+
}),
|
|
5269
|
+
submitVariant: descriptors.ResponsiveSelect({
|
|
5270
|
+
label: "Button style",
|
|
5271
|
+
options: [{
|
|
5272
|
+
value: "flat",
|
|
5273
|
+
label: "Flat"
|
|
5274
|
+
}, {
|
|
5275
|
+
value: "outline",
|
|
5276
|
+
label: "Outline"
|
|
5277
|
+
}, {
|
|
5278
|
+
value: "shadow",
|
|
5279
|
+
label: "Floating"
|
|
5280
|
+
}, {
|
|
5281
|
+
value: "clear",
|
|
5282
|
+
label: "Clear"
|
|
5283
|
+
}, {
|
|
5284
|
+
value: "blocky",
|
|
5285
|
+
label: "Blocky"
|
|
5286
|
+
}, {
|
|
5287
|
+
value: "bubbly",
|
|
5288
|
+
label: "Bubbly"
|
|
5289
|
+
}, {
|
|
5290
|
+
value: "skewed",
|
|
5291
|
+
label: "Skewed"
|
|
5292
|
+
}],
|
|
5293
|
+
defaultValue: "flat"
|
|
5294
|
+
}),
|
|
5295
|
+
submitWidth: descriptors.ResponsiveLength({
|
|
5296
|
+
label: "Button width"
|
|
5297
|
+
}),
|
|
5298
|
+
submitAlignment: descriptors.ResponsiveIconRadioGroup({
|
|
5299
|
+
label: "Button alignment",
|
|
5300
|
+
options: [{
|
|
5301
|
+
label: "Left",
|
|
5302
|
+
value: Alignments.LEFT,
|
|
5303
|
+
icon: "AlignLeft16"
|
|
5304
|
+
}, {
|
|
5305
|
+
label: "Center",
|
|
5306
|
+
value: Alignments.CENTER,
|
|
5307
|
+
icon: "AlignCenter16"
|
|
5308
|
+
}, {
|
|
5309
|
+
label: "Right",
|
|
5310
|
+
value: Alignments.RIGHT,
|
|
5311
|
+
icon: "AlignRight16"
|
|
5312
|
+
}],
|
|
5313
|
+
defaultValue: Alignments.CENTER
|
|
5314
|
+
}),
|
|
5315
|
+
width: descriptors.Width({
|
|
5316
|
+
preset: [{
|
|
5317
|
+
deviceId: "desktop",
|
|
5318
|
+
value: {
|
|
5319
|
+
value: 550,
|
|
5320
|
+
unit: "px"
|
|
5321
|
+
}
|
|
5322
|
+
}],
|
|
5323
|
+
defaultValue: {
|
|
5324
|
+
value: 100,
|
|
5325
|
+
unit: "%"
|
|
5326
|
+
}
|
|
5327
|
+
}),
|
|
5328
|
+
margin: descriptors.Margin()
|
|
5329
|
+
}
|
|
5330
|
+
});
|
|
5331
|
+
}
|
|
5332
|
+
var _path$s;
|
|
5333
|
+
function _extends$s() {
|
|
5334
|
+
_extends$s = Object.assign || function(target) {
|
|
5335
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
5336
|
+
var source = arguments[i];
|
|
5337
|
+
for (var key in source) {
|
|
5338
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3678
5339
|
target[key] = source[key];
|
|
3679
5340
|
}
|
|
3680
5341
|
}
|
|
3681
5342
|
}
|
|
3682
5343
|
return target;
|
|
3683
5344
|
};
|
|
3684
|
-
return _extends$
|
|
5345
|
+
return _extends$s.apply(this, arguments);
|
|
5346
|
+
}
|
|
5347
|
+
var SvgMobileMenu28 = function SvgMobileMenu282(props) {
|
|
5348
|
+
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$s({
|
|
5349
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5350
|
+
width: 28,
|
|
5351
|
+
height: 28
|
|
5352
|
+
}, props), _path$s || (_path$s = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
5353
|
+
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"
|
|
5354
|
+
})));
|
|
5355
|
+
};
|
|
5356
|
+
const GutterContainer = styled__default["default"].div`
|
|
5357
|
+
${(p) => cssMediaRules([p.gutter], ([gutter = {
|
|
5358
|
+
value: 0,
|
|
5359
|
+
unit: "px"
|
|
5360
|
+
}]) => styled.css`
|
|
5361
|
+
padding-left: ${p.first ? "0px" : `${gutter.value / 2}${gutter.unit}`};
|
|
5362
|
+
padding-right: ${p.last ? "0px" : `${gutter.value / 2}${gutter.unit}`};
|
|
5363
|
+
`)}
|
|
5364
|
+
`;
|
|
5365
|
+
const PlaceholderLink$1 = styled__default["default"].div`
|
|
5366
|
+
width: ${(props) => props.width}px;
|
|
5367
|
+
height: ${(props) => props.button === true ? 32 : 8}px;
|
|
5368
|
+
background-color: #a1a8c2;
|
|
5369
|
+
border-radius: ${(props) => props.button === true ? 6 : 2}px;
|
|
5370
|
+
opacity: 0.4;
|
|
5371
|
+
`;
|
|
5372
|
+
const links$1 = [{
|
|
5373
|
+
width: 50
|
|
5374
|
+
}, {
|
|
5375
|
+
width: 70
|
|
5376
|
+
}, {
|
|
5377
|
+
width: 60
|
|
5378
|
+
}, {
|
|
5379
|
+
width: 80,
|
|
5380
|
+
button: true
|
|
5381
|
+
}];
|
|
5382
|
+
function LinksPlaceholder({
|
|
5383
|
+
gutter
|
|
5384
|
+
}) {
|
|
5385
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
5386
|
+
children: links$1.map((link, i) => /* @__PURE__ */ jsxRuntime.jsx(GutterContainer, {
|
|
5387
|
+
gutter,
|
|
5388
|
+
first: i === 0,
|
|
5389
|
+
last: i === links$1.length - 1,
|
|
5390
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(PlaceholderLink$1, __spreadValues({}, link))
|
|
5391
|
+
}, i))
|
|
5392
|
+
});
|
|
5393
|
+
}
|
|
5394
|
+
var _path$r;
|
|
5395
|
+
function _extends$r() {
|
|
5396
|
+
_extends$r = Object.assign || function(target) {
|
|
5397
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
5398
|
+
var source = arguments[i];
|
|
5399
|
+
for (var key in source) {
|
|
5400
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5401
|
+
target[key] = source[key];
|
|
5402
|
+
}
|
|
5403
|
+
}
|
|
5404
|
+
}
|
|
5405
|
+
return target;
|
|
5406
|
+
};
|
|
5407
|
+
return _extends$r.apply(this, arguments);
|
|
3685
5408
|
}
|
|
3686
5409
|
var SvgCaretDown8 = function SvgCaretDown82(props) {
|
|
3687
|
-
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$
|
|
5410
|
+
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$r({
|
|
3688
5411
|
width: 8,
|
|
3689
5412
|
height: 8,
|
|
3690
5413
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3691
|
-
}, props), _path$
|
|
5414
|
+
}, props), _path$r || (_path$r = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
3692
5415
|
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"
|
|
3693
5416
|
})));
|
|
3694
5417
|
};
|
|
3695
|
-
var _path$
|
|
3696
|
-
function _extends$
|
|
3697
|
-
_extends$
|
|
5418
|
+
var _path$q;
|
|
5419
|
+
function _extends$q() {
|
|
5420
|
+
_extends$q = Object.assign || function(target) {
|
|
3698
5421
|
for (var i = 1; i < arguments.length; i++) {
|
|
3699
5422
|
var source = arguments[i];
|
|
3700
5423
|
for (var key in source) {
|
|
@@ -3705,20 +5428,20 @@ function _extends$p() {
|
|
|
3705
5428
|
}
|
|
3706
5429
|
return target;
|
|
3707
5430
|
};
|
|
3708
|
-
return _extends$
|
|
5431
|
+
return _extends$q.apply(this, arguments);
|
|
3709
5432
|
}
|
|
3710
5433
|
var SvgPlus8 = function SvgPlus82(props) {
|
|
3711
|
-
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$
|
|
5434
|
+
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$q({
|
|
3712
5435
|
width: 8,
|
|
3713
5436
|
height: 8,
|
|
3714
5437
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3715
|
-
}, props), _path$
|
|
5438
|
+
}, props), _path$q || (_path$q = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
3716
5439
|
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"
|
|
3717
5440
|
})));
|
|
3718
5441
|
};
|
|
3719
|
-
var _path$
|
|
3720
|
-
function _extends$
|
|
3721
|
-
_extends$
|
|
5442
|
+
var _path$p;
|
|
5443
|
+
function _extends$p() {
|
|
5444
|
+
_extends$p = Object.assign || function(target) {
|
|
3722
5445
|
for (var i = 1; i < arguments.length; i++) {
|
|
3723
5446
|
var source = arguments[i];
|
|
3724
5447
|
for (var key in source) {
|
|
@@ -3729,20 +5452,20 @@ function _extends$o() {
|
|
|
3729
5452
|
}
|
|
3730
5453
|
return target;
|
|
3731
5454
|
};
|
|
3732
|
-
return _extends$
|
|
5455
|
+
return _extends$p.apply(this, arguments);
|
|
3733
5456
|
}
|
|
3734
5457
|
var SvgArrowDown8 = function SvgArrowDown82(props) {
|
|
3735
|
-
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$
|
|
5458
|
+
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$p({
|
|
3736
5459
|
width: 8,
|
|
3737
5460
|
height: 8,
|
|
3738
5461
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3739
|
-
}, props), _path$
|
|
5462
|
+
}, props), _path$p || (_path$p = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
3740
5463
|
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"
|
|
3741
5464
|
})));
|
|
3742
5465
|
};
|
|
3743
|
-
var _path$
|
|
3744
|
-
function _extends$
|
|
3745
|
-
_extends$
|
|
5466
|
+
var _path$o;
|
|
5467
|
+
function _extends$o() {
|
|
5468
|
+
_extends$o = Object.assign || function(target) {
|
|
3746
5469
|
for (var i = 1; i < arguments.length; i++) {
|
|
3747
5470
|
var source = arguments[i];
|
|
3748
5471
|
for (var key in source) {
|
|
@@ -3753,14 +5476,14 @@ function _extends$n() {
|
|
|
3753
5476
|
}
|
|
3754
5477
|
return target;
|
|
3755
5478
|
};
|
|
3756
|
-
return _extends$
|
|
5479
|
+
return _extends$o.apply(this, arguments);
|
|
3757
5480
|
}
|
|
3758
5481
|
var SvgChevronDown8 = function SvgChevronDown82(props) {
|
|
3759
|
-
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$
|
|
5482
|
+
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$o({
|
|
3760
5483
|
width: 8,
|
|
3761
5484
|
height: 8,
|
|
3762
5485
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3763
|
-
}, props), _path$
|
|
5486
|
+
}, props), _path$o || (_path$o = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
3764
5487
|
fillRule: "evenodd",
|
|
3765
5488
|
clipRule: "evenodd",
|
|
3766
5489
|
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"
|
|
@@ -3835,22 +5558,22 @@ const StyledDropDownItem = styled__default["default"](Link)`
|
|
|
3835
5558
|
background-color: rgba(0, 0, 0, 0.04);
|
|
3836
5559
|
}
|
|
3837
5560
|
`;
|
|
3838
|
-
function DropDownItem$1(
|
|
3839
|
-
var
|
|
5561
|
+
function DropDownItem$1(_S) {
|
|
5562
|
+
var _T = _S, {
|
|
3840
5563
|
color
|
|
3841
|
-
} =
|
|
5564
|
+
} = _T, restOfProps = __objRest(_T, [
|
|
3842
5565
|
"color"
|
|
3843
5566
|
]);
|
|
3844
5567
|
return /* @__PURE__ */ jsxRuntime.jsx(StyledDropDownItem, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3845
5568
|
color: useColor(color)
|
|
3846
5569
|
}));
|
|
3847
5570
|
}
|
|
3848
|
-
function DropDownButton(
|
|
3849
|
-
var
|
|
5571
|
+
function DropDownButton(_U) {
|
|
5572
|
+
var _V = _U, {
|
|
3850
5573
|
label,
|
|
3851
5574
|
caret = "caret",
|
|
3852
5575
|
links: links2 = []
|
|
3853
|
-
} =
|
|
5576
|
+
} = _V, restOfProps = __objRest(_V, [
|
|
3854
5577
|
"label",
|
|
3855
5578
|
"caret",
|
|
3856
5579
|
"links"
|
|
@@ -3866,7 +5589,7 @@ function DropDownButton(_q) {
|
|
|
3866
5589
|
}, [setPosition]);
|
|
3867
5590
|
return /* @__PURE__ */ jsxRuntime.jsxs(DropDownContainer, {
|
|
3868
5591
|
ref: container,
|
|
3869
|
-
children: [/* @__PURE__ */ jsxRuntime.jsx(Button, __spreadProps(__spreadValues({}, restOfProps), {
|
|
5592
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(Button$1, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3870
5593
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
3871
5594
|
style: {
|
|
3872
5595
|
display: "flex",
|
|
@@ -3896,9 +5619,9 @@ function DropDownButton(_q) {
|
|
|
3896
5619
|
})]
|
|
3897
5620
|
});
|
|
3898
5621
|
}
|
|
3899
|
-
var _path$
|
|
3900
|
-
function _extends$
|
|
3901
|
-
_extends$
|
|
5622
|
+
var _path$n;
|
|
5623
|
+
function _extends$n() {
|
|
5624
|
+
_extends$n = Object.assign || function(target) {
|
|
3902
5625
|
for (var i = 1; i < arguments.length; i++) {
|
|
3903
5626
|
var source = arguments[i];
|
|
3904
5627
|
for (var key in source) {
|
|
@@ -3909,14 +5632,14 @@ function _extends$m() {
|
|
|
3909
5632
|
}
|
|
3910
5633
|
return target;
|
|
3911
5634
|
};
|
|
3912
|
-
return _extends$
|
|
5635
|
+
return _extends$n.apply(this, arguments);
|
|
3913
5636
|
}
|
|
3914
5637
|
var SvgTimes16 = function SvgTimes162(props) {
|
|
3915
|
-
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$
|
|
5638
|
+
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$n({
|
|
3916
5639
|
width: 16,
|
|
3917
5640
|
height: 16,
|
|
3918
5641
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3919
|
-
}, props), _path$
|
|
5642
|
+
}, props), _path$n || (_path$n = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
3920
5643
|
fillRule: "evenodd",
|
|
3921
5644
|
clipRule: "evenodd",
|
|
3922
5645
|
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"
|
|
@@ -3927,7 +5650,7 @@ const DropDownMenu = styled__default["default"].div`
|
|
|
3927
5650
|
flex-direction: column;
|
|
3928
5651
|
padding: 8px;
|
|
3929
5652
|
`;
|
|
3930
|
-
const ButtonLink$1 = styled__default["default"](Button)`
|
|
5653
|
+
const ButtonLink$1 = styled__default["default"](Button$1)`
|
|
3931
5654
|
margin: 8px 0;
|
|
3932
5655
|
`;
|
|
3933
5656
|
const StyledLink$2 = styled__default["default"](Link)`
|
|
@@ -3940,24 +5663,24 @@ const StyledLink$2 = styled__default["default"](Link)`
|
|
|
3940
5663
|
color: ${color == null ? "black" : colorToString(color)};
|
|
3941
5664
|
`)}
|
|
3942
5665
|
`;
|
|
3943
|
-
function DropDownItem(
|
|
3944
|
-
var
|
|
5666
|
+
function DropDownItem(_W) {
|
|
5667
|
+
var _X = _W, {
|
|
3945
5668
|
color
|
|
3946
|
-
} =
|
|
5669
|
+
} = _X, restOfProps = __objRest(_X, [
|
|
3947
5670
|
"color"
|
|
3948
5671
|
]);
|
|
3949
5672
|
return /* @__PURE__ */ jsxRuntime.jsx(StyledLink$2, __spreadProps(__spreadValues({}, restOfProps), {
|
|
3950
5673
|
color: useColor(color)
|
|
3951
5674
|
}));
|
|
3952
5675
|
}
|
|
3953
|
-
function MobileDropDownButton(
|
|
3954
|
-
var
|
|
5676
|
+
function MobileDropDownButton(_Y) {
|
|
5677
|
+
var _Z = _Y, {
|
|
3955
5678
|
label,
|
|
3956
5679
|
caret,
|
|
3957
5680
|
links: links2 = [],
|
|
3958
5681
|
onClose = () => {
|
|
3959
5682
|
}
|
|
3960
|
-
} =
|
|
5683
|
+
} = _Z, restOfProps = __objRest(_Z, [
|
|
3961
5684
|
"label",
|
|
3962
5685
|
"caret",
|
|
3963
5686
|
"links",
|
|
@@ -3999,10 +5722,10 @@ function MobileDropDownButton(_u) {
|
|
|
3999
5722
|
})]
|
|
4000
5723
|
});
|
|
4001
5724
|
}
|
|
4002
|
-
const ButtonLink = styled__default["default"](Button)`
|
|
5725
|
+
const ButtonLink = styled__default["default"](Button$1)`
|
|
4003
5726
|
margin: 8px 0;
|
|
4004
5727
|
`;
|
|
4005
|
-
const Container$
|
|
5728
|
+
const Container$3 = styled__default["default"].div`
|
|
4006
5729
|
position: fixed;
|
|
4007
5730
|
flex-direction: column;
|
|
4008
5731
|
width: 100%;
|
|
@@ -4056,7 +5779,7 @@ function MobileMenu({
|
|
|
4056
5779
|
onClose = () => {
|
|
4057
5780
|
}
|
|
4058
5781
|
}) {
|
|
4059
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Container$
|
|
5782
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Container$3, {
|
|
4060
5783
|
animation,
|
|
4061
5784
|
backgroundColor: useColor(backgroundColor),
|
|
4062
5785
|
open,
|
|
@@ -4082,7 +5805,7 @@ function MobileMenu({
|
|
|
4082
5805
|
})]
|
|
4083
5806
|
});
|
|
4084
5807
|
}
|
|
4085
|
-
const Container$
|
|
5808
|
+
const Container$2 = styled__default["default"].nav`
|
|
4086
5809
|
display: flex;
|
|
4087
5810
|
align-items: center;
|
|
4088
5811
|
${cssWidth()}
|
|
@@ -4139,7 +5862,7 @@ const Navigation = React.forwardRef(function Navigation2({
|
|
|
4139
5862
|
margin
|
|
4140
5863
|
}, ref) {
|
|
4141
5864
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
4142
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Container$
|
|
5865
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Container$2, {
|
|
4143
5866
|
ref,
|
|
4144
5867
|
id,
|
|
4145
5868
|
margin,
|
|
@@ -4164,7 +5887,7 @@ const Navigation = React.forwardRef(function Navigation2({
|
|
|
4164
5887
|
gutter,
|
|
4165
5888
|
first: i === 0,
|
|
4166
5889
|
last: i === links2.length - 1,
|
|
4167
|
-
children: [link.type === "button" && /* @__PURE__ */ jsxRuntime.jsx(Button, __spreadProps(__spreadValues({}, link.payload), {
|
|
5890
|
+
children: [link.type === "button" && /* @__PURE__ */ jsxRuntime.jsx(Button$1, __spreadProps(__spreadValues({}, link.payload), {
|
|
4168
5891
|
children: link.payload.label
|
|
4169
5892
|
})), link.type === "dropdown" && /* @__PURE__ */ jsxRuntime.jsx(DropDownButton, __spreadValues({}, link.payload))]
|
|
4170
5893
|
}, link.id)) : /* @__PURE__ */ jsxRuntime.jsx(LinksPlaceholder, {
|
|
@@ -4187,7 +5910,7 @@ const Navigation = React.forwardRef(function Navigation2({
|
|
|
4187
5910
|
})]
|
|
4188
5911
|
});
|
|
4189
5912
|
});
|
|
4190
|
-
function registerComponent$
|
|
5913
|
+
function registerComponent$4(runtime) {
|
|
4191
5914
|
return runtime.registerComponent(Navigation, {
|
|
4192
5915
|
type: "./components/Navigation/index.js",
|
|
4193
5916
|
label: "Navigation",
|
|
@@ -4291,7 +6014,7 @@ const PlaceholderBase = styled__default["default"].div`
|
|
|
4291
6014
|
height: 80px;
|
|
4292
6015
|
padding: 8px;
|
|
4293
6016
|
`;
|
|
4294
|
-
var Placeholder = React.forwardRef(function
|
|
6017
|
+
var Placeholder = React.forwardRef(function Placeholder4(props, ref) {
|
|
4295
6018
|
return /* @__PURE__ */ jsxRuntime.jsx(PlaceholderBase, __spreadProps(__spreadValues({}, props), {
|
|
4296
6019
|
ref,
|
|
4297
6020
|
children: /* @__PURE__ */ jsxRuntime.jsx("svg", {
|
|
@@ -4364,7 +6087,7 @@ const Root = React.forwardRef(function Page2({
|
|
|
4364
6087
|
})]
|
|
4365
6088
|
});
|
|
4366
6089
|
});
|
|
4367
|
-
function registerComponent$
|
|
6090
|
+
function registerComponent$3(runtime) {
|
|
4368
6091
|
return runtime.registerComponent(Root, {
|
|
4369
6092
|
type: "./components/Root/index.js",
|
|
4370
6093
|
label: "Page",
|
|
@@ -4377,6 +6100,30 @@ function registerComponent$2(runtime) {
|
|
|
4377
6100
|
}
|
|
4378
6101
|
});
|
|
4379
6102
|
}
|
|
6103
|
+
var _path$m;
|
|
6104
|
+
function _extends$m() {
|
|
6105
|
+
_extends$m = Object.assign || function(target) {
|
|
6106
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
6107
|
+
var source = arguments[i];
|
|
6108
|
+
for (var key in source) {
|
|
6109
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
6110
|
+
target[key] = source[key];
|
|
6111
|
+
}
|
|
6112
|
+
}
|
|
6113
|
+
}
|
|
6114
|
+
return target;
|
|
6115
|
+
};
|
|
6116
|
+
return _extends$m.apply(this, arguments);
|
|
6117
|
+
}
|
|
6118
|
+
var SvgLogoAngellist20 = function SvgLogoAngellist202(props) {
|
|
6119
|
+
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$m({
|
|
6120
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6121
|
+
width: 20,
|
|
6122
|
+
height: 20
|
|
6123
|
+
}, props), _path$m || (_path$m = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
6124
|
+
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"
|
|
6125
|
+
})));
|
|
6126
|
+
};
|
|
4380
6127
|
var _path$l;
|
|
4381
6128
|
function _extends$l() {
|
|
4382
6129
|
_extends$l = Object.assign || function(target) {
|
|
@@ -4392,13 +6139,13 @@ function _extends$l() {
|
|
|
4392
6139
|
};
|
|
4393
6140
|
return _extends$l.apply(this, arguments);
|
|
4394
6141
|
}
|
|
4395
|
-
var
|
|
6142
|
+
var SvgLogoCodepen20 = function SvgLogoCodepen202(props) {
|
|
4396
6143
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$l({
|
|
4397
6144
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4398
6145
|
width: 20,
|
|
4399
6146
|
height: 20
|
|
4400
6147
|
}, props), _path$l || (_path$l = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4401
|
-
d: "
|
|
6148
|
+
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"
|
|
4402
6149
|
})));
|
|
4403
6150
|
};
|
|
4404
6151
|
var _path$k;
|
|
@@ -4416,13 +6163,13 @@ function _extends$k() {
|
|
|
4416
6163
|
};
|
|
4417
6164
|
return _extends$k.apply(this, arguments);
|
|
4418
6165
|
}
|
|
4419
|
-
var
|
|
6166
|
+
var SvgLogoDribbble20 = function SvgLogoDribbble202(props) {
|
|
4420
6167
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$k({
|
|
4421
6168
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4422
6169
|
width: 20,
|
|
4423
6170
|
height: 20
|
|
4424
6171
|
}, props), _path$k || (_path$k = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4425
|
-
d: "
|
|
6172
|
+
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"
|
|
4426
6173
|
})));
|
|
4427
6174
|
};
|
|
4428
6175
|
var _path$j;
|
|
@@ -4440,13 +6187,13 @@ function _extends$j() {
|
|
|
4440
6187
|
};
|
|
4441
6188
|
return _extends$j.apply(this, arguments);
|
|
4442
6189
|
}
|
|
4443
|
-
var
|
|
6190
|
+
var SvgLogoFacebook20 = function SvgLogoFacebook202(props) {
|
|
4444
6191
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$j({
|
|
4445
6192
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4446
6193
|
width: 20,
|
|
4447
6194
|
height: 20
|
|
4448
6195
|
}, props), _path$j || (_path$j = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4449
|
-
d: "
|
|
6196
|
+
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"
|
|
4450
6197
|
})));
|
|
4451
6198
|
};
|
|
4452
6199
|
var _path$i;
|
|
@@ -4464,13 +6211,13 @@ function _extends$i() {
|
|
|
4464
6211
|
};
|
|
4465
6212
|
return _extends$i.apply(this, arguments);
|
|
4466
6213
|
}
|
|
4467
|
-
var
|
|
6214
|
+
var SvgLogoGithub20 = function SvgLogoGithub202(props) {
|
|
4468
6215
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$i({
|
|
4469
6216
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4470
6217
|
width: 20,
|
|
4471
6218
|
height: 20
|
|
4472
6219
|
}, props), _path$i || (_path$i = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4473
|
-
d: "
|
|
6220
|
+
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"
|
|
4474
6221
|
})));
|
|
4475
6222
|
};
|
|
4476
6223
|
var _path$h;
|
|
@@ -4488,13 +6235,13 @@ function _extends$h() {
|
|
|
4488
6235
|
};
|
|
4489
6236
|
return _extends$h.apply(this, arguments);
|
|
4490
6237
|
}
|
|
4491
|
-
var
|
|
6238
|
+
var SvgLogoInstagram20 = function SvgLogoInstagram202(props) {
|
|
4492
6239
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$h({
|
|
4493
6240
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4494
6241
|
width: 20,
|
|
4495
6242
|
height: 20
|
|
4496
6243
|
}, props), _path$h || (_path$h = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4497
|
-
d: "
|
|
6244
|
+
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"
|
|
4498
6245
|
})));
|
|
4499
6246
|
};
|
|
4500
6247
|
var _path$g;
|
|
@@ -4512,13 +6259,13 @@ function _extends$g() {
|
|
|
4512
6259
|
};
|
|
4513
6260
|
return _extends$g.apply(this, arguments);
|
|
4514
6261
|
}
|
|
4515
|
-
var
|
|
6262
|
+
var SvgLogoLinkedin20 = function SvgLogoLinkedin202(props) {
|
|
4516
6263
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$g({
|
|
4517
6264
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4518
6265
|
width: 20,
|
|
4519
6266
|
height: 20
|
|
4520
6267
|
}, props), _path$g || (_path$g = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4521
|
-
d: "
|
|
6268
|
+
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"
|
|
4522
6269
|
})));
|
|
4523
6270
|
};
|
|
4524
6271
|
var _path$f;
|
|
@@ -4536,13 +6283,13 @@ function _extends$f() {
|
|
|
4536
6283
|
};
|
|
4537
6284
|
return _extends$f.apply(this, arguments);
|
|
4538
6285
|
}
|
|
4539
|
-
var
|
|
6286
|
+
var SvgLogoMedium20 = function SvgLogoMedium202(props) {
|
|
4540
6287
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$f({
|
|
4541
6288
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4542
6289
|
width: 20,
|
|
4543
6290
|
height: 20
|
|
4544
6291
|
}, props), _path$f || (_path$f = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4545
|
-
d: "
|
|
6292
|
+
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"
|
|
4546
6293
|
})));
|
|
4547
6294
|
};
|
|
4548
6295
|
var _path$e;
|
|
@@ -4560,13 +6307,13 @@ function _extends$e() {
|
|
|
4560
6307
|
};
|
|
4561
6308
|
return _extends$e.apply(this, arguments);
|
|
4562
6309
|
}
|
|
4563
|
-
var
|
|
6310
|
+
var SvgLogoPinterest20 = function SvgLogoPinterest202(props) {
|
|
4564
6311
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$e({
|
|
4565
6312
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4566
6313
|
width: 20,
|
|
4567
6314
|
height: 20
|
|
4568
6315
|
}, props), _path$e || (_path$e = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4569
|
-
d: "
|
|
6316
|
+
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"
|
|
4570
6317
|
})));
|
|
4571
6318
|
};
|
|
4572
6319
|
var _path$d;
|
|
@@ -4584,13 +6331,13 @@ function _extends$d() {
|
|
|
4584
6331
|
};
|
|
4585
6332
|
return _extends$d.apply(this, arguments);
|
|
4586
6333
|
}
|
|
4587
|
-
var
|
|
6334
|
+
var SvgLogoReddit20 = function SvgLogoReddit202(props) {
|
|
4588
6335
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$d({
|
|
4589
6336
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4590
6337
|
width: 20,
|
|
4591
6338
|
height: 20
|
|
4592
6339
|
}, props), _path$d || (_path$d = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4593
|
-
d: "
|
|
6340
|
+
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"
|
|
4594
6341
|
})));
|
|
4595
6342
|
};
|
|
4596
6343
|
var _path$c;
|
|
@@ -4608,13 +6355,13 @@ function _extends$c() {
|
|
|
4608
6355
|
};
|
|
4609
6356
|
return _extends$c.apply(this, arguments);
|
|
4610
6357
|
}
|
|
4611
|
-
var
|
|
6358
|
+
var SvgLogoRss20 = function SvgLogoRss202(props) {
|
|
4612
6359
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$c({
|
|
4613
6360
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4614
6361
|
width: 20,
|
|
4615
6362
|
height: 20
|
|
4616
6363
|
}, props), _path$c || (_path$c = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4617
|
-
d: "
|
|
6364
|
+
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"
|
|
4618
6365
|
})));
|
|
4619
6366
|
};
|
|
4620
6367
|
var _path$b;
|
|
@@ -4632,13 +6379,13 @@ function _extends$b() {
|
|
|
4632
6379
|
};
|
|
4633
6380
|
return _extends$b.apply(this, arguments);
|
|
4634
6381
|
}
|
|
4635
|
-
var
|
|
6382
|
+
var SvgLogoSnapchat20 = function SvgLogoSnapchat202(props) {
|
|
4636
6383
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$b({
|
|
4637
6384
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4638
6385
|
width: 20,
|
|
4639
6386
|
height: 20
|
|
4640
6387
|
}, props), _path$b || (_path$b = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4641
|
-
d: "
|
|
6388
|
+
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"
|
|
4642
6389
|
})));
|
|
4643
6390
|
};
|
|
4644
6391
|
var _path$a;
|
|
@@ -4656,13 +6403,13 @@ function _extends$a() {
|
|
|
4656
6403
|
};
|
|
4657
6404
|
return _extends$a.apply(this, arguments);
|
|
4658
6405
|
}
|
|
4659
|
-
var
|
|
6406
|
+
var SvgLogoSoundcloud20 = function SvgLogoSoundcloud202(props) {
|
|
4660
6407
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$a({
|
|
4661
6408
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4662
6409
|
width: 20,
|
|
4663
6410
|
height: 20
|
|
4664
6411
|
}, props), _path$a || (_path$a = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4665
|
-
d: "
|
|
6412
|
+
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"
|
|
4666
6413
|
})));
|
|
4667
6414
|
};
|
|
4668
6415
|
var _path$9;
|
|
@@ -4680,13 +6427,13 @@ function _extends$9() {
|
|
|
4680
6427
|
};
|
|
4681
6428
|
return _extends$9.apply(this, arguments);
|
|
4682
6429
|
}
|
|
4683
|
-
var
|
|
6430
|
+
var SvgLogoSpotify20 = function SvgLogoSpotify202(props) {
|
|
4684
6431
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$9({
|
|
4685
6432
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4686
6433
|
width: 20,
|
|
4687
6434
|
height: 20
|
|
4688
6435
|
}, props), _path$9 || (_path$9 = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4689
|
-
d: "
|
|
6436
|
+
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"
|
|
4690
6437
|
})));
|
|
4691
6438
|
};
|
|
4692
6439
|
var _path$8;
|
|
@@ -4704,13 +6451,13 @@ function _extends$8() {
|
|
|
4704
6451
|
};
|
|
4705
6452
|
return _extends$8.apply(this, arguments);
|
|
4706
6453
|
}
|
|
4707
|
-
var
|
|
6454
|
+
var SvgLogoTelegram20 = function SvgLogoTelegram202(props) {
|
|
4708
6455
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$8({
|
|
4709
6456
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4710
6457
|
width: 20,
|
|
4711
6458
|
height: 20
|
|
4712
6459
|
}, props), _path$8 || (_path$8 = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4713
|
-
d: "
|
|
6460
|
+
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"
|
|
4714
6461
|
})));
|
|
4715
6462
|
};
|
|
4716
6463
|
var _path$7;
|
|
@@ -4728,13 +6475,13 @@ function _extends$7() {
|
|
|
4728
6475
|
};
|
|
4729
6476
|
return _extends$7.apply(this, arguments);
|
|
4730
6477
|
}
|
|
4731
|
-
var
|
|
6478
|
+
var SvgLogoTumblr20 = function SvgLogoTumblr202(props) {
|
|
4732
6479
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$7({
|
|
4733
6480
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4734
6481
|
width: 20,
|
|
4735
6482
|
height: 20
|
|
4736
6483
|
}, props), _path$7 || (_path$7 = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4737
|
-
d: "
|
|
6484
|
+
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"
|
|
4738
6485
|
})));
|
|
4739
6486
|
};
|
|
4740
6487
|
var _path$6;
|
|
@@ -4752,13 +6499,13 @@ function _extends$6() {
|
|
|
4752
6499
|
};
|
|
4753
6500
|
return _extends$6.apply(this, arguments);
|
|
4754
6501
|
}
|
|
4755
|
-
var
|
|
6502
|
+
var SvgLogoTwitch20 = function SvgLogoTwitch202(props) {
|
|
4756
6503
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$6({
|
|
4757
6504
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4758
6505
|
width: 20,
|
|
4759
6506
|
height: 20
|
|
4760
6507
|
}, props), _path$6 || (_path$6 = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4761
|
-
d: "
|
|
6508
|
+
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"
|
|
4762
6509
|
})));
|
|
4763
6510
|
};
|
|
4764
6511
|
var _path$5;
|
|
@@ -4776,13 +6523,13 @@ function _extends$5() {
|
|
|
4776
6523
|
};
|
|
4777
6524
|
return _extends$5.apply(this, arguments);
|
|
4778
6525
|
}
|
|
4779
|
-
var
|
|
6526
|
+
var SvgLogoTwitter20 = function SvgLogoTwitter202(props) {
|
|
4780
6527
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$5({
|
|
4781
6528
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4782
6529
|
width: 20,
|
|
4783
6530
|
height: 20
|
|
4784
6531
|
}, props), _path$5 || (_path$5 = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4785
|
-
d: "
|
|
6532
|
+
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"
|
|
4786
6533
|
})));
|
|
4787
6534
|
};
|
|
4788
6535
|
var _path$4;
|
|
@@ -4800,13 +6547,13 @@ function _extends$4() {
|
|
|
4800
6547
|
};
|
|
4801
6548
|
return _extends$4.apply(this, arguments);
|
|
4802
6549
|
}
|
|
4803
|
-
var
|
|
6550
|
+
var SvgLogoWhatsapp20 = function SvgLogoWhatsapp202(props) {
|
|
4804
6551
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$4({
|
|
4805
6552
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4806
6553
|
width: 20,
|
|
4807
6554
|
height: 20
|
|
4808
6555
|
}, props), _path$4 || (_path$4 = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4809
|
-
d: "
|
|
6556
|
+
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"
|
|
4810
6557
|
})));
|
|
4811
6558
|
};
|
|
4812
6559
|
var _path$3;
|
|
@@ -4824,13 +6571,13 @@ function _extends$3() {
|
|
|
4824
6571
|
};
|
|
4825
6572
|
return _extends$3.apply(this, arguments);
|
|
4826
6573
|
}
|
|
4827
|
-
var
|
|
6574
|
+
var SvgLogoVimeo20 = function SvgLogoVimeo202(props) {
|
|
4828
6575
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$3({
|
|
4829
6576
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4830
6577
|
width: 20,
|
|
4831
6578
|
height: 20
|
|
4832
6579
|
}, props), _path$3 || (_path$3 = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4833
|
-
d: "
|
|
6580
|
+
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"
|
|
4834
6581
|
})));
|
|
4835
6582
|
};
|
|
4836
6583
|
var _path$2;
|
|
@@ -4848,13 +6595,13 @@ function _extends$2() {
|
|
|
4848
6595
|
};
|
|
4849
6596
|
return _extends$2.apply(this, arguments);
|
|
4850
6597
|
}
|
|
4851
|
-
var
|
|
6598
|
+
var SvgLogoYelp20 = function SvgLogoYelp202(props) {
|
|
4852
6599
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$2({
|
|
4853
6600
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4854
6601
|
width: 20,
|
|
4855
6602
|
height: 20
|
|
4856
6603
|
}, props), _path$2 || (_path$2 = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4857
|
-
d: "
|
|
6604
|
+
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"
|
|
4858
6605
|
})));
|
|
4859
6606
|
};
|
|
4860
6607
|
var _path$1;
|
|
@@ -4872,36 +6619,12 @@ function _extends$1() {
|
|
|
4872
6619
|
};
|
|
4873
6620
|
return _extends$1.apply(this, arguments);
|
|
4874
6621
|
}
|
|
4875
|
-
var
|
|
6622
|
+
var SvgLogoYoutube20 = function SvgLogoYoutube202(props) {
|
|
4876
6623
|
return /* @__PURE__ */ React__namespace.createElement("svg", _extends$1({
|
|
4877
6624
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4878
6625
|
width: 20,
|
|
4879
6626
|
height: 20
|
|
4880
6627
|
}, props), _path$1 || (_path$1 = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4881
|
-
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"
|
|
4882
|
-
})));
|
|
4883
|
-
};
|
|
4884
|
-
var _path;
|
|
4885
|
-
function _extends() {
|
|
4886
|
-
_extends = Object.assign || function(target) {
|
|
4887
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
4888
|
-
var source = arguments[i];
|
|
4889
|
-
for (var key in source) {
|
|
4890
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
4891
|
-
target[key] = source[key];
|
|
4892
|
-
}
|
|
4893
|
-
}
|
|
4894
|
-
}
|
|
4895
|
-
return target;
|
|
4896
|
-
};
|
|
4897
|
-
return _extends.apply(this, arguments);
|
|
4898
|
-
}
|
|
4899
|
-
var SvgLogoYoutube20 = function SvgLogoYoutube202(props) {
|
|
4900
|
-
return /* @__PURE__ */ React__namespace.createElement("svg", _extends({
|
|
4901
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4902
|
-
width: 20,
|
|
4903
|
-
height: 20
|
|
4904
|
-
}, props), _path || (_path = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
4905
6628
|
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"
|
|
4906
6629
|
})));
|
|
4907
6630
|
};
|
|
@@ -5041,7 +6764,7 @@ function SocialLinksPlaceholder({
|
|
|
5041
6764
|
}, link.id))
|
|
5042
6765
|
});
|
|
5043
6766
|
}
|
|
5044
|
-
const Container = styled__default["default"].div`
|
|
6767
|
+
const Container$1 = styled__default["default"].div`
|
|
5045
6768
|
display: flex;
|
|
5046
6769
|
flex-direction: row;
|
|
5047
6770
|
flex-wrap: wrap;
|
|
@@ -5125,7 +6848,7 @@ const SocialLinks = React.forwardRef(function SocialLinks2({
|
|
|
5125
6848
|
}, ref) {
|
|
5126
6849
|
const fillData = useColor(fill);
|
|
5127
6850
|
const backgroundColorData = useColor(backgroundColor);
|
|
5128
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Container, {
|
|
6851
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Container$1, {
|
|
5129
6852
|
ref,
|
|
5130
6853
|
id,
|
|
5131
6854
|
alignment,
|
|
@@ -5161,7 +6884,7 @@ const SocialLinks = React.forwardRef(function SocialLinks2({
|
|
|
5161
6884
|
})
|
|
5162
6885
|
});
|
|
5163
6886
|
});
|
|
5164
|
-
function registerComponent$
|
|
6887
|
+
function registerComponent$2(runtime) {
|
|
5165
6888
|
return runtime.registerComponent(SocialLinks, {
|
|
5166
6889
|
type: "./components/SocialLinks/index.js",
|
|
5167
6890
|
label: "Social Links",
|
|
@@ -5409,10 +7132,10 @@ const Span = styled__default["default"].span`
|
|
|
5409
7132
|
`}
|
|
5410
7133
|
`, shallowMergeFallbacks)}
|
|
5411
7134
|
`;
|
|
5412
|
-
function Mark(
|
|
5413
|
-
var
|
|
7135
|
+
function Mark(__) {
|
|
7136
|
+
var _$ = __, {
|
|
5414
7137
|
value
|
|
5415
|
-
} =
|
|
7138
|
+
} = _$, restOfProps = __objRest(_$, [
|
|
5416
7139
|
"value"
|
|
5417
7140
|
]);
|
|
5418
7141
|
const typographyStyle = useTypographyMark(value);
|
|
@@ -5450,10 +7173,10 @@ const StyledBlock = styled__default["default"].div`
|
|
|
5450
7173
|
border-left: 5px solid rgba(0, 0, 0, 0.1);
|
|
5451
7174
|
` : ""}
|
|
5452
7175
|
`;
|
|
5453
|
-
var Block = React.forwardRef(function Block2(
|
|
5454
|
-
var
|
|
7176
|
+
var Block = React.forwardRef(function Block2(_aa, ref) {
|
|
7177
|
+
var _ba = _aa, {
|
|
5455
7178
|
textAlign
|
|
5456
|
-
} =
|
|
7179
|
+
} = _ba, restOfProps = __objRest(_ba, [
|
|
5457
7180
|
"textAlign"
|
|
5458
7181
|
]);
|
|
5459
7182
|
return /* @__PURE__ */ jsxRuntime.jsx(StyledBlock, __spreadProps(__spreadValues({}, restOfProps), {
|
|
@@ -5578,10 +7301,10 @@ function Inlines() {
|
|
|
5578
7301
|
}
|
|
5579
7302
|
};
|
|
5580
7303
|
}
|
|
5581
|
-
const RichTextEditor = styled__default["default"](React.forwardRef(function RichTextEditor2(
|
|
5582
|
-
var
|
|
7304
|
+
const RichTextEditor = styled__default["default"](React.forwardRef(function RichTextEditor2(_ca, ref) {
|
|
7305
|
+
var _da = _ca, {
|
|
5583
7306
|
placeholder: placeholder2 = "Write some text..."
|
|
5584
|
-
} =
|
|
7307
|
+
} = _da, restOfProps = __objRest(_da, [
|
|
5585
7308
|
"placeholder"
|
|
5586
7309
|
]);
|
|
5587
7310
|
const plugins = React.useMemo(() => [Lists__default["default"](), LinkPlugin(), Inlines(), DeviceOverridesBlockPlugin(), DeviceOverridesMarksPlugin()], []);
|
|
@@ -5698,7 +7421,7 @@ const Text = React.forwardRef(function Text2({
|
|
|
5698
7421
|
onKeyDown: handleKeyDown
|
|
5699
7422
|
});
|
|
5700
7423
|
});
|
|
5701
|
-
function registerComponent(runtime) {
|
|
7424
|
+
function registerComponent$1(runtime) {
|
|
5702
7425
|
return runtime.registerComponent(Text, {
|
|
5703
7426
|
type: "./components/Text/index.js",
|
|
5704
7427
|
label: "Text",
|
|
@@ -5776,18 +7499,103 @@ function registerComponent(runtime) {
|
|
|
5776
7499
|
}
|
|
5777
7500
|
});
|
|
5778
7501
|
}
|
|
7502
|
+
const Container = styled__default["default"].div`
|
|
7503
|
+
display: flex;
|
|
7504
|
+
flex-direction: column;
|
|
7505
|
+
overflow: hidden;
|
|
7506
|
+
${cssWidth("560px")}
|
|
7507
|
+
${cssMargin()}
|
|
7508
|
+
${cssBorderRadius()}
|
|
7509
|
+
`;
|
|
7510
|
+
const ASPECT_RATIO = 16 / 9;
|
|
7511
|
+
const Video = React.forwardRef(function Video2({
|
|
7512
|
+
id,
|
|
7513
|
+
video,
|
|
7514
|
+
width,
|
|
7515
|
+
margin,
|
|
7516
|
+
borderRadius
|
|
7517
|
+
}, ref) {
|
|
7518
|
+
const canPlayUrl = video && video.url != null && ReactPlayer__default["default"].canPlay(video.url);
|
|
7519
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Container, {
|
|
7520
|
+
ref,
|
|
7521
|
+
id,
|
|
7522
|
+
width,
|
|
7523
|
+
margin,
|
|
7524
|
+
borderRadius,
|
|
7525
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
7526
|
+
style: {
|
|
7527
|
+
position: "relative",
|
|
7528
|
+
paddingTop: `${100 / ASPECT_RATIO}%`
|
|
7529
|
+
},
|
|
7530
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
7531
|
+
style: {
|
|
7532
|
+
position: "absolute",
|
|
7533
|
+
top: 0,
|
|
7534
|
+
left: 0,
|
|
7535
|
+
right: 0,
|
|
7536
|
+
bottom: 0
|
|
7537
|
+
},
|
|
7538
|
+
children: canPlayUrl === true ? /* @__PURE__ */ jsxRuntime.jsx(ReactPlayer__default["default"], __spreadProps(__spreadValues({}, video), {
|
|
7539
|
+
width: "100%",
|
|
7540
|
+
height: "100%",
|
|
7541
|
+
config: {
|
|
7542
|
+
vimeo: {
|
|
7543
|
+
playerOptions: {
|
|
7544
|
+
background: video != null && !video.controls
|
|
7545
|
+
}
|
|
7546
|
+
},
|
|
7547
|
+
wistia: {
|
|
7548
|
+
options: {
|
|
7549
|
+
endVideoBehavior: video != null && video.loop === true ? "loop" : "default"
|
|
7550
|
+
}
|
|
7551
|
+
}
|
|
7552
|
+
}
|
|
7553
|
+
})) : /* @__PURE__ */ jsxRuntime.jsx("img", {
|
|
7554
|
+
width: "100%",
|
|
7555
|
+
src: placeholders.video.src,
|
|
7556
|
+
alt: "Video Placeholder"
|
|
7557
|
+
})
|
|
7558
|
+
})
|
|
7559
|
+
})
|
|
7560
|
+
});
|
|
7561
|
+
});
|
|
7562
|
+
function registerComponent(runtime) {
|
|
7563
|
+
return runtime.registerComponent(Video, {
|
|
7564
|
+
type: "./components/Video/index.js",
|
|
7565
|
+
label: "Video",
|
|
7566
|
+
icon: "Video40",
|
|
7567
|
+
props: {
|
|
7568
|
+
id: descriptors.ElementID(),
|
|
7569
|
+
video: descriptors.Video({
|
|
7570
|
+
preset: {
|
|
7571
|
+
controls: true
|
|
7572
|
+
}
|
|
7573
|
+
}),
|
|
7574
|
+
width: descriptors.Width({
|
|
7575
|
+
defaultValue: {
|
|
7576
|
+
value: 560,
|
|
7577
|
+
unit: "px"
|
|
7578
|
+
}
|
|
7579
|
+
}),
|
|
7580
|
+
margin: descriptors.Margin(),
|
|
7581
|
+
borderRadius: descriptors.BorderRadius()
|
|
7582
|
+
}
|
|
7583
|
+
});
|
|
7584
|
+
}
|
|
5779
7585
|
function registerBuiltinComponents(runtime) {
|
|
5780
|
-
const unregisterBoxComponent = registerComponent$
|
|
5781
|
-
const unregisterButtonComponent = registerComponent$
|
|
5782
|
-
const unregisterCarouselComponent = registerComponent$
|
|
5783
|
-
const unregisterCountdownComponent = registerComponent$
|
|
5784
|
-
const unregisterDividerComponent = registerComponent$
|
|
5785
|
-
const unregisterEmbedComponent = registerComponent$
|
|
5786
|
-
const
|
|
5787
|
-
const
|
|
5788
|
-
const
|
|
5789
|
-
const
|
|
5790
|
-
const
|
|
7586
|
+
const unregisterBoxComponent = registerComponent$c(runtime);
|
|
7587
|
+
const unregisterButtonComponent = registerComponent$b(runtime);
|
|
7588
|
+
const unregisterCarouselComponent = registerComponent$9(runtime);
|
|
7589
|
+
const unregisterCountdownComponent = registerComponent$8(runtime);
|
|
7590
|
+
const unregisterDividerComponent = registerComponent$7(runtime);
|
|
7591
|
+
const unregisterEmbedComponent = registerComponent$6(runtime);
|
|
7592
|
+
const unregisterFormComponent = registerComponent$5(runtime);
|
|
7593
|
+
const unregisterImageComponent = registerComponent$a(runtime);
|
|
7594
|
+
const unregisterNavigationComponent = registerComponent$4(runtime);
|
|
7595
|
+
const unregisterRootComponent = registerComponent$3(runtime);
|
|
7596
|
+
const unregisterSocialLinksComponent = registerComponent$2(runtime);
|
|
7597
|
+
const unregisterTextComponent = registerComponent$1(runtime);
|
|
7598
|
+
const unregisterVideoComponent = registerComponent(runtime);
|
|
5791
7599
|
return () => {
|
|
5792
7600
|
unregisterBoxComponent();
|
|
5793
7601
|
unregisterButtonComponent();
|
|
@@ -5795,14 +7603,67 @@ function registerBuiltinComponents(runtime) {
|
|
|
5795
7603
|
unregisterCountdownComponent();
|
|
5796
7604
|
unregisterDividerComponent();
|
|
5797
7605
|
unregisterEmbedComponent();
|
|
7606
|
+
unregisterFormComponent();
|
|
5798
7607
|
unregisterImageComponent();
|
|
5799
7608
|
unregisterNavigationComponent();
|
|
5800
7609
|
unregisterRootComponent();
|
|
5801
7610
|
unregisterSocialLinksComponent();
|
|
5802
7611
|
unregisterTextComponent();
|
|
7612
|
+
unregisterTextComponent();
|
|
7613
|
+
unregisterVideoComponent();
|
|
7614
|
+
};
|
|
7615
|
+
}
|
|
7616
|
+
var _path;
|
|
7617
|
+
function _extends() {
|
|
7618
|
+
_extends = Object.assign || function(target) {
|
|
7619
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
7620
|
+
var source = arguments[i];
|
|
7621
|
+
for (var key in source) {
|
|
7622
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7623
|
+
target[key] = source[key];
|
|
7624
|
+
}
|
|
7625
|
+
}
|
|
7626
|
+
}
|
|
7627
|
+
return target;
|
|
5803
7628
|
};
|
|
7629
|
+
return _extends.apply(this, arguments);
|
|
5804
7630
|
}
|
|
5805
|
-
|
|
7631
|
+
var SvgWarning20 = function SvgWarning202(props) {
|
|
7632
|
+
return /* @__PURE__ */ React__namespace.createElement("svg", _extends({
|
|
7633
|
+
width: 20,
|
|
7634
|
+
height: 20,
|
|
7635
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
7636
|
+
}, props), _path || (_path = /* @__PURE__ */ React__namespace.createElement("path", {
|
|
7637
|
+
fillRule: "evenodd",
|
|
7638
|
+
clipRule: "evenodd",
|
|
7639
|
+
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"
|
|
7640
|
+
})));
|
|
7641
|
+
};
|
|
7642
|
+
const ErrorDiv = styled__default["default"]("div")`
|
|
7643
|
+
width: 100%;
|
|
7644
|
+
height: 54px;
|
|
7645
|
+
background-color: #fcedf2;
|
|
7646
|
+
border-radius: 6px;
|
|
7647
|
+
padding: 16px;
|
|
7648
|
+
display: flex;
|
|
7649
|
+
align-items: center;
|
|
7650
|
+
gap: 8px;
|
|
7651
|
+
color: #c73e6d;
|
|
7652
|
+
fill: currentColor;
|
|
7653
|
+
font-family: Heebo, sans-serif;
|
|
7654
|
+
font-size: 16px;
|
|
7655
|
+
`;
|
|
7656
|
+
const FallbackComponent = React.forwardRef(function FallbackComponent2({
|
|
7657
|
+
text
|
|
7658
|
+
}, ref) {
|
|
7659
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ErrorDiv, {
|
|
7660
|
+
ref,
|
|
7661
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(SvgWarning20, {}), /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
7662
|
+
children: text
|
|
7663
|
+
})]
|
|
7664
|
+
});
|
|
7665
|
+
});
|
|
7666
|
+
const contextDefaultValue = reactPage.configureStore();
|
|
5806
7667
|
function createReactRuntime(store) {
|
|
5807
7668
|
return {
|
|
5808
7669
|
registerComponent(component, {
|
|
@@ -5828,39 +7689,22 @@ function createReactRuntime(store) {
|
|
|
5828
7689
|
const ReactRuntime = createReactRuntime(contextDefaultValue);
|
|
5829
7690
|
const Context = React.createContext(contextDefaultValue);
|
|
5830
7691
|
function RuntimeProvider({
|
|
7692
|
+
client: client2,
|
|
5831
7693
|
children,
|
|
5832
|
-
defaultRootElements
|
|
5833
|
-
registerComponents,
|
|
5834
|
-
makeswiftApiEndpoint
|
|
7694
|
+
defaultRootElements
|
|
5835
7695
|
}) {
|
|
5836
7696
|
const [store, setStore] = React.useState(() => {
|
|
5837
|
-
const store2 = configureStore({
|
|
7697
|
+
const store2 = reactPage.configureStore({
|
|
5838
7698
|
preloadedState: contextDefaultValue.getState(),
|
|
5839
7699
|
rootElements: defaultRootElements
|
|
5840
7700
|
});
|
|
5841
7701
|
const runtime = createReactRuntime(store2);
|
|
5842
7702
|
registerBuiltinComponents(runtime);
|
|
5843
|
-
registerComponents == null ? void 0 : registerComponents(runtime);
|
|
5844
7703
|
return store2;
|
|
5845
7704
|
});
|
|
5846
|
-
const [client$1, setClient] = React.useState(new client.ApolloClient({
|
|
5847
|
-
uri: makeswiftApiEndpoint,
|
|
5848
|
-
cache: new client.InMemoryCache()
|
|
5849
|
-
}));
|
|
5850
|
-
React.useEffect(() => {
|
|
5851
|
-
setClient(({
|
|
5852
|
-
cache
|
|
5853
|
-
}) => new client.ApolloClient({
|
|
5854
|
-
uri: makeswiftApiEndpoint,
|
|
5855
|
-
cache
|
|
5856
|
-
}));
|
|
5857
|
-
}, [makeswiftApiEndpoint]);
|
|
5858
7705
|
React.useEffect(() => {
|
|
5859
7706
|
return registerBuiltinComponents(createReactRuntime(store));
|
|
5860
7707
|
}, [store]);
|
|
5861
|
-
React.useEffect(() => {
|
|
5862
|
-
return registerComponents == null ? void 0 : registerComponents(createReactRuntime(store));
|
|
5863
|
-
}, [store, registerComponents]);
|
|
5864
7708
|
React.useEffect(() => {
|
|
5865
7709
|
const isInBuilder = window.parent !== window;
|
|
5866
7710
|
if (isInBuilder)
|
|
@@ -5871,10 +7715,10 @@ function RuntimeProvider({
|
|
|
5871
7715
|
});
|
|
5872
7716
|
setStore((store2) => ReactBuilderPreview.configureStore({
|
|
5873
7717
|
preloadedState: store2.getState(),
|
|
5874
|
-
client:
|
|
7718
|
+
client: client2.apolloClient
|
|
5875
7719
|
}));
|
|
5876
7720
|
}
|
|
5877
|
-
}, [
|
|
7721
|
+
}, [client2]);
|
|
5878
7722
|
React.useEffect(() => {
|
|
5879
7723
|
const isInBuilder = window.parent !== window;
|
|
5880
7724
|
if (!isInBuilder)
|
|
@@ -5898,12 +7742,31 @@ function RuntimeProvider({
|
|
|
5898
7742
|
}, []);
|
|
5899
7743
|
return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, {
|
|
5900
7744
|
value: store,
|
|
5901
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5902
|
-
client:
|
|
7745
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(MakeswiftProvider, {
|
|
7746
|
+
client: client2,
|
|
5903
7747
|
children
|
|
5904
7748
|
})
|
|
5905
7749
|
});
|
|
5906
7750
|
}
|
|
7751
|
+
const PageContext = React.createContext(null);
|
|
7752
|
+
function usePageIdOrNull() {
|
|
7753
|
+
return React.useContext(PageContext);
|
|
7754
|
+
}
|
|
7755
|
+
function usePageId() {
|
|
7756
|
+
const pageIdOrNull = usePageIdOrNull();
|
|
7757
|
+
if (pageIdOrNull == null)
|
|
7758
|
+
throw new Error("`usePageId` must be used with `<PageProvider>`");
|
|
7759
|
+
return pageIdOrNull;
|
|
7760
|
+
}
|
|
7761
|
+
function PageProvider({
|
|
7762
|
+
id,
|
|
7763
|
+
children
|
|
7764
|
+
}) {
|
|
7765
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PageContext.Provider, {
|
|
7766
|
+
value: id,
|
|
7767
|
+
children
|
|
7768
|
+
});
|
|
7769
|
+
}
|
|
5907
7770
|
const DocumentContext = React.createContext(null);
|
|
5908
7771
|
function useDocumentKey() {
|
|
5909
7772
|
return React.useContext(DocumentContext);
|
|
@@ -5913,17 +7776,17 @@ function useSelector(selector) {
|
|
|
5913
7776
|
return withSelector.useSyncExternalStoreWithSelector(store.subscribe, store.getState, store.getState, selector);
|
|
5914
7777
|
}
|
|
5915
7778
|
function useComponent(type) {
|
|
5916
|
-
return useSelector((state) => getReactComponent(state, type));
|
|
7779
|
+
return useSelector((state) => reactPage.getReactComponent(state, type));
|
|
5917
7780
|
}
|
|
5918
7781
|
function useElementId(elementKey) {
|
|
5919
7782
|
const documentKey = useDocumentKey();
|
|
5920
|
-
return useSelector((state) => documentKey == null || elementKey == null ? null : getElementId(state, documentKey, elementKey));
|
|
7783
|
+
return useSelector((state) => documentKey == null || elementKey == null ? null : reactPage.getElementId(state, documentKey, elementKey));
|
|
5921
7784
|
}
|
|
5922
|
-
function
|
|
5923
|
-
return useSelector((state) =>
|
|
7785
|
+
function useDocument(documentKey) {
|
|
7786
|
+
return useSelector((state) => reactPage.getDocument(state, documentKey));
|
|
5924
7787
|
}
|
|
5925
7788
|
function useIsInBuilder() {
|
|
5926
|
-
return useSelector((state) => getIsInBuilder(state));
|
|
7789
|
+
return useSelector((state) => reactPage.getIsInBuilder(state));
|
|
5927
7790
|
}
|
|
5928
7791
|
function useDispatch() {
|
|
5929
7792
|
const store = React.useContext(Context);
|
|
@@ -5934,15 +7797,9 @@ const ElementData = React.memo(React.forwardRef(function ElementData2({
|
|
|
5934
7797
|
}, ref) {
|
|
5935
7798
|
const Component = useComponent(elementData.type);
|
|
5936
7799
|
if (Component == null) {
|
|
5937
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
7800
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FallbackComponent, {
|
|
5938
7801
|
ref,
|
|
5939
|
-
|
|
5940
|
-
children: "Component Not Found"
|
|
5941
|
-
}), /* @__PURE__ */ jsxRuntime.jsx("pre", {
|
|
5942
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("code", {
|
|
5943
|
-
children: JSON.stringify(elementData, null, 2)
|
|
5944
|
-
})
|
|
5945
|
-
})]
|
|
7802
|
+
text: "Component not found"
|
|
5946
7803
|
});
|
|
5947
7804
|
}
|
|
5948
7805
|
return /* @__PURE__ */ React.createElement(Component, __spreadProps(__spreadValues({}, elementData.props), {
|
|
@@ -5953,24 +7810,52 @@ const ElementData = React.memo(React.forwardRef(function ElementData2({
|
|
|
5953
7810
|
const ElementReference = React.memo(React.forwardRef(function ElementReference2({
|
|
5954
7811
|
elementReference
|
|
5955
7812
|
}, ref) {
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
7813
|
+
var _a;
|
|
7814
|
+
const {
|
|
7815
|
+
error,
|
|
7816
|
+
data
|
|
7817
|
+
} = useQuery(client.gql`
|
|
7818
|
+
query ElementReferenceGlobalElement($id: ID!) {
|
|
7819
|
+
globalElement(id: $id) {
|
|
7820
|
+
id
|
|
7821
|
+
data
|
|
7822
|
+
}
|
|
7823
|
+
}
|
|
7824
|
+
`, {
|
|
7825
|
+
variables: {
|
|
7826
|
+
id: elementReference.value
|
|
7827
|
+
}
|
|
7828
|
+
});
|
|
7829
|
+
const globalElementData = (_a = data == null ? void 0 : data.globalElement) == null ? void 0 : _a.data;
|
|
7830
|
+
const elementReferenceDocument = useDocument(elementReference.key);
|
|
7831
|
+
if (error != null) {
|
|
7832
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FallbackComponent, {
|
|
7833
|
+
ref,
|
|
7834
|
+
text: "Something went wrong!"
|
|
7835
|
+
});
|
|
7836
|
+
}
|
|
7837
|
+
if (globalElementData == null) {
|
|
7838
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FallbackComponent, {
|
|
7839
|
+
ref,
|
|
7840
|
+
text: "This global component doesn't exist"
|
|
7841
|
+
});
|
|
7842
|
+
}
|
|
7843
|
+
return elementReferenceDocument != null ? /* @__PURE__ */ jsxRuntime.jsx(Document, {
|
|
7844
|
+
document: elementReferenceDocument,
|
|
7845
|
+
ref
|
|
7846
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx(ElementData, {
|
|
7847
|
+
elementData: globalElementData,
|
|
7848
|
+
ref
|
|
5965
7849
|
});
|
|
5966
7850
|
}));
|
|
5967
|
-
const Element$1 = React.memo(function Element2({
|
|
7851
|
+
const Element$1 = React.memo(React.forwardRef(function Element2({
|
|
5968
7852
|
element
|
|
5969
|
-
}) {
|
|
7853
|
+
}, ref) {
|
|
5970
7854
|
const elementKey = element.key;
|
|
5971
7855
|
const dispatch = useDispatch();
|
|
5972
7856
|
const documentKey = useDocumentKey();
|
|
5973
7857
|
const [handle, setHandle] = React.useState(null);
|
|
7858
|
+
React.useImperativeHandle(ref, () => handle, [handle]);
|
|
5974
7859
|
React.useEffect(() => {
|
|
5975
7860
|
if (documentKey == null)
|
|
5976
7861
|
return;
|
|
@@ -5981,40 +7866,42 @@ const Element$1 = React.memo(function Element2({
|
|
|
5981
7866
|
return;
|
|
5982
7867
|
return dispatch(actions.mountComponentEffect(documentKey, elementKey));
|
|
5983
7868
|
}, [dispatch, documentKey, elementKey]);
|
|
5984
|
-
return isElementReference(element) ? /* @__PURE__ */ jsxRuntime.jsx(ElementReference, {
|
|
7869
|
+
return reactPage.isElementReference(element) ? /* @__PURE__ */ jsxRuntime.jsx(ElementReference, {
|
|
5985
7870
|
ref: setHandle,
|
|
5986
7871
|
elementReference: element
|
|
5987
7872
|
}, elementKey) : /* @__PURE__ */ jsxRuntime.jsx(ElementData, {
|
|
5988
7873
|
ref: setHandle,
|
|
5989
7874
|
elementData: element
|
|
5990
7875
|
}, elementKey);
|
|
5991
|
-
});
|
|
5992
|
-
const Document = React.memo(function Document2({
|
|
5993
|
-
|
|
5994
|
-
}) {
|
|
5995
|
-
const documentRootElement = useDocumentRootElement(documentKey);
|
|
5996
|
-
if (documentRootElement == null) {
|
|
5997
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
5998
|
-
children: [/* @__PURE__ */ jsxRuntime.jsx("p", {
|
|
5999
|
-
children: "Document Not Found"
|
|
6000
|
-
}), /* @__PURE__ */ jsxRuntime.jsx("pre", {
|
|
6001
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("code", {
|
|
6002
|
-
children: JSON.stringify({
|
|
6003
|
-
documentKey
|
|
6004
|
-
}, null, 2)
|
|
6005
|
-
})
|
|
6006
|
-
})]
|
|
6007
|
-
});
|
|
6008
|
-
}
|
|
7876
|
+
}));
|
|
7877
|
+
const Document = React.memo(React.forwardRef(function Document2({
|
|
7878
|
+
document
|
|
7879
|
+
}, ref) {
|
|
6009
7880
|
return /* @__PURE__ */ jsxRuntime.jsx(DocumentContext.Provider, {
|
|
6010
|
-
value:
|
|
7881
|
+
value: document.key,
|
|
6011
7882
|
children: /* @__PURE__ */ jsxRuntime.jsx(Element$1, {
|
|
6012
|
-
|
|
7883
|
+
ref,
|
|
7884
|
+
element: document.rootElement
|
|
6013
7885
|
})
|
|
6014
7886
|
});
|
|
6015
|
-
});
|
|
7887
|
+
}));
|
|
7888
|
+
const DocumentReference = React.memo(React.forwardRef(function DocumentReference2({
|
|
7889
|
+
documentReference
|
|
7890
|
+
}, ref) {
|
|
7891
|
+
const document = useDocument(documentReference.key);
|
|
7892
|
+
if (document == null) {
|
|
7893
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FallbackComponent, {
|
|
7894
|
+
ref,
|
|
7895
|
+
text: "Document not found"
|
|
7896
|
+
});
|
|
7897
|
+
}
|
|
7898
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Document, {
|
|
7899
|
+
ref,
|
|
7900
|
+
document
|
|
7901
|
+
});
|
|
7902
|
+
}));
|
|
6016
7903
|
exports.Box = Box;
|
|
6017
|
-
exports.Button = Button;
|
|
7904
|
+
exports.Button = Button$1;
|
|
6018
7905
|
exports.Carousel = Carousel;
|
|
6019
7906
|
exports.Countdown = Countdown;
|
|
6020
7907
|
exports.DEFAULT_BOX_ANIMATE_DELAY = DEFAULT_BOX_ANIMATE_DELAY;
|
|
@@ -6025,17 +7912,19 @@ exports.DEFAULT_ITEM_ANIMATE_DURATION = DEFAULT_ITEM_ANIMATE_DURATION;
|
|
|
6025
7912
|
exports.DEFAULT_ITEM_ANIMATE_TYPE = DEFAULT_ITEM_ANIMATE_TYPE;
|
|
6026
7913
|
exports.DEFAULT_ITEM_STAGGER_DURATION = DEFAULT_ITEM_STAGGER_DURATION;
|
|
6027
7914
|
exports.Divider = Divider;
|
|
6028
|
-
exports.
|
|
7915
|
+
exports.DocumentReference = DocumentReference;
|
|
6029
7916
|
exports.Element = Element$1;
|
|
6030
7917
|
exports.Embed = Embed;
|
|
7918
|
+
exports.Form = Form;
|
|
6031
7919
|
exports.ImageComponent = ImageComponent;
|
|
7920
|
+
exports.MakeswiftClient = MakeswiftClient;
|
|
6032
7921
|
exports.Navigation = Navigation;
|
|
7922
|
+
exports.PageProvider = PageProvider;
|
|
6033
7923
|
exports.ReactRuntime = ReactRuntime;
|
|
6034
7924
|
exports.Root = Root;
|
|
6035
7925
|
exports.RuntimeProvider = RuntimeProvider;
|
|
6036
7926
|
exports.SocialLinks = SocialLinks;
|
|
6037
7927
|
exports.Text = Text;
|
|
6038
|
-
exports.createDocument = createDocument;
|
|
6039
7928
|
exports.cssBorder = cssBorder;
|
|
6040
7929
|
exports.cssBorderRadius = cssBorderRadius;
|
|
6041
7930
|
exports.cssBoxShadow = cssBoxShadow;
|
|
@@ -6045,15 +7934,16 @@ exports.cssMediaRules = cssMediaRules;
|
|
|
6045
7934
|
exports.cssPadding = cssPadding;
|
|
6046
7935
|
exports.cssTextStyle = cssTextStyle;
|
|
6047
7936
|
exports.cssWidth = cssWidth;
|
|
6048
|
-
exports.getComponentPropControllerDescriptors = getComponentPropControllerDescriptors$1;
|
|
6049
|
-
exports.getComponentsMeta = getComponentsMeta;
|
|
6050
|
-
exports.getDocumentRootElement = getDocumentRootElement$1;
|
|
6051
|
-
exports.getElementPropControllerDescriptors = getElementPropControllerDescriptors;
|
|
6052
|
-
exports.getInitialState = getInitialState$3;
|
|
6053
|
-
exports.reducer = reducer$3;
|
|
6054
|
-
exports.reducer$1 = reducer$2;
|
|
6055
|
-
exports.reducer$2 = reducer$1;
|
|
6056
7937
|
exports.registerBuiltinComponents = registerBuiltinComponents;
|
|
6057
|
-
exports.registerComponent = registerComponent$
|
|
7938
|
+
exports.registerComponent = registerComponent$c;
|
|
7939
|
+
exports.useBackgrounds = useBackgrounds;
|
|
7940
|
+
exports.useBorder = useBorder;
|
|
7941
|
+
exports.useBoxShadow = useBoxShadow;
|
|
7942
|
+
exports.useColor = useColor;
|
|
7943
|
+
exports.useFile = useFile;
|
|
6058
7944
|
exports.useIsInBuilder = useIsInBuilder;
|
|
7945
|
+
exports.useMediaQuery = useMediaQuery;
|
|
7946
|
+
exports.usePage = usePage;
|
|
7947
|
+
exports.usePageId = usePageId;
|
|
7948
|
+
exports.useTable = useTable;
|
|
6059
7949
|
//# sourceMappingURL=react.cjs2.js.map
|