@elliemae/ds-left-navigation 2.2.0-next.6 → 2.3.0-alpha.1

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 (213) hide show
  1. package/cjs/LeftNavigation.js +49 -27
  2. package/cjs/LeftNavigation.js.map +7 -0
  3. package/cjs/LeftNavigationContext.js +44 -18
  4. package/cjs/LeftNavigationContext.js.map +7 -0
  5. package/cjs/common/getItemBackgroundStyle.js +47 -8
  6. package/cjs/common/getItemBackgroundStyle.js.map +7 -0
  7. package/cjs/common/getLeftBorderStyle.js +50 -8
  8. package/cjs/common/getLeftBorderStyle.js.map +7 -0
  9. package/cjs/common/getScrollbarStyle.js +55 -4
  10. package/cjs/common/getScrollbarStyle.js.map +7 -0
  11. package/cjs/common/index.js +30 -13
  12. package/cjs/common/index.js.map +7 -0
  13. package/cjs/configs/index.js +38 -10
  14. package/cjs/configs/index.js.map +7 -0
  15. package/cjs/configs/useLeftNavConfig.js +76 -76
  16. package/cjs/configs/useLeftNavConfig.js.map +7 -0
  17. package/cjs/configs/useLeftNavItems.js +66 -64
  18. package/cjs/configs/useLeftNavItems.js.map +7 -0
  19. package/cjs/configs/useLeftNavSmoothExpand.js +43 -25
  20. package/cjs/configs/useLeftNavSmoothExpand.js.map +7 -0
  21. package/cjs/exported-related/ChevronItem/index.js +42 -27
  22. package/cjs/exported-related/ChevronItem/index.js.map +7 -0
  23. package/cjs/exported-related/Icon/index.js +51 -34
  24. package/cjs/exported-related/Icon/index.js.map +7 -0
  25. package/cjs/exported-related/ItemRenderer/index.js +99 -94
  26. package/cjs/exported-related/ItemRenderer/index.js.map +7 -0
  27. package/cjs/exported-related/ItemRenderer/styled.js +83 -51
  28. package/cjs/exported-related/ItemRenderer/styled.js.map +7 -0
  29. package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +57 -45
  30. package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js.map +7 -0
  31. package/cjs/exported-related/Notifications/index.js +81 -61
  32. package/cjs/exported-related/Notifications/index.js.map +7 -0
  33. package/cjs/exported-related/OpenWindowItem/index.js +49 -32
  34. package/cjs/exported-related/OpenWindowItem/index.js.map +7 -0
  35. package/cjs/exported-related/constants.js +53 -25
  36. package/cjs/exported-related/constants.js.map +7 -0
  37. package/cjs/exported-related/index.js +33 -23
  38. package/cjs/exported-related/index.js.map +7 -0
  39. package/cjs/hooks/index.js +30 -13
  40. package/cjs/hooks/index.js.map +7 -0
  41. package/cjs/hooks/useExpandableOnClickHandler.js +55 -26
  42. package/cjs/hooks/useExpandableOnClickHandler.js.map +7 -0
  43. package/cjs/hooks/useKeyboardNavigation.js +62 -54
  44. package/cjs/hooks/useKeyboardNavigation.js.map +7 -0
  45. package/cjs/hooks/useOpenableOnClickHandler.js +55 -26
  46. package/cjs/hooks/useOpenableOnClickHandler.js.map +7 -0
  47. package/cjs/hooks/useSelectFirstBodyItem.js +47 -34
  48. package/cjs/hooks/useSelectFirstBodyItem.js.map +7 -0
  49. package/cjs/index.d.js +27 -2
  50. package/cjs/index.d.js.map +7 -0
  51. package/cjs/index.js +41 -30
  52. package/cjs/index.js.map +7 -0
  53. package/cjs/outOfTheBox/ItemControlledDrilldown/index.js +97 -103
  54. package/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +7 -0
  55. package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js +49 -27
  56. package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js.map +7 -0
  57. package/cjs/outOfTheBox/ItemHeader/index.js +95 -93
  58. package/cjs/outOfTheBox/ItemHeader/index.js.map +7 -0
  59. package/cjs/outOfTheBox/ItemHeader/styled.js +49 -22
  60. package/cjs/outOfTheBox/ItemHeader/styled.js.map +7 -0
  61. package/cjs/outOfTheBox/ItemLink/index.js +75 -67
  62. package/cjs/outOfTheBox/ItemLink/index.js.map +7 -0
  63. package/cjs/outOfTheBox/ItemLink/styled.js +41 -17
  64. package/cjs/outOfTheBox/ItemLink/styled.js.map +7 -0
  65. package/cjs/outOfTheBox/ItemSection/index.js +59 -63
  66. package/cjs/outOfTheBox/ItemSection/index.js.map +7 -0
  67. package/cjs/outOfTheBox/ItemSection/styled.js +53 -23
  68. package/cjs/outOfTheBox/ItemSection/styled.js.map +7 -0
  69. package/cjs/outOfTheBox/ItemSeparator/index.js +56 -45
  70. package/cjs/outOfTheBox/ItemSeparator/index.js.map +7 -0
  71. package/cjs/outOfTheBox/ItemSubmenu/index.js +95 -92
  72. package/cjs/outOfTheBox/ItemSubmenu/index.js.map +7 -0
  73. package/cjs/outOfTheBox/ItemSubmenu/styled.js +49 -22
  74. package/cjs/outOfTheBox/ItemSubmenu/styled.js.map +7 -0
  75. package/cjs/outOfTheBox/ItemTextLabel/index.js +51 -52
  76. package/cjs/outOfTheBox/ItemTextLabel/index.js.map +7 -0
  77. package/cjs/outOfTheBox/ItemTextLabel/styled.js +43 -23
  78. package/cjs/outOfTheBox/ItemTextLabel/styled.js.map +7 -0
  79. package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +107 -113
  80. package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +7 -0
  81. package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js +49 -27
  82. package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +7 -0
  83. package/cjs/outOfTheBox/ItemWithDate/index.js +59 -54
  84. package/cjs/outOfTheBox/ItemWithDate/index.js.map +7 -0
  85. package/cjs/outOfTheBox/ItemWithDate/styled.js +49 -27
  86. package/cjs/outOfTheBox/ItemWithDate/styled.js.map +7 -0
  87. package/cjs/outOfTheBox/index.js +65 -50
  88. package/cjs/outOfTheBox/index.js.map +7 -0
  89. package/cjs/parts/LeftNavContent/index.js +75 -71
  90. package/cjs/parts/LeftNavContent/index.js.map +7 -0
  91. package/cjs/parts/LeftNavContent/styled.js +110 -50
  92. package/cjs/parts/LeftNavContent/styled.js.map +7 -0
  93. package/cjs/parts/LeftNavContentWithScrollbar/index.js +89 -79
  94. package/cjs/parts/LeftNavContentWithScrollbar/index.js.map +7 -0
  95. package/cjs/parts/LeftNavFooterItem/index.js +97 -80
  96. package/cjs/parts/LeftNavFooterItem/index.js.map +7 -0
  97. package/cjs/parts/LeftNavFooterItem/styled.js +89 -34
  98. package/cjs/parts/LeftNavFooterItem/styled.js.map +7 -0
  99. package/cjs/parts/LeftNavLoading/index.js +51 -33
  100. package/cjs/parts/LeftNavLoading/index.js.map +7 -0
  101. package/cjs/parts/OutOfTheBoxMapItem.js +49 -46
  102. package/cjs/parts/OutOfTheBoxMapItem.js.map +7 -0
  103. package/cjs/prop-types.js +58 -39
  104. package/cjs/prop-types.js.map +7 -0
  105. package/esm/LeftNavigation.js +17 -15
  106. package/esm/LeftNavigation.js.map +7 -0
  107. package/esm/LeftNavigationContext.js +15 -11
  108. package/esm/LeftNavigationContext.js.map +7 -0
  109. package/esm/common/getItemBackgroundStyle.js +20 -6
  110. package/esm/common/getItemBackgroundStyle.js.map +7 -0
  111. package/esm/common/getLeftBorderStyle.js +23 -6
  112. package/esm/common/getLeftBorderStyle.js.map +7 -0
  113. package/esm/common/getScrollbarStyle.js +28 -2
  114. package/esm/common/getScrollbarStyle.js.map +7 -0
  115. package/esm/common/index.js +5 -3
  116. package/esm/common/index.js.map +7 -0
  117. package/esm/configs/index.js +9 -2
  118. package/esm/configs/index.js.map +7 -0
  119. package/esm/configs/useLeftNavConfig.js +47 -67
  120. package/esm/configs/useLeftNavConfig.js.map +7 -0
  121. package/esm/configs/useLeftNavItems.js +33 -55
  122. package/esm/configs/useLeftNavItems.js.map +7 -0
  123. package/esm/configs/useLeftNavSmoothExpand.js +14 -16
  124. package/esm/configs/useLeftNavSmoothExpand.js.map +7 -0
  125. package/esm/exported-related/ChevronItem/index.js +13 -18
  126. package/esm/exported-related/ChevronItem/index.js.map +7 -0
  127. package/esm/exported-related/Icon/index.js +21 -24
  128. package/esm/exported-related/Icon/index.js.map +7 -0
  129. package/esm/exported-related/ItemRenderer/index.js +65 -80
  130. package/esm/exported-related/ItemRenderer/index.js.map +7 -0
  131. package/esm/exported-related/ItemRenderer/styled.js +56 -42
  132. package/esm/exported-related/ItemRenderer/styled.js.map +7 -0
  133. package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +27 -36
  134. package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js.map +7 -0
  135. package/esm/exported-related/Notifications/index.js +57 -50
  136. package/esm/exported-related/Notifications/index.js.map +7 -0
  137. package/esm/exported-related/OpenWindowItem/index.js +20 -22
  138. package/esm/exported-related/OpenWindowItem/index.js.map +7 -0
  139. package/esm/exported-related/constants.js +24 -17
  140. package/esm/exported-related/constants.js.map +7 -0
  141. package/esm/exported-related/index.js +8 -6
  142. package/esm/exported-related/index.js.map +7 -0
  143. package/esm/hooks/index.js +5 -3
  144. package/esm/hooks/index.js.map +7 -0
  145. package/esm/hooks/useExpandableOnClickHandler.js +26 -22
  146. package/esm/hooks/useExpandableOnClickHandler.js.map +7 -0
  147. package/esm/hooks/useKeyboardNavigation.js +30 -47
  148. package/esm/hooks/useKeyboardNavigation.js.map +7 -0
  149. package/esm/hooks/useOpenableOnClickHandler.js +26 -22
  150. package/esm/hooks/useOpenableOnClickHandler.js.map +7 -0
  151. package/esm/hooks/useSelectFirstBodyItem.js +18 -30
  152. package/esm/hooks/useSelectFirstBodyItem.js.map +7 -0
  153. package/esm/index.d.js +2 -1
  154. package/esm/index.d.js.map +7 -0
  155. package/esm/index.js +12 -8
  156. package/esm/index.js.map +7 -0
  157. package/esm/outOfTheBox/ItemControlledDrilldown/index.js +62 -87
  158. package/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +7 -0
  159. package/esm/outOfTheBox/ItemControlledDrilldown/styled.js +20 -17
  160. package/esm/outOfTheBox/ItemControlledDrilldown/styled.js.map +7 -0
  161. package/esm/outOfTheBox/ItemHeader/index.js +65 -82
  162. package/esm/outOfTheBox/ItemHeader/index.js.map +7 -0
  163. package/esm/outOfTheBox/ItemHeader/styled.js +20 -12
  164. package/esm/outOfTheBox/ItemHeader/styled.js.map +7 -0
  165. package/esm/outOfTheBox/ItemLink/index.js +46 -57
  166. package/esm/outOfTheBox/ItemLink/index.js.map +7 -0
  167. package/esm/outOfTheBox/ItemLink/styled.js +12 -8
  168. package/esm/outOfTheBox/ItemLink/styled.js.map +7 -0
  169. package/esm/outOfTheBox/ItemSection/index.js +30 -53
  170. package/esm/outOfTheBox/ItemSection/index.js.map +7 -0
  171. package/esm/outOfTheBox/ItemSection/styled.js +24 -13
  172. package/esm/outOfTheBox/ItemSection/styled.js.map +7 -0
  173. package/esm/outOfTheBox/ItemSeparator/index.js +27 -35
  174. package/esm/outOfTheBox/ItemSeparator/index.js.map +7 -0
  175. package/esm/outOfTheBox/ItemSubmenu/index.js +65 -81
  176. package/esm/outOfTheBox/ItemSubmenu/index.js.map +7 -0
  177. package/esm/outOfTheBox/ItemSubmenu/styled.js +20 -12
  178. package/esm/outOfTheBox/ItemSubmenu/styled.js.map +7 -0
  179. package/esm/outOfTheBox/ItemTextLabel/index.js +22 -43
  180. package/esm/outOfTheBox/ItemTextLabel/index.js.map +7 -0
  181. package/esm/outOfTheBox/ItemTextLabel/styled.js +14 -14
  182. package/esm/outOfTheBox/ItemTextLabel/styled.js.map +7 -0
  183. package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +70 -95
  184. package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +7 -0
  185. package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js +20 -17
  186. package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +7 -0
  187. package/esm/outOfTheBox/ItemWithDate/index.js +30 -44
  188. package/esm/outOfTheBox/ItemWithDate/index.js.map +7 -0
  189. package/esm/outOfTheBox/ItemWithDate/styled.js +20 -17
  190. package/esm/outOfTheBox/ItemWithDate/styled.js.map +7 -0
  191. package/esm/outOfTheBox/index.js +25 -34
  192. package/esm/outOfTheBox/index.js.map +7 -0
  193. package/esm/parts/LeftNavContent/index.js +54 -64
  194. package/esm/parts/LeftNavContent/index.js.map +7 -0
  195. package/esm/parts/LeftNavContent/styled.js +81 -36
  196. package/esm/parts/LeftNavContent/styled.js.map +7 -0
  197. package/esm/parts/LeftNavContentWithScrollbar/index.js +56 -64
  198. package/esm/parts/LeftNavContentWithScrollbar/index.js.map +7 -0
  199. package/esm/parts/LeftNavFooterItem/index.js +73 -68
  200. package/esm/parts/LeftNavFooterItem/index.js.map +7 -0
  201. package/esm/parts/LeftNavFooterItem/styled.js +63 -24
  202. package/esm/parts/LeftNavFooterItem/styled.js.map +7 -0
  203. package/esm/parts/LeftNavLoading/index.js +22 -22
  204. package/esm/parts/LeftNavLoading/index.js.map +7 -0
  205. package/esm/parts/OutOfTheBoxMapItem.js +19 -35
  206. package/esm/parts/OutOfTheBoxMapItem.js.map +7 -0
  207. package/esm/prop-types.js +26 -29
  208. package/esm/prop-types.js.map +7 -0
  209. package/package.json +6 -6
  210. package/types/LeftNavigationContext.d.ts +4 -4
  211. package/types/configs/useLeftNavSmoothExpand.d.ts +3 -3
  212. package/types/hooks/useSelectFirstBodyItem.d.ts +1 -1
  213. package/types/index.d.d.ts +2 -5
@@ -1,34 +1,52 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _jsx = require('@babel/runtime/helpers/jsx');
6
- require('react');
7
- var DSCircularProgressIndicator = require('@elliemae/ds-circular-progress-indicator');
8
- var Grid = require('@elliemae/ds-grid');
9
- var styled = require('styled-components');
10
-
11
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
-
13
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
14
- var DSCircularProgressIndicator__default = /*#__PURE__*/_interopDefaultLegacy(DSCircularProgressIndicator);
15
- var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
16
- var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
17
-
18
- const StyledLoaderWrapper = /*#__PURE__*/styled__default["default"](Grid__default["default"]).withConfig({
19
- componentId: "sc-mqgtxd-0"
20
- })(["grid-area:left-nav-body;height:100%;place-items:center;z-index:0;background-color:white;"]);
21
- const LeftNavLoading = _ref => {
22
- let {
23
- expanded
24
- } = _ref;
25
- return /*#__PURE__*/_jsx__default["default"](StyledLoaderWrapper, {}, void 0, /*#__PURE__*/_jsx__default["default"](DSCircularProgressIndicator__default["default"], {
26
- size: expanded ? 'xl' : 'm',
27
- loading: true,
28
- showLabel: expanded,
29
- waiting: false,
30
- showTooltip: !expanded
31
- }));
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
32
11
  };
33
-
34
- exports.LeftNavLoading = LeftNavLoading;
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var LeftNavLoading_exports = {};
29
+ __export(LeftNavLoading_exports, {
30
+ LeftNavLoading: () => LeftNavLoading
31
+ });
32
+ var React = __toESM(require("react"));
33
+ var import_react = __toESM(require("react"));
34
+ var import_ds_circular_progress_indicator = __toESM(require("@elliemae/ds-circular-progress-indicator"));
35
+ var import_ds_grid = __toESM(require("@elliemae/ds-grid"));
36
+ var import_styled_components = __toESM(require("styled-components"));
37
+ const StyledLoaderWrapper = (0, import_styled_components.default)(import_ds_grid.default)`
38
+ grid-area: left-nav-body;
39
+ height: 100%;
40
+ place-items: center;
41
+ z-index: 0;
42
+ background-color: white;
43
+ `;
44
+ const LeftNavLoading = ({ expanded }) => /* @__PURE__ */ import_react.default.createElement(StyledLoaderWrapper, null, /* @__PURE__ */ import_react.default.createElement(import_ds_circular_progress_indicator.default, {
45
+ size: expanded ? "xl" : "m",
46
+ loading: true,
47
+ showLabel: expanded,
48
+ waiting: false,
49
+ showTooltip: !expanded
50
+ }));
51
+ module.exports = __toCommonJS(LeftNavLoading_exports);
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/parts/LeftNavLoading/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport DSCircularProgressIndicator from '@elliemae/ds-circular-progress-indicator';\nimport Grid from '@elliemae/ds-grid';\nimport styled from 'styled-components';\n\nconst StyledLoaderWrapper = styled(Grid)`\n grid-area: left-nav-body;\n height: 100%;\n place-items: center;\n z-index: 0;\n background-color: white;\n`;\n\nexport const LeftNavLoading: React.ComponentType<{ expanded: boolean }> = ({ expanded }) => (\n <StyledLoaderWrapper>\n <DSCircularProgressIndicator\n size={expanded ? 'xl' : 'm'}\n loading\n showLabel={expanded}\n waiting={false}\n showTooltip={!expanded}\n />\n </StyledLoaderWrapper>\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,4CAAwC;AACxC,qBAAiB;AACjB,+BAAmB;AAEnB,MAAM,sBAAsB,sCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ5B,MAAM,iBAA6D,CAAC,EAAE,eAC3E,mDAAC,qBAAD,MACE,mDAAC,+CAAD;AAAA,EACE,MAAM,WAAW,OAAO;AAAA,EACxB,SAAO;AAAA,EACP,WAAW;AAAA,EACX,SAAS;AAAA,EACT,aAAa,CAAC;AAAA;",
6
+ "names": []
7
+ }
@@ -1,52 +1,55 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- require('core-js/modules/esnext.async-iterator.filter.js');
6
- require('core-js/modules/esnext.iterator.constructor.js');
7
- require('core-js/modules/esnext.iterator.filter.js');
8
- require('core-js/modules/esnext.async-iterator.for-each.js');
9
- require('core-js/modules/esnext.iterator.for-each.js');
10
- var _jsx = require('@babel/runtime/helpers/jsx');
11
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
12
- var React = require('react');
13
- var index = require('../outOfTheBox/index.js');
14
- var LeftNavigationContext = require('../LeftNavigationContext.js');
15
-
16
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
-
18
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
19
- var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
20
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
21
-
22
- 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; }
23
-
24
- 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__default["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; }
25
- const OutOfTheBoxMapItem = props => {
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var OutOfTheBoxMapItem_exports = {};
29
+ __export(OutOfTheBoxMapItem_exports, {
30
+ OutOfTheBoxMapItem: () => OutOfTheBoxMapItem
31
+ });
32
+ var React = __toESM(require("react"));
33
+ var import_react = __toESM(require("react"));
34
+ var import_outOfTheBox = require("../outOfTheBox");
35
+ var import_LeftNavigationContext = require("../LeftNavigationContext");
36
+ const OutOfTheBoxMapItem = (props) => {
26
37
  const {
27
38
  item,
28
- item: {
29
- type,
30
- Component
31
- }
39
+ item: { type, Component }
32
40
  } = props;
33
- const ctx = React__default["default"].useContext(LeftNavigationContext.LeftNavContext);
34
-
35
- if (typeof type === 'string' && !!index.outOfTheBoxComponents[type]) {
36
- const OutOfTheBoxComponent = index.outOfTheBoxComponents[type];
37
- return /*#__PURE__*/_jsx__default["default"](OutOfTheBoxComponent, {
38
- item: _objectSpread({
39
- itemOpts: {}
40
- }, item),
41
- ctx: ctx
41
+ const ctx = import_react.default.useContext(import_LeftNavigationContext.LeftNavContext);
42
+ if (typeof type === "string" && !!import_outOfTheBox.outOfTheBoxComponents[type]) {
43
+ const OutOfTheBoxComponent = import_outOfTheBox.outOfTheBoxComponents[type];
44
+ return /* @__PURE__ */ import_react.default.createElement(OutOfTheBoxComponent, {
45
+ item: { itemOpts: {}, ...item },
46
+ ctx
42
47
  });
43
- } // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...
44
-
45
-
46
- return /*#__PURE__*/_jsx__default["default"](Component, {
47
- item: item,
48
- ctx: ctx
48
+ }
49
+ return /* @__PURE__ */ import_react.default.createElement(Component, {
50
+ item,
51
+ ctx
49
52
  });
50
53
  };
51
-
52
- exports.OutOfTheBoxMapItem = OutOfTheBoxMapItem;
54
+ module.exports = __toCommonJS(OutOfTheBoxMapItem_exports);
55
+ //# sourceMappingURL=OutOfTheBoxMapItem.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/parts/OutOfTheBoxMapItem.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { outOfTheBoxComponents } from '../outOfTheBox';\nimport { OutOfTheBoxMapItemT } from '../index.d';\nimport { LeftNavContext } from '../LeftNavigationContext';\n\nexport const OutOfTheBoxMapItem = (props: OutOfTheBoxMapItemT): JSX.Element => {\n const {\n item,\n item: { type, Component },\n } = props;\n const ctx = React.useContext(LeftNavContext);\n\n if (typeof type === 'string' && !!outOfTheBoxComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxComponents[type];\n return <OutOfTheBoxComponent item={{ itemOpts: {}, ...item }} ctx={ctx} />;\n }\n // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...\n return <Component item={item} ctx={ctx} />;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,yBAAsC;AAEtC,mCAA+B;AAExB,MAAM,qBAAqB,CAAC,UAA4C;AAC7E,QAAM;AAAA,IACJ;AAAA,IACA,MAAM,EAAE,MAAM;AAAA,MACZ;AACJ,QAAM,MAAM,qBAAM,WAAW;AAE7B,MAAI,OAAO,SAAS,YAAY,CAAC,CAAC,yCAAsB,OAAO;AAC7D,UAAM,uBAAuB,yCAAsB;AACnD,WAAO,mDAAC,sBAAD;AAAA,MAAsB,MAAM,EAAE,UAAU,OAAO;AAAA,MAAQ;AAAA;AAAA;AAGhE,SAAO,mDAAC,WAAD;AAAA,IAAW;AAAA,IAAY;AAAA;AAAA;",
6
+ "names": []
7
+ }
package/cjs/prop-types.js CHANGED
@@ -1,47 +1,66 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var reactDesc = require('react-desc');
6
- var index = require('./outOfTheBox/index.js');
7
-
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var prop_types_exports = {};
29
+ __export(prop_types_exports, {
30
+ LeftNavItemOptionsSchema: () => LeftNavItemOptionsSchema,
31
+ LeftNavItemPropsSchema: () => LeftNavItemPropsSchema,
32
+ leftNavItemProps: () => leftNavItemProps,
33
+ leftNavigationProps: () => leftNavigationProps
34
+ });
35
+ var React = __toESM(require("react"));
36
+ var import_react_desc = require("react-desc");
37
+ var import_outOfTheBox = require("./outOfTheBox");
8
38
  const leftNavItemProps = {
9
- type: reactDesc.PropTypes.oneOf(index.outOfTheBoxTypes).description('out of the box types'),
10
- dsId: reactDesc.PropTypes.string.description('unique identifier for the left nav item'),
11
- Component: reactDesc.PropTypes.func.description("A custom component, receives the item as prop. This is used only when type is not defined or doesn't matches any out-of-the-box"),
12
- CollapsedComponent: reactDesc.PropTypes.func.description('A component which is renderer when the left-nav is collapsed'),
13
- itemOpts: reactDesc.PropTypes.object.description('Item options')
39
+ type: import_react_desc.PropTypes.oneOf(import_outOfTheBox.outOfTheBoxTypes).description("out of the box types"),
40
+ dsId: import_react_desc.PropTypes.string.description("unique identifier for the left nav item"),
41
+ Component: import_react_desc.PropTypes.func.description("A custom component, receives the item as prop. This is used only when type is not defined or doesn't matches any out-of-the-box"),
42
+ CollapsedComponent: import_react_desc.PropTypes.func.description("A component which is renderer when the left-nav is collapsed"),
43
+ itemOpts: import_react_desc.PropTypes.object.description("Item options")
14
44
  };
15
45
  const leftNavigationProps = {
16
- containerProps: reactDesc.PropTypes.shape({
17
- expandedWidth: reactDesc.PropTypes.string
18
- }).description('Set of Properties attached to the main container').defaultValue({
19
- expandedWidth: '240px'
20
- }),
21
- expanded: reactDesc.PropTypes.bool.description('Whether to show the left navigation expanded or collapsed').defaultValue(false),
22
- loading: reactDesc.PropTypes.bool.description('Whether the left-nav is loading').defaultValue(false),
23
- tabIndex: reactDesc.PropTypes.number.description('Tab index').defaultValue(0),
24
- openedItem: reactDesc.PropTypes.string.description('The id of the left navigation item you want to be opened').defaultValue(null),
25
- footerLabel: reactDesc.PropTypes.string.description('The label to show in the footer item'),
26
- onFooterExpand: reactDesc.PropTypes.func.description('The function to call when the left-nav is opened via the footer'),
27
- onFooterClose: reactDesc.PropTypes.func.description('The function to call when the left-nav is closed via the footer'),
28
- onSelectedChange: reactDesc.PropTypes.func.description('A callback which triggers when the selected item changes').defaultValue(() => null),
29
- onFocusChange: reactDesc.PropTypes.func.description('A callback which triggers when the focused item changes').defaultValue(() => null),
30
- items: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.object).description('The array of items you want to render inside the left nav').defaultValue([]),
31
- disableDefaultSelection: reactDesc.PropTypes.bool.description('Whether you do not want to automatically select the first body item').defaultValue(false)
46
+ containerProps: import_react_desc.PropTypes.shape({ expandedWidth: import_react_desc.PropTypes.string }).description("Set of Properties attached to the main container").defaultValue({ expandedWidth: "240px" }),
47
+ expanded: import_react_desc.PropTypes.bool.description("Whether to show the left navigation expanded or collapsed").defaultValue(false),
48
+ loading: import_react_desc.PropTypes.bool.description("Whether the left-nav is loading").defaultValue(false),
49
+ tabIndex: import_react_desc.PropTypes.number.description("Tab index").defaultValue(0),
50
+ openedItem: import_react_desc.PropTypes.string.description("The id of the left navigation item you want to be opened").defaultValue(null),
51
+ footerLabel: import_react_desc.PropTypes.string.description("The label to show in the footer item"),
52
+ onFooterExpand: import_react_desc.PropTypes.func.description("The function to call when the left-nav is opened via the footer"),
53
+ onFooterClose: import_react_desc.PropTypes.func.description("The function to call when the left-nav is closed via the footer"),
54
+ onSelectedChange: import_react_desc.PropTypes.func.description("A callback which triggers when the selected item changes").defaultValue(() => null),
55
+ onFocusChange: import_react_desc.PropTypes.func.description("A callback which triggers when the focused item changes").defaultValue(() => null),
56
+ items: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.object).description("The array of items you want to render inside the left nav").defaultValue([]),
57
+ disableDefaultSelection: import_react_desc.PropTypes.bool.description("Whether you do not want to automatically select the first body item").defaultValue(false)
32
58
  };
33
-
34
59
  const LeftNavItemProps = () => null;
35
-
36
- const LeftNavItemPropsSchema = reactDesc.describe(LeftNavItemProps);
60
+ const LeftNavItemPropsSchema = (0, import_react_desc.describe)(LeftNavItemProps);
37
61
  LeftNavItemPropsSchema.propTypes = leftNavItemProps;
38
-
39
62
  const LeftNavItemOptions = () => null;
40
-
41
- const LeftNavItemOptionsSchema = reactDesc.describe(LeftNavItemOptions);
63
+ const LeftNavItemOptionsSchema = (0, import_react_desc.describe)(LeftNavItemOptions);
42
64
  LeftNavItemOptionsSchema.propTypes = leftNavItemProps;
43
-
44
- exports.LeftNavItemOptionsSchema = LeftNavItemOptionsSchema;
45
- exports.LeftNavItemPropsSchema = LeftNavItemPropsSchema;
46
- exports.leftNavItemProps = leftNavItemProps;
47
- exports.leftNavigationProps = leftNavigationProps;
65
+ module.exports = __toCommonJS(prop_types_exports);
66
+ //# sourceMappingURL=prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/prop-types.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { PropTypes, describe } from 'react-desc';\nimport { outOfTheBoxTypes } from './outOfTheBox';\n\nexport const leftNavItemProps = {\n type: PropTypes.oneOf(outOfTheBoxTypes).description('out of the box types'),\n dsId: PropTypes.string.description('unique identifier for the left nav item'),\n Component: PropTypes.func.description(\n \"A custom component, receives the item as prop. This is used only when type is not defined or doesn't matches any out-of-the-box\",\n ),\n CollapsedComponent: PropTypes.func.description('A component which is renderer when the left-nav is collapsed'),\n itemOpts: PropTypes.object.description('Item options'),\n};\n\nexport const leftNavigationProps = {\n containerProps: PropTypes.shape({ expandedWidth: PropTypes.string })\n .description('Set of Properties attached to the main container')\n .defaultValue({ expandedWidth: '240px' }),\n expanded: PropTypes.bool.description('Whether to show the left navigation expanded or collapsed').defaultValue(false),\n loading: PropTypes.bool.description('Whether the left-nav is loading').defaultValue(false),\n tabIndex: PropTypes.number.description('Tab index').defaultValue(0),\n openedItem: PropTypes.string\n .description('The id of the left navigation item you want to be opened')\n .defaultValue(null),\n footerLabel: PropTypes.string.description('The label to show in the footer item'),\n onFooterExpand: PropTypes.func.description('The function to call when the left-nav is opened via the footer'),\n onFooterClose: PropTypes.func.description('The function to call when the left-nav is closed via the footer'),\n onSelectedChange: PropTypes.func\n .description('A callback which triggers when the selected item changes')\n .defaultValue(() => null),\n onFocusChange: PropTypes.func\n .description('A callback which triggers when the focused item changes')\n .defaultValue(() => null),\n items: PropTypes.arrayOf(PropTypes.object)\n .description('The array of items you want to render inside the left nav')\n .defaultValue([]),\n disableDefaultSelection: PropTypes.bool\n .description('Whether you do not want to automatically select the first body item')\n .defaultValue(false),\n};\n\nconst LeftNavItemProps = () => null;\nexport const LeftNavItemPropsSchema = describe(LeftNavItemProps);\nLeftNavItemPropsSchema.propTypes = leftNavItemProps;\n\nconst LeftNavItemOptions = () => null;\nexport const LeftNavItemOptionsSchema = describe(LeftNavItemOptions);\nLeftNavItemOptionsSchema.propTypes = leftNavItemProps;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAoC;AACpC,yBAAiC;AAE1B,MAAM,mBAAmB;AAAA,EAC9B,MAAM,4BAAU,MAAM,qCAAkB,YAAY;AAAA,EACpD,MAAM,4BAAU,OAAO,YAAY;AAAA,EACnC,WAAW,4BAAU,KAAK,YACxB;AAAA,EAEF,oBAAoB,4BAAU,KAAK,YAAY;AAAA,EAC/C,UAAU,4BAAU,OAAO,YAAY;AAAA;AAGlC,MAAM,sBAAsB;AAAA,EACjC,gBAAgB,4BAAU,MAAM,EAAE,eAAe,4BAAU,UACxD,YAAY,oDACZ,aAAa,EAAE,eAAe;AAAA,EACjC,UAAU,4BAAU,KAAK,YAAY,6DAA6D,aAAa;AAAA,EAC/G,SAAS,4BAAU,KAAK,YAAY,mCAAmC,aAAa;AAAA,EACpF,UAAU,4BAAU,OAAO,YAAY,aAAa,aAAa;AAAA,EACjE,YAAY,4BAAU,OACnB,YAAY,4DACZ,aAAa;AAAA,EAChB,aAAa,4BAAU,OAAO,YAAY;AAAA,EAC1C,gBAAgB,4BAAU,KAAK,YAAY;AAAA,EAC3C,eAAe,4BAAU,KAAK,YAAY;AAAA,EAC1C,kBAAkB,4BAAU,KACzB,YAAY,4DACZ,aAAa,MAAM;AAAA,EACtB,eAAe,4BAAU,KACtB,YAAY,2DACZ,aAAa,MAAM;AAAA,EACtB,OAAO,4BAAU,QAAQ,4BAAU,QAChC,YAAY,6DACZ,aAAa;AAAA,EAChB,yBAAyB,4BAAU,KAChC,YAAY,uEACZ,aAAa;AAAA;AAGlB,MAAM,mBAAmB,MAAM;AACxB,MAAM,yBAAyB,gCAAS;AAC/C,uBAAuB,YAAY;AAEnC,MAAM,qBAAqB,MAAM;AAC1B,MAAM,2BAA2B,gCAAS;AACjD,yBAAyB,YAAY;",
6
+ "names": []
7
+ }
@@ -1,20 +1,22 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import 'react';
3
- import { describe } from 'react-desc';
4
- import { leftNavigationProps } from './prop-types.js';
5
- import { LeftNavContext, defaultProps } from './LeftNavigationContext.js';
6
- import { useLeftNavConfig } from './configs/useLeftNavConfig.js';
7
- import LeftNavContent from './parts/LeftNavContent/index.js';
8
-
9
- var _LeftNavContent;
10
- const LeftNavigation = props => {
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { describe } from "react-desc";
4
+ import { leftNavigationProps } from "./prop-types";
5
+ import LeftNavigationContext, { defaultProps } from "./LeftNavigationContext";
6
+ import { useLeftNavConfig } from "./configs/useLeftNavConfig";
7
+ import LeftNavContent from "./parts/LeftNavContent";
8
+ const LeftNavigation = (props) => {
11
9
  const leftNavConfig = useLeftNavConfig(props);
12
- return /*#__PURE__*/_jsx(LeftNavContext.Provider, {
10
+ return /* @__PURE__ */ React2.createElement(LeftNavigationContext.Provider, {
13
11
  value: leftNavConfig
14
- }, void 0, _LeftNavContent || (_LeftNavContent = /*#__PURE__*/_jsx(LeftNavContent, {})));
12
+ }, /* @__PURE__ */ React2.createElement(LeftNavContent, null));
15
13
  };
14
+ LeftNavigation.propTypes = leftNavigationProps;
16
15
  LeftNavigation.defaultProps = defaultProps;
17
- const LeftNavigationWithSchema = describe(LeftNavigation).description('Left Navigation');
16
+ const LeftNavigationWithSchema = describe(LeftNavigation).description("Left Navigation");
18
17
  LeftNavigationWithSchema.propTypes = leftNavigationProps;
19
-
20
- export { LeftNavigation, LeftNavigationWithSchema };
18
+ export {
19
+ LeftNavigation,
20
+ LeftNavigationWithSchema
21
+ };
22
+ //# sourceMappingURL=LeftNavigation.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/LeftNavigation.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from 'react-desc';\nimport { leftNavigationProps } from './prop-types';\nimport LeftNavigationContext, { defaultProps } from './LeftNavigationContext';\nimport { useLeftNavConfig } from './configs/useLeftNavConfig';\nimport LeftNavContent from './parts/LeftNavContent';\nimport type { LeftNavProps } from './index.d';\n\nexport const LeftNavigation = (props: LeftNavProps): JSX.Element => {\n const leftNavConfig = useLeftNavConfig(props);\n\n return (\n <LeftNavigationContext.Provider value={leftNavConfig}>\n <LeftNavContent />\n </LeftNavigationContext.Provider>\n );\n};\n\nLeftNavigation.propTypes = leftNavigationProps;\nLeftNavigation.defaultProps = defaultProps;\n\nexport const LeftNavigationWithSchema = describe(LeftNavigation).description('Left Navigation');\nLeftNavigationWithSchema.propTypes = leftNavigationProps;\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AAGO,MAAM,iBAAiB,CAAC,UAAqC;AAClE,QAAM,gBAAgB,iBAAiB;AAEvC,SACE,qCAAC,sBAAsB,UAAvB;AAAA,IAAgC,OAAO;AAAA,KACrC,qCAAC,gBAAD;AAAA;AAKN,eAAe,YAAY;AAC3B,eAAe,eAAe;AAEvB,MAAM,2BAA2B,SAAS,gBAAgB,YAAY;AAC7E,yBAAyB,YAAY;",
6
+ "names": []
7
+ }
@@ -1,18 +1,18 @@
1
- import { createContext } from 'react';
2
-
1
+ import * as React from "react";
2
+ import { createContext } from "react";
3
3
  const defaultProps = {
4
- expandedWidth: '240px',
4
+ expandedWidth: "240px",
5
5
  tabIndex: 0,
6
6
  loading: false,
7
7
  expanded: false,
8
8
  openedItem: null,
9
- footerLabel: '',
9
+ footerLabel: "",
10
10
  onSelectedChange: () => null,
11
11
  onFocusChange: () => null,
12
12
  onFooterExpand: () => null,
13
13
  onFooterClose: () => null,
14
14
  items: [],
15
- labelOverflow: 'wrap',
15
+ labelOverflow: "wrap",
16
16
  onItemClick: () => null
17
17
  };
18
18
  const defaultContext = {
@@ -25,10 +25,14 @@ const defaultContext = {
25
25
  openedDrilldowns: [],
26
26
  setOpenedDrilldowns: () => null,
27
27
  visibleItems: [],
28
- visibleItemsRefs: {
29
- current: {}
30
- }
28
+ visibleItemsRefs: { current: {} }
31
29
  };
32
- const LeftNavContext = /*#__PURE__*/createContext(defaultContext);
33
-
34
- export { LeftNavContext, LeftNavContext as default, defaultContext, defaultProps };
30
+ const LeftNavContext = createContext(defaultContext);
31
+ var LeftNavigationContext_default = LeftNavContext;
32
+ export {
33
+ LeftNavContext,
34
+ LeftNavigationContext_default as default,
35
+ defaultContext,
36
+ defaultProps
37
+ };
38
+ //# sourceMappingURL=LeftNavigationContext.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/LeftNavigationContext.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { createContext, MutableRefObject, RefObject } from 'react';\nimport type { LeftNavProps, LabelOveflowT } from './index.d';\n\nexport type ContextProps = {\n selectedItem: string;\n setSelectedItem: React.Dispatch<React.SetStateAction<string>>;\n focusedItem: string;\n setFocusedItem: React.Dispatch<React.SetStateAction<string>>;\n openedDrilldowns: string[];\n setOpenedDrilldowns: React.Dispatch<React.SetStateAction<string[]>>;\n visibleItems: string[];\n visibleItemsRefs: MutableRefObject<Record<string, RefObject<HTMLElement>>>;\n leftNavProps: LeftNavProps;\n expandedForAnimation: boolean;\n};\n\nexport const defaultProps: LeftNavProps = {\n expandedWidth: '240px',\n tabIndex: 0,\n loading: false,\n expanded: false,\n openedItem: null,\n footerLabel: '',\n onSelectedChange: () => null,\n onFocusChange: () => null,\n onFooterExpand: () => null,\n onFooterClose: () => null,\n items: [],\n labelOverflow: 'wrap' as LabelOveflowT,\n onItemClick: () => null,\n};\n\nexport const defaultContext: ContextProps = {\n leftNavProps: defaultProps,\n selectedItem: null,\n setSelectedItem: () => null,\n focusedItem: null,\n setFocusedItem: () => null,\n expandedForAnimation: true,\n openedDrilldowns: [],\n setOpenedDrilldowns: () => null,\n visibleItems: [],\n visibleItemsRefs: { current: {} },\n};\n\nexport const LeftNavContext = createContext<ContextProps>(defaultContext);\n\nexport default LeftNavContext;\n"],
5
+ "mappings": "AAAA;ACAA;AAgBO,MAAM,eAA6B;AAAA,EACxC,eAAe;AAAA,EACf,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,kBAAkB,MAAM;AAAA,EACxB,eAAe,MAAM;AAAA,EACrB,gBAAgB,MAAM;AAAA,EACtB,eAAe,MAAM;AAAA,EACrB,OAAO;AAAA,EACP,eAAe;AAAA,EACf,aAAa,MAAM;AAAA;AAGd,MAAM,iBAA+B;AAAA,EAC1C,cAAc;AAAA,EACd,cAAc;AAAA,EACd,iBAAiB,MAAM;AAAA,EACvB,aAAa;AAAA,EACb,gBAAgB,MAAM;AAAA,EACtB,sBAAsB;AAAA,EACtB,kBAAkB;AAAA,EAClB,qBAAqB,MAAM;AAAA,EAC3B,cAAc;AAAA,EACd,kBAAkB,EAAE,SAAS;AAAA;AAGxB,MAAM,iBAAiB,cAA4B;AAE1D,IAAO,gCAAQ;",
6
+ "names": []
7
+ }
@@ -1,8 +1,22 @@
1
- const commonItemBackgroundStyle = (color, hoverColor, activeColor) => "\n\n background: ".concat(color, ";\n\n :hover {\n background: ").concat(hoverColor, ";\n }\n\n :active {\n background: ").concat(activeColor, ";\n }\n");
1
+ import * as React from "react";
2
+ const commonItemBackgroundStyle = (color, hoverColor, activeColor) => `
2
3
 
3
- const getItemBackgroundStyle = props => {
4
- if (props.selected && !props.opened) return commonItemBackgroundStyle(props.theme.colors.brand[200], props.theme.colors.brand[200], props.theme.colors.brand[200]);
5
- return commonItemBackgroundStyle(props.theme.colors.neutral['000'], props.theme.colors.neutral['080'], props.theme.colors.brand[200]);
6
- };
4
+ background: ${color};
5
+
6
+ :hover {
7
+ background: ${hoverColor};
8
+ }
7
9
 
8
- export { getItemBackgroundStyle };
10
+ :active {
11
+ background: ${activeColor};
12
+ }
13
+ `;
14
+ const getItemBackgroundStyle = (props) => {
15
+ if (props.selected && !props.opened)
16
+ return commonItemBackgroundStyle(props.theme.colors.brand[200], props.theme.colors.brand[200], props.theme.colors.brand[200]);
17
+ return commonItemBackgroundStyle(props.theme.colors.neutral["000"], props.theme.colors.neutral["080"], props.theme.colors.brand[200]);
18
+ };
19
+ export {
20
+ getItemBackgroundStyle
21
+ };
22
+ //# sourceMappingURL=getItemBackgroundStyle.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/common/getItemBackgroundStyle.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "const commonItemBackgroundStyle = (\n color: string,\n hoverColor: string,\n activeColor: string,\n): string => `\n\n background: ${color};\n\n :hover {\n background: ${hoverColor};\n }\n\n :active {\n background: ${activeColor};\n }\n`;\n\nexport const getItemBackgroundStyle = (props: {\n theme: any;\n selected: boolean;\n opened: boolean;\n}): string => {\n if (props.selected && !props.opened)\n return commonItemBackgroundStyle(\n props.theme.colors.brand[200],\n props.theme.colors.brand[200],\n props.theme.colors.brand[200],\n );\n\n return commonItemBackgroundStyle(\n props.theme.colors.neutral['000'],\n props.theme.colors.neutral['080'],\n props.theme.colors.brand[200],\n );\n};\n"],
5
+ "mappings": "AAAA;ACAA,MAAM,4BAA4B,CAChC,OACA,YACA,gBACW;AAAA;AAAA,gBAEG;AAAA;AAAA;AAAA,kBAGE;AAAA;AAAA;AAAA;AAAA,kBAIA;AAAA;AAAA;AAIX,MAAM,yBAAyB,CAAC,UAIzB;AACZ,MAAI,MAAM,YAAY,CAAC,MAAM;AAC3B,WAAO,0BACL,MAAM,MAAM,OAAO,MAAM,MACzB,MAAM,MAAM,OAAO,MAAM,MACzB,MAAM,MAAM,OAAO,MAAM;AAG7B,SAAO,0BACL,MAAM,MAAM,OAAO,QAAQ,QAC3B,MAAM,MAAM,OAAO,QAAQ,QAC3B,MAAM,MAAM,OAAO,MAAM;AAAA;",
6
+ "names": []
7
+ }
@@ -1,8 +1,25 @@
1
- const commonLeftBorderStyle = (color, hoverColor, activeColor) => "\n\n -webkit-box-shadow: inset 4px 0 0 0 ".concat(color, ";\n box-shadow: inset 4px 0 0 0 ").concat(color, ";\n\n :hover {\n -webkit-box-shadow: inset 4px 0 0 0 ").concat(hoverColor, ";\n box-shadow: inset 4px 0 0 0 ").concat(hoverColor, ";\n }\n\n :active {\n -webkit-box-shadow: inset 4px 0 0 0 ").concat(activeColor, ";\n box-shadow: inset 4px 0 0 0 ").concat(activeColor, ";\n }\n");
1
+ import * as React from "react";
2
+ const commonLeftBorderStyle = (color, hoverColor, activeColor) => `
2
3
 
3
- const getLeftBorderStyle = props => {
4
- if (props.selected || props.selectedParent) return commonLeftBorderStyle(props.theme.colors.brand[400], props.theme.colors.brand[400], props.theme.colors.brand[400]);
5
- return commonLeftBorderStyle(props.theme.colors.neutral['000'], props.theme.colors.brand[300], props.theme.colors.brand[400]);
6
- };
4
+ -webkit-box-shadow: inset 4px 0 0 0 ${color};
5
+ box-shadow: inset 4px 0 0 0 ${color};
6
+
7
+ :hover {
8
+ -webkit-box-shadow: inset 4px 0 0 0 ${hoverColor};
9
+ box-shadow: inset 4px 0 0 0 ${hoverColor};
10
+ }
7
11
 
8
- export { getLeftBorderStyle };
12
+ :active {
13
+ -webkit-box-shadow: inset 4px 0 0 0 ${activeColor};
14
+ box-shadow: inset 4px 0 0 0 ${activeColor};
15
+ }
16
+ `;
17
+ const getLeftBorderStyle = (props) => {
18
+ if (props.selected || props.selectedParent)
19
+ return commonLeftBorderStyle(props.theme.colors.brand[400], props.theme.colors.brand[400], props.theme.colors.brand[400]);
20
+ return commonLeftBorderStyle(props.theme.colors.neutral["000"], props.theme.colors.brand[300], props.theme.colors.brand[400]);
21
+ };
22
+ export {
23
+ getLeftBorderStyle
24
+ };
25
+ //# sourceMappingURL=getLeftBorderStyle.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/common/getLeftBorderStyle.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "const commonLeftBorderStyle = (\n color: string,\n hoverColor: string,\n activeColor: string,\n): string => `\n\n -webkit-box-shadow: inset 4px 0 0 0 ${color};\n box-shadow: inset 4px 0 0 0 ${color};\n\n :hover {\n -webkit-box-shadow: inset 4px 0 0 0 ${hoverColor};\n box-shadow: inset 4px 0 0 0 ${hoverColor};\n }\n\n :active {\n -webkit-box-shadow: inset 4px 0 0 0 ${activeColor};\n box-shadow: inset 4px 0 0 0 ${activeColor};\n }\n`;\n\nexport const getLeftBorderStyle = (props: {\n theme: any;\n selected: boolean;\n}): string => {\n if (props.selected || props.selectedParent)\n return commonLeftBorderStyle(\n props.theme.colors.brand[400],\n props.theme.colors.brand[400],\n props.theme.colors.brand[400],\n );\n\n return commonLeftBorderStyle(\n props.theme.colors.neutral['000'],\n props.theme.colors.brand[300],\n props.theme.colors.brand[400],\n );\n};\n"],
5
+ "mappings": "AAAA;ACAA,MAAM,wBAAwB,CAC5B,OACA,YACA,gBACW;AAAA;AAAA,wCAE2B;AAAA,wCACA;AAAA;AAAA;AAAA,0CAGE;AAAA,0CACA;AAAA;AAAA;AAAA;AAAA,0CAIA;AAAA,0CACA;AAAA;AAAA;AAInC,MAAM,qBAAqB,CAAC,UAGrB;AACZ,MAAI,MAAM,YAAY,MAAM;AAC1B,WAAO,sBACL,MAAM,MAAM,OAAO,MAAM,MACzB,MAAM,MAAM,OAAO,MAAM,MACzB,MAAM,MAAM,OAAO,MAAM;AAG7B,SAAO,sBACL,MAAM,MAAM,OAAO,QAAQ,QAC3B,MAAM,MAAM,OAAO,MAAM,MACzB,MAAM,MAAM,OAAO,MAAM;AAAA;",
6
+ "names": []
7
+ }
@@ -1,3 +1,29 @@
1
- const getScrolbarStyle = () => "\n ::-webkit-scrollbar {\n width: 14px;\n }\n ::-webkit-scrollbar-thumb {\n height: 6px;\n border: 4px solid rgba(0, 0, 0, 0);\n\n background-clip: padding-box;\n\n background-color: rgba(105, 116, 137, 0.5);\n\n border-radius: 7px;\n -webkit-border-radius: 7px;\n }\n ::-webkit-scrollbar-button {\n width: 0;\n height: 0;\n display: none;\n }\n ::-webkit-scrollbar-corner {\n background-color: transparent;\n }\n";
1
+ import * as React from "react";
2
+ const getScrolbarStyle = () => `
3
+ ::-webkit-scrollbar {
4
+ width: 14px;
5
+ }
6
+ ::-webkit-scrollbar-thumb {
7
+ height: 6px;
8
+ border: 4px solid rgba(0, 0, 0, 0);
2
9
 
3
- export { getScrolbarStyle };
10
+ background-clip: padding-box;
11
+
12
+ background-color: rgba(105, 116, 137, 0.5);
13
+
14
+ border-radius: 7px;
15
+ -webkit-border-radius: 7px;
16
+ }
17
+ ::-webkit-scrollbar-button {
18
+ width: 0;
19
+ height: 0;
20
+ display: none;
21
+ }
22
+ ::-webkit-scrollbar-corner {
23
+ background-color: transparent;
24
+ }
25
+ `;
26
+ export {
27
+ getScrolbarStyle
28
+ };
29
+ //# sourceMappingURL=getScrollbarStyle.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/common/getScrollbarStyle.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const getScrolbarStyle = (): string => `\n ::-webkit-scrollbar {\n width: 14px;\n }\n ::-webkit-scrollbar-thumb {\n height: 6px;\n border: 4px solid rgba(0, 0, 0, 0);\n\n background-clip: padding-box;\n\n background-color: rgba(105, 116, 137, 0.5);\n\n border-radius: 7px;\n -webkit-border-radius: 7px;\n }\n ::-webkit-scrollbar-button {\n width: 0;\n height: 0;\n display: none;\n }\n ::-webkit-scrollbar-corner {\n background-color: transparent;\n }\n`;\n"],
5
+ "mappings": "AAAA;ACAO,MAAM,mBAAmB,MAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,3 +1,5 @@
1
- export { getItemBackgroundStyle } from './getItemBackgroundStyle.js';
2
- export { getLeftBorderStyle } from './getLeftBorderStyle.js';
3
- export { getScrolbarStyle } from './getScrollbarStyle.js';
1
+ import * as React from "react";
2
+ export * from "./getItemBackgroundStyle";
3
+ export * from "./getLeftBorderStyle";
4
+ export * from "./getScrollbarStyle";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/common/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './getItemBackgroundStyle';\nexport * from './getLeftBorderStyle';\nexport * from './getScrollbarStyle';\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;",
6
+ "names": []
7
+ }
@@ -1,2 +1,9 @@
1
- import { useLeftNavConfig } from './useLeftNavConfig.js';
2
- export { useLeftNavConfig as default, useLeftNavConfig } from './useLeftNavConfig.js';
1
+ import * as React from "react";
2
+ import { useLeftNavConfig } from "./useLeftNavConfig";
3
+ import { useLeftNavConfig as useLeftNavConfig2 } from "./useLeftNavConfig";
4
+ var configs_default = useLeftNavConfig;
5
+ export {
6
+ configs_default as default,
7
+ useLeftNavConfig2 as useLeftNavConfig
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/configs/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useLeftNavConfig } from './useLeftNavConfig';\n\nexport { useLeftNavConfig } from './useLeftNavConfig';\nexport default useLeftNavConfig;\n"],
5
+ "mappings": "AAAA;ACAA;AAEA;AACA,IAAO,kBAAQ;",
6
+ "names": []
7
+ }