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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +3 -0
  3. package/build/cjs/index.js +20 -0
  4. package/build/cjs/model/const/index.js +15 -0
  5. package/build/cjs/model/context/index.js +9 -0
  6. package/build/cjs/model/enum/index.js +12 -0
  7. package/build/cjs/model/hook/_use-model-context.js +12 -0
  8. package/build/cjs/model/hook/_use-model-dispatch.js +11 -0
  9. package/build/cjs/model/hook/_use-model-props.js +29 -0
  10. package/build/cjs/model/hook/_use-model-state.js +11 -0
  11. package/build/cjs/model/hook/index.js +62 -0
  12. package/build/cjs/model/hook/use-children.js +11 -0
  13. package/build/cjs/model/hook/use-collapsed.js +16 -0
  14. package/build/cjs/model/hook/use-dispatch-set-collapsed.js +19 -0
  15. package/build/cjs/model/hook/use-dispatch-set-quick-top-visible.js +19 -0
  16. package/build/cjs/model/hook/use-effect-quick-top.js +40 -0
  17. package/build/cjs/model/hook/use-effect-toggle-body-class.js +25 -0
  18. package/build/cjs/model/hook/use-effects.js +13 -0
  19. package/build/cjs/model/hook/use-handle-collapsed-change.js +21 -0
  20. package/build/cjs/model/hook/use-handle-go-top.js +22 -0
  21. package/build/cjs/model/hook/use-handle-set-quick-top-visible.js +19 -0
  22. package/build/cjs/model/hook/use-items-bottom.js +11 -0
  23. package/build/cjs/model/hook/use-items-top.js +11 -0
  24. package/build/cjs/model/hook/use-quick-top.js +19 -0
  25. package/build/cjs/model/hook/use-visible.js +14 -0
  26. package/build/cjs/model/index.js +35 -0
  27. package/build/cjs/model/lifecycle/index.js +12 -0
  28. package/build/cjs/model/provider/index.js +40 -0
  29. package/build/cjs/model/reducer/index.js +20 -0
  30. package/build/cjs/model/reducer/reduce-set-collapsed.js +15 -0
  31. package/build/cjs/model/reducer/reduce-set-quick-top-visible.js +15 -0
  32. package/build/cjs/model/types/action.js +5 -0
  33. package/build/cjs/model/types/common.js +5 -0
  34. package/build/cjs/model/types/context.js +5 -0
  35. package/build/cjs/model/types/index.js +60 -0
  36. package/build/cjs/model/types/props.js +5 -0
  37. package/build/cjs/model/types/state.js +5 -0
  38. package/build/cjs/model/util/index.js +13 -0
  39. package/build/cjs/model/util/toggle-body-class.js +16 -0
  40. package/build/cjs/ui/const/index.js +26 -0
  41. package/build/cjs/ui/index.js +29 -0
  42. package/build/cjs/ui/intl/index.js +19 -0
  43. package/build/cjs/ui/intl/locales/en-us.js +12 -0
  44. package/build/cjs/ui/intl/locales/ja-jp.js +12 -0
  45. package/build/cjs/ui/intl/locales/zh-cn.js +12 -0
  46. package/build/cjs/ui/intl/locales/zh-tw.js +12 -0
  47. package/build/cjs/ui/rc/aside/index.js +14 -0
  48. package/build/cjs/ui/rc/global-style-on-body/index.js +15 -0
  49. package/build/cjs/ui/rc/index.js +48 -0
  50. package/build/cjs/ui/rc/side-panel-item-badge/index.js +56 -0
  51. package/build/cjs/ui/rc/side-panel-item-button/index.js +39 -0
  52. package/build/cjs/ui/rc/side-panel-item-tooltip/index.js +58 -0
  53. package/build/cjs/ui/rc/side-panel-item-wrap/index.js +16 -0
  54. package/build/cjs/ui/rc-container/collapse-toggle/index.js +77 -0
  55. package/build/cjs/ui/rc-container/index.js +27 -0
  56. package/build/cjs/ui/rc-container/item/index.js +103 -0
  57. package/build/cjs/ui/rc-container/items/index.js +20 -0
  58. package/build/cjs/ui/rc-container/items-bottom/index.js +28 -0
  59. package/build/cjs/ui/rc-container/items-bottom/quick-top/index.js +47 -0
  60. package/build/cjs/ui/rc-container/items-top/index.js +20 -0
  61. package/build/cjs/ui/types/index.js +5 -0
  62. package/build/cjs/ui/util/get-value-by-status.js +23 -0
  63. package/build/cjs/ui/util/index.js +13 -0
  64. package/build/cjs/with-model/index.js +15 -0
  65. package/build/es/index.js +2 -0
  66. package/build/es/model/const/index.js +6 -0
  67. package/build/es/model/context/index.js +2 -0
  68. package/build/es/model/enum/index.js +5 -0
  69. package/build/es/model/hook/_use-model-context.js +5 -0
  70. package/build/es/model/hook/_use-model-dispatch.js +4 -0
  71. package/build/es/model/hook/_use-model-props.js +22 -0
  72. package/build/es/model/hook/_use-model-state.js +4 -0
  73. package/build/es/model/hook/index.js +10 -0
  74. package/build/es/model/hook/use-children.js +4 -0
  75. package/build/es/model/hook/use-collapsed.js +9 -0
  76. package/build/es/model/hook/use-dispatch-set-collapsed.js +12 -0
  77. package/build/es/model/hook/use-dispatch-set-quick-top-visible.js +12 -0
  78. package/build/es/model/hook/use-effect-quick-top.js +33 -0
  79. package/build/es/model/hook/use-effect-toggle-body-class.js +18 -0
  80. package/build/es/model/hook/use-effects.js +6 -0
  81. package/build/es/model/hook/use-handle-collapsed-change.js +14 -0
  82. package/build/es/model/hook/use-handle-go-top.js +15 -0
  83. package/build/es/model/hook/use-handle-set-quick-top-visible.js +12 -0
  84. package/build/es/model/hook/use-items-bottom.js +4 -0
  85. package/build/es/model/hook/use-items-top.js +4 -0
  86. package/build/es/model/hook/use-quick-top.js +12 -0
  87. package/build/es/model/hook/use-visible.js +7 -0
  88. package/build/es/model/index.js +3 -0
  89. package/build/es/model/lifecycle/index.js +5 -0
  90. package/build/es/model/provider/index.js +30 -0
  91. package/build/es/model/reducer/index.js +13 -0
  92. package/build/es/model/reducer/reduce-set-collapsed.js +8 -0
  93. package/build/es/model/reducer/reduce-set-quick-top-visible.js +8 -0
  94. package/build/es/model/types/action.js +1 -0
  95. package/build/es/model/types/common.js +1 -0
  96. package/build/es/model/types/context.js +1 -0
  97. package/build/es/model/types/index.js +5 -0
  98. package/build/es/model/types/props.js +1 -0
  99. package/build/es/model/types/state.js +1 -0
  100. package/build/es/model/util/index.js +1 -0
  101. package/build/es/model/util/toggle-body-class.js +10 -0
  102. package/build/es/ui/const/index.js +12 -0
  103. package/build/es/ui/index.js +19 -0
  104. package/build/es/ui/intl/index.js +11 -0
  105. package/build/es/ui/intl/locales/en-us.js +5 -0
  106. package/build/es/ui/intl/locales/ja-jp.js +5 -0
  107. package/build/es/ui/intl/locales/zh-cn.js +5 -0
  108. package/build/es/ui/intl/locales/zh-tw.js +5 -0
  109. package/build/es/ui/rc/aside/index.js +6 -0
  110. package/build/es/ui/rc/global-style-on-body/index.js +8 -0
  111. package/build/es/ui/rc/index.js +6 -0
  112. package/build/es/ui/rc/side-panel-item-badge/index.js +46 -0
  113. package/build/es/ui/rc/side-panel-item-button/index.js +29 -0
  114. package/build/es/ui/rc/side-panel-item-tooltip/index.js +48 -0
  115. package/build/es/ui/rc/side-panel-item-wrap/index.js +9 -0
  116. package/build/es/ui/rc-container/collapse-toggle/index.js +67 -0
  117. package/build/es/ui/rc-container/index.js +3 -0
  118. package/build/es/ui/rc-container/item/index.js +93 -0
  119. package/build/es/ui/rc-container/items/index.js +13 -0
  120. package/build/es/ui/rc-container/items-bottom/index.js +21 -0
  121. package/build/es/ui/rc-container/items-bottom/quick-top/index.js +37 -0
  122. package/build/es/ui/rc-container/items-top/index.js +13 -0
  123. package/build/es/ui/types/index.js +1 -0
  124. package/build/es/ui/util/get-value-by-status.js +17 -0
  125. package/build/es/ui/util/index.js +1 -0
  126. package/build/es/with-model/index.js +8 -0
  127. package/build/types/index.d.ts +3 -0
  128. package/build/types/model/const/index.d.ts +4 -0
  129. package/build/types/model/context/index.d.ts +4 -0
  130. package/build/types/model/enum/index.d.ts +4 -0
  131. package/build/types/model/hook/_use-model-context.d.ts +2 -0
  132. package/build/types/model/hook/_use-model-dispatch.d.ts +2 -0
  133. package/build/types/model/hook/_use-model-props.d.ts +5 -0
  134. package/build/types/model/hook/_use-model-state.d.ts +2 -0
  135. package/build/types/model/hook/index.d.ts +8 -0
  136. package/build/types/model/hook/use-children.d.ts +2 -0
  137. package/build/types/model/hook/use-collapsed.d.ts +1 -0
  138. package/build/types/model/hook/use-dispatch-set-collapsed.d.ts +1 -0
  139. package/build/types/model/hook/use-dispatch-set-quick-top-visible.d.ts +1 -0
  140. package/build/types/model/hook/use-effect-quick-top.d.ts +1 -0
  141. package/build/types/model/hook/use-effect-toggle-body-class.d.ts +1 -0
  142. package/build/types/model/hook/use-effects.d.ts +1 -0
  143. package/build/types/model/hook/use-handle-collapsed-change.d.ts +1 -0
  144. package/build/types/model/hook/use-handle-go-top.d.ts +1 -0
  145. package/build/types/model/hook/use-handle-set-quick-top-visible.d.ts +1 -0
  146. package/build/types/model/hook/use-items-bottom.d.ts +2 -0
  147. package/build/types/model/hook/use-items-top.d.ts +2 -0
  148. package/build/types/model/hook/use-quick-top.d.ts +6 -0
  149. package/build/types/model/hook/use-visible.d.ts +1 -0
  150. package/build/types/model/index.d.ts +4 -0
  151. package/build/types/model/lifecycle/index.d.ts +1 -0
  152. package/build/types/model/provider/index.d.ts +8 -0
  153. package/build/types/model/reducer/index.d.ts +2 -0
  154. package/build/types/model/reducer/reduce-set-collapsed.d.ts +2 -0
  155. package/build/types/model/reducer/reduce-set-quick-top-visible.d.ts +2 -0
  156. package/build/types/model/types/action.d.ts +7 -0
  157. package/build/types/model/types/common.d.ts +66 -0
  158. package/build/types/model/types/context.d.ts +11 -0
  159. package/build/types/model/types/index.d.ts +5 -0
  160. package/build/types/model/types/props.d.ts +37 -0
  161. package/build/types/model/types/state.d.ts +4 -0
  162. package/build/types/model/util/index.d.ts +1 -0
  163. package/build/types/model/util/toggle-body-class.d.ts +1 -0
  164. package/build/types/ui/const/index.d.ts +8 -0
  165. package/build/types/ui/index.d.ts +1 -0
  166. package/build/types/ui/intl/index.d.ts +6 -0
  167. package/build/types/ui/intl/locales/en-us.d.ts +6 -0
  168. package/build/types/ui/intl/locales/ja-jp.d.ts +6 -0
  169. package/build/types/ui/intl/locales/zh-cn.d.ts +6 -0
  170. package/build/types/ui/intl/locales/zh-tw.d.ts +6 -0
  171. package/build/types/ui/rc/aside/index.d.ts +2 -0
  172. package/build/types/ui/rc/global-style-on-body/index.d.ts +1 -0
  173. package/build/types/ui/rc/index.d.ts +6 -0
  174. package/build/types/ui/rc/side-panel-item-badge/index.d.ts +9 -0
  175. package/build/types/ui/rc/side-panel-item-button/index.d.ts +5 -0
  176. package/build/types/ui/rc/side-panel-item-tooltip/index.d.ts +10 -0
  177. package/build/types/ui/rc/side-panel-item-wrap/index.d.ts +5 -0
  178. package/build/types/ui/rc-container/collapse-toggle/index.d.ts +1 -0
  179. package/build/types/ui/rc-container/index.d.ts +3 -0
  180. package/build/types/ui/rc-container/item/index.d.ts +5 -0
  181. package/build/types/ui/rc-container/items/index.d.ts +6 -0
  182. package/build/types/ui/rc-container/items-bottom/index.d.ts +1 -0
  183. package/build/types/ui/rc-container/items-bottom/quick-top/index.d.ts +1 -0
  184. package/build/types/ui/rc-container/items-top/index.d.ts +1 -0
  185. package/build/types/ui/types/index.d.ts +4 -0
  186. package/build/types/ui/util/get-value-by-status.d.ts +8 -0
  187. package/build/types/ui/util/index.d.ts +1 -0
  188. package/build/types/with-model/index.d.ts +2 -0
  189. package/package.json +69 -0
@@ -0,0 +1 @@
1
+ export default function useEffectToggleBodyClass(): void;
@@ -0,0 +1 @@
1
+ export default function useEffects(): void;
@@ -0,0 +1 @@
1
+ export default function useHandleCollapsedChange(): () => void;
@@ -0,0 +1 @@
1
+ export default function useHandleGoTop(): () => void;
@@ -0,0 +1 @@
1
+ export default function useHandleSetQuickTopVisible(): (visible: boolean) => void;
@@ -0,0 +1,2 @@
1
+ import { ISidePanelItemPropsWithKey } from '../types';
2
+ export default function useItemsBottom(): ISidePanelItemPropsWithKey[];
@@ -0,0 +1,2 @@
1
+ import { ISidePanelItemPropsWithKey } from '../types';
2
+ export default function useItemsTop(): ISidePanelItemPropsWithKey[];
@@ -0,0 +1,6 @@
1
+ interface IQuickTop {
2
+ container?: Window | HTMLElement | null;
3
+ visible: boolean;
4
+ }
5
+ export default function useQuickTop(): IQuickTop;
6
+ export {};
@@ -0,0 +1 @@
1
+ export default function useVisible(): boolean;
@@ -0,0 +1,4 @@
1
+ export { default } from './provider';
2
+ export { BODY_CLASS_WITH_SIDE_PANEL } from './const';
3
+ export * from './hook';
4
+ export type { IModelProps as ModelProps, ISidePanelItemProps as SidePanelItemProps, ISidePanelItemPropsWithKey as SidePanelItemPropsWithKey } from './types';
@@ -0,0 +1 @@
1
+ export default function Lifecycle(): null;
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ import { IModelProps } from '../types';
3
+ interface IProps {
4
+ props: IModelProps;
5
+ children: ReactNode;
6
+ }
7
+ export default function Provider({ props, children }: IProps): JSX.Element;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ import { IModelState, TModelAction } from '../types';
2
+ export default function reducer(state: IModelState, action: TModelAction): IModelState;
@@ -0,0 +1,2 @@
1
+ import { IModelState } from '../types';
2
+ export default function reduceSetCollapsed(state: IModelState, payload: boolean): IModelState;
@@ -0,0 +1,2 @@
1
+ import { IModelState } from '../types';
2
+ export default function reduceSetQuickTopVisible(state: IModelState, payload: boolean): IModelState;
@@ -0,0 +1,7 @@
1
+ import { Dispatch } from 'react';
2
+ import { EAction } from '../enum';
3
+ export type TModelAction = {
4
+ type: EAction.SET_COLLAPSED | EAction.SET_QUICK_TOP_VISIBLE;
5
+ payload: boolean;
6
+ };
7
+ export type TModelDispatch = Dispatch<TModelAction>;
@@ -0,0 +1,66 @@
1
+ import { ReactElement } from 'react';
2
+ import { ButtonProps } from '@alicloud/console-base-rc-button';
3
+ import { EasyIconValue } from '@alicloud/console-base-rc-easy-icon';
4
+ export interface ISidePanelItemProps extends Omit<ButtonProps, 'label' | 'size' | 'theme' | 'iconLeft' | 'iconRight' | 'onMouseEnter' | 'onMouseLeave'> {
5
+ /**
6
+ * 默认用于 tooltip,也是按钮 aria-label 属性
7
+ */
8
+ title: string;
9
+ /**
10
+ * 按下状态的 title,不填则 fallback 到 title
11
+ */
12
+ titleActive?: string;
13
+ /**
14
+ * 图标(请尽可能用正方形),如果是组件则直接用,当它是字符串的时候,会智能判断
15
+ */
16
+ icon: EasyIconValue;
17
+ /**
18
+ * 鼠标 hover 时的图标,不填则 fallback 到 icon
19
+ */
20
+ iconHovered?: EasyIconValue;
21
+ /**
22
+ * 按下状态的图标,不填则 fallback 到 icon
23
+ */
24
+ iconActive?: EasyIconValue;
25
+ /**
26
+ * 按下状态时 hover 的图标,不填则 fallback 到 iconActive
27
+ */
28
+ iconActiveHovered?: EasyIconValue;
29
+ /**
30
+ * 当需要复杂的 tooltip 时,可以用这个 prop
31
+ */
32
+ tooltip?: string | ReactElement;
33
+ /**
34
+ * 按下状态的 tooltip,不填则 fallback 到 tooltip
35
+ */
36
+ tooltipActive?: string | ReactElement;
37
+ /**
38
+ * 当 Tooltip 没有条件用 JSX,必须是字符串但又需要展示成 HTML 时,可以用 `tooltipAsHtml: true`
39
+ */
40
+ tooltipAsHtml?: boolean;
41
+ /**
42
+ * Tooltip 与按钮的上下对齐方式,默认为 middle
43
+ */
44
+ tooltipAlign?: 'top' | 'middle' | 'bottom';
45
+ /**
46
+ * Tooltip 默认是否展示,注意避免竞争,并注意降噪
47
+ */
48
+ tooltipDefaultVisible?: boolean;
49
+ /**
50
+ * 右上角徽标,数字展示数字,true 展示小红点
51
+ */
52
+ unread?: number | boolean;
53
+ /**
54
+ * 右上角 NEW 或 HOT,优先级低于 unread
55
+ */
56
+ mark?: 'NEW' | 'HOT';
57
+ onMouseEnter?(): void;
58
+ onMouseLeave?(): void;
59
+ /**
60
+ * 设置 active 使当前工具处于 active 状态,并使用此回调受控
61
+ */
62
+ onActiveChange?(active: boolean): void;
63
+ }
64
+ export interface ISidePanelItemPropsWithKey extends ISidePanelItemProps {
65
+ key: string;
66
+ }
@@ -0,0 +1,11 @@
1
+ import { IModelProps } from './props';
2
+ import { IModelState } from './state';
3
+ import { TModelAction, TModelDispatch } from './action';
4
+ export interface IModelReducer {
5
+ (state: IModelState, action: TModelAction): IModelState;
6
+ }
7
+ export interface IModelValue {
8
+ props: IModelProps;
9
+ state: IModelState;
10
+ dispatch: TModelDispatch;
11
+ }
@@ -0,0 +1,5 @@
1
+ export * from './common';
2
+ export * from './props';
3
+ export * from './state';
4
+ export * from './action';
5
+ export * from './context';
@@ -0,0 +1,37 @@
1
+ import { ReactNode } from 'react';
2
+ import { ISidePanelItemPropsWithKey } from './common';
3
+ export interface IModelProps {
4
+ /**
5
+ * 底部工具(系统级别),配置化的形式无法很好地抽离并解耦,故提供 children 方式,
6
+ * 要求每个 child 都是 SidePanelItem 否则样式撑不住
7
+ */
8
+ children?: ReactNode;
9
+ /**
10
+ * UI 是否可见,默认 true
11
+ */
12
+ visible?: boolean;
13
+ /**
14
+ * 通过 onCollapsedChange 实现受控
15
+ */
16
+ collapsed?: boolean;
17
+ /**
18
+ * 顶部工具
19
+ */
20
+ itemsTop?: ISidePanelItemPropsWithKey[];
21
+ /**
22
+ * 底部工具(系统级别),如果传入 children 则使用 children
23
+ */
24
+ itemsBottom?: ISidePanelItemPropsWithKey[];
25
+ /**
26
+ * 给一个 DOM 节点,组件会监测它的滚动情况,并判断是否展示快速置顶按钮
27
+ */
28
+ quickTopContainer?: Window | HTMLElement | null;
29
+ /**
30
+ * QuickTop 显隐变化时的回调,可用于日志
31
+ */
32
+ onQuickTopVisibleChange?(visible: boolean): void;
33
+ /**
34
+ * 是否展示推入按钮
35
+ */
36
+ onCollapsedChange?(collapsed: boolean): void;
37
+ }
@@ -0,0 +1,4 @@
1
+ export interface IModelState {
2
+ collapsed: boolean;
3
+ quickTopVisible: boolean;
4
+ }
@@ -0,0 +1 @@
1
+ export { default as toggleBodyClass } from './toggle-body-class';
@@ -0,0 +1 @@
1
+ export default function toggleBodyClass(yes?: boolean): void;
@@ -0,0 +1,8 @@
1
+ export declare const SPACING_X = 10;
2
+ export declare const SPACING_Y = 6;
3
+ export declare const SIZE_BUTTON: number;
4
+ export declare const SIZE_BUTTON_ICON: number;
5
+ export declare const SIZE_BUTTON_WRAP_WIDTH: number;
6
+ export declare const SIZE_BUTTON_WRAP_HEIGHT: number;
7
+ export declare const DATA_KEY_SIDE_PANEL_ITEM = "data-console-base-side-panel-item";
8
+ export declare const DATA_KEY_J = "data-j-side-panel";
@@ -0,0 +1 @@
1
+ export default function Ui(): JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ declare const _default: import("@alicloud/console-base-intl-factory-basic").FnIntl<{
2
+ 'op:toggle_visible': string;
3
+ 'op:toggle_hidden': string;
4
+ 'op:back_to_top': string;
5
+ }>;
6
+ export default _default;
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ 'op:toggle_visible': string;
3
+ 'op:toggle_hidden': string;
4
+ 'op:back_to_top': string;
5
+ };
6
+ export default _default;
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ 'op:toggle_visible': string;
3
+ 'op:toggle_hidden': string;
4
+ 'op:back_to_top': string;
5
+ };
6
+ export default _default;
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ 'op:toggle_visible': string;
3
+ 'op:toggle_hidden': string;
4
+ 'op:back_to_top': string;
5
+ };
6
+ export default _default;
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ 'op:toggle_visible': string;
3
+ 'op:toggle_hidden': string;
4
+ 'op:back_to_top': string;
5
+ };
6
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("styled-components").StyledComponent<"aside", any, {}, never>;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export default function GlobalStyleOnBody(): JSX.Element;
@@ -0,0 +1,6 @@
1
+ export { default as Aside } from './aside';
2
+ export { default as GlobalStyleOnBody } from './global-style-on-body';
3
+ export { default as SidePanelItemWrap } from './side-panel-item-wrap';
4
+ export { default as SidePanelItemButton } from './side-panel-item-button';
5
+ export { default as SidePanelItemBadge } from './side-panel-item-badge';
6
+ export { default as SidePanelItemTooltip } from './side-panel-item-tooltip';
@@ -0,0 +1,9 @@
1
+ import { SidePanelItemProps } from '../../../model';
2
+ interface IProps extends Pick<SidePanelItemProps, 'unread' | 'mark'> {
3
+ alignLeft?: boolean;
4
+ }
5
+ /**
6
+ * 右上角的徽标,unread 优先于 mark
7
+ */
8
+ export default function SidePanelItemBadge({ unread, mark, alignLeft }: IProps): JSX.Element | null;
9
+ export {};
@@ -0,0 +1,5 @@
1
+ import { ISidePanelItemButtonProps } from '../../types';
2
+ /**
3
+ * 工具的按钮
4
+ */
5
+ export default function SidePanelItemButton({ title, ...props }: ISidePanelItemButtonProps): JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { TooltipProps } from '@alicloud/console-base-rc-tooltip';
2
+ import { SidePanelItemProps } from '../../../model';
3
+ interface IProps extends Omit<TooltipProps, 'placement' | 'arrowOffset'> {
4
+ align?: SidePanelItemProps['tooltipAlign'];
5
+ }
6
+ /**
7
+ * 工具按钮之外的部分(如果不是 tooltip 则期望它是 createPortal 出去的)
8
+ */
9
+ export default function SidePanelItemTooltip({ visible, align, content, ...props }: IProps): JSX.Element;
10
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 工具的外层包裹
3
+ */
4
+ declare const _default: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export default _default;
@@ -0,0 +1 @@
1
+ export default function PanelToggle(): JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { default as ItemsTop } from './items-top';
2
+ export { default as ItemsBottom } from './items-bottom';
3
+ export { default as CollapseToggle } from './collapse-toggle';
@@ -0,0 +1,5 @@
1
+ import { SidePanelItemProps } from '../../../model';
2
+ interface IProps extends SidePanelItemProps {
3
+ }
4
+ export default function Item({ id, className, style, active, title, titleActive, icon, iconHovered, iconActive, iconActiveHovered, unread, mark, tooltip, tooltipActive, tooltipAsHtml, tooltipAlign, tooltipDefaultVisible, onClick, onActiveChange, onMouseEnter, onMouseLeave, ...props }: IProps): JSX.Element;
5
+ export {};
@@ -0,0 +1,6 @@
1
+ import { SidePanelItemPropsWithKey } from '../../../model';
2
+ interface IProps {
3
+ items: SidePanelItemPropsWithKey[];
4
+ }
5
+ export default function Items({ items }: IProps): JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ export default function ItemsBottom(): JSX.Element | null;
@@ -0,0 +1 @@
1
+ export default function QuickTop(): JSX.Element;
@@ -0,0 +1 @@
1
+ export default function ItemsTop(): JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ButtonProps } from '@alicloud/console-base-rc-button';
2
+ export interface ISidePanelItemButtonProps extends Omit<ButtonProps, 'size' | 'theme' | 'title'> {
3
+ title?: string;
4
+ }
@@ -0,0 +1,8 @@
1
+ interface IValues<T> {
2
+ valueNormal: T;
3
+ valueHovered?: T;
4
+ valueActive?: T;
5
+ valueActiveHovered?: T;
6
+ }
7
+ export default function getValueByStatus<T>(values: IValues<T>, hovered?: boolean, active?: boolean): T;
8
+ export {};
@@ -0,0 +1 @@
1
+ export { default as getValueByStatus } from './get-value-by-status';
@@ -0,0 +1,2 @@
1
+ import { ModelProps } from '../model';
2
+ export default function WithModel(props: ModelProps): JSX.Element;
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@alicloud/console-base-rc-side-panel",
3
+ "version": "1.0.0",
4
+ "description": "ConsoleBase 组件 - 右侧边栏",
5
+ "license": "MIT",
6
+ "sideEffects": false,
7
+ "main": "build/cjs/index.js",
8
+ "module": "build/es/index.js",
9
+ "types": "build/types/index.d.ts",
10
+ "homepage": "https://github.com/aliyun/alibabacloud-console-base/tree/master/packages-rc/console-base-rc-side-panel",
11
+ "author": {
12
+ "name": "Jianchun Wang",
13
+ "email": "justnewbee@gmail.com"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/aliyun/alibabacloud-console-base.git"
18
+ },
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "keywords": [],
23
+ "devDependencies": {
24
+ "@alicloud/console-base-demo-helper-theme-switcher": "^1.1.9",
25
+ "@alicloud/console-base-rc-top-nav": "^1.16.5",
26
+ "@alicloud/console-toolkit-cli": "^1.2.30",
27
+ "@alicloud/console-toolkit-preset-component": "^1.2.61",
28
+ "@alicloud/demo-rc-elements": "^1.11.16",
29
+ "@alicloud/ts-config": "^1.1.3",
30
+ "@types/react": "^17.0.58",
31
+ "@types/styled-components": "^5.1.26",
32
+ "react": "^17.0.2",
33
+ "styled-components": "^5.3.9",
34
+ "typescript": "^4.9.5"
35
+ },
36
+ "peerDependencies": {
37
+ "react": ">=16.8",
38
+ "styled-components": ">=5"
39
+ },
40
+ "dependencies": {
41
+ "@alicloud/console-base-intl-factory-basic": "^1.6.9",
42
+ "@alicloud/console-base-rc-button": "^1.7.11",
43
+ "@alicloud/console-base-rc-easy-icon": "^1.0.1",
44
+ "@alicloud/console-base-rc-flex": "^1.4.11",
45
+ "@alicloud/console-base-rc-html-trusted": "^1.0.5",
46
+ "@alicloud/console-base-rc-icon": "^1.10.5",
47
+ "@alicloud/console-base-rc-marks": "^1.8.3",
48
+ "@alicloud/console-base-rc-tooltip": "^1.1.12",
49
+ "@alicloud/console-base-theme": "^1.9.3",
50
+ "@alicloud/console-base-theme-sc-base": "^1.6.4",
51
+ "@alicloud/mere-dom": "^1.7.0",
52
+ "@alicloud/react-hook-is-unmounted": "^1.3.4",
53
+ "@alicloud/react-hook-mouse-enter-leave": "^1.0.3",
54
+ "@alicloud/typescript-missing-helpers": "^1.3.4",
55
+ "immutability-helper": "^3.1.1"
56
+ },
57
+ "scripts": {
58
+ "start": "breezr start-storybook",
59
+ "test": "breezr test:unit",
60
+ "build:esm": "breezr build --engine babel --es-module",
61
+ "build:cjs": "breezr build --engine babel",
62
+ "build:bundle": "breezr build --engine webpack",
63
+ "build:typings": "tsc --outDir build/types --declaration --emitDeclarationOnly",
64
+ "build": "yarn build:esm && yarn build:cjs && yarn build:typings",
65
+ "clean": "rm -rf build",
66
+ "prepublishOnly": "yarn clean && yarn build"
67
+ },
68
+ "gitHead": "e3daf0b177915f37e8beae4ecee204d8c62f9507"
69
+ }