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