@wso2/oxygen-ui 0.13.1 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ai/components.md +235 -0
- package/.claude/components.md +235 -0
- package/dist/components/AppSwitcher/AppSwitcher.d.ts +79 -0
- package/dist/components/AppSwitcher/AppSwitcherApp.d.ts +101 -0
- package/dist/components/AppSwitcher/AppSwitcherFooter.d.ts +88 -0
- package/dist/components/AppSwitcher/AppSwitcherSection.d.ts +46 -0
- package/dist/components/AppSwitcher/AppSwitcherTrigger.d.ts +44 -0
- package/dist/components/AppSwitcher/brand.d.ts +48 -0
- package/dist/components/AppSwitcher/context.d.ts +49 -0
- package/dist/components/AppSwitcher/index.d.ts +29 -0
- package/dist/components/UserMenu/UserMenu.d.ts +1 -1
- package/dist/components/UserMenu/UserMenuLogout.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +1059 -591
- package/dist/index.js.map +4 -4
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -472,7 +472,7 @@ var init_createOxygenTheme = __esm({
|
|
|
472
472
|
// package.json
|
|
473
473
|
var package_default = {
|
|
474
474
|
name: "@wso2/oxygen-ui",
|
|
475
|
-
version: "0.
|
|
475
|
+
version: "0.14.0",
|
|
476
476
|
description: "WSO2 Oxygen UI | Design System - Powered with Material-UI component library with TypeScript support",
|
|
477
477
|
type: "module",
|
|
478
478
|
main: "./dist/index.js",
|
|
@@ -3859,16 +3859,491 @@ Header.Actions = HeaderActions;
|
|
|
3859
3859
|
Header.Spacer = HeaderSpacer;
|
|
3860
3860
|
Header.displayName = "Header";
|
|
3861
3861
|
|
|
3862
|
+
// src/components/AppSwitcher/AppSwitcher.tsx
|
|
3863
|
+
import * as React18 from "react";
|
|
3864
|
+
import Popover2 from "@mui/material/Popover";
|
|
3865
|
+
import { styled as styled27 } from "@mui/material/styles";
|
|
3866
|
+
|
|
3867
|
+
// src/components/AppSwitcher/context.ts
|
|
3868
|
+
import * as React13 from "react";
|
|
3869
|
+
var AppSwitcherContext = React13.createContext(null);
|
|
3870
|
+
var useAppSwitcher = () => {
|
|
3871
|
+
const context = React13.useContext(AppSwitcherContext);
|
|
3872
|
+
if (!context) {
|
|
3873
|
+
throw new Error("AppSwitcher sub-components must be used within an AppSwitcher component");
|
|
3874
|
+
}
|
|
3875
|
+
return context;
|
|
3876
|
+
};
|
|
3877
|
+
AppSwitcherContext.displayName = "AppSwitcher.Context";
|
|
3878
|
+
var AppSwitcherFooterContext = React13.createContext(false);
|
|
3879
|
+
AppSwitcherFooterContext.displayName = "AppSwitcher.FooterContext";
|
|
3880
|
+
|
|
3881
|
+
// src/components/AppSwitcher/AppSwitcherTrigger.tsx
|
|
3882
|
+
import * as React14 from "react";
|
|
3883
|
+
import IconButton4 from "@mui/material/IconButton";
|
|
3884
|
+
import Tooltip3 from "@mui/material/Tooltip";
|
|
3885
|
+
import { styled as styled23 } from "@mui/material/styles";
|
|
3886
|
+
import { Grip } from "@wso2/oxygen-ui-icons-react";
|
|
3887
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3888
|
+
var DEFAULT_LABEL = "Switch Platforms";
|
|
3889
|
+
var AppSwitcherTriggerRoot = styled23(IconButton4, {
|
|
3890
|
+
name: "MuiAppSwitcher",
|
|
3891
|
+
slot: "Trigger"
|
|
3892
|
+
})(({ theme }) => ({
|
|
3893
|
+
// The trigger stays a pointer once the popover is open: it is still a live
|
|
3894
|
+
// control, and a second click dismisses the switcher. Stated explicitly so a
|
|
3895
|
+
// future `aria-expanded` style cannot drop it back to the default arrow.
|
|
3896
|
+
cursor: "pointer",
|
|
3897
|
+
'&[aria-expanded="true"]': {
|
|
3898
|
+
backgroundColor: (theme.vars || theme).palette.action.selected,
|
|
3899
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
3900
|
+
cursor: "pointer"
|
|
3901
|
+
}
|
|
3902
|
+
}));
|
|
3903
|
+
var AppSwitcherTrigger = React14.forwardRef(
|
|
3904
|
+
function AppSwitcherTrigger2(_a, ref) {
|
|
3905
|
+
var _b = _a, { label = DEFAULT_LABEL, icon, onClick, "aria-label": ariaLabel } = _b, props = __objRest(_b, ["label", "icon", "onClick", "aria-label"]);
|
|
3906
|
+
const { open, popoverId, handleOpen } = useAppSwitcher();
|
|
3907
|
+
const resolvedLabel = label.trim().length > 0 ? label : DEFAULT_LABEL;
|
|
3908
|
+
const resolvedAriaLabel = typeof ariaLabel === "string" && ariaLabel.trim().length > 0 ? ariaLabel : resolvedLabel;
|
|
3909
|
+
return /* @__PURE__ */ jsx36(Tooltip3, { title: resolvedLabel, children: /* @__PURE__ */ jsx36(
|
|
3910
|
+
AppSwitcherTriggerRoot,
|
|
3911
|
+
__spreadProps(__spreadValues({}, props), {
|
|
3912
|
+
ref,
|
|
3913
|
+
onClick: (event) => {
|
|
3914
|
+
handleOpen(event);
|
|
3915
|
+
onClick == null ? void 0 : onClick(event);
|
|
3916
|
+
},
|
|
3917
|
+
"aria-label": resolvedAriaLabel,
|
|
3918
|
+
"aria-controls": open ? popoverId : void 0,
|
|
3919
|
+
"aria-haspopup": "true",
|
|
3920
|
+
"aria-expanded": open,
|
|
3921
|
+
children: /* @__PURE__ */ jsx36("span", { "aria-hidden": "true", style: { display: "inline-flex" }, children: icon || /* @__PURE__ */ jsx36(Grip, { size: 24 }) })
|
|
3922
|
+
})
|
|
3923
|
+
) });
|
|
3924
|
+
}
|
|
3925
|
+
);
|
|
3926
|
+
AppSwitcherTrigger.displayName = "AppSwitcher.Trigger";
|
|
3927
|
+
|
|
3928
|
+
// src/components/AppSwitcher/AppSwitcherSection.tsx
|
|
3929
|
+
import * as React15 from "react";
|
|
3930
|
+
import Box13 from "@mui/material/Box";
|
|
3931
|
+
import Typography8 from "@mui/material/Typography";
|
|
3932
|
+
import { styled as styled24 } from "@mui/material/styles";
|
|
3933
|
+
import { jsx as jsx37, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3934
|
+
var AppSwitcherSectionRoot = styled24(Box13, {
|
|
3935
|
+
name: "MuiAppSwitcher",
|
|
3936
|
+
slot: "Section"
|
|
3937
|
+
})(({ theme }) => ({
|
|
3938
|
+
padding: theme.spacing(2)
|
|
3939
|
+
}));
|
|
3940
|
+
var AppSwitcherSectionLabel = styled24(Typography8, {
|
|
3941
|
+
name: "MuiAppSwitcher",
|
|
3942
|
+
slot: "SectionLabel"
|
|
3943
|
+
})(({ theme }) => ({
|
|
3944
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
3945
|
+
fontSize: theme.typography.caption.fontSize,
|
|
3946
|
+
fontWeight: theme.typography.fontWeightBold,
|
|
3947
|
+
// Wide tracking so the headings read as quiet labels rather than as titles.
|
|
3948
|
+
letterSpacing: "0.1em",
|
|
3949
|
+
textTransform: "uppercase",
|
|
3950
|
+
marginBottom: theme.spacing(1.5)
|
|
3951
|
+
}));
|
|
3952
|
+
var AppSwitcherSectionGrid = styled24("ul", {
|
|
3953
|
+
name: "MuiAppSwitcher",
|
|
3954
|
+
slot: "SectionGrid",
|
|
3955
|
+
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
3956
|
+
})(({ theme, ownerState }) => ({
|
|
3957
|
+
display: "grid",
|
|
3958
|
+
gap: theme.spacing(1.5),
|
|
3959
|
+
gridTemplateColumns: "1fr",
|
|
3960
|
+
listStyle: "none",
|
|
3961
|
+
margin: 0,
|
|
3962
|
+
padding: 0,
|
|
3963
|
+
[theme.breakpoints.up("sm")]: {
|
|
3964
|
+
gridTemplateColumns: `repeat(${ownerState.columns}, minmax(0, 1fr))`
|
|
3965
|
+
},
|
|
3966
|
+
"& > li": {
|
|
3967
|
+
display: "contents"
|
|
3968
|
+
}
|
|
3969
|
+
}));
|
|
3970
|
+
var AppSwitcherSection = ({
|
|
3971
|
+
children,
|
|
3972
|
+
label,
|
|
3973
|
+
columns = 3
|
|
3974
|
+
}) => {
|
|
3975
|
+
const labelId = React15.useId();
|
|
3976
|
+
const gridRef = React15.useRef(null);
|
|
3977
|
+
const handleKeyDown = (event) => {
|
|
3978
|
+
var _a, _b;
|
|
3979
|
+
const keys = ["ArrowRight", "ArrowLeft", "ArrowDown", "ArrowUp", "Home", "End"];
|
|
3980
|
+
if (!keys.includes(event.key)) {
|
|
3981
|
+
return;
|
|
3982
|
+
}
|
|
3983
|
+
const cards = Array.from(
|
|
3984
|
+
(_b = (_a = gridRef.current) == null ? void 0 : _a.querySelectorAll("[data-app-switcher-app]")) != null ? _b : []
|
|
3985
|
+
);
|
|
3986
|
+
if (cards.length === 0) {
|
|
3987
|
+
return;
|
|
3988
|
+
}
|
|
3989
|
+
const currentIndex = cards.indexOf(document.activeElement);
|
|
3990
|
+
if (currentIndex === -1) {
|
|
3991
|
+
return;
|
|
3992
|
+
}
|
|
3993
|
+
const firstTop = cards[0].getBoundingClientRect().top;
|
|
3994
|
+
const perRow = Math.max(
|
|
3995
|
+
1,
|
|
3996
|
+
cards.filter((card) => card.getBoundingClientRect().top === firstTop).length
|
|
3997
|
+
);
|
|
3998
|
+
let nextIndex = currentIndex;
|
|
3999
|
+
switch (event.key) {
|
|
4000
|
+
case "ArrowRight":
|
|
4001
|
+
nextIndex = currentIndex + 1;
|
|
4002
|
+
break;
|
|
4003
|
+
case "ArrowLeft":
|
|
4004
|
+
nextIndex = currentIndex - 1;
|
|
4005
|
+
break;
|
|
4006
|
+
case "ArrowDown":
|
|
4007
|
+
nextIndex = currentIndex + perRow;
|
|
4008
|
+
break;
|
|
4009
|
+
case "ArrowUp":
|
|
4010
|
+
nextIndex = currentIndex - perRow;
|
|
4011
|
+
break;
|
|
4012
|
+
case "Home":
|
|
4013
|
+
nextIndex = 0;
|
|
4014
|
+
break;
|
|
4015
|
+
case "End":
|
|
4016
|
+
nextIndex = cards.length - 1;
|
|
4017
|
+
break;
|
|
4018
|
+
default:
|
|
4019
|
+
break;
|
|
4020
|
+
}
|
|
4021
|
+
if (nextIndex < 0 || nextIndex >= cards.length) {
|
|
4022
|
+
return;
|
|
4023
|
+
}
|
|
4024
|
+
event.preventDefault();
|
|
4025
|
+
cards[nextIndex].focus();
|
|
4026
|
+
};
|
|
4027
|
+
return /* @__PURE__ */ jsxs11(AppSwitcherSectionRoot, { children: [
|
|
4028
|
+
label && /* @__PURE__ */ jsx37(AppSwitcherSectionLabel, { id: labelId, children: label }),
|
|
4029
|
+
/* @__PURE__ */ jsx37(
|
|
4030
|
+
AppSwitcherSectionGrid,
|
|
4031
|
+
{
|
|
4032
|
+
ref: gridRef,
|
|
4033
|
+
ownerState: { columns },
|
|
4034
|
+
role: "list",
|
|
4035
|
+
"aria-labelledby": label ? labelId : void 0,
|
|
4036
|
+
onKeyDown: handleKeyDown,
|
|
4037
|
+
children: React15.Children.map(
|
|
4038
|
+
children,
|
|
4039
|
+
(child) => React15.isValidElement(child) ? /* @__PURE__ */ jsx37("li", { children: child }) : child
|
|
4040
|
+
)
|
|
4041
|
+
}
|
|
4042
|
+
)
|
|
4043
|
+
] });
|
|
4044
|
+
};
|
|
4045
|
+
AppSwitcherSection.displayName = "AppSwitcher.Section";
|
|
4046
|
+
|
|
4047
|
+
// src/components/AppSwitcher/AppSwitcherApp.tsx
|
|
4048
|
+
import * as React16 from "react";
|
|
4049
|
+
import Box14 from "@mui/material/Box";
|
|
4050
|
+
import Card2 from "@mui/material/Card";
|
|
4051
|
+
import ButtonBase2 from "@mui/material/ButtonBase";
|
|
4052
|
+
import Tooltip4 from "@mui/material/Tooltip";
|
|
4053
|
+
import Typography9 from "@mui/material/Typography";
|
|
4054
|
+
import { styled as styled25 } from "@mui/material/styles";
|
|
4055
|
+
|
|
4056
|
+
// src/components/AppSwitcher/brand.ts
|
|
4057
|
+
var APP_SWITCHER_BRAND = {
|
|
4058
|
+
/** Full-strength WSO2 orange. Decorative surfaces only. */
|
|
4059
|
+
main: "#FF7300",
|
|
4060
|
+
/**
|
|
4061
|
+
* Darker orange reserved for the focus ring, where 3:1 against the card
|
|
4062
|
+
* surface is required. Do not swap it back to `main`.
|
|
4063
|
+
*/
|
|
4064
|
+
focus: "#E56800",
|
|
4065
|
+
/** Faded orange for the mark of a platform that is not yet available. */
|
|
4066
|
+
surfaceMark: "#FFC199"
|
|
4067
|
+
};
|
|
4068
|
+
|
|
4069
|
+
// src/components/AppSwitcher/AppSwitcherApp.tsx
|
|
4070
|
+
import { WSO2 } from "@wso2/oxygen-ui-icons-react";
|
|
4071
|
+
import { jsx as jsx38, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4072
|
+
var AppSwitcherAppRoot = styled25(Card2, {
|
|
4073
|
+
name: "MuiAppSwitcher",
|
|
4074
|
+
slot: "App",
|
|
4075
|
+
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
4076
|
+
})(({ theme, ownerState }) => {
|
|
4077
|
+
const accent = APP_SWITCHER_BRAND.main;
|
|
4078
|
+
const manage = ownerState.tone === "manage";
|
|
4079
|
+
return __spreadProps(__spreadValues({
|
|
4080
|
+
display: "flex",
|
|
4081
|
+
flexDirection: "column",
|
|
4082
|
+
alignItems: "center",
|
|
4083
|
+
justifyContent: "center",
|
|
4084
|
+
// The manage row is a denser, secondary version of the same card: a smaller
|
|
4085
|
+
// mark, tighter gap and less height, so it reads as settings rather than as
|
|
4086
|
+
// another row of products.
|
|
4087
|
+
gap: theme.spacing(manage ? 0.75 : 1.25),
|
|
4088
|
+
width: "100%",
|
|
4089
|
+
// A fixed height rather than a floor, so every card in the switcher is the
|
|
4090
|
+
// same size whether its name runs to one line or two. The name itself is
|
|
4091
|
+
// clamped to two lines, so nothing can outgrow the box.
|
|
4092
|
+
height: theme.spacing(manage ? 9 : 13),
|
|
4093
|
+
padding: manage ? theme.spacing(1, 1) : theme.spacing(1.25, 1),
|
|
4094
|
+
textAlign: "center",
|
|
4095
|
+
// A navigable card renders as an `<a>`, which underlines its text by
|
|
4096
|
+
// default. The card is the link target, not the words, so the underline is
|
|
4097
|
+
// cleared here rather than on the name alone.
|
|
4098
|
+
textDecoration: "none",
|
|
4099
|
+
transition: theme.transitions.create(
|
|
4100
|
+
["border-color", "box-shadow", "background-color", "transform"],
|
|
4101
|
+
{ duration: theme.transitions.duration.shorter }
|
|
4102
|
+
),
|
|
4103
|
+
"&.MuiCard-root": {
|
|
4104
|
+
borderColor: (theme.vars || theme).palette.divider,
|
|
4105
|
+
backgroundColor: (theme.vars || theme).palette.background.paper
|
|
4106
|
+
}
|
|
4107
|
+
}, ownerState.disabled && {
|
|
4108
|
+
cursor: "not-allowed",
|
|
4109
|
+
"&.MuiCard-root": {
|
|
4110
|
+
borderColor: (theme.vars || theme).palette.divider,
|
|
4111
|
+
backgroundColor: (theme.vars || theme).palette.action.hover
|
|
4112
|
+
}
|
|
4113
|
+
}), {
|
|
4114
|
+
"&:hover": __spreadValues({}, !ownerState.disabled && {
|
|
4115
|
+
borderColor: accent,
|
|
4116
|
+
boxShadow: theme.shadows[2],
|
|
4117
|
+
transform: "translateY(-2px)"
|
|
4118
|
+
}),
|
|
4119
|
+
// MUI only adds `.Mui-focusVisible` on ButtonBase; anchors and consumer
|
|
4120
|
+
// components need the native selector to get the same ring.
|
|
4121
|
+
"&.Mui-focusVisible, &:focus-visible": {
|
|
4122
|
+
// The focus ring uses the darker brand token so it clears the 3:1 that
|
|
4123
|
+
// WCAG 2.1 SC 1.4.11 asks of an author-defined focus indicator.
|
|
4124
|
+
outline: `2px solid ${APP_SWITCHER_BRAND.focus}`,
|
|
4125
|
+
outlineOffset: 2
|
|
4126
|
+
},
|
|
4127
|
+
// Motion is decoration here; the border and shadow still carry the state.
|
|
4128
|
+
"@media (prefers-reduced-motion: reduce)": {
|
|
4129
|
+
transition: "none",
|
|
4130
|
+
"&:hover": {
|
|
4131
|
+
transform: "none"
|
|
4132
|
+
}
|
|
4133
|
+
}
|
|
4134
|
+
});
|
|
4135
|
+
});
|
|
4136
|
+
var AppSwitcherAppIcon = styled25(Box14, {
|
|
4137
|
+
name: "MuiAppSwitcher",
|
|
4138
|
+
slot: "AppIcon",
|
|
4139
|
+
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
4140
|
+
})(({ theme, ownerState }) => {
|
|
4141
|
+
const manage = ownerState.tone === "manage";
|
|
4142
|
+
return __spreadProps(__spreadValues(__spreadProps(__spreadValues({
|
|
4143
|
+
display: "inline-flex",
|
|
4144
|
+
alignItems: "center",
|
|
4145
|
+
justifyContent: "center",
|
|
4146
|
+
flexShrink: 0
|
|
4147
|
+
}, manage && {
|
|
4148
|
+
width: theme.spacing(3.5),
|
|
4149
|
+
height: theme.spacing(3.5)
|
|
4150
|
+
}), {
|
|
4151
|
+
borderRadius: "50%",
|
|
4152
|
+
backgroundColor: manage ? (theme.vars || theme).palette.action.hover : "transparent",
|
|
4153
|
+
// The WSO2 mark is brand artwork rather than a themed accent, so it stays
|
|
4154
|
+
// orange; manage glyphs are neutral so they read as settings.
|
|
4155
|
+
color: manage ? (theme.vars || theme).palette.text.secondary : APP_SWITCHER_BRAND.main
|
|
4156
|
+
}), ownerState.disabled && {
|
|
4157
|
+
color: manage ? (theme.vars || theme).palette.text.disabled : APP_SWITCHER_BRAND.surfaceMark
|
|
4158
|
+
}), {
|
|
4159
|
+
"& svg": {
|
|
4160
|
+
display: "block"
|
|
4161
|
+
}
|
|
4162
|
+
});
|
|
4163
|
+
});
|
|
4164
|
+
var AppSwitcherAppName = styled25(Typography9, {
|
|
4165
|
+
name: "MuiAppSwitcher",
|
|
4166
|
+
slot: "AppName",
|
|
4167
|
+
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
4168
|
+
})(({ theme, ownerState }) => ({
|
|
4169
|
+
// Both rows take the same size; the manage row stays secondary through its
|
|
4170
|
+
// lighter weight and smaller mark rather than through a smaller label.
|
|
4171
|
+
fontSize: theme.typography.body2.fontSize,
|
|
4172
|
+
fontWeight: ownerState.tone === "manage" ? theme.typography.fontWeightRegular : theme.typography.fontWeightMedium,
|
|
4173
|
+
lineHeight: 1.35,
|
|
4174
|
+
// Grey rather than full-strength text: the mark carries the card, and the
|
|
4175
|
+
// names sit a step back from it.
|
|
4176
|
+
color: ownerState.disabled ? (theme.vars || theme).palette.text.disabled : (theme.vars || theme).palette.text.secondary,
|
|
4177
|
+
// `minmax(0, 1fr)` grid tracks still let a long unbroken name push the card
|
|
4178
|
+
// wider, so wrap rather than overflow.
|
|
4179
|
+
overflowWrap: "anywhere",
|
|
4180
|
+
// The card is a fixed height, so a long name is clamped instead of spilling
|
|
4181
|
+
// past the border. The manage row is sized for a single line, the platform
|
|
4182
|
+
// row for two.
|
|
4183
|
+
display: "-webkit-box",
|
|
4184
|
+
WebkitBoxOrient: "vertical",
|
|
4185
|
+
WebkitLineClamp: ownerState.tone === "manage" ? 1 : 2,
|
|
4186
|
+
overflow: "hidden"
|
|
4187
|
+
}));
|
|
4188
|
+
var AppSwitcherApp = React16.forwardRef(
|
|
4189
|
+
function AppSwitcherApp2({
|
|
4190
|
+
name,
|
|
4191
|
+
url,
|
|
4192
|
+
icon,
|
|
4193
|
+
tone: toneProp,
|
|
4194
|
+
disabled = false,
|
|
4195
|
+
tooltip,
|
|
4196
|
+
component,
|
|
4197
|
+
componentProps,
|
|
4198
|
+
target = "_blank",
|
|
4199
|
+
onClick
|
|
4200
|
+
}, ref) {
|
|
4201
|
+
const inFooter = React16.useContext(AppSwitcherFooterContext);
|
|
4202
|
+
const tone = toneProp != null ? toneProp : inFooter ? "manage" : "platform";
|
|
4203
|
+
const handleClick = (event) => {
|
|
4204
|
+
if (disabled) {
|
|
4205
|
+
event.preventDefault();
|
|
4206
|
+
return;
|
|
4207
|
+
}
|
|
4208
|
+
onClick == null ? void 0 : onClick(event);
|
|
4209
|
+
};
|
|
4210
|
+
const ownerState = { disabled, tone };
|
|
4211
|
+
const renderAsLink = Boolean(url) && !disabled;
|
|
4212
|
+
const effectiveTarget = typeof (componentProps == null ? void 0 : componentProps.target) === "string" ? componentProps.target : target;
|
|
4213
|
+
const linkProps = __spreadValues(__spreadValues({}, url && { href: url }), effectiveTarget && { target: effectiveTarget });
|
|
4214
|
+
const relProps = effectiveTarget === "_blank" ? { rel: "noopener noreferrer" } : {};
|
|
4215
|
+
const anchorProps = component && !disabled ? __spreadValues(__spreadValues(__spreadValues({ component }, componentProps), linkProps), relProps) : renderAsLink ? __spreadValues(__spreadValues({ component: "a" }, linkProps), relProps) : { component: ButtonBase2 };
|
|
4216
|
+
const handleKeyDown = (event) => {
|
|
4217
|
+
if (disabled && (event.key === "Enter" || event.key === " ")) {
|
|
4218
|
+
event.preventDefault();
|
|
4219
|
+
}
|
|
4220
|
+
};
|
|
4221
|
+
const card = /* @__PURE__ */ jsxs12(
|
|
4222
|
+
AppSwitcherAppRoot,
|
|
4223
|
+
__spreadProps(__spreadValues({}, anchorProps), {
|
|
4224
|
+
ref,
|
|
4225
|
+
ownerState,
|
|
4226
|
+
variant: "outlined",
|
|
4227
|
+
onClick: handleClick,
|
|
4228
|
+
onKeyDown: handleKeyDown,
|
|
4229
|
+
"data-app-switcher-app": "",
|
|
4230
|
+
"aria-disabled": disabled ? "true" : void 0,
|
|
4231
|
+
children: [
|
|
4232
|
+
/* @__PURE__ */ jsx38(AppSwitcherAppIcon, { ownerState, "aria-hidden": "true", children: icon != null ? icon : /* @__PURE__ */ jsx38(WSO2, { size: tone === "manage" ? 16 : 32 }) }),
|
|
4233
|
+
/* @__PURE__ */ jsx38(AppSwitcherAppName, { ownerState, children: name })
|
|
4234
|
+
]
|
|
4235
|
+
})
|
|
4236
|
+
);
|
|
4237
|
+
return tooltip ? /* @__PURE__ */ jsx38(Tooltip4, { title: tooltip, describeChild: true, children: card }) : card;
|
|
4238
|
+
}
|
|
4239
|
+
);
|
|
4240
|
+
AppSwitcherApp.displayName = "AppSwitcher.App";
|
|
4241
|
+
|
|
4242
|
+
// src/components/AppSwitcher/AppSwitcherFooter.tsx
|
|
4243
|
+
import * as React17 from "react";
|
|
4244
|
+
import Box15 from "@mui/material/Box";
|
|
4245
|
+
import { alpha, styled as styled26 } from "@mui/material/styles";
|
|
4246
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
4247
|
+
var AppSwitcherFooterRoot = styled26(Box15, {
|
|
4248
|
+
name: "MuiAppSwitcher",
|
|
4249
|
+
slot: "Footer"
|
|
4250
|
+
})(({ theme }) => ({
|
|
4251
|
+
borderTop: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
4252
|
+
// A wash rather than a fill: the divider already separates the manage row, so
|
|
4253
|
+
// the tint only needs to hint that it is a different kind of destination.
|
|
4254
|
+
// `action.hover` at full strength reads as a grey block behind the cards.
|
|
4255
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.02)` : alpha(theme.palette.text.primary, 0.02)
|
|
4256
|
+
}));
|
|
4257
|
+
var AppSwitcherFooter = ({
|
|
4258
|
+
children,
|
|
4259
|
+
links,
|
|
4260
|
+
label = "Manage",
|
|
4261
|
+
columns = 3
|
|
4262
|
+
}) => {
|
|
4263
|
+
const cards = children != null ? children : links == null ? void 0 : links.map((_a) => {
|
|
4264
|
+
var _b = _a, { key } = _b, link = __objRest(_b, ["key"]);
|
|
4265
|
+
return /* @__PURE__ */ jsx39(AppSwitcherApp, __spreadValues({}, link), key);
|
|
4266
|
+
});
|
|
4267
|
+
if (React17.Children.toArray(cards).length === 0) {
|
|
4268
|
+
return null;
|
|
4269
|
+
}
|
|
4270
|
+
return /* @__PURE__ */ jsx39(AppSwitcherFooterRoot, { children: /* @__PURE__ */ jsx39(AppSwitcherFooterContext.Provider, { value: true, children: /* @__PURE__ */ jsx39(AppSwitcherSection, { label, columns, children: cards }) }) });
|
|
4271
|
+
};
|
|
4272
|
+
AppSwitcherFooter.displayName = "AppSwitcher.Footer";
|
|
4273
|
+
|
|
4274
|
+
// src/components/AppSwitcher/AppSwitcher.tsx
|
|
4275
|
+
import { jsx as jsx40, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4276
|
+
var AppSwitcherRoot = styled27(Popover2, {
|
|
4277
|
+
name: "MuiAppSwitcher",
|
|
4278
|
+
slot: "Root",
|
|
4279
|
+
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
4280
|
+
})(({ theme, ownerState }) => ({
|
|
4281
|
+
"& .MuiPopover-paper": {
|
|
4282
|
+
width: `calc(100vw - ${theme.spacing(4)})`,
|
|
4283
|
+
maxWidth: "100%",
|
|
4284
|
+
marginTop: theme.spacing(1),
|
|
4285
|
+
overflow: "hidden",
|
|
4286
|
+
[theme.breakpoints.up("sm")]: {
|
|
4287
|
+
width: ownerState.width
|
|
4288
|
+
}
|
|
4289
|
+
}
|
|
4290
|
+
}));
|
|
4291
|
+
var AppSwitcher = ({ children, width = 460, "aria-label": ariaLabelProp, sx }) => {
|
|
4292
|
+
const [anchorEl, setAnchorEl] = React18.useState(null);
|
|
4293
|
+
const open = Boolean(anchorEl);
|
|
4294
|
+
const popoverId = React18.useId();
|
|
4295
|
+
const handleOpen = React18.useCallback((event) => {
|
|
4296
|
+
const target = event.currentTarget;
|
|
4297
|
+
setAnchorEl((current) => current ? null : target);
|
|
4298
|
+
}, []);
|
|
4299
|
+
const handleClose = React18.useCallback(() => {
|
|
4300
|
+
setAnchorEl(null);
|
|
4301
|
+
}, []);
|
|
4302
|
+
const ariaLabel = typeof ariaLabelProp === "string" && ariaLabelProp.trim().length > 0 ? ariaLabelProp : "Applications";
|
|
4303
|
+
const contextValue = React18.useMemo(
|
|
4304
|
+
() => ({ open, anchorEl, popoverId, handleOpen, handleClose }),
|
|
4305
|
+
[open, anchorEl, popoverId, handleOpen, handleClose]
|
|
4306
|
+
);
|
|
4307
|
+
const childrenArray = React18.Children.toArray(children);
|
|
4308
|
+
const triggerChild = childrenArray.find(
|
|
4309
|
+
(child) => React18.isValidElement(child) && child.type === AppSwitcherTrigger
|
|
4310
|
+
);
|
|
4311
|
+
const popoverChildren = childrenArray.filter((child) => child !== triggerChild);
|
|
4312
|
+
return /* @__PURE__ */ jsxs13(AppSwitcherContext.Provider, { value: contextValue, children: [
|
|
4313
|
+
triggerChild,
|
|
4314
|
+
/* @__PURE__ */ jsx40(
|
|
4315
|
+
AppSwitcherRoot,
|
|
4316
|
+
{
|
|
4317
|
+
id: popoverId,
|
|
4318
|
+
ownerState: { width },
|
|
4319
|
+
anchorEl,
|
|
4320
|
+
open,
|
|
4321
|
+
onClose: handleClose,
|
|
4322
|
+
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
4323
|
+
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
4324
|
+
slotProps: { paper: { role: "dialog", "aria-label": ariaLabel } },
|
|
4325
|
+
sx,
|
|
4326
|
+
children: popoverChildren
|
|
4327
|
+
}
|
|
4328
|
+
)
|
|
4329
|
+
] });
|
|
4330
|
+
};
|
|
4331
|
+
AppSwitcher.Trigger = AppSwitcherTrigger;
|
|
4332
|
+
AppSwitcher.Section = AppSwitcherSection;
|
|
4333
|
+
AppSwitcher.App = AppSwitcherApp;
|
|
4334
|
+
AppSwitcher.Footer = AppSwitcherFooter;
|
|
4335
|
+
AppSwitcher.displayName = "AppSwitcher";
|
|
4336
|
+
|
|
3862
4337
|
// src/components/Sidebar/Sidebar.tsx
|
|
3863
|
-
import * as
|
|
3864
|
-
import
|
|
3865
|
-
import { styled as
|
|
4338
|
+
import * as React26 from "react";
|
|
4339
|
+
import Box21 from "@mui/material/Box";
|
|
4340
|
+
import { styled as styled40 } from "@mui/material/styles";
|
|
3866
4341
|
|
|
3867
4342
|
// src/components/Sidebar/context.ts
|
|
3868
|
-
import * as
|
|
3869
|
-
var SidebarContext =
|
|
4343
|
+
import * as React19 from "react";
|
|
4344
|
+
var SidebarContext = React19.createContext(null);
|
|
3870
4345
|
var useSidebar = () => {
|
|
3871
|
-
const context =
|
|
4346
|
+
const context = React19.useContext(SidebarContext);
|
|
3872
4347
|
if (!context) {
|
|
3873
4348
|
throw new Error("Sidebar compound components must be used within Sidebar");
|
|
3874
4349
|
}
|
|
@@ -3876,12 +4351,12 @@ var useSidebar = () => {
|
|
|
3876
4351
|
};
|
|
3877
4352
|
|
|
3878
4353
|
// src/components/Sidebar/SidebarNav.tsx
|
|
3879
|
-
import * as
|
|
3880
|
-
import
|
|
4354
|
+
import * as React20 from "react";
|
|
4355
|
+
import Box16 from "@mui/material/Box";
|
|
3881
4356
|
import Divider3 from "@mui/material/Divider";
|
|
3882
|
-
import { styled as
|
|
3883
|
-
import { jsx as
|
|
3884
|
-
var SidebarNavRoot =
|
|
4357
|
+
import { styled as styled28 } from "@mui/material/styles";
|
|
4358
|
+
import { jsx as jsx41, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4359
|
+
var SidebarNavRoot = styled28(Box16, {
|
|
3885
4360
|
name: "MuiSidebar",
|
|
3886
4361
|
slot: "Nav"
|
|
3887
4362
|
})(({ theme }) => ({
|
|
@@ -3901,7 +4376,7 @@ var SidebarNavRoot = styled23(Box13, {
|
|
|
3901
4376
|
backgroundColor: (theme.vars || theme).palette.action.active
|
|
3902
4377
|
}
|
|
3903
4378
|
}));
|
|
3904
|
-
var SidebarNavDivider =
|
|
4379
|
+
var SidebarNavDivider = styled28(Divider3, {
|
|
3905
4380
|
name: "MuiSidebar",
|
|
3906
4381
|
slot: "NavDivider"
|
|
3907
4382
|
})(({ theme }) => ({
|
|
@@ -3916,24 +4391,24 @@ var SidebarNav = ({
|
|
|
3916
4391
|
sx
|
|
3917
4392
|
}) => {
|
|
3918
4393
|
const { collapsed } = useSidebar();
|
|
3919
|
-
const childArray =
|
|
3920
|
-
return /* @__PURE__ */
|
|
3921
|
-
index > 0 && showDividers && !collapsed && /* @__PURE__ */
|
|
4394
|
+
const childArray = React20.Children.toArray(children);
|
|
4395
|
+
return /* @__PURE__ */ jsx41(SidebarNavRoot, { component: "nav", sx, children: childArray.map((child, index) => /* @__PURE__ */ jsxs14(React20.Fragment, { children: [
|
|
4396
|
+
index > 0 && showDividers && !collapsed && /* @__PURE__ */ jsx41(SidebarNavDivider, {}),
|
|
3922
4397
|
child
|
|
3923
4398
|
] }, index)) });
|
|
3924
4399
|
};
|
|
3925
4400
|
|
|
3926
4401
|
// src/components/Sidebar/SidebarCategory.tsx
|
|
3927
|
-
import * as
|
|
3928
|
-
import
|
|
4402
|
+
import * as React21 from "react";
|
|
4403
|
+
import Box17 from "@mui/material/Box";
|
|
3929
4404
|
import List from "@mui/material/List";
|
|
3930
|
-
import { styled as
|
|
4405
|
+
import { styled as styled30 } from "@mui/material/styles";
|
|
3931
4406
|
|
|
3932
4407
|
// src/components/Sidebar/SidebarCategoryLabel.tsx
|
|
3933
|
-
import
|
|
3934
|
-
import { styled as
|
|
3935
|
-
import { jsx as
|
|
3936
|
-
var SidebarCategoryLabelRoot =
|
|
4408
|
+
import Typography10 from "@mui/material/Typography";
|
|
4409
|
+
import { styled as styled29 } from "@mui/material/styles";
|
|
4410
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
4411
|
+
var SidebarCategoryLabelRoot = styled29(Typography10, {
|
|
3937
4412
|
name: "MuiSidebar",
|
|
3938
4413
|
slot: "CategoryLabel",
|
|
3939
4414
|
shouldForwardProp: (prop) => prop !== "collapsed"
|
|
@@ -3958,13 +4433,13 @@ var SidebarCategoryLabelRoot = styled24(Typography8, {
|
|
|
3958
4433
|
}));
|
|
3959
4434
|
var SidebarCategoryLabel = ({ children, sx }) => {
|
|
3960
4435
|
const { collapsed } = useSidebar();
|
|
3961
|
-
return /* @__PURE__ */
|
|
4436
|
+
return /* @__PURE__ */ jsx42(SidebarCategoryLabelRoot, { variant: "caption", collapsed, sx, children });
|
|
3962
4437
|
};
|
|
3963
4438
|
SidebarCategoryLabel.displayName = "SidebarCategoryLabel";
|
|
3964
4439
|
|
|
3965
4440
|
// src/components/Sidebar/SidebarCategory.tsx
|
|
3966
|
-
import { jsx as
|
|
3967
|
-
var SidebarCategoryRoot =
|
|
4441
|
+
import { jsx as jsx43, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4442
|
+
var SidebarCategoryRoot = styled30(Box17, {
|
|
3968
4443
|
name: "MuiSidebar",
|
|
3969
4444
|
slot: "Category"
|
|
3970
4445
|
})(({ theme }) => ({
|
|
@@ -3973,9 +4448,9 @@ var SidebarCategoryRoot = styled25(Box14, {
|
|
|
3973
4448
|
var separateChildren = (children) => {
|
|
3974
4449
|
let labelChild = null;
|
|
3975
4450
|
const otherChildren = [];
|
|
3976
|
-
|
|
4451
|
+
React21.Children.forEach(children, (child) => {
|
|
3977
4452
|
var _a;
|
|
3978
|
-
if (
|
|
4453
|
+
if (React21.isValidElement(child)) {
|
|
3979
4454
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
3980
4455
|
if (displayName === "SidebarCategoryLabel") {
|
|
3981
4456
|
labelChild = child;
|
|
@@ -3993,16 +4468,16 @@ var SidebarCategory = ({
|
|
|
3993
4468
|
sx
|
|
3994
4469
|
}) => {
|
|
3995
4470
|
const { labelChild, otherChildren } = separateChildren(children);
|
|
3996
|
-
return /* @__PURE__ */
|
|
4471
|
+
return /* @__PURE__ */ jsxs15(SidebarCategoryRoot, { sx, children: [
|
|
3997
4472
|
labelChild,
|
|
3998
|
-
/* @__PURE__ */
|
|
4473
|
+
/* @__PURE__ */ jsx43(List, { disablePadding: true, children: otherChildren })
|
|
3999
4474
|
] });
|
|
4000
4475
|
};
|
|
4001
4476
|
SidebarCategory.displayName = "SidebarCategory";
|
|
4002
4477
|
|
|
4003
4478
|
// src/components/Sidebar/SidebarItem.tsx
|
|
4004
|
-
import * as
|
|
4005
|
-
import
|
|
4479
|
+
import * as React24 from "react";
|
|
4480
|
+
import Box18 from "@mui/material/Box";
|
|
4006
4481
|
import List2 from "@mui/material/List";
|
|
4007
4482
|
import ListItem from "@mui/material/ListItem";
|
|
4008
4483
|
import ListItemButton from "@mui/material/ListItemButton";
|
|
@@ -4011,17 +4486,17 @@ import ListItemText2 from "@mui/material/ListItemText";
|
|
|
4011
4486
|
import MenuItem4 from "@mui/material/MenuItem";
|
|
4012
4487
|
import MenuList from "@mui/material/MenuList";
|
|
4013
4488
|
import Collapse from "@mui/material/Collapse";
|
|
4014
|
-
import
|
|
4015
|
-
import
|
|
4016
|
-
import { styled as
|
|
4489
|
+
import Tooltip5 from "@mui/material/Tooltip";
|
|
4490
|
+
import Popover3 from "@mui/material/Popover";
|
|
4491
|
+
import { styled as styled34 } from "@mui/material/styles";
|
|
4017
4492
|
import { ChevronDown as ChevronDown2, ChevronUp } from "@wso2/oxygen-ui-icons-react";
|
|
4018
4493
|
|
|
4019
4494
|
// src/components/Sidebar/SidebarItemContext.tsx
|
|
4020
|
-
import * as
|
|
4021
|
-
import { jsx as
|
|
4022
|
-
var SidebarItemContext =
|
|
4495
|
+
import * as React22 from "react";
|
|
4496
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
4497
|
+
var SidebarItemContext = React22.createContext(null);
|
|
4023
4498
|
var useSidebarItemContext = () => {
|
|
4024
|
-
const context =
|
|
4499
|
+
const context = React22.useContext(SidebarItemContext);
|
|
4025
4500
|
if (!context) {
|
|
4026
4501
|
throw new Error(
|
|
4027
4502
|
"useSidebarItemContext must be used within a SidebarItem component"
|
|
@@ -4030,15 +4505,15 @@ var useSidebarItemContext = () => {
|
|
|
4030
4505
|
return context;
|
|
4031
4506
|
};
|
|
4032
4507
|
var SidebarItemProvider = ({ value, children }) => {
|
|
4033
|
-
return /* @__PURE__ */
|
|
4508
|
+
return /* @__PURE__ */ jsx44(SidebarItemContext.Provider, { value, children });
|
|
4034
4509
|
};
|
|
4035
4510
|
|
|
4036
4511
|
// src/components/Sidebar/SidebarItemIcon.tsx
|
|
4037
|
-
import * as
|
|
4512
|
+
import * as React23 from "react";
|
|
4038
4513
|
import ListItemIcon from "@mui/material/ListItemIcon";
|
|
4039
|
-
import { styled as
|
|
4040
|
-
import { jsx as
|
|
4041
|
-
var SidebarItemIconRoot =
|
|
4514
|
+
import { styled as styled31 } from "@mui/material/styles";
|
|
4515
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
4516
|
+
var SidebarItemIconRoot = styled31(ListItemIcon, {
|
|
4042
4517
|
name: "MuiSidebar",
|
|
4043
4518
|
slot: "ItemIcon",
|
|
4044
4519
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -4055,10 +4530,10 @@ var SidebarItemIcon = ({
|
|
|
4055
4530
|
var _a;
|
|
4056
4531
|
const { collapsed } = useSidebar();
|
|
4057
4532
|
const { isActive } = useSidebarItemContext();
|
|
4058
|
-
const iconWithSize =
|
|
4533
|
+
const iconWithSize = React23.isValidElement(children) ? React23.cloneElement(children, __spreadProps(__spreadValues({}, children.props), {
|
|
4059
4534
|
size: (_a = children.props.size) != null ? _a : 20
|
|
4060
4535
|
})) : children;
|
|
4061
|
-
return /* @__PURE__ */
|
|
4536
|
+
return /* @__PURE__ */ jsx45(
|
|
4062
4537
|
SidebarItemIconRoot,
|
|
4063
4538
|
{
|
|
4064
4539
|
ownerState: { collapsed, isActive },
|
|
@@ -4071,9 +4546,9 @@ SidebarItemIcon.displayName = "SidebarItemIcon";
|
|
|
4071
4546
|
|
|
4072
4547
|
// src/components/Sidebar/SidebarItemLabel.tsx
|
|
4073
4548
|
import ListItemText from "@mui/material/ListItemText";
|
|
4074
|
-
import { styled as
|
|
4075
|
-
import { jsx as
|
|
4076
|
-
var SidebarItemLabelRoot =
|
|
4549
|
+
import { styled as styled32 } from "@mui/material/styles";
|
|
4550
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
4551
|
+
var SidebarItemLabelRoot = styled32(ListItemText, {
|
|
4077
4552
|
name: "MuiSidebar",
|
|
4078
4553
|
slot: "ItemLabel",
|
|
4079
4554
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -4098,15 +4573,15 @@ var SidebarItemLabel = ({
|
|
|
4098
4573
|
}) => {
|
|
4099
4574
|
const { collapsed } = useSidebar();
|
|
4100
4575
|
const { isActive } = useSidebarItemContext();
|
|
4101
|
-
return /* @__PURE__ */
|
|
4576
|
+
return /* @__PURE__ */ jsx46(SidebarItemLabelRoot, { primary: children, ownerState: { isActive, collapsed }, sx });
|
|
4102
4577
|
};
|
|
4103
4578
|
SidebarItemLabel.displayName = "SidebarItemLabel";
|
|
4104
4579
|
|
|
4105
4580
|
// src/components/Sidebar/SidebarItemBadge.tsx
|
|
4106
4581
|
import Chip from "@mui/material/Chip";
|
|
4107
|
-
import { styled as
|
|
4108
|
-
import { jsx as
|
|
4109
|
-
var SidebarItemBadgeRoot =
|
|
4582
|
+
import { styled as styled33 } from "@mui/material/styles";
|
|
4583
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
4584
|
+
var SidebarItemBadgeRoot = styled33(Chip, {
|
|
4110
4585
|
name: "MuiSidebar",
|
|
4111
4586
|
slot: "ItemBadge"
|
|
4112
4587
|
})({
|
|
@@ -4123,20 +4598,20 @@ var SidebarItemBadge = ({
|
|
|
4123
4598
|
if (collapsed) {
|
|
4124
4599
|
return null;
|
|
4125
4600
|
}
|
|
4126
|
-
return /* @__PURE__ */
|
|
4601
|
+
return /* @__PURE__ */ jsx47(SidebarItemBadgeRoot, { label: children, size: "small", color, sx });
|
|
4127
4602
|
};
|
|
4128
4603
|
SidebarItemBadge.displayName = "SidebarItemBadge";
|
|
4129
4604
|
|
|
4130
4605
|
// src/components/Sidebar/SidebarItem.tsx
|
|
4131
|
-
import { Fragment as Fragment5, jsx as
|
|
4132
|
-
var SidebarItemRoot =
|
|
4606
|
+
import { Fragment as Fragment5, jsx as jsx48, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4607
|
+
var SidebarItemRoot = styled34(ListItem, {
|
|
4133
4608
|
name: "MuiSidebar",
|
|
4134
4609
|
slot: "Item"
|
|
4135
4610
|
})({
|
|
4136
4611
|
display: "block",
|
|
4137
4612
|
padding: 0
|
|
4138
4613
|
});
|
|
4139
|
-
var SidebarItemButton =
|
|
4614
|
+
var SidebarItemButton = styled34(ListItemButton, {
|
|
4140
4615
|
name: "MuiSidebar",
|
|
4141
4616
|
slot: "ItemButton",
|
|
4142
4617
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -4160,7 +4635,7 @@ var SidebarItemButton = styled29(ListItemButton, {
|
|
|
4160
4635
|
}
|
|
4161
4636
|
}
|
|
4162
4637
|
}));
|
|
4163
|
-
var SidebarItemChevron =
|
|
4638
|
+
var SidebarItemChevron = styled34(Box18, {
|
|
4164
4639
|
name: "MuiSidebar",
|
|
4165
4640
|
slot: "ItemChevron"
|
|
4166
4641
|
})({
|
|
@@ -4169,20 +4644,20 @@ var SidebarItemChevron = styled29(Box15, {
|
|
|
4169
4644
|
display: "flex",
|
|
4170
4645
|
alignItems: "center"
|
|
4171
4646
|
});
|
|
4172
|
-
var SidebarItemPopover =
|
|
4647
|
+
var SidebarItemPopover = styled34(Popover3, {
|
|
4173
4648
|
name: "MuiSidebar",
|
|
4174
4649
|
slot: "ItemPopover"
|
|
4175
4650
|
})({
|
|
4176
4651
|
pointerEvents: "none"
|
|
4177
4652
|
});
|
|
4178
|
-
var SidebarItemPopoverList =
|
|
4653
|
+
var SidebarItemPopoverList = styled34(MenuList, {
|
|
4179
4654
|
name: "MuiSidebar",
|
|
4180
4655
|
slot: "ItemPopoverList"
|
|
4181
4656
|
})(({ theme }) => ({
|
|
4182
4657
|
padding: theme.spacing(0.5),
|
|
4183
4658
|
pointerEvents: "auto"
|
|
4184
4659
|
}));
|
|
4185
|
-
var SidebarItemPopoverButton =
|
|
4660
|
+
var SidebarItemPopoverButton = styled34(MenuItem4, {
|
|
4186
4661
|
name: "MuiSidebar",
|
|
4187
4662
|
slot: "ItemPopoverButton"
|
|
4188
4663
|
})(({ theme }) => ({
|
|
@@ -4206,9 +4681,9 @@ var CHILD_DISPLAY_NAMES = [
|
|
|
4206
4681
|
var separateChildren2 = (children) => {
|
|
4207
4682
|
const composableChildren = [];
|
|
4208
4683
|
const nestedItems = [];
|
|
4209
|
-
|
|
4684
|
+
React24.Children.toArray(children).forEach((child) => {
|
|
4210
4685
|
var _a;
|
|
4211
|
-
if (
|
|
4686
|
+
if (React24.isValidElement(child)) {
|
|
4212
4687
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4213
4688
|
if (displayName && CHILD_DISPLAY_NAMES.includes(displayName)) {
|
|
4214
4689
|
composableChildren.push(child);
|
|
@@ -4223,9 +4698,9 @@ var separateChildren2 = (children) => {
|
|
|
4223
4698
|
};
|
|
4224
4699
|
var getTooltipLabel = (children) => {
|
|
4225
4700
|
let tooltipLabel = "";
|
|
4226
|
-
|
|
4701
|
+
React24.Children.forEach(children, (child) => {
|
|
4227
4702
|
var _a;
|
|
4228
|
-
if (
|
|
4703
|
+
if (React24.isValidElement(child)) {
|
|
4229
4704
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4230
4705
|
const props = child.props;
|
|
4231
4706
|
if (displayName === "SidebarItemLabel" && props.children) {
|
|
@@ -4238,9 +4713,9 @@ var getTooltipLabel = (children) => {
|
|
|
4238
4713
|
var extractItemContent = (itemChildren) => {
|
|
4239
4714
|
let icon = null;
|
|
4240
4715
|
let label = "";
|
|
4241
|
-
|
|
4716
|
+
React24.Children.forEach(itemChildren, (child) => {
|
|
4242
4717
|
var _a;
|
|
4243
|
-
if (
|
|
4718
|
+
if (React24.isValidElement(child)) {
|
|
4244
4719
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4245
4720
|
const props = child.props;
|
|
4246
4721
|
if (displayName === "SidebarItemIcon") {
|
|
@@ -4264,33 +4739,33 @@ var SidebarItem = ({
|
|
|
4264
4739
|
const hasNestedItems = nestedItems.length > 0;
|
|
4265
4740
|
const isActive = activeItem === id;
|
|
4266
4741
|
const isExpanded = expandedMenus[id] || false;
|
|
4267
|
-
const hasActiveChild =
|
|
4742
|
+
const hasActiveChild = React24.useMemo(() => {
|
|
4268
4743
|
if (!hasNestedItems || !activeItem) return false;
|
|
4269
4744
|
return nestedItems.some((child) => {
|
|
4270
|
-
if (
|
|
4745
|
+
if (React24.isValidElement(child)) {
|
|
4271
4746
|
return child.props.id === activeItem;
|
|
4272
4747
|
}
|
|
4273
4748
|
return false;
|
|
4274
4749
|
});
|
|
4275
4750
|
}, [hasNestedItems, nestedItems, activeItem]);
|
|
4276
|
-
const [popoverAnchor, setPopoverAnchor] =
|
|
4277
|
-
const [popoverOpenedByClick, setPopoverOpenedByClick] =
|
|
4278
|
-
const closeTimeoutRef =
|
|
4751
|
+
const [popoverAnchor, setPopoverAnchor] = React24.useState(null);
|
|
4752
|
+
const [popoverOpenedByClick, setPopoverOpenedByClick] = React24.useState(false);
|
|
4753
|
+
const closeTimeoutRef = React24.useRef(null);
|
|
4279
4754
|
const popoverOpen = Boolean(popoverAnchor);
|
|
4280
|
-
const popoverId =
|
|
4281
|
-
const clearCloseTimeout =
|
|
4755
|
+
const popoverId = React24.useId();
|
|
4756
|
+
const clearCloseTimeout = React24.useCallback(() => {
|
|
4282
4757
|
if (closeTimeoutRef.current != null) {
|
|
4283
4758
|
clearTimeout(closeTimeoutRef.current);
|
|
4284
4759
|
closeTimeoutRef.current = null;
|
|
4285
4760
|
}
|
|
4286
4761
|
}, []);
|
|
4287
|
-
const closePopover =
|
|
4762
|
+
const closePopover = React24.useCallback(() => {
|
|
4288
4763
|
clearCloseTimeout();
|
|
4289
4764
|
setPopoverAnchor(null);
|
|
4290
4765
|
setPopoverOpenedByClick(false);
|
|
4291
4766
|
}, [clearCloseTimeout]);
|
|
4292
|
-
|
|
4293
|
-
|
|
4767
|
+
React24.useEffect(() => () => clearCloseTimeout(), [clearCloseTimeout]);
|
|
4768
|
+
React24.useEffect(() => {
|
|
4294
4769
|
if (!collapsed) {
|
|
4295
4770
|
closePopover();
|
|
4296
4771
|
}
|
|
@@ -4340,7 +4815,7 @@ var SidebarItem = ({
|
|
|
4340
4815
|
const tooltipLabel = getTooltipLabel(children);
|
|
4341
4816
|
const ownerState = { collapsed, depth };
|
|
4342
4817
|
const shouldShowSelected = isActive && !hasNestedItems || collapsed && hasActiveChild;
|
|
4343
|
-
const buttonContent = /* @__PURE__ */
|
|
4818
|
+
const buttonContent = /* @__PURE__ */ jsx48(
|
|
4344
4819
|
SidebarItemButton,
|
|
4345
4820
|
{
|
|
4346
4821
|
selected: shouldShowSelected,
|
|
@@ -4351,21 +4826,21 @@ var SidebarItem = ({
|
|
|
4351
4826
|
"aria-expanded": hasNestedItems ? collapsed ? popoverOpen : isExpanded : void 0,
|
|
4352
4827
|
"aria-haspopup": collapsed && hasNestedItems ? "menu" : void 0,
|
|
4353
4828
|
"aria-controls": popoverOpen ? popoverId : void 0,
|
|
4354
|
-
children: /* @__PURE__ */
|
|
4829
|
+
children: /* @__PURE__ */ jsxs16(SidebarItemProvider, { value: contextValue, children: [
|
|
4355
4830
|
composableChildren,
|
|
4356
|
-
!collapsed && hasNestedItems && /* @__PURE__ */
|
|
4357
|
-
!collapsed && !hasNestedItems && /* @__PURE__ */
|
|
4831
|
+
!collapsed && hasNestedItems && /* @__PURE__ */ jsx48(SidebarItemChevron, { "aria-hidden": "true", children: isExpanded ? /* @__PURE__ */ jsx48(ChevronUp, { size: 16 }) : /* @__PURE__ */ jsx48(ChevronDown2, { size: 16 }) }),
|
|
4832
|
+
!collapsed && !hasNestedItems && /* @__PURE__ */ jsx48(Box18, { sx: { ml: "auto", width: 16, pl: 1 } })
|
|
4358
4833
|
] })
|
|
4359
4834
|
}
|
|
4360
4835
|
);
|
|
4361
|
-
const wrappedContent = link ? /* @__PURE__ */
|
|
4836
|
+
const wrappedContent = link ? /* @__PURE__ */ jsx48(Fragment5, { children: React24.cloneElement(link, {}, buttonContent) }) : buttonContent;
|
|
4362
4837
|
const collapsedWithNested = collapsed && hasNestedItems;
|
|
4363
4838
|
const handlePopoverItemClick = (itemId) => {
|
|
4364
4839
|
onSelect == null ? void 0 : onSelect(itemId);
|
|
4365
4840
|
closePopover();
|
|
4366
4841
|
};
|
|
4367
|
-
return /* @__PURE__ */
|
|
4368
|
-
/* @__PURE__ */
|
|
4842
|
+
return /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
4843
|
+
/* @__PURE__ */ jsx48(
|
|
4369
4844
|
SidebarItemRoot,
|
|
4370
4845
|
{
|
|
4371
4846
|
disablePadding: true,
|
|
@@ -4373,11 +4848,11 @@ var SidebarItem = ({
|
|
|
4373
4848
|
onMouseLeave: handleMouseLeave,
|
|
4374
4849
|
children: collapsed ? (
|
|
4375
4850
|
// When collapsed: show tooltip only for items without nested children
|
|
4376
|
-
collapsedWithNested ? wrappedContent : /* @__PURE__ */
|
|
4851
|
+
collapsedWithNested ? wrappedContent : /* @__PURE__ */ jsx48(Tooltip5, { title: tooltipLabel, placement: "right", arrow: true, children: wrappedContent })
|
|
4377
4852
|
) : wrappedContent
|
|
4378
4853
|
}
|
|
4379
4854
|
),
|
|
4380
|
-
collapsedWithNested && /* @__PURE__ */
|
|
4855
|
+
collapsedWithNested && /* @__PURE__ */ jsx48(
|
|
4381
4856
|
SidebarItemPopover,
|
|
4382
4857
|
{
|
|
4383
4858
|
open: popoverOpen,
|
|
@@ -4394,25 +4869,25 @@ var SidebarItem = ({
|
|
|
4394
4869
|
onMouseLeave: handleMouseLeave
|
|
4395
4870
|
}
|
|
4396
4871
|
},
|
|
4397
|
-
children: /* @__PURE__ */
|
|
4872
|
+
children: /* @__PURE__ */ jsx48(
|
|
4398
4873
|
SidebarItemPopoverList,
|
|
4399
4874
|
{
|
|
4400
4875
|
id: popoverId,
|
|
4401
4876
|
autoFocusItem: popoverOpen && popoverOpenedByClick,
|
|
4402
4877
|
disablePadding: true,
|
|
4403
4878
|
children: nestedItems.map((child, index) => {
|
|
4404
|
-
if (
|
|
4879
|
+
if (React24.isValidElement(child)) {
|
|
4405
4880
|
const childProps = child.props;
|
|
4406
4881
|
const { icon, label } = extractItemContent(childProps.children);
|
|
4407
4882
|
const isItemActive = activeItem === childProps.id;
|
|
4408
|
-
return /* @__PURE__ */
|
|
4883
|
+
return /* @__PURE__ */ jsxs16(
|
|
4409
4884
|
SidebarItemPopoverButton,
|
|
4410
4885
|
{
|
|
4411
4886
|
selected: isItemActive,
|
|
4412
4887
|
onClick: () => handlePopoverItemClick(childProps.id),
|
|
4413
4888
|
children: [
|
|
4414
|
-
icon && /* @__PURE__ */
|
|
4415
|
-
/* @__PURE__ */
|
|
4889
|
+
icon && /* @__PURE__ */ jsx48(ListItemIcon2, { sx: { minWidth: "auto" }, children: icon }),
|
|
4890
|
+
/* @__PURE__ */ jsx48(ListItemText2, { primary: label })
|
|
4416
4891
|
]
|
|
4417
4892
|
},
|
|
4418
4893
|
childProps.id || index
|
|
@@ -4424,9 +4899,9 @@ var SidebarItem = ({
|
|
|
4424
4899
|
)
|
|
4425
4900
|
}
|
|
4426
4901
|
),
|
|
4427
|
-
hasNestedItems && !collapsed && /* @__PURE__ */
|
|
4428
|
-
if (
|
|
4429
|
-
return
|
|
4902
|
+
hasNestedItems && !collapsed && /* @__PURE__ */ jsx48(Collapse, { in: isExpanded, timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ jsx48(List2, { disablePadding: true, children: nestedItems.map((child, index) => {
|
|
4903
|
+
if (React24.isValidElement(child)) {
|
|
4904
|
+
return React24.cloneElement(child, {
|
|
4430
4905
|
key: child.key || index,
|
|
4431
4906
|
depth: depth + 1
|
|
4432
4907
|
});
|
|
@@ -4438,11 +4913,11 @@ var SidebarItem = ({
|
|
|
4438
4913
|
SidebarItem.displayName = "SidebarItem";
|
|
4439
4914
|
|
|
4440
4915
|
// src/components/Sidebar/SidebarFooter.tsx
|
|
4441
|
-
import
|
|
4916
|
+
import Box19 from "@mui/material/Box";
|
|
4442
4917
|
import Divider4 from "@mui/material/Divider";
|
|
4443
|
-
import { styled as
|
|
4444
|
-
import { Fragment as Fragment6, jsx as
|
|
4445
|
-
var SidebarFooterRoot =
|
|
4918
|
+
import { styled as styled35 } from "@mui/material/styles";
|
|
4919
|
+
import { Fragment as Fragment6, jsx as jsx49, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4920
|
+
var SidebarFooterRoot = styled35(Box19, {
|
|
4446
4921
|
name: "MuiSidebar",
|
|
4447
4922
|
slot: "Footer"
|
|
4448
4923
|
})(({ theme }) => ({
|
|
@@ -4454,25 +4929,25 @@ var SidebarFooter = ({
|
|
|
4454
4929
|
showDivider = true,
|
|
4455
4930
|
sx
|
|
4456
4931
|
}) => {
|
|
4457
|
-
return /* @__PURE__ */
|
|
4458
|
-
showDivider && /* @__PURE__ */
|
|
4459
|
-
/* @__PURE__ */
|
|
4932
|
+
return /* @__PURE__ */ jsxs17(Fragment6, { children: [
|
|
4933
|
+
showDivider && /* @__PURE__ */ jsx49(Divider4, {}),
|
|
4934
|
+
/* @__PURE__ */ jsx49(SidebarFooterRoot, { sx, children })
|
|
4460
4935
|
] });
|
|
4461
4936
|
};
|
|
4462
4937
|
|
|
4463
4938
|
// src/components/Sidebar/SidebarUser.tsx
|
|
4464
|
-
import * as
|
|
4465
|
-
import
|
|
4939
|
+
import * as React25 from "react";
|
|
4940
|
+
import Box20 from "@mui/material/Box";
|
|
4466
4941
|
import ListItemButton2 from "@mui/material/ListItemButton";
|
|
4467
|
-
import
|
|
4942
|
+
import Tooltip6 from "@mui/material/Tooltip";
|
|
4468
4943
|
import Divider5 from "@mui/material/Divider";
|
|
4469
|
-
import { styled as
|
|
4944
|
+
import { styled as styled39 } from "@mui/material/styles";
|
|
4470
4945
|
|
|
4471
4946
|
// src/components/Sidebar/SidebarUserAvatar.tsx
|
|
4472
4947
|
import Avatar2 from "@mui/material/Avatar";
|
|
4473
|
-
import { styled as
|
|
4474
|
-
import { jsx as
|
|
4475
|
-
var SidebarUserAvatarRoot =
|
|
4948
|
+
import { styled as styled36 } from "@mui/material/styles";
|
|
4949
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
4950
|
+
var SidebarUserAvatarRoot = styled36(Avatar2, {
|
|
4476
4951
|
name: "MuiSidebar",
|
|
4477
4952
|
slot: "UserAvatar"
|
|
4478
4953
|
})(({ theme }) => ({
|
|
@@ -4488,15 +4963,15 @@ var SidebarUserAvatar = ({
|
|
|
4488
4963
|
alt,
|
|
4489
4964
|
sx
|
|
4490
4965
|
}) => {
|
|
4491
|
-
return /* @__PURE__ */
|
|
4966
|
+
return /* @__PURE__ */ jsx50(SidebarUserAvatarRoot, { src, alt, sx, children });
|
|
4492
4967
|
};
|
|
4493
4968
|
SidebarUserAvatar.displayName = "SidebarUserAvatar";
|
|
4494
4969
|
|
|
4495
4970
|
// src/components/Sidebar/SidebarUserName.tsx
|
|
4496
|
-
import
|
|
4497
|
-
import { styled as
|
|
4498
|
-
import { jsx as
|
|
4499
|
-
var SidebarUserNameRoot =
|
|
4971
|
+
import Typography11 from "@mui/material/Typography";
|
|
4972
|
+
import { styled as styled37 } from "@mui/material/styles";
|
|
4973
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
4974
|
+
var SidebarUserNameRoot = styled37(Typography11, {
|
|
4500
4975
|
name: "MuiSidebar",
|
|
4501
4976
|
slot: "UserName"
|
|
4502
4977
|
})({
|
|
@@ -4513,15 +4988,15 @@ var SidebarUserName = ({
|
|
|
4513
4988
|
if (collapsed) {
|
|
4514
4989
|
return null;
|
|
4515
4990
|
}
|
|
4516
|
-
return /* @__PURE__ */
|
|
4991
|
+
return /* @__PURE__ */ jsx51(SidebarUserNameRoot, { variant: "body2", sx, children });
|
|
4517
4992
|
};
|
|
4518
4993
|
SidebarUserName.displayName = "SidebarUserName";
|
|
4519
4994
|
|
|
4520
4995
|
// src/components/Sidebar/SidebarUserEmail.tsx
|
|
4521
|
-
import
|
|
4522
|
-
import { styled as
|
|
4523
|
-
import { jsx as
|
|
4524
|
-
var SidebarUserEmailRoot =
|
|
4996
|
+
import Typography12 from "@mui/material/Typography";
|
|
4997
|
+
import { styled as styled38 } from "@mui/material/styles";
|
|
4998
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
4999
|
+
var SidebarUserEmailRoot = styled38(Typography12, {
|
|
4525
5000
|
name: "MuiSidebar",
|
|
4526
5001
|
slot: "UserEmail"
|
|
4527
5002
|
})(({ theme }) => ({
|
|
@@ -4539,19 +5014,19 @@ var SidebarUserEmail = ({
|
|
|
4539
5014
|
if (collapsed) {
|
|
4540
5015
|
return null;
|
|
4541
5016
|
}
|
|
4542
|
-
return /* @__PURE__ */
|
|
5017
|
+
return /* @__PURE__ */ jsx52(SidebarUserEmailRoot, { variant: "caption", sx, children });
|
|
4543
5018
|
};
|
|
4544
5019
|
SidebarUserEmail.displayName = "SidebarUserEmail";
|
|
4545
5020
|
|
|
4546
5021
|
// src/components/Sidebar/SidebarUser.tsx
|
|
4547
|
-
import { Fragment as Fragment7, jsx as
|
|
4548
|
-
var SidebarUserRoot =
|
|
5022
|
+
import { Fragment as Fragment7, jsx as jsx53, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5023
|
+
var SidebarUserRoot = styled39(Box20, {
|
|
4549
5024
|
name: "MuiSidebar",
|
|
4550
5025
|
slot: "User"
|
|
4551
5026
|
})(({ theme }) => ({
|
|
4552
5027
|
padding: theme.spacing(2)
|
|
4553
5028
|
}));
|
|
4554
|
-
var SidebarUserButton =
|
|
5029
|
+
var SidebarUserButton = styled39(ListItemButton2, {
|
|
4555
5030
|
name: "MuiSidebar",
|
|
4556
5031
|
slot: "UserButton",
|
|
4557
5032
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -4568,7 +5043,7 @@ var SidebarUserButton = styled34(ListItemButton2, {
|
|
|
4568
5043
|
duration: ownerState.collapsed ? theme.transitions.duration.leavingScreen : theme.transitions.duration.enteringScreen
|
|
4569
5044
|
})
|
|
4570
5045
|
}));
|
|
4571
|
-
var SidebarUserTextContainer =
|
|
5046
|
+
var SidebarUserTextContainer = styled39(Box20, {
|
|
4572
5047
|
name: "MuiSidebar",
|
|
4573
5048
|
slot: "UserTextContainer",
|
|
4574
5049
|
shouldForwardProp: (prop) => prop !== "collapsed"
|
|
@@ -4586,9 +5061,9 @@ var SidebarUserTextContainer = styled34(Box17, {
|
|
|
4586
5061
|
var separateChildren3 = (children) => {
|
|
4587
5062
|
let avatarChild = null;
|
|
4588
5063
|
const textChildren = [];
|
|
4589
|
-
|
|
5064
|
+
React25.Children.forEach(children, (child) => {
|
|
4590
5065
|
var _a;
|
|
4591
|
-
if (
|
|
5066
|
+
if (React25.isValidElement(child)) {
|
|
4592
5067
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4593
5068
|
if (displayName === "SidebarUserAvatar") {
|
|
4594
5069
|
avatarChild = child;
|
|
@@ -4601,9 +5076,9 @@ var separateChildren3 = (children) => {
|
|
|
4601
5076
|
};
|
|
4602
5077
|
var getTooltipText = (children) => {
|
|
4603
5078
|
let tooltipText = "";
|
|
4604
|
-
|
|
5079
|
+
React25.Children.forEach(children, (child) => {
|
|
4605
5080
|
var _a;
|
|
4606
|
-
if (
|
|
5081
|
+
if (React25.isValidElement(child)) {
|
|
4607
5082
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4608
5083
|
const props = child.props;
|
|
4609
5084
|
if (displayName === "SidebarUserName" && props.children) {
|
|
@@ -4623,22 +5098,22 @@ var SidebarUser = ({
|
|
|
4623
5098
|
const { avatarChild, textChildren } = separateChildren3(children);
|
|
4624
5099
|
const tooltipText = getTooltipText(children);
|
|
4625
5100
|
const ownerState = { collapsed };
|
|
4626
|
-
const content = /* @__PURE__ */
|
|
5101
|
+
const content = /* @__PURE__ */ jsxs18(SidebarUserButton, { onClick, ownerState, children: [
|
|
4627
5102
|
avatarChild,
|
|
4628
|
-
/* @__PURE__ */
|
|
5103
|
+
/* @__PURE__ */ jsx53(SidebarUserTextContainer, { collapsed, children: textChildren })
|
|
4629
5104
|
] });
|
|
4630
|
-
return /* @__PURE__ */
|
|
4631
|
-
showDivider && /* @__PURE__ */
|
|
4632
|
-
/* @__PURE__ */
|
|
5105
|
+
return /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
5106
|
+
showDivider && /* @__PURE__ */ jsx53(Divider5, {}),
|
|
5107
|
+
/* @__PURE__ */ jsx53(SidebarUserRoot, { sx, children: collapsed ? /* @__PURE__ */ jsx53(Tooltip6, { title: tooltipText, placement: "right", arrow: true, children: content }) : content })
|
|
4633
5108
|
] });
|
|
4634
5109
|
};
|
|
4635
5110
|
SidebarUser.displayName = "SidebarUser";
|
|
4636
5111
|
|
|
4637
5112
|
// src/components/Sidebar/Sidebar.tsx
|
|
4638
|
-
import { jsx as
|
|
5113
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
4639
5114
|
var SIDEBAR_WIDTH = 250;
|
|
4640
5115
|
var COLLAPSED_SIDEBAR_WIDTH = 64;
|
|
4641
|
-
var SidebarRootStyled =
|
|
5116
|
+
var SidebarRootStyled = styled40(Box21, {
|
|
4642
5117
|
name: "MuiSidebar",
|
|
4643
5118
|
slot: "Root",
|
|
4644
5119
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -4673,10 +5148,10 @@ var Sidebar = ({
|
|
|
4673
5148
|
sx
|
|
4674
5149
|
}) => {
|
|
4675
5150
|
var _a, _b, _c;
|
|
4676
|
-
const appShellContext =
|
|
5151
|
+
const appShellContext = React26.useContext(AppShellContext);
|
|
4677
5152
|
const collapsed = (_a = collapsedProp != null ? collapsedProp : appShellContext == null ? void 0 : appShellContext.state.sidebarCollapsed) != null ? _a : false;
|
|
4678
5153
|
const activeItem = activeItemProp != null ? activeItemProp : appShellContext == null ? void 0 : appShellContext.state.activeMenuItem;
|
|
4679
|
-
const expandedMenus =
|
|
5154
|
+
const expandedMenus = React26.useMemo(
|
|
4680
5155
|
() => {
|
|
4681
5156
|
var _a2;
|
|
4682
5157
|
return (_a2 = expandedMenusProp != null ? expandedMenusProp : appShellContext == null ? void 0 : appShellContext.state.expandedMenus) != null ? _a2 : {};
|
|
@@ -4687,7 +5162,7 @@ var Sidebar = ({
|
|
|
4687
5162
|
const onToggleExpand = onToggleExpandProp != null ? onToggleExpandProp : appShellContext == null ? void 0 : appShellContext.actions.toggleMenu;
|
|
4688
5163
|
const width = (_b = widthProp != null ? widthProp : appShellContext == null ? void 0 : appShellContext.state.sidebarWidth) != null ? _b : SIDEBAR_WIDTH;
|
|
4689
5164
|
const collapsedWidth = (_c = collapsedWidthProp != null ? collapsedWidthProp : appShellContext == null ? void 0 : appShellContext.state.sidebarCollapsedWidth) != null ? _c : COLLAPSED_SIDEBAR_WIDTH;
|
|
4690
|
-
const contextValue =
|
|
5165
|
+
const contextValue = React26.useMemo(
|
|
4691
5166
|
() => ({
|
|
4692
5167
|
collapsed,
|
|
4693
5168
|
activeItem,
|
|
@@ -4698,7 +5173,7 @@ var Sidebar = ({
|
|
|
4698
5173
|
[collapsed, activeItem, expandedMenus, onSelect, onToggleExpand]
|
|
4699
5174
|
);
|
|
4700
5175
|
const ownerState = { collapsed, width, collapsedWidth };
|
|
4701
|
-
return /* @__PURE__ */
|
|
5176
|
+
return /* @__PURE__ */ jsx54(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx54(SidebarRootStyled, { component: "aside", ownerState, sx, children }) });
|
|
4702
5177
|
};
|
|
4703
5178
|
Sidebar.Nav = SidebarNav;
|
|
4704
5179
|
Sidebar.Category = SidebarCategory;
|
|
@@ -4715,17 +5190,17 @@ Sidebar.UserEmail = SidebarUserEmail;
|
|
|
4715
5190
|
Sidebar.displayName = "Sidebar";
|
|
4716
5191
|
|
|
4717
5192
|
// src/components/NotificationPanel/NotificationPanel.tsx
|
|
4718
|
-
import * as
|
|
4719
|
-
import
|
|
5193
|
+
import * as React32 from "react";
|
|
5194
|
+
import Box30 from "@mui/material/Box";
|
|
4720
5195
|
import Drawer from "@mui/material/Drawer";
|
|
4721
|
-
import { styled as
|
|
5196
|
+
import { styled as styled56 } from "@mui/material/styles";
|
|
4722
5197
|
import { visuallyHidden as visuallyHidden3 } from "@mui/utils";
|
|
4723
5198
|
|
|
4724
5199
|
// src/components/NotificationPanel/context.ts
|
|
4725
|
-
import * as
|
|
4726
|
-
var NotificationPanelContext =
|
|
5200
|
+
import * as React27 from "react";
|
|
5201
|
+
var NotificationPanelContext = React27.createContext(null);
|
|
4727
5202
|
var useNotificationPanel = () => {
|
|
4728
|
-
const context =
|
|
5203
|
+
const context = React27.useContext(NotificationPanelContext);
|
|
4729
5204
|
if (!context) {
|
|
4730
5205
|
throw new Error(
|
|
4731
5206
|
"NotificationPanel compound components must be used within NotificationPanel"
|
|
@@ -4735,11 +5210,11 @@ var useNotificationPanel = () => {
|
|
|
4735
5210
|
};
|
|
4736
5211
|
|
|
4737
5212
|
// src/components/NotificationPanel/NotificationHeader.tsx
|
|
4738
|
-
import * as
|
|
4739
|
-
import
|
|
4740
|
-
import { styled as
|
|
4741
|
-
import { jsx as
|
|
4742
|
-
var NotificationHeaderRoot =
|
|
5213
|
+
import * as React28 from "react";
|
|
5214
|
+
import Box22 from "@mui/material/Box";
|
|
5215
|
+
import { styled as styled41 } from "@mui/material/styles";
|
|
5216
|
+
import { jsx as jsx55, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5217
|
+
var NotificationHeaderRoot = styled41(Box22, {
|
|
4743
5218
|
name: "MuiNotificationPanel",
|
|
4744
5219
|
slot: "Header"
|
|
4745
5220
|
})(({ theme }) => ({
|
|
@@ -4749,7 +5224,7 @@ var NotificationHeaderRoot = styled36(Box19, {
|
|
|
4749
5224
|
padding: theme.spacing(2),
|
|
4750
5225
|
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
|
|
4751
5226
|
}));
|
|
4752
|
-
var NotificationHeaderContent =
|
|
5227
|
+
var NotificationHeaderContent = styled41(Box22, {
|
|
4753
5228
|
name: "MuiNotificationPanel",
|
|
4754
5229
|
slot: "HeaderContent"
|
|
4755
5230
|
})(({ theme }) => ({
|
|
@@ -4760,9 +5235,9 @@ var NotificationHeaderContent = styled36(Box19, {
|
|
|
4760
5235
|
var separateChildren4 = (children) => {
|
|
4761
5236
|
const leftChildren = [];
|
|
4762
5237
|
let closeChild = null;
|
|
4763
|
-
|
|
5238
|
+
React28.Children.forEach(children, (child) => {
|
|
4764
5239
|
var _a;
|
|
4765
|
-
if (
|
|
5240
|
+
if (React28.isValidElement(child)) {
|
|
4766
5241
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4767
5242
|
if (displayName === "NotificationHeaderClose") {
|
|
4768
5243
|
closeChild = child;
|
|
@@ -4780,18 +5255,18 @@ var NotificationHeader = ({
|
|
|
4780
5255
|
sx
|
|
4781
5256
|
}) => {
|
|
4782
5257
|
const { leftChildren, closeChild } = separateChildren4(children);
|
|
4783
|
-
return /* @__PURE__ */
|
|
4784
|
-
/* @__PURE__ */
|
|
5258
|
+
return /* @__PURE__ */ jsxs19(NotificationHeaderRoot, { sx, children: [
|
|
5259
|
+
/* @__PURE__ */ jsx55(NotificationHeaderContent, { children: leftChildren }),
|
|
4785
5260
|
closeChild
|
|
4786
5261
|
] });
|
|
4787
5262
|
};
|
|
4788
5263
|
NotificationHeader.displayName = "NotificationHeader";
|
|
4789
5264
|
|
|
4790
5265
|
// src/components/NotificationPanel/NotificationHeaderIcon.tsx
|
|
4791
|
-
import
|
|
4792
|
-
import { styled as
|
|
4793
|
-
import { jsx as
|
|
4794
|
-
var NotificationHeaderIconRoot =
|
|
5266
|
+
import Box23 from "@mui/material/Box";
|
|
5267
|
+
import { styled as styled42 } from "@mui/material/styles";
|
|
5268
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
5269
|
+
var NotificationHeaderIconRoot = styled42(Box23, {
|
|
4795
5270
|
name: "MuiNotificationPanel",
|
|
4796
5271
|
slot: "HeaderIcon"
|
|
4797
5272
|
})({
|
|
@@ -4802,15 +5277,15 @@ var NotificationHeaderIcon = ({
|
|
|
4802
5277
|
children,
|
|
4803
5278
|
sx
|
|
4804
5279
|
}) => {
|
|
4805
|
-
return /* @__PURE__ */
|
|
5280
|
+
return /* @__PURE__ */ jsx56(NotificationHeaderIconRoot, { sx, children });
|
|
4806
5281
|
};
|
|
4807
5282
|
NotificationHeaderIcon.displayName = "NotificationHeaderIcon";
|
|
4808
5283
|
|
|
4809
5284
|
// src/components/NotificationPanel/NotificationHeaderTitle.tsx
|
|
4810
|
-
import
|
|
4811
|
-
import { styled as
|
|
4812
|
-
import { jsx as
|
|
4813
|
-
var NotificationHeaderTitleRoot =
|
|
5285
|
+
import Typography13 from "@mui/material/Typography";
|
|
5286
|
+
import { styled as styled43 } from "@mui/material/styles";
|
|
5287
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
5288
|
+
var NotificationHeaderTitleRoot = styled43(Typography13, {
|
|
4814
5289
|
name: "MuiNotificationPanel",
|
|
4815
5290
|
slot: "HeaderTitle"
|
|
4816
5291
|
})({
|
|
@@ -4820,15 +5295,15 @@ var NotificationHeaderTitle = ({
|
|
|
4820
5295
|
children,
|
|
4821
5296
|
sx
|
|
4822
5297
|
}) => {
|
|
4823
|
-
return /* @__PURE__ */
|
|
5298
|
+
return /* @__PURE__ */ jsx57(NotificationHeaderTitleRoot, { variant: "h6", sx, children });
|
|
4824
5299
|
};
|
|
4825
5300
|
NotificationHeaderTitle.displayName = "NotificationHeaderTitle";
|
|
4826
5301
|
|
|
4827
5302
|
// src/components/NotificationPanel/NotificationHeaderBadge.tsx
|
|
4828
5303
|
import Chip2 from "@mui/material/Chip";
|
|
4829
|
-
import { styled as
|
|
4830
|
-
import { jsx as
|
|
4831
|
-
var NotificationHeaderBadgeRoot =
|
|
5304
|
+
import { styled as styled44 } from "@mui/material/styles";
|
|
5305
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
5306
|
+
var NotificationHeaderBadgeRoot = styled44(Chip2, {
|
|
4832
5307
|
name: "MuiNotificationPanel",
|
|
4833
5308
|
slot: "HeaderBadge"
|
|
4834
5309
|
})({
|
|
@@ -4843,16 +5318,16 @@ var NotificationHeaderBadge = ({
|
|
|
4843
5318
|
if (!children || children === 0 || children === "0") {
|
|
4844
5319
|
return null;
|
|
4845
5320
|
}
|
|
4846
|
-
return /* @__PURE__ */
|
|
5321
|
+
return /* @__PURE__ */ jsx58(NotificationHeaderBadgeRoot, { label: children, size: "small", color, sx });
|
|
4847
5322
|
};
|
|
4848
5323
|
NotificationHeaderBadge.displayName = "NotificationHeaderBadge";
|
|
4849
5324
|
|
|
4850
5325
|
// src/components/NotificationPanel/NotificationHeaderClose.tsx
|
|
4851
|
-
import
|
|
4852
|
-
import { styled as
|
|
5326
|
+
import IconButton5 from "@mui/material/IconButton";
|
|
5327
|
+
import { styled as styled45 } from "@mui/material/styles";
|
|
4853
5328
|
import { X as X2 } from "@wso2/oxygen-ui-icons-react";
|
|
4854
|
-
import { jsx as
|
|
4855
|
-
var NotificationHeaderCloseRoot =
|
|
5329
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
5330
|
+
var NotificationHeaderCloseRoot = styled45(IconButton5, {
|
|
4856
5331
|
name: "MuiNotificationPanel",
|
|
4857
5332
|
slot: "HeaderClose"
|
|
4858
5333
|
})({});
|
|
@@ -4869,33 +5344,33 @@ var NotificationHeaderClose = ({
|
|
|
4869
5344
|
onClose == null ? void 0 : onClose();
|
|
4870
5345
|
}
|
|
4871
5346
|
};
|
|
4872
|
-
return /* @__PURE__ */
|
|
5347
|
+
return /* @__PURE__ */ jsx59(
|
|
4873
5348
|
NotificationHeaderCloseRoot,
|
|
4874
5349
|
{
|
|
4875
5350
|
onClick: handleClick,
|
|
4876
5351
|
size: "small",
|
|
4877
5352
|
sx,
|
|
4878
5353
|
"aria-label": "Close notifications",
|
|
4879
|
-
children: children || /* @__PURE__ */
|
|
5354
|
+
children: children || /* @__PURE__ */ jsx59(X2, { size: 20, "aria-hidden": "true" })
|
|
4880
5355
|
}
|
|
4881
5356
|
);
|
|
4882
5357
|
};
|
|
4883
5358
|
NotificationHeaderClose.displayName = "NotificationHeaderClose";
|
|
4884
5359
|
|
|
4885
5360
|
// src/components/NotificationPanel/NotificationTabs.tsx
|
|
4886
|
-
import
|
|
5361
|
+
import Box24 from "@mui/material/Box";
|
|
4887
5362
|
import Tabs from "@mui/material/Tabs";
|
|
4888
5363
|
import Tab from "@mui/material/Tab";
|
|
4889
5364
|
import Chip3 from "@mui/material/Chip";
|
|
4890
|
-
import { styled as
|
|
4891
|
-
import { jsx as
|
|
4892
|
-
var NotificationTabsRoot =
|
|
5365
|
+
import { styled as styled46 } from "@mui/material/styles";
|
|
5366
|
+
import { jsx as jsx60, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5367
|
+
var NotificationTabsRoot = styled46(Box24, {
|
|
4893
5368
|
name: "MuiNotificationPanel",
|
|
4894
5369
|
slot: "Tabs"
|
|
4895
5370
|
})(({ theme }) => ({
|
|
4896
5371
|
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
|
|
4897
5372
|
}));
|
|
4898
|
-
var NotificationTabsInner =
|
|
5373
|
+
var NotificationTabsInner = styled46(Tabs, {
|
|
4899
5374
|
name: "MuiNotificationPanel",
|
|
4900
5375
|
slot: "TabsInner"
|
|
4901
5376
|
})({
|
|
@@ -4906,7 +5381,7 @@ var NotificationTabsInner = styled41(Tabs, {
|
|
|
4906
5381
|
fontWeight: 500
|
|
4907
5382
|
}
|
|
4908
5383
|
});
|
|
4909
|
-
var NotificationTabLabel =
|
|
5384
|
+
var NotificationTabLabel = styled46(Box24, {
|
|
4910
5385
|
name: "MuiNotificationPanel",
|
|
4911
5386
|
slot: "TabLabel"
|
|
4912
5387
|
})(({ theme }) => ({
|
|
@@ -4914,7 +5389,7 @@ var NotificationTabLabel = styled41(Box21, {
|
|
|
4914
5389
|
alignItems: "center",
|
|
4915
5390
|
gap: theme.spacing(1)
|
|
4916
5391
|
}));
|
|
4917
|
-
var NotificationTabCount =
|
|
5392
|
+
var NotificationTabCount = styled46(Chip3, {
|
|
4918
5393
|
name: "MuiNotificationPanel",
|
|
4919
5394
|
slot: "TabCount"
|
|
4920
5395
|
})({
|
|
@@ -4927,18 +5402,18 @@ var NotificationTabs = ({
|
|
|
4927
5402
|
onChange,
|
|
4928
5403
|
sx
|
|
4929
5404
|
}) => {
|
|
4930
|
-
return /* @__PURE__ */
|
|
5405
|
+
return /* @__PURE__ */ jsx60(NotificationTabsRoot, { sx, children: /* @__PURE__ */ jsx60(
|
|
4931
5406
|
NotificationTabsInner,
|
|
4932
5407
|
{
|
|
4933
5408
|
value,
|
|
4934
5409
|
onChange: (_, newValue) => onChange(newValue),
|
|
4935
5410
|
variant: "fullWidth",
|
|
4936
|
-
children: tabs.map((tab, index) => /* @__PURE__ */
|
|
5411
|
+
children: tabs.map((tab, index) => /* @__PURE__ */ jsx60(
|
|
4937
5412
|
Tab,
|
|
4938
5413
|
{
|
|
4939
|
-
label: /* @__PURE__ */
|
|
5414
|
+
label: /* @__PURE__ */ jsxs20(NotificationTabLabel, { children: [
|
|
4940
5415
|
tab.label,
|
|
4941
|
-
tab.count !== void 0 && tab.count > 0 && /* @__PURE__ */
|
|
5416
|
+
tab.count !== void 0 && tab.count > 0 && /* @__PURE__ */ jsx60(
|
|
4942
5417
|
NotificationTabCount,
|
|
4943
5418
|
{
|
|
4944
5419
|
label: tab.count,
|
|
@@ -4956,12 +5431,12 @@ var NotificationTabs = ({
|
|
|
4956
5431
|
};
|
|
4957
5432
|
|
|
4958
5433
|
// src/components/NotificationPanel/NotificationActions.tsx
|
|
4959
|
-
import
|
|
5434
|
+
import Box25 from "@mui/material/Box";
|
|
4960
5435
|
import Button3 from "@mui/material/Button";
|
|
4961
|
-
import { styled as
|
|
5436
|
+
import { styled as styled47 } from "@mui/material/styles";
|
|
4962
5437
|
import { CheckCheck, Trash2 } from "@wso2/oxygen-ui-icons-react";
|
|
4963
|
-
import { jsx as
|
|
4964
|
-
var NotificationActionsRoot =
|
|
5438
|
+
import { jsx as jsx61, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5439
|
+
var NotificationActionsRoot = styled47(Box25, {
|
|
4965
5440
|
name: "MuiNotificationPanel",
|
|
4966
5441
|
slot: "Actions"
|
|
4967
5442
|
})(({ theme }) => ({
|
|
@@ -4973,7 +5448,7 @@ var NotificationActionsRoot = styled42(Box22, {
|
|
|
4973
5448
|
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
4974
5449
|
backgroundColor: (theme.vars || theme).palette.action.hover
|
|
4975
5450
|
}));
|
|
4976
|
-
var NotificationActionButton =
|
|
5451
|
+
var NotificationActionButton = styled47(Button3, {
|
|
4977
5452
|
name: "MuiNotificationPanel",
|
|
4978
5453
|
slot: "ActionButton"
|
|
4979
5454
|
})({
|
|
@@ -4986,21 +5461,21 @@ var NotificationActions = ({
|
|
|
4986
5461
|
onClearAll,
|
|
4987
5462
|
sx
|
|
4988
5463
|
}) => {
|
|
4989
|
-
return /* @__PURE__ */
|
|
4990
|
-
hasUnread && onMarkAllRead && /* @__PURE__ */
|
|
5464
|
+
return /* @__PURE__ */ jsxs21(NotificationActionsRoot, { sx, children: [
|
|
5465
|
+
hasUnread && onMarkAllRead && /* @__PURE__ */ jsx61(
|
|
4991
5466
|
NotificationActionButton,
|
|
4992
5467
|
{
|
|
4993
5468
|
size: "small",
|
|
4994
|
-
startIcon: /* @__PURE__ */
|
|
5469
|
+
startIcon: /* @__PURE__ */ jsx61(CheckCheck, { size: 14 }),
|
|
4995
5470
|
onClick: onMarkAllRead,
|
|
4996
5471
|
children: "Mark all read"
|
|
4997
5472
|
}
|
|
4998
5473
|
),
|
|
4999
|
-
onClearAll && /* @__PURE__ */
|
|
5474
|
+
onClearAll && /* @__PURE__ */ jsx61(
|
|
5000
5475
|
NotificationActionButton,
|
|
5001
5476
|
{
|
|
5002
5477
|
size: "small",
|
|
5003
|
-
startIcon: /* @__PURE__ */
|
|
5478
|
+
startIcon: /* @__PURE__ */ jsx61(Trash2, { size: 14 }),
|
|
5004
5479
|
onClick: onClearAll,
|
|
5005
5480
|
color: "error",
|
|
5006
5481
|
children: "Clear all"
|
|
@@ -5010,13 +5485,13 @@ var NotificationActions = ({
|
|
|
5010
5485
|
};
|
|
5011
5486
|
|
|
5012
5487
|
// src/components/NotificationPanel/NotificationList.tsx
|
|
5013
|
-
import * as
|
|
5014
|
-
import
|
|
5488
|
+
import * as React29 from "react";
|
|
5489
|
+
import Box26 from "@mui/material/Box";
|
|
5015
5490
|
import List3 from "@mui/material/List";
|
|
5016
5491
|
import Divider6 from "@mui/material/Divider";
|
|
5017
|
-
import { styled as
|
|
5018
|
-
import { jsx as
|
|
5019
|
-
var NotificationListRoot =
|
|
5492
|
+
import { styled as styled48 } from "@mui/material/styles";
|
|
5493
|
+
import { jsx as jsx62, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5494
|
+
var NotificationListRoot = styled48(Box26, {
|
|
5020
5495
|
name: "MuiNotificationPanel",
|
|
5021
5496
|
slot: "List"
|
|
5022
5497
|
})({
|
|
@@ -5028,21 +5503,21 @@ var NotificationList = ({
|
|
|
5028
5503
|
showDividers = true,
|
|
5029
5504
|
sx
|
|
5030
5505
|
}) => {
|
|
5031
|
-
const childArray =
|
|
5032
|
-
return /* @__PURE__ */
|
|
5506
|
+
const childArray = React29.Children.toArray(children);
|
|
5507
|
+
return /* @__PURE__ */ jsx62(NotificationListRoot, { sx, children: /* @__PURE__ */ jsx62(List3, { disablePadding: true, children: childArray.map((child, index) => /* @__PURE__ */ jsxs22(React29.Fragment, { children: [
|
|
5033
5508
|
child,
|
|
5034
|
-
showDividers && index < childArray.length - 1 && /* @__PURE__ */
|
|
5509
|
+
showDividers && index < childArray.length - 1 && /* @__PURE__ */ jsx62(Divider6, {})
|
|
5035
5510
|
] }, index)) }) });
|
|
5036
5511
|
};
|
|
5037
5512
|
|
|
5038
5513
|
// src/components/NotificationPanel/NotificationItem.tsx
|
|
5039
|
-
import * as
|
|
5040
|
-
import
|
|
5514
|
+
import * as React31 from "react";
|
|
5515
|
+
import Box27 from "@mui/material/Box";
|
|
5041
5516
|
import ListItem2 from "@mui/material/ListItem";
|
|
5042
5517
|
import ListItemButton3 from "@mui/material/ListItemButton";
|
|
5043
5518
|
import ListItemText3 from "@mui/material/ListItemText";
|
|
5044
|
-
import
|
|
5045
|
-
import { styled as
|
|
5519
|
+
import IconButton6 from "@mui/material/IconButton";
|
|
5520
|
+
import { styled as styled49 } from "@mui/material/styles";
|
|
5046
5521
|
import { X as X3 } from "@wso2/oxygen-ui-icons-react";
|
|
5047
5522
|
|
|
5048
5523
|
// src/components/NotificationPanel/utils.ts
|
|
@@ -5082,11 +5557,11 @@ var getNotificationTypeProps = (type) => {
|
|
|
5082
5557
|
};
|
|
5083
5558
|
|
|
5084
5559
|
// src/components/NotificationPanel/NotificationItemContext.tsx
|
|
5085
|
-
import * as
|
|
5086
|
-
import { jsx as
|
|
5087
|
-
var NotificationItemContext =
|
|
5560
|
+
import * as React30 from "react";
|
|
5561
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
5562
|
+
var NotificationItemContext = React30.createContext(null);
|
|
5088
5563
|
var useNotificationItemContext = () => {
|
|
5089
|
-
const context =
|
|
5564
|
+
const context = React30.useContext(NotificationItemContext);
|
|
5090
5565
|
if (!context) {
|
|
5091
5566
|
throw new Error(
|
|
5092
5567
|
"useNotificationItemContext must be used within a NotificationItem component"
|
|
@@ -5095,12 +5570,12 @@ var useNotificationItemContext = () => {
|
|
|
5095
5570
|
return context;
|
|
5096
5571
|
};
|
|
5097
5572
|
var NotificationItemProvider = ({ value, children }) => {
|
|
5098
|
-
return /* @__PURE__ */
|
|
5573
|
+
return /* @__PURE__ */ jsx63(NotificationItemContext.Provider, { value, children });
|
|
5099
5574
|
};
|
|
5100
5575
|
|
|
5101
5576
|
// src/components/NotificationPanel/NotificationItem.tsx
|
|
5102
|
-
import { jsx as
|
|
5103
|
-
var NotificationItemRoot =
|
|
5577
|
+
import { jsx as jsx64, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5578
|
+
var NotificationItemRoot = styled49(ListItem2, {
|
|
5104
5579
|
name: "MuiNotificationPanel",
|
|
5105
5580
|
slot: "Item",
|
|
5106
5581
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -5110,13 +5585,13 @@ var NotificationItemRoot = styled44(ListItem2, {
|
|
|
5110
5585
|
backgroundColor: (theme.vars || theme).palette.action.selected
|
|
5111
5586
|
}
|
|
5112
5587
|
}));
|
|
5113
|
-
var NotificationItemButton =
|
|
5588
|
+
var NotificationItemButton = styled49(ListItemButton3, {
|
|
5114
5589
|
name: "MuiNotificationPanel",
|
|
5115
5590
|
slot: "ItemButton"
|
|
5116
5591
|
})(({ theme }) => ({
|
|
5117
5592
|
paddingRight: theme.spacing(6)
|
|
5118
5593
|
}));
|
|
5119
|
-
var NotificationItemDismiss =
|
|
5594
|
+
var NotificationItemDismiss = styled49(IconButton6, {
|
|
5120
5595
|
name: "MuiNotificationPanel",
|
|
5121
5596
|
slot: "ItemDismiss"
|
|
5122
5597
|
})({
|
|
@@ -5125,7 +5600,7 @@ var NotificationItemDismiss = styled44(IconButton5, {
|
|
|
5125
5600
|
opacity: 1
|
|
5126
5601
|
}
|
|
5127
5602
|
});
|
|
5128
|
-
var NotificationItemFooter =
|
|
5603
|
+
var NotificationItemFooter = styled49(Box27, {
|
|
5129
5604
|
name: "MuiNotificationPanel",
|
|
5130
5605
|
slot: "ItemFooter"
|
|
5131
5606
|
})(({ theme }) => ({
|
|
@@ -5140,9 +5615,9 @@ var separateChildren5 = (children) => {
|
|
|
5140
5615
|
let messageChild = null;
|
|
5141
5616
|
let timestampChild = null;
|
|
5142
5617
|
let actionChild = null;
|
|
5143
|
-
|
|
5618
|
+
React31.Children.forEach(children, (child) => {
|
|
5144
5619
|
var _a;
|
|
5145
|
-
if (
|
|
5620
|
+
if (React31.isValidElement(child)) {
|
|
5146
5621
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
5147
5622
|
switch (displayName) {
|
|
5148
5623
|
case "NotificationItemAvatar":
|
|
@@ -5192,12 +5667,12 @@ var NotificationItem = ({
|
|
|
5192
5667
|
onAction == null ? void 0 : onAction();
|
|
5193
5668
|
};
|
|
5194
5669
|
const ownerState = { read };
|
|
5195
|
-
return /* @__PURE__ */
|
|
5670
|
+
return /* @__PURE__ */ jsx64(NotificationItemProvider, { value: contextValue, children: /* @__PURE__ */ jsx64(
|
|
5196
5671
|
NotificationItemRoot,
|
|
5197
5672
|
{
|
|
5198
5673
|
disablePadding: true,
|
|
5199
5674
|
ownerState,
|
|
5200
|
-
secondaryAction: onDismiss && /* @__PURE__ */
|
|
5675
|
+
secondaryAction: onDismiss && /* @__PURE__ */ jsx64(
|
|
5201
5676
|
NotificationItemDismiss,
|
|
5202
5677
|
{
|
|
5203
5678
|
size: "small",
|
|
@@ -5206,19 +5681,19 @@ var NotificationItem = ({
|
|
|
5206
5681
|
e.stopPropagation();
|
|
5207
5682
|
onDismiss(id);
|
|
5208
5683
|
},
|
|
5209
|
-
children: /* @__PURE__ */
|
|
5684
|
+
children: /* @__PURE__ */ jsx64(X3, { size: 16, "aria-hidden": "true" })
|
|
5210
5685
|
}
|
|
5211
5686
|
),
|
|
5212
5687
|
sx,
|
|
5213
|
-
children: /* @__PURE__ */
|
|
5688
|
+
children: /* @__PURE__ */ jsxs23(NotificationItemButton, { onClick: handleClick, children: [
|
|
5214
5689
|
avatarChild,
|
|
5215
|
-
/* @__PURE__ */
|
|
5690
|
+
/* @__PURE__ */ jsx64(
|
|
5216
5691
|
ListItemText3,
|
|
5217
5692
|
{
|
|
5218
5693
|
primary: titleChild,
|
|
5219
|
-
secondary: /* @__PURE__ */
|
|
5694
|
+
secondary: /* @__PURE__ */ jsxs23(Box27, { component: "span", children: [
|
|
5220
5695
|
messageChild,
|
|
5221
|
-
/* @__PURE__ */
|
|
5696
|
+
/* @__PURE__ */ jsxs23(NotificationItemFooter, { children: [
|
|
5222
5697
|
timestampChild,
|
|
5223
5698
|
actionChild
|
|
5224
5699
|
] })
|
|
@@ -5234,9 +5709,9 @@ NotificationItem.displayName = "NotificationItem";
|
|
|
5234
5709
|
// src/components/NotificationPanel/NotificationItemAvatar.tsx
|
|
5235
5710
|
import ListItemAvatar from "@mui/material/ListItemAvatar";
|
|
5236
5711
|
import Avatar3 from "@mui/material/Avatar";
|
|
5237
|
-
import { styled as
|
|
5238
|
-
import { jsx as
|
|
5239
|
-
var NotificationItemAvatarStyled =
|
|
5712
|
+
import { styled as styled50 } from "@mui/material/styles";
|
|
5713
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
5714
|
+
var NotificationItemAvatarStyled = styled50(Avatar3, {
|
|
5240
5715
|
name: "MuiNotificationPanel",
|
|
5241
5716
|
slot: "ItemAvatar",
|
|
5242
5717
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -5259,16 +5734,16 @@ var NotificationItemAvatar = ({
|
|
|
5259
5734
|
color: typeProps.color,
|
|
5260
5735
|
hasChildren: !!children
|
|
5261
5736
|
};
|
|
5262
|
-
return /* @__PURE__ */
|
|
5737
|
+
return /* @__PURE__ */ jsx65(ListItemAvatar, { children: /* @__PURE__ */ jsx65(NotificationItemAvatarStyled, { ownerState, sx, children: children || /* @__PURE__ */ jsx65(Icon, { size: 20 }) }) });
|
|
5263
5738
|
};
|
|
5264
5739
|
NotificationItemAvatar.displayName = "NotificationItemAvatar";
|
|
5265
5740
|
|
|
5266
5741
|
// src/components/NotificationPanel/NotificationItemTitle.tsx
|
|
5267
|
-
import
|
|
5268
|
-
import
|
|
5269
|
-
import { styled as
|
|
5270
|
-
import { jsx as
|
|
5271
|
-
var NotificationItemTitleRoot =
|
|
5742
|
+
import Box28 from "@mui/material/Box";
|
|
5743
|
+
import Typography14 from "@mui/material/Typography";
|
|
5744
|
+
import { styled as styled51 } from "@mui/material/styles";
|
|
5745
|
+
import { jsx as jsx66, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5746
|
+
var NotificationItemTitleRoot = styled51(Box28, {
|
|
5272
5747
|
name: "MuiNotificationPanel",
|
|
5273
5748
|
slot: "ItemTitle"
|
|
5274
5749
|
})(({ theme }) => ({
|
|
@@ -5276,7 +5751,7 @@ var NotificationItemTitleRoot = styled46(Box25, {
|
|
|
5276
5751
|
alignItems: "center",
|
|
5277
5752
|
gap: theme.spacing(1)
|
|
5278
5753
|
}));
|
|
5279
|
-
var NotificationItemTitleText =
|
|
5754
|
+
var NotificationItemTitleText = styled51(Typography14, {
|
|
5280
5755
|
name: "MuiNotificationPanel",
|
|
5281
5756
|
slot: "ItemTitleText",
|
|
5282
5757
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -5284,7 +5759,7 @@ var NotificationItemTitleText = styled46(Typography12, {
|
|
|
5284
5759
|
fontWeight: ownerState.read ? 400 : 600,
|
|
5285
5760
|
flex: 1
|
|
5286
5761
|
}));
|
|
5287
|
-
var NotificationItemUnreadDot =
|
|
5762
|
+
var NotificationItemUnreadDot = styled51(Box28, {
|
|
5288
5763
|
name: "MuiNotificationPanel",
|
|
5289
5764
|
slot: "ItemUnreadDot"
|
|
5290
5765
|
})(({ theme }) => ({
|
|
@@ -5300,18 +5775,18 @@ var NotificationItemTitle = ({
|
|
|
5300
5775
|
sx
|
|
5301
5776
|
}) => {
|
|
5302
5777
|
const { read } = useNotificationItemContext();
|
|
5303
|
-
return /* @__PURE__ */
|
|
5304
|
-
/* @__PURE__ */
|
|
5305
|
-
showUnreadIndicator && !read && /* @__PURE__ */
|
|
5778
|
+
return /* @__PURE__ */ jsxs24(NotificationItemTitleRoot, { sx, children: [
|
|
5779
|
+
/* @__PURE__ */ jsx66(NotificationItemTitleText, { variant: "body2", ownerState: { read }, children }),
|
|
5780
|
+
showUnreadIndicator && !read && /* @__PURE__ */ jsx66(NotificationItemUnreadDot, {})
|
|
5306
5781
|
] });
|
|
5307
5782
|
};
|
|
5308
5783
|
NotificationItemTitle.displayName = "NotificationItemTitle";
|
|
5309
5784
|
|
|
5310
5785
|
// src/components/NotificationPanel/NotificationItemMessage.tsx
|
|
5311
|
-
import
|
|
5312
|
-
import { styled as
|
|
5313
|
-
import { jsx as
|
|
5314
|
-
var NotificationItemMessageRoot =
|
|
5786
|
+
import Typography15 from "@mui/material/Typography";
|
|
5787
|
+
import { styled as styled52 } from "@mui/material/styles";
|
|
5788
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
5789
|
+
var NotificationItemMessageRoot = styled52(Typography15, {
|
|
5315
5790
|
name: "MuiNotificationPanel",
|
|
5316
5791
|
slot: "ItemMessage"
|
|
5317
5792
|
})(({ theme }) => ({
|
|
@@ -5323,15 +5798,15 @@ var NotificationItemMessage = ({
|
|
|
5323
5798
|
children,
|
|
5324
5799
|
sx
|
|
5325
5800
|
}) => {
|
|
5326
|
-
return /* @__PURE__ */
|
|
5801
|
+
return /* @__PURE__ */ jsx67(NotificationItemMessageRoot, { component: "span", variant: "caption", sx, children });
|
|
5327
5802
|
};
|
|
5328
5803
|
NotificationItemMessage.displayName = "NotificationItemMessage";
|
|
5329
5804
|
|
|
5330
5805
|
// src/components/NotificationPanel/NotificationItemTimestamp.tsx
|
|
5331
|
-
import
|
|
5332
|
-
import { styled as
|
|
5333
|
-
import { jsx as
|
|
5334
|
-
var NotificationItemTimestampRoot =
|
|
5806
|
+
import Typography16 from "@mui/material/Typography";
|
|
5807
|
+
import { styled as styled53 } from "@mui/material/styles";
|
|
5808
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
5809
|
+
var NotificationItemTimestampRoot = styled53(Typography16, {
|
|
5335
5810
|
name: "MuiNotificationPanel",
|
|
5336
5811
|
slot: "ItemTimestamp"
|
|
5337
5812
|
})(({ theme }) => ({
|
|
@@ -5342,15 +5817,15 @@ var NotificationItemTimestamp = ({
|
|
|
5342
5817
|
children,
|
|
5343
5818
|
sx
|
|
5344
5819
|
}) => {
|
|
5345
|
-
return /* @__PURE__ */
|
|
5820
|
+
return /* @__PURE__ */ jsx68(NotificationItemTimestampRoot, { component: "span", variant: "caption", sx, children });
|
|
5346
5821
|
};
|
|
5347
5822
|
NotificationItemTimestamp.displayName = "NotificationItemTimestamp";
|
|
5348
5823
|
|
|
5349
5824
|
// src/components/NotificationPanel/NotificationItemAction.tsx
|
|
5350
5825
|
import Chip4 from "@mui/material/Chip";
|
|
5351
|
-
import { styled as
|
|
5352
|
-
import { jsx as
|
|
5353
|
-
var NotificationItemActionRoot =
|
|
5826
|
+
import { styled as styled54 } from "@mui/material/styles";
|
|
5827
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
5828
|
+
var NotificationItemActionRoot = styled54(Chip4, {
|
|
5354
5829
|
name: "MuiNotificationPanel",
|
|
5355
5830
|
slot: "ItemAction"
|
|
5356
5831
|
})({
|
|
@@ -5372,7 +5847,7 @@ var NotificationItemAction = ({
|
|
|
5372
5847
|
onAction == null ? void 0 : onAction();
|
|
5373
5848
|
}
|
|
5374
5849
|
};
|
|
5375
|
-
return /* @__PURE__ */
|
|
5850
|
+
return /* @__PURE__ */ jsx69(
|
|
5376
5851
|
NotificationItemActionRoot,
|
|
5377
5852
|
{
|
|
5378
5853
|
label: children,
|
|
@@ -5386,12 +5861,12 @@ var NotificationItemAction = ({
|
|
|
5386
5861
|
NotificationItemAction.displayName = "NotificationItemAction";
|
|
5387
5862
|
|
|
5388
5863
|
// src/components/NotificationPanel/NotificationEmptyState.tsx
|
|
5389
|
-
import
|
|
5390
|
-
import
|
|
5391
|
-
import { styled as
|
|
5864
|
+
import Box29 from "@mui/material/Box";
|
|
5865
|
+
import Typography17 from "@mui/material/Typography";
|
|
5866
|
+
import { styled as styled55 } from "@mui/material/styles";
|
|
5392
5867
|
import { BellOff } from "@wso2/oxygen-ui-icons-react";
|
|
5393
|
-
import { jsx as
|
|
5394
|
-
var NotificationEmptyStateRoot =
|
|
5868
|
+
import { jsx as jsx70, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5869
|
+
var NotificationEmptyStateRoot = styled55(Box29, {
|
|
5395
5870
|
name: "MuiNotificationPanel",
|
|
5396
5871
|
slot: "EmptyState"
|
|
5397
5872
|
})(({ theme }) => ({
|
|
@@ -5405,7 +5880,7 @@ var NotificationEmptyStateRoot = styled50(Box26, {
|
|
|
5405
5880
|
paddingRight: theme.spacing(3),
|
|
5406
5881
|
textAlign: "center"
|
|
5407
5882
|
}));
|
|
5408
|
-
var NotificationEmptyStateMessage =
|
|
5883
|
+
var NotificationEmptyStateMessage = styled55(Typography17, {
|
|
5409
5884
|
name: "MuiNotificationPanel",
|
|
5410
5885
|
slot: "EmptyStateMessage"
|
|
5411
5886
|
})(({ theme }) => ({
|
|
@@ -5416,15 +5891,15 @@ var NotificationEmptyState = ({
|
|
|
5416
5891
|
icon,
|
|
5417
5892
|
sx
|
|
5418
5893
|
}) => {
|
|
5419
|
-
return /* @__PURE__ */
|
|
5420
|
-
icon || /* @__PURE__ */
|
|
5421
|
-
/* @__PURE__ */
|
|
5894
|
+
return /* @__PURE__ */ jsxs25(NotificationEmptyStateRoot, { sx, children: [
|
|
5895
|
+
icon || /* @__PURE__ */ jsx70(BellOff, { size: 48, style: { opacity: 0.3, marginBottom: 16 } }),
|
|
5896
|
+
/* @__PURE__ */ jsx70(NotificationEmptyStateMessage, { variant: "body2", children: message })
|
|
5422
5897
|
] });
|
|
5423
5898
|
};
|
|
5424
5899
|
|
|
5425
5900
|
// src/components/NotificationPanel/NotificationPanel.tsx
|
|
5426
|
-
import { jsx as
|
|
5427
|
-
var NotificationPanelRoot =
|
|
5901
|
+
import { jsx as jsx71, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5902
|
+
var NotificationPanelRoot = styled56(Drawer, {
|
|
5428
5903
|
name: "MuiNotificationPanel",
|
|
5429
5904
|
slot: "Root",
|
|
5430
5905
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -5451,9 +5926,9 @@ var NotificationPanel = ({
|
|
|
5451
5926
|
sx
|
|
5452
5927
|
}) => {
|
|
5453
5928
|
var _a;
|
|
5454
|
-
const appShellContext =
|
|
5929
|
+
const appShellContext = React32.useContext(AppShellContext);
|
|
5455
5930
|
const open = (_a = openProp != null ? openProp : appShellContext == null ? void 0 : appShellContext.state.notificationPanelOpen) != null ? _a : false;
|
|
5456
|
-
const onClose =
|
|
5931
|
+
const onClose = React32.useMemo(
|
|
5457
5932
|
() => {
|
|
5458
5933
|
var _a2;
|
|
5459
5934
|
return (_a2 = onCloseProp != null ? onCloseProp : appShellContext == null ? void 0 : appShellContext.actions.toggleNotificationPanel) != null ? _a2 : (() => {
|
|
@@ -5462,10 +5937,10 @@ var NotificationPanel = ({
|
|
|
5462
5937
|
[onCloseProp, appShellContext == null ? void 0 : appShellContext.actions.toggleNotificationPanel]
|
|
5463
5938
|
);
|
|
5464
5939
|
const ariaLabel = typeof ariaLabelProp === "string" && ariaLabelProp.trim().length > 0 ? ariaLabelProp.trim() : "Notifications";
|
|
5465
|
-
const [liveAnnouncement, setLiveAnnouncementState] =
|
|
5466
|
-
const [liveAnnouncementNonce, setLiveAnnouncementNonce] =
|
|
5467
|
-
const prevLiveAnnouncementPropRef =
|
|
5468
|
-
const publishLiveAnnouncement =
|
|
5940
|
+
const [liveAnnouncement, setLiveAnnouncementState] = React32.useState("");
|
|
5941
|
+
const [liveAnnouncementNonce, setLiveAnnouncementNonce] = React32.useState(0);
|
|
5942
|
+
const prevLiveAnnouncementPropRef = React32.useRef(void 0);
|
|
5943
|
+
const publishLiveAnnouncement = React32.useCallback(
|
|
5469
5944
|
(message) => {
|
|
5470
5945
|
if (!open) return;
|
|
5471
5946
|
setLiveAnnouncementState(message);
|
|
@@ -5473,7 +5948,7 @@ var NotificationPanel = ({
|
|
|
5473
5948
|
},
|
|
5474
5949
|
[open]
|
|
5475
5950
|
);
|
|
5476
|
-
|
|
5951
|
+
React32.useEffect(() => {
|
|
5477
5952
|
if (!open) {
|
|
5478
5953
|
setLiveAnnouncementState("");
|
|
5479
5954
|
prevLiveAnnouncementPropRef.current = liveAnnouncementProp;
|
|
@@ -5491,12 +5966,12 @@ var NotificationPanel = ({
|
|
|
5491
5966
|
publishLiveAnnouncement(liveAnnouncementProp);
|
|
5492
5967
|
}
|
|
5493
5968
|
}, [open, liveAnnouncementProp, publishLiveAnnouncement]);
|
|
5494
|
-
const contextValue =
|
|
5969
|
+
const contextValue = React32.useMemo(
|
|
5495
5970
|
() => ({ onClose, open, setLiveAnnouncement: publishLiveAnnouncement }),
|
|
5496
5971
|
[onClose, open, publishLiveAnnouncement]
|
|
5497
5972
|
);
|
|
5498
5973
|
const ownerState = { width };
|
|
5499
|
-
return /* @__PURE__ */
|
|
5974
|
+
return /* @__PURE__ */ jsx71(NotificationPanelContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs26(
|
|
5500
5975
|
NotificationPanelRoot,
|
|
5501
5976
|
{
|
|
5502
5977
|
anchor,
|
|
@@ -5511,8 +5986,8 @@ var NotificationPanel = ({
|
|
|
5511
5986
|
}
|
|
5512
5987
|
},
|
|
5513
5988
|
children: [
|
|
5514
|
-
/* @__PURE__ */
|
|
5515
|
-
|
|
5989
|
+
/* @__PURE__ */ jsx71(
|
|
5990
|
+
Box30,
|
|
5516
5991
|
{
|
|
5517
5992
|
component: "div",
|
|
5518
5993
|
role: "status",
|
|
@@ -5547,30 +6022,30 @@ NotificationPanel.EmptyState = NotificationEmptyState;
|
|
|
5547
6022
|
NotificationPanel.displayName = "NotificationPanel";
|
|
5548
6023
|
|
|
5549
6024
|
// src/components/Footer/Footer.tsx
|
|
5550
|
-
import * as
|
|
5551
|
-
import
|
|
5552
|
-
import { styled as
|
|
6025
|
+
import * as React33 from "react";
|
|
6026
|
+
import Box31 from "@mui/material/Box";
|
|
6027
|
+
import { styled as styled60 } from "@mui/material/styles";
|
|
5553
6028
|
|
|
5554
6029
|
// src/components/Footer/FooterCopyright.tsx
|
|
5555
|
-
import
|
|
5556
|
-
import { styled as
|
|
5557
|
-
import { jsx as
|
|
5558
|
-
var StyledCopyrightText =
|
|
6030
|
+
import Typography18 from "@mui/material/Typography";
|
|
6031
|
+
import { styled as styled57 } from "@mui/material/styles";
|
|
6032
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
6033
|
+
var StyledCopyrightText = styled57(Typography18, {
|
|
5559
6034
|
name: "MuiFooter",
|
|
5560
6035
|
slot: "CopyrightText"
|
|
5561
6036
|
})(({ theme }) => ({
|
|
5562
6037
|
color: (theme.vars || theme).palette.text.secondary
|
|
5563
6038
|
}));
|
|
5564
6039
|
var FooterCopyright = ({ children }) => {
|
|
5565
|
-
return /* @__PURE__ */
|
|
6040
|
+
return /* @__PURE__ */ jsx72(StyledCopyrightText, { variant: "caption", children });
|
|
5566
6041
|
};
|
|
5567
6042
|
FooterCopyright.displayName = "Footer.Copyright";
|
|
5568
6043
|
|
|
5569
6044
|
// src/components/Footer/FooterVersion.tsx
|
|
5570
|
-
import
|
|
5571
|
-
import { styled as
|
|
5572
|
-
import { jsx as
|
|
5573
|
-
var StyledVersion =
|
|
6045
|
+
import Typography19 from "@mui/material/Typography";
|
|
6046
|
+
import { styled as styled58 } from "@mui/material/styles";
|
|
6047
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
6048
|
+
var StyledVersion = styled58(Typography19, {
|
|
5574
6049
|
name: "MuiFooter",
|
|
5575
6050
|
slot: "Version"
|
|
5576
6051
|
})(({ theme }) => ({
|
|
@@ -5581,15 +6056,15 @@ var StyledVersion = styled53(Typography17, {
|
|
|
5581
6056
|
fontSize: 11
|
|
5582
6057
|
}));
|
|
5583
6058
|
var FooterVersion = ({ children }) => {
|
|
5584
|
-
return /* @__PURE__ */
|
|
6059
|
+
return /* @__PURE__ */ jsx73(StyledVersion, { variant: "caption", children });
|
|
5585
6060
|
};
|
|
5586
6061
|
FooterVersion.displayName = "Footer.Version";
|
|
5587
6062
|
|
|
5588
6063
|
// src/components/Footer/FooterLink.tsx
|
|
5589
6064
|
import Link2 from "@mui/material/Link";
|
|
5590
|
-
import { styled as
|
|
5591
|
-
import { jsx as
|
|
5592
|
-
var StyledLink =
|
|
6065
|
+
import { styled as styled59 } from "@mui/material/styles";
|
|
6066
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
6067
|
+
var StyledLink = styled59(Link2, {
|
|
5593
6068
|
name: "MuiFooter",
|
|
5594
6069
|
slot: "Link"
|
|
5595
6070
|
})(({ theme }) => ({
|
|
@@ -5601,15 +6076,15 @@ var StyledLink = styled54(Link2, {
|
|
|
5601
6076
|
}));
|
|
5602
6077
|
var FooterLink = (_a) => {
|
|
5603
6078
|
var _b = _a, { children, href } = _b, props = __objRest(_b, ["children", "href"]);
|
|
5604
|
-
return /* @__PURE__ */
|
|
6079
|
+
return /* @__PURE__ */ jsx74(StyledLink, __spreadProps(__spreadValues({ href, underline: "hover" }, props), { children }));
|
|
5605
6080
|
};
|
|
5606
6081
|
FooterLink.displayName = "Footer.Link";
|
|
5607
6082
|
|
|
5608
6083
|
// src/components/Footer/FooterDivider.tsx
|
|
5609
6084
|
import Divider7 from "@mui/material/Divider";
|
|
5610
|
-
import { jsx as
|
|
6085
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
5611
6086
|
var FooterDivider = () => {
|
|
5612
|
-
return /* @__PURE__ */
|
|
6087
|
+
return /* @__PURE__ */ jsx75(
|
|
5613
6088
|
Divider7,
|
|
5614
6089
|
{
|
|
5615
6090
|
orientation: "vertical",
|
|
@@ -5621,8 +6096,8 @@ var FooterDivider = () => {
|
|
|
5621
6096
|
FooterDivider.displayName = "Footer.Divider";
|
|
5622
6097
|
|
|
5623
6098
|
// src/components/Footer/Footer.tsx
|
|
5624
|
-
import { jsx as
|
|
5625
|
-
var FooterRoot =
|
|
6099
|
+
import { jsx as jsx76, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6100
|
+
var FooterRoot = styled60(Box31, {
|
|
5626
6101
|
name: "MuiFooter",
|
|
5627
6102
|
slot: "Root"
|
|
5628
6103
|
})(({ theme }) => ({
|
|
@@ -5635,7 +6110,7 @@ var FooterRoot = styled55(Box28, {
|
|
|
5635
6110
|
borderTop: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
5636
6111
|
backgroundColor: (theme.vars || theme).palette.background.paper
|
|
5637
6112
|
}));
|
|
5638
|
-
var FooterContent =
|
|
6113
|
+
var FooterContent = styled60(Box31, {
|
|
5639
6114
|
name: "MuiFooter",
|
|
5640
6115
|
slot: "Content"
|
|
5641
6116
|
})(({ theme }) => ({
|
|
@@ -5649,7 +6124,7 @@ var FooterContent = styled55(Box28, {
|
|
|
5649
6124
|
alignItems: "center"
|
|
5650
6125
|
}
|
|
5651
6126
|
}));
|
|
5652
|
-
var FooterLeft =
|
|
6127
|
+
var FooterLeft = styled60(Box31, {
|
|
5653
6128
|
name: "MuiFooter",
|
|
5654
6129
|
slot: "Left"
|
|
5655
6130
|
})(({ theme }) => ({
|
|
@@ -5658,7 +6133,7 @@ var FooterLeft = styled55(Box28, {
|
|
|
5658
6133
|
gap: theme.spacing(2),
|
|
5659
6134
|
flexWrap: "wrap"
|
|
5660
6135
|
}));
|
|
5661
|
-
var FooterRight =
|
|
6136
|
+
var FooterRight = styled60(Box31, {
|
|
5662
6137
|
name: "MuiFooter",
|
|
5663
6138
|
slot: "Right"
|
|
5664
6139
|
})(({ theme }) => ({
|
|
@@ -5668,11 +6143,11 @@ var FooterRight = styled55(Box28, {
|
|
|
5668
6143
|
flexWrap: "wrap"
|
|
5669
6144
|
}));
|
|
5670
6145
|
var Footer = ({ children, sx }) => {
|
|
5671
|
-
const childrenArray =
|
|
6146
|
+
const childrenArray = React33.Children.toArray(children);
|
|
5672
6147
|
const leftChildren = [];
|
|
5673
6148
|
const rightChildren = [];
|
|
5674
6149
|
childrenArray.forEach((child) => {
|
|
5675
|
-
if (
|
|
6150
|
+
if (React33.isValidElement(child)) {
|
|
5676
6151
|
if (child.type === FooterCopyright || child.type === FooterVersion || child.type === FooterDivider) {
|
|
5677
6152
|
leftChildren.push(child);
|
|
5678
6153
|
} else if (child.type === FooterLink) {
|
|
@@ -5680,9 +6155,9 @@ var Footer = ({ children, sx }) => {
|
|
|
5680
6155
|
}
|
|
5681
6156
|
}
|
|
5682
6157
|
});
|
|
5683
|
-
return /* @__PURE__ */
|
|
5684
|
-
leftChildren.length > 0 && /* @__PURE__ */
|
|
5685
|
-
rightChildren.length > 0 && /* @__PURE__ */
|
|
6158
|
+
return /* @__PURE__ */ jsx76(FooterRoot, { component: "footer", sx, children: /* @__PURE__ */ jsxs27(FooterContent, { children: [
|
|
6159
|
+
leftChildren.length > 0 && /* @__PURE__ */ jsx76(FooterLeft, { children: leftChildren }),
|
|
6160
|
+
rightChildren.length > 0 && /* @__PURE__ */ jsx76(FooterRight, { children: rightChildren })
|
|
5686
6161
|
] }) });
|
|
5687
6162
|
};
|
|
5688
6163
|
Footer.Copyright = FooterCopyright;
|
|
@@ -5692,14 +6167,14 @@ Footer.Divider = FooterDivider;
|
|
|
5692
6167
|
Footer.displayName = "Footer";
|
|
5693
6168
|
|
|
5694
6169
|
// src/components/UserMenu/UserMenu.tsx
|
|
5695
|
-
import * as
|
|
6170
|
+
import * as React38 from "react";
|
|
5696
6171
|
import Menu3 from "@mui/material/Menu";
|
|
5697
6172
|
|
|
5698
6173
|
// src/components/UserMenu/UserMenuContext.tsx
|
|
5699
|
-
import * as
|
|
5700
|
-
var UserMenuContext =
|
|
6174
|
+
import * as React34 from "react";
|
|
6175
|
+
var UserMenuContext = React34.createContext(void 0);
|
|
5701
6176
|
var useUserMenu = () => {
|
|
5702
|
-
const context =
|
|
6177
|
+
const context = React34.useContext(UserMenuContext);
|
|
5703
6178
|
if (!context) {
|
|
5704
6179
|
throw new Error("UserMenu sub-components must be used within a UserMenu component");
|
|
5705
6180
|
}
|
|
@@ -5708,11 +6183,11 @@ var useUserMenu = () => {
|
|
|
5708
6183
|
UserMenuContext.displayName = "UserMenu.Context";
|
|
5709
6184
|
|
|
5710
6185
|
// src/components/UserMenu/UserMenuTrigger.tsx
|
|
5711
|
-
import * as
|
|
5712
|
-
import
|
|
5713
|
-
import
|
|
6186
|
+
import * as React35 from "react";
|
|
6187
|
+
import Tooltip7 from "@mui/material/Tooltip";
|
|
6188
|
+
import IconButton7 from "@mui/material/IconButton";
|
|
5714
6189
|
import Avatar4 from "@mui/material/Avatar";
|
|
5715
|
-
import { styled as
|
|
6190
|
+
import { styled as styled61 } from "@mui/material/styles";
|
|
5716
6191
|
|
|
5717
6192
|
// src/components/UserMenu/getUserMenuAvatarProps.ts
|
|
5718
6193
|
var IMAGE_URL_PATTERN = /^(https?:|\/|data:|blob:)/i;
|
|
@@ -5734,8 +6209,8 @@ function getUserMenuAvatarProps(name, avatar) {
|
|
|
5734
6209
|
}
|
|
5735
6210
|
|
|
5736
6211
|
// src/components/UserMenu/UserMenuTrigger.tsx
|
|
5737
|
-
import { jsx as
|
|
5738
|
-
var StyledTrigger =
|
|
6212
|
+
import { jsx as jsx77, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6213
|
+
var StyledTrigger = styled61(IconButton7, {
|
|
5739
6214
|
name: "MuiUserMenu",
|
|
5740
6215
|
slot: "Trigger",
|
|
5741
6216
|
shouldForwardProp: (prop) => prop !== "showName"
|
|
@@ -5746,7 +6221,7 @@ var StyledTrigger = styled56(IconButton6, {
|
|
|
5746
6221
|
paddingRight: theme.spacing(1.5),
|
|
5747
6222
|
borderRadius: typeof theme.shape.borderRadius === "number" ? theme.shape.borderRadius * 2 : theme.spacing(2)
|
|
5748
6223
|
}));
|
|
5749
|
-
var StyledAvatar2 =
|
|
6224
|
+
var StyledAvatar2 = styled61(Avatar4, {
|
|
5750
6225
|
name: "MuiUserMenu",
|
|
5751
6226
|
slot: "Avatar"
|
|
5752
6227
|
})(({ theme }) => ({
|
|
@@ -5757,7 +6232,7 @@ var StyledAvatar2 = styled56(Avatar4, {
|
|
|
5757
6232
|
fontSize: 14,
|
|
5758
6233
|
fontWeight: 600
|
|
5759
6234
|
}));
|
|
5760
|
-
var StyledNameText =
|
|
6235
|
+
var StyledNameText = styled61("span", {
|
|
5761
6236
|
name: "MuiUserMenu",
|
|
5762
6237
|
slot: "NameText"
|
|
5763
6238
|
})(({ theme }) => ({
|
|
@@ -5769,14 +6244,14 @@ var StyledNameText = styled56("span", {
|
|
|
5769
6244
|
display: "block"
|
|
5770
6245
|
}
|
|
5771
6246
|
}));
|
|
5772
|
-
var UserMenuTrigger =
|
|
6247
|
+
var UserMenuTrigger = React35.forwardRef(
|
|
5773
6248
|
function UserMenuTrigger2(_a, ref) {
|
|
5774
6249
|
var _b = _a, { name, avatar, showName = false, onClick, "aria-label": ariaLabel } = _b, props = __objRest(_b, ["name", "avatar", "showName", "onClick", "aria-label"]);
|
|
5775
6250
|
const { open, handleOpen } = useUserMenu();
|
|
5776
6251
|
const avatarProps = getUserMenuAvatarProps(name, avatar);
|
|
5777
6252
|
const defaultAriaLabel = showName ? name : "Account";
|
|
5778
6253
|
const resolvedAriaLabel = typeof ariaLabel === "string" && ariaLabel.trim().length > 0 ? ariaLabel : defaultAriaLabel;
|
|
5779
|
-
return /* @__PURE__ */
|
|
6254
|
+
return /* @__PURE__ */ jsx77(Tooltip7, { title: "Account", children: /* @__PURE__ */ jsxs28(
|
|
5780
6255
|
StyledTrigger,
|
|
5781
6256
|
__spreadProps(__spreadValues({}, props), {
|
|
5782
6257
|
ref,
|
|
@@ -5791,8 +6266,8 @@ var UserMenuTrigger = React29.forwardRef(
|
|
|
5791
6266
|
"aria-haspopup": "true",
|
|
5792
6267
|
"aria-expanded": open ? "true" : void 0,
|
|
5793
6268
|
children: [
|
|
5794
|
-
/* @__PURE__ */
|
|
5795
|
-
showName && /* @__PURE__ */
|
|
6269
|
+
/* @__PURE__ */ jsx77(StyledAvatar2, { src: avatarProps.src, alt: name, children: avatarProps.children }),
|
|
6270
|
+
showName && /* @__PURE__ */ jsx77(StyledNameText, { children: name })
|
|
5796
6271
|
]
|
|
5797
6272
|
})
|
|
5798
6273
|
) });
|
|
@@ -5802,20 +6277,20 @@ UserMenuTrigger.displayName = "UserMenu.Trigger";
|
|
|
5802
6277
|
|
|
5803
6278
|
// src/components/UserMenu/UserMenuHeader.tsx
|
|
5804
6279
|
import Divider8 from "@mui/material/Divider";
|
|
5805
|
-
import
|
|
6280
|
+
import Box32 from "@mui/material/Box";
|
|
5806
6281
|
import Avatar5 from "@mui/material/Avatar";
|
|
5807
|
-
import
|
|
6282
|
+
import Typography20 from "@mui/material/Typography";
|
|
5808
6283
|
import Chip5 from "@mui/material/Chip";
|
|
5809
|
-
import { styled as
|
|
5810
|
-
import { Fragment as Fragment9, jsx as
|
|
5811
|
-
var StyledHeaderBox =
|
|
6284
|
+
import { styled as styled62 } from "@mui/material/styles";
|
|
6285
|
+
import { Fragment as Fragment9, jsx as jsx78, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6286
|
+
var StyledHeaderBox = styled62(Box32, {
|
|
5812
6287
|
name: "MuiUserMenu",
|
|
5813
6288
|
slot: "HeaderBox"
|
|
5814
6289
|
})(({ theme }) => ({
|
|
5815
6290
|
padding: theme.spacing(2),
|
|
5816
6291
|
paddingBottom: theme.spacing(1.5)
|
|
5817
6292
|
}));
|
|
5818
|
-
var StyledHeaderContent =
|
|
6293
|
+
var StyledHeaderContent = styled62(Box32, {
|
|
5819
6294
|
name: "MuiUserMenu",
|
|
5820
6295
|
slot: "HeaderContent"
|
|
5821
6296
|
})(({ theme }) => ({
|
|
@@ -5823,7 +6298,7 @@ var StyledHeaderContent = styled57(Box29, {
|
|
|
5823
6298
|
alignItems: "center",
|
|
5824
6299
|
gap: theme.spacing(2)
|
|
5825
6300
|
}));
|
|
5826
|
-
var StyledHeaderAvatar =
|
|
6301
|
+
var StyledHeaderAvatar = styled62(Avatar5, {
|
|
5827
6302
|
name: "MuiUserMenu",
|
|
5828
6303
|
slot: "HeaderAvatar"
|
|
5829
6304
|
})(({ theme }) => ({
|
|
@@ -5834,7 +6309,7 @@ var StyledHeaderAvatar = styled57(Avatar5, {
|
|
|
5834
6309
|
fontSize: 16,
|
|
5835
6310
|
fontWeight: 600
|
|
5836
6311
|
}));
|
|
5837
|
-
var StyledUserInfo =
|
|
6312
|
+
var StyledUserInfo = styled62(Box32, {
|
|
5838
6313
|
name: "MuiUserMenu",
|
|
5839
6314
|
slot: "UserInfo"
|
|
5840
6315
|
})(({ theme }) => ({
|
|
@@ -5844,7 +6319,7 @@ var StyledUserInfo = styled57(Box29, {
|
|
|
5844
6319
|
flex: 1,
|
|
5845
6320
|
minWidth: 0
|
|
5846
6321
|
}));
|
|
5847
|
-
var StyledNameRow =
|
|
6322
|
+
var StyledNameRow = styled62(Box32, {
|
|
5848
6323
|
name: "MuiUserMenu",
|
|
5849
6324
|
slot: "NameRow"
|
|
5850
6325
|
})(({ theme }) => ({
|
|
@@ -5852,7 +6327,7 @@ var StyledNameRow = styled57(Box29, {
|
|
|
5852
6327
|
alignItems: "center",
|
|
5853
6328
|
gap: theme.spacing(1)
|
|
5854
6329
|
}));
|
|
5855
|
-
var StyledName =
|
|
6330
|
+
var StyledName = styled62(Typography20, {
|
|
5856
6331
|
name: "MuiUserMenu",
|
|
5857
6332
|
slot: "Name"
|
|
5858
6333
|
})({
|
|
@@ -5861,7 +6336,7 @@ var StyledName = styled57(Typography18, {
|
|
|
5861
6336
|
overflow: "hidden",
|
|
5862
6337
|
textOverflow: "ellipsis"
|
|
5863
6338
|
});
|
|
5864
|
-
var StyledRoleChip =
|
|
6339
|
+
var StyledRoleChip = styled62(Chip5, {
|
|
5865
6340
|
name: "MuiUserMenu",
|
|
5866
6341
|
slot: "RoleChip"
|
|
5867
6342
|
})({
|
|
@@ -5869,7 +6344,7 @@ var StyledRoleChip = styled57(Chip5, {
|
|
|
5869
6344
|
fontSize: 11,
|
|
5870
6345
|
fontWeight: 600
|
|
5871
6346
|
});
|
|
5872
|
-
var StyledEmail =
|
|
6347
|
+
var StyledEmail = styled62(Typography20, {
|
|
5873
6348
|
name: "MuiUserMenu",
|
|
5874
6349
|
slot: "Email"
|
|
5875
6350
|
})(({ theme }) => ({
|
|
@@ -5881,13 +6356,13 @@ var StyledEmail = styled57(Typography18, {
|
|
|
5881
6356
|
}));
|
|
5882
6357
|
var UserMenuHeader = ({ name, email, avatar, role }) => {
|
|
5883
6358
|
const avatarProps = getUserMenuAvatarProps(name, avatar);
|
|
5884
|
-
return /* @__PURE__ */
|
|
5885
|
-
/* @__PURE__ */
|
|
5886
|
-
/* @__PURE__ */
|
|
5887
|
-
/* @__PURE__ */
|
|
5888
|
-
/* @__PURE__ */
|
|
5889
|
-
/* @__PURE__ */
|
|
5890
|
-
role && /* @__PURE__ */
|
|
6359
|
+
return /* @__PURE__ */ jsxs29(Fragment9, { children: [
|
|
6360
|
+
/* @__PURE__ */ jsx78(StyledHeaderBox, { children: /* @__PURE__ */ jsxs29(StyledHeaderContent, { children: [
|
|
6361
|
+
/* @__PURE__ */ jsx78(StyledHeaderAvatar, { src: avatarProps.src, alt: name, children: avatarProps.children }),
|
|
6362
|
+
/* @__PURE__ */ jsxs29(StyledUserInfo, { children: [
|
|
6363
|
+
/* @__PURE__ */ jsxs29(StyledNameRow, { children: [
|
|
6364
|
+
/* @__PURE__ */ jsx78(StyledName, { variant: "subtitle2", children: name }),
|
|
6365
|
+
role && /* @__PURE__ */ jsx78(
|
|
5891
6366
|
StyledRoleChip,
|
|
5892
6367
|
{
|
|
5893
6368
|
label: role,
|
|
@@ -5896,32 +6371,32 @@ var UserMenuHeader = ({ name, email, avatar, role }) => {
|
|
|
5896
6371
|
}
|
|
5897
6372
|
)
|
|
5898
6373
|
] }),
|
|
5899
|
-
/* @__PURE__ */
|
|
6374
|
+
/* @__PURE__ */ jsx78(StyledEmail, { variant: "caption", children: email })
|
|
5900
6375
|
] })
|
|
5901
6376
|
] }) }),
|
|
5902
|
-
/* @__PURE__ */
|
|
6377
|
+
/* @__PURE__ */ jsx78(Divider8, {})
|
|
5903
6378
|
] });
|
|
5904
6379
|
};
|
|
5905
6380
|
UserMenuHeader.displayName = "UserMenu.Header";
|
|
5906
6381
|
|
|
5907
6382
|
// src/components/UserMenu/UserMenuItem.tsx
|
|
5908
|
-
import * as
|
|
6383
|
+
import * as React36 from "react";
|
|
5909
6384
|
import MenuItem5 from "@mui/material/MenuItem";
|
|
5910
6385
|
import ListItemIcon3 from "@mui/material/ListItemIcon";
|
|
5911
6386
|
import ListItemText4 from "@mui/material/ListItemText";
|
|
5912
|
-
import
|
|
6387
|
+
import Box33 from "@mui/material/Box";
|
|
5913
6388
|
import Chip6 from "@mui/material/Chip";
|
|
5914
|
-
import { styled as
|
|
6389
|
+
import { styled as styled63 } from "@mui/material/styles";
|
|
5915
6390
|
import { ChevronRight as ChevronRight2 } from "@wso2/oxygen-ui-icons-react";
|
|
5916
|
-
import { jsx as
|
|
5917
|
-
var StyledMenuItem2 =
|
|
6391
|
+
import { jsx as jsx79, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6392
|
+
var StyledMenuItem2 = styled63(MenuItem5, {
|
|
5918
6393
|
name: "MuiUserMenu",
|
|
5919
6394
|
slot: "MenuItem"
|
|
5920
6395
|
})(({ theme }) => ({
|
|
5921
6396
|
paddingTop: theme.spacing(1.5),
|
|
5922
6397
|
paddingBottom: theme.spacing(1.5)
|
|
5923
6398
|
}));
|
|
5924
|
-
var StyledBillingChip =
|
|
6399
|
+
var StyledBillingChip = styled63(Chip6, {
|
|
5925
6400
|
name: "MuiUserMenu",
|
|
5926
6401
|
slot: "BillingChip"
|
|
5927
6402
|
})(() => ({
|
|
@@ -5941,13 +6416,13 @@ var UserMenuItem = ({
|
|
|
5941
6416
|
handleClose();
|
|
5942
6417
|
onClick == null ? void 0 : onClick();
|
|
5943
6418
|
};
|
|
5944
|
-
return /* @__PURE__ */
|
|
5945
|
-
icon && /* @__PURE__ */
|
|
6419
|
+
return /* @__PURE__ */ jsxs30(StyledMenuItem2, { onClick: handleClick, children: [
|
|
6420
|
+
icon && /* @__PURE__ */ jsx79(ListItemIcon3, { children: React36.isValidElement(icon) ? React36.cloneElement(icon, __spreadProps(__spreadValues({}, icon.props), {
|
|
5946
6421
|
size: (_a = icon.props.size) != null ? _a : 18
|
|
5947
6422
|
})) : icon }),
|
|
5948
|
-
/* @__PURE__ */
|
|
5949
|
-
/* @__PURE__ */
|
|
5950
|
-
badge && /* @__PURE__ */
|
|
6423
|
+
/* @__PURE__ */ jsx79(ListItemText4, { primary: label }),
|
|
6424
|
+
/* @__PURE__ */ jsxs30(Box33, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
6425
|
+
badge && /* @__PURE__ */ jsx79(
|
|
5951
6426
|
StyledBillingChip,
|
|
5952
6427
|
{
|
|
5953
6428
|
label: badge,
|
|
@@ -5955,33 +6430,25 @@ var UserMenuItem = ({
|
|
|
5955
6430
|
variant: "outlined"
|
|
5956
6431
|
}
|
|
5957
6432
|
),
|
|
5958
|
-
/* @__PURE__ */
|
|
6433
|
+
/* @__PURE__ */ jsx79(ChevronRight2, { size: 16, style: { color: "var(--mui-palette-text-secondary)" } })
|
|
5959
6434
|
] })
|
|
5960
6435
|
] });
|
|
5961
6436
|
};
|
|
5962
6437
|
UserMenuItem.displayName = "UserMenu.Item";
|
|
5963
6438
|
|
|
5964
6439
|
// src/components/UserMenu/UserMenuLogout.tsx
|
|
5965
|
-
import * as
|
|
6440
|
+
import * as React37 from "react";
|
|
5966
6441
|
import MenuItem6 from "@mui/material/MenuItem";
|
|
5967
6442
|
import ListItemIcon4 from "@mui/material/ListItemIcon";
|
|
5968
6443
|
import ListItemText5 from "@mui/material/ListItemText";
|
|
5969
|
-
import { styled as
|
|
5970
|
-
import { jsx as
|
|
5971
|
-
var StyledLogoutItem =
|
|
6444
|
+
import { styled as styled64 } from "@mui/material/styles";
|
|
6445
|
+
import { jsx as jsx80, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6446
|
+
var StyledLogoutItem = styled64(MenuItem6, {
|
|
5972
6447
|
name: "MuiUserMenu",
|
|
5973
6448
|
slot: "LogoutItem"
|
|
5974
6449
|
})(({ theme }) => ({
|
|
5975
6450
|
paddingTop: theme.spacing(1.5),
|
|
5976
|
-
paddingBottom: theme.spacing(1.5)
|
|
5977
|
-
color: (theme.vars || theme).palette.error.main,
|
|
5978
|
-
"&:hover": {
|
|
5979
|
-
backgroundColor: (theme.vars || theme).palette.error.main,
|
|
5980
|
-
color: (theme.vars || theme).palette.error.contrastText,
|
|
5981
|
-
"& .MuiListItemIcon-root": {
|
|
5982
|
-
color: (theme.vars || theme).palette.error.contrastText
|
|
5983
|
-
}
|
|
5984
|
-
}
|
|
6451
|
+
paddingBottom: theme.spacing(1.5)
|
|
5985
6452
|
}));
|
|
5986
6453
|
var UserMenuLogout = ({
|
|
5987
6454
|
icon,
|
|
@@ -5994,25 +6461,25 @@ var UserMenuLogout = ({
|
|
|
5994
6461
|
handleClose();
|
|
5995
6462
|
onClick == null ? void 0 : onClick();
|
|
5996
6463
|
};
|
|
5997
|
-
return /* @__PURE__ */
|
|
5998
|
-
icon && /* @__PURE__ */
|
|
6464
|
+
return /* @__PURE__ */ jsxs31(StyledLogoutItem, { onClick: handleClick, children: [
|
|
6465
|
+
icon && /* @__PURE__ */ jsx80(ListItemIcon4, { children: React37.isValidElement(icon) ? React37.cloneElement(icon, __spreadProps(__spreadValues({}, icon.props), {
|
|
5999
6466
|
size: (_a = icon.props.size) != null ? _a : 18
|
|
6000
6467
|
})) : icon }),
|
|
6001
|
-
/* @__PURE__ */
|
|
6468
|
+
/* @__PURE__ */ jsx80(ListItemText5, { primary: label })
|
|
6002
6469
|
] });
|
|
6003
6470
|
};
|
|
6004
6471
|
UserMenuLogout.displayName = "UserMenu.Logout";
|
|
6005
6472
|
|
|
6006
6473
|
// src/components/UserMenu/UserMenuDivider.tsx
|
|
6007
6474
|
import Divider9 from "@mui/material/Divider";
|
|
6008
|
-
import { jsx as
|
|
6009
|
-
var UserMenuDivider = () => /* @__PURE__ */
|
|
6475
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
6476
|
+
var UserMenuDivider = () => /* @__PURE__ */ jsx81(Divider9, {});
|
|
6010
6477
|
UserMenuDivider.displayName = "UserMenu.Divider";
|
|
6011
6478
|
|
|
6012
6479
|
// src/components/UserMenu/UserMenu.tsx
|
|
6013
|
-
import { jsx as
|
|
6480
|
+
import { jsx as jsx82, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6014
6481
|
var UserMenu = ({ children }) => {
|
|
6015
|
-
const [anchorEl, setAnchorEl] =
|
|
6482
|
+
const [anchorEl, setAnchorEl] = React38.useState(null);
|
|
6016
6483
|
const open = Boolean(anchorEl);
|
|
6017
6484
|
const handleOpen = (event) => {
|
|
6018
6485
|
setAnchorEl(event.currentTarget);
|
|
@@ -6020,16 +6487,16 @@ var UserMenu = ({ children }) => {
|
|
|
6020
6487
|
const handleClose = () => {
|
|
6021
6488
|
setAnchorEl(null);
|
|
6022
6489
|
};
|
|
6023
|
-
const childrenArray =
|
|
6490
|
+
const childrenArray = React38.Children.toArray(children);
|
|
6024
6491
|
const triggerChild = childrenArray.find(
|
|
6025
|
-
(child) =>
|
|
6492
|
+
(child) => React38.isValidElement(child) && child.type === UserMenuTrigger
|
|
6026
6493
|
);
|
|
6027
6494
|
const menuChildren = childrenArray.filter(
|
|
6028
|
-
(child) =>
|
|
6495
|
+
(child) => React38.isValidElement(child) && child.type !== UserMenuTrigger
|
|
6029
6496
|
);
|
|
6030
|
-
return /* @__PURE__ */
|
|
6497
|
+
return /* @__PURE__ */ jsxs32(UserMenuContext.Provider, { value: { open, anchorEl, handleOpen, handleClose }, children: [
|
|
6031
6498
|
triggerChild,
|
|
6032
|
-
/* @__PURE__ */
|
|
6499
|
+
/* @__PURE__ */ jsx82(
|
|
6033
6500
|
Menu3,
|
|
6034
6501
|
{
|
|
6035
6502
|
id: "user-menu",
|
|
@@ -6059,15 +6526,15 @@ UserMenu.Divider = UserMenuDivider;
|
|
|
6059
6526
|
UserMenu.displayName = "UserMenu";
|
|
6060
6527
|
|
|
6061
6528
|
// src/components/NotificationBanner/NotificationBanner.tsx
|
|
6062
|
-
import * as
|
|
6529
|
+
import * as React39 from "react";
|
|
6063
6530
|
import Alert from "@mui/material/Alert";
|
|
6064
6531
|
import AlertTitle from "@mui/material/AlertTitle";
|
|
6065
6532
|
import Collapse2 from "@mui/material/Collapse";
|
|
6066
6533
|
import Button4 from "@mui/material/Button";
|
|
6067
|
-
import
|
|
6068
|
-
import { styled as
|
|
6069
|
-
import { jsx as
|
|
6070
|
-
var NotificationBannerAlert =
|
|
6534
|
+
import Box34 from "@mui/material/Box";
|
|
6535
|
+
import { styled as styled65 } from "@mui/material/styles";
|
|
6536
|
+
import { jsx as jsx83, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6537
|
+
var NotificationBannerAlert = styled65(Alert, {
|
|
6071
6538
|
name: "MuiNotificationBanner",
|
|
6072
6539
|
slot: "Root"
|
|
6073
6540
|
})(({ theme }) => __spreadValues({
|
|
@@ -6095,7 +6562,7 @@ var NotificationBannerAlert = styled60(Alert, {
|
|
|
6095
6562
|
}
|
|
6096
6563
|
}
|
|
6097
6564
|
})));
|
|
6098
|
-
var NotificationBannerContent =
|
|
6565
|
+
var NotificationBannerContent = styled65(Box34, {
|
|
6099
6566
|
name: "MuiNotificationBanner",
|
|
6100
6567
|
slot: "Content"
|
|
6101
6568
|
})({
|
|
@@ -6104,7 +6571,7 @@ var NotificationBannerContent = styled60(Box31, {
|
|
|
6104
6571
|
gap: 2,
|
|
6105
6572
|
flex: 1
|
|
6106
6573
|
});
|
|
6107
|
-
var NotificationBannerAction =
|
|
6574
|
+
var NotificationBannerAction = styled65(Button4, {
|
|
6108
6575
|
name: "MuiNotificationBanner",
|
|
6109
6576
|
slot: "Action"
|
|
6110
6577
|
})({
|
|
@@ -6125,22 +6592,22 @@ var NotificationBanner = ({
|
|
|
6125
6592
|
onDismiss,
|
|
6126
6593
|
sx
|
|
6127
6594
|
}) => {
|
|
6128
|
-
const [isVisible, setIsVisible] =
|
|
6129
|
-
|
|
6595
|
+
const [isVisible, setIsVisible] = React39.useState(visible);
|
|
6596
|
+
React39.useEffect(() => {
|
|
6130
6597
|
setIsVisible(visible);
|
|
6131
6598
|
}, [visible]);
|
|
6132
6599
|
const handleDismiss = () => {
|
|
6133
6600
|
setIsVisible(false);
|
|
6134
6601
|
onDismiss == null ? void 0 : onDismiss();
|
|
6135
6602
|
};
|
|
6136
|
-
return /* @__PURE__ */
|
|
6603
|
+
return /* @__PURE__ */ jsx83(Collapse2, { in: isVisible, children: /* @__PURE__ */ jsx83(
|
|
6137
6604
|
NotificationBannerAlert,
|
|
6138
6605
|
{
|
|
6139
6606
|
severity,
|
|
6140
6607
|
variant: "filled",
|
|
6141
6608
|
onClose: handleDismiss,
|
|
6142
6609
|
sx,
|
|
6143
|
-
action: actionLabel && onAction ? /* @__PURE__ */
|
|
6610
|
+
action: actionLabel && onAction ? /* @__PURE__ */ jsx83(
|
|
6144
6611
|
NotificationBannerAction,
|
|
6145
6612
|
{
|
|
6146
6613
|
color: "inherit",
|
|
@@ -6149,19 +6616,19 @@ var NotificationBanner = ({
|
|
|
6149
6616
|
children: actionLabel
|
|
6150
6617
|
}
|
|
6151
6618
|
) : void 0,
|
|
6152
|
-
children: /* @__PURE__ */
|
|
6153
|
-
title && /* @__PURE__ */
|
|
6154
|
-
/* @__PURE__ */
|
|
6619
|
+
children: /* @__PURE__ */ jsxs33(NotificationBannerContent, { children: [
|
|
6620
|
+
title && /* @__PURE__ */ jsx83(AlertTitle, { sx: { mb: 0 }, children: title }),
|
|
6621
|
+
/* @__PURE__ */ jsx83(Box34, { component: "span", children: message })
|
|
6155
6622
|
] })
|
|
6156
6623
|
}
|
|
6157
6624
|
) });
|
|
6158
6625
|
};
|
|
6159
6626
|
|
|
6160
6627
|
// src/components/Form/CardButton.tsx
|
|
6161
|
-
import { Card as
|
|
6628
|
+
import { Card as Card3, ButtonBase as ButtonBase3, Box as Box35, styled as styled66 } from "@mui/material";
|
|
6162
6629
|
import { CardHeader, CardContent as CardContent2, CardActions, CardMedia } from "@mui/material";
|
|
6163
|
-
import { jsx as
|
|
6164
|
-
var StyledCardButton =
|
|
6630
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
6631
|
+
var StyledCardButton = styled66(Card3, {
|
|
6165
6632
|
shouldForwardProp: (prop) => prop !== "selected" && prop !== "disabled"
|
|
6166
6633
|
})(({ theme, selected, disabled, alignItems = "flex-start" }) => ({
|
|
6167
6634
|
flexDirection: "column",
|
|
@@ -6189,90 +6656,90 @@ var StyledCardButton = styled61(Card2, {
|
|
|
6189
6656
|
}));
|
|
6190
6657
|
var CardButton = (props) => {
|
|
6191
6658
|
const _a = props, { disabled, selected, alignItems = "flex-start" } = _a, rest = __objRest(_a, ["disabled", "selected", "alignItems"]);
|
|
6192
|
-
return /* @__PURE__ */
|
|
6659
|
+
return /* @__PURE__ */ jsx84(
|
|
6193
6660
|
StyledCardButton,
|
|
6194
6661
|
__spreadValues({
|
|
6195
6662
|
alignItems,
|
|
6196
|
-
component:
|
|
6663
|
+
component: ButtonBase3,
|
|
6197
6664
|
selected,
|
|
6198
6665
|
disabled
|
|
6199
6666
|
}, rest)
|
|
6200
6667
|
);
|
|
6201
6668
|
};
|
|
6202
|
-
var DisappearingCardButtonContent = (props) => /* @__PURE__ */
|
|
6669
|
+
var DisappearingCardButtonContent = (props) => /* @__PURE__ */ jsx84(Box35, __spreadValues({ className: "creation-flow-card-actions" }, props));
|
|
6203
6670
|
|
|
6204
6671
|
// src/components/Form/Stack.tsx
|
|
6205
6672
|
import { Stack as OxygenStack } from "@mui/material";
|
|
6206
|
-
import { jsx as
|
|
6673
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
6207
6674
|
var Stack2 = (props) => {
|
|
6208
|
-
return /* @__PURE__ */
|
|
6675
|
+
return /* @__PURE__ */ jsx85(OxygenStack, __spreadValues({ spacing: 2 }, props));
|
|
6209
6676
|
};
|
|
6210
6677
|
|
|
6211
6678
|
// src/components/Form/Typography.tsx
|
|
6212
|
-
import { Typography as
|
|
6213
|
-
import { jsx as
|
|
6679
|
+
import { Typography as Typography21 } from "@mui/material";
|
|
6680
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
6214
6681
|
var Header2 = (props) => {
|
|
6215
6682
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
6216
|
-
return /* @__PURE__ */
|
|
6683
|
+
return /* @__PURE__ */ jsx86(Typography21, __spreadProps(__spreadValues({}, rest), { variant: "h4", children }));
|
|
6217
6684
|
};
|
|
6218
6685
|
var Subheader = (props) => {
|
|
6219
6686
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
6220
|
-
return /* @__PURE__ */
|
|
6687
|
+
return /* @__PURE__ */ jsx86(Typography21, __spreadProps(__spreadValues({}, rest), { variant: "h5", children }));
|
|
6221
6688
|
};
|
|
6222
6689
|
var Body = (props) => {
|
|
6223
6690
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
6224
|
-
return /* @__PURE__ */
|
|
6691
|
+
return /* @__PURE__ */ jsx86(Typography21, __spreadProps(__spreadValues({}, rest), { variant: "body2", children }));
|
|
6225
6692
|
};
|
|
6226
6693
|
|
|
6227
6694
|
// src/components/Form/Section.tsx
|
|
6228
|
-
import { Card as
|
|
6229
|
-
import { jsx as
|
|
6695
|
+
import { Card as Card4, CardContent as CardContent3, Stack as Stack3 } from "@mui/material";
|
|
6696
|
+
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
6230
6697
|
var Section = ({ children }) => {
|
|
6231
|
-
return /* @__PURE__ */
|
|
6698
|
+
return /* @__PURE__ */ jsx87(Card4, { children: /* @__PURE__ */ jsx87(CardContent3, { children: /* @__PURE__ */ jsx87(Stack3, { direction: "column", spacing: 2, children }) }) });
|
|
6232
6699
|
};
|
|
6233
6700
|
|
|
6234
6701
|
// src/components/Form/Wizard.tsx
|
|
6235
6702
|
import {
|
|
6236
|
-
Card as
|
|
6703
|
+
Card as Card5,
|
|
6237
6704
|
CardContent as CardContent4,
|
|
6238
6705
|
StepLabel,
|
|
6239
6706
|
Step,
|
|
6240
6707
|
Stepper,
|
|
6241
6708
|
Divider as Divider10
|
|
6242
6709
|
} from "@mui/material";
|
|
6243
|
-
import { styled as
|
|
6244
|
-
import { useMemo as
|
|
6245
|
-
import { jsx as
|
|
6246
|
-
var StyledWizardActionsStack =
|
|
6710
|
+
import { styled as styled67 } from "@mui/material/styles";
|
|
6711
|
+
import { useMemo as useMemo7 } from "react";
|
|
6712
|
+
import { jsx as jsx88, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6713
|
+
var StyledWizardActionsStack = styled67(Stack2)(() => ({
|
|
6247
6714
|
justifyContent: "space-between",
|
|
6248
6715
|
flexGrow: 1
|
|
6249
6716
|
}));
|
|
6250
6717
|
function Wizard({ steps, activeStep, actions }) {
|
|
6251
|
-
const step =
|
|
6252
|
-
return /* @__PURE__ */
|
|
6253
|
-
/* @__PURE__ */
|
|
6254
|
-
/* @__PURE__ */
|
|
6255
|
-
/* @__PURE__ */
|
|
6256
|
-
/* @__PURE__ */
|
|
6718
|
+
const step = useMemo7(() => activeStep < steps.length ? steps[activeStep] : null, [steps, activeStep]);
|
|
6719
|
+
return /* @__PURE__ */ jsx88(Card5, { children: /* @__PURE__ */ jsx88(CardContent4, { children: /* @__PURE__ */ jsxs34(Stack2, { children: [
|
|
6720
|
+
/* @__PURE__ */ jsx88(Stepper, { activeStep, children: steps.map((step2) => /* @__PURE__ */ jsx88(Step, { children: /* @__PURE__ */ jsx88(StepLabel, { children: step2.label }) }, step2.label)) }),
|
|
6721
|
+
/* @__PURE__ */ jsx88(Divider10, {}),
|
|
6722
|
+
/* @__PURE__ */ jsx88(Stack2, { direction: "row", children: step == null ? void 0 : step.component }),
|
|
6723
|
+
/* @__PURE__ */ jsx88(StyledWizardActionsStack, { direction: "row", children: actions })
|
|
6257
6724
|
] }) }) });
|
|
6258
6725
|
}
|
|
6259
6726
|
|
|
6260
6727
|
// src/components/Form/ElementWrapper.tsx
|
|
6261
6728
|
import { FormControl as FormControl3, FormLabel } from "@mui/material";
|
|
6262
|
-
import
|
|
6263
|
-
import { jsx as
|
|
6729
|
+
import React40 from "react";
|
|
6730
|
+
import { jsx as jsx89, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6264
6731
|
var ElementWrapper = (props) => {
|
|
6265
6732
|
const { label, name, children } = props;
|
|
6266
6733
|
const labelId = `${name}-label`;
|
|
6267
|
-
const enhancedChildren =
|
|
6734
|
+
const enhancedChildren = React40.Children.map(children, (child) => {
|
|
6268
6735
|
var _a;
|
|
6269
|
-
if (
|
|
6270
|
-
return
|
|
6736
|
+
if (React40.isValidElement(child) && ((_a = child.type) == null ? void 0 : _a.muiName) === "Select" && !child.props.labelId) {
|
|
6737
|
+
return React40.cloneElement(child, { labelId });
|
|
6271
6738
|
}
|
|
6272
6739
|
return child;
|
|
6273
6740
|
});
|
|
6274
|
-
return /* @__PURE__ */
|
|
6275
|
-
/* @__PURE__ */
|
|
6741
|
+
return /* @__PURE__ */ jsxs35(FormControl3, { fullWidth: true, children: [
|
|
6742
|
+
/* @__PURE__ */ jsx89(FormLabel, { id: labelId, htmlFor: name, children: label }),
|
|
6276
6743
|
enhancedChildren
|
|
6277
6744
|
] });
|
|
6278
6745
|
};
|
|
@@ -6296,16 +6763,16 @@ var Form = {
|
|
|
6296
6763
|
};
|
|
6297
6764
|
|
|
6298
6765
|
// src/components/AppShell/AppShell.tsx
|
|
6299
|
-
import * as
|
|
6300
|
-
import
|
|
6766
|
+
import * as React42 from "react";
|
|
6767
|
+
import Box40 from "@mui/material/Box";
|
|
6301
6768
|
|
|
6302
6769
|
// src/layouts/Layout.tsx
|
|
6303
|
-
import
|
|
6304
|
-
import { jsx as
|
|
6770
|
+
import Box36 from "@mui/material/Box";
|
|
6771
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
6305
6772
|
function Layout(_a) {
|
|
6306
6773
|
var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
|
|
6307
|
-
return /* @__PURE__ */
|
|
6308
|
-
|
|
6774
|
+
return /* @__PURE__ */ jsx90(
|
|
6775
|
+
Box36,
|
|
6309
6776
|
__spreadProps(__spreadValues({
|
|
6310
6777
|
sx: __spreadValues({
|
|
6311
6778
|
display: "flex",
|
|
@@ -6320,12 +6787,12 @@ Layout.displayName = "Layout";
|
|
|
6320
6787
|
var Layout_default = Layout;
|
|
6321
6788
|
|
|
6322
6789
|
// src/layouts/LayoutSidebar.tsx
|
|
6323
|
-
import
|
|
6324
|
-
import { jsx as
|
|
6790
|
+
import Box37 from "@mui/material/Box";
|
|
6791
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
6325
6792
|
function LayoutSidebar(_a) {
|
|
6326
6793
|
var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
|
|
6327
|
-
return /* @__PURE__ */
|
|
6328
|
-
|
|
6794
|
+
return /* @__PURE__ */ jsx91(
|
|
6795
|
+
Box37,
|
|
6329
6796
|
__spreadProps(__spreadValues({
|
|
6330
6797
|
sx: __spreadValues({
|
|
6331
6798
|
display: "flex",
|
|
@@ -6347,12 +6814,12 @@ LayoutNavbar.displayName = "Layout.Navbar";
|
|
|
6347
6814
|
var LayoutNavbar_default = LayoutNavbar;
|
|
6348
6815
|
|
|
6349
6816
|
// src/layouts/LayoutContent.tsx
|
|
6350
|
-
import
|
|
6351
|
-
import { jsx as
|
|
6817
|
+
import Box38 from "@mui/material/Box";
|
|
6818
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
6352
6819
|
function LayoutContent(_a) {
|
|
6353
6820
|
var _b = _a, { children = null } = _b, rest = __objRest(_b, ["children"]);
|
|
6354
|
-
return /* @__PURE__ */
|
|
6355
|
-
|
|
6821
|
+
return /* @__PURE__ */ jsx92(
|
|
6822
|
+
Box38,
|
|
6356
6823
|
__spreadProps(__spreadValues({
|
|
6357
6824
|
component: "main",
|
|
6358
6825
|
sx: {
|
|
@@ -6370,12 +6837,12 @@ LayoutContent.displayName = "Layout.Content";
|
|
|
6370
6837
|
var LayoutContent_default = LayoutContent;
|
|
6371
6838
|
|
|
6372
6839
|
// src/layouts/LayoutHeader.tsx
|
|
6373
|
-
import
|
|
6374
|
-
import { jsx as
|
|
6840
|
+
import Box39 from "@mui/material/Box";
|
|
6841
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
6375
6842
|
function LayoutHeader(_a) {
|
|
6376
6843
|
var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
|
|
6377
|
-
return /* @__PURE__ */
|
|
6378
|
-
|
|
6844
|
+
return /* @__PURE__ */ jsx93(
|
|
6845
|
+
Box39,
|
|
6379
6846
|
__spreadProps(__spreadValues({
|
|
6380
6847
|
sx: __spreadValues({
|
|
6381
6848
|
display: "flex"
|
|
@@ -6398,45 +6865,45 @@ var Layout2 = Object.assign(Layout_default, {
|
|
|
6398
6865
|
var layouts_default = Layout2;
|
|
6399
6866
|
|
|
6400
6867
|
// src/components/AppShell/AppShellNavbar.tsx
|
|
6401
|
-
import { Fragment as Fragment10, jsx as
|
|
6868
|
+
import { Fragment as Fragment10, jsx as jsx94 } from "react/jsx-runtime";
|
|
6402
6869
|
var AppShellNavbar = ({ children }) => {
|
|
6403
|
-
return /* @__PURE__ */
|
|
6870
|
+
return /* @__PURE__ */ jsx94(Fragment10, { children });
|
|
6404
6871
|
};
|
|
6405
6872
|
AppShellNavbar.displayName = "AppShellNavbar";
|
|
6406
6873
|
|
|
6407
6874
|
// src/components/AppShell/AppShellSidebar.tsx
|
|
6408
|
-
import { Fragment as Fragment11, jsx as
|
|
6875
|
+
import { Fragment as Fragment11, jsx as jsx95 } from "react/jsx-runtime";
|
|
6409
6876
|
var AppShellSidebar = ({ children }) => {
|
|
6410
|
-
return /* @__PURE__ */
|
|
6877
|
+
return /* @__PURE__ */ jsx95(Fragment11, { children });
|
|
6411
6878
|
};
|
|
6412
6879
|
AppShellSidebar.displayName = "AppShellSidebar";
|
|
6413
6880
|
|
|
6414
6881
|
// src/components/AppShell/AppShellMain.tsx
|
|
6415
|
-
import { Fragment as Fragment12, jsx as
|
|
6882
|
+
import { Fragment as Fragment12, jsx as jsx96 } from "react/jsx-runtime";
|
|
6416
6883
|
var AppShellMain = ({ children }) => {
|
|
6417
|
-
return /* @__PURE__ */
|
|
6884
|
+
return /* @__PURE__ */ jsx96(Fragment12, { children });
|
|
6418
6885
|
};
|
|
6419
6886
|
AppShellMain.displayName = "AppShellMain";
|
|
6420
6887
|
|
|
6421
6888
|
// src/components/AppShell/AppShellFooter.tsx
|
|
6422
|
-
import { Fragment as Fragment13, jsx as
|
|
6889
|
+
import { Fragment as Fragment13, jsx as jsx97 } from "react/jsx-runtime";
|
|
6423
6890
|
var AppShellFooter = ({ children }) => {
|
|
6424
|
-
return /* @__PURE__ */
|
|
6891
|
+
return /* @__PURE__ */ jsx97(Fragment13, { children });
|
|
6425
6892
|
};
|
|
6426
6893
|
AppShellFooter.displayName = "AppShellFooter";
|
|
6427
6894
|
|
|
6428
6895
|
// src/components/AppShell/AppShellNotificationPanel.tsx
|
|
6429
|
-
import { Fragment as Fragment14, jsx as
|
|
6896
|
+
import { Fragment as Fragment14, jsx as jsx98 } from "react/jsx-runtime";
|
|
6430
6897
|
var AppShellNotificationPanel = ({ children }) => {
|
|
6431
|
-
return /* @__PURE__ */
|
|
6898
|
+
return /* @__PURE__ */ jsx98(Fragment14, { children });
|
|
6432
6899
|
};
|
|
6433
6900
|
AppShellNotificationPanel.displayName = "AppShellNotificationPanel";
|
|
6434
6901
|
|
|
6435
6902
|
// src/hooks/useAppShell/useAppShell.ts
|
|
6436
|
-
import * as
|
|
6903
|
+
import * as React41 from "react";
|
|
6437
6904
|
import useMediaQuery3 from "@mui/material/useMediaQuery";
|
|
6438
6905
|
var useAppShell = (options) => {
|
|
6439
|
-
const contextValue =
|
|
6906
|
+
const contextValue = React41.useContext(AppShellContext);
|
|
6440
6907
|
const {
|
|
6441
6908
|
initialCollapsed = false,
|
|
6442
6909
|
initialActiveItem = "dashboard",
|
|
@@ -6447,7 +6914,7 @@ var useAppShell = (options) => {
|
|
|
6447
6914
|
} = options || {};
|
|
6448
6915
|
const isMobile = useMediaQuery3((theme) => theme.breakpoints.down("md"));
|
|
6449
6916
|
const isCreateMode = options !== void 0;
|
|
6450
|
-
const [state, setState] =
|
|
6917
|
+
const [state, setState] = React41.useState({
|
|
6451
6918
|
sidebarCollapsed: initialCollapsed,
|
|
6452
6919
|
notificationPanelOpen: false,
|
|
6453
6920
|
activeMenuItem: initialActiveItem,
|
|
@@ -6455,29 +6922,29 @@ var useAppShell = (options) => {
|
|
|
6455
6922
|
sidebarWidth,
|
|
6456
6923
|
sidebarCollapsedWidth
|
|
6457
6924
|
});
|
|
6458
|
-
|
|
6925
|
+
React41.useEffect(() => {
|
|
6459
6926
|
if (isCreateMode && collapseOnMobile && isMobile) {
|
|
6460
6927
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: true }));
|
|
6461
6928
|
}
|
|
6462
6929
|
}, [isCreateMode, collapseOnMobile, isMobile]);
|
|
6463
|
-
const toggleSidebar =
|
|
6930
|
+
const toggleSidebar = React41.useCallback(() => {
|
|
6464
6931
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: !prev.sidebarCollapsed }));
|
|
6465
6932
|
}, []);
|
|
6466
|
-
const setSidebarCollapsed =
|
|
6933
|
+
const setSidebarCollapsed = React41.useCallback((collapsed) => {
|
|
6467
6934
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: collapsed }));
|
|
6468
6935
|
}, []);
|
|
6469
|
-
const collapseSidebar =
|
|
6936
|
+
const collapseSidebar = React41.useCallback(() => {
|
|
6470
6937
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: true }));
|
|
6471
6938
|
}, []);
|
|
6472
|
-
const expandSidebar =
|
|
6939
|
+
const expandSidebar = React41.useCallback(() => {
|
|
6473
6940
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: false }));
|
|
6474
6941
|
}, []);
|
|
6475
|
-
const toggleNotificationPanel =
|
|
6942
|
+
const toggleNotificationPanel = React41.useCallback(() => {
|
|
6476
6943
|
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
6477
6944
|
notificationPanelOpen: !prev.notificationPanelOpen
|
|
6478
6945
|
}));
|
|
6479
6946
|
}, []);
|
|
6480
|
-
const setActiveMenuItem =
|
|
6947
|
+
const setActiveMenuItem = React41.useCallback((id) => {
|
|
6481
6948
|
setState((prev) => {
|
|
6482
6949
|
const newState = __spreadProps(__spreadValues({}, prev), { activeMenuItem: id });
|
|
6483
6950
|
if (collapseOnSelectOnMobile && isMobile && !prev.sidebarCollapsed) {
|
|
@@ -6486,14 +6953,14 @@ var useAppShell = (options) => {
|
|
|
6486
6953
|
return newState;
|
|
6487
6954
|
});
|
|
6488
6955
|
}, [collapseOnSelectOnMobile, isMobile]);
|
|
6489
|
-
const toggleMenu =
|
|
6956
|
+
const toggleMenu = React41.useCallback((id) => {
|
|
6490
6957
|
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
6491
6958
|
expandedMenus: __spreadProps(__spreadValues({}, prev.expandedMenus), {
|
|
6492
6959
|
[id]: !prev.expandedMenus[id]
|
|
6493
6960
|
})
|
|
6494
6961
|
}));
|
|
6495
6962
|
}, []);
|
|
6496
|
-
const actions =
|
|
6963
|
+
const actions = React41.useMemo(
|
|
6497
6964
|
() => ({
|
|
6498
6965
|
toggleSidebar,
|
|
6499
6966
|
setSidebarCollapsed,
|
|
@@ -6513,7 +6980,7 @@ var useAppShell = (options) => {
|
|
|
6513
6980
|
toggleMenu
|
|
6514
6981
|
]
|
|
6515
6982
|
);
|
|
6516
|
-
const createdValue =
|
|
6983
|
+
const createdValue = React41.useMemo(
|
|
6517
6984
|
() => ({
|
|
6518
6985
|
state,
|
|
6519
6986
|
actions
|
|
@@ -6532,7 +6999,7 @@ var useAppShell = (options) => {
|
|
|
6532
6999
|
};
|
|
6533
7000
|
|
|
6534
7001
|
// src/components/AppShell/AppShell.tsx
|
|
6535
|
-
import { jsx as
|
|
7002
|
+
import { jsx as jsx99, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6536
7003
|
var SLOT_DISPLAY_NAMES = {
|
|
6537
7004
|
Navbar: "AppShellNavbar",
|
|
6538
7005
|
Sidebar: "AppShellSidebar",
|
|
@@ -6548,9 +7015,9 @@ var extractSlots = (children) => {
|
|
|
6548
7015
|
footer: null,
|
|
6549
7016
|
notificationPanel: null
|
|
6550
7017
|
};
|
|
6551
|
-
|
|
7018
|
+
React42.Children.forEach(children, (child) => {
|
|
6552
7019
|
var _a;
|
|
6553
|
-
if (
|
|
7020
|
+
if (React42.isValidElement(child)) {
|
|
6554
7021
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
6555
7022
|
const childProps = child.props;
|
|
6556
7023
|
switch (displayName) {
|
|
@@ -6582,12 +7049,12 @@ var AppShell = (_a) => {
|
|
|
6582
7049
|
var _b = _a, { children, sx } = _b, shellOptions = __objRest(_b, ["children", "sx"]);
|
|
6583
7050
|
const shell = useAppShell(shellOptions);
|
|
6584
7051
|
const slots = extractSlots(children);
|
|
6585
|
-
return /* @__PURE__ */
|
|
6586
|
-
slots.navbar && /* @__PURE__ */
|
|
6587
|
-
/* @__PURE__ */
|
|
6588
|
-
slots.sidebar && /* @__PURE__ */
|
|
6589
|
-
/* @__PURE__ */
|
|
6590
|
-
/* @__PURE__ */
|
|
7052
|
+
return /* @__PURE__ */ jsx99(AppShellContext.Provider, { value: shell, children: /* @__PURE__ */ jsxs36(layouts_default, { sx: __spreadValues({ height: "100vh", flexDirection: "column" }, sx), children: [
|
|
7053
|
+
slots.navbar && /* @__PURE__ */ jsx99(layouts_default.Navbar, { children: slots.navbar }),
|
|
7054
|
+
/* @__PURE__ */ jsxs36(layouts_default, { sx: { flex: 1, overflow: "hidden" }, children: [
|
|
7055
|
+
slots.sidebar && /* @__PURE__ */ jsx99(layouts_default.Sidebar, { children: slots.sidebar }),
|
|
7056
|
+
/* @__PURE__ */ jsxs36(layouts_default.Content, { sx: { flex: 1, display: "flex", flexDirection: "column", overflow: "auto" }, children: [
|
|
7057
|
+
/* @__PURE__ */ jsx99(Box40, { sx: { flex: 1, overflow: "auto", display: "flex" }, children: slots.main }),
|
|
6591
7058
|
slots.footer
|
|
6592
7059
|
] })
|
|
6593
7060
|
] }),
|
|
@@ -6603,7 +7070,7 @@ AppShell.displayName = "AppShell";
|
|
|
6603
7070
|
|
|
6604
7071
|
// src/components/ListingTable/ListingTable/ListingTable.tsx
|
|
6605
7072
|
import MuiTable from "@mui/material/Table";
|
|
6606
|
-
import { styled as
|
|
7073
|
+
import { styled as styled73 } from "@mui/material/styles";
|
|
6607
7074
|
|
|
6608
7075
|
// src/components/ListingTable/shared/types.ts
|
|
6609
7076
|
var densityStyles = {
|
|
@@ -6615,7 +7082,7 @@ var densityStyles = {
|
|
|
6615
7082
|
// src/components/ListingTable/ListingTable/ListingTableContainer.tsx
|
|
6616
7083
|
import MuiTableContainer from "@mui/material/TableContainer";
|
|
6617
7084
|
import Paper from "@mui/material/Paper";
|
|
6618
|
-
import { jsx as
|
|
7085
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
6619
7086
|
function ListingTableContainer(_a) {
|
|
6620
7087
|
var _b = _a, {
|
|
6621
7088
|
elevation = 1,
|
|
@@ -6627,17 +7094,17 @@ function ListingTableContainer(_a) {
|
|
|
6627
7094
|
"children"
|
|
6628
7095
|
]);
|
|
6629
7096
|
if (disablePaper) {
|
|
6630
|
-
return /* @__PURE__ */
|
|
7097
|
+
return /* @__PURE__ */ jsx100(MuiTableContainer, __spreadProps(__spreadValues({ sx: __spreadValues({ width: "100%" }, props.sx) }, props), { children }));
|
|
6631
7098
|
}
|
|
6632
|
-
return /* @__PURE__ */
|
|
7099
|
+
return /* @__PURE__ */ jsx100(MuiTableContainer, __spreadProps(__spreadValues({ component: Paper, elevation, sx: __spreadValues({ width: "100%" }, props.sx) }, props), { children }));
|
|
6633
7100
|
}
|
|
6634
7101
|
var ListingTableContainer_default = ListingTableContainer;
|
|
6635
7102
|
|
|
6636
7103
|
// src/components/ListingTable/ListingTable/ListingTableHead.tsx
|
|
6637
7104
|
import MuiTableHead from "@mui/material/TableHead";
|
|
6638
|
-
import { styled as
|
|
6639
|
-
import { jsx as
|
|
6640
|
-
var StyledTableHead =
|
|
7105
|
+
import { styled as styled68 } from "@mui/material/styles";
|
|
7106
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
7107
|
+
var StyledTableHead = styled68(MuiTableHead)(({ theme }) => ({
|
|
6641
7108
|
"& .MuiTableCell-head": __spreadValues(__spreadValues({
|
|
6642
7109
|
fontWeight: 600
|
|
6643
7110
|
}, theme.applyStyles("light", {
|
|
@@ -6648,33 +7115,33 @@ var StyledTableHead = styled63(MuiTableHead)(({ theme }) => ({
|
|
|
6648
7115
|
}));
|
|
6649
7116
|
function ListingTableHead(_a) {
|
|
6650
7117
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
6651
|
-
return /* @__PURE__ */
|
|
7118
|
+
return /* @__PURE__ */ jsx101(StyledTableHead, __spreadProps(__spreadValues({}, props), { children }));
|
|
6652
7119
|
}
|
|
6653
7120
|
var ListingTableHead_default = ListingTableHead;
|
|
6654
7121
|
|
|
6655
7122
|
// src/components/ListingTable/ListingTable/ListingTableBody.tsx
|
|
6656
7123
|
import MuiTableBody from "@mui/material/TableBody";
|
|
6657
|
-
import { jsx as
|
|
7124
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
6658
7125
|
function ListingTableBody(_a) {
|
|
6659
7126
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
6660
|
-
return /* @__PURE__ */
|
|
7127
|
+
return /* @__PURE__ */ jsx102(MuiTableBody, __spreadProps(__spreadValues({}, props), { children }));
|
|
6661
7128
|
}
|
|
6662
7129
|
var ListingTableBody_default = ListingTableBody;
|
|
6663
7130
|
|
|
6664
7131
|
// src/components/ListingTable/ListingTable/ListingTableFooter.tsx
|
|
6665
7132
|
import MuiTableFooter from "@mui/material/TableFooter";
|
|
6666
|
-
import { jsx as
|
|
7133
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
6667
7134
|
function ListingTableFooter(_a) {
|
|
6668
7135
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
6669
|
-
return /* @__PURE__ */
|
|
7136
|
+
return /* @__PURE__ */ jsx103(MuiTableFooter, __spreadProps(__spreadValues({}, props), { children }));
|
|
6670
7137
|
}
|
|
6671
7138
|
var ListingTableFooter_default = ListingTableFooter;
|
|
6672
7139
|
|
|
6673
7140
|
// src/components/ListingTable/ListingTable/ListingTableRow.tsx
|
|
6674
7141
|
import MuiTableRow from "@mui/material/TableRow";
|
|
6675
|
-
import { styled as
|
|
6676
|
-
import { jsx as
|
|
6677
|
-
var StyledTableRow =
|
|
7142
|
+
import { styled as styled69, alpha as alpha2 } from "@mui/material/styles";
|
|
7143
|
+
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
7144
|
+
var StyledTableRow = styled69(MuiTableRow, {
|
|
6678
7145
|
shouldForwardProp: (prop) => !["clickable", "variant"].includes(prop)
|
|
6679
7146
|
})(({ theme: muiTheme, clickable, variant = "table" }) => {
|
|
6680
7147
|
const theme = muiTheme;
|
|
@@ -6684,7 +7151,7 @@ var StyledTableRow = styled64(MuiTableRow, {
|
|
|
6684
7151
|
cursor: "pointer"
|
|
6685
7152
|
}), variant === "card" && (() => {
|
|
6686
7153
|
var _a, _b, _c, _d;
|
|
6687
|
-
const borderColor =
|
|
7154
|
+
const borderColor = alpha2(
|
|
6688
7155
|
isDarkMode ? theme.palette.common.white : theme.palette.common.black,
|
|
6689
7156
|
isDarkMode ? 0.3 : 0.12
|
|
6690
7157
|
);
|
|
@@ -6732,15 +7199,15 @@ function ListingTableRow(_a) {
|
|
|
6732
7199
|
"variant",
|
|
6733
7200
|
"children"
|
|
6734
7201
|
]);
|
|
6735
|
-
return /* @__PURE__ */
|
|
7202
|
+
return /* @__PURE__ */ jsx104(StyledTableRow, __spreadProps(__spreadValues({ clickable, variant }, props), { children }));
|
|
6736
7203
|
}
|
|
6737
7204
|
var ListingTableRow_default = ListingTableRow;
|
|
6738
7205
|
|
|
6739
7206
|
// src/components/ListingTable/ListingTable/ListingTableCell.tsx
|
|
6740
7207
|
import MuiTableCell from "@mui/material/TableCell";
|
|
6741
|
-
import { styled as
|
|
6742
|
-
import { jsx as
|
|
6743
|
-
var StyledTableCell =
|
|
7208
|
+
import { styled as styled70 } from "@mui/material/styles";
|
|
7209
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
7210
|
+
var StyledTableCell = styled70(MuiTableCell, {
|
|
6744
7211
|
shouldForwardProp: (prop) => {
|
|
6745
7212
|
const excludedProps = ["truncate", "maxWidth"];
|
|
6746
7213
|
return !excludedProps.some((excluded) => excluded === prop);
|
|
@@ -6762,24 +7229,24 @@ function ListingTableCell(_a) {
|
|
|
6762
7229
|
"maxWidth",
|
|
6763
7230
|
"children"
|
|
6764
7231
|
]);
|
|
6765
|
-
return /* @__PURE__ */
|
|
7232
|
+
return /* @__PURE__ */ jsx105(StyledTableCell, __spreadProps(__spreadValues({ truncate, maxWidth }, props), { children }));
|
|
6766
7233
|
}
|
|
6767
7234
|
var ListingTableCell_default = ListingTableCell;
|
|
6768
7235
|
|
|
6769
7236
|
// src/components/ListingTable/ListingTable/ListingTableDataGrid.tsx
|
|
6770
|
-
import { useCallback as
|
|
7237
|
+
import { useCallback as useCallback5 } from "react";
|
|
6771
7238
|
import { DataGrid } from "@mui/x-data-grid";
|
|
6772
|
-
import { styled as
|
|
7239
|
+
import { styled as styled71, alpha as alpha3 } from "@mui/material/styles";
|
|
6773
7240
|
|
|
6774
7241
|
// src/components/ListingTable/context.ts
|
|
6775
|
-
import * as
|
|
6776
|
-
var ListingTableContext =
|
|
7242
|
+
import * as React43 from "react";
|
|
7243
|
+
var ListingTableContext = React43.createContext(null);
|
|
6777
7244
|
ListingTableContext.displayName = "ListingTableContext";
|
|
6778
7245
|
var useListingTable = () => {
|
|
6779
|
-
return
|
|
7246
|
+
return React43.useContext(ListingTableContext);
|
|
6780
7247
|
};
|
|
6781
7248
|
var useListingTableRequired = () => {
|
|
6782
|
-
const context =
|
|
7249
|
+
const context = React43.useContext(ListingTableContext);
|
|
6783
7250
|
if (!context) {
|
|
6784
7251
|
throw new Error(
|
|
6785
7252
|
"useListingTableRequired must be used within a ListingTable.Provider. Use useListingTable() for optional context access."
|
|
@@ -6789,8 +7256,8 @@ var useListingTableRequired = () => {
|
|
|
6789
7256
|
};
|
|
6790
7257
|
|
|
6791
7258
|
// src/components/ListingTable/ListingTable/ListingTableDataGrid.tsx
|
|
6792
|
-
import { jsx as
|
|
6793
|
-
var StyledDataGrid =
|
|
7259
|
+
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
7260
|
+
var StyledDataGrid = styled71(DataGrid)(({ theme }) => ({
|
|
6794
7261
|
// Remove outer border for seamless integration within ListingTable.Container
|
|
6795
7262
|
border: "none",
|
|
6796
7263
|
// Ensure the grid fills its container
|
|
@@ -6821,7 +7288,7 @@ var StyledDataGrid = styled66(DataGrid)(({ theme }) => ({
|
|
|
6821
7288
|
"& .MuiDataGrid-row.Mui-selected": {
|
|
6822
7289
|
backgroundColor: theme.palette.action.selected,
|
|
6823
7290
|
"&:hover": {
|
|
6824
|
-
backgroundColor:
|
|
7291
|
+
backgroundColor: alpha3(
|
|
6825
7292
|
theme.palette.primary.main,
|
|
6826
7293
|
theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity
|
|
6827
7294
|
)
|
|
@@ -6870,7 +7337,7 @@ function ListingTableDataGrid(_a) {
|
|
|
6870
7337
|
items: [],
|
|
6871
7338
|
quickFilterValues: searchValue ? [searchValue] : []
|
|
6872
7339
|
};
|
|
6873
|
-
const defaultCardRowSpacing =
|
|
7340
|
+
const defaultCardRowSpacing = useCallback5(
|
|
6874
7341
|
(params) => ({ top: params.isFirstVisible ? 0 : 12, bottom: 0 }),
|
|
6875
7342
|
[]
|
|
6876
7343
|
);
|
|
@@ -6916,7 +7383,7 @@ function ListingTableDataGrid(_a) {
|
|
|
6916
7383
|
border: "none",
|
|
6917
7384
|
backgroundColor: (muiTheme.vars || muiTheme).palette.action.selected,
|
|
6918
7385
|
"&:hover": {
|
|
6919
|
-
backgroundColor:
|
|
7386
|
+
backgroundColor: alpha3(
|
|
6920
7387
|
muiTheme.palette.primary.main,
|
|
6921
7388
|
muiTheme.palette.action.selectedOpacity + muiTheme.palette.action.hoverOpacity
|
|
6922
7389
|
)
|
|
@@ -6947,7 +7414,7 @@ function ListingTableDataGrid(_a) {
|
|
|
6947
7414
|
"& .MuiDataGrid-cell": { padding: cellPadding }
|
|
6948
7415
|
};
|
|
6949
7416
|
const mergedSx = variant === "card" ? [cardSx, densitySx, ...Array.isArray(sx) ? sx : [sx]] : [densitySx, ...Array.isArray(sx) ? sx : [sx]];
|
|
6950
|
-
return /* @__PURE__ */
|
|
7417
|
+
return /* @__PURE__ */ jsx106(
|
|
6951
7418
|
StyledDataGrid,
|
|
6952
7419
|
__spreadValues({
|
|
6953
7420
|
density,
|
|
@@ -6962,13 +7429,13 @@ function ListingTableDataGrid(_a) {
|
|
|
6962
7429
|
var ListingTableDataGrid_default = ListingTableDataGrid;
|
|
6963
7430
|
|
|
6964
7431
|
// src/components/ListingTable/shared/ListingTableToolbar.tsx
|
|
6965
|
-
import { useState as
|
|
6966
|
-
import
|
|
7432
|
+
import { useState as useState10, useCallback as useCallback6 } from "react";
|
|
7433
|
+
import Box41 from "@mui/material/Box";
|
|
6967
7434
|
import TextField3 from "@mui/material/TextField";
|
|
6968
7435
|
import InputAdornment3 from "@mui/material/InputAdornment";
|
|
6969
|
-
import
|
|
7436
|
+
import IconButton8 from "@mui/material/IconButton";
|
|
6970
7437
|
import { Search as Search2, X as X4 } from "@wso2/oxygen-ui-icons-react";
|
|
6971
|
-
import { Fragment as Fragment15, jsx as
|
|
7438
|
+
import { Fragment as Fragment15, jsx as jsx107, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6972
7439
|
function ListingTableToolbar({
|
|
6973
7440
|
showSearch = false,
|
|
6974
7441
|
searchSlot,
|
|
@@ -6982,13 +7449,13 @@ function ListingTableToolbar({
|
|
|
6982
7449
|
sx
|
|
6983
7450
|
}) {
|
|
6984
7451
|
const tableContext = useListingTable();
|
|
6985
|
-
const [internalSearchValue, setInternalSearchValue] =
|
|
7452
|
+
const [internalSearchValue, setInternalSearchValue] = useState10("");
|
|
6986
7453
|
const isControlledByProp = controlledSearchValue !== void 0;
|
|
6987
7454
|
const isControlledByContext = !isControlledByProp && (tableContext == null ? void 0 : tableContext.searchValue) !== void 0;
|
|
6988
7455
|
const isControlled = isControlledByProp || isControlledByContext;
|
|
6989
7456
|
const searchValue = isControlledByProp ? controlledSearchValue : isControlledByContext ? tableContext.searchValue : internalSearchValue;
|
|
6990
7457
|
const effectiveOnSearchChange = onSearchChange != null ? onSearchChange : tableContext == null ? void 0 : tableContext.onSearchChange;
|
|
6991
|
-
const handleSearchChange =
|
|
7458
|
+
const handleSearchChange = useCallback6(
|
|
6992
7459
|
(event) => {
|
|
6993
7460
|
const newValue = event.target.value;
|
|
6994
7461
|
if (!isControlled) {
|
|
@@ -6998,7 +7465,7 @@ function ListingTableToolbar({
|
|
|
6998
7465
|
},
|
|
6999
7466
|
[isControlled, effectiveOnSearchChange]
|
|
7000
7467
|
);
|
|
7001
|
-
const handleClearSearch =
|
|
7468
|
+
const handleClearSearch = useCallback6(() => {
|
|
7002
7469
|
if (!isControlled) {
|
|
7003
7470
|
setInternalSearchValue("");
|
|
7004
7471
|
}
|
|
@@ -7009,7 +7476,7 @@ function ListingTableToolbar({
|
|
|
7009
7476
|
return searchSlot;
|
|
7010
7477
|
}
|
|
7011
7478
|
if (showSearch) {
|
|
7012
|
-
return /* @__PURE__ */
|
|
7479
|
+
return /* @__PURE__ */ jsx107(
|
|
7013
7480
|
TextField3,
|
|
7014
7481
|
{
|
|
7015
7482
|
size: "small",
|
|
@@ -7025,8 +7492,8 @@ function ListingTableToolbar({
|
|
|
7025
7492
|
"aria-label": searchPlaceholder || "Search"
|
|
7026
7493
|
},
|
|
7027
7494
|
input: {
|
|
7028
|
-
startAdornment: /* @__PURE__ */
|
|
7029
|
-
endAdornment: searchValue ? /* @__PURE__ */
|
|
7495
|
+
startAdornment: /* @__PURE__ */ jsx107(InputAdornment3, { position: "start", children: /* @__PURE__ */ jsx107(Search2, { size: 18, "aria-hidden": "true" }) }),
|
|
7496
|
+
endAdornment: searchValue ? /* @__PURE__ */ jsx107(InputAdornment3, { position: "end", children: /* @__PURE__ */ jsx107(IconButton8, { size: "small", onClick: handleClearSearch, edge: "end", "aria-label": "Clear search", children: /* @__PURE__ */ jsx107(X4, { size: 16, "aria-hidden": "true" }) }) }) : null
|
|
7030
7497
|
}
|
|
7031
7498
|
}
|
|
7032
7499
|
}
|
|
@@ -7034,8 +7501,8 @@ function ListingTableToolbar({
|
|
|
7034
7501
|
}
|
|
7035
7502
|
return null;
|
|
7036
7503
|
};
|
|
7037
|
-
return /* @__PURE__ */
|
|
7038
|
-
|
|
7504
|
+
return /* @__PURE__ */ jsxs37(
|
|
7505
|
+
Box41,
|
|
7039
7506
|
{
|
|
7040
7507
|
role: "toolbar",
|
|
7041
7508
|
"aria-label": "Table toolbar",
|
|
@@ -7050,9 +7517,9 @@ function ListingTableToolbar({
|
|
|
7050
7517
|
children: [
|
|
7051
7518
|
renderSearch(),
|
|
7052
7519
|
children,
|
|
7053
|
-
actions && /* @__PURE__ */
|
|
7054
|
-
/* @__PURE__ */
|
|
7055
|
-
/* @__PURE__ */
|
|
7520
|
+
actions && /* @__PURE__ */ jsxs37(Fragment15, { children: [
|
|
7521
|
+
/* @__PURE__ */ jsx107(Box41, { sx: { flex: 1 } }),
|
|
7522
|
+
/* @__PURE__ */ jsx107(Box41, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: actions })
|
|
7056
7523
|
] })
|
|
7057
7524
|
]
|
|
7058
7525
|
}
|
|
@@ -7061,9 +7528,9 @@ function ListingTableToolbar({
|
|
|
7061
7528
|
var ListingTableToolbar_default = ListingTableToolbar;
|
|
7062
7529
|
|
|
7063
7530
|
// src/components/ListingTable/shared/ListingTableEmptyState.tsx
|
|
7064
|
-
import
|
|
7065
|
-
import
|
|
7066
|
-
import { jsx as
|
|
7531
|
+
import Box42 from "@mui/material/Box";
|
|
7532
|
+
import Typography22 from "@mui/material/Typography";
|
|
7533
|
+
import { jsx as jsx108, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
7067
7534
|
function ListingTableEmptyState({
|
|
7068
7535
|
title = "No data available",
|
|
7069
7536
|
description,
|
|
@@ -7072,8 +7539,8 @@ function ListingTableEmptyState({
|
|
|
7072
7539
|
minHeight = 300,
|
|
7073
7540
|
sx
|
|
7074
7541
|
}) {
|
|
7075
|
-
return /* @__PURE__ */
|
|
7076
|
-
|
|
7542
|
+
return /* @__PURE__ */ jsxs38(
|
|
7543
|
+
Box42,
|
|
7077
7544
|
{
|
|
7078
7545
|
sx: __spreadValues({
|
|
7079
7546
|
display: "flex",
|
|
@@ -7085,8 +7552,8 @@ function ListingTableEmptyState({
|
|
|
7085
7552
|
textAlign: "center"
|
|
7086
7553
|
}, sx),
|
|
7087
7554
|
children: [
|
|
7088
|
-
illustration && /* @__PURE__ */
|
|
7089
|
-
|
|
7555
|
+
illustration && /* @__PURE__ */ jsx108(
|
|
7556
|
+
Box42,
|
|
7090
7557
|
{
|
|
7091
7558
|
sx: {
|
|
7092
7559
|
mb: 2,
|
|
@@ -7099,9 +7566,9 @@ function ListingTableEmptyState({
|
|
|
7099
7566
|
children: illustration
|
|
7100
7567
|
}
|
|
7101
7568
|
),
|
|
7102
|
-
/* @__PURE__ */
|
|
7103
|
-
description && /* @__PURE__ */
|
|
7104
|
-
action && /* @__PURE__ */
|
|
7569
|
+
/* @__PURE__ */ jsx108(Typography22, { variant: "h6", component: "div", sx: { mb: description ? 1 : 0, fontWeight: 500 }, children: title }),
|
|
7570
|
+
description && /* @__PURE__ */ jsx108(Typography22, { variant: "body2", color: "text.secondary", sx: { mb: action ? 2 : 0, maxWidth: 400 }, children: description }),
|
|
7571
|
+
action && /* @__PURE__ */ jsx108(Box42, { children: action })
|
|
7105
7572
|
]
|
|
7106
7573
|
}
|
|
7107
7574
|
);
|
|
@@ -7109,16 +7576,16 @@ function ListingTableEmptyState({
|
|
|
7109
7576
|
var ListingTableEmptyState_default = ListingTableEmptyState;
|
|
7110
7577
|
|
|
7111
7578
|
// src/components/ListingTable/shared/ListingTableDensityControl.tsx
|
|
7112
|
-
import { useCallback as
|
|
7579
|
+
import { useCallback as useCallback7 } from "react";
|
|
7113
7580
|
import ToggleButton from "@mui/material/ToggleButton";
|
|
7114
7581
|
import ToggleButtonGroup from "@mui/material/ToggleButtonGroup";
|
|
7115
|
-
import
|
|
7582
|
+
import Tooltip8 from "@mui/material/Tooltip";
|
|
7116
7583
|
import { AlignJustify, Menu as Menu4, List as List4 } from "@wso2/oxygen-ui-icons-react";
|
|
7117
|
-
import { jsx as
|
|
7584
|
+
import { jsx as jsx109 } from "react/jsx-runtime";
|
|
7118
7585
|
var densityOptions = [
|
|
7119
|
-
{ value: "compact", label: "Compact", icon: /* @__PURE__ */
|
|
7120
|
-
{ value: "standard", label: "Standard", icon: /* @__PURE__ */
|
|
7121
|
-
{ value: "comfortable", label: "Comfortable", icon: /* @__PURE__ */
|
|
7586
|
+
{ value: "compact", label: "Compact", icon: /* @__PURE__ */ jsx109(AlignJustify, { size: 18 }) },
|
|
7587
|
+
{ value: "standard", label: "Standard", icon: /* @__PURE__ */ jsx109(Menu4, { size: 18 }) },
|
|
7588
|
+
{ value: "comfortable", label: "Comfortable", icon: /* @__PURE__ */ jsx109(List4, { size: 18 }) }
|
|
7122
7589
|
];
|
|
7123
7590
|
function ListingTableDensityControl({
|
|
7124
7591
|
value: valueProp,
|
|
@@ -7130,7 +7597,7 @@ function ListingTableDensityControl({
|
|
|
7130
7597
|
const tableContext = useListingTable();
|
|
7131
7598
|
const value = (_a = valueProp != null ? valueProp : tableContext == null ? void 0 : tableContext.density) != null ? _a : "standard";
|
|
7132
7599
|
const effectiveOnChange = onChangeProp != null ? onChangeProp : tableContext == null ? void 0 : tableContext.onDensityChange;
|
|
7133
|
-
const handleChange =
|
|
7600
|
+
const handleChange = useCallback7(
|
|
7134
7601
|
(_event, newDensity) => {
|
|
7135
7602
|
if (newDensity !== null) {
|
|
7136
7603
|
effectiveOnChange == null ? void 0 : effectiveOnChange(newDensity);
|
|
@@ -7138,7 +7605,7 @@ function ListingTableDensityControl({
|
|
|
7138
7605
|
},
|
|
7139
7606
|
[effectiveOnChange]
|
|
7140
7607
|
);
|
|
7141
|
-
return /* @__PURE__ */
|
|
7608
|
+
return /* @__PURE__ */ jsx109(
|
|
7142
7609
|
ToggleButtonGroup,
|
|
7143
7610
|
{
|
|
7144
7611
|
value,
|
|
@@ -7147,18 +7614,18 @@ function ListingTableDensityControl({
|
|
|
7147
7614
|
size,
|
|
7148
7615
|
sx,
|
|
7149
7616
|
"aria-label": "Table density",
|
|
7150
|
-
children: densityOptions.map((option) => /* @__PURE__ */
|
|
7617
|
+
children: densityOptions.map((option) => /* @__PURE__ */ jsx109(ToggleButton, { value: option.value, "aria-label": option.label, children: /* @__PURE__ */ jsx109(Tooltip8, { title: option.label, children: /* @__PURE__ */ jsx109("span", { style: { display: "flex", alignItems: "center" }, "aria-hidden": "true", children: option.icon }) }) }, option.value))
|
|
7151
7618
|
}
|
|
7152
7619
|
);
|
|
7153
7620
|
}
|
|
7154
7621
|
var ListingTableDensityControl_default = ListingTableDensityControl;
|
|
7155
7622
|
|
|
7156
7623
|
// src/components/ListingTable/shared/ListingTableSortLabel.tsx
|
|
7157
|
-
import { useCallback as
|
|
7624
|
+
import { useCallback as useCallback8 } from "react";
|
|
7158
7625
|
import MuiTableSortLabel from "@mui/material/TableSortLabel";
|
|
7159
|
-
import { styled as
|
|
7160
|
-
import { jsx as
|
|
7161
|
-
var StyledTableSortLabel =
|
|
7626
|
+
import { styled as styled72 } from "@mui/material/styles";
|
|
7627
|
+
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
7628
|
+
var StyledTableSortLabel = styled72(MuiTableSortLabel)(({ theme }) => ({
|
|
7162
7629
|
color: "inherit !important",
|
|
7163
7630
|
"&.Mui-active": {
|
|
7164
7631
|
color: "inherit !important",
|
|
@@ -7188,7 +7655,7 @@ function ListingTableSortLabel(_a) {
|
|
|
7188
7655
|
const isActiveFromContext = field !== void 0 && (tableContext == null ? void 0 : tableContext.sortField) === field;
|
|
7189
7656
|
const active = activeProp != null ? activeProp : isActiveFromContext;
|
|
7190
7657
|
const direction = (_a2 = directionProp != null ? directionProp : isActiveFromContext ? tableContext == null ? void 0 : tableContext.sortDirection : void 0) != null ? _a2 : "asc";
|
|
7191
|
-
const handleClick =
|
|
7658
|
+
const handleClick = useCallback8(
|
|
7192
7659
|
(event) => {
|
|
7193
7660
|
if (onClickProp) {
|
|
7194
7661
|
onClickProp(event);
|
|
@@ -7201,13 +7668,13 @@ function ListingTableSortLabel(_a) {
|
|
|
7201
7668
|
},
|
|
7202
7669
|
[onClickProp, field, tableContext, active, direction]
|
|
7203
7670
|
);
|
|
7204
|
-
return /* @__PURE__ */
|
|
7671
|
+
return /* @__PURE__ */ jsx110(StyledTableSortLabel, __spreadProps(__spreadValues({ active, direction, onClick: handleClick, hideSortIcon }, props), { children }));
|
|
7205
7672
|
}
|
|
7206
7673
|
var ListingTableSortLabel_default = ListingTableSortLabel;
|
|
7207
7674
|
|
|
7208
7675
|
// src/components/ListingTable/shared/ListingTableRowActions.tsx
|
|
7209
|
-
import
|
|
7210
|
-
import { jsx as
|
|
7676
|
+
import Box43 from "@mui/material/Box";
|
|
7677
|
+
import { jsx as jsx111 } from "react/jsx-runtime";
|
|
7211
7678
|
var alignmentMap = {
|
|
7212
7679
|
left: "flex-start",
|
|
7213
7680
|
center: "center",
|
|
@@ -7219,8 +7686,8 @@ function ListingTableRowActions({
|
|
|
7219
7686
|
align = "right",
|
|
7220
7687
|
sx
|
|
7221
7688
|
}) {
|
|
7222
|
-
return /* @__PURE__ */
|
|
7223
|
-
|
|
7689
|
+
return /* @__PURE__ */ jsx111(
|
|
7690
|
+
Box43,
|
|
7224
7691
|
{
|
|
7225
7692
|
className: "table-row-actions",
|
|
7226
7693
|
sx: __spreadValues(__spreadValues({
|
|
@@ -7243,9 +7710,9 @@ function ListingTableRowActions({
|
|
|
7243
7710
|
var ListingTableRowActions_default = ListingTableRowActions;
|
|
7244
7711
|
|
|
7245
7712
|
// src/components/ListingTable/shared/ListingTableCellIcon.tsx
|
|
7246
|
-
import
|
|
7247
|
-
import
|
|
7248
|
-
import { Fragment as Fragment16, jsx as
|
|
7713
|
+
import Box44 from "@mui/material/Box";
|
|
7714
|
+
import Typography23 from "@mui/material/Typography";
|
|
7715
|
+
import { Fragment as Fragment16, jsx as jsx112, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
7249
7716
|
function ListingTableCellIcon({
|
|
7250
7717
|
icon,
|
|
7251
7718
|
primary,
|
|
@@ -7254,8 +7721,8 @@ function ListingTableCellIcon({
|
|
|
7254
7721
|
iconSx,
|
|
7255
7722
|
sx
|
|
7256
7723
|
}) {
|
|
7257
|
-
const iconElement = /* @__PURE__ */
|
|
7258
|
-
|
|
7724
|
+
const iconElement = /* @__PURE__ */ jsx112(
|
|
7725
|
+
Box44,
|
|
7259
7726
|
{
|
|
7260
7727
|
sx: __spreadValues({
|
|
7261
7728
|
display: "flex",
|
|
@@ -7267,9 +7734,9 @@ function ListingTableCellIcon({
|
|
|
7267
7734
|
children: icon
|
|
7268
7735
|
}
|
|
7269
7736
|
);
|
|
7270
|
-
const textContent = /* @__PURE__ */
|
|
7271
|
-
/* @__PURE__ */
|
|
7272
|
-
|
|
7737
|
+
const textContent = /* @__PURE__ */ jsxs39(Box44, { sx: { minWidth: 0, flex: 1 }, children: [
|
|
7738
|
+
/* @__PURE__ */ jsx112(
|
|
7739
|
+
Typography23,
|
|
7273
7740
|
{
|
|
7274
7741
|
variant: "body2",
|
|
7275
7742
|
component: "div",
|
|
@@ -7282,8 +7749,8 @@ function ListingTableCellIcon({
|
|
|
7282
7749
|
children: primary
|
|
7283
7750
|
}
|
|
7284
7751
|
),
|
|
7285
|
-
secondary && /* @__PURE__ */
|
|
7286
|
-
|
|
7752
|
+
secondary && /* @__PURE__ */ jsx112(
|
|
7753
|
+
Typography23,
|
|
7287
7754
|
{
|
|
7288
7755
|
variant: "caption",
|
|
7289
7756
|
component: "div",
|
|
@@ -7297,8 +7764,8 @@ function ListingTableCellIcon({
|
|
|
7297
7764
|
}
|
|
7298
7765
|
)
|
|
7299
7766
|
] });
|
|
7300
|
-
return /* @__PURE__ */
|
|
7301
|
-
|
|
7767
|
+
return /* @__PURE__ */ jsx112(
|
|
7768
|
+
Box44,
|
|
7302
7769
|
{
|
|
7303
7770
|
sx: __spreadValues({
|
|
7304
7771
|
display: "flex",
|
|
@@ -7306,10 +7773,10 @@ function ListingTableCellIcon({
|
|
|
7306
7773
|
gap: 1.5,
|
|
7307
7774
|
minWidth: 0
|
|
7308
7775
|
}, sx),
|
|
7309
|
-
children: iconPosition === "left" ? /* @__PURE__ */
|
|
7776
|
+
children: iconPosition === "left" ? /* @__PURE__ */ jsxs39(Fragment16, { children: [
|
|
7310
7777
|
iconElement,
|
|
7311
7778
|
textContent
|
|
7312
|
-
] }) : /* @__PURE__ */
|
|
7779
|
+
] }) : /* @__PURE__ */ jsxs39(Fragment16, { children: [
|
|
7313
7780
|
textContent,
|
|
7314
7781
|
iconElement
|
|
7315
7782
|
] })
|
|
@@ -7319,8 +7786,8 @@ function ListingTableCellIcon({
|
|
|
7319
7786
|
var ListingTableCellIcon_default = ListingTableCellIcon;
|
|
7320
7787
|
|
|
7321
7788
|
// src/components/ListingTable/ListingTableProvider.tsx
|
|
7322
|
-
import { useMemo as
|
|
7323
|
-
import { jsx as
|
|
7789
|
+
import { useMemo as useMemo9 } from "react";
|
|
7790
|
+
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
7324
7791
|
function ListingTableProvider({
|
|
7325
7792
|
children,
|
|
7326
7793
|
// Search
|
|
@@ -7358,7 +7825,7 @@ function ListingTableProvider({
|
|
|
7358
7825
|
// Loading
|
|
7359
7826
|
loading
|
|
7360
7827
|
}) {
|
|
7361
|
-
const contextValue =
|
|
7828
|
+
const contextValue = useMemo9(
|
|
7362
7829
|
() => ({
|
|
7363
7830
|
// Search
|
|
7364
7831
|
searchValue,
|
|
@@ -7423,12 +7890,12 @@ function ListingTableProvider({
|
|
|
7423
7890
|
loading
|
|
7424
7891
|
]
|
|
7425
7892
|
);
|
|
7426
|
-
return /* @__PURE__ */
|
|
7893
|
+
return /* @__PURE__ */ jsx113(ListingTableContext.Provider, { value: contextValue, children });
|
|
7427
7894
|
}
|
|
7428
7895
|
|
|
7429
7896
|
// src/components/ListingTable/ListingTable/ListingTable.tsx
|
|
7430
|
-
import { jsx as
|
|
7431
|
-
var StyledTable =
|
|
7897
|
+
import { jsx as jsx114 } from "react/jsx-runtime";
|
|
7898
|
+
var StyledTable = styled73(MuiTable, {
|
|
7432
7899
|
shouldForwardProp: (prop) => {
|
|
7433
7900
|
const excludedProps = ["variant", "density", "striped", "bordered"];
|
|
7434
7901
|
return !excludedProps.some((excluded) => excluded === prop);
|
|
@@ -7481,7 +7948,7 @@ function ListingTable(_a) {
|
|
|
7481
7948
|
"children",
|
|
7482
7949
|
"sx"
|
|
7483
7950
|
]);
|
|
7484
|
-
return /* @__PURE__ */
|
|
7951
|
+
return /* @__PURE__ */ jsx114(
|
|
7485
7952
|
StyledTable,
|
|
7486
7953
|
__spreadProps(__spreadValues({
|
|
7487
7954
|
variant,
|
|
@@ -7513,9 +7980,9 @@ var ListingTableCompound = Object.assign(ListingTable, {
|
|
|
7513
7980
|
var ListingTable_default = ListingTableCompound;
|
|
7514
7981
|
|
|
7515
7982
|
// src/animations/ParticleBackground/ParticleBackground.tsx
|
|
7516
|
-
import { useEffect as useEffect7, useRef as
|
|
7983
|
+
import { useEffect as useEffect7, useRef as useRef4 } from "react";
|
|
7517
7984
|
import { useColorScheme as useColorScheme4 } from "@mui/material/styles";
|
|
7518
|
-
import { jsx as
|
|
7985
|
+
import { jsx as jsx115 } from "react/jsx-runtime";
|
|
7519
7986
|
var ParticleBackground = ({
|
|
7520
7987
|
opacity = 0.5,
|
|
7521
7988
|
baseDensity = 0.12,
|
|
@@ -7527,7 +7994,7 @@ var ParticleBackground = ({
|
|
|
7527
7994
|
repelStrength = 0.35,
|
|
7528
7995
|
clickBurst = 120
|
|
7529
7996
|
}) => {
|
|
7530
|
-
const canvasRef =
|
|
7997
|
+
const canvasRef = useRef4(null);
|
|
7531
7998
|
const { mode } = useColorScheme4();
|
|
7532
7999
|
useEffect7(() => {
|
|
7533
8000
|
const canvas = canvasRef.current;
|
|
@@ -7668,8 +8135,8 @@ var ParticleBackground = ({
|
|
|
7668
8135
|
const dy = a.y - b.y;
|
|
7669
8136
|
const dist = Math.hypot(dx, dy);
|
|
7670
8137
|
if (dist < linkDist * DPR) {
|
|
7671
|
-
const
|
|
7672
|
-
context.globalAlpha =
|
|
8138
|
+
const alpha4 = linkAlpha * (1 - dist / (linkDist * DPR));
|
|
8139
|
+
context.globalAlpha = alpha4;
|
|
7673
8140
|
context.beginPath();
|
|
7674
8141
|
context.moveTo(a.x, a.y);
|
|
7675
8142
|
context.lineTo(b.x, b.y);
|
|
@@ -7726,7 +8193,7 @@ var ParticleBackground = ({
|
|
|
7726
8193
|
cancelAnimationFrame(animationFrameId);
|
|
7727
8194
|
};
|
|
7728
8195
|
}, [baseDensity, maxSpeed, radius, linkDist, linkAlpha, mouseInfluence, repelStrength, clickBurst, mode]);
|
|
7729
|
-
return /* @__PURE__ */
|
|
8196
|
+
return /* @__PURE__ */ jsx115(
|
|
7730
8197
|
"canvas",
|
|
7731
8198
|
{
|
|
7732
8199
|
ref: canvasRef,
|
|
@@ -7755,44 +8222,44 @@ function useThemeContent(contentMap, fallback) {
|
|
|
7755
8222
|
var useThemeContent_default = useThemeContent;
|
|
7756
8223
|
|
|
7757
8224
|
// src/hooks/useNotifications/useNotifications.ts
|
|
7758
|
-
import * as
|
|
8225
|
+
import * as React44 from "react";
|
|
7759
8226
|
var generateId = () => {
|
|
7760
8227
|
return `notif-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
7761
8228
|
};
|
|
7762
8229
|
var useNotifications = (options = {}) => {
|
|
7763
8230
|
const { initialNotifications = [] } = options;
|
|
7764
|
-
const [notifications, setNotifications] =
|
|
8231
|
+
const [notifications, setNotifications] = React44.useState(
|
|
7765
8232
|
initialNotifications
|
|
7766
8233
|
);
|
|
7767
|
-
const markRead =
|
|
8234
|
+
const markRead = React44.useCallback((id) => {
|
|
7768
8235
|
setNotifications(
|
|
7769
8236
|
(prev) => prev.map((n) => n.id === id ? __spreadProps(__spreadValues({}, n), { read: true }) : n)
|
|
7770
8237
|
);
|
|
7771
8238
|
}, []);
|
|
7772
|
-
const dismiss =
|
|
8239
|
+
const dismiss = React44.useCallback((id) => {
|
|
7773
8240
|
setNotifications((prev) => prev.filter((n) => n.id !== id));
|
|
7774
8241
|
}, []);
|
|
7775
|
-
const markAllRead =
|
|
8242
|
+
const markAllRead = React44.useCallback(() => {
|
|
7776
8243
|
setNotifications((prev) => prev.map((n) => __spreadProps(__spreadValues({}, n), { read: true })));
|
|
7777
8244
|
}, []);
|
|
7778
|
-
const clearAll =
|
|
8245
|
+
const clearAll = React44.useCallback(() => {
|
|
7779
8246
|
setNotifications([]);
|
|
7780
8247
|
}, []);
|
|
7781
|
-
const add =
|
|
8248
|
+
const add = React44.useCallback((notification) => {
|
|
7782
8249
|
const newNotification = __spreadProps(__spreadValues({}, notification), {
|
|
7783
8250
|
id: generateId()
|
|
7784
8251
|
});
|
|
7785
8252
|
setNotifications((prev) => [newNotification, ...prev]);
|
|
7786
8253
|
}, []);
|
|
7787
|
-
const unreadCount =
|
|
8254
|
+
const unreadCount = React44.useMemo(
|
|
7788
8255
|
() => notifications.filter((n) => !n.read).length,
|
|
7789
8256
|
[notifications]
|
|
7790
8257
|
);
|
|
7791
|
-
const unreadNotifications =
|
|
8258
|
+
const unreadNotifications = React44.useMemo(
|
|
7792
8259
|
() => notifications.filter((n) => !n.read),
|
|
7793
8260
|
[notifications]
|
|
7794
8261
|
);
|
|
7795
|
-
const actions =
|
|
8262
|
+
const actions = React44.useMemo(
|
|
7796
8263
|
() => ({
|
|
7797
8264
|
markRead,
|
|
7798
8265
|
dismiss,
|
|
@@ -7825,6 +8292,7 @@ export {
|
|
|
7825
8292
|
AdapterDateFns,
|
|
7826
8293
|
AppBreadcrumbs,
|
|
7827
8294
|
AppShell,
|
|
8295
|
+
AppSwitcher,
|
|
7828
8296
|
ClassicTheme_default as ClassicTheme,
|
|
7829
8297
|
CodeBlock_default as CodeBlock,
|
|
7830
8298
|
ColorSchemeImage,
|