@hitachivantara/uikit-react-lab 4.2.3 → 4.3.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/VerticalNavigation/VerticalNavigation.d.ts +38 -0
- package/dist/VerticalNavigation/VerticalNavigation.js +137 -0
- package/dist/VerticalNavigation/VerticalNavigation.js.map +1 -0
- package/dist/VerticalNavigation/index.d.ts +2 -0
- package/dist/VerticalNavigation/index.js +14 -0
- package/dist/VerticalNavigation/index.js.map +1 -0
- package/dist/VerticalNavigation/styles.js +76 -0
- package/dist/VerticalNavigation/styles.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy/VerticalNavigation/VerticalNavigation.d.ts +38 -0
- package/dist/legacy/VerticalNavigation/VerticalNavigation.js +121 -0
- package/dist/legacy/VerticalNavigation/VerticalNavigation.js.map +1 -0
- package/dist/legacy/VerticalNavigation/index.d.ts +2 -0
- package/dist/legacy/VerticalNavigation/index.js +2 -0
- package/dist/legacy/VerticalNavigation/index.js.map +1 -0
- package/dist/legacy/VerticalNavigation/styles.js +68 -0
- package/dist/legacy/VerticalNavigation/styles.js.map +1 -0
- package/dist/legacy/index.d.ts +3 -0
- package/dist/legacy/index.js +1 -0
- package/dist/legacy/index.js.map +1 -1
- package/dist/modern/VerticalNavigation/VerticalNavigation.d.ts +38 -0
- package/dist/modern/VerticalNavigation/VerticalNavigation.js +116 -0
- package/dist/modern/VerticalNavigation/VerticalNavigation.js.map +1 -0
- package/dist/modern/VerticalNavigation/index.d.ts +2 -0
- package/dist/modern/VerticalNavigation/index.js +2 -0
- package/dist/modern/VerticalNavigation/index.js.map +1 -0
- package/dist/modern/VerticalNavigation/styles.js +57 -0
- package/dist/modern/VerticalNavigation/styles.js.map +1 -0
- package/dist/modern/index.d.ts +3 -0
- package/dist/modern/index.js +1 -0
- package/dist/modern/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { NavigationData } from "@hitachivantara/uikit-react-core";
|
|
2
|
+
|
|
3
|
+
export interface HvVerticalNavigationProps {
|
|
4
|
+
/**
|
|
5
|
+
* Id to be applied to the root node of the panel.
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Called when a menu item is clicked.
|
|
10
|
+
*/
|
|
11
|
+
onNavigationChange?: Function;
|
|
12
|
+
/**
|
|
13
|
+
* An array containing the data for each menu item.
|
|
14
|
+
*/
|
|
15
|
+
data: NavigationData[];
|
|
16
|
+
/**
|
|
17
|
+
* Text to be displayed in the collpase area when the panel is expanded.
|
|
18
|
+
*/
|
|
19
|
+
collapseLabel?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The ID of the selected page.
|
|
22
|
+
*/
|
|
23
|
+
selected?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The top value where the panel will be rendered. Default is 44 as it is the height of the Header component.
|
|
26
|
+
*/
|
|
27
|
+
topPosition?: number;
|
|
28
|
+
/**
|
|
29
|
+
* The width of the panel when expanded. Default value is 300.
|
|
30
|
+
*/
|
|
31
|
+
expandedPanelWidth?: number;
|
|
32
|
+
/**
|
|
33
|
+
* The width of the panel when collapsed. Default vlaue is 52.
|
|
34
|
+
*/
|
|
35
|
+
collapsedPanelWidth?: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default function HvVerticalNavigation(props: HvVerticalNavigationProps): JSX.Element | null;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.array.iterator.js");
|
|
4
|
+
require("core-js/modules/es.object.to-string.js");
|
|
5
|
+
require("core-js/modules/es.string.iterator.js");
|
|
6
|
+
require("core-js/modules/es.weak-map.js");
|
|
7
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
8
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
9
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
10
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
11
|
+
Object.defineProperty(exports, "__esModule", {
|
|
12
|
+
value: true
|
|
13
|
+
});
|
|
14
|
+
exports.default = void 0;
|
|
15
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
var _styles = require("@mui/styles");
|
|
18
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
20
|
+
var _uikitReactCore = require("@hitachivantara/uikit-react-core");
|
|
21
|
+
var _uikitReactIcons = require("@hitachivantara/uikit-react-icons");
|
|
22
|
+
var _styles2 = _interopRequireDefault(require("./styles"));
|
|
23
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
|
+
var _Backwards, _Forwards;
|
|
25
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
var HvVerticalNavigation = function HvVerticalNavigation(_ref) {
|
|
28
|
+
var id = _ref.id,
|
|
29
|
+
onNavigationChange = _ref.onNavigationChange,
|
|
30
|
+
data = _ref.data,
|
|
31
|
+
selected = _ref.selected,
|
|
32
|
+
collapseLabel = _ref.collapseLabel,
|
|
33
|
+
topPosition = _ref.topPosition,
|
|
34
|
+
expandedPanelWidth = _ref.expandedPanelWidth,
|
|
35
|
+
collapsedPanelWidth = _ref.collapsedPanelWidth;
|
|
36
|
+
var classes = (0, _styles2.default)({
|
|
37
|
+
topPosition: topPosition,
|
|
38
|
+
expandedPanelWidth: expandedPanelWidth,
|
|
39
|
+
collapsedPanelWidth: collapsedPanelWidth
|
|
40
|
+
})();
|
|
41
|
+
var _useState = (0, _react.useState)(true),
|
|
42
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
43
|
+
isExpanded = _useState2[0],
|
|
44
|
+
setIsExpanded = _useState2[1];
|
|
45
|
+
var handleVerticalNavigationChange = function handleVerticalNavigationChange(event, item) {
|
|
46
|
+
onNavigationChange === null || onNavigationChange === void 0 ? void 0 : onNavigationChange(event, item);
|
|
47
|
+
};
|
|
48
|
+
var handleExpandToggle = function handleExpandToggle() {
|
|
49
|
+
setIsExpanded(function (prevState) {
|
|
50
|
+
return !prevState;
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_uikitReactCore.HvVerticalNavigation, {
|
|
54
|
+
className: (0, _clsx.default)(classes.panel, isExpanded ? classes.panelExpanded : classes.panelCollapsed),
|
|
55
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvVerticalNavigationTree, {
|
|
56
|
+
collapsible: true,
|
|
57
|
+
data: data,
|
|
58
|
+
selected: selected,
|
|
59
|
+
onChange: handleVerticalNavigationChange
|
|
60
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvVerticalNavigationActions, {
|
|
61
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvButton, {
|
|
62
|
+
id: (0, _uikitReactCore.setId)(id, "button-toggle"),
|
|
63
|
+
className: (0, _clsx.default)(isExpanded ? classes.collapseButton : classes.expandButton),
|
|
64
|
+
category: "ghost",
|
|
65
|
+
startIcon: isExpanded ? _Backwards || (_Backwards = /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactIcons.Backwards, {
|
|
66
|
+
iconSize: "XS"
|
|
67
|
+
})) : _Forwards || (_Forwards = /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactIcons.Forwards, {
|
|
68
|
+
iconSize: "XS"
|
|
69
|
+
})),
|
|
70
|
+
onClick: handleExpandToggle,
|
|
71
|
+
children: isExpanded && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
72
|
+
className: classes.collapseTextContainer,
|
|
73
|
+
children: collapseLabel
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
process.env.NODE_ENV !== "production" ? HvVerticalNavigation.propTypes = {
|
|
80
|
+
/**
|
|
81
|
+
* Id to be applied to the root node of the panel.
|
|
82
|
+
*/
|
|
83
|
+
id: _propTypes.default.string,
|
|
84
|
+
/**
|
|
85
|
+
* Called when a menu item is clicked.
|
|
86
|
+
*/
|
|
87
|
+
onNavigationChange: _propTypes.default.func,
|
|
88
|
+
/**
|
|
89
|
+
* An array containing the data for each menu item.
|
|
90
|
+
*
|
|
91
|
+
* id - the id to be applied to the root element.
|
|
92
|
+
* label - the label to be rendered on the menu item.
|
|
93
|
+
* icon - the icon component.
|
|
94
|
+
* data - sub-menu items
|
|
95
|
+
* href - the url used for navigation.
|
|
96
|
+
* target - the behavior when opening an url.
|
|
97
|
+
*/
|
|
98
|
+
data: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
99
|
+
id: _propTypes.default.string.isRequired,
|
|
100
|
+
label: _propTypes.default.string.isRequired,
|
|
101
|
+
icon: _propTypes.default.node,
|
|
102
|
+
data: _propTypes.default.array,
|
|
103
|
+
href: _propTypes.default.string,
|
|
104
|
+
target: _propTypes.default.string
|
|
105
|
+
})).isRequired,
|
|
106
|
+
/**
|
|
107
|
+
* Text to be displayed in the collpase area when the panel is expanded.
|
|
108
|
+
*/
|
|
109
|
+
collapseLabel: _propTypes.default.string,
|
|
110
|
+
/**
|
|
111
|
+
* The ID of the selected page.
|
|
112
|
+
*/
|
|
113
|
+
selected: _propTypes.default.string,
|
|
114
|
+
/**
|
|
115
|
+
* The top value where the panel will be rendered. Default is 44 as it is the height of the Header component.
|
|
116
|
+
*/
|
|
117
|
+
topPosition: _propTypes.default.number,
|
|
118
|
+
/**
|
|
119
|
+
* The width of the panel when expanded. Default value is 300.
|
|
120
|
+
*/
|
|
121
|
+
expandedPanelWidth: _propTypes.default.number,
|
|
122
|
+
/**
|
|
123
|
+
* The width of the panel when collapsed. Default vlaue is 52.
|
|
124
|
+
*/
|
|
125
|
+
collapsedPanelWidth: _propTypes.default.number
|
|
126
|
+
} : void 0;
|
|
127
|
+
HvVerticalNavigation.defaultProps = {
|
|
128
|
+
collapseLabel: "Collapse",
|
|
129
|
+
topPosition: 44,
|
|
130
|
+
expandedPanelWidth: 300,
|
|
131
|
+
collapsedPanelWidth: 52
|
|
132
|
+
};
|
|
133
|
+
var _default = (0, _styles.withStyles)(_styles2.default, {
|
|
134
|
+
name: "HvVerticalNavigation"
|
|
135
|
+
})(HvVerticalNavigation);
|
|
136
|
+
exports.default = _default;
|
|
137
|
+
//# sourceMappingURL=VerticalNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VerticalNavigation.js","names":["HvVerticalNavigation","id","onNavigationChange","data","selected","collapseLabel","topPosition","expandedPanelWidth","collapsedPanelWidth","classes","useStyles","useState","isExpanded","setIsExpanded","handleVerticalNavigationChange","event","item","handleExpandToggle","prevState","clsx","panel","panelExpanded","panelCollapsed","setId","collapseButton","expandButton","collapseTextContainer","propTypes","PropTypes","string","func","arrayOf","shape","isRequired","label","icon","node","array","href","target","number","defaultProps","withStyles","name"],"sources":["../../src/VerticalNavigation/VerticalNavigation.js"],"sourcesContent":["import React, { useState } from \"react\";\nimport { withStyles } from \"@mui/styles\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport {\n HvVerticalNavigation as HvVerticalNavigationCore,\n HvVerticalNavigationTree,\n HvVerticalNavigationActions,\n HvButton,\n setId,\n} from \"@hitachivantara/uikit-react-core\";\nimport { Backwards, Forwards } from \"@hitachivantara/uikit-react-icons\";\n\nimport useStyles from \"./styles\";\n\nconst HvVerticalNavigation = ({\n id,\n onNavigationChange,\n data,\n selected,\n collapseLabel,\n\n topPosition,\n expandedPanelWidth,\n collapsedPanelWidth,\n}) => {\n const classes = useStyles({ topPosition, expandedPanelWidth, collapsedPanelWidth })();\n\n const [isExpanded, setIsExpanded] = useState(true);\n\n const handleVerticalNavigationChange = (event, item) => {\n onNavigationChange?.(event, item);\n };\n\n const handleExpandToggle = () => {\n setIsExpanded((prevState) => !prevState);\n };\n\n return (\n <HvVerticalNavigationCore\n className={clsx(classes.panel, {\n [classes.panelExpanded]: isExpanded,\n [classes.panelCollapsed]: !isExpanded,\n })}\n >\n <HvVerticalNavigationTree\n collapsible\n data={data}\n selected={selected}\n onChange={handleVerticalNavigationChange}\n />\n\n <HvVerticalNavigationActions>\n <HvButton\n id={setId(id, \"button-toggle\")}\n className={clsx({\n [classes.collapseButton]: isExpanded,\n [classes.expandButton]: !isExpanded,\n })}\n category=\"ghost\"\n startIcon={isExpanded ? <Backwards iconSize=\"XS\" /> : <Forwards iconSize=\"XS\" />}\n onClick={handleExpandToggle}\n >\n {isExpanded && <span className={classes.collapseTextContainer}>{collapseLabel}</span>}\n </HvButton>\n </HvVerticalNavigationActions>\n </HvVerticalNavigationCore>\n );\n};\n\nHvVerticalNavigation.propTypes = {\n /**\n * Id to be applied to the root node of the panel.\n */\n id: PropTypes.string,\n /**\n * Called when a menu item is clicked.\n */\n onNavigationChange: PropTypes.func,\n /**\n * An array containing the data for each menu item.\n *\n * id - the id to be applied to the root element.\n * label - the label to be rendered on the menu item.\n * icon - the icon component.\n * data - sub-menu items\n * href - the url used for navigation.\n * target - the behavior when opening an url.\n */\n data: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n icon: PropTypes.node,\n data: PropTypes.array,\n href: PropTypes.string,\n target: PropTypes.string,\n })\n ).isRequired,\n /**\n * Text to be displayed in the collpase area when the panel is expanded.\n */\n collapseLabel: PropTypes.string,\n /**\n * The ID of the selected page.\n */\n selected: PropTypes.string,\n /**\n * The top value where the panel will be rendered. Default is 44 as it is the height of the Header component.\n */\n topPosition: PropTypes.number,\n /**\n * The width of the panel when expanded. Default value is 300.\n */\n expandedPanelWidth: PropTypes.number,\n /**\n * The width of the panel when collapsed. Default vlaue is 52.\n */\n collapsedPanelWidth: PropTypes.number,\n};\n\nHvVerticalNavigation.defaultProps = {\n collapseLabel: \"Collapse\",\n topPosition: 44,\n expandedPanelWidth: 300,\n collapsedPanelWidth: 52,\n};\n\nexport default withStyles(useStyles, { name: \"HvVerticalNavigation\" })(HvVerticalNavigation);\n"],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _VerticalNavigation.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _VerticalNavigation = _interopRequireDefault(require("./VerticalNavigation"));
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/VerticalNavigation/index.js"],"sourcesContent":["export { default } from \"./VerticalNavigation\";\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.keys.js");
|
|
4
|
+
require("core-js/modules/es.symbol.js");
|
|
5
|
+
require("core-js/modules/es.array.filter.js");
|
|
6
|
+
require("core-js/modules/es.object.to-string.js");
|
|
7
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
8
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
9
|
+
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
10
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
11
|
+
Object.defineProperty(exports, "__esModule", {
|
|
12
|
+
value: true
|
|
13
|
+
});
|
|
14
|
+
exports.default = void 0;
|
|
15
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
+
var _styles = require("@mui/styles");
|
|
17
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
18
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
+
var styles = function styles(props) {
|
|
20
|
+
return (0, _styles.makeStyles)(function (theme) {
|
|
21
|
+
return {
|
|
22
|
+
panel: {
|
|
23
|
+
position: "fixed",
|
|
24
|
+
top: props.topPosition,
|
|
25
|
+
left: 0,
|
|
26
|
+
zIndex: 1100
|
|
27
|
+
},
|
|
28
|
+
panelExpanded: {
|
|
29
|
+
width: props.expandedPanelWidth,
|
|
30
|
+
height: "calc(100vh - ".concat(props.topPosition, "px)"),
|
|
31
|
+
// This is for the bottom actions
|
|
32
|
+
"& > :not(:first-child) > button > span": {
|
|
33
|
+
marginBottom: 0
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
panelCollapsed: {
|
|
37
|
+
width: props.collapsedPanelWidth,
|
|
38
|
+
height: "calc(100vh - ".concat(props.topPosition, "px)"),
|
|
39
|
+
// This is for the bottom actions
|
|
40
|
+
"& > :not(:first-child)": {
|
|
41
|
+
padding: theme.hvSpacing("xs", "xs", "sm", "xs"),
|
|
42
|
+
"& > button > span": {
|
|
43
|
+
marginLeft: 0
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
// This is for the top menu items
|
|
47
|
+
"& > :first-child:not(:last-child)": {
|
|
48
|
+
padding: theme.hvSpacing("sm", "xs", "xs", "xs")
|
|
49
|
+
},
|
|
50
|
+
"& > nav > ul > li > div > div": {
|
|
51
|
+
marginLeft: "6px"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
collapseButton: _objectSpread(_objectSpread({}, theme.hv.typography.normalText), {}, {
|
|
55
|
+
width: "100%",
|
|
56
|
+
"& > span": {
|
|
57
|
+
justifyContent: "flex-start"
|
|
58
|
+
}
|
|
59
|
+
}),
|
|
60
|
+
expandButton: {
|
|
61
|
+
width: "100%",
|
|
62
|
+
minWidth: "unset",
|
|
63
|
+
"& > span > span": {
|
|
64
|
+
marginLeft: "unset"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
collapseTextContainer: {
|
|
68
|
+
width: "100%",
|
|
69
|
+
textAlign: "left"
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
var _default = styles;
|
|
75
|
+
exports.default = _default;
|
|
76
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","props","makeStyles","theme","panel","position","top","topPosition","left","zIndex","panelExpanded","width","expandedPanelWidth","height","marginBottom","panelCollapsed","collapsedPanelWidth","padding","hvSpacing","marginLeft","collapseButton","hv","typography","normalText","justifyContent","expandButton","minWidth","collapseTextContainer","textAlign"],"sources":["../../src/VerticalNavigation/styles.js"],"sourcesContent":["import { makeStyles } from \"@mui/styles\";\n\nconst styles = (props) =>\n makeStyles((theme) => ({\n panel: {\n position: \"fixed\",\n top: props.topPosition,\n left: 0,\n zIndex: 1100,\n },\n panelExpanded: {\n width: props.expandedPanelWidth,\n height: `calc(100vh - ${props.topPosition}px)`,\n\n // This is for the bottom actions\n \"& > :not(:first-child) > button > span\": {\n marginBottom: 0,\n },\n },\n panelCollapsed: {\n width: props.collapsedPanelWidth,\n height: `calc(100vh - ${props.topPosition}px)`,\n\n // This is for the bottom actions\n \"& > :not(:first-child)\": {\n padding: theme.hvSpacing(\"xs\", \"xs\", \"sm\", \"xs\"),\n\n \"& > button > span\": {\n marginLeft: 0,\n },\n },\n // This is for the top menu items\n \"& > :first-child:not(:last-child)\": {\n padding: theme.hvSpacing(\"sm\", \"xs\", \"xs\", \"xs\"),\n },\n\n \"& > nav > ul > li > div > div\": {\n marginLeft: \"6px\",\n },\n },\n collapseButton: {\n ...theme.hv.typography.normalText,\n width: \"100%\",\n\n \"& > span\": {\n justifyContent: \"flex-start\",\n },\n },\n expandButton: {\n width: \"100%\",\n minWidth: \"unset\",\n\n \"& > span > span\": {\n marginLeft: \"unset\",\n },\n },\n collapseTextContainer: {\n width: \"100%\",\n textAlign: \"left\",\n },\n }));\n\nexport default styles;\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAyC;AAAA;AAEzC,IAAMA,MAAM,GAAG,SAATA,MAAM,CAAIC,KAAK;EAAA,OACnB,IAAAC,kBAAU,EAAC,UAACC,KAAK;IAAA,OAAM;MACrBC,KAAK,EAAE;QACLC,QAAQ,EAAE,OAAO;QACjBC,GAAG,EAAEL,KAAK,CAACM,WAAW;QACtBC,IAAI,EAAE,CAAC;QACPC,MAAM,EAAE;MACV,CAAC;MACDC,aAAa,EAAE;QACbC,KAAK,EAAEV,KAAK,CAACW,kBAAkB;QAC/BC,MAAM,yBAAkBZ,KAAK,CAACM,WAAW,QAAK;QAE9C;QACA,wCAAwC,EAAE;UACxCO,YAAY,EAAE;QAChB;MACF,CAAC;MACDC,cAAc,EAAE;QACdJ,KAAK,EAAEV,KAAK,CAACe,mBAAmB;QAChCH,MAAM,yBAAkBZ,KAAK,CAACM,WAAW,QAAK;QAE9C;QACA,wBAAwB,EAAE;UACxBU,OAAO,EAAEd,KAAK,CAACe,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;UAEhD,mBAAmB,EAAE;YACnBC,UAAU,EAAE;UACd;QACF,CAAC;QACD;QACA,mCAAmC,EAAE;UACnCF,OAAO,EAAEd,KAAK,CAACe,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;QACjD,CAAC;QAED,+BAA+B,EAAE;UAC/BC,UAAU,EAAE;QACd;MACF,CAAC;MACDC,cAAc,kCACTjB,KAAK,CAACkB,EAAE,CAACC,UAAU,CAACC,UAAU;QACjCZ,KAAK,EAAE,MAAM;QAEb,UAAU,EAAE;UACVa,cAAc,EAAE;QAClB;MAAC,EACF;MACDC,YAAY,EAAE;QACZd,KAAK,EAAE,MAAM;QACbe,QAAQ,EAAE,OAAO;QAEjB,iBAAiB,EAAE;UACjBP,UAAU,EAAE;QACd;MACF,CAAC;MACDQ,qBAAqB,EAAE;QACrBhB,KAAK,EAAE,MAAM;QACbiB,SAAS,EAAE;MACb;IACF,CAAC;EAAA,CAAC,CAAC;AAAA;AAAC,eAES5B,MAAM;AAAA"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -22,7 +22,8 @@ var _exportNames = {
|
|
|
22
22
|
HvNotificationPanel: true,
|
|
23
23
|
HvStepNavigation: true,
|
|
24
24
|
HvTimeAgo: true,
|
|
25
|
-
HvWizard: true
|
|
25
|
+
HvWizard: true,
|
|
26
|
+
HvVerticalNavigation: true
|
|
26
27
|
};
|
|
27
28
|
Object.defineProperty(exports, "HvColorPicker", {
|
|
28
29
|
enumerable: true,
|
|
@@ -72,6 +73,12 @@ Object.defineProperty(exports, "HvTimeAgo", {
|
|
|
72
73
|
return _TimeAgo.default;
|
|
73
74
|
}
|
|
74
75
|
});
|
|
76
|
+
Object.defineProperty(exports, "HvVerticalNavigation", {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function get() {
|
|
79
|
+
return _VerticalNavigation.default;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
75
82
|
Object.defineProperty(exports, "HvWizard", {
|
|
76
83
|
enumerable: true,
|
|
77
84
|
get: function get() {
|
|
@@ -109,6 +116,7 @@ Object.keys(_Wizard).forEach(function (key) {
|
|
|
109
116
|
}
|
|
110
117
|
});
|
|
111
118
|
});
|
|
119
|
+
var _VerticalNavigation = _interopRequireDefault(require("./VerticalNavigation"));
|
|
112
120
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
113
121
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
114
122
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.js"],"sourcesContent":["export { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvImageCarousel } from \"./ImageCarousel\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvStepNavigation } from \"./StepNavigation\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvWizard } from \"./Wizard\";\nexport * from \"./Wizard\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.js"],"sourcesContent":["export { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvImageCarousel } from \"./ImageCarousel\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvStepNavigation } from \"./StepNavigation\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvWizard } from \"./Wizard\";\nexport * from \"./Wizard\";\nexport { default as HvVerticalNavigation } from \"./VerticalNavigation\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAuE;AAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { NavigationData } from "@hitachivantara/uikit-react-core";
|
|
2
|
+
|
|
3
|
+
export interface HvVerticalNavigationProps {
|
|
4
|
+
/**
|
|
5
|
+
* Id to be applied to the root node of the panel.
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Called when a menu item is clicked.
|
|
10
|
+
*/
|
|
11
|
+
onNavigationChange?: Function;
|
|
12
|
+
/**
|
|
13
|
+
* An array containing the data for each menu item.
|
|
14
|
+
*/
|
|
15
|
+
data: NavigationData[];
|
|
16
|
+
/**
|
|
17
|
+
* Text to be displayed in the collpase area when the panel is expanded.
|
|
18
|
+
*/
|
|
19
|
+
collapseLabel?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The ID of the selected page.
|
|
22
|
+
*/
|
|
23
|
+
selected?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The top value where the panel will be rendered. Default is 44 as it is the height of the Header component.
|
|
26
|
+
*/
|
|
27
|
+
topPosition?: number;
|
|
28
|
+
/**
|
|
29
|
+
* The width of the panel when expanded. Default value is 300.
|
|
30
|
+
*/
|
|
31
|
+
expandedPanelWidth?: number;
|
|
32
|
+
/**
|
|
33
|
+
* The width of the panel when collapsed. Default vlaue is 52.
|
|
34
|
+
*/
|
|
35
|
+
collapsedPanelWidth?: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default function HvVerticalNavigation(props: HvVerticalNavigationProps): JSX.Element | null;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
var _Backwards, _Forwards;
|
|
3
|
+
import React, { useState } from "react";
|
|
4
|
+
import { withStyles } from "@mui/styles";
|
|
5
|
+
import PropTypes from "prop-types";
|
|
6
|
+
import clsx from "clsx";
|
|
7
|
+
import { HvVerticalNavigation as HvVerticalNavigationCore, HvVerticalNavigationTree, HvVerticalNavigationActions, HvButton, setId } from "@hitachivantara/uikit-react-core";
|
|
8
|
+
import { Backwards, Forwards } from "@hitachivantara/uikit-react-icons";
|
|
9
|
+
import useStyles from "./styles";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
var HvVerticalNavigation = function HvVerticalNavigation(_ref) {
|
|
13
|
+
var id = _ref.id,
|
|
14
|
+
onNavigationChange = _ref.onNavigationChange,
|
|
15
|
+
data = _ref.data,
|
|
16
|
+
selected = _ref.selected,
|
|
17
|
+
collapseLabel = _ref.collapseLabel,
|
|
18
|
+
topPosition = _ref.topPosition,
|
|
19
|
+
expandedPanelWidth = _ref.expandedPanelWidth,
|
|
20
|
+
collapsedPanelWidth = _ref.collapsedPanelWidth;
|
|
21
|
+
var classes = useStyles({
|
|
22
|
+
topPosition: topPosition,
|
|
23
|
+
expandedPanelWidth: expandedPanelWidth,
|
|
24
|
+
collapsedPanelWidth: collapsedPanelWidth
|
|
25
|
+
})();
|
|
26
|
+
var _useState = useState(true),
|
|
27
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
28
|
+
isExpanded = _useState2[0],
|
|
29
|
+
setIsExpanded = _useState2[1];
|
|
30
|
+
var handleVerticalNavigationChange = function handleVerticalNavigationChange(event, item) {
|
|
31
|
+
onNavigationChange === null || onNavigationChange === void 0 ? void 0 : onNavigationChange(event, item);
|
|
32
|
+
};
|
|
33
|
+
var handleExpandToggle = function handleExpandToggle() {
|
|
34
|
+
setIsExpanded(function (prevState) {
|
|
35
|
+
return !prevState;
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
return /*#__PURE__*/_jsxs(HvVerticalNavigationCore, {
|
|
39
|
+
className: clsx(classes.panel, isExpanded ? classes.panelExpanded : classes.panelCollapsed),
|
|
40
|
+
children: [/*#__PURE__*/_jsx(HvVerticalNavigationTree, {
|
|
41
|
+
collapsible: true,
|
|
42
|
+
data: data,
|
|
43
|
+
selected: selected,
|
|
44
|
+
onChange: handleVerticalNavigationChange
|
|
45
|
+
}), /*#__PURE__*/_jsx(HvVerticalNavigationActions, {
|
|
46
|
+
children: /*#__PURE__*/_jsx(HvButton, {
|
|
47
|
+
id: setId(id, "button-toggle"),
|
|
48
|
+
className: clsx(isExpanded ? classes.collapseButton : classes.expandButton),
|
|
49
|
+
category: "ghost",
|
|
50
|
+
startIcon: isExpanded ? _Backwards || (_Backwards = /*#__PURE__*/_jsx(Backwards, {
|
|
51
|
+
iconSize: "XS"
|
|
52
|
+
})) : _Forwards || (_Forwards = /*#__PURE__*/_jsx(Forwards, {
|
|
53
|
+
iconSize: "XS"
|
|
54
|
+
})),
|
|
55
|
+
onClick: handleExpandToggle,
|
|
56
|
+
children: isExpanded && /*#__PURE__*/_jsx("span", {
|
|
57
|
+
className: classes.collapseTextContainer,
|
|
58
|
+
children: collapseLabel
|
|
59
|
+
})
|
|
60
|
+
})
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
process.env.NODE_ENV !== "production" ? HvVerticalNavigation.propTypes = {
|
|
65
|
+
/**
|
|
66
|
+
* Id to be applied to the root node of the panel.
|
|
67
|
+
*/
|
|
68
|
+
id: PropTypes.string,
|
|
69
|
+
/**
|
|
70
|
+
* Called when a menu item is clicked.
|
|
71
|
+
*/
|
|
72
|
+
onNavigationChange: PropTypes.func,
|
|
73
|
+
/**
|
|
74
|
+
* An array containing the data for each menu item.
|
|
75
|
+
*
|
|
76
|
+
* id - the id to be applied to the root element.
|
|
77
|
+
* label - the label to be rendered on the menu item.
|
|
78
|
+
* icon - the icon component.
|
|
79
|
+
* data - sub-menu items
|
|
80
|
+
* href - the url used for navigation.
|
|
81
|
+
* target - the behavior when opening an url.
|
|
82
|
+
*/
|
|
83
|
+
data: PropTypes.arrayOf(PropTypes.shape({
|
|
84
|
+
id: PropTypes.string.isRequired,
|
|
85
|
+
label: PropTypes.string.isRequired,
|
|
86
|
+
icon: PropTypes.node,
|
|
87
|
+
data: PropTypes.array,
|
|
88
|
+
href: PropTypes.string,
|
|
89
|
+
target: PropTypes.string
|
|
90
|
+
})).isRequired,
|
|
91
|
+
/**
|
|
92
|
+
* Text to be displayed in the collpase area when the panel is expanded.
|
|
93
|
+
*/
|
|
94
|
+
collapseLabel: PropTypes.string,
|
|
95
|
+
/**
|
|
96
|
+
* The ID of the selected page.
|
|
97
|
+
*/
|
|
98
|
+
selected: PropTypes.string,
|
|
99
|
+
/**
|
|
100
|
+
* The top value where the panel will be rendered. Default is 44 as it is the height of the Header component.
|
|
101
|
+
*/
|
|
102
|
+
topPosition: PropTypes.number,
|
|
103
|
+
/**
|
|
104
|
+
* The width of the panel when expanded. Default value is 300.
|
|
105
|
+
*/
|
|
106
|
+
expandedPanelWidth: PropTypes.number,
|
|
107
|
+
/**
|
|
108
|
+
* The width of the panel when collapsed. Default vlaue is 52.
|
|
109
|
+
*/
|
|
110
|
+
collapsedPanelWidth: PropTypes.number
|
|
111
|
+
} : void 0;
|
|
112
|
+
HvVerticalNavigation.defaultProps = {
|
|
113
|
+
collapseLabel: "Collapse",
|
|
114
|
+
topPosition: 44,
|
|
115
|
+
expandedPanelWidth: 300,
|
|
116
|
+
collapsedPanelWidth: 52
|
|
117
|
+
};
|
|
118
|
+
export default withStyles(useStyles, {
|
|
119
|
+
name: "HvVerticalNavigation"
|
|
120
|
+
})(HvVerticalNavigation);
|
|
121
|
+
//# sourceMappingURL=VerticalNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VerticalNavigation.js","names":["React","useState","withStyles","PropTypes","clsx","HvVerticalNavigation","HvVerticalNavigationCore","HvVerticalNavigationTree","HvVerticalNavigationActions","HvButton","setId","Backwards","Forwards","useStyles","id","onNavigationChange","data","selected","collapseLabel","topPosition","expandedPanelWidth","collapsedPanelWidth","classes","isExpanded","setIsExpanded","handleVerticalNavigationChange","event","item","handleExpandToggle","prevState","panel","panelExpanded","panelCollapsed","collapseButton","expandButton","collapseTextContainer","propTypes","string","func","arrayOf","shape","isRequired","label","icon","node","array","href","target","number","defaultProps","name"],"sources":["../../../src/VerticalNavigation/VerticalNavigation.js"],"sourcesContent":["import React, { useState } from \"react\";\nimport { withStyles } from \"@mui/styles\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport {\n HvVerticalNavigation as HvVerticalNavigationCore,\n HvVerticalNavigationTree,\n HvVerticalNavigationActions,\n HvButton,\n setId,\n} from \"@hitachivantara/uikit-react-core\";\nimport { Backwards, Forwards } from \"@hitachivantara/uikit-react-icons\";\n\nimport useStyles from \"./styles\";\n\nconst HvVerticalNavigation = ({\n id,\n onNavigationChange,\n data,\n selected,\n collapseLabel,\n\n topPosition,\n expandedPanelWidth,\n collapsedPanelWidth,\n}) => {\n const classes = useStyles({ topPosition, expandedPanelWidth, collapsedPanelWidth })();\n\n const [isExpanded, setIsExpanded] = useState(true);\n\n const handleVerticalNavigationChange = (event, item) => {\n onNavigationChange?.(event, item);\n };\n\n const handleExpandToggle = () => {\n setIsExpanded((prevState) => !prevState);\n };\n\n return (\n <HvVerticalNavigationCore\n className={clsx(classes.panel, {\n [classes.panelExpanded]: isExpanded,\n [classes.panelCollapsed]: !isExpanded,\n })}\n >\n <HvVerticalNavigationTree\n collapsible\n data={data}\n selected={selected}\n onChange={handleVerticalNavigationChange}\n />\n\n <HvVerticalNavigationActions>\n <HvButton\n id={setId(id, \"button-toggle\")}\n className={clsx({\n [classes.collapseButton]: isExpanded,\n [classes.expandButton]: !isExpanded,\n })}\n category=\"ghost\"\n startIcon={isExpanded ? <Backwards iconSize=\"XS\" /> : <Forwards iconSize=\"XS\" />}\n onClick={handleExpandToggle}\n >\n {isExpanded && <span className={classes.collapseTextContainer}>{collapseLabel}</span>}\n </HvButton>\n </HvVerticalNavigationActions>\n </HvVerticalNavigationCore>\n );\n};\n\nHvVerticalNavigation.propTypes = {\n /**\n * Id to be applied to the root node of the panel.\n */\n id: PropTypes.string,\n /**\n * Called when a menu item is clicked.\n */\n onNavigationChange: PropTypes.func,\n /**\n * An array containing the data for each menu item.\n *\n * id - the id to be applied to the root element.\n * label - the label to be rendered on the menu item.\n * icon - the icon component.\n * data - sub-menu items\n * href - the url used for navigation.\n * target - the behavior when opening an url.\n */\n data: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n icon: PropTypes.node,\n data: PropTypes.array,\n href: PropTypes.string,\n target: PropTypes.string,\n })\n ).isRequired,\n /**\n * Text to be displayed in the collpase area when the panel is expanded.\n */\n collapseLabel: PropTypes.string,\n /**\n * The ID of the selected page.\n */\n selected: PropTypes.string,\n /**\n * The top value where the panel will be rendered. Default is 44 as it is the height of the Header component.\n */\n topPosition: PropTypes.number,\n /**\n * The width of the panel when expanded. Default value is 300.\n */\n expandedPanelWidth: PropTypes.number,\n /**\n * The width of the panel when collapsed. Default vlaue is 52.\n */\n collapsedPanelWidth: PropTypes.number,\n};\n\nHvVerticalNavigation.defaultProps = {\n collapseLabel: \"Collapse\",\n topPosition: 44,\n expandedPanelWidth: 300,\n collapsedPanelWidth: 52,\n};\n\nexport default withStyles(useStyles, { name: \"HvVerticalNavigation\" })(HvVerticalNavigation);\n"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../src/VerticalNavigation/index.js"],"sourcesContent":["export { default } from \"./VerticalNavigation\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,sBAAsB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import "core-js/modules/es.object.keys.js";
|
|
2
|
+
import "core-js/modules/es.symbol.js";
|
|
3
|
+
import "core-js/modules/es.array.filter.js";
|
|
4
|
+
import "core-js/modules/es.object.to-string.js";
|
|
5
|
+
import "core-js/modules/es.object.get-own-property-descriptor.js";
|
|
6
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
|
7
|
+
import "core-js/modules/es.object.get-own-property-descriptors.js";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
|
+
import { makeStyles } from "@mui/styles";
|
|
12
|
+
var styles = function styles(props) {
|
|
13
|
+
return makeStyles(function (theme) {
|
|
14
|
+
return {
|
|
15
|
+
panel: {
|
|
16
|
+
position: "fixed",
|
|
17
|
+
top: props.topPosition,
|
|
18
|
+
left: 0,
|
|
19
|
+
zIndex: 1100
|
|
20
|
+
},
|
|
21
|
+
panelExpanded: {
|
|
22
|
+
width: props.expandedPanelWidth,
|
|
23
|
+
height: "calc(100vh - ".concat(props.topPosition, "px)"),
|
|
24
|
+
// This is for the bottom actions
|
|
25
|
+
"& > :not(:first-child) > button > span": {
|
|
26
|
+
marginBottom: 0
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
panelCollapsed: {
|
|
30
|
+
width: props.collapsedPanelWidth,
|
|
31
|
+
height: "calc(100vh - ".concat(props.topPosition, "px)"),
|
|
32
|
+
// This is for the bottom actions
|
|
33
|
+
"& > :not(:first-child)": {
|
|
34
|
+
padding: theme.hvSpacing("xs", "xs", "sm", "xs"),
|
|
35
|
+
"& > button > span": {
|
|
36
|
+
marginLeft: 0
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
// This is for the top menu items
|
|
40
|
+
"& > :first-child:not(:last-child)": {
|
|
41
|
+
padding: theme.hvSpacing("sm", "xs", "xs", "xs")
|
|
42
|
+
},
|
|
43
|
+
"& > nav > ul > li > div > div": {
|
|
44
|
+
marginLeft: "6px"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
collapseButton: _objectSpread(_objectSpread({}, theme.hv.typography.normalText), {}, {
|
|
48
|
+
width: "100%",
|
|
49
|
+
"& > span": {
|
|
50
|
+
justifyContent: "flex-start"
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
53
|
+
expandButton: {
|
|
54
|
+
width: "100%",
|
|
55
|
+
minWidth: "unset",
|
|
56
|
+
"& > span > span": {
|
|
57
|
+
marginLeft: "unset"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
collapseTextContainer: {
|
|
61
|
+
width: "100%",
|
|
62
|
+
textAlign: "left"
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
export default styles;
|
|
68
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","names":["makeStyles","styles","props","theme","panel","position","top","topPosition","left","zIndex","panelExpanded","width","expandedPanelWidth","height","marginBottom","panelCollapsed","collapsedPanelWidth","padding","hvSpacing","marginLeft","collapseButton","hv","typography","normalText","justifyContent","expandButton","minWidth","collapseTextContainer","textAlign"],"sources":["../../../src/VerticalNavigation/styles.js"],"sourcesContent":["import { makeStyles } from \"@mui/styles\";\n\nconst styles = (props) =>\n makeStyles((theme) => ({\n panel: {\n position: \"fixed\",\n top: props.topPosition,\n left: 0,\n zIndex: 1100,\n },\n panelExpanded: {\n width: props.expandedPanelWidth,\n height: `calc(100vh - ${props.topPosition}px)`,\n\n // This is for the bottom actions\n \"& > :not(:first-child) > button > span\": {\n marginBottom: 0,\n },\n },\n panelCollapsed: {\n width: props.collapsedPanelWidth,\n height: `calc(100vh - ${props.topPosition}px)`,\n\n // This is for the bottom actions\n \"& > :not(:first-child)\": {\n padding: theme.hvSpacing(\"xs\", \"xs\", \"sm\", \"xs\"),\n\n \"& > button > span\": {\n marginLeft: 0,\n },\n },\n // This is for the top menu items\n \"& > :first-child:not(:last-child)\": {\n padding: theme.hvSpacing(\"sm\", \"xs\", \"xs\", \"xs\"),\n },\n\n \"& > nav > ul > li > div > div\": {\n marginLeft: \"6px\",\n },\n },\n collapseButton: {\n ...theme.hv.typography.normalText,\n width: \"100%\",\n\n \"& > span\": {\n justifyContent: \"flex-start\",\n },\n },\n expandButton: {\n width: \"100%\",\n minWidth: \"unset\",\n\n \"& > span > span\": {\n marginLeft: \"unset\",\n },\n },\n collapseTextContainer: {\n width: \"100%\",\n textAlign: \"left\",\n },\n }));\n\nexport default styles;\n"],"mappings":";;;;;;;;;;AAAA,SAASA,UAAU,QAAQ,aAAa;AAExC,IAAMC,MAAM,GAAG,SAATA,MAAM,CAAIC,KAAK;EAAA,OACnBF,UAAU,CAAC,UAACG,KAAK;IAAA,OAAM;MACrBC,KAAK,EAAE;QACLC,QAAQ,EAAE,OAAO;QACjBC,GAAG,EAAEJ,KAAK,CAACK,WAAW;QACtBC,IAAI,EAAE,CAAC;QACPC,MAAM,EAAE;MACV,CAAC;MACDC,aAAa,EAAE;QACbC,KAAK,EAAET,KAAK,CAACU,kBAAkB;QAC/BC,MAAM,yBAAkBX,KAAK,CAACK,WAAW,QAAK;QAE9C;QACA,wCAAwC,EAAE;UACxCO,YAAY,EAAE;QAChB;MACF,CAAC;MACDC,cAAc,EAAE;QACdJ,KAAK,EAAET,KAAK,CAACc,mBAAmB;QAChCH,MAAM,yBAAkBX,KAAK,CAACK,WAAW,QAAK;QAE9C;QACA,wBAAwB,EAAE;UACxBU,OAAO,EAAEd,KAAK,CAACe,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;UAEhD,mBAAmB,EAAE;YACnBC,UAAU,EAAE;UACd;QACF,CAAC;QACD;QACA,mCAAmC,EAAE;UACnCF,OAAO,EAAEd,KAAK,CAACe,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;QACjD,CAAC;QAED,+BAA+B,EAAE;UAC/BC,UAAU,EAAE;QACd;MACF,CAAC;MACDC,cAAc,kCACTjB,KAAK,CAACkB,EAAE,CAACC,UAAU,CAACC,UAAU;QACjCZ,KAAK,EAAE,MAAM;QAEb,UAAU,EAAE;UACVa,cAAc,EAAE;QAClB;MAAC,EACF;MACDC,YAAY,EAAE;QACZd,KAAK,EAAE,MAAM;QACbe,QAAQ,EAAE,OAAO;QAEjB,iBAAiB,EAAE;UACjBP,UAAU,EAAE;QACd;MACF,CAAC;MACDQ,qBAAqB,EAAE;QACrBhB,KAAK,EAAE,MAAM;QACbiB,SAAS,EAAE;MACb;IACF,CAAC;EAAA,CAAC,CAAC;AAAA;AAEL,eAAe3B,MAAM"}
|
package/dist/legacy/index.d.ts
CHANGED
package/dist/legacy/index.js
CHANGED
package/dist/legacy/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","HvColorPicker","HvDrawer","HvImageCarousel","HvInlineEditor","HvNavigationAnchors","HvNotificationPanel","HvStepNavigation","HvTimeAgo","HvWizard"],"sources":["../../src/index.js"],"sourcesContent":["export { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvImageCarousel } from \"./ImageCarousel\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvStepNavigation } from \"./StepNavigation\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvWizard } from \"./Wizard\";\nexport * from \"./Wizard\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,aAAa,QAAQ,eAAe;AACxD,SAASD,OAAO,IAAIE,QAAQ,QAAQ,UAAU;AAC9C,SAASF,OAAO,IAAIG,eAAe,QAAQ,iBAAiB;AAC5D,SAASH,OAAO,IAAII,cAAc,QAAQ,gBAAgB;AAC1D,SAASJ,OAAO,IAAIK,mBAAmB,QAAQ,qBAAqB;AACpE,SAASL,OAAO,IAAIM,mBAAmB,QAAQ,qBAAqB;AACpE,SAASN,OAAO,IAAIO,gBAAgB,QAAQ,kBAAkB;AAC9D,SAASP,OAAO,IAAIQ,SAAS,QAAQ,WAAW;AAChD,cAAc,WAAW;AACzB,SAASR,OAAO,IAAIS,QAAQ,QAAQ,UAAU;AAC9C,cAAc,UAAU"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","HvColorPicker","HvDrawer","HvImageCarousel","HvInlineEditor","HvNavigationAnchors","HvNotificationPanel","HvStepNavigation","HvTimeAgo","HvWizard","HvVerticalNavigation"],"sources":["../../src/index.js"],"sourcesContent":["export { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvImageCarousel } from \"./ImageCarousel\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvStepNavigation } from \"./StepNavigation\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvWizard } from \"./Wizard\";\nexport * from \"./Wizard\";\nexport { default as HvVerticalNavigation } from \"./VerticalNavigation\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,aAAa,QAAQ,eAAe;AACxD,SAASD,OAAO,IAAIE,QAAQ,QAAQ,UAAU;AAC9C,SAASF,OAAO,IAAIG,eAAe,QAAQ,iBAAiB;AAC5D,SAASH,OAAO,IAAII,cAAc,QAAQ,gBAAgB;AAC1D,SAASJ,OAAO,IAAIK,mBAAmB,QAAQ,qBAAqB;AACpE,SAASL,OAAO,IAAIM,mBAAmB,QAAQ,qBAAqB;AACpE,SAASN,OAAO,IAAIO,gBAAgB,QAAQ,kBAAkB;AAC9D,SAASP,OAAO,IAAIQ,SAAS,QAAQ,WAAW;AAChD,cAAc,WAAW;AACzB,SAASR,OAAO,IAAIS,QAAQ,QAAQ,UAAU;AAC9C,cAAc,UAAU;AACxB,SAAST,OAAO,IAAIU,oBAAoB,QAAQ,sBAAsB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { NavigationData } from "@hitachivantara/uikit-react-core";
|
|
2
|
+
|
|
3
|
+
export interface HvVerticalNavigationProps {
|
|
4
|
+
/**
|
|
5
|
+
* Id to be applied to the root node of the panel.
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Called when a menu item is clicked.
|
|
10
|
+
*/
|
|
11
|
+
onNavigationChange?: Function;
|
|
12
|
+
/**
|
|
13
|
+
* An array containing the data for each menu item.
|
|
14
|
+
*/
|
|
15
|
+
data: NavigationData[];
|
|
16
|
+
/**
|
|
17
|
+
* Text to be displayed in the collpase area when the panel is expanded.
|
|
18
|
+
*/
|
|
19
|
+
collapseLabel?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The ID of the selected page.
|
|
22
|
+
*/
|
|
23
|
+
selected?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The top value where the panel will be rendered. Default is 44 as it is the height of the Header component.
|
|
26
|
+
*/
|
|
27
|
+
topPosition?: number;
|
|
28
|
+
/**
|
|
29
|
+
* The width of the panel when expanded. Default value is 300.
|
|
30
|
+
*/
|
|
31
|
+
expandedPanelWidth?: number;
|
|
32
|
+
/**
|
|
33
|
+
* The width of the panel when collapsed. Default vlaue is 52.
|
|
34
|
+
*/
|
|
35
|
+
collapsedPanelWidth?: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default function HvVerticalNavigation(props: HvVerticalNavigationProps): JSX.Element | null;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
var _Backwards, _Forwards;
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { withStyles } from "@mui/styles";
|
|
4
|
+
import PropTypes from "prop-types";
|
|
5
|
+
import clsx from "clsx";
|
|
6
|
+
import { HvVerticalNavigation as HvVerticalNavigationCore, HvVerticalNavigationTree, HvVerticalNavigationActions, HvButton, setId } from "@hitachivantara/uikit-react-core";
|
|
7
|
+
import { Backwards, Forwards } from "@hitachivantara/uikit-react-icons";
|
|
8
|
+
import useStyles from "./styles";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
const HvVerticalNavigation = ({
|
|
12
|
+
id,
|
|
13
|
+
onNavigationChange,
|
|
14
|
+
data,
|
|
15
|
+
selected,
|
|
16
|
+
collapseLabel,
|
|
17
|
+
topPosition,
|
|
18
|
+
expandedPanelWidth,
|
|
19
|
+
collapsedPanelWidth
|
|
20
|
+
}) => {
|
|
21
|
+
const classes = useStyles({
|
|
22
|
+
topPosition,
|
|
23
|
+
expandedPanelWidth,
|
|
24
|
+
collapsedPanelWidth
|
|
25
|
+
})();
|
|
26
|
+
const [isExpanded, setIsExpanded] = useState(true);
|
|
27
|
+
const handleVerticalNavigationChange = (event, item) => {
|
|
28
|
+
onNavigationChange === null || onNavigationChange === void 0 ? void 0 : onNavigationChange(event, item);
|
|
29
|
+
};
|
|
30
|
+
const handleExpandToggle = () => {
|
|
31
|
+
setIsExpanded(prevState => !prevState);
|
|
32
|
+
};
|
|
33
|
+
return /*#__PURE__*/_jsxs(HvVerticalNavigationCore, {
|
|
34
|
+
className: clsx(classes.panel, isExpanded ? classes.panelExpanded : classes.panelCollapsed),
|
|
35
|
+
children: [/*#__PURE__*/_jsx(HvVerticalNavigationTree, {
|
|
36
|
+
collapsible: true,
|
|
37
|
+
data: data,
|
|
38
|
+
selected: selected,
|
|
39
|
+
onChange: handleVerticalNavigationChange
|
|
40
|
+
}), /*#__PURE__*/_jsx(HvVerticalNavigationActions, {
|
|
41
|
+
children: /*#__PURE__*/_jsx(HvButton, {
|
|
42
|
+
id: setId(id, "button-toggle"),
|
|
43
|
+
className: clsx(isExpanded ? classes.collapseButton : classes.expandButton),
|
|
44
|
+
category: "ghost",
|
|
45
|
+
startIcon: isExpanded ? _Backwards || (_Backwards = /*#__PURE__*/_jsx(Backwards, {
|
|
46
|
+
iconSize: "XS"
|
|
47
|
+
})) : _Forwards || (_Forwards = /*#__PURE__*/_jsx(Forwards, {
|
|
48
|
+
iconSize: "XS"
|
|
49
|
+
})),
|
|
50
|
+
onClick: handleExpandToggle,
|
|
51
|
+
children: isExpanded && /*#__PURE__*/_jsx("span", {
|
|
52
|
+
className: classes.collapseTextContainer,
|
|
53
|
+
children: collapseLabel
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
})]
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
process.env.NODE_ENV !== "production" ? HvVerticalNavigation.propTypes = {
|
|
60
|
+
/**
|
|
61
|
+
* Id to be applied to the root node of the panel.
|
|
62
|
+
*/
|
|
63
|
+
id: PropTypes.string,
|
|
64
|
+
/**
|
|
65
|
+
* Called when a menu item is clicked.
|
|
66
|
+
*/
|
|
67
|
+
onNavigationChange: PropTypes.func,
|
|
68
|
+
/**
|
|
69
|
+
* An array containing the data for each menu item.
|
|
70
|
+
*
|
|
71
|
+
* id - the id to be applied to the root element.
|
|
72
|
+
* label - the label to be rendered on the menu item.
|
|
73
|
+
* icon - the icon component.
|
|
74
|
+
* data - sub-menu items
|
|
75
|
+
* href - the url used for navigation.
|
|
76
|
+
* target - the behavior when opening an url.
|
|
77
|
+
*/
|
|
78
|
+
data: PropTypes.arrayOf(PropTypes.shape({
|
|
79
|
+
id: PropTypes.string.isRequired,
|
|
80
|
+
label: PropTypes.string.isRequired,
|
|
81
|
+
icon: PropTypes.node,
|
|
82
|
+
data: PropTypes.array,
|
|
83
|
+
href: PropTypes.string,
|
|
84
|
+
target: PropTypes.string
|
|
85
|
+
})).isRequired,
|
|
86
|
+
/**
|
|
87
|
+
* Text to be displayed in the collpase area when the panel is expanded.
|
|
88
|
+
*/
|
|
89
|
+
collapseLabel: PropTypes.string,
|
|
90
|
+
/**
|
|
91
|
+
* The ID of the selected page.
|
|
92
|
+
*/
|
|
93
|
+
selected: PropTypes.string,
|
|
94
|
+
/**
|
|
95
|
+
* The top value where the panel will be rendered. Default is 44 as it is the height of the Header component.
|
|
96
|
+
*/
|
|
97
|
+
topPosition: PropTypes.number,
|
|
98
|
+
/**
|
|
99
|
+
* The width of the panel when expanded. Default value is 300.
|
|
100
|
+
*/
|
|
101
|
+
expandedPanelWidth: PropTypes.number,
|
|
102
|
+
/**
|
|
103
|
+
* The width of the panel when collapsed. Default vlaue is 52.
|
|
104
|
+
*/
|
|
105
|
+
collapsedPanelWidth: PropTypes.number
|
|
106
|
+
} : void 0;
|
|
107
|
+
HvVerticalNavigation.defaultProps = {
|
|
108
|
+
collapseLabel: "Collapse",
|
|
109
|
+
topPosition: 44,
|
|
110
|
+
expandedPanelWidth: 300,
|
|
111
|
+
collapsedPanelWidth: 52
|
|
112
|
+
};
|
|
113
|
+
export default withStyles(useStyles, {
|
|
114
|
+
name: "HvVerticalNavigation"
|
|
115
|
+
})(HvVerticalNavigation);
|
|
116
|
+
//# sourceMappingURL=VerticalNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VerticalNavigation.js","names":["React","useState","withStyles","PropTypes","clsx","HvVerticalNavigation","HvVerticalNavigationCore","HvVerticalNavigationTree","HvVerticalNavigationActions","HvButton","setId","Backwards","Forwards","useStyles","id","onNavigationChange","data","selected","collapseLabel","topPosition","expandedPanelWidth","collapsedPanelWidth","classes","isExpanded","setIsExpanded","handleVerticalNavigationChange","event","item","handleExpandToggle","prevState","panel","panelExpanded","panelCollapsed","collapseButton","expandButton","collapseTextContainer","propTypes","string","func","arrayOf","shape","isRequired","label","icon","node","array","href","target","number","defaultProps","name"],"sources":["../../../src/VerticalNavigation/VerticalNavigation.js"],"sourcesContent":["import React, { useState } from \"react\";\nimport { withStyles } from \"@mui/styles\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport {\n HvVerticalNavigation as HvVerticalNavigationCore,\n HvVerticalNavigationTree,\n HvVerticalNavigationActions,\n HvButton,\n setId,\n} from \"@hitachivantara/uikit-react-core\";\nimport { Backwards, Forwards } from \"@hitachivantara/uikit-react-icons\";\n\nimport useStyles from \"./styles\";\n\nconst HvVerticalNavigation = ({\n id,\n onNavigationChange,\n data,\n selected,\n collapseLabel,\n\n topPosition,\n expandedPanelWidth,\n collapsedPanelWidth,\n}) => {\n const classes = useStyles({ topPosition, expandedPanelWidth, collapsedPanelWidth })();\n\n const [isExpanded, setIsExpanded] = useState(true);\n\n const handleVerticalNavigationChange = (event, item) => {\n onNavigationChange?.(event, item);\n };\n\n const handleExpandToggle = () => {\n setIsExpanded((prevState) => !prevState);\n };\n\n return (\n <HvVerticalNavigationCore\n className={clsx(classes.panel, {\n [classes.panelExpanded]: isExpanded,\n [classes.panelCollapsed]: !isExpanded,\n })}\n >\n <HvVerticalNavigationTree\n collapsible\n data={data}\n selected={selected}\n onChange={handleVerticalNavigationChange}\n />\n\n <HvVerticalNavigationActions>\n <HvButton\n id={setId(id, \"button-toggle\")}\n className={clsx({\n [classes.collapseButton]: isExpanded,\n [classes.expandButton]: !isExpanded,\n })}\n category=\"ghost\"\n startIcon={isExpanded ? <Backwards iconSize=\"XS\" /> : <Forwards iconSize=\"XS\" />}\n onClick={handleExpandToggle}\n >\n {isExpanded && <span className={classes.collapseTextContainer}>{collapseLabel}</span>}\n </HvButton>\n </HvVerticalNavigationActions>\n </HvVerticalNavigationCore>\n );\n};\n\nHvVerticalNavigation.propTypes = {\n /**\n * Id to be applied to the root node of the panel.\n */\n id: PropTypes.string,\n /**\n * Called when a menu item is clicked.\n */\n onNavigationChange: PropTypes.func,\n /**\n * An array containing the data for each menu item.\n *\n * id - the id to be applied to the root element.\n * label - the label to be rendered on the menu item.\n * icon - the icon component.\n * data - sub-menu items\n * href - the url used for navigation.\n * target - the behavior when opening an url.\n */\n data: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n icon: PropTypes.node,\n data: PropTypes.array,\n href: PropTypes.string,\n target: PropTypes.string,\n })\n ).isRequired,\n /**\n * Text to be displayed in the collpase area when the panel is expanded.\n */\n collapseLabel: PropTypes.string,\n /**\n * The ID of the selected page.\n */\n selected: PropTypes.string,\n /**\n * The top value where the panel will be rendered. Default is 44 as it is the height of the Header component.\n */\n topPosition: PropTypes.number,\n /**\n * The width of the panel when expanded. Default value is 300.\n */\n expandedPanelWidth: PropTypes.number,\n /**\n * The width of the panel when collapsed. Default vlaue is 52.\n */\n collapsedPanelWidth: PropTypes.number,\n};\n\nHvVerticalNavigation.defaultProps = {\n collapseLabel: \"Collapse\",\n topPosition: 44,\n expandedPanelWidth: 300,\n collapsedPanelWidth: 52,\n};\n\nexport default withStyles(useStyles, { name: \"HvVerticalNavigation\" })(HvVerticalNavigation);\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,UAAU,QAAQ,aAAa;AACxC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,IAAI,MAAM,MAAM;AAEvB,SACEC,oBAAoB,IAAIC,wBAAwB,EAChDC,wBAAwB,EACxBC,2BAA2B,EAC3BC,QAAQ,EACRC,KAAK,QACA,kCAAkC;AACzC,SAASC,SAAS,EAAEC,QAAQ,QAAQ,mCAAmC;AAEvE,OAAOC,SAAS,MAAM,UAAU;AAAC;AAAA;AAEjC,MAAMR,oBAAoB,GAAG,CAAC;EAC5BS,EAAE;EACFC,kBAAkB;EAClBC,IAAI;EACJC,QAAQ;EACRC,aAAa;EAEbC,WAAW;EACXC,kBAAkB;EAClBC;AACF,CAAC,KAAK;EACJ,MAAMC,OAAO,GAAGT,SAAS,CAAC;IAAEM,WAAW;IAAEC,kBAAkB;IAAEC;EAAoB,CAAC,CAAC,EAAE;EAErF,MAAM,CAACE,UAAU,EAAEC,aAAa,CAAC,GAAGvB,QAAQ,CAAC,IAAI,CAAC;EAElD,MAAMwB,8BAA8B,GAAG,CAACC,KAAK,EAAEC,IAAI,KAAK;IACtDZ,kBAAkB,aAAlBA,kBAAkB,uBAAlBA,kBAAkB,CAAGW,KAAK,EAAEC,IAAI,CAAC;EACnC,CAAC;EAED,MAAMC,kBAAkB,GAAG,MAAM;IAC/BJ,aAAa,CAAEK,SAAS,IAAK,CAACA,SAAS,CAAC;EAC1C,CAAC;EAED,oBACE,MAAC,wBAAwB;IACvB,SAAS,EAAEzB,IAAI,CAACkB,OAAO,CAACQ,KAAK,EACFP,UAAU,GAAlCD,OAAO,CAACS,aAAa,GACrBT,OAAO,CAACU,cAAc,CACtB;IAAA,wBAEH,KAAC,wBAAwB;MACvB,WAAW;MACX,IAAI,EAAEhB,IAAK;MACX,QAAQ,EAAEC,QAAS;MACnB,QAAQ,EAAEQ;IAA+B,EACzC,eAEF,KAAC,2BAA2B;MAAA,uBAC1B,KAAC,QAAQ;QACP,EAAE,EAAEf,KAAK,CAACI,EAAE,EAAE,eAAe,CAAE;QAC/B,SAAS,EAAEV,IAAI,CACamB,UAAU,GAAnCD,OAAO,CAACW,cAAc,GACtBX,OAAO,CAACY,YAAY,CACpB;QACH,QAAQ,EAAC,OAAO;QAChB,SAAS,EAAEX,UAAU,4CAAG,KAAC,SAAS;UAAC,QAAQ,EAAC;QAAI,EAAG,2CAAG,KAAC,QAAQ;UAAC,QAAQ,EAAC;QAAI,EAAG,CAAC;QACjF,OAAO,EAAEK,kBAAmB;QAAA,UAE3BL,UAAU,iBAAI;UAAM,SAAS,EAAED,OAAO,CAACa,qBAAsB;UAAA,UAAEjB;QAAa;MAAQ;IAC5E,EACiB;EAAA,EACL;AAE/B,CAAC;AAED,wCAAAb,oBAAoB,CAAC+B,SAAS,GAAG;EAC/B;AACF;AACA;EACEtB,EAAE,EAAEX,SAAS,CAACkC,MAAM;EACpB;AACF;AACA;EACEtB,kBAAkB,EAAEZ,SAAS,CAACmC,IAAI;EAClC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEtB,IAAI,EAAEb,SAAS,CAACoC,OAAO,CACrBpC,SAAS,CAACqC,KAAK,CAAC;IACd1B,EAAE,EAAEX,SAAS,CAACkC,MAAM,CAACI,UAAU;IAC/BC,KAAK,EAAEvC,SAAS,CAACkC,MAAM,CAACI,UAAU;IAClCE,IAAI,EAAExC,SAAS,CAACyC,IAAI;IACpB5B,IAAI,EAAEb,SAAS,CAAC0C,KAAK;IACrBC,IAAI,EAAE3C,SAAS,CAACkC,MAAM;IACtBU,MAAM,EAAE5C,SAAS,CAACkC;EACpB,CAAC,CAAC,CACH,CAACI,UAAU;EACZ;AACF;AACA;EACEvB,aAAa,EAAEf,SAAS,CAACkC,MAAM;EAC/B;AACF;AACA;EACEpB,QAAQ,EAAEd,SAAS,CAACkC,MAAM;EAC1B;AACF;AACA;EACElB,WAAW,EAAEhB,SAAS,CAAC6C,MAAM;EAC7B;AACF;AACA;EACE5B,kBAAkB,EAAEjB,SAAS,CAAC6C,MAAM;EACpC;AACF;AACA;EACE3B,mBAAmB,EAAElB,SAAS,CAAC6C;AACjC,CAAC;AAED3C,oBAAoB,CAAC4C,YAAY,GAAG;EAClC/B,aAAa,EAAE,UAAU;EACzBC,WAAW,EAAE,EAAE;EACfC,kBAAkB,EAAE,GAAG;EACvBC,mBAAmB,EAAE;AACvB,CAAC;AAED,eAAenB,UAAU,CAACW,SAAS,EAAE;EAAEqC,IAAI,EAAE;AAAuB,CAAC,CAAC,CAAC7C,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../src/VerticalNavigation/index.js"],"sourcesContent":["export { default } from \"./VerticalNavigation\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,sBAAsB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
import { makeStyles } from "@mui/styles";
|
|
5
|
+
const styles = props => makeStyles(theme => ({
|
|
6
|
+
panel: {
|
|
7
|
+
position: "fixed",
|
|
8
|
+
top: props.topPosition,
|
|
9
|
+
left: 0,
|
|
10
|
+
zIndex: 1100
|
|
11
|
+
},
|
|
12
|
+
panelExpanded: {
|
|
13
|
+
width: props.expandedPanelWidth,
|
|
14
|
+
height: `calc(100vh - ${props.topPosition}px)`,
|
|
15
|
+
// This is for the bottom actions
|
|
16
|
+
"& > :not(:first-child) > button > span": {
|
|
17
|
+
marginBottom: 0
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
panelCollapsed: {
|
|
21
|
+
width: props.collapsedPanelWidth,
|
|
22
|
+
height: `calc(100vh - ${props.topPosition}px)`,
|
|
23
|
+
// This is for the bottom actions
|
|
24
|
+
"& > :not(:first-child)": {
|
|
25
|
+
padding: theme.hvSpacing("xs", "xs", "sm", "xs"),
|
|
26
|
+
"& > button > span": {
|
|
27
|
+
marginLeft: 0
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
// This is for the top menu items
|
|
31
|
+
"& > :first-child:not(:last-child)": {
|
|
32
|
+
padding: theme.hvSpacing("sm", "xs", "xs", "xs")
|
|
33
|
+
},
|
|
34
|
+
"& > nav > ul > li > div > div": {
|
|
35
|
+
marginLeft: "6px"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
collapseButton: _objectSpread(_objectSpread({}, theme.hv.typography.normalText), {}, {
|
|
39
|
+
width: "100%",
|
|
40
|
+
"& > span": {
|
|
41
|
+
justifyContent: "flex-start"
|
|
42
|
+
}
|
|
43
|
+
}),
|
|
44
|
+
expandButton: {
|
|
45
|
+
width: "100%",
|
|
46
|
+
minWidth: "unset",
|
|
47
|
+
"& > span > span": {
|
|
48
|
+
marginLeft: "unset"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
collapseTextContainer: {
|
|
52
|
+
width: "100%",
|
|
53
|
+
textAlign: "left"
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
export default styles;
|
|
57
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","names":["makeStyles","styles","props","theme","panel","position","top","topPosition","left","zIndex","panelExpanded","width","expandedPanelWidth","height","marginBottom","panelCollapsed","collapsedPanelWidth","padding","hvSpacing","marginLeft","collapseButton","hv","typography","normalText","justifyContent","expandButton","minWidth","collapseTextContainer","textAlign"],"sources":["../../../src/VerticalNavigation/styles.js"],"sourcesContent":["import { makeStyles } from \"@mui/styles\";\n\nconst styles = (props) =>\n makeStyles((theme) => ({\n panel: {\n position: \"fixed\",\n top: props.topPosition,\n left: 0,\n zIndex: 1100,\n },\n panelExpanded: {\n width: props.expandedPanelWidth,\n height: `calc(100vh - ${props.topPosition}px)`,\n\n // This is for the bottom actions\n \"& > :not(:first-child) > button > span\": {\n marginBottom: 0,\n },\n },\n panelCollapsed: {\n width: props.collapsedPanelWidth,\n height: `calc(100vh - ${props.topPosition}px)`,\n\n // This is for the bottom actions\n \"& > :not(:first-child)\": {\n padding: theme.hvSpacing(\"xs\", \"xs\", \"sm\", \"xs\"),\n\n \"& > button > span\": {\n marginLeft: 0,\n },\n },\n // This is for the top menu items\n \"& > :first-child:not(:last-child)\": {\n padding: theme.hvSpacing(\"sm\", \"xs\", \"xs\", \"xs\"),\n },\n\n \"& > nav > ul > li > div > div\": {\n marginLeft: \"6px\",\n },\n },\n collapseButton: {\n ...theme.hv.typography.normalText,\n width: \"100%\",\n\n \"& > span\": {\n justifyContent: \"flex-start\",\n },\n },\n expandButton: {\n width: \"100%\",\n minWidth: \"unset\",\n\n \"& > span > span\": {\n marginLeft: \"unset\",\n },\n },\n collapseTextContainer: {\n width: \"100%\",\n textAlign: \"left\",\n },\n }));\n\nexport default styles;\n"],"mappings":";;;AAAA,SAASA,UAAU,QAAQ,aAAa;AAExC,MAAMC,MAAM,GAAIC,KAAK,IACnBF,UAAU,CAAEG,KAAK,KAAM;EACrBC,KAAK,EAAE;IACLC,QAAQ,EAAE,OAAO;IACjBC,GAAG,EAAEJ,KAAK,CAACK,WAAW;IACtBC,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE;EACV,CAAC;EACDC,aAAa,EAAE;IACbC,KAAK,EAAET,KAAK,CAACU,kBAAkB;IAC/BC,MAAM,EAAG,gBAAeX,KAAK,CAACK,WAAY,KAAI;IAE9C;IACA,wCAAwC,EAAE;MACxCO,YAAY,EAAE;IAChB;EACF,CAAC;EACDC,cAAc,EAAE;IACdJ,KAAK,EAAET,KAAK,CAACc,mBAAmB;IAChCH,MAAM,EAAG,gBAAeX,KAAK,CAACK,WAAY,KAAI;IAE9C;IACA,wBAAwB,EAAE;MACxBU,OAAO,EAAEd,KAAK,CAACe,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;MAEhD,mBAAmB,EAAE;QACnBC,UAAU,EAAE;MACd;IACF,CAAC;IACD;IACA,mCAAmC,EAAE;MACnCF,OAAO,EAAEd,KAAK,CAACe,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IACjD,CAAC;IAED,+BAA+B,EAAE;MAC/BC,UAAU,EAAE;IACd;EACF,CAAC;EACDC,cAAc,kCACTjB,KAAK,CAACkB,EAAE,CAACC,UAAU,CAACC,UAAU;IACjCZ,KAAK,EAAE,MAAM;IAEb,UAAU,EAAE;MACVa,cAAc,EAAE;IAClB;EAAC,EACF;EACDC,YAAY,EAAE;IACZd,KAAK,EAAE,MAAM;IACbe,QAAQ,EAAE,OAAO;IAEjB,iBAAiB,EAAE;MACjBP,UAAU,EAAE;IACd;EACF,CAAC;EACDQ,qBAAqB,EAAE;IACrBhB,KAAK,EAAE,MAAM;IACbiB,SAAS,EAAE;EACb;AACF,CAAC,CAAC,CAAC;AAEL,eAAe3B,MAAM"}
|
package/dist/modern/index.d.ts
CHANGED
package/dist/modern/index.js
CHANGED
package/dist/modern/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","HvColorPicker","HvDrawer","HvImageCarousel","HvInlineEditor","HvNavigationAnchors","HvNotificationPanel","HvStepNavigation","HvTimeAgo","HvWizard"],"sources":["../../src/index.js"],"sourcesContent":["export { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvImageCarousel } from \"./ImageCarousel\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvStepNavigation } from \"./StepNavigation\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvWizard } from \"./Wizard\";\nexport * from \"./Wizard\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,aAAa,QAAQ,eAAe;AACxD,SAASD,OAAO,IAAIE,QAAQ,QAAQ,UAAU;AAC9C,SAASF,OAAO,IAAIG,eAAe,QAAQ,iBAAiB;AAC5D,SAASH,OAAO,IAAII,cAAc,QAAQ,gBAAgB;AAC1D,SAASJ,OAAO,IAAIK,mBAAmB,QAAQ,qBAAqB;AACpE,SAASL,OAAO,IAAIM,mBAAmB,QAAQ,qBAAqB;AACpE,SAASN,OAAO,IAAIO,gBAAgB,QAAQ,kBAAkB;AAC9D,SAASP,OAAO,IAAIQ,SAAS,QAAQ,WAAW;AAChD,cAAc,WAAW;AACzB,SAASR,OAAO,IAAIS,QAAQ,QAAQ,UAAU;AAC9C,cAAc,UAAU"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","HvColorPicker","HvDrawer","HvImageCarousel","HvInlineEditor","HvNavigationAnchors","HvNotificationPanel","HvStepNavigation","HvTimeAgo","HvWizard","HvVerticalNavigation"],"sources":["../../src/index.js"],"sourcesContent":["export { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvImageCarousel } from \"./ImageCarousel\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvStepNavigation } from \"./StepNavigation\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvWizard } from \"./Wizard\";\nexport * from \"./Wizard\";\nexport { default as HvVerticalNavigation } from \"./VerticalNavigation\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,aAAa,QAAQ,eAAe;AACxD,SAASD,OAAO,IAAIE,QAAQ,QAAQ,UAAU;AAC9C,SAASF,OAAO,IAAIG,eAAe,QAAQ,iBAAiB;AAC5D,SAASH,OAAO,IAAII,cAAc,QAAQ,gBAAgB;AAC1D,SAASJ,OAAO,IAAIK,mBAAmB,QAAQ,qBAAqB;AACpE,SAASL,OAAO,IAAIM,mBAAmB,QAAQ,qBAAqB;AACpE,SAASN,OAAO,IAAIO,gBAAgB,QAAQ,kBAAkB;AAC9D,SAASP,OAAO,IAAIQ,SAAS,QAAQ,WAAW;AAChD,cAAc,WAAW;AACzB,SAASR,OAAO,IAAIS,QAAQ,QAAQ,UAAU;AAC9C,cAAc,UAAU;AACxB,SAAST,OAAO,IAAIU,oBAAoB,QAAQ,sBAAsB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-lab",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "A collection of contributed React components for the Hitachi Vantara's Design System.",
|
|
5
5
|
"homepage": "https://github.com/lumada-design/hv-uikit-react",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "6c1a1a461fbdcf4585ac1d2293b2e2e09e2b0e16"
|
|
68
68
|
}
|