@octoguide/mui-ui-toolkit 0.6.0 → 0.7.1
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/dist/index.d.mts +29 -5
- package/dist/index.d.ts +29 -5
- package/dist/index.js +333 -257
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +299 -224
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65,6 +65,7 @@ __export(index_exports, {
|
|
|
65
65
|
H4: () => H4,
|
|
66
66
|
H5: () => H5,
|
|
67
67
|
H6: () => H6,
|
|
68
|
+
IconText: () => IconText,
|
|
68
69
|
InternalLinkItem: () => InternalLinkItem,
|
|
69
70
|
Link: () => Link,
|
|
70
71
|
LogoLink: () => LogoLink,
|
|
@@ -618,9 +619,10 @@ function resolveThemeName() {
|
|
|
618
619
|
|
|
619
620
|
// src/themes/createMuiTheme.ts
|
|
620
621
|
var import_styles = require("@mui/material/styles");
|
|
621
|
-
function createMuiTheme(tokens) {
|
|
622
|
+
function createMuiTheme(tokens, darkMode = false) {
|
|
622
623
|
return (0, import_styles.createTheme)({
|
|
623
624
|
palette: {
|
|
625
|
+
mode: darkMode ? "dark" : "light",
|
|
624
626
|
primary: {
|
|
625
627
|
main: tokens.colors.primary,
|
|
626
628
|
dark: tokens.colors.primaryDark,
|
|
@@ -638,9 +640,9 @@ function createMuiTheme(tokens) {
|
|
|
638
640
|
error: { main: tokens.colors.error },
|
|
639
641
|
info: { main: tokens.colors.info },
|
|
640
642
|
background: {
|
|
641
|
-
default: tokens.colors.background,
|
|
642
|
-
paper: tokens.colors.backgroundPaper,
|
|
643
|
-
subtle: tokens.colors.backgroundSubtle
|
|
643
|
+
default: darkMode ? "#0d0d0d" : tokens.colors.background,
|
|
644
|
+
paper: darkMode ? "#1a1a1a" : tokens.colors.backgroundPaper,
|
|
645
|
+
subtle: darkMode ? "#2a2a2a" : tokens.colors.backgroundSubtle
|
|
644
646
|
},
|
|
645
647
|
border: tokens.colors.border,
|
|
646
648
|
text: {
|
|
@@ -799,14 +801,14 @@ function createMuiTheme(tokens) {
|
|
|
799
801
|
},
|
|
800
802
|
MuiTextField: {
|
|
801
803
|
styleOverrides: {
|
|
802
|
-
root: {
|
|
804
|
+
root: ({ theme }) => ({
|
|
803
805
|
"& .MuiOutlinedInput-root": {
|
|
804
806
|
borderRadius: tokens.components.input.borderRadius,
|
|
805
|
-
backgroundColor: tokens.components.input.background,
|
|
807
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.background.paper : tokens.components.input.background,
|
|
806
808
|
minHeight: tokens.components.input.minHeight,
|
|
807
809
|
"& fieldset": {
|
|
808
810
|
borderWidth: tokens.components.input.borderWidth,
|
|
809
|
-
borderColor: tokens.colors.border
|
|
811
|
+
borderColor: theme.palette.mode === "dark" ? theme.palette.divider : tokens.colors.border
|
|
810
812
|
},
|
|
811
813
|
"&:hover fieldset": {
|
|
812
814
|
borderColor: tokens.colors.primary
|
|
@@ -816,7 +818,7 @@ function createMuiTheme(tokens) {
|
|
|
816
818
|
borderColor: tokens.colors.borderFocus
|
|
817
819
|
},
|
|
818
820
|
"&.Mui-disabled": {
|
|
819
|
-
backgroundColor: tokens.components.input.backgroundDisabled
|
|
821
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.action.disabledBackground : tokens.components.input.backgroundDisabled
|
|
820
822
|
}
|
|
821
823
|
},
|
|
822
824
|
"& .MuiInputLabel-root": {
|
|
@@ -825,17 +827,17 @@ function createMuiTheme(tokens) {
|
|
|
825
827
|
"& .MuiFormHelperText-root": {
|
|
826
828
|
fontSize: tokens.components.input.helperFontSize
|
|
827
829
|
}
|
|
828
|
-
}
|
|
830
|
+
})
|
|
829
831
|
}
|
|
830
832
|
},
|
|
831
833
|
MuiCard: {
|
|
832
834
|
styleOverrides: {
|
|
833
|
-
root: {
|
|
835
|
+
root: ({ theme }) => ({
|
|
834
836
|
borderRadius: tokens.components.card.borderRadius,
|
|
835
|
-
backgroundColor: tokens.components.card.background,
|
|
837
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.background.paper : tokens.components.card.background,
|
|
836
838
|
boxShadow: tokens.shadows.sm,
|
|
837
|
-
border: `${tokens.components.card.borderWidth} solid ${
|
|
838
|
-
}
|
|
839
|
+
border: `${tokens.components.card.borderWidth} solid ${theme.palette.divider}`
|
|
840
|
+
})
|
|
839
841
|
}
|
|
840
842
|
},
|
|
841
843
|
MuiCardContent: {
|
|
@@ -919,11 +921,11 @@ function createMuiTheme(tokens) {
|
|
|
919
921
|
},
|
|
920
922
|
MuiDialog: {
|
|
921
923
|
styleOverrides: {
|
|
922
|
-
paper: {
|
|
924
|
+
paper: ({ theme }) => ({
|
|
923
925
|
borderRadius: tokens.components.dialog.borderRadius,
|
|
924
|
-
backgroundColor: tokens.components.dialog.background,
|
|
926
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.background.paper : tokens.components.dialog.background,
|
|
925
927
|
maxWidth: tokens.components.dialog.maxWidth
|
|
926
|
-
}
|
|
928
|
+
})
|
|
927
929
|
}
|
|
928
930
|
},
|
|
929
931
|
MuiDialogContent: {
|
|
@@ -935,26 +937,27 @@ function createMuiTheme(tokens) {
|
|
|
935
937
|
},
|
|
936
938
|
MuiTableCell: {
|
|
937
939
|
styleOverrides: {
|
|
938
|
-
root: {
|
|
940
|
+
root: ({ theme }) => ({
|
|
939
941
|
paddingLeft: tokens.components.table.cellPaddingX,
|
|
940
942
|
paddingRight: tokens.components.table.cellPaddingX,
|
|
941
943
|
paddingTop: tokens.components.table.cellPaddingY,
|
|
942
944
|
paddingBottom: tokens.components.table.cellPaddingY,
|
|
943
|
-
borderBottom: `${tokens.components.table.borderWidth} solid ${tokens.components.table.borderColor}`
|
|
944
|
-
},
|
|
945
|
-
head: {
|
|
945
|
+
borderBottom: `${tokens.components.table.borderWidth} solid ${theme.palette.mode === "dark" ? theme.palette.divider : tokens.components.table.borderColor}`
|
|
946
|
+
}),
|
|
947
|
+
head: ({ theme }) => ({
|
|
946
948
|
fontWeight: tokens.components.table.headerFontWeight,
|
|
947
|
-
backgroundColor: tokens.components.table.headerBackground
|
|
948
|
-
|
|
949
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.background.default : tokens.components.table.headerBackground,
|
|
950
|
+
color: theme.palette.text.secondary
|
|
951
|
+
})
|
|
949
952
|
}
|
|
950
953
|
},
|
|
951
954
|
MuiTableRow: {
|
|
952
955
|
styleOverrides: {
|
|
953
|
-
root: {
|
|
956
|
+
root: ({ theme }) => ({
|
|
954
957
|
"&:hover": {
|
|
955
|
-
backgroundColor: tokens.components.table.rowHoverBackground
|
|
958
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.action.hover : tokens.components.table.rowHoverBackground
|
|
956
959
|
}
|
|
957
|
-
}
|
|
960
|
+
})
|
|
958
961
|
}
|
|
959
962
|
},
|
|
960
963
|
MuiAvatar: {
|
|
@@ -1203,11 +1206,12 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
1203
1206
|
function ToolkitThemeProvider({
|
|
1204
1207
|
theme,
|
|
1205
1208
|
children,
|
|
1206
|
-
injectCssBaseline = true
|
|
1209
|
+
injectCssBaseline = true,
|
|
1210
|
+
darkMode = false
|
|
1207
1211
|
}) {
|
|
1208
1212
|
const themeName = theme ?? resolveThemeName();
|
|
1209
1213
|
const tokens = getThemeTokens(themeName);
|
|
1210
|
-
const muiTheme = createMuiTheme(tokens);
|
|
1214
|
+
const muiTheme = createMuiTheme(tokens, darkMode);
|
|
1211
1215
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.ThemeProvider, { theme: muiTheme, children: [
|
|
1212
1216
|
injectCssBaseline && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.CssBaseline, {}),
|
|
1213
1217
|
children
|
|
@@ -1730,13 +1734,81 @@ function Grid({ container, spacing, ...props }) {
|
|
|
1730
1734
|
}
|
|
1731
1735
|
Grid.displayName = "ToolkitGrid";
|
|
1732
1736
|
|
|
1737
|
+
// src/components/IconText/IconText.tsx
|
|
1738
|
+
var import_react4 = __toESM(require("react"));
|
|
1739
|
+
|
|
1740
|
+
// src/components/IconText/IconText.styles.tsx
|
|
1741
|
+
var import_styles8 = require("@mui/material/styles");
|
|
1742
|
+
var import_material10 = require("@mui/material");
|
|
1743
|
+
var StyledIconTextRoot = (0, import_styles8.styled)("div")(
|
|
1744
|
+
({ $inheritFontFamily }) => ({
|
|
1745
|
+
display: "flex",
|
|
1746
|
+
alignItems: "center",
|
|
1747
|
+
backgroundColor: "inherit",
|
|
1748
|
+
color: "inherit",
|
|
1749
|
+
fontSize: "inherit",
|
|
1750
|
+
fontWeight: "inherit",
|
|
1751
|
+
textAlign: "inherit",
|
|
1752
|
+
textTransform: "inherit",
|
|
1753
|
+
...$inheritFontFamily && {
|
|
1754
|
+
fontFamily: "inherit",
|
|
1755
|
+
lineHeight: "inherit"
|
|
1756
|
+
}
|
|
1757
|
+
})
|
|
1758
|
+
);
|
|
1759
|
+
var StyledIconTextSymbol = (0, import_styles8.styled)(import_material10.SvgIcon, {
|
|
1760
|
+
shouldForwardProp: (prop) => prop !== "$position"
|
|
1761
|
+
})(({ theme, $position }) => ({
|
|
1762
|
+
flexShrink: 0,
|
|
1763
|
+
marginRight: $position === "front" ? theme.spacing(1) : 0,
|
|
1764
|
+
marginLeft: $position === "end" ? theme.spacing(1) : 0
|
|
1765
|
+
}));
|
|
1766
|
+
|
|
1767
|
+
// src/components/IconText/IconText.tsx
|
|
1768
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1769
|
+
var IconText = import_react4.default.forwardRef(
|
|
1770
|
+
function IconText2({
|
|
1771
|
+
symbol,
|
|
1772
|
+
symbolPosition = "front",
|
|
1773
|
+
symbolProps,
|
|
1774
|
+
inheritFontFamily = false,
|
|
1775
|
+
children,
|
|
1776
|
+
...rest
|
|
1777
|
+
}, ref) {
|
|
1778
|
+
const icon = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1779
|
+
StyledIconTextSymbol,
|
|
1780
|
+
{
|
|
1781
|
+
$position: symbolPosition,
|
|
1782
|
+
viewBox: symbol.viewBox ?? "0 0 24 24",
|
|
1783
|
+
"aria-hidden": "true",
|
|
1784
|
+
...symbolProps,
|
|
1785
|
+
children: symbol.content && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("g", { dangerouslySetInnerHTML: { __html: symbol.content } })
|
|
1786
|
+
}
|
|
1787
|
+
);
|
|
1788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1789
|
+
StyledIconTextRoot,
|
|
1790
|
+
{
|
|
1791
|
+
ref,
|
|
1792
|
+
$inheritFontFamily: inheritFontFamily,
|
|
1793
|
+
...getCleanProps(rest),
|
|
1794
|
+
children: [
|
|
1795
|
+
symbolPosition === "front" && icon,
|
|
1796
|
+
children,
|
|
1797
|
+
symbolPosition === "end" && icon
|
|
1798
|
+
]
|
|
1799
|
+
}
|
|
1800
|
+
);
|
|
1801
|
+
}
|
|
1802
|
+
);
|
|
1803
|
+
IconText.displayName = "ToolkitIconText";
|
|
1804
|
+
|
|
1733
1805
|
// src/components/InternalLinkItem/InternalLinkItem.tsx
|
|
1734
1806
|
var import_ChevronRight = __toESM(require("@mui/icons-material/ChevronRight"));
|
|
1735
1807
|
|
|
1736
1808
|
// src/components/InternalLinkItem/InternalLinkItem.styles.tsx
|
|
1737
1809
|
var import_Box2 = __toESM(require("@mui/material/Box"));
|
|
1738
|
-
var
|
|
1739
|
-
var StyledWrapper = (0,
|
|
1810
|
+
var import_styles9 = require("@mui/material/styles");
|
|
1811
|
+
var StyledWrapper = (0, import_styles9.styled)("div")(({ theme }) => ({
|
|
1740
1812
|
"& > a, & > div": {
|
|
1741
1813
|
textDecoration: "none",
|
|
1742
1814
|
color: theme.tokens.colors.textPrimary,
|
|
@@ -1745,7 +1817,7 @@ var StyledWrapper = (0, import_styles8.styled)("div")(({ theme }) => ({
|
|
|
1745
1817
|
}
|
|
1746
1818
|
}
|
|
1747
1819
|
}));
|
|
1748
|
-
var StyledListItemContainer = (0,
|
|
1820
|
+
var StyledListItemContainer = (0, import_styles9.styled)(import_Box2.default)(({ theme }) => ({
|
|
1749
1821
|
width: "100%",
|
|
1750
1822
|
minHeight: "66px",
|
|
1751
1823
|
borderTop: `1px solid ${theme.tokens.colors.divider}`,
|
|
@@ -1788,19 +1860,19 @@ var StyledListItemContainer = (0, import_styles8.styled)(import_Box2.default)(({
|
|
|
1788
1860
|
outlineStyle: "solid"
|
|
1789
1861
|
}
|
|
1790
1862
|
}));
|
|
1791
|
-
var StyledLeftIconWrapper = (0,
|
|
1863
|
+
var StyledLeftIconWrapper = (0, import_styles9.styled)("span")({
|
|
1792
1864
|
display: "flex",
|
|
1793
1865
|
paddingLeft: "4px"
|
|
1794
1866
|
});
|
|
1795
|
-
var StyledRightIconWrapper = (0,
|
|
1867
|
+
var StyledRightIconWrapper = (0, import_styles9.styled)("span")({
|
|
1796
1868
|
display: "flex",
|
|
1797
1869
|
paddingRight: "4px"
|
|
1798
1870
|
});
|
|
1799
|
-
var StyledLabelContainer = (0,
|
|
1871
|
+
var StyledLabelContainer = (0, import_styles9.styled)("div")({
|
|
1800
1872
|
flex: 1,
|
|
1801
1873
|
padding: "12px 8px"
|
|
1802
1874
|
});
|
|
1803
|
-
var StyledLabel = (0,
|
|
1875
|
+
var StyledLabel = (0, import_styles9.styled)("p")(({ theme }) => ({
|
|
1804
1876
|
fontFamily: theme.tokens.typography.fontFamilyBase,
|
|
1805
1877
|
fontSize: theme.tokens.typography.fontSizeLg,
|
|
1806
1878
|
lineHeight: "20px",
|
|
@@ -1808,7 +1880,7 @@ var StyledLabel = (0, import_styles8.styled)("p")(({ theme }) => ({
|
|
|
1808
1880
|
margin: 0,
|
|
1809
1881
|
textDecoration: "none"
|
|
1810
1882
|
}));
|
|
1811
|
-
var StyledCaption = (0,
|
|
1883
|
+
var StyledCaption = (0, import_styles9.styled)("p")(({ theme }) => ({
|
|
1812
1884
|
fontFamily: theme.tokens.typography.fontFamilyBase,
|
|
1813
1885
|
color: theme.tokens.colors.textSecondary,
|
|
1814
1886
|
fontSize: theme.tokens.typography.fontSizeLg,
|
|
@@ -1819,7 +1891,7 @@ var StyledCaption = (0, import_styles8.styled)("p")(({ theme }) => ({
|
|
|
1819
1891
|
}));
|
|
1820
1892
|
|
|
1821
1893
|
// src/components/InternalLinkItem/InternalLinkItem.tsx
|
|
1822
|
-
var
|
|
1894
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1823
1895
|
function InternalLinkItem({
|
|
1824
1896
|
link,
|
|
1825
1897
|
icon,
|
|
@@ -1828,19 +1900,19 @@ function InternalLinkItem({
|
|
|
1828
1900
|
component,
|
|
1829
1901
|
...restProps
|
|
1830
1902
|
}) {
|
|
1831
|
-
return /* @__PURE__ */ (0,
|
|
1903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StyledWrapper, { "data-component-id": "internalLinkItem", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1832
1904
|
StyledListItemContainer,
|
|
1833
1905
|
{
|
|
1834
1906
|
component: component ?? "a",
|
|
1835
1907
|
href: link,
|
|
1836
1908
|
...getCleanProps(restProps),
|
|
1837
1909
|
children: [
|
|
1838
|
-
icon && /* @__PURE__ */ (0,
|
|
1839
|
-
/* @__PURE__ */ (0,
|
|
1840
|
-
/* @__PURE__ */ (0,
|
|
1841
|
-
caption && /* @__PURE__ */ (0,
|
|
1910
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StyledLeftIconWrapper, { "data-testid": "icon_container", children: icon }),
|
|
1911
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(StyledLabelContainer, { children: [
|
|
1912
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StyledLabel, { className: "itemLabel", children: label }),
|
|
1913
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StyledCaption, { children: caption })
|
|
1842
1914
|
] }),
|
|
1843
|
-
/* @__PURE__ */ (0,
|
|
1915
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StyledRightIconWrapper, { className: "iconColor", "data-testid": "icon_action_container", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ChevronRight.default, { fontSize: "small" }) })
|
|
1844
1916
|
]
|
|
1845
1917
|
}
|
|
1846
1918
|
) });
|
|
@@ -1848,14 +1920,14 @@ function InternalLinkItem({
|
|
|
1848
1920
|
InternalLinkItem.displayName = "ToolkitInternalLinkItem";
|
|
1849
1921
|
|
|
1850
1922
|
// src/components/Link/Link.tsx
|
|
1851
|
-
var
|
|
1923
|
+
var import_react5 = __toESM(require("react"));
|
|
1852
1924
|
var import_OpenInNew = __toESM(require("@mui/icons-material/OpenInNew"));
|
|
1853
1925
|
var import_SvgIcon = __toESM(require("@mui/material/SvgIcon"));
|
|
1854
1926
|
|
|
1855
1927
|
// src/components/Link/Link.styles.tsx
|
|
1856
1928
|
var import_Box3 = __toESM(require("@mui/material/Box"));
|
|
1857
|
-
var
|
|
1858
|
-
var StyledScreenReaderOnly = (0,
|
|
1929
|
+
var import_styles10 = require("@mui/material/styles");
|
|
1930
|
+
var StyledScreenReaderOnly = (0, import_styles10.styled)("span")({
|
|
1859
1931
|
position: "absolute",
|
|
1860
1932
|
width: "1px",
|
|
1861
1933
|
height: "1px",
|
|
@@ -1866,17 +1938,17 @@ var StyledScreenReaderOnly = (0, import_styles9.styled)("span")({
|
|
|
1866
1938
|
whiteSpace: "nowrap",
|
|
1867
1939
|
border: 0
|
|
1868
1940
|
});
|
|
1869
|
-
var StyledIconSpan = (0,
|
|
1870
|
-
shouldForwardProp: (prop) => prop !== "
|
|
1871
|
-
})(({
|
|
1941
|
+
var StyledIconSpan = (0, import_styles10.styled)("span", {
|
|
1942
|
+
shouldForwardProp: (prop) => prop !== "iconRight"
|
|
1943
|
+
})(({ iconRight }) => ({
|
|
1872
1944
|
display: "inline-flex",
|
|
1873
1945
|
alignItems: "center",
|
|
1874
|
-
paddingLeft:
|
|
1875
|
-
paddingRight:
|
|
1946
|
+
paddingLeft: iconRight ? "4px" : void 0,
|
|
1947
|
+
paddingRight: iconRight ? void 0 : "4px"
|
|
1876
1948
|
}));
|
|
1877
|
-
var StyledAnchor = (0,
|
|
1878
|
-
shouldForwardProp: (prop) => !["tint", "isOnDarkBg", "standalonelink", "
|
|
1879
|
-
})(({ theme, tint = "primary", isOnDarkBg, standalonelink,
|
|
1949
|
+
var StyledAnchor = (0, import_styles10.styled)(import_Box3.default, {
|
|
1950
|
+
shouldForwardProp: (prop) => !["tint", "isOnDarkBg", "standalonelink", "iconRight"].includes(prop)
|
|
1951
|
+
})(({ theme, tint = "primary", isOnDarkBg, standalonelink, iconRight }) => {
|
|
1880
1952
|
const resolvedTint = isOnDarkBg ? "white" : tint;
|
|
1881
1953
|
const baseColors = {
|
|
1882
1954
|
primary: theme.tokens.colors.primary,
|
|
@@ -1895,7 +1967,7 @@ var StyledAnchor = (0, import_styles9.styled)(import_Box3.default, {
|
|
|
1895
1967
|
return {
|
|
1896
1968
|
display: "inline-flex",
|
|
1897
1969
|
alignItems: "center",
|
|
1898
|
-
flexDirection:
|
|
1970
|
+
flexDirection: iconRight ? "row-reverse" : void 0,
|
|
1899
1971
|
verticalAlign: "bottom",
|
|
1900
1972
|
fontFamily: theme.tokens.typography.fontFamilyBase,
|
|
1901
1973
|
textDecoration: "underline",
|
|
@@ -1916,12 +1988,12 @@ var StyledAnchor = (0, import_styles9.styled)(import_Box3.default, {
|
|
|
1916
1988
|
textDecoration: "underline",
|
|
1917
1989
|
color: baseColor,
|
|
1918
1990
|
outline: "none",
|
|
1919
|
-
boxShadow: `0 0 0 3px ${(0,
|
|
1991
|
+
boxShadow: `0 0 0 3px ${(0, import_styles10.alpha)(baseColor, 0.35)}`,
|
|
1920
1992
|
"& svg": { color: baseColor }
|
|
1921
1993
|
},
|
|
1922
1994
|
"&:active": {
|
|
1923
1995
|
color: hoverColor,
|
|
1924
|
-
boxShadow: `0 0 0 3px ${(0,
|
|
1996
|
+
boxShadow: `0 0 0 3px ${(0, import_styles10.alpha)(isOnDarkBg ? baseColor : hoverColor, 0.65)}`,
|
|
1925
1997
|
textDecoration: "none",
|
|
1926
1998
|
"& svg": { color: hoverColor }
|
|
1927
1999
|
},
|
|
@@ -1933,14 +2005,14 @@ var StyledAnchor = (0, import_styles9.styled)(import_Box3.default, {
|
|
|
1933
2005
|
});
|
|
1934
2006
|
|
|
1935
2007
|
// src/components/Link/Link.tsx
|
|
1936
|
-
var
|
|
2008
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1937
2009
|
var Variant = {
|
|
1938
2010
|
standard: "standard",
|
|
1939
2011
|
external: "external",
|
|
1940
2012
|
file: "file"
|
|
1941
2013
|
};
|
|
1942
2014
|
function DocumentIcon() {
|
|
1943
|
-
return /* @__PURE__ */ (0,
|
|
2015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_SvgIcon.default, { viewBox: "0 0 384 512", fontSize: "inherit", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1944
2016
|
"path",
|
|
1945
2017
|
{
|
|
1946
2018
|
fillRule: "evenodd",
|
|
@@ -1958,7 +2030,7 @@ function getIcon(variant, icon) {
|
|
|
1958
2030
|
return icon;
|
|
1959
2031
|
}
|
|
1960
2032
|
}
|
|
1961
|
-
var Link =
|
|
2033
|
+
var Link = import_react5.default.forwardRef(function Link2({
|
|
1962
2034
|
children,
|
|
1963
2035
|
variant = "standard",
|
|
1964
2036
|
icon,
|
|
@@ -1973,9 +2045,9 @@ var Link = import_react4.default.forwardRef(function Link2({
|
|
|
1973
2045
|
}, ref) {
|
|
1974
2046
|
const Icon = getIcon(variant, icon);
|
|
1975
2047
|
const target = variant !== Variant.standard ? "_blank" : targetProp;
|
|
1976
|
-
const
|
|
2048
|
+
const iconRight = variant === Variant.external ? true : !!iconToRight;
|
|
1977
2049
|
const urlProp = component ? { to: href } : { href };
|
|
1978
|
-
return /* @__PURE__ */ (0,
|
|
2050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1979
2051
|
StyledAnchor,
|
|
1980
2052
|
{
|
|
1981
2053
|
component: component ?? "a",
|
|
@@ -1985,13 +2057,13 @@ var Link = import_react4.default.forwardRef(function Link2({
|
|
|
1985
2057
|
tint: color,
|
|
1986
2058
|
isOnDarkBg,
|
|
1987
2059
|
target,
|
|
1988
|
-
|
|
2060
|
+
iconRight,
|
|
1989
2061
|
standalonelink: !!standalone,
|
|
1990
2062
|
ref,
|
|
1991
2063
|
children: [
|
|
1992
|
-
Icon && /* @__PURE__ */ (0,
|
|
2064
|
+
Icon && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(StyledIconSpan, { iconRight, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { fontSize: "inherit" }) }),
|
|
1993
2065
|
children,
|
|
1994
|
-
variant === Variant.external && /* @__PURE__ */ (0,
|
|
2066
|
+
variant === Variant.external && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(StyledScreenReaderOnly, { children: ", opens in a new tab" })
|
|
1995
2067
|
]
|
|
1996
2068
|
}
|
|
1997
2069
|
);
|
|
@@ -1999,12 +2071,12 @@ var Link = import_react4.default.forwardRef(function Link2({
|
|
|
1999
2071
|
Link.displayName = "ToolkitLink";
|
|
2000
2072
|
|
|
2001
2073
|
// src/components/LogoLink/LogoLink.tsx
|
|
2002
|
-
var
|
|
2074
|
+
var import_react6 = __toESM(require("react"));
|
|
2003
2075
|
|
|
2004
2076
|
// src/components/LogoLink/LogoLink.styles.tsx
|
|
2005
2077
|
var import_Box4 = __toESM(require("@mui/material/Box"));
|
|
2006
|
-
var
|
|
2007
|
-
var StyledLogoLink = (0,
|
|
2078
|
+
var import_styles11 = require("@mui/material/styles");
|
|
2079
|
+
var StyledLogoLink = (0, import_styles11.styled)(import_Box4.default, {
|
|
2008
2080
|
shouldForwardProp: (prop) => prop !== "isSmall"
|
|
2009
2081
|
})(({ theme, isSmall }) => ({
|
|
2010
2082
|
display: "inline-flex",
|
|
@@ -2021,7 +2093,7 @@ var StyledLogoLink = (0, import_styles10.styled)(import_Box4.default, {
|
|
|
2021
2093
|
color: theme.tokens.colors.primaryDark
|
|
2022
2094
|
}
|
|
2023
2095
|
}));
|
|
2024
|
-
var StyledLogoSpan = (0,
|
|
2096
|
+
var StyledLogoSpan = (0, import_styles11.styled)("span")(({ theme }) => ({
|
|
2025
2097
|
padding: "0 10px 0 15px",
|
|
2026
2098
|
backgroundColor: theme.tokens.colors.primary,
|
|
2027
2099
|
height: "100%",
|
|
@@ -2039,9 +2111,9 @@ var StyledLogoSpan = (0, import_styles10.styled)("span")(({ theme }) => ({
|
|
|
2039
2111
|
}));
|
|
2040
2112
|
|
|
2041
2113
|
// src/components/LogoLink/LogoLink.tsx
|
|
2042
|
-
var
|
|
2043
|
-
var LogoLink =
|
|
2044
|
-
return /* @__PURE__ */ (0,
|
|
2114
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2115
|
+
var LogoLink = import_react6.default.forwardRef(function LogoLink2({ children, href = "/", isSmall, title = "Home", component, ...restProps }, ref) {
|
|
2116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2045
2117
|
StyledLogoLink,
|
|
2046
2118
|
{
|
|
2047
2119
|
component: component ?? "a",
|
|
@@ -2051,14 +2123,14 @@ var LogoLink = import_react5.default.forwardRef(function LogoLink2({ children, h
|
|
|
2051
2123
|
"data-component-id": "LogoLink",
|
|
2052
2124
|
...getCleanProps(restProps),
|
|
2053
2125
|
ref,
|
|
2054
|
-
children: /* @__PURE__ */ (0,
|
|
2126
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(StyledLogoSpan, { children })
|
|
2055
2127
|
}
|
|
2056
2128
|
);
|
|
2057
2129
|
});
|
|
2058
2130
|
LogoLink.displayName = "ToolkitLogoLink";
|
|
2059
2131
|
|
|
2060
2132
|
// src/components/PageSpinner/PageSpinner.tsx
|
|
2061
|
-
var
|
|
2133
|
+
var import_react7 = __toESM(require("react"));
|
|
2062
2134
|
var import_Portal = __toESM(require("@mui/material/Portal"));
|
|
2063
2135
|
var import_CircularProgress2 = __toESM(require("@mui/material/CircularProgress"));
|
|
2064
2136
|
var import_utils = require("@mui/material/utils");
|
|
@@ -2219,21 +2291,21 @@ function setA11yMessage(messageText, messageTone, messageRole, clearAfter = 5e3)
|
|
|
2219
2291
|
}
|
|
2220
2292
|
|
|
2221
2293
|
// src/components/PageSpinner/PageSpinner.styles.tsx
|
|
2222
|
-
var import_styles11 = require("@mui/material/styles");
|
|
2223
2294
|
var import_styles12 = require("@mui/material/styles");
|
|
2295
|
+
var import_styles13 = require("@mui/material/styles");
|
|
2224
2296
|
var PAGE_SPINNER_Z_INDEX = 1400;
|
|
2225
|
-
var StyledPageSpinnerRoot = (0,
|
|
2297
|
+
var StyledPageSpinnerRoot = (0, import_styles12.styled)("div")(() => ({
|
|
2226
2298
|
position: "relative"
|
|
2227
2299
|
}));
|
|
2228
|
-
var StyledOverlay = (0,
|
|
2300
|
+
var StyledOverlay = (0, import_styles12.styled)("div", {
|
|
2229
2301
|
shouldForwardProp: (prop) => prop !== "$darkBg"
|
|
2230
2302
|
})(({ theme, $darkBg = false }) => ({
|
|
2231
2303
|
position: "fixed",
|
|
2232
2304
|
inset: 0,
|
|
2233
2305
|
zIndex: PAGE_SPINNER_Z_INDEX,
|
|
2234
|
-
backgroundColor: $darkBg ? (0,
|
|
2306
|
+
backgroundColor: $darkBg ? (0, import_styles13.alpha)(theme.tokens.colors.textPrimary, 0.9) : (0, import_styles13.alpha)(theme.palette.common.white, 0.9)
|
|
2235
2307
|
}));
|
|
2236
|
-
var StyledSpinnerCentre = (0,
|
|
2308
|
+
var StyledSpinnerCentre = (0, import_styles12.styled)("div")(() => ({
|
|
2237
2309
|
position: "fixed",
|
|
2238
2310
|
top: "50%",
|
|
2239
2311
|
left: "50%",
|
|
@@ -2244,7 +2316,7 @@ var StyledSpinnerCentre = (0, import_styles11.styled)("div")(() => ({
|
|
|
2244
2316
|
alignItems: "center",
|
|
2245
2317
|
gap: "16px"
|
|
2246
2318
|
}));
|
|
2247
|
-
var StyledSpinnerMessage = (0,
|
|
2319
|
+
var StyledSpinnerMessage = (0, import_styles12.styled)("p", {
|
|
2248
2320
|
shouldForwardProp: (prop) => prop !== "$darkBg"
|
|
2249
2321
|
})(({ theme, $darkBg = false }) => ({
|
|
2250
2322
|
margin: 0,
|
|
@@ -2255,7 +2327,7 @@ var StyledSpinnerMessage = (0, import_styles11.styled)("p", {
|
|
|
2255
2327
|
color: $darkBg ? theme.palette.common.white : theme.tokens.colors.textPrimary,
|
|
2256
2328
|
textAlign: "center"
|
|
2257
2329
|
}));
|
|
2258
|
-
var StyledScreenReaderOnly2 = (0,
|
|
2330
|
+
var StyledScreenReaderOnly2 = (0, import_styles12.styled)("span")(() => ({
|
|
2259
2331
|
position: "absolute",
|
|
2260
2332
|
width: "1px",
|
|
2261
2333
|
height: "1px",
|
|
@@ -2268,9 +2340,9 @@ var StyledScreenReaderOnly2 = (0, import_styles11.styled)("span")(() => ({
|
|
|
2268
2340
|
}));
|
|
2269
2341
|
|
|
2270
2342
|
// src/components/PageSpinner/PageSpinner.tsx
|
|
2271
|
-
var
|
|
2343
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2272
2344
|
var ARIA_REANNOUNCE_INTERVAL = 3e4;
|
|
2273
|
-
var PageSpinner =
|
|
2345
|
+
var PageSpinner = import_react7.default.forwardRef(
|
|
2274
2346
|
function PageSpinner2({
|
|
2275
2347
|
message = "Processing, please wait",
|
|
2276
2348
|
customMessageLayout,
|
|
@@ -2280,14 +2352,14 @@ var PageSpinner = import_react6.default.forwardRef(
|
|
|
2280
2352
|
messageTone = "assertive",
|
|
2281
2353
|
...restProps
|
|
2282
2354
|
}, ref) {
|
|
2283
|
-
const internalRef = (0,
|
|
2355
|
+
const internalRef = (0, import_react7.useRef)(null);
|
|
2284
2356
|
const mergedRef = (0, import_utils.useForkRef)(ref, internalRef);
|
|
2285
|
-
(0,
|
|
2357
|
+
(0, import_react7.useEffect)(() => {
|
|
2286
2358
|
const blockKeyDown = (e) => e.preventDefault();
|
|
2287
2359
|
document.addEventListener("keydown", blockKeyDown);
|
|
2288
2360
|
return () => document.removeEventListener("keydown", blockKeyDown);
|
|
2289
2361
|
}, [rootNode]);
|
|
2290
|
-
(0,
|
|
2362
|
+
(0, import_react7.useEffect)(() => {
|
|
2291
2363
|
const ariaRole = messageTone === "polite" ? "status" : "alert";
|
|
2292
2364
|
setA11yMessage(message, messageTone, ariaRole);
|
|
2293
2365
|
const interval = setInterval(() => {
|
|
@@ -2302,7 +2374,7 @@ var PageSpinner = import_react6.default.forwardRef(
|
|
|
2302
2374
|
backgroundScrollTether(false);
|
|
2303
2375
|
};
|
|
2304
2376
|
}, [message, rootNode, messageTone]);
|
|
2305
|
-
return /* @__PURE__ */ (0,
|
|
2377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_Portal.default, { container: rootNode, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2306
2378
|
StyledPageSpinnerRoot,
|
|
2307
2379
|
{
|
|
2308
2380
|
"data-component-id": "PageSpinner",
|
|
@@ -2310,9 +2382,9 @@ var PageSpinner = import_react6.default.forwardRef(
|
|
|
2310
2382
|
ref: mergedRef,
|
|
2311
2383
|
...getCleanProps(restProps),
|
|
2312
2384
|
children: [
|
|
2313
|
-
/* @__PURE__ */ (0,
|
|
2314
|
-
/* @__PURE__ */ (0,
|
|
2315
|
-
/* @__PURE__ */ (0,
|
|
2385
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StyledOverlay, { $darkBg: isOnDarkBg }),
|
|
2386
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(StyledSpinnerCentre, { children: [
|
|
2387
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2316
2388
|
import_CircularProgress2.default,
|
|
2317
2389
|
{
|
|
2318
2390
|
size: 60,
|
|
@@ -2320,8 +2392,8 @@ var PageSpinner = import_react6.default.forwardRef(
|
|
|
2320
2392
|
"aria-hidden": "true"
|
|
2321
2393
|
}
|
|
2322
2394
|
),
|
|
2323
|
-
customMessageLayout ?? /* @__PURE__ */ (0,
|
|
2324
|
-
srText && /* @__PURE__ */ (0,
|
|
2395
|
+
customMessageLayout ?? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StyledSpinnerMessage, { $darkBg: isOnDarkBg, children: message }),
|
|
2396
|
+
srText && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StyledScreenReaderOnly2, { children: srText })
|
|
2325
2397
|
] })
|
|
2326
2398
|
]
|
|
2327
2399
|
}
|
|
@@ -2331,11 +2403,11 @@ var PageSpinner = import_react6.default.forwardRef(
|
|
|
2331
2403
|
PageSpinner.displayName = "ToolkitPageSpinner";
|
|
2332
2404
|
|
|
2333
2405
|
// src/components/Pagination/Pagination.tsx
|
|
2334
|
-
var
|
|
2406
|
+
var import_react8 = __toESM(require("react"));
|
|
2335
2407
|
var import_Pagination = __toESM(require("@mui/material/Pagination"));
|
|
2336
2408
|
|
|
2337
2409
|
// src/components/Pagination/Pagination.styles.tsx
|
|
2338
|
-
var
|
|
2410
|
+
var import_styles14 = require("@mui/material/styles");
|
|
2339
2411
|
var import_PaginationItem = __toESM(require("@mui/material/PaginationItem"));
|
|
2340
2412
|
function getColorValue(theme, color) {
|
|
2341
2413
|
switch (color) {
|
|
@@ -2355,58 +2427,58 @@ function getColorValue(theme, color) {
|
|
|
2355
2427
|
return theme.tokens.colors.textPrimary;
|
|
2356
2428
|
}
|
|
2357
2429
|
}
|
|
2358
|
-
var StyledPaginationItem = (0,
|
|
2430
|
+
var StyledPaginationItem = (0, import_styles14.styled)(import_PaginationItem.default, {
|
|
2359
2431
|
shouldForwardProp: (prop) => prop !== "$variant" && prop !== "$color"
|
|
2360
2432
|
})(({ theme, $variant, $color }) => {
|
|
2361
2433
|
const colorValue = getColorValue(theme, $color);
|
|
2362
2434
|
if ($variant === "text") {
|
|
2363
2435
|
return {
|
|
2364
2436
|
"&.Mui-selected": {
|
|
2365
|
-
backgroundColor: (0,
|
|
2437
|
+
backgroundColor: (0, import_styles14.alpha)(colorValue, 0.08),
|
|
2366
2438
|
color: colorValue,
|
|
2367
2439
|
"&:hover": {
|
|
2368
|
-
backgroundColor: (0,
|
|
2440
|
+
backgroundColor: (0, import_styles14.alpha)(colorValue, 0.16)
|
|
2369
2441
|
}
|
|
2370
2442
|
}
|
|
2371
2443
|
};
|
|
2372
2444
|
}
|
|
2373
2445
|
if ($variant === "outlined") {
|
|
2374
2446
|
return {
|
|
2375
|
-
border: `1px solid ${(0,
|
|
2447
|
+
border: `1px solid ${(0, import_styles14.alpha)(colorValue, 0.24)}`,
|
|
2376
2448
|
"&.Mui-selected": {
|
|
2377
|
-
border: `1px solid ${(0,
|
|
2449
|
+
border: `1px solid ${(0, import_styles14.alpha)(colorValue, 0.8)}`,
|
|
2378
2450
|
color: colorValue,
|
|
2379
|
-
backgroundColor: (0,
|
|
2451
|
+
backgroundColor: (0, import_styles14.alpha)(colorValue, 0.08),
|
|
2380
2452
|
"&:hover": {
|
|
2381
|
-
backgroundColor: (0,
|
|
2453
|
+
backgroundColor: (0, import_styles14.alpha)(colorValue, 0.16)
|
|
2382
2454
|
}
|
|
2383
2455
|
}
|
|
2384
2456
|
};
|
|
2385
2457
|
}
|
|
2386
2458
|
return {
|
|
2387
2459
|
"&.Mui-selected": {
|
|
2388
|
-
backgroundColor: (0,
|
|
2460
|
+
backgroundColor: (0, import_styles14.alpha)(colorValue, 0.16),
|
|
2389
2461
|
color: colorValue,
|
|
2390
2462
|
"&:hover": {
|
|
2391
|
-
backgroundColor: (0,
|
|
2463
|
+
backgroundColor: (0, import_styles14.alpha)(colorValue, 0.32)
|
|
2392
2464
|
}
|
|
2393
2465
|
},
|
|
2394
2466
|
"&:hover": {
|
|
2395
|
-
backgroundColor: (0,
|
|
2467
|
+
backgroundColor: (0, import_styles14.alpha)(colorValue, 0.08)
|
|
2396
2468
|
}
|
|
2397
2469
|
};
|
|
2398
2470
|
});
|
|
2399
2471
|
|
|
2400
2472
|
// src/components/Pagination/Pagination.tsx
|
|
2401
|
-
var
|
|
2402
|
-
var Pagination =
|
|
2473
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2474
|
+
var Pagination = import_react8.default.forwardRef(
|
|
2403
2475
|
function Pagination2({ variant = "text", shape = "circular", color = "default", ...restProps }, ref) {
|
|
2404
|
-
return /* @__PURE__ */ (0,
|
|
2476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2405
2477
|
import_Pagination.default,
|
|
2406
2478
|
{
|
|
2407
2479
|
ref,
|
|
2408
2480
|
"data-component-id": "Pagination",
|
|
2409
|
-
renderItem: (item) => /* @__PURE__ */ (0,
|
|
2481
|
+
renderItem: (item) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2410
2482
|
StyledPaginationItem,
|
|
2411
2483
|
{
|
|
2412
2484
|
$variant: variant,
|
|
@@ -2423,11 +2495,11 @@ var Pagination = import_react7.default.forwardRef(
|
|
|
2423
2495
|
Pagination.displayName = "ToolkitPagination";
|
|
2424
2496
|
|
|
2425
2497
|
// src/components/Paragraph/Paragraph.tsx
|
|
2426
|
-
var
|
|
2498
|
+
var import_react9 = __toESM(require("react"));
|
|
2427
2499
|
|
|
2428
2500
|
// src/components/Paragraph/Paragraph.styles.tsx
|
|
2429
|
-
var
|
|
2430
|
-
var StyledParagraph = (0,
|
|
2501
|
+
var import_styles15 = require("@mui/material/styles");
|
|
2502
|
+
var StyledParagraph = (0, import_styles15.styled)("p", {
|
|
2431
2503
|
shouldForwardProp: (prop) => prop !== "$variant" && prop !== "$isOnDarkBg"
|
|
2432
2504
|
})(({ theme, $variant = "regular", $isOnDarkBg = false }) => ({
|
|
2433
2505
|
margin: 0,
|
|
@@ -2460,10 +2532,10 @@ var StyledParagraph = (0, import_styles14.styled)("p", {
|
|
|
2460
2532
|
}));
|
|
2461
2533
|
|
|
2462
2534
|
// src/components/Paragraph/Paragraph.tsx
|
|
2463
|
-
var
|
|
2464
|
-
var Paragraph =
|
|
2535
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2536
|
+
var Paragraph = import_react9.default.forwardRef(
|
|
2465
2537
|
function Paragraph2({ children, variant = "regular", isOnDarkBg = false, ...restProps }, ref) {
|
|
2466
|
-
return /* @__PURE__ */ (0,
|
|
2538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2467
2539
|
StyledParagraph,
|
|
2468
2540
|
{
|
|
2469
2541
|
$variant: variant,
|
|
@@ -2479,15 +2551,15 @@ var Paragraph = import_react8.default.forwardRef(
|
|
|
2479
2551
|
Paragraph.displayName = "ToolkitParagraph";
|
|
2480
2552
|
|
|
2481
2553
|
// src/components/Password/Password.tsx
|
|
2482
|
-
var
|
|
2554
|
+
var import_react10 = __toESM(require("react"));
|
|
2483
2555
|
|
|
2484
2556
|
// src/components/Password/PasswordRule.tsx
|
|
2485
2557
|
var import_CheckCircle = __toESM(require("@mui/icons-material/CheckCircle"));
|
|
2486
2558
|
var import_Cancel = __toESM(require("@mui/icons-material/Cancel"));
|
|
2487
2559
|
|
|
2488
2560
|
// src/components/Password/PasswordRule.styles.tsx
|
|
2489
|
-
var
|
|
2490
|
-
var StyledPasswordRule = (0,
|
|
2561
|
+
var import_styles16 = require("@mui/material/styles");
|
|
2562
|
+
var StyledPasswordRule = (0, import_styles16.styled)("div")(({ theme }) => ({
|
|
2491
2563
|
display: "flex",
|
|
2492
2564
|
alignItems: "center",
|
|
2493
2565
|
gap: theme.tokens.spacing.xs,
|
|
@@ -2499,15 +2571,15 @@ var StyledPasswordRule = (0, import_styles15.styled)("div")(({ theme }) => ({
|
|
|
2499
2571
|
color: theme.tokens.colors.error
|
|
2500
2572
|
}
|
|
2501
2573
|
}));
|
|
2502
|
-
var StyledPasswordRuleIcon = (0,
|
|
2574
|
+
var StyledPasswordRuleIcon = (0, import_styles16.styled)("span")({
|
|
2503
2575
|
display: "inline-flex",
|
|
2504
2576
|
alignItems: "center",
|
|
2505
2577
|
flexShrink: 0
|
|
2506
2578
|
});
|
|
2507
|
-
var StyledPasswordRuleText = (0,
|
|
2579
|
+
var StyledPasswordRuleText = (0, import_styles16.styled)("span")(({ theme }) => ({
|
|
2508
2580
|
fontSize: theme.tokens.typography.fontSizeSm
|
|
2509
2581
|
}));
|
|
2510
|
-
var StyledScreenReaderOnly3 = (0,
|
|
2582
|
+
var StyledScreenReaderOnly3 = (0, import_styles16.styled)("span")({
|
|
2511
2583
|
position: "absolute",
|
|
2512
2584
|
width: 1,
|
|
2513
2585
|
height: 1,
|
|
@@ -2520,24 +2592,24 @@ var StyledScreenReaderOnly3 = (0, import_styles15.styled)("span")({
|
|
|
2520
2592
|
});
|
|
2521
2593
|
|
|
2522
2594
|
// src/components/Password/PasswordRule.tsx
|
|
2523
|
-
var
|
|
2524
|
-
var PasswordRule = ({ valid = false, rule = "", idx }) => /* @__PURE__ */ (0,
|
|
2595
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2596
|
+
var PasswordRule = ({ valid = false, rule = "", idx }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2525
2597
|
StyledPasswordRule,
|
|
2526
2598
|
{
|
|
2527
2599
|
className: valid ? "PasswordRule--valid" : "PasswordRule--invalid",
|
|
2528
2600
|
"data-testid": `password-rule-${idx}`,
|
|
2529
2601
|
children: [
|
|
2530
|
-
/* @__PURE__ */ (0,
|
|
2531
|
-
/* @__PURE__ */ (0,
|
|
2532
|
-
/* @__PURE__ */ (0,
|
|
2602
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StyledPasswordRuleIcon, { children: valid ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_CheckCircle.default, { fontSize: "small", "aria-hidden": "true" }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_Cancel.default, { fontSize: "small", "aria-hidden": "true" }) }),
|
|
2603
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StyledPasswordRuleText, { children: rule }),
|
|
2604
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StyledScreenReaderOnly3, { children: valid ? "supplied" : "not supplied" })
|
|
2533
2605
|
]
|
|
2534
2606
|
}
|
|
2535
2607
|
);
|
|
2536
2608
|
PasswordRule.displayName = "ToolkitPasswordRule";
|
|
2537
2609
|
|
|
2538
2610
|
// src/components/Password/PasswordCriteria.styles.tsx
|
|
2539
|
-
var
|
|
2540
|
-
var StyledPasswordCriteriaContainer = (0,
|
|
2611
|
+
var import_styles17 = require("@mui/material/styles");
|
|
2612
|
+
var StyledPasswordCriteriaContainer = (0, import_styles17.styled)("div")(
|
|
2541
2613
|
({ theme, $show }) => ({
|
|
2542
2614
|
display: $show ? "block" : "none",
|
|
2543
2615
|
position: "absolute",
|
|
@@ -2548,7 +2620,7 @@ var StyledPasswordCriteriaContainer = (0, import_styles16.styled)("div")(
|
|
|
2548
2620
|
marginTop: theme.tokens.spacing.xs
|
|
2549
2621
|
})
|
|
2550
2622
|
);
|
|
2551
|
-
var StyledPasswordRuleTitle = (0,
|
|
2623
|
+
var StyledPasswordRuleTitle = (0, import_styles17.styled)("div")(({ theme }) => ({
|
|
2552
2624
|
color: theme.tokens.colors.textPrimary,
|
|
2553
2625
|
fontSize: theme.tokens.typography.fontSizeSm,
|
|
2554
2626
|
fontWeight: theme.tokens.typography.fontWeightMedium,
|
|
@@ -2558,7 +2630,7 @@ var StyledPasswordRuleTitle = (0, import_styles16.styled)("div")(({ theme }) =>
|
|
|
2558
2630
|
}));
|
|
2559
2631
|
|
|
2560
2632
|
// src/components/Password/PasswordCriteria.tsx
|
|
2561
|
-
var
|
|
2633
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2562
2634
|
var PasswordRules = [
|
|
2563
2635
|
{ key: "minLength", rule: "Minimum 8 characters" },
|
|
2564
2636
|
{ key: "lowercase", rule: "At least one lowercase letter" },
|
|
@@ -2573,20 +2645,20 @@ var passwordValidator = (value) => ({
|
|
|
2573
2645
|
digit: /[0-9]/.test(value),
|
|
2574
2646
|
special: /[^A-Za-z0-9]/.test(value)
|
|
2575
2647
|
});
|
|
2576
|
-
var PasswordCriteria = ({ show = false, value = "" }) => {
|
|
2648
|
+
var PasswordCriteria = ({ show = false, value = "", id = "passwordCriteria" }) => {
|
|
2577
2649
|
const validity = passwordValidator(value);
|
|
2578
|
-
return /* @__PURE__ */ (0,
|
|
2650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2579
2651
|
StyledPasswordCriteriaContainer,
|
|
2580
2652
|
{
|
|
2581
2653
|
$show: show,
|
|
2582
2654
|
"aria-hidden": !show,
|
|
2583
|
-
id
|
|
2655
|
+
id,
|
|
2584
2656
|
"data-testid": "password-criteria",
|
|
2585
2657
|
role: "status",
|
|
2586
2658
|
"aria-live": "polite",
|
|
2587
|
-
children: /* @__PURE__ */ (0,
|
|
2588
|
-
/* @__PURE__ */ (0,
|
|
2589
|
-
PasswordRules.map((item, idx) => /* @__PURE__ */ (0,
|
|
2659
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Card, { compact: true, children: [
|
|
2660
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StyledPasswordRuleTitle, { children: "Password must contain:" }),
|
|
2661
|
+
PasswordRules.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PasswordRule, { valid: validity[item.key], rule: item.rule, idx }, item.key))
|
|
2590
2662
|
] })
|
|
2591
2663
|
}
|
|
2592
2664
|
);
|
|
@@ -2594,18 +2666,18 @@ var PasswordCriteria = ({ show = false, value = "" }) => {
|
|
|
2594
2666
|
PasswordCriteria.displayName = "ToolkitPasswordCriteria";
|
|
2595
2667
|
|
|
2596
2668
|
// src/components/Password/Password.styles.tsx
|
|
2597
|
-
var
|
|
2598
|
-
var StyledPasswordRoot = (0,
|
|
2669
|
+
var import_styles18 = require("@mui/material/styles");
|
|
2670
|
+
var StyledPasswordRoot = (0, import_styles18.styled)("div")({
|
|
2599
2671
|
position: "relative"
|
|
2600
2672
|
});
|
|
2601
|
-
var StyledPasswordInputWrapper = (0,
|
|
2673
|
+
var StyledPasswordInputWrapper = (0, import_styles18.styled)("div")({
|
|
2602
2674
|
display: "flex",
|
|
2603
2675
|
position: "relative"
|
|
2604
2676
|
});
|
|
2605
2677
|
|
|
2606
2678
|
// src/components/Password/Password.tsx
|
|
2607
|
-
var
|
|
2608
|
-
var Password =
|
|
2679
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2680
|
+
var Password = import_react10.default.forwardRef(
|
|
2609
2681
|
function Password2({
|
|
2610
2682
|
isInvalid,
|
|
2611
2683
|
value: initialValue,
|
|
@@ -2618,8 +2690,8 @@ var Password = import_react9.default.forwardRef(
|
|
|
2618
2690
|
id,
|
|
2619
2691
|
...rest
|
|
2620
2692
|
}, ref) {
|
|
2621
|
-
const [value, setValue] = (0,
|
|
2622
|
-
const [showCriteria, setShowCriteria] = (0,
|
|
2693
|
+
const [value, setValue] = (0, import_react10.useState)(initialValue ?? "");
|
|
2694
|
+
const [showCriteria, setShowCriteria] = (0, import_react10.useState)(false);
|
|
2623
2695
|
const handleFocus = () => {
|
|
2624
2696
|
setShowCriteria(true);
|
|
2625
2697
|
};
|
|
@@ -2634,9 +2706,10 @@ var Password = import_react9.default.forwardRef(
|
|
|
2634
2706
|
const isCriteriaMet = Object.values(validity).every(Boolean);
|
|
2635
2707
|
onChange?.(event, isCriteriaMet);
|
|
2636
2708
|
};
|
|
2709
|
+
const criteriaId = id ? `${id}-criteria` : "passwordCriteria";
|
|
2637
2710
|
const cleanRest = getCleanProps(rest);
|
|
2638
|
-
return /* @__PURE__ */ (0,
|
|
2639
|
-
/* @__PURE__ */ (0,
|
|
2711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(StyledPasswordRoot, { className, ...cleanRest, children: [
|
|
2712
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StyledPasswordInputWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2640
2713
|
TextField,
|
|
2641
2714
|
{
|
|
2642
2715
|
ref,
|
|
@@ -2646,24 +2719,26 @@ var Password = import_react9.default.forwardRef(
|
|
|
2646
2719
|
showPasswordToggle: true,
|
|
2647
2720
|
value,
|
|
2648
2721
|
error: isInvalid,
|
|
2649
|
-
|
|
2650
|
-
|
|
2722
|
+
inputProps: {
|
|
2723
|
+
"aria-describedby": ariaDescribedby ?? criteriaId,
|
|
2724
|
+
"aria-labelledby": ariaLabelledby
|
|
2725
|
+
},
|
|
2651
2726
|
onFocus: handleFocus,
|
|
2652
2727
|
onBlur: handleBlur,
|
|
2653
2728
|
onChange: handleChange
|
|
2654
2729
|
}
|
|
2655
2730
|
) }),
|
|
2656
|
-
/* @__PURE__ */ (0,
|
|
2731
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PasswordCriteria, { show: showCriteria, value, id: criteriaId })
|
|
2657
2732
|
] });
|
|
2658
2733
|
}
|
|
2659
2734
|
);
|
|
2660
2735
|
Password.displayName = "ToolkitPassword";
|
|
2661
2736
|
|
|
2662
2737
|
// src/components/Spinner/Spinner.tsx
|
|
2663
|
-
var
|
|
2738
|
+
var import_react11 = __toESM(require("react"));
|
|
2664
2739
|
|
|
2665
2740
|
// src/components/Spinner/Spinner.styles.tsx
|
|
2666
|
-
var
|
|
2741
|
+
var import_styles19 = require("@mui/material/styles");
|
|
2667
2742
|
var spinnerSizing = {
|
|
2668
2743
|
xs: 20,
|
|
2669
2744
|
sm: 24,
|
|
@@ -2671,7 +2746,7 @@ var spinnerSizing = {
|
|
|
2671
2746
|
lg: 56,
|
|
2672
2747
|
xl: 72
|
|
2673
2748
|
};
|
|
2674
|
-
var StyledSpinnerContainer = (0,
|
|
2749
|
+
var StyledSpinnerContainer = (0, import_styles19.styled)("div", {
|
|
2675
2750
|
shouldForwardProp: (prop) => prop !== "$inline"
|
|
2676
2751
|
})({}, ({ $inline }) => ({
|
|
2677
2752
|
flex: "0 1 100%",
|
|
@@ -2679,7 +2754,7 @@ var StyledSpinnerContainer = (0, import_styles18.styled)("div", {
|
|
|
2679
2754
|
flexDirection: $inline ? "row" : "column",
|
|
2680
2755
|
alignItems: "center"
|
|
2681
2756
|
}));
|
|
2682
|
-
var StyledSpinnerIconContainer = (0,
|
|
2757
|
+
var StyledSpinnerIconContainer = (0, import_styles19.styled)("div", {
|
|
2683
2758
|
shouldForwardProp: (prop) => prop !== "$size" && prop !== "$darkBg"
|
|
2684
2759
|
})(({ $size }) => {
|
|
2685
2760
|
const size = spinnerSizing[$size];
|
|
@@ -2689,12 +2764,12 @@ var StyledSpinnerIconContainer = (0, import_styles18.styled)("div", {
|
|
|
2689
2764
|
height: size
|
|
2690
2765
|
};
|
|
2691
2766
|
});
|
|
2692
|
-
var StyledSpinnerBackground = (0,
|
|
2767
|
+
var StyledSpinnerBackground = (0, import_styles19.styled)("div", {
|
|
2693
2768
|
shouldForwardProp: (prop) => prop !== "$size" && prop !== "$darkBg"
|
|
2694
2769
|
})(({ theme, $size, $darkBg }) => {
|
|
2695
2770
|
const size = spinnerSizing[$size];
|
|
2696
2771
|
const lineWidth = Math.round(size / 12);
|
|
2697
|
-
const borderColor = $darkBg ? (0,
|
|
2772
|
+
const borderColor = $darkBg ? (0, import_styles19.alpha)(theme.palette.common.white, 0.2) : (0, import_styles19.alpha)(theme.tokens.colors.textPrimary, 0.1);
|
|
2698
2773
|
return {
|
|
2699
2774
|
position: "absolute",
|
|
2700
2775
|
width: size,
|
|
@@ -2703,7 +2778,7 @@ var StyledSpinnerBackground = (0, import_styles18.styled)("div", {
|
|
|
2703
2778
|
border: `${lineWidth}px solid ${borderColor}`
|
|
2704
2779
|
};
|
|
2705
2780
|
});
|
|
2706
|
-
var StyledSpinner = (0,
|
|
2781
|
+
var StyledSpinner = (0, import_styles19.styled)("div", {
|
|
2707
2782
|
shouldForwardProp: (prop) => prop !== "$size" && prop !== "$darkBg"
|
|
2708
2783
|
})(({ theme, $size, $darkBg }) => {
|
|
2709
2784
|
const size = spinnerSizing[$size];
|
|
@@ -2726,7 +2801,7 @@ var StyledSpinner = (0, import_styles18.styled)("div", {
|
|
|
2726
2801
|
animation: `toolkit-spin ${animationSpeed} infinite linear`
|
|
2727
2802
|
};
|
|
2728
2803
|
});
|
|
2729
|
-
var StyledSpinnerMessage2 = (0,
|
|
2804
|
+
var StyledSpinnerMessage2 = (0, import_styles19.styled)("span", {
|
|
2730
2805
|
shouldForwardProp: (prop) => prop !== "$darkBg" && prop !== "$inline"
|
|
2731
2806
|
})(({ theme, $darkBg, $inline }) => ({
|
|
2732
2807
|
fontFamily: theme.tokens.typography.fontFamilyBase,
|
|
@@ -2735,7 +2810,7 @@ var StyledSpinnerMessage2 = (0, import_styles18.styled)("span", {
|
|
|
2735
2810
|
marginTop: $inline ? 0 : theme.spacing(1),
|
|
2736
2811
|
marginLeft: $inline ? theme.spacing(1) : 0
|
|
2737
2812
|
}));
|
|
2738
|
-
var StyledScreenReaderOnly4 = (0,
|
|
2813
|
+
var StyledScreenReaderOnly4 = (0, import_styles19.styled)("span")({
|
|
2739
2814
|
position: "absolute",
|
|
2740
2815
|
width: 1,
|
|
2741
2816
|
height: 1,
|
|
@@ -2748,10 +2823,10 @@ var StyledScreenReaderOnly4 = (0, import_styles18.styled)("span")({
|
|
|
2748
2823
|
});
|
|
2749
2824
|
|
|
2750
2825
|
// src/components/Spinner/Spinner.tsx
|
|
2751
|
-
var
|
|
2752
|
-
var Spinner =
|
|
2826
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2827
|
+
var Spinner = import_react11.default.forwardRef(
|
|
2753
2828
|
function Spinner2({ size = "sm", message, isOnDarkBg = false, srText, isInline = false, ...restProps }, ref) {
|
|
2754
|
-
return /* @__PURE__ */ (0,
|
|
2829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2755
2830
|
StyledSpinnerContainer,
|
|
2756
2831
|
{
|
|
2757
2832
|
ref,
|
|
@@ -2759,12 +2834,12 @@ var Spinner = import_react10.default.forwardRef(
|
|
|
2759
2834
|
"data-component-id": "Spinner",
|
|
2760
2835
|
...getCleanProps(restProps),
|
|
2761
2836
|
children: [
|
|
2762
|
-
/* @__PURE__ */ (0,
|
|
2763
|
-
/* @__PURE__ */ (0,
|
|
2764
|
-
/* @__PURE__ */ (0,
|
|
2837
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(StyledSpinnerIconContainer, { $size: size, "aria-hidden": "true", children: [
|
|
2838
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledSpinnerBackground, { $size: size, $darkBg: isOnDarkBg, "aria-hidden": "true" }),
|
|
2839
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledSpinner, { $size: size, $darkBg: isOnDarkBg, "aria-hidden": "true" })
|
|
2765
2840
|
] }),
|
|
2766
|
-
message && /* @__PURE__ */ (0,
|
|
2767
|
-
srText && /* @__PURE__ */ (0,
|
|
2841
|
+
message && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledSpinnerMessage2, { $darkBg: isOnDarkBg, $inline: isInline, children: message }),
|
|
2842
|
+
srText && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledScreenReaderOnly4, { children: srText })
|
|
2768
2843
|
]
|
|
2769
2844
|
}
|
|
2770
2845
|
);
|
|
@@ -2776,14 +2851,14 @@ Spinner.displayName = "ToolkitSpinner";
|
|
|
2776
2851
|
var import_FormHelperText = __toESM(require("@mui/material/FormHelperText"));
|
|
2777
2852
|
|
|
2778
2853
|
// src/components/Toggle/Toggle.styles.tsx
|
|
2779
|
-
var
|
|
2780
|
-
var StyledFieldset = (0,
|
|
2854
|
+
var import_styles20 = require("@mui/material/styles");
|
|
2855
|
+
var StyledFieldset = (0, import_styles20.styled)("fieldset")(({ theme }) => ({
|
|
2781
2856
|
border: "none",
|
|
2782
2857
|
margin: 0,
|
|
2783
2858
|
padding: 0,
|
|
2784
2859
|
minWidth: 0
|
|
2785
2860
|
}));
|
|
2786
|
-
var StyledLegend = (0,
|
|
2861
|
+
var StyledLegend = (0, import_styles20.styled)("legend")(({ theme }) => ({
|
|
2787
2862
|
fontFamily: theme.tokens.typography.fontFamilyBase,
|
|
2788
2863
|
fontSize: theme.tokens.typography.fontSizeLg,
|
|
2789
2864
|
fontWeight: theme.tokens.typography.fontWeightRegular,
|
|
@@ -2791,7 +2866,7 @@ var StyledLegend = (0, import_styles19.styled)("legend")(({ theme }) => ({
|
|
|
2791
2866
|
marginBottom: theme.spacing(1),
|
|
2792
2867
|
padding: 0
|
|
2793
2868
|
}));
|
|
2794
|
-
var StyledToggleWrapper = (0,
|
|
2869
|
+
var StyledToggleWrapper = (0, import_styles20.styled)("div")(({ theme }) => ({
|
|
2795
2870
|
display: "flex",
|
|
2796
2871
|
flexDirection: "row",
|
|
2797
2872
|
width: theme.spacing(15),
|
|
@@ -2800,7 +2875,7 @@ var StyledToggleWrapper = (0, import_styles19.styled)("div")(({ theme }) => ({
|
|
|
2800
2875
|
border: `1px solid ${theme.tokens.colors.border}`,
|
|
2801
2876
|
borderRadius: theme.tokens.borderRadius.md
|
|
2802
2877
|
}));
|
|
2803
|
-
var StyledSwitch = (0,
|
|
2878
|
+
var StyledSwitch = (0, import_styles20.styled)("label", {
|
|
2804
2879
|
shouldForwardProp: (prop) => prop !== "selected" && prop !== "controlType"
|
|
2805
2880
|
})(({ theme, selected, controlType }) => ({
|
|
2806
2881
|
position: "relative",
|
|
@@ -2890,7 +2965,7 @@ var StyledSwitch = (0, import_styles19.styled)("label", {
|
|
|
2890
2965
|
}));
|
|
2891
2966
|
|
|
2892
2967
|
// src/components/Toggle/Toggle.tsx
|
|
2893
|
-
var
|
|
2968
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2894
2969
|
function Toggle({
|
|
2895
2970
|
name,
|
|
2896
2971
|
checked = false,
|
|
@@ -2901,18 +2976,18 @@ function Toggle({
|
|
|
2901
2976
|
onBlur,
|
|
2902
2977
|
...restProps
|
|
2903
2978
|
}) {
|
|
2904
|
-
return /* @__PURE__ */ (0,
|
|
2905
|
-
label && /* @__PURE__ */ (0,
|
|
2906
|
-
description && /* @__PURE__ */ (0,
|
|
2907
|
-
/* @__PURE__ */ (0,
|
|
2908
|
-
/* @__PURE__ */ (0,
|
|
2979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(StyledFieldset, { "data-component-id": "toggle", ...getCleanProps(restProps), children: [
|
|
2980
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledLegend, { children: label }),
|
|
2981
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_FormHelperText.default, { children: description }),
|
|
2982
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(StyledToggleWrapper, { children: [
|
|
2983
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2909
2984
|
StyledSwitch,
|
|
2910
2985
|
{
|
|
2911
2986
|
htmlFor: `${name}off`,
|
|
2912
2987
|
selected: !checked,
|
|
2913
2988
|
controlType: "off",
|
|
2914
2989
|
children: [
|
|
2915
|
-
/* @__PURE__ */ (0,
|
|
2990
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2916
2991
|
"input",
|
|
2917
2992
|
{
|
|
2918
2993
|
checked: !checked,
|
|
@@ -2928,14 +3003,14 @@ function Toggle({
|
|
|
2928
3003
|
]
|
|
2929
3004
|
}
|
|
2930
3005
|
),
|
|
2931
|
-
/* @__PURE__ */ (0,
|
|
3006
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2932
3007
|
StyledSwitch,
|
|
2933
3008
|
{
|
|
2934
3009
|
htmlFor: `${name}on`,
|
|
2935
3010
|
selected: checked,
|
|
2936
3011
|
controlType: "on",
|
|
2937
3012
|
children: [
|
|
2938
|
-
/* @__PURE__ */ (0,
|
|
3013
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2939
3014
|
"input",
|
|
2940
3015
|
{
|
|
2941
3016
|
checked,
|
|
@@ -2952,47 +3027,47 @@ function Toggle({
|
|
|
2952
3027
|
}
|
|
2953
3028
|
)
|
|
2954
3029
|
] }),
|
|
2955
|
-
error && /* @__PURE__ */ (0,
|
|
3030
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_FormHelperText.default, { error: true, children: error })
|
|
2956
3031
|
] });
|
|
2957
3032
|
}
|
|
2958
3033
|
Toggle.displayName = "ToolkitToggle";
|
|
2959
3034
|
|
|
2960
3035
|
// src/components/Table/Table.tsx
|
|
2961
|
-
var
|
|
2962
|
-
var
|
|
2963
|
-
var
|
|
2964
|
-
var StyledTableContainer = (0,
|
|
3036
|
+
var import_material11 = require("@mui/material");
|
|
3037
|
+
var import_styles21 = require("@mui/material/styles");
|
|
3038
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3039
|
+
var StyledTableContainer = (0, import_styles21.styled)(import_material11.TableContainer)(() => ({
|
|
2965
3040
|
overflowX: "auto"
|
|
2966
3041
|
}));
|
|
2967
|
-
var StyledHeadCell = (0,
|
|
3042
|
+
var StyledHeadCell = (0, import_styles21.styled)(import_material11.TableCell)(({ theme }) => ({
|
|
2968
3043
|
fontWeight: theme.tokens.components.table.headerFontWeight,
|
|
2969
3044
|
backgroundColor: theme.tokens.components.table.headerBackground,
|
|
2970
3045
|
borderBottomWidth: theme.tokens.components.table.borderWidth,
|
|
2971
3046
|
borderBottomColor: theme.tokens.components.table.borderColor
|
|
2972
3047
|
}));
|
|
2973
3048
|
function Table(props) {
|
|
2974
|
-
return /* @__PURE__ */ (0,
|
|
3049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_material11.Table, { ...props });
|
|
2975
3050
|
}
|
|
2976
3051
|
function TableHead(props) {
|
|
2977
|
-
return /* @__PURE__ */ (0,
|
|
3052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_material11.TableHead, { ...props });
|
|
2978
3053
|
}
|
|
2979
3054
|
function TableBody(props) {
|
|
2980
|
-
return /* @__PURE__ */ (0,
|
|
3055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_material11.TableBody, { ...props });
|
|
2981
3056
|
}
|
|
2982
3057
|
function TableRow(props) {
|
|
2983
|
-
return /* @__PURE__ */ (0,
|
|
3058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_material11.TableRow, { ...props });
|
|
2984
3059
|
}
|
|
2985
3060
|
function TableCell(props) {
|
|
2986
|
-
return /* @__PURE__ */ (0,
|
|
3061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_material11.TableCell, { ...props });
|
|
2987
3062
|
}
|
|
2988
3063
|
function TableHeadCell(props) {
|
|
2989
|
-
return /* @__PURE__ */ (0,
|
|
3064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledHeadCell, { component: "th", scope: "col", ...props });
|
|
2990
3065
|
}
|
|
2991
3066
|
function TableContainer(props) {
|
|
2992
|
-
return /* @__PURE__ */ (0,
|
|
3067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledTableContainer, { ...props });
|
|
2993
3068
|
}
|
|
2994
|
-
var TablePagination =
|
|
2995
|
-
var TableSortLabel =
|
|
3069
|
+
var TablePagination = import_material11.TablePagination;
|
|
3070
|
+
var TableSortLabel = import_material11.TableSortLabel;
|
|
2996
3071
|
Table.displayName = "ToolkitTable";
|
|
2997
3072
|
TableHead.displayName = "ToolkitTableHead";
|
|
2998
3073
|
TableBody.displayName = "ToolkitTableBody";
|
|
@@ -3002,144 +3077,144 @@ TableHeadCell.displayName = "ToolkitTableHeadCell";
|
|
|
3002
3077
|
TableContainer.displayName = "ToolkitTableContainer";
|
|
3003
3078
|
|
|
3004
3079
|
// src/foundation/H1/H1.tsx
|
|
3005
|
-
var
|
|
3006
|
-
var
|
|
3007
|
-
var
|
|
3008
|
-
var H1 =
|
|
3080
|
+
var import_react12 = __toESM(require("react"));
|
|
3081
|
+
var import_material12 = require("@mui/material");
|
|
3082
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3083
|
+
var H1 = import_react12.default.forwardRef(
|
|
3009
3084
|
function H12({ color = "text.primary", children, ...props }, ref) {
|
|
3010
|
-
return /* @__PURE__ */ (0,
|
|
3085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material12.Typography, { ref, variant: "h1", color, ...props, children });
|
|
3011
3086
|
}
|
|
3012
3087
|
);
|
|
3013
3088
|
H1.displayName = "ToolkitH1";
|
|
3014
3089
|
|
|
3015
3090
|
// src/foundation/H2/H2.tsx
|
|
3016
|
-
var
|
|
3017
|
-
var
|
|
3018
|
-
var
|
|
3019
|
-
var H2 =
|
|
3091
|
+
var import_react13 = __toESM(require("react"));
|
|
3092
|
+
var import_material13 = require("@mui/material");
|
|
3093
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3094
|
+
var H2 = import_react13.default.forwardRef(
|
|
3020
3095
|
function H22({ color = "text.primary", children, ...props }, ref) {
|
|
3021
|
-
return /* @__PURE__ */ (0,
|
|
3096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material13.Typography, { ref, variant: "h2", color, ...props, children });
|
|
3022
3097
|
}
|
|
3023
3098
|
);
|
|
3024
3099
|
H2.displayName = "ToolkitH2";
|
|
3025
3100
|
|
|
3026
3101
|
// src/foundation/H3/H3.tsx
|
|
3027
|
-
var
|
|
3028
|
-
var
|
|
3029
|
-
var
|
|
3030
|
-
var H3 =
|
|
3102
|
+
var import_react14 = __toESM(require("react"));
|
|
3103
|
+
var import_material14 = require("@mui/material");
|
|
3104
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3105
|
+
var H3 = import_react14.default.forwardRef(
|
|
3031
3106
|
function H32({ color = "text.primary", children, ...props }, ref) {
|
|
3032
|
-
return /* @__PURE__ */ (0,
|
|
3107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_material14.Typography, { ref, variant: "h3", color, ...props, children });
|
|
3033
3108
|
}
|
|
3034
3109
|
);
|
|
3035
3110
|
H3.displayName = "ToolkitH3";
|
|
3036
3111
|
|
|
3037
3112
|
// src/foundation/H4/H4.tsx
|
|
3038
|
-
var
|
|
3039
|
-
var
|
|
3040
|
-
var
|
|
3041
|
-
var H4 =
|
|
3113
|
+
var import_react15 = __toESM(require("react"));
|
|
3114
|
+
var import_material15 = require("@mui/material");
|
|
3115
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3116
|
+
var H4 = import_react15.default.forwardRef(
|
|
3042
3117
|
function H42({ color = "text.primary", children, ...props }, ref) {
|
|
3043
|
-
return /* @__PURE__ */ (0,
|
|
3118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_material15.Typography, { ref, variant: "h4", color, ...props, children });
|
|
3044
3119
|
}
|
|
3045
3120
|
);
|
|
3046
3121
|
H4.displayName = "ToolkitH4";
|
|
3047
3122
|
|
|
3048
3123
|
// src/foundation/H5/H5.tsx
|
|
3049
|
-
var
|
|
3050
|
-
var
|
|
3051
|
-
var
|
|
3052
|
-
var H5 =
|
|
3124
|
+
var import_react16 = __toESM(require("react"));
|
|
3125
|
+
var import_material16 = require("@mui/material");
|
|
3126
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3127
|
+
var H5 = import_react16.default.forwardRef(
|
|
3053
3128
|
function H52({ color = "text.primary", children, ...props }, ref) {
|
|
3054
|
-
return /* @__PURE__ */ (0,
|
|
3129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_material16.Typography, { ref, variant: "h5", color, ...props, children });
|
|
3055
3130
|
}
|
|
3056
3131
|
);
|
|
3057
3132
|
H5.displayName = "ToolkitH5";
|
|
3058
3133
|
|
|
3059
3134
|
// src/foundation/H6/H6.tsx
|
|
3060
|
-
var
|
|
3061
|
-
var
|
|
3062
|
-
var
|
|
3063
|
-
var H6 =
|
|
3135
|
+
var import_react17 = __toESM(require("react"));
|
|
3136
|
+
var import_material17 = require("@mui/material");
|
|
3137
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3138
|
+
var H6 = import_react17.default.forwardRef(
|
|
3064
3139
|
function H62({ color = "text.primary", children, ...props }, ref) {
|
|
3065
|
-
return /* @__PURE__ */ (0,
|
|
3140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_material17.Typography, { ref, variant: "h6", color, ...props, children });
|
|
3066
3141
|
}
|
|
3067
3142
|
);
|
|
3068
3143
|
H6.displayName = "ToolkitH6";
|
|
3069
3144
|
|
|
3070
3145
|
// src/foundation/Subtitle1/Subtitle1.tsx
|
|
3071
|
-
var
|
|
3072
|
-
var
|
|
3073
|
-
var
|
|
3074
|
-
var Subtitle1 =
|
|
3146
|
+
var import_react18 = __toESM(require("react"));
|
|
3147
|
+
var import_material18 = require("@mui/material");
|
|
3148
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3149
|
+
var Subtitle1 = import_react18.default.forwardRef(
|
|
3075
3150
|
function Subtitle12({ color = "text.primary", children, ...props }, ref) {
|
|
3076
|
-
return /* @__PURE__ */ (0,
|
|
3151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_material18.Typography, { ref, variant: "subtitle1", color, ...props, children });
|
|
3077
3152
|
}
|
|
3078
3153
|
);
|
|
3079
3154
|
Subtitle1.displayName = "ToolkitSubtitle1";
|
|
3080
3155
|
|
|
3081
3156
|
// src/foundation/Subtitle2/Subtitle2.tsx
|
|
3082
|
-
var
|
|
3083
|
-
var
|
|
3084
|
-
var
|
|
3085
|
-
var Subtitle2 =
|
|
3157
|
+
var import_react19 = __toESM(require("react"));
|
|
3158
|
+
var import_material19 = require("@mui/material");
|
|
3159
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3160
|
+
var Subtitle2 = import_react19.default.forwardRef(
|
|
3086
3161
|
function Subtitle22({ color = "text.primary", children, ...props }, ref) {
|
|
3087
|
-
return /* @__PURE__ */ (0,
|
|
3162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_material19.Typography, { ref, variant: "subtitle2", color, ...props, children });
|
|
3088
3163
|
}
|
|
3089
3164
|
);
|
|
3090
3165
|
Subtitle2.displayName = "ToolkitSubtitle2";
|
|
3091
3166
|
|
|
3092
3167
|
// src/foundation/Body1/Body1.tsx
|
|
3093
|
-
var
|
|
3094
|
-
var
|
|
3095
|
-
var
|
|
3096
|
-
var Body1 =
|
|
3168
|
+
var import_react20 = __toESM(require("react"));
|
|
3169
|
+
var import_material20 = require("@mui/material");
|
|
3170
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3171
|
+
var Body1 = import_react20.default.forwardRef(
|
|
3097
3172
|
function Body12({ color = "text.primary", children, ...props }, ref) {
|
|
3098
|
-
return /* @__PURE__ */ (0,
|
|
3173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_material20.Typography, { ref, variant: "body1", color, ...props, children });
|
|
3099
3174
|
}
|
|
3100
3175
|
);
|
|
3101
3176
|
Body1.displayName = "ToolkitBody1";
|
|
3102
3177
|
|
|
3103
3178
|
// src/foundation/Body2/Body2.tsx
|
|
3104
|
-
var
|
|
3105
|
-
var
|
|
3106
|
-
var
|
|
3107
|
-
var Body2 =
|
|
3179
|
+
var import_react21 = __toESM(require("react"));
|
|
3180
|
+
var import_material21 = require("@mui/material");
|
|
3181
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3182
|
+
var Body2 = import_react21.default.forwardRef(
|
|
3108
3183
|
function Body22({ color = "text.primary", children, ...props }, ref) {
|
|
3109
|
-
return /* @__PURE__ */ (0,
|
|
3184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_material21.Typography, { ref, variant: "body2", color, ...props, children });
|
|
3110
3185
|
}
|
|
3111
3186
|
);
|
|
3112
3187
|
Body2.displayName = "ToolkitBody2";
|
|
3113
3188
|
|
|
3114
3189
|
// src/foundation/Caption/Caption.tsx
|
|
3115
|
-
var
|
|
3116
|
-
var
|
|
3117
|
-
var
|
|
3118
|
-
var Caption =
|
|
3190
|
+
var import_react22 = __toESM(require("react"));
|
|
3191
|
+
var import_material22 = require("@mui/material");
|
|
3192
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3193
|
+
var Caption = import_react22.default.forwardRef(
|
|
3119
3194
|
function Caption2({ color = "text.primary", children, ...props }, ref) {
|
|
3120
|
-
return /* @__PURE__ */ (0,
|
|
3195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_material22.Typography, { ref, variant: "caption", color, ...props, children });
|
|
3121
3196
|
}
|
|
3122
3197
|
);
|
|
3123
3198
|
Caption.displayName = "ToolkitCaption";
|
|
3124
3199
|
|
|
3125
3200
|
// src/foundation/Overline/Overline.tsx
|
|
3126
|
-
var
|
|
3127
|
-
var
|
|
3128
|
-
var
|
|
3129
|
-
var Overline =
|
|
3201
|
+
var import_react23 = __toESM(require("react"));
|
|
3202
|
+
var import_material23 = require("@mui/material");
|
|
3203
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3204
|
+
var Overline = import_react23.default.forwardRef(
|
|
3130
3205
|
function Overline2({ color = "text.primary", children, ...props }, ref) {
|
|
3131
|
-
return /* @__PURE__ */ (0,
|
|
3206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material23.Typography, { ref, variant: "overline", color, ...props, children });
|
|
3132
3207
|
}
|
|
3133
3208
|
);
|
|
3134
3209
|
Overline.displayName = "ToolkitOverline";
|
|
3135
3210
|
|
|
3136
3211
|
// src/foundation/TypographyButton/TypographyButton.tsx
|
|
3137
|
-
var
|
|
3138
|
-
var
|
|
3139
|
-
var
|
|
3140
|
-
var TypographyButton =
|
|
3212
|
+
var import_react24 = __toESM(require("react"));
|
|
3213
|
+
var import_material24 = require("@mui/material");
|
|
3214
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3215
|
+
var TypographyButton = import_react24.default.forwardRef(
|
|
3141
3216
|
function TypographyButton2({ color = "text.primary", children, ...props }, ref) {
|
|
3142
|
-
return /* @__PURE__ */ (0,
|
|
3217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material24.Typography, { ref, variant: "button", color, ...props, children });
|
|
3143
3218
|
}
|
|
3144
3219
|
);
|
|
3145
3220
|
TypographyButton.displayName = "ToolkitTypographyButton";
|
|
@@ -3180,6 +3255,7 @@ TypographyButton.displayName = "ToolkitTypographyButton";
|
|
|
3180
3255
|
H4,
|
|
3181
3256
|
H5,
|
|
3182
3257
|
H6,
|
|
3258
|
+
IconText,
|
|
3183
3259
|
InternalLinkItem,
|
|
3184
3260
|
Link,
|
|
3185
3261
|
LogoLink,
|