@simplybusiness/mobius 10.1.0 → 10.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/components/AddressLookup/AddressLookup.js +536 -526
- package/dist/cjs/components/AddressLookup/AddressLookup.js.map +4 -4
- package/dist/cjs/components/AddressLookup/index.js +536 -526
- package/dist/cjs/components/AddressLookup/index.js.map +4 -4
- package/dist/cjs/components/Alert/Alert.js +79 -11
- package/dist/cjs/components/Alert/Alert.js.map +4 -4
- package/dist/cjs/components/Alert/index.js +79 -11
- package/dist/cjs/components/Alert/index.js.map +4 -4
- package/dist/cjs/components/Checkbox/Checkbox.js +502 -492
- package/dist/cjs/components/Checkbox/Checkbox.js.map +4 -4
- package/dist/cjs/components/Checkbox/CheckboxGroup.js +502 -492
- package/dist/cjs/components/Checkbox/CheckboxGroup.js.map +4 -4
- package/dist/cjs/components/Checkbox/index.js +481 -471
- package/dist/cjs/components/Checkbox/index.js.map +4 -4
- package/dist/cjs/components/Combobox/Combobox.js +536 -526
- package/dist/cjs/components/Combobox/Combobox.js.map +4 -4
- package/dist/cjs/components/Combobox/index.js +536 -526
- package/dist/cjs/components/Combobox/index.js.map +4 -4
- package/dist/cjs/components/DateField/DateField.js +523 -513
- package/dist/cjs/components/DateField/DateField.js.map +4 -4
- package/dist/cjs/components/DateField/index.js +523 -513
- package/dist/cjs/components/DateField/index.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js +523 -513
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/index.js +523 -513
- package/dist/cjs/components/ErrorMessage/index.js.map +4 -4
- package/dist/cjs/components/ExpandableText/ExpandableText.js +523 -513
- package/dist/cjs/components/ExpandableText/ExpandableText.js.map +4 -4
- package/dist/cjs/components/ExpandableText/index.js +523 -513
- package/dist/cjs/components/ExpandableText/index.js.map +4 -4
- package/dist/cjs/components/MaskedField/MaskedField.js +533 -523
- package/dist/cjs/components/MaskedField/MaskedField.js.map +4 -4
- package/dist/cjs/components/MaskedField/index.js +533 -523
- package/dist/cjs/components/MaskedField/index.js.map +4 -4
- package/dist/cjs/components/NumberField/NumberField.js +524 -514
- package/dist/cjs/components/NumberField/NumberField.js.map +4 -4
- package/dist/cjs/components/NumberField/index.js +524 -514
- package/dist/cjs/components/NumberField/index.js.map +4 -4
- package/dist/cjs/components/PasswordField/PasswordField.js +520 -510
- package/dist/cjs/components/PasswordField/PasswordField.js.map +4 -4
- package/dist/cjs/components/PasswordField/ShowHideButton.js +519 -509
- package/dist/cjs/components/PasswordField/ShowHideButton.js.map +4 -4
- package/dist/cjs/components/PasswordField/index.js +520 -510
- package/dist/cjs/components/PasswordField/index.js.map +4 -4
- package/dist/cjs/components/Radio/Radio.js +502 -492
- package/dist/cjs/components/Radio/Radio.js.map +4 -4
- package/dist/cjs/components/Radio/RadioGroup.js +501 -491
- package/dist/cjs/components/Radio/RadioGroup.js.map +4 -4
- package/dist/cjs/components/Radio/index.js +480 -470
- package/dist/cjs/components/Radio/index.js.map +4 -4
- package/dist/cjs/components/Select/Select.js +507 -497
- package/dist/cjs/components/Select/Select.js.map +4 -4
- package/dist/cjs/components/Select/index.js +507 -497
- package/dist/cjs/components/Select/index.js.map +4 -4
- package/dist/cjs/components/TextArea/TextArea.js +517 -507
- package/dist/cjs/components/TextArea/TextArea.js.map +4 -4
- package/dist/cjs/components/TextArea/index.js +517 -507
- package/dist/cjs/components/TextArea/index.js.map +4 -4
- package/dist/cjs/components/TextField/TextField.js +533 -523
- package/dist/cjs/components/TextField/TextField.js.map +4 -4
- package/dist/cjs/components/TextField/index.js +533 -523
- package/dist/cjs/components/TextField/index.js.map +4 -4
- package/dist/cjs/components/index.js +563 -553
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/index.js +563 -553
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/meta.json +1340 -1273
- package/dist/esm/{chunk-FTSJNY4J.js → chunk-N5WGQAHM.js} +14 -2
- package/dist/esm/chunk-N5WGQAHM.js.map +7 -0
- package/dist/esm/{chunk-C4BILMFX.js → chunk-PB2OICEB.js} +1 -1
- package/dist/esm/components/AddressLookup/AddressLookup.js +2 -2
- package/dist/esm/components/AddressLookup/index.js +2 -2
- package/dist/esm/components/Alert/Alert.js +4 -1
- package/dist/esm/components/Alert/index.js +4 -1
- package/dist/esm/components/Checkbox/Checkbox.js +2 -2
- package/dist/esm/components/Checkbox/CheckboxGroup.js +2 -2
- package/dist/esm/components/Checkbox/index.js +2 -2
- package/dist/esm/components/Combobox/Combobox.js +2 -2
- package/dist/esm/components/Combobox/index.js +2 -2
- package/dist/esm/components/DateField/DateField.js +2 -2
- package/dist/esm/components/DateField/index.js +2 -2
- package/dist/esm/components/ErrorMessage/ErrorMessage.js +2 -2
- package/dist/esm/components/ErrorMessage/index.js +2 -2
- package/dist/esm/components/ExpandableText/ExpandableText.js +2 -2
- package/dist/esm/components/ExpandableText/index.js +2 -2
- package/dist/esm/components/MaskedField/MaskedField.js +2 -2
- package/dist/esm/components/MaskedField/index.js +2 -2
- package/dist/esm/components/NumberField/NumberField.js +2 -2
- package/dist/esm/components/NumberField/index.js +2 -2
- package/dist/esm/components/PasswordField/PasswordField.js +2 -2
- package/dist/esm/components/PasswordField/ShowHideButton.js +2 -2
- package/dist/esm/components/PasswordField/index.js +2 -2
- package/dist/esm/components/Radio/Radio.js +2 -2
- package/dist/esm/components/Radio/RadioGroup.js +2 -2
- package/dist/esm/components/Radio/index.js +2 -2
- package/dist/esm/components/Select/Select.js +2 -2
- package/dist/esm/components/Select/index.js +2 -2
- package/dist/esm/components/TextArea/TextArea.js +2 -2
- package/dist/esm/components/TextArea/index.js +2 -2
- package/dist/esm/components/TextField/TextField.js +2 -2
- package/dist/esm/components/TextField/index.js +2 -2
- package/dist/esm/components/index.js +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/meta.json +160 -127
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/Alert/Alert.tsx +10 -1
- package/src/components/Button/Button.css +44 -14
- package/dist/esm/chunk-FTSJNY4J.js.map +0 -7
- /package/dist/esm/{chunk-C4BILMFX.js.map → chunk-PB2OICEB.js.map} +0 -0
|
@@ -2006,19 +2006,98 @@ var init_AddressLookup2 = __esm({
|
|
|
2006
2006
|
}
|
|
2007
2007
|
});
|
|
2008
2008
|
|
|
2009
|
+
// src/components/Text/Text.tsx
|
|
2010
|
+
var import_dedupe10, import_Text, import_jsx_runtime12, getElementType, Text;
|
|
2011
|
+
var init_Text = __esm({
|
|
2012
|
+
"src/components/Text/Text.tsx"() {
|
|
2013
|
+
"use strict";
|
|
2014
|
+
import_dedupe10 = __toESM(require("classnames/dedupe"));
|
|
2015
|
+
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
2016
|
+
import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2017
|
+
getElementType = (variant, elementType) => {
|
|
2018
|
+
if (variant) {
|
|
2019
|
+
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
2020
|
+
}
|
|
2021
|
+
return elementType || "p";
|
|
2022
|
+
};
|
|
2023
|
+
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
2024
|
+
const { variant, className, spacing, ...otherProps } = props;
|
|
2025
|
+
const elementType = getElementType(variant, Component);
|
|
2026
|
+
const variantType = variant || elementType;
|
|
2027
|
+
const classes = (0, import_dedupe10.default)(
|
|
2028
|
+
"mobius",
|
|
2029
|
+
"mobius-text",
|
|
2030
|
+
{ [`--is-${variantType}`]: variantType },
|
|
2031
|
+
{ [`--has-line-height-${spacing}`]: spacing },
|
|
2032
|
+
className
|
|
2033
|
+
);
|
|
2034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
2035
|
+
};
|
|
2036
|
+
Text.displayName = "Text";
|
|
2037
|
+
}
|
|
2038
|
+
});
|
|
2039
|
+
|
|
2040
|
+
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
2041
|
+
var import_react14, import_jsx_runtime13, isHTML, TextOrHTML;
|
|
2042
|
+
var init_TextOrHTML = __esm({
|
|
2043
|
+
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
2044
|
+
"use strict";
|
|
2045
|
+
import_react14 = require("react");
|
|
2046
|
+
init_Text();
|
|
2047
|
+
import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2048
|
+
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
2049
|
+
TextOrHTML = ({
|
|
2050
|
+
ref,
|
|
2051
|
+
text,
|
|
2052
|
+
htmlClassName,
|
|
2053
|
+
htmlElementType,
|
|
2054
|
+
textWrapper = false,
|
|
2055
|
+
autoDetect = false,
|
|
2056
|
+
...textProps
|
|
2057
|
+
}) => {
|
|
2058
|
+
const textIsHTML = autoDetect && isHTML(text);
|
|
2059
|
+
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
2060
|
+
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
2061
|
+
const DangerousComponent = resolvedElementType;
|
|
2062
|
+
const dangerousHTML = (0, import_react14.useMemo)(() => ({ __html: text }), [text]);
|
|
2063
|
+
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2064
|
+
DangerousComponent,
|
|
2065
|
+
{
|
|
2066
|
+
className: htmlClassName,
|
|
2067
|
+
dangerouslySetInnerHTML: dangerousHTML
|
|
2068
|
+
}
|
|
2069
|
+
);
|
|
2070
|
+
if (shouldWrapInText) {
|
|
2071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
2072
|
+
}
|
|
2073
|
+
return dangerousElement;
|
|
2074
|
+
};
|
|
2075
|
+
TextOrHTML.displayName = "TextOrHTML";
|
|
2076
|
+
}
|
|
2077
|
+
});
|
|
2078
|
+
|
|
2079
|
+
// src/components/TextOrHTML/index.tsx
|
|
2080
|
+
var init_TextOrHTML2 = __esm({
|
|
2081
|
+
"src/components/TextOrHTML/index.tsx"() {
|
|
2082
|
+
"use strict";
|
|
2083
|
+
init_TextOrHTML();
|
|
2084
|
+
}
|
|
2085
|
+
});
|
|
2086
|
+
|
|
2009
2087
|
// src/components/Alert/Alert.tsx
|
|
2010
2088
|
function isAlertVariant(value) {
|
|
2011
2089
|
return value === "info" || value === "success" || value === "warning" || value === "error";
|
|
2012
2090
|
}
|
|
2013
|
-
var import_icons3,
|
|
2091
|
+
var import_icons3, import_dedupe11, import_Alert, import_jsx_runtime14, Alert;
|
|
2014
2092
|
var init_Alert = __esm({
|
|
2015
2093
|
"src/components/Alert/Alert.tsx"() {
|
|
2016
2094
|
"use strict";
|
|
2017
2095
|
import_icons3 = require("@simplybusiness/icons");
|
|
2018
|
-
|
|
2096
|
+
import_dedupe11 = __toESM(require("classnames/dedupe"));
|
|
2019
2097
|
init_Icon2();
|
|
2098
|
+
init_TextOrHTML2();
|
|
2020
2099
|
import_Alert = require("@simplybusiness/mobius/src/components/Alert/Alert.css");
|
|
2021
|
-
|
|
2100
|
+
import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2022
2101
|
Alert = ({ ref, ...props }) => {
|
|
2023
2102
|
const {
|
|
2024
2103
|
elementType: Element = "div",
|
|
@@ -2031,7 +2110,7 @@ var init_Alert = __esm({
|
|
|
2031
2110
|
if (!show) return null;
|
|
2032
2111
|
const variant = variantProp && isAlertVariant(variantProp) ? variantProp : "info";
|
|
2033
2112
|
const colorValue = variant === "success" ? `var(--color-valid)` : `var(--color-${variant})`;
|
|
2034
|
-
const classes = (0,
|
|
2113
|
+
const classes = (0, import_dedupe11.default)(
|
|
2035
2114
|
"mobius",
|
|
2036
2115
|
"mobius-alert",
|
|
2037
2116
|
{
|
|
@@ -2049,14 +2128,23 @@ var init_Alert = __esm({
|
|
|
2049
2128
|
warning: import_icons3.warning,
|
|
2050
2129
|
error: import_icons3.error
|
|
2051
2130
|
};
|
|
2052
|
-
const headerClasses = (0,
|
|
2053
|
-
const iconClasses = (0,
|
|
2054
|
-
const contentClasses = (0,
|
|
2055
|
-
return /* @__PURE__ */ (0,
|
|
2056
|
-
/* @__PURE__ */ (0,
|
|
2057
|
-
/* @__PURE__ */ (0,
|
|
2058
|
-
header && /* @__PURE__ */ (0,
|
|
2059
|
-
|
|
2131
|
+
const headerClasses = (0, import_dedupe11.default)("mobius", "mobius-alert__header");
|
|
2132
|
+
const iconClasses = (0, import_dedupe11.default)("mobius", "mobius-alert__icon");
|
|
2133
|
+
const contentClasses = (0, import_dedupe11.default)("mobius", "mobius-alert__content");
|
|
2134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Element, { ref, role: "alert", ...otherProps, className: classes, children: [
|
|
2135
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { icon: icon[variant], color: colorValue }) }),
|
|
2136
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
|
|
2137
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2138
|
+
TextOrHTML,
|
|
2139
|
+
{
|
|
2140
|
+
autoDetect: true,
|
|
2141
|
+
htmlElementType: "span",
|
|
2142
|
+
className: headerClasses,
|
|
2143
|
+
htmlClassName: headerClasses,
|
|
2144
|
+
text: header
|
|
2145
|
+
}
|
|
2146
|
+
),
|
|
2147
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: contentClasses, children })
|
|
2060
2148
|
] })
|
|
2061
2149
|
] });
|
|
2062
2150
|
};
|
|
@@ -2073,14 +2161,14 @@ var init_Alert2 = __esm({
|
|
|
2073
2161
|
});
|
|
2074
2162
|
|
|
2075
2163
|
// src/components/Box/Box.tsx
|
|
2076
|
-
var
|
|
2164
|
+
var import_dedupe12, import_Box, import_jsx_runtime15, Box;
|
|
2077
2165
|
var init_Box = __esm({
|
|
2078
2166
|
"src/components/Box/Box.tsx"() {
|
|
2079
2167
|
"use strict";
|
|
2080
|
-
|
|
2168
|
+
import_dedupe12 = __toESM(require("classnames/dedupe"));
|
|
2081
2169
|
init_utils();
|
|
2082
2170
|
import_Box = require("@simplybusiness/mobius/src/components/Box/Box.css");
|
|
2083
|
-
|
|
2171
|
+
import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2084
2172
|
Box = ({ ref, ...props }) => {
|
|
2085
2173
|
const {
|
|
2086
2174
|
elementType: Element = "div",
|
|
@@ -2106,7 +2194,7 @@ var init_Box = __esm({
|
|
|
2106
2194
|
style,
|
|
2107
2195
|
...otherProps
|
|
2108
2196
|
} = props;
|
|
2109
|
-
const classes = (0,
|
|
2197
|
+
const classes = (0, import_dedupe12.default)("mobius", "mobius-box", otherProps.className);
|
|
2110
2198
|
const styleProps = filterUndefinedProps({
|
|
2111
2199
|
padding: getSpacingValue(padding),
|
|
2112
2200
|
paddingInline: getSpacingValue(paddingInline || paddingX),
|
|
@@ -2123,7 +2211,7 @@ var init_Box = __esm({
|
|
|
2123
2211
|
height,
|
|
2124
2212
|
...style
|
|
2125
2213
|
});
|
|
2126
|
-
return /* @__PURE__ */ (0,
|
|
2214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Element, { ref, style: styleProps, ...otherProps, className: classes });
|
|
2127
2215
|
};
|
|
2128
2216
|
Box.displayName = "Box";
|
|
2129
2217
|
}
|
|
@@ -2138,27 +2226,27 @@ var init_Box2 = __esm({
|
|
|
2138
2226
|
});
|
|
2139
2227
|
|
|
2140
2228
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
2141
|
-
var
|
|
2229
|
+
var import_react15, import_dedupe13, import_Breadcrumbs, import_jsx_runtime16, Breadcrumbs;
|
|
2142
2230
|
var init_Breadcrumbs = __esm({
|
|
2143
2231
|
"src/components/Breadcrumbs/Breadcrumbs.tsx"() {
|
|
2144
2232
|
"use strict";
|
|
2145
2233
|
"use client";
|
|
2146
|
-
|
|
2147
|
-
|
|
2234
|
+
import_react15 = require("react");
|
|
2235
|
+
import_dedupe13 = __toESM(require("classnames/dedupe"));
|
|
2148
2236
|
import_Breadcrumbs = require("@simplybusiness/mobius/src/components/Breadcrumbs/Breadcrumbs.css");
|
|
2149
|
-
|
|
2237
|
+
import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2150
2238
|
Breadcrumbs = ({ ref, ...props }) => {
|
|
2151
2239
|
const { "aria-label": ariaLabel = "Breadcrumbs" } = props;
|
|
2152
2240
|
const { navProps } = { navProps: { "aria-label": ariaLabel } };
|
|
2153
2241
|
const { children, ...otherProps } = props;
|
|
2154
|
-
const childArray =
|
|
2155
|
-
const classes = (0,
|
|
2242
|
+
const childArray = import_react15.Children.toArray(children);
|
|
2243
|
+
const classes = (0, import_dedupe13.default)(
|
|
2156
2244
|
"mobius",
|
|
2157
2245
|
"mobius-breadcrumb",
|
|
2158
2246
|
otherProps.className
|
|
2159
2247
|
);
|
|
2160
|
-
return /* @__PURE__ */ (0,
|
|
2161
|
-
(child, i) => (0,
|
|
2248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("nav", { ref, ...otherProps, ...navProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { children: childArray.map(
|
|
2249
|
+
(child, i) => (0, import_react15.cloneElement)(
|
|
2162
2250
|
child,
|
|
2163
2251
|
{
|
|
2164
2252
|
key: i,
|
|
@@ -2172,22 +2260,22 @@ var init_Breadcrumbs = __esm({
|
|
|
2172
2260
|
});
|
|
2173
2261
|
|
|
2174
2262
|
// src/components/Breadcrumbs/BreadcrumbItem.tsx
|
|
2175
|
-
var
|
|
2263
|
+
var import_react16, import_dedupe14, import_jsx_runtime17, BreadcrumbItem;
|
|
2176
2264
|
var init_BreadcrumbItem = __esm({
|
|
2177
2265
|
"src/components/Breadcrumbs/BreadcrumbItem.tsx"() {
|
|
2178
2266
|
"use strict";
|
|
2179
2267
|
"use client";
|
|
2180
|
-
|
|
2181
|
-
|
|
2268
|
+
import_react16 = require("react");
|
|
2269
|
+
import_dedupe14 = __toESM(require("classnames/dedupe"));
|
|
2182
2270
|
init_Box2();
|
|
2183
|
-
|
|
2271
|
+
import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2184
2272
|
BreadcrumbItem = ({ ref, ...props }) => {
|
|
2185
2273
|
const {
|
|
2186
2274
|
isDisabled = false,
|
|
2187
2275
|
isCurrent = false,
|
|
2188
2276
|
"aria-current": ariaCurrent = "page",
|
|
2189
2277
|
children,
|
|
2190
|
-
separator = /* @__PURE__ */ (0,
|
|
2278
|
+
separator = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box, { className: "mobius-breadcrumb__separator", "aria-hidden": "true", children: ">" }),
|
|
2191
2279
|
...otherProps
|
|
2192
2280
|
} = props;
|
|
2193
2281
|
const { itemProps } = {
|
|
@@ -2197,14 +2285,14 @@ var init_BreadcrumbItem = __esm({
|
|
|
2197
2285
|
...otherProps
|
|
2198
2286
|
}
|
|
2199
2287
|
};
|
|
2200
|
-
const classes = (0,
|
|
2288
|
+
const classes = (0, import_dedupe14.default)(
|
|
2201
2289
|
"mobius",
|
|
2202
2290
|
"mobius-breadcrumb__item",
|
|
2203
2291
|
props.className
|
|
2204
2292
|
);
|
|
2205
|
-
const child = typeof children === "string" ? /* @__PURE__ */ (0,
|
|
2206
|
-
return /* @__PURE__ */ (0,
|
|
2207
|
-
(0,
|
|
2293
|
+
const child = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { ...itemProps, children }) : import_react16.Children.only(children);
|
|
2294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: classes, children: [
|
|
2295
|
+
(0, import_react16.cloneElement)(child, {
|
|
2208
2296
|
...child.props,
|
|
2209
2297
|
...itemProps,
|
|
2210
2298
|
ref
|
|
@@ -2226,19 +2314,19 @@ var init_Breadcrumbs2 = __esm({
|
|
|
2226
2314
|
});
|
|
2227
2315
|
|
|
2228
2316
|
// src/components/Button/Loading.tsx
|
|
2229
|
-
var import_icons4,
|
|
2317
|
+
var import_icons4, import_jsx_runtime18, Loading;
|
|
2230
2318
|
var init_Loading = __esm({
|
|
2231
2319
|
"src/components/Button/Loading.tsx"() {
|
|
2232
2320
|
"use strict";
|
|
2233
2321
|
import_icons4 = require("@simplybusiness/icons");
|
|
2234
2322
|
init_Icon2();
|
|
2235
2323
|
init_VisuallyHidden2();
|
|
2236
|
-
|
|
2324
|
+
import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2237
2325
|
Loading = (props) => {
|
|
2238
2326
|
const { children } = props;
|
|
2239
|
-
return /* @__PURE__ */ (0,
|
|
2240
|
-
/* @__PURE__ */ (0,
|
|
2241
|
-
/* @__PURE__ */ (0,
|
|
2327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
2328
|
+
/* @__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" }) }),
|
|
2329
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(VisuallyHidden, { className: "mobius-button__loading-text", children: "Loading" }),
|
|
2242
2330
|
children
|
|
2243
2331
|
] });
|
|
2244
2332
|
};
|
|
@@ -2246,33 +2334,33 @@ var init_Loading = __esm({
|
|
|
2246
2334
|
});
|
|
2247
2335
|
|
|
2248
2336
|
// src/components/Button/Success.tsx
|
|
2249
|
-
var import_icons5,
|
|
2337
|
+
var import_icons5, import_jsx_runtime19, Success;
|
|
2250
2338
|
var init_Success = __esm({
|
|
2251
2339
|
"src/components/Button/Success.tsx"() {
|
|
2252
2340
|
"use strict";
|
|
2253
2341
|
import_icons5 = require("@simplybusiness/icons");
|
|
2254
2342
|
init_Icon2();
|
|
2255
2343
|
init_VisuallyHidden2();
|
|
2256
|
-
|
|
2257
|
-
Success = () => /* @__PURE__ */ (0,
|
|
2258
|
-
/* @__PURE__ */ (0,
|
|
2259
|
-
/* @__PURE__ */ (0,
|
|
2344
|
+
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2345
|
+
Success = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
2346
|
+
/* @__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" }) }),
|
|
2347
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(VisuallyHidden, { className: "mobius-button__success-text", children: "Success" })
|
|
2260
2348
|
] });
|
|
2261
2349
|
}
|
|
2262
2350
|
});
|
|
2263
2351
|
|
|
2264
2352
|
// src/components/Button/Button.tsx
|
|
2265
|
-
var
|
|
2353
|
+
var import_dedupe15, import_Button, import_jsx_runtime20, Button;
|
|
2266
2354
|
var init_Button = __esm({
|
|
2267
2355
|
"src/components/Button/Button.tsx"() {
|
|
2268
2356
|
"use strict";
|
|
2269
2357
|
"use client";
|
|
2270
|
-
|
|
2358
|
+
import_dedupe15 = __toESM(require("classnames/dedupe"));
|
|
2271
2359
|
init_Loading();
|
|
2272
2360
|
init_useButton2();
|
|
2273
2361
|
init_Success();
|
|
2274
2362
|
import_Button = require("@simplybusiness/mobius/src/components/Button/Button.css");
|
|
2275
|
-
|
|
2363
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2276
2364
|
Button = ({ ref, ...props }) => {
|
|
2277
2365
|
const {
|
|
2278
2366
|
children,
|
|
@@ -2287,7 +2375,7 @@ var init_Button = __esm({
|
|
|
2287
2375
|
...otherProps
|
|
2288
2376
|
} = props;
|
|
2289
2377
|
const { buttonProps } = useButton(props);
|
|
2290
|
-
otherProps.className = (0,
|
|
2378
|
+
otherProps.className = (0, import_dedupe15.default)(
|
|
2291
2379
|
"mobius",
|
|
2292
2380
|
"mobius-button",
|
|
2293
2381
|
`--variant-${variant}`,
|
|
@@ -2299,9 +2387,9 @@ var init_Button = __esm({
|
|
|
2299
2387
|
},
|
|
2300
2388
|
otherProps.className
|
|
2301
2389
|
);
|
|
2302
|
-
return /* @__PURE__ */ (0,
|
|
2303
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
2304
|
-
isSuccess && !isLoading && /* @__PURE__ */ (0,
|
|
2390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Component, { ref, ...buttonProps, ...otherProps, children: [
|
|
2391
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Loading, { children }) : children,
|
|
2392
|
+
isSuccess && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Success, {})
|
|
2305
2393
|
] });
|
|
2306
2394
|
};
|
|
2307
2395
|
Button.displayName = "Button";
|
|
@@ -2317,16 +2405,16 @@ var init_Button2 = __esm({
|
|
|
2317
2405
|
});
|
|
2318
2406
|
|
|
2319
2407
|
// src/components/Stack/Stack.tsx
|
|
2320
|
-
var
|
|
2408
|
+
var import_dedupe16, import_Stack, import_jsx_runtime21, Stack;
|
|
2321
2409
|
var init_Stack = __esm({
|
|
2322
2410
|
"src/components/Stack/Stack.tsx"() {
|
|
2323
2411
|
"use strict";
|
|
2324
|
-
|
|
2412
|
+
import_dedupe16 = __toESM(require("classnames/dedupe"));
|
|
2325
2413
|
import_Stack = require("@simplybusiness/mobius/src/components/Stack/Stack.css");
|
|
2326
|
-
|
|
2414
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2327
2415
|
Stack = ({ ref, ...props }) => {
|
|
2328
2416
|
const { elementType: Element = "div", gap, ...otherProps } = props;
|
|
2329
|
-
const classes = (0,
|
|
2417
|
+
const classes = (0, import_dedupe16.default)(
|
|
2330
2418
|
"mobius",
|
|
2331
2419
|
"mobius-stack",
|
|
2332
2420
|
{
|
|
@@ -2334,7 +2422,7 @@ var init_Stack = __esm({
|
|
|
2334
2422
|
},
|
|
2335
2423
|
otherProps.className
|
|
2336
2424
|
);
|
|
2337
|
-
return /* @__PURE__ */ (0,
|
|
2425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
2338
2426
|
};
|
|
2339
2427
|
Stack.displayName = "Stack";
|
|
2340
2428
|
}
|
|
@@ -2349,13 +2437,13 @@ var init_Stack2 = __esm({
|
|
|
2349
2437
|
});
|
|
2350
2438
|
|
|
2351
2439
|
// src/components/Checkbox/Checkbox.tsx
|
|
2352
|
-
var
|
|
2440
|
+
var import_react17, import_dedupe17, import_icons6, import_Checkbox, import_jsx_runtime22, Checkbox;
|
|
2353
2441
|
var init_Checkbox = __esm({
|
|
2354
2442
|
"src/components/Checkbox/Checkbox.tsx"() {
|
|
2355
2443
|
"use strict";
|
|
2356
2444
|
"use client";
|
|
2357
|
-
|
|
2358
|
-
|
|
2445
|
+
import_react17 = require("react");
|
|
2446
|
+
import_dedupe17 = __toESM(require("classnames/dedupe"));
|
|
2359
2447
|
import_icons6 = require("@simplybusiness/icons");
|
|
2360
2448
|
init_ErrorMessage2();
|
|
2361
2449
|
init_spaceDelimitedList();
|
|
@@ -2363,7 +2451,7 @@ var init_Checkbox = __esm({
|
|
|
2363
2451
|
init_Icon2();
|
|
2364
2452
|
init_Stack2();
|
|
2365
2453
|
import_Checkbox = require("@simplybusiness/mobius/src/components/Checkbox/Checkbox.css");
|
|
2366
|
-
|
|
2454
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2367
2455
|
Checkbox = ({ ref, ...props }) => {
|
|
2368
2456
|
const {
|
|
2369
2457
|
id,
|
|
@@ -2383,18 +2471,18 @@ var init_Checkbox = __esm({
|
|
|
2383
2471
|
["aria-describedby"]: ariaDescribedBy,
|
|
2384
2472
|
...rest
|
|
2385
2473
|
} = props;
|
|
2386
|
-
const [checked, setChecked] = (0,
|
|
2387
|
-
const fallbackRef = (0,
|
|
2474
|
+
const [checked, setChecked] = (0, import_react17.useState)(defaultSelected);
|
|
2475
|
+
const fallbackRef = (0, import_react17.useRef)(null);
|
|
2388
2476
|
const refObj = ref || fallbackRef;
|
|
2389
|
-
const inputId = (0,
|
|
2477
|
+
const inputId = (0, import_react17.useId)();
|
|
2390
2478
|
const isControlled = typeof selected === "boolean";
|
|
2391
|
-
(0,
|
|
2479
|
+
(0, import_react17.useEffect)(() => {
|
|
2392
2480
|
if (isControlled) {
|
|
2393
2481
|
setChecked(selected);
|
|
2394
2482
|
}
|
|
2395
2483
|
}, [selected, isControlled]);
|
|
2396
2484
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
2397
|
-
const sharedClasses = (0,
|
|
2485
|
+
const sharedClasses = (0, import_dedupe17.default)(
|
|
2398
2486
|
{
|
|
2399
2487
|
"--is-disabled": isDisabled,
|
|
2400
2488
|
"--is-selected": checked,
|
|
@@ -2403,31 +2491,31 @@ var init_Checkbox = __esm({
|
|
|
2403
2491
|
},
|
|
2404
2492
|
validationClasses
|
|
2405
2493
|
);
|
|
2406
|
-
const wrapperClasses = (0,
|
|
2494
|
+
const wrapperClasses = (0, import_dedupe17.default)(
|
|
2407
2495
|
"mobius",
|
|
2408
2496
|
"mobius-checkbox",
|
|
2409
2497
|
sharedClasses,
|
|
2410
2498
|
className
|
|
2411
2499
|
);
|
|
2412
|
-
const labelClasses = (0,
|
|
2413
|
-
const inputClasses = (0,
|
|
2414
|
-
const iconClasses = (0,
|
|
2415
|
-
const errorMessageId = (0,
|
|
2500
|
+
const labelClasses = (0, import_dedupe17.default)("mobius-checkbox__label", sharedClasses);
|
|
2501
|
+
const inputClasses = (0, import_dedupe17.default)("mobius-checkbox__input", sharedClasses);
|
|
2502
|
+
const iconClasses = (0, import_dedupe17.default)("mobius-checkbox__icon", sharedClasses);
|
|
2503
|
+
const errorMessageId = (0, import_react17.useId)();
|
|
2416
2504
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
2417
2505
|
const describedBy = spaceDelimitedList([
|
|
2418
2506
|
shouldErrorMessageShow,
|
|
2419
2507
|
ariaDescribedBy
|
|
2420
2508
|
]);
|
|
2421
|
-
const labelId = (0,
|
|
2509
|
+
const labelId = (0, import_react17.useId)();
|
|
2422
2510
|
const handleChange = (event) => {
|
|
2423
2511
|
setChecked(!checked);
|
|
2424
2512
|
if (onChange) {
|
|
2425
2513
|
onChange(event, isLastItem);
|
|
2426
2514
|
}
|
|
2427
2515
|
};
|
|
2428
|
-
return /* @__PURE__ */ (0,
|
|
2429
|
-
/* @__PURE__ */ (0,
|
|
2430
|
-
/* @__PURE__ */ (0,
|
|
2516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Stack, { gap: "xs", className: wrapperClasses, children: [
|
|
2517
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: labelClasses, children: [
|
|
2518
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2431
2519
|
"input",
|
|
2432
2520
|
{
|
|
2433
2521
|
"aria-describedby": describedBy,
|
|
@@ -2448,7 +2536,7 @@ var init_Checkbox = __esm({
|
|
|
2448
2536
|
...rest
|
|
2449
2537
|
}
|
|
2450
2538
|
),
|
|
2451
|
-
/* @__PURE__ */ (0,
|
|
2539
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2452
2540
|
Icon,
|
|
2453
2541
|
{
|
|
2454
2542
|
icon: checked ? import_icons6.squareTick : import_icons6.square,
|
|
@@ -2456,9 +2544,9 @@ var init_Checkbox = __esm({
|
|
|
2456
2544
|
className: iconClasses
|
|
2457
2545
|
}
|
|
2458
2546
|
),
|
|
2459
|
-
/* @__PURE__ */ (0,
|
|
2547
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { id: labelId, className: "mobius-checkbox__visible-label", children: label })
|
|
2460
2548
|
] }),
|
|
2461
|
-
/* @__PURE__ */ (0,
|
|
2549
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
2462
2550
|
] });
|
|
2463
2551
|
};
|
|
2464
2552
|
Checkbox.displayName = "Checkbox";
|
|
@@ -2466,18 +2554,18 @@ var init_Checkbox = __esm({
|
|
|
2466
2554
|
});
|
|
2467
2555
|
|
|
2468
2556
|
// src/components/Label/Label.tsx
|
|
2469
|
-
var
|
|
2557
|
+
var import_dedupe18, import_Label, import_jsx_runtime23, Label;
|
|
2470
2558
|
var init_Label = __esm({
|
|
2471
2559
|
"src/components/Label/Label.tsx"() {
|
|
2472
2560
|
"use strict";
|
|
2473
|
-
|
|
2561
|
+
import_dedupe18 = __toESM(require("classnames/dedupe"));
|
|
2474
2562
|
import_Label = require("@simplybusiness/mobius/src/components/Label/Label.css");
|
|
2475
|
-
|
|
2563
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2476
2564
|
Label = ({ ref, ...props }) => {
|
|
2477
2565
|
const { elementType: Element = "label", children, ...otherProps } = props;
|
|
2478
|
-
const classes = (0,
|
|
2566
|
+
const classes = (0, import_dedupe18.default)("mobius", "mobius-label", props.className);
|
|
2479
2567
|
otherProps.className = classes;
|
|
2480
|
-
return /* @__PURE__ */ (0,
|
|
2568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Element, { ref, ...otherProps, className: classes, children });
|
|
2481
2569
|
};
|
|
2482
2570
|
Label.displayName = "Label";
|
|
2483
2571
|
}
|
|
@@ -2492,20 +2580,20 @@ var init_Label2 = __esm({
|
|
|
2492
2580
|
});
|
|
2493
2581
|
|
|
2494
2582
|
// src/components/Checkbox/CheckboxGroup.tsx
|
|
2495
|
-
var
|
|
2583
|
+
var import_dedupe19, import_react18, import_CheckboxGroup, import_jsx_runtime24, CheckboxGroup;
|
|
2496
2584
|
var init_CheckboxGroup = __esm({
|
|
2497
2585
|
"src/components/Checkbox/CheckboxGroup.tsx"() {
|
|
2498
2586
|
"use strict";
|
|
2499
2587
|
"use client";
|
|
2500
|
-
|
|
2501
|
-
|
|
2588
|
+
import_dedupe19 = __toESM(require("classnames/dedupe"));
|
|
2589
|
+
import_react18 = require("react");
|
|
2502
2590
|
init_hooks();
|
|
2503
2591
|
init_spaceDelimitedList();
|
|
2504
2592
|
init_ErrorMessage2();
|
|
2505
2593
|
init_Label2();
|
|
2506
2594
|
init_Checkbox();
|
|
2507
2595
|
import_CheckboxGroup = require("@simplybusiness/mobius/src/components/Checkbox/CheckboxGroup.css");
|
|
2508
|
-
|
|
2596
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2509
2597
|
CheckboxGroup = ({ ref, ...props }) => {
|
|
2510
2598
|
const {
|
|
2511
2599
|
label,
|
|
@@ -2523,10 +2611,10 @@ var init_CheckboxGroup = __esm({
|
|
|
2523
2611
|
lastItemDisables = false,
|
|
2524
2612
|
...rest
|
|
2525
2613
|
} = props;
|
|
2526
|
-
const [selected, setSelected] = (0,
|
|
2527
|
-
const isInitializedRef = (0,
|
|
2528
|
-
const prevDefaultValueRef = (0,
|
|
2529
|
-
(0,
|
|
2614
|
+
const [selected, setSelected] = (0, import_react18.useState)(defaultValue);
|
|
2615
|
+
const isInitializedRef = (0, import_react18.useRef)(false);
|
|
2616
|
+
const prevDefaultValueRef = (0, import_react18.useRef)(defaultValue);
|
|
2617
|
+
(0, import_react18.useEffect)(() => {
|
|
2530
2618
|
const hasChanged = defaultValue.length !== prevDefaultValueRef.current.length || defaultValue.some(
|
|
2531
2619
|
(val, index) => val !== prevDefaultValueRef.current[index]
|
|
2532
2620
|
);
|
|
@@ -2536,7 +2624,7 @@ var init_CheckboxGroup = __esm({
|
|
|
2536
2624
|
isInitializedRef.current = true;
|
|
2537
2625
|
}
|
|
2538
2626
|
}, [defaultValue]);
|
|
2539
|
-
const checkboxGroupClasses = (0,
|
|
2627
|
+
const checkboxGroupClasses = (0, import_dedupe19.default)(
|
|
2540
2628
|
"mobius",
|
|
2541
2629
|
"mobius-checkbox-group",
|
|
2542
2630
|
className,
|
|
@@ -2548,19 +2636,19 @@ var init_CheckboxGroup = __esm({
|
|
|
2548
2636
|
}
|
|
2549
2637
|
);
|
|
2550
2638
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
2551
|
-
const labelClasses = (0,
|
|
2639
|
+
const labelClasses = (0, import_dedupe19.default)(
|
|
2552
2640
|
{
|
|
2553
2641
|
"--is-disabled": isDisabled
|
|
2554
2642
|
},
|
|
2555
2643
|
validationClasses
|
|
2556
2644
|
);
|
|
2557
|
-
const errorMessageId = (0,
|
|
2645
|
+
const errorMessageId = (0, import_react18.useId)();
|
|
2558
2646
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
2559
2647
|
const describedBy = spaceDelimitedList([
|
|
2560
2648
|
shouldErrorMessageShow,
|
|
2561
2649
|
props["aria-describedby"]
|
|
2562
2650
|
]);
|
|
2563
|
-
const labelId = (0,
|
|
2651
|
+
const labelId = (0, import_react18.useId)();
|
|
2564
2652
|
const handleChange = (event, isLastItem = false) => {
|
|
2565
2653
|
const {
|
|
2566
2654
|
target: { value, checked }
|
|
@@ -2578,12 +2666,12 @@ var init_CheckboxGroup = __esm({
|
|
|
2578
2666
|
setSelected(newValue);
|
|
2579
2667
|
onChange?.(newValue);
|
|
2580
2668
|
};
|
|
2581
|
-
const childrenArray =
|
|
2669
|
+
const childrenArray = import_react18.Children.toArray(children);
|
|
2582
2670
|
const lastCheckbox = childrenArray.filter(
|
|
2583
|
-
(child) => (0,
|
|
2671
|
+
(child) => (0, import_react18.isValidElement)(child) && child.type === Checkbox
|
|
2584
2672
|
).pop();
|
|
2585
2673
|
const lastCheckboxIsChecked = lastCheckbox && selected.includes(lastCheckbox.props.value);
|
|
2586
|
-
return /* @__PURE__ */ (0,
|
|
2674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2587
2675
|
"div",
|
|
2588
2676
|
{
|
|
2589
2677
|
...rest,
|
|
@@ -2592,16 +2680,16 @@ var init_CheckboxGroup = __esm({
|
|
|
2592
2680
|
className: checkboxGroupClasses,
|
|
2593
2681
|
role: "group",
|
|
2594
2682
|
style: {
|
|
2595
|
-
"--checkbox-items-per-row": itemsPerRow ||
|
|
2683
|
+
"--checkbox-items-per-row": itemsPerRow || import_react18.Children.count(children)
|
|
2596
2684
|
},
|
|
2597
2685
|
children: [
|
|
2598
|
-
label && /* @__PURE__ */ (0,
|
|
2599
|
-
/* @__PURE__ */ (0,
|
|
2600
|
-
if ((0,
|
|
2686
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Label, { elementType: "span", id: labelId, className: labelClasses, children: label }),
|
|
2687
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mobius-checkbox-group__wrapper", children: childrenArray.map((child) => {
|
|
2688
|
+
if ((0, import_react18.isValidElement)(child)) {
|
|
2601
2689
|
const isLastItem = child === lastCheckbox;
|
|
2602
2690
|
const isChildDisabled = isDisabled || lastItemDisables && lastCheckboxIsChecked && !isLastItem;
|
|
2603
2691
|
const childProps = child.props;
|
|
2604
|
-
return (0,
|
|
2692
|
+
return (0, import_react18.cloneElement)(
|
|
2605
2693
|
child,
|
|
2606
2694
|
{
|
|
2607
2695
|
isDisabled: isChildDisabled,
|
|
@@ -2617,7 +2705,7 @@ var init_CheckboxGroup = __esm({
|
|
|
2617
2705
|
}
|
|
2618
2706
|
return child;
|
|
2619
2707
|
}) }),
|
|
2620
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2708
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
2621
2709
|
]
|
|
2622
2710
|
}
|
|
2623
2711
|
);
|
|
@@ -2644,23 +2732,23 @@ var init_Checkbox2 = __esm({
|
|
|
2644
2732
|
});
|
|
2645
2733
|
|
|
2646
2734
|
// src/components/Container/Container.tsx
|
|
2647
|
-
var
|
|
2735
|
+
var import_dedupe20, import_Container, import_jsx_runtime25, Container;
|
|
2648
2736
|
var init_Container = __esm({
|
|
2649
2737
|
"src/components/Container/Container.tsx"() {
|
|
2650
2738
|
"use strict";
|
|
2651
|
-
|
|
2739
|
+
import_dedupe20 = __toESM(require("classnames/dedupe"));
|
|
2652
2740
|
init_utils();
|
|
2653
2741
|
import_Container = require("@simplybusiness/mobius/src/components/Container/Container.css");
|
|
2654
|
-
|
|
2742
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2655
2743
|
Container = ({ ref, ...props }) => {
|
|
2656
2744
|
const { elementType: Element = "div", size = "md", ...otherProps } = props;
|
|
2657
|
-
const classes = (0,
|
|
2745
|
+
const classes = (0, import_dedupe20.default)(
|
|
2658
2746
|
"mobius",
|
|
2659
2747
|
"mobius-container",
|
|
2660
2748
|
sizeClasses(size),
|
|
2661
2749
|
otherProps.className
|
|
2662
2750
|
);
|
|
2663
|
-
return /* @__PURE__ */ (0,
|
|
2751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
2664
2752
|
};
|
|
2665
2753
|
Container.displayName = "Container";
|
|
2666
2754
|
}
|
|
@@ -2713,17 +2801,17 @@ var init_validation = __esm({
|
|
|
2713
2801
|
});
|
|
2714
2802
|
|
|
2715
2803
|
// src/components/DateField/DateField.tsx
|
|
2716
|
-
var
|
|
2804
|
+
var import_dedupe21, import_react19, import_jsx_runtime26, MIN_MAX_ERROR, DateField;
|
|
2717
2805
|
var init_DateField = __esm({
|
|
2718
2806
|
"src/components/DateField/DateField.tsx"() {
|
|
2719
2807
|
"use strict";
|
|
2720
2808
|
"use client";
|
|
2721
|
-
|
|
2722
|
-
|
|
2809
|
+
import_dedupe21 = __toESM(require("classnames/dedupe"));
|
|
2810
|
+
import_react19 = require("react");
|
|
2723
2811
|
init_mergeRefs();
|
|
2724
2812
|
init_TextField();
|
|
2725
2813
|
init_validation();
|
|
2726
|
-
|
|
2814
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2727
2815
|
MIN_MAX_ERROR = '"min" value should not be greater than "max" value.';
|
|
2728
2816
|
DateField = ({ ref, ...props }) => {
|
|
2729
2817
|
const {
|
|
@@ -2736,10 +2824,10 @@ var init_DateField = __esm({
|
|
|
2736
2824
|
value,
|
|
2737
2825
|
...otherProps
|
|
2738
2826
|
} = props;
|
|
2739
|
-
const [error3, setError] = (0,
|
|
2740
|
-
const [isInvalid, setIsInvalid] = (0,
|
|
2741
|
-
const localRef = (0,
|
|
2742
|
-
const classes = (0,
|
|
2827
|
+
const [error3, setError] = (0, import_react19.useState)(errorMessage);
|
|
2828
|
+
const [isInvalid, setIsInvalid] = (0, import_react19.useState)(void 0);
|
|
2829
|
+
const localRef = (0, import_react19.useRef)(null);
|
|
2830
|
+
const classes = (0, import_dedupe21.default)("mobius-date-field", className);
|
|
2743
2831
|
const formattedMin = min ? convertToDateFormat(min, format) : void 0;
|
|
2744
2832
|
const formattedMax = max ? convertToDateFormat(max, format) : void 0;
|
|
2745
2833
|
const formattedDefaultValue = defaultValue ? convertToDateFormat(defaultValue, format) : void 0;
|
|
@@ -2752,7 +2840,7 @@ var init_DateField = __esm({
|
|
|
2752
2840
|
setError(props.errorMessage);
|
|
2753
2841
|
setIsInvalid(false);
|
|
2754
2842
|
};
|
|
2755
|
-
(0,
|
|
2843
|
+
(0, import_react19.useEffect)(() => {
|
|
2756
2844
|
if (!isValidDate(min, format)) {
|
|
2757
2845
|
setInvalidState(`Invalid min date: ${min}`);
|
|
2758
2846
|
return;
|
|
@@ -2785,7 +2873,7 @@ var init_DateField = __esm({
|
|
|
2785
2873
|
validate();
|
|
2786
2874
|
otherProps.onBlur?.(event);
|
|
2787
2875
|
};
|
|
2788
|
-
return /* @__PURE__ */ (0,
|
|
2876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2789
2877
|
TextField,
|
|
2790
2878
|
{
|
|
2791
2879
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -2816,23 +2904,23 @@ var init_DateField2 = __esm({
|
|
|
2816
2904
|
});
|
|
2817
2905
|
|
|
2818
2906
|
// src/components/Drawer/Content.tsx
|
|
2819
|
-
var
|
|
2907
|
+
var import_jsx_runtime27, Content;
|
|
2820
2908
|
var init_Content = __esm({
|
|
2821
2909
|
"src/components/Drawer/Content.tsx"() {
|
|
2822
2910
|
"use strict";
|
|
2823
|
-
|
|
2824
|
-
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
2911
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2912
|
+
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, ...otherProps, className: "mobius-drawer__content", children });
|
|
2825
2913
|
Content.displayName = "Content";
|
|
2826
2914
|
}
|
|
2827
2915
|
});
|
|
2828
2916
|
|
|
2829
2917
|
// src/components/Drawer/DrawerContext.tsx
|
|
2830
|
-
var
|
|
2918
|
+
var import_react20, DrawerContext;
|
|
2831
2919
|
var init_DrawerContext = __esm({
|
|
2832
2920
|
"src/components/Drawer/DrawerContext.tsx"() {
|
|
2833
2921
|
"use strict";
|
|
2834
|
-
|
|
2835
|
-
DrawerContext = (0,
|
|
2922
|
+
import_react20 = require("react");
|
|
2923
|
+
DrawerContext = (0, import_react20.createContext)({
|
|
2836
2924
|
onClose: () => {
|
|
2837
2925
|
},
|
|
2838
2926
|
closeLabel: void 0,
|
|
@@ -2842,19 +2930,19 @@ var init_DrawerContext = __esm({
|
|
|
2842
2930
|
});
|
|
2843
2931
|
|
|
2844
2932
|
// src/components/Drawer/Drawer.tsx
|
|
2845
|
-
var
|
|
2933
|
+
var import_dedupe22, import_react21, import_Drawer, import_jsx_runtime28, TRANSITION_CSS_VARIABLE, Drawer;
|
|
2846
2934
|
var init_Drawer = __esm({
|
|
2847
2935
|
"src/components/Drawer/Drawer.tsx"() {
|
|
2848
2936
|
"use strict";
|
|
2849
2937
|
"use client";
|
|
2850
|
-
|
|
2851
|
-
|
|
2938
|
+
import_dedupe22 = __toESM(require("classnames/dedupe"));
|
|
2939
|
+
import_react21 = require("react");
|
|
2852
2940
|
init_hooks();
|
|
2853
2941
|
init_utils();
|
|
2854
2942
|
init_VisuallyHidden2();
|
|
2855
2943
|
init_DrawerContext();
|
|
2856
2944
|
import_Drawer = require("@simplybusiness/mobius/src/components/Drawer/Drawer.css");
|
|
2857
|
-
|
|
2945
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2858
2946
|
TRANSITION_CSS_VARIABLE = "--drawer-transition-duration";
|
|
2859
2947
|
Drawer = ({ ref, ...props }) => {
|
|
2860
2948
|
const {
|
|
@@ -2867,8 +2955,8 @@ var init_Drawer = __esm({
|
|
|
2867
2955
|
onClose,
|
|
2868
2956
|
children
|
|
2869
2957
|
} = props;
|
|
2870
|
-
const dialogRef = (0,
|
|
2871
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
2958
|
+
const dialogRef = (0, import_react21.useRef)(null);
|
|
2959
|
+
const [shouldTransition, setShouldTransition] = (0, import_react21.useState)(false);
|
|
2872
2960
|
const { close } = useDialog({
|
|
2873
2961
|
ref: dialogRef,
|
|
2874
2962
|
isOpen,
|
|
@@ -2879,9 +2967,9 @@ var init_Drawer = __esm({
|
|
|
2879
2967
|
CSSVariable: TRANSITION_CSS_VARIABLE
|
|
2880
2968
|
}
|
|
2881
2969
|
});
|
|
2882
|
-
const hiddenId = `dialog-screen-reader-announce-${(0,
|
|
2883
|
-
const headerId = `dialog-header-${(0,
|
|
2884
|
-
const dialogClasses = (0,
|
|
2970
|
+
const hiddenId = `dialog-screen-reader-announce-${(0, import_react21.useId)()}`;
|
|
2971
|
+
const headerId = `dialog-header-${(0, import_react21.useId)()}`;
|
|
2972
|
+
const dialogClasses = (0, import_dedupe22.default)(
|
|
2885
2973
|
"mobius",
|
|
2886
2974
|
"mobius-drawer",
|
|
2887
2975
|
`--${direction}`,
|
|
@@ -2890,10 +2978,10 @@ var init_Drawer = __esm({
|
|
|
2890
2978
|
"--should-transition": shouldTransition
|
|
2891
2979
|
}
|
|
2892
2980
|
);
|
|
2893
|
-
(0,
|
|
2981
|
+
(0, import_react21.useEffect)(() => {
|
|
2894
2982
|
setShouldTransition(supportsDialog());
|
|
2895
2983
|
}, []);
|
|
2896
|
-
const contextValue = (0,
|
|
2984
|
+
const contextValue = (0, import_react21.useMemo)(
|
|
2897
2985
|
() => ({
|
|
2898
2986
|
onClose: close,
|
|
2899
2987
|
closeLabel,
|
|
@@ -2901,18 +2989,18 @@ var init_Drawer = __esm({
|
|
|
2901
2989
|
}),
|
|
2902
2990
|
[close, closeLabel, headerId]
|
|
2903
2991
|
);
|
|
2904
|
-
return /* @__PURE__ */ (0,
|
|
2992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2905
2993
|
"dialog",
|
|
2906
2994
|
{
|
|
2907
|
-
id: (0,
|
|
2995
|
+
id: (0, import_react21.useId)(),
|
|
2908
2996
|
ref: mergeRefs([dialogRef, ref]),
|
|
2909
2997
|
onCancel: close,
|
|
2910
2998
|
className: dialogClasses,
|
|
2911
2999
|
"aria-describedby": hiddenId,
|
|
2912
3000
|
"aria-labelledby": headerId,
|
|
2913
3001
|
children: [
|
|
2914
|
-
/* @__PURE__ */ (0,
|
|
2915
|
-
/* @__PURE__ */ (0,
|
|
3002
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { id: hiddenId, children: announce }) }),
|
|
3003
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DrawerContext.Provider, { value: contextValue, children })
|
|
2916
3004
|
]
|
|
2917
3005
|
}
|
|
2918
3006
|
);
|
|
@@ -2922,21 +3010,21 @@ var init_Drawer = __esm({
|
|
|
2922
3010
|
});
|
|
2923
3011
|
|
|
2924
3012
|
// src/components/Drawer/useDrawer.ts
|
|
2925
|
-
var
|
|
3013
|
+
var import_react22, useDrawer;
|
|
2926
3014
|
var init_useDrawer = __esm({
|
|
2927
3015
|
"src/components/Drawer/useDrawer.ts"() {
|
|
2928
3016
|
"use strict";
|
|
2929
|
-
|
|
3017
|
+
import_react22 = require("react");
|
|
2930
3018
|
init_DrawerContext();
|
|
2931
3019
|
useDrawer = () => {
|
|
2932
|
-
const { onClose, closeLabel, headerId } = (0,
|
|
3020
|
+
const { onClose, closeLabel, headerId } = (0, import_react22.useContext)(DrawerContext);
|
|
2933
3021
|
return { onClose, closeLabel, headerId };
|
|
2934
3022
|
};
|
|
2935
3023
|
}
|
|
2936
3024
|
});
|
|
2937
3025
|
|
|
2938
3026
|
// src/components/Drawer/Header.tsx
|
|
2939
|
-
var import_icons7,
|
|
3027
|
+
var import_icons7, import_jsx_runtime29, Header;
|
|
2940
3028
|
var init_Header = __esm({
|
|
2941
3029
|
"src/components/Drawer/Header.tsx"() {
|
|
2942
3030
|
"use strict";
|
|
@@ -2944,12 +3032,12 @@ var init_Header = __esm({
|
|
|
2944
3032
|
init_Button2();
|
|
2945
3033
|
init_Icon2();
|
|
2946
3034
|
init_useDrawer();
|
|
2947
|
-
|
|
3035
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2948
3036
|
Header = ({ ref, children, ...otherProps }) => {
|
|
2949
3037
|
const { onClose, closeLabel, headerId } = useDrawer();
|
|
2950
|
-
return /* @__PURE__ */ (0,
|
|
2951
|
-
/* @__PURE__ */ (0,
|
|
2952
|
-
/* @__PURE__ */ (0,
|
|
3038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("header", { ref, ...otherProps, className: "mobius-drawer__header", children: [
|
|
3039
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("h2", { id: headerId, children }),
|
|
3040
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2953
3041
|
Button,
|
|
2954
3042
|
{
|
|
2955
3043
|
"aria-label": "Close",
|
|
@@ -2958,7 +3046,7 @@ var init_Header = __esm({
|
|
|
2958
3046
|
className: "mobius-drawer__close",
|
|
2959
3047
|
size: "sm",
|
|
2960
3048
|
children: [
|
|
2961
|
-
/* @__PURE__ */ (0,
|
|
3049
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { icon: import_icons7.cross }),
|
|
2962
3050
|
" ",
|
|
2963
3051
|
closeLabel
|
|
2964
3052
|
]
|
|
@@ -2987,17 +3075,17 @@ var init_Drawer2 = __esm({
|
|
|
2987
3075
|
});
|
|
2988
3076
|
|
|
2989
3077
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2990
|
-
var
|
|
3078
|
+
var import_react23, import_react_accessible_dropdown_menu_hook, import_dedupe23, import_DropdownMenu, import_jsx_runtime30, DropdownMenu;
|
|
2991
3079
|
var init_DropdownMenu = __esm({
|
|
2992
3080
|
"src/components/DropdownMenu/DropdownMenu.tsx"() {
|
|
2993
3081
|
"use strict";
|
|
2994
3082
|
"use client";
|
|
2995
|
-
|
|
3083
|
+
import_react23 = require("react");
|
|
2996
3084
|
import_react_accessible_dropdown_menu_hook = __toESM(require("react-accessible-dropdown-menu-hook"));
|
|
2997
|
-
|
|
3085
|
+
import_dedupe23 = __toESM(require("classnames/dedupe"));
|
|
2998
3086
|
init_Button2();
|
|
2999
3087
|
import_DropdownMenu = require("@simplybusiness/mobius/src/components/DropdownMenu/DropdownMenu.css");
|
|
3000
|
-
|
|
3088
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3001
3089
|
DropdownMenu = ({ ref, ...props }) => {
|
|
3002
3090
|
const {
|
|
3003
3091
|
elementType: Element = "nav",
|
|
@@ -3006,21 +3094,21 @@ var init_DropdownMenu = __esm({
|
|
|
3006
3094
|
children,
|
|
3007
3095
|
...otherProps
|
|
3008
3096
|
} = props;
|
|
3009
|
-
const [activeId, setActiveId] = (0,
|
|
3010
|
-
const numberOfItems =
|
|
3097
|
+
const [activeId, setActiveId] = (0, import_react23.useState)(null);
|
|
3098
|
+
const numberOfItems = import_react23.Children.count(children);
|
|
3011
3099
|
const {
|
|
3012
3100
|
buttonProps,
|
|
3013
3101
|
itemProps,
|
|
3014
3102
|
isOpen: open,
|
|
3015
3103
|
setIsOpen
|
|
3016
3104
|
} = (0, import_react_accessible_dropdown_menu_hook.default)(numberOfItems);
|
|
3017
|
-
const classes = (0,
|
|
3105
|
+
const classes = (0, import_dedupe23.default)(
|
|
3018
3106
|
"mobius",
|
|
3019
3107
|
"mobius-dropdown-menu",
|
|
3020
3108
|
otherProps.className
|
|
3021
3109
|
);
|
|
3022
|
-
const triggerClasses = (0,
|
|
3023
|
-
const listClasses = (0,
|
|
3110
|
+
const triggerClasses = (0, import_dedupe23.default)("mobius", "mobius-dropdown-menu__trigger");
|
|
3111
|
+
const listClasses = (0, import_dedupe23.default)("mobius", "mobius-dropdown-menu__list", {
|
|
3024
3112
|
"--is-open": open
|
|
3025
3113
|
});
|
|
3026
3114
|
const handleChildClick = ({ onClick }, index) => {
|
|
@@ -3030,16 +3118,16 @@ var init_DropdownMenu = __esm({
|
|
|
3030
3118
|
onClick();
|
|
3031
3119
|
}
|
|
3032
3120
|
};
|
|
3033
|
-
return /* @__PURE__ */ (0,
|
|
3034
|
-
trigger ? (0,
|
|
3121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Element, { ref, ...otherProps, className: classes, children: [
|
|
3122
|
+
trigger ? (0, import_react23.cloneElement)(trigger, {
|
|
3035
3123
|
className: triggerClasses,
|
|
3036
3124
|
open,
|
|
3037
3125
|
label,
|
|
3038
3126
|
...buttonProps
|
|
3039
|
-
}) : /* @__PURE__ */ (0,
|
|
3040
|
-
/* @__PURE__ */ (0,
|
|
3041
|
-
if ((0,
|
|
3042
|
-
return (0,
|
|
3127
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Button, { className: triggerClasses, ...buttonProps, children: label }),
|
|
3128
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("ul", { className: listClasses, role: "menu", children: import_react23.Children.map(children, (child, index) => {
|
|
3129
|
+
if ((0, import_react23.isValidElement)(child)) {
|
|
3130
|
+
return (0, import_react23.cloneElement)(child, {
|
|
3043
3131
|
onClick: () => handleChildClick(child.props, index),
|
|
3044
3132
|
active: index === activeId,
|
|
3045
3133
|
...itemProps[index]
|
|
@@ -3054,13 +3142,13 @@ var init_DropdownMenu = __esm({
|
|
|
3054
3142
|
});
|
|
3055
3143
|
|
|
3056
3144
|
// src/components/DropdownMenu/Item.tsx
|
|
3057
|
-
var
|
|
3145
|
+
var import_react24, import_dedupe24, import_jsx_runtime31, Item;
|
|
3058
3146
|
var init_Item = __esm({
|
|
3059
3147
|
"src/components/DropdownMenu/Item.tsx"() {
|
|
3060
3148
|
"use strict";
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3149
|
+
import_react24 = require("react");
|
|
3150
|
+
import_dedupe24 = __toESM(require("classnames/dedupe"));
|
|
3151
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3064
3152
|
Item = ({ ref, ...props }) => {
|
|
3065
3153
|
const {
|
|
3066
3154
|
elementType: Element = "li",
|
|
@@ -3069,26 +3157,26 @@ var init_Item = __esm({
|
|
|
3069
3157
|
children,
|
|
3070
3158
|
...otherProps
|
|
3071
3159
|
} = props;
|
|
3072
|
-
const classes = (0,
|
|
3160
|
+
const classes = (0, import_dedupe24.default)(
|
|
3073
3161
|
"mobius",
|
|
3074
3162
|
"mobius-dropdown-menu__item",
|
|
3075
3163
|
{ "--is-active": active },
|
|
3076
3164
|
otherProps.className
|
|
3077
3165
|
);
|
|
3078
|
-
return /* @__PURE__ */ (0,
|
|
3079
|
-
if ((0,
|
|
3080
|
-
const childClasses = (0,
|
|
3166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Element, { ref, onClick, ...otherProps, children: import_react24.Children.map(children, (child) => {
|
|
3167
|
+
if ((0, import_react24.isValidElement)(child)) {
|
|
3168
|
+
const childClasses = (0, import_dedupe24.default)(
|
|
3081
3169
|
child.props.className,
|
|
3082
3170
|
classes
|
|
3083
3171
|
);
|
|
3084
|
-
return (0,
|
|
3172
|
+
return (0, import_react24.cloneElement)(
|
|
3085
3173
|
child,
|
|
3086
3174
|
{
|
|
3087
3175
|
className: childClasses
|
|
3088
3176
|
}
|
|
3089
3177
|
);
|
|
3090
3178
|
}
|
|
3091
|
-
return /* @__PURE__ */ (0,
|
|
3179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: classes, children: child });
|
|
3092
3180
|
}) });
|
|
3093
3181
|
};
|
|
3094
3182
|
Item.displayName = "DropdownMenu.Item";
|
|
@@ -3113,23 +3201,23 @@ var init_DropdownMenu2 = __esm({
|
|
|
3113
3201
|
});
|
|
3114
3202
|
|
|
3115
3203
|
// src/components/Fieldset/Fieldset.tsx
|
|
3116
|
-
var
|
|
3204
|
+
var import_dedupe25, import_react25, import_Fieldset, import_jsx_runtime32, useFieldset, Fieldset;
|
|
3117
3205
|
var init_Fieldset = __esm({
|
|
3118
3206
|
"src/components/Fieldset/Fieldset.tsx"() {
|
|
3119
3207
|
"use strict";
|
|
3120
3208
|
"use client";
|
|
3121
|
-
|
|
3122
|
-
|
|
3209
|
+
import_dedupe25 = __toESM(require("classnames/dedupe"));
|
|
3210
|
+
import_react25 = require("react");
|
|
3123
3211
|
init_Flex2();
|
|
3124
3212
|
import_Fieldset = require("@simplybusiness/mobius/src/components/Fieldset/Fieldset.css");
|
|
3125
|
-
|
|
3213
|
+
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3126
3214
|
useFieldset = (props) => {
|
|
3127
3215
|
const { legend } = props;
|
|
3128
3216
|
let legendProps = {};
|
|
3129
3217
|
let containerProps = {
|
|
3130
3218
|
role: "group"
|
|
3131
3219
|
};
|
|
3132
|
-
const legendId = (0,
|
|
3220
|
+
const legendId = (0, import_react25.useId)();
|
|
3133
3221
|
if (legend) {
|
|
3134
3222
|
legendProps = {
|
|
3135
3223
|
...legendProps,
|
|
@@ -3149,14 +3237,14 @@ var init_Fieldset = __esm({
|
|
|
3149
3237
|
const {
|
|
3150
3238
|
children,
|
|
3151
3239
|
legend,
|
|
3152
|
-
legendComponent = /* @__PURE__ */ (0,
|
|
3240
|
+
legendComponent = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("legend", {}),
|
|
3153
3241
|
...otherProps
|
|
3154
3242
|
} = props;
|
|
3155
3243
|
const { legendProps, containerProps } = useFieldset(props);
|
|
3156
|
-
const classes = (0,
|
|
3244
|
+
const classes = (0, import_dedupe25.default)("mobius", "mobius-fieldset", props.className);
|
|
3157
3245
|
legendProps.className = "mobius-fieldset__legend";
|
|
3158
|
-
return /* @__PURE__ */ (0,
|
|
3159
|
-
legend && (0,
|
|
3246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Flex, { ...containerProps, ...otherProps, className: classes, children: [
|
|
3247
|
+
legend && (0, import_react25.cloneElement)(legendComponent, { ...legendProps }, [legend]),
|
|
3160
3248
|
children
|
|
3161
3249
|
] });
|
|
3162
3250
|
};
|
|
@@ -3173,13 +3261,13 @@ var init_Fieldset2 = __esm({
|
|
|
3173
3261
|
});
|
|
3174
3262
|
|
|
3175
3263
|
// src/components/Grid/Grid.tsx
|
|
3176
|
-
var
|
|
3264
|
+
var import_dedupe26, import_jsx_runtime33, Grid;
|
|
3177
3265
|
var init_Grid = __esm({
|
|
3178
3266
|
"src/components/Grid/Grid.tsx"() {
|
|
3179
3267
|
"use strict";
|
|
3180
|
-
|
|
3268
|
+
import_dedupe26 = __toESM(require("classnames/dedupe"));
|
|
3181
3269
|
init_utils();
|
|
3182
|
-
|
|
3270
|
+
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3183
3271
|
Grid = ({ ref: _ref, ...props }) => {
|
|
3184
3272
|
const {
|
|
3185
3273
|
columns = 12,
|
|
@@ -3194,7 +3282,7 @@ var init_Grid = __esm({
|
|
|
3194
3282
|
style,
|
|
3195
3283
|
...rest
|
|
3196
3284
|
} = props;
|
|
3197
|
-
const classes = (0,
|
|
3285
|
+
const classes = (0, import_dedupe26.default)("mobius", "mobius-grid", className);
|
|
3198
3286
|
const styles = filterUndefinedProps({
|
|
3199
3287
|
boxSizing: "border-box",
|
|
3200
3288
|
display: "grid",
|
|
@@ -3208,22 +3296,22 @@ var init_Grid = __esm({
|
|
|
3208
3296
|
justifyItems,
|
|
3209
3297
|
...style
|
|
3210
3298
|
});
|
|
3211
|
-
return /* @__PURE__ */ (0,
|
|
3299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: styles, className: classes, ...rest });
|
|
3212
3300
|
};
|
|
3213
3301
|
Grid.displayName = "Grid";
|
|
3214
3302
|
}
|
|
3215
3303
|
});
|
|
3216
3304
|
|
|
3217
3305
|
// src/components/Grid/Item.tsx
|
|
3218
|
-
var
|
|
3306
|
+
var import_react26, import_dedupe27, import_jsx_runtime34, getBreakpointMap, DEFAULT_SPAN, GridItem;
|
|
3219
3307
|
var init_Item2 = __esm({
|
|
3220
3308
|
"src/components/Grid/Item.tsx"() {
|
|
3221
3309
|
"use strict";
|
|
3222
3310
|
"use client";
|
|
3223
|
-
|
|
3224
|
-
|
|
3311
|
+
import_react26 = require("react");
|
|
3312
|
+
import_dedupe27 = __toESM(require("classnames/dedupe"));
|
|
3225
3313
|
init_hooks();
|
|
3226
|
-
|
|
3314
|
+
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3227
3315
|
getBreakpointMap = (config) => Object.entries(config).reduce(
|
|
3228
3316
|
(prev, [key, value]) => {
|
|
3229
3317
|
const previous = Object.values(prev);
|
|
@@ -3258,9 +3346,9 @@ var init_Item2 = __esm({
|
|
|
3258
3346
|
xl,
|
|
3259
3347
|
xxl
|
|
3260
3348
|
});
|
|
3261
|
-
const [responsiveSpan, setResponsiveSpan] = (0,
|
|
3262
|
-
const classes = (0,
|
|
3263
|
-
(0,
|
|
3349
|
+
const [responsiveSpan, setResponsiveSpan] = (0, import_react26.useState)();
|
|
3350
|
+
const classes = (0, import_dedupe27.default)("mobius-grid__item", className);
|
|
3351
|
+
(0, import_react26.useEffect)(() => {
|
|
3264
3352
|
setResponsiveSpan(breakpointMap[breakpointSize]);
|
|
3265
3353
|
}, [breakpointSize, breakpointMap]);
|
|
3266
3354
|
const styles = {
|
|
@@ -3268,7 +3356,7 @@ var init_Item2 = __esm({
|
|
|
3268
3356
|
alignSelf,
|
|
3269
3357
|
justifySelf
|
|
3270
3358
|
};
|
|
3271
|
-
return /* @__PURE__ */ (0,
|
|
3359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { ...styles }, className: classes, ...rest });
|
|
3272
3360
|
};
|
|
3273
3361
|
GridItem.displayName = "GridItem";
|
|
3274
3362
|
}
|
|
@@ -3289,20 +3377,20 @@ var init_Grid2 = __esm({
|
|
|
3289
3377
|
});
|
|
3290
3378
|
|
|
3291
3379
|
// src/components/Image/Image.tsx
|
|
3292
|
-
var
|
|
3380
|
+
var import_dedupe28, import_jsx_runtime35, Image;
|
|
3293
3381
|
var init_Image = __esm({
|
|
3294
3382
|
"src/components/Image/Image.tsx"() {
|
|
3295
3383
|
"use strict";
|
|
3296
|
-
|
|
3297
|
-
|
|
3384
|
+
import_dedupe28 = __toESM(require("classnames/dedupe"));
|
|
3385
|
+
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3298
3386
|
Image = ({
|
|
3299
3387
|
ref,
|
|
3300
3388
|
alt,
|
|
3301
3389
|
elementType: Component = "img",
|
|
3302
3390
|
...otherProps
|
|
3303
3391
|
}) => {
|
|
3304
|
-
const classes = (0,
|
|
3305
|
-
return /* @__PURE__ */ (0,
|
|
3392
|
+
const classes = (0, import_dedupe28.default)("mobius", "mobius-image", otherProps.className);
|
|
3393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Component, { alt, ref, ...otherProps, className: classes });
|
|
3306
3394
|
};
|
|
3307
3395
|
Image.displayName = "Image";
|
|
3308
3396
|
}
|
|
@@ -3317,13 +3405,13 @@ var init_Image2 = __esm({
|
|
|
3317
3405
|
});
|
|
3318
3406
|
|
|
3319
3407
|
// src/components/Link/Link.tsx
|
|
3320
|
-
var
|
|
3408
|
+
var import_dedupe29, import_Link, import_jsx_runtime36, Link;
|
|
3321
3409
|
var init_Link = __esm({
|
|
3322
3410
|
"src/components/Link/Link.tsx"() {
|
|
3323
3411
|
"use strict";
|
|
3324
|
-
|
|
3412
|
+
import_dedupe29 = __toESM(require("classnames/dedupe"));
|
|
3325
3413
|
import_Link = require("@simplybusiness/mobius/src/components/Link/Link.css");
|
|
3326
|
-
|
|
3414
|
+
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3327
3415
|
Link = ({ ref, ...props }) => {
|
|
3328
3416
|
const {
|
|
3329
3417
|
isDisabled = false,
|
|
@@ -3337,7 +3425,7 @@ var init_Link = __esm({
|
|
|
3337
3425
|
pointerEvents: "none"
|
|
3338
3426
|
};
|
|
3339
3427
|
const styles = { ...style, ...isDisabled && disabledStyles };
|
|
3340
|
-
const classes = (0,
|
|
3428
|
+
const classes = (0, import_dedupe29.default)(
|
|
3341
3429
|
"mobius",
|
|
3342
3430
|
"mobius-link",
|
|
3343
3431
|
className,
|
|
@@ -3346,7 +3434,7 @@ var init_Link = __esm({
|
|
|
3346
3434
|
"--is-disabled": isDisabled
|
|
3347
3435
|
}
|
|
3348
3436
|
);
|
|
3349
|
-
return /* @__PURE__ */ (0,
|
|
3437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3350
3438
|
Component,
|
|
3351
3439
|
{
|
|
3352
3440
|
ref,
|
|
@@ -3371,12 +3459,12 @@ var init_Link2 = __esm({
|
|
|
3371
3459
|
});
|
|
3372
3460
|
|
|
3373
3461
|
// src/components/LinkButton/LinkButton.tsx
|
|
3374
|
-
var
|
|
3462
|
+
var import_dedupe30, import_jsx_runtime37;
|
|
3375
3463
|
var init_LinkButton = __esm({
|
|
3376
3464
|
"src/components/LinkButton/LinkButton.tsx"() {
|
|
3377
3465
|
"use strict";
|
|
3378
|
-
|
|
3379
|
-
|
|
3466
|
+
import_dedupe30 = __toESM(require("classnames/dedupe"));
|
|
3467
|
+
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3380
3468
|
}
|
|
3381
3469
|
});
|
|
3382
3470
|
|
|
@@ -3389,14 +3477,14 @@ var init_LinkButton2 = __esm({
|
|
|
3389
3477
|
});
|
|
3390
3478
|
|
|
3391
3479
|
// src/components/List/List.tsx
|
|
3392
|
-
var
|
|
3480
|
+
var import_react27, import_dedupe31, import_List, import_jsx_runtime38, List;
|
|
3393
3481
|
var init_List = __esm({
|
|
3394
3482
|
"src/components/List/List.tsx"() {
|
|
3395
3483
|
"use strict";
|
|
3396
|
-
|
|
3397
|
-
|
|
3484
|
+
import_react27 = require("react");
|
|
3485
|
+
import_dedupe31 = __toESM(require("classnames/dedupe"));
|
|
3398
3486
|
import_List = require("@simplybusiness/mobius/src/components/List/List.css");
|
|
3399
|
-
|
|
3487
|
+
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3400
3488
|
List = ({ ref, ...props }) => {
|
|
3401
3489
|
const Component = props.isOrdered ? "ol" : "ul";
|
|
3402
3490
|
const { children, icon, ...otherProps } = props;
|
|
@@ -3405,7 +3493,7 @@ var init_List = __esm({
|
|
|
3405
3493
|
...restProps,
|
|
3406
3494
|
reversed: isReversed
|
|
3407
3495
|
};
|
|
3408
|
-
const classes = (0,
|
|
3496
|
+
const classes = (0, import_dedupe31.default)(
|
|
3409
3497
|
"mobius",
|
|
3410
3498
|
"mobius-list",
|
|
3411
3499
|
{
|
|
@@ -3414,9 +3502,9 @@ var init_List = __esm({
|
|
|
3414
3502
|
},
|
|
3415
3503
|
otherProps.className
|
|
3416
3504
|
);
|
|
3417
|
-
return /* @__PURE__ */ (0,
|
|
3418
|
-
if ((0,
|
|
3419
|
-
return (0,
|
|
3505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Component, { ref, ...mappedProps, className: classes, children: import_react27.Children.map(children, (child) => {
|
|
3506
|
+
if ((0, import_react27.isValidElement)(child)) {
|
|
3507
|
+
return (0, import_react27.cloneElement)(child, {
|
|
3420
3508
|
parentIcon: icon
|
|
3421
3509
|
});
|
|
3422
3510
|
}
|
|
@@ -3428,16 +3516,16 @@ var init_List = __esm({
|
|
|
3428
3516
|
});
|
|
3429
3517
|
|
|
3430
3518
|
// src/components/List/ListItem.tsx
|
|
3431
|
-
var
|
|
3519
|
+
var import_dedupe32, import_jsx_runtime39, ListItem;
|
|
3432
3520
|
var init_ListItem = __esm({
|
|
3433
3521
|
"src/components/List/ListItem.tsx"() {
|
|
3434
3522
|
"use strict";
|
|
3435
|
-
|
|
3436
|
-
|
|
3523
|
+
import_dedupe32 = __toESM(require("classnames/dedupe"));
|
|
3524
|
+
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3437
3525
|
ListItem = ({ ref, ...props }) => {
|
|
3438
3526
|
const { parentIcon, icon, children, ...otherProps } = props;
|
|
3439
3527
|
const iconContent = icon || parentIcon;
|
|
3440
|
-
const classes = (0,
|
|
3528
|
+
const classes = (0, import_dedupe32.default)(
|
|
3441
3529
|
"mobius",
|
|
3442
3530
|
"mobius-list__item",
|
|
3443
3531
|
{
|
|
@@ -3445,15 +3533,15 @@ var init_ListItem = __esm({
|
|
|
3445
3533
|
},
|
|
3446
3534
|
props.className
|
|
3447
3535
|
);
|
|
3448
|
-
const contentClasses = (0,
|
|
3449
|
-
const iconClasses = (0,
|
|
3536
|
+
const contentClasses = (0, import_dedupe32.default)("mobius", "mobius-list__item-content");
|
|
3537
|
+
const iconClasses = (0, import_dedupe32.default)("mobius", "mobius-list__icon");
|
|
3450
3538
|
if (iconContent) {
|
|
3451
|
-
return /* @__PURE__ */ (0,
|
|
3452
|
-
/* @__PURE__ */ (0,
|
|
3539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("li", { ref, ...otherProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: contentClasses, children: [
|
|
3540
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: iconClasses, children: iconContent }),
|
|
3453
3541
|
children
|
|
3454
3542
|
] }) });
|
|
3455
3543
|
}
|
|
3456
|
-
return /* @__PURE__ */ (0,
|
|
3544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("li", { ref, ...otherProps, className: classes, children });
|
|
3457
3545
|
};
|
|
3458
3546
|
ListItem.displayName = "ListItem";
|
|
3459
3547
|
}
|
|
@@ -3469,23 +3557,23 @@ var init_List2 = __esm({
|
|
|
3469
3557
|
});
|
|
3470
3558
|
|
|
3471
3559
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
3472
|
-
var
|
|
3560
|
+
var import_dedupe33, import_icons8, import_LoadingIndicator, import_jsx_runtime40, LoadingIndicator;
|
|
3473
3561
|
var init_LoadingIndicator = __esm({
|
|
3474
3562
|
"src/components/LoadingIndicator/LoadingIndicator.tsx"() {
|
|
3475
3563
|
"use strict";
|
|
3476
|
-
|
|
3564
|
+
import_dedupe33 = __toESM(require("classnames/dedupe"));
|
|
3477
3565
|
import_icons8 = require("@simplybusiness/icons");
|
|
3478
3566
|
init_Icon2();
|
|
3479
3567
|
import_LoadingIndicator = require("@simplybusiness/mobius/src/components/LoadingIndicator/LoadingIndicator.css");
|
|
3480
|
-
|
|
3568
|
+
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3481
3569
|
LoadingIndicator = ({ ref, ...props }) => {
|
|
3482
3570
|
const { icon = import_icons8.loading, ...otherProps } = props;
|
|
3483
|
-
const classes = (0,
|
|
3571
|
+
const classes = (0, import_dedupe33.default)(
|
|
3484
3572
|
"mobius",
|
|
3485
3573
|
"mobius-loading-indicator",
|
|
3486
3574
|
otherProps.className
|
|
3487
3575
|
);
|
|
3488
|
-
return /* @__PURE__ */ (0,
|
|
3576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { icon, spin: true, ref, ...otherProps, className: classes });
|
|
3489
3577
|
};
|
|
3490
3578
|
LoadingIndicator.displayName = "LoadingIndicator";
|
|
3491
3579
|
}
|
|
@@ -3500,16 +3588,16 @@ var init_LoadingIndicator2 = __esm({
|
|
|
3500
3588
|
});
|
|
3501
3589
|
|
|
3502
3590
|
// src/components/Logo/Logo.tsx
|
|
3503
|
-
var
|
|
3591
|
+
var import_dedupe34, import_jsx_runtime41, Logo;
|
|
3504
3592
|
var init_Logo = __esm({
|
|
3505
3593
|
"src/components/Logo/Logo.tsx"() {
|
|
3506
3594
|
"use strict";
|
|
3507
|
-
|
|
3508
|
-
|
|
3595
|
+
import_dedupe34 = __toESM(require("classnames/dedupe"));
|
|
3596
|
+
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3509
3597
|
Logo = ({ ref, ...props }) => {
|
|
3510
3598
|
const { className, width, height, ...otherProps } = props;
|
|
3511
|
-
const classes = (0,
|
|
3512
|
-
return /* @__PURE__ */ (0,
|
|
3599
|
+
const classes = (0, import_dedupe34.default)("mobius", "mobius-logo", className);
|
|
3600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3513
3601
|
"svg",
|
|
3514
3602
|
{
|
|
3515
3603
|
width,
|
|
@@ -3519,7 +3607,7 @@ var init_Logo = __esm({
|
|
|
3519
3607
|
viewBox: "0 0 144 37",
|
|
3520
3608
|
...otherProps,
|
|
3521
3609
|
children: [
|
|
3522
|
-
/* @__PURE__ */ (0,
|
|
3610
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3523
3611
|
"linearGradient",
|
|
3524
3612
|
{
|
|
3525
3613
|
id: "logo-gradient",
|
|
@@ -3528,27 +3616,27 @@ var init_Logo = __esm({
|
|
|
3528
3616
|
y1: "76.042%",
|
|
3529
3617
|
y2: "26.973%",
|
|
3530
3618
|
children: [
|
|
3531
|
-
/* @__PURE__ */ (0,
|
|
3532
|
-
/* @__PURE__ */ (0,
|
|
3619
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("stop", { stopColor: "#4632D8", offset: "0%" }),
|
|
3620
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("stop", { stopColor: "#9084E8", offset: "100%" })
|
|
3533
3621
|
]
|
|
3534
3622
|
}
|
|
3535
3623
|
) }),
|
|
3536
|
-
/* @__PURE__ */ (0,
|
|
3537
|
-
/* @__PURE__ */ (0,
|
|
3624
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("g", { children: [
|
|
3625
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3538
3626
|
"path",
|
|
3539
3627
|
{
|
|
3540
3628
|
fill: "#0E0A2B",
|
|
3541
3629
|
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"
|
|
3542
3630
|
}
|
|
3543
3631
|
),
|
|
3544
|
-
/* @__PURE__ */ (0,
|
|
3632
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3545
3633
|
"path",
|
|
3546
3634
|
{
|
|
3547
3635
|
fill: "url(#logo-gradient)",
|
|
3548
3636
|
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"
|
|
3549
3637
|
}
|
|
3550
3638
|
),
|
|
3551
|
-
/* @__PURE__ */ (0,
|
|
3639
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3552
3640
|
"path",
|
|
3553
3641
|
{
|
|
3554
3642
|
fill: "#0E0A2B",
|
|
@@ -3573,23 +3661,23 @@ var init_Logo2 = __esm({
|
|
|
3573
3661
|
});
|
|
3574
3662
|
|
|
3575
3663
|
// src/components/Modal/Content.tsx
|
|
3576
|
-
var
|
|
3664
|
+
var import_jsx_runtime42, Content2;
|
|
3577
3665
|
var init_Content2 = __esm({
|
|
3578
3666
|
"src/components/Modal/Content.tsx"() {
|
|
3579
3667
|
"use strict";
|
|
3580
|
-
|
|
3581
|
-
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
3668
|
+
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3669
|
+
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { ref, ...otherProps, className: "mobius-modal__content", children });
|
|
3582
3670
|
Content2.displayName = "Content";
|
|
3583
3671
|
}
|
|
3584
3672
|
});
|
|
3585
3673
|
|
|
3586
3674
|
// src/components/Modal/ModalContext.tsx
|
|
3587
|
-
var
|
|
3675
|
+
var import_react28, ModalContext;
|
|
3588
3676
|
var init_ModalContext = __esm({
|
|
3589
3677
|
"src/components/Modal/ModalContext.tsx"() {
|
|
3590
3678
|
"use strict";
|
|
3591
|
-
|
|
3592
|
-
ModalContext = (0,
|
|
3679
|
+
import_react28 = require("react");
|
|
3680
|
+
ModalContext = (0, import_react28.createContext)({
|
|
3593
3681
|
onClose: () => {
|
|
3594
3682
|
},
|
|
3595
3683
|
closeLabel: void 0
|
|
@@ -3598,21 +3686,21 @@ var init_ModalContext = __esm({
|
|
|
3598
3686
|
});
|
|
3599
3687
|
|
|
3600
3688
|
// src/components/Modal/useModal.ts
|
|
3601
|
-
var
|
|
3689
|
+
var import_react29, useModal;
|
|
3602
3690
|
var init_useModal = __esm({
|
|
3603
3691
|
"src/components/Modal/useModal.ts"() {
|
|
3604
3692
|
"use strict";
|
|
3605
|
-
|
|
3693
|
+
import_react29 = require("react");
|
|
3606
3694
|
init_ModalContext();
|
|
3607
3695
|
useModal = () => {
|
|
3608
|
-
const { onClose, closeLabel } = (0,
|
|
3696
|
+
const { onClose, closeLabel } = (0, import_react29.useContext)(ModalContext);
|
|
3609
3697
|
return { onClose, closeLabel };
|
|
3610
3698
|
};
|
|
3611
3699
|
}
|
|
3612
3700
|
});
|
|
3613
3701
|
|
|
3614
3702
|
// src/components/Modal/Header.tsx
|
|
3615
|
-
var import_icons9,
|
|
3703
|
+
var import_icons9, import_jsx_runtime43, Header2;
|
|
3616
3704
|
var init_Header2 = __esm({
|
|
3617
3705
|
"src/components/Modal/Header.tsx"() {
|
|
3618
3706
|
"use strict";
|
|
@@ -3620,12 +3708,12 @@ var init_Header2 = __esm({
|
|
|
3620
3708
|
init_Button2();
|
|
3621
3709
|
init_Icon2();
|
|
3622
3710
|
init_useModal();
|
|
3623
|
-
|
|
3711
|
+
import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3624
3712
|
Header2 = ({ ref, children, ...otherProps }) => {
|
|
3625
3713
|
const { onClose, closeLabel } = useModal();
|
|
3626
|
-
return /* @__PURE__ */ (0,
|
|
3714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("header", { ref, ...otherProps, className: "mobius-modal__header", children: [
|
|
3627
3715
|
children,
|
|
3628
|
-
/* @__PURE__ */ (0,
|
|
3716
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3629
3717
|
Button,
|
|
3630
3718
|
{
|
|
3631
3719
|
"aria-label": "Close",
|
|
@@ -3633,7 +3721,7 @@ var init_Header2 = __esm({
|
|
|
3633
3721
|
onPress: onClose,
|
|
3634
3722
|
className: "mobius-modal__close",
|
|
3635
3723
|
children: [
|
|
3636
|
-
/* @__PURE__ */ (0,
|
|
3724
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon: import_icons9.cross }),
|
|
3637
3725
|
" ",
|
|
3638
3726
|
closeLabel
|
|
3639
3727
|
]
|
|
@@ -3646,19 +3734,19 @@ var init_Header2 = __esm({
|
|
|
3646
3734
|
});
|
|
3647
3735
|
|
|
3648
3736
|
// src/components/Modal/Modal.tsx
|
|
3649
|
-
var
|
|
3737
|
+
var import_dedupe35, import_react30, import_Modal, import_jsx_runtime44, TRANSITION_CSS_VARIABLE2, Modal;
|
|
3650
3738
|
var init_Modal = __esm({
|
|
3651
3739
|
"src/components/Modal/Modal.tsx"() {
|
|
3652
3740
|
"use strict";
|
|
3653
3741
|
"use client";
|
|
3654
|
-
|
|
3655
|
-
|
|
3742
|
+
import_dedupe35 = __toESM(require("classnames/dedupe"));
|
|
3743
|
+
import_react30 = require("react");
|
|
3656
3744
|
init_hooks();
|
|
3657
3745
|
init_utils();
|
|
3658
3746
|
init_polyfill_tests();
|
|
3659
3747
|
init_ModalContext();
|
|
3660
3748
|
import_Modal = require("@simplybusiness/mobius/src/components/Modal/Modal.css");
|
|
3661
|
-
|
|
3749
|
+
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3662
3750
|
TRANSITION_CSS_VARIABLE2 = "--modal-transition-duration";
|
|
3663
3751
|
Modal = ({ ref, ...props }) => {
|
|
3664
3752
|
const {
|
|
@@ -3672,11 +3760,11 @@ var init_Modal = __esm({
|
|
|
3672
3760
|
animation,
|
|
3673
3761
|
...rest
|
|
3674
3762
|
} = props;
|
|
3675
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
3676
|
-
(0,
|
|
3763
|
+
const [shouldTransition, setShouldTransition] = (0, import_react30.useState)(false);
|
|
3764
|
+
(0, import_react30.useEffect)(() => {
|
|
3677
3765
|
setShouldTransition(supportsDialog());
|
|
3678
3766
|
}, []);
|
|
3679
|
-
const dialogRef = (0,
|
|
3767
|
+
const dialogRef = (0, import_react30.useRef)(null);
|
|
3680
3768
|
const { close } = useDialog({
|
|
3681
3769
|
ref: dialogRef,
|
|
3682
3770
|
isOpen,
|
|
@@ -3687,7 +3775,7 @@ var init_Modal = __esm({
|
|
|
3687
3775
|
CSSVariable: TRANSITION_CSS_VARIABLE2
|
|
3688
3776
|
}
|
|
3689
3777
|
});
|
|
3690
|
-
const modalClasses = (0,
|
|
3778
|
+
const modalClasses = (0, import_dedupe35.default)(
|
|
3691
3779
|
"mobius",
|
|
3692
3780
|
"mobius-modal",
|
|
3693
3781
|
{
|
|
@@ -3700,21 +3788,21 @@ var init_Modal = __esm({
|
|
|
3700
3788
|
},
|
|
3701
3789
|
className
|
|
3702
3790
|
);
|
|
3703
|
-
const contextValue = (0,
|
|
3791
|
+
const contextValue = (0, import_react30.useMemo)(
|
|
3704
3792
|
() => ({
|
|
3705
3793
|
onClose: close,
|
|
3706
3794
|
closeLabel
|
|
3707
3795
|
}),
|
|
3708
3796
|
[close, closeLabel]
|
|
3709
3797
|
);
|
|
3710
|
-
return /* @__PURE__ */ (0,
|
|
3798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3711
3799
|
"dialog",
|
|
3712
3800
|
{
|
|
3713
3801
|
ref: mergeRefs([dialogRef, ref]),
|
|
3714
3802
|
onCancel: close,
|
|
3715
3803
|
className: modalClasses,
|
|
3716
3804
|
...rest,
|
|
3717
|
-
children: /* @__PURE__ */ (0,
|
|
3805
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ModalContext.Provider, { value: contextValue, children })
|
|
3718
3806
|
}
|
|
3719
3807
|
);
|
|
3720
3808
|
};
|
|
@@ -3739,16 +3827,16 @@ var init_Modal2 = __esm({
|
|
|
3739
3827
|
});
|
|
3740
3828
|
|
|
3741
3829
|
// src/components/NumberField/NumberField.tsx
|
|
3742
|
-
var
|
|
3830
|
+
var import_dedupe36, import_react31, import_NumberField, import_jsx_runtime45, NumberField;
|
|
3743
3831
|
var init_NumberField = __esm({
|
|
3744
3832
|
"src/components/NumberField/NumberField.tsx"() {
|
|
3745
3833
|
"use strict";
|
|
3746
3834
|
"use client";
|
|
3747
|
-
|
|
3748
|
-
|
|
3835
|
+
import_dedupe36 = __toESM(require("classnames/dedupe"));
|
|
3836
|
+
import_react31 = require("react");
|
|
3749
3837
|
init_TextField();
|
|
3750
3838
|
import_NumberField = require("@simplybusiness/mobius/src/components/NumberField/NumberField.css");
|
|
3751
|
-
|
|
3839
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3752
3840
|
NumberField = ({ ref, ...props }) => {
|
|
3753
3841
|
const {
|
|
3754
3842
|
minValue,
|
|
@@ -3764,15 +3852,15 @@ var init_NumberField = __esm({
|
|
|
3764
3852
|
onBlur: customOnBlur,
|
|
3765
3853
|
...rest
|
|
3766
3854
|
} = otherProps;
|
|
3767
|
-
const focusedInputRef = (0,
|
|
3768
|
-
const wheelHandler = (0,
|
|
3769
|
-
(0,
|
|
3855
|
+
const focusedInputRef = (0, import_react31.useRef)(null);
|
|
3856
|
+
const wheelHandler = (0, import_react31.useCallback)((ev) => ev.preventDefault(), []);
|
|
3857
|
+
(0, import_react31.useEffect)(() => {
|
|
3770
3858
|
return () => {
|
|
3771
3859
|
focusedInputRef.current?.removeEventListener("wheel", wheelHandler);
|
|
3772
3860
|
focusedInputRef.current = null;
|
|
3773
3861
|
};
|
|
3774
3862
|
}, [wheelHandler]);
|
|
3775
|
-
const containerClasses = (0,
|
|
3863
|
+
const containerClasses = (0, import_dedupe36.default)("mobius-number-field", className, {
|
|
3776
3864
|
"--hide-spin-buttons": hideSpinButtons
|
|
3777
3865
|
});
|
|
3778
3866
|
const handleBeforeInput = (event) => {
|
|
@@ -3816,7 +3904,7 @@ var init_NumberField = __esm({
|
|
|
3816
3904
|
},
|
|
3817
3905
|
onBlur: (e) => handleBlur(e)
|
|
3818
3906
|
};
|
|
3819
|
-
return /* @__PURE__ */ (0,
|
|
3907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3820
3908
|
TextField,
|
|
3821
3909
|
{
|
|
3822
3910
|
...forwardedProps,
|
|
@@ -3844,18 +3932,18 @@ var init_NumberField2 = __esm({
|
|
|
3844
3932
|
});
|
|
3845
3933
|
|
|
3846
3934
|
// src/components/Option/Option.tsx
|
|
3847
|
-
var
|
|
3935
|
+
var import_jsx_runtime46, Option2;
|
|
3848
3936
|
var init_Option2 = __esm({
|
|
3849
3937
|
"src/components/Option/Option.tsx"() {
|
|
3850
3938
|
"use strict";
|
|
3851
|
-
|
|
3939
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3852
3940
|
Option2 = ({ ref, ...props }) => {
|
|
3853
3941
|
const { isDisabled, ...rest } = props;
|
|
3854
3942
|
const mappedProps = {
|
|
3855
3943
|
...rest,
|
|
3856
3944
|
disabled: isDisabled
|
|
3857
3945
|
};
|
|
3858
|
-
return /* @__PURE__ */ (0,
|
|
3946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { ...mappedProps, ref });
|
|
3859
3947
|
};
|
|
3860
3948
|
Option2.displayName = "Option";
|
|
3861
3949
|
}
|
|
@@ -3870,17 +3958,17 @@ var init_Option3 = __esm({
|
|
|
3870
3958
|
});
|
|
3871
3959
|
|
|
3872
3960
|
// src/components/PasswordField/ShowHideButton.tsx
|
|
3873
|
-
var import_icons10,
|
|
3961
|
+
var import_icons10, import_jsx_runtime47, ShowHideButton;
|
|
3874
3962
|
var init_ShowHideButton = __esm({
|
|
3875
3963
|
"src/components/PasswordField/ShowHideButton.tsx"() {
|
|
3876
3964
|
"use strict";
|
|
3877
3965
|
import_icons10 = require("@simplybusiness/icons");
|
|
3878
3966
|
init_src();
|
|
3879
|
-
|
|
3967
|
+
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3880
3968
|
ShowHideButton = ({
|
|
3881
3969
|
show = false,
|
|
3882
3970
|
onClick
|
|
3883
|
-
}) => /* @__PURE__ */ (0,
|
|
3971
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3884
3972
|
"button",
|
|
3885
3973
|
{
|
|
3886
3974
|
className: "mobius-password-field__show-button",
|
|
@@ -3891,35 +3979,35 @@ var init_ShowHideButton = __esm({
|
|
|
3891
3979
|
},
|
|
3892
3980
|
"aria-label": `${show ? "Hide" : "Show"} password`,
|
|
3893
3981
|
"data-testid": "show-hide-button",
|
|
3894
|
-
children: /* @__PURE__ */ (0,
|
|
3982
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { icon: show ? import_icons10.eyeSlash : import_icons10.eye, "aria-hidden": "true" })
|
|
3895
3983
|
}
|
|
3896
3984
|
);
|
|
3897
3985
|
}
|
|
3898
3986
|
});
|
|
3899
3987
|
|
|
3900
3988
|
// src/components/PasswordField/PasswordField.tsx
|
|
3901
|
-
var
|
|
3989
|
+
var import_dedupe37, import_react32, import_PasswordField, import_jsx_runtime48, PasswordField;
|
|
3902
3990
|
var init_PasswordField = __esm({
|
|
3903
3991
|
"src/components/PasswordField/PasswordField.tsx"() {
|
|
3904
3992
|
"use strict";
|
|
3905
3993
|
"use client";
|
|
3906
|
-
|
|
3907
|
-
|
|
3994
|
+
import_dedupe37 = __toESM(require("classnames/dedupe"));
|
|
3995
|
+
import_react32 = require("react");
|
|
3908
3996
|
init_mergeRefs();
|
|
3909
3997
|
init_TextField();
|
|
3910
3998
|
init_ShowHideButton();
|
|
3911
3999
|
import_PasswordField = require("@simplybusiness/mobius/src/components/PasswordField/PasswordField.css");
|
|
3912
|
-
|
|
4000
|
+
import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3913
4001
|
PasswordField = ({
|
|
3914
4002
|
ref,
|
|
3915
4003
|
className,
|
|
3916
4004
|
autoComplete = "current-password",
|
|
3917
4005
|
...props
|
|
3918
4006
|
}) => {
|
|
3919
|
-
const [show, setShow] = (0,
|
|
4007
|
+
const [show, setShow] = (0, import_react32.useState)(false);
|
|
3920
4008
|
const type = show ? "text" : "password";
|
|
3921
|
-
const classes = (0,
|
|
3922
|
-
const localRef = (0,
|
|
4009
|
+
const classes = (0, import_dedupe37.default)("mobius-password-field", className);
|
|
4010
|
+
const localRef = (0, import_react32.useRef)(null);
|
|
3923
4011
|
const handleShowHideButtonClick = () => {
|
|
3924
4012
|
const selectionStart = localRef.current?.selectionStart;
|
|
3925
4013
|
const selectionEnd = localRef.current?.selectionEnd;
|
|
@@ -3931,7 +4019,7 @@ var init_PasswordField = __esm({
|
|
|
3931
4019
|
}
|
|
3932
4020
|
});
|
|
3933
4021
|
};
|
|
3934
|
-
return /* @__PURE__ */ (0,
|
|
4022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3935
4023
|
TextField,
|
|
3936
4024
|
{
|
|
3937
4025
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -3939,7 +4027,7 @@ var init_PasswordField = __esm({
|
|
|
3939
4027
|
...props,
|
|
3940
4028
|
autoComplete,
|
|
3941
4029
|
type,
|
|
3942
|
-
suffixInside: /* @__PURE__ */ (0,
|
|
4030
|
+
suffixInside: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ShowHideButton, { onClick: handleShowHideButtonClick, show })
|
|
3943
4031
|
}
|
|
3944
4032
|
);
|
|
3945
4033
|
};
|
|
@@ -3956,17 +4044,17 @@ var init_PasswordField2 = __esm({
|
|
|
3956
4044
|
});
|
|
3957
4045
|
|
|
3958
4046
|
// src/components/Popover/Popover.tsx
|
|
3959
|
-
var
|
|
4047
|
+
var import_react33, import_icons11, import_dedupe38, import_react34, import_mobius_hooks6, import_Popover, import_jsx_runtime49;
|
|
3960
4048
|
var init_Popover = __esm({
|
|
3961
4049
|
"src/components/Popover/Popover.tsx"() {
|
|
3962
4050
|
"use strict";
|
|
3963
|
-
|
|
4051
|
+
import_react33 = require("@floating-ui/react");
|
|
3964
4052
|
import_icons11 = require("@simplybusiness/icons");
|
|
3965
|
-
|
|
3966
|
-
|
|
4053
|
+
import_dedupe38 = __toESM(require("classnames/dedupe"));
|
|
4054
|
+
import_react34 = require("react");
|
|
3967
4055
|
import_mobius_hooks6 = require("@simplybusiness/mobius-hooks");
|
|
3968
4056
|
import_Popover = require("@simplybusiness/mobius/src/components/Popover/Popover.css");
|
|
3969
|
-
|
|
4057
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3970
4058
|
}
|
|
3971
4059
|
});
|
|
3972
4060
|
|
|
@@ -3990,17 +4078,17 @@ function warnAboutInvalidValues(value, minValue, maxValue) {
|
|
|
3990
4078
|
console.warn("Progress value is greater than maxValue");
|
|
3991
4079
|
}
|
|
3992
4080
|
}
|
|
3993
|
-
var
|
|
4081
|
+
var import_dedupe39, import_react35, import_Progress, import_jsx_runtime50, sanitizedValue, getLabelComponent, DEFAULT_VALUE, DEFAULT_MIN_VALUE, DEFAULT_MAX_VALUE, Progress;
|
|
3994
4082
|
var init_Progress = __esm({
|
|
3995
4083
|
"src/components/Progress/Progress.tsx"() {
|
|
3996
4084
|
"use strict";
|
|
3997
4085
|
"use client";
|
|
3998
|
-
|
|
3999
|
-
|
|
4086
|
+
import_dedupe39 = __toESM(require("classnames/dedupe"));
|
|
4087
|
+
import_react35 = require("react");
|
|
4000
4088
|
init_Label2();
|
|
4001
4089
|
init_VisuallyHidden2();
|
|
4002
4090
|
import_Progress = require("@simplybusiness/mobius/src/components/Progress/Progress.css");
|
|
4003
|
-
|
|
4091
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4004
4092
|
sanitizedValue = (value, defaultValue) => {
|
|
4005
4093
|
if (value === void 0 || Number.isNaN(value)) {
|
|
4006
4094
|
return defaultValue;
|
|
@@ -4009,7 +4097,7 @@ var init_Progress = __esm({
|
|
|
4009
4097
|
};
|
|
4010
4098
|
getLabelComponent = (label, progressLabelId, showLabel) => {
|
|
4011
4099
|
if (showLabel) {
|
|
4012
|
-
return /* @__PURE__ */ (0,
|
|
4100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4013
4101
|
Label,
|
|
4014
4102
|
{
|
|
4015
4103
|
id: progressLabelId,
|
|
@@ -4019,7 +4107,7 @@ var init_Progress = __esm({
|
|
|
4019
4107
|
}
|
|
4020
4108
|
);
|
|
4021
4109
|
}
|
|
4022
|
-
return /* @__PURE__ */ (0,
|
|
4110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4023
4111
|
Label,
|
|
4024
4112
|
{
|
|
4025
4113
|
id: progressLabelId,
|
|
@@ -4033,8 +4121,8 @@ var init_Progress = __esm({
|
|
|
4033
4121
|
DEFAULT_MIN_VALUE = 0;
|
|
4034
4122
|
DEFAULT_MAX_VALUE = 100;
|
|
4035
4123
|
Progress = ({ ref, ...props }) => {
|
|
4036
|
-
const progressId = (0,
|
|
4037
|
-
const progressLabelId = (0,
|
|
4124
|
+
const progressId = (0, import_react35.useId)();
|
|
4125
|
+
const progressLabelId = (0, import_react35.useId)();
|
|
4038
4126
|
const {
|
|
4039
4127
|
id,
|
|
4040
4128
|
label,
|
|
@@ -4059,7 +4147,7 @@ var init_Progress = __esm({
|
|
|
4059
4147
|
100
|
|
4060
4148
|
);
|
|
4061
4149
|
const barWidth = `${percentage}%`;
|
|
4062
|
-
const classes = (0,
|
|
4150
|
+
const classes = (0, import_dedupe39.default)("mobius", "mobius-progress", className, {
|
|
4063
4151
|
"--is-primary": variant === "primary",
|
|
4064
4152
|
"--is-secondary": variant === "secondary"
|
|
4065
4153
|
});
|
|
@@ -4069,7 +4157,7 @@ var init_Progress = __esm({
|
|
|
4069
4157
|
progressBarProps["aria-valuenow"] = value.toString();
|
|
4070
4158
|
progressBarProps["aria-valuetext"] = valueFormatter instanceof Function ? valueFormatter(value, minValue, maxValue) : barWidth;
|
|
4071
4159
|
const labelComponent = getLabelComponent(label, progressLabelId, showLabel);
|
|
4072
|
-
return /* @__PURE__ */ (0,
|
|
4160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
4073
4161
|
"div",
|
|
4074
4162
|
{
|
|
4075
4163
|
id: id || progressId,
|
|
@@ -4080,8 +4168,8 @@ var init_Progress = __esm({
|
|
|
4080
4168
|
"aria-labelledby": progressLabelId,
|
|
4081
4169
|
children: [
|
|
4082
4170
|
labelComponent,
|
|
4083
|
-
/* @__PURE__ */ (0,
|
|
4084
|
-
showValueLabel && /* @__PURE__ */ (0,
|
|
4171
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mobius-progress__track", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mobius-progress__bar", style: { width: barWidth } }) }),
|
|
4172
|
+
showValueLabel && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Label, { "data-testid": "value-label", elementType: "span", children: progressBarProps["aria-valuetext"] })
|
|
4085
4173
|
]
|
|
4086
4174
|
}
|
|
4087
4175
|
);
|
|
@@ -4099,17 +4187,17 @@ var init_Progress2 = __esm({
|
|
|
4099
4187
|
});
|
|
4100
4188
|
|
|
4101
4189
|
// src/components/Radio/Radio.tsx
|
|
4102
|
-
var
|
|
4190
|
+
var import_dedupe40, import_react36, import_Radio, import_jsx_runtime51, Radio;
|
|
4103
4191
|
var init_Radio = __esm({
|
|
4104
4192
|
"src/components/Radio/Radio.tsx"() {
|
|
4105
4193
|
"use strict";
|
|
4106
4194
|
"use client";
|
|
4107
|
-
|
|
4108
|
-
|
|
4195
|
+
import_dedupe40 = __toESM(require("classnames/dedupe"));
|
|
4196
|
+
import_react36 = require("react");
|
|
4109
4197
|
init_ErrorMessage2();
|
|
4110
4198
|
init_Label2();
|
|
4111
4199
|
import_Radio = require("@simplybusiness/mobius/src/components/Radio/Radio.css");
|
|
4112
|
-
|
|
4200
|
+
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4113
4201
|
Radio = ({ ref, ...props }) => {
|
|
4114
4202
|
const {
|
|
4115
4203
|
children,
|
|
@@ -4133,19 +4221,19 @@ var init_Radio = __esm({
|
|
|
4133
4221
|
const isMultiline = label && children;
|
|
4134
4222
|
const isControlled = selected !== void 0;
|
|
4135
4223
|
const isChecked = isControlled ? selected === value : defaultChecked;
|
|
4136
|
-
const contentRef = (0,
|
|
4137
|
-
const prevOverflowRef = (0,
|
|
4224
|
+
const contentRef = (0, import_react36.useRef)(null);
|
|
4225
|
+
const prevOverflowRef = (0, import_react36.useRef)({
|
|
4138
4226
|
vertical: false,
|
|
4139
4227
|
horizontal: false
|
|
4140
4228
|
});
|
|
4141
|
-
const hasIconFirst = (0,
|
|
4142
|
-
if (!children ||
|
|
4143
|
-
const firstChild =
|
|
4144
|
-
if (!(0,
|
|
4229
|
+
const hasIconFirst = (0, import_react36.useMemo)(() => {
|
|
4230
|
+
if (!children || import_react36.Children.count(children) === 0) return false;
|
|
4231
|
+
const firstChild = import_react36.Children.toArray(children)[0];
|
|
4232
|
+
if (!(0, import_react36.isValidElement)(firstChild)) return false;
|
|
4145
4233
|
const props2 = firstChild.props;
|
|
4146
4234
|
return "icon" in props2 && props2.icon !== void 0;
|
|
4147
4235
|
}, [children]);
|
|
4148
|
-
(0,
|
|
4236
|
+
(0, import_react36.useLayoutEffect)(() => {
|
|
4149
4237
|
if (!contentRef.current || !onOverflow) return;
|
|
4150
4238
|
if (orientation === "vertical") {
|
|
4151
4239
|
return;
|
|
@@ -4174,13 +4262,13 @@ var init_Radio = __esm({
|
|
|
4174
4262
|
"--is-multiline": !!isMultiline,
|
|
4175
4263
|
"--is-required": isRequired
|
|
4176
4264
|
};
|
|
4177
|
-
const containerClasses = (0,
|
|
4265
|
+
const containerClasses = (0, import_dedupe40.default)(
|
|
4178
4266
|
"mobius-radio__label",
|
|
4179
4267
|
radioClasses,
|
|
4180
4268
|
className,
|
|
4181
4269
|
{ "--has-icon-first": hasIconFirst }
|
|
4182
4270
|
);
|
|
4183
|
-
const inputClasses = (0,
|
|
4271
|
+
const inputClasses = (0, import_dedupe40.default)("mobius-radio__input", radioClasses);
|
|
4184
4272
|
const { "aria-describedby": _ariaDescribedBy, ...rest } = otherProps;
|
|
4185
4273
|
const handleChange = (event) => {
|
|
4186
4274
|
if (setSelected) {
|
|
@@ -4194,9 +4282,9 @@ var init_Radio = __esm({
|
|
|
4194
4282
|
onChange(adaptedEvent);
|
|
4195
4283
|
}
|
|
4196
4284
|
};
|
|
4197
|
-
return /* @__PURE__ */ (0,
|
|
4198
|
-
/* @__PURE__ */ (0,
|
|
4199
|
-
/* @__PURE__ */ (0,
|
|
4285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
4286
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Label, { className: containerClasses, children: [
|
|
4287
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4200
4288
|
"input",
|
|
4201
4289
|
{
|
|
4202
4290
|
"aria-describedby": otherProps["aria-describedby"],
|
|
@@ -4213,12 +4301,12 @@ var init_Radio = __esm({
|
|
|
4213
4301
|
...rest
|
|
4214
4302
|
}
|
|
4215
4303
|
),
|
|
4216
|
-
isMultiline ? /* @__PURE__ */ (0,
|
|
4217
|
-
/* @__PURE__ */ (0,
|
|
4218
|
-
/* @__PURE__ */ (0,
|
|
4219
|
-
] }) : /* @__PURE__ */ (0,
|
|
4304
|
+
isMultiline ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { ref: contentRef, className: "mobius-radio__content--multiline", children: [
|
|
4305
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mobius-radio__content-first-line", children: label }),
|
|
4306
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mobius-radio__extra-content", children })
|
|
4307
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { ref: contentRef, className: "mobius-radio__content", children: label || children })
|
|
4220
4308
|
] }),
|
|
4221
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
4309
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ErrorMessage, { errorMessage })
|
|
4222
4310
|
] });
|
|
4223
4311
|
};
|
|
4224
4312
|
Radio.displayName = "Radio";
|
|
@@ -4226,19 +4314,19 @@ var init_Radio = __esm({
|
|
|
4226
4314
|
});
|
|
4227
4315
|
|
|
4228
4316
|
// src/components/Radio/RadioGroup.tsx
|
|
4229
|
-
var
|
|
4317
|
+
var import_dedupe41, import_react37, import_jsx_runtime52, getDefaultVal, RadioGroup;
|
|
4230
4318
|
var init_RadioGroup = __esm({
|
|
4231
4319
|
"src/components/Radio/RadioGroup.tsx"() {
|
|
4232
4320
|
"use strict";
|
|
4233
4321
|
"use client";
|
|
4234
|
-
|
|
4235
|
-
|
|
4322
|
+
import_dedupe41 = __toESM(require("classnames/dedupe"));
|
|
4323
|
+
import_react37 = require("react");
|
|
4236
4324
|
init_hooks();
|
|
4237
4325
|
init_spaceDelimitedList();
|
|
4238
4326
|
init_ErrorMessage2();
|
|
4239
4327
|
init_Label2();
|
|
4240
4328
|
init_Stack2();
|
|
4241
|
-
|
|
4329
|
+
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4242
4330
|
getDefaultVal = (children, defaultValue) => {
|
|
4243
4331
|
if (Array.isArray(children) && defaultValue) {
|
|
4244
4332
|
const option = children?.find((item) => item.props.value === defaultValue);
|
|
@@ -4266,15 +4354,15 @@ var init_RadioGroup = __esm({
|
|
|
4266
4354
|
...rest
|
|
4267
4355
|
} = props;
|
|
4268
4356
|
const defaultSelected = getDefaultVal(children, value || defaultValue);
|
|
4269
|
-
const [selected, setSelected] = (0,
|
|
4270
|
-
const overflowsRef = (0,
|
|
4271
|
-
const [hasOverflow, setHasOverflow] = (0,
|
|
4272
|
-
(0,
|
|
4357
|
+
const [selected, setSelected] = (0, import_react37.useState)(defaultSelected);
|
|
4358
|
+
const overflowsRef = (0, import_react37.useRef)({});
|
|
4359
|
+
const [hasOverflow, setHasOverflow] = (0, import_react37.useState)(false);
|
|
4360
|
+
(0, import_react37.useEffect)(() => {
|
|
4273
4361
|
if (value !== void 0) {
|
|
4274
4362
|
setSelected(value);
|
|
4275
4363
|
}
|
|
4276
4364
|
}, [value]);
|
|
4277
|
-
const handleOverflow = (0,
|
|
4365
|
+
const handleOverflow = (0, import_react37.useCallback)(
|
|
4278
4366
|
(radioValue, overflow) => {
|
|
4279
4367
|
overflowsRef.current = {
|
|
4280
4368
|
...overflowsRef.current,
|
|
@@ -4298,26 +4386,26 @@ var init_RadioGroup = __esm({
|
|
|
4298
4386
|
[`--is-${effectiveOrientation}`]: true,
|
|
4299
4387
|
[className || ""]: true
|
|
4300
4388
|
};
|
|
4301
|
-
const radioGroupClasses = (0,
|
|
4389
|
+
const radioGroupClasses = (0, import_dedupe41.default)(
|
|
4302
4390
|
"mobius",
|
|
4303
4391
|
"mobius-radio-group",
|
|
4304
4392
|
radioClasses,
|
|
4305
4393
|
validationClasses
|
|
4306
4394
|
);
|
|
4307
|
-
const radioWrapperClasses = (0,
|
|
4395
|
+
const radioWrapperClasses = (0, import_dedupe41.default)("mobius-radio__wrapper", {
|
|
4308
4396
|
[`--is-${effectiveOrientation}`]: true
|
|
4309
4397
|
});
|
|
4310
|
-
const labelClasses = (0,
|
|
4311
|
-
const errorMessageId = (0,
|
|
4312
|
-
const defaultNameAttrId = (0,
|
|
4398
|
+
const labelClasses = (0, import_dedupe41.default)(radioClasses, validationClasses);
|
|
4399
|
+
const errorMessageId = (0, import_react37.useId)();
|
|
4400
|
+
const defaultNameAttrId = (0, import_react37.useId)();
|
|
4313
4401
|
const nameAttribute = name || defaultNameAttrId;
|
|
4314
4402
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
4315
4403
|
const describedBy = spaceDelimitedList([
|
|
4316
4404
|
shouldErrorMessageShow,
|
|
4317
4405
|
props["aria-describedby"]
|
|
4318
4406
|
]);
|
|
4319
|
-
const labelId = (0,
|
|
4320
|
-
return /* @__PURE__ */ (0,
|
|
4407
|
+
const labelId = (0, import_react37.useId)();
|
|
4408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4321
4409
|
"div",
|
|
4322
4410
|
{
|
|
4323
4411
|
...rest,
|
|
@@ -4333,12 +4421,12 @@ var init_RadioGroup = __esm({
|
|
|
4333
4421
|
ref,
|
|
4334
4422
|
className: radioGroupClasses,
|
|
4335
4423
|
role: "radiogroup",
|
|
4336
|
-
children: /* @__PURE__ */ (0,
|
|
4337
|
-
label && /* @__PURE__ */ (0,
|
|
4338
|
-
/* @__PURE__ */ (0,
|
|
4339
|
-
if ((0,
|
|
4424
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Stack, { gap: "xs", children: [
|
|
4425
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Label, { htmlFor: name, id: labelId, className: labelClasses, children: label }),
|
|
4426
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: radioWrapperClasses, children: import_react37.Children.map(children, (child) => {
|
|
4427
|
+
if ((0, import_react37.isValidElement)(child)) {
|
|
4340
4428
|
const childValue = child.props.value;
|
|
4341
|
-
return (0,
|
|
4429
|
+
return (0, import_react37.cloneElement)(
|
|
4342
4430
|
child,
|
|
4343
4431
|
{
|
|
4344
4432
|
orientation: effectiveOrientation,
|
|
@@ -4356,7 +4444,7 @@ var init_RadioGroup = __esm({
|
|
|
4356
4444
|
}
|
|
4357
4445
|
return child;
|
|
4358
4446
|
}) }),
|
|
4359
|
-
/* @__PURE__ */ (0,
|
|
4447
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
4360
4448
|
] })
|
|
4361
4449
|
}
|
|
4362
4450
|
);
|
|
@@ -4375,47 +4463,47 @@ var init_Radio2 = __esm({
|
|
|
4375
4463
|
});
|
|
4376
4464
|
|
|
4377
4465
|
// src/components/Segment/SegmentGroup.tsx
|
|
4378
|
-
var
|
|
4466
|
+
var import_dedupe42, import_jsx_runtime53, SegmentGroup;
|
|
4379
4467
|
var init_SegmentGroup = __esm({
|
|
4380
4468
|
"src/components/Segment/SegmentGroup.tsx"() {
|
|
4381
4469
|
"use strict";
|
|
4382
|
-
|
|
4383
|
-
|
|
4470
|
+
import_dedupe42 = __toESM(require("classnames/dedupe"));
|
|
4471
|
+
import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4384
4472
|
SegmentGroup = (props) => {
|
|
4385
4473
|
const { children, horizontal, gap, className, ...rest } = props;
|
|
4386
4474
|
const gapClass = gap ? `gap-${gap}` : "";
|
|
4387
|
-
const classes = (0,
|
|
4475
|
+
const classes = (0, import_dedupe42.default)(
|
|
4388
4476
|
"mobius",
|
|
4389
4477
|
"mobius-segment-group",
|
|
4390
4478
|
className,
|
|
4391
4479
|
{ "--is-horizontal": horizontal },
|
|
4392
4480
|
gapClass
|
|
4393
4481
|
);
|
|
4394
|
-
return /* @__PURE__ */ (0,
|
|
4482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: classes, ...rest, children });
|
|
4395
4483
|
};
|
|
4396
4484
|
SegmentGroup.displayName = "SegmentGroup";
|
|
4397
4485
|
}
|
|
4398
4486
|
});
|
|
4399
4487
|
|
|
4400
4488
|
// src/components/Segment/Segment.tsx
|
|
4401
|
-
var
|
|
4489
|
+
var import_dedupe43, import_Segment, import_jsx_runtime54, Segment;
|
|
4402
4490
|
var init_Segment = __esm({
|
|
4403
4491
|
"src/components/Segment/Segment.tsx"() {
|
|
4404
4492
|
"use strict";
|
|
4405
|
-
|
|
4493
|
+
import_dedupe43 = __toESM(require("classnames/dedupe"));
|
|
4406
4494
|
import_Segment = require("@simplybusiness/mobius/src/components/Segment/Segment.css");
|
|
4407
|
-
|
|
4495
|
+
import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4408
4496
|
Segment = (props) => {
|
|
4409
4497
|
const { heading, children, colour, inverted, className, ...rest } = props;
|
|
4410
|
-
const classes = (0,
|
|
4498
|
+
const classes = (0, import_dedupe43.default)(
|
|
4411
4499
|
"mobius",
|
|
4412
4500
|
"mobius-segment",
|
|
4413
4501
|
colour,
|
|
4414
4502
|
{ inverted },
|
|
4415
4503
|
className
|
|
4416
4504
|
);
|
|
4417
|
-
return /* @__PURE__ */ (0,
|
|
4418
|
-
heading && /* @__PURE__ */ (0,
|
|
4505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: classes, ...rest, children: [
|
|
4506
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "mobius-segment__heading", children: heading }),
|
|
4419
4507
|
children
|
|
4420
4508
|
] });
|
|
4421
4509
|
};
|
|
@@ -4433,14 +4521,14 @@ var init_Segment2 = __esm({
|
|
|
4433
4521
|
});
|
|
4434
4522
|
|
|
4435
4523
|
// src/components/Select/Select.tsx
|
|
4436
|
-
var import_icons12,
|
|
4524
|
+
var import_icons12, import_dedupe44, import_react38, import_Select, import_jsx_runtime55, Select;
|
|
4437
4525
|
var init_Select = __esm({
|
|
4438
4526
|
"src/components/Select/Select.tsx"() {
|
|
4439
4527
|
"use strict";
|
|
4440
4528
|
"use client";
|
|
4441
4529
|
import_icons12 = require("@simplybusiness/icons");
|
|
4442
|
-
|
|
4443
|
-
|
|
4530
|
+
import_dedupe44 = __toESM(require("classnames/dedupe"));
|
|
4531
|
+
import_react38 = require("react");
|
|
4444
4532
|
init_hooks();
|
|
4445
4533
|
init_useLabel2();
|
|
4446
4534
|
init_spaceDelimitedList();
|
|
@@ -4449,7 +4537,7 @@ var init_Select = __esm({
|
|
|
4449
4537
|
init_Label2();
|
|
4450
4538
|
init_Stack2();
|
|
4451
4539
|
import_Select = require("@simplybusiness/mobius/src/components/Select/Select.css");
|
|
4452
|
-
|
|
4540
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4453
4541
|
Select = ({ ref, ...props }) => {
|
|
4454
4542
|
const {
|
|
4455
4543
|
label,
|
|
@@ -4470,24 +4558,24 @@ var init_Select = __esm({
|
|
|
4470
4558
|
"--is-required": typeof isRequired === "boolean" && isRequired,
|
|
4471
4559
|
"--is-optional": typeof isRequired === "boolean" && !isRequired
|
|
4472
4560
|
};
|
|
4473
|
-
const sharedClasses = (0,
|
|
4474
|
-
const wrapperClasses = (0,
|
|
4561
|
+
const sharedClasses = (0, import_dedupe44.default)(validationClasses, stateClasses);
|
|
4562
|
+
const wrapperClasses = (0, import_dedupe44.default)(
|
|
4475
4563
|
"mobius-select__wrapper",
|
|
4476
4564
|
sharedClasses,
|
|
4477
4565
|
otherProps.className
|
|
4478
4566
|
);
|
|
4479
|
-
const selectClasses = (0,
|
|
4567
|
+
const selectClasses = (0, import_dedupe44.default)(
|
|
4480
4568
|
"mobius-select",
|
|
4481
4569
|
sharedClasses,
|
|
4482
4570
|
otherProps.className
|
|
4483
4571
|
);
|
|
4484
|
-
const labelClasses = (0,
|
|
4572
|
+
const labelClasses = (0, import_dedupe44.default)(
|
|
4485
4573
|
"mobius-label",
|
|
4486
4574
|
sharedClasses,
|
|
4487
4575
|
otherProps.className
|
|
4488
4576
|
);
|
|
4489
|
-
const iconClasses = (0,
|
|
4490
|
-
const errorMessageId = (0,
|
|
4577
|
+
const iconClasses = (0, import_dedupe44.default)("mobius-select__icon", sharedClasses);
|
|
4578
|
+
const errorMessageId = (0, import_react38.useId)();
|
|
4491
4579
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
4492
4580
|
const describedBy = spaceDelimitedList([
|
|
4493
4581
|
shouldErrorMessageShow,
|
|
@@ -4498,10 +4586,10 @@ var init_Select = __esm({
|
|
|
4498
4586
|
onChange(e);
|
|
4499
4587
|
}
|
|
4500
4588
|
};
|
|
4501
|
-
return /* @__PURE__ */ (0,
|
|
4502
|
-
label && /* @__PURE__ */ (0,
|
|
4503
|
-
/* @__PURE__ */ (0,
|
|
4504
|
-
/* @__PURE__ */ (0,
|
|
4589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Stack, { className: "mobius mobius-select__outer", gap: "xs", children: [
|
|
4590
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Label, { ...labelProps, className: labelClasses, children: label }),
|
|
4591
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: wrapperClasses, children: [
|
|
4592
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4505
4593
|
"select",
|
|
4506
4594
|
{
|
|
4507
4595
|
...otherProps,
|
|
@@ -4517,9 +4605,9 @@ var init_Select = __esm({
|
|
|
4517
4605
|
onChange: handleChange
|
|
4518
4606
|
}
|
|
4519
4607
|
),
|
|
4520
|
-
/* @__PURE__ */ (0,
|
|
4608
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon, { icon: import_icons12.chevronDown }) })
|
|
4521
4609
|
] }),
|
|
4522
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
4610
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
4523
4611
|
] });
|
|
4524
4612
|
};
|
|
4525
4613
|
Select.displayName = "Select";
|
|
@@ -4535,15 +4623,15 @@ var init_Select2 = __esm({
|
|
|
4535
4623
|
});
|
|
4536
4624
|
|
|
4537
4625
|
// src/components/Slider/Slider.tsx
|
|
4538
|
-
var
|
|
4626
|
+
var import_dedupe45, import_react39, import_Slider, import_jsx_runtime56;
|
|
4539
4627
|
var init_Slider = __esm({
|
|
4540
4628
|
"src/components/Slider/Slider.tsx"() {
|
|
4541
4629
|
"use strict";
|
|
4542
4630
|
"use client";
|
|
4543
|
-
|
|
4544
|
-
|
|
4631
|
+
import_dedupe45 = __toESM(require("classnames/dedupe"));
|
|
4632
|
+
import_react39 = require("react");
|
|
4545
4633
|
import_Slider = require("@simplybusiness/mobius/src/components/Slider/Slider.css");
|
|
4546
|
-
|
|
4634
|
+
import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4547
4635
|
}
|
|
4548
4636
|
});
|
|
4549
4637
|
|
|
@@ -4556,19 +4644,19 @@ var init_Slider2 = __esm({
|
|
|
4556
4644
|
});
|
|
4557
4645
|
|
|
4558
4646
|
// src/components/SVG/SVG.tsx
|
|
4559
|
-
var
|
|
4647
|
+
var import_react40, import_dedupe46, import_jsx_runtime57, SVG;
|
|
4560
4648
|
var init_SVG = __esm({
|
|
4561
4649
|
"src/components/SVG/SVG.tsx"() {
|
|
4562
4650
|
"use strict";
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4651
|
+
import_react40 = require("react");
|
|
4652
|
+
import_dedupe46 = __toESM(require("classnames/dedupe"));
|
|
4653
|
+
import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4566
4654
|
SVG = ({ ref, ...props }) => {
|
|
4567
4655
|
const { children, className, ...otherProps } = props;
|
|
4568
|
-
const classes = (0,
|
|
4569
|
-
const svgNode =
|
|
4656
|
+
const classes = (0, import_dedupe46.default)("mobius", "mobius-svg", className);
|
|
4657
|
+
const svgNode = import_react40.Children.only(children);
|
|
4570
4658
|
const { children: svgChildren, viewBox, xmlns } = svgNode.props;
|
|
4571
|
-
return /* @__PURE__ */ (0,
|
|
4659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4572
4660
|
"svg",
|
|
4573
4661
|
{
|
|
4574
4662
|
viewBox,
|
|
@@ -4593,16 +4681,16 @@ var init_SVG2 = __esm({
|
|
|
4593
4681
|
});
|
|
4594
4682
|
|
|
4595
4683
|
// src/components/Switch/Switch.tsx
|
|
4596
|
-
var
|
|
4684
|
+
var import_react41, import_dedupe47, import_Switch, import_jsx_runtime58, Switch;
|
|
4597
4685
|
var init_Switch = __esm({
|
|
4598
4686
|
"src/components/Switch/Switch.tsx"() {
|
|
4599
4687
|
"use strict";
|
|
4600
4688
|
"use client";
|
|
4601
|
-
|
|
4602
|
-
|
|
4689
|
+
import_react41 = require("react");
|
|
4690
|
+
import_dedupe47 = __toESM(require("classnames/dedupe"));
|
|
4603
4691
|
init_VisuallyHidden2();
|
|
4604
4692
|
import_Switch = require("@simplybusiness/mobius/src/components/Switch/Switch.css");
|
|
4605
|
-
|
|
4693
|
+
import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4606
4694
|
Switch = ({ ref, ...props }) => {
|
|
4607
4695
|
const {
|
|
4608
4696
|
checked = false,
|
|
@@ -4611,11 +4699,11 @@ var init_Switch = __esm({
|
|
|
4611
4699
|
isDisabled = false,
|
|
4612
4700
|
...otherProps
|
|
4613
4701
|
} = props;
|
|
4614
|
-
const [enabled, setEnabled] = (0,
|
|
4615
|
-
(0,
|
|
4702
|
+
const [enabled, setEnabled] = (0, import_react41.useState)(checked);
|
|
4703
|
+
(0, import_react41.useEffect)(() => {
|
|
4616
4704
|
setEnabled(checked);
|
|
4617
4705
|
}, [checked]);
|
|
4618
|
-
const classes = (0,
|
|
4706
|
+
const classes = (0, import_dedupe47.default)(
|
|
4619
4707
|
"mobius",
|
|
4620
4708
|
"mobius-switch",
|
|
4621
4709
|
{
|
|
@@ -4630,9 +4718,9 @@ var init_Switch = __esm({
|
|
|
4630
4718
|
onChange(event);
|
|
4631
4719
|
}
|
|
4632
4720
|
};
|
|
4633
|
-
return /* @__PURE__ */ (0,
|
|
4634
|
-
/* @__PURE__ */ (0,
|
|
4635
|
-
/* @__PURE__ */ (0,
|
|
4721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("label", { ref, className: classes, children: [
|
|
4722
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { children: enabled ? "On" : "Off" }) }),
|
|
4723
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4636
4724
|
"input",
|
|
4637
4725
|
{
|
|
4638
4726
|
type: "checkbox",
|
|
@@ -4643,7 +4731,7 @@ var init_Switch = __esm({
|
|
|
4643
4731
|
...otherProps
|
|
4644
4732
|
}
|
|
4645
4733
|
),
|
|
4646
|
-
/* @__PURE__ */ (0,
|
|
4734
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "mobius-switch__slider" })
|
|
4647
4735
|
] });
|
|
4648
4736
|
};
|
|
4649
4737
|
Switch.displayName = "Switch";
|
|
@@ -4659,114 +4747,114 @@ var init_Switch2 = __esm({
|
|
|
4659
4747
|
});
|
|
4660
4748
|
|
|
4661
4749
|
// src/components/Table/Table.tsx
|
|
4662
|
-
var
|
|
4750
|
+
var import_dedupe48, import_Table, import_jsx_runtime59, Table;
|
|
4663
4751
|
var init_Table = __esm({
|
|
4664
4752
|
"src/components/Table/Table.tsx"() {
|
|
4665
4753
|
"use strict";
|
|
4666
|
-
|
|
4754
|
+
import_dedupe48 = __toESM(require("classnames/dedupe"));
|
|
4667
4755
|
import_Table = require("@simplybusiness/mobius/src/components/Table/Table.css");
|
|
4668
|
-
|
|
4756
|
+
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4669
4757
|
Table = ({ ref, ...props }) => {
|
|
4670
|
-
const classes = (0,
|
|
4671
|
-
return /* @__PURE__ */ (0,
|
|
4758
|
+
const classes = (0, import_dedupe48.default)("mobius", "mobius-table", props.className);
|
|
4759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("table", { ref, ...props, className: classes });
|
|
4672
4760
|
};
|
|
4673
4761
|
Table.displayName = "Table";
|
|
4674
4762
|
}
|
|
4675
4763
|
});
|
|
4676
4764
|
|
|
4677
4765
|
// src/components/Table/Head.tsx
|
|
4678
|
-
var
|
|
4766
|
+
var import_dedupe49, import_jsx_runtime60, Head;
|
|
4679
4767
|
var init_Head = __esm({
|
|
4680
4768
|
"src/components/Table/Head.tsx"() {
|
|
4681
4769
|
"use strict";
|
|
4682
|
-
|
|
4683
|
-
|
|
4770
|
+
import_dedupe49 = __toESM(require("classnames/dedupe"));
|
|
4771
|
+
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4684
4772
|
Head = ({ ref, ...props }) => {
|
|
4685
|
-
const classes = (0,
|
|
4686
|
-
return /* @__PURE__ */ (0,
|
|
4773
|
+
const classes = (0, import_dedupe49.default)("mobius", "mobius-table__head", props.className);
|
|
4774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("thead", { ref, ...props, className: classes });
|
|
4687
4775
|
};
|
|
4688
4776
|
Head.displayName = "Table.Head";
|
|
4689
4777
|
}
|
|
4690
4778
|
});
|
|
4691
4779
|
|
|
4692
4780
|
// src/components/Table/Body.tsx
|
|
4693
|
-
var
|
|
4781
|
+
var import_dedupe50, import_jsx_runtime61, Body;
|
|
4694
4782
|
var init_Body = __esm({
|
|
4695
4783
|
"src/components/Table/Body.tsx"() {
|
|
4696
4784
|
"use strict";
|
|
4697
|
-
|
|
4698
|
-
|
|
4785
|
+
import_dedupe50 = __toESM(require("classnames/dedupe"));
|
|
4786
|
+
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4699
4787
|
Body = ({ ref, ...props }) => {
|
|
4700
|
-
const classes = (0,
|
|
4701
|
-
return /* @__PURE__ */ (0,
|
|
4788
|
+
const classes = (0, import_dedupe50.default)("mobius", "mobius-table__body", props.className);
|
|
4789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tbody", { ref, ...props, className: classes });
|
|
4702
4790
|
};
|
|
4703
4791
|
Body.displayName = "Table.Body";
|
|
4704
4792
|
}
|
|
4705
4793
|
});
|
|
4706
4794
|
|
|
4707
4795
|
// src/components/Table/Foot.tsx
|
|
4708
|
-
var
|
|
4796
|
+
var import_dedupe51, import_jsx_runtime62, Foot;
|
|
4709
4797
|
var init_Foot = __esm({
|
|
4710
4798
|
"src/components/Table/Foot.tsx"() {
|
|
4711
4799
|
"use strict";
|
|
4712
|
-
|
|
4713
|
-
|
|
4800
|
+
import_dedupe51 = __toESM(require("classnames/dedupe"));
|
|
4801
|
+
import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4714
4802
|
Foot = ({ ref, ...props }) => {
|
|
4715
|
-
const classes = (0,
|
|
4716
|
-
return /* @__PURE__ */ (0,
|
|
4803
|
+
const classes = (0, import_dedupe51.default)("mobius", "mobius-table__foot", props.className);
|
|
4804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("tfoot", { ref, ...props, className: classes });
|
|
4717
4805
|
};
|
|
4718
4806
|
Foot.displayName = "Table.Foot";
|
|
4719
4807
|
}
|
|
4720
4808
|
});
|
|
4721
4809
|
|
|
4722
4810
|
// src/components/Table/Row.tsx
|
|
4723
|
-
var
|
|
4811
|
+
var import_dedupe52, import_jsx_runtime63, Row;
|
|
4724
4812
|
var init_Row = __esm({
|
|
4725
4813
|
"src/components/Table/Row.tsx"() {
|
|
4726
4814
|
"use strict";
|
|
4727
|
-
|
|
4728
|
-
|
|
4815
|
+
import_dedupe52 = __toESM(require("classnames/dedupe"));
|
|
4816
|
+
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4729
4817
|
Row = ({ ref, ...props }) => {
|
|
4730
|
-
const classes = (0,
|
|
4731
|
-
return /* @__PURE__ */ (0,
|
|
4818
|
+
const classes = (0, import_dedupe52.default)("mobius", "mobius-table__row", props.className);
|
|
4819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("tr", { ref, ...props, className: classes });
|
|
4732
4820
|
};
|
|
4733
4821
|
Row.displayName = "Table.Row";
|
|
4734
4822
|
}
|
|
4735
4823
|
});
|
|
4736
4824
|
|
|
4737
4825
|
// src/components/Table/HeaderCell.tsx
|
|
4738
|
-
var
|
|
4826
|
+
var import_dedupe53, import_jsx_runtime64, HeaderCell;
|
|
4739
4827
|
var init_HeaderCell = __esm({
|
|
4740
4828
|
"src/components/Table/HeaderCell.tsx"() {
|
|
4741
4829
|
"use strict";
|
|
4742
|
-
|
|
4743
|
-
|
|
4830
|
+
import_dedupe53 = __toESM(require("classnames/dedupe"));
|
|
4831
|
+
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4744
4832
|
HeaderCell = ({ ref, ...props }) => {
|
|
4745
|
-
const classes = (0,
|
|
4833
|
+
const classes = (0, import_dedupe53.default)(
|
|
4746
4834
|
"mobius",
|
|
4747
4835
|
"mobius-table__head-cell",
|
|
4748
4836
|
props.className
|
|
4749
4837
|
);
|
|
4750
|
-
return /* @__PURE__ */ (0,
|
|
4838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("th", { ...props, ref, className: classes });
|
|
4751
4839
|
};
|
|
4752
4840
|
HeaderCell.displayName = "Table.HeaderCell";
|
|
4753
4841
|
}
|
|
4754
4842
|
});
|
|
4755
4843
|
|
|
4756
4844
|
// src/components/Table/Cell.tsx
|
|
4757
|
-
var
|
|
4845
|
+
var import_dedupe54, import_jsx_runtime65, Cell;
|
|
4758
4846
|
var init_Cell = __esm({
|
|
4759
4847
|
"src/components/Table/Cell.tsx"() {
|
|
4760
4848
|
"use strict";
|
|
4761
|
-
|
|
4762
|
-
|
|
4849
|
+
import_dedupe54 = __toESM(require("classnames/dedupe"));
|
|
4850
|
+
import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4763
4851
|
Cell = ({ ref, ...props }) => {
|
|
4764
|
-
const classes = (0,
|
|
4852
|
+
const classes = (0, import_dedupe54.default)(
|
|
4765
4853
|
"mobius",
|
|
4766
4854
|
"mobius-table__body-cell",
|
|
4767
4855
|
props.className
|
|
4768
4856
|
);
|
|
4769
|
-
return /* @__PURE__ */ (0,
|
|
4857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("td", { ref, ...props, className: classes });
|
|
4770
4858
|
};
|
|
4771
4859
|
Cell.displayName = "Table.Cell";
|
|
4772
4860
|
}
|
|
@@ -4796,37 +4884,6 @@ var init_Table2 = __esm({
|
|
|
4796
4884
|
}
|
|
4797
4885
|
});
|
|
4798
4886
|
|
|
4799
|
-
// src/components/Text/Text.tsx
|
|
4800
|
-
var import_dedupe54, import_Text, import_jsx_runtime64, getElementType, Text;
|
|
4801
|
-
var init_Text = __esm({
|
|
4802
|
-
"src/components/Text/Text.tsx"() {
|
|
4803
|
-
"use strict";
|
|
4804
|
-
import_dedupe54 = __toESM(require("classnames/dedupe"));
|
|
4805
|
-
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
4806
|
-
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4807
|
-
getElementType = (variant, elementType) => {
|
|
4808
|
-
if (variant) {
|
|
4809
|
-
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
4810
|
-
}
|
|
4811
|
-
return elementType || "p";
|
|
4812
|
-
};
|
|
4813
|
-
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
4814
|
-
const { variant, className, spacing, ...otherProps } = props;
|
|
4815
|
-
const elementType = getElementType(variant, Component);
|
|
4816
|
-
const variantType = variant || elementType;
|
|
4817
|
-
const classes = (0, import_dedupe54.default)(
|
|
4818
|
-
"mobius",
|
|
4819
|
-
"mobius-text",
|
|
4820
|
-
{ [`--is-${variantType}`]: variantType },
|
|
4821
|
-
{ [`--has-line-height-${spacing}`]: spacing },
|
|
4822
|
-
className
|
|
4823
|
-
);
|
|
4824
|
-
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
4825
|
-
};
|
|
4826
|
-
Text.displayName = "Text";
|
|
4827
|
-
}
|
|
4828
|
-
});
|
|
4829
|
-
|
|
4830
4887
|
// src/components/Text/index.tsx
|
|
4831
4888
|
var init_Text2 = __esm({
|
|
4832
4889
|
"src/components/Text/index.tsx"() {
|
|
@@ -4836,12 +4893,12 @@ var init_Text2 = __esm({
|
|
|
4836
4893
|
});
|
|
4837
4894
|
|
|
4838
4895
|
// src/components/TextAreaInput/TextAreaInput.tsx
|
|
4839
|
-
var import_dedupe55,
|
|
4896
|
+
var import_dedupe55, import_jsx_runtime66, TextAreaInput;
|
|
4840
4897
|
var init_TextAreaInput = __esm({
|
|
4841
4898
|
"src/components/TextAreaInput/TextAreaInput.tsx"() {
|
|
4842
4899
|
"use strict";
|
|
4843
4900
|
import_dedupe55 = __toESM(require("classnames/dedupe"));
|
|
4844
|
-
|
|
4901
|
+
import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4845
4902
|
TextAreaInput = ({ ref, ...props }) => {
|
|
4846
4903
|
const { isSelected, isDisabled, isReadOnly, isRequired, ...otherProps } = props;
|
|
4847
4904
|
const classes = (0, import_dedupe55.default)(
|
|
@@ -4854,7 +4911,7 @@ var init_TextAreaInput = __esm({
|
|
|
4854
4911
|
},
|
|
4855
4912
|
otherProps.className
|
|
4856
4913
|
);
|
|
4857
|
-
return /* @__PURE__ */ (0,
|
|
4914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4858
4915
|
"textarea",
|
|
4859
4916
|
{
|
|
4860
4917
|
ref,
|
|
@@ -4878,7 +4935,7 @@ var init_TextAreaInput2 = __esm({
|
|
|
4878
4935
|
});
|
|
4879
4936
|
|
|
4880
4937
|
// src/components/TextArea/TextArea.tsx
|
|
4881
|
-
var import_dedupe56, import_TextArea,
|
|
4938
|
+
var import_dedupe56, import_TextArea, import_jsx_runtime67, TextArea;
|
|
4882
4939
|
var init_TextArea = __esm({
|
|
4883
4940
|
"src/components/TextArea/TextArea.tsx"() {
|
|
4884
4941
|
"use strict";
|
|
@@ -4890,7 +4947,7 @@ var init_TextArea = __esm({
|
|
|
4890
4947
|
init_Stack2();
|
|
4891
4948
|
init_TextAreaInput2();
|
|
4892
4949
|
import_TextArea = require("@simplybusiness/mobius/src/components/TextArea/TextArea.css");
|
|
4893
|
-
|
|
4950
|
+
import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4894
4951
|
TextArea = ({ ref, ...props }) => {
|
|
4895
4952
|
const {
|
|
4896
4953
|
isDisabled,
|
|
@@ -4910,9 +4967,9 @@ var init_TextArea = __esm({
|
|
|
4910
4967
|
},
|
|
4911
4968
|
validationClasses
|
|
4912
4969
|
);
|
|
4913
|
-
return /* @__PURE__ */ (0,
|
|
4914
|
-
label && /* @__PURE__ */ (0,
|
|
4915
|
-
/* @__PURE__ */ (0,
|
|
4970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Stack, { className: classes, gap: "xs", children: [
|
|
4971
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Label, { ...labelProps, className: labelClasses, children: props.label }),
|
|
4972
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
4916
4973
|
TextAreaInput,
|
|
4917
4974
|
{
|
|
4918
4975
|
...otherProps,
|
|
@@ -4923,7 +4980,7 @@ var init_TextArea = __esm({
|
|
|
4923
4980
|
"aria-invalid": errorMessage != null
|
|
4924
4981
|
}
|
|
4925
4982
|
),
|
|
4926
|
-
/* @__PURE__ */ (0,
|
|
4983
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ErrorMessage, { ...errorMessageProps, errorMessage })
|
|
4927
4984
|
] });
|
|
4928
4985
|
};
|
|
4929
4986
|
TextArea.displayName = "TextArea";
|
|
@@ -4938,53 +4995,6 @@ var init_TextArea2 = __esm({
|
|
|
4938
4995
|
}
|
|
4939
4996
|
});
|
|
4940
4997
|
|
|
4941
|
-
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
4942
|
-
var import_react41, import_jsx_runtime67, isHTML, TextOrHTML;
|
|
4943
|
-
var init_TextOrHTML = __esm({
|
|
4944
|
-
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
4945
|
-
"use strict";
|
|
4946
|
-
import_react41 = require("react");
|
|
4947
|
-
init_Text();
|
|
4948
|
-
import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4949
|
-
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
4950
|
-
TextOrHTML = ({
|
|
4951
|
-
ref,
|
|
4952
|
-
text,
|
|
4953
|
-
htmlClassName,
|
|
4954
|
-
htmlElementType,
|
|
4955
|
-
textWrapper = false,
|
|
4956
|
-
autoDetect = false,
|
|
4957
|
-
...textProps
|
|
4958
|
-
}) => {
|
|
4959
|
-
const textIsHTML = autoDetect && isHTML(text);
|
|
4960
|
-
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
4961
|
-
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
4962
|
-
const DangerousComponent = resolvedElementType;
|
|
4963
|
-
const dangerousHTML = (0, import_react41.useMemo)(() => ({ __html: text }), [text]);
|
|
4964
|
-
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
4965
|
-
DangerousComponent,
|
|
4966
|
-
{
|
|
4967
|
-
className: htmlClassName,
|
|
4968
|
-
dangerouslySetInnerHTML: dangerousHTML
|
|
4969
|
-
}
|
|
4970
|
-
);
|
|
4971
|
-
if (shouldWrapInText) {
|
|
4972
|
-
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
4973
|
-
}
|
|
4974
|
-
return dangerousElement;
|
|
4975
|
-
};
|
|
4976
|
-
TextOrHTML.displayName = "TextOrHTML";
|
|
4977
|
-
}
|
|
4978
|
-
});
|
|
4979
|
-
|
|
4980
|
-
// src/components/TextOrHTML/index.tsx
|
|
4981
|
-
var init_TextOrHTML2 = __esm({
|
|
4982
|
-
"src/components/TextOrHTML/index.tsx"() {
|
|
4983
|
-
"use strict";
|
|
4984
|
-
init_TextOrHTML();
|
|
4985
|
-
}
|
|
4986
|
-
});
|
|
4987
|
-
|
|
4988
4998
|
// src/components/Title/Title.tsx
|
|
4989
4999
|
var import_dedupe57, import_Title, import_jsx_runtime68, Title;
|
|
4990
5000
|
var init_Title = __esm({
|