@hitachivantara/uikit-react-lab 4.3.3 → 4.5.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.
Files changed (97) hide show
  1. package/dist/NavigationSlider/Header/Header.js +79 -0
  2. package/dist/NavigationSlider/Header/Header.js.map +1 -0
  3. package/dist/NavigationSlider/Header/index.js +14 -0
  4. package/dist/NavigationSlider/Header/index.js.map +1 -0
  5. package/dist/NavigationSlider/Header/styles.js +36 -0
  6. package/dist/NavigationSlider/Header/styles.js.map +1 -0
  7. package/dist/NavigationSlider/Navigation/Navigation.js +102 -0
  8. package/dist/NavigationSlider/Navigation/Navigation.js.map +1 -0
  9. package/dist/NavigationSlider/Navigation/index.js +14 -0
  10. package/dist/NavigationSlider/Navigation/index.js.map +1 -0
  11. package/dist/NavigationSlider/Navigation/styles.js +30 -0
  12. package/dist/NavigationSlider/Navigation/styles.js.map +1 -0
  13. package/dist/NavigationSlider/NavigationSlider.d.ts +30 -0
  14. package/dist/NavigationSlider/NavigationSlider.js +139 -0
  15. package/dist/NavigationSlider/NavigationSlider.js.map +1 -0
  16. package/dist/NavigationSlider/index.d.ts +2 -0
  17. package/dist/NavigationSlider/index.js +14 -0
  18. package/dist/NavigationSlider/index.js.map +1 -0
  19. package/dist/NavigationSlider/styles.js +29 -0
  20. package/dist/NavigationSlider/styles.js.map +1 -0
  21. package/dist/NavigationSlider/utils.js +87 -0
  22. package/dist/NavigationSlider/utils.js.map +1 -0
  23. package/dist/VerticalNavigation/VerticalNavigation.d.ts +12 -8
  24. package/dist/VerticalNavigation/VerticalNavigation.js +71 -41
  25. package/dist/VerticalNavigation/VerticalNavigation.js.map +1 -1
  26. package/dist/VerticalNavigation/styles.js +11 -36
  27. package/dist/VerticalNavigation/styles.js.map +1 -1
  28. package/dist/VerticalNavigation/utils.js +88 -0
  29. package/dist/VerticalNavigation/utils.js.map +1 -0
  30. package/dist/index.d.ts +3 -0
  31. package/dist/index.js +9 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/legacy/NavigationSlider/Header/Header.js +72 -0
  34. package/dist/legacy/NavigationSlider/Header/Header.js.map +1 -0
  35. package/dist/legacy/NavigationSlider/Header/index.js +2 -0
  36. package/dist/legacy/NavigationSlider/Header/index.js.map +1 -0
  37. package/dist/legacy/NavigationSlider/Header/styles.js +29 -0
  38. package/dist/legacy/NavigationSlider/Header/styles.js.map +1 -0
  39. package/dist/legacy/NavigationSlider/Navigation/Navigation.js +94 -0
  40. package/dist/legacy/NavigationSlider/Navigation/Navigation.js.map +1 -0
  41. package/dist/legacy/NavigationSlider/Navigation/index.js +2 -0
  42. package/dist/legacy/NavigationSlider/Navigation/index.js.map +1 -0
  43. package/dist/legacy/NavigationSlider/Navigation/styles.js +23 -0
  44. package/dist/legacy/NavigationSlider/Navigation/styles.js.map +1 -0
  45. package/dist/legacy/NavigationSlider/NavigationSlider.d.ts +30 -0
  46. package/dist/legacy/NavigationSlider/NavigationSlider.js +123 -0
  47. package/dist/legacy/NavigationSlider/NavigationSlider.js.map +1 -0
  48. package/dist/legacy/NavigationSlider/index.d.ts +2 -0
  49. package/dist/legacy/NavigationSlider/index.js +2 -0
  50. package/dist/legacy/NavigationSlider/index.js.map +1 -0
  51. package/dist/legacy/NavigationSlider/styles.js +22 -0
  52. package/dist/legacy/NavigationSlider/styles.js.map +1 -0
  53. package/dist/legacy/NavigationSlider/utils.js +78 -0
  54. package/dist/legacy/NavigationSlider/utils.js.map +1 -0
  55. package/dist/legacy/VerticalNavigation/VerticalNavigation.d.ts +12 -8
  56. package/dist/legacy/VerticalNavigation/VerticalNavigation.js +72 -40
  57. package/dist/legacy/VerticalNavigation/VerticalNavigation.js.map +1 -1
  58. package/dist/legacy/VerticalNavigation/styles.js +11 -35
  59. package/dist/legacy/VerticalNavigation/styles.js.map +1 -1
  60. package/dist/legacy/VerticalNavigation/utils.js +79 -0
  61. package/dist/legacy/VerticalNavigation/utils.js.map +1 -0
  62. package/dist/legacy/index.d.ts +3 -0
  63. package/dist/legacy/index.js +1 -0
  64. package/dist/legacy/index.js.map +1 -1
  65. package/dist/modern/NavigationSlider/Header/Header.js +72 -0
  66. package/dist/modern/NavigationSlider/Header/Header.js.map +1 -0
  67. package/dist/modern/NavigationSlider/Header/index.js +2 -0
  68. package/dist/modern/NavigationSlider/Header/index.js.map +1 -0
  69. package/dist/modern/NavigationSlider/Header/styles.js +25 -0
  70. package/dist/modern/NavigationSlider/Header/styles.js.map +1 -0
  71. package/dist/modern/NavigationSlider/Navigation/Navigation.js +88 -0
  72. package/dist/modern/NavigationSlider/Navigation/Navigation.js.map +1 -0
  73. package/dist/modern/NavigationSlider/Navigation/index.js +2 -0
  74. package/dist/modern/NavigationSlider/Navigation/index.js.map +1 -0
  75. package/dist/modern/NavigationSlider/Navigation/styles.js +21 -0
  76. package/dist/modern/NavigationSlider/Navigation/styles.js.map +1 -0
  77. package/dist/modern/NavigationSlider/NavigationSlider.d.ts +30 -0
  78. package/dist/modern/NavigationSlider/NavigationSlider.js +116 -0
  79. package/dist/modern/NavigationSlider/NavigationSlider.js.map +1 -0
  80. package/dist/modern/NavigationSlider/index.d.ts +2 -0
  81. package/dist/modern/NavigationSlider/index.js +2 -0
  82. package/dist/modern/NavigationSlider/index.js.map +1 -0
  83. package/dist/modern/NavigationSlider/styles.js +18 -0
  84. package/dist/modern/NavigationSlider/styles.js.map +1 -0
  85. package/dist/modern/NavigationSlider/utils.js +70 -0
  86. package/dist/modern/NavigationSlider/utils.js.map +1 -0
  87. package/dist/modern/VerticalNavigation/VerticalNavigation.d.ts +12 -8
  88. package/dist/modern/VerticalNavigation/VerticalNavigation.js +68 -43
  89. package/dist/modern/VerticalNavigation/VerticalNavigation.js.map +1 -1
  90. package/dist/modern/VerticalNavigation/styles.js +11 -28
  91. package/dist/modern/VerticalNavigation/styles.js.map +1 -1
  92. package/dist/modern/VerticalNavigation/utils.js +76 -0
  93. package/dist/modern/VerticalNavigation/utils.js.map +1 -0
  94. package/dist/modern/index.d.ts +3 -0
  95. package/dist/modern/index.js +1 -0
  96. package/dist/modern/index.js.map +1 -1
  97. package/package.json +4 -4
@@ -1,77 +1,110 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
1
3
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
5
  var _Backwards, _Forwards;
6
+ var _excluded = ["onNavigationChange", "onToggleExpanded", "data", "selected", "expanded", "topPosition", "expandedPanelWidth", "collapsedPanelWidth", "position"],
7
+ _excluded2 = ["data"];
8
+ 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; }
9
+ 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; }
10
+ import "core-js/modules/es.array.map.js";
11
+ import "core-js/modules/es.array.concat.js";
12
+ import "core-js/modules/es.object.keys.js";
13
+ import "core-js/modules/es.symbol.js";
14
+ import "core-js/modules/es.array.filter.js";
15
+ import "core-js/modules/es.object.to-string.js";
16
+ import "core-js/modules/es.object.get-own-property-descriptor.js";
17
+ import "core-js/modules/web.dom-collections.for-each.js";
18
+ import "core-js/modules/es.object.get-own-property-descriptors.js";
3
19
  import React, { useState } from "react";
4
20
  import { withStyles } from "@mui/styles";
5
21
  import PropTypes from "prop-types";
6
22
  import clsx from "clsx";
7
- import { HvVerticalNavigation as HvVerticalNavigationCore, HvVerticalNavigationTree, HvVerticalNavigationActions, HvButton, setId } from "@hitachivantara/uikit-react-core";
23
+ import { HvVerticalNavigation as HvVerticalNavigationCore, HvVerticalNavigationTree, HvButton, HvContainer } from "@hitachivantara/uikit-react-core";
8
24
  import { Backwards, Forwards } from "@hitachivantara/uikit-react-icons";
9
25
  import useStyles from "./styles";
26
+ import { findRootParentById, findItemById, pathToItem } from "./utils";
10
27
  import { jsx as _jsx } from "react/jsx-runtime";
11
28
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
29
  var HvVerticalNavigation = function HvVerticalNavigation(_ref) {
13
- var id = _ref.id,
14
- onNavigationChange = _ref.onNavigationChange,
30
+ var _findRootParentById;
31
+ var onNavigationChange = _ref.onNavigationChange,
32
+ onToggleExpanded = _ref.onToggleExpanded,
15
33
  data = _ref.data,
16
34
  selected = _ref.selected,
17
- collapseLabel = _ref.collapseLabel,
35
+ expanded = _ref.expanded,
18
36
  topPosition = _ref.topPosition,
19
37
  expandedPanelWidth = _ref.expandedPanelWidth,
20
38
  collapsedPanelWidth = _ref.collapsedPanelWidth,
21
- position = _ref.position;
39
+ position = _ref.position,
40
+ others = _objectWithoutProperties(_ref, _excluded);
22
41
  var classes = useStyles({
23
42
  topPosition: topPosition,
24
43
  expandedPanelWidth: expandedPanelWidth,
25
44
  collapsedPanelWidth: collapsedPanelWidth,
26
45
  position: position
27
46
  })();
28
- var _useState = useState(true),
47
+ var noSubData = data.map(function (_ref2) {
48
+ var dataToRemove = _ref2.data,
49
+ rest = _objectWithoutProperties(_ref2, _excluded2);
50
+ return rest;
51
+ });
52
+ var _useState = useState(pathToItem(data, selected)),
29
53
  _useState2 = _slicedToArray(_useState, 2),
30
- isExpanded = _useState2[0],
31
- setIsExpanded = _useState2[1];
54
+ expandedItems = _useState2[0],
55
+ setExpandedItems = _useState2[1];
56
+ var selectedTopParent = (_findRootParentById = findRootParentById(data, selected)) === null || _findRootParentById === void 0 ? void 0 : _findRootParentById.id;
32
57
  var handleVerticalNavigationChange = function handleVerticalNavigationChange(event, item) {
33
- onNavigationChange === null || onNavigationChange === void 0 ? void 0 : onNavigationChange(event, item);
58
+ // This need to be done because the item recieved on the callback is missing the original data object
59
+ var fullItem = findItemById(data, item.id);
60
+ if (!expanded && fullItem.data && fullItem.data.length > 0) {
61
+ setExpandedItems(function (prevState) {
62
+ return [].concat(_toConsumableArray(prevState), [item.id]);
63
+ });
64
+ onToggleExpanded(true);
65
+ } else {
66
+ onNavigationChange === null || onNavigationChange === void 0 ? void 0 : onNavigationChange(event, item);
67
+ }
68
+ };
69
+ var handleVerticalNavigationToggle = function handleVerticalNavigationToggle(event, currentExpandedItems) {
70
+ setExpandedItems(currentExpandedItems);
34
71
  };
35
72
  var handleExpandToggle = function handleExpandToggle() {
36
- setIsExpanded(function (prevState) {
37
- return !prevState;
38
- });
73
+ onToggleExpanded(!expanded);
39
74
  };
40
- return /*#__PURE__*/_jsxs(HvVerticalNavigationCore, {
41
- className: clsx(classes.panel, isExpanded ? classes.panelExpanded : classes.panelCollapsed),
42
- children: [/*#__PURE__*/_jsx(HvVerticalNavigationTree, {
43
- collapsible: true,
44
- data: data,
45
- selected: selected,
46
- onChange: handleVerticalNavigationChange
47
- }), /*#__PURE__*/_jsx(HvVerticalNavigationActions, {
75
+ return /*#__PURE__*/_jsxs(HvVerticalNavigationCore, _objectSpread(_objectSpread({
76
+ className: clsx(classes.panel, expanded ? classes.panelExpanded : classes.panelCollapsed)
77
+ }, others), {}, {
78
+ children: [/*#__PURE__*/_jsx(HvContainer, {
79
+ className: "".concat(classes.toggleCollapsePanel),
48
80
  children: /*#__PURE__*/_jsx(HvButton, {
49
- id: setId(id, "button-toggle"),
50
- className: clsx(isExpanded ? classes.collapseButton : classes.expandButton),
51
- category: "ghost",
52
- startIcon: isExpanded ? _Backwards || (_Backwards = /*#__PURE__*/_jsx(Backwards, {
81
+ icon: true,
82
+ onClick: handleExpandToggle,
83
+ children: expanded ? _Backwards || (_Backwards = /*#__PURE__*/_jsx(Backwards, {
53
84
  iconSize: "XS"
54
85
  })) : _Forwards || (_Forwards = /*#__PURE__*/_jsx(Forwards, {
55
86
  iconSize: "XS"
56
- })),
57
- onClick: handleExpandToggle,
58
- children: isExpanded && /*#__PURE__*/_jsx("span", {
59
- className: classes.collapseTextContainer,
60
- children: collapseLabel
61
- })
87
+ }))
62
88
  })
89
+ }), /*#__PURE__*/_jsx(HvVerticalNavigationTree, {
90
+ collapsible: true,
91
+ expanded: expandedItems,
92
+ data: expanded ? data : noSubData,
93
+ selected: expanded ? selected : selectedTopParent,
94
+ onChange: handleVerticalNavigationChange,
95
+ onToggle: handleVerticalNavigationToggle
63
96
  })]
64
- });
97
+ }));
65
98
  };
66
99
  process.env.NODE_ENV !== "production" ? HvVerticalNavigation.propTypes = {
67
- /**
68
- * Id to be applied to the root node of the panel.
69
- */
70
- id: PropTypes.string,
71
100
  /**
72
101
  * Called when a menu item is clicked.
73
102
  */
74
103
  onNavigationChange: PropTypes.func,
104
+ /**
105
+ * Called when the collapse / expand button is clicked.
106
+ */
107
+ onToggleExpanded: PropTypes.func,
75
108
  /**
76
109
  * An array containing the data for each menu item.
77
110
  *
@@ -90,14 +123,14 @@ process.env.NODE_ENV !== "production" ? HvVerticalNavigation.propTypes = {
90
123
  href: PropTypes.string,
91
124
  target: PropTypes.string
92
125
  })).isRequired,
93
- /**
94
- * Text to be displayed in the collpase area when the panel is expanded.
95
- */
96
- collapseLabel: PropTypes.string,
97
126
  /**
98
127
  * The ID of the selected page.
99
128
  */
100
129
  selected: PropTypes.string,
130
+ /**
131
+ * Boolean value stating if the panel should be collapsed or expanded.
132
+ */
133
+ expanded: PropTypes.bool,
101
134
  /**
102
135
  * The top value where the panel will be rendered. Default is 44 as it is the height of the Header component.
103
136
  */
@@ -116,7 +149,6 @@ process.env.NODE_ENV !== "production" ? HvVerticalNavigation.propTypes = {
116
149
  position: PropTypes.oneOf(["static", "relative", "fixed", "absolute", "sticky"])
117
150
  } : void 0;
118
151
  HvVerticalNavigation.defaultProps = {
119
- collapseLabel: "Collapse",
120
152
  topPosition: 44,
121
153
  expandedPanelWidth: 300,
122
154
  collapsedPanelWidth: 52,
@@ -1 +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","position","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","oneOf","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 position,\n}) => {\n const classes = useStyles({ topPosition, expandedPanelWidth, collapsedPanelWidth, position })();\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 * Position of the component.\n */\n position: PropTypes.oneOf([\"static\", \"relative\", \"fixed\", \"absolute\", \"sticky\"]),\n};\n\nHvVerticalNavigation.defaultProps = {\n collapseLabel: \"Collapse\",\n topPosition: 44,\n expandedPanelWidth: 300,\n collapsedPanelWidth: 52,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AAU;IAClCE,IAAI,EAAEzC,SAAS,CAAC0C,IAAI;IACpB7B,IAAI,EAAEb,SAAS,CAAC2C,KAAK;IACrBC,IAAI,EAAE5C,SAAS,CAACmC,MAAM;IACtBU,MAAM,EAAE7C,SAAS,CAACmC;EACpB,CAAC,CAAC,CACH,CAACI,UAAU;EACZ;AACF;AACA;EACExB,aAAa,EAAEf,SAAS,CAACmC,MAAM;EAC/B;AACF;AACA;EACErB,QAAQ,EAAEd,SAAS,CAACmC,MAAM;EAC1B;AACF;AACA;EACEnB,WAAW,EAAEhB,SAAS,CAAC8C,MAAM;EAC7B;AACF;AACA;EACE7B,kBAAkB,EAAEjB,SAAS,CAAC8C,MAAM;EACpC;AACF;AACA;EACE5B,mBAAmB,EAAElB,SAAS,CAAC8C,MAAM;EACrC;AACF;AACA;EACE3B,QAAQ,EAAEnB,SAAS,CAAC+C,KAAK,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC;AACjF,CAAC;AAED7C,oBAAoB,CAAC8C,YAAY,GAAG;EAClCjC,aAAa,EAAE,UAAU;EACzBC,WAAW,EAAE,EAAE;EACfC,kBAAkB,EAAE,GAAG;EACvBC,mBAAmB,EAAE,EAAE;EACvBC,QAAQ,EAAE;AACZ,CAAC;AAED,eAAepB,UAAU,CAACW,SAAS,EAAE;EAAEuC,IAAI,EAAE;AAAuB,CAAC,CAAC,CAAC/C,oBAAoB,CAAC"}
1
+ {"version":3,"file":"VerticalNavigation.js","names":["React","useState","withStyles","PropTypes","clsx","HvVerticalNavigation","HvVerticalNavigationCore","HvVerticalNavigationTree","HvButton","HvContainer","Backwards","Forwards","useStyles","findRootParentById","findItemById","pathToItem","onNavigationChange","onToggleExpanded","data","selected","expanded","topPosition","expandedPanelWidth","collapsedPanelWidth","position","others","classes","noSubData","map","dataToRemove","rest","expandedItems","setExpandedItems","selectedTopParent","id","handleVerticalNavigationChange","event","item","fullItem","length","prevState","handleVerticalNavigationToggle","currentExpandedItems","handleExpandToggle","panel","panelExpanded","panelCollapsed","toggleCollapsePanel","propTypes","func","arrayOf","shape","string","isRequired","label","icon","node","array","href","target","bool","number","oneOf","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 HvButton,\n HvContainer,\n} from \"@hitachivantara/uikit-react-core\";\nimport { Backwards, Forwards } from \"@hitachivantara/uikit-react-icons\";\n\nimport useStyles from \"./styles\";\nimport { findRootParentById, findItemById, pathToItem } from \"./utils\";\n\nconst HvVerticalNavigation = ({\n onNavigationChange,\n onToggleExpanded,\n data,\n selected,\n expanded,\n topPosition,\n expandedPanelWidth,\n collapsedPanelWidth,\n position,\n\n ...others\n}) => {\n const classes = useStyles({ topPosition, expandedPanelWidth, collapsedPanelWidth, position })();\n\n const noSubData = data.map(({ data: dataToRemove, ...rest }) => rest);\n\n const [expandedItems, setExpandedItems] = useState(pathToItem(data, selected));\n\n const selectedTopParent = findRootParentById(data, selected)?.id;\n\n const handleVerticalNavigationChange = (event, item) => {\n // This need to be done because the item recieved on the callback is missing the original data object\n const fullItem = findItemById(data, item.id);\n\n if (!expanded && fullItem.data && fullItem.data.length > 0) {\n setExpandedItems((prevState) => [...prevState, item.id]);\n onToggleExpanded(true);\n } else {\n onNavigationChange?.(event, item);\n }\n };\n\n const handleVerticalNavigationToggle = (event, currentExpandedItems) => {\n setExpandedItems(currentExpandedItems);\n };\n\n const handleExpandToggle = () => {\n onToggleExpanded(!expanded);\n };\n\n return (\n <HvVerticalNavigationCore\n className={clsx(classes.panel, {\n [classes.panelExpanded]: expanded,\n [classes.panelCollapsed]: !expanded,\n })}\n {...others}\n >\n <HvContainer className={`${classes.toggleCollapsePanel}`}>\n <HvButton icon onClick={handleExpandToggle}>\n {expanded ? <Backwards iconSize=\"XS\" /> : <Forwards iconSize=\"XS\" />}\n </HvButton>\n </HvContainer>\n\n <HvVerticalNavigationTree\n collapsible\n expanded={expandedItems}\n data={expanded ? data : noSubData}\n selected={expanded ? selected : selectedTopParent}\n onChange={handleVerticalNavigationChange}\n onToggle={handleVerticalNavigationToggle}\n />\n </HvVerticalNavigationCore>\n );\n};\n\nHvVerticalNavigation.propTypes = {\n /**\n * Called when a menu item is clicked.\n */\n onNavigationChange: PropTypes.func,\n /**\n * Called when the collapse / expand button is clicked.\n */\n onToggleExpanded: 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 * The ID of the selected page.\n */\n selected: PropTypes.string,\n /**\n * Boolean value stating if the panel should be collapsed or expanded.\n */\n expanded: PropTypes.bool,\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 * Position of the component.\n */\n position: PropTypes.oneOf([\"static\", \"relative\", \"fixed\", \"absolute\", \"sticky\"]),\n};\n\nHvVerticalNavigation.defaultProps = {\n topPosition: 44,\n expandedPanelWidth: 300,\n collapsedPanelWidth: 52,\n position: \"fixed\",\n};\n\nexport default withStyles(useStyles, { name: \"HvVerticalNavigation\" })(HvVerticalNavigation);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,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CAAC0D,YAAY,GAAG;EAClC1C,WAAW,EAAE,EAAE;EACfC,kBAAkB,EAAE,GAAG;EACvBC,mBAAmB,EAAE,EAAE;EACvBC,QAAQ,EAAE;AACZ,CAAC;AAED,eAAetB,UAAU,CAACU,SAAS,EAAE;EAAEoD,IAAI,EAAE;AAAuB,CAAC,CAAC,CAAC3D,oBAAoB,CAAC"}
@@ -1,18 +1,9 @@
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
1
  import { makeStyles } from "@mui/styles";
12
2
  var styles = function styles(props) {
13
3
  return makeStyles(function (theme) {
14
4
  return {
15
5
  panel: {
6
+ justifyContent: "flex-start",
16
7
  position: props.position,
17
8
  top: props.topPosition,
18
9
  left: 0,
@@ -21,22 +12,20 @@ var styles = function styles(props) {
21
12
  panelExpanded: {
22
13
  width: props.expandedPanelWidth,
23
14
  height: "calc(100vh - ".concat(props.topPosition, "px)"),
24
- // This is for the bottom actions
25
- "& > :not(:first-child) > button > span": {
26
- marginBottom: 0
15
+ // To remove the top border of the navigation section
16
+ "& > :not(:first-child)": {
17
+ borderTop: "none"
27
18
  }
28
19
  },
29
20
  panelCollapsed: {
30
21
  width: props.collapsedPanelWidth,
31
22
  height: "calc(100vh - ".concat(props.topPosition, "px)"),
32
- // This is for the bottom actions
23
+ // Customize the navigation section
33
24
  "& > :not(:first-child)": {
34
- padding: theme.hvSpacing("xs", "xs", "sm", "xs"),
35
- "& > button > span": {
36
- marginLeft: 0
37
- }
25
+ borderTop: "none",
26
+ padding: theme.hvSpacing("xs", "xs", "sm", "xs")
38
27
  },
39
- // This is for the top menu items
28
+ // Customize the collapse / expand
40
29
  "& > :first-child:not(:last-child)": {
41
30
  padding: theme.hvSpacing("sm", "xs", "xs", "xs")
42
31
  },
@@ -44,22 +33,9 @@ var styles = function styles(props) {
44
33
  marginLeft: "6px"
45
34
  }
46
35
  },
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"
36
+ toggleCollapsePanel: {
37
+ display: "flex",
38
+ justifyContent: "flex-end"
63
39
  }
64
40
  };
65
41
  });
@@ -1 +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: props.position,\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,EAAEH,KAAK,CAACG,QAAQ;QACxBC,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"}
1
+ {"version":3,"file":"styles.js","names":["makeStyles","styles","props","theme","panel","justifyContent","position","top","topPosition","left","zIndex","panelExpanded","width","expandedPanelWidth","height","borderTop","panelCollapsed","collapsedPanelWidth","padding","hvSpacing","marginLeft","toggleCollapsePanel","display"],"sources":["../../../src/VerticalNavigation/styles.js"],"sourcesContent":["import { makeStyles } from \"@mui/styles\";\n\nconst styles = (props) =>\n makeStyles((theme) => ({\n panel: {\n justifyContent: \"flex-start\",\n position: props.position,\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 // To remove the top border of the navigation section\n \"& > :not(:first-child)\": {\n borderTop: \"none\",\n },\n },\n panelCollapsed: {\n width: props.collapsedPanelWidth,\n height: `calc(100vh - ${props.topPosition}px)`,\n\n // Customize the navigation section\n \"& > :not(:first-child)\": {\n borderTop: \"none\",\n padding: theme.hvSpacing(\"xs\", \"xs\", \"sm\", \"xs\"),\n },\n\n // Customize the collapse / expand\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\n toggleCollapsePanel: {\n display: \"flex\",\n justifyContent: \"flex-end\",\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,cAAc,EAAE,YAAY;QAC5BC,QAAQ,EAAEJ,KAAK,CAACI,QAAQ;QACxBC,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,wBAAwB,EAAE;UACxBO,SAAS,EAAE;QACb;MACF,CAAC;MACDC,cAAc,EAAE;QACdJ,KAAK,EAAEV,KAAK,CAACe,mBAAmB;QAChCH,MAAM,yBAAkBZ,KAAK,CAACM,WAAW,QAAK;QAE9C;QACA,wBAAwB,EAAE;UACxBO,SAAS,EAAE,MAAM;UACjBG,OAAO,EAAEf,KAAK,CAACgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;QACjD,CAAC;QAED;QACA,mCAAmC,EAAE;UACnCD,OAAO,EAAEf,KAAK,CAACgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;QACjD,CAAC;QAED,+BAA+B,EAAE;UAC/BC,UAAU,EAAE;QACd;MACF,CAAC;MAEDC,mBAAmB,EAAE;QACnBC,OAAO,EAAE,MAAM;QACfjB,cAAc,EAAE;MAClB;IACF,CAAC;EAAA,CAAC,CAAC;AAAA;AAEL,eAAeJ,MAAM"}
@@ -0,0 +1,79 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
+ import "core-js/modules/es.object.to-string.js";
3
+ import "core-js/modules/es.array.find.js";
4
+ /**
5
+ * Receives the navigation data and the id of the item from which we want to get the root parent.
6
+ *
7
+ * @param {NavigationItem[]} data - The navigation data structure.
8
+ * @param {string} itemId - The item id.
9
+ * @returns The item that is the root parent of the received item.
10
+ */
11
+ var findRootParentById = function findRootParentById(data, itemId) {
12
+ return data.reduce(function (parent, item) {
13
+ if (parent) {
14
+ return parent;
15
+ }
16
+ if (item.id === itemId) {
17
+ return item;
18
+ }
19
+ if (item.data) {
20
+ var found = findRootParentById(item.data, itemId);
21
+ if (found) {
22
+ return item;
23
+ }
24
+ }
25
+ return null;
26
+ }, null);
27
+ };
28
+
29
+ /**
30
+ * Returns the complete item object from the data structure using the item id.
31
+ *
32
+ * @param {NavigationItem[]} data - The navigation data structure.
33
+ * @param {string} itemId - The item id.
34
+ * @returns The complete item object matching the received id.
35
+ */
36
+ var findItemById = function findItemById(data, itemId) {
37
+ return data.find(function (item) {
38
+ if (item.id === itemId) {
39
+ return true;
40
+ }
41
+ if (item.data && item.data.length > 0) {
42
+ var foundItem = findItemById(item.data, itemId);
43
+ if (foundItem) {
44
+ return true;
45
+ }
46
+ }
47
+ return false;
48
+ });
49
+ };
50
+
51
+ /**
52
+ * Returns an array with all the parent item ids up until the target item is reached.
53
+ *
54
+ * @param {NavigationItem[]} data - The navigation data structure.
55
+ * @param {string} itemId - The item id.
56
+ * @returns An array with all the parent item ids
57
+ */
58
+ var pathToItem = function pathToItem(data, itemId) {
59
+ var path = [];
60
+ if (data != null && data.length > 0) {
61
+ // eslint-disable-next-line no-plusplus
62
+ for (var i = 0; i < data.length; ++i) {
63
+ var item = data[i];
64
+ if (item.id === itemId) {
65
+ path.push(item.id);
66
+ break;
67
+ }
68
+ var subPaths = pathToItem(item.data, itemId);
69
+ if (subPaths.length > 0) {
70
+ path.push(item.id);
71
+ path.push.apply(path, _toConsumableArray(subPaths));
72
+ break;
73
+ }
74
+ }
75
+ }
76
+ return path;
77
+ };
78
+ export { findRootParentById, findItemById, pathToItem };
79
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":["findRootParentById","data","itemId","reduce","parent","item","id","found","findItemById","find","length","foundItem","pathToItem","path","i","push","subPaths"],"sources":["../../../src/VerticalNavigation/utils.js"],"sourcesContent":["/**\n * Receives the navigation data and the id of the item from which we want to get the root parent.\n *\n * @param {NavigationItem[]} data - The navigation data structure.\n * @param {string} itemId - The item id.\n * @returns The item that is the root parent of the received item.\n */\nconst findRootParentById = (data, itemId) => {\n return data.reduce((parent, item) => {\n if (parent) {\n return parent;\n }\n\n if (item.id === itemId) {\n return item;\n }\n\n if (item.data) {\n const found = findRootParentById(item.data, itemId);\n if (found) {\n return item;\n }\n }\n return null;\n }, null);\n};\n\n/**\n * Returns the complete item object from the data structure using the item id.\n *\n * @param {NavigationItem[]} data - The navigation data structure.\n * @param {string} itemId - The item id.\n * @returns The complete item object matching the received id.\n */\nconst findItemById = (data, itemId) => {\n return data.find((item) => {\n if (item.id === itemId) {\n return true;\n }\n\n if (item.data && item.data.length > 0) {\n const foundItem = findItemById(item.data, itemId);\n if (foundItem) {\n return true;\n }\n }\n return false;\n });\n};\n\n/**\n * Returns an array with all the parent item ids up until the target item is reached.\n *\n * @param {NavigationItem[]} data - The navigation data structure.\n * @param {string} itemId - The item id.\n * @returns An array with all the parent item ids\n */\nconst pathToItem = (data, itemId) => {\n const path = [];\n\n if (data != null && data.length > 0) {\n // eslint-disable-next-line no-plusplus\n for (let i = 0; i < data.length; ++i) {\n const item = data[i];\n if (item.id === itemId) {\n path.push(item.id);\n break;\n }\n\n const subPaths = pathToItem(item.data, itemId);\n if (subPaths.length > 0) {\n path.push(item.id);\n path.push(...subPaths);\n break;\n }\n }\n }\n\n return path;\n};\n\nexport { findRootParentById, findItemById, pathToItem };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkB,CAAIC,IAAI,EAAEC,MAAM,EAAK;EAC3C,OAAOD,IAAI,CAACE,MAAM,CAAC,UAACC,MAAM,EAAEC,IAAI,EAAK;IACnC,IAAID,MAAM,EAAE;MACV,OAAOA,MAAM;IACf;IAEA,IAAIC,IAAI,CAACC,EAAE,KAAKJ,MAAM,EAAE;MACtB,OAAOG,IAAI;IACb;IAEA,IAAIA,IAAI,CAACJ,IAAI,EAAE;MACb,IAAMM,KAAK,GAAGP,kBAAkB,CAACK,IAAI,CAACJ,IAAI,EAAEC,MAAM,CAAC;MACnD,IAAIK,KAAK,EAAE;QACT,OAAOF,IAAI;MACb;IACF;IACA,OAAO,IAAI;EACb,CAAC,EAAE,IAAI,CAAC;AACV,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMG,YAAY,GAAG,SAAfA,YAAY,CAAIP,IAAI,EAAEC,MAAM,EAAK;EACrC,OAAOD,IAAI,CAACQ,IAAI,CAAC,UAACJ,IAAI,EAAK;IACzB,IAAIA,IAAI,CAACC,EAAE,KAAKJ,MAAM,EAAE;MACtB,OAAO,IAAI;IACb;IAEA,IAAIG,IAAI,CAACJ,IAAI,IAAII,IAAI,CAACJ,IAAI,CAACS,MAAM,GAAG,CAAC,EAAE;MACrC,IAAMC,SAAS,GAAGH,YAAY,CAACH,IAAI,CAACJ,IAAI,EAAEC,MAAM,CAAC;MACjD,IAAIS,SAAS,EAAE;QACb,OAAO,IAAI;MACb;IACF;IACA,OAAO,KAAK;EACd,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAU,CAAIX,IAAI,EAAEC,MAAM,EAAK;EACnC,IAAMW,IAAI,GAAG,EAAE;EAEf,IAAIZ,IAAI,IAAI,IAAI,IAAIA,IAAI,CAACS,MAAM,GAAG,CAAC,EAAE;IACnC;IACA,KAAK,IAAII,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGb,IAAI,CAACS,MAAM,EAAE,EAAEI,CAAC,EAAE;MACpC,IAAMT,IAAI,GAAGJ,IAAI,CAACa,CAAC,CAAC;MACpB,IAAIT,IAAI,CAACC,EAAE,KAAKJ,MAAM,EAAE;QACtBW,IAAI,CAACE,IAAI,CAACV,IAAI,CAACC,EAAE,CAAC;QAClB;MACF;MAEA,IAAMU,QAAQ,GAAGJ,UAAU,CAACP,IAAI,CAACJ,IAAI,EAAEC,MAAM,CAAC;MAC9C,IAAIc,QAAQ,CAACN,MAAM,GAAG,CAAC,EAAE;QACvBG,IAAI,CAACE,IAAI,CAACV,IAAI,CAACC,EAAE,CAAC;QAClBO,IAAI,CAACE,IAAI,OAATF,IAAI,qBAASG,QAAQ,EAAC;QACtB;MACF;IACF;EACF;EAEA,OAAOH,IAAI;AACb,CAAC;AAED,SAASb,kBAAkB,EAAEQ,YAAY,EAAEI,UAAU"}
@@ -27,3 +27,6 @@ export * from "./Wizard";
27
27
 
28
28
  export { default as HvVerticalNavigation } from "./VerticalNavigation";
29
29
  export * from "./VerticalNavigation";
30
+
31
+ export { default as HvNavigationSlider } from "./NavigationSlider";
32
+ export * from "./NavigationSlider";
@@ -10,4 +10,5 @@ export * from "./TimeAgo";
10
10
  export { default as HvWizard } from "./Wizard";
11
11
  export * from "./Wizard";
12
12
  export { default as HvVerticalNavigation } from "./VerticalNavigation";
13
+ export { default as HvNavigationSlider } from "./NavigationSlider";
13
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.js","names":["default","HvColorPicker","HvDrawer","HvImageCarousel","HvInlineEditor","HvNavigationAnchors","HvNotificationPanel","HvStepNavigation","HvTimeAgo","HvWizard","HvVerticalNavigation","HvNavigationSlider"],"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\";\nexport { default as HvNavigationSlider } from \"./NavigationSlider\";\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;AACtE,SAASV,OAAO,IAAIW,kBAAkB,QAAQ,oBAAoB"}
@@ -0,0 +1,72 @@
1
+ var _Backwards;
2
+ import React from "react";
3
+ import { withStyles } from "@mui/styles";
4
+ import PropTypes from "prop-types";
5
+ import { HvButton, HvTypography } from "@hitachivantara/uikit-react-core";
6
+ import { Backwards } from "@hitachivantara/uikit-react-icons";
7
+ import useStyles from "./styles";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ import { jsxs as _jsxs } from "react/jsx-runtime";
10
+ const Header = ({
11
+ id,
12
+ title,
13
+ showBackButton,
14
+ headerHeight,
15
+ onBackButtonClick
16
+ }) => {
17
+ const classes = useStyles({
18
+ headerHeight
19
+ })();
20
+ const backButtonClickHandler = () => {
21
+ onBackButtonClick();
22
+ };
23
+ return /*#__PURE__*/_jsxs("div", {
24
+ id: id,
25
+ className: classes.menuContainer,
26
+ children: [/*#__PURE__*/_jsx("div", {
27
+ className: classes.button,
28
+ children: showBackButton && /*#__PURE__*/_jsx(HvButton, {
29
+ icon: true,
30
+ onClick: backButtonClickHandler,
31
+ children: _Backwards || (_Backwards = /*#__PURE__*/_jsx(Backwards, {
32
+ iconSize: "XS"
33
+ }))
34
+ })
35
+ }), /*#__PURE__*/_jsx("div", {
36
+ className: `${classes.title} ${classes.justifyContentCenter}`,
37
+ children: title && /*#__PURE__*/_jsx(HvTypography, {
38
+ variant: "highlightText",
39
+ children: title
40
+ })
41
+ })]
42
+ });
43
+ };
44
+ process.env.NODE_ENV !== "production" ? Header.propTypes = {
45
+ /**
46
+ * Id to be applied to the root node of the panel.
47
+ */
48
+ id: PropTypes.string,
49
+ /**
50
+ * The text to be displayed on the header.
51
+ */
52
+ title: PropTypes.string,
53
+ /**
54
+ * Flag to show / hide the back button.
55
+ */
56
+ showBackButton: PropTypes.bool,
57
+ /**
58
+ * The header height.
59
+ */
60
+ headerHeight: PropTypes.number,
61
+ /**
62
+ * Callback function triggered when the back button is clicked.
63
+ */
64
+ onBackButtonClick: PropTypes.func
65
+ } : void 0;
66
+ Header.defaultProps = {
67
+ headerHeight: 80
68
+ };
69
+ export default withStyles(useStyles, {
70
+ name: "Header"
71
+ })(Header);
72
+ //# sourceMappingURL=Header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.js","names":["React","withStyles","PropTypes","HvButton","HvTypography","Backwards","useStyles","Header","id","title","showBackButton","headerHeight","onBackButtonClick","classes","backButtonClickHandler","menuContainer","button","justifyContentCenter","propTypes","string","bool","number","func","defaultProps","name"],"sources":["../../../../src/NavigationSlider/Header/Header.js"],"sourcesContent":["import React from \"react\";\nimport { withStyles } from \"@mui/styles\";\nimport PropTypes from \"prop-types\";\n\nimport { HvButton, HvTypography } from \"@hitachivantara/uikit-react-core\";\nimport { Backwards } from \"@hitachivantara/uikit-react-icons\";\n\nimport useStyles from \"./styles\";\n\nconst Header = ({ id, title, showBackButton, headerHeight, onBackButtonClick }) => {\n const classes = useStyles({ headerHeight })();\n\n const backButtonClickHandler = () => {\n onBackButtonClick();\n };\n\n return (\n <div id={id} className={classes.menuContainer}>\n <div className={classes.button}>\n {showBackButton && (\n <HvButton icon onClick={backButtonClickHandler}>\n <Backwards iconSize=\"XS\" />\n </HvButton>\n )}\n </div>\n\n <div className={`${classes.title} ${classes.justifyContentCenter}`}>\n {title && <HvTypography variant=\"highlightText\">{title}</HvTypography>}\n </div>\n </div>\n );\n};\n\nHeader.propTypes = {\n /**\n * Id to be applied to the root node of the panel.\n */\n id: PropTypes.string,\n /**\n * The text to be displayed on the header.\n */\n title: PropTypes.string,\n /**\n * Flag to show / hide the back button.\n */\n showBackButton: PropTypes.bool,\n /**\n * The header height.\n */\n headerHeight: PropTypes.number,\n /**\n * Callback function triggered when the back button is clicked.\n */\n onBackButtonClick: PropTypes.func,\n};\n\nHeader.defaultProps = {\n headerHeight: 80,\n};\n\nexport default withStyles(useStyles, { name: \"Header\" })(Header);\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,aAAa;AACxC,OAAOC,SAAS,MAAM,YAAY;AAElC,SAASC,QAAQ,EAAEC,YAAY,QAAQ,kCAAkC;AACzE,SAASC,SAAS,QAAQ,mCAAmC;AAE7D,OAAOC,SAAS,MAAM,UAAU;AAAC;AAAA;AAEjC,MAAMC,MAAM,GAAG,CAAC;EAAEC,EAAE;EAAEC,KAAK;EAAEC,cAAc;EAAEC,YAAY;EAAEC;AAAkB,CAAC,KAAK;EACjF,MAAMC,OAAO,GAAGP,SAAS,CAAC;IAAEK;EAAa,CAAC,CAAC,EAAE;EAE7C,MAAMG,sBAAsB,GAAG,MAAM;IACnCF,iBAAiB,EAAE;EACrB,CAAC;EAED,oBACE;IAAK,EAAE,EAAEJ,EAAG;IAAC,SAAS,EAAEK,OAAO,CAACE,aAAc;IAAA,wBAC5C;MAAK,SAAS,EAAEF,OAAO,CAACG,MAAO;MAAA,UAC5BN,cAAc,iBACb,KAAC,QAAQ;QAAC,IAAI;QAAC,OAAO,EAAEI,sBAAuB;QAAA,mDAC7C,KAAC,SAAS;UAAC,QAAQ,EAAC;QAAI,EAAG;MAAA;IAE9B,EACG,eAEN;MAAK,SAAS,EAAG,GAAED,OAAO,CAACJ,KAAM,IAAGI,OAAO,CAACI,oBAAqB,EAAE;MAAA,UAChER,KAAK,iBAAI,KAAC,YAAY;QAAC,OAAO,EAAC,eAAe;QAAA,UAAEA;MAAK;IAAgB,EAClE;EAAA,EACF;AAEV,CAAC;AAED,wCAAAF,MAAM,CAACW,SAAS,GAAG;EACjB;AACF;AACA;EACEV,EAAE,EAAEN,SAAS,CAACiB,MAAM;EACpB;AACF;AACA;EACEV,KAAK,EAAEP,SAAS,CAACiB,MAAM;EACvB;AACF;AACA;EACET,cAAc,EAAER,SAAS,CAACkB,IAAI;EAC9B;AACF;AACA;EACET,YAAY,EAAET,SAAS,CAACmB,MAAM;EAC9B;AACF;AACA;EACET,iBAAiB,EAAEV,SAAS,CAACoB;AAC/B,CAAC;AAEDf,MAAM,CAACgB,YAAY,GAAG;EACpBZ,YAAY,EAAE;AAChB,CAAC;AAED,eAAeV,UAAU,CAACK,SAAS,EAAE;EAAEkB,IAAI,EAAE;AAAS,CAAC,CAAC,CAACjB,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from "./Header";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/NavigationSlider/Header/index.js"],"sourcesContent":["export { default } from \"./Header\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,UAAU"}
@@ -0,0 +1,25 @@
1
+ import { makeStyles } from "@mui/styles";
2
+ const styles = props => makeStyles(theme => ({
3
+ menuContainer: {
4
+ display: "grid",
5
+ gridTemplateColumns: "min-content auto",
6
+ minHeight: props.headerHeight,
7
+ boxShadow: "inset 0 5px 5px -3px rgb(65 65 65 / 12%)"
8
+ },
9
+ button: {
10
+ display: "flex",
11
+ alignItems: "center"
12
+ },
13
+ title: {
14
+ display: "flex",
15
+ alignItems: "center",
16
+ justifyContent: "center",
17
+ minHeight: theme.hv.spacing.sm,
18
+ padding: theme.hvSpacing(0, "xs")
19
+ },
20
+ justifyContentCenter: {
21
+ justifyContent: "center"
22
+ }
23
+ }));
24
+ export default styles;
25
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","names":["makeStyles","styles","props","theme","menuContainer","display","gridTemplateColumns","minHeight","headerHeight","boxShadow","button","alignItems","title","justifyContent","hv","spacing","sm","padding","hvSpacing","justifyContentCenter"],"sources":["../../../../src/NavigationSlider/Header/styles.js"],"sourcesContent":["import { makeStyles } from \"@mui/styles\";\n\nconst styles = (props) =>\n makeStyles((theme) => ({\n menuContainer: {\n display: \"grid\",\n gridTemplateColumns: \"min-content auto\",\n minHeight: props.headerHeight,\n boxShadow: \"inset 0 5px 5px -3px rgb(65 65 65 / 12%)\",\n },\n button: {\n display: \"flex\",\n alignItems: \"center\",\n },\n title: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n minHeight: theme.hv.spacing.sm,\n padding: theme.hvSpacing(0, \"xs\"),\n },\n justifyContentCenter: { justifyContent: \"center\" },\n }));\n\nexport default styles;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,aAAa;AAExC,MAAMC,MAAM,GAAIC,KAAK,IACnBF,UAAU,CAAEG,KAAK,KAAM;EACrBC,aAAa,EAAE;IACbC,OAAO,EAAE,MAAM;IACfC,mBAAmB,EAAE,kBAAkB;IACvCC,SAAS,EAAEL,KAAK,CAACM,YAAY;IAC7BC,SAAS,EAAE;EACb,CAAC;EACDC,MAAM,EAAE;IACNL,OAAO,EAAE,MAAM;IACfM,UAAU,EAAE;EACd,CAAC;EACDC,KAAK,EAAE;IACLP,OAAO,EAAE,MAAM;IACfM,UAAU,EAAE,QAAQ;IACpBE,cAAc,EAAE,QAAQ;IACxBN,SAAS,EAAEJ,KAAK,CAACW,EAAE,CAACC,OAAO,CAACC,EAAE;IAC9BC,OAAO,EAAEd,KAAK,CAACe,SAAS,CAAC,CAAC,EAAE,IAAI;EAClC,CAAC;EACDC,oBAAoB,EAAE;IAAEN,cAAc,EAAE;EAAS;AACnD,CAAC,CAAC,CAAC;AAEL,eAAeZ,MAAM"}