@simplybusiness/mobius 10.1.1 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/components/AddressLookup/AddressLookup.js +540 -526
- package/dist/cjs/components/AddressLookup/AddressLookup.js.map +4 -4
- package/dist/cjs/components/AddressLookup/index.js +540 -526
- package/dist/cjs/components/AddressLookup/index.js.map +4 -4
- package/dist/cjs/components/Alert/Alert.js +79 -11
- package/dist/cjs/components/Alert/Alert.js.map +4 -4
- package/dist/cjs/components/Alert/index.js +79 -11
- package/dist/cjs/components/Alert/index.js.map +4 -4
- package/dist/cjs/components/Checkbox/Checkbox.js +506 -492
- package/dist/cjs/components/Checkbox/Checkbox.js.map +4 -4
- package/dist/cjs/components/Checkbox/CheckboxGroup.js +506 -492
- package/dist/cjs/components/Checkbox/CheckboxGroup.js.map +4 -4
- package/dist/cjs/components/Checkbox/index.js +485 -471
- package/dist/cjs/components/Checkbox/index.js.map +4 -4
- package/dist/cjs/components/Combobox/Combobox.js +540 -526
- package/dist/cjs/components/Combobox/Combobox.js.map +4 -4
- package/dist/cjs/components/Combobox/index.js +540 -526
- package/dist/cjs/components/Combobox/index.js.map +4 -4
- package/dist/cjs/components/DateField/DateField.js +527 -513
- package/dist/cjs/components/DateField/DateField.js.map +4 -4
- package/dist/cjs/components/DateField/index.js +527 -513
- package/dist/cjs/components/DateField/index.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js +527 -513
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/index.js +527 -513
- package/dist/cjs/components/ErrorMessage/index.js.map +4 -4
- package/dist/cjs/components/ExpandableText/ExpandableText.js +527 -513
- package/dist/cjs/components/ExpandableText/ExpandableText.js.map +4 -4
- package/dist/cjs/components/ExpandableText/index.js +527 -513
- package/dist/cjs/components/ExpandableText/index.js.map +4 -4
- package/dist/cjs/components/MaskedField/MaskedField.js +537 -523
- package/dist/cjs/components/MaskedField/MaskedField.js.map +4 -4
- package/dist/cjs/components/MaskedField/index.js +537 -523
- package/dist/cjs/components/MaskedField/index.js.map +4 -4
- package/dist/cjs/components/NumberField/NumberField.js +528 -514
- package/dist/cjs/components/NumberField/NumberField.js.map +4 -4
- package/dist/cjs/components/NumberField/index.js +528 -514
- package/dist/cjs/components/NumberField/index.js.map +4 -4
- package/dist/cjs/components/PasswordField/PasswordField.js +524 -510
- package/dist/cjs/components/PasswordField/PasswordField.js.map +4 -4
- package/dist/cjs/components/PasswordField/ShowHideButton.js +523 -509
- package/dist/cjs/components/PasswordField/ShowHideButton.js.map +4 -4
- package/dist/cjs/components/PasswordField/index.js +524 -510
- package/dist/cjs/components/PasswordField/index.js.map +4 -4
- package/dist/cjs/components/Radio/Radio.js +506 -492
- package/dist/cjs/components/Radio/Radio.js.map +4 -4
- package/dist/cjs/components/Radio/RadioGroup.js +505 -491
- package/dist/cjs/components/Radio/RadioGroup.js.map +4 -4
- package/dist/cjs/components/Radio/index.js +484 -470
- package/dist/cjs/components/Radio/index.js.map +4 -4
- package/dist/cjs/components/Select/Select.js +511 -497
- package/dist/cjs/components/Select/Select.js.map +4 -4
- package/dist/cjs/components/Select/index.js +511 -497
- package/dist/cjs/components/Select/index.js.map +4 -4
- package/dist/cjs/components/TextArea/TextArea.js +521 -507
- package/dist/cjs/components/TextArea/TextArea.js.map +4 -4
- package/dist/cjs/components/TextArea/index.js +521 -507
- package/dist/cjs/components/TextArea/index.js.map +4 -4
- package/dist/cjs/components/TextField/TextField.js +537 -523
- package/dist/cjs/components/TextField/TextField.js.map +4 -4
- package/dist/cjs/components/TextField/index.js +537 -523
- package/dist/cjs/components/TextField/index.js.map +4 -4
- package/dist/cjs/components/index.js +567 -553
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/index.js +567 -553
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/meta.json +1372 -1305
- package/dist/esm/{chunk-FTSJNY4J.js → chunk-N5WGQAHM.js} +14 -2
- package/dist/esm/chunk-N5WGQAHM.js.map +7 -0
- package/dist/esm/{chunk-C4BILMFX.js → chunk-RR4UQSOZ.js} +5 -1
- package/dist/esm/chunk-RR4UQSOZ.js.map +7 -0
- package/dist/esm/components/AddressLookup/AddressLookup.js +2 -2
- package/dist/esm/components/AddressLookup/index.js +2 -2
- package/dist/esm/components/Alert/Alert.js +4 -1
- package/dist/esm/components/Alert/index.js +4 -1
- package/dist/esm/components/Checkbox/Checkbox.js +2 -2
- package/dist/esm/components/Checkbox/CheckboxGroup.js +2 -2
- package/dist/esm/components/Checkbox/index.js +2 -2
- package/dist/esm/components/Combobox/Combobox.js +2 -2
- package/dist/esm/components/Combobox/index.js +2 -2
- package/dist/esm/components/DateField/DateField.js +2 -2
- package/dist/esm/components/DateField/index.js +2 -2
- package/dist/esm/components/ErrorMessage/ErrorMessage.js +2 -2
- package/dist/esm/components/ErrorMessage/index.js +2 -2
- package/dist/esm/components/ExpandableText/ExpandableText.js +2 -2
- package/dist/esm/components/ExpandableText/index.js +2 -2
- package/dist/esm/components/MaskedField/MaskedField.js +2 -2
- package/dist/esm/components/MaskedField/index.js +2 -2
- package/dist/esm/components/NumberField/NumberField.js +2 -2
- package/dist/esm/components/NumberField/index.js +2 -2
- package/dist/esm/components/PasswordField/PasswordField.js +2 -2
- package/dist/esm/components/PasswordField/ShowHideButton.js +2 -2
- package/dist/esm/components/PasswordField/index.js +2 -2
- package/dist/esm/components/Radio/Radio.js +2 -2
- package/dist/esm/components/Radio/RadioGroup.js +2 -2
- package/dist/esm/components/Radio/index.js +2 -2
- package/dist/esm/components/Select/Select.js +2 -2
- package/dist/esm/components/Select/index.js +2 -2
- package/dist/esm/components/TextArea/TextArea.js +2 -2
- package/dist/esm/components/TextArea/index.js +2 -2
- package/dist/esm/components/TextField/TextField.js +2 -2
- package/dist/esm/components/TextField/index.js +2 -2
- package/dist/esm/components/index.js +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/meta.json +164 -131
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/AddressLookup/AddressLookup.test.tsx +76 -0
- package/src/components/AddressLookup/AddressLookup.tsx +9 -0
- package/src/components/Alert/Alert.tsx +10 -1
- package/src/components/Drawer/Drawer.css +24 -3
- package/src/components/Modal/Modal.css +42 -3
- package/dist/esm/chunk-C4BILMFX.js.map +0 -7
- package/dist/esm/chunk-FTSJNY4J.js.map +0 -7
|
@@ -2198,6 +2198,10 @@ var init_AddressLookup = __esm({
|
|
|
2198
2198
|
);
|
|
2199
2199
|
const handleSelected = (selected) => {
|
|
2200
2200
|
setError(null);
|
|
2201
|
+
const isEmpty = typeof selected === "string" ? selected === "" : !selected.id && !selected.value;
|
|
2202
|
+
if (isEmpty) {
|
|
2203
|
+
return Promise.resolve();
|
|
2204
|
+
}
|
|
2201
2205
|
if (typeof selected === "string" || !selected.id) {
|
|
2202
2206
|
setError(new Error("Selected option missing id"));
|
|
2203
2207
|
return Promise.resolve();
|
|
@@ -2245,19 +2249,98 @@ var init_AddressLookup2 = __esm({
|
|
|
2245
2249
|
}
|
|
2246
2250
|
});
|
|
2247
2251
|
|
|
2252
|
+
// src/components/Text/Text.tsx
|
|
2253
|
+
var import_dedupe15, import_Text, import_jsx_runtime16, getElementType, Text;
|
|
2254
|
+
var init_Text = __esm({
|
|
2255
|
+
"src/components/Text/Text.tsx"() {
|
|
2256
|
+
"use strict";
|
|
2257
|
+
import_dedupe15 = __toESM(require("classnames/dedupe"));
|
|
2258
|
+
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
2259
|
+
import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2260
|
+
getElementType = (variant, elementType) => {
|
|
2261
|
+
if (variant) {
|
|
2262
|
+
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
2263
|
+
}
|
|
2264
|
+
return elementType || "p";
|
|
2265
|
+
};
|
|
2266
|
+
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
2267
|
+
const { variant, className, spacing, ...otherProps } = props;
|
|
2268
|
+
const elementType = getElementType(variant, Component);
|
|
2269
|
+
const variantType = variant || elementType;
|
|
2270
|
+
const classes = (0, import_dedupe15.default)(
|
|
2271
|
+
"mobius",
|
|
2272
|
+
"mobius-text",
|
|
2273
|
+
{ [`--is-${variantType}`]: variantType },
|
|
2274
|
+
{ [`--has-line-height-${spacing}`]: spacing },
|
|
2275
|
+
className
|
|
2276
|
+
);
|
|
2277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
2278
|
+
};
|
|
2279
|
+
Text.displayName = "Text";
|
|
2280
|
+
}
|
|
2281
|
+
});
|
|
2282
|
+
|
|
2283
|
+
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
2284
|
+
var import_react15, import_jsx_runtime17, isHTML, TextOrHTML;
|
|
2285
|
+
var init_TextOrHTML = __esm({
|
|
2286
|
+
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
2287
|
+
"use strict";
|
|
2288
|
+
import_react15 = require("react");
|
|
2289
|
+
init_Text();
|
|
2290
|
+
import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2291
|
+
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
2292
|
+
TextOrHTML = ({
|
|
2293
|
+
ref,
|
|
2294
|
+
text,
|
|
2295
|
+
htmlClassName,
|
|
2296
|
+
htmlElementType,
|
|
2297
|
+
textWrapper = false,
|
|
2298
|
+
autoDetect = false,
|
|
2299
|
+
...textProps
|
|
2300
|
+
}) => {
|
|
2301
|
+
const textIsHTML = autoDetect && isHTML(text);
|
|
2302
|
+
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
2303
|
+
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
2304
|
+
const DangerousComponent = resolvedElementType;
|
|
2305
|
+
const dangerousHTML = (0, import_react15.useMemo)(() => ({ __html: text }), [text]);
|
|
2306
|
+
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2307
|
+
DangerousComponent,
|
|
2308
|
+
{
|
|
2309
|
+
className: htmlClassName,
|
|
2310
|
+
dangerouslySetInnerHTML: dangerousHTML
|
|
2311
|
+
}
|
|
2312
|
+
);
|
|
2313
|
+
if (shouldWrapInText) {
|
|
2314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
2315
|
+
}
|
|
2316
|
+
return dangerousElement;
|
|
2317
|
+
};
|
|
2318
|
+
TextOrHTML.displayName = "TextOrHTML";
|
|
2319
|
+
}
|
|
2320
|
+
});
|
|
2321
|
+
|
|
2322
|
+
// src/components/TextOrHTML/index.tsx
|
|
2323
|
+
var init_TextOrHTML2 = __esm({
|
|
2324
|
+
"src/components/TextOrHTML/index.tsx"() {
|
|
2325
|
+
"use strict";
|
|
2326
|
+
init_TextOrHTML();
|
|
2327
|
+
}
|
|
2328
|
+
});
|
|
2329
|
+
|
|
2248
2330
|
// src/components/Alert/Alert.tsx
|
|
2249
2331
|
function isAlertVariant(value) {
|
|
2250
2332
|
return value === "info" || value === "success" || value === "warning" || value === "error";
|
|
2251
2333
|
}
|
|
2252
|
-
var import_icons4,
|
|
2334
|
+
var import_icons4, import_dedupe16, import_Alert, import_jsx_runtime18, Alert;
|
|
2253
2335
|
var init_Alert = __esm({
|
|
2254
2336
|
"src/components/Alert/Alert.tsx"() {
|
|
2255
2337
|
"use strict";
|
|
2256
2338
|
import_icons4 = require("@simplybusiness/icons");
|
|
2257
|
-
|
|
2339
|
+
import_dedupe16 = __toESM(require("classnames/dedupe"));
|
|
2258
2340
|
init_Icon2();
|
|
2341
|
+
init_TextOrHTML2();
|
|
2259
2342
|
import_Alert = require("@simplybusiness/mobius/src/components/Alert/Alert.css");
|
|
2260
|
-
|
|
2343
|
+
import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2261
2344
|
Alert = ({ ref, ...props }) => {
|
|
2262
2345
|
const {
|
|
2263
2346
|
elementType: Element = "div",
|
|
@@ -2270,7 +2353,7 @@ var init_Alert = __esm({
|
|
|
2270
2353
|
if (!show) return null;
|
|
2271
2354
|
const variant = variantProp && isAlertVariant(variantProp) ? variantProp : "info";
|
|
2272
2355
|
const colorValue = variant === "success" ? `var(--color-valid)` : `var(--color-${variant})`;
|
|
2273
|
-
const classes = (0,
|
|
2356
|
+
const classes = (0, import_dedupe16.default)(
|
|
2274
2357
|
"mobius",
|
|
2275
2358
|
"mobius-alert",
|
|
2276
2359
|
{
|
|
@@ -2288,14 +2371,23 @@ var init_Alert = __esm({
|
|
|
2288
2371
|
warning: import_icons4.warning,
|
|
2289
2372
|
error: import_icons4.error
|
|
2290
2373
|
};
|
|
2291
|
-
const headerClasses = (0,
|
|
2292
|
-
const iconClasses = (0,
|
|
2293
|
-
const contentClasses = (0,
|
|
2294
|
-
return /* @__PURE__ */ (0,
|
|
2295
|
-
/* @__PURE__ */ (0,
|
|
2296
|
-
/* @__PURE__ */ (0,
|
|
2297
|
-
header && /* @__PURE__ */ (0,
|
|
2298
|
-
|
|
2374
|
+
const headerClasses = (0, import_dedupe16.default)("mobius", "mobius-alert__header");
|
|
2375
|
+
const iconClasses = (0, import_dedupe16.default)("mobius", "mobius-alert__icon");
|
|
2376
|
+
const contentClasses = (0, import_dedupe16.default)("mobius", "mobius-alert__content");
|
|
2377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Element, { ref, role: "alert", ...otherProps, className: classes, children: [
|
|
2378
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { icon: icon[variant], color: colorValue }) }),
|
|
2379
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
2380
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2381
|
+
TextOrHTML,
|
|
2382
|
+
{
|
|
2383
|
+
autoDetect: true,
|
|
2384
|
+
htmlElementType: "span",
|
|
2385
|
+
className: headerClasses,
|
|
2386
|
+
htmlClassName: headerClasses,
|
|
2387
|
+
text: header
|
|
2388
|
+
}
|
|
2389
|
+
),
|
|
2390
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: contentClasses, children })
|
|
2299
2391
|
] })
|
|
2300
2392
|
] });
|
|
2301
2393
|
};
|
|
@@ -2312,14 +2404,14 @@ var init_Alert2 = __esm({
|
|
|
2312
2404
|
});
|
|
2313
2405
|
|
|
2314
2406
|
// src/components/Box/Box.tsx
|
|
2315
|
-
var
|
|
2407
|
+
var import_dedupe17, import_Box, import_jsx_runtime19, Box;
|
|
2316
2408
|
var init_Box = __esm({
|
|
2317
2409
|
"src/components/Box/Box.tsx"() {
|
|
2318
2410
|
"use strict";
|
|
2319
|
-
|
|
2411
|
+
import_dedupe17 = __toESM(require("classnames/dedupe"));
|
|
2320
2412
|
init_utils();
|
|
2321
2413
|
import_Box = require("@simplybusiness/mobius/src/components/Box/Box.css");
|
|
2322
|
-
|
|
2414
|
+
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2323
2415
|
Box = ({ ref, ...props }) => {
|
|
2324
2416
|
const {
|
|
2325
2417
|
elementType: Element = "div",
|
|
@@ -2345,7 +2437,7 @@ var init_Box = __esm({
|
|
|
2345
2437
|
style,
|
|
2346
2438
|
...otherProps
|
|
2347
2439
|
} = props;
|
|
2348
|
-
const classes = (0,
|
|
2440
|
+
const classes = (0, import_dedupe17.default)("mobius", "mobius-box", otherProps.className);
|
|
2349
2441
|
const styleProps = filterUndefinedProps({
|
|
2350
2442
|
padding: getSpacingValue(padding),
|
|
2351
2443
|
paddingInline: getSpacingValue(paddingInline || paddingX),
|
|
@@ -2362,7 +2454,7 @@ var init_Box = __esm({
|
|
|
2362
2454
|
height,
|
|
2363
2455
|
...style
|
|
2364
2456
|
});
|
|
2365
|
-
return /* @__PURE__ */ (0,
|
|
2457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Element, { ref, style: styleProps, ...otherProps, className: classes });
|
|
2366
2458
|
};
|
|
2367
2459
|
Box.displayName = "Box";
|
|
2368
2460
|
}
|
|
@@ -2377,27 +2469,27 @@ var init_Box2 = __esm({
|
|
|
2377
2469
|
});
|
|
2378
2470
|
|
|
2379
2471
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
2380
|
-
var
|
|
2472
|
+
var import_react16, import_dedupe18, import_Breadcrumbs, import_jsx_runtime20, Breadcrumbs;
|
|
2381
2473
|
var init_Breadcrumbs = __esm({
|
|
2382
2474
|
"src/components/Breadcrumbs/Breadcrumbs.tsx"() {
|
|
2383
2475
|
"use strict";
|
|
2384
2476
|
"use client";
|
|
2385
|
-
|
|
2386
|
-
|
|
2477
|
+
import_react16 = require("react");
|
|
2478
|
+
import_dedupe18 = __toESM(require("classnames/dedupe"));
|
|
2387
2479
|
import_Breadcrumbs = require("@simplybusiness/mobius/src/components/Breadcrumbs/Breadcrumbs.css");
|
|
2388
|
-
|
|
2480
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2389
2481
|
Breadcrumbs = ({ ref, ...props }) => {
|
|
2390
2482
|
const { "aria-label": ariaLabel = "Breadcrumbs" } = props;
|
|
2391
2483
|
const { navProps } = { navProps: { "aria-label": ariaLabel } };
|
|
2392
2484
|
const { children, ...otherProps } = props;
|
|
2393
|
-
const childArray =
|
|
2394
|
-
const classes = (0,
|
|
2485
|
+
const childArray = import_react16.Children.toArray(children);
|
|
2486
|
+
const classes = (0, import_dedupe18.default)(
|
|
2395
2487
|
"mobius",
|
|
2396
2488
|
"mobius-breadcrumb",
|
|
2397
2489
|
otherProps.className
|
|
2398
2490
|
);
|
|
2399
|
-
return /* @__PURE__ */ (0,
|
|
2400
|
-
(child, i) => (0,
|
|
2491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("nav", { ref, ...otherProps, ...navProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("ul", { children: childArray.map(
|
|
2492
|
+
(child, i) => (0, import_react16.cloneElement)(
|
|
2401
2493
|
child,
|
|
2402
2494
|
{
|
|
2403
2495
|
key: i,
|
|
@@ -2411,22 +2503,22 @@ var init_Breadcrumbs = __esm({
|
|
|
2411
2503
|
});
|
|
2412
2504
|
|
|
2413
2505
|
// src/components/Breadcrumbs/BreadcrumbItem.tsx
|
|
2414
|
-
var
|
|
2506
|
+
var import_react17, import_dedupe19, import_jsx_runtime21, BreadcrumbItem;
|
|
2415
2507
|
var init_BreadcrumbItem = __esm({
|
|
2416
2508
|
"src/components/Breadcrumbs/BreadcrumbItem.tsx"() {
|
|
2417
2509
|
"use strict";
|
|
2418
2510
|
"use client";
|
|
2419
|
-
|
|
2420
|
-
|
|
2511
|
+
import_react17 = require("react");
|
|
2512
|
+
import_dedupe19 = __toESM(require("classnames/dedupe"));
|
|
2421
2513
|
init_Box2();
|
|
2422
|
-
|
|
2514
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2423
2515
|
BreadcrumbItem = ({ ref, ...props }) => {
|
|
2424
2516
|
const {
|
|
2425
2517
|
isDisabled = false,
|
|
2426
2518
|
isCurrent = false,
|
|
2427
2519
|
"aria-current": ariaCurrent = "page",
|
|
2428
2520
|
children,
|
|
2429
|
-
separator = /* @__PURE__ */ (0,
|
|
2521
|
+
separator = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box, { className: "mobius-breadcrumb__separator", "aria-hidden": "true", children: ">" }),
|
|
2430
2522
|
...otherProps
|
|
2431
2523
|
} = props;
|
|
2432
2524
|
const { itemProps } = {
|
|
@@ -2436,14 +2528,14 @@ var init_BreadcrumbItem = __esm({
|
|
|
2436
2528
|
...otherProps
|
|
2437
2529
|
}
|
|
2438
2530
|
};
|
|
2439
|
-
const classes = (0,
|
|
2531
|
+
const classes = (0, import_dedupe19.default)(
|
|
2440
2532
|
"mobius",
|
|
2441
2533
|
"mobius-breadcrumb__item",
|
|
2442
2534
|
props.className
|
|
2443
2535
|
);
|
|
2444
|
-
const child = typeof children === "string" ? /* @__PURE__ */ (0,
|
|
2445
|
-
return /* @__PURE__ */ (0,
|
|
2446
|
-
(0,
|
|
2536
|
+
const child = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { ...itemProps, children }) : import_react17.Children.only(children);
|
|
2537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("li", { className: classes, children: [
|
|
2538
|
+
(0, import_react17.cloneElement)(child, {
|
|
2447
2539
|
...child.props,
|
|
2448
2540
|
...itemProps,
|
|
2449
2541
|
ref
|
|
@@ -2465,19 +2557,19 @@ var init_Breadcrumbs2 = __esm({
|
|
|
2465
2557
|
});
|
|
2466
2558
|
|
|
2467
2559
|
// src/components/Button/Loading.tsx
|
|
2468
|
-
var import_icons5,
|
|
2560
|
+
var import_icons5, import_jsx_runtime22, Loading;
|
|
2469
2561
|
var init_Loading = __esm({
|
|
2470
2562
|
"src/components/Button/Loading.tsx"() {
|
|
2471
2563
|
"use strict";
|
|
2472
2564
|
import_icons5 = require("@simplybusiness/icons");
|
|
2473
2565
|
init_Icon2();
|
|
2474
2566
|
init_VisuallyHidden2();
|
|
2475
|
-
|
|
2567
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2476
2568
|
Loading = (props) => {
|
|
2477
2569
|
const { children } = props;
|
|
2478
|
-
return /* @__PURE__ */ (0,
|
|
2479
|
-
/* @__PURE__ */ (0,
|
|
2480
|
-
/* @__PURE__ */ (0,
|
|
2570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
2571
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "mobius-button__icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { icon: import_icons5.loading, spin: true, size: "md" }) }),
|
|
2572
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(VisuallyHidden, { className: "mobius-button__loading-text", children: "Loading" }),
|
|
2481
2573
|
children
|
|
2482
2574
|
] });
|
|
2483
2575
|
};
|
|
@@ -2485,33 +2577,33 @@ var init_Loading = __esm({
|
|
|
2485
2577
|
});
|
|
2486
2578
|
|
|
2487
2579
|
// src/components/Button/Success.tsx
|
|
2488
|
-
var import_icons6,
|
|
2580
|
+
var import_icons6, import_jsx_runtime23, Success;
|
|
2489
2581
|
var init_Success = __esm({
|
|
2490
2582
|
"src/components/Button/Success.tsx"() {
|
|
2491
2583
|
"use strict";
|
|
2492
2584
|
import_icons6 = require("@simplybusiness/icons");
|
|
2493
2585
|
init_Icon2();
|
|
2494
2586
|
init_VisuallyHidden2();
|
|
2495
|
-
|
|
2496
|
-
Success = () => /* @__PURE__ */ (0,
|
|
2497
|
-
/* @__PURE__ */ (0,
|
|
2498
|
-
/* @__PURE__ */ (0,
|
|
2587
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2588
|
+
Success = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
2589
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "mobius-button__icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { icon: import_icons6.tick, size: "md" }) }),
|
|
2590
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(VisuallyHidden, { className: "mobius-button__success-text", children: "Success" })
|
|
2499
2591
|
] });
|
|
2500
2592
|
}
|
|
2501
2593
|
});
|
|
2502
2594
|
|
|
2503
2595
|
// src/components/Button/Button.tsx
|
|
2504
|
-
var
|
|
2596
|
+
var import_dedupe20, import_Button, import_jsx_runtime24, Button;
|
|
2505
2597
|
var init_Button = __esm({
|
|
2506
2598
|
"src/components/Button/Button.tsx"() {
|
|
2507
2599
|
"use strict";
|
|
2508
2600
|
"use client";
|
|
2509
|
-
|
|
2601
|
+
import_dedupe20 = __toESM(require("classnames/dedupe"));
|
|
2510
2602
|
init_Loading();
|
|
2511
2603
|
init_useButton2();
|
|
2512
2604
|
init_Success();
|
|
2513
2605
|
import_Button = require("@simplybusiness/mobius/src/components/Button/Button.css");
|
|
2514
|
-
|
|
2606
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2515
2607
|
Button = ({ ref, ...props }) => {
|
|
2516
2608
|
const {
|
|
2517
2609
|
children,
|
|
@@ -2526,7 +2618,7 @@ var init_Button = __esm({
|
|
|
2526
2618
|
...otherProps
|
|
2527
2619
|
} = props;
|
|
2528
2620
|
const { buttonProps } = useButton(props);
|
|
2529
|
-
otherProps.className = (0,
|
|
2621
|
+
otherProps.className = (0, import_dedupe20.default)(
|
|
2530
2622
|
"mobius",
|
|
2531
2623
|
"mobius-button",
|
|
2532
2624
|
`--variant-${variant}`,
|
|
@@ -2538,9 +2630,9 @@ var init_Button = __esm({
|
|
|
2538
2630
|
},
|
|
2539
2631
|
otherProps.className
|
|
2540
2632
|
);
|
|
2541
|
-
return /* @__PURE__ */ (0,
|
|
2542
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
2543
|
-
isSuccess && !isLoading && /* @__PURE__ */ (0,
|
|
2633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Component, { ref, ...buttonProps, ...otherProps, children: [
|
|
2634
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Loading, { children }) : children,
|
|
2635
|
+
isSuccess && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Success, {})
|
|
2544
2636
|
] });
|
|
2545
2637
|
};
|
|
2546
2638
|
Button.displayName = "Button";
|
|
@@ -2556,13 +2648,13 @@ var init_Button2 = __esm({
|
|
|
2556
2648
|
});
|
|
2557
2649
|
|
|
2558
2650
|
// src/components/Checkbox/Checkbox.tsx
|
|
2559
|
-
var
|
|
2651
|
+
var import_react18, import_dedupe21, import_icons7, import_Checkbox, import_jsx_runtime25, Checkbox;
|
|
2560
2652
|
var init_Checkbox = __esm({
|
|
2561
2653
|
"src/components/Checkbox/Checkbox.tsx"() {
|
|
2562
2654
|
"use strict";
|
|
2563
2655
|
"use client";
|
|
2564
|
-
|
|
2565
|
-
|
|
2656
|
+
import_react18 = require("react");
|
|
2657
|
+
import_dedupe21 = __toESM(require("classnames/dedupe"));
|
|
2566
2658
|
import_icons7 = require("@simplybusiness/icons");
|
|
2567
2659
|
init_ErrorMessage2();
|
|
2568
2660
|
init_spaceDelimitedList();
|
|
@@ -2570,7 +2662,7 @@ var init_Checkbox = __esm({
|
|
|
2570
2662
|
init_Icon2();
|
|
2571
2663
|
init_Stack2();
|
|
2572
2664
|
import_Checkbox = require("@simplybusiness/mobius/src/components/Checkbox/Checkbox.css");
|
|
2573
|
-
|
|
2665
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2574
2666
|
Checkbox = ({ ref, ...props }) => {
|
|
2575
2667
|
const {
|
|
2576
2668
|
id,
|
|
@@ -2590,18 +2682,18 @@ var init_Checkbox = __esm({
|
|
|
2590
2682
|
["aria-describedby"]: ariaDescribedBy,
|
|
2591
2683
|
...rest
|
|
2592
2684
|
} = props;
|
|
2593
|
-
const [checked, setChecked] = (0,
|
|
2594
|
-
const fallbackRef = (0,
|
|
2685
|
+
const [checked, setChecked] = (0, import_react18.useState)(defaultSelected);
|
|
2686
|
+
const fallbackRef = (0, import_react18.useRef)(null);
|
|
2595
2687
|
const refObj = ref || fallbackRef;
|
|
2596
|
-
const inputId = (0,
|
|
2688
|
+
const inputId = (0, import_react18.useId)();
|
|
2597
2689
|
const isControlled = typeof selected === "boolean";
|
|
2598
|
-
(0,
|
|
2690
|
+
(0, import_react18.useEffect)(() => {
|
|
2599
2691
|
if (isControlled) {
|
|
2600
2692
|
setChecked(selected);
|
|
2601
2693
|
}
|
|
2602
2694
|
}, [selected, isControlled]);
|
|
2603
2695
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
2604
|
-
const sharedClasses = (0,
|
|
2696
|
+
const sharedClasses = (0, import_dedupe21.default)(
|
|
2605
2697
|
{
|
|
2606
2698
|
"--is-disabled": isDisabled,
|
|
2607
2699
|
"--is-selected": checked,
|
|
@@ -2610,31 +2702,31 @@ var init_Checkbox = __esm({
|
|
|
2610
2702
|
},
|
|
2611
2703
|
validationClasses
|
|
2612
2704
|
);
|
|
2613
|
-
const wrapperClasses = (0,
|
|
2705
|
+
const wrapperClasses = (0, import_dedupe21.default)(
|
|
2614
2706
|
"mobius",
|
|
2615
2707
|
"mobius-checkbox",
|
|
2616
2708
|
sharedClasses,
|
|
2617
2709
|
className
|
|
2618
2710
|
);
|
|
2619
|
-
const labelClasses = (0,
|
|
2620
|
-
const inputClasses = (0,
|
|
2621
|
-
const iconClasses = (0,
|
|
2622
|
-
const errorMessageId = (0,
|
|
2711
|
+
const labelClasses = (0, import_dedupe21.default)("mobius-checkbox__label", sharedClasses);
|
|
2712
|
+
const inputClasses = (0, import_dedupe21.default)("mobius-checkbox__input", sharedClasses);
|
|
2713
|
+
const iconClasses = (0, import_dedupe21.default)("mobius-checkbox__icon", sharedClasses);
|
|
2714
|
+
const errorMessageId = (0, import_react18.useId)();
|
|
2623
2715
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
2624
2716
|
const describedBy = spaceDelimitedList([
|
|
2625
2717
|
shouldErrorMessageShow,
|
|
2626
2718
|
ariaDescribedBy
|
|
2627
2719
|
]);
|
|
2628
|
-
const labelId = (0,
|
|
2720
|
+
const labelId = (0, import_react18.useId)();
|
|
2629
2721
|
const handleChange = (event) => {
|
|
2630
2722
|
setChecked(!checked);
|
|
2631
2723
|
if (onChange) {
|
|
2632
2724
|
onChange(event, isLastItem);
|
|
2633
2725
|
}
|
|
2634
2726
|
};
|
|
2635
|
-
return /* @__PURE__ */ (0,
|
|
2636
|
-
/* @__PURE__ */ (0,
|
|
2637
|
-
/* @__PURE__ */ (0,
|
|
2727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Stack, { gap: "xs", className: wrapperClasses, children: [
|
|
2728
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: labelClasses, children: [
|
|
2729
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2638
2730
|
"input",
|
|
2639
2731
|
{
|
|
2640
2732
|
"aria-describedby": describedBy,
|
|
@@ -2655,7 +2747,7 @@ var init_Checkbox = __esm({
|
|
|
2655
2747
|
...rest
|
|
2656
2748
|
}
|
|
2657
2749
|
),
|
|
2658
|
-
/* @__PURE__ */ (0,
|
|
2750
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2659
2751
|
Icon,
|
|
2660
2752
|
{
|
|
2661
2753
|
icon: checked ? import_icons7.squareTick : import_icons7.square,
|
|
@@ -2663,9 +2755,9 @@ var init_Checkbox = __esm({
|
|
|
2663
2755
|
className: iconClasses
|
|
2664
2756
|
}
|
|
2665
2757
|
),
|
|
2666
|
-
/* @__PURE__ */ (0,
|
|
2758
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { id: labelId, className: "mobius-checkbox__visible-label", children: label })
|
|
2667
2759
|
] }),
|
|
2668
|
-
/* @__PURE__ */ (0,
|
|
2760
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
2669
2761
|
] });
|
|
2670
2762
|
};
|
|
2671
2763
|
Checkbox.displayName = "Checkbox";
|
|
@@ -2673,20 +2765,20 @@ var init_Checkbox = __esm({
|
|
|
2673
2765
|
});
|
|
2674
2766
|
|
|
2675
2767
|
// src/components/Checkbox/CheckboxGroup.tsx
|
|
2676
|
-
var
|
|
2768
|
+
var import_dedupe22, import_react19, import_CheckboxGroup, import_jsx_runtime26, CheckboxGroup;
|
|
2677
2769
|
var init_CheckboxGroup = __esm({
|
|
2678
2770
|
"src/components/Checkbox/CheckboxGroup.tsx"() {
|
|
2679
2771
|
"use strict";
|
|
2680
2772
|
"use client";
|
|
2681
|
-
|
|
2682
|
-
|
|
2773
|
+
import_dedupe22 = __toESM(require("classnames/dedupe"));
|
|
2774
|
+
import_react19 = require("react");
|
|
2683
2775
|
init_hooks();
|
|
2684
2776
|
init_spaceDelimitedList();
|
|
2685
2777
|
init_ErrorMessage2();
|
|
2686
2778
|
init_Label2();
|
|
2687
2779
|
init_Checkbox();
|
|
2688
2780
|
import_CheckboxGroup = require("@simplybusiness/mobius/src/components/Checkbox/CheckboxGroup.css");
|
|
2689
|
-
|
|
2781
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2690
2782
|
CheckboxGroup = ({ ref, ...props }) => {
|
|
2691
2783
|
const {
|
|
2692
2784
|
label,
|
|
@@ -2704,10 +2796,10 @@ var init_CheckboxGroup = __esm({
|
|
|
2704
2796
|
lastItemDisables = false,
|
|
2705
2797
|
...rest
|
|
2706
2798
|
} = props;
|
|
2707
|
-
const [selected, setSelected] = (0,
|
|
2708
|
-
const isInitializedRef = (0,
|
|
2709
|
-
const prevDefaultValueRef = (0,
|
|
2710
|
-
(0,
|
|
2799
|
+
const [selected, setSelected] = (0, import_react19.useState)(defaultValue);
|
|
2800
|
+
const isInitializedRef = (0, import_react19.useRef)(false);
|
|
2801
|
+
const prevDefaultValueRef = (0, import_react19.useRef)(defaultValue);
|
|
2802
|
+
(0, import_react19.useEffect)(() => {
|
|
2711
2803
|
const hasChanged = defaultValue.length !== prevDefaultValueRef.current.length || defaultValue.some(
|
|
2712
2804
|
(val, index) => val !== prevDefaultValueRef.current[index]
|
|
2713
2805
|
);
|
|
@@ -2717,7 +2809,7 @@ var init_CheckboxGroup = __esm({
|
|
|
2717
2809
|
isInitializedRef.current = true;
|
|
2718
2810
|
}
|
|
2719
2811
|
}, [defaultValue]);
|
|
2720
|
-
const checkboxGroupClasses = (0,
|
|
2812
|
+
const checkboxGroupClasses = (0, import_dedupe22.default)(
|
|
2721
2813
|
"mobius",
|
|
2722
2814
|
"mobius-checkbox-group",
|
|
2723
2815
|
className,
|
|
@@ -2729,19 +2821,19 @@ var init_CheckboxGroup = __esm({
|
|
|
2729
2821
|
}
|
|
2730
2822
|
);
|
|
2731
2823
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
2732
|
-
const labelClasses = (0,
|
|
2824
|
+
const labelClasses = (0, import_dedupe22.default)(
|
|
2733
2825
|
{
|
|
2734
2826
|
"--is-disabled": isDisabled
|
|
2735
2827
|
},
|
|
2736
2828
|
validationClasses
|
|
2737
2829
|
);
|
|
2738
|
-
const errorMessageId = (0,
|
|
2830
|
+
const errorMessageId = (0, import_react19.useId)();
|
|
2739
2831
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
2740
2832
|
const describedBy = spaceDelimitedList([
|
|
2741
2833
|
shouldErrorMessageShow,
|
|
2742
2834
|
props["aria-describedby"]
|
|
2743
2835
|
]);
|
|
2744
|
-
const labelId = (0,
|
|
2836
|
+
const labelId = (0, import_react19.useId)();
|
|
2745
2837
|
const handleChange = (event, isLastItem = false) => {
|
|
2746
2838
|
const {
|
|
2747
2839
|
target: { value, checked }
|
|
@@ -2759,12 +2851,12 @@ var init_CheckboxGroup = __esm({
|
|
|
2759
2851
|
setSelected(newValue);
|
|
2760
2852
|
onChange?.(newValue);
|
|
2761
2853
|
};
|
|
2762
|
-
const childrenArray =
|
|
2854
|
+
const childrenArray = import_react19.Children.toArray(children);
|
|
2763
2855
|
const lastCheckbox = childrenArray.filter(
|
|
2764
|
-
(child) => (0,
|
|
2856
|
+
(child) => (0, import_react19.isValidElement)(child) && child.type === Checkbox
|
|
2765
2857
|
).pop();
|
|
2766
2858
|
const lastCheckboxIsChecked = lastCheckbox && selected.includes(lastCheckbox.props.value);
|
|
2767
|
-
return /* @__PURE__ */ (0,
|
|
2859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2768
2860
|
"div",
|
|
2769
2861
|
{
|
|
2770
2862
|
...rest,
|
|
@@ -2773,16 +2865,16 @@ var init_CheckboxGroup = __esm({
|
|
|
2773
2865
|
className: checkboxGroupClasses,
|
|
2774
2866
|
role: "group",
|
|
2775
2867
|
style: {
|
|
2776
|
-
"--checkbox-items-per-row": itemsPerRow ||
|
|
2868
|
+
"--checkbox-items-per-row": itemsPerRow || import_react19.Children.count(children)
|
|
2777
2869
|
},
|
|
2778
2870
|
children: [
|
|
2779
|
-
label && /* @__PURE__ */ (0,
|
|
2780
|
-
/* @__PURE__ */ (0,
|
|
2781
|
-
if ((0,
|
|
2871
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Label, { elementType: "span", id: labelId, className: labelClasses, children: label }),
|
|
2872
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mobius-checkbox-group__wrapper", children: childrenArray.map((child) => {
|
|
2873
|
+
if ((0, import_react19.isValidElement)(child)) {
|
|
2782
2874
|
const isLastItem = child === lastCheckbox;
|
|
2783
2875
|
const isChildDisabled = isDisabled || lastItemDisables && lastCheckboxIsChecked && !isLastItem;
|
|
2784
2876
|
const childProps = child.props;
|
|
2785
|
-
return (0,
|
|
2877
|
+
return (0, import_react19.cloneElement)(
|
|
2786
2878
|
child,
|
|
2787
2879
|
{
|
|
2788
2880
|
isDisabled: isChildDisabled,
|
|
@@ -2798,7 +2890,7 @@ var init_CheckboxGroup = __esm({
|
|
|
2798
2890
|
}
|
|
2799
2891
|
return child;
|
|
2800
2892
|
}) }),
|
|
2801
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2893
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
2802
2894
|
]
|
|
2803
2895
|
}
|
|
2804
2896
|
);
|
|
@@ -2825,23 +2917,23 @@ var init_Checkbox2 = __esm({
|
|
|
2825
2917
|
});
|
|
2826
2918
|
|
|
2827
2919
|
// src/components/Container/Container.tsx
|
|
2828
|
-
var
|
|
2920
|
+
var import_dedupe23, import_Container, import_jsx_runtime27, Container;
|
|
2829
2921
|
var init_Container = __esm({
|
|
2830
2922
|
"src/components/Container/Container.tsx"() {
|
|
2831
2923
|
"use strict";
|
|
2832
|
-
|
|
2924
|
+
import_dedupe23 = __toESM(require("classnames/dedupe"));
|
|
2833
2925
|
init_utils();
|
|
2834
2926
|
import_Container = require("@simplybusiness/mobius/src/components/Container/Container.css");
|
|
2835
|
-
|
|
2927
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2836
2928
|
Container = ({ ref, ...props }) => {
|
|
2837
2929
|
const { elementType: Element = "div", size = "md", ...otherProps } = props;
|
|
2838
|
-
const classes = (0,
|
|
2930
|
+
const classes = (0, import_dedupe23.default)(
|
|
2839
2931
|
"mobius",
|
|
2840
2932
|
"mobius-container",
|
|
2841
2933
|
sizeClasses(size),
|
|
2842
2934
|
otherProps.className
|
|
2843
2935
|
);
|
|
2844
|
-
return /* @__PURE__ */ (0,
|
|
2936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
2845
2937
|
};
|
|
2846
2938
|
Container.displayName = "Container";
|
|
2847
2939
|
}
|
|
@@ -2894,17 +2986,17 @@ var init_validation = __esm({
|
|
|
2894
2986
|
});
|
|
2895
2987
|
|
|
2896
2988
|
// src/components/DateField/DateField.tsx
|
|
2897
|
-
var
|
|
2989
|
+
var import_dedupe24, import_react20, import_jsx_runtime28, MIN_MAX_ERROR, DateField;
|
|
2898
2990
|
var init_DateField = __esm({
|
|
2899
2991
|
"src/components/DateField/DateField.tsx"() {
|
|
2900
2992
|
"use strict";
|
|
2901
2993
|
"use client";
|
|
2902
|
-
|
|
2903
|
-
|
|
2994
|
+
import_dedupe24 = __toESM(require("classnames/dedupe"));
|
|
2995
|
+
import_react20 = require("react");
|
|
2904
2996
|
init_mergeRefs();
|
|
2905
2997
|
init_TextField2();
|
|
2906
2998
|
init_validation();
|
|
2907
|
-
|
|
2999
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2908
3000
|
MIN_MAX_ERROR = '"min" value should not be greater than "max" value.';
|
|
2909
3001
|
DateField = ({ ref, ...props }) => {
|
|
2910
3002
|
const {
|
|
@@ -2917,10 +3009,10 @@ var init_DateField = __esm({
|
|
|
2917
3009
|
value,
|
|
2918
3010
|
...otherProps
|
|
2919
3011
|
} = props;
|
|
2920
|
-
const [error3, setError] = (0,
|
|
2921
|
-
const [isInvalid, setIsInvalid] = (0,
|
|
2922
|
-
const localRef = (0,
|
|
2923
|
-
const classes = (0,
|
|
3012
|
+
const [error3, setError] = (0, import_react20.useState)(errorMessage);
|
|
3013
|
+
const [isInvalid, setIsInvalid] = (0, import_react20.useState)(void 0);
|
|
3014
|
+
const localRef = (0, import_react20.useRef)(null);
|
|
3015
|
+
const classes = (0, import_dedupe24.default)("mobius-date-field", className);
|
|
2924
3016
|
const formattedMin = min ? convertToDateFormat(min, format) : void 0;
|
|
2925
3017
|
const formattedMax = max ? convertToDateFormat(max, format) : void 0;
|
|
2926
3018
|
const formattedDefaultValue = defaultValue ? convertToDateFormat(defaultValue, format) : void 0;
|
|
@@ -2933,7 +3025,7 @@ var init_DateField = __esm({
|
|
|
2933
3025
|
setError(props.errorMessage);
|
|
2934
3026
|
setIsInvalid(false);
|
|
2935
3027
|
};
|
|
2936
|
-
(0,
|
|
3028
|
+
(0, import_react20.useEffect)(() => {
|
|
2937
3029
|
if (!isValidDate(min, format)) {
|
|
2938
3030
|
setInvalidState(`Invalid min date: ${min}`);
|
|
2939
3031
|
return;
|
|
@@ -2966,7 +3058,7 @@ var init_DateField = __esm({
|
|
|
2966
3058
|
validate();
|
|
2967
3059
|
otherProps.onBlur?.(event);
|
|
2968
3060
|
};
|
|
2969
|
-
return /* @__PURE__ */ (0,
|
|
3061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2970
3062
|
TextField,
|
|
2971
3063
|
{
|
|
2972
3064
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -2997,23 +3089,23 @@ var init_DateField2 = __esm({
|
|
|
2997
3089
|
});
|
|
2998
3090
|
|
|
2999
3091
|
// src/components/Drawer/Content.tsx
|
|
3000
|
-
var
|
|
3092
|
+
var import_jsx_runtime29, Content;
|
|
3001
3093
|
var init_Content = __esm({
|
|
3002
3094
|
"src/components/Drawer/Content.tsx"() {
|
|
3003
3095
|
"use strict";
|
|
3004
|
-
|
|
3005
|
-
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
3096
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3097
|
+
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ref, ...otherProps, className: "mobius-drawer__content", children });
|
|
3006
3098
|
Content.displayName = "Content";
|
|
3007
3099
|
}
|
|
3008
3100
|
});
|
|
3009
3101
|
|
|
3010
3102
|
// src/components/Drawer/DrawerContext.tsx
|
|
3011
|
-
var
|
|
3103
|
+
var import_react21, DrawerContext;
|
|
3012
3104
|
var init_DrawerContext = __esm({
|
|
3013
3105
|
"src/components/Drawer/DrawerContext.tsx"() {
|
|
3014
3106
|
"use strict";
|
|
3015
|
-
|
|
3016
|
-
DrawerContext = (0,
|
|
3107
|
+
import_react21 = require("react");
|
|
3108
|
+
DrawerContext = (0, import_react21.createContext)({
|
|
3017
3109
|
onClose: () => {
|
|
3018
3110
|
},
|
|
3019
3111
|
closeLabel: void 0,
|
|
@@ -3023,19 +3115,19 @@ var init_DrawerContext = __esm({
|
|
|
3023
3115
|
});
|
|
3024
3116
|
|
|
3025
3117
|
// src/components/Drawer/Drawer.tsx
|
|
3026
|
-
var
|
|
3118
|
+
var import_dedupe25, import_react22, import_Drawer, import_jsx_runtime30, TRANSITION_CSS_VARIABLE, Drawer;
|
|
3027
3119
|
var init_Drawer = __esm({
|
|
3028
3120
|
"src/components/Drawer/Drawer.tsx"() {
|
|
3029
3121
|
"use strict";
|
|
3030
3122
|
"use client";
|
|
3031
|
-
|
|
3032
|
-
|
|
3123
|
+
import_dedupe25 = __toESM(require("classnames/dedupe"));
|
|
3124
|
+
import_react22 = require("react");
|
|
3033
3125
|
init_hooks();
|
|
3034
3126
|
init_utils();
|
|
3035
3127
|
init_VisuallyHidden2();
|
|
3036
3128
|
init_DrawerContext();
|
|
3037
3129
|
import_Drawer = require("@simplybusiness/mobius/src/components/Drawer/Drawer.css");
|
|
3038
|
-
|
|
3130
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3039
3131
|
TRANSITION_CSS_VARIABLE = "--drawer-transition-duration";
|
|
3040
3132
|
Drawer = ({ ref, ...props }) => {
|
|
3041
3133
|
const {
|
|
@@ -3048,8 +3140,8 @@ var init_Drawer = __esm({
|
|
|
3048
3140
|
onClose,
|
|
3049
3141
|
children
|
|
3050
3142
|
} = props;
|
|
3051
|
-
const dialogRef = (0,
|
|
3052
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
3143
|
+
const dialogRef = (0, import_react22.useRef)(null);
|
|
3144
|
+
const [shouldTransition, setShouldTransition] = (0, import_react22.useState)(false);
|
|
3053
3145
|
const { close } = useDialog({
|
|
3054
3146
|
ref: dialogRef,
|
|
3055
3147
|
isOpen,
|
|
@@ -3060,9 +3152,9 @@ var init_Drawer = __esm({
|
|
|
3060
3152
|
CSSVariable: TRANSITION_CSS_VARIABLE
|
|
3061
3153
|
}
|
|
3062
3154
|
});
|
|
3063
|
-
const hiddenId = `dialog-screen-reader-announce-${(0,
|
|
3064
|
-
const headerId = `dialog-header-${(0,
|
|
3065
|
-
const dialogClasses = (0,
|
|
3155
|
+
const hiddenId = `dialog-screen-reader-announce-${(0, import_react22.useId)()}`;
|
|
3156
|
+
const headerId = `dialog-header-${(0, import_react22.useId)()}`;
|
|
3157
|
+
const dialogClasses = (0, import_dedupe25.default)(
|
|
3066
3158
|
"mobius",
|
|
3067
3159
|
"mobius-drawer",
|
|
3068
3160
|
`--${direction}`,
|
|
@@ -3071,10 +3163,10 @@ var init_Drawer = __esm({
|
|
|
3071
3163
|
"--should-transition": shouldTransition
|
|
3072
3164
|
}
|
|
3073
3165
|
);
|
|
3074
|
-
(0,
|
|
3166
|
+
(0, import_react22.useEffect)(() => {
|
|
3075
3167
|
setShouldTransition(supportsDialog());
|
|
3076
3168
|
}, []);
|
|
3077
|
-
const contextValue = (0,
|
|
3169
|
+
const contextValue = (0, import_react22.useMemo)(
|
|
3078
3170
|
() => ({
|
|
3079
3171
|
onClose: close,
|
|
3080
3172
|
closeLabel,
|
|
@@ -3082,18 +3174,18 @@ var init_Drawer = __esm({
|
|
|
3082
3174
|
}),
|
|
3083
3175
|
[close, closeLabel, headerId]
|
|
3084
3176
|
);
|
|
3085
|
-
return /* @__PURE__ */ (0,
|
|
3177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3086
3178
|
"dialog",
|
|
3087
3179
|
{
|
|
3088
|
-
id: (0,
|
|
3180
|
+
id: (0, import_react22.useId)(),
|
|
3089
3181
|
ref: mergeRefs([dialogRef, ref]),
|
|
3090
3182
|
onCancel: close,
|
|
3091
3183
|
className: dialogClasses,
|
|
3092
3184
|
"aria-describedby": hiddenId,
|
|
3093
3185
|
"aria-labelledby": headerId,
|
|
3094
3186
|
children: [
|
|
3095
|
-
/* @__PURE__ */ (0,
|
|
3096
|
-
/* @__PURE__ */ (0,
|
|
3187
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { id: hiddenId, children: announce }) }),
|
|
3188
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DrawerContext.Provider, { value: contextValue, children })
|
|
3097
3189
|
]
|
|
3098
3190
|
}
|
|
3099
3191
|
);
|
|
@@ -3103,21 +3195,21 @@ var init_Drawer = __esm({
|
|
|
3103
3195
|
});
|
|
3104
3196
|
|
|
3105
3197
|
// src/components/Drawer/useDrawer.ts
|
|
3106
|
-
var
|
|
3198
|
+
var import_react23, useDrawer;
|
|
3107
3199
|
var init_useDrawer = __esm({
|
|
3108
3200
|
"src/components/Drawer/useDrawer.ts"() {
|
|
3109
3201
|
"use strict";
|
|
3110
|
-
|
|
3202
|
+
import_react23 = require("react");
|
|
3111
3203
|
init_DrawerContext();
|
|
3112
3204
|
useDrawer = () => {
|
|
3113
|
-
const { onClose, closeLabel, headerId } = (0,
|
|
3205
|
+
const { onClose, closeLabel, headerId } = (0, import_react23.useContext)(DrawerContext);
|
|
3114
3206
|
return { onClose, closeLabel, headerId };
|
|
3115
3207
|
};
|
|
3116
3208
|
}
|
|
3117
3209
|
});
|
|
3118
3210
|
|
|
3119
3211
|
// src/components/Drawer/Header.tsx
|
|
3120
|
-
var import_icons8,
|
|
3212
|
+
var import_icons8, import_jsx_runtime31, Header;
|
|
3121
3213
|
var init_Header = __esm({
|
|
3122
3214
|
"src/components/Drawer/Header.tsx"() {
|
|
3123
3215
|
"use strict";
|
|
@@ -3125,12 +3217,12 @@ var init_Header = __esm({
|
|
|
3125
3217
|
init_Button2();
|
|
3126
3218
|
init_Icon2();
|
|
3127
3219
|
init_useDrawer();
|
|
3128
|
-
|
|
3220
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3129
3221
|
Header = ({ ref, children, ...otherProps }) => {
|
|
3130
3222
|
const { onClose, closeLabel, headerId } = useDrawer();
|
|
3131
|
-
return /* @__PURE__ */ (0,
|
|
3132
|
-
/* @__PURE__ */ (0,
|
|
3133
|
-
/* @__PURE__ */ (0,
|
|
3223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("header", { ref, ...otherProps, className: "mobius-drawer__header", children: [
|
|
3224
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h2", { id: headerId, children }),
|
|
3225
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3134
3226
|
Button,
|
|
3135
3227
|
{
|
|
3136
3228
|
"aria-label": "Close",
|
|
@@ -3139,7 +3231,7 @@ var init_Header = __esm({
|
|
|
3139
3231
|
className: "mobius-drawer__close",
|
|
3140
3232
|
size: "sm",
|
|
3141
3233
|
children: [
|
|
3142
|
-
/* @__PURE__ */ (0,
|
|
3234
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { icon: import_icons8.cross }),
|
|
3143
3235
|
" ",
|
|
3144
3236
|
closeLabel
|
|
3145
3237
|
]
|
|
@@ -3168,17 +3260,17 @@ var init_Drawer2 = __esm({
|
|
|
3168
3260
|
});
|
|
3169
3261
|
|
|
3170
3262
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
3171
|
-
var
|
|
3263
|
+
var import_react24, import_react_accessible_dropdown_menu_hook, import_dedupe26, import_DropdownMenu, import_jsx_runtime32, DropdownMenu;
|
|
3172
3264
|
var init_DropdownMenu = __esm({
|
|
3173
3265
|
"src/components/DropdownMenu/DropdownMenu.tsx"() {
|
|
3174
3266
|
"use strict";
|
|
3175
3267
|
"use client";
|
|
3176
|
-
|
|
3268
|
+
import_react24 = require("react");
|
|
3177
3269
|
import_react_accessible_dropdown_menu_hook = __toESM(require("react-accessible-dropdown-menu-hook"));
|
|
3178
|
-
|
|
3270
|
+
import_dedupe26 = __toESM(require("classnames/dedupe"));
|
|
3179
3271
|
init_Button2();
|
|
3180
3272
|
import_DropdownMenu = require("@simplybusiness/mobius/src/components/DropdownMenu/DropdownMenu.css");
|
|
3181
|
-
|
|
3273
|
+
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3182
3274
|
DropdownMenu = ({ ref, ...props }) => {
|
|
3183
3275
|
const {
|
|
3184
3276
|
elementType: Element = "nav",
|
|
@@ -3187,21 +3279,21 @@ var init_DropdownMenu = __esm({
|
|
|
3187
3279
|
children,
|
|
3188
3280
|
...otherProps
|
|
3189
3281
|
} = props;
|
|
3190
|
-
const [activeId, setActiveId] = (0,
|
|
3191
|
-
const numberOfItems =
|
|
3282
|
+
const [activeId, setActiveId] = (0, import_react24.useState)(null);
|
|
3283
|
+
const numberOfItems = import_react24.Children.count(children);
|
|
3192
3284
|
const {
|
|
3193
3285
|
buttonProps,
|
|
3194
3286
|
itemProps,
|
|
3195
3287
|
isOpen: open,
|
|
3196
3288
|
setIsOpen
|
|
3197
3289
|
} = (0, import_react_accessible_dropdown_menu_hook.default)(numberOfItems);
|
|
3198
|
-
const classes = (0,
|
|
3290
|
+
const classes = (0, import_dedupe26.default)(
|
|
3199
3291
|
"mobius",
|
|
3200
3292
|
"mobius-dropdown-menu",
|
|
3201
3293
|
otherProps.className
|
|
3202
3294
|
);
|
|
3203
|
-
const triggerClasses = (0,
|
|
3204
|
-
const listClasses = (0,
|
|
3295
|
+
const triggerClasses = (0, import_dedupe26.default)("mobius", "mobius-dropdown-menu__trigger");
|
|
3296
|
+
const listClasses = (0, import_dedupe26.default)("mobius", "mobius-dropdown-menu__list", {
|
|
3205
3297
|
"--is-open": open
|
|
3206
3298
|
});
|
|
3207
3299
|
const handleChildClick = ({ onClick }, index) => {
|
|
@@ -3211,16 +3303,16 @@ var init_DropdownMenu = __esm({
|
|
|
3211
3303
|
onClick();
|
|
3212
3304
|
}
|
|
3213
3305
|
};
|
|
3214
|
-
return /* @__PURE__ */ (0,
|
|
3215
|
-
trigger ? (0,
|
|
3306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Element, { ref, ...otherProps, className: classes, children: [
|
|
3307
|
+
trigger ? (0, import_react24.cloneElement)(trigger, {
|
|
3216
3308
|
className: triggerClasses,
|
|
3217
3309
|
open,
|
|
3218
3310
|
label,
|
|
3219
3311
|
...buttonProps
|
|
3220
|
-
}) : /* @__PURE__ */ (0,
|
|
3221
|
-
/* @__PURE__ */ (0,
|
|
3222
|
-
if ((0,
|
|
3223
|
-
return (0,
|
|
3312
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Button, { className: triggerClasses, ...buttonProps, children: label }),
|
|
3313
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { className: listClasses, role: "menu", children: import_react24.Children.map(children, (child, index) => {
|
|
3314
|
+
if ((0, import_react24.isValidElement)(child)) {
|
|
3315
|
+
return (0, import_react24.cloneElement)(child, {
|
|
3224
3316
|
onClick: () => handleChildClick(child.props, index),
|
|
3225
3317
|
active: index === activeId,
|
|
3226
3318
|
...itemProps[index]
|
|
@@ -3235,13 +3327,13 @@ var init_DropdownMenu = __esm({
|
|
|
3235
3327
|
});
|
|
3236
3328
|
|
|
3237
3329
|
// src/components/DropdownMenu/Item.tsx
|
|
3238
|
-
var
|
|
3330
|
+
var import_react25, import_dedupe27, import_jsx_runtime33, Item;
|
|
3239
3331
|
var init_Item = __esm({
|
|
3240
3332
|
"src/components/DropdownMenu/Item.tsx"() {
|
|
3241
3333
|
"use strict";
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3334
|
+
import_react25 = require("react");
|
|
3335
|
+
import_dedupe27 = __toESM(require("classnames/dedupe"));
|
|
3336
|
+
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3245
3337
|
Item = ({ ref, ...props }) => {
|
|
3246
3338
|
const {
|
|
3247
3339
|
elementType: Element = "li",
|
|
@@ -3250,26 +3342,26 @@ var init_Item = __esm({
|
|
|
3250
3342
|
children,
|
|
3251
3343
|
...otherProps
|
|
3252
3344
|
} = props;
|
|
3253
|
-
const classes = (0,
|
|
3345
|
+
const classes = (0, import_dedupe27.default)(
|
|
3254
3346
|
"mobius",
|
|
3255
3347
|
"mobius-dropdown-menu__item",
|
|
3256
3348
|
{ "--is-active": active },
|
|
3257
3349
|
otherProps.className
|
|
3258
3350
|
);
|
|
3259
|
-
return /* @__PURE__ */ (0,
|
|
3260
|
-
if ((0,
|
|
3261
|
-
const childClasses = (0,
|
|
3351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Element, { ref, onClick, ...otherProps, children: import_react25.Children.map(children, (child) => {
|
|
3352
|
+
if ((0, import_react25.isValidElement)(child)) {
|
|
3353
|
+
const childClasses = (0, import_dedupe27.default)(
|
|
3262
3354
|
child.props.className,
|
|
3263
3355
|
classes
|
|
3264
3356
|
);
|
|
3265
|
-
return (0,
|
|
3357
|
+
return (0, import_react25.cloneElement)(
|
|
3266
3358
|
child,
|
|
3267
3359
|
{
|
|
3268
3360
|
className: childClasses
|
|
3269
3361
|
}
|
|
3270
3362
|
);
|
|
3271
3363
|
}
|
|
3272
|
-
return /* @__PURE__ */ (0,
|
|
3364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: classes, children: child });
|
|
3273
3365
|
}) });
|
|
3274
3366
|
};
|
|
3275
3367
|
Item.displayName = "DropdownMenu.Item";
|
|
@@ -3294,23 +3386,23 @@ var init_DropdownMenu2 = __esm({
|
|
|
3294
3386
|
});
|
|
3295
3387
|
|
|
3296
3388
|
// src/components/Fieldset/Fieldset.tsx
|
|
3297
|
-
var
|
|
3389
|
+
var import_dedupe28, import_react26, import_Fieldset, import_jsx_runtime34, useFieldset, Fieldset;
|
|
3298
3390
|
var init_Fieldset = __esm({
|
|
3299
3391
|
"src/components/Fieldset/Fieldset.tsx"() {
|
|
3300
3392
|
"use strict";
|
|
3301
3393
|
"use client";
|
|
3302
|
-
|
|
3303
|
-
|
|
3394
|
+
import_dedupe28 = __toESM(require("classnames/dedupe"));
|
|
3395
|
+
import_react26 = require("react");
|
|
3304
3396
|
init_Flex2();
|
|
3305
3397
|
import_Fieldset = require("@simplybusiness/mobius/src/components/Fieldset/Fieldset.css");
|
|
3306
|
-
|
|
3398
|
+
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3307
3399
|
useFieldset = (props) => {
|
|
3308
3400
|
const { legend } = props;
|
|
3309
3401
|
let legendProps = {};
|
|
3310
3402
|
let containerProps = {
|
|
3311
3403
|
role: "group"
|
|
3312
3404
|
};
|
|
3313
|
-
const legendId = (0,
|
|
3405
|
+
const legendId = (0, import_react26.useId)();
|
|
3314
3406
|
if (legend) {
|
|
3315
3407
|
legendProps = {
|
|
3316
3408
|
...legendProps,
|
|
@@ -3330,14 +3422,14 @@ var init_Fieldset = __esm({
|
|
|
3330
3422
|
const {
|
|
3331
3423
|
children,
|
|
3332
3424
|
legend,
|
|
3333
|
-
legendComponent = /* @__PURE__ */ (0,
|
|
3425
|
+
legendComponent = /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("legend", {}),
|
|
3334
3426
|
...otherProps
|
|
3335
3427
|
} = props;
|
|
3336
3428
|
const { legendProps, containerProps } = useFieldset(props);
|
|
3337
|
-
const classes = (0,
|
|
3429
|
+
const classes = (0, import_dedupe28.default)("mobius", "mobius-fieldset", props.className);
|
|
3338
3430
|
legendProps.className = "mobius-fieldset__legend";
|
|
3339
|
-
return /* @__PURE__ */ (0,
|
|
3340
|
-
legend && (0,
|
|
3431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Flex, { ...containerProps, ...otherProps, className: classes, children: [
|
|
3432
|
+
legend && (0, import_react26.cloneElement)(legendComponent, { ...legendProps }, [legend]),
|
|
3341
3433
|
children
|
|
3342
3434
|
] });
|
|
3343
3435
|
};
|
|
@@ -3354,13 +3446,13 @@ var init_Fieldset2 = __esm({
|
|
|
3354
3446
|
});
|
|
3355
3447
|
|
|
3356
3448
|
// src/components/Grid/Grid.tsx
|
|
3357
|
-
var
|
|
3449
|
+
var import_dedupe29, import_jsx_runtime35, Grid;
|
|
3358
3450
|
var init_Grid = __esm({
|
|
3359
3451
|
"src/components/Grid/Grid.tsx"() {
|
|
3360
3452
|
"use strict";
|
|
3361
|
-
|
|
3453
|
+
import_dedupe29 = __toESM(require("classnames/dedupe"));
|
|
3362
3454
|
init_utils();
|
|
3363
|
-
|
|
3455
|
+
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3364
3456
|
Grid = ({ ref: _ref, ...props }) => {
|
|
3365
3457
|
const {
|
|
3366
3458
|
columns = 12,
|
|
@@ -3375,7 +3467,7 @@ var init_Grid = __esm({
|
|
|
3375
3467
|
style,
|
|
3376
3468
|
...rest
|
|
3377
3469
|
} = props;
|
|
3378
|
-
const classes = (0,
|
|
3470
|
+
const classes = (0, import_dedupe29.default)("mobius", "mobius-grid", className);
|
|
3379
3471
|
const styles = filterUndefinedProps({
|
|
3380
3472
|
boxSizing: "border-box",
|
|
3381
3473
|
display: "grid",
|
|
@@ -3389,22 +3481,22 @@ var init_Grid = __esm({
|
|
|
3389
3481
|
justifyItems,
|
|
3390
3482
|
...style
|
|
3391
3483
|
});
|
|
3392
|
-
return /* @__PURE__ */ (0,
|
|
3484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { style: styles, className: classes, ...rest });
|
|
3393
3485
|
};
|
|
3394
3486
|
Grid.displayName = "Grid";
|
|
3395
3487
|
}
|
|
3396
3488
|
});
|
|
3397
3489
|
|
|
3398
3490
|
// src/components/Grid/Item.tsx
|
|
3399
|
-
var
|
|
3491
|
+
var import_react27, import_dedupe30, import_jsx_runtime36, getBreakpointMap, DEFAULT_SPAN, GridItem;
|
|
3400
3492
|
var init_Item2 = __esm({
|
|
3401
3493
|
"src/components/Grid/Item.tsx"() {
|
|
3402
3494
|
"use strict";
|
|
3403
3495
|
"use client";
|
|
3404
|
-
|
|
3405
|
-
|
|
3496
|
+
import_react27 = require("react");
|
|
3497
|
+
import_dedupe30 = __toESM(require("classnames/dedupe"));
|
|
3406
3498
|
init_hooks();
|
|
3407
|
-
|
|
3499
|
+
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3408
3500
|
getBreakpointMap = (config) => Object.entries(config).reduce(
|
|
3409
3501
|
(prev, [key, value]) => {
|
|
3410
3502
|
const previous = Object.values(prev);
|
|
@@ -3439,9 +3531,9 @@ var init_Item2 = __esm({
|
|
|
3439
3531
|
xl,
|
|
3440
3532
|
xxl
|
|
3441
3533
|
});
|
|
3442
|
-
const [responsiveSpan, setResponsiveSpan] = (0,
|
|
3443
|
-
const classes = (0,
|
|
3444
|
-
(0,
|
|
3534
|
+
const [responsiveSpan, setResponsiveSpan] = (0, import_react27.useState)();
|
|
3535
|
+
const classes = (0, import_dedupe30.default)("mobius-grid__item", className);
|
|
3536
|
+
(0, import_react27.useEffect)(() => {
|
|
3445
3537
|
setResponsiveSpan(breakpointMap[breakpointSize]);
|
|
3446
3538
|
}, [breakpointSize, breakpointMap]);
|
|
3447
3539
|
const styles = {
|
|
@@ -3449,7 +3541,7 @@ var init_Item2 = __esm({
|
|
|
3449
3541
|
alignSelf,
|
|
3450
3542
|
justifySelf
|
|
3451
3543
|
};
|
|
3452
|
-
return /* @__PURE__ */ (0,
|
|
3544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { style: { ...styles }, className: classes, ...rest });
|
|
3453
3545
|
};
|
|
3454
3546
|
GridItem.displayName = "GridItem";
|
|
3455
3547
|
}
|
|
@@ -3470,20 +3562,20 @@ var init_Grid2 = __esm({
|
|
|
3470
3562
|
});
|
|
3471
3563
|
|
|
3472
3564
|
// src/components/Image/Image.tsx
|
|
3473
|
-
var
|
|
3565
|
+
var import_dedupe31, import_jsx_runtime37, Image;
|
|
3474
3566
|
var init_Image = __esm({
|
|
3475
3567
|
"src/components/Image/Image.tsx"() {
|
|
3476
3568
|
"use strict";
|
|
3477
|
-
|
|
3478
|
-
|
|
3569
|
+
import_dedupe31 = __toESM(require("classnames/dedupe"));
|
|
3570
|
+
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3479
3571
|
Image = ({
|
|
3480
3572
|
ref,
|
|
3481
3573
|
alt,
|
|
3482
3574
|
elementType: Component = "img",
|
|
3483
3575
|
...otherProps
|
|
3484
3576
|
}) => {
|
|
3485
|
-
const classes = (0,
|
|
3486
|
-
return /* @__PURE__ */ (0,
|
|
3577
|
+
const classes = (0, import_dedupe31.default)("mobius", "mobius-image", otherProps.className);
|
|
3578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Component, { alt, ref, ...otherProps, className: classes });
|
|
3487
3579
|
};
|
|
3488
3580
|
Image.displayName = "Image";
|
|
3489
3581
|
}
|
|
@@ -3498,13 +3590,13 @@ var init_Image2 = __esm({
|
|
|
3498
3590
|
});
|
|
3499
3591
|
|
|
3500
3592
|
// src/components/Link/Link.tsx
|
|
3501
|
-
var
|
|
3593
|
+
var import_dedupe32, import_Link, import_jsx_runtime38, Link;
|
|
3502
3594
|
var init_Link = __esm({
|
|
3503
3595
|
"src/components/Link/Link.tsx"() {
|
|
3504
3596
|
"use strict";
|
|
3505
|
-
|
|
3597
|
+
import_dedupe32 = __toESM(require("classnames/dedupe"));
|
|
3506
3598
|
import_Link = require("@simplybusiness/mobius/src/components/Link/Link.css");
|
|
3507
|
-
|
|
3599
|
+
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3508
3600
|
Link = ({ ref, ...props }) => {
|
|
3509
3601
|
const {
|
|
3510
3602
|
isDisabled = false,
|
|
@@ -3518,7 +3610,7 @@ var init_Link = __esm({
|
|
|
3518
3610
|
pointerEvents: "none"
|
|
3519
3611
|
};
|
|
3520
3612
|
const styles = { ...style, ...isDisabled && disabledStyles };
|
|
3521
|
-
const classes = (0,
|
|
3613
|
+
const classes = (0, import_dedupe32.default)(
|
|
3522
3614
|
"mobius",
|
|
3523
3615
|
"mobius-link",
|
|
3524
3616
|
className,
|
|
@@ -3527,7 +3619,7 @@ var init_Link = __esm({
|
|
|
3527
3619
|
"--is-disabled": isDisabled
|
|
3528
3620
|
}
|
|
3529
3621
|
);
|
|
3530
|
-
return /* @__PURE__ */ (0,
|
|
3622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3531
3623
|
Component,
|
|
3532
3624
|
{
|
|
3533
3625
|
ref,
|
|
@@ -3552,12 +3644,12 @@ var init_Link2 = __esm({
|
|
|
3552
3644
|
});
|
|
3553
3645
|
|
|
3554
3646
|
// src/components/LinkButton/LinkButton.tsx
|
|
3555
|
-
var
|
|
3647
|
+
var import_dedupe33, import_jsx_runtime39;
|
|
3556
3648
|
var init_LinkButton = __esm({
|
|
3557
3649
|
"src/components/LinkButton/LinkButton.tsx"() {
|
|
3558
3650
|
"use strict";
|
|
3559
|
-
|
|
3560
|
-
|
|
3651
|
+
import_dedupe33 = __toESM(require("classnames/dedupe"));
|
|
3652
|
+
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3561
3653
|
}
|
|
3562
3654
|
});
|
|
3563
3655
|
|
|
@@ -3570,14 +3662,14 @@ var init_LinkButton2 = __esm({
|
|
|
3570
3662
|
});
|
|
3571
3663
|
|
|
3572
3664
|
// src/components/List/List.tsx
|
|
3573
|
-
var
|
|
3665
|
+
var import_react28, import_dedupe34, import_List, import_jsx_runtime40, List;
|
|
3574
3666
|
var init_List = __esm({
|
|
3575
3667
|
"src/components/List/List.tsx"() {
|
|
3576
3668
|
"use strict";
|
|
3577
|
-
|
|
3578
|
-
|
|
3669
|
+
import_react28 = require("react");
|
|
3670
|
+
import_dedupe34 = __toESM(require("classnames/dedupe"));
|
|
3579
3671
|
import_List = require("@simplybusiness/mobius/src/components/List/List.css");
|
|
3580
|
-
|
|
3672
|
+
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3581
3673
|
List = ({ ref, ...props }) => {
|
|
3582
3674
|
const Component = props.isOrdered ? "ol" : "ul";
|
|
3583
3675
|
const { children, icon, ...otherProps } = props;
|
|
@@ -3586,7 +3678,7 @@ var init_List = __esm({
|
|
|
3586
3678
|
...restProps,
|
|
3587
3679
|
reversed: isReversed
|
|
3588
3680
|
};
|
|
3589
|
-
const classes = (0,
|
|
3681
|
+
const classes = (0, import_dedupe34.default)(
|
|
3590
3682
|
"mobius",
|
|
3591
3683
|
"mobius-list",
|
|
3592
3684
|
{
|
|
@@ -3595,9 +3687,9 @@ var init_List = __esm({
|
|
|
3595
3687
|
},
|
|
3596
3688
|
otherProps.className
|
|
3597
3689
|
);
|
|
3598
|
-
return /* @__PURE__ */ (0,
|
|
3599
|
-
if ((0,
|
|
3600
|
-
return (0,
|
|
3690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Component, { ref, ...mappedProps, className: classes, children: import_react28.Children.map(children, (child) => {
|
|
3691
|
+
if ((0, import_react28.isValidElement)(child)) {
|
|
3692
|
+
return (0, import_react28.cloneElement)(child, {
|
|
3601
3693
|
parentIcon: icon
|
|
3602
3694
|
});
|
|
3603
3695
|
}
|
|
@@ -3609,16 +3701,16 @@ var init_List = __esm({
|
|
|
3609
3701
|
});
|
|
3610
3702
|
|
|
3611
3703
|
// src/components/List/ListItem.tsx
|
|
3612
|
-
var
|
|
3704
|
+
var import_dedupe35, import_jsx_runtime41, ListItem;
|
|
3613
3705
|
var init_ListItem = __esm({
|
|
3614
3706
|
"src/components/List/ListItem.tsx"() {
|
|
3615
3707
|
"use strict";
|
|
3616
|
-
|
|
3617
|
-
|
|
3708
|
+
import_dedupe35 = __toESM(require("classnames/dedupe"));
|
|
3709
|
+
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3618
3710
|
ListItem = ({ ref, ...props }) => {
|
|
3619
3711
|
const { parentIcon, icon, children, ...otherProps } = props;
|
|
3620
3712
|
const iconContent = icon || parentIcon;
|
|
3621
|
-
const classes = (0,
|
|
3713
|
+
const classes = (0, import_dedupe35.default)(
|
|
3622
3714
|
"mobius",
|
|
3623
3715
|
"mobius-list__item",
|
|
3624
3716
|
{
|
|
@@ -3626,15 +3718,15 @@ var init_ListItem = __esm({
|
|
|
3626
3718
|
},
|
|
3627
3719
|
props.className
|
|
3628
3720
|
);
|
|
3629
|
-
const contentClasses = (0,
|
|
3630
|
-
const iconClasses = (0,
|
|
3721
|
+
const contentClasses = (0, import_dedupe35.default)("mobius", "mobius-list__item-content");
|
|
3722
|
+
const iconClasses = (0, import_dedupe35.default)("mobius", "mobius-list__icon");
|
|
3631
3723
|
if (iconContent) {
|
|
3632
|
-
return /* @__PURE__ */ (0,
|
|
3633
|
-
/* @__PURE__ */ (0,
|
|
3724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("li", { ref, ...otherProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: contentClasses, children: [
|
|
3725
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: iconClasses, children: iconContent }),
|
|
3634
3726
|
children
|
|
3635
3727
|
] }) });
|
|
3636
3728
|
}
|
|
3637
|
-
return /* @__PURE__ */ (0,
|
|
3729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("li", { ref, ...otherProps, className: classes, children });
|
|
3638
3730
|
};
|
|
3639
3731
|
ListItem.displayName = "ListItem";
|
|
3640
3732
|
}
|
|
@@ -3650,23 +3742,23 @@ var init_List2 = __esm({
|
|
|
3650
3742
|
});
|
|
3651
3743
|
|
|
3652
3744
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
3653
|
-
var
|
|
3745
|
+
var import_dedupe36, import_icons9, import_LoadingIndicator, import_jsx_runtime42, LoadingIndicator;
|
|
3654
3746
|
var init_LoadingIndicator = __esm({
|
|
3655
3747
|
"src/components/LoadingIndicator/LoadingIndicator.tsx"() {
|
|
3656
3748
|
"use strict";
|
|
3657
|
-
|
|
3749
|
+
import_dedupe36 = __toESM(require("classnames/dedupe"));
|
|
3658
3750
|
import_icons9 = require("@simplybusiness/icons");
|
|
3659
3751
|
init_Icon2();
|
|
3660
3752
|
import_LoadingIndicator = require("@simplybusiness/mobius/src/components/LoadingIndicator/LoadingIndicator.css");
|
|
3661
|
-
|
|
3753
|
+
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3662
3754
|
LoadingIndicator = ({ ref, ...props }) => {
|
|
3663
3755
|
const { icon = import_icons9.loading, ...otherProps } = props;
|
|
3664
|
-
const classes = (0,
|
|
3756
|
+
const classes = (0, import_dedupe36.default)(
|
|
3665
3757
|
"mobius",
|
|
3666
3758
|
"mobius-loading-indicator",
|
|
3667
3759
|
otherProps.className
|
|
3668
3760
|
);
|
|
3669
|
-
return /* @__PURE__ */ (0,
|
|
3761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { icon, spin: true, ref, ...otherProps, className: classes });
|
|
3670
3762
|
};
|
|
3671
3763
|
LoadingIndicator.displayName = "LoadingIndicator";
|
|
3672
3764
|
}
|
|
@@ -3681,16 +3773,16 @@ var init_LoadingIndicator2 = __esm({
|
|
|
3681
3773
|
});
|
|
3682
3774
|
|
|
3683
3775
|
// src/components/Logo/Logo.tsx
|
|
3684
|
-
var
|
|
3776
|
+
var import_dedupe37, import_jsx_runtime43, Logo;
|
|
3685
3777
|
var init_Logo = __esm({
|
|
3686
3778
|
"src/components/Logo/Logo.tsx"() {
|
|
3687
3779
|
"use strict";
|
|
3688
|
-
|
|
3689
|
-
|
|
3780
|
+
import_dedupe37 = __toESM(require("classnames/dedupe"));
|
|
3781
|
+
import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3690
3782
|
Logo = ({ ref, ...props }) => {
|
|
3691
3783
|
const { className, width, height, ...otherProps } = props;
|
|
3692
|
-
const classes = (0,
|
|
3693
|
-
return /* @__PURE__ */ (0,
|
|
3784
|
+
const classes = (0, import_dedupe37.default)("mobius", "mobius-logo", className);
|
|
3785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3694
3786
|
"svg",
|
|
3695
3787
|
{
|
|
3696
3788
|
width,
|
|
@@ -3700,7 +3792,7 @@ var init_Logo = __esm({
|
|
|
3700
3792
|
viewBox: "0 0 144 37",
|
|
3701
3793
|
...otherProps,
|
|
3702
3794
|
children: [
|
|
3703
|
-
/* @__PURE__ */ (0,
|
|
3795
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3704
3796
|
"linearGradient",
|
|
3705
3797
|
{
|
|
3706
3798
|
id: "logo-gradient",
|
|
@@ -3709,27 +3801,27 @@ var init_Logo = __esm({
|
|
|
3709
3801
|
y1: "76.042%",
|
|
3710
3802
|
y2: "26.973%",
|
|
3711
3803
|
children: [
|
|
3712
|
-
/* @__PURE__ */ (0,
|
|
3713
|
-
/* @__PURE__ */ (0,
|
|
3804
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { stopColor: "#4632D8", offset: "0%" }),
|
|
3805
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { stopColor: "#9084E8", offset: "100%" })
|
|
3714
3806
|
]
|
|
3715
3807
|
}
|
|
3716
3808
|
) }),
|
|
3717
|
-
/* @__PURE__ */ (0,
|
|
3718
|
-
/* @__PURE__ */ (0,
|
|
3809
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("g", { children: [
|
|
3810
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3719
3811
|
"path",
|
|
3720
3812
|
{
|
|
3721
3813
|
fill: "#0E0A2B",
|
|
3722
3814
|
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"
|
|
3723
3815
|
}
|
|
3724
3816
|
),
|
|
3725
|
-
/* @__PURE__ */ (0,
|
|
3817
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3726
3818
|
"path",
|
|
3727
3819
|
{
|
|
3728
3820
|
fill: "url(#logo-gradient)",
|
|
3729
3821
|
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"
|
|
3730
3822
|
}
|
|
3731
3823
|
),
|
|
3732
|
-
/* @__PURE__ */ (0,
|
|
3824
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3733
3825
|
"path",
|
|
3734
3826
|
{
|
|
3735
3827
|
fill: "#0E0A2B",
|
|
@@ -3754,23 +3846,23 @@ var init_Logo2 = __esm({
|
|
|
3754
3846
|
});
|
|
3755
3847
|
|
|
3756
3848
|
// src/components/Modal/Content.tsx
|
|
3757
|
-
var
|
|
3849
|
+
var import_jsx_runtime44, Content2;
|
|
3758
3850
|
var init_Content2 = __esm({
|
|
3759
3851
|
"src/components/Modal/Content.tsx"() {
|
|
3760
3852
|
"use strict";
|
|
3761
|
-
|
|
3762
|
-
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
3853
|
+
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3854
|
+
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { ref, ...otherProps, className: "mobius-modal__content", children });
|
|
3763
3855
|
Content2.displayName = "Content";
|
|
3764
3856
|
}
|
|
3765
3857
|
});
|
|
3766
3858
|
|
|
3767
3859
|
// src/components/Modal/ModalContext.tsx
|
|
3768
|
-
var
|
|
3860
|
+
var import_react29, ModalContext;
|
|
3769
3861
|
var init_ModalContext = __esm({
|
|
3770
3862
|
"src/components/Modal/ModalContext.tsx"() {
|
|
3771
3863
|
"use strict";
|
|
3772
|
-
|
|
3773
|
-
ModalContext = (0,
|
|
3864
|
+
import_react29 = require("react");
|
|
3865
|
+
ModalContext = (0, import_react29.createContext)({
|
|
3774
3866
|
onClose: () => {
|
|
3775
3867
|
},
|
|
3776
3868
|
closeLabel: void 0
|
|
@@ -3779,21 +3871,21 @@ var init_ModalContext = __esm({
|
|
|
3779
3871
|
});
|
|
3780
3872
|
|
|
3781
3873
|
// src/components/Modal/useModal.ts
|
|
3782
|
-
var
|
|
3874
|
+
var import_react30, useModal;
|
|
3783
3875
|
var init_useModal = __esm({
|
|
3784
3876
|
"src/components/Modal/useModal.ts"() {
|
|
3785
3877
|
"use strict";
|
|
3786
|
-
|
|
3878
|
+
import_react30 = require("react");
|
|
3787
3879
|
init_ModalContext();
|
|
3788
3880
|
useModal = () => {
|
|
3789
|
-
const { onClose, closeLabel } = (0,
|
|
3881
|
+
const { onClose, closeLabel } = (0, import_react30.useContext)(ModalContext);
|
|
3790
3882
|
return { onClose, closeLabel };
|
|
3791
3883
|
};
|
|
3792
3884
|
}
|
|
3793
3885
|
});
|
|
3794
3886
|
|
|
3795
3887
|
// src/components/Modal/Header.tsx
|
|
3796
|
-
var import_icons10,
|
|
3888
|
+
var import_icons10, import_jsx_runtime45, Header2;
|
|
3797
3889
|
var init_Header2 = __esm({
|
|
3798
3890
|
"src/components/Modal/Header.tsx"() {
|
|
3799
3891
|
"use strict";
|
|
@@ -3801,12 +3893,12 @@ var init_Header2 = __esm({
|
|
|
3801
3893
|
init_Button2();
|
|
3802
3894
|
init_Icon2();
|
|
3803
3895
|
init_useModal();
|
|
3804
|
-
|
|
3896
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3805
3897
|
Header2 = ({ ref, children, ...otherProps }) => {
|
|
3806
3898
|
const { onClose, closeLabel } = useModal();
|
|
3807
|
-
return /* @__PURE__ */ (0,
|
|
3899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("header", { ref, ...otherProps, className: "mobius-modal__header", children: [
|
|
3808
3900
|
children,
|
|
3809
|
-
/* @__PURE__ */ (0,
|
|
3901
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
3810
3902
|
Button,
|
|
3811
3903
|
{
|
|
3812
3904
|
"aria-label": "Close",
|
|
@@ -3814,7 +3906,7 @@ var init_Header2 = __esm({
|
|
|
3814
3906
|
onPress: onClose,
|
|
3815
3907
|
className: "mobius-modal__close",
|
|
3816
3908
|
children: [
|
|
3817
|
-
/* @__PURE__ */ (0,
|
|
3909
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Icon, { icon: import_icons10.cross }),
|
|
3818
3910
|
" ",
|
|
3819
3911
|
closeLabel
|
|
3820
3912
|
]
|
|
@@ -3827,19 +3919,19 @@ var init_Header2 = __esm({
|
|
|
3827
3919
|
});
|
|
3828
3920
|
|
|
3829
3921
|
// src/components/Modal/Modal.tsx
|
|
3830
|
-
var
|
|
3922
|
+
var import_dedupe38, import_react31, import_Modal, import_jsx_runtime46, TRANSITION_CSS_VARIABLE2, Modal;
|
|
3831
3923
|
var init_Modal = __esm({
|
|
3832
3924
|
"src/components/Modal/Modal.tsx"() {
|
|
3833
3925
|
"use strict";
|
|
3834
3926
|
"use client";
|
|
3835
|
-
|
|
3836
|
-
|
|
3927
|
+
import_dedupe38 = __toESM(require("classnames/dedupe"));
|
|
3928
|
+
import_react31 = require("react");
|
|
3837
3929
|
init_hooks();
|
|
3838
3930
|
init_utils();
|
|
3839
3931
|
init_polyfill_tests();
|
|
3840
3932
|
init_ModalContext();
|
|
3841
3933
|
import_Modal = require("@simplybusiness/mobius/src/components/Modal/Modal.css");
|
|
3842
|
-
|
|
3934
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3843
3935
|
TRANSITION_CSS_VARIABLE2 = "--modal-transition-duration";
|
|
3844
3936
|
Modal = ({ ref, ...props }) => {
|
|
3845
3937
|
const {
|
|
@@ -3853,11 +3945,11 @@ var init_Modal = __esm({
|
|
|
3853
3945
|
animation,
|
|
3854
3946
|
...rest
|
|
3855
3947
|
} = props;
|
|
3856
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
3857
|
-
(0,
|
|
3948
|
+
const [shouldTransition, setShouldTransition] = (0, import_react31.useState)(false);
|
|
3949
|
+
(0, import_react31.useEffect)(() => {
|
|
3858
3950
|
setShouldTransition(supportsDialog());
|
|
3859
3951
|
}, []);
|
|
3860
|
-
const dialogRef = (0,
|
|
3952
|
+
const dialogRef = (0, import_react31.useRef)(null);
|
|
3861
3953
|
const { close } = useDialog({
|
|
3862
3954
|
ref: dialogRef,
|
|
3863
3955
|
isOpen,
|
|
@@ -3868,7 +3960,7 @@ var init_Modal = __esm({
|
|
|
3868
3960
|
CSSVariable: TRANSITION_CSS_VARIABLE2
|
|
3869
3961
|
}
|
|
3870
3962
|
});
|
|
3871
|
-
const modalClasses = (0,
|
|
3963
|
+
const modalClasses = (0, import_dedupe38.default)(
|
|
3872
3964
|
"mobius",
|
|
3873
3965
|
"mobius-modal",
|
|
3874
3966
|
{
|
|
@@ -3881,21 +3973,21 @@ var init_Modal = __esm({
|
|
|
3881
3973
|
},
|
|
3882
3974
|
className
|
|
3883
3975
|
);
|
|
3884
|
-
const contextValue = (0,
|
|
3976
|
+
const contextValue = (0, import_react31.useMemo)(
|
|
3885
3977
|
() => ({
|
|
3886
3978
|
onClose: close,
|
|
3887
3979
|
closeLabel
|
|
3888
3980
|
}),
|
|
3889
3981
|
[close, closeLabel]
|
|
3890
3982
|
);
|
|
3891
|
-
return /* @__PURE__ */ (0,
|
|
3983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3892
3984
|
"dialog",
|
|
3893
3985
|
{
|
|
3894
3986
|
ref: mergeRefs([dialogRef, ref]),
|
|
3895
3987
|
onCancel: close,
|
|
3896
3988
|
className: modalClasses,
|
|
3897
3989
|
...rest,
|
|
3898
|
-
children: /* @__PURE__ */ (0,
|
|
3990
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ModalContext.Provider, { value: contextValue, children })
|
|
3899
3991
|
}
|
|
3900
3992
|
);
|
|
3901
3993
|
};
|
|
@@ -3920,16 +4012,16 @@ var init_Modal2 = __esm({
|
|
|
3920
4012
|
});
|
|
3921
4013
|
|
|
3922
4014
|
// src/components/NumberField/NumberField.tsx
|
|
3923
|
-
var
|
|
4015
|
+
var import_dedupe39, import_react32, import_NumberField, import_jsx_runtime47, NumberField;
|
|
3924
4016
|
var init_NumberField = __esm({
|
|
3925
4017
|
"src/components/NumberField/NumberField.tsx"() {
|
|
3926
4018
|
"use strict";
|
|
3927
4019
|
"use client";
|
|
3928
|
-
|
|
3929
|
-
|
|
4020
|
+
import_dedupe39 = __toESM(require("classnames/dedupe"));
|
|
4021
|
+
import_react32 = require("react");
|
|
3930
4022
|
init_TextField2();
|
|
3931
4023
|
import_NumberField = require("@simplybusiness/mobius/src/components/NumberField/NumberField.css");
|
|
3932
|
-
|
|
4024
|
+
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3933
4025
|
NumberField = ({ ref, ...props }) => {
|
|
3934
4026
|
const {
|
|
3935
4027
|
minValue,
|
|
@@ -3945,15 +4037,15 @@ var init_NumberField = __esm({
|
|
|
3945
4037
|
onBlur: customOnBlur,
|
|
3946
4038
|
...rest
|
|
3947
4039
|
} = otherProps;
|
|
3948
|
-
const focusedInputRef = (0,
|
|
3949
|
-
const wheelHandler = (0,
|
|
3950
|
-
(0,
|
|
4040
|
+
const focusedInputRef = (0, import_react32.useRef)(null);
|
|
4041
|
+
const wheelHandler = (0, import_react32.useCallback)((ev) => ev.preventDefault(), []);
|
|
4042
|
+
(0, import_react32.useEffect)(() => {
|
|
3951
4043
|
return () => {
|
|
3952
4044
|
focusedInputRef.current?.removeEventListener("wheel", wheelHandler);
|
|
3953
4045
|
focusedInputRef.current = null;
|
|
3954
4046
|
};
|
|
3955
4047
|
}, [wheelHandler]);
|
|
3956
|
-
const containerClasses = (0,
|
|
4048
|
+
const containerClasses = (0, import_dedupe39.default)("mobius-number-field", className, {
|
|
3957
4049
|
"--hide-spin-buttons": hideSpinButtons
|
|
3958
4050
|
});
|
|
3959
4051
|
const handleBeforeInput = (event) => {
|
|
@@ -3997,7 +4089,7 @@ var init_NumberField = __esm({
|
|
|
3997
4089
|
},
|
|
3998
4090
|
onBlur: (e) => handleBlur(e)
|
|
3999
4091
|
};
|
|
4000
|
-
return /* @__PURE__ */ (0,
|
|
4092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4001
4093
|
TextField,
|
|
4002
4094
|
{
|
|
4003
4095
|
...forwardedProps,
|
|
@@ -4025,18 +4117,18 @@ var init_NumberField2 = __esm({
|
|
|
4025
4117
|
});
|
|
4026
4118
|
|
|
4027
4119
|
// src/components/Option/Option.tsx
|
|
4028
|
-
var
|
|
4120
|
+
var import_jsx_runtime48, Option2;
|
|
4029
4121
|
var init_Option2 = __esm({
|
|
4030
4122
|
"src/components/Option/Option.tsx"() {
|
|
4031
4123
|
"use strict";
|
|
4032
|
-
|
|
4124
|
+
import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4033
4125
|
Option2 = ({ ref, ...props }) => {
|
|
4034
4126
|
const { isDisabled, ...rest } = props;
|
|
4035
4127
|
const mappedProps = {
|
|
4036
4128
|
...rest,
|
|
4037
4129
|
disabled: isDisabled
|
|
4038
4130
|
};
|
|
4039
|
-
return /* @__PURE__ */ (0,
|
|
4131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("option", { ...mappedProps, ref });
|
|
4040
4132
|
};
|
|
4041
4133
|
Option2.displayName = "Option";
|
|
4042
4134
|
}
|
|
@@ -4051,17 +4143,17 @@ var init_Option3 = __esm({
|
|
|
4051
4143
|
});
|
|
4052
4144
|
|
|
4053
4145
|
// src/components/PasswordField/ShowHideButton.tsx
|
|
4054
|
-
var import_icons11,
|
|
4146
|
+
var import_icons11, import_jsx_runtime49, ShowHideButton;
|
|
4055
4147
|
var init_ShowHideButton = __esm({
|
|
4056
4148
|
"src/components/PasswordField/ShowHideButton.tsx"() {
|
|
4057
4149
|
"use strict";
|
|
4058
4150
|
import_icons11 = require("@simplybusiness/icons");
|
|
4059
4151
|
init_src();
|
|
4060
|
-
|
|
4152
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4061
4153
|
ShowHideButton = ({
|
|
4062
4154
|
show = false,
|
|
4063
4155
|
onClick
|
|
4064
|
-
}) => /* @__PURE__ */ (0,
|
|
4156
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4065
4157
|
"button",
|
|
4066
4158
|
{
|
|
4067
4159
|
className: "mobius-password-field__show-button",
|
|
@@ -4072,35 +4164,35 @@ var init_ShowHideButton = __esm({
|
|
|
4072
4164
|
},
|
|
4073
4165
|
"aria-label": `${show ? "Hide" : "Show"} password`,
|
|
4074
4166
|
"data-testid": "show-hide-button",
|
|
4075
|
-
children: /* @__PURE__ */ (0,
|
|
4167
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Icon, { icon: show ? import_icons11.eyeSlash : import_icons11.eye, "aria-hidden": "true" })
|
|
4076
4168
|
}
|
|
4077
4169
|
);
|
|
4078
4170
|
}
|
|
4079
4171
|
});
|
|
4080
4172
|
|
|
4081
4173
|
// src/components/PasswordField/PasswordField.tsx
|
|
4082
|
-
var
|
|
4174
|
+
var import_dedupe40, import_react33, import_PasswordField, import_jsx_runtime50, PasswordField;
|
|
4083
4175
|
var init_PasswordField = __esm({
|
|
4084
4176
|
"src/components/PasswordField/PasswordField.tsx"() {
|
|
4085
4177
|
"use strict";
|
|
4086
4178
|
"use client";
|
|
4087
|
-
|
|
4088
|
-
|
|
4179
|
+
import_dedupe40 = __toESM(require("classnames/dedupe"));
|
|
4180
|
+
import_react33 = require("react");
|
|
4089
4181
|
init_mergeRefs();
|
|
4090
4182
|
init_TextField2();
|
|
4091
4183
|
init_ShowHideButton();
|
|
4092
4184
|
import_PasswordField = require("@simplybusiness/mobius/src/components/PasswordField/PasswordField.css");
|
|
4093
|
-
|
|
4185
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4094
4186
|
PasswordField = ({
|
|
4095
4187
|
ref,
|
|
4096
4188
|
className,
|
|
4097
4189
|
autoComplete = "current-password",
|
|
4098
4190
|
...props
|
|
4099
4191
|
}) => {
|
|
4100
|
-
const [show, setShow] = (0,
|
|
4192
|
+
const [show, setShow] = (0, import_react33.useState)(false);
|
|
4101
4193
|
const type = show ? "text" : "password";
|
|
4102
|
-
const classes = (0,
|
|
4103
|
-
const localRef = (0,
|
|
4194
|
+
const classes = (0, import_dedupe40.default)("mobius-password-field", className);
|
|
4195
|
+
const localRef = (0, import_react33.useRef)(null);
|
|
4104
4196
|
const handleShowHideButtonClick = () => {
|
|
4105
4197
|
const selectionStart = localRef.current?.selectionStart;
|
|
4106
4198
|
const selectionEnd = localRef.current?.selectionEnd;
|
|
@@ -4112,7 +4204,7 @@ var init_PasswordField = __esm({
|
|
|
4112
4204
|
}
|
|
4113
4205
|
});
|
|
4114
4206
|
};
|
|
4115
|
-
return /* @__PURE__ */ (0,
|
|
4207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4116
4208
|
TextField,
|
|
4117
4209
|
{
|
|
4118
4210
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -4120,7 +4212,7 @@ var init_PasswordField = __esm({
|
|
|
4120
4212
|
...props,
|
|
4121
4213
|
autoComplete,
|
|
4122
4214
|
type,
|
|
4123
|
-
suffixInside: /* @__PURE__ */ (0,
|
|
4215
|
+
suffixInside: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ShowHideButton, { onClick: handleShowHideButtonClick, show })
|
|
4124
4216
|
}
|
|
4125
4217
|
);
|
|
4126
4218
|
};
|
|
@@ -4137,17 +4229,17 @@ var init_PasswordField2 = __esm({
|
|
|
4137
4229
|
});
|
|
4138
4230
|
|
|
4139
4231
|
// src/components/Popover/Popover.tsx
|
|
4140
|
-
var
|
|
4232
|
+
var import_react34, import_icons12, import_dedupe41, import_react35, import_mobius_hooks6, import_Popover, import_jsx_runtime51;
|
|
4141
4233
|
var init_Popover = __esm({
|
|
4142
4234
|
"src/components/Popover/Popover.tsx"() {
|
|
4143
4235
|
"use strict";
|
|
4144
|
-
|
|
4236
|
+
import_react34 = require("@floating-ui/react");
|
|
4145
4237
|
import_icons12 = require("@simplybusiness/icons");
|
|
4146
|
-
|
|
4147
|
-
|
|
4238
|
+
import_dedupe41 = __toESM(require("classnames/dedupe"));
|
|
4239
|
+
import_react35 = require("react");
|
|
4148
4240
|
import_mobius_hooks6 = require("@simplybusiness/mobius-hooks");
|
|
4149
4241
|
import_Popover = require("@simplybusiness/mobius/src/components/Popover/Popover.css");
|
|
4150
|
-
|
|
4242
|
+
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4151
4243
|
}
|
|
4152
4244
|
});
|
|
4153
4245
|
|
|
@@ -4171,17 +4263,17 @@ function warnAboutInvalidValues(value, minValue, maxValue) {
|
|
|
4171
4263
|
console.warn("Progress value is greater than maxValue");
|
|
4172
4264
|
}
|
|
4173
4265
|
}
|
|
4174
|
-
var
|
|
4266
|
+
var import_dedupe42, import_react36, import_Progress, import_jsx_runtime52, sanitizedValue, getLabelComponent, DEFAULT_VALUE, DEFAULT_MIN_VALUE, DEFAULT_MAX_VALUE, Progress;
|
|
4175
4267
|
var init_Progress = __esm({
|
|
4176
4268
|
"src/components/Progress/Progress.tsx"() {
|
|
4177
4269
|
"use strict";
|
|
4178
4270
|
"use client";
|
|
4179
|
-
|
|
4180
|
-
|
|
4271
|
+
import_dedupe42 = __toESM(require("classnames/dedupe"));
|
|
4272
|
+
import_react36 = require("react");
|
|
4181
4273
|
init_Label2();
|
|
4182
4274
|
init_VisuallyHidden2();
|
|
4183
4275
|
import_Progress = require("@simplybusiness/mobius/src/components/Progress/Progress.css");
|
|
4184
|
-
|
|
4276
|
+
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4185
4277
|
sanitizedValue = (value, defaultValue) => {
|
|
4186
4278
|
if (value === void 0 || Number.isNaN(value)) {
|
|
4187
4279
|
return defaultValue;
|
|
@@ -4190,7 +4282,7 @@ var init_Progress = __esm({
|
|
|
4190
4282
|
};
|
|
4191
4283
|
getLabelComponent = (label, progressLabelId, showLabel) => {
|
|
4192
4284
|
if (showLabel) {
|
|
4193
|
-
return /* @__PURE__ */ (0,
|
|
4285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4194
4286
|
Label,
|
|
4195
4287
|
{
|
|
4196
4288
|
id: progressLabelId,
|
|
@@ -4200,7 +4292,7 @@ var init_Progress = __esm({
|
|
|
4200
4292
|
}
|
|
4201
4293
|
);
|
|
4202
4294
|
}
|
|
4203
|
-
return /* @__PURE__ */ (0,
|
|
4295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4204
4296
|
Label,
|
|
4205
4297
|
{
|
|
4206
4298
|
id: progressLabelId,
|
|
@@ -4214,8 +4306,8 @@ var init_Progress = __esm({
|
|
|
4214
4306
|
DEFAULT_MIN_VALUE = 0;
|
|
4215
4307
|
DEFAULT_MAX_VALUE = 100;
|
|
4216
4308
|
Progress = ({ ref, ...props }) => {
|
|
4217
|
-
const progressId = (0,
|
|
4218
|
-
const progressLabelId = (0,
|
|
4309
|
+
const progressId = (0, import_react36.useId)();
|
|
4310
|
+
const progressLabelId = (0, import_react36.useId)();
|
|
4219
4311
|
const {
|
|
4220
4312
|
id,
|
|
4221
4313
|
label,
|
|
@@ -4240,7 +4332,7 @@ var init_Progress = __esm({
|
|
|
4240
4332
|
100
|
|
4241
4333
|
);
|
|
4242
4334
|
const barWidth = `${percentage}%`;
|
|
4243
|
-
const classes = (0,
|
|
4335
|
+
const classes = (0, import_dedupe42.default)("mobius", "mobius-progress", className, {
|
|
4244
4336
|
"--is-primary": variant === "primary",
|
|
4245
4337
|
"--is-secondary": variant === "secondary"
|
|
4246
4338
|
});
|
|
@@ -4250,7 +4342,7 @@ var init_Progress = __esm({
|
|
|
4250
4342
|
progressBarProps["aria-valuenow"] = value.toString();
|
|
4251
4343
|
progressBarProps["aria-valuetext"] = valueFormatter instanceof Function ? valueFormatter(value, minValue, maxValue) : barWidth;
|
|
4252
4344
|
const labelComponent = getLabelComponent(label, progressLabelId, showLabel);
|
|
4253
|
-
return /* @__PURE__ */ (0,
|
|
4345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
4254
4346
|
"div",
|
|
4255
4347
|
{
|
|
4256
4348
|
id: id || progressId,
|
|
@@ -4261,8 +4353,8 @@ var init_Progress = __esm({
|
|
|
4261
4353
|
"aria-labelledby": progressLabelId,
|
|
4262
4354
|
children: [
|
|
4263
4355
|
labelComponent,
|
|
4264
|
-
/* @__PURE__ */ (0,
|
|
4265
|
-
showValueLabel && /* @__PURE__ */ (0,
|
|
4356
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "mobius-progress__track", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "mobius-progress__bar", style: { width: barWidth } }) }),
|
|
4357
|
+
showValueLabel && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Label, { "data-testid": "value-label", elementType: "span", children: progressBarProps["aria-valuetext"] })
|
|
4266
4358
|
]
|
|
4267
4359
|
}
|
|
4268
4360
|
);
|
|
@@ -4280,17 +4372,17 @@ var init_Progress2 = __esm({
|
|
|
4280
4372
|
});
|
|
4281
4373
|
|
|
4282
4374
|
// src/components/Radio/Radio.tsx
|
|
4283
|
-
var
|
|
4375
|
+
var import_dedupe43, import_react37, import_Radio, import_jsx_runtime53, Radio;
|
|
4284
4376
|
var init_Radio = __esm({
|
|
4285
4377
|
"src/components/Radio/Radio.tsx"() {
|
|
4286
4378
|
"use strict";
|
|
4287
4379
|
"use client";
|
|
4288
|
-
|
|
4289
|
-
|
|
4380
|
+
import_dedupe43 = __toESM(require("classnames/dedupe"));
|
|
4381
|
+
import_react37 = require("react");
|
|
4290
4382
|
init_ErrorMessage2();
|
|
4291
4383
|
init_Label2();
|
|
4292
4384
|
import_Radio = require("@simplybusiness/mobius/src/components/Radio/Radio.css");
|
|
4293
|
-
|
|
4385
|
+
import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4294
4386
|
Radio = ({ ref, ...props }) => {
|
|
4295
4387
|
const {
|
|
4296
4388
|
children,
|
|
@@ -4314,19 +4406,19 @@ var init_Radio = __esm({
|
|
|
4314
4406
|
const isMultiline = label && children;
|
|
4315
4407
|
const isControlled = selected !== void 0;
|
|
4316
4408
|
const isChecked = isControlled ? selected === value : defaultChecked;
|
|
4317
|
-
const contentRef = (0,
|
|
4318
|
-
const prevOverflowRef = (0,
|
|
4409
|
+
const contentRef = (0, import_react37.useRef)(null);
|
|
4410
|
+
const prevOverflowRef = (0, import_react37.useRef)({
|
|
4319
4411
|
vertical: false,
|
|
4320
4412
|
horizontal: false
|
|
4321
4413
|
});
|
|
4322
|
-
const hasIconFirst = (0,
|
|
4323
|
-
if (!children ||
|
|
4324
|
-
const firstChild =
|
|
4325
|
-
if (!(0,
|
|
4414
|
+
const hasIconFirst = (0, import_react37.useMemo)(() => {
|
|
4415
|
+
if (!children || import_react37.Children.count(children) === 0) return false;
|
|
4416
|
+
const firstChild = import_react37.Children.toArray(children)[0];
|
|
4417
|
+
if (!(0, import_react37.isValidElement)(firstChild)) return false;
|
|
4326
4418
|
const props2 = firstChild.props;
|
|
4327
4419
|
return "icon" in props2 && props2.icon !== void 0;
|
|
4328
4420
|
}, [children]);
|
|
4329
|
-
(0,
|
|
4421
|
+
(0, import_react37.useLayoutEffect)(() => {
|
|
4330
4422
|
if (!contentRef.current || !onOverflow) return;
|
|
4331
4423
|
if (orientation === "vertical") {
|
|
4332
4424
|
return;
|
|
@@ -4355,13 +4447,13 @@ var init_Radio = __esm({
|
|
|
4355
4447
|
"--is-multiline": !!isMultiline,
|
|
4356
4448
|
"--is-required": isRequired
|
|
4357
4449
|
};
|
|
4358
|
-
const containerClasses = (0,
|
|
4450
|
+
const containerClasses = (0, import_dedupe43.default)(
|
|
4359
4451
|
"mobius-radio__label",
|
|
4360
4452
|
radioClasses,
|
|
4361
4453
|
className,
|
|
4362
4454
|
{ "--has-icon-first": hasIconFirst }
|
|
4363
4455
|
);
|
|
4364
|
-
const inputClasses = (0,
|
|
4456
|
+
const inputClasses = (0, import_dedupe43.default)("mobius-radio__input", radioClasses);
|
|
4365
4457
|
const { "aria-describedby": _ariaDescribedBy, ...rest } = otherProps;
|
|
4366
4458
|
const handleChange = (event) => {
|
|
4367
4459
|
if (setSelected) {
|
|
@@ -4375,9 +4467,9 @@ var init_Radio = __esm({
|
|
|
4375
4467
|
onChange(adaptedEvent);
|
|
4376
4468
|
}
|
|
4377
4469
|
};
|
|
4378
|
-
return /* @__PURE__ */ (0,
|
|
4379
|
-
/* @__PURE__ */ (0,
|
|
4380
|
-
/* @__PURE__ */ (0,
|
|
4470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
4471
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Label, { className: containerClasses, children: [
|
|
4472
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4381
4473
|
"input",
|
|
4382
4474
|
{
|
|
4383
4475
|
"aria-describedby": otherProps["aria-describedby"],
|
|
@@ -4394,12 +4486,12 @@ var init_Radio = __esm({
|
|
|
4394
4486
|
...rest
|
|
4395
4487
|
}
|
|
4396
4488
|
),
|
|
4397
|
-
isMultiline ? /* @__PURE__ */ (0,
|
|
4398
|
-
/* @__PURE__ */ (0,
|
|
4399
|
-
/* @__PURE__ */ (0,
|
|
4400
|
-
] }) : /* @__PURE__ */ (0,
|
|
4489
|
+
isMultiline ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { ref: contentRef, className: "mobius-radio__content--multiline", children: [
|
|
4490
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mobius-radio__content-first-line", children: label }),
|
|
4491
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mobius-radio__extra-content", children })
|
|
4492
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { ref: contentRef, className: "mobius-radio__content", children: label || children })
|
|
4401
4493
|
] }),
|
|
4402
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
4494
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorMessage, { errorMessage })
|
|
4403
4495
|
] });
|
|
4404
4496
|
};
|
|
4405
4497
|
Radio.displayName = "Radio";
|
|
@@ -4407,19 +4499,19 @@ var init_Radio = __esm({
|
|
|
4407
4499
|
});
|
|
4408
4500
|
|
|
4409
4501
|
// src/components/Radio/RadioGroup.tsx
|
|
4410
|
-
var
|
|
4502
|
+
var import_dedupe44, import_react38, import_jsx_runtime54, getDefaultVal, RadioGroup;
|
|
4411
4503
|
var init_RadioGroup = __esm({
|
|
4412
4504
|
"src/components/Radio/RadioGroup.tsx"() {
|
|
4413
4505
|
"use strict";
|
|
4414
4506
|
"use client";
|
|
4415
|
-
|
|
4416
|
-
|
|
4507
|
+
import_dedupe44 = __toESM(require("classnames/dedupe"));
|
|
4508
|
+
import_react38 = require("react");
|
|
4417
4509
|
init_hooks();
|
|
4418
4510
|
init_spaceDelimitedList();
|
|
4419
4511
|
init_ErrorMessage2();
|
|
4420
4512
|
init_Label2();
|
|
4421
4513
|
init_Stack2();
|
|
4422
|
-
|
|
4514
|
+
import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4423
4515
|
getDefaultVal = (children, defaultValue) => {
|
|
4424
4516
|
if (Array.isArray(children) && defaultValue) {
|
|
4425
4517
|
const option = children?.find((item) => item.props.value === defaultValue);
|
|
@@ -4447,15 +4539,15 @@ var init_RadioGroup = __esm({
|
|
|
4447
4539
|
...rest
|
|
4448
4540
|
} = props;
|
|
4449
4541
|
const defaultSelected = getDefaultVal(children, value || defaultValue);
|
|
4450
|
-
const [selected, setSelected] = (0,
|
|
4451
|
-
const overflowsRef = (0,
|
|
4452
|
-
const [hasOverflow, setHasOverflow] = (0,
|
|
4453
|
-
(0,
|
|
4542
|
+
const [selected, setSelected] = (0, import_react38.useState)(defaultSelected);
|
|
4543
|
+
const overflowsRef = (0, import_react38.useRef)({});
|
|
4544
|
+
const [hasOverflow, setHasOverflow] = (0, import_react38.useState)(false);
|
|
4545
|
+
(0, import_react38.useEffect)(() => {
|
|
4454
4546
|
if (value !== void 0) {
|
|
4455
4547
|
setSelected(value);
|
|
4456
4548
|
}
|
|
4457
4549
|
}, [value]);
|
|
4458
|
-
const handleOverflow = (0,
|
|
4550
|
+
const handleOverflow = (0, import_react38.useCallback)(
|
|
4459
4551
|
(radioValue, overflow) => {
|
|
4460
4552
|
overflowsRef.current = {
|
|
4461
4553
|
...overflowsRef.current,
|
|
@@ -4479,26 +4571,26 @@ var init_RadioGroup = __esm({
|
|
|
4479
4571
|
[`--is-${effectiveOrientation}`]: true,
|
|
4480
4572
|
[className || ""]: true
|
|
4481
4573
|
};
|
|
4482
|
-
const radioGroupClasses = (0,
|
|
4574
|
+
const radioGroupClasses = (0, import_dedupe44.default)(
|
|
4483
4575
|
"mobius",
|
|
4484
4576
|
"mobius-radio-group",
|
|
4485
4577
|
radioClasses,
|
|
4486
4578
|
validationClasses
|
|
4487
4579
|
);
|
|
4488
|
-
const radioWrapperClasses = (0,
|
|
4580
|
+
const radioWrapperClasses = (0, import_dedupe44.default)("mobius-radio__wrapper", {
|
|
4489
4581
|
[`--is-${effectiveOrientation}`]: true
|
|
4490
4582
|
});
|
|
4491
|
-
const labelClasses = (0,
|
|
4492
|
-
const errorMessageId = (0,
|
|
4493
|
-
const defaultNameAttrId = (0,
|
|
4583
|
+
const labelClasses = (0, import_dedupe44.default)(radioClasses, validationClasses);
|
|
4584
|
+
const errorMessageId = (0, import_react38.useId)();
|
|
4585
|
+
const defaultNameAttrId = (0, import_react38.useId)();
|
|
4494
4586
|
const nameAttribute = name || defaultNameAttrId;
|
|
4495
4587
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
4496
4588
|
const describedBy = spaceDelimitedList([
|
|
4497
4589
|
shouldErrorMessageShow,
|
|
4498
4590
|
props["aria-describedby"]
|
|
4499
4591
|
]);
|
|
4500
|
-
const labelId = (0,
|
|
4501
|
-
return /* @__PURE__ */ (0,
|
|
4592
|
+
const labelId = (0, import_react38.useId)();
|
|
4593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4502
4594
|
"div",
|
|
4503
4595
|
{
|
|
4504
4596
|
...rest,
|
|
@@ -4514,12 +4606,12 @@ var init_RadioGroup = __esm({
|
|
|
4514
4606
|
ref,
|
|
4515
4607
|
className: radioGroupClasses,
|
|
4516
4608
|
role: "radiogroup",
|
|
4517
|
-
children: /* @__PURE__ */ (0,
|
|
4518
|
-
label && /* @__PURE__ */ (0,
|
|
4519
|
-
/* @__PURE__ */ (0,
|
|
4520
|
-
if ((0,
|
|
4609
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Stack, { gap: "xs", children: [
|
|
4610
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Label, { htmlFor: name, id: labelId, className: labelClasses, children: label }),
|
|
4611
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: radioWrapperClasses, children: import_react38.Children.map(children, (child) => {
|
|
4612
|
+
if ((0, import_react38.isValidElement)(child)) {
|
|
4521
4613
|
const childValue = child.props.value;
|
|
4522
|
-
return (0,
|
|
4614
|
+
return (0, import_react38.cloneElement)(
|
|
4523
4615
|
child,
|
|
4524
4616
|
{
|
|
4525
4617
|
orientation: effectiveOrientation,
|
|
@@ -4537,7 +4629,7 @@ var init_RadioGroup = __esm({
|
|
|
4537
4629
|
}
|
|
4538
4630
|
return child;
|
|
4539
4631
|
}) }),
|
|
4540
|
-
/* @__PURE__ */ (0,
|
|
4632
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
4541
4633
|
] })
|
|
4542
4634
|
}
|
|
4543
4635
|
);
|
|
@@ -4556,47 +4648,47 @@ var init_Radio2 = __esm({
|
|
|
4556
4648
|
});
|
|
4557
4649
|
|
|
4558
4650
|
// src/components/Segment/SegmentGroup.tsx
|
|
4559
|
-
var
|
|
4651
|
+
var import_dedupe45, import_jsx_runtime55, SegmentGroup;
|
|
4560
4652
|
var init_SegmentGroup = __esm({
|
|
4561
4653
|
"src/components/Segment/SegmentGroup.tsx"() {
|
|
4562
4654
|
"use strict";
|
|
4563
|
-
|
|
4564
|
-
|
|
4655
|
+
import_dedupe45 = __toESM(require("classnames/dedupe"));
|
|
4656
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4565
4657
|
SegmentGroup = (props) => {
|
|
4566
4658
|
const { children, horizontal, gap, className, ...rest } = props;
|
|
4567
4659
|
const gapClass = gap ? `gap-${gap}` : "";
|
|
4568
|
-
const classes = (0,
|
|
4660
|
+
const classes = (0, import_dedupe45.default)(
|
|
4569
4661
|
"mobius",
|
|
4570
4662
|
"mobius-segment-group",
|
|
4571
4663
|
className,
|
|
4572
4664
|
{ "--is-horizontal": horizontal },
|
|
4573
4665
|
gapClass
|
|
4574
4666
|
);
|
|
4575
|
-
return /* @__PURE__ */ (0,
|
|
4667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: classes, ...rest, children });
|
|
4576
4668
|
};
|
|
4577
4669
|
SegmentGroup.displayName = "SegmentGroup";
|
|
4578
4670
|
}
|
|
4579
4671
|
});
|
|
4580
4672
|
|
|
4581
4673
|
// src/components/Segment/Segment.tsx
|
|
4582
|
-
var
|
|
4674
|
+
var import_dedupe46, import_Segment, import_jsx_runtime56, Segment;
|
|
4583
4675
|
var init_Segment = __esm({
|
|
4584
4676
|
"src/components/Segment/Segment.tsx"() {
|
|
4585
4677
|
"use strict";
|
|
4586
|
-
|
|
4678
|
+
import_dedupe46 = __toESM(require("classnames/dedupe"));
|
|
4587
4679
|
import_Segment = require("@simplybusiness/mobius/src/components/Segment/Segment.css");
|
|
4588
|
-
|
|
4680
|
+
import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4589
4681
|
Segment = (props) => {
|
|
4590
4682
|
const { heading, children, colour, inverted, className, ...rest } = props;
|
|
4591
|
-
const classes = (0,
|
|
4683
|
+
const classes = (0, import_dedupe46.default)(
|
|
4592
4684
|
"mobius",
|
|
4593
4685
|
"mobius-segment",
|
|
4594
4686
|
colour,
|
|
4595
4687
|
{ inverted },
|
|
4596
4688
|
className
|
|
4597
4689
|
);
|
|
4598
|
-
return /* @__PURE__ */ (0,
|
|
4599
|
-
heading && /* @__PURE__ */ (0,
|
|
4690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: classes, ...rest, children: [
|
|
4691
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "mobius-segment__heading", children: heading }),
|
|
4600
4692
|
children
|
|
4601
4693
|
] });
|
|
4602
4694
|
};
|
|
@@ -4614,14 +4706,14 @@ var init_Segment2 = __esm({
|
|
|
4614
4706
|
});
|
|
4615
4707
|
|
|
4616
4708
|
// src/components/Select/Select.tsx
|
|
4617
|
-
var import_icons13,
|
|
4709
|
+
var import_icons13, import_dedupe47, import_react39, import_Select, import_jsx_runtime57, Select;
|
|
4618
4710
|
var init_Select = __esm({
|
|
4619
4711
|
"src/components/Select/Select.tsx"() {
|
|
4620
4712
|
"use strict";
|
|
4621
4713
|
"use client";
|
|
4622
4714
|
import_icons13 = require("@simplybusiness/icons");
|
|
4623
|
-
|
|
4624
|
-
|
|
4715
|
+
import_dedupe47 = __toESM(require("classnames/dedupe"));
|
|
4716
|
+
import_react39 = require("react");
|
|
4625
4717
|
init_hooks();
|
|
4626
4718
|
init_useLabel2();
|
|
4627
4719
|
init_spaceDelimitedList();
|
|
@@ -4630,7 +4722,7 @@ var init_Select = __esm({
|
|
|
4630
4722
|
init_Label2();
|
|
4631
4723
|
init_Stack2();
|
|
4632
4724
|
import_Select = require("@simplybusiness/mobius/src/components/Select/Select.css");
|
|
4633
|
-
|
|
4725
|
+
import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4634
4726
|
Select = ({ ref, ...props }) => {
|
|
4635
4727
|
const {
|
|
4636
4728
|
label,
|
|
@@ -4651,24 +4743,24 @@ var init_Select = __esm({
|
|
|
4651
4743
|
"--is-required": typeof isRequired === "boolean" && isRequired,
|
|
4652
4744
|
"--is-optional": typeof isRequired === "boolean" && !isRequired
|
|
4653
4745
|
};
|
|
4654
|
-
const sharedClasses = (0,
|
|
4655
|
-
const wrapperClasses = (0,
|
|
4746
|
+
const sharedClasses = (0, import_dedupe47.default)(validationClasses, stateClasses);
|
|
4747
|
+
const wrapperClasses = (0, import_dedupe47.default)(
|
|
4656
4748
|
"mobius-select__wrapper",
|
|
4657
4749
|
sharedClasses,
|
|
4658
4750
|
otherProps.className
|
|
4659
4751
|
);
|
|
4660
|
-
const selectClasses = (0,
|
|
4752
|
+
const selectClasses = (0, import_dedupe47.default)(
|
|
4661
4753
|
"mobius-select",
|
|
4662
4754
|
sharedClasses,
|
|
4663
4755
|
otherProps.className
|
|
4664
4756
|
);
|
|
4665
|
-
const labelClasses = (0,
|
|
4757
|
+
const labelClasses = (0, import_dedupe47.default)(
|
|
4666
4758
|
"mobius-label",
|
|
4667
4759
|
sharedClasses,
|
|
4668
4760
|
otherProps.className
|
|
4669
4761
|
);
|
|
4670
|
-
const iconClasses = (0,
|
|
4671
|
-
const errorMessageId = (0,
|
|
4762
|
+
const iconClasses = (0, import_dedupe47.default)("mobius-select__icon", sharedClasses);
|
|
4763
|
+
const errorMessageId = (0, import_react39.useId)();
|
|
4672
4764
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
4673
4765
|
const describedBy = spaceDelimitedList([
|
|
4674
4766
|
shouldErrorMessageShow,
|
|
@@ -4679,10 +4771,10 @@ var init_Select = __esm({
|
|
|
4679
4771
|
onChange(e);
|
|
4680
4772
|
}
|
|
4681
4773
|
};
|
|
4682
|
-
return /* @__PURE__ */ (0,
|
|
4683
|
-
label && /* @__PURE__ */ (0,
|
|
4684
|
-
/* @__PURE__ */ (0,
|
|
4685
|
-
/* @__PURE__ */ (0,
|
|
4774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Stack, { className: "mobius mobius-select__outer", gap: "xs", children: [
|
|
4775
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Label, { ...labelProps, className: labelClasses, children: label }),
|
|
4776
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: wrapperClasses, children: [
|
|
4777
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4686
4778
|
"select",
|
|
4687
4779
|
{
|
|
4688
4780
|
...otherProps,
|
|
@@ -4698,9 +4790,9 @@ var init_Select = __esm({
|
|
|
4698
4790
|
onChange: handleChange
|
|
4699
4791
|
}
|
|
4700
4792
|
),
|
|
4701
|
-
/* @__PURE__ */ (0,
|
|
4793
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Icon, { icon: import_icons13.chevronDown }) })
|
|
4702
4794
|
] }),
|
|
4703
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
4795
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
4704
4796
|
] });
|
|
4705
4797
|
};
|
|
4706
4798
|
Select.displayName = "Select";
|
|
@@ -4716,15 +4808,15 @@ var init_Select2 = __esm({
|
|
|
4716
4808
|
});
|
|
4717
4809
|
|
|
4718
4810
|
// src/components/Slider/Slider.tsx
|
|
4719
|
-
var
|
|
4811
|
+
var import_dedupe48, import_react40, import_Slider, import_jsx_runtime58;
|
|
4720
4812
|
var init_Slider = __esm({
|
|
4721
4813
|
"src/components/Slider/Slider.tsx"() {
|
|
4722
4814
|
"use strict";
|
|
4723
4815
|
"use client";
|
|
4724
|
-
|
|
4725
|
-
|
|
4816
|
+
import_dedupe48 = __toESM(require("classnames/dedupe"));
|
|
4817
|
+
import_react40 = require("react");
|
|
4726
4818
|
import_Slider = require("@simplybusiness/mobius/src/components/Slider/Slider.css");
|
|
4727
|
-
|
|
4819
|
+
import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4728
4820
|
}
|
|
4729
4821
|
});
|
|
4730
4822
|
|
|
@@ -4737,19 +4829,19 @@ var init_Slider2 = __esm({
|
|
|
4737
4829
|
});
|
|
4738
4830
|
|
|
4739
4831
|
// src/components/SVG/SVG.tsx
|
|
4740
|
-
var
|
|
4832
|
+
var import_react41, import_dedupe49, import_jsx_runtime59, SVG;
|
|
4741
4833
|
var init_SVG = __esm({
|
|
4742
4834
|
"src/components/SVG/SVG.tsx"() {
|
|
4743
4835
|
"use strict";
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4836
|
+
import_react41 = require("react");
|
|
4837
|
+
import_dedupe49 = __toESM(require("classnames/dedupe"));
|
|
4838
|
+
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4747
4839
|
SVG = ({ ref, ...props }) => {
|
|
4748
4840
|
const { children, className, ...otherProps } = props;
|
|
4749
|
-
const classes = (0,
|
|
4750
|
-
const svgNode =
|
|
4841
|
+
const classes = (0, import_dedupe49.default)("mobius", "mobius-svg", className);
|
|
4842
|
+
const svgNode = import_react41.Children.only(children);
|
|
4751
4843
|
const { children: svgChildren, viewBox, xmlns } = svgNode.props;
|
|
4752
|
-
return /* @__PURE__ */ (0,
|
|
4844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4753
4845
|
"svg",
|
|
4754
4846
|
{
|
|
4755
4847
|
viewBox,
|
|
@@ -4774,16 +4866,16 @@ var init_SVG2 = __esm({
|
|
|
4774
4866
|
});
|
|
4775
4867
|
|
|
4776
4868
|
// src/components/Switch/Switch.tsx
|
|
4777
|
-
var
|
|
4869
|
+
var import_react42, import_dedupe50, import_Switch, import_jsx_runtime60, Switch;
|
|
4778
4870
|
var init_Switch = __esm({
|
|
4779
4871
|
"src/components/Switch/Switch.tsx"() {
|
|
4780
4872
|
"use strict";
|
|
4781
4873
|
"use client";
|
|
4782
|
-
|
|
4783
|
-
|
|
4874
|
+
import_react42 = require("react");
|
|
4875
|
+
import_dedupe50 = __toESM(require("classnames/dedupe"));
|
|
4784
4876
|
init_VisuallyHidden2();
|
|
4785
4877
|
import_Switch = require("@simplybusiness/mobius/src/components/Switch/Switch.css");
|
|
4786
|
-
|
|
4878
|
+
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4787
4879
|
Switch = ({ ref, ...props }) => {
|
|
4788
4880
|
const {
|
|
4789
4881
|
checked = false,
|
|
@@ -4792,11 +4884,11 @@ var init_Switch = __esm({
|
|
|
4792
4884
|
isDisabled = false,
|
|
4793
4885
|
...otherProps
|
|
4794
4886
|
} = props;
|
|
4795
|
-
const [enabled, setEnabled] = (0,
|
|
4796
|
-
(0,
|
|
4887
|
+
const [enabled, setEnabled] = (0, import_react42.useState)(checked);
|
|
4888
|
+
(0, import_react42.useEffect)(() => {
|
|
4797
4889
|
setEnabled(checked);
|
|
4798
4890
|
}, [checked]);
|
|
4799
|
-
const classes = (0,
|
|
4891
|
+
const classes = (0, import_dedupe50.default)(
|
|
4800
4892
|
"mobius",
|
|
4801
4893
|
"mobius-switch",
|
|
4802
4894
|
{
|
|
@@ -4811,9 +4903,9 @@ var init_Switch = __esm({
|
|
|
4811
4903
|
onChange(event);
|
|
4812
4904
|
}
|
|
4813
4905
|
};
|
|
4814
|
-
return /* @__PURE__ */ (0,
|
|
4815
|
-
/* @__PURE__ */ (0,
|
|
4816
|
-
/* @__PURE__ */ (0,
|
|
4906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("label", { ref, className: classes, children: [
|
|
4907
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: enabled ? "On" : "Off" }) }),
|
|
4908
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
4817
4909
|
"input",
|
|
4818
4910
|
{
|
|
4819
4911
|
type: "checkbox",
|
|
@@ -4824,7 +4916,7 @@ var init_Switch = __esm({
|
|
|
4824
4916
|
...otherProps
|
|
4825
4917
|
}
|
|
4826
4918
|
),
|
|
4827
|
-
/* @__PURE__ */ (0,
|
|
4919
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "mobius-switch__slider" })
|
|
4828
4920
|
] });
|
|
4829
4921
|
};
|
|
4830
4922
|
Switch.displayName = "Switch";
|
|
@@ -4840,114 +4932,114 @@ var init_Switch2 = __esm({
|
|
|
4840
4932
|
});
|
|
4841
4933
|
|
|
4842
4934
|
// src/components/Table/Table.tsx
|
|
4843
|
-
var
|
|
4935
|
+
var import_dedupe51, import_Table, import_jsx_runtime61, Table;
|
|
4844
4936
|
var init_Table = __esm({
|
|
4845
4937
|
"src/components/Table/Table.tsx"() {
|
|
4846
4938
|
"use strict";
|
|
4847
|
-
|
|
4939
|
+
import_dedupe51 = __toESM(require("classnames/dedupe"));
|
|
4848
4940
|
import_Table = require("@simplybusiness/mobius/src/components/Table/Table.css");
|
|
4849
|
-
|
|
4941
|
+
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4850
4942
|
Table = ({ ref, ...props }) => {
|
|
4851
|
-
const classes = (0,
|
|
4852
|
-
return /* @__PURE__ */ (0,
|
|
4943
|
+
const classes = (0, import_dedupe51.default)("mobius", "mobius-table", props.className);
|
|
4944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("table", { ref, ...props, className: classes });
|
|
4853
4945
|
};
|
|
4854
4946
|
Table.displayName = "Table";
|
|
4855
4947
|
}
|
|
4856
4948
|
});
|
|
4857
4949
|
|
|
4858
4950
|
// src/components/Table/Head.tsx
|
|
4859
|
-
var
|
|
4951
|
+
var import_dedupe52, import_jsx_runtime62, Head;
|
|
4860
4952
|
var init_Head = __esm({
|
|
4861
4953
|
"src/components/Table/Head.tsx"() {
|
|
4862
4954
|
"use strict";
|
|
4863
|
-
|
|
4864
|
-
|
|
4955
|
+
import_dedupe52 = __toESM(require("classnames/dedupe"));
|
|
4956
|
+
import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4865
4957
|
Head = ({ ref, ...props }) => {
|
|
4866
|
-
const classes = (0,
|
|
4867
|
-
return /* @__PURE__ */ (0,
|
|
4958
|
+
const classes = (0, import_dedupe52.default)("mobius", "mobius-table__head", props.className);
|
|
4959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("thead", { ref, ...props, className: classes });
|
|
4868
4960
|
};
|
|
4869
4961
|
Head.displayName = "Table.Head";
|
|
4870
4962
|
}
|
|
4871
4963
|
});
|
|
4872
4964
|
|
|
4873
4965
|
// src/components/Table/Body.tsx
|
|
4874
|
-
var
|
|
4966
|
+
var import_dedupe53, import_jsx_runtime63, Body;
|
|
4875
4967
|
var init_Body = __esm({
|
|
4876
4968
|
"src/components/Table/Body.tsx"() {
|
|
4877
4969
|
"use strict";
|
|
4878
|
-
|
|
4879
|
-
|
|
4970
|
+
import_dedupe53 = __toESM(require("classnames/dedupe"));
|
|
4971
|
+
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4880
4972
|
Body = ({ ref, ...props }) => {
|
|
4881
|
-
const classes = (0,
|
|
4882
|
-
return /* @__PURE__ */ (0,
|
|
4973
|
+
const classes = (0, import_dedupe53.default)("mobius", "mobius-table__body", props.className);
|
|
4974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("tbody", { ref, ...props, className: classes });
|
|
4883
4975
|
};
|
|
4884
4976
|
Body.displayName = "Table.Body";
|
|
4885
4977
|
}
|
|
4886
4978
|
});
|
|
4887
4979
|
|
|
4888
4980
|
// src/components/Table/Foot.tsx
|
|
4889
|
-
var
|
|
4981
|
+
var import_dedupe54, import_jsx_runtime64, Foot;
|
|
4890
4982
|
var init_Foot = __esm({
|
|
4891
4983
|
"src/components/Table/Foot.tsx"() {
|
|
4892
4984
|
"use strict";
|
|
4893
|
-
|
|
4894
|
-
|
|
4985
|
+
import_dedupe54 = __toESM(require("classnames/dedupe"));
|
|
4986
|
+
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4895
4987
|
Foot = ({ ref, ...props }) => {
|
|
4896
|
-
const classes = (0,
|
|
4897
|
-
return /* @__PURE__ */ (0,
|
|
4988
|
+
const classes = (0, import_dedupe54.default)("mobius", "mobius-table__foot", props.className);
|
|
4989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("tfoot", { ref, ...props, className: classes });
|
|
4898
4990
|
};
|
|
4899
4991
|
Foot.displayName = "Table.Foot";
|
|
4900
4992
|
}
|
|
4901
4993
|
});
|
|
4902
4994
|
|
|
4903
4995
|
// src/components/Table/Row.tsx
|
|
4904
|
-
var
|
|
4996
|
+
var import_dedupe55, import_jsx_runtime65, Row;
|
|
4905
4997
|
var init_Row = __esm({
|
|
4906
4998
|
"src/components/Table/Row.tsx"() {
|
|
4907
4999
|
"use strict";
|
|
4908
|
-
|
|
4909
|
-
|
|
5000
|
+
import_dedupe55 = __toESM(require("classnames/dedupe"));
|
|
5001
|
+
import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4910
5002
|
Row = ({ ref, ...props }) => {
|
|
4911
|
-
const classes = (0,
|
|
4912
|
-
return /* @__PURE__ */ (0,
|
|
5003
|
+
const classes = (0, import_dedupe55.default)("mobius", "mobius-table__row", props.className);
|
|
5004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("tr", { ref, ...props, className: classes });
|
|
4913
5005
|
};
|
|
4914
5006
|
Row.displayName = "Table.Row";
|
|
4915
5007
|
}
|
|
4916
5008
|
});
|
|
4917
5009
|
|
|
4918
5010
|
// src/components/Table/HeaderCell.tsx
|
|
4919
|
-
var
|
|
5011
|
+
var import_dedupe56, import_jsx_runtime66, HeaderCell;
|
|
4920
5012
|
var init_HeaderCell = __esm({
|
|
4921
5013
|
"src/components/Table/HeaderCell.tsx"() {
|
|
4922
5014
|
"use strict";
|
|
4923
|
-
|
|
4924
|
-
|
|
5015
|
+
import_dedupe56 = __toESM(require("classnames/dedupe"));
|
|
5016
|
+
import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4925
5017
|
HeaderCell = ({ ref, ...props }) => {
|
|
4926
|
-
const classes = (0,
|
|
5018
|
+
const classes = (0, import_dedupe56.default)(
|
|
4927
5019
|
"mobius",
|
|
4928
5020
|
"mobius-table__head-cell",
|
|
4929
5021
|
props.className
|
|
4930
5022
|
);
|
|
4931
|
-
return /* @__PURE__ */ (0,
|
|
5023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("th", { ...props, ref, className: classes });
|
|
4932
5024
|
};
|
|
4933
5025
|
HeaderCell.displayName = "Table.HeaderCell";
|
|
4934
5026
|
}
|
|
4935
5027
|
});
|
|
4936
5028
|
|
|
4937
5029
|
// src/components/Table/Cell.tsx
|
|
4938
|
-
var
|
|
5030
|
+
var import_dedupe57, import_jsx_runtime67, Cell;
|
|
4939
5031
|
var init_Cell = __esm({
|
|
4940
5032
|
"src/components/Table/Cell.tsx"() {
|
|
4941
5033
|
"use strict";
|
|
4942
|
-
|
|
4943
|
-
|
|
5034
|
+
import_dedupe57 = __toESM(require("classnames/dedupe"));
|
|
5035
|
+
import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4944
5036
|
Cell = ({ ref, ...props }) => {
|
|
4945
|
-
const classes = (0,
|
|
5037
|
+
const classes = (0, import_dedupe57.default)(
|
|
4946
5038
|
"mobius",
|
|
4947
5039
|
"mobius-table__body-cell",
|
|
4948
5040
|
props.className
|
|
4949
5041
|
);
|
|
4950
|
-
return /* @__PURE__ */ (0,
|
|
5042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("td", { ref, ...props, className: classes });
|
|
4951
5043
|
};
|
|
4952
5044
|
Cell.displayName = "Table.Cell";
|
|
4953
5045
|
}
|
|
@@ -4977,37 +5069,6 @@ var init_Table2 = __esm({
|
|
|
4977
5069
|
}
|
|
4978
5070
|
});
|
|
4979
5071
|
|
|
4980
|
-
// src/components/Text/Text.tsx
|
|
4981
|
-
var import_dedupe57, import_Text, import_jsx_runtime66, getElementType, Text;
|
|
4982
|
-
var init_Text = __esm({
|
|
4983
|
-
"src/components/Text/Text.tsx"() {
|
|
4984
|
-
"use strict";
|
|
4985
|
-
import_dedupe57 = __toESM(require("classnames/dedupe"));
|
|
4986
|
-
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
4987
|
-
import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4988
|
-
getElementType = (variant, elementType) => {
|
|
4989
|
-
if (variant) {
|
|
4990
|
-
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
4991
|
-
}
|
|
4992
|
-
return elementType || "p";
|
|
4993
|
-
};
|
|
4994
|
-
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
4995
|
-
const { variant, className, spacing, ...otherProps } = props;
|
|
4996
|
-
const elementType = getElementType(variant, Component);
|
|
4997
|
-
const variantType = variant || elementType;
|
|
4998
|
-
const classes = (0, import_dedupe57.default)(
|
|
4999
|
-
"mobius",
|
|
5000
|
-
"mobius-text",
|
|
5001
|
-
{ [`--is-${variantType}`]: variantType },
|
|
5002
|
-
{ [`--has-line-height-${spacing}`]: spacing },
|
|
5003
|
-
className
|
|
5004
|
-
);
|
|
5005
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
5006
|
-
};
|
|
5007
|
-
Text.displayName = "Text";
|
|
5008
|
-
}
|
|
5009
|
-
});
|
|
5010
|
-
|
|
5011
5072
|
// src/components/Text/index.tsx
|
|
5012
5073
|
var init_Text2 = __esm({
|
|
5013
5074
|
"src/components/Text/index.tsx"() {
|
|
@@ -5017,12 +5078,12 @@ var init_Text2 = __esm({
|
|
|
5017
5078
|
});
|
|
5018
5079
|
|
|
5019
5080
|
// src/components/TextAreaInput/TextAreaInput.tsx
|
|
5020
|
-
var import_dedupe58,
|
|
5081
|
+
var import_dedupe58, import_jsx_runtime68, TextAreaInput;
|
|
5021
5082
|
var init_TextAreaInput = __esm({
|
|
5022
5083
|
"src/components/TextAreaInput/TextAreaInput.tsx"() {
|
|
5023
5084
|
"use strict";
|
|
5024
5085
|
import_dedupe58 = __toESM(require("classnames/dedupe"));
|
|
5025
|
-
|
|
5086
|
+
import_jsx_runtime68 = require("react/jsx-runtime");
|
|
5026
5087
|
TextAreaInput = ({ ref, ...props }) => {
|
|
5027
5088
|
const { isSelected, isDisabled, isReadOnly, isRequired, ...otherProps } = props;
|
|
5028
5089
|
const classes = (0, import_dedupe58.default)(
|
|
@@ -5035,7 +5096,7 @@ var init_TextAreaInput = __esm({
|
|
|
5035
5096
|
},
|
|
5036
5097
|
otherProps.className
|
|
5037
5098
|
);
|
|
5038
|
-
return /* @__PURE__ */ (0,
|
|
5099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5039
5100
|
"textarea",
|
|
5040
5101
|
{
|
|
5041
5102
|
ref,
|
|
@@ -5059,7 +5120,7 @@ var init_TextAreaInput2 = __esm({
|
|
|
5059
5120
|
});
|
|
5060
5121
|
|
|
5061
5122
|
// src/components/TextArea/TextArea.tsx
|
|
5062
|
-
var import_dedupe59, import_TextArea,
|
|
5123
|
+
var import_dedupe59, import_TextArea, import_jsx_runtime69, TextArea;
|
|
5063
5124
|
var init_TextArea = __esm({
|
|
5064
5125
|
"src/components/TextArea/TextArea.tsx"() {
|
|
5065
5126
|
"use strict";
|
|
@@ -5071,7 +5132,7 @@ var init_TextArea = __esm({
|
|
|
5071
5132
|
init_Stack2();
|
|
5072
5133
|
init_TextAreaInput2();
|
|
5073
5134
|
import_TextArea = require("@simplybusiness/mobius/src/components/TextArea/TextArea.css");
|
|
5074
|
-
|
|
5135
|
+
import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5075
5136
|
TextArea = ({ ref, ...props }) => {
|
|
5076
5137
|
const {
|
|
5077
5138
|
isDisabled,
|
|
@@ -5091,9 +5152,9 @@ var init_TextArea = __esm({
|
|
|
5091
5152
|
},
|
|
5092
5153
|
validationClasses
|
|
5093
5154
|
);
|
|
5094
|
-
return /* @__PURE__ */ (0,
|
|
5095
|
-
label && /* @__PURE__ */ (0,
|
|
5096
|
-
/* @__PURE__ */ (0,
|
|
5155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Stack, { className: classes, gap: "xs", children: [
|
|
5156
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Label, { ...labelProps, className: labelClasses, children: props.label }),
|
|
5157
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5097
5158
|
TextAreaInput,
|
|
5098
5159
|
{
|
|
5099
5160
|
...otherProps,
|
|
@@ -5104,7 +5165,7 @@ var init_TextArea = __esm({
|
|
|
5104
5165
|
"aria-invalid": errorMessage != null
|
|
5105
5166
|
}
|
|
5106
5167
|
),
|
|
5107
|
-
/* @__PURE__ */ (0,
|
|
5168
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ErrorMessage, { ...errorMessageProps, errorMessage })
|
|
5108
5169
|
] });
|
|
5109
5170
|
};
|
|
5110
5171
|
TextArea.displayName = "TextArea";
|
|
@@ -5119,53 +5180,6 @@ var init_TextArea2 = __esm({
|
|
|
5119
5180
|
}
|
|
5120
5181
|
});
|
|
5121
5182
|
|
|
5122
|
-
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
5123
|
-
var import_react42, import_jsx_runtime69, isHTML, TextOrHTML;
|
|
5124
|
-
var init_TextOrHTML = __esm({
|
|
5125
|
-
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
5126
|
-
"use strict";
|
|
5127
|
-
import_react42 = require("react");
|
|
5128
|
-
init_Text();
|
|
5129
|
-
import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5130
|
-
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
5131
|
-
TextOrHTML = ({
|
|
5132
|
-
ref,
|
|
5133
|
-
text,
|
|
5134
|
-
htmlClassName,
|
|
5135
|
-
htmlElementType,
|
|
5136
|
-
textWrapper = false,
|
|
5137
|
-
autoDetect = false,
|
|
5138
|
-
...textProps
|
|
5139
|
-
}) => {
|
|
5140
|
-
const textIsHTML = autoDetect && isHTML(text);
|
|
5141
|
-
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
5142
|
-
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
5143
|
-
const DangerousComponent = resolvedElementType;
|
|
5144
|
-
const dangerousHTML = (0, import_react42.useMemo)(() => ({ __html: text }), [text]);
|
|
5145
|
-
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5146
|
-
DangerousComponent,
|
|
5147
|
-
{
|
|
5148
|
-
className: htmlClassName,
|
|
5149
|
-
dangerouslySetInnerHTML: dangerousHTML
|
|
5150
|
-
}
|
|
5151
|
-
);
|
|
5152
|
-
if (shouldWrapInText) {
|
|
5153
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
5154
|
-
}
|
|
5155
|
-
return dangerousElement;
|
|
5156
|
-
};
|
|
5157
|
-
TextOrHTML.displayName = "TextOrHTML";
|
|
5158
|
-
}
|
|
5159
|
-
});
|
|
5160
|
-
|
|
5161
|
-
// src/components/TextOrHTML/index.tsx
|
|
5162
|
-
var init_TextOrHTML2 = __esm({
|
|
5163
|
-
"src/components/TextOrHTML/index.tsx"() {
|
|
5164
|
-
"use strict";
|
|
5165
|
-
init_TextOrHTML();
|
|
5166
|
-
}
|
|
5167
|
-
});
|
|
5168
|
-
|
|
5169
5183
|
// src/components/Title/Title.tsx
|
|
5170
5184
|
var import_dedupe60, import_Title, import_jsx_runtime70, Title;
|
|
5171
5185
|
var init_Title = __esm({
|