@simplybusiness/mobius 5.26.3 → 5.27.1
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 +12 -0
- package/dist/cjs/index.js +507 -385
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/index.js +446 -324
- package/dist/types/src/components/DateField/DateField.d.ts +13 -0
- package/dist/types/src/components/DateField/DateField.stories.d.ts +13 -0
- package/dist/types/src/components/DateField/DateField.test.d.ts +1 -0
- package/dist/types/src/components/DateField/index.d.ts +1 -0
- package/dist/types/src/components/DateField/validation.d.ts +2 -0
- package/dist/types/src/components/DateField/validation.test.d.ts +1 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/DateField/DateField.mdx +113 -0
- package/src/components/DateField/DateField.stories.tsx +120 -0
- package/src/components/DateField/DateField.test.tsx +238 -0
- package/src/components/DateField/DateField.tsx +130 -0
- package/src/components/DateField/index.tsx +1 -0
- package/src/components/DateField/validation.test.ts +82 -0
- package/src/components/DateField/validation.ts +43 -0
- package/src/components/index.tsx +1 -0
package/dist/cjs/index.js
CHANGED
|
@@ -42,6 +42,7 @@ __export(index_exports, {
|
|
|
42
42
|
Combobox: () => Combobox,
|
|
43
43
|
Container: () => Container,
|
|
44
44
|
DEFAULT_BREAKPOINTS: () => DEFAULT_BREAKPOINTS,
|
|
45
|
+
DateField: () => DateField,
|
|
45
46
|
Divider: () => Divider,
|
|
46
47
|
Drawer: () => Drawer2,
|
|
47
48
|
DropdownMenu: () => DropdownMenu2,
|
|
@@ -59,6 +60,7 @@ __export(index_exports, {
|
|
|
59
60
|
LoadingIndicator: () => LoadingIndicator,
|
|
60
61
|
Logo: () => Logo,
|
|
61
62
|
LoqateAddressLookupService: () => LoqateAddressLookupService,
|
|
63
|
+
MIN_MAX_ERROR: () => MIN_MAX_ERROR,
|
|
62
64
|
Modal: () => Modal2,
|
|
63
65
|
NumberField: () => NumberField,
|
|
64
66
|
Option: () => Option2,
|
|
@@ -2342,52 +2344,172 @@ var Container = (0, import_react34.forwardRef)((props, ref) => {
|
|
|
2342
2344
|
});
|
|
2343
2345
|
Container.displayName = "Container";
|
|
2344
2346
|
|
|
2345
|
-
// src/components/
|
|
2347
|
+
// src/components/DateField/DateField.tsx
|
|
2346
2348
|
var import_dedupe19 = __toESM(require("classnames/dedupe"));
|
|
2349
|
+
var import_react35 = require("react");
|
|
2350
|
+
|
|
2351
|
+
// src/components/DateField/validation.ts
|
|
2352
|
+
var convertToDateFormat = (date, format) => {
|
|
2353
|
+
const dateParts = date.split(/[-/]/);
|
|
2354
|
+
const formatParts = format ? format.split(/[-/]/) : ["yyyy", "mm", "dd"];
|
|
2355
|
+
const dateObj = {};
|
|
2356
|
+
const formattedDate = [];
|
|
2357
|
+
for (let i = 0; i < formatParts.length; i++) {
|
|
2358
|
+
dateObj[formatParts[i]] = dateParts[i] ? parseInt(dateParts[i], 10) : 0;
|
|
2359
|
+
}
|
|
2360
|
+
formattedDate.push(dateObj["yyyy"]?.toString() || "0000");
|
|
2361
|
+
formattedDate.push(
|
|
2362
|
+
(dateObj["mm"] < 10 ? "0" : "") + (dateObj["mm"]?.toString() || "00")
|
|
2363
|
+
);
|
|
2364
|
+
formattedDate.push(
|
|
2365
|
+
(dateObj["dd"] < 10 ? "0" : "") + (dateObj["dd"]?.toString() || "00")
|
|
2366
|
+
);
|
|
2367
|
+
return formattedDate.join("-");
|
|
2368
|
+
};
|
|
2369
|
+
var isValidDate = (date, format = "yyyy-mm-dd") => {
|
|
2370
|
+
if (!date) return true;
|
|
2371
|
+
const standardDate = convertToDateFormat(date, format);
|
|
2372
|
+
const [yearStr, monthStr, dayStr] = standardDate.split("-");
|
|
2373
|
+
const year = parseInt(yearStr, 10);
|
|
2374
|
+
const month = parseInt(monthStr, 10);
|
|
2375
|
+
const day = parseInt(dayStr, 10);
|
|
2376
|
+
if (month < 1 || month > 12) {
|
|
2377
|
+
return false;
|
|
2378
|
+
}
|
|
2379
|
+
const daysInMonth = new Date(year, month, 0).getDate();
|
|
2380
|
+
return day > 0 && day <= daysInMonth;
|
|
2381
|
+
};
|
|
2382
|
+
|
|
2383
|
+
// src/components/DateField/DateField.tsx
|
|
2347
2384
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2385
|
+
var MIN_MAX_ERROR = '"min" value should not be greater than "max" value.';
|
|
2386
|
+
var DateField = (0, import_react35.forwardRef)(
|
|
2387
|
+
(props, ref) => {
|
|
2388
|
+
const {
|
|
2389
|
+
min,
|
|
2390
|
+
max,
|
|
2391
|
+
format,
|
|
2392
|
+
className,
|
|
2393
|
+
errorMessage,
|
|
2394
|
+
defaultValue,
|
|
2395
|
+
value,
|
|
2396
|
+
...otherProps
|
|
2397
|
+
} = props;
|
|
2398
|
+
const [error3, setError] = (0, import_react35.useState)(errorMessage);
|
|
2399
|
+
const [isInvalid, setIsInvalid] = (0, import_react35.useState)(void 0);
|
|
2400
|
+
const localRef = (0, import_react35.useRef)(null);
|
|
2401
|
+
const classes = (0, import_dedupe19.default)("mobius-date-field", className);
|
|
2402
|
+
const formattedMin = min ? convertToDateFormat(min, format) : void 0;
|
|
2403
|
+
const formattedMax = max ? convertToDateFormat(max, format) : void 0;
|
|
2404
|
+
const formattedDefaultValue = defaultValue ? convertToDateFormat(defaultValue, format) : void 0;
|
|
2405
|
+
const formattedValue = value ? convertToDateFormat(value, format) : void 0;
|
|
2406
|
+
const setInvalidState = (error4) => {
|
|
2407
|
+
setError(error4);
|
|
2408
|
+
setIsInvalid(true);
|
|
2409
|
+
};
|
|
2410
|
+
const setValidState = () => {
|
|
2411
|
+
setError(props.errorMessage);
|
|
2412
|
+
setIsInvalid(false);
|
|
2413
|
+
};
|
|
2414
|
+
(0, import_react35.useEffect)(() => {
|
|
2415
|
+
if (!isValidDate(min, format)) {
|
|
2416
|
+
setInvalidState(`Invalid min date: ${min}`);
|
|
2417
|
+
return;
|
|
2418
|
+
}
|
|
2419
|
+
if (!isValidDate(max, format)) {
|
|
2420
|
+
setInvalidState(`Invalid max date: ${max}`);
|
|
2421
|
+
return;
|
|
2422
|
+
}
|
|
2423
|
+
if (min && max) {
|
|
2424
|
+
const minDate = new Date(min);
|
|
2425
|
+
const maxDate = new Date(max);
|
|
2426
|
+
if (minDate > maxDate) {
|
|
2427
|
+
setInvalidState(MIN_MAX_ERROR);
|
|
2428
|
+
} else {
|
|
2429
|
+
setValidState();
|
|
2430
|
+
}
|
|
2431
|
+
} else {
|
|
2432
|
+
setValidState();
|
|
2433
|
+
}
|
|
2434
|
+
}, [min, max, format]);
|
|
2435
|
+
const validate = () => {
|
|
2436
|
+
const isValidInput = localRef.current?.checkValidity();
|
|
2437
|
+
if (!isValidInput) {
|
|
2438
|
+
setInvalidState("Invalid date input");
|
|
2439
|
+
} else {
|
|
2440
|
+
setValidState();
|
|
2441
|
+
}
|
|
2442
|
+
};
|
|
2443
|
+
const handleBlur = (event) => {
|
|
2444
|
+
validate();
|
|
2445
|
+
otherProps.onBlur?.(event);
|
|
2446
|
+
};
|
|
2447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2448
|
+
TextField,
|
|
2449
|
+
{
|
|
2450
|
+
ref: mergeRefs([localRef, ref]),
|
|
2451
|
+
className: classes,
|
|
2452
|
+
type: "date",
|
|
2453
|
+
min: formattedMin,
|
|
2454
|
+
max: formattedMax,
|
|
2455
|
+
errorMessage: error3,
|
|
2456
|
+
isInvalid,
|
|
2457
|
+
defaultValue: formattedDefaultValue,
|
|
2458
|
+
value: formattedValue,
|
|
2459
|
+
onBlur: handleBlur,
|
|
2460
|
+
...otherProps
|
|
2461
|
+
}
|
|
2462
|
+
);
|
|
2463
|
+
}
|
|
2464
|
+
);
|
|
2465
|
+
DateField.displayName = "DateField";
|
|
2466
|
+
|
|
2467
|
+
// src/components/Divider/Divider.tsx
|
|
2468
|
+
var import_dedupe20 = __toESM(require("classnames/dedupe"));
|
|
2469
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2348
2470
|
var Divider = ({
|
|
2349
2471
|
"aria-orientation": ariaOrientation = "horizontal",
|
|
2350
2472
|
className,
|
|
2351
2473
|
...rest
|
|
2352
2474
|
}) => {
|
|
2353
|
-
const classes = (0,
|
|
2354
|
-
return /* @__PURE__ */ (0,
|
|
2475
|
+
const classes = (0, import_dedupe20.default)("mobius", "mobius-divider", className);
|
|
2476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2355
2477
|
"div",
|
|
2356
2478
|
{
|
|
2357
2479
|
className: classes,
|
|
2358
2480
|
role: "separator",
|
|
2359
2481
|
"aria-orientation": ariaOrientation,
|
|
2360
2482
|
...rest,
|
|
2361
|
-
children: /* @__PURE__ */ (0,
|
|
2483
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "mobius-divider__inner" })
|
|
2362
2484
|
}
|
|
2363
2485
|
);
|
|
2364
2486
|
};
|
|
2365
2487
|
Divider.displayName = "Divider";
|
|
2366
2488
|
|
|
2367
2489
|
// src/components/Drawer/Content.tsx
|
|
2368
|
-
var
|
|
2369
|
-
var
|
|
2370
|
-
var Content = (0,
|
|
2371
|
-
({ children, ...otherProps }, ref) => /* @__PURE__ */ (0,
|
|
2490
|
+
var import_react36 = require("react");
|
|
2491
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2492
|
+
var Content = (0, import_react36.forwardRef)(
|
|
2493
|
+
({ children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref, ...otherProps, className: "mobius-drawer__content", children })
|
|
2372
2494
|
);
|
|
2373
2495
|
Content.displayName = "Content";
|
|
2374
2496
|
|
|
2375
2497
|
// src/components/Drawer/Drawer.tsx
|
|
2376
|
-
var
|
|
2377
|
-
var
|
|
2498
|
+
var import_dedupe21 = __toESM(require("classnames/dedupe"));
|
|
2499
|
+
var import_react38 = require("react");
|
|
2378
2500
|
|
|
2379
2501
|
// src/components/Drawer/DrawerContext.tsx
|
|
2380
|
-
var
|
|
2381
|
-
var DrawerContext = (0,
|
|
2502
|
+
var import_react37 = require("react");
|
|
2503
|
+
var DrawerContext = (0, import_react37.createContext)({
|
|
2382
2504
|
onClose: () => {
|
|
2383
2505
|
},
|
|
2384
2506
|
closeLabel: void 0
|
|
2385
2507
|
});
|
|
2386
2508
|
|
|
2387
2509
|
// src/components/Drawer/Drawer.tsx
|
|
2388
|
-
var
|
|
2510
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2389
2511
|
var TRANSITION_CSS_VARIABLE = "--drawer-transition-duration";
|
|
2390
|
-
var Drawer = (0,
|
|
2512
|
+
var Drawer = (0, import_react38.forwardRef)((props, ref) => {
|
|
2391
2513
|
const {
|
|
2392
2514
|
isOpen,
|
|
2393
2515
|
className,
|
|
@@ -2398,8 +2520,8 @@ var Drawer = (0, import_react37.forwardRef)((props, ref) => {
|
|
|
2398
2520
|
onClose,
|
|
2399
2521
|
children
|
|
2400
2522
|
} = props;
|
|
2401
|
-
const dialogRef = (0,
|
|
2402
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
2523
|
+
const dialogRef = (0, import_react38.useRef)(null);
|
|
2524
|
+
const [shouldTransition, setShouldTransition] = (0, import_react38.useState)(false);
|
|
2403
2525
|
const { close } = useDialog({
|
|
2404
2526
|
ref: dialogRef,
|
|
2405
2527
|
isOpen,
|
|
@@ -2410,8 +2532,8 @@ var Drawer = (0, import_react37.forwardRef)((props, ref) => {
|
|
|
2410
2532
|
CSSVariable: TRANSITION_CSS_VARIABLE
|
|
2411
2533
|
}
|
|
2412
2534
|
});
|
|
2413
|
-
const hiddenId = `screen-reader-announce-${(0,
|
|
2414
|
-
const dialogClasses = (0,
|
|
2535
|
+
const hiddenId = `screen-reader-announce-${(0, import_react38.useId)()}`;
|
|
2536
|
+
const dialogClasses = (0, import_dedupe21.default)(
|
|
2415
2537
|
"mobius",
|
|
2416
2538
|
"mobius-drawer",
|
|
2417
2539
|
`--${direction}`,
|
|
@@ -2420,27 +2542,27 @@ var Drawer = (0, import_react37.forwardRef)((props, ref) => {
|
|
|
2420
2542
|
"--should-transition": shouldTransition
|
|
2421
2543
|
}
|
|
2422
2544
|
);
|
|
2423
|
-
(0,
|
|
2545
|
+
(0, import_react38.useEffect)(() => {
|
|
2424
2546
|
setShouldTransition(supportsDialog());
|
|
2425
2547
|
}, []);
|
|
2426
|
-
const contextValue = (0,
|
|
2548
|
+
const contextValue = (0, import_react38.useMemo)(
|
|
2427
2549
|
() => ({
|
|
2428
2550
|
onClose: close,
|
|
2429
2551
|
closeLabel
|
|
2430
2552
|
}),
|
|
2431
2553
|
[close, closeLabel]
|
|
2432
2554
|
);
|
|
2433
|
-
return /* @__PURE__ */ (0,
|
|
2555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2434
2556
|
"dialog",
|
|
2435
2557
|
{
|
|
2436
|
-
id: (0,
|
|
2558
|
+
id: (0, import_react38.useId)(),
|
|
2437
2559
|
ref: mergeRefs([dialogRef, ref]),
|
|
2438
2560
|
onCancel: close,
|
|
2439
2561
|
className: dialogClasses,
|
|
2440
2562
|
"aria-describedby": hiddenId,
|
|
2441
2563
|
children: [
|
|
2442
|
-
/* @__PURE__ */ (0,
|
|
2443
|
-
/* @__PURE__ */ (0,
|
|
2564
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { id: hiddenId, children: announce }) }),
|
|
2565
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DrawerContext.Provider, { value: contextValue, children })
|
|
2444
2566
|
]
|
|
2445
2567
|
}
|
|
2446
2568
|
);
|
|
@@ -2448,22 +2570,22 @@ var Drawer = (0, import_react37.forwardRef)((props, ref) => {
|
|
|
2448
2570
|
Drawer.displayName = "Drawer";
|
|
2449
2571
|
|
|
2450
2572
|
// src/components/Drawer/useDrawer.ts
|
|
2451
|
-
var
|
|
2573
|
+
var import_react39 = require("react");
|
|
2452
2574
|
var useDrawer = () => {
|
|
2453
|
-
const { onClose, closeLabel } = (0,
|
|
2575
|
+
const { onClose, closeLabel } = (0, import_react39.useContext)(DrawerContext);
|
|
2454
2576
|
return { onClose, closeLabel };
|
|
2455
2577
|
};
|
|
2456
2578
|
|
|
2457
2579
|
// src/components/Drawer/Header.tsx
|
|
2458
|
-
var
|
|
2580
|
+
var import_react40 = require("react");
|
|
2459
2581
|
var import_icons8 = require("@simplybusiness/icons");
|
|
2460
|
-
var
|
|
2461
|
-
var Header = (0,
|
|
2582
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2583
|
+
var Header = (0, import_react40.forwardRef)(
|
|
2462
2584
|
({ children, ...otherProps }, ref) => {
|
|
2463
2585
|
const { onClose, closeLabel } = useDrawer();
|
|
2464
|
-
return /* @__PURE__ */ (0,
|
|
2586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("header", { ref, ...otherProps, className: "mobius-drawer__header", children: [
|
|
2465
2587
|
children,
|
|
2466
|
-
/* @__PURE__ */ (0,
|
|
2588
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2467
2589
|
Button,
|
|
2468
2590
|
{
|
|
2469
2591
|
"aria-label": "Close",
|
|
@@ -2472,7 +2594,7 @@ var Header = (0, import_react39.forwardRef)(
|
|
|
2472
2594
|
className: "mobius-drawer__close",
|
|
2473
2595
|
size: "sm",
|
|
2474
2596
|
children: [
|
|
2475
|
-
/* @__PURE__ */ (0,
|
|
2597
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { icon: import_icons8.cross }),
|
|
2476
2598
|
" ",
|
|
2477
2599
|
closeLabel
|
|
2478
2600
|
]
|
|
@@ -2491,11 +2613,11 @@ var Drawer2 = Object.assign(Drawer, {
|
|
|
2491
2613
|
Drawer2.displayName = "Drawer";
|
|
2492
2614
|
|
|
2493
2615
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2494
|
-
var
|
|
2616
|
+
var import_react41 = require("react");
|
|
2495
2617
|
var import_react_accessible_dropdown_menu_hook = __toESM(require("react-accessible-dropdown-menu-hook"));
|
|
2496
|
-
var
|
|
2497
|
-
var
|
|
2498
|
-
var DropdownMenu = (0,
|
|
2618
|
+
var import_dedupe22 = __toESM(require("classnames/dedupe"));
|
|
2619
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2620
|
+
var DropdownMenu = (0, import_react41.forwardRef)((props, ref) => {
|
|
2499
2621
|
const {
|
|
2500
2622
|
elementType: Element = "nav",
|
|
2501
2623
|
trigger,
|
|
@@ -2503,21 +2625,21 @@ var DropdownMenu = (0, import_react40.forwardRef)((props, ref) => {
|
|
|
2503
2625
|
children,
|
|
2504
2626
|
...otherProps
|
|
2505
2627
|
} = props;
|
|
2506
|
-
const [activeId, setActiveId] = (0,
|
|
2507
|
-
const numberOfItems =
|
|
2628
|
+
const [activeId, setActiveId] = (0, import_react41.useState)(null);
|
|
2629
|
+
const numberOfItems = import_react41.Children.count(children);
|
|
2508
2630
|
const {
|
|
2509
2631
|
buttonProps,
|
|
2510
2632
|
itemProps,
|
|
2511
2633
|
isOpen: open,
|
|
2512
2634
|
setIsOpen
|
|
2513
2635
|
} = (0, import_react_accessible_dropdown_menu_hook.default)(numberOfItems);
|
|
2514
|
-
const classes = (0,
|
|
2636
|
+
const classes = (0, import_dedupe22.default)(
|
|
2515
2637
|
"mobius",
|
|
2516
2638
|
"mobius-dropdown-menu",
|
|
2517
2639
|
otherProps.className
|
|
2518
2640
|
);
|
|
2519
|
-
const triggerClasses = (0,
|
|
2520
|
-
const listClasses = (0,
|
|
2641
|
+
const triggerClasses = (0, import_dedupe22.default)("mobius", "mobius-dropdown-menu__trigger");
|
|
2642
|
+
const listClasses = (0, import_dedupe22.default)("mobius", "mobius-dropdown-menu__list", {
|
|
2521
2643
|
"--is-open": open
|
|
2522
2644
|
});
|
|
2523
2645
|
const handleChildClick = ({ onClick }, index) => {
|
|
@@ -2527,16 +2649,16 @@ var DropdownMenu = (0, import_react40.forwardRef)((props, ref) => {
|
|
|
2527
2649
|
onClick();
|
|
2528
2650
|
}
|
|
2529
2651
|
};
|
|
2530
|
-
return /* @__PURE__ */ (0,
|
|
2531
|
-
trigger ? (0,
|
|
2652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Element, { ref, ...otherProps, className: classes, children: [
|
|
2653
|
+
trigger ? (0, import_react41.cloneElement)(trigger, {
|
|
2532
2654
|
className: triggerClasses,
|
|
2533
2655
|
open,
|
|
2534
2656
|
label,
|
|
2535
2657
|
...buttonProps
|
|
2536
|
-
}) : /* @__PURE__ */ (0,
|
|
2537
|
-
/* @__PURE__ */ (0,
|
|
2538
|
-
if ((0,
|
|
2539
|
-
return (0,
|
|
2658
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button, { className: triggerClasses, ...buttonProps, children: label }),
|
|
2659
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("ul", { className: listClasses, role: "menu", children: import_react41.Children.map(children, (child, index) => {
|
|
2660
|
+
if ((0, import_react41.isValidElement)(child)) {
|
|
2661
|
+
return (0, import_react41.cloneElement)(child, {
|
|
2540
2662
|
onClick: () => handleChildClick(child.props, index),
|
|
2541
2663
|
active: index === activeId,
|
|
2542
2664
|
...itemProps[index]
|
|
@@ -2549,10 +2671,10 @@ var DropdownMenu = (0, import_react40.forwardRef)((props, ref) => {
|
|
|
2549
2671
|
DropdownMenu.displayName = "DropdownMenu";
|
|
2550
2672
|
|
|
2551
2673
|
// src/components/DropdownMenu/Item.tsx
|
|
2552
|
-
var
|
|
2553
|
-
var
|
|
2554
|
-
var
|
|
2555
|
-
var Item = (0,
|
|
2674
|
+
var import_react42 = require("react");
|
|
2675
|
+
var import_dedupe23 = __toESM(require("classnames/dedupe"));
|
|
2676
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2677
|
+
var Item = (0, import_react42.forwardRef)(
|
|
2556
2678
|
(props, ref) => {
|
|
2557
2679
|
const {
|
|
2558
2680
|
elementType: Element = "li",
|
|
@@ -2561,20 +2683,20 @@ var Item = (0, import_react41.forwardRef)(
|
|
|
2561
2683
|
children,
|
|
2562
2684
|
...otherProps
|
|
2563
2685
|
} = props;
|
|
2564
|
-
const classes = (0,
|
|
2686
|
+
const classes = (0, import_dedupe23.default)(
|
|
2565
2687
|
"mobius",
|
|
2566
2688
|
"mobius-dropdown-menu__item",
|
|
2567
2689
|
{ "--is-active": active },
|
|
2568
2690
|
otherProps.className
|
|
2569
2691
|
);
|
|
2570
|
-
return /* @__PURE__ */ (0,
|
|
2571
|
-
if ((0,
|
|
2572
|
-
const childClasses = (0,
|
|
2573
|
-
return (0,
|
|
2692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Element, { ref, onClick, ...otherProps, children: import_react42.Children.map(children, (child) => {
|
|
2693
|
+
if ((0, import_react42.isValidElement)(child)) {
|
|
2694
|
+
const childClasses = (0, import_dedupe23.default)(child.props.className, classes);
|
|
2695
|
+
return (0, import_react42.cloneElement)(child, {
|
|
2574
2696
|
className: childClasses
|
|
2575
2697
|
});
|
|
2576
2698
|
}
|
|
2577
|
-
return /* @__PURE__ */ (0,
|
|
2699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: classes, children: child });
|
|
2578
2700
|
}) });
|
|
2579
2701
|
}
|
|
2580
2702
|
);
|
|
@@ -2590,16 +2712,16 @@ var DropdownMenu2 = Object.assign(
|
|
|
2590
2712
|
DropdownMenu2.displayName = "DropdownMenu";
|
|
2591
2713
|
|
|
2592
2714
|
// src/components/Fieldset/Fieldset.tsx
|
|
2593
|
-
var
|
|
2594
|
-
var
|
|
2595
|
-
var
|
|
2715
|
+
var import_dedupe24 = __toESM(require("classnames/dedupe"));
|
|
2716
|
+
var import_react43 = require("react");
|
|
2717
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2596
2718
|
var useFieldset = (props) => {
|
|
2597
2719
|
const { legend } = props;
|
|
2598
2720
|
let legendProps = {};
|
|
2599
2721
|
let containerProps = {
|
|
2600
2722
|
role: "group"
|
|
2601
2723
|
};
|
|
2602
|
-
const legendId = (0,
|
|
2724
|
+
const legendId = (0, import_react43.useId)();
|
|
2603
2725
|
if (legend) {
|
|
2604
2726
|
legendProps = {
|
|
2605
2727
|
...legendProps,
|
|
@@ -2615,28 +2737,28 @@ var useFieldset = (props) => {
|
|
|
2615
2737
|
containerProps
|
|
2616
2738
|
};
|
|
2617
2739
|
};
|
|
2618
|
-
var Fieldset = (0,
|
|
2740
|
+
var Fieldset = (0, import_react43.forwardRef)((props, _ref) => {
|
|
2619
2741
|
const {
|
|
2620
2742
|
children,
|
|
2621
2743
|
legend,
|
|
2622
|
-
legendComponent = /* @__PURE__ */ (0,
|
|
2744
|
+
legendComponent = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("legend", {}),
|
|
2623
2745
|
...otherProps
|
|
2624
2746
|
} = props;
|
|
2625
2747
|
const { legendProps, containerProps } = useFieldset(props);
|
|
2626
|
-
const classes = (0,
|
|
2748
|
+
const classes = (0, import_dedupe24.default)("mobius", "mobius-fieldset", props.className);
|
|
2627
2749
|
legendProps.className = "mobius-fieldset__legend";
|
|
2628
|
-
return /* @__PURE__ */ (0,
|
|
2629
|
-
legend && (0,
|
|
2750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Flex, { ...containerProps, ...otherProps, className: classes, children: [
|
|
2751
|
+
legend && (0, import_react43.cloneElement)(legendComponent, { ...legendProps }, [legend]),
|
|
2630
2752
|
children
|
|
2631
2753
|
] });
|
|
2632
2754
|
});
|
|
2633
2755
|
Fieldset.displayName = "Fieldset";
|
|
2634
2756
|
|
|
2635
2757
|
// src/components/Grid/Grid.tsx
|
|
2636
|
-
var
|
|
2637
|
-
var
|
|
2638
|
-
var
|
|
2639
|
-
var Grid = (0,
|
|
2758
|
+
var import_react44 = require("react");
|
|
2759
|
+
var import_dedupe25 = __toESM(require("classnames/dedupe"));
|
|
2760
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2761
|
+
var Grid = (0, import_react44.forwardRef)(
|
|
2640
2762
|
(props, _ref) => {
|
|
2641
2763
|
const {
|
|
2642
2764
|
columns = 12,
|
|
@@ -2651,7 +2773,7 @@ var Grid = (0, import_react43.forwardRef)(
|
|
|
2651
2773
|
style,
|
|
2652
2774
|
...rest
|
|
2653
2775
|
} = props;
|
|
2654
|
-
const classes = (0,
|
|
2776
|
+
const classes = (0, import_dedupe25.default)("mobius", "mobius-grid", className);
|
|
2655
2777
|
const styles = filterUndefinedProps({
|
|
2656
2778
|
boxSizing: "border-box",
|
|
2657
2779
|
display: "grid",
|
|
@@ -2665,22 +2787,22 @@ var Grid = (0, import_react43.forwardRef)(
|
|
|
2665
2787
|
justifyItems,
|
|
2666
2788
|
...style
|
|
2667
2789
|
});
|
|
2668
|
-
return /* @__PURE__ */ (0,
|
|
2790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: styles, className: classes, ...rest });
|
|
2669
2791
|
}
|
|
2670
2792
|
);
|
|
2671
2793
|
Grid.displayName = "Grid";
|
|
2672
2794
|
|
|
2673
2795
|
// src/components/Grid/Item.tsx
|
|
2674
|
-
var
|
|
2675
|
-
var
|
|
2676
|
-
var
|
|
2796
|
+
var import_react45 = require("react");
|
|
2797
|
+
var import_dedupe26 = __toESM(require("classnames/dedupe"));
|
|
2798
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2677
2799
|
var getBreakpointMap = (config) => Object.entries(config).reduce((prev, [key, value]) => {
|
|
2678
2800
|
const previous = Object.values(prev);
|
|
2679
2801
|
const lastDefined = previous[previous.length - 1];
|
|
2680
2802
|
return { ...prev, [key]: value || lastDefined };
|
|
2681
2803
|
}, {});
|
|
2682
2804
|
var DEFAULT_SPAN = 12;
|
|
2683
|
-
var GridItem = (0,
|
|
2805
|
+
var GridItem = (0, import_react45.forwardRef)((props, _ref) => {
|
|
2684
2806
|
const {
|
|
2685
2807
|
breakpoint: { size: breakpointSize }
|
|
2686
2808
|
} = useBreakpoint();
|
|
@@ -2705,9 +2827,9 @@ var GridItem = (0, import_react44.forwardRef)((props, _ref) => {
|
|
|
2705
2827
|
xl,
|
|
2706
2828
|
xxl
|
|
2707
2829
|
});
|
|
2708
|
-
const [responsiveSpan, setResponsiveSpan] = (0,
|
|
2709
|
-
const classes = (0,
|
|
2710
|
-
(0,
|
|
2830
|
+
const [responsiveSpan, setResponsiveSpan] = (0, import_react45.useState)();
|
|
2831
|
+
const classes = (0, import_dedupe26.default)("mobius-grid__item", className);
|
|
2832
|
+
(0, import_react45.useEffect)(() => {
|
|
2711
2833
|
setResponsiveSpan(breakpointMap[breakpointSize]);
|
|
2712
2834
|
}, [breakpointSize, breakpointMap]);
|
|
2713
2835
|
const styles = {
|
|
@@ -2715,7 +2837,7 @@ var GridItem = (0, import_react44.forwardRef)((props, _ref) => {
|
|
|
2715
2837
|
alignSelf,
|
|
2716
2838
|
justifySelf
|
|
2717
2839
|
};
|
|
2718
|
-
return /* @__PURE__ */ (0,
|
|
2840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { ...styles }, className: classes, ...rest });
|
|
2719
2841
|
});
|
|
2720
2842
|
GridItem.displayName = "GridItem";
|
|
2721
2843
|
|
|
@@ -2726,22 +2848,22 @@ var Grid2 = Object.assign(Grid, {
|
|
|
2726
2848
|
Grid2.displayName = "Grid";
|
|
2727
2849
|
|
|
2728
2850
|
// src/components/Image/Image.tsx
|
|
2729
|
-
var
|
|
2730
|
-
var
|
|
2731
|
-
var
|
|
2732
|
-
var Image = (0,
|
|
2851
|
+
var import_react46 = require("react");
|
|
2852
|
+
var import_dedupe27 = __toESM(require("classnames/dedupe"));
|
|
2853
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2854
|
+
var Image = (0, import_react46.forwardRef)(
|
|
2733
2855
|
({ alt, elementType: Component = "img", ...otherProps }, ref) => {
|
|
2734
|
-
const classes = (0,
|
|
2735
|
-
return /* @__PURE__ */ (0,
|
|
2856
|
+
const classes = (0, import_dedupe27.default)("mobius", "mobius-image", otherProps.className);
|
|
2857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Component, { alt, ref, ...otherProps, className: classes });
|
|
2736
2858
|
}
|
|
2737
2859
|
);
|
|
2738
2860
|
Image.displayName = "Image";
|
|
2739
2861
|
|
|
2740
2862
|
// src/components/Link/Link.tsx
|
|
2741
|
-
var
|
|
2742
|
-
var
|
|
2743
|
-
var
|
|
2744
|
-
var Link = (0,
|
|
2863
|
+
var import_react47 = require("react");
|
|
2864
|
+
var import_dedupe28 = __toESM(require("classnames/dedupe"));
|
|
2865
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2866
|
+
var Link = (0, import_react47.forwardRef)(
|
|
2745
2867
|
(props, ref) => {
|
|
2746
2868
|
const {
|
|
2747
2869
|
isDisabled = false,
|
|
@@ -2754,10 +2876,10 @@ var Link = (0, import_react46.forwardRef)(
|
|
|
2754
2876
|
pointerEvents: "none"
|
|
2755
2877
|
};
|
|
2756
2878
|
const styles = { ...style, ...isDisabled && disabledStyles };
|
|
2757
|
-
const classes = (0,
|
|
2879
|
+
const classes = (0, import_dedupe28.default)("mobius", "mobius-link", className, {
|
|
2758
2880
|
"--is-disabled": isDisabled
|
|
2759
2881
|
});
|
|
2760
|
-
return /* @__PURE__ */ (0,
|
|
2882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2761
2883
|
Component,
|
|
2762
2884
|
{
|
|
2763
2885
|
ref,
|
|
@@ -2773,8 +2895,8 @@ var Link = (0, import_react46.forwardRef)(
|
|
|
2773
2895
|
Link.displayName = "Link";
|
|
2774
2896
|
|
|
2775
2897
|
// src/components/LinkButton/LinkButton.tsx
|
|
2776
|
-
var
|
|
2777
|
-
var
|
|
2898
|
+
var import_dedupe29 = __toESM(require("classnames/dedupe"));
|
|
2899
|
+
var import_jsx_runtime36 = (
|
|
2778
2900
|
// @ts-expect-error Button only allows elementType of string, not React component
|
|
2779
2901
|
require("react/jsx-runtime")
|
|
2780
2902
|
);
|
|
@@ -2788,15 +2910,15 @@ function LinkButton({
|
|
|
2788
2910
|
if (!href) {
|
|
2789
2911
|
throw new Error("LinkButton requires a href prop");
|
|
2790
2912
|
}
|
|
2791
|
-
const classes = (0,
|
|
2792
|
-
return /* @__PURE__ */ (0,
|
|
2913
|
+
const classes = (0, import_dedupe29.default)("mobius", "mobius-link-button", className);
|
|
2914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { elementType, href, className: classes, ...rest, children });
|
|
2793
2915
|
}
|
|
2794
2916
|
|
|
2795
2917
|
// src/components/List/List.tsx
|
|
2796
|
-
var
|
|
2797
|
-
var
|
|
2798
|
-
var
|
|
2799
|
-
var List = (0,
|
|
2918
|
+
var import_react48 = require("react");
|
|
2919
|
+
var import_dedupe30 = __toESM(require("classnames/dedupe"));
|
|
2920
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2921
|
+
var List = (0, import_react48.forwardRef)(
|
|
2800
2922
|
(props, ref) => {
|
|
2801
2923
|
const Component = props.isOrdered ? "ol" : "ul";
|
|
2802
2924
|
const { children, icon, ...otherProps } = props;
|
|
@@ -2805,7 +2927,7 @@ var List = (0, import_react47.forwardRef)(
|
|
|
2805
2927
|
...restProps,
|
|
2806
2928
|
reversed: isReversed
|
|
2807
2929
|
};
|
|
2808
|
-
const classes = (0,
|
|
2930
|
+
const classes = (0, import_dedupe30.default)(
|
|
2809
2931
|
"mobius",
|
|
2810
2932
|
"mobius-list",
|
|
2811
2933
|
{
|
|
@@ -2814,9 +2936,9 @@ var List = (0, import_react47.forwardRef)(
|
|
|
2814
2936
|
},
|
|
2815
2937
|
otherProps.className
|
|
2816
2938
|
);
|
|
2817
|
-
return /* @__PURE__ */ (0,
|
|
2818
|
-
if ((0,
|
|
2819
|
-
return (0,
|
|
2939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Component, { ref, ...mappedProps, className: classes, children: import_react48.Children.map(children, (child) => {
|
|
2940
|
+
if ((0, import_react48.isValidElement)(child)) {
|
|
2941
|
+
return (0, import_react48.cloneElement)(child, {
|
|
2820
2942
|
parentIcon: icon
|
|
2821
2943
|
});
|
|
2822
2944
|
}
|
|
@@ -2827,13 +2949,13 @@ var List = (0, import_react47.forwardRef)(
|
|
|
2827
2949
|
List.displayName = "List";
|
|
2828
2950
|
|
|
2829
2951
|
// src/components/List/ListItem.tsx
|
|
2830
|
-
var
|
|
2831
|
-
var
|
|
2832
|
-
var
|
|
2833
|
-
var ListItem = (0,
|
|
2952
|
+
var import_react49 = require("react");
|
|
2953
|
+
var import_dedupe31 = __toESM(require("classnames/dedupe"));
|
|
2954
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2955
|
+
var ListItem = (0, import_react49.forwardRef)((props, ref) => {
|
|
2834
2956
|
const { parentIcon, icon, children, ...otherProps } = props;
|
|
2835
2957
|
const iconContent = icon || parentIcon;
|
|
2836
|
-
const classes = (0,
|
|
2958
|
+
const classes = (0, import_dedupe31.default)(
|
|
2837
2959
|
"mobius",
|
|
2838
2960
|
"mobius-list__item",
|
|
2839
2961
|
{
|
|
@@ -2841,42 +2963,42 @@ var ListItem = (0, import_react48.forwardRef)((props, ref) => {
|
|
|
2841
2963
|
},
|
|
2842
2964
|
props.className
|
|
2843
2965
|
);
|
|
2844
|
-
const contentClasses = (0,
|
|
2845
|
-
const iconClasses = (0,
|
|
2966
|
+
const contentClasses = (0, import_dedupe31.default)("mobius", "mobius-list__item-content");
|
|
2967
|
+
const iconClasses = (0, import_dedupe31.default)("mobius", "mobius-list__icon");
|
|
2846
2968
|
if (iconContent) {
|
|
2847
|
-
return /* @__PURE__ */ (0,
|
|
2848
|
-
/* @__PURE__ */ (0,
|
|
2969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("li", { ref, ...otherProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: contentClasses, children: [
|
|
2970
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: iconClasses, children: iconContent }),
|
|
2849
2971
|
children
|
|
2850
2972
|
] }) });
|
|
2851
2973
|
}
|
|
2852
|
-
return /* @__PURE__ */ (0,
|
|
2974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("li", { ref, ...otherProps, className: classes, children });
|
|
2853
2975
|
});
|
|
2854
2976
|
ListItem.displayName = "ListItem";
|
|
2855
2977
|
|
|
2856
2978
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
2857
|
-
var
|
|
2858
|
-
var
|
|
2979
|
+
var import_react50 = require("react");
|
|
2980
|
+
var import_dedupe32 = __toESM(require("classnames/dedupe"));
|
|
2859
2981
|
var import_icons9 = require("@simplybusiness/icons");
|
|
2860
|
-
var
|
|
2861
|
-
var LoadingIndicator = (0,
|
|
2982
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2983
|
+
var LoadingIndicator = (0, import_react50.forwardRef)((props, ref) => {
|
|
2862
2984
|
const { icon = import_icons9.loading, ...otherProps } = props;
|
|
2863
|
-
const classes = (0,
|
|
2985
|
+
const classes = (0, import_dedupe32.default)(
|
|
2864
2986
|
"mobius",
|
|
2865
2987
|
"mobius-loading-indicator",
|
|
2866
2988
|
otherProps.className
|
|
2867
2989
|
);
|
|
2868
|
-
return /* @__PURE__ */ (0,
|
|
2990
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { icon, spin: true, ref, ...otherProps, className: classes });
|
|
2869
2991
|
});
|
|
2870
2992
|
LoadingIndicator.displayName = "LoadingIndicator";
|
|
2871
2993
|
|
|
2872
2994
|
// src/components/Logo/Logo.tsx
|
|
2873
|
-
var
|
|
2874
|
-
var
|
|
2875
|
-
var
|
|
2876
|
-
var Logo = (0,
|
|
2995
|
+
var import_react51 = require("react");
|
|
2996
|
+
var import_dedupe33 = __toESM(require("classnames/dedupe"));
|
|
2997
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2998
|
+
var Logo = (0, import_react51.forwardRef)((props, ref) => {
|
|
2877
2999
|
const { className, width, height, ...otherProps } = props;
|
|
2878
|
-
const classes = (0,
|
|
2879
|
-
return /* @__PURE__ */ (0,
|
|
3000
|
+
const classes = (0, import_dedupe33.default)("mobius", "mobius-logo", className);
|
|
3001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2880
3002
|
"svg",
|
|
2881
3003
|
{
|
|
2882
3004
|
width,
|
|
@@ -2886,7 +3008,7 @@ var Logo = (0, import_react50.forwardRef)((props, ref) => {
|
|
|
2886
3008
|
viewBox: "0 0 144 37",
|
|
2887
3009
|
...otherProps,
|
|
2888
3010
|
children: [
|
|
2889
|
-
/* @__PURE__ */ (0,
|
|
3011
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2890
3012
|
"linearGradient",
|
|
2891
3013
|
{
|
|
2892
3014
|
id: "logo-gradient",
|
|
@@ -2895,27 +3017,27 @@ var Logo = (0, import_react50.forwardRef)((props, ref) => {
|
|
|
2895
3017
|
y1: "76.042%",
|
|
2896
3018
|
y2: "26.973%",
|
|
2897
3019
|
children: [
|
|
2898
|
-
/* @__PURE__ */ (0,
|
|
2899
|
-
/* @__PURE__ */ (0,
|
|
3020
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { stopColor: "#4632D8", offset: "0%" }),
|
|
3021
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { stopColor: "#9084E8", offset: "100%" })
|
|
2900
3022
|
]
|
|
2901
3023
|
}
|
|
2902
3024
|
) }),
|
|
2903
|
-
/* @__PURE__ */ (0,
|
|
2904
|
-
/* @__PURE__ */ (0,
|
|
3025
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("g", { children: [
|
|
3026
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2905
3027
|
"path",
|
|
2906
3028
|
{
|
|
2907
3029
|
fill: "#0E0A2B",
|
|
2908
3030
|
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"
|
|
2909
3031
|
}
|
|
2910
3032
|
),
|
|
2911
|
-
/* @__PURE__ */ (0,
|
|
3033
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2912
3034
|
"path",
|
|
2913
3035
|
{
|
|
2914
3036
|
fill: "url(#logo-gradient)",
|
|
2915
3037
|
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"
|
|
2916
3038
|
}
|
|
2917
3039
|
),
|
|
2918
|
-
/* @__PURE__ */ (0,
|
|
3040
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2919
3041
|
"path",
|
|
2920
3042
|
{
|
|
2921
3043
|
fill: "#0E0A2B",
|
|
@@ -2930,23 +3052,23 @@ var Logo = (0, import_react50.forwardRef)((props, ref) => {
|
|
|
2930
3052
|
Logo.displayName = "Logo";
|
|
2931
3053
|
|
|
2932
3054
|
// src/components/Modal/Content.tsx
|
|
2933
|
-
var
|
|
2934
|
-
var
|
|
2935
|
-
var Content2 = (0,
|
|
2936
|
-
({ children, ...otherProps }, ref) => /* @__PURE__ */ (0,
|
|
3055
|
+
var import_react52 = require("react");
|
|
3056
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3057
|
+
var Content2 = (0, import_react52.forwardRef)(
|
|
3058
|
+
({ children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { ref, ...otherProps, className: "mobius-modal__content", children })
|
|
2937
3059
|
);
|
|
2938
3060
|
Content2.displayName = "Content";
|
|
2939
3061
|
|
|
2940
3062
|
// src/components/Modal/Header.tsx
|
|
2941
|
-
var
|
|
3063
|
+
var import_react55 = require("react");
|
|
2942
3064
|
var import_icons10 = require("@simplybusiness/icons");
|
|
2943
3065
|
|
|
2944
3066
|
// src/components/Modal/useModal.ts
|
|
2945
|
-
var
|
|
3067
|
+
var import_react54 = require("react");
|
|
2946
3068
|
|
|
2947
3069
|
// src/components/Modal/ModalContext.tsx
|
|
2948
|
-
var
|
|
2949
|
-
var ModalContext = (0,
|
|
3070
|
+
var import_react53 = require("react");
|
|
3071
|
+
var ModalContext = (0, import_react53.createContext)({
|
|
2950
3072
|
onClose: () => {
|
|
2951
3073
|
},
|
|
2952
3074
|
closeLabel: void 0
|
|
@@ -2954,18 +3076,18 @@ var ModalContext = (0, import_react52.createContext)({
|
|
|
2954
3076
|
|
|
2955
3077
|
// src/components/Modal/useModal.ts
|
|
2956
3078
|
var useModal = () => {
|
|
2957
|
-
const { onClose, closeLabel } = (0,
|
|
3079
|
+
const { onClose, closeLabel } = (0, import_react54.useContext)(ModalContext);
|
|
2958
3080
|
return { onClose, closeLabel };
|
|
2959
3081
|
};
|
|
2960
3082
|
|
|
2961
3083
|
// src/components/Modal/Header.tsx
|
|
2962
|
-
var
|
|
2963
|
-
var Header2 = (0,
|
|
3084
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3085
|
+
var Header2 = (0, import_react55.forwardRef)(
|
|
2964
3086
|
({ children, ...otherProps }, ref) => {
|
|
2965
3087
|
const { onClose, closeLabel } = useModal();
|
|
2966
|
-
return /* @__PURE__ */ (0,
|
|
3088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("header", { ref, ...otherProps, className: "mobius-modal__header", children: [
|
|
2967
3089
|
children,
|
|
2968
|
-
/* @__PURE__ */ (0,
|
|
3090
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2969
3091
|
Button,
|
|
2970
3092
|
{
|
|
2971
3093
|
"aria-label": "Close",
|
|
@@ -2973,7 +3095,7 @@ var Header2 = (0, import_react54.forwardRef)(
|
|
|
2973
3095
|
onPress: onClose,
|
|
2974
3096
|
className: "mobius-modal__close",
|
|
2975
3097
|
children: [
|
|
2976
|
-
/* @__PURE__ */ (0,
|
|
3098
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { icon: import_icons10.cross }),
|
|
2977
3099
|
" ",
|
|
2978
3100
|
closeLabel
|
|
2979
3101
|
]
|
|
@@ -2985,11 +3107,11 @@ var Header2 = (0, import_react54.forwardRef)(
|
|
|
2985
3107
|
Header2.displayName = "Header";
|
|
2986
3108
|
|
|
2987
3109
|
// src/components/Modal/Modal.tsx
|
|
2988
|
-
var
|
|
2989
|
-
var
|
|
2990
|
-
var
|
|
3110
|
+
var import_dedupe34 = __toESM(require("classnames/dedupe"));
|
|
3111
|
+
var import_react56 = require("react");
|
|
3112
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2991
3113
|
var TRANSITION_CSS_VARIABLE2 = "--modal-transition-duration";
|
|
2992
|
-
var Modal = (0,
|
|
3114
|
+
var Modal = (0, import_react56.forwardRef)((props, ref) => {
|
|
2993
3115
|
const {
|
|
2994
3116
|
isOpen,
|
|
2995
3117
|
onClose,
|
|
@@ -3007,7 +3129,7 @@ var Modal = (0, import_react55.forwardRef)((props, ref) => {
|
|
|
3007
3129
|
parentSelector,
|
|
3008
3130
|
...rest
|
|
3009
3131
|
} = props;
|
|
3010
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
3132
|
+
const [shouldTransition, setShouldTransition] = (0, import_react56.useState)(false);
|
|
3011
3133
|
useDeprecationWarning({
|
|
3012
3134
|
size,
|
|
3013
3135
|
appElement,
|
|
@@ -3015,10 +3137,10 @@ var Modal = (0, import_react55.forwardRef)((props, ref) => {
|
|
|
3015
3137
|
shouldFocusAfterRender,
|
|
3016
3138
|
parentSelector
|
|
3017
3139
|
});
|
|
3018
|
-
(0,
|
|
3140
|
+
(0, import_react56.useEffect)(() => {
|
|
3019
3141
|
setShouldTransition(supportsDialog());
|
|
3020
3142
|
}, []);
|
|
3021
|
-
const dialogRef = (0,
|
|
3143
|
+
const dialogRef = (0, import_react56.useRef)(null);
|
|
3022
3144
|
const { close } = useDialog({
|
|
3023
3145
|
ref: dialogRef,
|
|
3024
3146
|
isOpen,
|
|
@@ -3029,7 +3151,7 @@ var Modal = (0, import_react55.forwardRef)((props, ref) => {
|
|
|
3029
3151
|
CSSVariable: TRANSITION_CSS_VARIABLE2
|
|
3030
3152
|
}
|
|
3031
3153
|
});
|
|
3032
|
-
const modalClasses = (0,
|
|
3154
|
+
const modalClasses = (0, import_dedupe34.default)(
|
|
3033
3155
|
"mobius",
|
|
3034
3156
|
"mobius-modal",
|
|
3035
3157
|
{
|
|
@@ -3042,21 +3164,21 @@ var Modal = (0, import_react55.forwardRef)((props, ref) => {
|
|
|
3042
3164
|
},
|
|
3043
3165
|
className
|
|
3044
3166
|
);
|
|
3045
|
-
const contextValue = (0,
|
|
3167
|
+
const contextValue = (0, import_react56.useMemo)(
|
|
3046
3168
|
() => ({
|
|
3047
3169
|
onClose: close,
|
|
3048
3170
|
closeLabel
|
|
3049
3171
|
}),
|
|
3050
3172
|
[close, closeLabel]
|
|
3051
3173
|
);
|
|
3052
|
-
return /* @__PURE__ */ (0,
|
|
3174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3053
3175
|
"dialog",
|
|
3054
3176
|
{
|
|
3055
3177
|
ref: mergeRefs([dialogRef, ref]),
|
|
3056
3178
|
onCancel: close,
|
|
3057
3179
|
className: modalClasses,
|
|
3058
3180
|
...rest,
|
|
3059
|
-
children: /* @__PURE__ */ (0,
|
|
3181
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ModalContext.Provider, { value: contextValue, children })
|
|
3060
3182
|
}
|
|
3061
3183
|
);
|
|
3062
3184
|
});
|
|
@@ -3070,12 +3192,12 @@ var Modal2 = Object.assign(Modal, {
|
|
|
3070
3192
|
Modal2.displayName = "Modal";
|
|
3071
3193
|
|
|
3072
3194
|
// src/components/NumberField/NumberField.tsx
|
|
3073
|
-
var
|
|
3074
|
-
var
|
|
3075
|
-
var
|
|
3076
|
-
var NumberField = (0,
|
|
3195
|
+
var import_dedupe35 = __toESM(require("classnames/dedupe"));
|
|
3196
|
+
var import_react57 = require("react");
|
|
3197
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3198
|
+
var NumberField = (0, import_react57.forwardRef)((props, ref) => {
|
|
3077
3199
|
const { minValue, maxValue, step, defaultValue, className, ...otherProps } = props;
|
|
3078
|
-
const containerClasses = (0,
|
|
3200
|
+
const containerClasses = (0, import_dedupe35.default)("mobius-number-field", className);
|
|
3079
3201
|
const handleBeforeInput = (event) => {
|
|
3080
3202
|
const { data } = event.nativeEvent;
|
|
3081
3203
|
if (step != null && Number.isInteger(step) && data === ".") {
|
|
@@ -3085,7 +3207,7 @@ var NumberField = (0, import_react56.forwardRef)((props, ref) => {
|
|
|
3085
3207
|
event.preventDefault();
|
|
3086
3208
|
}
|
|
3087
3209
|
};
|
|
3088
|
-
return /* @__PURE__ */ (0,
|
|
3210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3089
3211
|
TextField,
|
|
3090
3212
|
{
|
|
3091
3213
|
...otherProps,
|
|
@@ -3103,28 +3225,28 @@ var NumberField = (0, import_react56.forwardRef)((props, ref) => {
|
|
|
3103
3225
|
NumberField.displayName = "NumberField";
|
|
3104
3226
|
|
|
3105
3227
|
// src/components/Option/Option.tsx
|
|
3106
|
-
var
|
|
3107
|
-
var
|
|
3108
|
-
var Option2 = (0,
|
|
3228
|
+
var import_react58 = require("react");
|
|
3229
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3230
|
+
var Option2 = (0, import_react58.forwardRef)((props, ref) => {
|
|
3109
3231
|
const { isDisabled, ...rest } = props;
|
|
3110
3232
|
const mappedProps = {
|
|
3111
3233
|
...rest,
|
|
3112
3234
|
disabled: isDisabled
|
|
3113
3235
|
};
|
|
3114
|
-
return /* @__PURE__ */ (0,
|
|
3236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("option", { ...mappedProps, ref });
|
|
3115
3237
|
});
|
|
3116
3238
|
Option2.displayName = "Option";
|
|
3117
3239
|
|
|
3118
3240
|
// src/components/PasswordField/PasswordField.tsx
|
|
3119
|
-
var
|
|
3120
|
-
var
|
|
3241
|
+
var import_dedupe36 = __toESM(require("classnames/dedupe"));
|
|
3242
|
+
var import_react59 = require("react");
|
|
3121
3243
|
|
|
3122
3244
|
// src/components/PasswordField/ShowHideButton.tsx
|
|
3123
|
-
var
|
|
3245
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3124
3246
|
var ShowHideButton = ({
|
|
3125
3247
|
show = false,
|
|
3126
3248
|
onClick
|
|
3127
|
-
}) => /* @__PURE__ */ (0,
|
|
3249
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3128
3250
|
"button",
|
|
3129
3251
|
{
|
|
3130
3252
|
className: "mobius-password-field__show-button",
|
|
@@ -3140,25 +3262,25 @@ var ShowHideButton = ({
|
|
|
3140
3262
|
);
|
|
3141
3263
|
|
|
3142
3264
|
// src/components/PasswordField/PasswordField.tsx
|
|
3143
|
-
var
|
|
3144
|
-
var PasswordField = (0,
|
|
3265
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3266
|
+
var PasswordField = (0, import_react59.forwardRef)(
|
|
3145
3267
|
({ className, ...props }, ref) => {
|
|
3146
|
-
const [show, setShow] = (0,
|
|
3268
|
+
const [show, setShow] = (0, import_react59.useState)(false);
|
|
3147
3269
|
const type = show ? "text" : "password";
|
|
3148
|
-
const classes = (0,
|
|
3149
|
-
const localRef = (0,
|
|
3270
|
+
const classes = (0, import_dedupe36.default)("mobius-password-field", className);
|
|
3271
|
+
const localRef = (0, import_react59.useRef)(null);
|
|
3150
3272
|
const handleShowHideButtonClick = () => {
|
|
3151
3273
|
setShow((oldShow) => !oldShow);
|
|
3152
3274
|
localRef.current?.focus();
|
|
3153
3275
|
};
|
|
3154
|
-
return /* @__PURE__ */ (0,
|
|
3276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3155
3277
|
TextField,
|
|
3156
3278
|
{
|
|
3157
3279
|
ref: mergeRefs([localRef, ref]),
|
|
3158
3280
|
className: classes,
|
|
3159
3281
|
...props,
|
|
3160
3282
|
type,
|
|
3161
|
-
suffixInside: /* @__PURE__ */ (0,
|
|
3283
|
+
suffixInside: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ShowHideButton, { onClick: handleShowHideButtonClick, show })
|
|
3162
3284
|
}
|
|
3163
3285
|
);
|
|
3164
3286
|
}
|
|
@@ -3166,30 +3288,30 @@ var PasswordField = (0, import_react58.forwardRef)(
|
|
|
3166
3288
|
PasswordField.displayName = "PasswordField";
|
|
3167
3289
|
|
|
3168
3290
|
// src/components/Popover/Popover.tsx
|
|
3169
|
-
var
|
|
3291
|
+
var import_react60 = require("@floating-ui/react");
|
|
3170
3292
|
var import_icons11 = require("@simplybusiness/icons");
|
|
3171
3293
|
var import_classnames3 = __toESM(require("classnames"));
|
|
3172
|
-
var
|
|
3173
|
-
var
|
|
3294
|
+
var import_react61 = require("react");
|
|
3295
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3174
3296
|
var OFFSET_FROM_CONTENT_DEFAULT = 10;
|
|
3175
3297
|
var Popover = (props) => {
|
|
3176
3298
|
const { trigger, children, onOpen, onClose, className } = props;
|
|
3177
|
-
const arrowRef = (0,
|
|
3178
|
-
const [isOpen, setIsOpen] = (0,
|
|
3179
|
-
const { refs, floatingStyles, context } = (0,
|
|
3299
|
+
const arrowRef = (0, import_react61.useRef)(null);
|
|
3300
|
+
const [isOpen, setIsOpen] = (0, import_react61.useState)(false);
|
|
3301
|
+
const { refs, floatingStyles, context } = (0, import_react60.useFloating)({
|
|
3180
3302
|
open: isOpen,
|
|
3181
3303
|
onOpenChange: setIsOpen,
|
|
3182
|
-
whileElementsMounted:
|
|
3304
|
+
whileElementsMounted: import_react60.autoUpdate,
|
|
3183
3305
|
middleware: [
|
|
3184
|
-
(0,
|
|
3306
|
+
(0, import_react60.arrow)({
|
|
3185
3307
|
element: arrowRef
|
|
3186
3308
|
}),
|
|
3187
|
-
(0,
|
|
3188
|
-
(0,
|
|
3189
|
-
(0,
|
|
3309
|
+
(0, import_react60.offset)(OFFSET_FROM_CONTENT_DEFAULT),
|
|
3310
|
+
(0, import_react60.shift)(),
|
|
3311
|
+
(0, import_react60.flip)()
|
|
3190
3312
|
]
|
|
3191
3313
|
});
|
|
3192
|
-
const dismiss = (0,
|
|
3314
|
+
const dismiss = (0, import_react60.useDismiss)(context, {
|
|
3193
3315
|
bubbles: true,
|
|
3194
3316
|
outsidePress: (event) => {
|
|
3195
3317
|
const toggle = refs.reference.current;
|
|
@@ -3200,7 +3322,7 @@ var Popover = (props) => {
|
|
|
3200
3322
|
return true;
|
|
3201
3323
|
}
|
|
3202
3324
|
});
|
|
3203
|
-
const { getReferenceProps, getFloatingProps } = (0,
|
|
3325
|
+
const { getReferenceProps, getFloatingProps } = (0, import_react60.useInteractions)([dismiss]);
|
|
3204
3326
|
const containerClasses = (0, import_classnames3.default)(
|
|
3205
3327
|
"mobius",
|
|
3206
3328
|
"mobius-popover__container",
|
|
@@ -3215,7 +3337,7 @@ var Popover = (props) => {
|
|
|
3215
3337
|
setIsOpen(true);
|
|
3216
3338
|
onOpen?.();
|
|
3217
3339
|
};
|
|
3218
|
-
const triggerComponent = (0,
|
|
3340
|
+
const triggerComponent = (0, import_react61.cloneElement)(trigger, {
|
|
3219
3341
|
ref: refs.setReference,
|
|
3220
3342
|
className: (0, import_classnames3.default)(trigger.props.className, "mobius-popover__toggle"),
|
|
3221
3343
|
onClick: toggleVisibility,
|
|
@@ -3228,9 +3350,9 @@ var Popover = (props) => {
|
|
|
3228
3350
|
e.stopPropagation();
|
|
3229
3351
|
}
|
|
3230
3352
|
});
|
|
3231
|
-
return /* @__PURE__ */ (0,
|
|
3353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
3232
3354
|
triggerComponent,
|
|
3233
|
-
isOpen && /* @__PURE__ */ (0,
|
|
3355
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
3234
3356
|
"div",
|
|
3235
3357
|
{
|
|
3236
3358
|
className: containerClasses,
|
|
@@ -3238,8 +3360,8 @@ var Popover = (props) => {
|
|
|
3238
3360
|
style: floatingStyles,
|
|
3239
3361
|
...getFloatingProps(),
|
|
3240
3362
|
children: [
|
|
3241
|
-
/* @__PURE__ */ (0,
|
|
3242
|
-
/* @__PURE__ */ (0,
|
|
3363
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "mobius-popover", children: [
|
|
3364
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("header", { className: "mobius-popover__header", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3243
3365
|
Button,
|
|
3244
3366
|
{
|
|
3245
3367
|
type: "button",
|
|
@@ -3247,7 +3369,7 @@ var Popover = (props) => {
|
|
|
3247
3369
|
onClick: toggleVisibility,
|
|
3248
3370
|
"aria-label": "Close",
|
|
3249
3371
|
variant: "ghost",
|
|
3250
|
-
children: /* @__PURE__ */ (0,
|
|
3372
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3251
3373
|
Icon,
|
|
3252
3374
|
{
|
|
3253
3375
|
icon: import_icons11.cross,
|
|
@@ -3257,10 +3379,10 @@ var Popover = (props) => {
|
|
|
3257
3379
|
)
|
|
3258
3380
|
}
|
|
3259
3381
|
) }),
|
|
3260
|
-
/* @__PURE__ */ (0,
|
|
3382
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "mobius-popover__body", children })
|
|
3261
3383
|
] }),
|
|
3262
|
-
/* @__PURE__ */ (0,
|
|
3263
|
-
|
|
3384
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3385
|
+
import_react60.FloatingArrow,
|
|
3264
3386
|
{
|
|
3265
3387
|
ref: arrowRef,
|
|
3266
3388
|
context,
|
|
@@ -3275,9 +3397,9 @@ var Popover = (props) => {
|
|
|
3275
3397
|
};
|
|
3276
3398
|
|
|
3277
3399
|
// src/components/Progress/Progress.tsx
|
|
3278
|
-
var
|
|
3279
|
-
var
|
|
3280
|
-
var
|
|
3400
|
+
var import_dedupe37 = __toESM(require("classnames/dedupe"));
|
|
3401
|
+
var import_react62 = require("react");
|
|
3402
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3281
3403
|
function warnAboutInvalidValues(value, minValue, maxValue) {
|
|
3282
3404
|
if (minValue > maxValue) {
|
|
3283
3405
|
console.warn("minValue is greater than maxValue");
|
|
@@ -3295,7 +3417,7 @@ var sanitizedValue = (value, defaultValue) => {
|
|
|
3295
3417
|
};
|
|
3296
3418
|
var getLabelComponent = (label, progressLabelId, showLabel) => {
|
|
3297
3419
|
if (showLabel) {
|
|
3298
|
-
return /* @__PURE__ */ (0,
|
|
3420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3299
3421
|
Label,
|
|
3300
3422
|
{
|
|
3301
3423
|
id: progressLabelId,
|
|
@@ -3305,7 +3427,7 @@ var getLabelComponent = (label, progressLabelId, showLabel) => {
|
|
|
3305
3427
|
}
|
|
3306
3428
|
);
|
|
3307
3429
|
}
|
|
3308
|
-
return /* @__PURE__ */ (0,
|
|
3430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3309
3431
|
Label,
|
|
3310
3432
|
{
|
|
3311
3433
|
id: progressLabelId,
|
|
@@ -3318,9 +3440,9 @@ var getLabelComponent = (label, progressLabelId, showLabel) => {
|
|
|
3318
3440
|
var DEFAULT_VALUE = 0;
|
|
3319
3441
|
var DEFAULT_MIN_VALUE = 0;
|
|
3320
3442
|
var DEFAULT_MAX_VALUE = 100;
|
|
3321
|
-
var Progress = (0,
|
|
3322
|
-
const progressId = (0,
|
|
3323
|
-
const progressLabelId = (0,
|
|
3443
|
+
var Progress = (0, import_react62.forwardRef)((props, ref) => {
|
|
3444
|
+
const progressId = (0, import_react62.useId)();
|
|
3445
|
+
const progressLabelId = (0, import_react62.useId)();
|
|
3324
3446
|
const {
|
|
3325
3447
|
id,
|
|
3326
3448
|
label,
|
|
@@ -3345,7 +3467,7 @@ var Progress = (0, import_react61.forwardRef)((props, ref) => {
|
|
|
3345
3467
|
100
|
|
3346
3468
|
);
|
|
3347
3469
|
const barWidth = `${percentage}%`;
|
|
3348
|
-
const classes = (0,
|
|
3470
|
+
const classes = (0, import_dedupe37.default)("mobius", "mobius-progress", className, {
|
|
3349
3471
|
"--is-primary": variant === "primary",
|
|
3350
3472
|
"--is-secondary": variant === "secondary"
|
|
3351
3473
|
});
|
|
@@ -3355,7 +3477,7 @@ var Progress = (0, import_react61.forwardRef)((props, ref) => {
|
|
|
3355
3477
|
progressBarProps["aria-valuenow"] = value.toString();
|
|
3356
3478
|
progressBarProps["aria-valuetext"] = valueFormatter instanceof Function ? valueFormatter(value, minValue, maxValue) : barWidth;
|
|
3357
3479
|
const labelComponent = getLabelComponent(label, progressLabelId, showLabel);
|
|
3358
|
-
return /* @__PURE__ */ (0,
|
|
3480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
3359
3481
|
"div",
|
|
3360
3482
|
{
|
|
3361
3483
|
id: id || progressId,
|
|
@@ -3366,8 +3488,8 @@ var Progress = (0, import_react61.forwardRef)((props, ref) => {
|
|
|
3366
3488
|
"aria-labelledby": progressLabelId,
|
|
3367
3489
|
children: [
|
|
3368
3490
|
labelComponent,
|
|
3369
|
-
/* @__PURE__ */ (0,
|
|
3370
|
-
showValueLabel && /* @__PURE__ */ (0,
|
|
3491
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mobius-progress__track", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mobius-progress__bar", style: { width: barWidth } }) }),
|
|
3492
|
+
showValueLabel && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Label, { "data-testid": "value-label", elementType: "span", children: progressBarProps["aria-valuetext"] })
|
|
3371
3493
|
]
|
|
3372
3494
|
}
|
|
3373
3495
|
);
|
|
@@ -3375,10 +3497,10 @@ var Progress = (0, import_react61.forwardRef)((props, ref) => {
|
|
|
3375
3497
|
Progress.displayName = "Progress";
|
|
3376
3498
|
|
|
3377
3499
|
// src/components/Radio/Radio.tsx
|
|
3378
|
-
var
|
|
3379
|
-
var
|
|
3380
|
-
var
|
|
3381
|
-
var Radio = (0,
|
|
3500
|
+
var import_dedupe38 = __toESM(require("classnames/dedupe"));
|
|
3501
|
+
var import_react63 = require("react");
|
|
3502
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3503
|
+
var Radio = (0, import_react63.forwardRef)(
|
|
3382
3504
|
(props, ref) => {
|
|
3383
3505
|
const {
|
|
3384
3506
|
children,
|
|
@@ -3405,12 +3527,12 @@ var Radio = (0, import_react62.forwardRef)(
|
|
|
3405
3527
|
"--is-multiline": !!isMultiline,
|
|
3406
3528
|
"--is-required": isRequired
|
|
3407
3529
|
};
|
|
3408
|
-
const containerClasses = (0,
|
|
3530
|
+
const containerClasses = (0, import_dedupe38.default)(
|
|
3409
3531
|
"mobius-radio__label",
|
|
3410
3532
|
radioClasses,
|
|
3411
3533
|
className
|
|
3412
3534
|
);
|
|
3413
|
-
const inputClasses = (0,
|
|
3535
|
+
const inputClasses = (0, import_dedupe38.default)("mobius-radio__input", radioClasses);
|
|
3414
3536
|
const handleClick = (event) => {
|
|
3415
3537
|
if (onChange) {
|
|
3416
3538
|
onChange(event);
|
|
@@ -3425,9 +3547,9 @@ var Radio = (0, import_react62.forwardRef)(
|
|
|
3425
3547
|
"aria-describedby": _ariaDescribedBy,
|
|
3426
3548
|
...rest
|
|
3427
3549
|
} = otherProps;
|
|
3428
|
-
return /* @__PURE__ */ (0,
|
|
3429
|
-
/* @__PURE__ */ (0,
|
|
3430
|
-
/* @__PURE__ */ (0,
|
|
3550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
3551
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Label, { className: containerClasses, children: [
|
|
3552
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3431
3553
|
"input",
|
|
3432
3554
|
{
|
|
3433
3555
|
"aria-describedby": otherProps["aria-describedby"],
|
|
@@ -3444,21 +3566,21 @@ var Radio = (0, import_react62.forwardRef)(
|
|
|
3444
3566
|
...rest
|
|
3445
3567
|
}
|
|
3446
3568
|
),
|
|
3447
|
-
isMultiline ? /* @__PURE__ */ (0,
|
|
3448
|
-
/* @__PURE__ */ (0,
|
|
3449
|
-
/* @__PURE__ */ (0,
|
|
3450
|
-
] }) : /* @__PURE__ */ (0,
|
|
3569
|
+
isMultiline ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "mobius-radio__content--multiline", children: [
|
|
3570
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mobius-radio__content-first-line", children: label }),
|
|
3571
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mobius-radio__extra-content", children })
|
|
3572
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mobius-radio__content", children: label || children })
|
|
3451
3573
|
] }),
|
|
3452
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
3574
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ErrorMessage, { errorMessage })
|
|
3453
3575
|
] });
|
|
3454
3576
|
}
|
|
3455
3577
|
);
|
|
3456
3578
|
Radio.displayName = "Radio";
|
|
3457
3579
|
|
|
3458
3580
|
// src/components/Radio/RadioGroup.tsx
|
|
3459
|
-
var
|
|
3460
|
-
var
|
|
3461
|
-
var
|
|
3581
|
+
var import_react64 = require("react");
|
|
3582
|
+
var import_dedupe39 = __toESM(require("classnames/dedupe"));
|
|
3583
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3462
3584
|
var getDefaultVal = (children, defaultValue) => {
|
|
3463
3585
|
if (Array.isArray(children) && defaultValue) {
|
|
3464
3586
|
const option = children?.find((item) => item.props.value === defaultValue);
|
|
@@ -3467,7 +3589,7 @@ var getDefaultVal = (children, defaultValue) => {
|
|
|
3467
3589
|
}
|
|
3468
3590
|
return "";
|
|
3469
3591
|
};
|
|
3470
|
-
var RadioGroup = (0,
|
|
3592
|
+
var RadioGroup = (0, import_react64.forwardRef)((props, ref) => {
|
|
3471
3593
|
const {
|
|
3472
3594
|
label,
|
|
3473
3595
|
isDisabled = false,
|
|
@@ -3485,7 +3607,7 @@ var RadioGroup = (0, import_react63.forwardRef)((props, ref) => {
|
|
|
3485
3607
|
...rest
|
|
3486
3608
|
} = props;
|
|
3487
3609
|
const defaultSelected = getDefaultVal(children, defaultValue);
|
|
3488
|
-
const [selected, setSelected] = (0,
|
|
3610
|
+
const [selected, setSelected] = (0, import_react64.useState)(defaultSelected);
|
|
3489
3611
|
const validationClasses = useValidationClasses({
|
|
3490
3612
|
validationState,
|
|
3491
3613
|
isInvalid
|
|
@@ -3497,26 +3619,26 @@ var RadioGroup = (0, import_react63.forwardRef)((props, ref) => {
|
|
|
3497
3619
|
[`--is-${orientation}`]: true,
|
|
3498
3620
|
[className || ""]: true
|
|
3499
3621
|
};
|
|
3500
|
-
const radioGroupClasses = (0,
|
|
3622
|
+
const radioGroupClasses = (0, import_dedupe39.default)(
|
|
3501
3623
|
"mobius",
|
|
3502
3624
|
"mobius-radio-group",
|
|
3503
3625
|
radioClasses,
|
|
3504
3626
|
validationClasses
|
|
3505
3627
|
);
|
|
3506
|
-
const radioWrapperClasses = (0,
|
|
3628
|
+
const radioWrapperClasses = (0, import_dedupe39.default)("mobius-radio__wrapper", {
|
|
3507
3629
|
[`--is-${orientation}`]: true
|
|
3508
3630
|
});
|
|
3509
|
-
const labelClasses = (0,
|
|
3510
|
-
const errorMessageId = (0,
|
|
3511
|
-
const defaultNameAttrId = (0,
|
|
3631
|
+
const labelClasses = (0, import_dedupe39.default)(radioClasses, validationClasses);
|
|
3632
|
+
const errorMessageId = (0, import_react64.useId)();
|
|
3633
|
+
const defaultNameAttrId = (0, import_react64.useId)();
|
|
3512
3634
|
const nameAttribute = name || defaultNameAttrId;
|
|
3513
3635
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
3514
3636
|
const describedBy = spaceDelimitedList([
|
|
3515
3637
|
shouldErrorMessageShow,
|
|
3516
3638
|
props["aria-describedby"]
|
|
3517
3639
|
]);
|
|
3518
|
-
const labelId = (0,
|
|
3519
|
-
return /* @__PURE__ */ (0,
|
|
3640
|
+
const labelId = (0, import_react64.useId)();
|
|
3641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3520
3642
|
"div",
|
|
3521
3643
|
{
|
|
3522
3644
|
...rest,
|
|
@@ -3532,11 +3654,11 @@ var RadioGroup = (0, import_react63.forwardRef)((props, ref) => {
|
|
|
3532
3654
|
ref,
|
|
3533
3655
|
className: radioGroupClasses,
|
|
3534
3656
|
role: "radiogroup",
|
|
3535
|
-
children: /* @__PURE__ */ (0,
|
|
3536
|
-
label && /* @__PURE__ */ (0,
|
|
3537
|
-
/* @__PURE__ */ (0,
|
|
3538
|
-
if ((0,
|
|
3539
|
-
return (0,
|
|
3657
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Stack, { gap: "xs", children: [
|
|
3658
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Label, { htmlFor: name, id: labelId, className: labelClasses, children: label }),
|
|
3659
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: radioWrapperClasses, children: import_react64.Children.map(children, (child) => {
|
|
3660
|
+
if ((0, import_react64.isValidElement)(child)) {
|
|
3661
|
+
return (0, import_react64.cloneElement)(child, {
|
|
3540
3662
|
orientation,
|
|
3541
3663
|
groupDisabled: isDisabled,
|
|
3542
3664
|
name: nameAttribute,
|
|
@@ -3549,7 +3671,7 @@ var RadioGroup = (0, import_react63.forwardRef)((props, ref) => {
|
|
|
3549
3671
|
}
|
|
3550
3672
|
return child;
|
|
3551
3673
|
}) }),
|
|
3552
|
-
/* @__PURE__ */ (0,
|
|
3674
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
3553
3675
|
] })
|
|
3554
3676
|
}
|
|
3555
3677
|
);
|
|
@@ -3557,47 +3679,47 @@ var RadioGroup = (0, import_react63.forwardRef)((props, ref) => {
|
|
|
3557
3679
|
RadioGroup.displayName = "RadioGroup";
|
|
3558
3680
|
|
|
3559
3681
|
// src/components/Segment/SegmentGroup.tsx
|
|
3560
|
-
var
|
|
3561
|
-
var
|
|
3682
|
+
var import_dedupe40 = __toESM(require("classnames/dedupe"));
|
|
3683
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3562
3684
|
var SegmentGroup = (props) => {
|
|
3563
3685
|
const { children, horizontal, gap, className, ...rest } = props;
|
|
3564
3686
|
const gapClass = gap ? `gap-${gap}` : "";
|
|
3565
|
-
const classes = (0,
|
|
3687
|
+
const classes = (0, import_dedupe40.default)(
|
|
3566
3688
|
"mobius",
|
|
3567
3689
|
"mobius-segment-group",
|
|
3568
3690
|
className,
|
|
3569
3691
|
{ "--is-horizontal": horizontal },
|
|
3570
3692
|
gapClass
|
|
3571
3693
|
);
|
|
3572
|
-
return /* @__PURE__ */ (0,
|
|
3694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: classes, ...rest, children });
|
|
3573
3695
|
};
|
|
3574
3696
|
SegmentGroup.displayName = "SegmentGroup";
|
|
3575
3697
|
|
|
3576
3698
|
// src/components/Segment/Segment.tsx
|
|
3577
|
-
var
|
|
3578
|
-
var
|
|
3699
|
+
var import_dedupe41 = __toESM(require("classnames/dedupe"));
|
|
3700
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3579
3701
|
var Segment = (props) => {
|
|
3580
3702
|
const { heading, children, colour, inverted, className, ...rest } = props;
|
|
3581
|
-
const classes = (0,
|
|
3703
|
+
const classes = (0, import_dedupe41.default)(
|
|
3582
3704
|
"mobius",
|
|
3583
3705
|
"mobius-segment",
|
|
3584
3706
|
colour,
|
|
3585
3707
|
{ inverted },
|
|
3586
3708
|
className
|
|
3587
3709
|
);
|
|
3588
|
-
return /* @__PURE__ */ (0,
|
|
3589
|
-
heading && /* @__PURE__ */ (0,
|
|
3710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: classes, ...rest, children: [
|
|
3711
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mobius-segment__heading", children: heading }),
|
|
3590
3712
|
children
|
|
3591
3713
|
] });
|
|
3592
3714
|
};
|
|
3593
3715
|
Segment.displayName = "Segment";
|
|
3594
3716
|
|
|
3595
3717
|
// src/components/Select/Select.tsx
|
|
3596
|
-
var
|
|
3597
|
-
var
|
|
3718
|
+
var import_dedupe42 = __toESM(require("classnames/dedupe"));
|
|
3719
|
+
var import_react65 = require("react");
|
|
3598
3720
|
var import_icons12 = require("@simplybusiness/icons");
|
|
3599
|
-
var
|
|
3600
|
-
var Select = (0,
|
|
3721
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3722
|
+
var Select = (0, import_react65.forwardRef)((props, ref) => {
|
|
3601
3723
|
const {
|
|
3602
3724
|
label,
|
|
3603
3725
|
onChange,
|
|
@@ -3621,24 +3743,24 @@ var Select = (0, import_react64.forwardRef)((props, ref) => {
|
|
|
3621
3743
|
"--is-required": typeof isRequired === "boolean" && isRequired,
|
|
3622
3744
|
"--is-optional": typeof isRequired === "boolean" && !isRequired
|
|
3623
3745
|
};
|
|
3624
|
-
const sharedClasses = (0,
|
|
3625
|
-
const wrapperClasses = (0,
|
|
3746
|
+
const sharedClasses = (0, import_dedupe42.default)(validationClasses, stateClasses);
|
|
3747
|
+
const wrapperClasses = (0, import_dedupe42.default)(
|
|
3626
3748
|
"mobius-select__wrapper",
|
|
3627
3749
|
sharedClasses,
|
|
3628
3750
|
otherProps.className
|
|
3629
3751
|
);
|
|
3630
|
-
const selectClasses = (0,
|
|
3752
|
+
const selectClasses = (0, import_dedupe42.default)(
|
|
3631
3753
|
"mobius-select",
|
|
3632
3754
|
sharedClasses,
|
|
3633
3755
|
otherProps.className
|
|
3634
3756
|
);
|
|
3635
|
-
const labelClasses = (0,
|
|
3757
|
+
const labelClasses = (0, import_dedupe42.default)(
|
|
3636
3758
|
"mobius-label",
|
|
3637
3759
|
sharedClasses,
|
|
3638
3760
|
otherProps.className
|
|
3639
3761
|
);
|
|
3640
|
-
const iconClasses = (0,
|
|
3641
|
-
const errorMessageId = (0,
|
|
3762
|
+
const iconClasses = (0, import_dedupe42.default)("mobius-select__icon", sharedClasses);
|
|
3763
|
+
const errorMessageId = (0, import_react65.useId)();
|
|
3642
3764
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
3643
3765
|
const describedBy = spaceDelimitedList([
|
|
3644
3766
|
shouldErrorMessageShow,
|
|
@@ -3649,10 +3771,10 @@ var Select = (0, import_react64.forwardRef)((props, ref) => {
|
|
|
3649
3771
|
onChange(e);
|
|
3650
3772
|
}
|
|
3651
3773
|
};
|
|
3652
|
-
return /* @__PURE__ */ (0,
|
|
3653
|
-
label && /* @__PURE__ */ (0,
|
|
3654
|
-
/* @__PURE__ */ (0,
|
|
3655
|
-
/* @__PURE__ */ (0,
|
|
3774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Stack, { className: "mobius mobius-select__outer", gap: "xs", children: [
|
|
3775
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Label, { ...labelProps, className: labelClasses, children: label }),
|
|
3776
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: wrapperClasses, children: [
|
|
3777
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3656
3778
|
"select",
|
|
3657
3779
|
{
|
|
3658
3780
|
...otherProps,
|
|
@@ -3667,19 +3789,19 @@ var Select = (0, import_react64.forwardRef)((props, ref) => {
|
|
|
3667
3789
|
onChange: handleChange
|
|
3668
3790
|
}
|
|
3669
3791
|
),
|
|
3670
|
-
/* @__PURE__ */ (0,
|
|
3792
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon, { icon: import_icons12.chevronDown }) })
|
|
3671
3793
|
] }),
|
|
3672
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
3794
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
3673
3795
|
] });
|
|
3674
3796
|
});
|
|
3675
3797
|
Select.displayName = "Select";
|
|
3676
3798
|
|
|
3677
3799
|
// src/components/Slider/Slider.tsx
|
|
3678
|
-
var
|
|
3679
|
-
var
|
|
3800
|
+
var import_dedupe43 = __toESM(require("classnames/dedupe"));
|
|
3801
|
+
var import_react67 = require("react");
|
|
3680
3802
|
|
|
3681
3803
|
// src/components/Slider/helpers.ts
|
|
3682
|
-
var
|
|
3804
|
+
var import_react66 = require("react");
|
|
3683
3805
|
function numberFormatter(value, formatOptions, locale = navigator.languages?.[0] || "en-GB") {
|
|
3684
3806
|
if (!formatOptions) {
|
|
3685
3807
|
return value?.toString() || "";
|
|
@@ -3688,7 +3810,7 @@ function numberFormatter(value, formatOptions, locale = navigator.languages?.[0]
|
|
|
3688
3810
|
}
|
|
3689
3811
|
|
|
3690
3812
|
// src/components/Slider/Slider.tsx
|
|
3691
|
-
var
|
|
3813
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3692
3814
|
var Slider = (props) => {
|
|
3693
3815
|
const {
|
|
3694
3816
|
id,
|
|
@@ -3709,11 +3831,11 @@ var Slider = (props) => {
|
|
|
3709
3831
|
formatOptions,
|
|
3710
3832
|
isDisabled = false
|
|
3711
3833
|
} = props;
|
|
3712
|
-
const trackRef = (0,
|
|
3713
|
-
const [currentValue, setCurrentValue] = (0,
|
|
3834
|
+
const trackRef = (0, import_react67.useRef)(null);
|
|
3835
|
+
const [currentValue, setCurrentValue] = (0, import_react67.useState)(
|
|
3714
3836
|
value || defaultValue || 0
|
|
3715
3837
|
);
|
|
3716
|
-
const [isDragging, setIsDraggging] = (0,
|
|
3838
|
+
const [isDragging, setIsDraggging] = (0, import_react67.useState)(false);
|
|
3717
3839
|
const { labelProps, fieldProps } = useLabel({
|
|
3718
3840
|
id,
|
|
3719
3841
|
label,
|
|
@@ -3721,7 +3843,7 @@ var Slider = (props) => {
|
|
|
3721
3843
|
"aria-labelledby": ariaLabelledBy
|
|
3722
3844
|
});
|
|
3723
3845
|
const formattedValue = numberFormatter(currentValue, formatOptions);
|
|
3724
|
-
const classes = (0,
|
|
3846
|
+
const classes = (0, import_dedupe43.default)("mobius", "mobius-slider", className, {
|
|
3725
3847
|
"--is-disabled": isDisabled,
|
|
3726
3848
|
"--is-primary": variant === "primary",
|
|
3727
3849
|
"--is-secondary": variant === "secondary",
|
|
@@ -3743,12 +3865,12 @@ var Slider = (props) => {
|
|
|
3743
3865
|
onChangeEnd(currentValue);
|
|
3744
3866
|
}
|
|
3745
3867
|
};
|
|
3746
|
-
return /* @__PURE__ */ (0,
|
|
3747
|
-
/* @__PURE__ */ (0,
|
|
3748
|
-
label && /* @__PURE__ */ (0,
|
|
3749
|
-
label && /* @__PURE__ */ (0,
|
|
3868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: classes, children: [
|
|
3869
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "mobius-slider__label-wrapper", children: [
|
|
3870
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Label, { ...labelProps, children: label }),
|
|
3871
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("output", { style: { flex: "1 0 auto", textAlign: "end" }, children: formattedValue })
|
|
3750
3872
|
] }),
|
|
3751
|
-
/* @__PURE__ */ (0,
|
|
3873
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { ref: trackRef, className: "mobius-slider__track-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3752
3874
|
"input",
|
|
3753
3875
|
{
|
|
3754
3876
|
className: "mobius-slider__track",
|
|
@@ -3767,24 +3889,24 @@ var Slider = (props) => {
|
|
|
3767
3889
|
...fieldProps
|
|
3768
3890
|
}
|
|
3769
3891
|
) }),
|
|
3770
|
-
/* @__PURE__ */ (0,
|
|
3771
|
-
/* @__PURE__ */ (0,
|
|
3772
|
-
/* @__PURE__ */ (0,
|
|
3892
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "mobius-slider__labels", children: [
|
|
3893
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "mobius-slider__min-label", "data-testid": "min-label", children: minLabel }),
|
|
3894
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "mobius-slider__max-label", "data-testid": "max-label", children: maxLabel })
|
|
3773
3895
|
] })
|
|
3774
3896
|
] });
|
|
3775
3897
|
};
|
|
3776
3898
|
|
|
3777
3899
|
// src/components/SVG/SVG.tsx
|
|
3778
|
-
var
|
|
3779
|
-
var
|
|
3780
|
-
var
|
|
3781
|
-
var SVG = (0,
|
|
3900
|
+
var import_react68 = require("react");
|
|
3901
|
+
var import_dedupe44 = __toESM(require("classnames/dedupe"));
|
|
3902
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3903
|
+
var SVG = (0, import_react68.forwardRef)(
|
|
3782
3904
|
(props, ref) => {
|
|
3783
3905
|
const { children, className, ...otherProps } = props;
|
|
3784
|
-
const classes = (0,
|
|
3785
|
-
const svgNode =
|
|
3906
|
+
const classes = (0, import_dedupe44.default)("mobius", "mobius-svg", className);
|
|
3907
|
+
const svgNode = import_react68.Children.only(children);
|
|
3786
3908
|
const { children: svgChildren, viewBox, xmlns } = svgNode.props;
|
|
3787
|
-
return /* @__PURE__ */ (0,
|
|
3909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3788
3910
|
"svg",
|
|
3789
3911
|
{
|
|
3790
3912
|
viewBox,
|
|
@@ -3800,10 +3922,10 @@ var SVG = (0, import_react67.forwardRef)(
|
|
|
3800
3922
|
SVG.displayName = "SVG";
|
|
3801
3923
|
|
|
3802
3924
|
// src/components/Switch/Switch.tsx
|
|
3803
|
-
var
|
|
3804
|
-
var
|
|
3805
|
-
var
|
|
3806
|
-
var Switch = (0,
|
|
3925
|
+
var import_react69 = require("react");
|
|
3926
|
+
var import_dedupe45 = __toESM(require("classnames/dedupe"));
|
|
3927
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3928
|
+
var Switch = (0, import_react69.forwardRef)((props, ref) => {
|
|
3807
3929
|
const {
|
|
3808
3930
|
checked = false,
|
|
3809
3931
|
className,
|
|
@@ -3811,11 +3933,11 @@ var Switch = (0, import_react68.forwardRef)((props, ref) => {
|
|
|
3811
3933
|
isDisabled = false,
|
|
3812
3934
|
...otherProps
|
|
3813
3935
|
} = props;
|
|
3814
|
-
const [enabled, setEnabled] = (0,
|
|
3815
|
-
(0,
|
|
3936
|
+
const [enabled, setEnabled] = (0, import_react69.useState)(checked);
|
|
3937
|
+
(0, import_react69.useEffect)(() => {
|
|
3816
3938
|
setEnabled(checked);
|
|
3817
3939
|
}, [checked]);
|
|
3818
|
-
const classes = (0,
|
|
3940
|
+
const classes = (0, import_dedupe45.default)(
|
|
3819
3941
|
"mobius",
|
|
3820
3942
|
"mobius-switch",
|
|
3821
3943
|
{
|
|
@@ -3830,9 +3952,9 @@ var Switch = (0, import_react68.forwardRef)((props, ref) => {
|
|
|
3830
3952
|
onChange(event);
|
|
3831
3953
|
}
|
|
3832
3954
|
};
|
|
3833
|
-
return /* @__PURE__ */ (0,
|
|
3834
|
-
/* @__PURE__ */ (0,
|
|
3835
|
-
/* @__PURE__ */ (0,
|
|
3955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("label", { ref, className: classes, children: [
|
|
3956
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { children: enabled ? "On" : "Off" }) }),
|
|
3957
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3836
3958
|
"input",
|
|
3837
3959
|
{
|
|
3838
3960
|
type: "checkbox",
|
|
@@ -3843,91 +3965,91 @@ var Switch = (0, import_react68.forwardRef)((props, ref) => {
|
|
|
3843
3965
|
...otherProps
|
|
3844
3966
|
}
|
|
3845
3967
|
),
|
|
3846
|
-
/* @__PURE__ */ (0,
|
|
3968
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "mobius-switch__slider" })
|
|
3847
3969
|
] });
|
|
3848
3970
|
});
|
|
3849
3971
|
Switch.displayName = "Switch";
|
|
3850
3972
|
|
|
3851
3973
|
// src/components/Table/Table.tsx
|
|
3852
|
-
var
|
|
3853
|
-
var
|
|
3854
|
-
var
|
|
3855
|
-
var Table = (0,
|
|
3974
|
+
var import_react70 = require("react");
|
|
3975
|
+
var import_dedupe46 = __toESM(require("classnames/dedupe"));
|
|
3976
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3977
|
+
var Table = (0, import_react70.forwardRef)(
|
|
3856
3978
|
(props, ref) => {
|
|
3857
|
-
const classes = (0,
|
|
3858
|
-
return /* @__PURE__ */ (0,
|
|
3979
|
+
const classes = (0, import_dedupe46.default)("mobius", "mobius-table", props.className);
|
|
3980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("table", { ref, ...props, className: classes });
|
|
3859
3981
|
}
|
|
3860
3982
|
);
|
|
3861
3983
|
Table.displayName = "Table";
|
|
3862
3984
|
|
|
3863
3985
|
// src/components/Table/Head.tsx
|
|
3864
|
-
var import_react70 = require("react");
|
|
3865
|
-
var import_dedupe46 = __toESM(require("classnames/dedupe"));
|
|
3866
|
-
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3867
|
-
var Head = (0, import_react70.forwardRef)((props, ref) => {
|
|
3868
|
-
const classes = (0, import_dedupe46.default)("mobius", "mobius-table__head", props.className);
|
|
3869
|
-
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("thead", { ref, ...props, className: classes });
|
|
3870
|
-
});
|
|
3871
|
-
Head.displayName = "Table.Head";
|
|
3872
|
-
|
|
3873
|
-
// src/components/Table/Body.tsx
|
|
3874
3986
|
var import_react71 = require("react");
|
|
3875
3987
|
var import_dedupe47 = __toESM(require("classnames/dedupe"));
|
|
3876
3988
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3877
|
-
var
|
|
3878
|
-
const classes = (0, import_dedupe47.default)("mobius", "mobius-
|
|
3879
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("
|
|
3989
|
+
var Head = (0, import_react71.forwardRef)((props, ref) => {
|
|
3990
|
+
const classes = (0, import_dedupe47.default)("mobius", "mobius-table__head", props.className);
|
|
3991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("thead", { ref, ...props, className: classes });
|
|
3880
3992
|
});
|
|
3881
|
-
|
|
3993
|
+
Head.displayName = "Table.Head";
|
|
3882
3994
|
|
|
3883
|
-
// src/components/Table/
|
|
3995
|
+
// src/components/Table/Body.tsx
|
|
3884
3996
|
var import_react72 = require("react");
|
|
3885
3997
|
var import_dedupe48 = __toESM(require("classnames/dedupe"));
|
|
3886
3998
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3887
|
-
var
|
|
3888
|
-
const classes = (0, import_dedupe48.default)("mobius", "mobius-
|
|
3889
|
-
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("
|
|
3999
|
+
var Body = (0, import_react72.forwardRef)((props, ref) => {
|
|
4000
|
+
const classes = (0, import_dedupe48.default)("mobius", "mobius-table__body", props.className);
|
|
4001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("tbody", { ref, ...props, className: classes });
|
|
3890
4002
|
});
|
|
3891
|
-
|
|
4003
|
+
Body.displayName = "Table.Body";
|
|
3892
4004
|
|
|
3893
|
-
// src/components/Table/
|
|
4005
|
+
// src/components/Table/Foot.tsx
|
|
3894
4006
|
var import_react73 = require("react");
|
|
3895
4007
|
var import_dedupe49 = __toESM(require("classnames/dedupe"));
|
|
3896
4008
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3897
|
-
var
|
|
4009
|
+
var Foot = (0, import_react73.forwardRef)((props, ref) => {
|
|
4010
|
+
const classes = (0, import_dedupe49.default)("mobius", "mobius-table__foot", props.className);
|
|
4011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tfoot", { ref, ...props, className: classes });
|
|
4012
|
+
});
|
|
4013
|
+
Foot.displayName = "Table.Foot";
|
|
4014
|
+
|
|
4015
|
+
// src/components/Table/Row.tsx
|
|
4016
|
+
var import_react74 = require("react");
|
|
4017
|
+
var import_dedupe50 = __toESM(require("classnames/dedupe"));
|
|
4018
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4019
|
+
var Row = (0, import_react74.forwardRef)(
|
|
3898
4020
|
(props, ref) => {
|
|
3899
|
-
const classes = (0,
|
|
3900
|
-
return /* @__PURE__ */ (0,
|
|
4021
|
+
const classes = (0, import_dedupe50.default)("mobius", "mobius-table__row", props.className);
|
|
4022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("tr", { ref, ...props, className: classes });
|
|
3901
4023
|
}
|
|
3902
4024
|
);
|
|
3903
4025
|
Row.displayName = "Table.Row";
|
|
3904
4026
|
|
|
3905
4027
|
// src/components/Table/HeaderCell.tsx
|
|
3906
|
-
var
|
|
3907
|
-
var
|
|
3908
|
-
var
|
|
3909
|
-
var HeaderCell = (0,
|
|
3910
|
-
const classes = (0,
|
|
4028
|
+
var import_react75 = require("react");
|
|
4029
|
+
var import_dedupe51 = __toESM(require("classnames/dedupe"));
|
|
4030
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4031
|
+
var HeaderCell = (0, import_react75.forwardRef)((props, ref) => {
|
|
4032
|
+
const classes = (0, import_dedupe51.default)(
|
|
3911
4033
|
"mobius",
|
|
3912
4034
|
"mobius-table__head-cell",
|
|
3913
4035
|
props.className
|
|
3914
4036
|
);
|
|
3915
|
-
return /* @__PURE__ */ (0,
|
|
4037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("th", { ...props, ref, className: classes });
|
|
3916
4038
|
});
|
|
3917
4039
|
HeaderCell.displayName = "Table.HeaderCell";
|
|
3918
4040
|
|
|
3919
4041
|
// src/components/Table/Cell.tsx
|
|
3920
|
-
var
|
|
3921
|
-
var
|
|
3922
|
-
var
|
|
3923
|
-
var Cell = (0,
|
|
4042
|
+
var import_react76 = require("react");
|
|
4043
|
+
var import_dedupe52 = __toESM(require("classnames/dedupe"));
|
|
4044
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4045
|
+
var Cell = (0, import_react76.forwardRef)(
|
|
3924
4046
|
(props, ref) => {
|
|
3925
|
-
const classes = (0,
|
|
4047
|
+
const classes = (0, import_dedupe52.default)(
|
|
3926
4048
|
"mobius",
|
|
3927
4049
|
"mobius-table__body-cell",
|
|
3928
4050
|
props.className
|
|
3929
4051
|
);
|
|
3930
|
-
return /* @__PURE__ */ (0,
|
|
4052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("td", { ref, ...props, className: classes });
|
|
3931
4053
|
}
|
|
3932
4054
|
);
|
|
3933
4055
|
Cell.displayName = "Table.Cell";
|
|
@@ -3944,16 +4066,16 @@ var Table2 = Object.assign(Table, {
|
|
|
3944
4066
|
Table2.displayName = "Table";
|
|
3945
4067
|
|
|
3946
4068
|
// src/components/TextArea/TextArea.tsx
|
|
3947
|
-
var
|
|
3948
|
-
var
|
|
4069
|
+
var import_dedupe54 = __toESM(require("classnames/dedupe"));
|
|
4070
|
+
var import_react78 = require("react");
|
|
3949
4071
|
|
|
3950
4072
|
// src/components/TextAreaInput/TextAreaInput.tsx
|
|
3951
|
-
var
|
|
3952
|
-
var
|
|
3953
|
-
var
|
|
3954
|
-
var TextAreaInput = (0,
|
|
4073
|
+
var import_dedupe53 = __toESM(require("classnames/dedupe"));
|
|
4074
|
+
var import_react77 = require("react");
|
|
4075
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4076
|
+
var TextAreaInput = (0, import_react77.forwardRef)((props, ref) => {
|
|
3955
4077
|
const { isSelected, isDisabled, isReadOnly, isRequired, ...otherProps } = props;
|
|
3956
|
-
const classes = (0,
|
|
4078
|
+
const classes = (0, import_dedupe53.default)(
|
|
3957
4079
|
"mobius",
|
|
3958
4080
|
"mobius-text-area__input",
|
|
3959
4081
|
{
|
|
@@ -3963,7 +4085,7 @@ var TextAreaInput = (0, import_react76.forwardRef)((props, ref) => {
|
|
|
3963
4085
|
},
|
|
3964
4086
|
otherProps.className
|
|
3965
4087
|
);
|
|
3966
|
-
return /* @__PURE__ */ (0,
|
|
4088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3967
4089
|
"textarea",
|
|
3968
4090
|
{
|
|
3969
4091
|
ref,
|
|
@@ -3977,8 +4099,8 @@ var TextAreaInput = (0, import_react76.forwardRef)((props, ref) => {
|
|
|
3977
4099
|
TextAreaInput.displayName = "TextAreaInput";
|
|
3978
4100
|
|
|
3979
4101
|
// src/components/TextArea/TextArea.tsx
|
|
3980
|
-
var
|
|
3981
|
-
var TextArea = (0,
|
|
4102
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4103
|
+
var TextArea = (0, import_react78.forwardRef)((props, ref) => {
|
|
3982
4104
|
const {
|
|
3983
4105
|
isDisabled,
|
|
3984
4106
|
className,
|
|
@@ -3989,24 +4111,24 @@ var TextArea = (0, import_react77.forwardRef)((props, ref) => {
|
|
|
3989
4111
|
...otherProps
|
|
3990
4112
|
} = props;
|
|
3991
4113
|
const { inputProps, labelProps, errorMessageProps } = useTextField(props);
|
|
3992
|
-
const classes = (0,
|
|
4114
|
+
const classes = (0, import_dedupe54.default)("mobius", "mobius-text-area", className);
|
|
3993
4115
|
const validationClasses = useValidationClasses({
|
|
3994
4116
|
validationState,
|
|
3995
4117
|
isInvalid
|
|
3996
4118
|
});
|
|
3997
|
-
const inputClasses = (0,
|
|
4119
|
+
const inputClasses = (0, import_dedupe54.default)(
|
|
3998
4120
|
"mobius-text-area__input",
|
|
3999
4121
|
validationClasses
|
|
4000
4122
|
);
|
|
4001
|
-
const labelClasses = (0,
|
|
4123
|
+
const labelClasses = (0, import_dedupe54.default)(
|
|
4002
4124
|
{
|
|
4003
4125
|
"--is-disabled": isDisabled
|
|
4004
4126
|
},
|
|
4005
4127
|
validationClasses
|
|
4006
4128
|
);
|
|
4007
|
-
return /* @__PURE__ */ (0,
|
|
4008
|
-
label && /* @__PURE__ */ (0,
|
|
4009
|
-
/* @__PURE__ */ (0,
|
|
4129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Stack, { className: classes, gap: "xs", children: [
|
|
4130
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Label, { ...labelProps, className: labelClasses, children: props.label }),
|
|
4131
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4010
4132
|
TextAreaInput,
|
|
4011
4133
|
{
|
|
4012
4134
|
...otherProps,
|
|
@@ -4017,16 +4139,16 @@ var TextArea = (0, import_react77.forwardRef)((props, ref) => {
|
|
|
4017
4139
|
"aria-invalid": errorMessage != null
|
|
4018
4140
|
}
|
|
4019
4141
|
),
|
|
4020
|
-
/* @__PURE__ */ (0,
|
|
4142
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorMessage, { ...errorMessageProps, errorMessage })
|
|
4021
4143
|
] });
|
|
4022
4144
|
});
|
|
4023
4145
|
TextArea.displayName = "TextArea";
|
|
4024
4146
|
|
|
4025
4147
|
// src/components/Title/Title.tsx
|
|
4026
|
-
var
|
|
4027
|
-
var
|
|
4028
|
-
var
|
|
4029
|
-
var Title = (0,
|
|
4148
|
+
var import_react79 = require("react");
|
|
4149
|
+
var import_dedupe55 = __toESM(require("classnames/dedupe"));
|
|
4150
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4151
|
+
var Title = (0, import_react79.forwardRef)(
|
|
4030
4152
|
(props, ref) => {
|
|
4031
4153
|
const {
|
|
4032
4154
|
elementType: Element = "div",
|
|
@@ -4034,21 +4156,21 @@ var Title = (0, import_react78.forwardRef)(
|
|
|
4034
4156
|
description,
|
|
4035
4157
|
...otherProps
|
|
4036
4158
|
} = props;
|
|
4037
|
-
const classes = (0,
|
|
4038
|
-
const headerClasses = (0,
|
|
4039
|
-
const contentClasses = (0,
|
|
4040
|
-
const containerClasses = (0,
|
|
4041
|
-
return /* @__PURE__ */ (0,
|
|
4042
|
-
/* @__PURE__ */ (0,
|
|
4043
|
-
/* @__PURE__ */ (0,
|
|
4159
|
+
const classes = (0, import_dedupe55.default)("mobius", "mobius-title", otherProps.className);
|
|
4160
|
+
const headerClasses = (0, import_dedupe55.default)("mobius", "mobius-title__header");
|
|
4161
|
+
const contentClasses = (0, import_dedupe55.default)("mobius", "mobius-title__description");
|
|
4162
|
+
const containerClasses = (0, import_dedupe55.default)("mobius", "mobius-title__container");
|
|
4163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Element, { ref, ...otherProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Flex, { flexDirection: "column", className: containerClasses, children: [
|
|
4164
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: headerClasses, children: title }),
|
|
4165
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: contentClasses, children: description })
|
|
4044
4166
|
] }) });
|
|
4045
4167
|
}
|
|
4046
4168
|
);
|
|
4047
4169
|
Title.displayName = "Title";
|
|
4048
4170
|
|
|
4049
4171
|
// src/components/Trust/Trust.tsx
|
|
4050
|
-
var
|
|
4051
|
-
var
|
|
4172
|
+
var import_dedupe56 = __toESM(require("classnames/dedupe"));
|
|
4173
|
+
var import_react80 = require("react");
|
|
4052
4174
|
|
|
4053
4175
|
// src/components/Trust/constants.ts
|
|
4054
4176
|
var REQUIRED_TRUSTPILOT_CLASS_NAME = "trustpilot-widget";
|
|
@@ -4098,8 +4220,8 @@ var TRUSTPILOT_WIDGET = {
|
|
|
4098
4220
|
};
|
|
4099
4221
|
|
|
4100
4222
|
// src/components/Trust/Trust.tsx
|
|
4101
|
-
var
|
|
4102
|
-
var Trust = (0,
|
|
4223
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
4224
|
+
var Trust = (0, import_react80.forwardRef)((props, ref) => {
|
|
4103
4225
|
const {
|
|
4104
4226
|
elementType: Element = "div",
|
|
4105
4227
|
variant,
|
|
@@ -4110,8 +4232,8 @@ var Trust = (0, import_react79.forwardRef)((props, ref) => {
|
|
|
4110
4232
|
stars,
|
|
4111
4233
|
className
|
|
4112
4234
|
} = props;
|
|
4113
|
-
const [isMounted, setIsMounted] = (0,
|
|
4114
|
-
const trustRef = (0,
|
|
4235
|
+
const [isMounted, setIsMounted] = (0, import_react80.useState)(false);
|
|
4236
|
+
const trustRef = (0, import_react80.useRef)(null);
|
|
4115
4237
|
const {
|
|
4116
4238
|
templateId,
|
|
4117
4239
|
className: variantClassName,
|
|
@@ -4127,7 +4249,7 @@ var Trust = (0, import_react79.forwardRef)((props, ref) => {
|
|
|
4127
4249
|
"data-style-height": height,
|
|
4128
4250
|
"data-stars": stars
|
|
4129
4251
|
};
|
|
4130
|
-
const classes = (0,
|
|
4252
|
+
const classes = (0, import_dedupe56.default)(
|
|
4131
4253
|
"mobius",
|
|
4132
4254
|
"mobius-trust",
|
|
4133
4255
|
REQUIRED_TRUSTPILOT_CLASS_NAME,
|
|
@@ -4137,24 +4259,24 @@ var Trust = (0, import_react79.forwardRef)((props, ref) => {
|
|
|
4137
4259
|
},
|
|
4138
4260
|
className
|
|
4139
4261
|
);
|
|
4140
|
-
(0,
|
|
4262
|
+
(0, import_react80.useEffect)(() => {
|
|
4141
4263
|
const hasTrustpilotLoaded = trustRef.current && window?.Trustpilot && window?.Trustpilot.loadFromElement;
|
|
4142
4264
|
if (isMounted && hasTrustpilotLoaded) {
|
|
4143
4265
|
window.Trustpilot.loadFromElement(trustRef.current, true);
|
|
4144
4266
|
}
|
|
4145
4267
|
}, [isMounted]);
|
|
4146
|
-
(0,
|
|
4268
|
+
(0, import_react80.useEffect)(() => {
|
|
4147
4269
|
setIsMounted(true);
|
|
4148
4270
|
}, []);
|
|
4149
|
-
if (!isMounted) return /* @__PURE__ */ (0,
|
|
4150
|
-
return /* @__PURE__ */ (0,
|
|
4271
|
+
if (!isMounted) return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { style: styles });
|
|
4272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4151
4273
|
Element,
|
|
4152
4274
|
{
|
|
4153
4275
|
ref: mergeRefs([trustRef, ref]),
|
|
4154
4276
|
className: classes,
|
|
4155
4277
|
style: styles,
|
|
4156
4278
|
...dataProps,
|
|
4157
|
-
children: /* @__PURE__ */ (0,
|
|
4279
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4158
4280
|
"a",
|
|
4159
4281
|
{
|
|
4160
4282
|
href: link,
|