@oceanbase/design 0.4.8 → 0.4.9

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 (39) hide show
  1. package/dist/design.min.js +1 -1
  2. package/es/alert/index.d.ts +2 -2
  3. package/es/alert/index.js +13 -3
  4. package/es/button/index.d.ts +1 -1
  5. package/es/config-provider/index.d.ts +1 -1
  6. package/es/config-provider/index.js +7 -6
  7. package/es/descriptions/hooks/useItems.d.ts +6 -6
  8. package/es/dropdown/dropdown-button.d.ts +8 -0
  9. package/es/dropdown/dropdown-button.js +23 -0
  10. package/es/dropdown/index.d.ts +10 -0
  11. package/es/dropdown/index.js +17 -1
  12. package/es/form/FormItem.d.ts +1 -1
  13. package/es/index.d.ts +2 -0
  14. package/es/index.js +1 -0
  15. package/es/list/index.d.ts +1 -1
  16. package/es/modal/Progress.d.ts +1 -1
  17. package/es/table/index.js +3 -1
  18. package/es/table/style/index.js +7 -3
  19. package/es/tooltip/ReactStickyMouseTooltip.d.ts +1 -1
  20. package/lib/alert/index.d.ts +2 -2
  21. package/lib/alert/index.js +21 -2
  22. package/lib/button/index.d.ts +1 -1
  23. package/lib/config-provider/index.d.ts +1 -1
  24. package/lib/config-provider/index.js +6 -4
  25. package/lib/descriptions/hooks/useItems.d.ts +5 -5
  26. package/lib/dropdown/dropdown-button.d.ts +8 -0
  27. package/lib/dropdown/dropdown-button.js +42 -0
  28. package/lib/dropdown/index.d.ts +10 -0
  29. package/lib/dropdown/index.js +27 -1
  30. package/lib/form/FormItem.d.ts +1 -1
  31. package/lib/index.d.ts +2 -0
  32. package/lib/index.js +3 -0
  33. package/lib/list/index.d.ts +1 -1
  34. package/lib/modal/Progress.d.ts +1 -1
  35. package/lib/table/index.d.ts +2 -2
  36. package/lib/table/index.js +3 -1
  37. package/lib/table/style/index.js +9 -3
  38. package/lib/tooltip/ReactStickyMouseTooltip.d.ts +1 -1
  39. package/package.json +2 -2
package/lib/index.d.ts CHANGED
@@ -56,6 +56,8 @@ export { default as Segmented } from './segmented';
56
56
  export type { SegmentedProps } from './segmented';
57
57
  export { default as Breadcrumb } from './breadcrumb';
58
58
  export type { BreadcrumbProps, BreadcrumbItemProps } from './breadcrumb';
59
+ export { default as Dropdown } from './dropdown';
60
+ export type { DropdownProps, DropdownButtonProps, DropdownButtonType } from './dropdown';
59
61
  export { default as Result } from './result';
60
62
  export type { ResultProps, ResultType, ResultStatusType } from './result';
61
63
  export { default as Spin } from './spin';
package/lib/index.js CHANGED
@@ -40,6 +40,7 @@ __export(src_exports, {
40
40
  ConfigProvider: () => import_config_provider.default,
41
41
  Descriptions: () => import_descriptions.default,
42
42
  Drawer: () => import_drawer.default,
43
+ Dropdown: () => import_dropdown.default,
43
44
  Empty: () => import_empty.default,
44
45
  Form: () => import_form.default,
45
46
  Input: () => import_input.default,
@@ -102,6 +103,7 @@ var import_slider = __toESM(require("./slider"));
102
103
  var import_tooltip = __toESM(require("./tooltip"));
103
104
  var import_segmented = __toESM(require("./segmented"));
104
105
  var import_breadcrumb = __toESM(require("./breadcrumb"));
106
+ var import_dropdown = __toESM(require("./dropdown"));
105
107
  var import_result = __toESM(require("./result"));
106
108
  var import_spin = __toESM(require("./spin"));
107
109
  var import_badge = __toESM(require("./badge"));
@@ -122,6 +124,7 @@ var { useToken } = import_theme2.default;
122
124
  ConfigProvider,
123
125
  Descriptions,
124
126
  Drawer,
127
+ Dropdown,
125
128
  Empty,
126
129
  Form,
127
130
  Input,
@@ -1,7 +1,7 @@
1
1
  import type { ListProps } from 'antd/es/list';
2
2
  export * from 'antd/es/list';
3
3
  export * from 'antd/es/list/Item';
4
- declare function List<T>({ pagination, ...restProps }: ListProps<T>): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
4
+ declare function List<T>({ pagination, ...restProps }: ListProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
5
5
  declare namespace List {
6
6
  var Item: import("antd/es/list/Item").ListItemTypeProps;
7
7
  var displayName: string;
@@ -6,5 +6,5 @@ export interface ModalProgressProps extends ModalProps {
6
6
  progress?: ProgressProps;
7
7
  description?: React.ReactNode;
8
8
  }
9
- declare const Progress: ({ prefixCls: customizePrefixCls, className, width, maskClosable, loading, progress, description, footer, ...restProps }: ModalProgressProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
9
+ declare const Progress: ({ prefixCls: customizePrefixCls, className, width, maskClosable, loading, progress, description, footer, ...restProps }: ModalProgressProps) => import("@emotion/react/jsx-runtime").JSX.Element;
10
10
  export default Progress;
@@ -37,8 +37,8 @@ declare const _default: (<RecordType extends AnyObject = AnyObject>(props: Table
37
37
  SELECTION_ALL: "SELECT_ALL";
38
38
  SELECTION_INVERT: "SELECT_INVERT";
39
39
  SELECTION_NONE: "SELECT_NONE";
40
- Column: <RecordType_1 extends import("antd/es/_util/type").AnyObject>(_: import("antd").TableColumnProps<RecordType_1>) => null;
41
- ColumnGroup: <RecordType_2 extends import("antd/es/_util/type").AnyObject>(_: import("antd/es/table/ColumnGroup").ColumnGroupProps<RecordType_2>) => null;
40
+ Column: <RecordType extends import("antd/es/_util/type").AnyObject>(_: import("antd").TableColumnProps<RecordType>) => null;
41
+ ColumnGroup: <RecordType_1 extends import("antd/es/_util/type").AnyObject>(_: import("antd/es/table/ColumnGroup").ColumnGroupProps<RecordType_1>) => null;
42
42
  Summary: typeof Summary;
43
43
  useStyle: (prefixCls: string) => {
44
44
  wrapSSR: (node: ReactNode) => ReactElement<any, string | React.JSXElementConstructor<any>>;
@@ -49,6 +49,7 @@ function Table(props, ref) {
49
49
  var _a, _b;
50
50
  const {
51
51
  locale: customLocale,
52
+ size,
52
53
  columns,
53
54
  footer,
54
55
  pagination: customPagination,
@@ -183,6 +184,7 @@ function Table(props, ref) {
183
184
  ...restLocale,
184
185
  emptyText: /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-empty-wrapper` }, typeof emptyText === "function" ? emptyText() : emptyText)
185
186
  },
187
+ size,
186
188
  columns: newColumns,
187
189
  rowClassName: (...args) => {
188
190
  return (0, import_classnames.default)(
@@ -193,7 +195,7 @@ function Table(props, ref) {
193
195
  );
194
196
  },
195
197
  expandable: expandable ? {
196
- columnWidth: 32,
198
+ columnWidth: !size || size === "large" ? 40 : 32,
197
199
  ...expandable
198
200
  } : void 0,
199
201
  rowSelection: rowSelection ? {
@@ -227,7 +227,7 @@ var genTableStyle = (token) => {
227
227
  [`${componentCls}`]: {
228
228
  [`${componentCls}-tbody`]: {
229
229
  // 去掉斑马纹
230
- [`tr:nth-child(2n):not(${componentCls}-placeholder):not(${componentCls}-row-selected):not(${componentCls}-expanded-row)`]: {
230
+ [`tr:nth-child(n):not(${componentCls}-placeholder):not(${componentCls}-row-selected):not(${componentCls}-expanded-row)`]: {
231
231
  ["& > td"]: {
232
232
  backgroundColor: colorBgBase
233
233
  },
@@ -239,8 +239,11 @@ var genTableStyle = (token) => {
239
239
  },
240
240
  [`${componentCls}-expanded-row > td`]: {
241
241
  // 除内嵌子表格外,设置其他内嵌元素样式
242
- [`& > *:not(${componentCls}-wrapper)`]: {
242
+ [`& > *:not(${componentCls}-wrapper):not(${componentCls}-expanded-row-fixed)`]: {
243
243
  marginLeft: token.marginXL + token.lineWidth * 2
244
+ },
245
+ [`& > *${componentCls}-expanded-row-fixed`]: {
246
+ paddingLeft: token.marginXL + token.lineWidth * 2 + token.padding
244
247
  }
245
248
  },
246
249
  // 嵌套子表格和父表格第一列对齐
@@ -264,8 +267,11 @@ var genTableStyle = (token) => {
264
267
  [`${componentCls}-tbody`]: {
265
268
  [`${componentCls}-expanded-row > td`]: {
266
269
  // 除内嵌子表格外,设置其他内嵌元素样式
267
- [`& > *:not(${componentCls}-wrapper)`]: {
270
+ [`& > *:not(${componentCls}-wrapper):not(${componentCls}-expanded-row-fixed)`]: {
268
271
  marginLeft: token.marginXL + token.marginXL + token.lineWidth * 2
272
+ },
273
+ [`& > *${componentCls}-expanded-row-fixed`]: {
274
+ paddingLeft: token.marginXL + token.marginXL + token.lineWidth * 2 + token.padding
269
275
  }
270
276
  },
271
277
  // 嵌套子表格和父表格第一列对齐
@@ -35,6 +35,6 @@ declare class ReactStickyMouseTooltip extends React.PureComponent<ReactStickyMou
35
35
  addListener: () => void;
36
36
  removeListener: () => void;
37
37
  updateListener: () => void;
38
- render(): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
38
+ render(): import("@emotion/react/jsx-runtime").JSX.Element;
39
39
  }
40
40
  export default ReactStickyMouseTooltip;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oceanbase/design",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "description": "The Design System of OceanBase",
5
5
  "keywords": [
6
6
  "oceanbase",
@@ -65,5 +65,5 @@
65
65
  "react": ">=16.9.0",
66
66
  "react-dom": ">=16.9.0"
67
67
  },
68
- "gitHead": "617efa9eb09833f74f0ab0065467b556b5b6843e"
68
+ "gitHead": "b9a6e4edde09d388777caade3586a12ddf51779e"
69
69
  }