@wso2/oxygen-ui 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +47 -30
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2277,12 +2277,20 @@ import { styled as styled21 } from "@mui/material/styles";
|
|
|
2277
2277
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2278
2278
|
var SidebarCategoryLabelRoot = styled21(Typography6, {
|
|
2279
2279
|
name: "MuiSidebar",
|
|
2280
|
-
slot: "CategoryLabel"
|
|
2281
|
-
|
|
2280
|
+
slot: "CategoryLabel",
|
|
2281
|
+
shouldForwardProp: (prop) => prop !== "collapsed"
|
|
2282
|
+
})(({ theme, collapsed }) => ({
|
|
2282
2283
|
paddingLeft: theme.spacing(3),
|
|
2283
2284
|
paddingRight: theme.spacing(3),
|
|
2284
|
-
paddingTop: theme.spacing(1),
|
|
2285
|
-
paddingBottom: theme.spacing(1),
|
|
2285
|
+
paddingTop: collapsed ? 0 : theme.spacing(1),
|
|
2286
|
+
paddingBottom: collapsed ? 0 : theme.spacing(1),
|
|
2287
|
+
height: collapsed ? 0 : "auto",
|
|
2288
|
+
opacity: collapsed ? 0 : 1,
|
|
2289
|
+
overflow: "hidden",
|
|
2290
|
+
transition: theme.transitions.create(["padding", "height", "opacity"], {
|
|
2291
|
+
easing: theme.transitions.easing.sharp,
|
|
2292
|
+
duration: collapsed ? theme.transitions.duration.leavingScreen : theme.transitions.duration.enteringScreen
|
|
2293
|
+
}),
|
|
2286
2294
|
display: "block",
|
|
2287
2295
|
color: (theme.vars || theme).palette.text.secondary,
|
|
2288
2296
|
fontWeight: 600,
|
|
@@ -2290,15 +2298,9 @@ var SidebarCategoryLabelRoot = styled21(Typography6, {
|
|
|
2290
2298
|
letterSpacing: "0.5px",
|
|
2291
2299
|
fontSize: 11
|
|
2292
2300
|
}));
|
|
2293
|
-
var SidebarCategoryLabel = ({
|
|
2294
|
-
children,
|
|
2295
|
-
sx
|
|
2296
|
-
}) => {
|
|
2301
|
+
var SidebarCategoryLabel = ({ children, sx }) => {
|
|
2297
2302
|
const { collapsed } = useSidebar();
|
|
2298
|
-
|
|
2299
|
-
return null;
|
|
2300
|
-
}
|
|
2301
|
-
return /* @__PURE__ */ jsx31(SidebarCategoryLabelRoot, { variant: "caption", sx, children });
|
|
2303
|
+
return /* @__PURE__ */ jsx31(SidebarCategoryLabelRoot, { variant: "caption", collapsed, sx, children });
|
|
2302
2304
|
};
|
|
2303
2305
|
SidebarCategoryLabel.displayName = "SidebarCategoryLabel";
|
|
2304
2306
|
|
|
@@ -2410,7 +2412,16 @@ var SidebarItemLabelRoot = styled24(ListItemText, {
|
|
|
2410
2412
|
name: "MuiSidebar",
|
|
2411
2413
|
slot: "ItemLabel",
|
|
2412
2414
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
2413
|
-
})(({ ownerState }) => ({
|
|
2415
|
+
})(({ theme, ownerState }) => ({
|
|
2416
|
+
margin: 0,
|
|
2417
|
+
opacity: ownerState.collapsed ? 0 : 1,
|
|
2418
|
+
width: ownerState.collapsed ? 0 : "auto",
|
|
2419
|
+
overflow: "hidden",
|
|
2420
|
+
whiteSpace: "nowrap",
|
|
2421
|
+
transition: theme.transitions.create(["opacity", "width", "margin"], {
|
|
2422
|
+
easing: theme.transitions.easing.sharp,
|
|
2423
|
+
duration: ownerState.collapsed ? theme.transitions.duration.leavingScreen : theme.transitions.duration.enteringScreen
|
|
2424
|
+
}),
|
|
2414
2425
|
"& .MuiListItemText-primary": {
|
|
2415
2426
|
fontSize: 14,
|
|
2416
2427
|
fontWeight: ownerState.isActive ? 600 : 400
|
|
@@ -2422,17 +2433,7 @@ var SidebarItemLabel = ({
|
|
|
2422
2433
|
}) => {
|
|
2423
2434
|
const { collapsed } = useSidebar();
|
|
2424
2435
|
const { isActive } = useSidebarItemContext();
|
|
2425
|
-
|
|
2426
|
-
return null;
|
|
2427
|
-
}
|
|
2428
|
-
return /* @__PURE__ */ jsx35(
|
|
2429
|
-
SidebarItemLabelRoot,
|
|
2430
|
-
{
|
|
2431
|
-
primary: children,
|
|
2432
|
-
ownerState: { isActive },
|
|
2433
|
-
sx
|
|
2434
|
-
}
|
|
2435
|
-
);
|
|
2436
|
+
return /* @__PURE__ */ jsx35(SidebarItemLabelRoot, { primary: children, ownerState: { isActive, collapsed }, sx });
|
|
2436
2437
|
};
|
|
2437
2438
|
SidebarItemLabel.displayName = "SidebarItemLabel";
|
|
2438
2439
|
|
|
@@ -2482,6 +2483,10 @@ var SidebarItemButton = styled26(ListItemButton, {
|
|
|
2482
2483
|
borderRadius: theme.shape.borderRadius,
|
|
2483
2484
|
marginLeft: theme.spacing(1),
|
|
2484
2485
|
marginRight: theme.spacing(1),
|
|
2486
|
+
transition: theme.transitions.create(["padding-left", "padding-right"], {
|
|
2487
|
+
easing: theme.transitions.easing.sharp,
|
|
2488
|
+
duration: ownerState.collapsed ? theme.transitions.duration.leavingScreen : theme.transitions.duration.enteringScreen
|
|
2489
|
+
}),
|
|
2485
2490
|
"&.Mui-selected": {
|
|
2486
2491
|
backgroundColor: (theme.vars || theme).palette.action.selected,
|
|
2487
2492
|
"&:hover": {
|
|
@@ -2822,7 +2827,7 @@ var SidebarUserRoot = styled31(Box16, {
|
|
|
2822
2827
|
name: "MuiSidebar",
|
|
2823
2828
|
slot: "User"
|
|
2824
2829
|
})(({ theme }) => ({
|
|
2825
|
-
padding: theme.spacing(
|
|
2830
|
+
padding: theme.spacing(2)
|
|
2826
2831
|
}));
|
|
2827
2832
|
var SidebarUserButton = styled31(ListItemButton2, {
|
|
2828
2833
|
name: "MuiSidebar",
|
|
@@ -2835,14 +2840,26 @@ var SidebarUserButton = styled31(ListItemButton2, {
|
|
|
2835
2840
|
justifyContent: ownerState.collapsed ? "center" : "initial",
|
|
2836
2841
|
borderRadius: theme.shape.borderRadius,
|
|
2837
2842
|
marginLeft: theme.spacing(1),
|
|
2838
|
-
marginRight: theme.spacing(1)
|
|
2843
|
+
marginRight: theme.spacing(1),
|
|
2844
|
+
transition: theme.transitions.create(["padding-left", "padding-right"], {
|
|
2845
|
+
easing: theme.transitions.easing.sharp,
|
|
2846
|
+
duration: ownerState.collapsed ? theme.transitions.duration.leavingScreen : theme.transitions.duration.enteringScreen
|
|
2847
|
+
})
|
|
2839
2848
|
}));
|
|
2840
2849
|
var SidebarUserTextContainer = styled31(Box16, {
|
|
2841
2850
|
name: "MuiSidebar",
|
|
2842
|
-
slot: "UserTextContainer"
|
|
2843
|
-
|
|
2851
|
+
slot: "UserTextContainer",
|
|
2852
|
+
shouldForwardProp: (prop) => prop !== "collapsed"
|
|
2853
|
+
})(({ theme, collapsed }) => ({
|
|
2844
2854
|
marginLeft: theme.spacing(2),
|
|
2845
|
-
overflow: "hidden"
|
|
2855
|
+
overflow: "hidden",
|
|
2856
|
+
opacity: collapsed ? 0 : 1,
|
|
2857
|
+
width: collapsed ? 0 : "auto",
|
|
2858
|
+
whiteSpace: "nowrap",
|
|
2859
|
+
transition: theme.transitions.create(["opacity", "width", "margin"], {
|
|
2860
|
+
easing: theme.transitions.easing.sharp,
|
|
2861
|
+
duration: collapsed ? theme.transitions.duration.leavingScreen : theme.transitions.duration.enteringScreen
|
|
2862
|
+
})
|
|
2846
2863
|
}));
|
|
2847
2864
|
var separateChildren3 = (children) => {
|
|
2848
2865
|
let avatarChild = null;
|
|
@@ -2886,7 +2903,7 @@ var SidebarUser = ({
|
|
|
2886
2903
|
const ownerState = { collapsed };
|
|
2887
2904
|
const content = /* @__PURE__ */ jsxs13(SidebarUserButton, { onClick, ownerState, children: [
|
|
2888
2905
|
avatarChild,
|
|
2889
|
-
|
|
2906
|
+
/* @__PURE__ */ jsx42(SidebarUserTextContainer, { collapsed, children: textChildren })
|
|
2890
2907
|
] });
|
|
2891
2908
|
return /* @__PURE__ */ jsxs13(Fragment7, { children: [
|
|
2892
2909
|
showDivider && /* @__PURE__ */ jsx42(Divider5, {}),
|