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.4.3 and v0.4.4 #893

Merged
merged 40 commits into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
0f1a4ee
feat(ui): [action] support e param for on-click
wzc520pyfm Dec 6, 2024
827b0aa
fix(design): should remove cell border for normal Table
dengfuping Dec 10, 2024
44db14e
Merge pull request #879 from oceanbase/dengfuping-dev
dengfuping Dec 10, 2024
713348d
improve(design): Table bordered style
dengfuping Dec 10, 2024
b187e59
Merge pull request #880 from oceanbase/dengfuping-dev
dengfuping Dec 10, 2024
1a1ee1a
fix(ui): multiple Select should vertical align in PageContainer extra
dengfuping Dec 10, 2024
501e330
Merge pull request #881 from oceanbase/dengfuping-dev
dengfuping Dec 10, 2024
28eb6b6
feat(design): New Collapse
dengfuping Dec 11, 2024
b0dbdd2
Merge pull request #882 from oceanbase/dengfuping-dev
dengfuping Dec 11, 2024
d4a6136
improve(ui): cusor style for DateRanger
dengfuping Dec 11, 2024
3fe0e77
optimize(ui): dynamic import @antv/g6 for load perf
dengfuping Dec 11, 2024
2d12011
Merge pull request #883 from oceanbase/dengfuping-dev
dengfuping Dec 11, 2024
c5fb240
Merge pull request #884 from oceanbase/dengfuping-dev
dengfuping Dec 11, 2024
495201a
fix(ui): [date-ranger]: remove range picker icon
Dec 12, 2024
63ec084
fix(ui): [date-ranger]: forward btn is no longer disabled & update te…
Dec 12, 2024
95d669e
fix(ui): [date-ranger]: refresh is not supported when custom label is…
Dec 12, 2024
eff38b7
fix(ui): [date-ranger]: fix style missing
Dec 12, 2024
7c5eaa9
feat(ui): [date-ranger]: add hover style
Dec 12, 2024
af02857
feat(ui): [date-ranger]: add quick time operation tooltip
Dec 12, 2024
11e4643
feat(ui): [date-ranger]: time picker does not support cleared
Dec 12, 2024
5da56b2
feat(ui): [date-ranger]: support english date format
Dec 12, 2024
9f10edc
feat(ui): [date-ranger]: add min width is 1120
Dec 12, 2024
73f303f
optimize(build): Add sideEffects for tree shaking
dengfuping Dec 13, 2024
115110d
Merge pull request #886 from oceanbase/dengfuping-dev
dengfuping Dec 13, 2024
a86f2ba
improve(ui): ContentWithQuestion icon color
dengfuping Dec 13, 2024
adddcfa
fix(site): show code and debug for demo should work
dengfuping Dec 13, 2024
0963c1f
Merge pull request #887 from oceanbase/dengfuping-dev
dengfuping Dec 13, 2024
50361ac
Merge pull request #888 from oceanbase/dengfuping-dev
dengfuping Dec 13, 2024
6206ef7
improve(ui): DateRanger border-radius style
dengfuping Dec 14, 2024
f3bc49c
Merge pull request #885 from oceanbase/fix/date-ranger-desgin
dengfuping Dec 14, 2024
17bca6f
fix(ci): ContentWithQuestionToken type definition should be correct
dengfuping Dec 14, 2024
05934b8
Merge pull request #874 from wzc520pyfm/feat/support-e-for-action
dengfuping Dec 14, 2024
60e7fe3
Merge branch 'master' of github.com:oceanbase/oceanbase-design into d…
dengfuping Dec 14, 2024
8a93c56
fix(ci): Action ts error
dengfuping Dec 14, 2024
3e82320
Merge pull request #889 from oceanbase/dengfuping-dev
dengfuping Dec 14, 2024
efca0dd
improve(design): Table empty height in Popover and Tooltip
dengfuping Dec 14, 2024
76de7b0
Merge pull request #891 from oceanbase/dengfuping-dev-master
dengfuping Dec 14, 2024
31c6a4b
chore(docs): Add changelog for @oceanbase/[email protected] and @oceanbase…
dengfuping Dec 14, 2024
6c3b1da
Merge pull request #892 from oceanbase/dengfuping-dev-master
dengfuping Dec 14, 2024
c2d5b32
Publish
dengfuping Dec 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .dumi/theme/builtins/DemoWrapper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ const DemoWrapper: typeof DumiDemoGrid = ({ items }) => {
(acc, item) => {
const { previewerProps } = item;
const { debug } = previewerProps;
console.log(debug);

if (debug && !showDebug) return acc;

return acc.concat({
...item,
previewerProps: {
...previewerProps,
expand: expandAll,
defaultShowCode: expandAll,
/**
* extra marker for the original debug
*/
Expand Down Expand Up @@ -66,7 +65,9 @@ const DemoWrapper: typeof DumiDemoGrid = ({ items }) => {
</Tooltip>
<Tooltip
title={
<FormattedMessage id={`app.component.examples.${showDebug ? 'hide' : 'visible'}`} />
<FormattedMessage
id={showDebug ? 'app.component.examples.hide' : 'app.component.examples.visible'}
/>
}
>
{showDebug ? (
Expand Down
1 change: 1 addition & 0 deletions .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export default defineConfig({
title: '数据展示',
children: [
{ title: 'Card 卡片', link: '/components/card' },
{ title: 'Collapse 折叠面板', link: '/components/collapse' },
{ title: 'Descriptions 描述列表', link: '/components/descriptions' },
{ title: 'Empty 空状态', link: '/components/empty' },
{ title: 'List 列表', link: '/components/list' },
Expand Down
16 changes: 16 additions & 0 deletions docs/design/design-CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ group: 基础组件

---

## 0.4.3

`2024-12-14`

- 📖 修复 demo 展开全部代码不生效的问题。[#888](https://github.com/oceanbase/oceanbase-design/pull/888)
- 📖 修复部分组件不展示 demo 操作栏的问题。[#888](https://github.com/oceanbase/oceanbase-design/pull/888)
- ⚡ 设置 `sideEffects`,以支持 tree shaking。[#886](https://github.com/oceanbase/oceanbase-design/pull/886)
- Collapse [#882](https://github.com/oceanbase/oceanbase-design/pull/882)
- 📖 新增 Collapse 的文档和示例。
- 💄 将 Collapse 默认展开图标改为实心箭头。
- 💄 弱化 Collapse 边框,将边框颜色改为 `#E2E8F3`。
- Table
- 🐞 修复普通 Table 的单元格出现底部边框的问题。[#879](https://github.com/oceanbase/oceanbase-design/pull/879)
- 💄 优化 Table 带边框时的底部圆角样式。[#880](https://github.com/oceanbase/oceanbase-design/pull/880)
- 💄 优化 Table 空状态在 Popover、Tooltip 下的高度。[#891](https://github.com/oceanbase/oceanbase-design/pull/891)

## 0.4.2

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

---

## 0.4.4

`2024-12-14`

- ⚡ 设置 `sideEffects`,以支持 tree shaking。[#886](https://github.com/oceanbase/oceanbase-design/pull/886)
- ⚡ TaskGraph 依赖的 `@antv/g6` 改为动态加载,以提升加载性能。[#884](https://github.com/oceanbase/oceanbase-design/pull/884)
- ⭐️ 优化 DateRanger 的交互和样式: [#885](https://github.com/oceanbase/oceanbase-design/pull/885) [@wzc520pyfm](https://github.com/wzc520pyfm)
- 移除时间 icon
- 不再禁用后退时间按钮
- 刷新时间按钮在选中自定义时间时隐藏
- 时间组件添加 hover 样式、优化
- 前进/后退时间按钮添加 tooltip
- 时间选择组件不支持清空值
- 优化选择框圆角、按钮组边框和快速选项的字体颜色
- 支持英文格式日期时间
- 优化 DateRanger 的鼠标样式 [#883](https://github.com/oceanbase/oceanbase-design/pull/883)
- 🆕 Action 组件 `onClick` 函数增加 event 参数。[#874](https://github.com/oceanbase/oceanbase-design/pull/874)
- 🐞 修复 PageContainer 右上角操作区 Select 多选框没有垂直居中的问题。[#881](https://github.com/oceanbase/oceanbase-design/pull/881)
- 💄 优化 ContentWithQuestion 问号图标的颜色。[#887](https://github.com/oceanbase/oceanbase-design/pull/887)

## 0.4.3

`2024-12-02`
Expand Down
7 changes: 6 additions & 1 deletion packages/charts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oceanbase/charts",
"version": "0.4.1",
"version": "0.4.2",
"description": "The Chart library for OceanBase",
"homepage": "https://github.com/oceanbase/oceanbase-design/packages/charts",
"repository": {
Expand All @@ -23,6 +23,11 @@
"README.md",
"LICENSE"
],
"sideEffects": [
"**/*.less",
"**/*.css",
"es/index.js"
],
"scripts": {
"build": "NODE_OPTIONS=--max_old_space_size=4096 father build"
},
Expand Down
5 changes: 1 addition & 4 deletions packages/charts/src/Pie/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ nav:

## 代码演示

<!-- prettier-ignore -->
<code src="./demo/pie.tsx" title="基础饼图"></code>

<code src="./demo/donut.tsx" title="基础环图"></code>

<code src="./demo/donut-floor.tsx" title="环图-浮点数精度" debug></code>

<code src="./demo/half-donut.tsx" title="半圆环图"></code>

<code src="./demo/state-change.tsx" title="useMemo-状态改变" debug></code>

## API
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.4.2",
"version": "0.4.3",
"description": "Codemod for OceanBase Design upgrade",
"keywords": [
"oceanbase",
Expand Down
7 changes: 6 additions & 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.4.2",
"version": "0.4.3",
"description": "The Design System of OceanBase",
"keywords": [
"oceanbase",
Expand Down Expand Up @@ -30,6 +30,11 @@
"README.md",
"LICENSE"
],
"sideEffects": [
"**/*.less",
"**/*.css",
"es/index.js"
],
"scripts": {
"build": "father build && cp src/style/reset.css dist/"
},
Expand Down
4 changes: 4 additions & 0 deletions packages/design/src/_util/genStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ export const genLargeStyle = (token: FullToken<any>): CSSObject => {
fontSize,
},
},
[`${antCls}-select-multiple ${antCls}-select-selection-wrap`]: {
// ref: https://github.com/oceanbase/oceanbase-design/pull/881
height: '100%',
},
// Input
[`${antCls}-input-wrapper`]: {
fontSize,
Expand Down
1 change: 1 addition & 0 deletions packages/design/src/card/demo/grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const App: React.FC = () => (
<Card.Grid style={gridStyle}>Content</Card.Grid>
<Card.Grid style={gridStyle}>Content</Card.Grid>
<Card.Grid style={gridStyle}>Content</Card.Grid>
<Card.Grid style={gridStyle}>Content</Card.Grid>
</Card>
);

Expand Down
10 changes: 2 additions & 8 deletions packages/design/src/card/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,15 @@ nav:

## 代码演示

<!-- prettier-ignore -->
<code src="./demo/basic.tsx" title="典型卡片" description="包含标题、内容、操作区域。"></code>

<code src="./demo/border-less.tsx" title="无边框" description="带有阴影,通常位于灰色背景之上。"></code>

<code src="./demo/no-divider.tsx" title="无分割线" description="去掉卡片头部和内容区的分割线。"></code>

<code src="./demo/inner.tsx" title="嵌套卡片" description="多层级展示,支持多种内部卡片样式。"></code>

<code src="./demo/grid.tsx" title="网格型内嵌卡片"></code>

<code src="./demo/tabs.tsx" title="带页签的卡片" description="页签可设置选项卡后面的标签。"></code>

<code src="./demo/config-provider.tsx" title="ConfigProvider" description="用于调试内部的 ConfigProvider 是否表现正常,需要连续触发 2 次及以上,观察第二个弹窗是否正常展示" debug></code>

<code src="../table/demo/card-table.tsx" title="和 Table 组合使用"></code>
<code src="./demo/config-provider.tsx" title="ConfigProvider" description="用于调试内部的 ConfigProvider 是否表现正常,需要连续触发 2 次及以上,观察第二个弹窗是否正常展示" debug></code>

## API

Expand Down
34 changes: 34 additions & 0 deletions packages/design/src/collapse/demo/accordion.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react';
import type { CollapseProps } from '@oceanbase/design';
import { Collapse } from '@oceanbase/design';

const text =
'This is long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long panel content.';

const items: CollapseProps['items'] = [
{
key: '1',
label: 'This is panel header 1',
children: <p>{text}</p>,
},
{
key: '2',
label: 'This is panel header 2',
children: <p>{text}</p>,
},
{
key: '3',
label: 'This is panel header 3',
children: <p>{text}</p>,
},
];

const App: React.FC = () => {
const onChange = (key: string | string[]) => {
console.log(key);
};

return <Collapse accordion items={items} onChange={onChange} />;
};

export default App;
47 changes: 47 additions & 0 deletions packages/design/src/collapse/demo/basic.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React from 'react';
import type { CollapseProps } from '@oceanbase/design';
import { Collapse } from '@oceanbase/design';
import { SettingOutlined } from '@oceanbase/icons';

const text =
'This is long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long panel content.';

const genExtra = () => (
<SettingOutlined
onClick={e => {
// If you don't want click extra trigger collapse, you can prevent this:
e.stopPropagation();
}}
/>
);

const items: CollapseProps['items'] = [
{
key: '1',
label: 'This is panel header 1',
children: <p>{text}</p>,
extra: genExtra(),
},
{
key: '2',
label: 'This is panel header 2',
children: <p>{text}</p>,
extra: genExtra(),
},
{
key: '3',
label: 'This is panel header 3',
children: <p>{text}</p>,
extra: genExtra(),
},
];

const App: React.FC = () => {
const onChange = (key: string | string[]) => {
console.log(key);
};

return <Collapse items={items} defaultActiveKey={['1']} onChange={onChange} />;
};

export default App;
34 changes: 34 additions & 0 deletions packages/design/src/collapse/demo/borderless.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react';
import type { CollapseProps } from '@oceanbase/design';
import { Collapse } from '@oceanbase/design';

const text =
'This is long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long panel content.';

const items: CollapseProps['items'] = [
{
key: '1',
label: 'This is panel header 1',
children: <p>{text}</p>,
},
{
key: '2',
label: 'This is panel header 2',
children: <p>{text}</p>,
},
{
key: '3',
label: 'This is panel header 3',
children: <p>{text}</p>,
},
];

const App: React.FC = () => {
const onChange = (key: string | string[]) => {
console.log(key);
};

return <Collapse bordered={false} items={items} onChange={onChange} />;
};

export default App;
51 changes: 51 additions & 0 deletions packages/design/src/collapse/demo/custom.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import type { CSSProperties } from 'react';
import React from 'react';
import { RightOutlined } from '@oceanbase/icons';
import type { CollapseProps } from '@oceanbase/design';
import { Collapse, theme } from '@oceanbase/design';

const text =
'This is long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long panel content.';

const getItems: (panelStyle: CSSProperties) => CollapseProps['items'] = panelStyle => [
{
key: '1',
label: 'This is panel header 1',
children: <p>{text}</p>,
style: panelStyle,
},
{
key: '2',
label: 'This is panel header 2',
children: <p>{text}</p>,
style: panelStyle,
},
{
key: '3',
label: 'This is panel header 3',
children: <p>{text}</p>,
style: panelStyle,
},
];

const App: React.FC = () => {
const { token } = theme.useToken();

const panelStyle: React.CSSProperties = {
marginBottom: 16,
background: token.colorFillAlter,
borderRadius: token.borderRadiusLG,
border: `1px solid ${token.colorBorderSecondary}`,
};

return (
<Collapse
bordered={false}
expandIcon={({ isActive }) => <RightOutlined rotate={isActive ? 90 : 0} />}
style={{ background: token.colorBgContainer }}
items={getItems(panelStyle)}
/>
);
};

export default App;
34 changes: 34 additions & 0 deletions packages/design/src/collapse/demo/expand-icon-position.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react';
import type { CollapseProps } from '@oceanbase/design';
import { Collapse } from '@oceanbase/design';

const text =
'This is long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long panel content.';

const items: CollapseProps['items'] = [
{
key: '1',
label: 'This is panel header 1',
children: <p>{text}</p>,
},
{
key: '2',
label: 'This is panel header 2',
children: <p>{text}</p>,
},
{
key: '3',
label: 'This is panel header 3',
children: <p>{text}</p>,
},
];

const App: React.FC = () => {
const onChange = (key: string | string[]) => {
console.log(key);
};

return <Collapse expandIconPosition="end" items={items} onChange={onChange} />;
};

export default App;
Loading
Loading