@alicloud/console-base-rc-side-panel 1.0.0 → 1.0.2

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.
@@ -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 ScUi = (0, _styledComponents.default)(_rc.Aside).withConfig({
19
+ var ScAside = _styledComponents.default.aside.withConfig({
19
20
  componentId: "sc-1ok6knf-0"
20
- })(["", ""], function (props) {
21
- return props.collapsed ? (0, _styledComponents.css)(["transform:translateX(100%);"]) : null;
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:transform 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(ScUi, (0, _defineProperty2.default)({
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
  }
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _styledComponents = require("styled-components");
10
10
  var _consoleBaseTheme = require("@alicloud/console-base-theme");
11
11
  var _model = require("../../../model");
12
- var GlobalStyle = (0, _styledComponents.createGlobalStyle)(["body.", "{padding-right:", "px;transition:padding-right ease-in-out 250ms;.viewFramework-body{right:", "px;left:0;z-index:", ";width:auto !important;}}"], _model.BODY_CLASS_WITH_SIDE_PANEL, _consoleBaseTheme.SIZE.WIDTH_SIDE_PANEL, _consoleBaseTheme.SIZE.WIDTH_SIDE_PANEL, _consoleBaseTheme.Z_INDEX.SIDE_PANEL - 1);
12
+ var GlobalStyle = (0, _styledComponents.createGlobalStyle)(["body.", "{padding-right:", "px;transition:padding-right ease-in-out 250ms;&.with-micro-browser{transition:none;}.viewFramework-body{right:", "px;left:0;z-index:", ";width:auto !important;}}"], _model.BODY_CLASS_WITH_SIDE_PANEL, _consoleBaseTheme.SIZE.WIDTH_SIDE_PANEL, _consoleBaseTheme.SIZE.WIDTH_SIDE_PANEL, _consoleBaseTheme.Z_INDEX.SIDE_PANEL - 1);
13
13
  function GlobalStyleOnBody() {
14
14
  return /*#__PURE__*/_react.default.createElement(GlobalStyle, null);
15
15
  }
@@ -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"));
@@ -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 { Aside, GlobalStyleOnBody } from './rc';
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 ScUi = styled(Aside).withConfig({
9
+ var ScAside = styled.aside.withConfig({
9
10
  componentId: "sc-1ok6knf-0"
10
- })(["", ""], function (props) {
11
- return props.collapsed ? css(["transform:translateX(100%);"]) : null;
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:transform 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(ScUi, _defineProperty({
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
  }
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { createGlobalStyle } from 'styled-components';
3
3
  import { SIZE, Z_INDEX } from '@alicloud/console-base-theme';
4
4
  import { BODY_CLASS_WITH_SIDE_PANEL } from '../../../model';
5
- var GlobalStyle = createGlobalStyle(["body.", "{padding-right:", "px;transition:padding-right ease-in-out 250ms;.viewFramework-body{right:", "px;left:0;z-index:", ";width:auto !important;}}"], BODY_CLASS_WITH_SIDE_PANEL, SIZE.WIDTH_SIDE_PANEL, SIZE.WIDTH_SIDE_PANEL, Z_INDEX.SIDE_PANEL - 1);
5
+ var GlobalStyle = createGlobalStyle(["body.", "{padding-right:", "px;transition:padding-right ease-in-out 250ms;&.with-micro-browser{transition:none;}.viewFramework-body{right:", "px;left:0;z-index:", ";width:auto !important;}}"], BODY_CLASS_WITH_SIDE_PANEL, SIZE.WIDTH_SIDE_PANEL, SIZE.WIDTH_SIDE_PANEL, Z_INDEX.SIDE_PANEL - 1);
6
6
  export default function GlobalStyleOnBody() {
7
7
  return /*#__PURE__*/React.createElement(GlobalStyle, null);
8
8
  }
@@ -1,4 +1,3 @@
1
- export { default as Aside } from './aside';
2
1
  export { default as GlobalStyleOnBody } from './global-style-on-body';
3
2
  export { default as SidePanelItemWrap } from './side-panel-item-wrap';
4
3
  export { default as SidePanelItemButton } from './side-panel-item-button';
@@ -1,4 +1,3 @@
1
- export { default as Aside } from './aside';
2
1
  export { default as GlobalStyleOnBody } from './global-style-on-body';
3
2
  export { default as SidePanelItemWrap } from './side-panel-item-wrap';
4
3
  export { default as SidePanelItemButton } from './side-panel-item-button';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alicloud/console-base-rc-side-panel",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
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.5",
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.16",
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.9",
34
- "typescript": "^4.9.5"
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.7.11",
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.3",
49
+ "@alicloud/console-base-theme": "^1.9.6",
50
50
  "@alicloud/console-base-theme-sc-base": "^1.6.4",
51
- "@alicloud/mere-dom": "^1.7.0",
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);
@@ -1,2 +0,0 @@
1
- declare const _default: import("styled-components").StyledComponent<"aside", any, {}, never>;
2
- export default _default;