@alicloud/console-base-rc-side-panel 1.0.0 → 1.0.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.
- package/build/cjs/ui/index.js +8 -6
- package/build/cjs/ui/rc/index.js +0 -7
- package/build/es/ui/index.js +10 -8
- package/build/es/ui/rc/index.js +0 -1
- package/build/types/ui/rc/index.d.ts +0 -1
- package/package.json +8 -8
- package/build/cjs/ui/rc/aside/index.js +0 -14
- package/build/es/ui/rc/aside/index.js +0 -6
- package/build/types/ui/rc/aside/index.d.ts +0 -2
package/build/cjs/ui/index.js
CHANGED
|
@@ -9,21 +9,23 @@ exports.default = Ui;
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
12
|
+
var _consoleBaseTheme = require("@alicloud/console-base-theme");
|
|
12
13
|
var _model = require("../model");
|
|
13
14
|
var _const = require("./const");
|
|
14
15
|
var _rc = require("./rc");
|
|
15
16
|
var _rcContainer = require("./rc-container");
|
|
16
17
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
|
-
var
|
|
19
|
+
var ScAside = _styledComponents.default.aside.withConfig({
|
|
19
20
|
componentId: "sc-1ok6knf-0"
|
|
20
|
-
})(["", ""], function (props) {
|
|
21
|
-
return props
|
|
22
|
-
});
|
|
21
|
+
})(["display:flex;flex-direction:column;position:fixed;top:0;right:0;bottom:0;z-index:", ";padding:", "px 0 ", "px 0;width:", "px;transition:all ease-in-out 250ms;", " ", " .hasTopbar &{top:", "px;}"], _consoleBaseTheme.Z_INDEX.SIDE_PANEL, _const.SPACING_Y * 1.5, _const.SIZE_BUTTON_WRAP_HEIGHT + _const.SPACING_Y, _consoleBaseTheme.SIZE.WIDTH_SIDE_PANEL, _consoleBaseTheme.mixinBgPrimary, function (props) {
|
|
22
|
+
return props.$collapsed ? (0, _styledComponents.css)(["transform:translateX(100%);"]) : _consoleBaseTheme.mixinShadowLLeft;
|
|
23
|
+
}, _consoleBaseTheme.SIZE.HEIGHT_TOP_NAV);
|
|
23
24
|
function Ui() {
|
|
24
25
|
var visible = (0, _model.useVisible)();
|
|
25
26
|
var collapsed = (0, _model.useCollapsed)();
|
|
26
|
-
return visible ? /*#__PURE__*/_react.default.createElement(
|
|
27
|
-
collapsed: collapsed
|
|
27
|
+
return visible ? /*#__PURE__*/_react.default.createElement(ScAside, (0, _defineProperty2.default)({
|
|
28
|
+
$collapsed: collapsed,
|
|
29
|
+
className: 'J_fixed_right_will_be_pushed_left'
|
|
28
30
|
}, _const.DATA_KEY_J, ''), /*#__PURE__*/_react.default.createElement(_rc.GlobalStyleOnBody, null), /*#__PURE__*/_react.default.createElement(_rcContainer.ItemsTop, null), /*#__PURE__*/_react.default.createElement(_rcContainer.ItemsBottom, null), /*#__PURE__*/_react.default.createElement(_rcContainer.CollapseToggle, null)) : null;
|
|
29
31
|
}
|
package/build/cjs/ui/rc/index.js
CHANGED
|
@@ -4,12 +4,6 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
Object.defineProperty(exports, "Aside", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function get() {
|
|
10
|
-
return _aside.default;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
7
|
Object.defineProperty(exports, "GlobalStyleOnBody", {
|
|
14
8
|
enumerable: true,
|
|
15
9
|
get: function get() {
|
|
@@ -40,7 +34,6 @@ Object.defineProperty(exports, "SidePanelItemWrap", {
|
|
|
40
34
|
return _sidePanelItemWrap.default;
|
|
41
35
|
}
|
|
42
36
|
});
|
|
43
|
-
var _aside = _interopRequireDefault(require("./aside"));
|
|
44
37
|
var _globalStyleOnBody = _interopRequireDefault(require("./global-style-on-body"));
|
|
45
38
|
var _sidePanelItemWrap = _interopRequireDefault(require("./side-panel-item-wrap"));
|
|
46
39
|
var _sidePanelItemButton = _interopRequireDefault(require("./side-panel-item-button"));
|
package/build/es/ui/index.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
|
+
import { SIZE, Z_INDEX, mixinBgPrimary, mixinShadowLLeft } from '@alicloud/console-base-theme';
|
|
4
5
|
import { useVisible, useCollapsed } from '../model';
|
|
5
|
-
import { DATA_KEY_J } from './const';
|
|
6
|
-
import {
|
|
6
|
+
import { SIZE_BUTTON_WRAP_HEIGHT, SPACING_Y, DATA_KEY_J } from './const';
|
|
7
|
+
import { GlobalStyleOnBody } from './rc';
|
|
7
8
|
import { ItemsTop, ItemsBottom, CollapseToggle } from './rc-container';
|
|
8
|
-
var
|
|
9
|
+
var ScAside = styled.aside.withConfig({
|
|
9
10
|
componentId: "sc-1ok6knf-0"
|
|
10
|
-
})(["", ""], function (props) {
|
|
11
|
-
return props
|
|
12
|
-
});
|
|
11
|
+
})(["display:flex;flex-direction:column;position:fixed;top:0;right:0;bottom:0;z-index:", ";padding:", "px 0 ", "px 0;width:", "px;transition:all ease-in-out 250ms;", " ", " .hasTopbar &{top:", "px;}"], Z_INDEX.SIDE_PANEL, SPACING_Y * 1.5, SIZE_BUTTON_WRAP_HEIGHT + SPACING_Y, SIZE.WIDTH_SIDE_PANEL, mixinBgPrimary, function (props) {
|
|
12
|
+
return props.$collapsed ? css(["transform:translateX(100%);"]) : mixinShadowLLeft;
|
|
13
|
+
}, SIZE.HEIGHT_TOP_NAV);
|
|
13
14
|
export default function Ui() {
|
|
14
15
|
var visible = useVisible();
|
|
15
16
|
var collapsed = useCollapsed();
|
|
16
|
-
return visible ? /*#__PURE__*/React.createElement(
|
|
17
|
-
collapsed: collapsed
|
|
17
|
+
return visible ? /*#__PURE__*/React.createElement(ScAside, _defineProperty({
|
|
18
|
+
$collapsed: collapsed,
|
|
19
|
+
className: 'J_fixed_right_will_be_pushed_left'
|
|
18
20
|
}, DATA_KEY_J, ''), /*#__PURE__*/React.createElement(GlobalStyleOnBody, null), /*#__PURE__*/React.createElement(ItemsTop, null), /*#__PURE__*/React.createElement(ItemsBottom, null), /*#__PURE__*/React.createElement(CollapseToggle, null)) : null;
|
|
19
21
|
}
|
package/build/es/ui/rc/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alicloud/console-base-rc-side-panel",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "ConsoleBase 组件 - 右侧边栏",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"keywords": [],
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@alicloud/console-base-demo-helper-theme-switcher": "^1.1.9",
|
|
25
|
-
"@alicloud/console-base-rc-top-nav": "^1.16.
|
|
25
|
+
"@alicloud/console-base-rc-top-nav": "^1.16.7",
|
|
26
26
|
"@alicloud/console-toolkit-cli": "^1.2.30",
|
|
27
27
|
"@alicloud/console-toolkit-preset-component": "^1.2.61",
|
|
28
|
-
"@alicloud/demo-rc-elements": "^1.11.
|
|
28
|
+
"@alicloud/demo-rc-elements": "^1.11.17",
|
|
29
29
|
"@alicloud/ts-config": "^1.1.3",
|
|
30
30
|
"@types/react": "^17.0.58",
|
|
31
31
|
"@types/styled-components": "^5.1.26",
|
|
32
32
|
"react": "^17.0.2",
|
|
33
|
-
"styled-components": "^5.3.
|
|
34
|
-
"typescript": "^
|
|
33
|
+
"styled-components": "^5.3.10",
|
|
34
|
+
"typescript": "^5.0.4"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"react": ">=16.8",
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@alicloud/console-base-intl-factory-basic": "^1.6.9",
|
|
42
|
-
"@alicloud/console-base-rc-button": "^1.
|
|
42
|
+
"@alicloud/console-base-rc-button": "^1.8.2",
|
|
43
43
|
"@alicloud/console-base-rc-easy-icon": "^1.0.1",
|
|
44
44
|
"@alicloud/console-base-rc-flex": "^1.4.11",
|
|
45
45
|
"@alicloud/console-base-rc-html-trusted": "^1.0.5",
|
|
46
46
|
"@alicloud/console-base-rc-icon": "^1.10.5",
|
|
47
47
|
"@alicloud/console-base-rc-marks": "^1.8.3",
|
|
48
48
|
"@alicloud/console-base-rc-tooltip": "^1.1.12",
|
|
49
|
-
"@alicloud/console-base-theme": "^1.9.
|
|
49
|
+
"@alicloud/console-base-theme": "^1.9.6",
|
|
50
50
|
"@alicloud/console-base-theme-sc-base": "^1.6.4",
|
|
51
|
-
"@alicloud/mere-dom": "^1.
|
|
51
|
+
"@alicloud/mere-dom": "^1.8.0",
|
|
52
52
|
"@alicloud/react-hook-is-unmounted": "^1.3.4",
|
|
53
53
|
"@alicloud/react-hook-mouse-enter-leave": "^1.0.3",
|
|
54
54
|
"@alicloud/typescript-missing-helpers": "^1.3.4",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
var _consoleBaseTheme = require("@alicloud/console-base-theme");
|
|
10
|
-
var _const = require("../../const");
|
|
11
|
-
var _default = _styledComponents.default.aside.withConfig({
|
|
12
|
-
componentId: "sc-1e5hmz-0"
|
|
13
|
-
})(["display:flex;flex-direction:column;position:fixed;top:0;right:0;bottom:0;z-index:", ";padding:", "px 0 ", "px 0;width:", "px;transition:all ease-in-out 250ms;", " ", " .hasTopbar &{top:", "px;}"], _consoleBaseTheme.Z_INDEX.SIDE_PANEL, _const.SPACING_Y * 1.5, _const.SIZE_BUTTON_WRAP_HEIGHT + _const.SPACING_Y, _consoleBaseTheme.SIZE.WIDTH_SIDE_PANEL, _consoleBaseTheme.mixinBgPrimary, _consoleBaseTheme.mixinShadowSLeft, _consoleBaseTheme.SIZE.HEIGHT_TOP_NAV);
|
|
14
|
-
exports.default = _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import { SIZE, Z_INDEX, mixinBgPrimary, mixinShadowSLeft } from '@alicloud/console-base-theme';
|
|
3
|
-
import { SIZE_BUTTON_WRAP_HEIGHT, SPACING_Y } from '../../const';
|
|
4
|
-
export default styled.aside.withConfig({
|
|
5
|
-
componentId: "sc-1e5hmz-0"
|
|
6
|
-
})(["display:flex;flex-direction:column;position:fixed;top:0;right:0;bottom:0;z-index:", ";padding:", "px 0 ", "px 0;width:", "px;transition:all ease-in-out 250ms;", " ", " .hasTopbar &{top:", "px;}"], Z_INDEX.SIDE_PANEL, SPACING_Y * 1.5, SIZE_BUTTON_WRAP_HEIGHT + SPACING_Y, SIZE.WIDTH_SIDE_PANEL, mixinBgPrimary, mixinShadowSLeft, SIZE.HEIGHT_TOP_NAV);
|