@simplybusiness/mobius 10.1.1 → 10.1.2
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/CHANGELOG.md +7 -0
- package/dist/cjs/components/AddressLookup/AddressLookup.js +536 -526
- package/dist/cjs/components/AddressLookup/AddressLookup.js.map +4 -4
- package/dist/cjs/components/AddressLookup/index.js +536 -526
- package/dist/cjs/components/AddressLookup/index.js.map +4 -4
- package/dist/cjs/components/Alert/Alert.js +79 -11
- package/dist/cjs/components/Alert/Alert.js.map +4 -4
- package/dist/cjs/components/Alert/index.js +79 -11
- package/dist/cjs/components/Alert/index.js.map +4 -4
- package/dist/cjs/components/Checkbox/Checkbox.js +502 -492
- package/dist/cjs/components/Checkbox/Checkbox.js.map +4 -4
- package/dist/cjs/components/Checkbox/CheckboxGroup.js +502 -492
- package/dist/cjs/components/Checkbox/CheckboxGroup.js.map +4 -4
- package/dist/cjs/components/Checkbox/index.js +481 -471
- package/dist/cjs/components/Checkbox/index.js.map +4 -4
- package/dist/cjs/components/Combobox/Combobox.js +536 -526
- package/dist/cjs/components/Combobox/Combobox.js.map +4 -4
- package/dist/cjs/components/Combobox/index.js +536 -526
- package/dist/cjs/components/Combobox/index.js.map +4 -4
- package/dist/cjs/components/DateField/DateField.js +523 -513
- package/dist/cjs/components/DateField/DateField.js.map +4 -4
- package/dist/cjs/components/DateField/index.js +523 -513
- package/dist/cjs/components/DateField/index.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js +523 -513
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/index.js +523 -513
- package/dist/cjs/components/ErrorMessage/index.js.map +4 -4
- package/dist/cjs/components/ExpandableText/ExpandableText.js +523 -513
- package/dist/cjs/components/ExpandableText/ExpandableText.js.map +4 -4
- package/dist/cjs/components/ExpandableText/index.js +523 -513
- package/dist/cjs/components/ExpandableText/index.js.map +4 -4
- package/dist/cjs/components/MaskedField/MaskedField.js +533 -523
- package/dist/cjs/components/MaskedField/MaskedField.js.map +4 -4
- package/dist/cjs/components/MaskedField/index.js +533 -523
- package/dist/cjs/components/MaskedField/index.js.map +4 -4
- package/dist/cjs/components/NumberField/NumberField.js +524 -514
- package/dist/cjs/components/NumberField/NumberField.js.map +4 -4
- package/dist/cjs/components/NumberField/index.js +524 -514
- package/dist/cjs/components/NumberField/index.js.map +4 -4
- package/dist/cjs/components/PasswordField/PasswordField.js +520 -510
- package/dist/cjs/components/PasswordField/PasswordField.js.map +4 -4
- package/dist/cjs/components/PasswordField/ShowHideButton.js +519 -509
- package/dist/cjs/components/PasswordField/ShowHideButton.js.map +4 -4
- package/dist/cjs/components/PasswordField/index.js +520 -510
- package/dist/cjs/components/PasswordField/index.js.map +4 -4
- package/dist/cjs/components/Radio/Radio.js +502 -492
- package/dist/cjs/components/Radio/Radio.js.map +4 -4
- package/dist/cjs/components/Radio/RadioGroup.js +501 -491
- package/dist/cjs/components/Radio/RadioGroup.js.map +4 -4
- package/dist/cjs/components/Radio/index.js +480 -470
- package/dist/cjs/components/Radio/index.js.map +4 -4
- package/dist/cjs/components/Select/Select.js +507 -497
- package/dist/cjs/components/Select/Select.js.map +4 -4
- package/dist/cjs/components/Select/index.js +507 -497
- package/dist/cjs/components/Select/index.js.map +4 -4
- package/dist/cjs/components/TextArea/TextArea.js +517 -507
- package/dist/cjs/components/TextArea/TextArea.js.map +4 -4
- package/dist/cjs/components/TextArea/index.js +517 -507
- package/dist/cjs/components/TextArea/index.js.map +4 -4
- package/dist/cjs/components/TextField/TextField.js +533 -523
- package/dist/cjs/components/TextField/TextField.js.map +4 -4
- package/dist/cjs/components/TextField/index.js +533 -523
- package/dist/cjs/components/TextField/index.js.map +4 -4
- package/dist/cjs/components/index.js +563 -553
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/index.js +563 -553
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/meta.json +1340 -1273
- package/dist/esm/{chunk-FTSJNY4J.js → chunk-N5WGQAHM.js} +14 -2
- package/dist/esm/chunk-N5WGQAHM.js.map +7 -0
- package/dist/esm/{chunk-C4BILMFX.js → chunk-PB2OICEB.js} +1 -1
- package/dist/esm/components/AddressLookup/AddressLookup.js +2 -2
- package/dist/esm/components/AddressLookup/index.js +2 -2
- package/dist/esm/components/Alert/Alert.js +4 -1
- package/dist/esm/components/Alert/index.js +4 -1
- package/dist/esm/components/Checkbox/Checkbox.js +2 -2
- package/dist/esm/components/Checkbox/CheckboxGroup.js +2 -2
- package/dist/esm/components/Checkbox/index.js +2 -2
- package/dist/esm/components/Combobox/Combobox.js +2 -2
- package/dist/esm/components/Combobox/index.js +2 -2
- package/dist/esm/components/DateField/DateField.js +2 -2
- package/dist/esm/components/DateField/index.js +2 -2
- package/dist/esm/components/ErrorMessage/ErrorMessage.js +2 -2
- package/dist/esm/components/ErrorMessage/index.js +2 -2
- package/dist/esm/components/ExpandableText/ExpandableText.js +2 -2
- package/dist/esm/components/ExpandableText/index.js +2 -2
- package/dist/esm/components/MaskedField/MaskedField.js +2 -2
- package/dist/esm/components/MaskedField/index.js +2 -2
- package/dist/esm/components/NumberField/NumberField.js +2 -2
- package/dist/esm/components/NumberField/index.js +2 -2
- package/dist/esm/components/PasswordField/PasswordField.js +2 -2
- package/dist/esm/components/PasswordField/ShowHideButton.js +2 -2
- package/dist/esm/components/PasswordField/index.js +2 -2
- package/dist/esm/components/Radio/Radio.js +2 -2
- package/dist/esm/components/Radio/RadioGroup.js +2 -2
- package/dist/esm/components/Radio/index.js +2 -2
- package/dist/esm/components/Select/Select.js +2 -2
- package/dist/esm/components/Select/index.js +2 -2
- package/dist/esm/components/TextArea/TextArea.js +2 -2
- package/dist/esm/components/TextArea/index.js +2 -2
- package/dist/esm/components/TextField/TextField.js +2 -2
- package/dist/esm/components/TextField/index.js +2 -2
- package/dist/esm/components/index.js +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/meta.json +160 -127
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/Alert/Alert.tsx +10 -1
- package/dist/esm/chunk-FTSJNY4J.js.map +0 -7
- /package/dist/esm/{chunk-C4BILMFX.js.map → chunk-PB2OICEB.js.map} +0 -0
|
@@ -1295,19 +1295,98 @@ var init_AddressLookup2 = __esm({
|
|
|
1295
1295
|
}
|
|
1296
1296
|
});
|
|
1297
1297
|
|
|
1298
|
+
// src/components/Text/Text.tsx
|
|
1299
|
+
var import_dedupe7, import_Text, import_jsx_runtime8, getElementType, Text;
|
|
1300
|
+
var init_Text = __esm({
|
|
1301
|
+
"src/components/Text/Text.tsx"() {
|
|
1302
|
+
"use strict";
|
|
1303
|
+
import_dedupe7 = __toESM(require("classnames/dedupe"));
|
|
1304
|
+
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
1305
|
+
import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1306
|
+
getElementType = (variant, elementType) => {
|
|
1307
|
+
if (variant) {
|
|
1308
|
+
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
1309
|
+
}
|
|
1310
|
+
return elementType || "p";
|
|
1311
|
+
};
|
|
1312
|
+
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
1313
|
+
const { variant, className, spacing, ...otherProps } = props;
|
|
1314
|
+
const elementType = getElementType(variant, Component);
|
|
1315
|
+
const variantType = variant || elementType;
|
|
1316
|
+
const classes = (0, import_dedupe7.default)(
|
|
1317
|
+
"mobius",
|
|
1318
|
+
"mobius-text",
|
|
1319
|
+
{ [`--is-${variantType}`]: variantType },
|
|
1320
|
+
{ [`--has-line-height-${spacing}`]: spacing },
|
|
1321
|
+
className
|
|
1322
|
+
);
|
|
1323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
1324
|
+
};
|
|
1325
|
+
Text.displayName = "Text";
|
|
1326
|
+
}
|
|
1327
|
+
});
|
|
1328
|
+
|
|
1329
|
+
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
1330
|
+
var import_react10, import_jsx_runtime9, isHTML, TextOrHTML;
|
|
1331
|
+
var init_TextOrHTML = __esm({
|
|
1332
|
+
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
1333
|
+
"use strict";
|
|
1334
|
+
import_react10 = require("react");
|
|
1335
|
+
init_Text();
|
|
1336
|
+
import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1337
|
+
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
1338
|
+
TextOrHTML = ({
|
|
1339
|
+
ref,
|
|
1340
|
+
text,
|
|
1341
|
+
htmlClassName,
|
|
1342
|
+
htmlElementType,
|
|
1343
|
+
textWrapper = false,
|
|
1344
|
+
autoDetect = false,
|
|
1345
|
+
...textProps
|
|
1346
|
+
}) => {
|
|
1347
|
+
const textIsHTML = autoDetect && isHTML(text);
|
|
1348
|
+
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
1349
|
+
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
1350
|
+
const DangerousComponent = resolvedElementType;
|
|
1351
|
+
const dangerousHTML = (0, import_react10.useMemo)(() => ({ __html: text }), [text]);
|
|
1352
|
+
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1353
|
+
DangerousComponent,
|
|
1354
|
+
{
|
|
1355
|
+
className: htmlClassName,
|
|
1356
|
+
dangerouslySetInnerHTML: dangerousHTML
|
|
1357
|
+
}
|
|
1358
|
+
);
|
|
1359
|
+
if (shouldWrapInText) {
|
|
1360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
1361
|
+
}
|
|
1362
|
+
return dangerousElement;
|
|
1363
|
+
};
|
|
1364
|
+
TextOrHTML.displayName = "TextOrHTML";
|
|
1365
|
+
}
|
|
1366
|
+
});
|
|
1367
|
+
|
|
1368
|
+
// src/components/TextOrHTML/index.tsx
|
|
1369
|
+
var init_TextOrHTML2 = __esm({
|
|
1370
|
+
"src/components/TextOrHTML/index.tsx"() {
|
|
1371
|
+
"use strict";
|
|
1372
|
+
init_TextOrHTML();
|
|
1373
|
+
}
|
|
1374
|
+
});
|
|
1375
|
+
|
|
1298
1376
|
// src/components/Alert/Alert.tsx
|
|
1299
1377
|
function isAlertVariant(value) {
|
|
1300
1378
|
return value === "info" || value === "success" || value === "warning" || value === "error";
|
|
1301
1379
|
}
|
|
1302
|
-
var import_icons3,
|
|
1380
|
+
var import_icons3, import_dedupe8, import_Alert, import_jsx_runtime10, Alert;
|
|
1303
1381
|
var init_Alert = __esm({
|
|
1304
1382
|
"src/components/Alert/Alert.tsx"() {
|
|
1305
1383
|
"use strict";
|
|
1306
1384
|
import_icons3 = require("@simplybusiness/icons");
|
|
1307
|
-
|
|
1385
|
+
import_dedupe8 = __toESM(require("classnames/dedupe"));
|
|
1308
1386
|
init_Icon2();
|
|
1387
|
+
init_TextOrHTML2();
|
|
1309
1388
|
import_Alert = require("@simplybusiness/mobius/src/components/Alert/Alert.css");
|
|
1310
|
-
|
|
1389
|
+
import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1311
1390
|
Alert = ({ ref, ...props }) => {
|
|
1312
1391
|
const {
|
|
1313
1392
|
elementType: Element = "div",
|
|
@@ -1320,7 +1399,7 @@ var init_Alert = __esm({
|
|
|
1320
1399
|
if (!show) return null;
|
|
1321
1400
|
const variant = variantProp && isAlertVariant(variantProp) ? variantProp : "info";
|
|
1322
1401
|
const colorValue = variant === "success" ? `var(--color-valid)` : `var(--color-${variant})`;
|
|
1323
|
-
const classes = (0,
|
|
1402
|
+
const classes = (0, import_dedupe8.default)(
|
|
1324
1403
|
"mobius",
|
|
1325
1404
|
"mobius-alert",
|
|
1326
1405
|
{
|
|
@@ -1338,14 +1417,23 @@ var init_Alert = __esm({
|
|
|
1338
1417
|
warning: import_icons3.warning,
|
|
1339
1418
|
error: import_icons3.error
|
|
1340
1419
|
};
|
|
1341
|
-
const headerClasses = (0,
|
|
1342
|
-
const iconClasses = (0,
|
|
1343
|
-
const contentClasses = (0,
|
|
1344
|
-
return /* @__PURE__ */ (0,
|
|
1345
|
-
/* @__PURE__ */ (0,
|
|
1346
|
-
/* @__PURE__ */ (0,
|
|
1347
|
-
header && /* @__PURE__ */ (0,
|
|
1348
|
-
|
|
1420
|
+
const headerClasses = (0, import_dedupe8.default)("mobius", "mobius-alert__header");
|
|
1421
|
+
const iconClasses = (0, import_dedupe8.default)("mobius", "mobius-alert__icon");
|
|
1422
|
+
const contentClasses = (0, import_dedupe8.default)("mobius", "mobius-alert__content");
|
|
1423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Element, { ref, role: "alert", ...otherProps, className: classes, children: [
|
|
1424
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { icon: icon[variant], color: colorValue }) }),
|
|
1425
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { children: [
|
|
1426
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1427
|
+
TextOrHTML,
|
|
1428
|
+
{
|
|
1429
|
+
autoDetect: true,
|
|
1430
|
+
htmlElementType: "span",
|
|
1431
|
+
className: headerClasses,
|
|
1432
|
+
htmlClassName: headerClasses,
|
|
1433
|
+
text: header
|
|
1434
|
+
}
|
|
1435
|
+
),
|
|
1436
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: contentClasses, children })
|
|
1349
1437
|
] })
|
|
1350
1438
|
] });
|
|
1351
1439
|
};
|
|
@@ -1362,14 +1450,14 @@ var init_Alert2 = __esm({
|
|
|
1362
1450
|
});
|
|
1363
1451
|
|
|
1364
1452
|
// src/components/Box/Box.tsx
|
|
1365
|
-
var
|
|
1453
|
+
var import_dedupe9, import_Box, import_jsx_runtime11, Box;
|
|
1366
1454
|
var init_Box = __esm({
|
|
1367
1455
|
"src/components/Box/Box.tsx"() {
|
|
1368
1456
|
"use strict";
|
|
1369
|
-
|
|
1457
|
+
import_dedupe9 = __toESM(require("classnames/dedupe"));
|
|
1370
1458
|
init_utils();
|
|
1371
1459
|
import_Box = require("@simplybusiness/mobius/src/components/Box/Box.css");
|
|
1372
|
-
|
|
1460
|
+
import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1373
1461
|
Box = ({ ref, ...props }) => {
|
|
1374
1462
|
const {
|
|
1375
1463
|
elementType: Element = "div",
|
|
@@ -1395,7 +1483,7 @@ var init_Box = __esm({
|
|
|
1395
1483
|
style,
|
|
1396
1484
|
...otherProps
|
|
1397
1485
|
} = props;
|
|
1398
|
-
const classes = (0,
|
|
1486
|
+
const classes = (0, import_dedupe9.default)("mobius", "mobius-box", otherProps.className);
|
|
1399
1487
|
const styleProps = filterUndefinedProps({
|
|
1400
1488
|
padding: getSpacingValue(padding),
|
|
1401
1489
|
paddingInline: getSpacingValue(paddingInline || paddingX),
|
|
@@ -1412,7 +1500,7 @@ var init_Box = __esm({
|
|
|
1412
1500
|
height,
|
|
1413
1501
|
...style
|
|
1414
1502
|
});
|
|
1415
|
-
return /* @__PURE__ */ (0,
|
|
1503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Element, { ref, style: styleProps, ...otherProps, className: classes });
|
|
1416
1504
|
};
|
|
1417
1505
|
Box.displayName = "Box";
|
|
1418
1506
|
}
|
|
@@ -1427,27 +1515,27 @@ var init_Box2 = __esm({
|
|
|
1427
1515
|
});
|
|
1428
1516
|
|
|
1429
1517
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
1430
|
-
var
|
|
1518
|
+
var import_react11, import_dedupe10, import_Breadcrumbs, import_jsx_runtime12, Breadcrumbs;
|
|
1431
1519
|
var init_Breadcrumbs = __esm({
|
|
1432
1520
|
"src/components/Breadcrumbs/Breadcrumbs.tsx"() {
|
|
1433
1521
|
"use strict";
|
|
1434
1522
|
"use client";
|
|
1435
|
-
|
|
1436
|
-
|
|
1523
|
+
import_react11 = require("react");
|
|
1524
|
+
import_dedupe10 = __toESM(require("classnames/dedupe"));
|
|
1437
1525
|
import_Breadcrumbs = require("@simplybusiness/mobius/src/components/Breadcrumbs/Breadcrumbs.css");
|
|
1438
|
-
|
|
1526
|
+
import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1439
1527
|
Breadcrumbs = ({ ref, ...props }) => {
|
|
1440
1528
|
const { "aria-label": ariaLabel = "Breadcrumbs" } = props;
|
|
1441
1529
|
const { navProps } = { navProps: { "aria-label": ariaLabel } };
|
|
1442
1530
|
const { children, ...otherProps } = props;
|
|
1443
|
-
const childArray =
|
|
1444
|
-
const classes = (0,
|
|
1531
|
+
const childArray = import_react11.Children.toArray(children);
|
|
1532
|
+
const classes = (0, import_dedupe10.default)(
|
|
1445
1533
|
"mobius",
|
|
1446
1534
|
"mobius-breadcrumb",
|
|
1447
1535
|
otherProps.className
|
|
1448
1536
|
);
|
|
1449
|
-
return /* @__PURE__ */ (0,
|
|
1450
|
-
(child, i) => (0,
|
|
1537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("nav", { ref, ...otherProps, ...navProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { children: childArray.map(
|
|
1538
|
+
(child, i) => (0, import_react11.cloneElement)(
|
|
1451
1539
|
child,
|
|
1452
1540
|
{
|
|
1453
1541
|
key: i,
|
|
@@ -1461,22 +1549,22 @@ var init_Breadcrumbs = __esm({
|
|
|
1461
1549
|
});
|
|
1462
1550
|
|
|
1463
1551
|
// src/components/Breadcrumbs/BreadcrumbItem.tsx
|
|
1464
|
-
var
|
|
1552
|
+
var import_react12, import_dedupe11, import_jsx_runtime13, BreadcrumbItem;
|
|
1465
1553
|
var init_BreadcrumbItem = __esm({
|
|
1466
1554
|
"src/components/Breadcrumbs/BreadcrumbItem.tsx"() {
|
|
1467
1555
|
"use strict";
|
|
1468
1556
|
"use client";
|
|
1469
|
-
|
|
1470
|
-
|
|
1557
|
+
import_react12 = require("react");
|
|
1558
|
+
import_dedupe11 = __toESM(require("classnames/dedupe"));
|
|
1471
1559
|
init_Box2();
|
|
1472
|
-
|
|
1560
|
+
import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1473
1561
|
BreadcrumbItem = ({ ref, ...props }) => {
|
|
1474
1562
|
const {
|
|
1475
1563
|
isDisabled = false,
|
|
1476
1564
|
isCurrent = false,
|
|
1477
1565
|
"aria-current": ariaCurrent = "page",
|
|
1478
1566
|
children,
|
|
1479
|
-
separator = /* @__PURE__ */ (0,
|
|
1567
|
+
separator = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Box, { className: "mobius-breadcrumb__separator", "aria-hidden": "true", children: ">" }),
|
|
1480
1568
|
...otherProps
|
|
1481
1569
|
} = props;
|
|
1482
1570
|
const { itemProps } = {
|
|
@@ -1486,14 +1574,14 @@ var init_BreadcrumbItem = __esm({
|
|
|
1486
1574
|
...otherProps
|
|
1487
1575
|
}
|
|
1488
1576
|
};
|
|
1489
|
-
const classes = (0,
|
|
1577
|
+
const classes = (0, import_dedupe11.default)(
|
|
1490
1578
|
"mobius",
|
|
1491
1579
|
"mobius-breadcrumb__item",
|
|
1492
1580
|
props.className
|
|
1493
1581
|
);
|
|
1494
|
-
const child = typeof children === "string" ? /* @__PURE__ */ (0,
|
|
1495
|
-
return /* @__PURE__ */ (0,
|
|
1496
|
-
(0,
|
|
1582
|
+
const child = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { ...itemProps, children }) : import_react12.Children.only(children);
|
|
1583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("li", { className: classes, children: [
|
|
1584
|
+
(0, import_react12.cloneElement)(child, {
|
|
1497
1585
|
...child.props,
|
|
1498
1586
|
...itemProps,
|
|
1499
1587
|
ref
|
|
@@ -1522,7 +1610,7 @@ function VisuallyHidden(props) {
|
|
|
1522
1610
|
elementType: Component = "div",
|
|
1523
1611
|
...otherProps
|
|
1524
1612
|
} = props;
|
|
1525
|
-
return /* @__PURE__ */ (0,
|
|
1613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1526
1614
|
Component,
|
|
1527
1615
|
{
|
|
1528
1616
|
className,
|
|
@@ -1543,11 +1631,11 @@ function VisuallyHidden(props) {
|
|
|
1543
1631
|
}
|
|
1544
1632
|
);
|
|
1545
1633
|
}
|
|
1546
|
-
var
|
|
1634
|
+
var import_jsx_runtime14;
|
|
1547
1635
|
var init_VisuallyHidden = __esm({
|
|
1548
1636
|
"src/components/VisuallyHidden/VisuallyHidden.tsx"() {
|
|
1549
1637
|
"use strict";
|
|
1550
|
-
|
|
1638
|
+
import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1551
1639
|
}
|
|
1552
1640
|
});
|
|
1553
1641
|
|
|
@@ -1560,19 +1648,19 @@ var init_VisuallyHidden2 = __esm({
|
|
|
1560
1648
|
});
|
|
1561
1649
|
|
|
1562
1650
|
// src/components/Button/Loading.tsx
|
|
1563
|
-
var import_icons4,
|
|
1651
|
+
var import_icons4, import_jsx_runtime15, Loading;
|
|
1564
1652
|
var init_Loading = __esm({
|
|
1565
1653
|
"src/components/Button/Loading.tsx"() {
|
|
1566
1654
|
"use strict";
|
|
1567
1655
|
import_icons4 = require("@simplybusiness/icons");
|
|
1568
1656
|
init_Icon2();
|
|
1569
1657
|
init_VisuallyHidden2();
|
|
1570
|
-
|
|
1658
|
+
import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1571
1659
|
Loading = (props) => {
|
|
1572
1660
|
const { children } = props;
|
|
1573
|
-
return /* @__PURE__ */ (0,
|
|
1574
|
-
/* @__PURE__ */ (0,
|
|
1575
|
-
/* @__PURE__ */ (0,
|
|
1661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
1662
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "mobius-button__icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { icon: import_icons4.loading, spin: true, size: "md" }) }),
|
|
1663
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(VisuallyHidden, { className: "mobius-button__loading-text", children: "Loading" }),
|
|
1576
1664
|
children
|
|
1577
1665
|
] });
|
|
1578
1666
|
};
|
|
@@ -1580,33 +1668,33 @@ var init_Loading = __esm({
|
|
|
1580
1668
|
});
|
|
1581
1669
|
|
|
1582
1670
|
// src/components/Button/Success.tsx
|
|
1583
|
-
var import_icons5,
|
|
1671
|
+
var import_icons5, import_jsx_runtime16, Success;
|
|
1584
1672
|
var init_Success = __esm({
|
|
1585
1673
|
"src/components/Button/Success.tsx"() {
|
|
1586
1674
|
"use strict";
|
|
1587
1675
|
import_icons5 = require("@simplybusiness/icons");
|
|
1588
1676
|
init_Icon2();
|
|
1589
1677
|
init_VisuallyHidden2();
|
|
1590
|
-
|
|
1591
|
-
Success = () => /* @__PURE__ */ (0,
|
|
1592
|
-
/* @__PURE__ */ (0,
|
|
1593
|
-
/* @__PURE__ */ (0,
|
|
1678
|
+
import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1679
|
+
Success = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
1680
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mobius-button__icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { icon: import_icons5.tick, size: "md" }) }),
|
|
1681
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(VisuallyHidden, { className: "mobius-button__success-text", children: "Success" })
|
|
1594
1682
|
] });
|
|
1595
1683
|
}
|
|
1596
1684
|
});
|
|
1597
1685
|
|
|
1598
1686
|
// src/components/Button/Button.tsx
|
|
1599
|
-
var
|
|
1687
|
+
var import_dedupe12, import_Button, import_jsx_runtime17, Button;
|
|
1600
1688
|
var init_Button = __esm({
|
|
1601
1689
|
"src/components/Button/Button.tsx"() {
|
|
1602
1690
|
"use strict";
|
|
1603
1691
|
"use client";
|
|
1604
|
-
|
|
1692
|
+
import_dedupe12 = __toESM(require("classnames/dedupe"));
|
|
1605
1693
|
init_Loading();
|
|
1606
1694
|
init_useButton2();
|
|
1607
1695
|
init_Success();
|
|
1608
1696
|
import_Button = require("@simplybusiness/mobius/src/components/Button/Button.css");
|
|
1609
|
-
|
|
1697
|
+
import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1610
1698
|
Button = ({ ref, ...props }) => {
|
|
1611
1699
|
const {
|
|
1612
1700
|
children,
|
|
@@ -1621,7 +1709,7 @@ var init_Button = __esm({
|
|
|
1621
1709
|
...otherProps
|
|
1622
1710
|
} = props;
|
|
1623
1711
|
const { buttonProps } = useButton(props);
|
|
1624
|
-
otherProps.className = (0,
|
|
1712
|
+
otherProps.className = (0, import_dedupe12.default)(
|
|
1625
1713
|
"mobius",
|
|
1626
1714
|
"mobius-button",
|
|
1627
1715
|
`--variant-${variant}`,
|
|
@@ -1633,9 +1721,9 @@ var init_Button = __esm({
|
|
|
1633
1721
|
},
|
|
1634
1722
|
otherProps.className
|
|
1635
1723
|
);
|
|
1636
|
-
return /* @__PURE__ */ (0,
|
|
1637
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
1638
|
-
isSuccess && !isLoading && /* @__PURE__ */ (0,
|
|
1724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Component, { ref, ...buttonProps, ...otherProps, children: [
|
|
1725
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Loading, { children }) : children,
|
|
1726
|
+
isSuccess && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Success, {})
|
|
1639
1727
|
] });
|
|
1640
1728
|
};
|
|
1641
1729
|
Button.displayName = "Button";
|
|
@@ -1651,16 +1739,16 @@ var init_Button2 = __esm({
|
|
|
1651
1739
|
});
|
|
1652
1740
|
|
|
1653
1741
|
// src/components/Stack/Stack.tsx
|
|
1654
|
-
var
|
|
1742
|
+
var import_dedupe13, import_Stack, import_jsx_runtime18, Stack;
|
|
1655
1743
|
var init_Stack = __esm({
|
|
1656
1744
|
"src/components/Stack/Stack.tsx"() {
|
|
1657
1745
|
"use strict";
|
|
1658
|
-
|
|
1746
|
+
import_dedupe13 = __toESM(require("classnames/dedupe"));
|
|
1659
1747
|
import_Stack = require("@simplybusiness/mobius/src/components/Stack/Stack.css");
|
|
1660
|
-
|
|
1748
|
+
import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1661
1749
|
Stack = ({ ref, ...props }) => {
|
|
1662
1750
|
const { elementType: Element = "div", gap, ...otherProps } = props;
|
|
1663
|
-
const classes = (0,
|
|
1751
|
+
const classes = (0, import_dedupe13.default)(
|
|
1664
1752
|
"mobius",
|
|
1665
1753
|
"mobius-stack",
|
|
1666
1754
|
{
|
|
@@ -1668,7 +1756,7 @@ var init_Stack = __esm({
|
|
|
1668
1756
|
},
|
|
1669
1757
|
otherProps.className
|
|
1670
1758
|
);
|
|
1671
|
-
return /* @__PURE__ */ (0,
|
|
1759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
1672
1760
|
};
|
|
1673
1761
|
Stack.displayName = "Stack";
|
|
1674
1762
|
}
|
|
@@ -1683,13 +1771,13 @@ var init_Stack2 = __esm({
|
|
|
1683
1771
|
});
|
|
1684
1772
|
|
|
1685
1773
|
// src/components/Checkbox/Checkbox.tsx
|
|
1686
|
-
var
|
|
1774
|
+
var import_react13, import_dedupe14, import_icons6, import_Checkbox, import_jsx_runtime19, Checkbox;
|
|
1687
1775
|
var init_Checkbox = __esm({
|
|
1688
1776
|
"src/components/Checkbox/Checkbox.tsx"() {
|
|
1689
1777
|
"use strict";
|
|
1690
1778
|
"use client";
|
|
1691
|
-
|
|
1692
|
-
|
|
1779
|
+
import_react13 = require("react");
|
|
1780
|
+
import_dedupe14 = __toESM(require("classnames/dedupe"));
|
|
1693
1781
|
import_icons6 = require("@simplybusiness/icons");
|
|
1694
1782
|
init_ErrorMessage2();
|
|
1695
1783
|
init_spaceDelimitedList();
|
|
@@ -1697,7 +1785,7 @@ var init_Checkbox = __esm({
|
|
|
1697
1785
|
init_Icon2();
|
|
1698
1786
|
init_Stack2();
|
|
1699
1787
|
import_Checkbox = require("@simplybusiness/mobius/src/components/Checkbox/Checkbox.css");
|
|
1700
|
-
|
|
1788
|
+
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1701
1789
|
Checkbox = ({ ref, ...props }) => {
|
|
1702
1790
|
const {
|
|
1703
1791
|
id,
|
|
@@ -1717,18 +1805,18 @@ var init_Checkbox = __esm({
|
|
|
1717
1805
|
["aria-describedby"]: ariaDescribedBy,
|
|
1718
1806
|
...rest
|
|
1719
1807
|
} = props;
|
|
1720
|
-
const [checked, setChecked] = (0,
|
|
1721
|
-
const fallbackRef = (0,
|
|
1808
|
+
const [checked, setChecked] = (0, import_react13.useState)(defaultSelected);
|
|
1809
|
+
const fallbackRef = (0, import_react13.useRef)(null);
|
|
1722
1810
|
const refObj = ref || fallbackRef;
|
|
1723
|
-
const inputId = (0,
|
|
1811
|
+
const inputId = (0, import_react13.useId)();
|
|
1724
1812
|
const isControlled = typeof selected === "boolean";
|
|
1725
|
-
(0,
|
|
1813
|
+
(0, import_react13.useEffect)(() => {
|
|
1726
1814
|
if (isControlled) {
|
|
1727
1815
|
setChecked(selected);
|
|
1728
1816
|
}
|
|
1729
1817
|
}, [selected, isControlled]);
|
|
1730
1818
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
1731
|
-
const sharedClasses = (0,
|
|
1819
|
+
const sharedClasses = (0, import_dedupe14.default)(
|
|
1732
1820
|
{
|
|
1733
1821
|
"--is-disabled": isDisabled,
|
|
1734
1822
|
"--is-selected": checked,
|
|
@@ -1737,31 +1825,31 @@ var init_Checkbox = __esm({
|
|
|
1737
1825
|
},
|
|
1738
1826
|
validationClasses
|
|
1739
1827
|
);
|
|
1740
|
-
const wrapperClasses = (0,
|
|
1828
|
+
const wrapperClasses = (0, import_dedupe14.default)(
|
|
1741
1829
|
"mobius",
|
|
1742
1830
|
"mobius-checkbox",
|
|
1743
1831
|
sharedClasses,
|
|
1744
1832
|
className
|
|
1745
1833
|
);
|
|
1746
|
-
const labelClasses = (0,
|
|
1747
|
-
const inputClasses = (0,
|
|
1748
|
-
const iconClasses = (0,
|
|
1749
|
-
const errorMessageId = (0,
|
|
1834
|
+
const labelClasses = (0, import_dedupe14.default)("mobius-checkbox__label", sharedClasses);
|
|
1835
|
+
const inputClasses = (0, import_dedupe14.default)("mobius-checkbox__input", sharedClasses);
|
|
1836
|
+
const iconClasses = (0, import_dedupe14.default)("mobius-checkbox__icon", sharedClasses);
|
|
1837
|
+
const errorMessageId = (0, import_react13.useId)();
|
|
1750
1838
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
1751
1839
|
const describedBy = spaceDelimitedList([
|
|
1752
1840
|
shouldErrorMessageShow,
|
|
1753
1841
|
ariaDescribedBy
|
|
1754
1842
|
]);
|
|
1755
|
-
const labelId = (0,
|
|
1843
|
+
const labelId = (0, import_react13.useId)();
|
|
1756
1844
|
const handleChange = (event) => {
|
|
1757
1845
|
setChecked(!checked);
|
|
1758
1846
|
if (onChange) {
|
|
1759
1847
|
onChange(event, isLastItem);
|
|
1760
1848
|
}
|
|
1761
1849
|
};
|
|
1762
|
-
return /* @__PURE__ */ (0,
|
|
1763
|
-
/* @__PURE__ */ (0,
|
|
1764
|
-
/* @__PURE__ */ (0,
|
|
1850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Stack, { gap: "xs", className: wrapperClasses, children: [
|
|
1851
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: labelClasses, children: [
|
|
1852
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1765
1853
|
"input",
|
|
1766
1854
|
{
|
|
1767
1855
|
"aria-describedby": describedBy,
|
|
@@ -1782,7 +1870,7 @@ var init_Checkbox = __esm({
|
|
|
1782
1870
|
...rest
|
|
1783
1871
|
}
|
|
1784
1872
|
),
|
|
1785
|
-
/* @__PURE__ */ (0,
|
|
1873
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1786
1874
|
Icon,
|
|
1787
1875
|
{
|
|
1788
1876
|
icon: checked ? import_icons6.squareTick : import_icons6.square,
|
|
@@ -1790,9 +1878,9 @@ var init_Checkbox = __esm({
|
|
|
1790
1878
|
className: iconClasses
|
|
1791
1879
|
}
|
|
1792
1880
|
),
|
|
1793
|
-
/* @__PURE__ */ (0,
|
|
1881
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { id: labelId, className: "mobius-checkbox__visible-label", children: label })
|
|
1794
1882
|
] }),
|
|
1795
|
-
/* @__PURE__ */ (0,
|
|
1883
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
1796
1884
|
] });
|
|
1797
1885
|
};
|
|
1798
1886
|
Checkbox.displayName = "Checkbox";
|
|
@@ -1800,18 +1888,18 @@ var init_Checkbox = __esm({
|
|
|
1800
1888
|
});
|
|
1801
1889
|
|
|
1802
1890
|
// src/components/Label/Label.tsx
|
|
1803
|
-
var
|
|
1891
|
+
var import_dedupe15, import_Label, import_jsx_runtime20, Label;
|
|
1804
1892
|
var init_Label = __esm({
|
|
1805
1893
|
"src/components/Label/Label.tsx"() {
|
|
1806
1894
|
"use strict";
|
|
1807
|
-
|
|
1895
|
+
import_dedupe15 = __toESM(require("classnames/dedupe"));
|
|
1808
1896
|
import_Label = require("@simplybusiness/mobius/src/components/Label/Label.css");
|
|
1809
|
-
|
|
1897
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1810
1898
|
Label = ({ ref, ...props }) => {
|
|
1811
1899
|
const { elementType: Element = "label", children, ...otherProps } = props;
|
|
1812
|
-
const classes = (0,
|
|
1900
|
+
const classes = (0, import_dedupe15.default)("mobius", "mobius-label", props.className);
|
|
1813
1901
|
otherProps.className = classes;
|
|
1814
|
-
return /* @__PURE__ */ (0,
|
|
1902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Element, { ref, ...otherProps, className: classes, children });
|
|
1815
1903
|
};
|
|
1816
1904
|
Label.displayName = "Label";
|
|
1817
1905
|
}
|
|
@@ -1826,20 +1914,20 @@ var init_Label2 = __esm({
|
|
|
1826
1914
|
});
|
|
1827
1915
|
|
|
1828
1916
|
// src/components/Checkbox/CheckboxGroup.tsx
|
|
1829
|
-
var
|
|
1917
|
+
var import_dedupe16, import_react14, import_CheckboxGroup, import_jsx_runtime21, CheckboxGroup;
|
|
1830
1918
|
var init_CheckboxGroup = __esm({
|
|
1831
1919
|
"src/components/Checkbox/CheckboxGroup.tsx"() {
|
|
1832
1920
|
"use strict";
|
|
1833
1921
|
"use client";
|
|
1834
|
-
|
|
1835
|
-
|
|
1922
|
+
import_dedupe16 = __toESM(require("classnames/dedupe"));
|
|
1923
|
+
import_react14 = require("react");
|
|
1836
1924
|
init_hooks();
|
|
1837
1925
|
init_spaceDelimitedList();
|
|
1838
1926
|
init_ErrorMessage2();
|
|
1839
1927
|
init_Label2();
|
|
1840
1928
|
init_Checkbox();
|
|
1841
1929
|
import_CheckboxGroup = require("@simplybusiness/mobius/src/components/Checkbox/CheckboxGroup.css");
|
|
1842
|
-
|
|
1930
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1843
1931
|
CheckboxGroup = ({ ref, ...props }) => {
|
|
1844
1932
|
const {
|
|
1845
1933
|
label,
|
|
@@ -1857,10 +1945,10 @@ var init_CheckboxGroup = __esm({
|
|
|
1857
1945
|
lastItemDisables = false,
|
|
1858
1946
|
...rest
|
|
1859
1947
|
} = props;
|
|
1860
|
-
const [selected, setSelected] = (0,
|
|
1861
|
-
const isInitializedRef = (0,
|
|
1862
|
-
const prevDefaultValueRef = (0,
|
|
1863
|
-
(0,
|
|
1948
|
+
const [selected, setSelected] = (0, import_react14.useState)(defaultValue);
|
|
1949
|
+
const isInitializedRef = (0, import_react14.useRef)(false);
|
|
1950
|
+
const prevDefaultValueRef = (0, import_react14.useRef)(defaultValue);
|
|
1951
|
+
(0, import_react14.useEffect)(() => {
|
|
1864
1952
|
const hasChanged = defaultValue.length !== prevDefaultValueRef.current.length || defaultValue.some(
|
|
1865
1953
|
(val, index) => val !== prevDefaultValueRef.current[index]
|
|
1866
1954
|
);
|
|
@@ -1870,7 +1958,7 @@ var init_CheckboxGroup = __esm({
|
|
|
1870
1958
|
isInitializedRef.current = true;
|
|
1871
1959
|
}
|
|
1872
1960
|
}, [defaultValue]);
|
|
1873
|
-
const checkboxGroupClasses = (0,
|
|
1961
|
+
const checkboxGroupClasses = (0, import_dedupe16.default)(
|
|
1874
1962
|
"mobius",
|
|
1875
1963
|
"mobius-checkbox-group",
|
|
1876
1964
|
className,
|
|
@@ -1882,19 +1970,19 @@ var init_CheckboxGroup = __esm({
|
|
|
1882
1970
|
}
|
|
1883
1971
|
);
|
|
1884
1972
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
1885
|
-
const labelClasses = (0,
|
|
1973
|
+
const labelClasses = (0, import_dedupe16.default)(
|
|
1886
1974
|
{
|
|
1887
1975
|
"--is-disabled": isDisabled
|
|
1888
1976
|
},
|
|
1889
1977
|
validationClasses
|
|
1890
1978
|
);
|
|
1891
|
-
const errorMessageId = (0,
|
|
1979
|
+
const errorMessageId = (0, import_react14.useId)();
|
|
1892
1980
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
1893
1981
|
const describedBy = spaceDelimitedList([
|
|
1894
1982
|
shouldErrorMessageShow,
|
|
1895
1983
|
props["aria-describedby"]
|
|
1896
1984
|
]);
|
|
1897
|
-
const labelId = (0,
|
|
1985
|
+
const labelId = (0, import_react14.useId)();
|
|
1898
1986
|
const handleChange = (event, isLastItem = false) => {
|
|
1899
1987
|
const {
|
|
1900
1988
|
target: { value, checked }
|
|
@@ -1912,12 +2000,12 @@ var init_CheckboxGroup = __esm({
|
|
|
1912
2000
|
setSelected(newValue);
|
|
1913
2001
|
onChange?.(newValue);
|
|
1914
2002
|
};
|
|
1915
|
-
const childrenArray =
|
|
2003
|
+
const childrenArray = import_react14.Children.toArray(children);
|
|
1916
2004
|
const lastCheckbox = childrenArray.filter(
|
|
1917
|
-
(child) => (0,
|
|
2005
|
+
(child) => (0, import_react14.isValidElement)(child) && child.type === Checkbox
|
|
1918
2006
|
).pop();
|
|
1919
2007
|
const lastCheckboxIsChecked = lastCheckbox && selected.includes(lastCheckbox.props.value);
|
|
1920
|
-
return /* @__PURE__ */ (0,
|
|
2008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1921
2009
|
"div",
|
|
1922
2010
|
{
|
|
1923
2011
|
...rest,
|
|
@@ -1926,16 +2014,16 @@ var init_CheckboxGroup = __esm({
|
|
|
1926
2014
|
className: checkboxGroupClasses,
|
|
1927
2015
|
role: "group",
|
|
1928
2016
|
style: {
|
|
1929
|
-
"--checkbox-items-per-row": itemsPerRow ||
|
|
2017
|
+
"--checkbox-items-per-row": itemsPerRow || import_react14.Children.count(children)
|
|
1930
2018
|
},
|
|
1931
2019
|
children: [
|
|
1932
|
-
label && /* @__PURE__ */ (0,
|
|
1933
|
-
/* @__PURE__ */ (0,
|
|
1934
|
-
if ((0,
|
|
2020
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Label, { elementType: "span", id: labelId, className: labelClasses, children: label }),
|
|
2021
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "mobius-checkbox-group__wrapper", children: childrenArray.map((child) => {
|
|
2022
|
+
if ((0, import_react14.isValidElement)(child)) {
|
|
1935
2023
|
const isLastItem = child === lastCheckbox;
|
|
1936
2024
|
const isChildDisabled = isDisabled || lastItemDisables && lastCheckboxIsChecked && !isLastItem;
|
|
1937
2025
|
const childProps = child.props;
|
|
1938
|
-
return (0,
|
|
2026
|
+
return (0, import_react14.cloneElement)(
|
|
1939
2027
|
child,
|
|
1940
2028
|
{
|
|
1941
2029
|
isDisabled: isChildDisabled,
|
|
@@ -1951,7 +2039,7 @@ var init_CheckboxGroup = __esm({
|
|
|
1951
2039
|
}
|
|
1952
2040
|
return child;
|
|
1953
2041
|
}) }),
|
|
1954
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2042
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
1955
2043
|
]
|
|
1956
2044
|
}
|
|
1957
2045
|
);
|
|
@@ -1978,23 +2066,23 @@ var init_Checkbox2 = __esm({
|
|
|
1978
2066
|
});
|
|
1979
2067
|
|
|
1980
2068
|
// src/components/Container/Container.tsx
|
|
1981
|
-
var
|
|
2069
|
+
var import_dedupe17, import_Container, import_jsx_runtime22, Container;
|
|
1982
2070
|
var init_Container = __esm({
|
|
1983
2071
|
"src/components/Container/Container.tsx"() {
|
|
1984
2072
|
"use strict";
|
|
1985
|
-
|
|
2073
|
+
import_dedupe17 = __toESM(require("classnames/dedupe"));
|
|
1986
2074
|
init_utils();
|
|
1987
2075
|
import_Container = require("@simplybusiness/mobius/src/components/Container/Container.css");
|
|
1988
|
-
|
|
2076
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1989
2077
|
Container = ({ ref, ...props }) => {
|
|
1990
2078
|
const { elementType: Element = "div", size = "md", ...otherProps } = props;
|
|
1991
|
-
const classes = (0,
|
|
2079
|
+
const classes = (0, import_dedupe17.default)(
|
|
1992
2080
|
"mobius",
|
|
1993
2081
|
"mobius-container",
|
|
1994
2082
|
sizeClasses(size),
|
|
1995
2083
|
otherProps.className
|
|
1996
2084
|
);
|
|
1997
|
-
return /* @__PURE__ */ (0,
|
|
2085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
1998
2086
|
};
|
|
1999
2087
|
Container.displayName = "Container";
|
|
2000
2088
|
}
|
|
@@ -2047,17 +2135,17 @@ var init_validation = __esm({
|
|
|
2047
2135
|
});
|
|
2048
2136
|
|
|
2049
2137
|
// src/components/DateField/DateField.tsx
|
|
2050
|
-
var
|
|
2138
|
+
var import_dedupe18, import_react15, import_jsx_runtime23, MIN_MAX_ERROR, DateField;
|
|
2051
2139
|
var init_DateField = __esm({
|
|
2052
2140
|
"src/components/DateField/DateField.tsx"() {
|
|
2053
2141
|
"use strict";
|
|
2054
2142
|
"use client";
|
|
2055
|
-
|
|
2056
|
-
|
|
2143
|
+
import_dedupe18 = __toESM(require("classnames/dedupe"));
|
|
2144
|
+
import_react15 = require("react");
|
|
2057
2145
|
init_mergeRefs();
|
|
2058
2146
|
init_TextField2();
|
|
2059
2147
|
init_validation();
|
|
2060
|
-
|
|
2148
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2061
2149
|
MIN_MAX_ERROR = '"min" value should not be greater than "max" value.';
|
|
2062
2150
|
DateField = ({ ref, ...props }) => {
|
|
2063
2151
|
const {
|
|
@@ -2070,10 +2158,10 @@ var init_DateField = __esm({
|
|
|
2070
2158
|
value,
|
|
2071
2159
|
...otherProps
|
|
2072
2160
|
} = props;
|
|
2073
|
-
const [error3, setError] = (0,
|
|
2074
|
-
const [isInvalid, setIsInvalid] = (0,
|
|
2075
|
-
const localRef = (0,
|
|
2076
|
-
const classes = (0,
|
|
2161
|
+
const [error3, setError] = (0, import_react15.useState)(errorMessage);
|
|
2162
|
+
const [isInvalid, setIsInvalid] = (0, import_react15.useState)(void 0);
|
|
2163
|
+
const localRef = (0, import_react15.useRef)(null);
|
|
2164
|
+
const classes = (0, import_dedupe18.default)("mobius-date-field", className);
|
|
2077
2165
|
const formattedMin = min ? convertToDateFormat(min, format) : void 0;
|
|
2078
2166
|
const formattedMax = max ? convertToDateFormat(max, format) : void 0;
|
|
2079
2167
|
const formattedDefaultValue = defaultValue ? convertToDateFormat(defaultValue, format) : void 0;
|
|
@@ -2086,7 +2174,7 @@ var init_DateField = __esm({
|
|
|
2086
2174
|
setError(props.errorMessage);
|
|
2087
2175
|
setIsInvalid(false);
|
|
2088
2176
|
};
|
|
2089
|
-
(0,
|
|
2177
|
+
(0, import_react15.useEffect)(() => {
|
|
2090
2178
|
if (!isValidDate(min, format)) {
|
|
2091
2179
|
setInvalidState(`Invalid min date: ${min}`);
|
|
2092
2180
|
return;
|
|
@@ -2119,7 +2207,7 @@ var init_DateField = __esm({
|
|
|
2119
2207
|
validate();
|
|
2120
2208
|
otherProps.onBlur?.(event);
|
|
2121
2209
|
};
|
|
2122
|
-
return /* @__PURE__ */ (0,
|
|
2210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2123
2211
|
TextField,
|
|
2124
2212
|
{
|
|
2125
2213
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -2150,23 +2238,23 @@ var init_DateField2 = __esm({
|
|
|
2150
2238
|
});
|
|
2151
2239
|
|
|
2152
2240
|
// src/components/Drawer/Content.tsx
|
|
2153
|
-
var
|
|
2241
|
+
var import_jsx_runtime24, Content;
|
|
2154
2242
|
var init_Content = __esm({
|
|
2155
2243
|
"src/components/Drawer/Content.tsx"() {
|
|
2156
2244
|
"use strict";
|
|
2157
|
-
|
|
2158
|
-
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
2245
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2246
|
+
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref, ...otherProps, className: "mobius-drawer__content", children });
|
|
2159
2247
|
Content.displayName = "Content";
|
|
2160
2248
|
}
|
|
2161
2249
|
});
|
|
2162
2250
|
|
|
2163
2251
|
// src/components/Drawer/DrawerContext.tsx
|
|
2164
|
-
var
|
|
2252
|
+
var import_react16, DrawerContext;
|
|
2165
2253
|
var init_DrawerContext = __esm({
|
|
2166
2254
|
"src/components/Drawer/DrawerContext.tsx"() {
|
|
2167
2255
|
"use strict";
|
|
2168
|
-
|
|
2169
|
-
DrawerContext = (0,
|
|
2256
|
+
import_react16 = require("react");
|
|
2257
|
+
DrawerContext = (0, import_react16.createContext)({
|
|
2170
2258
|
onClose: () => {
|
|
2171
2259
|
},
|
|
2172
2260
|
closeLabel: void 0,
|
|
@@ -2176,19 +2264,19 @@ var init_DrawerContext = __esm({
|
|
|
2176
2264
|
});
|
|
2177
2265
|
|
|
2178
2266
|
// src/components/Drawer/Drawer.tsx
|
|
2179
|
-
var
|
|
2267
|
+
var import_dedupe19, import_react17, import_Drawer, import_jsx_runtime25, TRANSITION_CSS_VARIABLE, Drawer;
|
|
2180
2268
|
var init_Drawer = __esm({
|
|
2181
2269
|
"src/components/Drawer/Drawer.tsx"() {
|
|
2182
2270
|
"use strict";
|
|
2183
2271
|
"use client";
|
|
2184
|
-
|
|
2185
|
-
|
|
2272
|
+
import_dedupe19 = __toESM(require("classnames/dedupe"));
|
|
2273
|
+
import_react17 = require("react");
|
|
2186
2274
|
init_hooks();
|
|
2187
2275
|
init_utils();
|
|
2188
2276
|
init_VisuallyHidden2();
|
|
2189
2277
|
init_DrawerContext();
|
|
2190
2278
|
import_Drawer = require("@simplybusiness/mobius/src/components/Drawer/Drawer.css");
|
|
2191
|
-
|
|
2279
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2192
2280
|
TRANSITION_CSS_VARIABLE = "--drawer-transition-duration";
|
|
2193
2281
|
Drawer = ({ ref, ...props }) => {
|
|
2194
2282
|
const {
|
|
@@ -2201,8 +2289,8 @@ var init_Drawer = __esm({
|
|
|
2201
2289
|
onClose,
|
|
2202
2290
|
children
|
|
2203
2291
|
} = props;
|
|
2204
|
-
const dialogRef = (0,
|
|
2205
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
2292
|
+
const dialogRef = (0, import_react17.useRef)(null);
|
|
2293
|
+
const [shouldTransition, setShouldTransition] = (0, import_react17.useState)(false);
|
|
2206
2294
|
const { close } = useDialog({
|
|
2207
2295
|
ref: dialogRef,
|
|
2208
2296
|
isOpen,
|
|
@@ -2213,9 +2301,9 @@ var init_Drawer = __esm({
|
|
|
2213
2301
|
CSSVariable: TRANSITION_CSS_VARIABLE
|
|
2214
2302
|
}
|
|
2215
2303
|
});
|
|
2216
|
-
const hiddenId = `dialog-screen-reader-announce-${(0,
|
|
2217
|
-
const headerId = `dialog-header-${(0,
|
|
2218
|
-
const dialogClasses = (0,
|
|
2304
|
+
const hiddenId = `dialog-screen-reader-announce-${(0, import_react17.useId)()}`;
|
|
2305
|
+
const headerId = `dialog-header-${(0, import_react17.useId)()}`;
|
|
2306
|
+
const dialogClasses = (0, import_dedupe19.default)(
|
|
2219
2307
|
"mobius",
|
|
2220
2308
|
"mobius-drawer",
|
|
2221
2309
|
`--${direction}`,
|
|
@@ -2224,10 +2312,10 @@ var init_Drawer = __esm({
|
|
|
2224
2312
|
"--should-transition": shouldTransition
|
|
2225
2313
|
}
|
|
2226
2314
|
);
|
|
2227
|
-
(0,
|
|
2315
|
+
(0, import_react17.useEffect)(() => {
|
|
2228
2316
|
setShouldTransition(supportsDialog());
|
|
2229
2317
|
}, []);
|
|
2230
|
-
const contextValue = (0,
|
|
2318
|
+
const contextValue = (0, import_react17.useMemo)(
|
|
2231
2319
|
() => ({
|
|
2232
2320
|
onClose: close,
|
|
2233
2321
|
closeLabel,
|
|
@@ -2235,18 +2323,18 @@ var init_Drawer = __esm({
|
|
|
2235
2323
|
}),
|
|
2236
2324
|
[close, closeLabel, headerId]
|
|
2237
2325
|
);
|
|
2238
|
-
return /* @__PURE__ */ (0,
|
|
2326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2239
2327
|
"dialog",
|
|
2240
2328
|
{
|
|
2241
|
-
id: (0,
|
|
2329
|
+
id: (0, import_react17.useId)(),
|
|
2242
2330
|
ref: mergeRefs([dialogRef, ref]),
|
|
2243
2331
|
onCancel: close,
|
|
2244
2332
|
className: dialogClasses,
|
|
2245
2333
|
"aria-describedby": hiddenId,
|
|
2246
2334
|
"aria-labelledby": headerId,
|
|
2247
2335
|
children: [
|
|
2248
|
-
/* @__PURE__ */ (0,
|
|
2249
|
-
/* @__PURE__ */ (0,
|
|
2336
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { id: hiddenId, children: announce }) }),
|
|
2337
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DrawerContext.Provider, { value: contextValue, children })
|
|
2250
2338
|
]
|
|
2251
2339
|
}
|
|
2252
2340
|
);
|
|
@@ -2256,21 +2344,21 @@ var init_Drawer = __esm({
|
|
|
2256
2344
|
});
|
|
2257
2345
|
|
|
2258
2346
|
// src/components/Drawer/useDrawer.ts
|
|
2259
|
-
var
|
|
2347
|
+
var import_react18, useDrawer;
|
|
2260
2348
|
var init_useDrawer = __esm({
|
|
2261
2349
|
"src/components/Drawer/useDrawer.ts"() {
|
|
2262
2350
|
"use strict";
|
|
2263
|
-
|
|
2351
|
+
import_react18 = require("react");
|
|
2264
2352
|
init_DrawerContext();
|
|
2265
2353
|
useDrawer = () => {
|
|
2266
|
-
const { onClose, closeLabel, headerId } = (0,
|
|
2354
|
+
const { onClose, closeLabel, headerId } = (0, import_react18.useContext)(DrawerContext);
|
|
2267
2355
|
return { onClose, closeLabel, headerId };
|
|
2268
2356
|
};
|
|
2269
2357
|
}
|
|
2270
2358
|
});
|
|
2271
2359
|
|
|
2272
2360
|
// src/components/Drawer/Header.tsx
|
|
2273
|
-
var import_icons7,
|
|
2361
|
+
var import_icons7, import_jsx_runtime26, Header;
|
|
2274
2362
|
var init_Header = __esm({
|
|
2275
2363
|
"src/components/Drawer/Header.tsx"() {
|
|
2276
2364
|
"use strict";
|
|
@@ -2278,12 +2366,12 @@ var init_Header = __esm({
|
|
|
2278
2366
|
init_Button2();
|
|
2279
2367
|
init_Icon2();
|
|
2280
2368
|
init_useDrawer();
|
|
2281
|
-
|
|
2369
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2282
2370
|
Header = ({ ref, children, ...otherProps }) => {
|
|
2283
2371
|
const { onClose, closeLabel, headerId } = useDrawer();
|
|
2284
|
-
return /* @__PURE__ */ (0,
|
|
2285
|
-
/* @__PURE__ */ (0,
|
|
2286
|
-
/* @__PURE__ */ (0,
|
|
2372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("header", { ref, ...otherProps, className: "mobius-drawer__header", children: [
|
|
2373
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h2", { id: headerId, children }),
|
|
2374
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2287
2375
|
Button,
|
|
2288
2376
|
{
|
|
2289
2377
|
"aria-label": "Close",
|
|
@@ -2292,7 +2380,7 @@ var init_Header = __esm({
|
|
|
2292
2380
|
className: "mobius-drawer__close",
|
|
2293
2381
|
size: "sm",
|
|
2294
2382
|
children: [
|
|
2295
|
-
/* @__PURE__ */ (0,
|
|
2383
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { icon: import_icons7.cross }),
|
|
2296
2384
|
" ",
|
|
2297
2385
|
closeLabel
|
|
2298
2386
|
]
|
|
@@ -2321,17 +2409,17 @@ var init_Drawer2 = __esm({
|
|
|
2321
2409
|
});
|
|
2322
2410
|
|
|
2323
2411
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2324
|
-
var
|
|
2412
|
+
var import_react19, import_react_accessible_dropdown_menu_hook, import_dedupe20, import_DropdownMenu, import_jsx_runtime27, DropdownMenu;
|
|
2325
2413
|
var init_DropdownMenu = __esm({
|
|
2326
2414
|
"src/components/DropdownMenu/DropdownMenu.tsx"() {
|
|
2327
2415
|
"use strict";
|
|
2328
2416
|
"use client";
|
|
2329
|
-
|
|
2417
|
+
import_react19 = require("react");
|
|
2330
2418
|
import_react_accessible_dropdown_menu_hook = __toESM(require("react-accessible-dropdown-menu-hook"));
|
|
2331
|
-
|
|
2419
|
+
import_dedupe20 = __toESM(require("classnames/dedupe"));
|
|
2332
2420
|
init_Button2();
|
|
2333
2421
|
import_DropdownMenu = require("@simplybusiness/mobius/src/components/DropdownMenu/DropdownMenu.css");
|
|
2334
|
-
|
|
2422
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2335
2423
|
DropdownMenu = ({ ref, ...props }) => {
|
|
2336
2424
|
const {
|
|
2337
2425
|
elementType: Element = "nav",
|
|
@@ -2340,21 +2428,21 @@ var init_DropdownMenu = __esm({
|
|
|
2340
2428
|
children,
|
|
2341
2429
|
...otherProps
|
|
2342
2430
|
} = props;
|
|
2343
|
-
const [activeId, setActiveId] = (0,
|
|
2344
|
-
const numberOfItems =
|
|
2431
|
+
const [activeId, setActiveId] = (0, import_react19.useState)(null);
|
|
2432
|
+
const numberOfItems = import_react19.Children.count(children);
|
|
2345
2433
|
const {
|
|
2346
2434
|
buttonProps,
|
|
2347
2435
|
itemProps,
|
|
2348
2436
|
isOpen: open,
|
|
2349
2437
|
setIsOpen
|
|
2350
2438
|
} = (0, import_react_accessible_dropdown_menu_hook.default)(numberOfItems);
|
|
2351
|
-
const classes = (0,
|
|
2439
|
+
const classes = (0, import_dedupe20.default)(
|
|
2352
2440
|
"mobius",
|
|
2353
2441
|
"mobius-dropdown-menu",
|
|
2354
2442
|
otherProps.className
|
|
2355
2443
|
);
|
|
2356
|
-
const triggerClasses = (0,
|
|
2357
|
-
const listClasses = (0,
|
|
2444
|
+
const triggerClasses = (0, import_dedupe20.default)("mobius", "mobius-dropdown-menu__trigger");
|
|
2445
|
+
const listClasses = (0, import_dedupe20.default)("mobius", "mobius-dropdown-menu__list", {
|
|
2358
2446
|
"--is-open": open
|
|
2359
2447
|
});
|
|
2360
2448
|
const handleChildClick = ({ onClick }, index) => {
|
|
@@ -2364,16 +2452,16 @@ var init_DropdownMenu = __esm({
|
|
|
2364
2452
|
onClick();
|
|
2365
2453
|
}
|
|
2366
2454
|
};
|
|
2367
|
-
return /* @__PURE__ */ (0,
|
|
2368
|
-
trigger ? (0,
|
|
2455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Element, { ref, ...otherProps, className: classes, children: [
|
|
2456
|
+
trigger ? (0, import_react19.cloneElement)(trigger, {
|
|
2369
2457
|
className: triggerClasses,
|
|
2370
2458
|
open,
|
|
2371
2459
|
label,
|
|
2372
2460
|
...buttonProps
|
|
2373
|
-
}) : /* @__PURE__ */ (0,
|
|
2374
|
-
/* @__PURE__ */ (0,
|
|
2375
|
-
if ((0,
|
|
2376
|
-
return (0,
|
|
2461
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { className: triggerClasses, ...buttonProps, children: label }),
|
|
2462
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("ul", { className: listClasses, role: "menu", children: import_react19.Children.map(children, (child, index) => {
|
|
2463
|
+
if ((0, import_react19.isValidElement)(child)) {
|
|
2464
|
+
return (0, import_react19.cloneElement)(child, {
|
|
2377
2465
|
onClick: () => handleChildClick(child.props, index),
|
|
2378
2466
|
active: index === activeId,
|
|
2379
2467
|
...itemProps[index]
|
|
@@ -2388,13 +2476,13 @@ var init_DropdownMenu = __esm({
|
|
|
2388
2476
|
});
|
|
2389
2477
|
|
|
2390
2478
|
// src/components/DropdownMenu/Item.tsx
|
|
2391
|
-
var
|
|
2479
|
+
var import_react20, import_dedupe21, import_jsx_runtime28, Item;
|
|
2392
2480
|
var init_Item = __esm({
|
|
2393
2481
|
"src/components/DropdownMenu/Item.tsx"() {
|
|
2394
2482
|
"use strict";
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2483
|
+
import_react20 = require("react");
|
|
2484
|
+
import_dedupe21 = __toESM(require("classnames/dedupe"));
|
|
2485
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2398
2486
|
Item = ({ ref, ...props }) => {
|
|
2399
2487
|
const {
|
|
2400
2488
|
elementType: Element = "li",
|
|
@@ -2403,26 +2491,26 @@ var init_Item = __esm({
|
|
|
2403
2491
|
children,
|
|
2404
2492
|
...otherProps
|
|
2405
2493
|
} = props;
|
|
2406
|
-
const classes = (0,
|
|
2494
|
+
const classes = (0, import_dedupe21.default)(
|
|
2407
2495
|
"mobius",
|
|
2408
2496
|
"mobius-dropdown-menu__item",
|
|
2409
2497
|
{ "--is-active": active },
|
|
2410
2498
|
otherProps.className
|
|
2411
2499
|
);
|
|
2412
|
-
return /* @__PURE__ */ (0,
|
|
2413
|
-
if ((0,
|
|
2414
|
-
const childClasses = (0,
|
|
2500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Element, { ref, onClick, ...otherProps, children: import_react20.Children.map(children, (child) => {
|
|
2501
|
+
if ((0, import_react20.isValidElement)(child)) {
|
|
2502
|
+
const childClasses = (0, import_dedupe21.default)(
|
|
2415
2503
|
child.props.className,
|
|
2416
2504
|
classes
|
|
2417
2505
|
);
|
|
2418
|
-
return (0,
|
|
2506
|
+
return (0, import_react20.cloneElement)(
|
|
2419
2507
|
child,
|
|
2420
2508
|
{
|
|
2421
2509
|
className: childClasses
|
|
2422
2510
|
}
|
|
2423
2511
|
);
|
|
2424
2512
|
}
|
|
2425
|
-
return /* @__PURE__ */ (0,
|
|
2513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: classes, children: child });
|
|
2426
2514
|
}) });
|
|
2427
2515
|
};
|
|
2428
2516
|
Item.displayName = "DropdownMenu.Item";
|
|
@@ -2447,23 +2535,23 @@ var init_DropdownMenu2 = __esm({
|
|
|
2447
2535
|
});
|
|
2448
2536
|
|
|
2449
2537
|
// src/components/Fieldset/Fieldset.tsx
|
|
2450
|
-
var
|
|
2538
|
+
var import_dedupe22, import_react21, import_Fieldset, import_jsx_runtime29, useFieldset, Fieldset;
|
|
2451
2539
|
var init_Fieldset = __esm({
|
|
2452
2540
|
"src/components/Fieldset/Fieldset.tsx"() {
|
|
2453
2541
|
"use strict";
|
|
2454
2542
|
"use client";
|
|
2455
|
-
|
|
2456
|
-
|
|
2543
|
+
import_dedupe22 = __toESM(require("classnames/dedupe"));
|
|
2544
|
+
import_react21 = require("react");
|
|
2457
2545
|
init_Flex2();
|
|
2458
2546
|
import_Fieldset = require("@simplybusiness/mobius/src/components/Fieldset/Fieldset.css");
|
|
2459
|
-
|
|
2547
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2460
2548
|
useFieldset = (props) => {
|
|
2461
2549
|
const { legend } = props;
|
|
2462
2550
|
let legendProps = {};
|
|
2463
2551
|
let containerProps = {
|
|
2464
2552
|
role: "group"
|
|
2465
2553
|
};
|
|
2466
|
-
const legendId = (0,
|
|
2554
|
+
const legendId = (0, import_react21.useId)();
|
|
2467
2555
|
if (legend) {
|
|
2468
2556
|
legendProps = {
|
|
2469
2557
|
...legendProps,
|
|
@@ -2483,14 +2571,14 @@ var init_Fieldset = __esm({
|
|
|
2483
2571
|
const {
|
|
2484
2572
|
children,
|
|
2485
2573
|
legend,
|
|
2486
|
-
legendComponent = /* @__PURE__ */ (0,
|
|
2574
|
+
legendComponent = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("legend", {}),
|
|
2487
2575
|
...otherProps
|
|
2488
2576
|
} = props;
|
|
2489
2577
|
const { legendProps, containerProps } = useFieldset(props);
|
|
2490
|
-
const classes = (0,
|
|
2578
|
+
const classes = (0, import_dedupe22.default)("mobius", "mobius-fieldset", props.className);
|
|
2491
2579
|
legendProps.className = "mobius-fieldset__legend";
|
|
2492
|
-
return /* @__PURE__ */ (0,
|
|
2493
|
-
legend && (0,
|
|
2580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Flex, { ...containerProps, ...otherProps, className: classes, children: [
|
|
2581
|
+
legend && (0, import_react21.cloneElement)(legendComponent, { ...legendProps }, [legend]),
|
|
2494
2582
|
children
|
|
2495
2583
|
] });
|
|
2496
2584
|
};
|
|
@@ -2507,13 +2595,13 @@ var init_Fieldset2 = __esm({
|
|
|
2507
2595
|
});
|
|
2508
2596
|
|
|
2509
2597
|
// src/components/Grid/Grid.tsx
|
|
2510
|
-
var
|
|
2598
|
+
var import_dedupe23, import_jsx_runtime30, Grid;
|
|
2511
2599
|
var init_Grid = __esm({
|
|
2512
2600
|
"src/components/Grid/Grid.tsx"() {
|
|
2513
2601
|
"use strict";
|
|
2514
|
-
|
|
2602
|
+
import_dedupe23 = __toESM(require("classnames/dedupe"));
|
|
2515
2603
|
init_utils();
|
|
2516
|
-
|
|
2604
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2517
2605
|
Grid = ({ ref: _ref, ...props }) => {
|
|
2518
2606
|
const {
|
|
2519
2607
|
columns = 12,
|
|
@@ -2528,7 +2616,7 @@ var init_Grid = __esm({
|
|
|
2528
2616
|
style,
|
|
2529
2617
|
...rest
|
|
2530
2618
|
} = props;
|
|
2531
|
-
const classes = (0,
|
|
2619
|
+
const classes = (0, import_dedupe23.default)("mobius", "mobius-grid", className);
|
|
2532
2620
|
const styles = filterUndefinedProps({
|
|
2533
2621
|
boxSizing: "border-box",
|
|
2534
2622
|
display: "grid",
|
|
@@ -2542,22 +2630,22 @@ var init_Grid = __esm({
|
|
|
2542
2630
|
justifyItems,
|
|
2543
2631
|
...style
|
|
2544
2632
|
});
|
|
2545
|
-
return /* @__PURE__ */ (0,
|
|
2633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style: styles, className: classes, ...rest });
|
|
2546
2634
|
};
|
|
2547
2635
|
Grid.displayName = "Grid";
|
|
2548
2636
|
}
|
|
2549
2637
|
});
|
|
2550
2638
|
|
|
2551
2639
|
// src/components/Grid/Item.tsx
|
|
2552
|
-
var
|
|
2640
|
+
var import_react22, import_dedupe24, import_jsx_runtime31, getBreakpointMap, DEFAULT_SPAN, GridItem;
|
|
2553
2641
|
var init_Item2 = __esm({
|
|
2554
2642
|
"src/components/Grid/Item.tsx"() {
|
|
2555
2643
|
"use strict";
|
|
2556
2644
|
"use client";
|
|
2557
|
-
|
|
2558
|
-
|
|
2645
|
+
import_react22 = require("react");
|
|
2646
|
+
import_dedupe24 = __toESM(require("classnames/dedupe"));
|
|
2559
2647
|
init_hooks();
|
|
2560
|
-
|
|
2648
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2561
2649
|
getBreakpointMap = (config) => Object.entries(config).reduce(
|
|
2562
2650
|
(prev, [key, value]) => {
|
|
2563
2651
|
const previous = Object.values(prev);
|
|
@@ -2592,9 +2680,9 @@ var init_Item2 = __esm({
|
|
|
2592
2680
|
xl,
|
|
2593
2681
|
xxl
|
|
2594
2682
|
});
|
|
2595
|
-
const [responsiveSpan, setResponsiveSpan] = (0,
|
|
2596
|
-
const classes = (0,
|
|
2597
|
-
(0,
|
|
2683
|
+
const [responsiveSpan, setResponsiveSpan] = (0, import_react22.useState)();
|
|
2684
|
+
const classes = (0, import_dedupe24.default)("mobius-grid__item", className);
|
|
2685
|
+
(0, import_react22.useEffect)(() => {
|
|
2598
2686
|
setResponsiveSpan(breakpointMap[breakpointSize]);
|
|
2599
2687
|
}, [breakpointSize, breakpointMap]);
|
|
2600
2688
|
const styles = {
|
|
@@ -2602,7 +2690,7 @@ var init_Item2 = __esm({
|
|
|
2602
2690
|
alignSelf,
|
|
2603
2691
|
justifySelf
|
|
2604
2692
|
};
|
|
2605
|
-
return /* @__PURE__ */ (0,
|
|
2693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { style: { ...styles }, className: classes, ...rest });
|
|
2606
2694
|
};
|
|
2607
2695
|
GridItem.displayName = "GridItem";
|
|
2608
2696
|
}
|
|
@@ -2623,20 +2711,20 @@ var init_Grid2 = __esm({
|
|
|
2623
2711
|
});
|
|
2624
2712
|
|
|
2625
2713
|
// src/components/Image/Image.tsx
|
|
2626
|
-
var
|
|
2714
|
+
var import_dedupe25, import_jsx_runtime32, Image;
|
|
2627
2715
|
var init_Image = __esm({
|
|
2628
2716
|
"src/components/Image/Image.tsx"() {
|
|
2629
2717
|
"use strict";
|
|
2630
|
-
|
|
2631
|
-
|
|
2718
|
+
import_dedupe25 = __toESM(require("classnames/dedupe"));
|
|
2719
|
+
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2632
2720
|
Image = ({
|
|
2633
2721
|
ref,
|
|
2634
2722
|
alt,
|
|
2635
2723
|
elementType: Component = "img",
|
|
2636
2724
|
...otherProps
|
|
2637
2725
|
}) => {
|
|
2638
|
-
const classes = (0,
|
|
2639
|
-
return /* @__PURE__ */ (0,
|
|
2726
|
+
const classes = (0, import_dedupe25.default)("mobius", "mobius-image", otherProps.className);
|
|
2727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Component, { alt, ref, ...otherProps, className: classes });
|
|
2640
2728
|
};
|
|
2641
2729
|
Image.displayName = "Image";
|
|
2642
2730
|
}
|
|
@@ -2651,13 +2739,13 @@ var init_Image2 = __esm({
|
|
|
2651
2739
|
});
|
|
2652
2740
|
|
|
2653
2741
|
// src/components/Link/Link.tsx
|
|
2654
|
-
var
|
|
2742
|
+
var import_dedupe26, import_Link, import_jsx_runtime33, Link;
|
|
2655
2743
|
var init_Link = __esm({
|
|
2656
2744
|
"src/components/Link/Link.tsx"() {
|
|
2657
2745
|
"use strict";
|
|
2658
|
-
|
|
2746
|
+
import_dedupe26 = __toESM(require("classnames/dedupe"));
|
|
2659
2747
|
import_Link = require("@simplybusiness/mobius/src/components/Link/Link.css");
|
|
2660
|
-
|
|
2748
|
+
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2661
2749
|
Link = ({ ref, ...props }) => {
|
|
2662
2750
|
const {
|
|
2663
2751
|
isDisabled = false,
|
|
@@ -2671,7 +2759,7 @@ var init_Link = __esm({
|
|
|
2671
2759
|
pointerEvents: "none"
|
|
2672
2760
|
};
|
|
2673
2761
|
const styles = { ...style, ...isDisabled && disabledStyles };
|
|
2674
|
-
const classes = (0,
|
|
2762
|
+
const classes = (0, import_dedupe26.default)(
|
|
2675
2763
|
"mobius",
|
|
2676
2764
|
"mobius-link",
|
|
2677
2765
|
className,
|
|
@@ -2680,7 +2768,7 @@ var init_Link = __esm({
|
|
|
2680
2768
|
"--is-disabled": isDisabled
|
|
2681
2769
|
}
|
|
2682
2770
|
);
|
|
2683
|
-
return /* @__PURE__ */ (0,
|
|
2771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2684
2772
|
Component,
|
|
2685
2773
|
{
|
|
2686
2774
|
ref,
|
|
@@ -2705,12 +2793,12 @@ var init_Link2 = __esm({
|
|
|
2705
2793
|
});
|
|
2706
2794
|
|
|
2707
2795
|
// src/components/LinkButton/LinkButton.tsx
|
|
2708
|
-
var
|
|
2796
|
+
var import_dedupe27, import_jsx_runtime34;
|
|
2709
2797
|
var init_LinkButton = __esm({
|
|
2710
2798
|
"src/components/LinkButton/LinkButton.tsx"() {
|
|
2711
2799
|
"use strict";
|
|
2712
|
-
|
|
2713
|
-
|
|
2800
|
+
import_dedupe27 = __toESM(require("classnames/dedupe"));
|
|
2801
|
+
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2714
2802
|
}
|
|
2715
2803
|
});
|
|
2716
2804
|
|
|
@@ -2723,14 +2811,14 @@ var init_LinkButton2 = __esm({
|
|
|
2723
2811
|
});
|
|
2724
2812
|
|
|
2725
2813
|
// src/components/List/List.tsx
|
|
2726
|
-
var
|
|
2814
|
+
var import_react23, import_dedupe28, import_List, import_jsx_runtime35, List;
|
|
2727
2815
|
var init_List = __esm({
|
|
2728
2816
|
"src/components/List/List.tsx"() {
|
|
2729
2817
|
"use strict";
|
|
2730
|
-
|
|
2731
|
-
|
|
2818
|
+
import_react23 = require("react");
|
|
2819
|
+
import_dedupe28 = __toESM(require("classnames/dedupe"));
|
|
2732
2820
|
import_List = require("@simplybusiness/mobius/src/components/List/List.css");
|
|
2733
|
-
|
|
2821
|
+
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2734
2822
|
List = ({ ref, ...props }) => {
|
|
2735
2823
|
const Component = props.isOrdered ? "ol" : "ul";
|
|
2736
2824
|
const { children, icon, ...otherProps } = props;
|
|
@@ -2739,7 +2827,7 @@ var init_List = __esm({
|
|
|
2739
2827
|
...restProps,
|
|
2740
2828
|
reversed: isReversed
|
|
2741
2829
|
};
|
|
2742
|
-
const classes = (0,
|
|
2830
|
+
const classes = (0, import_dedupe28.default)(
|
|
2743
2831
|
"mobius",
|
|
2744
2832
|
"mobius-list",
|
|
2745
2833
|
{
|
|
@@ -2748,9 +2836,9 @@ var init_List = __esm({
|
|
|
2748
2836
|
},
|
|
2749
2837
|
otherProps.className
|
|
2750
2838
|
);
|
|
2751
|
-
return /* @__PURE__ */ (0,
|
|
2752
|
-
if ((0,
|
|
2753
|
-
return (0,
|
|
2839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Component, { ref, ...mappedProps, className: classes, children: import_react23.Children.map(children, (child) => {
|
|
2840
|
+
if ((0, import_react23.isValidElement)(child)) {
|
|
2841
|
+
return (0, import_react23.cloneElement)(child, {
|
|
2754
2842
|
parentIcon: icon
|
|
2755
2843
|
});
|
|
2756
2844
|
}
|
|
@@ -2762,16 +2850,16 @@ var init_List = __esm({
|
|
|
2762
2850
|
});
|
|
2763
2851
|
|
|
2764
2852
|
// src/components/List/ListItem.tsx
|
|
2765
|
-
var
|
|
2853
|
+
var import_dedupe29, import_jsx_runtime36, ListItem;
|
|
2766
2854
|
var init_ListItem = __esm({
|
|
2767
2855
|
"src/components/List/ListItem.tsx"() {
|
|
2768
2856
|
"use strict";
|
|
2769
|
-
|
|
2770
|
-
|
|
2857
|
+
import_dedupe29 = __toESM(require("classnames/dedupe"));
|
|
2858
|
+
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2771
2859
|
ListItem = ({ ref, ...props }) => {
|
|
2772
2860
|
const { parentIcon, icon, children, ...otherProps } = props;
|
|
2773
2861
|
const iconContent = icon || parentIcon;
|
|
2774
|
-
const classes = (0,
|
|
2862
|
+
const classes = (0, import_dedupe29.default)(
|
|
2775
2863
|
"mobius",
|
|
2776
2864
|
"mobius-list__item",
|
|
2777
2865
|
{
|
|
@@ -2779,15 +2867,15 @@ var init_ListItem = __esm({
|
|
|
2779
2867
|
},
|
|
2780
2868
|
props.className
|
|
2781
2869
|
);
|
|
2782
|
-
const contentClasses = (0,
|
|
2783
|
-
const iconClasses = (0,
|
|
2870
|
+
const contentClasses = (0, import_dedupe29.default)("mobius", "mobius-list__item-content");
|
|
2871
|
+
const iconClasses = (0, import_dedupe29.default)("mobius", "mobius-list__icon");
|
|
2784
2872
|
if (iconContent) {
|
|
2785
|
-
return /* @__PURE__ */ (0,
|
|
2786
|
-
/* @__PURE__ */ (0,
|
|
2873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("li", { ref, ...otherProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: contentClasses, children: [
|
|
2874
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: iconClasses, children: iconContent }),
|
|
2787
2875
|
children
|
|
2788
2876
|
] }) });
|
|
2789
2877
|
}
|
|
2790
|
-
return /* @__PURE__ */ (0,
|
|
2878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("li", { ref, ...otherProps, className: classes, children });
|
|
2791
2879
|
};
|
|
2792
2880
|
ListItem.displayName = "ListItem";
|
|
2793
2881
|
}
|
|
@@ -2803,23 +2891,23 @@ var init_List2 = __esm({
|
|
|
2803
2891
|
});
|
|
2804
2892
|
|
|
2805
2893
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
2806
|
-
var
|
|
2894
|
+
var import_dedupe30, import_icons8, import_LoadingIndicator, import_jsx_runtime37, LoadingIndicator;
|
|
2807
2895
|
var init_LoadingIndicator = __esm({
|
|
2808
2896
|
"src/components/LoadingIndicator/LoadingIndicator.tsx"() {
|
|
2809
2897
|
"use strict";
|
|
2810
|
-
|
|
2898
|
+
import_dedupe30 = __toESM(require("classnames/dedupe"));
|
|
2811
2899
|
import_icons8 = require("@simplybusiness/icons");
|
|
2812
2900
|
init_Icon2();
|
|
2813
2901
|
import_LoadingIndicator = require("@simplybusiness/mobius/src/components/LoadingIndicator/LoadingIndicator.css");
|
|
2814
|
-
|
|
2902
|
+
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2815
2903
|
LoadingIndicator = ({ ref, ...props }) => {
|
|
2816
2904
|
const { icon = import_icons8.loading, ...otherProps } = props;
|
|
2817
|
-
const classes = (0,
|
|
2905
|
+
const classes = (0, import_dedupe30.default)(
|
|
2818
2906
|
"mobius",
|
|
2819
2907
|
"mobius-loading-indicator",
|
|
2820
2908
|
otherProps.className
|
|
2821
2909
|
);
|
|
2822
|
-
return /* @__PURE__ */ (0,
|
|
2910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { icon, spin: true, ref, ...otherProps, className: classes });
|
|
2823
2911
|
};
|
|
2824
2912
|
LoadingIndicator.displayName = "LoadingIndicator";
|
|
2825
2913
|
}
|
|
@@ -2834,16 +2922,16 @@ var init_LoadingIndicator2 = __esm({
|
|
|
2834
2922
|
});
|
|
2835
2923
|
|
|
2836
2924
|
// src/components/Logo/Logo.tsx
|
|
2837
|
-
var
|
|
2925
|
+
var import_dedupe31, import_jsx_runtime38, Logo;
|
|
2838
2926
|
var init_Logo = __esm({
|
|
2839
2927
|
"src/components/Logo/Logo.tsx"() {
|
|
2840
2928
|
"use strict";
|
|
2841
|
-
|
|
2842
|
-
|
|
2929
|
+
import_dedupe31 = __toESM(require("classnames/dedupe"));
|
|
2930
|
+
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2843
2931
|
Logo = ({ ref, ...props }) => {
|
|
2844
2932
|
const { className, width, height, ...otherProps } = props;
|
|
2845
|
-
const classes = (0,
|
|
2846
|
-
return /* @__PURE__ */ (0,
|
|
2933
|
+
const classes = (0, import_dedupe31.default)("mobius", "mobius-logo", className);
|
|
2934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
2847
2935
|
"svg",
|
|
2848
2936
|
{
|
|
2849
2937
|
width,
|
|
@@ -2853,7 +2941,7 @@ var init_Logo = __esm({
|
|
|
2853
2941
|
viewBox: "0 0 144 37",
|
|
2854
2942
|
...otherProps,
|
|
2855
2943
|
children: [
|
|
2856
|
-
/* @__PURE__ */ (0,
|
|
2944
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
2857
2945
|
"linearGradient",
|
|
2858
2946
|
{
|
|
2859
2947
|
id: "logo-gradient",
|
|
@@ -2862,27 +2950,27 @@ var init_Logo = __esm({
|
|
|
2862
2950
|
y1: "76.042%",
|
|
2863
2951
|
y2: "26.973%",
|
|
2864
2952
|
children: [
|
|
2865
|
-
/* @__PURE__ */ (0,
|
|
2866
|
-
/* @__PURE__ */ (0,
|
|
2953
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("stop", { stopColor: "#4632D8", offset: "0%" }),
|
|
2954
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("stop", { stopColor: "#9084E8", offset: "100%" })
|
|
2867
2955
|
]
|
|
2868
2956
|
}
|
|
2869
2957
|
) }),
|
|
2870
|
-
/* @__PURE__ */ (0,
|
|
2871
|
-
/* @__PURE__ */ (0,
|
|
2958
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("g", { children: [
|
|
2959
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2872
2960
|
"path",
|
|
2873
2961
|
{
|
|
2874
2962
|
fill: "#0E0A2B",
|
|
2875
2963
|
d: "M68.788 11.307c0-2.486-2.027-3.345-3.833-4.1-1.332-.562-2.471-1.036-2.471-2.072 0-.873.77-1.42 1.968-1.42 1.051 0 1.806.444 2.294.725.193.103.474.222.755.133.192-.06.34-.207.459-.444l.34-.621c.266-.474.163-.888-.281-1.2-.533-.384-1.88-1.05-3.537-1.05-2.738 0-4.647 1.643-4.647 4.01 0 2.413 2.012 3.301 3.788 4.07 1.347.593 2.516 1.096 2.516 2.161 0 .873-.754 1.45-1.924 1.45-1.287 0-2.22-.65-2.678-.961l-.03-.015c-.533-.296-.903-.237-1.228.192l-.415.607c-.444.607-.148.992.134 1.228.828.637 2.427 1.392 4.203 1.392 2.708 0 4.587-1.673 4.587-4.085zm4.44 2.975V6.186c0-.577-.31-.888-.873-.888h-.843c-.563 0-.874.311-.874.888v8.096c0 .577.296.888.874.888h.843c.563 0 .873-.311.873-.888zM71.482 4.203h.755c.518 0 .814-.281.814-.8v-.517c0-.518-.296-.814-.814-.814h-.755c-.518 0-.8.281-.8.814v.518c.016.518.297.8.8.8zM92.645 24.48h.755c.518 0 .814-.282.814-.8v-.518c0-.518-.296-.814-.814-.814h-.755c-.518 0-.799.282-.799.814v.518c0 .518.281.8.8.8zm-6.26-19.42c-1.539 0-2.397.962-2.945 1.895-.444-1.243-1.435-1.895-2.871-1.895-1.362 0-2.146.888-2.723 1.806v-.68c0-.578-.311-.889-.873-.889h-.74c-.563 0-.873.311-.873.888v8.096c0 .577.295.888.873.888h.843c.577 0 .873-.311.873-.888V10.73c0-2.25.888-3.271 2.058-3.271 1.006 0 1.198.71 1.198 1.85v4.987c0 .578.311.888.888.888h.844c.577 0 .873-.31.873-.888v-3.551c0-2.25.873-3.271 2.013-3.271 1.036 0 1.243.74 1.243 1.85v4.987c0 .577.31.888.888.888h.814c.577 0 .888-.31.888-.888V8.835c0-2.5-1.095-3.774-3.27-3.774zm10.804 10.33c2.679 0 4.558-2.13 4.558-5.164 0-3.094-1.776-5.166-4.425-5.166-1.761 0-2.708 1.036-3.049 1.51v-.533c0-.459-.34-.755-.873-.755h-.607c-.562 0-.888.326-.888.888v11.9c0 .576.311.887.888.887h.814c.578 0 .888-.31.888-.888v-3.404c0-.207-.014-.4-.014-.532.325.429 1.184 1.258 2.708 1.258zm-2.768-5.105c0-1.362.622-2.975 2.368-2.975 1.377 0 2.309 1.184 2.309 2.945 0 1.746-.947 2.916-2.338 2.916-1.54 0-2.339-1.45-2.339-2.886zm12.965 4.07v-.652c0-.444-.252-.725-.681-.784-.34-.03-.68-.192-.68-1.066v-9.47c0-.563-.326-.888-.874-.888h-.843c-.563 0-.874.31-.874.888v9.679c0 1.258.34 2.16 1.021 2.678.637.489 1.466.533 2.013.533.607 0 .918-.325.918-.917zm9.457-9.073h-.962c-.518 0-.844.237-.977.726l-1.717 4.972c-.089.311-.192.71-.251.977-.074-.281-.193-.71-.296-1.021l-1.835-4.943c-.163-.489-.489-.71-.977-.71h-1.036c-.415 0-.622.162-.71.295-.09.134-.163.385.014.755l3.685 8.57-.34.813c-.252.592-.77 1.229-1.45 1.229-.267 0-.474-.09-.652-.163h-.014c-.43-.104-.755.074-.962.488l-.163.415c-.119.251-.148.517-.06.725.075.192.237.34.474.429.326.118.814.296 1.391.296 1.628 0 2.975-.977 3.597-2.605l3.996-10.226c.103-.296.088-.563-.045-.755-.163-.163-.4-.267-.71-.267zM67.634 28.297c.977-.592 1.54-1.658 1.54-2.886 0-2.176-1.688-3.567-4.293-3.567h-4.04c-.562 0-.873.311-.873.888v11.899c0 .577.296.888.873.888h4.1c1.346 0 2.5-.34 3.33-.962.932-.71 1.42-1.761 1.42-3.049.03-1.524-.784-2.767-2.057-3.211zm-5.017-.962v-3.212h2.25c1.02 0 1.628.592 1.628 1.584 0 .991-.607 1.643-1.57 1.643h-2.308v-.015zm4.396 4.01c0 1.155-.71 1.865-1.865 1.865h-2.53v-3.714h2.53c1.14.014 1.865.74 1.865 1.85zm12.638-5.712h-.814c-.577 0-.888.31-.888.888v3.655c0 2.176-1.361 3.182-2.634 3.182-1.006 0-1.406-.547-1.406-1.88v-4.942c0-.578-.31-.888-.888-.888h-.814c-.562 0-.888.325-.888.888v5.431c0 2.516 1.17 3.774 3.463 3.774a3.937 3.937 0 003.286-1.761v.651c0 .577.296.888.873.888h.74c.577 0 .888-.31.888-.888v-8.095c-.03-.578-.355-.903-.918-.903zm6.956 3.937c-.917-.311-1.702-.592-1.702-1.184 0-.74.77-.859 1.229-.859.784 0 1.406.281 1.805.474.548.237.947.118 1.184-.34l.193-.341c.251-.518.133-.947-.326-1.184-.326-.178-1.288-.71-2.753-.71-2.279 0-3.803 1.213-3.803 3.004 0 2.042 1.731 2.65 3.137 3.138.903.325 1.687.592 1.687 1.169 0 .547-.488.902-1.258.902-.917 0-1.613-.37-2.057-.621l-.059-.03c-.533-.28-.903-.207-1.213.222l-.222.34c-.178.252-.237.504-.178.726.044.207.192.37.4.488a5.774 5.774 0 003.285 1.007c2.235 0 3.789-1.273 3.789-3.079-.03-2.042-1.761-2.649-3.138-3.122zm6.897-3.937h-.844c-.562 0-.873.31-.873.888v8.095c0 .577.296.888.873.888h.844c.577 0 .873-.31.873-.888v-8.095c0-.563-.31-.888-.873-.888zm9.324-.237c-1.924 0-2.93 1.154-3.36 1.806v-.681c0-.577-.31-.888-.873-.888h-.74c-.563 0-.873.31-.873.888v8.095c0 .577.296.888.873.888h.843c.578 0 .874-.31.874-.888v-3.744c0-1.79 1.14-3.078 2.708-3.078 1.021 0 1.436.547 1.436 1.88v4.942c0 .577.31.888.887.888h.814c.578 0 .888-.31.888-.888v-5.431c0-2.516-1.169-3.789-3.477-3.789zm10.448 0c-2.96 0-5.032 2.131-5.032 5.165 0 2.99 2.235 5.165 5.313 5.165 1.48 0 2.635-.533 3.345-.977.444-.266.562-.695.296-1.198l-.222-.385c-.266-.459-.651-.563-1.184-.31h-.015a3.885 3.885 0 01-2.042.606c-1.54 0-2.634-.962-2.812-2.472h5.816a.935.935 0 00.933-.917c.014-2.827-1.717-4.677-4.396-4.677zm-.044 2.013c1.065 0 1.79.77 1.864 1.968h-4.1c.253-1.213 1.096-1.968 2.236-1.968zm10.152 2.16c-.917-.31-1.702-.591-1.702-1.183 0-.74.77-.859 1.229-.859.784 0 1.406.281 1.805.474.548.237.947.118 1.184-.34l.192-.341c.252-.518.134-.947-.325-1.184-.326-.178-1.288-.71-2.753-.71-2.279 0-3.803 1.213-3.803 3.004 0 2.042 1.731 2.65 3.137 3.138.903.325 1.687.592 1.687 1.169 0 .547-.488.902-1.258.902-.917 0-1.613-.37-2.057-.621l-.059-.03c-.533-.28-.903-.207-1.214.222l-.222.34c-.177.252-.236.504-.177.726.044.207.192.37.4.488a5.774 5.774 0 003.285 1.007c2.235 0 3.789-1.273 3.789-3.079-.015-2.042-1.747-2.649-3.138-3.122zm8.791 0c-.917-.31-1.702-.591-1.702-1.183 0-.74.77-.859 1.229-.859.784 0 1.406.281 1.805.474.548.237.947.118 1.184-.34l.192-.341c.252-.518.134-.947-.325-1.184-.326-.178-1.288-.71-2.753-.71-2.279 0-3.803 1.213-3.803 3.004 0 2.042 1.731 2.65 3.137 3.138.903.325 1.687.592 1.687 1.169 0 .547-.488.902-1.258.902-.917 0-1.613-.37-2.057-.621l-.059-.03c-.533-.28-.903-.207-1.214.222l-.222.34c-.177.252-.236.504-.177.726.044.207.192.37.4.488a5.774 5.774 0 003.285 1.007c2.235 0 3.789-1.273 3.789-3.079-.015-2.042-1.747-2.649-3.138-3.122z"
|
|
2876
2964
|
}
|
|
2877
2965
|
),
|
|
2878
|
-
/* @__PURE__ */ (0,
|
|
2966
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2879
2967
|
"path",
|
|
2880
2968
|
{
|
|
2881
2969
|
fill: "url(#logo-gradient)",
|
|
2882
2970
|
d: "M22.747 22.288c.607 1.214.918 2.59.918 4.144 0 1.45-.267 2.827-.8 4.1a10.018 10.018 0 01-2.279 3.36c-.991.961-2.235 1.73-3.744 2.278-1.51.563-3.167.829-4.988.829-2.264 0-4.35-.385-6.29-1.14-1.938-.77-3.492-1.598-4.676-2.5-.31-.252-.548-.504-.696-.77a1.332 1.332 0 01-.177-.71.718.718 0 010-.252c.03-.37.207-.785.547-1.199l1.14-1.598c.4-.548.829-.844 1.288-.918a.896.896 0 01.222-.03c.4 0 .873.163 1.39.474 2.487 1.776 4.914 2.679 7.252 2.679 1.643 0 2.96-.385 3.922-1.14.962-.755 1.45-1.746 1.45-2.96 0-.725-.192-1.39-.562-1.983a5.347 5.347 0 00-1.539-1.569 18.207 18.207 0 00-2.235-1.287 56.102 56.102 0 00-2.649-1.214c-.917-.4-1.835-.814-2.752-1.258a19.282 19.282 0 01-2.62-1.539 14.014 14.014 0 01-2.22-1.924c-.666-.695-1.169-1.539-1.554-2.545-.37-.992-.562-2.087-.562-3.271 0-2.042.533-3.863 1.598-5.446 1.066-1.584 2.516-2.797 4.336-3.641C8.303.414 10.345 0 12.624 0c1.91 0 3.685.281 5.358.844 1.657.562 2.96 1.198 3.892 1.88.68.473 1.006 1.035 1.006 1.671 0 .385-.118.785-.37 1.2l-.917 1.657c-.385.74-.903 1.11-1.554 1.11-.4 0-.83-.133-1.318-.4a42.421 42.421 0 00-1.687-.947c-.473-.237-1.14-.488-1.998-.71a9.458 9.458 0 00-2.56-.356c-1.672 0-3.004.37-3.981 1.11-.992.74-1.48 1.717-1.48 2.946 0 .902.31 1.701.932 2.412.622.695 1.421 1.302 2.398 1.79.977.489 2.057.977 3.256 1.466a54.048 54.048 0 013.552 1.628 20.795 20.795 0 013.24 2.042c.948.755 1.732 1.732 2.354 2.945zm31.257 2.945c0 3.197-1.155 6.083-3.256 8.14-2.265 2.205-5.506 3.36-9.368 3.36H30.71c-2.443 0-4.278-1.836-4.278-4.278V4.53c0-1.2.43-2.28 1.214-3.064C28.43.681 29.51.252 30.709.252h9.013c3.419 0 6.32 1.095 8.377 3.182 1.909 1.923 2.945 4.558 2.945 7.429 0 2.294-.622 4.203-1.91 5.816 1.377.77 2.487 1.776 3.286 2.99 1.066 1.583 1.584 3.448 1.584 5.564zm-12.106-7.68c.044-.03 4.913-3.02 4.913-6.675 0-1.761-.607-3.345-1.717-4.455-1.568-1.584-3.788-1.924-5.372-1.924H30.68v28h10.7c2.738 0 4.958-.754 6.408-2.16 1.273-1.243 1.983-3.049 1.983-5.106 0-1.272-.296-2.353-.858-3.196v-.03c-1.362-2.353-6.838-3.774-6.897-3.789l-.844-.222.726-.444z"
|
|
2883
2971
|
}
|
|
2884
2972
|
),
|
|
2885
|
-
/* @__PURE__ */ (0,
|
|
2973
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2886
2974
|
"path",
|
|
2887
2975
|
{
|
|
2888
2976
|
fill: "#0E0A2B",
|
|
@@ -2907,23 +2995,23 @@ var init_Logo2 = __esm({
|
|
|
2907
2995
|
});
|
|
2908
2996
|
|
|
2909
2997
|
// src/components/Modal/Content.tsx
|
|
2910
|
-
var
|
|
2998
|
+
var import_jsx_runtime39, Content2;
|
|
2911
2999
|
var init_Content2 = __esm({
|
|
2912
3000
|
"src/components/Modal/Content.tsx"() {
|
|
2913
3001
|
"use strict";
|
|
2914
|
-
|
|
2915
|
-
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
3002
|
+
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3003
|
+
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ref, ...otherProps, className: "mobius-modal__content", children });
|
|
2916
3004
|
Content2.displayName = "Content";
|
|
2917
3005
|
}
|
|
2918
3006
|
});
|
|
2919
3007
|
|
|
2920
3008
|
// src/components/Modal/ModalContext.tsx
|
|
2921
|
-
var
|
|
3009
|
+
var import_react24, ModalContext;
|
|
2922
3010
|
var init_ModalContext = __esm({
|
|
2923
3011
|
"src/components/Modal/ModalContext.tsx"() {
|
|
2924
3012
|
"use strict";
|
|
2925
|
-
|
|
2926
|
-
ModalContext = (0,
|
|
3013
|
+
import_react24 = require("react");
|
|
3014
|
+
ModalContext = (0, import_react24.createContext)({
|
|
2927
3015
|
onClose: () => {
|
|
2928
3016
|
},
|
|
2929
3017
|
closeLabel: void 0
|
|
@@ -2932,21 +3020,21 @@ var init_ModalContext = __esm({
|
|
|
2932
3020
|
});
|
|
2933
3021
|
|
|
2934
3022
|
// src/components/Modal/useModal.ts
|
|
2935
|
-
var
|
|
3023
|
+
var import_react25, useModal;
|
|
2936
3024
|
var init_useModal = __esm({
|
|
2937
3025
|
"src/components/Modal/useModal.ts"() {
|
|
2938
3026
|
"use strict";
|
|
2939
|
-
|
|
3027
|
+
import_react25 = require("react");
|
|
2940
3028
|
init_ModalContext();
|
|
2941
3029
|
useModal = () => {
|
|
2942
|
-
const { onClose, closeLabel } = (0,
|
|
3030
|
+
const { onClose, closeLabel } = (0, import_react25.useContext)(ModalContext);
|
|
2943
3031
|
return { onClose, closeLabel };
|
|
2944
3032
|
};
|
|
2945
3033
|
}
|
|
2946
3034
|
});
|
|
2947
3035
|
|
|
2948
3036
|
// src/components/Modal/Header.tsx
|
|
2949
|
-
var import_icons9,
|
|
3037
|
+
var import_icons9, import_jsx_runtime40, Header2;
|
|
2950
3038
|
var init_Header2 = __esm({
|
|
2951
3039
|
"src/components/Modal/Header.tsx"() {
|
|
2952
3040
|
"use strict";
|
|
@@ -2954,12 +3042,12 @@ var init_Header2 = __esm({
|
|
|
2954
3042
|
init_Button2();
|
|
2955
3043
|
init_Icon2();
|
|
2956
3044
|
init_useModal();
|
|
2957
|
-
|
|
3045
|
+
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2958
3046
|
Header2 = ({ ref, children, ...otherProps }) => {
|
|
2959
3047
|
const { onClose, closeLabel } = useModal();
|
|
2960
|
-
return /* @__PURE__ */ (0,
|
|
3048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("header", { ref, ...otherProps, className: "mobius-modal__header", children: [
|
|
2961
3049
|
children,
|
|
2962
|
-
/* @__PURE__ */ (0,
|
|
3050
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2963
3051
|
Button,
|
|
2964
3052
|
{
|
|
2965
3053
|
"aria-label": "Close",
|
|
@@ -2967,7 +3055,7 @@ var init_Header2 = __esm({
|
|
|
2967
3055
|
onPress: onClose,
|
|
2968
3056
|
className: "mobius-modal__close",
|
|
2969
3057
|
children: [
|
|
2970
|
-
/* @__PURE__ */ (0,
|
|
3058
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { icon: import_icons9.cross }),
|
|
2971
3059
|
" ",
|
|
2972
3060
|
closeLabel
|
|
2973
3061
|
]
|
|
@@ -2980,19 +3068,19 @@ var init_Header2 = __esm({
|
|
|
2980
3068
|
});
|
|
2981
3069
|
|
|
2982
3070
|
// src/components/Modal/Modal.tsx
|
|
2983
|
-
var
|
|
3071
|
+
var import_dedupe32, import_react26, import_Modal, import_jsx_runtime41, TRANSITION_CSS_VARIABLE2, Modal;
|
|
2984
3072
|
var init_Modal = __esm({
|
|
2985
3073
|
"src/components/Modal/Modal.tsx"() {
|
|
2986
3074
|
"use strict";
|
|
2987
3075
|
"use client";
|
|
2988
|
-
|
|
2989
|
-
|
|
3076
|
+
import_dedupe32 = __toESM(require("classnames/dedupe"));
|
|
3077
|
+
import_react26 = require("react");
|
|
2990
3078
|
init_hooks();
|
|
2991
3079
|
init_utils();
|
|
2992
3080
|
init_polyfill_tests();
|
|
2993
3081
|
init_ModalContext();
|
|
2994
3082
|
import_Modal = require("@simplybusiness/mobius/src/components/Modal/Modal.css");
|
|
2995
|
-
|
|
3083
|
+
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2996
3084
|
TRANSITION_CSS_VARIABLE2 = "--modal-transition-duration";
|
|
2997
3085
|
Modal = ({ ref, ...props }) => {
|
|
2998
3086
|
const {
|
|
@@ -3006,11 +3094,11 @@ var init_Modal = __esm({
|
|
|
3006
3094
|
animation,
|
|
3007
3095
|
...rest
|
|
3008
3096
|
} = props;
|
|
3009
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
3010
|
-
(0,
|
|
3097
|
+
const [shouldTransition, setShouldTransition] = (0, import_react26.useState)(false);
|
|
3098
|
+
(0, import_react26.useEffect)(() => {
|
|
3011
3099
|
setShouldTransition(supportsDialog());
|
|
3012
3100
|
}, []);
|
|
3013
|
-
const dialogRef = (0,
|
|
3101
|
+
const dialogRef = (0, import_react26.useRef)(null);
|
|
3014
3102
|
const { close } = useDialog({
|
|
3015
3103
|
ref: dialogRef,
|
|
3016
3104
|
isOpen,
|
|
@@ -3021,7 +3109,7 @@ var init_Modal = __esm({
|
|
|
3021
3109
|
CSSVariable: TRANSITION_CSS_VARIABLE2
|
|
3022
3110
|
}
|
|
3023
3111
|
});
|
|
3024
|
-
const modalClasses = (0,
|
|
3112
|
+
const modalClasses = (0, import_dedupe32.default)(
|
|
3025
3113
|
"mobius",
|
|
3026
3114
|
"mobius-modal",
|
|
3027
3115
|
{
|
|
@@ -3034,21 +3122,21 @@ var init_Modal = __esm({
|
|
|
3034
3122
|
},
|
|
3035
3123
|
className
|
|
3036
3124
|
);
|
|
3037
|
-
const contextValue = (0,
|
|
3125
|
+
const contextValue = (0, import_react26.useMemo)(
|
|
3038
3126
|
() => ({
|
|
3039
3127
|
onClose: close,
|
|
3040
3128
|
closeLabel
|
|
3041
3129
|
}),
|
|
3042
3130
|
[close, closeLabel]
|
|
3043
3131
|
);
|
|
3044
|
-
return /* @__PURE__ */ (0,
|
|
3132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3045
3133
|
"dialog",
|
|
3046
3134
|
{
|
|
3047
3135
|
ref: mergeRefs([dialogRef, ref]),
|
|
3048
3136
|
onCancel: close,
|
|
3049
3137
|
className: modalClasses,
|
|
3050
3138
|
...rest,
|
|
3051
|
-
children: /* @__PURE__ */ (0,
|
|
3139
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ModalContext.Provider, { value: contextValue, children })
|
|
3052
3140
|
}
|
|
3053
3141
|
);
|
|
3054
3142
|
};
|
|
@@ -3073,16 +3161,16 @@ var init_Modal2 = __esm({
|
|
|
3073
3161
|
});
|
|
3074
3162
|
|
|
3075
3163
|
// src/components/NumberField/NumberField.tsx
|
|
3076
|
-
var
|
|
3164
|
+
var import_dedupe33, import_react27, import_NumberField, import_jsx_runtime42, NumberField;
|
|
3077
3165
|
var init_NumberField = __esm({
|
|
3078
3166
|
"src/components/NumberField/NumberField.tsx"() {
|
|
3079
3167
|
"use strict";
|
|
3080
3168
|
"use client";
|
|
3081
|
-
|
|
3082
|
-
|
|
3169
|
+
import_dedupe33 = __toESM(require("classnames/dedupe"));
|
|
3170
|
+
import_react27 = require("react");
|
|
3083
3171
|
init_TextField2();
|
|
3084
3172
|
import_NumberField = require("@simplybusiness/mobius/src/components/NumberField/NumberField.css");
|
|
3085
|
-
|
|
3173
|
+
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3086
3174
|
NumberField = ({ ref, ...props }) => {
|
|
3087
3175
|
const {
|
|
3088
3176
|
minValue,
|
|
@@ -3098,15 +3186,15 @@ var init_NumberField = __esm({
|
|
|
3098
3186
|
onBlur: customOnBlur,
|
|
3099
3187
|
...rest
|
|
3100
3188
|
} = otherProps;
|
|
3101
|
-
const focusedInputRef = (0,
|
|
3102
|
-
const wheelHandler = (0,
|
|
3103
|
-
(0,
|
|
3189
|
+
const focusedInputRef = (0, import_react27.useRef)(null);
|
|
3190
|
+
const wheelHandler = (0, import_react27.useCallback)((ev) => ev.preventDefault(), []);
|
|
3191
|
+
(0, import_react27.useEffect)(() => {
|
|
3104
3192
|
return () => {
|
|
3105
3193
|
focusedInputRef.current?.removeEventListener("wheel", wheelHandler);
|
|
3106
3194
|
focusedInputRef.current = null;
|
|
3107
3195
|
};
|
|
3108
3196
|
}, [wheelHandler]);
|
|
3109
|
-
const containerClasses = (0,
|
|
3197
|
+
const containerClasses = (0, import_dedupe33.default)("mobius-number-field", className, {
|
|
3110
3198
|
"--hide-spin-buttons": hideSpinButtons
|
|
3111
3199
|
});
|
|
3112
3200
|
const handleBeforeInput = (event) => {
|
|
@@ -3150,7 +3238,7 @@ var init_NumberField = __esm({
|
|
|
3150
3238
|
},
|
|
3151
3239
|
onBlur: (e) => handleBlur(e)
|
|
3152
3240
|
};
|
|
3153
|
-
return /* @__PURE__ */ (0,
|
|
3241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3154
3242
|
TextField,
|
|
3155
3243
|
{
|
|
3156
3244
|
...forwardedProps,
|
|
@@ -3178,18 +3266,18 @@ var init_NumberField2 = __esm({
|
|
|
3178
3266
|
});
|
|
3179
3267
|
|
|
3180
3268
|
// src/components/Option/Option.tsx
|
|
3181
|
-
var
|
|
3269
|
+
var import_jsx_runtime43, Option;
|
|
3182
3270
|
var init_Option = __esm({
|
|
3183
3271
|
"src/components/Option/Option.tsx"() {
|
|
3184
3272
|
"use strict";
|
|
3185
|
-
|
|
3273
|
+
import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3186
3274
|
Option = ({ ref, ...props }) => {
|
|
3187
3275
|
const { isDisabled, ...rest } = props;
|
|
3188
3276
|
const mappedProps = {
|
|
3189
3277
|
...rest,
|
|
3190
3278
|
disabled: isDisabled
|
|
3191
3279
|
};
|
|
3192
|
-
return /* @__PURE__ */ (0,
|
|
3280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("option", { ...mappedProps, ref });
|
|
3193
3281
|
};
|
|
3194
3282
|
Option.displayName = "Option";
|
|
3195
3283
|
}
|
|
@@ -3204,17 +3292,17 @@ var init_Option2 = __esm({
|
|
|
3204
3292
|
});
|
|
3205
3293
|
|
|
3206
3294
|
// src/components/PasswordField/ShowHideButton.tsx
|
|
3207
|
-
var import_icons10,
|
|
3295
|
+
var import_icons10, import_jsx_runtime44, ShowHideButton;
|
|
3208
3296
|
var init_ShowHideButton = __esm({
|
|
3209
3297
|
"src/components/PasswordField/ShowHideButton.tsx"() {
|
|
3210
3298
|
"use strict";
|
|
3211
3299
|
import_icons10 = require("@simplybusiness/icons");
|
|
3212
3300
|
init_src();
|
|
3213
|
-
|
|
3301
|
+
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3214
3302
|
ShowHideButton = ({
|
|
3215
3303
|
show = false,
|
|
3216
3304
|
onClick
|
|
3217
|
-
}) => /* @__PURE__ */ (0,
|
|
3305
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3218
3306
|
"button",
|
|
3219
3307
|
{
|
|
3220
3308
|
className: "mobius-password-field__show-button",
|
|
@@ -3225,35 +3313,35 @@ var init_ShowHideButton = __esm({
|
|
|
3225
3313
|
},
|
|
3226
3314
|
"aria-label": `${show ? "Hide" : "Show"} password`,
|
|
3227
3315
|
"data-testid": "show-hide-button",
|
|
3228
|
-
children: /* @__PURE__ */ (0,
|
|
3316
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { icon: show ? import_icons10.eyeSlash : import_icons10.eye, "aria-hidden": "true" })
|
|
3229
3317
|
}
|
|
3230
3318
|
);
|
|
3231
3319
|
}
|
|
3232
3320
|
});
|
|
3233
3321
|
|
|
3234
3322
|
// src/components/PasswordField/PasswordField.tsx
|
|
3235
|
-
var
|
|
3323
|
+
var import_dedupe34, import_react28, import_PasswordField, import_jsx_runtime45, PasswordField;
|
|
3236
3324
|
var init_PasswordField = __esm({
|
|
3237
3325
|
"src/components/PasswordField/PasswordField.tsx"() {
|
|
3238
3326
|
"use strict";
|
|
3239
3327
|
"use client";
|
|
3240
|
-
|
|
3241
|
-
|
|
3328
|
+
import_dedupe34 = __toESM(require("classnames/dedupe"));
|
|
3329
|
+
import_react28 = require("react");
|
|
3242
3330
|
init_mergeRefs();
|
|
3243
3331
|
init_TextField2();
|
|
3244
3332
|
init_ShowHideButton();
|
|
3245
3333
|
import_PasswordField = require("@simplybusiness/mobius/src/components/PasswordField/PasswordField.css");
|
|
3246
|
-
|
|
3334
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3247
3335
|
PasswordField = ({
|
|
3248
3336
|
ref,
|
|
3249
3337
|
className,
|
|
3250
3338
|
autoComplete = "current-password",
|
|
3251
3339
|
...props
|
|
3252
3340
|
}) => {
|
|
3253
|
-
const [show, setShow] = (0,
|
|
3341
|
+
const [show, setShow] = (0, import_react28.useState)(false);
|
|
3254
3342
|
const type = show ? "text" : "password";
|
|
3255
|
-
const classes = (0,
|
|
3256
|
-
const localRef = (0,
|
|
3343
|
+
const classes = (0, import_dedupe34.default)("mobius-password-field", className);
|
|
3344
|
+
const localRef = (0, import_react28.useRef)(null);
|
|
3257
3345
|
const handleShowHideButtonClick = () => {
|
|
3258
3346
|
const selectionStart = localRef.current?.selectionStart;
|
|
3259
3347
|
const selectionEnd = localRef.current?.selectionEnd;
|
|
@@ -3265,7 +3353,7 @@ var init_PasswordField = __esm({
|
|
|
3265
3353
|
}
|
|
3266
3354
|
});
|
|
3267
3355
|
};
|
|
3268
|
-
return /* @__PURE__ */ (0,
|
|
3356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3269
3357
|
TextField,
|
|
3270
3358
|
{
|
|
3271
3359
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -3273,7 +3361,7 @@ var init_PasswordField = __esm({
|
|
|
3273
3361
|
...props,
|
|
3274
3362
|
autoComplete,
|
|
3275
3363
|
type,
|
|
3276
|
-
suffixInside: /* @__PURE__ */ (0,
|
|
3364
|
+
suffixInside: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ShowHideButton, { onClick: handleShowHideButtonClick, show })
|
|
3277
3365
|
}
|
|
3278
3366
|
);
|
|
3279
3367
|
};
|
|
@@ -3290,17 +3378,17 @@ var init_PasswordField2 = __esm({
|
|
|
3290
3378
|
});
|
|
3291
3379
|
|
|
3292
3380
|
// src/components/Popover/Popover.tsx
|
|
3293
|
-
var
|
|
3381
|
+
var import_react29, import_icons11, import_dedupe35, import_react30, import_mobius_hooks4, import_Popover, import_jsx_runtime46;
|
|
3294
3382
|
var init_Popover = __esm({
|
|
3295
3383
|
"src/components/Popover/Popover.tsx"() {
|
|
3296
3384
|
"use strict";
|
|
3297
|
-
|
|
3385
|
+
import_react29 = require("@floating-ui/react");
|
|
3298
3386
|
import_icons11 = require("@simplybusiness/icons");
|
|
3299
|
-
|
|
3300
|
-
|
|
3387
|
+
import_dedupe35 = __toESM(require("classnames/dedupe"));
|
|
3388
|
+
import_react30 = require("react");
|
|
3301
3389
|
import_mobius_hooks4 = require("@simplybusiness/mobius-hooks");
|
|
3302
3390
|
import_Popover = require("@simplybusiness/mobius/src/components/Popover/Popover.css");
|
|
3303
|
-
|
|
3391
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3304
3392
|
}
|
|
3305
3393
|
});
|
|
3306
3394
|
|
|
@@ -3324,17 +3412,17 @@ function warnAboutInvalidValues(value, minValue, maxValue) {
|
|
|
3324
3412
|
console.warn("Progress value is greater than maxValue");
|
|
3325
3413
|
}
|
|
3326
3414
|
}
|
|
3327
|
-
var
|
|
3415
|
+
var import_dedupe36, import_react31, import_Progress, import_jsx_runtime47, sanitizedValue, getLabelComponent, DEFAULT_VALUE, DEFAULT_MIN_VALUE, DEFAULT_MAX_VALUE, Progress;
|
|
3328
3416
|
var init_Progress = __esm({
|
|
3329
3417
|
"src/components/Progress/Progress.tsx"() {
|
|
3330
3418
|
"use strict";
|
|
3331
3419
|
"use client";
|
|
3332
|
-
|
|
3333
|
-
|
|
3420
|
+
import_dedupe36 = __toESM(require("classnames/dedupe"));
|
|
3421
|
+
import_react31 = require("react");
|
|
3334
3422
|
init_Label2();
|
|
3335
3423
|
init_VisuallyHidden2();
|
|
3336
3424
|
import_Progress = require("@simplybusiness/mobius/src/components/Progress/Progress.css");
|
|
3337
|
-
|
|
3425
|
+
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3338
3426
|
sanitizedValue = (value, defaultValue) => {
|
|
3339
3427
|
if (value === void 0 || Number.isNaN(value)) {
|
|
3340
3428
|
return defaultValue;
|
|
@@ -3343,7 +3431,7 @@ var init_Progress = __esm({
|
|
|
3343
3431
|
};
|
|
3344
3432
|
getLabelComponent = (label, progressLabelId, showLabel) => {
|
|
3345
3433
|
if (showLabel) {
|
|
3346
|
-
return /* @__PURE__ */ (0,
|
|
3434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3347
3435
|
Label,
|
|
3348
3436
|
{
|
|
3349
3437
|
id: progressLabelId,
|
|
@@ -3353,7 +3441,7 @@ var init_Progress = __esm({
|
|
|
3353
3441
|
}
|
|
3354
3442
|
);
|
|
3355
3443
|
}
|
|
3356
|
-
return /* @__PURE__ */ (0,
|
|
3444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3357
3445
|
Label,
|
|
3358
3446
|
{
|
|
3359
3447
|
id: progressLabelId,
|
|
@@ -3367,8 +3455,8 @@ var init_Progress = __esm({
|
|
|
3367
3455
|
DEFAULT_MIN_VALUE = 0;
|
|
3368
3456
|
DEFAULT_MAX_VALUE = 100;
|
|
3369
3457
|
Progress = ({ ref, ...props }) => {
|
|
3370
|
-
const progressId = (0,
|
|
3371
|
-
const progressLabelId = (0,
|
|
3458
|
+
const progressId = (0, import_react31.useId)();
|
|
3459
|
+
const progressLabelId = (0, import_react31.useId)();
|
|
3372
3460
|
const {
|
|
3373
3461
|
id,
|
|
3374
3462
|
label,
|
|
@@ -3393,7 +3481,7 @@ var init_Progress = __esm({
|
|
|
3393
3481
|
100
|
|
3394
3482
|
);
|
|
3395
3483
|
const barWidth = `${percentage}%`;
|
|
3396
|
-
const classes = (0,
|
|
3484
|
+
const classes = (0, import_dedupe36.default)("mobius", "mobius-progress", className, {
|
|
3397
3485
|
"--is-primary": variant === "primary",
|
|
3398
3486
|
"--is-secondary": variant === "secondary"
|
|
3399
3487
|
});
|
|
@@ -3403,7 +3491,7 @@ var init_Progress = __esm({
|
|
|
3403
3491
|
progressBarProps["aria-valuenow"] = value.toString();
|
|
3404
3492
|
progressBarProps["aria-valuetext"] = valueFormatter instanceof Function ? valueFormatter(value, minValue, maxValue) : barWidth;
|
|
3405
3493
|
const labelComponent = getLabelComponent(label, progressLabelId, showLabel);
|
|
3406
|
-
return /* @__PURE__ */ (0,
|
|
3494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
3407
3495
|
"div",
|
|
3408
3496
|
{
|
|
3409
3497
|
id: id || progressId,
|
|
@@ -3414,8 +3502,8 @@ var init_Progress = __esm({
|
|
|
3414
3502
|
"aria-labelledby": progressLabelId,
|
|
3415
3503
|
children: [
|
|
3416
3504
|
labelComponent,
|
|
3417
|
-
/* @__PURE__ */ (0,
|
|
3418
|
-
showValueLabel && /* @__PURE__ */ (0,
|
|
3505
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "mobius-progress__track", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "mobius-progress__bar", style: { width: barWidth } }) }),
|
|
3506
|
+
showValueLabel && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Label, { "data-testid": "value-label", elementType: "span", children: progressBarProps["aria-valuetext"] })
|
|
3419
3507
|
]
|
|
3420
3508
|
}
|
|
3421
3509
|
);
|
|
@@ -3433,17 +3521,17 @@ var init_Progress2 = __esm({
|
|
|
3433
3521
|
});
|
|
3434
3522
|
|
|
3435
3523
|
// src/components/Radio/Radio.tsx
|
|
3436
|
-
var
|
|
3524
|
+
var import_dedupe37, import_react32, import_Radio, import_jsx_runtime48, Radio;
|
|
3437
3525
|
var init_Radio = __esm({
|
|
3438
3526
|
"src/components/Radio/Radio.tsx"() {
|
|
3439
3527
|
"use strict";
|
|
3440
3528
|
"use client";
|
|
3441
|
-
|
|
3442
|
-
|
|
3529
|
+
import_dedupe37 = __toESM(require("classnames/dedupe"));
|
|
3530
|
+
import_react32 = require("react");
|
|
3443
3531
|
init_ErrorMessage2();
|
|
3444
3532
|
init_Label2();
|
|
3445
3533
|
import_Radio = require("@simplybusiness/mobius/src/components/Radio/Radio.css");
|
|
3446
|
-
|
|
3534
|
+
import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3447
3535
|
Radio = ({ ref, ...props }) => {
|
|
3448
3536
|
const {
|
|
3449
3537
|
children,
|
|
@@ -3467,19 +3555,19 @@ var init_Radio = __esm({
|
|
|
3467
3555
|
const isMultiline = label && children;
|
|
3468
3556
|
const isControlled = selected !== void 0;
|
|
3469
3557
|
const isChecked = isControlled ? selected === value : defaultChecked;
|
|
3470
|
-
const contentRef = (0,
|
|
3471
|
-
const prevOverflowRef = (0,
|
|
3558
|
+
const contentRef = (0, import_react32.useRef)(null);
|
|
3559
|
+
const prevOverflowRef = (0, import_react32.useRef)({
|
|
3472
3560
|
vertical: false,
|
|
3473
3561
|
horizontal: false
|
|
3474
3562
|
});
|
|
3475
|
-
const hasIconFirst = (0,
|
|
3476
|
-
if (!children ||
|
|
3477
|
-
const firstChild =
|
|
3478
|
-
if (!(0,
|
|
3563
|
+
const hasIconFirst = (0, import_react32.useMemo)(() => {
|
|
3564
|
+
if (!children || import_react32.Children.count(children) === 0) return false;
|
|
3565
|
+
const firstChild = import_react32.Children.toArray(children)[0];
|
|
3566
|
+
if (!(0, import_react32.isValidElement)(firstChild)) return false;
|
|
3479
3567
|
const props2 = firstChild.props;
|
|
3480
3568
|
return "icon" in props2 && props2.icon !== void 0;
|
|
3481
3569
|
}, [children]);
|
|
3482
|
-
(0,
|
|
3570
|
+
(0, import_react32.useLayoutEffect)(() => {
|
|
3483
3571
|
if (!contentRef.current || !onOverflow) return;
|
|
3484
3572
|
if (orientation === "vertical") {
|
|
3485
3573
|
return;
|
|
@@ -3508,13 +3596,13 @@ var init_Radio = __esm({
|
|
|
3508
3596
|
"--is-multiline": !!isMultiline,
|
|
3509
3597
|
"--is-required": isRequired
|
|
3510
3598
|
};
|
|
3511
|
-
const containerClasses = (0,
|
|
3599
|
+
const containerClasses = (0, import_dedupe37.default)(
|
|
3512
3600
|
"mobius-radio__label",
|
|
3513
3601
|
radioClasses,
|
|
3514
3602
|
className,
|
|
3515
3603
|
{ "--has-icon-first": hasIconFirst }
|
|
3516
3604
|
);
|
|
3517
|
-
const inputClasses = (0,
|
|
3605
|
+
const inputClasses = (0, import_dedupe37.default)("mobius-radio__input", radioClasses);
|
|
3518
3606
|
const { "aria-describedby": _ariaDescribedBy, ...rest } = otherProps;
|
|
3519
3607
|
const handleChange = (event) => {
|
|
3520
3608
|
if (setSelected) {
|
|
@@ -3528,9 +3616,9 @@ var init_Radio = __esm({
|
|
|
3528
3616
|
onChange(adaptedEvent);
|
|
3529
3617
|
}
|
|
3530
3618
|
};
|
|
3531
|
-
return /* @__PURE__ */ (0,
|
|
3532
|
-
/* @__PURE__ */ (0,
|
|
3533
|
-
/* @__PURE__ */ (0,
|
|
3619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
3620
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Label, { className: containerClasses, children: [
|
|
3621
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3534
3622
|
"input",
|
|
3535
3623
|
{
|
|
3536
3624
|
"aria-describedby": otherProps["aria-describedby"],
|
|
@@ -3547,12 +3635,12 @@ var init_Radio = __esm({
|
|
|
3547
3635
|
...rest
|
|
3548
3636
|
}
|
|
3549
3637
|
),
|
|
3550
|
-
isMultiline ? /* @__PURE__ */ (0,
|
|
3551
|
-
/* @__PURE__ */ (0,
|
|
3552
|
-
/* @__PURE__ */ (0,
|
|
3553
|
-
] }) : /* @__PURE__ */ (0,
|
|
3638
|
+
isMultiline ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { ref: contentRef, className: "mobius-radio__content--multiline", children: [
|
|
3639
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "mobius-radio__content-first-line", children: label }),
|
|
3640
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "mobius-radio__extra-content", children })
|
|
3641
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { ref: contentRef, className: "mobius-radio__content", children: label || children })
|
|
3554
3642
|
] }),
|
|
3555
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
3643
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ErrorMessage, { errorMessage })
|
|
3556
3644
|
] });
|
|
3557
3645
|
};
|
|
3558
3646
|
Radio.displayName = "Radio";
|
|
@@ -3560,19 +3648,19 @@ var init_Radio = __esm({
|
|
|
3560
3648
|
});
|
|
3561
3649
|
|
|
3562
3650
|
// src/components/Radio/RadioGroup.tsx
|
|
3563
|
-
var
|
|
3651
|
+
var import_dedupe38, import_react33, import_jsx_runtime49, getDefaultVal, RadioGroup;
|
|
3564
3652
|
var init_RadioGroup = __esm({
|
|
3565
3653
|
"src/components/Radio/RadioGroup.tsx"() {
|
|
3566
3654
|
"use strict";
|
|
3567
3655
|
"use client";
|
|
3568
|
-
|
|
3569
|
-
|
|
3656
|
+
import_dedupe38 = __toESM(require("classnames/dedupe"));
|
|
3657
|
+
import_react33 = require("react");
|
|
3570
3658
|
init_hooks();
|
|
3571
3659
|
init_spaceDelimitedList();
|
|
3572
3660
|
init_ErrorMessage2();
|
|
3573
3661
|
init_Label2();
|
|
3574
3662
|
init_Stack2();
|
|
3575
|
-
|
|
3663
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3576
3664
|
getDefaultVal = (children, defaultValue) => {
|
|
3577
3665
|
if (Array.isArray(children) && defaultValue) {
|
|
3578
3666
|
const option = children?.find((item) => item.props.value === defaultValue);
|
|
@@ -3600,15 +3688,15 @@ var init_RadioGroup = __esm({
|
|
|
3600
3688
|
...rest
|
|
3601
3689
|
} = props;
|
|
3602
3690
|
const defaultSelected = getDefaultVal(children, value || defaultValue);
|
|
3603
|
-
const [selected, setSelected] = (0,
|
|
3604
|
-
const overflowsRef = (0,
|
|
3605
|
-
const [hasOverflow, setHasOverflow] = (0,
|
|
3606
|
-
(0,
|
|
3691
|
+
const [selected, setSelected] = (0, import_react33.useState)(defaultSelected);
|
|
3692
|
+
const overflowsRef = (0, import_react33.useRef)({});
|
|
3693
|
+
const [hasOverflow, setHasOverflow] = (0, import_react33.useState)(false);
|
|
3694
|
+
(0, import_react33.useEffect)(() => {
|
|
3607
3695
|
if (value !== void 0) {
|
|
3608
3696
|
setSelected(value);
|
|
3609
3697
|
}
|
|
3610
3698
|
}, [value]);
|
|
3611
|
-
const handleOverflow = (0,
|
|
3699
|
+
const handleOverflow = (0, import_react33.useCallback)(
|
|
3612
3700
|
(radioValue, overflow) => {
|
|
3613
3701
|
overflowsRef.current = {
|
|
3614
3702
|
...overflowsRef.current,
|
|
@@ -3632,26 +3720,26 @@ var init_RadioGroup = __esm({
|
|
|
3632
3720
|
[`--is-${effectiveOrientation}`]: true,
|
|
3633
3721
|
[className || ""]: true
|
|
3634
3722
|
};
|
|
3635
|
-
const radioGroupClasses = (0,
|
|
3723
|
+
const radioGroupClasses = (0, import_dedupe38.default)(
|
|
3636
3724
|
"mobius",
|
|
3637
3725
|
"mobius-radio-group",
|
|
3638
3726
|
radioClasses,
|
|
3639
3727
|
validationClasses
|
|
3640
3728
|
);
|
|
3641
|
-
const radioWrapperClasses = (0,
|
|
3729
|
+
const radioWrapperClasses = (0, import_dedupe38.default)("mobius-radio__wrapper", {
|
|
3642
3730
|
[`--is-${effectiveOrientation}`]: true
|
|
3643
3731
|
});
|
|
3644
|
-
const labelClasses = (0,
|
|
3645
|
-
const errorMessageId = (0,
|
|
3646
|
-
const defaultNameAttrId = (0,
|
|
3732
|
+
const labelClasses = (0, import_dedupe38.default)(radioClasses, validationClasses);
|
|
3733
|
+
const errorMessageId = (0, import_react33.useId)();
|
|
3734
|
+
const defaultNameAttrId = (0, import_react33.useId)();
|
|
3647
3735
|
const nameAttribute = name || defaultNameAttrId;
|
|
3648
3736
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
3649
3737
|
const describedBy = spaceDelimitedList([
|
|
3650
3738
|
shouldErrorMessageShow,
|
|
3651
3739
|
props["aria-describedby"]
|
|
3652
3740
|
]);
|
|
3653
|
-
const labelId = (0,
|
|
3654
|
-
return /* @__PURE__ */ (0,
|
|
3741
|
+
const labelId = (0, import_react33.useId)();
|
|
3742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3655
3743
|
"div",
|
|
3656
3744
|
{
|
|
3657
3745
|
...rest,
|
|
@@ -3667,12 +3755,12 @@ var init_RadioGroup = __esm({
|
|
|
3667
3755
|
ref,
|
|
3668
3756
|
className: radioGroupClasses,
|
|
3669
3757
|
role: "radiogroup",
|
|
3670
|
-
children: /* @__PURE__ */ (0,
|
|
3671
|
-
label && /* @__PURE__ */ (0,
|
|
3672
|
-
/* @__PURE__ */ (0,
|
|
3673
|
-
if ((0,
|
|
3758
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Stack, { gap: "xs", children: [
|
|
3759
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Label, { htmlFor: name, id: labelId, className: labelClasses, children: label }),
|
|
3760
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: radioWrapperClasses, children: import_react33.Children.map(children, (child) => {
|
|
3761
|
+
if ((0, import_react33.isValidElement)(child)) {
|
|
3674
3762
|
const childValue = child.props.value;
|
|
3675
|
-
return (0,
|
|
3763
|
+
return (0, import_react33.cloneElement)(
|
|
3676
3764
|
child,
|
|
3677
3765
|
{
|
|
3678
3766
|
orientation: effectiveOrientation,
|
|
@@ -3690,7 +3778,7 @@ var init_RadioGroup = __esm({
|
|
|
3690
3778
|
}
|
|
3691
3779
|
return child;
|
|
3692
3780
|
}) }),
|
|
3693
|
-
/* @__PURE__ */ (0,
|
|
3781
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
3694
3782
|
] })
|
|
3695
3783
|
}
|
|
3696
3784
|
);
|
|
@@ -3709,47 +3797,47 @@ var init_Radio2 = __esm({
|
|
|
3709
3797
|
});
|
|
3710
3798
|
|
|
3711
3799
|
// src/components/Segment/SegmentGroup.tsx
|
|
3712
|
-
var
|
|
3800
|
+
var import_dedupe39, import_jsx_runtime50, SegmentGroup;
|
|
3713
3801
|
var init_SegmentGroup = __esm({
|
|
3714
3802
|
"src/components/Segment/SegmentGroup.tsx"() {
|
|
3715
3803
|
"use strict";
|
|
3716
|
-
|
|
3717
|
-
|
|
3804
|
+
import_dedupe39 = __toESM(require("classnames/dedupe"));
|
|
3805
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3718
3806
|
SegmentGroup = (props) => {
|
|
3719
3807
|
const { children, horizontal, gap, className, ...rest } = props;
|
|
3720
3808
|
const gapClass = gap ? `gap-${gap}` : "";
|
|
3721
|
-
const classes = (0,
|
|
3809
|
+
const classes = (0, import_dedupe39.default)(
|
|
3722
3810
|
"mobius",
|
|
3723
3811
|
"mobius-segment-group",
|
|
3724
3812
|
className,
|
|
3725
3813
|
{ "--is-horizontal": horizontal },
|
|
3726
3814
|
gapClass
|
|
3727
3815
|
);
|
|
3728
|
-
return /* @__PURE__ */ (0,
|
|
3816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: classes, ...rest, children });
|
|
3729
3817
|
};
|
|
3730
3818
|
SegmentGroup.displayName = "SegmentGroup";
|
|
3731
3819
|
}
|
|
3732
3820
|
});
|
|
3733
3821
|
|
|
3734
3822
|
// src/components/Segment/Segment.tsx
|
|
3735
|
-
var
|
|
3823
|
+
var import_dedupe40, import_Segment, import_jsx_runtime51, Segment;
|
|
3736
3824
|
var init_Segment = __esm({
|
|
3737
3825
|
"src/components/Segment/Segment.tsx"() {
|
|
3738
3826
|
"use strict";
|
|
3739
|
-
|
|
3827
|
+
import_dedupe40 = __toESM(require("classnames/dedupe"));
|
|
3740
3828
|
import_Segment = require("@simplybusiness/mobius/src/components/Segment/Segment.css");
|
|
3741
|
-
|
|
3829
|
+
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3742
3830
|
Segment = (props) => {
|
|
3743
3831
|
const { heading, children, colour, inverted, className, ...rest } = props;
|
|
3744
|
-
const classes = (0,
|
|
3832
|
+
const classes = (0, import_dedupe40.default)(
|
|
3745
3833
|
"mobius",
|
|
3746
3834
|
"mobius-segment",
|
|
3747
3835
|
colour,
|
|
3748
3836
|
{ inverted },
|
|
3749
3837
|
className
|
|
3750
3838
|
);
|
|
3751
|
-
return /* @__PURE__ */ (0,
|
|
3752
|
-
heading && /* @__PURE__ */ (0,
|
|
3839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: classes, ...rest, children: [
|
|
3840
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mobius-segment__heading", children: heading }),
|
|
3753
3841
|
children
|
|
3754
3842
|
] });
|
|
3755
3843
|
};
|
|
@@ -3767,14 +3855,14 @@ var init_Segment2 = __esm({
|
|
|
3767
3855
|
});
|
|
3768
3856
|
|
|
3769
3857
|
// src/components/Select/Select.tsx
|
|
3770
|
-
var import_icons12,
|
|
3858
|
+
var import_icons12, import_dedupe41, import_react34, import_Select, import_jsx_runtime52, Select;
|
|
3771
3859
|
var init_Select = __esm({
|
|
3772
3860
|
"src/components/Select/Select.tsx"() {
|
|
3773
3861
|
"use strict";
|
|
3774
3862
|
"use client";
|
|
3775
3863
|
import_icons12 = require("@simplybusiness/icons");
|
|
3776
|
-
|
|
3777
|
-
|
|
3864
|
+
import_dedupe41 = __toESM(require("classnames/dedupe"));
|
|
3865
|
+
import_react34 = require("react");
|
|
3778
3866
|
init_hooks();
|
|
3779
3867
|
init_useLabel2();
|
|
3780
3868
|
init_spaceDelimitedList();
|
|
@@ -3783,7 +3871,7 @@ var init_Select = __esm({
|
|
|
3783
3871
|
init_Label2();
|
|
3784
3872
|
init_Stack2();
|
|
3785
3873
|
import_Select = require("@simplybusiness/mobius/src/components/Select/Select.css");
|
|
3786
|
-
|
|
3874
|
+
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3787
3875
|
Select = ({ ref, ...props }) => {
|
|
3788
3876
|
const {
|
|
3789
3877
|
label,
|
|
@@ -3804,24 +3892,24 @@ var init_Select = __esm({
|
|
|
3804
3892
|
"--is-required": typeof isRequired === "boolean" && isRequired,
|
|
3805
3893
|
"--is-optional": typeof isRequired === "boolean" && !isRequired
|
|
3806
3894
|
};
|
|
3807
|
-
const sharedClasses = (0,
|
|
3808
|
-
const wrapperClasses = (0,
|
|
3895
|
+
const sharedClasses = (0, import_dedupe41.default)(validationClasses, stateClasses);
|
|
3896
|
+
const wrapperClasses = (0, import_dedupe41.default)(
|
|
3809
3897
|
"mobius-select__wrapper",
|
|
3810
3898
|
sharedClasses,
|
|
3811
3899
|
otherProps.className
|
|
3812
3900
|
);
|
|
3813
|
-
const selectClasses = (0,
|
|
3901
|
+
const selectClasses = (0, import_dedupe41.default)(
|
|
3814
3902
|
"mobius-select",
|
|
3815
3903
|
sharedClasses,
|
|
3816
3904
|
otherProps.className
|
|
3817
3905
|
);
|
|
3818
|
-
const labelClasses = (0,
|
|
3906
|
+
const labelClasses = (0, import_dedupe41.default)(
|
|
3819
3907
|
"mobius-label",
|
|
3820
3908
|
sharedClasses,
|
|
3821
3909
|
otherProps.className
|
|
3822
3910
|
);
|
|
3823
|
-
const iconClasses = (0,
|
|
3824
|
-
const errorMessageId = (0,
|
|
3911
|
+
const iconClasses = (0, import_dedupe41.default)("mobius-select__icon", sharedClasses);
|
|
3912
|
+
const errorMessageId = (0, import_react34.useId)();
|
|
3825
3913
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
3826
3914
|
const describedBy = spaceDelimitedList([
|
|
3827
3915
|
shouldErrorMessageShow,
|
|
@@ -3832,10 +3920,10 @@ var init_Select = __esm({
|
|
|
3832
3920
|
onChange(e);
|
|
3833
3921
|
}
|
|
3834
3922
|
};
|
|
3835
|
-
return /* @__PURE__ */ (0,
|
|
3836
|
-
label && /* @__PURE__ */ (0,
|
|
3837
|
-
/* @__PURE__ */ (0,
|
|
3838
|
-
/* @__PURE__ */ (0,
|
|
3923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Stack, { className: "mobius mobius-select__outer", gap: "xs", children: [
|
|
3924
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Label, { ...labelProps, className: labelClasses, children: label }),
|
|
3925
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: wrapperClasses, children: [
|
|
3926
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3839
3927
|
"select",
|
|
3840
3928
|
{
|
|
3841
3929
|
...otherProps,
|
|
@@ -3851,9 +3939,9 @@ var init_Select = __esm({
|
|
|
3851
3939
|
onChange: handleChange
|
|
3852
3940
|
}
|
|
3853
3941
|
),
|
|
3854
|
-
/* @__PURE__ */ (0,
|
|
3942
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon, { icon: import_icons12.chevronDown }) })
|
|
3855
3943
|
] }),
|
|
3856
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
3944
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
3857
3945
|
] });
|
|
3858
3946
|
};
|
|
3859
3947
|
Select.displayName = "Select";
|
|
@@ -3869,15 +3957,15 @@ var init_Select2 = __esm({
|
|
|
3869
3957
|
});
|
|
3870
3958
|
|
|
3871
3959
|
// src/components/Slider/Slider.tsx
|
|
3872
|
-
var
|
|
3960
|
+
var import_dedupe42, import_react35, import_Slider, import_jsx_runtime53;
|
|
3873
3961
|
var init_Slider = __esm({
|
|
3874
3962
|
"src/components/Slider/Slider.tsx"() {
|
|
3875
3963
|
"use strict";
|
|
3876
3964
|
"use client";
|
|
3877
|
-
|
|
3878
|
-
|
|
3965
|
+
import_dedupe42 = __toESM(require("classnames/dedupe"));
|
|
3966
|
+
import_react35 = require("react");
|
|
3879
3967
|
import_Slider = require("@simplybusiness/mobius/src/components/Slider/Slider.css");
|
|
3880
|
-
|
|
3968
|
+
import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3881
3969
|
}
|
|
3882
3970
|
});
|
|
3883
3971
|
|
|
@@ -3890,19 +3978,19 @@ var init_Slider2 = __esm({
|
|
|
3890
3978
|
});
|
|
3891
3979
|
|
|
3892
3980
|
// src/components/SVG/SVG.tsx
|
|
3893
|
-
var
|
|
3981
|
+
var import_react36, import_dedupe43, import_jsx_runtime54, SVG;
|
|
3894
3982
|
var init_SVG = __esm({
|
|
3895
3983
|
"src/components/SVG/SVG.tsx"() {
|
|
3896
3984
|
"use strict";
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3985
|
+
import_react36 = require("react");
|
|
3986
|
+
import_dedupe43 = __toESM(require("classnames/dedupe"));
|
|
3987
|
+
import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3900
3988
|
SVG = ({ ref, ...props }) => {
|
|
3901
3989
|
const { children, className, ...otherProps } = props;
|
|
3902
|
-
const classes = (0,
|
|
3903
|
-
const svgNode =
|
|
3990
|
+
const classes = (0, import_dedupe43.default)("mobius", "mobius-svg", className);
|
|
3991
|
+
const svgNode = import_react36.Children.only(children);
|
|
3904
3992
|
const { children: svgChildren, viewBox, xmlns } = svgNode.props;
|
|
3905
|
-
return /* @__PURE__ */ (0,
|
|
3993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3906
3994
|
"svg",
|
|
3907
3995
|
{
|
|
3908
3996
|
viewBox,
|
|
@@ -3927,16 +4015,16 @@ var init_SVG2 = __esm({
|
|
|
3927
4015
|
});
|
|
3928
4016
|
|
|
3929
4017
|
// src/components/Switch/Switch.tsx
|
|
3930
|
-
var
|
|
4018
|
+
var import_react37, import_dedupe44, import_Switch, import_jsx_runtime55, Switch;
|
|
3931
4019
|
var init_Switch = __esm({
|
|
3932
4020
|
"src/components/Switch/Switch.tsx"() {
|
|
3933
4021
|
"use strict";
|
|
3934
4022
|
"use client";
|
|
3935
|
-
|
|
3936
|
-
|
|
4023
|
+
import_react37 = require("react");
|
|
4024
|
+
import_dedupe44 = __toESM(require("classnames/dedupe"));
|
|
3937
4025
|
init_VisuallyHidden2();
|
|
3938
4026
|
import_Switch = require("@simplybusiness/mobius/src/components/Switch/Switch.css");
|
|
3939
|
-
|
|
4027
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3940
4028
|
Switch = ({ ref, ...props }) => {
|
|
3941
4029
|
const {
|
|
3942
4030
|
checked = false,
|
|
@@ -3945,11 +4033,11 @@ var init_Switch = __esm({
|
|
|
3945
4033
|
isDisabled = false,
|
|
3946
4034
|
...otherProps
|
|
3947
4035
|
} = props;
|
|
3948
|
-
const [enabled, setEnabled] = (0,
|
|
3949
|
-
(0,
|
|
4036
|
+
const [enabled, setEnabled] = (0, import_react37.useState)(checked);
|
|
4037
|
+
(0, import_react37.useEffect)(() => {
|
|
3950
4038
|
setEnabled(checked);
|
|
3951
4039
|
}, [checked]);
|
|
3952
|
-
const classes = (0,
|
|
4040
|
+
const classes = (0, import_dedupe44.default)(
|
|
3953
4041
|
"mobius",
|
|
3954
4042
|
"mobius-switch",
|
|
3955
4043
|
{
|
|
@@ -3964,9 +4052,9 @@ var init_Switch = __esm({
|
|
|
3964
4052
|
onChange(event);
|
|
3965
4053
|
}
|
|
3966
4054
|
};
|
|
3967
|
-
return /* @__PURE__ */ (0,
|
|
3968
|
-
/* @__PURE__ */ (0,
|
|
3969
|
-
/* @__PURE__ */ (0,
|
|
4055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("label", { ref, className: classes, children: [
|
|
4056
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: enabled ? "On" : "Off" }) }),
|
|
4057
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3970
4058
|
"input",
|
|
3971
4059
|
{
|
|
3972
4060
|
type: "checkbox",
|
|
@@ -3977,7 +4065,7 @@ var init_Switch = __esm({
|
|
|
3977
4065
|
...otherProps
|
|
3978
4066
|
}
|
|
3979
4067
|
),
|
|
3980
|
-
/* @__PURE__ */ (0,
|
|
4068
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "mobius-switch__slider" })
|
|
3981
4069
|
] });
|
|
3982
4070
|
};
|
|
3983
4071
|
Switch.displayName = "Switch";
|
|
@@ -3993,114 +4081,114 @@ var init_Switch2 = __esm({
|
|
|
3993
4081
|
});
|
|
3994
4082
|
|
|
3995
4083
|
// src/components/Table/Table.tsx
|
|
3996
|
-
var
|
|
4084
|
+
var import_dedupe45, import_Table, import_jsx_runtime56, Table;
|
|
3997
4085
|
var init_Table = __esm({
|
|
3998
4086
|
"src/components/Table/Table.tsx"() {
|
|
3999
4087
|
"use strict";
|
|
4000
|
-
|
|
4088
|
+
import_dedupe45 = __toESM(require("classnames/dedupe"));
|
|
4001
4089
|
import_Table = require("@simplybusiness/mobius/src/components/Table/Table.css");
|
|
4002
|
-
|
|
4090
|
+
import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4003
4091
|
Table = ({ ref, ...props }) => {
|
|
4004
|
-
const classes = (0,
|
|
4005
|
-
return /* @__PURE__ */ (0,
|
|
4092
|
+
const classes = (0, import_dedupe45.default)("mobius", "mobius-table", props.className);
|
|
4093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("table", { ref, ...props, className: classes });
|
|
4006
4094
|
};
|
|
4007
4095
|
Table.displayName = "Table";
|
|
4008
4096
|
}
|
|
4009
4097
|
});
|
|
4010
4098
|
|
|
4011
4099
|
// src/components/Table/Head.tsx
|
|
4012
|
-
var
|
|
4100
|
+
var import_dedupe46, import_jsx_runtime57, Head;
|
|
4013
4101
|
var init_Head = __esm({
|
|
4014
4102
|
"src/components/Table/Head.tsx"() {
|
|
4015
4103
|
"use strict";
|
|
4016
|
-
|
|
4017
|
-
|
|
4104
|
+
import_dedupe46 = __toESM(require("classnames/dedupe"));
|
|
4105
|
+
import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4018
4106
|
Head = ({ ref, ...props }) => {
|
|
4019
|
-
const classes = (0,
|
|
4020
|
-
return /* @__PURE__ */ (0,
|
|
4107
|
+
const classes = (0, import_dedupe46.default)("mobius", "mobius-table__head", props.className);
|
|
4108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("thead", { ref, ...props, className: classes });
|
|
4021
4109
|
};
|
|
4022
4110
|
Head.displayName = "Table.Head";
|
|
4023
4111
|
}
|
|
4024
4112
|
});
|
|
4025
4113
|
|
|
4026
4114
|
// src/components/Table/Body.tsx
|
|
4027
|
-
var
|
|
4115
|
+
var import_dedupe47, import_jsx_runtime58, Body;
|
|
4028
4116
|
var init_Body = __esm({
|
|
4029
4117
|
"src/components/Table/Body.tsx"() {
|
|
4030
4118
|
"use strict";
|
|
4031
|
-
|
|
4032
|
-
|
|
4119
|
+
import_dedupe47 = __toESM(require("classnames/dedupe"));
|
|
4120
|
+
import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4033
4121
|
Body = ({ ref, ...props }) => {
|
|
4034
|
-
const classes = (0,
|
|
4035
|
-
return /* @__PURE__ */ (0,
|
|
4122
|
+
const classes = (0, import_dedupe47.default)("mobius", "mobius-table__body", props.className);
|
|
4123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("tbody", { ref, ...props, className: classes });
|
|
4036
4124
|
};
|
|
4037
4125
|
Body.displayName = "Table.Body";
|
|
4038
4126
|
}
|
|
4039
4127
|
});
|
|
4040
4128
|
|
|
4041
4129
|
// src/components/Table/Foot.tsx
|
|
4042
|
-
var
|
|
4130
|
+
var import_dedupe48, import_jsx_runtime59, Foot;
|
|
4043
4131
|
var init_Foot = __esm({
|
|
4044
4132
|
"src/components/Table/Foot.tsx"() {
|
|
4045
4133
|
"use strict";
|
|
4046
|
-
|
|
4047
|
-
|
|
4134
|
+
import_dedupe48 = __toESM(require("classnames/dedupe"));
|
|
4135
|
+
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4048
4136
|
Foot = ({ ref, ...props }) => {
|
|
4049
|
-
const classes = (0,
|
|
4050
|
-
return /* @__PURE__ */ (0,
|
|
4137
|
+
const classes = (0, import_dedupe48.default)("mobius", "mobius-table__foot", props.className);
|
|
4138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("tfoot", { ref, ...props, className: classes });
|
|
4051
4139
|
};
|
|
4052
4140
|
Foot.displayName = "Table.Foot";
|
|
4053
4141
|
}
|
|
4054
4142
|
});
|
|
4055
4143
|
|
|
4056
4144
|
// src/components/Table/Row.tsx
|
|
4057
|
-
var
|
|
4145
|
+
var import_dedupe49, import_jsx_runtime60, Row;
|
|
4058
4146
|
var init_Row = __esm({
|
|
4059
4147
|
"src/components/Table/Row.tsx"() {
|
|
4060
4148
|
"use strict";
|
|
4061
|
-
|
|
4062
|
-
|
|
4149
|
+
import_dedupe49 = __toESM(require("classnames/dedupe"));
|
|
4150
|
+
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4063
4151
|
Row = ({ ref, ...props }) => {
|
|
4064
|
-
const classes = (0,
|
|
4065
|
-
return /* @__PURE__ */ (0,
|
|
4152
|
+
const classes = (0, import_dedupe49.default)("mobius", "mobius-table__row", props.className);
|
|
4153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("tr", { ref, ...props, className: classes });
|
|
4066
4154
|
};
|
|
4067
4155
|
Row.displayName = "Table.Row";
|
|
4068
4156
|
}
|
|
4069
4157
|
});
|
|
4070
4158
|
|
|
4071
4159
|
// src/components/Table/HeaderCell.tsx
|
|
4072
|
-
var
|
|
4160
|
+
var import_dedupe50, import_jsx_runtime61, HeaderCell;
|
|
4073
4161
|
var init_HeaderCell = __esm({
|
|
4074
4162
|
"src/components/Table/HeaderCell.tsx"() {
|
|
4075
4163
|
"use strict";
|
|
4076
|
-
|
|
4077
|
-
|
|
4164
|
+
import_dedupe50 = __toESM(require("classnames/dedupe"));
|
|
4165
|
+
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4078
4166
|
HeaderCell = ({ ref, ...props }) => {
|
|
4079
|
-
const classes = (0,
|
|
4167
|
+
const classes = (0, import_dedupe50.default)(
|
|
4080
4168
|
"mobius",
|
|
4081
4169
|
"mobius-table__head-cell",
|
|
4082
4170
|
props.className
|
|
4083
4171
|
);
|
|
4084
|
-
return /* @__PURE__ */ (0,
|
|
4172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("th", { ...props, ref, className: classes });
|
|
4085
4173
|
};
|
|
4086
4174
|
HeaderCell.displayName = "Table.HeaderCell";
|
|
4087
4175
|
}
|
|
4088
4176
|
});
|
|
4089
4177
|
|
|
4090
4178
|
// src/components/Table/Cell.tsx
|
|
4091
|
-
var
|
|
4179
|
+
var import_dedupe51, import_jsx_runtime62, Cell;
|
|
4092
4180
|
var init_Cell = __esm({
|
|
4093
4181
|
"src/components/Table/Cell.tsx"() {
|
|
4094
4182
|
"use strict";
|
|
4095
|
-
|
|
4096
|
-
|
|
4183
|
+
import_dedupe51 = __toESM(require("classnames/dedupe"));
|
|
4184
|
+
import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4097
4185
|
Cell = ({ ref, ...props }) => {
|
|
4098
|
-
const classes = (0,
|
|
4186
|
+
const classes = (0, import_dedupe51.default)(
|
|
4099
4187
|
"mobius",
|
|
4100
4188
|
"mobius-table__body-cell",
|
|
4101
4189
|
props.className
|
|
4102
4190
|
);
|
|
4103
|
-
return /* @__PURE__ */ (0,
|
|
4191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("td", { ref, ...props, className: classes });
|
|
4104
4192
|
};
|
|
4105
4193
|
Cell.displayName = "Table.Cell";
|
|
4106
4194
|
}
|
|
@@ -4130,37 +4218,6 @@ var init_Table2 = __esm({
|
|
|
4130
4218
|
}
|
|
4131
4219
|
});
|
|
4132
4220
|
|
|
4133
|
-
// src/components/Text/Text.tsx
|
|
4134
|
-
var import_dedupe51, import_Text, import_jsx_runtime61, getElementType, Text;
|
|
4135
|
-
var init_Text = __esm({
|
|
4136
|
-
"src/components/Text/Text.tsx"() {
|
|
4137
|
-
"use strict";
|
|
4138
|
-
import_dedupe51 = __toESM(require("classnames/dedupe"));
|
|
4139
|
-
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
4140
|
-
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4141
|
-
getElementType = (variant, elementType) => {
|
|
4142
|
-
if (variant) {
|
|
4143
|
-
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
4144
|
-
}
|
|
4145
|
-
return elementType || "p";
|
|
4146
|
-
};
|
|
4147
|
-
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
4148
|
-
const { variant, className, spacing, ...otherProps } = props;
|
|
4149
|
-
const elementType = getElementType(variant, Component);
|
|
4150
|
-
const variantType = variant || elementType;
|
|
4151
|
-
const classes = (0, import_dedupe51.default)(
|
|
4152
|
-
"mobius",
|
|
4153
|
-
"mobius-text",
|
|
4154
|
-
{ [`--is-${variantType}`]: variantType },
|
|
4155
|
-
{ [`--has-line-height-${spacing}`]: spacing },
|
|
4156
|
-
className
|
|
4157
|
-
);
|
|
4158
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
4159
|
-
};
|
|
4160
|
-
Text.displayName = "Text";
|
|
4161
|
-
}
|
|
4162
|
-
});
|
|
4163
|
-
|
|
4164
4221
|
// src/components/Text/index.tsx
|
|
4165
4222
|
var init_Text2 = __esm({
|
|
4166
4223
|
"src/components/Text/index.tsx"() {
|
|
@@ -4170,12 +4227,12 @@ var init_Text2 = __esm({
|
|
|
4170
4227
|
});
|
|
4171
4228
|
|
|
4172
4229
|
// src/components/TextAreaInput/TextAreaInput.tsx
|
|
4173
|
-
var import_dedupe52,
|
|
4230
|
+
var import_dedupe52, import_jsx_runtime63, TextAreaInput;
|
|
4174
4231
|
var init_TextAreaInput = __esm({
|
|
4175
4232
|
"src/components/TextAreaInput/TextAreaInput.tsx"() {
|
|
4176
4233
|
"use strict";
|
|
4177
4234
|
import_dedupe52 = __toESM(require("classnames/dedupe"));
|
|
4178
|
-
|
|
4235
|
+
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4179
4236
|
TextAreaInput = ({ ref, ...props }) => {
|
|
4180
4237
|
const { isSelected, isDisabled, isReadOnly, isRequired, ...otherProps } = props;
|
|
4181
4238
|
const classes = (0, import_dedupe52.default)(
|
|
@@ -4188,7 +4245,7 @@ var init_TextAreaInput = __esm({
|
|
|
4188
4245
|
},
|
|
4189
4246
|
otherProps.className
|
|
4190
4247
|
);
|
|
4191
|
-
return /* @__PURE__ */ (0,
|
|
4248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4192
4249
|
"textarea",
|
|
4193
4250
|
{
|
|
4194
4251
|
ref,
|
|
@@ -4212,7 +4269,7 @@ var init_TextAreaInput2 = __esm({
|
|
|
4212
4269
|
});
|
|
4213
4270
|
|
|
4214
4271
|
// src/components/TextArea/TextArea.tsx
|
|
4215
|
-
var import_dedupe53, import_TextArea,
|
|
4272
|
+
var import_dedupe53, import_TextArea, import_jsx_runtime64, TextArea;
|
|
4216
4273
|
var init_TextArea = __esm({
|
|
4217
4274
|
"src/components/TextArea/TextArea.tsx"() {
|
|
4218
4275
|
"use strict";
|
|
@@ -4224,7 +4281,7 @@ var init_TextArea = __esm({
|
|
|
4224
4281
|
init_Stack2();
|
|
4225
4282
|
init_TextAreaInput2();
|
|
4226
4283
|
import_TextArea = require("@simplybusiness/mobius/src/components/TextArea/TextArea.css");
|
|
4227
|
-
|
|
4284
|
+
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4228
4285
|
TextArea = ({ ref, ...props }) => {
|
|
4229
4286
|
const {
|
|
4230
4287
|
isDisabled,
|
|
@@ -4244,9 +4301,9 @@ var init_TextArea = __esm({
|
|
|
4244
4301
|
},
|
|
4245
4302
|
validationClasses
|
|
4246
4303
|
);
|
|
4247
|
-
return /* @__PURE__ */ (0,
|
|
4248
|
-
label && /* @__PURE__ */ (0,
|
|
4249
|
-
/* @__PURE__ */ (0,
|
|
4304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Stack, { className: classes, gap: "xs", children: [
|
|
4305
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Label, { ...labelProps, className: labelClasses, children: props.label }),
|
|
4306
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4250
4307
|
TextAreaInput,
|
|
4251
4308
|
{
|
|
4252
4309
|
...otherProps,
|
|
@@ -4257,7 +4314,7 @@ var init_TextArea = __esm({
|
|
|
4257
4314
|
"aria-invalid": errorMessage != null
|
|
4258
4315
|
}
|
|
4259
4316
|
),
|
|
4260
|
-
/* @__PURE__ */ (0,
|
|
4317
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ErrorMessage, { ...errorMessageProps, errorMessage })
|
|
4261
4318
|
] });
|
|
4262
4319
|
};
|
|
4263
4320
|
TextArea.displayName = "TextArea";
|
|
@@ -4272,53 +4329,6 @@ var init_TextArea2 = __esm({
|
|
|
4272
4329
|
}
|
|
4273
4330
|
});
|
|
4274
4331
|
|
|
4275
|
-
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
4276
|
-
var import_react37, import_jsx_runtime64, isHTML, TextOrHTML;
|
|
4277
|
-
var init_TextOrHTML = __esm({
|
|
4278
|
-
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
4279
|
-
"use strict";
|
|
4280
|
-
import_react37 = require("react");
|
|
4281
|
-
init_Text();
|
|
4282
|
-
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4283
|
-
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
4284
|
-
TextOrHTML = ({
|
|
4285
|
-
ref,
|
|
4286
|
-
text,
|
|
4287
|
-
htmlClassName,
|
|
4288
|
-
htmlElementType,
|
|
4289
|
-
textWrapper = false,
|
|
4290
|
-
autoDetect = false,
|
|
4291
|
-
...textProps
|
|
4292
|
-
}) => {
|
|
4293
|
-
const textIsHTML = autoDetect && isHTML(text);
|
|
4294
|
-
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
4295
|
-
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
4296
|
-
const DangerousComponent = resolvedElementType;
|
|
4297
|
-
const dangerousHTML = (0, import_react37.useMemo)(() => ({ __html: text }), [text]);
|
|
4298
|
-
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4299
|
-
DangerousComponent,
|
|
4300
|
-
{
|
|
4301
|
-
className: htmlClassName,
|
|
4302
|
-
dangerouslySetInnerHTML: dangerousHTML
|
|
4303
|
-
}
|
|
4304
|
-
);
|
|
4305
|
-
if (shouldWrapInText) {
|
|
4306
|
-
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
4307
|
-
}
|
|
4308
|
-
return dangerousElement;
|
|
4309
|
-
};
|
|
4310
|
-
TextOrHTML.displayName = "TextOrHTML";
|
|
4311
|
-
}
|
|
4312
|
-
});
|
|
4313
|
-
|
|
4314
|
-
// src/components/TextOrHTML/index.tsx
|
|
4315
|
-
var init_TextOrHTML2 = __esm({
|
|
4316
|
-
"src/components/TextOrHTML/index.tsx"() {
|
|
4317
|
-
"use strict";
|
|
4318
|
-
init_TextOrHTML();
|
|
4319
|
-
}
|
|
4320
|
-
});
|
|
4321
|
-
|
|
4322
4332
|
// src/components/Title/Title.tsx
|
|
4323
4333
|
var import_dedupe54, import_Title, import_jsx_runtime65, Title;
|
|
4324
4334
|
var init_Title = __esm({
|