@elliemae/ds-left-navigation 2.2.1 → 2.3.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/LeftNavigation.js +49 -27
- package/cjs/LeftNavigation.js.map +7 -0
- package/cjs/LeftNavigationContext.js +44 -18
- package/cjs/LeftNavigationContext.js.map +7 -0
- package/cjs/common/getItemBackgroundStyle.js +47 -8
- package/cjs/common/getItemBackgroundStyle.js.map +7 -0
- package/cjs/common/getLeftBorderStyle.js +50 -8
- package/cjs/common/getLeftBorderStyle.js.map +7 -0
- package/cjs/common/getScrollbarStyle.js +55 -4
- package/cjs/common/getScrollbarStyle.js.map +7 -0
- package/cjs/common/index.js +30 -13
- package/cjs/common/index.js.map +7 -0
- package/cjs/configs/index.js +38 -10
- package/cjs/configs/index.js.map +7 -0
- package/cjs/configs/useLeftNavConfig.js +80 -72
- package/cjs/configs/useLeftNavConfig.js.map +7 -0
- package/cjs/configs/useLeftNavItems.js +66 -64
- package/cjs/configs/useLeftNavItems.js.map +7 -0
- package/cjs/configs/useLeftNavSmoothExpand.js +48 -27
- package/cjs/configs/useLeftNavSmoothExpand.js.map +7 -0
- package/cjs/exported-related/ChevronItem/index.js +42 -27
- package/cjs/exported-related/ChevronItem/index.js.map +7 -0
- package/cjs/exported-related/Icon/index.js +51 -34
- package/cjs/exported-related/Icon/index.js.map +7 -0
- package/cjs/exported-related/ItemRenderer/index.js +99 -94
- package/cjs/exported-related/ItemRenderer/index.js.map +7 -0
- package/cjs/exported-related/ItemRenderer/styled.js +83 -51
- package/cjs/exported-related/ItemRenderer/styled.js.map +7 -0
- package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +57 -45
- package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js.map +7 -0
- package/cjs/exported-related/Notifications/index.js +81 -61
- package/cjs/exported-related/Notifications/index.js.map +7 -0
- package/cjs/exported-related/OpenWindowItem/index.js +49 -32
- package/cjs/exported-related/OpenWindowItem/index.js.map +7 -0
- package/cjs/exported-related/constants.js +53 -25
- package/cjs/exported-related/constants.js.map +7 -0
- package/cjs/exported-related/index.js +33 -23
- package/cjs/exported-related/index.js.map +7 -0
- package/cjs/hooks/index.js +30 -13
- package/cjs/hooks/index.js.map +7 -0
- package/cjs/hooks/useExpandableOnClickHandler.js +55 -26
- package/cjs/hooks/useExpandableOnClickHandler.js.map +7 -0
- package/cjs/hooks/useKeyboardNavigation.js +62 -54
- package/cjs/hooks/useKeyboardNavigation.js.map +7 -0
- package/cjs/hooks/useOpenableOnClickHandler.js +55 -26
- package/cjs/hooks/useOpenableOnClickHandler.js.map +7 -0
- package/cjs/hooks/useSelectFirstBodyItem.js +46 -30
- package/cjs/hooks/useSelectFirstBodyItem.js.map +7 -0
- package/cjs/index.d.js +27 -2
- package/cjs/index.d.js.map +7 -0
- package/cjs/index.js +41 -30
- package/cjs/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemControlledDrilldown/index.js +97 -103
- package/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js +49 -27
- package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemHeader/index.js +96 -91
- package/cjs/outOfTheBox/ItemHeader/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemHeader/styled.js +49 -22
- package/cjs/outOfTheBox/ItemHeader/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemLink/index.js +76 -65
- package/cjs/outOfTheBox/ItemLink/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemLink/styled.js +41 -17
- package/cjs/outOfTheBox/ItemLink/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemSection/index.js +59 -63
- package/cjs/outOfTheBox/ItemSection/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemSection/styled.js +53 -23
- package/cjs/outOfTheBox/ItemSection/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemSeparator/index.js +56 -45
- package/cjs/outOfTheBox/ItemSeparator/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemSubmenu/index.js +96 -90
- package/cjs/outOfTheBox/ItemSubmenu/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemSubmenu/styled.js +49 -22
- package/cjs/outOfTheBox/ItemSubmenu/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemTextLabel/index.js +51 -52
- package/cjs/outOfTheBox/ItemTextLabel/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemTextLabel/styled.js +43 -23
- package/cjs/outOfTheBox/ItemTextLabel/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +107 -113
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js +49 -27
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemWithDate/index.js +59 -54
- package/cjs/outOfTheBox/ItemWithDate/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemWithDate/styled.js +49 -27
- package/cjs/outOfTheBox/ItemWithDate/styled.js.map +7 -0
- package/cjs/outOfTheBox/index.js +65 -50
- package/cjs/outOfTheBox/index.js.map +7 -0
- package/cjs/parts/LeftNavContent/index.js +75 -71
- package/cjs/parts/LeftNavContent/index.js.map +7 -0
- package/cjs/parts/LeftNavContent/styled.js +110 -50
- package/cjs/parts/LeftNavContent/styled.js.map +7 -0
- package/cjs/parts/LeftNavContentWithScrollbar/index.js +89 -79
- package/cjs/parts/LeftNavContentWithScrollbar/index.js.map +7 -0
- package/cjs/parts/LeftNavFooterItem/index.js +97 -80
- package/cjs/parts/LeftNavFooterItem/index.js.map +7 -0
- package/cjs/parts/LeftNavFooterItem/styled.js +89 -34
- package/cjs/parts/LeftNavFooterItem/styled.js.map +7 -0
- package/cjs/parts/LeftNavLoading/index.js +51 -33
- package/cjs/parts/LeftNavLoading/index.js.map +7 -0
- package/cjs/parts/OutOfTheBoxMapItem.js +49 -46
- package/cjs/parts/OutOfTheBoxMapItem.js.map +7 -0
- package/cjs/prop-types.js +58 -39
- package/cjs/prop-types.js.map +7 -0
- package/esm/LeftNavigation.js +17 -15
- package/esm/LeftNavigation.js.map +7 -0
- package/esm/LeftNavigationContext.js +15 -11
- package/esm/LeftNavigationContext.js.map +7 -0
- package/esm/common/getItemBackgroundStyle.js +20 -6
- package/esm/common/getItemBackgroundStyle.js.map +7 -0
- package/esm/common/getLeftBorderStyle.js +23 -6
- package/esm/common/getLeftBorderStyle.js.map +7 -0
- package/esm/common/getScrollbarStyle.js +28 -2
- package/esm/common/getScrollbarStyle.js.map +7 -0
- package/esm/common/index.js +5 -3
- package/esm/common/index.js.map +7 -0
- package/esm/configs/index.js +9 -2
- package/esm/configs/index.js.map +7 -0
- package/esm/configs/useLeftNavConfig.js +51 -63
- package/esm/configs/useLeftNavConfig.js.map +7 -0
- package/esm/configs/useLeftNavItems.js +33 -55
- package/esm/configs/useLeftNavItems.js.map +7 -0
- package/esm/configs/useLeftNavSmoothExpand.js +19 -18
- package/esm/configs/useLeftNavSmoothExpand.js.map +7 -0
- package/esm/exported-related/ChevronItem/index.js +13 -18
- package/esm/exported-related/ChevronItem/index.js.map +7 -0
- package/esm/exported-related/Icon/index.js +21 -24
- package/esm/exported-related/Icon/index.js.map +7 -0
- package/esm/exported-related/ItemRenderer/index.js +65 -80
- package/esm/exported-related/ItemRenderer/index.js.map +7 -0
- package/esm/exported-related/ItemRenderer/styled.js +56 -42
- package/esm/exported-related/ItemRenderer/styled.js.map +7 -0
- package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +27 -36
- package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js.map +7 -0
- package/esm/exported-related/Notifications/index.js +57 -50
- package/esm/exported-related/Notifications/index.js.map +7 -0
- package/esm/exported-related/OpenWindowItem/index.js +20 -22
- package/esm/exported-related/OpenWindowItem/index.js.map +7 -0
- package/esm/exported-related/constants.js +24 -17
- package/esm/exported-related/constants.js.map +7 -0
- package/esm/exported-related/index.js +8 -6
- package/esm/exported-related/index.js.map +7 -0
- package/esm/hooks/index.js +5 -3
- package/esm/hooks/index.js.map +7 -0
- package/esm/hooks/useExpandableOnClickHandler.js +26 -22
- package/esm/hooks/useExpandableOnClickHandler.js.map +7 -0
- package/esm/hooks/useKeyboardNavigation.js +30 -47
- package/esm/hooks/useKeyboardNavigation.js.map +7 -0
- package/esm/hooks/useOpenableOnClickHandler.js +26 -22
- package/esm/hooks/useOpenableOnClickHandler.js.map +7 -0
- package/esm/hooks/useSelectFirstBodyItem.js +17 -26
- package/esm/hooks/useSelectFirstBodyItem.js.map +7 -0
- package/esm/index.d.js +2 -1
- package/esm/index.d.js.map +7 -0
- package/esm/index.js +12 -8
- package/esm/index.js.map +7 -0
- package/esm/outOfTheBox/ItemControlledDrilldown/index.js +62 -87
- package/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +7 -0
- package/esm/outOfTheBox/ItemControlledDrilldown/styled.js +20 -17
- package/esm/outOfTheBox/ItemControlledDrilldown/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemHeader/index.js +66 -80
- package/esm/outOfTheBox/ItemHeader/index.js.map +7 -0
- package/esm/outOfTheBox/ItemHeader/styled.js +20 -12
- package/esm/outOfTheBox/ItemHeader/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemLink/index.js +47 -55
- package/esm/outOfTheBox/ItemLink/index.js.map +7 -0
- package/esm/outOfTheBox/ItemLink/styled.js +12 -8
- package/esm/outOfTheBox/ItemLink/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemSection/index.js +30 -53
- package/esm/outOfTheBox/ItemSection/index.js.map +7 -0
- package/esm/outOfTheBox/ItemSection/styled.js +24 -13
- package/esm/outOfTheBox/ItemSection/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemSeparator/index.js +27 -35
- package/esm/outOfTheBox/ItemSeparator/index.js.map +7 -0
- package/esm/outOfTheBox/ItemSubmenu/index.js +66 -79
- package/esm/outOfTheBox/ItemSubmenu/index.js.map +7 -0
- package/esm/outOfTheBox/ItemSubmenu/styled.js +20 -12
- package/esm/outOfTheBox/ItemSubmenu/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemTextLabel/index.js +22 -43
- package/esm/outOfTheBox/ItemTextLabel/index.js.map +7 -0
- package/esm/outOfTheBox/ItemTextLabel/styled.js +14 -14
- package/esm/outOfTheBox/ItemTextLabel/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +70 -95
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +7 -0
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js +20 -17
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemWithDate/index.js +30 -44
- package/esm/outOfTheBox/ItemWithDate/index.js.map +7 -0
- package/esm/outOfTheBox/ItemWithDate/styled.js +20 -17
- package/esm/outOfTheBox/ItemWithDate/styled.js.map +7 -0
- package/esm/outOfTheBox/index.js +25 -34
- package/esm/outOfTheBox/index.js.map +7 -0
- package/esm/parts/LeftNavContent/index.js +54 -64
- package/esm/parts/LeftNavContent/index.js.map +7 -0
- package/esm/parts/LeftNavContent/styled.js +81 -36
- package/esm/parts/LeftNavContent/styled.js.map +7 -0
- package/esm/parts/LeftNavContentWithScrollbar/index.js +56 -64
- package/esm/parts/LeftNavContentWithScrollbar/index.js.map +7 -0
- package/esm/parts/LeftNavFooterItem/index.js +73 -68
- package/esm/parts/LeftNavFooterItem/index.js.map +7 -0
- package/esm/parts/LeftNavFooterItem/styled.js +63 -24
- package/esm/parts/LeftNavFooterItem/styled.js.map +7 -0
- package/esm/parts/LeftNavLoading/index.js +22 -22
- package/esm/parts/LeftNavLoading/index.js.map +7 -0
- package/esm/parts/OutOfTheBoxMapItem.js +19 -35
- package/esm/parts/OutOfTheBoxMapItem.js.map +7 -0
- package/esm/prop-types.js +26 -29
- package/esm/prop-types.js.map +7 -0
- package/package.json +6 -6
- package/types/LeftNavigationContext.d.ts +4 -4
- package/types/configs/useLeftNavSmoothExpand.d.ts +3 -3
- package/types/hooks/useSelectFirstBodyItem.d.ts +1 -1
- package/types/index.d.d.ts +5 -2
|
@@ -1,34 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
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
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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 =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
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:
|
|
10
|
-
dsId:
|
|
11
|
-
Component:
|
|
12
|
-
CollapsedComponent:
|
|
13
|
-
itemOpts:
|
|
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:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
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
|
+
}
|
package/esm/LeftNavigation.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { describe } from
|
|
4
|
-
import { leftNavigationProps } from
|
|
5
|
-
import {
|
|
6
|
-
import { useLeftNavConfig } from
|
|
7
|
-
import LeftNavContent from
|
|
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
|
|
10
|
+
return /* @__PURE__ */ React2.createElement(LeftNavigationContext.Provider, {
|
|
13
11
|
value: leftNavConfig
|
|
14
|
-
},
|
|
12
|
+
}, /* @__PURE__ */ React2.createElement(LeftNavContent, null));
|
|
15
13
|
};
|
|
14
|
+
LeftNavigation.propTypes = leftNavigationProps;
|
|
16
15
|
LeftNavigation.defaultProps = defaultProps;
|
|
17
|
-
const LeftNavigationWithSchema = describe(LeftNavigation).description(
|
|
16
|
+
const LeftNavigationWithSchema = describe(LeftNavigation).description("Left Navigation");
|
|
18
17
|
LeftNavigationWithSchema.propTypes = leftNavigationProps;
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
2
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { createContext } from "react";
|
|
3
3
|
const defaultProps = {
|
|
4
|
-
expandedWidth:
|
|
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:
|
|
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 =
|
|
33
|
-
|
|
34
|
-
export {
|
|
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 | null;\n setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>;\n focusedItem: string | null;\n setFocusedItem: React.Dispatch<React.SetStateAction<string | null>>;\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
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const commonItemBackgroundStyle = (color, hoverColor, activeColor) => `
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
4
|
+
background: ${color};
|
|
5
|
+
|
|
6
|
+
:hover {
|
|
7
|
+
background: ${hoverColor};
|
|
8
|
+
}
|
|
7
9
|
|
|
8
|
-
|
|
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
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const commonLeftBorderStyle = (color, hoverColor, activeColor) => `
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
+
}
|
package/esm/common/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
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
|
+
}
|
package/esm/configs/index.js
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
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
|
+
}
|