@simplybusiness/mobius 10.1.0 → 10.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/components/AddressLookup/AddressLookup.js +536 -526
- package/dist/cjs/components/AddressLookup/AddressLookup.js.map +4 -4
- package/dist/cjs/components/AddressLookup/index.js +536 -526
- package/dist/cjs/components/AddressLookup/index.js.map +4 -4
- package/dist/cjs/components/Alert/Alert.js +79 -11
- package/dist/cjs/components/Alert/Alert.js.map +4 -4
- package/dist/cjs/components/Alert/index.js +79 -11
- package/dist/cjs/components/Alert/index.js.map +4 -4
- package/dist/cjs/components/Checkbox/Checkbox.js +502 -492
- package/dist/cjs/components/Checkbox/Checkbox.js.map +4 -4
- package/dist/cjs/components/Checkbox/CheckboxGroup.js +502 -492
- package/dist/cjs/components/Checkbox/CheckboxGroup.js.map +4 -4
- package/dist/cjs/components/Checkbox/index.js +481 -471
- package/dist/cjs/components/Checkbox/index.js.map +4 -4
- package/dist/cjs/components/Combobox/Combobox.js +536 -526
- package/dist/cjs/components/Combobox/Combobox.js.map +4 -4
- package/dist/cjs/components/Combobox/index.js +536 -526
- package/dist/cjs/components/Combobox/index.js.map +4 -4
- package/dist/cjs/components/DateField/DateField.js +523 -513
- package/dist/cjs/components/DateField/DateField.js.map +4 -4
- package/dist/cjs/components/DateField/index.js +523 -513
- package/dist/cjs/components/DateField/index.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js +523 -513
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js.map +4 -4
- package/dist/cjs/components/ErrorMessage/index.js +523 -513
- package/dist/cjs/components/ErrorMessage/index.js.map +4 -4
- package/dist/cjs/components/ExpandableText/ExpandableText.js +523 -513
- package/dist/cjs/components/ExpandableText/ExpandableText.js.map +4 -4
- package/dist/cjs/components/ExpandableText/index.js +523 -513
- package/dist/cjs/components/ExpandableText/index.js.map +4 -4
- package/dist/cjs/components/MaskedField/MaskedField.js +533 -523
- package/dist/cjs/components/MaskedField/MaskedField.js.map +4 -4
- package/dist/cjs/components/MaskedField/index.js +533 -523
- package/dist/cjs/components/MaskedField/index.js.map +4 -4
- package/dist/cjs/components/NumberField/NumberField.js +524 -514
- package/dist/cjs/components/NumberField/NumberField.js.map +4 -4
- package/dist/cjs/components/NumberField/index.js +524 -514
- package/dist/cjs/components/NumberField/index.js.map +4 -4
- package/dist/cjs/components/PasswordField/PasswordField.js +520 -510
- package/dist/cjs/components/PasswordField/PasswordField.js.map +4 -4
- package/dist/cjs/components/PasswordField/ShowHideButton.js +519 -509
- package/dist/cjs/components/PasswordField/ShowHideButton.js.map +4 -4
- package/dist/cjs/components/PasswordField/index.js +520 -510
- package/dist/cjs/components/PasswordField/index.js.map +4 -4
- package/dist/cjs/components/Radio/Radio.js +502 -492
- package/dist/cjs/components/Radio/Radio.js.map +4 -4
- package/dist/cjs/components/Radio/RadioGroup.js +501 -491
- package/dist/cjs/components/Radio/RadioGroup.js.map +4 -4
- package/dist/cjs/components/Radio/index.js +480 -470
- package/dist/cjs/components/Radio/index.js.map +4 -4
- package/dist/cjs/components/Select/Select.js +507 -497
- package/dist/cjs/components/Select/Select.js.map +4 -4
- package/dist/cjs/components/Select/index.js +507 -497
- package/dist/cjs/components/Select/index.js.map +4 -4
- package/dist/cjs/components/TextArea/TextArea.js +517 -507
- package/dist/cjs/components/TextArea/TextArea.js.map +4 -4
- package/dist/cjs/components/TextArea/index.js +517 -507
- package/dist/cjs/components/TextArea/index.js.map +4 -4
- package/dist/cjs/components/TextField/TextField.js +533 -523
- package/dist/cjs/components/TextField/TextField.js.map +4 -4
- package/dist/cjs/components/TextField/index.js +533 -523
- package/dist/cjs/components/TextField/index.js.map +4 -4
- package/dist/cjs/components/index.js +563 -553
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/index.js +563 -553
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/meta.json +1340 -1273
- package/dist/esm/{chunk-FTSJNY4J.js → chunk-N5WGQAHM.js} +14 -2
- package/dist/esm/chunk-N5WGQAHM.js.map +7 -0
- package/dist/esm/{chunk-C4BILMFX.js → chunk-PB2OICEB.js} +1 -1
- package/dist/esm/components/AddressLookup/AddressLookup.js +2 -2
- package/dist/esm/components/AddressLookup/index.js +2 -2
- package/dist/esm/components/Alert/Alert.js +4 -1
- package/dist/esm/components/Alert/index.js +4 -1
- package/dist/esm/components/Checkbox/Checkbox.js +2 -2
- package/dist/esm/components/Checkbox/CheckboxGroup.js +2 -2
- package/dist/esm/components/Checkbox/index.js +2 -2
- package/dist/esm/components/Combobox/Combobox.js +2 -2
- package/dist/esm/components/Combobox/index.js +2 -2
- package/dist/esm/components/DateField/DateField.js +2 -2
- package/dist/esm/components/DateField/index.js +2 -2
- package/dist/esm/components/ErrorMessage/ErrorMessage.js +2 -2
- package/dist/esm/components/ErrorMessage/index.js +2 -2
- package/dist/esm/components/ExpandableText/ExpandableText.js +2 -2
- package/dist/esm/components/ExpandableText/index.js +2 -2
- package/dist/esm/components/MaskedField/MaskedField.js +2 -2
- package/dist/esm/components/MaskedField/index.js +2 -2
- package/dist/esm/components/NumberField/NumberField.js +2 -2
- package/dist/esm/components/NumberField/index.js +2 -2
- package/dist/esm/components/PasswordField/PasswordField.js +2 -2
- package/dist/esm/components/PasswordField/ShowHideButton.js +2 -2
- package/dist/esm/components/PasswordField/index.js +2 -2
- package/dist/esm/components/Radio/Radio.js +2 -2
- package/dist/esm/components/Radio/RadioGroup.js +2 -2
- package/dist/esm/components/Radio/index.js +2 -2
- package/dist/esm/components/Select/Select.js +2 -2
- package/dist/esm/components/Select/index.js +2 -2
- package/dist/esm/components/TextArea/TextArea.js +2 -2
- package/dist/esm/components/TextArea/index.js +2 -2
- package/dist/esm/components/TextField/TextField.js +2 -2
- package/dist/esm/components/TextField/index.js +2 -2
- package/dist/esm/components/index.js +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/meta.json +160 -127
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/Alert/Alert.tsx +10 -1
- package/src/components/Button/Button.css +44 -14
- package/dist/esm/chunk-FTSJNY4J.js.map +0 -7
- /package/dist/esm/{chunk-C4BILMFX.js.map → chunk-PB2OICEB.js.map} +0 -0
|
@@ -1998,19 +1998,98 @@ var init_AddressLookup2 = __esm({
|
|
|
1998
1998
|
}
|
|
1999
1999
|
});
|
|
2000
2000
|
|
|
2001
|
+
// src/components/Text/Text.tsx
|
|
2002
|
+
var import_dedupe10, import_Text, import_jsx_runtime12, getElementType, Text;
|
|
2003
|
+
var init_Text = __esm({
|
|
2004
|
+
"src/components/Text/Text.tsx"() {
|
|
2005
|
+
"use strict";
|
|
2006
|
+
import_dedupe10 = __toESM(require("classnames/dedupe"));
|
|
2007
|
+
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
2008
|
+
import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2009
|
+
getElementType = (variant, elementType) => {
|
|
2010
|
+
if (variant) {
|
|
2011
|
+
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
2012
|
+
}
|
|
2013
|
+
return elementType || "p";
|
|
2014
|
+
};
|
|
2015
|
+
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
2016
|
+
const { variant, className, spacing, ...otherProps } = props;
|
|
2017
|
+
const elementType = getElementType(variant, Component);
|
|
2018
|
+
const variantType = variant || elementType;
|
|
2019
|
+
const classes = (0, import_dedupe10.default)(
|
|
2020
|
+
"mobius",
|
|
2021
|
+
"mobius-text",
|
|
2022
|
+
{ [`--is-${variantType}`]: variantType },
|
|
2023
|
+
{ [`--has-line-height-${spacing}`]: spacing },
|
|
2024
|
+
className
|
|
2025
|
+
);
|
|
2026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
2027
|
+
};
|
|
2028
|
+
Text.displayName = "Text";
|
|
2029
|
+
}
|
|
2030
|
+
});
|
|
2031
|
+
|
|
2032
|
+
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
2033
|
+
var import_react14, import_jsx_runtime13, isHTML, TextOrHTML;
|
|
2034
|
+
var init_TextOrHTML = __esm({
|
|
2035
|
+
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
2036
|
+
"use strict";
|
|
2037
|
+
import_react14 = require("react");
|
|
2038
|
+
init_Text();
|
|
2039
|
+
import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2040
|
+
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
2041
|
+
TextOrHTML = ({
|
|
2042
|
+
ref,
|
|
2043
|
+
text,
|
|
2044
|
+
htmlClassName,
|
|
2045
|
+
htmlElementType,
|
|
2046
|
+
textWrapper = false,
|
|
2047
|
+
autoDetect = false,
|
|
2048
|
+
...textProps
|
|
2049
|
+
}) => {
|
|
2050
|
+
const textIsHTML = autoDetect && isHTML(text);
|
|
2051
|
+
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
2052
|
+
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
2053
|
+
const DangerousComponent = resolvedElementType;
|
|
2054
|
+
const dangerousHTML = (0, import_react14.useMemo)(() => ({ __html: text }), [text]);
|
|
2055
|
+
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2056
|
+
DangerousComponent,
|
|
2057
|
+
{
|
|
2058
|
+
className: htmlClassName,
|
|
2059
|
+
dangerouslySetInnerHTML: dangerousHTML
|
|
2060
|
+
}
|
|
2061
|
+
);
|
|
2062
|
+
if (shouldWrapInText) {
|
|
2063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
2064
|
+
}
|
|
2065
|
+
return dangerousElement;
|
|
2066
|
+
};
|
|
2067
|
+
TextOrHTML.displayName = "TextOrHTML";
|
|
2068
|
+
}
|
|
2069
|
+
});
|
|
2070
|
+
|
|
2071
|
+
// src/components/TextOrHTML/index.tsx
|
|
2072
|
+
var init_TextOrHTML2 = __esm({
|
|
2073
|
+
"src/components/TextOrHTML/index.tsx"() {
|
|
2074
|
+
"use strict";
|
|
2075
|
+
init_TextOrHTML();
|
|
2076
|
+
}
|
|
2077
|
+
});
|
|
2078
|
+
|
|
2001
2079
|
// src/components/Alert/Alert.tsx
|
|
2002
2080
|
function isAlertVariant(value) {
|
|
2003
2081
|
return value === "info" || value === "success" || value === "warning" || value === "error";
|
|
2004
2082
|
}
|
|
2005
|
-
var import_icons3,
|
|
2083
|
+
var import_icons3, import_dedupe11, import_Alert, import_jsx_runtime14, Alert;
|
|
2006
2084
|
var init_Alert = __esm({
|
|
2007
2085
|
"src/components/Alert/Alert.tsx"() {
|
|
2008
2086
|
"use strict";
|
|
2009
2087
|
import_icons3 = require("@simplybusiness/icons");
|
|
2010
|
-
|
|
2088
|
+
import_dedupe11 = __toESM(require("classnames/dedupe"));
|
|
2011
2089
|
init_Icon2();
|
|
2090
|
+
init_TextOrHTML2();
|
|
2012
2091
|
import_Alert = require("@simplybusiness/mobius/src/components/Alert/Alert.css");
|
|
2013
|
-
|
|
2092
|
+
import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2014
2093
|
Alert = ({ ref, ...props }) => {
|
|
2015
2094
|
const {
|
|
2016
2095
|
elementType: Element = "div",
|
|
@@ -2023,7 +2102,7 @@ var init_Alert = __esm({
|
|
|
2023
2102
|
if (!show) return null;
|
|
2024
2103
|
const variant = variantProp && isAlertVariant(variantProp) ? variantProp : "info";
|
|
2025
2104
|
const colorValue = variant === "success" ? `var(--color-valid)` : `var(--color-${variant})`;
|
|
2026
|
-
const classes = (0,
|
|
2105
|
+
const classes = (0, import_dedupe11.default)(
|
|
2027
2106
|
"mobius",
|
|
2028
2107
|
"mobius-alert",
|
|
2029
2108
|
{
|
|
@@ -2041,14 +2120,23 @@ var init_Alert = __esm({
|
|
|
2041
2120
|
warning: import_icons3.warning,
|
|
2042
2121
|
error: import_icons3.error
|
|
2043
2122
|
};
|
|
2044
|
-
const headerClasses = (0,
|
|
2045
|
-
const iconClasses = (0,
|
|
2046
|
-
const contentClasses = (0,
|
|
2047
|
-
return /* @__PURE__ */ (0,
|
|
2048
|
-
/* @__PURE__ */ (0,
|
|
2049
|
-
/* @__PURE__ */ (0,
|
|
2050
|
-
header && /* @__PURE__ */ (0,
|
|
2051
|
-
|
|
2123
|
+
const headerClasses = (0, import_dedupe11.default)("mobius", "mobius-alert__header");
|
|
2124
|
+
const iconClasses = (0, import_dedupe11.default)("mobius", "mobius-alert__icon");
|
|
2125
|
+
const contentClasses = (0, import_dedupe11.default)("mobius", "mobius-alert__content");
|
|
2126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Element, { ref, role: "alert", ...otherProps, className: classes, children: [
|
|
2127
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { icon: icon[variant], color: colorValue }) }),
|
|
2128
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
|
|
2129
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2130
|
+
TextOrHTML,
|
|
2131
|
+
{
|
|
2132
|
+
autoDetect: true,
|
|
2133
|
+
htmlElementType: "span",
|
|
2134
|
+
className: headerClasses,
|
|
2135
|
+
htmlClassName: headerClasses,
|
|
2136
|
+
text: header
|
|
2137
|
+
}
|
|
2138
|
+
),
|
|
2139
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: contentClasses, children })
|
|
2052
2140
|
] })
|
|
2053
2141
|
] });
|
|
2054
2142
|
};
|
|
@@ -2065,14 +2153,14 @@ var init_Alert2 = __esm({
|
|
|
2065
2153
|
});
|
|
2066
2154
|
|
|
2067
2155
|
// src/components/Box/Box.tsx
|
|
2068
|
-
var
|
|
2156
|
+
var import_dedupe12, import_Box, import_jsx_runtime15, Box;
|
|
2069
2157
|
var init_Box = __esm({
|
|
2070
2158
|
"src/components/Box/Box.tsx"() {
|
|
2071
2159
|
"use strict";
|
|
2072
|
-
|
|
2160
|
+
import_dedupe12 = __toESM(require("classnames/dedupe"));
|
|
2073
2161
|
init_utils();
|
|
2074
2162
|
import_Box = require("@simplybusiness/mobius/src/components/Box/Box.css");
|
|
2075
|
-
|
|
2163
|
+
import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2076
2164
|
Box = ({ ref, ...props }) => {
|
|
2077
2165
|
const {
|
|
2078
2166
|
elementType: Element = "div",
|
|
@@ -2098,7 +2186,7 @@ var init_Box = __esm({
|
|
|
2098
2186
|
style,
|
|
2099
2187
|
...otherProps
|
|
2100
2188
|
} = props;
|
|
2101
|
-
const classes = (0,
|
|
2189
|
+
const classes = (0, import_dedupe12.default)("mobius", "mobius-box", otherProps.className);
|
|
2102
2190
|
const styleProps = filterUndefinedProps({
|
|
2103
2191
|
padding: getSpacingValue(padding),
|
|
2104
2192
|
paddingInline: getSpacingValue(paddingInline || paddingX),
|
|
@@ -2115,7 +2203,7 @@ var init_Box = __esm({
|
|
|
2115
2203
|
height,
|
|
2116
2204
|
...style
|
|
2117
2205
|
});
|
|
2118
|
-
return /* @__PURE__ */ (0,
|
|
2206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Element, { ref, style: styleProps, ...otherProps, className: classes });
|
|
2119
2207
|
};
|
|
2120
2208
|
Box.displayName = "Box";
|
|
2121
2209
|
}
|
|
@@ -2130,27 +2218,27 @@ var init_Box2 = __esm({
|
|
|
2130
2218
|
});
|
|
2131
2219
|
|
|
2132
2220
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
2133
|
-
var
|
|
2221
|
+
var import_react15, import_dedupe13, import_Breadcrumbs, import_jsx_runtime16, Breadcrumbs;
|
|
2134
2222
|
var init_Breadcrumbs = __esm({
|
|
2135
2223
|
"src/components/Breadcrumbs/Breadcrumbs.tsx"() {
|
|
2136
2224
|
"use strict";
|
|
2137
2225
|
"use client";
|
|
2138
|
-
|
|
2139
|
-
|
|
2226
|
+
import_react15 = require("react");
|
|
2227
|
+
import_dedupe13 = __toESM(require("classnames/dedupe"));
|
|
2140
2228
|
import_Breadcrumbs = require("@simplybusiness/mobius/src/components/Breadcrumbs/Breadcrumbs.css");
|
|
2141
|
-
|
|
2229
|
+
import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2142
2230
|
Breadcrumbs = ({ ref, ...props }) => {
|
|
2143
2231
|
const { "aria-label": ariaLabel = "Breadcrumbs" } = props;
|
|
2144
2232
|
const { navProps } = { navProps: { "aria-label": ariaLabel } };
|
|
2145
2233
|
const { children, ...otherProps } = props;
|
|
2146
|
-
const childArray =
|
|
2147
|
-
const classes = (0,
|
|
2234
|
+
const childArray = import_react15.Children.toArray(children);
|
|
2235
|
+
const classes = (0, import_dedupe13.default)(
|
|
2148
2236
|
"mobius",
|
|
2149
2237
|
"mobius-breadcrumb",
|
|
2150
2238
|
otherProps.className
|
|
2151
2239
|
);
|
|
2152
|
-
return /* @__PURE__ */ (0,
|
|
2153
|
-
(child, i) => (0,
|
|
2240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("nav", { ref, ...otherProps, ...navProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { children: childArray.map(
|
|
2241
|
+
(child, i) => (0, import_react15.cloneElement)(
|
|
2154
2242
|
child,
|
|
2155
2243
|
{
|
|
2156
2244
|
key: i,
|
|
@@ -2164,22 +2252,22 @@ var init_Breadcrumbs = __esm({
|
|
|
2164
2252
|
});
|
|
2165
2253
|
|
|
2166
2254
|
// src/components/Breadcrumbs/BreadcrumbItem.tsx
|
|
2167
|
-
var
|
|
2255
|
+
var import_react16, import_dedupe14, import_jsx_runtime17, BreadcrumbItem;
|
|
2168
2256
|
var init_BreadcrumbItem = __esm({
|
|
2169
2257
|
"src/components/Breadcrumbs/BreadcrumbItem.tsx"() {
|
|
2170
2258
|
"use strict";
|
|
2171
2259
|
"use client";
|
|
2172
|
-
|
|
2173
|
-
|
|
2260
|
+
import_react16 = require("react");
|
|
2261
|
+
import_dedupe14 = __toESM(require("classnames/dedupe"));
|
|
2174
2262
|
init_Box2();
|
|
2175
|
-
|
|
2263
|
+
import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2176
2264
|
BreadcrumbItem = ({ ref, ...props }) => {
|
|
2177
2265
|
const {
|
|
2178
2266
|
isDisabled = false,
|
|
2179
2267
|
isCurrent = false,
|
|
2180
2268
|
"aria-current": ariaCurrent = "page",
|
|
2181
2269
|
children,
|
|
2182
|
-
separator = /* @__PURE__ */ (0,
|
|
2270
|
+
separator = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box, { className: "mobius-breadcrumb__separator", "aria-hidden": "true", children: ">" }),
|
|
2183
2271
|
...otherProps
|
|
2184
2272
|
} = props;
|
|
2185
2273
|
const { itemProps } = {
|
|
@@ -2189,14 +2277,14 @@ var init_BreadcrumbItem = __esm({
|
|
|
2189
2277
|
...otherProps
|
|
2190
2278
|
}
|
|
2191
2279
|
};
|
|
2192
|
-
const classes = (0,
|
|
2280
|
+
const classes = (0, import_dedupe14.default)(
|
|
2193
2281
|
"mobius",
|
|
2194
2282
|
"mobius-breadcrumb__item",
|
|
2195
2283
|
props.className
|
|
2196
2284
|
);
|
|
2197
|
-
const child = typeof children === "string" ? /* @__PURE__ */ (0,
|
|
2198
|
-
return /* @__PURE__ */ (0,
|
|
2199
|
-
(0,
|
|
2285
|
+
const child = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { ...itemProps, children }) : import_react16.Children.only(children);
|
|
2286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: classes, children: [
|
|
2287
|
+
(0, import_react16.cloneElement)(child, {
|
|
2200
2288
|
...child.props,
|
|
2201
2289
|
...itemProps,
|
|
2202
2290
|
ref
|
|
@@ -2218,19 +2306,19 @@ var init_Breadcrumbs2 = __esm({
|
|
|
2218
2306
|
});
|
|
2219
2307
|
|
|
2220
2308
|
// src/components/Button/Loading.tsx
|
|
2221
|
-
var import_icons4,
|
|
2309
|
+
var import_icons4, import_jsx_runtime18, Loading;
|
|
2222
2310
|
var init_Loading = __esm({
|
|
2223
2311
|
"src/components/Button/Loading.tsx"() {
|
|
2224
2312
|
"use strict";
|
|
2225
2313
|
import_icons4 = require("@simplybusiness/icons");
|
|
2226
2314
|
init_Icon2();
|
|
2227
2315
|
init_VisuallyHidden2();
|
|
2228
|
-
|
|
2316
|
+
import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2229
2317
|
Loading = (props) => {
|
|
2230
2318
|
const { children } = props;
|
|
2231
|
-
return /* @__PURE__ */ (0,
|
|
2232
|
-
/* @__PURE__ */ (0,
|
|
2233
|
-
/* @__PURE__ */ (0,
|
|
2319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
2320
|
+
/* @__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" }) }),
|
|
2321
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(VisuallyHidden, { className: "mobius-button__loading-text", children: "Loading" }),
|
|
2234
2322
|
children
|
|
2235
2323
|
] });
|
|
2236
2324
|
};
|
|
@@ -2238,33 +2326,33 @@ var init_Loading = __esm({
|
|
|
2238
2326
|
});
|
|
2239
2327
|
|
|
2240
2328
|
// src/components/Button/Success.tsx
|
|
2241
|
-
var import_icons5,
|
|
2329
|
+
var import_icons5, import_jsx_runtime19, Success;
|
|
2242
2330
|
var init_Success = __esm({
|
|
2243
2331
|
"src/components/Button/Success.tsx"() {
|
|
2244
2332
|
"use strict";
|
|
2245
2333
|
import_icons5 = require("@simplybusiness/icons");
|
|
2246
2334
|
init_Icon2();
|
|
2247
2335
|
init_VisuallyHidden2();
|
|
2248
|
-
|
|
2249
|
-
Success = () => /* @__PURE__ */ (0,
|
|
2250
|
-
/* @__PURE__ */ (0,
|
|
2251
|
-
/* @__PURE__ */ (0,
|
|
2336
|
+
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2337
|
+
Success = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
2338
|
+
/* @__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" }) }),
|
|
2339
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(VisuallyHidden, { className: "mobius-button__success-text", children: "Success" })
|
|
2252
2340
|
] });
|
|
2253
2341
|
}
|
|
2254
2342
|
});
|
|
2255
2343
|
|
|
2256
2344
|
// src/components/Button/Button.tsx
|
|
2257
|
-
var
|
|
2345
|
+
var import_dedupe15, import_Button, import_jsx_runtime20, Button;
|
|
2258
2346
|
var init_Button = __esm({
|
|
2259
2347
|
"src/components/Button/Button.tsx"() {
|
|
2260
2348
|
"use strict";
|
|
2261
2349
|
"use client";
|
|
2262
|
-
|
|
2350
|
+
import_dedupe15 = __toESM(require("classnames/dedupe"));
|
|
2263
2351
|
init_Loading();
|
|
2264
2352
|
init_useButton2();
|
|
2265
2353
|
init_Success();
|
|
2266
2354
|
import_Button = require("@simplybusiness/mobius/src/components/Button/Button.css");
|
|
2267
|
-
|
|
2355
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2268
2356
|
Button = ({ ref, ...props }) => {
|
|
2269
2357
|
const {
|
|
2270
2358
|
children,
|
|
@@ -2279,7 +2367,7 @@ var init_Button = __esm({
|
|
|
2279
2367
|
...otherProps
|
|
2280
2368
|
} = props;
|
|
2281
2369
|
const { buttonProps } = useButton(props);
|
|
2282
|
-
otherProps.className = (0,
|
|
2370
|
+
otherProps.className = (0, import_dedupe15.default)(
|
|
2283
2371
|
"mobius",
|
|
2284
2372
|
"mobius-button",
|
|
2285
2373
|
`--variant-${variant}`,
|
|
@@ -2291,9 +2379,9 @@ var init_Button = __esm({
|
|
|
2291
2379
|
},
|
|
2292
2380
|
otherProps.className
|
|
2293
2381
|
);
|
|
2294
|
-
return /* @__PURE__ */ (0,
|
|
2295
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
2296
|
-
isSuccess && !isLoading && /* @__PURE__ */ (0,
|
|
2382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Component, { ref, ...buttonProps, ...otherProps, children: [
|
|
2383
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Loading, { children }) : children,
|
|
2384
|
+
isSuccess && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Success, {})
|
|
2297
2385
|
] });
|
|
2298
2386
|
};
|
|
2299
2387
|
Button.displayName = "Button";
|
|
@@ -2309,16 +2397,16 @@ var init_Button2 = __esm({
|
|
|
2309
2397
|
});
|
|
2310
2398
|
|
|
2311
2399
|
// src/components/Stack/Stack.tsx
|
|
2312
|
-
var
|
|
2400
|
+
var import_dedupe16, import_Stack, import_jsx_runtime21, Stack;
|
|
2313
2401
|
var init_Stack = __esm({
|
|
2314
2402
|
"src/components/Stack/Stack.tsx"() {
|
|
2315
2403
|
"use strict";
|
|
2316
|
-
|
|
2404
|
+
import_dedupe16 = __toESM(require("classnames/dedupe"));
|
|
2317
2405
|
import_Stack = require("@simplybusiness/mobius/src/components/Stack/Stack.css");
|
|
2318
|
-
|
|
2406
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2319
2407
|
Stack = ({ ref, ...props }) => {
|
|
2320
2408
|
const { elementType: Element = "div", gap, ...otherProps } = props;
|
|
2321
|
-
const classes = (0,
|
|
2409
|
+
const classes = (0, import_dedupe16.default)(
|
|
2322
2410
|
"mobius",
|
|
2323
2411
|
"mobius-stack",
|
|
2324
2412
|
{
|
|
@@ -2326,7 +2414,7 @@ var init_Stack = __esm({
|
|
|
2326
2414
|
},
|
|
2327
2415
|
otherProps.className
|
|
2328
2416
|
);
|
|
2329
|
-
return /* @__PURE__ */ (0,
|
|
2417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
2330
2418
|
};
|
|
2331
2419
|
Stack.displayName = "Stack";
|
|
2332
2420
|
}
|
|
@@ -2341,13 +2429,13 @@ var init_Stack2 = __esm({
|
|
|
2341
2429
|
});
|
|
2342
2430
|
|
|
2343
2431
|
// src/components/Checkbox/Checkbox.tsx
|
|
2344
|
-
var
|
|
2432
|
+
var import_react17, import_dedupe17, import_icons6, import_Checkbox, import_jsx_runtime22, Checkbox;
|
|
2345
2433
|
var init_Checkbox = __esm({
|
|
2346
2434
|
"src/components/Checkbox/Checkbox.tsx"() {
|
|
2347
2435
|
"use strict";
|
|
2348
2436
|
"use client";
|
|
2349
|
-
|
|
2350
|
-
|
|
2437
|
+
import_react17 = require("react");
|
|
2438
|
+
import_dedupe17 = __toESM(require("classnames/dedupe"));
|
|
2351
2439
|
import_icons6 = require("@simplybusiness/icons");
|
|
2352
2440
|
init_ErrorMessage2();
|
|
2353
2441
|
init_spaceDelimitedList();
|
|
@@ -2355,7 +2443,7 @@ var init_Checkbox = __esm({
|
|
|
2355
2443
|
init_Icon2();
|
|
2356
2444
|
init_Stack2();
|
|
2357
2445
|
import_Checkbox = require("@simplybusiness/mobius/src/components/Checkbox/Checkbox.css");
|
|
2358
|
-
|
|
2446
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2359
2447
|
Checkbox = ({ ref, ...props }) => {
|
|
2360
2448
|
const {
|
|
2361
2449
|
id,
|
|
@@ -2375,18 +2463,18 @@ var init_Checkbox = __esm({
|
|
|
2375
2463
|
["aria-describedby"]: ariaDescribedBy,
|
|
2376
2464
|
...rest
|
|
2377
2465
|
} = props;
|
|
2378
|
-
const [checked, setChecked] = (0,
|
|
2379
|
-
const fallbackRef = (0,
|
|
2466
|
+
const [checked, setChecked] = (0, import_react17.useState)(defaultSelected);
|
|
2467
|
+
const fallbackRef = (0, import_react17.useRef)(null);
|
|
2380
2468
|
const refObj = ref || fallbackRef;
|
|
2381
|
-
const inputId = (0,
|
|
2469
|
+
const inputId = (0, import_react17.useId)();
|
|
2382
2470
|
const isControlled = typeof selected === "boolean";
|
|
2383
|
-
(0,
|
|
2471
|
+
(0, import_react17.useEffect)(() => {
|
|
2384
2472
|
if (isControlled) {
|
|
2385
2473
|
setChecked(selected);
|
|
2386
2474
|
}
|
|
2387
2475
|
}, [selected, isControlled]);
|
|
2388
2476
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
2389
|
-
const sharedClasses = (0,
|
|
2477
|
+
const sharedClasses = (0, import_dedupe17.default)(
|
|
2390
2478
|
{
|
|
2391
2479
|
"--is-disabled": isDisabled,
|
|
2392
2480
|
"--is-selected": checked,
|
|
@@ -2395,31 +2483,31 @@ var init_Checkbox = __esm({
|
|
|
2395
2483
|
},
|
|
2396
2484
|
validationClasses
|
|
2397
2485
|
);
|
|
2398
|
-
const wrapperClasses = (0,
|
|
2486
|
+
const wrapperClasses = (0, import_dedupe17.default)(
|
|
2399
2487
|
"mobius",
|
|
2400
2488
|
"mobius-checkbox",
|
|
2401
2489
|
sharedClasses,
|
|
2402
2490
|
className
|
|
2403
2491
|
);
|
|
2404
|
-
const labelClasses = (0,
|
|
2405
|
-
const inputClasses = (0,
|
|
2406
|
-
const iconClasses = (0,
|
|
2407
|
-
const errorMessageId = (0,
|
|
2492
|
+
const labelClasses = (0, import_dedupe17.default)("mobius-checkbox__label", sharedClasses);
|
|
2493
|
+
const inputClasses = (0, import_dedupe17.default)("mobius-checkbox__input", sharedClasses);
|
|
2494
|
+
const iconClasses = (0, import_dedupe17.default)("mobius-checkbox__icon", sharedClasses);
|
|
2495
|
+
const errorMessageId = (0, import_react17.useId)();
|
|
2408
2496
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
2409
2497
|
const describedBy = spaceDelimitedList([
|
|
2410
2498
|
shouldErrorMessageShow,
|
|
2411
2499
|
ariaDescribedBy
|
|
2412
2500
|
]);
|
|
2413
|
-
const labelId = (0,
|
|
2501
|
+
const labelId = (0, import_react17.useId)();
|
|
2414
2502
|
const handleChange = (event) => {
|
|
2415
2503
|
setChecked(!checked);
|
|
2416
2504
|
if (onChange) {
|
|
2417
2505
|
onChange(event, isLastItem);
|
|
2418
2506
|
}
|
|
2419
2507
|
};
|
|
2420
|
-
return /* @__PURE__ */ (0,
|
|
2421
|
-
/* @__PURE__ */ (0,
|
|
2422
|
-
/* @__PURE__ */ (0,
|
|
2508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Stack, { gap: "xs", className: wrapperClasses, children: [
|
|
2509
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: labelClasses, children: [
|
|
2510
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2423
2511
|
"input",
|
|
2424
2512
|
{
|
|
2425
2513
|
"aria-describedby": describedBy,
|
|
@@ -2440,7 +2528,7 @@ var init_Checkbox = __esm({
|
|
|
2440
2528
|
...rest
|
|
2441
2529
|
}
|
|
2442
2530
|
),
|
|
2443
|
-
/* @__PURE__ */ (0,
|
|
2531
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2444
2532
|
Icon,
|
|
2445
2533
|
{
|
|
2446
2534
|
icon: checked ? import_icons6.squareTick : import_icons6.square,
|
|
@@ -2448,9 +2536,9 @@ var init_Checkbox = __esm({
|
|
|
2448
2536
|
className: iconClasses
|
|
2449
2537
|
}
|
|
2450
2538
|
),
|
|
2451
|
-
/* @__PURE__ */ (0,
|
|
2539
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { id: labelId, className: "mobius-checkbox__visible-label", children: label })
|
|
2452
2540
|
] }),
|
|
2453
|
-
/* @__PURE__ */ (0,
|
|
2541
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
2454
2542
|
] });
|
|
2455
2543
|
};
|
|
2456
2544
|
Checkbox.displayName = "Checkbox";
|
|
@@ -2458,18 +2546,18 @@ var init_Checkbox = __esm({
|
|
|
2458
2546
|
});
|
|
2459
2547
|
|
|
2460
2548
|
// src/components/Label/Label.tsx
|
|
2461
|
-
var
|
|
2549
|
+
var import_dedupe18, import_Label, import_jsx_runtime23, Label;
|
|
2462
2550
|
var init_Label = __esm({
|
|
2463
2551
|
"src/components/Label/Label.tsx"() {
|
|
2464
2552
|
"use strict";
|
|
2465
|
-
|
|
2553
|
+
import_dedupe18 = __toESM(require("classnames/dedupe"));
|
|
2466
2554
|
import_Label = require("@simplybusiness/mobius/src/components/Label/Label.css");
|
|
2467
|
-
|
|
2555
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2468
2556
|
Label = ({ ref, ...props }) => {
|
|
2469
2557
|
const { elementType: Element = "label", children, ...otherProps } = props;
|
|
2470
|
-
const classes = (0,
|
|
2558
|
+
const classes = (0, import_dedupe18.default)("mobius", "mobius-label", props.className);
|
|
2471
2559
|
otherProps.className = classes;
|
|
2472
|
-
return /* @__PURE__ */ (0,
|
|
2560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Element, { ref, ...otherProps, className: classes, children });
|
|
2473
2561
|
};
|
|
2474
2562
|
Label.displayName = "Label";
|
|
2475
2563
|
}
|
|
@@ -2484,20 +2572,20 @@ var init_Label2 = __esm({
|
|
|
2484
2572
|
});
|
|
2485
2573
|
|
|
2486
2574
|
// src/components/Checkbox/CheckboxGroup.tsx
|
|
2487
|
-
var
|
|
2575
|
+
var import_dedupe19, import_react18, import_CheckboxGroup, import_jsx_runtime24, CheckboxGroup;
|
|
2488
2576
|
var init_CheckboxGroup = __esm({
|
|
2489
2577
|
"src/components/Checkbox/CheckboxGroup.tsx"() {
|
|
2490
2578
|
"use strict";
|
|
2491
2579
|
"use client";
|
|
2492
|
-
|
|
2493
|
-
|
|
2580
|
+
import_dedupe19 = __toESM(require("classnames/dedupe"));
|
|
2581
|
+
import_react18 = require("react");
|
|
2494
2582
|
init_hooks();
|
|
2495
2583
|
init_spaceDelimitedList();
|
|
2496
2584
|
init_ErrorMessage2();
|
|
2497
2585
|
init_Label2();
|
|
2498
2586
|
init_Checkbox();
|
|
2499
2587
|
import_CheckboxGroup = require("@simplybusiness/mobius/src/components/Checkbox/CheckboxGroup.css");
|
|
2500
|
-
|
|
2588
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2501
2589
|
CheckboxGroup = ({ ref, ...props }) => {
|
|
2502
2590
|
const {
|
|
2503
2591
|
label,
|
|
@@ -2515,10 +2603,10 @@ var init_CheckboxGroup = __esm({
|
|
|
2515
2603
|
lastItemDisables = false,
|
|
2516
2604
|
...rest
|
|
2517
2605
|
} = props;
|
|
2518
|
-
const [selected, setSelected] = (0,
|
|
2519
|
-
const isInitializedRef = (0,
|
|
2520
|
-
const prevDefaultValueRef = (0,
|
|
2521
|
-
(0,
|
|
2606
|
+
const [selected, setSelected] = (0, import_react18.useState)(defaultValue);
|
|
2607
|
+
const isInitializedRef = (0, import_react18.useRef)(false);
|
|
2608
|
+
const prevDefaultValueRef = (0, import_react18.useRef)(defaultValue);
|
|
2609
|
+
(0, import_react18.useEffect)(() => {
|
|
2522
2610
|
const hasChanged = defaultValue.length !== prevDefaultValueRef.current.length || defaultValue.some(
|
|
2523
2611
|
(val, index) => val !== prevDefaultValueRef.current[index]
|
|
2524
2612
|
);
|
|
@@ -2528,7 +2616,7 @@ var init_CheckboxGroup = __esm({
|
|
|
2528
2616
|
isInitializedRef.current = true;
|
|
2529
2617
|
}
|
|
2530
2618
|
}, [defaultValue]);
|
|
2531
|
-
const checkboxGroupClasses = (0,
|
|
2619
|
+
const checkboxGroupClasses = (0, import_dedupe19.default)(
|
|
2532
2620
|
"mobius",
|
|
2533
2621
|
"mobius-checkbox-group",
|
|
2534
2622
|
className,
|
|
@@ -2540,19 +2628,19 @@ var init_CheckboxGroup = __esm({
|
|
|
2540
2628
|
}
|
|
2541
2629
|
);
|
|
2542
2630
|
const validationClasses = useValidationClasses({ isInvalid });
|
|
2543
|
-
const labelClasses = (0,
|
|
2631
|
+
const labelClasses = (0, import_dedupe19.default)(
|
|
2544
2632
|
{
|
|
2545
2633
|
"--is-disabled": isDisabled
|
|
2546
2634
|
},
|
|
2547
2635
|
validationClasses
|
|
2548
2636
|
);
|
|
2549
|
-
const errorMessageId = (0,
|
|
2637
|
+
const errorMessageId = (0, import_react18.useId)();
|
|
2550
2638
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
2551
2639
|
const describedBy = spaceDelimitedList([
|
|
2552
2640
|
shouldErrorMessageShow,
|
|
2553
2641
|
props["aria-describedby"]
|
|
2554
2642
|
]);
|
|
2555
|
-
const labelId = (0,
|
|
2643
|
+
const labelId = (0, import_react18.useId)();
|
|
2556
2644
|
const handleChange = (event, isLastItem = false) => {
|
|
2557
2645
|
const {
|
|
2558
2646
|
target: { value, checked }
|
|
@@ -2570,12 +2658,12 @@ var init_CheckboxGroup = __esm({
|
|
|
2570
2658
|
setSelected(newValue);
|
|
2571
2659
|
onChange?.(newValue);
|
|
2572
2660
|
};
|
|
2573
|
-
const childrenArray =
|
|
2661
|
+
const childrenArray = import_react18.Children.toArray(children);
|
|
2574
2662
|
const lastCheckbox = childrenArray.filter(
|
|
2575
|
-
(child) => (0,
|
|
2663
|
+
(child) => (0, import_react18.isValidElement)(child) && child.type === Checkbox
|
|
2576
2664
|
).pop();
|
|
2577
2665
|
const lastCheckboxIsChecked = lastCheckbox && selected.includes(lastCheckbox.props.value);
|
|
2578
|
-
return /* @__PURE__ */ (0,
|
|
2666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2579
2667
|
"div",
|
|
2580
2668
|
{
|
|
2581
2669
|
...rest,
|
|
@@ -2584,16 +2672,16 @@ var init_CheckboxGroup = __esm({
|
|
|
2584
2672
|
className: checkboxGroupClasses,
|
|
2585
2673
|
role: "group",
|
|
2586
2674
|
style: {
|
|
2587
|
-
"--checkbox-items-per-row": itemsPerRow ||
|
|
2675
|
+
"--checkbox-items-per-row": itemsPerRow || import_react18.Children.count(children)
|
|
2588
2676
|
},
|
|
2589
2677
|
children: [
|
|
2590
|
-
label && /* @__PURE__ */ (0,
|
|
2591
|
-
/* @__PURE__ */ (0,
|
|
2592
|
-
if ((0,
|
|
2678
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Label, { elementType: "span", id: labelId, className: labelClasses, children: label }),
|
|
2679
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mobius-checkbox-group__wrapper", children: childrenArray.map((child) => {
|
|
2680
|
+
if ((0, import_react18.isValidElement)(child)) {
|
|
2593
2681
|
const isLastItem = child === lastCheckbox;
|
|
2594
2682
|
const isChildDisabled = isDisabled || lastItemDisables && lastCheckboxIsChecked && !isLastItem;
|
|
2595
2683
|
const childProps = child.props;
|
|
2596
|
-
return (0,
|
|
2684
|
+
return (0, import_react18.cloneElement)(
|
|
2597
2685
|
child,
|
|
2598
2686
|
{
|
|
2599
2687
|
isDisabled: isChildDisabled,
|
|
@@ -2609,7 +2697,7 @@ var init_CheckboxGroup = __esm({
|
|
|
2609
2697
|
}
|
|
2610
2698
|
return child;
|
|
2611
2699
|
}) }),
|
|
2612
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2700
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
2613
2701
|
]
|
|
2614
2702
|
}
|
|
2615
2703
|
);
|
|
@@ -2636,23 +2724,23 @@ var init_Checkbox2 = __esm({
|
|
|
2636
2724
|
});
|
|
2637
2725
|
|
|
2638
2726
|
// src/components/Container/Container.tsx
|
|
2639
|
-
var
|
|
2727
|
+
var import_dedupe20, import_Container, import_jsx_runtime25, Container;
|
|
2640
2728
|
var init_Container = __esm({
|
|
2641
2729
|
"src/components/Container/Container.tsx"() {
|
|
2642
2730
|
"use strict";
|
|
2643
|
-
|
|
2731
|
+
import_dedupe20 = __toESM(require("classnames/dedupe"));
|
|
2644
2732
|
init_utils();
|
|
2645
2733
|
import_Container = require("@simplybusiness/mobius/src/components/Container/Container.css");
|
|
2646
|
-
|
|
2734
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2647
2735
|
Container = ({ ref, ...props }) => {
|
|
2648
2736
|
const { elementType: Element = "div", size = "md", ...otherProps } = props;
|
|
2649
|
-
const classes = (0,
|
|
2737
|
+
const classes = (0, import_dedupe20.default)(
|
|
2650
2738
|
"mobius",
|
|
2651
2739
|
"mobius-container",
|
|
2652
2740
|
sizeClasses(size),
|
|
2653
2741
|
otherProps.className
|
|
2654
2742
|
);
|
|
2655
|
-
return /* @__PURE__ */ (0,
|
|
2743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Element, { ref, ...otherProps, className: classes });
|
|
2656
2744
|
};
|
|
2657
2745
|
Container.displayName = "Container";
|
|
2658
2746
|
}
|
|
@@ -2705,17 +2793,17 @@ var init_validation = __esm({
|
|
|
2705
2793
|
});
|
|
2706
2794
|
|
|
2707
2795
|
// src/components/DateField/DateField.tsx
|
|
2708
|
-
var
|
|
2796
|
+
var import_dedupe21, import_react19, import_jsx_runtime26, MIN_MAX_ERROR, DateField;
|
|
2709
2797
|
var init_DateField = __esm({
|
|
2710
2798
|
"src/components/DateField/DateField.tsx"() {
|
|
2711
2799
|
"use strict";
|
|
2712
2800
|
"use client";
|
|
2713
|
-
|
|
2714
|
-
|
|
2801
|
+
import_dedupe21 = __toESM(require("classnames/dedupe"));
|
|
2802
|
+
import_react19 = require("react");
|
|
2715
2803
|
init_mergeRefs();
|
|
2716
2804
|
init_TextField2();
|
|
2717
2805
|
init_validation();
|
|
2718
|
-
|
|
2806
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2719
2807
|
MIN_MAX_ERROR = '"min" value should not be greater than "max" value.';
|
|
2720
2808
|
DateField = ({ ref, ...props }) => {
|
|
2721
2809
|
const {
|
|
@@ -2728,10 +2816,10 @@ var init_DateField = __esm({
|
|
|
2728
2816
|
value,
|
|
2729
2817
|
...otherProps
|
|
2730
2818
|
} = props;
|
|
2731
|
-
const [error3, setError] = (0,
|
|
2732
|
-
const [isInvalid, setIsInvalid] = (0,
|
|
2733
|
-
const localRef = (0,
|
|
2734
|
-
const classes = (0,
|
|
2819
|
+
const [error3, setError] = (0, import_react19.useState)(errorMessage);
|
|
2820
|
+
const [isInvalid, setIsInvalid] = (0, import_react19.useState)(void 0);
|
|
2821
|
+
const localRef = (0, import_react19.useRef)(null);
|
|
2822
|
+
const classes = (0, import_dedupe21.default)("mobius-date-field", className);
|
|
2735
2823
|
const formattedMin = min ? convertToDateFormat(min, format) : void 0;
|
|
2736
2824
|
const formattedMax = max ? convertToDateFormat(max, format) : void 0;
|
|
2737
2825
|
const formattedDefaultValue = defaultValue ? convertToDateFormat(defaultValue, format) : void 0;
|
|
@@ -2744,7 +2832,7 @@ var init_DateField = __esm({
|
|
|
2744
2832
|
setError(props.errorMessage);
|
|
2745
2833
|
setIsInvalid(false);
|
|
2746
2834
|
};
|
|
2747
|
-
(0,
|
|
2835
|
+
(0, import_react19.useEffect)(() => {
|
|
2748
2836
|
if (!isValidDate(min, format)) {
|
|
2749
2837
|
setInvalidState(`Invalid min date: ${min}`);
|
|
2750
2838
|
return;
|
|
@@ -2777,7 +2865,7 @@ var init_DateField = __esm({
|
|
|
2777
2865
|
validate();
|
|
2778
2866
|
otherProps.onBlur?.(event);
|
|
2779
2867
|
};
|
|
2780
|
-
return /* @__PURE__ */ (0,
|
|
2868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2781
2869
|
TextField,
|
|
2782
2870
|
{
|
|
2783
2871
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -2808,23 +2896,23 @@ var init_DateField2 = __esm({
|
|
|
2808
2896
|
});
|
|
2809
2897
|
|
|
2810
2898
|
// src/components/Drawer/Content.tsx
|
|
2811
|
-
var
|
|
2899
|
+
var import_jsx_runtime27, Content;
|
|
2812
2900
|
var init_Content = __esm({
|
|
2813
2901
|
"src/components/Drawer/Content.tsx"() {
|
|
2814
2902
|
"use strict";
|
|
2815
|
-
|
|
2816
|
-
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
2903
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2904
|
+
Content = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, ...otherProps, className: "mobius-drawer__content", children });
|
|
2817
2905
|
Content.displayName = "Content";
|
|
2818
2906
|
}
|
|
2819
2907
|
});
|
|
2820
2908
|
|
|
2821
2909
|
// src/components/Drawer/DrawerContext.tsx
|
|
2822
|
-
var
|
|
2910
|
+
var import_react20, DrawerContext;
|
|
2823
2911
|
var init_DrawerContext = __esm({
|
|
2824
2912
|
"src/components/Drawer/DrawerContext.tsx"() {
|
|
2825
2913
|
"use strict";
|
|
2826
|
-
|
|
2827
|
-
DrawerContext = (0,
|
|
2914
|
+
import_react20 = require("react");
|
|
2915
|
+
DrawerContext = (0, import_react20.createContext)({
|
|
2828
2916
|
onClose: () => {
|
|
2829
2917
|
},
|
|
2830
2918
|
closeLabel: void 0,
|
|
@@ -2834,19 +2922,19 @@ var init_DrawerContext = __esm({
|
|
|
2834
2922
|
});
|
|
2835
2923
|
|
|
2836
2924
|
// src/components/Drawer/Drawer.tsx
|
|
2837
|
-
var
|
|
2925
|
+
var import_dedupe22, import_react21, import_Drawer, import_jsx_runtime28, TRANSITION_CSS_VARIABLE, Drawer;
|
|
2838
2926
|
var init_Drawer = __esm({
|
|
2839
2927
|
"src/components/Drawer/Drawer.tsx"() {
|
|
2840
2928
|
"use strict";
|
|
2841
2929
|
"use client";
|
|
2842
|
-
|
|
2843
|
-
|
|
2930
|
+
import_dedupe22 = __toESM(require("classnames/dedupe"));
|
|
2931
|
+
import_react21 = require("react");
|
|
2844
2932
|
init_hooks();
|
|
2845
2933
|
init_utils();
|
|
2846
2934
|
init_VisuallyHidden2();
|
|
2847
2935
|
init_DrawerContext();
|
|
2848
2936
|
import_Drawer = require("@simplybusiness/mobius/src/components/Drawer/Drawer.css");
|
|
2849
|
-
|
|
2937
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2850
2938
|
TRANSITION_CSS_VARIABLE = "--drawer-transition-duration";
|
|
2851
2939
|
Drawer = ({ ref, ...props }) => {
|
|
2852
2940
|
const {
|
|
@@ -2859,8 +2947,8 @@ var init_Drawer = __esm({
|
|
|
2859
2947
|
onClose,
|
|
2860
2948
|
children
|
|
2861
2949
|
} = props;
|
|
2862
|
-
const dialogRef = (0,
|
|
2863
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
2950
|
+
const dialogRef = (0, import_react21.useRef)(null);
|
|
2951
|
+
const [shouldTransition, setShouldTransition] = (0, import_react21.useState)(false);
|
|
2864
2952
|
const { close } = useDialog({
|
|
2865
2953
|
ref: dialogRef,
|
|
2866
2954
|
isOpen,
|
|
@@ -2871,9 +2959,9 @@ var init_Drawer = __esm({
|
|
|
2871
2959
|
CSSVariable: TRANSITION_CSS_VARIABLE
|
|
2872
2960
|
}
|
|
2873
2961
|
});
|
|
2874
|
-
const hiddenId = `dialog-screen-reader-announce-${(0,
|
|
2875
|
-
const headerId = `dialog-header-${(0,
|
|
2876
|
-
const dialogClasses = (0,
|
|
2962
|
+
const hiddenId = `dialog-screen-reader-announce-${(0, import_react21.useId)()}`;
|
|
2963
|
+
const headerId = `dialog-header-${(0, import_react21.useId)()}`;
|
|
2964
|
+
const dialogClasses = (0, import_dedupe22.default)(
|
|
2877
2965
|
"mobius",
|
|
2878
2966
|
"mobius-drawer",
|
|
2879
2967
|
`--${direction}`,
|
|
@@ -2882,10 +2970,10 @@ var init_Drawer = __esm({
|
|
|
2882
2970
|
"--should-transition": shouldTransition
|
|
2883
2971
|
}
|
|
2884
2972
|
);
|
|
2885
|
-
(0,
|
|
2973
|
+
(0, import_react21.useEffect)(() => {
|
|
2886
2974
|
setShouldTransition(supportsDialog());
|
|
2887
2975
|
}, []);
|
|
2888
|
-
const contextValue = (0,
|
|
2976
|
+
const contextValue = (0, import_react21.useMemo)(
|
|
2889
2977
|
() => ({
|
|
2890
2978
|
onClose: close,
|
|
2891
2979
|
closeLabel,
|
|
@@ -2893,18 +2981,18 @@ var init_Drawer = __esm({
|
|
|
2893
2981
|
}),
|
|
2894
2982
|
[close, closeLabel, headerId]
|
|
2895
2983
|
);
|
|
2896
|
-
return /* @__PURE__ */ (0,
|
|
2984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2897
2985
|
"dialog",
|
|
2898
2986
|
{
|
|
2899
|
-
id: (0,
|
|
2987
|
+
id: (0, import_react21.useId)(),
|
|
2900
2988
|
ref: mergeRefs([dialogRef, ref]),
|
|
2901
2989
|
onCancel: close,
|
|
2902
2990
|
className: dialogClasses,
|
|
2903
2991
|
"aria-describedby": hiddenId,
|
|
2904
2992
|
"aria-labelledby": headerId,
|
|
2905
2993
|
children: [
|
|
2906
|
-
/* @__PURE__ */ (0,
|
|
2907
|
-
/* @__PURE__ */ (0,
|
|
2994
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { id: hiddenId, children: announce }) }),
|
|
2995
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DrawerContext.Provider, { value: contextValue, children })
|
|
2908
2996
|
]
|
|
2909
2997
|
}
|
|
2910
2998
|
);
|
|
@@ -2914,21 +3002,21 @@ var init_Drawer = __esm({
|
|
|
2914
3002
|
});
|
|
2915
3003
|
|
|
2916
3004
|
// src/components/Drawer/useDrawer.ts
|
|
2917
|
-
var
|
|
3005
|
+
var import_react22, useDrawer;
|
|
2918
3006
|
var init_useDrawer = __esm({
|
|
2919
3007
|
"src/components/Drawer/useDrawer.ts"() {
|
|
2920
3008
|
"use strict";
|
|
2921
|
-
|
|
3009
|
+
import_react22 = require("react");
|
|
2922
3010
|
init_DrawerContext();
|
|
2923
3011
|
useDrawer = () => {
|
|
2924
|
-
const { onClose, closeLabel, headerId } = (0,
|
|
3012
|
+
const { onClose, closeLabel, headerId } = (0, import_react22.useContext)(DrawerContext);
|
|
2925
3013
|
return { onClose, closeLabel, headerId };
|
|
2926
3014
|
};
|
|
2927
3015
|
}
|
|
2928
3016
|
});
|
|
2929
3017
|
|
|
2930
3018
|
// src/components/Drawer/Header.tsx
|
|
2931
|
-
var import_icons7,
|
|
3019
|
+
var import_icons7, import_jsx_runtime29, Header;
|
|
2932
3020
|
var init_Header = __esm({
|
|
2933
3021
|
"src/components/Drawer/Header.tsx"() {
|
|
2934
3022
|
"use strict";
|
|
@@ -2936,12 +3024,12 @@ var init_Header = __esm({
|
|
|
2936
3024
|
init_Button2();
|
|
2937
3025
|
init_Icon2();
|
|
2938
3026
|
init_useDrawer();
|
|
2939
|
-
|
|
3027
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2940
3028
|
Header = ({ ref, children, ...otherProps }) => {
|
|
2941
3029
|
const { onClose, closeLabel, headerId } = useDrawer();
|
|
2942
|
-
return /* @__PURE__ */ (0,
|
|
2943
|
-
/* @__PURE__ */ (0,
|
|
2944
|
-
/* @__PURE__ */ (0,
|
|
3030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("header", { ref, ...otherProps, className: "mobius-drawer__header", children: [
|
|
3031
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("h2", { id: headerId, children }),
|
|
3032
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2945
3033
|
Button,
|
|
2946
3034
|
{
|
|
2947
3035
|
"aria-label": "Close",
|
|
@@ -2950,7 +3038,7 @@ var init_Header = __esm({
|
|
|
2950
3038
|
className: "mobius-drawer__close",
|
|
2951
3039
|
size: "sm",
|
|
2952
3040
|
children: [
|
|
2953
|
-
/* @__PURE__ */ (0,
|
|
3041
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { icon: import_icons7.cross }),
|
|
2954
3042
|
" ",
|
|
2955
3043
|
closeLabel
|
|
2956
3044
|
]
|
|
@@ -2979,17 +3067,17 @@ var init_Drawer2 = __esm({
|
|
|
2979
3067
|
});
|
|
2980
3068
|
|
|
2981
3069
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2982
|
-
var
|
|
3070
|
+
var import_react23, import_react_accessible_dropdown_menu_hook, import_dedupe23, import_DropdownMenu, import_jsx_runtime30, DropdownMenu;
|
|
2983
3071
|
var init_DropdownMenu = __esm({
|
|
2984
3072
|
"src/components/DropdownMenu/DropdownMenu.tsx"() {
|
|
2985
3073
|
"use strict";
|
|
2986
3074
|
"use client";
|
|
2987
|
-
|
|
3075
|
+
import_react23 = require("react");
|
|
2988
3076
|
import_react_accessible_dropdown_menu_hook = __toESM(require("react-accessible-dropdown-menu-hook"));
|
|
2989
|
-
|
|
3077
|
+
import_dedupe23 = __toESM(require("classnames/dedupe"));
|
|
2990
3078
|
init_Button2();
|
|
2991
3079
|
import_DropdownMenu = require("@simplybusiness/mobius/src/components/DropdownMenu/DropdownMenu.css");
|
|
2992
|
-
|
|
3080
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2993
3081
|
DropdownMenu = ({ ref, ...props }) => {
|
|
2994
3082
|
const {
|
|
2995
3083
|
elementType: Element = "nav",
|
|
@@ -2998,21 +3086,21 @@ var init_DropdownMenu = __esm({
|
|
|
2998
3086
|
children,
|
|
2999
3087
|
...otherProps
|
|
3000
3088
|
} = props;
|
|
3001
|
-
const [activeId, setActiveId] = (0,
|
|
3002
|
-
const numberOfItems =
|
|
3089
|
+
const [activeId, setActiveId] = (0, import_react23.useState)(null);
|
|
3090
|
+
const numberOfItems = import_react23.Children.count(children);
|
|
3003
3091
|
const {
|
|
3004
3092
|
buttonProps,
|
|
3005
3093
|
itemProps,
|
|
3006
3094
|
isOpen: open,
|
|
3007
3095
|
setIsOpen
|
|
3008
3096
|
} = (0, import_react_accessible_dropdown_menu_hook.default)(numberOfItems);
|
|
3009
|
-
const classes = (0,
|
|
3097
|
+
const classes = (0, import_dedupe23.default)(
|
|
3010
3098
|
"mobius",
|
|
3011
3099
|
"mobius-dropdown-menu",
|
|
3012
3100
|
otherProps.className
|
|
3013
3101
|
);
|
|
3014
|
-
const triggerClasses = (0,
|
|
3015
|
-
const listClasses = (0,
|
|
3102
|
+
const triggerClasses = (0, import_dedupe23.default)("mobius", "mobius-dropdown-menu__trigger");
|
|
3103
|
+
const listClasses = (0, import_dedupe23.default)("mobius", "mobius-dropdown-menu__list", {
|
|
3016
3104
|
"--is-open": open
|
|
3017
3105
|
});
|
|
3018
3106
|
const handleChildClick = ({ onClick }, index) => {
|
|
@@ -3022,16 +3110,16 @@ var init_DropdownMenu = __esm({
|
|
|
3022
3110
|
onClick();
|
|
3023
3111
|
}
|
|
3024
3112
|
};
|
|
3025
|
-
return /* @__PURE__ */ (0,
|
|
3026
|
-
trigger ? (0,
|
|
3113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Element, { ref, ...otherProps, className: classes, children: [
|
|
3114
|
+
trigger ? (0, import_react23.cloneElement)(trigger, {
|
|
3027
3115
|
className: triggerClasses,
|
|
3028
3116
|
open,
|
|
3029
3117
|
label,
|
|
3030
3118
|
...buttonProps
|
|
3031
|
-
}) : /* @__PURE__ */ (0,
|
|
3032
|
-
/* @__PURE__ */ (0,
|
|
3033
|
-
if ((0,
|
|
3034
|
-
return (0,
|
|
3119
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Button, { className: triggerClasses, ...buttonProps, children: label }),
|
|
3120
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("ul", { className: listClasses, role: "menu", children: import_react23.Children.map(children, (child, index) => {
|
|
3121
|
+
if ((0, import_react23.isValidElement)(child)) {
|
|
3122
|
+
return (0, import_react23.cloneElement)(child, {
|
|
3035
3123
|
onClick: () => handleChildClick(child.props, index),
|
|
3036
3124
|
active: index === activeId,
|
|
3037
3125
|
...itemProps[index]
|
|
@@ -3046,13 +3134,13 @@ var init_DropdownMenu = __esm({
|
|
|
3046
3134
|
});
|
|
3047
3135
|
|
|
3048
3136
|
// src/components/DropdownMenu/Item.tsx
|
|
3049
|
-
var
|
|
3137
|
+
var import_react24, import_dedupe24, import_jsx_runtime31, Item;
|
|
3050
3138
|
var init_Item = __esm({
|
|
3051
3139
|
"src/components/DropdownMenu/Item.tsx"() {
|
|
3052
3140
|
"use strict";
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3141
|
+
import_react24 = require("react");
|
|
3142
|
+
import_dedupe24 = __toESM(require("classnames/dedupe"));
|
|
3143
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3056
3144
|
Item = ({ ref, ...props }) => {
|
|
3057
3145
|
const {
|
|
3058
3146
|
elementType: Element = "li",
|
|
@@ -3061,26 +3149,26 @@ var init_Item = __esm({
|
|
|
3061
3149
|
children,
|
|
3062
3150
|
...otherProps
|
|
3063
3151
|
} = props;
|
|
3064
|
-
const classes = (0,
|
|
3152
|
+
const classes = (0, import_dedupe24.default)(
|
|
3065
3153
|
"mobius",
|
|
3066
3154
|
"mobius-dropdown-menu__item",
|
|
3067
3155
|
{ "--is-active": active },
|
|
3068
3156
|
otherProps.className
|
|
3069
3157
|
);
|
|
3070
|
-
return /* @__PURE__ */ (0,
|
|
3071
|
-
if ((0,
|
|
3072
|
-
const childClasses = (0,
|
|
3158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Element, { ref, onClick, ...otherProps, children: import_react24.Children.map(children, (child) => {
|
|
3159
|
+
if ((0, import_react24.isValidElement)(child)) {
|
|
3160
|
+
const childClasses = (0, import_dedupe24.default)(
|
|
3073
3161
|
child.props.className,
|
|
3074
3162
|
classes
|
|
3075
3163
|
);
|
|
3076
|
-
return (0,
|
|
3164
|
+
return (0, import_react24.cloneElement)(
|
|
3077
3165
|
child,
|
|
3078
3166
|
{
|
|
3079
3167
|
className: childClasses
|
|
3080
3168
|
}
|
|
3081
3169
|
);
|
|
3082
3170
|
}
|
|
3083
|
-
return /* @__PURE__ */ (0,
|
|
3171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: classes, children: child });
|
|
3084
3172
|
}) });
|
|
3085
3173
|
};
|
|
3086
3174
|
Item.displayName = "DropdownMenu.Item";
|
|
@@ -3105,23 +3193,23 @@ var init_DropdownMenu2 = __esm({
|
|
|
3105
3193
|
});
|
|
3106
3194
|
|
|
3107
3195
|
// src/components/Fieldset/Fieldset.tsx
|
|
3108
|
-
var
|
|
3196
|
+
var import_dedupe25, import_react25, import_Fieldset, import_jsx_runtime32, useFieldset, Fieldset;
|
|
3109
3197
|
var init_Fieldset = __esm({
|
|
3110
3198
|
"src/components/Fieldset/Fieldset.tsx"() {
|
|
3111
3199
|
"use strict";
|
|
3112
3200
|
"use client";
|
|
3113
|
-
|
|
3114
|
-
|
|
3201
|
+
import_dedupe25 = __toESM(require("classnames/dedupe"));
|
|
3202
|
+
import_react25 = require("react");
|
|
3115
3203
|
init_Flex2();
|
|
3116
3204
|
import_Fieldset = require("@simplybusiness/mobius/src/components/Fieldset/Fieldset.css");
|
|
3117
|
-
|
|
3205
|
+
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3118
3206
|
useFieldset = (props) => {
|
|
3119
3207
|
const { legend } = props;
|
|
3120
3208
|
let legendProps = {};
|
|
3121
3209
|
let containerProps = {
|
|
3122
3210
|
role: "group"
|
|
3123
3211
|
};
|
|
3124
|
-
const legendId = (0,
|
|
3212
|
+
const legendId = (0, import_react25.useId)();
|
|
3125
3213
|
if (legend) {
|
|
3126
3214
|
legendProps = {
|
|
3127
3215
|
...legendProps,
|
|
@@ -3141,14 +3229,14 @@ var init_Fieldset = __esm({
|
|
|
3141
3229
|
const {
|
|
3142
3230
|
children,
|
|
3143
3231
|
legend,
|
|
3144
|
-
legendComponent = /* @__PURE__ */ (0,
|
|
3232
|
+
legendComponent = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("legend", {}),
|
|
3145
3233
|
...otherProps
|
|
3146
3234
|
} = props;
|
|
3147
3235
|
const { legendProps, containerProps } = useFieldset(props);
|
|
3148
|
-
const classes = (0,
|
|
3236
|
+
const classes = (0, import_dedupe25.default)("mobius", "mobius-fieldset", props.className);
|
|
3149
3237
|
legendProps.className = "mobius-fieldset__legend";
|
|
3150
|
-
return /* @__PURE__ */ (0,
|
|
3151
|
-
legend && (0,
|
|
3238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Flex, { ...containerProps, ...otherProps, className: classes, children: [
|
|
3239
|
+
legend && (0, import_react25.cloneElement)(legendComponent, { ...legendProps }, [legend]),
|
|
3152
3240
|
children
|
|
3153
3241
|
] });
|
|
3154
3242
|
};
|
|
@@ -3165,13 +3253,13 @@ var init_Fieldset2 = __esm({
|
|
|
3165
3253
|
});
|
|
3166
3254
|
|
|
3167
3255
|
// src/components/Grid/Grid.tsx
|
|
3168
|
-
var
|
|
3256
|
+
var import_dedupe26, import_jsx_runtime33, Grid;
|
|
3169
3257
|
var init_Grid = __esm({
|
|
3170
3258
|
"src/components/Grid/Grid.tsx"() {
|
|
3171
3259
|
"use strict";
|
|
3172
|
-
|
|
3260
|
+
import_dedupe26 = __toESM(require("classnames/dedupe"));
|
|
3173
3261
|
init_utils();
|
|
3174
|
-
|
|
3262
|
+
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3175
3263
|
Grid = ({ ref: _ref, ...props }) => {
|
|
3176
3264
|
const {
|
|
3177
3265
|
columns = 12,
|
|
@@ -3186,7 +3274,7 @@ var init_Grid = __esm({
|
|
|
3186
3274
|
style,
|
|
3187
3275
|
...rest
|
|
3188
3276
|
} = props;
|
|
3189
|
-
const classes = (0,
|
|
3277
|
+
const classes = (0, import_dedupe26.default)("mobius", "mobius-grid", className);
|
|
3190
3278
|
const styles = filterUndefinedProps({
|
|
3191
3279
|
boxSizing: "border-box",
|
|
3192
3280
|
display: "grid",
|
|
@@ -3200,22 +3288,22 @@ var init_Grid = __esm({
|
|
|
3200
3288
|
justifyItems,
|
|
3201
3289
|
...style
|
|
3202
3290
|
});
|
|
3203
|
-
return /* @__PURE__ */ (0,
|
|
3291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: styles, className: classes, ...rest });
|
|
3204
3292
|
};
|
|
3205
3293
|
Grid.displayName = "Grid";
|
|
3206
3294
|
}
|
|
3207
3295
|
});
|
|
3208
3296
|
|
|
3209
3297
|
// src/components/Grid/Item.tsx
|
|
3210
|
-
var
|
|
3298
|
+
var import_react26, import_dedupe27, import_jsx_runtime34, getBreakpointMap, DEFAULT_SPAN, GridItem;
|
|
3211
3299
|
var init_Item2 = __esm({
|
|
3212
3300
|
"src/components/Grid/Item.tsx"() {
|
|
3213
3301
|
"use strict";
|
|
3214
3302
|
"use client";
|
|
3215
|
-
|
|
3216
|
-
|
|
3303
|
+
import_react26 = require("react");
|
|
3304
|
+
import_dedupe27 = __toESM(require("classnames/dedupe"));
|
|
3217
3305
|
init_hooks();
|
|
3218
|
-
|
|
3306
|
+
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3219
3307
|
getBreakpointMap = (config) => Object.entries(config).reduce(
|
|
3220
3308
|
(prev, [key, value]) => {
|
|
3221
3309
|
const previous = Object.values(prev);
|
|
@@ -3250,9 +3338,9 @@ var init_Item2 = __esm({
|
|
|
3250
3338
|
xl,
|
|
3251
3339
|
xxl
|
|
3252
3340
|
});
|
|
3253
|
-
const [responsiveSpan, setResponsiveSpan] = (0,
|
|
3254
|
-
const classes = (0,
|
|
3255
|
-
(0,
|
|
3341
|
+
const [responsiveSpan, setResponsiveSpan] = (0, import_react26.useState)();
|
|
3342
|
+
const classes = (0, import_dedupe27.default)("mobius-grid__item", className);
|
|
3343
|
+
(0, import_react26.useEffect)(() => {
|
|
3256
3344
|
setResponsiveSpan(breakpointMap[breakpointSize]);
|
|
3257
3345
|
}, [breakpointSize, breakpointMap]);
|
|
3258
3346
|
const styles = {
|
|
@@ -3260,7 +3348,7 @@ var init_Item2 = __esm({
|
|
|
3260
3348
|
alignSelf,
|
|
3261
3349
|
justifySelf
|
|
3262
3350
|
};
|
|
3263
|
-
return /* @__PURE__ */ (0,
|
|
3351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { ...styles }, className: classes, ...rest });
|
|
3264
3352
|
};
|
|
3265
3353
|
GridItem.displayName = "GridItem";
|
|
3266
3354
|
}
|
|
@@ -3281,20 +3369,20 @@ var init_Grid2 = __esm({
|
|
|
3281
3369
|
});
|
|
3282
3370
|
|
|
3283
3371
|
// src/components/Image/Image.tsx
|
|
3284
|
-
var
|
|
3372
|
+
var import_dedupe28, import_jsx_runtime35, Image;
|
|
3285
3373
|
var init_Image = __esm({
|
|
3286
3374
|
"src/components/Image/Image.tsx"() {
|
|
3287
3375
|
"use strict";
|
|
3288
|
-
|
|
3289
|
-
|
|
3376
|
+
import_dedupe28 = __toESM(require("classnames/dedupe"));
|
|
3377
|
+
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3290
3378
|
Image = ({
|
|
3291
3379
|
ref,
|
|
3292
3380
|
alt,
|
|
3293
3381
|
elementType: Component = "img",
|
|
3294
3382
|
...otherProps
|
|
3295
3383
|
}) => {
|
|
3296
|
-
const classes = (0,
|
|
3297
|
-
return /* @__PURE__ */ (0,
|
|
3384
|
+
const classes = (0, import_dedupe28.default)("mobius", "mobius-image", otherProps.className);
|
|
3385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Component, { alt, ref, ...otherProps, className: classes });
|
|
3298
3386
|
};
|
|
3299
3387
|
Image.displayName = "Image";
|
|
3300
3388
|
}
|
|
@@ -3309,13 +3397,13 @@ var init_Image2 = __esm({
|
|
|
3309
3397
|
});
|
|
3310
3398
|
|
|
3311
3399
|
// src/components/Link/Link.tsx
|
|
3312
|
-
var
|
|
3400
|
+
var import_dedupe29, import_Link, import_jsx_runtime36, Link;
|
|
3313
3401
|
var init_Link = __esm({
|
|
3314
3402
|
"src/components/Link/Link.tsx"() {
|
|
3315
3403
|
"use strict";
|
|
3316
|
-
|
|
3404
|
+
import_dedupe29 = __toESM(require("classnames/dedupe"));
|
|
3317
3405
|
import_Link = require("@simplybusiness/mobius/src/components/Link/Link.css");
|
|
3318
|
-
|
|
3406
|
+
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3319
3407
|
Link = ({ ref, ...props }) => {
|
|
3320
3408
|
const {
|
|
3321
3409
|
isDisabled = false,
|
|
@@ -3329,7 +3417,7 @@ var init_Link = __esm({
|
|
|
3329
3417
|
pointerEvents: "none"
|
|
3330
3418
|
};
|
|
3331
3419
|
const styles = { ...style, ...isDisabled && disabledStyles };
|
|
3332
|
-
const classes = (0,
|
|
3420
|
+
const classes = (0, import_dedupe29.default)(
|
|
3333
3421
|
"mobius",
|
|
3334
3422
|
"mobius-link",
|
|
3335
3423
|
className,
|
|
@@ -3338,7 +3426,7 @@ var init_Link = __esm({
|
|
|
3338
3426
|
"--is-disabled": isDisabled
|
|
3339
3427
|
}
|
|
3340
3428
|
);
|
|
3341
|
-
return /* @__PURE__ */ (0,
|
|
3429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3342
3430
|
Component,
|
|
3343
3431
|
{
|
|
3344
3432
|
ref,
|
|
@@ -3363,12 +3451,12 @@ var init_Link2 = __esm({
|
|
|
3363
3451
|
});
|
|
3364
3452
|
|
|
3365
3453
|
// src/components/LinkButton/LinkButton.tsx
|
|
3366
|
-
var
|
|
3454
|
+
var import_dedupe30, import_jsx_runtime37;
|
|
3367
3455
|
var init_LinkButton = __esm({
|
|
3368
3456
|
"src/components/LinkButton/LinkButton.tsx"() {
|
|
3369
3457
|
"use strict";
|
|
3370
|
-
|
|
3371
|
-
|
|
3458
|
+
import_dedupe30 = __toESM(require("classnames/dedupe"));
|
|
3459
|
+
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3372
3460
|
}
|
|
3373
3461
|
});
|
|
3374
3462
|
|
|
@@ -3381,14 +3469,14 @@ var init_LinkButton2 = __esm({
|
|
|
3381
3469
|
});
|
|
3382
3470
|
|
|
3383
3471
|
// src/components/List/List.tsx
|
|
3384
|
-
var
|
|
3472
|
+
var import_react27, import_dedupe31, import_List, import_jsx_runtime38, List;
|
|
3385
3473
|
var init_List = __esm({
|
|
3386
3474
|
"src/components/List/List.tsx"() {
|
|
3387
3475
|
"use strict";
|
|
3388
|
-
|
|
3389
|
-
|
|
3476
|
+
import_react27 = require("react");
|
|
3477
|
+
import_dedupe31 = __toESM(require("classnames/dedupe"));
|
|
3390
3478
|
import_List = require("@simplybusiness/mobius/src/components/List/List.css");
|
|
3391
|
-
|
|
3479
|
+
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3392
3480
|
List = ({ ref, ...props }) => {
|
|
3393
3481
|
const Component = props.isOrdered ? "ol" : "ul";
|
|
3394
3482
|
const { children, icon, ...otherProps } = props;
|
|
@@ -3397,7 +3485,7 @@ var init_List = __esm({
|
|
|
3397
3485
|
...restProps,
|
|
3398
3486
|
reversed: isReversed
|
|
3399
3487
|
};
|
|
3400
|
-
const classes = (0,
|
|
3488
|
+
const classes = (0, import_dedupe31.default)(
|
|
3401
3489
|
"mobius",
|
|
3402
3490
|
"mobius-list",
|
|
3403
3491
|
{
|
|
@@ -3406,9 +3494,9 @@ var init_List = __esm({
|
|
|
3406
3494
|
},
|
|
3407
3495
|
otherProps.className
|
|
3408
3496
|
);
|
|
3409
|
-
return /* @__PURE__ */ (0,
|
|
3410
|
-
if ((0,
|
|
3411
|
-
return (0,
|
|
3497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Component, { ref, ...mappedProps, className: classes, children: import_react27.Children.map(children, (child) => {
|
|
3498
|
+
if ((0, import_react27.isValidElement)(child)) {
|
|
3499
|
+
return (0, import_react27.cloneElement)(child, {
|
|
3412
3500
|
parentIcon: icon
|
|
3413
3501
|
});
|
|
3414
3502
|
}
|
|
@@ -3420,16 +3508,16 @@ var init_List = __esm({
|
|
|
3420
3508
|
});
|
|
3421
3509
|
|
|
3422
3510
|
// src/components/List/ListItem.tsx
|
|
3423
|
-
var
|
|
3511
|
+
var import_dedupe32, import_jsx_runtime39, ListItem;
|
|
3424
3512
|
var init_ListItem = __esm({
|
|
3425
3513
|
"src/components/List/ListItem.tsx"() {
|
|
3426
3514
|
"use strict";
|
|
3427
|
-
|
|
3428
|
-
|
|
3515
|
+
import_dedupe32 = __toESM(require("classnames/dedupe"));
|
|
3516
|
+
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3429
3517
|
ListItem = ({ ref, ...props }) => {
|
|
3430
3518
|
const { parentIcon, icon, children, ...otherProps } = props;
|
|
3431
3519
|
const iconContent = icon || parentIcon;
|
|
3432
|
-
const classes = (0,
|
|
3520
|
+
const classes = (0, import_dedupe32.default)(
|
|
3433
3521
|
"mobius",
|
|
3434
3522
|
"mobius-list__item",
|
|
3435
3523
|
{
|
|
@@ -3437,15 +3525,15 @@ var init_ListItem = __esm({
|
|
|
3437
3525
|
},
|
|
3438
3526
|
props.className
|
|
3439
3527
|
);
|
|
3440
|
-
const contentClasses = (0,
|
|
3441
|
-
const iconClasses = (0,
|
|
3528
|
+
const contentClasses = (0, import_dedupe32.default)("mobius", "mobius-list__item-content");
|
|
3529
|
+
const iconClasses = (0, import_dedupe32.default)("mobius", "mobius-list__icon");
|
|
3442
3530
|
if (iconContent) {
|
|
3443
|
-
return /* @__PURE__ */ (0,
|
|
3444
|
-
/* @__PURE__ */ (0,
|
|
3531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("li", { ref, ...otherProps, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: contentClasses, children: [
|
|
3532
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: iconClasses, children: iconContent }),
|
|
3445
3533
|
children
|
|
3446
3534
|
] }) });
|
|
3447
3535
|
}
|
|
3448
|
-
return /* @__PURE__ */ (0,
|
|
3536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("li", { ref, ...otherProps, className: classes, children });
|
|
3449
3537
|
};
|
|
3450
3538
|
ListItem.displayName = "ListItem";
|
|
3451
3539
|
}
|
|
@@ -3461,23 +3549,23 @@ var init_List2 = __esm({
|
|
|
3461
3549
|
});
|
|
3462
3550
|
|
|
3463
3551
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
3464
|
-
var
|
|
3552
|
+
var import_dedupe33, import_icons8, import_LoadingIndicator, import_jsx_runtime40, LoadingIndicator;
|
|
3465
3553
|
var init_LoadingIndicator = __esm({
|
|
3466
3554
|
"src/components/LoadingIndicator/LoadingIndicator.tsx"() {
|
|
3467
3555
|
"use strict";
|
|
3468
|
-
|
|
3556
|
+
import_dedupe33 = __toESM(require("classnames/dedupe"));
|
|
3469
3557
|
import_icons8 = require("@simplybusiness/icons");
|
|
3470
3558
|
init_Icon2();
|
|
3471
3559
|
import_LoadingIndicator = require("@simplybusiness/mobius/src/components/LoadingIndicator/LoadingIndicator.css");
|
|
3472
|
-
|
|
3560
|
+
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3473
3561
|
LoadingIndicator = ({ ref, ...props }) => {
|
|
3474
3562
|
const { icon = import_icons8.loading, ...otherProps } = props;
|
|
3475
|
-
const classes = (0,
|
|
3563
|
+
const classes = (0, import_dedupe33.default)(
|
|
3476
3564
|
"mobius",
|
|
3477
3565
|
"mobius-loading-indicator",
|
|
3478
3566
|
otherProps.className
|
|
3479
3567
|
);
|
|
3480
|
-
return /* @__PURE__ */ (0,
|
|
3568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { icon, spin: true, ref, ...otherProps, className: classes });
|
|
3481
3569
|
};
|
|
3482
3570
|
LoadingIndicator.displayName = "LoadingIndicator";
|
|
3483
3571
|
}
|
|
@@ -3492,16 +3580,16 @@ var init_LoadingIndicator2 = __esm({
|
|
|
3492
3580
|
});
|
|
3493
3581
|
|
|
3494
3582
|
// src/components/Logo/Logo.tsx
|
|
3495
|
-
var
|
|
3583
|
+
var import_dedupe34, import_jsx_runtime41, Logo;
|
|
3496
3584
|
var init_Logo = __esm({
|
|
3497
3585
|
"src/components/Logo/Logo.tsx"() {
|
|
3498
3586
|
"use strict";
|
|
3499
|
-
|
|
3500
|
-
|
|
3587
|
+
import_dedupe34 = __toESM(require("classnames/dedupe"));
|
|
3588
|
+
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3501
3589
|
Logo = ({ ref, ...props }) => {
|
|
3502
3590
|
const { className, width, height, ...otherProps } = props;
|
|
3503
|
-
const classes = (0,
|
|
3504
|
-
return /* @__PURE__ */ (0,
|
|
3591
|
+
const classes = (0, import_dedupe34.default)("mobius", "mobius-logo", className);
|
|
3592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3505
3593
|
"svg",
|
|
3506
3594
|
{
|
|
3507
3595
|
width,
|
|
@@ -3511,7 +3599,7 @@ var init_Logo = __esm({
|
|
|
3511
3599
|
viewBox: "0 0 144 37",
|
|
3512
3600
|
...otherProps,
|
|
3513
3601
|
children: [
|
|
3514
|
-
/* @__PURE__ */ (0,
|
|
3602
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3515
3603
|
"linearGradient",
|
|
3516
3604
|
{
|
|
3517
3605
|
id: "logo-gradient",
|
|
@@ -3520,27 +3608,27 @@ var init_Logo = __esm({
|
|
|
3520
3608
|
y1: "76.042%",
|
|
3521
3609
|
y2: "26.973%",
|
|
3522
3610
|
children: [
|
|
3523
|
-
/* @__PURE__ */ (0,
|
|
3524
|
-
/* @__PURE__ */ (0,
|
|
3611
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("stop", { stopColor: "#4632D8", offset: "0%" }),
|
|
3612
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("stop", { stopColor: "#9084E8", offset: "100%" })
|
|
3525
3613
|
]
|
|
3526
3614
|
}
|
|
3527
3615
|
) }),
|
|
3528
|
-
/* @__PURE__ */ (0,
|
|
3529
|
-
/* @__PURE__ */ (0,
|
|
3616
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("g", { children: [
|
|
3617
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3530
3618
|
"path",
|
|
3531
3619
|
{
|
|
3532
3620
|
fill: "#0E0A2B",
|
|
3533
3621
|
d: "M68.788 11.307c0-2.486-2.027-3.345-3.833-4.1-1.332-.562-2.471-1.036-2.471-2.072 0-.873.77-1.42 1.968-1.42 1.051 0 1.806.444 2.294.725.193.103.474.222.755.133.192-.06.34-.207.459-.444l.34-.621c.266-.474.163-.888-.281-1.2-.533-.384-1.88-1.05-3.537-1.05-2.738 0-4.647 1.643-4.647 4.01 0 2.413 2.012 3.301 3.788 4.07 1.347.593 2.516 1.096 2.516 2.161 0 .873-.754 1.45-1.924 1.45-1.287 0-2.22-.65-2.678-.961l-.03-.015c-.533-.296-.903-.237-1.228.192l-.415.607c-.444.607-.148.992.134 1.228.828.637 2.427 1.392 4.203 1.392 2.708 0 4.587-1.673 4.587-4.085zm4.44 2.975V6.186c0-.577-.31-.888-.873-.888h-.843c-.563 0-.874.311-.874.888v8.096c0 .577.296.888.874.888h.843c.563 0 .873-.311.873-.888zM71.482 4.203h.755c.518 0 .814-.281.814-.8v-.517c0-.518-.296-.814-.814-.814h-.755c-.518 0-.8.281-.8.814v.518c.016.518.297.8.8.8zM92.645 24.48h.755c.518 0 .814-.282.814-.8v-.518c0-.518-.296-.814-.814-.814h-.755c-.518 0-.799.282-.799.814v.518c0 .518.281.8.8.8zm-6.26-19.42c-1.539 0-2.397.962-2.945 1.895-.444-1.243-1.435-1.895-2.871-1.895-1.362 0-2.146.888-2.723 1.806v-.68c0-.578-.311-.889-.873-.889h-.74c-.563 0-.873.311-.873.888v8.096c0 .577.295.888.873.888h.843c.577 0 .873-.311.873-.888V10.73c0-2.25.888-3.271 2.058-3.271 1.006 0 1.198.71 1.198 1.85v4.987c0 .578.311.888.888.888h.844c.577 0 .873-.31.873-.888v-3.551c0-2.25.873-3.271 2.013-3.271 1.036 0 1.243.74 1.243 1.85v4.987c0 .577.31.888.888.888h.814c.577 0 .888-.31.888-.888V8.835c0-2.5-1.095-3.774-3.27-3.774zm10.804 10.33c2.679 0 4.558-2.13 4.558-5.164 0-3.094-1.776-5.166-4.425-5.166-1.761 0-2.708 1.036-3.049 1.51v-.533c0-.459-.34-.755-.873-.755h-.607c-.562 0-.888.326-.888.888v11.9c0 .576.311.887.888.887h.814c.578 0 .888-.31.888-.888v-3.404c0-.207-.014-.4-.014-.532.325.429 1.184 1.258 2.708 1.258zm-2.768-5.105c0-1.362.622-2.975 2.368-2.975 1.377 0 2.309 1.184 2.309 2.945 0 1.746-.947 2.916-2.338 2.916-1.54 0-2.339-1.45-2.339-2.886zm12.965 4.07v-.652c0-.444-.252-.725-.681-.784-.34-.03-.68-.192-.68-1.066v-9.47c0-.563-.326-.888-.874-.888h-.843c-.563 0-.874.31-.874.888v9.679c0 1.258.34 2.16 1.021 2.678.637.489 1.466.533 2.013.533.607 0 .918-.325.918-.917zm9.457-9.073h-.962c-.518 0-.844.237-.977.726l-1.717 4.972c-.089.311-.192.71-.251.977-.074-.281-.193-.71-.296-1.021l-1.835-4.943c-.163-.489-.489-.71-.977-.71h-1.036c-.415 0-.622.162-.71.295-.09.134-.163.385.014.755l3.685 8.57-.34.813c-.252.592-.77 1.229-1.45 1.229-.267 0-.474-.09-.652-.163h-.014c-.43-.104-.755.074-.962.488l-.163.415c-.119.251-.148.517-.06.725.075.192.237.34.474.429.326.118.814.296 1.391.296 1.628 0 2.975-.977 3.597-2.605l3.996-10.226c.103-.296.088-.563-.045-.755-.163-.163-.4-.267-.71-.267zM67.634 28.297c.977-.592 1.54-1.658 1.54-2.886 0-2.176-1.688-3.567-4.293-3.567h-4.04c-.562 0-.873.311-.873.888v11.899c0 .577.296.888.873.888h4.1c1.346 0 2.5-.34 3.33-.962.932-.71 1.42-1.761 1.42-3.049.03-1.524-.784-2.767-2.057-3.211zm-5.017-.962v-3.212h2.25c1.02 0 1.628.592 1.628 1.584 0 .991-.607 1.643-1.57 1.643h-2.308v-.015zm4.396 4.01c0 1.155-.71 1.865-1.865 1.865h-2.53v-3.714h2.53c1.14.014 1.865.74 1.865 1.85zm12.638-5.712h-.814c-.577 0-.888.31-.888.888v3.655c0 2.176-1.361 3.182-2.634 3.182-1.006 0-1.406-.547-1.406-1.88v-4.942c0-.578-.31-.888-.888-.888h-.814c-.562 0-.888.325-.888.888v5.431c0 2.516 1.17 3.774 3.463 3.774a3.937 3.937 0 003.286-1.761v.651c0 .577.296.888.873.888h.74c.577 0 .888-.31.888-.888v-8.095c-.03-.578-.355-.903-.918-.903zm6.956 3.937c-.917-.311-1.702-.592-1.702-1.184 0-.74.77-.859 1.229-.859.784 0 1.406.281 1.805.474.548.237.947.118 1.184-.34l.193-.341c.251-.518.133-.947-.326-1.184-.326-.178-1.288-.71-2.753-.71-2.279 0-3.803 1.213-3.803 3.004 0 2.042 1.731 2.65 3.137 3.138.903.325 1.687.592 1.687 1.169 0 .547-.488.902-1.258.902-.917 0-1.613-.37-2.057-.621l-.059-.03c-.533-.28-.903-.207-1.213.222l-.222.34c-.178.252-.237.504-.178.726.044.207.192.37.4.488a5.774 5.774 0 003.285 1.007c2.235 0 3.789-1.273 3.789-3.079-.03-2.042-1.761-2.649-3.138-3.122zm6.897-3.937h-.844c-.562 0-.873.31-.873.888v8.095c0 .577.296.888.873.888h.844c.577 0 .873-.31.873-.888v-8.095c0-.563-.31-.888-.873-.888zm9.324-.237c-1.924 0-2.93 1.154-3.36 1.806v-.681c0-.577-.31-.888-.873-.888h-.74c-.563 0-.873.31-.873.888v8.095c0 .577.296.888.873.888h.843c.578 0 .874-.31.874-.888v-3.744c0-1.79 1.14-3.078 2.708-3.078 1.021 0 1.436.547 1.436 1.88v4.942c0 .577.31.888.887.888h.814c.578 0 .888-.31.888-.888v-5.431c0-2.516-1.169-3.789-3.477-3.789zm10.448 0c-2.96 0-5.032 2.131-5.032 5.165 0 2.99 2.235 5.165 5.313 5.165 1.48 0 2.635-.533 3.345-.977.444-.266.562-.695.296-1.198l-.222-.385c-.266-.459-.651-.563-1.184-.31h-.015a3.885 3.885 0 01-2.042.606c-1.54 0-2.634-.962-2.812-2.472h5.816a.935.935 0 00.933-.917c.014-2.827-1.717-4.677-4.396-4.677zm-.044 2.013c1.065 0 1.79.77 1.864 1.968h-4.1c.253-1.213 1.096-1.968 2.236-1.968zm10.152 2.16c-.917-.31-1.702-.591-1.702-1.183 0-.74.77-.859 1.229-.859.784 0 1.406.281 1.805.474.548.237.947.118 1.184-.34l.192-.341c.252-.518.134-.947-.325-1.184-.326-.178-1.288-.71-2.753-.71-2.279 0-3.803 1.213-3.803 3.004 0 2.042 1.731 2.65 3.137 3.138.903.325 1.687.592 1.687 1.169 0 .547-.488.902-1.258.902-.917 0-1.613-.37-2.057-.621l-.059-.03c-.533-.28-.903-.207-1.214.222l-.222.34c-.177.252-.236.504-.177.726.044.207.192.37.4.488a5.774 5.774 0 003.285 1.007c2.235 0 3.789-1.273 3.789-3.079-.015-2.042-1.747-2.649-3.138-3.122zm8.791 0c-.917-.31-1.702-.591-1.702-1.183 0-.74.77-.859 1.229-.859.784 0 1.406.281 1.805.474.548.237.947.118 1.184-.34l.192-.341c.252-.518.134-.947-.325-1.184-.326-.178-1.288-.71-2.753-.71-2.279 0-3.803 1.213-3.803 3.004 0 2.042 1.731 2.65 3.137 3.138.903.325 1.687.592 1.687 1.169 0 .547-.488.902-1.258.902-.917 0-1.613-.37-2.057-.621l-.059-.03c-.533-.28-.903-.207-1.214.222l-.222.34c-.177.252-.236.504-.177.726.044.207.192.37.4.488a5.774 5.774 0 003.285 1.007c2.235 0 3.789-1.273 3.789-3.079-.015-2.042-1.747-2.649-3.138-3.122z"
|
|
3534
3622
|
}
|
|
3535
3623
|
),
|
|
3536
|
-
/* @__PURE__ */ (0,
|
|
3624
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3537
3625
|
"path",
|
|
3538
3626
|
{
|
|
3539
3627
|
fill: "url(#logo-gradient)",
|
|
3540
3628
|
d: "M22.747 22.288c.607 1.214.918 2.59.918 4.144 0 1.45-.267 2.827-.8 4.1a10.018 10.018 0 01-2.279 3.36c-.991.961-2.235 1.73-3.744 2.278-1.51.563-3.167.829-4.988.829-2.264 0-4.35-.385-6.29-1.14-1.938-.77-3.492-1.598-4.676-2.5-.31-.252-.548-.504-.696-.77a1.332 1.332 0 01-.177-.71.718.718 0 010-.252c.03-.37.207-.785.547-1.199l1.14-1.598c.4-.548.829-.844 1.288-.918a.896.896 0 01.222-.03c.4 0 .873.163 1.39.474 2.487 1.776 4.914 2.679 7.252 2.679 1.643 0 2.96-.385 3.922-1.14.962-.755 1.45-1.746 1.45-2.96 0-.725-.192-1.39-.562-1.983a5.347 5.347 0 00-1.539-1.569 18.207 18.207 0 00-2.235-1.287 56.102 56.102 0 00-2.649-1.214c-.917-.4-1.835-.814-2.752-1.258a19.282 19.282 0 01-2.62-1.539 14.014 14.014 0 01-2.22-1.924c-.666-.695-1.169-1.539-1.554-2.545-.37-.992-.562-2.087-.562-3.271 0-2.042.533-3.863 1.598-5.446 1.066-1.584 2.516-2.797 4.336-3.641C8.303.414 10.345 0 12.624 0c1.91 0 3.685.281 5.358.844 1.657.562 2.96 1.198 3.892 1.88.68.473 1.006 1.035 1.006 1.671 0 .385-.118.785-.37 1.2l-.917 1.657c-.385.74-.903 1.11-1.554 1.11-.4 0-.83-.133-1.318-.4a42.421 42.421 0 00-1.687-.947c-.473-.237-1.14-.488-1.998-.71a9.458 9.458 0 00-2.56-.356c-1.672 0-3.004.37-3.981 1.11-.992.74-1.48 1.717-1.48 2.946 0 .902.31 1.701.932 2.412.622.695 1.421 1.302 2.398 1.79.977.489 2.057.977 3.256 1.466a54.048 54.048 0 013.552 1.628 20.795 20.795 0 013.24 2.042c.948.755 1.732 1.732 2.354 2.945zm31.257 2.945c0 3.197-1.155 6.083-3.256 8.14-2.265 2.205-5.506 3.36-9.368 3.36H30.71c-2.443 0-4.278-1.836-4.278-4.278V4.53c0-1.2.43-2.28 1.214-3.064C28.43.681 29.51.252 30.709.252h9.013c3.419 0 6.32 1.095 8.377 3.182 1.909 1.923 2.945 4.558 2.945 7.429 0 2.294-.622 4.203-1.91 5.816 1.377.77 2.487 1.776 3.286 2.99 1.066 1.583 1.584 3.448 1.584 5.564zm-12.106-7.68c.044-.03 4.913-3.02 4.913-6.675 0-1.761-.607-3.345-1.717-4.455-1.568-1.584-3.788-1.924-5.372-1.924H30.68v28h10.7c2.738 0 4.958-.754 6.408-2.16 1.273-1.243 1.983-3.049 1.983-5.106 0-1.272-.296-2.353-.858-3.196v-.03c-1.362-2.353-6.838-3.774-6.897-3.789l-.844-.222.726-.444z"
|
|
3541
3629
|
}
|
|
3542
3630
|
),
|
|
3543
|
-
/* @__PURE__ */ (0,
|
|
3631
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3544
3632
|
"path",
|
|
3545
3633
|
{
|
|
3546
3634
|
fill: "#0E0A2B",
|
|
@@ -3565,23 +3653,23 @@ var init_Logo2 = __esm({
|
|
|
3565
3653
|
});
|
|
3566
3654
|
|
|
3567
3655
|
// src/components/Modal/Content.tsx
|
|
3568
|
-
var
|
|
3656
|
+
var import_jsx_runtime42, Content2;
|
|
3569
3657
|
var init_Content2 = __esm({
|
|
3570
3658
|
"src/components/Modal/Content.tsx"() {
|
|
3571
3659
|
"use strict";
|
|
3572
|
-
|
|
3573
|
-
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0,
|
|
3660
|
+
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3661
|
+
Content2 = ({ ref, children, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { ref, ...otherProps, className: "mobius-modal__content", children });
|
|
3574
3662
|
Content2.displayName = "Content";
|
|
3575
3663
|
}
|
|
3576
3664
|
});
|
|
3577
3665
|
|
|
3578
3666
|
// src/components/Modal/ModalContext.tsx
|
|
3579
|
-
var
|
|
3667
|
+
var import_react28, ModalContext;
|
|
3580
3668
|
var init_ModalContext = __esm({
|
|
3581
3669
|
"src/components/Modal/ModalContext.tsx"() {
|
|
3582
3670
|
"use strict";
|
|
3583
|
-
|
|
3584
|
-
ModalContext = (0,
|
|
3671
|
+
import_react28 = require("react");
|
|
3672
|
+
ModalContext = (0, import_react28.createContext)({
|
|
3585
3673
|
onClose: () => {
|
|
3586
3674
|
},
|
|
3587
3675
|
closeLabel: void 0
|
|
@@ -3590,21 +3678,21 @@ var init_ModalContext = __esm({
|
|
|
3590
3678
|
});
|
|
3591
3679
|
|
|
3592
3680
|
// src/components/Modal/useModal.ts
|
|
3593
|
-
var
|
|
3681
|
+
var import_react29, useModal;
|
|
3594
3682
|
var init_useModal = __esm({
|
|
3595
3683
|
"src/components/Modal/useModal.ts"() {
|
|
3596
3684
|
"use strict";
|
|
3597
|
-
|
|
3685
|
+
import_react29 = require("react");
|
|
3598
3686
|
init_ModalContext();
|
|
3599
3687
|
useModal = () => {
|
|
3600
|
-
const { onClose, closeLabel } = (0,
|
|
3688
|
+
const { onClose, closeLabel } = (0, import_react29.useContext)(ModalContext);
|
|
3601
3689
|
return { onClose, closeLabel };
|
|
3602
3690
|
};
|
|
3603
3691
|
}
|
|
3604
3692
|
});
|
|
3605
3693
|
|
|
3606
3694
|
// src/components/Modal/Header.tsx
|
|
3607
|
-
var import_icons9,
|
|
3695
|
+
var import_icons9, import_jsx_runtime43, Header2;
|
|
3608
3696
|
var init_Header2 = __esm({
|
|
3609
3697
|
"src/components/Modal/Header.tsx"() {
|
|
3610
3698
|
"use strict";
|
|
@@ -3612,12 +3700,12 @@ var init_Header2 = __esm({
|
|
|
3612
3700
|
init_Button2();
|
|
3613
3701
|
init_Icon2();
|
|
3614
3702
|
init_useModal();
|
|
3615
|
-
|
|
3703
|
+
import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3616
3704
|
Header2 = ({ ref, children, ...otherProps }) => {
|
|
3617
3705
|
const { onClose, closeLabel } = useModal();
|
|
3618
|
-
return /* @__PURE__ */ (0,
|
|
3706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("header", { ref, ...otherProps, className: "mobius-modal__header", children: [
|
|
3619
3707
|
children,
|
|
3620
|
-
/* @__PURE__ */ (0,
|
|
3708
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3621
3709
|
Button,
|
|
3622
3710
|
{
|
|
3623
3711
|
"aria-label": "Close",
|
|
@@ -3625,7 +3713,7 @@ var init_Header2 = __esm({
|
|
|
3625
3713
|
onPress: onClose,
|
|
3626
3714
|
className: "mobius-modal__close",
|
|
3627
3715
|
children: [
|
|
3628
|
-
/* @__PURE__ */ (0,
|
|
3716
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon: import_icons9.cross }),
|
|
3629
3717
|
" ",
|
|
3630
3718
|
closeLabel
|
|
3631
3719
|
]
|
|
@@ -3638,19 +3726,19 @@ var init_Header2 = __esm({
|
|
|
3638
3726
|
});
|
|
3639
3727
|
|
|
3640
3728
|
// src/components/Modal/Modal.tsx
|
|
3641
|
-
var
|
|
3729
|
+
var import_dedupe35, import_react30, import_Modal, import_jsx_runtime44, TRANSITION_CSS_VARIABLE2, Modal;
|
|
3642
3730
|
var init_Modal = __esm({
|
|
3643
3731
|
"src/components/Modal/Modal.tsx"() {
|
|
3644
3732
|
"use strict";
|
|
3645
3733
|
"use client";
|
|
3646
|
-
|
|
3647
|
-
|
|
3734
|
+
import_dedupe35 = __toESM(require("classnames/dedupe"));
|
|
3735
|
+
import_react30 = require("react");
|
|
3648
3736
|
init_hooks();
|
|
3649
3737
|
init_utils();
|
|
3650
3738
|
init_polyfill_tests();
|
|
3651
3739
|
init_ModalContext();
|
|
3652
3740
|
import_Modal = require("@simplybusiness/mobius/src/components/Modal/Modal.css");
|
|
3653
|
-
|
|
3741
|
+
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3654
3742
|
TRANSITION_CSS_VARIABLE2 = "--modal-transition-duration";
|
|
3655
3743
|
Modal = ({ ref, ...props }) => {
|
|
3656
3744
|
const {
|
|
@@ -3664,11 +3752,11 @@ var init_Modal = __esm({
|
|
|
3664
3752
|
animation,
|
|
3665
3753
|
...rest
|
|
3666
3754
|
} = props;
|
|
3667
|
-
const [shouldTransition, setShouldTransition] = (0,
|
|
3668
|
-
(0,
|
|
3755
|
+
const [shouldTransition, setShouldTransition] = (0, import_react30.useState)(false);
|
|
3756
|
+
(0, import_react30.useEffect)(() => {
|
|
3669
3757
|
setShouldTransition(supportsDialog());
|
|
3670
3758
|
}, []);
|
|
3671
|
-
const dialogRef = (0,
|
|
3759
|
+
const dialogRef = (0, import_react30.useRef)(null);
|
|
3672
3760
|
const { close } = useDialog({
|
|
3673
3761
|
ref: dialogRef,
|
|
3674
3762
|
isOpen,
|
|
@@ -3679,7 +3767,7 @@ var init_Modal = __esm({
|
|
|
3679
3767
|
CSSVariable: TRANSITION_CSS_VARIABLE2
|
|
3680
3768
|
}
|
|
3681
3769
|
});
|
|
3682
|
-
const modalClasses = (0,
|
|
3770
|
+
const modalClasses = (0, import_dedupe35.default)(
|
|
3683
3771
|
"mobius",
|
|
3684
3772
|
"mobius-modal",
|
|
3685
3773
|
{
|
|
@@ -3692,21 +3780,21 @@ var init_Modal = __esm({
|
|
|
3692
3780
|
},
|
|
3693
3781
|
className
|
|
3694
3782
|
);
|
|
3695
|
-
const contextValue = (0,
|
|
3783
|
+
const contextValue = (0, import_react30.useMemo)(
|
|
3696
3784
|
() => ({
|
|
3697
3785
|
onClose: close,
|
|
3698
3786
|
closeLabel
|
|
3699
3787
|
}),
|
|
3700
3788
|
[close, closeLabel]
|
|
3701
3789
|
);
|
|
3702
|
-
return /* @__PURE__ */ (0,
|
|
3790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3703
3791
|
"dialog",
|
|
3704
3792
|
{
|
|
3705
3793
|
ref: mergeRefs([dialogRef, ref]),
|
|
3706
3794
|
onCancel: close,
|
|
3707
3795
|
className: modalClasses,
|
|
3708
3796
|
...rest,
|
|
3709
|
-
children: /* @__PURE__ */ (0,
|
|
3797
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ModalContext.Provider, { value: contextValue, children })
|
|
3710
3798
|
}
|
|
3711
3799
|
);
|
|
3712
3800
|
};
|
|
@@ -3739,18 +3827,18 @@ var init_NumberField = __esm({
|
|
|
3739
3827
|
});
|
|
3740
3828
|
|
|
3741
3829
|
// src/components/Option/Option.tsx
|
|
3742
|
-
var
|
|
3830
|
+
var import_jsx_runtime45, Option2;
|
|
3743
3831
|
var init_Option2 = __esm({
|
|
3744
3832
|
"src/components/Option/Option.tsx"() {
|
|
3745
3833
|
"use strict";
|
|
3746
|
-
|
|
3834
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3747
3835
|
Option2 = ({ ref, ...props }) => {
|
|
3748
3836
|
const { isDisabled, ...rest } = props;
|
|
3749
3837
|
const mappedProps = {
|
|
3750
3838
|
...rest,
|
|
3751
3839
|
disabled: isDisabled
|
|
3752
3840
|
};
|
|
3753
|
-
return /* @__PURE__ */ (0,
|
|
3841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("option", { ...mappedProps, ref });
|
|
3754
3842
|
};
|
|
3755
3843
|
Option2.displayName = "Option";
|
|
3756
3844
|
}
|
|
@@ -3765,17 +3853,17 @@ var init_Option3 = __esm({
|
|
|
3765
3853
|
});
|
|
3766
3854
|
|
|
3767
3855
|
// src/components/PasswordField/ShowHideButton.tsx
|
|
3768
|
-
var import_icons10,
|
|
3856
|
+
var import_icons10, import_jsx_runtime46, ShowHideButton;
|
|
3769
3857
|
var init_ShowHideButton = __esm({
|
|
3770
3858
|
"src/components/PasswordField/ShowHideButton.tsx"() {
|
|
3771
3859
|
"use strict";
|
|
3772
3860
|
import_icons10 = require("@simplybusiness/icons");
|
|
3773
3861
|
init_src();
|
|
3774
|
-
|
|
3862
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3775
3863
|
ShowHideButton = ({
|
|
3776
3864
|
show = false,
|
|
3777
3865
|
onClick
|
|
3778
|
-
}) => /* @__PURE__ */ (0,
|
|
3866
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3779
3867
|
"button",
|
|
3780
3868
|
{
|
|
3781
3869
|
className: "mobius-password-field__show-button",
|
|
@@ -3786,35 +3874,35 @@ var init_ShowHideButton = __esm({
|
|
|
3786
3874
|
},
|
|
3787
3875
|
"aria-label": `${show ? "Hide" : "Show"} password`,
|
|
3788
3876
|
"data-testid": "show-hide-button",
|
|
3789
|
-
children: /* @__PURE__ */ (0,
|
|
3877
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon, { icon: show ? import_icons10.eyeSlash : import_icons10.eye, "aria-hidden": "true" })
|
|
3790
3878
|
}
|
|
3791
3879
|
);
|
|
3792
3880
|
}
|
|
3793
3881
|
});
|
|
3794
3882
|
|
|
3795
3883
|
// src/components/PasswordField/PasswordField.tsx
|
|
3796
|
-
var
|
|
3884
|
+
var import_dedupe36, import_react31, import_PasswordField, import_jsx_runtime47, PasswordField;
|
|
3797
3885
|
var init_PasswordField = __esm({
|
|
3798
3886
|
"src/components/PasswordField/PasswordField.tsx"() {
|
|
3799
3887
|
"use strict";
|
|
3800
3888
|
"use client";
|
|
3801
|
-
|
|
3802
|
-
|
|
3889
|
+
import_dedupe36 = __toESM(require("classnames/dedupe"));
|
|
3890
|
+
import_react31 = require("react");
|
|
3803
3891
|
init_mergeRefs();
|
|
3804
3892
|
init_TextField2();
|
|
3805
3893
|
init_ShowHideButton();
|
|
3806
3894
|
import_PasswordField = require("@simplybusiness/mobius/src/components/PasswordField/PasswordField.css");
|
|
3807
|
-
|
|
3895
|
+
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3808
3896
|
PasswordField = ({
|
|
3809
3897
|
ref,
|
|
3810
3898
|
className,
|
|
3811
3899
|
autoComplete = "current-password",
|
|
3812
3900
|
...props
|
|
3813
3901
|
}) => {
|
|
3814
|
-
const [show, setShow] = (0,
|
|
3902
|
+
const [show, setShow] = (0, import_react31.useState)(false);
|
|
3815
3903
|
const type = show ? "text" : "password";
|
|
3816
|
-
const classes = (0,
|
|
3817
|
-
const localRef = (0,
|
|
3904
|
+
const classes = (0, import_dedupe36.default)("mobius-password-field", className);
|
|
3905
|
+
const localRef = (0, import_react31.useRef)(null);
|
|
3818
3906
|
const handleShowHideButtonClick = () => {
|
|
3819
3907
|
const selectionStart = localRef.current?.selectionStart;
|
|
3820
3908
|
const selectionEnd = localRef.current?.selectionEnd;
|
|
@@ -3826,7 +3914,7 @@ var init_PasswordField = __esm({
|
|
|
3826
3914
|
}
|
|
3827
3915
|
});
|
|
3828
3916
|
};
|
|
3829
|
-
return /* @__PURE__ */ (0,
|
|
3917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3830
3918
|
TextField,
|
|
3831
3919
|
{
|
|
3832
3920
|
ref: mergeRefs([localRef, ref]),
|
|
@@ -3834,7 +3922,7 @@ var init_PasswordField = __esm({
|
|
|
3834
3922
|
...props,
|
|
3835
3923
|
autoComplete,
|
|
3836
3924
|
type,
|
|
3837
|
-
suffixInside: /* @__PURE__ */ (0,
|
|
3925
|
+
suffixInside: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ShowHideButton, { onClick: handleShowHideButtonClick, show })
|
|
3838
3926
|
}
|
|
3839
3927
|
);
|
|
3840
3928
|
};
|
|
@@ -3851,17 +3939,17 @@ var init_PasswordField2 = __esm({
|
|
|
3851
3939
|
});
|
|
3852
3940
|
|
|
3853
3941
|
// src/components/Popover/Popover.tsx
|
|
3854
|
-
var
|
|
3942
|
+
var import_react32, import_icons11, import_dedupe37, import_react33, import_mobius_hooks6, import_Popover, import_jsx_runtime48;
|
|
3855
3943
|
var init_Popover = __esm({
|
|
3856
3944
|
"src/components/Popover/Popover.tsx"() {
|
|
3857
3945
|
"use strict";
|
|
3858
|
-
|
|
3946
|
+
import_react32 = require("@floating-ui/react");
|
|
3859
3947
|
import_icons11 = require("@simplybusiness/icons");
|
|
3860
|
-
|
|
3861
|
-
|
|
3948
|
+
import_dedupe37 = __toESM(require("classnames/dedupe"));
|
|
3949
|
+
import_react33 = require("react");
|
|
3862
3950
|
import_mobius_hooks6 = require("@simplybusiness/mobius-hooks");
|
|
3863
3951
|
import_Popover = require("@simplybusiness/mobius/src/components/Popover/Popover.css");
|
|
3864
|
-
|
|
3952
|
+
import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3865
3953
|
}
|
|
3866
3954
|
});
|
|
3867
3955
|
|
|
@@ -3885,17 +3973,17 @@ function warnAboutInvalidValues(value, minValue, maxValue) {
|
|
|
3885
3973
|
console.warn("Progress value is greater than maxValue");
|
|
3886
3974
|
}
|
|
3887
3975
|
}
|
|
3888
|
-
var
|
|
3976
|
+
var import_dedupe38, import_react34, import_Progress, import_jsx_runtime49, sanitizedValue, getLabelComponent, DEFAULT_VALUE, DEFAULT_MIN_VALUE, DEFAULT_MAX_VALUE, Progress;
|
|
3889
3977
|
var init_Progress = __esm({
|
|
3890
3978
|
"src/components/Progress/Progress.tsx"() {
|
|
3891
3979
|
"use strict";
|
|
3892
3980
|
"use client";
|
|
3893
|
-
|
|
3894
|
-
|
|
3981
|
+
import_dedupe38 = __toESM(require("classnames/dedupe"));
|
|
3982
|
+
import_react34 = require("react");
|
|
3895
3983
|
init_Label2();
|
|
3896
3984
|
init_VisuallyHidden2();
|
|
3897
3985
|
import_Progress = require("@simplybusiness/mobius/src/components/Progress/Progress.css");
|
|
3898
|
-
|
|
3986
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3899
3987
|
sanitizedValue = (value, defaultValue) => {
|
|
3900
3988
|
if (value === void 0 || Number.isNaN(value)) {
|
|
3901
3989
|
return defaultValue;
|
|
@@ -3904,7 +3992,7 @@ var init_Progress = __esm({
|
|
|
3904
3992
|
};
|
|
3905
3993
|
getLabelComponent = (label, progressLabelId, showLabel) => {
|
|
3906
3994
|
if (showLabel) {
|
|
3907
|
-
return /* @__PURE__ */ (0,
|
|
3995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3908
3996
|
Label,
|
|
3909
3997
|
{
|
|
3910
3998
|
id: progressLabelId,
|
|
@@ -3914,7 +4002,7 @@ var init_Progress = __esm({
|
|
|
3914
4002
|
}
|
|
3915
4003
|
);
|
|
3916
4004
|
}
|
|
3917
|
-
return /* @__PURE__ */ (0,
|
|
4005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3918
4006
|
Label,
|
|
3919
4007
|
{
|
|
3920
4008
|
id: progressLabelId,
|
|
@@ -3928,8 +4016,8 @@ var init_Progress = __esm({
|
|
|
3928
4016
|
DEFAULT_MIN_VALUE = 0;
|
|
3929
4017
|
DEFAULT_MAX_VALUE = 100;
|
|
3930
4018
|
Progress = ({ ref, ...props }) => {
|
|
3931
|
-
const progressId = (0,
|
|
3932
|
-
const progressLabelId = (0,
|
|
4019
|
+
const progressId = (0, import_react34.useId)();
|
|
4020
|
+
const progressLabelId = (0, import_react34.useId)();
|
|
3933
4021
|
const {
|
|
3934
4022
|
id,
|
|
3935
4023
|
label,
|
|
@@ -3954,7 +4042,7 @@ var init_Progress = __esm({
|
|
|
3954
4042
|
100
|
|
3955
4043
|
);
|
|
3956
4044
|
const barWidth = `${percentage}%`;
|
|
3957
|
-
const classes = (0,
|
|
4045
|
+
const classes = (0, import_dedupe38.default)("mobius", "mobius-progress", className, {
|
|
3958
4046
|
"--is-primary": variant === "primary",
|
|
3959
4047
|
"--is-secondary": variant === "secondary"
|
|
3960
4048
|
});
|
|
@@ -3964,7 +4052,7 @@ var init_Progress = __esm({
|
|
|
3964
4052
|
progressBarProps["aria-valuenow"] = value.toString();
|
|
3965
4053
|
progressBarProps["aria-valuetext"] = valueFormatter instanceof Function ? valueFormatter(value, minValue, maxValue) : barWidth;
|
|
3966
4054
|
const labelComponent = getLabelComponent(label, progressLabelId, showLabel);
|
|
3967
|
-
return /* @__PURE__ */ (0,
|
|
4055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
3968
4056
|
"div",
|
|
3969
4057
|
{
|
|
3970
4058
|
id: id || progressId,
|
|
@@ -3975,8 +4063,8 @@ var init_Progress = __esm({
|
|
|
3975
4063
|
"aria-labelledby": progressLabelId,
|
|
3976
4064
|
children: [
|
|
3977
4065
|
labelComponent,
|
|
3978
|
-
/* @__PURE__ */ (0,
|
|
3979
|
-
showValueLabel && /* @__PURE__ */ (0,
|
|
4066
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mobius-progress__track", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mobius-progress__bar", style: { width: barWidth } }) }),
|
|
4067
|
+
showValueLabel && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Label, { "data-testid": "value-label", elementType: "span", children: progressBarProps["aria-valuetext"] })
|
|
3980
4068
|
]
|
|
3981
4069
|
}
|
|
3982
4070
|
);
|
|
@@ -3994,17 +4082,17 @@ var init_Progress2 = __esm({
|
|
|
3994
4082
|
});
|
|
3995
4083
|
|
|
3996
4084
|
// src/components/Radio/Radio.tsx
|
|
3997
|
-
var
|
|
4085
|
+
var import_dedupe39, import_react35, import_Radio, import_jsx_runtime50, Radio;
|
|
3998
4086
|
var init_Radio = __esm({
|
|
3999
4087
|
"src/components/Radio/Radio.tsx"() {
|
|
4000
4088
|
"use strict";
|
|
4001
4089
|
"use client";
|
|
4002
|
-
|
|
4003
|
-
|
|
4090
|
+
import_dedupe39 = __toESM(require("classnames/dedupe"));
|
|
4091
|
+
import_react35 = require("react");
|
|
4004
4092
|
init_ErrorMessage2();
|
|
4005
4093
|
init_Label2();
|
|
4006
4094
|
import_Radio = require("@simplybusiness/mobius/src/components/Radio/Radio.css");
|
|
4007
|
-
|
|
4095
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4008
4096
|
Radio = ({ ref, ...props }) => {
|
|
4009
4097
|
const {
|
|
4010
4098
|
children,
|
|
@@ -4028,19 +4116,19 @@ var init_Radio = __esm({
|
|
|
4028
4116
|
const isMultiline = label && children;
|
|
4029
4117
|
const isControlled = selected !== void 0;
|
|
4030
4118
|
const isChecked = isControlled ? selected === value : defaultChecked;
|
|
4031
|
-
const contentRef = (0,
|
|
4032
|
-
const prevOverflowRef = (0,
|
|
4119
|
+
const contentRef = (0, import_react35.useRef)(null);
|
|
4120
|
+
const prevOverflowRef = (0, import_react35.useRef)({
|
|
4033
4121
|
vertical: false,
|
|
4034
4122
|
horizontal: false
|
|
4035
4123
|
});
|
|
4036
|
-
const hasIconFirst = (0,
|
|
4037
|
-
if (!children ||
|
|
4038
|
-
const firstChild =
|
|
4039
|
-
if (!(0,
|
|
4124
|
+
const hasIconFirst = (0, import_react35.useMemo)(() => {
|
|
4125
|
+
if (!children || import_react35.Children.count(children) === 0) return false;
|
|
4126
|
+
const firstChild = import_react35.Children.toArray(children)[0];
|
|
4127
|
+
if (!(0, import_react35.isValidElement)(firstChild)) return false;
|
|
4040
4128
|
const props2 = firstChild.props;
|
|
4041
4129
|
return "icon" in props2 && props2.icon !== void 0;
|
|
4042
4130
|
}, [children]);
|
|
4043
|
-
(0,
|
|
4131
|
+
(0, import_react35.useLayoutEffect)(() => {
|
|
4044
4132
|
if (!contentRef.current || !onOverflow) return;
|
|
4045
4133
|
if (orientation === "vertical") {
|
|
4046
4134
|
return;
|
|
@@ -4069,13 +4157,13 @@ var init_Radio = __esm({
|
|
|
4069
4157
|
"--is-multiline": !!isMultiline,
|
|
4070
4158
|
"--is-required": isRequired
|
|
4071
4159
|
};
|
|
4072
|
-
const containerClasses = (0,
|
|
4160
|
+
const containerClasses = (0, import_dedupe39.default)(
|
|
4073
4161
|
"mobius-radio__label",
|
|
4074
4162
|
radioClasses,
|
|
4075
4163
|
className,
|
|
4076
4164
|
{ "--has-icon-first": hasIconFirst }
|
|
4077
4165
|
);
|
|
4078
|
-
const inputClasses = (0,
|
|
4166
|
+
const inputClasses = (0, import_dedupe39.default)("mobius-radio__input", radioClasses);
|
|
4079
4167
|
const { "aria-describedby": _ariaDescribedBy, ...rest } = otherProps;
|
|
4080
4168
|
const handleChange = (event) => {
|
|
4081
4169
|
if (setSelected) {
|
|
@@ -4089,9 +4177,9 @@ var init_Radio = __esm({
|
|
|
4089
4177
|
onChange(adaptedEvent);
|
|
4090
4178
|
}
|
|
4091
4179
|
};
|
|
4092
|
-
return /* @__PURE__ */ (0,
|
|
4093
|
-
/* @__PURE__ */ (0,
|
|
4094
|
-
/* @__PURE__ */ (0,
|
|
4180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
4181
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Label, { className: containerClasses, children: [
|
|
4182
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4095
4183
|
"input",
|
|
4096
4184
|
{
|
|
4097
4185
|
"aria-describedby": otherProps["aria-describedby"],
|
|
@@ -4108,12 +4196,12 @@ var init_Radio = __esm({
|
|
|
4108
4196
|
...rest
|
|
4109
4197
|
}
|
|
4110
4198
|
),
|
|
4111
|
-
isMultiline ? /* @__PURE__ */ (0,
|
|
4112
|
-
/* @__PURE__ */ (0,
|
|
4113
|
-
/* @__PURE__ */ (0,
|
|
4114
|
-
] }) : /* @__PURE__ */ (0,
|
|
4199
|
+
isMultiline ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { ref: contentRef, className: "mobius-radio__content--multiline", children: [
|
|
4200
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mobius-radio__content-first-line", children: label }),
|
|
4201
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mobius-radio__extra-content", children })
|
|
4202
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { ref: contentRef, className: "mobius-radio__content", children: label || children })
|
|
4115
4203
|
] }),
|
|
4116
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
4204
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ErrorMessage, { errorMessage })
|
|
4117
4205
|
] });
|
|
4118
4206
|
};
|
|
4119
4207
|
Radio.displayName = "Radio";
|
|
@@ -4121,19 +4209,19 @@ var init_Radio = __esm({
|
|
|
4121
4209
|
});
|
|
4122
4210
|
|
|
4123
4211
|
// src/components/Radio/RadioGroup.tsx
|
|
4124
|
-
var
|
|
4212
|
+
var import_dedupe40, import_react36, import_jsx_runtime51, getDefaultVal, RadioGroup;
|
|
4125
4213
|
var init_RadioGroup = __esm({
|
|
4126
4214
|
"src/components/Radio/RadioGroup.tsx"() {
|
|
4127
4215
|
"use strict";
|
|
4128
4216
|
"use client";
|
|
4129
|
-
|
|
4130
|
-
|
|
4217
|
+
import_dedupe40 = __toESM(require("classnames/dedupe"));
|
|
4218
|
+
import_react36 = require("react");
|
|
4131
4219
|
init_hooks();
|
|
4132
4220
|
init_spaceDelimitedList();
|
|
4133
4221
|
init_ErrorMessage2();
|
|
4134
4222
|
init_Label2();
|
|
4135
4223
|
init_Stack2();
|
|
4136
|
-
|
|
4224
|
+
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4137
4225
|
getDefaultVal = (children, defaultValue) => {
|
|
4138
4226
|
if (Array.isArray(children) && defaultValue) {
|
|
4139
4227
|
const option = children?.find((item) => item.props.value === defaultValue);
|
|
@@ -4161,15 +4249,15 @@ var init_RadioGroup = __esm({
|
|
|
4161
4249
|
...rest
|
|
4162
4250
|
} = props;
|
|
4163
4251
|
const defaultSelected = getDefaultVal(children, value || defaultValue);
|
|
4164
|
-
const [selected, setSelected] = (0,
|
|
4165
|
-
const overflowsRef = (0,
|
|
4166
|
-
const [hasOverflow, setHasOverflow] = (0,
|
|
4167
|
-
(0,
|
|
4252
|
+
const [selected, setSelected] = (0, import_react36.useState)(defaultSelected);
|
|
4253
|
+
const overflowsRef = (0, import_react36.useRef)({});
|
|
4254
|
+
const [hasOverflow, setHasOverflow] = (0, import_react36.useState)(false);
|
|
4255
|
+
(0, import_react36.useEffect)(() => {
|
|
4168
4256
|
if (value !== void 0) {
|
|
4169
4257
|
setSelected(value);
|
|
4170
4258
|
}
|
|
4171
4259
|
}, [value]);
|
|
4172
|
-
const handleOverflow = (0,
|
|
4260
|
+
const handleOverflow = (0, import_react36.useCallback)(
|
|
4173
4261
|
(radioValue, overflow) => {
|
|
4174
4262
|
overflowsRef.current = {
|
|
4175
4263
|
...overflowsRef.current,
|
|
@@ -4193,26 +4281,26 @@ var init_RadioGroup = __esm({
|
|
|
4193
4281
|
[`--is-${effectiveOrientation}`]: true,
|
|
4194
4282
|
[className || ""]: true
|
|
4195
4283
|
};
|
|
4196
|
-
const radioGroupClasses = (0,
|
|
4284
|
+
const radioGroupClasses = (0, import_dedupe40.default)(
|
|
4197
4285
|
"mobius",
|
|
4198
4286
|
"mobius-radio-group",
|
|
4199
4287
|
radioClasses,
|
|
4200
4288
|
validationClasses
|
|
4201
4289
|
);
|
|
4202
|
-
const radioWrapperClasses = (0,
|
|
4290
|
+
const radioWrapperClasses = (0, import_dedupe40.default)("mobius-radio__wrapper", {
|
|
4203
4291
|
[`--is-${effectiveOrientation}`]: true
|
|
4204
4292
|
});
|
|
4205
|
-
const labelClasses = (0,
|
|
4206
|
-
const errorMessageId = (0,
|
|
4207
|
-
const defaultNameAttrId = (0,
|
|
4293
|
+
const labelClasses = (0, import_dedupe40.default)(radioClasses, validationClasses);
|
|
4294
|
+
const errorMessageId = (0, import_react36.useId)();
|
|
4295
|
+
const defaultNameAttrId = (0, import_react36.useId)();
|
|
4208
4296
|
const nameAttribute = name || defaultNameAttrId;
|
|
4209
4297
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
4210
4298
|
const describedBy = spaceDelimitedList([
|
|
4211
4299
|
shouldErrorMessageShow,
|
|
4212
4300
|
props["aria-describedby"]
|
|
4213
4301
|
]);
|
|
4214
|
-
const labelId = (0,
|
|
4215
|
-
return /* @__PURE__ */ (0,
|
|
4302
|
+
const labelId = (0, import_react36.useId)();
|
|
4303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4216
4304
|
"div",
|
|
4217
4305
|
{
|
|
4218
4306
|
...rest,
|
|
@@ -4228,12 +4316,12 @@ var init_RadioGroup = __esm({
|
|
|
4228
4316
|
ref,
|
|
4229
4317
|
className: radioGroupClasses,
|
|
4230
4318
|
role: "radiogroup",
|
|
4231
|
-
children: /* @__PURE__ */ (0,
|
|
4232
|
-
label && /* @__PURE__ */ (0,
|
|
4233
|
-
/* @__PURE__ */ (0,
|
|
4234
|
-
if ((0,
|
|
4319
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Stack, { gap: "xs", children: [
|
|
4320
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Label, { htmlFor: name, id: labelId, className: labelClasses, children: label }),
|
|
4321
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: radioWrapperClasses, children: import_react36.Children.map(children, (child) => {
|
|
4322
|
+
if ((0, import_react36.isValidElement)(child)) {
|
|
4235
4323
|
const childValue = child.props.value;
|
|
4236
|
-
return (0,
|
|
4324
|
+
return (0, import_react36.cloneElement)(
|
|
4237
4325
|
child,
|
|
4238
4326
|
{
|
|
4239
4327
|
orientation: effectiveOrientation,
|
|
@@ -4251,7 +4339,7 @@ var init_RadioGroup = __esm({
|
|
|
4251
4339
|
}
|
|
4252
4340
|
return child;
|
|
4253
4341
|
}) }),
|
|
4254
|
-
/* @__PURE__ */ (0,
|
|
4342
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
4255
4343
|
] })
|
|
4256
4344
|
}
|
|
4257
4345
|
);
|
|
@@ -4270,47 +4358,47 @@ var init_Radio2 = __esm({
|
|
|
4270
4358
|
});
|
|
4271
4359
|
|
|
4272
4360
|
// src/components/Segment/SegmentGroup.tsx
|
|
4273
|
-
var
|
|
4361
|
+
var import_dedupe41, import_jsx_runtime52, SegmentGroup;
|
|
4274
4362
|
var init_SegmentGroup = __esm({
|
|
4275
4363
|
"src/components/Segment/SegmentGroup.tsx"() {
|
|
4276
4364
|
"use strict";
|
|
4277
|
-
|
|
4278
|
-
|
|
4365
|
+
import_dedupe41 = __toESM(require("classnames/dedupe"));
|
|
4366
|
+
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4279
4367
|
SegmentGroup = (props) => {
|
|
4280
4368
|
const { children, horizontal, gap, className, ...rest } = props;
|
|
4281
4369
|
const gapClass = gap ? `gap-${gap}` : "";
|
|
4282
|
-
const classes = (0,
|
|
4370
|
+
const classes = (0, import_dedupe41.default)(
|
|
4283
4371
|
"mobius",
|
|
4284
4372
|
"mobius-segment-group",
|
|
4285
4373
|
className,
|
|
4286
4374
|
{ "--is-horizontal": horizontal },
|
|
4287
4375
|
gapClass
|
|
4288
4376
|
);
|
|
4289
|
-
return /* @__PURE__ */ (0,
|
|
4377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: classes, ...rest, children });
|
|
4290
4378
|
};
|
|
4291
4379
|
SegmentGroup.displayName = "SegmentGroup";
|
|
4292
4380
|
}
|
|
4293
4381
|
});
|
|
4294
4382
|
|
|
4295
4383
|
// src/components/Segment/Segment.tsx
|
|
4296
|
-
var
|
|
4384
|
+
var import_dedupe42, import_Segment, import_jsx_runtime53, Segment;
|
|
4297
4385
|
var init_Segment = __esm({
|
|
4298
4386
|
"src/components/Segment/Segment.tsx"() {
|
|
4299
4387
|
"use strict";
|
|
4300
|
-
|
|
4388
|
+
import_dedupe42 = __toESM(require("classnames/dedupe"));
|
|
4301
4389
|
import_Segment = require("@simplybusiness/mobius/src/components/Segment/Segment.css");
|
|
4302
|
-
|
|
4390
|
+
import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4303
4391
|
Segment = (props) => {
|
|
4304
4392
|
const { heading, children, colour, inverted, className, ...rest } = props;
|
|
4305
|
-
const classes = (0,
|
|
4393
|
+
const classes = (0, import_dedupe42.default)(
|
|
4306
4394
|
"mobius",
|
|
4307
4395
|
"mobius-segment",
|
|
4308
4396
|
colour,
|
|
4309
4397
|
{ inverted },
|
|
4310
4398
|
className
|
|
4311
4399
|
);
|
|
4312
|
-
return /* @__PURE__ */ (0,
|
|
4313
|
-
heading && /* @__PURE__ */ (0,
|
|
4400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: classes, ...rest, children: [
|
|
4401
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mobius-segment__heading", children: heading }),
|
|
4314
4402
|
children
|
|
4315
4403
|
] });
|
|
4316
4404
|
};
|
|
@@ -4328,14 +4416,14 @@ var init_Segment2 = __esm({
|
|
|
4328
4416
|
});
|
|
4329
4417
|
|
|
4330
4418
|
// src/components/Select/Select.tsx
|
|
4331
|
-
var import_icons12,
|
|
4419
|
+
var import_icons12, import_dedupe43, import_react37, import_Select, import_jsx_runtime54, Select;
|
|
4332
4420
|
var init_Select = __esm({
|
|
4333
4421
|
"src/components/Select/Select.tsx"() {
|
|
4334
4422
|
"use strict";
|
|
4335
4423
|
"use client";
|
|
4336
4424
|
import_icons12 = require("@simplybusiness/icons");
|
|
4337
|
-
|
|
4338
|
-
|
|
4425
|
+
import_dedupe43 = __toESM(require("classnames/dedupe"));
|
|
4426
|
+
import_react37 = require("react");
|
|
4339
4427
|
init_hooks();
|
|
4340
4428
|
init_useLabel2();
|
|
4341
4429
|
init_spaceDelimitedList();
|
|
@@ -4344,7 +4432,7 @@ var init_Select = __esm({
|
|
|
4344
4432
|
init_Label2();
|
|
4345
4433
|
init_Stack2();
|
|
4346
4434
|
import_Select = require("@simplybusiness/mobius/src/components/Select/Select.css");
|
|
4347
|
-
|
|
4435
|
+
import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4348
4436
|
Select = ({ ref, ...props }) => {
|
|
4349
4437
|
const {
|
|
4350
4438
|
label,
|
|
@@ -4365,24 +4453,24 @@ var init_Select = __esm({
|
|
|
4365
4453
|
"--is-required": typeof isRequired === "boolean" && isRequired,
|
|
4366
4454
|
"--is-optional": typeof isRequired === "boolean" && !isRequired
|
|
4367
4455
|
};
|
|
4368
|
-
const sharedClasses = (0,
|
|
4369
|
-
const wrapperClasses = (0,
|
|
4456
|
+
const sharedClasses = (0, import_dedupe43.default)(validationClasses, stateClasses);
|
|
4457
|
+
const wrapperClasses = (0, import_dedupe43.default)(
|
|
4370
4458
|
"mobius-select__wrapper",
|
|
4371
4459
|
sharedClasses,
|
|
4372
4460
|
otherProps.className
|
|
4373
4461
|
);
|
|
4374
|
-
const selectClasses = (0,
|
|
4462
|
+
const selectClasses = (0, import_dedupe43.default)(
|
|
4375
4463
|
"mobius-select",
|
|
4376
4464
|
sharedClasses,
|
|
4377
4465
|
otherProps.className
|
|
4378
4466
|
);
|
|
4379
|
-
const labelClasses = (0,
|
|
4467
|
+
const labelClasses = (0, import_dedupe43.default)(
|
|
4380
4468
|
"mobius-label",
|
|
4381
4469
|
sharedClasses,
|
|
4382
4470
|
otherProps.className
|
|
4383
4471
|
);
|
|
4384
|
-
const iconClasses = (0,
|
|
4385
|
-
const errorMessageId = (0,
|
|
4472
|
+
const iconClasses = (0, import_dedupe43.default)("mobius-select__icon", sharedClasses);
|
|
4473
|
+
const errorMessageId = (0, import_react37.useId)();
|
|
4386
4474
|
const shouldErrorMessageShow = errorMessage ? errorMessageId : void 0;
|
|
4387
4475
|
const describedBy = spaceDelimitedList([
|
|
4388
4476
|
shouldErrorMessageShow,
|
|
@@ -4393,10 +4481,10 @@ var init_Select = __esm({
|
|
|
4393
4481
|
onChange(e);
|
|
4394
4482
|
}
|
|
4395
4483
|
};
|
|
4396
|
-
return /* @__PURE__ */ (0,
|
|
4397
|
-
label && /* @__PURE__ */ (0,
|
|
4398
|
-
/* @__PURE__ */ (0,
|
|
4399
|
-
/* @__PURE__ */ (0,
|
|
4484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Stack, { className: "mobius mobius-select__outer", gap: "xs", children: [
|
|
4485
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Label, { ...labelProps, className: labelClasses, children: label }),
|
|
4486
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: wrapperClasses, children: [
|
|
4487
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4400
4488
|
"select",
|
|
4401
4489
|
{
|
|
4402
4490
|
...otherProps,
|
|
@@ -4412,9 +4500,9 @@ var init_Select = __esm({
|
|
|
4412
4500
|
onChange: handleChange
|
|
4413
4501
|
}
|
|
4414
4502
|
),
|
|
4415
|
-
/* @__PURE__ */ (0,
|
|
4503
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: iconClasses, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon, { icon: import_icons12.chevronDown }) })
|
|
4416
4504
|
] }),
|
|
4417
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
4505
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorMessage, { id: errorMessageId, errorMessage })
|
|
4418
4506
|
] });
|
|
4419
4507
|
};
|
|
4420
4508
|
Select.displayName = "Select";
|
|
@@ -4430,15 +4518,15 @@ var init_Select2 = __esm({
|
|
|
4430
4518
|
});
|
|
4431
4519
|
|
|
4432
4520
|
// src/components/Slider/Slider.tsx
|
|
4433
|
-
var
|
|
4521
|
+
var import_dedupe44, import_react38, import_Slider, import_jsx_runtime55;
|
|
4434
4522
|
var init_Slider = __esm({
|
|
4435
4523
|
"src/components/Slider/Slider.tsx"() {
|
|
4436
4524
|
"use strict";
|
|
4437
4525
|
"use client";
|
|
4438
|
-
|
|
4439
|
-
|
|
4526
|
+
import_dedupe44 = __toESM(require("classnames/dedupe"));
|
|
4527
|
+
import_react38 = require("react");
|
|
4440
4528
|
import_Slider = require("@simplybusiness/mobius/src/components/Slider/Slider.css");
|
|
4441
|
-
|
|
4529
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4442
4530
|
}
|
|
4443
4531
|
});
|
|
4444
4532
|
|
|
@@ -4451,19 +4539,19 @@ var init_Slider2 = __esm({
|
|
|
4451
4539
|
});
|
|
4452
4540
|
|
|
4453
4541
|
// src/components/SVG/SVG.tsx
|
|
4454
|
-
var
|
|
4542
|
+
var import_react39, import_dedupe45, import_jsx_runtime56, SVG;
|
|
4455
4543
|
var init_SVG = __esm({
|
|
4456
4544
|
"src/components/SVG/SVG.tsx"() {
|
|
4457
4545
|
"use strict";
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4546
|
+
import_react39 = require("react");
|
|
4547
|
+
import_dedupe45 = __toESM(require("classnames/dedupe"));
|
|
4548
|
+
import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4461
4549
|
SVG = ({ ref, ...props }) => {
|
|
4462
4550
|
const { children, className, ...otherProps } = props;
|
|
4463
|
-
const classes = (0,
|
|
4464
|
-
const svgNode =
|
|
4551
|
+
const classes = (0, import_dedupe45.default)("mobius", "mobius-svg", className);
|
|
4552
|
+
const svgNode = import_react39.Children.only(children);
|
|
4465
4553
|
const { children: svgChildren, viewBox, xmlns } = svgNode.props;
|
|
4466
|
-
return /* @__PURE__ */ (0,
|
|
4554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4467
4555
|
"svg",
|
|
4468
4556
|
{
|
|
4469
4557
|
viewBox,
|
|
@@ -4488,16 +4576,16 @@ var init_SVG2 = __esm({
|
|
|
4488
4576
|
});
|
|
4489
4577
|
|
|
4490
4578
|
// src/components/Switch/Switch.tsx
|
|
4491
|
-
var
|
|
4579
|
+
var import_react40, import_dedupe46, import_Switch, import_jsx_runtime57, Switch;
|
|
4492
4580
|
var init_Switch = __esm({
|
|
4493
4581
|
"src/components/Switch/Switch.tsx"() {
|
|
4494
4582
|
"use strict";
|
|
4495
4583
|
"use client";
|
|
4496
|
-
|
|
4497
|
-
|
|
4584
|
+
import_react40 = require("react");
|
|
4585
|
+
import_dedupe46 = __toESM(require("classnames/dedupe"));
|
|
4498
4586
|
init_VisuallyHidden2();
|
|
4499
4587
|
import_Switch = require("@simplybusiness/mobius/src/components/Switch/Switch.css");
|
|
4500
|
-
|
|
4588
|
+
import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4501
4589
|
Switch = ({ ref, ...props }) => {
|
|
4502
4590
|
const {
|
|
4503
4591
|
checked = false,
|
|
@@ -4506,11 +4594,11 @@ var init_Switch = __esm({
|
|
|
4506
4594
|
isDisabled = false,
|
|
4507
4595
|
...otherProps
|
|
4508
4596
|
} = props;
|
|
4509
|
-
const [enabled, setEnabled] = (0,
|
|
4510
|
-
(0,
|
|
4597
|
+
const [enabled, setEnabled] = (0, import_react40.useState)(checked);
|
|
4598
|
+
(0, import_react40.useEffect)(() => {
|
|
4511
4599
|
setEnabled(checked);
|
|
4512
4600
|
}, [checked]);
|
|
4513
|
-
const classes = (0,
|
|
4601
|
+
const classes = (0, import_dedupe46.default)(
|
|
4514
4602
|
"mobius",
|
|
4515
4603
|
"mobius-switch",
|
|
4516
4604
|
{
|
|
@@ -4525,9 +4613,9 @@ var init_Switch = __esm({
|
|
|
4525
4613
|
onChange(event);
|
|
4526
4614
|
}
|
|
4527
4615
|
};
|
|
4528
|
-
return /* @__PURE__ */ (0,
|
|
4529
|
-
/* @__PURE__ */ (0,
|
|
4530
|
-
/* @__PURE__ */ (0,
|
|
4616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("label", { ref, className: classes, children: [
|
|
4617
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { children: enabled ? "On" : "Off" }) }),
|
|
4618
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4531
4619
|
"input",
|
|
4532
4620
|
{
|
|
4533
4621
|
type: "checkbox",
|
|
@@ -4538,7 +4626,7 @@ var init_Switch = __esm({
|
|
|
4538
4626
|
...otherProps
|
|
4539
4627
|
}
|
|
4540
4628
|
),
|
|
4541
|
-
/* @__PURE__ */ (0,
|
|
4629
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "mobius-switch__slider" })
|
|
4542
4630
|
] });
|
|
4543
4631
|
};
|
|
4544
4632
|
Switch.displayName = "Switch";
|
|
@@ -4554,114 +4642,114 @@ var init_Switch2 = __esm({
|
|
|
4554
4642
|
});
|
|
4555
4643
|
|
|
4556
4644
|
// src/components/Table/Table.tsx
|
|
4557
|
-
var
|
|
4645
|
+
var import_dedupe47, import_Table, import_jsx_runtime58, Table;
|
|
4558
4646
|
var init_Table = __esm({
|
|
4559
4647
|
"src/components/Table/Table.tsx"() {
|
|
4560
4648
|
"use strict";
|
|
4561
|
-
|
|
4649
|
+
import_dedupe47 = __toESM(require("classnames/dedupe"));
|
|
4562
4650
|
import_Table = require("@simplybusiness/mobius/src/components/Table/Table.css");
|
|
4563
|
-
|
|
4651
|
+
import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4564
4652
|
Table = ({ ref, ...props }) => {
|
|
4565
|
-
const classes = (0,
|
|
4566
|
-
return /* @__PURE__ */ (0,
|
|
4653
|
+
const classes = (0, import_dedupe47.default)("mobius", "mobius-table", props.className);
|
|
4654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("table", { ref, ...props, className: classes });
|
|
4567
4655
|
};
|
|
4568
4656
|
Table.displayName = "Table";
|
|
4569
4657
|
}
|
|
4570
4658
|
});
|
|
4571
4659
|
|
|
4572
4660
|
// src/components/Table/Head.tsx
|
|
4573
|
-
var
|
|
4661
|
+
var import_dedupe48, import_jsx_runtime59, Head;
|
|
4574
4662
|
var init_Head = __esm({
|
|
4575
4663
|
"src/components/Table/Head.tsx"() {
|
|
4576
4664
|
"use strict";
|
|
4577
|
-
|
|
4578
|
-
|
|
4665
|
+
import_dedupe48 = __toESM(require("classnames/dedupe"));
|
|
4666
|
+
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4579
4667
|
Head = ({ ref, ...props }) => {
|
|
4580
|
-
const classes = (0,
|
|
4581
|
-
return /* @__PURE__ */ (0,
|
|
4668
|
+
const classes = (0, import_dedupe48.default)("mobius", "mobius-table__head", props.className);
|
|
4669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("thead", { ref, ...props, className: classes });
|
|
4582
4670
|
};
|
|
4583
4671
|
Head.displayName = "Table.Head";
|
|
4584
4672
|
}
|
|
4585
4673
|
});
|
|
4586
4674
|
|
|
4587
4675
|
// src/components/Table/Body.tsx
|
|
4588
|
-
var
|
|
4676
|
+
var import_dedupe49, import_jsx_runtime60, Body;
|
|
4589
4677
|
var init_Body = __esm({
|
|
4590
4678
|
"src/components/Table/Body.tsx"() {
|
|
4591
4679
|
"use strict";
|
|
4592
|
-
|
|
4593
|
-
|
|
4680
|
+
import_dedupe49 = __toESM(require("classnames/dedupe"));
|
|
4681
|
+
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4594
4682
|
Body = ({ ref, ...props }) => {
|
|
4595
|
-
const classes = (0,
|
|
4596
|
-
return /* @__PURE__ */ (0,
|
|
4683
|
+
const classes = (0, import_dedupe49.default)("mobius", "mobius-table__body", props.className);
|
|
4684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("tbody", { ref, ...props, className: classes });
|
|
4597
4685
|
};
|
|
4598
4686
|
Body.displayName = "Table.Body";
|
|
4599
4687
|
}
|
|
4600
4688
|
});
|
|
4601
4689
|
|
|
4602
4690
|
// src/components/Table/Foot.tsx
|
|
4603
|
-
var
|
|
4691
|
+
var import_dedupe50, import_jsx_runtime61, Foot;
|
|
4604
4692
|
var init_Foot = __esm({
|
|
4605
4693
|
"src/components/Table/Foot.tsx"() {
|
|
4606
4694
|
"use strict";
|
|
4607
|
-
|
|
4608
|
-
|
|
4695
|
+
import_dedupe50 = __toESM(require("classnames/dedupe"));
|
|
4696
|
+
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4609
4697
|
Foot = ({ ref, ...props }) => {
|
|
4610
|
-
const classes = (0,
|
|
4611
|
-
return /* @__PURE__ */ (0,
|
|
4698
|
+
const classes = (0, import_dedupe50.default)("mobius", "mobius-table__foot", props.className);
|
|
4699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tfoot", { ref, ...props, className: classes });
|
|
4612
4700
|
};
|
|
4613
4701
|
Foot.displayName = "Table.Foot";
|
|
4614
4702
|
}
|
|
4615
4703
|
});
|
|
4616
4704
|
|
|
4617
4705
|
// src/components/Table/Row.tsx
|
|
4618
|
-
var
|
|
4706
|
+
var import_dedupe51, import_jsx_runtime62, Row;
|
|
4619
4707
|
var init_Row = __esm({
|
|
4620
4708
|
"src/components/Table/Row.tsx"() {
|
|
4621
4709
|
"use strict";
|
|
4622
|
-
|
|
4623
|
-
|
|
4710
|
+
import_dedupe51 = __toESM(require("classnames/dedupe"));
|
|
4711
|
+
import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4624
4712
|
Row = ({ ref, ...props }) => {
|
|
4625
|
-
const classes = (0,
|
|
4626
|
-
return /* @__PURE__ */ (0,
|
|
4713
|
+
const classes = (0, import_dedupe51.default)("mobius", "mobius-table__row", props.className);
|
|
4714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("tr", { ref, ...props, className: classes });
|
|
4627
4715
|
};
|
|
4628
4716
|
Row.displayName = "Table.Row";
|
|
4629
4717
|
}
|
|
4630
4718
|
});
|
|
4631
4719
|
|
|
4632
4720
|
// src/components/Table/HeaderCell.tsx
|
|
4633
|
-
var
|
|
4721
|
+
var import_dedupe52, import_jsx_runtime63, HeaderCell;
|
|
4634
4722
|
var init_HeaderCell = __esm({
|
|
4635
4723
|
"src/components/Table/HeaderCell.tsx"() {
|
|
4636
4724
|
"use strict";
|
|
4637
|
-
|
|
4638
|
-
|
|
4725
|
+
import_dedupe52 = __toESM(require("classnames/dedupe"));
|
|
4726
|
+
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4639
4727
|
HeaderCell = ({ ref, ...props }) => {
|
|
4640
|
-
const classes = (0,
|
|
4728
|
+
const classes = (0, import_dedupe52.default)(
|
|
4641
4729
|
"mobius",
|
|
4642
4730
|
"mobius-table__head-cell",
|
|
4643
4731
|
props.className
|
|
4644
4732
|
);
|
|
4645
|
-
return /* @__PURE__ */ (0,
|
|
4733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("th", { ...props, ref, className: classes });
|
|
4646
4734
|
};
|
|
4647
4735
|
HeaderCell.displayName = "Table.HeaderCell";
|
|
4648
4736
|
}
|
|
4649
4737
|
});
|
|
4650
4738
|
|
|
4651
4739
|
// src/components/Table/Cell.tsx
|
|
4652
|
-
var
|
|
4740
|
+
var import_dedupe53, import_jsx_runtime64, Cell;
|
|
4653
4741
|
var init_Cell = __esm({
|
|
4654
4742
|
"src/components/Table/Cell.tsx"() {
|
|
4655
4743
|
"use strict";
|
|
4656
|
-
|
|
4657
|
-
|
|
4744
|
+
import_dedupe53 = __toESM(require("classnames/dedupe"));
|
|
4745
|
+
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4658
4746
|
Cell = ({ ref, ...props }) => {
|
|
4659
|
-
const classes = (0,
|
|
4747
|
+
const classes = (0, import_dedupe53.default)(
|
|
4660
4748
|
"mobius",
|
|
4661
4749
|
"mobius-table__body-cell",
|
|
4662
4750
|
props.className
|
|
4663
4751
|
);
|
|
4664
|
-
return /* @__PURE__ */ (0,
|
|
4752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("td", { ref, ...props, className: classes });
|
|
4665
4753
|
};
|
|
4666
4754
|
Cell.displayName = "Table.Cell";
|
|
4667
4755
|
}
|
|
@@ -4691,37 +4779,6 @@ var init_Table2 = __esm({
|
|
|
4691
4779
|
}
|
|
4692
4780
|
});
|
|
4693
4781
|
|
|
4694
|
-
// src/components/Text/Text.tsx
|
|
4695
|
-
var import_dedupe53, import_Text, import_jsx_runtime63, getElementType, Text;
|
|
4696
|
-
var init_Text = __esm({
|
|
4697
|
-
"src/components/Text/Text.tsx"() {
|
|
4698
|
-
"use strict";
|
|
4699
|
-
import_dedupe53 = __toESM(require("classnames/dedupe"));
|
|
4700
|
-
import_Text = require("@simplybusiness/mobius/src/components/Text/Text.css");
|
|
4701
|
-
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4702
|
-
getElementType = (variant, elementType) => {
|
|
4703
|
-
if (variant) {
|
|
4704
|
-
return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
|
|
4705
|
-
}
|
|
4706
|
-
return elementType || "p";
|
|
4707
|
-
};
|
|
4708
|
-
Text = ({ ref, elementType: Component = "p", ...props }) => {
|
|
4709
|
-
const { variant, className, spacing, ...otherProps } = props;
|
|
4710
|
-
const elementType = getElementType(variant, Component);
|
|
4711
|
-
const variantType = variant || elementType;
|
|
4712
|
-
const classes = (0, import_dedupe53.default)(
|
|
4713
|
-
"mobius",
|
|
4714
|
-
"mobius-text",
|
|
4715
|
-
{ [`--is-${variantType}`]: variantType },
|
|
4716
|
-
{ [`--has-line-height-${spacing}`]: spacing },
|
|
4717
|
-
className
|
|
4718
|
-
);
|
|
4719
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Component, { ref, ...otherProps, className: classes });
|
|
4720
|
-
};
|
|
4721
|
-
Text.displayName = "Text";
|
|
4722
|
-
}
|
|
4723
|
-
});
|
|
4724
|
-
|
|
4725
4782
|
// src/components/Text/index.tsx
|
|
4726
4783
|
var init_Text2 = __esm({
|
|
4727
4784
|
"src/components/Text/index.tsx"() {
|
|
@@ -4731,12 +4788,12 @@ var init_Text2 = __esm({
|
|
|
4731
4788
|
});
|
|
4732
4789
|
|
|
4733
4790
|
// src/components/TextAreaInput/TextAreaInput.tsx
|
|
4734
|
-
var import_dedupe54,
|
|
4791
|
+
var import_dedupe54, import_jsx_runtime65, TextAreaInput;
|
|
4735
4792
|
var init_TextAreaInput = __esm({
|
|
4736
4793
|
"src/components/TextAreaInput/TextAreaInput.tsx"() {
|
|
4737
4794
|
"use strict";
|
|
4738
4795
|
import_dedupe54 = __toESM(require("classnames/dedupe"));
|
|
4739
|
-
|
|
4796
|
+
import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4740
4797
|
TextAreaInput = ({ ref, ...props }) => {
|
|
4741
4798
|
const { isSelected, isDisabled, isReadOnly, isRequired, ...otherProps } = props;
|
|
4742
4799
|
const classes = (0, import_dedupe54.default)(
|
|
@@ -4749,7 +4806,7 @@ var init_TextAreaInput = __esm({
|
|
|
4749
4806
|
},
|
|
4750
4807
|
otherProps.className
|
|
4751
4808
|
);
|
|
4752
|
-
return /* @__PURE__ */ (0,
|
|
4809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4753
4810
|
"textarea",
|
|
4754
4811
|
{
|
|
4755
4812
|
ref,
|
|
@@ -4773,7 +4830,7 @@ var init_TextAreaInput2 = __esm({
|
|
|
4773
4830
|
});
|
|
4774
4831
|
|
|
4775
4832
|
// src/components/TextArea/TextArea.tsx
|
|
4776
|
-
var import_dedupe55, import_TextArea,
|
|
4833
|
+
var import_dedupe55, import_TextArea, import_jsx_runtime66, TextArea;
|
|
4777
4834
|
var init_TextArea = __esm({
|
|
4778
4835
|
"src/components/TextArea/TextArea.tsx"() {
|
|
4779
4836
|
"use strict";
|
|
@@ -4785,7 +4842,7 @@ var init_TextArea = __esm({
|
|
|
4785
4842
|
init_Stack2();
|
|
4786
4843
|
init_TextAreaInput2();
|
|
4787
4844
|
import_TextArea = require("@simplybusiness/mobius/src/components/TextArea/TextArea.css");
|
|
4788
|
-
|
|
4845
|
+
import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4789
4846
|
TextArea = ({ ref, ...props }) => {
|
|
4790
4847
|
const {
|
|
4791
4848
|
isDisabled,
|
|
@@ -4805,9 +4862,9 @@ var init_TextArea = __esm({
|
|
|
4805
4862
|
},
|
|
4806
4863
|
validationClasses
|
|
4807
4864
|
);
|
|
4808
|
-
return /* @__PURE__ */ (0,
|
|
4809
|
-
label && /* @__PURE__ */ (0,
|
|
4810
|
-
/* @__PURE__ */ (0,
|
|
4865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Stack, { className: classes, gap: "xs", children: [
|
|
4866
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Label, { ...labelProps, className: labelClasses, children: props.label }),
|
|
4867
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4811
4868
|
TextAreaInput,
|
|
4812
4869
|
{
|
|
4813
4870
|
...otherProps,
|
|
@@ -4818,7 +4875,7 @@ var init_TextArea = __esm({
|
|
|
4818
4875
|
"aria-invalid": errorMessage != null
|
|
4819
4876
|
}
|
|
4820
4877
|
),
|
|
4821
|
-
/* @__PURE__ */ (0,
|
|
4878
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorMessage, { ...errorMessageProps, errorMessage })
|
|
4822
4879
|
] });
|
|
4823
4880
|
};
|
|
4824
4881
|
TextArea.displayName = "TextArea";
|
|
@@ -4833,53 +4890,6 @@ var init_TextArea2 = __esm({
|
|
|
4833
4890
|
}
|
|
4834
4891
|
});
|
|
4835
4892
|
|
|
4836
|
-
// src/components/TextOrHTML/TextOrHTML.tsx
|
|
4837
|
-
var import_react40, import_jsx_runtime66, isHTML, TextOrHTML;
|
|
4838
|
-
var init_TextOrHTML = __esm({
|
|
4839
|
-
"src/components/TextOrHTML/TextOrHTML.tsx"() {
|
|
4840
|
-
"use strict";
|
|
4841
|
-
import_react40 = require("react");
|
|
4842
|
-
init_Text();
|
|
4843
|
-
import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4844
|
-
isHTML = (text) => /^\s*<[a-z]/i.test(text);
|
|
4845
|
-
TextOrHTML = ({
|
|
4846
|
-
ref,
|
|
4847
|
-
text,
|
|
4848
|
-
htmlClassName,
|
|
4849
|
-
htmlElementType,
|
|
4850
|
-
textWrapper = false,
|
|
4851
|
-
autoDetect = false,
|
|
4852
|
-
...textProps
|
|
4853
|
-
}) => {
|
|
4854
|
-
const textIsHTML = autoDetect && isHTML(text);
|
|
4855
|
-
const shouldWrapInText = autoDetect ? textWrapper || !textIsHTML : textWrapper;
|
|
4856
|
-
const resolvedElementType = htmlElementType ?? (textIsHTML ? "div" : "span");
|
|
4857
|
-
const DangerousComponent = resolvedElementType;
|
|
4858
|
-
const dangerousHTML = (0, import_react40.useMemo)(() => ({ __html: text }), [text]);
|
|
4859
|
-
const dangerousElement = /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4860
|
-
DangerousComponent,
|
|
4861
|
-
{
|
|
4862
|
-
className: htmlClassName,
|
|
4863
|
-
dangerouslySetInnerHTML: dangerousHTML
|
|
4864
|
-
}
|
|
4865
|
-
);
|
|
4866
|
-
if (shouldWrapInText) {
|
|
4867
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Text, { ref, ...textProps, children: dangerousElement });
|
|
4868
|
-
}
|
|
4869
|
-
return dangerousElement;
|
|
4870
|
-
};
|
|
4871
|
-
TextOrHTML.displayName = "TextOrHTML";
|
|
4872
|
-
}
|
|
4873
|
-
});
|
|
4874
|
-
|
|
4875
|
-
// src/components/TextOrHTML/index.tsx
|
|
4876
|
-
var init_TextOrHTML2 = __esm({
|
|
4877
|
-
"src/components/TextOrHTML/index.tsx"() {
|
|
4878
|
-
"use strict";
|
|
4879
|
-
init_TextOrHTML();
|
|
4880
|
-
}
|
|
4881
|
-
});
|
|
4882
|
-
|
|
4883
4893
|
// src/components/Title/Title.tsx
|
|
4884
4894
|
var import_dedupe56, import_Title, import_jsx_runtime67, Title;
|
|
4885
4895
|
var init_Title = __esm({
|