@umami/react-zen 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +283 -144
- package/dist/index.d.ts +778 -750
- package/dist/index.js +619 -546
- package/dist/index.mjs +574 -560
- package/dist/zen.css +45 -35
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -267,194 +267,12 @@ var require_classnames = __commonJS({
|
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
269
|
|
|
270
|
-
// node_modules/
|
|
270
|
+
// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js
|
|
271
271
|
import __import_react3 from "react";
|
|
272
|
-
var require_use_sync_external_store_shim_production_min2 = __commonJS({
|
|
273
|
-
"node_modules/zustand/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js"(exports) {
|
|
274
|
-
var e = __import_react3;
|
|
275
|
-
function h(a, b) {
|
|
276
|
-
return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;
|
|
277
|
-
}
|
|
278
|
-
var k = "function" === typeof Object.is ? Object.is : h;
|
|
279
|
-
var l = e.useState;
|
|
280
|
-
var m = e.useEffect;
|
|
281
|
-
var n = e.useLayoutEffect;
|
|
282
|
-
var p = e.useDebugValue;
|
|
283
|
-
function q(a, b) {
|
|
284
|
-
var d = b(), f = l({ inst: { value: d, getSnapshot: b } }), c = f[0].inst, g = f[1];
|
|
285
|
-
n(function() {
|
|
286
|
-
c.value = d;
|
|
287
|
-
c.getSnapshot = b;
|
|
288
|
-
r2(c) && g({ inst: c });
|
|
289
|
-
}, [a, d, b]);
|
|
290
|
-
m(function() {
|
|
291
|
-
r2(c) && g({ inst: c });
|
|
292
|
-
return a(function() {
|
|
293
|
-
r2(c) && g({ inst: c });
|
|
294
|
-
});
|
|
295
|
-
}, [a]);
|
|
296
|
-
p(d);
|
|
297
|
-
return d;
|
|
298
|
-
}
|
|
299
|
-
function r2(a) {
|
|
300
|
-
var b = a.getSnapshot;
|
|
301
|
-
a = a.value;
|
|
302
|
-
try {
|
|
303
|
-
var d = b();
|
|
304
|
-
return !k(a, d);
|
|
305
|
-
} catch (f) {
|
|
306
|
-
return true;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
function t(a, b) {
|
|
310
|
-
return b();
|
|
311
|
-
}
|
|
312
|
-
var u = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? t : q;
|
|
313
|
-
exports.useSyncExternalStore = void 0 !== e.useSyncExternalStore ? e.useSyncExternalStore : u;
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
// node_modules/zustand/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
|
|
318
|
-
import __import_react4 from "react";
|
|
319
|
-
var require_use_sync_external_store_shim_development2 = __commonJS({
|
|
320
|
-
"node_modules/zustand/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
|
|
321
|
-
if (true) {
|
|
322
|
-
(function() {
|
|
323
|
-
"use strict";
|
|
324
|
-
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
325
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
326
|
-
}
|
|
327
|
-
var React19 = __import_react4;
|
|
328
|
-
var ReactSharedInternals = React19.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
329
|
-
function error(format) {
|
|
330
|
-
{
|
|
331
|
-
{
|
|
332
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
333
|
-
args[_key2 - 1] = arguments[_key2];
|
|
334
|
-
}
|
|
335
|
-
printWarning("error", format, args);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
function printWarning(level, format, args) {
|
|
340
|
-
{
|
|
341
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
342
|
-
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
|
343
|
-
if (stack !== "") {
|
|
344
|
-
format += "%s";
|
|
345
|
-
args = args.concat([stack]);
|
|
346
|
-
}
|
|
347
|
-
var argsWithFormat = args.map(function(item) {
|
|
348
|
-
return String(item);
|
|
349
|
-
});
|
|
350
|
-
argsWithFormat.unshift("Warning: " + format);
|
|
351
|
-
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
function is(x, y) {
|
|
355
|
-
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
356
|
-
}
|
|
357
|
-
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
358
|
-
var useState14 = React19.useState, useEffect11 = React19.useEffect, useLayoutEffect3 = React19.useLayoutEffect, useDebugValue2 = React19.useDebugValue;
|
|
359
|
-
var didWarnOld18Alpha = false;
|
|
360
|
-
var didWarnUncachedGetSnapshot = false;
|
|
361
|
-
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
362
|
-
{
|
|
363
|
-
if (!didWarnOld18Alpha) {
|
|
364
|
-
if (React19.startTransition !== void 0) {
|
|
365
|
-
didWarnOld18Alpha = true;
|
|
366
|
-
error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.");
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
var value = getSnapshot();
|
|
371
|
-
{
|
|
372
|
-
if (!didWarnUncachedGetSnapshot) {
|
|
373
|
-
var cachedValue = getSnapshot();
|
|
374
|
-
if (!objectIs(value, cachedValue)) {
|
|
375
|
-
error("The result of getSnapshot should be cached to avoid an infinite loop");
|
|
376
|
-
didWarnUncachedGetSnapshot = true;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
var _useState = useState14({
|
|
381
|
-
inst: {
|
|
382
|
-
value,
|
|
383
|
-
getSnapshot
|
|
384
|
-
}
|
|
385
|
-
}), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
386
|
-
useLayoutEffect3(function() {
|
|
387
|
-
inst.value = value;
|
|
388
|
-
inst.getSnapshot = getSnapshot;
|
|
389
|
-
if (checkIfSnapshotChanged(inst)) {
|
|
390
|
-
forceUpdate({
|
|
391
|
-
inst
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
}, [subscribe, value, getSnapshot]);
|
|
395
|
-
useEffect11(function() {
|
|
396
|
-
if (checkIfSnapshotChanged(inst)) {
|
|
397
|
-
forceUpdate({
|
|
398
|
-
inst
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
|
-
var handleStoreChange = function() {
|
|
402
|
-
if (checkIfSnapshotChanged(inst)) {
|
|
403
|
-
forceUpdate({
|
|
404
|
-
inst
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
};
|
|
408
|
-
return subscribe(handleStoreChange);
|
|
409
|
-
}, [subscribe]);
|
|
410
|
-
useDebugValue2(value);
|
|
411
|
-
return value;
|
|
412
|
-
}
|
|
413
|
-
function checkIfSnapshotChanged(inst) {
|
|
414
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
415
|
-
var prevValue = inst.value;
|
|
416
|
-
try {
|
|
417
|
-
var nextValue = latestGetSnapshot();
|
|
418
|
-
return !objectIs(prevValue, nextValue);
|
|
419
|
-
} catch (error2) {
|
|
420
|
-
return true;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
function useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) {
|
|
424
|
-
return getSnapshot();
|
|
425
|
-
}
|
|
426
|
-
var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
|
|
427
|
-
var isServerEnvironment = !canUseDOM;
|
|
428
|
-
var shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore;
|
|
429
|
-
var useSyncExternalStore$2 = React19.useSyncExternalStore !== void 0 ? React19.useSyncExternalStore : shim;
|
|
430
|
-
exports.useSyncExternalStore = useSyncExternalStore$2;
|
|
431
|
-
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
|
|
432
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
433
|
-
}
|
|
434
|
-
})();
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
});
|
|
438
|
-
|
|
439
|
-
// node_modules/zustand/node_modules/use-sync-external-store/shim/index.js
|
|
440
|
-
var require_shim2 = __commonJS({
|
|
441
|
-
"node_modules/zustand/node_modules/use-sync-external-store/shim/index.js"(exports, module) {
|
|
442
|
-
var import_use_sync_external_store_shim_production_min = __toESM(require_use_sync_external_store_shim_production_min2());
|
|
443
|
-
var import_use_sync_external_store_shim_development = __toESM(require_use_sync_external_store_shim_development2());
|
|
444
|
-
if (false) {
|
|
445
|
-
module.exports = import_use_sync_external_store_shim_production_min.default;
|
|
446
|
-
} else {
|
|
447
|
-
module.exports = import_use_sync_external_store_shim_development.default;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
});
|
|
451
|
-
|
|
452
|
-
// node_modules/zustand/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js
|
|
453
|
-
import __import_react5 from "react";
|
|
454
272
|
var require_with_selector_production_min = __commonJS({
|
|
455
|
-
"node_modules/
|
|
456
|
-
var import_shim2 = __toESM(
|
|
457
|
-
var h =
|
|
273
|
+
"node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js"(exports) {
|
|
274
|
+
var import_shim2 = __toESM(require_shim());
|
|
275
|
+
var h = __import_react3;
|
|
458
276
|
var n = import_shim2.default;
|
|
459
277
|
function p(a, b) {
|
|
460
278
|
return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;
|
|
@@ -508,18 +326,18 @@ var require_with_selector_production_min = __commonJS({
|
|
|
508
326
|
}
|
|
509
327
|
});
|
|
510
328
|
|
|
511
|
-
// node_modules/
|
|
512
|
-
import
|
|
329
|
+
// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
|
|
330
|
+
import __import_react4 from "react";
|
|
513
331
|
var require_with_selector_development = __commonJS({
|
|
514
|
-
"node_modules/
|
|
515
|
-
var import_shim2 = __toESM(
|
|
332
|
+
"node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
|
|
333
|
+
var import_shim2 = __toESM(require_shim());
|
|
516
334
|
if (true) {
|
|
517
335
|
(function() {
|
|
518
336
|
"use strict";
|
|
519
337
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
520
338
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
521
339
|
}
|
|
522
|
-
var React19 =
|
|
340
|
+
var React19 = __import_react4;
|
|
523
341
|
var shim = import_shim2.default;
|
|
524
342
|
function is(x, y) {
|
|
525
343
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
@@ -599,9 +417,9 @@ var require_with_selector_development = __commonJS({
|
|
|
599
417
|
}
|
|
600
418
|
});
|
|
601
419
|
|
|
602
|
-
// node_modules/
|
|
420
|
+
// node_modules/use-sync-external-store/shim/with-selector.js
|
|
603
421
|
var require_with_selector = __commonJS({
|
|
604
|
-
"node_modules/
|
|
422
|
+
"node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
|
|
605
423
|
var import_with_selector_production_min = __toESM(require_with_selector_production_min());
|
|
606
424
|
var import_with_selector_development = __toESM(require_with_selector_development());
|
|
607
425
|
if (false) {
|
|
@@ -2831,7 +2649,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
2831
2649
|
}
|
|
2832
2650
|
};
|
|
2833
2651
|
let onTouchEnd = (e) => {
|
|
2834
|
-
if ($f6c31cce2adf654f$var$shouldPreventDefaultUp(e.
|
|
2652
|
+
if ($f6c31cce2adf654f$var$shouldPreventDefaultUp(e.currentTarget)) e.preventDefault();
|
|
2835
2653
|
};
|
|
2836
2654
|
let onPointerCancel = (e) => {
|
|
2837
2655
|
cancel(e);
|
|
@@ -19288,7 +19106,7 @@ function $bc237834342dbd75$var$Checkbox(props, ref) {
|
|
|
19288
19106
|
let groupState = (0, $kPH7g$useContext)($bc237834342dbd75$export$139c5b8563afc1fc);
|
|
19289
19107
|
let inputRef = (0, $df56164dff5785e2$export$4338b53315abf666)((0, $5dc95899b306f630$export$c9058316764c140e)(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null));
|
|
19290
19108
|
let { labelProps, inputProps, isSelected, isDisabled, isReadOnly, isPressed, isInvalid } = groupState ? (0, $fba3e38d5ca8983f$export$353b32fc6898d37d)({
|
|
19291
|
-
...props,
|
|
19109
|
+
...(0, $64fa3d84918910a7$export$ef03459518577ad4)(props),
|
|
19292
19110
|
// Value is optional for standalone checkboxes, but required for CheckboxGroup items;
|
|
19293
19111
|
// it's passed explicitly here to avoid typescript error (requires ignore).
|
|
19294
19112
|
// @ts-ignore
|
|
@@ -19296,7 +19114,7 @@ function $bc237834342dbd75$var$Checkbox(props, ref) {
|
|
|
19296
19114
|
// ReactNode type doesn't allow function children.
|
|
19297
19115
|
children: typeof props.children === "function" ? true : props.children
|
|
19298
19116
|
}, groupState, inputRef) : (0, $406796ff087fe49b$export$e375f10ce42261c5)({
|
|
19299
|
-
...props,
|
|
19117
|
+
...(0, $64fa3d84918910a7$export$ef03459518577ad4)(props),
|
|
19300
19118
|
children: typeof props.children === "function" ? true : props.children,
|
|
19301
19119
|
validationBehavior
|
|
19302
19120
|
}, (0, $3017fa7ffdddec74$export$8042c6c013fd5226)(props), inputRef);
|
|
@@ -19307,7 +19125,6 @@ function $bc237834342dbd75$var$Checkbox(props, ref) {
|
|
|
19307
19125
|
isDisabled: isInteractionDisabled
|
|
19308
19126
|
});
|
|
19309
19127
|
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
19310
|
-
// TODO: should data attrs go on the label or on the <input>? useCheckbox passes them to the input...
|
|
19311
19128
|
...props,
|
|
19312
19129
|
defaultClassName: "react-aria-Checkbox",
|
|
19313
19130
|
values: {
|
|
@@ -23879,7 +23696,7 @@ function createFormControl(props = {}) {
|
|
|
23879
23696
|
timer = setTimeout(callback, wait);
|
|
23880
23697
|
};
|
|
23881
23698
|
const _updateValid = async (shouldUpdateValid) => {
|
|
23882
|
-
if (_proxyFormState.isValid || shouldUpdateValid) {
|
|
23699
|
+
if (!props.disabled && (_proxyFormState.isValid || shouldUpdateValid)) {
|
|
23883
23700
|
const isValid = _options.resolver ? isEmptyObject((await _executeSchema()).errors) : await executeBuiltInValidation(_fields, true);
|
|
23884
23701
|
if (isValid !== _formState.isValid) {
|
|
23885
23702
|
_subjects.state.next({
|
|
@@ -23889,7 +23706,7 @@ function createFormControl(props = {}) {
|
|
|
23889
23706
|
}
|
|
23890
23707
|
};
|
|
23891
23708
|
const _updateIsValidating = (names, isValidating) => {
|
|
23892
|
-
if (_proxyFormState.isValidating || _proxyFormState.validatingFields) {
|
|
23709
|
+
if (!props.disabled && (_proxyFormState.isValidating || _proxyFormState.validatingFields)) {
|
|
23893
23710
|
(names || Array.from(_names.mount)).forEach((name) => {
|
|
23894
23711
|
if (name) {
|
|
23895
23712
|
isValidating ? set(_formState.validatingFields, name, isValidating) : unset(_formState.validatingFields, name);
|
|
@@ -23902,7 +23719,7 @@ function createFormControl(props = {}) {
|
|
|
23902
23719
|
}
|
|
23903
23720
|
};
|
|
23904
23721
|
const _updateFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => {
|
|
23905
|
-
if (args && method) {
|
|
23722
|
+
if (args && method && !props.disabled) {
|
|
23906
23723
|
_state.action = true;
|
|
23907
23724
|
if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) {
|
|
23908
23725
|
const fieldValues = method(get(_fields, name), args.argA, args.argB);
|
|
@@ -23958,28 +23775,30 @@ function createFormControl(props = {}) {
|
|
|
23958
23775
|
const output = {
|
|
23959
23776
|
name
|
|
23960
23777
|
};
|
|
23961
|
-
|
|
23962
|
-
|
|
23963
|
-
if (
|
|
23964
|
-
|
|
23965
|
-
|
|
23966
|
-
|
|
23778
|
+
if (!props.disabled) {
|
|
23779
|
+
const disabledField = !!(get(_fields, name) && get(_fields, name)._f && get(_fields, name)._f.disabled);
|
|
23780
|
+
if (!isBlurEvent || shouldDirty) {
|
|
23781
|
+
if (_proxyFormState.isDirty) {
|
|
23782
|
+
isPreviousDirty = _formState.isDirty;
|
|
23783
|
+
_formState.isDirty = output.isDirty = _getDirty();
|
|
23784
|
+
shouldUpdateField = isPreviousDirty !== output.isDirty;
|
|
23785
|
+
}
|
|
23786
|
+
const isCurrentFieldPristine = disabledField || deepEqual(get(_defaultValues, name), fieldValue);
|
|
23787
|
+
isPreviousDirty = !!(!disabledField && get(_formState.dirtyFields, name));
|
|
23788
|
+
isCurrentFieldPristine || disabledField ? unset(_formState.dirtyFields, name) : set(_formState.dirtyFields, name, true);
|
|
23789
|
+
output.dirtyFields = _formState.dirtyFields;
|
|
23790
|
+
shouldUpdateField = shouldUpdateField || _proxyFormState.dirtyFields && isPreviousDirty !== !isCurrentFieldPristine;
|
|
23967
23791
|
}
|
|
23968
|
-
|
|
23969
|
-
|
|
23970
|
-
|
|
23971
|
-
|
|
23972
|
-
|
|
23973
|
-
|
|
23974
|
-
|
|
23975
|
-
const isPreviousFieldTouched = get(_formState.touchedFields, name);
|
|
23976
|
-
if (!isPreviousFieldTouched) {
|
|
23977
|
-
set(_formState.touchedFields, name, isBlurEvent);
|
|
23978
|
-
output.touchedFields = _formState.touchedFields;
|
|
23979
|
-
shouldUpdateField = shouldUpdateField || _proxyFormState.touchedFields && isPreviousFieldTouched !== isBlurEvent;
|
|
23792
|
+
if (isBlurEvent) {
|
|
23793
|
+
const isPreviousFieldTouched = get(_formState.touchedFields, name);
|
|
23794
|
+
if (!isPreviousFieldTouched) {
|
|
23795
|
+
set(_formState.touchedFields, name, isBlurEvent);
|
|
23796
|
+
output.touchedFields = _formState.touchedFields;
|
|
23797
|
+
shouldUpdateField = shouldUpdateField || _proxyFormState.touchedFields && isPreviousFieldTouched !== isBlurEvent;
|
|
23798
|
+
}
|
|
23980
23799
|
}
|
|
23800
|
+
shouldUpdateField && shouldRender && _subjects.state.next(output);
|
|
23981
23801
|
}
|
|
23982
|
-
shouldUpdateField && shouldRender && _subjects.state.next(output);
|
|
23983
23802
|
return shouldUpdateField ? output : {};
|
|
23984
23803
|
};
|
|
23985
23804
|
const shouldRenderByError = (name, isValid, error, fieldState) => {
|
|
@@ -24062,7 +23881,7 @@ function createFormControl(props = {}) {
|
|
|
24062
23881
|
}
|
|
24063
23882
|
_names.unMount = /* @__PURE__ */ new Set();
|
|
24064
23883
|
};
|
|
24065
|
-
const _getDirty = (name, data) => (name && data && set(_formValues, name, data), !deepEqual(getValues(), _defaultValues));
|
|
23884
|
+
const _getDirty = (name, data) => !props.disabled && (name && data && set(_formValues, name, data), !deepEqual(getValues(), _defaultValues));
|
|
24066
23885
|
const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {
|
|
24067
23886
|
..._state.mount ? _formValues : isUndefined(defaultValue) ? _defaultValues : isString(names) ? { [names]: defaultValue } : defaultValue
|
|
24068
23887
|
}, isGlobal, defaultValue);
|
|
@@ -24104,7 +23923,7 @@ function createFormControl(props = {}) {
|
|
|
24104
23923
|
const fieldValue = value[fieldKey];
|
|
24105
23924
|
const fieldName = `${name}.${fieldKey}`;
|
|
24106
23925
|
const field = get(_fields, fieldName);
|
|
24107
|
-
(_names.array.has(name) ||
|
|
23926
|
+
(_names.array.has(name) || isObject(fieldValue) || field && !field._f) && !isDateObject(fieldValue) ? setValues(fieldName, fieldValue, options) : setFieldValue(fieldName, fieldValue, options);
|
|
24108
23927
|
}
|
|
24109
23928
|
};
|
|
24110
23929
|
const setValue = (name, value, options = {}) => {
|
|
@@ -24141,7 +23960,7 @@ function createFormControl(props = {}) {
|
|
|
24141
23960
|
const field = get(_fields, name);
|
|
24142
23961
|
const getCurrentFieldValue = () => target.type ? getFieldValue(field._f) : getEventValue(event);
|
|
24143
23962
|
const _updateIsFieldValueUpdated = (fieldValue) => {
|
|
24144
|
-
isFieldValueUpdated = Number.isNaN(fieldValue) || deepEqual(fieldValue, get(_formValues, name, fieldValue));
|
|
23963
|
+
isFieldValueUpdated = Number.isNaN(fieldValue) || isDateObject(fieldValue) && isNaN(fieldValue.getTime()) || deepEqual(fieldValue, get(_formValues, name, fieldValue));
|
|
24145
23964
|
};
|
|
24146
23965
|
if (field) {
|
|
24147
23966
|
let error;
|
|
@@ -24470,7 +24289,11 @@ function createFormControl(props = {}) {
|
|
|
24470
24289
|
}
|
|
24471
24290
|
if (!keepStateOptions.keepValues) {
|
|
24472
24291
|
if (keepStateOptions.keepDirtyValues) {
|
|
24473
|
-
|
|
24292
|
+
const fieldsToCheck = /* @__PURE__ */ new Set([
|
|
24293
|
+
..._names.mount,
|
|
24294
|
+
...Object.keys(getDirtyFields(_defaultValues, _formValues))
|
|
24295
|
+
]);
|
|
24296
|
+
for (const fieldName of Array.from(fieldsToCheck)) {
|
|
24474
24297
|
get(_formState.dirtyFields, fieldName) ? set(values, fieldName, get(_formValues, fieldName)) : setValue(fieldName, get(values, fieldName));
|
|
24475
24298
|
}
|
|
24476
24299
|
} else {
|
|
@@ -24694,6 +24517,11 @@ function useForm(props = {}) {
|
|
|
24694
24517
|
values: control._getWatch()
|
|
24695
24518
|
});
|
|
24696
24519
|
}, [props.shouldUnregister, control]);
|
|
24520
|
+
React.useEffect(() => {
|
|
24521
|
+
if (_formControl.current) {
|
|
24522
|
+
_formControl.current.watch = _formControl.current.watch.bind({});
|
|
24523
|
+
}
|
|
24524
|
+
}, [formState]);
|
|
24697
24525
|
_formControl.current.formState = getProxyFormState(formState, control);
|
|
24698
24526
|
return _formControl.current;
|
|
24699
24527
|
}
|
|
@@ -24722,36 +24550,119 @@ var Box_default = {
|
|
|
24722
24550
|
"font-size-md": "Box_font-size-md",
|
|
24723
24551
|
"font-size-lg": "Box_font-size-lg",
|
|
24724
24552
|
"font-size-xl": "Box_font-size-xl",
|
|
24725
|
-
"border-
|
|
24726
|
-
"border-
|
|
24727
|
-
"border-
|
|
24553
|
+
"border-sm": "Box_border-sm",
|
|
24554
|
+
"border-md": "Box_border-md",
|
|
24555
|
+
"border-lg": "Box_border-lg",
|
|
24728
24556
|
"border-radius-sm": "Box_border-radius-sm",
|
|
24729
24557
|
"border-radius-md": "Box_border-radius-md",
|
|
24730
24558
|
"border-radius-lg": "Box_border-radius-lg",
|
|
24731
24559
|
"border-radius-full": "Box_border-radius-full",
|
|
24732
|
-
"gap-xs": "Box_gap-xs",
|
|
24733
|
-
"gap-sm": "Box_gap-sm",
|
|
24734
|
-
"gap-md": "Box_gap-md",
|
|
24735
|
-
"gap-lg": "Box_gap-lg",
|
|
24736
|
-
"gap-xl": "Box_gap-xl",
|
|
24737
24560
|
"shadow-1": "Box_shadow-1",
|
|
24738
24561
|
"shadow-2": "Box_shadow-2",
|
|
24739
24562
|
"shadow-3": "Box_shadow-3",
|
|
24740
24563
|
"shadow-4": "Box_shadow-4",
|
|
24741
24564
|
"shadow-5": "Box_shadow-5",
|
|
24742
|
-
"shadow-6": "Box_shadow-6"
|
|
24565
|
+
"shadow-6": "Box_shadow-6",
|
|
24566
|
+
"background-color-50": "Box_background-color-50",
|
|
24567
|
+
"background-color-100": "Box_background-color-100",
|
|
24568
|
+
"background-color-200": "Box_background-color-200",
|
|
24569
|
+
"background-color-300": "Box_background-color-300",
|
|
24570
|
+
"background-color-400": "Box_background-color-400",
|
|
24571
|
+
"background-color-500": "Box_background-color-500",
|
|
24572
|
+
"background-color-600": "Box_background-color-600",
|
|
24573
|
+
"background-color-700": "Box_background-color-700",
|
|
24574
|
+
"background-color-800": "Box_background-color-800",
|
|
24575
|
+
"background-color-900": "Box_background-color-900",
|
|
24576
|
+
"background-color-950": "Box_background-color-950",
|
|
24577
|
+
"padding-1": "Box_padding-1",
|
|
24578
|
+
"margin-1": "Box_margin-1",
|
|
24579
|
+
"padding-2": "Box_padding-2",
|
|
24580
|
+
"margin-2": "Box_margin-2",
|
|
24581
|
+
"padding-3": "Box_padding-3",
|
|
24582
|
+
"margin-3": "Box_margin-3",
|
|
24583
|
+
"padding-4": "Box_padding-4",
|
|
24584
|
+
"margin-4": "Box_margin-4",
|
|
24585
|
+
"padding-5": "Box_padding-5",
|
|
24586
|
+
"margin-5": "Box_margin-5",
|
|
24587
|
+
"padding-6": "Box_padding-6",
|
|
24588
|
+
"margin-6": "Box_margin-6",
|
|
24589
|
+
"padding-7": "Box_padding-7",
|
|
24590
|
+
"margin-7": "Box_margin-7",
|
|
24591
|
+
"padding-8": "Box_padding-8",
|
|
24592
|
+
"margin-8": "Box_margin-8",
|
|
24593
|
+
"padding-9": "Box_padding-9",
|
|
24594
|
+
"margin-9": "Box_margin-9",
|
|
24595
|
+
"padding-10": "Box_padding-10",
|
|
24596
|
+
"margin-10": "Box_margin-10",
|
|
24597
|
+
"padding-11": "Box_padding-11",
|
|
24598
|
+
"margin-11": "Box_margin-11",
|
|
24599
|
+
"padding-12": "Box_padding-12",
|
|
24600
|
+
"margin-12": "Box_margin-12",
|
|
24601
|
+
"padding-x-1": "Box_padding-x-1",
|
|
24602
|
+
"margin-x-1": "Box_margin-x-1",
|
|
24603
|
+
"padding-x-2": "Box_padding-x-2",
|
|
24604
|
+
"margin-x-2": "Box_margin-x-2",
|
|
24605
|
+
"padding-x-3": "Box_padding-x-3",
|
|
24606
|
+
"margin-x-3": "Box_margin-x-3",
|
|
24607
|
+
"padding-x-4": "Box_padding-x-4",
|
|
24608
|
+
"margin-x-4": "Box_margin-x-4",
|
|
24609
|
+
"padding-x-5": "Box_padding-x-5",
|
|
24610
|
+
"margin-x-5": "Box_margin-x-5",
|
|
24611
|
+
"padding-x-6": "Box_padding-x-6",
|
|
24612
|
+
"margin-x-6": "Box_margin-x-6",
|
|
24613
|
+
"padding-x-7": "Box_padding-x-7",
|
|
24614
|
+
"margin-x-7": "Box_margin-x-7",
|
|
24615
|
+
"padding-x-8": "Box_padding-x-8",
|
|
24616
|
+
"margin-x-8": "Box_margin-x-8",
|
|
24617
|
+
"padding-x-9": "Box_padding-x-9",
|
|
24618
|
+
"margin-x-9": "Box_margin-x-9",
|
|
24619
|
+
"padding-x-10": "Box_padding-x-10",
|
|
24620
|
+
"margin-x-10": "Box_margin-x-10",
|
|
24621
|
+
"padding-x-11": "Box_padding-x-11",
|
|
24622
|
+
"margin-x-11": "Box_margin-x-11",
|
|
24623
|
+
"padding-x-12": "Box_padding-x-12",
|
|
24624
|
+
"margin-x-12": "Box_margin-x-12",
|
|
24625
|
+
"padding-y-1": "Box_padding-y-1",
|
|
24626
|
+
"margin-y-1": "Box_margin-y-1",
|
|
24627
|
+
"padding-y-2": "Box_padding-y-2",
|
|
24628
|
+
"margin-y-2": "Box_margin-y-2",
|
|
24629
|
+
"padding-y-3": "Box_padding-y-3",
|
|
24630
|
+
"margin-y-3": "Box_margin-y-3",
|
|
24631
|
+
"padding-y-4": "Box_padding-y-4",
|
|
24632
|
+
"margin-y-4": "Box_margin-y-4",
|
|
24633
|
+
"padding-y-5": "Box_padding-y-5",
|
|
24634
|
+
"margin-y-5": "Box_margin-y-5",
|
|
24635
|
+
"padding-y-6": "Box_padding-y-6",
|
|
24636
|
+
"margin-y-6": "Box_margin-y-6",
|
|
24637
|
+
"padding-y-7": "Box_padding-y-7",
|
|
24638
|
+
"margin-y-7": "Box_margin-y-7",
|
|
24639
|
+
"padding-y-8": "Box_padding-y-8",
|
|
24640
|
+
"margin-y-8": "Box_margin-y-8",
|
|
24641
|
+
"padding-y-9": "Box_padding-y-9",
|
|
24642
|
+
"margin-y-9": "Box_margin-y-9",
|
|
24643
|
+
"padding-y-10": "Box_padding-y-10",
|
|
24644
|
+
"margin-y-10": "Box_margin-y-10",
|
|
24645
|
+
"padding-y-11": "Box_padding-y-11",
|
|
24646
|
+
"margin-y-11": "Box_margin-y-11",
|
|
24647
|
+
"padding-y-12": "Box_padding-y-12",
|
|
24648
|
+
"margin-y-12": "Box_margin-y-12"
|
|
24743
24649
|
};
|
|
24744
24650
|
|
|
24745
24651
|
// src/components/Box.tsx
|
|
24746
24652
|
import { jsx } from "react/jsx-runtime";
|
|
24747
24653
|
function Box({
|
|
24748
24654
|
className,
|
|
24749
|
-
spacing,
|
|
24750
24655
|
fontSize,
|
|
24656
|
+
backgroundColor,
|
|
24751
24657
|
border,
|
|
24752
24658
|
borderRadius,
|
|
24753
24659
|
shadow,
|
|
24754
|
-
|
|
24660
|
+
padding,
|
|
24661
|
+
margin,
|
|
24662
|
+
paddingX,
|
|
24663
|
+
marginX,
|
|
24664
|
+
paddingY,
|
|
24665
|
+
marginY,
|
|
24755
24666
|
asChild,
|
|
24756
24667
|
children,
|
|
24757
24668
|
...props
|
|
@@ -24764,11 +24675,16 @@ function Box({
|
|
|
24764
24675
|
className: (0, import_classnames.default)(
|
|
24765
24676
|
className,
|
|
24766
24677
|
fontSize && Box_default[`font-size-${fontSize}`],
|
|
24767
|
-
|
|
24678
|
+
backgroundColor && Box_default[`background-color-${backgroundColor}`],
|
|
24768
24679
|
border && Box_default[`border-${border}`],
|
|
24769
24680
|
borderRadius && Box_default[`border-radius-${borderRadius}`],
|
|
24770
24681
|
shadow && Box_default[`shadow-${shadow}`],
|
|
24771
|
-
|
|
24682
|
+
padding && Box_default[`padding-${padding}`],
|
|
24683
|
+
margin && Box_default[`margin-${margin}`],
|
|
24684
|
+
paddingX && Box_default[`padding-x-${padding}`],
|
|
24685
|
+
marginX && Box_default[`margin-x-${margin}`],
|
|
24686
|
+
paddingY && Box_default[`padding-y-${padding}`],
|
|
24687
|
+
marginY && Box_default[`margin-y-${margin}`]
|
|
24772
24688
|
),
|
|
24773
24689
|
children
|
|
24774
24690
|
}
|
|
@@ -24854,18 +24770,11 @@ var Flexbox_default = {
|
|
|
24854
24770
|
"align-self-safe-center": "Flexbox_align-self-safe-center",
|
|
24855
24771
|
"align-self-unsafe-center": "Flexbox_align-self-unsafe-center",
|
|
24856
24772
|
inline: "Flexbox_inline",
|
|
24857
|
-
|
|
24858
|
-
|
|
24859
|
-
|
|
24860
|
-
|
|
24861
|
-
|
|
24862
|
-
spacing6: "Flexbox_spacing6",
|
|
24863
|
-
spacing7: "Flexbox_spacing7",
|
|
24864
|
-
spacing8: "Flexbox_spacing8",
|
|
24865
|
-
spacing9: "Flexbox_spacing9",
|
|
24866
|
-
spacing10: "Flexbox_spacing10",
|
|
24867
|
-
spacing11: "Flexbox_spacing11",
|
|
24868
|
-
spacing12: "Flexbox_spacing12"
|
|
24773
|
+
"gap-xs": "Flexbox_gap-xs",
|
|
24774
|
+
"gap-sm": "Flexbox_gap-sm",
|
|
24775
|
+
"gap-md": "Flexbox_gap-md",
|
|
24776
|
+
"gap-lg": "Flexbox_gap-lg",
|
|
24777
|
+
"gap-xl": "Flexbox_gap-xl"
|
|
24869
24778
|
};
|
|
24870
24779
|
|
|
24871
24780
|
// src/components/Flexbox.tsx
|
|
@@ -24882,7 +24791,7 @@ function Flexbox({
|
|
|
24882
24791
|
grow,
|
|
24883
24792
|
shrink,
|
|
24884
24793
|
basis,
|
|
24885
|
-
|
|
24794
|
+
gap,
|
|
24886
24795
|
style,
|
|
24887
24796
|
className,
|
|
24888
24797
|
children,
|
|
@@ -24897,6 +24806,7 @@ function Flexbox({
|
|
|
24897
24806
|
className,
|
|
24898
24807
|
direction && Flexbox_default[direction],
|
|
24899
24808
|
wrap && Flexbox_default[wrap],
|
|
24809
|
+
gap && Flexbox_default[`gap-${gap}`],
|
|
24900
24810
|
justifyContent && Flexbox_default[`justify-content-${replace(justifyContent)}`],
|
|
24901
24811
|
justifyItems && Flexbox_default[`justify-items-${replace(justifyItems)}`],
|
|
24902
24812
|
alignContent && Flexbox_default[`align-content-${replace(alignContent)}`],
|
|
@@ -25278,19 +25188,48 @@ function Text({ children, type, size, spacing, weight, asChild, className, ...pr
|
|
|
25278
25188
|
|
|
25279
25189
|
// src/components/form/Form.tsx
|
|
25280
25190
|
import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
25281
|
-
function Form(
|
|
25282
|
-
|
|
25191
|
+
function Form({
|
|
25192
|
+
gap = "md",
|
|
25193
|
+
autoComplete,
|
|
25194
|
+
onSubmit,
|
|
25195
|
+
error,
|
|
25196
|
+
preventSubmit = false,
|
|
25197
|
+
mode,
|
|
25198
|
+
disabled,
|
|
25199
|
+
reValidateMode,
|
|
25200
|
+
defaultValues,
|
|
25201
|
+
values,
|
|
25202
|
+
errors,
|
|
25203
|
+
resetOptions,
|
|
25204
|
+
resolver,
|
|
25205
|
+
context,
|
|
25206
|
+
shouldFocusError,
|
|
25207
|
+
shouldUnregister,
|
|
25208
|
+
shouldUseNativeValidation,
|
|
25209
|
+
progressive,
|
|
25210
|
+
criteriaMode,
|
|
25211
|
+
delayError,
|
|
25212
|
+
className,
|
|
25213
|
+
children,
|
|
25214
|
+
...props
|
|
25215
|
+
}) {
|
|
25216
|
+
const formValues = useForm({
|
|
25217
|
+
mode,
|
|
25218
|
+
disabled,
|
|
25219
|
+
reValidateMode,
|
|
25220
|
+
defaultValues,
|
|
25283
25221
|
values,
|
|
25284
|
-
|
|
25285
|
-
|
|
25286
|
-
|
|
25287
|
-
|
|
25288
|
-
|
|
25289
|
-
|
|
25290
|
-
|
|
25291
|
-
|
|
25292
|
-
|
|
25293
|
-
|
|
25222
|
+
errors,
|
|
25223
|
+
resetOptions,
|
|
25224
|
+
resolver,
|
|
25225
|
+
context,
|
|
25226
|
+
shouldFocusError,
|
|
25227
|
+
shouldUnregister,
|
|
25228
|
+
shouldUseNativeValidation,
|
|
25229
|
+
progressive,
|
|
25230
|
+
criteriaMode,
|
|
25231
|
+
delayError
|
|
25232
|
+
});
|
|
25294
25233
|
const { handleSubmit } = formValues;
|
|
25295
25234
|
const onKeyDown = !onSubmit || preventSubmit ? (e) => e.key === "Enter" && e.preventDefault() : void 0;
|
|
25296
25235
|
useEffect(() => {
|
|
@@ -25309,20 +25248,19 @@ function Form(props) {
|
|
|
25309
25248
|
/* @__PURE__ */ jsx7(
|
|
25310
25249
|
"form",
|
|
25311
25250
|
{
|
|
25312
|
-
...
|
|
25251
|
+
...props,
|
|
25313
25252
|
autoComplete,
|
|
25314
25253
|
className: (0, import_classnames6.default)(Form_default.form, className),
|
|
25315
|
-
style,
|
|
25316
25254
|
onSubmit: onSubmit ? handleSubmit(onSubmit) : void 0,
|
|
25317
25255
|
onKeyDown,
|
|
25318
|
-
children: /* @__PURE__ */ jsx7(Column, { gap
|
|
25256
|
+
children: /* @__PURE__ */ jsx7(Column, { gap, children: typeof children === "function" ? children(formValues) : children })
|
|
25319
25257
|
}
|
|
25320
25258
|
)
|
|
25321
25259
|
] });
|
|
25322
25260
|
}
|
|
25323
25261
|
|
|
25324
25262
|
// src/components/form/FormField.tsx
|
|
25325
|
-
import { cloneElement as cloneElement2 } from "react";
|
|
25263
|
+
import { cloneElement as cloneElement2, forwardRef } from "react";
|
|
25326
25264
|
var import_classnames7 = __toESM(require_classnames());
|
|
25327
25265
|
|
|
25328
25266
|
// src/lib/utils.ts
|
|
@@ -25346,24 +25284,29 @@ function mapChildren(children, handler) {
|
|
|
25346
25284
|
|
|
25347
25285
|
// src/components/form/FormField.module.css
|
|
25348
25286
|
var FormField_default = {
|
|
25349
|
-
|
|
25287
|
+
field: "FormField_field",
|
|
25350
25288
|
description: "FormField_description",
|
|
25351
25289
|
error: "FormField_error"
|
|
25352
25290
|
};
|
|
25353
25291
|
|
|
25354
25292
|
// src/components/form/FormField.tsx
|
|
25355
25293
|
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
25356
|
-
|
|
25357
|
-
|
|
25358
|
-
|
|
25359
|
-
|
|
25360
|
-
|
|
25361
|
-
|
|
25362
|
-
|
|
25363
|
-
|
|
25364
|
-
|
|
25365
|
-
|
|
25366
|
-
|
|
25294
|
+
var FormField = forwardRef(
|
|
25295
|
+
({ name, description, label, rules, className, children, ...props }, ref) => {
|
|
25296
|
+
const { formState, control } = useFormContext();
|
|
25297
|
+
const { field } = useController({ name, control, rules });
|
|
25298
|
+
const errors = formState?.errors || {};
|
|
25299
|
+
const errorMessage = errors[name]?.message;
|
|
25300
|
+
return /* @__PURE__ */ jsxs3("div", { ...props, ref, className: (0, import_classnames7.default)(FormField_default.input, className), children: [
|
|
25301
|
+
typeof children === "function" ? children(field) : mapChildren(
|
|
25302
|
+
children,
|
|
25303
|
+
(child) => child ? cloneElement2(child, { ...field, label: child.props.label || label }) : null
|
|
25304
|
+
),
|
|
25305
|
+
description && /* @__PURE__ */ jsx8("div", { className: FormField_default.description, children: description }),
|
|
25306
|
+
errorMessage && /* @__PURE__ */ jsx8("div", { className: FormField_default.error, children: errorMessage })
|
|
25307
|
+
] });
|
|
25308
|
+
}
|
|
25309
|
+
);
|
|
25367
25310
|
|
|
25368
25311
|
// src/components/Button.tsx
|
|
25369
25312
|
var import_classnames8 = __toESM(require_classnames());
|
|
@@ -25413,16 +25356,13 @@ function Button({
|
|
|
25413
25356
|
|
|
25414
25357
|
// src/components/form/FormResetButton.tsx
|
|
25415
25358
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
25416
|
-
function FormResetButton(props) {
|
|
25417
|
-
const { className, children, onPress, ...buttonProps } = props;
|
|
25359
|
+
function FormResetButton({ values = {}, children, onPress, ...props }) {
|
|
25418
25360
|
const { reset } = useFormContext();
|
|
25419
25361
|
const handleReset = (e) => {
|
|
25420
|
-
reset();
|
|
25421
|
-
|
|
25422
|
-
onPress(e);
|
|
25423
|
-
}
|
|
25362
|
+
reset(values);
|
|
25363
|
+
onPress?.(e);
|
|
25424
25364
|
};
|
|
25425
|
-
return /* @__PURE__ */ jsx10(Button, { ...
|
|
25365
|
+
return /* @__PURE__ */ jsx10(Button, { ...props, type: "reset", onPress: handleReset, children });
|
|
25426
25366
|
}
|
|
25427
25367
|
|
|
25428
25368
|
// src/components/Spinner.tsx
|
|
@@ -25476,7 +25416,6 @@ function FormSubmitButton({ children, disabled, isLoading, ...props }) {
|
|
|
25476
25416
|
const {
|
|
25477
25417
|
formState: { isDirty, isValid, isSubmitting, isSubmitted, isSubmitSuccessful }
|
|
25478
25418
|
} = useFormContext();
|
|
25479
|
-
console.log({ isLoading, isValid, isSubmitSuccessful, isSubmitting, isSubmitted });
|
|
25480
25419
|
return /* @__PURE__ */ jsx13(
|
|
25481
25420
|
LoadingButton,
|
|
25482
25421
|
{
|
|
@@ -26613,6 +26552,14 @@ function Calendar({ className, ...props }) {
|
|
|
26613
26552
|
] });
|
|
26614
26553
|
}
|
|
26615
26554
|
|
|
26555
|
+
// src/components/Checkbox.tsx
|
|
26556
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
26557
|
+
|
|
26558
|
+
// node_modules/react-icons/im/index.mjs
|
|
26559
|
+
function ImCheckmark(props) {
|
|
26560
|
+
return GenIcon({ "tag": "svg", "attr": { "version": "1.1", "viewBox": "0 0 16 16" }, "child": [{ "tag": "path", "attr": { "d": "M13.5 2l-7.5 7.5-3.5-3.5-2.5 2.5 6 6 10-10z" }, "child": [] }] })(props);
|
|
26561
|
+
}
|
|
26562
|
+
|
|
26616
26563
|
// src/components/Checkbox.tsx
|
|
26617
26564
|
var import_classnames15 = __toESM(require_classnames());
|
|
26618
26565
|
|
|
@@ -26625,14 +26572,26 @@ var Checkbox_default = {
|
|
|
26625
26572
|
|
|
26626
26573
|
// src/components/Checkbox.tsx
|
|
26627
26574
|
import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
26628
|
-
|
|
26629
|
-
|
|
26630
|
-
|
|
26631
|
-
|
|
26632
|
-
|
|
26633
|
-
|
|
26634
|
-
|
|
26635
|
-
|
|
26575
|
+
var Checkbox = forwardRef2(
|
|
26576
|
+
({ label, className, children, ...props }, ref) => {
|
|
26577
|
+
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
26578
|
+
return /* @__PURE__ */ jsx20(
|
|
26579
|
+
$bc237834342dbd75$export$48513f6b9f8ce62d,
|
|
26580
|
+
{
|
|
26581
|
+
...props,
|
|
26582
|
+
ref,
|
|
26583
|
+
isSelected,
|
|
26584
|
+
className: (0, import_classnames15.default)(Checkbox_default.checkbox, className),
|
|
26585
|
+
children: ({ isIndeterminate, isSelected: isSelected2 }) => {
|
|
26586
|
+
return /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
26587
|
+
/* @__PURE__ */ jsx20("div", { className: Checkbox_default.box, children: /* @__PURE__ */ jsx20(Icon, { className: Checkbox_default.icon, size: "xs", children: isIndeterminate ? /* @__PURE__ */ jsx20(Icons.Minus, {}) : isSelected2 ? /* @__PURE__ */ jsx20(ImCheckmark, {}) : null }) }),
|
|
26588
|
+
children
|
|
26589
|
+
] });
|
|
26590
|
+
}
|
|
26591
|
+
}
|
|
26592
|
+
);
|
|
26593
|
+
}
|
|
26594
|
+
);
|
|
26636
26595
|
|
|
26637
26596
|
// src/components/Combobox.tsx
|
|
26638
26597
|
var import_classnames19 = __toESM(require_classnames());
|
|
@@ -26713,15 +26672,29 @@ function Combobox({ items, className, ...props }) {
|
|
|
26713
26672
|
}
|
|
26714
26673
|
|
|
26715
26674
|
// src/components/ConfirmationDialog.tsx
|
|
26716
|
-
var
|
|
26675
|
+
var import_classnames23 = __toESM(require_classnames());
|
|
26717
26676
|
import { useState as useState5 } from "react";
|
|
26718
26677
|
|
|
26719
26678
|
// src/components/TextField.tsx
|
|
26720
|
-
import { useEffect as useEffect3, useState as useState4 } from "react";
|
|
26721
|
-
var
|
|
26679
|
+
import { useEffect as useEffect3, useState as useState4, forwardRef as forwardRef3 } from "react";
|
|
26680
|
+
var import_classnames22 = __toESM(require_classnames());
|
|
26722
26681
|
|
|
26723
|
-
// src/components/
|
|
26682
|
+
// src/components/Label.tsx
|
|
26724
26683
|
var import_classnames20 = __toESM(require_classnames());
|
|
26684
|
+
|
|
26685
|
+
// src/components/Label.module.css
|
|
26686
|
+
var Label_default = {
|
|
26687
|
+
label: "Label_label"
|
|
26688
|
+
};
|
|
26689
|
+
|
|
26690
|
+
// src/components/Label.tsx
|
|
26691
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
26692
|
+
function Label({ className, ...props }) {
|
|
26693
|
+
return /* @__PURE__ */ jsx25($01b77f81d0f07f68$export$b04be29aa201d4f5, { ...props, className: (0, import_classnames20.default)(Label_default.label, className) });
|
|
26694
|
+
}
|
|
26695
|
+
|
|
26696
|
+
// src/components/CopyButton.tsx
|
|
26697
|
+
var import_classnames21 = __toESM(require_classnames());
|
|
26725
26698
|
import { useState as useState3, useRef } from "react";
|
|
26726
26699
|
|
|
26727
26700
|
// src/components/CopyButton.module.css
|
|
@@ -26731,20 +26704,20 @@ var CopyButton_default = {
|
|
|
26731
26704
|
};
|
|
26732
26705
|
|
|
26733
26706
|
// src/components/CopyButton.tsx
|
|
26734
|
-
import { jsx as
|
|
26707
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
26735
26708
|
var TIMEOUT = 2e3;
|
|
26736
|
-
function CopyButton({ value, className, children, ...props }) {
|
|
26709
|
+
function CopyButton({ value, timeout = TIMEOUT, className, children, ...props }) {
|
|
26737
26710
|
const [copied, setCopied] = useState3(false);
|
|
26738
|
-
const
|
|
26711
|
+
const ref = useRef(timeout);
|
|
26739
26712
|
const handleCopy = async () => {
|
|
26740
26713
|
if (value) {
|
|
26741
26714
|
await navigator.clipboard.writeText(value);
|
|
26742
26715
|
setCopied(true);
|
|
26743
|
-
clearTimeout(
|
|
26744
|
-
|
|
26716
|
+
clearTimeout(ref.current);
|
|
26717
|
+
ref.current = +setTimeout(() => setCopied(false), timeout);
|
|
26745
26718
|
}
|
|
26746
26719
|
};
|
|
26747
|
-
return /* @__PURE__ */
|
|
26720
|
+
return /* @__PURE__ */ jsx26(Icon, { ...props, className: (0, import_classnames21.default)(CopyButton_default.icon, className), onClick: handleCopy, children: copied ? /* @__PURE__ */ jsx26(Icons.Check, {}) : /* @__PURE__ */ jsx26(Icons.Copy, {}) });
|
|
26748
26721
|
}
|
|
26749
26722
|
|
|
26750
26723
|
// src/components/Input.module.css
|
|
@@ -26752,7 +26725,6 @@ var Input_default = {
|
|
|
26752
26725
|
field: "Input_field",
|
|
26753
26726
|
row: "Input_row",
|
|
26754
26727
|
input: "Input_input",
|
|
26755
|
-
label: "Input_label",
|
|
26756
26728
|
icon: "Input_icon"
|
|
26757
26729
|
};
|
|
26758
26730
|
|
|
@@ -26764,48 +26736,57 @@ var TextField_default = {
|
|
|
26764
26736
|
};
|
|
26765
26737
|
|
|
26766
26738
|
// src/components/TextField.tsx
|
|
26767
|
-
import { jsx as
|
|
26768
|
-
|
|
26769
|
-
|
|
26770
|
-
|
|
26771
|
-
|
|
26772
|
-
|
|
26773
|
-
|
|
26774
|
-
|
|
26775
|
-
|
|
26776
|
-
|
|
26777
|
-
|
|
26778
|
-
|
|
26779
|
-
|
|
26780
|
-
|
|
26781
|
-
|
|
26782
|
-
|
|
26783
|
-
|
|
26784
|
-
|
|
26785
|
-
|
|
26786
|
-
|
|
26787
|
-
|
|
26788
|
-
|
|
26789
|
-
|
|
26790
|
-
|
|
26791
|
-
|
|
26792
|
-
|
|
26793
|
-
|
|
26794
|
-
|
|
26795
|
-
|
|
26796
|
-
|
|
26797
|
-
|
|
26798
|
-
|
|
26799
|
-
|
|
26800
|
-
|
|
26801
|
-
|
|
26802
|
-
|
|
26803
|
-
|
|
26804
|
-
|
|
26805
|
-
|
|
26806
|
-
|
|
26807
|
-
|
|
26808
|
-
|
|
26739
|
+
import { jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
26740
|
+
var TextField = forwardRef3(
|
|
26741
|
+
({
|
|
26742
|
+
value,
|
|
26743
|
+
defaultValue,
|
|
26744
|
+
label,
|
|
26745
|
+
placeholder,
|
|
26746
|
+
asTextArea,
|
|
26747
|
+
allowCopy,
|
|
26748
|
+
className,
|
|
26749
|
+
onChange,
|
|
26750
|
+
...props
|
|
26751
|
+
}, ref) => {
|
|
26752
|
+
const [inputValue, setInputValue] = useState4(defaultValue || value);
|
|
26753
|
+
const Component = asTextArea ? $216918bed6669f72$export$f5c9f3c2c4054eec : $3985021b0ad6602f$export$f5b8910cec6cf069;
|
|
26754
|
+
const handleChange = (e) => {
|
|
26755
|
+
setInputValue(e.target.value);
|
|
26756
|
+
return onChange?.(e);
|
|
26757
|
+
};
|
|
26758
|
+
useEffect3(() => {
|
|
26759
|
+
setInputValue(value);
|
|
26760
|
+
}, [value]);
|
|
26761
|
+
return /* @__PURE__ */ jsxs14(
|
|
26762
|
+
$bcdf0525bf22703d$export$2c73285ae9390cec,
|
|
26763
|
+
{
|
|
26764
|
+
...props,
|
|
26765
|
+
ref,
|
|
26766
|
+
value: inputValue,
|
|
26767
|
+
className: (0, import_classnames22.default)(Input_default.field, className),
|
|
26768
|
+
children: [
|
|
26769
|
+
label && /* @__PURE__ */ jsx27(Label, { children: label }),
|
|
26770
|
+
/* @__PURE__ */ jsxs14("div", { className: Input_default.row, children: [
|
|
26771
|
+
/* @__PURE__ */ jsx27(
|
|
26772
|
+
Component,
|
|
26773
|
+
{
|
|
26774
|
+
className: (0, import_classnames22.default)(
|
|
26775
|
+
TextField_default.input,
|
|
26776
|
+
Input_default.input,
|
|
26777
|
+
asTextArea && TextField_default.textarea,
|
|
26778
|
+
allowCopy && TextField_default.allowCopy
|
|
26779
|
+
),
|
|
26780
|
+
onChange: handleChange
|
|
26781
|
+
}
|
|
26782
|
+
),
|
|
26783
|
+
allowCopy && /* @__PURE__ */ jsx27(CopyButton, { className: (0, import_classnames22.default)(TextField_default.icon, Input_default.icon), value: inputValue })
|
|
26784
|
+
] })
|
|
26785
|
+
]
|
|
26786
|
+
}
|
|
26787
|
+
);
|
|
26788
|
+
}
|
|
26789
|
+
);
|
|
26809
26790
|
|
|
26810
26791
|
// src/components/ConfirmationDialog.module.css
|
|
26811
26792
|
var ConfirmationDialog_default = {
|
|
@@ -26814,7 +26795,7 @@ var ConfirmationDialog_default = {
|
|
|
26814
26795
|
};
|
|
26815
26796
|
|
|
26816
26797
|
// src/components/ConfirmationDialog.tsx
|
|
26817
|
-
import { Fragment as Fragment4, jsx as
|
|
26798
|
+
import { Fragment as Fragment4, jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
26818
26799
|
function ConfirmationDialog({
|
|
26819
26800
|
value,
|
|
26820
26801
|
confirmMessage,
|
|
@@ -26826,11 +26807,11 @@ function ConfirmationDialog({
|
|
|
26826
26807
|
const handleChange = (e) => {
|
|
26827
26808
|
setCanSave(e.target.value === value);
|
|
26828
26809
|
};
|
|
26829
|
-
return /* @__PURE__ */
|
|
26810
|
+
return /* @__PURE__ */ jsx28(
|
|
26830
26811
|
AlertDialog,
|
|
26831
26812
|
{
|
|
26832
26813
|
...props,
|
|
26833
|
-
className: (0,
|
|
26814
|
+
className: (0, import_classnames23.default)(ConfirmationDialog_default.dialog, className),
|
|
26834
26815
|
isConfirmDisabled: !canSave,
|
|
26835
26816
|
children: ({ close }) => {
|
|
26836
26817
|
return /* @__PURE__ */ jsxs15(Fragment4, { children: [
|
|
@@ -26839,8 +26820,8 @@ function ConfirmationDialog({
|
|
|
26839
26820
|
confirmMessage || "Type the following value to confirm",
|
|
26840
26821
|
":"
|
|
26841
26822
|
] }),
|
|
26842
|
-
/* @__PURE__ */
|
|
26843
|
-
/* @__PURE__ */
|
|
26823
|
+
/* @__PURE__ */ jsx28("div", { className: ConfirmationDialog_default.value, children: value }),
|
|
26824
|
+
/* @__PURE__ */ jsx28(TextField, { autoFocus: true, "aria-label": "Confirmation", onChange: handleChange })
|
|
26844
26825
|
] });
|
|
26845
26826
|
}
|
|
26846
26827
|
}
|
|
@@ -26848,11 +26829,11 @@ function ConfirmationDialog({
|
|
|
26848
26829
|
}
|
|
26849
26830
|
|
|
26850
26831
|
// src/components/DataTable.tsx
|
|
26851
|
-
var
|
|
26852
|
-
import { Children as
|
|
26832
|
+
var import_classnames25 = __toESM(require_classnames());
|
|
26833
|
+
import { Children as Children2 } from "react";
|
|
26853
26834
|
|
|
26854
26835
|
// src/components/Table.tsx
|
|
26855
|
-
var
|
|
26836
|
+
var import_classnames24 = __toESM(require_classnames());
|
|
26856
26837
|
|
|
26857
26838
|
// src/components/Table.module.css
|
|
26858
26839
|
var Table_default = {
|
|
@@ -26868,32 +26849,32 @@ var Table_default = {
|
|
|
26868
26849
|
};
|
|
26869
26850
|
|
|
26870
26851
|
// src/components/Table.tsx
|
|
26871
|
-
import { jsx as
|
|
26852
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
26872
26853
|
function Table({ children, className, ...props }) {
|
|
26873
|
-
return /* @__PURE__ */
|
|
26854
|
+
return /* @__PURE__ */ jsx29($1910c06f0ca9905e$export$54ec01a60f47d33d, { ...props, className: (0, import_classnames24.default)(Table_default.table, className), "aria-label": "Table", children });
|
|
26874
26855
|
}
|
|
26875
26856
|
function TableHeader({ children, className, ...props }) {
|
|
26876
|
-
return /* @__PURE__ */
|
|
26857
|
+
return /* @__PURE__ */ jsx29($1910c06f0ca9905e$export$f850895b287ef28e, { ...props, className: (0, import_classnames24.default)(Table_default.header, className), children });
|
|
26877
26858
|
}
|
|
26878
26859
|
function TableBody({ children, className, ...props }) {
|
|
26879
|
-
return /* @__PURE__ */
|
|
26860
|
+
return /* @__PURE__ */ jsx29($1910c06f0ca9905e$export$76ccd210b9029917, { ...props, className: (0, import_classnames24.default)(Table_default.body, className), children });
|
|
26880
26861
|
}
|
|
26881
26862
|
function TableRow({ children, className, ...props }) {
|
|
26882
|
-
return /* @__PURE__ */
|
|
26863
|
+
return /* @__PURE__ */ jsx29($1910c06f0ca9905e$export$b59bdbef9ce70de2, { ...props, className: (0, import_classnames24.default)(Table_default.row, className), children });
|
|
26883
26864
|
}
|
|
26884
26865
|
function TableColumn({ children, className, alignment, ...props }) {
|
|
26885
|
-
return /* @__PURE__ */
|
|
26866
|
+
return /* @__PURE__ */ jsx29(
|
|
26886
26867
|
$1910c06f0ca9905e$export$816b5d811295e6bc,
|
|
26887
26868
|
{
|
|
26888
26869
|
...props,
|
|
26889
|
-
className: (0,
|
|
26870
|
+
className: (0, import_classnames24.default)(Table_default.column, className, alignment && Table_default[alignment]),
|
|
26890
26871
|
isRowHeader: true,
|
|
26891
26872
|
children
|
|
26892
26873
|
}
|
|
26893
26874
|
);
|
|
26894
26875
|
}
|
|
26895
26876
|
function TableCell({ children, className, alignment, ...props }) {
|
|
26896
|
-
return /* @__PURE__ */
|
|
26877
|
+
return /* @__PURE__ */ jsx29($1910c06f0ca9905e$export$f6f0c3fe4ec306ea, { ...props, className: (0, import_classnames24.default)(Table_default.cell, className, alignment && Table_default[alignment]), children });
|
|
26897
26878
|
}
|
|
26898
26879
|
|
|
26899
26880
|
// src/components/DataTable.module.css
|
|
@@ -26903,22 +26884,22 @@ var DataTable_default = {
|
|
|
26903
26884
|
};
|
|
26904
26885
|
|
|
26905
26886
|
// src/components/DataTable.tsx
|
|
26906
|
-
import { jsx as
|
|
26887
|
+
import { jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
26907
26888
|
import { createElement as createElement2 } from "react";
|
|
26908
26889
|
function DataTable({ data = [], className, children, ...props }) {
|
|
26909
|
-
const columns =
|
|
26890
|
+
const columns = Children2.map(children, (child) => {
|
|
26910
26891
|
return { ...child.props, value: child.props.children };
|
|
26911
26892
|
});
|
|
26912
|
-
return /* @__PURE__ */ jsxs16(Table, { ...props, className: (0,
|
|
26913
|
-
/* @__PURE__ */
|
|
26893
|
+
return /* @__PURE__ */ jsxs16(Table, { ...props, className: (0, import_classnames25.default)(DataTable_default.datatable, className), children: [
|
|
26894
|
+
/* @__PURE__ */ jsx30(TableHeader, { children: columns.map(({ id, label, hidden, ...columnProps }) => {
|
|
26914
26895
|
if (hidden) {
|
|
26915
26896
|
return null;
|
|
26916
26897
|
}
|
|
26917
26898
|
return /* @__PURE__ */ createElement2(TableColumn, { ...columnProps, key: id, id }, label);
|
|
26918
26899
|
}) }),
|
|
26919
|
-
/* @__PURE__ */
|
|
26920
|
-
return /* @__PURE__ */
|
|
26921
|
-
return /* @__PURE__ */ createElement2(TableCell, { ...cellProps, key: id, className: (0,
|
|
26900
|
+
/* @__PURE__ */ jsx30(TableBody, { items: data, children: (row) => {
|
|
26901
|
+
return /* @__PURE__ */ jsx30(TableRow, { children: columns.map(({ id, value, className: className2, ...cellProps }) => {
|
|
26902
|
+
return /* @__PURE__ */ createElement2(TableCell, { ...cellProps, key: id, className: (0, import_classnames25.default)(DataTable_default.cell, className2) }, !value && row[id], typeof value === "function" ? value(row, id) : value);
|
|
26922
26903
|
}) });
|
|
26923
26904
|
} })
|
|
26924
26905
|
] });
|
|
@@ -26928,7 +26909,7 @@ function DataColumn(props) {
|
|
|
26928
26909
|
}
|
|
26929
26910
|
|
|
26930
26911
|
// src/components/Dots.tsx
|
|
26931
|
-
var
|
|
26912
|
+
var import_classnames26 = __toESM(require_classnames());
|
|
26932
26913
|
|
|
26933
26914
|
// src/components/Dots.module.css
|
|
26934
26915
|
var Dots_default = {
|
|
@@ -26938,17 +26919,17 @@ var Dots_default = {
|
|
|
26938
26919
|
};
|
|
26939
26920
|
|
|
26940
26921
|
// src/components/Dots.tsx
|
|
26941
|
-
import { jsx as
|
|
26922
|
+
import { jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
26942
26923
|
function Dots({ className, ...props }) {
|
|
26943
|
-
return /* @__PURE__ */ jsxs17("div", { ...props, className: (0,
|
|
26944
|
-
/* @__PURE__ */
|
|
26945
|
-
/* @__PURE__ */
|
|
26946
|
-
/* @__PURE__ */
|
|
26924
|
+
return /* @__PURE__ */ jsxs17("div", { ...props, className: (0, import_classnames26.default)(Dots_default.dots, className), children: [
|
|
26925
|
+
/* @__PURE__ */ jsx31("div", { className: Dots_default.dot }),
|
|
26926
|
+
/* @__PURE__ */ jsx31("div", { className: Dots_default.dot }),
|
|
26927
|
+
/* @__PURE__ */ jsx31("div", { className: Dots_default.dot })
|
|
26947
26928
|
] });
|
|
26948
26929
|
}
|
|
26949
26930
|
|
|
26950
26931
|
// src/components/Heading.tsx
|
|
26951
|
-
var
|
|
26932
|
+
var import_classnames27 = __toESM(require_classnames());
|
|
26952
26933
|
|
|
26953
26934
|
// src/components/Heading.module.css
|
|
26954
26935
|
var Heading_default = {
|
|
@@ -26965,21 +26946,21 @@ var Heading_default = {
|
|
|
26965
26946
|
};
|
|
26966
26947
|
|
|
26967
26948
|
// src/components/Heading.tsx
|
|
26968
|
-
import { jsx as
|
|
26949
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
26969
26950
|
function Heading({ size = 5, className, children, asChild, ...props }) {
|
|
26970
26951
|
const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : "h1";
|
|
26971
|
-
return /* @__PURE__ */
|
|
26952
|
+
return /* @__PURE__ */ jsx32(
|
|
26972
26953
|
Component,
|
|
26973
26954
|
{
|
|
26974
26955
|
...props,
|
|
26975
|
-
className: (0,
|
|
26956
|
+
className: (0, import_classnames27.default)(Heading_default.heading, className, size && Heading_default[`size${size}`]),
|
|
26976
26957
|
children
|
|
26977
26958
|
}
|
|
26978
26959
|
);
|
|
26979
26960
|
}
|
|
26980
26961
|
|
|
26981
26962
|
// src/components/InlineEditField.tsx
|
|
26982
|
-
var
|
|
26963
|
+
var import_classnames28 = __toESM(require_classnames());
|
|
26983
26964
|
import { useState as useState6, useCallback } from "react";
|
|
26984
26965
|
|
|
26985
26966
|
// src/components/InlineEditField.module.css
|
|
@@ -26989,7 +26970,7 @@ var InlineEditField_default = {
|
|
|
26989
26970
|
};
|
|
26990
26971
|
|
|
26991
26972
|
// src/components/InlineEditField.tsx
|
|
26992
|
-
import { jsx as
|
|
26973
|
+
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
26993
26974
|
function InlineEditField({
|
|
26994
26975
|
value: defaultValue = "",
|
|
26995
26976
|
defaultEdit,
|
|
@@ -27029,12 +27010,12 @@ function InlineEditField({
|
|
|
27029
27010
|
{
|
|
27030
27011
|
"aria-label": "Edit",
|
|
27031
27012
|
...props,
|
|
27032
|
-
className: (0,
|
|
27013
|
+
className: (0, import_classnames28.default)(InlineEditField_default.edit, className),
|
|
27033
27014
|
onClick: handleEdit,
|
|
27034
27015
|
children: [
|
|
27035
27016
|
!edit && children,
|
|
27036
|
-
!edit && /* @__PURE__ */
|
|
27037
|
-
edit && /* @__PURE__ */
|
|
27017
|
+
!edit && /* @__PURE__ */ jsx33(Icon, { className: InlineEditField_default.icon, children: /* @__PURE__ */ jsx33(Icons.Edit, {}) }),
|
|
27018
|
+
edit && /* @__PURE__ */ jsx33(
|
|
27038
27019
|
TextField,
|
|
27039
27020
|
{
|
|
27040
27021
|
value,
|
|
@@ -27049,20 +27030,6 @@ function InlineEditField({
|
|
|
27049
27030
|
);
|
|
27050
27031
|
}
|
|
27051
27032
|
|
|
27052
|
-
// src/components/Label.tsx
|
|
27053
|
-
var import_classnames28 = __toESM(require_classnames());
|
|
27054
|
-
|
|
27055
|
-
// src/components/Label.module.css
|
|
27056
|
-
var Label_default = {
|
|
27057
|
-
label: "Label_label"
|
|
27058
|
-
};
|
|
27059
|
-
|
|
27060
|
-
// src/components/Label.tsx
|
|
27061
|
-
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
27062
|
-
function Label({ asChild, className, ...props }) {
|
|
27063
|
-
return /* @__PURE__ */ jsx33($01b77f81d0f07f68$export$b04be29aa201d4f5, { ...props, className: (0, import_classnames28.default)(Label_default.label, className) });
|
|
27064
|
-
}
|
|
27065
|
-
|
|
27066
27033
|
// src/components/Loading.tsx
|
|
27067
27034
|
var import_classnames29 = __toESM(require_classnames());
|
|
27068
27035
|
|
|
@@ -27148,7 +27115,8 @@ function Modal({ children, className, ...props }) {
|
|
|
27148
27115
|
}
|
|
27149
27116
|
|
|
27150
27117
|
// src/components/PasswordField.tsx
|
|
27151
|
-
import { useState as useState7 } from "react";
|
|
27118
|
+
import { useState as useState7, forwardRef as forwardRef4 } from "react";
|
|
27119
|
+
var import_classnames33 = __toESM(require_classnames());
|
|
27152
27120
|
|
|
27153
27121
|
// src/components/PasswordField.module.css
|
|
27154
27122
|
var PasswordField_default = {
|
|
@@ -27156,20 +27124,21 @@ var PasswordField_default = {
|
|
|
27156
27124
|
};
|
|
27157
27125
|
|
|
27158
27126
|
// src/components/PasswordField.tsx
|
|
27159
|
-
var import_classnames33 = __toESM(require_classnames());
|
|
27160
27127
|
import { jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
27161
|
-
|
|
27162
|
-
|
|
27163
|
-
|
|
27164
|
-
|
|
27165
|
-
|
|
27166
|
-
|
|
27167
|
-
|
|
27168
|
-
/* @__PURE__ */
|
|
27169
|
-
|
|
27170
|
-
|
|
27171
|
-
|
|
27172
|
-
}
|
|
27128
|
+
var PasswordField = forwardRef4(
|
|
27129
|
+
({ label, className, ...props }, ref) => {
|
|
27130
|
+
const [show, setShow] = useState7(false);
|
|
27131
|
+
const type = show ? "text" : "password";
|
|
27132
|
+
const handleShowPassword = () => setShow((state) => !state);
|
|
27133
|
+
return /* @__PURE__ */ jsxs21($bcdf0525bf22703d$export$2c73285ae9390cec, { ...props, ref, className: (0, import_classnames33.default)(Input_default.field, className), children: [
|
|
27134
|
+
label && /* @__PURE__ */ jsx38(Label, { children: label }),
|
|
27135
|
+
/* @__PURE__ */ jsxs21("div", { className: Input_default.row, children: [
|
|
27136
|
+
/* @__PURE__ */ jsx38($3985021b0ad6602f$export$f5b8910cec6cf069, { type, className: Input_default.input }),
|
|
27137
|
+
/* @__PURE__ */ jsx38(Icon, { onClick: handleShowPassword, className: (0, import_classnames33.default)(PasswordField_default.icon, Input_default.icon), children: show ? /* @__PURE__ */ jsx38(Icons.EyeSlash, {}) : /* @__PURE__ */ jsx38(Icons.Eye, {}) })
|
|
27138
|
+
] })
|
|
27139
|
+
] });
|
|
27140
|
+
}
|
|
27141
|
+
);
|
|
27173
27142
|
|
|
27174
27143
|
// src/components/Page.tsx
|
|
27175
27144
|
var import_classnames34 = __toESM(require_classnames());
|
|
@@ -27246,6 +27215,7 @@ function ProgressCircle({ className, showValue, ...props }) {
|
|
|
27246
27215
|
}
|
|
27247
27216
|
|
|
27248
27217
|
// src/components/RadioGroup.tsx
|
|
27218
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
27249
27219
|
var import_classnames37 = __toESM(require_classnames());
|
|
27250
27220
|
|
|
27251
27221
|
// src/components/RadioGroup.module.css
|
|
@@ -27255,16 +27225,21 @@ var RadioGroup_default = {
|
|
|
27255
27225
|
};
|
|
27256
27226
|
|
|
27257
27227
|
// src/components/RadioGroup.tsx
|
|
27258
|
-
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
27259
|
-
|
|
27260
|
-
|
|
27261
|
-
|
|
27228
|
+
import { jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
27229
|
+
var RadioGroup = forwardRef5(
|
|
27230
|
+
({ label, children, className, ...props }, ref) => {
|
|
27231
|
+
return /* @__PURE__ */ jsxs24($b6c3ddc6086f204d$export$a98f0dcb43a68a25, { ...props, ref, className: (0, import_classnames37.default)(RadioGroup_default.radiogroup, className), children: [
|
|
27232
|
+
label && /* @__PURE__ */ jsx42(Label, { children: label }),
|
|
27233
|
+
children
|
|
27234
|
+
] });
|
|
27235
|
+
}
|
|
27236
|
+
);
|
|
27262
27237
|
function Radio({ children, className, ...props }) {
|
|
27263
27238
|
return /* @__PURE__ */ jsx42($b6c3ddc6086f204d$export$d7b12c4107be0d61, { ...props, className: (0, import_classnames37.default)(RadioGroup_default.radio, className), children });
|
|
27264
27239
|
}
|
|
27265
27240
|
|
|
27266
27241
|
// src/components/SearchField.tsx
|
|
27267
|
-
import { useState as useState8, useEffect as useEffect4 } from "react";
|
|
27242
|
+
import { useState as useState8, useEffect as useEffect4, forwardRef as forwardRef6 } from "react";
|
|
27268
27243
|
var import_classnames38 = __toESM(require_classnames());
|
|
27269
27244
|
|
|
27270
27245
|
// src/components/SearchField.module.css
|
|
@@ -27275,43 +27250,56 @@ var SearchField_default = {
|
|
|
27275
27250
|
};
|
|
27276
27251
|
|
|
27277
27252
|
// src/components/SearchField.tsx
|
|
27278
|
-
import { jsx as jsx43, jsxs as
|
|
27279
|
-
|
|
27280
|
-
|
|
27281
|
-
|
|
27282
|
-
|
|
27283
|
-
const
|
|
27284
|
-
|
|
27285
|
-
|
|
27286
|
-
|
|
27287
|
-
|
|
27288
|
-
|
|
27289
|
-
|
|
27290
|
-
|
|
27291
|
-
|
|
27292
|
-
|
|
27293
|
-
|
|
27294
|
-
|
|
27295
|
-
|
|
27296
|
-
|
|
27297
|
-
|
|
27298
|
-
|
|
27299
|
-
return /* @__PURE__ */
|
|
27300
|
-
/* @__PURE__ */
|
|
27301
|
-
|
|
27302
|
-
|
|
27303
|
-
|
|
27304
|
-
|
|
27305
|
-
|
|
27306
|
-
|
|
27307
|
-
|
|
27308
|
-
|
|
27309
|
-
|
|
27310
|
-
|
|
27311
|
-
|
|
27253
|
+
import { Fragment as Fragment7, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
27254
|
+
var SearchField = forwardRef6(
|
|
27255
|
+
({ label, value, delay = 0, onSearch, className, ...props }, ref) => {
|
|
27256
|
+
const [search, setSearch] = useState8(value ?? "");
|
|
27257
|
+
const searchValue = useDebounce(search, delay);
|
|
27258
|
+
const handleChange = (e) => {
|
|
27259
|
+
const { value: value2 } = e.target;
|
|
27260
|
+
setSearch(value2);
|
|
27261
|
+
if (delay === 0 || value2 === "") {
|
|
27262
|
+
onSearch?.(value2);
|
|
27263
|
+
}
|
|
27264
|
+
};
|
|
27265
|
+
const resetSearch = () => {
|
|
27266
|
+
setSearch("");
|
|
27267
|
+
onSearch?.("");
|
|
27268
|
+
};
|
|
27269
|
+
useEffect4(() => {
|
|
27270
|
+
if (delay > 0) {
|
|
27271
|
+
onSearch?.(searchValue);
|
|
27272
|
+
}
|
|
27273
|
+
}, [searchValue, delay, onSearch]);
|
|
27274
|
+
return /* @__PURE__ */ jsx43($440f4836bcb56932$export$b94867ecbd698f21, { ...props, ref, className: (0, import_classnames38.default)(Input_default.field, className), children: ({ state }) => {
|
|
27275
|
+
return /* @__PURE__ */ jsxs25(Fragment7, { children: [
|
|
27276
|
+
label && /* @__PURE__ */ jsx43(Label, { children: label }),
|
|
27277
|
+
/* @__PURE__ */ jsxs25("div", { className: Input_default.row, children: [
|
|
27278
|
+
/* @__PURE__ */ jsx43(Icons.MagnifyingGlass, { className: (0, import_classnames38.default)(SearchField_default.search, Input_default.icon) }),
|
|
27279
|
+
/* @__PURE__ */ jsx43(
|
|
27280
|
+
$3985021b0ad6602f$export$f5b8910cec6cf069,
|
|
27281
|
+
{
|
|
27282
|
+
className: (0, import_classnames38.default)(SearchField_default.input, Input_default.input),
|
|
27283
|
+
onChange: handleChange
|
|
27284
|
+
}
|
|
27285
|
+
),
|
|
27286
|
+
state.value && /* @__PURE__ */ jsx43(
|
|
27287
|
+
$d2b4bc8c273e7be6$export$353f5b6fc5456de1,
|
|
27288
|
+
{
|
|
27289
|
+
className: (0, import_classnames38.default)(SearchField_default.close, Input_default.icon),
|
|
27290
|
+
onPress: resetSearch,
|
|
27291
|
+
children: /* @__PURE__ */ jsx43(Icon, { children: /* @__PURE__ */ jsx43(Icons.Close, {}) })
|
|
27292
|
+
}
|
|
27293
|
+
)
|
|
27294
|
+
] })
|
|
27295
|
+
] });
|
|
27296
|
+
} });
|
|
27297
|
+
}
|
|
27298
|
+
);
|
|
27312
27299
|
|
|
27313
27300
|
// src/components/Select.tsx
|
|
27314
27301
|
var import_classnames39 = __toESM(require_classnames());
|
|
27302
|
+
import { forwardRef as forwardRef7 } from "react";
|
|
27315
27303
|
|
|
27316
27304
|
// src/components/Select.module.css
|
|
27317
27305
|
var Select_default = {
|
|
@@ -27322,75 +27310,82 @@ var Select_default = {
|
|
|
27322
27310
|
};
|
|
27323
27311
|
|
|
27324
27312
|
// src/components/Select.tsx
|
|
27325
|
-
import { jsx as jsx44, jsxs as
|
|
27326
|
-
|
|
27327
|
-
|
|
27328
|
-
|
|
27329
|
-
|
|
27330
|
-
|
|
27331
|
-
|
|
27332
|
-
|
|
27333
|
-
|
|
27334
|
-
|
|
27335
|
-
|
|
27336
|
-
|
|
27337
|
-
|
|
27338
|
-
|
|
27339
|
-
|
|
27340
|
-
|
|
27341
|
-
|
|
27342
|
-
|
|
27343
|
-
|
|
27344
|
-
|
|
27345
|
-
|
|
27346
|
-
|
|
27347
|
-
|
|
27348
|
-
|
|
27349
|
-
/* @__PURE__ */ jsx44(
|
|
27350
|
-
/* @__PURE__ */ jsx44(
|
|
27351
|
-
|
|
27352
|
-
|
|
27353
|
-
|
|
27354
|
-
|
|
27355
|
-
|
|
27356
|
-
}
|
|
27313
|
+
import { jsx as jsx44, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
27314
|
+
var Select = forwardRef7(
|
|
27315
|
+
({
|
|
27316
|
+
children,
|
|
27317
|
+
items = [],
|
|
27318
|
+
value,
|
|
27319
|
+
label,
|
|
27320
|
+
className,
|
|
27321
|
+
onSelectionChange,
|
|
27322
|
+
onChange,
|
|
27323
|
+
...props
|
|
27324
|
+
}, ref) => {
|
|
27325
|
+
const handleChange = (e) => {
|
|
27326
|
+
onSelectionChange?.(e);
|
|
27327
|
+
onChange?.(e);
|
|
27328
|
+
};
|
|
27329
|
+
return /* @__PURE__ */ jsxs26(
|
|
27330
|
+
$82d7e5349645de74$export$ef9b1a59e592288f,
|
|
27331
|
+
{
|
|
27332
|
+
...props,
|
|
27333
|
+
ref,
|
|
27334
|
+
className: (0, import_classnames39.default)(Input_default.field, className),
|
|
27335
|
+
onSelectionChange: handleChange,
|
|
27336
|
+
children: [
|
|
27337
|
+
label && /* @__PURE__ */ jsx44(Label, { children: label }),
|
|
27338
|
+
/* @__PURE__ */ jsx44($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: (0, import_classnames39.default)(Input_default.input, className), children: /* @__PURE__ */ jsxs26(Row, { justifyContent: "space-between", gap: "md", children: [
|
|
27339
|
+
/* @__PURE__ */ jsx44($82d7e5349645de74$export$e288731fd71264f0, {}),
|
|
27340
|
+
/* @__PURE__ */ jsx44("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx44(Icon, { rotate: 90, size: "xs", className: Input_default.icon, children: /* @__PURE__ */ jsx44(Icons.Chevron, {}) }) })
|
|
27341
|
+
] }) }),
|
|
27342
|
+
/* @__PURE__ */ jsx44(Popover, { children: /* @__PURE__ */ jsx44(List, { items, className: Select_default.list, children }) })
|
|
27343
|
+
]
|
|
27344
|
+
}
|
|
27345
|
+
);
|
|
27346
|
+
}
|
|
27347
|
+
);
|
|
27357
27348
|
|
|
27358
27349
|
// src/components/Slider.tsx
|
|
27350
|
+
import { forwardRef as forwardRef8 } from "react";
|
|
27359
27351
|
var import_classnames40 = __toESM(require_classnames());
|
|
27360
27352
|
|
|
27361
27353
|
// src/components/Slider.module.css
|
|
27362
27354
|
var Slider_default = {
|
|
27363
27355
|
slider: "Slider_slider",
|
|
27364
|
-
|
|
27365
|
-
output: "Slider_output",
|
|
27356
|
+
header: "Slider_header",
|
|
27366
27357
|
track: "Slider_track",
|
|
27367
27358
|
fill: "Slider_fill",
|
|
27368
27359
|
thumb: "Slider_thumb"
|
|
27369
27360
|
};
|
|
27370
27361
|
|
|
27371
27362
|
// src/components/Slider.tsx
|
|
27372
|
-
import { Fragment as
|
|
27373
|
-
|
|
27374
|
-
|
|
27375
|
-
|
|
27376
|
-
|
|
27377
|
-
|
|
27378
|
-
|
|
27379
|
-
|
|
27380
|
-
|
|
27381
|
-
|
|
27382
|
-
|
|
27383
|
-
|
|
27384
|
-
|
|
27385
|
-
|
|
27363
|
+
import { Fragment as Fragment8, jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
27364
|
+
var Slider = forwardRef8(
|
|
27365
|
+
({ className, showValue = true, label, ...props }, ref) => {
|
|
27366
|
+
return /* @__PURE__ */ jsxs27($6f909507e6374d18$export$472062a354075cee, { ...props, ref, className: (0, import_classnames40.default)(Slider_default.slider, className), children: [
|
|
27367
|
+
/* @__PURE__ */ jsxs27("div", { className: Slider_default.header, children: [
|
|
27368
|
+
label && /* @__PURE__ */ jsx45(Label, { className: Slider_default.label, children: label }),
|
|
27369
|
+
showValue && /* @__PURE__ */ jsx45($6f909507e6374d18$export$a590f758a961cb5b, { className: Slider_default.output })
|
|
27370
|
+
] }),
|
|
27371
|
+
/* @__PURE__ */ jsx45($6f909507e6374d18$export$105594979f116971, { className: Slider_default.track, children: ({ state }) => {
|
|
27372
|
+
const isHorizontal = state.orientation === "horizontal";
|
|
27373
|
+
return /* @__PURE__ */ jsxs27(Fragment8, { children: [
|
|
27374
|
+
/* @__PURE__ */ jsx45(
|
|
27375
|
+
"div",
|
|
27376
|
+
{
|
|
27377
|
+
className: Slider_default.fill,
|
|
27378
|
+
style: {
|
|
27379
|
+
[isHorizontal ? "width" : "height"]: (isHorizontal ? state.getThumbPercent(0) : 1 - state.getThumbPercent(0)) * 100 + "%"
|
|
27380
|
+
}
|
|
27386
27381
|
}
|
|
27387
|
-
|
|
27388
|
-
|
|
27389
|
-
|
|
27390
|
-
|
|
27391
|
-
|
|
27392
|
-
|
|
27393
|
-
|
|
27382
|
+
),
|
|
27383
|
+
/* @__PURE__ */ jsx45($6f909507e6374d18$export$2c1b491743890dec, { className: Slider_default.thumb })
|
|
27384
|
+
] });
|
|
27385
|
+
} })
|
|
27386
|
+
] });
|
|
27387
|
+
}
|
|
27388
|
+
);
|
|
27394
27389
|
|
|
27395
27390
|
// src/components/StatusLight.tsx
|
|
27396
27391
|
var import_classnames41 = __toESM(require_classnames());
|
|
@@ -27408,10 +27403,10 @@ var StatusLight_default = {
|
|
|
27408
27403
|
};
|
|
27409
27404
|
|
|
27410
27405
|
// src/components/StatusLight.tsx
|
|
27411
|
-
import { jsx as jsx46, jsxs as
|
|
27406
|
+
import { jsx as jsx46, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
27412
27407
|
function StatusLight(props) {
|
|
27413
27408
|
const { color, variant = "inactive", children, className, ...domProps } = props;
|
|
27414
|
-
return /* @__PURE__ */
|
|
27409
|
+
return /* @__PURE__ */ jsxs28("div", { ...domProps, className: (0, import_classnames41.default)(StatusLight_default.statuslight, className), children: [
|
|
27415
27410
|
/* @__PURE__ */ jsx46("div", { className: StatusLight_default.bg, children: /* @__PURE__ */ jsx46(
|
|
27416
27411
|
"div",
|
|
27417
27412
|
{
|
|
@@ -27424,6 +27419,7 @@ function StatusLight(props) {
|
|
|
27424
27419
|
}
|
|
27425
27420
|
|
|
27426
27421
|
// src/components/Switch.tsx
|
|
27422
|
+
import { forwardRef as forwardRef9 } from "react";
|
|
27427
27423
|
var import_classnames42 = __toESM(require_classnames());
|
|
27428
27424
|
|
|
27429
27425
|
// src/components/Switch.module.css
|
|
@@ -27434,13 +27430,28 @@ var Switch_default = {
|
|
|
27434
27430
|
};
|
|
27435
27431
|
|
|
27436
27432
|
// src/components/Switch.tsx
|
|
27437
|
-
import { jsx as jsx47, jsxs as
|
|
27438
|
-
|
|
27439
|
-
|
|
27440
|
-
|
|
27441
|
-
children
|
|
27442
|
-
|
|
27443
|
-
|
|
27433
|
+
import { Fragment as Fragment9, jsx as jsx47, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
27434
|
+
var Switch = forwardRef9(
|
|
27435
|
+
({ label, children, className, ...props }, ref) => {
|
|
27436
|
+
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
27437
|
+
return /* @__PURE__ */ jsxs29(Fragment9, { children: [
|
|
27438
|
+
label && /* @__PURE__ */ jsx47(Label, { children: label }),
|
|
27439
|
+
/* @__PURE__ */ jsxs29(
|
|
27440
|
+
$8e59e948500a8fe1$export$b5d5cf8927ab7262,
|
|
27441
|
+
{
|
|
27442
|
+
...props,
|
|
27443
|
+
isSelected,
|
|
27444
|
+
ref,
|
|
27445
|
+
className: (0, import_classnames42.default)(Switch_default.switch, className),
|
|
27446
|
+
children: [
|
|
27447
|
+
/* @__PURE__ */ jsx47("div", { className: Switch_default.track, children: /* @__PURE__ */ jsx47("div", { className: Switch_default.knob }) }),
|
|
27448
|
+
children
|
|
27449
|
+
]
|
|
27450
|
+
}
|
|
27451
|
+
)
|
|
27452
|
+
] });
|
|
27453
|
+
}
|
|
27454
|
+
);
|
|
27444
27455
|
|
|
27445
27456
|
// src/components/Tabs.module.css
|
|
27446
27457
|
var Tabs_default = {
|
|
@@ -27483,20 +27494,29 @@ function TextOverflow({ asChild, children, className, ...props }) {
|
|
|
27483
27494
|
|
|
27484
27495
|
// src/components/TextArea.tsx
|
|
27485
27496
|
var import_classnames44 = __toESM(require_classnames());
|
|
27497
|
+
import { forwardRef as forwardRef10 } from "react";
|
|
27486
27498
|
|
|
27487
27499
|
// src/components/TextArea.module.css
|
|
27488
27500
|
var TextArea_default = {
|
|
27489
27501
|
textarea: "TextArea_textarea",
|
|
27490
|
-
none: "
|
|
27491
|
-
horizontal: "
|
|
27492
|
-
vertical: "
|
|
27502
|
+
"resize-none": "TextArea_resize-none",
|
|
27503
|
+
"resize-horizontal": "TextArea_resize-horizontal",
|
|
27504
|
+
"resize-vertical": "TextArea_resize-vertical"
|
|
27493
27505
|
};
|
|
27494
27506
|
|
|
27495
27507
|
// src/components/TextArea.tsx
|
|
27496
27508
|
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
27497
|
-
|
|
27498
|
-
return /* @__PURE__ */ jsx50(
|
|
27499
|
-
|
|
27509
|
+
var TextArea = forwardRef10(({ resize, className, ...props }, ref) => {
|
|
27510
|
+
return /* @__PURE__ */ jsx50(
|
|
27511
|
+
TextField,
|
|
27512
|
+
{
|
|
27513
|
+
...props,
|
|
27514
|
+
ref,
|
|
27515
|
+
className: (0, import_classnames44.default)(resize && TextArea_default[`resize-${resize}`]),
|
|
27516
|
+
asTextArea: true
|
|
27517
|
+
}
|
|
27518
|
+
);
|
|
27519
|
+
});
|
|
27500
27520
|
|
|
27501
27521
|
// src/components/Toast.tsx
|
|
27502
27522
|
var import_classnames45 = __toESM(require_classnames());
|
|
@@ -27598,7 +27618,7 @@ function composeContextScopes(...scopes) {
|
|
|
27598
27618
|
|
|
27599
27619
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
27600
27620
|
import * as React7 from "react";
|
|
27601
|
-
import { Fragment as
|
|
27621
|
+
import { Fragment as Fragment10, jsx as jsx52 } from "react/jsx-runtime";
|
|
27602
27622
|
var Slot = React7.forwardRef((props, forwardedRef) => {
|
|
27603
27623
|
const { children, ...slotProps } = props;
|
|
27604
27624
|
const childrenArray = React7.Children.toArray(children);
|
|
@@ -27632,7 +27652,7 @@ var SlotClone = React7.forwardRef((props, forwardedRef) => {
|
|
|
27632
27652
|
});
|
|
27633
27653
|
SlotClone.displayName = "SlotClone";
|
|
27634
27654
|
var Slottable = ({ children }) => {
|
|
27635
|
-
return /* @__PURE__ */ jsx52(
|
|
27655
|
+
return /* @__PURE__ */ jsx52(Fragment10, { children });
|
|
27636
27656
|
};
|
|
27637
27657
|
function isSlottable(child) {
|
|
27638
27658
|
return React7.isValidElement(child) && child.type === Slottable;
|
|
@@ -28221,7 +28241,7 @@ var VisuallyHidden = React17.forwardRef(
|
|
|
28221
28241
|
VisuallyHidden.displayName = NAME;
|
|
28222
28242
|
|
|
28223
28243
|
// node_modules/@radix-ui/react-toast/dist/index.mjs
|
|
28224
|
-
import { Fragment as
|
|
28244
|
+
import { Fragment as Fragment11, jsx as jsx58, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
28225
28245
|
var PROVIDER_NAME = "ToastProvider";
|
|
28226
28246
|
var [Collection, useCollection, createCollectionScope] = createCollection("Toast");
|
|
28227
28247
|
var [createToastContext, createToastScope] = createContextScope("Toast", [createCollectionScope]);
|
|
@@ -28375,7 +28395,7 @@ var ToastViewport = React18.forwardRef(
|
|
|
28375
28395
|
return () => viewport.removeEventListener("keydown", handleKeyDown);
|
|
28376
28396
|
}
|
|
28377
28397
|
}, [getItems, getSortedTabbableCandidates]);
|
|
28378
|
-
return /* @__PURE__ */
|
|
28398
|
+
return /* @__PURE__ */ jsxs30(
|
|
28379
28399
|
Branch,
|
|
28380
28400
|
{
|
|
28381
28401
|
ref: wrapperRef,
|
|
@@ -28567,7 +28587,7 @@ var ToastImpl = React18.forwardRef(
|
|
|
28567
28587
|
return node ? getAnnounceTextContent(node) : null;
|
|
28568
28588
|
}, [node]);
|
|
28569
28589
|
if (!context.viewport) return null;
|
|
28570
|
-
return /* @__PURE__ */
|
|
28590
|
+
return /* @__PURE__ */ jsxs30(Fragment11, { children: [
|
|
28571
28591
|
announceTextContent && /* @__PURE__ */ jsx58(
|
|
28572
28592
|
ToastAnnounce,
|
|
28573
28593
|
{
|
|
@@ -28687,7 +28707,7 @@ var ToastAnnounce = (props) => {
|
|
|
28687
28707
|
const timer = window.setTimeout(() => setIsAnnounced(true), 1e3);
|
|
28688
28708
|
return () => window.clearTimeout(timer);
|
|
28689
28709
|
}, []);
|
|
28690
|
-
return isAnnounced ? null : /* @__PURE__ */ jsx58(Portal, { asChild: true, children: /* @__PURE__ */ jsx58(VisuallyHidden, { ...announceProps, children: renderAnnounceText && /* @__PURE__ */
|
|
28710
|
+
return isAnnounced ? null : /* @__PURE__ */ jsx58(Portal, { asChild: true, children: /* @__PURE__ */ jsx58(VisuallyHidden, { ...announceProps, children: renderAnnounceText && /* @__PURE__ */ jsxs30(Fragment11, { children: [
|
|
28691
28711
|
context.label,
|
|
28692
28712
|
" ",
|
|
28693
28713
|
children
|
|
@@ -28848,7 +28868,7 @@ var Toast_default = {
|
|
|
28848
28868
|
};
|
|
28849
28869
|
|
|
28850
28870
|
// src/components/Toast.tsx
|
|
28851
|
-
import { Fragment as
|
|
28871
|
+
import { Fragment as Fragment12, jsx as jsx59, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
28852
28872
|
import { createElement as createElement4 } from "react";
|
|
28853
28873
|
var icons = {
|
|
28854
28874
|
info: Icons.Info,
|
|
@@ -28864,7 +28884,7 @@ function Toast2({
|
|
|
28864
28884
|
children,
|
|
28865
28885
|
...props
|
|
28866
28886
|
}) {
|
|
28867
|
-
return /* @__PURE__ */
|
|
28887
|
+
return /* @__PURE__ */ jsxs31(Root2, { ...props, className: (0, import_classnames45.default)(Toast_default.toast, className, variant && Toast_default[variant]), children: [
|
|
28868
28888
|
/* @__PURE__ */ jsx59(Icon, { className: Toast_default.icon, size: "md", children: variant && createElement3(icons[variant]) }),
|
|
28869
28889
|
title && /* @__PURE__ */ jsx59(ToastTitle, { className: Toast_default.title, children: title }),
|
|
28870
28890
|
description && /* @__PURE__ */ jsx59(ToastDescription, { className: Toast_default.description, children: description }),
|
|
@@ -28874,7 +28894,7 @@ function Toast2({
|
|
|
28874
28894
|
}
|
|
28875
28895
|
function Toaster(props) {
|
|
28876
28896
|
const { toasts } = useToast();
|
|
28877
|
-
return /* @__PURE__ */
|
|
28897
|
+
return /* @__PURE__ */ jsxs31(Fragment12, { children: [
|
|
28878
28898
|
toasts.map(({ id, message, props: props2 }) => {
|
|
28879
28899
|
return /* @__PURE__ */ createElement4(Toast2, { ...props2, key: id, description: message });
|
|
28880
28900
|
}),
|
|
@@ -28883,6 +28903,7 @@ function Toaster(props) {
|
|
|
28883
28903
|
}
|
|
28884
28904
|
|
|
28885
28905
|
// src/components/Toggle.tsx
|
|
28906
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
28886
28907
|
var import_classnames46 = __toESM(require_classnames());
|
|
28887
28908
|
|
|
28888
28909
|
// src/components/Toggle.module.css
|
|
@@ -28891,10 +28912,25 @@ var Toggle_default = {
|
|
|
28891
28912
|
};
|
|
28892
28913
|
|
|
28893
28914
|
// src/components/Toggle.tsx
|
|
28894
|
-
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
28895
|
-
|
|
28896
|
-
|
|
28897
|
-
|
|
28915
|
+
import { Fragment as Fragment13, jsx as jsx60, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
28916
|
+
var Toggle = forwardRef17(
|
|
28917
|
+
({ label, children, className, ...props }, ref) => {
|
|
28918
|
+
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
28919
|
+
return /* @__PURE__ */ jsxs32(Fragment13, { children: [
|
|
28920
|
+
label && /* @__PURE__ */ jsx60(Label, { children: label }),
|
|
28921
|
+
/* @__PURE__ */ jsx60(
|
|
28922
|
+
$efde0372d7a700fe$export$d2b052e7b4be1756,
|
|
28923
|
+
{
|
|
28924
|
+
...props,
|
|
28925
|
+
ref,
|
|
28926
|
+
isSelected,
|
|
28927
|
+
className: (0, import_classnames46.default)(Toggle_default.toggle, className),
|
|
28928
|
+
children
|
|
28929
|
+
}
|
|
28930
|
+
)
|
|
28931
|
+
] });
|
|
28932
|
+
}
|
|
28933
|
+
);
|
|
28898
28934
|
|
|
28899
28935
|
// src/components/ToggleGroup.tsx
|
|
28900
28936
|
var import_classnames47 = __toESM(require_classnames());
|
|
@@ -29333,19 +29369,19 @@ var Tooltip_default = {
|
|
|
29333
29369
|
};
|
|
29334
29370
|
|
|
29335
29371
|
// src/components/Tooltip.tsx
|
|
29336
|
-
import { jsx as jsx62, jsxs as
|
|
29372
|
+
import { jsx as jsx62, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
29337
29373
|
function Tooltip({ children, className, ...props }) {
|
|
29338
|
-
return /* @__PURE__ */
|
|
29374
|
+
return /* @__PURE__ */ jsxs33($4e3b923658d69c60$export$28c660c63b792dea, { ...props, className: (0, import_classnames48.default)(Tooltip_default.tooltip, className), children: [
|
|
29339
29375
|
/* @__PURE__ */ jsx62($44f671af83e7d9e0$export$746d02f47f4d381, { className: Tooltip_default.arrow, children: /* @__PURE__ */ jsx62("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx62("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
29340
29376
|
children
|
|
29341
29377
|
] });
|
|
29342
29378
|
}
|
|
29343
29379
|
|
|
29344
29380
|
// src/components/ZenProvider.tsx
|
|
29345
|
-
import { jsx as jsx63, jsxs as
|
|
29381
|
+
import { jsx as jsx63, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
29346
29382
|
function ZenProvider({ config = {}, children }) {
|
|
29347
29383
|
const { toast: toast2 } = config;
|
|
29348
|
-
return /* @__PURE__ */
|
|
29384
|
+
return /* @__PURE__ */ jsxs34(ToastProvider, { ...toast2, children: [
|
|
29349
29385
|
children,
|
|
29350
29386
|
/* @__PURE__ */ jsx63(Toaster, {})
|
|
29351
29387
|
] });
|
|
@@ -29464,28 +29500,6 @@ classnames/index.js:
|
|
|
29464
29500
|
http://jedwatson.github.io/classnames
|
|
29465
29501
|
*)
|
|
29466
29502
|
|
|
29467
|
-
use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js:
|
|
29468
|
-
(**
|
|
29469
|
-
* @license React
|
|
29470
|
-
* use-sync-external-store-shim.production.min.js
|
|
29471
|
-
*
|
|
29472
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
29473
|
-
*
|
|
29474
|
-
* This source code is licensed under the MIT license found in the
|
|
29475
|
-
* LICENSE file in the root directory of this source tree.
|
|
29476
|
-
*)
|
|
29477
|
-
|
|
29478
|
-
use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
|
|
29479
|
-
(**
|
|
29480
|
-
* @license React
|
|
29481
|
-
* use-sync-external-store-shim.development.js
|
|
29482
|
-
*
|
|
29483
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
29484
|
-
*
|
|
29485
|
-
* This source code is licensed under the MIT license found in the
|
|
29486
|
-
* LICENSE file in the root directory of this source tree.
|
|
29487
|
-
*)
|
|
29488
|
-
|
|
29489
29503
|
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js:
|
|
29490
29504
|
(**
|
|
29491
29505
|
* @license React
|