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