@simplybusiness/mobius 10.1.1 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/components/AddressLookup/AddressLookup.js +540 -526
- package/dist/cjs/components/AddressLookup/AddressLookup.js.map +4 -4
- package/dist/cjs/components/AddressLookup/index.js +540 -526
- package/dist/cjs/components/AddressLookup/index.js.map +4 -4
- package/dist/cjs/components/Alert/Alert.js +79 -11
- package/dist/cjs/components/Alert/Alert.js.map +4 -4
- package/dist/cjs/components/Alert/index.js +79 -11
- package/dist/cjs/components/Alert/index.js.map +4 -4
- package/dist/cjs/components/Checkbox/Checkbox.js +506 -492
- package/dist/cjs/components/Checkbox/Checkbox.js.map +4 -4
- package/dist/cjs/components/Checkbox/CheckboxGroup.js +506 -492
- package/dist/cjs/components/Checkbox/CheckboxGroup.js.map +4 -4
- package/dist/cjs/components/Checkbox/index.js +485 -471
- package/dist/cjs/components/Checkbox/index.js.map +4 -4
- package/dist/cjs/components/Combobox/Combobox.js +540 -526
- package/dist/cjs/components/Combobox/Combobox.js.map +4 -4
- package/dist/cjs/components/Combobox/index.js +540 -526
- package/dist/cjs/components/Combobox/index.js.map +4 -4
- package/dist/cjs/components/DateField/DateField.js +527 -513
- package/dist/cjs/components/DateField/DateField.js.map +4 -4
- package/dist/cjs/components/DateField/index.js +527 -513
- package/dist/cjs/components/DateField/index.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js +527 -513
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/index.js +527 -513
- package/dist/cjs/components/ErrorMessage/index.js.map +4 -4
- package/dist/cjs/components/ExpandableText/ExpandableText.js +527 -513
- package/dist/cjs/components/ExpandableText/ExpandableText.js.map +4 -4
- package/dist/cjs/components/ExpandableText/index.js +527 -513
- package/dist/cjs/components/ExpandableText/index.js.map +4 -4
- package/dist/cjs/components/MaskedField/MaskedField.js +537 -523
- package/dist/cjs/components/MaskedField/MaskedField.js.map +4 -4
- package/dist/cjs/components/MaskedField/index.js +537 -523
- package/dist/cjs/components/MaskedField/index.js.map +4 -4
- package/dist/cjs/components/NumberField/NumberField.js +528 -514
- package/dist/cjs/components/NumberField/NumberField.js.map +4 -4
- package/dist/cjs/components/NumberField/index.js +528 -514
- package/dist/cjs/components/NumberField/index.js.map +4 -4
- package/dist/cjs/components/PasswordField/PasswordField.js +524 -510
- package/dist/cjs/components/PasswordField/PasswordField.js.map +4 -4
- package/dist/cjs/components/PasswordField/ShowHideButton.js +523 -509
- package/dist/cjs/components/PasswordField/ShowHideButton.js.map +4 -4
- package/dist/cjs/components/PasswordField/index.js +524 -510
- package/dist/cjs/components/PasswordField/index.js.map +4 -4
- package/dist/cjs/components/Radio/Radio.js +506 -492
- package/dist/cjs/components/Radio/Radio.js.map +4 -4
- package/dist/cjs/components/Radio/RadioGroup.js +505 -491
- package/dist/cjs/components/Radio/RadioGroup.js.map +4 -4
- package/dist/cjs/components/Radio/index.js +484 -470
- package/dist/cjs/components/Radio/index.js.map +4 -4
- package/dist/cjs/components/Select/Select.js +511 -497
- package/dist/cjs/components/Select/Select.js.map +4 -4
- package/dist/cjs/components/Select/index.js +511 -497
- package/dist/cjs/components/Select/index.js.map +4 -4
- package/dist/cjs/components/TextArea/TextArea.js +521 -507
- package/dist/cjs/components/TextArea/TextArea.js.map +4 -4
- package/dist/cjs/components/TextArea/index.js +521 -507
- package/dist/cjs/components/TextArea/index.js.map +4 -4
- package/dist/cjs/components/TextField/TextField.js +537 -523
- package/dist/cjs/components/TextField/TextField.js.map +4 -4
- package/dist/cjs/components/TextField/index.js +537 -523
- package/dist/cjs/components/TextField/index.js.map +4 -4
- package/dist/cjs/components/index.js +567 -553
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/index.js +567 -553
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/meta.json +1372 -1305
- package/dist/esm/{chunk-FTSJNY4J.js → chunk-N5WGQAHM.js} +14 -2
- package/dist/esm/chunk-N5WGQAHM.js.map +7 -0
- package/dist/esm/{chunk-C4BILMFX.js → chunk-RR4UQSOZ.js} +5 -1
- package/dist/esm/chunk-RR4UQSOZ.js.map +7 -0
- package/dist/esm/components/AddressLookup/AddressLookup.js +2 -2
- package/dist/esm/components/AddressLookup/index.js +2 -2
- package/dist/esm/components/Alert/Alert.js +4 -1
- package/dist/esm/components/Alert/index.js +4 -1
- package/dist/esm/components/Checkbox/Checkbox.js +2 -2
- package/dist/esm/components/Checkbox/CheckboxGroup.js +2 -2
- package/dist/esm/components/Checkbox/index.js +2 -2
- package/dist/esm/components/Combobox/Combobox.js +2 -2
- package/dist/esm/components/Combobox/index.js +2 -2
- package/dist/esm/components/DateField/DateField.js +2 -2
- package/dist/esm/components/DateField/index.js +2 -2
- package/dist/esm/components/ErrorMessage/ErrorMessage.js +2 -2
- package/dist/esm/components/ErrorMessage/index.js +2 -2
- package/dist/esm/components/ExpandableText/ExpandableText.js +2 -2
- package/dist/esm/components/ExpandableText/index.js +2 -2
- package/dist/esm/components/MaskedField/MaskedField.js +2 -2
- package/dist/esm/components/MaskedField/index.js +2 -2
- package/dist/esm/components/NumberField/NumberField.js +2 -2
- package/dist/esm/components/NumberField/index.js +2 -2
- package/dist/esm/components/PasswordField/PasswordField.js +2 -2
- package/dist/esm/components/PasswordField/ShowHideButton.js +2 -2
- package/dist/esm/components/PasswordField/index.js +2 -2
- package/dist/esm/components/Radio/Radio.js +2 -2
- package/dist/esm/components/Radio/RadioGroup.js +2 -2
- package/dist/esm/components/Radio/index.js +2 -2
- package/dist/esm/components/Select/Select.js +2 -2
- package/dist/esm/components/Select/index.js +2 -2
- package/dist/esm/components/TextArea/TextArea.js +2 -2
- package/dist/esm/components/TextArea/index.js +2 -2
- package/dist/esm/components/TextField/TextField.js +2 -2
- package/dist/esm/components/TextField/index.js +2 -2
- package/dist/esm/components/index.js +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/meta.json +164 -131
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/AddressLookup/AddressLookup.test.tsx +76 -0
- package/src/components/AddressLookup/AddressLookup.tsx +9 -0
- package/src/components/Alert/Alert.tsx +10 -1
- package/src/components/Drawer/Drawer.css +24 -3
- package/src/components/Modal/Modal.css +42 -3
- package/dist/esm/chunk-C4BILMFX.js.map +0 -7
- package/dist/esm/chunk-FTSJNY4J.js.map +0 -7
|
@@ -2149,6 +2149,10 @@ var init_AddressLookup = __esm({
|
|
|
2149
2149
|
);
|
|
2150
2150
|
const handleSelected = (selected) => {
|
|
2151
2151
|
setError(null);
|
|
2152
|
+
const isEmpty = typeof selected === "string" ? selected === "" : !selected.id && !selected.value;
|
|
2153
|
+
if (isEmpty) {
|
|
2154
|
+
return Promise.resolve();
|
|
2155
|
+
}
|
|
2152
2156
|
if (typeof selected === "string" || !selected.id) {
|
|
2153
2157
|
setError(new Error("Selected option missing id"));
|
|
2154
2158
|
return Promise.resolve();
|
|
@@ -2196,19 +2200,98 @@ var init_AddressLookup2 = __esm({
|
|
|
2196
2200
|
}
|
|
2197
2201
|
});
|
|
2198
2202
|
|
|
2203
|
+
// src/components/Text/Text.tsx
|
|
2204
|
+
var import_dedupe14, import_Text, import_jsx_runtime15, getElementType, Text;
|
|
2205
|
+
var init_Text = __esm({
|
|
2206
|
+
"src/components/Text/Text.tsx"() {
|
|
2207
|
+
"use strict";
|
|
2208
|
+
import_dedupe14 = __toESM(require("classnames/dedupe"));
|
|
2209
|
+
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
2210
|
+
import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2211
|
+
getElementType = (variant, elementType) => {
|
|
2212
|
+
if (variant) {
|
|
2213
|
+
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
2214
|
+
}
|
|
2215
|
+
return elementType || "p";
|
|
2216
|
+
};
|
|
2217
|
+
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
2218
|
+
const { variant, className, spacing, ...otherProps } = props;
|
|
2219
|
+
const elementType = getElementType(variant, Component);
|
|
2220
|
+
const variantType = variant || elementType;
|
|
2221
|
+
const classes = (0, import_dedupe14.default)(
|
|
2222
|
+
"mobius",
|
|
2223
|
+
"mobius-text",
|
|
2224
|
+
{ [`--is-${variantType}`]: variantType },
|
|
2225
|
+
{ [`--has-line-height-${spacing}`]: spacing },
|
|
2226
|
+
className
|
|
2227
|
+
);
|
|
2228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
2229
|
+
};
|
|
2230
|
+
Text.displayName = "Text";
|
|
2231
|
+
}
|
|
2232
|
+
});
|
|
2233
|
+
|
|
2234
|
+
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
2235
|
+
var import_react15, import_jsx_runtime16, isHTML, TextOrHTML;
|
|
2236
|
+
var init_TextOrHTML = __esm({
|
|
2237
|
+
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
2238
|
+
"use strict";
|
|
2239
|
+
import_react15 = require("react");
|
|
2240
|
+
init_Text();
|
|
2241
|
+
import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2242
|
+
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
2243
|
+
TextOrHTML = ({
|
|
2244
|
+
ref,
|
|
2245
|
+
text,
|
|
2246
|
+
htmlClassName,
|
|
2247
|
+
htmlElementType,
|
|
2248
|
+
textWrapper = false,
|
|
2249
|
+
autoDetect = false,
|
|
2250
|
+
...textProps
|
|
2251
|
+
}) => {
|
|
2252
|
+
const textIsHTML = autoDetect && isHTML(text);
|
|
2253
|
+
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
2254
|
+
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
2255
|
+
const DangerousComponent = resolvedElementType;
|
|
2256
|
+
const dangerousHTML = (0, import_react15.useMemo)(() => ({ __html: text }), [text]);
|
|
2257
|
+
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2258
|
+
DangerousComponent,
|
|
2259
|
+
{
|
|
2260
|
+
className: htmlClassName,
|
|
2261
|
+
dangerouslySetInnerHTML: dangerousHTML
|
|
2262
|
+
}
|
|
2263
|
+
);
|
|
2264
|
+
if (shouldWrapInText) {
|
|
2265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
2266
|
+
}
|
|
2267
|
+
return dangerousElement;
|
|
2268
|
+
};
|
|
2269
|
+
TextOrHTML.displayName = "TextOrHTML";
|
|
2270
|
+
}
|
|
2271
|
+
});
|
|
2272
|
+
|
|
2273
|
+
// src/components/TextOrHTML/index.tsx
|
|
2274
|
+
var init_TextOrHTML2 = __esm({
|
|
2275
|
+
"src/components/TextOrHTML/index.tsx"() {
|
|
2276
|
+
"use strict";
|
|
2277
|
+
init_TextOrHTML();
|
|
2278
|
+
}
|
|
2279
|
+
});
|
|
2280
|
+
|
|
2199
2281
|
// src/components/Alert/Alert.tsx
|
|
2200
2282
|
function isAlertVariant(value) {
|
|
2201
2283
|
return value === "info" || value === "success" || value === "warning" || value === "error";
|
|
2202
2284
|
}
|
|
2203
|
-
var import_icons3,
|
|
2285
|
+
var import_icons3, import_dedupe15, import_Alert, import_jsx_runtime17, Alert;
|
|
2204
2286
|
var init_Alert = __esm({
|
|
2205
2287
|
"src/components/Alert/Alert.tsx"() {
|
|
2206
2288
|
"use strict";
|
|
2207
2289
|
import_icons3 = require("@simplybusiness/icons");
|
|
2208
|
-
|
|
2290
|
+
import_dedupe15 = __toESM(require("classnames/dedupe"));
|
|
2209
2291
|
init_Icon2();
|
|
2292
|
+
init_TextOrHTML2();
|
|
2210
2293
|
import_Alert = require("@simplybusiness/mobius/src/components/Alert/Alert.css");
|
|
2211
|
-
|
|
2294
|
+
import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2212
2295
|
Alert = ({ ref, ...props }) => {
|
|
2213
2296
|
const {
|
|
2214
2297
|
elementType: Element = "div",
|
|
@@ -2221,7 +2304,7 @@ var init_Alert = __esm({
|
|
|
2221
2304
|
if (!show) return null;
|
|
2222
2305
|
const variant = variantProp && isAlertVariant(variantProp) ? variantProp : "info";
|
|
2223
2306
|
const colorValue = variant === "success" ? `var(--color-valid)` : `var(--color-${variant})`;
|
|
2224
|
-
const classes = (0,
|
|
2307
|
+
const classes = (0, import_dedupe15.default)(
|
|
2225
2308
|
"mobius",
|
|
2226
2309
|
"mobius-alert",
|
|
2227
2310
|
{
|
|
@@ -2239,14 +2322,23 @@ var init_Alert = __esm({
|
|
|
2239
2322
|
warning: import_icons3.warning,
|
|
2240
2323
|
error: import_icons3.error
|
|
2241
2324
|
};
|
|
2242
|
-
const headerClasses = (0,
|
|
2243
|
-
const iconClasses = (0,
|
|
2244
|
-
const contentClasses = (0,
|
|
2245
|
-
return /* @__PURE__ */ (0,
|
|
2246
|
-
/* @__PURE__ */ (0,
|
|
2247
|
-
/* @__PURE__ */ (0,
|
|
2248
|
-
header && /* @__PURE__ */ (0,
|
|
2249
|
-
|
|
2325
|
+
const headerClasses = (0, import_dedupe15.default)("mobius", "mobius-alert__header");
|
|
2326
|
+
const iconClasses = (0, import_dedupe15.default)("mobius", "mobius-alert__icon");
|
|
2327
|
+
const contentClasses = (0, import_dedupe15.default)("mobius", "mobius-alert__content");
|
|
2328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Element, { ref, role: "alert", ...otherProps, className: classes, children: [
|
|
2329
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { icon: icon[variant], color: colorValue }) }),
|
|
2330
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
2331
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2332
|
+
TextOrHTML,
|
|
2333
|
+
{
|
|
2334
|
+
autoDetect: true,
|
|
2335
|
+
htmlElementType: "span",
|
|
2336
|
+
className: headerClasses,
|
|
2337
|
+
htmlClassName: headerClasses,
|
|
2338
|
+
text: header
|
|
2339
|
+
}
|
|
2340
|
+
),
|
|
2341
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: contentClasses, children })
|
|
2250
2342
|
] })
|
|
2251
2343
|
] });
|
|
2252
2344
|
};
|
|
@@ -2263,14 +2355,14 @@ var init_Alert2 = __esm({
|
|
|
2263
2355
|
});
|
|
2264
2356
|
|
|
2265
2357
|
// src/components/Box/Box.tsx
|
|
2266
|
-
var
|
|
2358
|
+
var import_dedupe16, import_Box, import_jsx_runtime18, Box;
|
|
2267
2359
|
var init_Box = __esm({
|
|
2268
2360
|
"src/components/Box/Box.tsx"() {
|
|
2269
2361
|
"use strict";
|
|
2270
|
-
|
|
2362
|
+
import_dedupe16 = __toESM(require("classnames/dedupe"));
|
|
2271
2363
|
init_utils();
|
|
2272
2364
|
import_Box = require("@simplybusiness/mobius/src/components/Box/Box.css");
|
|
2273
|
-
|
|
2365
|
+
import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2274
2366
|
Box = ({ ref, ...props }) => {
|
|
2275
2367
|
const {
|
|
2276
2368
|
elementType: Element = "div",
|
|
@@ -2296,7 +2388,7 @@ var init_Box = __esm({
|
|
|
2296
2388
|
style,
|
|
2297
2389
|
...otherProps
|
|
2298
2390
|
} = props;
|
|
2299
|
-
const classes = (0,
|
|
2391
|
+
const classes = (0, import_dedupe16.default)("mobius", "mobius-box", otherProps.className);
|
|
2300
2392
|
const styleProps = filterUndefinedProps({
|
|
2301
2393
|
padding: getSpacingValue(padding),
|
|
2302
2394
|
paddingInline: getSpacingValue(paddingInline || paddingX),
|
|
@@ -2313,7 +2405,7 @@ var init_Box = __esm({
|
|
|
2313
2405
|
height,
|
|
2314
2406
|
...style
|
|
2315
2407
|
});
|
|
2316
|
-
return /* @__PURE__ */ (0,
|
|
2408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Element, { ref, style: styleProps, ...otherProps, className: classes });
|
|
2317
2409
|
};
|
|
2318
2410
|
Box.displayName = "Box";
|
|
2319
2411
|
}
|
|
@@ -2328,27 +2420,27 @@ var init_Box2 = __esm({
|
|
|
2328
2420
|
});
|
|
2329
2421
|
|
|
2330
2422
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
2331
|
-
var
|
|
2423
|
+
var import_react16, import_dedupe17, import_Breadcrumbs, import_jsx_runtime19, Breadcrumbs;
|
|
2332
2424
|
var init_Breadcrumbs = __esm({
|
|
2333
2425
|
"src/components/Breadcrumbs/Breadcrumbs.tsx"() {
|
|
2334
2426
|
"use strict";
|
|
2335
2427
|
"use client";
|
|
2336
|
-
|
|
2337
|
-
|
|
2428
|
+
import_react16 = require("react");
|
|
2429
|
+
import_dedupe17 = __toESM(require("classnames/dedupe"));
|
|
2338
2430
|
import_Breadcrumbs = require("@simplybusiness/mobius/src/components/Breadcrumbs/Breadcrumbs.css");
|
|
2339
|
-
|
|
2431
|
+
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2340
2432
|
Breadcrumbs = ({ ref, ...props }) => {
|
|
2341
2433
|
const { "aria-label": ariaLabel = "Breadcrumbs" } = props;
|
|
2342
2434
|
const { navProps } = { navProps: { "aria-label": ariaLabel } };
|
|
2343
2435
|
const { children, ...otherProps } = props;
|
|
2344
|
-
const childArray =
|
|
2345
|
-
const classes = (0,
|
|
2436
|
+
const childArray = import_react16.Children.toArray(children);
|
|
2437
|
+
const classes = (0, import_dedupe17.default)(
|
|
2346
2438
|
"mobius",
|
|
2347
2439
|
"mobius-breadcrumb",
|
|
2348
2440
|
otherProps.className
|
|
2349
2441
|
);
|
|
2350
|
-
return /* @__PURE__ */ (0,
|
|
2351
|
-
(child, i) => (0,
|
|
2442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("nav", { ref, ...otherProps, ...navProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("ul", { children: childArray.map(
|
|
2443
|
+
(child, i) => (0, import_react16.cloneElement)(
|
|
2352
2444
|
child,
|
|
2353
2445
|
{
|
|
2354
2446
|
key: i,
|
|
@@ -2362,22 +2454,22 @@ var init_Breadcrumbs = __esm({
|
|
|
2362
2454
|
});
|
|
2363
2455
|
|
|
2364
2456
|
// src/components/Breadcrumbs/BreadcrumbItem.tsx
|
|
2365
|
-
var
|
|
2457
|
+
var import_react17, import_dedupe18, import_jsx_runtime20, BreadcrumbItem;
|
|
2366
2458
|
var init_BreadcrumbItem = __esm({
|
|
2367
2459
|
"src/components/Breadcrumbs/BreadcrumbItem.tsx"() {
|
|
2368
2460
|
"use strict";
|
|
2369
2461
|
"use client";
|
|
2370
|
-
|
|
2371
|
-
|
|
2462
|
+
import_react17 = require("react");
|
|
2463
|
+
import_dedupe18 = __toESM(require("classnames/dedupe"));
|
|
2372
2464
|
init_Box2();
|
|
2373
|
-
|
|
2465
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2374
2466
|
BreadcrumbItem = ({ ref, ...props }) => {
|
|
2375
2467
|
const {
|
|
2376
2468
|
isDisabled = false,
|
|
2377
2469
|
isCurrent = false,
|
|
2378
2470
|
"aria-current": ariaCurrent = "page",
|
|
2379
2471
|
children,
|
|
2380
|
-
separator = /* @__PURE__ */ (0,
|
|
2472
|
+
separator = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box, { className: "mobius-breadcrumb__separator", "aria-hidden": "true", children: ">" }),
|
|
2381
2473
|
...otherProps
|
|
2382
2474
|
} = props;
|
|
2383
2475
|
const { itemProps } = {
|
|
@@ -2387,14 +2479,14 @@ var init_BreadcrumbItem = __esm({
|
|
|
2387
2479
|
...otherProps
|
|
2388
2480
|
}
|
|
2389
2481
|
};
|
|
2390
|
-
const classes = (0,
|
|
2482
|
+
const classes = (0, import_dedupe18.default)(
|
|
2391
2483
|
"mobius",
|
|
2392
2484
|
"mobius-breadcrumb__item",
|
|
2393
2485
|
props.className
|
|
2394
2486
|
);
|
|
2395
|
-
const child = typeof children === "string" ? /* @__PURE__ */ (0,
|
|
2396
|
-
return /* @__PURE__ */ (0,
|
|
2397
|
-
(0,
|
|
2487
|
+
const child = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { ...itemProps, children }) : import_react17.Children.only(children);
|
|
2488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("li", { className: classes, children: [
|
|
2489
|
+
(0, import_react17.cloneElement)(child, {
|
|
2398
2490
|
...child.props,
|
|
2399
2491
|
...itemProps,
|
|
2400
2492
|
ref
|
|
@@ -2416,19 +2508,19 @@ var init_Breadcrumbs2 = __esm({
|
|
|
2416
2508
|
});
|
|
2417
2509
|
|
|
2418
2510
|
// src/components/Button/Loading.tsx
|
|
2419
|
-
var import_icons4,
|
|
2511
|
+
var import_icons4, import_jsx_runtime21, Loading;
|
|
2420
2512
|
var init_Loading = __esm({
|
|
2421
2513
|
"src/components/Button/Loading.tsx"() {
|
|
2422
2514
|
"use strict";
|
|
2423
2515
|
import_icons4 = require("@simplybusiness/icons");
|
|
2424
2516
|
init_Icon2();
|
|
2425
2517
|
init_VisuallyHidden2();
|
|
2426
|
-
|
|
2518
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2427
2519
|
Loading = (props) => {
|
|
2428
2520
|
const { children } = props;
|
|
2429
|
-
return /* @__PURE__ */ (0,
|
|
2430
|
-
/* @__PURE__ */ (0,
|
|
2431
|
-
/* @__PURE__ */ (0,
|
|
2521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
2522
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "mobius-button__icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { icon: import_icons4.loading, spin: true, size: "md" }) }),
|
|
2523
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(VisuallyHidden, { className: "mobius-button__loading-text", children: "Loading" }),
|
|
2432
2524
|
children
|
|
2433
2525
|
] });
|
|
2434
2526
|
};
|
|
@@ -2436,33 +2528,33 @@ var init_Loading = __esm({
|
|
|
2436
2528
|
});
|
|
2437
2529
|
|
|
2438
2530
|
// src/components/Button/Success.tsx
|
|
2439
|
-
var import_icons5,
|
|
2531
|
+
var import_icons5, import_jsx_runtime22, Success;
|
|
2440
2532
|
var init_Success = __esm({
|
|
2441
2533
|
"src/components/Button/Success.tsx"() {
|
|
2442
2534
|
"use strict";
|
|
2443
2535
|
import_icons5 = require("@simplybusiness/icons");
|
|
2444
2536
|
init_Icon2();
|
|
2445
2537
|
init_VisuallyHidden2();
|
|
2446
|
-
|
|
2447
|
-
Success = () => /* @__PURE__ */ (0,
|
|
2448
|
-
/* @__PURE__ */ (0,
|
|
2449
|
-
/* @__PURE__ */ (0,
|
|
2538
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2539
|
+
Success = () => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
2540
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "mobius-button__icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { icon: import_icons5.tick, size: "md" }) }),
|
|
2541
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(VisuallyHidden, { className: "mobius-button__success-text", children: "Success" })
|
|
2450
2542
|
] });
|
|
2451
2543
|
}
|
|
2452
2544
|
});
|
|
2453
2545
|
|
|
2454
2546
|
// src/components/Button/Button.tsx
|
|
2455
|
-
var
|
|
2547
|
+
var import_dedupe19, import_Button, import_jsx_runtime23, Button;
|
|
2456
2548
|
var init_Button = __esm({
|
|
2457
2549
|
"src/components/Button/Button.tsx"() {
|
|
2458
2550
|
"use strict";
|
|
2459
2551
|
"use client";
|
|
2460
|
-
|
|
2552
|
+
import_dedupe19 = __toESM(require("classnames/dedupe"));
|
|
2461
2553
|
init_Loading();
|
|
2462
2554
|
init_useButton2();
|
|
2463
2555
|
init_Success();
|
|
2464
2556
|
import_Button = require("@simplybusiness/mobius/src/components/Button/Button.css");
|
|
2465
|
-
|
|
2557
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2466
2558
|
Button = ({ ref, ...props }) => {
|
|
2467
2559
|
const {
|
|
2468
2560
|
children,
|
|
@@ -2477,7 +2569,7 @@ var init_Button = __esm({
|
|
|
2477
2569
|
...otherProps
|
|
2478
2570
|
} = props;
|
|
2479
2571
|
const { buttonProps } = useButton(props);
|
|
2480
|
-
otherProps.className = (0,
|
|
2572
|
+
otherProps.className = (0, import_dedupe19.default)(
|
|
2481
2573
|
"mobius",
|
|
2482
2574
|
"mobius-button",
|
|
2483
2575
|
`--variant-${variant}`,
|
|
@@ -2489,9 +2581,9 @@ var init_Button = __esm({
|
|
|
2489
2581
|
},
|
|
2490
2582
|
otherProps.className
|
|
2491
2583
|
);
|
|
2492
|
-
return /* @__PURE__ */ (0,
|
|
2493
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
2494
|
-
isSuccess && !isLoading && /* @__PURE__ */ (0,
|
|
2584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Component, { ref, ...buttonProps, ...otherProps, children: [
|
|
2585
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Loading, { children }) : children,
|
|
2586
|
+
isSuccess && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Success, {})
|
|
2495
2587
|
] });
|
|
2496
2588
|
};
|
|
2497
2589
|
Button.displayName = "Button";
|
|
@@ -2507,13 +2599,13 @@ var init_Button2 = __esm({
|
|
|
2507
2599
|
});
|
|
2508
2600
|
|
|
2509
2601
|
// src/components/Checkbox/Checkbox.tsx
|
|
2510
|
-
var
|
|
2602
|
+
var import_react18, import_dedupe20, import_icons6, import_Checkbox, import_jsx_runtime24, Checkbox;
|
|
2511
2603
|
var init_Checkbox = __esm({
|
|
2512
2604
|
"src/components/Checkbox/Checkbox.tsx"() {
|
|
2513
2605
|
"use strict";
|
|
2514
2606
|
"use client";
|
|
2515
|
-
|
|
2516
|
-
|
|
2607
|
+
import_react18 = require("react");
|
|
2608
|
+
import_dedupe20 = __toESM(require("classnames/dedupe"));
|
|
2517
2609
|
import_icons6 = require("@simplybusiness/icons");
|
|
2518
2610
|
init_ErrorMessage2();
|
|
2519
2611
|
init_spaceDelimitedList();
|
|
@@ -2521,7 +2613,7 @@ var init_Checkbox = __esm({
|
|
|
2521
2613
|
init_Icon2();
|
|
2522
2614
|
init_Stack2();
|
|
2523
2615
|
import_Checkbox = require("@simplybusiness/mobius/src/components/Checkbox/Checkbox.css");
|
|
2524
|
-
|
|
2616
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2525
2617
|
Checkbox = ({ ref, ...props }) => {
|
|
2526
2618
|
const {
|
|
2527
2619
|
id,
|
|
@@ -2541,18 +2633,18 @@ var init_Checkbox = __esm({
|
|
|
2541
2633
|
["aria-describedby"]: ariaDescribedBy,
|
|
2542
2634
|
...rest
|
|
2543
2635
|
} = props;
|
|
2544
|
-
const [checked, setChecked] = (0,
|
|
2545
|
-
const fallbackRef = (0,
|
|
2636
|
+
const [checked, setChecked] = (0, import_react18.useState)(defaultSelected);
|
|
2637
|
+
const fallbackRef = (0, import_react18.useRef)(null);
|
|
2546
2638
|
const refObj = ref || fallbackRef;
|
|
2547
|
-
const inputId = (0,
|
|
2639
|
+
const inputId = (0, import_react18.useId)();
|
|
2548
2640
|
const isControlled = typeof selected === "boolean";
|
|
2549
|
-
(0,
|
|
2641
|
+
(0, import_react18.useEffect)(() => {
|
|
2550
2642
|
if (isControlled) {
|
|
2551
2643
|
setChecked(selected);
|
|
2552
2644
|
}
|
|
2553
2645
|
}, [selected, isControlled]);
|
|
2554
2646
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
2555
|
-
const sharedClasses = (0,
|
|
2647
|
+
const sharedClasses = (0, import_dedupe20.default)(
|
|
2556
2648
|
{
|
|
2557
2649
|
"--is-disabled": isDisabled,
|
|
2558
2650
|
"--is-selected": checked,
|
|
@@ -2561,31 +2653,31 @@ var init_Checkbox = __esm({
|
|
|
2561
2653
|
},
|
|
2562
2654
|
validationClasses
|
|
2563
2655
|
);
|
|
2564
|
-
const wrapperClasses = (0,
|
|
2656
|
+
const wrapperClasses = (0, import_dedupe20.default)(
|
|
2565
2657
|
"mobius",
|
|
2566
2658
|
"mobius-checkbox",
|
|
2567
2659
|
sharedClasses,
|
|
2568
2660
|
className
|
|
2569
2661
|
);
|
|
2570
|
-
const labelClasses = (0,
|
|
2571
|
-
const inputClasses = (0,
|
|
2572
|
-
const iconClasses = (0,
|
|
2573
|
-
const errorMessageId = (0,
|
|
2662
|
+
const labelClasses = (0, import_dedupe20.default)("mobius-checkbox__label", sharedClasses);
|
|
2663
|
+
const inputClasses = (0, import_dedupe20.default)("mobius-checkbox__input", sharedClasses);
|
|
2664
|
+
const iconClasses = (0, import_dedupe20.default)("mobius-checkbox__icon", sharedClasses);
|
|
2665
|
+
const errorMessageId = (0, import_react18.useId)();
|
|
2574
2666
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
2575
2667
|
const describedBy = spaceDelimitedList([
|
|
2576
2668
|
shouldErrorMessageShow,
|
|
2577
2669
|
ariaDescribedBy
|
|
2578
2670
|
]);
|
|
2579
|
-
const labelId = (0,
|
|
2671
|
+
const labelId = (0, import_react18.useId)();
|
|
2580
2672
|
const handleChange = (event) => {
|
|
2581
2673
|
setChecked(!checked);
|
|
2582
2674
|
if (onChange) {
|
|
2583
2675
|
onChange(event, isLastItem);
|
|
2584
2676
|
}
|
|
2585
2677
|
};
|
|
2586
|
-
return /* @__PURE__ */ (0,
|
|
2587
|
-
/* @__PURE__ */ (0,
|
|
2588
|
-
/* @__PURE__ */ (0,
|
|
2678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Stack, { gap: "xs", className: wrapperClasses, children: [
|
|
2679
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: labelClasses, children: [
|
|
2680
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2589
2681
|
"input",
|
|
2590
2682
|
{
|
|
2591
2683
|
"aria-describedby": describedBy,
|
|
@@ -2606,7 +2698,7 @@ var init_Checkbox = __esm({
|
|
|
2606
2698
|
...rest
|
|
2607
2699
|
}
|
|
2608
2700
|
),
|
|
2609
|
-
/* @__PURE__ */ (0,
|
|
2701
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2610
2702
|
Icon,
|
|
2611
2703
|
{
|
|
2612
2704
|
icon: checked ? import_icons6.squareTick : import_icons6.square,
|
|
@@ -2614,9 +2706,9 @@ var init_Checkbox = __esm({
|
|
|
2614
2706
|
className: iconClasses
|
|
2615
2707
|
}
|
|
2616
2708
|
),
|
|
2617
|
-
/* @__PURE__ */ (0,
|
|
2709
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { id: labelId, className: "mobius-checkbox__visible-label", children: label })
|
|
2618
2710
|
] }),
|
|
2619
|
-
/* @__PURE__ */ (0,
|
|
2711
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
2620
2712
|
] });
|
|
2621
2713
|
};
|
|
2622
2714
|
Checkbox.displayName = "Checkbox";
|
|
@@ -2624,20 +2716,20 @@ var init_Checkbox = __esm({
|
|
|
2624
2716
|
});
|
|
2625
2717
|
|
|
2626
2718
|
// src/components/Checkbox/CheckboxGroup.tsx
|
|
2627
|
-
var
|
|
2719
|
+
var import_dedupe21, import_react19, import_CheckboxGroup, import_jsx_runtime25, CheckboxGroup;
|
|
2628
2720
|
var init_CheckboxGroup = __esm({
|
|
2629
2721
|
"src/components/Checkbox/CheckboxGroup.tsx"() {
|
|
2630
2722
|
"use strict";
|
|
2631
2723
|
"use client";
|
|
2632
|
-
|
|
2633
|
-
|
|
2724
|
+
import_dedupe21 = __toESM(require("classnames/dedupe"));
|
|
2725
|
+
import_react19 = require("react");
|
|
2634
2726
|
init_hooks();
|
|
2635
2727
|
init_spaceDelimitedList();
|
|
2636
2728
|
init_ErrorMessage2();
|
|
2637
2729
|
init_Label2();
|
|
2638
2730
|
init_Checkbox();
|
|
2639
2731
|
import_CheckboxGroup = require("@simplybusiness/mobius/src/components/Checkbox/CheckboxGroup.css");
|
|
2640
|
-
|
|
2732
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2641
2733
|
CheckboxGroup = ({ ref, ...props }) => {
|
|
2642
2734
|
const {
|
|
2643
2735
|
label,
|
|
@@ -2655,10 +2747,10 @@ var init_CheckboxGroup = __esm({
|
|
|
2655
2747
|
lastItemDisables = false,
|
|
2656
2748
|
...rest
|
|
2657
2749
|
} = props;
|
|
2658
|
-
const [selected, setSelected] = (0,
|
|
2659
|
-
const isInitializedRef = (0,
|
|
2660
|
-
const prevDefaultValueRef = (0,
|
|
2661
|
-
(0,
|
|
2750
|
+
const [selected, setSelected] = (0, import_react19.useState)(defaultValue);
|
|
2751
|
+
const isInitializedRef = (0, import_react19.useRef)(false);
|
|
2752
|
+
const prevDefaultValueRef = (0, import_react19.useRef)(defaultValue);
|
|
2753
|
+
(0, import_react19.useEffect)(() => {
|
|
2662
2754
|
const hasChanged = defaultValue.length !== prevDefaultValueRef.current.length || defaultValue.some(
|
|
2663
2755
|
(val, index) => val !== prevDefaultValueRef.current[index]
|
|
2664
2756
|
);
|
|
@@ -2668,7 +2760,7 @@ var init_CheckboxGroup = __esm({
|
|
|
2668
2760
|
isInitializedRef.current = true;
|
|
2669
2761
|
}
|
|
2670
2762
|
}, [defaultValue]);
|
|
2671
|
-
const checkboxGroupClasses = (0,
|
|
2763
|
+
const checkboxGroupClasses = (0, import_dedupe21.default)(
|
|
2672
2764
|
"mobius",
|
|
2673
2765
|
"mobius-checkbox-group",
|
|
2674
2766
|
className,
|
|
@@ -2680,19 +2772,19 @@ var init_CheckboxGroup = __esm({
|
|
|
2680
2772
|
}
|
|
2681
2773
|
);
|
|
2682
2774
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
2683
|
-
const labelClasses = (0,
|
|
2775
|
+
const labelClasses = (0, import_dedupe21.default)(
|
|
2684
2776
|
{
|
|
2685
2777
|
"--is-disabled": isDisabled
|
|
2686
2778
|
},
|
|
2687
2779
|
validationClasses
|
|
2688
2780
|
);
|
|
2689
|
-
const errorMessageId = (0,
|
|
2781
|
+
const errorMessageId = (0, import_react19.useId)();
|
|
2690
2782
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
2691
2783
|
const describedBy = spaceDelimitedList([
|
|
2692
2784
|
shouldErrorMessageShow,
|
|
2693
2785
|
props["aria-describedby"]
|
|
2694
2786
|
]);
|
|
2695
|
-
const labelId = (0,
|
|
2787
|
+
const labelId = (0, import_react19.useId)();
|
|
2696
2788
|
const handleChange = (event, isLastItem = false) => {
|
|
2697
2789
|
const {
|
|
2698
2790
|
target: { value, checked }
|
|
@@ -2710,12 +2802,12 @@ var init_CheckboxGroup = __esm({
|
|
|
2710
2802
|
setSelected(newValue);
|
|
2711
2803
|
onChange?.(newValue);
|
|
2712
2804
|
};
|
|
2713
|
-
const childrenArray =
|
|
2805
|
+
const childrenArray = import_react19.Children.toArray(children);
|
|
2714
2806
|
const lastCheckbox = childrenArray.filter(
|
|
2715
|
-
(child) => (0,
|
|
2807
|
+
(child) => (0, import_react19.isValidElement)(child) && child.type === Checkbox
|
|
2716
2808
|
).pop();
|
|
2717
2809
|
const lastCheckboxIsChecked = lastCheckbox && selected.includes(lastCheckbox.props.value);
|
|
2718
|
-
return /* @__PURE__ */ (0,
|
|
2810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2719
2811
|
"div",
|
|
2720
2812
|
{
|
|
2721
2813
|
...rest,
|
|
@@ -2724,16 +2816,16 @@ var init_CheckboxGroup = __esm({
|
|
|
2724
2816
|
className: checkboxGroupClasses,
|
|
2725
2817
|
role: "group",
|
|
2726
2818
|
style: {
|
|
2727
|
-
"--checkbox-items-per-row": itemsPerRow ||
|
|
2819
|
+
"--checkbox-items-per-row": itemsPerRow || import_react19.Children.count(children)
|
|
2728
2820
|
},
|
|
2729
2821
|
children: [
|
|
2730
|
-
label && /* @__PURE__ */ (0,
|
|
2731
|
-
/* @__PURE__ */ (0,
|
|
2732
|
-
if ((0,
|
|
2822
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Label, { elementType: "span", id: labelId, className: labelClasses, children: label }),
|
|
2823
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "mobius-checkbox-group__wrapper", children: childrenArray.map((child) => {
|
|
2824
|
+
if ((0, import_react19.isValidElement)(child)) {
|
|
2733
2825
|
const isLastItem = child === lastCheckbox;
|
|
2734
2826
|
const isChildDisabled = isDisabled || lastItemDisables && lastCheckboxIsChecked && !isLastItem;
|
|
2735
2827
|
const childProps = child.props;
|
|
2736
|
-
return (0,
|
|
2828
|
+
return (0, import_react19.cloneElement)(
|
|
2737
2829
|
child,
|
|
2738
2830
|
{
|
|
2739
2831
|
isDisabled: isChildDisabled,
|
|
@@ -2749,7 +2841,7 @@ var init_CheckboxGroup = __esm({
|
|
|
2749
2841
|
}
|
|
2750
2842
|
return child;
|
|
2751
2843
|
}) }),
|
|
2752
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2844
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
2753
2845
|
]
|
|
2754
2846
|
}
|
|
2755
2847
|
);
|
|
@@ -2776,23 +2868,23 @@ var init_Checkbox2 = __esm({
|
|
|
2776
2868
|
});
|
|
2777
2869
|
|
|
2778
2870
|
// src/components/Container/Container.tsx
|
|
2779
|
-
var
|
|
2871
|
+
var import_dedupe22, import_Container, import_jsx_runtime26, Container;
|
|
2780
2872
|
var init_Container = __esm({
|
|
2781
2873
|
"src/components/Container/Container.tsx"() {
|
|
2782
2874
|
"use strict";
|
|
2783
|
-
|
|
2875
|
+
import_dedupe22 = __toESM(require("classnames/dedupe"));
|
|
2784
2876
|
init_utils();
|
|
2785
2877
|
import_Container = require("@simplybusiness/mobius/src/components/Container/Container.css");
|
|
2786
|
-
|
|
2878
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2787
2879
|
Container = ({ ref, ...props }) => {
|
|
2788
2880
|
const { elementType: Element = "div", size = "md", ...otherProps } = props;
|
|
2789
|
-
const classes = (0,
|
|
2881
|
+
const classes = (0, import_dedupe22.default)(
|
|
2790
2882
|
"mobius",
|
|
2791
2883
|
"mobius-container",
|
|
2792
2884
|
sizeClasses(size),
|
|
2793
2885
|
otherProps.className
|
|
2794
2886
|
);
|
|
2795
|
-
return /* @__PURE__ */ (0,
|
|
2887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
2796
2888
|
};
|
|
2797
2889
|
Container.displayName = "Container";
|
|
2798
2890
|
}
|
|
@@ -2845,17 +2937,17 @@ var init_validation = __esm({
|
|
|
2845
2937
|
});
|
|
2846
2938
|
|
|
2847
2939
|
// src/components/DateField/DateField.tsx
|
|
2848
|
-
var
|
|
2940
|
+
var import_dedupe23, import_react20, import_jsx_runtime27, MIN_MAX_ERROR, DateField;
|
|
2849
2941
|
var init_DateField = __esm({
|
|
2850
2942
|
"src/components/DateField/DateField.tsx"() {
|
|
2851
2943
|
"use strict";
|
|
2852
2944
|
"use client";
|
|
2853
|
-
|
|
2854
|
-
|
|
2945
|
+
import_dedupe23 = __toESM(require("classnames/dedupe"));
|
|
2946
|
+
import_react20 = require("react");
|
|
2855
2947
|
init_mergeRefs();
|
|
2856
2948
|
init_TextField2();
|
|
2857
2949
|
init_validation();
|
|
2858
|
-
|
|
2950
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2859
2951
|
MIN_MAX_ERROR = '"min" value should not be greater than "max" value.';
|
|
2860
2952
|
DateField = ({ ref, ...props }) => {
|
|
2861
2953
|
const {
|
|
@@ -2868,10 +2960,10 @@ var init_DateField = __esm({
|
|
|
2868
2960
|
value,
|
|
2869
2961
|
...otherProps
|
|
2870
2962
|
} = props;
|
|
2871
|
-
const [error3, setError] = (0,
|
|
2872
|
-
const [isInvalid, setIsInvalid] = (0,
|
|
2873
|
-
const localRef = (0,
|
|
2874
|
-
const classes = (0,
|
|
2963
|
+
const [error3, setError] = (0, import_react20.useState)(errorMessage);
|
|
2964
|
+
const [isInvalid, setIsInvalid] = (0, import_react20.useState)(void 0);
|
|
2965
|
+
const localRef = (0, import_react20.useRef)(null);
|
|
2966
|
+
const classes = (0, import_dedupe23.default)("mobius-date-field", className);
|
|
2875
2967
|
const formattedMin = min ? convertToDateFormat(min, format) : void 0;
|
|
2876
2968
|
const formattedMax = max ? convertToDateFormat(max, format) : void 0;
|
|
2877
2969
|
const formattedDefaultValue = defaultValue ? convertToDateFormat(defaultValue, format) : void 0;
|
|
@@ -2884,7 +2976,7 @@ var init_DateField = __esm({
|
|
|
2884
2976
|
setError(props.errorMessage);
|
|
2885
2977
|
setIsInvalid(false);
|
|
2886
2978
|
};
|
|
2887
|
-
(0,
|
|
2979
|
+
(0, import_react20.useEffect)(() => {
|
|
2888
2980
|
if (!isValidDate(min, format)) {
|
|
2889
2981
|
setInvalidState(`Invalid min date: ${min}`);
|
|
2890
2982
|
return;
|
|
@@ -2917,7 +3009,7 @@ var init_DateField = __esm({
|
|
|
2917
3009
|
validate();
|
|
2918
3010
|
otherProps.onBlur?.(event);
|
|
2919
3011
|
};
|
|
2920
|
-
return /* @__PURE__ */ (0,
|
|
3012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2921
3013
|
TextField,
|
|
2922
3014
|
{
|
|
2923
3015
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -2948,23 +3040,23 @@ var init_DateField2 = __esm({
|
|
|
2948
3040
|
});
|
|
2949
3041
|
|
|
2950
3042
|
// src/components/Drawer/Content.tsx
|
|
2951
|
-
var
|
|
3043
|
+
var import_jsx_runtime28, Content;
|
|
2952
3044
|
var init_Content = __esm({
|
|
2953
3045
|
"src/components/Drawer/Content.tsx"() {
|
|
2954
3046
|
"use strict";
|
|
2955
|
-
|
|
2956
|
-
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
3047
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3048
|
+
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { ref, ...otherProps, className: "mobius-drawer__content", children });
|
|
2957
3049
|
Content.displayName = "Content";
|
|
2958
3050
|
}
|
|
2959
3051
|
});
|
|
2960
3052
|
|
|
2961
3053
|
// src/components/Drawer/DrawerContext.tsx
|
|
2962
|
-
var
|
|
3054
|
+
var import_react21, DrawerContext;
|
|
2963
3055
|
var init_DrawerContext = __esm({
|
|
2964
3056
|
"src/components/Drawer/DrawerContext.tsx"() {
|
|
2965
3057
|
"use strict";
|
|
2966
|
-
|
|
2967
|
-
DrawerContext = (0,
|
|
3058
|
+
import_react21 = require("react");
|
|
3059
|
+
DrawerContext = (0, import_react21.createContext)({
|
|
2968
3060
|
onClose: () => {
|
|
2969
3061
|
},
|
|
2970
3062
|
closeLabel: void 0,
|
|
@@ -2974,19 +3066,19 @@ var init_DrawerContext = __esm({
|
|
|
2974
3066
|
});
|
|
2975
3067
|
|
|
2976
3068
|
// src/components/Drawer/Drawer.tsx
|
|
2977
|
-
var
|
|
3069
|
+
var import_dedupe24, import_react22, import_Drawer, import_jsx_runtime29, TRANSITION_CSS_VARIABLE, Drawer;
|
|
2978
3070
|
var init_Drawer = __esm({
|
|
2979
3071
|
"src/components/Drawer/Drawer.tsx"() {
|
|
2980
3072
|
"use strict";
|
|
2981
3073
|
"use client";
|
|
2982
|
-
|
|
2983
|
-
|
|
3074
|
+
import_dedupe24 = __toESM(require("classnames/dedupe"));
|
|
3075
|
+
import_react22 = require("react");
|
|
2984
3076
|
init_hooks();
|
|
2985
3077
|
init_utils();
|
|
2986
3078
|
init_VisuallyHidden2();
|
|
2987
3079
|
init_DrawerContext();
|
|
2988
3080
|
import_Drawer = require("@simplybusiness/mobius/src/components/Drawer/Drawer.css");
|
|
2989
|
-
|
|
3081
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2990
3082
|
TRANSITION_CSS_VARIABLE = "--drawer-transition-duration";
|
|
2991
3083
|
Drawer = ({ ref, ...props }) => {
|
|
2992
3084
|
const {
|
|
@@ -2999,8 +3091,8 @@ var init_Drawer = __esm({
|
|
|
2999
3091
|
onClose,
|
|
3000
3092
|
children
|
|
3001
3093
|
} = props;
|
|
3002
|
-
const dialogRef = (0,
|
|
3003
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
3094
|
+
const dialogRef = (0, import_react22.useRef)(null);
|
|
3095
|
+
const [shouldTransition, setShouldTransition] = (0, import_react22.useState)(false);
|
|
3004
3096
|
const { close } = useDialog({
|
|
3005
3097
|
ref: dialogRef,
|
|
3006
3098
|
isOpen,
|
|
@@ -3011,9 +3103,9 @@ var init_Drawer = __esm({
|
|
|
3011
3103
|
CSSVariable: TRANSITION_CSS_VARIABLE
|
|
3012
3104
|
}
|
|
3013
3105
|
});
|
|
3014
|
-
const hiddenId = `dialog-screen-reader-announce-${(0,
|
|
3015
|
-
const headerId = `dialog-header-${(0,
|
|
3016
|
-
const dialogClasses = (0,
|
|
3106
|
+
const hiddenId = `dialog-screen-reader-announce-${(0, import_react22.useId)()}`;
|
|
3107
|
+
const headerId = `dialog-header-${(0, import_react22.useId)()}`;
|
|
3108
|
+
const dialogClasses = (0, import_dedupe24.default)(
|
|
3017
3109
|
"mobius",
|
|
3018
3110
|
"mobius-drawer",
|
|
3019
3111
|
`--${direction}`,
|
|
@@ -3022,10 +3114,10 @@ var init_Drawer = __esm({
|
|
|
3022
3114
|
"--should-transition": shouldTransition
|
|
3023
3115
|
}
|
|
3024
3116
|
);
|
|
3025
|
-
(0,
|
|
3117
|
+
(0, import_react22.useEffect)(() => {
|
|
3026
3118
|
setShouldTransition(supportsDialog());
|
|
3027
3119
|
}, []);
|
|
3028
|
-
const contextValue = (0,
|
|
3120
|
+
const contextValue = (0, import_react22.useMemo)(
|
|
3029
3121
|
() => ({
|
|
3030
3122
|
onClose: close,
|
|
3031
3123
|
closeLabel,
|
|
@@ -3033,18 +3125,18 @@ var init_Drawer = __esm({
|
|
|
3033
3125
|
}),
|
|
3034
3126
|
[close, closeLabel, headerId]
|
|
3035
3127
|
);
|
|
3036
|
-
return /* @__PURE__ */ (0,
|
|
3128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
3037
3129
|
"dialog",
|
|
3038
3130
|
{
|
|
3039
|
-
id: (0,
|
|
3131
|
+
id: (0, import_react22.useId)(),
|
|
3040
3132
|
ref: mergeRefs([dialogRef, ref]),
|
|
3041
3133
|
onCancel: close,
|
|
3042
3134
|
className: dialogClasses,
|
|
3043
3135
|
"aria-describedby": hiddenId,
|
|
3044
3136
|
"aria-labelledby": headerId,
|
|
3045
3137
|
children: [
|
|
3046
|
-
/* @__PURE__ */ (0,
|
|
3047
|
-
/* @__PURE__ */ (0,
|
|
3138
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { id: hiddenId, children: announce }) }),
|
|
3139
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DrawerContext.Provider, { value: contextValue, children })
|
|
3048
3140
|
]
|
|
3049
3141
|
}
|
|
3050
3142
|
);
|
|
@@ -3054,21 +3146,21 @@ var init_Drawer = __esm({
|
|
|
3054
3146
|
});
|
|
3055
3147
|
|
|
3056
3148
|
// src/components/Drawer/useDrawer.ts
|
|
3057
|
-
var
|
|
3149
|
+
var import_react23, useDrawer;
|
|
3058
3150
|
var init_useDrawer = __esm({
|
|
3059
3151
|
"src/components/Drawer/useDrawer.ts"() {
|
|
3060
3152
|
"use strict";
|
|
3061
|
-
|
|
3153
|
+
import_react23 = require("react");
|
|
3062
3154
|
init_DrawerContext();
|
|
3063
3155
|
useDrawer = () => {
|
|
3064
|
-
const { onClose, closeLabel, headerId } = (0,
|
|
3156
|
+
const { onClose, closeLabel, headerId } = (0, import_react23.useContext)(DrawerContext);
|
|
3065
3157
|
return { onClose, closeLabel, headerId };
|
|
3066
3158
|
};
|
|
3067
3159
|
}
|
|
3068
3160
|
});
|
|
3069
3161
|
|
|
3070
3162
|
// src/components/Drawer/Header.tsx
|
|
3071
|
-
var import_icons7,
|
|
3163
|
+
var import_icons7, import_jsx_runtime30, Header;
|
|
3072
3164
|
var init_Header = __esm({
|
|
3073
3165
|
"src/components/Drawer/Header.tsx"() {
|
|
3074
3166
|
"use strict";
|
|
@@ -3076,12 +3168,12 @@ var init_Header = __esm({
|
|
|
3076
3168
|
init_Button2();
|
|
3077
3169
|
init_Icon2();
|
|
3078
3170
|
init_useDrawer();
|
|
3079
|
-
|
|
3171
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3080
3172
|
Header = ({ ref, children, ...otherProps }) => {
|
|
3081
3173
|
const { onClose, closeLabel, headerId } = useDrawer();
|
|
3082
|
-
return /* @__PURE__ */ (0,
|
|
3083
|
-
/* @__PURE__ */ (0,
|
|
3084
|
-
/* @__PURE__ */ (0,
|
|
3174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("header", { ref, ...otherProps, className: "mobius-drawer__header", children: [
|
|
3175
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h2", { id: headerId, children }),
|
|
3176
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3085
3177
|
Button,
|
|
3086
3178
|
{
|
|
3087
3179
|
"aria-label": "Close",
|
|
@@ -3090,7 +3182,7 @@ var init_Header = __esm({
|
|
|
3090
3182
|
className: "mobius-drawer__close",
|
|
3091
3183
|
size: "sm",
|
|
3092
3184
|
children: [
|
|
3093
|
-
/* @__PURE__ */ (0,
|
|
3185
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { icon: import_icons7.cross }),
|
|
3094
3186
|
" ",
|
|
3095
3187
|
closeLabel
|
|
3096
3188
|
]
|
|
@@ -3119,17 +3211,17 @@ var init_Drawer2 = __esm({
|
|
|
3119
3211
|
});
|
|
3120
3212
|
|
|
3121
3213
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
3122
|
-
var
|
|
3214
|
+
var import_react24, import_react_accessible_dropdown_menu_hook, import_dedupe25, import_DropdownMenu, import_jsx_runtime31, DropdownMenu;
|
|
3123
3215
|
var init_DropdownMenu = __esm({
|
|
3124
3216
|
"src/components/DropdownMenu/DropdownMenu.tsx"() {
|
|
3125
3217
|
"use strict";
|
|
3126
3218
|
"use client";
|
|
3127
|
-
|
|
3219
|
+
import_react24 = require("react");
|
|
3128
3220
|
import_react_accessible_dropdown_menu_hook = __toESM(require("react-accessible-dropdown-menu-hook"));
|
|
3129
|
-
|
|
3221
|
+
import_dedupe25 = __toESM(require("classnames/dedupe"));
|
|
3130
3222
|
init_Button2();
|
|
3131
3223
|
import_DropdownMenu = require("@simplybusiness/mobius/src/components/DropdownMenu/DropdownMenu.css");
|
|
3132
|
-
|
|
3224
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3133
3225
|
DropdownMenu = ({ ref, ...props }) => {
|
|
3134
3226
|
const {
|
|
3135
3227
|
elementType: Element = "nav",
|
|
@@ -3138,21 +3230,21 @@ var init_DropdownMenu = __esm({
|
|
|
3138
3230
|
children,
|
|
3139
3231
|
...otherProps
|
|
3140
3232
|
} = props;
|
|
3141
|
-
const [activeId, setActiveId] = (0,
|
|
3142
|
-
const numberOfItems =
|
|
3233
|
+
const [activeId, setActiveId] = (0, import_react24.useState)(null);
|
|
3234
|
+
const numberOfItems = import_react24.Children.count(children);
|
|
3143
3235
|
const {
|
|
3144
3236
|
buttonProps,
|
|
3145
3237
|
itemProps,
|
|
3146
3238
|
isOpen: open,
|
|
3147
3239
|
setIsOpen
|
|
3148
3240
|
} = (0, import_react_accessible_dropdown_menu_hook.default)(numberOfItems);
|
|
3149
|
-
const classes = (0,
|
|
3241
|
+
const classes = (0, import_dedupe25.default)(
|
|
3150
3242
|
"mobius",
|
|
3151
3243
|
"mobius-dropdown-menu",
|
|
3152
3244
|
otherProps.className
|
|
3153
3245
|
);
|
|
3154
|
-
const triggerClasses = (0,
|
|
3155
|
-
const listClasses = (0,
|
|
3246
|
+
const triggerClasses = (0, import_dedupe25.default)("mobius", "mobius-dropdown-menu__trigger");
|
|
3247
|
+
const listClasses = (0, import_dedupe25.default)("mobius", "mobius-dropdown-menu__list", {
|
|
3156
3248
|
"--is-open": open
|
|
3157
3249
|
});
|
|
3158
3250
|
const handleChildClick = ({ onClick }, index) => {
|
|
@@ -3162,16 +3254,16 @@ var init_DropdownMenu = __esm({
|
|
|
3162
3254
|
onClick();
|
|
3163
3255
|
}
|
|
3164
3256
|
};
|
|
3165
|
-
return /* @__PURE__ */ (0,
|
|
3166
|
-
trigger ? (0,
|
|
3257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Element, { ref, ...otherProps, className: classes, children: [
|
|
3258
|
+
trigger ? (0, import_react24.cloneElement)(trigger, {
|
|
3167
3259
|
className: triggerClasses,
|
|
3168
3260
|
open,
|
|
3169
3261
|
label,
|
|
3170
3262
|
...buttonProps
|
|
3171
|
-
}) : /* @__PURE__ */ (0,
|
|
3172
|
-
/* @__PURE__ */ (0,
|
|
3173
|
-
if ((0,
|
|
3174
|
-
return (0,
|
|
3263
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button, { className: triggerClasses, ...buttonProps, children: label }),
|
|
3264
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("ul", { className: listClasses, role: "menu", children: import_react24.Children.map(children, (child, index) => {
|
|
3265
|
+
if ((0, import_react24.isValidElement)(child)) {
|
|
3266
|
+
return (0, import_react24.cloneElement)(child, {
|
|
3175
3267
|
onClick: () => handleChildClick(child.props, index),
|
|
3176
3268
|
active: index === activeId,
|
|
3177
3269
|
...itemProps[index]
|
|
@@ -3186,13 +3278,13 @@ var init_DropdownMenu = __esm({
|
|
|
3186
3278
|
});
|
|
3187
3279
|
|
|
3188
3280
|
// src/components/DropdownMenu/Item.tsx
|
|
3189
|
-
var
|
|
3281
|
+
var import_react25, import_dedupe26, import_jsx_runtime32, Item;
|
|
3190
3282
|
var init_Item = __esm({
|
|
3191
3283
|
"src/components/DropdownMenu/Item.tsx"() {
|
|
3192
3284
|
"use strict";
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3285
|
+
import_react25 = require("react");
|
|
3286
|
+
import_dedupe26 = __toESM(require("classnames/dedupe"));
|
|
3287
|
+
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3196
3288
|
Item = ({ ref, ...props }) => {
|
|
3197
3289
|
const {
|
|
3198
3290
|
elementType: Element = "li",
|
|
@@ -3201,26 +3293,26 @@ var init_Item = __esm({
|
|
|
3201
3293
|
children,
|
|
3202
3294
|
...otherProps
|
|
3203
3295
|
} = props;
|
|
3204
|
-
const classes = (0,
|
|
3296
|
+
const classes = (0, import_dedupe26.default)(
|
|
3205
3297
|
"mobius",
|
|
3206
3298
|
"mobius-dropdown-menu__item",
|
|
3207
3299
|
{ "--is-active": active },
|
|
3208
3300
|
otherProps.className
|
|
3209
3301
|
);
|
|
3210
|
-
return /* @__PURE__ */ (0,
|
|
3211
|
-
if ((0,
|
|
3212
|
-
const childClasses = (0,
|
|
3302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Element, { ref, onClick, ...otherProps, children: import_react25.Children.map(children, (child) => {
|
|
3303
|
+
if ((0, import_react25.isValidElement)(child)) {
|
|
3304
|
+
const childClasses = (0, import_dedupe26.default)(
|
|
3213
3305
|
child.props.className,
|
|
3214
3306
|
classes
|
|
3215
3307
|
);
|
|
3216
|
-
return (0,
|
|
3308
|
+
return (0, import_react25.cloneElement)(
|
|
3217
3309
|
child,
|
|
3218
3310
|
{
|
|
3219
3311
|
className: childClasses
|
|
3220
3312
|
}
|
|
3221
3313
|
);
|
|
3222
3314
|
}
|
|
3223
|
-
return /* @__PURE__ */ (0,
|
|
3315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: classes, children: child });
|
|
3224
3316
|
}) });
|
|
3225
3317
|
};
|
|
3226
3318
|
Item.displayName = "DropdownMenu.Item";
|
|
@@ -3245,23 +3337,23 @@ var init_DropdownMenu2 = __esm({
|
|
|
3245
3337
|
});
|
|
3246
3338
|
|
|
3247
3339
|
// src/components/Fieldset/Fieldset.tsx
|
|
3248
|
-
var
|
|
3340
|
+
var import_dedupe27, import_react26, import_Fieldset, import_jsx_runtime33, useFieldset, Fieldset;
|
|
3249
3341
|
var init_Fieldset = __esm({
|
|
3250
3342
|
"src/components/Fieldset/Fieldset.tsx"() {
|
|
3251
3343
|
"use strict";
|
|
3252
3344
|
"use client";
|
|
3253
|
-
|
|
3254
|
-
|
|
3345
|
+
import_dedupe27 = __toESM(require("classnames/dedupe"));
|
|
3346
|
+
import_react26 = require("react");
|
|
3255
3347
|
init_Flex2();
|
|
3256
3348
|
import_Fieldset = require("@simplybusiness/mobius/src/components/Fieldset/Fieldset.css");
|
|
3257
|
-
|
|
3349
|
+
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3258
3350
|
useFieldset = (props) => {
|
|
3259
3351
|
const { legend } = props;
|
|
3260
3352
|
let legendProps = {};
|
|
3261
3353
|
let containerProps = {
|
|
3262
3354
|
role: "group"
|
|
3263
3355
|
};
|
|
3264
|
-
const legendId = (0,
|
|
3356
|
+
const legendId = (0, import_react26.useId)();
|
|
3265
3357
|
if (legend) {
|
|
3266
3358
|
legendProps = {
|
|
3267
3359
|
...legendProps,
|
|
@@ -3281,14 +3373,14 @@ var init_Fieldset = __esm({
|
|
|
3281
3373
|
const {
|
|
3282
3374
|
children,
|
|
3283
3375
|
legend,
|
|
3284
|
-
legendComponent = /* @__PURE__ */ (0,
|
|
3376
|
+
legendComponent = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("legend", {}),
|
|
3285
3377
|
...otherProps
|
|
3286
3378
|
} = props;
|
|
3287
3379
|
const { legendProps, containerProps } = useFieldset(props);
|
|
3288
|
-
const classes = (0,
|
|
3380
|
+
const classes = (0, import_dedupe27.default)("mobius", "mobius-fieldset", props.className);
|
|
3289
3381
|
legendProps.className = "mobius-fieldset__legend";
|
|
3290
|
-
return /* @__PURE__ */ (0,
|
|
3291
|
-
legend && (0,
|
|
3382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Flex, { ...containerProps, ...otherProps, className: classes, children: [
|
|
3383
|
+
legend && (0, import_react26.cloneElement)(legendComponent, { ...legendProps }, [legend]),
|
|
3292
3384
|
children
|
|
3293
3385
|
] });
|
|
3294
3386
|
};
|
|
@@ -3305,13 +3397,13 @@ var init_Fieldset2 = __esm({
|
|
|
3305
3397
|
});
|
|
3306
3398
|
|
|
3307
3399
|
// src/components/Grid/Grid.tsx
|
|
3308
|
-
var
|
|
3400
|
+
var import_dedupe28, import_jsx_runtime34, Grid;
|
|
3309
3401
|
var init_Grid = __esm({
|
|
3310
3402
|
"src/components/Grid/Grid.tsx"() {
|
|
3311
3403
|
"use strict";
|
|
3312
|
-
|
|
3404
|
+
import_dedupe28 = __toESM(require("classnames/dedupe"));
|
|
3313
3405
|
init_utils();
|
|
3314
|
-
|
|
3406
|
+
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3315
3407
|
Grid = ({ ref: _ref, ...props }) => {
|
|
3316
3408
|
const {
|
|
3317
3409
|
columns = 12,
|
|
@@ -3326,7 +3418,7 @@ var init_Grid = __esm({
|
|
|
3326
3418
|
style,
|
|
3327
3419
|
...rest
|
|
3328
3420
|
} = props;
|
|
3329
|
-
const classes = (0,
|
|
3421
|
+
const classes = (0, import_dedupe28.default)("mobius", "mobius-grid", className);
|
|
3330
3422
|
const styles = filterUndefinedProps({
|
|
3331
3423
|
boxSizing: "border-box",
|
|
3332
3424
|
display: "grid",
|
|
@@ -3340,22 +3432,22 @@ var init_Grid = __esm({
|
|
|
3340
3432
|
justifyItems,
|
|
3341
3433
|
...style
|
|
3342
3434
|
});
|
|
3343
|
-
return /* @__PURE__ */ (0,
|
|
3435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: styles, className: classes, ...rest });
|
|
3344
3436
|
};
|
|
3345
3437
|
Grid.displayName = "Grid";
|
|
3346
3438
|
}
|
|
3347
3439
|
});
|
|
3348
3440
|
|
|
3349
3441
|
// src/components/Grid/Item.tsx
|
|
3350
|
-
var
|
|
3442
|
+
var import_react27, import_dedupe29, import_jsx_runtime35, getBreakpointMap, DEFAULT_SPAN, GridItem;
|
|
3351
3443
|
var init_Item2 = __esm({
|
|
3352
3444
|
"src/components/Grid/Item.tsx"() {
|
|
3353
3445
|
"use strict";
|
|
3354
3446
|
"use client";
|
|
3355
|
-
|
|
3356
|
-
|
|
3447
|
+
import_react27 = require("react");
|
|
3448
|
+
import_dedupe29 = __toESM(require("classnames/dedupe"));
|
|
3357
3449
|
init_hooks();
|
|
3358
|
-
|
|
3450
|
+
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3359
3451
|
getBreakpointMap = (config) => Object.entries(config).reduce(
|
|
3360
3452
|
(prev, [key, value]) => {
|
|
3361
3453
|
const previous = Object.values(prev);
|
|
@@ -3390,9 +3482,9 @@ var init_Item2 = __esm({
|
|
|
3390
3482
|
xl,
|
|
3391
3483
|
xxl
|
|
3392
3484
|
});
|
|
3393
|
-
const [responsiveSpan, setResponsiveSpan] = (0,
|
|
3394
|
-
const classes = (0,
|
|
3395
|
-
(0,
|
|
3485
|
+
const [responsiveSpan, setResponsiveSpan] = (0, import_react27.useState)();
|
|
3486
|
+
const classes = (0, import_dedupe29.default)("mobius-grid__item", className);
|
|
3487
|
+
(0, import_react27.useEffect)(() => {
|
|
3396
3488
|
setResponsiveSpan(breakpointMap[breakpointSize]);
|
|
3397
3489
|
}, [breakpointSize, breakpointMap]);
|
|
3398
3490
|
const styles = {
|
|
@@ -3400,7 +3492,7 @@ var init_Item2 = __esm({
|
|
|
3400
3492
|
alignSelf,
|
|
3401
3493
|
justifySelf
|
|
3402
3494
|
};
|
|
3403
|
-
return /* @__PURE__ */ (0,
|
|
3495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { style: { ...styles }, className: classes, ...rest });
|
|
3404
3496
|
};
|
|
3405
3497
|
GridItem.displayName = "GridItem";
|
|
3406
3498
|
}
|
|
@@ -3421,20 +3513,20 @@ var init_Grid2 = __esm({
|
|
|
3421
3513
|
});
|
|
3422
3514
|
|
|
3423
3515
|
// src/components/Image/Image.tsx
|
|
3424
|
-
var
|
|
3516
|
+
var import_dedupe30, import_jsx_runtime36, Image;
|
|
3425
3517
|
var init_Image = __esm({
|
|
3426
3518
|
"src/components/Image/Image.tsx"() {
|
|
3427
3519
|
"use strict";
|
|
3428
|
-
|
|
3429
|
-
|
|
3520
|
+
import_dedupe30 = __toESM(require("classnames/dedupe"));
|
|
3521
|
+
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3430
3522
|
Image = ({
|
|
3431
3523
|
ref,
|
|
3432
3524
|
alt,
|
|
3433
3525
|
elementType: Component = "img",
|
|
3434
3526
|
...otherProps
|
|
3435
3527
|
}) => {
|
|
3436
|
-
const classes = (0,
|
|
3437
|
-
return /* @__PURE__ */ (0,
|
|
3528
|
+
const classes = (0, import_dedupe30.default)("mobius", "mobius-image", otherProps.className);
|
|
3529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Component, { alt, ref, ...otherProps, className: classes });
|
|
3438
3530
|
};
|
|
3439
3531
|
Image.displayName = "Image";
|
|
3440
3532
|
}
|
|
@@ -3449,13 +3541,13 @@ var init_Image2 = __esm({
|
|
|
3449
3541
|
});
|
|
3450
3542
|
|
|
3451
3543
|
// src/components/Link/Link.tsx
|
|
3452
|
-
var
|
|
3544
|
+
var import_dedupe31, import_Link, import_jsx_runtime37, Link;
|
|
3453
3545
|
var init_Link = __esm({
|
|
3454
3546
|
"src/components/Link/Link.tsx"() {
|
|
3455
3547
|
"use strict";
|
|
3456
|
-
|
|
3548
|
+
import_dedupe31 = __toESM(require("classnames/dedupe"));
|
|
3457
3549
|
import_Link = require("@simplybusiness/mobius/src/components/Link/Link.css");
|
|
3458
|
-
|
|
3550
|
+
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3459
3551
|
Link = ({ ref, ...props }) => {
|
|
3460
3552
|
const {
|
|
3461
3553
|
isDisabled = false,
|
|
@@ -3469,7 +3561,7 @@ var init_Link = __esm({
|
|
|
3469
3561
|
pointerEvents: "none"
|
|
3470
3562
|
};
|
|
3471
3563
|
const styles = { ...style, ...isDisabled && disabledStyles };
|
|
3472
|
-
const classes = (0,
|
|
3564
|
+
const classes = (0, import_dedupe31.default)(
|
|
3473
3565
|
"mobius",
|
|
3474
3566
|
"mobius-link",
|
|
3475
3567
|
className,
|
|
@@ -3478,7 +3570,7 @@ var init_Link = __esm({
|
|
|
3478
3570
|
"--is-disabled": isDisabled
|
|
3479
3571
|
}
|
|
3480
3572
|
);
|
|
3481
|
-
return /* @__PURE__ */ (0,
|
|
3573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3482
3574
|
Component,
|
|
3483
3575
|
{
|
|
3484
3576
|
ref,
|
|
@@ -3503,12 +3595,12 @@ var init_Link2 = __esm({
|
|
|
3503
3595
|
});
|
|
3504
3596
|
|
|
3505
3597
|
// src/components/LinkButton/LinkButton.tsx
|
|
3506
|
-
var
|
|
3598
|
+
var import_dedupe32, import_jsx_runtime38;
|
|
3507
3599
|
var init_LinkButton = __esm({
|
|
3508
3600
|
"src/components/LinkButton/LinkButton.tsx"() {
|
|
3509
3601
|
"use strict";
|
|
3510
|
-
|
|
3511
|
-
|
|
3602
|
+
import_dedupe32 = __toESM(require("classnames/dedupe"));
|
|
3603
|
+
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3512
3604
|
}
|
|
3513
3605
|
});
|
|
3514
3606
|
|
|
@@ -3521,14 +3613,14 @@ var init_LinkButton2 = __esm({
|
|
|
3521
3613
|
});
|
|
3522
3614
|
|
|
3523
3615
|
// src/components/List/List.tsx
|
|
3524
|
-
var
|
|
3616
|
+
var import_react28, import_dedupe33, import_List, import_jsx_runtime39, List;
|
|
3525
3617
|
var init_List = __esm({
|
|
3526
3618
|
"src/components/List/List.tsx"() {
|
|
3527
3619
|
"use strict";
|
|
3528
|
-
|
|
3529
|
-
|
|
3620
|
+
import_react28 = require("react");
|
|
3621
|
+
import_dedupe33 = __toESM(require("classnames/dedupe"));
|
|
3530
3622
|
import_List = require("@simplybusiness/mobius/src/components/List/List.css");
|
|
3531
|
-
|
|
3623
|
+
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3532
3624
|
List = ({ ref, ...props }) => {
|
|
3533
3625
|
const Component = props.isOrdered ? "ol" : "ul";
|
|
3534
3626
|
const { children, icon, ...otherProps } = props;
|
|
@@ -3537,7 +3629,7 @@ var init_List = __esm({
|
|
|
3537
3629
|
...restProps,
|
|
3538
3630
|
reversed: isReversed
|
|
3539
3631
|
};
|
|
3540
|
-
const classes = (0,
|
|
3632
|
+
const classes = (0, import_dedupe33.default)(
|
|
3541
3633
|
"mobius",
|
|
3542
3634
|
"mobius-list",
|
|
3543
3635
|
{
|
|
@@ -3546,9 +3638,9 @@ var init_List = __esm({
|
|
|
3546
3638
|
},
|
|
3547
3639
|
otherProps.className
|
|
3548
3640
|
);
|
|
3549
|
-
return /* @__PURE__ */ (0,
|
|
3550
|
-
if ((0,
|
|
3551
|
-
return (0,
|
|
3641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Component, { ref, ...mappedProps, className: classes, children: import_react28.Children.map(children, (child) => {
|
|
3642
|
+
if ((0, import_react28.isValidElement)(child)) {
|
|
3643
|
+
return (0, import_react28.cloneElement)(child, {
|
|
3552
3644
|
parentIcon: icon
|
|
3553
3645
|
});
|
|
3554
3646
|
}
|
|
@@ -3560,16 +3652,16 @@ var init_List = __esm({
|
|
|
3560
3652
|
});
|
|
3561
3653
|
|
|
3562
3654
|
// src/components/List/ListItem.tsx
|
|
3563
|
-
var
|
|
3655
|
+
var import_dedupe34, import_jsx_runtime40, ListItem;
|
|
3564
3656
|
var init_ListItem = __esm({
|
|
3565
3657
|
"src/components/List/ListItem.tsx"() {
|
|
3566
3658
|
"use strict";
|
|
3567
|
-
|
|
3568
|
-
|
|
3659
|
+
import_dedupe34 = __toESM(require("classnames/dedupe"));
|
|
3660
|
+
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3569
3661
|
ListItem = ({ ref, ...props }) => {
|
|
3570
3662
|
const { parentIcon, icon, children, ...otherProps } = props;
|
|
3571
3663
|
const iconContent = icon || parentIcon;
|
|
3572
|
-
const classes = (0,
|
|
3664
|
+
const classes = (0, import_dedupe34.default)(
|
|
3573
3665
|
"mobius",
|
|
3574
3666
|
"mobius-list__item",
|
|
3575
3667
|
{
|
|
@@ -3577,15 +3669,15 @@ var init_ListItem = __esm({
|
|
|
3577
3669
|
},
|
|
3578
3670
|
props.className
|
|
3579
3671
|
);
|
|
3580
|
-
const contentClasses = (0,
|
|
3581
|
-
const iconClasses = (0,
|
|
3672
|
+
const contentClasses = (0, import_dedupe34.default)("mobius", "mobius-list__item-content");
|
|
3673
|
+
const iconClasses = (0, import_dedupe34.default)("mobius", "mobius-list__icon");
|
|
3582
3674
|
if (iconContent) {
|
|
3583
|
-
return /* @__PURE__ */ (0,
|
|
3584
|
-
/* @__PURE__ */ (0,
|
|
3675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("li", { ref, ...otherProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: contentClasses, children: [
|
|
3676
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: iconClasses, children: iconContent }),
|
|
3585
3677
|
children
|
|
3586
3678
|
] }) });
|
|
3587
3679
|
}
|
|
3588
|
-
return /* @__PURE__ */ (0,
|
|
3680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("li", { ref, ...otherProps, className: classes, children });
|
|
3589
3681
|
};
|
|
3590
3682
|
ListItem.displayName = "ListItem";
|
|
3591
3683
|
}
|
|
@@ -3601,23 +3693,23 @@ var init_List2 = __esm({
|
|
|
3601
3693
|
});
|
|
3602
3694
|
|
|
3603
3695
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
3604
|
-
var
|
|
3696
|
+
var import_dedupe35, import_icons8, import_LoadingIndicator, import_jsx_runtime41, LoadingIndicator;
|
|
3605
3697
|
var init_LoadingIndicator = __esm({
|
|
3606
3698
|
"src/components/LoadingIndicator/LoadingIndicator.tsx"() {
|
|
3607
3699
|
"use strict";
|
|
3608
|
-
|
|
3700
|
+
import_dedupe35 = __toESM(require("classnames/dedupe"));
|
|
3609
3701
|
import_icons8 = require("@simplybusiness/icons");
|
|
3610
3702
|
init_Icon2();
|
|
3611
3703
|
import_LoadingIndicator = require("@simplybusiness/mobius/src/components/LoadingIndicator/LoadingIndicator.css");
|
|
3612
|
-
|
|
3704
|
+
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3613
3705
|
LoadingIndicator = ({ ref, ...props }) => {
|
|
3614
3706
|
const { icon = import_icons8.loading, ...otherProps } = props;
|
|
3615
|
-
const classes = (0,
|
|
3707
|
+
const classes = (0, import_dedupe35.default)(
|
|
3616
3708
|
"mobius",
|
|
3617
3709
|
"mobius-loading-indicator",
|
|
3618
3710
|
otherProps.className
|
|
3619
3711
|
);
|
|
3620
|
-
return /* @__PURE__ */ (0,
|
|
3712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { icon, spin: true, ref, ...otherProps, className: classes });
|
|
3621
3713
|
};
|
|
3622
3714
|
LoadingIndicator.displayName = "LoadingIndicator";
|
|
3623
3715
|
}
|
|
@@ -3632,16 +3724,16 @@ var init_LoadingIndicator2 = __esm({
|
|
|
3632
3724
|
});
|
|
3633
3725
|
|
|
3634
3726
|
// src/components/Logo/Logo.tsx
|
|
3635
|
-
var
|
|
3727
|
+
var import_dedupe36, import_jsx_runtime42, Logo;
|
|
3636
3728
|
var init_Logo = __esm({
|
|
3637
3729
|
"src/components/Logo/Logo.tsx"() {
|
|
3638
3730
|
"use strict";
|
|
3639
|
-
|
|
3640
|
-
|
|
3731
|
+
import_dedupe36 = __toESM(require("classnames/dedupe"));
|
|
3732
|
+
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3641
3733
|
Logo = ({ ref, ...props }) => {
|
|
3642
3734
|
const { className, width, height, ...otherProps } = props;
|
|
3643
|
-
const classes = (0,
|
|
3644
|
-
return /* @__PURE__ */ (0,
|
|
3735
|
+
const classes = (0, import_dedupe36.default)("mobius", "mobius-logo", className);
|
|
3736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3645
3737
|
"svg",
|
|
3646
3738
|
{
|
|
3647
3739
|
width,
|
|
@@ -3651,7 +3743,7 @@ var init_Logo = __esm({
|
|
|
3651
3743
|
viewBox: "0 0 144 37",
|
|
3652
3744
|
...otherProps,
|
|
3653
3745
|
children: [
|
|
3654
|
-
/* @__PURE__ */ (0,
|
|
3746
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3655
3747
|
"linearGradient",
|
|
3656
3748
|
{
|
|
3657
3749
|
id: "logo-gradient",
|
|
@@ -3660,27 +3752,27 @@ var init_Logo = __esm({
|
|
|
3660
3752
|
y1: "76.042%",
|
|
3661
3753
|
y2: "26.973%",
|
|
3662
3754
|
children: [
|
|
3663
|
-
/* @__PURE__ */ (0,
|
|
3664
|
-
/* @__PURE__ */ (0,
|
|
3755
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("stop", { stopColor: "#4632D8", offset: "0%" }),
|
|
3756
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("stop", { stopColor: "#9084E8", offset: "100%" })
|
|
3665
3757
|
]
|
|
3666
3758
|
}
|
|
3667
3759
|
) }),
|
|
3668
|
-
/* @__PURE__ */ (0,
|
|
3669
|
-
/* @__PURE__ */ (0,
|
|
3760
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("g", { children: [
|
|
3761
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3670
3762
|
"path",
|
|
3671
3763
|
{
|
|
3672
3764
|
fill: "#0E0A2B",
|
|
3673
3765
|
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"
|
|
3674
3766
|
}
|
|
3675
3767
|
),
|
|
3676
|
-
/* @__PURE__ */ (0,
|
|
3768
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3677
3769
|
"path",
|
|
3678
3770
|
{
|
|
3679
3771
|
fill: "url(#logo-gradient)",
|
|
3680
3772
|
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"
|
|
3681
3773
|
}
|
|
3682
3774
|
),
|
|
3683
|
-
/* @__PURE__ */ (0,
|
|
3775
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3684
3776
|
"path",
|
|
3685
3777
|
{
|
|
3686
3778
|
fill: "#0E0A2B",
|
|
@@ -3705,23 +3797,23 @@ var init_Logo2 = __esm({
|
|
|
3705
3797
|
});
|
|
3706
3798
|
|
|
3707
3799
|
// src/components/Modal/Content.tsx
|
|
3708
|
-
var
|
|
3800
|
+
var import_jsx_runtime43, Content2;
|
|
3709
3801
|
var init_Content2 = __esm({
|
|
3710
3802
|
"src/components/Modal/Content.tsx"() {
|
|
3711
3803
|
"use strict";
|
|
3712
|
-
|
|
3713
|
-
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
3804
|
+
import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3805
|
+
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { ref, ...otherProps, className: "mobius-modal__content", children });
|
|
3714
3806
|
Content2.displayName = "Content";
|
|
3715
3807
|
}
|
|
3716
3808
|
});
|
|
3717
3809
|
|
|
3718
3810
|
// src/components/Modal/ModalContext.tsx
|
|
3719
|
-
var
|
|
3811
|
+
var import_react29, ModalContext;
|
|
3720
3812
|
var init_ModalContext = __esm({
|
|
3721
3813
|
"src/components/Modal/ModalContext.tsx"() {
|
|
3722
3814
|
"use strict";
|
|
3723
|
-
|
|
3724
|
-
ModalContext = (0,
|
|
3815
|
+
import_react29 = require("react");
|
|
3816
|
+
ModalContext = (0, import_react29.createContext)({
|
|
3725
3817
|
onClose: () => {
|
|
3726
3818
|
},
|
|
3727
3819
|
closeLabel: void 0
|
|
@@ -3730,21 +3822,21 @@ var init_ModalContext = __esm({
|
|
|
3730
3822
|
});
|
|
3731
3823
|
|
|
3732
3824
|
// src/components/Modal/useModal.ts
|
|
3733
|
-
var
|
|
3825
|
+
var import_react30, useModal;
|
|
3734
3826
|
var init_useModal = __esm({
|
|
3735
3827
|
"src/components/Modal/useModal.ts"() {
|
|
3736
3828
|
"use strict";
|
|
3737
|
-
|
|
3829
|
+
import_react30 = require("react");
|
|
3738
3830
|
init_ModalContext();
|
|
3739
3831
|
useModal = () => {
|
|
3740
|
-
const { onClose, closeLabel } = (0,
|
|
3832
|
+
const { onClose, closeLabel } = (0, import_react30.useContext)(ModalContext);
|
|
3741
3833
|
return { onClose, closeLabel };
|
|
3742
3834
|
};
|
|
3743
3835
|
}
|
|
3744
3836
|
});
|
|
3745
3837
|
|
|
3746
3838
|
// src/components/Modal/Header.tsx
|
|
3747
|
-
var import_icons9,
|
|
3839
|
+
var import_icons9, import_jsx_runtime44, Header2;
|
|
3748
3840
|
var init_Header2 = __esm({
|
|
3749
3841
|
"src/components/Modal/Header.tsx"() {
|
|
3750
3842
|
"use strict";
|
|
@@ -3752,12 +3844,12 @@ var init_Header2 = __esm({
|
|
|
3752
3844
|
init_Button2();
|
|
3753
3845
|
init_Icon2();
|
|
3754
3846
|
init_useModal();
|
|
3755
|
-
|
|
3847
|
+
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3756
3848
|
Header2 = ({ ref, children, ...otherProps }) => {
|
|
3757
3849
|
const { onClose, closeLabel } = useModal();
|
|
3758
|
-
return /* @__PURE__ */ (0,
|
|
3850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("header", { ref, ...otherProps, className: "mobius-modal__header", children: [
|
|
3759
3851
|
children,
|
|
3760
|
-
/* @__PURE__ */ (0,
|
|
3852
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3761
3853
|
Button,
|
|
3762
3854
|
{
|
|
3763
3855
|
"aria-label": "Close",
|
|
@@ -3765,7 +3857,7 @@ var init_Header2 = __esm({
|
|
|
3765
3857
|
onPress: onClose,
|
|
3766
3858
|
className: "mobius-modal__close",
|
|
3767
3859
|
children: [
|
|
3768
|
-
/* @__PURE__ */ (0,
|
|
3860
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { icon: import_icons9.cross }),
|
|
3769
3861
|
" ",
|
|
3770
3862
|
closeLabel
|
|
3771
3863
|
]
|
|
@@ -3778,19 +3870,19 @@ var init_Header2 = __esm({
|
|
|
3778
3870
|
});
|
|
3779
3871
|
|
|
3780
3872
|
// src/components/Modal/Modal.tsx
|
|
3781
|
-
var
|
|
3873
|
+
var import_dedupe37, import_react31, import_Modal, import_jsx_runtime45, TRANSITION_CSS_VARIABLE2, Modal;
|
|
3782
3874
|
var init_Modal = __esm({
|
|
3783
3875
|
"src/components/Modal/Modal.tsx"() {
|
|
3784
3876
|
"use strict";
|
|
3785
3877
|
"use client";
|
|
3786
|
-
|
|
3787
|
-
|
|
3878
|
+
import_dedupe37 = __toESM(require("classnames/dedupe"));
|
|
3879
|
+
import_react31 = require("react");
|
|
3788
3880
|
init_hooks();
|
|
3789
3881
|
init_utils();
|
|
3790
3882
|
init_polyfill_tests();
|
|
3791
3883
|
init_ModalContext();
|
|
3792
3884
|
import_Modal = require("@simplybusiness/mobius/src/components/Modal/Modal.css");
|
|
3793
|
-
|
|
3885
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3794
3886
|
TRANSITION_CSS_VARIABLE2 = "--modal-transition-duration";
|
|
3795
3887
|
Modal = ({ ref, ...props }) => {
|
|
3796
3888
|
const {
|
|
@@ -3804,11 +3896,11 @@ var init_Modal = __esm({
|
|
|
3804
3896
|
animation,
|
|
3805
3897
|
...rest
|
|
3806
3898
|
} = props;
|
|
3807
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
3808
|
-
(0,
|
|
3899
|
+
const [shouldTransition, setShouldTransition] = (0, import_react31.useState)(false);
|
|
3900
|
+
(0, import_react31.useEffect)(() => {
|
|
3809
3901
|
setShouldTransition(supportsDialog());
|
|
3810
3902
|
}, []);
|
|
3811
|
-
const dialogRef = (0,
|
|
3903
|
+
const dialogRef = (0, import_react31.useRef)(null);
|
|
3812
3904
|
const { close } = useDialog({
|
|
3813
3905
|
ref: dialogRef,
|
|
3814
3906
|
isOpen,
|
|
@@ -3819,7 +3911,7 @@ var init_Modal = __esm({
|
|
|
3819
3911
|
CSSVariable: TRANSITION_CSS_VARIABLE2
|
|
3820
3912
|
}
|
|
3821
3913
|
});
|
|
3822
|
-
const modalClasses = (0,
|
|
3914
|
+
const modalClasses = (0, import_dedupe37.default)(
|
|
3823
3915
|
"mobius",
|
|
3824
3916
|
"mobius-modal",
|
|
3825
3917
|
{
|
|
@@ -3832,21 +3924,21 @@ var init_Modal = __esm({
|
|
|
3832
3924
|
},
|
|
3833
3925
|
className
|
|
3834
3926
|
);
|
|
3835
|
-
const contextValue = (0,
|
|
3927
|
+
const contextValue = (0, import_react31.useMemo)(
|
|
3836
3928
|
() => ({
|
|
3837
3929
|
onClose: close,
|
|
3838
3930
|
closeLabel
|
|
3839
3931
|
}),
|
|
3840
3932
|
[close, closeLabel]
|
|
3841
3933
|
);
|
|
3842
|
-
return /* @__PURE__ */ (0,
|
|
3934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3843
3935
|
"dialog",
|
|
3844
3936
|
{
|
|
3845
3937
|
ref: mergeRefs([dialogRef, ref]),
|
|
3846
3938
|
onCancel: close,
|
|
3847
3939
|
className: modalClasses,
|
|
3848
3940
|
...rest,
|
|
3849
|
-
children: /* @__PURE__ */ (0,
|
|
3941
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ModalContext.Provider, { value: contextValue, children })
|
|
3850
3942
|
}
|
|
3851
3943
|
);
|
|
3852
3944
|
};
|
|
@@ -3871,16 +3963,16 @@ var init_Modal2 = __esm({
|
|
|
3871
3963
|
});
|
|
3872
3964
|
|
|
3873
3965
|
// src/components/NumberField/NumberField.tsx
|
|
3874
|
-
var
|
|
3966
|
+
var import_dedupe38, import_react32, import_NumberField, import_jsx_runtime46, NumberField;
|
|
3875
3967
|
var init_NumberField = __esm({
|
|
3876
3968
|
"src/components/NumberField/NumberField.tsx"() {
|
|
3877
3969
|
"use strict";
|
|
3878
3970
|
"use client";
|
|
3879
|
-
|
|
3880
|
-
|
|
3971
|
+
import_dedupe38 = __toESM(require("classnames/dedupe"));
|
|
3972
|
+
import_react32 = require("react");
|
|
3881
3973
|
init_TextField2();
|
|
3882
3974
|
import_NumberField = require("@simplybusiness/mobius/src/components/NumberField/NumberField.css");
|
|
3883
|
-
|
|
3975
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3884
3976
|
NumberField = ({ ref, ...props }) => {
|
|
3885
3977
|
const {
|
|
3886
3978
|
minValue,
|
|
@@ -3896,15 +3988,15 @@ var init_NumberField = __esm({
|
|
|
3896
3988
|
onBlur: customOnBlur,
|
|
3897
3989
|
...rest
|
|
3898
3990
|
} = otherProps;
|
|
3899
|
-
const focusedInputRef = (0,
|
|
3900
|
-
const wheelHandler = (0,
|
|
3901
|
-
(0,
|
|
3991
|
+
const focusedInputRef = (0, import_react32.useRef)(null);
|
|
3992
|
+
const wheelHandler = (0, import_react32.useCallback)((ev) => ev.preventDefault(), []);
|
|
3993
|
+
(0, import_react32.useEffect)(() => {
|
|
3902
3994
|
return () => {
|
|
3903
3995
|
focusedInputRef.current?.removeEventListener("wheel", wheelHandler);
|
|
3904
3996
|
focusedInputRef.current = null;
|
|
3905
3997
|
};
|
|
3906
3998
|
}, [wheelHandler]);
|
|
3907
|
-
const containerClasses = (0,
|
|
3999
|
+
const containerClasses = (0, import_dedupe38.default)("mobius-number-field", className, {
|
|
3908
4000
|
"--hide-spin-buttons": hideSpinButtons
|
|
3909
4001
|
});
|
|
3910
4002
|
const handleBeforeInput = (event) => {
|
|
@@ -3948,7 +4040,7 @@ var init_NumberField = __esm({
|
|
|
3948
4040
|
},
|
|
3949
4041
|
onBlur: (e) => handleBlur(e)
|
|
3950
4042
|
};
|
|
3951
|
-
return /* @__PURE__ */ (0,
|
|
4043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3952
4044
|
TextField,
|
|
3953
4045
|
{
|
|
3954
4046
|
...forwardedProps,
|
|
@@ -3976,18 +4068,18 @@ var init_NumberField2 = __esm({
|
|
|
3976
4068
|
});
|
|
3977
4069
|
|
|
3978
4070
|
// src/components/Option/Option.tsx
|
|
3979
|
-
var
|
|
4071
|
+
var import_jsx_runtime47, Option2;
|
|
3980
4072
|
var init_Option2 = __esm({
|
|
3981
4073
|
"src/components/Option/Option.tsx"() {
|
|
3982
4074
|
"use strict";
|
|
3983
|
-
|
|
4075
|
+
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3984
4076
|
Option2 = ({ ref, ...props }) => {
|
|
3985
4077
|
const { isDisabled, ...rest } = props;
|
|
3986
4078
|
const mappedProps = {
|
|
3987
4079
|
...rest,
|
|
3988
4080
|
disabled: isDisabled
|
|
3989
4081
|
};
|
|
3990
|
-
return /* @__PURE__ */ (0,
|
|
4082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("option", { ...mappedProps, ref });
|
|
3991
4083
|
};
|
|
3992
4084
|
Option2.displayName = "Option";
|
|
3993
4085
|
}
|
|
@@ -4002,17 +4094,17 @@ var init_Option3 = __esm({
|
|
|
4002
4094
|
});
|
|
4003
4095
|
|
|
4004
4096
|
// src/components/PasswordField/ShowHideButton.tsx
|
|
4005
|
-
var import_icons10,
|
|
4097
|
+
var import_icons10, import_jsx_runtime48, ShowHideButton;
|
|
4006
4098
|
var init_ShowHideButton = __esm({
|
|
4007
4099
|
"src/components/PasswordField/ShowHideButton.tsx"() {
|
|
4008
4100
|
"use strict";
|
|
4009
4101
|
import_icons10 = require("@simplybusiness/icons");
|
|
4010
4102
|
init_src();
|
|
4011
|
-
|
|
4103
|
+
import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4012
4104
|
ShowHideButton = ({
|
|
4013
4105
|
show = false,
|
|
4014
4106
|
onClick
|
|
4015
|
-
}) => /* @__PURE__ */ (0,
|
|
4107
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4016
4108
|
"button",
|
|
4017
4109
|
{
|
|
4018
4110
|
className: "mobius-password-field__show-button",
|
|
@@ -4023,35 +4115,35 @@ var init_ShowHideButton = __esm({
|
|
|
4023
4115
|
},
|
|
4024
4116
|
"aria-label": `${show ? "Hide" : "Show"} password`,
|
|
4025
4117
|
"data-testid": "show-hide-button",
|
|
4026
|
-
children: /* @__PURE__ */ (0,
|
|
4118
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { icon: show ? import_icons10.eyeSlash : import_icons10.eye, "aria-hidden": "true" })
|
|
4027
4119
|
}
|
|
4028
4120
|
);
|
|
4029
4121
|
}
|
|
4030
4122
|
});
|
|
4031
4123
|
|
|
4032
4124
|
// src/components/PasswordField/PasswordField.tsx
|
|
4033
|
-
var
|
|
4125
|
+
var import_dedupe39, import_react33, import_PasswordField, import_jsx_runtime49, PasswordField;
|
|
4034
4126
|
var init_PasswordField = __esm({
|
|
4035
4127
|
"src/components/PasswordField/PasswordField.tsx"() {
|
|
4036
4128
|
"use strict";
|
|
4037
4129
|
"use client";
|
|
4038
|
-
|
|
4039
|
-
|
|
4130
|
+
import_dedupe39 = __toESM(require("classnames/dedupe"));
|
|
4131
|
+
import_react33 = require("react");
|
|
4040
4132
|
init_mergeRefs();
|
|
4041
4133
|
init_TextField2();
|
|
4042
4134
|
init_ShowHideButton();
|
|
4043
4135
|
import_PasswordField = require("@simplybusiness/mobius/src/components/PasswordField/PasswordField.css");
|
|
4044
|
-
|
|
4136
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4045
4137
|
PasswordField = ({
|
|
4046
4138
|
ref,
|
|
4047
4139
|
className,
|
|
4048
4140
|
autoComplete = "current-password",
|
|
4049
4141
|
...props
|
|
4050
4142
|
}) => {
|
|
4051
|
-
const [show, setShow] = (0,
|
|
4143
|
+
const [show, setShow] = (0, import_react33.useState)(false);
|
|
4052
4144
|
const type = show ? "text" : "password";
|
|
4053
|
-
const classes = (0,
|
|
4054
|
-
const localRef = (0,
|
|
4145
|
+
const classes = (0, import_dedupe39.default)("mobius-password-field", className);
|
|
4146
|
+
const localRef = (0, import_react33.useRef)(null);
|
|
4055
4147
|
const handleShowHideButtonClick = () => {
|
|
4056
4148
|
const selectionStart = localRef.current?.selectionStart;
|
|
4057
4149
|
const selectionEnd = localRef.current?.selectionEnd;
|
|
@@ -4063,7 +4155,7 @@ var init_PasswordField = __esm({
|
|
|
4063
4155
|
}
|
|
4064
4156
|
});
|
|
4065
4157
|
};
|
|
4066
|
-
return /* @__PURE__ */ (0,
|
|
4158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4067
4159
|
TextField,
|
|
4068
4160
|
{
|
|
4069
4161
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -4071,7 +4163,7 @@ var init_PasswordField = __esm({
|
|
|
4071
4163
|
...props,
|
|
4072
4164
|
autoComplete,
|
|
4073
4165
|
type,
|
|
4074
|
-
suffixInside: /* @__PURE__ */ (0,
|
|
4166
|
+
suffixInside: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ShowHideButton, { onClick: handleShowHideButtonClick, show })
|
|
4075
4167
|
}
|
|
4076
4168
|
);
|
|
4077
4169
|
};
|
|
@@ -4088,17 +4180,17 @@ var init_PasswordField2 = __esm({
|
|
|
4088
4180
|
});
|
|
4089
4181
|
|
|
4090
4182
|
// src/components/Popover/Popover.tsx
|
|
4091
|
-
var
|
|
4183
|
+
var import_react34, import_icons11, import_dedupe40, import_react35, import_mobius_hooks6, import_Popover, import_jsx_runtime50;
|
|
4092
4184
|
var init_Popover = __esm({
|
|
4093
4185
|
"src/components/Popover/Popover.tsx"() {
|
|
4094
4186
|
"use strict";
|
|
4095
|
-
|
|
4187
|
+
import_react34 = require("@floating-ui/react");
|
|
4096
4188
|
import_icons11 = require("@simplybusiness/icons");
|
|
4097
|
-
|
|
4098
|
-
|
|
4189
|
+
import_dedupe40 = __toESM(require("classnames/dedupe"));
|
|
4190
|
+
import_react35 = require("react");
|
|
4099
4191
|
import_mobius_hooks6 = require("@simplybusiness/mobius-hooks");
|
|
4100
4192
|
import_Popover = require("@simplybusiness/mobius/src/components/Popover/Popover.css");
|
|
4101
|
-
|
|
4193
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4102
4194
|
}
|
|
4103
4195
|
});
|
|
4104
4196
|
|
|
@@ -4122,17 +4214,17 @@ function warnAboutInvalidValues(value, minValue, maxValue) {
|
|
|
4122
4214
|
console.warn("Progress value is greater than maxValue");
|
|
4123
4215
|
}
|
|
4124
4216
|
}
|
|
4125
|
-
var
|
|
4217
|
+
var import_dedupe41, import_react36, import_Progress, import_jsx_runtime51, sanitizedValue, getLabelComponent, DEFAULT_VALUE, DEFAULT_MIN_VALUE, DEFAULT_MAX_VALUE, Progress;
|
|
4126
4218
|
var init_Progress = __esm({
|
|
4127
4219
|
"src/components/Progress/Progress.tsx"() {
|
|
4128
4220
|
"use strict";
|
|
4129
4221
|
"use client";
|
|
4130
|
-
|
|
4131
|
-
|
|
4222
|
+
import_dedupe41 = __toESM(require("classnames/dedupe"));
|
|
4223
|
+
import_react36 = require("react");
|
|
4132
4224
|
init_Label2();
|
|
4133
4225
|
init_VisuallyHidden2();
|
|
4134
4226
|
import_Progress = require("@simplybusiness/mobius/src/components/Progress/Progress.css");
|
|
4135
|
-
|
|
4227
|
+
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4136
4228
|
sanitizedValue = (value, defaultValue) => {
|
|
4137
4229
|
if (value === void 0 || Number.isNaN(value)) {
|
|
4138
4230
|
return defaultValue;
|
|
@@ -4141,7 +4233,7 @@ var init_Progress = __esm({
|
|
|
4141
4233
|
};
|
|
4142
4234
|
getLabelComponent = (label, progressLabelId, showLabel) => {
|
|
4143
4235
|
if (showLabel) {
|
|
4144
|
-
return /* @__PURE__ */ (0,
|
|
4236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4145
4237
|
Label,
|
|
4146
4238
|
{
|
|
4147
4239
|
id: progressLabelId,
|
|
@@ -4151,7 +4243,7 @@ var init_Progress = __esm({
|
|
|
4151
4243
|
}
|
|
4152
4244
|
);
|
|
4153
4245
|
}
|
|
4154
|
-
return /* @__PURE__ */ (0,
|
|
4246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4155
4247
|
Label,
|
|
4156
4248
|
{
|
|
4157
4249
|
id: progressLabelId,
|
|
@@ -4165,8 +4257,8 @@ var init_Progress = __esm({
|
|
|
4165
4257
|
DEFAULT_MIN_VALUE = 0;
|
|
4166
4258
|
DEFAULT_MAX_VALUE = 100;
|
|
4167
4259
|
Progress = ({ ref, ...props }) => {
|
|
4168
|
-
const progressId = (0,
|
|
4169
|
-
const progressLabelId = (0,
|
|
4260
|
+
const progressId = (0, import_react36.useId)();
|
|
4261
|
+
const progressLabelId = (0, import_react36.useId)();
|
|
4170
4262
|
const {
|
|
4171
4263
|
id,
|
|
4172
4264
|
label,
|
|
@@ -4191,7 +4283,7 @@ var init_Progress = __esm({
|
|
|
4191
4283
|
100
|
|
4192
4284
|
);
|
|
4193
4285
|
const barWidth = `${percentage}%`;
|
|
4194
|
-
const classes = (0,
|
|
4286
|
+
const classes = (0, import_dedupe41.default)("mobius", "mobius-progress", className, {
|
|
4195
4287
|
"--is-primary": variant === "primary",
|
|
4196
4288
|
"--is-secondary": variant === "secondary"
|
|
4197
4289
|
});
|
|
@@ -4201,7 +4293,7 @@ var init_Progress = __esm({
|
|
|
4201
4293
|
progressBarProps["aria-valuenow"] = value.toString();
|
|
4202
4294
|
progressBarProps["aria-valuetext"] = valueFormatter instanceof Function ? valueFormatter(value, minValue, maxValue) : barWidth;
|
|
4203
4295
|
const labelComponent = getLabelComponent(label, progressLabelId, showLabel);
|
|
4204
|
-
return /* @__PURE__ */ (0,
|
|
4296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
4205
4297
|
"div",
|
|
4206
4298
|
{
|
|
4207
4299
|
id: id || progressId,
|
|
@@ -4212,8 +4304,8 @@ var init_Progress = __esm({
|
|
|
4212
4304
|
"aria-labelledby": progressLabelId,
|
|
4213
4305
|
children: [
|
|
4214
4306
|
labelComponent,
|
|
4215
|
-
/* @__PURE__ */ (0,
|
|
4216
|
-
showValueLabel && /* @__PURE__ */ (0,
|
|
4307
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mobius-progress__track", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mobius-progress__bar", style: { width: barWidth } }) }),
|
|
4308
|
+
showValueLabel && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Label, { "data-testid": "value-label", elementType: "span", children: progressBarProps["aria-valuetext"] })
|
|
4217
4309
|
]
|
|
4218
4310
|
}
|
|
4219
4311
|
);
|
|
@@ -4231,19 +4323,19 @@ var init_Progress2 = __esm({
|
|
|
4231
4323
|
});
|
|
4232
4324
|
|
|
4233
4325
|
// src/components/Radio/RadioGroup.tsx
|
|
4234
|
-
var
|
|
4326
|
+
var import_dedupe42, import_react37, import_jsx_runtime52, getDefaultVal, RadioGroup;
|
|
4235
4327
|
var init_RadioGroup = __esm({
|
|
4236
4328
|
"src/components/Radio/RadioGroup.tsx"() {
|
|
4237
4329
|
"use strict";
|
|
4238
4330
|
"use client";
|
|
4239
|
-
|
|
4240
|
-
|
|
4331
|
+
import_dedupe42 = __toESM(require("classnames/dedupe"));
|
|
4332
|
+
import_react37 = require("react");
|
|
4241
4333
|
init_hooks();
|
|
4242
4334
|
init_spaceDelimitedList();
|
|
4243
4335
|
init_ErrorMessage2();
|
|
4244
4336
|
init_Label2();
|
|
4245
4337
|
init_Stack2();
|
|
4246
|
-
|
|
4338
|
+
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4247
4339
|
getDefaultVal = (children, defaultValue) => {
|
|
4248
4340
|
if (Array.isArray(children) && defaultValue) {
|
|
4249
4341
|
const option = children?.find((item) => item.props.value === defaultValue);
|
|
@@ -4271,15 +4363,15 @@ var init_RadioGroup = __esm({
|
|
|
4271
4363
|
...rest
|
|
4272
4364
|
} = props;
|
|
4273
4365
|
const defaultSelected = getDefaultVal(children, value || defaultValue);
|
|
4274
|
-
const [selected, setSelected] = (0,
|
|
4275
|
-
const overflowsRef = (0,
|
|
4276
|
-
const [hasOverflow, setHasOverflow] = (0,
|
|
4277
|
-
(0,
|
|
4366
|
+
const [selected, setSelected] = (0, import_react37.useState)(defaultSelected);
|
|
4367
|
+
const overflowsRef = (0, import_react37.useRef)({});
|
|
4368
|
+
const [hasOverflow, setHasOverflow] = (0, import_react37.useState)(false);
|
|
4369
|
+
(0, import_react37.useEffect)(() => {
|
|
4278
4370
|
if (value !== void 0) {
|
|
4279
4371
|
setSelected(value);
|
|
4280
4372
|
}
|
|
4281
4373
|
}, [value]);
|
|
4282
|
-
const handleOverflow = (0,
|
|
4374
|
+
const handleOverflow = (0, import_react37.useCallback)(
|
|
4283
4375
|
(radioValue, overflow) => {
|
|
4284
4376
|
overflowsRef.current = {
|
|
4285
4377
|
...overflowsRef.current,
|
|
@@ -4303,26 +4395,26 @@ var init_RadioGroup = __esm({
|
|
|
4303
4395
|
[`--is-${effectiveOrientation}`]: true,
|
|
4304
4396
|
[className || ""]: true
|
|
4305
4397
|
};
|
|
4306
|
-
const radioGroupClasses = (0,
|
|
4398
|
+
const radioGroupClasses = (0, import_dedupe42.default)(
|
|
4307
4399
|
"mobius",
|
|
4308
4400
|
"mobius-radio-group",
|
|
4309
4401
|
radioClasses,
|
|
4310
4402
|
validationClasses
|
|
4311
4403
|
);
|
|
4312
|
-
const radioWrapperClasses = (0,
|
|
4404
|
+
const radioWrapperClasses = (0, import_dedupe42.default)("mobius-radio__wrapper", {
|
|
4313
4405
|
[`--is-${effectiveOrientation}`]: true
|
|
4314
4406
|
});
|
|
4315
|
-
const labelClasses = (0,
|
|
4316
|
-
const errorMessageId = (0,
|
|
4317
|
-
const defaultNameAttrId = (0,
|
|
4407
|
+
const labelClasses = (0, import_dedupe42.default)(radioClasses, validationClasses);
|
|
4408
|
+
const errorMessageId = (0, import_react37.useId)();
|
|
4409
|
+
const defaultNameAttrId = (0, import_react37.useId)();
|
|
4318
4410
|
const nameAttribute = name || defaultNameAttrId;
|
|
4319
4411
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
4320
4412
|
const describedBy = spaceDelimitedList([
|
|
4321
4413
|
shouldErrorMessageShow,
|
|
4322
4414
|
props["aria-describedby"]
|
|
4323
4415
|
]);
|
|
4324
|
-
const labelId = (0,
|
|
4325
|
-
return /* @__PURE__ */ (0,
|
|
4416
|
+
const labelId = (0, import_react37.useId)();
|
|
4417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4326
4418
|
"div",
|
|
4327
4419
|
{
|
|
4328
4420
|
...rest,
|
|
@@ -4338,12 +4430,12 @@ var init_RadioGroup = __esm({
|
|
|
4338
4430
|
ref,
|
|
4339
4431
|
className: radioGroupClasses,
|
|
4340
4432
|
role: "radiogroup",
|
|
4341
|
-
children: /* @__PURE__ */ (0,
|
|
4342
|
-
label && /* @__PURE__ */ (0,
|
|
4343
|
-
/* @__PURE__ */ (0,
|
|
4344
|
-
if ((0,
|
|
4433
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Stack, { gap: "xs", children: [
|
|
4434
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Label, { htmlFor: name, id: labelId, className: labelClasses, children: label }),
|
|
4435
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: radioWrapperClasses, children: import_react37.Children.map(children, (child) => {
|
|
4436
|
+
if ((0, import_react37.isValidElement)(child)) {
|
|
4345
4437
|
const childValue = child.props.value;
|
|
4346
|
-
return (0,
|
|
4438
|
+
return (0, import_react37.cloneElement)(
|
|
4347
4439
|
child,
|
|
4348
4440
|
{
|
|
4349
4441
|
orientation: effectiveOrientation,
|
|
@@ -4361,7 +4453,7 @@ var init_RadioGroup = __esm({
|
|
|
4361
4453
|
}
|
|
4362
4454
|
return child;
|
|
4363
4455
|
}) }),
|
|
4364
|
-
/* @__PURE__ */ (0,
|
|
4456
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
4365
4457
|
] })
|
|
4366
4458
|
}
|
|
4367
4459
|
);
|
|
@@ -4380,47 +4472,47 @@ var init_Radio = __esm({
|
|
|
4380
4472
|
});
|
|
4381
4473
|
|
|
4382
4474
|
// src/components/Segment/SegmentGroup.tsx
|
|
4383
|
-
var
|
|
4475
|
+
var import_dedupe43, import_jsx_runtime53, SegmentGroup;
|
|
4384
4476
|
var init_SegmentGroup = __esm({
|
|
4385
4477
|
"src/components/Segment/SegmentGroup.tsx"() {
|
|
4386
4478
|
"use strict";
|
|
4387
|
-
|
|
4388
|
-
|
|
4479
|
+
import_dedupe43 = __toESM(require("classnames/dedupe"));
|
|
4480
|
+
import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4389
4481
|
SegmentGroup = (props) => {
|
|
4390
4482
|
const { children, horizontal, gap, className, ...rest } = props;
|
|
4391
4483
|
const gapClass = gap ? `gap-${gap}` : "";
|
|
4392
|
-
const classes = (0,
|
|
4484
|
+
const classes = (0, import_dedupe43.default)(
|
|
4393
4485
|
"mobius",
|
|
4394
4486
|
"mobius-segment-group",
|
|
4395
4487
|
className,
|
|
4396
4488
|
{ "--is-horizontal": horizontal },
|
|
4397
4489
|
gapClass
|
|
4398
4490
|
);
|
|
4399
|
-
return /* @__PURE__ */ (0,
|
|
4491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: classes, ...rest, children });
|
|
4400
4492
|
};
|
|
4401
4493
|
SegmentGroup.displayName = "SegmentGroup";
|
|
4402
4494
|
}
|
|
4403
4495
|
});
|
|
4404
4496
|
|
|
4405
4497
|
// src/components/Segment/Segment.tsx
|
|
4406
|
-
var
|
|
4498
|
+
var import_dedupe44, import_Segment, import_jsx_runtime54, Segment;
|
|
4407
4499
|
var init_Segment = __esm({
|
|
4408
4500
|
"src/components/Segment/Segment.tsx"() {
|
|
4409
4501
|
"use strict";
|
|
4410
|
-
|
|
4502
|
+
import_dedupe44 = __toESM(require("classnames/dedupe"));
|
|
4411
4503
|
import_Segment = require("@simplybusiness/mobius/src/components/Segment/Segment.css");
|
|
4412
|
-
|
|
4504
|
+
import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4413
4505
|
Segment = (props) => {
|
|
4414
4506
|
const { heading, children, colour, inverted, className, ...rest } = props;
|
|
4415
|
-
const classes = (0,
|
|
4507
|
+
const classes = (0, import_dedupe44.default)(
|
|
4416
4508
|
"mobius",
|
|
4417
4509
|
"mobius-segment",
|
|
4418
4510
|
colour,
|
|
4419
4511
|
{ inverted },
|
|
4420
4512
|
className
|
|
4421
4513
|
);
|
|
4422
|
-
return /* @__PURE__ */ (0,
|
|
4423
|
-
heading && /* @__PURE__ */ (0,
|
|
4514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: classes, ...rest, children: [
|
|
4515
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "mobius-segment__heading", children: heading }),
|
|
4424
4516
|
children
|
|
4425
4517
|
] });
|
|
4426
4518
|
};
|
|
@@ -4438,14 +4530,14 @@ var init_Segment2 = __esm({
|
|
|
4438
4530
|
});
|
|
4439
4531
|
|
|
4440
4532
|
// src/components/Select/Select.tsx
|
|
4441
|
-
var import_icons12,
|
|
4533
|
+
var import_icons12, import_dedupe45, import_react38, import_Select, import_jsx_runtime55, Select;
|
|
4442
4534
|
var init_Select = __esm({
|
|
4443
4535
|
"src/components/Select/Select.tsx"() {
|
|
4444
4536
|
"use strict";
|
|
4445
4537
|
"use client";
|
|
4446
4538
|
import_icons12 = require("@simplybusiness/icons");
|
|
4447
|
-
|
|
4448
|
-
|
|
4539
|
+
import_dedupe45 = __toESM(require("classnames/dedupe"));
|
|
4540
|
+
import_react38 = require("react");
|
|
4449
4541
|
init_hooks();
|
|
4450
4542
|
init_useLabel2();
|
|
4451
4543
|
init_spaceDelimitedList();
|
|
@@ -4454,7 +4546,7 @@ var init_Select = __esm({
|
|
|
4454
4546
|
init_Label2();
|
|
4455
4547
|
init_Stack2();
|
|
4456
4548
|
import_Select = require("@simplybusiness/mobius/src/components/Select/Select.css");
|
|
4457
|
-
|
|
4549
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4458
4550
|
Select = ({ ref, ...props }) => {
|
|
4459
4551
|
const {
|
|
4460
4552
|
label,
|
|
@@ -4475,24 +4567,24 @@ var init_Select = __esm({
|
|
|
4475
4567
|
"--is-required": typeof isRequired === "boolean" && isRequired,
|
|
4476
4568
|
"--is-optional": typeof isRequired === "boolean" && !isRequired
|
|
4477
4569
|
};
|
|
4478
|
-
const sharedClasses = (0,
|
|
4479
|
-
const wrapperClasses = (0,
|
|
4570
|
+
const sharedClasses = (0, import_dedupe45.default)(validationClasses, stateClasses);
|
|
4571
|
+
const wrapperClasses = (0, import_dedupe45.default)(
|
|
4480
4572
|
"mobius-select__wrapper",
|
|
4481
4573
|
sharedClasses,
|
|
4482
4574
|
otherProps.className
|
|
4483
4575
|
);
|
|
4484
|
-
const selectClasses = (0,
|
|
4576
|
+
const selectClasses = (0, import_dedupe45.default)(
|
|
4485
4577
|
"mobius-select",
|
|
4486
4578
|
sharedClasses,
|
|
4487
4579
|
otherProps.className
|
|
4488
4580
|
);
|
|
4489
|
-
const labelClasses = (0,
|
|
4581
|
+
const labelClasses = (0, import_dedupe45.default)(
|
|
4490
4582
|
"mobius-label",
|
|
4491
4583
|
sharedClasses,
|
|
4492
4584
|
otherProps.className
|
|
4493
4585
|
);
|
|
4494
|
-
const iconClasses = (0,
|
|
4495
|
-
const errorMessageId = (0,
|
|
4586
|
+
const iconClasses = (0, import_dedupe45.default)("mobius-select__icon", sharedClasses);
|
|
4587
|
+
const errorMessageId = (0, import_react38.useId)();
|
|
4496
4588
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
4497
4589
|
const describedBy = spaceDelimitedList([
|
|
4498
4590
|
shouldErrorMessageShow,
|
|
@@ -4503,10 +4595,10 @@ var init_Select = __esm({
|
|
|
4503
4595
|
onChange(e);
|
|
4504
4596
|
}
|
|
4505
4597
|
};
|
|
4506
|
-
return /* @__PURE__ */ (0,
|
|
4507
|
-
label && /* @__PURE__ */ (0,
|
|
4508
|
-
/* @__PURE__ */ (0,
|
|
4509
|
-
/* @__PURE__ */ (0,
|
|
4598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Stack, { className: "mobius mobius-select__outer", gap: "xs", children: [
|
|
4599
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Label, { ...labelProps, className: labelClasses, children: label }),
|
|
4600
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: wrapperClasses, children: [
|
|
4601
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4510
4602
|
"select",
|
|
4511
4603
|
{
|
|
4512
4604
|
...otherProps,
|
|
@@ -4522,9 +4614,9 @@ var init_Select = __esm({
|
|
|
4522
4614
|
onChange: handleChange
|
|
4523
4615
|
}
|
|
4524
4616
|
),
|
|
4525
|
-
/* @__PURE__ */ (0,
|
|
4617
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon, { icon: import_icons12.chevronDown }) })
|
|
4526
4618
|
] }),
|
|
4527
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
4619
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
4528
4620
|
] });
|
|
4529
4621
|
};
|
|
4530
4622
|
Select.displayName = "Select";
|
|
@@ -4540,15 +4632,15 @@ var init_Select2 = __esm({
|
|
|
4540
4632
|
});
|
|
4541
4633
|
|
|
4542
4634
|
// src/components/Slider/Slider.tsx
|
|
4543
|
-
var
|
|
4635
|
+
var import_dedupe46, import_react39, import_Slider, import_jsx_runtime56;
|
|
4544
4636
|
var init_Slider = __esm({
|
|
4545
4637
|
"src/components/Slider/Slider.tsx"() {
|
|
4546
4638
|
"use strict";
|
|
4547
4639
|
"use client";
|
|
4548
|
-
|
|
4549
|
-
|
|
4640
|
+
import_dedupe46 = __toESM(require("classnames/dedupe"));
|
|
4641
|
+
import_react39 = require("react");
|
|
4550
4642
|
import_Slider = require("@simplybusiness/mobius/src/components/Slider/Slider.css");
|
|
4551
|
-
|
|
4643
|
+
import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4552
4644
|
}
|
|
4553
4645
|
});
|
|
4554
4646
|
|
|
@@ -4561,19 +4653,19 @@ var init_Slider2 = __esm({
|
|
|
4561
4653
|
});
|
|
4562
4654
|
|
|
4563
4655
|
// src/components/SVG/SVG.tsx
|
|
4564
|
-
var
|
|
4656
|
+
var import_react40, import_dedupe47, import_jsx_runtime57, SVG;
|
|
4565
4657
|
var init_SVG = __esm({
|
|
4566
4658
|
"src/components/SVG/SVG.tsx"() {
|
|
4567
4659
|
"use strict";
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4660
|
+
import_react40 = require("react");
|
|
4661
|
+
import_dedupe47 = __toESM(require("classnames/dedupe"));
|
|
4662
|
+
import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4571
4663
|
SVG = ({ ref, ...props }) => {
|
|
4572
4664
|
const { children, className, ...otherProps } = props;
|
|
4573
|
-
const classes = (0,
|
|
4574
|
-
const svgNode =
|
|
4665
|
+
const classes = (0, import_dedupe47.default)("mobius", "mobius-svg", className);
|
|
4666
|
+
const svgNode = import_react40.Children.only(children);
|
|
4575
4667
|
const { children: svgChildren, viewBox, xmlns } = svgNode.props;
|
|
4576
|
-
return /* @__PURE__ */ (0,
|
|
4668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4577
4669
|
"svg",
|
|
4578
4670
|
{
|
|
4579
4671
|
viewBox,
|
|
@@ -4598,16 +4690,16 @@ var init_SVG2 = __esm({
|
|
|
4598
4690
|
});
|
|
4599
4691
|
|
|
4600
4692
|
// src/components/Switch/Switch.tsx
|
|
4601
|
-
var
|
|
4693
|
+
var import_react41, import_dedupe48, import_Switch, import_jsx_runtime58, Switch;
|
|
4602
4694
|
var init_Switch = __esm({
|
|
4603
4695
|
"src/components/Switch/Switch.tsx"() {
|
|
4604
4696
|
"use strict";
|
|
4605
4697
|
"use client";
|
|
4606
|
-
|
|
4607
|
-
|
|
4698
|
+
import_react41 = require("react");
|
|
4699
|
+
import_dedupe48 = __toESM(require("classnames/dedupe"));
|
|
4608
4700
|
init_VisuallyHidden2();
|
|
4609
4701
|
import_Switch = require("@simplybusiness/mobius/src/components/Switch/Switch.css");
|
|
4610
|
-
|
|
4702
|
+
import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4611
4703
|
Switch = ({ ref, ...props }) => {
|
|
4612
4704
|
const {
|
|
4613
4705
|
checked = false,
|
|
@@ -4616,11 +4708,11 @@ var init_Switch = __esm({
|
|
|
4616
4708
|
isDisabled = false,
|
|
4617
4709
|
...otherProps
|
|
4618
4710
|
} = props;
|
|
4619
|
-
const [enabled, setEnabled] = (0,
|
|
4620
|
-
(0,
|
|
4711
|
+
const [enabled, setEnabled] = (0, import_react41.useState)(checked);
|
|
4712
|
+
(0, import_react41.useEffect)(() => {
|
|
4621
4713
|
setEnabled(checked);
|
|
4622
4714
|
}, [checked]);
|
|
4623
|
-
const classes = (0,
|
|
4715
|
+
const classes = (0, import_dedupe48.default)(
|
|
4624
4716
|
"mobius",
|
|
4625
4717
|
"mobius-switch",
|
|
4626
4718
|
{
|
|
@@ -4635,9 +4727,9 @@ var init_Switch = __esm({
|
|
|
4635
4727
|
onChange(event);
|
|
4636
4728
|
}
|
|
4637
4729
|
};
|
|
4638
|
-
return /* @__PURE__ */ (0,
|
|
4639
|
-
/* @__PURE__ */ (0,
|
|
4640
|
-
/* @__PURE__ */ (0,
|
|
4730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("label", { ref, className: classes, children: [
|
|
4731
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { children: enabled ? "On" : "Off" }) }),
|
|
4732
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4641
4733
|
"input",
|
|
4642
4734
|
{
|
|
4643
4735
|
type: "checkbox",
|
|
@@ -4648,7 +4740,7 @@ var init_Switch = __esm({
|
|
|
4648
4740
|
...otherProps
|
|
4649
4741
|
}
|
|
4650
4742
|
),
|
|
4651
|
-
/* @__PURE__ */ (0,
|
|
4743
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "mobius-switch__slider" })
|
|
4652
4744
|
] });
|
|
4653
4745
|
};
|
|
4654
4746
|
Switch.displayName = "Switch";
|
|
@@ -4664,114 +4756,114 @@ var init_Switch2 = __esm({
|
|
|
4664
4756
|
});
|
|
4665
4757
|
|
|
4666
4758
|
// src/components/Table/Table.tsx
|
|
4667
|
-
var
|
|
4759
|
+
var import_dedupe49, import_Table, import_jsx_runtime59, Table;
|
|
4668
4760
|
var init_Table = __esm({
|
|
4669
4761
|
"src/components/Table/Table.tsx"() {
|
|
4670
4762
|
"use strict";
|
|
4671
|
-
|
|
4763
|
+
import_dedupe49 = __toESM(require("classnames/dedupe"));
|
|
4672
4764
|
import_Table = require("@simplybusiness/mobius/src/components/Table/Table.css");
|
|
4673
|
-
|
|
4765
|
+
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4674
4766
|
Table = ({ ref, ...props }) => {
|
|
4675
|
-
const classes = (0,
|
|
4676
|
-
return /* @__PURE__ */ (0,
|
|
4767
|
+
const classes = (0, import_dedupe49.default)("mobius", "mobius-table", props.className);
|
|
4768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("table", { ref, ...props, className: classes });
|
|
4677
4769
|
};
|
|
4678
4770
|
Table.displayName = "Table";
|
|
4679
4771
|
}
|
|
4680
4772
|
});
|
|
4681
4773
|
|
|
4682
4774
|
// src/components/Table/Head.tsx
|
|
4683
|
-
var
|
|
4775
|
+
var import_dedupe50, import_jsx_runtime60, Head;
|
|
4684
4776
|
var init_Head = __esm({
|
|
4685
4777
|
"src/components/Table/Head.tsx"() {
|
|
4686
4778
|
"use strict";
|
|
4687
|
-
|
|
4688
|
-
|
|
4779
|
+
import_dedupe50 = __toESM(require("classnames/dedupe"));
|
|
4780
|
+
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4689
4781
|
Head = ({ ref, ...props }) => {
|
|
4690
|
-
const classes = (0,
|
|
4691
|
-
return /* @__PURE__ */ (0,
|
|
4782
|
+
const classes = (0, import_dedupe50.default)("mobius", "mobius-table__head", props.className);
|
|
4783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("thead", { ref, ...props, className: classes });
|
|
4692
4784
|
};
|
|
4693
4785
|
Head.displayName = "Table.Head";
|
|
4694
4786
|
}
|
|
4695
4787
|
});
|
|
4696
4788
|
|
|
4697
4789
|
// src/components/Table/Body.tsx
|
|
4698
|
-
var
|
|
4790
|
+
var import_dedupe51, import_jsx_runtime61, Body;
|
|
4699
4791
|
var init_Body = __esm({
|
|
4700
4792
|
"src/components/Table/Body.tsx"() {
|
|
4701
4793
|
"use strict";
|
|
4702
|
-
|
|
4703
|
-
|
|
4794
|
+
import_dedupe51 = __toESM(require("classnames/dedupe"));
|
|
4795
|
+
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4704
4796
|
Body = ({ ref, ...props }) => {
|
|
4705
|
-
const classes = (0,
|
|
4706
|
-
return /* @__PURE__ */ (0,
|
|
4797
|
+
const classes = (0, import_dedupe51.default)("mobius", "mobius-table__body", props.className);
|
|
4798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tbody", { ref, ...props, className: classes });
|
|
4707
4799
|
};
|
|
4708
4800
|
Body.displayName = "Table.Body";
|
|
4709
4801
|
}
|
|
4710
4802
|
});
|
|
4711
4803
|
|
|
4712
4804
|
// src/components/Table/Foot.tsx
|
|
4713
|
-
var
|
|
4805
|
+
var import_dedupe52, import_jsx_runtime62, Foot;
|
|
4714
4806
|
var init_Foot = __esm({
|
|
4715
4807
|
"src/components/Table/Foot.tsx"() {
|
|
4716
4808
|
"use strict";
|
|
4717
|
-
|
|
4718
|
-
|
|
4809
|
+
import_dedupe52 = __toESM(require("classnames/dedupe"));
|
|
4810
|
+
import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4719
4811
|
Foot = ({ ref, ...props }) => {
|
|
4720
|
-
const classes = (0,
|
|
4721
|
-
return /* @__PURE__ */ (0,
|
|
4812
|
+
const classes = (0, import_dedupe52.default)("mobius", "mobius-table__foot", props.className);
|
|
4813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("tfoot", { ref, ...props, className: classes });
|
|
4722
4814
|
};
|
|
4723
4815
|
Foot.displayName = "Table.Foot";
|
|
4724
4816
|
}
|
|
4725
4817
|
});
|
|
4726
4818
|
|
|
4727
4819
|
// src/components/Table/Row.tsx
|
|
4728
|
-
var
|
|
4820
|
+
var import_dedupe53, import_jsx_runtime63, Row;
|
|
4729
4821
|
var init_Row = __esm({
|
|
4730
4822
|
"src/components/Table/Row.tsx"() {
|
|
4731
4823
|
"use strict";
|
|
4732
|
-
|
|
4733
|
-
|
|
4824
|
+
import_dedupe53 = __toESM(require("classnames/dedupe"));
|
|
4825
|
+
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4734
4826
|
Row = ({ ref, ...props }) => {
|
|
4735
|
-
const classes = (0,
|
|
4736
|
-
return /* @__PURE__ */ (0,
|
|
4827
|
+
const classes = (0, import_dedupe53.default)("mobius", "mobius-table__row", props.className);
|
|
4828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("tr", { ref, ...props, className: classes });
|
|
4737
4829
|
};
|
|
4738
4830
|
Row.displayName = "Table.Row";
|
|
4739
4831
|
}
|
|
4740
4832
|
});
|
|
4741
4833
|
|
|
4742
4834
|
// src/components/Table/HeaderCell.tsx
|
|
4743
|
-
var
|
|
4835
|
+
var import_dedupe54, import_jsx_runtime64, HeaderCell;
|
|
4744
4836
|
var init_HeaderCell = __esm({
|
|
4745
4837
|
"src/components/Table/HeaderCell.tsx"() {
|
|
4746
4838
|
"use strict";
|
|
4747
|
-
|
|
4748
|
-
|
|
4839
|
+
import_dedupe54 = __toESM(require("classnames/dedupe"));
|
|
4840
|
+
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4749
4841
|
HeaderCell = ({ ref, ...props }) => {
|
|
4750
|
-
const classes = (0,
|
|
4842
|
+
const classes = (0, import_dedupe54.default)(
|
|
4751
4843
|
"mobius",
|
|
4752
4844
|
"mobius-table__head-cell",
|
|
4753
4845
|
props.className
|
|
4754
4846
|
);
|
|
4755
|
-
return /* @__PURE__ */ (0,
|
|
4847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("th", { ...props, ref, className: classes });
|
|
4756
4848
|
};
|
|
4757
4849
|
HeaderCell.displayName = "Table.HeaderCell";
|
|
4758
4850
|
}
|
|
4759
4851
|
});
|
|
4760
4852
|
|
|
4761
4853
|
// src/components/Table/Cell.tsx
|
|
4762
|
-
var
|
|
4854
|
+
var import_dedupe55, import_jsx_runtime65, Cell;
|
|
4763
4855
|
var init_Cell = __esm({
|
|
4764
4856
|
"src/components/Table/Cell.tsx"() {
|
|
4765
4857
|
"use strict";
|
|
4766
|
-
|
|
4767
|
-
|
|
4858
|
+
import_dedupe55 = __toESM(require("classnames/dedupe"));
|
|
4859
|
+
import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4768
4860
|
Cell = ({ ref, ...props }) => {
|
|
4769
|
-
const classes = (0,
|
|
4861
|
+
const classes = (0, import_dedupe55.default)(
|
|
4770
4862
|
"mobius",
|
|
4771
4863
|
"mobius-table__body-cell",
|
|
4772
4864
|
props.className
|
|
4773
4865
|
);
|
|
4774
|
-
return /* @__PURE__ */ (0,
|
|
4866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("td", { ref, ...props, className: classes });
|
|
4775
4867
|
};
|
|
4776
4868
|
Cell.displayName = "Table.Cell";
|
|
4777
4869
|
}
|
|
@@ -4801,37 +4893,6 @@ var init_Table2 = __esm({
|
|
|
4801
4893
|
}
|
|
4802
4894
|
});
|
|
4803
4895
|
|
|
4804
|
-
// src/components/Text/Text.tsx
|
|
4805
|
-
var import_dedupe55, import_Text, import_jsx_runtime64, getElementType, Text;
|
|
4806
|
-
var init_Text = __esm({
|
|
4807
|
-
"src/components/Text/Text.tsx"() {
|
|
4808
|
-
"use strict";
|
|
4809
|
-
import_dedupe55 = __toESM(require("classnames/dedupe"));
|
|
4810
|
-
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
4811
|
-
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4812
|
-
getElementType = (variant, elementType) => {
|
|
4813
|
-
if (variant) {
|
|
4814
|
-
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
4815
|
-
}
|
|
4816
|
-
return elementType || "p";
|
|
4817
|
-
};
|
|
4818
|
-
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
4819
|
-
const { variant, className, spacing, ...otherProps } = props;
|
|
4820
|
-
const elementType = getElementType(variant, Component);
|
|
4821
|
-
const variantType = variant || elementType;
|
|
4822
|
-
const classes = (0, import_dedupe55.default)(
|
|
4823
|
-
"mobius",
|
|
4824
|
-
"mobius-text",
|
|
4825
|
-
{ [`--is-${variantType}`]: variantType },
|
|
4826
|
-
{ [`--has-line-height-${spacing}`]: spacing },
|
|
4827
|
-
className
|
|
4828
|
-
);
|
|
4829
|
-
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
4830
|
-
};
|
|
4831
|
-
Text.displayName = "Text";
|
|
4832
|
-
}
|
|
4833
|
-
});
|
|
4834
|
-
|
|
4835
4896
|
// src/components/Text/index.tsx
|
|
4836
4897
|
var init_Text2 = __esm({
|
|
4837
4898
|
"src/components/Text/index.tsx"() {
|
|
@@ -4841,12 +4902,12 @@ var init_Text2 = __esm({
|
|
|
4841
4902
|
});
|
|
4842
4903
|
|
|
4843
4904
|
// src/components/TextAreaInput/TextAreaInput.tsx
|
|
4844
|
-
var import_dedupe56,
|
|
4905
|
+
var import_dedupe56, import_jsx_runtime66, TextAreaInput;
|
|
4845
4906
|
var init_TextAreaInput = __esm({
|
|
4846
4907
|
"src/components/TextAreaInput/TextAreaInput.tsx"() {
|
|
4847
4908
|
"use strict";
|
|
4848
4909
|
import_dedupe56 = __toESM(require("classnames/dedupe"));
|
|
4849
|
-
|
|
4910
|
+
import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4850
4911
|
TextAreaInput = ({ ref, ...props }) => {
|
|
4851
4912
|
const { isSelected, isDisabled, isReadOnly, isRequired, ...otherProps } = props;
|
|
4852
4913
|
const classes = (0, import_dedupe56.default)(
|
|
@@ -4859,7 +4920,7 @@ var init_TextAreaInput = __esm({
|
|
|
4859
4920
|
},
|
|
4860
4921
|
otherProps.className
|
|
4861
4922
|
);
|
|
4862
|
-
return /* @__PURE__ */ (0,
|
|
4923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4863
4924
|
"textarea",
|
|
4864
4925
|
{
|
|
4865
4926
|
ref,
|
|
@@ -4883,7 +4944,7 @@ var init_TextAreaInput2 = __esm({
|
|
|
4883
4944
|
});
|
|
4884
4945
|
|
|
4885
4946
|
// src/components/TextArea/TextArea.tsx
|
|
4886
|
-
var import_dedupe57, import_TextArea,
|
|
4947
|
+
var import_dedupe57, import_TextArea, import_jsx_runtime67, TextArea;
|
|
4887
4948
|
var init_TextArea = __esm({
|
|
4888
4949
|
"src/components/TextArea/TextArea.tsx"() {
|
|
4889
4950
|
"use strict";
|
|
@@ -4895,7 +4956,7 @@ var init_TextArea = __esm({
|
|
|
4895
4956
|
init_Stack2();
|
|
4896
4957
|
init_TextAreaInput2();
|
|
4897
4958
|
import_TextArea = require("@simplybusiness/mobius/src/components/TextArea/TextArea.css");
|
|
4898
|
-
|
|
4959
|
+
import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4899
4960
|
TextArea = ({ ref, ...props }) => {
|
|
4900
4961
|
const {
|
|
4901
4962
|
isDisabled,
|
|
@@ -4915,9 +4976,9 @@ var init_TextArea = __esm({
|
|
|
4915
4976
|
},
|
|
4916
4977
|
validationClasses
|
|
4917
4978
|
);
|
|
4918
|
-
return /* @__PURE__ */ (0,
|
|
4919
|
-
label && /* @__PURE__ */ (0,
|
|
4920
|
-
/* @__PURE__ */ (0,
|
|
4979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Stack, { className: classes, gap: "xs", children: [
|
|
4980
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Label, { ...labelProps, className: labelClasses, children: props.label }),
|
|
4981
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
4921
4982
|
TextAreaInput,
|
|
4922
4983
|
{
|
|
4923
4984
|
...otherProps,
|
|
@@ -4928,7 +4989,7 @@ var init_TextArea = __esm({
|
|
|
4928
4989
|
"aria-invalid": errorMessage != null
|
|
4929
4990
|
}
|
|
4930
4991
|
),
|
|
4931
|
-
/* @__PURE__ */ (0,
|
|
4992
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ErrorMessage, { ...errorMessageProps, errorMessage })
|
|
4932
4993
|
] });
|
|
4933
4994
|
};
|
|
4934
4995
|
TextArea.displayName = "TextArea";
|
|
@@ -4943,53 +5004,6 @@ var init_TextArea2 = __esm({
|
|
|
4943
5004
|
}
|
|
4944
5005
|
});
|
|
4945
5006
|
|
|
4946
|
-
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
4947
|
-
var import_react41, import_jsx_runtime67, isHTML, TextOrHTML;
|
|
4948
|
-
var init_TextOrHTML = __esm({
|
|
4949
|
-
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
4950
|
-
"use strict";
|
|
4951
|
-
import_react41 = require("react");
|
|
4952
|
-
init_Text();
|
|
4953
|
-
import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4954
|
-
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
4955
|
-
TextOrHTML = ({
|
|
4956
|
-
ref,
|
|
4957
|
-
text,
|
|
4958
|
-
htmlClassName,
|
|
4959
|
-
htmlElementType,
|
|
4960
|
-
textWrapper = false,
|
|
4961
|
-
autoDetect = false,
|
|
4962
|
-
...textProps
|
|
4963
|
-
}) => {
|
|
4964
|
-
const textIsHTML = autoDetect && isHTML(text);
|
|
4965
|
-
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
4966
|
-
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
4967
|
-
const DangerousComponent = resolvedElementType;
|
|
4968
|
-
const dangerousHTML = (0, import_react41.useMemo)(() => ({ __html: text }), [text]);
|
|
4969
|
-
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
4970
|
-
DangerousComponent,
|
|
4971
|
-
{
|
|
4972
|
-
className: htmlClassName,
|
|
4973
|
-
dangerouslySetInnerHTML: dangerousHTML
|
|
4974
|
-
}
|
|
4975
|
-
);
|
|
4976
|
-
if (shouldWrapInText) {
|
|
4977
|
-
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
4978
|
-
}
|
|
4979
|
-
return dangerousElement;
|
|
4980
|
-
};
|
|
4981
|
-
TextOrHTML.displayName = "TextOrHTML";
|
|
4982
|
-
}
|
|
4983
|
-
});
|
|
4984
|
-
|
|
4985
|
-
// src/components/TextOrHTML/index.tsx
|
|
4986
|
-
var init_TextOrHTML2 = __esm({
|
|
4987
|
-
"src/components/TextOrHTML/index.tsx"() {
|
|
4988
|
-
"use strict";
|
|
4989
|
-
init_TextOrHTML();
|
|
4990
|
-
}
|
|
4991
|
-
});
|
|
4992
|
-
|
|
4993
5007
|
// src/components/Title/Title.tsx
|
|
4994
5008
|
var import_dedupe58, import_Title, import_jsx_runtime68, Title;
|
|
4995
5009
|
var init_Title = __esm({
|