@ballistix.digital/react-components 7.4.0 → 8.0.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.d.ts +110 -133
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +378 -242
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +377 -241
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {jsx as $4MPRY$jsx, jsxs as $4MPRY$jsxs, Fragment as $4MPRY$Fragment} from "react/jsx-runtime";
|
|
2
2
|
import {ArrowPathIcon as $4MPRY$ArrowPathIcon, ChevronDownIcon as $4MPRY$ChevronDownIcon, EllipsisVerticalIcon as $4MPRY$EllipsisVerticalIcon, ExclamationCircleIcon as $4MPRY$ExclamationCircleIcon, ChevronDoubleLeftIcon as $4MPRY$ChevronDoubleLeftIcon, ChevronLeftIcon as $4MPRY$ChevronLeftIcon, ChevronRightIcon as $4MPRY$ChevronRightIcon, ChevronDoubleRightIcon as $4MPRY$ChevronDoubleRightIcon, ChevronUpDownIcon as $4MPRY$ChevronUpDownIcon, ChevronUpIcon as $4MPRY$ChevronUpIcon, HomeIcon as $4MPRY$HomeIcon, ArrowLongLeftIcon as $4MPRY$ArrowLongLeftIcon, ArrowLongRightIcon as $4MPRY$ArrowLongRightIcon} from "@heroicons/react/20/solid";
|
|
3
|
-
import {set as $4MPRY$set, get as $4MPRY$get, isArray as $4MPRY$isArray, map as $4MPRY$map, padStart as $4MPRY$padStart, noop as $4MPRY$noop, toSafeInteger as $4MPRY$toSafeInteger, indexOf as $4MPRY$indexOf, compact as $4MPRY$compact, forEach as $4MPRY$forEach, assign as $4MPRY$assign, includes as $4MPRY$includes, isEmpty as $4MPRY$isEmpty, some as $4MPRY$some, findIndex as $4MPRY$findIndex, last as $4MPRY$last, first as $4MPRY$first, find as $4MPRY$find,
|
|
3
|
+
import {set as $4MPRY$set, get as $4MPRY$get, isArray as $4MPRY$isArray, map as $4MPRY$map, padStart as $4MPRY$padStart, concat as $4MPRY$concat, isNull as $4MPRY$isNull, noop as $4MPRY$noop, toSafeInteger as $4MPRY$toSafeInteger, indexOf as $4MPRY$indexOf, compact as $4MPRY$compact, forEach as $4MPRY$forEach, assign as $4MPRY$assign, includes as $4MPRY$includes, isEmpty as $4MPRY$isEmpty, some as $4MPRY$some, findIndex as $4MPRY$findIndex, last as $4MPRY$last, first as $4MPRY$first, find as $4MPRY$find, times as $4MPRY$times, pick as $4MPRY$pick, isNil as $4MPRY$isNil, intersection as $4MPRY$intersection, trim as $4MPRY$trim, lastIndexOf as $4MPRY$lastIndexOf} from "lodash";
|
|
4
4
|
import $4MPRY$react, {useState as $4MPRY$useState, useMemo as $4MPRY$useMemo, useRef as $4MPRY$useRef, Children as $4MPRY$Children, Fragment as $4MPRY$Fragment1, useCallback as $4MPRY$useCallback, useEffect as $4MPRY$useEffect} from "react";
|
|
5
5
|
import $4MPRY$lodashget from "lodash/get";
|
|
6
6
|
import {library as $4MPRY$library} from "@fortawesome/fontawesome-svg-core";
|
|
@@ -1321,64 +1321,275 @@ var $49931a5175dab103$export$2e2bcd8739ae039 = $49931a5175dab103$var$ProgressTra
|
|
|
1321
1321
|
|
|
1322
1322
|
|
|
1323
1323
|
|
|
1324
|
+
|
|
1325
|
+
|
|
1326
|
+
var $26a2a503969671d2$var$base = {
|
|
1327
|
+
hint: 'text-gray-400 text-xs mt-1',
|
|
1328
|
+
error: 'text-red-500 text-xs ml-5 mt-1'
|
|
1329
|
+
};
|
|
1330
|
+
var $26a2a503969671d2$var$leading = {};
|
|
1331
|
+
var $26a2a503969671d2$var$trailing = {};
|
|
1332
|
+
var $26a2a503969671d2$var$normal = {
|
|
1333
|
+
hint: 'mt-2 text-sm'
|
|
1334
|
+
};
|
|
1335
|
+
var $26a2a503969671d2$var$inset = {
|
|
1336
|
+
hint: 'hidden'
|
|
1337
|
+
};
|
|
1338
|
+
var $26a2a503969671d2$var$overlapping = {
|
|
1339
|
+
hint: 'hidden'
|
|
1340
|
+
};
|
|
1341
|
+
var $26a2a503969671d2$var$pill = {
|
|
1342
|
+
hint: 'text-xs'
|
|
1343
|
+
};
|
|
1344
|
+
var $26a2a503969671d2$var$floored = {
|
|
1345
|
+
hint: 'text-xs mt-2'
|
|
1346
|
+
};
|
|
1347
|
+
var $26a2a503969671d2$var$invalid = {
|
|
1348
|
+
hint: 'text-sm text-red-600'
|
|
1349
|
+
};
|
|
1350
|
+
var $26a2a503969671d2$var$disabled = {
|
|
1351
|
+
hint: 'text-gray-500'
|
|
1352
|
+
};
|
|
1353
|
+
var $26a2a503969671d2$var$styles = {
|
|
1354
|
+
base: $26a2a503969671d2$var$base,
|
|
1355
|
+
leading: $26a2a503969671d2$var$leading,
|
|
1356
|
+
trailing: $26a2a503969671d2$var$trailing,
|
|
1357
|
+
normal: $26a2a503969671d2$var$normal,
|
|
1358
|
+
inset: $26a2a503969671d2$var$inset,
|
|
1359
|
+
overlapping: $26a2a503969671d2$var$overlapping,
|
|
1360
|
+
pill: $26a2a503969671d2$var$pill,
|
|
1361
|
+
floored: $26a2a503969671d2$var$floored,
|
|
1362
|
+
invalid: $26a2a503969671d2$var$invalid,
|
|
1363
|
+
disabled: $26a2a503969671d2$var$disabled
|
|
1364
|
+
};
|
|
1365
|
+
var $26a2a503969671d2$export$2e2bcd8739ae039 = $26a2a503969671d2$var$styles;
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
var $3b70ba41b110d1fa$var$InputFooter = function(props) {
|
|
1369
|
+
var name = props.name, hint = props.hint, error = props.error, isTouched = props.isTouched, stylesOverrides = props.styles, _a = props.type, type = _a === void 0 ? 'normal' : _a;
|
|
1370
|
+
var errorDataCy = "form-input-error-".concat(name);
|
|
1371
|
+
var handleGenerateStyle = function() {
|
|
1372
|
+
var result = (0, $b3fc44f26b625a32$export$e2d2075c69d9100d)((0, $26a2a503969671d2$export$2e2bcd8739ae039).base);
|
|
1373
|
+
var keys = (0, $ba1db6dce71c3f25$export$be5d6ab3c5b84767)((0, $26a2a503969671d2$export$2e2bcd8739ae039).base);
|
|
1374
|
+
keys.forEach(function(key) {
|
|
1375
|
+
(0, $4MPRY$set)(result, key, (0, $66c3dcaaa74b5389$export$4370d69198e9314a)((0, $4MPRY$get)((0, $26a2a503969671d2$export$2e2bcd8739ae039).base, key), (0, $4MPRY$get)((0, $26a2a503969671d2$export$2e2bcd8739ae039)[type], key), (0, $4MPRY$get)(stylesOverrides, key)));
|
|
1376
|
+
});
|
|
1377
|
+
return result;
|
|
1378
|
+
};
|
|
1379
|
+
var styles = handleGenerateStyle();
|
|
1380
|
+
var hintElement = (0, $4MPRY$useMemo)(function() {
|
|
1381
|
+
if (!hint || error && isTouched) return null;
|
|
1382
|
+
return (0, $4MPRY$jsx)("p", {
|
|
1383
|
+
className: styles.hint,
|
|
1384
|
+
children: hint
|
|
1385
|
+
});
|
|
1386
|
+
}, [
|
|
1387
|
+
hint,
|
|
1388
|
+
styles.hint,
|
|
1389
|
+
error,
|
|
1390
|
+
isTouched
|
|
1391
|
+
]);
|
|
1392
|
+
var errorElement = (0, $4MPRY$useMemo)(function() {
|
|
1393
|
+
if (!error) return null;
|
|
1394
|
+
return (0, $4MPRY$jsx)("p", {
|
|
1395
|
+
className: styles.error,
|
|
1396
|
+
"data-cy": errorDataCy,
|
|
1397
|
+
children: error
|
|
1398
|
+
});
|
|
1399
|
+
}, [
|
|
1400
|
+
error,
|
|
1401
|
+
styles.error,
|
|
1402
|
+
errorDataCy
|
|
1403
|
+
]);
|
|
1404
|
+
return (0, $4MPRY$jsxs)("div", {
|
|
1405
|
+
className: styles.foot,
|
|
1406
|
+
children: [
|
|
1407
|
+
hintElement,
|
|
1408
|
+
errorElement
|
|
1409
|
+
]
|
|
1410
|
+
});
|
|
1411
|
+
};
|
|
1412
|
+
var $3b70ba41b110d1fa$export$2e2bcd8739ae039 = $3b70ba41b110d1fa$var$InputFooter;
|
|
1413
|
+
|
|
1414
|
+
|
|
1415
|
+
|
|
1416
|
+
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
|
|
1420
|
+
|
|
1421
|
+
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
var $495392c79d755f40$var$base = {
|
|
1425
|
+
header: {
|
|
1426
|
+
container: 'flex flex-col justify-end',
|
|
1427
|
+
labelWrapper: 'flex',
|
|
1428
|
+
label: '',
|
|
1429
|
+
required: '',
|
|
1430
|
+
optional: 'ml-auto text-xs text-gray-500',
|
|
1431
|
+
description: 'text-xs'
|
|
1432
|
+
}
|
|
1433
|
+
};
|
|
1434
|
+
var $495392c79d755f40$var$normal = {
|
|
1435
|
+
header: {
|
|
1436
|
+
container: 'mb-2',
|
|
1437
|
+
label: 'leading-6 text-sm',
|
|
1438
|
+
optional: 'leading-6'
|
|
1439
|
+
}
|
|
1440
|
+
};
|
|
1441
|
+
var $495392c79d755f40$var$inset = {
|
|
1442
|
+
header: {
|
|
1443
|
+
label: 'text-xs',
|
|
1444
|
+
optional: 'text-xs'
|
|
1445
|
+
}
|
|
1446
|
+
};
|
|
1447
|
+
var $495392c79d755f40$var$overlapping = {
|
|
1448
|
+
header: {
|
|
1449
|
+
container: 'flex flex-col justify-end',
|
|
1450
|
+
labelWrapper: 'absolute flex justify-between items-center left-0 -top-2 right-0 mx-2 z-10 w-full',
|
|
1451
|
+
label: 'inline-block bg-white px-1 text-xs font-medium text-gray-900',
|
|
1452
|
+
required: '',
|
|
1453
|
+
optional: 'text-xs mr-4 bg-white px-1',
|
|
1454
|
+
description: 'hidden'
|
|
1455
|
+
}
|
|
1456
|
+
};
|
|
1457
|
+
var $495392c79d755f40$var$pill = {
|
|
1458
|
+
header: {
|
|
1459
|
+
labelWrapper: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mb-1 pr-6',
|
|
1460
|
+
description: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mb-1 pr-6'
|
|
1461
|
+
}
|
|
1462
|
+
};
|
|
1463
|
+
var $495392c79d755f40$var$floored = {
|
|
1464
|
+
header: {
|
|
1465
|
+
label: 'block text-sm font-medium leading-6 text-gray-900'
|
|
1466
|
+
}
|
|
1467
|
+
};
|
|
1468
|
+
var $495392c79d755f40$var$styles = {
|
|
1469
|
+
base: $495392c79d755f40$var$base,
|
|
1470
|
+
normal: $495392c79d755f40$var$normal,
|
|
1471
|
+
inset: $495392c79d755f40$var$inset,
|
|
1472
|
+
overlapping: $495392c79d755f40$var$overlapping,
|
|
1473
|
+
pill: $495392c79d755f40$var$pill,
|
|
1474
|
+
floored: $495392c79d755f40$var$floored
|
|
1475
|
+
};
|
|
1476
|
+
var $495392c79d755f40$export$2e2bcd8739ae039 = $495392c79d755f40$var$styles;
|
|
1477
|
+
|
|
1478
|
+
|
|
1479
|
+
var $38b37a8c0b4bec9d$var$InputHeader = function(props) {
|
|
1480
|
+
var name = props.name, label = props.label, description = props.description, required = props.required, _a = props.isRequired, isRequired = _a === void 0 ? false : _a, isOptionalLabelHidden = props.isOptionalLabelHidden, stylesOverrides = props.styles, _b = props.type, type = _b === void 0 ? 'normal' : _b;
|
|
1481
|
+
var handleGenerateStyle = function() {
|
|
1482
|
+
var result = (0, $b3fc44f26b625a32$export$e2d2075c69d9100d)((0, $495392c79d755f40$export$2e2bcd8739ae039).base);
|
|
1483
|
+
var keys = (0, $ba1db6dce71c3f25$export$be5d6ab3c5b84767)((0, $495392c79d755f40$export$2e2bcd8739ae039).base);
|
|
1484
|
+
keys.forEach(function(key) {
|
|
1485
|
+
(0, $4MPRY$set)(result, key, (0, $66c3dcaaa74b5389$export$4370d69198e9314a)((0, $4MPRY$get)((0, $495392c79d755f40$export$2e2bcd8739ae039).base, key), (0, $4MPRY$get)((0, $495392c79d755f40$export$2e2bcd8739ae039)[type], key), (0, $4MPRY$get)(stylesOverrides, key)));
|
|
1486
|
+
});
|
|
1487
|
+
return result;
|
|
1488
|
+
};
|
|
1489
|
+
var styles = handleGenerateStyle();
|
|
1490
|
+
var requiredLabel = (0, $4MPRY$useMemo)(function() {
|
|
1491
|
+
if (required) return required({
|
|
1492
|
+
isRequired: isRequired
|
|
1493
|
+
});
|
|
1494
|
+
else if (!isRequired && typeof label === 'string' && !isOptionalLabelHidden) return (0, $4MPRY$jsx)("span", {
|
|
1495
|
+
className: styles.header.optional,
|
|
1496
|
+
children: "Optional"
|
|
1497
|
+
});
|
|
1498
|
+
return null;
|
|
1499
|
+
}, [
|
|
1500
|
+
isOptionalLabelHidden,
|
|
1501
|
+
isRequired,
|
|
1502
|
+
label,
|
|
1503
|
+
required,
|
|
1504
|
+
styles.header.optional
|
|
1505
|
+
]);
|
|
1506
|
+
var labelElement = (0, $4MPRY$useMemo)(function() {
|
|
1507
|
+
if (!label && (0, $4MPRY$isNull)(requiredLabel)) return null;
|
|
1508
|
+
return (0, $4MPRY$jsxs)("div", {
|
|
1509
|
+
className: styles.header.labelWrapper,
|
|
1510
|
+
children: [
|
|
1511
|
+
(0, $4MPRY$jsx)("label", {
|
|
1512
|
+
htmlFor: name,
|
|
1513
|
+
className: styles.header.label,
|
|
1514
|
+
children: label
|
|
1515
|
+
}),
|
|
1516
|
+
requiredLabel
|
|
1517
|
+
]
|
|
1518
|
+
});
|
|
1519
|
+
}, [
|
|
1520
|
+
label,
|
|
1521
|
+
name,
|
|
1522
|
+
requiredLabel,
|
|
1523
|
+
styles.header.labelWrapper,
|
|
1524
|
+
styles.header.label
|
|
1525
|
+
]);
|
|
1526
|
+
var descriptionElement = (0, $4MPRY$useMemo)(function() {
|
|
1527
|
+
if (!description) return null;
|
|
1528
|
+
return (0, $4MPRY$jsx)("p", {
|
|
1529
|
+
className: styles.header.description,
|
|
1530
|
+
children: description
|
|
1531
|
+
});
|
|
1532
|
+
}, [
|
|
1533
|
+
description,
|
|
1534
|
+
styles.header.description
|
|
1535
|
+
]);
|
|
1536
|
+
if ((0, $4MPRY$isNull)(labelElement) && (0, $4MPRY$isNull)(descriptionElement)) return null;
|
|
1537
|
+
return (0, $4MPRY$jsxs)("div", {
|
|
1538
|
+
className: styles.header.container,
|
|
1539
|
+
children: [
|
|
1540
|
+
labelElement,
|
|
1541
|
+
descriptionElement
|
|
1542
|
+
]
|
|
1543
|
+
});
|
|
1544
|
+
};
|
|
1545
|
+
var $38b37a8c0b4bec9d$export$2e2bcd8739ae039 = $38b37a8c0b4bec9d$var$InputHeader;
|
|
1546
|
+
|
|
1547
|
+
|
|
1548
|
+
|
|
1549
|
+
|
|
1550
|
+
|
|
1551
|
+
|
|
1552
|
+
|
|
1553
|
+
|
|
1554
|
+
|
|
1324
1555
|
var $0249406a6f5edb4d$var$base = {
|
|
1325
1556
|
container: '',
|
|
1326
|
-
head: 'flex justify-between',
|
|
1327
1557
|
body: 'relative rounded-md',
|
|
1328
1558
|
foot: '',
|
|
1329
|
-
label: 'block font-medium text-gray-900',
|
|
1330
|
-
hint: 'text-xs text-gray-500',
|
|
1331
1559
|
leading: 'pointer-events-none absolute inset-y-0 left-0 flex items-center',
|
|
1332
1560
|
input: 'block w-full',
|
|
1333
1561
|
trailing: 'pointer-events-none absolute inset-y-0 right-0 flex items-center',
|
|
1334
|
-
|
|
1335
|
-
error: 'text-red-500 text-xs ml-5 mt-1'
|
|
1562
|
+
error: 'ml-5'
|
|
1336
1563
|
};
|
|
1337
1564
|
var $0249406a6f5edb4d$var$leading = {
|
|
1338
1565
|
input: 'pl-10'
|
|
1339
1566
|
};
|
|
1340
1567
|
var $0249406a6f5edb4d$var$trailing = {};
|
|
1341
1568
|
var $0249406a6f5edb4d$var$normal = {
|
|
1342
|
-
label: 'leading-6 text-sm mb-2',
|
|
1343
|
-
hint: 'leading-6',
|
|
1344
1569
|
leading: 'pl-3',
|
|
1345
1570
|
input: 'rounded-md border-gray-200 shadow-xs focus:border-primary-500 focus:ring-primary-500 sm:text-sm placeholder-gray-300',
|
|
1346
|
-
trailing: 'pr-3'
|
|
1347
|
-
description: 'mt-2 text-sm'
|
|
1571
|
+
trailing: 'pr-3'
|
|
1348
1572
|
};
|
|
1349
1573
|
var $0249406a6f5edb4d$var$inset = {
|
|
1350
1574
|
container: 'rounded-md px-3 pt-2.5 pb-1.5 shadow-xs ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-primary-600',
|
|
1351
|
-
|
|
1352
|
-
hint: 'text-xs',
|
|
1353
|
-
input: 'border-0 ring-0! p-0 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm pl-0',
|
|
1354
|
-
description: 'hidden'
|
|
1575
|
+
input: 'border-0 ring-0! p-0 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm pl-0'
|
|
1355
1576
|
};
|
|
1356
1577
|
var $0249406a6f5edb4d$var$overlapping = {
|
|
1357
1578
|
container: 'relative',
|
|
1358
|
-
|
|
1359
|
-
label: 'inline-block bg-white px-1 text-xs font-medium text-gray-900 ',
|
|
1360
|
-
hint: 'text-xs mr-4 bg-white px-1',
|
|
1361
|
-
input: 'block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6',
|
|
1362
|
-
description: 'hidden'
|
|
1579
|
+
input: 'block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6'
|
|
1363
1580
|
};
|
|
1364
1581
|
var $0249406a6f5edb4d$var$pill = {
|
|
1365
|
-
head: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mb-1 pr-6',
|
|
1366
1582
|
foot: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mt-1 pr-6',
|
|
1367
1583
|
input: 'block w-full rounded-full border-0 px-4 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6',
|
|
1368
|
-
trailing: 'pr-2'
|
|
1369
|
-
description: 'text-xs'
|
|
1584
|
+
trailing: 'pr-2'
|
|
1370
1585
|
};
|
|
1371
1586
|
var $0249406a6f5edb4d$var$floored = {
|
|
1372
1587
|
body: 'relative mt-2',
|
|
1373
|
-
|
|
1374
|
-
input: 'peer block w-full border-0 bg-gray-50 py-1.5 text-gray-900 focus:ring-0 sm:text-sm sm:leading-6 ring-0',
|
|
1375
|
-
description: 'text-xs mt-2'
|
|
1588
|
+
input: 'peer block w-full border-0 bg-gray-50 py-1.5 text-gray-900 focus:ring-0 sm:text-sm sm:leading-6 ring-0'
|
|
1376
1589
|
};
|
|
1377
1590
|
var $0249406a6f5edb4d$var$invalid = {
|
|
1378
1591
|
container: 'ring-red-500',
|
|
1379
|
-
input:
|
|
1380
|
-
'block w-full border border-transparent text-red-900 ring-1 ring-inset ring-red-300 placeholder:text-red-300 focus:ring-2 focus:ring-inset focus:ring-red-500 pr-10',
|
|
1381
|
-
description: 'text-sm text-red-600'
|
|
1592
|
+
input: 'block w-full border border-transparent text-red-900 ring-1 ring-inset ring-red-300 placeholder:text-red-300 focus:ring-2 focus:ring-inset focus:ring-red-500 pr-10'
|
|
1382
1593
|
};
|
|
1383
1594
|
var $0249406a6f5edb4d$var$disabled = {
|
|
1384
1595
|
input: 'block w-full rounded-md border-0 text-gray-900 shadow-xs ring-1 ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-500 disabled:ring-gray-200'
|
|
@@ -1401,7 +1612,7 @@ var $0249406a6f5edb4d$export$2e2bcd8739ae039 = $0249406a6f5edb4d$var$styles;
|
|
|
1401
1612
|
var $7b4ae85c2b92d7dd$var$InputGroupForm = function(props) {
|
|
1402
1613
|
var _a;
|
|
1403
1614
|
var _b;
|
|
1404
|
-
var name = props.name, _c = props.htmlType, htmlType = _c === void 0 ? 'text' : _c, label = props.label, description = props.description, placeholder = props.placeholder, leading = props.leading, trailing = props.trailing, required = props.required, value = props.value, mask = props.mask, min = props.min, max = props.max, maxLength = props.maxLength, rows = props.rows, error = props.error, _d = props.type, type = _d === void 0 ? 'normal' : _d, isDisabled = props.isDisabled, _e = props.isRequired, isRequired = _e === void 0 ? false : _e, _f = props.isTouched, isTouched = _f === void 0 ? false : _f, _g = props.isSolo, isSolo = _g === void 0 ? false : _g, onChange = props.onChange, onClear = props.onClear, onBlur = props.onBlur, onClick = props.onClick, onKeyDown = props.onKeyDown, setRefOnLoad = props.setRefOnLoad, stylesOverrides = props.styles;
|
|
1615
|
+
var name = props.name, _c = props.htmlType, htmlType = _c === void 0 ? 'text' : _c, label = props.label, hint = props.hint, description = props.description, placeholder = props.placeholder, leading = props.leading, trailing = props.trailing, required = props.required, value = props.value, mask = props.mask, min = props.min, max = props.max, maxLength = props.maxLength, rows = props.rows, error = props.error, _d = props.type, type = _d === void 0 ? 'normal' : _d, isDisabled = props.isDisabled, _e = props.isRequired, isRequired = _e === void 0 ? false : _e, _f = props.isTouched, isTouched = _f === void 0 ? false : _f, _g = props.isSolo, isSolo = _g === void 0 ? false : _g, _h = props.isOptionalLabelHidden, isOptionalLabelHidden = _h === void 0 ? false : _h, onChange = props.onChange, onClear = props.onClear, onBlur = props.onBlur, onClick = props.onClick, onKeyDown = props.onKeyDown, setRefOnLoad = props.setRefOnLoad, stylesOverrides = props.styles;
|
|
1405
1616
|
var isValid = error === undefined;
|
|
1406
1617
|
var maskRef = (0, $4MPRY$useMask)({
|
|
1407
1618
|
mask: mask === null || mask === void 0 ? void 0 : mask.mask,
|
|
@@ -1411,7 +1622,7 @@ var $7b4ae85c2b92d7dd$var$InputGroupForm = function(props) {
|
|
|
1411
1622
|
var ref = mask ? maskRef : defaultRef;
|
|
1412
1623
|
var handleGenerateStyle = function() {
|
|
1413
1624
|
var result = (0, $b3fc44f26b625a32$export$e2d2075c69d9100d)((0, $0249406a6f5edb4d$export$2e2bcd8739ae039).base);
|
|
1414
|
-
var keys = (0, $ba1db6dce71c3f25$export$be5d6ab3c5b84767)((0, $0249406a6f5edb4d$export$2e2bcd8739ae039).base);
|
|
1625
|
+
var keys = (0, $4MPRY$concat)((0, $ba1db6dce71c3f25$export$be5d6ab3c5b84767)((0, $0249406a6f5edb4d$export$2e2bcd8739ae039).base), (0, $ba1db6dce71c3f25$export$be5d6ab3c5b84767)((0, $26a2a503969671d2$export$2e2bcd8739ae039).base), (0, $ba1db6dce71c3f25$export$be5d6ab3c5b84767)((0, $495392c79d755f40$export$2e2bcd8739ae039).base));
|
|
1415
1626
|
keys.forEach(function(key) {
|
|
1416
1627
|
(0, $4MPRY$set)(result, key, (0, $66c3dcaaa74b5389$export$4370d69198e9314a)((0, $4MPRY$get)((0, $0249406a6f5edb4d$export$2e2bcd8739ae039).base, key), leading !== undefined && (0, $4MPRY$get)((0, $0249406a6f5edb4d$export$2e2bcd8739ae039).leading, key), trailing !== undefined && (0, $4MPRY$get)((0, $0249406a6f5edb4d$export$2e2bcd8739ae039).trailing, key), type && (0, $4MPRY$get)((0, $0249406a6f5edb4d$export$2e2bcd8739ae039)[type], key), isTouched === true && !isValid && (0, $4MPRY$get)((0, $0249406a6f5edb4d$export$2e2bcd8739ae039).invalid, key), isDisabled && (0, $4MPRY$get)((0, $0249406a6f5edb4d$export$2e2bcd8739ae039).disabled, key), (0, $4MPRY$get)(stylesOverrides, key)));
|
|
1417
1628
|
});
|
|
@@ -1424,7 +1635,6 @@ var $7b4ae85c2b92d7dd$var$InputGroupForm = function(props) {
|
|
|
1424
1635
|
});
|
|
1425
1636
|
var isClearable = !trailing && isValid && onClear && value !== '' && value;
|
|
1426
1637
|
var inputDataCy = "form-input-".concat(name);
|
|
1427
|
-
var errorDataCy = "form-input-error-".concat(name);
|
|
1428
1638
|
(0, $4MPRY$useEffect)(function() {
|
|
1429
1639
|
if (ref.current && ref.current !== null && setRefOnLoad) setRefOnLoad(ref);
|
|
1430
1640
|
}, [
|
|
@@ -1434,22 +1644,15 @@ var $7b4ae85c2b92d7dd$var$InputGroupForm = function(props) {
|
|
|
1434
1644
|
return (0, $4MPRY$jsxs)("div", {
|
|
1435
1645
|
className: styles.container,
|
|
1436
1646
|
children: [
|
|
1437
|
-
(0, $4MPRY$
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
className: styles.hint,
|
|
1447
|
-
children: "Optional"
|
|
1448
|
-
}),
|
|
1449
|
-
required && required({
|
|
1450
|
-
isRequired: isRequired
|
|
1451
|
-
})
|
|
1452
|
-
]
|
|
1647
|
+
(0, $4MPRY$jsx)((0, $38b37a8c0b4bec9d$export$2e2bcd8739ae039), {
|
|
1648
|
+
name: name,
|
|
1649
|
+
label: label,
|
|
1650
|
+
required: required,
|
|
1651
|
+
isRequired: isRequired,
|
|
1652
|
+
isOptionalLabelHidden: isOptionalLabelHidden,
|
|
1653
|
+
styles: styles,
|
|
1654
|
+
type: type,
|
|
1655
|
+
description: description
|
|
1453
1656
|
}),
|
|
1454
1657
|
(0, $4MPRY$jsxs)("div", {
|
|
1455
1658
|
className: styles.body,
|
|
@@ -1528,19 +1731,13 @@ var $7b4ae85c2b92d7dd$var$InputGroupForm = function(props) {
|
|
|
1528
1731
|
})
|
|
1529
1732
|
]
|
|
1530
1733
|
}),
|
|
1531
|
-
(0, $4MPRY$
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
error && isTouched && (0, $4MPRY$jsx)("p", {
|
|
1539
|
-
className: styles.error,
|
|
1540
|
-
"data-cy": errorDataCy,
|
|
1541
|
-
children: error
|
|
1542
|
-
})
|
|
1543
|
-
]
|
|
1734
|
+
(0, $4MPRY$jsx)((0, $3b70ba41b110d1fa$export$2e2bcd8739ae039), {
|
|
1735
|
+
name: name,
|
|
1736
|
+
hint: hint,
|
|
1737
|
+
error: error,
|
|
1738
|
+
isTouched: isTouched,
|
|
1739
|
+
styles: styles,
|
|
1740
|
+
type: type
|
|
1544
1741
|
})
|
|
1545
1742
|
]
|
|
1546
1743
|
});
|
|
@@ -1986,13 +2183,11 @@ https://www.npmjs.com/package/react-tailwindcss-select
|
|
|
1986
2183
|
|
|
1987
2184
|
|
|
1988
2185
|
|
|
2186
|
+
|
|
1989
2187
|
var $9ff97c477ac85f31$var$base = {
|
|
1990
2188
|
container: '',
|
|
1991
|
-
head: 'flex justify-between',
|
|
1992
2189
|
body: 'relative rounded-md',
|
|
1993
2190
|
foot: '',
|
|
1994
|
-
label: 'block font-medium text-gray-900',
|
|
1995
|
-
hint: 'text-xs text-gray-500',
|
|
1996
2191
|
leading: 'pointer-events-none absolute inset-y-0 left-0 flex items-center',
|
|
1997
2192
|
input: 'block w-full flex border',
|
|
1998
2193
|
menuButton: '',
|
|
@@ -2019,8 +2214,6 @@ var $9ff97c477ac85f31$var$leading = {
|
|
|
2019
2214
|
};
|
|
2020
2215
|
var $9ff97c477ac85f31$var$trailing = {};
|
|
2021
2216
|
var $9ff97c477ac85f31$var$normal = {
|
|
2022
|
-
label: 'leading-6 text-sm mb-2',
|
|
2023
|
-
hint: 'leading-6',
|
|
2024
2217
|
leading: 'pl-3',
|
|
2025
2218
|
input: 'rounded-md border-gray-200 shadow-xs focus:border-primary-500 focus:ring-primary-500 sm:text-sm placeholder-gray-300',
|
|
2026
2219
|
trailing: '',
|
|
@@ -2028,21 +2221,15 @@ var $9ff97c477ac85f31$var$normal = {
|
|
|
2028
2221
|
};
|
|
2029
2222
|
var $9ff97c477ac85f31$var$inset = {
|
|
2030
2223
|
container: 'rounded-md px-3 pt-2.5 pb-1.5 shadow-xs ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-primary-600',
|
|
2031
|
-
label: 'text-xs',
|
|
2032
|
-
hint: 'text-xs',
|
|
2033
2224
|
input: 'border-0 ring-0! p-0 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm pl-0',
|
|
2034
2225
|
description: 'hidden'
|
|
2035
2226
|
};
|
|
2036
2227
|
var $9ff97c477ac85f31$var$overlapping = {
|
|
2037
2228
|
container: 'relative',
|
|
2038
|
-
head: ' absolute flex justify-between items-center left-0 -top-2 right-0 mx-2 z-10 w-full',
|
|
2039
|
-
label: 'inline-block bg-white px-1 text-xs font-medium text-gray-900 ',
|
|
2040
|
-
hint: 'text-xs mr-4 bg-white px-1',
|
|
2041
2229
|
input: 'block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6',
|
|
2042
2230
|
description: 'hidden'
|
|
2043
2231
|
};
|
|
2044
2232
|
var $9ff97c477ac85f31$var$pill = {
|
|
2045
|
-
head: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mb-1 pr-6',
|
|
2046
2233
|
foot: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mt-1 pr-6',
|
|
2047
2234
|
input: 'block w-full rounded-full border-0 px-4 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6',
|
|
2048
2235
|
trailing: 'pr-2',
|
|
@@ -2050,7 +2237,6 @@ var $9ff97c477ac85f31$var$pill = {
|
|
|
2050
2237
|
};
|
|
2051
2238
|
var $9ff97c477ac85f31$var$floored = {
|
|
2052
2239
|
body: 'relative mt-2',
|
|
2053
|
-
label: 'block text-sm font-medium leading-6 text-gray-900',
|
|
2054
2240
|
input: 'peer block w-full border-0 bg-gray-50 py-1.5 text-gray-900 focus:ring-0 sm:text-sm sm:leading-6 ring-0',
|
|
2055
2241
|
description: 'text-xs mt-2'
|
|
2056
2242
|
};
|
|
@@ -2080,9 +2266,9 @@ var $9ff97c477ac85f31$export$2e2bcd8739ae039 = $9ff97c477ac85f31$var$styles;
|
|
|
2080
2266
|
|
|
2081
2267
|
var $40038b27a5148d69$var$SelectMenuForm = function(props) {
|
|
2082
2268
|
var _a;
|
|
2083
|
-
var _b = props.name, name = _b === void 0 ? 'select-menu-form' : _b, label = props.label, description = props.description, placeholder = props.placeholder, options = props.options, required = props.required, value = props.value, error = props.error, _c = props.isRequired, isRequired = _c === void 0 ? false : _c, isLoading = props.isLoading, _d = props.isTouched, isTouched = _d === void 0 ? false : _d, isDisabled = props.isDisabled, _e = props.isClearable, isClearable = _e === void 0 ? true : _e, _f = props.isMultiple, isMultiple = _f === void 0 ? false : _f, _g = props.isSearchable, isSearchable = _g === void 0 ? true : _g, _h = props.isSolo, isSolo = _h === void 0 ? false : _h, onChange = props.onChange, onSearchInputChange = props.onSearchInputChange, onClear = props.onClear, onBlur = props.onBlur, stylesOverrides = props.styles;
|
|
2084
|
-
var
|
|
2085
|
-
var
|
|
2269
|
+
var _b = props.name, name = _b === void 0 ? 'select-menu-form' : _b, label = props.label, description = props.description, placeholder = props.placeholder, options = props.options, required = props.required, value = props.value, error = props.error, _c = props.isRequired, isRequired = _c === void 0 ? false : _c, isLoading = props.isLoading, _d = props.isTouched, isTouched = _d === void 0 ? false : _d, isDisabled = props.isDisabled, _e = props.isClearable, isClearable = _e === void 0 ? true : _e, _f = props.isMultiple, isMultiple = _f === void 0 ? false : _f, _g = props.isSearchable, isSearchable = _g === void 0 ? true : _g, _h = props.isSolo, isSolo = _h === void 0 ? false : _h, _j = props.isOptionalLabelHidden, isOptionalLabelHidden = _j === void 0 ? false : _j, onChange = props.onChange, onSearchInputChange = props.onSearchInputChange, onClear = props.onClear, onBlur = props.onBlur, stylesOverrides = props.styles;
|
|
2270
|
+
var _k = (0, $4MPRY$useState)(true), isFocus = _k[0], setIsFocus = _k[1];
|
|
2271
|
+
var _l = (0, $4MPRY$useState)(value !== null && value !== void 0 ? value : null), state = _l[0], setState = _l[1];
|
|
2086
2272
|
var isValid = error === undefined;
|
|
2087
2273
|
var selectDataCy = "form-select-".concat(name);
|
|
2088
2274
|
var errorDataCy = "form-select-error-".concat(name);
|
|
@@ -2120,25 +2306,28 @@ var $40038b27a5148d69$var$SelectMenuForm = function(props) {
|
|
|
2120
2306
|
}, [
|
|
2121
2307
|
value
|
|
2122
2308
|
]);
|
|
2309
|
+
var descriptionElement = (0, $4MPRY$useMemo)(function() {
|
|
2310
|
+
if (!description || error && isTouched) return null;
|
|
2311
|
+
return (0, $4MPRY$jsx)("p", {
|
|
2312
|
+
className: styles.description,
|
|
2313
|
+
children: description
|
|
2314
|
+
});
|
|
2315
|
+
}, [
|
|
2316
|
+
description,
|
|
2317
|
+
error,
|
|
2318
|
+
isTouched,
|
|
2319
|
+
styles.description
|
|
2320
|
+
]);
|
|
2123
2321
|
return (0, $4MPRY$jsxs)("div", {
|
|
2124
2322
|
className: styles.container,
|
|
2125
2323
|
children: [
|
|
2126
|
-
(0, $4MPRY$
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
}),
|
|
2134
|
-
!required && !isRequired && typeof label === 'string' && (0, $4MPRY$jsx)("span", {
|
|
2135
|
-
className: styles.hint,
|
|
2136
|
-
children: "Optional"
|
|
2137
|
-
}),
|
|
2138
|
-
required && required({
|
|
2139
|
-
isRequired: isRequired
|
|
2140
|
-
})
|
|
2141
|
-
]
|
|
2324
|
+
(0, $4MPRY$jsx)((0, $38b37a8c0b4bec9d$export$2e2bcd8739ae039), {
|
|
2325
|
+
name: name,
|
|
2326
|
+
label: label,
|
|
2327
|
+
required: required,
|
|
2328
|
+
isRequired: isRequired,
|
|
2329
|
+
isOptionalLabelHidden: isOptionalLabelHidden,
|
|
2330
|
+
styles: styles
|
|
2142
2331
|
}),
|
|
2143
2332
|
(0, $4MPRY$jsxs)("div", {
|
|
2144
2333
|
className: styles.container,
|
|
@@ -2194,10 +2383,7 @@ var $40038b27a5148d69$var$SelectMenuForm = function(props) {
|
|
|
2194
2383
|
!isSolo && (0, $4MPRY$jsxs)("div", {
|
|
2195
2384
|
className: styles.foot,
|
|
2196
2385
|
children: [
|
|
2197
|
-
|
|
2198
|
-
className: styles.description,
|
|
2199
|
-
children: description
|
|
2200
|
-
}),
|
|
2386
|
+
descriptionElement,
|
|
2201
2387
|
error && isTouched && (0, $4MPRY$jsx)("p", {
|
|
2202
2388
|
className: styles.error,
|
|
2203
2389
|
"data-cy": errorDataCy,
|
|
@@ -5870,13 +6056,10 @@ var $785bf8949af26aa5$export$2e2bcd8739ae039 = $785bf8949af26aa5$var$CheckboxInp
|
|
|
5870
6056
|
|
|
5871
6057
|
|
|
5872
6058
|
|
|
6059
|
+
|
|
5873
6060
|
var $f0d9d349d6a2ba53$var$base = {
|
|
5874
|
-
label: 'block font-medium text-gray-900 leading-6 text-sm mb-2 mr-1',
|
|
5875
6061
|
container: 'flex flex-col',
|
|
5876
|
-
head: 'flex justify-between',
|
|
5877
|
-
hint: 'text-xs text-gray-500',
|
|
5878
6062
|
foot: 'flex flex-col',
|
|
5879
|
-
description: 'text-gray-400 text-xs mt-1',
|
|
5880
6063
|
switch: {
|
|
5881
6064
|
container: 'flex flex-col',
|
|
5882
6065
|
base: 'relative inline-flex w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out',
|
|
@@ -5895,8 +6078,7 @@ var $f0d9d349d6a2ba53$var$base = {
|
|
|
5895
6078
|
hidden: 'opacity-0 ease-out duration-100',
|
|
5896
6079
|
shown: 'opacity-100 ease-in duration-200',
|
|
5897
6080
|
icon: 'h-3 w-3'
|
|
5898
|
-
}
|
|
5899
|
-
error: 'text-red-500 text-xs ml-0 mt-2'
|
|
6081
|
+
}
|
|
5900
6082
|
};
|
|
5901
6083
|
var $f0d9d349d6a2ba53$var$md = {
|
|
5902
6084
|
switch: {
|
|
@@ -5924,80 +6106,28 @@ var $f0d9d349d6a2ba53$export$2e2bcd8739ae039 = $f0d9d349d6a2ba53$var$styles;
|
|
|
5924
6106
|
|
|
5925
6107
|
|
|
5926
6108
|
var $10ded3c19afe27a9$var$Switch = function(props) {
|
|
5927
|
-
var name = props.name, label = props.label, description = props.description, isDisabled = props.isDisabled, _a = props.isRequired, isRequired = _a === void 0 ? false : _a, required = props.required, _b = props.isTouched, isTouched = _b === void 0 ? false : _b, error = props.error, value = props.value, stylesOverrides = props.styles, _c = props.size, size = _c === void 0 ? 'md' : _c, _d = props.isOptionalLabelHidden, isOptionalLabelHidden = _d === void 0 ? false : _d, onChange = props.onChange, iconAccessorChecked = props.iconAccessorChecked, iconAccessorUnchecked = props.iconAccessorUnchecked;
|
|
6109
|
+
var name = props.name, label = props.label, description = props.description, hint = props.hint, isDisabled = props.isDisabled, _a = props.isRequired, isRequired = _a === void 0 ? false : _a, required = props.required, _b = props.isTouched, isTouched = _b === void 0 ? false : _b, error = props.error, value = props.value, stylesOverrides = props.styles, _c = props.size, size = _c === void 0 ? 'md' : _c, _d = props.isOptionalLabelHidden, isOptionalLabelHidden = _d === void 0 ? false : _d, onChange = props.onChange, iconAccessorChecked = props.iconAccessorChecked, iconAccessorUnchecked = props.iconAccessorUnchecked;
|
|
5928
6110
|
var inputDataCy = "form-input-".concat(name);
|
|
5929
|
-
var errorDataCy = "form-input-error-".concat(name);
|
|
5930
6111
|
var handleGenerateStyle = function() {
|
|
5931
6112
|
var result = (0, $b3fc44f26b625a32$export$e2d2075c69d9100d)((0, $f0d9d349d6a2ba53$export$2e2bcd8739ae039).base);
|
|
5932
|
-
var keys = (0, $ba1db6dce71c3f25$export$be5d6ab3c5b84767)((0, $f0d9d349d6a2ba53$export$2e2bcd8739ae039).base);
|
|
6113
|
+
var keys = (0, $4MPRY$concat)((0, $ba1db6dce71c3f25$export$be5d6ab3c5b84767)((0, $f0d9d349d6a2ba53$export$2e2bcd8739ae039).base), (0, $ba1db6dce71c3f25$export$be5d6ab3c5b84767)((0, $26a2a503969671d2$export$2e2bcd8739ae039).base), (0, $ba1db6dce71c3f25$export$be5d6ab3c5b84767)((0, $495392c79d755f40$export$2e2bcd8739ae039).base));
|
|
5933
6114
|
(0, $4MPRY$forEach)(keys, function(key) {
|
|
5934
|
-
(0, $4MPRY$set)(result, key, (0, $66c3dcaaa74b5389$export$4370d69198e9314a)((0, $4MPRY$get)((0, $f0d9d349d6a2ba53$export$2e2bcd8739ae039).base, key), (0, $4MPRY$get)((0, $f0d9d349d6a2ba53$export$2e2bcd8739ae039)[size], key), (0, $4MPRY$get)(stylesOverrides
|
|
6115
|
+
(0, $4MPRY$set)(result, key, (0, $66c3dcaaa74b5389$export$4370d69198e9314a)((0, $4MPRY$get)((0, $f0d9d349d6a2ba53$export$2e2bcd8739ae039).base, key), (0, $4MPRY$get)((0, $f0d9d349d6a2ba53$export$2e2bcd8739ae039)[size], key), (0, $4MPRY$get)(stylesOverrides, key)));
|
|
5935
6116
|
});
|
|
5936
6117
|
return result;
|
|
5937
6118
|
};
|
|
5938
6119
|
var styles = handleGenerateStyle();
|
|
5939
|
-
var labelComponent = (0, $4MPRY$useMemo)(function() {
|
|
5940
|
-
if (!label) return null;
|
|
5941
|
-
return (0, $4MPRY$jsx)("label", {
|
|
5942
|
-
htmlFor: name,
|
|
5943
|
-
className: styles.label,
|
|
5944
|
-
children: label
|
|
5945
|
-
});
|
|
5946
|
-
}, [
|
|
5947
|
-
label,
|
|
5948
|
-
name,
|
|
5949
|
-
styles.label
|
|
5950
|
-
]);
|
|
5951
|
-
var optionalLabelComponent = (0, $4MPRY$useMemo)(function() {
|
|
5952
|
-
if (required || isRequired || typeof label !== 'string' || isOptionalLabelHidden) return null;
|
|
5953
|
-
return (0, $4MPRY$jsx)("span", {
|
|
5954
|
-
className: styles.hint,
|
|
5955
|
-
children: "Optional"
|
|
5956
|
-
});
|
|
5957
|
-
}, [
|
|
5958
|
-
isOptionalLabelHidden,
|
|
5959
|
-
isRequired,
|
|
5960
|
-
label,
|
|
5961
|
-
required,
|
|
5962
|
-
styles.hint
|
|
5963
|
-
]);
|
|
5964
|
-
var footComponent = (0, $4MPRY$useMemo)(function() {
|
|
5965
|
-
if (!description && !error) return null;
|
|
5966
|
-
return (0, $4MPRY$jsxs)("div", {
|
|
5967
|
-
className: styles.foot,
|
|
5968
|
-
children: [
|
|
5969
|
-
description && !(error && isTouched) && (0, $4MPRY$jsx)("p", {
|
|
5970
|
-
className: styles.description,
|
|
5971
|
-
children: description
|
|
5972
|
-
}),
|
|
5973
|
-
error && isTouched && (0, $4MPRY$jsx)("p", {
|
|
5974
|
-
className: styles.error,
|
|
5975
|
-
"data-cy": errorDataCy,
|
|
5976
|
-
children: error
|
|
5977
|
-
})
|
|
5978
|
-
]
|
|
5979
|
-
});
|
|
5980
|
-
}, [
|
|
5981
|
-
description,
|
|
5982
|
-
error,
|
|
5983
|
-
errorDataCy,
|
|
5984
|
-
isTouched,
|
|
5985
|
-
styles.description,
|
|
5986
|
-
styles.error,
|
|
5987
|
-
styles.foot
|
|
5988
|
-
]);
|
|
5989
6120
|
return (0, $4MPRY$jsxs)("div", {
|
|
5990
6121
|
className: styles.container,
|
|
5991
6122
|
children: [
|
|
5992
|
-
(0, $4MPRY$
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
]
|
|
6123
|
+
(0, $4MPRY$jsx)((0, $38b37a8c0b4bec9d$export$2e2bcd8739ae039), {
|
|
6124
|
+
name: name,
|
|
6125
|
+
label: label,
|
|
6126
|
+
description: description,
|
|
6127
|
+
required: required,
|
|
6128
|
+
isRequired: isRequired,
|
|
6129
|
+
isOptionalLabelHidden: isOptionalLabelHidden,
|
|
6130
|
+
styles: styles
|
|
6001
6131
|
}),
|
|
6002
6132
|
(0, $4MPRY$jsx)("div", {
|
|
6003
6133
|
className: styles.switch.container,
|
|
@@ -6039,7 +6169,13 @@ var $10ded3c19afe27a9$var$Switch = function(props) {
|
|
|
6039
6169
|
]
|
|
6040
6170
|
})
|
|
6041
6171
|
}),
|
|
6042
|
-
|
|
6172
|
+
(0, $4MPRY$jsx)((0, $3b70ba41b110d1fa$export$2e2bcd8739ae039), {
|
|
6173
|
+
name: name,
|
|
6174
|
+
error: error,
|
|
6175
|
+
isTouched: isTouched,
|
|
6176
|
+
hint: hint,
|
|
6177
|
+
styles: styles
|
|
6178
|
+
})
|
|
6043
6179
|
]
|
|
6044
6180
|
});
|
|
6045
6181
|
};
|
|
@@ -6268,6 +6404,83 @@ var $b1b6aa72505b2474$export$2e2bcd8739ae039 = $b1b6aa72505b2474$var$FileInputGr
|
|
|
6268
6404
|
|
|
6269
6405
|
|
|
6270
6406
|
|
|
6407
|
+
var $2109d011c77499b4$var$base = {
|
|
6408
|
+
container: '',
|
|
6409
|
+
head: 'flex justify-between',
|
|
6410
|
+
body: 'relative rounded-md py-2',
|
|
6411
|
+
foot: '',
|
|
6412
|
+
label: 'block font-medium text-gray-900',
|
|
6413
|
+
hint: 'text-xs text-gray-500',
|
|
6414
|
+
leading: 'pointer-events-none absolute inset-y-0 left-0 flex items-center',
|
|
6415
|
+
input: 'block w-full',
|
|
6416
|
+
trailing: 'pointer-events-none absolute inset-y-0 right-0 flex items-center',
|
|
6417
|
+
description: 'text-gray-400 text-xs mt-1',
|
|
6418
|
+
error: 'text-red-500 text-xs mt-1'
|
|
6419
|
+
};
|
|
6420
|
+
var $2109d011c77499b4$var$leading = {
|
|
6421
|
+
input: 'pl-10'
|
|
6422
|
+
};
|
|
6423
|
+
var $2109d011c77499b4$var$trailing = {};
|
|
6424
|
+
var $2109d011c77499b4$var$normal = {
|
|
6425
|
+
label: 'leading-6 text-sm mb-2',
|
|
6426
|
+
hint: 'leading-6',
|
|
6427
|
+
leading: 'pl-3',
|
|
6428
|
+
input: 'rounded-md border-gray-200 shadow-xs focus:border-primary-500 focus:ring-primary-500 sm:text-sm placeholder-gray-300',
|
|
6429
|
+
trailing: 'pr-3',
|
|
6430
|
+
description: 'mt-2 text-sm'
|
|
6431
|
+
};
|
|
6432
|
+
var $2109d011c77499b4$var$inset = {
|
|
6433
|
+
container: 'rounded-md px-3 pt-2.5 pb-1.5 shadow-xs ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-primary-600',
|
|
6434
|
+
label: 'text-xs',
|
|
6435
|
+
hint: 'text-xs',
|
|
6436
|
+
input: 'border-0 ring-0! p-0 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm pl-0',
|
|
6437
|
+
description: 'hidden'
|
|
6438
|
+
};
|
|
6439
|
+
var $2109d011c77499b4$var$overlapping = {
|
|
6440
|
+
container: 'relative',
|
|
6441
|
+
head: ' absolute flex justify-between items-center left-0 -top-2 right-0 mx-2 z-10 w-full',
|
|
6442
|
+
label: 'inline-block bg-white px-1 text-xs font-medium text-gray-900 ',
|
|
6443
|
+
hint: 'text-xs mr-4 bg-white px-1',
|
|
6444
|
+
input: 'block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6',
|
|
6445
|
+
description: 'hidden'
|
|
6446
|
+
};
|
|
6447
|
+
var $2109d011c77499b4$var$pill = {
|
|
6448
|
+
head: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mb-1 pr-6',
|
|
6449
|
+
foot: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mt-1 pr-6',
|
|
6450
|
+
input: 'block w-full rounded-full border-0 px-4 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6',
|
|
6451
|
+
trailing: 'pr-2',
|
|
6452
|
+
description: 'text-xs'
|
|
6453
|
+
};
|
|
6454
|
+
var $2109d011c77499b4$var$floored = {
|
|
6455
|
+
body: 'relative mt-2',
|
|
6456
|
+
label: 'block text-sm font-medium leading-6 text-gray-900',
|
|
6457
|
+
input: 'peer block w-full border-0 bg-gray-50 py-1.5 text-gray-900 focus:ring-0 sm:text-sm sm:leading-6 ring-0',
|
|
6458
|
+
description: 'text-xs mt-2'
|
|
6459
|
+
};
|
|
6460
|
+
var $2109d011c77499b4$var$invalid = {
|
|
6461
|
+
container: 'ring-red-500',
|
|
6462
|
+
input: // 'block w-full border border-transparent text-red-900 ring-1 ring-inset ring-red-300 placeholder:text-red-300 focus:ring-2 focus:ring-inset focus:ring-red-500 sm:leading-6 pr-10',
|
|
6463
|
+
'block w-full border border-transparent text-red-900 ring-1 ring-inset ring-red-300 placeholder:text-red-300 focus:ring-2 focus:ring-inset focus:ring-red-500 pr-10',
|
|
6464
|
+
description: 'text-sm text-red-600'
|
|
6465
|
+
};
|
|
6466
|
+
var $2109d011c77499b4$var$disabled = {
|
|
6467
|
+
input: 'block w-full rounded-md border-0 text-gray-900 shadow-xs ring-1 ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-500 disabled:ring-gray-200'
|
|
6468
|
+
};
|
|
6469
|
+
var $2109d011c77499b4$var$styles = {
|
|
6470
|
+
base: $2109d011c77499b4$var$base,
|
|
6471
|
+
leading: $2109d011c77499b4$var$leading,
|
|
6472
|
+
trailing: $2109d011c77499b4$var$trailing,
|
|
6473
|
+
normal: $2109d011c77499b4$var$normal,
|
|
6474
|
+
inset: $2109d011c77499b4$var$inset,
|
|
6475
|
+
overlapping: $2109d011c77499b4$var$overlapping,
|
|
6476
|
+
pill: $2109d011c77499b4$var$pill,
|
|
6477
|
+
floored: $2109d011c77499b4$var$floored,
|
|
6478
|
+
invalid: $2109d011c77499b4$var$invalid,
|
|
6479
|
+
disabled: $2109d011c77499b4$var$disabled
|
|
6480
|
+
};
|
|
6481
|
+
var $2109d011c77499b4$export$2e2bcd8739ae039 = $2109d011c77499b4$var$styles;
|
|
6482
|
+
|
|
6483
|
+
|
|
6271
6484
|
|
|
6272
6485
|
|
|
6273
6486
|
|
|
@@ -6578,83 +6791,6 @@ var $99ef0e378c886c3a$export$2e2bcd8739ae039 = $99ef0e378c886c3a$var$styles;
|
|
|
6578
6791
|
|
|
6579
6792
|
|
|
6580
6793
|
|
|
6581
|
-
var $2109d011c77499b4$var$base = {
|
|
6582
|
-
container: '',
|
|
6583
|
-
head: 'flex justify-between',
|
|
6584
|
-
body: 'relative rounded-md py-2',
|
|
6585
|
-
foot: '',
|
|
6586
|
-
label: 'block font-medium text-gray-900',
|
|
6587
|
-
hint: 'text-xs text-gray-500',
|
|
6588
|
-
leading: 'pointer-events-none absolute inset-y-0 left-0 flex items-center',
|
|
6589
|
-
input: 'block w-full',
|
|
6590
|
-
trailing: 'pointer-events-none absolute inset-y-0 right-0 flex items-center',
|
|
6591
|
-
description: 'text-gray-400 text-xs mt-1',
|
|
6592
|
-
error: 'text-red-500 text-xs mt-1'
|
|
6593
|
-
};
|
|
6594
|
-
var $2109d011c77499b4$var$leading = {
|
|
6595
|
-
input: 'pl-10'
|
|
6596
|
-
};
|
|
6597
|
-
var $2109d011c77499b4$var$trailing = {};
|
|
6598
|
-
var $2109d011c77499b4$var$normal = {
|
|
6599
|
-
label: 'leading-6 text-sm mb-2',
|
|
6600
|
-
hint: 'leading-6',
|
|
6601
|
-
leading: 'pl-3',
|
|
6602
|
-
input: 'rounded-md border-gray-200 shadow-xs focus:border-primary-500 focus:ring-primary-500 sm:text-sm placeholder-gray-300',
|
|
6603
|
-
trailing: 'pr-3',
|
|
6604
|
-
description: 'mt-2 text-sm'
|
|
6605
|
-
};
|
|
6606
|
-
var $2109d011c77499b4$var$inset = {
|
|
6607
|
-
container: 'rounded-md px-3 pt-2.5 pb-1.5 shadow-xs ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-primary-600',
|
|
6608
|
-
label: 'text-xs',
|
|
6609
|
-
hint: 'text-xs',
|
|
6610
|
-
input: 'border-0 ring-0! p-0 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm pl-0',
|
|
6611
|
-
description: 'hidden'
|
|
6612
|
-
};
|
|
6613
|
-
var $2109d011c77499b4$var$overlapping = {
|
|
6614
|
-
container: 'relative',
|
|
6615
|
-
head: ' absolute flex justify-between items-center left-0 -top-2 right-0 mx-2 z-10 w-full',
|
|
6616
|
-
label: 'inline-block bg-white px-1 text-xs font-medium text-gray-900 ',
|
|
6617
|
-
hint: 'text-xs mr-4 bg-white px-1',
|
|
6618
|
-
input: 'block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6',
|
|
6619
|
-
description: 'hidden'
|
|
6620
|
-
};
|
|
6621
|
-
var $2109d011c77499b4$var$pill = {
|
|
6622
|
-
head: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mb-1 pr-6',
|
|
6623
|
-
foot: 'mx-px block px-4 text-sm font-medium leading-6 text-gray-900 mt-1 pr-6',
|
|
6624
|
-
input: 'block w-full rounded-full border-0 px-4 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6',
|
|
6625
|
-
trailing: 'pr-2',
|
|
6626
|
-
description: 'text-xs'
|
|
6627
|
-
};
|
|
6628
|
-
var $2109d011c77499b4$var$floored = {
|
|
6629
|
-
body: 'relative mt-2',
|
|
6630
|
-
label: 'block text-sm font-medium leading-6 text-gray-900',
|
|
6631
|
-
input: 'peer block w-full border-0 bg-gray-50 py-1.5 text-gray-900 focus:ring-0 sm:text-sm sm:leading-6 ring-0',
|
|
6632
|
-
description: 'text-xs mt-2'
|
|
6633
|
-
};
|
|
6634
|
-
var $2109d011c77499b4$var$invalid = {
|
|
6635
|
-
container: 'ring-red-500',
|
|
6636
|
-
input: // 'block w-full border border-transparent text-red-900 ring-1 ring-inset ring-red-300 placeholder:text-red-300 focus:ring-2 focus:ring-inset focus:ring-red-500 sm:leading-6 pr-10',
|
|
6637
|
-
'block w-full border border-transparent text-red-900 ring-1 ring-inset ring-red-300 placeholder:text-red-300 focus:ring-2 focus:ring-inset focus:ring-red-500 pr-10',
|
|
6638
|
-
description: 'text-sm text-red-600'
|
|
6639
|
-
};
|
|
6640
|
-
var $2109d011c77499b4$var$disabled = {
|
|
6641
|
-
input: 'block w-full rounded-md border-0 text-gray-900 shadow-xs ring-1 ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-500 disabled:ring-gray-200'
|
|
6642
|
-
};
|
|
6643
|
-
var $2109d011c77499b4$var$styles = {
|
|
6644
|
-
base: $2109d011c77499b4$var$base,
|
|
6645
|
-
leading: $2109d011c77499b4$var$leading,
|
|
6646
|
-
trailing: $2109d011c77499b4$var$trailing,
|
|
6647
|
-
normal: $2109d011c77499b4$var$normal,
|
|
6648
|
-
inset: $2109d011c77499b4$var$inset,
|
|
6649
|
-
overlapping: $2109d011c77499b4$var$overlapping,
|
|
6650
|
-
pill: $2109d011c77499b4$var$pill,
|
|
6651
|
-
floored: $2109d011c77499b4$var$floored,
|
|
6652
|
-
invalid: $2109d011c77499b4$var$invalid,
|
|
6653
|
-
disabled: $2109d011c77499b4$var$disabled
|
|
6654
|
-
};
|
|
6655
|
-
var $2109d011c77499b4$export$2e2bcd8739ae039 = $2109d011c77499b4$var$styles;
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
6794
|
var $39e9223269e270c7$var$OpeningsHourInputGroupForm = function(props) {
|
|
6659
6795
|
var form = props.form, _a = props.name, name = _a === void 0 ? 'opening-hours-input' : _a, label = props.label, description = props.description, required = props.required, value = props.value, error = props.error, lang = props.lang, isDisabled = props.isDisabled, _b = props.isRequired, isRequired = _b === void 0 ? false : _b, _c = props.isTouched, isTouched = _c === void 0 ? false : _c, onChange = props.onChange, stylesOverrides = props.styles, handleDelete = props.handleDelete;
|
|
6660
6796
|
var isValid = error === undefined;
|