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.js
CHANGED
|
@@ -653,11 +653,11 @@ mutation addPendingDocumentMutation(
|
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
655
|
function ModalBuilder(modalProps) {
|
|
656
|
-
return /* @__PURE__ */ React__default["default"].createElement(toolkit.
|
|
656
|
+
return /* @__PURE__ */ React__default["default"].createElement(toolkit.Modal, null, /* @__PURE__ */ React__default["default"].createElement(toolkit.ModalPopup, null, /* @__PURE__ */ React__default["default"].createElement(toolkit.ModalHeader, null, modalProps.title), /* @__PURE__ */ React__default["default"].createElement(toolkit.ModalBody, {
|
|
657
657
|
padded: true
|
|
658
658
|
}, /* @__PURE__ */ React__default["default"].createElement("p", null, modalProps.message), modalProps.error && /* @__PURE__ */ React__default["default"].createElement(ErrorLabel, null, modalProps.error)), /* @__PURE__ */ React__default["default"].createElement(toolkit.ModalActions, null, modalProps.actions.map((action) => /* @__PURE__ */ React__default["default"].createElement(AsyncButton, __spreadValues({
|
|
659
659
|
key: action.name
|
|
660
|
-
}, action))))))
|
|
660
|
+
}, action))))));
|
|
661
661
|
}
|
|
662
662
|
const ErrorLabel = styled__default["default"].p`
|
|
663
663
|
color: var(--tina-color-error) !important;
|
|
@@ -675,7 +675,7 @@ mutation addPendingDocumentMutation(
|
|
|
675
675
|
}
|
|
676
676
|
}, [action, setSubmitting]);
|
|
677
677
|
return /* @__PURE__ */ React__default["default"].createElement(toolkit.Button, {
|
|
678
|
-
primary,
|
|
678
|
+
variant: primary ? "primary" : "secondary",
|
|
679
679
|
onClick,
|
|
680
680
|
busy: submitting,
|
|
681
681
|
disabled: submitting
|
|
@@ -863,99 +863,11 @@ mutation addPendingDocumentMutation(
|
|
|
863
863
|
}))));
|
|
864
864
|
};
|
|
865
865
|
const TinaCloudAuthWall = TinaCloudProvider;
|
|
866
|
-
var DefaultContext = {
|
|
867
|
-
color: void 0,
|
|
868
|
-
size: void 0,
|
|
869
|
-
className: void 0,
|
|
870
|
-
style: void 0,
|
|
871
|
-
attr: void 0
|
|
872
|
-
};
|
|
873
|
-
var IconContext = React__default["default"].createContext && React__default["default"].createContext(DefaultContext);
|
|
874
|
-
var __assign = function() {
|
|
875
|
-
__assign = Object.assign || function(t) {
|
|
876
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
877
|
-
s = arguments[i];
|
|
878
|
-
for (var p in s)
|
|
879
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
880
|
-
t[p] = s[p];
|
|
881
|
-
}
|
|
882
|
-
return t;
|
|
883
|
-
};
|
|
884
|
-
return __assign.apply(this, arguments);
|
|
885
|
-
};
|
|
886
|
-
var __rest = function(s, e) {
|
|
887
|
-
var t = {};
|
|
888
|
-
for (var p in s)
|
|
889
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
890
|
-
t[p] = s[p];
|
|
891
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
892
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
893
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
894
|
-
t[p[i]] = s[p[i]];
|
|
895
|
-
}
|
|
896
|
-
return t;
|
|
897
|
-
};
|
|
898
|
-
function Tree2Element(tree) {
|
|
899
|
-
return tree && tree.map(function(node, i) {
|
|
900
|
-
return React__default["default"].createElement(node.tag, __assign({
|
|
901
|
-
key: i
|
|
902
|
-
}, node.attr), Tree2Element(node.child));
|
|
903
|
-
});
|
|
904
|
-
}
|
|
905
|
-
function GenIcon(data) {
|
|
906
|
-
return function(props) {
|
|
907
|
-
return React__default["default"].createElement(IconBase, __assign({
|
|
908
|
-
attr: __assign({}, data.attr)
|
|
909
|
-
}, props), Tree2Element(data.child));
|
|
910
|
-
};
|
|
911
|
-
}
|
|
912
|
-
function IconBase(props) {
|
|
913
|
-
var elem = function(conf) {
|
|
914
|
-
var attr = props.attr, size = props.size, title = props.title, svgProps = __rest(props, ["attr", "size", "title"]);
|
|
915
|
-
var computedSize = size || conf.size || "1em";
|
|
916
|
-
var className;
|
|
917
|
-
if (conf.className)
|
|
918
|
-
className = conf.className;
|
|
919
|
-
if (props.className)
|
|
920
|
-
className = (className ? className + " " : "") + props.className;
|
|
921
|
-
return React__default["default"].createElement("svg", __assign({
|
|
922
|
-
stroke: "currentColor",
|
|
923
|
-
fill: "currentColor",
|
|
924
|
-
strokeWidth: "0"
|
|
925
|
-
}, conf.attr, attr, svgProps, {
|
|
926
|
-
className,
|
|
927
|
-
style: __assign(__assign({
|
|
928
|
-
color: props.color || conf.color
|
|
929
|
-
}, conf.style), props.style),
|
|
930
|
-
height: computedSize,
|
|
931
|
-
width: computedSize,
|
|
932
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
933
|
-
}), title && React__default["default"].createElement("title", null, title), props.children);
|
|
934
|
-
};
|
|
935
|
-
return IconContext !== void 0 ? React__default["default"].createElement(IconContext.Consumer, null, function(conf) {
|
|
936
|
-
return elem(conf);
|
|
937
|
-
}) : elem(DefaultContext);
|
|
938
|
-
}
|
|
939
|
-
function BiEdit(props) {
|
|
940
|
-
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);
|
|
941
|
-
}
|
|
942
|
-
function BiExit(props) {
|
|
943
|
-
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);
|
|
944
|
-
}
|
|
945
|
-
function BiLinkExternal(props) {
|
|
946
|
-
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);
|
|
947
|
-
}
|
|
948
|
-
function BiLogIn(props) {
|
|
949
|
-
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);
|
|
950
|
-
}
|
|
951
|
-
function BiLogOut(props) {
|
|
952
|
-
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);
|
|
953
|
-
}
|
|
954
866
|
function useGraphqlForms({
|
|
955
|
-
query,
|
|
956
867
|
variables,
|
|
957
868
|
onSubmit,
|
|
958
|
-
formify: formify2 = null
|
|
869
|
+
formify: formify2 = null,
|
|
870
|
+
query
|
|
959
871
|
}) {
|
|
960
872
|
const cms = toolkit.useCMS();
|
|
961
873
|
const [formValues, setFormValues] = React__default["default"].useState({});
|
|
@@ -1005,7 +917,6 @@ mutation addPendingDocumentMutation(
|
|
|
1005
917
|
React__default["default"].useEffect(() => {
|
|
1006
918
|
updateData();
|
|
1007
919
|
}, [JSON.stringify(formValues)]);
|
|
1008
|
-
const queryString = graphql.print(query(gql__default["default"]));
|
|
1009
920
|
React__default["default"].useEffect(() => {
|
|
1010
921
|
if (pendingReset) {
|
|
1011
922
|
setData(__spreadProps(__spreadValues({}, data), { [pendingReset]: initialData[pendingReset] }));
|
|
@@ -1013,9 +924,15 @@ mutation addPendingDocumentMutation(
|
|
|
1013
924
|
}
|
|
1014
925
|
}, [pendingReset]);
|
|
1015
926
|
React__default["default"].useEffect(() => {
|
|
927
|
+
if (!query) {
|
|
928
|
+
setIsLoading(false);
|
|
929
|
+
return;
|
|
930
|
+
}
|
|
1016
931
|
const formIds = [];
|
|
1017
932
|
setIsLoading(true);
|
|
1018
|
-
cms.api.tina.requestWithForm(
|
|
933
|
+
cms.api.tina.requestWithForm((gql2) => gql2(query), {
|
|
934
|
+
variables
|
|
935
|
+
}).then((payload) => {
|
|
1019
936
|
cms.plugins.remove(new toolkit.FormMetaPlugin({ name: "tina-admin-link" }));
|
|
1020
937
|
setData(payload);
|
|
1021
938
|
setInitialData(payload);
|
|
@@ -1033,32 +950,6 @@ mutation addPendingDocumentMutation(
|
|
|
1033
950
|
values: yup2.object().required(),
|
|
1034
951
|
form: yup2.object().required()
|
|
1035
952
|
}), `Unable to build form shape for fields at ${queryName}`);
|
|
1036
|
-
if (cms.flags.get("tina-admin")) {
|
|
1037
|
-
const TinaAdminLink = new toolkit.FormMetaPlugin({
|
|
1038
|
-
name: "tina-admin-link",
|
|
1039
|
-
Component: () => /* @__PURE__ */ React__default["default"].createElement("a", {
|
|
1040
|
-
href: `/admin/collections/${result._internalSys.collection.name}/${result._internalSys.filename}`,
|
|
1041
|
-
style: {
|
|
1042
|
-
display: "flex",
|
|
1043
|
-
alignItems: "center",
|
|
1044
|
-
padding: "10px 20px",
|
|
1045
|
-
borderTop: "1px solid var(--tina-color-grey-2)",
|
|
1046
|
-
textTransform: "uppercase",
|
|
1047
|
-
fontSize: "11px",
|
|
1048
|
-
fontWeight: 500,
|
|
1049
|
-
background: "var(--tina-color-grey-0)"
|
|
1050
|
-
}
|
|
1051
|
-
}, /* @__PURE__ */ React__default["default"].createElement(BiLinkExternal, {
|
|
1052
|
-
style: {
|
|
1053
|
-
height: "1.25em",
|
|
1054
|
-
width: "auto",
|
|
1055
|
-
opacity: "0.8",
|
|
1056
|
-
marginRight: "8px"
|
|
1057
|
-
}
|
|
1058
|
-
}), " ", "Edit in Tina Admin")
|
|
1059
|
-
});
|
|
1060
|
-
cms.plugins.add(TinaAdminLink);
|
|
1061
|
-
}
|
|
1062
953
|
const formConfig = {
|
|
1063
954
|
id: queryName,
|
|
1064
955
|
label: result.form.label,
|
|
@@ -1180,11 +1071,11 @@ mutation addPendingDocumentMutation(
|
|
|
1180
1071
|
}
|
|
1181
1072
|
});
|
|
1182
1073
|
};
|
|
1183
|
-
}, [
|
|
1074
|
+
}, [query, JSON.stringify(variables), currentBranch]);
|
|
1184
1075
|
return [data, isLoading];
|
|
1185
1076
|
}
|
|
1186
|
-
const transformDocumentIntoMutationRequestPayload = (
|
|
1187
|
-
const _a =
|
|
1077
|
+
const transformDocumentIntoMutationRequestPayload = (document, instructions) => {
|
|
1078
|
+
const _a = document, { _collection, __typename, _template } = _a, rest = __objRest(_a, ["_collection", "__typename", "_template"]);
|
|
1188
1079
|
const params = transformParams(rest);
|
|
1189
1080
|
const paramsWithTemplate = instructions.includeTemplate ? { [_template]: params } : params;
|
|
1190
1081
|
return instructions.includeCollection ? { [_collection]: paramsWithTemplate } : paramsWithTemplate;
|
|
@@ -1401,16 +1292,1380 @@ mutation addPendingDocumentMutation(
|
|
|
1401
1292
|
run();
|
|
1402
1293
|
}, [cms]);
|
|
1403
1294
|
React__default["default"].useEffect(() => {
|
|
1404
|
-
if (plugin) {
|
|
1405
|
-
cms.plugins.add(plugin);
|
|
1295
|
+
if (plugin) {
|
|
1296
|
+
cms.plugins.add(plugin);
|
|
1297
|
+
}
|
|
1298
|
+
return () => {
|
|
1299
|
+
if (plugin) {
|
|
1300
|
+
cms.plugins.remove(plugin);
|
|
1301
|
+
}
|
|
1302
|
+
};
|
|
1303
|
+
}, [plugin]);
|
|
1304
|
+
};
|
|
1305
|
+
var styles = `/**
|
|
1306
|
+
Use a better box model (opinionated).
|
|
1307
|
+
*/
|
|
1308
|
+
|
|
1309
|
+
.tina-tailwind *,
|
|
1310
|
+
.tina-tailwind ::before,
|
|
1311
|
+
.tina-tailwind ::after {
|
|
1312
|
+
box-sizing: border-box;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
Use a more readable tab size (opinionated).
|
|
1317
|
+
*/
|
|
1318
|
+
|
|
1319
|
+
.tina-tailwind html {
|
|
1320
|
+
-moz-tab-size: 4;
|
|
1321
|
+
tab-size: 4;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
/**
|
|
1325
|
+
1. Correct the line height in all browsers.
|
|
1326
|
+
2. Prevent adjustments of font size after orientation changes in iOS.
|
|
1327
|
+
*/
|
|
1328
|
+
|
|
1329
|
+
.tina-tailwind html {
|
|
1330
|
+
line-height: 1.15; /* 1 */
|
|
1331
|
+
-webkit-text-size-adjust: 100%; /* 2 */
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
Remove the margin in all browsers.
|
|
1336
|
+
*/
|
|
1337
|
+
|
|
1338
|
+
.tina-tailwind body {
|
|
1339
|
+
margin: 0;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
|
|
1344
|
+
*/
|
|
1345
|
+
|
|
1346
|
+
.tina-tailwind body {
|
|
1347
|
+
font-family:
|
|
1348
|
+
system-ui,
|
|
1349
|
+
-apple-system, /* Firefox supports this but not yet \`system-ui\` */
|
|
1350
|
+
'Segoe UI',
|
|
1351
|
+
Roboto,
|
|
1352
|
+
Helvetica,
|
|
1353
|
+
Arial,
|
|
1354
|
+
sans-serif,
|
|
1355
|
+
'Apple Color Emoji',
|
|
1356
|
+
'Segoe UI Emoji';
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
/**
|
|
1360
|
+
1. Add the correct height in Firefox.
|
|
1361
|
+
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
|
|
1362
|
+
*/
|
|
1363
|
+
|
|
1364
|
+
.tina-tailwind hr {
|
|
1365
|
+
height: 0; /* 1 */
|
|
1366
|
+
color: inherit; /* 2 */
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
/**
|
|
1370
|
+
Add the correct text decoration in Chrome, Edge, and Safari.
|
|
1371
|
+
*/
|
|
1372
|
+
|
|
1373
|
+
.tina-tailwind abbr[title] {
|
|
1374
|
+
text-decoration: underline dotted;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
/**
|
|
1378
|
+
Add the correct font weight in Edge and Safari.
|
|
1379
|
+
*/
|
|
1380
|
+
|
|
1381
|
+
.tina-tailwind b,
|
|
1382
|
+
.tina-tailwind strong {
|
|
1383
|
+
font-weight: bolder;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
/**
|
|
1387
|
+
1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
|
|
1388
|
+
2. Correct the odd 'em' font sizing in all browsers.
|
|
1389
|
+
*/
|
|
1390
|
+
|
|
1391
|
+
.tina-tailwind code,
|
|
1392
|
+
.tina-tailwind kbd,
|
|
1393
|
+
.tina-tailwind samp,
|
|
1394
|
+
.tina-tailwind pre {
|
|
1395
|
+
font-family:
|
|
1396
|
+
ui-monospace,
|
|
1397
|
+
SFMono-Regular,
|
|
1398
|
+
Consolas,
|
|
1399
|
+
'Liberation Mono',
|
|
1400
|
+
Menlo,
|
|
1401
|
+
monospace; /* 1 */
|
|
1402
|
+
font-size: 1em; /* 2 */
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
/**
|
|
1406
|
+
Add the correct font size in all browsers.
|
|
1407
|
+
*/
|
|
1408
|
+
|
|
1409
|
+
.tina-tailwind small {
|
|
1410
|
+
font-size: 80%;
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
/**
|
|
1414
|
+
Prevent 'sub' and 'sup' elements from affecting the line height in all browsers.
|
|
1415
|
+
*/
|
|
1416
|
+
|
|
1417
|
+
.tina-tailwind sub,
|
|
1418
|
+
.tina-tailwind sup {
|
|
1419
|
+
font-size: 75%;
|
|
1420
|
+
line-height: 0;
|
|
1421
|
+
position: relative;
|
|
1422
|
+
vertical-align: baseline;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
/*
|
|
1426
|
+
Text-level semantics
|
|
1427
|
+
====================
|
|
1428
|
+
*/
|
|
1429
|
+
|
|
1430
|
+
.tina-tailwind sub {
|
|
1431
|
+
bottom: -0.25em;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
/*
|
|
1435
|
+
Grouping content
|
|
1436
|
+
================
|
|
1437
|
+
*/
|
|
1438
|
+
|
|
1439
|
+
.tina-tailwind sup {
|
|
1440
|
+
top: -0.5em;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
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)
|
|
1445
|
+
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)
|
|
1446
|
+
*/
|
|
1447
|
+
|
|
1448
|
+
.tina-tailwind table {
|
|
1449
|
+
text-indent: 0; /* 1 */
|
|
1450
|
+
border-color: inherit; /* 2 */
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
/**
|
|
1454
|
+
1. Change the font styles in all browsers.
|
|
1455
|
+
2. Remove the margin in Firefox and Safari.
|
|
1456
|
+
*/
|
|
1457
|
+
|
|
1458
|
+
.tina-tailwind button,
|
|
1459
|
+
.tina-tailwind input,
|
|
1460
|
+
.tina-tailwind optgroup,
|
|
1461
|
+
.tina-tailwind select,
|
|
1462
|
+
.tina-tailwind textarea {
|
|
1463
|
+
font-family: inherit; /* 1 */
|
|
1464
|
+
font-size: 100%; /* 1 */
|
|
1465
|
+
line-height: 1.15; /* 1 */
|
|
1466
|
+
margin: 0; /* 2 */
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
/**
|
|
1470
|
+
Remove the inheritance of text transform in Edge and Firefox.
|
|
1471
|
+
1. Remove the inheritance of text transform in Firefox.
|
|
1472
|
+
*/
|
|
1473
|
+
|
|
1474
|
+
.tina-tailwind button,
|
|
1475
|
+
.tina-tailwind select { /* 1 */
|
|
1476
|
+
text-transform: none;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
/**
|
|
1480
|
+
Correct the inability to style clickable types in iOS and Safari.
|
|
1481
|
+
*/
|
|
1482
|
+
|
|
1483
|
+
.tina-tailwind button,
|
|
1484
|
+
.tina-tailwind [type='button'],
|
|
1485
|
+
.tina-tailwind [type='reset'],
|
|
1486
|
+
.tina-tailwind [type='submit'] {
|
|
1487
|
+
-webkit-appearance: button;
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
/**
|
|
1491
|
+
Remove the inner border and padding in Firefox.
|
|
1492
|
+
*/
|
|
1493
|
+
|
|
1494
|
+
.tina-tailwind ::-moz-focus-inner {
|
|
1495
|
+
border-style: none;
|
|
1496
|
+
padding: 0;
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
/**
|
|
1500
|
+
Restore the focus styles unset by the previous rule.
|
|
1501
|
+
*/
|
|
1502
|
+
|
|
1503
|
+
.tina-tailwind :-moz-focusring {
|
|
1504
|
+
outline: 1px dotted ButtonText;
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
/**
|
|
1508
|
+
Remove the additional ':invalid' styles in Firefox.
|
|
1509
|
+
See: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737
|
|
1510
|
+
*/
|
|
1511
|
+
|
|
1512
|
+
.tina-tailwind :-moz-ui-invalid {
|
|
1513
|
+
box-shadow: none;
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
/**
|
|
1517
|
+
Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.
|
|
1518
|
+
*/
|
|
1519
|
+
|
|
1520
|
+
.tina-tailwind legend {
|
|
1521
|
+
padding: 0;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
/**
|
|
1525
|
+
Add the correct vertical alignment in Chrome and Firefox.
|
|
1526
|
+
*/
|
|
1527
|
+
|
|
1528
|
+
.tina-tailwind progress {
|
|
1529
|
+
vertical-align: baseline;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
/**
|
|
1533
|
+
Correct the cursor style of increment and decrement buttons in Safari.
|
|
1534
|
+
*/
|
|
1535
|
+
|
|
1536
|
+
.tina-tailwind ::-webkit-inner-spin-button,
|
|
1537
|
+
.tina-tailwind ::-webkit-outer-spin-button {
|
|
1538
|
+
height: auto;
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
/**
|
|
1542
|
+
1. Correct the odd appearance in Chrome and Safari.
|
|
1543
|
+
2. Correct the outline style in Safari.
|
|
1544
|
+
*/
|
|
1545
|
+
|
|
1546
|
+
.tina-tailwind [type='search'] {
|
|
1547
|
+
-webkit-appearance: textfield; /* 1 */
|
|
1548
|
+
outline-offset: -2px; /* 2 */
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
Remove the inner padding in Chrome and Safari on macOS.
|
|
1553
|
+
*/
|
|
1554
|
+
|
|
1555
|
+
.tina-tailwind ::-webkit-search-decoration {
|
|
1556
|
+
-webkit-appearance: none;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
1. Correct the inability to style clickable types in iOS and Safari.
|
|
1561
|
+
2. Change font properties to 'inherit' in Safari.
|
|
1562
|
+
*/
|
|
1563
|
+
|
|
1564
|
+
.tina-tailwind ::-webkit-file-upload-button {
|
|
1565
|
+
-webkit-appearance: button; /* 1 */
|
|
1566
|
+
font: inherit; /* 2 */
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
/*
|
|
1570
|
+
Add the correct display in Chrome and Safari.
|
|
1571
|
+
*/
|
|
1572
|
+
|
|
1573
|
+
.tina-tailwind summary {
|
|
1574
|
+
display: list-item;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
/**
|
|
1578
|
+
* Removes the default spacing and border for appropriate elements.
|
|
1579
|
+
*/
|
|
1580
|
+
|
|
1581
|
+
.tina-tailwind blockquote,
|
|
1582
|
+
.tina-tailwind dl,
|
|
1583
|
+
.tina-tailwind dd,
|
|
1584
|
+
.tina-tailwind h1,
|
|
1585
|
+
.tina-tailwind h2,
|
|
1586
|
+
.tina-tailwind h3,
|
|
1587
|
+
.tina-tailwind h4,
|
|
1588
|
+
.tina-tailwind h5,
|
|
1589
|
+
.tina-tailwind h6,
|
|
1590
|
+
.tina-tailwind hr,
|
|
1591
|
+
.tina-tailwind figure,
|
|
1592
|
+
.tina-tailwind p,
|
|
1593
|
+
.tina-tailwind pre {
|
|
1594
|
+
margin: 0;
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
/**
|
|
1598
|
+
* Manually forked from SUIT CSS Base: https://github.com/suitcss/base
|
|
1599
|
+
* A thin layer on top of normalize.css that provides a starting point more
|
|
1600
|
+
* suitable for web applications.
|
|
1601
|
+
*/
|
|
1602
|
+
|
|
1603
|
+
.tina-tailwind button {
|
|
1604
|
+
background-color: transparent;
|
|
1605
|
+
background-image: none;
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
/*
|
|
1609
|
+
Interactive
|
|
1610
|
+
===========
|
|
1611
|
+
*/
|
|
1612
|
+
|
|
1613
|
+
.tina-tailwind fieldset {
|
|
1614
|
+
margin: 0;
|
|
1615
|
+
padding: 0;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
/*
|
|
1619
|
+
Forms
|
|
1620
|
+
=====
|
|
1621
|
+
*/
|
|
1622
|
+
|
|
1623
|
+
.tina-tailwind ol,
|
|
1624
|
+
.tina-tailwind ul {
|
|
1625
|
+
list-style: none;
|
|
1626
|
+
margin: 0;
|
|
1627
|
+
padding: 0;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
/**
|
|
1631
|
+
* 1. Use the user's configured \`sans\` font-family (with Tailwind's default
|
|
1632
|
+
* sans-serif font stack as a fallback) as a sane default.
|
|
1633
|
+
* 2. Use Tailwind's default "normal" line-height so the user isn't forced
|
|
1634
|
+
* to override it to ensure consistency even when using the default theme.
|
|
1635
|
+
*/
|
|
1636
|
+
|
|
1637
|
+
.tina-tailwind html {
|
|
1638
|
+
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 */
|
|
1639
|
+
line-height: 1.5; /* 2 */
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
/**
|
|
1643
|
+
* Inherit font-family and line-height from \`html\` so users can set them as
|
|
1644
|
+
* a class directly on the \`html\` element.
|
|
1645
|
+
*/
|
|
1646
|
+
|
|
1647
|
+
.tina-tailwind body {
|
|
1648
|
+
font-family: inherit;
|
|
1649
|
+
line-height: inherit;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
/**
|
|
1653
|
+
* 1. Prevent padding and border from affecting element width.
|
|
1654
|
+
*
|
|
1655
|
+
* We used to set this in the html element and inherit from
|
|
1656
|
+
* the parent element for everything else. This caused issues
|
|
1657
|
+
* in shadow-dom-enhanced elements like <details> where the content
|
|
1658
|
+
* is wrapped by a div with box-sizing set to \`content-box\`.
|
|
1659
|
+
*
|
|
1660
|
+
* https://github.com/mozdevs/cssremedy/issues/4
|
|
1661
|
+
*
|
|
1662
|
+
*
|
|
1663
|
+
* 2. Allow adding a border to an element by just adding a border-width.
|
|
1664
|
+
*
|
|
1665
|
+
* By default, the way the browser specifies that an element should have no
|
|
1666
|
+
* border is by setting it's border-style to \`none\` in the user-agent
|
|
1667
|
+
* stylesheet.
|
|
1668
|
+
*
|
|
1669
|
+
* In order to easily add borders to elements by just setting the \`border-width\`
|
|
1670
|
+
* property, we change the default border-style for all elements to \`solid\`, and
|
|
1671
|
+
* use border-width to hide them instead. This way our \`border\` utilities only
|
|
1672
|
+
* need to set the \`border-width\` property instead of the entire \`border\`
|
|
1673
|
+
* shorthand, making our border utilities much more straightforward to compose.
|
|
1674
|
+
*
|
|
1675
|
+
* https://github.com/tailwindcss/tailwindcss/pull/116
|
|
1676
|
+
*/
|
|
1677
|
+
|
|
1678
|
+
.tina-tailwind *,
|
|
1679
|
+
.tina-tailwind ::before,
|
|
1680
|
+
.tina-tailwind ::after {
|
|
1681
|
+
box-sizing: border-box; /* 1 */
|
|
1682
|
+
border-width: 0; /* 2 */
|
|
1683
|
+
border-style: solid; /* 2 */
|
|
1684
|
+
border-color: currentColor; /* 2 */
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
/*
|
|
1688
|
+
* Ensure horizontal rules are visible by default
|
|
1689
|
+
*/
|
|
1690
|
+
|
|
1691
|
+
.tina-tailwind hr {
|
|
1692
|
+
border-top-width: 1px;
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
/**
|
|
1696
|
+
* Undo the \`border-style: none\` reset that Normalize applies to images so that
|
|
1697
|
+
* our \`border-{width}\` utilities have the expected effect.
|
|
1698
|
+
*
|
|
1699
|
+
* The Normalize reset is unnecessary for us since we default the border-width
|
|
1700
|
+
* to 0 on all elements.
|
|
1701
|
+
*
|
|
1702
|
+
* https://github.com/tailwindcss/tailwindcss/issues/362
|
|
1703
|
+
*/
|
|
1704
|
+
|
|
1705
|
+
.tina-tailwind img {
|
|
1706
|
+
border-style: solid;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
/**
|
|
1710
|
+
* Tailwind custom reset styles
|
|
1711
|
+
*/
|
|
1712
|
+
|
|
1713
|
+
.tina-tailwind textarea {
|
|
1714
|
+
resize: vertical;
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
/*
|
|
1718
|
+
Tabular data
|
|
1719
|
+
============
|
|
1720
|
+
*/
|
|
1721
|
+
|
|
1722
|
+
.tina-tailwind input::placeholder,
|
|
1723
|
+
.tina-tailwind textarea::placeholder {
|
|
1724
|
+
opacity: 1;
|
|
1725
|
+
color: #918c9e;
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
/*
|
|
1729
|
+
Sections
|
|
1730
|
+
========
|
|
1731
|
+
*/
|
|
1732
|
+
|
|
1733
|
+
.tina-tailwind button,
|
|
1734
|
+
.tina-tailwind [role="button"] {
|
|
1735
|
+
cursor: pointer;
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
/**
|
|
1739
|
+
* Override legacy focus reset from Normalize with modern Firefox focus styles.
|
|
1740
|
+
*
|
|
1741
|
+
* This is actually an improvement over the new defaults in Firefox in our testing,
|
|
1742
|
+
* as it triggers the better focus styles even for links, which still use a dotted
|
|
1743
|
+
* outline in Firefox by default.
|
|
1744
|
+
*/
|
|
1745
|
+
|
|
1746
|
+
.tina-tailwind :-moz-focusring {
|
|
1747
|
+
outline: auto;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
/*
|
|
1751
|
+
Document
|
|
1752
|
+
========
|
|
1753
|
+
*/
|
|
1754
|
+
|
|
1755
|
+
.tina-tailwind table {
|
|
1756
|
+
border-collapse: collapse;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
|
|
1760
|
+
|
|
1761
|
+
.tina-tailwind h1,
|
|
1762
|
+
.tina-tailwind h2,
|
|
1763
|
+
.tina-tailwind h3,
|
|
1764
|
+
.tina-tailwind h4,
|
|
1765
|
+
.tina-tailwind h5,
|
|
1766
|
+
.tina-tailwind h6 {
|
|
1767
|
+
font-size: inherit;
|
|
1768
|
+
font-weight: inherit;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
/**
|
|
1772
|
+
* Reset links to optimize for opt-in styling instead of
|
|
1773
|
+
* opt-out.
|
|
1774
|
+
*/
|
|
1775
|
+
|
|
1776
|
+
.tina-tailwind a {
|
|
1777
|
+
color: inherit;
|
|
1778
|
+
text-decoration: inherit;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
/**
|
|
1782
|
+
* Reset form element properties that are easy to forget to
|
|
1783
|
+
* style explicitly so you don't inadvertently introduce
|
|
1784
|
+
* styles that deviate from your design system. These styles
|
|
1785
|
+
* supplement a partial reset that is already applied by
|
|
1786
|
+
* normalize.css.
|
|
1787
|
+
*/
|
|
1788
|
+
|
|
1789
|
+
.tina-tailwind button,
|
|
1790
|
+
.tina-tailwind input,
|
|
1791
|
+
.tina-tailwind optgroup,
|
|
1792
|
+
.tina-tailwind select,
|
|
1793
|
+
.tina-tailwind textarea {
|
|
1794
|
+
padding: 0;
|
|
1795
|
+
line-height: inherit;
|
|
1796
|
+
color: inherit;
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
/**
|
|
1800
|
+
* Use the configured 'mono' font family for elements that
|
|
1801
|
+
* are expected to be rendered with a monospace font, falling
|
|
1802
|
+
* back to the system monospace stack if there is no configured
|
|
1803
|
+
* 'mono' font family.
|
|
1804
|
+
*/
|
|
1805
|
+
|
|
1806
|
+
.tina-tailwind pre,
|
|
1807
|
+
.tina-tailwind code,
|
|
1808
|
+
.tina-tailwind kbd,
|
|
1809
|
+
.tina-tailwind samp {
|
|
1810
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
/**
|
|
1814
|
+
* 1. Make replaced elements \`display: block\` by default as that's
|
|
1815
|
+
* the behavior you want almost all of the time. Inspired by
|
|
1816
|
+
* CSS Remedy, with \`svg\` added as well.
|
|
1817
|
+
*
|
|
1818
|
+
* https://github.com/mozdevs/cssremedy/issues/14
|
|
1819
|
+
*
|
|
1820
|
+
* 2. Add \`vertical-align: middle\` to align replaced elements more
|
|
1821
|
+
* sensibly by default when overriding \`display\` by adding a
|
|
1822
|
+
* utility like \`inline\`.
|
|
1823
|
+
*
|
|
1824
|
+
* This can trigger a poorly considered linting error in some
|
|
1825
|
+
* tools but is included by design.
|
|
1826
|
+
*
|
|
1827
|
+
* https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210
|
|
1828
|
+
*/
|
|
1829
|
+
|
|
1830
|
+
.tina-tailwind img,
|
|
1831
|
+
.tina-tailwind svg,
|
|
1832
|
+
.tina-tailwind video,
|
|
1833
|
+
.tina-tailwind canvas,
|
|
1834
|
+
.tina-tailwind audio,
|
|
1835
|
+
.tina-tailwind iframe,
|
|
1836
|
+
.tina-tailwind embed,
|
|
1837
|
+
.tina-tailwind object {
|
|
1838
|
+
display: block; /* 1 */
|
|
1839
|
+
vertical-align: middle; /* 2 */
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
/**
|
|
1843
|
+
* Constrain images and videos to the parent width and preserve
|
|
1844
|
+
* their intrinsic aspect ratio.
|
|
1845
|
+
*
|
|
1846
|
+
* https://github.com/mozdevs/cssremedy/issues/14
|
|
1847
|
+
*/
|
|
1848
|
+
|
|
1849
|
+
.tina-tailwind img,
|
|
1850
|
+
.tina-tailwind video {
|
|
1851
|
+
max-width: 100%;
|
|
1852
|
+
height: auto;
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
/**
|
|
1856
|
+
* Ensure the default browser behavior of the \`hidden\` attribute.
|
|
1857
|
+
*/
|
|
1858
|
+
|
|
1859
|
+
.tina-tailwind [hidden] {
|
|
1860
|
+
display: none;
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
/*! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com
|
|
1864
|
+
*/
|
|
1865
|
+
|
|
1866
|
+
.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
|
|
1867
|
+
--tw-translate-x: 0;
|
|
1868
|
+
--tw-translate-y: 0;
|
|
1869
|
+
--tw-rotate: 0;
|
|
1870
|
+
--tw-skew-x: 0;
|
|
1871
|
+
--tw-skew-y: 0;
|
|
1872
|
+
--tw-scale-x: 1;
|
|
1873
|
+
--tw-scale-y: 1;
|
|
1874
|
+
--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));
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
|
|
1878
|
+
--tw-border-opacity: 1;
|
|
1879
|
+
border-color: rgba(225, 221, 236, var(--tw-border-opacity));
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
|
|
1883
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
1884
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
1885
|
+
--tw-shadow: 0 0 #0000;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
|
|
1889
|
+
--tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
|
|
1890
|
+
--tw-ring-offset-width: 0px;
|
|
1891
|
+
--tw-ring-offset-color: #fff;
|
|
1892
|
+
--tw-ring-color: rgba(0, 132, 255, 0.5);
|
|
1893
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
1894
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
1895
|
+
--tw-shadow: 0 0 #0000;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
.tina-tailwind *, .tina-tailwind ::before, .tina-tailwind ::after {
|
|
1899
|
+
--tw-blur: var(--tw-empty,/*!*/ /*!*/);
|
|
1900
|
+
--tw-brightness: var(--tw-empty,/*!*/ /*!*/);
|
|
1901
|
+
--tw-contrast: var(--tw-empty,/*!*/ /*!*/);
|
|
1902
|
+
--tw-grayscale: var(--tw-empty,/*!*/ /*!*/);
|
|
1903
|
+
--tw-hue-rotate: var(--tw-empty,/*!*/ /*!*/);
|
|
1904
|
+
--tw-invert: var(--tw-empty,/*!*/ /*!*/);
|
|
1905
|
+
--tw-saturate: var(--tw-empty,/*!*/ /*!*/);
|
|
1906
|
+
--tw-sepia: var(--tw-empty,/*!*/ /*!*/);
|
|
1907
|
+
--tw-drop-shadow: var(--tw-empty,/*!*/ /*!*/);
|
|
1908
|
+
--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);
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
.tina-tailwind .static {
|
|
1912
|
+
position: static !important;
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
.tina-tailwind .fixed {
|
|
1916
|
+
position: fixed !important;
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
.tina-tailwind .absolute {
|
|
1920
|
+
position: absolute !important;
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
.tina-tailwind .relative {
|
|
1924
|
+
position: relative !important;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
.tina-tailwind .bottom-3 {
|
|
1928
|
+
bottom: 12px !important;
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
.tina-tailwind .right-5 {
|
|
1932
|
+
right: 20px !important;
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
.tina-tailwind .right-0 {
|
|
1936
|
+
right: 0px !important;
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
.tina-tailwind .z-50 {
|
|
1940
|
+
z-index: 50 !important;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
.tina-tailwind .-ml-1 {
|
|
1944
|
+
margin-left: -4px !important;
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
.tina-tailwind .mr-1\\.5 {
|
|
1948
|
+
margin-right: 6px !important;
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
.tina-tailwind .mr-1 {
|
|
1952
|
+
margin-right: 4px !important;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
.tina-tailwind .mb-3 {
|
|
1956
|
+
margin-bottom: 12px !important;
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
.tina-tailwind .mr-2 {
|
|
1960
|
+
margin-right: 8px !important;
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
.tina-tailwind .ml-1 {
|
|
1964
|
+
margin-left: 4px !important;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
.tina-tailwind .mt-2 {
|
|
1968
|
+
margin-top: 8px !important;
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
.tina-tailwind .mt-8 {
|
|
1972
|
+
margin-top: 32px !important;
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
.tina-tailwind .mb-0\\.5 {
|
|
1976
|
+
margin-bottom: 2px !important;
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
.tina-tailwind .mb-0 {
|
|
1980
|
+
margin-bottom: 0px !important;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
.tina-tailwind .block {
|
|
1984
|
+
display: block !important;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
.tina-tailwind .inline-block {
|
|
1988
|
+
display: inline-block !important;
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
.tina-tailwind .flex {
|
|
1992
|
+
display: flex !important;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
.tina-tailwind .inline-flex {
|
|
1996
|
+
display: inline-flex !important;
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
.tina-tailwind .table {
|
|
2000
|
+
display: table !important;
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
.tina-tailwind .h-screen {
|
|
2004
|
+
height: 100vh !important;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
.tina-tailwind .h-auto {
|
|
2008
|
+
height: auto !important;
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
.tina-tailwind .h-6 {
|
|
2012
|
+
height: 24px !important;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
.tina-tailwind .h-5 {
|
|
2016
|
+
height: 20px !important;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
.tina-tailwind .w-full {
|
|
2020
|
+
width: 100% !important;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
.tina-tailwind .w-10 {
|
|
2024
|
+
width: 40px !important;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
.tina-tailwind .w-80 {
|
|
2028
|
+
width: 320px !important;
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
.tina-tailwind .w-2\\/3 {
|
|
2032
|
+
width: 66.666667% !important;
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
.tina-tailwind .w-6 {
|
|
2036
|
+
width: 24px !important;
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
.tina-tailwind .w-auto {
|
|
2040
|
+
width: auto !important;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
.tina-tailwind .w-56 {
|
|
2044
|
+
width: 224px !important;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
.tina-tailwind .min-w-full {
|
|
2048
|
+
min-width: 100% !important;
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
.tina-tailwind .max-w-lg {
|
|
2052
|
+
max-width: 32rem !important;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
.tina-tailwind .max-w-screen-md {
|
|
2056
|
+
max-width: 768px !important;
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
.tina-tailwind .max-w-xs {
|
|
2060
|
+
max-width: 20rem !important;
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
.tina-tailwind .flex-1 {
|
|
2064
|
+
flex: 1 1 0% !important;
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
.tina-tailwind .flex-shrink-0 {
|
|
2068
|
+
flex-shrink: 0 !important;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
.tina-tailwind .origin-top-right {
|
|
2072
|
+
transform-origin: top right !important;
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2075
|
+
.tina-tailwind .translate-y-full {
|
|
2076
|
+
--tw-translate-y: 100% !important;
|
|
2077
|
+
transform: var(--tw-transform) !important;
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
.tina-tailwind .-translate-y-2 {
|
|
2081
|
+
--tw-translate-y: -8px !important;
|
|
2082
|
+
transform: var(--tw-transform) !important;
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
.tina-tailwind .translate-y-0 {
|
|
2086
|
+
--tw-translate-y: 0px !important;
|
|
2087
|
+
transform: var(--tw-transform) !important;
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
.tina-tailwind .rotate-90 {
|
|
2091
|
+
--tw-rotate: 90deg !important;
|
|
2092
|
+
transform: var(--tw-transform) !important;
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
.tina-tailwind .rotate-0 {
|
|
2096
|
+
--tw-rotate: 0deg !important;
|
|
2097
|
+
transform: var(--tw-transform) !important;
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
.tina-tailwind .scale-95 {
|
|
2101
|
+
--tw-scale-x: .95 !important;
|
|
2102
|
+
--tw-scale-y: .95 !important;
|
|
2103
|
+
transform: var(--tw-transform) !important;
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
.tina-tailwind .scale-100 {
|
|
2107
|
+
--tw-scale-x: 1 !important;
|
|
2108
|
+
--tw-scale-y: 1 !important;
|
|
2109
|
+
transform: var(--tw-transform) !important;
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
.tina-tailwind .transform {
|
|
2113
|
+
transform: var(--tw-transform) !important;
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
.tina-tailwind .flex-col {
|
|
2117
|
+
flex-direction: column !important;
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
.tina-tailwind .items-end {
|
|
2121
|
+
align-items: flex-end !important;
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
.tina-tailwind .items-center {
|
|
2125
|
+
align-items: center !important;
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
.tina-tailwind .items-stretch {
|
|
2129
|
+
align-items: stretch !important;
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
.tina-tailwind .justify-start {
|
|
2133
|
+
justify-content: flex-start !important;
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
.tina-tailwind .justify-end {
|
|
2137
|
+
justify-content: flex-end !important;
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
.tina-tailwind .justify-center {
|
|
2141
|
+
justify-content: center !important;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
.tina-tailwind .justify-between {
|
|
2145
|
+
justify-content: space-between !important;
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
.tina-tailwind .gap-0\\.5 {
|
|
2149
|
+
gap: 2px !important;
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
.tina-tailwind .gap-0 {
|
|
2153
|
+
gap: 0px !important;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
.tina-tailwind .gap-4 {
|
|
2157
|
+
gap: 16px !important;
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2160
|
+
.tina-tailwind .gap-1 {
|
|
2161
|
+
gap: 4px !important;
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
.tina-tailwind .gap-3 {
|
|
2165
|
+
gap: 12px !important;
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
.tina-tailwind .gap-1\\.5 {
|
|
2169
|
+
gap: 6px !important;
|
|
2170
|
+
}
|
|
2171
|
+
|
|
2172
|
+
.tina-tailwind .divide-y > :not([hidden]) ~ :not([hidden]) {
|
|
2173
|
+
--tw-divide-y-reverse: 0 !important;
|
|
2174
|
+
border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))) !important;
|
|
2175
|
+
border-bottom-width: calc(1px * var(--tw-divide-y-reverse)) !important;
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
.tina-tailwind .overflow-hidden {
|
|
2179
|
+
overflow: hidden !important;
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
.tina-tailwind .overflow-y-auto {
|
|
2183
|
+
overflow-y: auto !important;
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
.tina-tailwind .overflow-ellipsis {
|
|
2187
|
+
text-overflow: ellipsis !important;
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
.tina-tailwind .whitespace-nowrap {
|
|
2191
|
+
white-space: nowrap !important;
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
.tina-tailwind .rounded-lg {
|
|
2195
|
+
border-radius: 8px !important;
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2198
|
+
.tina-tailwind .rounded-full {
|
|
2199
|
+
border-radius: 9999px !important;
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
.tina-tailwind .rounded-md {
|
|
2203
|
+
border-radius: 6px !important;
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
.tina-tailwind .border {
|
|
2207
|
+
border-width: 1px !important;
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
.tina-tailwind .border-b {
|
|
2211
|
+
border-bottom-width: 1px !important;
|
|
2212
|
+
}
|
|
2213
|
+
|
|
2214
|
+
.tina-tailwind .border-r {
|
|
2215
|
+
border-right-width: 1px !important;
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
.tina-tailwind .border-gray-200 {
|
|
2219
|
+
--tw-border-opacity: 1 !important;
|
|
2220
|
+
border-color: rgba(225, 221, 236, var(--tw-border-opacity)) !important;
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
.tina-tailwind .border-transparent {
|
|
2224
|
+
border-color: transparent !important;
|
|
2225
|
+
}
|
|
2226
|
+
|
|
2227
|
+
.tina-tailwind .bg-white {
|
|
2228
|
+
--tw-bg-opacity: 1 !important;
|
|
2229
|
+
background-color: rgba(255, 255, 255, var(--tw-bg-opacity)) !important;
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
.tina-tailwind .bg-gray-50 {
|
|
2233
|
+
--tw-bg-opacity: 1 !important;
|
|
2234
|
+
background-color: rgba(246, 246, 249, var(--tw-bg-opacity)) !important;
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
.tina-tailwind .bg-transparent {
|
|
2238
|
+
background-color: transparent !important;
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
.tina-tailwind .bg-gradient-to-b {
|
|
2242
|
+
background-image: linear-gradient(to bottom, var(--tw-gradient-stops)) !important;
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
.tina-tailwind .from-blue-900 {
|
|
2246
|
+
--tw-gradient-from: #1D2C6C !important;
|
|
2247
|
+
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(29, 44, 108, 0)) !important;
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
.tina-tailwind .from-white {
|
|
2251
|
+
--tw-gradient-from: #fff !important;
|
|
2252
|
+
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 255, 255, 0)) !important;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
.tina-tailwind .to-gray-900 {
|
|
2256
|
+
--tw-gradient-to: #252336 !important;
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2259
|
+
.tina-tailwind .to-gray-50 {
|
|
2260
|
+
--tw-gradient-to: #F6F6F9 !important;
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
.tina-tailwind .px-4 {
|
|
2264
|
+
padding-left: 16px !important;
|
|
2265
|
+
padding-right: 16px !important;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
.tina-tailwind .py-6 {
|
|
2269
|
+
padding-top: 24px !important;
|
|
2270
|
+
padding-bottom: 24px !important;
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
.tina-tailwind .px-5 {
|
|
2274
|
+
padding-left: 20px !important;
|
|
2275
|
+
padding-right: 20px !important;
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
.tina-tailwind .py-4 {
|
|
2279
|
+
padding-top: 16px !important;
|
|
2280
|
+
padding-bottom: 16px !important;
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2283
|
+
.tina-tailwind .px-6 {
|
|
2284
|
+
padding-left: 24px !important;
|
|
2285
|
+
padding-right: 24px !important;
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
.tina-tailwind .py-1 {
|
|
2289
|
+
padding-top: 4px !important;
|
|
2290
|
+
padding-bottom: 4px !important;
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
.tina-tailwind .py-2 {
|
|
2294
|
+
padding-top: 8px !important;
|
|
2295
|
+
padding-bottom: 8px !important;
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
.tina-tailwind .py-7 {
|
|
2299
|
+
padding-top: 28px !important;
|
|
2300
|
+
padding-bottom: 28px !important;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
.tina-tailwind .px-8 {
|
|
2304
|
+
padding-left: 32px !important;
|
|
2305
|
+
padding-right: 32px !important;
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
.tina-tailwind .py-2\\.5 {
|
|
2309
|
+
padding-top: 10px !important;
|
|
2310
|
+
padding-bottom: 10px !important;
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
.tina-tailwind .py-14 {
|
|
2314
|
+
padding-top: 56px !important;
|
|
2315
|
+
padding-bottom: 56px !important;
|
|
2316
|
+
}
|
|
2317
|
+
|
|
2318
|
+
.tina-tailwind .py-3 {
|
|
2319
|
+
padding-top: 12px !important;
|
|
2320
|
+
padding-bottom: 12px !important;
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
.tina-tailwind .py-1\\.5 {
|
|
2324
|
+
padding-top: 6px !important;
|
|
2325
|
+
padding-bottom: 6px !important;
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
.tina-tailwind .py-10 {
|
|
2329
|
+
padding-top: 40px !important;
|
|
2330
|
+
padding-bottom: 40px !important;
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
.tina-tailwind .pt-16 {
|
|
2334
|
+
padding-top: 64px !important;
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
.tina-tailwind .pb-10 {
|
|
2338
|
+
padding-bottom: 40px !important;
|
|
2339
|
+
}
|
|
2340
|
+
|
|
2341
|
+
.tina-tailwind .text-left {
|
|
2342
|
+
text-align: left !important;
|
|
2343
|
+
}
|
|
2344
|
+
|
|
2345
|
+
.tina-tailwind .text-center {
|
|
2346
|
+
text-align: center !important;
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
.tina-tailwind .font-sans {
|
|
2350
|
+
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;
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
.tina-tailwind .text-2xl {
|
|
2354
|
+
font-size: 24px !important;
|
|
2355
|
+
line-height: 1.33 !important;
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
.tina-tailwind .text-base {
|
|
2359
|
+
font-size: 16px !important;
|
|
2360
|
+
line-height: 1.5 !important;
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
.tina-tailwind .text-lg {
|
|
2364
|
+
font-size: 18px !important;
|
|
2365
|
+
line-height: 1.55 !important;
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
.tina-tailwind .text-sm {
|
|
2369
|
+
font-size: 14px !important;
|
|
2370
|
+
line-height: 1.43 !important;
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
.tina-tailwind .text-md {
|
|
2374
|
+
font-size: 16px !important;
|
|
2375
|
+
line-height: 1.5 !important;
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
.tina-tailwind .text-3xl {
|
|
2379
|
+
font-size: 30px !important;
|
|
2380
|
+
line-height: 1.2 !important;
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
.tina-tailwind .text-xs {
|
|
2384
|
+
font-size: 13px !important;
|
|
2385
|
+
line-height: 1.33 !important;
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
.tina-tailwind .text-4xl {
|
|
2389
|
+
font-size: 36px !important;
|
|
2390
|
+
line-height: 1.1 !important;
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
.tina-tailwind .font-bold {
|
|
2394
|
+
font-weight: 700 !important;
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2397
|
+
.tina-tailwind .font-medium {
|
|
2398
|
+
font-weight: 500 !important;
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2401
|
+
.tina-tailwind .uppercase {
|
|
2402
|
+
text-transform: uppercase !important;
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
.tina-tailwind .italic {
|
|
2406
|
+
font-style: italic !important;
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
.tina-tailwind .leading-normal {
|
|
2410
|
+
line-height: 1.5 !important;
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
.tina-tailwind .leading-4 {
|
|
2414
|
+
line-height: 16px !important;
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
.tina-tailwind .leading-5 {
|
|
2418
|
+
line-height: 20px !important;
|
|
2419
|
+
}
|
|
2420
|
+
|
|
2421
|
+
.tina-tailwind .tracking-wide {
|
|
2422
|
+
letter-spacing: 0.025em !important;
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2425
|
+
.tina-tailwind .text-gray-700 {
|
|
2426
|
+
--tw-text-opacity: 1 !important;
|
|
2427
|
+
color: rgba(67, 62, 82, var(--tw-text-opacity)) !important;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
.tina-tailwind .text-gray-800 {
|
|
2431
|
+
--tw-text-opacity: 1 !important;
|
|
2432
|
+
color: rgba(54, 49, 69, var(--tw-text-opacity)) !important;
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
.tina-tailwind .text-gray-600 {
|
|
2436
|
+
--tw-text-opacity: 1 !important;
|
|
2437
|
+
color: rgba(86, 81, 101, var(--tw-text-opacity)) !important;
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
.tina-tailwind .text-blue-400 {
|
|
2441
|
+
--tw-text-opacity: 1 !important;
|
|
2442
|
+
color: rgba(34, 150, 254, var(--tw-text-opacity)) !important;
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2445
|
+
.tina-tailwind .text-blue-600 {
|
|
2446
|
+
--tw-text-opacity: 1 !important;
|
|
2447
|
+
color: rgba(5, 116, 228, var(--tw-text-opacity)) !important;
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
.tina-tailwind .text-white {
|
|
2451
|
+
--tw-text-opacity: 1 !important;
|
|
2452
|
+
color: rgba(255, 255, 255, var(--tw-text-opacity)) !important;
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
.tina-tailwind .text-gray-400 {
|
|
2456
|
+
--tw-text-opacity: 1 !important;
|
|
2457
|
+
color: rgba(145, 140, 158, var(--tw-text-opacity)) !important;
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
.tina-tailwind .text-gray-300 {
|
|
2461
|
+
--tw-text-opacity: 1 !important;
|
|
2462
|
+
color: rgba(178, 173, 190, var(--tw-text-opacity)) !important;
|
|
2463
|
+
}
|
|
2464
|
+
|
|
2465
|
+
.tina-tailwind .text-gray-500 {
|
|
2466
|
+
--tw-text-opacity: 1 !important;
|
|
2467
|
+
color: rgba(113, 108, 127, var(--tw-text-opacity)) !important;
|
|
2468
|
+
}
|
|
2469
|
+
|
|
2470
|
+
.tina-tailwind .underline {
|
|
2471
|
+
text-decoration: underline !important;
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
.tina-tailwind .opacity-80 {
|
|
2475
|
+
opacity: .8 !important;
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
.tina-tailwind .opacity-50 {
|
|
2479
|
+
opacity: .5 !important;
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
.tina-tailwind .opacity-100 {
|
|
2483
|
+
opacity: 1 !important;
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
.tina-tailwind .opacity-0 {
|
|
2487
|
+
opacity: 0 !important;
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
.tina-tailwind .opacity-90 {
|
|
2491
|
+
opacity: .9 !important;
|
|
2492
|
+
}
|
|
2493
|
+
|
|
2494
|
+
.tina-tailwind .opacity-70 {
|
|
2495
|
+
opacity: .7 !important;
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
.tina-tailwind .shadow-lg {
|
|
2499
|
+
--tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
|
|
2500
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
.tina-tailwind .shadow-sm {
|
|
2504
|
+
--tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
|
|
2505
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
|
|
2506
|
+
}
|
|
2507
|
+
|
|
2508
|
+
.tina-tailwind .shadow {
|
|
2509
|
+
--tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
|
|
2510
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
.tina-tailwind .ring-1 {
|
|
2514
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;
|
|
2515
|
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;
|
|
2516
|
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000) !important;
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
.tina-tailwind .ring-black {
|
|
2520
|
+
--tw-ring-opacity: 1 !important;
|
|
2521
|
+
--tw-ring-color: rgba(0, 0, 0, var(--tw-ring-opacity)) !important;
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
.tina-tailwind .ring-opacity-5 {
|
|
2525
|
+
--tw-ring-opacity: .05 !important;
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
.tina-tailwind .filter {
|
|
2529
|
+
filter: var(--tw-filter) !important;
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
.tina-tailwind .transition-colors {
|
|
2533
|
+
transition-property: background-color, border-color, color, fill, stroke !important;
|
|
2534
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
|
|
2535
|
+
transition-duration: 150ms !important;
|
|
2536
|
+
}
|
|
2537
|
+
|
|
2538
|
+
.tina-tailwind .transition-opacity {
|
|
2539
|
+
transition-property: opacity !important;
|
|
2540
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
|
|
2541
|
+
transition-duration: 150ms !important;
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
.tina-tailwind .transition-all {
|
|
2545
|
+
transition-property: all !important;
|
|
2546
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
|
|
2547
|
+
transition-duration: 150ms !important;
|
|
2548
|
+
}
|
|
2549
|
+
|
|
2550
|
+
.tina-tailwind .transition {
|
|
2551
|
+
transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter !important;
|
|
2552
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
|
|
2553
|
+
transition-duration: 150ms !important;
|
|
2554
|
+
}
|
|
2555
|
+
|
|
2556
|
+
.tina-tailwind .duration-150 {
|
|
2557
|
+
transition-duration: 150ms !important;
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2560
|
+
.tina-tailwind .duration-300 {
|
|
2561
|
+
transition-duration: 300ms !important;
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
.tina-tailwind .duration-75 {
|
|
2565
|
+
transition-duration: 75ms !important;
|
|
2566
|
+
}
|
|
2567
|
+
|
|
2568
|
+
.tina-tailwind .duration-100 {
|
|
2569
|
+
transition-duration: 100ms !important;
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
.tina-tailwind .ease-out {
|
|
2573
|
+
transition-timing-function: cubic-bezier(0, 0, 0.2, 1) !important;
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2576
|
+
.tina-tailwind .ease-in-out {
|
|
2577
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
.tina-tailwind .ease-in {
|
|
2581
|
+
transition-timing-function: cubic-bezier(0.4, 0, 1, 1) !important;
|
|
2582
|
+
}
|
|
2583
|
+
|
|
2584
|
+
.tina-tailwind {
|
|
2585
|
+
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";
|
|
2586
|
+
--tw-text-opacity: 1;
|
|
2587
|
+
color: rgba(86, 81, 101, var(--tw-text-opacity));
|
|
2588
|
+
}
|
|
2589
|
+
|
|
2590
|
+
.hover\\:bg-gray-50:hover {
|
|
2591
|
+
--tw-bg-opacity: 1 !important;
|
|
2592
|
+
background-color: rgba(246, 246, 249, var(--tw-bg-opacity)) !important;
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
.hover\\:text-blue-600:hover {
|
|
2596
|
+
--tw-text-opacity: 1 !important;
|
|
2597
|
+
color: rgba(5, 116, 228, var(--tw-text-opacity)) !important;
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
.hover\\:text-blue-500:hover {
|
|
2601
|
+
--tw-text-opacity: 1 !important;
|
|
2602
|
+
color: rgba(0, 132, 255, var(--tw-text-opacity)) !important;
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2605
|
+
.hover\\:opacity-100:hover {
|
|
2606
|
+
opacity: 1 !important;
|
|
2607
|
+
}
|
|
2608
|
+
|
|
2609
|
+
.hover\\:opacity-80:hover {
|
|
2610
|
+
opacity: .8 !important;
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
.focus\\:outline-none:focus {
|
|
2614
|
+
outline: 2px solid transparent !important;
|
|
2615
|
+
outline-offset: 2px !important;
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
.group:hover .group-hover\\:opacity-100 {
|
|
2619
|
+
opacity: 1 !important;
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2622
|
+
.group:hover .group-hover\\:opacity-80 {
|
|
2623
|
+
opacity: .8 !important;
|
|
2624
|
+
}
|
|
2625
|
+
|
|
2626
|
+
@media (min-width: 640px) {
|
|
2627
|
+
|
|
2628
|
+
.sm\\:rounded-lg {
|
|
2629
|
+
border-radius: 8px !important;
|
|
2630
|
+
}
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
@media (min-width: 1024px) {
|
|
2634
|
+
|
|
2635
|
+
.lg\\:w-96 {
|
|
2636
|
+
width: 384px !important;
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
`;
|
|
2640
|
+
function useTina({
|
|
2641
|
+
query,
|
|
2642
|
+
variables,
|
|
2643
|
+
data
|
|
2644
|
+
}) {
|
|
2645
|
+
const {
|
|
2646
|
+
setRequest,
|
|
2647
|
+
state,
|
|
2648
|
+
isDummyContainer,
|
|
2649
|
+
isLoading: contextLoading
|
|
2650
|
+
} = React__default["default"].useContext(sharedctx.TinaDataContext);
|
|
2651
|
+
const [waitForContextRerender, setWaitForContextRerender] = React.useState(!isDummyContainer);
|
|
2652
|
+
const isLoading = contextLoading || waitForContextRerender;
|
|
2653
|
+
React__default["default"].useEffect(() => {
|
|
2654
|
+
setRequest({ query, variables });
|
|
2655
|
+
}, [JSON.stringify(variables), query]);
|
|
2656
|
+
React.useEffect(() => {
|
|
2657
|
+
if (!isDummyContainer) {
|
|
2658
|
+
setTimeout(() => setWaitForContextRerender(false), 0);
|
|
1406
2659
|
}
|
|
1407
2660
|
return () => {
|
|
1408
|
-
|
|
1409
|
-
cms.plugins.remove(plugin);
|
|
1410
|
-
}
|
|
2661
|
+
setRequest(void 0);
|
|
1411
2662
|
};
|
|
1412
|
-
}, [
|
|
1413
|
-
|
|
2663
|
+
}, [isDummyContainer]);
|
|
2664
|
+
return {
|
|
2665
|
+
data: isDummyContainer || isLoading ? data : state.payload,
|
|
2666
|
+
isLoading
|
|
2667
|
+
};
|
|
2668
|
+
}
|
|
1414
2669
|
const errorButtonStyles = {
|
|
1415
2670
|
background: "#eb6337",
|
|
1416
2671
|
padding: "12px 18px",
|
|
@@ -1423,22 +2678,6 @@ mutation addPendingDocumentMutation(
|
|
|
1423
2678
|
color: "white",
|
|
1424
2679
|
margin: "1rem 0"
|
|
1425
2680
|
};
|
|
1426
|
-
const SetupHooks = (props) => {
|
|
1427
|
-
const cms = toolkit.useCMS();
|
|
1428
|
-
const [payload, isLoading] = useGraphqlForms({
|
|
1429
|
-
query: (gql2) => gql2(props.query),
|
|
1430
|
-
variables: props.variables || {},
|
|
1431
|
-
formify: (args) => {
|
|
1432
|
-
if (props.formifyCallback) {
|
|
1433
|
-
return props.formifyCallback(args, cms);
|
|
1434
|
-
} else {
|
|
1435
|
-
return args.createForm(args.formConfig);
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
});
|
|
1439
|
-
useDocumentCreatorPlugin(props.documentCreatorCallback);
|
|
1440
|
-
return /* @__PURE__ */ React__default["default"].createElement(ErrorBoundary, null, isLoading ? /* @__PURE__ */ React__default["default"].createElement(Loader, null, props.children(props)) : props.children(__spreadProps(__spreadValues({}, props), { data: payload })));
|
|
1441
|
-
};
|
|
1442
2681
|
class ErrorBoundary extends React__default["default"].Component {
|
|
1443
2682
|
constructor(props) {
|
|
1444
2683
|
super(props);
|
|
@@ -1513,20 +2752,16 @@ mutation addPendingDocumentMutation(
|
|
|
1513
2752
|
};
|
|
1514
2753
|
const TinaCMSProvider2 = (_c) => {
|
|
1515
2754
|
var _d = _c, {
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
tinaioConfig
|
|
2755
|
+
query,
|
|
2756
|
+
documentCreatorCallback,
|
|
2757
|
+
formifyCallback
|
|
1520
2758
|
} = _d, props = __objRest(_d, [
|
|
1521
|
-
"
|
|
1522
|
-
"
|
|
1523
|
-
"
|
|
1524
|
-
"tinaioConfig"
|
|
2759
|
+
"query",
|
|
2760
|
+
"documentCreatorCallback",
|
|
2761
|
+
"formifyCallback"
|
|
1525
2762
|
]);
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
}
|
|
1529
|
-
if (!props.apiURL && !((props == null ? void 0 : props.clientId) || (props == null ? void 0 : props.isLocalClient))) {
|
|
2763
|
+
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);
|
|
2764
|
+
if (!props.apiURL && !validOldSetup) {
|
|
1530
2765
|
throw new Error(`apiURL is a required field`);
|
|
1531
2766
|
}
|
|
1532
2767
|
const { branch, clientId, isLocalClient } = props.apiURL ? parseURL(props.apiURL) : {
|
|
@@ -1534,18 +2769,86 @@ mutation addPendingDocumentMutation(
|
|
|
1534
2769
|
clientId: props.clientId,
|
|
1535
2770
|
isLocalClient: props.isLocalClient
|
|
1536
2771
|
};
|
|
1537
|
-
return /* @__PURE__ */ React__default["default"].createElement(TinaCloudProvider, {
|
|
2772
|
+
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, /* @__PURE__ */ React__default["default"].createElement(TinaCloudProvider, {
|
|
1538
2773
|
branch,
|
|
1539
2774
|
clientId,
|
|
1540
|
-
tinaioConfig,
|
|
2775
|
+
tinaioConfig: props.tinaioConfig,
|
|
1541
2776
|
isLocalClient,
|
|
1542
|
-
cmsCallback,
|
|
1543
|
-
mediaStore
|
|
1544
|
-
},
|
|
1545
|
-
|
|
1546
|
-
}, props), {
|
|
1547
|
-
|
|
1548
|
-
|
|
2777
|
+
cmsCallback: props.cmsCallback,
|
|
2778
|
+
mediaStore: props.mediaStore
|
|
2779
|
+
}, /* @__PURE__ */ React__default["default"].createElement("style", null, styles), /* @__PURE__ */ React__default["default"].createElement(ErrorBoundary, null, /* @__PURE__ */ React__default["default"].createElement(DocumentCreator, null), /* @__PURE__ */ React__default["default"].createElement(TinaDataProvider, {
|
|
2780
|
+
formifyCallback
|
|
2781
|
+
}, typeof props.children == "function" ? /* @__PURE__ */ React__default["default"].createElement(TinaQuery, __spreadProps(__spreadValues({}, props), {
|
|
2782
|
+
variables: props.variables,
|
|
2783
|
+
data: props.data,
|
|
2784
|
+
query,
|
|
2785
|
+
formifyCallback,
|
|
2786
|
+
children: props.children
|
|
2787
|
+
})) : props.children))));
|
|
2788
|
+
};
|
|
2789
|
+
const DocumentCreator = ({
|
|
2790
|
+
documentCreatorCallback
|
|
2791
|
+
}) => {
|
|
2792
|
+
useDocumentCreatorPlugin(documentCreatorCallback);
|
|
2793
|
+
return null;
|
|
2794
|
+
};
|
|
2795
|
+
const TinaQuery = (props) => {
|
|
2796
|
+
return /* @__PURE__ */ React__default["default"].createElement(TinaQueryInner, __spreadValues({
|
|
2797
|
+
key: `rootQuery-${props.query}`
|
|
2798
|
+
}, props));
|
|
2799
|
+
};
|
|
2800
|
+
const TinaQueryInner = (_e) => {
|
|
2801
|
+
var _f = _e, { children } = _f, props = __objRest(_f, ["children"]);
|
|
2802
|
+
const { data: liveData, isLoading } = useTina({
|
|
2803
|
+
query: props.query,
|
|
2804
|
+
variables: props.variables,
|
|
2805
|
+
data: props.data
|
|
2806
|
+
});
|
|
2807
|
+
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children(isLoading ? props : __spreadProps(__spreadValues({}, props), { data: liveData })));
|
|
2808
|
+
};
|
|
2809
|
+
const TinaDataProvider = ({
|
|
2810
|
+
children,
|
|
2811
|
+
formifyCallback
|
|
2812
|
+
}) => {
|
|
2813
|
+
const [request, setRequest] = React.useState();
|
|
2814
|
+
const [state, setState] = React__default["default"].useState({
|
|
2815
|
+
payload: void 0,
|
|
2816
|
+
isLoading: true
|
|
2817
|
+
});
|
|
2818
|
+
return /* @__PURE__ */ React__default["default"].createElement(sharedctx.TinaDataContext.Provider, {
|
|
2819
|
+
value: {
|
|
2820
|
+
setRequest,
|
|
2821
|
+
isLoading: state.isLoading,
|
|
2822
|
+
state: { payload: state.payload }
|
|
2823
|
+
}
|
|
2824
|
+
}, /* @__PURE__ */ React__default["default"].createElement(FormRegistrar, {
|
|
2825
|
+
key: request == null ? void 0 : request.query,
|
|
2826
|
+
request,
|
|
2827
|
+
formifyCallback,
|
|
2828
|
+
onPayloadStateChange: setState
|
|
2829
|
+
}), children);
|
|
2830
|
+
};
|
|
2831
|
+
const FormRegistrar = ({
|
|
2832
|
+
request,
|
|
2833
|
+
formifyCallback,
|
|
2834
|
+
onPayloadStateChange
|
|
2835
|
+
}) => {
|
|
2836
|
+
const cms = toolkit.useCMS();
|
|
2837
|
+
const [payload, isLoading] = useGraphqlForms({
|
|
2838
|
+
query: request == null ? void 0 : request.query,
|
|
2839
|
+
variables: request == null ? void 0 : request.variables,
|
|
2840
|
+
formify: (args) => {
|
|
2841
|
+
if (formifyCallback) {
|
|
2842
|
+
return formifyCallback(args, cms);
|
|
2843
|
+
} else {
|
|
2844
|
+
return args.createForm(args.formConfig);
|
|
2845
|
+
}
|
|
2846
|
+
}
|
|
2847
|
+
});
|
|
2848
|
+
React__default["default"].useEffect(() => {
|
|
2849
|
+
onPayloadStateChange({ payload, isLoading });
|
|
2850
|
+
}, [JSON.stringify(payload)]);
|
|
2851
|
+
return isLoading ? /* @__PURE__ */ React__default["default"].createElement(Loader, null, /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null)) : null;
|
|
1549
2852
|
};
|
|
1550
2853
|
const Loader = (props) => {
|
|
1551
2854
|
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
@@ -1691,7 +2994,8 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
1691
2994
|
return str;
|
|
1692
2995
|
}
|
|
1693
2996
|
const Layout = ({ children }) => {
|
|
1694
|
-
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
2997
|
+
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, /* @__PURE__ */ React__default["default"].createElement("style", null, styles), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
2998
|
+
className: "tina-tailwind",
|
|
1695
2999
|
style: {
|
|
1696
3000
|
position: "fixed",
|
|
1697
3001
|
top: 0,
|
|
@@ -1700,21 +3004,196 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
1700
3004
|
height: "100%",
|
|
1701
3005
|
overflow: "auto",
|
|
1702
3006
|
background: "#F6F6F9",
|
|
3007
|
+
fontFamily: "'Inter', sans-serif",
|
|
1703
3008
|
zIndex: 9999
|
|
1704
3009
|
}
|
|
1705
|
-
}, children);
|
|
3010
|
+
}, children));
|
|
3011
|
+
};
|
|
3012
|
+
var DefaultContext = {
|
|
3013
|
+
color: void 0,
|
|
3014
|
+
size: void 0,
|
|
3015
|
+
className: void 0,
|
|
3016
|
+
style: void 0,
|
|
3017
|
+
attr: void 0
|
|
3018
|
+
};
|
|
3019
|
+
var IconContext = React__default["default"].createContext && React__default["default"].createContext(DefaultContext);
|
|
3020
|
+
var __assign = function() {
|
|
3021
|
+
__assign = Object.assign || function(t) {
|
|
3022
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3023
|
+
s = arguments[i];
|
|
3024
|
+
for (var p in s)
|
|
3025
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
3026
|
+
t[p] = s[p];
|
|
3027
|
+
}
|
|
3028
|
+
return t;
|
|
3029
|
+
};
|
|
3030
|
+
return __assign.apply(this, arguments);
|
|
3031
|
+
};
|
|
3032
|
+
var __rest = function(s, e) {
|
|
3033
|
+
var t = {};
|
|
3034
|
+
for (var p in s)
|
|
3035
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3036
|
+
t[p] = s[p];
|
|
3037
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
3038
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
3039
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
3040
|
+
t[p[i]] = s[p[i]];
|
|
3041
|
+
}
|
|
3042
|
+
return t;
|
|
1706
3043
|
};
|
|
3044
|
+
function Tree2Element(tree) {
|
|
3045
|
+
return tree && tree.map(function(node, i) {
|
|
3046
|
+
return React__default["default"].createElement(node.tag, __assign({
|
|
3047
|
+
key: i
|
|
3048
|
+
}, node.attr), Tree2Element(node.child));
|
|
3049
|
+
});
|
|
3050
|
+
}
|
|
3051
|
+
function GenIcon(data) {
|
|
3052
|
+
return function(props) {
|
|
3053
|
+
return React__default["default"].createElement(IconBase, __assign({
|
|
3054
|
+
attr: __assign({}, data.attr)
|
|
3055
|
+
}, props), Tree2Element(data.child));
|
|
3056
|
+
};
|
|
3057
|
+
}
|
|
3058
|
+
function IconBase(props) {
|
|
3059
|
+
var elem = function(conf) {
|
|
3060
|
+
var attr = props.attr, size = props.size, title = props.title, svgProps = __rest(props, ["attr", "size", "title"]);
|
|
3061
|
+
var computedSize = size || conf.size || "1em";
|
|
3062
|
+
var className;
|
|
3063
|
+
if (conf.className)
|
|
3064
|
+
className = conf.className;
|
|
3065
|
+
if (props.className)
|
|
3066
|
+
className = (className ? className + " " : "") + props.className;
|
|
3067
|
+
return React__default["default"].createElement("svg", __assign({
|
|
3068
|
+
stroke: "currentColor",
|
|
3069
|
+
fill: "currentColor",
|
|
3070
|
+
strokeWidth: "0"
|
|
3071
|
+
}, conf.attr, attr, svgProps, {
|
|
3072
|
+
className,
|
|
3073
|
+
style: __assign(__assign({
|
|
3074
|
+
color: props.color || conf.color
|
|
3075
|
+
}, conf.style), props.style),
|
|
3076
|
+
height: computedSize,
|
|
3077
|
+
width: computedSize,
|
|
3078
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
3079
|
+
}), title && React__default["default"].createElement("title", null, title), props.children);
|
|
3080
|
+
};
|
|
3081
|
+
return IconContext !== void 0 ? React__default["default"].createElement(IconContext.Consumer, null, function(conf) {
|
|
3082
|
+
return elem(conf);
|
|
3083
|
+
}) : elem(DefaultContext);
|
|
3084
|
+
}
|
|
3085
|
+
function BiEdit(props) {
|
|
3086
|
+
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);
|
|
3087
|
+
}
|
|
3088
|
+
function BiExit(props) {
|
|
3089
|
+
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);
|
|
3090
|
+
}
|
|
3091
|
+
function BiLinkExternal(props) {
|
|
3092
|
+
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);
|
|
3093
|
+
}
|
|
3094
|
+
function BiLogIn(props) {
|
|
3095
|
+
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);
|
|
3096
|
+
}
|
|
3097
|
+
function BiLogOut(props) {
|
|
3098
|
+
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);
|
|
3099
|
+
}
|
|
1707
3100
|
function ImFilesEmpty(props) {
|
|
1708
3101
|
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);
|
|
1709
3102
|
}
|
|
1710
3103
|
function VscOpenPreview(props) {
|
|
1711
3104
|
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);
|
|
1712
3105
|
}
|
|
3106
|
+
class TinaAdminApi {
|
|
3107
|
+
constructor(TinaApi) {
|
|
3108
|
+
this.api = TinaApi;
|
|
3109
|
+
}
|
|
3110
|
+
async fetchCollections() {
|
|
3111
|
+
const response = await this.api.request(`query{ getCollections { label, name } }`, { variables: {} });
|
|
3112
|
+
return response;
|
|
3113
|
+
}
|
|
3114
|
+
async fetchCollection(collectionName, includeDocuments) {
|
|
3115
|
+
const response = await this.api.request(`
|
|
3116
|
+
query($collection: String!, $includeDocuments: Boolean!){
|
|
3117
|
+
getCollection(collection: $collection){
|
|
3118
|
+
name
|
|
3119
|
+
label
|
|
3120
|
+
format
|
|
3121
|
+
templates
|
|
3122
|
+
documents @include(if: $includeDocuments) {
|
|
3123
|
+
totalCount
|
|
3124
|
+
edges {
|
|
3125
|
+
node {
|
|
3126
|
+
... on Document {
|
|
3127
|
+
sys {
|
|
3128
|
+
template
|
|
3129
|
+
breadcrumbs
|
|
3130
|
+
path
|
|
3131
|
+
basename
|
|
3132
|
+
relativePath
|
|
3133
|
+
filename
|
|
3134
|
+
extension
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
}
|
|
3141
|
+
}`, { variables: { collection: collectionName, includeDocuments } });
|
|
3142
|
+
return response;
|
|
3143
|
+
}
|
|
3144
|
+
async fetchDocument(collectionName, relativePath) {
|
|
3145
|
+
const response = await this.api.request(`
|
|
3146
|
+
query($collection: String!, $relativePath: String!) {
|
|
3147
|
+
getDocument(collection:$collection, relativePath:$relativePath) {
|
|
3148
|
+
... on Document {
|
|
3149
|
+
form
|
|
3150
|
+
values
|
|
3151
|
+
}
|
|
3152
|
+
}
|
|
3153
|
+
}`, { variables: { collection: collectionName, relativePath } });
|
|
3154
|
+
return response;
|
|
3155
|
+
}
|
|
3156
|
+
async fetchDocumentFields() {
|
|
3157
|
+
const response = await this.api.request(`query { getDocumentFields }`, { variables: {} });
|
|
3158
|
+
return response;
|
|
3159
|
+
}
|
|
3160
|
+
async createDocument(collectionName, relativePath, params) {
|
|
3161
|
+
const response = await this.api.request(`mutation($collection: String!, $relativePath: String!, $params: DocumentMutation!) {
|
|
3162
|
+
createDocument(
|
|
3163
|
+
collection: $collection,
|
|
3164
|
+
relativePath: $relativePath,
|
|
3165
|
+
}`, {
|
|
3166
|
+
variables: {
|
|
3167
|
+
collection: collectionName,
|
|
3168
|
+
relativePath,
|
|
3169
|
+
params
|
|
3170
|
+
}
|
|
3171
|
+
});
|
|
3172
|
+
return response;
|
|
3173
|
+
}
|
|
3174
|
+
async updateDocument(collectionName, relativePath, params) {
|
|
3175
|
+
const response = await this.api.request(`mutation($collection: String!, $relativePath: String!, $params: DocumentMutation!) {
|
|
3176
|
+
updateDocument(
|
|
3177
|
+
collection: $collection,
|
|
3178
|
+
relativePath: $relativePath,
|
|
3179
|
+
params: $params
|
|
3180
|
+
){__typename}
|
|
3181
|
+
}`, {
|
|
3182
|
+
variables: {
|
|
3183
|
+
collection: collectionName,
|
|
3184
|
+
relativePath,
|
|
3185
|
+
params
|
|
3186
|
+
}
|
|
3187
|
+
});
|
|
3188
|
+
return response;
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
1713
3191
|
const useGetCollections = (cms) => {
|
|
3192
|
+
const api = new TinaAdminApi(cms.api.tina);
|
|
1714
3193
|
const [collections, setCollections] = React.useState([]);
|
|
1715
3194
|
React.useEffect(() => {
|
|
1716
3195
|
const fetchCollections = async () => {
|
|
1717
|
-
const response = await
|
|
3196
|
+
const response = await api.fetchCollections();
|
|
1718
3197
|
setCollections(response.getCollections);
|
|
1719
3198
|
};
|
|
1720
3199
|
fetchCollections();
|
|
@@ -1898,36 +3377,11 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
1898
3377
|
}, "This is your dashboard for editing or creating content. Select a collection on the left to begin."))));
|
|
1899
3378
|
};
|
|
1900
3379
|
const useGetCollection = (cms, collectionName, includeDocuments = true) => {
|
|
3380
|
+
const api = new TinaAdminApi(cms.api.tina);
|
|
1901
3381
|
const [collection, setCollection] = React.useState(void 0);
|
|
1902
3382
|
React.useEffect(() => {
|
|
1903
3383
|
const fetchCollection = async () => {
|
|
1904
|
-
const response = await
|
|
1905
|
-
query($collection: String!, $includeDocuments: Boolean!){
|
|
1906
|
-
getCollection(collection: $collection){
|
|
1907
|
-
name
|
|
1908
|
-
label
|
|
1909
|
-
format
|
|
1910
|
-
templates
|
|
1911
|
-
documents @include(if: $includeDocuments) {
|
|
1912
|
-
totalCount
|
|
1913
|
-
edges {
|
|
1914
|
-
node {
|
|
1915
|
-
... on Document {
|
|
1916
|
-
sys {
|
|
1917
|
-
template
|
|
1918
|
-
breadcrumbs
|
|
1919
|
-
path
|
|
1920
|
-
basename
|
|
1921
|
-
relativePath
|
|
1922
|
-
filename
|
|
1923
|
-
extension
|
|
1924
|
-
}
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
}
|
|
1928
|
-
}
|
|
1929
|
-
}
|
|
1930
|
-
}`, { variables: { collection: collectionName, includeDocuments } });
|
|
3384
|
+
const response = await api.fetchCollection(collectionName, includeDocuments);
|
|
1931
3385
|
setCollection(response.getCollection);
|
|
1932
3386
|
};
|
|
1933
3387
|
fetchCollection();
|
|
@@ -2017,37 +3471,37 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2017
3471
|
className: "min-w-full"
|
|
2018
3472
|
}, /* @__PURE__ */ React__default["default"].createElement("tbody", {
|
|
2019
3473
|
className: "bg-white divide-y divide-gray-150"
|
|
2020
|
-
}, documents.map((
|
|
2021
|
-
const livesiteRoute = routeMapping ? routeMapping.mapper(collection,
|
|
3474
|
+
}, documents.map((document) => {
|
|
3475
|
+
const livesiteRoute = routeMapping ? routeMapping.mapper(collection, document.node) : void 0;
|
|
2022
3476
|
return /* @__PURE__ */ React__default["default"].createElement("tr", {
|
|
2023
|
-
key:
|
|
3477
|
+
key: document.node.sys.relativePath
|
|
2024
3478
|
}, /* @__PURE__ */ React__default["default"].createElement("td", {
|
|
2025
3479
|
className: "px-5 py-3 whitespace-nowrap"
|
|
2026
3480
|
}, /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
2027
3481
|
className: "block text-xs mb-0.5 text-gray-400 uppercase"
|
|
2028
3482
|
}, "Filename"), /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.Link, {
|
|
2029
|
-
to: `${location2.pathname}/${
|
|
3483
|
+
to: `${location2.pathname}/${document.node.sys.filename}`,
|
|
2030
3484
|
className: "h-5 leading-5 flex max-w-xs"
|
|
2031
3485
|
}, /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
2032
3486
|
className: "flex-shrink-1 leading-5 font-medium text-base overflow-ellipsis overflow-hidden whitespace-nowrap text-gray-700"
|
|
2033
|
-
},
|
|
3487
|
+
}, document.node.sys.filename), /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
2034
3488
|
className: "flex-shrink-0 leading-5 text-base font-medium text-gray-300"
|
|
2035
|
-
},
|
|
3489
|
+
}, document.node.sys.extension))), /* @__PURE__ */ React__default["default"].createElement("td", {
|
|
2036
3490
|
className: "px-5 py-3 whitespace-nowrap"
|
|
2037
3491
|
}, /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
2038
3492
|
className: "block text-xs mb-0.5 text-gray-400 uppercase"
|
|
2039
3493
|
}, "Template"), /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
2040
3494
|
className: "h-5 block leading-5 font-regular text-base overflow-ellipsis overflow-hidden whitespace-nowrap text-gray-500"
|
|
2041
|
-
},
|
|
3495
|
+
}, document.node.sys.template)), /* @__PURE__ */ React__default["default"].createElement("td", {
|
|
2042
3496
|
className: "px-5 py-3 whitespace-nowrap flex gap-3 items-center justify-end"
|
|
2043
3497
|
}, livesiteRoute && /* @__PURE__ */ React__default["default"].createElement("a", {
|
|
2044
3498
|
href: livesiteRoute,
|
|
2045
|
-
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"
|
|
3499
|
+
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"
|
|
2046
3500
|
}, /* @__PURE__ */ React__default["default"].createElement(BiLinkExternal, {
|
|
2047
3501
|
className: "inline-block h-5 w-auto opacity-70"
|
|
2048
3502
|
}), " ", "View"), /* @__PURE__ */ React__default["default"].createElement(reactRouterDom.Link, {
|
|
2049
|
-
to: `${location2.pathname}/${
|
|
2050
|
-
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"
|
|
3503
|
+
to: `${location2.pathname}/${document.node.sys.filename}`,
|
|
3504
|
+
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"
|
|
2051
3505
|
}, /* @__PURE__ */ React__default["default"].createElement(BiEdit, {
|
|
2052
3506
|
className: "inline-block h-5 w-auto opacity-70"
|
|
2053
3507
|
}), " ", "Edit")));
|
|
@@ -2056,6 +3510,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2056
3510
|
});
|
|
2057
3511
|
};
|
|
2058
3512
|
const useGetDocumentFields = (cms, collectionName, templateName) => {
|
|
3513
|
+
const api = new TinaAdminApi(cms.api.tina);
|
|
2059
3514
|
const [info, setInfo] = React.useState({
|
|
2060
3515
|
collection: void 0,
|
|
2061
3516
|
template: void 0,
|
|
@@ -2064,7 +3519,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2064
3519
|
});
|
|
2065
3520
|
React.useEffect(() => {
|
|
2066
3521
|
const fetchDocumentFields = async () => {
|
|
2067
|
-
const response = await
|
|
3522
|
+
const response = await api.fetchDocumentFields();
|
|
2068
3523
|
const documentFields = response.getDocumentFields;
|
|
2069
3524
|
const collection = documentFields[collectionName].collection;
|
|
2070
3525
|
const mutationInfo = documentFields[collectionName].mutationInfo;
|
|
@@ -2100,6 +3555,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2100
3555
|
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children({ collection, template, fields, mutationInfo }));
|
|
2101
3556
|
};
|
|
2102
3557
|
const createDocument = async (cms, collection, template, mutationInfo, values) => {
|
|
3558
|
+
const api = new TinaAdminApi(cms.api.tina);
|
|
2103
3559
|
const _a = values, { relativePath } = _a, leftover = __objRest(_a, ["relativePath"]);
|
|
2104
3560
|
const { includeCollection, includeTemplate } = mutationInfo;
|
|
2105
3561
|
const params = transformDocumentIntoMutationRequestPayload(__spreadValues(__spreadValues({
|
|
@@ -2108,19 +3564,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2108
3564
|
includeCollection,
|
|
2109
3565
|
includeTemplate
|
|
2110
3566
|
});
|
|
2111
|
-
await
|
|
2112
|
-
createDocument(
|
|
2113
|
-
collection: $collection,
|
|
2114
|
-
relativePath: $relativePath,
|
|
2115
|
-
params: $params
|
|
2116
|
-
){__typename}
|
|
2117
|
-
}`, {
|
|
2118
|
-
variables: {
|
|
2119
|
-
collection: collection.name,
|
|
2120
|
-
relativePath,
|
|
2121
|
-
params
|
|
2122
|
-
}
|
|
2123
|
-
});
|
|
3567
|
+
await api.createDocument(collection.name, relativePath, params);
|
|
2124
3568
|
};
|
|
2125
3569
|
const CollectionCreatePage = () => {
|
|
2126
3570
|
const { collectionName, templateName } = reactRouterDom.useParams();
|
|
@@ -2160,23 +3604,16 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2160
3604
|
}));
|
|
2161
3605
|
};
|
|
2162
3606
|
const useGetDocument = (cms, collectionName, relativePath) => {
|
|
2163
|
-
const
|
|
3607
|
+
const api = new TinaAdminApi(cms.api.tina);
|
|
3608
|
+
const [document, setDocument] = React.useState(void 0);
|
|
2164
3609
|
React.useEffect(() => {
|
|
2165
3610
|
const fetchDocument = async () => {
|
|
2166
|
-
const response = await
|
|
2167
|
-
query($collection: String!, $relativePath: String!) {
|
|
2168
|
-
getDocument(collection:$collection, relativePath:$relativePath) {
|
|
2169
|
-
... on Document {
|
|
2170
|
-
form
|
|
2171
|
-
values
|
|
2172
|
-
}
|
|
2173
|
-
}
|
|
2174
|
-
}`, { variables: { collection: collectionName, relativePath } });
|
|
3611
|
+
const response = await api.fetchDocument(collectionName, relativePath);
|
|
2175
3612
|
setDocument(response.getDocument);
|
|
2176
3613
|
};
|
|
2177
3614
|
fetchDocument();
|
|
2178
3615
|
}, [cms, collectionName, relativePath]);
|
|
2179
|
-
return
|
|
3616
|
+
return document;
|
|
2180
3617
|
};
|
|
2181
3618
|
const GetDocument = ({
|
|
2182
3619
|
cms,
|
|
@@ -2184,31 +3621,20 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2184
3621
|
relativePath,
|
|
2185
3622
|
children
|
|
2186
3623
|
}) => {
|
|
2187
|
-
const
|
|
2188
|
-
if (!
|
|
3624
|
+
const document = useGetDocument(cms, collectionName, relativePath);
|
|
3625
|
+
if (!document) {
|
|
2189
3626
|
return null;
|
|
2190
3627
|
}
|
|
2191
|
-
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children(
|
|
3628
|
+
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children(document));
|
|
2192
3629
|
};
|
|
2193
3630
|
const updateDocument = async (cms, relativePath, collection, mutationInfo, values) => {
|
|
3631
|
+
const api = new TinaAdminApi(cms.api.tina);
|
|
2194
3632
|
const { includeCollection, includeTemplate } = mutationInfo;
|
|
2195
3633
|
const params = transformDocumentIntoMutationRequestPayload(values, {
|
|
2196
3634
|
includeCollection,
|
|
2197
3635
|
includeTemplate
|
|
2198
3636
|
});
|
|
2199
|
-
await
|
|
2200
|
-
updateDocument(
|
|
2201
|
-
collection: $collection,
|
|
2202
|
-
relativePath: $relativePath,
|
|
2203
|
-
params: $params
|
|
2204
|
-
){__typename}
|
|
2205
|
-
}`, {
|
|
2206
|
-
variables: {
|
|
2207
|
-
collection: collection.name,
|
|
2208
|
-
relativePath,
|
|
2209
|
-
params
|
|
2210
|
-
}
|
|
2211
|
-
});
|
|
3637
|
+
await api.updateDocument(collection.name, relativePath, params);
|
|
2212
3638
|
};
|
|
2213
3639
|
const CollectionUpdatePage = () => {
|
|
2214
3640
|
const { collectionName, filename } = reactRouterDom.useParams();
|
|
@@ -2222,12 +3648,12 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2222
3648
|
cms,
|
|
2223
3649
|
collectionName: collection.name,
|
|
2224
3650
|
relativePath
|
|
2225
|
-
}, (
|
|
3651
|
+
}, (document) => {
|
|
2226
3652
|
const form = new toolkit.Form({
|
|
2227
3653
|
id: "update-form",
|
|
2228
3654
|
label: "form",
|
|
2229
|
-
fields:
|
|
2230
|
-
initialValues:
|
|
3655
|
+
fields: document.form.fields,
|
|
3656
|
+
initialValues: document.values,
|
|
2231
3657
|
onSubmit: async (values) => {
|
|
2232
3658
|
await updateDocument(cms, relativePath, collection, mutationInfo, values);
|
|
2233
3659
|
navigate(`/collections/${collection.name}`);
|
|
@@ -2244,20 +3670,6 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2244
3670
|
});
|
|
2245
3671
|
}));
|
|
2246
3672
|
};
|
|
2247
|
-
const useEmbedTailwind = () => {
|
|
2248
|
-
React.useEffect(() => {
|
|
2249
|
-
const isSSR = typeof window === "undefined";
|
|
2250
|
-
if (!isSSR) {
|
|
2251
|
-
const head = document.head;
|
|
2252
|
-
const link = document.createElement("link");
|
|
2253
|
-
link.id = "tina-admin-stylesheet";
|
|
2254
|
-
link.type = "text/css";
|
|
2255
|
-
link.rel = "stylesheet";
|
|
2256
|
-
link.href = "https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css";
|
|
2257
|
-
head.appendChild(link);
|
|
2258
|
-
}
|
|
2259
|
-
}, []);
|
|
2260
|
-
};
|
|
2261
3673
|
const Redirect = () => {
|
|
2262
3674
|
React__default["default"].useEffect(() => {
|
|
2263
3675
|
if (window) {
|
|
@@ -2267,7 +3679,6 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2267
3679
|
return null;
|
|
2268
3680
|
};
|
|
2269
3681
|
const TinaAdmin = () => {
|
|
2270
|
-
useEmbedTailwind();
|
|
2271
3682
|
const isSSR = typeof window === "undefined";
|
|
2272
3683
|
const { edit } = sharedctx.useEditState();
|
|
2273
3684
|
if (isSSR) {
|
|
@@ -2325,6 +3736,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
2325
3736
|
exports2.LocalClient = LocalClient;
|
|
2326
3737
|
exports2.RouteMappingPlugin = RouteMappingPlugin;
|
|
2327
3738
|
exports2.TinaAdmin = TinaAdmin;
|
|
3739
|
+
exports2.TinaAdminApi = TinaAdminApi;
|
|
2328
3740
|
exports2.TinaCMSProvider2 = TinaCMSProvider2;
|
|
2329
3741
|
exports2.TinaCloudAuthWall = TinaCloudAuthWall;
|
|
2330
3742
|
exports2.TinaCloudProvider = TinaCloudProvider;
|