@lets-events/react 12.1.2 → 12.1.4
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/.turbo/turbo-build.log +10 -11
- package/CHANGELOG.md +13 -1
- package/dist/QuillComponent-A5KIFPCL.mjs +438 -0
- package/dist/chunk-TU7LKUXZ.mjs +1927 -0
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1712 -1523
- package/dist/index.mjs +347 -2652
- package/package.json +2 -1
- package/src/components/RichEditor/RichEditor.tsx +15 -4
- package/src/components/TextareaField.tsx +23 -24
package/dist/index.mjs
CHANGED
|
@@ -1,1434 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __objRest = (source, exclude) => {
|
|
25
|
-
var target = {};
|
|
26
|
-
for (var prop in source)
|
|
27
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
if (source != null && __getOwnPropSymbols)
|
|
30
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
-
target[prop] = source[prop];
|
|
33
|
-
}
|
|
34
|
-
return target;
|
|
35
|
-
};
|
|
36
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
37
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
38
|
-
};
|
|
39
|
-
var __copyProps = (to, from, except, desc) => {
|
|
40
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
41
|
-
for (let key of __getOwnPropNames(from))
|
|
42
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
43
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
44
|
-
}
|
|
45
|
-
return to;
|
|
46
|
-
};
|
|
47
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
48
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
49
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
50
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
51
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
52
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
53
|
-
mod
|
|
54
|
-
));
|
|
55
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
56
|
-
var __async = (__this, __arguments, generator) => {
|
|
57
|
-
return new Promise((resolve, reject) => {
|
|
58
|
-
var fulfilled = (value) => {
|
|
59
|
-
try {
|
|
60
|
-
step(generator.next(value));
|
|
61
|
-
} catch (e) {
|
|
62
|
-
reject(e);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
var rejected = (value) => {
|
|
66
|
-
try {
|
|
67
|
-
step(generator.throw(value));
|
|
68
|
-
} catch (e) {
|
|
69
|
-
reject(e);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
73
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
// ../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js
|
|
78
|
-
var require_react_is_development = __commonJS({
|
|
79
|
-
"../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"(exports) {
|
|
80
|
-
"use strict";
|
|
81
|
-
if (true) {
|
|
82
|
-
(function() {
|
|
83
|
-
"use strict";
|
|
84
|
-
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
85
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
|
|
86
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
|
|
87
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
|
|
88
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
|
|
89
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
|
|
90
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
|
|
91
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
|
|
92
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
|
|
93
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
|
|
94
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
|
|
95
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
|
|
96
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
|
|
97
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
|
|
98
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
|
|
99
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
|
|
100
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
|
|
101
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
|
|
102
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
|
|
103
|
-
function isValidElementType(type) {
|
|
104
|
-
return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
105
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
106
|
-
}
|
|
107
|
-
function typeOf(object) {
|
|
108
|
-
if (typeof object === "object" && object !== null) {
|
|
109
|
-
var $$typeof = object.$$typeof;
|
|
110
|
-
switch ($$typeof) {
|
|
111
|
-
case REACT_ELEMENT_TYPE:
|
|
112
|
-
var type = object.type;
|
|
113
|
-
switch (type) {
|
|
114
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
115
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
116
|
-
case REACT_FRAGMENT_TYPE:
|
|
117
|
-
case REACT_PROFILER_TYPE:
|
|
118
|
-
case REACT_STRICT_MODE_TYPE:
|
|
119
|
-
case REACT_SUSPENSE_TYPE:
|
|
120
|
-
return type;
|
|
121
|
-
default:
|
|
122
|
-
var $$typeofType = type && type.$$typeof;
|
|
123
|
-
switch ($$typeofType) {
|
|
124
|
-
case REACT_CONTEXT_TYPE:
|
|
125
|
-
case REACT_FORWARD_REF_TYPE:
|
|
126
|
-
case REACT_LAZY_TYPE:
|
|
127
|
-
case REACT_MEMO_TYPE:
|
|
128
|
-
case REACT_PROVIDER_TYPE:
|
|
129
|
-
return $$typeofType;
|
|
130
|
-
default:
|
|
131
|
-
return $$typeof;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
case REACT_PORTAL_TYPE:
|
|
135
|
-
return $$typeof;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return void 0;
|
|
139
|
-
}
|
|
140
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
141
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
142
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
143
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
144
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
145
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
146
|
-
var Fragment5 = REACT_FRAGMENT_TYPE;
|
|
147
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
148
|
-
var Memo = REACT_MEMO_TYPE;
|
|
149
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
150
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
151
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
152
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
153
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
154
|
-
function isAsyncMode(object) {
|
|
155
|
-
{
|
|
156
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
157
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
158
|
-
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
162
|
-
}
|
|
163
|
-
function isConcurrentMode(object) {
|
|
164
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
165
|
-
}
|
|
166
|
-
function isContextConsumer(object) {
|
|
167
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
168
|
-
}
|
|
169
|
-
function isContextProvider(object) {
|
|
170
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
171
|
-
}
|
|
172
|
-
function isElement(object) {
|
|
173
|
-
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
174
|
-
}
|
|
175
|
-
function isForwardRef(object) {
|
|
176
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
177
|
-
}
|
|
178
|
-
function isFragment(object) {
|
|
179
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
180
|
-
}
|
|
181
|
-
function isLazy(object) {
|
|
182
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
183
|
-
}
|
|
184
|
-
function isMemo(object) {
|
|
185
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
186
|
-
}
|
|
187
|
-
function isPortal(object) {
|
|
188
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
189
|
-
}
|
|
190
|
-
function isProfiler(object) {
|
|
191
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
192
|
-
}
|
|
193
|
-
function isStrictMode(object) {
|
|
194
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
195
|
-
}
|
|
196
|
-
function isSuspense(object) {
|
|
197
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
198
|
-
}
|
|
199
|
-
exports.AsyncMode = AsyncMode;
|
|
200
|
-
exports.ConcurrentMode = ConcurrentMode;
|
|
201
|
-
exports.ContextConsumer = ContextConsumer;
|
|
202
|
-
exports.ContextProvider = ContextProvider;
|
|
203
|
-
exports.Element = Element;
|
|
204
|
-
exports.ForwardRef = ForwardRef;
|
|
205
|
-
exports.Fragment = Fragment5;
|
|
206
|
-
exports.Lazy = Lazy;
|
|
207
|
-
exports.Memo = Memo;
|
|
208
|
-
exports.Portal = Portal;
|
|
209
|
-
exports.Profiler = Profiler;
|
|
210
|
-
exports.StrictMode = StrictMode;
|
|
211
|
-
exports.Suspense = Suspense;
|
|
212
|
-
exports.isAsyncMode = isAsyncMode;
|
|
213
|
-
exports.isConcurrentMode = isConcurrentMode;
|
|
214
|
-
exports.isContextConsumer = isContextConsumer;
|
|
215
|
-
exports.isContextProvider = isContextProvider;
|
|
216
|
-
exports.isElement = isElement;
|
|
217
|
-
exports.isForwardRef = isForwardRef;
|
|
218
|
-
exports.isFragment = isFragment;
|
|
219
|
-
exports.isLazy = isLazy;
|
|
220
|
-
exports.isMemo = isMemo;
|
|
221
|
-
exports.isPortal = isPortal;
|
|
222
|
-
exports.isProfiler = isProfiler;
|
|
223
|
-
exports.isStrictMode = isStrictMode;
|
|
224
|
-
exports.isSuspense = isSuspense;
|
|
225
|
-
exports.isValidElementType = isValidElementType;
|
|
226
|
-
exports.typeOf = typeOf;
|
|
227
|
-
})();
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
|
|
232
|
-
// ../../node_modules/prop-types/node_modules/react-is/index.js
|
|
233
|
-
var require_react_is = __commonJS({
|
|
234
|
-
"../../node_modules/prop-types/node_modules/react-is/index.js"(exports, module) {
|
|
235
|
-
"use strict";
|
|
236
|
-
if (false) {
|
|
237
|
-
module.exports = null;
|
|
238
|
-
} else {
|
|
239
|
-
module.exports = require_react_is_development();
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
// ../../node_modules/object-assign/index.js
|
|
245
|
-
var require_object_assign = __commonJS({
|
|
246
|
-
"../../node_modules/object-assign/index.js"(exports, module) {
|
|
247
|
-
"use strict";
|
|
248
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
249
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
250
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
251
|
-
function toObject(val) {
|
|
252
|
-
if (val === null || val === void 0) {
|
|
253
|
-
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
254
|
-
}
|
|
255
|
-
return Object(val);
|
|
256
|
-
}
|
|
257
|
-
function shouldUseNative() {
|
|
258
|
-
try {
|
|
259
|
-
if (!Object.assign) {
|
|
260
|
-
return false;
|
|
261
|
-
}
|
|
262
|
-
var test1 = new String("abc");
|
|
263
|
-
test1[5] = "de";
|
|
264
|
-
if (Object.getOwnPropertyNames(test1)[0] === "5") {
|
|
265
|
-
return false;
|
|
266
|
-
}
|
|
267
|
-
var test2 = {};
|
|
268
|
-
for (var i = 0; i < 10; i++) {
|
|
269
|
-
test2["_" + String.fromCharCode(i)] = i;
|
|
270
|
-
}
|
|
271
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
|
|
272
|
-
return test2[n];
|
|
273
|
-
});
|
|
274
|
-
if (order2.join("") !== "0123456789") {
|
|
275
|
-
return false;
|
|
276
|
-
}
|
|
277
|
-
var test3 = {};
|
|
278
|
-
"abcdefghijklmnopqrst".split("").forEach(function(letter) {
|
|
279
|
-
test3[letter] = letter;
|
|
280
|
-
});
|
|
281
|
-
if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
|
|
282
|
-
return false;
|
|
283
|
-
}
|
|
284
|
-
return true;
|
|
285
|
-
} catch (err) {
|
|
286
|
-
return false;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
module.exports = shouldUseNative() ? Object.assign : function(target, source) {
|
|
290
|
-
var from;
|
|
291
|
-
var to = toObject(target);
|
|
292
|
-
var symbols;
|
|
293
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
294
|
-
from = Object(arguments[s]);
|
|
295
|
-
for (var key in from) {
|
|
296
|
-
if (hasOwnProperty.call(from, key)) {
|
|
297
|
-
to[key] = from[key];
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
if (getOwnPropertySymbols) {
|
|
301
|
-
symbols = getOwnPropertySymbols(from);
|
|
302
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
303
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
304
|
-
to[symbols[i]] = from[symbols[i]];
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
return to;
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
|
|
314
|
-
// ../../node_modules/prop-types/lib/ReactPropTypesSecret.js
|
|
315
|
-
var require_ReactPropTypesSecret = __commonJS({
|
|
316
|
-
"../../node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports, module) {
|
|
317
|
-
"use strict";
|
|
318
|
-
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
319
|
-
module.exports = ReactPropTypesSecret;
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
// ../../node_modules/prop-types/lib/has.js
|
|
324
|
-
var require_has = __commonJS({
|
|
325
|
-
"../../node_modules/prop-types/lib/has.js"(exports, module) {
|
|
326
|
-
"use strict";
|
|
327
|
-
module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
328
|
-
}
|
|
329
|
-
});
|
|
330
|
-
|
|
331
|
-
// ../../node_modules/prop-types/checkPropTypes.js
|
|
332
|
-
var require_checkPropTypes = __commonJS({
|
|
333
|
-
"../../node_modules/prop-types/checkPropTypes.js"(exports, module) {
|
|
334
|
-
"use strict";
|
|
335
|
-
var printWarning = function() {
|
|
336
|
-
};
|
|
337
|
-
if (true) {
|
|
338
|
-
ReactPropTypesSecret = require_ReactPropTypesSecret();
|
|
339
|
-
loggedTypeFailures = {};
|
|
340
|
-
has = require_has();
|
|
341
|
-
printWarning = function(text) {
|
|
342
|
-
var message2 = "Warning: " + text;
|
|
343
|
-
if (typeof console !== "undefined") {
|
|
344
|
-
console.error(message2);
|
|
345
|
-
}
|
|
346
|
-
try {
|
|
347
|
-
throw new Error(message2);
|
|
348
|
-
} catch (x) {
|
|
349
|
-
}
|
|
350
|
-
};
|
|
351
|
-
}
|
|
352
|
-
var ReactPropTypesSecret;
|
|
353
|
-
var loggedTypeFailures;
|
|
354
|
-
var has;
|
|
355
|
-
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
356
|
-
if (true) {
|
|
357
|
-
for (var typeSpecName in typeSpecs) {
|
|
358
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
359
|
-
var error;
|
|
360
|
-
try {
|
|
361
|
-
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
362
|
-
var err = Error(
|
|
363
|
-
(componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
364
|
-
);
|
|
365
|
-
err.name = "Invariant Violation";
|
|
366
|
-
throw err;
|
|
367
|
-
}
|
|
368
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
369
|
-
} catch (ex) {
|
|
370
|
-
error = ex;
|
|
371
|
-
}
|
|
372
|
-
if (error && !(error instanceof Error)) {
|
|
373
|
-
printWarning(
|
|
374
|
-
(componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
375
|
-
);
|
|
376
|
-
}
|
|
377
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
378
|
-
loggedTypeFailures[error.message] = true;
|
|
379
|
-
var stack = getStack ? getStack() : "";
|
|
380
|
-
printWarning(
|
|
381
|
-
"Failed " + location + " type: " + error.message + (stack != null ? stack : "")
|
|
382
|
-
);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
checkPropTypes.resetWarningCache = function() {
|
|
389
|
-
if (true) {
|
|
390
|
-
loggedTypeFailures = {};
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
module.exports = checkPropTypes;
|
|
394
|
-
}
|
|
395
|
-
});
|
|
396
|
-
|
|
397
|
-
// ../../node_modules/prop-types/factoryWithTypeCheckers.js
|
|
398
|
-
var require_factoryWithTypeCheckers = __commonJS({
|
|
399
|
-
"../../node_modules/prop-types/factoryWithTypeCheckers.js"(exports, module) {
|
|
400
|
-
"use strict";
|
|
401
|
-
var ReactIs = require_react_is();
|
|
402
|
-
var assign = require_object_assign();
|
|
403
|
-
var ReactPropTypesSecret = require_ReactPropTypesSecret();
|
|
404
|
-
var has = require_has();
|
|
405
|
-
var checkPropTypes = require_checkPropTypes();
|
|
406
|
-
var printWarning = function() {
|
|
407
|
-
};
|
|
408
|
-
if (true) {
|
|
409
|
-
printWarning = function(text) {
|
|
410
|
-
var message2 = "Warning: " + text;
|
|
411
|
-
if (typeof console !== "undefined") {
|
|
412
|
-
console.error(message2);
|
|
413
|
-
}
|
|
414
|
-
try {
|
|
415
|
-
throw new Error(message2);
|
|
416
|
-
} catch (x) {
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
function emptyFunctionThatReturnsNull() {
|
|
421
|
-
return null;
|
|
422
|
-
}
|
|
423
|
-
module.exports = function(isValidElement, throwOnDirectAccess) {
|
|
424
|
-
var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
|
|
425
|
-
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
426
|
-
function getIteratorFn(maybeIterable) {
|
|
427
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
428
|
-
if (typeof iteratorFn === "function") {
|
|
429
|
-
return iteratorFn;
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
var ANONYMOUS = "<<anonymous>>";
|
|
433
|
-
var ReactPropTypes = {
|
|
434
|
-
array: createPrimitiveTypeChecker("array"),
|
|
435
|
-
bigint: createPrimitiveTypeChecker("bigint"),
|
|
436
|
-
bool: createPrimitiveTypeChecker("boolean"),
|
|
437
|
-
func: createPrimitiveTypeChecker("function"),
|
|
438
|
-
number: createPrimitiveTypeChecker("number"),
|
|
439
|
-
object: createPrimitiveTypeChecker("object"),
|
|
440
|
-
string: createPrimitiveTypeChecker("string"),
|
|
441
|
-
symbol: createPrimitiveTypeChecker("symbol"),
|
|
442
|
-
any: createAnyTypeChecker(),
|
|
443
|
-
arrayOf: createArrayOfTypeChecker,
|
|
444
|
-
element: createElementTypeChecker(),
|
|
445
|
-
elementType: createElementTypeTypeChecker(),
|
|
446
|
-
instanceOf: createInstanceTypeChecker,
|
|
447
|
-
node: createNodeChecker(),
|
|
448
|
-
objectOf: createObjectOfTypeChecker,
|
|
449
|
-
oneOf: createEnumTypeChecker,
|
|
450
|
-
oneOfType: createUnionTypeChecker,
|
|
451
|
-
shape: createShapeTypeChecker,
|
|
452
|
-
exact: createStrictShapeTypeChecker
|
|
453
|
-
};
|
|
454
|
-
function is(x, y) {
|
|
455
|
-
if (x === y) {
|
|
456
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
457
|
-
} else {
|
|
458
|
-
return x !== x && y !== y;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
function PropTypeError(message2, data) {
|
|
462
|
-
this.message = message2;
|
|
463
|
-
this.data = data && typeof data === "object" ? data : {};
|
|
464
|
-
this.stack = "";
|
|
465
|
-
}
|
|
466
|
-
PropTypeError.prototype = Error.prototype;
|
|
467
|
-
function createChainableTypeChecker(validate) {
|
|
468
|
-
if (true) {
|
|
469
|
-
var manualPropTypeCallCache = {};
|
|
470
|
-
var manualPropTypeWarningCount = 0;
|
|
471
|
-
}
|
|
472
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
473
|
-
componentName = componentName || ANONYMOUS;
|
|
474
|
-
propFullName = propFullName || propName;
|
|
475
|
-
if (secret !== ReactPropTypesSecret) {
|
|
476
|
-
if (throwOnDirectAccess) {
|
|
477
|
-
var err = new Error(
|
|
478
|
-
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
479
|
-
);
|
|
480
|
-
err.name = "Invariant Violation";
|
|
481
|
-
throw err;
|
|
482
|
-
} else if (typeof console !== "undefined") {
|
|
483
|
-
var cacheKey = componentName + ":" + propName;
|
|
484
|
-
if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
485
|
-
manualPropTypeWarningCount < 3) {
|
|
486
|
-
printWarning(
|
|
487
|
-
"You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
488
|
-
);
|
|
489
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
490
|
-
manualPropTypeWarningCount++;
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
if (props[propName] == null) {
|
|
495
|
-
if (isRequired) {
|
|
496
|
-
if (props[propName] === null) {
|
|
497
|
-
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
|
|
498
|
-
}
|
|
499
|
-
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
|
|
500
|
-
}
|
|
501
|
-
return null;
|
|
502
|
-
} else {
|
|
503
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
507
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
508
|
-
return chainedCheckType;
|
|
509
|
-
}
|
|
510
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
511
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
512
|
-
var propValue = props[propName];
|
|
513
|
-
var propType = getPropType(propValue);
|
|
514
|
-
if (propType !== expectedType) {
|
|
515
|
-
var preciseType = getPreciseType(propValue);
|
|
516
|
-
return new PropTypeError(
|
|
517
|
-
"Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
|
|
518
|
-
{ expectedType }
|
|
519
|
-
);
|
|
520
|
-
}
|
|
521
|
-
return null;
|
|
522
|
-
}
|
|
523
|
-
return createChainableTypeChecker(validate);
|
|
524
|
-
}
|
|
525
|
-
function createAnyTypeChecker() {
|
|
526
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
527
|
-
}
|
|
528
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
529
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
530
|
-
if (typeof typeChecker !== "function") {
|
|
531
|
-
return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
|
|
532
|
-
}
|
|
533
|
-
var propValue = props[propName];
|
|
534
|
-
if (!Array.isArray(propValue)) {
|
|
535
|
-
var propType = getPropType(propValue);
|
|
536
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
|
|
537
|
-
}
|
|
538
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
539
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
|
|
540
|
-
if (error instanceof Error) {
|
|
541
|
-
return error;
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
return null;
|
|
545
|
-
}
|
|
546
|
-
return createChainableTypeChecker(validate);
|
|
547
|
-
}
|
|
548
|
-
function createElementTypeChecker() {
|
|
549
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
550
|
-
var propValue = props[propName];
|
|
551
|
-
if (!isValidElement(propValue)) {
|
|
552
|
-
var propType = getPropType(propValue);
|
|
553
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
|
|
554
|
-
}
|
|
555
|
-
return null;
|
|
556
|
-
}
|
|
557
|
-
return createChainableTypeChecker(validate);
|
|
558
|
-
}
|
|
559
|
-
function createElementTypeTypeChecker() {
|
|
560
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
561
|
-
var propValue = props[propName];
|
|
562
|
-
if (!ReactIs.isValidElementType(propValue)) {
|
|
563
|
-
var propType = getPropType(propValue);
|
|
564
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
|
|
565
|
-
}
|
|
566
|
-
return null;
|
|
567
|
-
}
|
|
568
|
-
return createChainableTypeChecker(validate);
|
|
569
|
-
}
|
|
570
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
571
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
572
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
573
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
574
|
-
var actualClassName = getClassName(props[propName]);
|
|
575
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
|
|
576
|
-
}
|
|
577
|
-
return null;
|
|
578
|
-
}
|
|
579
|
-
return createChainableTypeChecker(validate);
|
|
580
|
-
}
|
|
581
|
-
function createEnumTypeChecker(expectedValues) {
|
|
582
|
-
if (!Array.isArray(expectedValues)) {
|
|
583
|
-
if (true) {
|
|
584
|
-
if (arguments.length > 1) {
|
|
585
|
-
printWarning(
|
|
586
|
-
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
587
|
-
);
|
|
588
|
-
} else {
|
|
589
|
-
printWarning("Invalid argument supplied to oneOf, expected an array.");
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
return emptyFunctionThatReturnsNull;
|
|
593
|
-
}
|
|
594
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
595
|
-
var propValue = props[propName];
|
|
596
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
597
|
-
if (is(propValue, expectedValues[i])) {
|
|
598
|
-
return null;
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
602
|
-
var type = getPreciseType(value);
|
|
603
|
-
if (type === "symbol") {
|
|
604
|
-
return String(value);
|
|
605
|
-
}
|
|
606
|
-
return value;
|
|
607
|
-
});
|
|
608
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
|
|
609
|
-
}
|
|
610
|
-
return createChainableTypeChecker(validate);
|
|
611
|
-
}
|
|
612
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
613
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
614
|
-
if (typeof typeChecker !== "function") {
|
|
615
|
-
return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
|
|
616
|
-
}
|
|
617
|
-
var propValue = props[propName];
|
|
618
|
-
var propType = getPropType(propValue);
|
|
619
|
-
if (propType !== "object") {
|
|
620
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
|
|
621
|
-
}
|
|
622
|
-
for (var key in propValue) {
|
|
623
|
-
if (has(propValue, key)) {
|
|
624
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
625
|
-
if (error instanceof Error) {
|
|
626
|
-
return error;
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
return null;
|
|
631
|
-
}
|
|
632
|
-
return createChainableTypeChecker(validate);
|
|
633
|
-
}
|
|
634
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
635
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
636
|
-
true ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
|
|
637
|
-
return emptyFunctionThatReturnsNull;
|
|
638
|
-
}
|
|
639
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
640
|
-
var checker = arrayOfTypeCheckers[i];
|
|
641
|
-
if (typeof checker !== "function") {
|
|
642
|
-
printWarning(
|
|
643
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
|
|
644
|
-
);
|
|
645
|
-
return emptyFunctionThatReturnsNull;
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
649
|
-
var expectedTypes = [];
|
|
650
|
-
for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
|
|
651
|
-
var checker2 = arrayOfTypeCheckers[i2];
|
|
652
|
-
var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
653
|
-
if (checkerResult == null) {
|
|
654
|
-
return null;
|
|
655
|
-
}
|
|
656
|
-
if (checkerResult.data && has(checkerResult.data, "expectedType")) {
|
|
657
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
|
|
661
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
|
|
662
|
-
}
|
|
663
|
-
return createChainableTypeChecker(validate);
|
|
664
|
-
}
|
|
665
|
-
function createNodeChecker() {
|
|
666
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
667
|
-
if (!isNode(props[propName])) {
|
|
668
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
|
|
669
|
-
}
|
|
670
|
-
return null;
|
|
671
|
-
}
|
|
672
|
-
return createChainableTypeChecker(validate);
|
|
673
|
-
}
|
|
674
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
675
|
-
return new PropTypeError(
|
|
676
|
-
(componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
|
|
677
|
-
);
|
|
678
|
-
}
|
|
679
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
680
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
681
|
-
var propValue = props[propName];
|
|
682
|
-
var propType = getPropType(propValue);
|
|
683
|
-
if (propType !== "object") {
|
|
684
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
685
|
-
}
|
|
686
|
-
for (var key in shapeTypes) {
|
|
687
|
-
var checker = shapeTypes[key];
|
|
688
|
-
if (typeof checker !== "function") {
|
|
689
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
690
|
-
}
|
|
691
|
-
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
692
|
-
if (error) {
|
|
693
|
-
return error;
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
return null;
|
|
697
|
-
}
|
|
698
|
-
return createChainableTypeChecker(validate);
|
|
699
|
-
}
|
|
700
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
701
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
702
|
-
var propValue = props[propName];
|
|
703
|
-
var propType = getPropType(propValue);
|
|
704
|
-
if (propType !== "object") {
|
|
705
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
706
|
-
}
|
|
707
|
-
var allKeys = assign({}, props[propName], shapeTypes);
|
|
708
|
-
for (var key in allKeys) {
|
|
709
|
-
var checker = shapeTypes[key];
|
|
710
|
-
if (has(shapeTypes, key) && typeof checker !== "function") {
|
|
711
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
712
|
-
}
|
|
713
|
-
if (!checker) {
|
|
714
|
-
return new PropTypeError(
|
|
715
|
-
"Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
|
|
716
|
-
);
|
|
717
|
-
}
|
|
718
|
-
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
719
|
-
if (error) {
|
|
720
|
-
return error;
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
return null;
|
|
724
|
-
}
|
|
725
|
-
return createChainableTypeChecker(validate);
|
|
726
|
-
}
|
|
727
|
-
function isNode(propValue) {
|
|
728
|
-
switch (typeof propValue) {
|
|
729
|
-
case "number":
|
|
730
|
-
case "string":
|
|
731
|
-
case "undefined":
|
|
732
|
-
return true;
|
|
733
|
-
case "boolean":
|
|
734
|
-
return !propValue;
|
|
735
|
-
case "object":
|
|
736
|
-
if (Array.isArray(propValue)) {
|
|
737
|
-
return propValue.every(isNode);
|
|
738
|
-
}
|
|
739
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
740
|
-
return true;
|
|
741
|
-
}
|
|
742
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
743
|
-
if (iteratorFn) {
|
|
744
|
-
var iterator = iteratorFn.call(propValue);
|
|
745
|
-
var step;
|
|
746
|
-
if (iteratorFn !== propValue.entries) {
|
|
747
|
-
while (!(step = iterator.next()).done) {
|
|
748
|
-
if (!isNode(step.value)) {
|
|
749
|
-
return false;
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
} else {
|
|
753
|
-
while (!(step = iterator.next()).done) {
|
|
754
|
-
var entry = step.value;
|
|
755
|
-
if (entry) {
|
|
756
|
-
if (!isNode(entry[1])) {
|
|
757
|
-
return false;
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
} else {
|
|
763
|
-
return false;
|
|
764
|
-
}
|
|
765
|
-
return true;
|
|
766
|
-
default:
|
|
767
|
-
return false;
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
function isSymbol(propType, propValue) {
|
|
771
|
-
if (propType === "symbol") {
|
|
772
|
-
return true;
|
|
773
|
-
}
|
|
774
|
-
if (!propValue) {
|
|
775
|
-
return false;
|
|
776
|
-
}
|
|
777
|
-
if (propValue["@@toStringTag"] === "Symbol") {
|
|
778
|
-
return true;
|
|
779
|
-
}
|
|
780
|
-
if (typeof Symbol === "function" && propValue instanceof Symbol) {
|
|
781
|
-
return true;
|
|
782
|
-
}
|
|
783
|
-
return false;
|
|
784
|
-
}
|
|
785
|
-
function getPropType(propValue) {
|
|
786
|
-
var propType = typeof propValue;
|
|
787
|
-
if (Array.isArray(propValue)) {
|
|
788
|
-
return "array";
|
|
789
|
-
}
|
|
790
|
-
if (propValue instanceof RegExp) {
|
|
791
|
-
return "object";
|
|
792
|
-
}
|
|
793
|
-
if (isSymbol(propType, propValue)) {
|
|
794
|
-
return "symbol";
|
|
795
|
-
}
|
|
796
|
-
return propType;
|
|
797
|
-
}
|
|
798
|
-
function getPreciseType(propValue) {
|
|
799
|
-
if (typeof propValue === "undefined" || propValue === null) {
|
|
800
|
-
return "" + propValue;
|
|
801
|
-
}
|
|
802
|
-
var propType = getPropType(propValue);
|
|
803
|
-
if (propType === "object") {
|
|
804
|
-
if (propValue instanceof Date) {
|
|
805
|
-
return "date";
|
|
806
|
-
} else if (propValue instanceof RegExp) {
|
|
807
|
-
return "regexp";
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
return propType;
|
|
811
|
-
}
|
|
812
|
-
function getPostfixForTypeWarning(value) {
|
|
813
|
-
var type = getPreciseType(value);
|
|
814
|
-
switch (type) {
|
|
815
|
-
case "array":
|
|
816
|
-
case "object":
|
|
817
|
-
return "an " + type;
|
|
818
|
-
case "boolean":
|
|
819
|
-
case "date":
|
|
820
|
-
case "regexp":
|
|
821
|
-
return "a " + type;
|
|
822
|
-
default:
|
|
823
|
-
return type;
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
function getClassName(propValue) {
|
|
827
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
828
|
-
return ANONYMOUS;
|
|
829
|
-
}
|
|
830
|
-
return propValue.constructor.name;
|
|
831
|
-
}
|
|
832
|
-
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
833
|
-
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
834
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
835
|
-
return ReactPropTypes;
|
|
836
|
-
};
|
|
837
|
-
}
|
|
838
|
-
});
|
|
839
|
-
|
|
840
|
-
// ../../node_modules/prop-types/index.js
|
|
841
|
-
var require_prop_types = __commonJS({
|
|
842
|
-
"../../node_modules/prop-types/index.js"(exports, module) {
|
|
843
|
-
"use strict";
|
|
844
|
-
if (true) {
|
|
845
|
-
ReactIs = require_react_is();
|
|
846
|
-
throwOnDirectAccess = true;
|
|
847
|
-
module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
848
|
-
} else {
|
|
849
|
-
module.exports = null();
|
|
850
|
-
}
|
|
851
|
-
var ReactIs;
|
|
852
|
-
var throwOnDirectAccess;
|
|
853
|
-
}
|
|
854
|
-
});
|
|
855
|
-
|
|
856
|
-
// src/components/Icon.tsx
|
|
857
|
-
var import_prop_types = __toESM(require_prop_types());
|
|
858
|
-
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
859
|
-
import { library } from "@fortawesome/fontawesome-svg-core";
|
|
860
|
-
import { fas } from "@fortawesome/free-solid-svg-icons";
|
|
861
|
-
import { far } from "@fortawesome/free-regular-svg-icons";
|
|
862
|
-
import { fab } from "@fortawesome/free-brands-svg-icons";
|
|
863
|
-
import { jsx } from "react/jsx-runtime";
|
|
864
|
-
library.add(fas, far, fab);
|
|
865
|
-
var Icon = (_a) => {
|
|
866
|
-
var _b = _a, { name, prefix = "fas", size = "sm", color = "currentColor", className = "" } = _b, props = __objRest(_b, ["name", "prefix", "size", "color", "className"]);
|
|
867
|
-
var _a2, _b2;
|
|
868
|
-
const sizeMap = {
|
|
869
|
-
"xs": { width: "0.625rem", height: "0.625rem", fontSize: "0.625rem" },
|
|
870
|
-
"sm": { width: "0.625rem", height: "0.625rem", fontSize: "0.625rem" },
|
|
871
|
-
"md": { width: "0.75rem", height: "0.75rem", fontSize: "0.75rem" },
|
|
872
|
-
"xl": { width: "1rem", height: "1rem", fontSize: "1rem" },
|
|
873
|
-
undefined: { width: "0.75rem", height: "0.75rem", fontSize: "0.75rem" }
|
|
874
|
-
};
|
|
875
|
-
return /* @__PURE__ */ jsx(
|
|
876
|
-
FontAwesomeIcon,
|
|
877
|
-
__spreadProps(__spreadValues({
|
|
878
|
-
icon: [prefix, name],
|
|
879
|
-
style: sizeMap[size],
|
|
880
|
-
color,
|
|
881
|
-
className
|
|
882
|
-
}, props), {
|
|
883
|
-
width: (_a2 = sizeMap[size]) == null ? void 0 : _a2.width,
|
|
884
|
-
height: (_b2 = sizeMap[size]) == null ? void 0 : _b2.height
|
|
885
|
-
})
|
|
886
|
-
);
|
|
887
|
-
};
|
|
888
|
-
Icon.propTypes = {
|
|
889
|
-
name: import_prop_types.default.string.isRequired,
|
|
890
|
-
prefix: import_prop_types.default.string,
|
|
891
|
-
size: import_prop_types.default.string,
|
|
892
|
-
color: import_prop_types.default.string,
|
|
893
|
-
className: import_prop_types.default.string
|
|
894
|
-
};
|
|
895
|
-
var Icon_default = Icon;
|
|
896
|
-
|
|
897
|
-
// ../tokens/dist/index.mjs
|
|
898
|
-
var colors = {
|
|
899
|
-
brand50: "#DBE8FF",
|
|
900
|
-
brand100: "#BDD5FF",
|
|
901
|
-
brand200: "#7AABFF",
|
|
902
|
-
brand300: "#3881FF",
|
|
903
|
-
brand400: "#005AF5",
|
|
904
|
-
brand500: "#004ED2",
|
|
905
|
-
brand600: "#0042B2",
|
|
906
|
-
brand700: "#00348F",
|
|
907
|
-
brand800: "#00276B",
|
|
908
|
-
brand900: "#001A47",
|
|
909
|
-
brand950: "#000D24",
|
|
910
|
-
blue50: "#E5F1FF",
|
|
911
|
-
blue100: "#CCE4FF",
|
|
912
|
-
blue200: "#9AC9FF",
|
|
913
|
-
blue300: "#66ADFF",
|
|
914
|
-
blue400: "#3392FF",
|
|
915
|
-
blue500: "#0278FE",
|
|
916
|
-
blue600: "#005FCD",
|
|
917
|
-
blue700: "#004799",
|
|
918
|
-
blue800: "#013066",
|
|
919
|
-
blue900: "#001834",
|
|
920
|
-
blue950: "#000C1A",
|
|
921
|
-
red50: "#FCEEEF",
|
|
922
|
-
red100: "#F9DCDF",
|
|
923
|
-
red200: "#F3BEC3",
|
|
924
|
-
red300: "#ED9CA2",
|
|
925
|
-
red400: "#E77982",
|
|
926
|
-
red500: "#E15662",
|
|
927
|
-
red600: "#DB3644",
|
|
928
|
-
red700: "#AD1F2B",
|
|
929
|
-
red800: "#75151D",
|
|
930
|
-
red900: "#380A0E",
|
|
931
|
-
red950: "#1E0507",
|
|
932
|
-
pink100: "#F9DCF3",
|
|
933
|
-
purple50: "#F3EFFB",
|
|
934
|
-
purple100: "#E6DEF7",
|
|
935
|
-
purple200: "#D1C2F0",
|
|
936
|
-
purple300: "#B9A1E8",
|
|
937
|
-
purple400: "#A080E0",
|
|
938
|
-
purple500: "#8961D8",
|
|
939
|
-
purple600: "#6431C8",
|
|
940
|
-
purple700: "#4B2597",
|
|
941
|
-
purple800: "#331966",
|
|
942
|
-
purple900: "#180C31",
|
|
943
|
-
purple950: "#0C0619",
|
|
944
|
-
yellow50: "#FFF9E6",
|
|
945
|
-
yellow100: "#FFF3CD",
|
|
946
|
-
yellow200: "#FFE69C",
|
|
947
|
-
yellow300: "#FFDA6A",
|
|
948
|
-
yellow400: "#FFCD39",
|
|
949
|
-
yellow500: "#FFC107",
|
|
950
|
-
yellow600: "#CC9A06",
|
|
951
|
-
yellow700: "#997404",
|
|
952
|
-
yellow800: "#664D03",
|
|
953
|
-
yellow900: "#332701",
|
|
954
|
-
yellow950: "#191300",
|
|
955
|
-
orange100: "#FEE0D8",
|
|
956
|
-
dark50: "#FFFFFF",
|
|
957
|
-
dark100: "#F4F4F4",
|
|
958
|
-
dark200: "#EAEBF0",
|
|
959
|
-
dark300: "#C2C3C7",
|
|
960
|
-
dark400: "#A9ABB1",
|
|
961
|
-
dark500: "#808289",
|
|
962
|
-
dark600: "#4C4F54",
|
|
963
|
-
dark700: "#34363B",
|
|
964
|
-
dark800: "#1E2023",
|
|
965
|
-
dark900: "#040507",
|
|
966
|
-
dark950: "#030303",
|
|
967
|
-
neutral50: "#FFFFFF",
|
|
968
|
-
neutral100: "#F4F4F4",
|
|
969
|
-
neutral200: "#EAEBF0",
|
|
970
|
-
neutral300: "#C2C3C7",
|
|
971
|
-
neutral400: "#A9ABB1",
|
|
972
|
-
neutral500: "#808289",
|
|
973
|
-
neutral600: "#4C4F54",
|
|
974
|
-
neutral700: "#34363B",
|
|
975
|
-
neutral800: "#1E2023",
|
|
976
|
-
neutral900: "#040507",
|
|
977
|
-
neutral950: "#030303",
|
|
978
|
-
green50: "#E6F9EA",
|
|
979
|
-
green100: "#CDF4D5",
|
|
980
|
-
green200: "#9BE8AC",
|
|
981
|
-
green300: "#6CD783",
|
|
982
|
-
green400: "#5BCA72",
|
|
983
|
-
green500: "#26A743",
|
|
984
|
-
green600: "#1E8535",
|
|
985
|
-
green700: "#176427",
|
|
986
|
-
green800: "#0F421A",
|
|
987
|
-
green900: "#08210D",
|
|
988
|
-
green950: "#041107",
|
|
989
|
-
grey50: "#F4F8FB",
|
|
990
|
-
grey100: "#E6EEF4",
|
|
991
|
-
grey200: "#DBE7F0",
|
|
992
|
-
grey300: "#BCCEDD",
|
|
993
|
-
grey400: "#9FB6C7",
|
|
994
|
-
grey500: "#849DAE",
|
|
995
|
-
grey600: "#698496",
|
|
996
|
-
grey700: "#516A7A",
|
|
997
|
-
grey800: "#394F61",
|
|
998
|
-
grey900: "#233543",
|
|
999
|
-
grey950: "#101B23",
|
|
1000
|
-
error50: "#FCEEEF",
|
|
1001
|
-
error100: "#F9DCDF",
|
|
1002
|
-
error200: "#F3BEC3",
|
|
1003
|
-
error300: "#ED9CA2",
|
|
1004
|
-
error400: "#E77982",
|
|
1005
|
-
error500: "#E15662",
|
|
1006
|
-
error600: "#DB3644",
|
|
1007
|
-
error700: "#AD1F2B",
|
|
1008
|
-
error800: "#75151D",
|
|
1009
|
-
error900: "#380A0E",
|
|
1010
|
-
error950: "#1E0507",
|
|
1011
|
-
success50: "#E6F9EA",
|
|
1012
|
-
success100: "#CDF4D5",
|
|
1013
|
-
success200: "#9BE8AC",
|
|
1014
|
-
success300: "#6CD783",
|
|
1015
|
-
success400: "#5BCA72",
|
|
1016
|
-
success500: "#26A743",
|
|
1017
|
-
success600: "#1E8535",
|
|
1018
|
-
success700: "#176427",
|
|
1019
|
-
success800: "#0F421A",
|
|
1020
|
-
success900: "#08210D",
|
|
1021
|
-
success950: "#041107",
|
|
1022
|
-
warning50: "#FFF9E6",
|
|
1023
|
-
warning100: "#FFF3CD",
|
|
1024
|
-
warning200: "#FFE69C",
|
|
1025
|
-
warning300: "#FFDA6A",
|
|
1026
|
-
warning400: "#FFCD39",
|
|
1027
|
-
warning500: "#FFC107",
|
|
1028
|
-
warning600: "#CC9A06",
|
|
1029
|
-
warning700: "#997404",
|
|
1030
|
-
warning800: "#664D03",
|
|
1031
|
-
warning900: "#332701",
|
|
1032
|
-
warning950: "#191300",
|
|
1033
|
-
info50: "#E5F1FF",
|
|
1034
|
-
info100: "#CCE4FF",
|
|
1035
|
-
info200: "#9AC9FF",
|
|
1036
|
-
info300: "#66ADFF",
|
|
1037
|
-
info400: "#3392FF",
|
|
1038
|
-
info500: "#0278FE",
|
|
1039
|
-
info600: "#005FCD",
|
|
1040
|
-
info700: "#004799",
|
|
1041
|
-
info800: "#013066",
|
|
1042
|
-
info900: "#001834",
|
|
1043
|
-
info950: "#000C1A",
|
|
1044
|
-
shadow50: "#546B923D"
|
|
1045
|
-
};
|
|
1046
|
-
var fonts = {
|
|
1047
|
-
default: '"Work Sans", sans-serif'
|
|
1048
|
-
};
|
|
1049
|
-
var fontSizes = {
|
|
1050
|
-
2: "0.125rem",
|
|
1051
|
-
4: "0.25rem",
|
|
1052
|
-
6: "0.375rem",
|
|
1053
|
-
8: "0.5rem",
|
|
1054
|
-
10: "0.625rem",
|
|
1055
|
-
12: "0.75rem",
|
|
1056
|
-
13: "0.8125rem",
|
|
1057
|
-
14: "0.875rem",
|
|
1058
|
-
16: "1rem",
|
|
1059
|
-
18: "1.125rem",
|
|
1060
|
-
20: "1.25rem",
|
|
1061
|
-
22: "1.375rem",
|
|
1062
|
-
24: "1.5rem",
|
|
1063
|
-
32: "2rem",
|
|
1064
|
-
36: "2.25rem",
|
|
1065
|
-
40: "2.5rem",
|
|
1066
|
-
48: "3rem",
|
|
1067
|
-
56: "3.5rem",
|
|
1068
|
-
64: "4rem",
|
|
1069
|
-
72: "4.5rem",
|
|
1070
|
-
80: "5rem",
|
|
1071
|
-
xs: "0.375rem",
|
|
1072
|
-
sm: "0.5rem",
|
|
1073
|
-
md: "0.75rem",
|
|
1074
|
-
lg: "1rem",
|
|
1075
|
-
"2xl": "1.5rem",
|
|
1076
|
-
"3xl": "2rem",
|
|
1077
|
-
"4xl": "2.5rem",
|
|
1078
|
-
full: "62.4375rem",
|
|
1079
|
-
displayLarge: "3.5rem",
|
|
1080
|
-
displayMedium: "3rem",
|
|
1081
|
-
displaySmall: "2.25rem",
|
|
1082
|
-
headline1: "2.5rem",
|
|
1083
|
-
headline2: "2rem",
|
|
1084
|
-
headline3: "1.75rem",
|
|
1085
|
-
headline4: "1.375rem",
|
|
1086
|
-
headline5: "1.25rem",
|
|
1087
|
-
headline6: "1.125rem",
|
|
1088
|
-
headline7: "1rem",
|
|
1089
|
-
headline8: "0.875rem",
|
|
1090
|
-
bodyXL: "1.25rem",
|
|
1091
|
-
bodyL: "1.125rem",
|
|
1092
|
-
bodyM: "1rem",
|
|
1093
|
-
bodyS: "0.875rem",
|
|
1094
|
-
bodyXS: "0.8125rem",
|
|
1095
|
-
bodyXXS: "0.75rem",
|
|
1096
|
-
buttonLarge: "1.25rem",
|
|
1097
|
-
buttonMedium: "0.875rem",
|
|
1098
|
-
buttonSmall: "0.875rem",
|
|
1099
|
-
buttonExtraSmall: "0.75rem",
|
|
1100
|
-
badgeLarge: "1rem",
|
|
1101
|
-
badgeMedium: "0.875rem",
|
|
1102
|
-
badgeSmall: "0.75rem",
|
|
1103
|
-
badgeExtraSmall: "0.625rem",
|
|
1104
|
-
tooltip: "0.875rem",
|
|
1105
|
-
popoversRegular: "0.875rem",
|
|
1106
|
-
labelLarge: "1rem",
|
|
1107
|
-
labelMedium: "0.875rem",
|
|
1108
|
-
labelSmall: "0.8125rem",
|
|
1109
|
-
labelExtraSmall: "0.75rem",
|
|
1110
|
-
captionLarge: "0.8125rem",
|
|
1111
|
-
captionMedium: "0.75rem",
|
|
1112
|
-
captionSmall: "0.625rem"
|
|
1113
|
-
};
|
|
1114
|
-
var fontWeights = {
|
|
1115
|
-
regular: "400",
|
|
1116
|
-
medium: "500",
|
|
1117
|
-
semibold: "600",
|
|
1118
|
-
bold: "700"
|
|
1119
|
-
};
|
|
1120
|
-
var lineHeights = {
|
|
1121
|
-
smaller: "112.5%",
|
|
1122
|
-
// 4px
|
|
1123
|
-
shorter: "125%",
|
|
1124
|
-
// 8px
|
|
1125
|
-
short: "137.5%",
|
|
1126
|
-
// 12px
|
|
1127
|
-
base: "150%",
|
|
1128
|
-
// 16px
|
|
1129
|
-
tall: "175%",
|
|
1130
|
-
// 24px
|
|
1131
|
-
displayLarge: "4.5rem",
|
|
1132
|
-
displayMedium: "4rem",
|
|
1133
|
-
displaySmall: "3.25rem",
|
|
1134
|
-
headline1: "3.25rem",
|
|
1135
|
-
headline2: "2.75rem",
|
|
1136
|
-
headline3: "2.5rem",
|
|
1137
|
-
headline4: "1.75rem",
|
|
1138
|
-
headline5: "1.5rem",
|
|
1139
|
-
headline6: "1.375rem",
|
|
1140
|
-
headline7: "1.5rem",
|
|
1141
|
-
headline8: "1.25rem",
|
|
1142
|
-
bodyXL: "1.75rem",
|
|
1143
|
-
bodyL: "1.625rem",
|
|
1144
|
-
bodyM: "1.5rem",
|
|
1145
|
-
bodyS: "1.25rem",
|
|
1146
|
-
bodyXS: "1.125rem",
|
|
1147
|
-
bodyXXS: "1rem",
|
|
1148
|
-
buttonLarge: "1.25rem",
|
|
1149
|
-
buttonMedium: "1rem",
|
|
1150
|
-
buttonSmall: "0.875rem",
|
|
1151
|
-
buttonExtraSmall: "0.75rem",
|
|
1152
|
-
badgeLarge: "1rem",
|
|
1153
|
-
badgeMedium: "0.875rem",
|
|
1154
|
-
badgeSmall: "0.75rem",
|
|
1155
|
-
badgeExtraSmall: "0.625rem",
|
|
1156
|
-
tooltip: "1rem",
|
|
1157
|
-
popoversRegular: "1rem",
|
|
1158
|
-
labelLarge: "1.125rem",
|
|
1159
|
-
labelMedium: "1.125rem",
|
|
1160
|
-
labelSmall: "1rem",
|
|
1161
|
-
labelExtraSmall: "1rem",
|
|
1162
|
-
captionLarge: "1rem",
|
|
1163
|
-
captionMedium: "0.875rem",
|
|
1164
|
-
captionSmall: "0.75rem"
|
|
1165
|
-
};
|
|
1166
|
-
var radii = {
|
|
1167
|
-
"3xs": "2px",
|
|
1168
|
-
"2xs": "4px",
|
|
1169
|
-
"xs": "6px",
|
|
1170
|
-
"sm": "8px",
|
|
1171
|
-
"md": "10px",
|
|
1172
|
-
"lg": "12px",
|
|
1173
|
-
"xl": "14px",
|
|
1174
|
-
"2xl": "16px",
|
|
1175
|
-
"3xl": "18px",
|
|
1176
|
-
"4xl": "20px",
|
|
1177
|
-
"5xl": "22px",
|
|
1178
|
-
"6xl": "24px",
|
|
1179
|
-
"7xl": "32px",
|
|
1180
|
-
"8xl": "36px",
|
|
1181
|
-
"9xl": "40px",
|
|
1182
|
-
"10xl": "48px",
|
|
1183
|
-
"11xl": "56px",
|
|
1184
|
-
"12xl": "64px",
|
|
1185
|
-
"13xl": "72px",
|
|
1186
|
-
"14xl": "80px",
|
|
1187
|
-
full: "99999px"
|
|
1188
|
-
};
|
|
1189
|
-
var space = {
|
|
1190
|
-
2: "0.125rem",
|
|
1191
|
-
4: "0.25rem",
|
|
1192
|
-
6: "0.375rem",
|
|
1193
|
-
8: "0.5rem",
|
|
1194
|
-
10: "0.625rem",
|
|
1195
|
-
12: "0.75rem",
|
|
1196
|
-
13: "0.8125rem",
|
|
1197
|
-
14: "0.875rem",
|
|
1198
|
-
16: "1rem",
|
|
1199
|
-
18: "1.125rem",
|
|
1200
|
-
20: "1.25rem",
|
|
1201
|
-
22: "1.375rem",
|
|
1202
|
-
24: "1.5rem",
|
|
1203
|
-
32: "2rem",
|
|
1204
|
-
36: "2.25rem",
|
|
1205
|
-
40: "2.5rem",
|
|
1206
|
-
48: "3rem",
|
|
1207
|
-
56: "3.5rem",
|
|
1208
|
-
64: "4rem",
|
|
1209
|
-
72: "4.5rem",
|
|
1210
|
-
80: "5rem",
|
|
1211
|
-
full: "62.4375rem"
|
|
1212
|
-
};
|
|
1213
|
-
|
|
1214
|
-
// src/styles/index.ts
|
|
1215
|
-
import { createStitches, defaultThemeMap } from "@stitches/react";
|
|
1216
|
-
var {
|
|
1
|
+
import {
|
|
2
|
+
Flex,
|
|
3
|
+
FlexStyled,
|
|
4
|
+
Icon,
|
|
5
|
+
Icon_default,
|
|
6
|
+
Text,
|
|
7
|
+
TextStyle,
|
|
8
|
+
ToastItem,
|
|
9
|
+
ToastProvider,
|
|
10
|
+
UploadService,
|
|
11
|
+
__async,
|
|
12
|
+
__objRest,
|
|
13
|
+
__publicField,
|
|
14
|
+
__spreadProps,
|
|
15
|
+
__spreadValues,
|
|
16
|
+
colors,
|
|
1217
17
|
styled,
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
theme,
|
|
1223
|
-
createTheme,
|
|
1224
|
-
config
|
|
1225
|
-
} = createStitches({
|
|
1226
|
-
themeMap: __spreadProps(__spreadValues({}, defaultThemeMap), {
|
|
1227
|
-
height: "space",
|
|
1228
|
-
width: "space",
|
|
1229
|
-
gap: "space"
|
|
1230
|
-
}),
|
|
1231
|
-
theme: {
|
|
1232
|
-
colors,
|
|
1233
|
-
fontSizes,
|
|
1234
|
-
fonts,
|
|
1235
|
-
fontWeights,
|
|
1236
|
-
lineHeights,
|
|
1237
|
-
radii,
|
|
1238
|
-
space
|
|
1239
|
-
}
|
|
1240
|
-
});
|
|
1241
|
-
|
|
1242
|
-
// src/components/Text.tsx
|
|
1243
|
-
import { Text as TextRadix } from "@radix-ui/themes";
|
|
1244
|
-
|
|
1245
|
-
// src/types/typographyValues.ts
|
|
1246
|
-
var typographyValues = {
|
|
1247
|
-
displayLarge: {
|
|
1248
|
-
fontSize: "$displayLarge",
|
|
1249
|
-
lineHeight: "$displayLarge",
|
|
1250
|
-
letterSpacing: "$displayLarge"
|
|
1251
|
-
},
|
|
1252
|
-
displayMedium: {
|
|
1253
|
-
fontSize: "$displayMedium",
|
|
1254
|
-
lineHeight: "$displayMedium",
|
|
1255
|
-
letterSpacing: "$displayMedium"
|
|
1256
|
-
},
|
|
1257
|
-
displaySmall: {
|
|
1258
|
-
fontSize: "$displaySmall",
|
|
1259
|
-
lineHeight: "$displaySmall",
|
|
1260
|
-
letterSpacing: "$displaySmall"
|
|
1261
|
-
},
|
|
1262
|
-
headline1: {
|
|
1263
|
-
fontSize: "$headline1",
|
|
1264
|
-
lineHeight: "$headline1"
|
|
1265
|
-
},
|
|
1266
|
-
headline2: {
|
|
1267
|
-
fontSize: "$headline2",
|
|
1268
|
-
lineHeight: "$headline2"
|
|
1269
|
-
},
|
|
1270
|
-
headline3: {
|
|
1271
|
-
fontSize: "$headline3",
|
|
1272
|
-
lineHeight: "$headline3"
|
|
1273
|
-
},
|
|
1274
|
-
headline4: {
|
|
1275
|
-
fontSize: "$headline4",
|
|
1276
|
-
lineHeight: "$headline4"
|
|
1277
|
-
},
|
|
1278
|
-
headline5: {
|
|
1279
|
-
fontSize: "$headline5",
|
|
1280
|
-
lineHeight: "$headline5"
|
|
1281
|
-
},
|
|
1282
|
-
headline6: {
|
|
1283
|
-
fontSize: "$headline6",
|
|
1284
|
-
lineHeight: "$headline6"
|
|
1285
|
-
},
|
|
1286
|
-
headline7: {
|
|
1287
|
-
fontSize: "$headline7",
|
|
1288
|
-
lineHeight: "$headline7"
|
|
1289
|
-
},
|
|
1290
|
-
headline8: {
|
|
1291
|
-
fontSize: "$headline8",
|
|
1292
|
-
lineHeight: "$headline8"
|
|
1293
|
-
},
|
|
1294
|
-
bodyXL: {
|
|
1295
|
-
fontSize: "$bodyXL",
|
|
1296
|
-
lineHeight: "$bodyXL"
|
|
1297
|
-
},
|
|
1298
|
-
bodyL: {
|
|
1299
|
-
fontSize: "$bodyL",
|
|
1300
|
-
lineHeight: "$bodyL"
|
|
1301
|
-
},
|
|
1302
|
-
bodyM: {
|
|
1303
|
-
fontSize: "$bodyM",
|
|
1304
|
-
lineHeight: "$bodyM"
|
|
1305
|
-
},
|
|
1306
|
-
bodyS: {
|
|
1307
|
-
fontSize: "$bodyS",
|
|
1308
|
-
lineHeight: "$bodyS"
|
|
1309
|
-
},
|
|
1310
|
-
bodyXS: {
|
|
1311
|
-
fontSize: "$bodyXS",
|
|
1312
|
-
lineHeight: "$bodyXS"
|
|
1313
|
-
},
|
|
1314
|
-
bodyXXS: {
|
|
1315
|
-
fontSize: "$bodyXXS",
|
|
1316
|
-
lineHeight: "$bodyXXS"
|
|
1317
|
-
},
|
|
1318
|
-
badgeLarge: {
|
|
1319
|
-
fontSize: "$badgeLarge",
|
|
1320
|
-
lineHeight: "$badgeLarge"
|
|
1321
|
-
},
|
|
1322
|
-
badgeMedium: {
|
|
1323
|
-
fontSize: "$badgeMedium",
|
|
1324
|
-
lineHeight: "$badgeMedium"
|
|
1325
|
-
},
|
|
1326
|
-
badgeSmall: {
|
|
1327
|
-
fontSize: "$badgeSmall",
|
|
1328
|
-
lineHeight: "$badgeSmall"
|
|
1329
|
-
},
|
|
1330
|
-
badgeExtraSmall: {
|
|
1331
|
-
fontSize: "$badgeExtraSmall",
|
|
1332
|
-
lineHeight: "$badgeExtraSmall"
|
|
1333
|
-
},
|
|
1334
|
-
tooltip: {
|
|
1335
|
-
fontSize: "$tooltip",
|
|
1336
|
-
lineHeight: "$tooltip"
|
|
1337
|
-
},
|
|
1338
|
-
popoversRegular: {
|
|
1339
|
-
fontSize: "$popoversRegular",
|
|
1340
|
-
lineHeight: "$popoversRegular"
|
|
1341
|
-
},
|
|
1342
|
-
captionLarge: {
|
|
1343
|
-
fontSize: "$captionLarge",
|
|
1344
|
-
lineHeight: "$captionLarge"
|
|
1345
|
-
},
|
|
1346
|
-
captionMedium: {
|
|
1347
|
-
fontSize: "$captionMedium",
|
|
1348
|
-
lineHeight: "$captionMedium"
|
|
1349
|
-
},
|
|
1350
|
-
captionSmall: {
|
|
1351
|
-
fontSize: "$captionSmall",
|
|
1352
|
-
lineHeight: "$captionSmall"
|
|
1353
|
-
},
|
|
1354
|
-
buttonLarge: {
|
|
1355
|
-
fontSize: "$buttonLarge",
|
|
1356
|
-
lineHeight: "$buttonLarge"
|
|
1357
|
-
},
|
|
1358
|
-
buttonMedium: {
|
|
1359
|
-
fontSize: "$buttonMedium",
|
|
1360
|
-
lineHeight: "$buttonMedium"
|
|
1361
|
-
},
|
|
1362
|
-
buttonSmall: {
|
|
1363
|
-
fontSize: "$buttonSmall",
|
|
1364
|
-
lineHeight: "$buttonSmall"
|
|
1365
|
-
},
|
|
1366
|
-
buttonExtraSmall: {
|
|
1367
|
-
fontSize: "$buttonExtraSmall",
|
|
1368
|
-
lineHeight: "$buttonExtraSmall"
|
|
1369
|
-
},
|
|
1370
|
-
labelLarge: {
|
|
1371
|
-
fontSize: "$labelLarge",
|
|
1372
|
-
lineHeight: "$labelLarge"
|
|
1373
|
-
},
|
|
1374
|
-
labelMedium: {
|
|
1375
|
-
fontSize: "$labelMedium",
|
|
1376
|
-
lineHeight: "$labelMedium"
|
|
1377
|
-
},
|
|
1378
|
-
labelSmall: {
|
|
1379
|
-
fontSize: "$labelSmall",
|
|
1380
|
-
lineHeight: "$labelSmall"
|
|
1381
|
-
},
|
|
1382
|
-
labelExtraSmall: {
|
|
1383
|
-
fontSize: "$labelExtraSmall",
|
|
1384
|
-
lineHeight: "$labelExtraSmall"
|
|
1385
|
-
}
|
|
1386
|
-
};
|
|
1387
|
-
var typographyLabelValues = {
|
|
1388
|
-
labelLarge: {
|
|
1389
|
-
fontSize: "$labelLarge",
|
|
1390
|
-
lineHeight: "$labelLarge"
|
|
1391
|
-
},
|
|
1392
|
-
labelMedium: {
|
|
1393
|
-
fontSize: "$labelMedium",
|
|
1394
|
-
lineHeight: "$labelMedium"
|
|
1395
|
-
},
|
|
1396
|
-
labelSmall: {
|
|
1397
|
-
fontSize: "$labelSmall",
|
|
1398
|
-
lineHeight: "$labelSmall"
|
|
1399
|
-
},
|
|
1400
|
-
labelExtraSmall: {
|
|
1401
|
-
fontSize: "$labelExtraSmall",
|
|
1402
|
-
lineHeight: "$labelExtraSmall"
|
|
1403
|
-
}
|
|
1404
|
-
};
|
|
1405
|
-
|
|
1406
|
-
// src/components/Text.tsx
|
|
1407
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
1408
|
-
var TextStyle = styled(TextRadix, {
|
|
1409
|
-
fontFamily: "$default",
|
|
1410
|
-
lineHeight: "$base",
|
|
1411
|
-
variants: {
|
|
1412
|
-
typography: typographyValues,
|
|
1413
|
-
fontWeight: {
|
|
1414
|
-
regular: { fontWeight: "$regular" },
|
|
1415
|
-
medium: { fontWeight: "$medium" },
|
|
1416
|
-
semibold: { fontWeight: "$semibold" },
|
|
1417
|
-
bold: { fontWeight: "$bold" }
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
1420
|
-
});
|
|
1421
|
-
function Text(_a) {
|
|
1422
|
-
var _b = _a, { color } = _b, props = __objRest(_b, ["color"]);
|
|
1423
|
-
return /* @__PURE__ */ jsx2(
|
|
1424
|
-
TextStyle,
|
|
1425
|
-
__spreadProps(__spreadValues({}, props), {
|
|
1426
|
-
css: __spreadValues({
|
|
1427
|
-
color: color ? "$" + color : "$dark600"
|
|
1428
|
-
}, props.css)
|
|
1429
|
-
})
|
|
1430
|
-
);
|
|
1431
|
-
}
|
|
18
|
+
typographyLabelValues,
|
|
19
|
+
typographyValues,
|
|
20
|
+
useToast
|
|
21
|
+
} from "./chunk-TU7LKUXZ.mjs";
|
|
1432
22
|
|
|
1433
23
|
// src/components/Button/styledComponents.ts
|
|
1434
24
|
import { Button as ButtonRadix } from "@radix-ui/themes";
|
|
@@ -1717,16 +307,16 @@ var ButtonStyled = styled(ButtonRadix, {
|
|
|
1717
307
|
|
|
1718
308
|
// src/components/Button/index.tsx
|
|
1719
309
|
import { Button as ButtonRadix2 } from "@radix-ui/themes";
|
|
1720
|
-
import { jsx
|
|
310
|
+
import { jsx } from "react/jsx-runtime";
|
|
1721
311
|
function Button(_a) {
|
|
1722
312
|
var _b = _a, { asChild } = _b, props = __objRest(_b, ["asChild"]);
|
|
1723
313
|
const Component = asChild ? ButtonRadix2 : "button";
|
|
1724
|
-
return /* @__PURE__ */
|
|
314
|
+
return /* @__PURE__ */ jsx(ButtonStyled, __spreadValues({ as: Component }, props));
|
|
1725
315
|
}
|
|
1726
316
|
|
|
1727
317
|
// src/components/ButtonGroup.tsx
|
|
1728
|
-
import { Button as Button2, Flex } from "@radix-ui/themes";
|
|
1729
|
-
import { jsx as
|
|
318
|
+
import { Button as Button2, Flex as Flex2 } from "@radix-ui/themes";
|
|
319
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
1730
320
|
var ButtonItemStyled = styled(Button2, {
|
|
1731
321
|
fontFamily: "$default",
|
|
1732
322
|
letterSpacing: 0,
|
|
@@ -1740,7 +330,7 @@ var ButtonItemStyled = styled(Button2, {
|
|
|
1740
330
|
}
|
|
1741
331
|
}
|
|
1742
332
|
});
|
|
1743
|
-
var ButtonGroupStyled = styled(
|
|
333
|
+
var ButtonGroupStyled = styled(Flex2, {
|
|
1744
334
|
display: "flex",
|
|
1745
335
|
borderRadius: "$md",
|
|
1746
336
|
overflow: "hidden",
|
|
@@ -2192,16 +782,16 @@ var ButtonGroupStyled = styled(Flex, {
|
|
|
2192
782
|
});
|
|
2193
783
|
function ButtonItem(_a) {
|
|
2194
784
|
var _b = _a, { children, active } = _b, props = __objRest(_b, ["children", "active"]);
|
|
2195
|
-
return /* @__PURE__ */
|
|
785
|
+
return /* @__PURE__ */ jsx2(ButtonItemStyled, __spreadProps(__spreadValues({ className: active ? "active" : "" }, props), { children }));
|
|
2196
786
|
}
|
|
2197
787
|
function ButtonGroup(_a) {
|
|
2198
788
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
2199
|
-
return /* @__PURE__ */
|
|
789
|
+
return /* @__PURE__ */ jsx2(ButtonGroupStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
2200
790
|
}
|
|
2201
791
|
|
|
2202
792
|
// src/components/Avatar.tsx
|
|
2203
793
|
import { Avatar as AvatarRadix } from "@radix-ui/themes";
|
|
2204
|
-
import { jsx as
|
|
794
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
2205
795
|
var AvatarStyled = styled(AvatarRadix, {
|
|
2206
796
|
fontFamily: "$default",
|
|
2207
797
|
color: "$gray100",
|
|
@@ -2246,125 +836,14 @@ var AvatarStyled = styled(AvatarRadix, {
|
|
|
2246
836
|
});
|
|
2247
837
|
function Avatar(_a) {
|
|
2248
838
|
var _b = _a, { asChild } = _b, props = __objRest(_b, ["asChild"]);
|
|
2249
|
-
return /* @__PURE__ */
|
|
839
|
+
return /* @__PURE__ */ jsx3(AvatarStyled, __spreadValues({ as: AvatarRadix }, props));
|
|
2250
840
|
}
|
|
2251
841
|
|
|
2252
842
|
// src/components/TextField.tsx
|
|
2253
843
|
import React from "react";
|
|
2254
844
|
import { TextField as TextFieldRadix } from "@radix-ui/themes";
|
|
2255
|
-
|
|
2256
|
-
// src/components/Flex.tsx
|
|
2257
|
-
import { Flex as FlexRadix } from "@radix-ui/themes";
|
|
2258
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
2259
|
-
var FlexStyled = styled(FlexRadix, {
|
|
2260
|
-
variants: {
|
|
2261
|
-
display: {
|
|
2262
|
-
"flex": { display: "flex" },
|
|
2263
|
-
"inline-flex": { display: "inline-flex" }
|
|
2264
|
-
},
|
|
2265
|
-
align: {
|
|
2266
|
-
start: { alignItems: "flex-start" },
|
|
2267
|
-
center: { alignItems: "center" },
|
|
2268
|
-
end: { alignItems: "flex-end" },
|
|
2269
|
-
stretch: { alignItems: "stretch" },
|
|
2270
|
-
baseline: { alignItems: "baseline" }
|
|
2271
|
-
},
|
|
2272
|
-
justify: {
|
|
2273
|
-
start: { justifyContent: "flex-start" },
|
|
2274
|
-
center: { justifyContent: "center" },
|
|
2275
|
-
end: { justifyContent: "flex-end" },
|
|
2276
|
-
between: { justifyContent: "space-between" },
|
|
2277
|
-
around: { justifyContent: "space-around" },
|
|
2278
|
-
evenly: { justifyContent: "space-evenly" }
|
|
2279
|
-
},
|
|
2280
|
-
direction: {
|
|
2281
|
-
row: { flexDirection: "row" },
|
|
2282
|
-
column: { flexDirection: "column" },
|
|
2283
|
-
"row-reverse": { flexDirection: "row-reverse" },
|
|
2284
|
-
"column-reverse": { flexDirection: "column-reverse" }
|
|
2285
|
-
},
|
|
2286
|
-
gap: {
|
|
2287
|
-
0: { gap: "0px" },
|
|
2288
|
-
2: { gap: "$2" },
|
|
2289
|
-
4: { gap: "$4" },
|
|
2290
|
-
6: { gap: "$6" },
|
|
2291
|
-
8: { gap: "$8" },
|
|
2292
|
-
10: { gap: "$10" },
|
|
2293
|
-
12: { gap: "$12" },
|
|
2294
|
-
14: { gap: "$14" },
|
|
2295
|
-
16: { gap: "$16" },
|
|
2296
|
-
20: { gap: "$20" },
|
|
2297
|
-
22: { gap: "$22" },
|
|
2298
|
-
24: { gap: "$24" },
|
|
2299
|
-
32: { gap: "$32" },
|
|
2300
|
-
36: { gap: "$36" },
|
|
2301
|
-
40: { gap: "$40" },
|
|
2302
|
-
48: { gap: "$48" },
|
|
2303
|
-
56: { gap: "$56" },
|
|
2304
|
-
64: { gap: "$64" },
|
|
2305
|
-
72: { gap: "$72" },
|
|
2306
|
-
80: { gap: "$80" },
|
|
2307
|
-
full: { gap: "$full" }
|
|
2308
|
-
},
|
|
2309
|
-
gapY: {
|
|
2310
|
-
2: { gap: "$2" },
|
|
2311
|
-
4: { gap: "$4" },
|
|
2312
|
-
6: { gap: "$6" },
|
|
2313
|
-
8: { gap: "$8" },
|
|
2314
|
-
10: { gap: "$10" },
|
|
2315
|
-
12: { gap: "$12" },
|
|
2316
|
-
14: { gap: "$14" },
|
|
2317
|
-
16: { gap: "$16" },
|
|
2318
|
-
20: { gap: "$20" },
|
|
2319
|
-
22: { gap: "$22" },
|
|
2320
|
-
24: { gap: "$24" },
|
|
2321
|
-
32: { gap: "$32" },
|
|
2322
|
-
36: { gap: "$36" },
|
|
2323
|
-
40: { gap: "$40" },
|
|
2324
|
-
48: { gap: "$48" },
|
|
2325
|
-
56: { gap: "$56" },
|
|
2326
|
-
64: { gap: "$64" },
|
|
2327
|
-
72: { gap: "$72" },
|
|
2328
|
-
80: { gap: "$80" },
|
|
2329
|
-
full: { gap: "$full" }
|
|
2330
|
-
},
|
|
2331
|
-
gapX: {
|
|
2332
|
-
2: { gap: "$2" },
|
|
2333
|
-
4: { gap: "$4" },
|
|
2334
|
-
6: { gap: "$6" },
|
|
2335
|
-
8: { gap: "$8" },
|
|
2336
|
-
10: { gap: "$10" },
|
|
2337
|
-
12: { gap: "$12" },
|
|
2338
|
-
14: { gap: "$14" },
|
|
2339
|
-
16: { gap: "$16" },
|
|
2340
|
-
20: { gap: "$20" },
|
|
2341
|
-
22: { gap: "$22" },
|
|
2342
|
-
24: { gap: "$24" },
|
|
2343
|
-
32: { gap: "$32" },
|
|
2344
|
-
36: { gap: "$36" },
|
|
2345
|
-
40: { gap: "$40" },
|
|
2346
|
-
48: { gap: "$48" },
|
|
2347
|
-
56: { gap: "$56" },
|
|
2348
|
-
64: { gap: "$64" },
|
|
2349
|
-
72: { gap: "$72" },
|
|
2350
|
-
80: { gap: "$80" },
|
|
2351
|
-
full: { gap: "$full" }
|
|
2352
|
-
}
|
|
2353
|
-
},
|
|
2354
|
-
defaultVariants: {
|
|
2355
|
-
display: "flex",
|
|
2356
|
-
direction: "row",
|
|
2357
|
-
gap: 10
|
|
2358
|
-
}
|
|
2359
|
-
});
|
|
2360
|
-
function Flex2(_a) {
|
|
2361
|
-
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
2362
|
-
return /* @__PURE__ */ jsx6(FlexStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
2363
|
-
}
|
|
2364
|
-
|
|
2365
|
-
// src/components/TextField.tsx
|
|
2366
845
|
import { format, useMask, unformat } from "@react-input/mask";
|
|
2367
|
-
import { jsx as
|
|
846
|
+
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
2368
847
|
var TextFieldStyled = styled(TextFieldRadix.Root, {
|
|
2369
848
|
height: "$40",
|
|
2370
849
|
fontFamily: "$default",
|
|
@@ -2596,9 +1075,9 @@ var TextField = React.forwardRef(
|
|
|
2596
1075
|
updateCharCountBadge();
|
|
2597
1076
|
(_a2 = props.onInput) == null ? void 0 : _a2.call(props, e);
|
|
2598
1077
|
};
|
|
2599
|
-
return /* @__PURE__ */ jsxs(
|
|
2600
|
-
/* @__PURE__ */ jsxs(
|
|
2601
|
-
!!addon && /* @__PURE__ */
|
|
1078
|
+
return /* @__PURE__ */ jsxs(Flex, { direction: "column", css: { width: "100%", position: "relative" }, children: [
|
|
1079
|
+
/* @__PURE__ */ jsxs(Flex, { gap: "0", css: { width: "100%" }, children: [
|
|
1080
|
+
!!addon && /* @__PURE__ */ jsx4(
|
|
2602
1081
|
InputAddon,
|
|
2603
1082
|
{
|
|
2604
1083
|
color: hasError ? "error" : color,
|
|
@@ -2633,7 +1112,7 @@ var TextField = React.forwardRef(
|
|
|
2633
1112
|
} : void 0,
|
|
2634
1113
|
children: [
|
|
2635
1114
|
children,
|
|
2636
|
-
isValid2 && /* @__PURE__ */
|
|
1115
|
+
isValid2 && /* @__PURE__ */ jsx4(
|
|
2637
1116
|
TextFieldSlot,
|
|
2638
1117
|
{
|
|
2639
1118
|
position: "flex-end",
|
|
@@ -2642,14 +1121,14 @@ var TextField = React.forwardRef(
|
|
|
2642
1121
|
typography,
|
|
2643
1122
|
fontWeight,
|
|
2644
1123
|
textAlign,
|
|
2645
|
-
children: /* @__PURE__ */
|
|
1124
|
+
children: /* @__PURE__ */ jsx4(Icon_default, { name: "check" })
|
|
2646
1125
|
}
|
|
2647
1126
|
)
|
|
2648
1127
|
]
|
|
2649
1128
|
})
|
|
2650
1129
|
)
|
|
2651
1130
|
] }),
|
|
2652
|
-
maxLength && /* @__PURE__ */
|
|
1131
|
+
maxLength && /* @__PURE__ */ jsx4(TextFieldLimitIndicator, { children: /* @__PURE__ */ jsx4("span", { ref: badgeRef, children: maxLength }) })
|
|
2653
1132
|
] });
|
|
2654
1133
|
}
|
|
2655
1134
|
);
|
|
@@ -2676,7 +1155,7 @@ function TextFieldSlot(_a) {
|
|
|
2676
1155
|
}, props), {
|
|
2677
1156
|
color: void 0
|
|
2678
1157
|
});
|
|
2679
|
-
return /* @__PURE__ */
|
|
1158
|
+
return /* @__PURE__ */ jsx4(
|
|
2680
1159
|
TextFieldSlotStyled,
|
|
2681
1160
|
__spreadProps(__spreadValues({}, sharedStyles), {
|
|
2682
1161
|
style: {
|
|
@@ -2694,7 +1173,7 @@ function TextFieldSlot(_a) {
|
|
|
2694
1173
|
|
|
2695
1174
|
// src/components/RadioGroup.tsx
|
|
2696
1175
|
import { RadioGroup as RadioGroupRadix } from "@radix-ui/themes";
|
|
2697
|
-
import { jsx as
|
|
1176
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
2698
1177
|
var RadioGroupStyled = styled(RadioGroupRadix.Root, {
|
|
2699
1178
|
fontFamily: "$default",
|
|
2700
1179
|
"label": {
|
|
@@ -2864,7 +1343,7 @@ function RadioGroup(_a) {
|
|
|
2864
1343
|
"children",
|
|
2865
1344
|
"disabled"
|
|
2866
1345
|
]);
|
|
2867
|
-
return /* @__PURE__ */
|
|
1346
|
+
return /* @__PURE__ */ jsx5(
|
|
2868
1347
|
RadioGroupStyled,
|
|
2869
1348
|
__spreadProps(__spreadValues({
|
|
2870
1349
|
disabled
|
|
@@ -2879,12 +1358,12 @@ function RadioItem(_a) {
|
|
|
2879
1358
|
} = _b, props = __objRest(_b, [
|
|
2880
1359
|
"children"
|
|
2881
1360
|
]);
|
|
2882
|
-
return /* @__PURE__ */
|
|
1361
|
+
return /* @__PURE__ */ jsx5(RadioGroupRadix.Item, __spreadProps(__spreadValues({}, props), { children }));
|
|
2883
1362
|
}
|
|
2884
1363
|
|
|
2885
1364
|
// src/components/CheckboxGroup.tsx
|
|
2886
1365
|
import { CheckboxGroup as CheckboxGroupRadix } from "@radix-ui/themes";
|
|
2887
|
-
import { jsx as
|
|
1366
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
2888
1367
|
var CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
|
|
2889
1368
|
fontFamily: "$default",
|
|
2890
1369
|
svg: {
|
|
@@ -3029,16 +1508,16 @@ var CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
|
|
|
3029
1508
|
var StyledItem = styled(CheckboxGroupRadix.Item, {});
|
|
3030
1509
|
function CheckboxGroup(_a) {
|
|
3031
1510
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
3032
|
-
return /* @__PURE__ */
|
|
1511
|
+
return /* @__PURE__ */ jsx6(CheckboxGroupStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
3033
1512
|
}
|
|
3034
1513
|
function CheckboxItem(_a) {
|
|
3035
1514
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
3036
|
-
return /* @__PURE__ */
|
|
1515
|
+
return /* @__PURE__ */ jsx6(StyledItem, __spreadProps(__spreadValues({}, props), { children }));
|
|
3037
1516
|
}
|
|
3038
1517
|
|
|
3039
1518
|
// src/components/Filter.tsx
|
|
3040
1519
|
import { Theme, DropdownMenu } from "@radix-ui/themes";
|
|
3041
|
-
import { jsx as
|
|
1520
|
+
import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
3042
1521
|
var FilterContentStyled = styled(DropdownMenu.Content, {
|
|
3043
1522
|
background: "white",
|
|
3044
1523
|
padding: "$8 $12",
|
|
@@ -3148,13 +1627,13 @@ function Filter(_a) {
|
|
|
3148
1627
|
"typography",
|
|
3149
1628
|
"fontWeight"
|
|
3150
1629
|
]);
|
|
3151
|
-
return /* @__PURE__ */
|
|
3152
|
-
/* @__PURE__ */
|
|
3153
|
-
/* @__PURE__ */
|
|
3154
|
-
/* @__PURE__ */
|
|
3155
|
-
/* @__PURE__ */
|
|
1630
|
+
return /* @__PURE__ */ jsx7(Theme, { children: /* @__PURE__ */ jsx7(DropdownMenu.Root, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsxs2(FilterStyled, { typography, fontWeight, children: [
|
|
1631
|
+
/* @__PURE__ */ jsx7(DropdownMenu.Trigger, { children: /* @__PURE__ */ jsxs2("button", { "aria-label": placeholder || "Fitrar", children: [
|
|
1632
|
+
/* @__PURE__ */ jsx7(Icon, { name: "filter" }),
|
|
1633
|
+
/* @__PURE__ */ jsx7("span", { children: placeholder || "Fitrar" }),
|
|
1634
|
+
/* @__PURE__ */ jsx7(DropdownMenu.TriggerIcon, {})
|
|
3156
1635
|
] }) }),
|
|
3157
|
-
/* @__PURE__ */
|
|
1636
|
+
/* @__PURE__ */ jsx7(
|
|
3158
1637
|
FilterContentStyled,
|
|
3159
1638
|
{
|
|
3160
1639
|
avoidCollisions: false,
|
|
@@ -3162,7 +1641,7 @@ function Filter(_a) {
|
|
|
3162
1641
|
alignOffset: -14,
|
|
3163
1642
|
typography,
|
|
3164
1643
|
fontWeight,
|
|
3165
|
-
children: /* @__PURE__ */
|
|
1644
|
+
children: /* @__PURE__ */ jsx7(CheckboxGroup, { children })
|
|
3166
1645
|
}
|
|
3167
1646
|
)
|
|
3168
1647
|
] }) })) });
|
|
@@ -3173,7 +1652,7 @@ function FilterItem(_a) {
|
|
|
3173
1652
|
} = _b, props = __objRest(_b, [
|
|
3174
1653
|
"children"
|
|
3175
1654
|
]);
|
|
3176
|
-
return /* @__PURE__ */
|
|
1655
|
+
return /* @__PURE__ */ jsx7(CheckboxItem, __spreadProps(__spreadValues({}, props), { style: { padding: "8px 12px" }, children }));
|
|
3177
1656
|
}
|
|
3178
1657
|
|
|
3179
1658
|
// src/components/Dropdown.tsx
|
|
@@ -3183,8 +1662,8 @@ import React2, {
|
|
|
3183
1662
|
useEffect
|
|
3184
1663
|
} from "react";
|
|
3185
1664
|
import { faChevronDown, faChevronUp } from "@fortawesome/free-solid-svg-icons";
|
|
3186
|
-
import { FontAwesomeIcon
|
|
3187
|
-
import { jsx as
|
|
1665
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
1666
|
+
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
3188
1667
|
var DropdownMenuItemStyled = styled("div", {
|
|
3189
1668
|
fontFamily: "$default",
|
|
3190
1669
|
color: "$dark600",
|
|
@@ -3373,9 +1852,9 @@ function DropdownMenu2(_a) {
|
|
|
3373
1852
|
}
|
|
3374
1853
|
},
|
|
3375
1854
|
children: [
|
|
3376
|
-
/* @__PURE__ */
|
|
3377
|
-
/* @__PURE__ */
|
|
3378
|
-
|
|
1855
|
+
/* @__PURE__ */ jsx8("span", { children: placeholder || "Filtrar" }),
|
|
1856
|
+
/* @__PURE__ */ jsx8(
|
|
1857
|
+
FontAwesomeIcon,
|
|
3379
1858
|
{
|
|
3380
1859
|
icon: isOpen ? faChevronUp : faChevronDown,
|
|
3381
1860
|
size: "sm",
|
|
@@ -3385,7 +1864,7 @@ function DropdownMenu2(_a) {
|
|
|
3385
1864
|
]
|
|
3386
1865
|
}
|
|
3387
1866
|
),
|
|
3388
|
-
isOpen && /* @__PURE__ */
|
|
1867
|
+
isOpen && /* @__PURE__ */ jsx8(DropdownMenuContentStyled, { role: "listbox", children: /* @__PURE__ */ jsx8(DropdownMenuProvider, { onItemSelect: handleClose, children }) })
|
|
3389
1868
|
]
|
|
3390
1869
|
})
|
|
3391
1870
|
);
|
|
@@ -3395,7 +1874,7 @@ function DropdownMenuProvider({
|
|
|
3395
1874
|
children,
|
|
3396
1875
|
onItemSelect
|
|
3397
1876
|
}) {
|
|
3398
|
-
return /* @__PURE__ */
|
|
1877
|
+
return /* @__PURE__ */ jsx8(DropdownMenuContext.Provider, { value: { onItemSelect }, children });
|
|
3399
1878
|
}
|
|
3400
1879
|
function DropdownMenuItem(_a) {
|
|
3401
1880
|
var _b = _a, {
|
|
@@ -3426,7 +1905,7 @@ function DropdownMenuItem(_a) {
|
|
|
3426
1905
|
context == null ? void 0 : context.onItemSelect();
|
|
3427
1906
|
}
|
|
3428
1907
|
};
|
|
3429
|
-
return /* @__PURE__ */
|
|
1908
|
+
return /* @__PURE__ */ jsx8(
|
|
3430
1909
|
DropdownMenuItemStyled,
|
|
3431
1910
|
__spreadProps(__spreadValues({
|
|
3432
1911
|
typography,
|
|
@@ -3444,7 +1923,7 @@ function DropdownMenuItem(_a) {
|
|
|
3444
1923
|
// src/components/Badge.tsx
|
|
3445
1924
|
import React3 from "react";
|
|
3446
1925
|
import { Badge as BadgeRadix } from "@radix-ui/themes";
|
|
3447
|
-
import { jsx as
|
|
1926
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
3448
1927
|
var BadgeStyled = styled(BadgeRadix, {
|
|
3449
1928
|
fontFamily: "$default",
|
|
3450
1929
|
borderRadius: "$sm",
|
|
@@ -3546,7 +2025,7 @@ var BadgeStyled = styled(BadgeRadix, {
|
|
|
3546
2025
|
});
|
|
3547
2026
|
function Badge(_a) {
|
|
3548
2027
|
var _b = _a, { asChild, children } = _b, props = __objRest(_b, ["asChild", "children"]);
|
|
3549
|
-
return /* @__PURE__ */
|
|
2028
|
+
return /* @__PURE__ */ jsx9(BadgeStyled, __spreadProps(__spreadValues({}, props), { children: React3.Children.map(children, (child) => {
|
|
3550
2029
|
if (React3.isValidElement(child)) {
|
|
3551
2030
|
return React3.cloneElement(child, { size: props.size });
|
|
3552
2031
|
}
|
|
@@ -3562,7 +2041,7 @@ import { Box as BoxRadix } from "@radix-ui/themes";
|
|
|
3562
2041
|
var Box = BoxRadix;
|
|
3563
2042
|
|
|
3564
2043
|
// src/components/Modal.tsx
|
|
3565
|
-
import { jsx as
|
|
2044
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
3566
2045
|
var ModalContentStyled = styled(ModalRadix.Content, {
|
|
3567
2046
|
fontFamily: "$default",
|
|
3568
2047
|
lineHeight: "$base",
|
|
@@ -3611,13 +2090,13 @@ var ModalTitleStyled = styled(ModalRadix.Title, {
|
|
|
3611
2090
|
function Modal(_a) {
|
|
3612
2091
|
var _b = _a, { children, title, trigger } = _b, props = __objRest(_b, ["children", "title", "trigger"]);
|
|
3613
2092
|
return /* @__PURE__ */ jsxs4(ModalRadix.Root, __spreadProps(__spreadValues({}, props), { children: [
|
|
3614
|
-
trigger && /* @__PURE__ */
|
|
3615
|
-
/* @__PURE__ */
|
|
2093
|
+
trigger && /* @__PURE__ */ jsx10(ModalRadix.Trigger, { asChild: true, children: trigger }),
|
|
2094
|
+
/* @__PURE__ */ jsx10(ModalRadix.Portal, { children: /* @__PURE__ */ jsx10(ModalOverlay, { children: /* @__PURE__ */ jsxs4(ModalContentStyled, { children: [
|
|
3616
2095
|
title && /* @__PURE__ */ jsxs4(ModalHeaderStyled, { children: [
|
|
3617
|
-
/* @__PURE__ */
|
|
3618
|
-
/* @__PURE__ */
|
|
2096
|
+
/* @__PURE__ */ jsx10(ModalTitleStyled, { asChild: true, children: /* @__PURE__ */ jsx10(Text, { typography: "headline6", fontWeight: "medium", children: title }) }),
|
|
2097
|
+
/* @__PURE__ */ jsx10(ModalRadix.Close, { asChild: true, children: /* @__PURE__ */ jsx10(ModalIconClose, { name: "close", size: "xl" }) })
|
|
3619
2098
|
] }),
|
|
3620
|
-
/* @__PURE__ */
|
|
2099
|
+
/* @__PURE__ */ jsx10(Box, { children })
|
|
3621
2100
|
] }) }) })
|
|
3622
2101
|
] }));
|
|
3623
2102
|
}
|
|
@@ -3690,7 +2169,7 @@ function useOnClickOutside(ref, handler) {
|
|
|
3690
2169
|
}
|
|
3691
2170
|
|
|
3692
2171
|
// src/components/MenuDropdown/index.tsx
|
|
3693
|
-
import { jsx as
|
|
2172
|
+
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3694
2173
|
function MenuDropdown({
|
|
3695
2174
|
children,
|
|
3696
2175
|
isOpen,
|
|
@@ -3701,8 +2180,8 @@ function MenuDropdown({
|
|
|
3701
2180
|
setIsOpen(false);
|
|
3702
2181
|
});
|
|
3703
2182
|
return /* @__PURE__ */ jsxs5(MenuDropdownContainerStyled, { children: [
|
|
3704
|
-
/* @__PURE__ */
|
|
3705
|
-
isOpen && /* @__PURE__ */
|
|
2183
|
+
/* @__PURE__ */ jsx11(TriggerButtonStyled, { onClick: () => setIsOpen(!isOpen), children: /* @__PURE__ */ jsx11(Icon_default, { name: "ellipsis", size: "xl", color: "#FFFFFF" }) }),
|
|
2184
|
+
isOpen && /* @__PURE__ */ jsx11(MenuItemsContainerStyled, { ref: dropdownItemsContainerRef, children })
|
|
3706
2185
|
] });
|
|
3707
2186
|
}
|
|
3708
2187
|
|
|
@@ -7841,7 +6320,7 @@ var DayPickerWrapperStyled = styled("div", {
|
|
|
7841
6320
|
});
|
|
7842
6321
|
|
|
7843
6322
|
// src/components/Calendar/index.tsx
|
|
7844
|
-
import { jsx as
|
|
6323
|
+
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
7845
6324
|
function formatToDateMask(value) {
|
|
7846
6325
|
const numeric = value.replace(/\D/g, "").slice(0, 8);
|
|
7847
6326
|
const parts = numeric.match(/^(\d{0,2})(\d{0,2})(\d{0,4})$/);
|
|
@@ -7900,14 +6379,14 @@ function Calendar(_a) {
|
|
|
7900
6379
|
console.warn("Data inv\xE1lida inserida no input:", masked);
|
|
7901
6380
|
}
|
|
7902
6381
|
};
|
|
7903
|
-
return /* @__PURE__ */
|
|
7904
|
-
/* @__PURE__ */
|
|
6382
|
+
return /* @__PURE__ */ jsx12("div", { children: /* @__PURE__ */ jsxs6(CalendarStyled, __spreadProps(__spreadValues({}, props), { expand, ref: dropdownRef, children: [
|
|
6383
|
+
/* @__PURE__ */ jsx12(
|
|
7905
6384
|
CalendarButtonStyled,
|
|
7906
6385
|
{
|
|
7907
6386
|
expand,
|
|
7908
6387
|
type: "button",
|
|
7909
6388
|
onClick: () => setShowCalendar((prev) => !prev),
|
|
7910
|
-
children: /* @__PURE__ */
|
|
6389
|
+
children: /* @__PURE__ */ jsx12(
|
|
7911
6390
|
TextField,
|
|
7912
6391
|
{
|
|
7913
6392
|
placeholder: "00/00/0000",
|
|
@@ -7917,13 +6396,13 @@ function Calendar(_a) {
|
|
|
7917
6396
|
inputMode: "numeric",
|
|
7918
6397
|
textAlign: "right",
|
|
7919
6398
|
color: hasError ? "error" : "default",
|
|
7920
|
-
children: /* @__PURE__ */
|
|
6399
|
+
children: /* @__PURE__ */ jsx12(TextFieldSlot, { children: /* @__PURE__ */ jsx12(Icon_default, { name: "calendar", size: "xl" }) })
|
|
7921
6400
|
}
|
|
7922
6401
|
)
|
|
7923
6402
|
}
|
|
7924
6403
|
),
|
|
7925
6404
|
showContainer && /* @__PURE__ */ jsxs6(CalendarContentStyled, { position, children: [
|
|
7926
|
-
/* @__PURE__ */
|
|
6405
|
+
/* @__PURE__ */ jsx12(Box, { children: /* @__PURE__ */ jsx12(DayPickerWrapperStyled, { children: /* @__PURE__ */ jsx12(
|
|
7927
6406
|
DayPicker,
|
|
7928
6407
|
{
|
|
7929
6408
|
mode: "single",
|
|
@@ -7937,7 +6416,7 @@ function Calendar(_a) {
|
|
|
7937
6416
|
endMonth: maxDate
|
|
7938
6417
|
}
|
|
7939
6418
|
) }) }),
|
|
7940
|
-
action && /* @__PURE__ */
|
|
6419
|
+
action && /* @__PURE__ */ jsx12(CalendarFooterStyled, { children: /* @__PURE__ */ jsx12(
|
|
7941
6420
|
Button,
|
|
7942
6421
|
{
|
|
7943
6422
|
variant: "text",
|
|
@@ -8003,7 +6482,7 @@ var DrawerHeaderCloseButton = styled("button", {
|
|
|
8003
6482
|
});
|
|
8004
6483
|
|
|
8005
6484
|
// src/components/Drawer/index.tsx
|
|
8006
|
-
import { jsx as
|
|
6485
|
+
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
8007
6486
|
function Drawer({
|
|
8008
6487
|
isOpen,
|
|
8009
6488
|
onClose,
|
|
@@ -8054,7 +6533,7 @@ function Drawer({
|
|
|
8054
6533
|
onClose();
|
|
8055
6534
|
}
|
|
8056
6535
|
});
|
|
8057
|
-
return /* @__PURE__ */
|
|
6536
|
+
return /* @__PURE__ */ jsx13(DrawerOverlayStyled, { children: /* @__PURE__ */ jsxs7(
|
|
8058
6537
|
DrawerContainerStyled,
|
|
8059
6538
|
{
|
|
8060
6539
|
ref: drawerContainerRef,
|
|
@@ -8064,8 +6543,8 @@ function Drawer({
|
|
|
8064
6543
|
},
|
|
8065
6544
|
children: [
|
|
8066
6545
|
/* @__PURE__ */ jsxs7(DrawerHeaderDiv, { children: [
|
|
8067
|
-
/* @__PURE__ */
|
|
8068
|
-
/* @__PURE__ */
|
|
6546
|
+
/* @__PURE__ */ jsx13(DrawerHeaderTitle, { children: title }),
|
|
6547
|
+
/* @__PURE__ */ jsx13(DrawerHeaderCloseButton, { onClick: onClose, children: /* @__PURE__ */ jsx13(Icon_default, { size: "xl", color: "$dark600", name: "xmark" }) })
|
|
8069
6548
|
] }),
|
|
8070
6549
|
children
|
|
8071
6550
|
]
|
|
@@ -8075,7 +6554,7 @@ function Drawer({
|
|
|
8075
6554
|
|
|
8076
6555
|
// src/components/TimePicker.tsx
|
|
8077
6556
|
import { useCallback, useRef as useRef5, useState as useState3 } from "react";
|
|
8078
|
-
import { jsx as
|
|
6557
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
8079
6558
|
var TimePickerStyled = styled("div", {
|
|
8080
6559
|
position: "relative",
|
|
8081
6560
|
fontFamily: "$default",
|
|
@@ -8229,13 +6708,13 @@ function TimePicker({
|
|
|
8229
6708
|
[hours, minutes]
|
|
8230
6709
|
);
|
|
8231
6710
|
return /* @__PURE__ */ jsxs8(TimePickerStyled, { ref: dropdownRef, expand, children: [
|
|
8232
|
-
/* @__PURE__ */
|
|
6711
|
+
/* @__PURE__ */ jsx14(
|
|
8233
6712
|
TimePickerButtonStyled,
|
|
8234
6713
|
{
|
|
8235
6714
|
type: "button",
|
|
8236
6715
|
onClick: () => setIsOpen((prev) => !prev),
|
|
8237
6716
|
expand,
|
|
8238
|
-
children: /* @__PURE__ */
|
|
6717
|
+
children: /* @__PURE__ */ jsx14(
|
|
8239
6718
|
TextField,
|
|
8240
6719
|
{
|
|
8241
6720
|
value: selected,
|
|
@@ -8245,7 +6724,7 @@ function TimePicker({
|
|
|
8245
6724
|
typography: "labelSmall",
|
|
8246
6725
|
fontWeight: "regular",
|
|
8247
6726
|
color: hasError ? "error" : "default",
|
|
8248
|
-
children: /* @__PURE__ */
|
|
6727
|
+
children: /* @__PURE__ */ jsx14(TextFieldSlot, { children: /* @__PURE__ */ jsx14(Icon_default, { name: "clock", size: "xl" }) })
|
|
8249
6728
|
}
|
|
8250
6729
|
)
|
|
8251
6730
|
}
|
|
@@ -8265,7 +6744,7 @@ function TimePicker({
|
|
|
8265
6744
|
flexDirection: "column"
|
|
8266
6745
|
},
|
|
8267
6746
|
children: [
|
|
8268
|
-
/* @__PURE__ */
|
|
6747
|
+
/* @__PURE__ */ jsx14(
|
|
8269
6748
|
Button,
|
|
8270
6749
|
{
|
|
8271
6750
|
type: "button",
|
|
@@ -8280,14 +6759,14 @@ function TimePicker({
|
|
|
8280
6759
|
viewBox: "0 0 32 32",
|
|
8281
6760
|
fill: "none",
|
|
8282
6761
|
children: [
|
|
8283
|
-
/* @__PURE__ */
|
|
6762
|
+
/* @__PURE__ */ jsx14(
|
|
8284
6763
|
"path",
|
|
8285
6764
|
{
|
|
8286
6765
|
d: "M0 8C0 3.58172 3.58172 0 8 0H24C28.4183 0 32 3.58172 32 8V24C32 28.4183 28.4183 32 24 32H8C3.58172 32 0 28.4183 0 24V8Z",
|
|
8287
6766
|
fill: "white"
|
|
8288
6767
|
}
|
|
8289
6768
|
),
|
|
8290
|
-
/* @__PURE__ */
|
|
6769
|
+
/* @__PURE__ */ jsx14(
|
|
8291
6770
|
"path",
|
|
8292
6771
|
{
|
|
8293
6772
|
d: "M16.7063 12.2937C16.3157 11.9031 15.6813 11.9031 15.2907 12.2937L10.2907 17.2937C9.9001 17.6843 9.9001 18.3187 10.2907 18.7093C10.6813 19.1 11.3157 19.1 11.7063 18.7093L16.0001 14.4156L20.2938 18.7062C20.6845 19.0968 21.3188 19.0968 21.7095 18.7062C22.1001 18.3156 22.1001 17.6812 21.7095 17.2906L16.7095 12.2906L16.7063 12.2937Z",
|
|
@@ -8299,7 +6778,7 @@ function TimePicker({
|
|
|
8299
6778
|
)
|
|
8300
6779
|
}
|
|
8301
6780
|
),
|
|
8302
|
-
/* @__PURE__ */
|
|
6781
|
+
/* @__PURE__ */ jsx14(
|
|
8303
6782
|
InputStyled,
|
|
8304
6783
|
{
|
|
8305
6784
|
inputMode: "numeric",
|
|
@@ -8337,7 +6816,7 @@ function TimePicker({
|
|
|
8337
6816
|
}
|
|
8338
6817
|
}
|
|
8339
6818
|
),
|
|
8340
|
-
/* @__PURE__ */
|
|
6819
|
+
/* @__PURE__ */ jsx14(
|
|
8341
6820
|
Button,
|
|
8342
6821
|
{
|
|
8343
6822
|
type: "button",
|
|
@@ -8352,14 +6831,14 @@ function TimePicker({
|
|
|
8352
6831
|
viewBox: "0 0 32 32",
|
|
8353
6832
|
fill: "none",
|
|
8354
6833
|
children: [
|
|
8355
|
-
/* @__PURE__ */
|
|
6834
|
+
/* @__PURE__ */ jsx14(
|
|
8356
6835
|
"path",
|
|
8357
6836
|
{
|
|
8358
6837
|
d: "M0 8C0 3.58172 3.58172 0 8 0H24C28.4183 0 32 3.58172 32 8V24C32 28.4183 28.4183 32 24 32H8C3.58172 32 0 28.4183 0 24V8Z",
|
|
8359
6838
|
fill: "white"
|
|
8360
6839
|
}
|
|
8361
6840
|
),
|
|
8362
|
-
/* @__PURE__ */
|
|
6841
|
+
/* @__PURE__ */ jsx14(
|
|
8363
6842
|
"path",
|
|
8364
6843
|
{
|
|
8365
6844
|
d: "M15.2937 19.7063C15.6843 20.0969 16.3187 20.0969 16.7093 19.7063L21.7093 14.7063C22.0999 14.3157 22.0999 13.6813 21.7093 13.2907C21.3187 12.9 20.6843 12.9 20.2937 13.2907L15.9999 17.5844L11.7062 13.2938C11.3155 12.9032 10.6812 12.9032 10.2905 13.2938C9.8999 13.6844 9.8999 14.3188 10.2905 14.7094L15.2905 19.7094L15.2937 19.7063Z",
|
|
@@ -8375,9 +6854,9 @@ function TimePicker({
|
|
|
8375
6854
|
},
|
|
8376
6855
|
unit
|
|
8377
6856
|
)),
|
|
8378
|
-
/* @__PURE__ */
|
|
6857
|
+
/* @__PURE__ */ jsx14(Text, { children: ":" })
|
|
8379
6858
|
] }),
|
|
8380
|
-
/* @__PURE__ */
|
|
6859
|
+
/* @__PURE__ */ jsx14(TimePickerFooterStyled, { children: /* @__PURE__ */ jsx14(
|
|
8381
6860
|
Button,
|
|
8382
6861
|
{
|
|
8383
6862
|
type: "button",
|
|
@@ -8400,7 +6879,7 @@ function TimePicker({
|
|
|
8400
6879
|
|
|
8401
6880
|
// src/components/Alert.tsx
|
|
8402
6881
|
import { Theme as Theme2, AlertDialog } from "@radix-ui/themes";
|
|
8403
|
-
import { Fragment, jsx as
|
|
6882
|
+
import { Fragment, jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
8404
6883
|
var AlertDialogSimpleStyled = styled(AlertDialog.Content, {
|
|
8405
6884
|
fontFamily: "$default",
|
|
8406
6885
|
lineHeight: "$base",
|
|
@@ -8515,15 +6994,15 @@ function Alert(_a) {
|
|
|
8515
6994
|
"simpleAlert"
|
|
8516
6995
|
]);
|
|
8517
6996
|
return /* @__PURE__ */ jsxs9(Fragment, { children: [
|
|
8518
|
-
simpleAlert && /* @__PURE__ */
|
|
8519
|
-
/* @__PURE__ */
|
|
8520
|
-
/* @__PURE__ */
|
|
8521
|
-
/* @__PURE__ */
|
|
8522
|
-
simpleAlert.cancel && /* @__PURE__ */
|
|
6997
|
+
simpleAlert && /* @__PURE__ */ jsx15(Theme2, { children: /* @__PURE__ */ jsxs9(AlertDialog.Root, { children: [
|
|
6998
|
+
/* @__PURE__ */ jsx15(AlertDialog.Trigger, { children: trigger }),
|
|
6999
|
+
/* @__PURE__ */ jsx15(Fragment, { children: /* @__PURE__ */ jsxs9(AlertDialogSimpleStyled, __spreadProps(__spreadValues({}, props), { children: [
|
|
7000
|
+
/* @__PURE__ */ jsx15(AlertDialogDescriptionStyled, { children: simpleAlert.description }),
|
|
7001
|
+
simpleAlert.cancel && /* @__PURE__ */ jsx15(AlertDialog.Cancel, { children: /* @__PURE__ */ jsx15(Button, { variant: "text", children: /* @__PURE__ */ jsx15(Icon_default, { name: "close" }) }) })
|
|
8523
7002
|
] })) })
|
|
8524
7003
|
] }) }),
|
|
8525
|
-
completAlert && /* @__PURE__ */
|
|
8526
|
-
/* @__PURE__ */
|
|
7004
|
+
completAlert && /* @__PURE__ */ jsx15(Theme2, { children: /* @__PURE__ */ jsxs9(AlertDialog.Root, { children: [
|
|
7005
|
+
/* @__PURE__ */ jsx15(AlertDialog.Trigger, { children: trigger }),
|
|
8527
7006
|
/* @__PURE__ */ jsxs9(AlertDialogCompleteStyled, { children: [
|
|
8528
7007
|
/* @__PURE__ */ jsxs9(AlertDialogRowStyled, { className: "le-alert-dialog-row", children: [
|
|
8529
7008
|
color === "success" && /* @__PURE__ */ jsxs9(
|
|
@@ -8535,14 +7014,14 @@ function Alert(_a) {
|
|
|
8535
7014
|
fill: "none",
|
|
8536
7015
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8537
7016
|
children: [
|
|
8538
|
-
/* @__PURE__ */
|
|
7017
|
+
/* @__PURE__ */ jsx15("g", { clipPath: "url(#clip0_1428_9995)", children: /* @__PURE__ */ jsx15(
|
|
8539
7018
|
"path",
|
|
8540
7019
|
{
|
|
8541
7020
|
d: "M28 56C35.4261 56 42.548 53.05 47.799 47.799C53.05 42.548 56 35.4261 56 28C56 20.5739 53.05 13.452 47.799 8.20101C42.548 2.94999 35.4261 0 28 0C20.5739 0 13.452 2.94999 8.20101 8.20101C2.94999 13.452 0 20.5739 0 28C0 35.4261 2.94999 42.548 8.20101 47.799C13.452 53.05 20.5739 56 28 56ZM40.3594 22.8594L26.3594 36.8594C25.3312 37.8875 23.6688 37.8875 22.6516 36.8594L15.6516 29.8594C14.6234 28.8312 14.6234 27.1688 15.6516 26.1516C16.6797 25.1344 18.3422 25.1234 19.3594 26.1516L24.5 31.2922L36.6406 19.1406C37.6688 18.1125 39.3312 18.1125 40.3484 19.1406C41.3656 20.1688 41.3766 21.8312 40.3484 22.8484L40.3594 22.8594Z",
|
|
8542
7021
|
fill: "#1E8535"
|
|
8543
7022
|
}
|
|
8544
7023
|
) }),
|
|
8545
|
-
/* @__PURE__ */
|
|
7024
|
+
/* @__PURE__ */ jsx15("defs", { children: /* @__PURE__ */ jsx15("clipPath", { id: "clip0_1428_9995", children: /* @__PURE__ */ jsx15("rect", { width: "56", height: "56", fill: "white" }) }) })
|
|
8546
7025
|
]
|
|
8547
7026
|
}
|
|
8548
7027
|
),
|
|
@@ -8555,14 +7034,14 @@ function Alert(_a) {
|
|
|
8555
7034
|
fill: "none",
|
|
8556
7035
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8557
7036
|
children: [
|
|
8558
|
-
/* @__PURE__ */
|
|
7037
|
+
/* @__PURE__ */ jsx15("g", { clipPath: "url(#clip0_1428_10022)", children: /* @__PURE__ */ jsx15(
|
|
8559
7038
|
"path",
|
|
8560
7039
|
{
|
|
8561
7040
|
d: "M28 56C35.4261 56 42.548 53.05 47.799 47.799C53.05 42.548 56 35.4261 56 28C56 20.5739 53.05 13.452 47.799 8.20101C42.548 2.94999 35.4261 0 28 0C20.5739 0 13.452 2.94999 8.20101 8.20101C2.94999 13.452 0 20.5739 0 28C0 35.4261 2.94999 42.548 8.20101 47.799C13.452 53.05 20.5739 56 28 56ZM19.1406 19.1406C20.1687 18.1125 21.8312 18.1125 22.8484 19.1406L27.9891 24.2812L33.1297 19.1406C34.1578 18.1125 35.8203 18.1125 36.8375 19.1406C37.8547 20.1687 37.8656 21.8312 36.8375 22.8484L31.6969 27.9891L36.8375 33.1297C37.8656 34.1578 37.8656 35.8203 36.8375 36.8375C35.8094 37.8547 34.1469 37.8656 33.1297 36.8375L27.9891 31.6969L22.8484 36.8375C21.8203 37.8656 20.1578 37.8656 19.1406 36.8375C18.1234 35.8094 18.1125 34.1469 19.1406 33.1297L24.2812 27.9891L19.1406 22.8484C18.1125 21.8203 18.1125 20.1578 19.1406 19.1406Z",
|
|
8562
7041
|
fill: "#AD1F2B"
|
|
8563
7042
|
}
|
|
8564
7043
|
) }),
|
|
8565
|
-
/* @__PURE__ */
|
|
7044
|
+
/* @__PURE__ */ jsx15("defs", { children: /* @__PURE__ */ jsx15("clipPath", { id: "clip0_1428_10022", children: /* @__PURE__ */ jsx15("rect", { width: "56", height: "56", fill: "white" }) }) })
|
|
8566
7045
|
]
|
|
8567
7046
|
}
|
|
8568
7047
|
),
|
|
@@ -8575,14 +7054,14 @@ function Alert(_a) {
|
|
|
8575
7054
|
fill: "none",
|
|
8576
7055
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8577
7056
|
children: [
|
|
8578
|
-
/* @__PURE__ */
|
|
7057
|
+
/* @__PURE__ */ jsx15("g", { clipPath: "url(#clip0_1428_10038)", children: /* @__PURE__ */ jsx15(
|
|
8579
7058
|
"path",
|
|
8580
7059
|
{
|
|
8581
7060
|
d: "M28 56C35.4261 56 42.548 53.05 47.799 47.799C53.05 42.548 56 35.4261 56 28C56 20.5739 53.05 13.452 47.799 8.20101C42.548 2.94999 35.4261 0 28 0C20.5739 0 13.452 2.94999 8.20101 8.20101C2.94999 13.452 0 20.5739 0 28C0 35.4261 2.94999 42.548 8.20101 47.799C13.452 53.05 20.5739 56 28 56ZM28 14C29.4547 14 30.625 15.1703 30.625 16.625V28.875C30.625 30.3297 29.4547 31.5 28 31.5C26.5453 31.5 25.375 30.3297 25.375 28.875V16.625C25.375 15.1703 26.5453 14 28 14ZM24.5 38.5C24.5 37.5717 24.8687 36.6815 25.5251 36.0251C26.1815 35.3688 27.0717 35 28 35C28.9283 35 29.8185 35.3688 30.4749 36.0251C31.1313 36.6815 31.5 37.5717 31.5 38.5C31.5 39.4283 31.1313 40.3185 30.4749 40.9749C29.8185 41.6312 28.9283 42 28 42C27.0717 42 26.1815 41.6312 25.5251 40.9749C24.8687 40.3185 24.5 39.4283 24.5 38.5Z",
|
|
8582
7061
|
fill: "#CC9A06"
|
|
8583
7062
|
}
|
|
8584
7063
|
) }),
|
|
8585
|
-
/* @__PURE__ */
|
|
7064
|
+
/* @__PURE__ */ jsx15("defs", { children: /* @__PURE__ */ jsx15("clipPath", { id: "clip0_1428_10038", children: /* @__PURE__ */ jsx15("rect", { width: "56", height: "56", fill: "white" }) }) })
|
|
8586
7065
|
]
|
|
8587
7066
|
}
|
|
8588
7067
|
),
|
|
@@ -8595,35 +7074,35 @@ function Alert(_a) {
|
|
|
8595
7074
|
fill: "none",
|
|
8596
7075
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8597
7076
|
children: [
|
|
8598
|
-
/* @__PURE__ */
|
|
7077
|
+
/* @__PURE__ */ jsx15("g", { clipPath: "url(#clip0_1645_46)", children: /* @__PURE__ */ jsx15(
|
|
8599
7078
|
"path",
|
|
8600
7079
|
{
|
|
8601
7080
|
d: "M20 40C25.3043 40 30.3914 37.8929 34.1421 34.1421C37.8929 30.3914 40 25.3043 40 20C40 14.6957 37.8929 9.60859 34.1421 5.85786C30.3914 2.10714 25.3043 0 20 0C14.6957 0 9.60859 2.10714 5.85786 5.85786C2.10714 9.60859 0 14.6957 0 20C0 25.3043 2.10714 30.3914 5.85786 34.1421C9.60859 37.8929 14.6957 40 20 40ZM20 10C21.0391 10 21.875 10.8359 21.875 11.875V20.625C21.875 21.6641 21.0391 22.5 20 22.5C18.9609 22.5 18.125 21.6641 18.125 20.625V11.875C18.125 10.8359 18.9609 10 20 10ZM17.5 27.5C17.5 26.837 17.7634 26.2011 18.2322 25.7322C18.7011 25.2634 19.337 25 20 25C20.663 25 21.2989 25.2634 21.7678 25.7322C22.2366 26.2011 22.5 26.837 22.5 27.5C22.5 28.163 22.2366 28.7989 21.7678 29.2678C21.2989 29.7366 20.663 30 20 30C19.337 30 18.7011 29.7366 18.2322 29.2678C17.7634 28.7989 17.5 28.163 17.5 27.5Z",
|
|
8602
7081
|
fill: "#9FB6C7"
|
|
8603
7082
|
}
|
|
8604
7083
|
) }),
|
|
8605
|
-
/* @__PURE__ */
|
|
7084
|
+
/* @__PURE__ */ jsx15("defs", { children: /* @__PURE__ */ jsx15("clipPath", { id: "clip0_1645_46", children: /* @__PURE__ */ jsx15("rect", { width: "40", height: "40", fill: "white" }) }) })
|
|
8606
7085
|
]
|
|
8607
7086
|
}
|
|
8608
7087
|
),
|
|
8609
|
-
completAlert.title && /* @__PURE__ */
|
|
7088
|
+
completAlert.title && /* @__PURE__ */ jsx15(AlertDialogTitleStyled, { children: completAlert.title }),
|
|
8610
7089
|
/* @__PURE__ */ jsxs9(AlertDialogDescriptionStyled, { children: [
|
|
8611
|
-
completAlert.subtitle && /* @__PURE__ */
|
|
7090
|
+
completAlert.subtitle && /* @__PURE__ */ jsx15(
|
|
8612
7091
|
Text,
|
|
8613
7092
|
{
|
|
8614
7093
|
css: {
|
|
8615
7094
|
fontSize: "$16"
|
|
8616
7095
|
},
|
|
8617
7096
|
asChild: true,
|
|
8618
|
-
children: /* @__PURE__ */
|
|
7097
|
+
children: /* @__PURE__ */ jsx15("h2", { children: completAlert.subtitle })
|
|
8619
7098
|
}
|
|
8620
7099
|
),
|
|
8621
7100
|
completAlert.description
|
|
8622
7101
|
] })
|
|
8623
7102
|
] }),
|
|
8624
|
-
completAlert.onAction || completAlert.cancel ? /* @__PURE__ */
|
|
8625
|
-
/* @__PURE__ */
|
|
8626
|
-
completAlert.onAction && /* @__PURE__ */
|
|
7103
|
+
completAlert.onAction || completAlert.cancel ? /* @__PURE__ */ jsx15(AlertDialoghrStyled, {}) : null,
|
|
7104
|
+
/* @__PURE__ */ jsx15(AlertDialogRowStyled, { children: /* @__PURE__ */ jsxs9(Flex, { gap: "10", justify: "end", width: "100%", children: [
|
|
7105
|
+
completAlert.onAction && /* @__PURE__ */ jsx15(AlertDialog.Action, { children: /* @__PURE__ */ jsx15(
|
|
8627
7106
|
Button,
|
|
8628
7107
|
{
|
|
8629
7108
|
variant: "contained",
|
|
@@ -8631,7 +7110,7 @@ function Alert(_a) {
|
|
|
8631
7110
|
children: completAlert.actionText || "Salvar"
|
|
8632
7111
|
}
|
|
8633
7112
|
) }),
|
|
8634
|
-
completAlert.cancel && /* @__PURE__ */
|
|
7113
|
+
completAlert.cancel && /* @__PURE__ */ jsx15(AlertDialog.Cancel, { children: /* @__PURE__ */ jsx15(Button, { variant: "outlined", color: "neutral", children: completAlert.cancelText || "Cancelar" }) })
|
|
8635
7114
|
] }) })
|
|
8636
7115
|
] })
|
|
8637
7116
|
] }) })
|
|
@@ -8640,7 +7119,7 @@ function Alert(_a) {
|
|
|
8640
7119
|
|
|
8641
7120
|
// src/components/Switch.tsx
|
|
8642
7121
|
import { Switch as RadixSwitch } from "@radix-ui/themes";
|
|
8643
|
-
import { jsx as
|
|
7122
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
8644
7123
|
var SwitchStyled = styled(RadixSwitch, {
|
|
8645
7124
|
all: "unset",
|
|
8646
7125
|
borderRadius: "$full",
|
|
@@ -8734,13 +7213,13 @@ var SwitchStyled = styled(RadixSwitch, {
|
|
|
8734
7213
|
}
|
|
8735
7214
|
});
|
|
8736
7215
|
function Switch(props) {
|
|
8737
|
-
return /* @__PURE__ */
|
|
7216
|
+
return /* @__PURE__ */ jsx16(SwitchStyled, __spreadValues({ color: "brand", defaultChecked: true }, props));
|
|
8738
7217
|
}
|
|
8739
7218
|
|
|
8740
7219
|
// src/components/Step.tsx
|
|
8741
7220
|
import React7 from "react";
|
|
8742
7221
|
import { Box as Box2, Tabs as StepRadix } from "@radix-ui/themes";
|
|
8743
|
-
import { jsx as
|
|
7222
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
8744
7223
|
var StepStyled = styled("div", {
|
|
8745
7224
|
fontFamily: "$default",
|
|
8746
7225
|
color: "$gray100",
|
|
@@ -8813,7 +7292,7 @@ var StepListStyled = styled(StepRadix.List, {
|
|
|
8813
7292
|
});
|
|
8814
7293
|
function Step(_a) {
|
|
8815
7294
|
var _b = _a, { children, defaultValue } = _b, props = __objRest(_b, ["children", "defaultValue"]);
|
|
8816
|
-
return /* @__PURE__ */
|
|
7295
|
+
return /* @__PURE__ */ jsx17(StepRadix.Root, { defaultValue: String(defaultValue), children: /* @__PURE__ */ jsx17(StepStyled, __spreadProps(__spreadValues({}, props), { children })) });
|
|
8817
7296
|
}
|
|
8818
7297
|
function StepTrigger(_a) {
|
|
8819
7298
|
var _b = _a, {
|
|
@@ -8826,7 +7305,7 @@ function StepTrigger(_a) {
|
|
|
8826
7305
|
"currentStep"
|
|
8827
7306
|
]);
|
|
8828
7307
|
const isActiveOrPrevious = currentStep !== void 0 && value <= currentStep;
|
|
8829
|
-
return /* @__PURE__ */
|
|
7308
|
+
return /* @__PURE__ */ jsx17(
|
|
8830
7309
|
StepTriggerStyled,
|
|
8831
7310
|
__spreadProps(__spreadValues({
|
|
8832
7311
|
"data-filled": isActiveOrPrevious,
|
|
@@ -8844,7 +7323,7 @@ function StepContent(_a) {
|
|
|
8844
7323
|
"value",
|
|
8845
7324
|
"children"
|
|
8846
7325
|
]);
|
|
8847
|
-
return /* @__PURE__ */
|
|
7326
|
+
return /* @__PURE__ */ jsx17(StepRadix.Content, __spreadProps(__spreadValues({ value: String(value) }, props), { children }));
|
|
8848
7327
|
}
|
|
8849
7328
|
function StepList(_a) {
|
|
8850
7329
|
var _b = _a, {
|
|
@@ -8854,7 +7333,7 @@ function StepList(_a) {
|
|
|
8854
7333
|
"children",
|
|
8855
7334
|
"currentStep"
|
|
8856
7335
|
]);
|
|
8857
|
-
return /* @__PURE__ */
|
|
7336
|
+
return /* @__PURE__ */ jsx17(StepListStyled, __spreadProps(__spreadValues({}, props), { children: React7.Children.map(children, (child) => {
|
|
8858
7337
|
if (React7.isValidElement(child) && child.type === StepTrigger) {
|
|
8859
7338
|
return React7.cloneElement(child, { currentStep });
|
|
8860
7339
|
}
|
|
@@ -8867,12 +7346,12 @@ function StepWrapper(_a) {
|
|
|
8867
7346
|
} = _b, props = __objRest(_b, [
|
|
8868
7347
|
"children"
|
|
8869
7348
|
]);
|
|
8870
|
-
return /* @__PURE__ */
|
|
7349
|
+
return /* @__PURE__ */ jsx17(Box2, __spreadProps(__spreadValues({}, props), { children }));
|
|
8871
7350
|
}
|
|
8872
7351
|
|
|
8873
7352
|
// src/components/Card.tsx
|
|
8874
7353
|
import { Card as CardRadix } from "@radix-ui/themes";
|
|
8875
|
-
import { jsx as
|
|
7354
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
8876
7355
|
var CardStyled = styled(CardRadix, {
|
|
8877
7356
|
borderRadius: "$2xl",
|
|
8878
7357
|
border: "1px solid $dark100",
|
|
@@ -8908,13 +7387,13 @@ var CardStyled = styled(CardRadix, {
|
|
|
8908
7387
|
});
|
|
8909
7388
|
function Card(_a) {
|
|
8910
7389
|
var _b = _a, { asChild, children } = _b, props = __objRest(_b, ["asChild", "children"]);
|
|
8911
|
-
return /* @__PURE__ */
|
|
7390
|
+
return /* @__PURE__ */ jsx18(CardStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
8912
7391
|
}
|
|
8913
7392
|
|
|
8914
7393
|
// src/components/TextareaField.tsx
|
|
8915
7394
|
import { TextArea as TextAreaRadix } from "@radix-ui/themes";
|
|
8916
|
-
import React8, { useRef as useRef6 } from "react";
|
|
8917
|
-
import { jsx as
|
|
7395
|
+
import React8, { useRef as useRef6, useState as useState4, useEffect as useEffect4 } from "react";
|
|
7396
|
+
import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
8918
7397
|
var TextareaFieldStyle = styled(TextAreaRadix, {
|
|
8919
7398
|
display: "flex",
|
|
8920
7399
|
flex: 1,
|
|
@@ -8942,294 +7421,83 @@ var TextareaContainer = styled("div", {
|
|
|
8942
7421
|
border: "1px solid",
|
|
8943
7422
|
borderRadius: "$sm",
|
|
8944
7423
|
"&:has(textarea:focus)": {
|
|
8945
|
-
border: "1px solid $brand300"
|
|
8946
|
-
},
|
|
8947
|
-
"&:has(textarea:disabled)": {
|
|
8948
|
-
backgroundColor: "$dark100",
|
|
8949
|
-
color: "$dark400",
|
|
8950
|
-
border: "1px solid $dark200",
|
|
8951
|
-
cursor: "not-allowed"
|
|
8952
|
-
},
|
|
8953
|
-
variants: {
|
|
8954
|
-
color: {
|
|
8955
|
-
default: {
|
|
8956
|
-
borderColor: "$dark300"
|
|
8957
|
-
},
|
|
8958
|
-
error: {
|
|
8959
|
-
borderColor: "$error400"
|
|
8960
|
-
}
|
|
8961
|
-
}
|
|
8962
|
-
},
|
|
8963
|
-
defaultVariants: {
|
|
8964
|
-
color: "default"
|
|
8965
|
-
}
|
|
8966
|
-
});
|
|
8967
|
-
var TextareaLimitIndicator = styled("div", {
|
|
8968
|
-
padding: "$12 $16",
|
|
8969
|
-
borderTop: "1px solid $neutral300",
|
|
8970
|
-
width: "100%",
|
|
8971
|
-
flex: 1,
|
|
8972
|
-
display: "flex",
|
|
8973
|
-
backgroundColor: "$dark50",
|
|
8974
|
-
span: {
|
|
8975
|
-
backgroundColor: "$neutral200",
|
|
8976
|
-
color: "$neutral700",
|
|
8977
|
-
borderRadius: "$2xs",
|
|
8978
|
-
padding: "$4"
|
|
8979
|
-
}
|
|
8980
|
-
});
|
|
8981
|
-
var TextareaField = React8.forwardRef((_a, fowardedRef) => {
|
|
8982
|
-
var _b = _a, { maxLength, color } = _b, props = __objRest(_b, ["maxLength", "color"]);
|
|
8983
|
-
const inputRef = useRef6(null);
|
|
8984
|
-
const badgeRef = useRef6(null);
|
|
8985
|
-
const updateCharCountBadge = () => {
|
|
8986
|
-
var _a2, _b2;
|
|
8987
|
-
if (!maxLength || !badgeRef.current) return;
|
|
8988
|
-
const remainingChars = maxLength - ((_b2 = (_a2 = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a2.value.length) != null ? _b2 : 0);
|
|
8989
|
-
badgeRef.current.textContent = String(remainingChars);
|
|
8990
|
-
};
|
|
8991
|
-
const handleInput = (e) => {
|
|
8992
|
-
var _a2;
|
|
8993
|
-
updateCharCountBadge();
|
|
8994
|
-
(_a2 = props.onInput) == null ? void 0 : _a2.call(props, e);
|
|
8995
|
-
};
|
|
8996
|
-
return /* @__PURE__ */ jsxs10(TextareaContainer, { color, children: [
|
|
8997
|
-
/* @__PURE__ */ jsx22(
|
|
8998
|
-
TextareaFieldStyle,
|
|
8999
|
-
__spreadValues({
|
|
9000
|
-
rows: 4,
|
|
9001
|
-
ref: (r) => {
|
|
9002
|
-
if (!r) return;
|
|
9003
|
-
inputRef.current = r;
|
|
9004
|
-
if (fowardedRef) {
|
|
9005
|
-
if (typeof fowardedRef === "function") fowardedRef(r);
|
|
9006
|
-
else {
|
|
9007
|
-
fowardedRef.current = r;
|
|
9008
|
-
}
|
|
9009
|
-
}
|
|
9010
|
-
},
|
|
9011
|
-
onInput: handleInput,
|
|
9012
|
-
maxLength
|
|
9013
|
-
}, props)
|
|
9014
|
-
),
|
|
9015
|
-
maxLength && /* @__PURE__ */ jsx22(TextareaLimitIndicator, { children: /* @__PURE__ */ jsx22(Text, { typography: "badgeMedium", ref: badgeRef, children: maxLength }) })
|
|
9016
|
-
] });
|
|
9017
|
-
});
|
|
9018
|
-
|
|
9019
|
-
// src/components/Toast/components/ToastItem.tsx
|
|
9020
|
-
import { useState as useState4 } from "react";
|
|
9021
|
-
|
|
9022
|
-
// src/components/Toast/styles/index.ts
|
|
9023
|
-
import { keyframes as keyframes2 } from "@stitches/react";
|
|
9024
|
-
import * as ToastPrimitive from "@radix-ui/react-toast";
|
|
9025
|
-
var slideIn = keyframes2({
|
|
9026
|
-
from: {
|
|
9027
|
-
transform: "translateX(calc(100% + 25px))",
|
|
9028
|
-
opacity: 0
|
|
9029
|
-
},
|
|
9030
|
-
to: {
|
|
9031
|
-
transform: "translateX(0)",
|
|
9032
|
-
opacity: 1
|
|
9033
|
-
}
|
|
9034
|
-
});
|
|
9035
|
-
var slideOut = keyframes2({
|
|
9036
|
-
from: {
|
|
9037
|
-
transform: "translateX(0)",
|
|
9038
|
-
opacity: 1
|
|
9039
|
-
},
|
|
9040
|
-
to: {
|
|
9041
|
-
transform: "translateX(calc(100% + 25px))",
|
|
9042
|
-
opacity: 0
|
|
9043
|
-
}
|
|
9044
|
-
});
|
|
9045
|
-
var swipeOut = keyframes2({
|
|
9046
|
-
from: {
|
|
9047
|
-
transform: "translateX(var(--radix-toast-swipe-end-x))",
|
|
9048
|
-
opacity: 1
|
|
9049
|
-
},
|
|
9050
|
-
to: {
|
|
9051
|
-
transform: "translateX(calc(100% + 25px))",
|
|
9052
|
-
opacity: 0
|
|
9053
|
-
}
|
|
9054
|
-
});
|
|
9055
|
-
var ToastViewport = styled(ToastPrimitive.Viewport, {
|
|
9056
|
-
position: "fixed",
|
|
9057
|
-
top: 0,
|
|
9058
|
-
right: 0,
|
|
9059
|
-
display: "flex",
|
|
9060
|
-
flexDirection: "column",
|
|
9061
|
-
padding: 25,
|
|
9062
|
-
gap: 10,
|
|
9063
|
-
width: 390,
|
|
9064
|
-
maxWidth: "100vw",
|
|
9065
|
-
margin: 0,
|
|
9066
|
-
listStyle: "none",
|
|
9067
|
-
zIndex: 2147483647,
|
|
9068
|
-
outline: "none"
|
|
9069
|
-
});
|
|
9070
|
-
var ToastRoot = styled(ToastPrimitive.Root, {
|
|
9071
|
-
backgroundColor: "$neutral50",
|
|
9072
|
-
borderRadius: "$sm",
|
|
9073
|
-
boxShadow: "hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px",
|
|
9074
|
-
padding: "$16",
|
|
9075
|
-
gap: "$8",
|
|
9076
|
-
display: "flex",
|
|
9077
|
-
alignItems: "center",
|
|
9078
|
-
border: "1px solid",
|
|
9079
|
-
position: "relative",
|
|
9080
|
-
zIndex: 9999,
|
|
9081
|
-
'&[data-state="open"]': {
|
|
9082
|
-
animation: `${slideIn} 150ms cubic-bezier(0.16, 1, 0.3, 1)`
|
|
9083
|
-
},
|
|
9084
|
-
'&[data-state="closed"]': {
|
|
9085
|
-
animation: `${slideOut} 100ms ease-in`
|
|
9086
|
-
},
|
|
9087
|
-
'&[data-swipe="move"]': {
|
|
9088
|
-
transform: "translateX(var(--radix-toast-swipe-move-x))"
|
|
9089
|
-
},
|
|
9090
|
-
'&[data-swipe="cancel"]': {
|
|
9091
|
-
transform: "translateX(0)",
|
|
9092
|
-
transition: "transform 200ms ease-out"
|
|
7424
|
+
border: "1px solid $brand300"
|
|
9093
7425
|
},
|
|
9094
|
-
|
|
9095
|
-
|
|
7426
|
+
"&:has(textarea:disabled)": {
|
|
7427
|
+
backgroundColor: "$dark100",
|
|
7428
|
+
color: "$dark400",
|
|
7429
|
+
border: "1px solid $dark200",
|
|
7430
|
+
cursor: "not-allowed"
|
|
9096
7431
|
},
|
|
9097
|
-
$$toastColor: "inherit",
|
|
9098
|
-
color: "$$toastColor",
|
|
9099
|
-
borderColor: "$$toastColor",
|
|
9100
7432
|
variants: {
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
backgroundColor: "$success50"
|
|
7433
|
+
color: {
|
|
7434
|
+
default: {
|
|
7435
|
+
borderColor: "$dark300"
|
|
9105
7436
|
},
|
|
9106
7437
|
error: {
|
|
9107
|
-
|
|
9108
|
-
backgroundColor: "$error50"
|
|
9109
|
-
},
|
|
9110
|
-
warning: {
|
|
9111
|
-
$$toastColor: "$colors$warning600",
|
|
9112
|
-
backgroundColor: "$warning50"
|
|
9113
|
-
},
|
|
9114
|
-
info: {
|
|
9115
|
-
$$toastColor: "$colors$info600",
|
|
9116
|
-
backgroundColor: "$info50"
|
|
7438
|
+
borderColor: "$error400"
|
|
9117
7439
|
}
|
|
9118
7440
|
}
|
|
9119
7441
|
},
|
|
9120
7442
|
defaultVariants: {
|
|
9121
|
-
|
|
7443
|
+
color: "default"
|
|
9122
7444
|
}
|
|
9123
7445
|
});
|
|
9124
|
-
var
|
|
9125
|
-
|
|
9126
|
-
|
|
7446
|
+
var TextareaLimitIndicator = styled("div", {
|
|
7447
|
+
padding: "$12 $16",
|
|
7448
|
+
borderTop: "1px solid $neutral300",
|
|
7449
|
+
width: "100%",
|
|
7450
|
+
flex: 1,
|
|
9127
7451
|
display: "flex",
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
opacity: 0.7,
|
|
9135
|
-
"&:hover": {
|
|
9136
|
-
opacity: 1,
|
|
9137
|
-
backgroundColor: "rgba(0, 0, 0, 0.05)"
|
|
9138
|
-
},
|
|
9139
|
-
"&:focus": {
|
|
9140
|
-
boxShadow: "0 0 0 2px currentColor",
|
|
9141
|
-
opacity: 1
|
|
7452
|
+
backgroundColor: "$dark50",
|
|
7453
|
+
span: {
|
|
7454
|
+
backgroundColor: "$neutral200",
|
|
7455
|
+
color: "$neutral700",
|
|
7456
|
+
borderRadius: "$2xs",
|
|
7457
|
+
padding: "$4"
|
|
9142
7458
|
}
|
|
9143
7459
|
});
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
const handleOpenChange = (open2) => {
|
|
9153
|
-
setOpen(open2);
|
|
9154
|
-
if (!open2) {
|
|
9155
|
-
onRemove(toast.id);
|
|
7460
|
+
var TextareaField = React8.forwardRef((_a, forwardedRef) => {
|
|
7461
|
+
var _b = _a, { maxLength, color } = _b, props = __objRest(_b, ["maxLength", "color"]);
|
|
7462
|
+
const inputRef = useRef6(null);
|
|
7463
|
+
const [remaining, setRemaining] = useState4(maxLength);
|
|
7464
|
+
useEffect4(() => {
|
|
7465
|
+
var _a2;
|
|
7466
|
+
if (maxLength && inputRef.current) {
|
|
7467
|
+
setRemaining(maxLength - ((_a2 = inputRef.current.value.length) != null ? _a2 : 0));
|
|
9156
7468
|
}
|
|
9157
|
-
};
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
{
|
|
9161
|
-
|
|
9162
|
-
duration: toast.duration,
|
|
9163
|
-
open,
|
|
9164
|
-
onOpenChange: handleOpenChange,
|
|
9165
|
-
children: [
|
|
9166
|
-
(toast == null ? void 0 : toast.icon) && /* @__PURE__ */ jsx23(Icon_default, { name: toast.icon, size: "xl" }),
|
|
9167
|
-
/* @__PURE__ */ jsx23("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsx23(Text, { typography: "bodyS", fontWeight: "medium", children: toast.message }) }),
|
|
9168
|
-
/* @__PURE__ */ jsx23(ToastClose, { "aria-label": "Close", children: /* @__PURE__ */ jsx23(Icon_default, { name: "xmark", size: "md" }) })
|
|
9169
|
-
]
|
|
7469
|
+
}, [maxLength]);
|
|
7470
|
+
const handleInput = (e) => {
|
|
7471
|
+
var _a2;
|
|
7472
|
+
if (maxLength) {
|
|
7473
|
+
setRemaining(maxLength - e.currentTarget.value.length);
|
|
9170
7474
|
}
|
|
9171
|
-
|
|
9172
|
-
}
|
|
9173
|
-
|
|
9174
|
-
// src/components/Toast/components/ToastProvider.tsx
|
|
9175
|
-
import { createContext, useState as useState5 } from "react";
|
|
9176
|
-
import * as ToastPrimitive2 from "@radix-ui/react-toast";
|
|
9177
|
-
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
9178
|
-
var ToastContext = createContext(null);
|
|
9179
|
-
function ToastProvider({
|
|
9180
|
-
children,
|
|
9181
|
-
defaultDuration = 5e3,
|
|
9182
|
-
maxToasts = 5,
|
|
9183
|
-
swipeDirection = "right"
|
|
9184
|
-
}) {
|
|
9185
|
-
const [toasts, setToasts] = useState5([]);
|
|
9186
|
-
const addToast = (toastData) => {
|
|
9187
|
-
const id = Math.random().toString(36).substr(2, 9);
|
|
9188
|
-
const newToast = __spreadProps(__spreadValues({
|
|
9189
|
-
id
|
|
9190
|
-
}, toastData), {
|
|
9191
|
-
type: (toastData == null ? void 0 : toastData.type) || "info",
|
|
9192
|
-
duration: (toastData == null ? void 0 : toastData.duration) || defaultDuration,
|
|
9193
|
-
createdAt: Date.now()
|
|
9194
|
-
});
|
|
9195
|
-
setToasts((prevToasts) => {
|
|
9196
|
-
const updatedToasts = [...prevToasts, newToast];
|
|
9197
|
-
return updatedToasts.slice(-maxToasts);
|
|
9198
|
-
});
|
|
9199
|
-
return id;
|
|
9200
|
-
};
|
|
9201
|
-
const removeToast = (id) => {
|
|
9202
|
-
setToasts((prevToasts) => prevToasts.filter((toast) => toast.id !== id));
|
|
9203
|
-
};
|
|
9204
|
-
const removeAllToasts = () => {
|
|
9205
|
-
setToasts([]);
|
|
9206
|
-
};
|
|
9207
|
-
const contextValue = {
|
|
9208
|
-
toasts,
|
|
9209
|
-
addToast,
|
|
9210
|
-
removeToast,
|
|
9211
|
-
removeAllToasts
|
|
7475
|
+
(_a2 = props.onInput) == null ? void 0 : _a2.call(props, e);
|
|
9212
7476
|
};
|
|
9213
|
-
return /* @__PURE__ */
|
|
9214
|
-
|
|
9215
|
-
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
}
|
|
7477
|
+
return /* @__PURE__ */ jsxs10(TextareaContainer, { color, children: [
|
|
7478
|
+
/* @__PURE__ */ jsx19(
|
|
7479
|
+
TextareaFieldStyle,
|
|
7480
|
+
__spreadValues({
|
|
7481
|
+
rows: 4,
|
|
7482
|
+
ref: (r) => {
|
|
7483
|
+
if (!r) return;
|
|
7484
|
+
inputRef.current = r;
|
|
7485
|
+
if (forwardedRef) {
|
|
7486
|
+
if (typeof forwardedRef === "function") forwardedRef(r);
|
|
7487
|
+
else forwardedRef.current = r;
|
|
7488
|
+
}
|
|
7489
|
+
},
|
|
7490
|
+
onInput: handleInput,
|
|
7491
|
+
maxLength
|
|
7492
|
+
}, props)
|
|
7493
|
+
),
|
|
7494
|
+
maxLength && /* @__PURE__ */ jsx19(TextareaLimitIndicator, { children: /* @__PURE__ */ jsx19(Text, { typography: "badgeMedium", children: remaining }) })
|
|
7495
|
+
] });
|
|
7496
|
+
});
|
|
9229
7497
|
|
|
9230
7498
|
// src/components/Tooltip/index.tsx
|
|
9231
7499
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
9232
|
-
import { jsx as
|
|
7500
|
+
import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
9233
7501
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
9234
7502
|
var TooltipRoot = TooltipPrimitive.Root;
|
|
9235
7503
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
@@ -9268,26 +7536,26 @@ function Tooltip({
|
|
|
9268
7536
|
delayDuration = 200,
|
|
9269
7537
|
side = "top"
|
|
9270
7538
|
}) {
|
|
9271
|
-
return /* @__PURE__ */
|
|
9272
|
-
/* @__PURE__ */
|
|
9273
|
-
/* @__PURE__ */
|
|
9274
|
-
typeof content === "string" ? /* @__PURE__ */
|
|
9275
|
-
/* @__PURE__ */
|
|
7539
|
+
return /* @__PURE__ */ jsx20(TooltipProvider, { children: /* @__PURE__ */ jsxs11(TooltipRoot, { delayDuration, children: [
|
|
7540
|
+
/* @__PURE__ */ jsx20(TooltipTrigger, { asChild: true, children }),
|
|
7541
|
+
/* @__PURE__ */ jsxs11(TooltipContent, { side, sideOffset: 5, children: [
|
|
7542
|
+
typeof content === "string" ? /* @__PURE__ */ jsx20(Text, { typography: "tooltip", children: content }) : content,
|
|
7543
|
+
/* @__PURE__ */ jsx20(TooltipArrow, {})
|
|
9276
7544
|
] })
|
|
9277
7545
|
] }) });
|
|
9278
7546
|
}
|
|
9279
7547
|
|
|
9280
7548
|
// src/components/MultiSelect.tsx
|
|
9281
|
-
import React9, { useCallback as useCallback2, useRef as useRef7, useState as
|
|
7549
|
+
import React9, { useCallback as useCallback2, useRef as useRef7, useState as useState5 } from "react";
|
|
9282
7550
|
import { DropdownMenu as DropdownMenu3, Theme as Theme3 } from "@radix-ui/themes";
|
|
9283
|
-
import { FontAwesomeIcon as
|
|
7551
|
+
import { FontAwesomeIcon as FontAwesomeIcon2 } from "@fortawesome/react-fontawesome";
|
|
9284
7552
|
import {
|
|
9285
7553
|
faChevronDown as faChevronDown2,
|
|
9286
7554
|
faChevronUp as faChevronUp2,
|
|
9287
7555
|
faSquareXmark
|
|
9288
7556
|
} from "@fortawesome/free-solid-svg-icons";
|
|
9289
7557
|
import { useMemo } from "react";
|
|
9290
|
-
import { Fragment as Fragment2, jsx as
|
|
7558
|
+
import { Fragment as Fragment2, jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
9291
7559
|
var StyledContent = styled(DropdownMenu3.Content, {
|
|
9292
7560
|
backgroundColor: "$dark50",
|
|
9293
7561
|
borderRadius: "$sm",
|
|
@@ -9345,7 +7613,7 @@ var StyledItem2 = styled("div", __spreadValues({}, itemStyle));
|
|
|
9345
7613
|
var BadgeCloseBtn = styled("div", {
|
|
9346
7614
|
cursor: "pointer"
|
|
9347
7615
|
});
|
|
9348
|
-
var StyledFlexWithMaxHeight = styled(
|
|
7616
|
+
var StyledFlexWithMaxHeight = styled(Flex, {
|
|
9349
7617
|
variants: {
|
|
9350
7618
|
hasMaxHeight: {
|
|
9351
7619
|
true: {
|
|
@@ -9392,7 +7660,7 @@ var MultiSelect = React9.forwardRef(
|
|
|
9392
7660
|
disabled = false,
|
|
9393
7661
|
maxHeight
|
|
9394
7662
|
}, fowardedRef) => {
|
|
9395
|
-
const [isOpen, setIsOpen] =
|
|
7663
|
+
const [isOpen, setIsOpen] = useState5(false);
|
|
9396
7664
|
const triggerRef = useRef7(null);
|
|
9397
7665
|
const labelByValue = useMemo(() => {
|
|
9398
7666
|
return options.reduce((prev, curr) => {
|
|
@@ -9428,9 +7696,9 @@ var MultiSelect = React9.forwardRef(
|
|
|
9428
7696
|
},
|
|
9429
7697
|
[disabled]
|
|
9430
7698
|
);
|
|
9431
|
-
return /* @__PURE__ */
|
|
9432
|
-
/* @__PURE__ */
|
|
9433
|
-
/* @__PURE__ */
|
|
7699
|
+
return /* @__PURE__ */ jsxs12(Theme3, { children: [
|
|
7700
|
+
/* @__PURE__ */ jsxs12(DropdownMenu3.Root, { children: [
|
|
7701
|
+
/* @__PURE__ */ jsx21(DropdownMenu3.Trigger, { children: /* @__PURE__ */ jsxs12(
|
|
9434
7702
|
StyledTrigger,
|
|
9435
7703
|
{
|
|
9436
7704
|
ref: (r) => {
|
|
@@ -9448,7 +7716,7 @@ var MultiSelect = React9.forwardRef(
|
|
|
9448
7716
|
style: width !== "100%" ? { width } : void 0,
|
|
9449
7717
|
onClick: handleToggle,
|
|
9450
7718
|
children: [
|
|
9451
|
-
/* @__PURE__ */
|
|
7719
|
+
/* @__PURE__ */ jsx21(
|
|
9452
7720
|
StyledText,
|
|
9453
7721
|
{
|
|
9454
7722
|
typography: "labelMedium",
|
|
@@ -9456,8 +7724,8 @@ var MultiSelect = React9.forwardRef(
|
|
|
9456
7724
|
children: text
|
|
9457
7725
|
}
|
|
9458
7726
|
),
|
|
9459
|
-
/* @__PURE__ */
|
|
9460
|
-
|
|
7727
|
+
/* @__PURE__ */ jsx21(
|
|
7728
|
+
FontAwesomeIcon2,
|
|
9461
7729
|
{
|
|
9462
7730
|
icon: isOpen ? faChevronUp2 : faChevronDown2,
|
|
9463
7731
|
size: "sm",
|
|
@@ -9467,60 +7735,60 @@ var MultiSelect = React9.forwardRef(
|
|
|
9467
7735
|
]
|
|
9468
7736
|
}
|
|
9469
7737
|
) }),
|
|
9470
|
-
/* @__PURE__ */
|
|
7738
|
+
/* @__PURE__ */ jsx21(
|
|
9471
7739
|
StyledContent,
|
|
9472
7740
|
{
|
|
9473
7741
|
css: {
|
|
9474
7742
|
width: "100%",
|
|
9475
7743
|
zIndex: zIndex === "auto" ? 999999 : zIndex
|
|
9476
7744
|
},
|
|
9477
|
-
children: !singleSelect ? /* @__PURE__ */
|
|
7745
|
+
children: !singleSelect ? /* @__PURE__ */ jsx21(
|
|
9478
7746
|
CheckboxGroup,
|
|
9479
7747
|
{
|
|
9480
7748
|
value: selectedValues,
|
|
9481
7749
|
onValueChange: (v) => {
|
|
9482
7750
|
onValueChange == null ? void 0 : onValueChange(v);
|
|
9483
7751
|
},
|
|
9484
|
-
children: /* @__PURE__ */
|
|
7752
|
+
children: /* @__PURE__ */ jsx21(
|
|
9485
7753
|
StyledFlexWithMaxHeight,
|
|
9486
7754
|
{
|
|
9487
7755
|
direction: "column",
|
|
9488
7756
|
gap: 8,
|
|
9489
7757
|
hasMaxHeight: !!maxHeight,
|
|
9490
7758
|
style: maxHeight ? { maxHeight } : void 0,
|
|
9491
|
-
children: options.map(({ value, label }, i) => /* @__PURE__ */
|
|
7759
|
+
children: options.map(({ value, label }, i) => /* @__PURE__ */ jsx21(CheckboxItem, { value, css: itemStyle, children: /* @__PURE__ */ jsx21(Text, { typography: "labelSmall", children: label }) }, i))
|
|
9492
7760
|
}
|
|
9493
7761
|
)
|
|
9494
7762
|
}
|
|
9495
|
-
) : /* @__PURE__ */
|
|
7763
|
+
) : /* @__PURE__ */ jsx21(
|
|
9496
7764
|
StyledFlexWithMaxHeight,
|
|
9497
7765
|
{
|
|
9498
7766
|
direction: "column",
|
|
9499
7767
|
gap: 8,
|
|
9500
7768
|
hasMaxHeight: !!maxHeight,
|
|
9501
7769
|
style: maxHeight ? { maxHeight } : void 0,
|
|
9502
|
-
children: options.map(({ value, label }, i) => /* @__PURE__ */
|
|
7770
|
+
children: options.map(({ value, label }, i) => /* @__PURE__ */ jsx21(StyledItem2, { onClick: () => handleItemClick(value), children: /* @__PURE__ */ jsx21(Text, { typography: "labelSmall", children: label }) }, i))
|
|
9503
7771
|
}
|
|
9504
7772
|
)
|
|
9505
7773
|
}
|
|
9506
7774
|
)
|
|
9507
7775
|
] }),
|
|
9508
|
-
selectedValues.length > 0 && showSelectedValues && /* @__PURE__ */
|
|
9509
|
-
|
|
7776
|
+
selectedValues.length > 0 && showSelectedValues && /* @__PURE__ */ jsx21(Fragment2, { children: /* @__PURE__ */ jsx21(
|
|
7777
|
+
Flex,
|
|
9510
7778
|
{
|
|
9511
7779
|
direction: selectedOrientation,
|
|
9512
7780
|
gap: 8,
|
|
9513
7781
|
align: selectedOrientation === "column" ? "start" : "center",
|
|
9514
7782
|
justify: "start",
|
|
9515
7783
|
css: { margin: "8px 0" },
|
|
9516
|
-
children: selectedValues.map((value) => /* @__PURE__ */
|
|
9517
|
-
|
|
7784
|
+
children: selectedValues.map((value) => /* @__PURE__ */ jsxs12(
|
|
7785
|
+
Flex,
|
|
9518
7786
|
{
|
|
9519
7787
|
gap: 4,
|
|
9520
7788
|
align: "center",
|
|
9521
7789
|
css: { flexWrap: "wrap" },
|
|
9522
7790
|
children: [
|
|
9523
|
-
/* @__PURE__ */
|
|
7791
|
+
/* @__PURE__ */ jsx21(
|
|
9524
7792
|
BadgeCloseBtn,
|
|
9525
7793
|
{
|
|
9526
7794
|
onClick: (e) => {
|
|
@@ -9528,10 +7796,10 @@ var MultiSelect = React9.forwardRef(
|
|
|
9528
7796
|
handleRemove(value);
|
|
9529
7797
|
},
|
|
9530
7798
|
role: "button",
|
|
9531
|
-
children: /* @__PURE__ */
|
|
7799
|
+
children: /* @__PURE__ */ jsx21(FontAwesomeIcon2, { icon: faSquareXmark, size: "sm" })
|
|
9532
7800
|
}
|
|
9533
7801
|
),
|
|
9534
|
-
/* @__PURE__ */
|
|
7802
|
+
/* @__PURE__ */ jsx21(
|
|
9535
7803
|
Text,
|
|
9536
7804
|
{
|
|
9537
7805
|
typography: "captionMedium",
|
|
@@ -9552,7 +7820,7 @@ var MultiSelect = React9.forwardRef(
|
|
|
9552
7820
|
|
|
9553
7821
|
// src/components/Grid.tsx
|
|
9554
7822
|
import { Grid as GridRadix } from "@radix-ui/themes";
|
|
9555
|
-
import { jsx as
|
|
7823
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
9556
7824
|
var GridStyled = styled(GridRadix, {
|
|
9557
7825
|
display: "grid",
|
|
9558
7826
|
variants: {
|
|
@@ -9674,12 +7942,12 @@ var GridStyled = styled(GridRadix, {
|
|
|
9674
7942
|
});
|
|
9675
7943
|
function Grid(_a) {
|
|
9676
7944
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9677
|
-
return /* @__PURE__ */
|
|
7945
|
+
return /* @__PURE__ */ jsx22(GridStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
9678
7946
|
}
|
|
9679
7947
|
|
|
9680
7948
|
// src/components/Container.tsx
|
|
9681
7949
|
import { Container as ContainerRadix } from "@radix-ui/themes";
|
|
9682
|
-
import { jsx as
|
|
7950
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
9683
7951
|
var ContainerStyled = styled(ContainerRadix, {
|
|
9684
7952
|
variants: {
|
|
9685
7953
|
size: {
|
|
@@ -9709,12 +7977,12 @@ var ContainerStyled = styled(ContainerRadix, {
|
|
|
9709
7977
|
});
|
|
9710
7978
|
function Container(_a) {
|
|
9711
7979
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9712
|
-
return /* @__PURE__ */
|
|
7980
|
+
return /* @__PURE__ */ jsx23(ContainerStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
9713
7981
|
}
|
|
9714
7982
|
|
|
9715
7983
|
// src/components/Section.tsx
|
|
9716
7984
|
import { Section as SectionRadix } from "@radix-ui/themes";
|
|
9717
|
-
import { jsx as
|
|
7985
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
9718
7986
|
var SectionStyled = styled(SectionRadix, {
|
|
9719
7987
|
variants: {
|
|
9720
7988
|
size: {
|
|
@@ -9738,26 +8006,26 @@ var SectionStyled = styled(SectionRadix, {
|
|
|
9738
8006
|
});
|
|
9739
8007
|
function Section(_a) {
|
|
9740
8008
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9741
|
-
return /* @__PURE__ */
|
|
8009
|
+
return /* @__PURE__ */ jsx24(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
9742
8010
|
}
|
|
9743
8011
|
|
|
9744
8012
|
// src/components/FormFields/subComponents/ErrorFormMessage.tsx
|
|
9745
8013
|
import { faXmarkCircle } from "@fortawesome/free-solid-svg-icons";
|
|
9746
|
-
import { FontAwesomeIcon as
|
|
9747
|
-
import { jsx as
|
|
8014
|
+
import { FontAwesomeIcon as FontAwesomeIcon3 } from "@fortawesome/react-fontawesome";
|
|
8015
|
+
import { jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
9748
8016
|
var ErrorFormMessage = ({ message: message2 }) => {
|
|
9749
8017
|
if (!message2) return null;
|
|
9750
8018
|
if (typeof message2 !== "string") {
|
|
9751
8019
|
return null;
|
|
9752
8020
|
}
|
|
9753
|
-
return /* @__PURE__ */
|
|
9754
|
-
/* @__PURE__ */
|
|
9755
|
-
/* @__PURE__ */
|
|
8021
|
+
return /* @__PURE__ */ jsxs13(Flex, { justify: "start", align: "center", gap: 6, children: [
|
|
8022
|
+
/* @__PURE__ */ jsx25(FontAwesomeIcon3, { icon: faXmarkCircle, color: colors.error600, size: "1x" }),
|
|
8023
|
+
/* @__PURE__ */ jsx25(Text, { typography: "bodyXS", fontWeight: "medium", color: "error600", children: message2 })
|
|
9756
8024
|
] });
|
|
9757
8025
|
};
|
|
9758
8026
|
|
|
9759
8027
|
// src/components/FormFields/subComponents/FormLabel.tsx
|
|
9760
|
-
import { jsx as
|
|
8028
|
+
import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
9761
8029
|
var FormLabel = ({
|
|
9762
8030
|
name,
|
|
9763
8031
|
label,
|
|
@@ -9765,7 +8033,7 @@ var FormLabel = ({
|
|
|
9765
8033
|
required
|
|
9766
8034
|
}) => {
|
|
9767
8035
|
if (!label) return null;
|
|
9768
|
-
return /* @__PURE__ */
|
|
8036
|
+
return /* @__PURE__ */ jsxs14(
|
|
9769
8037
|
Text,
|
|
9770
8038
|
{
|
|
9771
8039
|
typography: "labelMedium",
|
|
@@ -9774,7 +8042,7 @@ var FormLabel = ({
|
|
|
9774
8042
|
id: `${name}-label`,
|
|
9775
8043
|
children: [
|
|
9776
8044
|
label,
|
|
9777
|
-
!required && /* @__PURE__ */
|
|
8045
|
+
!required && /* @__PURE__ */ jsx26(Text, { color: "dark500", children: " (opcional)" })
|
|
9778
8046
|
]
|
|
9779
8047
|
}
|
|
9780
8048
|
);
|
|
@@ -9782,7 +8050,7 @@ var FormLabel = ({
|
|
|
9782
8050
|
|
|
9783
8051
|
// src/components/FormFields/TextAreaFormField.tsx
|
|
9784
8052
|
import { useFormContext } from "react-hook-form";
|
|
9785
|
-
import { jsx as
|
|
8053
|
+
import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
9786
8054
|
var TextAreaFormField = (_a) => {
|
|
9787
8055
|
var _b = _a, {
|
|
9788
8056
|
name,
|
|
@@ -9810,8 +8078,8 @@ var TextAreaFormField = (_a) => {
|
|
|
9810
8078
|
required: required ? validationErrorMessage : false,
|
|
9811
8079
|
validate
|
|
9812
8080
|
};
|
|
9813
|
-
return /* @__PURE__ */
|
|
9814
|
-
/* @__PURE__ */
|
|
8081
|
+
return /* @__PURE__ */ jsxs15(Flex, { direction: "column", children: [
|
|
8082
|
+
/* @__PURE__ */ jsx27(
|
|
9815
8083
|
FormLabel,
|
|
9816
8084
|
{
|
|
9817
8085
|
name,
|
|
@@ -9820,7 +8088,7 @@ var TextAreaFormField = (_a) => {
|
|
|
9820
8088
|
haveError
|
|
9821
8089
|
}
|
|
9822
8090
|
),
|
|
9823
|
-
/* @__PURE__ */
|
|
8091
|
+
/* @__PURE__ */ jsx27(
|
|
9824
8092
|
TextareaField,
|
|
9825
8093
|
__spreadProps(__spreadValues(__spreadValues({}, props), register(name, validationRules)), {
|
|
9826
8094
|
placeholder,
|
|
@@ -9828,7 +8096,7 @@ var TextAreaFormField = (_a) => {
|
|
|
9828
8096
|
"aria-labelledby": `${name}-label`
|
|
9829
8097
|
})
|
|
9830
8098
|
),
|
|
9831
|
-
/* @__PURE__ */
|
|
8099
|
+
/* @__PURE__ */ jsx27(ErrorFormMessage, { message: errorMsg })
|
|
9832
8100
|
] });
|
|
9833
8101
|
};
|
|
9834
8102
|
|
|
@@ -9838,7 +8106,7 @@ import {
|
|
|
9838
8106
|
} from "react-hook-form";
|
|
9839
8107
|
import { useCallback as useCallback3, useMemo as useMemo2 } from "react";
|
|
9840
8108
|
import { format as format3, unformat as unformat2 } from "@react-input/mask";
|
|
9841
|
-
import { jsx as
|
|
8109
|
+
import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
9842
8110
|
var TextFormField = (_a) => {
|
|
9843
8111
|
var _b = _a, {
|
|
9844
8112
|
name,
|
|
@@ -9893,8 +8161,8 @@ var TextFormField = (_a) => {
|
|
|
9893
8161
|
if (valueFormatter) value = valueFormatter.unformat(value);
|
|
9894
8162
|
formChange(value);
|
|
9895
8163
|
};
|
|
9896
|
-
return /* @__PURE__ */
|
|
9897
|
-
label && /* @__PURE__ */
|
|
8164
|
+
return /* @__PURE__ */ jsxs16(Flex, { direction: "column", children: [
|
|
8165
|
+
label && /* @__PURE__ */ jsx28(
|
|
9898
8166
|
FormLabel,
|
|
9899
8167
|
{
|
|
9900
8168
|
name,
|
|
@@ -9903,7 +8171,7 @@ var TextFormField = (_a) => {
|
|
|
9903
8171
|
haveError
|
|
9904
8172
|
}
|
|
9905
8173
|
),
|
|
9906
|
-
/* @__PURE__ */
|
|
8174
|
+
/* @__PURE__ */ jsx28(
|
|
9907
8175
|
TextField,
|
|
9908
8176
|
__spreadProps(__spreadValues(__spreadValues({
|
|
9909
8177
|
mask,
|
|
@@ -9914,7 +8182,7 @@ var TextFormField = (_a) => {
|
|
|
9914
8182
|
value: formattedValue
|
|
9915
8183
|
})
|
|
9916
8184
|
),
|
|
9917
|
-
/* @__PURE__ */
|
|
8185
|
+
/* @__PURE__ */ jsx28(ErrorFormMessage, { message: errorMsg })
|
|
9918
8186
|
] });
|
|
9919
8187
|
};
|
|
9920
8188
|
|
|
@@ -9923,7 +8191,7 @@ import {
|
|
|
9923
8191
|
FormProvider,
|
|
9924
8192
|
useForm
|
|
9925
8193
|
} from "react-hook-form";
|
|
9926
|
-
import { jsx as
|
|
8194
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
9927
8195
|
var Form = (_a) => {
|
|
9928
8196
|
var _b = _a, {
|
|
9929
8197
|
onSubmit,
|
|
@@ -9935,7 +8203,7 @@ var Form = (_a) => {
|
|
|
9935
8203
|
const formMethods = useForm(__spreadValues({
|
|
9936
8204
|
mode: "onTouched"
|
|
9937
8205
|
}, props));
|
|
9938
|
-
return /* @__PURE__ */
|
|
8206
|
+
return /* @__PURE__ */ jsx29(FormProvider, __spreadProps(__spreadValues({}, formMethods), { children: /* @__PURE__ */ jsx29("form", { onSubmit: formMethods.handleSubmit(onSubmit), children: (() => {
|
|
9939
8207
|
if (typeof children === "function") {
|
|
9940
8208
|
return children(formMethods);
|
|
9941
8209
|
}
|
|
@@ -9945,7 +8213,7 @@ var Form = (_a) => {
|
|
|
9945
8213
|
|
|
9946
8214
|
// src/components/FormFields/MultiSelectFormField.tsx
|
|
9947
8215
|
import { useController as useController2 } from "react-hook-form";
|
|
9948
|
-
import { jsx as
|
|
8216
|
+
import { jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
9949
8217
|
var MultiSelectFormField = (_a) => {
|
|
9950
8218
|
var _b = _a, {
|
|
9951
8219
|
name,
|
|
@@ -9976,8 +8244,8 @@ var MultiSelectFormField = (_a) => {
|
|
|
9976
8244
|
const handleChange = (v) => {
|
|
9977
8245
|
onChange(v);
|
|
9978
8246
|
};
|
|
9979
|
-
return /* @__PURE__ */
|
|
9980
|
-
/* @__PURE__ */
|
|
8247
|
+
return /* @__PURE__ */ jsxs17(Flex, { direction: "column", children: [
|
|
8248
|
+
/* @__PURE__ */ jsx30(
|
|
9981
8249
|
FormLabel,
|
|
9982
8250
|
{
|
|
9983
8251
|
name,
|
|
@@ -9986,7 +8254,7 @@ var MultiSelectFormField = (_a) => {
|
|
|
9986
8254
|
haveError
|
|
9987
8255
|
}
|
|
9988
8256
|
),
|
|
9989
|
-
/* @__PURE__ */
|
|
8257
|
+
/* @__PURE__ */ jsx30(
|
|
9990
8258
|
MultiSelect,
|
|
9991
8259
|
__spreadValues({
|
|
9992
8260
|
value,
|
|
@@ -9998,7 +8266,7 @@ var MultiSelectFormField = (_a) => {
|
|
|
9998
8266
|
maxHeight
|
|
9999
8267
|
}, rest)
|
|
10000
8268
|
),
|
|
10001
|
-
/* @__PURE__ */
|
|
8269
|
+
/* @__PURE__ */ jsx30(ErrorFormMessage, { message: errorMsg })
|
|
10002
8270
|
] });
|
|
10003
8271
|
};
|
|
10004
8272
|
|
|
@@ -10016,13 +8284,13 @@ var minMaxLength = (min, max, errorMsg) => (value) => {
|
|
|
10016
8284
|
};
|
|
10017
8285
|
|
|
10018
8286
|
// src/components/FormFields/PhoneFormField.tsx
|
|
10019
|
-
import { jsx as
|
|
8287
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
10020
8288
|
var PhoneFormField = ({
|
|
10021
8289
|
name,
|
|
10022
8290
|
label,
|
|
10023
8291
|
required
|
|
10024
8292
|
}) => {
|
|
10025
|
-
return /* @__PURE__ */
|
|
8293
|
+
return /* @__PURE__ */ jsx31(
|
|
10026
8294
|
TextFormField,
|
|
10027
8295
|
{
|
|
10028
8296
|
name,
|
|
@@ -10052,7 +8320,7 @@ var PhoneFormField = ({
|
|
|
10052
8320
|
|
|
10053
8321
|
// src/components/FormFields/CPFFormField.tsx
|
|
10054
8322
|
import { useFormContext as useFormContext4, useWatch } from "react-hook-form";
|
|
10055
|
-
import { jsx as
|
|
8323
|
+
import { jsx as jsx32, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
10056
8324
|
var isValidCPF = (cpf) => {
|
|
10057
8325
|
cpf = cpf.replace(/[^\d]+/g, "");
|
|
10058
8326
|
if (cpf.length !== 11 || /^(\d)\1{10}$/.test(cpf)) return false;
|
|
@@ -10078,8 +8346,8 @@ var CPFFormField = ({
|
|
|
10078
8346
|
}) => {
|
|
10079
8347
|
const { control, setValue } = useFormContext4();
|
|
10080
8348
|
const foreigner = useWatch({ name: "foreigner", control });
|
|
10081
|
-
return /* @__PURE__ */
|
|
10082
|
-
/* @__PURE__ */
|
|
8349
|
+
return /* @__PURE__ */ jsxs18(Flex, { direction: "column", children: [
|
|
8350
|
+
/* @__PURE__ */ jsx32(
|
|
10083
8351
|
TextFormField,
|
|
10084
8352
|
{
|
|
10085
8353
|
name,
|
|
@@ -10097,7 +8365,7 @@ var CPFFormField = ({
|
|
|
10097
8365
|
disabled: foreigner
|
|
10098
8366
|
}
|
|
10099
8367
|
),
|
|
10100
|
-
/* @__PURE__ */
|
|
8368
|
+
/* @__PURE__ */ jsx32(
|
|
10101
8369
|
CheckboxGroup,
|
|
10102
8370
|
{
|
|
10103
8371
|
value: foreigner ? ["true"] : [],
|
|
@@ -10109,14 +8377,14 @@ var CPFFormField = ({
|
|
|
10109
8377
|
setValue(name, "");
|
|
10110
8378
|
}
|
|
10111
8379
|
},
|
|
10112
|
-
children: /* @__PURE__ */
|
|
8380
|
+
children: /* @__PURE__ */ jsx32(CheckboxItem, { value: "true", children: foreignerLabel })
|
|
10113
8381
|
}
|
|
10114
8382
|
)
|
|
10115
8383
|
] });
|
|
10116
8384
|
};
|
|
10117
8385
|
|
|
10118
8386
|
// src/components/FormFields/CNPJFormField.tsx
|
|
10119
|
-
import { jsx as
|
|
8387
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
10120
8388
|
var matchesNonDigit = new RegExp(/\D+/g);
|
|
10121
8389
|
var getWeights = (size, start, end) => {
|
|
10122
8390
|
const weights = [];
|
|
@@ -10165,7 +8433,7 @@ var CNPJFormField = ({
|
|
|
10165
8433
|
placeholder,
|
|
10166
8434
|
validationErrorMessage
|
|
10167
8435
|
}) => {
|
|
10168
|
-
return /* @__PURE__ */
|
|
8436
|
+
return /* @__PURE__ */ jsx33(
|
|
10169
8437
|
TextFormField,
|
|
10170
8438
|
{
|
|
10171
8439
|
name,
|
|
@@ -10186,7 +8454,7 @@ var CNPJFormField = ({
|
|
|
10186
8454
|
};
|
|
10187
8455
|
|
|
10188
8456
|
// src/components/FormFields/BirthDateFormField.tsx
|
|
10189
|
-
import { jsx as
|
|
8457
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
10190
8458
|
var isValidDate = (day, month, year) => {
|
|
10191
8459
|
const date = new Date(year, month - 1, day);
|
|
10192
8460
|
return date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day;
|
|
@@ -10223,7 +8491,7 @@ var BirthDateFormField = ({
|
|
|
10223
8491
|
language
|
|
10224
8492
|
}) => {
|
|
10225
8493
|
const inputPlaceholder = placeholder || (language === "pt-BR" ? "DD/MM/AAAA" : "MM/DD/YYYY");
|
|
10226
|
-
return /* @__PURE__ */
|
|
8494
|
+
return /* @__PURE__ */ jsx34(
|
|
10227
8495
|
TextFormField,
|
|
10228
8496
|
{
|
|
10229
8497
|
name,
|
|
@@ -10244,7 +8512,7 @@ var BirthDateFormField = ({
|
|
|
10244
8512
|
};
|
|
10245
8513
|
|
|
10246
8514
|
// src/components/FormFields/IdentityDocumentNumberFormField.tsx
|
|
10247
|
-
import { jsx as
|
|
8515
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
10248
8516
|
var IdentityDocumentNumberFormField = ({
|
|
10249
8517
|
name,
|
|
10250
8518
|
label,
|
|
@@ -10252,7 +8520,7 @@ var IdentityDocumentNumberFormField = ({
|
|
|
10252
8520
|
placeholder,
|
|
10253
8521
|
validationErrorMessage
|
|
10254
8522
|
}) => {
|
|
10255
|
-
return /* @__PURE__ */
|
|
8523
|
+
return /* @__PURE__ */ jsx35(
|
|
10256
8524
|
TextFormField,
|
|
10257
8525
|
{
|
|
10258
8526
|
name,
|
|
@@ -10286,7 +8554,7 @@ function getNestedValue(obj, path) {
|
|
|
10286
8554
|
}
|
|
10287
8555
|
|
|
10288
8556
|
// src/components/FormFields/SelectFormField.tsx
|
|
10289
|
-
import { jsx as
|
|
8557
|
+
import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
10290
8558
|
var SelectFormField = ({
|
|
10291
8559
|
name,
|
|
10292
8560
|
label,
|
|
@@ -10307,8 +8575,8 @@ var SelectFormField = ({
|
|
|
10307
8575
|
const validationRules = __spreadValues({
|
|
10308
8576
|
required: required ? validationErrorMessage : false
|
|
10309
8577
|
}, validation);
|
|
10310
|
-
return /* @__PURE__ */
|
|
10311
|
-
/* @__PURE__ */
|
|
8578
|
+
return /* @__PURE__ */ jsxs19(Flex, { direction: "column", children: [
|
|
8579
|
+
/* @__PURE__ */ jsx36(
|
|
10312
8580
|
FormLabel,
|
|
10313
8581
|
{
|
|
10314
8582
|
name,
|
|
@@ -10317,7 +8585,7 @@ var SelectFormField = ({
|
|
|
10317
8585
|
haveError
|
|
10318
8586
|
}
|
|
10319
8587
|
),
|
|
10320
|
-
/* @__PURE__ */
|
|
8588
|
+
/* @__PURE__ */ jsx36(
|
|
10321
8589
|
Controller,
|
|
10322
8590
|
{
|
|
10323
8591
|
control,
|
|
@@ -10326,14 +8594,14 @@ var SelectFormField = ({
|
|
|
10326
8594
|
defaultValue: defaultValue || "",
|
|
10327
8595
|
render: ({ field: { value, onChange } }) => {
|
|
10328
8596
|
const selectedOption = options.find((opt) => opt.value === value);
|
|
10329
|
-
return /* @__PURE__ */
|
|
8597
|
+
return /* @__PURE__ */ jsx36(
|
|
10330
8598
|
DropdownMenu2,
|
|
10331
8599
|
{
|
|
10332
8600
|
placeholder: (selectedOption == null ? void 0 : selectedOption.label) || placeholder,
|
|
10333
8601
|
fontWeight: "regular",
|
|
10334
8602
|
typography: "labelLarge",
|
|
10335
8603
|
color: haveError ? "error" : "default",
|
|
10336
|
-
children: options.map((option, index) => /* @__PURE__ */
|
|
8604
|
+
children: options.map((option, index) => /* @__PURE__ */ jsx36(
|
|
10337
8605
|
DropdownMenuItem,
|
|
10338
8606
|
{
|
|
10339
8607
|
value: option.value,
|
|
@@ -10349,7 +8617,7 @@ var SelectFormField = ({
|
|
|
10349
8617
|
}
|
|
10350
8618
|
}
|
|
10351
8619
|
),
|
|
10352
|
-
/* @__PURE__ */
|
|
8620
|
+
/* @__PURE__ */ jsx36(ErrorFormMessage, { message: errorMsg })
|
|
10353
8621
|
] });
|
|
10354
8622
|
};
|
|
10355
8623
|
|
|
@@ -10382,7 +8650,7 @@ function useCountries(language = "pt-BR") {
|
|
|
10382
8650
|
}
|
|
10383
8651
|
|
|
10384
8652
|
// src/components/FormFields/AddressFormFields/CountryFormField.tsx
|
|
10385
|
-
import { jsx as
|
|
8653
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
10386
8654
|
function CountryFormField({
|
|
10387
8655
|
name,
|
|
10388
8656
|
label,
|
|
@@ -10390,7 +8658,7 @@ function CountryFormField({
|
|
|
10390
8658
|
language = "pt-BR"
|
|
10391
8659
|
}) {
|
|
10392
8660
|
const countries2 = useCountries(language);
|
|
10393
|
-
return /* @__PURE__ */
|
|
8661
|
+
return /* @__PURE__ */ jsx37(Flex, { direction: "column", children: /* @__PURE__ */ jsx37(
|
|
10394
8662
|
SelectFormField,
|
|
10395
8663
|
{
|
|
10396
8664
|
label,
|
|
@@ -10403,7 +8671,7 @@ function CountryFormField({
|
|
|
10403
8671
|
}
|
|
10404
8672
|
|
|
10405
8673
|
// src/components/FormFields/AddressFormFields/PostalCodeFormField.tsx
|
|
10406
|
-
import { jsx as
|
|
8674
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
10407
8675
|
var PostalCodeFormField = ({
|
|
10408
8676
|
name,
|
|
10409
8677
|
label,
|
|
@@ -10412,7 +8680,7 @@ var PostalCodeFormField = ({
|
|
|
10412
8680
|
validationErrorMessage,
|
|
10413
8681
|
onChange
|
|
10414
8682
|
}) => {
|
|
10415
|
-
return /* @__PURE__ */
|
|
8683
|
+
return /* @__PURE__ */ jsx38(
|
|
10416
8684
|
TextFormField,
|
|
10417
8685
|
{
|
|
10418
8686
|
name,
|
|
@@ -10465,14 +8733,14 @@ var brazilianStates = [
|
|
|
10465
8733
|
];
|
|
10466
8734
|
|
|
10467
8735
|
// src/components/FormFields/AddressFormFields/StateFormField.tsx
|
|
10468
|
-
import { Fragment as Fragment3, jsx as
|
|
8736
|
+
import { Fragment as Fragment3, jsx as jsx39 } from "react/jsx-runtime";
|
|
10469
8737
|
function StateFormField({
|
|
10470
8738
|
name,
|
|
10471
8739
|
label,
|
|
10472
8740
|
required,
|
|
10473
8741
|
isBrazil
|
|
10474
8742
|
}) {
|
|
10475
|
-
return /* @__PURE__ */
|
|
8743
|
+
return /* @__PURE__ */ jsx39(Fragment3, { children: isBrazil ? /* @__PURE__ */ jsx39(
|
|
10476
8744
|
SelectFormField,
|
|
10477
8745
|
{
|
|
10478
8746
|
name,
|
|
@@ -10480,13 +8748,13 @@ function StateFormField({
|
|
|
10480
8748
|
required,
|
|
10481
8749
|
label
|
|
10482
8750
|
}
|
|
10483
|
-
) : /* @__PURE__ */
|
|
8751
|
+
) : /* @__PURE__ */ jsx39(TextFormField, { name, required, label }) });
|
|
10484
8752
|
}
|
|
10485
8753
|
|
|
10486
8754
|
// src/components/FormFields/AddressFormFields/CityFormField.tsx
|
|
10487
|
-
import { useEffect as
|
|
8755
|
+
import { useEffect as useEffect5, useState as useState6 } from "react";
|
|
10488
8756
|
import { useFormContext as useFormContext6, Controller as Controller2 } from "react-hook-form";
|
|
10489
|
-
import { Fragment as Fragment4, jsx as
|
|
8757
|
+
import { Fragment as Fragment4, jsx as jsx40 } from "react/jsx-runtime";
|
|
10490
8758
|
function CityFormField({
|
|
10491
8759
|
name,
|
|
10492
8760
|
label,
|
|
@@ -10497,9 +8765,9 @@ function CityFormField({
|
|
|
10497
8765
|
}) {
|
|
10498
8766
|
const { control, watch } = useFormContext6();
|
|
10499
8767
|
const selectedState = watch(stateName);
|
|
10500
|
-
const [cities, setCities] =
|
|
10501
|
-
const [loading, setLoading] =
|
|
10502
|
-
|
|
8768
|
+
const [cities, setCities] = useState6([]);
|
|
8769
|
+
const [loading, setLoading] = useState6(false);
|
|
8770
|
+
useEffect5(() => {
|
|
10503
8771
|
if (!isBrazil) {
|
|
10504
8772
|
setCities([]);
|
|
10505
8773
|
return;
|
|
@@ -10538,13 +8806,13 @@ function CityFormField({
|
|
|
10538
8806
|
}
|
|
10539
8807
|
fetchCities();
|
|
10540
8808
|
}, [selectedState, isBrazil]);
|
|
10541
|
-
return /* @__PURE__ */
|
|
8809
|
+
return /* @__PURE__ */ jsx40(Fragment4, { children: isBrazil && cities.length > 0 ? /* @__PURE__ */ jsx40(
|
|
10542
8810
|
Controller2,
|
|
10543
8811
|
{
|
|
10544
8812
|
name,
|
|
10545
8813
|
control,
|
|
10546
8814
|
rules: { required },
|
|
10547
|
-
render: ({ field }) => /* @__PURE__ */
|
|
8815
|
+
render: ({ field }) => /* @__PURE__ */ jsx40(
|
|
10548
8816
|
SelectFormField,
|
|
10549
8817
|
__spreadProps(__spreadValues({
|
|
10550
8818
|
label,
|
|
@@ -10558,7 +8826,7 @@ function CityFormField({
|
|
|
10558
8826
|
})
|
|
10559
8827
|
)
|
|
10560
8828
|
}
|
|
10561
|
-
) : /* @__PURE__ */
|
|
8829
|
+
) : /* @__PURE__ */ jsx40(
|
|
10562
8830
|
TextFormField,
|
|
10563
8831
|
{
|
|
10564
8832
|
name,
|
|
@@ -10570,7 +8838,7 @@ function CityFormField({
|
|
|
10570
8838
|
}
|
|
10571
8839
|
|
|
10572
8840
|
// src/components/FormFields/AddressFormFields/index.tsx
|
|
10573
|
-
import { jsx as
|
|
8841
|
+
import { jsx as jsx41, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
10574
8842
|
function getNestedValue2(obj, path) {
|
|
10575
8843
|
return path.split(".").reduce((acc, key) => acc == null ? void 0 : acc[key], obj);
|
|
10576
8844
|
}
|
|
@@ -10620,8 +8888,8 @@ function AddressFormFields({
|
|
|
10620
8888
|
console.error("Erro ao buscar CEP");
|
|
10621
8889
|
});
|
|
10622
8890
|
};
|
|
10623
|
-
return /* @__PURE__ */
|
|
10624
|
-
/* @__PURE__ */
|
|
8891
|
+
return /* @__PURE__ */ jsxs20(AddressContainerStyled, { layout, children: [
|
|
8892
|
+
/* @__PURE__ */ jsx41(
|
|
10625
8893
|
FormLabel,
|
|
10626
8894
|
{
|
|
10627
8895
|
name,
|
|
@@ -10630,7 +8898,7 @@ function AddressFormFields({
|
|
|
10630
8898
|
haveError
|
|
10631
8899
|
}
|
|
10632
8900
|
),
|
|
10633
|
-
/* @__PURE__ */
|
|
8901
|
+
/* @__PURE__ */ jsx41(
|
|
10634
8902
|
CountryFormField,
|
|
10635
8903
|
{
|
|
10636
8904
|
name: `${name}.country`,
|
|
@@ -10639,7 +8907,7 @@ function AddressFormFields({
|
|
|
10639
8907
|
language: "pt-BR"
|
|
10640
8908
|
}
|
|
10641
8909
|
),
|
|
10642
|
-
isBrazil ? /* @__PURE__ */
|
|
8910
|
+
isBrazil ? /* @__PURE__ */ jsx41(
|
|
10643
8911
|
PostalCodeFormField,
|
|
10644
8912
|
{
|
|
10645
8913
|
name: `${name}.zip_code`,
|
|
@@ -10649,7 +8917,7 @@ function AddressFormFields({
|
|
|
10649
8917
|
validationErrorMessage: "CEP inv\xE1lido",
|
|
10650
8918
|
onChange: handleCEPChange
|
|
10651
8919
|
}
|
|
10652
|
-
) : /* @__PURE__ */
|
|
8920
|
+
) : /* @__PURE__ */ jsx41(
|
|
10653
8921
|
TextFormField,
|
|
10654
8922
|
{
|
|
10655
8923
|
name: `${name}.zip_code`,
|
|
@@ -10657,7 +8925,7 @@ function AddressFormFields({
|
|
|
10657
8925
|
required
|
|
10658
8926
|
}
|
|
10659
8927
|
),
|
|
10660
|
-
/* @__PURE__ */
|
|
8928
|
+
/* @__PURE__ */ jsx41(
|
|
10661
8929
|
StateFormField,
|
|
10662
8930
|
{
|
|
10663
8931
|
name: `${name}.state`,
|
|
@@ -10666,7 +8934,7 @@ function AddressFormFields({
|
|
|
10666
8934
|
isBrazil
|
|
10667
8935
|
}
|
|
10668
8936
|
),
|
|
10669
|
-
/* @__PURE__ */
|
|
8937
|
+
/* @__PURE__ */ jsx41(
|
|
10670
8938
|
CityFormField,
|
|
10671
8939
|
{
|
|
10672
8940
|
name: `${name}.city`,
|
|
@@ -10676,8 +8944,8 @@ function AddressFormFields({
|
|
|
10676
8944
|
isBrazil
|
|
10677
8945
|
}
|
|
10678
8946
|
),
|
|
10679
|
-
/* @__PURE__ */
|
|
10680
|
-
/* @__PURE__ */
|
|
8947
|
+
/* @__PURE__ */ jsx41(TextFormField, { name: `${name}.street`, label: "Rua", required }),
|
|
8948
|
+
/* @__PURE__ */ jsx41(
|
|
10681
8949
|
TextFormField,
|
|
10682
8950
|
{
|
|
10683
8951
|
name: `${name}.number`,
|
|
@@ -10685,7 +8953,7 @@ function AddressFormFields({
|
|
|
10685
8953
|
required
|
|
10686
8954
|
}
|
|
10687
8955
|
),
|
|
10688
|
-
/* @__PURE__ */
|
|
8956
|
+
/* @__PURE__ */ jsx41(
|
|
10689
8957
|
TextFormField,
|
|
10690
8958
|
{
|
|
10691
8959
|
name: `${name}.neighborhood`,
|
|
@@ -10693,13 +8961,13 @@ function AddressFormFields({
|
|
|
10693
8961
|
required
|
|
10694
8962
|
}
|
|
10695
8963
|
),
|
|
10696
|
-
/* @__PURE__ */
|
|
8964
|
+
/* @__PURE__ */ jsx41(TextFormField, { name: `${name}.complement`, label: "Complemento" })
|
|
10697
8965
|
] });
|
|
10698
8966
|
}
|
|
10699
8967
|
|
|
10700
8968
|
// src/components/FormFields/RadioGroupFormField.tsx
|
|
10701
8969
|
import { Controller as Controller3, useFormContext as useFormContext8 } from "react-hook-form";
|
|
10702
|
-
import { jsx as
|
|
8970
|
+
import { jsx as jsx42, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
10703
8971
|
var RadioGroupFormField = ({
|
|
10704
8972
|
name,
|
|
10705
8973
|
label,
|
|
@@ -10721,8 +8989,8 @@ var RadioGroupFormField = ({
|
|
|
10721
8989
|
const validationRules = {
|
|
10722
8990
|
required: required ? validationErrorMessage : false
|
|
10723
8991
|
};
|
|
10724
|
-
return /* @__PURE__ */
|
|
10725
|
-
/* @__PURE__ */
|
|
8992
|
+
return /* @__PURE__ */ jsxs21(Flex, { direction: "column", children: [
|
|
8993
|
+
/* @__PURE__ */ jsx42(
|
|
10726
8994
|
FormLabel,
|
|
10727
8995
|
{
|
|
10728
8996
|
name,
|
|
@@ -10731,14 +8999,14 @@ var RadioGroupFormField = ({
|
|
|
10731
8999
|
haveError
|
|
10732
9000
|
}
|
|
10733
9001
|
),
|
|
10734
|
-
/* @__PURE__ */
|
|
9002
|
+
/* @__PURE__ */ jsx42(
|
|
10735
9003
|
Controller3,
|
|
10736
9004
|
{
|
|
10737
9005
|
name,
|
|
10738
9006
|
control,
|
|
10739
9007
|
defaultValue: defaultValue || "",
|
|
10740
9008
|
rules: validationRules,
|
|
10741
|
-
render: ({ field: { value, onChange } }) => /* @__PURE__ */
|
|
9009
|
+
render: ({ field: { value, onChange } }) => /* @__PURE__ */ jsx42(
|
|
10742
9010
|
RadioGroup,
|
|
10743
9011
|
{
|
|
10744
9012
|
value,
|
|
@@ -10746,21 +9014,21 @@ var RadioGroupFormField = ({
|
|
|
10746
9014
|
color: haveError ? "error" : color,
|
|
10747
9015
|
fontWeight,
|
|
10748
9016
|
disabled,
|
|
10749
|
-
children: options.map((option) => /* @__PURE__ */
|
|
10750
|
-
/* @__PURE__ */
|
|
9017
|
+
children: options.map((option) => /* @__PURE__ */ jsxs21("label", { children: [
|
|
9018
|
+
/* @__PURE__ */ jsx42(RadioItem, { value: option.value }),
|
|
10751
9019
|
option.label
|
|
10752
9020
|
] }, option.value))
|
|
10753
9021
|
}
|
|
10754
9022
|
)
|
|
10755
9023
|
}
|
|
10756
9024
|
),
|
|
10757
|
-
/* @__PURE__ */
|
|
9025
|
+
/* @__PURE__ */ jsx42(ErrorFormMessage, { message: errorMsg })
|
|
10758
9026
|
] });
|
|
10759
9027
|
};
|
|
10760
9028
|
|
|
10761
9029
|
// src/components/FormFields/CheckboxGroupFormField.tsx
|
|
10762
9030
|
import { Controller as Controller4, useFormContext as useFormContext9 } from "react-hook-form";
|
|
10763
|
-
import { jsx as
|
|
9031
|
+
import { jsx as jsx43, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
10764
9032
|
var CheckboxGroupFormField = ({
|
|
10765
9033
|
name,
|
|
10766
9034
|
label,
|
|
@@ -10783,8 +9051,8 @@ var CheckboxGroupFormField = ({
|
|
|
10783
9051
|
required: required ? validationErrorMessage : false,
|
|
10784
9052
|
validate: required ? (value) => (value == null ? void 0 : value.length) > 0 || validationErrorMessage : void 0
|
|
10785
9053
|
};
|
|
10786
|
-
return /* @__PURE__ */
|
|
10787
|
-
/* @__PURE__ */
|
|
9054
|
+
return /* @__PURE__ */ jsxs22(Flex, { direction: "column", children: [
|
|
9055
|
+
/* @__PURE__ */ jsx43(
|
|
10788
9056
|
FormLabel,
|
|
10789
9057
|
{
|
|
10790
9058
|
name,
|
|
@@ -10793,14 +9061,14 @@ var CheckboxGroupFormField = ({
|
|
|
10793
9061
|
haveError
|
|
10794
9062
|
}
|
|
10795
9063
|
),
|
|
10796
|
-
/* @__PURE__ */
|
|
9064
|
+
/* @__PURE__ */ jsx43(
|
|
10797
9065
|
Controller4,
|
|
10798
9066
|
{
|
|
10799
9067
|
name,
|
|
10800
9068
|
control,
|
|
10801
9069
|
rules: validationRules,
|
|
10802
9070
|
defaultValue,
|
|
10803
|
-
render: ({ field }) => /* @__PURE__ */
|
|
9071
|
+
render: ({ field }) => /* @__PURE__ */ jsx43(
|
|
10804
9072
|
CheckboxGroup,
|
|
10805
9073
|
{
|
|
10806
9074
|
name,
|
|
@@ -10809,7 +9077,7 @@ var CheckboxGroupFormField = ({
|
|
|
10809
9077
|
color: haveError ? "error" : color,
|
|
10810
9078
|
fontWeight,
|
|
10811
9079
|
disabled,
|
|
10812
|
-
children: options.map((option) => /* @__PURE__ */
|
|
9080
|
+
children: options.map((option) => /* @__PURE__ */ jsx43(
|
|
10813
9081
|
CheckboxItem,
|
|
10814
9082
|
{
|
|
10815
9083
|
value: option.value,
|
|
@@ -10822,19 +9090,19 @@ var CheckboxGroupFormField = ({
|
|
|
10822
9090
|
)
|
|
10823
9091
|
}
|
|
10824
9092
|
),
|
|
10825
|
-
/* @__PURE__ */
|
|
9093
|
+
/* @__PURE__ */ jsx43(ErrorFormMessage, { message: errorMsg })
|
|
10826
9094
|
] });
|
|
10827
9095
|
};
|
|
10828
9096
|
|
|
10829
9097
|
// src/components/FormFields/EmailFormField.tsx
|
|
10830
|
-
import { jsx as
|
|
9098
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
10831
9099
|
var EmailFormField = ({
|
|
10832
9100
|
name,
|
|
10833
9101
|
label,
|
|
10834
9102
|
required,
|
|
10835
9103
|
placeholder
|
|
10836
9104
|
}) => {
|
|
10837
|
-
return /* @__PURE__ */
|
|
9105
|
+
return /* @__PURE__ */ jsx44(
|
|
10838
9106
|
TextFormField,
|
|
10839
9107
|
{
|
|
10840
9108
|
name,
|
|
@@ -10850,576 +9118,22 @@ var EmailFormField = ({
|
|
|
10850
9118
|
// src/components/FormFields/RichEditorFormField.tsx
|
|
10851
9119
|
import { useController as useController3 } from "react-hook-form";
|
|
10852
9120
|
|
|
10853
|
-
// src/components/RichEditor/QuillComponent.tsx
|
|
10854
|
-
import { useState as useState8, useRef as useRef8, useEffect as useEffect5, useCallback as useCallback4 } from "react";
|
|
10855
|
-
import { useQuill } from "react-quilljs";
|
|
10856
|
-
|
|
10857
|
-
// src/utils/uploadService.ts
|
|
10858
|
-
var generateUniqueFilename = (originalName) => {
|
|
10859
|
-
const timestamp = Date.now().toString(36);
|
|
10860
|
-
const random = Math.random().toString(36).substring(2, 8);
|
|
10861
|
-
const extension = originalName.split(".").pop();
|
|
10862
|
-
return `${timestamp}_${random}.${extension}`;
|
|
10863
|
-
};
|
|
10864
|
-
var UploadService = class {
|
|
10865
|
-
static getPresignedUrl(filename, contentType, config2) {
|
|
10866
|
-
return __async(this, null, function* () {
|
|
10867
|
-
var _a;
|
|
10868
|
-
const apiUrl = config2.apiUrl;
|
|
10869
|
-
const presignedUrlEndpoint = (_a = config2.endpoints) == null ? void 0 : _a.presignedUrl;
|
|
10870
|
-
const bucket = config2.s3Bucket;
|
|
10871
|
-
try {
|
|
10872
|
-
const response = yield fetch(`${apiUrl}${presignedUrlEndpoint}`, {
|
|
10873
|
-
method: "POST",
|
|
10874
|
-
headers: {
|
|
10875
|
-
"Content-Type": "application/json"
|
|
10876
|
-
},
|
|
10877
|
-
body: JSON.stringify({
|
|
10878
|
-
filename,
|
|
10879
|
-
contentType,
|
|
10880
|
-
bucket
|
|
10881
|
-
})
|
|
10882
|
-
});
|
|
10883
|
-
if (!response.ok) {
|
|
10884
|
-
throw new Error("Falha ao gerar URL de upload");
|
|
10885
|
-
}
|
|
10886
|
-
const data = yield response.json();
|
|
10887
|
-
return data.presignedUrl;
|
|
10888
|
-
} catch (error) {
|
|
10889
|
-
console.error("Erro ao gerar URL pr\xE9-assinada:", error);
|
|
10890
|
-
throw new Error("Falha ao gerar URL de upload");
|
|
10891
|
-
}
|
|
10892
|
-
});
|
|
10893
|
-
}
|
|
10894
|
-
static uploadToS3(file, config2, onProgress) {
|
|
10895
|
-
return __async(this, null, function* () {
|
|
10896
|
-
try {
|
|
10897
|
-
const uniqueFilename = generateUniqueFilename(file.name);
|
|
10898
|
-
const blob = new Blob([file], { type: file.type });
|
|
10899
|
-
const s3Url = `${config2.s3Url}/${uniqueFilename}`;
|
|
10900
|
-
return new Promise((resolve, reject) => {
|
|
10901
|
-
const xhr = new XMLHttpRequest();
|
|
10902
|
-
xhr.upload.addEventListener("progress", (event) => {
|
|
10903
|
-
if (event.lengthComputable) {
|
|
10904
|
-
const percentComplete = Math.round(
|
|
10905
|
-
event.loaded / event.total * 100
|
|
10906
|
-
);
|
|
10907
|
-
onProgress == null ? void 0 : onProgress({
|
|
10908
|
-
amount: percentComplete,
|
|
10909
|
-
message: `Fazendo upload... ${percentComplete}%`
|
|
10910
|
-
});
|
|
10911
|
-
}
|
|
10912
|
-
});
|
|
10913
|
-
xhr.addEventListener("load", () => {
|
|
10914
|
-
if (xhr.status === 200) {
|
|
10915
|
-
resolve({
|
|
10916
|
-
url: s3Url,
|
|
10917
|
-
filename: uniqueFilename,
|
|
10918
|
-
size: file.size,
|
|
10919
|
-
type: file.type
|
|
10920
|
-
});
|
|
10921
|
-
} else {
|
|
10922
|
-
reject(new Error(`Upload falhou com status: ${xhr.status}`));
|
|
10923
|
-
}
|
|
10924
|
-
});
|
|
10925
|
-
xhr.addEventListener("error", () => {
|
|
10926
|
-
reject(new Error("Erro de rede durante upload"));
|
|
10927
|
-
});
|
|
10928
|
-
xhr.open("PUT", s3Url);
|
|
10929
|
-
xhr.setRequestHeader("Content-Type", file.type);
|
|
10930
|
-
xhr.send(blob);
|
|
10931
|
-
});
|
|
10932
|
-
} catch (error) {
|
|
10933
|
-
console.error("Erro no upload:", error);
|
|
10934
|
-
throw error;
|
|
10935
|
-
}
|
|
10936
|
-
});
|
|
10937
|
-
}
|
|
10938
|
-
static uploadViaAPI(file, config2, onProgress) {
|
|
10939
|
-
return __async(this, null, function* () {
|
|
10940
|
-
try {
|
|
10941
|
-
const formData = new FormData();
|
|
10942
|
-
formData.append("file", file);
|
|
10943
|
-
const bucket = config2.s3Bucket;
|
|
10944
|
-
formData.append("bucket", bucket);
|
|
10945
|
-
const xhr = new XMLHttpRequest();
|
|
10946
|
-
return new Promise((resolve, reject) => {
|
|
10947
|
-
var _a;
|
|
10948
|
-
xhr.upload.addEventListener("progress", (event) => {
|
|
10949
|
-
if (event.lengthComputable) {
|
|
10950
|
-
const percentComplete = Math.round(
|
|
10951
|
-
event.loaded / event.total * 100
|
|
10952
|
-
);
|
|
10953
|
-
onProgress == null ? void 0 : onProgress({
|
|
10954
|
-
amount: percentComplete,
|
|
10955
|
-
message: `Fazendo upload... ${percentComplete}%`
|
|
10956
|
-
});
|
|
10957
|
-
}
|
|
10958
|
-
});
|
|
10959
|
-
xhr.addEventListener("load", () => {
|
|
10960
|
-
if (xhr.status === 200) {
|
|
10961
|
-
try {
|
|
10962
|
-
const response = JSON.parse(xhr.responseText);
|
|
10963
|
-
resolve({
|
|
10964
|
-
url: response.url,
|
|
10965
|
-
filename: response.filename,
|
|
10966
|
-
size: file.size,
|
|
10967
|
-
type: file.type
|
|
10968
|
-
});
|
|
10969
|
-
} catch (error) {
|
|
10970
|
-
reject(new Error("Resposta inv\xE1lida do servidor"));
|
|
10971
|
-
}
|
|
10972
|
-
} else {
|
|
10973
|
-
reject(new Error(`Upload falhou com status: ${xhr.status}`));
|
|
10974
|
-
}
|
|
10975
|
-
});
|
|
10976
|
-
xhr.addEventListener("error", () => {
|
|
10977
|
-
reject(new Error("Erro de rede durante upload"));
|
|
10978
|
-
});
|
|
10979
|
-
const apiUrl = config2.apiUrl;
|
|
10980
|
-
const uploadEndpoint = (_a = config2.endpoints) == null ? void 0 : _a.upload;
|
|
10981
|
-
xhr.open("POST", `${apiUrl}${uploadEndpoint}`);
|
|
10982
|
-
xhr.send(formData);
|
|
10983
|
-
});
|
|
10984
|
-
} catch (error) {
|
|
10985
|
-
console.error("Erro no upload via API:", error);
|
|
10986
|
-
throw error;
|
|
10987
|
-
}
|
|
10988
|
-
});
|
|
10989
|
-
}
|
|
10990
|
-
};
|
|
10991
|
-
|
|
10992
|
-
// src/components/RichEditor/styledComponents.ts
|
|
10993
|
-
var QuillContainer = styled("div", {
|
|
10994
|
-
display: "flex",
|
|
10995
|
-
flexDirection: "column"
|
|
10996
|
-
});
|
|
10997
|
-
var QuillEditor = styled("div", {
|
|
10998
|
-
"& .ql-editor": {
|
|
10999
|
-
minHeight: "200px",
|
|
11000
|
-
padding: "$12",
|
|
11001
|
-
fontSize: "$14",
|
|
11002
|
-
lineHeight: "$base",
|
|
11003
|
-
fontFamily: "$default",
|
|
11004
|
-
color: "$neutral900",
|
|
11005
|
-
backgroundColor: "$white",
|
|
11006
|
-
border: "none",
|
|
11007
|
-
outline: "none",
|
|
11008
|
-
cursor: "text",
|
|
11009
|
-
caretColor: "$primary500",
|
|
11010
|
-
"&:focus": {
|
|
11011
|
-
borderColor: "$primary500",
|
|
11012
|
-
boxShadow: "0 0 0 1px $primary500"
|
|
11013
|
-
},
|
|
11014
|
-
"& p": {
|
|
11015
|
-
margin: "0 0 $8 0"
|
|
11016
|
-
},
|
|
11017
|
-
"& p:last-child": {
|
|
11018
|
-
marginBottom: 0
|
|
11019
|
-
},
|
|
11020
|
-
"& .ql-cursor": {
|
|
11021
|
-
borderLeft: "2px solid $primary500"
|
|
11022
|
-
}
|
|
11023
|
-
},
|
|
11024
|
-
"& .ql-toolbar": {
|
|
11025
|
-
backgroundColor: "$grey100",
|
|
11026
|
-
border: "1px solid $neutral300",
|
|
11027
|
-
borderBottom: "none",
|
|
11028
|
-
borderTopLeftRadius: "$sm",
|
|
11029
|
-
borderTopRightRadius: "$sm",
|
|
11030
|
-
padding: "$8 $12"
|
|
11031
|
-
},
|
|
11032
|
-
"& .ql-container": {
|
|
11033
|
-
border: "1px solid $neutral300",
|
|
11034
|
-
borderTop: "none",
|
|
11035
|
-
borderBottomLeftRadius: "$sm",
|
|
11036
|
-
borderBottomRightRadius: "$sm",
|
|
11037
|
-
fontFamily: "$default"
|
|
11038
|
-
},
|
|
11039
|
-
"& .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='1']::before": {
|
|
11040
|
-
content: "T\xEDtulo 1"
|
|
11041
|
-
},
|
|
11042
|
-
"& .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='2']::before": {
|
|
11043
|
-
content: "T\xEDtulo 2"
|
|
11044
|
-
}
|
|
11045
|
-
});
|
|
11046
|
-
|
|
11047
|
-
// src/components/RichEditor/QuillComponent.tsx
|
|
11048
|
-
import { jsx as jsx50, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
11049
|
-
var QuillComponent = ({
|
|
11050
|
-
value = "",
|
|
11051
|
-
onChange,
|
|
11052
|
-
placeholder = "Digite seu texto aqui...",
|
|
11053
|
-
disabled = false,
|
|
11054
|
-
className,
|
|
11055
|
-
uploadConfig
|
|
11056
|
-
}) => {
|
|
11057
|
-
const [showVideoModal, setShowVideoModal] = useState8(false);
|
|
11058
|
-
const [videoUrl, setVideoUrl] = useState8("");
|
|
11059
|
-
const [showLinkModal, setShowLinkModal] = useState8(false);
|
|
11060
|
-
const [linkUrl, setLinkUrl] = useState8("");
|
|
11061
|
-
const videoModalRef = useRef8(null);
|
|
11062
|
-
const linkModalRef = useRef8(null);
|
|
11063
|
-
const { addToast, removeToast } = useToast();
|
|
11064
|
-
const modules = {
|
|
11065
|
-
toolbar: [
|
|
11066
|
-
[{ header: [1, 2, false] }],
|
|
11067
|
-
["bold", "italic", "underline", "strike"],
|
|
11068
|
-
[{ color: [] }, { background: [] }],
|
|
11069
|
-
[{ align: [] }],
|
|
11070
|
-
[{ list: "ordered" }, { list: "bullet" }],
|
|
11071
|
-
["link", "image", "video"]
|
|
11072
|
-
],
|
|
11073
|
-
clipboard: {
|
|
11074
|
-
matchVisual: false
|
|
11075
|
-
}
|
|
11076
|
-
};
|
|
11077
|
-
const formats = [
|
|
11078
|
-
"header",
|
|
11079
|
-
"bold",
|
|
11080
|
-
"italic",
|
|
11081
|
-
"underline",
|
|
11082
|
-
"strike",
|
|
11083
|
-
"color",
|
|
11084
|
-
"background",
|
|
11085
|
-
"align",
|
|
11086
|
-
"list",
|
|
11087
|
-
"link",
|
|
11088
|
-
"image",
|
|
11089
|
-
"video"
|
|
11090
|
-
];
|
|
11091
|
-
const { quill, quillRef } = useQuill({
|
|
11092
|
-
theme: "snow",
|
|
11093
|
-
modules,
|
|
11094
|
-
formats,
|
|
11095
|
-
placeholder,
|
|
11096
|
-
readOnly: disabled
|
|
11097
|
-
});
|
|
11098
|
-
const handleImageUpload = useCallback4(
|
|
11099
|
-
(file) => __async(null, null, function* () {
|
|
11100
|
-
if (disabled || !quill || !uploadConfig) return;
|
|
11101
|
-
try {
|
|
11102
|
-
addToast({
|
|
11103
|
-
type: "info",
|
|
11104
|
-
message: "Carregando imagem...",
|
|
11105
|
-
duration: 2e3
|
|
11106
|
-
});
|
|
11107
|
-
const uploadedFile = yield UploadService.uploadToS3(file, uploadConfig);
|
|
11108
|
-
removeToast("info");
|
|
11109
|
-
addToast({
|
|
11110
|
-
type: "success",
|
|
11111
|
-
message: "Imagem adicionada com sucesso!"
|
|
11112
|
-
});
|
|
11113
|
-
const selection = quill.getSelection();
|
|
11114
|
-
const index = selection ? selection.index : quill.getLength();
|
|
11115
|
-
quill.insertEmbed(index, "image", uploadedFile.url);
|
|
11116
|
-
quill.setSelection(index + 1, 0);
|
|
11117
|
-
} catch (error) {
|
|
11118
|
-
console.error("Erro no upload:", error);
|
|
11119
|
-
addToast({
|
|
11120
|
-
type: "error",
|
|
11121
|
-
message: "Erro no upload: N\xE3o foi poss\xEDvel enviar a imagem. Tente novamente."
|
|
11122
|
-
});
|
|
11123
|
-
}
|
|
11124
|
-
}),
|
|
11125
|
-
[disabled, quill, addToast, removeToast, uploadConfig]
|
|
11126
|
-
);
|
|
11127
|
-
useEffect5(() => {
|
|
11128
|
-
if (quill && value) {
|
|
11129
|
-
const currentContent = quill.root.innerHTML;
|
|
11130
|
-
if (currentContent !== value) {
|
|
11131
|
-
const selection = quill.getSelection();
|
|
11132
|
-
quill.clipboard.dangerouslyPasteHTML(value);
|
|
11133
|
-
if (selection) {
|
|
11134
|
-
quill.setSelection(selection.index, selection.length);
|
|
11135
|
-
} else {
|
|
11136
|
-
quill.setSelection(quill.getLength(), 0);
|
|
11137
|
-
}
|
|
11138
|
-
}
|
|
11139
|
-
}
|
|
11140
|
-
}, [quill, value]);
|
|
11141
|
-
useEffect5(() => {
|
|
11142
|
-
if (quill) {
|
|
11143
|
-
quill.on("text-change", (delta, oldDelta, source) => {
|
|
11144
|
-
if (source === "user") {
|
|
11145
|
-
const html = quill.root.innerHTML;
|
|
11146
|
-
onChange == null ? void 0 : onChange(html);
|
|
11147
|
-
}
|
|
11148
|
-
});
|
|
11149
|
-
const toolbar = quill.getModule("toolbar");
|
|
11150
|
-
if (toolbar) {
|
|
11151
|
-
toolbar.addHandler("link", () => setShowLinkModal(true));
|
|
11152
|
-
toolbar.addHandler("video", () => setShowVideoModal(true));
|
|
11153
|
-
toolbar.addHandler("image", () => {
|
|
11154
|
-
const input = document.createElement("input");
|
|
11155
|
-
input.setAttribute("type", "file");
|
|
11156
|
-
input.setAttribute("accept", "image/*");
|
|
11157
|
-
input.click();
|
|
11158
|
-
input.onchange = () => __async(null, null, function* () {
|
|
11159
|
-
var _a;
|
|
11160
|
-
const file = (_a = input.files) == null ? void 0 : _a[0];
|
|
11161
|
-
if (file) {
|
|
11162
|
-
yield handleImageUpload(file);
|
|
11163
|
-
}
|
|
11164
|
-
});
|
|
11165
|
-
});
|
|
11166
|
-
}
|
|
11167
|
-
setTimeout(() => {
|
|
11168
|
-
var _a, _b;
|
|
11169
|
-
const toolbarElement = (_b = (_a = quillRef.current) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
|
|
11170
|
-
if (toolbarElement) {
|
|
11171
|
-
const headerSelect = toolbarElement.querySelector(
|
|
11172
|
-
"select[data-value]"
|
|
11173
|
-
);
|
|
11174
|
-
if (headerSelect) {
|
|
11175
|
-
const options = headerSelect.querySelectorAll("option");
|
|
11176
|
-
options.forEach((option) => {
|
|
11177
|
-
if (option.value === "1") {
|
|
11178
|
-
option.textContent = "T\xEDtulo 1";
|
|
11179
|
-
} else if (option.value === "2") {
|
|
11180
|
-
option.textContent = "T\xEDtulo 2";
|
|
11181
|
-
} else if (option.value === "") {
|
|
11182
|
-
option.textContent = "Normal";
|
|
11183
|
-
}
|
|
11184
|
-
});
|
|
11185
|
-
}
|
|
11186
|
-
}
|
|
11187
|
-
}, 2e3);
|
|
11188
|
-
}
|
|
11189
|
-
}, [quill, onChange, handleImageUpload]);
|
|
11190
|
-
useEffect5(() => {
|
|
11191
|
-
if (quill) {
|
|
11192
|
-
quill.enable(!disabled);
|
|
11193
|
-
if (!disabled) {
|
|
11194
|
-
if (quill.getLength() <= 1) {
|
|
11195
|
-
quill.focus();
|
|
11196
|
-
quill.setSelection(0, 0);
|
|
11197
|
-
}
|
|
11198
|
-
}
|
|
11199
|
-
}
|
|
11200
|
-
}, [quill, disabled]);
|
|
11201
|
-
const handleLinkCancel = useCallback4(() => {
|
|
11202
|
-
setLinkUrl("");
|
|
11203
|
-
setShowLinkModal(false);
|
|
11204
|
-
}, []);
|
|
11205
|
-
const handleLinkSubmit = useCallback4(() => {
|
|
11206
|
-
if (!linkUrl.trim() || !quill) return;
|
|
11207
|
-
const url = linkUrl.trim();
|
|
11208
|
-
const selection = quill.getSelection();
|
|
11209
|
-
if (selection && selection.length > 0) {
|
|
11210
|
-
quill.format("link", url);
|
|
11211
|
-
} else {
|
|
11212
|
-
const index = quill.getLength();
|
|
11213
|
-
quill.insertText(index, url, "link", url);
|
|
11214
|
-
quill.setSelection(index + url.length, 0);
|
|
11215
|
-
}
|
|
11216
|
-
setLinkUrl("");
|
|
11217
|
-
setShowLinkModal(false);
|
|
11218
|
-
}, [linkUrl, quill]);
|
|
11219
|
-
const handleVideoCancel = useCallback4(() => {
|
|
11220
|
-
setVideoUrl("");
|
|
11221
|
-
setShowVideoModal(false);
|
|
11222
|
-
}, []);
|
|
11223
|
-
const handleVideoSubmit = useCallback4(() => {
|
|
11224
|
-
var _a, _b;
|
|
11225
|
-
if (!videoUrl.trim() || !quill) return;
|
|
11226
|
-
let processedUrl = videoUrl.trim();
|
|
11227
|
-
if (processedUrl.includes("youtube.com/watch")) {
|
|
11228
|
-
const videoId = (_a = processedUrl.match(/[?&]v=([^&]+)/)) == null ? void 0 : _a[1];
|
|
11229
|
-
if (videoId) {
|
|
11230
|
-
processedUrl = `https://www.youtube.com/embed/${videoId}`;
|
|
11231
|
-
}
|
|
11232
|
-
} else if (processedUrl.includes("youtu.be/")) {
|
|
11233
|
-
const videoId = (_b = processedUrl.split("youtu.be/")[1]) == null ? void 0 : _b.split("?")[0];
|
|
11234
|
-
if (videoId) {
|
|
11235
|
-
processedUrl = `https://www.youtube.com/embed/${videoId}`;
|
|
11236
|
-
}
|
|
11237
|
-
}
|
|
11238
|
-
const videoHTML = `
|
|
11239
|
-
<iframe
|
|
11240
|
-
src="${processedUrl}"
|
|
11241
|
-
style="max-width:100%; height:315px; border:0;"
|
|
11242
|
-
title="Video player"
|
|
11243
|
-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
|
11244
|
-
allowfullscreen>
|
|
11245
|
-
</iframe>
|
|
11246
|
-
<br/>
|
|
11247
|
-
`;
|
|
11248
|
-
const selection = quill.getSelection();
|
|
11249
|
-
const insertIndex = selection ? selection.index : quill.getLength();
|
|
11250
|
-
quill.clipboard.dangerouslyPasteHTML(insertIndex, videoHTML);
|
|
11251
|
-
quill.setSelection(insertIndex + 1, 0);
|
|
11252
|
-
setVideoUrl("");
|
|
11253
|
-
setShowVideoModal(false);
|
|
11254
|
-
}, [videoUrl, quill]);
|
|
11255
|
-
useEffect5(() => {
|
|
11256
|
-
const handleClickOutside = (event) => {
|
|
11257
|
-
if (showVideoModal && videoModalRef.current && !videoModalRef.current.contains(event.target)) {
|
|
11258
|
-
handleVideoCancel();
|
|
11259
|
-
}
|
|
11260
|
-
if (showLinkModal && linkModalRef.current && !linkModalRef.current.contains(event.target)) {
|
|
11261
|
-
handleLinkCancel();
|
|
11262
|
-
}
|
|
11263
|
-
};
|
|
11264
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
11265
|
-
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
11266
|
-
}, [showVideoModal, showLinkModal, handleVideoCancel, handleLinkCancel]);
|
|
11267
|
-
return /* @__PURE__ */ jsx50(QuillContainer, { className, children: /* @__PURE__ */ jsxs25(QuillEditor, { style: { position: "relative" }, children: [
|
|
11268
|
-
/* @__PURE__ */ jsx50("div", { ref: quillRef }),
|
|
11269
|
-
showVideoModal && /* @__PURE__ */ jsx50(
|
|
11270
|
-
"div",
|
|
11271
|
-
{
|
|
11272
|
-
ref: videoModalRef,
|
|
11273
|
-
style: {
|
|
11274
|
-
position: "absolute",
|
|
11275
|
-
top: "20px",
|
|
11276
|
-
left: "20px",
|
|
11277
|
-
right: "20px",
|
|
11278
|
-
backgroundColor: "white",
|
|
11279
|
-
border: "1px solid #e0e0e0",
|
|
11280
|
-
borderRadius: "4px",
|
|
11281
|
-
padding: "12px",
|
|
11282
|
-
boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
|
|
11283
|
-
zIndex: 1e3,
|
|
11284
|
-
width: "fit-content"
|
|
11285
|
-
},
|
|
11286
|
-
children: /* @__PURE__ */ jsxs25(Flex2, { gap: 8, align: "center", children: [
|
|
11287
|
-
/* @__PURE__ */ jsx50(
|
|
11288
|
-
Text,
|
|
11289
|
-
{
|
|
11290
|
-
style: { fontSize: "14px", fontWeight: "500", color: "#333" },
|
|
11291
|
-
children: "V\xEDdeo:"
|
|
11292
|
-
}
|
|
11293
|
-
),
|
|
11294
|
-
/* @__PURE__ */ jsx50(
|
|
11295
|
-
"input",
|
|
11296
|
-
{
|
|
11297
|
-
type: "text",
|
|
11298
|
-
value: videoUrl,
|
|
11299
|
-
onChange: (e) => setVideoUrl(e.target.value),
|
|
11300
|
-
placeholder: "Embed URL",
|
|
11301
|
-
style: {
|
|
11302
|
-
padding: "8px 12px",
|
|
11303
|
-
border: "1px solid #d0d0d0",
|
|
11304
|
-
borderRadius: "4px",
|
|
11305
|
-
fontSize: "14px",
|
|
11306
|
-
backgroundColor: "#f8f8f8"
|
|
11307
|
-
},
|
|
11308
|
-
onKeyDown: (e) => {
|
|
11309
|
-
if (e.key === "Enter") {
|
|
11310
|
-
handleVideoSubmit();
|
|
11311
|
-
} else if (e.key === "Escape") {
|
|
11312
|
-
handleVideoCancel();
|
|
11313
|
-
}
|
|
11314
|
-
},
|
|
11315
|
-
autoFocus: true
|
|
11316
|
-
}
|
|
11317
|
-
),
|
|
11318
|
-
/* @__PURE__ */ jsx50(
|
|
11319
|
-
"button",
|
|
11320
|
-
{
|
|
11321
|
-
onClick: handleVideoSubmit,
|
|
11322
|
-
disabled: !videoUrl.trim(),
|
|
11323
|
-
style: {
|
|
11324
|
-
padding: "8px 16px",
|
|
11325
|
-
backgroundColor: "#007bff",
|
|
11326
|
-
color: "white",
|
|
11327
|
-
border: "none",
|
|
11328
|
-
borderRadius: "4px",
|
|
11329
|
-
fontSize: "14px",
|
|
11330
|
-
cursor: videoUrl.trim() ? "pointer" : "not-allowed",
|
|
11331
|
-
opacity: videoUrl.trim() ? 1 : 0.6
|
|
11332
|
-
},
|
|
11333
|
-
children: "Ok"
|
|
11334
|
-
}
|
|
11335
|
-
)
|
|
11336
|
-
] })
|
|
11337
|
-
}
|
|
11338
|
-
),
|
|
11339
|
-
showLinkModal && /* @__PURE__ */ jsx50(
|
|
11340
|
-
"div",
|
|
11341
|
-
{
|
|
11342
|
-
ref: linkModalRef,
|
|
11343
|
-
style: {
|
|
11344
|
-
position: "absolute",
|
|
11345
|
-
top: "20px",
|
|
11346
|
-
left: "20px",
|
|
11347
|
-
right: "20px",
|
|
11348
|
-
backgroundColor: "white",
|
|
11349
|
-
border: "1px solid #e0e0e0",
|
|
11350
|
-
borderRadius: "4px",
|
|
11351
|
-
padding: "12px",
|
|
11352
|
-
boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
|
|
11353
|
-
zIndex: 1e3,
|
|
11354
|
-
width: "fit-content"
|
|
11355
|
-
},
|
|
11356
|
-
children: /* @__PURE__ */ jsxs25(Flex2, { gap: 8, align: "center", children: [
|
|
11357
|
-
/* @__PURE__ */ jsx50(
|
|
11358
|
-
Text,
|
|
11359
|
-
{
|
|
11360
|
-
style: { fontSize: "14px", fontWeight: "500", color: "#333" },
|
|
11361
|
-
children: "Link:"
|
|
11362
|
-
}
|
|
11363
|
-
),
|
|
11364
|
-
/* @__PURE__ */ jsx50(
|
|
11365
|
-
"input",
|
|
11366
|
-
{
|
|
11367
|
-
type: "text",
|
|
11368
|
-
value: linkUrl,
|
|
11369
|
-
onChange: (e) => setLinkUrl(e.target.value),
|
|
11370
|
-
placeholder: "URL do link",
|
|
11371
|
-
style: {
|
|
11372
|
-
padding: "8px 12px",
|
|
11373
|
-
border: "1px solid #d0d0d0",
|
|
11374
|
-
borderRadius: "4px",
|
|
11375
|
-
fontSize: "14px",
|
|
11376
|
-
backgroundColor: "#f8f8f8",
|
|
11377
|
-
width: "300px"
|
|
11378
|
-
},
|
|
11379
|
-
onKeyDown: (e) => {
|
|
11380
|
-
if (e.key === "Enter") {
|
|
11381
|
-
handleLinkSubmit();
|
|
11382
|
-
} else if (e.key === "Escape") {
|
|
11383
|
-
handleLinkCancel();
|
|
11384
|
-
}
|
|
11385
|
-
},
|
|
11386
|
-
autoFocus: true
|
|
11387
|
-
}
|
|
11388
|
-
),
|
|
11389
|
-
/* @__PURE__ */ jsx50(
|
|
11390
|
-
"button",
|
|
11391
|
-
{
|
|
11392
|
-
onClick: handleLinkSubmit,
|
|
11393
|
-
disabled: !linkUrl.trim(),
|
|
11394
|
-
style: {
|
|
11395
|
-
padding: "8px 16px",
|
|
11396
|
-
backgroundColor: "#007bff",
|
|
11397
|
-
color: "white",
|
|
11398
|
-
border: "none",
|
|
11399
|
-
borderRadius: "4px",
|
|
11400
|
-
fontSize: "14px",
|
|
11401
|
-
cursor: linkUrl.trim() ? "pointer" : "not-allowed",
|
|
11402
|
-
opacity: linkUrl.trim() ? 1 : 0.6
|
|
11403
|
-
},
|
|
11404
|
-
children: "Ok"
|
|
11405
|
-
}
|
|
11406
|
-
)
|
|
11407
|
-
] })
|
|
11408
|
-
}
|
|
11409
|
-
)
|
|
11410
|
-
] }) });
|
|
11411
|
-
};
|
|
11412
|
-
var QuillComponent_default = QuillComponent;
|
|
11413
|
-
|
|
11414
9121
|
// src/components/RichEditor/RichEditor.tsx
|
|
11415
|
-
import {
|
|
9122
|
+
import { lazy, useEffect as useEffect6, useState as useState7, Suspense } from "react";
|
|
9123
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
9124
|
+
var QuillComponent = lazy(() => import("./QuillComponent-A5KIFPCL.mjs"));
|
|
11416
9125
|
var RichEditor = (props) => {
|
|
11417
|
-
|
|
9126
|
+
const [isClient, setIsClient] = useState7(false);
|
|
9127
|
+
useEffect6(() => {
|
|
9128
|
+
setIsClient(typeof window !== "undefined");
|
|
9129
|
+
}, []);
|
|
9130
|
+
if (!isClient) return null;
|
|
9131
|
+
return /* @__PURE__ */ jsx45("div", { children: /* @__PURE__ */ jsx45(ToastProvider, { children: /* @__PURE__ */ jsx45(Suspense, { fallback: null, children: /* @__PURE__ */ jsx45(QuillComponent, __spreadValues({}, props)) }) }) });
|
|
11418
9132
|
};
|
|
11419
9133
|
var RichEditor_default = RichEditor;
|
|
11420
9134
|
|
|
11421
9135
|
// src/components/FormFields/RichEditorFormField.tsx
|
|
11422
|
-
import { jsx as
|
|
9136
|
+
import { jsx as jsx46, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
11423
9137
|
var RichEditorFormField = (_a) => {
|
|
11424
9138
|
var _b = _a, {
|
|
11425
9139
|
name,
|
|
@@ -11450,8 +9164,8 @@ var RichEditorFormField = (_a) => {
|
|
|
11450
9164
|
const fieldError = fieldState.error;
|
|
11451
9165
|
const haveError = !!fieldError;
|
|
11452
9166
|
const errorMsg = fieldError == null ? void 0 : fieldError.message;
|
|
11453
|
-
return /* @__PURE__ */
|
|
11454
|
-
label && /* @__PURE__ */
|
|
9167
|
+
return /* @__PURE__ */ jsxs23(Flex, { direction: "column", children: [
|
|
9168
|
+
label && /* @__PURE__ */ jsx46(
|
|
11455
9169
|
FormLabel,
|
|
11456
9170
|
{
|
|
11457
9171
|
name,
|
|
@@ -11460,7 +9174,7 @@ var RichEditorFormField = (_a) => {
|
|
|
11460
9174
|
haveError
|
|
11461
9175
|
}
|
|
11462
9176
|
),
|
|
11463
|
-
/* @__PURE__ */
|
|
9177
|
+
/* @__PURE__ */ jsx46(
|
|
11464
9178
|
RichEditor_default,
|
|
11465
9179
|
__spreadProps(__spreadValues({}, props), {
|
|
11466
9180
|
value: field.value,
|
|
@@ -11468,14 +9182,14 @@ var RichEditorFormField = (_a) => {
|
|
|
11468
9182
|
"aria-labelledby": `${name}-label`
|
|
11469
9183
|
})
|
|
11470
9184
|
),
|
|
11471
|
-
/* @__PURE__ */
|
|
9185
|
+
/* @__PURE__ */ jsx46(ErrorFormMessage, { message: errorMsg })
|
|
11472
9186
|
] });
|
|
11473
9187
|
};
|
|
11474
9188
|
|
|
11475
9189
|
// src/components/FormFields/CalendarFormField.tsx
|
|
11476
9190
|
import { useController as useController4 } from "react-hook-form";
|
|
11477
|
-
import { useCallback as
|
|
11478
|
-
import { jsx as
|
|
9191
|
+
import { useCallback as useCallback4 } from "react";
|
|
9192
|
+
import { jsx as jsx47, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
11479
9193
|
var CalendarFormField = (_a) => {
|
|
11480
9194
|
var _b = _a, {
|
|
11481
9195
|
name,
|
|
@@ -11496,7 +9210,7 @@ var CalendarFormField = (_a) => {
|
|
|
11496
9210
|
"onChange",
|
|
11497
9211
|
"allowPastDates"
|
|
11498
9212
|
]);
|
|
11499
|
-
const handleValidate =
|
|
9213
|
+
const handleValidate = useCallback4(
|
|
11500
9214
|
(value) => {
|
|
11501
9215
|
var _a2;
|
|
11502
9216
|
if (value === void 0 || value === null) {
|
|
@@ -11522,8 +9236,8 @@ var CalendarFormField = (_a) => {
|
|
|
11522
9236
|
const handleCalendarChange = (date) => {
|
|
11523
9237
|
setSelected(date);
|
|
11524
9238
|
};
|
|
11525
|
-
return /* @__PURE__ */
|
|
11526
|
-
label && /* @__PURE__ */
|
|
9239
|
+
return /* @__PURE__ */ jsxs24(Flex, { direction: "column", style: { flex: "1" }, children: [
|
|
9240
|
+
label && /* @__PURE__ */ jsx47(
|
|
11527
9241
|
FormLabel,
|
|
11528
9242
|
{
|
|
11529
9243
|
name,
|
|
@@ -11532,7 +9246,7 @@ var CalendarFormField = (_a) => {
|
|
|
11532
9246
|
haveError
|
|
11533
9247
|
}
|
|
11534
9248
|
),
|
|
11535
|
-
/* @__PURE__ */
|
|
9249
|
+
/* @__PURE__ */ jsx47(
|
|
11536
9250
|
Calendar,
|
|
11537
9251
|
__spreadValues({
|
|
11538
9252
|
selected,
|
|
@@ -11544,14 +9258,14 @@ var CalendarFormField = (_a) => {
|
|
|
11544
9258
|
allowPastDates
|
|
11545
9259
|
}, calendarProps)
|
|
11546
9260
|
),
|
|
11547
|
-
/* @__PURE__ */
|
|
9261
|
+
/* @__PURE__ */ jsx47(ErrorFormMessage, { message: errorMsg })
|
|
11548
9262
|
] });
|
|
11549
9263
|
};
|
|
11550
9264
|
|
|
11551
9265
|
// src/components/FormFields/TimePickerFormField.tsx
|
|
11552
9266
|
import { useController as useController5 } from "react-hook-form";
|
|
11553
|
-
import { useCallback as
|
|
11554
|
-
import { jsx as
|
|
9267
|
+
import { useCallback as useCallback5 } from "react";
|
|
9268
|
+
import { jsx as jsx48, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
11555
9269
|
var TimePickerFormField = (_a) => {
|
|
11556
9270
|
var _b = _a, {
|
|
11557
9271
|
name,
|
|
@@ -11568,7 +9282,7 @@ var TimePickerFormField = (_a) => {
|
|
|
11568
9282
|
"validationErrorMessage",
|
|
11569
9283
|
"rules"
|
|
11570
9284
|
]);
|
|
11571
|
-
const handleValidate =
|
|
9285
|
+
const handleValidate = useCallback5(
|
|
11572
9286
|
(value) => {
|
|
11573
9287
|
var _a2;
|
|
11574
9288
|
if (value === void 0 || value === null || value === "") {
|
|
@@ -11594,8 +9308,8 @@ var TimePickerFormField = (_a) => {
|
|
|
11594
9308
|
const handleTimePickerChange = (time) => {
|
|
11595
9309
|
setSelected(time);
|
|
11596
9310
|
};
|
|
11597
|
-
return /* @__PURE__ */
|
|
11598
|
-
label && /* @__PURE__ */
|
|
9311
|
+
return /* @__PURE__ */ jsxs25(Flex, { direction: "column", style: { flex: "1" }, children: [
|
|
9312
|
+
label && /* @__PURE__ */ jsx48(
|
|
11599
9313
|
FormLabel,
|
|
11600
9314
|
{
|
|
11601
9315
|
name,
|
|
@@ -11604,7 +9318,7 @@ var TimePickerFormField = (_a) => {
|
|
|
11604
9318
|
haveError
|
|
11605
9319
|
}
|
|
11606
9320
|
),
|
|
11607
|
-
/* @__PURE__ */
|
|
9321
|
+
/* @__PURE__ */ jsx48(
|
|
11608
9322
|
TimePicker,
|
|
11609
9323
|
__spreadValues({
|
|
11610
9324
|
selected,
|
|
@@ -11615,16 +9329,16 @@ var TimePickerFormField = (_a) => {
|
|
|
11615
9329
|
hasError: haveError
|
|
11616
9330
|
}, timePickerProps)
|
|
11617
9331
|
),
|
|
11618
|
-
/* @__PURE__ */
|
|
9332
|
+
/* @__PURE__ */ jsx48(ErrorFormMessage, { message: errorMsg })
|
|
11619
9333
|
] });
|
|
11620
9334
|
};
|
|
11621
9335
|
|
|
11622
9336
|
// src/hooks/useImageUpload.ts
|
|
11623
|
-
import { useState as
|
|
9337
|
+
import { useState as useState8, useCallback as useCallback6 } from "react";
|
|
11624
9338
|
var useImageUpload = (options) => {
|
|
11625
|
-
const [isUploading, setIsUploading] =
|
|
11626
|
-
const [progress, setProgress] =
|
|
11627
|
-
const [error, setError] =
|
|
9339
|
+
const [isUploading, setIsUploading] = useState8(false);
|
|
9340
|
+
const [progress, setProgress] = useState8(null);
|
|
9341
|
+
const [error, setError] = useState8(null);
|
|
11628
9342
|
const {
|
|
11629
9343
|
onSuccess,
|
|
11630
9344
|
onError,
|
|
@@ -11634,7 +9348,7 @@ var useImageUpload = (options) => {
|
|
|
11634
9348
|
allowedTypes = ["image/jpeg", "image/png", "image/gif", "image/webp"],
|
|
11635
9349
|
uploadConfig
|
|
11636
9350
|
} = options;
|
|
11637
|
-
const validateFile =
|
|
9351
|
+
const validateFile = useCallback6(
|
|
11638
9352
|
(file) => {
|
|
11639
9353
|
if (!allowedTypes.includes(file.type)) {
|
|
11640
9354
|
const errorMsg = "Tipo de arquivo n\xE3o suportado";
|
|
@@ -11652,7 +9366,7 @@ var useImageUpload = (options) => {
|
|
|
11652
9366
|
},
|
|
11653
9367
|
[allowedTypes, maxFileSize, onError]
|
|
11654
9368
|
);
|
|
11655
|
-
const uploadFile =
|
|
9369
|
+
const uploadFile = useCallback6(
|
|
11656
9370
|
(file) => __async(null, null, function* () {
|
|
11657
9371
|
if (!validateFile(file)) {
|
|
11658
9372
|
return null;
|
|
@@ -11705,7 +9419,7 @@ var useImageUpload = (options) => {
|
|
|
11705
9419
|
}),
|
|
11706
9420
|
[validateFile, onSuccess, onError, onProgress]
|
|
11707
9421
|
);
|
|
11708
|
-
const reset =
|
|
9422
|
+
const reset = useCallback6(() => {
|
|
11709
9423
|
setIsUploading(false);
|
|
11710
9424
|
setProgress(null);
|
|
11711
9425
|
setError(null);
|
|
@@ -11759,7 +9473,7 @@ export {
|
|
|
11759
9473
|
ErrorFormMessage,
|
|
11760
9474
|
Filter,
|
|
11761
9475
|
FilterItem,
|
|
11762
|
-
|
|
9476
|
+
Flex,
|
|
11763
9477
|
FlexStyled,
|
|
11764
9478
|
Form,
|
|
11765
9479
|
FormLabel,
|
|
@@ -11821,22 +9535,3 @@ export {
|
|
|
11821
9535
|
useImageUpload,
|
|
11822
9536
|
useToast
|
|
11823
9537
|
};
|
|
11824
|
-
/*! Bundled license information:
|
|
11825
|
-
|
|
11826
|
-
react-is/cjs/react-is.development.js:
|
|
11827
|
-
(** @license React v16.13.1
|
|
11828
|
-
* react-is.development.js
|
|
11829
|
-
*
|
|
11830
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11831
|
-
*
|
|
11832
|
-
* This source code is licensed under the MIT license found in the
|
|
11833
|
-
* LICENSE file in the root directory of this source tree.
|
|
11834
|
-
*)
|
|
11835
|
-
|
|
11836
|
-
object-assign/index.js:
|
|
11837
|
-
(*
|
|
11838
|
-
object-assign
|
|
11839
|
-
(c) Sindre Sorhus
|
|
11840
|
-
@license MIT
|
|
11841
|
-
*)
|
|
11842
|
-
*/
|