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