Skip to content

Commit

Permalink
chore(merge): Merge master branch and fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
dengfuping committed Nov 12, 2024
2 parents f8ecc10 + 122feae commit 6796fc5
Show file tree
Hide file tree
Showing 88 changed files with 4,688 additions and 3,335 deletions.
7 changes: 6 additions & 1 deletion .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ export default defineConfig({
},
{
title: '导航',
children: [{ title: 'Breadcrumb 面包屑', link: '/components/breadcrumb' }],
children: [
{ title: 'Breadcrumb 面包屑', link: '/components/breadcrumb' },
{ title: 'Dropdown 下拉菜单', link: '/components/dropdown' },
],
},
{
title: '布局',
Expand All @@ -156,9 +159,11 @@ export default defineConfig({
{ title: 'Input 输入框', link: '/components/input' },
{ title: 'InputNumber 数字输入框', link: '/components/input-number' },
{ title: 'Radio 单选框', link: '/components/radio' },
{ title: 'Checkbox 多选框', link: '/components/checkbox' },
{ title: 'Switch 开关', link: '/components/switch' },
{ title: 'Select 选择器', link: '/components/select' },
{ title: 'TreeSelect 树选择', link: '/components/tree-select' },
{ title: 'Slider 滑动输入条', link: '/components/slider' },
],
},
{
Expand Down
23 changes: 23 additions & 0 deletions docs/design/design-CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,29 @@ group: 基础组件

---

## 0.4.1

`2024-11-11`

- 📖 新增 Checkbox 的文档和示例。[#812](https://github.com/oceanbase/oceanbase-design/pull/812)
- 📖 新增 Dropdown 的文档和示例。[#803](https://github.com/oceanbase/oceanbase-design/pull/803)
- 📖 新增 Slider 的文档和示例。[#815](https://github.com/oceanbase/oceanbase-design/pull/815)
- ⭐️ ConfigProvider 新增 `appProps` 属性,用于控制内嵌 App 是否渲染组件、以便让被包裹元素继承 `.ant-app` 样式。[#824](https://github.com/oceanbase/oceanbase-design/pull/824)
- 🐞 去掉自定义的 Design Token `fontSizeHeading``lineHeightHeading`,修复标题大小错误的问题。[#813](https://github.com/oceanbase/oceanbase-design/pull/813)
- 🐞 修复 Dropdown.Button 为主按钮时分割线超出和背景色不正确的问题。[#803](https://github.com/oceanbase/oceanbase-design/pull/803)
- 🐞 [图标] 删除自定义的 UserOutlined 图标,避免和 `@ant-design/icons` 图标冲突以及在 Login 组件中的展示异常。[#802](https://github.com/oceanbase/oceanbase-design/pull/802)
- 💄 弱化 Breadcrumb 最后一项的字体颜色,将其改为 `#5c6b8a`[#816](https://github.com/oceanbase/oceanbase-design/pull/816)
- Card
- 💄 优化小尺寸 Card 带页签时的头部间距样式。[#821](https://github.com/oceanbase/oceanbase-design/pull/821)
- 💄 优化 Card 无分割线时的底部间距。[#819](https://github.com/oceanbase/oceanbase-design/pull/819)
- 💄 优化 Checkbox 超长内容的垂直对齐样式,从居中对齐改为顶部对齐。[#812](https://github.com/oceanbase/oceanbase-design/pull/812)
- 💄 更新 Empty 的默认插图。[#814](https://github.com/oceanbase/oceanbase-design/pull/814)
- 💄 优化 Radio 超长内容的垂直对齐样式,从居中对齐改为顶部对齐。[#811](https://github.com/oceanbase/oceanbase-design/pull/811)
- 💄 优化 Slider 轨道覆盖部分的颜色,以及左右两端的标签对齐样式。[#815](https://github.com/oceanbase/oceanbase-design/pull/815)
- Table
- 💄 优化 Table 底部分割线的展示逻辑,无分页器时也应该展示。[#822](https://github.com/oceanbase/oceanbase-design/pull/822)
- 💄 将非嵌套 Table 的空状态最小高度设为 `360px`[#818](https://github.com/oceanbase/oceanbase-design/pull/818)

## 0.4.0

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

---

## 0.4.1

`2024-11-11`

- ⭐️ 大幅优化 DateRanger 的交互和样式: [#810](https://github.com/oceanbase/oceanbase-design/pull/810) [#795](https://github.com/oceanbase/oceanbase-design/pull/795)
- 调整布局和样式
- 日期和时间输入框支持快捷选中
- 修复手动输入日期时日历面板不更新的问题
- 默认关闭极简模式
- 默认展示年份和秒
- 使用刷新图标 替换 `当前` 按钮
- 移除快捷选项的 tag
- 信息提示和报错信息移到面板底部
- 自定义时间默认不自动计算时间跨度,并移除自定义选项
- 🆕 Ranger 支持透传属性到 QuickPicker 组件。[#799](https://github.com/oceanbase/oceanbase-design/pull/799)
- 💄 去掉 PageContainer 页头的上内间距,让页面布局更加紧凑。[#817](https://github.com/oceanbase/oceanbase-design/pull/817)
- ProTable
- 💄 对齐 Table 的可展开、空状态和 `footer` 样式。[#825](https://github.com/oceanbase/oceanbase-design/pull/825)
- 💄 优化查询表单样式,将搜索&重置按钮组和展开收起互换位置。[#801](https://github.com/oceanbase/oceanbase-design/pull/801)
- 💄 优化 Password 的多处样式,以对齐设计规范。[#820](https://github.com/oceanbase/oceanbase-design/pull/820)

## 0.4.0

`2024-10-09`
Expand Down
50 changes: 25 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,53 +44,53 @@
"devDependencies": {
"@ant-design/colors": "^7.1.0",
"@ant-design/cssinjs": "^1.21.1",
"@ant-design/icons": "^5.4.0",
"@babel/cli": "^7.24.8",
"@babel/preset-env": "^7.25.4",
"@ant-design/icons": "^5.5.1",
"@babel/cli": "^7.25.9",
"@babel/preset-env": "^7.26.0",
"@chenshuai2144/less2cssinjs": "^1.0.7",
"@ctrl/tinycolor": "^4.1.0",
"@emotion/babel-preset-css-prop": "^11.12.0",
"@emotion/css": "^11.13.0",
"@emotion/react": "^11.13.0",
"@emotion/css": "^11.13.4",
"@emotion/react": "^11.13.3",
"@emotion/server": "^11.11.0",
"@qixian.cs/github-contributors-list": "^2.0.2",
"@rc-component/trigger": "^2.2.3",
"@rc-component/trigger": "^2.2.5",
"@stackblitz/sdk": "^1.11.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.0.1",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.5.2",
"@types/lodash": "^4.17.13",
"@types/node": "^20.14.14",
"@types/react": "^18.3.3",
"@types/node": "^20.17.6",
"@types/react": "^18.3.12",
"@umijs/fabric": "^4.0.1",
"@umijs/test": "^4.3.30",
"@vercel/analytics": "^1.3.1",
"antd": "^5.20.6",
"antd-style": "^3.6.2",
"@umijs/test": "^4.3.31",
"@vercel/analytics": "^1.3.2",
"antd": "^5.21.6",
"antd-style": "^3.7.1",
"antd-token-previewer": "^2.0.8",
"babel-jest": "^29.7.0",
"classnames": "^2.5.1",
"copy-to-clipboard": "^3.3.3",
"cross-env": "^7.0.3",
"dayjs": "^1.11.13",
"dumi": "^2.4.7",
"eslint-plugin-jest": "^28.8.0",
"dumi": "^2.4.13",
"eslint-plugin-jest": "^28.9.0",
"execa": "^5.1.1",
"father": "^4.5.0",
"father": "^4.5.1",
"fs-extra": "^11.2.0",
"gh-pages": "^6.1.1",
"gh-pages": "^6.2.0",
"glob": "^11.0.0",
"html2sketch": "^1.0.2",
"husky": "^9.1.4",
"husky": "^9.1.6",
"identity-obj-proxy": "^3.0.0",
"isomorphic-fetch": "^3.0.0",
"jest-environment-jsdom": "^29.7.0",
"jsonml-to-react-element": "^1.1.11",
"jsonml.js": "^0.1.0",
"lerna": "^8.1.8",
"lint-staged": "^15.2.8",
"lerna": "^8.1.9",
"lint-staged": "^15.2.10",
"lodash": "^4.17.21",
"mockdate": "^3.0.5",
"prettier": "^3.3.3",
Expand All @@ -99,19 +99,19 @@
"rc-drawer": "^7.2.0",
"rc-footer": "^0.6.8",
"rc-resize-observer": "^1.4.0",
"rc-segmented": "^2.4.1",
"rc-tabs": "^15.2.0",
"rc-segmented": "^2.5.0",
"rc-tabs": "^15.4.0",
"rc-util": "^5.43.0",
"react": "^18.3.1",
"react-color": "^2.19.3",
"react-copy-to-clipboard": "^5.1.0",
"react-dom": "^18.3.1",
"react-fast-marquee": "^1.6.5",
"react-intl": "^6.6.8",
"react-router-dom": "^6.26.0",
"react-intl": "^6.8.7",
"react-router-dom": "^6.28.0",
"runscript": "^1.6.0",
"ts-node": "^10.9.2",
"typescript": "^5.6.2",
"typescript": "^5.6.3",
"vanilla-jsoneditor": "^0.23.8",
"vitest": "^2.1.1",
"vitest-canvas-mock": "^0.3.3",
Expand Down
2 changes: 1 addition & 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.0",
"version": "0.4.1",
"description": "The Chart library for OceanBase",
"homepage": "https://github.com/oceanbase/oceanbase-design/packages/charts",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions packages/codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oceanbase/codemod",
"version": "0.4.0",
"version": "0.4.1",
"description": "Codemod for OceanBase Design upgrade",
"keywords": [
"oceanbase",
Expand Down Expand Up @@ -33,7 +33,7 @@
"is-git-clean": "^1.1.0",
"jscodeshift": "^0.16.1",
"lodash": "^4.17.21",
"postcss": "^8.4.41",
"postcss": "^8.4.47",
"postcss-less": "^6.0.0",
"prettier": "^3.3.3",
"read-pkg-up": "^10.1.0",
Expand Down
11 changes: 6 additions & 5 deletions packages/design/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oceanbase/design",
"version": "0.4.0",
"version": "0.4.1",
"description": "The Design System of OceanBase",
"keywords": [
"oceanbase",
Expand Down Expand Up @@ -40,7 +40,7 @@
"@oceanbase/icons": "workspace:^",
"@oceanbase/util": "workspace:^",
"ahooks": "^2.10.14",
"antd": "^5.20.6",
"antd": "^5.21.6",
"classnames": "^2.5.1",
"lodash": "^4.17.21",
"lottie-web": "^5.12.2",
Expand All @@ -49,12 +49,13 @@
"react-sticky-mouse-tooltip": "^0.0.1"
},
"devDependencies": {
"@babel/cli": "^7.24.8",
"@babel/preset-env": "^7.25.4",
"@babel/cli": "^7.25.9",
"@babel/preset-env": "^7.26.0",
"antd-token-previewer": "^2.0.8",
"rc-select": "^14.16.3",
"rc-slider": "^11.1.7",
"rc-table": "^7.48.1",
"rc-tree-select": "^5.22.1"
"rc-tree-select": "^5.24.3"
},
"peerDependencies": {
"react": ">=16.9.0",
Expand Down
52 changes: 29 additions & 23 deletions packages/design/src/button/demo/dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Dropdown, Space } from '@oceanbase/design';
import { Button, Dropdown, Space, message } from '@oceanbase/design';
import type { MenuProps } from '@oceanbase/design';
import { DownOutlined } from '@oceanbase/icons';

const items = [
Expand All @@ -17,29 +18,34 @@ const items = [
},
];

const handleMenuClick: MenuProps['onClick'] = e => {
message.info('Click on menu item.');
console.log('click', e);
};

const menuProps = {
items,
onClick: handleMenuClick,
};

const App: React.FC = () => (
<Space>
<Dropdown.Button
menu={{
items,
onClick: e => {
console.log('click', e);
},
}}
>
Dropdown
</Dropdown.Button>
<Dropdown.Button
menu={{
items,
onClick: e => {
console.log('click', e);
},
}}
icon={<DownOutlined />}
>
Dropdown
</Dropdown.Button>
<Space wrap>
<Dropdown menu={menuProps}>
<Button>
<Space>
Button
<DownOutlined />
</Space>
</Button>
</Dropdown>
<Dropdown menu={menuProps}>
<Button type="primary">
<Space>
Button
<DownOutlined />
</Space>
</Button>
</Dropdown>
</Space>
);

Expand Down
40 changes: 30 additions & 10 deletions packages/design/src/button/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,42 @@ export type ButtonToken = FullToken<'Button'>;

export const genButtonStyle: GenerateStyle<ButtonToken> = (token: ButtonToken) => {
const { componentCls } = token;
// primary button className
const primaryBtnCls = `${componentCls}${componentCls}-primary:not([disabled]):not(${componentCls}-disabled):not(${componentCls}-dangerous):not(${componentCls}-background-ghost)`;
const primaryAndCompactItemBtnCls = `${componentCls}-compact-item${primaryBtnCls}`;
return {
[`${componentCls}`]: {
// remove box-shadow for button
boxShadow: 'none !important',
},
[`${componentCls}${componentCls}-primary:not([disabled]):not(${componentCls}-disabled):not(${componentCls}-dangerous):not(${componentCls}-background-ghost)`]:
{
background: 'linear-gradient(-59deg, #002BFF 0%, #0080FF 100%)',
border: 'none',
['&:hover']: {
background: 'linear-gradient(120deg, #1AA0FF 0%, #1A53FF 100%)',
},
['&:active']: {
background: 'linear-gradient(120deg, #0060E6 0%, #0013E6 100%)',
},
// primary button
[`${primaryBtnCls}`]: {
background: 'linear-gradient(-59deg, #002BFF 0%, #0080FF 100%)',
border: 'none',
['&:hover']: {
background: 'linear-gradient(120deg, #1AA0FF 0%, #1A53FF 100%)',
},
['&:active']: {
background: 'linear-gradient(120deg, #0060E6 0%, #0013E6 100%)',
},
},
// primary button in compact item
[`${primaryBtnCls}${componentCls}-compact-last-item`]: {
background: 'linear-gradient(-59deg, #002BFF 0%, #002BFF 100%)',
['&:hover']: {
background: 'linear-gradient(120deg, #1AA0FF 0%, #1A53FF 100%)',
},
['&:active']: {
background: 'linear-gradient(120deg, #0060E6 0%, #0013E6 100%)',
},
},
[`${primaryAndCompactItemBtnCls}+${primaryAndCompactItemBtnCls}:before`]: {
height: '100%',
top: 0,
},
[`${primaryAndCompactItemBtnCls}:hover`]: {
zIndex: 0,
},
};
};

Expand Down
9 changes: 7 additions & 2 deletions packages/design/src/card/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,17 @@ export const genCardStyle: GenerateStyle<CardToken> = (token: CardToken): CSSObj
},
[`${componentCls}${componentCls}-no-divider:not(${componentCls}-contain-tabs)`]: {
[`${componentCls}-body`]: {
padding: `0 ${paddingLG}px ${padding}px ${paddingLG}px`,
padding: `0 ${paddingLG}px ${paddingLG}px ${paddingLG}px`,
},
},
[`${componentCls}-small${componentCls}-no-divider:not(${componentCls}-contain-tabs)`]: {
[`${componentCls}-body`]: {
padding: `0 ${paddingSM}px 12px ${paddingSM}px`,
padding: `0 ${paddingSM}px ${paddingSM}px ${paddingSM}px`,
},
},
[`${componentCls}-small${componentCls}-contain-tabs >${componentCls}-head`]: {
[`${componentCls}-head-title, ${componentCls}-head-extra`]: {
paddingTop: token.paddingXS,
},
},
[`${componentCls}${componentCls}-contain-tabs`]: {
Expand Down
14 changes: 14 additions & 0 deletions packages/design/src/checkbox/demo/basic.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import { Checkbox } from '@oceanbase/design';

const App: React.FC = () => (
<Checkbox
onChange={e => {
console.log(`checked: ${e.target.checked}`);
}}
>
Checkbox
</Checkbox>
);

export default App;
Loading

0 comments on commit 6796fc5

Please sign in to comment.