tinacms 0.63.0 → 0.65.0
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/CHANGELOG.md +52 -0
- package/dist/admin/api.d.ts +36 -0
- package/dist/admin/components/GetCollection.d.ts +1 -28
- package/dist/admin/components/GetCollections.d.ts +1 -4
- package/dist/admin/components/GetDocument.d.ts +2 -15
- package/dist/admin/components/GetDocumentFields.d.ts +0 -7
- package/dist/admin/plugins/route-mapping.d.ts +3 -15
- package/dist/admin/types.d.ts +72 -0
- package/dist/edit-state.d.ts +8 -0
- package/dist/edit-state.es.js +32 -3
- package/dist/edit-state.js +30 -0
- package/dist/hooks/use-graphql-forms.d.ts +2 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +1681 -270
- package/dist/index.js +1679 -267
- package/dist/style.css +301 -451
- package/dist/tina-cms.d.ts +51 -14
- package/package.json +5 -4
- package/dist/admin/hooks/useEmbedTailwind.d.ts +0 -14
package/dist/index.es.js
CHANGED
|
@@ -29,7 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import { EventBus,
|
|
32
|
+
import { EventBus, Modal, ModalPopup, ModalHeader, ModalBody, ModalActions, Button, LoadingDots, useLocalStorage, TinaCMS, BranchSwitcherPlugin, BranchDataProvider, TinaProvider, useCMS, useBranchData, FormMetaPlugin, Form, GlobalFormPlugin, FullscreenFormBuilder } from "@tinacms/toolkit";
|
|
33
33
|
export * from "@tinacms/toolkit";
|
|
34
34
|
import { TypeInfo, visit, visitWithTypeInfo, getNamedType, GraphQLObjectType, isLeafType, GraphQLUnionType, isScalarType, getIntrospectionQuery, buildClientSchema, print } from "graphql";
|
|
35
35
|
import set from "lodash.set";
|
|
@@ -37,7 +37,7 @@ import gql$1 from "graphql-tag";
|
|
|
37
37
|
import React, { useState, useCallback, useEffect, Fragment } from "react";
|
|
38
38
|
import styled from "styled-components";
|
|
39
39
|
import * as yup from "yup";
|
|
40
|
-
import { setEditing, useEditState } from "@tinacms/sharedctx";
|
|
40
|
+
import { setEditing, TinaDataContext, useEditState } from "@tinacms/sharedctx";
|
|
41
41
|
import { getIn, setIn } from "final-form";
|
|
42
42
|
import UrlPattern from "url-pattern";
|
|
43
43
|
import { NavLink, useLocation, useParams, Link, useNavigate, BrowserRouter, Routes, Route } from "react-router-dom";
|
|
@@ -633,11 +633,11 @@ class LocalClient extends Client {
|
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
635
|
function ModalBuilder(modalProps) {
|
|
636
|
-
return /* @__PURE__ */ React.createElement(
|
|
636
|
+
return /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(ModalPopup, null, /* @__PURE__ */ React.createElement(ModalHeader, null, modalProps.title), /* @__PURE__ */ React.createElement(ModalBody, {
|
|
637
637
|
padded: true
|
|
638
638
|
}, /* @__PURE__ */ React.createElement("p", null, modalProps.message), modalProps.error && /* @__PURE__ */ React.createElement(ErrorLabel, null, modalProps.error)), /* @__PURE__ */ React.createElement(ModalActions, null, modalProps.actions.map((action) => /* @__PURE__ */ React.createElement(AsyncButton, __spreadValues({
|
|
639
639
|
key: action.name
|
|
640
|
-
}, action))))))
|
|
640
|
+
}, action))))));
|
|
641
641
|
}
|
|
642
642
|
const ErrorLabel = styled.p`
|
|
643
643
|
color: var(--tina-color-error) !important;
|
|
@@ -655,7 +655,7 @@ const AsyncButton = ({ name, primary, action }) => {
|
|
|
655
655
|
}
|
|
656
656
|
}, [action, setSubmitting]);
|
|
657
657
|
return /* @__PURE__ */ React.createElement(Button, {
|
|
658
|
-
primary,
|
|
658
|
+
variant: primary ? "primary" : "secondary",
|
|
659
659
|
onClick,
|
|
660
660
|
busy: submitting,
|
|
661
661
|
disabled: submitting
|
|
@@ -843,99 +843,11 @@ const TinaCloudProvider = (props) => {
|
|
|
843
843
|
}))));
|
|
844
844
|
};
|
|
845
845
|
const TinaCloudAuthWall = TinaCloudProvider;
|
|
846
|
-
var DefaultContext = {
|
|
847
|
-
color: void 0,
|
|
848
|
-
size: void 0,
|
|
849
|
-
className: void 0,
|
|
850
|
-
style: void 0,
|
|
851
|
-
attr: void 0
|
|
852
|
-
};
|
|
853
|
-
var IconContext = React.createContext && React.createContext(DefaultContext);
|
|
854
|
-
var __assign = function() {
|
|
855
|
-
__assign = Object.assign || function(t) {
|
|
856
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
857
|
-
s = arguments[i];
|
|
858
|
-
for (var p in s)
|
|
859
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
860
|
-
t[p] = s[p];
|
|
861
|
-
}
|
|
862
|
-
return t;
|
|
863
|
-
};
|
|
864
|
-
return __assign.apply(this, arguments);
|
|
865
|
-
};
|
|
866
|
-
var __rest = function(s, e) {
|
|
867
|
-
var t = {};
|
|
868
|
-
for (var p in s)
|
|
869
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
870
|
-
t[p] = s[p];
|
|
871
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
872
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
873
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
874
|
-
t[p[i]] = s[p[i]];
|
|
875
|
-
}
|
|
876
|
-
return t;
|
|
877
|
-
};
|
|
878
|
-
function Tree2Element(tree) {
|
|
879
|
-
return tree && tree.map(function(node, i) {
|
|
880
|
-
return React.createElement(node.tag, __assign({
|
|
881
|
-
key: i
|
|
882
|
-
}, node.attr), Tree2Element(node.child));
|
|
883
|
-
});
|
|
884
|
-
}
|
|
885
|
-
function GenIcon(data) {
|
|
886
|
-
return function(props) {
|
|
887
|
-
return React.createElement(IconBase, __assign({
|
|
888
|
-
attr: __assign({}, data.attr)
|
|
889
|
-
}, props), Tree2Element(data.child));
|
|
890
|
-
};
|
|
891
|
-
}
|
|
892
|
-
function IconBase(props) {
|
|
893
|
-
var elem = function(conf) {
|
|
894
|
-
var attr = props.attr, size = props.size, title = props.title, svgProps = __rest(props, ["attr", "size", "title"]);
|
|
895
|
-
var computedSize = size || conf.size || "1em";
|
|
896
|
-
var className;
|
|
897
|
-
if (conf.className)
|
|
898
|
-
className = conf.className;
|
|
899
|
-
if (props.className)
|
|
900
|
-
className = (className ? className + " " : "") + props.className;
|
|
901
|
-
return React.createElement("svg", __assign({
|
|
902
|
-
stroke: "currentColor",
|
|
903
|
-
fill: "currentColor",
|
|
904
|
-
strokeWidth: "0"
|
|
905
|
-
}, conf.attr, attr, svgProps, {
|
|
906
|
-
className,
|
|
907
|
-
style: __assign(__assign({
|
|
908
|
-
color: props.color || conf.color
|
|
909
|
-
}, conf.style), props.style),
|
|
910
|
-
height: computedSize,
|
|
911
|
-
width: computedSize,
|
|
912
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
913
|
-
}), title && React.createElement("title", null, title), props.children);
|
|
914
|
-
};
|
|
915
|
-
return IconContext !== void 0 ? React.createElement(IconContext.Consumer, null, function(conf) {
|
|
916
|
-
return elem(conf);
|
|
917
|
-
}) : elem(DefaultContext);
|
|
918
|
-
}
|
|
919
|
-
function BiEdit(props) {
|
|
920
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m7 17.013 4.413-.015 9.632-9.54c.378-.378.586-.88.586-1.414s-.208-1.036-.586-1.414l-1.586-1.586c-.756-.756-2.075-.752-2.825-.003L7 12.583v4.43zM18.045 4.458l1.589 1.583-1.597 1.582-1.586-1.585 1.594-1.58zM9 13.417l6.03-5.973 1.586 1.586-6.029 5.971L9 15.006v-1.589z" } }, { "tag": "path", "attr": { "d": "M5 21h14c1.103 0 2-.897 2-2v-8.668l-2 2V19H8.158c-.026 0-.053.01-.079.01-.033 0-.066-.009-.1-.01H5V5h6.847l2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2z" } }] })(props);
|
|
921
|
-
}
|
|
922
|
-
function BiExit(props) {
|
|
923
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M19.002 3h-14c-1.103 0-2 .897-2 2v4h2V5h14v14h-14v-4h-2v4c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.898-2-2-2z" } }, { "tag": "path", "attr": { "d": "m11 16 5-4-5-4v3.001H3v2h8z" } }] })(props);
|
|
924
|
-
}
|
|
925
|
-
function BiLinkExternal(props) {
|
|
926
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m13 3 3.293 3.293-7 7 1.414 1.414 7-7L21 11V3z" } }, { "tag": "path", "attr": { "d": "M19 19H5V5h7l-2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-5l-2-2v7z" } }] })(props);
|
|
927
|
-
}
|
|
928
|
-
function BiLogIn(props) {
|
|
929
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m13 16 5-4-5-4v3H4v2h9z" } }, { "tag": "path", "attr": { "d": "M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z" } }] })(props);
|
|
930
|
-
}
|
|
931
|
-
function BiLogOut(props) {
|
|
932
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M16 13v-2H7V8l-5 4 5 4v-3z" } }, { "tag": "path", "attr": { "d": "M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z" } }] })(props);
|
|
933
|
-
}
|
|
934
846
|
function useGraphqlForms({
|
|
935
|
-
query,
|
|
936
847
|
variables,
|
|
937
848
|
onSubmit,
|
|
938
|
-
formify: formify2 = null
|
|
849
|
+
formify: formify2 = null,
|
|
850
|
+
query
|
|
939
851
|
}) {
|
|
940
852
|
const cms = useCMS();
|
|
941
853
|
const [formValues, setFormValues] = React.useState({});
|
|
@@ -985,7 +897,6 @@ function useGraphqlForms({
|
|
|
985
897
|
React.useEffect(() => {
|
|
986
898
|
updateData();
|
|
987
899
|
}, [JSON.stringify(formValues)]);
|
|
988
|
-
const queryString = print(query(gql$1));
|
|
989
900
|
React.useEffect(() => {
|
|
990
901
|
if (pendingReset) {
|
|
991
902
|
setData(__spreadProps(__spreadValues({}, data), { [pendingReset]: initialData[pendingReset] }));
|
|
@@ -993,9 +904,15 @@ function useGraphqlForms({
|
|
|
993
904
|
}
|
|
994
905
|
}, [pendingReset]);
|
|
995
906
|
React.useEffect(() => {
|
|
907
|
+
if (!query) {
|
|
908
|
+
setIsLoading(false);
|
|
909
|
+
return;
|
|
910
|
+
}
|
|
996
911
|
const formIds = [];
|
|
997
912
|
setIsLoading(true);
|
|
998
|
-
cms.api.tina.requestWithForm(
|
|
913
|
+
cms.api.tina.requestWithForm((gql2) => gql2(query), {
|
|
914
|
+
variables
|
|
915
|
+
}).then((payload) => {
|
|
999
916
|
cms.plugins.remove(new FormMetaPlugin({ name: "tina-admin-link" }));
|
|
1000
917
|
setData(payload);
|
|
1001
918
|
setInitialData(payload);
|
|
@@ -1013,32 +930,6 @@ function useGraphqlForms({
|
|
|
1013
930
|
values: yup2.object().required(),
|
|
1014
931
|
form: yup2.object().required()
|
|
1015
932
|
}), `Unable to build form shape for fields at ${queryName}`);
|
|
1016
|
-
if (cms.flags.get("tina-admin")) {
|
|
1017
|
-
const TinaAdminLink = new FormMetaPlugin({
|
|
1018
|
-
name: "tina-admin-link",
|
|
1019
|
-
Component: () => /* @__PURE__ */ React.createElement("a", {
|
|
1020
|
-
href: `/admin/collections/${result._internalSys.collection.name}/${result._internalSys.filename}`,
|
|
1021
|
-
style: {
|
|
1022
|
-
display: "flex",
|
|
1023
|
-
alignItems: "center",
|
|
1024
|
-
padding: "10px 20px",
|
|
1025
|
-
borderTop: "1px solid var(--tina-color-grey-2)",
|
|
1026
|
-
textTransform: "uppercase",
|
|
1027
|
-
fontSize: "11px",
|
|
1028
|
-
fontWeight: 500,
|
|
1029
|
-
background: "var(--tina-color-grey-0)"
|
|
1030
|
-
}
|
|
1031
|
-
}, /* @__PURE__ */ React.createElement(BiLinkExternal, {
|
|
1032
|
-
style: {
|
|
1033
|
-
height: "1.25em",
|
|
1034
|
-
width: "auto",
|
|
1035
|
-
opacity: "0.8",
|
|
1036
|
-
marginRight: "8px"
|
|
1037
|
-
}
|
|
1038
|
-
}), " ", "Edit in Tina Admin")
|
|
1039
|
-
});
|
|
1040
|
-
cms.plugins.add(TinaAdminLink);
|
|
1041
|
-
}
|
|
1042
933
|
const formConfig = {
|
|
1043
934
|
id: queryName,
|
|
1044
935
|
label: result.form.label,
|
|
@@ -1160,11 +1051,11 @@ function useGraphqlForms({
|
|
|
1160
1051
|
}
|
|
1161
1052
|
});
|
|
1162
1053
|
};
|
|
1163
|
-
}, [
|
|
1054
|
+
}, [query, JSON.stringify(variables), currentBranch]);
|
|
1164
1055
|
return [data, isLoading];
|
|
1165
1056
|
}
|
|
1166
|
-
const transformDocumentIntoMutationRequestPayload = (
|
|
1167
|
-
const _a =
|
|
1057
|
+
const transformDocumentIntoMutationRequestPayload = (document, instructions) => {
|
|
1058
|
+
const _a = document, { _collection, __typename, _template } = _a, rest = __objRest(_a, ["_collection", "__typename", "_template"]);
|
|
1168
1059
|
const params = transformParams(rest);
|
|
1169
1060
|
const paramsWithTemplate = instructions.includeTemplate ? { [_template]: params } : params;
|
|
1170
1061
|
return instructions.includeCollection ? { [_collection]: paramsWithTemplate } : paramsWithTemplate;
|
|
@@ -1381,16 +1272,1380 @@ const useDocumentCreatorPlugin = (args) => {
|
|
|
1381
1272
|
run();
|
|
1382
1273
|
}, [cms]);
|
|
1383
1274
|
React.useEffect(() => {
|
|
1384
|
-
if (plugin) {
|
|
1385
|
-
cms.plugins.add(plugin);
|
|
1275
|
+
if (plugin) {
|
|
1276
|
+
cms.plugins.add(plugin);
|
|
1277
|
+
}
|
|
1278
|
+
return () => {
|
|
1279
|
+
if (plugin) {
|
|
1280
|
+
cms.plugins.remove(plugin);
|
|
1281
|
+
}
|
|
1282
|
+
};
|
|
1283
|
+
}, [plugin]);
|
|
1284
|
+
};
|
|
1285
|
+
var styles = `/**
|
|
1286
|
+
Use a better box model (opinionated).
|
|
1287
|
+
*/
|
|
1288
|
+
|
|
1289
|
+
.tina-tailwind *,
|
|
1290
|
+
.tina-tailwind ::before,
|
|
1291
|
+
.tina-tailwind ::after {
|
|
1292
|
+
box-sizing: border-box;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
Use a more readable tab size (opinionated).
|
|
1297
|
+
*/
|
|
1298
|
+
|
|
1299
|
+
.tina-tailwind html {
|
|
1300
|
+
-moz-tab-size: 4;
|
|
1301
|
+
tab-size: 4;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
/**
|
|
1305
|
+
1. Correct the line height in all browsers.
|
|
1306
|
+
2. Prevent adjustments of font size after orientation changes in iOS.
|
|
1307
|
+
*/
|
|
1308
|
+
|
|
1309
|
+
.tina-tailwind html {
|
|
1310
|
+
line-height: 1.15; /* 1 */
|
|
1311
|
+
-webkit-text-size-adjust: 100%; /* 2 */
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
/**
|
|
1315
|
+
Remove the margin in all browsers.
|
|
1316
|
+
*/
|
|
1317
|
+
|
|
1318
|
+
.tina-tailwind body {
|
|
1319
|
+
margin: 0;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
/**
|
|
1323
|
+
Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
|
|
1324
|
+
*/
|
|
1325
|
+
|
|
1326
|
+
.tina-tailwind body {
|
|
1327
|
+
font-family:
|
|
1328
|
+
system-ui,
|
|
1329
|
+
-apple-system, /* Firefox supports this but not yet \`system-ui\` */
|
|
1330
|
+
'Segoe UI',
|
|
1331
|
+
Roboto,
|
|
1332
|
+
Helvetica,
|
|
1333
|
+
Arial,
|
|
1334
|
+
sans-serif,
|
|
1335
|
+
'Apple Color Emoji',
|
|
1336
|
+
'Segoe UI Emoji';
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
/**
|
|
1340
|
+
1. Add the correct height in Firefox.
|
|
1341
|
+
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
|
|
1342
|
+
*/
|
|
1343
|
+
|
|
1344
|
+
.tina-tailwind hr {
|
|
1345
|
+
height: 0; /* 1 */
|
|
1346
|
+
color: inherit; /* 2 */
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
/**
|
|
1350
|
+
Add the correct text decoration in Chrome, Edge, and Safari.
|
|
1351
|
+
*/
|
|
1352
|
+
|
|
1353
|
+
.tina-tailwind abbr[title] {
|
|
1354
|
+
text-decoration: underline dotted;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
Add the correct font weight in Edge and Safari.
|
|
1359
|
+
*/
|
|
1360
|
+
|
|
1361
|
+
.tina-tailwind b,
|
|
1362
|
+
.tina-tailwind strong {
|
|
1363
|
+
font-weight: bolder;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
|
|
1368
|
+
2. Correct the odd 'em' font sizing in all browsers.
|
|
1369
|
+
*/
|
|
1370
|
+
|
|
1371
|
+
.tina-tailwind code,
|
|
1372
|
+
.tina-tailwind kbd,
|
|
1373
|
+
.tina-tailwind samp,
|
|
1374
|
+
.tina-tailwind pre {
|
|
1375
|
+
font-family:
|
|
1376
|
+
ui-monospace,
|
|
1377
|
+
SFMono-Regular,
|
|
1378
|
+
Consolas,
|
|
1379
|
+
'Liberation Mono',
|
|
1380
|
+
Menlo,
|
|
1381
|
+
monospace; /* 1 */
|
|
1382
|
+
font-size: 1em; /* 2 */
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
/**
|
|
1386
|
+
Add the correct font size in all browsers.
|
|
1387
|
+
*/
|
|
1388
|
+
|
|
1389
|
+
.tina-tailwind small {
|
|
1390
|
+
font-size: 80%;
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
/**
|
|
1394
|
+
Prevent 'sub' and 'sup' elements from affecting the line height in all browsers.
|
|
1395
|
+
*/
|
|
1396
|
+
|
|
1397
|
+
.tina-tailwind sub,
|
|
1398
|
+
.tina-tailwind sup {
|
|
1399
|
+
font-size: 75%;
|
|
1400
|
+
line-height: 0;
|
|
1401
|
+
position: relative;
|
|
1402
|
+
vertical-align: baseline;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
/*
|
|
1406
|
+
Text-level semantics
|
|
1407
|
+
====================
|
|
1408
|
+
*/
|
|
1409
|
+
|
|
1410
|
+
.tina-tailwind sub {
|
|
1411
|
+
bottom: -0.25em;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
/*
|
|
1415
|
+
Grouping content
|
|
1416
|
+
================
|
|
1417
|
+
*/
|
|
1418
|
+
|
|
1419
|
+
.tina-tailwind sup {
|
|
1420
|
+
top: -0.5em;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
/**
|
|
1424
|
+
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
|
|
1425
|
+
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
|
|
1426
|
+
*/
|
|
1427
|
+
|
|
1428
|
+
.tina-tailwind table {
|
|
1429
|
+
text-indent: 0; /* 1 */
|
|
1430
|
+
border-color: inherit; /* 2 */
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
/**
|
|
1434
|
+
1. Change the font styles in all browsers.
|
|
1435
|
+
2. Remove the margin in Firefox and Safari.
|
|
1436
|
+
*/
|
|
1437
|
+
|
|
1438
|
+
.tina-tailwind button,
|
|
1439
|
+
.tina-tailwind input,
|
|
1440
|
+
.tina-tailwind optgroup,
|
|
1441
|
+
.tina-tailwind select,
|
|
1442
|
+
.tina-tailwind textarea {
|
|
1443
|
+
font-family: inherit; /* 1 */
|
|
1444
|
+
font-size: 100%; /* 1 */
|
|
1445
|
+
line-height: 1.15; /* 1 */
|
|
1446
|
+
margin: 0; /* 2 */
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
/**
|
|
1450
|
+
Remove the inheritance of text transform in Edge and Firefox.
|
|
1451
|
+
1. Remove the inheritance of text transform in Firefox.
|
|
1452
|
+
*/
|
|
1453
|
+
|
|
1454
|
+
.tina-tailwind button,
|
|
1455
|
+
.tina-tailwind select { /* 1 */
|
|
1456
|
+
text-transform: none;
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
/**
|
|
1460
|
+
Correct the inability to style clickable types in iOS and Safari.
|
|
1461
|
+
*/
|
|
1462
|
+
|
|
1463
|
+
.tina-tailwind button,
|
|
1464
|
+
.tina-tailwind [type='button'],
|
|
1465
|
+
.tina-tailwind [type='reset'],
|
|
1466
|
+
.tina-tailwind [type='submit'] {
|
|
1467
|
+
-webkit-appearance: button;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
/**
|
|
1471
|
+
Remove the inner border and padding in Firefox.
|
|
1472
|
+
*/
|
|
1473
|
+
|
|
1474
|
+
.tina-tailwind ::-moz-focus-inner {
|
|
1475
|
+
border-style: none;
|
|
1476
|
+
padding: 0;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
/**
|
|
1480
|
+
Restore the focus styles unset by the previous rule.
|
|
1481
|
+
*/
|
|
1482
|
+
|
|
1483
|
+
.tina-tailwind :-moz-focusring {
|
|
1484
|
+
outline: 1px dotted ButtonText;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
/**
|
|
1488
|
+
Remove the additional ':invalid' styles in Firefox.
|
|
1489
|
+
See: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737
|
|
1490
|
+
*/
|
|
1491
|
+
|
|
1492
|
+
.tina-tailwind :-moz-ui-invalid {
|
|
1493
|
+
box-shadow: none;
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
/**
|
|
1497
|
+
Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.
|
|
1498
|
+
*/
|
|
1499
|
+
|
|
1500
|
+
.tina-tailwind legend {
|
|
1501
|
+
padding: 0;
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
/**
|
|
1505
|
+
Add the correct vertical alignment in Chrome and Firefox.
|
|
1506
|
+
*/
|
|
1507
|
+
|
|
1508
|
+
.tina-tailwind progress {
|
|
1509
|
+
vertical-align: baseline;
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
/**
|
|
1513
|
+
Correct the cursor style of increment and decrement buttons in Safari.
|
|
1514
|
+
*/
|
|
1515
|
+
|
|
1516
|
+
.tina-tailwind ::-webkit-inner-spin-button,
|
|
1517
|
+
.tina-tailwind ::-webkit-outer-spin-button {
|
|
1518
|
+
height: auto;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
/**
|
|
1522
|
+
1. Correct the odd appearance in Chrome and Safari.
|
|
1523
|
+
2. Correct the outline style in Safari.
|
|
1524
|
+
*/
|
|
1525
|
+
|
|
1526
|
+
.tina-tailwind [type='search'] {
|
|
1527
|
+
-webkit-appearance: textfield; /* 1 */
|
|
1528
|
+
outline-offset: -2px; /* 2 */
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
/**
|
|
1532
|
+
Remove the inner padding in Chrome and Safari on macOS.
|
|
1533
|
+
*/
|
|
1534
|
+
|
|
1535
|
+
.tina-tailwind ::-webkit-search-decoration {
|
|
1536
|
+
-webkit-appearance: none;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
/**
|
|
1540
|
+
1. Correct the inability to style clickable types in iOS and Safari.
|
|
1541
|
+
2. Change font properties to 'inherit' in Safari.
|
|
1542
|
+
*/
|
|
1543
|
+
|
|
1544
|
+
.tina-tailwind ::-webkit-file-upload-button {
|
|
1545
|
+
-webkit-appearance: button; /* 1 */
|
|
1546
|
+
font: inherit; /* 2 */
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
/*
|
|
1550
|
+
Add the correct display in Chrome and Safari.
|
|
1551
|
+
*/
|
|
1552
|
+
|
|
1553
|
+
.tina-tailwind summary {
|
|
1554
|
+
display: list-item;
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
/**
|
|
1558
|
+
* Removes the default spacing and border for appropriate elements.
|
|
1559
|
+
*/
|
|
1560
|
+
|
|
1561
|
+
.tina-tailwind blockquote,
|
|
1562
|
+
.tina-tailwind dl,
|
|
1563
|
+
.tina-tailwind dd,
|
|
1564
|
+
.tina-tailwind h1,
|
|
1565
|
+
.tina-tailwind h2,
|
|
1566
|
+
.tina-tailwind h3,
|
|
1567
|
+
.tina-tailwind h4,
|
|
1568
|
+
.tina-tailwind h5,
|
|
1569
|
+
.tina-tailwind h6,
|
|
1570
|
+
.tina-tailwind hr,
|
|
1571
|
+
.tina-tailwind figure,
|
|
1572
|
+
.tina-tailwind p,
|
|
1573
|
+
.tina-tailwind pre {
|
|
1574
|
+
margin: 0;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
/**
|
|
1578
|
+
* Manually forked from SUIT CSS Base: https://github.com/suitcss/base
|
|
1579
|
+
* A thin layer on top of normalize.css that provides a starting point more
|
|
1580
|
+
* suitable for web applications.
|
|
1581
|
+
*/
|
|
1582
|
+
|
|
1583
|
+
.tina-tailwind button {
|
|
1584
|
+
background-color: transparent;
|
|
1585
|
+
background-image: none;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
/*
|
|
1589
|
+
Interactive
|
|
1590
|
+
===========
|
|
1591
|
+
*/
|
|
1592
|
+
|
|
1593
|
+
.tina-tailwind fieldset {
|
|
1594
|
+
margin: 0;
|
|
1595
|
+
padding: 0;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
/*
|
|
1599
|
+
Forms
|
|
1600
|
+
=====
|
|
1601
|
+
*/
|
|
1602
|
+
|
|
1603
|
+
.tina-tailwind ol,
|
|
1604
|
+
.tina-tailwind ul {
|
|
1605
|
+
list-style: none;
|
|
1606
|
+
margin: 0;
|
|
1607
|
+
padding: 0;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
/**
|
|
1611
|
+
* 1. Use the user's configured \`sans\` font-family (with Tailwind's default
|
|
1612
|
+
* sans-serif font stack as a fallback) as a sane default.
|
|
1613
|
+
* 2. Use Tailwind's default "normal" line-height so the user isn't forced
|
|
1614
|
+
* to override it to ensure consistency even when using the default theme.
|
|
1615
|
+
*/
|
|
1616
|
+
|
|
1617
|
+
.tina-tailwind html {
|
|
1618
|
+
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 1 */
|
|
1619
|
+
line-height: 1.5; /* 2 */
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
/**
|
|
1623
|
+
* Inherit font-family and line-height from \`html\` so users can set them as
|
|
1624
|
+
* a class directly on the \`html\` element.
|
|
1625
|
+
*/
|
|
1626
|
+
|
|
1627
|
+
.tina-tailwind body {
|
|
1628
|
+
font-family: inherit;
|
|
1629
|
+
line-height: inherit;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
/**
|
|
1633
|
+
* 1. Prevent padding and border from affecting element width.
|
|
1634
|
+
*
|
|
1635
|
+
* We used to set this in the html element and inherit from
|
|
1636
|
+
* the parent element for everything else. This caused issues
|
|
1637
|
+
* in shadow-dom-enhanced elements like <details> where the content
|
|
1638
|
+
* is wrapped by a div with box-sizing set to \`content-box\`.
|
|
1639
|
+
*
|
|
1640
|
+
* https://github.com/mozdevs/cssremedy/issues/4
|
|
1641
|
+
*
|
|
1642
|
+
*
|
|
1643
|
+
* 2. Allow adding a border to an element by just adding a border-width.
|
|
1644
|
+
*
|
|
1645
|
+
* By default, the way the browser specifies that an element should have no
|
|
1646
|
+
* border is by setting it's border-style to \`none\` in the user-agent
|
|
1647
|
+
* stylesheet.
|
|
1648
|
+
*
|
|
1649
|
+
* In order to easily add borders to elements by just setting the \`border-width\`
|
|
1650
|
+
* property, we change the default border-style for all elements to \`solid\`, and
|
|
1651
|
+
* use border-width to hide them instead. This way our \`border\` utilities only
|
|
1652
|
+
* need to set the \`border-width\` property instead of the entire \`border\`
|
|
1653
|
+
* shorthand, making our border utilities much more straightforward to compose.
|
|
1654
|
+
*
|
|
1655
|
+
* https://github.com/tailwindcss/tailwindcss/pull/116
|
|
1656
|
+
*/
|
|
1657
|
+
|
|
1658
|
+
.tina-tailwind *,
|
|
1659
|
+
.tina-tailwind ::before,
|
|
1660
|
+
.tina-tailwind ::after {
|
|
1661
|
+
box-sizing: border-box; /* 1 */
|
|
1662
|
+
border-width: 0; /* 2 */
|
|
1663
|
+
border-style: solid; /* 2 */
|
|
1664
|
+
border-color: currentColor; /* 2 */
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
/*
|
|
1668
|
+
* Ensure horizontal rules are visible by default
|
|
1669
|
+
*/
|
|
1670
|
+
|
|
1671
|
+
.tina-tailwind hr {
|
|
1672
|
+
border-top-width: 1px;
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
/**
|
|
1676
|
+
* Undo the \`border-style: none\` reset that Normalize applies to images so that
|
|
1677
|
+
* our \`border-{width}\` utilities have the expected effect.
|
|
1678
|
+
*
|
|
1679
|
+
* The Normalize reset is unnecessary for us since we default the border-width
|
|
1680
|
+
* to 0 on all elements.
|
|
1681
|
+
*
|
|
1682
|
+
* https://github.com/tailwindcss/tailwindcss/issues/362
|
|
1683
|
+
*/
|
|
1684
|
+
|
|
1685
|
+
.tina-tailwind img {
|
|
1686
|
+
border-style: solid;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
/**
|
|
1690
|
+
* Tailwind custom reset styles
|
|
1691
|
+
*/
|
|
1692
|
+
|
|
1693
|
+
.tina-tailwind textarea {
|
|
1694
|
+
resize: vertical;
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
/*
|
|
1698
|
+
Tabular data
|
|
1699
|
+
============
|
|
1700
|
+
*/
|
|
1701
|
+
|
|
1702
|
+
.tina-tailwind input::placeholder,
|
|
1703
|
+
.tina-tailwind textarea::placeholder {
|
|
1704
|
+
opacity: 1;
|
|
1705
|
+
color: #918c9e;
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
/*
|
|
1709
|
+
Sections
|
|
1710
|
+
========
|
|
1711
|
+
*/
|
|
1712
|
+
|
|
1713
|
+
.tina-tailwind button,
|
|
1714
|
+
.tina-tailwind [role="button"] {
|
|
1715
|
+
cursor: pointer;
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
/**
|
|
1719
|
+
* Override legacy focus reset from Normalize with modern Firefox focus styles.
|
|
1720
|
+
*
|
|
1721
|
+
* This is actually an improvement over the new defaults in Firefox in our testing,
|
|
1722
|
+
* as it triggers the better focus styles even for links, which still use a dotted
|
|
1723
|
+
* outline in Firefox by default.
|
|
1724
|
+
*/
|
|
1725
|
+
|
|
1726
|
+
.tina-tailwind :-moz-focusring {
|
|
1727
|
+
outline: auto;
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
/*
|
|
1731
|
+
Document
|
|
1732
|
+
========
|
|
1733
|
+
*/
|
|
1734
|
+
|
|
1735
|
+
.tina-tailwind table {
|
|
1736
|
+
border-collapse: collapse;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
|
|
1740
|
+
|
|
1741
|
+
.tina-tailwind h1,
|
|
1742
|
+
.tina-tailwind h2,
|
|
1743
|
+
.tina-tailwind h3,
|
|
1744
|
+
.tina-tailwind h4,
|
|
1745
|
+
.tina-tailwind h5,
|
|
1746
|
+
.tina-tailwind h6 {
|
|
1747
|
+
font-size: inherit;
|
|
1748
|
+
font-weight: inherit;
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
/**
|
|
1752
|
+
* Reset links to optimize for opt-in styling instead of
|
|
1753
|
+
* opt-out.
|
|
1754
|
+
*/
|
|
1755
|
+
|
|
1756
|
+
.tina-tailwind a {
|
|
1757
|
+
color: inherit;
|
|
1758
|
+
text-decoration: inherit;
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
/**
|
|
1762
|
+
* Reset form element properties that are easy to forget to
|
|
1763
|
+
* style explicitly so you don't inadvertently introduce
|
|
1764
|
+
* styles that deviate from your design system. These styles
|
|
1765
|
+
* supplement a partial reset that is already applied by
|
|
1766
|
+
* normalize.css.
|
|
1767
|
+
*/
|
|
1768
|
+
|
|
1769
|
+
.tina-tailwind button,
|
|
1770
|
+
.tina-tailwind input,
|
|
1771
|
+
.tina-tailwind optgroup,
|
|
1772
|
+
.tina-tailwind select,
|
|
1773
|
+
.tina-tailwind textarea {
|
|
1774
|
+
padding: 0;
|
|
1775
|
+
line-height: inherit;
|
|
1776
|
+
color: inherit;
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
/**
|
|
1780
|
+
* Use the configured 'mono' font family for elements that
|
|
1781
|
+
* are expected to be rendered with a monospace font, falling
|
|
1782
|
+
* back to the system monospace stack if there is no configured
|
|
1783
|
+
* 'mono' font family.
|
|
1784
|
+
*/
|
|
1785
|
+
|
|
1786
|
+
.tina-tailwind pre,
|
|
1787
|
+
.tina-tailwind code,
|
|
1788
|
+
.tina-tailwind kbd,
|
|
1789
|
+
.tina-tailwind samp {
|
|
1790
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
/**
|
|
1794
|
+
* 1. Make replaced elements \`display: block\` by default as that's
|
|
1795
|
+
* the behavior you want almost all of the time. Inspired by
|
|
1796
|
+
* CSS Remedy, with \`svg\` added as well.
|
|
1797
|
+
*
|
|
1798
|
+
* https://github.com/mozdevs/cssremedy/issues/14
|
|
1799
|
+
*
|
|
1800
|
+
* 2. Add \`vertical-align: middle\` to align replaced elements more
|
|
1801
|
+
* sensibly by default when overriding \`display\` by adding a
|
|
1802
|
+
* utility like \`inline\`.
|
|
1803
|
+
*
|
|
1804
|
+
* This can trigger a poorly considered linting error in some
|
|
1805
|
+
* tools but is included by design.
|
|
1806
|
+
*
|
|
1807
|
+
* https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210
|
|
1808
|
+
*/
|
|
1809
|
+
|
|
1810
|
+
.tina-tailwind img,
|
|
1811
|
+
.tina-tailwind svg,
|
|
1812
|
+
.tina-tailwind video,
|
|
1813
|
+
.tina-tailwind canvas,
|
|
1814
|
+
.tina-tailwind audio,
|
|
1815
|
+
.tina-tailwind iframe,
|
|
1816
|
+
.tina-tailwind embed,
|
|
1817
|
+
.tina-tailwind object {
|
|
1818
|
+
display: block; /* 1 */
|
|
1819
|
+
vertical-align: middle; /* 2 */
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
/**
|
|
1823
|
+
* Constrain images and videos to the parent width and preserve
|
|
1824
|
+
* their intrinsic aspect ratio.
|
|
1825
|
+
*
|
|
1826
|
+
* https://github.com/mozdevs/cssremedy/issues/14
|
|
1827
|
+
*/
|
|
1828
|
+
|
|
1829
|
+
.tina-tailwind img,
|
|
1830
|
+
.tina-tailwind video {
|
|
1831
|
+
max-width: 100%;
|
|
1832
|
+
height: auto;
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
/**
|
|
1836
|
+
* Ensure the default browser behavior of the \`hidden\` attribute.
|
|
1837
|
+
*/
|
|
1838
|
+
|
|
1839
|
+
.tina-tailwind [hidden] {
|
|
1840
|
+
display: none;
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
/*! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com
|
|
1844
|
+
*/
|
|
1845
|
+
|
|
1846
|
+
.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
|
|
1847
|
+
--tw-translate-x: 0;
|
|
1848
|
+
--tw-translate-y: 0;
|
|
1849
|
+
--tw-rotate: 0;
|
|
1850
|
+
--tw-skew-x: 0;
|
|
1851
|
+
--tw-skew-y: 0;
|
|
1852
|
+
--tw-scale-x: 1;
|
|
1853
|
+
--tw-scale-y: 1;
|
|
1854
|
+
--tw-transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
|
|
1858
|
+
--tw-border-opacity: 1;
|
|
1859
|
+
border-color: rgba(225, 221, 236, var(--tw-border-opacity));
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
|
|
1863
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
1864
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
1865
|
+
--tw-shadow: 0 0 #0000;
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
|
|
1869
|
+
--tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
|
|
1870
|
+
--tw-ring-offset-width: 0px;
|
|
1871
|
+
--tw-ring-offset-color: #fff;
|
|
1872
|
+
--tw-ring-color: rgba(0, 132, 255, 0.5);
|
|
1873
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
1874
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
1875
|
+
--tw-shadow: 0 0 #0000;
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
|
|
1879
|
+
--tw-blur: var(--tw-empty,/*!*/ /*!*/);
|
|
1880
|
+
--tw-brightness: var(--tw-empty,/*!*/ /*!*/);
|
|
1881
|
+
--tw-contrast: var(--tw-empty,/*!*/ /*!*/);
|
|
1882
|
+
--tw-grayscale: var(--tw-empty,/*!*/ /*!*/);
|
|
1883
|
+
--tw-hue-rotate: var(--tw-empty,/*!*/ /*!*/);
|
|
1884
|
+
--tw-invert: var(--tw-empty,/*!*/ /*!*/);
|
|
1885
|
+
--tw-saturate: var(--tw-empty,/*!*/ /*!*/);
|
|
1886
|
+
--tw-sepia: var(--tw-empty,/*!*/ /*!*/);
|
|
1887
|
+
--tw-drop-shadow: var(--tw-empty,/*!*/ /*!*/);
|
|
1888
|
+
--tw-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
.tina-tailwind .static {
|
|
1892
|
+
position: static !important;
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
.tina-tailwind .fixed {
|
|
1896
|
+
position: fixed !important;
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
.tina-tailwind .absolute {
|
|
1900
|
+
position: absolute !important;
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
.tina-tailwind .relative {
|
|
1904
|
+
position: relative !important;
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
.tina-tailwind .bottom-3 {
|
|
1908
|
+
bottom: 12px !important;
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
.tina-tailwind .right-5 {
|
|
1912
|
+
right: 20px !important;
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
.tina-tailwind .right-0 {
|
|
1916
|
+
right: 0px !important;
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
.tina-tailwind .z-50 {
|
|
1920
|
+
z-index: 50 !important;
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
.tina-tailwind .-ml-1 {
|
|
1924
|
+
margin-left: -4px !important;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
.tina-tailwind .mr-1\\.5 {
|
|
1928
|
+
margin-right: 6px !important;
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
.tina-tailwind .mr-1 {
|
|
1932
|
+
margin-right: 4px !important;
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
.tina-tailwind .mb-3 {
|
|
1936
|
+
margin-bottom: 12px !important;
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
.tina-tailwind .mr-2 {
|
|
1940
|
+
margin-right: 8px !important;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
.tina-tailwind .ml-1 {
|
|
1944
|
+
margin-left: 4px !important;
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
.tina-tailwind .mt-2 {
|
|
1948
|
+
margin-top: 8px !important;
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
.tina-tailwind .mt-8 {
|
|
1952
|
+
margin-top: 32px !important;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
.tina-tailwind .mb-0\\.5 {
|
|
1956
|
+
margin-bottom: 2px !important;
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
.tina-tailwind .mb-0 {
|
|
1960
|
+
margin-bottom: 0px !important;
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
.tina-tailwind .block {
|
|
1964
|
+
display: block !important;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
.tina-tailwind .inline-block {
|
|
1968
|
+
display: inline-block !important;
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
.tina-tailwind .flex {
|
|
1972
|
+
display: flex !important;
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
.tina-tailwind .inline-flex {
|
|
1976
|
+
display: inline-flex !important;
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
.tina-tailwind .table {
|
|
1980
|
+
display: table !important;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
.tina-tailwind .h-screen {
|
|
1984
|
+
height: 100vh !important;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
.tina-tailwind .h-auto {
|
|
1988
|
+
height: auto !important;
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
.tina-tailwind .h-6 {
|
|
1992
|
+
height: 24px !important;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
.tina-tailwind .h-5 {
|
|
1996
|
+
height: 20px !important;
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
.tina-tailwind .w-full {
|
|
2000
|
+
width: 100% !important;
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
.tina-tailwind .w-10 {
|
|
2004
|
+
width: 40px !important;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
.tina-tailwind .w-80 {
|
|
2008
|
+
width: 320px !important;
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
.tina-tailwind .w-2\\/3 {
|
|
2012
|
+
width: 66.666667% !important;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
.tina-tailwind .w-6 {
|
|
2016
|
+
width: 24px !important;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
.tina-tailwind .w-auto {
|
|
2020
|
+
width: auto !important;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
.tina-tailwind .w-56 {
|
|
2024
|
+
width: 224px !important;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
.tina-tailwind .min-w-full {
|
|
2028
|
+
min-width: 100% !important;
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
.tina-tailwind .max-w-lg {
|
|
2032
|
+
max-width: 32rem !important;
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
.tina-tailwind .max-w-screen-md {
|
|
2036
|
+
max-width: 768px !important;
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
.tina-tailwind .max-w-xs {
|
|
2040
|
+
max-width: 20rem !important;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
.tina-tailwind .flex-1 {
|
|
2044
|
+
flex: 1 1 0% !important;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
.tina-tailwind .flex-shrink-0 {
|
|
2048
|
+
flex-shrink: 0 !important;
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
.tina-tailwind .origin-top-right {
|
|
2052
|
+
transform-origin: top right !important;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
.tina-tailwind .translate-y-full {
|
|
2056
|
+
--tw-translate-y: 100% !important;
|
|
2057
|
+
transform: var(--tw-transform) !important;
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
.tina-tailwind .-translate-y-2 {
|
|
2061
|
+
--tw-translate-y: -8px !important;
|
|
2062
|
+
transform: var(--tw-transform) !important;
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
.tina-tailwind .translate-y-0 {
|
|
2066
|
+
--tw-translate-y: 0px !important;
|
|
2067
|
+
transform: var(--tw-transform) !important;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
.tina-tailwind .rotate-90 {
|
|
2071
|
+
--tw-rotate: 90deg !important;
|
|
2072
|
+
transform: var(--tw-transform) !important;
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2075
|
+
.tina-tailwind .rotate-0 {
|
|
2076
|
+
--tw-rotate: 0deg !important;
|
|
2077
|
+
transform: var(--tw-transform) !important;
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
.tina-tailwind .scale-95 {
|
|
2081
|
+
--tw-scale-x: .95 !important;
|
|
2082
|
+
--tw-scale-y: .95 !important;
|
|
2083
|
+
transform: var(--tw-transform) !important;
|
|
2084
|
+
}
|
|
2085
|
+
|
|
2086
|
+
.tina-tailwind .scale-100 {
|
|
2087
|
+
--tw-scale-x: 1 !important;
|
|
2088
|
+
--tw-scale-y: 1 !important;
|
|
2089
|
+
transform: var(--tw-transform) !important;
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
.tina-tailwind .transform {
|
|
2093
|
+
transform: var(--tw-transform) !important;
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
.tina-tailwind .flex-col {
|
|
2097
|
+
flex-direction: column !important;
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
.tina-tailwind .items-end {
|
|
2101
|
+
align-items: flex-end !important;
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
.tina-tailwind .items-center {
|
|
2105
|
+
align-items: center !important;
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
.tina-tailwind .items-stretch {
|
|
2109
|
+
align-items: stretch !important;
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
.tina-tailwind .justify-start {
|
|
2113
|
+
justify-content: flex-start !important;
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
.tina-tailwind .justify-end {
|
|
2117
|
+
justify-content: flex-end !important;
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
.tina-tailwind .justify-center {
|
|
2121
|
+
justify-content: center !important;
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
.tina-tailwind .justify-between {
|
|
2125
|
+
justify-content: space-between !important;
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
.tina-tailwind .gap-0\\.5 {
|
|
2129
|
+
gap: 2px !important;
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
.tina-tailwind .gap-0 {
|
|
2133
|
+
gap: 0px !important;
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
.tina-tailwind .gap-4 {
|
|
2137
|
+
gap: 16px !important;
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
.tina-tailwind .gap-1 {
|
|
2141
|
+
gap: 4px !important;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
.tina-tailwind .gap-3 {
|
|
2145
|
+
gap: 12px !important;
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
.tina-tailwind .gap-1\\.5 {
|
|
2149
|
+
gap: 6px !important;
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
.tina-tailwind .divide-y > :not([hidden]) ~ :not([hidden]) {
|
|
2153
|
+
--tw-divide-y-reverse: 0 !important;
|
|
2154
|
+
border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))) !important;
|
|
2155
|
+
border-bottom-width: calc(1px * var(--tw-divide-y-reverse)) !important;
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
.tina-tailwind .overflow-hidden {
|
|
2159
|
+
overflow: hidden !important;
|
|
2160
|
+
}
|
|
2161
|
+
|
|
2162
|
+
.tina-tailwind .overflow-y-auto {
|
|
2163
|
+
overflow-y: auto !important;
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
.tina-tailwind .overflow-ellipsis {
|
|
2167
|
+
text-overflow: ellipsis !important;
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
.tina-tailwind .whitespace-nowrap {
|
|
2171
|
+
white-space: nowrap !important;
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
.tina-tailwind .rounded-lg {
|
|
2175
|
+
border-radius: 8px !important;
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
.tina-tailwind .rounded-full {
|
|
2179
|
+
border-radius: 9999px !important;
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
.tina-tailwind .rounded-md {
|
|
2183
|
+
border-radius: 6px !important;
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
.tina-tailwind .border {
|
|
2187
|
+
border-width: 1px !important;
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
.tina-tailwind .border-b {
|
|
2191
|
+
border-bottom-width: 1px !important;
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
.tina-tailwind .border-r {
|
|
2195
|
+
border-right-width: 1px !important;
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2198
|
+
.tina-tailwind .border-gray-200 {
|
|
2199
|
+
--tw-border-opacity: 1 !important;
|
|
2200
|
+
border-color: rgba(225, 221, 236, var(--tw-border-opacity)) !important;
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2203
|
+
.tina-tailwind .border-transparent {
|
|
2204
|
+
border-color: transparent !important;
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
.tina-tailwind .bg-white {
|
|
2208
|
+
--tw-bg-opacity: 1 !important;
|
|
2209
|
+
background-color: rgba(255, 255, 255, var(--tw-bg-opacity)) !important;
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
.tina-tailwind .bg-gray-50 {
|
|
2213
|
+
--tw-bg-opacity: 1 !important;
|
|
2214
|
+
background-color: rgba(246, 246, 249, var(--tw-bg-opacity)) !important;
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
.tina-tailwind .bg-transparent {
|
|
2218
|
+
background-color: transparent !important;
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
.tina-tailwind .bg-gradient-to-b {
|
|
2222
|
+
background-image: linear-gradient(to bottom, var(--tw-gradient-stops)) !important;
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
.tina-tailwind .from-blue-900 {
|
|
2226
|
+
--tw-gradient-from: #1D2C6C !important;
|
|
2227
|
+
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(29, 44, 108, 0)) !important;
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
.tina-tailwind .from-white {
|
|
2231
|
+
--tw-gradient-from: #fff !important;
|
|
2232
|
+
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 255, 255, 0)) !important;
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
.tina-tailwind .to-gray-900 {
|
|
2236
|
+
--tw-gradient-to: #252336 !important;
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
.tina-tailwind .to-gray-50 {
|
|
2240
|
+
--tw-gradient-to: #F6F6F9 !important;
|
|
2241
|
+
}
|
|
2242
|
+
|
|
2243
|
+
.tina-tailwind .px-4 {
|
|
2244
|
+
padding-left: 16px !important;
|
|
2245
|
+
padding-right: 16px !important;
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
.tina-tailwind .py-6 {
|
|
2249
|
+
padding-top: 24px !important;
|
|
2250
|
+
padding-bottom: 24px !important;
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2253
|
+
.tina-tailwind .px-5 {
|
|
2254
|
+
padding-left: 20px !important;
|
|
2255
|
+
padding-right: 20px !important;
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
.tina-tailwind .py-4 {
|
|
2259
|
+
padding-top: 16px !important;
|
|
2260
|
+
padding-bottom: 16px !important;
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
.tina-tailwind .px-6 {
|
|
2264
|
+
padding-left: 24px !important;
|
|
2265
|
+
padding-right: 24px !important;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
.tina-tailwind .py-1 {
|
|
2269
|
+
padding-top: 4px !important;
|
|
2270
|
+
padding-bottom: 4px !important;
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
.tina-tailwind .py-2 {
|
|
2274
|
+
padding-top: 8px !important;
|
|
2275
|
+
padding-bottom: 8px !important;
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
.tina-tailwind .py-7 {
|
|
2279
|
+
padding-top: 28px !important;
|
|
2280
|
+
padding-bottom: 28px !important;
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2283
|
+
.tina-tailwind .px-8 {
|
|
2284
|
+
padding-left: 32px !important;
|
|
2285
|
+
padding-right: 32px !important;
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
.tina-tailwind .py-2\\.5 {
|
|
2289
|
+
padding-top: 10px !important;
|
|
2290
|
+
padding-bottom: 10px !important;
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
.tina-tailwind .py-14 {
|
|
2294
|
+
padding-top: 56px !important;
|
|
2295
|
+
padding-bottom: 56px !important;
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
.tina-tailwind .py-3 {
|
|
2299
|
+
padding-top: 12px !important;
|
|
2300
|
+
padding-bottom: 12px !important;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
.tina-tailwind .py-1\\.5 {
|
|
2304
|
+
padding-top: 6px !important;
|
|
2305
|
+
padding-bottom: 6px !important;
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
.tina-tailwind .py-10 {
|
|
2309
|
+
padding-top: 40px !important;
|
|
2310
|
+
padding-bottom: 40px !important;
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
.tina-tailwind .pt-16 {
|
|
2314
|
+
padding-top: 64px !important;
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2317
|
+
.tina-tailwind .pb-10 {
|
|
2318
|
+
padding-bottom: 40px !important;
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
.tina-tailwind .text-left {
|
|
2322
|
+
text-align: left !important;
|
|
2323
|
+
}
|
|
2324
|
+
|
|
2325
|
+
.tina-tailwind .text-center {
|
|
2326
|
+
text-align: center !important;
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
.tina-tailwind .font-sans {
|
|
2330
|
+
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
.tina-tailwind .text-2xl {
|
|
2334
|
+
font-size: 24px !important;
|
|
2335
|
+
line-height: 1.33 !important;
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
.tina-tailwind .text-base {
|
|
2339
|
+
font-size: 16px !important;
|
|
2340
|
+
line-height: 1.5 !important;
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
.tina-tailwind .text-lg {
|
|
2344
|
+
font-size: 18px !important;
|
|
2345
|
+
line-height: 1.55 !important;
|
|
2346
|
+
}
|
|
2347
|
+
|
|
2348
|
+
.tina-tailwind .text-sm {
|
|
2349
|
+
font-size: 14px !important;
|
|
2350
|
+
line-height: 1.43 !important;
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
.tina-tailwind .text-md {
|
|
2354
|
+
font-size: 16px !important;
|
|
2355
|
+
line-height: 1.5 !important;
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
.tina-tailwind .text-3xl {
|
|
2359
|
+
font-size: 30px !important;
|
|
2360
|
+
line-height: 1.2 !important;
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
.tina-tailwind .text-xs {
|
|
2364
|
+
font-size: 13px !important;
|
|
2365
|
+
line-height: 1.33 !important;
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
.tina-tailwind .text-4xl {
|
|
2369
|
+
font-size: 36px !important;
|
|
2370
|
+
line-height: 1.1 !important;
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
.tina-tailwind .font-bold {
|
|
2374
|
+
font-weight: 700 !important;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
.tina-tailwind .font-medium {
|
|
2378
|
+
font-weight: 500 !important;
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
.tina-tailwind .uppercase {
|
|
2382
|
+
text-transform: uppercase !important;
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
.tina-tailwind .italic {
|
|
2386
|
+
font-style: italic !important;
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
.tina-tailwind .leading-normal {
|
|
2390
|
+
line-height: 1.5 !important;
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
.tina-tailwind .leading-4 {
|
|
2394
|
+
line-height: 16px !important;
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2397
|
+
.tina-tailwind .leading-5 {
|
|
2398
|
+
line-height: 20px !important;
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2401
|
+
.tina-tailwind .tracking-wide {
|
|
2402
|
+
letter-spacing: 0.025em !important;
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
.tina-tailwind .text-gray-700 {
|
|
2406
|
+
--tw-text-opacity: 1 !important;
|
|
2407
|
+
color: rgba(67, 62, 82, var(--tw-text-opacity)) !important;
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
.tina-tailwind .text-gray-800 {
|
|
2411
|
+
--tw-text-opacity: 1 !important;
|
|
2412
|
+
color: rgba(54, 49, 69, var(--tw-text-opacity)) !important;
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
.tina-tailwind .text-gray-600 {
|
|
2416
|
+
--tw-text-opacity: 1 !important;
|
|
2417
|
+
color: rgba(86, 81, 101, var(--tw-text-opacity)) !important;
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
.tina-tailwind .text-blue-400 {
|
|
2421
|
+
--tw-text-opacity: 1 !important;
|
|
2422
|
+
color: rgba(34, 150, 254, var(--tw-text-opacity)) !important;
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2425
|
+
.tina-tailwind .text-blue-600 {
|
|
2426
|
+
--tw-text-opacity: 1 !important;
|
|
2427
|
+
color: rgba(5, 116, 228, var(--tw-text-opacity)) !important;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
.tina-tailwind .text-white {
|
|
2431
|
+
--tw-text-opacity: 1 !important;
|
|
2432
|
+
color: rgba(255, 255, 255, var(--tw-text-opacity)) !important;
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
.tina-tailwind .text-gray-400 {
|
|
2436
|
+
--tw-text-opacity: 1 !important;
|
|
2437
|
+
color: rgba(145, 140, 158, var(--tw-text-opacity)) !important;
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
.tina-tailwind .text-gray-300 {
|
|
2441
|
+
--tw-text-opacity: 1 !important;
|
|
2442
|
+
color: rgba(178, 173, 190, var(--tw-text-opacity)) !important;
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2445
|
+
.tina-tailwind .text-gray-500 {
|
|
2446
|
+
--tw-text-opacity: 1 !important;
|
|
2447
|
+
color: rgba(113, 108, 127, var(--tw-text-opacity)) !important;
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
.tina-tailwind .underline {
|
|
2451
|
+
text-decoration: underline !important;
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2454
|
+
.tina-tailwind .opacity-80 {
|
|
2455
|
+
opacity: .8 !important;
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2458
|
+
.tina-tailwind .opacity-50 {
|
|
2459
|
+
opacity: .5 !important;
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
.tina-tailwind .opacity-100 {
|
|
2463
|
+
opacity: 1 !important;
|
|
2464
|
+
}
|
|
2465
|
+
|
|
2466
|
+
.tina-tailwind .opacity-0 {
|
|
2467
|
+
opacity: 0 !important;
|
|
2468
|
+
}
|
|
2469
|
+
|
|
2470
|
+
.tina-tailwind .opacity-90 {
|
|
2471
|
+
opacity: .9 !important;
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
.tina-tailwind .opacity-70 {
|
|
2475
|
+
opacity: .7 !important;
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
.tina-tailwind .shadow-lg {
|
|
2479
|
+
--tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
|
|
2480
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
.tina-tailwind .shadow-sm {
|
|
2484
|
+
--tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
|
|
2485
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
|
|
2486
|
+
}
|
|
2487
|
+
|
|
2488
|
+
.tina-tailwind .shadow {
|
|
2489
|
+
--tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
|
|
2490
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
.tina-tailwind .ring-1 {
|
|
2494
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;
|
|
2495
|
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;
|
|
2496
|
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000) !important;
|
|
2497
|
+
}
|
|
2498
|
+
|
|
2499
|
+
.tina-tailwind .ring-black {
|
|
2500
|
+
--tw-ring-opacity: 1 !important;
|
|
2501
|
+
--tw-ring-color: rgba(0, 0, 0, var(--tw-ring-opacity)) !important;
|
|
2502
|
+
}
|
|
2503
|
+
|
|
2504
|
+
.tina-tailwind .ring-opacity-5 {
|
|
2505
|
+
--tw-ring-opacity: .05 !important;
|
|
2506
|
+
}
|
|
2507
|
+
|
|
2508
|
+
.tina-tailwind .filter {
|
|
2509
|
+
filter: var(--tw-filter) !important;
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
.tina-tailwind .transition-colors {
|
|
2513
|
+
transition-property: background-color, border-color, color, fill, stroke !important;
|
|
2514
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
|
|
2515
|
+
transition-duration: 150ms !important;
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
.tina-tailwind .transition-opacity {
|
|
2519
|
+
transition-property: opacity !important;
|
|
2520
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
|
|
2521
|
+
transition-duration: 150ms !important;
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
.tina-tailwind .transition-all {
|
|
2525
|
+
transition-property: all !important;
|
|
2526
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
|
|
2527
|
+
transition-duration: 150ms !important;
|
|
2528
|
+
}
|
|
2529
|
+
|
|
2530
|
+
.tina-tailwind .transition {
|
|
2531
|
+
transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter !important;
|
|
2532
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
|
|
2533
|
+
transition-duration: 150ms !important;
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
.tina-tailwind .duration-150 {
|
|
2537
|
+
transition-duration: 150ms !important;
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2540
|
+
.tina-tailwind .duration-300 {
|
|
2541
|
+
transition-duration: 300ms !important;
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
.tina-tailwind .duration-75 {
|
|
2545
|
+
transition-duration: 75ms !important;
|
|
2546
|
+
}
|
|
2547
|
+
|
|
2548
|
+
.tina-tailwind .duration-100 {
|
|
2549
|
+
transition-duration: 100ms !important;
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
.tina-tailwind .ease-out {
|
|
2553
|
+
transition-timing-function: cubic-bezier(0, 0, 0.2, 1) !important;
|
|
2554
|
+
}
|
|
2555
|
+
|
|
2556
|
+
.tina-tailwind .ease-in-out {
|
|
2557
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2560
|
+
.tina-tailwind .ease-in {
|
|
2561
|
+
transition-timing-function: cubic-bezier(0.4, 0, 1, 1) !important;
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
.tina-tailwind {
|
|
2565
|
+
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
2566
|
+
--tw-text-opacity: 1;
|
|
2567
|
+
color: rgba(86, 81, 101, var(--tw-text-opacity));
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
.hover\\:bg-gray-50:hover {
|
|
2571
|
+
--tw-bg-opacity: 1 !important;
|
|
2572
|
+
background-color: rgba(246, 246, 249, var(--tw-bg-opacity)) !important;
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
.hover\\:text-blue-600:hover {
|
|
2576
|
+
--tw-text-opacity: 1 !important;
|
|
2577
|
+
color: rgba(5, 116, 228, var(--tw-text-opacity)) !important;
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
.hover\\:text-blue-500:hover {
|
|
2581
|
+
--tw-text-opacity: 1 !important;
|
|
2582
|
+
color: rgba(0, 132, 255, var(--tw-text-opacity)) !important;
|
|
2583
|
+
}
|
|
2584
|
+
|
|
2585
|
+
.hover\\:opacity-100:hover {
|
|
2586
|
+
opacity: 1 !important;
|
|
2587
|
+
}
|
|
2588
|
+
|
|
2589
|
+
.hover\\:opacity-80:hover {
|
|
2590
|
+
opacity: .8 !important;
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2593
|
+
.focus\\:outline-none:focus {
|
|
2594
|
+
outline: 2px solid transparent !important;
|
|
2595
|
+
outline-offset: 2px !important;
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2598
|
+
.group:hover .group-hover\\:opacity-100 {
|
|
2599
|
+
opacity: 1 !important;
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2602
|
+
.group:hover .group-hover\\:opacity-80 {
|
|
2603
|
+
opacity: .8 !important;
|
|
2604
|
+
}
|
|
2605
|
+
|
|
2606
|
+
@media (min-width: 640px) {
|
|
2607
|
+
|
|
2608
|
+
.sm\\:rounded-lg {
|
|
2609
|
+
border-radius: 8px !important;
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
@media (min-width: 1024px) {
|
|
2614
|
+
|
|
2615
|
+
.lg\\:w-96 {
|
|
2616
|
+
width: 384px !important;
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
`;
|
|
2620
|
+
function useTina({
|
|
2621
|
+
query,
|
|
2622
|
+
variables,
|
|
2623
|
+
data
|
|
2624
|
+
}) {
|
|
2625
|
+
const {
|
|
2626
|
+
setRequest,
|
|
2627
|
+
state,
|
|
2628
|
+
isDummyContainer,
|
|
2629
|
+
isLoading: contextLoading
|
|
2630
|
+
} = React.useContext(TinaDataContext);
|
|
2631
|
+
const [waitForContextRerender, setWaitForContextRerender] = useState(!isDummyContainer);
|
|
2632
|
+
const isLoading = contextLoading || waitForContextRerender;
|
|
2633
|
+
React.useEffect(() => {
|
|
2634
|
+
setRequest({ query, variables });
|
|
2635
|
+
}, [JSON.stringify(variables), query]);
|
|
2636
|
+
useEffect(() => {
|
|
2637
|
+
if (!isDummyContainer) {
|
|
2638
|
+
setTimeout(() => setWaitForContextRerender(false), 0);
|
|
1386
2639
|
}
|
|
1387
2640
|
return () => {
|
|
1388
|
-
|
|
1389
|
-
cms.plugins.remove(plugin);
|
|
1390
|
-
}
|
|
2641
|
+
setRequest(void 0);
|
|
1391
2642
|
};
|
|
1392
|
-
}, [
|
|
1393
|
-
|
|
2643
|
+
}, [isDummyContainer]);
|
|
2644
|
+
return {
|
|
2645
|
+
data: isDummyContainer || isLoading ? data : state.payload,
|
|
2646
|
+
isLoading
|
|
2647
|
+
};
|
|
2648
|
+
}
|
|
1394
2649
|
const errorButtonStyles = {
|
|
1395
2650
|
background: "#eb6337",
|
|
1396
2651
|
padding: "12px 18px",
|
|
@@ -1403,22 +2658,6 @@ const errorButtonStyles = {
|
|
|
1403
2658
|
color: "white",
|
|
1404
2659
|
margin: "1rem 0"
|
|
1405
2660
|
};
|
|
1406
|
-
const SetupHooks = (props) => {
|
|
1407
|
-
const cms = useCMS();
|
|
1408
|
-
const [payload, isLoading] = useGraphqlForms({
|
|
1409
|
-
query: (gql2) => gql2(props.query),
|
|
1410
|
-
variables: props.variables || {},
|
|
1411
|
-
formify: (args) => {
|
|
1412
|
-
if (props.formifyCallback) {
|
|
1413
|
-
return props.formifyCallback(args, cms);
|
|
1414
|
-
} else {
|
|
1415
|
-
return args.createForm(args.formConfig);
|
|
1416
|
-
}
|
|
1417
|
-
}
|
|
1418
|
-
});
|
|
1419
|
-
useDocumentCreatorPlugin(props.documentCreatorCallback);
|
|
1420
|
-
return /* @__PURE__ */ React.createElement(ErrorBoundary, null, isLoading ? /* @__PURE__ */ React.createElement(Loader, null, props.children(props)) : props.children(__spreadProps(__spreadValues({}, props), { data: payload })));
|
|
1421
|
-
};
|
|
1422
2661
|
class ErrorBoundary extends React.Component {
|
|
1423
2662
|
constructor(props) {
|
|
1424
2663
|
super(props);
|
|
@@ -1493,20 +2732,16 @@ const parseURL = (url) => {
|
|
|
1493
2732
|
};
|
|
1494
2733
|
const TinaCMSProvider2 = (_c) => {
|
|
1495
2734
|
var _d = _c, {
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
tinaioConfig
|
|
2735
|
+
query,
|
|
2736
|
+
documentCreatorCallback,
|
|
2737
|
+
formifyCallback
|
|
1500
2738
|
} = _d, props = __objRest(_d, [
|
|
1501
|
-
"
|
|
1502
|
-
"
|
|
1503
|
-
"
|
|
1504
|
-
"tinaioConfig"
|
|
2739
|
+
"query",
|
|
2740
|
+
"documentCreatorCallback",
|
|
2741
|
+
"formifyCallback"
|
|
1505
2742
|
]);
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
}
|
|
1509
|
-
if (!props.apiURL && !((props == null ? void 0 : props.clientId) || (props == null ? void 0 : props.isLocalClient))) {
|
|
2743
|
+
const validOldSetup = new Boolean(props == null ? void 0 : props.isLocalClient) || new Boolean(props == null ? void 0 : props.clientId) && new Boolean(props == null ? void 0 : props.branch);
|
|
2744
|
+
if (!props.apiURL && !validOldSetup) {
|
|
1510
2745
|
throw new Error(`apiURL is a required field`);
|
|
1511
2746
|
}
|
|
1512
2747
|
const { branch, clientId, isLocalClient } = props.apiURL ? parseURL(props.apiURL) : {
|
|
@@ -1514,18 +2749,86 @@ const TinaCMSProvider2 = (_c) => {
|
|
|
1514
2749
|
clientId: props.clientId,
|
|
1515
2750
|
isLocalClient: props.isLocalClient
|
|
1516
2751
|
};
|
|
1517
|
-
return /* @__PURE__ */ React.createElement(TinaCloudProvider, {
|
|
2752
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(TinaCloudProvider, {
|
|
1518
2753
|
branch,
|
|
1519
2754
|
clientId,
|
|
1520
|
-
tinaioConfig,
|
|
2755
|
+
tinaioConfig: props.tinaioConfig,
|
|
1521
2756
|
isLocalClient,
|
|
1522
|
-
cmsCallback,
|
|
1523
|
-
mediaStore
|
|
1524
|
-
},
|
|
1525
|
-
|
|
1526
|
-
}, props), {
|
|
1527
|
-
|
|
1528
|
-
|
|
2757
|
+
cmsCallback: props.cmsCallback,
|
|
2758
|
+
mediaStore: props.mediaStore
|
|
2759
|
+
}, /* @__PURE__ */ React.createElement("style", null, styles), /* @__PURE__ */ React.createElement(ErrorBoundary, null, /* @__PURE__ */ React.createElement(DocumentCreator, null), /* @__PURE__ */ React.createElement(TinaDataProvider, {
|
|
2760
|
+
formifyCallback
|
|
2761
|
+
}, typeof props.children == "function" ? /* @__PURE__ */ React.createElement(TinaQuery, __spreadProps(__spreadValues({}, props), {
|
|
2762
|
+
variables: props.variables,
|
|
2763
|
+
data: props.data,
|
|
2764
|
+
query,
|
|
2765
|
+
formifyCallback,
|
|
2766
|
+
children: props.children
|
|
2767
|
+
})) : props.children))));
|
|
2768
|
+
};
|
|
2769
|
+
const DocumentCreator = ({
|
|
2770
|
+
documentCreatorCallback
|
|
2771
|
+
}) => {
|
|
2772
|
+
useDocumentCreatorPlugin(documentCreatorCallback);
|
|
2773
|
+
return null;
|
|
2774
|
+
};
|
|
2775
|
+
const TinaQuery = (props) => {
|
|
2776
|
+
return /* @__PURE__ */ React.createElement(TinaQueryInner, __spreadValues({
|
|
2777
|
+
key: `rootQuery-${props.query}`
|
|
2778
|
+
}, props));
|
|
2779
|
+
};
|
|
2780
|
+
const TinaQueryInner = (_e) => {
|
|
2781
|
+
var _f = _e, { children } = _f, props = __objRest(_f, ["children"]);
|
|
2782
|
+
const { data: liveData, isLoading } = useTina({
|
|
2783
|
+
query: props.query,
|
|
2784
|
+
variables: props.variables,
|
|
2785
|
+
data: props.data
|
|
2786
|
+
});
|
|
2787
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, children(isLoading ? props : __spreadProps(__spreadValues({}, props), { data: liveData })));
|
|
2788
|
+
};
|
|
2789
|
+
const TinaDataProvider = ({
|
|
2790
|
+
children,
|
|
2791
|
+
formifyCallback
|
|
2792
|
+
}) => {
|
|
2793
|
+
const [request, setRequest] = useState();
|
|
2794
|
+
const [state, setState] = React.useState({
|
|
2795
|
+
payload: void 0,
|
|
2796
|
+
isLoading: true
|
|
2797
|
+
});
|
|
2798
|
+
return /* @__PURE__ */ React.createElement(TinaDataContext.Provider, {
|
|
2799
|
+
value: {
|
|
2800
|
+
setRequest,
|
|
2801
|
+
isLoading: state.isLoading,
|
|
2802
|
+
state: { payload: state.payload }
|
|
2803
|
+
}
|
|
2804
|
+
}, /* @__PURE__ */ React.createElement(FormRegistrar, {
|
|
2805
|
+
key: request == null ? void 0 : request.query,
|
|
2806
|
+
request,
|
|
2807
|
+
formifyCallback,
|
|
2808
|
+
onPayloadStateChange: setState
|
|
2809
|
+
}), children);
|
|
2810
|
+
};
|
|
2811
|
+
const FormRegistrar = ({
|
|
2812
|
+
request,
|
|
2813
|
+
formifyCallback,
|
|
2814
|
+
onPayloadStateChange
|
|
2815
|
+
}) => {
|
|
2816
|
+
const cms = useCMS();
|
|
2817
|
+
const [payload, isLoading] = useGraphqlForms({
|
|
2818
|
+
query: request == null ? void 0 : request.query,
|
|
2819
|
+
variables: request == null ? void 0 : request.variables,
|
|
2820
|
+
formify: (args) => {
|
|
2821
|
+
if (formifyCallback) {
|
|
2822
|
+
return formifyCallback(args, cms);
|
|
2823
|
+
} else {
|
|
2824
|
+
return args.createForm(args.formConfig);
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2827
|
+
});
|
|
2828
|
+
React.useEffect(() => {
|
|
2829
|
+
onPayloadStateChange({ payload, isLoading });
|
|
2830
|
+
}, [JSON.stringify(payload)]);
|
|
2831
|
+
return isLoading ? /* @__PURE__ */ React.createElement(Loader, null, /* @__PURE__ */ React.createElement(React.Fragment, null)) : null;
|
|
1529
2832
|
};
|
|
1530
2833
|
const Loader = (props) => {
|
|
1531
2834
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -1671,7 +2974,8 @@ function gql(strings, ...args) {
|
|
|
1671
2974
|
return str;
|
|
1672
2975
|
}
|
|
1673
2976
|
const Layout = ({ children }) => {
|
|
1674
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
2977
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("style", null, styles), /* @__PURE__ */ React.createElement("div", {
|
|
2978
|
+
className: "tina-tailwind",
|
|
1675
2979
|
style: {
|
|
1676
2980
|
position: "fixed",
|
|
1677
2981
|
top: 0,
|
|
@@ -1680,21 +2984,196 @@ const Layout = ({ children }) => {
|
|
|
1680
2984
|
height: "100%",
|
|
1681
2985
|
overflow: "auto",
|
|
1682
2986
|
background: "#F6F6F9",
|
|
2987
|
+
fontFamily: "'Inter', sans-serif",
|
|
1683
2988
|
zIndex: 9999
|
|
1684
2989
|
}
|
|
1685
|
-
}, children);
|
|
2990
|
+
}, children));
|
|
2991
|
+
};
|
|
2992
|
+
var DefaultContext = {
|
|
2993
|
+
color: void 0,
|
|
2994
|
+
size: void 0,
|
|
2995
|
+
className: void 0,
|
|
2996
|
+
style: void 0,
|
|
2997
|
+
attr: void 0
|
|
2998
|
+
};
|
|
2999
|
+
var IconContext = React.createContext && React.createContext(DefaultContext);
|
|
3000
|
+
var __assign = function() {
|
|
3001
|
+
__assign = Object.assign || function(t) {
|
|
3002
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3003
|
+
s = arguments[i];
|
|
3004
|
+
for (var p in s)
|
|
3005
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
3006
|
+
t[p] = s[p];
|
|
3007
|
+
}
|
|
3008
|
+
return t;
|
|
3009
|
+
};
|
|
3010
|
+
return __assign.apply(this, arguments);
|
|
3011
|
+
};
|
|
3012
|
+
var __rest = function(s, e) {
|
|
3013
|
+
var t = {};
|
|
3014
|
+
for (var p in s)
|
|
3015
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3016
|
+
t[p] = s[p];
|
|
3017
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
3018
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
3019
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
3020
|
+
t[p[i]] = s[p[i]];
|
|
3021
|
+
}
|
|
3022
|
+
return t;
|
|
1686
3023
|
};
|
|
3024
|
+
function Tree2Element(tree) {
|
|
3025
|
+
return tree && tree.map(function(node, i) {
|
|
3026
|
+
return React.createElement(node.tag, __assign({
|
|
3027
|
+
key: i
|
|
3028
|
+
}, node.attr), Tree2Element(node.child));
|
|
3029
|
+
});
|
|
3030
|
+
}
|
|
3031
|
+
function GenIcon(data) {
|
|
3032
|
+
return function(props) {
|
|
3033
|
+
return React.createElement(IconBase, __assign({
|
|
3034
|
+
attr: __assign({}, data.attr)
|
|
3035
|
+
}, props), Tree2Element(data.child));
|
|
3036
|
+
};
|
|
3037
|
+
}
|
|
3038
|
+
function IconBase(props) {
|
|
3039
|
+
var elem = function(conf) {
|
|
3040
|
+
var attr = props.attr, size = props.size, title = props.title, svgProps = __rest(props, ["attr", "size", "title"]);
|
|
3041
|
+
var computedSize = size || conf.size || "1em";
|
|
3042
|
+
var className;
|
|
3043
|
+
if (conf.className)
|
|
3044
|
+
className = conf.className;
|
|
3045
|
+
if (props.className)
|
|
3046
|
+
className = (className ? className + " " : "") + props.className;
|
|
3047
|
+
return React.createElement("svg", __assign({
|
|
3048
|
+
stroke: "currentColor",
|
|
3049
|
+
fill: "currentColor",
|
|
3050
|
+
strokeWidth: "0"
|
|
3051
|
+
}, conf.attr, attr, svgProps, {
|
|
3052
|
+
className,
|
|
3053
|
+
style: __assign(__assign({
|
|
3054
|
+
color: props.color || conf.color
|
|
3055
|
+
}, conf.style), props.style),
|
|
3056
|
+
height: computedSize,
|
|
3057
|
+
width: computedSize,
|
|
3058
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
3059
|
+
}), title && React.createElement("title", null, title), props.children);
|
|
3060
|
+
};
|
|
3061
|
+
return IconContext !== void 0 ? React.createElement(IconContext.Consumer, null, function(conf) {
|
|
3062
|
+
return elem(conf);
|
|
3063
|
+
}) : elem(DefaultContext);
|
|
3064
|
+
}
|
|
3065
|
+
function BiEdit(props) {
|
|
3066
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m7 17.013 4.413-.015 9.632-9.54c.378-.378.586-.88.586-1.414s-.208-1.036-.586-1.414l-1.586-1.586c-.756-.756-2.075-.752-2.825-.003L7 12.583v4.43zM18.045 4.458l1.589 1.583-1.597 1.582-1.586-1.585 1.594-1.58zM9 13.417l6.03-5.973 1.586 1.586-6.029 5.971L9 15.006v-1.589z" } }, { "tag": "path", "attr": { "d": "M5 21h14c1.103 0 2-.897 2-2v-8.668l-2 2V19H8.158c-.026 0-.053.01-.079.01-.033 0-.066-.009-.1-.01H5V5h6.847l2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2z" } }] })(props);
|
|
3067
|
+
}
|
|
3068
|
+
function BiExit(props) {
|
|
3069
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M19.002 3h-14c-1.103 0-2 .897-2 2v4h2V5h14v14h-14v-4h-2v4c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.898-2-2-2z" } }, { "tag": "path", "attr": { "d": "m11 16 5-4-5-4v3.001H3v2h8z" } }] })(props);
|
|
3070
|
+
}
|
|
3071
|
+
function BiLinkExternal(props) {
|
|
3072
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m13 3 3.293 3.293-7 7 1.414 1.414 7-7L21 11V3z" } }, { "tag": "path", "attr": { "d": "M19 19H5V5h7l-2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-5l-2-2v7z" } }] })(props);
|
|
3073
|
+
}
|
|
3074
|
+
function BiLogIn(props) {
|
|
3075
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m13 16 5-4-5-4v3H4v2h9z" } }, { "tag": "path", "attr": { "d": "M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z" } }] })(props);
|
|
3076
|
+
}
|
|
3077
|
+
function BiLogOut(props) {
|
|
3078
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M16 13v-2H7V8l-5 4 5 4v-3z" } }, { "tag": "path", "attr": { "d": "M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z" } }] })(props);
|
|
3079
|
+
}
|
|
1687
3080
|
function ImFilesEmpty(props) {
|
|
1688
3081
|
return GenIcon({ "tag": "svg", "attr": { "version": "1.1", "viewBox": "0 0 16 16" }, "child": [{ "tag": "path", "attr": { "d": "M14.341 5.579c-0.347-0.473-0.831-1.027-1.362-1.558s-1.085-1.015-1.558-1.362c-0.806-0.591-1.197-0.659-1.421-0.659h-5.75c-0.689 0-1.25 0.561-1.25 1.25v11.5c0 0.689 0.561 1.25 1.25 1.25h9.5c0.689 0 1.25-0.561 1.25-1.25v-7.75c0-0.224-0.068-0.615-0.659-1.421zM12.271 4.729c0.48 0.48 0.856 0.912 1.134 1.271h-2.406v-2.405c0.359 0.278 0.792 0.654 1.271 1.134v0zM14 14.75c0 0.136-0.114 0.25-0.25 0.25h-9.5c-0.136 0-0.25-0.114-0.25-0.25v-11.5c0-0.135 0.114-0.25 0.25-0.25 0 0 5.749-0 5.75 0v3.5c0 0.276 0.224 0.5 0.5 0.5h3.5v7.75z" } }, { "tag": "path", "attr": { "d": "M9.421 0.659c-0.806-0.591-1.197-0.659-1.421-0.659h-5.75c-0.689 0-1.25 0.561-1.25 1.25v11.5c0 0.604 0.43 1.109 1 1.225v-12.725c0-0.135 0.115-0.25 0.25-0.25h7.607c-0.151-0.124-0.297-0.238-0.437-0.341z" } }] })(props);
|
|
1689
3082
|
}
|
|
1690
3083
|
function VscOpenPreview(props) {
|
|
1691
3084
|
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 16 16", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "fillRule": "evenodd", "clipRule": "evenodd", "d": "M3 1h11l1 1v5.3a3.21 3.21 0 0 0-1-.3V2H9v10.88L7.88 14H3l-1-1V2l1-1zm0 12h5V2H3v11zm10.379-4.998a2.53 2.53 0 0 0-1.19.348h-.03a2.51 2.51 0 0 0-.799 3.53L9 14.23l.71.71 2.35-2.36c.325.22.7.358 1.09.4a2.47 2.47 0 0 0 1.14-.13 2.51 2.51 0 0 0 1-.63 2.46 2.46 0 0 0 .58-1 2.63 2.63 0 0 0 .07-1.15 2.53 2.53 0 0 0-1.35-1.81 2.53 2.53 0 0 0-1.211-.258zm.24 3.992a1.5 1.5 0 0 1-.979-.244 1.55 1.55 0 0 1-.56-.68 1.49 1.49 0 0 1-.08-.86 1.49 1.49 0 0 1 1.18-1.18 1.49 1.49 0 0 1 .86.08c.276.117.512.311.68.56a1.5 1.5 0 0 1-1.1 2.324z" } }] })(props);
|
|
1692
3085
|
}
|
|
3086
|
+
class TinaAdminApi {
|
|
3087
|
+
constructor(TinaApi) {
|
|
3088
|
+
this.api = TinaApi;
|
|
3089
|
+
}
|
|
3090
|
+
async fetchCollections() {
|
|
3091
|
+
const response = await this.api.request(`query{ getCollections { label, name } }`, { variables: {} });
|
|
3092
|
+
return response;
|
|
3093
|
+
}
|
|
3094
|
+
async fetchCollection(collectionName, includeDocuments) {
|
|
3095
|
+
const response = await this.api.request(`
|
|
3096
|
+
query($collection: String!, $includeDocuments: Boolean!){
|
|
3097
|
+
getCollection(collection: $collection){
|
|
3098
|
+
name
|
|
3099
|
+
label
|
|
3100
|
+
format
|
|
3101
|
+
templates
|
|
3102
|
+
documents @include(if: $includeDocuments) {
|
|
3103
|
+
totalCount
|
|
3104
|
+
edges {
|
|
3105
|
+
node {
|
|
3106
|
+
... on Document {
|
|
3107
|
+
sys {
|
|
3108
|
+
template
|
|
3109
|
+
breadcrumbs
|
|
3110
|
+
path
|
|
3111
|
+
basename
|
|
3112
|
+
relativePath
|
|
3113
|
+
filename
|
|
3114
|
+
extension
|
|
3115
|
+
}
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
}
|
|
3119
|
+
}
|
|
3120
|
+
}
|
|
3121
|
+
}`, { variables: { collection: collectionName, includeDocuments } });
|
|
3122
|
+
return response;
|
|
3123
|
+
}
|
|
3124
|
+
async fetchDocument(collectionName, relativePath) {
|
|
3125
|
+
const response = await this.api.request(`
|
|
3126
|
+
query($collection: String!, $relativePath: String!) {
|
|
3127
|
+
getDocument(collection:$collection, relativePath:$relativePath) {
|
|
3128
|
+
... on Document {
|
|
3129
|
+
form
|
|
3130
|
+
values
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3133
|
+
}`, { variables: { collection: collectionName, relativePath } });
|
|
3134
|
+
return response;
|
|
3135
|
+
}
|
|
3136
|
+
async fetchDocumentFields() {
|
|
3137
|
+
const response = await this.api.request(`query { getDocumentFields }`, { variables: {} });
|
|
3138
|
+
return response;
|
|
3139
|
+
}
|
|
3140
|
+
async createDocument(collectionName, relativePath, params) {
|
|
3141
|
+
const response = await this.api.request(`mutation($collection: String!, $relativePath: String!, $params: DocumentMutation!) {
|
|
3142
|
+
createDocument(
|
|
3143
|
+
collection: $collection,
|
|
3144
|
+
relativePath: $relativePath,
|
|
3145
|
+
}`, {
|
|
3146
|
+
variables: {
|
|
3147
|
+
collection: collectionName,
|
|
3148
|
+
relativePath,
|
|
3149
|
+
params
|
|
3150
|
+
}
|
|
3151
|
+
});
|
|
3152
|
+
return response;
|
|
3153
|
+
}
|
|
3154
|
+
async updateDocument(collectionName, relativePath, params) {
|
|
3155
|
+
const response = await this.api.request(`mutation($collection: String!, $relativePath: String!, $params: DocumentMutation!) {
|
|
3156
|
+
updateDocument(
|
|
3157
|
+
collection: $collection,
|
|
3158
|
+
relativePath: $relativePath,
|
|
3159
|
+
params: $params
|
|
3160
|
+
){__typename}
|
|
3161
|
+
}`, {
|
|
3162
|
+
variables: {
|
|
3163
|
+
collection: collectionName,
|
|
3164
|
+
relativePath,
|
|
3165
|
+
params
|
|
3166
|
+
}
|
|
3167
|
+
});
|
|
3168
|
+
return response;
|
|
3169
|
+
}
|
|
3170
|
+
}
|
|
1693
3171
|
const useGetCollections = (cms) => {
|
|
3172
|
+
const api = new TinaAdminApi(cms.api.tina);
|
|
1694
3173
|
const [collections, setCollections] = useState([]);
|
|
1695
3174
|
useEffect(() => {
|
|
1696
3175
|
const fetchCollections = async () => {
|
|
1697
|
-
const response = await
|
|
3176
|
+
const response = await api.fetchCollections();
|
|
1698
3177
|
setCollections(response.getCollections);
|
|
1699
3178
|
};
|
|
1700
3179
|
fetchCollections();
|
|
@@ -1878,36 +3357,11 @@ const DashboardPage = () => {
|
|
|
1878
3357
|
}, "This is your dashboard for editing or creating content. Select a collection on the left to begin."))));
|
|
1879
3358
|
};
|
|
1880
3359
|
const useGetCollection = (cms, collectionName, includeDocuments = true) => {
|
|
3360
|
+
const api = new TinaAdminApi(cms.api.tina);
|
|
1881
3361
|
const [collection, setCollection] = useState(void 0);
|
|
1882
3362
|
useEffect(() => {
|
|
1883
3363
|
const fetchCollection = async () => {
|
|
1884
|
-
const response = await
|
|
1885
|
-
query($collection: String!, $includeDocuments: Boolean!){
|
|
1886
|
-
getCollection(collection: $collection){
|
|
1887
|
-
name
|
|
1888
|
-
label
|
|
1889
|
-
format
|
|
1890
|
-
templates
|
|
1891
|
-
documents @include(if: $includeDocuments) {
|
|
1892
|
-
totalCount
|
|
1893
|
-
edges {
|
|
1894
|
-
node {
|
|
1895
|
-
... on Document {
|
|
1896
|
-
sys {
|
|
1897
|
-
template
|
|
1898
|
-
breadcrumbs
|
|
1899
|
-
path
|
|
1900
|
-
basename
|
|
1901
|
-
relativePath
|
|
1902
|
-
filename
|
|
1903
|
-
extension
|
|
1904
|
-
}
|
|
1905
|
-
}
|
|
1906
|
-
}
|
|
1907
|
-
}
|
|
1908
|
-
}
|
|
1909
|
-
}
|
|
1910
|
-
}`, { variables: { collection: collectionName, includeDocuments } });
|
|
3364
|
+
const response = await api.fetchCollection(collectionName, includeDocuments);
|
|
1911
3365
|
setCollection(response.getCollection);
|
|
1912
3366
|
};
|
|
1913
3367
|
fetchCollection();
|
|
@@ -1997,37 +3451,37 @@ const CollectionListPage = () => {
|
|
|
1997
3451
|
className: "min-w-full"
|
|
1998
3452
|
}, /* @__PURE__ */ React.createElement("tbody", {
|
|
1999
3453
|
className: "bg-white divide-y divide-gray-150"
|
|
2000
|
-
}, documents.map((
|
|
2001
|
-
const livesiteRoute = routeMapping ? routeMapping.mapper(collection,
|
|
3454
|
+
}, documents.map((document) => {
|
|
3455
|
+
const livesiteRoute = routeMapping ? routeMapping.mapper(collection, document.node) : void 0;
|
|
2002
3456
|
return /* @__PURE__ */ React.createElement("tr", {
|
|
2003
|
-
key:
|
|
3457
|
+
key: document.node.sys.relativePath
|
|
2004
3458
|
}, /* @__PURE__ */ React.createElement("td", {
|
|
2005
3459
|
className: "px-5 py-3 whitespace-nowrap"
|
|
2006
3460
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
2007
3461
|
className: "block text-xs mb-0.5 text-gray-400 uppercase"
|
|
2008
3462
|
}, "Filename"), /* @__PURE__ */ React.createElement(Link, {
|
|
2009
|
-
to: `${location2.pathname}/${
|
|
3463
|
+
to: `${location2.pathname}/${document.node.sys.filename}`,
|
|
2010
3464
|
className: "h-5 leading-5 flex max-w-xs"
|
|
2011
3465
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
2012
3466
|
className: "flex-shrink-1 leading-5 font-medium text-base overflow-ellipsis overflow-hidden whitespace-nowrap text-gray-700"
|
|
2013
|
-
},
|
|
3467
|
+
}, document.node.sys.filename), /* @__PURE__ */ React.createElement("span", {
|
|
2014
3468
|
className: "flex-shrink-0 leading-5 text-base font-medium text-gray-300"
|
|
2015
|
-
},
|
|
3469
|
+
}, document.node.sys.extension))), /* @__PURE__ */ React.createElement("td", {
|
|
2016
3470
|
className: "px-5 py-3 whitespace-nowrap"
|
|
2017
3471
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
2018
3472
|
className: "block text-xs mb-0.5 text-gray-400 uppercase"
|
|
2019
3473
|
}, "Template"), /* @__PURE__ */ React.createElement("span", {
|
|
2020
3474
|
className: "h-5 block leading-5 font-regular text-base overflow-ellipsis overflow-hidden whitespace-nowrap text-gray-500"
|
|
2021
|
-
},
|
|
3475
|
+
}, document.node.sys.template)), /* @__PURE__ */ React.createElement("td", {
|
|
2022
3476
|
className: "px-5 py-3 whitespace-nowrap flex gap-3 items-center justify-end"
|
|
2023
3477
|
}, livesiteRoute && /* @__PURE__ */ React.createElement("a", {
|
|
2024
3478
|
href: livesiteRoute,
|
|
2025
|
-
className: "flex gap-1.5 items-center px-4 py-1.5 rounded-full transition-all ease-out duration-150 text-gray-500 hover:text-blue-500"
|
|
3479
|
+
className: "flex gap-1.5 items-center text-base px-4 py-1.5 rounded-full transition-all ease-out duration-150 text-gray-500 hover:text-blue-500"
|
|
2026
3480
|
}, /* @__PURE__ */ React.createElement(BiLinkExternal, {
|
|
2027
3481
|
className: "inline-block h-5 w-auto opacity-70"
|
|
2028
3482
|
}), " ", "View"), /* @__PURE__ */ React.createElement(Link, {
|
|
2029
|
-
to: `${location2.pathname}/${
|
|
2030
|
-
className: "flex gap-1.5 items-center px-4 py-1.5 rounded-full border border-gray-150 transition-all ease-out duration-150 text-gray-700 hover:bg-gray-50 hover:text-blue-500"
|
|
3483
|
+
to: `${location2.pathname}/${document.node.sys.filename}`,
|
|
3484
|
+
className: "flex gap-1.5 items-center text-base px-4 py-1.5 rounded-full border border-gray-150 transition-all ease-out duration-150 text-gray-700 hover:bg-gray-50 hover:text-blue-500"
|
|
2031
3485
|
}, /* @__PURE__ */ React.createElement(BiEdit, {
|
|
2032
3486
|
className: "inline-block h-5 w-auto opacity-70"
|
|
2033
3487
|
}), " ", "Edit")));
|
|
@@ -2036,6 +3490,7 @@ const CollectionListPage = () => {
|
|
|
2036
3490
|
});
|
|
2037
3491
|
};
|
|
2038
3492
|
const useGetDocumentFields = (cms, collectionName, templateName) => {
|
|
3493
|
+
const api = new TinaAdminApi(cms.api.tina);
|
|
2039
3494
|
const [info, setInfo] = useState({
|
|
2040
3495
|
collection: void 0,
|
|
2041
3496
|
template: void 0,
|
|
@@ -2044,7 +3499,7 @@ const useGetDocumentFields = (cms, collectionName, templateName) => {
|
|
|
2044
3499
|
});
|
|
2045
3500
|
useEffect(() => {
|
|
2046
3501
|
const fetchDocumentFields = async () => {
|
|
2047
|
-
const response = await
|
|
3502
|
+
const response = await api.fetchDocumentFields();
|
|
2048
3503
|
const documentFields = response.getDocumentFields;
|
|
2049
3504
|
const collection = documentFields[collectionName].collection;
|
|
2050
3505
|
const mutationInfo = documentFields[collectionName].mutationInfo;
|
|
@@ -2080,6 +3535,7 @@ const GetDocumentFields = ({
|
|
|
2080
3535
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, children({ collection, template, fields, mutationInfo }));
|
|
2081
3536
|
};
|
|
2082
3537
|
const createDocument = async (cms, collection, template, mutationInfo, values) => {
|
|
3538
|
+
const api = new TinaAdminApi(cms.api.tina);
|
|
2083
3539
|
const _a = values, { relativePath } = _a, leftover = __objRest(_a, ["relativePath"]);
|
|
2084
3540
|
const { includeCollection, includeTemplate } = mutationInfo;
|
|
2085
3541
|
const params = transformDocumentIntoMutationRequestPayload(__spreadValues(__spreadValues({
|
|
@@ -2088,19 +3544,7 @@ const createDocument = async (cms, collection, template, mutationInfo, values) =
|
|
|
2088
3544
|
includeCollection,
|
|
2089
3545
|
includeTemplate
|
|
2090
3546
|
});
|
|
2091
|
-
await
|
|
2092
|
-
createDocument(
|
|
2093
|
-
collection: $collection,
|
|
2094
|
-
relativePath: $relativePath,
|
|
2095
|
-
params: $params
|
|
2096
|
-
){__typename}
|
|
2097
|
-
}`, {
|
|
2098
|
-
variables: {
|
|
2099
|
-
collection: collection.name,
|
|
2100
|
-
relativePath,
|
|
2101
|
-
params
|
|
2102
|
-
}
|
|
2103
|
-
});
|
|
3547
|
+
await api.createDocument(collection.name, relativePath, params);
|
|
2104
3548
|
};
|
|
2105
3549
|
const CollectionCreatePage = () => {
|
|
2106
3550
|
const { collectionName, templateName } = useParams();
|
|
@@ -2140,23 +3584,16 @@ const CollectionCreatePage = () => {
|
|
|
2140
3584
|
}));
|
|
2141
3585
|
};
|
|
2142
3586
|
const useGetDocument = (cms, collectionName, relativePath) => {
|
|
2143
|
-
const
|
|
3587
|
+
const api = new TinaAdminApi(cms.api.tina);
|
|
3588
|
+
const [document, setDocument] = useState(void 0);
|
|
2144
3589
|
useEffect(() => {
|
|
2145
3590
|
const fetchDocument = async () => {
|
|
2146
|
-
const response = await
|
|
2147
|
-
query($collection: String!, $relativePath: String!) {
|
|
2148
|
-
getDocument(collection:$collection, relativePath:$relativePath) {
|
|
2149
|
-
... on Document {
|
|
2150
|
-
form
|
|
2151
|
-
values
|
|
2152
|
-
}
|
|
2153
|
-
}
|
|
2154
|
-
}`, { variables: { collection: collectionName, relativePath } });
|
|
3591
|
+
const response = await api.fetchDocument(collectionName, relativePath);
|
|
2155
3592
|
setDocument(response.getDocument);
|
|
2156
3593
|
};
|
|
2157
3594
|
fetchDocument();
|
|
2158
3595
|
}, [cms, collectionName, relativePath]);
|
|
2159
|
-
return
|
|
3596
|
+
return document;
|
|
2160
3597
|
};
|
|
2161
3598
|
const GetDocument = ({
|
|
2162
3599
|
cms,
|
|
@@ -2164,31 +3601,20 @@ const GetDocument = ({
|
|
|
2164
3601
|
relativePath,
|
|
2165
3602
|
children
|
|
2166
3603
|
}) => {
|
|
2167
|
-
const
|
|
2168
|
-
if (!
|
|
3604
|
+
const document = useGetDocument(cms, collectionName, relativePath);
|
|
3605
|
+
if (!document) {
|
|
2169
3606
|
return null;
|
|
2170
3607
|
}
|
|
2171
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, children(
|
|
3608
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, children(document));
|
|
2172
3609
|
};
|
|
2173
3610
|
const updateDocument = async (cms, relativePath, collection, mutationInfo, values) => {
|
|
3611
|
+
const api = new TinaAdminApi(cms.api.tina);
|
|
2174
3612
|
const { includeCollection, includeTemplate } = mutationInfo;
|
|
2175
3613
|
const params = transformDocumentIntoMutationRequestPayload(values, {
|
|
2176
3614
|
includeCollection,
|
|
2177
3615
|
includeTemplate
|
|
2178
3616
|
});
|
|
2179
|
-
await
|
|
2180
|
-
updateDocument(
|
|
2181
|
-
collection: $collection,
|
|
2182
|
-
relativePath: $relativePath,
|
|
2183
|
-
params: $params
|
|
2184
|
-
){__typename}
|
|
2185
|
-
}`, {
|
|
2186
|
-
variables: {
|
|
2187
|
-
collection: collection.name,
|
|
2188
|
-
relativePath,
|
|
2189
|
-
params
|
|
2190
|
-
}
|
|
2191
|
-
});
|
|
3617
|
+
await api.updateDocument(collection.name, relativePath, params);
|
|
2192
3618
|
};
|
|
2193
3619
|
const CollectionUpdatePage = () => {
|
|
2194
3620
|
const { collectionName, filename } = useParams();
|
|
@@ -2202,12 +3628,12 @@ const CollectionUpdatePage = () => {
|
|
|
2202
3628
|
cms,
|
|
2203
3629
|
collectionName: collection.name,
|
|
2204
3630
|
relativePath
|
|
2205
|
-
}, (
|
|
3631
|
+
}, (document) => {
|
|
2206
3632
|
const form = new Form({
|
|
2207
3633
|
id: "update-form",
|
|
2208
3634
|
label: "form",
|
|
2209
|
-
fields:
|
|
2210
|
-
initialValues:
|
|
3635
|
+
fields: document.form.fields,
|
|
3636
|
+
initialValues: document.values,
|
|
2211
3637
|
onSubmit: async (values) => {
|
|
2212
3638
|
await updateDocument(cms, relativePath, collection, mutationInfo, values);
|
|
2213
3639
|
navigate(`/collections/${collection.name}`);
|
|
@@ -2224,20 +3650,6 @@ const CollectionUpdatePage = () => {
|
|
|
2224
3650
|
});
|
|
2225
3651
|
}));
|
|
2226
3652
|
};
|
|
2227
|
-
const useEmbedTailwind = () => {
|
|
2228
|
-
useEffect(() => {
|
|
2229
|
-
const isSSR = typeof window === "undefined";
|
|
2230
|
-
if (!isSSR) {
|
|
2231
|
-
const head = document.head;
|
|
2232
|
-
const link = document.createElement("link");
|
|
2233
|
-
link.id = "tina-admin-stylesheet";
|
|
2234
|
-
link.type = "text/css";
|
|
2235
|
-
link.rel = "stylesheet";
|
|
2236
|
-
link.href = "https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css";
|
|
2237
|
-
head.appendChild(link);
|
|
2238
|
-
}
|
|
2239
|
-
}, []);
|
|
2240
|
-
};
|
|
2241
3653
|
const Redirect = () => {
|
|
2242
3654
|
React.useEffect(() => {
|
|
2243
3655
|
if (window) {
|
|
@@ -2247,7 +3659,6 @@ const Redirect = () => {
|
|
|
2247
3659
|
return null;
|
|
2248
3660
|
};
|
|
2249
3661
|
const TinaAdmin = () => {
|
|
2250
|
-
useEmbedTailwind();
|
|
2251
3662
|
const isSSR = typeof window === "undefined";
|
|
2252
3663
|
const { edit } = useEditState();
|
|
2253
3664
|
if (isSSR) {
|
|
@@ -2299,4 +3710,4 @@ class RouteMappingPlugin {
|
|
|
2299
3710
|
this.mapper = mapper;
|
|
2300
3711
|
}
|
|
2301
3712
|
}
|
|
2302
|
-
export { AuthWallInner, Client, DEFAULT_LOCAL_TINA_GQL_SERVER_URL, LocalClient, RouteMappingPlugin, TinaAdmin, TinaCMSProvider2, TinaCloudAuthWall, TinaCloudProvider, assertShape, createClient, TinaCMSProvider2 as default, getStaticPropsForTina, gql, safeAssertShape, staticRequest, useDocumentCreatorPlugin, useGraphqlForms, useTinaAuthRedirect };
|
|
3713
|
+
export { AuthWallInner, Client, DEFAULT_LOCAL_TINA_GQL_SERVER_URL, LocalClient, RouteMappingPlugin, TinaAdmin, TinaAdminApi, TinaCMSProvider2, TinaCloudAuthWall, TinaCloudProvider, assertShape, createClient, TinaCMSProvider2 as default, getStaticPropsForTina, gql, safeAssertShape, staticRequest, useDocumentCreatorPlugin, useGraphqlForms, useTinaAuthRedirect };
|