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