@helpdice/ui 2.6.0-beta.5 → 2.6.0-beta.7
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/auto-complete/index.js +69 -687
- package/dist/container/index.js +10 -719
- package/dist/expandable/expand.d.ts +7 -0
- package/dist/expandable/index.d.ts +2 -0
- package/dist/expandable/index.js +1612 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1253 -1234
- package/dist/input/index.js +8 -678
- package/dist/placeholder/index.js +8 -714
- package/dist/select/index.js +16 -686
- package/dist/table/index.js +1145 -1170
- package/dist/text/index.js +8 -714
- package/dist/text/text.d.ts +0 -1
- package/dist/textarea/index.js +9 -682
- package/esm/container/box.js +5 -30
- package/esm/expandable/expand.d.ts +7 -0
- package/esm/expandable/expand.js +67 -0
- package/esm/expandable/index.d.ts +2 -0
- package/esm/expandable/index.js +2 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/text/text.d.ts +0 -1
- package/esm/text/text.js +3 -25
- package/package.json +9 -1
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var icons = require('@helpdice/icons');
|
|
7
7
|
var framerMotion = require('framer-motion');
|
|
8
8
|
var reactDom = require('react-dom');
|
|
9
|
+
var Expandable$1 = require('components/expandable');
|
|
9
10
|
var reactDom$1 = require('@floating-ui/react-dom');
|
|
10
11
|
var pro = require('@helpdice/pro');
|
|
11
12
|
var reactSyntaxHighlighter = require('react-syntax-highlighter');
|
|
@@ -1331,924 +1332,254 @@ var TextChild = function TextChild(_ref) {
|
|
|
1331
1332
|
};
|
|
1332
1333
|
TextChild.displayName = 'TextChild';
|
|
1333
1334
|
|
|
1334
|
-
var
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
var dripRef = React.useRef(null);
|
|
1342
|
-
/* istanbul ignore next */
|
|
1343
|
-
var top = Number.isNaN(+y) ? 0 : y - 10;
|
|
1344
|
-
/* istanbul ignore next */
|
|
1345
|
-
var left = Number.isNaN(+x) ? 0 : x - 10;
|
|
1346
|
-
React.useEffect(function () {
|
|
1347
|
-
/* istanbul ignore next */
|
|
1348
|
-
if (!dripRef.current) return;
|
|
1349
|
-
dripRef.current.addEventListener('animationend', onCompleted);
|
|
1350
|
-
return function () {
|
|
1351
|
-
/* istanbul ignore next */
|
|
1352
|
-
if (!dripRef.current) return;
|
|
1353
|
-
dripRef.current.removeEventListener('animationend', onCompleted);
|
|
1354
|
-
};
|
|
1355
|
-
});
|
|
1356
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1357
|
-
ref: dripRef,
|
|
1358
|
-
className: "jsx-3424889537" + " " + "drip",
|
|
1359
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
1360
|
-
width: "20",
|
|
1361
|
-
height: "20",
|
|
1362
|
-
viewBox: "0 0 20 20",
|
|
1363
|
-
style: {
|
|
1364
|
-
top: top,
|
|
1365
|
-
left: left
|
|
1366
|
-
},
|
|
1367
|
-
className: "jsx-3424889537",
|
|
1368
|
-
children: /*#__PURE__*/jsxRuntime.jsx("g", {
|
|
1369
|
-
stroke: "none",
|
|
1370
|
-
strokeWidth: "1",
|
|
1371
|
-
fill: "none",
|
|
1372
|
-
fillRule: "evenodd",
|
|
1373
|
-
className: "jsx-3424889537",
|
|
1374
|
-
children: /*#__PURE__*/jsxRuntime.jsx("g", {
|
|
1375
|
-
fill: color,
|
|
1376
|
-
className: "jsx-3424889537",
|
|
1377
|
-
children: /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
1378
|
-
width: "100%",
|
|
1379
|
-
height: "100%",
|
|
1380
|
-
rx: "10",
|
|
1381
|
-
className: "jsx-3424889537"
|
|
1382
|
-
})
|
|
1383
|
-
})
|
|
1384
|
-
})
|
|
1385
|
-
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1386
|
-
id: "3424889537",
|
|
1387
|
-
children: ".drip.jsx-3424889537{position:absolute;left:0;right:0;top:0;bottom:0;}svg.jsx-3424889537{position:absolute;-webkit-animation:350ms ease-in expand-jsx-3424889537;animation:350ms ease-in expand-jsx-3424889537;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;width:1rem;height:1rem;}@-webkit-keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}@keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}"
|
|
1388
|
-
})]
|
|
1335
|
+
var _excluded$1m = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "noWrap", "children", "className", "display", "alignItems", "justify"];
|
|
1336
|
+
var _getModifierChild = function getModifierChild(tags, children) {
|
|
1337
|
+
if (!tags.length) return children;
|
|
1338
|
+
var nextTag = tags.slice(1, tags.length);
|
|
1339
|
+
return /*#__PURE__*/jsxRuntime.jsx(TextChild, {
|
|
1340
|
+
tag: tags[0],
|
|
1341
|
+
children: _getModifierChild(nextTag, children)
|
|
1389
1342
|
});
|
|
1390
1343
|
};
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
_ref$
|
|
1407
|
-
|
|
1408
|
-
|
|
1344
|
+
var TextComponent = function TextComponent(_ref) {
|
|
1345
|
+
var _ref$h = _ref.h1,
|
|
1346
|
+
h1 = _ref$h === void 0 ? false : _ref$h,
|
|
1347
|
+
_ref$h2 = _ref.h2,
|
|
1348
|
+
h2 = _ref$h2 === void 0 ? false : _ref$h2,
|
|
1349
|
+
_ref$h3 = _ref.h3,
|
|
1350
|
+
h3 = _ref$h3 === void 0 ? false : _ref$h3,
|
|
1351
|
+
_ref$h4 = _ref.h4,
|
|
1352
|
+
h4 = _ref$h4 === void 0 ? false : _ref$h4,
|
|
1353
|
+
_ref$h5 = _ref.h5,
|
|
1354
|
+
h5 = _ref$h5 === void 0 ? false : _ref$h5,
|
|
1355
|
+
_ref$h6 = _ref.h6,
|
|
1356
|
+
h6 = _ref$h6 === void 0 ? false : _ref$h6,
|
|
1357
|
+
_ref$p = _ref.p,
|
|
1358
|
+
p = _ref$p === void 0 ? false : _ref$p,
|
|
1359
|
+
_ref$b = _ref.b,
|
|
1360
|
+
b = _ref$b === void 0 ? false : _ref$b,
|
|
1361
|
+
_ref$small = _ref.small,
|
|
1362
|
+
small = _ref$small === void 0 ? false : _ref$small,
|
|
1363
|
+
_ref$i = _ref.i,
|
|
1364
|
+
i = _ref$i === void 0 ? false : _ref$i,
|
|
1365
|
+
_ref$span = _ref.span,
|
|
1366
|
+
span = _ref$span === void 0 ? false : _ref$span,
|
|
1367
|
+
_ref$del = _ref.del,
|
|
1368
|
+
del = _ref$del === void 0 ? false : _ref$del,
|
|
1369
|
+
_ref$em = _ref.em,
|
|
1370
|
+
em = _ref$em === void 0 ? false : _ref$em,
|
|
1371
|
+
_ref$blockquote = _ref.blockquote,
|
|
1372
|
+
blockquote = _ref$blockquote === void 0 ? false : _ref$blockquote,
|
|
1373
|
+
_ref$noWrap = _ref.noWrap,
|
|
1374
|
+
noWrap = _ref$noWrap === void 0 ? false : _ref$noWrap,
|
|
1375
|
+
children = _ref.children,
|
|
1409
1376
|
_ref$className = _ref.className,
|
|
1410
1377
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1411
|
-
_ref$
|
|
1412
|
-
|
|
1378
|
+
_ref$display = _ref.display,
|
|
1379
|
+
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
1380
|
+
alignItems = _ref.alignItems,
|
|
1381
|
+
justify = _ref.justify,
|
|
1413
1382
|
props = _objectWithoutProperties(_ref, _excluded$1m);
|
|
1414
|
-
var
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1383
|
+
var elements = {
|
|
1384
|
+
h1: h1,
|
|
1385
|
+
h2: h2,
|
|
1386
|
+
h3: h3,
|
|
1387
|
+
h4: h4,
|
|
1388
|
+
h5: h5,
|
|
1389
|
+
h6: h6,
|
|
1390
|
+
p: p,
|
|
1391
|
+
blockquote: blockquote
|
|
1392
|
+
};
|
|
1393
|
+
var inlineElements = {
|
|
1394
|
+
span: span,
|
|
1395
|
+
small: small,
|
|
1396
|
+
b: b,
|
|
1397
|
+
em: em,
|
|
1398
|
+
i: i,
|
|
1399
|
+
del: del
|
|
1400
|
+
};
|
|
1401
|
+
var names = Object.keys(elements).filter(function (name) {
|
|
1402
|
+
return elements[name];
|
|
1403
|
+
});
|
|
1404
|
+
var inlineNames = Object.keys(inlineElements).filter(function (name) {
|
|
1405
|
+
return inlineElements[name];
|
|
1406
|
+
});
|
|
1407
|
+
|
|
1408
|
+
/**
|
|
1409
|
+
* Render element "p" only if no element is found.
|
|
1410
|
+
* If there is only one modifier, just rendered one modifier element
|
|
1411
|
+
* e.g.
|
|
1412
|
+
* <Text /> => <p />
|
|
1413
|
+
* <Text em /> => <em />
|
|
1414
|
+
* <Text p em /> => <p><em>children</em></p>
|
|
1415
|
+
*
|
|
1416
|
+
*/
|
|
1417
|
+
|
|
1418
|
+
var tag = React.useMemo(function () {
|
|
1419
|
+
if (names[0]) return names[0];
|
|
1420
|
+
if (inlineNames[0]) return inlineNames[0];
|
|
1421
|
+
return 'p';
|
|
1422
|
+
}, [names, inlineNames]);
|
|
1423
|
+
var renderableChildElements = inlineNames.filter(function (name) {
|
|
1424
|
+
return name !== tag;
|
|
1425
|
+
});
|
|
1426
|
+
var modifers = React.useMemo(function () {
|
|
1427
|
+
if (!renderableChildElements.length) return children;
|
|
1428
|
+
return _getModifierChild(renderableChildElements, children);
|
|
1429
|
+
}, [renderableChildElements, children]);
|
|
1430
|
+
return /*#__PURE__*/jsxRuntime.jsx(TextChild, _objectSpread2(_objectSpread2({
|
|
1431
|
+
style: {
|
|
1432
|
+
textAlign: props.align,
|
|
1433
|
+
display: display,
|
|
1434
|
+
alignItems: alignItems,
|
|
1435
|
+
justifyContent: justify
|
|
1436
|
+
},
|
|
1437
|
+
className: "".concat(className, " ").concat(noWrap ? 'no-wrap' : ''),
|
|
1438
|
+
tag: tag
|
|
1439
|
+
}, props), {}, {
|
|
1440
|
+
children: modifers
|
|
1440
1441
|
}));
|
|
1441
1442
|
};
|
|
1442
|
-
|
|
1443
|
-
var
|
|
1443
|
+
TextComponent.displayName = 'Text';
|
|
1444
|
+
var Text = withScale(TextComponent);
|
|
1444
1445
|
|
|
1445
|
-
var
|
|
1446
|
-
var
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1446
|
+
var InputError = function InputError(_ref) {
|
|
1447
|
+
var text = _ref.text,
|
|
1448
|
+
error = _ref.error;
|
|
1449
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Text, {
|
|
1450
|
+
font: 0.8,
|
|
1451
|
+
style: {
|
|
1452
|
+
marginTop: 0.4,
|
|
1453
|
+
marginRight: 0,
|
|
1454
|
+
marginLeft: 0,
|
|
1455
|
+
marginBottom: '0.4rem',
|
|
1456
|
+
textAlign: 'left',
|
|
1457
|
+
zIndex: 0
|
|
1458
|
+
},
|
|
1459
|
+
color: error ? "error" : 'default',
|
|
1460
|
+
children: ["\xA0", text]
|
|
1461
|
+
});
|
|
1462
|
+
};
|
|
1463
|
+
var InputBlockLabelComponent = function InputBlockLabelComponent(_ref2) {
|
|
1464
|
+
var children = _ref2.children,
|
|
1465
|
+
_ref2$required = _ref2.required,
|
|
1466
|
+
required = _ref2$required === void 0 ? false : _ref2$required;
|
|
1467
|
+
var theme$1 = theme.useTheme();
|
|
1468
|
+
var _useScale = useScale(),
|
|
1469
|
+
SCALES = _useScale.SCALES;
|
|
1470
|
+
return /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
1471
|
+
className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]),
|
|
1472
|
+
children: [children, required && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1473
|
+
className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]) + " " + "mark-error",
|
|
1474
|
+
children: "*"
|
|
1451
1475
|
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1452
|
-
id: "
|
|
1453
|
-
children:
|
|
1476
|
+
id: "588038827",
|
|
1477
|
+
dynamic: [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)],
|
|
1478
|
+
children: "label.__jsx-style-dynamic-selector{display:".concat(typeof children === "string" ? 'block' : 'flex', ";font-weight:normal;color:").concat(theme$1.palette.accents_6, ";padding:0 0 0 1px;margin-bottom:0.5em;font-size:1em;line-height:1.5;}label.__jsx-style-dynamic-selector .mark-error.__jsx-style-dynamic-selector{color:").concat(theme$1.palette.errorDark, ";margin:0px 3px;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;font-size:").concat(SCALES.font(1.2), ";}label.__jsx-style-dynamic-selector>*:first-child{margin-top:0;}label.__jsx-style-dynamic-selector>*:last-child{margin-bottom:0;}")
|
|
1454
1479
|
})]
|
|
1455
1480
|
});
|
|
1456
1481
|
};
|
|
1457
|
-
|
|
1482
|
+
InputBlockLabelComponent.displayName = 'InputBlockLabel';
|
|
1483
|
+
var InputBlockLabel = /*#__PURE__*/React.memo(InputBlockLabelComponent);
|
|
1458
1484
|
|
|
1459
|
-
var
|
|
1460
|
-
var
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
className
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
}, className);
|
|
1472
|
-
return /*#__PURE__*/jsxRuntime.jsxs("span", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1473
|
-
className: "jsx-2467502931" + " " + (props && props.className != null && props.className || classes || ""),
|
|
1474
|
-
children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1475
|
-
id: "2467502931",
|
|
1476
|
-
children: ".icon.jsx-2467502931{position:absolute;left:var(--helpdice-ui-button-icon-padding);right:auto;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--helpdice-ui-button-color);z-index:1;}.right.jsx-2467502931{right:var(--helpdice-ui-button-icon-padding);left:auto;}.icon.jsx-2467502931 svg{background:transparent;height:calc(var(--helpdice-ui-button-height) / 2.35);width:calc(var(--helpdice-ui-button-height) / 2.35);}.single.jsx-2467502931{position:static;-webkit-transform:none;-ms-transform:none;transform:none;}"
|
|
1485
|
+
var InputIconComponent = function InputIconComponent(_ref) {
|
|
1486
|
+
var icon = _ref.icon,
|
|
1487
|
+
_ref$clickable = _ref.clickable,
|
|
1488
|
+
clickable = _ref$clickable === void 0 ? false : _ref$clickable,
|
|
1489
|
+
onClick = _ref.onClick;
|
|
1490
|
+
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
1491
|
+
onClick: onClick,
|
|
1492
|
+
className: _JSXStyle.dynamic([["4247656379", [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none']]]) + " " + "input-icon",
|
|
1493
|
+
children: [icon, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1494
|
+
id: "4247656379",
|
|
1495
|
+
dynamic: [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none'],
|
|
1496
|
+
children: ".input-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;line-height:1;position:relative;cursor:".concat(clickable ? 'pointer' : 'default', ";pointer-events:").concat(clickable ? 'auto' : 'none', ";}.input-icon.__jsx-style-dynamic-selector svg{width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
|
|
1477
1497
|
})]
|
|
1478
|
-
})
|
|
1498
|
+
});
|
|
1479
1499
|
};
|
|
1480
|
-
|
|
1500
|
+
InputIconComponent.displayName = 'InputIcon';
|
|
1501
|
+
var InputIcon = /*#__PURE__*/React.memo(InputIconComponent);
|
|
1481
1502
|
|
|
1482
|
-
var
|
|
1483
|
-
var
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
var
|
|
1487
|
-
var
|
|
1488
|
-
|
|
1489
|
-
if (!hasIcon) return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1490
|
-
className: "text",
|
|
1491
|
-
children: children
|
|
1503
|
+
var InputIconClear = function InputIconClear(_ref) {
|
|
1504
|
+
var onClick = _ref.onClick,
|
|
1505
|
+
disabled = _ref.disabled,
|
|
1506
|
+
visible = _ref.visible;
|
|
1507
|
+
var theme$1 = theme.useTheme();
|
|
1508
|
+
var classes = theme.useClasses('clear-icon', {
|
|
1509
|
+
visible: visible
|
|
1492
1510
|
});
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1511
|
+
var clickHandler = function clickHandler(event) {
|
|
1512
|
+
event.preventDefault();
|
|
1513
|
+
event.stopPropagation();
|
|
1514
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
1515
|
+
onClick && onClick(event);
|
|
1516
|
+
};
|
|
1517
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1518
|
+
onClick: clickHandler,
|
|
1519
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]) + " " + (classes || ""),
|
|
1520
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
1521
|
+
viewBox: "0 0 24 24",
|
|
1522
|
+
stroke: "currentColor",
|
|
1523
|
+
strokeWidth: "1.5",
|
|
1524
|
+
strokeLinecap: "round",
|
|
1525
|
+
strokeLinejoin: "round",
|
|
1526
|
+
fill: "none",
|
|
1527
|
+
shapeRendering: "geometricPrecision",
|
|
1528
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]),
|
|
1529
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1530
|
+
d: "M18 6L6 18",
|
|
1531
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
1532
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1533
|
+
d: "M6 6l12 12",
|
|
1534
|
+
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
1510
1535
|
})]
|
|
1536
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1537
|
+
id: "1567030211",
|
|
1538
|
+
dynamic: [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground],
|
|
1539
|
+
children: ".clear-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;cursor:".concat(disabled ? 'not-allowed' : 'pointer', ";-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s;margin:0;padding:0;color:").concat(theme$1.palette.accents_3, ";visibility:hidden;opacity:0;}.visible.__jsx-style-dynamic-selector{visibility:visible;opacity:1;}.clear-icon.__jsx-style-dynamic-selector:hover{color:").concat(disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground, ";}svg.__jsx-style-dynamic-selector{color:currentColor;width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
|
|
1511
1540
|
})]
|
|
1512
1541
|
});
|
|
1513
1542
|
};
|
|
1514
|
-
var
|
|
1515
|
-
if (!config.isButtonGroup) return props;
|
|
1516
|
-
return _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1517
|
-
auto: true,
|
|
1518
|
-
shadow: false,
|
|
1519
|
-
ghost: config.ghost || props.ghost,
|
|
1520
|
-
type: config.type || props.type,
|
|
1521
|
-
disabled: config.disabled || props.disabled
|
|
1522
|
-
});
|
|
1523
|
-
};
|
|
1524
|
-
|
|
1525
|
-
/* "use client" */
|
|
1526
|
-
|
|
1527
|
-
var defaultContext$d = {
|
|
1528
|
-
isButtonGroup: false,
|
|
1529
|
-
disabled: false
|
|
1530
|
-
};
|
|
1531
|
-
var ButtonGroupContext = /*#__PURE__*/React.createContext(defaultContext$d);
|
|
1532
|
-
var useButtonGroupContext = function useButtonGroupContext() {
|
|
1533
|
-
return React.useContext(ButtonGroupContext);
|
|
1534
|
-
};
|
|
1535
|
-
|
|
1536
|
-
var hexToRgb = function hexToRgb(color) {
|
|
1537
|
-
var fullReg = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
1538
|
-
var full = color.replace(fullReg, function (_, r, g, b) {
|
|
1539
|
-
return "".concat(r).concat(r).concat(g).concat(g).concat(b).concat(b);
|
|
1540
|
-
});
|
|
1541
|
-
var values = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(full);
|
|
1542
|
-
if (!values) {
|
|
1543
|
-
throw new Error("Helpdice UI: Unsupported ".concat(color, " color."));
|
|
1544
|
-
}
|
|
1545
|
-
return [Number.parseInt(values[1], 16), Number.parseInt(values[2], 16), Number.parseInt(values[3], 16)];
|
|
1546
|
-
};
|
|
1547
|
-
var colorToRgbValues = function colorToRgbValues(color) {
|
|
1548
|
-
if (color.charAt(0) === '#') return hexToRgb(color);
|
|
1549
|
-
var safeColor = color.replace(/ /g, '');
|
|
1550
|
-
var colorType = color.substr(0, 4);
|
|
1551
|
-
var regArray = safeColor.match(/\((.+)\)/);
|
|
1552
|
-
if (!colorType.startsWith('rgb') || !regArray) {
|
|
1553
|
-
console.log(color);
|
|
1554
|
-
throw new Error("Helpdice UI: Only support [\"RGB\", \"RGBA\", \"HEX\"] color.");
|
|
1555
|
-
}
|
|
1556
|
-
return regArray[1].split(',').map(function (str) {
|
|
1557
|
-
return Number.parseFloat(str);
|
|
1558
|
-
});
|
|
1559
|
-
};
|
|
1560
|
-
var addColorAlpha = function addColorAlpha(color, alpha) {
|
|
1561
|
-
if (!/^#|rgb|RGB/.test(color)) return color;
|
|
1562
|
-
var _colorToRgbValues = colorToRgbValues(color),
|
|
1563
|
-
_colorToRgbValues2 = _slicedToArray(_colorToRgbValues, 3),
|
|
1564
|
-
r = _colorToRgbValues2[0],
|
|
1565
|
-
g = _colorToRgbValues2[1],
|
|
1566
|
-
b = _colorToRgbValues2[2];
|
|
1567
|
-
var safeAlpha = alpha > 1 ? 1 : alpha < 0 ? 0 : alpha;
|
|
1568
|
-
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(safeAlpha, ")");
|
|
1569
|
-
};
|
|
1543
|
+
var MemoInputIconClear = /*#__PURE__*/React.memo(InputIconClear);
|
|
1570
1544
|
|
|
1571
|
-
var
|
|
1545
|
+
var getColors$7 = function getColors(palette, status) {
|
|
1572
1546
|
var colors = {
|
|
1547
|
+
"default": {
|
|
1548
|
+
color: palette.foreground,
|
|
1549
|
+
borderColor: palette.border,
|
|
1550
|
+
hoverBorder: palette.accents_5
|
|
1551
|
+
},
|
|
1573
1552
|
secondary: {
|
|
1574
|
-
bg: palette.background,
|
|
1575
|
-
border: palette.foreground,
|
|
1576
1553
|
color: palette.foreground,
|
|
1577
|
-
|
|
1554
|
+
borderColor: palette.secondary,
|
|
1555
|
+
hoverBorder: palette.secondary
|
|
1578
1556
|
},
|
|
1579
1557
|
success: {
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
ripple: ''
|
|
1558
|
+
color: palette.foreground,
|
|
1559
|
+
borderColor: palette.successLight,
|
|
1560
|
+
hoverBorder: palette.success
|
|
1584
1561
|
},
|
|
1585
1562
|
warning: {
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
ripple: ''
|
|
1563
|
+
color: palette.foreground,
|
|
1564
|
+
borderColor: palette.warningLight,
|
|
1565
|
+
hoverBorder: palette.warning
|
|
1590
1566
|
},
|
|
1591
1567
|
error: {
|
|
1592
|
-
bg: palette.background,
|
|
1593
|
-
border: palette.error,
|
|
1594
1568
|
color: palette.error,
|
|
1595
|
-
|
|
1569
|
+
borderColor: palette.error,
|
|
1570
|
+
hoverBorder: palette.errorDark
|
|
1596
1571
|
}
|
|
1597
1572
|
};
|
|
1598
|
-
return colors[
|
|
1573
|
+
if (!status) return colors["default"];
|
|
1574
|
+
return colors[status];
|
|
1599
1575
|
};
|
|
1600
|
-
var getButtonColors = function getButtonColors(palette, props) {
|
|
1601
|
-
var color = props.color,
|
|
1602
|
-
disabled = props.disabled,
|
|
1603
|
-
ghost = props.ghost;
|
|
1604
|
-
var colors = {
|
|
1605
|
-
"default": {
|
|
1606
|
-
bg: palette.background,
|
|
1607
|
-
border: palette.border,
|
|
1608
|
-
color: palette.accents_5,
|
|
1609
|
-
ripple: palette.accents_1
|
|
1610
|
-
},
|
|
1611
|
-
secondary: {
|
|
1612
|
-
bg: palette.foreground,
|
|
1613
|
-
border: palette.foreground,
|
|
1614
|
-
color: palette.background,
|
|
1615
|
-
ripple: palette.accents_1
|
|
1616
|
-
},
|
|
1617
|
-
success: {
|
|
1618
|
-
bg: palette.success,
|
|
1619
|
-
border: palette.success,
|
|
1620
|
-
color: '#fff',
|
|
1621
|
-
ripple: '#1f93ffff'
|
|
1622
|
-
},
|
|
1623
|
-
warning: {
|
|
1624
|
-
bg: palette.warning,
|
|
1625
|
-
border: palette.warning,
|
|
1626
|
-
color: '#fff',
|
|
1627
|
-
ripple: '#ffca29ff'
|
|
1628
|
-
},
|
|
1629
|
-
error: {
|
|
1630
|
-
bg: palette.error,
|
|
1631
|
-
border: palette.error,
|
|
1632
|
-
color: '#fff',
|
|
1633
|
-
ripple: '#ff5a55ff'
|
|
1634
|
-
},
|
|
1635
|
-
abort: {
|
|
1636
|
-
bg: 'transparent',
|
|
1637
|
-
border: 'transparent',
|
|
1638
|
-
color: palette.accents_5,
|
|
1639
|
-
ripple: palette.accents_1
|
|
1640
|
-
}
|
|
1641
|
-
};
|
|
1642
|
-
if (disabled) return {
|
|
1643
|
-
bg: palette.accents_1,
|
|
1644
|
-
border: palette.accents_2,
|
|
1645
|
-
color: '#ccc',
|
|
1646
|
-
ripple: ''
|
|
1647
|
-
};
|
|
1648
1576
|
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
*/
|
|
1656
|
-
var withoutLightType = color === null || color === void 0 ? void 0 : color.replace('-light', '');
|
|
1657
|
-
var defaultColor = colors["default"];
|
|
1658
|
-
if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
|
|
1659
|
-
return colors[withoutLightType] || defaultColor;
|
|
1660
|
-
};
|
|
1661
|
-
var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, _color) {
|
|
1662
|
-
var colors = {
|
|
1663
|
-
secondary: {
|
|
1664
|
-
bg: palette.foreground,
|
|
1665
|
-
border: palette.background,
|
|
1666
|
-
color: palette.background
|
|
1667
|
-
},
|
|
1668
|
-
success: {
|
|
1669
|
-
bg: palette.success,
|
|
1670
|
-
border: palette.background,
|
|
1671
|
-
color: 'white'
|
|
1672
|
-
},
|
|
1673
|
-
warning: {
|
|
1674
|
-
bg: palette.warning,
|
|
1675
|
-
border: palette.background,
|
|
1676
|
-
color: 'white'
|
|
1677
|
-
},
|
|
1678
|
-
error: {
|
|
1679
|
-
bg: palette.error,
|
|
1680
|
-
border: palette.background,
|
|
1681
|
-
color: 'white'
|
|
1682
|
-
}
|
|
1683
|
-
};
|
|
1684
|
-
var withoutLightType = _color === null || _color === void 0 ? void 0 : _color.replace('-light', '');
|
|
1685
|
-
return colors[withoutLightType] || null;
|
|
1686
|
-
};
|
|
1687
|
-
var getButtonHoverColors = function getButtonHoverColors(palette, props) {
|
|
1688
|
-
var color = props.color,
|
|
1689
|
-
disabled = props.disabled,
|
|
1690
|
-
loading = props.loading,
|
|
1691
|
-
shadow = props.shadow,
|
|
1692
|
-
ghost = props.ghost;
|
|
1693
|
-
var defaultColor = getButtonColors(palette, props);
|
|
1694
|
-
var alphaBackground = addColorAlpha(defaultColor.bg, 0.85);
|
|
1695
|
-
var colors = {
|
|
1696
|
-
"default": {
|
|
1697
|
-
bg: palette.background,
|
|
1698
|
-
border: palette.foreground
|
|
1699
|
-
},
|
|
1700
|
-
secondary: {
|
|
1701
|
-
bg: palette.background,
|
|
1702
|
-
border: palette.foreground
|
|
1703
|
-
},
|
|
1704
|
-
success: {
|
|
1705
|
-
bg: palette.background,
|
|
1706
|
-
border: palette.success
|
|
1707
|
-
},
|
|
1708
|
-
warning: {
|
|
1709
|
-
bg: palette.background,
|
|
1710
|
-
border: palette.warning
|
|
1711
|
-
},
|
|
1712
|
-
error: {
|
|
1713
|
-
bg: palette.background,
|
|
1714
|
-
border: palette.error
|
|
1715
|
-
},
|
|
1716
|
-
abort: {
|
|
1717
|
-
bg: 'transparent',
|
|
1718
|
-
border: 'transparent',
|
|
1719
|
-
color: palette.accents_5
|
|
1720
|
-
},
|
|
1721
|
-
'secondary-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
1722
|
-
bg: alphaBackground
|
|
1723
|
-
}),
|
|
1724
|
-
'success-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
1725
|
-
bg: alphaBackground
|
|
1726
|
-
}),
|
|
1727
|
-
'warning-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
1728
|
-
bg: alphaBackground
|
|
1729
|
-
}),
|
|
1730
|
-
'error-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
1731
|
-
bg: alphaBackground
|
|
1732
|
-
})
|
|
1733
|
-
};
|
|
1734
|
-
if (disabled) return {
|
|
1735
|
-
bg: palette.accents_1,
|
|
1736
|
-
border: palette.accents_2,
|
|
1737
|
-
color: '#ccc'
|
|
1738
|
-
};
|
|
1739
|
-
if (loading) return _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
1740
|
-
color: 'transparent'
|
|
1741
|
-
});
|
|
1742
|
-
if (shadow) return defaultColor;
|
|
1743
|
-
var hoverColor = (ghost ? getButtonGhostHoverColors(palette, color) : colors[color]) || colors["default"];
|
|
1744
|
-
return _objectSpread2(_objectSpread2({}, hoverColor), {}, {
|
|
1745
|
-
color: hoverColor.color || hoverColor.border
|
|
1746
|
-
});
|
|
1747
|
-
};
|
|
1748
|
-
var getButtonCursor = function getButtonCursor(disabled, loading) {
|
|
1749
|
-
if (disabled) return {
|
|
1750
|
-
cursor: 'not-allowed',
|
|
1751
|
-
events: 'auto'
|
|
1752
|
-
};
|
|
1753
|
-
if (loading) return {
|
|
1754
|
-
cursor: 'default',
|
|
1755
|
-
events: 'none'
|
|
1756
|
-
};
|
|
1757
|
-
return {
|
|
1758
|
-
cursor: 'pointer',
|
|
1759
|
-
events: 'auto'
|
|
1760
|
-
};
|
|
1761
|
-
};
|
|
1762
|
-
var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
1763
|
-
var type = props.type;
|
|
1764
|
-
var isLightHover = type ? type.endsWith('light') : false;
|
|
1765
|
-
var hoverColors = getButtonHoverColors(palette, props);
|
|
1766
|
-
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
1767
|
-
};
|
|
1768
|
-
|
|
1769
|
-
var _excluded$1k = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "relative", "replace", "a", "to", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
1770
|
-
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
1771
|
-
var theme$1 = theme.useTheme();
|
|
1772
|
-
// const navigate = useNavigate();
|
|
1773
|
-
var _useScale = useScale(),
|
|
1774
|
-
SCALES = _useScale.SCALES;
|
|
1775
|
-
var buttonRef = React.useRef(null);
|
|
1776
|
-
React.useImperativeHandle(ref, function () {
|
|
1777
|
-
return buttonRef.current;
|
|
1778
|
-
}); // Changed with !
|
|
1779
|
-
|
|
1780
|
-
var _useState = React.useState(false),
|
|
1781
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1782
|
-
dripShow = _useState2[0],
|
|
1783
|
-
setDripShow = _useState2[1];
|
|
1784
|
-
var _useState3 = React.useState(0),
|
|
1785
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
1786
|
-
dripX = _useState4[0],
|
|
1787
|
-
setDripX = _useState4[1];
|
|
1788
|
-
var _useState5 = React.useState(0),
|
|
1789
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
1790
|
-
dripY = _useState6[0],
|
|
1791
|
-
setDripY = _useState6[1];
|
|
1792
|
-
var groupConfig = useButtonGroupContext();
|
|
1793
|
-
var filteredProps = filterPropsWithGroup(btnProps, groupConfig);
|
|
1794
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1795
|
-
var children = filteredProps.children,
|
|
1796
|
-
_filteredProps$disabl = filteredProps.disabled,
|
|
1797
|
-
disabled = _filteredProps$disabl === void 0 ? false : _filteredProps$disabl;
|
|
1798
|
-
filteredProps.color;
|
|
1799
|
-
var _filteredProps$loadin = filteredProps.loading,
|
|
1800
|
-
loading = _filteredProps$loadin === void 0 ? false : _filteredProps$loadin,
|
|
1801
|
-
_filteredProps$shadow = filteredProps.shadow,
|
|
1802
|
-
shadow = _filteredProps$shadow === void 0 ? false : _filteredProps$shadow,
|
|
1803
|
-
_filteredProps$ghost = filteredProps.ghost,
|
|
1804
|
-
ghost = _filteredProps$ghost === void 0 ? false : _filteredProps$ghost,
|
|
1805
|
-
_filteredProps$effect = filteredProps.effect,
|
|
1806
|
-
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
1807
|
-
_filteredProps$round = filteredProps.round,
|
|
1808
|
-
round = _filteredProps$round === void 0 ? false : _filteredProps$round;
|
|
1809
|
-
filteredProps.relative;
|
|
1810
|
-
filteredProps.replace;
|
|
1811
|
-
filteredProps.a;
|
|
1812
|
-
var to = filteredProps.to,
|
|
1813
|
-
onClick = filteredProps.onClick,
|
|
1814
|
-
_filteredProps$auto = filteredProps.auto,
|
|
1815
|
-
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
1816
|
-
icon = filteredProps.icon,
|
|
1817
|
-
_filteredProps$type = filteredProps.type,
|
|
1818
|
-
type = _filteredProps$type === void 0 ? 'button' : _filteredProps$type,
|
|
1819
|
-
iconRight = filteredProps.iconRight,
|
|
1820
|
-
_filteredProps$classN = filteredProps.className,
|
|
1821
|
-
className = _filteredProps$classN === void 0 ? '' : _filteredProps$classN;
|
|
1822
|
-
filteredProps.crossOrigin;
|
|
1823
|
-
var props = _objectWithoutProperties(filteredProps, _excluded$1k);
|
|
1824
|
-
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
1825
|
-
|
|
1826
|
-
var _useMemo = React.useMemo(function () {
|
|
1827
|
-
return getButtonColors(theme$1.palette, filteredProps);
|
|
1828
|
-
}, [theme$1.palette, filteredProps]),
|
|
1829
|
-
bg = _useMemo.bg,
|
|
1830
|
-
border = _useMemo.border,
|
|
1831
|
-
color = _useMemo.color,
|
|
1832
|
-
rippleColor = _useMemo.ripple;
|
|
1833
|
-
var hover = React.useMemo(function () {
|
|
1834
|
-
return getButtonHoverColors(theme$1.palette, filteredProps);
|
|
1835
|
-
}, [theme$1.palette, filteredProps]);
|
|
1836
|
-
var _useMemo2 = React.useMemo(function () {
|
|
1837
|
-
return getButtonCursor(disabled, loading);
|
|
1838
|
-
}, [disabled, loading]),
|
|
1839
|
-
cursor = _useMemo2.cursor,
|
|
1840
|
-
events = _useMemo2.events;
|
|
1841
|
-
var dripColor = React.useMemo(function () {
|
|
1842
|
-
return getButtonDripColor(theme$1.palette, filteredProps);
|
|
1843
|
-
}, [theme$1.palette, filteredProps]);
|
|
1844
|
-
|
|
1845
|
-
/* istanbul ignore next */
|
|
1846
|
-
var dripCompletedHandle = function dripCompletedHandle() {
|
|
1847
|
-
setDripShow(false);
|
|
1848
|
-
setDripX(0);
|
|
1849
|
-
setDripY(0);
|
|
1850
|
-
};
|
|
1851
|
-
var createRipple = function createRipple(event) {
|
|
1852
|
-
var button = buttonRef.current;
|
|
1853
|
-
if (!button) return;
|
|
1854
|
-
var rect = button.getBoundingClientRect();
|
|
1855
|
-
var size = Math.max(rect.width, rect.height);
|
|
1856
|
-
var x = event.clientX - rect.left - size / 2;
|
|
1857
|
-
var y = event.clientY - rect.top - size / 2;
|
|
1858
|
-
var rippleCount = 1; // number of rings
|
|
1859
|
-
var rippleDelay = 500; // ms between each ripple
|
|
1860
|
-
var _loop = function _loop() {
|
|
1861
|
-
var ripple = document.createElement('span');
|
|
1862
|
-
Object.assign(ripple.style, {
|
|
1863
|
-
position: 'absolute',
|
|
1864
|
-
borderRadius: '50%',
|
|
1865
|
-
backgroundColor: rippleColor,
|
|
1866
|
-
width: "".concat(size, "px"),
|
|
1867
|
-
height: "".concat(size, "px"),
|
|
1868
|
-
left: "".concat(x, "px"),
|
|
1869
|
-
top: "".concat(y, "px"),
|
|
1870
|
-
pointerEvents: 'none',
|
|
1871
|
-
transform: 'scale(0)',
|
|
1872
|
-
opacity: '1',
|
|
1873
|
-
transition: "transform 600ms ease-out ".concat(i * rippleDelay, "ms, opacity 600ms ease-out ").concat(i * rippleDelay, "ms"),
|
|
1874
|
-
zIndex: 1
|
|
1875
|
-
});
|
|
1876
|
-
button.appendChild(ripple);
|
|
1877
|
-
|
|
1878
|
-
// Force reflow to start transition
|
|
1879
|
-
window.getComputedStyle(ripple).opacity;
|
|
1880
|
-
ripple.style.transform = 'scale(2.5)';
|
|
1881
|
-
ripple.style.opacity = '0';
|
|
1882
|
-
ripple.addEventListener('transitionend', function () {
|
|
1883
|
-
ripple.remove();
|
|
1884
|
-
});
|
|
1885
|
-
};
|
|
1886
|
-
for (var i = 0; i < rippleCount; i++) {
|
|
1887
|
-
_loop();
|
|
1888
|
-
}
|
|
1889
|
-
};
|
|
1890
|
-
var clickHandler = function clickHandler(event) {
|
|
1891
|
-
if (disabled || loading) return;
|
|
1892
|
-
var showDrip = !shadow && !ghost && effect;
|
|
1893
|
-
/* istanbul ignore next */
|
|
1894
|
-
if (showDrip && buttonRef.current) {
|
|
1895
|
-
var rect = buttonRef.current.getBoundingClientRect();
|
|
1896
|
-
setDripShow(true);
|
|
1897
|
-
setDripX(event.clientX - rect.left);
|
|
1898
|
-
setDripY(event.clientY - rect.top);
|
|
1899
|
-
}
|
|
1900
|
-
if (shadow) {
|
|
1901
|
-
createRipple(event);
|
|
1902
|
-
}
|
|
1903
|
-
onClick && onClick(event);
|
|
1904
|
-
};
|
|
1905
|
-
var childrenWithIcon = React.useMemo(function () {
|
|
1906
|
-
return getButtonChildrenWithIcon(auto, children, {
|
|
1907
|
-
icon: icon,
|
|
1908
|
-
iconRight: iconRight
|
|
1909
|
-
});
|
|
1910
|
-
}, [auto, children, icon, iconRight]);
|
|
1911
|
-
var paddingLeft = auto ? SCALES.pl(1.15) : SCALES.pl(1.375),
|
|
1912
|
-
paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
|
|
1913
|
-
|
|
1914
|
-
// If shadow provided is string then value other default
|
|
1915
|
-
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
1916
|
-
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1917
|
-
children: [to ? /*#__PURE__*/jsxRuntime.jsxs("a", _objectSpread2(_objectSpread2({
|
|
1918
|
-
href: to
|
|
1919
|
-
}, props), {}, {
|
|
1920
|
-
className: _JSXStyle.dynamic([["612376042", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor !== null && cursor !== void 0 ? cursor : 'pointer', events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn', 'btn-link', className) || ""),
|
|
1921
|
-
children: [loading && /*#__PURE__*/jsxRuntime.jsx(ButtonLoading, {
|
|
1922
|
-
color: color
|
|
1923
|
-
}), childrenWithIcon]
|
|
1924
|
-
})) : /*#__PURE__*/jsxRuntime.jsxs("button", _objectSpread2(_objectSpread2({
|
|
1925
|
-
ref: buttonRef,
|
|
1926
|
-
type: type,
|
|
1927
|
-
disabled: disabled,
|
|
1928
|
-
onClick: clickHandler
|
|
1929
|
-
}, props), {}, {
|
|
1930
|
-
className: _JSXStyle.dynamic([["612376042", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor !== null && cursor !== void 0 ? cursor : 'pointer', events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn', className) || ""),
|
|
1931
|
-
children: [loading && /*#__PURE__*/jsxRuntime.jsx(ButtonLoading, {
|
|
1932
|
-
color: color
|
|
1933
|
-
}), childrenWithIcon, dripShow && /*#__PURE__*/jsxRuntime.jsx(ButtonDrip, {
|
|
1934
|
-
x: dripX,
|
|
1935
|
-
y: dripY,
|
|
1936
|
-
color: dripColor,
|
|
1937
|
-
onCompleted: dripCompletedHandle
|
|
1938
|
-
})]
|
|
1939
|
-
})), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
1940
|
-
id: "612376042",
|
|
1941
|
-
dynamic: [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor !== null && cursor !== void 0 ? cursor : 'pointer', events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px'],
|
|
1942
|
-
children: ".btn.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;line-height:".concat(SCALES.height(2.5), ";border-radius:").concat(round ? '50%' : theme$1.layout.radius, ";font-weight:400;font-size:").concat(SCALES.font(0.875), ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;text-transform:capitalize;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;white-space:nowrap;-webkit-transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;position:relative;overflow:hidden;color:").concat(color, ";background-color:").concat(bg, ";border:1px solid ").concat(shadow ? 'transparent' : border, ";cursor:").concat(cursor !== null && cursor !== void 0 ? cursor : 'pointer', ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? btnShadow : 'none', ";--helpdice-ui-button-icon-padding:").concat(SCALES.pl(0.727), ";--helpdice-ui-button-height:").concat(SCALES.height(2.5), ";--helpdice-ui-button-color:").concat(color, ";--helpdice-ui-button-bg:").concat(bg, ";min-width:").concat(auto ? 'min-content' : SCALES.width(10.5), ";width:").concat(auto ? 'auto' : 'initial', ";height:").concat(SCALES.height(2.5), ";padding:").concat(SCALES.pt(0), " ").concat(paddingRight, " ").concat(SCALES.pb(0), " ").concat(paddingLeft, ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.btn.__jsx-style-dynamic-selector:hover,.btn.__jsx-style-dynamic-selector:focus{color:").concat(hover.color, ";--helpdice-ui-button-color:").concat(hover.color, ";background-color:").concat(hover.bg, ";border-color:").concat(hover.border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(btnShadow, ";}.btn-link.__jsx-style-dynamic-selector{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.btn.__jsx-style-dynamic-selector .text{position:relative;z-index:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;line-height:inherit;top:-1px;}.btn.__jsx-style-dynamic-selector .text p,.btn.__jsx-style-dynamic-selector .text pre,.btn.__jsx-style-dynamic-selector .text div{margin:0;}.ripple.__jsx-style-dynamic-selector{position:absolute;border-radius:50%;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-animation:ripple-animation-__jsx-style-dynamic-selector 600ms ease-out;animation:ripple-animation-__jsx-style-dynamic-selector 600ms ease-out;background-color:rgba(0,0,0,0.3);pointer-events:none;z-index:1;}@-webkit-keyframes ripple-animation-__jsx-style-dynamic-selector{to{-webkit-transform:scale(2.5);-ms-transform:scale(2.5);transform:scale(2.5);opacity:0;}}@keyframes ripple-animation-__jsx-style-dynamic-selector{to{-webkit-transform:scale(2.5);-ms-transform:scale(2.5);transform:scale(2.5);opacity:0;}}")
|
|
1943
|
-
})]
|
|
1944
|
-
});
|
|
1945
|
-
});
|
|
1946
|
-
ButtonComponent.displayName = 'Button';
|
|
1947
|
-
var Button = withScale(ButtonComponent);
|
|
1948
|
-
|
|
1949
|
-
var CompactButton = function CompactButton(props) {
|
|
1950
|
-
// const theme = useTheme();
|
|
1951
|
-
return /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread2(_objectSpread2({
|
|
1952
|
-
scale: 2 / 3,
|
|
1953
|
-
px: 0.6
|
|
1954
|
-
}, _objectSpread2({
|
|
1955
|
-
auto: true
|
|
1956
|
-
}, props)), {}, {
|
|
1957
|
-
children: props.children
|
|
1958
|
-
}));
|
|
1959
|
-
};
|
|
1960
|
-
var IconButton = /*#__PURE__*/React.memo(CompactButton);
|
|
1961
|
-
|
|
1962
|
-
var SmallButton = function SmallButton(props) {
|
|
1963
|
-
// const theme = useTheme();
|
|
1964
|
-
return /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread2(_objectSpread2({
|
|
1965
|
-
auto: true,
|
|
1966
|
-
scale: 2 / 3,
|
|
1967
|
-
px: 0.6
|
|
1968
|
-
}, props), {}, {
|
|
1969
|
-
children: props.children
|
|
1970
|
-
}));
|
|
1971
|
-
};
|
|
1972
|
-
var SmallButton$1 = /*#__PURE__*/React.memo(SmallButton);
|
|
1973
|
-
|
|
1974
|
-
/* "use client" */
|
|
1975
|
-
|
|
1976
|
-
Button.Icon = IconButton;
|
|
1977
|
-
Button.Small = SmallButton$1;
|
|
1978
|
-
|
|
1979
|
-
var _excluded$1j = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "noWrap", "collapse", "children", "className", "display", "alignItems", "justify"];
|
|
1980
|
-
var _getModifierChild = function getModifierChild(tags, children) {
|
|
1981
|
-
if (!tags.length) return children;
|
|
1982
|
-
var nextTag = tags.slice(1, tags.length);
|
|
1983
|
-
return /*#__PURE__*/jsxRuntime.jsx(TextChild, {
|
|
1984
|
-
tag: tags[0],
|
|
1985
|
-
children: _getModifierChild(nextTag, children)
|
|
1986
|
-
});
|
|
1987
|
-
};
|
|
1988
|
-
var TextComponent = function TextComponent(_ref) {
|
|
1989
|
-
var _ref$h = _ref.h1,
|
|
1990
|
-
h1 = _ref$h === void 0 ? false : _ref$h,
|
|
1991
|
-
_ref$h2 = _ref.h2,
|
|
1992
|
-
h2 = _ref$h2 === void 0 ? false : _ref$h2,
|
|
1993
|
-
_ref$h3 = _ref.h3,
|
|
1994
|
-
h3 = _ref$h3 === void 0 ? false : _ref$h3,
|
|
1995
|
-
_ref$h4 = _ref.h4,
|
|
1996
|
-
h4 = _ref$h4 === void 0 ? false : _ref$h4,
|
|
1997
|
-
_ref$h5 = _ref.h5,
|
|
1998
|
-
h5 = _ref$h5 === void 0 ? false : _ref$h5,
|
|
1999
|
-
_ref$h6 = _ref.h6,
|
|
2000
|
-
h6 = _ref$h6 === void 0 ? false : _ref$h6,
|
|
2001
|
-
_ref$p = _ref.p,
|
|
2002
|
-
p = _ref$p === void 0 ? false : _ref$p,
|
|
2003
|
-
_ref$b = _ref.b,
|
|
2004
|
-
b = _ref$b === void 0 ? false : _ref$b,
|
|
2005
|
-
_ref$small = _ref.small,
|
|
2006
|
-
small = _ref$small === void 0 ? false : _ref$small,
|
|
2007
|
-
_ref$i = _ref.i,
|
|
2008
|
-
i = _ref$i === void 0 ? false : _ref$i,
|
|
2009
|
-
_ref$span = _ref.span,
|
|
2010
|
-
span = _ref$span === void 0 ? false : _ref$span,
|
|
2011
|
-
_ref$del = _ref.del,
|
|
2012
|
-
del = _ref$del === void 0 ? false : _ref$del,
|
|
2013
|
-
_ref$em = _ref.em,
|
|
2014
|
-
em = _ref$em === void 0 ? false : _ref$em,
|
|
2015
|
-
_ref$blockquote = _ref.blockquote,
|
|
2016
|
-
blockquote = _ref$blockquote === void 0 ? false : _ref$blockquote,
|
|
2017
|
-
_ref$noWrap = _ref.noWrap,
|
|
2018
|
-
noWrap = _ref$noWrap === void 0 ? false : _ref$noWrap,
|
|
2019
|
-
_ref$collapse = _ref.collapse,
|
|
2020
|
-
collapse = _ref$collapse === void 0 ? 0 : _ref$collapse,
|
|
2021
|
-
children = _ref.children,
|
|
2022
|
-
_ref$className = _ref.className,
|
|
2023
|
-
className = _ref$className === void 0 ? '' : _ref$className,
|
|
2024
|
-
_ref$display = _ref.display,
|
|
2025
|
-
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
2026
|
-
alignItems = _ref.alignItems,
|
|
2027
|
-
justify = _ref.justify,
|
|
2028
|
-
props = _objectWithoutProperties(_ref, _excluded$1j);
|
|
2029
|
-
var elements = {
|
|
2030
|
-
h1: h1,
|
|
2031
|
-
h2: h2,
|
|
2032
|
-
h3: h3,
|
|
2033
|
-
h4: h4,
|
|
2034
|
-
h5: h5,
|
|
2035
|
-
h6: h6,
|
|
2036
|
-
p: p,
|
|
2037
|
-
blockquote: blockquote
|
|
2038
|
-
};
|
|
2039
|
-
var inlineElements = {
|
|
2040
|
-
span: span,
|
|
2041
|
-
small: small,
|
|
2042
|
-
b: b,
|
|
2043
|
-
em: em,
|
|
2044
|
-
i: i,
|
|
2045
|
-
del: del
|
|
2046
|
-
};
|
|
2047
|
-
var names = Object.keys(elements).filter(function (name) {
|
|
2048
|
-
return elements[name];
|
|
2049
|
-
});
|
|
2050
|
-
var inlineNames = Object.keys(inlineElements).filter(function (name) {
|
|
2051
|
-
return inlineElements[name];
|
|
2052
|
-
});
|
|
2053
|
-
|
|
2054
|
-
/**
|
|
2055
|
-
* Render element "p" only if no element is found.
|
|
2056
|
-
* If there is only one modifier, just rendered one modifier element
|
|
2057
|
-
* e.g.
|
|
2058
|
-
* <Text /> => <p />
|
|
2059
|
-
* <Text em /> => <em />
|
|
2060
|
-
* <Text p em /> => <p><em>children</em></p>
|
|
2061
|
-
*
|
|
2062
|
-
*/
|
|
2063
|
-
|
|
2064
|
-
var _useState = React.useState(false),
|
|
2065
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
2066
|
-
expand = _useState2[0],
|
|
2067
|
-
setExpand = _useState2[1];
|
|
2068
|
-
var tag = React.useMemo(function () {
|
|
2069
|
-
if (names[0]) return names[0];
|
|
2070
|
-
if (inlineNames[0]) return inlineNames[0];
|
|
2071
|
-
return 'p';
|
|
2072
|
-
}, [names, inlineNames]);
|
|
2073
|
-
var renderableChildElements = inlineNames.filter(function (name) {
|
|
2074
|
-
return name !== tag;
|
|
2075
|
-
});
|
|
2076
|
-
var modifers = React.useMemo(function () {
|
|
2077
|
-
if (!renderableChildElements.length) return children;
|
|
2078
|
-
return _getModifierChild(renderableChildElements, children);
|
|
2079
|
-
}, [renderableChildElements, children]);
|
|
2080
|
-
return /*#__PURE__*/jsxRuntime.jsx(TextChild, _objectSpread2(_objectSpread2({
|
|
2081
|
-
style: {
|
|
2082
|
-
textAlign: props.align,
|
|
2083
|
-
display: display,
|
|
2084
|
-
alignItems: alignItems,
|
|
2085
|
-
justifyContent: justify
|
|
2086
|
-
},
|
|
2087
|
-
className: "".concat(className, " ").concat(noWrap ? 'no-wrap' : ''),
|
|
2088
|
-
tag: tag
|
|
2089
|
-
}, props), {}, {
|
|
2090
|
-
children: typeof children === 'string' && collapse > 50 ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2091
|
-
children: [expand ? modifers : (modifers === null || modifers === void 0 ? void 0 : modifers.toString().substring(0, collapse)) + '...', /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
2092
|
-
margin: 0,
|
|
2093
|
-
onClick: function onClick() {
|
|
2094
|
-
return setExpand(!expand);
|
|
2095
|
-
},
|
|
2096
|
-
style: {
|
|
2097
|
-
textTransform: 'lowercase'
|
|
2098
|
-
},
|
|
2099
|
-
effect: false,
|
|
2100
|
-
color: "abort",
|
|
2101
|
-
scale: 2 / 3,
|
|
2102
|
-
px: 0.2,
|
|
2103
|
-
py: 0,
|
|
2104
|
-
auto: true,
|
|
2105
|
-
children: /*#__PURE__*/jsxRuntime.jsx("b", {
|
|
2106
|
-
children: expand ? 'less' : 'more'
|
|
2107
|
-
})
|
|
2108
|
-
})]
|
|
2109
|
-
}) : modifers
|
|
2110
|
-
}));
|
|
2111
|
-
};
|
|
2112
|
-
TextComponent.displayName = 'Text';
|
|
2113
|
-
var Text = withScale(TextComponent);
|
|
2114
|
-
|
|
2115
|
-
var InputError = function InputError(_ref) {
|
|
2116
|
-
var text = _ref.text,
|
|
2117
|
-
error = _ref.error;
|
|
2118
|
-
return /*#__PURE__*/jsxRuntime.jsxs(Text, {
|
|
2119
|
-
font: 0.8,
|
|
2120
|
-
style: {
|
|
2121
|
-
marginTop: 0.4,
|
|
2122
|
-
marginRight: 0,
|
|
2123
|
-
marginLeft: 0,
|
|
2124
|
-
marginBottom: '0.4rem',
|
|
2125
|
-
textAlign: 'left',
|
|
2126
|
-
zIndex: 0
|
|
2127
|
-
},
|
|
2128
|
-
color: error ? "error" : 'default',
|
|
2129
|
-
children: ["\xA0", text]
|
|
2130
|
-
});
|
|
2131
|
-
};
|
|
2132
|
-
var InputBlockLabelComponent = function InputBlockLabelComponent(_ref2) {
|
|
2133
|
-
var children = _ref2.children,
|
|
2134
|
-
_ref2$required = _ref2.required,
|
|
2135
|
-
required = _ref2$required === void 0 ? false : _ref2$required;
|
|
2136
|
-
var theme$1 = theme.useTheme();
|
|
2137
|
-
var _useScale = useScale(),
|
|
2138
|
-
SCALES = _useScale.SCALES;
|
|
2139
|
-
return /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
2140
|
-
className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]),
|
|
2141
|
-
children: [children, required && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2142
|
-
className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]) + " " + "mark-error",
|
|
2143
|
-
children: "*"
|
|
2144
|
-
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
2145
|
-
id: "588038827",
|
|
2146
|
-
dynamic: [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)],
|
|
2147
|
-
children: "label.__jsx-style-dynamic-selector{display:".concat(typeof children === "string" ? 'block' : 'flex', ";font-weight:normal;color:").concat(theme$1.palette.accents_6, ";padding:0 0 0 1px;margin-bottom:0.5em;font-size:1em;line-height:1.5;}label.__jsx-style-dynamic-selector .mark-error.__jsx-style-dynamic-selector{color:").concat(theme$1.palette.errorDark, ";margin:0px 3px;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;font-size:").concat(SCALES.font(1.2), ";}label.__jsx-style-dynamic-selector>*:first-child{margin-top:0;}label.__jsx-style-dynamic-selector>*:last-child{margin-bottom:0;}")
|
|
2148
|
-
})]
|
|
2149
|
-
});
|
|
2150
|
-
};
|
|
2151
|
-
InputBlockLabelComponent.displayName = 'InputBlockLabel';
|
|
2152
|
-
var InputBlockLabel = /*#__PURE__*/React.memo(InputBlockLabelComponent);
|
|
2153
|
-
|
|
2154
|
-
var InputIconComponent = function InputIconComponent(_ref) {
|
|
2155
|
-
var icon = _ref.icon,
|
|
2156
|
-
_ref$clickable = _ref.clickable,
|
|
2157
|
-
clickable = _ref$clickable === void 0 ? false : _ref$clickable,
|
|
2158
|
-
onClick = _ref.onClick;
|
|
2159
|
-
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
2160
|
-
onClick: onClick,
|
|
2161
|
-
className: _JSXStyle.dynamic([["4247656379", [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none']]]) + " " + "input-icon",
|
|
2162
|
-
children: [icon, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
2163
|
-
id: "4247656379",
|
|
2164
|
-
dynamic: [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none'],
|
|
2165
|
-
children: ".input-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;line-height:1;position:relative;cursor:".concat(clickable ? 'pointer' : 'default', ";pointer-events:").concat(clickable ? 'auto' : 'none', ";}.input-icon.__jsx-style-dynamic-selector svg{width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
|
|
2166
|
-
})]
|
|
2167
|
-
});
|
|
2168
|
-
};
|
|
2169
|
-
InputIconComponent.displayName = 'InputIcon';
|
|
2170
|
-
var InputIcon = /*#__PURE__*/React.memo(InputIconComponent);
|
|
2171
|
-
|
|
2172
|
-
var InputIconClear = function InputIconClear(_ref) {
|
|
2173
|
-
var onClick = _ref.onClick,
|
|
2174
|
-
disabled = _ref.disabled,
|
|
2175
|
-
visible = _ref.visible;
|
|
2176
|
-
var theme$1 = theme.useTheme();
|
|
2177
|
-
var classes = theme.useClasses('clear-icon', {
|
|
2178
|
-
visible: visible
|
|
2179
|
-
});
|
|
2180
|
-
var clickHandler = function clickHandler(event) {
|
|
2181
|
-
event.preventDefault();
|
|
2182
|
-
event.stopPropagation();
|
|
2183
|
-
event.nativeEvent.stopImmediatePropagation();
|
|
2184
|
-
onClick && onClick(event);
|
|
2185
|
-
};
|
|
2186
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2187
|
-
onClick: clickHandler,
|
|
2188
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]) + " " + (classes || ""),
|
|
2189
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
2190
|
-
viewBox: "0 0 24 24",
|
|
2191
|
-
stroke: "currentColor",
|
|
2192
|
-
strokeWidth: "1.5",
|
|
2193
|
-
strokeLinecap: "round",
|
|
2194
|
-
strokeLinejoin: "round",
|
|
2195
|
-
fill: "none",
|
|
2196
|
-
shapeRendering: "geometricPrecision",
|
|
2197
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]),
|
|
2198
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
2199
|
-
d: "M18 6L6 18",
|
|
2200
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
2201
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
2202
|
-
d: "M6 6l12 12",
|
|
2203
|
-
className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
|
|
2204
|
-
})]
|
|
2205
|
-
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
2206
|
-
id: "1567030211",
|
|
2207
|
-
dynamic: [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground],
|
|
2208
|
-
children: ".clear-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;cursor:".concat(disabled ? 'not-allowed' : 'pointer', ";-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s;margin:0;padding:0;color:").concat(theme$1.palette.accents_3, ";visibility:hidden;opacity:0;}.visible.__jsx-style-dynamic-selector{visibility:visible;opacity:1;}.clear-icon.__jsx-style-dynamic-selector:hover{color:").concat(disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground, ";}svg.__jsx-style-dynamic-selector{color:currentColor;width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
|
|
2209
|
-
})]
|
|
2210
|
-
});
|
|
2211
|
-
};
|
|
2212
|
-
var MemoInputIconClear = /*#__PURE__*/React.memo(InputIconClear);
|
|
2213
|
-
|
|
2214
|
-
var getColors$7 = function getColors(palette, status) {
|
|
2215
|
-
var colors = {
|
|
2216
|
-
"default": {
|
|
2217
|
-
color: palette.foreground,
|
|
2218
|
-
borderColor: palette.border,
|
|
2219
|
-
hoverBorder: palette.accents_5
|
|
2220
|
-
},
|
|
2221
|
-
secondary: {
|
|
2222
|
-
color: palette.foreground,
|
|
2223
|
-
borderColor: palette.secondary,
|
|
2224
|
-
hoverBorder: palette.secondary
|
|
2225
|
-
},
|
|
2226
|
-
success: {
|
|
2227
|
-
color: palette.foreground,
|
|
2228
|
-
borderColor: palette.successLight,
|
|
2229
|
-
hoverBorder: palette.success
|
|
2230
|
-
},
|
|
2231
|
-
warning: {
|
|
2232
|
-
color: palette.foreground,
|
|
2233
|
-
borderColor: palette.warningLight,
|
|
2234
|
-
hoverBorder: palette.warning
|
|
2235
|
-
},
|
|
2236
|
-
error: {
|
|
2237
|
-
color: palette.error,
|
|
2238
|
-
borderColor: palette.error,
|
|
2239
|
-
hoverBorder: palette.errorDark
|
|
2240
|
-
}
|
|
2241
|
-
};
|
|
2242
|
-
if (!status) return colors["default"];
|
|
2243
|
-
return colors[status];
|
|
2244
|
-
};
|
|
2245
|
-
|
|
2246
|
-
var _excluded$1i = ["label", "labelRight", "error", "color", "helperText", "type", "icon", "variant", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "onEnter", "autoComplete", "placeholder", "children", "disabled", "fullWidth", "required"];
|
|
2247
|
-
var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
2248
|
-
return _objectSpread2(_objectSpread2({}, event), {}, {
|
|
2249
|
-
target: el,
|
|
2250
|
-
currentTarget: el
|
|
2251
|
-
});
|
|
1577
|
+
var _excluded$1l = ["label", "labelRight", "error", "color", "helperText", "type", "icon", "variant", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "onEnter", "autoComplete", "placeholder", "children", "disabled", "fullWidth", "required"];
|
|
1578
|
+
var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
1579
|
+
return _objectSpread2(_objectSpread2({}, event), {}, {
|
|
1580
|
+
target: el,
|
|
1581
|
+
currentTarget: el
|
|
1582
|
+
});
|
|
2252
1583
|
};
|
|
2253
1584
|
var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
2254
1585
|
var label = _ref.label,
|
|
@@ -2290,7 +1621,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2290
1621
|
_ref$fullWidth = _ref.fullWidth,
|
|
2291
1622
|
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
2292
1623
|
required = _ref.required,
|
|
2293
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1624
|
+
props = _objectWithoutProperties(_ref, _excluded$1l);
|
|
2294
1625
|
var theme$1 = theme.useTheme();
|
|
2295
1626
|
var _useScale = useScale(),
|
|
2296
1627
|
SCALES = _useScale.SCALES;
|
|
@@ -2450,7 +1781,7 @@ tuple('hover', 'click');
|
|
|
2450
1781
|
tuple('top', 'topStart', 'topEnd', 'left', 'leftStart', 'leftEnd', 'bottom', 'bottomStart', 'bottomEnd', 'right', 'rightStart', 'rightEnd');
|
|
2451
1782
|
tuple('start', 'center', 'end', 'left', 'right');
|
|
2452
1783
|
|
|
2453
|
-
var _excluded$
|
|
1784
|
+
var _excluded$1k = ["type", "disabled", "readOnly", "onFocus", "onBlur", "className", "initialValue", "onChange", "value", "placeholder", "helperText", "error", "label", "required", "resize"];
|
|
2454
1785
|
tuple('none', 'both', 'horizontal', 'vertical', 'initial', 'inherit');
|
|
2455
1786
|
var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
2456
1787
|
var _ref$type = _ref.type,
|
|
@@ -2474,7 +1805,7 @@ var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2474
1805
|
required = _ref.required,
|
|
2475
1806
|
_ref$resize = _ref.resize,
|
|
2476
1807
|
resize = _ref$resize === void 0 ? 'none' : _ref$resize,
|
|
2477
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1808
|
+
props = _objectWithoutProperties(_ref, _excluded$1k);
|
|
2478
1809
|
var theme$1 = theme.useTheme();
|
|
2479
1810
|
var _useScale = useScale(),
|
|
2480
1811
|
SCALES = _useScale.SCALES;
|
|
@@ -2598,11 +1929,11 @@ var PasswordIcon = function PasswordIcon(_ref) {
|
|
|
2598
1929
|
};
|
|
2599
1930
|
var MemoPasswordIcon = /*#__PURE__*/React.memo(PasswordIcon);
|
|
2600
1931
|
|
|
2601
|
-
var _excluded$
|
|
1932
|
+
var _excluded$1j = ["hideToggle", "children"];
|
|
2602
1933
|
var InputPasswordComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
2603
1934
|
var hideToggle = _ref.hideToggle,
|
|
2604
1935
|
children = _ref.children,
|
|
2605
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1936
|
+
props = _objectWithoutProperties(_ref, _excluded$1j);
|
|
2606
1937
|
var _useScale = useScale(),
|
|
2607
1938
|
getAllScaleProps = _useScale.getAllScaleProps;
|
|
2608
1939
|
var inputRef = React.useRef(null);
|
|
@@ -4210,7 +3541,7 @@ var repositionCursor = function repositionCursor(_ref) {
|
|
|
4210
3541
|
};
|
|
4211
3542
|
};
|
|
4212
3543
|
|
|
4213
|
-
var _excluded$
|
|
3544
|
+
var _excluded$1i = ["allowDecimals", "allowNegativeValue", "id", "name", "className", "customInput", "decimalsLimit", "defaultValue", "disabled", "maxLength", "value", "onValueChange", "fixedDecimalLength", "placeholder", "decimalScale", "prefix", "suffix", "intlConfig", "fullWidth", "step", "min", "max", "disableGroupSeparators", "disableAbbreviations", "decimalSeparator", "groupSeparator", "onChange", "onFocus", "onBlur", "onKeyDown", "onKeyUp", "transformRawValue", "formatValueOnBlur", "children"];
|
|
4214
3545
|
var InputCurrency = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
4215
3546
|
var _ref$allowDecimals = _ref.allowDecimals,
|
|
4216
3547
|
allowDecimals = _ref$allowDecimals === void 0 ? true : _ref$allowDecimals,
|
|
@@ -4252,7 +3583,7 @@ var InputCurrency = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
4252
3583
|
_ref$formatValueOnBlu = _ref.formatValueOnBlur,
|
|
4253
3584
|
formatValueOnBlur = _ref$formatValueOnBlu === void 0 ? true : _ref$formatValueOnBlu,
|
|
4254
3585
|
children = _ref.children,
|
|
4255
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3586
|
+
props = _objectWithoutProperties(_ref, _excluded$1i);
|
|
4256
3587
|
var _useScale = useScale(),
|
|
4257
3588
|
SCALES = _useScale.SCALES;
|
|
4258
3589
|
var theme$1 = theme.useTheme();
|
|
@@ -4562,10 +3893,10 @@ Input.Currency = CurrencyInput;
|
|
|
4562
3893
|
|
|
4563
3894
|
/* "use client" */
|
|
4564
3895
|
|
|
4565
|
-
var defaultContext$
|
|
3896
|
+
var defaultContext$d = {
|
|
4566
3897
|
visible: false
|
|
4567
3898
|
};
|
|
4568
|
-
var AutoCompleteContext = /*#__PURE__*/React.createContext(defaultContext$
|
|
3899
|
+
var AutoCompleteContext = /*#__PURE__*/React.createContext(defaultContext$d);
|
|
4569
3900
|
var useAutoCompleteContext = function useAutoCompleteContext() {
|
|
4570
3901
|
return React.useContext(AutoCompleteContext);
|
|
4571
3902
|
};
|
|
@@ -4678,7 +4009,59 @@ var AutoCompleteEmpty = function AutoCompleteEmpty(_ref) {
|
|
|
4678
4009
|
};
|
|
4679
4010
|
AutoCompleteEmpty.displayName = 'AutoCompleteEmpty';
|
|
4680
4011
|
|
|
4681
|
-
var _excluded$
|
|
4012
|
+
var _excluded$1h = ["children", "type", "color", "className", "spaceRatio"];
|
|
4013
|
+
var getIconBgColor = function getIconBgColor(type, palette, color) {
|
|
4014
|
+
var colors = {
|
|
4015
|
+
"default": palette.accents_6,
|
|
4016
|
+
secondary: palette.secondary,
|
|
4017
|
+
success: palette.success,
|
|
4018
|
+
warning: palette.warning,
|
|
4019
|
+
error: palette.error
|
|
4020
|
+
};
|
|
4021
|
+
return color ? color : colors[type];
|
|
4022
|
+
};
|
|
4023
|
+
var LoadingComponent = function LoadingComponent(_ref) {
|
|
4024
|
+
var children = _ref.children,
|
|
4025
|
+
_ref$type = _ref.type,
|
|
4026
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
4027
|
+
color = _ref.color,
|
|
4028
|
+
_ref$className = _ref.className,
|
|
4029
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
4030
|
+
_ref$spaceRatio = _ref.spaceRatio,
|
|
4031
|
+
spaceRatio = _ref$spaceRatio === void 0 ? 1 : _ref$spaceRatio,
|
|
4032
|
+
props = _objectWithoutProperties(_ref, _excluded$1h);
|
|
4033
|
+
var theme$1 = theme.useTheme();
|
|
4034
|
+
var _useScale = useScale(),
|
|
4035
|
+
SCALES = _useScale.SCALES;
|
|
4036
|
+
var classes = theme.useClasses('loading-container', className);
|
|
4037
|
+
var bgColor = React.useMemo(function () {
|
|
4038
|
+
return getIconBgColor(type, theme$1.palette, color);
|
|
4039
|
+
}, [type, theme$1.palette, color]);
|
|
4040
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
4041
|
+
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.palette.accents_5, bgColor, spaceRatio]]]) + " " + (props && props.className != null && props.className || classes || ""),
|
|
4042
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
4043
|
+
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.palette.accents_5, bgColor, spaceRatio]]]) + " " + "loading",
|
|
4044
|
+
children: [children && /*#__PURE__*/jsxRuntime.jsx("label", {
|
|
4045
|
+
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.palette.accents_5, bgColor, spaceRatio]]]),
|
|
4046
|
+
children: children
|
|
4047
|
+
}), /*#__PURE__*/jsxRuntime.jsx("i", {
|
|
4048
|
+
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.palette.accents_5, bgColor, spaceRatio]]])
|
|
4049
|
+
}), /*#__PURE__*/jsxRuntime.jsx("i", {
|
|
4050
|
+
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.palette.accents_5, bgColor, spaceRatio]]])
|
|
4051
|
+
}), /*#__PURE__*/jsxRuntime.jsx("i", {
|
|
4052
|
+
className: _JSXStyle.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.palette.accents_5, bgColor, spaceRatio]]])
|
|
4053
|
+
})]
|
|
4054
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
4055
|
+
id: "2201634259",
|
|
4056
|
+
dynamic: [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme$1.palette.accents_5, bgColor, spaceRatio],
|
|
4057
|
+
children: ".loading-container.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;font-size:".concat(SCALES.font(1), ";width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(1, '100%'), ";min-height:1em;padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}label.__jsx-style-dynamic-selector{margin-right:0.5em;color:").concat(theme$1.palette.accents_5, ";line-height:1;}label.__jsx-style-dynamic-selector *{margin:0;}.loading.__jsx-style-dynamic-selector{position:absolute;top:50%;left:50%;width:100%;height:100%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}i.__jsx-style-dynamic-selector{width:0.25em;height:0.25em;border-radius:50%;background-color:").concat(bgColor, ";margin:0 calc(0.25em / 2 * ").concat(spaceRatio, ");display:inline-block;-webkit-animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;}i.__jsx-style-dynamic-selector:nth-child(2){-webkit-animation-delay:0.2s;animation-delay:0.2s;}i.__jsx-style-dynamic-selector:nth-child(3){-webkit-animation-delay:0.4s;animation-delay:0.4s;}@-webkit-keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}@keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}")
|
|
4058
|
+
})]
|
|
4059
|
+
}));
|
|
4060
|
+
};
|
|
4061
|
+
LoadingComponent.displayName = 'Loading';
|
|
4062
|
+
var Loading = withScale(LoadingComponent);
|
|
4063
|
+
|
|
4064
|
+
var _excluded$1g = ["options", "initialValue", "onSelect", "onSearch", "onChange", "searching", "children", "type", "color", "value", "clearable", "disabled", "dropdownClassName", "dropdownStyle", "disableMatchWidth", "disableFreeSolo", "getPopupContainer"];
|
|
4682
4065
|
var childrenToOptionsNode = function childrenToOptionsNode(options) {
|
|
4683
4066
|
return options.map(function (item, index) {
|
|
4684
4067
|
var key = "auto-complete-item-".concat(index);
|
|
@@ -4727,7 +4110,7 @@ var AutoCompleteComponent = /*#__PURE__*/React.forwardRef(function (_ref, userRe
|
|
|
4727
4110
|
_ref$disableFreeSolo = _ref.disableFreeSolo,
|
|
4728
4111
|
disableFreeSolo = _ref$disableFreeSolo === void 0 ? false : _ref$disableFreeSolo,
|
|
4729
4112
|
getPopupContainer = _ref.getPopupContainer,
|
|
4730
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4113
|
+
props = _objectWithoutProperties(_ref, _excluded$1g);
|
|
4731
4114
|
var resetTimer = React.useRef(0); // DEFAULT Value 0
|
|
4732
4115
|
var _useScale = useScale(),
|
|
4733
4116
|
SCALES = _useScale.SCALES,
|
|
@@ -4880,370 +4263,963 @@ AutoComplete.Option = AutoCompleteItemComponent;
|
|
|
4880
4263
|
AutoComplete.Searching = AutoCompleteSearch;
|
|
4881
4264
|
AutoComplete.Empty = AutoCompleteEmpty;
|
|
4882
4265
|
|
|
4883
|
-
var _excluded$
|
|
4266
|
+
var _excluded$1f = ["src", "errorSrc", "stacked", "text", "isSquare", "className", "children"];
|
|
4884
4267
|
var safeText = function safeText(text) {
|
|
4885
4268
|
if (text.length <= 4) return text;
|
|
4886
4269
|
return text.slice(0, 3);
|
|
4887
4270
|
};
|
|
4888
|
-
var errorImgLight = "data:image/webp;base64,UklGRj4SAABXRUJQVlA4IDISAADQrgGdASoABgAEPnk8nUqko6MhoLZIGJAPCWlu7rRyreBeTwOeyGlN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bpxaNSDSO70Xn9ptfVuxDqvt3RXfcdc8qNkGTF6ljEaNyd57ToAAA/vlmpfvJUdX+gHYSAAv/2ax8aWf6hojTaLFUrpvZggugZ4stRlPWFwsNa+y2tuY/CRLJV/AVFJ2EWOonLtEM81iwHxgdKlJag39ZeUofXsvT5YVzmtqSww/m9RgEFcu4qtE0/EsyritDLQUbFYHMhrzGwsyuPVneeB7W+j4fRY30ZEy3bHBPJiCtgbC/upgO7mI8j3qnbY+K0b/xffatY7sIdVXb0zPhQHzsRw5OVc5a0fzVPpYJdSsPs8el3yLSzBFgXRPApkW/LJWxhVQiXJqFZ+WclqioLswepUNm/TpZ15O4KhXRzBHghsFctp+iLScSxp5YQ1Vkls1wL58PK/+4YNmshD0T4DY6zl306cJCYGt4IA4nNZ1BpTwWNEd//w/317synowZdTvPyWXrcXwadvui2tWSHDchOkZ/svXH/7jwIgZHngPkcMfQgPqUv+8ZFnPpT2SNG41gxntCp1aP2PzeNVnVA2lNhOe2BwyseNoBlUXXsoA1GfZ/PW+eb0sgrlro4GSOMj4M4EefnJGImmcamKiRZ1rx+eeB30MuoShhP6xOCgAAyzagBecwOkVfwVrmYPOkkMFLeVRm1TamamDugJyzpWgR7Q+PiVX20fvrmVXNdsnJ/DpmqwRtxjUGtPobFIQAAA==";
|
|
4890
|
-
var AvatarComponent = function AvatarComponent(_ref) {
|
|
4891
|
-
var src = _ref.src;
|
|
4892
|
-
_ref.errorSrc;
|
|
4893
|
-
var _ref$stacked = _ref.stacked,
|
|
4894
|
-
stacked = _ref$stacked === void 0 ? false : _ref$stacked,
|
|
4895
|
-
_ref$text = _ref.text,
|
|
4896
|
-
text = _ref$text === void 0 ? '' : _ref$text,
|
|
4897
|
-
_ref$isSquare = _ref.isSquare,
|
|
4898
|
-
isSquare = _ref$isSquare === void 0 ? false : _ref$isSquare,
|
|
4899
|
-
_ref$className = _ref.className,
|
|
4900
|
-
className = _ref$className === void 0 ? '' : _ref$className,
|
|
4271
|
+
var errorImgLight = "data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nEw1EMYS+N8othCiqn0DIXlNqEzN1PfKhB451H/5NH9LmmehOq8SSsQgDkUuPgBPRMHvMr4UcbkeF8/J3IqtrvbpxaNSDSO70Xn9ptfVuxDqvt3RXfcdc8qNkGTF6ljEaNyd57ToAAA/vlmpfvJUdX+gHYSAAv/2ax8aWf6hojTaLFUrpvZggugZ4stRlPWFwsNa+y2tuY/CRLJV/AVFJ2EWOonLtEM81iwHxgdKlJag39ZeUofXsvT5YVzmtqSww/m9RgEFcu4qtE0/EsyritDLQUbFYHMhrzGwsyuPVneeB7W+j4fRY30ZEy3bHBPJiCtgbC/upgO7mI8j3qnbY+K0b/xffatY7sIdVXb0zPhQHzsRw5OVc5a0fzVPpYJdSsPs8el3yLSzBFgXRPApkW/LJWxhVQiXJqFZ+WclqioLswepUNm/TpZ15O4KhXRzBHghsFctp+iLScSxp5YQ1Vkls1wL58PK/+4YNmshD0T4DY6zl306cJCYGt4IA4nNZ1BpTwWNEd//w/317synowZdTvPyWXrcXwadvui2tWSHDchOkZ/svXH/7jwIgZHngPkcMfQgPqUv+8ZFnPpT2SNG41gxntCp1aP2PzeNVnVA2lNhOe2BwyseNoBlUXXsoA1GfZ/PW+eb0sgrlro4GSOMj4M4EefnJGImmcamKiRZ1rx+eeB30MuoShhP6xOCgAAyzagBecwOkVfwVrmYPOkkMFLeVRm1TamamDugJyzpWgR7Q+PiVX20fvrmVXNdsnJ/DpmqwRtxjUGtPobFIQAAA==";
|
|
4273
|
+
var AvatarComponent = function AvatarComponent(_ref) {
|
|
4274
|
+
var src = _ref.src;
|
|
4275
|
+
_ref.errorSrc;
|
|
4276
|
+
var _ref$stacked = _ref.stacked,
|
|
4277
|
+
stacked = _ref$stacked === void 0 ? false : _ref$stacked,
|
|
4278
|
+
_ref$text = _ref.text,
|
|
4279
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
4280
|
+
_ref$isSquare = _ref.isSquare,
|
|
4281
|
+
isSquare = _ref$isSquare === void 0 ? false : _ref$isSquare,
|
|
4282
|
+
_ref$className = _ref.className,
|
|
4283
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
4284
|
+
children = _ref.children,
|
|
4285
|
+
props = _objectWithoutProperties(_ref, _excluded$1f);
|
|
4286
|
+
var theme$1 = theme.useTheme();
|
|
4287
|
+
var fallbackSrc = theme$1.type === 'dark' ? errorImgDark : errorImgLight;
|
|
4288
|
+
var _useScale = useScale(),
|
|
4289
|
+
SCALES = _useScale.SCALES;
|
|
4290
|
+
var showText = !src;
|
|
4291
|
+
var radius = isSquare ? theme$1.layout.radius : '50%';
|
|
4292
|
+
var marginLeft = stacked ? SCALES.ml(-0.625) : SCALES.ml(0);
|
|
4293
|
+
var classes = theme.useClasses('avatar', className);
|
|
4294
|
+
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
4295
|
+
className: _JSXStyle.dynamic([["2295275975", [theme$1.palette.accents_2, radius, theme$1.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)]]]) + " " + (classes || ""),
|
|
4296
|
+
children: [!text || !showText ? /*#__PURE__*/jsxRuntime.jsx("img", _objectSpread2(_objectSpread2({
|
|
4297
|
+
alt: "avatar",
|
|
4298
|
+
src: src !== null && src !== void 0 ? src : fallbackSrc,
|
|
4299
|
+
draggable: false
|
|
4300
|
+
}, props), {}, {
|
|
4301
|
+
onError: function onError(e) {
|
|
4302
|
+
e.currentTarget.onerror = null; // prevent loop
|
|
4303
|
+
e.currentTarget.src = fallbackSrc;
|
|
4304
|
+
},
|
|
4305
|
+
className: _JSXStyle.dynamic([["2295275975", [theme$1.palette.accents_2, radius, theme$1.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)]]]) + " " + (props && props.className != null && props.className || "avatar-img")
|
|
4306
|
+
})) : null, showText && /*#__PURE__*/jsxRuntime.jsx("span", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
4307
|
+
className: _JSXStyle.dynamic([["2295275975", [theme$1.palette.accents_2, radius, theme$1.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)]]]) + " " + (props && props.className != null && props.className || "avatar-text"),
|
|
4308
|
+
children: text ? safeText(text) : children
|
|
4309
|
+
})), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
4310
|
+
id: "2295275975",
|
|
4311
|
+
dynamic: [theme$1.palette.accents_2, radius, theme$1.palette.background, SCALES.width(1.75) || SCALES.height(1.75), SCALES.height(1.75) || SCALES.width(1.75), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), marginLeft, radius, SCALES.font(1)],
|
|
4312
|
+
children: ".avatar.__jsx-style-dynamic-selector{display:inline-block;position:relative;overflow:hidden;border:1px solid ".concat(theme$1.palette.accents_2, ";border-radius:").concat(radius, ";vertical-align:top;background-color:").concat(theme$1.palette.background, ";box-sizing:border-box;width:").concat(SCALES.width(1.75) || SCALES.height(1.75), ";height:").concat(SCALES.height(1.75) || SCALES.width(1.75), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(marginLeft, ";}.avatar-img.__jsx-style-dynamic-selector{display:inline-block;object-fit:cover;width:100%;height:100%;border-radius:").concat(radius, ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.avatar-text.__jsx-style-dynamic-selector{position:absolute;left:50%;top:50%;font-size:").concat(SCALES.font(1), ";text-align:center;-webkit-transform:translate(-50%,-50%) scale(0.65);-ms-transform:translate(-50%,-50%) scale(0.65);transform:translate(-50%,-50%) scale(0.65);white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}")
|
|
4313
|
+
})]
|
|
4314
|
+
});
|
|
4315
|
+
};
|
|
4316
|
+
AvatarComponent.displayName = 'Avatar';
|
|
4317
|
+
var Avatar = withScale(AvatarComponent);
|
|
4318
|
+
|
|
4319
|
+
var AvatarGroupComponent = function AvatarGroupComponent(_ref) {
|
|
4320
|
+
var count = _ref.count,
|
|
4321
|
+
_ref$className = _ref.className,
|
|
4322
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
4323
|
+
children = _ref.children;
|
|
4324
|
+
var theme$1 = theme.useTheme();
|
|
4325
|
+
var _useScale = useScale(),
|
|
4326
|
+
SCALES = _useScale.SCALES;
|
|
4327
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4328
|
+
className: _JSXStyle.dynamic([["1135268764", [SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.ml(0.625), SCALES.font(0.875), theme$1.palette.accents_7]]]) + " " + (theme.useClasses('avatar-group', className) || ""),
|
|
4329
|
+
children: [children, count && /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
4330
|
+
className: _JSXStyle.dynamic([["1135268764", [SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.ml(0.625), SCALES.font(0.875), theme$1.palette.accents_7]]]) + " " + "count",
|
|
4331
|
+
children: ["+", count]
|
|
4332
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
4333
|
+
id: "1135268764",
|
|
4334
|
+
dynamic: [SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.ml(0.625), SCALES.font(0.875), theme$1.palette.accents_7],
|
|
4335
|
+
children: ".avatar-group.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:".concat(SCALES.width(1, 'max-content'), ";height:").concat(SCALES.height(1, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.avatar-group.__jsx-style-dynamic-selector .avatar{margin-left:-").concat(SCALES.ml(0.625), ";}.count.__jsx-style-dynamic-selector{font-size:").concat(SCALES.font(0.875), ";display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:5.5px;color:").concat(theme$1.palette.accents_7, ";}")
|
|
4336
|
+
})]
|
|
4337
|
+
});
|
|
4338
|
+
};
|
|
4339
|
+
AvatarGroupComponent.displayName = 'AvatarGroup';
|
|
4340
|
+
var AvatarGroup = withScale(AvatarGroupComponent);
|
|
4341
|
+
|
|
4342
|
+
/* "use client" */
|
|
4343
|
+
|
|
4344
|
+
Avatar.Group = AvatarGroup;
|
|
4345
|
+
|
|
4346
|
+
var _excluded$1e = ["color", "className", "children", "dot"];
|
|
4347
|
+
var getBgColor = function getBgColor(type, palette) {
|
|
4348
|
+
var colors = {
|
|
4349
|
+
"default": palette.foreground,
|
|
4350
|
+
success: palette.success,
|
|
4351
|
+
warning: palette.warning,
|
|
4352
|
+
error: palette.error,
|
|
4353
|
+
secondary: palette.secondary
|
|
4354
|
+
};
|
|
4355
|
+
return colors[type];
|
|
4356
|
+
};
|
|
4357
|
+
var BadgeComponent = function BadgeComponent(_ref) {
|
|
4358
|
+
var _ref$color = _ref.color,
|
|
4359
|
+
color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
4360
|
+
_ref$className = _ref.className,
|
|
4361
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
4362
|
+
children = _ref.children,
|
|
4363
|
+
_ref$dot = _ref.dot,
|
|
4364
|
+
dot = _ref$dot === void 0 ? false : _ref$dot,
|
|
4365
|
+
props = _objectWithoutProperties(_ref, _excluded$1e);
|
|
4366
|
+
var theme$1 = theme.useTheme();
|
|
4367
|
+
var _useScale = useScale(),
|
|
4368
|
+
SCALES = _useScale.SCALES;
|
|
4369
|
+
var bg = React.useMemo(function () {
|
|
4370
|
+
return getBgColor(color, theme$1.palette);
|
|
4371
|
+
}, [color, theme$1.palette]);
|
|
4372
|
+
var _color = React.useMemo(function () {
|
|
4373
|
+
if (!color || color === 'default') return theme$1.palette.background;
|
|
4374
|
+
return 'white';
|
|
4375
|
+
}, [color, theme$1.palette.background]);
|
|
4376
|
+
var classes = theme.useClasses('badge', {
|
|
4377
|
+
dot: dot
|
|
4378
|
+
}, className);
|
|
4379
|
+
return /*#__PURE__*/jsxRuntime.jsxs("span", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
4380
|
+
className: _JSXStyle.dynamic([["120113192", [bg, _color, SCALES.font(0.875), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0.25), SCALES.pr(0.5375), SCALES.pb(0.30), SCALES.pl(0.5375), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.py(0.25), SCALES.px(0.25)]]]) + " " + (props && props.className != null && props.className || classes || ""),
|
|
4381
|
+
children: [!dot && children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
4382
|
+
id: "120113192",
|
|
4383
|
+
dynamic: [bg, _color, SCALES.font(0.875), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0.25), SCALES.pr(0.5375), SCALES.pb(0.30), SCALES.pl(0.5375), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.py(0.25), SCALES.px(0.25)],
|
|
4384
|
+
children: ".badge.__jsx-style-dynamic-selector{display:inline-block;border-radius:16px;font-variant:tabular-nums;line-height:1;vertical-align:middle;background-color:".concat(bg, ";color:").concat(_color, ";border:0;font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";padding:").concat(SCALES.pt(0.25), " ").concat(SCALES.pr(0.5375), " ").concat(SCALES.pb(0.30), " ").concat(SCALES.pl(0.5375), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.dot.__jsx-style-dynamic-selector{padding:").concat(SCALES.py(0.25), " ").concat(SCALES.px(0.25), ";border-radius:50%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}")
|
|
4385
|
+
})]
|
|
4386
|
+
}));
|
|
4387
|
+
};
|
|
4388
|
+
BadgeComponent.displayName = 'Badge';
|
|
4389
|
+
var Badge = withScale(BadgeComponent);
|
|
4390
|
+
|
|
4391
|
+
tuple('topLeft', 'topRight', 'bottomLeft', 'bottomRight');
|
|
4392
|
+
var getTransform = function getTransform(placement) {
|
|
4393
|
+
var styles = {
|
|
4394
|
+
topLeft: {
|
|
4395
|
+
top: '0',
|
|
4396
|
+
left: '0',
|
|
4397
|
+
value: 'translate(-50%, -50%)',
|
|
4398
|
+
origin: '0% 0%'
|
|
4399
|
+
},
|
|
4400
|
+
topRight: {
|
|
4401
|
+
top: '0',
|
|
4402
|
+
right: '0',
|
|
4403
|
+
value: 'translate(50%, -50%)',
|
|
4404
|
+
origin: '100% 0%'
|
|
4405
|
+
},
|
|
4406
|
+
bottomLeft: {
|
|
4407
|
+
left: '0',
|
|
4408
|
+
bottom: '0',
|
|
4409
|
+
value: 'translate(-50%, 50%)',
|
|
4410
|
+
origin: '0% 100%'
|
|
4411
|
+
},
|
|
4412
|
+
bottomRight: {
|
|
4413
|
+
right: '0',
|
|
4414
|
+
bottom: '0',
|
|
4415
|
+
value: 'translate(50%, 50%)',
|
|
4416
|
+
origin: '100% 100%'
|
|
4417
|
+
}
|
|
4418
|
+
};
|
|
4419
|
+
return styles[placement];
|
|
4420
|
+
};
|
|
4421
|
+
var BadgeAnchor = function BadgeAnchor(_ref) {
|
|
4422
|
+
var children = _ref.children,
|
|
4423
|
+
_ref$placement = _ref.placement,
|
|
4424
|
+
placement = _ref$placement === void 0 ? 'topRight' : _ref$placement;
|
|
4425
|
+
var _pickChild = pickChild(children, Badge),
|
|
4426
|
+
_pickChild2 = _slicedToArray(_pickChild, 2),
|
|
4427
|
+
withoutBadgeChildren = _pickChild2[0],
|
|
4428
|
+
badgeChldren = _pickChild2[1];
|
|
4429
|
+
var _useMemo = React.useMemo(function () {
|
|
4430
|
+
return getTransform(placement);
|
|
4431
|
+
}, [placement]),
|
|
4432
|
+
top = _useMemo.top,
|
|
4433
|
+
bottom = _useMemo.bottom,
|
|
4434
|
+
left = _useMemo.left,
|
|
4435
|
+
right = _useMemo.right,
|
|
4436
|
+
value = _useMemo.value,
|
|
4437
|
+
origin = _useMemo.origin;
|
|
4438
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4439
|
+
className: _JSXStyle.dynamic([["1121745930", [top || 'auto', left || 'auto', right || 'auto', bottom || 'auto', value, origin]]]) + " " + "anchor",
|
|
4440
|
+
children: [withoutBadgeChildren, /*#__PURE__*/jsxRuntime.jsx("sup", {
|
|
4441
|
+
className: _JSXStyle.dynamic([["1121745930", [top || 'auto', left || 'auto', right || 'auto', bottom || 'auto', value, origin]]]),
|
|
4442
|
+
children: badgeChldren
|
|
4443
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
4444
|
+
id: "1121745930",
|
|
4445
|
+
dynamic: [top || 'auto', left || 'auto', right || 'auto', bottom || 'auto', value, origin],
|
|
4446
|
+
children: ".anchor.__jsx-style-dynamic-selector{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;box-sizing:border-box;}sup.__jsx-style-dynamic-selector{position:absolute;top:".concat(top || 'auto', ";left:").concat(left || 'auto', ";right:").concat(right || 'auto', ";bottom:").concat(bottom || 'auto', ";-webkit-transform:").concat(value, ";-ms-transform:").concat(value, ";transform:").concat(value, ";-webkit-transform-origin:").concat(origin, ";-ms-transform-origin:").concat(origin, ";transform-origin:").concat(origin, ";z-index:1;}")
|
|
4447
|
+
})]
|
|
4448
|
+
});
|
|
4449
|
+
};
|
|
4450
|
+
BadgeAnchor.displayName = 'BadgeAnchor';
|
|
4451
|
+
|
|
4452
|
+
/* "use client" */
|
|
4453
|
+
|
|
4454
|
+
Badge.Anchor = BadgeAnchor;
|
|
4455
|
+
|
|
4456
|
+
var Separator = function Separator(_ref) {
|
|
4457
|
+
var children = _ref.children,
|
|
4458
|
+
_ref$className = _ref.className,
|
|
4459
|
+
className = _ref$className === void 0 ? '' : _ref$className;
|
|
4460
|
+
var _useScale = useScale(),
|
|
4461
|
+
SCALES = _useScale.SCALES;
|
|
4462
|
+
var classes = theme.useClasses('separator', className);
|
|
4463
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4464
|
+
className: _JSXStyle.dynamic([["1571781185", [SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0.5), SCALES.mb(0), SCALES.ml(0.5)]]]) + " " + (classes || ""),
|
|
4465
|
+
children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
4466
|
+
id: "1571781185",
|
|
4467
|
+
dynamic: [SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0.5), SCALES.mb(0), SCALES.ml(0.5)],
|
|
4468
|
+
children: ".separator.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:".concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0.5), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0.5), ";}")
|
|
4469
|
+
})]
|
|
4470
|
+
});
|
|
4471
|
+
};
|
|
4472
|
+
Separator.displayName = 'BreadcrumbsSeparator';
|
|
4473
|
+
var BreadcrumbsSeparator = withScale(Separator);
|
|
4474
|
+
|
|
4475
|
+
var hexToRgb = function hexToRgb(color) {
|
|
4476
|
+
var fullReg = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
4477
|
+
var full = color.replace(fullReg, function (_, r, g, b) {
|
|
4478
|
+
return "".concat(r).concat(r).concat(g).concat(g).concat(b).concat(b);
|
|
4479
|
+
});
|
|
4480
|
+
var values = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(full);
|
|
4481
|
+
if (!values) {
|
|
4482
|
+
throw new Error("Helpdice UI: Unsupported ".concat(color, " color."));
|
|
4483
|
+
}
|
|
4484
|
+
return [Number.parseInt(values[1], 16), Number.parseInt(values[2], 16), Number.parseInt(values[3], 16)];
|
|
4485
|
+
};
|
|
4486
|
+
var colorToRgbValues = function colorToRgbValues(color) {
|
|
4487
|
+
if (color.charAt(0) === '#') return hexToRgb(color);
|
|
4488
|
+
var safeColor = color.replace(/ /g, '');
|
|
4489
|
+
var colorType = color.substr(0, 4);
|
|
4490
|
+
var regArray = safeColor.match(/\((.+)\)/);
|
|
4491
|
+
if (!colorType.startsWith('rgb') || !regArray) {
|
|
4492
|
+
console.log(color);
|
|
4493
|
+
throw new Error("Helpdice UI: Only support [\"RGB\", \"RGBA\", \"HEX\"] color.");
|
|
4494
|
+
}
|
|
4495
|
+
return regArray[1].split(',').map(function (str) {
|
|
4496
|
+
return Number.parseFloat(str);
|
|
4497
|
+
});
|
|
4498
|
+
};
|
|
4499
|
+
var addColorAlpha = function addColorAlpha(color, alpha) {
|
|
4500
|
+
if (!/^#|rgb|RGB/.test(color)) return color;
|
|
4501
|
+
var _colorToRgbValues = colorToRgbValues(color),
|
|
4502
|
+
_colorToRgbValues2 = _slicedToArray(_colorToRgbValues, 3),
|
|
4503
|
+
r = _colorToRgbValues2[0],
|
|
4504
|
+
g = _colorToRgbValues2[1],
|
|
4505
|
+
b = _colorToRgbValues2[2];
|
|
4506
|
+
var safeAlpha = alpha > 1 ? 1 : alpha < 0 ? 0 : alpha;
|
|
4507
|
+
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(safeAlpha, ")");
|
|
4508
|
+
};
|
|
4509
|
+
|
|
4510
|
+
var BreadcrumbsComponent = function BreadcrumbsComponent(_ref) {
|
|
4511
|
+
var _ref$separator = _ref.separator,
|
|
4512
|
+
separator = _ref$separator === void 0 ? '/' : _ref$separator,
|
|
4901
4513
|
children = _ref.children,
|
|
4902
|
-
|
|
4514
|
+
_ref$className = _ref.className,
|
|
4515
|
+
className = _ref$className === void 0 ? '' : _ref$className;
|
|
4903
4516
|
var theme$1 = theme.useTheme();
|
|
4904
|
-
var fallbackSrc = theme$1.type === 'dark' ? errorImgDark : errorImgLight;
|
|
4905
4517
|
var _useScale = useScale(),
|
|
4906
4518
|
SCALES = _useScale.SCALES;
|
|
4907
|
-
var
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
var
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
},
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4519
|
+
var hoverColor = React.useMemo(function () {
|
|
4520
|
+
return addColorAlpha(theme$1.palette.link, 0.85);
|
|
4521
|
+
}, [theme$1.palette.link]);
|
|
4522
|
+
var childrenArray = React.Children.toArray(children);
|
|
4523
|
+
var withSeparatorChildren = childrenArray.map(function (item, index) {
|
|
4524
|
+
if (! /*#__PURE__*/React.isValidElement(item)) return item;
|
|
4525
|
+
var last = childrenArray[index - 1];
|
|
4526
|
+
var lastIsSeparator = /*#__PURE__*/React.isValidElement(last) && last.type === BreadcrumbsSeparator;
|
|
4527
|
+
var currentIsSeparator = item.type === BreadcrumbsSeparator;
|
|
4528
|
+
if (!lastIsSeparator && !currentIsSeparator && index > 0) {
|
|
4529
|
+
return /*#__PURE__*/jsxRuntime.jsxs(React.Fragment, {
|
|
4530
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(BreadcrumbsSeparator, {
|
|
4531
|
+
children: separator
|
|
4532
|
+
}), item]
|
|
4533
|
+
}, index);
|
|
4534
|
+
}
|
|
4535
|
+
return item;
|
|
4536
|
+
});
|
|
4537
|
+
return /*#__PURE__*/jsxRuntime.jsxs("nav", {
|
|
4538
|
+
className: _JSXStyle.dynamic([["524763277", [theme$1.palette.accents_4, SCALES.font(1), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverColor, theme$1.palette.accents_6]]]) + " " + (className || ""),
|
|
4539
|
+
children: [withSeparatorChildren, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
4540
|
+
id: "524763277",
|
|
4541
|
+
dynamic: [theme$1.palette.accents_4, SCALES.font(1), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverColor, theme$1.palette.accents_6],
|
|
4542
|
+
children: "nav.__jsx-style-dynamic-selector{line-height:inherit;color:".concat(theme$1.palette.accents_4, ";box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:").concat(SCALES.font(1), ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}nav.__jsx-style-dynamic-selector .link:hover{color:").concat(hoverColor, ";}nav.__jsx-style-dynamic-selector>span:last-of-type{color:").concat(theme$1.palette.accents_6, ";}nav.__jsx-style-dynamic-selector>.separator:last-child{display:none;}nav.__jsx-style-dynamic-selector svg{width:1em;height:1em;margin:0 4px;}nav.__jsx-style-dynamic-selector .breadcrumbs-item{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}")
|
|
4930
4543
|
})]
|
|
4931
4544
|
});
|
|
4932
4545
|
};
|
|
4933
|
-
|
|
4934
|
-
var
|
|
4546
|
+
BreadcrumbsComponent.displayName = 'Breadcrumbs';
|
|
4547
|
+
var Breadcrumbs = withScale(BreadcrumbsComponent);
|
|
4935
4548
|
|
|
4936
|
-
var
|
|
4937
|
-
|
|
4549
|
+
var LinkIconComponent = function LinkIconComponent() {
|
|
4550
|
+
return /*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
4551
|
+
viewBox: "0 0 24 24",
|
|
4552
|
+
width: "0.9375em",
|
|
4553
|
+
height: "0.9375em",
|
|
4554
|
+
stroke: "currentColor",
|
|
4555
|
+
strokeWidth: "1.5",
|
|
4556
|
+
strokeLinecap: "round",
|
|
4557
|
+
strokeLinejoin: "round",
|
|
4558
|
+
fill: "none",
|
|
4559
|
+
shapeRendering: "geometricPrecision",
|
|
4560
|
+
className: "jsx-3409194595" + " " + "icon",
|
|
4561
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
4562
|
+
d: "M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6",
|
|
4563
|
+
className: "jsx-3409194595"
|
|
4564
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
4565
|
+
d: "M15 3h6v6",
|
|
4566
|
+
className: "jsx-3409194595"
|
|
4567
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
4568
|
+
d: "M10 14L21 3",
|
|
4569
|
+
className: "jsx-3409194595"
|
|
4570
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
4571
|
+
id: "3409194595",
|
|
4572
|
+
children: ".icon.jsx-3409194595{margin:0 0 -1px 0.1875em;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;color:currentColor;}"
|
|
4573
|
+
})]
|
|
4574
|
+
});
|
|
4575
|
+
};
|
|
4576
|
+
LinkIconComponent.displayName = 'LinkIcon';
|
|
4577
|
+
var LinkIcon = /*#__PURE__*/React.memo(LinkIconComponent);
|
|
4578
|
+
|
|
4579
|
+
var _excluded$1d = ["href", "showColor", "underline", "children", "className", "block", "arrow", "icon"];
|
|
4580
|
+
var LinkComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
4581
|
+
var _ref$href = _ref.href,
|
|
4582
|
+
href = _ref$href === void 0 ? '' : _ref$href,
|
|
4583
|
+
_ref$showColor = _ref.showColor,
|
|
4584
|
+
showColor = _ref$showColor === void 0 ? false : _ref$showColor,
|
|
4585
|
+
_ref$underline = _ref.underline,
|
|
4586
|
+
underline = _ref$underline === void 0 ? false : _ref$underline,
|
|
4587
|
+
children = _ref.children,
|
|
4938
4588
|
_ref$className = _ref.className,
|
|
4939
4589
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
4940
|
-
|
|
4590
|
+
_ref$block = _ref.block,
|
|
4591
|
+
block = _ref$block === void 0 ? false : _ref$block,
|
|
4592
|
+
_ref$arrow = _ref.arrow,
|
|
4593
|
+
arrow = _ref$arrow === void 0 ? false : _ref$arrow,
|
|
4594
|
+
icon = _ref.icon,
|
|
4595
|
+
props = _objectWithoutProperties(_ref, _excluded$1d);
|
|
4941
4596
|
var theme$1 = theme.useTheme();
|
|
4942
4597
|
var _useScale = useScale(),
|
|
4943
4598
|
SCALES = _useScale.SCALES;
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4599
|
+
var linkColor = showColor || block ? theme$1.palette.link : 'inherit';
|
|
4600
|
+
var hoverColor = showColor || block ? theme$1.palette.successLight : 'inherit';
|
|
4601
|
+
var decoration = underline ? 'underline' : 'none';
|
|
4602
|
+
var classes = theme.useClasses('link', {
|
|
4603
|
+
block: block
|
|
4604
|
+
}, className);
|
|
4605
|
+
return /*#__PURE__*/jsxRuntime.jsxs("a", _objectSpread2(_objectSpread2({
|
|
4606
|
+
href: href
|
|
4607
|
+
}, props), {}, {
|
|
4608
|
+
ref: ref,
|
|
4609
|
+
className: _JSXStyle.dynamic([["1962988967", [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + (props && props.className != null && props.className || classes || ""),
|
|
4610
|
+
children: [icon && icon, /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
4611
|
+
className: _JSXStyle.dynamic([["1962988967", [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + "link-extra",
|
|
4612
|
+
children: [children, arrow && /*#__PURE__*/jsxRuntime.jsx(LinkIcon, {})]
|
|
4949
4613
|
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
4950
|
-
id: "
|
|
4951
|
-
dynamic: [SCALES.width(1, '
|
|
4952
|
-
children: ".
|
|
4614
|
+
id: "1962988967",
|
|
4615
|
+
dynamic: [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor],
|
|
4616
|
+
children: ".link.__jsx-style-dynamic-selector,.link-extra.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:inherit;gap:5px;color:".concat(linkColor, ";-webkit-text-decoration:none;text-decoration:none;border-radius:").concat(block ? theme$1.layout.radius : 0, ";-webkit-transition:color 200ms ease 0ms;transition:color 200ms ease 0ms;font-size:").concat(SCALES.font(1, 'inherit'), ";width:").concat(SCALES.width(1, 'fit-content'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";}.block.__jsx-style-dynamic-selector{padding:").concat(SCALES.pt(0.125), " ").concat(SCALES.pr(0.25), " ").concat(SCALES.pb(0.125), " ").concat(SCALES.pl(0.25), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(-0.125), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(-0.125), ";}.link.__jsx-style-dynamic-selector:hover,.link.__jsx-style-dynamic-selector:active,.link.__jsx-style-dynamic-selector:focus{-webkit-text-decoration:").concat(decoration, ";text-decoration:").concat(decoration, ";}.link.__jsx-style-dynamic-selector:hover{background-color:").concat(block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', ";color:").concat(hoverColor, ";}")
|
|
4953
4617
|
})]
|
|
4954
|
-
});
|
|
4955
|
-
};
|
|
4956
|
-
|
|
4957
|
-
var
|
|
4618
|
+
}));
|
|
4619
|
+
});
|
|
4620
|
+
LinkComponent.displayName = 'Link';
|
|
4621
|
+
var Link = withScale(LinkComponent);
|
|
4622
|
+
|
|
4623
|
+
var _excluded$1c = ["href", "nextLink", "onClick", "children", "className"];
|
|
4624
|
+
var BreadcrumbsItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
4625
|
+
var href = _ref.href,
|
|
4626
|
+
_ref$nextLink = _ref.nextLink,
|
|
4627
|
+
nextLink = _ref$nextLink === void 0 ? false : _ref$nextLink,
|
|
4628
|
+
onClick = _ref.onClick,
|
|
4629
|
+
children = _ref.children,
|
|
4630
|
+
_ref$className = _ref.className,
|
|
4631
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
4632
|
+
props = _objectWithoutProperties(_ref, _excluded$1c);
|
|
4633
|
+
var isLink = React.useMemo(function () {
|
|
4634
|
+
return href !== undefined || nextLink;
|
|
4635
|
+
}, [href, nextLink]);
|
|
4636
|
+
var _pickChild = pickChild(children, BreadcrumbsSeparator),
|
|
4637
|
+
_pickChild2 = _slicedToArray(_pickChild, 1),
|
|
4638
|
+
withoutSepChildren = _pickChild2[0];
|
|
4639
|
+
var classes = theme.useClasses('breadcrumbs-item', className);
|
|
4640
|
+
var clickHandler = function clickHandler(event) {
|
|
4641
|
+
onClick && onClick(event);
|
|
4642
|
+
};
|
|
4643
|
+
if (!isLink) {
|
|
4644
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
4645
|
+
className: classes,
|
|
4646
|
+
onClick: clickHandler,
|
|
4647
|
+
children: withoutSepChildren
|
|
4648
|
+
});
|
|
4649
|
+
}
|
|
4650
|
+
return /*#__PURE__*/jsxRuntime.jsx(Link, _objectSpread2(_objectSpread2({
|
|
4651
|
+
className: classes,
|
|
4652
|
+
href: href,
|
|
4653
|
+
onClick: clickHandler,
|
|
4654
|
+
ref: ref
|
|
4655
|
+
}, props), {}, {
|
|
4656
|
+
children: withoutSepChildren
|
|
4657
|
+
}));
|
|
4658
|
+
});
|
|
4659
|
+
BreadcrumbsItem.displayName = 'BreadcrumbsItem';
|
|
4958
4660
|
|
|
4959
4661
|
/* "use client" */
|
|
4960
4662
|
|
|
4961
|
-
|
|
4663
|
+
Breadcrumbs.Item = BreadcrumbsItem;
|
|
4664
|
+
Breadcrumbs.Separator = BreadcrumbsSeparator;
|
|
4962
4665
|
|
|
4963
|
-
var
|
|
4964
|
-
var
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4666
|
+
var ButtonDrip = function ButtonDrip(_ref) {
|
|
4667
|
+
var _ref$x = _ref.x,
|
|
4668
|
+
x = _ref$x === void 0 ? 0 : _ref$x,
|
|
4669
|
+
_ref$y = _ref.y,
|
|
4670
|
+
y = _ref$y === void 0 ? 0 : _ref$y,
|
|
4671
|
+
color = _ref.color,
|
|
4672
|
+
onCompleted = _ref.onCompleted;
|
|
4673
|
+
var dripRef = React.useRef(null);
|
|
4674
|
+
/* istanbul ignore next */
|
|
4675
|
+
var top = Number.isNaN(+y) ? 0 : y - 10;
|
|
4676
|
+
/* istanbul ignore next */
|
|
4677
|
+
var left = Number.isNaN(+x) ? 0 : x - 10;
|
|
4678
|
+
React.useEffect(function () {
|
|
4679
|
+
/* istanbul ignore next */
|
|
4680
|
+
if (!dripRef.current) return;
|
|
4681
|
+
dripRef.current.addEventListener('animationend', onCompleted);
|
|
4682
|
+
return function () {
|
|
4683
|
+
/* istanbul ignore next */
|
|
4684
|
+
if (!dripRef.current) return;
|
|
4685
|
+
dripRef.current.removeEventListener('animationend', onCompleted);
|
|
4686
|
+
};
|
|
4687
|
+
});
|
|
4688
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4689
|
+
ref: dripRef,
|
|
4690
|
+
className: "jsx-3424889537" + " " + "drip",
|
|
4691
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
4692
|
+
width: "20",
|
|
4693
|
+
height: "20",
|
|
4694
|
+
viewBox: "0 0 20 20",
|
|
4695
|
+
style: {
|
|
4696
|
+
top: top,
|
|
4697
|
+
left: left
|
|
4698
|
+
},
|
|
4699
|
+
className: "jsx-3424889537",
|
|
4700
|
+
children: /*#__PURE__*/jsxRuntime.jsx("g", {
|
|
4701
|
+
stroke: "none",
|
|
4702
|
+
strokeWidth: "1",
|
|
4703
|
+
fill: "none",
|
|
4704
|
+
fillRule: "evenodd",
|
|
4705
|
+
className: "jsx-3424889537",
|
|
4706
|
+
children: /*#__PURE__*/jsxRuntime.jsx("g", {
|
|
4707
|
+
fill: color,
|
|
4708
|
+
className: "jsx-3424889537",
|
|
4709
|
+
children: /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
4710
|
+
width: "100%",
|
|
4711
|
+
height: "100%",
|
|
4712
|
+
rx: "10",
|
|
4713
|
+
className: "jsx-3424889537"
|
|
4714
|
+
})
|
|
4715
|
+
})
|
|
4716
|
+
})
|
|
4717
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
4718
|
+
id: "3424889537",
|
|
4719
|
+
children: ".drip.jsx-3424889537{position:absolute;left:0;right:0;top:0;bottom:0;}svg.jsx-3424889537{position:absolute;-webkit-animation:350ms ease-in expand-jsx-3424889537;animation:350ms ease-in expand-jsx-3424889537;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;width:1rem;height:1rem;}@-webkit-keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}@keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}"
|
|
4720
|
+
})]
|
|
4721
|
+
});
|
|
4973
4722
|
};
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4723
|
+
ButtonDrip.displayName = 'ButtonDrip';
|
|
4724
|
+
|
|
4725
|
+
var ButtonLoading = function ButtonLoading(_ref) {
|
|
4726
|
+
var color = _ref.color;
|
|
4727
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4728
|
+
className: "jsx-212623367" + " " + "btn-loading",
|
|
4729
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Loading, {
|
|
4730
|
+
color: color
|
|
4731
|
+
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
4732
|
+
id: "212623367",
|
|
4733
|
+
children: ".btn-loading.jsx-212623367{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;background-color:var(--helpdice-ui-button-bg);}"
|
|
4734
|
+
})]
|
|
4735
|
+
});
|
|
4736
|
+
};
|
|
4737
|
+
ButtonLoading.displayName = 'ButtonLoading';
|
|
4738
|
+
|
|
4739
|
+
var _excluded$1b = ["isRight", "isSingle", "children", "className"];
|
|
4740
|
+
var ButtonIcon = function ButtonIcon(_ref) {
|
|
4741
|
+
var _ref$isRight = _ref.isRight,
|
|
4742
|
+
isRight = _ref$isRight === void 0 ? false : _ref$isRight,
|
|
4743
|
+
isSingle = _ref.isSingle,
|
|
4744
|
+
children = _ref.children,
|
|
4977
4745
|
_ref$className = _ref.className,
|
|
4978
4746
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
var theme$1 = theme.useTheme();
|
|
4984
|
-
var _useScale = useScale(),
|
|
4985
|
-
SCALES = _useScale.SCALES;
|
|
4986
|
-
var bg = React.useMemo(function () {
|
|
4987
|
-
return getBgColor(color, theme$1.palette);
|
|
4988
|
-
}, [color, theme$1.palette]);
|
|
4989
|
-
var _color = React.useMemo(function () {
|
|
4990
|
-
if (!color || color === 'default') return theme$1.palette.background;
|
|
4991
|
-
return 'white';
|
|
4992
|
-
}, [color, theme$1.palette.background]);
|
|
4993
|
-
var classes = theme.useClasses('badge', {
|
|
4994
|
-
dot: dot
|
|
4747
|
+
props = _objectWithoutProperties(_ref, _excluded$1b);
|
|
4748
|
+
var classes = theme.useClasses('icon', {
|
|
4749
|
+
right: isRight,
|
|
4750
|
+
single: isSingle
|
|
4995
4751
|
}, className);
|
|
4996
4752
|
return /*#__PURE__*/jsxRuntime.jsxs("span", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
4997
|
-
className:
|
|
4998
|
-
children: [
|
|
4999
|
-
id: "
|
|
5000
|
-
|
|
5001
|
-
children: ".badge.__jsx-style-dynamic-selector{display:inline-block;border-radius:16px;font-variant:tabular-nums;line-height:1;vertical-align:middle;background-color:".concat(bg, ";color:").concat(_color, ";border:0;font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";padding:").concat(SCALES.pt(0.25), " ").concat(SCALES.pr(0.5375), " ").concat(SCALES.pb(0.30), " ").concat(SCALES.pl(0.5375), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.dot.__jsx-style-dynamic-selector{padding:").concat(SCALES.py(0.25), " ").concat(SCALES.px(0.25), ";border-radius:50%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}")
|
|
4753
|
+
className: "jsx-2467502931" + " " + (props && props.className != null && props.className || classes || ""),
|
|
4754
|
+
children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
4755
|
+
id: "2467502931",
|
|
4756
|
+
children: ".icon.jsx-2467502931{position:absolute;left:var(--helpdice-ui-button-icon-padding);right:auto;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--helpdice-ui-button-color);z-index:1;}.right.jsx-2467502931{right:var(--helpdice-ui-button-icon-padding);left:auto;}.icon.jsx-2467502931 svg{background:transparent;height:calc(var(--helpdice-ui-button-height) / 2.35);width:calc(var(--helpdice-ui-button-height) / 2.35);}.single.jsx-2467502931{position:static;-webkit-transform:none;-ms-transform:none;transform:none;}"
|
|
5002
4757
|
})]
|
|
5003
4758
|
}));
|
|
5004
4759
|
};
|
|
5005
|
-
|
|
5006
|
-
var Badge = withScale(BadgeComponent);
|
|
4760
|
+
ButtonIcon.displayName = 'ButtonIcon';
|
|
5007
4761
|
|
|
5008
|
-
|
|
5009
|
-
var
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
4762
|
+
var getButtonChildrenWithIcon = function getButtonChildrenWithIcon(auto, children, icons) {
|
|
4763
|
+
var icon = icons.icon,
|
|
4764
|
+
iconRight = icons.iconRight;
|
|
4765
|
+
var hasIcon = icon || iconRight;
|
|
4766
|
+
var isRight = Boolean(iconRight);
|
|
4767
|
+
var paddingForAutoMode = auto ? "calc(var(--helpdice-ui-button-height) / 2 + var(--helpdice-ui-button-icon-padding) * .5)" : 0;
|
|
4768
|
+
var classes = theme.useClasses('text', isRight ? 'right' : 'left');
|
|
4769
|
+
if (!hasIcon) return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4770
|
+
className: "text",
|
|
4771
|
+
children: children
|
|
4772
|
+
});
|
|
4773
|
+
if (React.Children.count(children) === 0) {
|
|
4774
|
+
return /*#__PURE__*/jsxRuntime.jsx(ButtonIcon, {
|
|
4775
|
+
isRight: isRight,
|
|
4776
|
+
isSingle: true,
|
|
4777
|
+
children: hasIcon
|
|
4778
|
+
});
|
|
4779
|
+
}
|
|
4780
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4781
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(ButtonIcon, {
|
|
4782
|
+
isRight: isRight,
|
|
4783
|
+
children: hasIcon
|
|
4784
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4785
|
+
className: _JSXStyle.dynamic([["3568181479", [paddingForAutoMode, paddingForAutoMode]]]) + " " + (classes || ""),
|
|
4786
|
+
children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
4787
|
+
id: "3568181479",
|
|
4788
|
+
dynamic: [paddingForAutoMode, paddingForAutoMode],
|
|
4789
|
+
children: ".left.__jsx-style-dynamic-selector{padding-left:".concat(paddingForAutoMode, ";}.right.__jsx-style-dynamic-selector{padding-right:").concat(paddingForAutoMode, ";}")
|
|
4790
|
+
})]
|
|
4791
|
+
})]
|
|
4792
|
+
});
|
|
4793
|
+
};
|
|
4794
|
+
var filterPropsWithGroup = function filterPropsWithGroup(props, config) {
|
|
4795
|
+
if (!config.isButtonGroup) return props;
|
|
4796
|
+
return _objectSpread2(_objectSpread2({}, props), {}, {
|
|
4797
|
+
auto: true,
|
|
4798
|
+
shadow: false,
|
|
4799
|
+
ghost: config.ghost || props.ghost,
|
|
4800
|
+
type: config.type || props.type,
|
|
4801
|
+
disabled: config.disabled || props.disabled
|
|
4802
|
+
});
|
|
4803
|
+
};
|
|
4804
|
+
|
|
4805
|
+
/* "use client" */
|
|
4806
|
+
|
|
4807
|
+
var defaultContext$c = {
|
|
4808
|
+
isButtonGroup: false,
|
|
4809
|
+
disabled: false
|
|
4810
|
+
};
|
|
4811
|
+
var ButtonGroupContext = /*#__PURE__*/React.createContext(defaultContext$c);
|
|
4812
|
+
var useButtonGroupContext = function useButtonGroupContext() {
|
|
4813
|
+
return React.useContext(ButtonGroupContext);
|
|
4814
|
+
};
|
|
4815
|
+
|
|
4816
|
+
var getButtonGhostColors = function getButtonGhostColors(palette, _color) {
|
|
4817
|
+
var colors = {
|
|
4818
|
+
secondary: {
|
|
4819
|
+
bg: palette.background,
|
|
4820
|
+
border: palette.foreground,
|
|
4821
|
+
color: palette.foreground,
|
|
4822
|
+
ripple: ''
|
|
4823
|
+
},
|
|
4824
|
+
success: {
|
|
4825
|
+
bg: palette.background,
|
|
4826
|
+
border: palette.success,
|
|
4827
|
+
color: palette.success,
|
|
4828
|
+
ripple: ''
|
|
4829
|
+
},
|
|
4830
|
+
warning: {
|
|
4831
|
+
bg: palette.background,
|
|
4832
|
+
border: palette.warning,
|
|
4833
|
+
color: palette.warning,
|
|
4834
|
+
ripple: ''
|
|
4835
|
+
},
|
|
4836
|
+
error: {
|
|
4837
|
+
bg: palette.background,
|
|
4838
|
+
border: palette.error,
|
|
4839
|
+
color: palette.error,
|
|
4840
|
+
ripple: ''
|
|
4841
|
+
}
|
|
4842
|
+
};
|
|
4843
|
+
return colors[_color] || null;
|
|
4844
|
+
};
|
|
4845
|
+
var getButtonColors = function getButtonColors(palette, props) {
|
|
4846
|
+
var color = props.color,
|
|
4847
|
+
disabled = props.disabled,
|
|
4848
|
+
ghost = props.ghost;
|
|
4849
|
+
var colors = {
|
|
4850
|
+
"default": {
|
|
4851
|
+
bg: palette.background,
|
|
4852
|
+
border: palette.border,
|
|
4853
|
+
color: palette.accents_5,
|
|
4854
|
+
ripple: palette.accents_1
|
|
4855
|
+
},
|
|
4856
|
+
secondary: {
|
|
4857
|
+
bg: palette.foreground,
|
|
4858
|
+
border: palette.foreground,
|
|
4859
|
+
color: palette.background,
|
|
4860
|
+
ripple: palette.accents_1
|
|
4861
|
+
},
|
|
4862
|
+
success: {
|
|
4863
|
+
bg: palette.success,
|
|
4864
|
+
border: palette.success,
|
|
4865
|
+
color: '#fff',
|
|
4866
|
+
ripple: '#1f93ffff'
|
|
4867
|
+
},
|
|
4868
|
+
warning: {
|
|
4869
|
+
bg: palette.warning,
|
|
4870
|
+
border: palette.warning,
|
|
4871
|
+
color: '#fff',
|
|
4872
|
+
ripple: '#ffca29ff'
|
|
4873
|
+
},
|
|
4874
|
+
error: {
|
|
4875
|
+
bg: palette.error,
|
|
4876
|
+
border: palette.error,
|
|
4877
|
+
color: '#fff',
|
|
4878
|
+
ripple: '#ff5a55ff'
|
|
4879
|
+
},
|
|
4880
|
+
abort: {
|
|
4881
|
+
bg: 'transparent',
|
|
4882
|
+
border: 'transparent',
|
|
4883
|
+
color: palette.accents_5,
|
|
4884
|
+
ripple: palette.accents_1
|
|
4885
|
+
}
|
|
4886
|
+
};
|
|
4887
|
+
if (disabled) return {
|
|
4888
|
+
bg: palette.accents_1,
|
|
4889
|
+
border: palette.accents_2,
|
|
4890
|
+
color: '#ccc',
|
|
4891
|
+
ripple: ''
|
|
4892
|
+
};
|
|
4893
|
+
|
|
4894
|
+
/**
|
|
4895
|
+
* The '-light' type is the same color as the common type,
|
|
4896
|
+
* only hover's color is different.
|
|
4897
|
+
* e.g.
|
|
4898
|
+
* Color['success'] === Color['success-light']
|
|
4899
|
+
* Color['warning'] === Color['warning-light']
|
|
4900
|
+
*/
|
|
4901
|
+
var withoutLightType = color === null || color === void 0 ? void 0 : color.replace('-light', '');
|
|
4902
|
+
var defaultColor = colors["default"];
|
|
4903
|
+
if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
|
|
4904
|
+
return colors[withoutLightType] || defaultColor;
|
|
4905
|
+
};
|
|
4906
|
+
var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, _color) {
|
|
4907
|
+
var colors = {
|
|
4908
|
+
secondary: {
|
|
4909
|
+
bg: palette.foreground,
|
|
4910
|
+
border: palette.background,
|
|
4911
|
+
color: palette.background
|
|
4912
|
+
},
|
|
4913
|
+
success: {
|
|
4914
|
+
bg: palette.success,
|
|
4915
|
+
border: palette.background,
|
|
4916
|
+
color: 'white'
|
|
4917
|
+
},
|
|
4918
|
+
warning: {
|
|
4919
|
+
bg: palette.warning,
|
|
4920
|
+
border: palette.background,
|
|
4921
|
+
color: 'white'
|
|
4922
|
+
},
|
|
4923
|
+
error: {
|
|
4924
|
+
bg: palette.error,
|
|
4925
|
+
border: palette.background,
|
|
4926
|
+
color: 'white'
|
|
4927
|
+
}
|
|
4928
|
+
};
|
|
4929
|
+
var withoutLightType = _color === null || _color === void 0 ? void 0 : _color.replace('-light', '');
|
|
4930
|
+
return colors[withoutLightType] || null;
|
|
4931
|
+
};
|
|
4932
|
+
var getButtonHoverColors = function getButtonHoverColors(palette, props) {
|
|
4933
|
+
var color = props.color,
|
|
4934
|
+
disabled = props.disabled,
|
|
4935
|
+
loading = props.loading,
|
|
4936
|
+
shadow = props.shadow,
|
|
4937
|
+
ghost = props.ghost;
|
|
4938
|
+
var defaultColor = getButtonColors(palette, props);
|
|
4939
|
+
var alphaBackground = addColorAlpha(defaultColor.bg, 0.85);
|
|
4940
|
+
var colors = {
|
|
4941
|
+
"default": {
|
|
4942
|
+
bg: palette.background,
|
|
4943
|
+
border: palette.foreground
|
|
5016
4944
|
},
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
value: 'translate(50%, -50%)',
|
|
5021
|
-
origin: '100% 0%'
|
|
4945
|
+
secondary: {
|
|
4946
|
+
bg: palette.background,
|
|
4947
|
+
border: palette.foreground
|
|
5022
4948
|
},
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
value: 'translate(-50%, 50%)',
|
|
5027
|
-
origin: '0% 100%'
|
|
4949
|
+
success: {
|
|
4950
|
+
bg: palette.background,
|
|
4951
|
+
border: palette.success
|
|
5028
4952
|
},
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
4953
|
+
warning: {
|
|
4954
|
+
bg: palette.background,
|
|
4955
|
+
border: palette.warning
|
|
4956
|
+
},
|
|
4957
|
+
error: {
|
|
4958
|
+
bg: palette.background,
|
|
4959
|
+
border: palette.error
|
|
4960
|
+
},
|
|
4961
|
+
abort: {
|
|
4962
|
+
bg: 'transparent',
|
|
4963
|
+
border: 'transparent',
|
|
4964
|
+
color: palette.accents_5
|
|
4965
|
+
},
|
|
4966
|
+
'secondary-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
4967
|
+
bg: alphaBackground
|
|
4968
|
+
}),
|
|
4969
|
+
'success-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
4970
|
+
bg: alphaBackground
|
|
4971
|
+
}),
|
|
4972
|
+
'warning-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
4973
|
+
bg: alphaBackground
|
|
4974
|
+
}),
|
|
4975
|
+
'error-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
4976
|
+
bg: alphaBackground
|
|
4977
|
+
})
|
|
5035
4978
|
};
|
|
5036
|
-
return
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
_pickChild2 = _slicedToArray(_pickChild, 2),
|
|
5044
|
-
withoutBadgeChildren = _pickChild2[0],
|
|
5045
|
-
badgeChldren = _pickChild2[1];
|
|
5046
|
-
var _useMemo = React.useMemo(function () {
|
|
5047
|
-
return getTransform(placement);
|
|
5048
|
-
}, [placement]),
|
|
5049
|
-
top = _useMemo.top,
|
|
5050
|
-
bottom = _useMemo.bottom,
|
|
5051
|
-
left = _useMemo.left,
|
|
5052
|
-
right = _useMemo.right,
|
|
5053
|
-
value = _useMemo.value,
|
|
5054
|
-
origin = _useMemo.origin;
|
|
5055
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5056
|
-
className: _JSXStyle.dynamic([["1121745930", [top || 'auto', left || 'auto', right || 'auto', bottom || 'auto', value, origin]]]) + " " + "anchor",
|
|
5057
|
-
children: [withoutBadgeChildren, /*#__PURE__*/jsxRuntime.jsx("sup", {
|
|
5058
|
-
className: _JSXStyle.dynamic([["1121745930", [top || 'auto', left || 'auto', right || 'auto', bottom || 'auto', value, origin]]]),
|
|
5059
|
-
children: badgeChldren
|
|
5060
|
-
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
5061
|
-
id: "1121745930",
|
|
5062
|
-
dynamic: [top || 'auto', left || 'auto', right || 'auto', bottom || 'auto', value, origin],
|
|
5063
|
-
children: ".anchor.__jsx-style-dynamic-selector{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;box-sizing:border-box;}sup.__jsx-style-dynamic-selector{position:absolute;top:".concat(top || 'auto', ";left:").concat(left || 'auto', ";right:").concat(right || 'auto', ";bottom:").concat(bottom || 'auto', ";-webkit-transform:").concat(value, ";-ms-transform:").concat(value, ";transform:").concat(value, ";-webkit-transform-origin:").concat(origin, ";-ms-transform-origin:").concat(origin, ";transform-origin:").concat(origin, ";z-index:1;}")
|
|
5064
|
-
})]
|
|
4979
|
+
if (disabled) return {
|
|
4980
|
+
bg: palette.accents_1,
|
|
4981
|
+
border: palette.accents_2,
|
|
4982
|
+
color: '#ccc'
|
|
4983
|
+
};
|
|
4984
|
+
if (loading) return _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
4985
|
+
color: 'transparent'
|
|
5065
4986
|
});
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
Badge.Anchor = BadgeAnchor;
|
|
5072
|
-
|
|
5073
|
-
var Separator = function Separator(_ref) {
|
|
5074
|
-
var children = _ref.children,
|
|
5075
|
-
_ref$className = _ref.className,
|
|
5076
|
-
className = _ref$className === void 0 ? '' : _ref$className;
|
|
5077
|
-
var _useScale = useScale(),
|
|
5078
|
-
SCALES = _useScale.SCALES;
|
|
5079
|
-
var classes = theme.useClasses('separator', className);
|
|
5080
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5081
|
-
className: _JSXStyle.dynamic([["1571781185", [SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0.5), SCALES.mb(0), SCALES.ml(0.5)]]]) + " " + (classes || ""),
|
|
5082
|
-
children: [children, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
5083
|
-
id: "1571781185",
|
|
5084
|
-
dynamic: [SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0.5), SCALES.mb(0), SCALES.ml(0.5)],
|
|
5085
|
-
children: ".separator.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:".concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0.5), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0.5), ";}")
|
|
5086
|
-
})]
|
|
4987
|
+
if (shadow) return defaultColor;
|
|
4988
|
+
var hoverColor = (ghost ? getButtonGhostHoverColors(palette, color) : colors[color]) || colors["default"];
|
|
4989
|
+
return _objectSpread2(_objectSpread2({}, hoverColor), {}, {
|
|
4990
|
+
color: hoverColor.color || hoverColor.border
|
|
5087
4991
|
});
|
|
5088
4992
|
};
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
return addColorAlpha(theme$1.palette.link, 0.85);
|
|
5103
|
-
}, [theme$1.palette.link]);
|
|
5104
|
-
var childrenArray = React.Children.toArray(children);
|
|
5105
|
-
var withSeparatorChildren = childrenArray.map(function (item, index) {
|
|
5106
|
-
if (! /*#__PURE__*/React.isValidElement(item)) return item;
|
|
5107
|
-
var last = childrenArray[index - 1];
|
|
5108
|
-
var lastIsSeparator = /*#__PURE__*/React.isValidElement(last) && last.type === BreadcrumbsSeparator;
|
|
5109
|
-
var currentIsSeparator = item.type === BreadcrumbsSeparator;
|
|
5110
|
-
if (!lastIsSeparator && !currentIsSeparator && index > 0) {
|
|
5111
|
-
return /*#__PURE__*/jsxRuntime.jsxs(React.Fragment, {
|
|
5112
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(BreadcrumbsSeparator, {
|
|
5113
|
-
children: separator
|
|
5114
|
-
}), item]
|
|
5115
|
-
}, index);
|
|
5116
|
-
}
|
|
5117
|
-
return item;
|
|
5118
|
-
});
|
|
5119
|
-
return /*#__PURE__*/jsxRuntime.jsxs("nav", {
|
|
5120
|
-
className: _JSXStyle.dynamic([["524763277", [theme$1.palette.accents_4, SCALES.font(1), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverColor, theme$1.palette.accents_6]]]) + " " + (className || ""),
|
|
5121
|
-
children: [withSeparatorChildren, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
5122
|
-
id: "524763277",
|
|
5123
|
-
dynamic: [theme$1.palette.accents_4, SCALES.font(1), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverColor, theme$1.palette.accents_6],
|
|
5124
|
-
children: "nav.__jsx-style-dynamic-selector{line-height:inherit;color:".concat(theme$1.palette.accents_4, ";box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:").concat(SCALES.font(1), ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}nav.__jsx-style-dynamic-selector .link:hover{color:").concat(hoverColor, ";}nav.__jsx-style-dynamic-selector>span:last-of-type{color:").concat(theme$1.palette.accents_6, ";}nav.__jsx-style-dynamic-selector>.separator:last-child{display:none;}nav.__jsx-style-dynamic-selector svg{width:1em;height:1em;margin:0 4px;}nav.__jsx-style-dynamic-selector .breadcrumbs-item{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}")
|
|
5125
|
-
})]
|
|
5126
|
-
});
|
|
4993
|
+
var getButtonCursor = function getButtonCursor(disabled, loading) {
|
|
4994
|
+
if (disabled) return {
|
|
4995
|
+
cursor: 'not-allowed',
|
|
4996
|
+
events: 'auto'
|
|
4997
|
+
};
|
|
4998
|
+
if (loading) return {
|
|
4999
|
+
cursor: 'default',
|
|
5000
|
+
events: 'none'
|
|
5001
|
+
};
|
|
5002
|
+
return {
|
|
5003
|
+
cursor: 'pointer',
|
|
5004
|
+
events: 'auto'
|
|
5005
|
+
};
|
|
5127
5006
|
};
|
|
5128
|
-
|
|
5129
|
-
var
|
|
5130
|
-
|
|
5131
|
-
var
|
|
5132
|
-
return
|
|
5133
|
-
viewBox: "0 0 24 24",
|
|
5134
|
-
width: "0.9375em",
|
|
5135
|
-
height: "0.9375em",
|
|
5136
|
-
stroke: "currentColor",
|
|
5137
|
-
strokeWidth: "1.5",
|
|
5138
|
-
strokeLinecap: "round",
|
|
5139
|
-
strokeLinejoin: "round",
|
|
5140
|
-
fill: "none",
|
|
5141
|
-
shapeRendering: "geometricPrecision",
|
|
5142
|
-
className: "jsx-3409194595" + " " + "icon",
|
|
5143
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
5144
|
-
d: "M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6",
|
|
5145
|
-
className: "jsx-3409194595"
|
|
5146
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
5147
|
-
d: "M15 3h6v6",
|
|
5148
|
-
className: "jsx-3409194595"
|
|
5149
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
5150
|
-
d: "M10 14L21 3",
|
|
5151
|
-
className: "jsx-3409194595"
|
|
5152
|
-
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
5153
|
-
id: "3409194595",
|
|
5154
|
-
children: ".icon.jsx-3409194595{margin:0 0 -1px 0.1875em;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;color:currentColor;}"
|
|
5155
|
-
})]
|
|
5156
|
-
});
|
|
5007
|
+
var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
5008
|
+
var type = props.type;
|
|
5009
|
+
var isLightHover = type ? type.endsWith('light') : false;
|
|
5010
|
+
var hoverColors = getButtonHoverColors(palette, props);
|
|
5011
|
+
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
5157
5012
|
};
|
|
5158
|
-
LinkIconComponent.displayName = 'LinkIcon';
|
|
5159
|
-
var LinkIcon = /*#__PURE__*/React.memo(LinkIconComponent);
|
|
5160
5013
|
|
|
5161
|
-
var _excluded$
|
|
5162
|
-
var
|
|
5163
|
-
var _ref$href = _ref.href,
|
|
5164
|
-
href = _ref$href === void 0 ? '' : _ref$href,
|
|
5165
|
-
_ref$showColor = _ref.showColor,
|
|
5166
|
-
showColor = _ref$showColor === void 0 ? false : _ref$showColor,
|
|
5167
|
-
_ref$underline = _ref.underline,
|
|
5168
|
-
underline = _ref$underline === void 0 ? false : _ref$underline,
|
|
5169
|
-
children = _ref.children,
|
|
5170
|
-
_ref$className = _ref.className,
|
|
5171
|
-
className = _ref$className === void 0 ? '' : _ref$className,
|
|
5172
|
-
_ref$block = _ref.block,
|
|
5173
|
-
block = _ref$block === void 0 ? false : _ref$block,
|
|
5174
|
-
_ref$arrow = _ref.arrow,
|
|
5175
|
-
arrow = _ref$arrow === void 0 ? false : _ref$arrow,
|
|
5176
|
-
icon = _ref.icon,
|
|
5177
|
-
props = _objectWithoutProperties(_ref, _excluded$1b);
|
|
5014
|
+
var _excluded$1a = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "relative", "replace", "a", "to", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
5015
|
+
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
5178
5016
|
var theme$1 = theme.useTheme();
|
|
5017
|
+
// const navigate = useNavigate();
|
|
5179
5018
|
var _useScale = useScale(),
|
|
5180
5019
|
SCALES = _useScale.SCALES;
|
|
5181
|
-
var
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
block: block
|
|
5186
|
-
}, className);
|
|
5187
|
-
return /*#__PURE__*/jsxRuntime.jsxs("a", _objectSpread2(_objectSpread2({
|
|
5188
|
-
href: href
|
|
5189
|
-
}, props), {}, {
|
|
5190
|
-
ref: ref,
|
|
5191
|
-
className: _JSXStyle.dynamic([["1962988967", [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + (props && props.className != null && props.className || classes || ""),
|
|
5192
|
-
children: [icon && icon, /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
5193
|
-
className: _JSXStyle.dynamic([["1962988967", [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + "link-extra",
|
|
5194
|
-
children: [children, arrow && /*#__PURE__*/jsxRuntime.jsx(LinkIcon, {})]
|
|
5195
|
-
}), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
5196
|
-
id: "1962988967",
|
|
5197
|
-
dynamic: [linkColor, block ? theme$1.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', hoverColor],
|
|
5198
|
-
children: ".link.__jsx-style-dynamic-selector,.link-extra.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:inherit;gap:5px;color:".concat(linkColor, ";-webkit-text-decoration:none;text-decoration:none;border-radius:").concat(block ? theme$1.layout.radius : 0, ";-webkit-transition:color 200ms ease 0ms;transition:color 200ms ease 0ms;font-size:").concat(SCALES.font(1, 'inherit'), ";width:").concat(SCALES.width(1, 'fit-content'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";}.block.__jsx-style-dynamic-selector{padding:").concat(SCALES.pt(0.125), " ").concat(SCALES.pr(0.25), " ").concat(SCALES.pb(0.125), " ").concat(SCALES.pl(0.25), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(-0.125), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(-0.125), ";}.link.__jsx-style-dynamic-selector:hover,.link.__jsx-style-dynamic-selector:active,.link.__jsx-style-dynamic-selector:focus{-webkit-text-decoration:").concat(decoration, ";text-decoration:").concat(decoration, ";}.link.__jsx-style-dynamic-selector:hover{background-color:").concat(block ? addColorAlpha(theme$1.palette.link, 0.1) : 'unset', ";color:").concat(hoverColor, ";}")
|
|
5199
|
-
})]
|
|
5200
|
-
}));
|
|
5201
|
-
});
|
|
5202
|
-
LinkComponent.displayName = 'Link';
|
|
5203
|
-
var Link = withScale(LinkComponent);
|
|
5020
|
+
var buttonRef = React.useRef(null);
|
|
5021
|
+
React.useImperativeHandle(ref, function () {
|
|
5022
|
+
return buttonRef.current;
|
|
5023
|
+
}); // Changed with !
|
|
5204
5024
|
|
|
5205
|
-
var
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
var
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5025
|
+
var _useState = React.useState(false),
|
|
5026
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
5027
|
+
dripShow = _useState2[0],
|
|
5028
|
+
setDripShow = _useState2[1];
|
|
5029
|
+
var _useState3 = React.useState(0),
|
|
5030
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
5031
|
+
dripX = _useState4[0],
|
|
5032
|
+
setDripX = _useState4[1];
|
|
5033
|
+
var _useState5 = React.useState(0),
|
|
5034
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
5035
|
+
dripY = _useState6[0],
|
|
5036
|
+
setDripY = _useState6[1];
|
|
5037
|
+
var groupConfig = useButtonGroupContext();
|
|
5038
|
+
var filteredProps = filterPropsWithGroup(btnProps, groupConfig);
|
|
5039
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5040
|
+
var children = filteredProps.children,
|
|
5041
|
+
_filteredProps$disabl = filteredProps.disabled,
|
|
5042
|
+
disabled = _filteredProps$disabl === void 0 ? false : _filteredProps$disabl;
|
|
5043
|
+
filteredProps.color;
|
|
5044
|
+
var _filteredProps$loadin = filteredProps.loading,
|
|
5045
|
+
loading = _filteredProps$loadin === void 0 ? false : _filteredProps$loadin,
|
|
5046
|
+
_filteredProps$shadow = filteredProps.shadow,
|
|
5047
|
+
shadow = _filteredProps$shadow === void 0 ? false : _filteredProps$shadow,
|
|
5048
|
+
_filteredProps$ghost = filteredProps.ghost,
|
|
5049
|
+
ghost = _filteredProps$ghost === void 0 ? false : _filteredProps$ghost,
|
|
5050
|
+
_filteredProps$effect = filteredProps.effect,
|
|
5051
|
+
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
5052
|
+
_filteredProps$round = filteredProps.round,
|
|
5053
|
+
round = _filteredProps$round === void 0 ? false : _filteredProps$round;
|
|
5054
|
+
filteredProps.relative;
|
|
5055
|
+
filteredProps.replace;
|
|
5056
|
+
filteredProps.a;
|
|
5057
|
+
var to = filteredProps.to,
|
|
5058
|
+
onClick = filteredProps.onClick,
|
|
5059
|
+
_filteredProps$auto = filteredProps.auto,
|
|
5060
|
+
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
5061
|
+
icon = filteredProps.icon,
|
|
5062
|
+
_filteredProps$type = filteredProps.type,
|
|
5063
|
+
type = _filteredProps$type === void 0 ? 'button' : _filteredProps$type,
|
|
5064
|
+
iconRight = filteredProps.iconRight,
|
|
5065
|
+
_filteredProps$classN = filteredProps.className,
|
|
5066
|
+
className = _filteredProps$classN === void 0 ? '' : _filteredProps$classN;
|
|
5067
|
+
filteredProps.crossOrigin;
|
|
5068
|
+
var props = _objectWithoutProperties(filteredProps, _excluded$1a);
|
|
5069
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
5070
|
+
|
|
5071
|
+
var _useMemo = React.useMemo(function () {
|
|
5072
|
+
return getButtonColors(theme$1.palette, filteredProps);
|
|
5073
|
+
}, [theme$1.palette, filteredProps]),
|
|
5074
|
+
bg = _useMemo.bg,
|
|
5075
|
+
border = _useMemo.border,
|
|
5076
|
+
color = _useMemo.color,
|
|
5077
|
+
rippleColor = _useMemo.ripple;
|
|
5078
|
+
var hover = React.useMemo(function () {
|
|
5079
|
+
return getButtonHoverColors(theme$1.palette, filteredProps);
|
|
5080
|
+
}, [theme$1.palette, filteredProps]);
|
|
5081
|
+
var _useMemo2 = React.useMemo(function () {
|
|
5082
|
+
return getButtonCursor(disabled, loading);
|
|
5083
|
+
}, [disabled, loading]),
|
|
5084
|
+
cursor = _useMemo2.cursor,
|
|
5085
|
+
events = _useMemo2.events;
|
|
5086
|
+
var dripColor = React.useMemo(function () {
|
|
5087
|
+
return getButtonDripColor(theme$1.palette, filteredProps);
|
|
5088
|
+
}, [theme$1.palette, filteredProps]);
|
|
5089
|
+
|
|
5090
|
+
/* istanbul ignore next */
|
|
5091
|
+
var dripCompletedHandle = function dripCompletedHandle() {
|
|
5092
|
+
setDripShow(false);
|
|
5093
|
+
setDripX(0);
|
|
5094
|
+
setDripY(0);
|
|
5095
|
+
};
|
|
5096
|
+
var createRipple = function createRipple(event) {
|
|
5097
|
+
var button = buttonRef.current;
|
|
5098
|
+
if (!button) return;
|
|
5099
|
+
var rect = button.getBoundingClientRect();
|
|
5100
|
+
var size = Math.max(rect.width, rect.height);
|
|
5101
|
+
var x = event.clientX - rect.left - size / 2;
|
|
5102
|
+
var y = event.clientY - rect.top - size / 2;
|
|
5103
|
+
var rippleCount = 1; // number of rings
|
|
5104
|
+
var rippleDelay = 500; // ms between each ripple
|
|
5105
|
+
var _loop = function _loop() {
|
|
5106
|
+
var ripple = document.createElement('span');
|
|
5107
|
+
Object.assign(ripple.style, {
|
|
5108
|
+
position: 'absolute',
|
|
5109
|
+
borderRadius: '50%',
|
|
5110
|
+
backgroundColor: rippleColor,
|
|
5111
|
+
width: "".concat(size, "px"),
|
|
5112
|
+
height: "".concat(size, "px"),
|
|
5113
|
+
left: "".concat(x, "px"),
|
|
5114
|
+
top: "".concat(y, "px"),
|
|
5115
|
+
pointerEvents: 'none',
|
|
5116
|
+
transform: 'scale(0)',
|
|
5117
|
+
opacity: '1',
|
|
5118
|
+
transition: "transform 600ms ease-out ".concat(i * rippleDelay, "ms, opacity 600ms ease-out ").concat(i * rippleDelay, "ms"),
|
|
5119
|
+
zIndex: 1
|
|
5120
|
+
});
|
|
5121
|
+
button.appendChild(ripple);
|
|
5122
|
+
|
|
5123
|
+
// Force reflow to start transition
|
|
5124
|
+
window.getComputedStyle(ripple).opacity;
|
|
5125
|
+
ripple.style.transform = 'scale(2.5)';
|
|
5126
|
+
ripple.style.opacity = '0';
|
|
5127
|
+
ripple.addEventListener('transitionend', function () {
|
|
5128
|
+
ripple.remove();
|
|
5129
|
+
});
|
|
5130
|
+
};
|
|
5131
|
+
for (var i = 0; i < rippleCount; i++) {
|
|
5132
|
+
_loop();
|
|
5133
|
+
}
|
|
5134
|
+
};
|
|
5222
5135
|
var clickHandler = function clickHandler(event) {
|
|
5136
|
+
if (disabled || loading) return;
|
|
5137
|
+
var showDrip = !shadow && !ghost && effect;
|
|
5138
|
+
/* istanbul ignore next */
|
|
5139
|
+
if (showDrip && buttonRef.current) {
|
|
5140
|
+
var rect = buttonRef.current.getBoundingClientRect();
|
|
5141
|
+
setDripShow(true);
|
|
5142
|
+
setDripX(event.clientX - rect.left);
|
|
5143
|
+
setDripY(event.clientY - rect.top);
|
|
5144
|
+
}
|
|
5145
|
+
if (shadow) {
|
|
5146
|
+
createRipple(event);
|
|
5147
|
+
}
|
|
5223
5148
|
onClick && onClick(event);
|
|
5224
5149
|
};
|
|
5225
|
-
|
|
5226
|
-
return
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
children: withoutSepChildren
|
|
5150
|
+
var childrenWithIcon = React.useMemo(function () {
|
|
5151
|
+
return getButtonChildrenWithIcon(auto, children, {
|
|
5152
|
+
icon: icon,
|
|
5153
|
+
iconRight: iconRight
|
|
5230
5154
|
});
|
|
5231
|
-
}
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5155
|
+
}, [auto, children, icon, iconRight]);
|
|
5156
|
+
var paddingLeft = auto ? SCALES.pl(1.15) : SCALES.pl(1.375),
|
|
5157
|
+
paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
|
|
5158
|
+
|
|
5159
|
+
// If shadow provided is string then value other default
|
|
5160
|
+
var btnShadow = typeof shadow === 'string' ? shadow : shadow ? theme$1.shadows.level.z2 : 'none';
|
|
5161
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5162
|
+
children: [to ? /*#__PURE__*/jsxRuntime.jsxs("a", _objectSpread2(_objectSpread2({
|
|
5163
|
+
href: to
|
|
5164
|
+
}, props), {}, {
|
|
5165
|
+
className: _JSXStyle.dynamic([["612376042", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor !== null && cursor !== void 0 ? cursor : 'pointer', events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn', 'btn-link', className) || ""),
|
|
5166
|
+
children: [loading && /*#__PURE__*/jsxRuntime.jsx(ButtonLoading, {
|
|
5167
|
+
color: color
|
|
5168
|
+
}), childrenWithIcon]
|
|
5169
|
+
})) : /*#__PURE__*/jsxRuntime.jsxs("button", _objectSpread2(_objectSpread2({
|
|
5170
|
+
ref: buttonRef,
|
|
5171
|
+
type: type,
|
|
5172
|
+
disabled: disabled,
|
|
5173
|
+
onClick: clickHandler
|
|
5174
|
+
}, props), {}, {
|
|
5175
|
+
className: _JSXStyle.dynamic([["612376042", [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor !== null && cursor !== void 0 ? cursor : 'pointer', events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || theme.useClasses('btn', className) || ""),
|
|
5176
|
+
children: [loading && /*#__PURE__*/jsxRuntime.jsx(ButtonLoading, {
|
|
5177
|
+
color: color
|
|
5178
|
+
}), childrenWithIcon, dripShow && /*#__PURE__*/jsxRuntime.jsx(ButtonDrip, {
|
|
5179
|
+
x: dripX,
|
|
5180
|
+
y: dripY,
|
|
5181
|
+
color: dripColor,
|
|
5182
|
+
onCompleted: dripCompletedHandle
|
|
5183
|
+
})]
|
|
5184
|
+
})), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
|
|
5185
|
+
id: "612376042",
|
|
5186
|
+
dynamic: [SCALES.height(2.5), round ? '50%' : theme$1.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor !== null && cursor !== void 0 ? cursor : 'pointer', events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px'],
|
|
5187
|
+
children: ".btn.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;line-height:".concat(SCALES.height(2.5), ";border-radius:").concat(round ? '50%' : theme$1.layout.radius, ";font-weight:400;font-size:").concat(SCALES.font(0.875), ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;text-transform:capitalize;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;white-space:nowrap;-webkit-transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;position:relative;overflow:hidden;color:").concat(color, ";background-color:").concat(bg, ";border:1px solid ").concat(shadow ? 'transparent' : border, ";cursor:").concat(cursor !== null && cursor !== void 0 ? cursor : 'pointer', ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? btnShadow : 'none', ";--helpdice-ui-button-icon-padding:").concat(SCALES.pl(0.727), ";--helpdice-ui-button-height:").concat(SCALES.height(2.5), ";--helpdice-ui-button-color:").concat(color, ";--helpdice-ui-button-bg:").concat(bg, ";min-width:").concat(auto ? 'min-content' : SCALES.width(10.5), ";width:").concat(auto ? 'auto' : 'initial', ";height:").concat(SCALES.height(2.5), ";padding:").concat(SCALES.pt(0), " ").concat(paddingRight, " ").concat(SCALES.pb(0), " ").concat(paddingLeft, ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.btn.__jsx-style-dynamic-selector:hover,.btn.__jsx-style-dynamic-selector:focus{color:").concat(hover.color, ";--helpdice-ui-button-color:").concat(hover.color, ";background-color:").concat(hover.bg, ";border-color:").concat(hover.border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(btnShadow, ";}.btn-link.__jsx-style-dynamic-selector{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.btn.__jsx-style-dynamic-selector .text{position:relative;z-index:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;line-height:inherit;top:-1px;}.btn.__jsx-style-dynamic-selector .text p,.btn.__jsx-style-dynamic-selector .text pre,.btn.__jsx-style-dynamic-selector .text div{margin:0;}.ripple.__jsx-style-dynamic-selector{position:absolute;border-radius:50%;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-animation:ripple-animation-__jsx-style-dynamic-selector 600ms ease-out;animation:ripple-animation-__jsx-style-dynamic-selector 600ms ease-out;background-color:rgba(0,0,0,0.3);pointer-events:none;z-index:1;}@-webkit-keyframes ripple-animation-__jsx-style-dynamic-selector{to{-webkit-transform:scale(2.5);-ms-transform:scale(2.5);transform:scale(2.5);opacity:0;}}@keyframes ripple-animation-__jsx-style-dynamic-selector{to{-webkit-transform:scale(2.5);-ms-transform:scale(2.5);transform:scale(2.5);opacity:0;}}")
|
|
5188
|
+
})]
|
|
5189
|
+
});
|
|
5190
|
+
});
|
|
5191
|
+
ButtonComponent.displayName = 'Button';
|
|
5192
|
+
var Button = withScale(ButtonComponent);
|
|
5193
|
+
|
|
5194
|
+
var CompactButton = function CompactButton(props) {
|
|
5195
|
+
// const theme = useTheme();
|
|
5196
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread2(_objectSpread2({
|
|
5197
|
+
scale: 2 / 3,
|
|
5198
|
+
px: 0.6
|
|
5199
|
+
}, _objectSpread2({
|
|
5200
|
+
auto: true
|
|
5201
|
+
}, props)), {}, {
|
|
5202
|
+
children: props.children
|
|
5203
|
+
}));
|
|
5204
|
+
};
|
|
5205
|
+
var IconButton = /*#__PURE__*/React.memo(CompactButton);
|
|
5206
|
+
|
|
5207
|
+
var SmallButton = function SmallButton(props) {
|
|
5208
|
+
// const theme = useTheme();
|
|
5209
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread2(_objectSpread2({
|
|
5210
|
+
auto: true,
|
|
5211
|
+
scale: 2 / 3,
|
|
5212
|
+
px: 0.6
|
|
5237
5213
|
}, props), {}, {
|
|
5238
|
-
children:
|
|
5214
|
+
children: props.children
|
|
5239
5215
|
}));
|
|
5240
|
-
}
|
|
5241
|
-
|
|
5216
|
+
};
|
|
5217
|
+
var SmallButton$1 = /*#__PURE__*/React.memo(SmallButton);
|
|
5242
5218
|
|
|
5243
5219
|
/* "use client" */
|
|
5244
5220
|
|
|
5245
|
-
|
|
5246
|
-
|
|
5221
|
+
Button.Icon = IconButton;
|
|
5222
|
+
Button.Small = SmallButton$1;
|
|
5247
5223
|
|
|
5248
5224
|
/* "use client" */
|
|
5249
5225
|
|
|
@@ -13428,10 +13404,6 @@ var Container = function Container(_ref) {
|
|
|
13428
13404
|
_ref$className = _ref.className,
|
|
13429
13405
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
13430
13406
|
props = _objectWithoutProperties(_ref, _excluded$B);
|
|
13431
|
-
var _useState = React.useState(false),
|
|
13432
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
13433
|
-
expand = _useState2[0],
|
|
13434
|
-
setExpand = _useState2[1];
|
|
13435
13407
|
var _useScale = useScale(),
|
|
13436
13408
|
unit = _useScale.unit,
|
|
13437
13409
|
SCALES = _useScale.SCALES;
|
|
@@ -13452,34 +13424,9 @@ var Container = function Container(_ref) {
|
|
|
13452
13424
|
return /*#__PURE__*/jsxRuntime.jsxs(GridBasicItem, _objectSpread2(_objectSpread2({
|
|
13453
13425
|
className: classes
|
|
13454
13426
|
}, props), {}, {
|
|
13455
|
-
children: [collapse >
|
|
13456
|
-
|
|
13457
|
-
|
|
13458
|
-
maxHeight: expand ? '100%' : "".concat(collapse, "px"),
|
|
13459
|
-
overflow: 'hidden',
|
|
13460
|
-
display: 'inline',
|
|
13461
|
-
transition: "max-height 0.3s ease"
|
|
13462
|
-
},
|
|
13463
|
-
children: children
|
|
13464
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
13465
|
-
margin: 0,
|
|
13466
|
-
onClick: function onClick() {
|
|
13467
|
-
return setExpand(!expand);
|
|
13468
|
-
},
|
|
13469
|
-
style: {
|
|
13470
|
-
textTransform: 'lowercase',
|
|
13471
|
-
height: '25px'
|
|
13472
|
-
},
|
|
13473
|
-
effect: false,
|
|
13474
|
-
color: "abort",
|
|
13475
|
-
scale: 2 / 3,
|
|
13476
|
-
px: 0.2,
|
|
13477
|
-
py: 0,
|
|
13478
|
-
auto: true,
|
|
13479
|
-
children: /*#__PURE__*/jsxRuntime.jsx("b", {
|
|
13480
|
-
children: expand ? 'less' : 'more'
|
|
13481
|
-
})
|
|
13482
|
-
})]
|
|
13427
|
+
children: [collapse > 10 ? /*#__PURE__*/jsxRuntime.jsx(Expandable$1, {
|
|
13428
|
+
collapsedHeight: collapse,
|
|
13429
|
+
children: children
|
|
13483
13430
|
}) : children, styles]
|
|
13484
13431
|
}));
|
|
13485
13432
|
};
|
|
@@ -42510,6 +42457,77 @@ function Clipboard(props) {
|
|
|
42510
42457
|
}), _objectSpread2({}, props));
|
|
42511
42458
|
}
|
|
42512
42459
|
|
|
42460
|
+
var Expandable = function Expandable(_ref) {
|
|
42461
|
+
var children = _ref.children,
|
|
42462
|
+
collapsedHeight = _ref.collapsedHeight;
|
|
42463
|
+
var contentRef = React.useRef(null);
|
|
42464
|
+
var _useState = React.useState(false),
|
|
42465
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
42466
|
+
expanded = _useState2[0],
|
|
42467
|
+
setExpanded = _useState2[1];
|
|
42468
|
+
var _useState3 = React.useState(0),
|
|
42469
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
42470
|
+
fullHeight = _useState4[0],
|
|
42471
|
+
setFullHeight = _useState4[1];
|
|
42472
|
+
var _useState5 = React.useState(false),
|
|
42473
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
42474
|
+
isOverflowing = _useState6[0],
|
|
42475
|
+
setIsOverflowing = _useState6[1];
|
|
42476
|
+
React.useEffect(function () {
|
|
42477
|
+
var el = contentRef.current;
|
|
42478
|
+
if (!el) return;
|
|
42479
|
+
var updateHeight = function updateHeight() {
|
|
42480
|
+
var scrollHeight = el.scrollHeight;
|
|
42481
|
+
setFullHeight(scrollHeight);
|
|
42482
|
+
setIsOverflowing(scrollHeight > collapsedHeight);
|
|
42483
|
+
};
|
|
42484
|
+
updateHeight();
|
|
42485
|
+
var observer = new ResizeObserver(updateHeight);
|
|
42486
|
+
observer.observe(el);
|
|
42487
|
+
return function () {
|
|
42488
|
+
return observer.disconnect();
|
|
42489
|
+
};
|
|
42490
|
+
}, [children, collapsedHeight]);
|
|
42491
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
42492
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
42493
|
+
style: {
|
|
42494
|
+
height: expanded ? fullHeight : collapsedHeight,
|
|
42495
|
+
overflow: "hidden",
|
|
42496
|
+
transition: "height 0.3s ease",
|
|
42497
|
+
position: "relative"
|
|
42498
|
+
},
|
|
42499
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
42500
|
+
ref: contentRef,
|
|
42501
|
+
children: children
|
|
42502
|
+
}), !expanded && isOverflowing && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
42503
|
+
style: {
|
|
42504
|
+
position: "absolute",
|
|
42505
|
+
bottom: 0,
|
|
42506
|
+
left: 0,
|
|
42507
|
+
right: 0,
|
|
42508
|
+
height: 40,
|
|
42509
|
+
background: "linear-gradient(to bottom, rgba(255,255,255,0), white)"
|
|
42510
|
+
}
|
|
42511
|
+
})]
|
|
42512
|
+
}), isOverflowing && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
42513
|
+
margin: 0,
|
|
42514
|
+
padding: 0,
|
|
42515
|
+
onClick: function onClick() {
|
|
42516
|
+
return setExpanded(function (prev) {
|
|
42517
|
+
return !prev;
|
|
42518
|
+
});
|
|
42519
|
+
},
|
|
42520
|
+
effect: false,
|
|
42521
|
+
color: "abort",
|
|
42522
|
+
scale: 2 / 3,
|
|
42523
|
+
auto: true,
|
|
42524
|
+
children: /*#__PURE__*/jsxRuntime.jsx("b", {
|
|
42525
|
+
children: expanded ? 'Show less' : 'Show more'
|
|
42526
|
+
})
|
|
42527
|
+
})]
|
|
42528
|
+
});
|
|
42529
|
+
};
|
|
42530
|
+
|
|
42513
42531
|
exports.AutoComplete = AutoComplete;
|
|
42514
42532
|
exports.Avatar = Avatar;
|
|
42515
42533
|
exports.Badge = Badge;
|
|
@@ -42533,6 +42551,7 @@ exports.Divider = Divider;
|
|
|
42533
42551
|
exports.Dot = Dot;
|
|
42534
42552
|
exports.Drawer = DrawerComponent;
|
|
42535
42553
|
exports.ErrorMessage = ErrorMessage;
|
|
42554
|
+
exports.Expandable = Expandable;
|
|
42536
42555
|
exports.Fieldset = Fieldset;
|
|
42537
42556
|
exports.FormWrapper = FormWrapper;
|
|
42538
42557
|
exports.FormikConsumer = FormikConsumer;
|