@oceanbase/design 0.2.25 → 0.2.27

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 (78) hide show
  1. package/dist/design.min.js +1 -1
  2. package/es/_util/type.d.ts +4 -0
  3. package/es/_util/type.js +1 -0
  4. package/es/badge/index.d.ts +3 -4
  5. package/es/badge/index.js +7 -3
  6. package/es/button/index.d.ts +2 -4
  7. package/es/button/index.js +7 -5
  8. package/es/card/index.d.ts +2 -4
  9. package/es/card/index.js +7 -5
  10. package/es/config-provider/index.js +9 -11
  11. package/es/drawer/Drawer.d.ts +18 -0
  12. package/es/drawer/Drawer.js +69 -0
  13. package/es/drawer/index.d.ts +2 -0
  14. package/es/drawer/index.js +3 -1
  15. package/es/drawer/style/index.d.ts +9 -0
  16. package/es/drawer/style/index.js +31 -0
  17. package/es/index.d.ts +2 -1
  18. package/es/index.js +1 -0
  19. package/es/modal/style/index.js +3 -2
  20. package/es/select/index.d.ts +8 -2
  21. package/es/select/index.js +6 -6
  22. package/es/spin/index.js +1 -0
  23. package/es/static-function/index.d.ts +1 -1
  24. package/es/static-function/index.js +2 -2
  25. package/es/table/index.d.ts +17 -12
  26. package/es/table/index.js +19 -16
  27. package/es/tag/index.d.ts +2 -4
  28. package/es/tag/index.js +7 -5
  29. package/es/theme/dark.d.ts +56 -0
  30. package/es/theme/dark.js +10 -0
  31. package/es/theme/default.d.ts +94 -72
  32. package/es/theme/default.js +95 -72
  33. package/es/theme/index.d.ts +8 -13
  34. package/es/theme/index.js +15 -20
  35. package/es/theme/style/compact.less +211 -186
  36. package/es/theme/style/dark.less +194 -169
  37. package/es/theme/style/default.less +208 -183
  38. package/es/tooltip/index.d.ts +2 -2
  39. package/es/tooltip/index.js +3 -2
  40. package/lib/_util/type.d.ts +4 -0
  41. package/lib/_util/type.js +17 -0
  42. package/lib/badge/index.d.ts +3 -4
  43. package/lib/badge/index.js +56 -51
  44. package/lib/button/index.d.ts +2 -4
  45. package/lib/button/index.js +15 -10
  46. package/lib/card/index.d.ts +2 -4
  47. package/lib/card/index.js +40 -34
  48. package/lib/config-provider/index.js +8 -15
  49. package/lib/drawer/Drawer.d.ts +18 -0
  50. package/lib/drawer/Drawer.js +85 -0
  51. package/lib/drawer/index.d.ts +2 -0
  52. package/lib/drawer/index.js +19 -0
  53. package/lib/drawer/style/index.d.ts +9 -0
  54. package/lib/drawer/style/index.js +60 -0
  55. package/lib/index.d.ts +2 -1
  56. package/lib/index.js +3 -0
  57. package/lib/modal/style/index.js +3 -2
  58. package/lib/select/index.d.ts +8 -2
  59. package/lib/select/index.js +14 -10
  60. package/lib/spin/index.js +1 -0
  61. package/lib/static-function/index.d.ts +1 -1
  62. package/lib/static-function/index.js +1 -1
  63. package/lib/table/index.d.ts +17 -12
  64. package/lib/table/index.js +17 -14
  65. package/lib/tag/index.d.ts +2 -4
  66. package/lib/tag/index.js +25 -28
  67. package/lib/theme/dark.d.ts +56 -0
  68. package/lib/theme/dark.js +44 -0
  69. package/lib/theme/default.d.ts +94 -72
  70. package/lib/theme/default.js +94 -71
  71. package/lib/theme/index.d.ts +8 -13
  72. package/lib/theme/index.js +27 -21
  73. package/lib/theme/style/compact.less +211 -186
  74. package/lib/theme/style/dark.less +194 -169
  75. package/lib/theme/style/default.less +208 -183
  76. package/lib/tooltip/index.d.ts +2 -2
  77. package/lib/tooltip/index.js +83 -80
  78. package/package.json +6 -4
@@ -22,75 +22,98 @@ __export(default_exports, {
22
22
  default: () => default_default
23
23
  });
24
24
  module.exports = __toCommonJS(default_exports);
25
- var default_default = {
26
- colorPrimaryBg: "#EAF1FF",
27
- colorPrimary: "#006AFF",
28
- colorPrimaryBgHover: "#EAF1FF",
29
- colorPrimaryBorder: "#B3CCFF",
30
- colorPrimaryBorderHover: "#5189FB",
31
- colorPrimaryHover: "#5189FB",
32
- colorPrimaryTextHover: "#5189FB",
33
- colorPrimaryText: "#006AFF",
34
- colorPrimaryTextActive: "#004CE6",
35
- colorSuccess: "#0ac185",
36
- colorSuccessBg: "#EEF8F5",
37
- colorSuccessBgHover: "#B3E6D5",
38
- colorSuccessBorder: "#B3E6D5",
39
- colorSuccessBorderHover: "#4DCCA2",
40
- colorSuccessHover: "#4DCCA2",
41
- colorSuccessActive: "#00B378",
42
- colorSuccessTextHover: "#4DCCA2",
43
- colorSuccessText: "#0AC185",
44
- colorSuccessTextActive: "#00B378",
45
- colorWarning: "#ffac33",
46
- colorWarningBg: "#FFF5E5",
47
- colorWarningBgHover: "#FFD699",
48
- colorWarningBorder: "#FFD699",
49
- colorWarningBorderHover: "#FFC166",
50
- colorWarningHover: "#FFC166",
51
- colorWarningActive: "#FF9700",
52
- colorWarningTextHover: "#FFC166",
53
- colorWarningText: "#FFAC33",
54
- colorWarningTextActive: "#FF9700",
55
- colorErrorBg: "#FFEBEB",
56
- colorErrorBgHover: "#FFB3B3",
57
- colorErrorBorder: "#FFB3B3",
58
- colorErrorBorderHover: "#FF8080",
59
- colorErrorHover: "#FF8080",
60
- colorErrorActive: "#EC1313",
61
- colorErrorTextHover: "#FF8080",
62
- colorErrorText: "#FF4B4B",
63
- colorErrorTextActive: "#EC1313",
64
- colorError: "#ff4b4b",
65
- colorInfo: "#006aff",
66
- colorInfoBg: "#EAF1FF",
67
- colorInfoBgHover: "#EAF1FF",
68
- colorInfoBorder: "#B3CCFF",
69
- colorInfoBorderHover: "#5189FB",
70
- colorInfoHover: "#5189FB",
71
- colorInfoActive: "#004CE6",
72
- colorInfoTextHover: "#5189FB",
73
- colorInfoText: "#006AFF",
74
- colorInfoTextActive: "#004CE6",
75
- colorTextBase: "#132039",
76
- colorBgBase: "#ffffff",
77
- colorText: "#132039",
78
- colorTextSecondary: "#364563",
79
- colorTextQuaternary: "#CDD5E4",
80
- colorTextTertiary: "#8592AD",
81
- colorBgContainer: "#ffffff",
82
- colorBgLayout: "#F5F8FE",
83
- colorBgSpotlight: "rgba(19, 32, 57, 0.85)",
84
- colorBgMask: "rgba(19, 32, 57, 0.65)",
85
- colorBorder: "#CDD5E4",
86
- colorBorderSecondary: "#E2E8F3",
87
- colorFillQuaternary: "#F8FAFE",
88
- colorFillTertiary: "#F5F8FE",
89
- colorFillSecondary: "#F5F8FE",
90
- colorFill: "#F5F8FE",
91
- boxShadowSecondary: "0 6px 16px 0 rgba(54, 69, 99, 0.08), 0 3px 6px -4px rgba(54, 69, 99, 0.12), 0 9px 28px 8px rgba(54, 69, 99, 0.05)",
92
- boxShadow: "0 1px 2px 0 rgba(54, 69, 99, 0.03), 0 1px 6px -1px rgba(54, 69, 99, 0.02), 0 2px 4px 0 rgba(54, 69, 99, 0.02)",
93
- borderRadius: 6,
94
- wireframe: false,
95
- colorPrimaryActive: "#004CE6"
25
+ var defaultTheme = {
26
+ token: {
27
+ colorPrimaryBg: "#EAF1FF",
28
+ colorPrimary: "#006AFF",
29
+ colorPrimaryBgHover: "#EAF1FF",
30
+ colorPrimaryBorder: "#B3CCFF",
31
+ colorPrimaryBorderHover: "#5189FB",
32
+ colorPrimaryHover: "#5189FB",
33
+ colorPrimaryTextHover: "#5189FB",
34
+ colorPrimaryText: "#006AFF",
35
+ colorPrimaryTextActive: "#004CE6",
36
+ colorSuccess: "#0ac185",
37
+ colorSuccessBg: "#EEF8F5",
38
+ colorSuccessBgHover: "#B3E6D5",
39
+ colorSuccessBorder: "#B3E6D5",
40
+ colorSuccessBorderHover: "#4DCCA2",
41
+ colorSuccessHover: "#4DCCA2",
42
+ colorSuccessActive: "#00B378",
43
+ colorSuccessTextHover: "#4DCCA2",
44
+ colorSuccessText: "#0AC185",
45
+ colorSuccessTextActive: "#00B378",
46
+ colorWarning: "#ffac33",
47
+ colorWarningBg: "#FFF5E5",
48
+ colorWarningBgHover: "#FFD699",
49
+ colorWarningBorder: "#FFD699",
50
+ colorWarningBorderHover: "#FFC166",
51
+ colorWarningHover: "#FFC166",
52
+ colorWarningActive: "#FF9700",
53
+ colorWarningTextHover: "#FFC166",
54
+ colorWarningText: "#FFAC33",
55
+ colorWarningTextActive: "#FF9700",
56
+ colorErrorBg: "#FFEBEB",
57
+ colorErrorBgHover: "#FFB3B3",
58
+ colorErrorBorder: "#FFB3B3",
59
+ colorErrorBorderHover: "#FF8080",
60
+ colorErrorHover: "#FF8080",
61
+ colorErrorActive: "#EC1313",
62
+ colorErrorTextHover: "#FF8080",
63
+ colorErrorText: "#FF4B4B",
64
+ colorErrorTextActive: "#EC1313",
65
+ colorError: "#ff4b4b",
66
+ colorInfo: "#006aff",
67
+ colorInfoBg: "#EAF1FF",
68
+ colorInfoBgHover: "#EAF1FF",
69
+ colorInfoBorder: "#B3CCFF",
70
+ colorInfoBorderHover: "#5189FB",
71
+ colorInfoHover: "#5189FB",
72
+ colorInfoActive: "#004CE6",
73
+ colorInfoTextHover: "#5189FB",
74
+ colorInfoText: "#006AFF",
75
+ colorInfoTextActive: "#004CE6",
76
+ colorTextBase: "#132039",
77
+ colorBgBase: "#ffffff",
78
+ colorText: "#132039",
79
+ colorTextSecondary: "#5C6B8A",
80
+ colorTextQuaternary: "#ABB7CF",
81
+ colorTextTertiary: "#8592AD",
82
+ colorBgContainer: "#ffffff",
83
+ colorBgLayout: "#F8FAFE",
84
+ colorBgSpotlight: "rgba(19, 32, 57, 0.8)",
85
+ colorBgMask: "rgba(19, 32, 57, 0.6)",
86
+ colorBorder: "#CDD5E4",
87
+ colorBorderSecondary: "#E2E8F3",
88
+ colorFillQuaternary: "#F8FAFE",
89
+ colorFillTertiary: "#F8FAFE",
90
+ colorFillSecondary: "#F3F6FC",
91
+ colorFill: "#E2E8F3",
92
+ boxShadowSecondary: "0 6px 16px 0 rgba(54, 69, 99, 0.08), 0 3px 6px -4px rgba(54, 69, 99, 0.12), 0 9px 28px 8px rgba(54, 69, 99, 0.05)",
93
+ boxShadow: "0 1px 2px 0 rgba(54, 69, 99, 0.03), 0 1px 6px -1px rgba(54, 69, 99, 0.02), 0 2px 4px 0 rgba(54, 69, 99, 0.02)",
94
+ borderRadius: 6,
95
+ wireframe: false,
96
+ colorPrimaryActive: "#004CE6"
97
+ },
98
+ components: {
99
+ Dropdown: {
100
+ colorError: "#FF4B4B"
101
+ },
102
+ Button: {
103
+ borderRadius: 6
104
+ },
105
+ Segmented: {
106
+ itemColor: "#5C6B8A",
107
+ itemHoverColor: "#132039",
108
+ itemHoverBg: "#ffffff"
109
+ },
110
+ Rate: {
111
+ colorFillContent: "#E2E8F3",
112
+ colorText: "#F20000"
113
+ },
114
+ InputNumber: {
115
+ handleVisible: true
116
+ }
117
+ }
96
118
  };
119
+ var default_default = defaultTheme;
@@ -1,17 +1,12 @@
1
- export * from 'antd/es/theme/internal';
2
- export * from 'antd/es/theme';
1
+ export * from 'antd/lib/theme/internal';
2
+ export * from 'antd/lib/theme';
3
3
  declare const _default: {
4
4
  defaultSeed: {
5
5
  colorPrimary: string;
6
- colorInfo: string;
7
6
  colorSuccess: string;
8
7
  colorWarning: string;
9
8
  colorError: string;
10
- borderRadius: number;
11
- blue: string;
12
- green: string;
13
- yellow: string;
14
- red: string;
9
+ colorInfo: string;
15
10
  colorTextBase: string;
16
11
  colorBgBase: string;
17
12
  colorLink: string;
@@ -20,6 +15,7 @@ declare const _default: {
20
15
  fontSize: number;
21
16
  lineWidth: number;
22
17
  lineType: string;
18
+ borderRadius: number;
23
19
  sizeUnit: number;
24
20
  sizeStep: number;
25
21
  sizePopupArrow: number;
@@ -39,11 +35,15 @@ declare const _default: {
39
35
  motionEaseOut: string;
40
36
  wireframe: boolean;
41
37
  motion: boolean;
38
+ blue: string;
42
39
  purple: string;
43
40
  cyan: string;
41
+ green: string;
44
42
  magenta: string;
45
43
  pink: string;
44
+ red: string;
46
45
  orange: string;
46
+ yellow: string;
47
47
  volcano: string;
48
48
  geekblue: string;
49
49
  lime: string;
@@ -56,11 +56,6 @@ declare const _default: {
56
56
  };
57
57
  hashed: boolean;
58
58
  };
59
- components: {
60
- InputNumber: {
61
- handleVisible: true;
62
- };
63
- };
64
59
  useToken: () => {
65
60
  theme: import("@ant-design/cssinjs").Theme<import("antd/es/theme/internal").SeedToken, import("antd/es/theme/interface").MapToken>;
66
61
  token: import("antd").GlobalToken;
@@ -1,6 +1,8 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
4
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
7
  var __export = (target, all) => {
6
8
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  return to;
16
18
  };
17
19
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/theme/index.ts
@@ -24,36 +34,32 @@ __export(theme_exports, {
24
34
  });
25
35
  module.exports = __toCommonJS(theme_exports);
26
36
  var import_antd = require("antd");
27
- __reExport(theme_exports, require("antd/es/theme/internal"), module.exports);
28
- __reExport(theme_exports, require("antd/es/theme"), module.exports);
37
+ var import_lodash = require("lodash");
38
+ var import_default = __toESM(require("./default"));
39
+ __reExport(theme_exports, require("antd/lib/theme/internal"), module.exports);
40
+ __reExport(theme_exports, require("antd/lib/theme"), module.exports);
41
+ var seedTokenKeys = Object.keys(import_antd.theme.defaultSeed);
42
+ var seedToken = {
43
+ ...(0, import_lodash.pick)(import_default.default.token, seedTokenKeys),
44
+ // some special seed token should set to ''
45
+ // ref: https://github.com/ant-design/ant-design/blob/master/components/theme/themes/seed.ts#L32
46
+ colorBgBase: "",
47
+ colorTextBase: "",
48
+ colorLink: ""
49
+ };
29
50
  var defaultSeed = {
30
51
  ...import_antd.theme.defaultSeed,
31
- colorPrimary: "#006AFF",
32
- colorInfo: "#006aff",
33
- colorSuccess: "#0ac185",
34
- colorWarning: "#ffac33",
35
- colorError: "#ff4b4b",
36
- borderRadius: 6,
37
- // 以下四种预设颜色和语义色保持一致
38
- blue: "#006aff",
39
- green: "#0ac185",
40
- yellow: "#ffac33",
41
- red: "#ff4b4b"
52
+ ...seedToken
42
53
  };
43
54
  var defaultConfig = import_antd.theme.defaultConfig;
44
55
  defaultConfig.token = defaultSeed;
45
56
  var theme_default = {
46
57
  ...import_antd.theme,
47
58
  defaultSeed,
48
- defaultConfig,
49
- components: {
50
- InputNumber: {
51
- handleVisible: true
52
- }
53
- }
59
+ defaultConfig
54
60
  };
55
61
  // Annotate the CommonJS export names for ESM import in node:
56
62
  0 && (module.exports = {
57
- ...require("antd/es/theme/internal"),
58
- ...require("antd/es/theme")
63
+ ...require("antd/lib/theme/internal"),
64
+ ...require("antd/lib/theme")
59
65
  });