datocms-react-ui 0.2.0-y.0 → 0.3.3
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/README.md +4 -4
- package/dist/cjs/Button/index.js +9 -1
- package/dist/cjs/Button/index.js.map +1 -1
- package/dist/cjs/Canvas/index.js.map +1 -1
- package/dist/cjs/ContextInspector/index.js +256 -0
- package/dist/cjs/ContextInspector/index.js.map +1 -0
- package/dist/cjs/ContextInspector/styles.module.css.json +1 -0
- package/dist/cjs/Form/index.js.map +1 -1
- package/dist/cjs/SwitchField/index.js +3 -3
- package/dist/cjs/SwitchField/index.js.map +1 -1
- package/dist/cjs/SwitchInput/index.js.map +1 -1
- package/dist/cjs/TextField/index.js +4 -4
- package/dist/cjs/TextField/index.js.map +1 -1
- package/dist/cjs/TextInput/index.js +1 -2
- package/dist/cjs/TextInput/index.js.map +1 -1
- package/dist/cjs/TextInput/styles.module.css.json +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/Button/index.d.ts +12 -0
- package/dist/esm/Button/index.js +7 -0
- package/dist/esm/Button/index.js.map +1 -1
- package/dist/esm/Canvas/index.d.ts +2 -2
- package/dist/esm/Canvas/index.js.map +1 -1
- package/dist/esm/ContextInspector/index.d.ts +6 -0
- package/dist/esm/ContextInspector/index.js +230 -0
- package/dist/esm/ContextInspector/index.js.map +1 -0
- package/dist/esm/ContextInspector/styles.module.css.json +1 -0
- package/dist/esm/Form/index.js.map +1 -1
- package/dist/esm/SwitchField/index.js +3 -3
- package/dist/esm/SwitchField/index.js.map +1 -1
- package/dist/esm/SwitchInput/index.js.map +1 -1
- package/dist/esm/TextField/index.js +4 -4
- package/dist/esm/TextField/index.js.map +1 -1
- package/dist/esm/TextInput/index.d.ts +1 -2
- package/dist/esm/TextInput/index.js +1 -2
- package/dist/esm/TextInput/index.js.map +1 -1
- package/dist/esm/TextInput/styles.module.css.json +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/types/Button/index.d.ts +12 -0
- package/dist/types/Canvas/index.d.ts +2 -2
- package/dist/types/ContextInspector/index.d.ts +6 -0
- package/dist/types/TextInput/index.d.ts +1 -2
- package/dist/types/index.d.ts +1 -0
- package/package.json +3 -3
- package/styles.css +1 -1
- package/types.json +1042 -620
- package/dist/cjs/TextField/styles.module.css.json +0 -1
- package/dist/esm/TextField/styles.module.css.json +0 -1
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (_) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
38
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
39
|
+
if (ar || !(i in from)) {
|
|
40
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
41
|
+
ar[i] = from[i];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
45
|
+
};
|
|
46
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
47
|
+
import React, { useEffect, useState } from 'react';
|
|
48
|
+
import { Button } from '..';
|
|
49
|
+
import s from './styles.module.css.json';
|
|
50
|
+
var baseUrl = 'https://github.com/datocms/plugins-sdk/blob/master/packages/sdk/src/types.ts';
|
|
51
|
+
function copyTextToClipboard(text) {
|
|
52
|
+
var textArea = document.createElement('textarea');
|
|
53
|
+
textArea.style.position = 'fixed';
|
|
54
|
+
textArea.style.top = '0';
|
|
55
|
+
textArea.style.left = '0';
|
|
56
|
+
textArea.style.width = '2em';
|
|
57
|
+
textArea.style.height = '2em';
|
|
58
|
+
textArea.style.padding = '0';
|
|
59
|
+
textArea.style.border = 'none';
|
|
60
|
+
textArea.style.outline = 'none';
|
|
61
|
+
textArea.style.boxShadow = 'none';
|
|
62
|
+
textArea.style.background = 'transparent';
|
|
63
|
+
textArea.value = text;
|
|
64
|
+
document.body.appendChild(textArea);
|
|
65
|
+
textArea.focus();
|
|
66
|
+
textArea.select();
|
|
67
|
+
try {
|
|
68
|
+
document.execCommand('copy');
|
|
69
|
+
}
|
|
70
|
+
catch (err) {
|
|
71
|
+
// NOP
|
|
72
|
+
}
|
|
73
|
+
document.body.removeChild(textArea);
|
|
74
|
+
}
|
|
75
|
+
function addFinalPeriod(text) {
|
|
76
|
+
if (['!', '.'].includes(text[text.length - 1])) {
|
|
77
|
+
return text;
|
|
78
|
+
}
|
|
79
|
+
return text + ".";
|
|
80
|
+
}
|
|
81
|
+
function findChildrenById(manifest, id) {
|
|
82
|
+
return manifest.children.find(function (child) { return child.id === id; });
|
|
83
|
+
}
|
|
84
|
+
function findShortText(signature) {
|
|
85
|
+
return (signature.comment && addFinalPeriod(signature.comment.shortText)) || null;
|
|
86
|
+
}
|
|
87
|
+
function findFirstTag(signature, tagName) {
|
|
88
|
+
if (!signature.comment || !signature.comment.tags) {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
var tagNode = signature.comment.tags.find(function (tag) { return tag.tag === tagName; });
|
|
92
|
+
if (!tagNode) {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
return tagNode.text;
|
|
96
|
+
}
|
|
97
|
+
function findExample(signature) {
|
|
98
|
+
var example = findFirstTag(signature, 'example');
|
|
99
|
+
if (!example) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
var lines = example
|
|
103
|
+
.split(/\n/)
|
|
104
|
+
.filter(function (l, i, all) { return l.length !== 0 || (i !== 0 && i !== all.length - 1); });
|
|
105
|
+
var spacesPerLine = lines.map(function (line) {
|
|
106
|
+
var spaces = line.match(/^\s*/);
|
|
107
|
+
return spaces ? spaces[0].length : 0;
|
|
108
|
+
});
|
|
109
|
+
var commonIndentation = Math.min.apply(Math, spacesPerLine);
|
|
110
|
+
var result = lines.map(function (line) { return line.substring(commonIndentation); }).join('\n');
|
|
111
|
+
return result;
|
|
112
|
+
}
|
|
113
|
+
function buildCtx(manifest, definition) {
|
|
114
|
+
if (definition.type.type === 'intersection') {
|
|
115
|
+
var result_1 = [];
|
|
116
|
+
definition.type.types.forEach(function (elementInIntersection) {
|
|
117
|
+
if (elementInIntersection.type === 'reference') {
|
|
118
|
+
var innerDefinition = findChildrenById(manifest, elementInIntersection.id);
|
|
119
|
+
result_1 = __spreadArray(__spreadArray([], result_1, true), [buildCtx(manifest, innerDefinition)], false);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
return result_1.flat().filter(function (x) { return x; });
|
|
123
|
+
}
|
|
124
|
+
if (definition.type.type === 'reflection') {
|
|
125
|
+
var properties = definition.type.declaration.children.filter(function (child) {
|
|
126
|
+
return !['mode', 'getSettings', 'setHeight', 'bodyPadding'].includes(child.name);
|
|
127
|
+
});
|
|
128
|
+
if (properties.length === 0) {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
name: definition.name,
|
|
133
|
+
description: findShortText(definition),
|
|
134
|
+
properties: properties.map(function (child) {
|
|
135
|
+
if (child.type && child.type.declaration && child.type.declaration.signatures) {
|
|
136
|
+
child.signatures = child.type.declaration.signatures;
|
|
137
|
+
}
|
|
138
|
+
if (child.signatures) {
|
|
139
|
+
var signature = child.signatures[0];
|
|
140
|
+
return {
|
|
141
|
+
name: child.name,
|
|
142
|
+
type: 'function',
|
|
143
|
+
description: findShortText(signature),
|
|
144
|
+
example: findExample(signature),
|
|
145
|
+
group: definition.name,
|
|
146
|
+
lineNumber: child.sources[0].line,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
return {
|
|
150
|
+
name: child.name,
|
|
151
|
+
type: 'property',
|
|
152
|
+
description: findShortText(child),
|
|
153
|
+
example: findExample(child),
|
|
154
|
+
groupDescription: findShortText(definition),
|
|
155
|
+
group: definition.name,
|
|
156
|
+
lineNumber: child.sources[0].line,
|
|
157
|
+
};
|
|
158
|
+
}),
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
throw new Error("Don\t know how to handle " + definition);
|
|
162
|
+
}
|
|
163
|
+
var ExpandablePane = function (_a) {
|
|
164
|
+
var children = _a.children, label = _a.label;
|
|
165
|
+
var _b = useState(false), open = _b[0], setOpen = _b[1];
|
|
166
|
+
return (React.createElement("div", { className: s.panel },
|
|
167
|
+
React.createElement("button", { className: s.panelHandle, onClick: function () { return setOpen(function (open) { return !open; }); } }, label),
|
|
168
|
+
open && React.createElement("div", { className: s.panelBody }, children)));
|
|
169
|
+
};
|
|
170
|
+
export function ContextInspector(_a) {
|
|
171
|
+
var _this = this;
|
|
172
|
+
var ctx = _a.ctx;
|
|
173
|
+
var _b = useState(null), groups = _b[0], setGroups = _b[1];
|
|
174
|
+
useEffect(function () {
|
|
175
|
+
var runner = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
176
|
+
var response, manifest, connectParameters, hook, signature, ctxParameter;
|
|
177
|
+
return __generator(this, function (_a) {
|
|
178
|
+
switch (_a.label) {
|
|
179
|
+
case 0: return [4 /*yield*/, fetch('https://unpkg.com/datocms-plugin-sdk/types.json')];
|
|
180
|
+
case 1:
|
|
181
|
+
response = _a.sent();
|
|
182
|
+
return [4 /*yield*/, response.json()];
|
|
183
|
+
case 2:
|
|
184
|
+
manifest = _a.sent();
|
|
185
|
+
connectParameters = manifest.children.find(function (child) { return child.name === 'FullConnectParameters'; });
|
|
186
|
+
hook = connectParameters.type.declaration.children.find(function (hook) { return hook.signatures[0].name === ctx.mode; });
|
|
187
|
+
signature = hook.signatures[0];
|
|
188
|
+
ctxParameter = signature.parameters.find(function (p) { return p.name === 'ctx'; });
|
|
189
|
+
setGroups(buildCtx(manifest, findChildrenById(manifest, ctxParameter.type.id)));
|
|
190
|
+
return [2 /*return*/];
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}); };
|
|
194
|
+
runner();
|
|
195
|
+
}, [setGroups]);
|
|
196
|
+
var handleCopy = function (text) {
|
|
197
|
+
copyTextToClipboard(text);
|
|
198
|
+
ctx.notice('Copied to clipboard!');
|
|
199
|
+
};
|
|
200
|
+
var handleRun = function (example) {
|
|
201
|
+
Function("\n \"use strict\";\n return(\n async function(ctx) {\n try {\n " + example + "\n } catch(e) {\n await ctx.alert('Execution failed! See console for errors!');\n console.error(e);\n }\n }\n )\n ")()(ctx);
|
|
202
|
+
};
|
|
203
|
+
return (React.createElement("div", { className: s.inspector }, groups &&
|
|
204
|
+
groups.map(function (group) {
|
|
205
|
+
var name = group.name
|
|
206
|
+
.replace('AdditionalMethods', 'Methods')
|
|
207
|
+
.replace('AdditionalProperties', 'Properties')
|
|
208
|
+
.replace('Methods', ' methods')
|
|
209
|
+
.replace('Properties', ' properties')
|
|
210
|
+
.replace('Utilities', ' utilities');
|
|
211
|
+
return (React.createElement(ExpandablePane, { label: "" + name, key: name },
|
|
212
|
+
React.createElement("div", { className: s.groupDescription }, group.description),
|
|
213
|
+
React.createElement("div", { className: s.propertyGroup }, (group.properties || []).map(function (item) { return (React.createElement("div", { key: item.name, className: s.propertyOrMethod },
|
|
214
|
+
React.createElement("div", { className: s.propertyOrMethodBody },
|
|
215
|
+
React.createElement("a", { className: s.propertyOrMethodName, href: baseUrl + "#L" + item.lineNumber, target: "_blank", rel: "noreferrer" },
|
|
216
|
+
item.name,
|
|
217
|
+
item.type === 'function' ? '()' : ''),
|
|
218
|
+
React.createElement("div", null, item.description)),
|
|
219
|
+
item.type === 'property' && (React.createElement("div", { className: s.propertyOrMethodExample },
|
|
220
|
+
React.createElement("pre", null, JSON.stringify(ctx[item.name], null, 2)),
|
|
221
|
+
React.createElement("div", { className: s.propertyOrMethodExampleActions },
|
|
222
|
+
React.createElement(Button, { type: "button", buttonSize: "xxs", onClick: handleCopy.bind(null, JSON.stringify(ctx[item.name], null, 2)) }, "Copy value")))),
|
|
223
|
+
item.example && (React.createElement("div", { className: s.propertyOrMethodExample },
|
|
224
|
+
React.createElement("pre", null, item.example),
|
|
225
|
+
React.createElement("div", { className: s.propertyOrMethodExampleActions },
|
|
226
|
+
React.createElement(Button, { type: "button", buttonSize: "xxs", buttonType: "primary", onClick: handleRun.bind(null, item.example) }, "Run example"),
|
|
227
|
+
React.createElement(Button, { type: "button", buttonSize: "xxs", onClick: handleCopy.bind(null, item.example) }, "Copy example")))))); }))));
|
|
228
|
+
})));
|
|
229
|
+
}
|
|
230
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ContextInspector/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAuD;AACvD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,CAAC,MAAM,0BAA0B,CAAC;AAEzC,IAAM,OAAO,GACX,8EAA8E,CAAC;AAEjF,SAAS,mBAAmB,CAAC,IAAY;IACvC,IAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACpD,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC;IAClC,QAAQ,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC;IACzB,QAAQ,CAAC,KAAK,CAA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IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,kBAGpC;4BACT,oBAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,UAAU,EAAC,KAAK,EAChB,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,mBAGrC,CACL,CACF,CACP,CACG,CACP,EAvD4C,CAuD5C,CAAC,CACE,CACS,CAClB,CAAC;QACJ,CAAC,CAAC,CACA,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "inspector": "_inspector_1n8fb_1", "panel": "_panel_1n8fb_5", "panelHandle": "_panelHandle_1n8fb_9", "panelBody": "_panelBody_1n8fb_25", "groupDescription": "_groupDescription_1n8fb_31", "propertyGroup": "_propertyGroup_1n8fb_37", "propertyOrMethod": "_propertyOrMethod_1n8fb_42", "propertyOrMethodBody": "_propertyOrMethodBody_1n8fb_51", "propertyOrMethodExample": "_propertyOrMethodExample_1n8fb_55", "propertyOrMethodName": "_propertyOrMethodName_1n8fb_68", "propertyOrMethodExampleActions": "_propertyOrMethodExampleActions_1n8fb_82" }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Form/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EACZ,QAAQ,EACR,WAAW,GAKZ,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAU9C,MAAM,CAAC,IAAM,IAAI,GAAG,UAAC,EAMT;IALV,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,eAAmB,EAAnB,OAAO,mBAAG,SAAS,KAAA,EAChB,UAAU,cALM,gDAMpB,CADc;IAEb,IAAM,UAAU,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE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
React.createElement("div", { className: s.switchField__flex },
|
|
20
20
|
React.createElement("div", { className: s.switchField__switchInput },
|
|
21
21
|
React.createElement(SwitchInput, __assign({}, switchInputProps, { name: name, value: value, onChange: onChange }))),
|
|
22
|
-
React.createElement(FormLabel, __assign({}, formLabelProps, { htmlFor: id, required: required, className: cn(s.switchField__label, formLabelProps === null || formLabelProps === void 0 ? void 0 : formLabelProps.className) }), label)),
|
|
22
|
+
React.createElement(FormLabel, __assign({}, formLabelProps, { htmlFor: id, required: required, className: cn(s.switchField__label, formLabelProps === null || formLabelProps === void 0 ? void 0 : formLabelProps.className), error: !!error }), label)),
|
|
23
23
|
(hint || error) && (React.createElement("div", { className: s.switchField__below },
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
error && React.createElement(FieldError, null, error),
|
|
25
|
+
hint && React.createElement(FieldHint, null, hint)))));
|
|
26
26
|
}
|
|
27
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/SwitchField/index.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EAET,WAAW,GAEZ,MAAM,IAAI,CAAC;AACZ,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,CAAC,MAAM,0BAA0B,CAAC;AAezC,MAAM,UAAU,WAAW,CAAC,EAWT;QAVjB,EAAE,QAAA,EACF,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,cAAc,oBAAA,EACd,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,gBAAgB,sBAAA;IAEhB,OAAO,CACL;QACE,6BAAK,SAAS,EAAE,CAAC,CAAC,iBAAiB;YACjC,6BAAK,SAAS,EAAE,CAAC,CAAC,wBAAwB;gBACxC,oBAAC,WAAW,eAC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KAEb,KAAK,CACI,CACR;QACL,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAClB,6BAAK,SAAS,EAAE,CAAC,CAAC,kBAAkB;YACjC,KAAK,IAAI,oBAAC,UAAU,QAAE,KAAK,CAAc;YACzC,IAAI,IAAI,oBAAC,SAAS,QAAE,IAAI,CAAa,CAClC,CACP,CACA,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/SwitchInput/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,CAAC,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/SwitchInput/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,CAAC,MAAM,0BAA0B,CAAC;AAgBzC,MAAM,UAAU,WAAW,CAAC,EAQT;;IAPjB,IAAA,SAAS,eAAA,EACT,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAPc,sEAQ3B,CADa;IAEZ,SAAS,aAAa,CACpB,QAAiB,EACjB,KAAmF;QAEnF,IAAI,CAAC,QAAQ,EAAE;YACb,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;SAC3B;IACH,CAAC;IAED,SAAS,iBAAiB,CAAC,CAAyC;QAClE,IAAI,CAAC,CAAC,GAAG,KAAK,WAAW,EAAE;YACzB,aAAa,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;SACzB;aAAM,IAAI,CAAC,CAAC,GAAG,KAAK,YAAY,EAAE;YACjC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;SACxB;QACD,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAG,CAAC,CAAC,CAAC;IACjB,CAAC;IAED,SAAS,eAAe,CAAC,CAAsC;QAC7D,aAAa,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACzB,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,CAAC,CAAC,CAAC;IACf,CAAC;IAED,IAAM,eAAe,GAAG,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,SAAS;QACpD,GAAC,CAAC,CAAC,sBAAsB,CAAC,IAAG,KAAK;QAClC,GAAC,CAAC,CAAC,uBAAuB,CAAC,IAAG,QAAQ;YACtC,CAAC;IAEH,OAAO,CACL,2CACM,SAAS,IACb,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,QAAQ,kBACC,KAAK,EACnB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,eAAe,EAC1B,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,eAAe;QAExB,8BAAM,SAAS,EAAE,CAAC,CAAC,oBAAoB,CAAC,GAAI,CACrC,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -14,9 +14,9 @@ import { FieldError, FieldHint, FormLabel, TextInput, } from '..';
|
|
|
14
14
|
export function TextField(_a) {
|
|
15
15
|
var id = _a.id, name = _a.name, label = _a.label, hint = _a.hint, error = _a.error, required = _a.required, placeholder = _a.placeholder, formLabelProps = _a.formLabelProps, value = _a.value, onChange = _a.onChange, textInputProps = _a.textInputProps;
|
|
16
16
|
return (React.createElement(React.Fragment, null,
|
|
17
|
-
React.createElement(FormLabel, __assign({}, formLabelProps, { htmlFor: id, required: required }), label),
|
|
18
|
-
React.createElement(TextInput, __assign({}, textInputProps, { id: id, name: name, value: value, placeholder: placeholder, onChange: onChange })),
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
React.createElement(FormLabel, __assign({}, formLabelProps, { htmlFor: id, required: required, error: !!error }), label),
|
|
18
|
+
React.createElement(TextInput, __assign({}, textInputProps, { id: id, name: name, value: value, placeholder: placeholder, onChange: onChange, error: !!error })),
|
|
19
|
+
error && React.createElement(FieldError, null, error),
|
|
20
|
+
hint && React.createElement(FieldHint, null, hint)));
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/TextField/index.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EAET,SAAS,GAEV,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/TextField/index.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EAET,SAAS,GAEV,MAAM,IAAI,CAAC;AAgBZ,MAAM,UAAU,SAAS,CAAC,EAYT;QAXf,EAAE,QAAA,EACF,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,WAAW,iBAAA,EACX,cAAc,oBAAA,EACd,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,cAAc,oBAAA;IAEd,OAAO,CACL;QACE,oBAAC,SAAS,eAAK,cAAc,IAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,KAC3E,KAAK,CACI;QAEZ,oBAAC,SAAS,eACJ,cAAc,IAClB,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,CAAC,CAAC,KAAK,IACd;QAED,KAAK,IAAI,oBAAC,UAAU,QAAE,KAAK,CAAc;QACzC,IAAI,IAAI,oBAAC,SAAS,QAAE,IAAI,CAAa,CACrC,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -7,8 +7,7 @@ export declare type TextInputProps = {
|
|
|
7
7
|
id?: string;
|
|
8
8
|
className?: string;
|
|
9
9
|
onChange?: TextInputChangeEventHandler;
|
|
10
|
-
value: string;
|
|
11
10
|
inputRef?: RefObject<HTMLInputElement>;
|
|
12
11
|
error?: boolean;
|
|
13
|
-
} & JSX.IntrinsicElements['input']
|
|
12
|
+
} & Omit<JSX.IntrinsicElements['input'], 'onChange'>;
|
|
14
13
|
export declare const TextInput: ({ className, disabled, error, id, inputRef, maxLength, name, labelText, onBlur, onChange, placeholder, required, type, value, ...otherProps }: TextInputProps) => JSX.Element;
|
|
@@ -35,7 +35,6 @@ export var TextInput = function (_a) {
|
|
|
35
35
|
_b[s['TextInput--disabled']] = disabled,
|
|
36
36
|
_b[s['TextInput--error']] = error,
|
|
37
37
|
_b));
|
|
38
|
-
return (React.createElement("
|
|
39
|
-
React.createElement("input", __assign({ "aria-label": labelText, className: s['TextInput__input'], id: id, name: name, required: required, placeholder: placeholder, maxLength: maxLength, disabled: disabled, onBlur: onBlur, onChange: handleChange, value: value, type: type, ref: inputRef }, otherProps))));
|
|
38
|
+
return (React.createElement("input", __assign({ className: classNames, "aria-label": labelText, id: id, name: name, required: required, placeholder: placeholder, maxLength: maxLength, disabled: disabled, onBlur: onBlur, onChange: handleChange, value: value, type: type, ref: inputRef }, otherProps)));
|
|
40
39
|
};
|
|
41
40
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/TextInput/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAA0B,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,MAAM,YAAY,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AS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,QAAQ,IACT,UAAU,EACd,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "TextInput": "
|
|
1
|
+
{ "TextInput": "_TextInput_pdyay_1", "TextInput--disabled": "_TextInput--disabled_pdyay_30", "TextInput--error": "_TextInput--error_pdyay_36" }
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
|
|
@@ -11,3 +11,15 @@ export declare type ButtonProps = {
|
|
|
11
11
|
style?: CSSProperties;
|
|
12
12
|
};
|
|
13
13
|
export declare function Button({ children, className, disabled, buttonType, buttonSize, fullWidth, onClick, style, type, }: ButtonProps): JSX.Element;
|
|
14
|
+
export declare type ButtonLinkProps = {
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
href: string;
|
|
17
|
+
target?: React.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
|
|
18
|
+
className?: string;
|
|
19
|
+
onClick?: MouseEventHandler;
|
|
20
|
+
buttonType?: 'primary' | 'muted' | 'negative';
|
|
21
|
+
buttonSize?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
22
|
+
fullWidth?: boolean;
|
|
23
|
+
style?: CSSProperties;
|
|
24
|
+
};
|
|
25
|
+
export declare function ButtonLink({ children, href, target, className, buttonType, buttonSize, onClick, fullWidth, style, }: ButtonLinkProps): JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { RenderProperties } from 'datocms-
|
|
2
|
+
import { RenderProperties } from 'datocms-plugin-sdk';
|
|
3
3
|
export declare type CanvasProps = {
|
|
4
4
|
ctx: RenderProperties;
|
|
5
5
|
noAutoResizer?: boolean;
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
};
|
|
8
|
-
export declare function Canvas({ ctx, children, noAutoResizer
|
|
8
|
+
export declare function Canvas({ ctx, children, noAutoResizer }: CanvasProps): JSX.Element;
|
|
@@ -7,8 +7,7 @@ export declare type TextInputProps = {
|
|
|
7
7
|
id?: string;
|
|
8
8
|
className?: string;
|
|
9
9
|
onChange?: TextInputChangeEventHandler;
|
|
10
|
-
value: string;
|
|
11
10
|
inputRef?: RefObject<HTMLInputElement>;
|
|
12
11
|
error?: boolean;
|
|
13
|
-
} & JSX.IntrinsicElements['input']
|
|
12
|
+
} & Omit<JSX.IntrinsicElements['input'], 'onChange'>;
|
|
14
13
|
export declare const TextInput: ({ className, disabled, error, id, inputRef, maxLength, name, labelText, onBlur, onChange, placeholder, required, type, value, ...otherProps }: TextInputProps) => JSX.Element;
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datocms-react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "React components to use inside DatoCMS plugins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"datocms",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"classnames": "^2.3.1",
|
|
42
|
-
"datocms-
|
|
42
|
+
"datocms-plugin-sdk": "^0.3.3"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">= 17.0.2"
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"postcss-nested": "^5.0.6",
|
|
56
56
|
"typedoc": "^0.22.8"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "3630a1d2e640cea650697754c2e9c66a6871f4b7"
|
|
59
59
|
}
|
package/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "https://use.typekit.net/iok7hkr.css";._button_p1vuc_1{-webkit-appearance:none;-moz-appearance:none;background-color:transparent;border:1px solid transparent;border-radius:4px;box-sizing:border-box;color:var(--base-body-color);cursor:pointer;display:inline-block;font-family:inherit;font-weight:500;line-height:inherit;opacity:1;text-decoration:none;transition:all .3s var(--material-ease);vertical-align:middle;white-space:nowrap}._button_p1vuc_1:focus,._button_p1vuc_1:hover{opacity:.8}._button_p1vuc_1:active{opacity:.7}._disabled_p1vuc_30{background-color:var(--light-bg-color);border-width:0;color:rgba(0,0,0,.2);cursor:not-allowed}._buttonType-muted_p1vuc_37{background-color:var(--light-color);color:var(--accent-color)}._buttonType-primary_p1vuc_42{background-color:var(--accent-color);border-width:0;color:#fff}._buttonType-primary_p1vuc_42:active,._buttonType-primary_p1vuc_42:focus,._buttonType-primary_p1vuc_42:hover{color:#fff}._buttonType-primary_p1vuc_42._disabled_p1vuc_30{background-color:var(--disabled-bg-color);color:rgba(0,0,0,.2)}._buttonType-primary_p1vuc_42._disabled_p1vuc_30:active,._buttonType-primary_p1vuc_42._disabled_p1vuc_30:focus,._buttonType-primary_p1vuc_42._disabled_p1vuc_30:hover{color:rgba(0,0,0,.2)}._buttonType-negative_p1vuc_64{border-width:0}._buttonType-negative_p1vuc_64,._buttonType-negative_p1vuc_64:active,._buttonType-negative_p1vuc_64:focus,._buttonType-negative_p1vuc_64:hover{background-color:var(--alert-color);color:#fff}._buttonType-negative_p1vuc_64._disabled_p1vuc_30{background-color:var(--disabled-bg-color);color:rgba(0,0,0,.2)}._buttonSize-xxs_p1vuc_82{font-size:1em;padding:.5em .8em}._buttonSize-xs_p1vuc_87{font-size:1em;padding:.6em .8em}._buttonSize-s_p1vuc_92{font-size:1em;padding:.7em 1em}._buttonSize-m_p1vuc_97{font-size:1.1em;padding:.7em 1em}._buttonSize-l_p1vuc_102{font-size:1.2em;padding:.7em 1em}._buttonSize-xl_p1vuc_107{font-size:1.2em;padding:1em}._fullWidth_p1vuc_112{display:block;text-align:center;width:100%}._canvas_1kptt_1{--base-body-color:#34363a;--light-body-color:#848484;--placeholder-body-color:#c6c6c6;--light-bg-color:#f5f5f5;--lighter-bg-color:#f8f8f8;--disabled-bg-color:#ededed;--border-color:#f0f0f0;--darker-border-color:#d7d7d7;--alert-color:#ff5e49;--alert-rgb-components:255,94,73;--warning-color:gold;--notice-color:#46d700;--warning-bg-color:#ffffe5;--add-color:#4cb06d;--remove-color:#eb576a;--base-font-family:"colfax-web","Roboto","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;--monospaced-font-family:"Roboto Mono","Menlo","Bitstream Vera Sans Mono",Consolas,Courier,monospace;--spacing-s:0.375rem;--spacing-m:0.75rem;--spacing-l:1.5rem;--spacing-xl:2.25rem;--spacing-xxl:3.75rem;--spacing-xxxl:6rem;--font-size-xxs:0.6875rem;--font-size-xs:0.75rem;--font-size-s:0.875rem;--font-size-m:0.9375rem;--font-size-l:1.0625rem;--font-size-xl:1.1875rem;--font-size-xxl:1.5625rem;--font-size-xxxl:1.875rem;--font-size-xxxl:2.1875rem;--font-size-xxxl:3.125rem;--material-ease:cubic-bezier(0.55,0,0.1,1);--inertial-ease:cubic-bezier(0.19,1,0.22,1);-webkit-text-size-adjust:100%;text-rendering:optimizeLegibility;color:var(--base-body-color);font-family:var(--base-font-family);font-size:var(--font-size-m);line-height:1.5}._fieldError_qi0xk_1{color:var(--alert-color);font-size:var(--font-size-xs);line-height:1.2;margin-top:var(--spacing-s)}._FieldGroup_uz9ju_1{display:block}._FieldGroup__item_uz9ju_5{display:block;margin-bottom:var(--spacing-l)}._FieldGroup__item_uz9ju_5:last-child{margin-bottom:0}._fieldHint_1dor2_1{color:var(--light-body-color);font-size:var(--font-size-xs);line-height:1.2;margin-top:var(--spacing-s)}._Form_5qspp_1,._Form__item_5qspp_5{display:block}._Form__item_5qspp_5:last-child{margin-bottom:0}._Form__item--default_5qspp_13{margin-bottom:var(--spacing-l)}._Form__item--condensed_5qspp_17{margin-bottom:var(--spacing-m)}._formLabel_tcjrv_1{align-items:center;color:var(--light-body-color);display:flex;margin-bottom:var(--spacing-s)}._formLabel_tcjrv_1:hover ._formLabel__code_tcjrv_8{opacity:1}._formLabel--error_tcjrv_14{color:var(--alert-color)}._formLabel__label_tcjrv_18{flex:1}._formLabel__code_tcjrv_8{font-family:var(--monospaced-font-family);font-size:.95em;opacity:0;position:absolute;transition:opacity .2s var(--material-ease)}._switchField__flex_16z4j_1{align-items:center;display:flex}._switchField__switchInput_16z4j_6{width:55px}._switchField__label_16z4j_10{color:var(--base-body-color);flex:1;line-height:1.1;line-height:20px;margin-bottom:0;pointer-events:none;-moz-user-select:text;-ms-user-select:text;user-select:text}._switchField__below_16z4j_22{margin-left:55px;margin-top:var(--spacing-s)}._switchInput__inner_1knbg_1{color:#fff;font-size:12px;left:24px;position:absolute}._switchInput_1knbg_1{background-color:#ccc;border:1px solid #ccc;border-radius:20px 20px;box-sizing:border-box;cursor:pointer;display:inline-block;height:22px;line-height:20px;position:relative;transition:all .3s cubic-bezier(.35,0,.25,1);vertical-align:middle;width:44px}._switchInput_1knbg_1:after{animation-duration:.3s;animation-name:_switchInput__off_1knbg_1;animation-timing-function:cubic-bezier(.35,0,.25,1);background-color:#fff;border-radius:50% 50%;box-shadow:0 2px 5px rgba(0,0,0,.26);content:" ";cursor:pointer;height:18px;left:2px;position:absolute;top:1px;transform:scale(1);transition:left .3s cubic-bezier(.35,0,.25,1);width:18px}._switchInput_1knbg_1:focus:after,._switchInput_1knbg_1:hover{animation-name:_switchInput__on_1knbg_1;transform:scale(1.1)}._switchInput__checked_1knbg_47{background-color:var(--accent-color);border:1px solid var(--accent-color)}._switchInput__checked_1knbg_47 ._switchInput__inner_1knbg_1{left:6px}._switchInput__checked_1knbg_47:after{left:22px}._switchInput__disabled_1knbg_60{background:#ccc;border-color:#ccc;cursor:no-drop}._switchInput__disabled_1knbg_60:after{animation-name:_none_1knbg_1;background:#9e9e9e;cursor:no-drop}._switchInput__disabled_1knbg_60:focus:after,._switchInput__disabled_1knbg_60:hover{animation-name:_none_1knbg_1;transform:scale(1)}@keyframes _switchInput__on_1knbg_1{0%{transform:scale(1)}50%{transform:scale(1.25)}to{transform:scale(1.1)}}@keyframes _switchInput__off_1knbg_1{0%{transform:scale(1.1)}to{transform:scale(1)}}._TextInput--
|
|
1
|
+
@import "https://use.typekit.net/iok7hkr.css";._button_p1vuc_1{-webkit-appearance:none;-moz-appearance:none;background-color:transparent;border:1px solid transparent;border-radius:4px;box-sizing:border-box;color:var(--base-body-color);cursor:pointer;display:inline-block;font-family:inherit;font-weight:500;line-height:inherit;opacity:1;text-decoration:none;transition:all .3s var(--material-ease);vertical-align:middle;white-space:nowrap}._button_p1vuc_1:focus,._button_p1vuc_1:hover{opacity:.8}._button_p1vuc_1:active{opacity:.7}._disabled_p1vuc_30{background-color:var(--light-bg-color);border-width:0;color:rgba(0,0,0,.2);cursor:not-allowed}._buttonType-muted_p1vuc_37{background-color:var(--light-color);color:var(--accent-color)}._buttonType-primary_p1vuc_42{background-color:var(--accent-color);border-width:0;color:#fff}._buttonType-primary_p1vuc_42:active,._buttonType-primary_p1vuc_42:focus,._buttonType-primary_p1vuc_42:hover{color:#fff}._buttonType-primary_p1vuc_42._disabled_p1vuc_30{background-color:var(--disabled-bg-color);color:rgba(0,0,0,.2)}._buttonType-primary_p1vuc_42._disabled_p1vuc_30:active,._buttonType-primary_p1vuc_42._disabled_p1vuc_30:focus,._buttonType-primary_p1vuc_42._disabled_p1vuc_30:hover{color:rgba(0,0,0,.2)}._buttonType-negative_p1vuc_64{border-width:0}._buttonType-negative_p1vuc_64,._buttonType-negative_p1vuc_64:active,._buttonType-negative_p1vuc_64:focus,._buttonType-negative_p1vuc_64:hover{background-color:var(--alert-color);color:#fff}._buttonType-negative_p1vuc_64._disabled_p1vuc_30{background-color:var(--disabled-bg-color);color:rgba(0,0,0,.2)}._buttonSize-xxs_p1vuc_82{font-size:1em;padding:.5em .8em}._buttonSize-xs_p1vuc_87{font-size:1em;padding:.6em .8em}._buttonSize-s_p1vuc_92{font-size:1em;padding:.7em 1em}._buttonSize-m_p1vuc_97{font-size:1.1em;padding:.7em 1em}._buttonSize-l_p1vuc_102{font-size:1.2em;padding:.7em 1em}._buttonSize-xl_p1vuc_107{font-size:1.2em;padding:1em}._fullWidth_p1vuc_112{display:block;text-align:center;width:100%}._canvas_1kptt_1{--base-body-color:#34363a;--light-body-color:#848484;--placeholder-body-color:#c6c6c6;--light-bg-color:#f5f5f5;--lighter-bg-color:#f8f8f8;--disabled-bg-color:#ededed;--border-color:#f0f0f0;--darker-border-color:#d7d7d7;--alert-color:#ff5e49;--alert-rgb-components:255,94,73;--warning-color:gold;--notice-color:#46d700;--warning-bg-color:#ffffe5;--add-color:#4cb06d;--remove-color:#eb576a;--base-font-family:"colfax-web","Roboto","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;--monospaced-font-family:"Roboto Mono","Menlo","Bitstream Vera Sans Mono",Consolas,Courier,monospace;--spacing-s:0.375rem;--spacing-m:0.75rem;--spacing-l:1.5rem;--spacing-xl:2.25rem;--spacing-xxl:3.75rem;--spacing-xxxl:6rem;--font-size-xxs:0.6875rem;--font-size-xs:0.75rem;--font-size-s:0.875rem;--font-size-m:0.9375rem;--font-size-l:1.0625rem;--font-size-xl:1.1875rem;--font-size-xxl:1.5625rem;--font-size-xxxl:1.875rem;--font-size-xxxl:2.1875rem;--font-size-xxxl:3.125rem;--material-ease:cubic-bezier(0.55,0,0.1,1);--inertial-ease:cubic-bezier(0.19,1,0.22,1);-webkit-text-size-adjust:100%;text-rendering:optimizeLegibility;color:var(--base-body-color);font-family:var(--base-font-family);font-size:var(--font-size-m);line-height:1.5}._fieldError_qi0xk_1{color:var(--alert-color);font-size:var(--font-size-xs);line-height:1.2;margin-top:var(--spacing-s)}._FieldGroup_uz9ju_1{display:block}._FieldGroup__item_uz9ju_5{display:block;margin-bottom:var(--spacing-l)}._FieldGroup__item_uz9ju_5:last-child{margin-bottom:0}._fieldHint_1dor2_1{color:var(--light-body-color);font-size:var(--font-size-xs);line-height:1.2;margin-top:var(--spacing-s)}._Form_5qspp_1,._Form__item_5qspp_5{display:block}._Form__item_5qspp_5:last-child{margin-bottom:0}._Form__item--default_5qspp_13{margin-bottom:var(--spacing-l)}._Form__item--condensed_5qspp_17{margin-bottom:var(--spacing-m)}._formLabel_tcjrv_1{align-items:center;color:var(--light-body-color);display:flex;margin-bottom:var(--spacing-s)}._formLabel_tcjrv_1:hover ._formLabel__code_tcjrv_8{opacity:1}._formLabel--error_tcjrv_14{color:var(--alert-color)}._formLabel__label_tcjrv_18{flex:1}._formLabel__code_tcjrv_8{font-family:var(--monospaced-font-family);font-size:.95em;opacity:0;position:absolute;transition:opacity .2s var(--material-ease)}._switchField__flex_16z4j_1{align-items:center;display:flex}._switchField__switchInput_16z4j_6{width:55px}._switchField__label_16z4j_10{color:var(--base-body-color);flex:1;line-height:1.1;line-height:20px;margin-bottom:0;pointer-events:none;-moz-user-select:text;-ms-user-select:text;user-select:text}._switchField__below_16z4j_22{margin-left:55px;margin-top:var(--spacing-s)}._switchInput__inner_1knbg_1{color:#fff;font-size:12px;left:24px;position:absolute}._switchInput_1knbg_1{background-color:#ccc;border:1px solid #ccc;border-radius:20px 20px;box-sizing:border-box;cursor:pointer;display:inline-block;height:22px;line-height:20px;position:relative;transition:all .3s cubic-bezier(.35,0,.25,1);vertical-align:middle;width:44px}._switchInput_1knbg_1:after{animation-duration:.3s;animation-name:_switchInput__off_1knbg_1;animation-timing-function:cubic-bezier(.35,0,.25,1);background-color:#fff;border-radius:50% 50%;box-shadow:0 2px 5px rgba(0,0,0,.26);content:" ";cursor:pointer;height:18px;left:2px;position:absolute;top:1px;transform:scale(1);transition:left .3s cubic-bezier(.35,0,.25,1);width:18px}._switchInput_1knbg_1:focus:after,._switchInput_1knbg_1:hover{animation-name:_switchInput__on_1knbg_1;transform:scale(1.1)}._switchInput__checked_1knbg_47{background-color:var(--accent-color);border:1px solid var(--accent-color)}._switchInput__checked_1knbg_47 ._switchInput__inner_1knbg_1{left:6px}._switchInput__checked_1knbg_47:after{left:22px}._switchInput__disabled_1knbg_60{background:#ccc;border-color:#ccc;cursor:no-drop}._switchInput__disabled_1knbg_60:after{animation-name:_none_1knbg_1;background:#9e9e9e;cursor:no-drop}._switchInput__disabled_1knbg_60:focus:after,._switchInput__disabled_1knbg_60:hover{animation-name:_none_1knbg_1;transform:scale(1)}@keyframes _switchInput__on_1knbg_1{0%{transform:scale(1)}50%{transform:scale(1.25)}to{transform:scale(1.1)}}@keyframes _switchInput__off_1knbg_1{0%{transform:scale(1.1)}to{transform:scale(1)}}._TextInput_pdyay_1{appearance:none;background-image:none;border:1px solid var(--border-color);border-radius:0;box-sizing:border-box;display:block;font-family:inherit;font-size:var(--font-size-m);padding:10px;resize:none;transition:border .2s var(--material-ease);width:100%}._TextInput_pdyay_1::placeholder{color:var(--placeholder-body-color)}._TextInput_pdyay_1:hover{border-color:var(--darker-border-color)}._TextInput_pdyay_1:focus{border-color:var(--accent-color);box-shadow:0 0 0 3px var(--semi-transparent-accent-color);outline:0}._TextInput--disabled_pdyay_30{background:var(--lighter-bg-color);border-color:var(--border-color);color:var(--light-body-color)}._TextInput--error_pdyay_36,._TextInput--error_pdyay_36:focus,._TextInput--error_pdyay_36:hover{border-color:var(--alert-color)}._TextInput--error_pdyay_36:focus{box-shadow:0 0 0 3px rgba(var(--alert-rgb-components),.2)}._inspector_1n8fb_1{margin:var(--spacing-l) 0}._panel_1n8fb_5{border-bottom:1px solid var(--border-color)}._panelHandle_1n8fb_9{all:inherit;background:var(--light-bg-color);border:0;box-sizing:border-box;cursor:pointer;display:block;font-weight:500;padding:5px 10px;width:100%}._panelHandle_1n8fb_9:hover{background:var(--lighter-bg-color)}._panelBody_1n8fb_25{border-left:1px solid var(--border-color);border-right:1px solid var(--border-color);padding:20px}._groupDescription_1n8fb_31{font-size:var(--font-size-s);line-height:1.2;margin-bottom:20px}._propertyGroup_1n8fb_37{border:1px solid var(--border-color);border-radius:5px}._propertyOrMethod_1n8fb_42{border-bottom:1px solid var(--border-color);line-height:1.2}._propertyOrMethod_1n8fb_42 p{margin:0}._propertyOrMethodBody_1n8fb_51{padding:15px}._propertyOrMethodExample_1n8fb_55{position:relative}._propertyOrMethodExample_1n8fb_55 pre{background:var(--light-bg-color);font-size:.8em;margin:0;max-height:240px;overflow:auto;padding:15px}._propertyOrMethodName_1n8fb_68{color:var(--light-body-color);display:block;font-family:var(--monospaced-font-family);font-size:.9em;font-weight:700;margin-bottom:5px;text-decoration:none}._propertyOrMethodName_1n8fb_68:hover{text-decoration:underline}._propertyOrMethodExampleActions_1n8fb_82{background:#fff;display:flex;padding:15px}._propertyOrMethodExampleActions_1n8fb_82>*{margin-right:10px}html{font-size:16px;height:auto}body,html{margin:0;padding:0}
|