@simplybusiness/mobius 10.1.1 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/components/AddressLookup/AddressLookup.js +540 -526
- package/dist/cjs/components/AddressLookup/AddressLookup.js.map +4 -4
- package/dist/cjs/components/AddressLookup/index.js +540 -526
- package/dist/cjs/components/AddressLookup/index.js.map +4 -4
- package/dist/cjs/components/Alert/Alert.js +79 -11
- package/dist/cjs/components/Alert/Alert.js.map +4 -4
- package/dist/cjs/components/Alert/index.js +79 -11
- package/dist/cjs/components/Alert/index.js.map +4 -4
- package/dist/cjs/components/Checkbox/Checkbox.js +506 -492
- package/dist/cjs/components/Checkbox/Checkbox.js.map +4 -4
- package/dist/cjs/components/Checkbox/CheckboxGroup.js +506 -492
- package/dist/cjs/components/Checkbox/CheckboxGroup.js.map +4 -4
- package/dist/cjs/components/Checkbox/index.js +485 -471
- package/dist/cjs/components/Checkbox/index.js.map +4 -4
- package/dist/cjs/components/Combobox/Combobox.js +540 -526
- package/dist/cjs/components/Combobox/Combobox.js.map +4 -4
- package/dist/cjs/components/Combobox/index.js +540 -526
- package/dist/cjs/components/Combobox/index.js.map +4 -4
- package/dist/cjs/components/DateField/DateField.js +527 -513
- package/dist/cjs/components/DateField/DateField.js.map +4 -4
- package/dist/cjs/components/DateField/index.js +527 -513
- package/dist/cjs/components/DateField/index.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js +527 -513
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/index.js +527 -513
- package/dist/cjs/components/ErrorMessage/index.js.map +4 -4
- package/dist/cjs/components/ExpandableText/ExpandableText.js +527 -513
- package/dist/cjs/components/ExpandableText/ExpandableText.js.map +4 -4
- package/dist/cjs/components/ExpandableText/index.js +527 -513
- package/dist/cjs/components/ExpandableText/index.js.map +4 -4
- package/dist/cjs/components/MaskedField/MaskedField.js +537 -523
- package/dist/cjs/components/MaskedField/MaskedField.js.map +4 -4
- package/dist/cjs/components/MaskedField/index.js +537 -523
- package/dist/cjs/components/MaskedField/index.js.map +4 -4
- package/dist/cjs/components/NumberField/NumberField.js +528 -514
- package/dist/cjs/components/NumberField/NumberField.js.map +4 -4
- package/dist/cjs/components/NumberField/index.js +528 -514
- package/dist/cjs/components/NumberField/index.js.map +4 -4
- package/dist/cjs/components/PasswordField/PasswordField.js +524 -510
- package/dist/cjs/components/PasswordField/PasswordField.js.map +4 -4
- package/dist/cjs/components/PasswordField/ShowHideButton.js +523 -509
- package/dist/cjs/components/PasswordField/ShowHideButton.js.map +4 -4
- package/dist/cjs/components/PasswordField/index.js +524 -510
- package/dist/cjs/components/PasswordField/index.js.map +4 -4
- package/dist/cjs/components/Radio/Radio.js +506 -492
- package/dist/cjs/components/Radio/Radio.js.map +4 -4
- package/dist/cjs/components/Radio/RadioGroup.js +505 -491
- package/dist/cjs/components/Radio/RadioGroup.js.map +4 -4
- package/dist/cjs/components/Radio/index.js +484 -470
- package/dist/cjs/components/Radio/index.js.map +4 -4
- package/dist/cjs/components/Select/Select.js +511 -497
- package/dist/cjs/components/Select/Select.js.map +4 -4
- package/dist/cjs/components/Select/index.js +511 -497
- package/dist/cjs/components/Select/index.js.map +4 -4
- package/dist/cjs/components/TextArea/TextArea.js +521 -507
- package/dist/cjs/components/TextArea/TextArea.js.map +4 -4
- package/dist/cjs/components/TextArea/index.js +521 -507
- package/dist/cjs/components/TextArea/index.js.map +4 -4
- package/dist/cjs/components/TextField/TextField.js +537 -523
- package/dist/cjs/components/TextField/TextField.js.map +4 -4
- package/dist/cjs/components/TextField/index.js +537 -523
- package/dist/cjs/components/TextField/index.js.map +4 -4
- package/dist/cjs/components/index.js +567 -553
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/index.js +567 -553
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/meta.json +1372 -1305
- package/dist/esm/{chunk-FTSJNY4J.js → chunk-N5WGQAHM.js} +14 -2
- package/dist/esm/chunk-N5WGQAHM.js.map +7 -0
- package/dist/esm/{chunk-C4BILMFX.js → chunk-RR4UQSOZ.js} +5 -1
- package/dist/esm/chunk-RR4UQSOZ.js.map +7 -0
- package/dist/esm/components/AddressLookup/AddressLookup.js +2 -2
- package/dist/esm/components/AddressLookup/index.js +2 -2
- package/dist/esm/components/Alert/Alert.js +4 -1
- package/dist/esm/components/Alert/index.js +4 -1
- package/dist/esm/components/Checkbox/Checkbox.js +2 -2
- package/dist/esm/components/Checkbox/CheckboxGroup.js +2 -2
- package/dist/esm/components/Checkbox/index.js +2 -2
- package/dist/esm/components/Combobox/Combobox.js +2 -2
- package/dist/esm/components/Combobox/index.js +2 -2
- package/dist/esm/components/DateField/DateField.js +2 -2
- package/dist/esm/components/DateField/index.js +2 -2
- package/dist/esm/components/ErrorMessage/ErrorMessage.js +2 -2
- package/dist/esm/components/ErrorMessage/index.js +2 -2
- package/dist/esm/components/ExpandableText/ExpandableText.js +2 -2
- package/dist/esm/components/ExpandableText/index.js +2 -2
- package/dist/esm/components/MaskedField/MaskedField.js +2 -2
- package/dist/esm/components/MaskedField/index.js +2 -2
- package/dist/esm/components/NumberField/NumberField.js +2 -2
- package/dist/esm/components/NumberField/index.js +2 -2
- package/dist/esm/components/PasswordField/PasswordField.js +2 -2
- package/dist/esm/components/PasswordField/ShowHideButton.js +2 -2
- package/dist/esm/components/PasswordField/index.js +2 -2
- package/dist/esm/components/Radio/Radio.js +2 -2
- package/dist/esm/components/Radio/RadioGroup.js +2 -2
- package/dist/esm/components/Radio/index.js +2 -2
- package/dist/esm/components/Select/Select.js +2 -2
- package/dist/esm/components/Select/index.js +2 -2
- package/dist/esm/components/TextArea/TextArea.js +2 -2
- package/dist/esm/components/TextArea/index.js +2 -2
- package/dist/esm/components/TextField/TextField.js +2 -2
- package/dist/esm/components/TextField/index.js +2 -2
- package/dist/esm/components/index.js +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/meta.json +164 -131
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/AddressLookup/AddressLookup.test.tsx +76 -0
- package/src/components/AddressLookup/AddressLookup.tsx +9 -0
- package/src/components/Alert/Alert.tsx +10 -1
- package/src/components/Drawer/Drawer.css +24 -3
- package/src/components/Modal/Modal.css +42 -3
- package/dist/esm/chunk-C4BILMFX.js.map +0 -7
- package/dist/esm/chunk-FTSJNY4J.js.map +0 -7
|
@@ -2148,6 +2148,10 @@ var init_AddressLookup = __esm({
|
|
|
2148
2148
|
);
|
|
2149
2149
|
const handleSelected = (selected) => {
|
|
2150
2150
|
setError(null);
|
|
2151
|
+
const isEmpty = typeof selected === "string" ? selected === "" : !selected.id && !selected.value;
|
|
2152
|
+
if (isEmpty) {
|
|
2153
|
+
return Promise.resolve();
|
|
2154
|
+
}
|
|
2151
2155
|
if (typeof selected === "string" || !selected.id) {
|
|
2152
2156
|
setError(new Error("Selected option missing id"));
|
|
2153
2157
|
return Promise.resolve();
|
|
@@ -2195,19 +2199,98 @@ var init_AddressLookup2 = __esm({
|
|
|
2195
2199
|
}
|
|
2196
2200
|
});
|
|
2197
2201
|
|
|
2202
|
+
// src/components/Text/Text.tsx
|
|
2203
|
+
var import_dedupe14, import_Text, import_jsx_runtime15, getElementType, Text;
|
|
2204
|
+
var init_Text = __esm({
|
|
2205
|
+
"src/components/Text/Text.tsx"() {
|
|
2206
|
+
"use strict";
|
|
2207
|
+
import_dedupe14 = __toESM(require("classnames/dedupe"));
|
|
2208
|
+
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
2209
|
+
import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2210
|
+
getElementType = (variant, elementType) => {
|
|
2211
|
+
if (variant) {
|
|
2212
|
+
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
2213
|
+
}
|
|
2214
|
+
return elementType || "p";
|
|
2215
|
+
};
|
|
2216
|
+
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
2217
|
+
const { variant, className, spacing, ...otherProps } = props;
|
|
2218
|
+
const elementType = getElementType(variant, Component);
|
|
2219
|
+
const variantType = variant || elementType;
|
|
2220
|
+
const classes = (0, import_dedupe14.default)(
|
|
2221
|
+
"mobius",
|
|
2222
|
+
"mobius-text",
|
|
2223
|
+
{ [`--is-${variantType}`]: variantType },
|
|
2224
|
+
{ [`--has-line-height-${spacing}`]: spacing },
|
|
2225
|
+
className
|
|
2226
|
+
);
|
|
2227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
2228
|
+
};
|
|
2229
|
+
Text.displayName = "Text";
|
|
2230
|
+
}
|
|
2231
|
+
});
|
|
2232
|
+
|
|
2233
|
+
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
2234
|
+
var import_react15, import_jsx_runtime16, isHTML, TextOrHTML;
|
|
2235
|
+
var init_TextOrHTML = __esm({
|
|
2236
|
+
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
2237
|
+
"use strict";
|
|
2238
|
+
import_react15 = require("react");
|
|
2239
|
+
init_Text();
|
|
2240
|
+
import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2241
|
+
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
2242
|
+
TextOrHTML = ({
|
|
2243
|
+
ref,
|
|
2244
|
+
text,
|
|
2245
|
+
htmlClassName,
|
|
2246
|
+
htmlElementType,
|
|
2247
|
+
textWrapper = false,
|
|
2248
|
+
autoDetect = false,
|
|
2249
|
+
...textProps
|
|
2250
|
+
}) => {
|
|
2251
|
+
const textIsHTML = autoDetect && isHTML(text);
|
|
2252
|
+
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
2253
|
+
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
2254
|
+
const DangerousComponent = resolvedElementType;
|
|
2255
|
+
const dangerousHTML = (0, import_react15.useMemo)(() => ({ __html: text }), [text]);
|
|
2256
|
+
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2257
|
+
DangerousComponent,
|
|
2258
|
+
{
|
|
2259
|
+
className: htmlClassName,
|
|
2260
|
+
dangerouslySetInnerHTML: dangerousHTML
|
|
2261
|
+
}
|
|
2262
|
+
);
|
|
2263
|
+
if (shouldWrapInText) {
|
|
2264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
2265
|
+
}
|
|
2266
|
+
return dangerousElement;
|
|
2267
|
+
};
|
|
2268
|
+
TextOrHTML.displayName = "TextOrHTML";
|
|
2269
|
+
}
|
|
2270
|
+
});
|
|
2271
|
+
|
|
2272
|
+
// src/components/TextOrHTML/index.tsx
|
|
2273
|
+
var init_TextOrHTML2 = __esm({
|
|
2274
|
+
"src/components/TextOrHTML/index.tsx"() {
|
|
2275
|
+
"use strict";
|
|
2276
|
+
init_TextOrHTML();
|
|
2277
|
+
}
|
|
2278
|
+
});
|
|
2279
|
+
|
|
2198
2280
|
// src/components/Alert/Alert.tsx
|
|
2199
2281
|
function isAlertVariant(value) {
|
|
2200
2282
|
return value === "info" || value === "success" || value === "warning" || value === "error";
|
|
2201
2283
|
}
|
|
2202
|
-
var import_icons3,
|
|
2284
|
+
var import_icons3, import_dedupe15, import_Alert, import_jsx_runtime17, Alert;
|
|
2203
2285
|
var init_Alert = __esm({
|
|
2204
2286
|
"src/components/Alert/Alert.tsx"() {
|
|
2205
2287
|
"use strict";
|
|
2206
2288
|
import_icons3 = require("@simplybusiness/icons");
|
|
2207
|
-
|
|
2289
|
+
import_dedupe15 = __toESM(require("classnames/dedupe"));
|
|
2208
2290
|
init_Icon2();
|
|
2291
|
+
init_TextOrHTML2();
|
|
2209
2292
|
import_Alert = require("@simplybusiness/mobius/src/components/Alert/Alert.css");
|
|
2210
|
-
|
|
2293
|
+
import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2211
2294
|
Alert = ({ ref, ...props }) => {
|
|
2212
2295
|
const {
|
|
2213
2296
|
elementType: Element = "div",
|
|
@@ -2220,7 +2303,7 @@ var init_Alert = __esm({
|
|
|
2220
2303
|
if (!show) return null;
|
|
2221
2304
|
const variant = variantProp && isAlertVariant(variantProp) ? variantProp : "info";
|
|
2222
2305
|
const colorValue = variant === "success" ? `var(--color-valid)` : `var(--color-${variant})`;
|
|
2223
|
-
const classes = (0,
|
|
2306
|
+
const classes = (0, import_dedupe15.default)(
|
|
2224
2307
|
"mobius",
|
|
2225
2308
|
"mobius-alert",
|
|
2226
2309
|
{
|
|
@@ -2238,14 +2321,23 @@ var init_Alert = __esm({
|
|
|
2238
2321
|
warning: import_icons3.warning,
|
|
2239
2322
|
error: import_icons3.error
|
|
2240
2323
|
};
|
|
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
|
-
|
|
2324
|
+
const headerClasses = (0, import_dedupe15.default)("mobius", "mobius-alert__header");
|
|
2325
|
+
const iconClasses = (0, import_dedupe15.default)("mobius", "mobius-alert__icon");
|
|
2326
|
+
const contentClasses = (0, import_dedupe15.default)("mobius", "mobius-alert__content");
|
|
2327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Element, { ref, role: "alert", ...otherProps, className: classes, children: [
|
|
2328
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { icon: icon[variant], color: colorValue }) }),
|
|
2329
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
2330
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2331
|
+
TextOrHTML,
|
|
2332
|
+
{
|
|
2333
|
+
autoDetect: true,
|
|
2334
|
+
htmlElementType: "span",
|
|
2335
|
+
className: headerClasses,
|
|
2336
|
+
htmlClassName: headerClasses,
|
|
2337
|
+
text: header
|
|
2338
|
+
}
|
|
2339
|
+
),
|
|
2340
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: contentClasses, children })
|
|
2249
2341
|
] })
|
|
2250
2342
|
] });
|
|
2251
2343
|
};
|
|
@@ -2262,14 +2354,14 @@ var init_Alert2 = __esm({
|
|
|
2262
2354
|
});
|
|
2263
2355
|
|
|
2264
2356
|
// src/components/Box/Box.tsx
|
|
2265
|
-
var
|
|
2357
|
+
var import_dedupe16, import_Box, import_jsx_runtime18, Box;
|
|
2266
2358
|
var init_Box = __esm({
|
|
2267
2359
|
"src/components/Box/Box.tsx"() {
|
|
2268
2360
|
"use strict";
|
|
2269
|
-
|
|
2361
|
+
import_dedupe16 = __toESM(require("classnames/dedupe"));
|
|
2270
2362
|
init_utils();
|
|
2271
2363
|
import_Box = require("@simplybusiness/mobius/src/components/Box/Box.css");
|
|
2272
|
-
|
|
2364
|
+
import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2273
2365
|
Box = ({ ref, ...props }) => {
|
|
2274
2366
|
const {
|
|
2275
2367
|
elementType: Element = "div",
|
|
@@ -2295,7 +2387,7 @@ var init_Box = __esm({
|
|
|
2295
2387
|
style,
|
|
2296
2388
|
...otherProps
|
|
2297
2389
|
} = props;
|
|
2298
|
-
const classes = (0,
|
|
2390
|
+
const classes = (0, import_dedupe16.default)("mobius", "mobius-box", otherProps.className);
|
|
2299
2391
|
const styleProps = filterUndefinedProps({
|
|
2300
2392
|
padding: getSpacingValue(padding),
|
|
2301
2393
|
paddingInline: getSpacingValue(paddingInline || paddingX),
|
|
@@ -2312,7 +2404,7 @@ var init_Box = __esm({
|
|
|
2312
2404
|
height,
|
|
2313
2405
|
...style
|
|
2314
2406
|
});
|
|
2315
|
-
return /* @__PURE__ */ (0,
|
|
2407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Element, { ref, style: styleProps, ...otherProps, className: classes });
|
|
2316
2408
|
};
|
|
2317
2409
|
Box.displayName = "Box";
|
|
2318
2410
|
}
|
|
@@ -2327,27 +2419,27 @@ var init_Box2 = __esm({
|
|
|
2327
2419
|
});
|
|
2328
2420
|
|
|
2329
2421
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
2330
|
-
var
|
|
2422
|
+
var import_react16, import_dedupe17, import_Breadcrumbs, import_jsx_runtime19, Breadcrumbs;
|
|
2331
2423
|
var init_Breadcrumbs = __esm({
|
|
2332
2424
|
"src/components/Breadcrumbs/Breadcrumbs.tsx"() {
|
|
2333
2425
|
"use strict";
|
|
2334
2426
|
"use client";
|
|
2335
|
-
|
|
2336
|
-
|
|
2427
|
+
import_react16 = require("react");
|
|
2428
|
+
import_dedupe17 = __toESM(require("classnames/dedupe"));
|
|
2337
2429
|
import_Breadcrumbs = require("@simplybusiness/mobius/src/components/Breadcrumbs/Breadcrumbs.css");
|
|
2338
|
-
|
|
2430
|
+
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2339
2431
|
Breadcrumbs = ({ ref, ...props }) => {
|
|
2340
2432
|
const { "aria-label": ariaLabel = "Breadcrumbs" } = props;
|
|
2341
2433
|
const { navProps } = { navProps: { "aria-label": ariaLabel } };
|
|
2342
2434
|
const { children, ...otherProps } = props;
|
|
2343
|
-
const childArray =
|
|
2344
|
-
const classes = (0,
|
|
2435
|
+
const childArray = import_react16.Children.toArray(children);
|
|
2436
|
+
const classes = (0, import_dedupe17.default)(
|
|
2345
2437
|
"mobius",
|
|
2346
2438
|
"mobius-breadcrumb",
|
|
2347
2439
|
otherProps.className
|
|
2348
2440
|
);
|
|
2349
|
-
return /* @__PURE__ */ (0,
|
|
2350
|
-
(child, i) => (0,
|
|
2441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("nav", { ref, ...otherProps, ...navProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("ul", { children: childArray.map(
|
|
2442
|
+
(child, i) => (0, import_react16.cloneElement)(
|
|
2351
2443
|
child,
|
|
2352
2444
|
{
|
|
2353
2445
|
key: i,
|
|
@@ -2361,22 +2453,22 @@ var init_Breadcrumbs = __esm({
|
|
|
2361
2453
|
});
|
|
2362
2454
|
|
|
2363
2455
|
// src/components/Breadcrumbs/BreadcrumbItem.tsx
|
|
2364
|
-
var
|
|
2456
|
+
var import_react17, import_dedupe18, import_jsx_runtime20, BreadcrumbItem;
|
|
2365
2457
|
var init_BreadcrumbItem = __esm({
|
|
2366
2458
|
"src/components/Breadcrumbs/BreadcrumbItem.tsx"() {
|
|
2367
2459
|
"use strict";
|
|
2368
2460
|
"use client";
|
|
2369
|
-
|
|
2370
|
-
|
|
2461
|
+
import_react17 = require("react");
|
|
2462
|
+
import_dedupe18 = __toESM(require("classnames/dedupe"));
|
|
2371
2463
|
init_Box2();
|
|
2372
|
-
|
|
2464
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2373
2465
|
BreadcrumbItem = ({ ref, ...props }) => {
|
|
2374
2466
|
const {
|
|
2375
2467
|
isDisabled = false,
|
|
2376
2468
|
isCurrent = false,
|
|
2377
2469
|
"aria-current": ariaCurrent = "page",
|
|
2378
2470
|
children,
|
|
2379
|
-
separator = /* @__PURE__ */ (0,
|
|
2471
|
+
separator = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box, { className: "mobius-breadcrumb__separator", "aria-hidden": "true", children: ">" }),
|
|
2380
2472
|
...otherProps
|
|
2381
2473
|
} = props;
|
|
2382
2474
|
const { itemProps } = {
|
|
@@ -2386,14 +2478,14 @@ var init_BreadcrumbItem = __esm({
|
|
|
2386
2478
|
...otherProps
|
|
2387
2479
|
}
|
|
2388
2480
|
};
|
|
2389
|
-
const classes = (0,
|
|
2481
|
+
const classes = (0, import_dedupe18.default)(
|
|
2390
2482
|
"mobius",
|
|
2391
2483
|
"mobius-breadcrumb__item",
|
|
2392
2484
|
props.className
|
|
2393
2485
|
);
|
|
2394
|
-
const child = typeof children === "string" ? /* @__PURE__ */ (0,
|
|
2395
|
-
return /* @__PURE__ */ (0,
|
|
2396
|
-
(0,
|
|
2486
|
+
const child = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { ...itemProps, children }) : import_react17.Children.only(children);
|
|
2487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("li", { className: classes, children: [
|
|
2488
|
+
(0, import_react17.cloneElement)(child, {
|
|
2397
2489
|
...child.props,
|
|
2398
2490
|
...itemProps,
|
|
2399
2491
|
ref
|
|
@@ -2415,19 +2507,19 @@ var init_Breadcrumbs2 = __esm({
|
|
|
2415
2507
|
});
|
|
2416
2508
|
|
|
2417
2509
|
// src/components/Button/Loading.tsx
|
|
2418
|
-
var import_icons4,
|
|
2510
|
+
var import_icons4, import_jsx_runtime21, Loading;
|
|
2419
2511
|
var init_Loading = __esm({
|
|
2420
2512
|
"src/components/Button/Loading.tsx"() {
|
|
2421
2513
|
"use strict";
|
|
2422
2514
|
import_icons4 = require("@simplybusiness/icons");
|
|
2423
2515
|
init_Icon2();
|
|
2424
2516
|
init_VisuallyHidden2();
|
|
2425
|
-
|
|
2517
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2426
2518
|
Loading = (props) => {
|
|
2427
2519
|
const { children } = props;
|
|
2428
|
-
return /* @__PURE__ */ (0,
|
|
2429
|
-
/* @__PURE__ */ (0,
|
|
2430
|
-
/* @__PURE__ */ (0,
|
|
2520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
2521
|
+
/* @__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" }) }),
|
|
2522
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(VisuallyHidden, { className: "mobius-button__loading-text", children: "Loading" }),
|
|
2431
2523
|
children
|
|
2432
2524
|
] });
|
|
2433
2525
|
};
|
|
@@ -2435,33 +2527,33 @@ var init_Loading = __esm({
|
|
|
2435
2527
|
});
|
|
2436
2528
|
|
|
2437
2529
|
// src/components/Button/Success.tsx
|
|
2438
|
-
var import_icons5,
|
|
2530
|
+
var import_icons5, import_jsx_runtime22, Success;
|
|
2439
2531
|
var init_Success = __esm({
|
|
2440
2532
|
"src/components/Button/Success.tsx"() {
|
|
2441
2533
|
"use strict";
|
|
2442
2534
|
import_icons5 = require("@simplybusiness/icons");
|
|
2443
2535
|
init_Icon2();
|
|
2444
2536
|
init_VisuallyHidden2();
|
|
2445
|
-
|
|
2446
|
-
Success = () => /* @__PURE__ */ (0,
|
|
2447
|
-
/* @__PURE__ */ (0,
|
|
2448
|
-
/* @__PURE__ */ (0,
|
|
2537
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2538
|
+
Success = () => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
2539
|
+
/* @__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" }) }),
|
|
2540
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(VisuallyHidden, { className: "mobius-button__success-text", children: "Success" })
|
|
2449
2541
|
] });
|
|
2450
2542
|
}
|
|
2451
2543
|
});
|
|
2452
2544
|
|
|
2453
2545
|
// src/components/Button/Button.tsx
|
|
2454
|
-
var
|
|
2546
|
+
var import_dedupe19, import_Button, import_jsx_runtime23, Button;
|
|
2455
2547
|
var init_Button = __esm({
|
|
2456
2548
|
"src/components/Button/Button.tsx"() {
|
|
2457
2549
|
"use strict";
|
|
2458
2550
|
"use client";
|
|
2459
|
-
|
|
2551
|
+
import_dedupe19 = __toESM(require("classnames/dedupe"));
|
|
2460
2552
|
init_Loading();
|
|
2461
2553
|
init_useButton2();
|
|
2462
2554
|
init_Success();
|
|
2463
2555
|
import_Button = require("@simplybusiness/mobius/src/components/Button/Button.css");
|
|
2464
|
-
|
|
2556
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2465
2557
|
Button = ({ ref, ...props }) => {
|
|
2466
2558
|
const {
|
|
2467
2559
|
children,
|
|
@@ -2476,7 +2568,7 @@ var init_Button = __esm({
|
|
|
2476
2568
|
...otherProps
|
|
2477
2569
|
} = props;
|
|
2478
2570
|
const { buttonProps } = useButton(props);
|
|
2479
|
-
otherProps.className = (0,
|
|
2571
|
+
otherProps.className = (0, import_dedupe19.default)(
|
|
2480
2572
|
"mobius",
|
|
2481
2573
|
"mobius-button",
|
|
2482
2574
|
`--variant-${variant}`,
|
|
@@ -2488,9 +2580,9 @@ var init_Button = __esm({
|
|
|
2488
2580
|
},
|
|
2489
2581
|
otherProps.className
|
|
2490
2582
|
);
|
|
2491
|
-
return /* @__PURE__ */ (0,
|
|
2492
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
2493
|
-
isSuccess && !isLoading && /* @__PURE__ */ (0,
|
|
2583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Component, { ref, ...buttonProps, ...otherProps, children: [
|
|
2584
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Loading, { children }) : children,
|
|
2585
|
+
isSuccess && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Success, {})
|
|
2494
2586
|
] });
|
|
2495
2587
|
};
|
|
2496
2588
|
Button.displayName = "Button";
|
|
@@ -2506,13 +2598,13 @@ var init_Button2 = __esm({
|
|
|
2506
2598
|
});
|
|
2507
2599
|
|
|
2508
2600
|
// src/components/Checkbox/Checkbox.tsx
|
|
2509
|
-
var
|
|
2601
|
+
var import_react18, import_dedupe20, import_icons6, import_Checkbox, import_jsx_runtime24, Checkbox;
|
|
2510
2602
|
var init_Checkbox = __esm({
|
|
2511
2603
|
"src/components/Checkbox/Checkbox.tsx"() {
|
|
2512
2604
|
"use strict";
|
|
2513
2605
|
"use client";
|
|
2514
|
-
|
|
2515
|
-
|
|
2606
|
+
import_react18 = require("react");
|
|
2607
|
+
import_dedupe20 = __toESM(require("classnames/dedupe"));
|
|
2516
2608
|
import_icons6 = require("@simplybusiness/icons");
|
|
2517
2609
|
init_ErrorMessage2();
|
|
2518
2610
|
init_spaceDelimitedList();
|
|
@@ -2520,7 +2612,7 @@ var init_Checkbox = __esm({
|
|
|
2520
2612
|
init_Icon2();
|
|
2521
2613
|
init_Stack2();
|
|
2522
2614
|
import_Checkbox = require("@simplybusiness/mobius/src/components/Checkbox/Checkbox.css");
|
|
2523
|
-
|
|
2615
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2524
2616
|
Checkbox = ({ ref, ...props }) => {
|
|
2525
2617
|
const {
|
|
2526
2618
|
id,
|
|
@@ -2540,18 +2632,18 @@ var init_Checkbox = __esm({
|
|
|
2540
2632
|
["aria-describedby"]: ariaDescribedBy,
|
|
2541
2633
|
...rest
|
|
2542
2634
|
} = props;
|
|
2543
|
-
const [checked, setChecked] = (0,
|
|
2544
|
-
const fallbackRef = (0,
|
|
2635
|
+
const [checked, setChecked] = (0, import_react18.useState)(defaultSelected);
|
|
2636
|
+
const fallbackRef = (0, import_react18.useRef)(null);
|
|
2545
2637
|
const refObj = ref || fallbackRef;
|
|
2546
|
-
const inputId = (0,
|
|
2638
|
+
const inputId = (0, import_react18.useId)();
|
|
2547
2639
|
const isControlled = typeof selected === "boolean";
|
|
2548
|
-
(0,
|
|
2640
|
+
(0, import_react18.useEffect)(() => {
|
|
2549
2641
|
if (isControlled) {
|
|
2550
2642
|
setChecked(selected);
|
|
2551
2643
|
}
|
|
2552
2644
|
}, [selected, isControlled]);
|
|
2553
2645
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
2554
|
-
const sharedClasses = (0,
|
|
2646
|
+
const sharedClasses = (0, import_dedupe20.default)(
|
|
2555
2647
|
{
|
|
2556
2648
|
"--is-disabled": isDisabled,
|
|
2557
2649
|
"--is-selected": checked,
|
|
@@ -2560,31 +2652,31 @@ var init_Checkbox = __esm({
|
|
|
2560
2652
|
},
|
|
2561
2653
|
validationClasses
|
|
2562
2654
|
);
|
|
2563
|
-
const wrapperClasses = (0,
|
|
2655
|
+
const wrapperClasses = (0, import_dedupe20.default)(
|
|
2564
2656
|
"mobius",
|
|
2565
2657
|
"mobius-checkbox",
|
|
2566
2658
|
sharedClasses,
|
|
2567
2659
|
className
|
|
2568
2660
|
);
|
|
2569
|
-
const labelClasses = (0,
|
|
2570
|
-
const inputClasses = (0,
|
|
2571
|
-
const iconClasses = (0,
|
|
2572
|
-
const errorMessageId = (0,
|
|
2661
|
+
const labelClasses = (0, import_dedupe20.default)("mobius-checkbox__label", sharedClasses);
|
|
2662
|
+
const inputClasses = (0, import_dedupe20.default)("mobius-checkbox__input", sharedClasses);
|
|
2663
|
+
const iconClasses = (0, import_dedupe20.default)("mobius-checkbox__icon", sharedClasses);
|
|
2664
|
+
const errorMessageId = (0, import_react18.useId)();
|
|
2573
2665
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
2574
2666
|
const describedBy = spaceDelimitedList([
|
|
2575
2667
|
shouldErrorMessageShow,
|
|
2576
2668
|
ariaDescribedBy
|
|
2577
2669
|
]);
|
|
2578
|
-
const labelId = (0,
|
|
2670
|
+
const labelId = (0, import_react18.useId)();
|
|
2579
2671
|
const handleChange = (event) => {
|
|
2580
2672
|
setChecked(!checked);
|
|
2581
2673
|
if (onChange) {
|
|
2582
2674
|
onChange(event, isLastItem);
|
|
2583
2675
|
}
|
|
2584
2676
|
};
|
|
2585
|
-
return /* @__PURE__ */ (0,
|
|
2586
|
-
/* @__PURE__ */ (0,
|
|
2587
|
-
/* @__PURE__ */ (0,
|
|
2677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Stack, { gap: "xs", className: wrapperClasses, children: [
|
|
2678
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: labelClasses, children: [
|
|
2679
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2588
2680
|
"input",
|
|
2589
2681
|
{
|
|
2590
2682
|
"aria-describedby": describedBy,
|
|
@@ -2605,7 +2697,7 @@ var init_Checkbox = __esm({
|
|
|
2605
2697
|
...rest
|
|
2606
2698
|
}
|
|
2607
2699
|
),
|
|
2608
|
-
/* @__PURE__ */ (0,
|
|
2700
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2609
2701
|
Icon,
|
|
2610
2702
|
{
|
|
2611
2703
|
icon: checked ? import_icons6.squareTick : import_icons6.square,
|
|
@@ -2613,9 +2705,9 @@ var init_Checkbox = __esm({
|
|
|
2613
2705
|
className: iconClasses
|
|
2614
2706
|
}
|
|
2615
2707
|
),
|
|
2616
|
-
/* @__PURE__ */ (0,
|
|
2708
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { id: labelId, className: "mobius-checkbox__visible-label", children: label })
|
|
2617
2709
|
] }),
|
|
2618
|
-
/* @__PURE__ */ (0,
|
|
2710
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
2619
2711
|
] });
|
|
2620
2712
|
};
|
|
2621
2713
|
Checkbox.displayName = "Checkbox";
|
|
@@ -2623,20 +2715,20 @@ var init_Checkbox = __esm({
|
|
|
2623
2715
|
});
|
|
2624
2716
|
|
|
2625
2717
|
// src/components/Checkbox/CheckboxGroup.tsx
|
|
2626
|
-
var
|
|
2718
|
+
var import_dedupe21, import_react19, import_CheckboxGroup, import_jsx_runtime25, CheckboxGroup;
|
|
2627
2719
|
var init_CheckboxGroup = __esm({
|
|
2628
2720
|
"src/components/Checkbox/CheckboxGroup.tsx"() {
|
|
2629
2721
|
"use strict";
|
|
2630
2722
|
"use client";
|
|
2631
|
-
|
|
2632
|
-
|
|
2723
|
+
import_dedupe21 = __toESM(require("classnames/dedupe"));
|
|
2724
|
+
import_react19 = require("react");
|
|
2633
2725
|
init_hooks();
|
|
2634
2726
|
init_spaceDelimitedList();
|
|
2635
2727
|
init_ErrorMessage2();
|
|
2636
2728
|
init_Label2();
|
|
2637
2729
|
init_Checkbox();
|
|
2638
2730
|
import_CheckboxGroup = require("@simplybusiness/mobius/src/components/Checkbox/CheckboxGroup.css");
|
|
2639
|
-
|
|
2731
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2640
2732
|
CheckboxGroup = ({ ref, ...props }) => {
|
|
2641
2733
|
const {
|
|
2642
2734
|
label,
|
|
@@ -2654,10 +2746,10 @@ var init_CheckboxGroup = __esm({
|
|
|
2654
2746
|
lastItemDisables = false,
|
|
2655
2747
|
...rest
|
|
2656
2748
|
} = props;
|
|
2657
|
-
const [selected, setSelected] = (0,
|
|
2658
|
-
const isInitializedRef = (0,
|
|
2659
|
-
const prevDefaultValueRef = (0,
|
|
2660
|
-
(0,
|
|
2749
|
+
const [selected, setSelected] = (0, import_react19.useState)(defaultValue);
|
|
2750
|
+
const isInitializedRef = (0, import_react19.useRef)(false);
|
|
2751
|
+
const prevDefaultValueRef = (0, import_react19.useRef)(defaultValue);
|
|
2752
|
+
(0, import_react19.useEffect)(() => {
|
|
2661
2753
|
const hasChanged = defaultValue.length !== prevDefaultValueRef.current.length || defaultValue.some(
|
|
2662
2754
|
(val, index) => val !== prevDefaultValueRef.current[index]
|
|
2663
2755
|
);
|
|
@@ -2667,7 +2759,7 @@ var init_CheckboxGroup = __esm({
|
|
|
2667
2759
|
isInitializedRef.current = true;
|
|
2668
2760
|
}
|
|
2669
2761
|
}, [defaultValue]);
|
|
2670
|
-
const checkboxGroupClasses = (0,
|
|
2762
|
+
const checkboxGroupClasses = (0, import_dedupe21.default)(
|
|
2671
2763
|
"mobius",
|
|
2672
2764
|
"mobius-checkbox-group",
|
|
2673
2765
|
className,
|
|
@@ -2679,19 +2771,19 @@ var init_CheckboxGroup = __esm({
|
|
|
2679
2771
|
}
|
|
2680
2772
|
);
|
|
2681
2773
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
2682
|
-
const labelClasses = (0,
|
|
2774
|
+
const labelClasses = (0, import_dedupe21.default)(
|
|
2683
2775
|
{
|
|
2684
2776
|
"--is-disabled": isDisabled
|
|
2685
2777
|
},
|
|
2686
2778
|
validationClasses
|
|
2687
2779
|
);
|
|
2688
|
-
const errorMessageId = (0,
|
|
2780
|
+
const errorMessageId = (0, import_react19.useId)();
|
|
2689
2781
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
2690
2782
|
const describedBy = spaceDelimitedList([
|
|
2691
2783
|
shouldErrorMessageShow,
|
|
2692
2784
|
props["aria-describedby"]
|
|
2693
2785
|
]);
|
|
2694
|
-
const labelId = (0,
|
|
2786
|
+
const labelId = (0, import_react19.useId)();
|
|
2695
2787
|
const handleChange = (event, isLastItem = false) => {
|
|
2696
2788
|
const {
|
|
2697
2789
|
target: { value, checked }
|
|
@@ -2709,12 +2801,12 @@ var init_CheckboxGroup = __esm({
|
|
|
2709
2801
|
setSelected(newValue);
|
|
2710
2802
|
onChange?.(newValue);
|
|
2711
2803
|
};
|
|
2712
|
-
const childrenArray =
|
|
2804
|
+
const childrenArray = import_react19.Children.toArray(children);
|
|
2713
2805
|
const lastCheckbox = childrenArray.filter(
|
|
2714
|
-
(child) => (0,
|
|
2806
|
+
(child) => (0, import_react19.isValidElement)(child) && child.type === Checkbox
|
|
2715
2807
|
).pop();
|
|
2716
2808
|
const lastCheckboxIsChecked = lastCheckbox && selected.includes(lastCheckbox.props.value);
|
|
2717
|
-
return /* @__PURE__ */ (0,
|
|
2809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2718
2810
|
"div",
|
|
2719
2811
|
{
|
|
2720
2812
|
...rest,
|
|
@@ -2723,16 +2815,16 @@ var init_CheckboxGroup = __esm({
|
|
|
2723
2815
|
className: checkboxGroupClasses,
|
|
2724
2816
|
role: "group",
|
|
2725
2817
|
style: {
|
|
2726
|
-
"--checkbox-items-per-row": itemsPerRow ||
|
|
2818
|
+
"--checkbox-items-per-row": itemsPerRow || import_react19.Children.count(children)
|
|
2727
2819
|
},
|
|
2728
2820
|
children: [
|
|
2729
|
-
label && /* @__PURE__ */ (0,
|
|
2730
|
-
/* @__PURE__ */ (0,
|
|
2731
|
-
if ((0,
|
|
2821
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Label, { elementType: "span", id: labelId, className: labelClasses, children: label }),
|
|
2822
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "mobius-checkbox-group__wrapper", children: childrenArray.map((child) => {
|
|
2823
|
+
if ((0, import_react19.isValidElement)(child)) {
|
|
2732
2824
|
const isLastItem = child === lastCheckbox;
|
|
2733
2825
|
const isChildDisabled = isDisabled || lastItemDisables && lastCheckboxIsChecked && !isLastItem;
|
|
2734
2826
|
const childProps = child.props;
|
|
2735
|
-
return (0,
|
|
2827
|
+
return (0, import_react19.cloneElement)(
|
|
2736
2828
|
child,
|
|
2737
2829
|
{
|
|
2738
2830
|
isDisabled: isChildDisabled,
|
|
@@ -2748,7 +2840,7 @@ var init_CheckboxGroup = __esm({
|
|
|
2748
2840
|
}
|
|
2749
2841
|
return child;
|
|
2750
2842
|
}) }),
|
|
2751
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2843
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
2752
2844
|
]
|
|
2753
2845
|
}
|
|
2754
2846
|
);
|
|
@@ -2775,23 +2867,23 @@ var init_Checkbox2 = __esm({
|
|
|
2775
2867
|
});
|
|
2776
2868
|
|
|
2777
2869
|
// src/components/Container/Container.tsx
|
|
2778
|
-
var
|
|
2870
|
+
var import_dedupe22, import_Container, import_jsx_runtime26, Container;
|
|
2779
2871
|
var init_Container = __esm({
|
|
2780
2872
|
"src/components/Container/Container.tsx"() {
|
|
2781
2873
|
"use strict";
|
|
2782
|
-
|
|
2874
|
+
import_dedupe22 = __toESM(require("classnames/dedupe"));
|
|
2783
2875
|
init_utils();
|
|
2784
2876
|
import_Container = require("@simplybusiness/mobius/src/components/Container/Container.css");
|
|
2785
|
-
|
|
2877
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2786
2878
|
Container = ({ ref, ...props }) => {
|
|
2787
2879
|
const { elementType: Element = "div", size = "md", ...otherProps } = props;
|
|
2788
|
-
const classes = (0,
|
|
2880
|
+
const classes = (0, import_dedupe22.default)(
|
|
2789
2881
|
"mobius",
|
|
2790
2882
|
"mobius-container",
|
|
2791
2883
|
sizeClasses(size),
|
|
2792
2884
|
otherProps.className
|
|
2793
2885
|
);
|
|
2794
|
-
return /* @__PURE__ */ (0,
|
|
2886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
2795
2887
|
};
|
|
2796
2888
|
Container.displayName = "Container";
|
|
2797
2889
|
}
|
|
@@ -2844,17 +2936,17 @@ var init_validation = __esm({
|
|
|
2844
2936
|
});
|
|
2845
2937
|
|
|
2846
2938
|
// src/components/DateField/DateField.tsx
|
|
2847
|
-
var
|
|
2939
|
+
var import_dedupe23, import_react20, import_jsx_runtime27, MIN_MAX_ERROR, DateField;
|
|
2848
2940
|
var init_DateField = __esm({
|
|
2849
2941
|
"src/components/DateField/DateField.tsx"() {
|
|
2850
2942
|
"use strict";
|
|
2851
2943
|
"use client";
|
|
2852
|
-
|
|
2853
|
-
|
|
2944
|
+
import_dedupe23 = __toESM(require("classnames/dedupe"));
|
|
2945
|
+
import_react20 = require("react");
|
|
2854
2946
|
init_mergeRefs();
|
|
2855
2947
|
init_TextField2();
|
|
2856
2948
|
init_validation();
|
|
2857
|
-
|
|
2949
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2858
2950
|
MIN_MAX_ERROR = '"min" value should not be greater than "max" value.';
|
|
2859
2951
|
DateField = ({ ref, ...props }) => {
|
|
2860
2952
|
const {
|
|
@@ -2867,10 +2959,10 @@ var init_DateField = __esm({
|
|
|
2867
2959
|
value,
|
|
2868
2960
|
...otherProps
|
|
2869
2961
|
} = props;
|
|
2870
|
-
const [error3, setError] = (0,
|
|
2871
|
-
const [isInvalid, setIsInvalid] = (0,
|
|
2872
|
-
const localRef = (0,
|
|
2873
|
-
const classes = (0,
|
|
2962
|
+
const [error3, setError] = (0, import_react20.useState)(errorMessage);
|
|
2963
|
+
const [isInvalid, setIsInvalid] = (0, import_react20.useState)(void 0);
|
|
2964
|
+
const localRef = (0, import_react20.useRef)(null);
|
|
2965
|
+
const classes = (0, import_dedupe23.default)("mobius-date-field", className);
|
|
2874
2966
|
const formattedMin = min ? convertToDateFormat(min, format) : void 0;
|
|
2875
2967
|
const formattedMax = max ? convertToDateFormat(max, format) : void 0;
|
|
2876
2968
|
const formattedDefaultValue = defaultValue ? convertToDateFormat(defaultValue, format) : void 0;
|
|
@@ -2883,7 +2975,7 @@ var init_DateField = __esm({
|
|
|
2883
2975
|
setError(props.errorMessage);
|
|
2884
2976
|
setIsInvalid(false);
|
|
2885
2977
|
};
|
|
2886
|
-
(0,
|
|
2978
|
+
(0, import_react20.useEffect)(() => {
|
|
2887
2979
|
if (!isValidDate(min, format)) {
|
|
2888
2980
|
setInvalidState(`Invalid min date: ${min}`);
|
|
2889
2981
|
return;
|
|
@@ -2916,7 +3008,7 @@ var init_DateField = __esm({
|
|
|
2916
3008
|
validate();
|
|
2917
3009
|
otherProps.onBlur?.(event);
|
|
2918
3010
|
};
|
|
2919
|
-
return /* @__PURE__ */ (0,
|
|
3011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2920
3012
|
TextField,
|
|
2921
3013
|
{
|
|
2922
3014
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -2947,23 +3039,23 @@ var init_DateField2 = __esm({
|
|
|
2947
3039
|
});
|
|
2948
3040
|
|
|
2949
3041
|
// src/components/Drawer/Content.tsx
|
|
2950
|
-
var
|
|
3042
|
+
var import_jsx_runtime28, Content;
|
|
2951
3043
|
var init_Content = __esm({
|
|
2952
3044
|
"src/components/Drawer/Content.tsx"() {
|
|
2953
3045
|
"use strict";
|
|
2954
|
-
|
|
2955
|
-
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
3046
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3047
|
+
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { ref, ...otherProps, className: "mobius-drawer__content", children });
|
|
2956
3048
|
Content.displayName = "Content";
|
|
2957
3049
|
}
|
|
2958
3050
|
});
|
|
2959
3051
|
|
|
2960
3052
|
// src/components/Drawer/DrawerContext.tsx
|
|
2961
|
-
var
|
|
3053
|
+
var import_react21, DrawerContext;
|
|
2962
3054
|
var init_DrawerContext = __esm({
|
|
2963
3055
|
"src/components/Drawer/DrawerContext.tsx"() {
|
|
2964
3056
|
"use strict";
|
|
2965
|
-
|
|
2966
|
-
DrawerContext = (0,
|
|
3057
|
+
import_react21 = require("react");
|
|
3058
|
+
DrawerContext = (0, import_react21.createContext)({
|
|
2967
3059
|
onClose: () => {
|
|
2968
3060
|
},
|
|
2969
3061
|
closeLabel: void 0,
|
|
@@ -2973,19 +3065,19 @@ var init_DrawerContext = __esm({
|
|
|
2973
3065
|
});
|
|
2974
3066
|
|
|
2975
3067
|
// src/components/Drawer/Drawer.tsx
|
|
2976
|
-
var
|
|
3068
|
+
var import_dedupe24, import_react22, import_Drawer, import_jsx_runtime29, TRANSITION_CSS_VARIABLE, Drawer;
|
|
2977
3069
|
var init_Drawer = __esm({
|
|
2978
3070
|
"src/components/Drawer/Drawer.tsx"() {
|
|
2979
3071
|
"use strict";
|
|
2980
3072
|
"use client";
|
|
2981
|
-
|
|
2982
|
-
|
|
3073
|
+
import_dedupe24 = __toESM(require("classnames/dedupe"));
|
|
3074
|
+
import_react22 = require("react");
|
|
2983
3075
|
init_hooks();
|
|
2984
3076
|
init_utils();
|
|
2985
3077
|
init_VisuallyHidden2();
|
|
2986
3078
|
init_DrawerContext();
|
|
2987
3079
|
import_Drawer = require("@simplybusiness/mobius/src/components/Drawer/Drawer.css");
|
|
2988
|
-
|
|
3080
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2989
3081
|
TRANSITION_CSS_VARIABLE = "--drawer-transition-duration";
|
|
2990
3082
|
Drawer = ({ ref, ...props }) => {
|
|
2991
3083
|
const {
|
|
@@ -2998,8 +3090,8 @@ var init_Drawer = __esm({
|
|
|
2998
3090
|
onClose,
|
|
2999
3091
|
children
|
|
3000
3092
|
} = props;
|
|
3001
|
-
const dialogRef = (0,
|
|
3002
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
3093
|
+
const dialogRef = (0, import_react22.useRef)(null);
|
|
3094
|
+
const [shouldTransition, setShouldTransition] = (0, import_react22.useState)(false);
|
|
3003
3095
|
const { close } = useDialog({
|
|
3004
3096
|
ref: dialogRef,
|
|
3005
3097
|
isOpen,
|
|
@@ -3010,9 +3102,9 @@ var init_Drawer = __esm({
|
|
|
3010
3102
|
CSSVariable: TRANSITION_CSS_VARIABLE
|
|
3011
3103
|
}
|
|
3012
3104
|
});
|
|
3013
|
-
const hiddenId = `dialog-screen-reader-announce-${(0,
|
|
3014
|
-
const headerId = `dialog-header-${(0,
|
|
3015
|
-
const dialogClasses = (0,
|
|
3105
|
+
const hiddenId = `dialog-screen-reader-announce-${(0, import_react22.useId)()}`;
|
|
3106
|
+
const headerId = `dialog-header-${(0, import_react22.useId)()}`;
|
|
3107
|
+
const dialogClasses = (0, import_dedupe24.default)(
|
|
3016
3108
|
"mobius",
|
|
3017
3109
|
"mobius-drawer",
|
|
3018
3110
|
`--${direction}`,
|
|
@@ -3021,10 +3113,10 @@ var init_Drawer = __esm({
|
|
|
3021
3113
|
"--should-transition": shouldTransition
|
|
3022
3114
|
}
|
|
3023
3115
|
);
|
|
3024
|
-
(0,
|
|
3116
|
+
(0, import_react22.useEffect)(() => {
|
|
3025
3117
|
setShouldTransition(supportsDialog());
|
|
3026
3118
|
}, []);
|
|
3027
|
-
const contextValue = (0,
|
|
3119
|
+
const contextValue = (0, import_react22.useMemo)(
|
|
3028
3120
|
() => ({
|
|
3029
3121
|
onClose: close,
|
|
3030
3122
|
closeLabel,
|
|
@@ -3032,18 +3124,18 @@ var init_Drawer = __esm({
|
|
|
3032
3124
|
}),
|
|
3033
3125
|
[close, closeLabel, headerId]
|
|
3034
3126
|
);
|
|
3035
|
-
return /* @__PURE__ */ (0,
|
|
3127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
3036
3128
|
"dialog",
|
|
3037
3129
|
{
|
|
3038
|
-
id: (0,
|
|
3130
|
+
id: (0, import_react22.useId)(),
|
|
3039
3131
|
ref: mergeRefs([dialogRef, ref]),
|
|
3040
3132
|
onCancel: close,
|
|
3041
3133
|
className: dialogClasses,
|
|
3042
3134
|
"aria-describedby": hiddenId,
|
|
3043
3135
|
"aria-labelledby": headerId,
|
|
3044
3136
|
children: [
|
|
3045
|
-
/* @__PURE__ */ (0,
|
|
3046
|
-
/* @__PURE__ */ (0,
|
|
3137
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { id: hiddenId, children: announce }) }),
|
|
3138
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DrawerContext.Provider, { value: contextValue, children })
|
|
3047
3139
|
]
|
|
3048
3140
|
}
|
|
3049
3141
|
);
|
|
@@ -3053,21 +3145,21 @@ var init_Drawer = __esm({
|
|
|
3053
3145
|
});
|
|
3054
3146
|
|
|
3055
3147
|
// src/components/Drawer/useDrawer.ts
|
|
3056
|
-
var
|
|
3148
|
+
var import_react23, useDrawer;
|
|
3057
3149
|
var init_useDrawer = __esm({
|
|
3058
3150
|
"src/components/Drawer/useDrawer.ts"() {
|
|
3059
3151
|
"use strict";
|
|
3060
|
-
|
|
3152
|
+
import_react23 = require("react");
|
|
3061
3153
|
init_DrawerContext();
|
|
3062
3154
|
useDrawer = () => {
|
|
3063
|
-
const { onClose, closeLabel, headerId } = (0,
|
|
3155
|
+
const { onClose, closeLabel, headerId } = (0, import_react23.useContext)(DrawerContext);
|
|
3064
3156
|
return { onClose, closeLabel, headerId };
|
|
3065
3157
|
};
|
|
3066
3158
|
}
|
|
3067
3159
|
});
|
|
3068
3160
|
|
|
3069
3161
|
// src/components/Drawer/Header.tsx
|
|
3070
|
-
var import_icons7,
|
|
3162
|
+
var import_icons7, import_jsx_runtime30, Header;
|
|
3071
3163
|
var init_Header = __esm({
|
|
3072
3164
|
"src/components/Drawer/Header.tsx"() {
|
|
3073
3165
|
"use strict";
|
|
@@ -3075,12 +3167,12 @@ var init_Header = __esm({
|
|
|
3075
3167
|
init_Button2();
|
|
3076
3168
|
init_Icon2();
|
|
3077
3169
|
init_useDrawer();
|
|
3078
|
-
|
|
3170
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3079
3171
|
Header = ({ ref, children, ...otherProps }) => {
|
|
3080
3172
|
const { onClose, closeLabel, headerId } = useDrawer();
|
|
3081
|
-
return /* @__PURE__ */ (0,
|
|
3082
|
-
/* @__PURE__ */ (0,
|
|
3083
|
-
/* @__PURE__ */ (0,
|
|
3173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("header", { ref, ...otherProps, className: "mobius-drawer__header", children: [
|
|
3174
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h2", { id: headerId, children }),
|
|
3175
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3084
3176
|
Button,
|
|
3085
3177
|
{
|
|
3086
3178
|
"aria-label": "Close",
|
|
@@ -3089,7 +3181,7 @@ var init_Header = __esm({
|
|
|
3089
3181
|
className: "mobius-drawer__close",
|
|
3090
3182
|
size: "sm",
|
|
3091
3183
|
children: [
|
|
3092
|
-
/* @__PURE__ */ (0,
|
|
3184
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { icon: import_icons7.cross }),
|
|
3093
3185
|
" ",
|
|
3094
3186
|
closeLabel
|
|
3095
3187
|
]
|
|
@@ -3118,17 +3210,17 @@ var init_Drawer2 = __esm({
|
|
|
3118
3210
|
});
|
|
3119
3211
|
|
|
3120
3212
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
3121
|
-
var
|
|
3213
|
+
var import_react24, import_react_accessible_dropdown_menu_hook, import_dedupe25, import_DropdownMenu, import_jsx_runtime31, DropdownMenu;
|
|
3122
3214
|
var init_DropdownMenu = __esm({
|
|
3123
3215
|
"src/components/DropdownMenu/DropdownMenu.tsx"() {
|
|
3124
3216
|
"use strict";
|
|
3125
3217
|
"use client";
|
|
3126
|
-
|
|
3218
|
+
import_react24 = require("react");
|
|
3127
3219
|
import_react_accessible_dropdown_menu_hook = __toESM(require("react-accessible-dropdown-menu-hook"));
|
|
3128
|
-
|
|
3220
|
+
import_dedupe25 = __toESM(require("classnames/dedupe"));
|
|
3129
3221
|
init_Button2();
|
|
3130
3222
|
import_DropdownMenu = require("@simplybusiness/mobius/src/components/DropdownMenu/DropdownMenu.css");
|
|
3131
|
-
|
|
3223
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3132
3224
|
DropdownMenu = ({ ref, ...props }) => {
|
|
3133
3225
|
const {
|
|
3134
3226
|
elementType: Element = "nav",
|
|
@@ -3137,21 +3229,21 @@ var init_DropdownMenu = __esm({
|
|
|
3137
3229
|
children,
|
|
3138
3230
|
...otherProps
|
|
3139
3231
|
} = props;
|
|
3140
|
-
const [activeId, setActiveId] = (0,
|
|
3141
|
-
const numberOfItems =
|
|
3232
|
+
const [activeId, setActiveId] = (0, import_react24.useState)(null);
|
|
3233
|
+
const numberOfItems = import_react24.Children.count(children);
|
|
3142
3234
|
const {
|
|
3143
3235
|
buttonProps,
|
|
3144
3236
|
itemProps,
|
|
3145
3237
|
isOpen: open,
|
|
3146
3238
|
setIsOpen
|
|
3147
3239
|
} = (0, import_react_accessible_dropdown_menu_hook.default)(numberOfItems);
|
|
3148
|
-
const classes = (0,
|
|
3240
|
+
const classes = (0, import_dedupe25.default)(
|
|
3149
3241
|
"mobius",
|
|
3150
3242
|
"mobius-dropdown-menu",
|
|
3151
3243
|
otherProps.className
|
|
3152
3244
|
);
|
|
3153
|
-
const triggerClasses = (0,
|
|
3154
|
-
const listClasses = (0,
|
|
3245
|
+
const triggerClasses = (0, import_dedupe25.default)("mobius", "mobius-dropdown-menu__trigger");
|
|
3246
|
+
const listClasses = (0, import_dedupe25.default)("mobius", "mobius-dropdown-menu__list", {
|
|
3155
3247
|
"--is-open": open
|
|
3156
3248
|
});
|
|
3157
3249
|
const handleChildClick = ({ onClick }, index) => {
|
|
@@ -3161,16 +3253,16 @@ var init_DropdownMenu = __esm({
|
|
|
3161
3253
|
onClick();
|
|
3162
3254
|
}
|
|
3163
3255
|
};
|
|
3164
|
-
return /* @__PURE__ */ (0,
|
|
3165
|
-
trigger ? (0,
|
|
3256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Element, { ref, ...otherProps, className: classes, children: [
|
|
3257
|
+
trigger ? (0, import_react24.cloneElement)(trigger, {
|
|
3166
3258
|
className: triggerClasses,
|
|
3167
3259
|
open,
|
|
3168
3260
|
label,
|
|
3169
3261
|
...buttonProps
|
|
3170
|
-
}) : /* @__PURE__ */ (0,
|
|
3171
|
-
/* @__PURE__ */ (0,
|
|
3172
|
-
if ((0,
|
|
3173
|
-
return (0,
|
|
3262
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button, { className: triggerClasses, ...buttonProps, children: label }),
|
|
3263
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("ul", { className: listClasses, role: "menu", children: import_react24.Children.map(children, (child, index) => {
|
|
3264
|
+
if ((0, import_react24.isValidElement)(child)) {
|
|
3265
|
+
return (0, import_react24.cloneElement)(child, {
|
|
3174
3266
|
onClick: () => handleChildClick(child.props, index),
|
|
3175
3267
|
active: index === activeId,
|
|
3176
3268
|
...itemProps[index]
|
|
@@ -3185,13 +3277,13 @@ var init_DropdownMenu = __esm({
|
|
|
3185
3277
|
});
|
|
3186
3278
|
|
|
3187
3279
|
// src/components/DropdownMenu/Item.tsx
|
|
3188
|
-
var
|
|
3280
|
+
var import_react25, import_dedupe26, import_jsx_runtime32, Item;
|
|
3189
3281
|
var init_Item = __esm({
|
|
3190
3282
|
"src/components/DropdownMenu/Item.tsx"() {
|
|
3191
3283
|
"use strict";
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3284
|
+
import_react25 = require("react");
|
|
3285
|
+
import_dedupe26 = __toESM(require("classnames/dedupe"));
|
|
3286
|
+
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3195
3287
|
Item = ({ ref, ...props }) => {
|
|
3196
3288
|
const {
|
|
3197
3289
|
elementType: Element = "li",
|
|
@@ -3200,26 +3292,26 @@ var init_Item = __esm({
|
|
|
3200
3292
|
children,
|
|
3201
3293
|
...otherProps
|
|
3202
3294
|
} = props;
|
|
3203
|
-
const classes = (0,
|
|
3295
|
+
const classes = (0, import_dedupe26.default)(
|
|
3204
3296
|
"mobius",
|
|
3205
3297
|
"mobius-dropdown-menu__item",
|
|
3206
3298
|
{ "--is-active": active },
|
|
3207
3299
|
otherProps.className
|
|
3208
3300
|
);
|
|
3209
|
-
return /* @__PURE__ */ (0,
|
|
3210
|
-
if ((0,
|
|
3211
|
-
const childClasses = (0,
|
|
3301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Element, { ref, onClick, ...otherProps, children: import_react25.Children.map(children, (child) => {
|
|
3302
|
+
if ((0, import_react25.isValidElement)(child)) {
|
|
3303
|
+
const childClasses = (0, import_dedupe26.default)(
|
|
3212
3304
|
child.props.className,
|
|
3213
3305
|
classes
|
|
3214
3306
|
);
|
|
3215
|
-
return (0,
|
|
3307
|
+
return (0, import_react25.cloneElement)(
|
|
3216
3308
|
child,
|
|
3217
3309
|
{
|
|
3218
3310
|
className: childClasses
|
|
3219
3311
|
}
|
|
3220
3312
|
);
|
|
3221
3313
|
}
|
|
3222
|
-
return /* @__PURE__ */ (0,
|
|
3314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: classes, children: child });
|
|
3223
3315
|
}) });
|
|
3224
3316
|
};
|
|
3225
3317
|
Item.displayName = "DropdownMenu.Item";
|
|
@@ -3244,23 +3336,23 @@ var init_DropdownMenu2 = __esm({
|
|
|
3244
3336
|
});
|
|
3245
3337
|
|
|
3246
3338
|
// src/components/Fieldset/Fieldset.tsx
|
|
3247
|
-
var
|
|
3339
|
+
var import_dedupe27, import_react26, import_Fieldset, import_jsx_runtime33, useFieldset, Fieldset;
|
|
3248
3340
|
var init_Fieldset = __esm({
|
|
3249
3341
|
"src/components/Fieldset/Fieldset.tsx"() {
|
|
3250
3342
|
"use strict";
|
|
3251
3343
|
"use client";
|
|
3252
|
-
|
|
3253
|
-
|
|
3344
|
+
import_dedupe27 = __toESM(require("classnames/dedupe"));
|
|
3345
|
+
import_react26 = require("react");
|
|
3254
3346
|
init_Flex2();
|
|
3255
3347
|
import_Fieldset = require("@simplybusiness/mobius/src/components/Fieldset/Fieldset.css");
|
|
3256
|
-
|
|
3348
|
+
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3257
3349
|
useFieldset = (props) => {
|
|
3258
3350
|
const { legend } = props;
|
|
3259
3351
|
let legendProps = {};
|
|
3260
3352
|
let containerProps = {
|
|
3261
3353
|
role: "group"
|
|
3262
3354
|
};
|
|
3263
|
-
const legendId = (0,
|
|
3355
|
+
const legendId = (0, import_react26.useId)();
|
|
3264
3356
|
if (legend) {
|
|
3265
3357
|
legendProps = {
|
|
3266
3358
|
...legendProps,
|
|
@@ -3280,14 +3372,14 @@ var init_Fieldset = __esm({
|
|
|
3280
3372
|
const {
|
|
3281
3373
|
children,
|
|
3282
3374
|
legend,
|
|
3283
|
-
legendComponent = /* @__PURE__ */ (0,
|
|
3375
|
+
legendComponent = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("legend", {}),
|
|
3284
3376
|
...otherProps
|
|
3285
3377
|
} = props;
|
|
3286
3378
|
const { legendProps, containerProps } = useFieldset(props);
|
|
3287
|
-
const classes = (0,
|
|
3379
|
+
const classes = (0, import_dedupe27.default)("mobius", "mobius-fieldset", props.className);
|
|
3288
3380
|
legendProps.className = "mobius-fieldset__legend";
|
|
3289
|
-
return /* @__PURE__ */ (0,
|
|
3290
|
-
legend && (0,
|
|
3381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Flex, { ...containerProps, ...otherProps, className: classes, children: [
|
|
3382
|
+
legend && (0, import_react26.cloneElement)(legendComponent, { ...legendProps }, [legend]),
|
|
3291
3383
|
children
|
|
3292
3384
|
] });
|
|
3293
3385
|
};
|
|
@@ -3304,13 +3396,13 @@ var init_Fieldset2 = __esm({
|
|
|
3304
3396
|
});
|
|
3305
3397
|
|
|
3306
3398
|
// src/components/Grid/Grid.tsx
|
|
3307
|
-
var
|
|
3399
|
+
var import_dedupe28, import_jsx_runtime34, Grid;
|
|
3308
3400
|
var init_Grid = __esm({
|
|
3309
3401
|
"src/components/Grid/Grid.tsx"() {
|
|
3310
3402
|
"use strict";
|
|
3311
|
-
|
|
3403
|
+
import_dedupe28 = __toESM(require("classnames/dedupe"));
|
|
3312
3404
|
init_utils();
|
|
3313
|
-
|
|
3405
|
+
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3314
3406
|
Grid = ({ ref: _ref, ...props }) => {
|
|
3315
3407
|
const {
|
|
3316
3408
|
columns = 12,
|
|
@@ -3325,7 +3417,7 @@ var init_Grid = __esm({
|
|
|
3325
3417
|
style,
|
|
3326
3418
|
...rest
|
|
3327
3419
|
} = props;
|
|
3328
|
-
const classes = (0,
|
|
3420
|
+
const classes = (0, import_dedupe28.default)("mobius", "mobius-grid", className);
|
|
3329
3421
|
const styles = filterUndefinedProps({
|
|
3330
3422
|
boxSizing: "border-box",
|
|
3331
3423
|
display: "grid",
|
|
@@ -3339,22 +3431,22 @@ var init_Grid = __esm({
|
|
|
3339
3431
|
justifyItems,
|
|
3340
3432
|
...style
|
|
3341
3433
|
});
|
|
3342
|
-
return /* @__PURE__ */ (0,
|
|
3434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: styles, className: classes, ...rest });
|
|
3343
3435
|
};
|
|
3344
3436
|
Grid.displayName = "Grid";
|
|
3345
3437
|
}
|
|
3346
3438
|
});
|
|
3347
3439
|
|
|
3348
3440
|
// src/components/Grid/Item.tsx
|
|
3349
|
-
var
|
|
3441
|
+
var import_react27, import_dedupe29, import_jsx_runtime35, getBreakpointMap, DEFAULT_SPAN, GridItem;
|
|
3350
3442
|
var init_Item2 = __esm({
|
|
3351
3443
|
"src/components/Grid/Item.tsx"() {
|
|
3352
3444
|
"use strict";
|
|
3353
3445
|
"use client";
|
|
3354
|
-
|
|
3355
|
-
|
|
3446
|
+
import_react27 = require("react");
|
|
3447
|
+
import_dedupe29 = __toESM(require("classnames/dedupe"));
|
|
3356
3448
|
init_hooks();
|
|
3357
|
-
|
|
3449
|
+
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3358
3450
|
getBreakpointMap = (config) => Object.entries(config).reduce(
|
|
3359
3451
|
(prev, [key, value]) => {
|
|
3360
3452
|
const previous = Object.values(prev);
|
|
@@ -3389,9 +3481,9 @@ var init_Item2 = __esm({
|
|
|
3389
3481
|
xl,
|
|
3390
3482
|
xxl
|
|
3391
3483
|
});
|
|
3392
|
-
const [responsiveSpan, setResponsiveSpan] = (0,
|
|
3393
|
-
const classes = (0,
|
|
3394
|
-
(0,
|
|
3484
|
+
const [responsiveSpan, setResponsiveSpan] = (0, import_react27.useState)();
|
|
3485
|
+
const classes = (0, import_dedupe29.default)("mobius-grid__item", className);
|
|
3486
|
+
(0, import_react27.useEffect)(() => {
|
|
3395
3487
|
setResponsiveSpan(breakpointMap[breakpointSize]);
|
|
3396
3488
|
}, [breakpointSize, breakpointMap]);
|
|
3397
3489
|
const styles = {
|
|
@@ -3399,7 +3491,7 @@ var init_Item2 = __esm({
|
|
|
3399
3491
|
alignSelf,
|
|
3400
3492
|
justifySelf
|
|
3401
3493
|
};
|
|
3402
|
-
return /* @__PURE__ */ (0,
|
|
3494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { style: { ...styles }, className: classes, ...rest });
|
|
3403
3495
|
};
|
|
3404
3496
|
GridItem.displayName = "GridItem";
|
|
3405
3497
|
}
|
|
@@ -3420,20 +3512,20 @@ var init_Grid2 = __esm({
|
|
|
3420
3512
|
});
|
|
3421
3513
|
|
|
3422
3514
|
// src/components/Image/Image.tsx
|
|
3423
|
-
var
|
|
3515
|
+
var import_dedupe30, import_jsx_runtime36, Image;
|
|
3424
3516
|
var init_Image = __esm({
|
|
3425
3517
|
"src/components/Image/Image.tsx"() {
|
|
3426
3518
|
"use strict";
|
|
3427
|
-
|
|
3428
|
-
|
|
3519
|
+
import_dedupe30 = __toESM(require("classnames/dedupe"));
|
|
3520
|
+
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3429
3521
|
Image = ({
|
|
3430
3522
|
ref,
|
|
3431
3523
|
alt,
|
|
3432
3524
|
elementType: Component = "img",
|
|
3433
3525
|
...otherProps
|
|
3434
3526
|
}) => {
|
|
3435
|
-
const classes = (0,
|
|
3436
|
-
return /* @__PURE__ */ (0,
|
|
3527
|
+
const classes = (0, import_dedupe30.default)("mobius", "mobius-image", otherProps.className);
|
|
3528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Component, { alt, ref, ...otherProps, className: classes });
|
|
3437
3529
|
};
|
|
3438
3530
|
Image.displayName = "Image";
|
|
3439
3531
|
}
|
|
@@ -3448,13 +3540,13 @@ var init_Image2 = __esm({
|
|
|
3448
3540
|
});
|
|
3449
3541
|
|
|
3450
3542
|
// src/components/Link/Link.tsx
|
|
3451
|
-
var
|
|
3543
|
+
var import_dedupe31, import_Link, import_jsx_runtime37, Link;
|
|
3452
3544
|
var init_Link = __esm({
|
|
3453
3545
|
"src/components/Link/Link.tsx"() {
|
|
3454
3546
|
"use strict";
|
|
3455
|
-
|
|
3547
|
+
import_dedupe31 = __toESM(require("classnames/dedupe"));
|
|
3456
3548
|
import_Link = require("@simplybusiness/mobius/src/components/Link/Link.css");
|
|
3457
|
-
|
|
3549
|
+
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3458
3550
|
Link = ({ ref, ...props }) => {
|
|
3459
3551
|
const {
|
|
3460
3552
|
isDisabled = false,
|
|
@@ -3468,7 +3560,7 @@ var init_Link = __esm({
|
|
|
3468
3560
|
pointerEvents: "none"
|
|
3469
3561
|
};
|
|
3470
3562
|
const styles = { ...style, ...isDisabled && disabledStyles };
|
|
3471
|
-
const classes = (0,
|
|
3563
|
+
const classes = (0, import_dedupe31.default)(
|
|
3472
3564
|
"mobius",
|
|
3473
3565
|
"mobius-link",
|
|
3474
3566
|
className,
|
|
@@ -3477,7 +3569,7 @@ var init_Link = __esm({
|
|
|
3477
3569
|
"--is-disabled": isDisabled
|
|
3478
3570
|
}
|
|
3479
3571
|
);
|
|
3480
|
-
return /* @__PURE__ */ (0,
|
|
3572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3481
3573
|
Component,
|
|
3482
3574
|
{
|
|
3483
3575
|
ref,
|
|
@@ -3502,12 +3594,12 @@ var init_Link2 = __esm({
|
|
|
3502
3594
|
});
|
|
3503
3595
|
|
|
3504
3596
|
// src/components/LinkButton/LinkButton.tsx
|
|
3505
|
-
var
|
|
3597
|
+
var import_dedupe32, import_jsx_runtime38;
|
|
3506
3598
|
var init_LinkButton = __esm({
|
|
3507
3599
|
"src/components/LinkButton/LinkButton.tsx"() {
|
|
3508
3600
|
"use strict";
|
|
3509
|
-
|
|
3510
|
-
|
|
3601
|
+
import_dedupe32 = __toESM(require("classnames/dedupe"));
|
|
3602
|
+
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3511
3603
|
}
|
|
3512
3604
|
});
|
|
3513
3605
|
|
|
@@ -3520,14 +3612,14 @@ var init_LinkButton2 = __esm({
|
|
|
3520
3612
|
});
|
|
3521
3613
|
|
|
3522
3614
|
// src/components/List/List.tsx
|
|
3523
|
-
var
|
|
3615
|
+
var import_react28, import_dedupe33, import_List, import_jsx_runtime39, List;
|
|
3524
3616
|
var init_List = __esm({
|
|
3525
3617
|
"src/components/List/List.tsx"() {
|
|
3526
3618
|
"use strict";
|
|
3527
|
-
|
|
3528
|
-
|
|
3619
|
+
import_react28 = require("react");
|
|
3620
|
+
import_dedupe33 = __toESM(require("classnames/dedupe"));
|
|
3529
3621
|
import_List = require("@simplybusiness/mobius/src/components/List/List.css");
|
|
3530
|
-
|
|
3622
|
+
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3531
3623
|
List = ({ ref, ...props }) => {
|
|
3532
3624
|
const Component = props.isOrdered ? "ol" : "ul";
|
|
3533
3625
|
const { children, icon, ...otherProps } = props;
|
|
@@ -3536,7 +3628,7 @@ var init_List = __esm({
|
|
|
3536
3628
|
...restProps,
|
|
3537
3629
|
reversed: isReversed
|
|
3538
3630
|
};
|
|
3539
|
-
const classes = (0,
|
|
3631
|
+
const classes = (0, import_dedupe33.default)(
|
|
3540
3632
|
"mobius",
|
|
3541
3633
|
"mobius-list",
|
|
3542
3634
|
{
|
|
@@ -3545,9 +3637,9 @@ var init_List = __esm({
|
|
|
3545
3637
|
},
|
|
3546
3638
|
otherProps.className
|
|
3547
3639
|
);
|
|
3548
|
-
return /* @__PURE__ */ (0,
|
|
3549
|
-
if ((0,
|
|
3550
|
-
return (0,
|
|
3640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Component, { ref, ...mappedProps, className: classes, children: import_react28.Children.map(children, (child) => {
|
|
3641
|
+
if ((0, import_react28.isValidElement)(child)) {
|
|
3642
|
+
return (0, import_react28.cloneElement)(child, {
|
|
3551
3643
|
parentIcon: icon
|
|
3552
3644
|
});
|
|
3553
3645
|
}
|
|
@@ -3559,16 +3651,16 @@ var init_List = __esm({
|
|
|
3559
3651
|
});
|
|
3560
3652
|
|
|
3561
3653
|
// src/components/List/ListItem.tsx
|
|
3562
|
-
var
|
|
3654
|
+
var import_dedupe34, import_jsx_runtime40, ListItem;
|
|
3563
3655
|
var init_ListItem = __esm({
|
|
3564
3656
|
"src/components/List/ListItem.tsx"() {
|
|
3565
3657
|
"use strict";
|
|
3566
|
-
|
|
3567
|
-
|
|
3658
|
+
import_dedupe34 = __toESM(require("classnames/dedupe"));
|
|
3659
|
+
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3568
3660
|
ListItem = ({ ref, ...props }) => {
|
|
3569
3661
|
const { parentIcon, icon, children, ...otherProps } = props;
|
|
3570
3662
|
const iconContent = icon || parentIcon;
|
|
3571
|
-
const classes = (0,
|
|
3663
|
+
const classes = (0, import_dedupe34.default)(
|
|
3572
3664
|
"mobius",
|
|
3573
3665
|
"mobius-list__item",
|
|
3574
3666
|
{
|
|
@@ -3576,15 +3668,15 @@ var init_ListItem = __esm({
|
|
|
3576
3668
|
},
|
|
3577
3669
|
props.className
|
|
3578
3670
|
);
|
|
3579
|
-
const contentClasses = (0,
|
|
3580
|
-
const iconClasses = (0,
|
|
3671
|
+
const contentClasses = (0, import_dedupe34.default)("mobius", "mobius-list__item-content");
|
|
3672
|
+
const iconClasses = (0, import_dedupe34.default)("mobius", "mobius-list__icon");
|
|
3581
3673
|
if (iconContent) {
|
|
3582
|
-
return /* @__PURE__ */ (0,
|
|
3583
|
-
/* @__PURE__ */ (0,
|
|
3674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("li", { ref, ...otherProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: contentClasses, children: [
|
|
3675
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: iconClasses, children: iconContent }),
|
|
3584
3676
|
children
|
|
3585
3677
|
] }) });
|
|
3586
3678
|
}
|
|
3587
|
-
return /* @__PURE__ */ (0,
|
|
3679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("li", { ref, ...otherProps, className: classes, children });
|
|
3588
3680
|
};
|
|
3589
3681
|
ListItem.displayName = "ListItem";
|
|
3590
3682
|
}
|
|
@@ -3600,23 +3692,23 @@ var init_List2 = __esm({
|
|
|
3600
3692
|
});
|
|
3601
3693
|
|
|
3602
3694
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
3603
|
-
var
|
|
3695
|
+
var import_dedupe35, import_icons8, import_LoadingIndicator, import_jsx_runtime41, LoadingIndicator;
|
|
3604
3696
|
var init_LoadingIndicator = __esm({
|
|
3605
3697
|
"src/components/LoadingIndicator/LoadingIndicator.tsx"() {
|
|
3606
3698
|
"use strict";
|
|
3607
|
-
|
|
3699
|
+
import_dedupe35 = __toESM(require("classnames/dedupe"));
|
|
3608
3700
|
import_icons8 = require("@simplybusiness/icons");
|
|
3609
3701
|
init_Icon2();
|
|
3610
3702
|
import_LoadingIndicator = require("@simplybusiness/mobius/src/components/LoadingIndicator/LoadingIndicator.css");
|
|
3611
|
-
|
|
3703
|
+
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3612
3704
|
LoadingIndicator = ({ ref, ...props }) => {
|
|
3613
3705
|
const { icon = import_icons8.loading, ...otherProps } = props;
|
|
3614
|
-
const classes = (0,
|
|
3706
|
+
const classes = (0, import_dedupe35.default)(
|
|
3615
3707
|
"mobius",
|
|
3616
3708
|
"mobius-loading-indicator",
|
|
3617
3709
|
otherProps.className
|
|
3618
3710
|
);
|
|
3619
|
-
return /* @__PURE__ */ (0,
|
|
3711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { icon, spin: true, ref, ...otherProps, className: classes });
|
|
3620
3712
|
};
|
|
3621
3713
|
LoadingIndicator.displayName = "LoadingIndicator";
|
|
3622
3714
|
}
|
|
@@ -3631,16 +3723,16 @@ var init_LoadingIndicator2 = __esm({
|
|
|
3631
3723
|
});
|
|
3632
3724
|
|
|
3633
3725
|
// src/components/Logo/Logo.tsx
|
|
3634
|
-
var
|
|
3726
|
+
var import_dedupe36, import_jsx_runtime42, Logo;
|
|
3635
3727
|
var init_Logo = __esm({
|
|
3636
3728
|
"src/components/Logo/Logo.tsx"() {
|
|
3637
3729
|
"use strict";
|
|
3638
|
-
|
|
3639
|
-
|
|
3730
|
+
import_dedupe36 = __toESM(require("classnames/dedupe"));
|
|
3731
|
+
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3640
3732
|
Logo = ({ ref, ...props }) => {
|
|
3641
3733
|
const { className, width, height, ...otherProps } = props;
|
|
3642
|
-
const classes = (0,
|
|
3643
|
-
return /* @__PURE__ */ (0,
|
|
3734
|
+
const classes = (0, import_dedupe36.default)("mobius", "mobius-logo", className);
|
|
3735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3644
3736
|
"svg",
|
|
3645
3737
|
{
|
|
3646
3738
|
width,
|
|
@@ -3650,7 +3742,7 @@ var init_Logo = __esm({
|
|
|
3650
3742
|
viewBox: "0 0 144 37",
|
|
3651
3743
|
...otherProps,
|
|
3652
3744
|
children: [
|
|
3653
|
-
/* @__PURE__ */ (0,
|
|
3745
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3654
3746
|
"linearGradient",
|
|
3655
3747
|
{
|
|
3656
3748
|
id: "logo-gradient",
|
|
@@ -3659,27 +3751,27 @@ var init_Logo = __esm({
|
|
|
3659
3751
|
y1: "76.042%",
|
|
3660
3752
|
y2: "26.973%",
|
|
3661
3753
|
children: [
|
|
3662
|
-
/* @__PURE__ */ (0,
|
|
3663
|
-
/* @__PURE__ */ (0,
|
|
3754
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("stop", { stopColor: "#4632D8", offset: "0%" }),
|
|
3755
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("stop", { stopColor: "#9084E8", offset: "100%" })
|
|
3664
3756
|
]
|
|
3665
3757
|
}
|
|
3666
3758
|
) }),
|
|
3667
|
-
/* @__PURE__ */ (0,
|
|
3668
|
-
/* @__PURE__ */ (0,
|
|
3759
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("g", { children: [
|
|
3760
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3669
3761
|
"path",
|
|
3670
3762
|
{
|
|
3671
3763
|
fill: "#0E0A2B",
|
|
3672
3764
|
d: "M68.788 11.307c0-2.486-2.027-3.345-3.833-4.1-1.332-.562-2.471-1.036-2.471-2.072 0-.873.77-1.42 1.968-1.42 1.051 0 1.806.444 2.294.725.193.103.474.222.755.133.192-.06.34-.207.459-.444l.34-.621c.266-.474.163-.888-.281-1.2-.533-.384-1.88-1.05-3.537-1.05-2.738 0-4.647 1.643-4.647 4.01 0 2.413 2.012 3.301 3.788 4.07 1.347.593 2.516 1.096 2.516 2.161 0 .873-.754 1.45-1.924 1.45-1.287 0-2.22-.65-2.678-.961l-.03-.015c-.533-.296-.903-.237-1.228.192l-.415.607c-.444.607-.148.992.134 1.228.828.637 2.427 1.392 4.203 1.392 2.708 0 4.587-1.673 4.587-4.085zm4.44 2.975V6.186c0-.577-.31-.888-.873-.888h-.843c-.563 0-.874.311-.874.888v8.096c0 .577.296.888.874.888h.843c.563 0 .873-.311.873-.888zM71.482 4.203h.755c.518 0 .814-.281.814-.8v-.517c0-.518-.296-.814-.814-.814h-.755c-.518 0-.8.281-.8.814v.518c.016.518.297.8.8.8zM92.645 24.48h.755c.518 0 .814-.282.814-.8v-.518c0-.518-.296-.814-.814-.814h-.755c-.518 0-.799.282-.799.814v.518c0 .518.281.8.8.8zm-6.26-19.42c-1.539 0-2.397.962-2.945 1.895-.444-1.243-1.435-1.895-2.871-1.895-1.362 0-2.146.888-2.723 1.806v-.68c0-.578-.311-.889-.873-.889h-.74c-.563 0-.873.311-.873.888v8.096c0 .577.295.888.873.888h.843c.577 0 .873-.311.873-.888V10.73c0-2.25.888-3.271 2.058-3.271 1.006 0 1.198.71 1.198 1.85v4.987c0 .578.311.888.888.888h.844c.577 0 .873-.31.873-.888v-3.551c0-2.25.873-3.271 2.013-3.271 1.036 0 1.243.74 1.243 1.85v4.987c0 .577.31.888.888.888h.814c.577 0 .888-.31.888-.888V8.835c0-2.5-1.095-3.774-3.27-3.774zm10.804 10.33c2.679 0 4.558-2.13 4.558-5.164 0-3.094-1.776-5.166-4.425-5.166-1.761 0-2.708 1.036-3.049 1.51v-.533c0-.459-.34-.755-.873-.755h-.607c-.562 0-.888.326-.888.888v11.9c0 .576.311.887.888.887h.814c.578 0 .888-.31.888-.888v-3.404c0-.207-.014-.4-.014-.532.325.429 1.184 1.258 2.708 1.258zm-2.768-5.105c0-1.362.622-2.975 2.368-2.975 1.377 0 2.309 1.184 2.309 2.945 0 1.746-.947 2.916-2.338 2.916-1.54 0-2.339-1.45-2.339-2.886zm12.965 4.07v-.652c0-.444-.252-.725-.681-.784-.34-.03-.68-.192-.68-1.066v-9.47c0-.563-.326-.888-.874-.888h-.843c-.563 0-.874.31-.874.888v9.679c0 1.258.34 2.16 1.021 2.678.637.489 1.466.533 2.013.533.607 0 .918-.325.918-.917zm9.457-9.073h-.962c-.518 0-.844.237-.977.726l-1.717 4.972c-.089.311-.192.71-.251.977-.074-.281-.193-.71-.296-1.021l-1.835-4.943c-.163-.489-.489-.71-.977-.71h-1.036c-.415 0-.622.162-.71.295-.09.134-.163.385.014.755l3.685 8.57-.34.813c-.252.592-.77 1.229-1.45 1.229-.267 0-.474-.09-.652-.163h-.014c-.43-.104-.755.074-.962.488l-.163.415c-.119.251-.148.517-.06.725.075.192.237.34.474.429.326.118.814.296 1.391.296 1.628 0 2.975-.977 3.597-2.605l3.996-10.226c.103-.296.088-.563-.045-.755-.163-.163-.4-.267-.71-.267zM67.634 28.297c.977-.592 1.54-1.658 1.54-2.886 0-2.176-1.688-3.567-4.293-3.567h-4.04c-.562 0-.873.311-.873.888v11.899c0 .577.296.888.873.888h4.1c1.346 0 2.5-.34 3.33-.962.932-.71 1.42-1.761 1.42-3.049.03-1.524-.784-2.767-2.057-3.211zm-5.017-.962v-3.212h2.25c1.02 0 1.628.592 1.628 1.584 0 .991-.607 1.643-1.57 1.643h-2.308v-.015zm4.396 4.01c0 1.155-.71 1.865-1.865 1.865h-2.53v-3.714h2.53c1.14.014 1.865.74 1.865 1.85zm12.638-5.712h-.814c-.577 0-.888.31-.888.888v3.655c0 2.176-1.361 3.182-2.634 3.182-1.006 0-1.406-.547-1.406-1.88v-4.942c0-.578-.31-.888-.888-.888h-.814c-.562 0-.888.325-.888.888v5.431c0 2.516 1.17 3.774 3.463 3.774a3.937 3.937 0 003.286-1.761v.651c0 .577.296.888.873.888h.74c.577 0 .888-.31.888-.888v-8.095c-.03-.578-.355-.903-.918-.903zm6.956 3.937c-.917-.311-1.702-.592-1.702-1.184 0-.74.77-.859 1.229-.859.784 0 1.406.281 1.805.474.548.237.947.118 1.184-.34l.193-.341c.251-.518.133-.947-.326-1.184-.326-.178-1.288-.71-2.753-.71-2.279 0-3.803 1.213-3.803 3.004 0 2.042 1.731 2.65 3.137 3.138.903.325 1.687.592 1.687 1.169 0 .547-.488.902-1.258.902-.917 0-1.613-.37-2.057-.621l-.059-.03c-.533-.28-.903-.207-1.213.222l-.222.34c-.178.252-.237.504-.178.726.044.207.192.37.4.488a5.774 5.774 0 003.285 1.007c2.235 0 3.789-1.273 3.789-3.079-.03-2.042-1.761-2.649-3.138-3.122zm6.897-3.937h-.844c-.562 0-.873.31-.873.888v8.095c0 .577.296.888.873.888h.844c.577 0 .873-.31.873-.888v-8.095c0-.563-.31-.888-.873-.888zm9.324-.237c-1.924 0-2.93 1.154-3.36 1.806v-.681c0-.577-.31-.888-.873-.888h-.74c-.563 0-.873.31-.873.888v8.095c0 .577.296.888.873.888h.843c.578 0 .874-.31.874-.888v-3.744c0-1.79 1.14-3.078 2.708-3.078 1.021 0 1.436.547 1.436 1.88v4.942c0 .577.31.888.887.888h.814c.578 0 .888-.31.888-.888v-5.431c0-2.516-1.169-3.789-3.477-3.789zm10.448 0c-2.96 0-5.032 2.131-5.032 5.165 0 2.99 2.235 5.165 5.313 5.165 1.48 0 2.635-.533 3.345-.977.444-.266.562-.695.296-1.198l-.222-.385c-.266-.459-.651-.563-1.184-.31h-.015a3.885 3.885 0 01-2.042.606c-1.54 0-2.634-.962-2.812-2.472h5.816a.935.935 0 00.933-.917c.014-2.827-1.717-4.677-4.396-4.677zm-.044 2.013c1.065 0 1.79.77 1.864 1.968h-4.1c.253-1.213 1.096-1.968 2.236-1.968zm10.152 2.16c-.917-.31-1.702-.591-1.702-1.183 0-.74.77-.859 1.229-.859.784 0 1.406.281 1.805.474.548.237.947.118 1.184-.34l.192-.341c.252-.518.134-.947-.325-1.184-.326-.178-1.288-.71-2.753-.71-2.279 0-3.803 1.213-3.803 3.004 0 2.042 1.731 2.65 3.137 3.138.903.325 1.687.592 1.687 1.169 0 .547-.488.902-1.258.902-.917 0-1.613-.37-2.057-.621l-.059-.03c-.533-.28-.903-.207-1.214.222l-.222.34c-.177.252-.236.504-.177.726.044.207.192.37.4.488a5.774 5.774 0 003.285 1.007c2.235 0 3.789-1.273 3.789-3.079-.015-2.042-1.747-2.649-3.138-3.122zm8.791 0c-.917-.31-1.702-.591-1.702-1.183 0-.74.77-.859 1.229-.859.784 0 1.406.281 1.805.474.548.237.947.118 1.184-.34l.192-.341c.252-.518.134-.947-.325-1.184-.326-.178-1.288-.71-2.753-.71-2.279 0-3.803 1.213-3.803 3.004 0 2.042 1.731 2.65 3.137 3.138.903.325 1.687.592 1.687 1.169 0 .547-.488.902-1.258.902-.917 0-1.613-.37-2.057-.621l-.059-.03c-.533-.28-.903-.207-1.214.222l-.222.34c-.177.252-.236.504-.177.726.044.207.192.37.4.488a5.774 5.774 0 003.285 1.007c2.235 0 3.789-1.273 3.789-3.079-.015-2.042-1.747-2.649-3.138-3.122z"
|
|
3673
3765
|
}
|
|
3674
3766
|
),
|
|
3675
|
-
/* @__PURE__ */ (0,
|
|
3767
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3676
3768
|
"path",
|
|
3677
3769
|
{
|
|
3678
3770
|
fill: "url(#logo-gradient)",
|
|
3679
3771
|
d: "M22.747 22.288c.607 1.214.918 2.59.918 4.144 0 1.45-.267 2.827-.8 4.1a10.018 10.018 0 01-2.279 3.36c-.991.961-2.235 1.73-3.744 2.278-1.51.563-3.167.829-4.988.829-2.264 0-4.35-.385-6.29-1.14-1.938-.77-3.492-1.598-4.676-2.5-.31-.252-.548-.504-.696-.77a1.332 1.332 0 01-.177-.71.718.718 0 010-.252c.03-.37.207-.785.547-1.199l1.14-1.598c.4-.548.829-.844 1.288-.918a.896.896 0 01.222-.03c.4 0 .873.163 1.39.474 2.487 1.776 4.914 2.679 7.252 2.679 1.643 0 2.96-.385 3.922-1.14.962-.755 1.45-1.746 1.45-2.96 0-.725-.192-1.39-.562-1.983a5.347 5.347 0 00-1.539-1.569 18.207 18.207 0 00-2.235-1.287 56.102 56.102 0 00-2.649-1.214c-.917-.4-1.835-.814-2.752-1.258a19.282 19.282 0 01-2.62-1.539 14.014 14.014 0 01-2.22-1.924c-.666-.695-1.169-1.539-1.554-2.545-.37-.992-.562-2.087-.562-3.271 0-2.042.533-3.863 1.598-5.446 1.066-1.584 2.516-2.797 4.336-3.641C8.303.414 10.345 0 12.624 0c1.91 0 3.685.281 5.358.844 1.657.562 2.96 1.198 3.892 1.88.68.473 1.006 1.035 1.006 1.671 0 .385-.118.785-.37 1.2l-.917 1.657c-.385.74-.903 1.11-1.554 1.11-.4 0-.83-.133-1.318-.4a42.421 42.421 0 00-1.687-.947c-.473-.237-1.14-.488-1.998-.71a9.458 9.458 0 00-2.56-.356c-1.672 0-3.004.37-3.981 1.11-.992.74-1.48 1.717-1.48 2.946 0 .902.31 1.701.932 2.412.622.695 1.421 1.302 2.398 1.79.977.489 2.057.977 3.256 1.466a54.048 54.048 0 013.552 1.628 20.795 20.795 0 013.24 2.042c.948.755 1.732 1.732 2.354 2.945zm31.257 2.945c0 3.197-1.155 6.083-3.256 8.14-2.265 2.205-5.506 3.36-9.368 3.36H30.71c-2.443 0-4.278-1.836-4.278-4.278V4.53c0-1.2.43-2.28 1.214-3.064C28.43.681 29.51.252 30.709.252h9.013c3.419 0 6.32 1.095 8.377 3.182 1.909 1.923 2.945 4.558 2.945 7.429 0 2.294-.622 4.203-1.91 5.816 1.377.77 2.487 1.776 3.286 2.99 1.066 1.583 1.584 3.448 1.584 5.564zm-12.106-7.68c.044-.03 4.913-3.02 4.913-6.675 0-1.761-.607-3.345-1.717-4.455-1.568-1.584-3.788-1.924-5.372-1.924H30.68v28h10.7c2.738 0 4.958-.754 6.408-2.16 1.273-1.243 1.983-3.049 1.983-5.106 0-1.272-.296-2.353-.858-3.196v-.03c-1.362-2.353-6.838-3.774-6.897-3.789l-.844-.222.726-.444z"
|
|
3680
3772
|
}
|
|
3681
3773
|
),
|
|
3682
|
-
/* @__PURE__ */ (0,
|
|
3774
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3683
3775
|
"path",
|
|
3684
3776
|
{
|
|
3685
3777
|
fill: "#0E0A2B",
|
|
@@ -3704,23 +3796,23 @@ var init_Logo2 = __esm({
|
|
|
3704
3796
|
});
|
|
3705
3797
|
|
|
3706
3798
|
// src/components/Modal/Content.tsx
|
|
3707
|
-
var
|
|
3799
|
+
var import_jsx_runtime43, Content2;
|
|
3708
3800
|
var init_Content2 = __esm({
|
|
3709
3801
|
"src/components/Modal/Content.tsx"() {
|
|
3710
3802
|
"use strict";
|
|
3711
|
-
|
|
3712
|
-
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
3803
|
+
import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3804
|
+
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { ref, ...otherProps, className: "mobius-modal__content", children });
|
|
3713
3805
|
Content2.displayName = "Content";
|
|
3714
3806
|
}
|
|
3715
3807
|
});
|
|
3716
3808
|
|
|
3717
3809
|
// src/components/Modal/ModalContext.tsx
|
|
3718
|
-
var
|
|
3810
|
+
var import_react29, ModalContext;
|
|
3719
3811
|
var init_ModalContext = __esm({
|
|
3720
3812
|
"src/components/Modal/ModalContext.tsx"() {
|
|
3721
3813
|
"use strict";
|
|
3722
|
-
|
|
3723
|
-
ModalContext = (0,
|
|
3814
|
+
import_react29 = require("react");
|
|
3815
|
+
ModalContext = (0, import_react29.createContext)({
|
|
3724
3816
|
onClose: () => {
|
|
3725
3817
|
},
|
|
3726
3818
|
closeLabel: void 0
|
|
@@ -3729,21 +3821,21 @@ var init_ModalContext = __esm({
|
|
|
3729
3821
|
});
|
|
3730
3822
|
|
|
3731
3823
|
// src/components/Modal/useModal.ts
|
|
3732
|
-
var
|
|
3824
|
+
var import_react30, useModal;
|
|
3733
3825
|
var init_useModal = __esm({
|
|
3734
3826
|
"src/components/Modal/useModal.ts"() {
|
|
3735
3827
|
"use strict";
|
|
3736
|
-
|
|
3828
|
+
import_react30 = require("react");
|
|
3737
3829
|
init_ModalContext();
|
|
3738
3830
|
useModal = () => {
|
|
3739
|
-
const { onClose, closeLabel } = (0,
|
|
3831
|
+
const { onClose, closeLabel } = (0, import_react30.useContext)(ModalContext);
|
|
3740
3832
|
return { onClose, closeLabel };
|
|
3741
3833
|
};
|
|
3742
3834
|
}
|
|
3743
3835
|
});
|
|
3744
3836
|
|
|
3745
3837
|
// src/components/Modal/Header.tsx
|
|
3746
|
-
var import_icons9,
|
|
3838
|
+
var import_icons9, import_jsx_runtime44, Header2;
|
|
3747
3839
|
var init_Header2 = __esm({
|
|
3748
3840
|
"src/components/Modal/Header.tsx"() {
|
|
3749
3841
|
"use strict";
|
|
@@ -3751,12 +3843,12 @@ var init_Header2 = __esm({
|
|
|
3751
3843
|
init_Button2();
|
|
3752
3844
|
init_Icon2();
|
|
3753
3845
|
init_useModal();
|
|
3754
|
-
|
|
3846
|
+
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3755
3847
|
Header2 = ({ ref, children, ...otherProps }) => {
|
|
3756
3848
|
const { onClose, closeLabel } = useModal();
|
|
3757
|
-
return /* @__PURE__ */ (0,
|
|
3849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("header", { ref, ...otherProps, className: "mobius-modal__header", children: [
|
|
3758
3850
|
children,
|
|
3759
|
-
/* @__PURE__ */ (0,
|
|
3851
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3760
3852
|
Button,
|
|
3761
3853
|
{
|
|
3762
3854
|
"aria-label": "Close",
|
|
@@ -3764,7 +3856,7 @@ var init_Header2 = __esm({
|
|
|
3764
3856
|
onPress: onClose,
|
|
3765
3857
|
className: "mobius-modal__close",
|
|
3766
3858
|
children: [
|
|
3767
|
-
/* @__PURE__ */ (0,
|
|
3859
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { icon: import_icons9.cross }),
|
|
3768
3860
|
" ",
|
|
3769
3861
|
closeLabel
|
|
3770
3862
|
]
|
|
@@ -3777,19 +3869,19 @@ var init_Header2 = __esm({
|
|
|
3777
3869
|
});
|
|
3778
3870
|
|
|
3779
3871
|
// src/components/Modal/Modal.tsx
|
|
3780
|
-
var
|
|
3872
|
+
var import_dedupe37, import_react31, import_Modal, import_jsx_runtime45, TRANSITION_CSS_VARIABLE2, Modal;
|
|
3781
3873
|
var init_Modal = __esm({
|
|
3782
3874
|
"src/components/Modal/Modal.tsx"() {
|
|
3783
3875
|
"use strict";
|
|
3784
3876
|
"use client";
|
|
3785
|
-
|
|
3786
|
-
|
|
3877
|
+
import_dedupe37 = __toESM(require("classnames/dedupe"));
|
|
3878
|
+
import_react31 = require("react");
|
|
3787
3879
|
init_hooks();
|
|
3788
3880
|
init_utils();
|
|
3789
3881
|
init_polyfill_tests();
|
|
3790
3882
|
init_ModalContext();
|
|
3791
3883
|
import_Modal = require("@simplybusiness/mobius/src/components/Modal/Modal.css");
|
|
3792
|
-
|
|
3884
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3793
3885
|
TRANSITION_CSS_VARIABLE2 = "--modal-transition-duration";
|
|
3794
3886
|
Modal = ({ ref, ...props }) => {
|
|
3795
3887
|
const {
|
|
@@ -3803,11 +3895,11 @@ var init_Modal = __esm({
|
|
|
3803
3895
|
animation,
|
|
3804
3896
|
...rest
|
|
3805
3897
|
} = props;
|
|
3806
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
3807
|
-
(0,
|
|
3898
|
+
const [shouldTransition, setShouldTransition] = (0, import_react31.useState)(false);
|
|
3899
|
+
(0, import_react31.useEffect)(() => {
|
|
3808
3900
|
setShouldTransition(supportsDialog());
|
|
3809
3901
|
}, []);
|
|
3810
|
-
const dialogRef = (0,
|
|
3902
|
+
const dialogRef = (0, import_react31.useRef)(null);
|
|
3811
3903
|
const { close } = useDialog({
|
|
3812
3904
|
ref: dialogRef,
|
|
3813
3905
|
isOpen,
|
|
@@ -3818,7 +3910,7 @@ var init_Modal = __esm({
|
|
|
3818
3910
|
CSSVariable: TRANSITION_CSS_VARIABLE2
|
|
3819
3911
|
}
|
|
3820
3912
|
});
|
|
3821
|
-
const modalClasses = (0,
|
|
3913
|
+
const modalClasses = (0, import_dedupe37.default)(
|
|
3822
3914
|
"mobius",
|
|
3823
3915
|
"mobius-modal",
|
|
3824
3916
|
{
|
|
@@ -3831,21 +3923,21 @@ var init_Modal = __esm({
|
|
|
3831
3923
|
},
|
|
3832
3924
|
className
|
|
3833
3925
|
);
|
|
3834
|
-
const contextValue = (0,
|
|
3926
|
+
const contextValue = (0, import_react31.useMemo)(
|
|
3835
3927
|
() => ({
|
|
3836
3928
|
onClose: close,
|
|
3837
3929
|
closeLabel
|
|
3838
3930
|
}),
|
|
3839
3931
|
[close, closeLabel]
|
|
3840
3932
|
);
|
|
3841
|
-
return /* @__PURE__ */ (0,
|
|
3933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3842
3934
|
"dialog",
|
|
3843
3935
|
{
|
|
3844
3936
|
ref: mergeRefs([dialogRef, ref]),
|
|
3845
3937
|
onCancel: close,
|
|
3846
3938
|
className: modalClasses,
|
|
3847
3939
|
...rest,
|
|
3848
|
-
children: /* @__PURE__ */ (0,
|
|
3940
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ModalContext.Provider, { value: contextValue, children })
|
|
3849
3941
|
}
|
|
3850
3942
|
);
|
|
3851
3943
|
};
|
|
@@ -3870,16 +3962,16 @@ var init_Modal2 = __esm({
|
|
|
3870
3962
|
});
|
|
3871
3963
|
|
|
3872
3964
|
// src/components/NumberField/NumberField.tsx
|
|
3873
|
-
var
|
|
3965
|
+
var import_dedupe38, import_react32, import_NumberField, import_jsx_runtime46, NumberField;
|
|
3874
3966
|
var init_NumberField = __esm({
|
|
3875
3967
|
"src/components/NumberField/NumberField.tsx"() {
|
|
3876
3968
|
"use strict";
|
|
3877
3969
|
"use client";
|
|
3878
|
-
|
|
3879
|
-
|
|
3970
|
+
import_dedupe38 = __toESM(require("classnames/dedupe"));
|
|
3971
|
+
import_react32 = require("react");
|
|
3880
3972
|
init_TextField2();
|
|
3881
3973
|
import_NumberField = require("@simplybusiness/mobius/src/components/NumberField/NumberField.css");
|
|
3882
|
-
|
|
3974
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3883
3975
|
NumberField = ({ ref, ...props }) => {
|
|
3884
3976
|
const {
|
|
3885
3977
|
minValue,
|
|
@@ -3895,15 +3987,15 @@ var init_NumberField = __esm({
|
|
|
3895
3987
|
onBlur: customOnBlur,
|
|
3896
3988
|
...rest
|
|
3897
3989
|
} = otherProps;
|
|
3898
|
-
const focusedInputRef = (0,
|
|
3899
|
-
const wheelHandler = (0,
|
|
3900
|
-
(0,
|
|
3990
|
+
const focusedInputRef = (0, import_react32.useRef)(null);
|
|
3991
|
+
const wheelHandler = (0, import_react32.useCallback)((ev) => ev.preventDefault(), []);
|
|
3992
|
+
(0, import_react32.useEffect)(() => {
|
|
3901
3993
|
return () => {
|
|
3902
3994
|
focusedInputRef.current?.removeEventListener("wheel", wheelHandler);
|
|
3903
3995
|
focusedInputRef.current = null;
|
|
3904
3996
|
};
|
|
3905
3997
|
}, [wheelHandler]);
|
|
3906
|
-
const containerClasses = (0,
|
|
3998
|
+
const containerClasses = (0, import_dedupe38.default)("mobius-number-field", className, {
|
|
3907
3999
|
"--hide-spin-buttons": hideSpinButtons
|
|
3908
4000
|
});
|
|
3909
4001
|
const handleBeforeInput = (event) => {
|
|
@@ -3947,7 +4039,7 @@ var init_NumberField = __esm({
|
|
|
3947
4039
|
},
|
|
3948
4040
|
onBlur: (e) => handleBlur(e)
|
|
3949
4041
|
};
|
|
3950
|
-
return /* @__PURE__ */ (0,
|
|
4042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3951
4043
|
TextField,
|
|
3952
4044
|
{
|
|
3953
4045
|
...forwardedProps,
|
|
@@ -3975,18 +4067,18 @@ var init_NumberField2 = __esm({
|
|
|
3975
4067
|
});
|
|
3976
4068
|
|
|
3977
4069
|
// src/components/Option/Option.tsx
|
|
3978
|
-
var
|
|
4070
|
+
var import_jsx_runtime47, Option2;
|
|
3979
4071
|
var init_Option2 = __esm({
|
|
3980
4072
|
"src/components/Option/Option.tsx"() {
|
|
3981
4073
|
"use strict";
|
|
3982
|
-
|
|
4074
|
+
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3983
4075
|
Option2 = ({ ref, ...props }) => {
|
|
3984
4076
|
const { isDisabled, ...rest } = props;
|
|
3985
4077
|
const mappedProps = {
|
|
3986
4078
|
...rest,
|
|
3987
4079
|
disabled: isDisabled
|
|
3988
4080
|
};
|
|
3989
|
-
return /* @__PURE__ */ (0,
|
|
4081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("option", { ...mappedProps, ref });
|
|
3990
4082
|
};
|
|
3991
4083
|
Option2.displayName = "Option";
|
|
3992
4084
|
}
|
|
@@ -4001,17 +4093,17 @@ var init_Option3 = __esm({
|
|
|
4001
4093
|
});
|
|
4002
4094
|
|
|
4003
4095
|
// src/components/PasswordField/ShowHideButton.tsx
|
|
4004
|
-
var import_icons10,
|
|
4096
|
+
var import_icons10, import_jsx_runtime48, ShowHideButton;
|
|
4005
4097
|
var init_ShowHideButton = __esm({
|
|
4006
4098
|
"src/components/PasswordField/ShowHideButton.tsx"() {
|
|
4007
4099
|
"use strict";
|
|
4008
4100
|
import_icons10 = require("@simplybusiness/icons");
|
|
4009
4101
|
init_src();
|
|
4010
|
-
|
|
4102
|
+
import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4011
4103
|
ShowHideButton = ({
|
|
4012
4104
|
show = false,
|
|
4013
4105
|
onClick
|
|
4014
|
-
}) => /* @__PURE__ */ (0,
|
|
4106
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4015
4107
|
"button",
|
|
4016
4108
|
{
|
|
4017
4109
|
className: "mobius-password-field__show-button",
|
|
@@ -4022,35 +4114,35 @@ var init_ShowHideButton = __esm({
|
|
|
4022
4114
|
},
|
|
4023
4115
|
"aria-label": `${show ? "Hide" : "Show"} password`,
|
|
4024
4116
|
"data-testid": "show-hide-button",
|
|
4025
|
-
children: /* @__PURE__ */ (0,
|
|
4117
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { icon: show ? import_icons10.eyeSlash : import_icons10.eye, "aria-hidden": "true" })
|
|
4026
4118
|
}
|
|
4027
4119
|
);
|
|
4028
4120
|
}
|
|
4029
4121
|
});
|
|
4030
4122
|
|
|
4031
4123
|
// src/components/PasswordField/PasswordField.tsx
|
|
4032
|
-
var
|
|
4124
|
+
var import_dedupe39, import_react33, import_PasswordField, import_jsx_runtime49, PasswordField;
|
|
4033
4125
|
var init_PasswordField = __esm({
|
|
4034
4126
|
"src/components/PasswordField/PasswordField.tsx"() {
|
|
4035
4127
|
"use strict";
|
|
4036
4128
|
"use client";
|
|
4037
|
-
|
|
4038
|
-
|
|
4129
|
+
import_dedupe39 = __toESM(require("classnames/dedupe"));
|
|
4130
|
+
import_react33 = require("react");
|
|
4039
4131
|
init_mergeRefs();
|
|
4040
4132
|
init_TextField2();
|
|
4041
4133
|
init_ShowHideButton();
|
|
4042
4134
|
import_PasswordField = require("@simplybusiness/mobius/src/components/PasswordField/PasswordField.css");
|
|
4043
|
-
|
|
4135
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4044
4136
|
PasswordField = ({
|
|
4045
4137
|
ref,
|
|
4046
4138
|
className,
|
|
4047
4139
|
autoComplete = "current-password",
|
|
4048
4140
|
...props
|
|
4049
4141
|
}) => {
|
|
4050
|
-
const [show, setShow] = (0,
|
|
4142
|
+
const [show, setShow] = (0, import_react33.useState)(false);
|
|
4051
4143
|
const type = show ? "text" : "password";
|
|
4052
|
-
const classes = (0,
|
|
4053
|
-
const localRef = (0,
|
|
4144
|
+
const classes = (0, import_dedupe39.default)("mobius-password-field", className);
|
|
4145
|
+
const localRef = (0, import_react33.useRef)(null);
|
|
4054
4146
|
const handleShowHideButtonClick = () => {
|
|
4055
4147
|
const selectionStart = localRef.current?.selectionStart;
|
|
4056
4148
|
const selectionEnd = localRef.current?.selectionEnd;
|
|
@@ -4062,7 +4154,7 @@ var init_PasswordField = __esm({
|
|
|
4062
4154
|
}
|
|
4063
4155
|
});
|
|
4064
4156
|
};
|
|
4065
|
-
return /* @__PURE__ */ (0,
|
|
4157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4066
4158
|
TextField,
|
|
4067
4159
|
{
|
|
4068
4160
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -4070,7 +4162,7 @@ var init_PasswordField = __esm({
|
|
|
4070
4162
|
...props,
|
|
4071
4163
|
autoComplete,
|
|
4072
4164
|
type,
|
|
4073
|
-
suffixInside: /* @__PURE__ */ (0,
|
|
4165
|
+
suffixInside: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ShowHideButton, { onClick: handleShowHideButtonClick, show })
|
|
4074
4166
|
}
|
|
4075
4167
|
);
|
|
4076
4168
|
};
|
|
@@ -4087,17 +4179,17 @@ var init_PasswordField2 = __esm({
|
|
|
4087
4179
|
});
|
|
4088
4180
|
|
|
4089
4181
|
// src/components/Popover/Popover.tsx
|
|
4090
|
-
var
|
|
4182
|
+
var import_react34, import_icons11, import_dedupe40, import_react35, import_mobius_hooks6, import_Popover, import_jsx_runtime50;
|
|
4091
4183
|
var init_Popover = __esm({
|
|
4092
4184
|
"src/components/Popover/Popover.tsx"() {
|
|
4093
4185
|
"use strict";
|
|
4094
|
-
|
|
4186
|
+
import_react34 = require("@floating-ui/react");
|
|
4095
4187
|
import_icons11 = require("@simplybusiness/icons");
|
|
4096
|
-
|
|
4097
|
-
|
|
4188
|
+
import_dedupe40 = __toESM(require("classnames/dedupe"));
|
|
4189
|
+
import_react35 = require("react");
|
|
4098
4190
|
import_mobius_hooks6 = require("@simplybusiness/mobius-hooks");
|
|
4099
4191
|
import_Popover = require("@simplybusiness/mobius/src/components/Popover/Popover.css");
|
|
4100
|
-
|
|
4192
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4101
4193
|
}
|
|
4102
4194
|
});
|
|
4103
4195
|
|
|
@@ -4121,17 +4213,17 @@ function warnAboutInvalidValues(value, minValue, maxValue) {
|
|
|
4121
4213
|
console.warn("Progress value is greater than maxValue");
|
|
4122
4214
|
}
|
|
4123
4215
|
}
|
|
4124
|
-
var
|
|
4216
|
+
var import_dedupe41, import_react36, import_Progress, import_jsx_runtime51, sanitizedValue, getLabelComponent, DEFAULT_VALUE, DEFAULT_MIN_VALUE, DEFAULT_MAX_VALUE, Progress;
|
|
4125
4217
|
var init_Progress = __esm({
|
|
4126
4218
|
"src/components/Progress/Progress.tsx"() {
|
|
4127
4219
|
"use strict";
|
|
4128
4220
|
"use client";
|
|
4129
|
-
|
|
4130
|
-
|
|
4221
|
+
import_dedupe41 = __toESM(require("classnames/dedupe"));
|
|
4222
|
+
import_react36 = require("react");
|
|
4131
4223
|
init_Label2();
|
|
4132
4224
|
init_VisuallyHidden2();
|
|
4133
4225
|
import_Progress = require("@simplybusiness/mobius/src/components/Progress/Progress.css");
|
|
4134
|
-
|
|
4226
|
+
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4135
4227
|
sanitizedValue = (value, defaultValue) => {
|
|
4136
4228
|
if (value === void 0 || Number.isNaN(value)) {
|
|
4137
4229
|
return defaultValue;
|
|
@@ -4140,7 +4232,7 @@ var init_Progress = __esm({
|
|
|
4140
4232
|
};
|
|
4141
4233
|
getLabelComponent = (label, progressLabelId, showLabel) => {
|
|
4142
4234
|
if (showLabel) {
|
|
4143
|
-
return /* @__PURE__ */ (0,
|
|
4235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4144
4236
|
Label,
|
|
4145
4237
|
{
|
|
4146
4238
|
id: progressLabelId,
|
|
@@ -4150,7 +4242,7 @@ var init_Progress = __esm({
|
|
|
4150
4242
|
}
|
|
4151
4243
|
);
|
|
4152
4244
|
}
|
|
4153
|
-
return /* @__PURE__ */ (0,
|
|
4245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4154
4246
|
Label,
|
|
4155
4247
|
{
|
|
4156
4248
|
id: progressLabelId,
|
|
@@ -4164,8 +4256,8 @@ var init_Progress = __esm({
|
|
|
4164
4256
|
DEFAULT_MIN_VALUE = 0;
|
|
4165
4257
|
DEFAULT_MAX_VALUE = 100;
|
|
4166
4258
|
Progress = ({ ref, ...props }) => {
|
|
4167
|
-
const progressId = (0,
|
|
4168
|
-
const progressLabelId = (0,
|
|
4259
|
+
const progressId = (0, import_react36.useId)();
|
|
4260
|
+
const progressLabelId = (0, import_react36.useId)();
|
|
4169
4261
|
const {
|
|
4170
4262
|
id,
|
|
4171
4263
|
label,
|
|
@@ -4190,7 +4282,7 @@ var init_Progress = __esm({
|
|
|
4190
4282
|
100
|
|
4191
4283
|
);
|
|
4192
4284
|
const barWidth = `${percentage}%`;
|
|
4193
|
-
const classes = (0,
|
|
4285
|
+
const classes = (0, import_dedupe41.default)("mobius", "mobius-progress", className, {
|
|
4194
4286
|
"--is-primary": variant === "primary",
|
|
4195
4287
|
"--is-secondary": variant === "secondary"
|
|
4196
4288
|
});
|
|
@@ -4200,7 +4292,7 @@ var init_Progress = __esm({
|
|
|
4200
4292
|
progressBarProps["aria-valuenow"] = value.toString();
|
|
4201
4293
|
progressBarProps["aria-valuetext"] = valueFormatter instanceof Function ? valueFormatter(value, minValue, maxValue) : barWidth;
|
|
4202
4294
|
const labelComponent = getLabelComponent(label, progressLabelId, showLabel);
|
|
4203
|
-
return /* @__PURE__ */ (0,
|
|
4295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
4204
4296
|
"div",
|
|
4205
4297
|
{
|
|
4206
4298
|
id: id || progressId,
|
|
@@ -4211,8 +4303,8 @@ var init_Progress = __esm({
|
|
|
4211
4303
|
"aria-labelledby": progressLabelId,
|
|
4212
4304
|
children: [
|
|
4213
4305
|
labelComponent,
|
|
4214
|
-
/* @__PURE__ */ (0,
|
|
4215
|
-
showValueLabel && /* @__PURE__ */ (0,
|
|
4306
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mobius-progress__track", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mobius-progress__bar", style: { width: barWidth } }) }),
|
|
4307
|
+
showValueLabel && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Label, { "data-testid": "value-label", elementType: "span", children: progressBarProps["aria-valuetext"] })
|
|
4216
4308
|
]
|
|
4217
4309
|
}
|
|
4218
4310
|
);
|
|
@@ -4230,47 +4322,47 @@ var init_Progress2 = __esm({
|
|
|
4230
4322
|
});
|
|
4231
4323
|
|
|
4232
4324
|
// src/components/Segment/SegmentGroup.tsx
|
|
4233
|
-
var
|
|
4325
|
+
var import_dedupe42, import_jsx_runtime52, SegmentGroup;
|
|
4234
4326
|
var init_SegmentGroup = __esm({
|
|
4235
4327
|
"src/components/Segment/SegmentGroup.tsx"() {
|
|
4236
4328
|
"use strict";
|
|
4237
|
-
|
|
4238
|
-
|
|
4329
|
+
import_dedupe42 = __toESM(require("classnames/dedupe"));
|
|
4330
|
+
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4239
4331
|
SegmentGroup = (props) => {
|
|
4240
4332
|
const { children, horizontal, gap, className, ...rest } = props;
|
|
4241
4333
|
const gapClass = gap ? `gap-${gap}` : "";
|
|
4242
|
-
const classes = (0,
|
|
4334
|
+
const classes = (0, import_dedupe42.default)(
|
|
4243
4335
|
"mobius",
|
|
4244
4336
|
"mobius-segment-group",
|
|
4245
4337
|
className,
|
|
4246
4338
|
{ "--is-horizontal": horizontal },
|
|
4247
4339
|
gapClass
|
|
4248
4340
|
);
|
|
4249
|
-
return /* @__PURE__ */ (0,
|
|
4341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: classes, ...rest, children });
|
|
4250
4342
|
};
|
|
4251
4343
|
SegmentGroup.displayName = "SegmentGroup";
|
|
4252
4344
|
}
|
|
4253
4345
|
});
|
|
4254
4346
|
|
|
4255
4347
|
// src/components/Segment/Segment.tsx
|
|
4256
|
-
var
|
|
4348
|
+
var import_dedupe43, import_Segment, import_jsx_runtime53, Segment;
|
|
4257
4349
|
var init_Segment = __esm({
|
|
4258
4350
|
"src/components/Segment/Segment.tsx"() {
|
|
4259
4351
|
"use strict";
|
|
4260
|
-
|
|
4352
|
+
import_dedupe43 = __toESM(require("classnames/dedupe"));
|
|
4261
4353
|
import_Segment = require("@simplybusiness/mobius/src/components/Segment/Segment.css");
|
|
4262
|
-
|
|
4354
|
+
import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4263
4355
|
Segment = (props) => {
|
|
4264
4356
|
const { heading, children, colour, inverted, className, ...rest } = props;
|
|
4265
|
-
const classes = (0,
|
|
4357
|
+
const classes = (0, import_dedupe43.default)(
|
|
4266
4358
|
"mobius",
|
|
4267
4359
|
"mobius-segment",
|
|
4268
4360
|
colour,
|
|
4269
4361
|
{ inverted },
|
|
4270
4362
|
className
|
|
4271
4363
|
);
|
|
4272
|
-
return /* @__PURE__ */ (0,
|
|
4273
|
-
heading && /* @__PURE__ */ (0,
|
|
4364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: classes, ...rest, children: [
|
|
4365
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mobius-segment__heading", children: heading }),
|
|
4274
4366
|
children
|
|
4275
4367
|
] });
|
|
4276
4368
|
};
|
|
@@ -4288,14 +4380,14 @@ var init_Segment2 = __esm({
|
|
|
4288
4380
|
});
|
|
4289
4381
|
|
|
4290
4382
|
// src/components/Select/Select.tsx
|
|
4291
|
-
var import_icons12,
|
|
4383
|
+
var import_icons12, import_dedupe44, import_react37, import_Select, import_jsx_runtime54, Select;
|
|
4292
4384
|
var init_Select = __esm({
|
|
4293
4385
|
"src/components/Select/Select.tsx"() {
|
|
4294
4386
|
"use strict";
|
|
4295
4387
|
"use client";
|
|
4296
4388
|
import_icons12 = require("@simplybusiness/icons");
|
|
4297
|
-
|
|
4298
|
-
|
|
4389
|
+
import_dedupe44 = __toESM(require("classnames/dedupe"));
|
|
4390
|
+
import_react37 = require("react");
|
|
4299
4391
|
init_hooks();
|
|
4300
4392
|
init_useLabel2();
|
|
4301
4393
|
init_spaceDelimitedList();
|
|
@@ -4304,7 +4396,7 @@ var init_Select = __esm({
|
|
|
4304
4396
|
init_Label2();
|
|
4305
4397
|
init_Stack2();
|
|
4306
4398
|
import_Select = require("@simplybusiness/mobius/src/components/Select/Select.css");
|
|
4307
|
-
|
|
4399
|
+
import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4308
4400
|
Select = ({ ref, ...props }) => {
|
|
4309
4401
|
const {
|
|
4310
4402
|
label,
|
|
@@ -4325,24 +4417,24 @@ var init_Select = __esm({
|
|
|
4325
4417
|
"--is-required": typeof isRequired === "boolean" && isRequired,
|
|
4326
4418
|
"--is-optional": typeof isRequired === "boolean" && !isRequired
|
|
4327
4419
|
};
|
|
4328
|
-
const sharedClasses = (0,
|
|
4329
|
-
const wrapperClasses = (0,
|
|
4420
|
+
const sharedClasses = (0, import_dedupe44.default)(validationClasses, stateClasses);
|
|
4421
|
+
const wrapperClasses = (0, import_dedupe44.default)(
|
|
4330
4422
|
"mobius-select__wrapper",
|
|
4331
4423
|
sharedClasses,
|
|
4332
4424
|
otherProps.className
|
|
4333
4425
|
);
|
|
4334
|
-
const selectClasses = (0,
|
|
4426
|
+
const selectClasses = (0, import_dedupe44.default)(
|
|
4335
4427
|
"mobius-select",
|
|
4336
4428
|
sharedClasses,
|
|
4337
4429
|
otherProps.className
|
|
4338
4430
|
);
|
|
4339
|
-
const labelClasses = (0,
|
|
4431
|
+
const labelClasses = (0, import_dedupe44.default)(
|
|
4340
4432
|
"mobius-label",
|
|
4341
4433
|
sharedClasses,
|
|
4342
4434
|
otherProps.className
|
|
4343
4435
|
);
|
|
4344
|
-
const iconClasses = (0,
|
|
4345
|
-
const errorMessageId = (0,
|
|
4436
|
+
const iconClasses = (0, import_dedupe44.default)("mobius-select__icon", sharedClasses);
|
|
4437
|
+
const errorMessageId = (0, import_react37.useId)();
|
|
4346
4438
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
4347
4439
|
const describedBy = spaceDelimitedList([
|
|
4348
4440
|
shouldErrorMessageShow,
|
|
@@ -4353,10 +4445,10 @@ var init_Select = __esm({
|
|
|
4353
4445
|
onChange(e);
|
|
4354
4446
|
}
|
|
4355
4447
|
};
|
|
4356
|
-
return /* @__PURE__ */ (0,
|
|
4357
|
-
label && /* @__PURE__ */ (0,
|
|
4358
|
-
/* @__PURE__ */ (0,
|
|
4359
|
-
/* @__PURE__ */ (0,
|
|
4448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Stack, { className: "mobius mobius-select__outer", gap: "xs", children: [
|
|
4449
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Label, { ...labelProps, className: labelClasses, children: label }),
|
|
4450
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: wrapperClasses, children: [
|
|
4451
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4360
4452
|
"select",
|
|
4361
4453
|
{
|
|
4362
4454
|
...otherProps,
|
|
@@ -4372,9 +4464,9 @@ var init_Select = __esm({
|
|
|
4372
4464
|
onChange: handleChange
|
|
4373
4465
|
}
|
|
4374
4466
|
),
|
|
4375
|
-
/* @__PURE__ */ (0,
|
|
4467
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon, { icon: import_icons12.chevronDown }) })
|
|
4376
4468
|
] }),
|
|
4377
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
4469
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
4378
4470
|
] });
|
|
4379
4471
|
};
|
|
4380
4472
|
Select.displayName = "Select";
|
|
@@ -4390,15 +4482,15 @@ var init_Select2 = __esm({
|
|
|
4390
4482
|
});
|
|
4391
4483
|
|
|
4392
4484
|
// src/components/Slider/Slider.tsx
|
|
4393
|
-
var
|
|
4485
|
+
var import_dedupe45, import_react38, import_Slider, import_jsx_runtime55;
|
|
4394
4486
|
var init_Slider = __esm({
|
|
4395
4487
|
"src/components/Slider/Slider.tsx"() {
|
|
4396
4488
|
"use strict";
|
|
4397
4489
|
"use client";
|
|
4398
|
-
|
|
4399
|
-
|
|
4490
|
+
import_dedupe45 = __toESM(require("classnames/dedupe"));
|
|
4491
|
+
import_react38 = require("react");
|
|
4400
4492
|
import_Slider = require("@simplybusiness/mobius/src/components/Slider/Slider.css");
|
|
4401
|
-
|
|
4493
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4402
4494
|
}
|
|
4403
4495
|
});
|
|
4404
4496
|
|
|
@@ -4411,19 +4503,19 @@ var init_Slider2 = __esm({
|
|
|
4411
4503
|
});
|
|
4412
4504
|
|
|
4413
4505
|
// src/components/SVG/SVG.tsx
|
|
4414
|
-
var
|
|
4506
|
+
var import_react39, import_dedupe46, import_jsx_runtime56, SVG;
|
|
4415
4507
|
var init_SVG = __esm({
|
|
4416
4508
|
"src/components/SVG/SVG.tsx"() {
|
|
4417
4509
|
"use strict";
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4510
|
+
import_react39 = require("react");
|
|
4511
|
+
import_dedupe46 = __toESM(require("classnames/dedupe"));
|
|
4512
|
+
import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4421
4513
|
SVG = ({ ref, ...props }) => {
|
|
4422
4514
|
const { children, className, ...otherProps } = props;
|
|
4423
|
-
const classes = (0,
|
|
4424
|
-
const svgNode =
|
|
4515
|
+
const classes = (0, import_dedupe46.default)("mobius", "mobius-svg", className);
|
|
4516
|
+
const svgNode = import_react39.Children.only(children);
|
|
4425
4517
|
const { children: svgChildren, viewBox, xmlns } = svgNode.props;
|
|
4426
|
-
return /* @__PURE__ */ (0,
|
|
4518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4427
4519
|
"svg",
|
|
4428
4520
|
{
|
|
4429
4521
|
viewBox,
|
|
@@ -4448,16 +4540,16 @@ var init_SVG2 = __esm({
|
|
|
4448
4540
|
});
|
|
4449
4541
|
|
|
4450
4542
|
// src/components/Switch/Switch.tsx
|
|
4451
|
-
var
|
|
4543
|
+
var import_react40, import_dedupe47, import_Switch, import_jsx_runtime57, Switch;
|
|
4452
4544
|
var init_Switch = __esm({
|
|
4453
4545
|
"src/components/Switch/Switch.tsx"() {
|
|
4454
4546
|
"use strict";
|
|
4455
4547
|
"use client";
|
|
4456
|
-
|
|
4457
|
-
|
|
4548
|
+
import_react40 = require("react");
|
|
4549
|
+
import_dedupe47 = __toESM(require("classnames/dedupe"));
|
|
4458
4550
|
init_VisuallyHidden2();
|
|
4459
4551
|
import_Switch = require("@simplybusiness/mobius/src/components/Switch/Switch.css");
|
|
4460
|
-
|
|
4552
|
+
import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4461
4553
|
Switch = ({ ref, ...props }) => {
|
|
4462
4554
|
const {
|
|
4463
4555
|
checked = false,
|
|
@@ -4466,11 +4558,11 @@ var init_Switch = __esm({
|
|
|
4466
4558
|
isDisabled = false,
|
|
4467
4559
|
...otherProps
|
|
4468
4560
|
} = props;
|
|
4469
|
-
const [enabled, setEnabled] = (0,
|
|
4470
|
-
(0,
|
|
4561
|
+
const [enabled, setEnabled] = (0, import_react40.useState)(checked);
|
|
4562
|
+
(0, import_react40.useEffect)(() => {
|
|
4471
4563
|
setEnabled(checked);
|
|
4472
4564
|
}, [checked]);
|
|
4473
|
-
const classes = (0,
|
|
4565
|
+
const classes = (0, import_dedupe47.default)(
|
|
4474
4566
|
"mobius",
|
|
4475
4567
|
"mobius-switch",
|
|
4476
4568
|
{
|
|
@@ -4485,9 +4577,9 @@ var init_Switch = __esm({
|
|
|
4485
4577
|
onChange(event);
|
|
4486
4578
|
}
|
|
4487
4579
|
};
|
|
4488
|
-
return /* @__PURE__ */ (0,
|
|
4489
|
-
/* @__PURE__ */ (0,
|
|
4490
|
-
/* @__PURE__ */ (0,
|
|
4580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("label", { ref, className: classes, children: [
|
|
4581
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { children: enabled ? "On" : "Off" }) }),
|
|
4582
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4491
4583
|
"input",
|
|
4492
4584
|
{
|
|
4493
4585
|
type: "checkbox",
|
|
@@ -4498,7 +4590,7 @@ var init_Switch = __esm({
|
|
|
4498
4590
|
...otherProps
|
|
4499
4591
|
}
|
|
4500
4592
|
),
|
|
4501
|
-
/* @__PURE__ */ (0,
|
|
4593
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "mobius-switch__slider" })
|
|
4502
4594
|
] });
|
|
4503
4595
|
};
|
|
4504
4596
|
Switch.displayName = "Switch";
|
|
@@ -4514,114 +4606,114 @@ var init_Switch2 = __esm({
|
|
|
4514
4606
|
});
|
|
4515
4607
|
|
|
4516
4608
|
// src/components/Table/Table.tsx
|
|
4517
|
-
var
|
|
4609
|
+
var import_dedupe48, import_Table, import_jsx_runtime58, Table;
|
|
4518
4610
|
var init_Table = __esm({
|
|
4519
4611
|
"src/components/Table/Table.tsx"() {
|
|
4520
4612
|
"use strict";
|
|
4521
|
-
|
|
4613
|
+
import_dedupe48 = __toESM(require("classnames/dedupe"));
|
|
4522
4614
|
import_Table = require("@simplybusiness/mobius/src/components/Table/Table.css");
|
|
4523
|
-
|
|
4615
|
+
import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4524
4616
|
Table = ({ ref, ...props }) => {
|
|
4525
|
-
const classes = (0,
|
|
4526
|
-
return /* @__PURE__ */ (0,
|
|
4617
|
+
const classes = (0, import_dedupe48.default)("mobius", "mobius-table", props.className);
|
|
4618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("table", { ref, ...props, className: classes });
|
|
4527
4619
|
};
|
|
4528
4620
|
Table.displayName = "Table";
|
|
4529
4621
|
}
|
|
4530
4622
|
});
|
|
4531
4623
|
|
|
4532
4624
|
// src/components/Table/Head.tsx
|
|
4533
|
-
var
|
|
4625
|
+
var import_dedupe49, import_jsx_runtime59, Head;
|
|
4534
4626
|
var init_Head = __esm({
|
|
4535
4627
|
"src/components/Table/Head.tsx"() {
|
|
4536
4628
|
"use strict";
|
|
4537
|
-
|
|
4538
|
-
|
|
4629
|
+
import_dedupe49 = __toESM(require("classnames/dedupe"));
|
|
4630
|
+
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4539
4631
|
Head = ({ ref, ...props }) => {
|
|
4540
|
-
const classes = (0,
|
|
4541
|
-
return /* @__PURE__ */ (0,
|
|
4632
|
+
const classes = (0, import_dedupe49.default)("mobius", "mobius-table__head", props.className);
|
|
4633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("thead", { ref, ...props, className: classes });
|
|
4542
4634
|
};
|
|
4543
4635
|
Head.displayName = "Table.Head";
|
|
4544
4636
|
}
|
|
4545
4637
|
});
|
|
4546
4638
|
|
|
4547
4639
|
// src/components/Table/Body.tsx
|
|
4548
|
-
var
|
|
4640
|
+
var import_dedupe50, import_jsx_runtime60, Body;
|
|
4549
4641
|
var init_Body = __esm({
|
|
4550
4642
|
"src/components/Table/Body.tsx"() {
|
|
4551
4643
|
"use strict";
|
|
4552
|
-
|
|
4553
|
-
|
|
4644
|
+
import_dedupe50 = __toESM(require("classnames/dedupe"));
|
|
4645
|
+
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4554
4646
|
Body = ({ ref, ...props }) => {
|
|
4555
|
-
const classes = (0,
|
|
4556
|
-
return /* @__PURE__ */ (0,
|
|
4647
|
+
const classes = (0, import_dedupe50.default)("mobius", "mobius-table__body", props.className);
|
|
4648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("tbody", { ref, ...props, className: classes });
|
|
4557
4649
|
};
|
|
4558
4650
|
Body.displayName = "Table.Body";
|
|
4559
4651
|
}
|
|
4560
4652
|
});
|
|
4561
4653
|
|
|
4562
4654
|
// src/components/Table/Foot.tsx
|
|
4563
|
-
var
|
|
4655
|
+
var import_dedupe51, import_jsx_runtime61, Foot;
|
|
4564
4656
|
var init_Foot = __esm({
|
|
4565
4657
|
"src/components/Table/Foot.tsx"() {
|
|
4566
4658
|
"use strict";
|
|
4567
|
-
|
|
4568
|
-
|
|
4659
|
+
import_dedupe51 = __toESM(require("classnames/dedupe"));
|
|
4660
|
+
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4569
4661
|
Foot = ({ ref, ...props }) => {
|
|
4570
|
-
const classes = (0,
|
|
4571
|
-
return /* @__PURE__ */ (0,
|
|
4662
|
+
const classes = (0, import_dedupe51.default)("mobius", "mobius-table__foot", props.className);
|
|
4663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tfoot", { ref, ...props, className: classes });
|
|
4572
4664
|
};
|
|
4573
4665
|
Foot.displayName = "Table.Foot";
|
|
4574
4666
|
}
|
|
4575
4667
|
});
|
|
4576
4668
|
|
|
4577
4669
|
// src/components/Table/Row.tsx
|
|
4578
|
-
var
|
|
4670
|
+
var import_dedupe52, import_jsx_runtime62, Row;
|
|
4579
4671
|
var init_Row = __esm({
|
|
4580
4672
|
"src/components/Table/Row.tsx"() {
|
|
4581
4673
|
"use strict";
|
|
4582
|
-
|
|
4583
|
-
|
|
4674
|
+
import_dedupe52 = __toESM(require("classnames/dedupe"));
|
|
4675
|
+
import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4584
4676
|
Row = ({ ref, ...props }) => {
|
|
4585
|
-
const classes = (0,
|
|
4586
|
-
return /* @__PURE__ */ (0,
|
|
4677
|
+
const classes = (0, import_dedupe52.default)("mobius", "mobius-table__row", props.className);
|
|
4678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("tr", { ref, ...props, className: classes });
|
|
4587
4679
|
};
|
|
4588
4680
|
Row.displayName = "Table.Row";
|
|
4589
4681
|
}
|
|
4590
4682
|
});
|
|
4591
4683
|
|
|
4592
4684
|
// src/components/Table/HeaderCell.tsx
|
|
4593
|
-
var
|
|
4685
|
+
var import_dedupe53, import_jsx_runtime63, HeaderCell;
|
|
4594
4686
|
var init_HeaderCell = __esm({
|
|
4595
4687
|
"src/components/Table/HeaderCell.tsx"() {
|
|
4596
4688
|
"use strict";
|
|
4597
|
-
|
|
4598
|
-
|
|
4689
|
+
import_dedupe53 = __toESM(require("classnames/dedupe"));
|
|
4690
|
+
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4599
4691
|
HeaderCell = ({ ref, ...props }) => {
|
|
4600
|
-
const classes = (0,
|
|
4692
|
+
const classes = (0, import_dedupe53.default)(
|
|
4601
4693
|
"mobius",
|
|
4602
4694
|
"mobius-table__head-cell",
|
|
4603
4695
|
props.className
|
|
4604
4696
|
);
|
|
4605
|
-
return /* @__PURE__ */ (0,
|
|
4697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("th", { ...props, ref, className: classes });
|
|
4606
4698
|
};
|
|
4607
4699
|
HeaderCell.displayName = "Table.HeaderCell";
|
|
4608
4700
|
}
|
|
4609
4701
|
});
|
|
4610
4702
|
|
|
4611
4703
|
// src/components/Table/Cell.tsx
|
|
4612
|
-
var
|
|
4704
|
+
var import_dedupe54, import_jsx_runtime64, Cell;
|
|
4613
4705
|
var init_Cell = __esm({
|
|
4614
4706
|
"src/components/Table/Cell.tsx"() {
|
|
4615
4707
|
"use strict";
|
|
4616
|
-
|
|
4617
|
-
|
|
4708
|
+
import_dedupe54 = __toESM(require("classnames/dedupe"));
|
|
4709
|
+
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4618
4710
|
Cell = ({ ref, ...props }) => {
|
|
4619
|
-
const classes = (0,
|
|
4711
|
+
const classes = (0, import_dedupe54.default)(
|
|
4620
4712
|
"mobius",
|
|
4621
4713
|
"mobius-table__body-cell",
|
|
4622
4714
|
props.className
|
|
4623
4715
|
);
|
|
4624
|
-
return /* @__PURE__ */ (0,
|
|
4716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("td", { ref, ...props, className: classes });
|
|
4625
4717
|
};
|
|
4626
4718
|
Cell.displayName = "Table.Cell";
|
|
4627
4719
|
}
|
|
@@ -4651,37 +4743,6 @@ var init_Table2 = __esm({
|
|
|
4651
4743
|
}
|
|
4652
4744
|
});
|
|
4653
4745
|
|
|
4654
|
-
// src/components/Text/Text.tsx
|
|
4655
|
-
var import_dedupe54, import_Text, import_jsx_runtime63, getElementType, Text;
|
|
4656
|
-
var init_Text = __esm({
|
|
4657
|
-
"src/components/Text/Text.tsx"() {
|
|
4658
|
-
"use strict";
|
|
4659
|
-
import_dedupe54 = __toESM(require("classnames/dedupe"));
|
|
4660
|
-
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
4661
|
-
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4662
|
-
getElementType = (variant, elementType) => {
|
|
4663
|
-
if (variant) {
|
|
4664
|
-
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
4665
|
-
}
|
|
4666
|
-
return elementType || "p";
|
|
4667
|
-
};
|
|
4668
|
-
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
4669
|
-
const { variant, className, spacing, ...otherProps } = props;
|
|
4670
|
-
const elementType = getElementType(variant, Component);
|
|
4671
|
-
const variantType = variant || elementType;
|
|
4672
|
-
const classes = (0, import_dedupe54.default)(
|
|
4673
|
-
"mobius",
|
|
4674
|
-
"mobius-text",
|
|
4675
|
-
{ [`--is-${variantType}`]: variantType },
|
|
4676
|
-
{ [`--has-line-height-${spacing}`]: spacing },
|
|
4677
|
-
className
|
|
4678
|
-
);
|
|
4679
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
4680
|
-
};
|
|
4681
|
-
Text.displayName = "Text";
|
|
4682
|
-
}
|
|
4683
|
-
});
|
|
4684
|
-
|
|
4685
4746
|
// src/components/Text/index.tsx
|
|
4686
4747
|
var init_Text2 = __esm({
|
|
4687
4748
|
"src/components/Text/index.tsx"() {
|
|
@@ -4691,12 +4752,12 @@ var init_Text2 = __esm({
|
|
|
4691
4752
|
});
|
|
4692
4753
|
|
|
4693
4754
|
// src/components/TextAreaInput/TextAreaInput.tsx
|
|
4694
|
-
var import_dedupe55,
|
|
4755
|
+
var import_dedupe55, import_jsx_runtime65, TextAreaInput;
|
|
4695
4756
|
var init_TextAreaInput = __esm({
|
|
4696
4757
|
"src/components/TextAreaInput/TextAreaInput.tsx"() {
|
|
4697
4758
|
"use strict";
|
|
4698
4759
|
import_dedupe55 = __toESM(require("classnames/dedupe"));
|
|
4699
|
-
|
|
4760
|
+
import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4700
4761
|
TextAreaInput = ({ ref, ...props }) => {
|
|
4701
4762
|
const { isSelected, isDisabled, isReadOnly, isRequired, ...otherProps } = props;
|
|
4702
4763
|
const classes = (0, import_dedupe55.default)(
|
|
@@ -4709,7 +4770,7 @@ var init_TextAreaInput = __esm({
|
|
|
4709
4770
|
},
|
|
4710
4771
|
otherProps.className
|
|
4711
4772
|
);
|
|
4712
|
-
return /* @__PURE__ */ (0,
|
|
4773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4713
4774
|
"textarea",
|
|
4714
4775
|
{
|
|
4715
4776
|
ref,
|
|
@@ -4733,7 +4794,7 @@ var init_TextAreaInput2 = __esm({
|
|
|
4733
4794
|
});
|
|
4734
4795
|
|
|
4735
4796
|
// src/components/TextArea/TextArea.tsx
|
|
4736
|
-
var import_dedupe56, import_TextArea,
|
|
4797
|
+
var import_dedupe56, import_TextArea, import_jsx_runtime66, TextArea;
|
|
4737
4798
|
var init_TextArea = __esm({
|
|
4738
4799
|
"src/components/TextArea/TextArea.tsx"() {
|
|
4739
4800
|
"use strict";
|
|
@@ -4745,7 +4806,7 @@ var init_TextArea = __esm({
|
|
|
4745
4806
|
init_Stack2();
|
|
4746
4807
|
init_TextAreaInput2();
|
|
4747
4808
|
import_TextArea = require("@simplybusiness/mobius/src/components/TextArea/TextArea.css");
|
|
4748
|
-
|
|
4809
|
+
import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4749
4810
|
TextArea = ({ ref, ...props }) => {
|
|
4750
4811
|
const {
|
|
4751
4812
|
isDisabled,
|
|
@@ -4765,9 +4826,9 @@ var init_TextArea = __esm({
|
|
|
4765
4826
|
},
|
|
4766
4827
|
validationClasses
|
|
4767
4828
|
);
|
|
4768
|
-
return /* @__PURE__ */ (0,
|
|
4769
|
-
label && /* @__PURE__ */ (0,
|
|
4770
|
-
/* @__PURE__ */ (0,
|
|
4829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Stack, { className: classes, gap: "xs", children: [
|
|
4830
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Label, { ...labelProps, className: labelClasses, children: props.label }),
|
|
4831
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4771
4832
|
TextAreaInput,
|
|
4772
4833
|
{
|
|
4773
4834
|
...otherProps,
|
|
@@ -4778,7 +4839,7 @@ var init_TextArea = __esm({
|
|
|
4778
4839
|
"aria-invalid": errorMessage != null
|
|
4779
4840
|
}
|
|
4780
4841
|
),
|
|
4781
|
-
/* @__PURE__ */ (0,
|
|
4842
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorMessage, { ...errorMessageProps, errorMessage })
|
|
4782
4843
|
] });
|
|
4783
4844
|
};
|
|
4784
4845
|
TextArea.displayName = "TextArea";
|
|
@@ -4793,53 +4854,6 @@ var init_TextArea2 = __esm({
|
|
|
4793
4854
|
}
|
|
4794
4855
|
});
|
|
4795
4856
|
|
|
4796
|
-
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
4797
|
-
var import_react40, import_jsx_runtime66, isHTML, TextOrHTML;
|
|
4798
|
-
var init_TextOrHTML = __esm({
|
|
4799
|
-
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
4800
|
-
"use strict";
|
|
4801
|
-
import_react40 = require("react");
|
|
4802
|
-
init_Text();
|
|
4803
|
-
import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4804
|
-
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
4805
|
-
TextOrHTML = ({
|
|
4806
|
-
ref,
|
|
4807
|
-
text,
|
|
4808
|
-
htmlClassName,
|
|
4809
|
-
htmlElementType,
|
|
4810
|
-
textWrapper = false,
|
|
4811
|
-
autoDetect = false,
|
|
4812
|
-
...textProps
|
|
4813
|
-
}) => {
|
|
4814
|
-
const textIsHTML = autoDetect && isHTML(text);
|
|
4815
|
-
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
4816
|
-
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
4817
|
-
const DangerousComponent = resolvedElementType;
|
|
4818
|
-
const dangerousHTML = (0, import_react40.useMemo)(() => ({ __html: text }), [text]);
|
|
4819
|
-
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4820
|
-
DangerousComponent,
|
|
4821
|
-
{
|
|
4822
|
-
className: htmlClassName,
|
|
4823
|
-
dangerouslySetInnerHTML: dangerousHTML
|
|
4824
|
-
}
|
|
4825
|
-
);
|
|
4826
|
-
if (shouldWrapInText) {
|
|
4827
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
4828
|
-
}
|
|
4829
|
-
return dangerousElement;
|
|
4830
|
-
};
|
|
4831
|
-
TextOrHTML.displayName = "TextOrHTML";
|
|
4832
|
-
}
|
|
4833
|
-
});
|
|
4834
|
-
|
|
4835
|
-
// src/components/TextOrHTML/index.tsx
|
|
4836
|
-
var init_TextOrHTML2 = __esm({
|
|
4837
|
-
"src/components/TextOrHTML/index.tsx"() {
|
|
4838
|
-
"use strict";
|
|
4839
|
-
init_TextOrHTML();
|
|
4840
|
-
}
|
|
4841
|
-
});
|
|
4842
|
-
|
|
4843
4857
|
// src/components/Title/Title.tsx
|
|
4844
4858
|
var import_dedupe57, import_Title, import_jsx_runtime67, Title;
|
|
4845
4859
|
var init_Title = __esm({
|