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.2 #867

Merged
merged 61 commits into from
Nov 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
ee829f7
fix(design): Slider start and end mark should align always
dengfuping Nov 14, 2024
873a5b7
Merge pull request #832 from oceanbase/dengfuping-dev
dengfuping Nov 14, 2024
ef16661
improve(design): Switch unchecked background color
dengfuping Nov 14, 2024
3040ac6
Merge pull request #833 from oceanbase/dengfuping-dev
dengfuping Nov 14, 2024
85f065f
feat(design): Add Progress docs and demos
dengfuping Nov 14, 2024
c768b01
Merge pull request #834 from oceanbase/dengfuping-dev
dengfuping Nov 14, 2024
7412e9a
chore(ui): use prefixCls var
wzc520pyfm Nov 18, 2024
fedc38d
improve(design): Typography editable and editing style
dengfuping Nov 19, 2024
1565aa8
Merge pull request #835 from wzc520pyfm/fix/fix-ant-prefix-cls
dengfuping Nov 19, 2024
4d000fa
Merge pull request #839 from oceanbase/dengfuping-dev
dengfuping Nov 19, 2024
0d0563f
fix(design): Typographt.Text editable and edit style should be correct
dengfuping Nov 19, 2024
e6f1180
fix(design): Remove duplicate Typography className
dengfuping Nov 19, 2024
983e30f
improve(design): lineWidthFocus token => 0 to remove focus outline
dengfuping Nov 19, 2024
15352c0
Merge pull request #840 from oceanbase/dengfuping-dev
dengfuping Nov 19, 2024
f0a7355
Merge pull request #841 from oceanbase/dengfuping-dev
dengfuping Nov 19, 2024
b4a72d0
improve(style): Result subTitle max-width => 600px and content max-wi…
dengfuping Nov 19, 2024
85177fd
Merge pull request #842 from oceanbase/dengfuping-dev
dengfuping Nov 19, 2024
cdd3c44
chore(deps): Upgrade antd from ^5.21.6 to ^5.22.1
dengfuping Nov 19, 2024
2eda8da
fix(test): Update snapshots
dengfuping Nov 19, 2024
4606a1e
Merge pull request #843 from oceanbase/dengfuping-dev
dengfuping Nov 19, 2024
dce1e25
improve(style): Empty description max-width => 600px and steps max-wi…
dengfuping Nov 19, 2024
11be27b
Merge branch 'master' of github.com:oceanbase/oceanbase-design into d…
dengfuping Nov 19, 2024
5c527cf
Merge pull request #844 from oceanbase/dengfuping-dev
dengfuping Nov 19, 2024
d56b604
improve(design): Empty title font-size 24px => 20px
dengfuping Nov 19, 2024
c3d2a3d
improve(design): Result title font-size 24px => 20px
dengfuping Nov 19, 2024
af7a263
Merge pull request #845 from oceanbase/dengfuping-dev
dengfuping Nov 19, 2024
9444c72
improve(design): scrollbar color
dengfuping Nov 19, 2024
9f89ed2
Merge pull request #846 from oceanbase/dengfuping-dev
dengfuping Nov 19, 2024
c7ba49a
improve(design): Tooltip max-width => 300px and max-height => 250px
dengfuping Nov 20, 2024
93aa92e
Merge pull request #847 from oceanbase/dengfuping-dev
dengfuping Nov 20, 2024
695de5b
improve(design): Tooltip closeIcon color
dengfuping Nov 20, 2024
32f4371
Merge pull request #848 from oceanbase/dengfuping-dev
dengfuping Nov 20, 2024
24b2e14
fix(design): mouseFollow Tooltip should inherit `.ant-tooltip` classN…
dengfuping Nov 20, 2024
7ce97f8
Merge pull request #849 from oceanbase/dengfuping-dev
dengfuping Nov 20, 2024
72fa241
feat(design): Add Popover docs and demos
dengfuping Nov 20, 2024
f395cbd
improve(design): Tooltip over-length demo
dengfuping Nov 20, 2024
5bd77ed
Merge pull request #850 from oceanbase/dengfuping-dev
dengfuping Nov 20, 2024
f14e266
feat(design): Add Popconfirm docs and demos
dengfuping Nov 20, 2024
0a57beb
Merge pull request #851 from oceanbase/dengfuping-dev
dengfuping Nov 20, 2024
d08a4f8
feat(design): Add DatePicker docs and demos
dengfuping Nov 20, 2024
1c23a65
Merge pull request #852 from oceanbase/dengfuping-dev
dengfuping Nov 20, 2024
51b94f5
feat(design): Add TimePicker docs and demos
dengfuping Nov 20, 2024
3a1c0c8
Merge pull request #853 from oceanbase/dengfuping-dev
dengfuping Nov 20, 2024
4b966ed
feat(design): DatePicker add format and global format demo
dengfuping Nov 20, 2024
920b3ec
Merge pull request #854 from oceanbase/dengfuping-dev
dengfuping Nov 20, 2024
1cae24d
fix(design): reset.css should build to dist
dengfuping Nov 21, 2024
9a05dee
fix(design): @import '~antd/dist/reset.css'; => @import 'antd/dist/re…
dengfuping Nov 21, 2024
bc42f9b
Merge pull request #855 from oceanbase/dengfuping-dev
dengfuping Nov 25, 2024
b6574ad
improve(design): Load custom font from local as priority
dengfuping Nov 26, 2024
6540de1
Merge pull request #861 from oceanbase/dengfuping-dev
dengfuping Nov 26, 2024
b30ba64
feat: Update the latest time through the ref attribute
Nov 28, 2024
f81f4af
chore(README): Add contributors image
dengfuping Nov 28, 2024
da06611
Merge pull request #863 from oceanbase/dengfuping-dev
dengfuping Nov 28, 2024
a3d9fb0
Merge pull request #862 from 18735185652/fix/range
dengfuping Nov 28, 2024
66f3b48
improve(design): Table virtual scrollbar color
dengfuping Nov 28, 2024
998d8f9
Merge pull request #864 from oceanbase/dengfuping-dev
dengfuping Nov 29, 2024
4ea6e19
improve(design): Table expandable style
dengfuping Nov 29, 2024
04285f1
chore(docs): Add changelog for @oceanbase/[email protected] and @oceanbase…
dengfuping Nov 29, 2024
4c5245f
Merge pull request #865 from oceanbase/dengfuping-dev
dengfuping Nov 29, 2024
8e87b2e
Merge pull request #866 from oceanbase/dengfuping-dev
dengfuping Nov 29, 2024
67c1567
Publish
dengfuping Nov 29, 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
36 changes: 1 addition & 35 deletions packages/design/src/_util/genComponentStyleHook.ts
Original file line number Diff line number Diff line change
@@ -5,43 +5,9 @@ import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
import { genComponentStyleHook as antGenComponentStyleHook } from 'antd/es/theme/internal';
import type { GlobalToken } from 'antd/es/theme/interface';
import theme from '../theme';
import Inter from './fonts/Inter.woff2';
import Consolas from './fonts/Consolas.woff2';
import HelveticaNeue from './fonts/HelveticaNeue.woff2';

export type ComponentName = keyof ComponentTokenMap;

export const genCustomFontStyle = (token: GlobalToken): CSSObject[] => {
return [
{
// English font: work by default
['@font-face']: {
fontFamily: 'Inter',
// load priority: remote font > local font
src: `url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2') format('woff2'), url(${Inter}) format('woff2')`,
// 定义字体加载策略,外置字体加载前使用默认字体进行兜底
fontDisplay: 'swap',
},
},
{
// Code font: work by default
['@font-face']: {
fontFamily: 'Consolas',
src: `url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*R8bMTqAdGWgAAAAAAAAAAAAADmfOAQ/Consolas.woff2') format('woff2'), url(${Consolas}) format('woff2')`,
fontDisplay: 'swap',
},
},
{
// Number code: work manully by configuring font-family
['@font-face']: {
fontFamily: 'Helvetica Neue',
src: `url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*3EzqR6aYJMkAAAAAAAAAAAAADmfOAQ/HelveticaNeue.woff2') format('woff2'), url(${HelveticaNeue}) format('woff2')`,
fontDisplay: 'swap',
},
},
];
};

export function genComponentStyleHook(
componentName: ComponentName,
styleFn: GenerateStyle<FullToken<ComponentName>>,
@@ -53,7 +19,7 @@ export function genComponentStyleHook(
const useStyle = antGenComponentStyleHook(
`OB-${componentName}` as ComponentName,
token => {
return [genCustomFontStyle(token), styleFn(token)];
return [styleFn(token)];
},
getDefaultToken,
{
File renamed without changes.
File renamed without changes.
32 changes: 32 additions & 0 deletions packages/design/src/global.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
@import 'antd/dist/reset.css';

@font-face {
font-family: 'Inter';
/* load priority: local font > remote font > self-hosting font */
src:
local('Inter'),
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2')
format('woff2'),
url('./fonts/Inter.woff2') format('woff2');
/* load strategy: use default font as fallback */
font-display: swap;
}

@font-face {
font-family: 'Consolas';
src:
local('Consolas'),
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*R8bMTqAdGWgAAAAAAAAAAAAADmfOAQ/Consolas.woff2')
format('woff2'),
url('./fonts/Consolas.woff2') format('woff2');
font-display: swap;
}

@font-face {
font-family: 'Helvetica Neue';
src:
local('Helvetica Neue'),
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*3EzqR6aYJMkAAAAAAAAAAAAADmfOAQ/HelveticaNeue.woff2')
format('woff2'),
url('./fonts/HelveticaNeue.woff2') format('woff2');
font-display: swap;
}

pre,
code,
kbd,