Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Branch] chore(merge): Merge master branch of v0.3.4 #590

Merged
merged 11 commits into from
May 11, 2024
4 changes: 4 additions & 0 deletions .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ export default defineConfig({
{ title: 'Typography 排版', link: '/components/typography' },
],
},
{
title: '导航',
children: [{ title: 'Breadcrumb 面包屑', link: '/components/breadcrumb' }],
},
{
title: '布局',
children: [
Expand Down
7 changes: 7 additions & 0 deletions docs/design/design-CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ group: 基础组件

---

## 0.3.4

`2024-05-11`

- 💄 优化 Empty 步骤提示的背景颜色,以对齐设计规范。[#586](https://github.com/oceanbase/oceanbase-design/pull/587)
- 💄 将 Breadcrumb 字体大小改为 12px,以对齐设计规范。[#587](https://github.com/oceanbase/oceanbase-design/pull/587)

## 0.3.3

`2024-04-25`
Expand Down
6 changes: 6 additions & 0 deletions docs/ui/ui-CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ group: 业务组件

---

## 0.3.4

`2024-05-11`

- 💄 调整 PageContainer 刷新图标的大小和间距,以对齐设计规范。[#588](https://github.com/oceanbase/oceanbase-design/pull/588)

## 0.3.3

`2024-04-25`
Expand Down
2 changes: 1 addition & 1 deletion packages/codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oceanbase/codemod",
"version": "0.3.2",
"version": "0.3.3",
"description": "Codemod for OceanBase Design upgrade",
"keywords": [
"oceanbase",
Expand Down
2 changes: 1 addition & 1 deletion packages/design/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oceanbase/design",
"version": "0.3.3",
"version": "0.3.4",
"description": "The Design System of OceanBase",
"keywords": [
"oceanbase",
Expand Down
22 changes: 22 additions & 0 deletions packages/design/src/breadcrumb/demo/basic.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';
import { Breadcrumb } from '@oceanbase/design';

const App: React.FC = () => (
<Breadcrumb
items={[
{
href: '',
title: 'User',
},
{
href: '',
title: 'User List',
},
{
title: 'User Detail',
},
]}
/>
);

export default App;
28 changes: 28 additions & 0 deletions packages/design/src/breadcrumb/demo/icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from 'react';
import { Breadcrumb } from '@oceanbase/design';
import { UserOutlined } from '@oceanbase/icons';

const App: React.FC = () => (
<Breadcrumb
items={[
{
href: '',
title: (
<>
<UserOutlined />
<span>User</span>
</>
),
},
{
href: '',
title: 'User List',
},
{
title: 'User Detail',
},
]}
/>
);

export default App;
45 changes: 45 additions & 0 deletions packages/design/src/breadcrumb/demo/menu.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import React, { useState } from 'react';
import { Breadcrumb } from '@oceanbase/design';

const App: React.FC = () => {
const [selectedKey, setSelectedKey] = useState('1');
const menuItems = [
{
key: '1',
label: 'Jackson',
},
{
key: '2',
label: 'John',
},
{
key: '3',
label: 'Lucy',
},
];
return (
<Breadcrumb
items={[
{
href: '',
title: 'User',
},
{
title: 'User List',
},
{
title: menuItems.find(item => item.key === selectedKey).label,
menu: {
items: menuItems,
selectedKeys: [selectedKey],
onClick: ({ key }) => {
setSelectedKey(key);
},
},
},
]}
/>
);
};

export default App;
22 changes: 22 additions & 0 deletions packages/design/src/breadcrumb/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Breadcrumb 面包屑
nav:
title: 基础组件
path: /components
demo:
cols: 2
---

- 🔥 完全继承 antd [Breadcrumb](https://ant.design/components/breadcrumb-cn) 的能力和 API,可无缝切换。
- 💄 定制主题和样式,符合 OceanBase Design 设计规范。

## 代码演示

<!-- prettier-ignore -->
<code src="./demo/basic.tsx" title="基本"></code>
<code src="./demo/icon.tsx" title="带图标"></code>
<code src="./demo/menu.tsx" title="带下拉菜单"></code>

## API

- 详见 antd Breadcrumb 文档: https://ant.design/components/breadcrumb-cn
2 changes: 1 addition & 1 deletion packages/design/src/cascader/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ demo:

## API

- 详见 antd InputNumber 文档: https://ant.design/components/input-number-cn
- 详见 antd Cascader 文档: https://ant.design/components/cascader-cn
7 changes: 4 additions & 3 deletions packages/design/src/empty/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,16 @@ export const genEmptyStyle: GenerateStyle<EmptyToken> = (token: EmptyToken): CSS
[`${antCls}-steps`]: {
marginTop: token.margin,
padding: token.paddingLG,
backgroundColor: colorBgLayout,
backgroundColor: token.colorFillQuaternary,
borderRadius: token.borderRadiusLG,
[`${antCls}-steps-item-container`]: {
[`${antCls}-steps-item-icon`]: {
height: token.controlHeightSM,
width: token.controlHeightSM,
lineHeight: `${token.controlHeightSM}px`,
backgroundColor: colorFill,
borderColor: colorFill,
backgroundColor: token.colorFillSecondary,
// override default border color
borderColor: token.colorFillSecondary,
[`${antCls}-steps-icon`]: {
color: colorTextSecondary,
fontSize: token.fontSize,
Expand Down
6 changes: 6 additions & 0 deletions packages/design/src/theme/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ const defaultTheme: ThemeConfig = {
wireframe: false,
},
components: {
Breadcrumb: {
fontSize: 12,
// @ts-ignore
// fontHeight is internal token
fontHeight: 20,
},
InputNumber: {
handleVisible: true,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oceanbase/ui",
"version": "0.3.3",
"version": "0.3.4",
"description": "The UI library based on OceanBase Design",
"keywords": [
"oceanbase",
Expand Down
Loading
Loading