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