Skip to content

Commit

Permalink
Merge pull request ant-design#46050 from ant-design/master-merge-feature
Browse files Browse the repository at this point in the history
chore: merge master into feature
  • Loading branch information
MadCcc authored Nov 24, 2023
2 parents 7ab52f5 + f25da5c commit afbea25
Show file tree
Hide file tree
Showing 23 changed files with 87 additions and 645 deletions.
2 changes: 0 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ jobs:
test-argos-ci:
docker:
- image: cimg/node:21.2-browsers
environment:
NODE_OPTIONS: --openssl-legacy-provider
steps:
- checkout
- run:
Expand Down
2 changes: 2 additions & 0 deletions .dumi/theme/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@
"app.footer.seeconf": "Experience Tech Conference",
"app.footer.xtech": "Ant Financial Experience Tech",
"app.footer.xtech.slogan": "Experience The Beauty",
"app.footer.galacean": "Galacean",
"app.footer.galacean.slogan": "Interactive Graphics Solution",
"app.docs.color.pick-primary": "Pick your primary color",
"app.docs.color.pick-background": "Pick your background color",
"app.docs.components.icon.search.placeholder": "Search icons here, click icon to copy code",
Expand Down
2 changes: 2 additions & 0 deletions .dumi/theme/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@
"app.footer.seeconf": "蚂蚁体验科技大会",
"app.footer.xtech": "蚂蚁体验科技",
"app.footer.xtech.slogan": "让用户体验美好",
"app.footer.galacean": "Galacean",
"app.footer.galacean.slogan": "互动图形解决方案",
"app.docs.color.pick-primary": "选择你的主色",
"app.docs.color.pick-background": "选择你的背景色",
"app.docs.components.icon.search.placeholder": "在此搜索图标,点击图标可复制代码",
Expand Down
14 changes: 14 additions & 0 deletions .dumi/theme/slots/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,20 @@ const Footer: React.FC = () => {
url: 'https://kitchen.alipay.com',
openExternal: true,
},
{
icon: (
<img
src="https://mdn.alipayobjects.com/huamei_j9rjmc/afts/img/A*3ittT5OEo2gAAAAAAAAAAAAADvGmAQ/original"
width={16}
height={16}
alt="Galacean"
/>
),
title: <FormattedMessage id="app.footer.galacean" />,
description: <FormattedMessage id="app.footer.galacean.slogan" />,
url: 'https://galacean.antgroup.com/',
openExternal: true,
},
{
icon: (
<img
Expand Down
8 changes: 4 additions & 4 deletions .dumi/theme/slots/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ const RESPONSIVE_SM = 1200;

const locales = {
cn: {
message: '第十八届 D2 终端技术大会火热来袭,以技术会友,一起分享技术的乐趣。',
shortMessage: '第十八届 D2 终端技术大会火热来袭!',
more: '点击报名',
link: 'https://d2.alibabatech.com/',
message: 'Galacean Effects · 所见即所得的动效新方案。',
shortMessage: 'Galacean Effects · 所见即所得的动效新方案。',
more: '前往了解',
link: 'https://galacean.antgroup.com/effects/',
},
en: {
message: '',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
run: npm run site
env:
SITE_ENV: development
NODE_OPTIONS: "--max_old_space_size=4096 --openssl-legacy-provider"
NODE_OPTIONS: "--max_old_space_size=4096"

- name: upload site artifact
uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-tweet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ permissions:

jobs:
tweet:
if: github.event.ref_type == 'tag'
if: ${{ github.event.ref_type == 'tag' && !contains(github.event.ref, 'alpha') }}
runs-on: ubuntu-latest
steps:
- name: Tweet
uses: nearform-actions/github-action-notify-twitter@v1
with:
message: |
Ant Design (antd@${{ github.event.release.tag_name }}) has been released ~ 🎊🎊🎊 Check out the release notes: ${{ github.event.release.html_url }}
🤖 Ant Design just released antd@${{ github.event.ref }} ✨🎊✨ Check out the full release note: https://github.com/ant-design/ant-design/releases/tag/${{ github.event.ref }}
twitter-app-key: ${{ secrets.TWITTER_API_KEY }}
twitter-app-secret: ${{ secrets.TWITTER_API_SECRET_KEY }}
twitter-access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/site-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ jobs:
- name: build site
run: npm run predeploy
env:
NODE_OPTIONS: "--max_old_space_size=4096 --openssl-legacy-provider"
NODE_OPTIONS: "--max_old_space_size=4096"

- name: build dist and bundle analyzer report
run: npm run dist
env:
ANALYZER: 1
NODE_OPTIONS: "--max_old_space_size=4096 --openssl-legacy-provider"
NODE_OPTIONS: "--max_old_space_size=4096"

- name: Get version
id: publish-version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ jobs:
build_script: dist
skip_step: install
env:
NODE_OPTIONS: "--max_old_space_size=4096 --openssl-legacy-provider"
NODE_OPTIONS: "--max_old_space_size=4096"
PRODUCTION_ONLY: 1
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
- name: dist
run: npm run dist
env:
NODE_OPTIONS: "--max_old_space_size=4096 --openssl-legacy-provider"
NODE_OPTIONS: "--max_old_space_size=4096"
CI: 1
needs: setup

Expand Down
37 changes: 20 additions & 17 deletions components/card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,24 @@ export interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 't
tabProps?: TabsProps;
}

function getAction(actions: React.ReactNode[]): React.ReactNode[] {
return actions.map<React.ReactNode>((action, index) => {
// Move this out since eslint not allow index key
// And eslint-disable makes conflict with rollup
// ref https://github.com/ant-design/ant-design/issues/46022
const key = `action-${index}`;

return (
<li style={{ width: `${100 / actions.length}%` }} key={key}>
<span>{action}</span>
</li>
);
});
}
const ActionNode: React.FC<{ prefixCls: string; actions: React.ReactNode[] }> = (props) => {
const { prefixCls, actions = [] } = props;
return (
<ul className={`${prefixCls}-actions`}>
{actions.map<React.ReactNode>((action, index) => {
// Move this out since eslint not allow index key
// And eslint-disable makes conflict with rollup
// ref https://github.com/ant-design/ant-design/issues/46022
const key = `action-${index}`;
return (
<li style={{ width: `${100 / actions.length}%` }} key={key}>
<span>{action}</span>
</li>
);
})}
</ul>
);
};

const Card = React.forwardRef<HTMLDivElement, CardProps>((props, ref) => {
const {
Expand Down Expand Up @@ -153,10 +157,9 @@ const Card = React.forwardRef<HTMLDivElement, CardProps>((props, ref) => {
{loading ? loadingBlock : children}
</div>
);

const actionDom =
actions && actions.length ? (
<ul className={`${prefixCls}-actions`}>{getAction(actions)}</ul>
) : null;
actions && actions.length ? <ActionNode prefixCls={prefixCls} actions={actions} /> : null;

const divProps = omit(others, ['onTabChange']);

Expand Down
1 change: 1 addition & 0 deletions components/checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export interface AbstractCheckboxProps<T> {
autoFocus?: boolean;
type?: string;
skipGroup?: boolean;
required?: boolean;
}

export interface CheckboxChangeEventTarget extends CheckboxProps {
Expand Down
2 changes: 2 additions & 0 deletions components/checkbox/Group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export interface CheckboxOptionType {
title?: string;
id?: string;
onChange?: (e: CheckboxChangeEvent) => void;
required?: boolean;
}

export interface AbstractCheckboxGroupProps {
Expand Down Expand Up @@ -130,6 +131,7 @@ const InternalGroup: React.ForwardRefRenderFunction<HTMLDivElement, CheckboxGrou
style={option.style}
title={option.title}
id={option.id}
required={option.required}
>
{option.label}
</Checkbox>
Expand Down
Loading

0 comments on commit afbea25

Please sign in to comment.