@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
|
@@ -1251,19 +1251,98 @@ var init_AddressLookup2 = __esm({
|
|
|
1251
1251
|
}
|
|
1252
1252
|
});
|
|
1253
1253
|
|
|
1254
|
+
// src/components/Text/Text.tsx
|
|
1255
|
+
var import_dedupe7, import_Text, import_jsx_runtime8, getElementType, Text;
|
|
1256
|
+
var init_Text = __esm({
|
|
1257
|
+
"src/components/Text/Text.tsx"() {
|
|
1258
|
+
"use strict";
|
|
1259
|
+
import_dedupe7 = __toESM(require("classnames/dedupe"));
|
|
1260
|
+
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
1261
|
+
import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1262
|
+
getElementType = (variant, elementType) => {
|
|
1263
|
+
if (variant) {
|
|
1264
|
+
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
1265
|
+
}
|
|
1266
|
+
return elementType || "p";
|
|
1267
|
+
};
|
|
1268
|
+
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
1269
|
+
const { variant, className, spacing, ...otherProps } = props;
|
|
1270
|
+
const elementType = getElementType(variant, Component);
|
|
1271
|
+
const variantType = variant || elementType;
|
|
1272
|
+
const classes = (0, import_dedupe7.default)(
|
|
1273
|
+
"mobius",
|
|
1274
|
+
"mobius-text",
|
|
1275
|
+
{ [`--is-${variantType}`]: variantType },
|
|
1276
|
+
{ [`--has-line-height-${spacing}`]: spacing },
|
|
1277
|
+
className
|
|
1278
|
+
);
|
|
1279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
1280
|
+
};
|
|
1281
|
+
Text.displayName = "Text";
|
|
1282
|
+
}
|
|
1283
|
+
});
|
|
1284
|
+
|
|
1285
|
+
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
1286
|
+
var import_react10, import_jsx_runtime9, isHTML, TextOrHTML;
|
|
1287
|
+
var init_TextOrHTML = __esm({
|
|
1288
|
+
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
1289
|
+
"use strict";
|
|
1290
|
+
import_react10 = require("react");
|
|
1291
|
+
init_Text();
|
|
1292
|
+
import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1293
|
+
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
1294
|
+
TextOrHTML = ({
|
|
1295
|
+
ref,
|
|
1296
|
+
text,
|
|
1297
|
+
htmlClassName,
|
|
1298
|
+
htmlElementType,
|
|
1299
|
+
textWrapper = false,
|
|
1300
|
+
autoDetect = false,
|
|
1301
|
+
...textProps
|
|
1302
|
+
}) => {
|
|
1303
|
+
const textIsHTML = autoDetect && isHTML(text);
|
|
1304
|
+
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
1305
|
+
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
1306
|
+
const DangerousComponent = resolvedElementType;
|
|
1307
|
+
const dangerousHTML = (0, import_react10.useMemo)(() => ({ __html: text }), [text]);
|
|
1308
|
+
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1309
|
+
DangerousComponent,
|
|
1310
|
+
{
|
|
1311
|
+
className: htmlClassName,
|
|
1312
|
+
dangerouslySetInnerHTML: dangerousHTML
|
|
1313
|
+
}
|
|
1314
|
+
);
|
|
1315
|
+
if (shouldWrapInText) {
|
|
1316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
1317
|
+
}
|
|
1318
|
+
return dangerousElement;
|
|
1319
|
+
};
|
|
1320
|
+
TextOrHTML.displayName = "TextOrHTML";
|
|
1321
|
+
}
|
|
1322
|
+
});
|
|
1323
|
+
|
|
1324
|
+
// src/components/TextOrHTML/index.tsx
|
|
1325
|
+
var init_TextOrHTML2 = __esm({
|
|
1326
|
+
"src/components/TextOrHTML/index.tsx"() {
|
|
1327
|
+
"use strict";
|
|
1328
|
+
init_TextOrHTML();
|
|
1329
|
+
}
|
|
1330
|
+
});
|
|
1331
|
+
|
|
1254
1332
|
// src/components/Alert/Alert.tsx
|
|
1255
1333
|
function isAlertVariant(value) {
|
|
1256
1334
|
return value === "info" || value === "success" || value === "warning" || value === "error";
|
|
1257
1335
|
}
|
|
1258
|
-
var import_icons3,
|
|
1336
|
+
var import_icons3, import_dedupe8, import_Alert, import_jsx_runtime10, Alert;
|
|
1259
1337
|
var init_Alert = __esm({
|
|
1260
1338
|
"src/components/Alert/Alert.tsx"() {
|
|
1261
1339
|
"use strict";
|
|
1262
1340
|
import_icons3 = require("@simplybusiness/icons");
|
|
1263
|
-
|
|
1341
|
+
import_dedupe8 = __toESM(require("classnames/dedupe"));
|
|
1264
1342
|
init_Icon2();
|
|
1343
|
+
init_TextOrHTML2();
|
|
1265
1344
|
import_Alert = require("@simplybusiness/mobius/src/components/Alert/Alert.css");
|
|
1266
|
-
|
|
1345
|
+
import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1267
1346
|
Alert = ({ ref, ...props }) => {
|
|
1268
1347
|
const {
|
|
1269
1348
|
elementType: Element = "div",
|
|
@@ -1276,7 +1355,7 @@ var init_Alert = __esm({
|
|
|
1276
1355
|
if (!show) return null;
|
|
1277
1356
|
const variant = variantProp && isAlertVariant(variantProp) ? variantProp : "info";
|
|
1278
1357
|
const colorValue = variant === "success" ? `var(--color-valid)` : `var(--color-${variant})`;
|
|
1279
|
-
const classes = (0,
|
|
1358
|
+
const classes = (0, import_dedupe8.default)(
|
|
1280
1359
|
"mobius",
|
|
1281
1360
|
"mobius-alert",
|
|
1282
1361
|
{
|
|
@@ -1294,14 +1373,23 @@ var init_Alert = __esm({
|
|
|
1294
1373
|
warning: import_icons3.warning,
|
|
1295
1374
|
error: import_icons3.error
|
|
1296
1375
|
};
|
|
1297
|
-
const headerClasses = (0,
|
|
1298
|
-
const iconClasses = (0,
|
|
1299
|
-
const contentClasses = (0,
|
|
1300
|
-
return /* @__PURE__ */ (0,
|
|
1301
|
-
/* @__PURE__ */ (0,
|
|
1302
|
-
/* @__PURE__ */ (0,
|
|
1303
|
-
header && /* @__PURE__ */ (0,
|
|
1304
|
-
|
|
1376
|
+
const headerClasses = (0, import_dedupe8.default)("mobius", "mobius-alert__header");
|
|
1377
|
+
const iconClasses = (0, import_dedupe8.default)("mobius", "mobius-alert__icon");
|
|
1378
|
+
const contentClasses = (0, import_dedupe8.default)("mobius", "mobius-alert__content");
|
|
1379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Element, { ref, role: "alert", ...otherProps, className: classes, children: [
|
|
1380
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { icon: icon[variant], color: colorValue }) }),
|
|
1381
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { children: [
|
|
1382
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1383
|
+
TextOrHTML,
|
|
1384
|
+
{
|
|
1385
|
+
autoDetect: true,
|
|
1386
|
+
htmlElementType: "span",
|
|
1387
|
+
className: headerClasses,
|
|
1388
|
+
htmlClassName: headerClasses,
|
|
1389
|
+
text: header
|
|
1390
|
+
}
|
|
1391
|
+
),
|
|
1392
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: contentClasses, children })
|
|
1305
1393
|
] })
|
|
1306
1394
|
] });
|
|
1307
1395
|
};
|
|
@@ -1318,14 +1406,14 @@ var init_Alert2 = __esm({
|
|
|
1318
1406
|
});
|
|
1319
1407
|
|
|
1320
1408
|
// src/components/Box/Box.tsx
|
|
1321
|
-
var
|
|
1409
|
+
var import_dedupe9, import_Box, import_jsx_runtime11, Box;
|
|
1322
1410
|
var init_Box = __esm({
|
|
1323
1411
|
"src/components/Box/Box.tsx"() {
|
|
1324
1412
|
"use strict";
|
|
1325
|
-
|
|
1413
|
+
import_dedupe9 = __toESM(require("classnames/dedupe"));
|
|
1326
1414
|
init_utils();
|
|
1327
1415
|
import_Box = require("@simplybusiness/mobius/src/components/Box/Box.css");
|
|
1328
|
-
|
|
1416
|
+
import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1329
1417
|
Box = ({ ref, ...props }) => {
|
|
1330
1418
|
const {
|
|
1331
1419
|
elementType: Element = "div",
|
|
@@ -1351,7 +1439,7 @@ var init_Box = __esm({
|
|
|
1351
1439
|
style,
|
|
1352
1440
|
...otherProps
|
|
1353
1441
|
} = props;
|
|
1354
|
-
const classes = (0,
|
|
1442
|
+
const classes = (0, import_dedupe9.default)("mobius", "mobius-box", otherProps.className);
|
|
1355
1443
|
const styleProps = filterUndefinedProps({
|
|
1356
1444
|
padding: getSpacingValue(padding),
|
|
1357
1445
|
paddingInline: getSpacingValue(paddingInline || paddingX),
|
|
@@ -1368,7 +1456,7 @@ var init_Box = __esm({
|
|
|
1368
1456
|
height,
|
|
1369
1457
|
...style
|
|
1370
1458
|
});
|
|
1371
|
-
return /* @__PURE__ */ (0,
|
|
1459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Element, { ref, style: styleProps, ...otherProps, className: classes });
|
|
1372
1460
|
};
|
|
1373
1461
|
Box.displayName = "Box";
|
|
1374
1462
|
}
|
|
@@ -1383,27 +1471,27 @@ var init_Box2 = __esm({
|
|
|
1383
1471
|
});
|
|
1384
1472
|
|
|
1385
1473
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
1386
|
-
var
|
|
1474
|
+
var import_react11, import_dedupe10, import_Breadcrumbs, import_jsx_runtime12, Breadcrumbs;
|
|
1387
1475
|
var init_Breadcrumbs = __esm({
|
|
1388
1476
|
"src/components/Breadcrumbs/Breadcrumbs.tsx"() {
|
|
1389
1477
|
"use strict";
|
|
1390
1478
|
"use client";
|
|
1391
|
-
|
|
1392
|
-
|
|
1479
|
+
import_react11 = require("react");
|
|
1480
|
+
import_dedupe10 = __toESM(require("classnames/dedupe"));
|
|
1393
1481
|
import_Breadcrumbs = require("@simplybusiness/mobius/src/components/Breadcrumbs/Breadcrumbs.css");
|
|
1394
|
-
|
|
1482
|
+
import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1395
1483
|
Breadcrumbs = ({ ref, ...props }) => {
|
|
1396
1484
|
const { "aria-label": ariaLabel = "Breadcrumbs" } = props;
|
|
1397
1485
|
const { navProps } = { navProps: { "aria-label": ariaLabel } };
|
|
1398
1486
|
const { children, ...otherProps } = props;
|
|
1399
|
-
const childArray =
|
|
1400
|
-
const classes = (0,
|
|
1487
|
+
const childArray = import_react11.Children.toArray(children);
|
|
1488
|
+
const classes = (0, import_dedupe10.default)(
|
|
1401
1489
|
"mobius",
|
|
1402
1490
|
"mobius-breadcrumb",
|
|
1403
1491
|
otherProps.className
|
|
1404
1492
|
);
|
|
1405
|
-
return /* @__PURE__ */ (0,
|
|
1406
|
-
(child, i) => (0,
|
|
1493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("nav", { ref, ...otherProps, ...navProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { children: childArray.map(
|
|
1494
|
+
(child, i) => (0, import_react11.cloneElement)(
|
|
1407
1495
|
child,
|
|
1408
1496
|
{
|
|
1409
1497
|
key: i,
|
|
@@ -1417,22 +1505,22 @@ var init_Breadcrumbs = __esm({
|
|
|
1417
1505
|
});
|
|
1418
1506
|
|
|
1419
1507
|
// src/components/Breadcrumbs/BreadcrumbItem.tsx
|
|
1420
|
-
var
|
|
1508
|
+
var import_react12, import_dedupe11, import_jsx_runtime13, BreadcrumbItem;
|
|
1421
1509
|
var init_BreadcrumbItem = __esm({
|
|
1422
1510
|
"src/components/Breadcrumbs/BreadcrumbItem.tsx"() {
|
|
1423
1511
|
"use strict";
|
|
1424
1512
|
"use client";
|
|
1425
|
-
|
|
1426
|
-
|
|
1513
|
+
import_react12 = require("react");
|
|
1514
|
+
import_dedupe11 = __toESM(require("classnames/dedupe"));
|
|
1427
1515
|
init_Box2();
|
|
1428
|
-
|
|
1516
|
+
import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1429
1517
|
BreadcrumbItem = ({ ref, ...props }) => {
|
|
1430
1518
|
const {
|
|
1431
1519
|
isDisabled = false,
|
|
1432
1520
|
isCurrent = false,
|
|
1433
1521
|
"aria-current": ariaCurrent = "page",
|
|
1434
1522
|
children,
|
|
1435
|
-
separator = /* @__PURE__ */ (0,
|
|
1523
|
+
separator = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Box, { className: "mobius-breadcrumb__separator", "aria-hidden": "true", children: ">" }),
|
|
1436
1524
|
...otherProps
|
|
1437
1525
|
} = props;
|
|
1438
1526
|
const { itemProps } = {
|
|
@@ -1442,14 +1530,14 @@ var init_BreadcrumbItem = __esm({
|
|
|
1442
1530
|
...otherProps
|
|
1443
1531
|
}
|
|
1444
1532
|
};
|
|
1445
|
-
const classes = (0,
|
|
1533
|
+
const classes = (0, import_dedupe11.default)(
|
|
1446
1534
|
"mobius",
|
|
1447
1535
|
"mobius-breadcrumb__item",
|
|
1448
1536
|
props.className
|
|
1449
1537
|
);
|
|
1450
|
-
const child = typeof children === "string" ? /* @__PURE__ */ (0,
|
|
1451
|
-
return /* @__PURE__ */ (0,
|
|
1452
|
-
(0,
|
|
1538
|
+
const child = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { ...itemProps, children }) : import_react12.Children.only(children);
|
|
1539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("li", { className: classes, children: [
|
|
1540
|
+
(0, import_react12.cloneElement)(child, {
|
|
1453
1541
|
...child.props,
|
|
1454
1542
|
...itemProps,
|
|
1455
1543
|
ref
|
|
@@ -1478,7 +1566,7 @@ function VisuallyHidden(props) {
|
|
|
1478
1566
|
elementType: Component = "div",
|
|
1479
1567
|
...otherProps
|
|
1480
1568
|
} = props;
|
|
1481
|
-
return /* @__PURE__ */ (0,
|
|
1569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1482
1570
|
Component,
|
|
1483
1571
|
{
|
|
1484
1572
|
className,
|
|
@@ -1499,11 +1587,11 @@ function VisuallyHidden(props) {
|
|
|
1499
1587
|
}
|
|
1500
1588
|
);
|
|
1501
1589
|
}
|
|
1502
|
-
var
|
|
1590
|
+
var import_jsx_runtime14;
|
|
1503
1591
|
var init_VisuallyHidden = __esm({
|
|
1504
1592
|
"src/components/VisuallyHidden/VisuallyHidden.tsx"() {
|
|
1505
1593
|
"use strict";
|
|
1506
|
-
|
|
1594
|
+
import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1507
1595
|
}
|
|
1508
1596
|
});
|
|
1509
1597
|
|
|
@@ -1516,19 +1604,19 @@ var init_VisuallyHidden2 = __esm({
|
|
|
1516
1604
|
});
|
|
1517
1605
|
|
|
1518
1606
|
// src/components/Button/Loading.tsx
|
|
1519
|
-
var import_icons4,
|
|
1607
|
+
var import_icons4, import_jsx_runtime15, Loading;
|
|
1520
1608
|
var init_Loading = __esm({
|
|
1521
1609
|
"src/components/Button/Loading.tsx"() {
|
|
1522
1610
|
"use strict";
|
|
1523
1611
|
import_icons4 = require("@simplybusiness/icons");
|
|
1524
1612
|
init_Icon2();
|
|
1525
1613
|
init_VisuallyHidden2();
|
|
1526
|
-
|
|
1614
|
+
import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1527
1615
|
Loading = (props) => {
|
|
1528
1616
|
const { children } = props;
|
|
1529
|
-
return /* @__PURE__ */ (0,
|
|
1530
|
-
/* @__PURE__ */ (0,
|
|
1531
|
-
/* @__PURE__ */ (0,
|
|
1617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
1618
|
+
/* @__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" }) }),
|
|
1619
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(VisuallyHidden, { className: "mobius-button__loading-text", children: "Loading" }),
|
|
1532
1620
|
children
|
|
1533
1621
|
] });
|
|
1534
1622
|
};
|
|
@@ -1536,33 +1624,33 @@ var init_Loading = __esm({
|
|
|
1536
1624
|
});
|
|
1537
1625
|
|
|
1538
1626
|
// src/components/Button/Success.tsx
|
|
1539
|
-
var import_icons5,
|
|
1627
|
+
var import_icons5, import_jsx_runtime16, Success;
|
|
1540
1628
|
var init_Success = __esm({
|
|
1541
1629
|
"src/components/Button/Success.tsx"() {
|
|
1542
1630
|
"use strict";
|
|
1543
1631
|
import_icons5 = require("@simplybusiness/icons");
|
|
1544
1632
|
init_Icon2();
|
|
1545
1633
|
init_VisuallyHidden2();
|
|
1546
|
-
|
|
1547
|
-
Success = () => /* @__PURE__ */ (0,
|
|
1548
|
-
/* @__PURE__ */ (0,
|
|
1549
|
-
/* @__PURE__ */ (0,
|
|
1634
|
+
import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1635
|
+
Success = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
1636
|
+
/* @__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" }) }),
|
|
1637
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(VisuallyHidden, { className: "mobius-button__success-text", children: "Success" })
|
|
1550
1638
|
] });
|
|
1551
1639
|
}
|
|
1552
1640
|
});
|
|
1553
1641
|
|
|
1554
1642
|
// src/components/Button/Button.tsx
|
|
1555
|
-
var
|
|
1643
|
+
var import_dedupe12, import_Button, import_jsx_runtime17, Button;
|
|
1556
1644
|
var init_Button = __esm({
|
|
1557
1645
|
"src/components/Button/Button.tsx"() {
|
|
1558
1646
|
"use strict";
|
|
1559
1647
|
"use client";
|
|
1560
|
-
|
|
1648
|
+
import_dedupe12 = __toESM(require("classnames/dedupe"));
|
|
1561
1649
|
init_Loading();
|
|
1562
1650
|
init_useButton2();
|
|
1563
1651
|
init_Success();
|
|
1564
1652
|
import_Button = require("@simplybusiness/mobius/src/components/Button/Button.css");
|
|
1565
|
-
|
|
1653
|
+
import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1566
1654
|
Button = ({ ref, ...props }) => {
|
|
1567
1655
|
const {
|
|
1568
1656
|
children,
|
|
@@ -1577,7 +1665,7 @@ var init_Button = __esm({
|
|
|
1577
1665
|
...otherProps
|
|
1578
1666
|
} = props;
|
|
1579
1667
|
const { buttonProps } = useButton(props);
|
|
1580
|
-
otherProps.className = (0,
|
|
1668
|
+
otherProps.className = (0, import_dedupe12.default)(
|
|
1581
1669
|
"mobius",
|
|
1582
1670
|
"mobius-button",
|
|
1583
1671
|
`--variant-${variant}`,
|
|
@@ -1589,9 +1677,9 @@ var init_Button = __esm({
|
|
|
1589
1677
|
},
|
|
1590
1678
|
otherProps.className
|
|
1591
1679
|
);
|
|
1592
|
-
return /* @__PURE__ */ (0,
|
|
1593
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
1594
|
-
isSuccess && !isLoading && /* @__PURE__ */ (0,
|
|
1680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Component, { ref, ...buttonProps, ...otherProps, children: [
|
|
1681
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Loading, { children }) : children,
|
|
1682
|
+
isSuccess && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Success, {})
|
|
1595
1683
|
] });
|
|
1596
1684
|
};
|
|
1597
1685
|
Button.displayName = "Button";
|
|
@@ -1607,16 +1695,16 @@ var init_Button2 = __esm({
|
|
|
1607
1695
|
});
|
|
1608
1696
|
|
|
1609
1697
|
// src/components/Stack/Stack.tsx
|
|
1610
|
-
var
|
|
1698
|
+
var import_dedupe13, import_Stack, import_jsx_runtime18, Stack;
|
|
1611
1699
|
var init_Stack = __esm({
|
|
1612
1700
|
"src/components/Stack/Stack.tsx"() {
|
|
1613
1701
|
"use strict";
|
|
1614
|
-
|
|
1702
|
+
import_dedupe13 = __toESM(require("classnames/dedupe"));
|
|
1615
1703
|
import_Stack = require("@simplybusiness/mobius/src/components/Stack/Stack.css");
|
|
1616
|
-
|
|
1704
|
+
import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1617
1705
|
Stack = ({ ref, ...props }) => {
|
|
1618
1706
|
const { elementType: Element = "div", gap, ...otherProps } = props;
|
|
1619
|
-
const classes = (0,
|
|
1707
|
+
const classes = (0, import_dedupe13.default)(
|
|
1620
1708
|
"mobius",
|
|
1621
1709
|
"mobius-stack",
|
|
1622
1710
|
{
|
|
@@ -1624,7 +1712,7 @@ var init_Stack = __esm({
|
|
|
1624
1712
|
},
|
|
1625
1713
|
otherProps.className
|
|
1626
1714
|
);
|
|
1627
|
-
return /* @__PURE__ */ (0,
|
|
1715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
1628
1716
|
};
|
|
1629
1717
|
Stack.displayName = "Stack";
|
|
1630
1718
|
}
|
|
@@ -1639,13 +1727,13 @@ var init_Stack2 = __esm({
|
|
|
1639
1727
|
});
|
|
1640
1728
|
|
|
1641
1729
|
// src/components/Checkbox/Checkbox.tsx
|
|
1642
|
-
var
|
|
1730
|
+
var import_react13, import_dedupe14, import_icons6, import_Checkbox, import_jsx_runtime19, Checkbox;
|
|
1643
1731
|
var init_Checkbox = __esm({
|
|
1644
1732
|
"src/components/Checkbox/Checkbox.tsx"() {
|
|
1645
1733
|
"use strict";
|
|
1646
1734
|
"use client";
|
|
1647
|
-
|
|
1648
|
-
|
|
1735
|
+
import_react13 = require("react");
|
|
1736
|
+
import_dedupe14 = __toESM(require("classnames/dedupe"));
|
|
1649
1737
|
import_icons6 = require("@simplybusiness/icons");
|
|
1650
1738
|
init_ErrorMessage2();
|
|
1651
1739
|
init_spaceDelimitedList();
|
|
@@ -1653,7 +1741,7 @@ var init_Checkbox = __esm({
|
|
|
1653
1741
|
init_Icon2();
|
|
1654
1742
|
init_Stack2();
|
|
1655
1743
|
import_Checkbox = require("@simplybusiness/mobius/src/components/Checkbox/Checkbox.css");
|
|
1656
|
-
|
|
1744
|
+
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1657
1745
|
Checkbox = ({ ref, ...props }) => {
|
|
1658
1746
|
const {
|
|
1659
1747
|
id,
|
|
@@ -1673,18 +1761,18 @@ var init_Checkbox = __esm({
|
|
|
1673
1761
|
["aria-describedby"]: ariaDescribedBy,
|
|
1674
1762
|
...rest
|
|
1675
1763
|
} = props;
|
|
1676
|
-
const [checked, setChecked] = (0,
|
|
1677
|
-
const fallbackRef = (0,
|
|
1764
|
+
const [checked, setChecked] = (0, import_react13.useState)(defaultSelected);
|
|
1765
|
+
const fallbackRef = (0, import_react13.useRef)(null);
|
|
1678
1766
|
const refObj = ref || fallbackRef;
|
|
1679
|
-
const inputId = (0,
|
|
1767
|
+
const inputId = (0, import_react13.useId)();
|
|
1680
1768
|
const isControlled = typeof selected === "boolean";
|
|
1681
|
-
(0,
|
|
1769
|
+
(0, import_react13.useEffect)(() => {
|
|
1682
1770
|
if (isControlled) {
|
|
1683
1771
|
setChecked(selected);
|
|
1684
1772
|
}
|
|
1685
1773
|
}, [selected, isControlled]);
|
|
1686
1774
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
1687
|
-
const sharedClasses = (0,
|
|
1775
|
+
const sharedClasses = (0, import_dedupe14.default)(
|
|
1688
1776
|
{
|
|
1689
1777
|
"--is-disabled": isDisabled,
|
|
1690
1778
|
"--is-selected": checked,
|
|
@@ -1693,31 +1781,31 @@ var init_Checkbox = __esm({
|
|
|
1693
1781
|
},
|
|
1694
1782
|
validationClasses
|
|
1695
1783
|
);
|
|
1696
|
-
const wrapperClasses = (0,
|
|
1784
|
+
const wrapperClasses = (0, import_dedupe14.default)(
|
|
1697
1785
|
"mobius",
|
|
1698
1786
|
"mobius-checkbox",
|
|
1699
1787
|
sharedClasses,
|
|
1700
1788
|
className
|
|
1701
1789
|
);
|
|
1702
|
-
const labelClasses = (0,
|
|
1703
|
-
const inputClasses = (0,
|
|
1704
|
-
const iconClasses = (0,
|
|
1705
|
-
const errorMessageId = (0,
|
|
1790
|
+
const labelClasses = (0, import_dedupe14.default)("mobius-checkbox__label", sharedClasses);
|
|
1791
|
+
const inputClasses = (0, import_dedupe14.default)("mobius-checkbox__input", sharedClasses);
|
|
1792
|
+
const iconClasses = (0, import_dedupe14.default)("mobius-checkbox__icon", sharedClasses);
|
|
1793
|
+
const errorMessageId = (0, import_react13.useId)();
|
|
1706
1794
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
1707
1795
|
const describedBy = spaceDelimitedList([
|
|
1708
1796
|
shouldErrorMessageShow,
|
|
1709
1797
|
ariaDescribedBy
|
|
1710
1798
|
]);
|
|
1711
|
-
const labelId = (0,
|
|
1799
|
+
const labelId = (0, import_react13.useId)();
|
|
1712
1800
|
const handleChange = (event) => {
|
|
1713
1801
|
setChecked(!checked);
|
|
1714
1802
|
if (onChange) {
|
|
1715
1803
|
onChange(event, isLastItem);
|
|
1716
1804
|
}
|
|
1717
1805
|
};
|
|
1718
|
-
return /* @__PURE__ */ (0,
|
|
1719
|
-
/* @__PURE__ */ (0,
|
|
1720
|
-
/* @__PURE__ */ (0,
|
|
1806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Stack, { gap: "xs", className: wrapperClasses, children: [
|
|
1807
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: labelClasses, children: [
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1721
1809
|
"input",
|
|
1722
1810
|
{
|
|
1723
1811
|
"aria-describedby": describedBy,
|
|
@@ -1738,7 +1826,7 @@ var init_Checkbox = __esm({
|
|
|
1738
1826
|
...rest
|
|
1739
1827
|
}
|
|
1740
1828
|
),
|
|
1741
|
-
/* @__PURE__ */ (0,
|
|
1829
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1742
1830
|
Icon,
|
|
1743
1831
|
{
|
|
1744
1832
|
icon: checked ? import_icons6.squareTick : import_icons6.square,
|
|
@@ -1746,9 +1834,9 @@ var init_Checkbox = __esm({
|
|
|
1746
1834
|
className: iconClasses
|
|
1747
1835
|
}
|
|
1748
1836
|
),
|
|
1749
|
-
/* @__PURE__ */ (0,
|
|
1837
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { id: labelId, className: "mobius-checkbox__visible-label", children: label })
|
|
1750
1838
|
] }),
|
|
1751
|
-
/* @__PURE__ */ (0,
|
|
1839
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
1752
1840
|
] });
|
|
1753
1841
|
};
|
|
1754
1842
|
Checkbox.displayName = "Checkbox";
|
|
@@ -1756,18 +1844,18 @@ var init_Checkbox = __esm({
|
|
|
1756
1844
|
});
|
|
1757
1845
|
|
|
1758
1846
|
// src/components/Label/Label.tsx
|
|
1759
|
-
var
|
|
1847
|
+
var import_dedupe15, import_Label, import_jsx_runtime20, Label;
|
|
1760
1848
|
var init_Label = __esm({
|
|
1761
1849
|
"src/components/Label/Label.tsx"() {
|
|
1762
1850
|
"use strict";
|
|
1763
|
-
|
|
1851
|
+
import_dedupe15 = __toESM(require("classnames/dedupe"));
|
|
1764
1852
|
import_Label = require("@simplybusiness/mobius/src/components/Label/Label.css");
|
|
1765
|
-
|
|
1853
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1766
1854
|
Label = ({ ref, ...props }) => {
|
|
1767
1855
|
const { elementType: Element = "label", children, ...otherProps } = props;
|
|
1768
|
-
const classes = (0,
|
|
1856
|
+
const classes = (0, import_dedupe15.default)("mobius", "mobius-label", props.className);
|
|
1769
1857
|
otherProps.className = classes;
|
|
1770
|
-
return /* @__PURE__ */ (0,
|
|
1858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Element, { ref, ...otherProps, className: classes, children });
|
|
1771
1859
|
};
|
|
1772
1860
|
Label.displayName = "Label";
|
|
1773
1861
|
}
|
|
@@ -1782,20 +1870,20 @@ var init_Label2 = __esm({
|
|
|
1782
1870
|
});
|
|
1783
1871
|
|
|
1784
1872
|
// src/components/Checkbox/CheckboxGroup.tsx
|
|
1785
|
-
var
|
|
1873
|
+
var import_dedupe16, import_react14, import_CheckboxGroup, import_jsx_runtime21, CheckboxGroup;
|
|
1786
1874
|
var init_CheckboxGroup = __esm({
|
|
1787
1875
|
"src/components/Checkbox/CheckboxGroup.tsx"() {
|
|
1788
1876
|
"use strict";
|
|
1789
1877
|
"use client";
|
|
1790
|
-
|
|
1791
|
-
|
|
1878
|
+
import_dedupe16 = __toESM(require("classnames/dedupe"));
|
|
1879
|
+
import_react14 = require("react");
|
|
1792
1880
|
init_hooks();
|
|
1793
1881
|
init_spaceDelimitedList();
|
|
1794
1882
|
init_ErrorMessage2();
|
|
1795
1883
|
init_Label2();
|
|
1796
1884
|
init_Checkbox();
|
|
1797
1885
|
import_CheckboxGroup = require("@simplybusiness/mobius/src/components/Checkbox/CheckboxGroup.css");
|
|
1798
|
-
|
|
1886
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1799
1887
|
CheckboxGroup = ({ ref, ...props }) => {
|
|
1800
1888
|
const {
|
|
1801
1889
|
label,
|
|
@@ -1813,10 +1901,10 @@ var init_CheckboxGroup = __esm({
|
|
|
1813
1901
|
lastItemDisables = false,
|
|
1814
1902
|
...rest
|
|
1815
1903
|
} = props;
|
|
1816
|
-
const [selected, setSelected] = (0,
|
|
1817
|
-
const isInitializedRef = (0,
|
|
1818
|
-
const prevDefaultValueRef = (0,
|
|
1819
|
-
(0,
|
|
1904
|
+
const [selected, setSelected] = (0, import_react14.useState)(defaultValue);
|
|
1905
|
+
const isInitializedRef = (0, import_react14.useRef)(false);
|
|
1906
|
+
const prevDefaultValueRef = (0, import_react14.useRef)(defaultValue);
|
|
1907
|
+
(0, import_react14.useEffect)(() => {
|
|
1820
1908
|
const hasChanged = defaultValue.length !== prevDefaultValueRef.current.length || defaultValue.some(
|
|
1821
1909
|
(val, index) => val !== prevDefaultValueRef.current[index]
|
|
1822
1910
|
);
|
|
@@ -1826,7 +1914,7 @@ var init_CheckboxGroup = __esm({
|
|
|
1826
1914
|
isInitializedRef.current = true;
|
|
1827
1915
|
}
|
|
1828
1916
|
}, [defaultValue]);
|
|
1829
|
-
const checkboxGroupClasses = (0,
|
|
1917
|
+
const checkboxGroupClasses = (0, import_dedupe16.default)(
|
|
1830
1918
|
"mobius",
|
|
1831
1919
|
"mobius-checkbox-group",
|
|
1832
1920
|
className,
|
|
@@ -1838,19 +1926,19 @@ var init_CheckboxGroup = __esm({
|
|
|
1838
1926
|
}
|
|
1839
1927
|
);
|
|
1840
1928
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
1841
|
-
const labelClasses = (0,
|
|
1929
|
+
const labelClasses = (0, import_dedupe16.default)(
|
|
1842
1930
|
{
|
|
1843
1931
|
"--is-disabled": isDisabled
|
|
1844
1932
|
},
|
|
1845
1933
|
validationClasses
|
|
1846
1934
|
);
|
|
1847
|
-
const errorMessageId = (0,
|
|
1935
|
+
const errorMessageId = (0, import_react14.useId)();
|
|
1848
1936
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
1849
1937
|
const describedBy = spaceDelimitedList([
|
|
1850
1938
|
shouldErrorMessageShow,
|
|
1851
1939
|
props["aria-describedby"]
|
|
1852
1940
|
]);
|
|
1853
|
-
const labelId = (0,
|
|
1941
|
+
const labelId = (0, import_react14.useId)();
|
|
1854
1942
|
const handleChange = (event, isLastItem = false) => {
|
|
1855
1943
|
const {
|
|
1856
1944
|
target: { value, checked }
|
|
@@ -1868,12 +1956,12 @@ var init_CheckboxGroup = __esm({
|
|
|
1868
1956
|
setSelected(newValue);
|
|
1869
1957
|
onChange?.(newValue);
|
|
1870
1958
|
};
|
|
1871
|
-
const childrenArray =
|
|
1959
|
+
const childrenArray = import_react14.Children.toArray(children);
|
|
1872
1960
|
const lastCheckbox = childrenArray.filter(
|
|
1873
|
-
(child) => (0,
|
|
1961
|
+
(child) => (0, import_react14.isValidElement)(child) && child.type === Checkbox
|
|
1874
1962
|
).pop();
|
|
1875
1963
|
const lastCheckboxIsChecked = lastCheckbox && selected.includes(lastCheckbox.props.value);
|
|
1876
|
-
return /* @__PURE__ */ (0,
|
|
1964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1877
1965
|
"div",
|
|
1878
1966
|
{
|
|
1879
1967
|
...rest,
|
|
@@ -1882,16 +1970,16 @@ var init_CheckboxGroup = __esm({
|
|
|
1882
1970
|
className: checkboxGroupClasses,
|
|
1883
1971
|
role: "group",
|
|
1884
1972
|
style: {
|
|
1885
|
-
"--checkbox-items-per-row": itemsPerRow ||
|
|
1973
|
+
"--checkbox-items-per-row": itemsPerRow || import_react14.Children.count(children)
|
|
1886
1974
|
},
|
|
1887
1975
|
children: [
|
|
1888
|
-
label && /* @__PURE__ */ (0,
|
|
1889
|
-
/* @__PURE__ */ (0,
|
|
1890
|
-
if ((0,
|
|
1976
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Label, { elementType: "span", id: labelId, className: labelClasses, children: label }),
|
|
1977
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "mobius-checkbox-group__wrapper", children: childrenArray.map((child) => {
|
|
1978
|
+
if ((0, import_react14.isValidElement)(child)) {
|
|
1891
1979
|
const isLastItem = child === lastCheckbox;
|
|
1892
1980
|
const isChildDisabled = isDisabled || lastItemDisables && lastCheckboxIsChecked && !isLastItem;
|
|
1893
1981
|
const childProps = child.props;
|
|
1894
|
-
return (0,
|
|
1982
|
+
return (0, import_react14.cloneElement)(
|
|
1895
1983
|
child,
|
|
1896
1984
|
{
|
|
1897
1985
|
isDisabled: isChildDisabled,
|
|
@@ -1907,7 +1995,7 @@ var init_CheckboxGroup = __esm({
|
|
|
1907
1995
|
}
|
|
1908
1996
|
return child;
|
|
1909
1997
|
}) }),
|
|
1910
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
1998
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
1911
1999
|
]
|
|
1912
2000
|
}
|
|
1913
2001
|
);
|
|
@@ -1934,23 +2022,23 @@ var init_Checkbox2 = __esm({
|
|
|
1934
2022
|
});
|
|
1935
2023
|
|
|
1936
2024
|
// src/components/Container/Container.tsx
|
|
1937
|
-
var
|
|
2025
|
+
var import_dedupe17, import_Container, import_jsx_runtime22, Container;
|
|
1938
2026
|
var init_Container = __esm({
|
|
1939
2027
|
"src/components/Container/Container.tsx"() {
|
|
1940
2028
|
"use strict";
|
|
1941
|
-
|
|
2029
|
+
import_dedupe17 = __toESM(require("classnames/dedupe"));
|
|
1942
2030
|
init_utils();
|
|
1943
2031
|
import_Container = require("@simplybusiness/mobius/src/components/Container/Container.css");
|
|
1944
|
-
|
|
2032
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1945
2033
|
Container = ({ ref, ...props }) => {
|
|
1946
2034
|
const { elementType: Element = "div", size = "md", ...otherProps } = props;
|
|
1947
|
-
const classes = (0,
|
|
2035
|
+
const classes = (0, import_dedupe17.default)(
|
|
1948
2036
|
"mobius",
|
|
1949
2037
|
"mobius-container",
|
|
1950
2038
|
sizeClasses(size),
|
|
1951
2039
|
otherProps.className
|
|
1952
2040
|
);
|
|
1953
|
-
return /* @__PURE__ */ (0,
|
|
2041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
1954
2042
|
};
|
|
1955
2043
|
Container.displayName = "Container";
|
|
1956
2044
|
}
|
|
@@ -2003,17 +2091,17 @@ var init_validation = __esm({
|
|
|
2003
2091
|
});
|
|
2004
2092
|
|
|
2005
2093
|
// src/components/DateField/DateField.tsx
|
|
2006
|
-
var
|
|
2094
|
+
var import_dedupe18, import_react15, import_jsx_runtime23, MIN_MAX_ERROR, DateField;
|
|
2007
2095
|
var init_DateField = __esm({
|
|
2008
2096
|
"src/components/DateField/DateField.tsx"() {
|
|
2009
2097
|
"use strict";
|
|
2010
2098
|
"use client";
|
|
2011
|
-
|
|
2012
|
-
|
|
2099
|
+
import_dedupe18 = __toESM(require("classnames/dedupe"));
|
|
2100
|
+
import_react15 = require("react");
|
|
2013
2101
|
init_mergeRefs();
|
|
2014
2102
|
init_TextField2();
|
|
2015
2103
|
init_validation();
|
|
2016
|
-
|
|
2104
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2017
2105
|
MIN_MAX_ERROR = '"min" value should not be greater than "max" value.';
|
|
2018
2106
|
DateField = ({ ref, ...props }) => {
|
|
2019
2107
|
const {
|
|
@@ -2026,10 +2114,10 @@ var init_DateField = __esm({
|
|
|
2026
2114
|
value,
|
|
2027
2115
|
...otherProps
|
|
2028
2116
|
} = props;
|
|
2029
|
-
const [error3, setError] = (0,
|
|
2030
|
-
const [isInvalid, setIsInvalid] = (0,
|
|
2031
|
-
const localRef = (0,
|
|
2032
|
-
const classes = (0,
|
|
2117
|
+
const [error3, setError] = (0, import_react15.useState)(errorMessage);
|
|
2118
|
+
const [isInvalid, setIsInvalid] = (0, import_react15.useState)(void 0);
|
|
2119
|
+
const localRef = (0, import_react15.useRef)(null);
|
|
2120
|
+
const classes = (0, import_dedupe18.default)("mobius-date-field", className);
|
|
2033
2121
|
const formattedMin = min ? convertToDateFormat(min, format) : void 0;
|
|
2034
2122
|
const formattedMax = max ? convertToDateFormat(max, format) : void 0;
|
|
2035
2123
|
const formattedDefaultValue = defaultValue ? convertToDateFormat(defaultValue, format) : void 0;
|
|
@@ -2042,7 +2130,7 @@ var init_DateField = __esm({
|
|
|
2042
2130
|
setError(props.errorMessage);
|
|
2043
2131
|
setIsInvalid(false);
|
|
2044
2132
|
};
|
|
2045
|
-
(0,
|
|
2133
|
+
(0, import_react15.useEffect)(() => {
|
|
2046
2134
|
if (!isValidDate(min, format)) {
|
|
2047
2135
|
setInvalidState(`Invalid min date: ${min}`);
|
|
2048
2136
|
return;
|
|
@@ -2075,7 +2163,7 @@ var init_DateField = __esm({
|
|
|
2075
2163
|
validate();
|
|
2076
2164
|
otherProps.onBlur?.(event);
|
|
2077
2165
|
};
|
|
2078
|
-
return /* @__PURE__ */ (0,
|
|
2166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2079
2167
|
TextField,
|
|
2080
2168
|
{
|
|
2081
2169
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -2106,23 +2194,23 @@ var init_DateField2 = __esm({
|
|
|
2106
2194
|
});
|
|
2107
2195
|
|
|
2108
2196
|
// src/components/Drawer/Content.tsx
|
|
2109
|
-
var
|
|
2197
|
+
var import_jsx_runtime24, Content;
|
|
2110
2198
|
var init_Content = __esm({
|
|
2111
2199
|
"src/components/Drawer/Content.tsx"() {
|
|
2112
2200
|
"use strict";
|
|
2113
|
-
|
|
2114
|
-
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
2201
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2202
|
+
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref, ...otherProps, className: "mobius-drawer__content", children });
|
|
2115
2203
|
Content.displayName = "Content";
|
|
2116
2204
|
}
|
|
2117
2205
|
});
|
|
2118
2206
|
|
|
2119
2207
|
// src/components/Drawer/DrawerContext.tsx
|
|
2120
|
-
var
|
|
2208
|
+
var import_react16, DrawerContext;
|
|
2121
2209
|
var init_DrawerContext = __esm({
|
|
2122
2210
|
"src/components/Drawer/DrawerContext.tsx"() {
|
|
2123
2211
|
"use strict";
|
|
2124
|
-
|
|
2125
|
-
DrawerContext = (0,
|
|
2212
|
+
import_react16 = require("react");
|
|
2213
|
+
DrawerContext = (0, import_react16.createContext)({
|
|
2126
2214
|
onClose: () => {
|
|
2127
2215
|
},
|
|
2128
2216
|
closeLabel: void 0,
|
|
@@ -2132,19 +2220,19 @@ var init_DrawerContext = __esm({
|
|
|
2132
2220
|
});
|
|
2133
2221
|
|
|
2134
2222
|
// src/components/Drawer/Drawer.tsx
|
|
2135
|
-
var
|
|
2223
|
+
var import_dedupe19, import_react17, import_Drawer, import_jsx_runtime25, TRANSITION_CSS_VARIABLE, Drawer;
|
|
2136
2224
|
var init_Drawer = __esm({
|
|
2137
2225
|
"src/components/Drawer/Drawer.tsx"() {
|
|
2138
2226
|
"use strict";
|
|
2139
2227
|
"use client";
|
|
2140
|
-
|
|
2141
|
-
|
|
2228
|
+
import_dedupe19 = __toESM(require("classnames/dedupe"));
|
|
2229
|
+
import_react17 = require("react");
|
|
2142
2230
|
init_hooks();
|
|
2143
2231
|
init_utils();
|
|
2144
2232
|
init_VisuallyHidden2();
|
|
2145
2233
|
init_DrawerContext();
|
|
2146
2234
|
import_Drawer = require("@simplybusiness/mobius/src/components/Drawer/Drawer.css");
|
|
2147
|
-
|
|
2235
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2148
2236
|
TRANSITION_CSS_VARIABLE = "--drawer-transition-duration";
|
|
2149
2237
|
Drawer = ({ ref, ...props }) => {
|
|
2150
2238
|
const {
|
|
@@ -2157,8 +2245,8 @@ var init_Drawer = __esm({
|
|
|
2157
2245
|
onClose,
|
|
2158
2246
|
children
|
|
2159
2247
|
} = props;
|
|
2160
|
-
const dialogRef = (0,
|
|
2161
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
2248
|
+
const dialogRef = (0, import_react17.useRef)(null);
|
|
2249
|
+
const [shouldTransition, setShouldTransition] = (0, import_react17.useState)(false);
|
|
2162
2250
|
const { close } = useDialog({
|
|
2163
2251
|
ref: dialogRef,
|
|
2164
2252
|
isOpen,
|
|
@@ -2169,9 +2257,9 @@ var init_Drawer = __esm({
|
|
|
2169
2257
|
CSSVariable: TRANSITION_CSS_VARIABLE
|
|
2170
2258
|
}
|
|
2171
2259
|
});
|
|
2172
|
-
const hiddenId = `dialog-screen-reader-announce-${(0,
|
|
2173
|
-
const headerId = `dialog-header-${(0,
|
|
2174
|
-
const dialogClasses = (0,
|
|
2260
|
+
const hiddenId = `dialog-screen-reader-announce-${(0, import_react17.useId)()}`;
|
|
2261
|
+
const headerId = `dialog-header-${(0, import_react17.useId)()}`;
|
|
2262
|
+
const dialogClasses = (0, import_dedupe19.default)(
|
|
2175
2263
|
"mobius",
|
|
2176
2264
|
"mobius-drawer",
|
|
2177
2265
|
`--${direction}`,
|
|
@@ -2180,10 +2268,10 @@ var init_Drawer = __esm({
|
|
|
2180
2268
|
"--should-transition": shouldTransition
|
|
2181
2269
|
}
|
|
2182
2270
|
);
|
|
2183
|
-
(0,
|
|
2271
|
+
(0, import_react17.useEffect)(() => {
|
|
2184
2272
|
setShouldTransition(supportsDialog());
|
|
2185
2273
|
}, []);
|
|
2186
|
-
const contextValue = (0,
|
|
2274
|
+
const contextValue = (0, import_react17.useMemo)(
|
|
2187
2275
|
() => ({
|
|
2188
2276
|
onClose: close,
|
|
2189
2277
|
closeLabel,
|
|
@@ -2191,18 +2279,18 @@ var init_Drawer = __esm({
|
|
|
2191
2279
|
}),
|
|
2192
2280
|
[close, closeLabel, headerId]
|
|
2193
2281
|
);
|
|
2194
|
-
return /* @__PURE__ */ (0,
|
|
2282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2195
2283
|
"dialog",
|
|
2196
2284
|
{
|
|
2197
|
-
id: (0,
|
|
2285
|
+
id: (0, import_react17.useId)(),
|
|
2198
2286
|
ref: mergeRefs([dialogRef, ref]),
|
|
2199
2287
|
onCancel: close,
|
|
2200
2288
|
className: dialogClasses,
|
|
2201
2289
|
"aria-describedby": hiddenId,
|
|
2202
2290
|
"aria-labelledby": headerId,
|
|
2203
2291
|
children: [
|
|
2204
|
-
/* @__PURE__ */ (0,
|
|
2205
|
-
/* @__PURE__ */ (0,
|
|
2292
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { id: hiddenId, children: announce }) }),
|
|
2293
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DrawerContext.Provider, { value: contextValue, children })
|
|
2206
2294
|
]
|
|
2207
2295
|
}
|
|
2208
2296
|
);
|
|
@@ -2212,21 +2300,21 @@ var init_Drawer = __esm({
|
|
|
2212
2300
|
});
|
|
2213
2301
|
|
|
2214
2302
|
// src/components/Drawer/useDrawer.ts
|
|
2215
|
-
var
|
|
2303
|
+
var import_react18, useDrawer;
|
|
2216
2304
|
var init_useDrawer = __esm({
|
|
2217
2305
|
"src/components/Drawer/useDrawer.ts"() {
|
|
2218
2306
|
"use strict";
|
|
2219
|
-
|
|
2307
|
+
import_react18 = require("react");
|
|
2220
2308
|
init_DrawerContext();
|
|
2221
2309
|
useDrawer = () => {
|
|
2222
|
-
const { onClose, closeLabel, headerId } = (0,
|
|
2310
|
+
const { onClose, closeLabel, headerId } = (0, import_react18.useContext)(DrawerContext);
|
|
2223
2311
|
return { onClose, closeLabel, headerId };
|
|
2224
2312
|
};
|
|
2225
2313
|
}
|
|
2226
2314
|
});
|
|
2227
2315
|
|
|
2228
2316
|
// src/components/Drawer/Header.tsx
|
|
2229
|
-
var import_icons7,
|
|
2317
|
+
var import_icons7, import_jsx_runtime26, Header;
|
|
2230
2318
|
var init_Header = __esm({
|
|
2231
2319
|
"src/components/Drawer/Header.tsx"() {
|
|
2232
2320
|
"use strict";
|
|
@@ -2234,12 +2322,12 @@ var init_Header = __esm({
|
|
|
2234
2322
|
init_Button2();
|
|
2235
2323
|
init_Icon2();
|
|
2236
2324
|
init_useDrawer();
|
|
2237
|
-
|
|
2325
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2238
2326
|
Header = ({ ref, children, ...otherProps }) => {
|
|
2239
2327
|
const { onClose, closeLabel, headerId } = useDrawer();
|
|
2240
|
-
return /* @__PURE__ */ (0,
|
|
2241
|
-
/* @__PURE__ */ (0,
|
|
2242
|
-
/* @__PURE__ */ (0,
|
|
2328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("header", { ref, ...otherProps, className: "mobius-drawer__header", children: [
|
|
2329
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h2", { id: headerId, children }),
|
|
2330
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2243
2331
|
Button,
|
|
2244
2332
|
{
|
|
2245
2333
|
"aria-label": "Close",
|
|
@@ -2248,7 +2336,7 @@ var init_Header = __esm({
|
|
|
2248
2336
|
className: "mobius-drawer__close",
|
|
2249
2337
|
size: "sm",
|
|
2250
2338
|
children: [
|
|
2251
|
-
/* @__PURE__ */ (0,
|
|
2339
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { icon: import_icons7.cross }),
|
|
2252
2340
|
" ",
|
|
2253
2341
|
closeLabel
|
|
2254
2342
|
]
|
|
@@ -2277,17 +2365,17 @@ var init_Drawer2 = __esm({
|
|
|
2277
2365
|
});
|
|
2278
2366
|
|
|
2279
2367
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2280
|
-
var
|
|
2368
|
+
var import_react19, import_react_accessible_dropdown_menu_hook, import_dedupe20, import_DropdownMenu, import_jsx_runtime27, DropdownMenu;
|
|
2281
2369
|
var init_DropdownMenu = __esm({
|
|
2282
2370
|
"src/components/DropdownMenu/DropdownMenu.tsx"() {
|
|
2283
2371
|
"use strict";
|
|
2284
2372
|
"use client";
|
|
2285
|
-
|
|
2373
|
+
import_react19 = require("react");
|
|
2286
2374
|
import_react_accessible_dropdown_menu_hook = __toESM(require("react-accessible-dropdown-menu-hook"));
|
|
2287
|
-
|
|
2375
|
+
import_dedupe20 = __toESM(require("classnames/dedupe"));
|
|
2288
2376
|
init_Button2();
|
|
2289
2377
|
import_DropdownMenu = require("@simplybusiness/mobius/src/components/DropdownMenu/DropdownMenu.css");
|
|
2290
|
-
|
|
2378
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2291
2379
|
DropdownMenu = ({ ref, ...props }) => {
|
|
2292
2380
|
const {
|
|
2293
2381
|
elementType: Element = "nav",
|
|
@@ -2296,21 +2384,21 @@ var init_DropdownMenu = __esm({
|
|
|
2296
2384
|
children,
|
|
2297
2385
|
...otherProps
|
|
2298
2386
|
} = props;
|
|
2299
|
-
const [activeId, setActiveId] = (0,
|
|
2300
|
-
const numberOfItems =
|
|
2387
|
+
const [activeId, setActiveId] = (0, import_react19.useState)(null);
|
|
2388
|
+
const numberOfItems = import_react19.Children.count(children);
|
|
2301
2389
|
const {
|
|
2302
2390
|
buttonProps,
|
|
2303
2391
|
itemProps,
|
|
2304
2392
|
isOpen: open,
|
|
2305
2393
|
setIsOpen
|
|
2306
2394
|
} = (0, import_react_accessible_dropdown_menu_hook.default)(numberOfItems);
|
|
2307
|
-
const classes = (0,
|
|
2395
|
+
const classes = (0, import_dedupe20.default)(
|
|
2308
2396
|
"mobius",
|
|
2309
2397
|
"mobius-dropdown-menu",
|
|
2310
2398
|
otherProps.className
|
|
2311
2399
|
);
|
|
2312
|
-
const triggerClasses = (0,
|
|
2313
|
-
const listClasses = (0,
|
|
2400
|
+
const triggerClasses = (0, import_dedupe20.default)("mobius", "mobius-dropdown-menu__trigger");
|
|
2401
|
+
const listClasses = (0, import_dedupe20.default)("mobius", "mobius-dropdown-menu__list", {
|
|
2314
2402
|
"--is-open": open
|
|
2315
2403
|
});
|
|
2316
2404
|
const handleChildClick = ({ onClick }, index) => {
|
|
@@ -2320,16 +2408,16 @@ var init_DropdownMenu = __esm({
|
|
|
2320
2408
|
onClick();
|
|
2321
2409
|
}
|
|
2322
2410
|
};
|
|
2323
|
-
return /* @__PURE__ */ (0,
|
|
2324
|
-
trigger ? (0,
|
|
2411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Element, { ref, ...otherProps, className: classes, children: [
|
|
2412
|
+
trigger ? (0, import_react19.cloneElement)(trigger, {
|
|
2325
2413
|
className: triggerClasses,
|
|
2326
2414
|
open,
|
|
2327
2415
|
label,
|
|
2328
2416
|
...buttonProps
|
|
2329
|
-
}) : /* @__PURE__ */ (0,
|
|
2330
|
-
/* @__PURE__ */ (0,
|
|
2331
|
-
if ((0,
|
|
2332
|
-
return (0,
|
|
2417
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { className: triggerClasses, ...buttonProps, children: label }),
|
|
2418
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("ul", { className: listClasses, role: "menu", children: import_react19.Children.map(children, (child, index) => {
|
|
2419
|
+
if ((0, import_react19.isValidElement)(child)) {
|
|
2420
|
+
return (0, import_react19.cloneElement)(child, {
|
|
2333
2421
|
onClick: () => handleChildClick(child.props, index),
|
|
2334
2422
|
active: index === activeId,
|
|
2335
2423
|
...itemProps[index]
|
|
@@ -2344,13 +2432,13 @@ var init_DropdownMenu = __esm({
|
|
|
2344
2432
|
});
|
|
2345
2433
|
|
|
2346
2434
|
// src/components/DropdownMenu/Item.tsx
|
|
2347
|
-
var
|
|
2435
|
+
var import_react20, import_dedupe21, import_jsx_runtime28, Item;
|
|
2348
2436
|
var init_Item = __esm({
|
|
2349
2437
|
"src/components/DropdownMenu/Item.tsx"() {
|
|
2350
2438
|
"use strict";
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2439
|
+
import_react20 = require("react");
|
|
2440
|
+
import_dedupe21 = __toESM(require("classnames/dedupe"));
|
|
2441
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2354
2442
|
Item = ({ ref, ...props }) => {
|
|
2355
2443
|
const {
|
|
2356
2444
|
elementType: Element = "li",
|
|
@@ -2359,26 +2447,26 @@ var init_Item = __esm({
|
|
|
2359
2447
|
children,
|
|
2360
2448
|
...otherProps
|
|
2361
2449
|
} = props;
|
|
2362
|
-
const classes = (0,
|
|
2450
|
+
const classes = (0, import_dedupe21.default)(
|
|
2363
2451
|
"mobius",
|
|
2364
2452
|
"mobius-dropdown-menu__item",
|
|
2365
2453
|
{ "--is-active": active },
|
|
2366
2454
|
otherProps.className
|
|
2367
2455
|
);
|
|
2368
|
-
return /* @__PURE__ */ (0,
|
|
2369
|
-
if ((0,
|
|
2370
|
-
const childClasses = (0,
|
|
2456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Element, { ref, onClick, ...otherProps, children: import_react20.Children.map(children, (child) => {
|
|
2457
|
+
if ((0, import_react20.isValidElement)(child)) {
|
|
2458
|
+
const childClasses = (0, import_dedupe21.default)(
|
|
2371
2459
|
child.props.className,
|
|
2372
2460
|
classes
|
|
2373
2461
|
);
|
|
2374
|
-
return (0,
|
|
2462
|
+
return (0, import_react20.cloneElement)(
|
|
2375
2463
|
child,
|
|
2376
2464
|
{
|
|
2377
2465
|
className: childClasses
|
|
2378
2466
|
}
|
|
2379
2467
|
);
|
|
2380
2468
|
}
|
|
2381
|
-
return /* @__PURE__ */ (0,
|
|
2469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: classes, children: child });
|
|
2382
2470
|
}) });
|
|
2383
2471
|
};
|
|
2384
2472
|
Item.displayName = "DropdownMenu.Item";
|
|
@@ -2403,23 +2491,23 @@ var init_DropdownMenu2 = __esm({
|
|
|
2403
2491
|
});
|
|
2404
2492
|
|
|
2405
2493
|
// src/components/Fieldset/Fieldset.tsx
|
|
2406
|
-
var
|
|
2494
|
+
var import_dedupe22, import_react21, import_Fieldset, import_jsx_runtime29, useFieldset, Fieldset;
|
|
2407
2495
|
var init_Fieldset = __esm({
|
|
2408
2496
|
"src/components/Fieldset/Fieldset.tsx"() {
|
|
2409
2497
|
"use strict";
|
|
2410
2498
|
"use client";
|
|
2411
|
-
|
|
2412
|
-
|
|
2499
|
+
import_dedupe22 = __toESM(require("classnames/dedupe"));
|
|
2500
|
+
import_react21 = require("react");
|
|
2413
2501
|
init_Flex2();
|
|
2414
2502
|
import_Fieldset = require("@simplybusiness/mobius/src/components/Fieldset/Fieldset.css");
|
|
2415
|
-
|
|
2503
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2416
2504
|
useFieldset = (props) => {
|
|
2417
2505
|
const { legend } = props;
|
|
2418
2506
|
let legendProps = {};
|
|
2419
2507
|
let containerProps = {
|
|
2420
2508
|
role: "group"
|
|
2421
2509
|
};
|
|
2422
|
-
const legendId = (0,
|
|
2510
|
+
const legendId = (0, import_react21.useId)();
|
|
2423
2511
|
if (legend) {
|
|
2424
2512
|
legendProps = {
|
|
2425
2513
|
...legendProps,
|
|
@@ -2439,14 +2527,14 @@ var init_Fieldset = __esm({
|
|
|
2439
2527
|
const {
|
|
2440
2528
|
children,
|
|
2441
2529
|
legend,
|
|
2442
|
-
legendComponent = /* @__PURE__ */ (0,
|
|
2530
|
+
legendComponent = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("legend", {}),
|
|
2443
2531
|
...otherProps
|
|
2444
2532
|
} = props;
|
|
2445
2533
|
const { legendProps, containerProps } = useFieldset(props);
|
|
2446
|
-
const classes = (0,
|
|
2534
|
+
const classes = (0, import_dedupe22.default)("mobius", "mobius-fieldset", props.className);
|
|
2447
2535
|
legendProps.className = "mobius-fieldset__legend";
|
|
2448
|
-
return /* @__PURE__ */ (0,
|
|
2449
|
-
legend && (0,
|
|
2536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Flex, { ...containerProps, ...otherProps, className: classes, children: [
|
|
2537
|
+
legend && (0, import_react21.cloneElement)(legendComponent, { ...legendProps }, [legend]),
|
|
2450
2538
|
children
|
|
2451
2539
|
] });
|
|
2452
2540
|
};
|
|
@@ -2463,13 +2551,13 @@ var init_Fieldset2 = __esm({
|
|
|
2463
2551
|
});
|
|
2464
2552
|
|
|
2465
2553
|
// src/components/Grid/Grid.tsx
|
|
2466
|
-
var
|
|
2554
|
+
var import_dedupe23, import_jsx_runtime30, Grid;
|
|
2467
2555
|
var init_Grid = __esm({
|
|
2468
2556
|
"src/components/Grid/Grid.tsx"() {
|
|
2469
2557
|
"use strict";
|
|
2470
|
-
|
|
2558
|
+
import_dedupe23 = __toESM(require("classnames/dedupe"));
|
|
2471
2559
|
init_utils();
|
|
2472
|
-
|
|
2560
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2473
2561
|
Grid = ({ ref: _ref, ...props }) => {
|
|
2474
2562
|
const {
|
|
2475
2563
|
columns = 12,
|
|
@@ -2484,7 +2572,7 @@ var init_Grid = __esm({
|
|
|
2484
2572
|
style,
|
|
2485
2573
|
...rest
|
|
2486
2574
|
} = props;
|
|
2487
|
-
const classes = (0,
|
|
2575
|
+
const classes = (0, import_dedupe23.default)("mobius", "mobius-grid", className);
|
|
2488
2576
|
const styles = filterUndefinedProps({
|
|
2489
2577
|
boxSizing: "border-box",
|
|
2490
2578
|
display: "grid",
|
|
@@ -2498,22 +2586,22 @@ var init_Grid = __esm({
|
|
|
2498
2586
|
justifyItems,
|
|
2499
2587
|
...style
|
|
2500
2588
|
});
|
|
2501
|
-
return /* @__PURE__ */ (0,
|
|
2589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style: styles, className: classes, ...rest });
|
|
2502
2590
|
};
|
|
2503
2591
|
Grid.displayName = "Grid";
|
|
2504
2592
|
}
|
|
2505
2593
|
});
|
|
2506
2594
|
|
|
2507
2595
|
// src/components/Grid/Item.tsx
|
|
2508
|
-
var
|
|
2596
|
+
var import_react22, import_dedupe24, import_jsx_runtime31, getBreakpointMap, DEFAULT_SPAN, GridItem;
|
|
2509
2597
|
var init_Item2 = __esm({
|
|
2510
2598
|
"src/components/Grid/Item.tsx"() {
|
|
2511
2599
|
"use strict";
|
|
2512
2600
|
"use client";
|
|
2513
|
-
|
|
2514
|
-
|
|
2601
|
+
import_react22 = require("react");
|
|
2602
|
+
import_dedupe24 = __toESM(require("classnames/dedupe"));
|
|
2515
2603
|
init_hooks();
|
|
2516
|
-
|
|
2604
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2517
2605
|
getBreakpointMap = (config) => Object.entries(config).reduce(
|
|
2518
2606
|
(prev, [key, value]) => {
|
|
2519
2607
|
const previous = Object.values(prev);
|
|
@@ -2548,9 +2636,9 @@ var init_Item2 = __esm({
|
|
|
2548
2636
|
xl,
|
|
2549
2637
|
xxl
|
|
2550
2638
|
});
|
|
2551
|
-
const [responsiveSpan, setResponsiveSpan] = (0,
|
|
2552
|
-
const classes = (0,
|
|
2553
|
-
(0,
|
|
2639
|
+
const [responsiveSpan, setResponsiveSpan] = (0, import_react22.useState)();
|
|
2640
|
+
const classes = (0, import_dedupe24.default)("mobius-grid__item", className);
|
|
2641
|
+
(0, import_react22.useEffect)(() => {
|
|
2554
2642
|
setResponsiveSpan(breakpointMap[breakpointSize]);
|
|
2555
2643
|
}, [breakpointSize, breakpointMap]);
|
|
2556
2644
|
const styles = {
|
|
@@ -2558,7 +2646,7 @@ var init_Item2 = __esm({
|
|
|
2558
2646
|
alignSelf,
|
|
2559
2647
|
justifySelf
|
|
2560
2648
|
};
|
|
2561
|
-
return /* @__PURE__ */ (0,
|
|
2649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { style: { ...styles }, className: classes, ...rest });
|
|
2562
2650
|
};
|
|
2563
2651
|
GridItem.displayName = "GridItem";
|
|
2564
2652
|
}
|
|
@@ -2579,20 +2667,20 @@ var init_Grid2 = __esm({
|
|
|
2579
2667
|
});
|
|
2580
2668
|
|
|
2581
2669
|
// src/components/Image/Image.tsx
|
|
2582
|
-
var
|
|
2670
|
+
var import_dedupe25, import_jsx_runtime32, Image;
|
|
2583
2671
|
var init_Image = __esm({
|
|
2584
2672
|
"src/components/Image/Image.tsx"() {
|
|
2585
2673
|
"use strict";
|
|
2586
|
-
|
|
2587
|
-
|
|
2674
|
+
import_dedupe25 = __toESM(require("classnames/dedupe"));
|
|
2675
|
+
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2588
2676
|
Image = ({
|
|
2589
2677
|
ref,
|
|
2590
2678
|
alt,
|
|
2591
2679
|
elementType: Component = "img",
|
|
2592
2680
|
...otherProps
|
|
2593
2681
|
}) => {
|
|
2594
|
-
const classes = (0,
|
|
2595
|
-
return /* @__PURE__ */ (0,
|
|
2682
|
+
const classes = (0, import_dedupe25.default)("mobius", "mobius-image", otherProps.className);
|
|
2683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Component, { alt, ref, ...otherProps, className: classes });
|
|
2596
2684
|
};
|
|
2597
2685
|
Image.displayName = "Image";
|
|
2598
2686
|
}
|
|
@@ -2607,13 +2695,13 @@ var init_Image2 = __esm({
|
|
|
2607
2695
|
});
|
|
2608
2696
|
|
|
2609
2697
|
// src/components/Link/Link.tsx
|
|
2610
|
-
var
|
|
2698
|
+
var import_dedupe26, import_Link, import_jsx_runtime33, Link;
|
|
2611
2699
|
var init_Link = __esm({
|
|
2612
2700
|
"src/components/Link/Link.tsx"() {
|
|
2613
2701
|
"use strict";
|
|
2614
|
-
|
|
2702
|
+
import_dedupe26 = __toESM(require("classnames/dedupe"));
|
|
2615
2703
|
import_Link = require("@simplybusiness/mobius/src/components/Link/Link.css");
|
|
2616
|
-
|
|
2704
|
+
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2617
2705
|
Link = ({ ref, ...props }) => {
|
|
2618
2706
|
const {
|
|
2619
2707
|
isDisabled = false,
|
|
@@ -2627,7 +2715,7 @@ var init_Link = __esm({
|
|
|
2627
2715
|
pointerEvents: "none"
|
|
2628
2716
|
};
|
|
2629
2717
|
const styles = { ...style, ...isDisabled && disabledStyles };
|
|
2630
|
-
const classes = (0,
|
|
2718
|
+
const classes = (0, import_dedupe26.default)(
|
|
2631
2719
|
"mobius",
|
|
2632
2720
|
"mobius-link",
|
|
2633
2721
|
className,
|
|
@@ -2636,7 +2724,7 @@ var init_Link = __esm({
|
|
|
2636
2724
|
"--is-disabled": isDisabled
|
|
2637
2725
|
}
|
|
2638
2726
|
);
|
|
2639
|
-
return /* @__PURE__ */ (0,
|
|
2727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2640
2728
|
Component,
|
|
2641
2729
|
{
|
|
2642
2730
|
ref,
|
|
@@ -2661,12 +2749,12 @@ var init_Link2 = __esm({
|
|
|
2661
2749
|
});
|
|
2662
2750
|
|
|
2663
2751
|
// src/components/LinkButton/LinkButton.tsx
|
|
2664
|
-
var
|
|
2752
|
+
var import_dedupe27, import_jsx_runtime34;
|
|
2665
2753
|
var init_LinkButton = __esm({
|
|
2666
2754
|
"src/components/LinkButton/LinkButton.tsx"() {
|
|
2667
2755
|
"use strict";
|
|
2668
|
-
|
|
2669
|
-
|
|
2756
|
+
import_dedupe27 = __toESM(require("classnames/dedupe"));
|
|
2757
|
+
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2670
2758
|
}
|
|
2671
2759
|
});
|
|
2672
2760
|
|
|
@@ -2679,14 +2767,14 @@ var init_LinkButton2 = __esm({
|
|
|
2679
2767
|
});
|
|
2680
2768
|
|
|
2681
2769
|
// src/components/List/List.tsx
|
|
2682
|
-
var
|
|
2770
|
+
var import_react23, import_dedupe28, import_List, import_jsx_runtime35, List;
|
|
2683
2771
|
var init_List = __esm({
|
|
2684
2772
|
"src/components/List/List.tsx"() {
|
|
2685
2773
|
"use strict";
|
|
2686
|
-
|
|
2687
|
-
|
|
2774
|
+
import_react23 = require("react");
|
|
2775
|
+
import_dedupe28 = __toESM(require("classnames/dedupe"));
|
|
2688
2776
|
import_List = require("@simplybusiness/mobius/src/components/List/List.css");
|
|
2689
|
-
|
|
2777
|
+
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2690
2778
|
List = ({ ref, ...props }) => {
|
|
2691
2779
|
const Component = props.isOrdered ? "ol" : "ul";
|
|
2692
2780
|
const { children, icon, ...otherProps } = props;
|
|
@@ -2695,7 +2783,7 @@ var init_List = __esm({
|
|
|
2695
2783
|
...restProps,
|
|
2696
2784
|
reversed: isReversed
|
|
2697
2785
|
};
|
|
2698
|
-
const classes = (0,
|
|
2786
|
+
const classes = (0, import_dedupe28.default)(
|
|
2699
2787
|
"mobius",
|
|
2700
2788
|
"mobius-list",
|
|
2701
2789
|
{
|
|
@@ -2704,9 +2792,9 @@ var init_List = __esm({
|
|
|
2704
2792
|
},
|
|
2705
2793
|
otherProps.className
|
|
2706
2794
|
);
|
|
2707
|
-
return /* @__PURE__ */ (0,
|
|
2708
|
-
if ((0,
|
|
2709
|
-
return (0,
|
|
2795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Component, { ref, ...mappedProps, className: classes, children: import_react23.Children.map(children, (child) => {
|
|
2796
|
+
if ((0, import_react23.isValidElement)(child)) {
|
|
2797
|
+
return (0, import_react23.cloneElement)(child, {
|
|
2710
2798
|
parentIcon: icon
|
|
2711
2799
|
});
|
|
2712
2800
|
}
|
|
@@ -2718,16 +2806,16 @@ var init_List = __esm({
|
|
|
2718
2806
|
});
|
|
2719
2807
|
|
|
2720
2808
|
// src/components/List/ListItem.tsx
|
|
2721
|
-
var
|
|
2809
|
+
var import_dedupe29, import_jsx_runtime36, ListItem;
|
|
2722
2810
|
var init_ListItem = __esm({
|
|
2723
2811
|
"src/components/List/ListItem.tsx"() {
|
|
2724
2812
|
"use strict";
|
|
2725
|
-
|
|
2726
|
-
|
|
2813
|
+
import_dedupe29 = __toESM(require("classnames/dedupe"));
|
|
2814
|
+
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2727
2815
|
ListItem = ({ ref, ...props }) => {
|
|
2728
2816
|
const { parentIcon, icon, children, ...otherProps } = props;
|
|
2729
2817
|
const iconContent = icon || parentIcon;
|
|
2730
|
-
const classes = (0,
|
|
2818
|
+
const classes = (0, import_dedupe29.default)(
|
|
2731
2819
|
"mobius",
|
|
2732
2820
|
"mobius-list__item",
|
|
2733
2821
|
{
|
|
@@ -2735,15 +2823,15 @@ var init_ListItem = __esm({
|
|
|
2735
2823
|
},
|
|
2736
2824
|
props.className
|
|
2737
2825
|
);
|
|
2738
|
-
const contentClasses = (0,
|
|
2739
|
-
const iconClasses = (0,
|
|
2826
|
+
const contentClasses = (0, import_dedupe29.default)("mobius", "mobius-list__item-content");
|
|
2827
|
+
const iconClasses = (0, import_dedupe29.default)("mobius", "mobius-list__icon");
|
|
2740
2828
|
if (iconContent) {
|
|
2741
|
-
return /* @__PURE__ */ (0,
|
|
2742
|
-
/* @__PURE__ */ (0,
|
|
2829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("li", { ref, ...otherProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: contentClasses, children: [
|
|
2830
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: iconClasses, children: iconContent }),
|
|
2743
2831
|
children
|
|
2744
2832
|
] }) });
|
|
2745
2833
|
}
|
|
2746
|
-
return /* @__PURE__ */ (0,
|
|
2834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("li", { ref, ...otherProps, className: classes, children });
|
|
2747
2835
|
};
|
|
2748
2836
|
ListItem.displayName = "ListItem";
|
|
2749
2837
|
}
|
|
@@ -2759,23 +2847,23 @@ var init_List2 = __esm({
|
|
|
2759
2847
|
});
|
|
2760
2848
|
|
|
2761
2849
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
2762
|
-
var
|
|
2850
|
+
var import_dedupe30, import_icons8, import_LoadingIndicator, import_jsx_runtime37, LoadingIndicator;
|
|
2763
2851
|
var init_LoadingIndicator = __esm({
|
|
2764
2852
|
"src/components/LoadingIndicator/LoadingIndicator.tsx"() {
|
|
2765
2853
|
"use strict";
|
|
2766
|
-
|
|
2854
|
+
import_dedupe30 = __toESM(require("classnames/dedupe"));
|
|
2767
2855
|
import_icons8 = require("@simplybusiness/icons");
|
|
2768
2856
|
init_Icon2();
|
|
2769
2857
|
import_LoadingIndicator = require("@simplybusiness/mobius/src/components/LoadingIndicator/LoadingIndicator.css");
|
|
2770
|
-
|
|
2858
|
+
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2771
2859
|
LoadingIndicator = ({ ref, ...props }) => {
|
|
2772
2860
|
const { icon = import_icons8.loading, ...otherProps } = props;
|
|
2773
|
-
const classes = (0,
|
|
2861
|
+
const classes = (0, import_dedupe30.default)(
|
|
2774
2862
|
"mobius",
|
|
2775
2863
|
"mobius-loading-indicator",
|
|
2776
2864
|
otherProps.className
|
|
2777
2865
|
);
|
|
2778
|
-
return /* @__PURE__ */ (0,
|
|
2866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon, { icon, spin: true, ref, ...otherProps, className: classes });
|
|
2779
2867
|
};
|
|
2780
2868
|
LoadingIndicator.displayName = "LoadingIndicator";
|
|
2781
2869
|
}
|
|
@@ -2790,16 +2878,16 @@ var init_LoadingIndicator2 = __esm({
|
|
|
2790
2878
|
});
|
|
2791
2879
|
|
|
2792
2880
|
// src/components/Logo/Logo.tsx
|
|
2793
|
-
var
|
|
2881
|
+
var import_dedupe31, import_jsx_runtime38, Logo;
|
|
2794
2882
|
var init_Logo = __esm({
|
|
2795
2883
|
"src/components/Logo/Logo.tsx"() {
|
|
2796
2884
|
"use strict";
|
|
2797
|
-
|
|
2798
|
-
|
|
2885
|
+
import_dedupe31 = __toESM(require("classnames/dedupe"));
|
|
2886
|
+
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2799
2887
|
Logo = ({ ref, ...props }) => {
|
|
2800
2888
|
const { className, width, height, ...otherProps } = props;
|
|
2801
|
-
const classes = (0,
|
|
2802
|
-
return /* @__PURE__ */ (0,
|
|
2889
|
+
const classes = (0, import_dedupe31.default)("mobius", "mobius-logo", className);
|
|
2890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
2803
2891
|
"svg",
|
|
2804
2892
|
{
|
|
2805
2893
|
width,
|
|
@@ -2809,7 +2897,7 @@ var init_Logo = __esm({
|
|
|
2809
2897
|
viewBox: "0 0 144 37",
|
|
2810
2898
|
...otherProps,
|
|
2811
2899
|
children: [
|
|
2812
|
-
/* @__PURE__ */ (0,
|
|
2900
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
2813
2901
|
"linearGradient",
|
|
2814
2902
|
{
|
|
2815
2903
|
id: "logo-gradient",
|
|
@@ -2818,27 +2906,27 @@ var init_Logo = __esm({
|
|
|
2818
2906
|
y1: "76.042%",
|
|
2819
2907
|
y2: "26.973%",
|
|
2820
2908
|
children: [
|
|
2821
|
-
/* @__PURE__ */ (0,
|
|
2822
|
-
/* @__PURE__ */ (0,
|
|
2909
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("stop", { stopColor: "#4632D8", offset: "0%" }),
|
|
2910
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("stop", { stopColor: "#9084E8", offset: "100%" })
|
|
2823
2911
|
]
|
|
2824
2912
|
}
|
|
2825
2913
|
) }),
|
|
2826
|
-
/* @__PURE__ */ (0,
|
|
2827
|
-
/* @__PURE__ */ (0,
|
|
2914
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("g", { children: [
|
|
2915
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2828
2916
|
"path",
|
|
2829
2917
|
{
|
|
2830
2918
|
fill: "#0E0A2B",
|
|
2831
2919
|
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"
|
|
2832
2920
|
}
|
|
2833
2921
|
),
|
|
2834
|
-
/* @__PURE__ */ (0,
|
|
2922
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2835
2923
|
"path",
|
|
2836
2924
|
{
|
|
2837
2925
|
fill: "url(#logo-gradient)",
|
|
2838
2926
|
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"
|
|
2839
2927
|
}
|
|
2840
2928
|
),
|
|
2841
|
-
/* @__PURE__ */ (0,
|
|
2929
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2842
2930
|
"path",
|
|
2843
2931
|
{
|
|
2844
2932
|
fill: "#0E0A2B",
|
|
@@ -2863,23 +2951,23 @@ var init_Logo2 = __esm({
|
|
|
2863
2951
|
});
|
|
2864
2952
|
|
|
2865
2953
|
// src/components/Modal/Content.tsx
|
|
2866
|
-
var
|
|
2954
|
+
var import_jsx_runtime39, Content2;
|
|
2867
2955
|
var init_Content2 = __esm({
|
|
2868
2956
|
"src/components/Modal/Content.tsx"() {
|
|
2869
2957
|
"use strict";
|
|
2870
|
-
|
|
2871
|
-
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
2958
|
+
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2959
|
+
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ref, ...otherProps, className: "mobius-modal__content", children });
|
|
2872
2960
|
Content2.displayName = "Content";
|
|
2873
2961
|
}
|
|
2874
2962
|
});
|
|
2875
2963
|
|
|
2876
2964
|
// src/components/Modal/ModalContext.tsx
|
|
2877
|
-
var
|
|
2965
|
+
var import_react24, ModalContext;
|
|
2878
2966
|
var init_ModalContext = __esm({
|
|
2879
2967
|
"src/components/Modal/ModalContext.tsx"() {
|
|
2880
2968
|
"use strict";
|
|
2881
|
-
|
|
2882
|
-
ModalContext = (0,
|
|
2969
|
+
import_react24 = require("react");
|
|
2970
|
+
ModalContext = (0, import_react24.createContext)({
|
|
2883
2971
|
onClose: () => {
|
|
2884
2972
|
},
|
|
2885
2973
|
closeLabel: void 0
|
|
@@ -2888,21 +2976,21 @@ var init_ModalContext = __esm({
|
|
|
2888
2976
|
});
|
|
2889
2977
|
|
|
2890
2978
|
// src/components/Modal/useModal.ts
|
|
2891
|
-
var
|
|
2979
|
+
var import_react25, useModal;
|
|
2892
2980
|
var init_useModal = __esm({
|
|
2893
2981
|
"src/components/Modal/useModal.ts"() {
|
|
2894
2982
|
"use strict";
|
|
2895
|
-
|
|
2983
|
+
import_react25 = require("react");
|
|
2896
2984
|
init_ModalContext();
|
|
2897
2985
|
useModal = () => {
|
|
2898
|
-
const { onClose, closeLabel } = (0,
|
|
2986
|
+
const { onClose, closeLabel } = (0, import_react25.useContext)(ModalContext);
|
|
2899
2987
|
return { onClose, closeLabel };
|
|
2900
2988
|
};
|
|
2901
2989
|
}
|
|
2902
2990
|
});
|
|
2903
2991
|
|
|
2904
2992
|
// src/components/Modal/Header.tsx
|
|
2905
|
-
var import_icons9,
|
|
2993
|
+
var import_icons9, import_jsx_runtime40, Header2;
|
|
2906
2994
|
var init_Header2 = __esm({
|
|
2907
2995
|
"src/components/Modal/Header.tsx"() {
|
|
2908
2996
|
"use strict";
|
|
@@ -2910,12 +2998,12 @@ var init_Header2 = __esm({
|
|
|
2910
2998
|
init_Button2();
|
|
2911
2999
|
init_Icon2();
|
|
2912
3000
|
init_useModal();
|
|
2913
|
-
|
|
3001
|
+
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2914
3002
|
Header2 = ({ ref, children, ...otherProps }) => {
|
|
2915
3003
|
const { onClose, closeLabel } = useModal();
|
|
2916
|
-
return /* @__PURE__ */ (0,
|
|
3004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("header", { ref, ...otherProps, className: "mobius-modal__header", children: [
|
|
2917
3005
|
children,
|
|
2918
|
-
/* @__PURE__ */ (0,
|
|
3006
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2919
3007
|
Button,
|
|
2920
3008
|
{
|
|
2921
3009
|
"aria-label": "Close",
|
|
@@ -2923,7 +3011,7 @@ var init_Header2 = __esm({
|
|
|
2923
3011
|
onPress: onClose,
|
|
2924
3012
|
className: "mobius-modal__close",
|
|
2925
3013
|
children: [
|
|
2926
|
-
/* @__PURE__ */ (0,
|
|
3014
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { icon: import_icons9.cross }),
|
|
2927
3015
|
" ",
|
|
2928
3016
|
closeLabel
|
|
2929
3017
|
]
|
|
@@ -2936,19 +3024,19 @@ var init_Header2 = __esm({
|
|
|
2936
3024
|
});
|
|
2937
3025
|
|
|
2938
3026
|
// src/components/Modal/Modal.tsx
|
|
2939
|
-
var
|
|
3027
|
+
var import_dedupe32, import_react26, import_Modal, import_jsx_runtime41, TRANSITION_CSS_VARIABLE2, Modal;
|
|
2940
3028
|
var init_Modal = __esm({
|
|
2941
3029
|
"src/components/Modal/Modal.tsx"() {
|
|
2942
3030
|
"use strict";
|
|
2943
3031
|
"use client";
|
|
2944
|
-
|
|
2945
|
-
|
|
3032
|
+
import_dedupe32 = __toESM(require("classnames/dedupe"));
|
|
3033
|
+
import_react26 = require("react");
|
|
2946
3034
|
init_hooks();
|
|
2947
3035
|
init_utils();
|
|
2948
3036
|
init_polyfill_tests();
|
|
2949
3037
|
init_ModalContext();
|
|
2950
3038
|
import_Modal = require("@simplybusiness/mobius/src/components/Modal/Modal.css");
|
|
2951
|
-
|
|
3039
|
+
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2952
3040
|
TRANSITION_CSS_VARIABLE2 = "--modal-transition-duration";
|
|
2953
3041
|
Modal = ({ ref, ...props }) => {
|
|
2954
3042
|
const {
|
|
@@ -2962,11 +3050,11 @@ var init_Modal = __esm({
|
|
|
2962
3050
|
animation,
|
|
2963
3051
|
...rest
|
|
2964
3052
|
} = props;
|
|
2965
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
2966
|
-
(0,
|
|
3053
|
+
const [shouldTransition, setShouldTransition] = (0, import_react26.useState)(false);
|
|
3054
|
+
(0, import_react26.useEffect)(() => {
|
|
2967
3055
|
setShouldTransition(supportsDialog());
|
|
2968
3056
|
}, []);
|
|
2969
|
-
const dialogRef = (0,
|
|
3057
|
+
const dialogRef = (0, import_react26.useRef)(null);
|
|
2970
3058
|
const { close } = useDialog({
|
|
2971
3059
|
ref: dialogRef,
|
|
2972
3060
|
isOpen,
|
|
@@ -2977,7 +3065,7 @@ var init_Modal = __esm({
|
|
|
2977
3065
|
CSSVariable: TRANSITION_CSS_VARIABLE2
|
|
2978
3066
|
}
|
|
2979
3067
|
});
|
|
2980
|
-
const modalClasses = (0,
|
|
3068
|
+
const modalClasses = (0, import_dedupe32.default)(
|
|
2981
3069
|
"mobius",
|
|
2982
3070
|
"mobius-modal",
|
|
2983
3071
|
{
|
|
@@ -2990,21 +3078,21 @@ var init_Modal = __esm({
|
|
|
2990
3078
|
},
|
|
2991
3079
|
className
|
|
2992
3080
|
);
|
|
2993
|
-
const contextValue = (0,
|
|
3081
|
+
const contextValue = (0, import_react26.useMemo)(
|
|
2994
3082
|
() => ({
|
|
2995
3083
|
onClose: close,
|
|
2996
3084
|
closeLabel
|
|
2997
3085
|
}),
|
|
2998
3086
|
[close, closeLabel]
|
|
2999
3087
|
);
|
|
3000
|
-
return /* @__PURE__ */ (0,
|
|
3088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3001
3089
|
"dialog",
|
|
3002
3090
|
{
|
|
3003
3091
|
ref: mergeRefs([dialogRef, ref]),
|
|
3004
3092
|
onCancel: close,
|
|
3005
3093
|
className: modalClasses,
|
|
3006
3094
|
...rest,
|
|
3007
|
-
children: /* @__PURE__ */ (0,
|
|
3095
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ModalContext.Provider, { value: contextValue, children })
|
|
3008
3096
|
}
|
|
3009
3097
|
);
|
|
3010
3098
|
};
|
|
@@ -3029,16 +3117,16 @@ var init_Modal2 = __esm({
|
|
|
3029
3117
|
});
|
|
3030
3118
|
|
|
3031
3119
|
// src/components/NumberField/NumberField.tsx
|
|
3032
|
-
var
|
|
3120
|
+
var import_dedupe33, import_react27, import_NumberField, import_jsx_runtime42, NumberField;
|
|
3033
3121
|
var init_NumberField = __esm({
|
|
3034
3122
|
"src/components/NumberField/NumberField.tsx"() {
|
|
3035
3123
|
"use strict";
|
|
3036
3124
|
"use client";
|
|
3037
|
-
|
|
3038
|
-
|
|
3125
|
+
import_dedupe33 = __toESM(require("classnames/dedupe"));
|
|
3126
|
+
import_react27 = require("react");
|
|
3039
3127
|
init_TextField2();
|
|
3040
3128
|
import_NumberField = require("@simplybusiness/mobius/src/components/NumberField/NumberField.css");
|
|
3041
|
-
|
|
3129
|
+
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3042
3130
|
NumberField = ({ ref, ...props }) => {
|
|
3043
3131
|
const {
|
|
3044
3132
|
minValue,
|
|
@@ -3054,15 +3142,15 @@ var init_NumberField = __esm({
|
|
|
3054
3142
|
onBlur: customOnBlur,
|
|
3055
3143
|
...rest
|
|
3056
3144
|
} = otherProps;
|
|
3057
|
-
const focusedInputRef = (0,
|
|
3058
|
-
const wheelHandler = (0,
|
|
3059
|
-
(0,
|
|
3145
|
+
const focusedInputRef = (0, import_react27.useRef)(null);
|
|
3146
|
+
const wheelHandler = (0, import_react27.useCallback)((ev) => ev.preventDefault(), []);
|
|
3147
|
+
(0, import_react27.useEffect)(() => {
|
|
3060
3148
|
return () => {
|
|
3061
3149
|
focusedInputRef.current?.removeEventListener("wheel", wheelHandler);
|
|
3062
3150
|
focusedInputRef.current = null;
|
|
3063
3151
|
};
|
|
3064
3152
|
}, [wheelHandler]);
|
|
3065
|
-
const containerClasses = (0,
|
|
3153
|
+
const containerClasses = (0, import_dedupe33.default)("mobius-number-field", className, {
|
|
3066
3154
|
"--hide-spin-buttons": hideSpinButtons
|
|
3067
3155
|
});
|
|
3068
3156
|
const handleBeforeInput = (event) => {
|
|
@@ -3106,7 +3194,7 @@ var init_NumberField = __esm({
|
|
|
3106
3194
|
},
|
|
3107
3195
|
onBlur: (e) => handleBlur(e)
|
|
3108
3196
|
};
|
|
3109
|
-
return /* @__PURE__ */ (0,
|
|
3197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3110
3198
|
TextField,
|
|
3111
3199
|
{
|
|
3112
3200
|
...forwardedProps,
|
|
@@ -3134,18 +3222,18 @@ var init_NumberField2 = __esm({
|
|
|
3134
3222
|
});
|
|
3135
3223
|
|
|
3136
3224
|
// src/components/Option/Option.tsx
|
|
3137
|
-
var
|
|
3225
|
+
var import_jsx_runtime43, Option;
|
|
3138
3226
|
var init_Option = __esm({
|
|
3139
3227
|
"src/components/Option/Option.tsx"() {
|
|
3140
3228
|
"use strict";
|
|
3141
|
-
|
|
3229
|
+
import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3142
3230
|
Option = ({ ref, ...props }) => {
|
|
3143
3231
|
const { isDisabled, ...rest } = props;
|
|
3144
3232
|
const mappedProps = {
|
|
3145
3233
|
...rest,
|
|
3146
3234
|
disabled: isDisabled
|
|
3147
3235
|
};
|
|
3148
|
-
return /* @__PURE__ */ (0,
|
|
3236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("option", { ...mappedProps, ref });
|
|
3149
3237
|
};
|
|
3150
3238
|
Option.displayName = "Option";
|
|
3151
3239
|
}
|
|
@@ -3160,17 +3248,17 @@ var init_Option2 = __esm({
|
|
|
3160
3248
|
});
|
|
3161
3249
|
|
|
3162
3250
|
// src/components/PasswordField/ShowHideButton.tsx
|
|
3163
|
-
var import_icons10,
|
|
3251
|
+
var import_icons10, import_jsx_runtime44, ShowHideButton;
|
|
3164
3252
|
var init_ShowHideButton = __esm({
|
|
3165
3253
|
"src/components/PasswordField/ShowHideButton.tsx"() {
|
|
3166
3254
|
"use strict";
|
|
3167
3255
|
import_icons10 = require("@simplybusiness/icons");
|
|
3168
3256
|
init_src();
|
|
3169
|
-
|
|
3257
|
+
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3170
3258
|
ShowHideButton = ({
|
|
3171
3259
|
show = false,
|
|
3172
3260
|
onClick
|
|
3173
|
-
}) => /* @__PURE__ */ (0,
|
|
3261
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3174
3262
|
"button",
|
|
3175
3263
|
{
|
|
3176
3264
|
className: "mobius-password-field__show-button",
|
|
@@ -3181,35 +3269,35 @@ var init_ShowHideButton = __esm({
|
|
|
3181
3269
|
},
|
|
3182
3270
|
"aria-label": `${show ? "Hide" : "Show"} password`,
|
|
3183
3271
|
"data-testid": "show-hide-button",
|
|
3184
|
-
children: /* @__PURE__ */ (0,
|
|
3272
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { icon: show ? import_icons10.eyeSlash : import_icons10.eye, "aria-hidden": "true" })
|
|
3185
3273
|
}
|
|
3186
3274
|
);
|
|
3187
3275
|
}
|
|
3188
3276
|
});
|
|
3189
3277
|
|
|
3190
3278
|
// src/components/PasswordField/PasswordField.tsx
|
|
3191
|
-
var
|
|
3279
|
+
var import_dedupe34, import_react28, import_PasswordField, import_jsx_runtime45, PasswordField;
|
|
3192
3280
|
var init_PasswordField = __esm({
|
|
3193
3281
|
"src/components/PasswordField/PasswordField.tsx"() {
|
|
3194
3282
|
"use strict";
|
|
3195
3283
|
"use client";
|
|
3196
|
-
|
|
3197
|
-
|
|
3284
|
+
import_dedupe34 = __toESM(require("classnames/dedupe"));
|
|
3285
|
+
import_react28 = require("react");
|
|
3198
3286
|
init_mergeRefs();
|
|
3199
3287
|
init_TextField2();
|
|
3200
3288
|
init_ShowHideButton();
|
|
3201
3289
|
import_PasswordField = require("@simplybusiness/mobius/src/components/PasswordField/PasswordField.css");
|
|
3202
|
-
|
|
3290
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3203
3291
|
PasswordField = ({
|
|
3204
3292
|
ref,
|
|
3205
3293
|
className,
|
|
3206
3294
|
autoComplete = "current-password",
|
|
3207
3295
|
...props
|
|
3208
3296
|
}) => {
|
|
3209
|
-
const [show, setShow] = (0,
|
|
3297
|
+
const [show, setShow] = (0, import_react28.useState)(false);
|
|
3210
3298
|
const type = show ? "text" : "password";
|
|
3211
|
-
const classes = (0,
|
|
3212
|
-
const localRef = (0,
|
|
3299
|
+
const classes = (0, import_dedupe34.default)("mobius-password-field", className);
|
|
3300
|
+
const localRef = (0, import_react28.useRef)(null);
|
|
3213
3301
|
const handleShowHideButtonClick = () => {
|
|
3214
3302
|
const selectionStart = localRef.current?.selectionStart;
|
|
3215
3303
|
const selectionEnd = localRef.current?.selectionEnd;
|
|
@@ -3221,7 +3309,7 @@ var init_PasswordField = __esm({
|
|
|
3221
3309
|
}
|
|
3222
3310
|
});
|
|
3223
3311
|
};
|
|
3224
|
-
return /* @__PURE__ */ (0,
|
|
3312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3225
3313
|
TextField,
|
|
3226
3314
|
{
|
|
3227
3315
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -3229,7 +3317,7 @@ var init_PasswordField = __esm({
|
|
|
3229
3317
|
...props,
|
|
3230
3318
|
autoComplete,
|
|
3231
3319
|
type,
|
|
3232
|
-
suffixInside: /* @__PURE__ */ (0,
|
|
3320
|
+
suffixInside: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ShowHideButton, { onClick: handleShowHideButtonClick, show })
|
|
3233
3321
|
}
|
|
3234
3322
|
);
|
|
3235
3323
|
};
|
|
@@ -3246,17 +3334,17 @@ var init_PasswordField2 = __esm({
|
|
|
3246
3334
|
});
|
|
3247
3335
|
|
|
3248
3336
|
// src/components/Popover/Popover.tsx
|
|
3249
|
-
var
|
|
3337
|
+
var import_react29, import_icons11, import_dedupe35, import_react30, import_mobius_hooks4, import_Popover, import_jsx_runtime46;
|
|
3250
3338
|
var init_Popover = __esm({
|
|
3251
3339
|
"src/components/Popover/Popover.tsx"() {
|
|
3252
3340
|
"use strict";
|
|
3253
|
-
|
|
3341
|
+
import_react29 = require("@floating-ui/react");
|
|
3254
3342
|
import_icons11 = require("@simplybusiness/icons");
|
|
3255
|
-
|
|
3256
|
-
|
|
3343
|
+
import_dedupe35 = __toESM(require("classnames/dedupe"));
|
|
3344
|
+
import_react30 = require("react");
|
|
3257
3345
|
import_mobius_hooks4 = require("@simplybusiness/mobius-hooks");
|
|
3258
3346
|
import_Popover = require("@simplybusiness/mobius/src/components/Popover/Popover.css");
|
|
3259
|
-
|
|
3347
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3260
3348
|
}
|
|
3261
3349
|
});
|
|
3262
3350
|
|
|
@@ -3280,17 +3368,17 @@ function warnAboutInvalidValues(value, minValue, maxValue) {
|
|
|
3280
3368
|
console.warn("Progress value is greater than maxValue");
|
|
3281
3369
|
}
|
|
3282
3370
|
}
|
|
3283
|
-
var
|
|
3371
|
+
var import_dedupe36, import_react31, import_Progress, import_jsx_runtime47, sanitizedValue, getLabelComponent, DEFAULT_VALUE, DEFAULT_MIN_VALUE, DEFAULT_MAX_VALUE, Progress;
|
|
3284
3372
|
var init_Progress = __esm({
|
|
3285
3373
|
"src/components/Progress/Progress.tsx"() {
|
|
3286
3374
|
"use strict";
|
|
3287
3375
|
"use client";
|
|
3288
|
-
|
|
3289
|
-
|
|
3376
|
+
import_dedupe36 = __toESM(require("classnames/dedupe"));
|
|
3377
|
+
import_react31 = require("react");
|
|
3290
3378
|
init_Label2();
|
|
3291
3379
|
init_VisuallyHidden2();
|
|
3292
3380
|
import_Progress = require("@simplybusiness/mobius/src/components/Progress/Progress.css");
|
|
3293
|
-
|
|
3381
|
+
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3294
3382
|
sanitizedValue = (value, defaultValue) => {
|
|
3295
3383
|
if (value === void 0 || Number.isNaN(value)) {
|
|
3296
3384
|
return defaultValue;
|
|
@@ -3299,7 +3387,7 @@ var init_Progress = __esm({
|
|
|
3299
3387
|
};
|
|
3300
3388
|
getLabelComponent = (label, progressLabelId, showLabel) => {
|
|
3301
3389
|
if (showLabel) {
|
|
3302
|
-
return /* @__PURE__ */ (0,
|
|
3390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3303
3391
|
Label,
|
|
3304
3392
|
{
|
|
3305
3393
|
id: progressLabelId,
|
|
@@ -3309,7 +3397,7 @@ var init_Progress = __esm({
|
|
|
3309
3397
|
}
|
|
3310
3398
|
);
|
|
3311
3399
|
}
|
|
3312
|
-
return /* @__PURE__ */ (0,
|
|
3400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3313
3401
|
Label,
|
|
3314
3402
|
{
|
|
3315
3403
|
id: progressLabelId,
|
|
@@ -3323,8 +3411,8 @@ var init_Progress = __esm({
|
|
|
3323
3411
|
DEFAULT_MIN_VALUE = 0;
|
|
3324
3412
|
DEFAULT_MAX_VALUE = 100;
|
|
3325
3413
|
Progress = ({ ref, ...props }) => {
|
|
3326
|
-
const progressId = (0,
|
|
3327
|
-
const progressLabelId = (0,
|
|
3414
|
+
const progressId = (0, import_react31.useId)();
|
|
3415
|
+
const progressLabelId = (0, import_react31.useId)();
|
|
3328
3416
|
const {
|
|
3329
3417
|
id,
|
|
3330
3418
|
label,
|
|
@@ -3349,7 +3437,7 @@ var init_Progress = __esm({
|
|
|
3349
3437
|
100
|
|
3350
3438
|
);
|
|
3351
3439
|
const barWidth = `${percentage}%`;
|
|
3352
|
-
const classes = (0,
|
|
3440
|
+
const classes = (0, import_dedupe36.default)("mobius", "mobius-progress", className, {
|
|
3353
3441
|
"--is-primary": variant === "primary",
|
|
3354
3442
|
"--is-secondary": variant === "secondary"
|
|
3355
3443
|
});
|
|
@@ -3359,7 +3447,7 @@ var init_Progress = __esm({
|
|
|
3359
3447
|
progressBarProps["aria-valuenow"] = value.toString();
|
|
3360
3448
|
progressBarProps["aria-valuetext"] = valueFormatter instanceof Function ? valueFormatter(value, minValue, maxValue) : barWidth;
|
|
3361
3449
|
const labelComponent = getLabelComponent(label, progressLabelId, showLabel);
|
|
3362
|
-
return /* @__PURE__ */ (0,
|
|
3450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
3363
3451
|
"div",
|
|
3364
3452
|
{
|
|
3365
3453
|
id: id || progressId,
|
|
@@ -3370,8 +3458,8 @@ var init_Progress = __esm({
|
|
|
3370
3458
|
"aria-labelledby": progressLabelId,
|
|
3371
3459
|
children: [
|
|
3372
3460
|
labelComponent,
|
|
3373
|
-
/* @__PURE__ */ (0,
|
|
3374
|
-
showValueLabel && /* @__PURE__ */ (0,
|
|
3461
|
+
/* @__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 } }) }),
|
|
3462
|
+
showValueLabel && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Label, { "data-testid": "value-label", elementType: "span", children: progressBarProps["aria-valuetext"] })
|
|
3375
3463
|
]
|
|
3376
3464
|
}
|
|
3377
3465
|
);
|
|
@@ -3389,17 +3477,17 @@ var init_Progress2 = __esm({
|
|
|
3389
3477
|
});
|
|
3390
3478
|
|
|
3391
3479
|
// src/components/Radio/Radio.tsx
|
|
3392
|
-
var
|
|
3480
|
+
var import_dedupe37, import_react32, import_Radio, import_jsx_runtime48, Radio;
|
|
3393
3481
|
var init_Radio = __esm({
|
|
3394
3482
|
"src/components/Radio/Radio.tsx"() {
|
|
3395
3483
|
"use strict";
|
|
3396
3484
|
"use client";
|
|
3397
|
-
|
|
3398
|
-
|
|
3485
|
+
import_dedupe37 = __toESM(require("classnames/dedupe"));
|
|
3486
|
+
import_react32 = require("react");
|
|
3399
3487
|
init_ErrorMessage2();
|
|
3400
3488
|
init_Label2();
|
|
3401
3489
|
import_Radio = require("@simplybusiness/mobius/src/components/Radio/Radio.css");
|
|
3402
|
-
|
|
3490
|
+
import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3403
3491
|
Radio = ({ ref, ...props }) => {
|
|
3404
3492
|
const {
|
|
3405
3493
|
children,
|
|
@@ -3423,19 +3511,19 @@ var init_Radio = __esm({
|
|
|
3423
3511
|
const isMultiline = label && children;
|
|
3424
3512
|
const isControlled = selected !== void 0;
|
|
3425
3513
|
const isChecked = isControlled ? selected === value : defaultChecked;
|
|
3426
|
-
const contentRef = (0,
|
|
3427
|
-
const prevOverflowRef = (0,
|
|
3514
|
+
const contentRef = (0, import_react32.useRef)(null);
|
|
3515
|
+
const prevOverflowRef = (0, import_react32.useRef)({
|
|
3428
3516
|
vertical: false,
|
|
3429
3517
|
horizontal: false
|
|
3430
3518
|
});
|
|
3431
|
-
const hasIconFirst = (0,
|
|
3432
|
-
if (!children ||
|
|
3433
|
-
const firstChild =
|
|
3434
|
-
if (!(0,
|
|
3519
|
+
const hasIconFirst = (0, import_react32.useMemo)(() => {
|
|
3520
|
+
if (!children || import_react32.Children.count(children) === 0) return false;
|
|
3521
|
+
const firstChild = import_react32.Children.toArray(children)[0];
|
|
3522
|
+
if (!(0, import_react32.isValidElement)(firstChild)) return false;
|
|
3435
3523
|
const props2 = firstChild.props;
|
|
3436
3524
|
return "icon" in props2 && props2.icon !== void 0;
|
|
3437
3525
|
}, [children]);
|
|
3438
|
-
(0,
|
|
3526
|
+
(0, import_react32.useLayoutEffect)(() => {
|
|
3439
3527
|
if (!contentRef.current || !onOverflow) return;
|
|
3440
3528
|
if (orientation === "vertical") {
|
|
3441
3529
|
return;
|
|
@@ -3464,13 +3552,13 @@ var init_Radio = __esm({
|
|
|
3464
3552
|
"--is-multiline": !!isMultiline,
|
|
3465
3553
|
"--is-required": isRequired
|
|
3466
3554
|
};
|
|
3467
|
-
const containerClasses = (0,
|
|
3555
|
+
const containerClasses = (0, import_dedupe37.default)(
|
|
3468
3556
|
"mobius-radio__label",
|
|
3469
3557
|
radioClasses,
|
|
3470
3558
|
className,
|
|
3471
3559
|
{ "--has-icon-first": hasIconFirst }
|
|
3472
3560
|
);
|
|
3473
|
-
const inputClasses = (0,
|
|
3561
|
+
const inputClasses = (0, import_dedupe37.default)("mobius-radio__input", radioClasses);
|
|
3474
3562
|
const { "aria-describedby": _ariaDescribedBy, ...rest } = otherProps;
|
|
3475
3563
|
const handleChange = (event) => {
|
|
3476
3564
|
if (setSelected) {
|
|
@@ -3484,9 +3572,9 @@ var init_Radio = __esm({
|
|
|
3484
3572
|
onChange(adaptedEvent);
|
|
3485
3573
|
}
|
|
3486
3574
|
};
|
|
3487
|
-
return /* @__PURE__ */ (0,
|
|
3488
|
-
/* @__PURE__ */ (0,
|
|
3489
|
-
/* @__PURE__ */ (0,
|
|
3575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
3576
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Label, { className: containerClasses, children: [
|
|
3577
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3490
3578
|
"input",
|
|
3491
3579
|
{
|
|
3492
3580
|
"aria-describedby": otherProps["aria-describedby"],
|
|
@@ -3503,12 +3591,12 @@ var init_Radio = __esm({
|
|
|
3503
3591
|
...rest
|
|
3504
3592
|
}
|
|
3505
3593
|
),
|
|
3506
|
-
isMultiline ? /* @__PURE__ */ (0,
|
|
3507
|
-
/* @__PURE__ */ (0,
|
|
3508
|
-
/* @__PURE__ */ (0,
|
|
3509
|
-
] }) : /* @__PURE__ */ (0,
|
|
3594
|
+
isMultiline ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { ref: contentRef, className: "mobius-radio__content--multiline", children: [
|
|
3595
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "mobius-radio__content-first-line", children: label }),
|
|
3596
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "mobius-radio__extra-content", children })
|
|
3597
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { ref: contentRef, className: "mobius-radio__content", children: label || children })
|
|
3510
3598
|
] }),
|
|
3511
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
3599
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ErrorMessage, { errorMessage })
|
|
3512
3600
|
] });
|
|
3513
3601
|
};
|
|
3514
3602
|
Radio.displayName = "Radio";
|
|
@@ -3516,19 +3604,19 @@ var init_Radio = __esm({
|
|
|
3516
3604
|
});
|
|
3517
3605
|
|
|
3518
3606
|
// src/components/Radio/RadioGroup.tsx
|
|
3519
|
-
var
|
|
3607
|
+
var import_dedupe38, import_react33, import_jsx_runtime49, getDefaultVal, RadioGroup;
|
|
3520
3608
|
var init_RadioGroup = __esm({
|
|
3521
3609
|
"src/components/Radio/RadioGroup.tsx"() {
|
|
3522
3610
|
"use strict";
|
|
3523
3611
|
"use client";
|
|
3524
|
-
|
|
3525
|
-
|
|
3612
|
+
import_dedupe38 = __toESM(require("classnames/dedupe"));
|
|
3613
|
+
import_react33 = require("react");
|
|
3526
3614
|
init_hooks();
|
|
3527
3615
|
init_spaceDelimitedList();
|
|
3528
3616
|
init_ErrorMessage2();
|
|
3529
3617
|
init_Label2();
|
|
3530
3618
|
init_Stack2();
|
|
3531
|
-
|
|
3619
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3532
3620
|
getDefaultVal = (children, defaultValue) => {
|
|
3533
3621
|
if (Array.isArray(children) && defaultValue) {
|
|
3534
3622
|
const option = children?.find((item) => item.props.value === defaultValue);
|
|
@@ -3556,15 +3644,15 @@ var init_RadioGroup = __esm({
|
|
|
3556
3644
|
...rest
|
|
3557
3645
|
} = props;
|
|
3558
3646
|
const defaultSelected = getDefaultVal(children, value || defaultValue);
|
|
3559
|
-
const [selected, setSelected] = (0,
|
|
3560
|
-
const overflowsRef = (0,
|
|
3561
|
-
const [hasOverflow, setHasOverflow] = (0,
|
|
3562
|
-
(0,
|
|
3647
|
+
const [selected, setSelected] = (0, import_react33.useState)(defaultSelected);
|
|
3648
|
+
const overflowsRef = (0, import_react33.useRef)({});
|
|
3649
|
+
const [hasOverflow, setHasOverflow] = (0, import_react33.useState)(false);
|
|
3650
|
+
(0, import_react33.useEffect)(() => {
|
|
3563
3651
|
if (value !== void 0) {
|
|
3564
3652
|
setSelected(value);
|
|
3565
3653
|
}
|
|
3566
3654
|
}, [value]);
|
|
3567
|
-
const handleOverflow = (0,
|
|
3655
|
+
const handleOverflow = (0, import_react33.useCallback)(
|
|
3568
3656
|
(radioValue, overflow) => {
|
|
3569
3657
|
overflowsRef.current = {
|
|
3570
3658
|
...overflowsRef.current,
|
|
@@ -3588,26 +3676,26 @@ var init_RadioGroup = __esm({
|
|
|
3588
3676
|
[`--is-${effectiveOrientation}`]: true,
|
|
3589
3677
|
[className || ""]: true
|
|
3590
3678
|
};
|
|
3591
|
-
const radioGroupClasses = (0,
|
|
3679
|
+
const radioGroupClasses = (0, import_dedupe38.default)(
|
|
3592
3680
|
"mobius",
|
|
3593
3681
|
"mobius-radio-group",
|
|
3594
3682
|
radioClasses,
|
|
3595
3683
|
validationClasses
|
|
3596
3684
|
);
|
|
3597
|
-
const radioWrapperClasses = (0,
|
|
3685
|
+
const radioWrapperClasses = (0, import_dedupe38.default)("mobius-radio__wrapper", {
|
|
3598
3686
|
[`--is-${effectiveOrientation}`]: true
|
|
3599
3687
|
});
|
|
3600
|
-
const labelClasses = (0,
|
|
3601
|
-
const errorMessageId = (0,
|
|
3602
|
-
const defaultNameAttrId = (0,
|
|
3688
|
+
const labelClasses = (0, import_dedupe38.default)(radioClasses, validationClasses);
|
|
3689
|
+
const errorMessageId = (0, import_react33.useId)();
|
|
3690
|
+
const defaultNameAttrId = (0, import_react33.useId)();
|
|
3603
3691
|
const nameAttribute = name || defaultNameAttrId;
|
|
3604
3692
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
3605
3693
|
const describedBy = spaceDelimitedList([
|
|
3606
3694
|
shouldErrorMessageShow,
|
|
3607
3695
|
props["aria-describedby"]
|
|
3608
3696
|
]);
|
|
3609
|
-
const labelId = (0,
|
|
3610
|
-
return /* @__PURE__ */ (0,
|
|
3697
|
+
const labelId = (0, import_react33.useId)();
|
|
3698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3611
3699
|
"div",
|
|
3612
3700
|
{
|
|
3613
3701
|
...rest,
|
|
@@ -3623,12 +3711,12 @@ var init_RadioGroup = __esm({
|
|
|
3623
3711
|
ref,
|
|
3624
3712
|
className: radioGroupClasses,
|
|
3625
3713
|
role: "radiogroup",
|
|
3626
|
-
children: /* @__PURE__ */ (0,
|
|
3627
|
-
label && /* @__PURE__ */ (0,
|
|
3628
|
-
/* @__PURE__ */ (0,
|
|
3629
|
-
if ((0,
|
|
3714
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Stack, { gap: "xs", children: [
|
|
3715
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Label, { htmlFor: name, id: labelId, className: labelClasses, children: label }),
|
|
3716
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: radioWrapperClasses, children: import_react33.Children.map(children, (child) => {
|
|
3717
|
+
if ((0, import_react33.isValidElement)(child)) {
|
|
3630
3718
|
const childValue = child.props.value;
|
|
3631
|
-
return (0,
|
|
3719
|
+
return (0, import_react33.cloneElement)(
|
|
3632
3720
|
child,
|
|
3633
3721
|
{
|
|
3634
3722
|
orientation: effectiveOrientation,
|
|
@@ -3646,7 +3734,7 @@ var init_RadioGroup = __esm({
|
|
|
3646
3734
|
}
|
|
3647
3735
|
return child;
|
|
3648
3736
|
}) }),
|
|
3649
|
-
/* @__PURE__ */ (0,
|
|
3737
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
3650
3738
|
] })
|
|
3651
3739
|
}
|
|
3652
3740
|
);
|
|
@@ -3665,47 +3753,47 @@ var init_Radio2 = __esm({
|
|
|
3665
3753
|
});
|
|
3666
3754
|
|
|
3667
3755
|
// src/components/Segment/SegmentGroup.tsx
|
|
3668
|
-
var
|
|
3756
|
+
var import_dedupe39, import_jsx_runtime50, SegmentGroup;
|
|
3669
3757
|
var init_SegmentGroup = __esm({
|
|
3670
3758
|
"src/components/Segment/SegmentGroup.tsx"() {
|
|
3671
3759
|
"use strict";
|
|
3672
|
-
|
|
3673
|
-
|
|
3760
|
+
import_dedupe39 = __toESM(require("classnames/dedupe"));
|
|
3761
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3674
3762
|
SegmentGroup = (props) => {
|
|
3675
3763
|
const { children, horizontal, gap, className, ...rest } = props;
|
|
3676
3764
|
const gapClass = gap ? `gap-${gap}` : "";
|
|
3677
|
-
const classes = (0,
|
|
3765
|
+
const classes = (0, import_dedupe39.default)(
|
|
3678
3766
|
"mobius",
|
|
3679
3767
|
"mobius-segment-group",
|
|
3680
3768
|
className,
|
|
3681
3769
|
{ "--is-horizontal": horizontal },
|
|
3682
3770
|
gapClass
|
|
3683
3771
|
);
|
|
3684
|
-
return /* @__PURE__ */ (0,
|
|
3772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: classes, ...rest, children });
|
|
3685
3773
|
};
|
|
3686
3774
|
SegmentGroup.displayName = "SegmentGroup";
|
|
3687
3775
|
}
|
|
3688
3776
|
});
|
|
3689
3777
|
|
|
3690
3778
|
// src/components/Segment/Segment.tsx
|
|
3691
|
-
var
|
|
3779
|
+
var import_dedupe40, import_Segment, import_jsx_runtime51, Segment;
|
|
3692
3780
|
var init_Segment = __esm({
|
|
3693
3781
|
"src/components/Segment/Segment.tsx"() {
|
|
3694
3782
|
"use strict";
|
|
3695
|
-
|
|
3783
|
+
import_dedupe40 = __toESM(require("classnames/dedupe"));
|
|
3696
3784
|
import_Segment = require("@simplybusiness/mobius/src/components/Segment/Segment.css");
|
|
3697
|
-
|
|
3785
|
+
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3698
3786
|
Segment = (props) => {
|
|
3699
3787
|
const { heading, children, colour, inverted, className, ...rest } = props;
|
|
3700
|
-
const classes = (0,
|
|
3788
|
+
const classes = (0, import_dedupe40.default)(
|
|
3701
3789
|
"mobius",
|
|
3702
3790
|
"mobius-segment",
|
|
3703
3791
|
colour,
|
|
3704
3792
|
{ inverted },
|
|
3705
3793
|
className
|
|
3706
3794
|
);
|
|
3707
|
-
return /* @__PURE__ */ (0,
|
|
3708
|
-
heading && /* @__PURE__ */ (0,
|
|
3795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: classes, ...rest, children: [
|
|
3796
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mobius-segment__heading", children: heading }),
|
|
3709
3797
|
children
|
|
3710
3798
|
] });
|
|
3711
3799
|
};
|
|
@@ -3723,14 +3811,14 @@ var init_Segment2 = __esm({
|
|
|
3723
3811
|
});
|
|
3724
3812
|
|
|
3725
3813
|
// src/components/Select/Select.tsx
|
|
3726
|
-
var import_icons12,
|
|
3814
|
+
var import_icons12, import_dedupe41, import_react34, import_Select, import_jsx_runtime52, Select;
|
|
3727
3815
|
var init_Select = __esm({
|
|
3728
3816
|
"src/components/Select/Select.tsx"() {
|
|
3729
3817
|
"use strict";
|
|
3730
3818
|
"use client";
|
|
3731
3819
|
import_icons12 = require("@simplybusiness/icons");
|
|
3732
|
-
|
|
3733
|
-
|
|
3820
|
+
import_dedupe41 = __toESM(require("classnames/dedupe"));
|
|
3821
|
+
import_react34 = require("react");
|
|
3734
3822
|
init_hooks();
|
|
3735
3823
|
init_useLabel2();
|
|
3736
3824
|
init_spaceDelimitedList();
|
|
@@ -3739,7 +3827,7 @@ var init_Select = __esm({
|
|
|
3739
3827
|
init_Label2();
|
|
3740
3828
|
init_Stack2();
|
|
3741
3829
|
import_Select = require("@simplybusiness/mobius/src/components/Select/Select.css");
|
|
3742
|
-
|
|
3830
|
+
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3743
3831
|
Select = ({ ref, ...props }) => {
|
|
3744
3832
|
const {
|
|
3745
3833
|
label,
|
|
@@ -3760,24 +3848,24 @@ var init_Select = __esm({
|
|
|
3760
3848
|
"--is-required": typeof isRequired === "boolean" && isRequired,
|
|
3761
3849
|
"--is-optional": typeof isRequired === "boolean" && !isRequired
|
|
3762
3850
|
};
|
|
3763
|
-
const sharedClasses = (0,
|
|
3764
|
-
const wrapperClasses = (0,
|
|
3851
|
+
const sharedClasses = (0, import_dedupe41.default)(validationClasses, stateClasses);
|
|
3852
|
+
const wrapperClasses = (0, import_dedupe41.default)(
|
|
3765
3853
|
"mobius-select__wrapper",
|
|
3766
3854
|
sharedClasses,
|
|
3767
3855
|
otherProps.className
|
|
3768
3856
|
);
|
|
3769
|
-
const selectClasses = (0,
|
|
3857
|
+
const selectClasses = (0, import_dedupe41.default)(
|
|
3770
3858
|
"mobius-select",
|
|
3771
3859
|
sharedClasses,
|
|
3772
3860
|
otherProps.className
|
|
3773
3861
|
);
|
|
3774
|
-
const labelClasses = (0,
|
|
3862
|
+
const labelClasses = (0, import_dedupe41.default)(
|
|
3775
3863
|
"mobius-label",
|
|
3776
3864
|
sharedClasses,
|
|
3777
3865
|
otherProps.className
|
|
3778
3866
|
);
|
|
3779
|
-
const iconClasses = (0,
|
|
3780
|
-
const errorMessageId = (0,
|
|
3867
|
+
const iconClasses = (0, import_dedupe41.default)("mobius-select__icon", sharedClasses);
|
|
3868
|
+
const errorMessageId = (0, import_react34.useId)();
|
|
3781
3869
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
3782
3870
|
const describedBy = spaceDelimitedList([
|
|
3783
3871
|
shouldErrorMessageShow,
|
|
@@ -3788,10 +3876,10 @@ var init_Select = __esm({
|
|
|
3788
3876
|
onChange(e);
|
|
3789
3877
|
}
|
|
3790
3878
|
};
|
|
3791
|
-
return /* @__PURE__ */ (0,
|
|
3792
|
-
label && /* @__PURE__ */ (0,
|
|
3793
|
-
/* @__PURE__ */ (0,
|
|
3794
|
-
/* @__PURE__ */ (0,
|
|
3879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Stack, { className: "mobius mobius-select__outer", gap: "xs", children: [
|
|
3880
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Label, { ...labelProps, className: labelClasses, children: label }),
|
|
3881
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: wrapperClasses, children: [
|
|
3882
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3795
3883
|
"select",
|
|
3796
3884
|
{
|
|
3797
3885
|
...otherProps,
|
|
@@ -3807,9 +3895,9 @@ var init_Select = __esm({
|
|
|
3807
3895
|
onChange: handleChange
|
|
3808
3896
|
}
|
|
3809
3897
|
),
|
|
3810
|
-
/* @__PURE__ */ (0,
|
|
3898
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon, { icon: import_icons12.chevronDown }) })
|
|
3811
3899
|
] }),
|
|
3812
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
3900
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
3813
3901
|
] });
|
|
3814
3902
|
};
|
|
3815
3903
|
Select.displayName = "Select";
|
|
@@ -3825,15 +3913,15 @@ var init_Select2 = __esm({
|
|
|
3825
3913
|
});
|
|
3826
3914
|
|
|
3827
3915
|
// src/components/Slider/Slider.tsx
|
|
3828
|
-
var
|
|
3916
|
+
var import_dedupe42, import_react35, import_Slider, import_jsx_runtime53;
|
|
3829
3917
|
var init_Slider = __esm({
|
|
3830
3918
|
"src/components/Slider/Slider.tsx"() {
|
|
3831
3919
|
"use strict";
|
|
3832
3920
|
"use client";
|
|
3833
|
-
|
|
3834
|
-
|
|
3921
|
+
import_dedupe42 = __toESM(require("classnames/dedupe"));
|
|
3922
|
+
import_react35 = require("react");
|
|
3835
3923
|
import_Slider = require("@simplybusiness/mobius/src/components/Slider/Slider.css");
|
|
3836
|
-
|
|
3924
|
+
import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3837
3925
|
}
|
|
3838
3926
|
});
|
|
3839
3927
|
|
|
@@ -3846,19 +3934,19 @@ var init_Slider2 = __esm({
|
|
|
3846
3934
|
});
|
|
3847
3935
|
|
|
3848
3936
|
// src/components/SVG/SVG.tsx
|
|
3849
|
-
var
|
|
3937
|
+
var import_react36, import_dedupe43, import_jsx_runtime54, SVG;
|
|
3850
3938
|
var init_SVG = __esm({
|
|
3851
3939
|
"src/components/SVG/SVG.tsx"() {
|
|
3852
3940
|
"use strict";
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3941
|
+
import_react36 = require("react");
|
|
3942
|
+
import_dedupe43 = __toESM(require("classnames/dedupe"));
|
|
3943
|
+
import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3856
3944
|
SVG = ({ ref, ...props }) => {
|
|
3857
3945
|
const { children, className, ...otherProps } = props;
|
|
3858
|
-
const classes = (0,
|
|
3859
|
-
const svgNode =
|
|
3946
|
+
const classes = (0, import_dedupe43.default)("mobius", "mobius-svg", className);
|
|
3947
|
+
const svgNode = import_react36.Children.only(children);
|
|
3860
3948
|
const { children: svgChildren, viewBox, xmlns } = svgNode.props;
|
|
3861
|
-
return /* @__PURE__ */ (0,
|
|
3949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3862
3950
|
"svg",
|
|
3863
3951
|
{
|
|
3864
3952
|
viewBox,
|
|
@@ -3883,16 +3971,16 @@ var init_SVG2 = __esm({
|
|
|
3883
3971
|
});
|
|
3884
3972
|
|
|
3885
3973
|
// src/components/Switch/Switch.tsx
|
|
3886
|
-
var
|
|
3974
|
+
var import_react37, import_dedupe44, import_Switch, import_jsx_runtime55, Switch;
|
|
3887
3975
|
var init_Switch = __esm({
|
|
3888
3976
|
"src/components/Switch/Switch.tsx"() {
|
|
3889
3977
|
"use strict";
|
|
3890
3978
|
"use client";
|
|
3891
|
-
|
|
3892
|
-
|
|
3979
|
+
import_react37 = require("react");
|
|
3980
|
+
import_dedupe44 = __toESM(require("classnames/dedupe"));
|
|
3893
3981
|
init_VisuallyHidden2();
|
|
3894
3982
|
import_Switch = require("@simplybusiness/mobius/src/components/Switch/Switch.css");
|
|
3895
|
-
|
|
3983
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3896
3984
|
Switch = ({ ref, ...props }) => {
|
|
3897
3985
|
const {
|
|
3898
3986
|
checked = false,
|
|
@@ -3901,11 +3989,11 @@ var init_Switch = __esm({
|
|
|
3901
3989
|
isDisabled = false,
|
|
3902
3990
|
...otherProps
|
|
3903
3991
|
} = props;
|
|
3904
|
-
const [enabled, setEnabled] = (0,
|
|
3905
|
-
(0,
|
|
3992
|
+
const [enabled, setEnabled] = (0, import_react37.useState)(checked);
|
|
3993
|
+
(0, import_react37.useEffect)(() => {
|
|
3906
3994
|
setEnabled(checked);
|
|
3907
3995
|
}, [checked]);
|
|
3908
|
-
const classes = (0,
|
|
3996
|
+
const classes = (0, import_dedupe44.default)(
|
|
3909
3997
|
"mobius",
|
|
3910
3998
|
"mobius-switch",
|
|
3911
3999
|
{
|
|
@@ -3920,9 +4008,9 @@ var init_Switch = __esm({
|
|
|
3920
4008
|
onChange(event);
|
|
3921
4009
|
}
|
|
3922
4010
|
};
|
|
3923
|
-
return /* @__PURE__ */ (0,
|
|
3924
|
-
/* @__PURE__ */ (0,
|
|
3925
|
-
/* @__PURE__ */ (0,
|
|
4011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("label", { ref, className: classes, children: [
|
|
4012
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: enabled ? "On" : "Off" }) }),
|
|
4013
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3926
4014
|
"input",
|
|
3927
4015
|
{
|
|
3928
4016
|
type: "checkbox",
|
|
@@ -3933,7 +4021,7 @@ var init_Switch = __esm({
|
|
|
3933
4021
|
...otherProps
|
|
3934
4022
|
}
|
|
3935
4023
|
),
|
|
3936
|
-
/* @__PURE__ */ (0,
|
|
4024
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "mobius-switch__slider" })
|
|
3937
4025
|
] });
|
|
3938
4026
|
};
|
|
3939
4027
|
Switch.displayName = "Switch";
|
|
@@ -3949,114 +4037,114 @@ var init_Switch2 = __esm({
|
|
|
3949
4037
|
});
|
|
3950
4038
|
|
|
3951
4039
|
// src/components/Table/Table.tsx
|
|
3952
|
-
var
|
|
4040
|
+
var import_dedupe45, import_Table, import_jsx_runtime56, Table;
|
|
3953
4041
|
var init_Table = __esm({
|
|
3954
4042
|
"src/components/Table/Table.tsx"() {
|
|
3955
4043
|
"use strict";
|
|
3956
|
-
|
|
4044
|
+
import_dedupe45 = __toESM(require("classnames/dedupe"));
|
|
3957
4045
|
import_Table = require("@simplybusiness/mobius/src/components/Table/Table.css");
|
|
3958
|
-
|
|
4046
|
+
import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3959
4047
|
Table = ({ ref, ...props }) => {
|
|
3960
|
-
const classes = (0,
|
|
3961
|
-
return /* @__PURE__ */ (0,
|
|
4048
|
+
const classes = (0, import_dedupe45.default)("mobius", "mobius-table", props.className);
|
|
4049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("table", { ref, ...props, className: classes });
|
|
3962
4050
|
};
|
|
3963
4051
|
Table.displayName = "Table";
|
|
3964
4052
|
}
|
|
3965
4053
|
});
|
|
3966
4054
|
|
|
3967
4055
|
// src/components/Table/Head.tsx
|
|
3968
|
-
var
|
|
4056
|
+
var import_dedupe46, import_jsx_runtime57, Head;
|
|
3969
4057
|
var init_Head = __esm({
|
|
3970
4058
|
"src/components/Table/Head.tsx"() {
|
|
3971
4059
|
"use strict";
|
|
3972
|
-
|
|
3973
|
-
|
|
4060
|
+
import_dedupe46 = __toESM(require("classnames/dedupe"));
|
|
4061
|
+
import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3974
4062
|
Head = ({ ref, ...props }) => {
|
|
3975
|
-
const classes = (0,
|
|
3976
|
-
return /* @__PURE__ */ (0,
|
|
4063
|
+
const classes = (0, import_dedupe46.default)("mobius", "mobius-table__head", props.className);
|
|
4064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("thead", { ref, ...props, className: classes });
|
|
3977
4065
|
};
|
|
3978
4066
|
Head.displayName = "Table.Head";
|
|
3979
4067
|
}
|
|
3980
4068
|
});
|
|
3981
4069
|
|
|
3982
4070
|
// src/components/Table/Body.tsx
|
|
3983
|
-
var
|
|
4071
|
+
var import_dedupe47, import_jsx_runtime58, Body;
|
|
3984
4072
|
var init_Body = __esm({
|
|
3985
4073
|
"src/components/Table/Body.tsx"() {
|
|
3986
4074
|
"use strict";
|
|
3987
|
-
|
|
3988
|
-
|
|
4075
|
+
import_dedupe47 = __toESM(require("classnames/dedupe"));
|
|
4076
|
+
import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3989
4077
|
Body = ({ ref, ...props }) => {
|
|
3990
|
-
const classes = (0,
|
|
3991
|
-
return /* @__PURE__ */ (0,
|
|
4078
|
+
const classes = (0, import_dedupe47.default)("mobius", "mobius-table__body", props.className);
|
|
4079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("tbody", { ref, ...props, className: classes });
|
|
3992
4080
|
};
|
|
3993
4081
|
Body.displayName = "Table.Body";
|
|
3994
4082
|
}
|
|
3995
4083
|
});
|
|
3996
4084
|
|
|
3997
4085
|
// src/components/Table/Foot.tsx
|
|
3998
|
-
var
|
|
4086
|
+
var import_dedupe48, import_jsx_runtime59, Foot;
|
|
3999
4087
|
var init_Foot = __esm({
|
|
4000
4088
|
"src/components/Table/Foot.tsx"() {
|
|
4001
4089
|
"use strict";
|
|
4002
|
-
|
|
4003
|
-
|
|
4090
|
+
import_dedupe48 = __toESM(require("classnames/dedupe"));
|
|
4091
|
+
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4004
4092
|
Foot = ({ ref, ...props }) => {
|
|
4005
|
-
const classes = (0,
|
|
4006
|
-
return /* @__PURE__ */ (0,
|
|
4093
|
+
const classes = (0, import_dedupe48.default)("mobius", "mobius-table__foot", props.className);
|
|
4094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("tfoot", { ref, ...props, className: classes });
|
|
4007
4095
|
};
|
|
4008
4096
|
Foot.displayName = "Table.Foot";
|
|
4009
4097
|
}
|
|
4010
4098
|
});
|
|
4011
4099
|
|
|
4012
4100
|
// src/components/Table/Row.tsx
|
|
4013
|
-
var
|
|
4101
|
+
var import_dedupe49, import_jsx_runtime60, Row;
|
|
4014
4102
|
var init_Row = __esm({
|
|
4015
4103
|
"src/components/Table/Row.tsx"() {
|
|
4016
4104
|
"use strict";
|
|
4017
|
-
|
|
4018
|
-
|
|
4105
|
+
import_dedupe49 = __toESM(require("classnames/dedupe"));
|
|
4106
|
+
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4019
4107
|
Row = ({ ref, ...props }) => {
|
|
4020
|
-
const classes = (0,
|
|
4021
|
-
return /* @__PURE__ */ (0,
|
|
4108
|
+
const classes = (0, import_dedupe49.default)("mobius", "mobius-table__row", props.className);
|
|
4109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("tr", { ref, ...props, className: classes });
|
|
4022
4110
|
};
|
|
4023
4111
|
Row.displayName = "Table.Row";
|
|
4024
4112
|
}
|
|
4025
4113
|
});
|
|
4026
4114
|
|
|
4027
4115
|
// src/components/Table/HeaderCell.tsx
|
|
4028
|
-
var
|
|
4116
|
+
var import_dedupe50, import_jsx_runtime61, HeaderCell;
|
|
4029
4117
|
var init_HeaderCell = __esm({
|
|
4030
4118
|
"src/components/Table/HeaderCell.tsx"() {
|
|
4031
4119
|
"use strict";
|
|
4032
|
-
|
|
4033
|
-
|
|
4120
|
+
import_dedupe50 = __toESM(require("classnames/dedupe"));
|
|
4121
|
+
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4034
4122
|
HeaderCell = ({ ref, ...props }) => {
|
|
4035
|
-
const classes = (0,
|
|
4123
|
+
const classes = (0, import_dedupe50.default)(
|
|
4036
4124
|
"mobius",
|
|
4037
4125
|
"mobius-table__head-cell",
|
|
4038
4126
|
props.className
|
|
4039
4127
|
);
|
|
4040
|
-
return /* @__PURE__ */ (0,
|
|
4128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("th", { ...props, ref, className: classes });
|
|
4041
4129
|
};
|
|
4042
4130
|
HeaderCell.displayName = "Table.HeaderCell";
|
|
4043
4131
|
}
|
|
4044
4132
|
});
|
|
4045
4133
|
|
|
4046
4134
|
// src/components/Table/Cell.tsx
|
|
4047
|
-
var
|
|
4135
|
+
var import_dedupe51, import_jsx_runtime62, Cell;
|
|
4048
4136
|
var init_Cell = __esm({
|
|
4049
4137
|
"src/components/Table/Cell.tsx"() {
|
|
4050
4138
|
"use strict";
|
|
4051
|
-
|
|
4052
|
-
|
|
4139
|
+
import_dedupe51 = __toESM(require("classnames/dedupe"));
|
|
4140
|
+
import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4053
4141
|
Cell = ({ ref, ...props }) => {
|
|
4054
|
-
const classes = (0,
|
|
4142
|
+
const classes = (0, import_dedupe51.default)(
|
|
4055
4143
|
"mobius",
|
|
4056
4144
|
"mobius-table__body-cell",
|
|
4057
4145
|
props.className
|
|
4058
4146
|
);
|
|
4059
|
-
return /* @__PURE__ */ (0,
|
|
4147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("td", { ref, ...props, className: classes });
|
|
4060
4148
|
};
|
|
4061
4149
|
Cell.displayName = "Table.Cell";
|
|
4062
4150
|
}
|
|
@@ -4086,37 +4174,6 @@ var init_Table2 = __esm({
|
|
|
4086
4174
|
}
|
|
4087
4175
|
});
|
|
4088
4176
|
|
|
4089
|
-
// src/components/Text/Text.tsx
|
|
4090
|
-
var import_dedupe51, import_Text, import_jsx_runtime61, getElementType, Text;
|
|
4091
|
-
var init_Text = __esm({
|
|
4092
|
-
"src/components/Text/Text.tsx"() {
|
|
4093
|
-
"use strict";
|
|
4094
|
-
import_dedupe51 = __toESM(require("classnames/dedupe"));
|
|
4095
|
-
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
4096
|
-
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4097
|
-
getElementType = (variant, elementType) => {
|
|
4098
|
-
if (variant) {
|
|
4099
|
-
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
4100
|
-
}
|
|
4101
|
-
return elementType || "p";
|
|
4102
|
-
};
|
|
4103
|
-
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
4104
|
-
const { variant, className, spacing, ...otherProps } = props;
|
|
4105
|
-
const elementType = getElementType(variant, Component);
|
|
4106
|
-
const variantType = variant || elementType;
|
|
4107
|
-
const classes = (0, import_dedupe51.default)(
|
|
4108
|
-
"mobius",
|
|
4109
|
-
"mobius-text",
|
|
4110
|
-
{ [`--is-${variantType}`]: variantType },
|
|
4111
|
-
{ [`--has-line-height-${spacing}`]: spacing },
|
|
4112
|
-
className
|
|
4113
|
-
);
|
|
4114
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
4115
|
-
};
|
|
4116
|
-
Text.displayName = "Text";
|
|
4117
|
-
}
|
|
4118
|
-
});
|
|
4119
|
-
|
|
4120
4177
|
// src/components/Text/index.tsx
|
|
4121
4178
|
var init_Text2 = __esm({
|
|
4122
4179
|
"src/components/Text/index.tsx"() {
|
|
@@ -4126,12 +4183,12 @@ var init_Text2 = __esm({
|
|
|
4126
4183
|
});
|
|
4127
4184
|
|
|
4128
4185
|
// src/components/TextAreaInput/TextAreaInput.tsx
|
|
4129
|
-
var import_dedupe52,
|
|
4186
|
+
var import_dedupe52, import_jsx_runtime63, TextAreaInput;
|
|
4130
4187
|
var init_TextAreaInput = __esm({
|
|
4131
4188
|
"src/components/TextAreaInput/TextAreaInput.tsx"() {
|
|
4132
4189
|
"use strict";
|
|
4133
4190
|
import_dedupe52 = __toESM(require("classnames/dedupe"));
|
|
4134
|
-
|
|
4191
|
+
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4135
4192
|
TextAreaInput = ({ ref, ...props }) => {
|
|
4136
4193
|
const { isSelected, isDisabled, isReadOnly, isRequired, ...otherProps } = props;
|
|
4137
4194
|
const classes = (0, import_dedupe52.default)(
|
|
@@ -4144,7 +4201,7 @@ var init_TextAreaInput = __esm({
|
|
|
4144
4201
|
},
|
|
4145
4202
|
otherProps.className
|
|
4146
4203
|
);
|
|
4147
|
-
return /* @__PURE__ */ (0,
|
|
4204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4148
4205
|
"textarea",
|
|
4149
4206
|
{
|
|
4150
4207
|
ref,
|
|
@@ -4168,7 +4225,7 @@ var init_TextAreaInput2 = __esm({
|
|
|
4168
4225
|
});
|
|
4169
4226
|
|
|
4170
4227
|
// src/components/TextArea/TextArea.tsx
|
|
4171
|
-
var import_dedupe53, import_TextArea,
|
|
4228
|
+
var import_dedupe53, import_TextArea, import_jsx_runtime64, TextArea;
|
|
4172
4229
|
var init_TextArea = __esm({
|
|
4173
4230
|
"src/components/TextArea/TextArea.tsx"() {
|
|
4174
4231
|
"use strict";
|
|
@@ -4180,7 +4237,7 @@ var init_TextArea = __esm({
|
|
|
4180
4237
|
init_Stack2();
|
|
4181
4238
|
init_TextAreaInput2();
|
|
4182
4239
|
import_TextArea = require("@simplybusiness/mobius/src/components/TextArea/TextArea.css");
|
|
4183
|
-
|
|
4240
|
+
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4184
4241
|
TextArea = ({ ref, ...props }) => {
|
|
4185
4242
|
const {
|
|
4186
4243
|
isDisabled,
|
|
@@ -4200,9 +4257,9 @@ var init_TextArea = __esm({
|
|
|
4200
4257
|
},
|
|
4201
4258
|
validationClasses
|
|
4202
4259
|
);
|
|
4203
|
-
return /* @__PURE__ */ (0,
|
|
4204
|
-
label && /* @__PURE__ */ (0,
|
|
4205
|
-
/* @__PURE__ */ (0,
|
|
4260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Stack, { className: classes, gap: "xs", children: [
|
|
4261
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Label, { ...labelProps, className: labelClasses, children: props.label }),
|
|
4262
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4206
4263
|
TextAreaInput,
|
|
4207
4264
|
{
|
|
4208
4265
|
...otherProps,
|
|
@@ -4213,7 +4270,7 @@ var init_TextArea = __esm({
|
|
|
4213
4270
|
"aria-invalid": errorMessage != null
|
|
4214
4271
|
}
|
|
4215
4272
|
),
|
|
4216
|
-
/* @__PURE__ */ (0,
|
|
4273
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ErrorMessage, { ...errorMessageProps, errorMessage })
|
|
4217
4274
|
] });
|
|
4218
4275
|
};
|
|
4219
4276
|
TextArea.displayName = "TextArea";
|
|
@@ -4228,53 +4285,6 @@ var init_TextArea2 = __esm({
|
|
|
4228
4285
|
}
|
|
4229
4286
|
});
|
|
4230
4287
|
|
|
4231
|
-
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
4232
|
-
var import_react37, import_jsx_runtime64, isHTML, TextOrHTML;
|
|
4233
|
-
var init_TextOrHTML = __esm({
|
|
4234
|
-
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
4235
|
-
"use strict";
|
|
4236
|
-
import_react37 = require("react");
|
|
4237
|
-
init_Text();
|
|
4238
|
-
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4239
|
-
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
4240
|
-
TextOrHTML = ({
|
|
4241
|
-
ref,
|
|
4242
|
-
text,
|
|
4243
|
-
htmlClassName,
|
|
4244
|
-
htmlElementType,
|
|
4245
|
-
textWrapper = false,
|
|
4246
|
-
autoDetect = false,
|
|
4247
|
-
...textProps
|
|
4248
|
-
}) => {
|
|
4249
|
-
const textIsHTML = autoDetect && isHTML(text);
|
|
4250
|
-
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
4251
|
-
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
4252
|
-
const DangerousComponent = resolvedElementType;
|
|
4253
|
-
const dangerousHTML = (0, import_react37.useMemo)(() => ({ __html: text }), [text]);
|
|
4254
|
-
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4255
|
-
DangerousComponent,
|
|
4256
|
-
{
|
|
4257
|
-
className: htmlClassName,
|
|
4258
|
-
dangerouslySetInnerHTML: dangerousHTML
|
|
4259
|
-
}
|
|
4260
|
-
);
|
|
4261
|
-
if (shouldWrapInText) {
|
|
4262
|
-
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
4263
|
-
}
|
|
4264
|
-
return dangerousElement;
|
|
4265
|
-
};
|
|
4266
|
-
TextOrHTML.displayName = "TextOrHTML";
|
|
4267
|
-
}
|
|
4268
|
-
});
|
|
4269
|
-
|
|
4270
|
-
// src/components/TextOrHTML/index.tsx
|
|
4271
|
-
var init_TextOrHTML2 = __esm({
|
|
4272
|
-
"src/components/TextOrHTML/index.tsx"() {
|
|
4273
|
-
"use strict";
|
|
4274
|
-
init_TextOrHTML();
|
|
4275
|
-
}
|
|
4276
|
-
});
|
|
4277
|
-
|
|
4278
4288
|
// src/components/Title/Title.tsx
|
|
4279
4289
|
var import_dedupe54, import_Title, import_jsx_runtime65, Title;
|
|
4280
4290
|
var init_Title = __esm({
|