@oceanbase/ui 0.2.31 → 0.2.32

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.
@@ -34,11 +34,19 @@ __export(FooterToolbar_exports, {
34
34
  module.exports = __toCommonJS(FooterToolbar_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_pro_components = require("@ant-design/pro-components");
37
+ var import_design = require("@oceanbase/design");
38
+ var import_style = __toESM(require("./style"));
37
39
  var FooterToolbar = ({
38
40
  // render footer under parent instead of body by default
39
41
  portalDom = false,
42
+ prefixCls: customizePrefixCls,
40
43
  ...restProps
41
44
  }) => {
42
- return /* @__PURE__ */ import_react.default.createElement(import_pro_components.FooterToolbar, { portalDom, ...restProps });
45
+ const { getPrefixCls } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
46
+ const prefixCls = getPrefixCls("pro-footer-bar", customizePrefixCls);
47
+ const { wrapSSR } = (0, import_style.default)(prefixCls);
48
+ return wrapSSR(
49
+ /* @__PURE__ */ import_react.default.createElement(import_pro_components.FooterToolbar, { portalDom, prefixCls: customizePrefixCls, ...restProps })
50
+ );
43
51
  };
44
52
  var FooterToolbar_default = FooterToolbar;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { FooterToolBarToken } from '@ant-design/pro-layout/es/components/FooterToolbar/style';
3
+ import type { GenerateStyle } from '@oceanbase/design/es/theme';
4
+ export declare const genFooterToolbarStyle: GenerateStyle<FooterToolBarToken>;
5
+ declare const _default: (prefixCls: string) => {
6
+ wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
7
+ hashId: string;
8
+ };
9
+ export default _default;
@@ -0,0 +1,59 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/FooterToolbar/style/index.ts
20
+ var style_exports = {};
21
+ __export(style_exports, {
22
+ default: () => style_default,
23
+ genFooterToolbarStyle: () => genFooterToolbarStyle
24
+ });
25
+ module.exports = __toCommonJS(style_exports);
26
+ var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
27
+ var genFooterToolbarStyle = (token) => {
28
+ const { antCls, componentCls, colorBgBase, borderRadius, boxShadowSecondary, controlHeightLG } = token;
29
+ const height = controlHeightLG;
30
+ const lineHeight = `${controlHeightLG}px`;
31
+ return {
32
+ [`${componentCls}`]: {
33
+ width: "100%",
34
+ backgroundColor: colorBgBase,
35
+ borderRadius,
36
+ boxShadow: boxShadowSecondary,
37
+ borderBlockStart: "none",
38
+ // 设置底部操作栏的组件高度
39
+ [`${antCls}-btn:not(${antCls}-input-search-button)`]: {
40
+ minWidth: 68,
41
+ height
42
+ },
43
+ [`${antCls}-radio-button-wrapper`]: {
44
+ height,
45
+ lineHeight
46
+ }
47
+ }
48
+ };
49
+ };
50
+ var style_default = (prefixCls) => {
51
+ const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("FooterToolbar", (token) => {
52
+ return [genFooterToolbarStyle(token)];
53
+ });
54
+ return useStyle(prefixCls);
55
+ };
56
+ // Annotate the CommonJS export names for ESM import in node:
57
+ 0 && (module.exports = {
58
+ genFooterToolbarStyle
59
+ });
@@ -29,7 +29,7 @@ export declare const THEME_DARK = "dark";
29
29
  export declare const THEME_LIGHT = "light";
30
30
  declare const ThemeTypes: ["dark", "light"];
31
31
  export type ThemeType = (typeof ThemeTypes)[number];
32
- declare const supportedLanguages: ("ruby" | "css" | "json" | "sql" | "tsx" | "javascript" | "typescript" | "groovy" | "java" | "python" | "bash" | "cpp" | "http" | "markdown" | "nginx" | "xml" | "dockerfile" | "go" | "yaml" | "solidity" | "jsx")[];
32
+ declare const supportedLanguages: ("ruby" | "css" | "bash" | "json" | "java" | "go" | "javascript" | "typescript" | "groovy" | "python" | "cpp" | "http" | "markdown" | "nginx" | "sql" | "xml" | "dockerfile" | "yaml" | "solidity" | "tsx" | "jsx")[];
33
33
  export type LanguageType = (typeof supportedLanguages)[number] | 'html';
34
34
  export interface HighlightProps extends LocaleWrapperProps {
35
35
  /**
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './font/iconfont.css';
3
- interface IconFontProps {
3
+ export interface IconFontProps {
4
4
  type: string;
5
5
  className?: string;
6
6
  style?: React.CSSProperties;
@@ -1,16 +1,3 @@
1
- import type { AnimationConfig, AnimationItem } from 'lottie-web';
2
- import React from 'react';
3
- export interface LottieProps extends Omit<AnimationConfig, 'container'> {
4
- path?: string;
5
- animationData?: any;
6
- mode?: 'default' | 'icon';
7
- loop?: boolean;
8
- speed?: number;
9
- className?: string;
10
- style?: React.CSSProperties;
11
- }
12
- export interface LottieRef {
13
- animation: AnimationItem;
14
- }
15
- declare const Lottie: React.ForwardRefExoticComponent<LottieProps & React.RefAttributes<LottieRef>>;
1
+ import { Lottie } from '@oceanbase/design';
2
+ export type { LottieProps, LottieRef } from '@oceanbase/design';
16
3
  export default Lottie;
@@ -1,8 +1,6 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __export = (target, all) => {
8
6
  for (var name in all)
@@ -16,64 +14,13 @@ var __copyProps = (to, from, except, desc) => {
16
14
  }
17
15
  return to;
18
16
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
18
 
29
- // src/Lottie/index.tsx
19
+ // src/Lottie/index.ts
30
20
  var Lottie_exports = {};
31
21
  __export(Lottie_exports, {
32
22
  default: () => Lottie_default
33
23
  });
34
24
  module.exports = __toCommonJS(Lottie_exports);
35
- var import_lottie_web = __toESM(require("lottie-web"));
36
- var import_react = __toESM(require("react"));
37
- var import_ahooks = require("ahooks");
38
- var import_classnames = __toESM(require("classnames"));
39
- var Lottie = import_react.default.forwardRef(
40
- ({ mode = "default", loop = true, speed = 1, className, style, ...restProps }, ref) => {
41
- const [animation, setAnimation] = (0, import_react.useState)();
42
- const containerRef = (0, import_react.useRef)();
43
- (0, import_react.useEffect)(() => {
44
- if (!animation) {
45
- const newAnimation = import_lottie_web.default.loadAnimation({
46
- container: containerRef.current,
47
- renderer: "svg",
48
- loop,
49
- ...restProps
50
- });
51
- setAnimation(newAnimation);
52
- }
53
- }, []);
54
- (0, import_ahooks.useUpdateEffect)(() => {
55
- if (animation) {
56
- animation.setLoop(loop);
57
- animation.setSpeed(speed);
58
- }
59
- }, [loop, speed]);
60
- (0, import_react.useImperativeHandle)(ref, () => ({
61
- animation
62
- }));
63
- return /* @__PURE__ */ import_react.default.createElement(
64
- "div",
65
- {
66
- ref: containerRef,
67
- className: (0, import_classnames.default)(className, {
68
- // 图标展示模式,则追加 anticon 类名
69
- ["anticon"]: mode === "icon"
70
- }),
71
- style: {
72
- display: "inline-block",
73
- ...style
74
- }
75
- }
76
- );
77
- }
78
- );
79
- var Lottie_default = Lottie;
25
+ var import_design = require("@oceanbase/design");
26
+ var Lottie_default = import_design.Lottie;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './index.less';
3
- export interface IMenu {
3
+ export interface NavMenuItem {
4
4
  key: string;
5
5
  title: string;
6
6
  link: string | string[];
@@ -8,12 +8,12 @@ export interface IMenu {
8
8
  openNewTab?: boolean;
9
9
  href?: boolean;
10
10
  id?: string;
11
- children?: IMenu[];
11
+ children?: NavMenuItem[];
12
12
  }
13
- interface MenuProps {
14
- menuList: IMenu[];
13
+ export interface NavMenuProps {
14
+ menuList: NavMenuItem[];
15
15
  className?: string;
16
16
  style?: React.CSSProperties;
17
17
  }
18
- declare const _default: (props: MenuProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
18
+ declare const _default: (props: NavMenuProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
19
19
  export default _default;
@@ -24,6 +24,7 @@ __export(style_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(style_exports);
26
26
  var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
27
+ var import_style = require("../../FooterToolbar/style");
27
28
  var genPageContainerStyle = (token) => {
28
29
  const {
29
30
  antCls,
@@ -104,22 +105,10 @@ var genPageContainerStyle = (token) => {
104
105
  [`${componentCls}-with-footer `]: {
105
106
  paddingBottom: 64
106
107
  },
107
- [`${proComponentsCls}-footer-bar`]: {
108
- width: "100%",
109
- backgroundColor: colorBgBase,
110
- borderRadius,
111
- boxShadow: boxShadowSecondary,
112
- borderBlockStart: "none",
113
- // 设置底部操作栏的组件高度
114
- [`${antCls}-btn:not(${antCls}-input-search-button)`]: {
115
- minWidth: 68,
116
- height
117
- },
118
- [`${antCls}-radio-button-wrapper`]: {
119
- height,
120
- lineHeight
121
- }
122
- }
108
+ ...(0, import_style.genFooterToolbarStyle)({
109
+ ...token,
110
+ componentCls: `${proComponentsCls}-footer-bar`
111
+ })
123
112
  };
124
113
  };
125
114
  var style_default = (prefixCls) => {
@@ -1,11 +1,25 @@
1
+ import type { RangePickerProps } from '@oceanbase/design/es/date-picker';
1
2
  import type { Dayjs } from 'dayjs';
2
3
  import type { Moment } from 'moment';
3
4
  import './index.less';
5
+ import type { RangeOption } from './typing';
4
6
  export type RangeName = 'customize' | string;
5
7
  export type RangeValue = [Moment, Moment] | [Dayjs, Dayjs];
6
8
  export type RangeDateValue = {
7
9
  name: RangeName;
8
10
  range: RangeValue;
9
11
  };
12
+ export interface RangerProps extends Omit<RangePickerProps, 'mode' | 'picker' | 'value' | 'defaultValue'> {
13
+ selects?: RangeOption[];
14
+ defaultQuickValue?: string;
15
+ mode?: 'default' | 'mini';
16
+ quickType?: 'select' | 'dropdown';
17
+ /** 是否只允许选择过去时间 */
18
+ pastOnly?: boolean;
19
+ stickRangeName?: boolean;
20
+ value?: RangeValue;
21
+ defaultValue?: RangeValue;
22
+ size?: 'small' | 'large' | 'middle';
23
+ }
10
24
  declare const _default: any;
11
25
  export default _default;
@@ -17,7 +17,7 @@ export interface TreeSearchRef {
17
17
  checkAll: () => void;
18
18
  invertSelect: () => void;
19
19
  }
20
- interface TreeSearchProps {
20
+ export interface TreeSearchProps {
21
21
  treeData: Node[];
22
22
  titleRender?: (nodeData: DataNode) => React.ReactNode;
23
23
  checkable?: boolean;
@@ -32,7 +32,7 @@ interface TreeSearchProps {
32
32
  followLeaf?: boolean;
33
33
  /** 异步请求节点数据的回调函数 */
34
34
  loadData?: (data: unknown) => Promise<void>;
35
- searchStyle?: {};
35
+ searchStyle?: React.CSSProperties;
36
36
  }
37
37
  declare const _default: React.ForwardRefExoticComponent<TreeSearchProps & React.RefAttributes<TreeSearchRef>>;
38
38
  export default _default;
package/lib/index.d.ts CHANGED
@@ -1,33 +1,53 @@
1
1
  import './index.less';
2
2
  export * from '@ant-design/pro-components';
3
3
  export { version } from '../package.json';
4
+ export * from './constant';
5
+ export * from './interface';
4
6
  export { default as Action } from './Action';
5
- export { BackgroundTaskManagerConstants, default as BackgroundTaskManager, } from './BackgroundTaskManager';
6
- export type { BackgroundTaskManagerRef, ITaskMgrPreset, ITaskMgrQueue, TaskMgrID, } from './BackgroundTaskManager';
7
+ export type { ActionGroupProps } from './Action';
7
8
  export { default as BasicLayout } from './BasicLayout';
9
+ export type { BasicLayoutProps } from './BasicLayout';
8
10
  export { default as BatchOperationBar } from './BatchOperationBar';
11
+ export type { BatchOperationBarProps } from './BatchOperationBar';
9
12
  export { default as Boundary } from './Boundary';
10
- export * from './constant';
11
13
  export { default as ContentWithQuestion } from './ContentWithQuestion';
14
+ export type { ContentWithQuestionProps } from './ContentWithQuestion';
12
15
  export { default as ContentWithIcon } from './ContentWithIcon';
16
+ export type { ContentWithIconProps } from './ContentWithIcon';
13
17
  export { default as Dialog } from './Dialog';
18
+ export type { DialogProps } from './Dialog';
14
19
  export { default as DocDialog } from './DocDialog';
20
+ export type { DocDialogProps } from './DocDialog';
15
21
  export { default as FullscreenBox } from './FullscreenBox';
22
+ export type { FullscreenBoxProps } from './FullscreenBox';
16
23
  export { default as GraphToolbar } from './GraphToolbar';
24
+ export type { GraphToolbarProps } from './GraphToolbar';
17
25
  export { default as Highlight } from './Highlight';
26
+ export type { HighlightProps } from './Highlight';
18
27
  export { default as IconFont } from './IconFont';
19
- export * from './interface';
28
+ export type { IconFontProps } from './IconFont';
20
29
  export { default as Login } from './Login';
30
+ export type { LoginProps } from './Login';
21
31
  export { default as Lottie } from './Lottie';
32
+ export type { LottieProps } from './Lottie';
22
33
  export { default as NavMenu } from './NavMenu';
34
+ export type { NavMenuProps, NavMenuItem } from './NavMenu';
23
35
  export { default as PageContainer } from './PageContainer';
24
36
  export type { PageContainerProps } from './PageContainer';
25
37
  export { default as FooterToolbar } from './FooterToolbar';
26
38
  export type { FooterToolbarProps } from './FooterToolbar';
27
39
  export { default as Password } from './Password';
40
+ export type { PasswordProps } from './Password';
28
41
  export { default as Ranger } from './Ranger';
42
+ export type { RangerProps } from './Ranger';
29
43
  export { default as SideTip } from './SideTip';
44
+ export type { SideTipProps } from './SideTip';
30
45
  export { default as TaskGraph } from './TaskGraph';
46
+ export type { TaskGraphProps } from './TaskGraph';
31
47
  export { default as TreeSearch } from './TreeSearch';
48
+ export type { TreeSearchProps, TreeSearchRef } from './TreeSearch';
32
49
  export { default as Welcome } from './Welcome';
50
+ export type { WelcomeProps } from './Welcome';
33
51
  export { default as TagSelect } from './TagSelect';
52
+ export { BackgroundTaskManagerConstants, default as BackgroundTaskManager, } from './BackgroundTaskManager';
53
+ export type { BackgroundTaskManagerRef, ITaskMgrPreset, ITaskMgrQueue, TaskMgrID, } from './BackgroundTaskManager';
package/lib/index.js CHANGED
@@ -62,12 +62,12 @@ module.exports = __toCommonJS(src_exports);
62
62
  var import_index = require("./index.less");
63
63
  __reExport(src_exports, require("@ant-design/pro-components"), module.exports);
64
64
  var import_package = require("../package.json");
65
+ __reExport(src_exports, require("./constant"), module.exports);
66
+ __reExport(src_exports, require("./interface"), module.exports);
65
67
  var import_Action = __toESM(require("./Action"));
66
- var import_BackgroundTaskManager = __toESM(require("./BackgroundTaskManager"));
67
68
  var import_BasicLayout = __toESM(require("./BasicLayout"));
68
69
  var import_BatchOperationBar = __toESM(require("./BatchOperationBar"));
69
70
  var import_Boundary = __toESM(require("./Boundary"));
70
- __reExport(src_exports, require("./constant"), module.exports);
71
71
  var import_ContentWithQuestion = __toESM(require("./ContentWithQuestion"));
72
72
  var import_ContentWithIcon = __toESM(require("./ContentWithIcon"));
73
73
  var import_Dialog = __toESM(require("./Dialog"));
@@ -76,7 +76,6 @@ var import_FullscreenBox = __toESM(require("./FullscreenBox"));
76
76
  var import_GraphToolbar = __toESM(require("./GraphToolbar"));
77
77
  var import_Highlight = __toESM(require("./Highlight"));
78
78
  var import_IconFont = __toESM(require("./IconFont"));
79
- __reExport(src_exports, require("./interface"), module.exports);
80
79
  var import_Login = __toESM(require("./Login"));
81
80
  var import_Lottie = __toESM(require("./Lottie"));
82
81
  var import_NavMenu = __toESM(require("./NavMenu"));
@@ -89,6 +88,7 @@ var import_TaskGraph = __toESM(require("./TaskGraph"));
89
88
  var import_TreeSearch = __toESM(require("./TreeSearch"));
90
89
  var import_Welcome = __toESM(require("./Welcome"));
91
90
  var import_TagSelect = __toESM(require("./TagSelect"));
91
+ var import_BackgroundTaskManager = __toESM(require("./BackgroundTaskManager"));
92
92
  // Annotate the CommonJS export names for ESM import in node:
93
93
  0 && (module.exports = {
94
94
  Action,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oceanbase/ui",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "description": "The UI library based on OceanBase Design",
5
5
  "keywords": [
6
6
  "oceanbase",
@@ -37,9 +37,9 @@
37
37
  "@ant-design/cssinjs": "^1.17.2",
38
38
  "@ant-design/pro-components": "^2.6.34",
39
39
  "@ant-design/pro-layout": "^7.17.15",
40
- "@oceanbase/design": "^0.2.30",
40
+ "@oceanbase/design": "^0.2.31",
41
41
  "@oceanbase/icons": "^0.2.9",
42
- "@oceanbase/util": "^0.2.11",
42
+ "@oceanbase/util": "^0.2.12",
43
43
  "ahooks": "^2.10.14",
44
44
  "classnames": "^2.3.2",
45
45
  "dayjs": "^1.11.10",
@@ -48,7 +48,6 @@
48
48
  "highlightjs-solidity": "^2.0.6",
49
49
  "hoist-non-react-statics": "^3.3.2",
50
50
  "lodash": "^4.17.21",
51
- "lottie-web": "^5.12.2",
52
51
  "moment": "^2.29.4",
53
52
  "path-to-regexp": "^6.2.1",
54
53
  "randexp": "^0.5.3",
@@ -66,5 +65,5 @@
66
65
  "react": ">=16.9.0",
67
66
  "react-dom": ">=16.9.0"
68
67
  },
69
- "gitHead": "bfb6a2e9c093adf8ce5c0c39fb4582a3effd2e75"
68
+ "gitHead": "532d9294abcd03743224d6a9d59d4f1c9ab71375"
70
69
  }