@oceanbase/ui 0.4.6 → 0.4.7

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 (53) hide show
  1. package/dist/ui.min.css +1 -1
  2. package/dist/ui.min.js +1 -1
  3. package/es/Action/Group.d.ts +3 -2
  4. package/es/Action/Group.js +18 -12
  5. package/es/Action/Item.d.ts +1 -1
  6. package/es/Action/index.d.ts +2 -1
  7. package/es/Action/style/index.d.ts +9 -0
  8. package/es/Action/style/index.js +43 -0
  9. package/es/DateRanger/PickerPanel.d.ts +4 -6
  10. package/es/DateRanger/PickerPanel.js +42 -29
  11. package/es/DateRanger/Ranger.d.ts +4 -3
  12. package/es/DateRanger/Ranger.js +6 -4
  13. package/es/DateRanger/constant/index.d.ts +6 -2
  14. package/es/DateRanger/constant/index.js +35 -13
  15. package/es/DateRanger/index.d.ts +24 -1
  16. package/es/DateRanger/index.js +24 -23
  17. package/es/DateRanger/index.less +16 -1
  18. package/es/DateRanger/locale/en-US.js +7 -7
  19. package/es/Highlight/index.d.ts +1 -1
  20. package/es/ProCard/index.d.ts +5 -0
  21. package/es/ProCard/index.js +52 -0
  22. package/es/ProCard/style/index.d.ts +9 -0
  23. package/es/ProCard/style/index.js +40 -0
  24. package/es/TagSelect/style/index.d.ts +3 -2
  25. package/es/_util/genComponentStyleHook.js +1 -1
  26. package/es/index.d.ts +2 -0
  27. package/es/index.js +1 -0
  28. package/lib/Action/Group.d.ts +3 -2
  29. package/lib/Action/Group.js +56 -43
  30. package/lib/Action/Item.d.ts +1 -1
  31. package/lib/Action/index.d.ts +2 -1
  32. package/lib/Action/style/index.d.ts +9 -0
  33. package/lib/Action/style/index.js +78 -0
  34. package/lib/DateRanger/PickerPanel.d.ts +4 -6
  35. package/lib/DateRanger/PickerPanel.js +67 -29
  36. package/lib/DateRanger/Ranger.d.ts +4 -3
  37. package/lib/DateRanger/Ranger.js +4 -3
  38. package/lib/DateRanger/constant/index.d.ts +6 -2
  39. package/lib/DateRanger/constant/index.js +44 -12
  40. package/lib/DateRanger/index.d.ts +24 -1
  41. package/lib/DateRanger/index.js +23 -20
  42. package/lib/DateRanger/index.less +16 -1
  43. package/lib/DateRanger/locale/en-US.js +7 -7
  44. package/lib/Highlight/index.d.ts +1 -1
  45. package/lib/ProCard/index.d.ts +5 -0
  46. package/lib/ProCard/index.js +88 -0
  47. package/lib/ProCard/style/index.d.ts +9 -0
  48. package/lib/ProCard/style/index.js +92 -0
  49. package/lib/TagSelect/style/index.d.ts +3 -2
  50. package/lib/_util/genComponentStyleHook.js +1 -1
  51. package/lib/index.d.ts +2 -0
  52. package/lib/index.js +3 -0
  53. package/package.json +9 -9
@@ -0,0 +1,92 @@
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/ProCard/style/index.ts
20
+ var style_exports = {};
21
+ __export(style_exports, {
22
+ default: () => style_default,
23
+ genProCardStyle: () => genProCardStyle
24
+ });
25
+ module.exports = __toCommonJS(style_exports);
26
+ var import_design = require("@oceanbase/design");
27
+ var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
28
+ var genProCardStyle = (token) => {
29
+ const { componentCls, antCls, prefixCls } = token;
30
+ const tabsComponentCls = `${antCls}-tabs`;
31
+ const tabsPrefixCls = `${prefixCls}-tabs`;
32
+ return {
33
+ // follow Card style
34
+ // need add `div` to make style work
35
+ [`div${componentCls}`]: {
36
+ borderRadius: token.borderRadiusLG
37
+ },
38
+ [`${componentCls}:not(${componentCls}-border)`]: {
39
+ boxShadow: "0 1px 2px 0 rgba(0, 0, 0, 0.03),0 1px 6px -1px rgba(0, 0, 0, 0.02),0 2px 4px 0 rgba(0, 0, 0, 0.02)"
40
+ },
41
+ [`${componentCls}:not(${componentCls}-size-small)`]: {
42
+ [`${componentCls}-body`]: {
43
+ paddingBlock: token.paddingLG
44
+ },
45
+ [`&${componentCls}-has-title${componentCls}-no-divider`]: {
46
+ [`${componentCls}-body`]: {
47
+ paddingBlockStart: token.padding
48
+ }
49
+ }
50
+ },
51
+ // no body padding card
52
+ [`${componentCls}${componentCls}-no-body-padding:not(${componentCls}-contain-tabs)`]: {
53
+ [`${componentCls}-header`]: {
54
+ paddingBlockEnd: token.padding
55
+ },
56
+ ...import_design.Card.genTableStyle(token.paddingLG, token)
57
+ },
58
+ // no body padding small card
59
+ [`${componentCls}${componentCls}-no-body-padding${componentCls}-size-small:not(${componentCls}-contain-tabs)`]: {
60
+ [`${componentCls}-header`]: {
61
+ paddingBlockEnd: token.paddingXS
62
+ },
63
+ ...import_design.Card.genTableStyle(token.paddingSM, token)
64
+ },
65
+ // custom ProCard tabs style
66
+ [`${componentCls}`]: {
67
+ [`${componentCls}-tabs`]: {
68
+ [`${tabsComponentCls}-top, ${tabsComponentCls}-bottom`]: {
69
+ [`>${tabsComponentCls}-nav ${tabsComponentCls}-nav-list`]: {
70
+ marginBlockStart: 0,
71
+ paddingInlineStart: token.marginLG
72
+ }
73
+ },
74
+ ...import_design.Tabs.genTabsStyle({
75
+ ...token,
76
+ componentCls: tabsComponentCls,
77
+ prefixCls: tabsPrefixCls
78
+ })
79
+ }
80
+ }
81
+ };
82
+ };
83
+ var style_default = (prefixCls) => {
84
+ const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("ProCard", (token) => {
85
+ return [genProCardStyle(token)];
86
+ });
87
+ return useStyle(prefixCls);
88
+ };
89
+ // Annotate the CommonJS export names for ESM import in node:
90
+ 0 && (module.exports = {
91
+ genProCardStyle
92
+ });
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { FullToken, GenerateStyle } from '@oceanbase/design/es/theme';
2
+ import type { CSSObject } from '@ant-design/cssinjs';
3
+ import type { FullToken } from '@oceanbase/design/es/theme';
3
4
  export type TagSelectToken = FullToken<any>;
4
- export declare const genTagSelectStyle: GenerateStyle<TagSelectToken>;
5
+ export declare const genTagSelectStyle: (token: TagSelectToken) => CSSObject;
5
6
  declare const _default: (prefixCls: string) => {
6
7
  wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
7
8
  hashId: string;
@@ -40,7 +40,7 @@ function genComponentStyleHook(componentName, styleFn) {
40
40
  const { getPrefixCls, iconPrefixCls } = import_react.default.useContext(import_design.ConfigProvider.ConfigContext);
41
41
  const rootPrefixCls = getPrefixCls();
42
42
  const componentCls = `.${prefixCls}`;
43
- return (0, import_pro_components.useStyle)(componentName, (token) => {
43
+ return (0, import_pro_components.useStyle)(`OB-${componentName}`, (token) => {
44
44
  const mergedToken = {
45
45
  ...token,
46
46
  componentCls,
package/lib/index.d.ts CHANGED
@@ -40,6 +40,8 @@ export { default as FooterToolbar } from './FooterToolbar';
40
40
  export type { FooterToolbarProps } from './FooterToolbar';
41
41
  export { default as ProTable } from './ProTable';
42
42
  export type { ProTableProps } from './ProTable';
43
+ export { default as ProCard } from './ProCard';
44
+ export type { ProCardProps } from './ProCard';
43
45
  export { default as LightFilter } from './LightFilter';
44
46
  export type { LightFilterProps } from './LightFilter';
45
47
  export { default as Password } from './Password';
package/lib/index.js CHANGED
@@ -53,6 +53,7 @@ __export(src_exports, {
53
53
  PageContainer: () => import_PageContainer.default,
54
54
  PageLoading: () => import_PageLoading.default,
55
55
  Password: () => import_Password.default,
56
+ ProCard: () => import_ProCard.default,
56
57
  ProTable: () => import_ProTable.default,
57
58
  Ranger: () => import_Ranger.default,
58
59
  SideTip: () => import_SideTip.default,
@@ -87,6 +88,7 @@ var import_PageContainer = __toESM(require("./PageContainer"));
87
88
  var import_PageLoading = __toESM(require("./PageLoading"));
88
89
  var import_FooterToolbar = __toESM(require("./FooterToolbar"));
89
90
  var import_ProTable = __toESM(require("./ProTable"));
91
+ var import_ProCard = __toESM(require("./ProCard"));
90
92
  var import_LightFilter = __toESM(require("./LightFilter"));
91
93
  var import_Password = __toESM(require("./Password"));
92
94
  var import_Ranger = __toESM(require("./Ranger"));
@@ -122,6 +124,7 @@ var import_BackgroundTaskManager = __toESM(require("./BackgroundTaskManager"));
122
124
  PageContainer,
123
125
  PageLoading,
124
126
  Password,
127
+ ProCard,
125
128
  ProTable,
126
129
  Ranger,
127
130
  SideTip,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oceanbase/ui",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "The UI library based on OceanBase Design",
5
5
  "keywords": [
6
6
  "oceanbase",
@@ -40,10 +40,10 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@ant-design/cssinjs": "^1.22.1",
43
- "@ant-design/pro-components": "^2.8.2",
43
+ "@ant-design/pro-components": "^2.8.3",
44
44
  "@antv/g6": "3.4.10",
45
- "@oceanbase/design": "^0.4.5",
46
- "@oceanbase/icons": "^0.4.3",
45
+ "@oceanbase/design": "^0.4.6",
46
+ "@oceanbase/icons": "^0.4.4",
47
47
  "@oceanbase/util": "^0.4.2",
48
48
  "ahooks": "^2.10.14",
49
49
  "classnames": "^2.5.1",
@@ -56,20 +56,20 @@
56
56
  "moment": "^2.30.1",
57
57
  "path-to-regexp": "^7.2.0",
58
58
  "randexp": "^0.5.3",
59
- "rc-picker": "^4.8.3",
60
- "rc-util": "^5.44.2",
59
+ "rc-picker": "^4.9.2",
60
+ "rc-util": "^5.44.3",
61
61
  "react-copy-to-clipboard": "^5.1.0",
62
62
  "react-json-view": "^1.21.3",
63
63
  "react-split-pane": "^0.1.92",
64
64
  "screenfull": "^6.0.2"
65
65
  },
66
66
  "devDependencies": {
67
- "@ant-design/pro-form": "^2.31.2",
68
- "@ant-design/pro-layout": "^7.21.2"
67
+ "@ant-design/pro-form": "^2.31.3",
68
+ "@ant-design/pro-layout": "^7.22.0"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "react": ">=16.9.0",
72
72
  "react-dom": ">=16.9.0"
73
73
  },
74
- "gitHead": "400af7f5551196d8e70774caf43a70d3fb5de617"
74
+ "gitHead": "8db06c5cc511bdbbb32a90a93d6d1e1ecd2a6f54"
75
75
  }