@oceanbase/ui 0.2.13 → 0.2.15

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 (124) hide show
  1. package/dist/ui.min.css +1 -1
  2. package/dist/ui.min.js +1 -1
  3. package/es/Action/Item.js +6 -8
  4. package/es/BackgroundTaskManager/index.d.ts +5 -5
  5. package/es/BackgroundTaskManager/index.js +1 -1
  6. package/es/BasicLayout/Header.d.ts +1 -1
  7. package/es/BasicLayout/Header.js +4 -4
  8. package/es/BasicLayout/index.d.ts +3 -2
  9. package/es/BasicLayout/index.js +6 -7
  10. package/es/BasicLayout/style/index.d.ts +7 -3
  11. package/es/BatchOperationBar/index.d.ts +3 -3
  12. package/es/Boundary/constant.d.ts +4 -4
  13. package/es/ContentWithIcon/index.d.ts +21 -0
  14. package/es/ContentWithIcon/index.js +110 -0
  15. package/{lib/ContentWithQuestion → es/ContentWithIcon}/index.less +5 -1
  16. package/es/DocDialog/index.js +1 -2
  17. package/es/FullscreenBox/index.d.ts +1 -1
  18. package/es/Highlight/index.d.ts +2 -2
  19. package/es/LocaleDropdown/index.d.ts +1 -1
  20. package/es/Login/ActivateForm.d.ts +1 -1
  21. package/es/Login/ActivateForm.js +5 -5
  22. package/es/Login/LoginForm.d.ts +1 -1
  23. package/es/Login/RegisterForm.d.ts +1 -1
  24. package/es/Login/RegisterForm.js +5 -5
  25. package/es/Login/index.d.ts +2 -2
  26. package/es/Lottie/index.d.ts +2 -1
  27. package/es/NavMenu/index.js +5 -6
  28. package/es/PageContainer/ItemRender.js +3 -3
  29. package/es/PageContainer/index.d.ts +2 -2
  30. package/es/PageContainer/index.js +2 -3
  31. package/es/PageContainer/style/index.d.ts +6 -2
  32. package/es/Password/index.d.ts +2 -2
  33. package/es/Ranger/QuickPicker.d.ts +2 -1
  34. package/es/Ranger/Ranger.d.ts +3 -3
  35. package/es/Ranger/index.d.ts +1 -32
  36. package/es/SideTip/index.d.ts +4 -4
  37. package/es/TagSelect/Group.d.ts +23 -0
  38. package/es/TagSelect/Group.js +121 -0
  39. package/es/TagSelect/Item.d.ts +17 -0
  40. package/es/TagSelect/Item.js +84 -0
  41. package/es/TagSelect/TagSelectContext.d.ts +13 -0
  42. package/es/TagSelect/TagSelectContext.js +3 -0
  43. package/es/TagSelect/index.d.ts +6 -0
  44. package/es/TagSelect/index.js +6 -0
  45. package/es/TagSelect/style/index.d.ts +9 -0
  46. package/es/TagSelect/style/index.js +98 -0
  47. package/es/TreeSearch/index.d.ts +1 -1
  48. package/es/Welcome/index.d.ts +2 -2
  49. package/es/_util/genComponentStyleHook.d.ts +6 -2
  50. package/es/_util/genComponentStyleHook.js +5 -5
  51. package/es/_util/useNavigate.d.ts +2 -0
  52. package/es/_util/useNavigate.js +7 -0
  53. package/es/index.d.ts +2 -1
  54. package/es/index.js +3 -2
  55. package/es/interface.d.ts +1 -1
  56. package/es/locale/en-US.js +2 -2
  57. package/es/locale/index.d.ts +2 -2
  58. package/es/locale/zh-CN.js +2 -2
  59. package/es/locale/zh-TW.js +2 -2
  60. package/lib/Action/Item.js +5 -7
  61. package/lib/BackgroundTaskManager/index.d.ts +5 -5
  62. package/lib/BackgroundTaskManager/index.js +1 -1
  63. package/lib/BasicLayout/Header.d.ts +1 -1
  64. package/lib/BasicLayout/Header.js +4 -4
  65. package/lib/BasicLayout/index.d.ts +3 -2
  66. package/lib/BasicLayout/index.js +6 -6
  67. package/lib/BasicLayout/style/index.d.ts +7 -3
  68. package/lib/BatchOperationBar/index.d.ts +3 -3
  69. package/lib/Boundary/constant.d.ts +4 -4
  70. package/lib/ContentWithIcon/index.d.ts +21 -0
  71. package/lib/ContentWithIcon/index.js +130 -0
  72. package/{es/ContentWithQuestion → lib/ContentWithIcon}/index.less +5 -1
  73. package/lib/DocDialog/index.js +1 -2
  74. package/lib/FullscreenBox/index.d.ts +1 -1
  75. package/lib/Highlight/index.d.ts +2 -2
  76. package/lib/LocaleDropdown/index.d.ts +1 -1
  77. package/lib/Login/ActivateForm.d.ts +1 -1
  78. package/lib/Login/ActivateForm.js +5 -5
  79. package/lib/Login/LoginForm.d.ts +1 -1
  80. package/lib/Login/RegisterForm.d.ts +1 -1
  81. package/lib/Login/RegisterForm.js +5 -5
  82. package/lib/Login/index.d.ts +2 -2
  83. package/lib/Lottie/index.d.ts +2 -1
  84. package/lib/NavMenu/index.js +5 -6
  85. package/lib/PageContainer/ItemRender.js +3 -3
  86. package/lib/PageContainer/index.d.ts +2 -2
  87. package/lib/PageContainer/index.js +2 -3
  88. package/lib/PageContainer/style/index.d.ts +6 -2
  89. package/lib/Password/index.d.ts +2 -2
  90. package/lib/Ranger/QuickPicker.d.ts +2 -1
  91. package/lib/Ranger/Ranger.d.ts +3 -3
  92. package/lib/Ranger/index.d.ts +1 -32
  93. package/lib/SideTip/index.d.ts +4 -4
  94. package/lib/TagSelect/Group.d.ts +23 -0
  95. package/lib/TagSelect/Group.js +128 -0
  96. package/lib/TagSelect/Item.d.ts +17 -0
  97. package/lib/TagSelect/Item.js +108 -0
  98. package/lib/TagSelect/TagSelectContext.d.ts +13 -0
  99. package/lib/TagSelect/TagSelectContext.js +27 -0
  100. package/lib/TagSelect/index.d.ts +6 -0
  101. package/lib/TagSelect/index.js +37 -0
  102. package/lib/TagSelect/style/index.d.ts +9 -0
  103. package/lib/TagSelect/style/index.js +152 -0
  104. package/lib/TreeSearch/index.d.ts +1 -1
  105. package/lib/Welcome/index.d.ts +2 -2
  106. package/lib/_util/genComponentStyleHook.d.ts +6 -2
  107. package/lib/_util/genComponentStyleHook.js +3 -3
  108. package/lib/_util/useNavigate.d.ts +2 -0
  109. package/lib/_util/{useHistory.js → useNavigate.js} +10 -11
  110. package/lib/index.d.ts +2 -1
  111. package/lib/index.js +6 -3
  112. package/lib/interface.d.ts +1 -1
  113. package/lib/locale/en-US.js +1 -1
  114. package/lib/locale/index.d.ts +2 -2
  115. package/lib/locale/zh-CN.js +1 -1
  116. package/lib/locale/zh-TW.js +1 -1
  117. package/package.json +10 -11
  118. package/es/ContentWithQuestion/index.d.ts +0 -13
  119. package/es/ContentWithQuestion/index.js +0 -46
  120. package/es/_util/useHistory.d.ts +0 -4
  121. package/es/_util/useHistory.js +0 -13
  122. package/lib/ContentWithQuestion/index.d.ts +0 -13
  123. package/lib/ContentWithQuestion/index.js +0 -76
  124. package/lib/_util/useHistory.d.ts +0 -4
@@ -0,0 +1,152 @@
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/TagSelect/style/index.ts
20
+ var style_exports = {};
21
+ __export(style_exports, {
22
+ default: () => style_default,
23
+ genTagSelectStyle: () => genTagSelectStyle
24
+ });
25
+ module.exports = __toCommonJS(style_exports);
26
+ var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
27
+ var genSizeStyle = (height, fontSize) => {
28
+ return {
29
+ paddingTop: `${height}px`,
30
+ paddingBottom: `${height}px`,
31
+ fontSize
32
+ };
33
+ };
34
+ var genColoredStyle = (borderColor, backgroundColor, color) => {
35
+ return {
36
+ borderColor,
37
+ backgroundColor,
38
+ color
39
+ };
40
+ };
41
+ var genMultipleStyle = (color, token) => {
42
+ return {
43
+ position: "absolute",
44
+ top: "1px",
45
+ right: "1px",
46
+ borderTop: `12px solid ${color}`,
47
+ borderLeft: `12px solid transparent`,
48
+ borderTopRightRadius: token.borderRadiusSM
49
+ };
50
+ };
51
+ var genImgCoverStyle = (width, height) => {
52
+ return {
53
+ width,
54
+ height
55
+ };
56
+ };
57
+ var genTagSelectStyle = (token) => {
58
+ const {
59
+ componentCls
60
+ } = token;
61
+ return {
62
+ [`${componentCls}-title`]: {
63
+ fontSize: token.fontSize,
64
+ color: token.colorText,
65
+ margin: `${token.marginXXS}px 0`
66
+ },
67
+ [`${componentCls}-wrapper`]: {
68
+ position: "relative",
69
+ display: "inline-block",
70
+ fontSize: token.fontSize,
71
+ color: token.colorTextLabel,
72
+ background: token.colorWhite,
73
+ border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,
74
+ borderRadius: token.borderRadius,
75
+ marginRight: token.marginXS,
76
+ padding: `${token.paddingXXS}px ${token.paddingContentHorizontal}px`,
77
+ cursor: "pointer",
78
+ [`${componentCls}-input`]: {
79
+ width: 0,
80
+ height: 0,
81
+ opacity: 0,
82
+ pointerEvents: "none"
83
+ },
84
+ "&:last-child": {
85
+ margin: 0
86
+ },
87
+ [`&:has(${componentCls}-cover)`]: {
88
+ padding: 0,
89
+ ...genImgCoverStyle("76px", "40px")
90
+ }
91
+ },
92
+ [`${componentCls}-cover`]: {
93
+ display: "inline-block",
94
+ width: "100%",
95
+ height: "100%",
96
+ img: {
97
+ height: "calc(100% - 2px)",
98
+ width: "calc(100% - 2px)",
99
+ borderRadius: token.borderRadius,
100
+ marginLeft: "1px",
101
+ marginTop: "1px"
102
+ }
103
+ },
104
+ [`${componentCls}-large${componentCls}-img`]: {
105
+ ...genImgCoverStyle("228px", "120px"),
106
+ marginRight: "16px"
107
+ },
108
+ [`${componentCls}-small${componentCls}-img`]: genImgCoverStyle("76px", "32px"),
109
+ [`${componentCls}-large`]: genSizeStyle(token.paddingContentVerticalSM, token.fontSize),
110
+ [`${componentCls}-small`]: genSizeStyle(0, token.fontSize),
111
+ [`${componentCls}-wrapper:not(${componentCls}-disabled):hover`]: {
112
+ color: token.colorPrimaryTextHover
113
+ },
114
+ [`${componentCls}-checked`]: genColoredStyle(token.blue, token.colorPrimaryBg, token.colorPrimaryText),
115
+ [`${componentCls}-wrapper${componentCls}-checked:not(${componentCls}-disabled):focus-within`]: {
116
+ boxShadow: `0 1px 3px 0px #000`,
117
+ borderColor: `${token.colorPrimary}`
118
+ },
119
+ [`${componentCls}-checked:not(${componentCls}-disabled)`]: {
120
+ "&:hover": {
121
+ ...genColoredStyle(token.colorInfoBorder, "#EBF1FF", token.colorInfoTextHover),
122
+ [`${componentCls}-inner`]: {
123
+ borderTopColor: `${token.colorPrimaryTextHover} !important`
124
+ }
125
+ }
126
+ },
127
+ [`${componentCls}-disabled:not(${componentCls}-checked)`]: {
128
+ ...genColoredStyle(token.colorBorder, "#F6F8FE", "#CDD5E3"),
129
+ cursor: "not-allowed"
130
+ },
131
+ [`${componentCls}-disabled${componentCls}-checked`]: {
132
+ cursor: "not-allowed",
133
+ ...genColoredStyle(token.colorBorder, "#E2E8F3", token.colorTextTertiary)
134
+ },
135
+ [`${componentCls}-checked${componentCls}-disabled.multiple`]: {
136
+ [`${componentCls}-inner`]: genMultipleStyle("#CDD5E3", token)
137
+ },
138
+ [`${componentCls}-checked:not(${componentCls}-disabled).multiple`]: {
139
+ [`${componentCls}-inner`]: genMultipleStyle(token.colorPrimary, token)
140
+ }
141
+ };
142
+ };
143
+ var style_default = (prefixCls) => {
144
+ const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("TagSelect", (token) => {
145
+ return [genTagSelectStyle(token)];
146
+ });
147
+ return useStyle(prefixCls);
148
+ };
149
+ // Annotate the CommonJS export names for ESM import in node:
150
+ 0 && (module.exports = {
151
+ genTagSelectStyle
152
+ });
@@ -1,4 +1,4 @@
1
- import type { DataNode } from 'antd/es/tree';
1
+ import type { DataNode } from '@oceanbase/design/es/tree';
2
2
  import React from 'react';
3
3
  export interface Node {
4
4
  originTitle?: string;
@@ -1,4 +1,4 @@
1
- import type { ButtonProps } from 'antd/es/button';
1
+ import type { ButtonProps } from '@oceanbase/design/es/button';
2
2
  import React from 'react';
3
3
  import './index.less';
4
4
  export interface IntroduceItem {
@@ -19,7 +19,7 @@ export interface WelcomeLocale {
19
19
  helpTitle: string;
20
20
  defaultOperation: string;
21
21
  }
22
- export declare type StepType = 'default' | 'card';
22
+ export type StepType = 'default' | 'card';
23
23
  export interface WelcomeProps {
24
24
  title: string;
25
25
  description: string;
@@ -1,5 +1,6 @@
1
1
  import type { ProAliasToken } from '@ant-design/pro-components';
2
- import type { GenerateStyle } from 'antd/es/theme/internal';
2
+ import type { GenerateStyle } from '@oceanbase/design/es/theme';
3
+ import React from 'react';
3
4
  export interface OBToken extends ProAliasToken {
4
5
  /** Wrap component class with `.` prefix */
5
6
  componentCls: string;
@@ -11,4 +12,7 @@ export interface OBToken extends ProAliasToken {
11
12
  antCls: string;
12
13
  zIndexPopup: number;
13
14
  }
14
- export declare function genComponentStyleHook(componentName: string, styleFn: GenerateStyle<OBToken>): (prefixCls: string) => any;
15
+ export declare function genComponentStyleHook(componentName: string, styleFn: GenerateStyle<OBToken>): (prefixCls: string) => {
16
+ wrapSSR: (node: React.ReactElement<any, string | React.JSXElementConstructor<any>>) => React.JSX.Element;
17
+ hashId: string;
18
+ };
@@ -37,10 +37,10 @@ var import_react = __toESM(require("react"));
37
37
  var import_design = require("@oceanbase/design");
38
38
  function genComponentStyleHook(componentName, styleFn) {
39
39
  return (prefixCls) => {
40
+ const { getPrefixCls, iconPrefixCls } = import_react.default.useContext(import_design.ConfigProvider.ConfigContext);
41
+ const rootPrefixCls = getPrefixCls();
42
+ const componentCls = `.${prefixCls}`;
40
43
  return (0, import_pro_components.useStyle)(componentName, (token) => {
41
- const { getPrefixCls, iconPrefixCls } = import_react.default.useContext(import_design.ConfigProvider.ConfigContext);
42
- const rootPrefixCls = getPrefixCls();
43
- const componentCls = `.${prefixCls}`;
44
44
  const mergedToken = {
45
45
  ...token,
46
46
  componentCls,
@@ -0,0 +1,2 @@
1
+ declare const _default: () => import("packages/design/es/config-provider").NavigateFunction;
2
+ export default _default;
@@ -16,16 +16,15 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // src/_util/useHistory.ts
20
- var useHistory_exports = {};
21
- __export(useHistory_exports, {
22
- default: () => useHistory_default
19
+ // src/_util/useNavigate.ts
20
+ var useNavigate_exports = {};
21
+ __export(useNavigate_exports, {
22
+ default: () => useNavigate_default
23
23
  });
24
- module.exports = __toCommonJS(useHistory_exports);
25
- var import_react_router_dom = require("react-router-dom");
26
- var useHistory_default = () => {
27
- return {
28
- // push: useHistory ? useHistory().push : useNavigate ? useNavigate() : null,
29
- push: import_react_router_dom.useNavigate ? (0, import_react_router_dom.useNavigate)() : null
30
- };
24
+ module.exports = __toCommonJS(useNavigate_exports);
25
+ var import_react = require("react");
26
+ var import_design = require("@oceanbase/design");
27
+ var useNavigate_default = () => {
28
+ const { navigate } = (0, import_react.useContext)(import_design.ConfigProvider.ExtendedConfigContext);
29
+ return navigate;
31
30
  };
package/lib/index.d.ts CHANGED
@@ -8,7 +8,7 @@ export { default as BasicLayout } from './BasicLayout';
8
8
  export { default as BatchOperationBar } from './BatchOperationBar';
9
9
  export { default as Boundary } from './Boundary';
10
10
  export * from './constant';
11
- export { default as ContentWithQuestion } from './ContentWithQuestion';
11
+ export { default as ContentWithIcon } from './ContentWithIcon';
12
12
  export { default as Dialog } from './Dialog';
13
13
  export { default as DocDialog } from './DocDialog';
14
14
  export { default as FullscreenBox } from './FullscreenBox';
@@ -26,3 +26,4 @@ export { default as SideTip } from './SideTip';
26
26
  export { default as TaskGraph } from './TaskGraph';
27
27
  export { default as TreeSearch } from './TreeSearch';
28
28
  export { default as Welcome } from './Welcome';
29
+ export { default as TagSelect } from './TagSelect';
package/lib/index.js CHANGED
@@ -36,7 +36,7 @@ __export(src_exports, {
36
36
  BasicLayout: () => import_BasicLayout.default,
37
37
  BatchOperationBar: () => import_BatchOperationBar.default,
38
38
  Boundary: () => import_Boundary.default,
39
- ContentWithQuestion: () => import_ContentWithQuestion.default,
39
+ ContentWithIcon: () => import_ContentWithIcon.default,
40
40
  Dialog: () => import_Dialog.default,
41
41
  DocDialog: () => import_DocDialog.default,
42
42
  FullscreenBox: () => import_FullscreenBox.default,
@@ -50,6 +50,7 @@ __export(src_exports, {
50
50
  Password: () => import_Password.default,
51
51
  Ranger: () => import_Ranger.default,
52
52
  SideTip: () => import_SideTip.default,
53
+ TagSelect: () => import_TagSelect.default,
53
54
  TaskGraph: () => import_TaskGraph.default,
54
55
  TreeSearch: () => import_TreeSearch.default,
55
56
  Welcome: () => import_Welcome.default,
@@ -65,7 +66,7 @@ var import_BasicLayout = __toESM(require("./BasicLayout"));
65
66
  var import_BatchOperationBar = __toESM(require("./BatchOperationBar"));
66
67
  var import_Boundary = __toESM(require("./Boundary"));
67
68
  __reExport(src_exports, require("./constant"), module.exports);
68
- var import_ContentWithQuestion = __toESM(require("./ContentWithQuestion"));
69
+ var import_ContentWithIcon = __toESM(require("./ContentWithIcon"));
69
70
  var import_Dialog = __toESM(require("./Dialog"));
70
71
  var import_DocDialog = __toESM(require("./DocDialog"));
71
72
  var import_FullscreenBox = __toESM(require("./FullscreenBox"));
@@ -83,6 +84,7 @@ var import_SideTip = __toESM(require("./SideTip"));
83
84
  var import_TaskGraph = __toESM(require("./TaskGraph"));
84
85
  var import_TreeSearch = __toESM(require("./TreeSearch"));
85
86
  var import_Welcome = __toESM(require("./Welcome"));
87
+ var import_TagSelect = __toESM(require("./TagSelect"));
86
88
  // Annotate the CommonJS export names for ESM import in node:
87
89
  0 && (module.exports = {
88
90
  Action,
@@ -91,7 +93,7 @@ var import_Welcome = __toESM(require("./Welcome"));
91
93
  BasicLayout,
92
94
  BatchOperationBar,
93
95
  Boundary,
94
- ContentWithQuestion,
96
+ ContentWithIcon,
95
97
  Dialog,
96
98
  DocDialog,
97
99
  FullscreenBox,
@@ -105,6 +107,7 @@ var import_Welcome = __toESM(require("./Welcome"));
105
107
  Password,
106
108
  Ranger,
107
109
  SideTip,
110
+ TagSelect,
108
111
  TaskGraph,
109
112
  TreeSearch,
110
113
  Welcome,
@@ -1 +1 @@
1
- export declare type Locale = 'zh-TW' | 'zh-CN' | 'en-US';
1
+ export type Locale = 'zh-TW' | 'zh-CN' | 'en-US';
@@ -32,7 +32,7 @@ __export(en_US_exports, {
32
32
  default: () => en_US_default
33
33
  });
34
34
  module.exports = __toCommonJS(en_US_exports);
35
- var import_en_US = __toESM(require("antd/es/locale/en_US"));
35
+ var import_en_US = __toESM(require("@oceanbase/design/es/locale/en-US"));
36
36
  var import_en_US2 = __toESM(require("../BasicLayout/locale/en-US"));
37
37
  var import_en_US3 = __toESM(require("../BatchOperationBar/locale/en-US"));
38
38
  var import_en_US4 = __toESM(require("../Boundary/locale/en-US"));
@@ -1,4 +1,4 @@
1
- import type { Locale as AntLocale } from 'antd/es/locale';
2
- export interface Locale extends AntLocale {
1
+ import type { Locale as DesignLocale } from '@oceanbase/design/es/locale';
2
+ export interface Locale extends DesignLocale {
3
3
  [key: string]: any;
4
4
  }
@@ -32,7 +32,7 @@ __export(zh_CN_exports, {
32
32
  default: () => zh_CN_default
33
33
  });
34
34
  module.exports = __toCommonJS(zh_CN_exports);
35
- var import_zh_CN = __toESM(require("antd/es/locale/zh_CN"));
35
+ var import_zh_CN = __toESM(require("@oceanbase/design/es/locale/zh-CN"));
36
36
  var import_zh_CN2 = __toESM(require("../BasicLayout/locale/zh-CN"));
37
37
  var import_zh_CN3 = __toESM(require("../BatchOperationBar/locale/zh-CN"));
38
38
  var import_zh_CN4 = __toESM(require("../Dialog/locale/zh-CN"));
@@ -32,7 +32,7 @@ __export(zh_TW_exports, {
32
32
  default: () => zh_TW_default
33
33
  });
34
34
  module.exports = __toCommonJS(zh_TW_exports);
35
- var import_zh_TW = __toESM(require("antd/es/locale/zh_TW"));
35
+ var import_zh_TW = __toESM(require("@oceanbase/design/es/locale/zh-TW"));
36
36
  var import_zh_TW2 = __toESM(require("../BasicLayout/locale/zh-TW"));
37
37
  var import_zh_TW3 = __toESM(require("../BatchOperationBar/locale/zh-TW"));
38
38
  var import_zh_TW4 = __toESM(require("../Dialog/locale/zh-TW"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oceanbase/ui",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
4
4
  "description": "The UI library based on OceanBase Design",
5
5
  "keywords": [
6
6
  "OceanBase",
@@ -35,11 +35,11 @@
35
35
  "build": "father build"
36
36
  },
37
37
  "dependencies": {
38
- "@ant-design/cssinjs": "^1.11.1",
39
- "@ant-design/pro-components": "^2.6.4",
40
- "@oceanbase/design": "^0.2.12",
41
- "@oceanbase/icons": "^0.2.3",
42
- "@oceanbase/util": "^0.2.4",
38
+ "@ant-design/cssinjs": "^1.16.2",
39
+ "@ant-design/pro-components": "^2.6.12",
40
+ "@oceanbase/design": "^0.2.14",
41
+ "@oceanbase/icons": "^0.2.4",
42
+ "@oceanbase/util": "^0.2.6",
43
43
  "ahooks": "^2.10.14",
44
44
  "classnames": "^2.3.2",
45
45
  "dayjs": "^1.11.9",
@@ -52,11 +52,11 @@
52
52
  "moment": "^2.29.4",
53
53
  "path-to-regexp": "^6.2.1",
54
54
  "randexp": "^0.5.3",
55
- "rc-util": "^5.34.1",
55
+ "rc-util": "^5.36.0",
56
56
  "react-copy-to-clipboard": "^5.1.0",
57
57
  "react-json-view": "^1.21.3",
58
58
  "react-split-pane": "^0.1.92",
59
- "screenfull": "^5.2.0"
59
+ "screenfull": "^6.0.2"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@antv/g6": "3.4.10"
@@ -64,8 +64,7 @@
64
64
  "peerDependencies": {
65
65
  "@antv/g6": "3.4.10",
66
66
  "react": "^16.9.0",
67
- "react-dom": "^16.9.0",
68
- "react-router-dom": ">=5.2.0"
67
+ "react-dom": "^16.9.0"
69
68
  },
70
- "gitHead": "7d81ac30dec1b962fc77a037023fef0ab0a3db24"
69
+ "gitHead": "21e309021edf43301bfc7de6e93b131afc5c6f47"
71
70
  }
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export interface ContentWithQuestionProps {
4
- content?: React.ReactNode;
5
- tooltip?: any;
6
- prefixIcon?: React.ReactNode | boolean;
7
- suffixIcon?: React.ReactNode;
8
- className?: string;
9
- style?: React.CSSProperties;
10
- onClick?: (e: React.SyntheticEvent) => void;
11
- }
12
- declare const ContentWithQuestion: React.FC<ContentWithQuestionProps>;
13
- export default ContentWithQuestion;
@@ -1,46 +0,0 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- var _excluded = ["content", "tooltip", "prefixIcon", "suffixIcon", "className", "children"];
3
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
8
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
9
- import { QuestionCircleOutlined } from '@oceanbase/icons';
10
- import { Space, Tooltip } from '@oceanbase/design';
11
- import classNames from 'classnames';
12
- import React, { isValidElement } from 'react';
13
- import { getPrefix } from "../_util";
14
- import "./index.less";
15
- var prefix = getPrefix('content-with-question');
16
- var ContentWithQuestion = function ContentWithQuestion(_ref) {
17
- var _classNames;
18
- var content = _ref.content,
19
- tooltip = _ref.tooltip,
20
- _ref$prefixIcon = _ref.prefixIcon,
21
- prefixIcon = _ref$prefixIcon === void 0 ? null : _ref$prefixIcon,
22
- _ref$suffixIcon = _ref.suffixIcon,
23
- suffixIcon = _ref$suffixIcon === void 0 ? /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
24
- className: "".concat(prefix, "-help")
25
- }) : _ref$suffixIcon,
26
- className = _ref.className,
27
- children = _ref.children,
28
- restProps = _objectWithoutProperties(_ref, _excluded);
29
- // FIXME: antd 已经废弃 icon type 的用法,该组件也需要做相应处理,后面将会是传入 Icon 的形式而非 type
30
- var getIcon = function getIcon(iconConfig) {
31
- return iconConfig ? /*#__PURE__*/React.createElement(Tooltip, tooltip, /*#__PURE__*/isValidElement(iconConfig) ? iconConfig : /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
32
- className: "".concat(prefix, "-help")
33
- })) : null;
34
- };
35
- return /*#__PURE__*/React.createElement("span", _extends({
36
- className: classNames((_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "-item"), true), _defineProperty(_classNames, className, !!className), _classNames))
37
- }, restProps), /*#__PURE__*/React.createElement(Space, null, getIcon(prefixIcon === true ? /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
38
- className: "".concat(prefix, "-help"),
39
- style: {
40
- marginRight: 4
41
- }
42
- }) : prefixIcon), /*#__PURE__*/React.createElement("span", {
43
- "data-testid": "content"
44
- }, content !== null && content !== void 0 ? content : children), getIcon(suffixIcon)));
45
- };
46
- export default ContentWithQuestion;
@@ -1,4 +0,0 @@
1
- declare const _default: () => {
2
- push: any;
3
- };
4
- export default _default;
@@ -1,13 +0,0 @@
1
- import {
2
- // react-router-dom v5
3
- // @ts-ignore
4
-
5
- // react-router-dom v6
6
- // @ts-ignore
7
- useNavigate } from 'react-router-dom';
8
- export default (function () {
9
- return {
10
- // push: useHistory ? useHistory().push : useNavigate ? useNavigate() : null,
11
- push: useNavigate ? useNavigate() : null
12
- };
13
- });
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export interface ContentWithQuestionProps {
4
- content?: React.ReactNode;
5
- tooltip?: any;
6
- prefixIcon?: React.ReactNode | boolean;
7
- suffixIcon?: React.ReactNode;
8
- className?: string;
9
- style?: React.CSSProperties;
10
- onClick?: (e: React.SyntheticEvent) => void;
11
- }
12
- declare const ContentWithQuestion: React.FC<ContentWithQuestionProps>;
13
- export default ContentWithQuestion;
@@ -1,76 +0,0 @@
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 __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
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
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/ContentWithQuestion/index.tsx
30
- var ContentWithQuestion_exports = {};
31
- __export(ContentWithQuestion_exports, {
32
- default: () => ContentWithQuestion_default
33
- });
34
- module.exports = __toCommonJS(ContentWithQuestion_exports);
35
- var import_icons = require("@oceanbase/icons");
36
- var import_design = require("@oceanbase/design");
37
- var import_classnames = __toESM(require("classnames"));
38
- var import_react = __toESM(require("react"));
39
- var import_util = require("../_util");
40
- var import_index = require("./index.less");
41
- var prefix = (0, import_util.getPrefix)("content-with-question");
42
- var ContentWithQuestion = ({
43
- content,
44
- tooltip,
45
- prefixIcon = null,
46
- suffixIcon = /* @__PURE__ */ import_react.default.createElement(import_icons.QuestionCircleOutlined, { className: `${prefix}-help` }),
47
- className,
48
- children,
49
- ...restProps
50
- }) => {
51
- const getIcon = (iconConfig) => {
52
- return iconConfig ? /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { ...tooltip }, (0, import_react.isValidElement)(iconConfig) ? iconConfig : /* @__PURE__ */ import_react.default.createElement(import_icons.QuestionCircleOutlined, { className: `${prefix}-help` })) : null;
53
- };
54
- return /* @__PURE__ */ import_react.default.createElement(
55
- "span",
56
- {
57
- className: (0, import_classnames.default)({
58
- [`${prefix}-item`]: true,
59
- [className]: !!className
60
- }),
61
- ...restProps
62
- },
63
- /* @__PURE__ */ import_react.default.createElement(import_design.Space, null, getIcon(
64
- prefixIcon === true ? /* @__PURE__ */ import_react.default.createElement(
65
- import_icons.QuestionCircleOutlined,
66
- {
67
- className: `${prefix}-help`,
68
- style: {
69
- marginRight: 4
70
- }
71
- }
72
- ) : prefixIcon
73
- ), /* @__PURE__ */ import_react.default.createElement("span", { "data-testid": "content" }, content ?? children), getIcon(suffixIcon))
74
- );
75
- };
76
- var ContentWithQuestion_default = ContentWithQuestion;
@@ -1,4 +0,0 @@
1
- declare const _default: () => {
2
- push: any;
3
- };
4
- export default _default;