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