@simplybusiness/mobius 10.1.0 → 10.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/components/AddressLookup/AddressLookup.js +536 -526
- package/dist/cjs/components/AddressLookup/AddressLookup.js.map +4 -4
- package/dist/cjs/components/AddressLookup/index.js +536 -526
- package/dist/cjs/components/AddressLookup/index.js.map +4 -4
- package/dist/cjs/components/Alert/Alert.js +79 -11
- package/dist/cjs/components/Alert/Alert.js.map +4 -4
- package/dist/cjs/components/Alert/index.js +79 -11
- package/dist/cjs/components/Alert/index.js.map +4 -4
- package/dist/cjs/components/Checkbox/Checkbox.js +502 -492
- package/dist/cjs/components/Checkbox/Checkbox.js.map +4 -4
- package/dist/cjs/components/Checkbox/CheckboxGroup.js +502 -492
- package/dist/cjs/components/Checkbox/CheckboxGroup.js.map +4 -4
- package/dist/cjs/components/Checkbox/index.js +481 -471
- package/dist/cjs/components/Checkbox/index.js.map +4 -4
- package/dist/cjs/components/Combobox/Combobox.js +536 -526
- package/dist/cjs/components/Combobox/Combobox.js.map +4 -4
- package/dist/cjs/components/Combobox/index.js +536 -526
- package/dist/cjs/components/Combobox/index.js.map +4 -4
- package/dist/cjs/components/DateField/DateField.js +523 -513
- package/dist/cjs/components/DateField/DateField.js.map +4 -4
- package/dist/cjs/components/DateField/index.js +523 -513
- package/dist/cjs/components/DateField/index.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js +523 -513
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/index.js +523 -513
- package/dist/cjs/components/ErrorMessage/index.js.map +4 -4
- package/dist/cjs/components/ExpandableText/ExpandableText.js +523 -513
- package/dist/cjs/components/ExpandableText/ExpandableText.js.map +4 -4
- package/dist/cjs/components/ExpandableText/index.js +523 -513
- package/dist/cjs/components/ExpandableText/index.js.map +4 -4
- package/dist/cjs/components/MaskedField/MaskedField.js +533 -523
- package/dist/cjs/components/MaskedField/MaskedField.js.map +4 -4
- package/dist/cjs/components/MaskedField/index.js +533 -523
- package/dist/cjs/components/MaskedField/index.js.map +4 -4
- package/dist/cjs/components/NumberField/NumberField.js +524 -514
- package/dist/cjs/components/NumberField/NumberField.js.map +4 -4
- package/dist/cjs/components/NumberField/index.js +524 -514
- package/dist/cjs/components/NumberField/index.js.map +4 -4
- package/dist/cjs/components/PasswordField/PasswordField.js +520 -510
- package/dist/cjs/components/PasswordField/PasswordField.js.map +4 -4
- package/dist/cjs/components/PasswordField/ShowHideButton.js +519 -509
- package/dist/cjs/components/PasswordField/ShowHideButton.js.map +4 -4
- package/dist/cjs/components/PasswordField/index.js +520 -510
- package/dist/cjs/components/PasswordField/index.js.map +4 -4
- package/dist/cjs/components/Radio/Radio.js +502 -492
- package/dist/cjs/components/Radio/Radio.js.map +4 -4
- package/dist/cjs/components/Radio/RadioGroup.js +501 -491
- package/dist/cjs/components/Radio/RadioGroup.js.map +4 -4
- package/dist/cjs/components/Radio/index.js +480 -470
- package/dist/cjs/components/Radio/index.js.map +4 -4
- package/dist/cjs/components/Select/Select.js +507 -497
- package/dist/cjs/components/Select/Select.js.map +4 -4
- package/dist/cjs/components/Select/index.js +507 -497
- package/dist/cjs/components/Select/index.js.map +4 -4
- package/dist/cjs/components/TextArea/TextArea.js +517 -507
- package/dist/cjs/components/TextArea/TextArea.js.map +4 -4
- package/dist/cjs/components/TextArea/index.js +517 -507
- package/dist/cjs/components/TextArea/index.js.map +4 -4
- package/dist/cjs/components/TextField/TextField.js +533 -523
- package/dist/cjs/components/TextField/TextField.js.map +4 -4
- package/dist/cjs/components/TextField/index.js +533 -523
- package/dist/cjs/components/TextField/index.js.map +4 -4
- package/dist/cjs/components/index.js +563 -553
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/index.js +563 -553
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/meta.json +1340 -1273
- package/dist/esm/{chunk-FTSJNY4J.js → chunk-N5WGQAHM.js} +14 -2
- package/dist/esm/chunk-N5WGQAHM.js.map +7 -0
- package/dist/esm/{chunk-C4BILMFX.js → chunk-PB2OICEB.js} +1 -1
- package/dist/esm/components/AddressLookup/AddressLookup.js +2 -2
- package/dist/esm/components/AddressLookup/index.js +2 -2
- package/dist/esm/components/Alert/Alert.js +4 -1
- package/dist/esm/components/Alert/index.js +4 -1
- package/dist/esm/components/Checkbox/Checkbox.js +2 -2
- package/dist/esm/components/Checkbox/CheckboxGroup.js +2 -2
- package/dist/esm/components/Checkbox/index.js +2 -2
- package/dist/esm/components/Combobox/Combobox.js +2 -2
- package/dist/esm/components/Combobox/index.js +2 -2
- package/dist/esm/components/DateField/DateField.js +2 -2
- package/dist/esm/components/DateField/index.js +2 -2
- package/dist/esm/components/ErrorMessage/ErrorMessage.js +2 -2
- package/dist/esm/components/ErrorMessage/index.js +2 -2
- package/dist/esm/components/ExpandableText/ExpandableText.js +2 -2
- package/dist/esm/components/ExpandableText/index.js +2 -2
- package/dist/esm/components/MaskedField/MaskedField.js +2 -2
- package/dist/esm/components/MaskedField/index.js +2 -2
- package/dist/esm/components/NumberField/NumberField.js +2 -2
- package/dist/esm/components/NumberField/index.js +2 -2
- package/dist/esm/components/PasswordField/PasswordField.js +2 -2
- package/dist/esm/components/PasswordField/ShowHideButton.js +2 -2
- package/dist/esm/components/PasswordField/index.js +2 -2
- package/dist/esm/components/Radio/Radio.js +2 -2
- package/dist/esm/components/Radio/RadioGroup.js +2 -2
- package/dist/esm/components/Radio/index.js +2 -2
- package/dist/esm/components/Select/Select.js +2 -2
- package/dist/esm/components/Select/index.js +2 -2
- package/dist/esm/components/TextArea/TextArea.js +2 -2
- package/dist/esm/components/TextArea/index.js +2 -2
- package/dist/esm/components/TextField/TextField.js +2 -2
- package/dist/esm/components/TextField/index.js +2 -2
- package/dist/esm/components/index.js +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/meta.json +160 -127
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/Alert/Alert.tsx +10 -1
- package/src/components/Button/Button.css +44 -14
- package/dist/esm/chunk-FTSJNY4J.js.map +0 -7
- /package/dist/esm/{chunk-C4BILMFX.js.map → chunk-PB2OICEB.js.map} +0 -0
|
@@ -1154,19 +1154,98 @@ var init_AddressLookup = __esm({
|
|
|
1154
1154
|
}
|
|
1155
1155
|
});
|
|
1156
1156
|
|
|
1157
|
+
// src/components/Text/Text.tsx
|
|
1158
|
+
var import_dedupe7, import_Text, import_jsx_runtime7, getElementType, Text;
|
|
1159
|
+
var init_Text = __esm({
|
|
1160
|
+
"src/components/Text/Text.tsx"() {
|
|
1161
|
+
"use strict";
|
|
1162
|
+
import_dedupe7 = __toESM(require("classnames/dedupe"));
|
|
1163
|
+
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
1164
|
+
import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1165
|
+
getElementType = (variant, elementType) => {
|
|
1166
|
+
if (variant) {
|
|
1167
|
+
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
1168
|
+
}
|
|
1169
|
+
return elementType || "p";
|
|
1170
|
+
};
|
|
1171
|
+
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
1172
|
+
const { variant, className, spacing, ...otherProps } = props;
|
|
1173
|
+
const elementType = getElementType(variant, Component);
|
|
1174
|
+
const variantType = variant || elementType;
|
|
1175
|
+
const classes = (0, import_dedupe7.default)(
|
|
1176
|
+
"mobius",
|
|
1177
|
+
"mobius-text",
|
|
1178
|
+
{ [`--is-${variantType}`]: variantType },
|
|
1179
|
+
{ [`--has-line-height-${spacing}`]: spacing },
|
|
1180
|
+
className
|
|
1181
|
+
);
|
|
1182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
1183
|
+
};
|
|
1184
|
+
Text.displayName = "Text";
|
|
1185
|
+
}
|
|
1186
|
+
});
|
|
1187
|
+
|
|
1188
|
+
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
1189
|
+
var import_react9, import_jsx_runtime8, isHTML, TextOrHTML;
|
|
1190
|
+
var init_TextOrHTML = __esm({
|
|
1191
|
+
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
1192
|
+
"use strict";
|
|
1193
|
+
import_react9 = require("react");
|
|
1194
|
+
init_Text();
|
|
1195
|
+
import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1196
|
+
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
1197
|
+
TextOrHTML = ({
|
|
1198
|
+
ref,
|
|
1199
|
+
text,
|
|
1200
|
+
htmlClassName,
|
|
1201
|
+
htmlElementType,
|
|
1202
|
+
textWrapper = false,
|
|
1203
|
+
autoDetect = false,
|
|
1204
|
+
...textProps
|
|
1205
|
+
}) => {
|
|
1206
|
+
const textIsHTML = autoDetect && isHTML(text);
|
|
1207
|
+
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
1208
|
+
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
1209
|
+
const DangerousComponent = resolvedElementType;
|
|
1210
|
+
const dangerousHTML = (0, import_react9.useMemo)(() => ({ __html: text }), [text]);
|
|
1211
|
+
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1212
|
+
DangerousComponent,
|
|
1213
|
+
{
|
|
1214
|
+
className: htmlClassName,
|
|
1215
|
+
dangerouslySetInnerHTML: dangerousHTML
|
|
1216
|
+
}
|
|
1217
|
+
);
|
|
1218
|
+
if (shouldWrapInText) {
|
|
1219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
1220
|
+
}
|
|
1221
|
+
return dangerousElement;
|
|
1222
|
+
};
|
|
1223
|
+
TextOrHTML.displayName = "TextOrHTML";
|
|
1224
|
+
}
|
|
1225
|
+
});
|
|
1226
|
+
|
|
1227
|
+
// src/components/TextOrHTML/index.tsx
|
|
1228
|
+
var init_TextOrHTML2 = __esm({
|
|
1229
|
+
"src/components/TextOrHTML/index.tsx"() {
|
|
1230
|
+
"use strict";
|
|
1231
|
+
init_TextOrHTML();
|
|
1232
|
+
}
|
|
1233
|
+
});
|
|
1234
|
+
|
|
1157
1235
|
// src/components/Alert/Alert.tsx
|
|
1158
1236
|
function isAlertVariant(value) {
|
|
1159
1237
|
return value === "info" || value === "success" || value === "warning" || value === "error";
|
|
1160
1238
|
}
|
|
1161
|
-
var import_icons2,
|
|
1239
|
+
var import_icons2, import_dedupe8, import_Alert, import_jsx_runtime9, Alert;
|
|
1162
1240
|
var init_Alert = __esm({
|
|
1163
1241
|
"src/components/Alert/Alert.tsx"() {
|
|
1164
1242
|
"use strict";
|
|
1165
1243
|
import_icons2 = require("@simplybusiness/icons");
|
|
1166
|
-
|
|
1244
|
+
import_dedupe8 = __toESM(require("classnames/dedupe"));
|
|
1167
1245
|
init_Icon2();
|
|
1246
|
+
init_TextOrHTML2();
|
|
1168
1247
|
import_Alert = require("@simplybusiness/mobius/src/components/Alert/Alert.css");
|
|
1169
|
-
|
|
1248
|
+
import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1170
1249
|
Alert = ({ ref, ...props }) => {
|
|
1171
1250
|
const {
|
|
1172
1251
|
elementType: Element = "div",
|
|
@@ -1179,7 +1258,7 @@ var init_Alert = __esm({
|
|
|
1179
1258
|
if (!show) return null;
|
|
1180
1259
|
const variant = variantProp && isAlertVariant(variantProp) ? variantProp : "info";
|
|
1181
1260
|
const colorValue = variant === "success" ? `var(--color-valid)` : `var(--color-${variant})`;
|
|
1182
|
-
const classes = (0,
|
|
1261
|
+
const classes = (0, import_dedupe8.default)(
|
|
1183
1262
|
"mobius",
|
|
1184
1263
|
"mobius-alert",
|
|
1185
1264
|
{
|
|
@@ -1197,14 +1276,23 @@ var init_Alert = __esm({
|
|
|
1197
1276
|
warning: import_icons2.warning,
|
|
1198
1277
|
error: import_icons2.error
|
|
1199
1278
|
};
|
|
1200
|
-
const headerClasses = (0,
|
|
1201
|
-
const iconClasses = (0,
|
|
1202
|
-
const contentClasses = (0,
|
|
1203
|
-
return /* @__PURE__ */ (0,
|
|
1204
|
-
/* @__PURE__ */ (0,
|
|
1205
|
-
/* @__PURE__ */ (0,
|
|
1206
|
-
header && /* @__PURE__ */ (0,
|
|
1207
|
-
|
|
1279
|
+
const headerClasses = (0, import_dedupe8.default)("mobius", "mobius-alert__header");
|
|
1280
|
+
const iconClasses = (0, import_dedupe8.default)("mobius", "mobius-alert__icon");
|
|
1281
|
+
const contentClasses = (0, import_dedupe8.default)("mobius", "mobius-alert__content");
|
|
1282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Element, { ref, role: "alert", ...otherProps, className: classes, children: [
|
|
1283
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { icon: icon[variant], color: colorValue }) }),
|
|
1284
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
1285
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1286
|
+
TextOrHTML,
|
|
1287
|
+
{
|
|
1288
|
+
autoDetect: true,
|
|
1289
|
+
htmlElementType: "span",
|
|
1290
|
+
className: headerClasses,
|
|
1291
|
+
htmlClassName: headerClasses,
|
|
1292
|
+
text: header
|
|
1293
|
+
}
|
|
1294
|
+
),
|
|
1295
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: contentClasses, children })
|
|
1208
1296
|
] })
|
|
1209
1297
|
] });
|
|
1210
1298
|
};
|
|
@@ -1221,14 +1309,14 @@ var init_Alert2 = __esm({
|
|
|
1221
1309
|
});
|
|
1222
1310
|
|
|
1223
1311
|
// src/components/Box/Box.tsx
|
|
1224
|
-
var
|
|
1312
|
+
var import_dedupe9, import_Box, import_jsx_runtime10, Box;
|
|
1225
1313
|
var init_Box = __esm({
|
|
1226
1314
|
"src/components/Box/Box.tsx"() {
|
|
1227
1315
|
"use strict";
|
|
1228
|
-
|
|
1316
|
+
import_dedupe9 = __toESM(require("classnames/dedupe"));
|
|
1229
1317
|
init_utils();
|
|
1230
1318
|
import_Box = require("@simplybusiness/mobius/src/components/Box/Box.css");
|
|
1231
|
-
|
|
1319
|
+
import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1232
1320
|
Box = ({ ref, ...props }) => {
|
|
1233
1321
|
const {
|
|
1234
1322
|
elementType: Element = "div",
|
|
@@ -1254,7 +1342,7 @@ var init_Box = __esm({
|
|
|
1254
1342
|
style,
|
|
1255
1343
|
...otherProps
|
|
1256
1344
|
} = props;
|
|
1257
|
-
const classes = (0,
|
|
1345
|
+
const classes = (0, import_dedupe9.default)("mobius", "mobius-box", otherProps.className);
|
|
1258
1346
|
const styleProps = filterUndefinedProps({
|
|
1259
1347
|
padding: getSpacingValue(padding),
|
|
1260
1348
|
paddingInline: getSpacingValue(paddingInline || paddingX),
|
|
@@ -1271,7 +1359,7 @@ var init_Box = __esm({
|
|
|
1271
1359
|
height,
|
|
1272
1360
|
...style
|
|
1273
1361
|
});
|
|
1274
|
-
return /* @__PURE__ */ (0,
|
|
1362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Element, { ref, style: styleProps, ...otherProps, className: classes });
|
|
1275
1363
|
};
|
|
1276
1364
|
Box.displayName = "Box";
|
|
1277
1365
|
}
|
|
@@ -1286,27 +1374,27 @@ var init_Box2 = __esm({
|
|
|
1286
1374
|
});
|
|
1287
1375
|
|
|
1288
1376
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
1289
|
-
var
|
|
1377
|
+
var import_react10, import_dedupe10, import_Breadcrumbs, import_jsx_runtime11, Breadcrumbs;
|
|
1290
1378
|
var init_Breadcrumbs = __esm({
|
|
1291
1379
|
"src/components/Breadcrumbs/Breadcrumbs.tsx"() {
|
|
1292
1380
|
"use strict";
|
|
1293
1381
|
"use client";
|
|
1294
|
-
|
|
1295
|
-
|
|
1382
|
+
import_react10 = require("react");
|
|
1383
|
+
import_dedupe10 = __toESM(require("classnames/dedupe"));
|
|
1296
1384
|
import_Breadcrumbs = require("@simplybusiness/mobius/src/components/Breadcrumbs/Breadcrumbs.css");
|
|
1297
|
-
|
|
1385
|
+
import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1298
1386
|
Breadcrumbs = ({ ref, ...props }) => {
|
|
1299
1387
|
const { "aria-label": ariaLabel = "Breadcrumbs" } = props;
|
|
1300
1388
|
const { navProps } = { navProps: { "aria-label": ariaLabel } };
|
|
1301
1389
|
const { children, ...otherProps } = props;
|
|
1302
|
-
const childArray =
|
|
1303
|
-
const classes = (0,
|
|
1390
|
+
const childArray = import_react10.Children.toArray(children);
|
|
1391
|
+
const classes = (0, import_dedupe10.default)(
|
|
1304
1392
|
"mobius",
|
|
1305
1393
|
"mobius-breadcrumb",
|
|
1306
1394
|
otherProps.className
|
|
1307
1395
|
);
|
|
1308
|
-
return /* @__PURE__ */ (0,
|
|
1309
|
-
(child, i) => (0,
|
|
1396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("nav", { ref, ...otherProps, ...navProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("ul", { children: childArray.map(
|
|
1397
|
+
(child, i) => (0, import_react10.cloneElement)(
|
|
1310
1398
|
child,
|
|
1311
1399
|
{
|
|
1312
1400
|
key: i,
|
|
@@ -1320,22 +1408,22 @@ var init_Breadcrumbs = __esm({
|
|
|
1320
1408
|
});
|
|
1321
1409
|
|
|
1322
1410
|
// src/components/Breadcrumbs/BreadcrumbItem.tsx
|
|
1323
|
-
var
|
|
1411
|
+
var import_react11, import_dedupe11, import_jsx_runtime12, BreadcrumbItem;
|
|
1324
1412
|
var init_BreadcrumbItem = __esm({
|
|
1325
1413
|
"src/components/Breadcrumbs/BreadcrumbItem.tsx"() {
|
|
1326
1414
|
"use strict";
|
|
1327
1415
|
"use client";
|
|
1328
|
-
|
|
1329
|
-
|
|
1416
|
+
import_react11 = require("react");
|
|
1417
|
+
import_dedupe11 = __toESM(require("classnames/dedupe"));
|
|
1330
1418
|
init_Box2();
|
|
1331
|
-
|
|
1419
|
+
import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1332
1420
|
BreadcrumbItem = ({ ref, ...props }) => {
|
|
1333
1421
|
const {
|
|
1334
1422
|
isDisabled = false,
|
|
1335
1423
|
isCurrent = false,
|
|
1336
1424
|
"aria-current": ariaCurrent = "page",
|
|
1337
1425
|
children,
|
|
1338
|
-
separator = /* @__PURE__ */ (0,
|
|
1426
|
+
separator = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Box, { className: "mobius-breadcrumb__separator", "aria-hidden": "true", children: ">" }),
|
|
1339
1427
|
...otherProps
|
|
1340
1428
|
} = props;
|
|
1341
1429
|
const { itemProps } = {
|
|
@@ -1345,14 +1433,14 @@ var init_BreadcrumbItem = __esm({
|
|
|
1345
1433
|
...otherProps
|
|
1346
1434
|
}
|
|
1347
1435
|
};
|
|
1348
|
-
const classes = (0,
|
|
1436
|
+
const classes = (0, import_dedupe11.default)(
|
|
1349
1437
|
"mobius",
|
|
1350
1438
|
"mobius-breadcrumb__item",
|
|
1351
1439
|
props.className
|
|
1352
1440
|
);
|
|
1353
|
-
const child = typeof children === "string" ? /* @__PURE__ */ (0,
|
|
1354
|
-
return /* @__PURE__ */ (0,
|
|
1355
|
-
(0,
|
|
1441
|
+
const child = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { ...itemProps, children }) : import_react11.Children.only(children);
|
|
1442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("li", { className: classes, children: [
|
|
1443
|
+
(0, import_react11.cloneElement)(child, {
|
|
1356
1444
|
...child.props,
|
|
1357
1445
|
...itemProps,
|
|
1358
1446
|
ref
|
|
@@ -1381,7 +1469,7 @@ function VisuallyHidden(props) {
|
|
|
1381
1469
|
elementType: Component = "div",
|
|
1382
1470
|
...otherProps
|
|
1383
1471
|
} = props;
|
|
1384
|
-
return /* @__PURE__ */ (0,
|
|
1472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1385
1473
|
Component,
|
|
1386
1474
|
{
|
|
1387
1475
|
className,
|
|
@@ -1402,11 +1490,11 @@ function VisuallyHidden(props) {
|
|
|
1402
1490
|
}
|
|
1403
1491
|
);
|
|
1404
1492
|
}
|
|
1405
|
-
var
|
|
1493
|
+
var import_jsx_runtime13;
|
|
1406
1494
|
var init_VisuallyHidden = __esm({
|
|
1407
1495
|
"src/components/VisuallyHidden/VisuallyHidden.tsx"() {
|
|
1408
1496
|
"use strict";
|
|
1409
|
-
|
|
1497
|
+
import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1410
1498
|
}
|
|
1411
1499
|
});
|
|
1412
1500
|
|
|
@@ -1419,19 +1507,19 @@ var init_VisuallyHidden2 = __esm({
|
|
|
1419
1507
|
});
|
|
1420
1508
|
|
|
1421
1509
|
// src/components/Button/Loading.tsx
|
|
1422
|
-
var import_icons3,
|
|
1510
|
+
var import_icons3, import_jsx_runtime14, Loading;
|
|
1423
1511
|
var init_Loading = __esm({
|
|
1424
1512
|
"src/components/Button/Loading.tsx"() {
|
|
1425
1513
|
"use strict";
|
|
1426
1514
|
import_icons3 = require("@simplybusiness/icons");
|
|
1427
1515
|
init_Icon2();
|
|
1428
1516
|
init_VisuallyHidden2();
|
|
1429
|
-
|
|
1517
|
+
import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1430
1518
|
Loading = (props) => {
|
|
1431
1519
|
const { children } = props;
|
|
1432
|
-
return /* @__PURE__ */ (0,
|
|
1433
|
-
/* @__PURE__ */ (0,
|
|
1434
|
-
/* @__PURE__ */ (0,
|
|
1520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
1521
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "mobius-button__icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { icon: import_icons3.loading, spin: true, size: "md" }) }),
|
|
1522
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(VisuallyHidden, { className: "mobius-button__loading-text", children: "Loading" }),
|
|
1435
1523
|
children
|
|
1436
1524
|
] });
|
|
1437
1525
|
};
|
|
@@ -1439,33 +1527,33 @@ var init_Loading = __esm({
|
|
|
1439
1527
|
});
|
|
1440
1528
|
|
|
1441
1529
|
// src/components/Button/Success.tsx
|
|
1442
|
-
var import_icons4,
|
|
1530
|
+
var import_icons4, import_jsx_runtime15, Success;
|
|
1443
1531
|
var init_Success = __esm({
|
|
1444
1532
|
"src/components/Button/Success.tsx"() {
|
|
1445
1533
|
"use strict";
|
|
1446
1534
|
import_icons4 = require("@simplybusiness/icons");
|
|
1447
1535
|
init_Icon2();
|
|
1448
1536
|
init_VisuallyHidden2();
|
|
1449
|
-
|
|
1450
|
-
Success = () => /* @__PURE__ */ (0,
|
|
1451
|
-
/* @__PURE__ */ (0,
|
|
1452
|
-
/* @__PURE__ */ (0,
|
|
1537
|
+
import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1538
|
+
Success = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
1539
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "mobius-button__icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { icon: import_icons4.tick, size: "md" }) }),
|
|
1540
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(VisuallyHidden, { className: "mobius-button__success-text", children: "Success" })
|
|
1453
1541
|
] });
|
|
1454
1542
|
}
|
|
1455
1543
|
});
|
|
1456
1544
|
|
|
1457
1545
|
// src/components/Button/Button.tsx
|
|
1458
|
-
var
|
|
1546
|
+
var import_dedupe12, import_Button, import_jsx_runtime16, Button;
|
|
1459
1547
|
var init_Button = __esm({
|
|
1460
1548
|
"src/components/Button/Button.tsx"() {
|
|
1461
1549
|
"use strict";
|
|
1462
1550
|
"use client";
|
|
1463
|
-
|
|
1551
|
+
import_dedupe12 = __toESM(require("classnames/dedupe"));
|
|
1464
1552
|
init_Loading();
|
|
1465
1553
|
init_useButton2();
|
|
1466
1554
|
init_Success();
|
|
1467
1555
|
import_Button = require("@simplybusiness/mobius/src/components/Button/Button.css");
|
|
1468
|
-
|
|
1556
|
+
import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1469
1557
|
Button = ({ ref, ...props }) => {
|
|
1470
1558
|
const {
|
|
1471
1559
|
children,
|
|
@@ -1480,7 +1568,7 @@ var init_Button = __esm({
|
|
|
1480
1568
|
...otherProps
|
|
1481
1569
|
} = props;
|
|
1482
1570
|
const { buttonProps } = useButton(props);
|
|
1483
|
-
otherProps.className = (0,
|
|
1571
|
+
otherProps.className = (0, import_dedupe12.default)(
|
|
1484
1572
|
"mobius",
|
|
1485
1573
|
"mobius-button",
|
|
1486
1574
|
`--variant-${variant}`,
|
|
@@ -1492,9 +1580,9 @@ var init_Button = __esm({
|
|
|
1492
1580
|
},
|
|
1493
1581
|
otherProps.className
|
|
1494
1582
|
);
|
|
1495
|
-
return /* @__PURE__ */ (0,
|
|
1496
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
1497
|
-
isSuccess && !isLoading && /* @__PURE__ */ (0,
|
|
1583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Component, { ref, ...buttonProps, ...otherProps, children: [
|
|
1584
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Loading, { children }) : children,
|
|
1585
|
+
isSuccess && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Success, {})
|
|
1498
1586
|
] });
|
|
1499
1587
|
};
|
|
1500
1588
|
Button.displayName = "Button";
|
|
@@ -1510,16 +1598,16 @@ var init_Button2 = __esm({
|
|
|
1510
1598
|
});
|
|
1511
1599
|
|
|
1512
1600
|
// src/components/Stack/Stack.tsx
|
|
1513
|
-
var
|
|
1601
|
+
var import_dedupe13, import_Stack, import_jsx_runtime17, Stack;
|
|
1514
1602
|
var init_Stack = __esm({
|
|
1515
1603
|
"src/components/Stack/Stack.tsx"() {
|
|
1516
1604
|
"use strict";
|
|
1517
|
-
|
|
1605
|
+
import_dedupe13 = __toESM(require("classnames/dedupe"));
|
|
1518
1606
|
import_Stack = require("@simplybusiness/mobius/src/components/Stack/Stack.css");
|
|
1519
|
-
|
|
1607
|
+
import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1520
1608
|
Stack = ({ ref, ...props }) => {
|
|
1521
1609
|
const { elementType: Element = "div", gap, ...otherProps } = props;
|
|
1522
|
-
const classes = (0,
|
|
1610
|
+
const classes = (0, import_dedupe13.default)(
|
|
1523
1611
|
"mobius",
|
|
1524
1612
|
"mobius-stack",
|
|
1525
1613
|
{
|
|
@@ -1527,7 +1615,7 @@ var init_Stack = __esm({
|
|
|
1527
1615
|
},
|
|
1528
1616
|
otherProps.className
|
|
1529
1617
|
);
|
|
1530
|
-
return /* @__PURE__ */ (0,
|
|
1618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
1531
1619
|
};
|
|
1532
1620
|
Stack.displayName = "Stack";
|
|
1533
1621
|
}
|
|
@@ -1542,13 +1630,13 @@ var init_Stack2 = __esm({
|
|
|
1542
1630
|
});
|
|
1543
1631
|
|
|
1544
1632
|
// src/components/Checkbox/Checkbox.tsx
|
|
1545
|
-
var
|
|
1633
|
+
var import_react12, import_dedupe14, import_icons5, import_Checkbox, import_jsx_runtime18, Checkbox;
|
|
1546
1634
|
var init_Checkbox = __esm({
|
|
1547
1635
|
"src/components/Checkbox/Checkbox.tsx"() {
|
|
1548
1636
|
"use strict";
|
|
1549
1637
|
"use client";
|
|
1550
|
-
|
|
1551
|
-
|
|
1638
|
+
import_react12 = require("react");
|
|
1639
|
+
import_dedupe14 = __toESM(require("classnames/dedupe"));
|
|
1552
1640
|
import_icons5 = require("@simplybusiness/icons");
|
|
1553
1641
|
init_ErrorMessage2();
|
|
1554
1642
|
init_spaceDelimitedList();
|
|
@@ -1556,7 +1644,7 @@ var init_Checkbox = __esm({
|
|
|
1556
1644
|
init_Icon2();
|
|
1557
1645
|
init_Stack2();
|
|
1558
1646
|
import_Checkbox = require("@simplybusiness/mobius/src/components/Checkbox/Checkbox.css");
|
|
1559
|
-
|
|
1647
|
+
import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1560
1648
|
Checkbox = ({ ref, ...props }) => {
|
|
1561
1649
|
const {
|
|
1562
1650
|
id,
|
|
@@ -1576,18 +1664,18 @@ var init_Checkbox = __esm({
|
|
|
1576
1664
|
["aria-describedby"]: ariaDescribedBy,
|
|
1577
1665
|
...rest
|
|
1578
1666
|
} = props;
|
|
1579
|
-
const [checked, setChecked] = (0,
|
|
1580
|
-
const fallbackRef = (0,
|
|
1667
|
+
const [checked, setChecked] = (0, import_react12.useState)(defaultSelected);
|
|
1668
|
+
const fallbackRef = (0, import_react12.useRef)(null);
|
|
1581
1669
|
const refObj = ref || fallbackRef;
|
|
1582
|
-
const inputId = (0,
|
|
1670
|
+
const inputId = (0, import_react12.useId)();
|
|
1583
1671
|
const isControlled = typeof selected === "boolean";
|
|
1584
|
-
(0,
|
|
1672
|
+
(0, import_react12.useEffect)(() => {
|
|
1585
1673
|
if (isControlled) {
|
|
1586
1674
|
setChecked(selected);
|
|
1587
1675
|
}
|
|
1588
1676
|
}, [selected, isControlled]);
|
|
1589
1677
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
1590
|
-
const sharedClasses = (0,
|
|
1678
|
+
const sharedClasses = (0, import_dedupe14.default)(
|
|
1591
1679
|
{
|
|
1592
1680
|
"--is-disabled": isDisabled,
|
|
1593
1681
|
"--is-selected": checked,
|
|
@@ -1596,31 +1684,31 @@ var init_Checkbox = __esm({
|
|
|
1596
1684
|
},
|
|
1597
1685
|
validationClasses
|
|
1598
1686
|
);
|
|
1599
|
-
const wrapperClasses = (0,
|
|
1687
|
+
const wrapperClasses = (0, import_dedupe14.default)(
|
|
1600
1688
|
"mobius",
|
|
1601
1689
|
"mobius-checkbox",
|
|
1602
1690
|
sharedClasses,
|
|
1603
1691
|
className
|
|
1604
1692
|
);
|
|
1605
|
-
const labelClasses = (0,
|
|
1606
|
-
const inputClasses = (0,
|
|
1607
|
-
const iconClasses = (0,
|
|
1608
|
-
const errorMessageId = (0,
|
|
1693
|
+
const labelClasses = (0, import_dedupe14.default)("mobius-checkbox__label", sharedClasses);
|
|
1694
|
+
const inputClasses = (0, import_dedupe14.default)("mobius-checkbox__input", sharedClasses);
|
|
1695
|
+
const iconClasses = (0, import_dedupe14.default)("mobius-checkbox__icon", sharedClasses);
|
|
1696
|
+
const errorMessageId = (0, import_react12.useId)();
|
|
1609
1697
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
1610
1698
|
const describedBy = spaceDelimitedList([
|
|
1611
1699
|
shouldErrorMessageShow,
|
|
1612
1700
|
ariaDescribedBy
|
|
1613
1701
|
]);
|
|
1614
|
-
const labelId = (0,
|
|
1702
|
+
const labelId = (0, import_react12.useId)();
|
|
1615
1703
|
const handleChange = (event) => {
|
|
1616
1704
|
setChecked(!checked);
|
|
1617
1705
|
if (onChange) {
|
|
1618
1706
|
onChange(event, isLastItem);
|
|
1619
1707
|
}
|
|
1620
1708
|
};
|
|
1621
|
-
return /* @__PURE__ */ (0,
|
|
1622
|
-
/* @__PURE__ */ (0,
|
|
1623
|
-
/* @__PURE__ */ (0,
|
|
1709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Stack, { gap: "xs", className: wrapperClasses, children: [
|
|
1710
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: labelClasses, children: [
|
|
1711
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1624
1712
|
"input",
|
|
1625
1713
|
{
|
|
1626
1714
|
"aria-describedby": describedBy,
|
|
@@ -1641,7 +1729,7 @@ var init_Checkbox = __esm({
|
|
|
1641
1729
|
...rest
|
|
1642
1730
|
}
|
|
1643
1731
|
),
|
|
1644
|
-
/* @__PURE__ */ (0,
|
|
1732
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1645
1733
|
Icon,
|
|
1646
1734
|
{
|
|
1647
1735
|
icon: checked ? import_icons5.squareTick : import_icons5.square,
|
|
@@ -1649,9 +1737,9 @@ var init_Checkbox = __esm({
|
|
|
1649
1737
|
className: iconClasses
|
|
1650
1738
|
}
|
|
1651
1739
|
),
|
|
1652
|
-
/* @__PURE__ */ (0,
|
|
1740
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { id: labelId, className: "mobius-checkbox__visible-label", children: label })
|
|
1653
1741
|
] }),
|
|
1654
|
-
/* @__PURE__ */ (0,
|
|
1742
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
1655
1743
|
] });
|
|
1656
1744
|
};
|
|
1657
1745
|
Checkbox.displayName = "Checkbox";
|
|
@@ -1659,18 +1747,18 @@ var init_Checkbox = __esm({
|
|
|
1659
1747
|
});
|
|
1660
1748
|
|
|
1661
1749
|
// src/components/Label/Label.tsx
|
|
1662
|
-
var
|
|
1750
|
+
var import_dedupe15, import_Label, import_jsx_runtime19, Label;
|
|
1663
1751
|
var init_Label = __esm({
|
|
1664
1752
|
"src/components/Label/Label.tsx"() {
|
|
1665
1753
|
"use strict";
|
|
1666
|
-
|
|
1754
|
+
import_dedupe15 = __toESM(require("classnames/dedupe"));
|
|
1667
1755
|
import_Label = require("@simplybusiness/mobius/src/components/Label/Label.css");
|
|
1668
|
-
|
|
1756
|
+
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1669
1757
|
Label = ({ ref, ...props }) => {
|
|
1670
1758
|
const { elementType: Element = "label", children, ...otherProps } = props;
|
|
1671
|
-
const classes = (0,
|
|
1759
|
+
const classes = (0, import_dedupe15.default)("mobius", "mobius-label", props.className);
|
|
1672
1760
|
otherProps.className = classes;
|
|
1673
|
-
return /* @__PURE__ */ (0,
|
|
1761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Element, { ref, ...otherProps, className: classes, children });
|
|
1674
1762
|
};
|
|
1675
1763
|
Label.displayName = "Label";
|
|
1676
1764
|
}
|
|
@@ -1685,20 +1773,20 @@ var init_Label2 = __esm({
|
|
|
1685
1773
|
});
|
|
1686
1774
|
|
|
1687
1775
|
// src/components/Checkbox/CheckboxGroup.tsx
|
|
1688
|
-
var
|
|
1776
|
+
var import_dedupe16, import_react13, import_CheckboxGroup, import_jsx_runtime20, CheckboxGroup;
|
|
1689
1777
|
var init_CheckboxGroup = __esm({
|
|
1690
1778
|
"src/components/Checkbox/CheckboxGroup.tsx"() {
|
|
1691
1779
|
"use strict";
|
|
1692
1780
|
"use client";
|
|
1693
|
-
|
|
1694
|
-
|
|
1781
|
+
import_dedupe16 = __toESM(require("classnames/dedupe"));
|
|
1782
|
+
import_react13 = require("react");
|
|
1695
1783
|
init_hooks();
|
|
1696
1784
|
init_spaceDelimitedList();
|
|
1697
1785
|
init_ErrorMessage2();
|
|
1698
1786
|
init_Label2();
|
|
1699
1787
|
init_Checkbox();
|
|
1700
1788
|
import_CheckboxGroup = require("@simplybusiness/mobius/src/components/Checkbox/CheckboxGroup.css");
|
|
1701
|
-
|
|
1789
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1702
1790
|
CheckboxGroup = ({ ref, ...props }) => {
|
|
1703
1791
|
const {
|
|
1704
1792
|
label,
|
|
@@ -1716,10 +1804,10 @@ var init_CheckboxGroup = __esm({
|
|
|
1716
1804
|
lastItemDisables = false,
|
|
1717
1805
|
...rest
|
|
1718
1806
|
} = props;
|
|
1719
|
-
const [selected, setSelected] = (0,
|
|
1720
|
-
const isInitializedRef = (0,
|
|
1721
|
-
const prevDefaultValueRef = (0,
|
|
1722
|
-
(0,
|
|
1807
|
+
const [selected, setSelected] = (0, import_react13.useState)(defaultValue);
|
|
1808
|
+
const isInitializedRef = (0, import_react13.useRef)(false);
|
|
1809
|
+
const prevDefaultValueRef = (0, import_react13.useRef)(defaultValue);
|
|
1810
|
+
(0, import_react13.useEffect)(() => {
|
|
1723
1811
|
const hasChanged = defaultValue.length !== prevDefaultValueRef.current.length || defaultValue.some(
|
|
1724
1812
|
(val, index) => val !== prevDefaultValueRef.current[index]
|
|
1725
1813
|
);
|
|
@@ -1729,7 +1817,7 @@ var init_CheckboxGroup = __esm({
|
|
|
1729
1817
|
isInitializedRef.current = true;
|
|
1730
1818
|
}
|
|
1731
1819
|
}, [defaultValue]);
|
|
1732
|
-
const checkboxGroupClasses = (0,
|
|
1820
|
+
const checkboxGroupClasses = (0, import_dedupe16.default)(
|
|
1733
1821
|
"mobius",
|
|
1734
1822
|
"mobius-checkbox-group",
|
|
1735
1823
|
className,
|
|
@@ -1741,19 +1829,19 @@ var init_CheckboxGroup = __esm({
|
|
|
1741
1829
|
}
|
|
1742
1830
|
);
|
|
1743
1831
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
1744
|
-
const labelClasses = (0,
|
|
1832
|
+
const labelClasses = (0, import_dedupe16.default)(
|
|
1745
1833
|
{
|
|
1746
1834
|
"--is-disabled": isDisabled
|
|
1747
1835
|
},
|
|
1748
1836
|
validationClasses
|
|
1749
1837
|
);
|
|
1750
|
-
const errorMessageId = (0,
|
|
1838
|
+
const errorMessageId = (0, import_react13.useId)();
|
|
1751
1839
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
1752
1840
|
const describedBy = spaceDelimitedList([
|
|
1753
1841
|
shouldErrorMessageShow,
|
|
1754
1842
|
props["aria-describedby"]
|
|
1755
1843
|
]);
|
|
1756
|
-
const labelId = (0,
|
|
1844
|
+
const labelId = (0, import_react13.useId)();
|
|
1757
1845
|
const handleChange = (event, isLastItem = false) => {
|
|
1758
1846
|
const {
|
|
1759
1847
|
target: { value, checked }
|
|
@@ -1771,12 +1859,12 @@ var init_CheckboxGroup = __esm({
|
|
|
1771
1859
|
setSelected(newValue);
|
|
1772
1860
|
onChange?.(newValue);
|
|
1773
1861
|
};
|
|
1774
|
-
const childrenArray =
|
|
1862
|
+
const childrenArray = import_react13.Children.toArray(children);
|
|
1775
1863
|
const lastCheckbox = childrenArray.filter(
|
|
1776
|
-
(child) => (0,
|
|
1864
|
+
(child) => (0, import_react13.isValidElement)(child) && child.type === Checkbox
|
|
1777
1865
|
).pop();
|
|
1778
1866
|
const lastCheckboxIsChecked = lastCheckbox && selected.includes(lastCheckbox.props.value);
|
|
1779
|
-
return /* @__PURE__ */ (0,
|
|
1867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1780
1868
|
"div",
|
|
1781
1869
|
{
|
|
1782
1870
|
...rest,
|
|
@@ -1785,16 +1873,16 @@ var init_CheckboxGroup = __esm({
|
|
|
1785
1873
|
className: checkboxGroupClasses,
|
|
1786
1874
|
role: "group",
|
|
1787
1875
|
style: {
|
|
1788
|
-
"--checkbox-items-per-row": itemsPerRow ||
|
|
1876
|
+
"--checkbox-items-per-row": itemsPerRow || import_react13.Children.count(children)
|
|
1789
1877
|
},
|
|
1790
1878
|
children: [
|
|
1791
|
-
label && /* @__PURE__ */ (0,
|
|
1792
|
-
/* @__PURE__ */ (0,
|
|
1793
|
-
if ((0,
|
|
1879
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Label, { elementType: "span", id: labelId, className: labelClasses, children: label }),
|
|
1880
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "mobius-checkbox-group__wrapper", children: childrenArray.map((child) => {
|
|
1881
|
+
if ((0, import_react13.isValidElement)(child)) {
|
|
1794
1882
|
const isLastItem = child === lastCheckbox;
|
|
1795
1883
|
const isChildDisabled = isDisabled || lastItemDisables && lastCheckboxIsChecked && !isLastItem;
|
|
1796
1884
|
const childProps = child.props;
|
|
1797
|
-
return (0,
|
|
1885
|
+
return (0, import_react13.cloneElement)(
|
|
1798
1886
|
child,
|
|
1799
1887
|
{
|
|
1800
1888
|
isDisabled: isChildDisabled,
|
|
@@ -1810,7 +1898,7 @@ var init_CheckboxGroup = __esm({
|
|
|
1810
1898
|
}
|
|
1811
1899
|
return child;
|
|
1812
1900
|
}) }),
|
|
1813
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
1901
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
1814
1902
|
]
|
|
1815
1903
|
}
|
|
1816
1904
|
);
|
|
@@ -1837,23 +1925,23 @@ var init_Checkbox2 = __esm({
|
|
|
1837
1925
|
});
|
|
1838
1926
|
|
|
1839
1927
|
// src/components/Container/Container.tsx
|
|
1840
|
-
var
|
|
1928
|
+
var import_dedupe17, import_Container, import_jsx_runtime21, Container;
|
|
1841
1929
|
var init_Container = __esm({
|
|
1842
1930
|
"src/components/Container/Container.tsx"() {
|
|
1843
1931
|
"use strict";
|
|
1844
|
-
|
|
1932
|
+
import_dedupe17 = __toESM(require("classnames/dedupe"));
|
|
1845
1933
|
init_utils();
|
|
1846
1934
|
import_Container = require("@simplybusiness/mobius/src/components/Container/Container.css");
|
|
1847
|
-
|
|
1935
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1848
1936
|
Container = ({ ref, ...props }) => {
|
|
1849
1937
|
const { elementType: Element = "div", size = "md", ...otherProps } = props;
|
|
1850
|
-
const classes = (0,
|
|
1938
|
+
const classes = (0, import_dedupe17.default)(
|
|
1851
1939
|
"mobius",
|
|
1852
1940
|
"mobius-container",
|
|
1853
1941
|
sizeClasses(size),
|
|
1854
1942
|
otherProps.className
|
|
1855
1943
|
);
|
|
1856
|
-
return /* @__PURE__ */ (0,
|
|
1944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
1857
1945
|
};
|
|
1858
1946
|
Container.displayName = "Container";
|
|
1859
1947
|
}
|
|
@@ -1906,17 +1994,17 @@ var init_validation = __esm({
|
|
|
1906
1994
|
});
|
|
1907
1995
|
|
|
1908
1996
|
// src/components/DateField/DateField.tsx
|
|
1909
|
-
var
|
|
1997
|
+
var import_dedupe18, import_react14, import_jsx_runtime22, MIN_MAX_ERROR, DateField;
|
|
1910
1998
|
var init_DateField = __esm({
|
|
1911
1999
|
"src/components/DateField/DateField.tsx"() {
|
|
1912
2000
|
"use strict";
|
|
1913
2001
|
"use client";
|
|
1914
|
-
|
|
1915
|
-
|
|
2002
|
+
import_dedupe18 = __toESM(require("classnames/dedupe"));
|
|
2003
|
+
import_react14 = require("react");
|
|
1916
2004
|
init_mergeRefs();
|
|
1917
2005
|
init_TextField2();
|
|
1918
2006
|
init_validation();
|
|
1919
|
-
|
|
2007
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1920
2008
|
MIN_MAX_ERROR = '"min" value should not be greater than "max" value.';
|
|
1921
2009
|
DateField = ({ ref, ...props }) => {
|
|
1922
2010
|
const {
|
|
@@ -1929,10 +2017,10 @@ var init_DateField = __esm({
|
|
|
1929
2017
|
value,
|
|
1930
2018
|
...otherProps
|
|
1931
2019
|
} = props;
|
|
1932
|
-
const [error3, setError] = (0,
|
|
1933
|
-
const [isInvalid, setIsInvalid] = (0,
|
|
1934
|
-
const localRef = (0,
|
|
1935
|
-
const classes = (0,
|
|
2020
|
+
const [error3, setError] = (0, import_react14.useState)(errorMessage);
|
|
2021
|
+
const [isInvalid, setIsInvalid] = (0, import_react14.useState)(void 0);
|
|
2022
|
+
const localRef = (0, import_react14.useRef)(null);
|
|
2023
|
+
const classes = (0, import_dedupe18.default)("mobius-date-field", className);
|
|
1936
2024
|
const formattedMin = min ? convertToDateFormat(min, format) : void 0;
|
|
1937
2025
|
const formattedMax = max ? convertToDateFormat(max, format) : void 0;
|
|
1938
2026
|
const formattedDefaultValue = defaultValue ? convertToDateFormat(defaultValue, format) : void 0;
|
|
@@ -1945,7 +2033,7 @@ var init_DateField = __esm({
|
|
|
1945
2033
|
setError(props.errorMessage);
|
|
1946
2034
|
setIsInvalid(false);
|
|
1947
2035
|
};
|
|
1948
|
-
(0,
|
|
2036
|
+
(0, import_react14.useEffect)(() => {
|
|
1949
2037
|
if (!isValidDate(min, format)) {
|
|
1950
2038
|
setInvalidState(`Invalid min date: ${min}`);
|
|
1951
2039
|
return;
|
|
@@ -1978,7 +2066,7 @@ var init_DateField = __esm({
|
|
|
1978
2066
|
validate();
|
|
1979
2067
|
otherProps.onBlur?.(event);
|
|
1980
2068
|
};
|
|
1981
|
-
return /* @__PURE__ */ (0,
|
|
2069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1982
2070
|
TextField,
|
|
1983
2071
|
{
|
|
1984
2072
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -2009,23 +2097,23 @@ var init_DateField2 = __esm({
|
|
|
2009
2097
|
});
|
|
2010
2098
|
|
|
2011
2099
|
// src/components/Drawer/Content.tsx
|
|
2012
|
-
var
|
|
2100
|
+
var import_jsx_runtime23, Content;
|
|
2013
2101
|
var init_Content = __esm({
|
|
2014
2102
|
"src/components/Drawer/Content.tsx"() {
|
|
2015
2103
|
"use strict";
|
|
2016
|
-
|
|
2017
|
-
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
2104
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2105
|
+
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ref, ...otherProps, className: "mobius-drawer__content", children });
|
|
2018
2106
|
Content.displayName = "Content";
|
|
2019
2107
|
}
|
|
2020
2108
|
});
|
|
2021
2109
|
|
|
2022
2110
|
// src/components/Drawer/DrawerContext.tsx
|
|
2023
|
-
var
|
|
2111
|
+
var import_react15, DrawerContext;
|
|
2024
2112
|
var init_DrawerContext = __esm({
|
|
2025
2113
|
"src/components/Drawer/DrawerContext.tsx"() {
|
|
2026
2114
|
"use strict";
|
|
2027
|
-
|
|
2028
|
-
DrawerContext = (0,
|
|
2115
|
+
import_react15 = require("react");
|
|
2116
|
+
DrawerContext = (0, import_react15.createContext)({
|
|
2029
2117
|
onClose: () => {
|
|
2030
2118
|
},
|
|
2031
2119
|
closeLabel: void 0,
|
|
@@ -2035,19 +2123,19 @@ var init_DrawerContext = __esm({
|
|
|
2035
2123
|
});
|
|
2036
2124
|
|
|
2037
2125
|
// src/components/Drawer/Drawer.tsx
|
|
2038
|
-
var
|
|
2126
|
+
var import_dedupe19, import_react16, import_Drawer, import_jsx_runtime24, TRANSITION_CSS_VARIABLE, Drawer;
|
|
2039
2127
|
var init_Drawer = __esm({
|
|
2040
2128
|
"src/components/Drawer/Drawer.tsx"() {
|
|
2041
2129
|
"use strict";
|
|
2042
2130
|
"use client";
|
|
2043
|
-
|
|
2044
|
-
|
|
2131
|
+
import_dedupe19 = __toESM(require("classnames/dedupe"));
|
|
2132
|
+
import_react16 = require("react");
|
|
2045
2133
|
init_hooks();
|
|
2046
2134
|
init_utils();
|
|
2047
2135
|
init_VisuallyHidden2();
|
|
2048
2136
|
init_DrawerContext();
|
|
2049
2137
|
import_Drawer = require("@simplybusiness/mobius/src/components/Drawer/Drawer.css");
|
|
2050
|
-
|
|
2138
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2051
2139
|
TRANSITION_CSS_VARIABLE = "--drawer-transition-duration";
|
|
2052
2140
|
Drawer = ({ ref, ...props }) => {
|
|
2053
2141
|
const {
|
|
@@ -2060,8 +2148,8 @@ var init_Drawer = __esm({
|
|
|
2060
2148
|
onClose,
|
|
2061
2149
|
children
|
|
2062
2150
|
} = props;
|
|
2063
|
-
const dialogRef = (0,
|
|
2064
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
2151
|
+
const dialogRef = (0, import_react16.useRef)(null);
|
|
2152
|
+
const [shouldTransition, setShouldTransition] = (0, import_react16.useState)(false);
|
|
2065
2153
|
const { close } = useDialog({
|
|
2066
2154
|
ref: dialogRef,
|
|
2067
2155
|
isOpen,
|
|
@@ -2072,9 +2160,9 @@ var init_Drawer = __esm({
|
|
|
2072
2160
|
CSSVariable: TRANSITION_CSS_VARIABLE
|
|
2073
2161
|
}
|
|
2074
2162
|
});
|
|
2075
|
-
const hiddenId = `dialog-screen-reader-announce-${(0,
|
|
2076
|
-
const headerId = `dialog-header-${(0,
|
|
2077
|
-
const dialogClasses = (0,
|
|
2163
|
+
const hiddenId = `dialog-screen-reader-announce-${(0, import_react16.useId)()}`;
|
|
2164
|
+
const headerId = `dialog-header-${(0, import_react16.useId)()}`;
|
|
2165
|
+
const dialogClasses = (0, import_dedupe19.default)(
|
|
2078
2166
|
"mobius",
|
|
2079
2167
|
"mobius-drawer",
|
|
2080
2168
|
`--${direction}`,
|
|
@@ -2083,10 +2171,10 @@ var init_Drawer = __esm({
|
|
|
2083
2171
|
"--should-transition": shouldTransition
|
|
2084
2172
|
}
|
|
2085
2173
|
);
|
|
2086
|
-
(0,
|
|
2174
|
+
(0, import_react16.useEffect)(() => {
|
|
2087
2175
|
setShouldTransition(supportsDialog());
|
|
2088
2176
|
}, []);
|
|
2089
|
-
const contextValue = (0,
|
|
2177
|
+
const contextValue = (0, import_react16.useMemo)(
|
|
2090
2178
|
() => ({
|
|
2091
2179
|
onClose: close,
|
|
2092
2180
|
closeLabel,
|
|
@@ -2094,18 +2182,18 @@ var init_Drawer = __esm({
|
|
|
2094
2182
|
}),
|
|
2095
2183
|
[close, closeLabel, headerId]
|
|
2096
2184
|
);
|
|
2097
|
-
return /* @__PURE__ */ (0,
|
|
2185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2098
2186
|
"dialog",
|
|
2099
2187
|
{
|
|
2100
|
-
id: (0,
|
|
2188
|
+
id: (0, import_react16.useId)(),
|
|
2101
2189
|
ref: mergeRefs([dialogRef, ref]),
|
|
2102
2190
|
onCancel: close,
|
|
2103
2191
|
className: dialogClasses,
|
|
2104
2192
|
"aria-describedby": hiddenId,
|
|
2105
2193
|
"aria-labelledby": headerId,
|
|
2106
2194
|
children: [
|
|
2107
|
-
/* @__PURE__ */ (0,
|
|
2108
|
-
/* @__PURE__ */ (0,
|
|
2195
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { id: hiddenId, children: announce }) }),
|
|
2196
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DrawerContext.Provider, { value: contextValue, children })
|
|
2109
2197
|
]
|
|
2110
2198
|
}
|
|
2111
2199
|
);
|
|
@@ -2115,21 +2203,21 @@ var init_Drawer = __esm({
|
|
|
2115
2203
|
});
|
|
2116
2204
|
|
|
2117
2205
|
// src/components/Drawer/useDrawer.ts
|
|
2118
|
-
var
|
|
2206
|
+
var import_react17, useDrawer;
|
|
2119
2207
|
var init_useDrawer = __esm({
|
|
2120
2208
|
"src/components/Drawer/useDrawer.ts"() {
|
|
2121
2209
|
"use strict";
|
|
2122
|
-
|
|
2210
|
+
import_react17 = require("react");
|
|
2123
2211
|
init_DrawerContext();
|
|
2124
2212
|
useDrawer = () => {
|
|
2125
|
-
const { onClose, closeLabel, headerId } = (0,
|
|
2213
|
+
const { onClose, closeLabel, headerId } = (0, import_react17.useContext)(DrawerContext);
|
|
2126
2214
|
return { onClose, closeLabel, headerId };
|
|
2127
2215
|
};
|
|
2128
2216
|
}
|
|
2129
2217
|
});
|
|
2130
2218
|
|
|
2131
2219
|
// src/components/Drawer/Header.tsx
|
|
2132
|
-
var import_icons6,
|
|
2220
|
+
var import_icons6, import_jsx_runtime25, Header;
|
|
2133
2221
|
var init_Header = __esm({
|
|
2134
2222
|
"src/components/Drawer/Header.tsx"() {
|
|
2135
2223
|
"use strict";
|
|
@@ -2137,12 +2225,12 @@ var init_Header = __esm({
|
|
|
2137
2225
|
init_Button2();
|
|
2138
2226
|
init_Icon2();
|
|
2139
2227
|
init_useDrawer();
|
|
2140
|
-
|
|
2228
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2141
2229
|
Header = ({ ref, children, ...otherProps }) => {
|
|
2142
2230
|
const { onClose, closeLabel, headerId } = useDrawer();
|
|
2143
|
-
return /* @__PURE__ */ (0,
|
|
2144
|
-
/* @__PURE__ */ (0,
|
|
2145
|
-
/* @__PURE__ */ (0,
|
|
2231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("header", { ref, ...otherProps, className: "mobius-drawer__header", children: [
|
|
2232
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { id: headerId, children }),
|
|
2233
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2146
2234
|
Button,
|
|
2147
2235
|
{
|
|
2148
2236
|
"aria-label": "Close",
|
|
@@ -2151,7 +2239,7 @@ var init_Header = __esm({
|
|
|
2151
2239
|
className: "mobius-drawer__close",
|
|
2152
2240
|
size: "sm",
|
|
2153
2241
|
children: [
|
|
2154
|
-
/* @__PURE__ */ (0,
|
|
2242
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { icon: import_icons6.cross }),
|
|
2155
2243
|
" ",
|
|
2156
2244
|
closeLabel
|
|
2157
2245
|
]
|
|
@@ -2180,17 +2268,17 @@ var init_Drawer2 = __esm({
|
|
|
2180
2268
|
});
|
|
2181
2269
|
|
|
2182
2270
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2183
|
-
var
|
|
2271
|
+
var import_react18, import_react_accessible_dropdown_menu_hook, import_dedupe20, import_DropdownMenu, import_jsx_runtime26, DropdownMenu;
|
|
2184
2272
|
var init_DropdownMenu = __esm({
|
|
2185
2273
|
"src/components/DropdownMenu/DropdownMenu.tsx"() {
|
|
2186
2274
|
"use strict";
|
|
2187
2275
|
"use client";
|
|
2188
|
-
|
|
2276
|
+
import_react18 = require("react");
|
|
2189
2277
|
import_react_accessible_dropdown_menu_hook = __toESM(require("react-accessible-dropdown-menu-hook"));
|
|
2190
|
-
|
|
2278
|
+
import_dedupe20 = __toESM(require("classnames/dedupe"));
|
|
2191
2279
|
init_Button2();
|
|
2192
2280
|
import_DropdownMenu = require("@simplybusiness/mobius/src/components/DropdownMenu/DropdownMenu.css");
|
|
2193
|
-
|
|
2281
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2194
2282
|
DropdownMenu = ({ ref, ...props }) => {
|
|
2195
2283
|
const {
|
|
2196
2284
|
elementType: Element = "nav",
|
|
@@ -2199,21 +2287,21 @@ var init_DropdownMenu = __esm({
|
|
|
2199
2287
|
children,
|
|
2200
2288
|
...otherProps
|
|
2201
2289
|
} = props;
|
|
2202
|
-
const [activeId, setActiveId] = (0,
|
|
2203
|
-
const numberOfItems =
|
|
2290
|
+
const [activeId, setActiveId] = (0, import_react18.useState)(null);
|
|
2291
|
+
const numberOfItems = import_react18.Children.count(children);
|
|
2204
2292
|
const {
|
|
2205
2293
|
buttonProps,
|
|
2206
2294
|
itemProps,
|
|
2207
2295
|
isOpen: open,
|
|
2208
2296
|
setIsOpen
|
|
2209
2297
|
} = (0, import_react_accessible_dropdown_menu_hook.default)(numberOfItems);
|
|
2210
|
-
const classes = (0,
|
|
2298
|
+
const classes = (0, import_dedupe20.default)(
|
|
2211
2299
|
"mobius",
|
|
2212
2300
|
"mobius-dropdown-menu",
|
|
2213
2301
|
otherProps.className
|
|
2214
2302
|
);
|
|
2215
|
-
const triggerClasses = (0,
|
|
2216
|
-
const listClasses = (0,
|
|
2303
|
+
const triggerClasses = (0, import_dedupe20.default)("mobius", "mobius-dropdown-menu__trigger");
|
|
2304
|
+
const listClasses = (0, import_dedupe20.default)("mobius", "mobius-dropdown-menu__list", {
|
|
2217
2305
|
"--is-open": open
|
|
2218
2306
|
});
|
|
2219
2307
|
const handleChildClick = ({ onClick }, index) => {
|
|
@@ -2223,16 +2311,16 @@ var init_DropdownMenu = __esm({
|
|
|
2223
2311
|
onClick();
|
|
2224
2312
|
}
|
|
2225
2313
|
};
|
|
2226
|
-
return /* @__PURE__ */ (0,
|
|
2227
|
-
trigger ? (0,
|
|
2314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Element, { ref, ...otherProps, className: classes, children: [
|
|
2315
|
+
trigger ? (0, import_react18.cloneElement)(trigger, {
|
|
2228
2316
|
className: triggerClasses,
|
|
2229
2317
|
open,
|
|
2230
2318
|
label,
|
|
2231
2319
|
...buttonProps
|
|
2232
|
-
}) : /* @__PURE__ */ (0,
|
|
2233
|
-
/* @__PURE__ */ (0,
|
|
2234
|
-
if ((0,
|
|
2235
|
-
return (0,
|
|
2320
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Button, { className: triggerClasses, ...buttonProps, children: label }),
|
|
2321
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("ul", { className: listClasses, role: "menu", children: import_react18.Children.map(children, (child, index) => {
|
|
2322
|
+
if ((0, import_react18.isValidElement)(child)) {
|
|
2323
|
+
return (0, import_react18.cloneElement)(child, {
|
|
2236
2324
|
onClick: () => handleChildClick(child.props, index),
|
|
2237
2325
|
active: index === activeId,
|
|
2238
2326
|
...itemProps[index]
|
|
@@ -2247,13 +2335,13 @@ var init_DropdownMenu = __esm({
|
|
|
2247
2335
|
});
|
|
2248
2336
|
|
|
2249
2337
|
// src/components/DropdownMenu/Item.tsx
|
|
2250
|
-
var
|
|
2338
|
+
var import_react19, import_dedupe21, import_jsx_runtime27, Item;
|
|
2251
2339
|
var init_Item = __esm({
|
|
2252
2340
|
"src/components/DropdownMenu/Item.tsx"() {
|
|
2253
2341
|
"use strict";
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2342
|
+
import_react19 = require("react");
|
|
2343
|
+
import_dedupe21 = __toESM(require("classnames/dedupe"));
|
|
2344
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2257
2345
|
Item = ({ ref, ...props }) => {
|
|
2258
2346
|
const {
|
|
2259
2347
|
elementType: Element = "li",
|
|
@@ -2262,26 +2350,26 @@ var init_Item = __esm({
|
|
|
2262
2350
|
children,
|
|
2263
2351
|
...otherProps
|
|
2264
2352
|
} = props;
|
|
2265
|
-
const classes = (0,
|
|
2353
|
+
const classes = (0, import_dedupe21.default)(
|
|
2266
2354
|
"mobius",
|
|
2267
2355
|
"mobius-dropdown-menu__item",
|
|
2268
2356
|
{ "--is-active": active },
|
|
2269
2357
|
otherProps.className
|
|
2270
2358
|
);
|
|
2271
|
-
return /* @__PURE__ */ (0,
|
|
2272
|
-
if ((0,
|
|
2273
|
-
const childClasses = (0,
|
|
2359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Element, { ref, onClick, ...otherProps, children: import_react19.Children.map(children, (child) => {
|
|
2360
|
+
if ((0, import_react19.isValidElement)(child)) {
|
|
2361
|
+
const childClasses = (0, import_dedupe21.default)(
|
|
2274
2362
|
child.props.className,
|
|
2275
2363
|
classes
|
|
2276
2364
|
);
|
|
2277
|
-
return (0,
|
|
2365
|
+
return (0, import_react19.cloneElement)(
|
|
2278
2366
|
child,
|
|
2279
2367
|
{
|
|
2280
2368
|
className: childClasses
|
|
2281
2369
|
}
|
|
2282
2370
|
);
|
|
2283
2371
|
}
|
|
2284
|
-
return /* @__PURE__ */ (0,
|
|
2372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: classes, children: child });
|
|
2285
2373
|
}) });
|
|
2286
2374
|
};
|
|
2287
2375
|
Item.displayName = "DropdownMenu.Item";
|
|
@@ -2306,23 +2394,23 @@ var init_DropdownMenu2 = __esm({
|
|
|
2306
2394
|
});
|
|
2307
2395
|
|
|
2308
2396
|
// src/components/Fieldset/Fieldset.tsx
|
|
2309
|
-
var
|
|
2397
|
+
var import_dedupe22, import_react20, import_Fieldset, import_jsx_runtime28, useFieldset, Fieldset;
|
|
2310
2398
|
var init_Fieldset = __esm({
|
|
2311
2399
|
"src/components/Fieldset/Fieldset.tsx"() {
|
|
2312
2400
|
"use strict";
|
|
2313
2401
|
"use client";
|
|
2314
|
-
|
|
2315
|
-
|
|
2402
|
+
import_dedupe22 = __toESM(require("classnames/dedupe"));
|
|
2403
|
+
import_react20 = require("react");
|
|
2316
2404
|
init_Flex2();
|
|
2317
2405
|
import_Fieldset = require("@simplybusiness/mobius/src/components/Fieldset/Fieldset.css");
|
|
2318
|
-
|
|
2406
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2319
2407
|
useFieldset = (props) => {
|
|
2320
2408
|
const { legend } = props;
|
|
2321
2409
|
let legendProps = {};
|
|
2322
2410
|
let containerProps = {
|
|
2323
2411
|
role: "group"
|
|
2324
2412
|
};
|
|
2325
|
-
const legendId = (0,
|
|
2413
|
+
const legendId = (0, import_react20.useId)();
|
|
2326
2414
|
if (legend) {
|
|
2327
2415
|
legendProps = {
|
|
2328
2416
|
...legendProps,
|
|
@@ -2342,14 +2430,14 @@ var init_Fieldset = __esm({
|
|
|
2342
2430
|
const {
|
|
2343
2431
|
children,
|
|
2344
2432
|
legend,
|
|
2345
|
-
legendComponent = /* @__PURE__ */ (0,
|
|
2433
|
+
legendComponent = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("legend", {}),
|
|
2346
2434
|
...otherProps
|
|
2347
2435
|
} = props;
|
|
2348
2436
|
const { legendProps, containerProps } = useFieldset(props);
|
|
2349
|
-
const classes = (0,
|
|
2437
|
+
const classes = (0, import_dedupe22.default)("mobius", "mobius-fieldset", props.className);
|
|
2350
2438
|
legendProps.className = "mobius-fieldset__legend";
|
|
2351
|
-
return /* @__PURE__ */ (0,
|
|
2352
|
-
legend && (0,
|
|
2439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Flex, { ...containerProps, ...otherProps, className: classes, children: [
|
|
2440
|
+
legend && (0, import_react20.cloneElement)(legendComponent, { ...legendProps }, [legend]),
|
|
2353
2441
|
children
|
|
2354
2442
|
] });
|
|
2355
2443
|
};
|
|
@@ -2366,13 +2454,13 @@ var init_Fieldset2 = __esm({
|
|
|
2366
2454
|
});
|
|
2367
2455
|
|
|
2368
2456
|
// src/components/Grid/Grid.tsx
|
|
2369
|
-
var
|
|
2457
|
+
var import_dedupe23, import_jsx_runtime29, Grid;
|
|
2370
2458
|
var init_Grid = __esm({
|
|
2371
2459
|
"src/components/Grid/Grid.tsx"() {
|
|
2372
2460
|
"use strict";
|
|
2373
|
-
|
|
2461
|
+
import_dedupe23 = __toESM(require("classnames/dedupe"));
|
|
2374
2462
|
init_utils();
|
|
2375
|
-
|
|
2463
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2376
2464
|
Grid = ({ ref: _ref, ...props }) => {
|
|
2377
2465
|
const {
|
|
2378
2466
|
columns = 12,
|
|
@@ -2387,7 +2475,7 @@ var init_Grid = __esm({
|
|
|
2387
2475
|
style,
|
|
2388
2476
|
...rest
|
|
2389
2477
|
} = props;
|
|
2390
|
-
const classes = (0,
|
|
2478
|
+
const classes = (0, import_dedupe23.default)("mobius", "mobius-grid", className);
|
|
2391
2479
|
const styles = filterUndefinedProps({
|
|
2392
2480
|
boxSizing: "border-box",
|
|
2393
2481
|
display: "grid",
|
|
@@ -2401,22 +2489,22 @@ var init_Grid = __esm({
|
|
|
2401
2489
|
justifyItems,
|
|
2402
2490
|
...style
|
|
2403
2491
|
});
|
|
2404
|
-
return /* @__PURE__ */ (0,
|
|
2492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: styles, className: classes, ...rest });
|
|
2405
2493
|
};
|
|
2406
2494
|
Grid.displayName = "Grid";
|
|
2407
2495
|
}
|
|
2408
2496
|
});
|
|
2409
2497
|
|
|
2410
2498
|
// src/components/Grid/Item.tsx
|
|
2411
|
-
var
|
|
2499
|
+
var import_react21, import_dedupe24, import_jsx_runtime30, getBreakpointMap, DEFAULT_SPAN, GridItem;
|
|
2412
2500
|
var init_Item2 = __esm({
|
|
2413
2501
|
"src/components/Grid/Item.tsx"() {
|
|
2414
2502
|
"use strict";
|
|
2415
2503
|
"use client";
|
|
2416
|
-
|
|
2417
|
-
|
|
2504
|
+
import_react21 = require("react");
|
|
2505
|
+
import_dedupe24 = __toESM(require("classnames/dedupe"));
|
|
2418
2506
|
init_hooks();
|
|
2419
|
-
|
|
2507
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2420
2508
|
getBreakpointMap = (config) => Object.entries(config).reduce(
|
|
2421
2509
|
(prev, [key, value]) => {
|
|
2422
2510
|
const previous = Object.values(prev);
|
|
@@ -2451,9 +2539,9 @@ var init_Item2 = __esm({
|
|
|
2451
2539
|
xl,
|
|
2452
2540
|
xxl
|
|
2453
2541
|
});
|
|
2454
|
-
const [responsiveSpan, setResponsiveSpan] = (0,
|
|
2455
|
-
const classes = (0,
|
|
2456
|
-
(0,
|
|
2542
|
+
const [responsiveSpan, setResponsiveSpan] = (0, import_react21.useState)();
|
|
2543
|
+
const classes = (0, import_dedupe24.default)("mobius-grid__item", className);
|
|
2544
|
+
(0, import_react21.useEffect)(() => {
|
|
2457
2545
|
setResponsiveSpan(breakpointMap[breakpointSize]);
|
|
2458
2546
|
}, [breakpointSize, breakpointMap]);
|
|
2459
2547
|
const styles = {
|
|
@@ -2461,7 +2549,7 @@ var init_Item2 = __esm({
|
|
|
2461
2549
|
alignSelf,
|
|
2462
2550
|
justifySelf
|
|
2463
2551
|
};
|
|
2464
|
-
return /* @__PURE__ */ (0,
|
|
2552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style: { ...styles }, className: classes, ...rest });
|
|
2465
2553
|
};
|
|
2466
2554
|
GridItem.displayName = "GridItem";
|
|
2467
2555
|
}
|
|
@@ -2482,20 +2570,20 @@ var init_Grid2 = __esm({
|
|
|
2482
2570
|
});
|
|
2483
2571
|
|
|
2484
2572
|
// src/components/Image/Image.tsx
|
|
2485
|
-
var
|
|
2573
|
+
var import_dedupe25, import_jsx_runtime31, Image;
|
|
2486
2574
|
var init_Image = __esm({
|
|
2487
2575
|
"src/components/Image/Image.tsx"() {
|
|
2488
2576
|
"use strict";
|
|
2489
|
-
|
|
2490
|
-
|
|
2577
|
+
import_dedupe25 = __toESM(require("classnames/dedupe"));
|
|
2578
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2491
2579
|
Image = ({
|
|
2492
2580
|
ref,
|
|
2493
2581
|
alt,
|
|
2494
2582
|
elementType: Component = "img",
|
|
2495
2583
|
...otherProps
|
|
2496
2584
|
}) => {
|
|
2497
|
-
const classes = (0,
|
|
2498
|
-
return /* @__PURE__ */ (0,
|
|
2585
|
+
const classes = (0, import_dedupe25.default)("mobius", "mobius-image", otherProps.className);
|
|
2586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Component, { alt, ref, ...otherProps, className: classes });
|
|
2499
2587
|
};
|
|
2500
2588
|
Image.displayName = "Image";
|
|
2501
2589
|
}
|
|
@@ -2510,13 +2598,13 @@ var init_Image2 = __esm({
|
|
|
2510
2598
|
});
|
|
2511
2599
|
|
|
2512
2600
|
// src/components/Link/Link.tsx
|
|
2513
|
-
var
|
|
2601
|
+
var import_dedupe26, import_Link, import_jsx_runtime32, Link;
|
|
2514
2602
|
var init_Link = __esm({
|
|
2515
2603
|
"src/components/Link/Link.tsx"() {
|
|
2516
2604
|
"use strict";
|
|
2517
|
-
|
|
2605
|
+
import_dedupe26 = __toESM(require("classnames/dedupe"));
|
|
2518
2606
|
import_Link = require("@simplybusiness/mobius/src/components/Link/Link.css");
|
|
2519
|
-
|
|
2607
|
+
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2520
2608
|
Link = ({ ref, ...props }) => {
|
|
2521
2609
|
const {
|
|
2522
2610
|
isDisabled = false,
|
|
@@ -2530,7 +2618,7 @@ var init_Link = __esm({
|
|
|
2530
2618
|
pointerEvents: "none"
|
|
2531
2619
|
};
|
|
2532
2620
|
const styles = { ...style, ...isDisabled && disabledStyles };
|
|
2533
|
-
const classes = (0,
|
|
2621
|
+
const classes = (0, import_dedupe26.default)(
|
|
2534
2622
|
"mobius",
|
|
2535
2623
|
"mobius-link",
|
|
2536
2624
|
className,
|
|
@@ -2539,7 +2627,7 @@ var init_Link = __esm({
|
|
|
2539
2627
|
"--is-disabled": isDisabled
|
|
2540
2628
|
}
|
|
2541
2629
|
);
|
|
2542
|
-
return /* @__PURE__ */ (0,
|
|
2630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2543
2631
|
Component,
|
|
2544
2632
|
{
|
|
2545
2633
|
ref,
|
|
@@ -2564,12 +2652,12 @@ var init_Link2 = __esm({
|
|
|
2564
2652
|
});
|
|
2565
2653
|
|
|
2566
2654
|
// src/components/LinkButton/LinkButton.tsx
|
|
2567
|
-
var
|
|
2655
|
+
var import_dedupe27, import_jsx_runtime33;
|
|
2568
2656
|
var init_LinkButton = __esm({
|
|
2569
2657
|
"src/components/LinkButton/LinkButton.tsx"() {
|
|
2570
2658
|
"use strict";
|
|
2571
|
-
|
|
2572
|
-
|
|
2659
|
+
import_dedupe27 = __toESM(require("classnames/dedupe"));
|
|
2660
|
+
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2573
2661
|
}
|
|
2574
2662
|
});
|
|
2575
2663
|
|
|
@@ -2582,14 +2670,14 @@ var init_LinkButton2 = __esm({
|
|
|
2582
2670
|
});
|
|
2583
2671
|
|
|
2584
2672
|
// src/components/List/List.tsx
|
|
2585
|
-
var
|
|
2673
|
+
var import_react22, import_dedupe28, import_List, import_jsx_runtime34, List;
|
|
2586
2674
|
var init_List = __esm({
|
|
2587
2675
|
"src/components/List/List.tsx"() {
|
|
2588
2676
|
"use strict";
|
|
2589
|
-
|
|
2590
|
-
|
|
2677
|
+
import_react22 = require("react");
|
|
2678
|
+
import_dedupe28 = __toESM(require("classnames/dedupe"));
|
|
2591
2679
|
import_List = require("@simplybusiness/mobius/src/components/List/List.css");
|
|
2592
|
-
|
|
2680
|
+
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2593
2681
|
List = ({ ref, ...props }) => {
|
|
2594
2682
|
const Component = props.isOrdered ? "ol" : "ul";
|
|
2595
2683
|
const { children, icon, ...otherProps } = props;
|
|
@@ -2598,7 +2686,7 @@ var init_List = __esm({
|
|
|
2598
2686
|
...restProps,
|
|
2599
2687
|
reversed: isReversed
|
|
2600
2688
|
};
|
|
2601
|
-
const classes = (0,
|
|
2689
|
+
const classes = (0, import_dedupe28.default)(
|
|
2602
2690
|
"mobius",
|
|
2603
2691
|
"mobius-list",
|
|
2604
2692
|
{
|
|
@@ -2607,9 +2695,9 @@ var init_List = __esm({
|
|
|
2607
2695
|
},
|
|
2608
2696
|
otherProps.className
|
|
2609
2697
|
);
|
|
2610
|
-
return /* @__PURE__ */ (0,
|
|
2611
|
-
if ((0,
|
|
2612
|
-
return (0,
|
|
2698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Component, { ref, ...mappedProps, className: classes, children: import_react22.Children.map(children, (child) => {
|
|
2699
|
+
if ((0, import_react22.isValidElement)(child)) {
|
|
2700
|
+
return (0, import_react22.cloneElement)(child, {
|
|
2613
2701
|
parentIcon: icon
|
|
2614
2702
|
});
|
|
2615
2703
|
}
|
|
@@ -2621,16 +2709,16 @@ var init_List = __esm({
|
|
|
2621
2709
|
});
|
|
2622
2710
|
|
|
2623
2711
|
// src/components/List/ListItem.tsx
|
|
2624
|
-
var
|
|
2712
|
+
var import_dedupe29, import_jsx_runtime35, ListItem;
|
|
2625
2713
|
var init_ListItem = __esm({
|
|
2626
2714
|
"src/components/List/ListItem.tsx"() {
|
|
2627
2715
|
"use strict";
|
|
2628
|
-
|
|
2629
|
-
|
|
2716
|
+
import_dedupe29 = __toESM(require("classnames/dedupe"));
|
|
2717
|
+
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2630
2718
|
ListItem = ({ ref, ...props }) => {
|
|
2631
2719
|
const { parentIcon, icon, children, ...otherProps } = props;
|
|
2632
2720
|
const iconContent = icon || parentIcon;
|
|
2633
|
-
const classes = (0,
|
|
2721
|
+
const classes = (0, import_dedupe29.default)(
|
|
2634
2722
|
"mobius",
|
|
2635
2723
|
"mobius-list__item",
|
|
2636
2724
|
{
|
|
@@ -2638,15 +2726,15 @@ var init_ListItem = __esm({
|
|
|
2638
2726
|
},
|
|
2639
2727
|
props.className
|
|
2640
2728
|
);
|
|
2641
|
-
const contentClasses = (0,
|
|
2642
|
-
const iconClasses = (0,
|
|
2729
|
+
const contentClasses = (0, import_dedupe29.default)("mobius", "mobius-list__item-content");
|
|
2730
|
+
const iconClasses = (0, import_dedupe29.default)("mobius", "mobius-list__icon");
|
|
2643
2731
|
if (iconContent) {
|
|
2644
|
-
return /* @__PURE__ */ (0,
|
|
2645
|
-
/* @__PURE__ */ (0,
|
|
2732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("li", { ref, ...otherProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: contentClasses, children: [
|
|
2733
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: iconClasses, children: iconContent }),
|
|
2646
2734
|
children
|
|
2647
2735
|
] }) });
|
|
2648
2736
|
}
|
|
2649
|
-
return /* @__PURE__ */ (0,
|
|
2737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("li", { ref, ...otherProps, className: classes, children });
|
|
2650
2738
|
};
|
|
2651
2739
|
ListItem.displayName = "ListItem";
|
|
2652
2740
|
}
|
|
@@ -2662,23 +2750,23 @@ var init_List2 = __esm({
|
|
|
2662
2750
|
});
|
|
2663
2751
|
|
|
2664
2752
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
2665
|
-
var
|
|
2753
|
+
var import_dedupe30, import_icons7, import_LoadingIndicator, import_jsx_runtime36, LoadingIndicator;
|
|
2666
2754
|
var init_LoadingIndicator = __esm({
|
|
2667
2755
|
"src/components/LoadingIndicator/LoadingIndicator.tsx"() {
|
|
2668
2756
|
"use strict";
|
|
2669
|
-
|
|
2757
|
+
import_dedupe30 = __toESM(require("classnames/dedupe"));
|
|
2670
2758
|
import_icons7 = require("@simplybusiness/icons");
|
|
2671
2759
|
init_Icon2();
|
|
2672
2760
|
import_LoadingIndicator = require("@simplybusiness/mobius/src/components/LoadingIndicator/LoadingIndicator.css");
|
|
2673
|
-
|
|
2761
|
+
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2674
2762
|
LoadingIndicator = ({ ref, ...props }) => {
|
|
2675
2763
|
const { icon = import_icons7.loading, ...otherProps } = props;
|
|
2676
|
-
const classes = (0,
|
|
2764
|
+
const classes = (0, import_dedupe30.default)(
|
|
2677
2765
|
"mobius",
|
|
2678
2766
|
"mobius-loading-indicator",
|
|
2679
2767
|
otherProps.className
|
|
2680
2768
|
);
|
|
2681
|
-
return /* @__PURE__ */ (0,
|
|
2769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { icon, spin: true, ref, ...otherProps, className: classes });
|
|
2682
2770
|
};
|
|
2683
2771
|
LoadingIndicator.displayName = "LoadingIndicator";
|
|
2684
2772
|
}
|
|
@@ -2693,16 +2781,16 @@ var init_LoadingIndicator2 = __esm({
|
|
|
2693
2781
|
});
|
|
2694
2782
|
|
|
2695
2783
|
// src/components/Logo/Logo.tsx
|
|
2696
|
-
var
|
|
2784
|
+
var import_dedupe31, import_jsx_runtime37, Logo;
|
|
2697
2785
|
var init_Logo = __esm({
|
|
2698
2786
|
"src/components/Logo/Logo.tsx"() {
|
|
2699
2787
|
"use strict";
|
|
2700
|
-
|
|
2701
|
-
|
|
2788
|
+
import_dedupe31 = __toESM(require("classnames/dedupe"));
|
|
2789
|
+
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2702
2790
|
Logo = ({ ref, ...props }) => {
|
|
2703
2791
|
const { className, width, height, ...otherProps } = props;
|
|
2704
|
-
const classes = (0,
|
|
2705
|
-
return /* @__PURE__ */ (0,
|
|
2792
|
+
const classes = (0, import_dedupe31.default)("mobius", "mobius-logo", className);
|
|
2793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2706
2794
|
"svg",
|
|
2707
2795
|
{
|
|
2708
2796
|
width,
|
|
@@ -2712,7 +2800,7 @@ var init_Logo = __esm({
|
|
|
2712
2800
|
viewBox: "0 0 144 37",
|
|
2713
2801
|
...otherProps,
|
|
2714
2802
|
children: [
|
|
2715
|
-
/* @__PURE__ */ (0,
|
|
2803
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2716
2804
|
"linearGradient",
|
|
2717
2805
|
{
|
|
2718
2806
|
id: "logo-gradient",
|
|
@@ -2721,27 +2809,27 @@ var init_Logo = __esm({
|
|
|
2721
2809
|
y1: "76.042%",
|
|
2722
2810
|
y2: "26.973%",
|
|
2723
2811
|
children: [
|
|
2724
|
-
/* @__PURE__ */ (0,
|
|
2725
|
-
/* @__PURE__ */ (0,
|
|
2812
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("stop", { stopColor: "#4632D8", offset: "0%" }),
|
|
2813
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("stop", { stopColor: "#9084E8", offset: "100%" })
|
|
2726
2814
|
]
|
|
2727
2815
|
}
|
|
2728
2816
|
) }),
|
|
2729
|
-
/* @__PURE__ */ (0,
|
|
2730
|
-
/* @__PURE__ */ (0,
|
|
2817
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("g", { children: [
|
|
2818
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2731
2819
|
"path",
|
|
2732
2820
|
{
|
|
2733
2821
|
fill: "#0E0A2B",
|
|
2734
2822
|
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"
|
|
2735
2823
|
}
|
|
2736
2824
|
),
|
|
2737
|
-
/* @__PURE__ */ (0,
|
|
2825
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2738
2826
|
"path",
|
|
2739
2827
|
{
|
|
2740
2828
|
fill: "url(#logo-gradient)",
|
|
2741
2829
|
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"
|
|
2742
2830
|
}
|
|
2743
2831
|
),
|
|
2744
|
-
/* @__PURE__ */ (0,
|
|
2832
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2745
2833
|
"path",
|
|
2746
2834
|
{
|
|
2747
2835
|
fill: "#0E0A2B",
|
|
@@ -2766,23 +2854,23 @@ var init_Logo2 = __esm({
|
|
|
2766
2854
|
});
|
|
2767
2855
|
|
|
2768
2856
|
// src/components/Modal/Content.tsx
|
|
2769
|
-
var
|
|
2857
|
+
var import_jsx_runtime38, Content2;
|
|
2770
2858
|
var init_Content2 = __esm({
|
|
2771
2859
|
"src/components/Modal/Content.tsx"() {
|
|
2772
2860
|
"use strict";
|
|
2773
|
-
|
|
2774
|
-
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
2861
|
+
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2862
|
+
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { ref, ...otherProps, className: "mobius-modal__content", children });
|
|
2775
2863
|
Content2.displayName = "Content";
|
|
2776
2864
|
}
|
|
2777
2865
|
});
|
|
2778
2866
|
|
|
2779
2867
|
// src/components/Modal/ModalContext.tsx
|
|
2780
|
-
var
|
|
2868
|
+
var import_react23, ModalContext;
|
|
2781
2869
|
var init_ModalContext = __esm({
|
|
2782
2870
|
"src/components/Modal/ModalContext.tsx"() {
|
|
2783
2871
|
"use strict";
|
|
2784
|
-
|
|
2785
|
-
ModalContext = (0,
|
|
2872
|
+
import_react23 = require("react");
|
|
2873
|
+
ModalContext = (0, import_react23.createContext)({
|
|
2786
2874
|
onClose: () => {
|
|
2787
2875
|
},
|
|
2788
2876
|
closeLabel: void 0
|
|
@@ -2791,21 +2879,21 @@ var init_ModalContext = __esm({
|
|
|
2791
2879
|
});
|
|
2792
2880
|
|
|
2793
2881
|
// src/components/Modal/useModal.ts
|
|
2794
|
-
var
|
|
2882
|
+
var import_react24, useModal;
|
|
2795
2883
|
var init_useModal = __esm({
|
|
2796
2884
|
"src/components/Modal/useModal.ts"() {
|
|
2797
2885
|
"use strict";
|
|
2798
|
-
|
|
2886
|
+
import_react24 = require("react");
|
|
2799
2887
|
init_ModalContext();
|
|
2800
2888
|
useModal = () => {
|
|
2801
|
-
const { onClose, closeLabel } = (0,
|
|
2889
|
+
const { onClose, closeLabel } = (0, import_react24.useContext)(ModalContext);
|
|
2802
2890
|
return { onClose, closeLabel };
|
|
2803
2891
|
};
|
|
2804
2892
|
}
|
|
2805
2893
|
});
|
|
2806
2894
|
|
|
2807
2895
|
// src/components/Modal/Header.tsx
|
|
2808
|
-
var import_icons8,
|
|
2896
|
+
var import_icons8, import_jsx_runtime39, Header2;
|
|
2809
2897
|
var init_Header2 = __esm({
|
|
2810
2898
|
"src/components/Modal/Header.tsx"() {
|
|
2811
2899
|
"use strict";
|
|
@@ -2813,12 +2901,12 @@ var init_Header2 = __esm({
|
|
|
2813
2901
|
init_Button2();
|
|
2814
2902
|
init_Icon2();
|
|
2815
2903
|
init_useModal();
|
|
2816
|
-
|
|
2904
|
+
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2817
2905
|
Header2 = ({ ref, children, ...otherProps }) => {
|
|
2818
2906
|
const { onClose, closeLabel } = useModal();
|
|
2819
|
-
return /* @__PURE__ */ (0,
|
|
2907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("header", { ref, ...otherProps, className: "mobius-modal__header", children: [
|
|
2820
2908
|
children,
|
|
2821
|
-
/* @__PURE__ */ (0,
|
|
2909
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
2822
2910
|
Button,
|
|
2823
2911
|
{
|
|
2824
2912
|
"aria-label": "Close",
|
|
@@ -2826,7 +2914,7 @@ var init_Header2 = __esm({
|
|
|
2826
2914
|
onPress: onClose,
|
|
2827
2915
|
className: "mobius-modal__close",
|
|
2828
2916
|
children: [
|
|
2829
|
-
/* @__PURE__ */ (0,
|
|
2917
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { icon: import_icons8.cross }),
|
|
2830
2918
|
" ",
|
|
2831
2919
|
closeLabel
|
|
2832
2920
|
]
|
|
@@ -2839,19 +2927,19 @@ var init_Header2 = __esm({
|
|
|
2839
2927
|
});
|
|
2840
2928
|
|
|
2841
2929
|
// src/components/Modal/Modal.tsx
|
|
2842
|
-
var
|
|
2930
|
+
var import_dedupe32, import_react25, import_Modal, import_jsx_runtime40, TRANSITION_CSS_VARIABLE2, Modal;
|
|
2843
2931
|
var init_Modal = __esm({
|
|
2844
2932
|
"src/components/Modal/Modal.tsx"() {
|
|
2845
2933
|
"use strict";
|
|
2846
2934
|
"use client";
|
|
2847
|
-
|
|
2848
|
-
|
|
2935
|
+
import_dedupe32 = __toESM(require("classnames/dedupe"));
|
|
2936
|
+
import_react25 = require("react");
|
|
2849
2937
|
init_hooks();
|
|
2850
2938
|
init_utils();
|
|
2851
2939
|
init_polyfill_tests();
|
|
2852
2940
|
init_ModalContext();
|
|
2853
2941
|
import_Modal = require("@simplybusiness/mobius/src/components/Modal/Modal.css");
|
|
2854
|
-
|
|
2942
|
+
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2855
2943
|
TRANSITION_CSS_VARIABLE2 = "--modal-transition-duration";
|
|
2856
2944
|
Modal = ({ ref, ...props }) => {
|
|
2857
2945
|
const {
|
|
@@ -2865,11 +2953,11 @@ var init_Modal = __esm({
|
|
|
2865
2953
|
animation,
|
|
2866
2954
|
...rest
|
|
2867
2955
|
} = props;
|
|
2868
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
2869
|
-
(0,
|
|
2956
|
+
const [shouldTransition, setShouldTransition] = (0, import_react25.useState)(false);
|
|
2957
|
+
(0, import_react25.useEffect)(() => {
|
|
2870
2958
|
setShouldTransition(supportsDialog());
|
|
2871
2959
|
}, []);
|
|
2872
|
-
const dialogRef = (0,
|
|
2960
|
+
const dialogRef = (0, import_react25.useRef)(null);
|
|
2873
2961
|
const { close } = useDialog({
|
|
2874
2962
|
ref: dialogRef,
|
|
2875
2963
|
isOpen,
|
|
@@ -2880,7 +2968,7 @@ var init_Modal = __esm({
|
|
|
2880
2968
|
CSSVariable: TRANSITION_CSS_VARIABLE2
|
|
2881
2969
|
}
|
|
2882
2970
|
});
|
|
2883
|
-
const modalClasses = (0,
|
|
2971
|
+
const modalClasses = (0, import_dedupe32.default)(
|
|
2884
2972
|
"mobius",
|
|
2885
2973
|
"mobius-modal",
|
|
2886
2974
|
{
|
|
@@ -2893,21 +2981,21 @@ var init_Modal = __esm({
|
|
|
2893
2981
|
},
|
|
2894
2982
|
className
|
|
2895
2983
|
);
|
|
2896
|
-
const contextValue = (0,
|
|
2984
|
+
const contextValue = (0, import_react25.useMemo)(
|
|
2897
2985
|
() => ({
|
|
2898
2986
|
onClose: close,
|
|
2899
2987
|
closeLabel
|
|
2900
2988
|
}),
|
|
2901
2989
|
[close, closeLabel]
|
|
2902
2990
|
);
|
|
2903
|
-
return /* @__PURE__ */ (0,
|
|
2991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2904
2992
|
"dialog",
|
|
2905
2993
|
{
|
|
2906
2994
|
ref: mergeRefs([dialogRef, ref]),
|
|
2907
2995
|
onCancel: close,
|
|
2908
2996
|
className: modalClasses,
|
|
2909
2997
|
...rest,
|
|
2910
|
-
children: /* @__PURE__ */ (0,
|
|
2998
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ModalContext.Provider, { value: contextValue, children })
|
|
2911
2999
|
}
|
|
2912
3000
|
);
|
|
2913
3001
|
};
|
|
@@ -2932,16 +3020,16 @@ var init_Modal2 = __esm({
|
|
|
2932
3020
|
});
|
|
2933
3021
|
|
|
2934
3022
|
// src/components/NumberField/NumberField.tsx
|
|
2935
|
-
var
|
|
3023
|
+
var import_dedupe33, import_react26, import_NumberField, import_jsx_runtime41, NumberField;
|
|
2936
3024
|
var init_NumberField = __esm({
|
|
2937
3025
|
"src/components/NumberField/NumberField.tsx"() {
|
|
2938
3026
|
"use strict";
|
|
2939
3027
|
"use client";
|
|
2940
|
-
|
|
2941
|
-
|
|
3028
|
+
import_dedupe33 = __toESM(require("classnames/dedupe"));
|
|
3029
|
+
import_react26 = require("react");
|
|
2942
3030
|
init_TextField2();
|
|
2943
3031
|
import_NumberField = require("@simplybusiness/mobius/src/components/NumberField/NumberField.css");
|
|
2944
|
-
|
|
3032
|
+
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2945
3033
|
NumberField = ({ ref, ...props }) => {
|
|
2946
3034
|
const {
|
|
2947
3035
|
minValue,
|
|
@@ -2957,15 +3045,15 @@ var init_NumberField = __esm({
|
|
|
2957
3045
|
onBlur: customOnBlur,
|
|
2958
3046
|
...rest
|
|
2959
3047
|
} = otherProps;
|
|
2960
|
-
const focusedInputRef = (0,
|
|
2961
|
-
const wheelHandler = (0,
|
|
2962
|
-
(0,
|
|
3048
|
+
const focusedInputRef = (0, import_react26.useRef)(null);
|
|
3049
|
+
const wheelHandler = (0, import_react26.useCallback)((ev) => ev.preventDefault(), []);
|
|
3050
|
+
(0, import_react26.useEffect)(() => {
|
|
2963
3051
|
return () => {
|
|
2964
3052
|
focusedInputRef.current?.removeEventListener("wheel", wheelHandler);
|
|
2965
3053
|
focusedInputRef.current = null;
|
|
2966
3054
|
};
|
|
2967
3055
|
}, [wheelHandler]);
|
|
2968
|
-
const containerClasses = (0,
|
|
3056
|
+
const containerClasses = (0, import_dedupe33.default)("mobius-number-field", className, {
|
|
2969
3057
|
"--hide-spin-buttons": hideSpinButtons
|
|
2970
3058
|
});
|
|
2971
3059
|
const handleBeforeInput = (event) => {
|
|
@@ -3009,7 +3097,7 @@ var init_NumberField = __esm({
|
|
|
3009
3097
|
},
|
|
3010
3098
|
onBlur: (e) => handleBlur(e)
|
|
3011
3099
|
};
|
|
3012
|
-
return /* @__PURE__ */ (0,
|
|
3100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3013
3101
|
TextField,
|
|
3014
3102
|
{
|
|
3015
3103
|
...forwardedProps,
|
|
@@ -3037,18 +3125,18 @@ var init_NumberField2 = __esm({
|
|
|
3037
3125
|
});
|
|
3038
3126
|
|
|
3039
3127
|
// src/components/Option/Option.tsx
|
|
3040
|
-
var
|
|
3128
|
+
var import_jsx_runtime42, Option;
|
|
3041
3129
|
var init_Option = __esm({
|
|
3042
3130
|
"src/components/Option/Option.tsx"() {
|
|
3043
3131
|
"use strict";
|
|
3044
|
-
|
|
3132
|
+
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3045
3133
|
Option = ({ ref, ...props }) => {
|
|
3046
3134
|
const { isDisabled, ...rest } = props;
|
|
3047
3135
|
const mappedProps = {
|
|
3048
3136
|
...rest,
|
|
3049
3137
|
disabled: isDisabled
|
|
3050
3138
|
};
|
|
3051
|
-
return /* @__PURE__ */ (0,
|
|
3139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { ...mappedProps, ref });
|
|
3052
3140
|
};
|
|
3053
3141
|
Option.displayName = "Option";
|
|
3054
3142
|
}
|
|
@@ -3063,17 +3151,17 @@ var init_Option2 = __esm({
|
|
|
3063
3151
|
});
|
|
3064
3152
|
|
|
3065
3153
|
// src/components/PasswordField/ShowHideButton.tsx
|
|
3066
|
-
var import_icons9,
|
|
3154
|
+
var import_icons9, import_jsx_runtime43, ShowHideButton;
|
|
3067
3155
|
var init_ShowHideButton = __esm({
|
|
3068
3156
|
"src/components/PasswordField/ShowHideButton.tsx"() {
|
|
3069
3157
|
"use strict";
|
|
3070
3158
|
import_icons9 = require("@simplybusiness/icons");
|
|
3071
3159
|
init_src();
|
|
3072
|
-
|
|
3160
|
+
import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3073
3161
|
ShowHideButton = ({
|
|
3074
3162
|
show = false,
|
|
3075
3163
|
onClick
|
|
3076
|
-
}) => /* @__PURE__ */ (0,
|
|
3164
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3077
3165
|
"button",
|
|
3078
3166
|
{
|
|
3079
3167
|
className: "mobius-password-field__show-button",
|
|
@@ -3084,35 +3172,35 @@ var init_ShowHideButton = __esm({
|
|
|
3084
3172
|
},
|
|
3085
3173
|
"aria-label": `${show ? "Hide" : "Show"} password`,
|
|
3086
3174
|
"data-testid": "show-hide-button",
|
|
3087
|
-
children: /* @__PURE__ */ (0,
|
|
3175
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon: show ? import_icons9.eyeSlash : import_icons9.eye, "aria-hidden": "true" })
|
|
3088
3176
|
}
|
|
3089
3177
|
);
|
|
3090
3178
|
}
|
|
3091
3179
|
});
|
|
3092
3180
|
|
|
3093
3181
|
// src/components/PasswordField/PasswordField.tsx
|
|
3094
|
-
var
|
|
3182
|
+
var import_dedupe34, import_react27, import_PasswordField, import_jsx_runtime44, PasswordField;
|
|
3095
3183
|
var init_PasswordField = __esm({
|
|
3096
3184
|
"src/components/PasswordField/PasswordField.tsx"() {
|
|
3097
3185
|
"use strict";
|
|
3098
3186
|
"use client";
|
|
3099
|
-
|
|
3100
|
-
|
|
3187
|
+
import_dedupe34 = __toESM(require("classnames/dedupe"));
|
|
3188
|
+
import_react27 = require("react");
|
|
3101
3189
|
init_mergeRefs();
|
|
3102
3190
|
init_TextField2();
|
|
3103
3191
|
init_ShowHideButton();
|
|
3104
3192
|
import_PasswordField = require("@simplybusiness/mobius/src/components/PasswordField/PasswordField.css");
|
|
3105
|
-
|
|
3193
|
+
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3106
3194
|
PasswordField = ({
|
|
3107
3195
|
ref,
|
|
3108
3196
|
className,
|
|
3109
3197
|
autoComplete = "current-password",
|
|
3110
3198
|
...props
|
|
3111
3199
|
}) => {
|
|
3112
|
-
const [show, setShow] = (0,
|
|
3200
|
+
const [show, setShow] = (0, import_react27.useState)(false);
|
|
3113
3201
|
const type = show ? "text" : "password";
|
|
3114
|
-
const classes = (0,
|
|
3115
|
-
const localRef = (0,
|
|
3202
|
+
const classes = (0, import_dedupe34.default)("mobius-password-field", className);
|
|
3203
|
+
const localRef = (0, import_react27.useRef)(null);
|
|
3116
3204
|
const handleShowHideButtonClick = () => {
|
|
3117
3205
|
const selectionStart = localRef.current?.selectionStart;
|
|
3118
3206
|
const selectionEnd = localRef.current?.selectionEnd;
|
|
@@ -3124,7 +3212,7 @@ var init_PasswordField = __esm({
|
|
|
3124
3212
|
}
|
|
3125
3213
|
});
|
|
3126
3214
|
};
|
|
3127
|
-
return /* @__PURE__ */ (0,
|
|
3215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3128
3216
|
TextField,
|
|
3129
3217
|
{
|
|
3130
3218
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -3132,7 +3220,7 @@ var init_PasswordField = __esm({
|
|
|
3132
3220
|
...props,
|
|
3133
3221
|
autoComplete,
|
|
3134
3222
|
type,
|
|
3135
|
-
suffixInside: /* @__PURE__ */ (0,
|
|
3223
|
+
suffixInside: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ShowHideButton, { onClick: handleShowHideButtonClick, show })
|
|
3136
3224
|
}
|
|
3137
3225
|
);
|
|
3138
3226
|
};
|
|
@@ -3149,17 +3237,17 @@ var init_PasswordField2 = __esm({
|
|
|
3149
3237
|
});
|
|
3150
3238
|
|
|
3151
3239
|
// src/components/Popover/Popover.tsx
|
|
3152
|
-
var
|
|
3240
|
+
var import_react28, import_icons10, import_dedupe35, import_react29, import_mobius_hooks4, import_Popover, import_jsx_runtime45;
|
|
3153
3241
|
var init_Popover = __esm({
|
|
3154
3242
|
"src/components/Popover/Popover.tsx"() {
|
|
3155
3243
|
"use strict";
|
|
3156
|
-
|
|
3244
|
+
import_react28 = require("@floating-ui/react");
|
|
3157
3245
|
import_icons10 = require("@simplybusiness/icons");
|
|
3158
|
-
|
|
3159
|
-
|
|
3246
|
+
import_dedupe35 = __toESM(require("classnames/dedupe"));
|
|
3247
|
+
import_react29 = require("react");
|
|
3160
3248
|
import_mobius_hooks4 = require("@simplybusiness/mobius-hooks");
|
|
3161
3249
|
import_Popover = require("@simplybusiness/mobius/src/components/Popover/Popover.css");
|
|
3162
|
-
|
|
3250
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3163
3251
|
}
|
|
3164
3252
|
});
|
|
3165
3253
|
|
|
@@ -3183,17 +3271,17 @@ function warnAboutInvalidValues(value, minValue, maxValue) {
|
|
|
3183
3271
|
console.warn("Progress value is greater than maxValue");
|
|
3184
3272
|
}
|
|
3185
3273
|
}
|
|
3186
|
-
var
|
|
3274
|
+
var import_dedupe36, import_react30, import_Progress, import_jsx_runtime46, sanitizedValue, getLabelComponent, DEFAULT_VALUE, DEFAULT_MIN_VALUE, DEFAULT_MAX_VALUE, Progress;
|
|
3187
3275
|
var init_Progress = __esm({
|
|
3188
3276
|
"src/components/Progress/Progress.tsx"() {
|
|
3189
3277
|
"use strict";
|
|
3190
3278
|
"use client";
|
|
3191
|
-
|
|
3192
|
-
|
|
3279
|
+
import_dedupe36 = __toESM(require("classnames/dedupe"));
|
|
3280
|
+
import_react30 = require("react");
|
|
3193
3281
|
init_Label2();
|
|
3194
3282
|
init_VisuallyHidden2();
|
|
3195
3283
|
import_Progress = require("@simplybusiness/mobius/src/components/Progress/Progress.css");
|
|
3196
|
-
|
|
3284
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3197
3285
|
sanitizedValue = (value, defaultValue) => {
|
|
3198
3286
|
if (value === void 0 || Number.isNaN(value)) {
|
|
3199
3287
|
return defaultValue;
|
|
@@ -3202,7 +3290,7 @@ var init_Progress = __esm({
|
|
|
3202
3290
|
};
|
|
3203
3291
|
getLabelComponent = (label, progressLabelId, showLabel) => {
|
|
3204
3292
|
if (showLabel) {
|
|
3205
|
-
return /* @__PURE__ */ (0,
|
|
3293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3206
3294
|
Label,
|
|
3207
3295
|
{
|
|
3208
3296
|
id: progressLabelId,
|
|
@@ -3212,7 +3300,7 @@ var init_Progress = __esm({
|
|
|
3212
3300
|
}
|
|
3213
3301
|
);
|
|
3214
3302
|
}
|
|
3215
|
-
return /* @__PURE__ */ (0,
|
|
3303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3216
3304
|
Label,
|
|
3217
3305
|
{
|
|
3218
3306
|
id: progressLabelId,
|
|
@@ -3226,8 +3314,8 @@ var init_Progress = __esm({
|
|
|
3226
3314
|
DEFAULT_MIN_VALUE = 0;
|
|
3227
3315
|
DEFAULT_MAX_VALUE = 100;
|
|
3228
3316
|
Progress = ({ ref, ...props }) => {
|
|
3229
|
-
const progressId = (0,
|
|
3230
|
-
const progressLabelId = (0,
|
|
3317
|
+
const progressId = (0, import_react30.useId)();
|
|
3318
|
+
const progressLabelId = (0, import_react30.useId)();
|
|
3231
3319
|
const {
|
|
3232
3320
|
id,
|
|
3233
3321
|
label,
|
|
@@ -3252,7 +3340,7 @@ var init_Progress = __esm({
|
|
|
3252
3340
|
100
|
|
3253
3341
|
);
|
|
3254
3342
|
const barWidth = `${percentage}%`;
|
|
3255
|
-
const classes = (0,
|
|
3343
|
+
const classes = (0, import_dedupe36.default)("mobius", "mobius-progress", className, {
|
|
3256
3344
|
"--is-primary": variant === "primary",
|
|
3257
3345
|
"--is-secondary": variant === "secondary"
|
|
3258
3346
|
});
|
|
@@ -3262,7 +3350,7 @@ var init_Progress = __esm({
|
|
|
3262
3350
|
progressBarProps["aria-valuenow"] = value.toString();
|
|
3263
3351
|
progressBarProps["aria-valuetext"] = valueFormatter instanceof Function ? valueFormatter(value, minValue, maxValue) : barWidth;
|
|
3264
3352
|
const labelComponent = getLabelComponent(label, progressLabelId, showLabel);
|
|
3265
|
-
return /* @__PURE__ */ (0,
|
|
3353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
3266
3354
|
"div",
|
|
3267
3355
|
{
|
|
3268
3356
|
id: id || progressId,
|
|
@@ -3273,8 +3361,8 @@ var init_Progress = __esm({
|
|
|
3273
3361
|
"aria-labelledby": progressLabelId,
|
|
3274
3362
|
children: [
|
|
3275
3363
|
labelComponent,
|
|
3276
|
-
/* @__PURE__ */ (0,
|
|
3277
|
-
showValueLabel && /* @__PURE__ */ (0,
|
|
3364
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "mobius-progress__track", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "mobius-progress__bar", style: { width: barWidth } }) }),
|
|
3365
|
+
showValueLabel && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Label, { "data-testid": "value-label", elementType: "span", children: progressBarProps["aria-valuetext"] })
|
|
3278
3366
|
]
|
|
3279
3367
|
}
|
|
3280
3368
|
);
|
|
@@ -3292,17 +3380,17 @@ var init_Progress2 = __esm({
|
|
|
3292
3380
|
});
|
|
3293
3381
|
|
|
3294
3382
|
// src/components/Radio/Radio.tsx
|
|
3295
|
-
var
|
|
3383
|
+
var import_dedupe37, import_react31, import_Radio, import_jsx_runtime47, Radio;
|
|
3296
3384
|
var init_Radio = __esm({
|
|
3297
3385
|
"src/components/Radio/Radio.tsx"() {
|
|
3298
3386
|
"use strict";
|
|
3299
3387
|
"use client";
|
|
3300
|
-
|
|
3301
|
-
|
|
3388
|
+
import_dedupe37 = __toESM(require("classnames/dedupe"));
|
|
3389
|
+
import_react31 = require("react");
|
|
3302
3390
|
init_ErrorMessage2();
|
|
3303
3391
|
init_Label2();
|
|
3304
3392
|
import_Radio = require("@simplybusiness/mobius/src/components/Radio/Radio.css");
|
|
3305
|
-
|
|
3393
|
+
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3306
3394
|
Radio = ({ ref, ...props }) => {
|
|
3307
3395
|
const {
|
|
3308
3396
|
children,
|
|
@@ -3326,19 +3414,19 @@ var init_Radio = __esm({
|
|
|
3326
3414
|
const isMultiline = label && children;
|
|
3327
3415
|
const isControlled = selected !== void 0;
|
|
3328
3416
|
const isChecked = isControlled ? selected === value : defaultChecked;
|
|
3329
|
-
const contentRef = (0,
|
|
3330
|
-
const prevOverflowRef = (0,
|
|
3417
|
+
const contentRef = (0, import_react31.useRef)(null);
|
|
3418
|
+
const prevOverflowRef = (0, import_react31.useRef)({
|
|
3331
3419
|
vertical: false,
|
|
3332
3420
|
horizontal: false
|
|
3333
3421
|
});
|
|
3334
|
-
const hasIconFirst = (0,
|
|
3335
|
-
if (!children ||
|
|
3336
|
-
const firstChild =
|
|
3337
|
-
if (!(0,
|
|
3422
|
+
const hasIconFirst = (0, import_react31.useMemo)(() => {
|
|
3423
|
+
if (!children || import_react31.Children.count(children) === 0) return false;
|
|
3424
|
+
const firstChild = import_react31.Children.toArray(children)[0];
|
|
3425
|
+
if (!(0, import_react31.isValidElement)(firstChild)) return false;
|
|
3338
3426
|
const props2 = firstChild.props;
|
|
3339
3427
|
return "icon" in props2 && props2.icon !== void 0;
|
|
3340
3428
|
}, [children]);
|
|
3341
|
-
(0,
|
|
3429
|
+
(0, import_react31.useLayoutEffect)(() => {
|
|
3342
3430
|
if (!contentRef.current || !onOverflow) return;
|
|
3343
3431
|
if (orientation === "vertical") {
|
|
3344
3432
|
return;
|
|
@@ -3367,13 +3455,13 @@ var init_Radio = __esm({
|
|
|
3367
3455
|
"--is-multiline": !!isMultiline,
|
|
3368
3456
|
"--is-required": isRequired
|
|
3369
3457
|
};
|
|
3370
|
-
const containerClasses = (0,
|
|
3458
|
+
const containerClasses = (0, import_dedupe37.default)(
|
|
3371
3459
|
"mobius-radio__label",
|
|
3372
3460
|
radioClasses,
|
|
3373
3461
|
className,
|
|
3374
3462
|
{ "--has-icon-first": hasIconFirst }
|
|
3375
3463
|
);
|
|
3376
|
-
const inputClasses = (0,
|
|
3464
|
+
const inputClasses = (0, import_dedupe37.default)("mobius-radio__input", radioClasses);
|
|
3377
3465
|
const { "aria-describedby": _ariaDescribedBy, ...rest } = otherProps;
|
|
3378
3466
|
const handleChange = (event) => {
|
|
3379
3467
|
if (setSelected) {
|
|
@@ -3387,9 +3475,9 @@ var init_Radio = __esm({
|
|
|
3387
3475
|
onChange(adaptedEvent);
|
|
3388
3476
|
}
|
|
3389
3477
|
};
|
|
3390
|
-
return /* @__PURE__ */ (0,
|
|
3391
|
-
/* @__PURE__ */ (0,
|
|
3392
|
-
/* @__PURE__ */ (0,
|
|
3478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
3479
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Label, { className: containerClasses, children: [
|
|
3480
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3393
3481
|
"input",
|
|
3394
3482
|
{
|
|
3395
3483
|
"aria-describedby": otherProps["aria-describedby"],
|
|
@@ -3406,12 +3494,12 @@ var init_Radio = __esm({
|
|
|
3406
3494
|
...rest
|
|
3407
3495
|
}
|
|
3408
3496
|
),
|
|
3409
|
-
isMultiline ? /* @__PURE__ */ (0,
|
|
3410
|
-
/* @__PURE__ */ (0,
|
|
3411
|
-
/* @__PURE__ */ (0,
|
|
3412
|
-
] }) : /* @__PURE__ */ (0,
|
|
3497
|
+
isMultiline ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { ref: contentRef, className: "mobius-radio__content--multiline", children: [
|
|
3498
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "mobius-radio__content-first-line", children: label }),
|
|
3499
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "mobius-radio__extra-content", children })
|
|
3500
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { ref: contentRef, className: "mobius-radio__content", children: label || children })
|
|
3413
3501
|
] }),
|
|
3414
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
3502
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ErrorMessage, { errorMessage })
|
|
3415
3503
|
] });
|
|
3416
3504
|
};
|
|
3417
3505
|
Radio.displayName = "Radio";
|
|
@@ -3419,19 +3507,19 @@ var init_Radio = __esm({
|
|
|
3419
3507
|
});
|
|
3420
3508
|
|
|
3421
3509
|
// src/components/Radio/RadioGroup.tsx
|
|
3422
|
-
var
|
|
3510
|
+
var import_dedupe38, import_react32, import_jsx_runtime48, getDefaultVal, RadioGroup;
|
|
3423
3511
|
var init_RadioGroup = __esm({
|
|
3424
3512
|
"src/components/Radio/RadioGroup.tsx"() {
|
|
3425
3513
|
"use strict";
|
|
3426
3514
|
"use client";
|
|
3427
|
-
|
|
3428
|
-
|
|
3515
|
+
import_dedupe38 = __toESM(require("classnames/dedupe"));
|
|
3516
|
+
import_react32 = require("react");
|
|
3429
3517
|
init_hooks();
|
|
3430
3518
|
init_spaceDelimitedList();
|
|
3431
3519
|
init_ErrorMessage2();
|
|
3432
3520
|
init_Label2();
|
|
3433
3521
|
init_Stack2();
|
|
3434
|
-
|
|
3522
|
+
import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3435
3523
|
getDefaultVal = (children, defaultValue) => {
|
|
3436
3524
|
if (Array.isArray(children) && defaultValue) {
|
|
3437
3525
|
const option = children?.find((item) => item.props.value === defaultValue);
|
|
@@ -3459,15 +3547,15 @@ var init_RadioGroup = __esm({
|
|
|
3459
3547
|
...rest
|
|
3460
3548
|
} = props;
|
|
3461
3549
|
const defaultSelected = getDefaultVal(children, value || defaultValue);
|
|
3462
|
-
const [selected, setSelected] = (0,
|
|
3463
|
-
const overflowsRef = (0,
|
|
3464
|
-
const [hasOverflow, setHasOverflow] = (0,
|
|
3465
|
-
(0,
|
|
3550
|
+
const [selected, setSelected] = (0, import_react32.useState)(defaultSelected);
|
|
3551
|
+
const overflowsRef = (0, import_react32.useRef)({});
|
|
3552
|
+
const [hasOverflow, setHasOverflow] = (0, import_react32.useState)(false);
|
|
3553
|
+
(0, import_react32.useEffect)(() => {
|
|
3466
3554
|
if (value !== void 0) {
|
|
3467
3555
|
setSelected(value);
|
|
3468
3556
|
}
|
|
3469
3557
|
}, [value]);
|
|
3470
|
-
const handleOverflow = (0,
|
|
3558
|
+
const handleOverflow = (0, import_react32.useCallback)(
|
|
3471
3559
|
(radioValue, overflow) => {
|
|
3472
3560
|
overflowsRef.current = {
|
|
3473
3561
|
...overflowsRef.current,
|
|
@@ -3491,26 +3579,26 @@ var init_RadioGroup = __esm({
|
|
|
3491
3579
|
[`--is-${effectiveOrientation}`]: true,
|
|
3492
3580
|
[className || ""]: true
|
|
3493
3581
|
};
|
|
3494
|
-
const radioGroupClasses = (0,
|
|
3582
|
+
const radioGroupClasses = (0, import_dedupe38.default)(
|
|
3495
3583
|
"mobius",
|
|
3496
3584
|
"mobius-radio-group",
|
|
3497
3585
|
radioClasses,
|
|
3498
3586
|
validationClasses
|
|
3499
3587
|
);
|
|
3500
|
-
const radioWrapperClasses = (0,
|
|
3588
|
+
const radioWrapperClasses = (0, import_dedupe38.default)("mobius-radio__wrapper", {
|
|
3501
3589
|
[`--is-${effectiveOrientation}`]: true
|
|
3502
3590
|
});
|
|
3503
|
-
const labelClasses = (0,
|
|
3504
|
-
const errorMessageId = (0,
|
|
3505
|
-
const defaultNameAttrId = (0,
|
|
3591
|
+
const labelClasses = (0, import_dedupe38.default)(radioClasses, validationClasses);
|
|
3592
|
+
const errorMessageId = (0, import_react32.useId)();
|
|
3593
|
+
const defaultNameAttrId = (0, import_react32.useId)();
|
|
3506
3594
|
const nameAttribute = name || defaultNameAttrId;
|
|
3507
3595
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
3508
3596
|
const describedBy = spaceDelimitedList([
|
|
3509
3597
|
shouldErrorMessageShow,
|
|
3510
3598
|
props["aria-describedby"]
|
|
3511
3599
|
]);
|
|
3512
|
-
const labelId = (0,
|
|
3513
|
-
return /* @__PURE__ */ (0,
|
|
3600
|
+
const labelId = (0, import_react32.useId)();
|
|
3601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3514
3602
|
"div",
|
|
3515
3603
|
{
|
|
3516
3604
|
...rest,
|
|
@@ -3526,12 +3614,12 @@ var init_RadioGroup = __esm({
|
|
|
3526
3614
|
ref,
|
|
3527
3615
|
className: radioGroupClasses,
|
|
3528
3616
|
role: "radiogroup",
|
|
3529
|
-
children: /* @__PURE__ */ (0,
|
|
3530
|
-
label && /* @__PURE__ */ (0,
|
|
3531
|
-
/* @__PURE__ */ (0,
|
|
3532
|
-
if ((0,
|
|
3617
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Stack, { gap: "xs", children: [
|
|
3618
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Label, { htmlFor: name, id: labelId, className: labelClasses, children: label }),
|
|
3619
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: radioWrapperClasses, children: import_react32.Children.map(children, (child) => {
|
|
3620
|
+
if ((0, import_react32.isValidElement)(child)) {
|
|
3533
3621
|
const childValue = child.props.value;
|
|
3534
|
-
return (0,
|
|
3622
|
+
return (0, import_react32.cloneElement)(
|
|
3535
3623
|
child,
|
|
3536
3624
|
{
|
|
3537
3625
|
orientation: effectiveOrientation,
|
|
@@ -3549,7 +3637,7 @@ var init_RadioGroup = __esm({
|
|
|
3549
3637
|
}
|
|
3550
3638
|
return child;
|
|
3551
3639
|
}) }),
|
|
3552
|
-
/* @__PURE__ */ (0,
|
|
3640
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
3553
3641
|
] })
|
|
3554
3642
|
}
|
|
3555
3643
|
);
|
|
@@ -3568,47 +3656,47 @@ var init_Radio2 = __esm({
|
|
|
3568
3656
|
});
|
|
3569
3657
|
|
|
3570
3658
|
// src/components/Segment/SegmentGroup.tsx
|
|
3571
|
-
var
|
|
3659
|
+
var import_dedupe39, import_jsx_runtime49, SegmentGroup;
|
|
3572
3660
|
var init_SegmentGroup = __esm({
|
|
3573
3661
|
"src/components/Segment/SegmentGroup.tsx"() {
|
|
3574
3662
|
"use strict";
|
|
3575
|
-
|
|
3576
|
-
|
|
3663
|
+
import_dedupe39 = __toESM(require("classnames/dedupe"));
|
|
3664
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3577
3665
|
SegmentGroup = (props) => {
|
|
3578
3666
|
const { children, horizontal, gap, className, ...rest } = props;
|
|
3579
3667
|
const gapClass = gap ? `gap-${gap}` : "";
|
|
3580
|
-
const classes = (0,
|
|
3668
|
+
const classes = (0, import_dedupe39.default)(
|
|
3581
3669
|
"mobius",
|
|
3582
3670
|
"mobius-segment-group",
|
|
3583
3671
|
className,
|
|
3584
3672
|
{ "--is-horizontal": horizontal },
|
|
3585
3673
|
gapClass
|
|
3586
3674
|
);
|
|
3587
|
-
return /* @__PURE__ */ (0,
|
|
3675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: classes, ...rest, children });
|
|
3588
3676
|
};
|
|
3589
3677
|
SegmentGroup.displayName = "SegmentGroup";
|
|
3590
3678
|
}
|
|
3591
3679
|
});
|
|
3592
3680
|
|
|
3593
3681
|
// src/components/Segment/Segment.tsx
|
|
3594
|
-
var
|
|
3682
|
+
var import_dedupe40, import_Segment, import_jsx_runtime50, Segment;
|
|
3595
3683
|
var init_Segment = __esm({
|
|
3596
3684
|
"src/components/Segment/Segment.tsx"() {
|
|
3597
3685
|
"use strict";
|
|
3598
|
-
|
|
3686
|
+
import_dedupe40 = __toESM(require("classnames/dedupe"));
|
|
3599
3687
|
import_Segment = require("@simplybusiness/mobius/src/components/Segment/Segment.css");
|
|
3600
|
-
|
|
3688
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3601
3689
|
Segment = (props) => {
|
|
3602
3690
|
const { heading, children, colour, inverted, className, ...rest } = props;
|
|
3603
|
-
const classes = (0,
|
|
3691
|
+
const classes = (0, import_dedupe40.default)(
|
|
3604
3692
|
"mobius",
|
|
3605
3693
|
"mobius-segment",
|
|
3606
3694
|
colour,
|
|
3607
3695
|
{ inverted },
|
|
3608
3696
|
className
|
|
3609
3697
|
);
|
|
3610
|
-
return /* @__PURE__ */ (0,
|
|
3611
|
-
heading && /* @__PURE__ */ (0,
|
|
3698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: classes, ...rest, children: [
|
|
3699
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mobius-segment__heading", children: heading }),
|
|
3612
3700
|
children
|
|
3613
3701
|
] });
|
|
3614
3702
|
};
|
|
@@ -3626,14 +3714,14 @@ var init_Segment2 = __esm({
|
|
|
3626
3714
|
});
|
|
3627
3715
|
|
|
3628
3716
|
// src/components/Select/Select.tsx
|
|
3629
|
-
var import_icons11,
|
|
3717
|
+
var import_icons11, import_dedupe41, import_react33, import_Select, import_jsx_runtime51, Select;
|
|
3630
3718
|
var init_Select = __esm({
|
|
3631
3719
|
"src/components/Select/Select.tsx"() {
|
|
3632
3720
|
"use strict";
|
|
3633
3721
|
"use client";
|
|
3634
3722
|
import_icons11 = require("@simplybusiness/icons");
|
|
3635
|
-
|
|
3636
|
-
|
|
3723
|
+
import_dedupe41 = __toESM(require("classnames/dedupe"));
|
|
3724
|
+
import_react33 = require("react");
|
|
3637
3725
|
init_hooks();
|
|
3638
3726
|
init_useLabel2();
|
|
3639
3727
|
init_spaceDelimitedList();
|
|
@@ -3642,7 +3730,7 @@ var init_Select = __esm({
|
|
|
3642
3730
|
init_Label2();
|
|
3643
3731
|
init_Stack2();
|
|
3644
3732
|
import_Select = require("@simplybusiness/mobius/src/components/Select/Select.css");
|
|
3645
|
-
|
|
3733
|
+
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3646
3734
|
Select = ({ ref, ...props }) => {
|
|
3647
3735
|
const {
|
|
3648
3736
|
label,
|
|
@@ -3663,24 +3751,24 @@ var init_Select = __esm({
|
|
|
3663
3751
|
"--is-required": typeof isRequired === "boolean" && isRequired,
|
|
3664
3752
|
"--is-optional": typeof isRequired === "boolean" && !isRequired
|
|
3665
3753
|
};
|
|
3666
|
-
const sharedClasses = (0,
|
|
3667
|
-
const wrapperClasses = (0,
|
|
3754
|
+
const sharedClasses = (0, import_dedupe41.default)(validationClasses, stateClasses);
|
|
3755
|
+
const wrapperClasses = (0, import_dedupe41.default)(
|
|
3668
3756
|
"mobius-select__wrapper",
|
|
3669
3757
|
sharedClasses,
|
|
3670
3758
|
otherProps.className
|
|
3671
3759
|
);
|
|
3672
|
-
const selectClasses = (0,
|
|
3760
|
+
const selectClasses = (0, import_dedupe41.default)(
|
|
3673
3761
|
"mobius-select",
|
|
3674
3762
|
sharedClasses,
|
|
3675
3763
|
otherProps.className
|
|
3676
3764
|
);
|
|
3677
|
-
const labelClasses = (0,
|
|
3765
|
+
const labelClasses = (0, import_dedupe41.default)(
|
|
3678
3766
|
"mobius-label",
|
|
3679
3767
|
sharedClasses,
|
|
3680
3768
|
otherProps.className
|
|
3681
3769
|
);
|
|
3682
|
-
const iconClasses = (0,
|
|
3683
|
-
const errorMessageId = (0,
|
|
3770
|
+
const iconClasses = (0, import_dedupe41.default)("mobius-select__icon", sharedClasses);
|
|
3771
|
+
const errorMessageId = (0, import_react33.useId)();
|
|
3684
3772
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
3685
3773
|
const describedBy = spaceDelimitedList([
|
|
3686
3774
|
shouldErrorMessageShow,
|
|
@@ -3691,10 +3779,10 @@ var init_Select = __esm({
|
|
|
3691
3779
|
onChange(e);
|
|
3692
3780
|
}
|
|
3693
3781
|
};
|
|
3694
|
-
return /* @__PURE__ */ (0,
|
|
3695
|
-
label && /* @__PURE__ */ (0,
|
|
3696
|
-
/* @__PURE__ */ (0,
|
|
3697
|
-
/* @__PURE__ */ (0,
|
|
3782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Stack, { className: "mobius mobius-select__outer", gap: "xs", children: [
|
|
3783
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Label, { ...labelProps, className: labelClasses, children: label }),
|
|
3784
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: wrapperClasses, children: [
|
|
3785
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3698
3786
|
"select",
|
|
3699
3787
|
{
|
|
3700
3788
|
...otherProps,
|
|
@@ -3710,9 +3798,9 @@ var init_Select = __esm({
|
|
|
3710
3798
|
onChange: handleChange
|
|
3711
3799
|
}
|
|
3712
3800
|
),
|
|
3713
|
-
/* @__PURE__ */ (0,
|
|
3801
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Icon, { icon: import_icons11.chevronDown }) })
|
|
3714
3802
|
] }),
|
|
3715
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
3803
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
3716
3804
|
] });
|
|
3717
3805
|
};
|
|
3718
3806
|
Select.displayName = "Select";
|
|
@@ -3728,15 +3816,15 @@ var init_Select2 = __esm({
|
|
|
3728
3816
|
});
|
|
3729
3817
|
|
|
3730
3818
|
// src/components/Slider/Slider.tsx
|
|
3731
|
-
var
|
|
3819
|
+
var import_dedupe42, import_react34, import_Slider, import_jsx_runtime52;
|
|
3732
3820
|
var init_Slider = __esm({
|
|
3733
3821
|
"src/components/Slider/Slider.tsx"() {
|
|
3734
3822
|
"use strict";
|
|
3735
3823
|
"use client";
|
|
3736
|
-
|
|
3737
|
-
|
|
3824
|
+
import_dedupe42 = __toESM(require("classnames/dedupe"));
|
|
3825
|
+
import_react34 = require("react");
|
|
3738
3826
|
import_Slider = require("@simplybusiness/mobius/src/components/Slider/Slider.css");
|
|
3739
|
-
|
|
3827
|
+
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3740
3828
|
}
|
|
3741
3829
|
});
|
|
3742
3830
|
|
|
@@ -3749,19 +3837,19 @@ var init_Slider2 = __esm({
|
|
|
3749
3837
|
});
|
|
3750
3838
|
|
|
3751
3839
|
// src/components/SVG/SVG.tsx
|
|
3752
|
-
var
|
|
3840
|
+
var import_react35, import_dedupe43, import_jsx_runtime53, SVG;
|
|
3753
3841
|
var init_SVG = __esm({
|
|
3754
3842
|
"src/components/SVG/SVG.tsx"() {
|
|
3755
3843
|
"use strict";
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3844
|
+
import_react35 = require("react");
|
|
3845
|
+
import_dedupe43 = __toESM(require("classnames/dedupe"));
|
|
3846
|
+
import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3759
3847
|
SVG = ({ ref, ...props }) => {
|
|
3760
3848
|
const { children, className, ...otherProps } = props;
|
|
3761
|
-
const classes = (0,
|
|
3762
|
-
const svgNode =
|
|
3849
|
+
const classes = (0, import_dedupe43.default)("mobius", "mobius-svg", className);
|
|
3850
|
+
const svgNode = import_react35.Children.only(children);
|
|
3763
3851
|
const { children: svgChildren, viewBox, xmlns } = svgNode.props;
|
|
3764
|
-
return /* @__PURE__ */ (0,
|
|
3852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3765
3853
|
"svg",
|
|
3766
3854
|
{
|
|
3767
3855
|
viewBox,
|
|
@@ -3786,16 +3874,16 @@ var init_SVG2 = __esm({
|
|
|
3786
3874
|
});
|
|
3787
3875
|
|
|
3788
3876
|
// src/components/Switch/Switch.tsx
|
|
3789
|
-
var
|
|
3877
|
+
var import_react36, import_dedupe44, import_Switch, import_jsx_runtime54, Switch;
|
|
3790
3878
|
var init_Switch = __esm({
|
|
3791
3879
|
"src/components/Switch/Switch.tsx"() {
|
|
3792
3880
|
"use strict";
|
|
3793
3881
|
"use client";
|
|
3794
|
-
|
|
3795
|
-
|
|
3882
|
+
import_react36 = require("react");
|
|
3883
|
+
import_dedupe44 = __toESM(require("classnames/dedupe"));
|
|
3796
3884
|
init_VisuallyHidden2();
|
|
3797
3885
|
import_Switch = require("@simplybusiness/mobius/src/components/Switch/Switch.css");
|
|
3798
|
-
|
|
3886
|
+
import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3799
3887
|
Switch = ({ ref, ...props }) => {
|
|
3800
3888
|
const {
|
|
3801
3889
|
checked = false,
|
|
@@ -3804,11 +3892,11 @@ var init_Switch = __esm({
|
|
|
3804
3892
|
isDisabled = false,
|
|
3805
3893
|
...otherProps
|
|
3806
3894
|
} = props;
|
|
3807
|
-
const [enabled, setEnabled] = (0,
|
|
3808
|
-
(0,
|
|
3895
|
+
const [enabled, setEnabled] = (0, import_react36.useState)(checked);
|
|
3896
|
+
(0, import_react36.useEffect)(() => {
|
|
3809
3897
|
setEnabled(checked);
|
|
3810
3898
|
}, [checked]);
|
|
3811
|
-
const classes = (0,
|
|
3899
|
+
const classes = (0, import_dedupe44.default)(
|
|
3812
3900
|
"mobius",
|
|
3813
3901
|
"mobius-switch",
|
|
3814
3902
|
{
|
|
@@ -3823,9 +3911,9 @@ var init_Switch = __esm({
|
|
|
3823
3911
|
onChange(event);
|
|
3824
3912
|
}
|
|
3825
3913
|
};
|
|
3826
|
-
return /* @__PURE__ */ (0,
|
|
3827
|
-
/* @__PURE__ */ (0,
|
|
3828
|
-
/* @__PURE__ */ (0,
|
|
3914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("label", { ref, className: classes, children: [
|
|
3915
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: enabled ? "On" : "Off" }) }),
|
|
3916
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3829
3917
|
"input",
|
|
3830
3918
|
{
|
|
3831
3919
|
type: "checkbox",
|
|
@@ -3836,7 +3924,7 @@ var init_Switch = __esm({
|
|
|
3836
3924
|
...otherProps
|
|
3837
3925
|
}
|
|
3838
3926
|
),
|
|
3839
|
-
/* @__PURE__ */ (0,
|
|
3927
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "mobius-switch__slider" })
|
|
3840
3928
|
] });
|
|
3841
3929
|
};
|
|
3842
3930
|
Switch.displayName = "Switch";
|
|
@@ -3852,114 +3940,114 @@ var init_Switch2 = __esm({
|
|
|
3852
3940
|
});
|
|
3853
3941
|
|
|
3854
3942
|
// src/components/Table/Table.tsx
|
|
3855
|
-
var
|
|
3943
|
+
var import_dedupe45, import_Table, import_jsx_runtime55, Table;
|
|
3856
3944
|
var init_Table = __esm({
|
|
3857
3945
|
"src/components/Table/Table.tsx"() {
|
|
3858
3946
|
"use strict";
|
|
3859
|
-
|
|
3947
|
+
import_dedupe45 = __toESM(require("classnames/dedupe"));
|
|
3860
3948
|
import_Table = require("@simplybusiness/mobius/src/components/Table/Table.css");
|
|
3861
|
-
|
|
3949
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3862
3950
|
Table = ({ ref, ...props }) => {
|
|
3863
|
-
const classes = (0,
|
|
3864
|
-
return /* @__PURE__ */ (0,
|
|
3951
|
+
const classes = (0, import_dedupe45.default)("mobius", "mobius-table", props.className);
|
|
3952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("table", { ref, ...props, className: classes });
|
|
3865
3953
|
};
|
|
3866
3954
|
Table.displayName = "Table";
|
|
3867
3955
|
}
|
|
3868
3956
|
});
|
|
3869
3957
|
|
|
3870
3958
|
// src/components/Table/Head.tsx
|
|
3871
|
-
var
|
|
3959
|
+
var import_dedupe46, import_jsx_runtime56, Head;
|
|
3872
3960
|
var init_Head = __esm({
|
|
3873
3961
|
"src/components/Table/Head.tsx"() {
|
|
3874
3962
|
"use strict";
|
|
3875
|
-
|
|
3876
|
-
|
|
3963
|
+
import_dedupe46 = __toESM(require("classnames/dedupe"));
|
|
3964
|
+
import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3877
3965
|
Head = ({ ref, ...props }) => {
|
|
3878
|
-
const classes = (0,
|
|
3879
|
-
return /* @__PURE__ */ (0,
|
|
3966
|
+
const classes = (0, import_dedupe46.default)("mobius", "mobius-table__head", props.className);
|
|
3967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("thead", { ref, ...props, className: classes });
|
|
3880
3968
|
};
|
|
3881
3969
|
Head.displayName = "Table.Head";
|
|
3882
3970
|
}
|
|
3883
3971
|
});
|
|
3884
3972
|
|
|
3885
3973
|
// src/components/Table/Body.tsx
|
|
3886
|
-
var
|
|
3974
|
+
var import_dedupe47, import_jsx_runtime57, Body;
|
|
3887
3975
|
var init_Body = __esm({
|
|
3888
3976
|
"src/components/Table/Body.tsx"() {
|
|
3889
3977
|
"use strict";
|
|
3890
|
-
|
|
3891
|
-
|
|
3978
|
+
import_dedupe47 = __toESM(require("classnames/dedupe"));
|
|
3979
|
+
import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3892
3980
|
Body = ({ ref, ...props }) => {
|
|
3893
|
-
const classes = (0,
|
|
3894
|
-
return /* @__PURE__ */ (0,
|
|
3981
|
+
const classes = (0, import_dedupe47.default)("mobius", "mobius-table__body", props.className);
|
|
3982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("tbody", { ref, ...props, className: classes });
|
|
3895
3983
|
};
|
|
3896
3984
|
Body.displayName = "Table.Body";
|
|
3897
3985
|
}
|
|
3898
3986
|
});
|
|
3899
3987
|
|
|
3900
3988
|
// src/components/Table/Foot.tsx
|
|
3901
|
-
var
|
|
3989
|
+
var import_dedupe48, import_jsx_runtime58, Foot;
|
|
3902
3990
|
var init_Foot = __esm({
|
|
3903
3991
|
"src/components/Table/Foot.tsx"() {
|
|
3904
3992
|
"use strict";
|
|
3905
|
-
|
|
3906
|
-
|
|
3993
|
+
import_dedupe48 = __toESM(require("classnames/dedupe"));
|
|
3994
|
+
import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3907
3995
|
Foot = ({ ref, ...props }) => {
|
|
3908
|
-
const classes = (0,
|
|
3909
|
-
return /* @__PURE__ */ (0,
|
|
3996
|
+
const classes = (0, import_dedupe48.default)("mobius", "mobius-table__foot", props.className);
|
|
3997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("tfoot", { ref, ...props, className: classes });
|
|
3910
3998
|
};
|
|
3911
3999
|
Foot.displayName = "Table.Foot";
|
|
3912
4000
|
}
|
|
3913
4001
|
});
|
|
3914
4002
|
|
|
3915
4003
|
// src/components/Table/Row.tsx
|
|
3916
|
-
var
|
|
4004
|
+
var import_dedupe49, import_jsx_runtime59, Row;
|
|
3917
4005
|
var init_Row = __esm({
|
|
3918
4006
|
"src/components/Table/Row.tsx"() {
|
|
3919
4007
|
"use strict";
|
|
3920
|
-
|
|
3921
|
-
|
|
4008
|
+
import_dedupe49 = __toESM(require("classnames/dedupe"));
|
|
4009
|
+
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3922
4010
|
Row = ({ ref, ...props }) => {
|
|
3923
|
-
const classes = (0,
|
|
3924
|
-
return /* @__PURE__ */ (0,
|
|
4011
|
+
const classes = (0, import_dedupe49.default)("mobius", "mobius-table__row", props.className);
|
|
4012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("tr", { ref, ...props, className: classes });
|
|
3925
4013
|
};
|
|
3926
4014
|
Row.displayName = "Table.Row";
|
|
3927
4015
|
}
|
|
3928
4016
|
});
|
|
3929
4017
|
|
|
3930
4018
|
// src/components/Table/HeaderCell.tsx
|
|
3931
|
-
var
|
|
4019
|
+
var import_dedupe50, import_jsx_runtime60, HeaderCell;
|
|
3932
4020
|
var init_HeaderCell = __esm({
|
|
3933
4021
|
"src/components/Table/HeaderCell.tsx"() {
|
|
3934
4022
|
"use strict";
|
|
3935
|
-
|
|
3936
|
-
|
|
4023
|
+
import_dedupe50 = __toESM(require("classnames/dedupe"));
|
|
4024
|
+
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3937
4025
|
HeaderCell = ({ ref, ...props }) => {
|
|
3938
|
-
const classes = (0,
|
|
4026
|
+
const classes = (0, import_dedupe50.default)(
|
|
3939
4027
|
"mobius",
|
|
3940
4028
|
"mobius-table__head-cell",
|
|
3941
4029
|
props.className
|
|
3942
4030
|
);
|
|
3943
|
-
return /* @__PURE__ */ (0,
|
|
4031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("th", { ...props, ref, className: classes });
|
|
3944
4032
|
};
|
|
3945
4033
|
HeaderCell.displayName = "Table.HeaderCell";
|
|
3946
4034
|
}
|
|
3947
4035
|
});
|
|
3948
4036
|
|
|
3949
4037
|
// src/components/Table/Cell.tsx
|
|
3950
|
-
var
|
|
4038
|
+
var import_dedupe51, import_jsx_runtime61, Cell;
|
|
3951
4039
|
var init_Cell = __esm({
|
|
3952
4040
|
"src/components/Table/Cell.tsx"() {
|
|
3953
4041
|
"use strict";
|
|
3954
|
-
|
|
3955
|
-
|
|
4042
|
+
import_dedupe51 = __toESM(require("classnames/dedupe"));
|
|
4043
|
+
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3956
4044
|
Cell = ({ ref, ...props }) => {
|
|
3957
|
-
const classes = (0,
|
|
4045
|
+
const classes = (0, import_dedupe51.default)(
|
|
3958
4046
|
"mobius",
|
|
3959
4047
|
"mobius-table__body-cell",
|
|
3960
4048
|
props.className
|
|
3961
4049
|
);
|
|
3962
|
-
return /* @__PURE__ */ (0,
|
|
4050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("td", { ref, ...props, className: classes });
|
|
3963
4051
|
};
|
|
3964
4052
|
Cell.displayName = "Table.Cell";
|
|
3965
4053
|
}
|
|
@@ -3989,37 +4077,6 @@ var init_Table2 = __esm({
|
|
|
3989
4077
|
}
|
|
3990
4078
|
});
|
|
3991
4079
|
|
|
3992
|
-
// src/components/Text/Text.tsx
|
|
3993
|
-
var import_dedupe51, import_Text, import_jsx_runtime60, getElementType, Text;
|
|
3994
|
-
var init_Text = __esm({
|
|
3995
|
-
"src/components/Text/Text.tsx"() {
|
|
3996
|
-
"use strict";
|
|
3997
|
-
import_dedupe51 = __toESM(require("classnames/dedupe"));
|
|
3998
|
-
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
3999
|
-
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4000
|
-
getElementType = (variant, elementType) => {
|
|
4001
|
-
if (variant) {
|
|
4002
|
-
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
4003
|
-
}
|
|
4004
|
-
return elementType || "p";
|
|
4005
|
-
};
|
|
4006
|
-
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
4007
|
-
const { variant, className, spacing, ...otherProps } = props;
|
|
4008
|
-
const elementType = getElementType(variant, Component);
|
|
4009
|
-
const variantType = variant || elementType;
|
|
4010
|
-
const classes = (0, import_dedupe51.default)(
|
|
4011
|
-
"mobius",
|
|
4012
|
-
"mobius-text",
|
|
4013
|
-
{ [`--is-${variantType}`]: variantType },
|
|
4014
|
-
{ [`--has-line-height-${spacing}`]: spacing },
|
|
4015
|
-
className
|
|
4016
|
-
);
|
|
4017
|
-
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
4018
|
-
};
|
|
4019
|
-
Text.displayName = "Text";
|
|
4020
|
-
}
|
|
4021
|
-
});
|
|
4022
|
-
|
|
4023
4080
|
// src/components/Text/index.tsx
|
|
4024
4081
|
var init_Text2 = __esm({
|
|
4025
4082
|
"src/components/Text/index.tsx"() {
|
|
@@ -4029,12 +4086,12 @@ var init_Text2 = __esm({
|
|
|
4029
4086
|
});
|
|
4030
4087
|
|
|
4031
4088
|
// src/components/TextAreaInput/TextAreaInput.tsx
|
|
4032
|
-
var import_dedupe52,
|
|
4089
|
+
var import_dedupe52, import_jsx_runtime62, TextAreaInput;
|
|
4033
4090
|
var init_TextAreaInput = __esm({
|
|
4034
4091
|
"src/components/TextAreaInput/TextAreaInput.tsx"() {
|
|
4035
4092
|
"use strict";
|
|
4036
4093
|
import_dedupe52 = __toESM(require("classnames/dedupe"));
|
|
4037
|
-
|
|
4094
|
+
import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4038
4095
|
TextAreaInput = ({ ref, ...props }) => {
|
|
4039
4096
|
const { isSelected, isDisabled, isReadOnly, isRequired, ...otherProps } = props;
|
|
4040
4097
|
const classes = (0, import_dedupe52.default)(
|
|
@@ -4047,7 +4104,7 @@ var init_TextAreaInput = __esm({
|
|
|
4047
4104
|
},
|
|
4048
4105
|
otherProps.className
|
|
4049
4106
|
);
|
|
4050
|
-
return /* @__PURE__ */ (0,
|
|
4107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
4051
4108
|
"textarea",
|
|
4052
4109
|
{
|
|
4053
4110
|
ref,
|
|
@@ -4071,7 +4128,7 @@ var init_TextAreaInput2 = __esm({
|
|
|
4071
4128
|
});
|
|
4072
4129
|
|
|
4073
4130
|
// src/components/TextArea/TextArea.tsx
|
|
4074
|
-
var import_dedupe53, import_TextArea,
|
|
4131
|
+
var import_dedupe53, import_TextArea, import_jsx_runtime63, TextArea;
|
|
4075
4132
|
var init_TextArea = __esm({
|
|
4076
4133
|
"src/components/TextArea/TextArea.tsx"() {
|
|
4077
4134
|
"use strict";
|
|
@@ -4083,7 +4140,7 @@ var init_TextArea = __esm({
|
|
|
4083
4140
|
init_Stack2();
|
|
4084
4141
|
init_TextAreaInput2();
|
|
4085
4142
|
import_TextArea = require("@simplybusiness/mobius/src/components/TextArea/TextArea.css");
|
|
4086
|
-
|
|
4143
|
+
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4087
4144
|
TextArea = ({ ref, ...props }) => {
|
|
4088
4145
|
const {
|
|
4089
4146
|
isDisabled,
|
|
@@ -4103,9 +4160,9 @@ var init_TextArea = __esm({
|
|
|
4103
4160
|
},
|
|
4104
4161
|
validationClasses
|
|
4105
4162
|
);
|
|
4106
|
-
return /* @__PURE__ */ (0,
|
|
4107
|
-
label && /* @__PURE__ */ (0,
|
|
4108
|
-
/* @__PURE__ */ (0,
|
|
4163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(Stack, { className: classes, gap: "xs", children: [
|
|
4164
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Label, { ...labelProps, className: labelClasses, children: props.label }),
|
|
4165
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4109
4166
|
TextAreaInput,
|
|
4110
4167
|
{
|
|
4111
4168
|
...otherProps,
|
|
@@ -4116,7 +4173,7 @@ var init_TextArea = __esm({
|
|
|
4116
4173
|
"aria-invalid": errorMessage != null
|
|
4117
4174
|
}
|
|
4118
4175
|
),
|
|
4119
|
-
/* @__PURE__ */ (0,
|
|
4176
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ErrorMessage, { ...errorMessageProps, errorMessage })
|
|
4120
4177
|
] });
|
|
4121
4178
|
};
|
|
4122
4179
|
TextArea.displayName = "TextArea";
|
|
@@ -4131,53 +4188,6 @@ var init_TextArea2 = __esm({
|
|
|
4131
4188
|
}
|
|
4132
4189
|
});
|
|
4133
4190
|
|
|
4134
|
-
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
4135
|
-
var import_react36, import_jsx_runtime63, isHTML, TextOrHTML;
|
|
4136
|
-
var init_TextOrHTML = __esm({
|
|
4137
|
-
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
4138
|
-
"use strict";
|
|
4139
|
-
import_react36 = require("react");
|
|
4140
|
-
init_Text();
|
|
4141
|
-
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4142
|
-
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
4143
|
-
TextOrHTML = ({
|
|
4144
|
-
ref,
|
|
4145
|
-
text,
|
|
4146
|
-
htmlClassName,
|
|
4147
|
-
htmlElementType,
|
|
4148
|
-
textWrapper = false,
|
|
4149
|
-
autoDetect = false,
|
|
4150
|
-
...textProps
|
|
4151
|
-
}) => {
|
|
4152
|
-
const textIsHTML = autoDetect && isHTML(text);
|
|
4153
|
-
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
4154
|
-
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
4155
|
-
const DangerousComponent = resolvedElementType;
|
|
4156
|
-
const dangerousHTML = (0, import_react36.useMemo)(() => ({ __html: text }), [text]);
|
|
4157
|
-
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4158
|
-
DangerousComponent,
|
|
4159
|
-
{
|
|
4160
|
-
className: htmlClassName,
|
|
4161
|
-
dangerouslySetInnerHTML: dangerousHTML
|
|
4162
|
-
}
|
|
4163
|
-
);
|
|
4164
|
-
if (shouldWrapInText) {
|
|
4165
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
4166
|
-
}
|
|
4167
|
-
return dangerousElement;
|
|
4168
|
-
};
|
|
4169
|
-
TextOrHTML.displayName = "TextOrHTML";
|
|
4170
|
-
}
|
|
4171
|
-
});
|
|
4172
|
-
|
|
4173
|
-
// src/components/TextOrHTML/index.tsx
|
|
4174
|
-
var init_TextOrHTML2 = __esm({
|
|
4175
|
-
"src/components/TextOrHTML/index.tsx"() {
|
|
4176
|
-
"use strict";
|
|
4177
|
-
init_TextOrHTML();
|
|
4178
|
-
}
|
|
4179
|
-
});
|
|
4180
|
-
|
|
4181
4191
|
// src/components/Title/Title.tsx
|
|
4182
4192
|
var import_dedupe54, import_Title, import_jsx_runtime64, Title;
|
|
4183
4193
|
var init_Title = __esm({
|