@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
|
@@ -1951,6 +1951,10 @@ var init_AddressLookup = __esm({
|
|
|
1951
1951
|
);
|
|
1952
1952
|
const handleSelected = (selected) => {
|
|
1953
1953
|
setError(null);
|
|
1954
|
+
const isEmpty = typeof selected === "string" ? selected === "" : !selected.id && !selected.value;
|
|
1955
|
+
if (isEmpty) {
|
|
1956
|
+
return Promise.resolve();
|
|
1957
|
+
}
|
|
1954
1958
|
if (typeof selected === "string" || !selected.id) {
|
|
1955
1959
|
setError(new Error("Selected option missing id"));
|
|
1956
1960
|
return Promise.resolve();
|
|
@@ -1998,19 +2002,98 @@ var init_AddressLookup2 = __esm({
|
|
|
1998
2002
|
}
|
|
1999
2003
|
});
|
|
2000
2004
|
|
|
2005
|
+
// src/components/Text/Text.tsx
|
|
2006
|
+
var import_dedupe10, import_Text, import_jsx_runtime12, getElementType, Text;
|
|
2007
|
+
var init_Text = __esm({
|
|
2008
|
+
"src/components/Text/Text.tsx"() {
|
|
2009
|
+
"use strict";
|
|
2010
|
+
import_dedupe10 = __toESM(require("classnames/dedupe"));
|
|
2011
|
+
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
2012
|
+
import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2013
|
+
getElementType = (variant, elementType) => {
|
|
2014
|
+
if (variant) {
|
|
2015
|
+
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
2016
|
+
}
|
|
2017
|
+
return elementType || "p";
|
|
2018
|
+
};
|
|
2019
|
+
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
2020
|
+
const { variant, className, spacing, ...otherProps } = props;
|
|
2021
|
+
const elementType = getElementType(variant, Component);
|
|
2022
|
+
const variantType = variant || elementType;
|
|
2023
|
+
const classes = (0, import_dedupe10.default)(
|
|
2024
|
+
"mobius",
|
|
2025
|
+
"mobius-text",
|
|
2026
|
+
{ [`--is-${variantType}`]: variantType },
|
|
2027
|
+
{ [`--has-line-height-${spacing}`]: spacing },
|
|
2028
|
+
className
|
|
2029
|
+
);
|
|
2030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
2031
|
+
};
|
|
2032
|
+
Text.displayName = "Text";
|
|
2033
|
+
}
|
|
2034
|
+
});
|
|
2035
|
+
|
|
2036
|
+
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
2037
|
+
var import_react14, import_jsx_runtime13, isHTML, TextOrHTML;
|
|
2038
|
+
var init_TextOrHTML = __esm({
|
|
2039
|
+
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
2040
|
+
"use strict";
|
|
2041
|
+
import_react14 = require("react");
|
|
2042
|
+
init_Text();
|
|
2043
|
+
import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2044
|
+
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
2045
|
+
TextOrHTML = ({
|
|
2046
|
+
ref,
|
|
2047
|
+
text,
|
|
2048
|
+
htmlClassName,
|
|
2049
|
+
htmlElementType,
|
|
2050
|
+
textWrapper = false,
|
|
2051
|
+
autoDetect = false,
|
|
2052
|
+
...textProps
|
|
2053
|
+
}) => {
|
|
2054
|
+
const textIsHTML = autoDetect && isHTML(text);
|
|
2055
|
+
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
2056
|
+
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
2057
|
+
const DangerousComponent = resolvedElementType;
|
|
2058
|
+
const dangerousHTML = (0, import_react14.useMemo)(() => ({ __html: text }), [text]);
|
|
2059
|
+
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2060
|
+
DangerousComponent,
|
|
2061
|
+
{
|
|
2062
|
+
className: htmlClassName,
|
|
2063
|
+
dangerouslySetInnerHTML: dangerousHTML
|
|
2064
|
+
}
|
|
2065
|
+
);
|
|
2066
|
+
if (shouldWrapInText) {
|
|
2067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
2068
|
+
}
|
|
2069
|
+
return dangerousElement;
|
|
2070
|
+
};
|
|
2071
|
+
TextOrHTML.displayName = "TextOrHTML";
|
|
2072
|
+
}
|
|
2073
|
+
});
|
|
2074
|
+
|
|
2075
|
+
// src/components/TextOrHTML/index.tsx
|
|
2076
|
+
var init_TextOrHTML2 = __esm({
|
|
2077
|
+
"src/components/TextOrHTML/index.tsx"() {
|
|
2078
|
+
"use strict";
|
|
2079
|
+
init_TextOrHTML();
|
|
2080
|
+
}
|
|
2081
|
+
});
|
|
2082
|
+
|
|
2001
2083
|
// src/components/Alert/Alert.tsx
|
|
2002
2084
|
function isAlertVariant(value) {
|
|
2003
2085
|
return value === "info" || value === "success" || value === "warning" || value === "error";
|
|
2004
2086
|
}
|
|
2005
|
-
var import_icons3,
|
|
2087
|
+
var import_icons3, import_dedupe11, import_Alert, import_jsx_runtime14, Alert;
|
|
2006
2088
|
var init_Alert = __esm({
|
|
2007
2089
|
"src/components/Alert/Alert.tsx"() {
|
|
2008
2090
|
"use strict";
|
|
2009
2091
|
import_icons3 = require("@simplybusiness/icons");
|
|
2010
|
-
|
|
2092
|
+
import_dedupe11 = __toESM(require("classnames/dedupe"));
|
|
2011
2093
|
init_Icon2();
|
|
2094
|
+
init_TextOrHTML2();
|
|
2012
2095
|
import_Alert = require("@simplybusiness/mobius/src/components/Alert/Alert.css");
|
|
2013
|
-
|
|
2096
|
+
import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2014
2097
|
Alert = ({ ref, ...props }) => {
|
|
2015
2098
|
const {
|
|
2016
2099
|
elementType: Element = "div",
|
|
@@ -2023,7 +2106,7 @@ var init_Alert = __esm({
|
|
|
2023
2106
|
if (!show) return null;
|
|
2024
2107
|
const variant = variantProp && isAlertVariant(variantProp) ? variantProp : "info";
|
|
2025
2108
|
const colorValue = variant === "success" ? `var(--color-valid)` : `var(--color-${variant})`;
|
|
2026
|
-
const classes = (0,
|
|
2109
|
+
const classes = (0, import_dedupe11.default)(
|
|
2027
2110
|
"mobius",
|
|
2028
2111
|
"mobius-alert",
|
|
2029
2112
|
{
|
|
@@ -2041,14 +2124,23 @@ var init_Alert = __esm({
|
|
|
2041
2124
|
warning: import_icons3.warning,
|
|
2042
2125
|
error: import_icons3.error
|
|
2043
2126
|
};
|
|
2044
|
-
const headerClasses = (0,
|
|
2045
|
-
const iconClasses = (0,
|
|
2046
|
-
const contentClasses = (0,
|
|
2047
|
-
return /* @__PURE__ */ (0,
|
|
2048
|
-
/* @__PURE__ */ (0,
|
|
2049
|
-
/* @__PURE__ */ (0,
|
|
2050
|
-
header && /* @__PURE__ */ (0,
|
|
2051
|
-
|
|
2127
|
+
const headerClasses = (0, import_dedupe11.default)("mobius", "mobius-alert__header");
|
|
2128
|
+
const iconClasses = (0, import_dedupe11.default)("mobius", "mobius-alert__icon");
|
|
2129
|
+
const contentClasses = (0, import_dedupe11.default)("mobius", "mobius-alert__content");
|
|
2130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Element, { ref, role: "alert", ...otherProps, className: classes, children: [
|
|
2131
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { icon: icon[variant], color: colorValue }) }),
|
|
2132
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
|
|
2133
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2134
|
+
TextOrHTML,
|
|
2135
|
+
{
|
|
2136
|
+
autoDetect: true,
|
|
2137
|
+
htmlElementType: "span",
|
|
2138
|
+
className: headerClasses,
|
|
2139
|
+
htmlClassName: headerClasses,
|
|
2140
|
+
text: header
|
|
2141
|
+
}
|
|
2142
|
+
),
|
|
2143
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: contentClasses, children })
|
|
2052
2144
|
] })
|
|
2053
2145
|
] });
|
|
2054
2146
|
};
|
|
@@ -2065,14 +2157,14 @@ var init_Alert2 = __esm({
|
|
|
2065
2157
|
});
|
|
2066
2158
|
|
|
2067
2159
|
// src/components/Box/Box.tsx
|
|
2068
|
-
var
|
|
2160
|
+
var import_dedupe12, import_Box, import_jsx_runtime15, Box;
|
|
2069
2161
|
var init_Box = __esm({
|
|
2070
2162
|
"src/components/Box/Box.tsx"() {
|
|
2071
2163
|
"use strict";
|
|
2072
|
-
|
|
2164
|
+
import_dedupe12 = __toESM(require("classnames/dedupe"));
|
|
2073
2165
|
init_utils();
|
|
2074
2166
|
import_Box = require("@simplybusiness/mobius/src/components/Box/Box.css");
|
|
2075
|
-
|
|
2167
|
+
import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2076
2168
|
Box = ({ ref, ...props }) => {
|
|
2077
2169
|
const {
|
|
2078
2170
|
elementType: Element = "div",
|
|
@@ -2098,7 +2190,7 @@ var init_Box = __esm({
|
|
|
2098
2190
|
style,
|
|
2099
2191
|
...otherProps
|
|
2100
2192
|
} = props;
|
|
2101
|
-
const classes = (0,
|
|
2193
|
+
const classes = (0, import_dedupe12.default)("mobius", "mobius-box", otherProps.className);
|
|
2102
2194
|
const styleProps = filterUndefinedProps({
|
|
2103
2195
|
padding: getSpacingValue(padding),
|
|
2104
2196
|
paddingInline: getSpacingValue(paddingInline || paddingX),
|
|
@@ -2115,7 +2207,7 @@ var init_Box = __esm({
|
|
|
2115
2207
|
height,
|
|
2116
2208
|
...style
|
|
2117
2209
|
});
|
|
2118
|
-
return /* @__PURE__ */ (0,
|
|
2210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Element, { ref, style: styleProps, ...otherProps, className: classes });
|
|
2119
2211
|
};
|
|
2120
2212
|
Box.displayName = "Box";
|
|
2121
2213
|
}
|
|
@@ -2130,27 +2222,27 @@ var init_Box2 = __esm({
|
|
|
2130
2222
|
});
|
|
2131
2223
|
|
|
2132
2224
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
2133
|
-
var
|
|
2225
|
+
var import_react15, import_dedupe13, import_Breadcrumbs, import_jsx_runtime16, Breadcrumbs;
|
|
2134
2226
|
var init_Breadcrumbs = __esm({
|
|
2135
2227
|
"src/components/Breadcrumbs/Breadcrumbs.tsx"() {
|
|
2136
2228
|
"use strict";
|
|
2137
2229
|
"use client";
|
|
2138
|
-
|
|
2139
|
-
|
|
2230
|
+
import_react15 = require("react");
|
|
2231
|
+
import_dedupe13 = __toESM(require("classnames/dedupe"));
|
|
2140
2232
|
import_Breadcrumbs = require("@simplybusiness/mobius/src/components/Breadcrumbs/Breadcrumbs.css");
|
|
2141
|
-
|
|
2233
|
+
import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2142
2234
|
Breadcrumbs = ({ ref, ...props }) => {
|
|
2143
2235
|
const { "aria-label": ariaLabel = "Breadcrumbs" } = props;
|
|
2144
2236
|
const { navProps } = { navProps: { "aria-label": ariaLabel } };
|
|
2145
2237
|
const { children, ...otherProps } = props;
|
|
2146
|
-
const childArray =
|
|
2147
|
-
const classes = (0,
|
|
2238
|
+
const childArray = import_react15.Children.toArray(children);
|
|
2239
|
+
const classes = (0, import_dedupe13.default)(
|
|
2148
2240
|
"mobius",
|
|
2149
2241
|
"mobius-breadcrumb",
|
|
2150
2242
|
otherProps.className
|
|
2151
2243
|
);
|
|
2152
|
-
return /* @__PURE__ */ (0,
|
|
2153
|
-
(child, i) => (0,
|
|
2244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("nav", { ref, ...otherProps, ...navProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { children: childArray.map(
|
|
2245
|
+
(child, i) => (0, import_react15.cloneElement)(
|
|
2154
2246
|
child,
|
|
2155
2247
|
{
|
|
2156
2248
|
key: i,
|
|
@@ -2164,22 +2256,22 @@ var init_Breadcrumbs = __esm({
|
|
|
2164
2256
|
});
|
|
2165
2257
|
|
|
2166
2258
|
// src/components/Breadcrumbs/BreadcrumbItem.tsx
|
|
2167
|
-
var
|
|
2259
|
+
var import_react16, import_dedupe14, import_jsx_runtime17, BreadcrumbItem;
|
|
2168
2260
|
var init_BreadcrumbItem = __esm({
|
|
2169
2261
|
"src/components/Breadcrumbs/BreadcrumbItem.tsx"() {
|
|
2170
2262
|
"use strict";
|
|
2171
2263
|
"use client";
|
|
2172
|
-
|
|
2173
|
-
|
|
2264
|
+
import_react16 = require("react");
|
|
2265
|
+
import_dedupe14 = __toESM(require("classnames/dedupe"));
|
|
2174
2266
|
init_Box2();
|
|
2175
|
-
|
|
2267
|
+
import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2176
2268
|
BreadcrumbItem = ({ ref, ...props }) => {
|
|
2177
2269
|
const {
|
|
2178
2270
|
isDisabled = false,
|
|
2179
2271
|
isCurrent = false,
|
|
2180
2272
|
"aria-current": ariaCurrent = "page",
|
|
2181
2273
|
children,
|
|
2182
|
-
separator = /* @__PURE__ */ (0,
|
|
2274
|
+
separator = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box, { className: "mobius-breadcrumb__separator", "aria-hidden": "true", children: ">" }),
|
|
2183
2275
|
...otherProps
|
|
2184
2276
|
} = props;
|
|
2185
2277
|
const { itemProps } = {
|
|
@@ -2189,14 +2281,14 @@ var init_BreadcrumbItem = __esm({
|
|
|
2189
2281
|
...otherProps
|
|
2190
2282
|
}
|
|
2191
2283
|
};
|
|
2192
|
-
const classes = (0,
|
|
2284
|
+
const classes = (0, import_dedupe14.default)(
|
|
2193
2285
|
"mobius",
|
|
2194
2286
|
"mobius-breadcrumb__item",
|
|
2195
2287
|
props.className
|
|
2196
2288
|
);
|
|
2197
|
-
const child = typeof children === "string" ? /* @__PURE__ */ (0,
|
|
2198
|
-
return /* @__PURE__ */ (0,
|
|
2199
|
-
(0,
|
|
2289
|
+
const child = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { ...itemProps, children }) : import_react16.Children.only(children);
|
|
2290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: classes, children: [
|
|
2291
|
+
(0, import_react16.cloneElement)(child, {
|
|
2200
2292
|
...child.props,
|
|
2201
2293
|
...itemProps,
|
|
2202
2294
|
ref
|
|
@@ -2218,19 +2310,19 @@ var init_Breadcrumbs2 = __esm({
|
|
|
2218
2310
|
});
|
|
2219
2311
|
|
|
2220
2312
|
// src/components/Button/Loading.tsx
|
|
2221
|
-
var import_icons4,
|
|
2313
|
+
var import_icons4, import_jsx_runtime18, Loading;
|
|
2222
2314
|
var init_Loading = __esm({
|
|
2223
2315
|
"src/components/Button/Loading.tsx"() {
|
|
2224
2316
|
"use strict";
|
|
2225
2317
|
import_icons4 = require("@simplybusiness/icons");
|
|
2226
2318
|
init_Icon2();
|
|
2227
2319
|
init_VisuallyHidden2();
|
|
2228
|
-
|
|
2320
|
+
import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2229
2321
|
Loading = (props) => {
|
|
2230
2322
|
const { children } = props;
|
|
2231
|
-
return /* @__PURE__ */ (0,
|
|
2232
|
-
/* @__PURE__ */ (0,
|
|
2233
|
-
/* @__PURE__ */ (0,
|
|
2323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
2324
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "mobius-button__icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { icon: import_icons4.loading, spin: true, size: "md" }) }),
|
|
2325
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(VisuallyHidden, { className: "mobius-button__loading-text", children: "Loading" }),
|
|
2234
2326
|
children
|
|
2235
2327
|
] });
|
|
2236
2328
|
};
|
|
@@ -2238,33 +2330,33 @@ var init_Loading = __esm({
|
|
|
2238
2330
|
});
|
|
2239
2331
|
|
|
2240
2332
|
// src/components/Button/Success.tsx
|
|
2241
|
-
var import_icons5,
|
|
2333
|
+
var import_icons5, import_jsx_runtime19, Success;
|
|
2242
2334
|
var init_Success = __esm({
|
|
2243
2335
|
"src/components/Button/Success.tsx"() {
|
|
2244
2336
|
"use strict";
|
|
2245
2337
|
import_icons5 = require("@simplybusiness/icons");
|
|
2246
2338
|
init_Icon2();
|
|
2247
2339
|
init_VisuallyHidden2();
|
|
2248
|
-
|
|
2249
|
-
Success = () => /* @__PURE__ */ (0,
|
|
2250
|
-
/* @__PURE__ */ (0,
|
|
2251
|
-
/* @__PURE__ */ (0,
|
|
2340
|
+
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2341
|
+
Success = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
2342
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "mobius-button__icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { icon: import_icons5.tick, size: "md" }) }),
|
|
2343
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(VisuallyHidden, { className: "mobius-button__success-text", children: "Success" })
|
|
2252
2344
|
] });
|
|
2253
2345
|
}
|
|
2254
2346
|
});
|
|
2255
2347
|
|
|
2256
2348
|
// src/components/Button/Button.tsx
|
|
2257
|
-
var
|
|
2349
|
+
var import_dedupe15, import_Button, import_jsx_runtime20, Button;
|
|
2258
2350
|
var init_Button = __esm({
|
|
2259
2351
|
"src/components/Button/Button.tsx"() {
|
|
2260
2352
|
"use strict";
|
|
2261
2353
|
"use client";
|
|
2262
|
-
|
|
2354
|
+
import_dedupe15 = __toESM(require("classnames/dedupe"));
|
|
2263
2355
|
init_Loading();
|
|
2264
2356
|
init_useButton2();
|
|
2265
2357
|
init_Success();
|
|
2266
2358
|
import_Button = require("@simplybusiness/mobius/src/components/Button/Button.css");
|
|
2267
|
-
|
|
2359
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2268
2360
|
Button = ({ ref, ...props }) => {
|
|
2269
2361
|
const {
|
|
2270
2362
|
children,
|
|
@@ -2279,7 +2371,7 @@ var init_Button = __esm({
|
|
|
2279
2371
|
...otherProps
|
|
2280
2372
|
} = props;
|
|
2281
2373
|
const { buttonProps } = useButton(props);
|
|
2282
|
-
otherProps.className = (0,
|
|
2374
|
+
otherProps.className = (0, import_dedupe15.default)(
|
|
2283
2375
|
"mobius",
|
|
2284
2376
|
"mobius-button",
|
|
2285
2377
|
`--variant-${variant}`,
|
|
@@ -2291,9 +2383,9 @@ var init_Button = __esm({
|
|
|
2291
2383
|
},
|
|
2292
2384
|
otherProps.className
|
|
2293
2385
|
);
|
|
2294
|
-
return /* @__PURE__ */ (0,
|
|
2295
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
2296
|
-
isSuccess && !isLoading && /* @__PURE__ */ (0,
|
|
2386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Component, { ref, ...buttonProps, ...otherProps, children: [
|
|
2387
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Loading, { children }) : children,
|
|
2388
|
+
isSuccess && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Success, {})
|
|
2297
2389
|
] });
|
|
2298
2390
|
};
|
|
2299
2391
|
Button.displayName = "Button";
|
|
@@ -2309,16 +2401,16 @@ var init_Button2 = __esm({
|
|
|
2309
2401
|
});
|
|
2310
2402
|
|
|
2311
2403
|
// src/components/Stack/Stack.tsx
|
|
2312
|
-
var
|
|
2404
|
+
var import_dedupe16, import_Stack, import_jsx_runtime21, Stack;
|
|
2313
2405
|
var init_Stack = __esm({
|
|
2314
2406
|
"src/components/Stack/Stack.tsx"() {
|
|
2315
2407
|
"use strict";
|
|
2316
|
-
|
|
2408
|
+
import_dedupe16 = __toESM(require("classnames/dedupe"));
|
|
2317
2409
|
import_Stack = require("@simplybusiness/mobius/src/components/Stack/Stack.css");
|
|
2318
|
-
|
|
2410
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2319
2411
|
Stack = ({ ref, ...props }) => {
|
|
2320
2412
|
const { elementType: Element = "div", gap, ...otherProps } = props;
|
|
2321
|
-
const classes = (0,
|
|
2413
|
+
const classes = (0, import_dedupe16.default)(
|
|
2322
2414
|
"mobius",
|
|
2323
2415
|
"mobius-stack",
|
|
2324
2416
|
{
|
|
@@ -2326,7 +2418,7 @@ var init_Stack = __esm({
|
|
|
2326
2418
|
},
|
|
2327
2419
|
otherProps.className
|
|
2328
2420
|
);
|
|
2329
|
-
return /* @__PURE__ */ (0,
|
|
2421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
2330
2422
|
};
|
|
2331
2423
|
Stack.displayName = "Stack";
|
|
2332
2424
|
}
|
|
@@ -2341,13 +2433,13 @@ var init_Stack2 = __esm({
|
|
|
2341
2433
|
});
|
|
2342
2434
|
|
|
2343
2435
|
// src/components/Checkbox/Checkbox.tsx
|
|
2344
|
-
var
|
|
2436
|
+
var import_react17, import_dedupe17, import_icons6, import_Checkbox, import_jsx_runtime22, Checkbox;
|
|
2345
2437
|
var init_Checkbox = __esm({
|
|
2346
2438
|
"src/components/Checkbox/Checkbox.tsx"() {
|
|
2347
2439
|
"use strict";
|
|
2348
2440
|
"use client";
|
|
2349
|
-
|
|
2350
|
-
|
|
2441
|
+
import_react17 = require("react");
|
|
2442
|
+
import_dedupe17 = __toESM(require("classnames/dedupe"));
|
|
2351
2443
|
import_icons6 = require("@simplybusiness/icons");
|
|
2352
2444
|
init_ErrorMessage2();
|
|
2353
2445
|
init_spaceDelimitedList();
|
|
@@ -2355,7 +2447,7 @@ var init_Checkbox = __esm({
|
|
|
2355
2447
|
init_Icon2();
|
|
2356
2448
|
init_Stack2();
|
|
2357
2449
|
import_Checkbox = require("@simplybusiness/mobius/src/components/Checkbox/Checkbox.css");
|
|
2358
|
-
|
|
2450
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2359
2451
|
Checkbox = ({ ref, ...props }) => {
|
|
2360
2452
|
const {
|
|
2361
2453
|
id,
|
|
@@ -2375,18 +2467,18 @@ var init_Checkbox = __esm({
|
|
|
2375
2467
|
["aria-describedby"]: ariaDescribedBy,
|
|
2376
2468
|
...rest
|
|
2377
2469
|
} = props;
|
|
2378
|
-
const [checked, setChecked] = (0,
|
|
2379
|
-
const fallbackRef = (0,
|
|
2470
|
+
const [checked, setChecked] = (0, import_react17.useState)(defaultSelected);
|
|
2471
|
+
const fallbackRef = (0, import_react17.useRef)(null);
|
|
2380
2472
|
const refObj = ref || fallbackRef;
|
|
2381
|
-
const inputId = (0,
|
|
2473
|
+
const inputId = (0, import_react17.useId)();
|
|
2382
2474
|
const isControlled = typeof selected === "boolean";
|
|
2383
|
-
(0,
|
|
2475
|
+
(0, import_react17.useEffect)(() => {
|
|
2384
2476
|
if (isControlled) {
|
|
2385
2477
|
setChecked(selected);
|
|
2386
2478
|
}
|
|
2387
2479
|
}, [selected, isControlled]);
|
|
2388
2480
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
2389
|
-
const sharedClasses = (0,
|
|
2481
|
+
const sharedClasses = (0, import_dedupe17.default)(
|
|
2390
2482
|
{
|
|
2391
2483
|
"--is-disabled": isDisabled,
|
|
2392
2484
|
"--is-selected": checked,
|
|
@@ -2395,31 +2487,31 @@ var init_Checkbox = __esm({
|
|
|
2395
2487
|
},
|
|
2396
2488
|
validationClasses
|
|
2397
2489
|
);
|
|
2398
|
-
const wrapperClasses = (0,
|
|
2490
|
+
const wrapperClasses = (0, import_dedupe17.default)(
|
|
2399
2491
|
"mobius",
|
|
2400
2492
|
"mobius-checkbox",
|
|
2401
2493
|
sharedClasses,
|
|
2402
2494
|
className
|
|
2403
2495
|
);
|
|
2404
|
-
const labelClasses = (0,
|
|
2405
|
-
const inputClasses = (0,
|
|
2406
|
-
const iconClasses = (0,
|
|
2407
|
-
const errorMessageId = (0,
|
|
2496
|
+
const labelClasses = (0, import_dedupe17.default)("mobius-checkbox__label", sharedClasses);
|
|
2497
|
+
const inputClasses = (0, import_dedupe17.default)("mobius-checkbox__input", sharedClasses);
|
|
2498
|
+
const iconClasses = (0, import_dedupe17.default)("mobius-checkbox__icon", sharedClasses);
|
|
2499
|
+
const errorMessageId = (0, import_react17.useId)();
|
|
2408
2500
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
2409
2501
|
const describedBy = spaceDelimitedList([
|
|
2410
2502
|
shouldErrorMessageShow,
|
|
2411
2503
|
ariaDescribedBy
|
|
2412
2504
|
]);
|
|
2413
|
-
const labelId = (0,
|
|
2505
|
+
const labelId = (0, import_react17.useId)();
|
|
2414
2506
|
const handleChange = (event) => {
|
|
2415
2507
|
setChecked(!checked);
|
|
2416
2508
|
if (onChange) {
|
|
2417
2509
|
onChange(event, isLastItem);
|
|
2418
2510
|
}
|
|
2419
2511
|
};
|
|
2420
|
-
return /* @__PURE__ */ (0,
|
|
2421
|
-
/* @__PURE__ */ (0,
|
|
2422
|
-
/* @__PURE__ */ (0,
|
|
2512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Stack, { gap: "xs", className: wrapperClasses, children: [
|
|
2513
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: labelClasses, children: [
|
|
2514
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2423
2515
|
"input",
|
|
2424
2516
|
{
|
|
2425
2517
|
"aria-describedby": describedBy,
|
|
@@ -2440,7 +2532,7 @@ var init_Checkbox = __esm({
|
|
|
2440
2532
|
...rest
|
|
2441
2533
|
}
|
|
2442
2534
|
),
|
|
2443
|
-
/* @__PURE__ */ (0,
|
|
2535
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2444
2536
|
Icon,
|
|
2445
2537
|
{
|
|
2446
2538
|
icon: checked ? import_icons6.squareTick : import_icons6.square,
|
|
@@ -2448,9 +2540,9 @@ var init_Checkbox = __esm({
|
|
|
2448
2540
|
className: iconClasses
|
|
2449
2541
|
}
|
|
2450
2542
|
),
|
|
2451
|
-
/* @__PURE__ */ (0,
|
|
2543
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { id: labelId, className: "mobius-checkbox__visible-label", children: label })
|
|
2452
2544
|
] }),
|
|
2453
|
-
/* @__PURE__ */ (0,
|
|
2545
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
2454
2546
|
] });
|
|
2455
2547
|
};
|
|
2456
2548
|
Checkbox.displayName = "Checkbox";
|
|
@@ -2458,18 +2550,18 @@ var init_Checkbox = __esm({
|
|
|
2458
2550
|
});
|
|
2459
2551
|
|
|
2460
2552
|
// src/components/Label/Label.tsx
|
|
2461
|
-
var
|
|
2553
|
+
var import_dedupe18, import_Label, import_jsx_runtime23, Label;
|
|
2462
2554
|
var init_Label = __esm({
|
|
2463
2555
|
"src/components/Label/Label.tsx"() {
|
|
2464
2556
|
"use strict";
|
|
2465
|
-
|
|
2557
|
+
import_dedupe18 = __toESM(require("classnames/dedupe"));
|
|
2466
2558
|
import_Label = require("@simplybusiness/mobius/src/components/Label/Label.css");
|
|
2467
|
-
|
|
2559
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2468
2560
|
Label = ({ ref, ...props }) => {
|
|
2469
2561
|
const { elementType: Element = "label", children, ...otherProps } = props;
|
|
2470
|
-
const classes = (0,
|
|
2562
|
+
const classes = (0, import_dedupe18.default)("mobius", "mobius-label", props.className);
|
|
2471
2563
|
otherProps.className = classes;
|
|
2472
|
-
return /* @__PURE__ */ (0,
|
|
2564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Element, { ref, ...otherProps, className: classes, children });
|
|
2473
2565
|
};
|
|
2474
2566
|
Label.displayName = "Label";
|
|
2475
2567
|
}
|
|
@@ -2484,20 +2576,20 @@ var init_Label2 = __esm({
|
|
|
2484
2576
|
});
|
|
2485
2577
|
|
|
2486
2578
|
// src/components/Checkbox/CheckboxGroup.tsx
|
|
2487
|
-
var
|
|
2579
|
+
var import_dedupe19, import_react18, import_CheckboxGroup, import_jsx_runtime24, CheckboxGroup;
|
|
2488
2580
|
var init_CheckboxGroup = __esm({
|
|
2489
2581
|
"src/components/Checkbox/CheckboxGroup.tsx"() {
|
|
2490
2582
|
"use strict";
|
|
2491
2583
|
"use client";
|
|
2492
|
-
|
|
2493
|
-
|
|
2584
|
+
import_dedupe19 = __toESM(require("classnames/dedupe"));
|
|
2585
|
+
import_react18 = require("react");
|
|
2494
2586
|
init_hooks();
|
|
2495
2587
|
init_spaceDelimitedList();
|
|
2496
2588
|
init_ErrorMessage2();
|
|
2497
2589
|
init_Label2();
|
|
2498
2590
|
init_Checkbox();
|
|
2499
2591
|
import_CheckboxGroup = require("@simplybusiness/mobius/src/components/Checkbox/CheckboxGroup.css");
|
|
2500
|
-
|
|
2592
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2501
2593
|
CheckboxGroup = ({ ref, ...props }) => {
|
|
2502
2594
|
const {
|
|
2503
2595
|
label,
|
|
@@ -2515,10 +2607,10 @@ var init_CheckboxGroup = __esm({
|
|
|
2515
2607
|
lastItemDisables = false,
|
|
2516
2608
|
...rest
|
|
2517
2609
|
} = props;
|
|
2518
|
-
const [selected, setSelected] = (0,
|
|
2519
|
-
const isInitializedRef = (0,
|
|
2520
|
-
const prevDefaultValueRef = (0,
|
|
2521
|
-
(0,
|
|
2610
|
+
const [selected, setSelected] = (0, import_react18.useState)(defaultValue);
|
|
2611
|
+
const isInitializedRef = (0, import_react18.useRef)(false);
|
|
2612
|
+
const prevDefaultValueRef = (0, import_react18.useRef)(defaultValue);
|
|
2613
|
+
(0, import_react18.useEffect)(() => {
|
|
2522
2614
|
const hasChanged = defaultValue.length !== prevDefaultValueRef.current.length || defaultValue.some(
|
|
2523
2615
|
(val, index) => val !== prevDefaultValueRef.current[index]
|
|
2524
2616
|
);
|
|
@@ -2528,7 +2620,7 @@ var init_CheckboxGroup = __esm({
|
|
|
2528
2620
|
isInitializedRef.current = true;
|
|
2529
2621
|
}
|
|
2530
2622
|
}, [defaultValue]);
|
|
2531
|
-
const checkboxGroupClasses = (0,
|
|
2623
|
+
const checkboxGroupClasses = (0, import_dedupe19.default)(
|
|
2532
2624
|
"mobius",
|
|
2533
2625
|
"mobius-checkbox-group",
|
|
2534
2626
|
className,
|
|
@@ -2540,19 +2632,19 @@ var init_CheckboxGroup = __esm({
|
|
|
2540
2632
|
}
|
|
2541
2633
|
);
|
|
2542
2634
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
2543
|
-
const labelClasses = (0,
|
|
2635
|
+
const labelClasses = (0, import_dedupe19.default)(
|
|
2544
2636
|
{
|
|
2545
2637
|
"--is-disabled": isDisabled
|
|
2546
2638
|
},
|
|
2547
2639
|
validationClasses
|
|
2548
2640
|
);
|
|
2549
|
-
const errorMessageId = (0,
|
|
2641
|
+
const errorMessageId = (0, import_react18.useId)();
|
|
2550
2642
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
2551
2643
|
const describedBy = spaceDelimitedList([
|
|
2552
2644
|
shouldErrorMessageShow,
|
|
2553
2645
|
props["aria-describedby"]
|
|
2554
2646
|
]);
|
|
2555
|
-
const labelId = (0,
|
|
2647
|
+
const labelId = (0, import_react18.useId)();
|
|
2556
2648
|
const handleChange = (event, isLastItem = false) => {
|
|
2557
2649
|
const {
|
|
2558
2650
|
target: { value, checked }
|
|
@@ -2570,12 +2662,12 @@ var init_CheckboxGroup = __esm({
|
|
|
2570
2662
|
setSelected(newValue);
|
|
2571
2663
|
onChange?.(newValue);
|
|
2572
2664
|
};
|
|
2573
|
-
const childrenArray =
|
|
2665
|
+
const childrenArray = import_react18.Children.toArray(children);
|
|
2574
2666
|
const lastCheckbox = childrenArray.filter(
|
|
2575
|
-
(child) => (0,
|
|
2667
|
+
(child) => (0, import_react18.isValidElement)(child) && child.type === Checkbox
|
|
2576
2668
|
).pop();
|
|
2577
2669
|
const lastCheckboxIsChecked = lastCheckbox && selected.includes(lastCheckbox.props.value);
|
|
2578
|
-
return /* @__PURE__ */ (0,
|
|
2670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2579
2671
|
"div",
|
|
2580
2672
|
{
|
|
2581
2673
|
...rest,
|
|
@@ -2584,16 +2676,16 @@ var init_CheckboxGroup = __esm({
|
|
|
2584
2676
|
className: checkboxGroupClasses,
|
|
2585
2677
|
role: "group",
|
|
2586
2678
|
style: {
|
|
2587
|
-
"--checkbox-items-per-row": itemsPerRow ||
|
|
2679
|
+
"--checkbox-items-per-row": itemsPerRow || import_react18.Children.count(children)
|
|
2588
2680
|
},
|
|
2589
2681
|
children: [
|
|
2590
|
-
label && /* @__PURE__ */ (0,
|
|
2591
|
-
/* @__PURE__ */ (0,
|
|
2592
|
-
if ((0,
|
|
2682
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Label, { elementType: "span", id: labelId, className: labelClasses, children: label }),
|
|
2683
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mobius-checkbox-group__wrapper", children: childrenArray.map((child) => {
|
|
2684
|
+
if ((0, import_react18.isValidElement)(child)) {
|
|
2593
2685
|
const isLastItem = child === lastCheckbox;
|
|
2594
2686
|
const isChildDisabled = isDisabled || lastItemDisables && lastCheckboxIsChecked && !isLastItem;
|
|
2595
2687
|
const childProps = child.props;
|
|
2596
|
-
return (0,
|
|
2688
|
+
return (0, import_react18.cloneElement)(
|
|
2597
2689
|
child,
|
|
2598
2690
|
{
|
|
2599
2691
|
isDisabled: isChildDisabled,
|
|
@@ -2609,7 +2701,7 @@ var init_CheckboxGroup = __esm({
|
|
|
2609
2701
|
}
|
|
2610
2702
|
return child;
|
|
2611
2703
|
}) }),
|
|
2612
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2704
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
2613
2705
|
]
|
|
2614
2706
|
}
|
|
2615
2707
|
);
|
|
@@ -2636,23 +2728,23 @@ var init_Checkbox2 = __esm({
|
|
|
2636
2728
|
});
|
|
2637
2729
|
|
|
2638
2730
|
// src/components/Container/Container.tsx
|
|
2639
|
-
var
|
|
2731
|
+
var import_dedupe20, import_Container, import_jsx_runtime25, Container;
|
|
2640
2732
|
var init_Container = __esm({
|
|
2641
2733
|
"src/components/Container/Container.tsx"() {
|
|
2642
2734
|
"use strict";
|
|
2643
|
-
|
|
2735
|
+
import_dedupe20 = __toESM(require("classnames/dedupe"));
|
|
2644
2736
|
init_utils();
|
|
2645
2737
|
import_Container = require("@simplybusiness/mobius/src/components/Container/Container.css");
|
|
2646
|
-
|
|
2738
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2647
2739
|
Container = ({ ref, ...props }) => {
|
|
2648
2740
|
const { elementType: Element = "div", size = "md", ...otherProps } = props;
|
|
2649
|
-
const classes = (0,
|
|
2741
|
+
const classes = (0, import_dedupe20.default)(
|
|
2650
2742
|
"mobius",
|
|
2651
2743
|
"mobius-container",
|
|
2652
2744
|
sizeClasses(size),
|
|
2653
2745
|
otherProps.className
|
|
2654
2746
|
);
|
|
2655
|
-
return /* @__PURE__ */ (0,
|
|
2747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
2656
2748
|
};
|
|
2657
2749
|
Container.displayName = "Container";
|
|
2658
2750
|
}
|
|
@@ -2705,17 +2797,17 @@ var init_validation = __esm({
|
|
|
2705
2797
|
});
|
|
2706
2798
|
|
|
2707
2799
|
// src/components/DateField/DateField.tsx
|
|
2708
|
-
var
|
|
2800
|
+
var import_dedupe21, import_react19, import_jsx_runtime26, MIN_MAX_ERROR, DateField;
|
|
2709
2801
|
var init_DateField = __esm({
|
|
2710
2802
|
"src/components/DateField/DateField.tsx"() {
|
|
2711
2803
|
"use strict";
|
|
2712
2804
|
"use client";
|
|
2713
|
-
|
|
2714
|
-
|
|
2805
|
+
import_dedupe21 = __toESM(require("classnames/dedupe"));
|
|
2806
|
+
import_react19 = require("react");
|
|
2715
2807
|
init_mergeRefs();
|
|
2716
2808
|
init_TextField2();
|
|
2717
2809
|
init_validation();
|
|
2718
|
-
|
|
2810
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2719
2811
|
MIN_MAX_ERROR = '"min" value should not be greater than "max" value.';
|
|
2720
2812
|
DateField = ({ ref, ...props }) => {
|
|
2721
2813
|
const {
|
|
@@ -2728,10 +2820,10 @@ var init_DateField = __esm({
|
|
|
2728
2820
|
value,
|
|
2729
2821
|
...otherProps
|
|
2730
2822
|
} = props;
|
|
2731
|
-
const [error3, setError] = (0,
|
|
2732
|
-
const [isInvalid, setIsInvalid] = (0,
|
|
2733
|
-
const localRef = (0,
|
|
2734
|
-
const classes = (0,
|
|
2823
|
+
const [error3, setError] = (0, import_react19.useState)(errorMessage);
|
|
2824
|
+
const [isInvalid, setIsInvalid] = (0, import_react19.useState)(void 0);
|
|
2825
|
+
const localRef = (0, import_react19.useRef)(null);
|
|
2826
|
+
const classes = (0, import_dedupe21.default)("mobius-date-field", className);
|
|
2735
2827
|
const formattedMin = min ? convertToDateFormat(min, format) : void 0;
|
|
2736
2828
|
const formattedMax = max ? convertToDateFormat(max, format) : void 0;
|
|
2737
2829
|
const formattedDefaultValue = defaultValue ? convertToDateFormat(defaultValue, format) : void 0;
|
|
@@ -2744,7 +2836,7 @@ var init_DateField = __esm({
|
|
|
2744
2836
|
setError(props.errorMessage);
|
|
2745
2837
|
setIsInvalid(false);
|
|
2746
2838
|
};
|
|
2747
|
-
(0,
|
|
2839
|
+
(0, import_react19.useEffect)(() => {
|
|
2748
2840
|
if (!isValidDate(min, format)) {
|
|
2749
2841
|
setInvalidState(`Invalid min date: ${min}`);
|
|
2750
2842
|
return;
|
|
@@ -2777,7 +2869,7 @@ var init_DateField = __esm({
|
|
|
2777
2869
|
validate();
|
|
2778
2870
|
otherProps.onBlur?.(event);
|
|
2779
2871
|
};
|
|
2780
|
-
return /* @__PURE__ */ (0,
|
|
2872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2781
2873
|
TextField,
|
|
2782
2874
|
{
|
|
2783
2875
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -2808,23 +2900,23 @@ var init_DateField2 = __esm({
|
|
|
2808
2900
|
});
|
|
2809
2901
|
|
|
2810
2902
|
// src/components/Drawer/Content.tsx
|
|
2811
|
-
var
|
|
2903
|
+
var import_jsx_runtime27, Content;
|
|
2812
2904
|
var init_Content = __esm({
|
|
2813
2905
|
"src/components/Drawer/Content.tsx"() {
|
|
2814
2906
|
"use strict";
|
|
2815
|
-
|
|
2816
|
-
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
2907
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2908
|
+
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, ...otherProps, className: "mobius-drawer__content", children });
|
|
2817
2909
|
Content.displayName = "Content";
|
|
2818
2910
|
}
|
|
2819
2911
|
});
|
|
2820
2912
|
|
|
2821
2913
|
// src/components/Drawer/DrawerContext.tsx
|
|
2822
|
-
var
|
|
2914
|
+
var import_react20, DrawerContext;
|
|
2823
2915
|
var init_DrawerContext = __esm({
|
|
2824
2916
|
"src/components/Drawer/DrawerContext.tsx"() {
|
|
2825
2917
|
"use strict";
|
|
2826
|
-
|
|
2827
|
-
DrawerContext = (0,
|
|
2918
|
+
import_react20 = require("react");
|
|
2919
|
+
DrawerContext = (0, import_react20.createContext)({
|
|
2828
2920
|
onClose: () => {
|
|
2829
2921
|
},
|
|
2830
2922
|
closeLabel: void 0,
|
|
@@ -2834,19 +2926,19 @@ var init_DrawerContext = __esm({
|
|
|
2834
2926
|
});
|
|
2835
2927
|
|
|
2836
2928
|
// src/components/Drawer/Drawer.tsx
|
|
2837
|
-
var
|
|
2929
|
+
var import_dedupe22, import_react21, import_Drawer, import_jsx_runtime28, TRANSITION_CSS_VARIABLE, Drawer;
|
|
2838
2930
|
var init_Drawer = __esm({
|
|
2839
2931
|
"src/components/Drawer/Drawer.tsx"() {
|
|
2840
2932
|
"use strict";
|
|
2841
2933
|
"use client";
|
|
2842
|
-
|
|
2843
|
-
|
|
2934
|
+
import_dedupe22 = __toESM(require("classnames/dedupe"));
|
|
2935
|
+
import_react21 = require("react");
|
|
2844
2936
|
init_hooks();
|
|
2845
2937
|
init_utils();
|
|
2846
2938
|
init_VisuallyHidden2();
|
|
2847
2939
|
init_DrawerContext();
|
|
2848
2940
|
import_Drawer = require("@simplybusiness/mobius/src/components/Drawer/Drawer.css");
|
|
2849
|
-
|
|
2941
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2850
2942
|
TRANSITION_CSS_VARIABLE = "--drawer-transition-duration";
|
|
2851
2943
|
Drawer = ({ ref, ...props }) => {
|
|
2852
2944
|
const {
|
|
@@ -2859,8 +2951,8 @@ var init_Drawer = __esm({
|
|
|
2859
2951
|
onClose,
|
|
2860
2952
|
children
|
|
2861
2953
|
} = props;
|
|
2862
|
-
const dialogRef = (0,
|
|
2863
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
2954
|
+
const dialogRef = (0, import_react21.useRef)(null);
|
|
2955
|
+
const [shouldTransition, setShouldTransition] = (0, import_react21.useState)(false);
|
|
2864
2956
|
const { close } = useDialog({
|
|
2865
2957
|
ref: dialogRef,
|
|
2866
2958
|
isOpen,
|
|
@@ -2871,9 +2963,9 @@ var init_Drawer = __esm({
|
|
|
2871
2963
|
CSSVariable: TRANSITION_CSS_VARIABLE
|
|
2872
2964
|
}
|
|
2873
2965
|
});
|
|
2874
|
-
const hiddenId = `dialog-screen-reader-announce-${(0,
|
|
2875
|
-
const headerId = `dialog-header-${(0,
|
|
2876
|
-
const dialogClasses = (0,
|
|
2966
|
+
const hiddenId = `dialog-screen-reader-announce-${(0, import_react21.useId)()}`;
|
|
2967
|
+
const headerId = `dialog-header-${(0, import_react21.useId)()}`;
|
|
2968
|
+
const dialogClasses = (0, import_dedupe22.default)(
|
|
2877
2969
|
"mobius",
|
|
2878
2970
|
"mobius-drawer",
|
|
2879
2971
|
`--${direction}`,
|
|
@@ -2882,10 +2974,10 @@ var init_Drawer = __esm({
|
|
|
2882
2974
|
"--should-transition": shouldTransition
|
|
2883
2975
|
}
|
|
2884
2976
|
);
|
|
2885
|
-
(0,
|
|
2977
|
+
(0, import_react21.useEffect)(() => {
|
|
2886
2978
|
setShouldTransition(supportsDialog());
|
|
2887
2979
|
}, []);
|
|
2888
|
-
const contextValue = (0,
|
|
2980
|
+
const contextValue = (0, import_react21.useMemo)(
|
|
2889
2981
|
() => ({
|
|
2890
2982
|
onClose: close,
|
|
2891
2983
|
closeLabel,
|
|
@@ -2893,18 +2985,18 @@ var init_Drawer = __esm({
|
|
|
2893
2985
|
}),
|
|
2894
2986
|
[close, closeLabel, headerId]
|
|
2895
2987
|
);
|
|
2896
|
-
return /* @__PURE__ */ (0,
|
|
2988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2897
2989
|
"dialog",
|
|
2898
2990
|
{
|
|
2899
|
-
id: (0,
|
|
2991
|
+
id: (0, import_react21.useId)(),
|
|
2900
2992
|
ref: mergeRefs([dialogRef, ref]),
|
|
2901
2993
|
onCancel: close,
|
|
2902
2994
|
className: dialogClasses,
|
|
2903
2995
|
"aria-describedby": hiddenId,
|
|
2904
2996
|
"aria-labelledby": headerId,
|
|
2905
2997
|
children: [
|
|
2906
|
-
/* @__PURE__ */ (0,
|
|
2907
|
-
/* @__PURE__ */ (0,
|
|
2998
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { id: hiddenId, children: announce }) }),
|
|
2999
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DrawerContext.Provider, { value: contextValue, children })
|
|
2908
3000
|
]
|
|
2909
3001
|
}
|
|
2910
3002
|
);
|
|
@@ -2914,21 +3006,21 @@ var init_Drawer = __esm({
|
|
|
2914
3006
|
});
|
|
2915
3007
|
|
|
2916
3008
|
// src/components/Drawer/useDrawer.ts
|
|
2917
|
-
var
|
|
3009
|
+
var import_react22, useDrawer;
|
|
2918
3010
|
var init_useDrawer = __esm({
|
|
2919
3011
|
"src/components/Drawer/useDrawer.ts"() {
|
|
2920
3012
|
"use strict";
|
|
2921
|
-
|
|
3013
|
+
import_react22 = require("react");
|
|
2922
3014
|
init_DrawerContext();
|
|
2923
3015
|
useDrawer = () => {
|
|
2924
|
-
const { onClose, closeLabel, headerId } = (0,
|
|
3016
|
+
const { onClose, closeLabel, headerId } = (0, import_react22.useContext)(DrawerContext);
|
|
2925
3017
|
return { onClose, closeLabel, headerId };
|
|
2926
3018
|
};
|
|
2927
3019
|
}
|
|
2928
3020
|
});
|
|
2929
3021
|
|
|
2930
3022
|
// src/components/Drawer/Header.tsx
|
|
2931
|
-
var import_icons7,
|
|
3023
|
+
var import_icons7, import_jsx_runtime29, Header;
|
|
2932
3024
|
var init_Header = __esm({
|
|
2933
3025
|
"src/components/Drawer/Header.tsx"() {
|
|
2934
3026
|
"use strict";
|
|
@@ -2936,12 +3028,12 @@ var init_Header = __esm({
|
|
|
2936
3028
|
init_Button2();
|
|
2937
3029
|
init_Icon2();
|
|
2938
3030
|
init_useDrawer();
|
|
2939
|
-
|
|
3031
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2940
3032
|
Header = ({ ref, children, ...otherProps }) => {
|
|
2941
3033
|
const { onClose, closeLabel, headerId } = useDrawer();
|
|
2942
|
-
return /* @__PURE__ */ (0,
|
|
2943
|
-
/* @__PURE__ */ (0,
|
|
2944
|
-
/* @__PURE__ */ (0,
|
|
3034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("header", { ref, ...otherProps, className: "mobius-drawer__header", children: [
|
|
3035
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("h2", { id: headerId, children }),
|
|
3036
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2945
3037
|
Button,
|
|
2946
3038
|
{
|
|
2947
3039
|
"aria-label": "Close",
|
|
@@ -2950,7 +3042,7 @@ var init_Header = __esm({
|
|
|
2950
3042
|
className: "mobius-drawer__close",
|
|
2951
3043
|
size: "sm",
|
|
2952
3044
|
children: [
|
|
2953
|
-
/* @__PURE__ */ (0,
|
|
3045
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { icon: import_icons7.cross }),
|
|
2954
3046
|
" ",
|
|
2955
3047
|
closeLabel
|
|
2956
3048
|
]
|
|
@@ -2979,17 +3071,17 @@ var init_Drawer2 = __esm({
|
|
|
2979
3071
|
});
|
|
2980
3072
|
|
|
2981
3073
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2982
|
-
var
|
|
3074
|
+
var import_react23, import_react_accessible_dropdown_menu_hook, import_dedupe23, import_DropdownMenu, import_jsx_runtime30, DropdownMenu;
|
|
2983
3075
|
var init_DropdownMenu = __esm({
|
|
2984
3076
|
"src/components/DropdownMenu/DropdownMenu.tsx"() {
|
|
2985
3077
|
"use strict";
|
|
2986
3078
|
"use client";
|
|
2987
|
-
|
|
3079
|
+
import_react23 = require("react");
|
|
2988
3080
|
import_react_accessible_dropdown_menu_hook = __toESM(require("react-accessible-dropdown-menu-hook"));
|
|
2989
|
-
|
|
3081
|
+
import_dedupe23 = __toESM(require("classnames/dedupe"));
|
|
2990
3082
|
init_Button2();
|
|
2991
3083
|
import_DropdownMenu = require("@simplybusiness/mobius/src/components/DropdownMenu/DropdownMenu.css");
|
|
2992
|
-
|
|
3084
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2993
3085
|
DropdownMenu = ({ ref, ...props }) => {
|
|
2994
3086
|
const {
|
|
2995
3087
|
elementType: Element = "nav",
|
|
@@ -2998,21 +3090,21 @@ var init_DropdownMenu = __esm({
|
|
|
2998
3090
|
children,
|
|
2999
3091
|
...otherProps
|
|
3000
3092
|
} = props;
|
|
3001
|
-
const [activeId, setActiveId] = (0,
|
|
3002
|
-
const numberOfItems =
|
|
3093
|
+
const [activeId, setActiveId] = (0, import_react23.useState)(null);
|
|
3094
|
+
const numberOfItems = import_react23.Children.count(children);
|
|
3003
3095
|
const {
|
|
3004
3096
|
buttonProps,
|
|
3005
3097
|
itemProps,
|
|
3006
3098
|
isOpen: open,
|
|
3007
3099
|
setIsOpen
|
|
3008
3100
|
} = (0, import_react_accessible_dropdown_menu_hook.default)(numberOfItems);
|
|
3009
|
-
const classes = (0,
|
|
3101
|
+
const classes = (0, import_dedupe23.default)(
|
|
3010
3102
|
"mobius",
|
|
3011
3103
|
"mobius-dropdown-menu",
|
|
3012
3104
|
otherProps.className
|
|
3013
3105
|
);
|
|
3014
|
-
const triggerClasses = (0,
|
|
3015
|
-
const listClasses = (0,
|
|
3106
|
+
const triggerClasses = (0, import_dedupe23.default)("mobius", "mobius-dropdown-menu__trigger");
|
|
3107
|
+
const listClasses = (0, import_dedupe23.default)("mobius", "mobius-dropdown-menu__list", {
|
|
3016
3108
|
"--is-open": open
|
|
3017
3109
|
});
|
|
3018
3110
|
const handleChildClick = ({ onClick }, index) => {
|
|
@@ -3022,16 +3114,16 @@ var init_DropdownMenu = __esm({
|
|
|
3022
3114
|
onClick();
|
|
3023
3115
|
}
|
|
3024
3116
|
};
|
|
3025
|
-
return /* @__PURE__ */ (0,
|
|
3026
|
-
trigger ? (0,
|
|
3117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Element, { ref, ...otherProps, className: classes, children: [
|
|
3118
|
+
trigger ? (0, import_react23.cloneElement)(trigger, {
|
|
3027
3119
|
className: triggerClasses,
|
|
3028
3120
|
open,
|
|
3029
3121
|
label,
|
|
3030
3122
|
...buttonProps
|
|
3031
|
-
}) : /* @__PURE__ */ (0,
|
|
3032
|
-
/* @__PURE__ */ (0,
|
|
3033
|
-
if ((0,
|
|
3034
|
-
return (0,
|
|
3123
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Button, { className: triggerClasses, ...buttonProps, children: label }),
|
|
3124
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("ul", { className: listClasses, role: "menu", children: import_react23.Children.map(children, (child, index) => {
|
|
3125
|
+
if ((0, import_react23.isValidElement)(child)) {
|
|
3126
|
+
return (0, import_react23.cloneElement)(child, {
|
|
3035
3127
|
onClick: () => handleChildClick(child.props, index),
|
|
3036
3128
|
active: index === activeId,
|
|
3037
3129
|
...itemProps[index]
|
|
@@ -3046,13 +3138,13 @@ var init_DropdownMenu = __esm({
|
|
|
3046
3138
|
});
|
|
3047
3139
|
|
|
3048
3140
|
// src/components/DropdownMenu/Item.tsx
|
|
3049
|
-
var
|
|
3141
|
+
var import_react24, import_dedupe24, import_jsx_runtime31, Item;
|
|
3050
3142
|
var init_Item = __esm({
|
|
3051
3143
|
"src/components/DropdownMenu/Item.tsx"() {
|
|
3052
3144
|
"use strict";
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3145
|
+
import_react24 = require("react");
|
|
3146
|
+
import_dedupe24 = __toESM(require("classnames/dedupe"));
|
|
3147
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3056
3148
|
Item = ({ ref, ...props }) => {
|
|
3057
3149
|
const {
|
|
3058
3150
|
elementType: Element = "li",
|
|
@@ -3061,26 +3153,26 @@ var init_Item = __esm({
|
|
|
3061
3153
|
children,
|
|
3062
3154
|
...otherProps
|
|
3063
3155
|
} = props;
|
|
3064
|
-
const classes = (0,
|
|
3156
|
+
const classes = (0, import_dedupe24.default)(
|
|
3065
3157
|
"mobius",
|
|
3066
3158
|
"mobius-dropdown-menu__item",
|
|
3067
3159
|
{ "--is-active": active },
|
|
3068
3160
|
otherProps.className
|
|
3069
3161
|
);
|
|
3070
|
-
return /* @__PURE__ */ (0,
|
|
3071
|
-
if ((0,
|
|
3072
|
-
const childClasses = (0,
|
|
3162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Element, { ref, onClick, ...otherProps, children: import_react24.Children.map(children, (child) => {
|
|
3163
|
+
if ((0, import_react24.isValidElement)(child)) {
|
|
3164
|
+
const childClasses = (0, import_dedupe24.default)(
|
|
3073
3165
|
child.props.className,
|
|
3074
3166
|
classes
|
|
3075
3167
|
);
|
|
3076
|
-
return (0,
|
|
3168
|
+
return (0, import_react24.cloneElement)(
|
|
3077
3169
|
child,
|
|
3078
3170
|
{
|
|
3079
3171
|
className: childClasses
|
|
3080
3172
|
}
|
|
3081
3173
|
);
|
|
3082
3174
|
}
|
|
3083
|
-
return /* @__PURE__ */ (0,
|
|
3175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: classes, children: child });
|
|
3084
3176
|
}) });
|
|
3085
3177
|
};
|
|
3086
3178
|
Item.displayName = "DropdownMenu.Item";
|
|
@@ -3105,23 +3197,23 @@ var init_DropdownMenu2 = __esm({
|
|
|
3105
3197
|
});
|
|
3106
3198
|
|
|
3107
3199
|
// src/components/Fieldset/Fieldset.tsx
|
|
3108
|
-
var
|
|
3200
|
+
var import_dedupe25, import_react25, import_Fieldset, import_jsx_runtime32, useFieldset, Fieldset;
|
|
3109
3201
|
var init_Fieldset = __esm({
|
|
3110
3202
|
"src/components/Fieldset/Fieldset.tsx"() {
|
|
3111
3203
|
"use strict";
|
|
3112
3204
|
"use client";
|
|
3113
|
-
|
|
3114
|
-
|
|
3205
|
+
import_dedupe25 = __toESM(require("classnames/dedupe"));
|
|
3206
|
+
import_react25 = require("react");
|
|
3115
3207
|
init_Flex2();
|
|
3116
3208
|
import_Fieldset = require("@simplybusiness/mobius/src/components/Fieldset/Fieldset.css");
|
|
3117
|
-
|
|
3209
|
+
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3118
3210
|
useFieldset = (props) => {
|
|
3119
3211
|
const { legend } = props;
|
|
3120
3212
|
let legendProps = {};
|
|
3121
3213
|
let containerProps = {
|
|
3122
3214
|
role: "group"
|
|
3123
3215
|
};
|
|
3124
|
-
const legendId = (0,
|
|
3216
|
+
const legendId = (0, import_react25.useId)();
|
|
3125
3217
|
if (legend) {
|
|
3126
3218
|
legendProps = {
|
|
3127
3219
|
...legendProps,
|
|
@@ -3141,14 +3233,14 @@ var init_Fieldset = __esm({
|
|
|
3141
3233
|
const {
|
|
3142
3234
|
children,
|
|
3143
3235
|
legend,
|
|
3144
|
-
legendComponent = /* @__PURE__ */ (0,
|
|
3236
|
+
legendComponent = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("legend", {}),
|
|
3145
3237
|
...otherProps
|
|
3146
3238
|
} = props;
|
|
3147
3239
|
const { legendProps, containerProps } = useFieldset(props);
|
|
3148
|
-
const classes = (0,
|
|
3240
|
+
const classes = (0, import_dedupe25.default)("mobius", "mobius-fieldset", props.className);
|
|
3149
3241
|
legendProps.className = "mobius-fieldset__legend";
|
|
3150
|
-
return /* @__PURE__ */ (0,
|
|
3151
|
-
legend && (0,
|
|
3242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Flex, { ...containerProps, ...otherProps, className: classes, children: [
|
|
3243
|
+
legend && (0, import_react25.cloneElement)(legendComponent, { ...legendProps }, [legend]),
|
|
3152
3244
|
children
|
|
3153
3245
|
] });
|
|
3154
3246
|
};
|
|
@@ -3165,13 +3257,13 @@ var init_Fieldset2 = __esm({
|
|
|
3165
3257
|
});
|
|
3166
3258
|
|
|
3167
3259
|
// src/components/Grid/Grid.tsx
|
|
3168
|
-
var
|
|
3260
|
+
var import_dedupe26, import_jsx_runtime33, Grid;
|
|
3169
3261
|
var init_Grid = __esm({
|
|
3170
3262
|
"src/components/Grid/Grid.tsx"() {
|
|
3171
3263
|
"use strict";
|
|
3172
|
-
|
|
3264
|
+
import_dedupe26 = __toESM(require("classnames/dedupe"));
|
|
3173
3265
|
init_utils();
|
|
3174
|
-
|
|
3266
|
+
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3175
3267
|
Grid = ({ ref: _ref, ...props }) => {
|
|
3176
3268
|
const {
|
|
3177
3269
|
columns = 12,
|
|
@@ -3186,7 +3278,7 @@ var init_Grid = __esm({
|
|
|
3186
3278
|
style,
|
|
3187
3279
|
...rest
|
|
3188
3280
|
} = props;
|
|
3189
|
-
const classes = (0,
|
|
3281
|
+
const classes = (0, import_dedupe26.default)("mobius", "mobius-grid", className);
|
|
3190
3282
|
const styles = filterUndefinedProps({
|
|
3191
3283
|
boxSizing: "border-box",
|
|
3192
3284
|
display: "grid",
|
|
@@ -3200,22 +3292,22 @@ var init_Grid = __esm({
|
|
|
3200
3292
|
justifyItems,
|
|
3201
3293
|
...style
|
|
3202
3294
|
});
|
|
3203
|
-
return /* @__PURE__ */ (0,
|
|
3295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: styles, className: classes, ...rest });
|
|
3204
3296
|
};
|
|
3205
3297
|
Grid.displayName = "Grid";
|
|
3206
3298
|
}
|
|
3207
3299
|
});
|
|
3208
3300
|
|
|
3209
3301
|
// src/components/Grid/Item.tsx
|
|
3210
|
-
var
|
|
3302
|
+
var import_react26, import_dedupe27, import_jsx_runtime34, getBreakpointMap, DEFAULT_SPAN, GridItem;
|
|
3211
3303
|
var init_Item2 = __esm({
|
|
3212
3304
|
"src/components/Grid/Item.tsx"() {
|
|
3213
3305
|
"use strict";
|
|
3214
3306
|
"use client";
|
|
3215
|
-
|
|
3216
|
-
|
|
3307
|
+
import_react26 = require("react");
|
|
3308
|
+
import_dedupe27 = __toESM(require("classnames/dedupe"));
|
|
3217
3309
|
init_hooks();
|
|
3218
|
-
|
|
3310
|
+
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3219
3311
|
getBreakpointMap = (config) => Object.entries(config).reduce(
|
|
3220
3312
|
(prev, [key, value]) => {
|
|
3221
3313
|
const previous = Object.values(prev);
|
|
@@ -3250,9 +3342,9 @@ var init_Item2 = __esm({
|
|
|
3250
3342
|
xl,
|
|
3251
3343
|
xxl
|
|
3252
3344
|
});
|
|
3253
|
-
const [responsiveSpan, setResponsiveSpan] = (0,
|
|
3254
|
-
const classes = (0,
|
|
3255
|
-
(0,
|
|
3345
|
+
const [responsiveSpan, setResponsiveSpan] = (0, import_react26.useState)();
|
|
3346
|
+
const classes = (0, import_dedupe27.default)("mobius-grid__item", className);
|
|
3347
|
+
(0, import_react26.useEffect)(() => {
|
|
3256
3348
|
setResponsiveSpan(breakpointMap[breakpointSize]);
|
|
3257
3349
|
}, [breakpointSize, breakpointMap]);
|
|
3258
3350
|
const styles = {
|
|
@@ -3260,7 +3352,7 @@ var init_Item2 = __esm({
|
|
|
3260
3352
|
alignSelf,
|
|
3261
3353
|
justifySelf
|
|
3262
3354
|
};
|
|
3263
|
-
return /* @__PURE__ */ (0,
|
|
3355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { ...styles }, className: classes, ...rest });
|
|
3264
3356
|
};
|
|
3265
3357
|
GridItem.displayName = "GridItem";
|
|
3266
3358
|
}
|
|
@@ -3281,20 +3373,20 @@ var init_Grid2 = __esm({
|
|
|
3281
3373
|
});
|
|
3282
3374
|
|
|
3283
3375
|
// src/components/Image/Image.tsx
|
|
3284
|
-
var
|
|
3376
|
+
var import_dedupe28, import_jsx_runtime35, Image;
|
|
3285
3377
|
var init_Image = __esm({
|
|
3286
3378
|
"src/components/Image/Image.tsx"() {
|
|
3287
3379
|
"use strict";
|
|
3288
|
-
|
|
3289
|
-
|
|
3380
|
+
import_dedupe28 = __toESM(require("classnames/dedupe"));
|
|
3381
|
+
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3290
3382
|
Image = ({
|
|
3291
3383
|
ref,
|
|
3292
3384
|
alt,
|
|
3293
3385
|
elementType: Component = "img",
|
|
3294
3386
|
...otherProps
|
|
3295
3387
|
}) => {
|
|
3296
|
-
const classes = (0,
|
|
3297
|
-
return /* @__PURE__ */ (0,
|
|
3388
|
+
const classes = (0, import_dedupe28.default)("mobius", "mobius-image", otherProps.className);
|
|
3389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Component, { alt, ref, ...otherProps, className: classes });
|
|
3298
3390
|
};
|
|
3299
3391
|
Image.displayName = "Image";
|
|
3300
3392
|
}
|
|
@@ -3309,13 +3401,13 @@ var init_Image2 = __esm({
|
|
|
3309
3401
|
});
|
|
3310
3402
|
|
|
3311
3403
|
// src/components/Link/Link.tsx
|
|
3312
|
-
var
|
|
3404
|
+
var import_dedupe29, import_Link, import_jsx_runtime36, Link;
|
|
3313
3405
|
var init_Link = __esm({
|
|
3314
3406
|
"src/components/Link/Link.tsx"() {
|
|
3315
3407
|
"use strict";
|
|
3316
|
-
|
|
3408
|
+
import_dedupe29 = __toESM(require("classnames/dedupe"));
|
|
3317
3409
|
import_Link = require("@simplybusiness/mobius/src/components/Link/Link.css");
|
|
3318
|
-
|
|
3410
|
+
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3319
3411
|
Link = ({ ref, ...props }) => {
|
|
3320
3412
|
const {
|
|
3321
3413
|
isDisabled = false,
|
|
@@ -3329,7 +3421,7 @@ var init_Link = __esm({
|
|
|
3329
3421
|
pointerEvents: "none"
|
|
3330
3422
|
};
|
|
3331
3423
|
const styles = { ...style, ...isDisabled && disabledStyles };
|
|
3332
|
-
const classes = (0,
|
|
3424
|
+
const classes = (0, import_dedupe29.default)(
|
|
3333
3425
|
"mobius",
|
|
3334
3426
|
"mobius-link",
|
|
3335
3427
|
className,
|
|
@@ -3338,7 +3430,7 @@ var init_Link = __esm({
|
|
|
3338
3430
|
"--is-disabled": isDisabled
|
|
3339
3431
|
}
|
|
3340
3432
|
);
|
|
3341
|
-
return /* @__PURE__ */ (0,
|
|
3433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3342
3434
|
Component,
|
|
3343
3435
|
{
|
|
3344
3436
|
ref,
|
|
@@ -3363,12 +3455,12 @@ var init_Link2 = __esm({
|
|
|
3363
3455
|
});
|
|
3364
3456
|
|
|
3365
3457
|
// src/components/LinkButton/LinkButton.tsx
|
|
3366
|
-
var
|
|
3458
|
+
var import_dedupe30, import_jsx_runtime37;
|
|
3367
3459
|
var init_LinkButton = __esm({
|
|
3368
3460
|
"src/components/LinkButton/LinkButton.tsx"() {
|
|
3369
3461
|
"use strict";
|
|
3370
|
-
|
|
3371
|
-
|
|
3462
|
+
import_dedupe30 = __toESM(require("classnames/dedupe"));
|
|
3463
|
+
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3372
3464
|
}
|
|
3373
3465
|
});
|
|
3374
3466
|
|
|
@@ -3381,14 +3473,14 @@ var init_LinkButton2 = __esm({
|
|
|
3381
3473
|
});
|
|
3382
3474
|
|
|
3383
3475
|
// src/components/List/List.tsx
|
|
3384
|
-
var
|
|
3476
|
+
var import_react27, import_dedupe31, import_List, import_jsx_runtime38, List;
|
|
3385
3477
|
var init_List = __esm({
|
|
3386
3478
|
"src/components/List/List.tsx"() {
|
|
3387
3479
|
"use strict";
|
|
3388
|
-
|
|
3389
|
-
|
|
3480
|
+
import_react27 = require("react");
|
|
3481
|
+
import_dedupe31 = __toESM(require("classnames/dedupe"));
|
|
3390
3482
|
import_List = require("@simplybusiness/mobius/src/components/List/List.css");
|
|
3391
|
-
|
|
3483
|
+
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3392
3484
|
List = ({ ref, ...props }) => {
|
|
3393
3485
|
const Component = props.isOrdered ? "ol" : "ul";
|
|
3394
3486
|
const { children, icon, ...otherProps } = props;
|
|
@@ -3397,7 +3489,7 @@ var init_List = __esm({
|
|
|
3397
3489
|
...restProps,
|
|
3398
3490
|
reversed: isReversed
|
|
3399
3491
|
};
|
|
3400
|
-
const classes = (0,
|
|
3492
|
+
const classes = (0, import_dedupe31.default)(
|
|
3401
3493
|
"mobius",
|
|
3402
3494
|
"mobius-list",
|
|
3403
3495
|
{
|
|
@@ -3406,9 +3498,9 @@ var init_List = __esm({
|
|
|
3406
3498
|
},
|
|
3407
3499
|
otherProps.className
|
|
3408
3500
|
);
|
|
3409
|
-
return /* @__PURE__ */ (0,
|
|
3410
|
-
if ((0,
|
|
3411
|
-
return (0,
|
|
3501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Component, { ref, ...mappedProps, className: classes, children: import_react27.Children.map(children, (child) => {
|
|
3502
|
+
if ((0, import_react27.isValidElement)(child)) {
|
|
3503
|
+
return (0, import_react27.cloneElement)(child, {
|
|
3412
3504
|
parentIcon: icon
|
|
3413
3505
|
});
|
|
3414
3506
|
}
|
|
@@ -3420,16 +3512,16 @@ var init_List = __esm({
|
|
|
3420
3512
|
});
|
|
3421
3513
|
|
|
3422
3514
|
// src/components/List/ListItem.tsx
|
|
3423
|
-
var
|
|
3515
|
+
var import_dedupe32, import_jsx_runtime39, ListItem;
|
|
3424
3516
|
var init_ListItem = __esm({
|
|
3425
3517
|
"src/components/List/ListItem.tsx"() {
|
|
3426
3518
|
"use strict";
|
|
3427
|
-
|
|
3428
|
-
|
|
3519
|
+
import_dedupe32 = __toESM(require("classnames/dedupe"));
|
|
3520
|
+
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3429
3521
|
ListItem = ({ ref, ...props }) => {
|
|
3430
3522
|
const { parentIcon, icon, children, ...otherProps } = props;
|
|
3431
3523
|
const iconContent = icon || parentIcon;
|
|
3432
|
-
const classes = (0,
|
|
3524
|
+
const classes = (0, import_dedupe32.default)(
|
|
3433
3525
|
"mobius",
|
|
3434
3526
|
"mobius-list__item",
|
|
3435
3527
|
{
|
|
@@ -3437,15 +3529,15 @@ var init_ListItem = __esm({
|
|
|
3437
3529
|
},
|
|
3438
3530
|
props.className
|
|
3439
3531
|
);
|
|
3440
|
-
const contentClasses = (0,
|
|
3441
|
-
const iconClasses = (0,
|
|
3532
|
+
const contentClasses = (0, import_dedupe32.default)("mobius", "mobius-list__item-content");
|
|
3533
|
+
const iconClasses = (0, import_dedupe32.default)("mobius", "mobius-list__icon");
|
|
3442
3534
|
if (iconContent) {
|
|
3443
|
-
return /* @__PURE__ */ (0,
|
|
3444
|
-
/* @__PURE__ */ (0,
|
|
3535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("li", { ref, ...otherProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: contentClasses, children: [
|
|
3536
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: iconClasses, children: iconContent }),
|
|
3445
3537
|
children
|
|
3446
3538
|
] }) });
|
|
3447
3539
|
}
|
|
3448
|
-
return /* @__PURE__ */ (0,
|
|
3540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("li", { ref, ...otherProps, className: classes, children });
|
|
3449
3541
|
};
|
|
3450
3542
|
ListItem.displayName = "ListItem";
|
|
3451
3543
|
}
|
|
@@ -3461,23 +3553,23 @@ var init_List2 = __esm({
|
|
|
3461
3553
|
});
|
|
3462
3554
|
|
|
3463
3555
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
3464
|
-
var
|
|
3556
|
+
var import_dedupe33, import_icons8, import_LoadingIndicator, import_jsx_runtime40, LoadingIndicator;
|
|
3465
3557
|
var init_LoadingIndicator = __esm({
|
|
3466
3558
|
"src/components/LoadingIndicator/LoadingIndicator.tsx"() {
|
|
3467
3559
|
"use strict";
|
|
3468
|
-
|
|
3560
|
+
import_dedupe33 = __toESM(require("classnames/dedupe"));
|
|
3469
3561
|
import_icons8 = require("@simplybusiness/icons");
|
|
3470
3562
|
init_Icon2();
|
|
3471
3563
|
import_LoadingIndicator = require("@simplybusiness/mobius/src/components/LoadingIndicator/LoadingIndicator.css");
|
|
3472
|
-
|
|
3564
|
+
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3473
3565
|
LoadingIndicator = ({ ref, ...props }) => {
|
|
3474
3566
|
const { icon = import_icons8.loading, ...otherProps } = props;
|
|
3475
|
-
const classes = (0,
|
|
3567
|
+
const classes = (0, import_dedupe33.default)(
|
|
3476
3568
|
"mobius",
|
|
3477
3569
|
"mobius-loading-indicator",
|
|
3478
3570
|
otherProps.className
|
|
3479
3571
|
);
|
|
3480
|
-
return /* @__PURE__ */ (0,
|
|
3572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { icon, spin: true, ref, ...otherProps, className: classes });
|
|
3481
3573
|
};
|
|
3482
3574
|
LoadingIndicator.displayName = "LoadingIndicator";
|
|
3483
3575
|
}
|
|
@@ -3492,16 +3584,16 @@ var init_LoadingIndicator2 = __esm({
|
|
|
3492
3584
|
});
|
|
3493
3585
|
|
|
3494
3586
|
// src/components/Logo/Logo.tsx
|
|
3495
|
-
var
|
|
3587
|
+
var import_dedupe34, import_jsx_runtime41, Logo;
|
|
3496
3588
|
var init_Logo = __esm({
|
|
3497
3589
|
"src/components/Logo/Logo.tsx"() {
|
|
3498
3590
|
"use strict";
|
|
3499
|
-
|
|
3500
|
-
|
|
3591
|
+
import_dedupe34 = __toESM(require("classnames/dedupe"));
|
|
3592
|
+
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3501
3593
|
Logo = ({ ref, ...props }) => {
|
|
3502
3594
|
const { className, width, height, ...otherProps } = props;
|
|
3503
|
-
const classes = (0,
|
|
3504
|
-
return /* @__PURE__ */ (0,
|
|
3595
|
+
const classes = (0, import_dedupe34.default)("mobius", "mobius-logo", className);
|
|
3596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3505
3597
|
"svg",
|
|
3506
3598
|
{
|
|
3507
3599
|
width,
|
|
@@ -3511,7 +3603,7 @@ var init_Logo = __esm({
|
|
|
3511
3603
|
viewBox: "0 0 144 37",
|
|
3512
3604
|
...otherProps,
|
|
3513
3605
|
children: [
|
|
3514
|
-
/* @__PURE__ */ (0,
|
|
3606
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3515
3607
|
"linearGradient",
|
|
3516
3608
|
{
|
|
3517
3609
|
id: "logo-gradient",
|
|
@@ -3520,27 +3612,27 @@ var init_Logo = __esm({
|
|
|
3520
3612
|
y1: "76.042%",
|
|
3521
3613
|
y2: "26.973%",
|
|
3522
3614
|
children: [
|
|
3523
|
-
/* @__PURE__ */ (0,
|
|
3524
|
-
/* @__PURE__ */ (0,
|
|
3615
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("stop", { stopColor: "#4632D8", offset: "0%" }),
|
|
3616
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("stop", { stopColor: "#9084E8", offset: "100%" })
|
|
3525
3617
|
]
|
|
3526
3618
|
}
|
|
3527
3619
|
) }),
|
|
3528
|
-
/* @__PURE__ */ (0,
|
|
3529
|
-
/* @__PURE__ */ (0,
|
|
3620
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("g", { children: [
|
|
3621
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3530
3622
|
"path",
|
|
3531
3623
|
{
|
|
3532
3624
|
fill: "#0E0A2B",
|
|
3533
3625
|
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"
|
|
3534
3626
|
}
|
|
3535
3627
|
),
|
|
3536
|
-
/* @__PURE__ */ (0,
|
|
3628
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3537
3629
|
"path",
|
|
3538
3630
|
{
|
|
3539
3631
|
fill: "url(#logo-gradient)",
|
|
3540
3632
|
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"
|
|
3541
3633
|
}
|
|
3542
3634
|
),
|
|
3543
|
-
/* @__PURE__ */ (0,
|
|
3635
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3544
3636
|
"path",
|
|
3545
3637
|
{
|
|
3546
3638
|
fill: "#0E0A2B",
|
|
@@ -3565,23 +3657,23 @@ var init_Logo2 = __esm({
|
|
|
3565
3657
|
});
|
|
3566
3658
|
|
|
3567
3659
|
// src/components/Modal/Content.tsx
|
|
3568
|
-
var
|
|
3660
|
+
var import_jsx_runtime42, Content2;
|
|
3569
3661
|
var init_Content2 = __esm({
|
|
3570
3662
|
"src/components/Modal/Content.tsx"() {
|
|
3571
3663
|
"use strict";
|
|
3572
|
-
|
|
3573
|
-
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
3664
|
+
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3665
|
+
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { ref, ...otherProps, className: "mobius-modal__content", children });
|
|
3574
3666
|
Content2.displayName = "Content";
|
|
3575
3667
|
}
|
|
3576
3668
|
});
|
|
3577
3669
|
|
|
3578
3670
|
// src/components/Modal/ModalContext.tsx
|
|
3579
|
-
var
|
|
3671
|
+
var import_react28, ModalContext;
|
|
3580
3672
|
var init_ModalContext = __esm({
|
|
3581
3673
|
"src/components/Modal/ModalContext.tsx"() {
|
|
3582
3674
|
"use strict";
|
|
3583
|
-
|
|
3584
|
-
ModalContext = (0,
|
|
3675
|
+
import_react28 = require("react");
|
|
3676
|
+
ModalContext = (0, import_react28.createContext)({
|
|
3585
3677
|
onClose: () => {
|
|
3586
3678
|
},
|
|
3587
3679
|
closeLabel: void 0
|
|
@@ -3590,21 +3682,21 @@ var init_ModalContext = __esm({
|
|
|
3590
3682
|
});
|
|
3591
3683
|
|
|
3592
3684
|
// src/components/Modal/useModal.ts
|
|
3593
|
-
var
|
|
3685
|
+
var import_react29, useModal;
|
|
3594
3686
|
var init_useModal = __esm({
|
|
3595
3687
|
"src/components/Modal/useModal.ts"() {
|
|
3596
3688
|
"use strict";
|
|
3597
|
-
|
|
3689
|
+
import_react29 = require("react");
|
|
3598
3690
|
init_ModalContext();
|
|
3599
3691
|
useModal = () => {
|
|
3600
|
-
const { onClose, closeLabel } = (0,
|
|
3692
|
+
const { onClose, closeLabel } = (0, import_react29.useContext)(ModalContext);
|
|
3601
3693
|
return { onClose, closeLabel };
|
|
3602
3694
|
};
|
|
3603
3695
|
}
|
|
3604
3696
|
});
|
|
3605
3697
|
|
|
3606
3698
|
// src/components/Modal/Header.tsx
|
|
3607
|
-
var import_icons9,
|
|
3699
|
+
var import_icons9, import_jsx_runtime43, Header2;
|
|
3608
3700
|
var init_Header2 = __esm({
|
|
3609
3701
|
"src/components/Modal/Header.tsx"() {
|
|
3610
3702
|
"use strict";
|
|
@@ -3612,12 +3704,12 @@ var init_Header2 = __esm({
|
|
|
3612
3704
|
init_Button2();
|
|
3613
3705
|
init_Icon2();
|
|
3614
3706
|
init_useModal();
|
|
3615
|
-
|
|
3707
|
+
import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3616
3708
|
Header2 = ({ ref, children, ...otherProps }) => {
|
|
3617
3709
|
const { onClose, closeLabel } = useModal();
|
|
3618
|
-
return /* @__PURE__ */ (0,
|
|
3710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("header", { ref, ...otherProps, className: "mobius-modal__header", children: [
|
|
3619
3711
|
children,
|
|
3620
|
-
/* @__PURE__ */ (0,
|
|
3712
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3621
3713
|
Button,
|
|
3622
3714
|
{
|
|
3623
3715
|
"aria-label": "Close",
|
|
@@ -3625,7 +3717,7 @@ var init_Header2 = __esm({
|
|
|
3625
3717
|
onPress: onClose,
|
|
3626
3718
|
className: "mobius-modal__close",
|
|
3627
3719
|
children: [
|
|
3628
|
-
/* @__PURE__ */ (0,
|
|
3720
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon: import_icons9.cross }),
|
|
3629
3721
|
" ",
|
|
3630
3722
|
closeLabel
|
|
3631
3723
|
]
|
|
@@ -3638,19 +3730,19 @@ var init_Header2 = __esm({
|
|
|
3638
3730
|
});
|
|
3639
3731
|
|
|
3640
3732
|
// src/components/Modal/Modal.tsx
|
|
3641
|
-
var
|
|
3733
|
+
var import_dedupe35, import_react30, import_Modal, import_jsx_runtime44, TRANSITION_CSS_VARIABLE2, Modal;
|
|
3642
3734
|
var init_Modal = __esm({
|
|
3643
3735
|
"src/components/Modal/Modal.tsx"() {
|
|
3644
3736
|
"use strict";
|
|
3645
3737
|
"use client";
|
|
3646
|
-
|
|
3647
|
-
|
|
3738
|
+
import_dedupe35 = __toESM(require("classnames/dedupe"));
|
|
3739
|
+
import_react30 = require("react");
|
|
3648
3740
|
init_hooks();
|
|
3649
3741
|
init_utils();
|
|
3650
3742
|
init_polyfill_tests();
|
|
3651
3743
|
init_ModalContext();
|
|
3652
3744
|
import_Modal = require("@simplybusiness/mobius/src/components/Modal/Modal.css");
|
|
3653
|
-
|
|
3745
|
+
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3654
3746
|
TRANSITION_CSS_VARIABLE2 = "--modal-transition-duration";
|
|
3655
3747
|
Modal = ({ ref, ...props }) => {
|
|
3656
3748
|
const {
|
|
@@ -3664,11 +3756,11 @@ var init_Modal = __esm({
|
|
|
3664
3756
|
animation,
|
|
3665
3757
|
...rest
|
|
3666
3758
|
} = props;
|
|
3667
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
3668
|
-
(0,
|
|
3759
|
+
const [shouldTransition, setShouldTransition] = (0, import_react30.useState)(false);
|
|
3760
|
+
(0, import_react30.useEffect)(() => {
|
|
3669
3761
|
setShouldTransition(supportsDialog());
|
|
3670
3762
|
}, []);
|
|
3671
|
-
const dialogRef = (0,
|
|
3763
|
+
const dialogRef = (0, import_react30.useRef)(null);
|
|
3672
3764
|
const { close } = useDialog({
|
|
3673
3765
|
ref: dialogRef,
|
|
3674
3766
|
isOpen,
|
|
@@ -3679,7 +3771,7 @@ var init_Modal = __esm({
|
|
|
3679
3771
|
CSSVariable: TRANSITION_CSS_VARIABLE2
|
|
3680
3772
|
}
|
|
3681
3773
|
});
|
|
3682
|
-
const modalClasses = (0,
|
|
3774
|
+
const modalClasses = (0, import_dedupe35.default)(
|
|
3683
3775
|
"mobius",
|
|
3684
3776
|
"mobius-modal",
|
|
3685
3777
|
{
|
|
@@ -3692,21 +3784,21 @@ var init_Modal = __esm({
|
|
|
3692
3784
|
},
|
|
3693
3785
|
className
|
|
3694
3786
|
);
|
|
3695
|
-
const contextValue = (0,
|
|
3787
|
+
const contextValue = (0, import_react30.useMemo)(
|
|
3696
3788
|
() => ({
|
|
3697
3789
|
onClose: close,
|
|
3698
3790
|
closeLabel
|
|
3699
3791
|
}),
|
|
3700
3792
|
[close, closeLabel]
|
|
3701
3793
|
);
|
|
3702
|
-
return /* @__PURE__ */ (0,
|
|
3794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3703
3795
|
"dialog",
|
|
3704
3796
|
{
|
|
3705
3797
|
ref: mergeRefs([dialogRef, ref]),
|
|
3706
3798
|
onCancel: close,
|
|
3707
3799
|
className: modalClasses,
|
|
3708
3800
|
...rest,
|
|
3709
|
-
children: /* @__PURE__ */ (0,
|
|
3801
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ModalContext.Provider, { value: contextValue, children })
|
|
3710
3802
|
}
|
|
3711
3803
|
);
|
|
3712
3804
|
};
|
|
@@ -3739,18 +3831,18 @@ var init_NumberField = __esm({
|
|
|
3739
3831
|
});
|
|
3740
3832
|
|
|
3741
3833
|
// src/components/Option/Option.tsx
|
|
3742
|
-
var
|
|
3834
|
+
var import_jsx_runtime45, Option2;
|
|
3743
3835
|
var init_Option2 = __esm({
|
|
3744
3836
|
"src/components/Option/Option.tsx"() {
|
|
3745
3837
|
"use strict";
|
|
3746
|
-
|
|
3838
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3747
3839
|
Option2 = ({ ref, ...props }) => {
|
|
3748
3840
|
const { isDisabled, ...rest } = props;
|
|
3749
3841
|
const mappedProps = {
|
|
3750
3842
|
...rest,
|
|
3751
3843
|
disabled: isDisabled
|
|
3752
3844
|
};
|
|
3753
|
-
return /* @__PURE__ */ (0,
|
|
3845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("option", { ...mappedProps, ref });
|
|
3754
3846
|
};
|
|
3755
3847
|
Option2.displayName = "Option";
|
|
3756
3848
|
}
|
|
@@ -3765,17 +3857,17 @@ var init_Option3 = __esm({
|
|
|
3765
3857
|
});
|
|
3766
3858
|
|
|
3767
3859
|
// src/components/PasswordField/ShowHideButton.tsx
|
|
3768
|
-
var import_icons10,
|
|
3860
|
+
var import_icons10, import_jsx_runtime46, ShowHideButton;
|
|
3769
3861
|
var init_ShowHideButton = __esm({
|
|
3770
3862
|
"src/components/PasswordField/ShowHideButton.tsx"() {
|
|
3771
3863
|
"use strict";
|
|
3772
3864
|
import_icons10 = require("@simplybusiness/icons");
|
|
3773
3865
|
init_src();
|
|
3774
|
-
|
|
3866
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3775
3867
|
ShowHideButton = ({
|
|
3776
3868
|
show = false,
|
|
3777
3869
|
onClick
|
|
3778
|
-
}) => /* @__PURE__ */ (0,
|
|
3870
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3779
3871
|
"button",
|
|
3780
3872
|
{
|
|
3781
3873
|
className: "mobius-password-field__show-button",
|
|
@@ -3786,35 +3878,35 @@ var init_ShowHideButton = __esm({
|
|
|
3786
3878
|
},
|
|
3787
3879
|
"aria-label": `${show ? "Hide" : "Show"} password`,
|
|
3788
3880
|
"data-testid": "show-hide-button",
|
|
3789
|
-
children: /* @__PURE__ */ (0,
|
|
3881
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon, { icon: show ? import_icons10.eyeSlash : import_icons10.eye, "aria-hidden": "true" })
|
|
3790
3882
|
}
|
|
3791
3883
|
);
|
|
3792
3884
|
}
|
|
3793
3885
|
});
|
|
3794
3886
|
|
|
3795
3887
|
// src/components/PasswordField/PasswordField.tsx
|
|
3796
|
-
var
|
|
3888
|
+
var import_dedupe36, import_react31, import_PasswordField, import_jsx_runtime47, PasswordField;
|
|
3797
3889
|
var init_PasswordField = __esm({
|
|
3798
3890
|
"src/components/PasswordField/PasswordField.tsx"() {
|
|
3799
3891
|
"use strict";
|
|
3800
3892
|
"use client";
|
|
3801
|
-
|
|
3802
|
-
|
|
3893
|
+
import_dedupe36 = __toESM(require("classnames/dedupe"));
|
|
3894
|
+
import_react31 = require("react");
|
|
3803
3895
|
init_mergeRefs();
|
|
3804
3896
|
init_TextField2();
|
|
3805
3897
|
init_ShowHideButton();
|
|
3806
3898
|
import_PasswordField = require("@simplybusiness/mobius/src/components/PasswordField/PasswordField.css");
|
|
3807
|
-
|
|
3899
|
+
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3808
3900
|
PasswordField = ({
|
|
3809
3901
|
ref,
|
|
3810
3902
|
className,
|
|
3811
3903
|
autoComplete = "current-password",
|
|
3812
3904
|
...props
|
|
3813
3905
|
}) => {
|
|
3814
|
-
const [show, setShow] = (0,
|
|
3906
|
+
const [show, setShow] = (0, import_react31.useState)(false);
|
|
3815
3907
|
const type = show ? "text" : "password";
|
|
3816
|
-
const classes = (0,
|
|
3817
|
-
const localRef = (0,
|
|
3908
|
+
const classes = (0, import_dedupe36.default)("mobius-password-field", className);
|
|
3909
|
+
const localRef = (0, import_react31.useRef)(null);
|
|
3818
3910
|
const handleShowHideButtonClick = () => {
|
|
3819
3911
|
const selectionStart = localRef.current?.selectionStart;
|
|
3820
3912
|
const selectionEnd = localRef.current?.selectionEnd;
|
|
@@ -3826,7 +3918,7 @@ var init_PasswordField = __esm({
|
|
|
3826
3918
|
}
|
|
3827
3919
|
});
|
|
3828
3920
|
};
|
|
3829
|
-
return /* @__PURE__ */ (0,
|
|
3921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3830
3922
|
TextField,
|
|
3831
3923
|
{
|
|
3832
3924
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -3834,7 +3926,7 @@ var init_PasswordField = __esm({
|
|
|
3834
3926
|
...props,
|
|
3835
3927
|
autoComplete,
|
|
3836
3928
|
type,
|
|
3837
|
-
suffixInside: /* @__PURE__ */ (0,
|
|
3929
|
+
suffixInside: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ShowHideButton, { onClick: handleShowHideButtonClick, show })
|
|
3838
3930
|
}
|
|
3839
3931
|
);
|
|
3840
3932
|
};
|
|
@@ -3851,17 +3943,17 @@ var init_PasswordField2 = __esm({
|
|
|
3851
3943
|
});
|
|
3852
3944
|
|
|
3853
3945
|
// src/components/Popover/Popover.tsx
|
|
3854
|
-
var
|
|
3946
|
+
var import_react32, import_icons11, import_dedupe37, import_react33, import_mobius_hooks6, import_Popover, import_jsx_runtime48;
|
|
3855
3947
|
var init_Popover = __esm({
|
|
3856
3948
|
"src/components/Popover/Popover.tsx"() {
|
|
3857
3949
|
"use strict";
|
|
3858
|
-
|
|
3950
|
+
import_react32 = require("@floating-ui/react");
|
|
3859
3951
|
import_icons11 = require("@simplybusiness/icons");
|
|
3860
|
-
|
|
3861
|
-
|
|
3952
|
+
import_dedupe37 = __toESM(require("classnames/dedupe"));
|
|
3953
|
+
import_react33 = require("react");
|
|
3862
3954
|
import_mobius_hooks6 = require("@simplybusiness/mobius-hooks");
|
|
3863
3955
|
import_Popover = require("@simplybusiness/mobius/src/components/Popover/Popover.css");
|
|
3864
|
-
|
|
3956
|
+
import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3865
3957
|
}
|
|
3866
3958
|
});
|
|
3867
3959
|
|
|
@@ -3885,17 +3977,17 @@ function warnAboutInvalidValues(value, minValue, maxValue) {
|
|
|
3885
3977
|
console.warn("Progress value is greater than maxValue");
|
|
3886
3978
|
}
|
|
3887
3979
|
}
|
|
3888
|
-
var
|
|
3980
|
+
var import_dedupe38, import_react34, import_Progress, import_jsx_runtime49, sanitizedValue, getLabelComponent, DEFAULT_VALUE, DEFAULT_MIN_VALUE, DEFAULT_MAX_VALUE, Progress;
|
|
3889
3981
|
var init_Progress = __esm({
|
|
3890
3982
|
"src/components/Progress/Progress.tsx"() {
|
|
3891
3983
|
"use strict";
|
|
3892
3984
|
"use client";
|
|
3893
|
-
|
|
3894
|
-
|
|
3985
|
+
import_dedupe38 = __toESM(require("classnames/dedupe"));
|
|
3986
|
+
import_react34 = require("react");
|
|
3895
3987
|
init_Label2();
|
|
3896
3988
|
init_VisuallyHidden2();
|
|
3897
3989
|
import_Progress = require("@simplybusiness/mobius/src/components/Progress/Progress.css");
|
|
3898
|
-
|
|
3990
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3899
3991
|
sanitizedValue = (value, defaultValue) => {
|
|
3900
3992
|
if (value === void 0 || Number.isNaN(value)) {
|
|
3901
3993
|
return defaultValue;
|
|
@@ -3904,7 +3996,7 @@ var init_Progress = __esm({
|
|
|
3904
3996
|
};
|
|
3905
3997
|
getLabelComponent = (label, progressLabelId, showLabel) => {
|
|
3906
3998
|
if (showLabel) {
|
|
3907
|
-
return /* @__PURE__ */ (0,
|
|
3999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3908
4000
|
Label,
|
|
3909
4001
|
{
|
|
3910
4002
|
id: progressLabelId,
|
|
@@ -3914,7 +4006,7 @@ var init_Progress = __esm({
|
|
|
3914
4006
|
}
|
|
3915
4007
|
);
|
|
3916
4008
|
}
|
|
3917
|
-
return /* @__PURE__ */ (0,
|
|
4009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3918
4010
|
Label,
|
|
3919
4011
|
{
|
|
3920
4012
|
id: progressLabelId,
|
|
@@ -3928,8 +4020,8 @@ var init_Progress = __esm({
|
|
|
3928
4020
|
DEFAULT_MIN_VALUE = 0;
|
|
3929
4021
|
DEFAULT_MAX_VALUE = 100;
|
|
3930
4022
|
Progress = ({ ref, ...props }) => {
|
|
3931
|
-
const progressId = (0,
|
|
3932
|
-
const progressLabelId = (0,
|
|
4023
|
+
const progressId = (0, import_react34.useId)();
|
|
4024
|
+
const progressLabelId = (0, import_react34.useId)();
|
|
3933
4025
|
const {
|
|
3934
4026
|
id,
|
|
3935
4027
|
label,
|
|
@@ -3954,7 +4046,7 @@ var init_Progress = __esm({
|
|
|
3954
4046
|
100
|
|
3955
4047
|
);
|
|
3956
4048
|
const barWidth = `${percentage}%`;
|
|
3957
|
-
const classes = (0,
|
|
4049
|
+
const classes = (0, import_dedupe38.default)("mobius", "mobius-progress", className, {
|
|
3958
4050
|
"--is-primary": variant === "primary",
|
|
3959
4051
|
"--is-secondary": variant === "secondary"
|
|
3960
4052
|
});
|
|
@@ -3964,7 +4056,7 @@ var init_Progress = __esm({
|
|
|
3964
4056
|
progressBarProps["aria-valuenow"] = value.toString();
|
|
3965
4057
|
progressBarProps["aria-valuetext"] = valueFormatter instanceof Function ? valueFormatter(value, minValue, maxValue) : barWidth;
|
|
3966
4058
|
const labelComponent = getLabelComponent(label, progressLabelId, showLabel);
|
|
3967
|
-
return /* @__PURE__ */ (0,
|
|
4059
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
3968
4060
|
"div",
|
|
3969
4061
|
{
|
|
3970
4062
|
id: id || progressId,
|
|
@@ -3975,8 +4067,8 @@ var init_Progress = __esm({
|
|
|
3975
4067
|
"aria-labelledby": progressLabelId,
|
|
3976
4068
|
children: [
|
|
3977
4069
|
labelComponent,
|
|
3978
|
-
/* @__PURE__ */ (0,
|
|
3979
|
-
showValueLabel && /* @__PURE__ */ (0,
|
|
4070
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mobius-progress__track", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mobius-progress__bar", style: { width: barWidth } }) }),
|
|
4071
|
+
showValueLabel && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Label, { "data-testid": "value-label", elementType: "span", children: progressBarProps["aria-valuetext"] })
|
|
3980
4072
|
]
|
|
3981
4073
|
}
|
|
3982
4074
|
);
|
|
@@ -3994,17 +4086,17 @@ var init_Progress2 = __esm({
|
|
|
3994
4086
|
});
|
|
3995
4087
|
|
|
3996
4088
|
// src/components/Radio/Radio.tsx
|
|
3997
|
-
var
|
|
4089
|
+
var import_dedupe39, import_react35, import_Radio, import_jsx_runtime50, Radio;
|
|
3998
4090
|
var init_Radio = __esm({
|
|
3999
4091
|
"src/components/Radio/Radio.tsx"() {
|
|
4000
4092
|
"use strict";
|
|
4001
4093
|
"use client";
|
|
4002
|
-
|
|
4003
|
-
|
|
4094
|
+
import_dedupe39 = __toESM(require("classnames/dedupe"));
|
|
4095
|
+
import_react35 = require("react");
|
|
4004
4096
|
init_ErrorMessage2();
|
|
4005
4097
|
init_Label2();
|
|
4006
4098
|
import_Radio = require("@simplybusiness/mobius/src/components/Radio/Radio.css");
|
|
4007
|
-
|
|
4099
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4008
4100
|
Radio = ({ ref, ...props }) => {
|
|
4009
4101
|
const {
|
|
4010
4102
|
children,
|
|
@@ -4028,19 +4120,19 @@ var init_Radio = __esm({
|
|
|
4028
4120
|
const isMultiline = label && children;
|
|
4029
4121
|
const isControlled = selected !== void 0;
|
|
4030
4122
|
const isChecked = isControlled ? selected === value : defaultChecked;
|
|
4031
|
-
const contentRef = (0,
|
|
4032
|
-
const prevOverflowRef = (0,
|
|
4123
|
+
const contentRef = (0, import_react35.useRef)(null);
|
|
4124
|
+
const prevOverflowRef = (0, import_react35.useRef)({
|
|
4033
4125
|
vertical: false,
|
|
4034
4126
|
horizontal: false
|
|
4035
4127
|
});
|
|
4036
|
-
const hasIconFirst = (0,
|
|
4037
|
-
if (!children ||
|
|
4038
|
-
const firstChild =
|
|
4039
|
-
if (!(0,
|
|
4128
|
+
const hasIconFirst = (0, import_react35.useMemo)(() => {
|
|
4129
|
+
if (!children || import_react35.Children.count(children) === 0) return false;
|
|
4130
|
+
const firstChild = import_react35.Children.toArray(children)[0];
|
|
4131
|
+
if (!(0, import_react35.isValidElement)(firstChild)) return false;
|
|
4040
4132
|
const props2 = firstChild.props;
|
|
4041
4133
|
return "icon" in props2 && props2.icon !== void 0;
|
|
4042
4134
|
}, [children]);
|
|
4043
|
-
(0,
|
|
4135
|
+
(0, import_react35.useLayoutEffect)(() => {
|
|
4044
4136
|
if (!contentRef.current || !onOverflow) return;
|
|
4045
4137
|
if (orientation === "vertical") {
|
|
4046
4138
|
return;
|
|
@@ -4069,13 +4161,13 @@ var init_Radio = __esm({
|
|
|
4069
4161
|
"--is-multiline": !!isMultiline,
|
|
4070
4162
|
"--is-required": isRequired
|
|
4071
4163
|
};
|
|
4072
|
-
const containerClasses = (0,
|
|
4164
|
+
const containerClasses = (0, import_dedupe39.default)(
|
|
4073
4165
|
"mobius-radio__label",
|
|
4074
4166
|
radioClasses,
|
|
4075
4167
|
className,
|
|
4076
4168
|
{ "--has-icon-first": hasIconFirst }
|
|
4077
4169
|
);
|
|
4078
|
-
const inputClasses = (0,
|
|
4170
|
+
const inputClasses = (0, import_dedupe39.default)("mobius-radio__input", radioClasses);
|
|
4079
4171
|
const { "aria-describedby": _ariaDescribedBy, ...rest } = otherProps;
|
|
4080
4172
|
const handleChange = (event) => {
|
|
4081
4173
|
if (setSelected) {
|
|
@@ -4089,9 +4181,9 @@ var init_Radio = __esm({
|
|
|
4089
4181
|
onChange(adaptedEvent);
|
|
4090
4182
|
}
|
|
4091
4183
|
};
|
|
4092
|
-
return /* @__PURE__ */ (0,
|
|
4093
|
-
/* @__PURE__ */ (0,
|
|
4094
|
-
/* @__PURE__ */ (0,
|
|
4184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
4185
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Label, { className: containerClasses, children: [
|
|
4186
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4095
4187
|
"input",
|
|
4096
4188
|
{
|
|
4097
4189
|
"aria-describedby": otherProps["aria-describedby"],
|
|
@@ -4108,12 +4200,12 @@ var init_Radio = __esm({
|
|
|
4108
4200
|
...rest
|
|
4109
4201
|
}
|
|
4110
4202
|
),
|
|
4111
|
-
isMultiline ? /* @__PURE__ */ (0,
|
|
4112
|
-
/* @__PURE__ */ (0,
|
|
4113
|
-
/* @__PURE__ */ (0,
|
|
4114
|
-
] }) : /* @__PURE__ */ (0,
|
|
4203
|
+
isMultiline ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { ref: contentRef, className: "mobius-radio__content--multiline", children: [
|
|
4204
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mobius-radio__content-first-line", children: label }),
|
|
4205
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mobius-radio__extra-content", children })
|
|
4206
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { ref: contentRef, className: "mobius-radio__content", children: label || children })
|
|
4115
4207
|
] }),
|
|
4116
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
4208
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ErrorMessage, { errorMessage })
|
|
4117
4209
|
] });
|
|
4118
4210
|
};
|
|
4119
4211
|
Radio.displayName = "Radio";
|
|
@@ -4121,19 +4213,19 @@ var init_Radio = __esm({
|
|
|
4121
4213
|
});
|
|
4122
4214
|
|
|
4123
4215
|
// src/components/Radio/RadioGroup.tsx
|
|
4124
|
-
var
|
|
4216
|
+
var import_dedupe40, import_react36, import_jsx_runtime51, getDefaultVal, RadioGroup;
|
|
4125
4217
|
var init_RadioGroup = __esm({
|
|
4126
4218
|
"src/components/Radio/RadioGroup.tsx"() {
|
|
4127
4219
|
"use strict";
|
|
4128
4220
|
"use client";
|
|
4129
|
-
|
|
4130
|
-
|
|
4221
|
+
import_dedupe40 = __toESM(require("classnames/dedupe"));
|
|
4222
|
+
import_react36 = require("react");
|
|
4131
4223
|
init_hooks();
|
|
4132
4224
|
init_spaceDelimitedList();
|
|
4133
4225
|
init_ErrorMessage2();
|
|
4134
4226
|
init_Label2();
|
|
4135
4227
|
init_Stack2();
|
|
4136
|
-
|
|
4228
|
+
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4137
4229
|
getDefaultVal = (children, defaultValue) => {
|
|
4138
4230
|
if (Array.isArray(children) && defaultValue) {
|
|
4139
4231
|
const option = children?.find((item) => item.props.value === defaultValue);
|
|
@@ -4161,15 +4253,15 @@ var init_RadioGroup = __esm({
|
|
|
4161
4253
|
...rest
|
|
4162
4254
|
} = props;
|
|
4163
4255
|
const defaultSelected = getDefaultVal(children, value || defaultValue);
|
|
4164
|
-
const [selected, setSelected] = (0,
|
|
4165
|
-
const overflowsRef = (0,
|
|
4166
|
-
const [hasOverflow, setHasOverflow] = (0,
|
|
4167
|
-
(0,
|
|
4256
|
+
const [selected, setSelected] = (0, import_react36.useState)(defaultSelected);
|
|
4257
|
+
const overflowsRef = (0, import_react36.useRef)({});
|
|
4258
|
+
const [hasOverflow, setHasOverflow] = (0, import_react36.useState)(false);
|
|
4259
|
+
(0, import_react36.useEffect)(() => {
|
|
4168
4260
|
if (value !== void 0) {
|
|
4169
4261
|
setSelected(value);
|
|
4170
4262
|
}
|
|
4171
4263
|
}, [value]);
|
|
4172
|
-
const handleOverflow = (0,
|
|
4264
|
+
const handleOverflow = (0, import_react36.useCallback)(
|
|
4173
4265
|
(radioValue, overflow) => {
|
|
4174
4266
|
overflowsRef.current = {
|
|
4175
4267
|
...overflowsRef.current,
|
|
@@ -4193,26 +4285,26 @@ var init_RadioGroup = __esm({
|
|
|
4193
4285
|
[`--is-${effectiveOrientation}`]: true,
|
|
4194
4286
|
[className || ""]: true
|
|
4195
4287
|
};
|
|
4196
|
-
const radioGroupClasses = (0,
|
|
4288
|
+
const radioGroupClasses = (0, import_dedupe40.default)(
|
|
4197
4289
|
"mobius",
|
|
4198
4290
|
"mobius-radio-group",
|
|
4199
4291
|
radioClasses,
|
|
4200
4292
|
validationClasses
|
|
4201
4293
|
);
|
|
4202
|
-
const radioWrapperClasses = (0,
|
|
4294
|
+
const radioWrapperClasses = (0, import_dedupe40.default)("mobius-radio__wrapper", {
|
|
4203
4295
|
[`--is-${effectiveOrientation}`]: true
|
|
4204
4296
|
});
|
|
4205
|
-
const labelClasses = (0,
|
|
4206
|
-
const errorMessageId = (0,
|
|
4207
|
-
const defaultNameAttrId = (0,
|
|
4297
|
+
const labelClasses = (0, import_dedupe40.default)(radioClasses, validationClasses);
|
|
4298
|
+
const errorMessageId = (0, import_react36.useId)();
|
|
4299
|
+
const defaultNameAttrId = (0, import_react36.useId)();
|
|
4208
4300
|
const nameAttribute = name || defaultNameAttrId;
|
|
4209
4301
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
4210
4302
|
const describedBy = spaceDelimitedList([
|
|
4211
4303
|
shouldErrorMessageShow,
|
|
4212
4304
|
props["aria-describedby"]
|
|
4213
4305
|
]);
|
|
4214
|
-
const labelId = (0,
|
|
4215
|
-
return /* @__PURE__ */ (0,
|
|
4306
|
+
const labelId = (0, import_react36.useId)();
|
|
4307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4216
4308
|
"div",
|
|
4217
4309
|
{
|
|
4218
4310
|
...rest,
|
|
@@ -4228,12 +4320,12 @@ var init_RadioGroup = __esm({
|
|
|
4228
4320
|
ref,
|
|
4229
4321
|
className: radioGroupClasses,
|
|
4230
4322
|
role: "radiogroup",
|
|
4231
|
-
children: /* @__PURE__ */ (0,
|
|
4232
|
-
label && /* @__PURE__ */ (0,
|
|
4233
|
-
/* @__PURE__ */ (0,
|
|
4234
|
-
if ((0,
|
|
4323
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Stack, { gap: "xs", children: [
|
|
4324
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Label, { htmlFor: name, id: labelId, className: labelClasses, children: label }),
|
|
4325
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: radioWrapperClasses, children: import_react36.Children.map(children, (child) => {
|
|
4326
|
+
if ((0, import_react36.isValidElement)(child)) {
|
|
4235
4327
|
const childValue = child.props.value;
|
|
4236
|
-
return (0,
|
|
4328
|
+
return (0, import_react36.cloneElement)(
|
|
4237
4329
|
child,
|
|
4238
4330
|
{
|
|
4239
4331
|
orientation: effectiveOrientation,
|
|
@@ -4251,7 +4343,7 @@ var init_RadioGroup = __esm({
|
|
|
4251
4343
|
}
|
|
4252
4344
|
return child;
|
|
4253
4345
|
}) }),
|
|
4254
|
-
/* @__PURE__ */ (0,
|
|
4346
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
4255
4347
|
] })
|
|
4256
4348
|
}
|
|
4257
4349
|
);
|
|
@@ -4270,47 +4362,47 @@ var init_Radio2 = __esm({
|
|
|
4270
4362
|
});
|
|
4271
4363
|
|
|
4272
4364
|
// src/components/Segment/SegmentGroup.tsx
|
|
4273
|
-
var
|
|
4365
|
+
var import_dedupe41, import_jsx_runtime52, SegmentGroup;
|
|
4274
4366
|
var init_SegmentGroup = __esm({
|
|
4275
4367
|
"src/components/Segment/SegmentGroup.tsx"() {
|
|
4276
4368
|
"use strict";
|
|
4277
|
-
|
|
4278
|
-
|
|
4369
|
+
import_dedupe41 = __toESM(require("classnames/dedupe"));
|
|
4370
|
+
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4279
4371
|
SegmentGroup = (props) => {
|
|
4280
4372
|
const { children, horizontal, gap, className, ...rest } = props;
|
|
4281
4373
|
const gapClass = gap ? `gap-${gap}` : "";
|
|
4282
|
-
const classes = (0,
|
|
4374
|
+
const classes = (0, import_dedupe41.default)(
|
|
4283
4375
|
"mobius",
|
|
4284
4376
|
"mobius-segment-group",
|
|
4285
4377
|
className,
|
|
4286
4378
|
{ "--is-horizontal": horizontal },
|
|
4287
4379
|
gapClass
|
|
4288
4380
|
);
|
|
4289
|
-
return /* @__PURE__ */ (0,
|
|
4381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: classes, ...rest, children });
|
|
4290
4382
|
};
|
|
4291
4383
|
SegmentGroup.displayName = "SegmentGroup";
|
|
4292
4384
|
}
|
|
4293
4385
|
});
|
|
4294
4386
|
|
|
4295
4387
|
// src/components/Segment/Segment.tsx
|
|
4296
|
-
var
|
|
4388
|
+
var import_dedupe42, import_Segment, import_jsx_runtime53, Segment;
|
|
4297
4389
|
var init_Segment = __esm({
|
|
4298
4390
|
"src/components/Segment/Segment.tsx"() {
|
|
4299
4391
|
"use strict";
|
|
4300
|
-
|
|
4392
|
+
import_dedupe42 = __toESM(require("classnames/dedupe"));
|
|
4301
4393
|
import_Segment = require("@simplybusiness/mobius/src/components/Segment/Segment.css");
|
|
4302
|
-
|
|
4394
|
+
import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4303
4395
|
Segment = (props) => {
|
|
4304
4396
|
const { heading, children, colour, inverted, className, ...rest } = props;
|
|
4305
|
-
const classes = (0,
|
|
4397
|
+
const classes = (0, import_dedupe42.default)(
|
|
4306
4398
|
"mobius",
|
|
4307
4399
|
"mobius-segment",
|
|
4308
4400
|
colour,
|
|
4309
4401
|
{ inverted },
|
|
4310
4402
|
className
|
|
4311
4403
|
);
|
|
4312
|
-
return /* @__PURE__ */ (0,
|
|
4313
|
-
heading && /* @__PURE__ */ (0,
|
|
4404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: classes, ...rest, children: [
|
|
4405
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mobius-segment__heading", children: heading }),
|
|
4314
4406
|
children
|
|
4315
4407
|
] });
|
|
4316
4408
|
};
|
|
@@ -4328,14 +4420,14 @@ var init_Segment2 = __esm({
|
|
|
4328
4420
|
});
|
|
4329
4421
|
|
|
4330
4422
|
// src/components/Select/Select.tsx
|
|
4331
|
-
var import_icons12,
|
|
4423
|
+
var import_icons12, import_dedupe43, import_react37, import_Select, import_jsx_runtime54, Select;
|
|
4332
4424
|
var init_Select = __esm({
|
|
4333
4425
|
"src/components/Select/Select.tsx"() {
|
|
4334
4426
|
"use strict";
|
|
4335
4427
|
"use client";
|
|
4336
4428
|
import_icons12 = require("@simplybusiness/icons");
|
|
4337
|
-
|
|
4338
|
-
|
|
4429
|
+
import_dedupe43 = __toESM(require("classnames/dedupe"));
|
|
4430
|
+
import_react37 = require("react");
|
|
4339
4431
|
init_hooks();
|
|
4340
4432
|
init_useLabel2();
|
|
4341
4433
|
init_spaceDelimitedList();
|
|
@@ -4344,7 +4436,7 @@ var init_Select = __esm({
|
|
|
4344
4436
|
init_Label2();
|
|
4345
4437
|
init_Stack2();
|
|
4346
4438
|
import_Select = require("@simplybusiness/mobius/src/components/Select/Select.css");
|
|
4347
|
-
|
|
4439
|
+
import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4348
4440
|
Select = ({ ref, ...props }) => {
|
|
4349
4441
|
const {
|
|
4350
4442
|
label,
|
|
@@ -4365,24 +4457,24 @@ var init_Select = __esm({
|
|
|
4365
4457
|
"--is-required": typeof isRequired === "boolean" && isRequired,
|
|
4366
4458
|
"--is-optional": typeof isRequired === "boolean" && !isRequired
|
|
4367
4459
|
};
|
|
4368
|
-
const sharedClasses = (0,
|
|
4369
|
-
const wrapperClasses = (0,
|
|
4460
|
+
const sharedClasses = (0, import_dedupe43.default)(validationClasses, stateClasses);
|
|
4461
|
+
const wrapperClasses = (0, import_dedupe43.default)(
|
|
4370
4462
|
"mobius-select__wrapper",
|
|
4371
4463
|
sharedClasses,
|
|
4372
4464
|
otherProps.className
|
|
4373
4465
|
);
|
|
4374
|
-
const selectClasses = (0,
|
|
4466
|
+
const selectClasses = (0, import_dedupe43.default)(
|
|
4375
4467
|
"mobius-select",
|
|
4376
4468
|
sharedClasses,
|
|
4377
4469
|
otherProps.className
|
|
4378
4470
|
);
|
|
4379
|
-
const labelClasses = (0,
|
|
4471
|
+
const labelClasses = (0, import_dedupe43.default)(
|
|
4380
4472
|
"mobius-label",
|
|
4381
4473
|
sharedClasses,
|
|
4382
4474
|
otherProps.className
|
|
4383
4475
|
);
|
|
4384
|
-
const iconClasses = (0,
|
|
4385
|
-
const errorMessageId = (0,
|
|
4476
|
+
const iconClasses = (0, import_dedupe43.default)("mobius-select__icon", sharedClasses);
|
|
4477
|
+
const errorMessageId = (0, import_react37.useId)();
|
|
4386
4478
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
4387
4479
|
const describedBy = spaceDelimitedList([
|
|
4388
4480
|
shouldErrorMessageShow,
|
|
@@ -4393,10 +4485,10 @@ var init_Select = __esm({
|
|
|
4393
4485
|
onChange(e);
|
|
4394
4486
|
}
|
|
4395
4487
|
};
|
|
4396
|
-
return /* @__PURE__ */ (0,
|
|
4397
|
-
label && /* @__PURE__ */ (0,
|
|
4398
|
-
/* @__PURE__ */ (0,
|
|
4399
|
-
/* @__PURE__ */ (0,
|
|
4488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Stack, { className: "mobius mobius-select__outer", gap: "xs", children: [
|
|
4489
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Label, { ...labelProps, className: labelClasses, children: label }),
|
|
4490
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: wrapperClasses, children: [
|
|
4491
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4400
4492
|
"select",
|
|
4401
4493
|
{
|
|
4402
4494
|
...otherProps,
|
|
@@ -4412,9 +4504,9 @@ var init_Select = __esm({
|
|
|
4412
4504
|
onChange: handleChange
|
|
4413
4505
|
}
|
|
4414
4506
|
),
|
|
4415
|
-
/* @__PURE__ */ (0,
|
|
4507
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon, { icon: import_icons12.chevronDown }) })
|
|
4416
4508
|
] }),
|
|
4417
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
4509
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
4418
4510
|
] });
|
|
4419
4511
|
};
|
|
4420
4512
|
Select.displayName = "Select";
|
|
@@ -4430,15 +4522,15 @@ var init_Select2 = __esm({
|
|
|
4430
4522
|
});
|
|
4431
4523
|
|
|
4432
4524
|
// src/components/Slider/Slider.tsx
|
|
4433
|
-
var
|
|
4525
|
+
var import_dedupe44, import_react38, import_Slider, import_jsx_runtime55;
|
|
4434
4526
|
var init_Slider = __esm({
|
|
4435
4527
|
"src/components/Slider/Slider.tsx"() {
|
|
4436
4528
|
"use strict";
|
|
4437
4529
|
"use client";
|
|
4438
|
-
|
|
4439
|
-
|
|
4530
|
+
import_dedupe44 = __toESM(require("classnames/dedupe"));
|
|
4531
|
+
import_react38 = require("react");
|
|
4440
4532
|
import_Slider = require("@simplybusiness/mobius/src/components/Slider/Slider.css");
|
|
4441
|
-
|
|
4533
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4442
4534
|
}
|
|
4443
4535
|
});
|
|
4444
4536
|
|
|
@@ -4451,19 +4543,19 @@ var init_Slider2 = __esm({
|
|
|
4451
4543
|
});
|
|
4452
4544
|
|
|
4453
4545
|
// src/components/SVG/SVG.tsx
|
|
4454
|
-
var
|
|
4546
|
+
var import_react39, import_dedupe45, import_jsx_runtime56, SVG;
|
|
4455
4547
|
var init_SVG = __esm({
|
|
4456
4548
|
"src/components/SVG/SVG.tsx"() {
|
|
4457
4549
|
"use strict";
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4550
|
+
import_react39 = require("react");
|
|
4551
|
+
import_dedupe45 = __toESM(require("classnames/dedupe"));
|
|
4552
|
+
import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4461
4553
|
SVG = ({ ref, ...props }) => {
|
|
4462
4554
|
const { children, className, ...otherProps } = props;
|
|
4463
|
-
const classes = (0,
|
|
4464
|
-
const svgNode =
|
|
4555
|
+
const classes = (0, import_dedupe45.default)("mobius", "mobius-svg", className);
|
|
4556
|
+
const svgNode = import_react39.Children.only(children);
|
|
4465
4557
|
const { children: svgChildren, viewBox, xmlns } = svgNode.props;
|
|
4466
|
-
return /* @__PURE__ */ (0,
|
|
4558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4467
4559
|
"svg",
|
|
4468
4560
|
{
|
|
4469
4561
|
viewBox,
|
|
@@ -4488,16 +4580,16 @@ var init_SVG2 = __esm({
|
|
|
4488
4580
|
});
|
|
4489
4581
|
|
|
4490
4582
|
// src/components/Switch/Switch.tsx
|
|
4491
|
-
var
|
|
4583
|
+
var import_react40, import_dedupe46, import_Switch, import_jsx_runtime57, Switch;
|
|
4492
4584
|
var init_Switch = __esm({
|
|
4493
4585
|
"src/components/Switch/Switch.tsx"() {
|
|
4494
4586
|
"use strict";
|
|
4495
4587
|
"use client";
|
|
4496
|
-
|
|
4497
|
-
|
|
4588
|
+
import_react40 = require("react");
|
|
4589
|
+
import_dedupe46 = __toESM(require("classnames/dedupe"));
|
|
4498
4590
|
init_VisuallyHidden2();
|
|
4499
4591
|
import_Switch = require("@simplybusiness/mobius/src/components/Switch/Switch.css");
|
|
4500
|
-
|
|
4592
|
+
import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4501
4593
|
Switch = ({ ref, ...props }) => {
|
|
4502
4594
|
const {
|
|
4503
4595
|
checked = false,
|
|
@@ -4506,11 +4598,11 @@ var init_Switch = __esm({
|
|
|
4506
4598
|
isDisabled = false,
|
|
4507
4599
|
...otherProps
|
|
4508
4600
|
} = props;
|
|
4509
|
-
const [enabled, setEnabled] = (0,
|
|
4510
|
-
(0,
|
|
4601
|
+
const [enabled, setEnabled] = (0, import_react40.useState)(checked);
|
|
4602
|
+
(0, import_react40.useEffect)(() => {
|
|
4511
4603
|
setEnabled(checked);
|
|
4512
4604
|
}, [checked]);
|
|
4513
|
-
const classes = (0,
|
|
4605
|
+
const classes = (0, import_dedupe46.default)(
|
|
4514
4606
|
"mobius",
|
|
4515
4607
|
"mobius-switch",
|
|
4516
4608
|
{
|
|
@@ -4525,9 +4617,9 @@ var init_Switch = __esm({
|
|
|
4525
4617
|
onChange(event);
|
|
4526
4618
|
}
|
|
4527
4619
|
};
|
|
4528
|
-
return /* @__PURE__ */ (0,
|
|
4529
|
-
/* @__PURE__ */ (0,
|
|
4530
|
-
/* @__PURE__ */ (0,
|
|
4620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("label", { ref, className: classes, children: [
|
|
4621
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { children: enabled ? "On" : "Off" }) }),
|
|
4622
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4531
4623
|
"input",
|
|
4532
4624
|
{
|
|
4533
4625
|
type: "checkbox",
|
|
@@ -4538,7 +4630,7 @@ var init_Switch = __esm({
|
|
|
4538
4630
|
...otherProps
|
|
4539
4631
|
}
|
|
4540
4632
|
),
|
|
4541
|
-
/* @__PURE__ */ (0,
|
|
4633
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "mobius-switch__slider" })
|
|
4542
4634
|
] });
|
|
4543
4635
|
};
|
|
4544
4636
|
Switch.displayName = "Switch";
|
|
@@ -4554,114 +4646,114 @@ var init_Switch2 = __esm({
|
|
|
4554
4646
|
});
|
|
4555
4647
|
|
|
4556
4648
|
// src/components/Table/Table.tsx
|
|
4557
|
-
var
|
|
4649
|
+
var import_dedupe47, import_Table, import_jsx_runtime58, Table;
|
|
4558
4650
|
var init_Table = __esm({
|
|
4559
4651
|
"src/components/Table/Table.tsx"() {
|
|
4560
4652
|
"use strict";
|
|
4561
|
-
|
|
4653
|
+
import_dedupe47 = __toESM(require("classnames/dedupe"));
|
|
4562
4654
|
import_Table = require("@simplybusiness/mobius/src/components/Table/Table.css");
|
|
4563
|
-
|
|
4655
|
+
import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4564
4656
|
Table = ({ ref, ...props }) => {
|
|
4565
|
-
const classes = (0,
|
|
4566
|
-
return /* @__PURE__ */ (0,
|
|
4657
|
+
const classes = (0, import_dedupe47.default)("mobius", "mobius-table", props.className);
|
|
4658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("table", { ref, ...props, className: classes });
|
|
4567
4659
|
};
|
|
4568
4660
|
Table.displayName = "Table";
|
|
4569
4661
|
}
|
|
4570
4662
|
});
|
|
4571
4663
|
|
|
4572
4664
|
// src/components/Table/Head.tsx
|
|
4573
|
-
var
|
|
4665
|
+
var import_dedupe48, import_jsx_runtime59, Head;
|
|
4574
4666
|
var init_Head = __esm({
|
|
4575
4667
|
"src/components/Table/Head.tsx"() {
|
|
4576
4668
|
"use strict";
|
|
4577
|
-
|
|
4578
|
-
|
|
4669
|
+
import_dedupe48 = __toESM(require("classnames/dedupe"));
|
|
4670
|
+
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4579
4671
|
Head = ({ ref, ...props }) => {
|
|
4580
|
-
const classes = (0,
|
|
4581
|
-
return /* @__PURE__ */ (0,
|
|
4672
|
+
const classes = (0, import_dedupe48.default)("mobius", "mobius-table__head", props.className);
|
|
4673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("thead", { ref, ...props, className: classes });
|
|
4582
4674
|
};
|
|
4583
4675
|
Head.displayName = "Table.Head";
|
|
4584
4676
|
}
|
|
4585
4677
|
});
|
|
4586
4678
|
|
|
4587
4679
|
// src/components/Table/Body.tsx
|
|
4588
|
-
var
|
|
4680
|
+
var import_dedupe49, import_jsx_runtime60, Body;
|
|
4589
4681
|
var init_Body = __esm({
|
|
4590
4682
|
"src/components/Table/Body.tsx"() {
|
|
4591
4683
|
"use strict";
|
|
4592
|
-
|
|
4593
|
-
|
|
4684
|
+
import_dedupe49 = __toESM(require("classnames/dedupe"));
|
|
4685
|
+
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4594
4686
|
Body = ({ ref, ...props }) => {
|
|
4595
|
-
const classes = (0,
|
|
4596
|
-
return /* @__PURE__ */ (0,
|
|
4687
|
+
const classes = (0, import_dedupe49.default)("mobius", "mobius-table__body", props.className);
|
|
4688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("tbody", { ref, ...props, className: classes });
|
|
4597
4689
|
};
|
|
4598
4690
|
Body.displayName = "Table.Body";
|
|
4599
4691
|
}
|
|
4600
4692
|
});
|
|
4601
4693
|
|
|
4602
4694
|
// src/components/Table/Foot.tsx
|
|
4603
|
-
var
|
|
4695
|
+
var import_dedupe50, import_jsx_runtime61, Foot;
|
|
4604
4696
|
var init_Foot = __esm({
|
|
4605
4697
|
"src/components/Table/Foot.tsx"() {
|
|
4606
4698
|
"use strict";
|
|
4607
|
-
|
|
4608
|
-
|
|
4699
|
+
import_dedupe50 = __toESM(require("classnames/dedupe"));
|
|
4700
|
+
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4609
4701
|
Foot = ({ ref, ...props }) => {
|
|
4610
|
-
const classes = (0,
|
|
4611
|
-
return /* @__PURE__ */ (0,
|
|
4702
|
+
const classes = (0, import_dedupe50.default)("mobius", "mobius-table__foot", props.className);
|
|
4703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tfoot", { ref, ...props, className: classes });
|
|
4612
4704
|
};
|
|
4613
4705
|
Foot.displayName = "Table.Foot";
|
|
4614
4706
|
}
|
|
4615
4707
|
});
|
|
4616
4708
|
|
|
4617
4709
|
// src/components/Table/Row.tsx
|
|
4618
|
-
var
|
|
4710
|
+
var import_dedupe51, import_jsx_runtime62, Row;
|
|
4619
4711
|
var init_Row = __esm({
|
|
4620
4712
|
"src/components/Table/Row.tsx"() {
|
|
4621
4713
|
"use strict";
|
|
4622
|
-
|
|
4623
|
-
|
|
4714
|
+
import_dedupe51 = __toESM(require("classnames/dedupe"));
|
|
4715
|
+
import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4624
4716
|
Row = ({ ref, ...props }) => {
|
|
4625
|
-
const classes = (0,
|
|
4626
|
-
return /* @__PURE__ */ (0,
|
|
4717
|
+
const classes = (0, import_dedupe51.default)("mobius", "mobius-table__row", props.className);
|
|
4718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("tr", { ref, ...props, className: classes });
|
|
4627
4719
|
};
|
|
4628
4720
|
Row.displayName = "Table.Row";
|
|
4629
4721
|
}
|
|
4630
4722
|
});
|
|
4631
4723
|
|
|
4632
4724
|
// src/components/Table/HeaderCell.tsx
|
|
4633
|
-
var
|
|
4725
|
+
var import_dedupe52, import_jsx_runtime63, HeaderCell;
|
|
4634
4726
|
var init_HeaderCell = __esm({
|
|
4635
4727
|
"src/components/Table/HeaderCell.tsx"() {
|
|
4636
4728
|
"use strict";
|
|
4637
|
-
|
|
4638
|
-
|
|
4729
|
+
import_dedupe52 = __toESM(require("classnames/dedupe"));
|
|
4730
|
+
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4639
4731
|
HeaderCell = ({ ref, ...props }) => {
|
|
4640
|
-
const classes = (0,
|
|
4732
|
+
const classes = (0, import_dedupe52.default)(
|
|
4641
4733
|
"mobius",
|
|
4642
4734
|
"mobius-table__head-cell",
|
|
4643
4735
|
props.className
|
|
4644
4736
|
);
|
|
4645
|
-
return /* @__PURE__ */ (0,
|
|
4737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("th", { ...props, ref, className: classes });
|
|
4646
4738
|
};
|
|
4647
4739
|
HeaderCell.displayName = "Table.HeaderCell";
|
|
4648
4740
|
}
|
|
4649
4741
|
});
|
|
4650
4742
|
|
|
4651
4743
|
// src/components/Table/Cell.tsx
|
|
4652
|
-
var
|
|
4744
|
+
var import_dedupe53, import_jsx_runtime64, Cell;
|
|
4653
4745
|
var init_Cell = __esm({
|
|
4654
4746
|
"src/components/Table/Cell.tsx"() {
|
|
4655
4747
|
"use strict";
|
|
4656
|
-
|
|
4657
|
-
|
|
4748
|
+
import_dedupe53 = __toESM(require("classnames/dedupe"));
|
|
4749
|
+
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4658
4750
|
Cell = ({ ref, ...props }) => {
|
|
4659
|
-
const classes = (0,
|
|
4751
|
+
const classes = (0, import_dedupe53.default)(
|
|
4660
4752
|
"mobius",
|
|
4661
4753
|
"mobius-table__body-cell",
|
|
4662
4754
|
props.className
|
|
4663
4755
|
);
|
|
4664
|
-
return /* @__PURE__ */ (0,
|
|
4756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("td", { ref, ...props, className: classes });
|
|
4665
4757
|
};
|
|
4666
4758
|
Cell.displayName = "Table.Cell";
|
|
4667
4759
|
}
|
|
@@ -4691,37 +4783,6 @@ var init_Table2 = __esm({
|
|
|
4691
4783
|
}
|
|
4692
4784
|
});
|
|
4693
4785
|
|
|
4694
|
-
// src/components/Text/Text.tsx
|
|
4695
|
-
var import_dedupe53, import_Text, import_jsx_runtime63, getElementType, Text;
|
|
4696
|
-
var init_Text = __esm({
|
|
4697
|
-
"src/components/Text/Text.tsx"() {
|
|
4698
|
-
"use strict";
|
|
4699
|
-
import_dedupe53 = __toESM(require("classnames/dedupe"));
|
|
4700
|
-
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
4701
|
-
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4702
|
-
getElementType = (variant, elementType) => {
|
|
4703
|
-
if (variant) {
|
|
4704
|
-
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
4705
|
-
}
|
|
4706
|
-
return elementType || "p";
|
|
4707
|
-
};
|
|
4708
|
-
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
4709
|
-
const { variant, className, spacing, ...otherProps } = props;
|
|
4710
|
-
const elementType = getElementType(variant, Component);
|
|
4711
|
-
const variantType = variant || elementType;
|
|
4712
|
-
const classes = (0, import_dedupe53.default)(
|
|
4713
|
-
"mobius",
|
|
4714
|
-
"mobius-text",
|
|
4715
|
-
{ [`--is-${variantType}`]: variantType },
|
|
4716
|
-
{ [`--has-line-height-${spacing}`]: spacing },
|
|
4717
|
-
className
|
|
4718
|
-
);
|
|
4719
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
4720
|
-
};
|
|
4721
|
-
Text.displayName = "Text";
|
|
4722
|
-
}
|
|
4723
|
-
});
|
|
4724
|
-
|
|
4725
4786
|
// src/components/Text/index.tsx
|
|
4726
4787
|
var init_Text2 = __esm({
|
|
4727
4788
|
"src/components/Text/index.tsx"() {
|
|
@@ -4731,12 +4792,12 @@ var init_Text2 = __esm({
|
|
|
4731
4792
|
});
|
|
4732
4793
|
|
|
4733
4794
|
// src/components/TextAreaInput/TextAreaInput.tsx
|
|
4734
|
-
var import_dedupe54,
|
|
4795
|
+
var import_dedupe54, import_jsx_runtime65, TextAreaInput;
|
|
4735
4796
|
var init_TextAreaInput = __esm({
|
|
4736
4797
|
"src/components/TextAreaInput/TextAreaInput.tsx"() {
|
|
4737
4798
|
"use strict";
|
|
4738
4799
|
import_dedupe54 = __toESM(require("classnames/dedupe"));
|
|
4739
|
-
|
|
4800
|
+
import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4740
4801
|
TextAreaInput = ({ ref, ...props }) => {
|
|
4741
4802
|
const { isSelected, isDisabled, isReadOnly, isRequired, ...otherProps } = props;
|
|
4742
4803
|
const classes = (0, import_dedupe54.default)(
|
|
@@ -4749,7 +4810,7 @@ var init_TextAreaInput = __esm({
|
|
|
4749
4810
|
},
|
|
4750
4811
|
otherProps.className
|
|
4751
4812
|
);
|
|
4752
|
-
return /* @__PURE__ */ (0,
|
|
4813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4753
4814
|
"textarea",
|
|
4754
4815
|
{
|
|
4755
4816
|
ref,
|
|
@@ -4773,7 +4834,7 @@ var init_TextAreaInput2 = __esm({
|
|
|
4773
4834
|
});
|
|
4774
4835
|
|
|
4775
4836
|
// src/components/TextArea/TextArea.tsx
|
|
4776
|
-
var import_dedupe55, import_TextArea,
|
|
4837
|
+
var import_dedupe55, import_TextArea, import_jsx_runtime66, TextArea;
|
|
4777
4838
|
var init_TextArea = __esm({
|
|
4778
4839
|
"src/components/TextArea/TextArea.tsx"() {
|
|
4779
4840
|
"use strict";
|
|
@@ -4785,7 +4846,7 @@ var init_TextArea = __esm({
|
|
|
4785
4846
|
init_Stack2();
|
|
4786
4847
|
init_TextAreaInput2();
|
|
4787
4848
|
import_TextArea = require("@simplybusiness/mobius/src/components/TextArea/TextArea.css");
|
|
4788
|
-
|
|
4849
|
+
import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4789
4850
|
TextArea = ({ ref, ...props }) => {
|
|
4790
4851
|
const {
|
|
4791
4852
|
isDisabled,
|
|
@@ -4805,9 +4866,9 @@ var init_TextArea = __esm({
|
|
|
4805
4866
|
},
|
|
4806
4867
|
validationClasses
|
|
4807
4868
|
);
|
|
4808
|
-
return /* @__PURE__ */ (0,
|
|
4809
|
-
label && /* @__PURE__ */ (0,
|
|
4810
|
-
/* @__PURE__ */ (0,
|
|
4869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Stack, { className: classes, gap: "xs", children: [
|
|
4870
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Label, { ...labelProps, className: labelClasses, children: props.label }),
|
|
4871
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4811
4872
|
TextAreaInput,
|
|
4812
4873
|
{
|
|
4813
4874
|
...otherProps,
|
|
@@ -4818,7 +4879,7 @@ var init_TextArea = __esm({
|
|
|
4818
4879
|
"aria-invalid": errorMessage != null
|
|
4819
4880
|
}
|
|
4820
4881
|
),
|
|
4821
|
-
/* @__PURE__ */ (0,
|
|
4882
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorMessage, { ...errorMessageProps, errorMessage })
|
|
4822
4883
|
] });
|
|
4823
4884
|
};
|
|
4824
4885
|
TextArea.displayName = "TextArea";
|
|
@@ -4833,53 +4894,6 @@ var init_TextArea2 = __esm({
|
|
|
4833
4894
|
}
|
|
4834
4895
|
});
|
|
4835
4896
|
|
|
4836
|
-
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
4837
|
-
var import_react40, import_jsx_runtime66, isHTML, TextOrHTML;
|
|
4838
|
-
var init_TextOrHTML = __esm({
|
|
4839
|
-
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
4840
|
-
"use strict";
|
|
4841
|
-
import_react40 = require("react");
|
|
4842
|
-
init_Text();
|
|
4843
|
-
import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4844
|
-
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
4845
|
-
TextOrHTML = ({
|
|
4846
|
-
ref,
|
|
4847
|
-
text,
|
|
4848
|
-
htmlClassName,
|
|
4849
|
-
htmlElementType,
|
|
4850
|
-
textWrapper = false,
|
|
4851
|
-
autoDetect = false,
|
|
4852
|
-
...textProps
|
|
4853
|
-
}) => {
|
|
4854
|
-
const textIsHTML = autoDetect && isHTML(text);
|
|
4855
|
-
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
4856
|
-
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
4857
|
-
const DangerousComponent = resolvedElementType;
|
|
4858
|
-
const dangerousHTML = (0, import_react40.useMemo)(() => ({ __html: text }), [text]);
|
|
4859
|
-
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4860
|
-
DangerousComponent,
|
|
4861
|
-
{
|
|
4862
|
-
className: htmlClassName,
|
|
4863
|
-
dangerouslySetInnerHTML: dangerousHTML
|
|
4864
|
-
}
|
|
4865
|
-
);
|
|
4866
|
-
if (shouldWrapInText) {
|
|
4867
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
4868
|
-
}
|
|
4869
|
-
return dangerousElement;
|
|
4870
|
-
};
|
|
4871
|
-
TextOrHTML.displayName = "TextOrHTML";
|
|
4872
|
-
}
|
|
4873
|
-
});
|
|
4874
|
-
|
|
4875
|
-
// src/components/TextOrHTML/index.tsx
|
|
4876
|
-
var init_TextOrHTML2 = __esm({
|
|
4877
|
-
"src/components/TextOrHTML/index.tsx"() {
|
|
4878
|
-
"use strict";
|
|
4879
|
-
init_TextOrHTML();
|
|
4880
|
-
}
|
|
4881
|
-
});
|
|
4882
|
-
|
|
4883
4897
|
// src/components/Title/Title.tsx
|
|
4884
4898
|
var import_dedupe56, import_Title, import_jsx_runtime67, Title;
|
|
4885
4899
|
var init_Title = __esm({
|