@simplybusiness/mobius 10.1.1 → 10.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/cjs/components/AddressLookup/AddressLookup.js +536 -526
- package/dist/cjs/components/AddressLookup/AddressLookup.js.map +4 -4
- package/dist/cjs/components/AddressLookup/index.js +536 -526
- package/dist/cjs/components/AddressLookup/index.js.map +4 -4
- package/dist/cjs/components/Alert/Alert.js +79 -11
- package/dist/cjs/components/Alert/Alert.js.map +4 -4
- package/dist/cjs/components/Alert/index.js +79 -11
- package/dist/cjs/components/Alert/index.js.map +4 -4
- package/dist/cjs/components/Checkbox/Checkbox.js +502 -492
- package/dist/cjs/components/Checkbox/Checkbox.js.map +4 -4
- package/dist/cjs/components/Checkbox/CheckboxGroup.js +502 -492
- package/dist/cjs/components/Checkbox/CheckboxGroup.js.map +4 -4
- package/dist/cjs/components/Checkbox/index.js +481 -471
- package/dist/cjs/components/Checkbox/index.js.map +4 -4
- package/dist/cjs/components/Combobox/Combobox.js +536 -526
- package/dist/cjs/components/Combobox/Combobox.js.map +4 -4
- package/dist/cjs/components/Combobox/index.js +536 -526
- package/dist/cjs/components/Combobox/index.js.map +4 -4
- package/dist/cjs/components/DateField/DateField.js +523 -513
- package/dist/cjs/components/DateField/DateField.js.map +4 -4
- package/dist/cjs/components/DateField/index.js +523 -513
- package/dist/cjs/components/DateField/index.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js +523 -513
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/index.js +523 -513
- package/dist/cjs/components/ErrorMessage/index.js.map +4 -4
- package/dist/cjs/components/ExpandableText/ExpandableText.js +523 -513
- package/dist/cjs/components/ExpandableText/ExpandableText.js.map +4 -4
- package/dist/cjs/components/ExpandableText/index.js +523 -513
- package/dist/cjs/components/ExpandableText/index.js.map +4 -4
- package/dist/cjs/components/MaskedField/MaskedField.js +533 -523
- package/dist/cjs/components/MaskedField/MaskedField.js.map +4 -4
- package/dist/cjs/components/MaskedField/index.js +533 -523
- package/dist/cjs/components/MaskedField/index.js.map +4 -4
- package/dist/cjs/components/NumberField/NumberField.js +524 -514
- package/dist/cjs/components/NumberField/NumberField.js.map +4 -4
- package/dist/cjs/components/NumberField/index.js +524 -514
- package/dist/cjs/components/NumberField/index.js.map +4 -4
- package/dist/cjs/components/PasswordField/PasswordField.js +520 -510
- package/dist/cjs/components/PasswordField/PasswordField.js.map +4 -4
- package/dist/cjs/components/PasswordField/ShowHideButton.js +519 -509
- package/dist/cjs/components/PasswordField/ShowHideButton.js.map +4 -4
- package/dist/cjs/components/PasswordField/index.js +520 -510
- package/dist/cjs/components/PasswordField/index.js.map +4 -4
- package/dist/cjs/components/Radio/Radio.js +502 -492
- package/dist/cjs/components/Radio/Radio.js.map +4 -4
- package/dist/cjs/components/Radio/RadioGroup.js +501 -491
- package/dist/cjs/components/Radio/RadioGroup.js.map +4 -4
- package/dist/cjs/components/Radio/index.js +480 -470
- package/dist/cjs/components/Radio/index.js.map +4 -4
- package/dist/cjs/components/Select/Select.js +507 -497
- package/dist/cjs/components/Select/Select.js.map +4 -4
- package/dist/cjs/components/Select/index.js +507 -497
- package/dist/cjs/components/Select/index.js.map +4 -4
- package/dist/cjs/components/TextArea/TextArea.js +517 -507
- package/dist/cjs/components/TextArea/TextArea.js.map +4 -4
- package/dist/cjs/components/TextArea/index.js +517 -507
- package/dist/cjs/components/TextArea/index.js.map +4 -4
- package/dist/cjs/components/TextField/TextField.js +533 -523
- package/dist/cjs/components/TextField/TextField.js.map +4 -4
- package/dist/cjs/components/TextField/index.js +533 -523
- package/dist/cjs/components/TextField/index.js.map +4 -4
- package/dist/cjs/components/index.js +563 -553
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/index.js +563 -553
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/meta.json +1340 -1273
- package/dist/esm/{chunk-FTSJNY4J.js → chunk-N5WGQAHM.js} +14 -2
- package/dist/esm/chunk-N5WGQAHM.js.map +7 -0
- package/dist/esm/{chunk-C4BILMFX.js → chunk-PB2OICEB.js} +1 -1
- package/dist/esm/components/AddressLookup/AddressLookup.js +2 -2
- package/dist/esm/components/AddressLookup/index.js +2 -2
- package/dist/esm/components/Alert/Alert.js +4 -1
- package/dist/esm/components/Alert/index.js +4 -1
- package/dist/esm/components/Checkbox/Checkbox.js +2 -2
- package/dist/esm/components/Checkbox/CheckboxGroup.js +2 -2
- package/dist/esm/components/Checkbox/index.js +2 -2
- package/dist/esm/components/Combobox/Combobox.js +2 -2
- package/dist/esm/components/Combobox/index.js +2 -2
- package/dist/esm/components/DateField/DateField.js +2 -2
- package/dist/esm/components/DateField/index.js +2 -2
- package/dist/esm/components/ErrorMessage/ErrorMessage.js +2 -2
- package/dist/esm/components/ErrorMessage/index.js +2 -2
- package/dist/esm/components/ExpandableText/ExpandableText.js +2 -2
- package/dist/esm/components/ExpandableText/index.js +2 -2
- package/dist/esm/components/MaskedField/MaskedField.js +2 -2
- package/dist/esm/components/MaskedField/index.js +2 -2
- package/dist/esm/components/NumberField/NumberField.js +2 -2
- package/dist/esm/components/NumberField/index.js +2 -2
- package/dist/esm/components/PasswordField/PasswordField.js +2 -2
- package/dist/esm/components/PasswordField/ShowHideButton.js +2 -2
- package/dist/esm/components/PasswordField/index.js +2 -2
- package/dist/esm/components/Radio/Radio.js +2 -2
- package/dist/esm/components/Radio/RadioGroup.js +2 -2
- package/dist/esm/components/Radio/index.js +2 -2
- package/dist/esm/components/Select/Select.js +2 -2
- package/dist/esm/components/Select/index.js +2 -2
- package/dist/esm/components/TextArea/TextArea.js +2 -2
- package/dist/esm/components/TextArea/index.js +2 -2
- package/dist/esm/components/TextField/TextField.js +2 -2
- package/dist/esm/components/TextField/index.js +2 -2
- package/dist/esm/components/index.js +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/meta.json +160 -127
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/Alert/Alert.tsx +10 -1
- package/dist/esm/chunk-FTSJNY4J.js.map +0 -7
- /package/dist/esm/{chunk-C4BILMFX.js.map → chunk-PB2OICEB.js.map} +0 -0
|
@@ -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,23 +2594,23 @@ var init_Button2 = __esm({
|
|
|
2506
2594
|
});
|
|
2507
2595
|
|
|
2508
2596
|
// src/components/Container/Container.tsx
|
|
2509
|
-
var
|
|
2597
|
+
var import_dedupe20, import_Container, import_jsx_runtime24, Container;
|
|
2510
2598
|
var init_Container = __esm({
|
|
2511
2599
|
"src/components/Container/Container.tsx"() {
|
|
2512
2600
|
"use strict";
|
|
2513
|
-
|
|
2601
|
+
import_dedupe20 = __toESM(require("classnames/dedupe"));
|
|
2514
2602
|
init_utils();
|
|
2515
2603
|
import_Container = require("@simplybusiness/mobius/src/components/Container/Container.css");
|
|
2516
|
-
|
|
2604
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2517
2605
|
Container = ({ ref, ...props }) => {
|
|
2518
2606
|
const { elementType: Element = "div", size = "md", ...otherProps } = props;
|
|
2519
|
-
const classes = (0,
|
|
2607
|
+
const classes = (0, import_dedupe20.default)(
|
|
2520
2608
|
"mobius",
|
|
2521
2609
|
"mobius-container",
|
|
2522
2610
|
sizeClasses(size),
|
|
2523
2611
|
otherProps.className
|
|
2524
2612
|
);
|
|
2525
|
-
return /* @__PURE__ */ (0,
|
|
2613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
2526
2614
|
};
|
|
2527
2615
|
Container.displayName = "Container";
|
|
2528
2616
|
}
|
|
@@ -2575,17 +2663,17 @@ var init_validation = __esm({
|
|
|
2575
2663
|
});
|
|
2576
2664
|
|
|
2577
2665
|
// src/components/DateField/DateField.tsx
|
|
2578
|
-
var
|
|
2666
|
+
var import_dedupe21, import_react18, import_jsx_runtime25, MIN_MAX_ERROR, DateField;
|
|
2579
2667
|
var init_DateField = __esm({
|
|
2580
2668
|
"src/components/DateField/DateField.tsx"() {
|
|
2581
2669
|
"use strict";
|
|
2582
2670
|
"use client";
|
|
2583
|
-
|
|
2584
|
-
|
|
2671
|
+
import_dedupe21 = __toESM(require("classnames/dedupe"));
|
|
2672
|
+
import_react18 = require("react");
|
|
2585
2673
|
init_mergeRefs();
|
|
2586
2674
|
init_TextField2();
|
|
2587
2675
|
init_validation();
|
|
2588
|
-
|
|
2676
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2589
2677
|
MIN_MAX_ERROR = '"min" value should not be greater than "max" value.';
|
|
2590
2678
|
DateField = ({ ref, ...props }) => {
|
|
2591
2679
|
const {
|
|
@@ -2598,10 +2686,10 @@ var init_DateField = __esm({
|
|
|
2598
2686
|
value,
|
|
2599
2687
|
...otherProps
|
|
2600
2688
|
} = props;
|
|
2601
|
-
const [error3, setError] = (0,
|
|
2602
|
-
const [isInvalid, setIsInvalid] = (0,
|
|
2603
|
-
const localRef = (0,
|
|
2604
|
-
const classes = (0,
|
|
2689
|
+
const [error3, setError] = (0, import_react18.useState)(errorMessage);
|
|
2690
|
+
const [isInvalid, setIsInvalid] = (0, import_react18.useState)(void 0);
|
|
2691
|
+
const localRef = (0, import_react18.useRef)(null);
|
|
2692
|
+
const classes = (0, import_dedupe21.default)("mobius-date-field", className);
|
|
2605
2693
|
const formattedMin = min ? convertToDateFormat(min, format) : void 0;
|
|
2606
2694
|
const formattedMax = max ? convertToDateFormat(max, format) : void 0;
|
|
2607
2695
|
const formattedDefaultValue = defaultValue ? convertToDateFormat(defaultValue, format) : void 0;
|
|
@@ -2614,7 +2702,7 @@ var init_DateField = __esm({
|
|
|
2614
2702
|
setError(props.errorMessage);
|
|
2615
2703
|
setIsInvalid(false);
|
|
2616
2704
|
};
|
|
2617
|
-
(0,
|
|
2705
|
+
(0, import_react18.useEffect)(() => {
|
|
2618
2706
|
if (!isValidDate(min, format)) {
|
|
2619
2707
|
setInvalidState(`Invalid min date: ${min}`);
|
|
2620
2708
|
return;
|
|
@@ -2647,7 +2735,7 @@ var init_DateField = __esm({
|
|
|
2647
2735
|
validate();
|
|
2648
2736
|
otherProps.onBlur?.(event);
|
|
2649
2737
|
};
|
|
2650
|
-
return /* @__PURE__ */ (0,
|
|
2738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2651
2739
|
TextField,
|
|
2652
2740
|
{
|
|
2653
2741
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -2678,23 +2766,23 @@ var init_DateField2 = __esm({
|
|
|
2678
2766
|
});
|
|
2679
2767
|
|
|
2680
2768
|
// src/components/Drawer/Content.tsx
|
|
2681
|
-
var
|
|
2769
|
+
var import_jsx_runtime26, Content;
|
|
2682
2770
|
var init_Content = __esm({
|
|
2683
2771
|
"src/components/Drawer/Content.tsx"() {
|
|
2684
2772
|
"use strict";
|
|
2685
|
-
|
|
2686
|
-
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
2773
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2774
|
+
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref, ...otherProps, className: "mobius-drawer__content", children });
|
|
2687
2775
|
Content.displayName = "Content";
|
|
2688
2776
|
}
|
|
2689
2777
|
});
|
|
2690
2778
|
|
|
2691
2779
|
// src/components/Drawer/DrawerContext.tsx
|
|
2692
|
-
var
|
|
2780
|
+
var import_react19, DrawerContext;
|
|
2693
2781
|
var init_DrawerContext = __esm({
|
|
2694
2782
|
"src/components/Drawer/DrawerContext.tsx"() {
|
|
2695
2783
|
"use strict";
|
|
2696
|
-
|
|
2697
|
-
DrawerContext = (0,
|
|
2784
|
+
import_react19 = require("react");
|
|
2785
|
+
DrawerContext = (0, import_react19.createContext)({
|
|
2698
2786
|
onClose: () => {
|
|
2699
2787
|
},
|
|
2700
2788
|
closeLabel: void 0,
|
|
@@ -2704,19 +2792,19 @@ var init_DrawerContext = __esm({
|
|
|
2704
2792
|
});
|
|
2705
2793
|
|
|
2706
2794
|
// src/components/Drawer/Drawer.tsx
|
|
2707
|
-
var
|
|
2795
|
+
var import_dedupe22, import_react20, import_Drawer, import_jsx_runtime27, TRANSITION_CSS_VARIABLE, Drawer;
|
|
2708
2796
|
var init_Drawer = __esm({
|
|
2709
2797
|
"src/components/Drawer/Drawer.tsx"() {
|
|
2710
2798
|
"use strict";
|
|
2711
2799
|
"use client";
|
|
2712
|
-
|
|
2713
|
-
|
|
2800
|
+
import_dedupe22 = __toESM(require("classnames/dedupe"));
|
|
2801
|
+
import_react20 = require("react");
|
|
2714
2802
|
init_hooks();
|
|
2715
2803
|
init_utils();
|
|
2716
2804
|
init_VisuallyHidden2();
|
|
2717
2805
|
init_DrawerContext();
|
|
2718
2806
|
import_Drawer = require("@simplybusiness/mobius/src/components/Drawer/Drawer.css");
|
|
2719
|
-
|
|
2807
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2720
2808
|
TRANSITION_CSS_VARIABLE = "--drawer-transition-duration";
|
|
2721
2809
|
Drawer = ({ ref, ...props }) => {
|
|
2722
2810
|
const {
|
|
@@ -2729,8 +2817,8 @@ var init_Drawer = __esm({
|
|
|
2729
2817
|
onClose,
|
|
2730
2818
|
children
|
|
2731
2819
|
} = props;
|
|
2732
|
-
const dialogRef = (0,
|
|
2733
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
2820
|
+
const dialogRef = (0, import_react20.useRef)(null);
|
|
2821
|
+
const [shouldTransition, setShouldTransition] = (0, import_react20.useState)(false);
|
|
2734
2822
|
const { close } = useDialog({
|
|
2735
2823
|
ref: dialogRef,
|
|
2736
2824
|
isOpen,
|
|
@@ -2741,9 +2829,9 @@ var init_Drawer = __esm({
|
|
|
2741
2829
|
CSSVariable: TRANSITION_CSS_VARIABLE
|
|
2742
2830
|
}
|
|
2743
2831
|
});
|
|
2744
|
-
const hiddenId = `dialog-screen-reader-announce-${(0,
|
|
2745
|
-
const headerId = `dialog-header-${(0,
|
|
2746
|
-
const dialogClasses = (0,
|
|
2832
|
+
const hiddenId = `dialog-screen-reader-announce-${(0, import_react20.useId)()}`;
|
|
2833
|
+
const headerId = `dialog-header-${(0, import_react20.useId)()}`;
|
|
2834
|
+
const dialogClasses = (0, import_dedupe22.default)(
|
|
2747
2835
|
"mobius",
|
|
2748
2836
|
"mobius-drawer",
|
|
2749
2837
|
`--${direction}`,
|
|
@@ -2752,10 +2840,10 @@ var init_Drawer = __esm({
|
|
|
2752
2840
|
"--should-transition": shouldTransition
|
|
2753
2841
|
}
|
|
2754
2842
|
);
|
|
2755
|
-
(0,
|
|
2843
|
+
(0, import_react20.useEffect)(() => {
|
|
2756
2844
|
setShouldTransition(supportsDialog());
|
|
2757
2845
|
}, []);
|
|
2758
|
-
const contextValue = (0,
|
|
2846
|
+
const contextValue = (0, import_react20.useMemo)(
|
|
2759
2847
|
() => ({
|
|
2760
2848
|
onClose: close,
|
|
2761
2849
|
closeLabel,
|
|
@@ -2763,18 +2851,18 @@ var init_Drawer = __esm({
|
|
|
2763
2851
|
}),
|
|
2764
2852
|
[close, closeLabel, headerId]
|
|
2765
2853
|
);
|
|
2766
|
-
return /* @__PURE__ */ (0,
|
|
2854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2767
2855
|
"dialog",
|
|
2768
2856
|
{
|
|
2769
|
-
id: (0,
|
|
2857
|
+
id: (0, import_react20.useId)(),
|
|
2770
2858
|
ref: mergeRefs([dialogRef, ref]),
|
|
2771
2859
|
onCancel: close,
|
|
2772
2860
|
className: dialogClasses,
|
|
2773
2861
|
"aria-describedby": hiddenId,
|
|
2774
2862
|
"aria-labelledby": headerId,
|
|
2775
2863
|
children: [
|
|
2776
|
-
/* @__PURE__ */ (0,
|
|
2777
|
-
/* @__PURE__ */ (0,
|
|
2864
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { id: hiddenId, children: announce }) }),
|
|
2865
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DrawerContext.Provider, { value: contextValue, children })
|
|
2778
2866
|
]
|
|
2779
2867
|
}
|
|
2780
2868
|
);
|
|
@@ -2784,21 +2872,21 @@ var init_Drawer = __esm({
|
|
|
2784
2872
|
});
|
|
2785
2873
|
|
|
2786
2874
|
// src/components/Drawer/useDrawer.ts
|
|
2787
|
-
var
|
|
2875
|
+
var import_react21, useDrawer;
|
|
2788
2876
|
var init_useDrawer = __esm({
|
|
2789
2877
|
"src/components/Drawer/useDrawer.ts"() {
|
|
2790
2878
|
"use strict";
|
|
2791
|
-
|
|
2879
|
+
import_react21 = require("react");
|
|
2792
2880
|
init_DrawerContext();
|
|
2793
2881
|
useDrawer = () => {
|
|
2794
|
-
const { onClose, closeLabel, headerId } = (0,
|
|
2882
|
+
const { onClose, closeLabel, headerId } = (0, import_react21.useContext)(DrawerContext);
|
|
2795
2883
|
return { onClose, closeLabel, headerId };
|
|
2796
2884
|
};
|
|
2797
2885
|
}
|
|
2798
2886
|
});
|
|
2799
2887
|
|
|
2800
2888
|
// src/components/Drawer/Header.tsx
|
|
2801
|
-
var import_icons6,
|
|
2889
|
+
var import_icons6, import_jsx_runtime28, Header;
|
|
2802
2890
|
var init_Header = __esm({
|
|
2803
2891
|
"src/components/Drawer/Header.tsx"() {
|
|
2804
2892
|
"use strict";
|
|
@@ -2806,12 +2894,12 @@ var init_Header = __esm({
|
|
|
2806
2894
|
init_Button2();
|
|
2807
2895
|
init_Icon2();
|
|
2808
2896
|
init_useDrawer();
|
|
2809
|
-
|
|
2897
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2810
2898
|
Header = ({ ref, children, ...otherProps }) => {
|
|
2811
2899
|
const { onClose, closeLabel, headerId } = useDrawer();
|
|
2812
|
-
return /* @__PURE__ */ (0,
|
|
2813
|
-
/* @__PURE__ */ (0,
|
|
2814
|
-
/* @__PURE__ */ (0,
|
|
2900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("header", { ref, ...otherProps, className: "mobius-drawer__header", children: [
|
|
2901
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h2", { id: headerId, children }),
|
|
2902
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2815
2903
|
Button,
|
|
2816
2904
|
{
|
|
2817
2905
|
"aria-label": "Close",
|
|
@@ -2820,7 +2908,7 @@ var init_Header = __esm({
|
|
|
2820
2908
|
className: "mobius-drawer__close",
|
|
2821
2909
|
size: "sm",
|
|
2822
2910
|
children: [
|
|
2823
|
-
/* @__PURE__ */ (0,
|
|
2911
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { icon: import_icons6.cross }),
|
|
2824
2912
|
" ",
|
|
2825
2913
|
closeLabel
|
|
2826
2914
|
]
|
|
@@ -2849,17 +2937,17 @@ var init_Drawer2 = __esm({
|
|
|
2849
2937
|
});
|
|
2850
2938
|
|
|
2851
2939
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2852
|
-
var
|
|
2940
|
+
var import_react22, import_react_accessible_dropdown_menu_hook, import_dedupe23, import_DropdownMenu, import_jsx_runtime29, DropdownMenu;
|
|
2853
2941
|
var init_DropdownMenu = __esm({
|
|
2854
2942
|
"src/components/DropdownMenu/DropdownMenu.tsx"() {
|
|
2855
2943
|
"use strict";
|
|
2856
2944
|
"use client";
|
|
2857
|
-
|
|
2945
|
+
import_react22 = require("react");
|
|
2858
2946
|
import_react_accessible_dropdown_menu_hook = __toESM(require("react-accessible-dropdown-menu-hook"));
|
|
2859
|
-
|
|
2947
|
+
import_dedupe23 = __toESM(require("classnames/dedupe"));
|
|
2860
2948
|
init_Button2();
|
|
2861
2949
|
import_DropdownMenu = require("@simplybusiness/mobius/src/components/DropdownMenu/DropdownMenu.css");
|
|
2862
|
-
|
|
2950
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2863
2951
|
DropdownMenu = ({ ref, ...props }) => {
|
|
2864
2952
|
const {
|
|
2865
2953
|
elementType: Element = "nav",
|
|
@@ -2868,21 +2956,21 @@ var init_DropdownMenu = __esm({
|
|
|
2868
2956
|
children,
|
|
2869
2957
|
...otherProps
|
|
2870
2958
|
} = props;
|
|
2871
|
-
const [activeId, setActiveId] = (0,
|
|
2872
|
-
const numberOfItems =
|
|
2959
|
+
const [activeId, setActiveId] = (0, import_react22.useState)(null);
|
|
2960
|
+
const numberOfItems = import_react22.Children.count(children);
|
|
2873
2961
|
const {
|
|
2874
2962
|
buttonProps,
|
|
2875
2963
|
itemProps,
|
|
2876
2964
|
isOpen: open,
|
|
2877
2965
|
setIsOpen
|
|
2878
2966
|
} = (0, import_react_accessible_dropdown_menu_hook.default)(numberOfItems);
|
|
2879
|
-
const classes = (0,
|
|
2967
|
+
const classes = (0, import_dedupe23.default)(
|
|
2880
2968
|
"mobius",
|
|
2881
2969
|
"mobius-dropdown-menu",
|
|
2882
2970
|
otherProps.className
|
|
2883
2971
|
);
|
|
2884
|
-
const triggerClasses = (0,
|
|
2885
|
-
const listClasses = (0,
|
|
2972
|
+
const triggerClasses = (0, import_dedupe23.default)("mobius", "mobius-dropdown-menu__trigger");
|
|
2973
|
+
const listClasses = (0, import_dedupe23.default)("mobius", "mobius-dropdown-menu__list", {
|
|
2886
2974
|
"--is-open": open
|
|
2887
2975
|
});
|
|
2888
2976
|
const handleChildClick = ({ onClick }, index) => {
|
|
@@ -2892,16 +2980,16 @@ var init_DropdownMenu = __esm({
|
|
|
2892
2980
|
onClick();
|
|
2893
2981
|
}
|
|
2894
2982
|
};
|
|
2895
|
-
return /* @__PURE__ */ (0,
|
|
2896
|
-
trigger ? (0,
|
|
2983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Element, { ref, ...otherProps, className: classes, children: [
|
|
2984
|
+
trigger ? (0, import_react22.cloneElement)(trigger, {
|
|
2897
2985
|
className: triggerClasses,
|
|
2898
2986
|
open,
|
|
2899
2987
|
label,
|
|
2900
2988
|
...buttonProps
|
|
2901
|
-
}) : /* @__PURE__ */ (0,
|
|
2902
|
-
/* @__PURE__ */ (0,
|
|
2903
|
-
if ((0,
|
|
2904
|
-
return (0,
|
|
2989
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button, { className: triggerClasses, ...buttonProps, children: label }),
|
|
2990
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("ul", { className: listClasses, role: "menu", children: import_react22.Children.map(children, (child, index) => {
|
|
2991
|
+
if ((0, import_react22.isValidElement)(child)) {
|
|
2992
|
+
return (0, import_react22.cloneElement)(child, {
|
|
2905
2993
|
onClick: () => handleChildClick(child.props, index),
|
|
2906
2994
|
active: index === activeId,
|
|
2907
2995
|
...itemProps[index]
|
|
@@ -2916,13 +3004,13 @@ var init_DropdownMenu = __esm({
|
|
|
2916
3004
|
});
|
|
2917
3005
|
|
|
2918
3006
|
// src/components/DropdownMenu/Item.tsx
|
|
2919
|
-
var
|
|
3007
|
+
var import_react23, import_dedupe24, import_jsx_runtime30, Item;
|
|
2920
3008
|
var init_Item = __esm({
|
|
2921
3009
|
"src/components/DropdownMenu/Item.tsx"() {
|
|
2922
3010
|
"use strict";
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
3011
|
+
import_react23 = require("react");
|
|
3012
|
+
import_dedupe24 = __toESM(require("classnames/dedupe"));
|
|
3013
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2926
3014
|
Item = ({ ref, ...props }) => {
|
|
2927
3015
|
const {
|
|
2928
3016
|
elementType: Element = "li",
|
|
@@ -2931,26 +3019,26 @@ var init_Item = __esm({
|
|
|
2931
3019
|
children,
|
|
2932
3020
|
...otherProps
|
|
2933
3021
|
} = props;
|
|
2934
|
-
const classes = (0,
|
|
3022
|
+
const classes = (0, import_dedupe24.default)(
|
|
2935
3023
|
"mobius",
|
|
2936
3024
|
"mobius-dropdown-menu__item",
|
|
2937
3025
|
{ "--is-active": active },
|
|
2938
3026
|
otherProps.className
|
|
2939
3027
|
);
|
|
2940
|
-
return /* @__PURE__ */ (0,
|
|
2941
|
-
if ((0,
|
|
2942
|
-
const childClasses = (0,
|
|
3028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Element, { ref, onClick, ...otherProps, children: import_react23.Children.map(children, (child) => {
|
|
3029
|
+
if ((0, import_react23.isValidElement)(child)) {
|
|
3030
|
+
const childClasses = (0, import_dedupe24.default)(
|
|
2943
3031
|
child.props.className,
|
|
2944
3032
|
classes
|
|
2945
3033
|
);
|
|
2946
|
-
return (0,
|
|
3034
|
+
return (0, import_react23.cloneElement)(
|
|
2947
3035
|
child,
|
|
2948
3036
|
{
|
|
2949
3037
|
className: childClasses
|
|
2950
3038
|
}
|
|
2951
3039
|
);
|
|
2952
3040
|
}
|
|
2953
|
-
return /* @__PURE__ */ (0,
|
|
3041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: classes, children: child });
|
|
2954
3042
|
}) });
|
|
2955
3043
|
};
|
|
2956
3044
|
Item.displayName = "DropdownMenu.Item";
|
|
@@ -2975,23 +3063,23 @@ var init_DropdownMenu2 = __esm({
|
|
|
2975
3063
|
});
|
|
2976
3064
|
|
|
2977
3065
|
// src/components/Fieldset/Fieldset.tsx
|
|
2978
|
-
var
|
|
3066
|
+
var import_dedupe25, import_react24, import_Fieldset, import_jsx_runtime31, useFieldset, Fieldset;
|
|
2979
3067
|
var init_Fieldset = __esm({
|
|
2980
3068
|
"src/components/Fieldset/Fieldset.tsx"() {
|
|
2981
3069
|
"use strict";
|
|
2982
3070
|
"use client";
|
|
2983
|
-
|
|
2984
|
-
|
|
3071
|
+
import_dedupe25 = __toESM(require("classnames/dedupe"));
|
|
3072
|
+
import_react24 = require("react");
|
|
2985
3073
|
init_Flex2();
|
|
2986
3074
|
import_Fieldset = require("@simplybusiness/mobius/src/components/Fieldset/Fieldset.css");
|
|
2987
|
-
|
|
3075
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2988
3076
|
useFieldset = (props) => {
|
|
2989
3077
|
const { legend } = props;
|
|
2990
3078
|
let legendProps = {};
|
|
2991
3079
|
let containerProps = {
|
|
2992
3080
|
role: "group"
|
|
2993
3081
|
};
|
|
2994
|
-
const legendId = (0,
|
|
3082
|
+
const legendId = (0, import_react24.useId)();
|
|
2995
3083
|
if (legend) {
|
|
2996
3084
|
legendProps = {
|
|
2997
3085
|
...legendProps,
|
|
@@ -3011,14 +3099,14 @@ var init_Fieldset = __esm({
|
|
|
3011
3099
|
const {
|
|
3012
3100
|
children,
|
|
3013
3101
|
legend,
|
|
3014
|
-
legendComponent = /* @__PURE__ */ (0,
|
|
3102
|
+
legendComponent = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("legend", {}),
|
|
3015
3103
|
...otherProps
|
|
3016
3104
|
} = props;
|
|
3017
3105
|
const { legendProps, containerProps } = useFieldset(props);
|
|
3018
|
-
const classes = (0,
|
|
3106
|
+
const classes = (0, import_dedupe25.default)("mobius", "mobius-fieldset", props.className);
|
|
3019
3107
|
legendProps.className = "mobius-fieldset__legend";
|
|
3020
|
-
return /* @__PURE__ */ (0,
|
|
3021
|
-
legend && (0,
|
|
3108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Flex, { ...containerProps, ...otherProps, className: classes, children: [
|
|
3109
|
+
legend && (0, import_react24.cloneElement)(legendComponent, { ...legendProps }, [legend]),
|
|
3022
3110
|
children
|
|
3023
3111
|
] });
|
|
3024
3112
|
};
|
|
@@ -3035,13 +3123,13 @@ var init_Fieldset2 = __esm({
|
|
|
3035
3123
|
});
|
|
3036
3124
|
|
|
3037
3125
|
// src/components/Grid/Grid.tsx
|
|
3038
|
-
var
|
|
3126
|
+
var import_dedupe26, import_jsx_runtime32, Grid;
|
|
3039
3127
|
var init_Grid = __esm({
|
|
3040
3128
|
"src/components/Grid/Grid.tsx"() {
|
|
3041
3129
|
"use strict";
|
|
3042
|
-
|
|
3130
|
+
import_dedupe26 = __toESM(require("classnames/dedupe"));
|
|
3043
3131
|
init_utils();
|
|
3044
|
-
|
|
3132
|
+
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3045
3133
|
Grid = ({ ref: _ref, ...props }) => {
|
|
3046
3134
|
const {
|
|
3047
3135
|
columns = 12,
|
|
@@ -3056,7 +3144,7 @@ var init_Grid = __esm({
|
|
|
3056
3144
|
style,
|
|
3057
3145
|
...rest
|
|
3058
3146
|
} = props;
|
|
3059
|
-
const classes = (0,
|
|
3147
|
+
const classes = (0, import_dedupe26.default)("mobius", "mobius-grid", className);
|
|
3060
3148
|
const styles = filterUndefinedProps({
|
|
3061
3149
|
boxSizing: "border-box",
|
|
3062
3150
|
display: "grid",
|
|
@@ -3070,22 +3158,22 @@ var init_Grid = __esm({
|
|
|
3070
3158
|
justifyItems,
|
|
3071
3159
|
...style
|
|
3072
3160
|
});
|
|
3073
|
-
return /* @__PURE__ */ (0,
|
|
3161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: styles, className: classes, ...rest });
|
|
3074
3162
|
};
|
|
3075
3163
|
Grid.displayName = "Grid";
|
|
3076
3164
|
}
|
|
3077
3165
|
});
|
|
3078
3166
|
|
|
3079
3167
|
// src/components/Grid/Item.tsx
|
|
3080
|
-
var
|
|
3168
|
+
var import_react25, import_dedupe27, import_jsx_runtime33, getBreakpointMap, DEFAULT_SPAN, GridItem;
|
|
3081
3169
|
var init_Item2 = __esm({
|
|
3082
3170
|
"src/components/Grid/Item.tsx"() {
|
|
3083
3171
|
"use strict";
|
|
3084
3172
|
"use client";
|
|
3085
|
-
|
|
3086
|
-
|
|
3173
|
+
import_react25 = require("react");
|
|
3174
|
+
import_dedupe27 = __toESM(require("classnames/dedupe"));
|
|
3087
3175
|
init_hooks();
|
|
3088
|
-
|
|
3176
|
+
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3089
3177
|
getBreakpointMap = (config) => Object.entries(config).reduce(
|
|
3090
3178
|
(prev, [key, value]) => {
|
|
3091
3179
|
const previous = Object.values(prev);
|
|
@@ -3120,9 +3208,9 @@ var init_Item2 = __esm({
|
|
|
3120
3208
|
xl,
|
|
3121
3209
|
xxl
|
|
3122
3210
|
});
|
|
3123
|
-
const [responsiveSpan, setResponsiveSpan] = (0,
|
|
3124
|
-
const classes = (0,
|
|
3125
|
-
(0,
|
|
3211
|
+
const [responsiveSpan, setResponsiveSpan] = (0, import_react25.useState)();
|
|
3212
|
+
const classes = (0, import_dedupe27.default)("mobius-grid__item", className);
|
|
3213
|
+
(0, import_react25.useEffect)(() => {
|
|
3126
3214
|
setResponsiveSpan(breakpointMap[breakpointSize]);
|
|
3127
3215
|
}, [breakpointSize, breakpointMap]);
|
|
3128
3216
|
const styles = {
|
|
@@ -3130,7 +3218,7 @@ var init_Item2 = __esm({
|
|
|
3130
3218
|
alignSelf,
|
|
3131
3219
|
justifySelf
|
|
3132
3220
|
};
|
|
3133
|
-
return /* @__PURE__ */ (0,
|
|
3221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { ...styles }, className: classes, ...rest });
|
|
3134
3222
|
};
|
|
3135
3223
|
GridItem.displayName = "GridItem";
|
|
3136
3224
|
}
|
|
@@ -3151,20 +3239,20 @@ var init_Grid2 = __esm({
|
|
|
3151
3239
|
});
|
|
3152
3240
|
|
|
3153
3241
|
// src/components/Image/Image.tsx
|
|
3154
|
-
var
|
|
3242
|
+
var import_dedupe28, import_jsx_runtime34, Image;
|
|
3155
3243
|
var init_Image = __esm({
|
|
3156
3244
|
"src/components/Image/Image.tsx"() {
|
|
3157
3245
|
"use strict";
|
|
3158
|
-
|
|
3159
|
-
|
|
3246
|
+
import_dedupe28 = __toESM(require("classnames/dedupe"));
|
|
3247
|
+
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3160
3248
|
Image = ({
|
|
3161
3249
|
ref,
|
|
3162
3250
|
alt,
|
|
3163
3251
|
elementType: Component = "img",
|
|
3164
3252
|
...otherProps
|
|
3165
3253
|
}) => {
|
|
3166
|
-
const classes = (0,
|
|
3167
|
-
return /* @__PURE__ */ (0,
|
|
3254
|
+
const classes = (0, import_dedupe28.default)("mobius", "mobius-image", otherProps.className);
|
|
3255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Component, { alt, ref, ...otherProps, className: classes });
|
|
3168
3256
|
};
|
|
3169
3257
|
Image.displayName = "Image";
|
|
3170
3258
|
}
|
|
@@ -3179,13 +3267,13 @@ var init_Image2 = __esm({
|
|
|
3179
3267
|
});
|
|
3180
3268
|
|
|
3181
3269
|
// src/components/Link/Link.tsx
|
|
3182
|
-
var
|
|
3270
|
+
var import_dedupe29, import_Link, import_jsx_runtime35, Link;
|
|
3183
3271
|
var init_Link = __esm({
|
|
3184
3272
|
"src/components/Link/Link.tsx"() {
|
|
3185
3273
|
"use strict";
|
|
3186
|
-
|
|
3274
|
+
import_dedupe29 = __toESM(require("classnames/dedupe"));
|
|
3187
3275
|
import_Link = require("@simplybusiness/mobius/src/components/Link/Link.css");
|
|
3188
|
-
|
|
3276
|
+
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3189
3277
|
Link = ({ ref, ...props }) => {
|
|
3190
3278
|
const {
|
|
3191
3279
|
isDisabled = false,
|
|
@@ -3199,7 +3287,7 @@ var init_Link = __esm({
|
|
|
3199
3287
|
pointerEvents: "none"
|
|
3200
3288
|
};
|
|
3201
3289
|
const styles = { ...style, ...isDisabled && disabledStyles };
|
|
3202
|
-
const classes = (0,
|
|
3290
|
+
const classes = (0, import_dedupe29.default)(
|
|
3203
3291
|
"mobius",
|
|
3204
3292
|
"mobius-link",
|
|
3205
3293
|
className,
|
|
@@ -3208,7 +3296,7 @@ var init_Link = __esm({
|
|
|
3208
3296
|
"--is-disabled": isDisabled
|
|
3209
3297
|
}
|
|
3210
3298
|
);
|
|
3211
|
-
return /* @__PURE__ */ (0,
|
|
3299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3212
3300
|
Component,
|
|
3213
3301
|
{
|
|
3214
3302
|
ref,
|
|
@@ -3233,12 +3321,12 @@ var init_Link2 = __esm({
|
|
|
3233
3321
|
});
|
|
3234
3322
|
|
|
3235
3323
|
// src/components/LinkButton/LinkButton.tsx
|
|
3236
|
-
var
|
|
3324
|
+
var import_dedupe30, import_jsx_runtime36;
|
|
3237
3325
|
var init_LinkButton = __esm({
|
|
3238
3326
|
"src/components/LinkButton/LinkButton.tsx"() {
|
|
3239
3327
|
"use strict";
|
|
3240
|
-
|
|
3241
|
-
|
|
3328
|
+
import_dedupe30 = __toESM(require("classnames/dedupe"));
|
|
3329
|
+
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3242
3330
|
}
|
|
3243
3331
|
});
|
|
3244
3332
|
|
|
@@ -3251,14 +3339,14 @@ var init_LinkButton2 = __esm({
|
|
|
3251
3339
|
});
|
|
3252
3340
|
|
|
3253
3341
|
// src/components/List/List.tsx
|
|
3254
|
-
var
|
|
3342
|
+
var import_react26, import_dedupe31, import_List, import_jsx_runtime37, List;
|
|
3255
3343
|
var init_List = __esm({
|
|
3256
3344
|
"src/components/List/List.tsx"() {
|
|
3257
3345
|
"use strict";
|
|
3258
|
-
|
|
3259
|
-
|
|
3346
|
+
import_react26 = require("react");
|
|
3347
|
+
import_dedupe31 = __toESM(require("classnames/dedupe"));
|
|
3260
3348
|
import_List = require("@simplybusiness/mobius/src/components/List/List.css");
|
|
3261
|
-
|
|
3349
|
+
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3262
3350
|
List = ({ ref, ...props }) => {
|
|
3263
3351
|
const Component = props.isOrdered ? "ol" : "ul";
|
|
3264
3352
|
const { children, icon, ...otherProps } = props;
|
|
@@ -3267,7 +3355,7 @@ var init_List = __esm({
|
|
|
3267
3355
|
...restProps,
|
|
3268
3356
|
reversed: isReversed
|
|
3269
3357
|
};
|
|
3270
|
-
const classes = (0,
|
|
3358
|
+
const classes = (0, import_dedupe31.default)(
|
|
3271
3359
|
"mobius",
|
|
3272
3360
|
"mobius-list",
|
|
3273
3361
|
{
|
|
@@ -3276,9 +3364,9 @@ var init_List = __esm({
|
|
|
3276
3364
|
},
|
|
3277
3365
|
otherProps.className
|
|
3278
3366
|
);
|
|
3279
|
-
return /* @__PURE__ */ (0,
|
|
3280
|
-
if ((0,
|
|
3281
|
-
return (0,
|
|
3367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Component, { ref, ...mappedProps, className: classes, children: import_react26.Children.map(children, (child) => {
|
|
3368
|
+
if ((0, import_react26.isValidElement)(child)) {
|
|
3369
|
+
return (0, import_react26.cloneElement)(child, {
|
|
3282
3370
|
parentIcon: icon
|
|
3283
3371
|
});
|
|
3284
3372
|
}
|
|
@@ -3290,16 +3378,16 @@ var init_List = __esm({
|
|
|
3290
3378
|
});
|
|
3291
3379
|
|
|
3292
3380
|
// src/components/List/ListItem.tsx
|
|
3293
|
-
var
|
|
3381
|
+
var import_dedupe32, import_jsx_runtime38, ListItem;
|
|
3294
3382
|
var init_ListItem = __esm({
|
|
3295
3383
|
"src/components/List/ListItem.tsx"() {
|
|
3296
3384
|
"use strict";
|
|
3297
|
-
|
|
3298
|
-
|
|
3385
|
+
import_dedupe32 = __toESM(require("classnames/dedupe"));
|
|
3386
|
+
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3299
3387
|
ListItem = ({ ref, ...props }) => {
|
|
3300
3388
|
const { parentIcon, icon, children, ...otherProps } = props;
|
|
3301
3389
|
const iconContent = icon || parentIcon;
|
|
3302
|
-
const classes = (0,
|
|
3390
|
+
const classes = (0, import_dedupe32.default)(
|
|
3303
3391
|
"mobius",
|
|
3304
3392
|
"mobius-list__item",
|
|
3305
3393
|
{
|
|
@@ -3307,15 +3395,15 @@ var init_ListItem = __esm({
|
|
|
3307
3395
|
},
|
|
3308
3396
|
props.className
|
|
3309
3397
|
);
|
|
3310
|
-
const contentClasses = (0,
|
|
3311
|
-
const iconClasses = (0,
|
|
3398
|
+
const contentClasses = (0, import_dedupe32.default)("mobius", "mobius-list__item-content");
|
|
3399
|
+
const iconClasses = (0, import_dedupe32.default)("mobius", "mobius-list__icon");
|
|
3312
3400
|
if (iconContent) {
|
|
3313
|
-
return /* @__PURE__ */ (0,
|
|
3314
|
-
/* @__PURE__ */ (0,
|
|
3401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("li", { ref, ...otherProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: contentClasses, children: [
|
|
3402
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: iconClasses, children: iconContent }),
|
|
3315
3403
|
children
|
|
3316
3404
|
] }) });
|
|
3317
3405
|
}
|
|
3318
|
-
return /* @__PURE__ */ (0,
|
|
3406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("li", { ref, ...otherProps, className: classes, children });
|
|
3319
3407
|
};
|
|
3320
3408
|
ListItem.displayName = "ListItem";
|
|
3321
3409
|
}
|
|
@@ -3331,23 +3419,23 @@ var init_List2 = __esm({
|
|
|
3331
3419
|
});
|
|
3332
3420
|
|
|
3333
3421
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
3334
|
-
var
|
|
3422
|
+
var import_dedupe33, import_icons7, import_LoadingIndicator, import_jsx_runtime39, LoadingIndicator;
|
|
3335
3423
|
var init_LoadingIndicator = __esm({
|
|
3336
3424
|
"src/components/LoadingIndicator/LoadingIndicator.tsx"() {
|
|
3337
3425
|
"use strict";
|
|
3338
|
-
|
|
3426
|
+
import_dedupe33 = __toESM(require("classnames/dedupe"));
|
|
3339
3427
|
import_icons7 = require("@simplybusiness/icons");
|
|
3340
3428
|
init_Icon2();
|
|
3341
3429
|
import_LoadingIndicator = require("@simplybusiness/mobius/src/components/LoadingIndicator/LoadingIndicator.css");
|
|
3342
|
-
|
|
3430
|
+
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3343
3431
|
LoadingIndicator = ({ ref, ...props }) => {
|
|
3344
3432
|
const { icon = import_icons7.loading, ...otherProps } = props;
|
|
3345
|
-
const classes = (0,
|
|
3433
|
+
const classes = (0, import_dedupe33.default)(
|
|
3346
3434
|
"mobius",
|
|
3347
3435
|
"mobius-loading-indicator",
|
|
3348
3436
|
otherProps.className
|
|
3349
3437
|
);
|
|
3350
|
-
return /* @__PURE__ */ (0,
|
|
3438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { icon, spin: true, ref, ...otherProps, className: classes });
|
|
3351
3439
|
};
|
|
3352
3440
|
LoadingIndicator.displayName = "LoadingIndicator";
|
|
3353
3441
|
}
|
|
@@ -3362,16 +3450,16 @@ var init_LoadingIndicator2 = __esm({
|
|
|
3362
3450
|
});
|
|
3363
3451
|
|
|
3364
3452
|
// src/components/Logo/Logo.tsx
|
|
3365
|
-
var
|
|
3453
|
+
var import_dedupe34, import_jsx_runtime40, Logo;
|
|
3366
3454
|
var init_Logo = __esm({
|
|
3367
3455
|
"src/components/Logo/Logo.tsx"() {
|
|
3368
3456
|
"use strict";
|
|
3369
|
-
|
|
3370
|
-
|
|
3457
|
+
import_dedupe34 = __toESM(require("classnames/dedupe"));
|
|
3458
|
+
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3371
3459
|
Logo = ({ ref, ...props }) => {
|
|
3372
3460
|
const { className, width, height, ...otherProps } = props;
|
|
3373
|
-
const classes = (0,
|
|
3374
|
-
return /* @__PURE__ */ (0,
|
|
3461
|
+
const classes = (0, import_dedupe34.default)("mobius", "mobius-logo", className);
|
|
3462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3375
3463
|
"svg",
|
|
3376
3464
|
{
|
|
3377
3465
|
width,
|
|
@@ -3381,7 +3469,7 @@ var init_Logo = __esm({
|
|
|
3381
3469
|
viewBox: "0 0 144 37",
|
|
3382
3470
|
...otherProps,
|
|
3383
3471
|
children: [
|
|
3384
|
-
/* @__PURE__ */ (0,
|
|
3472
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3385
3473
|
"linearGradient",
|
|
3386
3474
|
{
|
|
3387
3475
|
id: "logo-gradient",
|
|
@@ -3390,27 +3478,27 @@ var init_Logo = __esm({
|
|
|
3390
3478
|
y1: "76.042%",
|
|
3391
3479
|
y2: "26.973%",
|
|
3392
3480
|
children: [
|
|
3393
|
-
/* @__PURE__ */ (0,
|
|
3394
|
-
/* @__PURE__ */ (0,
|
|
3481
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { stopColor: "#4632D8", offset: "0%" }),
|
|
3482
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { stopColor: "#9084E8", offset: "100%" })
|
|
3395
3483
|
]
|
|
3396
3484
|
}
|
|
3397
3485
|
) }),
|
|
3398
|
-
/* @__PURE__ */ (0,
|
|
3399
|
-
/* @__PURE__ */ (0,
|
|
3486
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("g", { children: [
|
|
3487
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3400
3488
|
"path",
|
|
3401
3489
|
{
|
|
3402
3490
|
fill: "#0E0A2B",
|
|
3403
3491
|
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"
|
|
3404
3492
|
}
|
|
3405
3493
|
),
|
|
3406
|
-
/* @__PURE__ */ (0,
|
|
3494
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3407
3495
|
"path",
|
|
3408
3496
|
{
|
|
3409
3497
|
fill: "url(#logo-gradient)",
|
|
3410
3498
|
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"
|
|
3411
3499
|
}
|
|
3412
3500
|
),
|
|
3413
|
-
/* @__PURE__ */ (0,
|
|
3501
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3414
3502
|
"path",
|
|
3415
3503
|
{
|
|
3416
3504
|
fill: "#0E0A2B",
|
|
@@ -3435,23 +3523,23 @@ var init_Logo2 = __esm({
|
|
|
3435
3523
|
});
|
|
3436
3524
|
|
|
3437
3525
|
// src/components/Modal/Content.tsx
|
|
3438
|
-
var
|
|
3526
|
+
var import_jsx_runtime41, Content2;
|
|
3439
3527
|
var init_Content2 = __esm({
|
|
3440
3528
|
"src/components/Modal/Content.tsx"() {
|
|
3441
3529
|
"use strict";
|
|
3442
|
-
|
|
3443
|
-
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
3530
|
+
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3531
|
+
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { ref, ...otherProps, className: "mobius-modal__content", children });
|
|
3444
3532
|
Content2.displayName = "Content";
|
|
3445
3533
|
}
|
|
3446
3534
|
});
|
|
3447
3535
|
|
|
3448
3536
|
// src/components/Modal/ModalContext.tsx
|
|
3449
|
-
var
|
|
3537
|
+
var import_react27, ModalContext;
|
|
3450
3538
|
var init_ModalContext = __esm({
|
|
3451
3539
|
"src/components/Modal/ModalContext.tsx"() {
|
|
3452
3540
|
"use strict";
|
|
3453
|
-
|
|
3454
|
-
ModalContext = (0,
|
|
3541
|
+
import_react27 = require("react");
|
|
3542
|
+
ModalContext = (0, import_react27.createContext)({
|
|
3455
3543
|
onClose: () => {
|
|
3456
3544
|
},
|
|
3457
3545
|
closeLabel: void 0
|
|
@@ -3460,21 +3548,21 @@ var init_ModalContext = __esm({
|
|
|
3460
3548
|
});
|
|
3461
3549
|
|
|
3462
3550
|
// src/components/Modal/useModal.ts
|
|
3463
|
-
var
|
|
3551
|
+
var import_react28, useModal;
|
|
3464
3552
|
var init_useModal = __esm({
|
|
3465
3553
|
"src/components/Modal/useModal.ts"() {
|
|
3466
3554
|
"use strict";
|
|
3467
|
-
|
|
3555
|
+
import_react28 = require("react");
|
|
3468
3556
|
init_ModalContext();
|
|
3469
3557
|
useModal = () => {
|
|
3470
|
-
const { onClose, closeLabel } = (0,
|
|
3558
|
+
const { onClose, closeLabel } = (0, import_react28.useContext)(ModalContext);
|
|
3471
3559
|
return { onClose, closeLabel };
|
|
3472
3560
|
};
|
|
3473
3561
|
}
|
|
3474
3562
|
});
|
|
3475
3563
|
|
|
3476
3564
|
// src/components/Modal/Header.tsx
|
|
3477
|
-
var import_icons8,
|
|
3565
|
+
var import_icons8, import_jsx_runtime42, Header2;
|
|
3478
3566
|
var init_Header2 = __esm({
|
|
3479
3567
|
"src/components/Modal/Header.tsx"() {
|
|
3480
3568
|
"use strict";
|
|
@@ -3482,12 +3570,12 @@ var init_Header2 = __esm({
|
|
|
3482
3570
|
init_Button2();
|
|
3483
3571
|
init_Icon2();
|
|
3484
3572
|
init_useModal();
|
|
3485
|
-
|
|
3573
|
+
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3486
3574
|
Header2 = ({ ref, children, ...otherProps }) => {
|
|
3487
3575
|
const { onClose, closeLabel } = useModal();
|
|
3488
|
-
return /* @__PURE__ */ (0,
|
|
3576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("header", { ref, ...otherProps, className: "mobius-modal__header", children: [
|
|
3489
3577
|
children,
|
|
3490
|
-
/* @__PURE__ */ (0,
|
|
3578
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3491
3579
|
Button,
|
|
3492
3580
|
{
|
|
3493
3581
|
"aria-label": "Close",
|
|
@@ -3495,7 +3583,7 @@ var init_Header2 = __esm({
|
|
|
3495
3583
|
onPress: onClose,
|
|
3496
3584
|
className: "mobius-modal__close",
|
|
3497
3585
|
children: [
|
|
3498
|
-
/* @__PURE__ */ (0,
|
|
3586
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { icon: import_icons8.cross }),
|
|
3499
3587
|
" ",
|
|
3500
3588
|
closeLabel
|
|
3501
3589
|
]
|
|
@@ -3508,19 +3596,19 @@ var init_Header2 = __esm({
|
|
|
3508
3596
|
});
|
|
3509
3597
|
|
|
3510
3598
|
// src/components/Modal/Modal.tsx
|
|
3511
|
-
var
|
|
3599
|
+
var import_dedupe35, import_react29, import_Modal, import_jsx_runtime43, TRANSITION_CSS_VARIABLE2, Modal;
|
|
3512
3600
|
var init_Modal = __esm({
|
|
3513
3601
|
"src/components/Modal/Modal.tsx"() {
|
|
3514
3602
|
"use strict";
|
|
3515
3603
|
"use client";
|
|
3516
|
-
|
|
3517
|
-
|
|
3604
|
+
import_dedupe35 = __toESM(require("classnames/dedupe"));
|
|
3605
|
+
import_react29 = require("react");
|
|
3518
3606
|
init_hooks();
|
|
3519
3607
|
init_utils();
|
|
3520
3608
|
init_polyfill_tests();
|
|
3521
3609
|
init_ModalContext();
|
|
3522
3610
|
import_Modal = require("@simplybusiness/mobius/src/components/Modal/Modal.css");
|
|
3523
|
-
|
|
3611
|
+
import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3524
3612
|
TRANSITION_CSS_VARIABLE2 = "--modal-transition-duration";
|
|
3525
3613
|
Modal = ({ ref, ...props }) => {
|
|
3526
3614
|
const {
|
|
@@ -3534,11 +3622,11 @@ var init_Modal = __esm({
|
|
|
3534
3622
|
animation,
|
|
3535
3623
|
...rest
|
|
3536
3624
|
} = props;
|
|
3537
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
3538
|
-
(0,
|
|
3625
|
+
const [shouldTransition, setShouldTransition] = (0, import_react29.useState)(false);
|
|
3626
|
+
(0, import_react29.useEffect)(() => {
|
|
3539
3627
|
setShouldTransition(supportsDialog());
|
|
3540
3628
|
}, []);
|
|
3541
|
-
const dialogRef = (0,
|
|
3629
|
+
const dialogRef = (0, import_react29.useRef)(null);
|
|
3542
3630
|
const { close } = useDialog({
|
|
3543
3631
|
ref: dialogRef,
|
|
3544
3632
|
isOpen,
|
|
@@ -3549,7 +3637,7 @@ var init_Modal = __esm({
|
|
|
3549
3637
|
CSSVariable: TRANSITION_CSS_VARIABLE2
|
|
3550
3638
|
}
|
|
3551
3639
|
});
|
|
3552
|
-
const modalClasses = (0,
|
|
3640
|
+
const modalClasses = (0, import_dedupe35.default)(
|
|
3553
3641
|
"mobius",
|
|
3554
3642
|
"mobius-modal",
|
|
3555
3643
|
{
|
|
@@ -3562,21 +3650,21 @@ var init_Modal = __esm({
|
|
|
3562
3650
|
},
|
|
3563
3651
|
className
|
|
3564
3652
|
);
|
|
3565
|
-
const contextValue = (0,
|
|
3653
|
+
const contextValue = (0, import_react29.useMemo)(
|
|
3566
3654
|
() => ({
|
|
3567
3655
|
onClose: close,
|
|
3568
3656
|
closeLabel
|
|
3569
3657
|
}),
|
|
3570
3658
|
[close, closeLabel]
|
|
3571
3659
|
);
|
|
3572
|
-
return /* @__PURE__ */ (0,
|
|
3660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3573
3661
|
"dialog",
|
|
3574
3662
|
{
|
|
3575
3663
|
ref: mergeRefs([dialogRef, ref]),
|
|
3576
3664
|
onCancel: close,
|
|
3577
3665
|
className: modalClasses,
|
|
3578
3666
|
...rest,
|
|
3579
|
-
children: /* @__PURE__ */ (0,
|
|
3667
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ModalContext.Provider, { value: contextValue, children })
|
|
3580
3668
|
}
|
|
3581
3669
|
);
|
|
3582
3670
|
};
|
|
@@ -3601,16 +3689,16 @@ var init_Modal2 = __esm({
|
|
|
3601
3689
|
});
|
|
3602
3690
|
|
|
3603
3691
|
// src/components/NumberField/NumberField.tsx
|
|
3604
|
-
var
|
|
3692
|
+
var import_dedupe36, import_react30, import_NumberField, import_jsx_runtime44, NumberField;
|
|
3605
3693
|
var init_NumberField = __esm({
|
|
3606
3694
|
"src/components/NumberField/NumberField.tsx"() {
|
|
3607
3695
|
"use strict";
|
|
3608
3696
|
"use client";
|
|
3609
|
-
|
|
3610
|
-
|
|
3697
|
+
import_dedupe36 = __toESM(require("classnames/dedupe"));
|
|
3698
|
+
import_react30 = require("react");
|
|
3611
3699
|
init_TextField2();
|
|
3612
3700
|
import_NumberField = require("@simplybusiness/mobius/src/components/NumberField/NumberField.css");
|
|
3613
|
-
|
|
3701
|
+
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3614
3702
|
NumberField = ({ ref, ...props }) => {
|
|
3615
3703
|
const {
|
|
3616
3704
|
minValue,
|
|
@@ -3626,15 +3714,15 @@ var init_NumberField = __esm({
|
|
|
3626
3714
|
onBlur: customOnBlur,
|
|
3627
3715
|
...rest
|
|
3628
3716
|
} = otherProps;
|
|
3629
|
-
const focusedInputRef = (0,
|
|
3630
|
-
const wheelHandler = (0,
|
|
3631
|
-
(0,
|
|
3717
|
+
const focusedInputRef = (0, import_react30.useRef)(null);
|
|
3718
|
+
const wheelHandler = (0, import_react30.useCallback)((ev) => ev.preventDefault(), []);
|
|
3719
|
+
(0, import_react30.useEffect)(() => {
|
|
3632
3720
|
return () => {
|
|
3633
3721
|
focusedInputRef.current?.removeEventListener("wheel", wheelHandler);
|
|
3634
3722
|
focusedInputRef.current = null;
|
|
3635
3723
|
};
|
|
3636
3724
|
}, [wheelHandler]);
|
|
3637
|
-
const containerClasses = (0,
|
|
3725
|
+
const containerClasses = (0, import_dedupe36.default)("mobius-number-field", className, {
|
|
3638
3726
|
"--hide-spin-buttons": hideSpinButtons
|
|
3639
3727
|
});
|
|
3640
3728
|
const handleBeforeInput = (event) => {
|
|
@@ -3678,7 +3766,7 @@ var init_NumberField = __esm({
|
|
|
3678
3766
|
},
|
|
3679
3767
|
onBlur: (e) => handleBlur(e)
|
|
3680
3768
|
};
|
|
3681
|
-
return /* @__PURE__ */ (0,
|
|
3769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3682
3770
|
TextField,
|
|
3683
3771
|
{
|
|
3684
3772
|
...forwardedProps,
|
|
@@ -3706,18 +3794,18 @@ var init_NumberField2 = __esm({
|
|
|
3706
3794
|
});
|
|
3707
3795
|
|
|
3708
3796
|
// src/components/Option/Option.tsx
|
|
3709
|
-
var
|
|
3797
|
+
var import_jsx_runtime45, Option2;
|
|
3710
3798
|
var init_Option2 = __esm({
|
|
3711
3799
|
"src/components/Option/Option.tsx"() {
|
|
3712
3800
|
"use strict";
|
|
3713
|
-
|
|
3801
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3714
3802
|
Option2 = ({ ref, ...props }) => {
|
|
3715
3803
|
const { isDisabled, ...rest } = props;
|
|
3716
3804
|
const mappedProps = {
|
|
3717
3805
|
...rest,
|
|
3718
3806
|
disabled: isDisabled
|
|
3719
3807
|
};
|
|
3720
|
-
return /* @__PURE__ */ (0,
|
|
3808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("option", { ...mappedProps, ref });
|
|
3721
3809
|
};
|
|
3722
3810
|
Option2.displayName = "Option";
|
|
3723
3811
|
}
|
|
@@ -3732,17 +3820,17 @@ var init_Option3 = __esm({
|
|
|
3732
3820
|
});
|
|
3733
3821
|
|
|
3734
3822
|
// src/components/PasswordField/ShowHideButton.tsx
|
|
3735
|
-
var import_icons9,
|
|
3823
|
+
var import_icons9, import_jsx_runtime46, ShowHideButton;
|
|
3736
3824
|
var init_ShowHideButton = __esm({
|
|
3737
3825
|
"src/components/PasswordField/ShowHideButton.tsx"() {
|
|
3738
3826
|
"use strict";
|
|
3739
3827
|
import_icons9 = require("@simplybusiness/icons");
|
|
3740
3828
|
init_src();
|
|
3741
|
-
|
|
3829
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3742
3830
|
ShowHideButton = ({
|
|
3743
3831
|
show = false,
|
|
3744
3832
|
onClick
|
|
3745
|
-
}) => /* @__PURE__ */ (0,
|
|
3833
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3746
3834
|
"button",
|
|
3747
3835
|
{
|
|
3748
3836
|
className: "mobius-password-field__show-button",
|
|
@@ -3753,35 +3841,35 @@ var init_ShowHideButton = __esm({
|
|
|
3753
3841
|
},
|
|
3754
3842
|
"aria-label": `${show ? "Hide" : "Show"} password`,
|
|
3755
3843
|
"data-testid": "show-hide-button",
|
|
3756
|
-
children: /* @__PURE__ */ (0,
|
|
3844
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon, { icon: show ? import_icons9.eyeSlash : import_icons9.eye, "aria-hidden": "true" })
|
|
3757
3845
|
}
|
|
3758
3846
|
);
|
|
3759
3847
|
}
|
|
3760
3848
|
});
|
|
3761
3849
|
|
|
3762
3850
|
// src/components/PasswordField/PasswordField.tsx
|
|
3763
|
-
var
|
|
3851
|
+
var import_dedupe37, import_react31, import_PasswordField, import_jsx_runtime47, PasswordField;
|
|
3764
3852
|
var init_PasswordField = __esm({
|
|
3765
3853
|
"src/components/PasswordField/PasswordField.tsx"() {
|
|
3766
3854
|
"use strict";
|
|
3767
3855
|
"use client";
|
|
3768
|
-
|
|
3769
|
-
|
|
3856
|
+
import_dedupe37 = __toESM(require("classnames/dedupe"));
|
|
3857
|
+
import_react31 = require("react");
|
|
3770
3858
|
init_mergeRefs();
|
|
3771
3859
|
init_TextField2();
|
|
3772
3860
|
init_ShowHideButton();
|
|
3773
3861
|
import_PasswordField = require("@simplybusiness/mobius/src/components/PasswordField/PasswordField.css");
|
|
3774
|
-
|
|
3862
|
+
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3775
3863
|
PasswordField = ({
|
|
3776
3864
|
ref,
|
|
3777
3865
|
className,
|
|
3778
3866
|
autoComplete = "current-password",
|
|
3779
3867
|
...props
|
|
3780
3868
|
}) => {
|
|
3781
|
-
const [show, setShow] = (0,
|
|
3869
|
+
const [show, setShow] = (0, import_react31.useState)(false);
|
|
3782
3870
|
const type = show ? "text" : "password";
|
|
3783
|
-
const classes = (0,
|
|
3784
|
-
const localRef = (0,
|
|
3871
|
+
const classes = (0, import_dedupe37.default)("mobius-password-field", className);
|
|
3872
|
+
const localRef = (0, import_react31.useRef)(null);
|
|
3785
3873
|
const handleShowHideButtonClick = () => {
|
|
3786
3874
|
const selectionStart = localRef.current?.selectionStart;
|
|
3787
3875
|
const selectionEnd = localRef.current?.selectionEnd;
|
|
@@ -3793,7 +3881,7 @@ var init_PasswordField = __esm({
|
|
|
3793
3881
|
}
|
|
3794
3882
|
});
|
|
3795
3883
|
};
|
|
3796
|
-
return /* @__PURE__ */ (0,
|
|
3884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3797
3885
|
TextField,
|
|
3798
3886
|
{
|
|
3799
3887
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -3801,7 +3889,7 @@ var init_PasswordField = __esm({
|
|
|
3801
3889
|
...props,
|
|
3802
3890
|
autoComplete,
|
|
3803
3891
|
type,
|
|
3804
|
-
suffixInside: /* @__PURE__ */ (0,
|
|
3892
|
+
suffixInside: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ShowHideButton, { onClick: handleShowHideButtonClick, show })
|
|
3805
3893
|
}
|
|
3806
3894
|
);
|
|
3807
3895
|
};
|
|
@@ -3818,17 +3906,17 @@ var init_PasswordField2 = __esm({
|
|
|
3818
3906
|
});
|
|
3819
3907
|
|
|
3820
3908
|
// src/components/Popover/Popover.tsx
|
|
3821
|
-
var
|
|
3909
|
+
var import_react32, import_icons10, import_dedupe38, import_react33, import_mobius_hooks6, import_Popover, import_jsx_runtime48;
|
|
3822
3910
|
var init_Popover = __esm({
|
|
3823
3911
|
"src/components/Popover/Popover.tsx"() {
|
|
3824
3912
|
"use strict";
|
|
3825
|
-
|
|
3913
|
+
import_react32 = require("@floating-ui/react");
|
|
3826
3914
|
import_icons10 = require("@simplybusiness/icons");
|
|
3827
|
-
|
|
3828
|
-
|
|
3915
|
+
import_dedupe38 = __toESM(require("classnames/dedupe"));
|
|
3916
|
+
import_react33 = require("react");
|
|
3829
3917
|
import_mobius_hooks6 = require("@simplybusiness/mobius-hooks");
|
|
3830
3918
|
import_Popover = require("@simplybusiness/mobius/src/components/Popover/Popover.css");
|
|
3831
|
-
|
|
3919
|
+
import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3832
3920
|
}
|
|
3833
3921
|
});
|
|
3834
3922
|
|
|
@@ -3852,17 +3940,17 @@ function warnAboutInvalidValues(value, minValue, maxValue) {
|
|
|
3852
3940
|
console.warn("Progress value is greater than maxValue");
|
|
3853
3941
|
}
|
|
3854
3942
|
}
|
|
3855
|
-
var
|
|
3943
|
+
var import_dedupe39, import_react34, import_Progress, import_jsx_runtime49, sanitizedValue, getLabelComponent, DEFAULT_VALUE, DEFAULT_MIN_VALUE, DEFAULT_MAX_VALUE, Progress;
|
|
3856
3944
|
var init_Progress = __esm({
|
|
3857
3945
|
"src/components/Progress/Progress.tsx"() {
|
|
3858
3946
|
"use strict";
|
|
3859
3947
|
"use client";
|
|
3860
|
-
|
|
3861
|
-
|
|
3948
|
+
import_dedupe39 = __toESM(require("classnames/dedupe"));
|
|
3949
|
+
import_react34 = require("react");
|
|
3862
3950
|
init_Label2();
|
|
3863
3951
|
init_VisuallyHidden2();
|
|
3864
3952
|
import_Progress = require("@simplybusiness/mobius/src/components/Progress/Progress.css");
|
|
3865
|
-
|
|
3953
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3866
3954
|
sanitizedValue = (value, defaultValue) => {
|
|
3867
3955
|
if (value === void 0 || Number.isNaN(value)) {
|
|
3868
3956
|
return defaultValue;
|
|
@@ -3871,7 +3959,7 @@ var init_Progress = __esm({
|
|
|
3871
3959
|
};
|
|
3872
3960
|
getLabelComponent = (label, progressLabelId, showLabel) => {
|
|
3873
3961
|
if (showLabel) {
|
|
3874
|
-
return /* @__PURE__ */ (0,
|
|
3962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3875
3963
|
Label,
|
|
3876
3964
|
{
|
|
3877
3965
|
id: progressLabelId,
|
|
@@ -3881,7 +3969,7 @@ var init_Progress = __esm({
|
|
|
3881
3969
|
}
|
|
3882
3970
|
);
|
|
3883
3971
|
}
|
|
3884
|
-
return /* @__PURE__ */ (0,
|
|
3972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3885
3973
|
Label,
|
|
3886
3974
|
{
|
|
3887
3975
|
id: progressLabelId,
|
|
@@ -3895,8 +3983,8 @@ var init_Progress = __esm({
|
|
|
3895
3983
|
DEFAULT_MIN_VALUE = 0;
|
|
3896
3984
|
DEFAULT_MAX_VALUE = 100;
|
|
3897
3985
|
Progress = ({ ref, ...props }) => {
|
|
3898
|
-
const progressId = (0,
|
|
3899
|
-
const progressLabelId = (0,
|
|
3986
|
+
const progressId = (0, import_react34.useId)();
|
|
3987
|
+
const progressLabelId = (0, import_react34.useId)();
|
|
3900
3988
|
const {
|
|
3901
3989
|
id,
|
|
3902
3990
|
label,
|
|
@@ -3921,7 +4009,7 @@ var init_Progress = __esm({
|
|
|
3921
4009
|
100
|
|
3922
4010
|
);
|
|
3923
4011
|
const barWidth = `${percentage}%`;
|
|
3924
|
-
const classes = (0,
|
|
4012
|
+
const classes = (0, import_dedupe39.default)("mobius", "mobius-progress", className, {
|
|
3925
4013
|
"--is-primary": variant === "primary",
|
|
3926
4014
|
"--is-secondary": variant === "secondary"
|
|
3927
4015
|
});
|
|
@@ -3931,7 +4019,7 @@ var init_Progress = __esm({
|
|
|
3931
4019
|
progressBarProps["aria-valuenow"] = value.toString();
|
|
3932
4020
|
progressBarProps["aria-valuetext"] = valueFormatter instanceof Function ? valueFormatter(value, minValue, maxValue) : barWidth;
|
|
3933
4021
|
const labelComponent = getLabelComponent(label, progressLabelId, showLabel);
|
|
3934
|
-
return /* @__PURE__ */ (0,
|
|
4022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
3935
4023
|
"div",
|
|
3936
4024
|
{
|
|
3937
4025
|
id: id || progressId,
|
|
@@ -3942,8 +4030,8 @@ var init_Progress = __esm({
|
|
|
3942
4030
|
"aria-labelledby": progressLabelId,
|
|
3943
4031
|
children: [
|
|
3944
4032
|
labelComponent,
|
|
3945
|
-
/* @__PURE__ */ (0,
|
|
3946
|
-
showValueLabel && /* @__PURE__ */ (0,
|
|
4033
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mobius-progress__track", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mobius-progress__bar", style: { width: barWidth } }) }),
|
|
4034
|
+
showValueLabel && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Label, { "data-testid": "value-label", elementType: "span", children: progressBarProps["aria-valuetext"] })
|
|
3947
4035
|
]
|
|
3948
4036
|
}
|
|
3949
4037
|
);
|
|
@@ -3961,17 +4049,17 @@ var init_Progress2 = __esm({
|
|
|
3961
4049
|
});
|
|
3962
4050
|
|
|
3963
4051
|
// src/components/Radio/Radio.tsx
|
|
3964
|
-
var
|
|
4052
|
+
var import_dedupe40, import_react35, import_Radio, import_jsx_runtime50, Radio;
|
|
3965
4053
|
var init_Radio = __esm({
|
|
3966
4054
|
"src/components/Radio/Radio.tsx"() {
|
|
3967
4055
|
"use strict";
|
|
3968
4056
|
"use client";
|
|
3969
|
-
|
|
3970
|
-
|
|
4057
|
+
import_dedupe40 = __toESM(require("classnames/dedupe"));
|
|
4058
|
+
import_react35 = require("react");
|
|
3971
4059
|
init_ErrorMessage2();
|
|
3972
4060
|
init_Label2();
|
|
3973
4061
|
import_Radio = require("@simplybusiness/mobius/src/components/Radio/Radio.css");
|
|
3974
|
-
|
|
4062
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3975
4063
|
Radio = ({ ref, ...props }) => {
|
|
3976
4064
|
const {
|
|
3977
4065
|
children,
|
|
@@ -3995,19 +4083,19 @@ var init_Radio = __esm({
|
|
|
3995
4083
|
const isMultiline = label && children;
|
|
3996
4084
|
const isControlled = selected !== void 0;
|
|
3997
4085
|
const isChecked = isControlled ? selected === value : defaultChecked;
|
|
3998
|
-
const contentRef = (0,
|
|
3999
|
-
const prevOverflowRef = (0,
|
|
4086
|
+
const contentRef = (0, import_react35.useRef)(null);
|
|
4087
|
+
const prevOverflowRef = (0, import_react35.useRef)({
|
|
4000
4088
|
vertical: false,
|
|
4001
4089
|
horizontal: false
|
|
4002
4090
|
});
|
|
4003
|
-
const hasIconFirst = (0,
|
|
4004
|
-
if (!children ||
|
|
4005
|
-
const firstChild =
|
|
4006
|
-
if (!(0,
|
|
4091
|
+
const hasIconFirst = (0, import_react35.useMemo)(() => {
|
|
4092
|
+
if (!children || import_react35.Children.count(children) === 0) return false;
|
|
4093
|
+
const firstChild = import_react35.Children.toArray(children)[0];
|
|
4094
|
+
if (!(0, import_react35.isValidElement)(firstChild)) return false;
|
|
4007
4095
|
const props2 = firstChild.props;
|
|
4008
4096
|
return "icon" in props2 && props2.icon !== void 0;
|
|
4009
4097
|
}, [children]);
|
|
4010
|
-
(0,
|
|
4098
|
+
(0, import_react35.useLayoutEffect)(() => {
|
|
4011
4099
|
if (!contentRef.current || !onOverflow) return;
|
|
4012
4100
|
if (orientation === "vertical") {
|
|
4013
4101
|
return;
|
|
@@ -4036,13 +4124,13 @@ var init_Radio = __esm({
|
|
|
4036
4124
|
"--is-multiline": !!isMultiline,
|
|
4037
4125
|
"--is-required": isRequired
|
|
4038
4126
|
};
|
|
4039
|
-
const containerClasses = (0,
|
|
4127
|
+
const containerClasses = (0, import_dedupe40.default)(
|
|
4040
4128
|
"mobius-radio__label",
|
|
4041
4129
|
radioClasses,
|
|
4042
4130
|
className,
|
|
4043
4131
|
{ "--has-icon-first": hasIconFirst }
|
|
4044
4132
|
);
|
|
4045
|
-
const inputClasses = (0,
|
|
4133
|
+
const inputClasses = (0, import_dedupe40.default)("mobius-radio__input", radioClasses);
|
|
4046
4134
|
const { "aria-describedby": _ariaDescribedBy, ...rest } = otherProps;
|
|
4047
4135
|
const handleChange = (event) => {
|
|
4048
4136
|
if (setSelected) {
|
|
@@ -4056,9 +4144,9 @@ var init_Radio = __esm({
|
|
|
4056
4144
|
onChange(adaptedEvent);
|
|
4057
4145
|
}
|
|
4058
4146
|
};
|
|
4059
|
-
return /* @__PURE__ */ (0,
|
|
4060
|
-
/* @__PURE__ */ (0,
|
|
4061
|
-
/* @__PURE__ */ (0,
|
|
4147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
4148
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Label, { className: containerClasses, children: [
|
|
4149
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4062
4150
|
"input",
|
|
4063
4151
|
{
|
|
4064
4152
|
"aria-describedby": otherProps["aria-describedby"],
|
|
@@ -4075,12 +4163,12 @@ var init_Radio = __esm({
|
|
|
4075
4163
|
...rest
|
|
4076
4164
|
}
|
|
4077
4165
|
),
|
|
4078
|
-
isMultiline ? /* @__PURE__ */ (0,
|
|
4079
|
-
/* @__PURE__ */ (0,
|
|
4080
|
-
/* @__PURE__ */ (0,
|
|
4081
|
-
] }) : /* @__PURE__ */ (0,
|
|
4166
|
+
isMultiline ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { ref: contentRef, className: "mobius-radio__content--multiline", children: [
|
|
4167
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mobius-radio__content-first-line", children: label }),
|
|
4168
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mobius-radio__extra-content", children })
|
|
4169
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { ref: contentRef, className: "mobius-radio__content", children: label || children })
|
|
4082
4170
|
] }),
|
|
4083
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
4171
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ErrorMessage, { errorMessage })
|
|
4084
4172
|
] });
|
|
4085
4173
|
};
|
|
4086
4174
|
Radio.displayName = "Radio";
|
|
@@ -4088,19 +4176,19 @@ var init_Radio = __esm({
|
|
|
4088
4176
|
});
|
|
4089
4177
|
|
|
4090
4178
|
// src/components/Radio/RadioGroup.tsx
|
|
4091
|
-
var
|
|
4179
|
+
var import_dedupe41, import_react36, import_jsx_runtime51, getDefaultVal, RadioGroup;
|
|
4092
4180
|
var init_RadioGroup = __esm({
|
|
4093
4181
|
"src/components/Radio/RadioGroup.tsx"() {
|
|
4094
4182
|
"use strict";
|
|
4095
4183
|
"use client";
|
|
4096
|
-
|
|
4097
|
-
|
|
4184
|
+
import_dedupe41 = __toESM(require("classnames/dedupe"));
|
|
4185
|
+
import_react36 = require("react");
|
|
4098
4186
|
init_hooks();
|
|
4099
4187
|
init_spaceDelimitedList();
|
|
4100
4188
|
init_ErrorMessage2();
|
|
4101
4189
|
init_Label2();
|
|
4102
4190
|
init_Stack2();
|
|
4103
|
-
|
|
4191
|
+
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4104
4192
|
getDefaultVal = (children, defaultValue) => {
|
|
4105
4193
|
if (Array.isArray(children) && defaultValue) {
|
|
4106
4194
|
const option = children?.find((item) => item.props.value === defaultValue);
|
|
@@ -4128,15 +4216,15 @@ var init_RadioGroup = __esm({
|
|
|
4128
4216
|
...rest
|
|
4129
4217
|
} = props;
|
|
4130
4218
|
const defaultSelected = getDefaultVal(children, value || defaultValue);
|
|
4131
|
-
const [selected, setSelected] = (0,
|
|
4132
|
-
const overflowsRef = (0,
|
|
4133
|
-
const [hasOverflow, setHasOverflow] = (0,
|
|
4134
|
-
(0,
|
|
4219
|
+
const [selected, setSelected] = (0, import_react36.useState)(defaultSelected);
|
|
4220
|
+
const overflowsRef = (0, import_react36.useRef)({});
|
|
4221
|
+
const [hasOverflow, setHasOverflow] = (0, import_react36.useState)(false);
|
|
4222
|
+
(0, import_react36.useEffect)(() => {
|
|
4135
4223
|
if (value !== void 0) {
|
|
4136
4224
|
setSelected(value);
|
|
4137
4225
|
}
|
|
4138
4226
|
}, [value]);
|
|
4139
|
-
const handleOverflow = (0,
|
|
4227
|
+
const handleOverflow = (0, import_react36.useCallback)(
|
|
4140
4228
|
(radioValue, overflow) => {
|
|
4141
4229
|
overflowsRef.current = {
|
|
4142
4230
|
...overflowsRef.current,
|
|
@@ -4160,26 +4248,26 @@ var init_RadioGroup = __esm({
|
|
|
4160
4248
|
[`--is-${effectiveOrientation}`]: true,
|
|
4161
4249
|
[className || ""]: true
|
|
4162
4250
|
};
|
|
4163
|
-
const radioGroupClasses = (0,
|
|
4251
|
+
const radioGroupClasses = (0, import_dedupe41.default)(
|
|
4164
4252
|
"mobius",
|
|
4165
4253
|
"mobius-radio-group",
|
|
4166
4254
|
radioClasses,
|
|
4167
4255
|
validationClasses
|
|
4168
4256
|
);
|
|
4169
|
-
const radioWrapperClasses = (0,
|
|
4257
|
+
const radioWrapperClasses = (0, import_dedupe41.default)("mobius-radio__wrapper", {
|
|
4170
4258
|
[`--is-${effectiveOrientation}`]: true
|
|
4171
4259
|
});
|
|
4172
|
-
const labelClasses = (0,
|
|
4173
|
-
const errorMessageId = (0,
|
|
4174
|
-
const defaultNameAttrId = (0,
|
|
4260
|
+
const labelClasses = (0, import_dedupe41.default)(radioClasses, validationClasses);
|
|
4261
|
+
const errorMessageId = (0, import_react36.useId)();
|
|
4262
|
+
const defaultNameAttrId = (0, import_react36.useId)();
|
|
4175
4263
|
const nameAttribute = name || defaultNameAttrId;
|
|
4176
4264
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
4177
4265
|
const describedBy = spaceDelimitedList([
|
|
4178
4266
|
shouldErrorMessageShow,
|
|
4179
4267
|
props["aria-describedby"]
|
|
4180
4268
|
]);
|
|
4181
|
-
const labelId = (0,
|
|
4182
|
-
return /* @__PURE__ */ (0,
|
|
4269
|
+
const labelId = (0, import_react36.useId)();
|
|
4270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4183
4271
|
"div",
|
|
4184
4272
|
{
|
|
4185
4273
|
...rest,
|
|
@@ -4195,12 +4283,12 @@ var init_RadioGroup = __esm({
|
|
|
4195
4283
|
ref,
|
|
4196
4284
|
className: radioGroupClasses,
|
|
4197
4285
|
role: "radiogroup",
|
|
4198
|
-
children: /* @__PURE__ */ (0,
|
|
4199
|
-
label && /* @__PURE__ */ (0,
|
|
4200
|
-
/* @__PURE__ */ (0,
|
|
4201
|
-
if ((0,
|
|
4286
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Stack, { gap: "xs", children: [
|
|
4287
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Label, { htmlFor: name, id: labelId, className: labelClasses, children: label }),
|
|
4288
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: radioWrapperClasses, children: import_react36.Children.map(children, (child) => {
|
|
4289
|
+
if ((0, import_react36.isValidElement)(child)) {
|
|
4202
4290
|
const childValue = child.props.value;
|
|
4203
|
-
return (0,
|
|
4291
|
+
return (0, import_react36.cloneElement)(
|
|
4204
4292
|
child,
|
|
4205
4293
|
{
|
|
4206
4294
|
orientation: effectiveOrientation,
|
|
@@ -4218,7 +4306,7 @@ var init_RadioGroup = __esm({
|
|
|
4218
4306
|
}
|
|
4219
4307
|
return child;
|
|
4220
4308
|
}) }),
|
|
4221
|
-
/* @__PURE__ */ (0,
|
|
4309
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
4222
4310
|
] })
|
|
4223
4311
|
}
|
|
4224
4312
|
);
|
|
@@ -4237,47 +4325,47 @@ var init_Radio2 = __esm({
|
|
|
4237
4325
|
});
|
|
4238
4326
|
|
|
4239
4327
|
// src/components/Segment/SegmentGroup.tsx
|
|
4240
|
-
var
|
|
4328
|
+
var import_dedupe42, import_jsx_runtime52, SegmentGroup;
|
|
4241
4329
|
var init_SegmentGroup = __esm({
|
|
4242
4330
|
"src/components/Segment/SegmentGroup.tsx"() {
|
|
4243
4331
|
"use strict";
|
|
4244
|
-
|
|
4245
|
-
|
|
4332
|
+
import_dedupe42 = __toESM(require("classnames/dedupe"));
|
|
4333
|
+
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4246
4334
|
SegmentGroup = (props) => {
|
|
4247
4335
|
const { children, horizontal, gap, className, ...rest } = props;
|
|
4248
4336
|
const gapClass = gap ? `gap-${gap}` : "";
|
|
4249
|
-
const classes = (0,
|
|
4337
|
+
const classes = (0, import_dedupe42.default)(
|
|
4250
4338
|
"mobius",
|
|
4251
4339
|
"mobius-segment-group",
|
|
4252
4340
|
className,
|
|
4253
4341
|
{ "--is-horizontal": horizontal },
|
|
4254
4342
|
gapClass
|
|
4255
4343
|
);
|
|
4256
|
-
return /* @__PURE__ */ (0,
|
|
4344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: classes, ...rest, children });
|
|
4257
4345
|
};
|
|
4258
4346
|
SegmentGroup.displayName = "SegmentGroup";
|
|
4259
4347
|
}
|
|
4260
4348
|
});
|
|
4261
4349
|
|
|
4262
4350
|
// src/components/Segment/Segment.tsx
|
|
4263
|
-
var
|
|
4351
|
+
var import_dedupe43, import_Segment, import_jsx_runtime53, Segment;
|
|
4264
4352
|
var init_Segment = __esm({
|
|
4265
4353
|
"src/components/Segment/Segment.tsx"() {
|
|
4266
4354
|
"use strict";
|
|
4267
|
-
|
|
4355
|
+
import_dedupe43 = __toESM(require("classnames/dedupe"));
|
|
4268
4356
|
import_Segment = require("@simplybusiness/mobius/src/components/Segment/Segment.css");
|
|
4269
|
-
|
|
4357
|
+
import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4270
4358
|
Segment = (props) => {
|
|
4271
4359
|
const { heading, children, colour, inverted, className, ...rest } = props;
|
|
4272
|
-
const classes = (0,
|
|
4360
|
+
const classes = (0, import_dedupe43.default)(
|
|
4273
4361
|
"mobius",
|
|
4274
4362
|
"mobius-segment",
|
|
4275
4363
|
colour,
|
|
4276
4364
|
{ inverted },
|
|
4277
4365
|
className
|
|
4278
4366
|
);
|
|
4279
|
-
return /* @__PURE__ */ (0,
|
|
4280
|
-
heading && /* @__PURE__ */ (0,
|
|
4367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: classes, ...rest, children: [
|
|
4368
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mobius-segment__heading", children: heading }),
|
|
4281
4369
|
children
|
|
4282
4370
|
] });
|
|
4283
4371
|
};
|
|
@@ -4295,14 +4383,14 @@ var init_Segment2 = __esm({
|
|
|
4295
4383
|
});
|
|
4296
4384
|
|
|
4297
4385
|
// src/components/Select/Select.tsx
|
|
4298
|
-
var import_icons11,
|
|
4386
|
+
var import_icons11, import_dedupe44, import_react37, import_Select, import_jsx_runtime54, Select;
|
|
4299
4387
|
var init_Select = __esm({
|
|
4300
4388
|
"src/components/Select/Select.tsx"() {
|
|
4301
4389
|
"use strict";
|
|
4302
4390
|
"use client";
|
|
4303
4391
|
import_icons11 = require("@simplybusiness/icons");
|
|
4304
|
-
|
|
4305
|
-
|
|
4392
|
+
import_dedupe44 = __toESM(require("classnames/dedupe"));
|
|
4393
|
+
import_react37 = require("react");
|
|
4306
4394
|
init_hooks();
|
|
4307
4395
|
init_useLabel2();
|
|
4308
4396
|
init_spaceDelimitedList();
|
|
@@ -4311,7 +4399,7 @@ var init_Select = __esm({
|
|
|
4311
4399
|
init_Label2();
|
|
4312
4400
|
init_Stack2();
|
|
4313
4401
|
import_Select = require("@simplybusiness/mobius/src/components/Select/Select.css");
|
|
4314
|
-
|
|
4402
|
+
import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4315
4403
|
Select = ({ ref, ...props }) => {
|
|
4316
4404
|
const {
|
|
4317
4405
|
label,
|
|
@@ -4332,24 +4420,24 @@ var init_Select = __esm({
|
|
|
4332
4420
|
"--is-required": typeof isRequired === "boolean" && isRequired,
|
|
4333
4421
|
"--is-optional": typeof isRequired === "boolean" && !isRequired
|
|
4334
4422
|
};
|
|
4335
|
-
const sharedClasses = (0,
|
|
4336
|
-
const wrapperClasses = (0,
|
|
4423
|
+
const sharedClasses = (0, import_dedupe44.default)(validationClasses, stateClasses);
|
|
4424
|
+
const wrapperClasses = (0, import_dedupe44.default)(
|
|
4337
4425
|
"mobius-select__wrapper",
|
|
4338
4426
|
sharedClasses,
|
|
4339
4427
|
otherProps.className
|
|
4340
4428
|
);
|
|
4341
|
-
const selectClasses = (0,
|
|
4429
|
+
const selectClasses = (0, import_dedupe44.default)(
|
|
4342
4430
|
"mobius-select",
|
|
4343
4431
|
sharedClasses,
|
|
4344
4432
|
otherProps.className
|
|
4345
4433
|
);
|
|
4346
|
-
const labelClasses = (0,
|
|
4434
|
+
const labelClasses = (0, import_dedupe44.default)(
|
|
4347
4435
|
"mobius-label",
|
|
4348
4436
|
sharedClasses,
|
|
4349
4437
|
otherProps.className
|
|
4350
4438
|
);
|
|
4351
|
-
const iconClasses = (0,
|
|
4352
|
-
const errorMessageId = (0,
|
|
4439
|
+
const iconClasses = (0, import_dedupe44.default)("mobius-select__icon", sharedClasses);
|
|
4440
|
+
const errorMessageId = (0, import_react37.useId)();
|
|
4353
4441
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
4354
4442
|
const describedBy = spaceDelimitedList([
|
|
4355
4443
|
shouldErrorMessageShow,
|
|
@@ -4360,10 +4448,10 @@ var init_Select = __esm({
|
|
|
4360
4448
|
onChange(e);
|
|
4361
4449
|
}
|
|
4362
4450
|
};
|
|
4363
|
-
return /* @__PURE__ */ (0,
|
|
4364
|
-
label && /* @__PURE__ */ (0,
|
|
4365
|
-
/* @__PURE__ */ (0,
|
|
4366
|
-
/* @__PURE__ */ (0,
|
|
4451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Stack, { className: "mobius mobius-select__outer", gap: "xs", children: [
|
|
4452
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Label, { ...labelProps, className: labelClasses, children: label }),
|
|
4453
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: wrapperClasses, children: [
|
|
4454
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4367
4455
|
"select",
|
|
4368
4456
|
{
|
|
4369
4457
|
...otherProps,
|
|
@@ -4379,9 +4467,9 @@ var init_Select = __esm({
|
|
|
4379
4467
|
onChange: handleChange
|
|
4380
4468
|
}
|
|
4381
4469
|
),
|
|
4382
|
-
/* @__PURE__ */ (0,
|
|
4470
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon, { icon: import_icons11.chevronDown }) })
|
|
4383
4471
|
] }),
|
|
4384
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
4472
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
4385
4473
|
] });
|
|
4386
4474
|
};
|
|
4387
4475
|
Select.displayName = "Select";
|
|
@@ -4397,15 +4485,15 @@ var init_Select2 = __esm({
|
|
|
4397
4485
|
});
|
|
4398
4486
|
|
|
4399
4487
|
// src/components/Slider/Slider.tsx
|
|
4400
|
-
var
|
|
4488
|
+
var import_dedupe45, import_react38, import_Slider, import_jsx_runtime55;
|
|
4401
4489
|
var init_Slider = __esm({
|
|
4402
4490
|
"src/components/Slider/Slider.tsx"() {
|
|
4403
4491
|
"use strict";
|
|
4404
4492
|
"use client";
|
|
4405
|
-
|
|
4406
|
-
|
|
4493
|
+
import_dedupe45 = __toESM(require("classnames/dedupe"));
|
|
4494
|
+
import_react38 = require("react");
|
|
4407
4495
|
import_Slider = require("@simplybusiness/mobius/src/components/Slider/Slider.css");
|
|
4408
|
-
|
|
4496
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4409
4497
|
}
|
|
4410
4498
|
});
|
|
4411
4499
|
|
|
@@ -4418,19 +4506,19 @@ var init_Slider2 = __esm({
|
|
|
4418
4506
|
});
|
|
4419
4507
|
|
|
4420
4508
|
// src/components/SVG/SVG.tsx
|
|
4421
|
-
var
|
|
4509
|
+
var import_react39, import_dedupe46, import_jsx_runtime56, SVG;
|
|
4422
4510
|
var init_SVG = __esm({
|
|
4423
4511
|
"src/components/SVG/SVG.tsx"() {
|
|
4424
4512
|
"use strict";
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4513
|
+
import_react39 = require("react");
|
|
4514
|
+
import_dedupe46 = __toESM(require("classnames/dedupe"));
|
|
4515
|
+
import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4428
4516
|
SVG = ({ ref, ...props }) => {
|
|
4429
4517
|
const { children, className, ...otherProps } = props;
|
|
4430
|
-
const classes = (0,
|
|
4431
|
-
const svgNode =
|
|
4518
|
+
const classes = (0, import_dedupe46.default)("mobius", "mobius-svg", className);
|
|
4519
|
+
const svgNode = import_react39.Children.only(children);
|
|
4432
4520
|
const { children: svgChildren, viewBox, xmlns } = svgNode.props;
|
|
4433
|
-
return /* @__PURE__ */ (0,
|
|
4521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4434
4522
|
"svg",
|
|
4435
4523
|
{
|
|
4436
4524
|
viewBox,
|
|
@@ -4455,16 +4543,16 @@ var init_SVG2 = __esm({
|
|
|
4455
4543
|
});
|
|
4456
4544
|
|
|
4457
4545
|
// src/components/Switch/Switch.tsx
|
|
4458
|
-
var
|
|
4546
|
+
var import_react40, import_dedupe47, import_Switch, import_jsx_runtime57, Switch;
|
|
4459
4547
|
var init_Switch = __esm({
|
|
4460
4548
|
"src/components/Switch/Switch.tsx"() {
|
|
4461
4549
|
"use strict";
|
|
4462
4550
|
"use client";
|
|
4463
|
-
|
|
4464
|
-
|
|
4551
|
+
import_react40 = require("react");
|
|
4552
|
+
import_dedupe47 = __toESM(require("classnames/dedupe"));
|
|
4465
4553
|
init_VisuallyHidden2();
|
|
4466
4554
|
import_Switch = require("@simplybusiness/mobius/src/components/Switch/Switch.css");
|
|
4467
|
-
|
|
4555
|
+
import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4468
4556
|
Switch = ({ ref, ...props }) => {
|
|
4469
4557
|
const {
|
|
4470
4558
|
checked = false,
|
|
@@ -4473,11 +4561,11 @@ var init_Switch = __esm({
|
|
|
4473
4561
|
isDisabled = false,
|
|
4474
4562
|
...otherProps
|
|
4475
4563
|
} = props;
|
|
4476
|
-
const [enabled, setEnabled] = (0,
|
|
4477
|
-
(0,
|
|
4564
|
+
const [enabled, setEnabled] = (0, import_react40.useState)(checked);
|
|
4565
|
+
(0, import_react40.useEffect)(() => {
|
|
4478
4566
|
setEnabled(checked);
|
|
4479
4567
|
}, [checked]);
|
|
4480
|
-
const classes = (0,
|
|
4568
|
+
const classes = (0, import_dedupe47.default)(
|
|
4481
4569
|
"mobius",
|
|
4482
4570
|
"mobius-switch",
|
|
4483
4571
|
{
|
|
@@ -4492,9 +4580,9 @@ var init_Switch = __esm({
|
|
|
4492
4580
|
onChange(event);
|
|
4493
4581
|
}
|
|
4494
4582
|
};
|
|
4495
|
-
return /* @__PURE__ */ (0,
|
|
4496
|
-
/* @__PURE__ */ (0,
|
|
4497
|
-
/* @__PURE__ */ (0,
|
|
4583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("label", { ref, className: classes, children: [
|
|
4584
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { children: enabled ? "On" : "Off" }) }),
|
|
4585
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4498
4586
|
"input",
|
|
4499
4587
|
{
|
|
4500
4588
|
type: "checkbox",
|
|
@@ -4505,7 +4593,7 @@ var init_Switch = __esm({
|
|
|
4505
4593
|
...otherProps
|
|
4506
4594
|
}
|
|
4507
4595
|
),
|
|
4508
|
-
/* @__PURE__ */ (0,
|
|
4596
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "mobius-switch__slider" })
|
|
4509
4597
|
] });
|
|
4510
4598
|
};
|
|
4511
4599
|
Switch.displayName = "Switch";
|
|
@@ -4521,114 +4609,114 @@ var init_Switch2 = __esm({
|
|
|
4521
4609
|
});
|
|
4522
4610
|
|
|
4523
4611
|
// src/components/Table/Table.tsx
|
|
4524
|
-
var
|
|
4612
|
+
var import_dedupe48, import_Table, import_jsx_runtime58, Table;
|
|
4525
4613
|
var init_Table = __esm({
|
|
4526
4614
|
"src/components/Table/Table.tsx"() {
|
|
4527
4615
|
"use strict";
|
|
4528
|
-
|
|
4616
|
+
import_dedupe48 = __toESM(require("classnames/dedupe"));
|
|
4529
4617
|
import_Table = require("@simplybusiness/mobius/src/components/Table/Table.css");
|
|
4530
|
-
|
|
4618
|
+
import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4531
4619
|
Table = ({ ref, ...props }) => {
|
|
4532
|
-
const classes = (0,
|
|
4533
|
-
return /* @__PURE__ */ (0,
|
|
4620
|
+
const classes = (0, import_dedupe48.default)("mobius", "mobius-table", props.className);
|
|
4621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("table", { ref, ...props, className: classes });
|
|
4534
4622
|
};
|
|
4535
4623
|
Table.displayName = "Table";
|
|
4536
4624
|
}
|
|
4537
4625
|
});
|
|
4538
4626
|
|
|
4539
4627
|
// src/components/Table/Head.tsx
|
|
4540
|
-
var
|
|
4628
|
+
var import_dedupe49, import_jsx_runtime59, Head;
|
|
4541
4629
|
var init_Head = __esm({
|
|
4542
4630
|
"src/components/Table/Head.tsx"() {
|
|
4543
4631
|
"use strict";
|
|
4544
|
-
|
|
4545
|
-
|
|
4632
|
+
import_dedupe49 = __toESM(require("classnames/dedupe"));
|
|
4633
|
+
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4546
4634
|
Head = ({ ref, ...props }) => {
|
|
4547
|
-
const classes = (0,
|
|
4548
|
-
return /* @__PURE__ */ (0,
|
|
4635
|
+
const classes = (0, import_dedupe49.default)("mobius", "mobius-table__head", props.className);
|
|
4636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("thead", { ref, ...props, className: classes });
|
|
4549
4637
|
};
|
|
4550
4638
|
Head.displayName = "Table.Head";
|
|
4551
4639
|
}
|
|
4552
4640
|
});
|
|
4553
4641
|
|
|
4554
4642
|
// src/components/Table/Body.tsx
|
|
4555
|
-
var
|
|
4643
|
+
var import_dedupe50, import_jsx_runtime60, Body;
|
|
4556
4644
|
var init_Body = __esm({
|
|
4557
4645
|
"src/components/Table/Body.tsx"() {
|
|
4558
4646
|
"use strict";
|
|
4559
|
-
|
|
4560
|
-
|
|
4647
|
+
import_dedupe50 = __toESM(require("classnames/dedupe"));
|
|
4648
|
+
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4561
4649
|
Body = ({ ref, ...props }) => {
|
|
4562
|
-
const classes = (0,
|
|
4563
|
-
return /* @__PURE__ */ (0,
|
|
4650
|
+
const classes = (0, import_dedupe50.default)("mobius", "mobius-table__body", props.className);
|
|
4651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("tbody", { ref, ...props, className: classes });
|
|
4564
4652
|
};
|
|
4565
4653
|
Body.displayName = "Table.Body";
|
|
4566
4654
|
}
|
|
4567
4655
|
});
|
|
4568
4656
|
|
|
4569
4657
|
// src/components/Table/Foot.tsx
|
|
4570
|
-
var
|
|
4658
|
+
var import_dedupe51, import_jsx_runtime61, Foot;
|
|
4571
4659
|
var init_Foot = __esm({
|
|
4572
4660
|
"src/components/Table/Foot.tsx"() {
|
|
4573
4661
|
"use strict";
|
|
4574
|
-
|
|
4575
|
-
|
|
4662
|
+
import_dedupe51 = __toESM(require("classnames/dedupe"));
|
|
4663
|
+
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4576
4664
|
Foot = ({ ref, ...props }) => {
|
|
4577
|
-
const classes = (0,
|
|
4578
|
-
return /* @__PURE__ */ (0,
|
|
4665
|
+
const classes = (0, import_dedupe51.default)("mobius", "mobius-table__foot", props.className);
|
|
4666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tfoot", { ref, ...props, className: classes });
|
|
4579
4667
|
};
|
|
4580
4668
|
Foot.displayName = "Table.Foot";
|
|
4581
4669
|
}
|
|
4582
4670
|
});
|
|
4583
4671
|
|
|
4584
4672
|
// src/components/Table/Row.tsx
|
|
4585
|
-
var
|
|
4673
|
+
var import_dedupe52, import_jsx_runtime62, Row;
|
|
4586
4674
|
var init_Row = __esm({
|
|
4587
4675
|
"src/components/Table/Row.tsx"() {
|
|
4588
4676
|
"use strict";
|
|
4589
|
-
|
|
4590
|
-
|
|
4677
|
+
import_dedupe52 = __toESM(require("classnames/dedupe"));
|
|
4678
|
+
import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4591
4679
|
Row = ({ ref, ...props }) => {
|
|
4592
|
-
const classes = (0,
|
|
4593
|
-
return /* @__PURE__ */ (0,
|
|
4680
|
+
const classes = (0, import_dedupe52.default)("mobius", "mobius-table__row", props.className);
|
|
4681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("tr", { ref, ...props, className: classes });
|
|
4594
4682
|
};
|
|
4595
4683
|
Row.displayName = "Table.Row";
|
|
4596
4684
|
}
|
|
4597
4685
|
});
|
|
4598
4686
|
|
|
4599
4687
|
// src/components/Table/HeaderCell.tsx
|
|
4600
|
-
var
|
|
4688
|
+
var import_dedupe53, import_jsx_runtime63, HeaderCell;
|
|
4601
4689
|
var init_HeaderCell = __esm({
|
|
4602
4690
|
"src/components/Table/HeaderCell.tsx"() {
|
|
4603
4691
|
"use strict";
|
|
4604
|
-
|
|
4605
|
-
|
|
4692
|
+
import_dedupe53 = __toESM(require("classnames/dedupe"));
|
|
4693
|
+
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4606
4694
|
HeaderCell = ({ ref, ...props }) => {
|
|
4607
|
-
const classes = (0,
|
|
4695
|
+
const classes = (0, import_dedupe53.default)(
|
|
4608
4696
|
"mobius",
|
|
4609
4697
|
"mobius-table__head-cell",
|
|
4610
4698
|
props.className
|
|
4611
4699
|
);
|
|
4612
|
-
return /* @__PURE__ */ (0,
|
|
4700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("th", { ...props, ref, className: classes });
|
|
4613
4701
|
};
|
|
4614
4702
|
HeaderCell.displayName = "Table.HeaderCell";
|
|
4615
4703
|
}
|
|
4616
4704
|
});
|
|
4617
4705
|
|
|
4618
4706
|
// src/components/Table/Cell.tsx
|
|
4619
|
-
var
|
|
4707
|
+
var import_dedupe54, import_jsx_runtime64, Cell;
|
|
4620
4708
|
var init_Cell = __esm({
|
|
4621
4709
|
"src/components/Table/Cell.tsx"() {
|
|
4622
4710
|
"use strict";
|
|
4623
|
-
|
|
4624
|
-
|
|
4711
|
+
import_dedupe54 = __toESM(require("classnames/dedupe"));
|
|
4712
|
+
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4625
4713
|
Cell = ({ ref, ...props }) => {
|
|
4626
|
-
const classes = (0,
|
|
4714
|
+
const classes = (0, import_dedupe54.default)(
|
|
4627
4715
|
"mobius",
|
|
4628
4716
|
"mobius-table__body-cell",
|
|
4629
4717
|
props.className
|
|
4630
4718
|
);
|
|
4631
|
-
return /* @__PURE__ */ (0,
|
|
4719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("td", { ref, ...props, className: classes });
|
|
4632
4720
|
};
|
|
4633
4721
|
Cell.displayName = "Table.Cell";
|
|
4634
4722
|
}
|
|
@@ -4658,37 +4746,6 @@ var init_Table2 = __esm({
|
|
|
4658
4746
|
}
|
|
4659
4747
|
});
|
|
4660
4748
|
|
|
4661
|
-
// src/components/Text/Text.tsx
|
|
4662
|
-
var import_dedupe54, import_Text, import_jsx_runtime63, getElementType, Text;
|
|
4663
|
-
var init_Text = __esm({
|
|
4664
|
-
"src/components/Text/Text.tsx"() {
|
|
4665
|
-
"use strict";
|
|
4666
|
-
import_dedupe54 = __toESM(require("classnames/dedupe"));
|
|
4667
|
-
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
4668
|
-
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4669
|
-
getElementType = (variant, elementType) => {
|
|
4670
|
-
if (variant) {
|
|
4671
|
-
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
4672
|
-
}
|
|
4673
|
-
return elementType || "p";
|
|
4674
|
-
};
|
|
4675
|
-
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
4676
|
-
const { variant, className, spacing, ...otherProps } = props;
|
|
4677
|
-
const elementType = getElementType(variant, Component);
|
|
4678
|
-
const variantType = variant || elementType;
|
|
4679
|
-
const classes = (0, import_dedupe54.default)(
|
|
4680
|
-
"mobius",
|
|
4681
|
-
"mobius-text",
|
|
4682
|
-
{ [`--is-${variantType}`]: variantType },
|
|
4683
|
-
{ [`--has-line-height-${spacing}`]: spacing },
|
|
4684
|
-
className
|
|
4685
|
-
);
|
|
4686
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
4687
|
-
};
|
|
4688
|
-
Text.displayName = "Text";
|
|
4689
|
-
}
|
|
4690
|
-
});
|
|
4691
|
-
|
|
4692
4749
|
// src/components/Text/index.tsx
|
|
4693
4750
|
var init_Text2 = __esm({
|
|
4694
4751
|
"src/components/Text/index.tsx"() {
|
|
@@ -4698,12 +4755,12 @@ var init_Text2 = __esm({
|
|
|
4698
4755
|
});
|
|
4699
4756
|
|
|
4700
4757
|
// src/components/TextAreaInput/TextAreaInput.tsx
|
|
4701
|
-
var import_dedupe55,
|
|
4758
|
+
var import_dedupe55, import_jsx_runtime65, TextAreaInput;
|
|
4702
4759
|
var init_TextAreaInput = __esm({
|
|
4703
4760
|
"src/components/TextAreaInput/TextAreaInput.tsx"() {
|
|
4704
4761
|
"use strict";
|
|
4705
4762
|
import_dedupe55 = __toESM(require("classnames/dedupe"));
|
|
4706
|
-
|
|
4763
|
+
import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4707
4764
|
TextAreaInput = ({ ref, ...props }) => {
|
|
4708
4765
|
const { isSelected, isDisabled, isReadOnly, isRequired, ...otherProps } = props;
|
|
4709
4766
|
const classes = (0, import_dedupe55.default)(
|
|
@@ -4716,7 +4773,7 @@ var init_TextAreaInput = __esm({
|
|
|
4716
4773
|
},
|
|
4717
4774
|
otherProps.className
|
|
4718
4775
|
);
|
|
4719
|
-
return /* @__PURE__ */ (0,
|
|
4776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4720
4777
|
"textarea",
|
|
4721
4778
|
{
|
|
4722
4779
|
ref,
|
|
@@ -4740,7 +4797,7 @@ var init_TextAreaInput2 = __esm({
|
|
|
4740
4797
|
});
|
|
4741
4798
|
|
|
4742
4799
|
// src/components/TextArea/TextArea.tsx
|
|
4743
|
-
var import_dedupe56, import_TextArea,
|
|
4800
|
+
var import_dedupe56, import_TextArea, import_jsx_runtime66, TextArea;
|
|
4744
4801
|
var init_TextArea = __esm({
|
|
4745
4802
|
"src/components/TextArea/TextArea.tsx"() {
|
|
4746
4803
|
"use strict";
|
|
@@ -4752,7 +4809,7 @@ var init_TextArea = __esm({
|
|
|
4752
4809
|
init_Stack2();
|
|
4753
4810
|
init_TextAreaInput2();
|
|
4754
4811
|
import_TextArea = require("@simplybusiness/mobius/src/components/TextArea/TextArea.css");
|
|
4755
|
-
|
|
4812
|
+
import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4756
4813
|
TextArea = ({ ref, ...props }) => {
|
|
4757
4814
|
const {
|
|
4758
4815
|
isDisabled,
|
|
@@ -4772,9 +4829,9 @@ var init_TextArea = __esm({
|
|
|
4772
4829
|
},
|
|
4773
4830
|
validationClasses
|
|
4774
4831
|
);
|
|
4775
|
-
return /* @__PURE__ */ (0,
|
|
4776
|
-
label && /* @__PURE__ */ (0,
|
|
4777
|
-
/* @__PURE__ */ (0,
|
|
4832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Stack, { className: classes, gap: "xs", children: [
|
|
4833
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Label, { ...labelProps, className: labelClasses, children: props.label }),
|
|
4834
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4778
4835
|
TextAreaInput,
|
|
4779
4836
|
{
|
|
4780
4837
|
...otherProps,
|
|
@@ -4785,7 +4842,7 @@ var init_TextArea = __esm({
|
|
|
4785
4842
|
"aria-invalid": errorMessage != null
|
|
4786
4843
|
}
|
|
4787
4844
|
),
|
|
4788
|
-
/* @__PURE__ */ (0,
|
|
4845
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorMessage, { ...errorMessageProps, errorMessage })
|
|
4789
4846
|
] });
|
|
4790
4847
|
};
|
|
4791
4848
|
TextArea.displayName = "TextArea";
|
|
@@ -4800,53 +4857,6 @@ var init_TextArea2 = __esm({
|
|
|
4800
4857
|
}
|
|
4801
4858
|
});
|
|
4802
4859
|
|
|
4803
|
-
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
4804
|
-
var import_react40, import_jsx_runtime66, isHTML, TextOrHTML;
|
|
4805
|
-
var init_TextOrHTML = __esm({
|
|
4806
|
-
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
4807
|
-
"use strict";
|
|
4808
|
-
import_react40 = require("react");
|
|
4809
|
-
init_Text();
|
|
4810
|
-
import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4811
|
-
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
4812
|
-
TextOrHTML = ({
|
|
4813
|
-
ref,
|
|
4814
|
-
text,
|
|
4815
|
-
htmlClassName,
|
|
4816
|
-
htmlElementType,
|
|
4817
|
-
textWrapper = false,
|
|
4818
|
-
autoDetect = false,
|
|
4819
|
-
...textProps
|
|
4820
|
-
}) => {
|
|
4821
|
-
const textIsHTML = autoDetect && isHTML(text);
|
|
4822
|
-
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
4823
|
-
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
4824
|
-
const DangerousComponent = resolvedElementType;
|
|
4825
|
-
const dangerousHTML = (0, import_react40.useMemo)(() => ({ __html: text }), [text]);
|
|
4826
|
-
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4827
|
-
DangerousComponent,
|
|
4828
|
-
{
|
|
4829
|
-
className: htmlClassName,
|
|
4830
|
-
dangerouslySetInnerHTML: dangerousHTML
|
|
4831
|
-
}
|
|
4832
|
-
);
|
|
4833
|
-
if (shouldWrapInText) {
|
|
4834
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
4835
|
-
}
|
|
4836
|
-
return dangerousElement;
|
|
4837
|
-
};
|
|
4838
|
-
TextOrHTML.displayName = "TextOrHTML";
|
|
4839
|
-
}
|
|
4840
|
-
});
|
|
4841
|
-
|
|
4842
|
-
// src/components/TextOrHTML/index.tsx
|
|
4843
|
-
var init_TextOrHTML2 = __esm({
|
|
4844
|
-
"src/components/TextOrHTML/index.tsx"() {
|
|
4845
|
-
"use strict";
|
|
4846
|
-
init_TextOrHTML();
|
|
4847
|
-
}
|
|
4848
|
-
});
|
|
4849
|
-
|
|
4850
4860
|
// src/components/Title/Title.tsx
|
|
4851
4861
|
var import_dedupe57, import_Title, import_jsx_runtime67, Title;
|
|
4852
4862
|
var init_Title = __esm({
|