react-easy-wall 1.0.16 → 1.0.17
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/cjs/components/panel/PanelFooter.js +29 -0
- package/dist/cjs/components/panel/PanelFooter.js.map +1 -0
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/node_modules/@mui/icons-material/esm/PowerSettingsNew.js +14 -0
- package/dist/cjs/node_modules/@mui/icons-material/esm/PowerSettingsNew.js.map +1 -0
- package/dist/cjs/node_modules/@mui/material/esm/ListItemIcon/ListItemIcon.js +122 -0
- package/dist/cjs/node_modules/@mui/material/esm/ListItemIcon/ListItemIcon.js.map +1 -0
- package/dist/cjs/node_modules/@mui/material/esm/ListItemIcon/listItemIconClasses.js +12 -0
- package/dist/cjs/node_modules/@mui/material/esm/ListItemIcon/listItemIconClasses.js.map +1 -0
- package/dist/esm/components/panel/PanelFooter.js +27 -0
- package/dist/esm/components/panel/PanelFooter.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/node_modules/@mui/icons-material/esm/PowerSettingsNew.js +10 -0
- package/dist/esm/node_modules/@mui/icons-material/esm/PowerSettingsNew.js.map +1 -0
- package/dist/esm/node_modules/@mui/material/esm/ListItemIcon/ListItemIcon.js +99 -0
- package/dist/esm/node_modules/@mui/material/esm/ListItemIcon/ListItemIcon.js.map +1 -0
- package/dist/esm/node_modules/@mui/material/esm/ListItemIcon/listItemIconClasses.js +10 -0
- package/dist/esm/node_modules/@mui/material/esm/ListItemIcon/listItemIconClasses.js.map +1 -0
- package/dist/esm/types/components/panel/index.d.ts +1 -1
- package/dist/index.d.ts +11 -7
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var PanelDivider = require('./PanelDivider.js');
|
|
6
|
+
var PanelItem = require('./PanelItem.js');
|
|
7
|
+
var theme = require('../../shared/mui/theme.js');
|
|
8
|
+
var PowerSettingsNew = require('../../node_modules/@mui/icons-material/esm/PowerSettingsNew.js');
|
|
9
|
+
var panel_actions = require('./panel.actions.js');
|
|
10
|
+
var session_hooks = require('../session/session.hooks.js');
|
|
11
|
+
var List = require('../../node_modules/@mui/material/esm/List/List.js');
|
|
12
|
+
var ListItemIcon = require('../../node_modules/@mui/material/esm/ListItemIcon/ListItemIcon.js');
|
|
13
|
+
|
|
14
|
+
const PanelFooter = ({ dividerProps, listProps, listItemProps, listItemTextProps, }) => {
|
|
15
|
+
const { config } = session_hooks.useSession();
|
|
16
|
+
return (jsxRuntime.jsxs(List.default, { disablePadding: true, ...listProps, children: [jsxRuntime.jsx(PanelDivider.PanelDivider, { ...dividerProps }), jsxRuntime.jsx(PanelItem.PanelItem, { listItemProps: {
|
|
17
|
+
onClick: () => panel_actions.handleLogout(config),
|
|
18
|
+
secondaryAction: (jsxRuntime.jsx(ListItemIcon.default, { sx: { marginRight: theme.theme.spacing(1.5), minWidth: 0 }, children: jsxRuntime.jsx(PowerSettingsNew.default, {}) })),
|
|
19
|
+
component: 'div',
|
|
20
|
+
...listItemProps,
|
|
21
|
+
}, listItemTextProps: {
|
|
22
|
+
primary: 'Cerrar sesión',
|
|
23
|
+
primaryTypographyProps: { sx: { fontWeight: 'bold', fontSize: 18 } },
|
|
24
|
+
...listItemTextProps,
|
|
25
|
+
} })] }));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.PanelFooter = PanelFooter;
|
|
29
|
+
//# sourceMappingURL=PanelFooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelFooter.js","sources":["../../../../src/components/panel/PanelFooter.tsx"],"sourcesContent":["'use client';\nimport {\n DividerProps,\n List,\n ListItemIcon,\n ListItemProps,\n ListItemTextProps,\n ListProps,\n} from '@mui/material';\nimport { PanelDivider } from './PanelDivider';\nimport { PanelItem } from './PanelItem';\nimport { theme } from '../../shared/mui/theme';\nimport PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNew';\nimport { handleLogout } from './panel.actions';\nimport { useSession } from '../session/session.hooks';\nimport React from 'react';\n\nexport interface PanelFooterProps {\n dividerProps?: DividerProps;\n listProps?: ListProps;\n listItemProps?: ListItemProps & { href?: string };\n listItemTextProps?: ListItemTextProps;\n}\n\nexport const PanelFooter: React.FC<PanelFooterProps> = ({\n dividerProps,\n listProps,\n listItemProps,\n listItemTextProps,\n}) => {\n const { config } = useSession();\n return (\n <List disablePadding {...listProps}>\n <PanelDivider {...dividerProps} />\n <PanelItem\n listItemProps={{\n onClick: () => handleLogout(config),\n secondaryAction: (\n <ListItemIcon sx={{ marginRight: theme.spacing(1.5), minWidth: 0 }}>\n <PowerSettingsNewIcon />\n </ListItemIcon>\n ),\n component: 'div',\n ...listItemProps,\n }}\n listItemTextProps={{\n primary: 'Cerrar sesión',\n primaryTypographyProps: { sx: { fontWeight: 'bold', fontSize: 18 } },\n ...listItemTextProps,\n }}\n />\n </List>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAwBO;AAML;AACA;AAKQ;;AAMA;AACA;AACD;AAEC;AACA;AACA;;AAKV;;"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var Panel = require('./components/panel/Panel.js');
|
|
|
4
4
|
var PanelAvatar = require('./components/panel/PanelAvatar.js');
|
|
5
5
|
var PanelDivider = require('./components/panel/PanelDivider.js');
|
|
6
6
|
var PanelButton = require('./components/panel/PanelButton.js');
|
|
7
|
-
var
|
|
7
|
+
var PanelFooter = require('./components/panel/PanelFooter.js');
|
|
8
8
|
var PanelItem = require('./components/panel/PanelItem.js');
|
|
9
9
|
var PanelListItems = require('./components/panel/PanelListItems.js');
|
|
10
10
|
var panel_store = require('./components/panel/panel.store.js');
|
|
@@ -17,7 +17,7 @@ exports.Panel = Panel.Panel;
|
|
|
17
17
|
exports.PanelAvatar = PanelAvatar.PanelAvatar;
|
|
18
18
|
exports.PanelDivider = PanelDivider.PanelDivider;
|
|
19
19
|
exports.PanelButton = PanelButton.PanelButton;
|
|
20
|
-
exports.
|
|
20
|
+
exports.PanelFooter = PanelFooter.PanelFooter;
|
|
21
21
|
exports.PanelItem = PanelItem.PanelItem;
|
|
22
22
|
exports.PanelListItems = PanelListItems.PanelListItems;
|
|
23
23
|
exports.panelStore = panel_store.panelStore;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var createSvgIcon = require('../../material/esm/utils/createSvgIcon.js');
|
|
8
|
+
|
|
9
|
+
var PowerSettingsNewIcon = createSvgIcon.default(/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
10
|
+
d: "M13 3h-2v10h2zm4.83 2.17-1.42 1.42C17.99 7.86 19 9.81 19 12c0 3.87-3.13 7-7 7s-7-3.13-7-7c0-2.19 1.01-4.14 2.58-5.42L6.17 5.17C4.23 6.82 3 9.26 3 12c0 4.97 4.03 9 9 9s9-4.03 9-9c0-2.74-1.23-5.18-3.17-6.83"
|
|
11
|
+
}), 'PowerSettingsNew');
|
|
12
|
+
|
|
13
|
+
exports.default = PowerSettingsNewIcon;
|
|
14
|
+
//# sourceMappingURL=PowerSettingsNew.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PowerSettingsNew.js","sources":["../../../../../../node_modules/@mui/icons-material/esm/PowerSettingsNew.js"],"sourcesContent":["\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M13 3h-2v10h2zm4.83 2.17-1.42 1.42C17.99 7.86 19 9.81 19 12c0 3.87-3.13 7-7 7s-7-3.13-7-7c0-2.19 1.01-4.14 2.58-5.42L6.17 5.17C4.23 6.82 3 9.26 3 12c0 4.97 4.03 9 9 9s9-4.03 9-9c0-2.74-1.23-5.18-3.17-6.83\"\n}), 'PowerSettingsNew');"],"names":[],"mappings":";;;;;;;;AAIA;AACA;AACA;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var index = require('../../../../../_virtual/index3.js');
|
|
8
|
+
var clsx = require('../../../../clsx/dist/clsx.js');
|
|
9
|
+
var memoTheme = require('../utils/memoTheme.js');
|
|
10
|
+
var listItemIconClasses = require('./listItemIconClasses.js');
|
|
11
|
+
var ListContext = require('../List/ListContext.js');
|
|
12
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
13
|
+
var DefaultPropsProvider = require('../DefaultPropsProvider/DefaultPropsProvider.js');
|
|
14
|
+
var composeClasses = require('../../../utils/esm/composeClasses/composeClasses.js');
|
|
15
|
+
var styled = require('../styles/styled.js');
|
|
16
|
+
|
|
17
|
+
function _interopNamespaceDefault(e) {
|
|
18
|
+
var n = Object.create(null);
|
|
19
|
+
if (e) {
|
|
20
|
+
Object.keys(e).forEach(function (k) {
|
|
21
|
+
if (k !== 'default') {
|
|
22
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
23
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return e[k]; }
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
n.default = e;
|
|
31
|
+
return Object.freeze(n);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
35
|
+
|
|
36
|
+
const useUtilityClasses = ownerState => {
|
|
37
|
+
const {
|
|
38
|
+
alignItems,
|
|
39
|
+
classes
|
|
40
|
+
} = ownerState;
|
|
41
|
+
const slots = {
|
|
42
|
+
root: ['root', alignItems === 'flex-start' && 'alignItemsFlexStart']
|
|
43
|
+
};
|
|
44
|
+
return composeClasses.default(slots, listItemIconClasses.getListItemIconUtilityClass, classes);
|
|
45
|
+
};
|
|
46
|
+
const ListItemIconRoot = styled.default('div', {
|
|
47
|
+
name: 'MuiListItemIcon',
|
|
48
|
+
slot: 'Root',
|
|
49
|
+
overridesResolver: (props, styles) => {
|
|
50
|
+
const {
|
|
51
|
+
ownerState
|
|
52
|
+
} = props;
|
|
53
|
+
return [styles.root, ownerState.alignItems === 'flex-start' && styles.alignItemsFlexStart];
|
|
54
|
+
}
|
|
55
|
+
})(memoTheme.default(({
|
|
56
|
+
theme
|
|
57
|
+
}) => ({
|
|
58
|
+
minWidth: 56,
|
|
59
|
+
color: (theme.vars || theme).palette.action.active,
|
|
60
|
+
flexShrink: 0,
|
|
61
|
+
display: 'inline-flex',
|
|
62
|
+
variants: [{
|
|
63
|
+
props: {
|
|
64
|
+
alignItems: 'flex-start'
|
|
65
|
+
},
|
|
66
|
+
style: {
|
|
67
|
+
marginTop: 8
|
|
68
|
+
}
|
|
69
|
+
}]
|
|
70
|
+
})));
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`.
|
|
74
|
+
*/
|
|
75
|
+
const ListItemIcon = /*#__PURE__*/React__namespace.forwardRef(function ListItemIcon(inProps, ref) {
|
|
76
|
+
const props = DefaultPropsProvider.useDefaultProps({
|
|
77
|
+
props: inProps,
|
|
78
|
+
name: 'MuiListItemIcon'
|
|
79
|
+
});
|
|
80
|
+
const {
|
|
81
|
+
className,
|
|
82
|
+
...other
|
|
83
|
+
} = props;
|
|
84
|
+
const context = React__namespace.useContext(ListContext.default);
|
|
85
|
+
const ownerState = {
|
|
86
|
+
...props,
|
|
87
|
+
alignItems: context.alignItems
|
|
88
|
+
};
|
|
89
|
+
const classes = useUtilityClasses(ownerState);
|
|
90
|
+
return /*#__PURE__*/jsxRuntime.jsx(ListItemIconRoot, {
|
|
91
|
+
className: clsx.clsx(classes.root, className),
|
|
92
|
+
ownerState: ownerState,
|
|
93
|
+
ref: ref,
|
|
94
|
+
...other
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
process.env.NODE_ENV !== "production" ? ListItemIcon.propTypes /* remove-proptypes */ = {
|
|
98
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
99
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
100
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
101
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
102
|
+
/**
|
|
103
|
+
* The content of the component, normally `Icon`, `SvgIcon`,
|
|
104
|
+
* or a `@mui/icons-material` SVG icon element.
|
|
105
|
+
*/
|
|
106
|
+
children: index.default.node,
|
|
107
|
+
/**
|
|
108
|
+
* Override or extend the styles applied to the component.
|
|
109
|
+
*/
|
|
110
|
+
classes: index.default.object,
|
|
111
|
+
/**
|
|
112
|
+
* @ignore
|
|
113
|
+
*/
|
|
114
|
+
className: index.default.string,
|
|
115
|
+
/**
|
|
116
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
117
|
+
*/
|
|
118
|
+
sx: index.default.oneOfType([index.default.arrayOf(index.default.oneOfType([index.default.func, index.default.object, index.default.bool])), index.default.func, index.default.object])
|
|
119
|
+
} : void 0;
|
|
120
|
+
|
|
121
|
+
exports.default = ListItemIcon;
|
|
122
|
+
//# sourceMappingURL=ListItemIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItemIcon.js","sources":["../../../../../../../node_modules/@mui/material/esm/ListItemIcon/ListItemIcon.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getListItemIconUtilityClass } from \"./listItemIconClasses.js\";\nimport ListContext from \"../List/ListContext.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n alignItems,\n classes\n } = ownerState;\n const slots = {\n root: ['root', alignItems === 'flex-start' && 'alignItemsFlexStart']\n };\n return composeClasses(slots, getListItemIconUtilityClass, classes);\n};\nconst ListItemIconRoot = styled('div', {\n name: 'MuiListItemIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.alignItems === 'flex-start' && styles.alignItemsFlexStart];\n }\n})(memoTheme(({\n theme\n}) => ({\n minWidth: 56,\n color: (theme.vars || theme).palette.action.active,\n flexShrink: 0,\n display: 'inline-flex',\n variants: [{\n props: {\n alignItems: 'flex-start'\n },\n style: {\n marginTop: 8\n }\n }]\n})));\n\n/**\n * A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`.\n */\nconst ListItemIcon = /*#__PURE__*/React.forwardRef(function ListItemIcon(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiListItemIcon'\n });\n const {\n className,\n ...other\n } = props;\n const context = React.useContext(ListContext);\n const ownerState = {\n ...props,\n alignItems: context.alignItems\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ListItemIconRoot, {\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref,\n ...other\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemIcon.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component, normally `Icon`, `SvgIcon`,\n * or a `@mui/icons-material` SVG icon element.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default ListItemIcon;"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var generateUtilityClass = require('../../../utils/esm/generateUtilityClass/generateUtilityClass.js');
|
|
4
|
+
var generateUtilityClasses = require('../../../utils/esm/generateUtilityClasses/generateUtilityClasses.js');
|
|
5
|
+
|
|
6
|
+
function getListItemIconUtilityClass(slot) {
|
|
7
|
+
return generateUtilityClass.default('MuiListItemIcon', slot);
|
|
8
|
+
}
|
|
9
|
+
generateUtilityClasses.default('MuiListItemIcon', ['root', 'alignItemsFlexStart']);
|
|
10
|
+
|
|
11
|
+
exports.getListItemIconUtilityClass = getListItemIconUtilityClass;
|
|
12
|
+
//# sourceMappingURL=listItemIconClasses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listItemIconClasses.js","sources":["../../../../../../../node_modules/@mui/material/esm/ListItemIcon/listItemIconClasses.js"],"sourcesContent":["import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListItemIconUtilityClass(slot) {\n return generateUtilityClass('MuiListItemIcon', slot);\n}\nconst listItemIconClasses = generateUtilityClasses('MuiListItemIcon', ['root', 'alignItemsFlexStart']);\nexport default listItemIconClasses;"],"names":["generateUtilityClass","generateUtilityClasses"],"mappings":";;;;;AAEO,SAAS,2BAA2B,CAAC,IAAI,EAAE;AAClD,EAAE,OAAOA,4BAAoB,CAAC,iBAAiB,EAAE,IAAI,CAAC;AACtD;AAC4BC,8BAAsB,CAAC,iBAAiB,EAAE,CAAC,MAAM,EAAE,qBAAqB,CAAC;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { PanelDivider } from './PanelDivider.js';
|
|
4
|
+
import { PanelItem } from './PanelItem.js';
|
|
5
|
+
import { theme } from '../../shared/mui/theme.js';
|
|
6
|
+
import PowerSettingsNewIcon from '../../node_modules/@mui/icons-material/esm/PowerSettingsNew.js';
|
|
7
|
+
import { handleLogout } from './panel.actions.js';
|
|
8
|
+
import { useSession } from '../session/session.hooks.js';
|
|
9
|
+
import List from '../../node_modules/@mui/material/esm/List/List.js';
|
|
10
|
+
import ListItemIcon from '../../node_modules/@mui/material/esm/ListItemIcon/ListItemIcon.js';
|
|
11
|
+
|
|
12
|
+
const PanelFooter = ({ dividerProps, listProps, listItemProps, listItemTextProps, }) => {
|
|
13
|
+
const { config } = useSession();
|
|
14
|
+
return (jsxs(List, { disablePadding: true, ...listProps, children: [jsx(PanelDivider, { ...dividerProps }), jsx(PanelItem, { listItemProps: {
|
|
15
|
+
onClick: () => handleLogout(config),
|
|
16
|
+
secondaryAction: (jsx(ListItemIcon, { sx: { marginRight: theme.spacing(1.5), minWidth: 0 }, children: jsx(PowerSettingsNewIcon, {}) })),
|
|
17
|
+
component: 'div',
|
|
18
|
+
...listItemProps,
|
|
19
|
+
}, listItemTextProps: {
|
|
20
|
+
primary: 'Cerrar sesión',
|
|
21
|
+
primaryTypographyProps: { sx: { fontWeight: 'bold', fontSize: 18 } },
|
|
22
|
+
...listItemTextProps,
|
|
23
|
+
} })] }));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { PanelFooter };
|
|
27
|
+
//# sourceMappingURL=PanelFooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelFooter.js","sources":["../../../../src/components/panel/PanelFooter.tsx"],"sourcesContent":["'use client';\nimport {\n DividerProps,\n List,\n ListItemIcon,\n ListItemProps,\n ListItemTextProps,\n ListProps,\n} from '@mui/material';\nimport { PanelDivider } from './PanelDivider';\nimport { PanelItem } from './PanelItem';\nimport { theme } from '../../shared/mui/theme';\nimport PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNew';\nimport { handleLogout } from './panel.actions';\nimport { useSession } from '../session/session.hooks';\nimport React from 'react';\n\nexport interface PanelFooterProps {\n dividerProps?: DividerProps;\n listProps?: ListProps;\n listItemProps?: ListItemProps & { href?: string };\n listItemTextProps?: ListItemTextProps;\n}\n\nexport const PanelFooter: React.FC<PanelFooterProps> = ({\n dividerProps,\n listProps,\n listItemProps,\n listItemTextProps,\n}) => {\n const { config } = useSession();\n return (\n <List disablePadding {...listProps}>\n <PanelDivider {...dividerProps} />\n <PanelItem\n listItemProps={{\n onClick: () => handleLogout(config),\n secondaryAction: (\n <ListItemIcon sx={{ marginRight: theme.spacing(1.5), minWidth: 0 }}>\n <PowerSettingsNewIcon />\n </ListItemIcon>\n ),\n component: 'div',\n ...listItemProps,\n }}\n listItemTextProps={{\n primary: 'Cerrar sesión',\n primaryTypographyProps: { sx: { fontWeight: 'bold', fontSize: 18 } },\n ...listItemTextProps,\n }}\n />\n </List>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAwBO;AAML;AACA;AAKQ;;AAMA;AACA;AACD;AAEC;AACA;AACA;;AAKV;;"}
|
package/dist/esm/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { Panel } from './components/panel/Panel.js';
|
|
|
2
2
|
export { PanelAvatar } from './components/panel/PanelAvatar.js';
|
|
3
3
|
export { PanelDivider } from './components/panel/PanelDivider.js';
|
|
4
4
|
export { PanelButton } from './components/panel/PanelButton.js';
|
|
5
|
-
export {
|
|
5
|
+
export { PanelFooter } from './components/panel/PanelFooter.js';
|
|
6
6
|
export { PanelItem } from './components/panel/PanelItem.js';
|
|
7
7
|
export { PanelListItems } from './components/panel/PanelListItems.js';
|
|
8
8
|
export { panelStore } from './components/panel/panel.store.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import createSvgIcon from '../../material/esm/utils/createSvgIcon.js';
|
|
4
|
+
|
|
5
|
+
var PowerSettingsNewIcon = createSvgIcon(/*#__PURE__*/jsx("path", {
|
|
6
|
+
d: "M13 3h-2v10h2zm4.83 2.17-1.42 1.42C17.99 7.86 19 9.81 19 12c0 3.87-3.13 7-7 7s-7-3.13-7-7c0-2.19 1.01-4.14 2.58-5.42L6.17 5.17C4.23 6.82 3 9.26 3 12c0 4.97 4.03 9 9 9s9-4.03 9-9c0-2.74-1.23-5.18-3.17-6.83"
|
|
7
|
+
}), 'PowerSettingsNew');
|
|
8
|
+
|
|
9
|
+
export { PowerSettingsNewIcon as default };
|
|
10
|
+
//# sourceMappingURL=PowerSettingsNew.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PowerSettingsNew.js","sources":["../../../../../../node_modules/@mui/icons-material/esm/PowerSettingsNew.js"],"sourcesContent":["\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M13 3h-2v10h2zm4.83 2.17-1.42 1.42C17.99 7.86 19 9.81 19 12c0 3.87-3.13 7-7 7s-7-3.13-7-7c0-2.19 1.01-4.14 2.58-5.42L6.17 5.17C4.23 6.82 3 9.26 3 12c0 4.97 4.03 9 9 9s9-4.03 9-9c0-2.74-1.23-5.18-3.17-6.83\"\n}), 'PowerSettingsNew');"],"names":[],"mappings":";;;;AAIA;AACA;AACA;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import PropTypes from '../../../../../_virtual/index3.js';
|
|
4
|
+
import { clsx } from '../../../../clsx/dist/clsx.js';
|
|
5
|
+
import memoTheme from '../utils/memoTheme.js';
|
|
6
|
+
import { getListItemIconUtilityClass } from './listItemIconClasses.js';
|
|
7
|
+
import ListContext from '../List/ListContext.js';
|
|
8
|
+
import { jsx } from 'react/jsx-runtime';
|
|
9
|
+
import { useDefaultProps } from '../DefaultPropsProvider/DefaultPropsProvider.js';
|
|
10
|
+
import composeClasses from '../../../utils/esm/composeClasses/composeClasses.js';
|
|
11
|
+
import styled from '../styles/styled.js';
|
|
12
|
+
|
|
13
|
+
const useUtilityClasses = ownerState => {
|
|
14
|
+
const {
|
|
15
|
+
alignItems,
|
|
16
|
+
classes
|
|
17
|
+
} = ownerState;
|
|
18
|
+
const slots = {
|
|
19
|
+
root: ['root', alignItems === 'flex-start' && 'alignItemsFlexStart']
|
|
20
|
+
};
|
|
21
|
+
return composeClasses(slots, getListItemIconUtilityClass, classes);
|
|
22
|
+
};
|
|
23
|
+
const ListItemIconRoot = styled('div', {
|
|
24
|
+
name: 'MuiListItemIcon',
|
|
25
|
+
slot: 'Root',
|
|
26
|
+
overridesResolver: (props, styles) => {
|
|
27
|
+
const {
|
|
28
|
+
ownerState
|
|
29
|
+
} = props;
|
|
30
|
+
return [styles.root, ownerState.alignItems === 'flex-start' && styles.alignItemsFlexStart];
|
|
31
|
+
}
|
|
32
|
+
})(memoTheme(({
|
|
33
|
+
theme
|
|
34
|
+
}) => ({
|
|
35
|
+
minWidth: 56,
|
|
36
|
+
color: (theme.vars || theme).palette.action.active,
|
|
37
|
+
flexShrink: 0,
|
|
38
|
+
display: 'inline-flex',
|
|
39
|
+
variants: [{
|
|
40
|
+
props: {
|
|
41
|
+
alignItems: 'flex-start'
|
|
42
|
+
},
|
|
43
|
+
style: {
|
|
44
|
+
marginTop: 8
|
|
45
|
+
}
|
|
46
|
+
}]
|
|
47
|
+
})));
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`.
|
|
51
|
+
*/
|
|
52
|
+
const ListItemIcon = /*#__PURE__*/React.forwardRef(function ListItemIcon(inProps, ref) {
|
|
53
|
+
const props = useDefaultProps({
|
|
54
|
+
props: inProps,
|
|
55
|
+
name: 'MuiListItemIcon'
|
|
56
|
+
});
|
|
57
|
+
const {
|
|
58
|
+
className,
|
|
59
|
+
...other
|
|
60
|
+
} = props;
|
|
61
|
+
const context = React.useContext(ListContext);
|
|
62
|
+
const ownerState = {
|
|
63
|
+
...props,
|
|
64
|
+
alignItems: context.alignItems
|
|
65
|
+
};
|
|
66
|
+
const classes = useUtilityClasses(ownerState);
|
|
67
|
+
return /*#__PURE__*/jsx(ListItemIconRoot, {
|
|
68
|
+
className: clsx(classes.root, className),
|
|
69
|
+
ownerState: ownerState,
|
|
70
|
+
ref: ref,
|
|
71
|
+
...other
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
process.env.NODE_ENV !== "production" ? ListItemIcon.propTypes /* remove-proptypes */ = {
|
|
75
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
76
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
77
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
78
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
79
|
+
/**
|
|
80
|
+
* The content of the component, normally `Icon`, `SvgIcon`,
|
|
81
|
+
* or a `@mui/icons-material` SVG icon element.
|
|
82
|
+
*/
|
|
83
|
+
children: PropTypes.node,
|
|
84
|
+
/**
|
|
85
|
+
* Override or extend the styles applied to the component.
|
|
86
|
+
*/
|
|
87
|
+
classes: PropTypes.object,
|
|
88
|
+
/**
|
|
89
|
+
* @ignore
|
|
90
|
+
*/
|
|
91
|
+
className: PropTypes.string,
|
|
92
|
+
/**
|
|
93
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
94
|
+
*/
|
|
95
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
96
|
+
} : void 0;
|
|
97
|
+
|
|
98
|
+
export { ListItemIcon as default };
|
|
99
|
+
//# sourceMappingURL=ListItemIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItemIcon.js","sources":["../../../../../../../node_modules/@mui/material/esm/ListItemIcon/ListItemIcon.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getListItemIconUtilityClass } from \"./listItemIconClasses.js\";\nimport ListContext from \"../List/ListContext.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n alignItems,\n classes\n } = ownerState;\n const slots = {\n root: ['root', alignItems === 'flex-start' && 'alignItemsFlexStart']\n };\n return composeClasses(slots, getListItemIconUtilityClass, classes);\n};\nconst ListItemIconRoot = styled('div', {\n name: 'MuiListItemIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.alignItems === 'flex-start' && styles.alignItemsFlexStart];\n }\n})(memoTheme(({\n theme\n}) => ({\n minWidth: 56,\n color: (theme.vars || theme).palette.action.active,\n flexShrink: 0,\n display: 'inline-flex',\n variants: [{\n props: {\n alignItems: 'flex-start'\n },\n style: {\n marginTop: 8\n }\n }]\n})));\n\n/**\n * A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`.\n */\nconst ListItemIcon = /*#__PURE__*/React.forwardRef(function ListItemIcon(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiListItemIcon'\n });\n const {\n className,\n ...other\n } = props;\n const context = React.useContext(ListContext);\n const ownerState = {\n ...props,\n alignItems: context.alignItems\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ListItemIconRoot, {\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref,\n ...other\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemIcon.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component, normally `Icon`, `SvgIcon`,\n * or a `@mui/icons-material` SVG icon element.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default ListItemIcon;"],"names":[],"mappings":";;;;;;;;;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import generateUtilityClass from '../../../utils/esm/generateUtilityClass/generateUtilityClass.js';
|
|
2
|
+
import generateUtilityClasses from '../../../utils/esm/generateUtilityClasses/generateUtilityClasses.js';
|
|
3
|
+
|
|
4
|
+
function getListItemIconUtilityClass(slot) {
|
|
5
|
+
return generateUtilityClass('MuiListItemIcon', slot);
|
|
6
|
+
}
|
|
7
|
+
generateUtilityClasses('MuiListItemIcon', ['root', 'alignItemsFlexStart']);
|
|
8
|
+
|
|
9
|
+
export { getListItemIconUtilityClass };
|
|
10
|
+
//# sourceMappingURL=listItemIconClasses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listItemIconClasses.js","sources":["../../../../../../../node_modules/@mui/material/esm/ListItemIcon/listItemIconClasses.js"],"sourcesContent":["import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListItemIconUtilityClass(slot) {\n return generateUtilityClass('MuiListItemIcon', slot);\n}\nconst listItemIconClasses = generateUtilityClasses('MuiListItemIcon', ['root', 'alignItemsFlexStart']);\nexport default listItemIconClasses;"],"names":[],"mappings":";;;AAEO,SAAS,2BAA2B,CAAC,IAAI,EAAE;AAClD,EAAE,OAAO,oBAAoB,CAAC,iBAAiB,EAAE,IAAI,CAAC;AACtD;AAC4B,sBAAsB,CAAC,iBAAiB,EAAE,CAAC,MAAM,EAAE,qBAAqB,CAAC;;;;","x_google_ignoreList":[0]}
|
|
@@ -2,7 +2,7 @@ export * from './Panel';
|
|
|
2
2
|
export * from './PanelAvatar';
|
|
3
3
|
export * from './PanelDivider';
|
|
4
4
|
export * from './PanelButton';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './PanelFooter';
|
|
6
6
|
export * from './PanelItem';
|
|
7
7
|
export * from './PanelListItems';
|
|
8
8
|
export * from './panel.store';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DrawerProps, AvatarProps, DividerProps, ButtonProps,
|
|
1
|
+
import { DrawerProps, AvatarProps, DividerProps, ButtonProps, ListProps, ListItemProps, ListItemTextProps, BoxProps, TypographyProps } from '@mui/material';
|
|
2
2
|
import React, { FC } from 'react';
|
|
3
3
|
import * as _cobuildlab_react_simple_state from '@cobuildlab/react-simple-state';
|
|
4
4
|
|
|
@@ -24,11 +24,15 @@ interface PanelButtonProps extends ButtonProps {
|
|
|
24
24
|
}
|
|
25
25
|
declare const PanelButton: FC<PanelButtonProps>;
|
|
26
26
|
|
|
27
|
-
interface
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
interface PanelFooterProps {
|
|
28
|
+
dividerProps?: DividerProps;
|
|
29
|
+
listProps?: ListProps;
|
|
30
|
+
listItemProps?: ListItemProps & {
|
|
31
|
+
href?: string;
|
|
32
|
+
};
|
|
33
|
+
listItemTextProps?: ListItemTextProps;
|
|
30
34
|
}
|
|
31
|
-
declare const
|
|
35
|
+
declare const PanelFooter: React.FC<PanelFooterProps>;
|
|
32
36
|
|
|
33
37
|
interface PanelItemProps {
|
|
34
38
|
listItemProps?: ListItemProps & {
|
|
@@ -79,5 +83,5 @@ type SessionProviderProps = {
|
|
|
79
83
|
};
|
|
80
84
|
declare const SessionProvider: React.FC<SessionProviderProps>;
|
|
81
85
|
|
|
82
|
-
export { Panel, PanelAvatar, PanelButton, PanelDivider,
|
|
83
|
-
export type { PanelAvatarProps, PanelButtonProps, PanelDividerProps,
|
|
86
|
+
export { Panel, PanelAvatar, PanelButton, PanelDivider, PanelFooter, PanelItem, PanelListItems, SessionProvider, handleLogout, handlePanelClick, panelStore, panelStoreAction };
|
|
87
|
+
export type { PanelAvatarProps, PanelButtonProps, PanelDividerProps, PanelFooterProps, PanelItemProps, PanelListRoute, PanelProps, PanelStoreAction };
|