Showing preview only (4,444K chars total). Download the full file or copy to clipboard to get everything.
Repository: ant-design/ant-design-mini
Branch: master
Commit: 08a3cb9ad535
Files: 1560
Total size: 3.8 MB
Directory structure:
gitextract_uttux0t6/
├── .dumi/
│ ├── pages/
│ │ ├── index/
│ │ │ └── index.tsx
│ │ └── index-en/
│ │ └── index.tsx
│ ├── theme/
│ │ ├── builtins/
│ │ │ ├── .gitkeep
│ │ │ ├── HomeBaseLayout/
│ │ │ │ ├── components/
│ │ │ │ │ ├── Banner/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Frame/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Gallery/
│ │ │ │ │ │ ├── ItemBox/
│ │ │ │ │ │ │ └── index.tsx
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Notice/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Theme/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── Title/
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── Users/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Icon.less
│ │ │ ├── Icon.tsx
│ │ │ ├── OverviewCard.tsx
│ │ │ ├── Previewer/
│ │ │ │ ├── index.less
│ │ │ │ └── index.tsx
│ │ │ ├── ResourceCard.less
│ │ │ ├── ResourceCard.tsx
│ │ │ ├── SourceCode/
│ │ │ │ ├── index.less
│ │ │ │ └── index.tsx
│ │ │ ├── Table/
│ │ │ │ ├── index.less
│ │ │ │ └── index.tsx
│ │ │ ├── code.html
│ │ │ └── iframe.html
│ │ ├── common/
│ │ │ ├── CommonHelmet.tsx
│ │ │ ├── EditLink.tsx
│ │ │ ├── GlobalStyles.tsx
│ │ │ ├── LastUpdated.tsx
│ │ │ ├── Loading/
│ │ │ │ └── index.tsx
│ │ │ ├── PrevAndNext.tsx
│ │ │ ├── Sim/
│ │ │ │ ├── index.less
│ │ │ │ └── index.tsx
│ │ │ ├── ThemeSwitch/
│ │ │ │ ├── ThemeIcon.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── config/
│ │ │ │ └── overview.ts
│ │ │ └── styles/
│ │ │ ├── Common.tsx
│ │ │ ├── DumiDefaultStyleOverride.tsx
│ │ │ ├── HeadingAnchor.tsx
│ │ │ ├── Highlight.tsx
│ │ │ ├── Markdown.tsx
│ │ │ ├── PreviewImage.tsx
│ │ │ ├── Reset.tsx
│ │ │ ├── Responsive.tsx
│ │ │ ├── SearchBar.tsx
│ │ │ └── index.ts
│ │ ├── defineThemeConfig/
│ │ │ └── index.ts
│ │ ├── global.d.ts
│ │ ├── hooks/
│ │ │ ├── useAdditionalThemeConfig.ts
│ │ │ ├── useLocaleValue.ts
│ │ │ ├── useMenu.tsx
│ │ │ ├── useSiteToken.ts
│ │ │ └── uselocale.ts
│ │ ├── index.ts
│ │ ├── layouts/
│ │ │ ├── DocLayout/
│ │ │ │ └── index.tsx
│ │ │ ├── GlobalLayout.tsx
│ │ │ ├── HomePageLayout/
│ │ │ │ └── index.tsx
│ │ │ └── SidebarLayout/
│ │ │ └── index.tsx
│ │ ├── locales/
│ │ │ ├── en.json
│ │ │ └── zh-CN.json
│ │ ├── plugin/
│ │ │ ├── index.ts
│ │ │ └── techStack.ts
│ │ ├── plugin.ts
│ │ ├── slots/
│ │ │ ├── Content/
│ │ │ │ ├── DocAnchor.tsx
│ │ │ │ ├── InViewSuspense.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── Footer/
│ │ │ │ └── index.tsx
│ │ │ ├── Header/
│ │ │ │ ├── HeaderExtral.tsx
│ │ │ │ ├── Logo.tsx
│ │ │ │ ├── More.tsx
│ │ │ │ ├── Navigation.tsx
│ │ │ │ ├── SwitchBtn.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── LangSwitch/
│ │ │ │ └── index.tsx
│ │ │ ├── NotFound/
│ │ │ │ └── index.tsx
│ │ │ ├── Sidebar/
│ │ │ │ └── index.tsx
│ │ │ └── SiteContext.ts
│ │ ├── static/
│ │ │ └── style.ts
│ │ ├── styles/
│ │ │ └── variables.less
│ │ ├── types.ts
│ │ └── utils.ts
│ └── tsconfig.json
├── .dumirc.ts
├── .editorconfig
├── .eslintignore
├── .eslintrc
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request_template.md
│ ├── contributing.md
│ ├── dependabot.yml
│ ├── pull_requeset_template.md
│ └── workflows/
│ ├── chatgpt_code_review.yaml
│ ├── preview.yml
│ ├── pull_request.yml
│ ├── real_release.yml
│ ├── release.yml
│ └── release_candidate.yml
├── .gitignore
├── .prettierignore
├── .prettierrc
├── .stylelintrc
├── CHANGELOG.md
├── LICENSE
├── README.md
├── config/
│ ├── alipay/
│ │ ├── .act.config.json
│ │ ├── app.less
│ │ ├── app.ts
│ │ ├── b2h.config.ts
│ │ ├── mini.project.json
│ │ ├── package.json
│ │ └── tsconfig.json
│ └── wechat/
│ ├── app.js
│ ├── app.wxss
│ └── package.json
├── copilot/
│ ├── Actions/
│ │ ├── check.sjs
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json5
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Bubble/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json5
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Conversations/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json5
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Prompts/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json5
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Sender/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json5
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── ThoughtChain/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json5
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ └── Welcome/
│ ├── index.axml
│ ├── index.en.md
│ ├── index.json5
│ ├── index.less
│ ├── index.md
│ ├── index.sjs.ts
│ ├── index.ts
│ ├── props.ts
│ └── variable.less
├── copilot-demo/
│ └── pages/
│ ├── Actions/
│ │ ├── index.axml
│ │ ├── index.json5
│ │ ├── index.less
│ │ └── index.ts
│ ├── Bubble/
│ │ ├── index.axml
│ │ ├── index.json5
│ │ ├── index.less
│ │ └── index.ts
│ ├── Conversations/
│ │ ├── index.axml
│ │ ├── index.json5
│ │ ├── index.less
│ │ └── index.ts
│ ├── Prompts/
│ │ ├── index.axml
│ │ ├── index.json5
│ │ ├── index.less
│ │ └── index.ts
│ ├── Sender/
│ │ ├── index.axml
│ │ ├── index.json5
│ │ ├── index.less
│ │ └── index.ts
│ ├── ThoughtChain/
│ │ ├── index.axml
│ │ ├── index.json5
│ │ ├── index.less
│ │ └── index.ts
│ └── Welcome/
│ ├── index.axml
│ ├── index.json5
│ ├── index.less
│ └── index.ts
├── demo/
│ ├── components/
│ │ ├── Calendar/
│ │ │ └── collapse-container/
│ │ │ ├── cn-day/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json
│ │ │ │ ├── index.less
│ │ │ │ ├── index.ts
│ │ │ │ └── js-calendar-converter.js
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ └── Form/
│ │ ├── checklist/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ ├── index.sjs.ts
│ │ │ └── index.ts
│ │ ├── form-json/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ └── location/
│ │ ├── index.axml
│ │ ├── index.json5
│ │ ├── index.less
│ │ ├── index.sjs.ts
│ │ └── index.ts
│ ├── pages/
│ │ ├── ActionSheet/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── AutoResize/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Avatar/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Badge/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Button/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Calendar/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Card/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Checkbox/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ ├── index.sjs.ts
│ │ │ └── index.ts
│ │ ├── Checklist/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Collapse/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── ConfigProvider/
│ │ │ ├── ar-SA.ts
│ │ │ ├── es-US.ts
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Container/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Countdown/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── DatePicker/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Dialog/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Divider/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Empty/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Feedback/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Footer/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Form/
│ │ │ ├── FormBasic/
│ │ │ │ ├── city.ts
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── FormCustom/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── FormCustomError/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── FormDependency/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── FormDynamic/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── FormImageUploadRules/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── FormInitialValues/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── FormInitialValuesAsync/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── FormJSON/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── FormLayout/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── FormMultiple/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── FormReadonly/
│ │ │ │ ├── city.ts
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── FormRules/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── FormValidate/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── FormValidateMessages/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── FormWatch/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Grid/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── GuideTour/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Icon/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── ImageUpload/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── IndexBar/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Input/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── InputCustom/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── InputSearchBar/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── InputTextarea/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── utils.ts
│ │ ├── List/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Loading/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Modal/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── NoticeBar/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── NumberInput/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── NumberKeyboard/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── NumberKeyboardAmount/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── NumberKeyboardCode/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── NumberKeyboardNumber/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── PageContainer/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Picker/
│ │ │ ├── city.ts
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Popover/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── PopoverList/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Popup/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Postscript/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Progress/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Radio/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── RareWordsKeyboard/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Rate/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Result/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── SafeArea/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── SelectContact/
│ │ │ ├── contact.ts
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Selector/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Skeleton/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Slider/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Space/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Stepper/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Steps/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Sticky/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── SwipeAction/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── slice.sjs.ts
│ │ ├── SwipeActionAnimation/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── SwipeActionLeft/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── SwipeActionLeftRight/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── SwipeActionMove/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── SwipeActionNumber/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── slice.sjs.ts
│ │ ├── SwipeActionSlot/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── SwipeActionSpeed/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── SwipeActionTap/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── SwipeActionWidth/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Switch/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── TabBar/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Table/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Tabs/
│ │ │ ├── TabsElevator/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── TabsVerticalElevator/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Tag/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Terms/
│ │ │ ├── Fixed/
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.json5
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Toast/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Typography/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── Voucher/
│ │ │ ├── index.axml
│ │ │ ├── index.json5
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ └── index/
│ │ ├── index.axml
│ │ ├── index.json5
│ │ ├── index.less
│ │ └── index.ts
│ └── utils/
│ └── constants.ts
├── docs/
│ ├── components/
│ │ ├── overview.en.md
│ │ ├── overview.md
│ │ └── wechat-component.tsx
│ ├── guide/
│ │ ├── contribute.en.md
│ │ ├── contribute.md
│ │ ├── cooperation.en.md
│ │ ├── cooperation.md
│ │ ├── customize-theme.en.md
│ │ ├── customize-theme.md
│ │ ├── faq.en.md
│ │ ├── faq.md
│ │ ├── i18n.en.md
│ │ ├── i18n.md
│ │ ├── migration.en.md
│ │ ├── migration.md
│ │ ├── quick-start.en.md
│ │ ├── quick-start.md
│ │ ├── using-uni-app.en.md
│ │ ├── using-uni-app.md
│ │ ├── using-wechat.en.md
│ │ └── using-wechat.md
│ ├── resources.en.md
│ └── resources.md
├── mini.project.json
├── package.json
├── project.config.json
├── scripts/
│ ├── axml/
│ │ ├── index.ts
│ │ └── mapping.ts
│ ├── build.js
│ ├── check-compiled.ts
│ ├── compile-axml.ts
│ ├── compile.js
│ ├── copy.ts
│ ├── create-config.js
│ ├── dev-doc.js
│ ├── dev.ts
│ ├── generate.ts
│ ├── getSourceCode.js
│ ├── github/
│ │ ├── cli.js
│ │ ├── createIssueCommentPrNextResult.js
│ │ ├── createPrNextCheckSuite.js
│ │ ├── helpers.js
│ │ └── notifyReleaseResult.js
│ ├── mini-compiler.ts
│ ├── patch-coverage.ts
│ ├── publish.js
│ ├── publishInCI.js
│ ├── publishRC.js
│ ├── publishUtils.js
│ ├── quick-release.js
│ ├── renamePageConfig.ts
│ ├── todo.ts
│ ├── transform.ts
│ ├── tsconfig.json
│ ├── tsxjs/
│ │ ├── babel-plugin-export-default-to-module-exports.ts
│ │ ├── index.spec.ts
│ │ └── index.ts
│ ├── tsxml/
│ │ ├── context.ts
│ │ ├── fixtures/
│ │ │ ├── command.tsx
│ │ │ ├── component.tsx
│ │ │ ├── event.tsx
│ │ │ ├── if.tsx
│ │ │ ├── index.tsx
│ │ │ ├── page.tsx
│ │ │ ├── sjs.sjs.js
│ │ │ ├── sjs.tsx
│ │ │ ├── snapshot/
│ │ │ │ ├── command.axml
│ │ │ │ ├── command.wxml
│ │ │ │ ├── component.axml
│ │ │ │ ├── component.wxml
│ │ │ │ ├── event.axml
│ │ │ │ ├── event.wxml
│ │ │ │ ├── if.axml
│ │ │ │ ├── if.wxml
│ │ │ │ ├── index.axml
│ │ │ │ ├── index.wxml
│ │ │ │ ├── page.axml
│ │ │ │ ├── page.wxml
│ │ │ │ ├── sjs.axml
│ │ │ │ ├── sjs.wxml
│ │ │ │ ├── style.axml
│ │ │ │ ├── style.wxml
│ │ │ │ ├── template.axml
│ │ │ │ └── template.wxml
│ │ │ ├── style.tsx
│ │ │ └── template.tsx
│ │ ├── h.ts
│ │ ├── index.spec.ts
│ │ ├── index.ts
│ │ ├── parser.ts
│ │ ├── platform.ts
│ │ └── utils.ts
│ └── verifyCommitMsg.js
├── src/
│ ├── ActionSheet/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Alphabet/
│ │ ├── index.axml
│ │ ├── index.json
│ │ ├── index.less
│ │ └── index.ts
│ ├── AutoResize/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Avatar/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Badge/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Button/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Calendar/
│ │ ├── helper.sjs.ts
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ ├── scroll.sjs.ts
│ │ ├── utils.ts
│ │ └── variable.less
│ ├── Card/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Checkbox/
│ │ ├── CheckboxGroup/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Checklist/
│ │ ├── ChecklistItem/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Collapse/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── ConfigProvider/
│ │ ├── darkTheme.ts
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Container/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Countdown/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── DatePicker/
│ │ ├── RangePicker/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ ├── util.ts
│ │ └── variable.less
│ ├── Dialog/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Divider/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Empty/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Feedback/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Footer/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Form/
│ │ ├── FormCascaderPicker/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── FormCheckboxGroup/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── FormDatePicker/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── FormImageUpload/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── FormInput/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ ├── props.ts
│ │ │ └── variable.less
│ │ ├── FormItem/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── FormPicker/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── FormRadioGroup/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── FormRangePicker/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── FormRate/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── FormSelector/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── FormSlider/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ ├── props.ts
│ │ │ └── variable.less
│ │ ├── FormStepper/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ ├── props.ts
│ │ │ └── variable.less
│ │ ├── FormSwitch/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ ├── props.ts
│ │ │ └── variable.less
│ │ ├── FormTextarea/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── form.ts
│ │ ├── index.en.md
│ │ ├── index.md
│ │ └── variable.less
│ ├── Grid/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── GuideTour/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Icon/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── ImageIcon/
│ │ ├── index.axml
│ │ ├── index.json
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ └── props.ts
│ ├── ImageUpload/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── IndexBar/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Input/
│ │ ├── InputBlur/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── Textarea/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ ├── utils.ts
│ │ └── variable.less
│ ├── List/
│ │ ├── ListItem/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Loading/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Mask/
│ │ ├── index.axml
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Modal/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── NoticeBar/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── NumberInput/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── NumberKeyboard/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── PageContainer/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Pagination/
│ │ ├── index.axml
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Picker/
│ │ ├── CascaderPicker/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ ├── props.ts
│ │ │ └── utils.ts
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ ├── utils.ts
│ │ └── variable.less
│ ├── Popover/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ ├── utils.ts
│ │ └── variable.less
│ ├── PopoverList/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ ├── utils.ts
│ │ └── variable.less
│ ├── Popup/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Postscript/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Progress/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Radio/
│ │ ├── RadioGroup/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── RareWordsKeyboard/
│ │ ├── constants.ts
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ ├── utils.ts
│ │ ├── variable.less
│ │ └── zdatas.ts
│ ├── Rate/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Result/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── SafeArea/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ └── props.ts
│ ├── SelectContact/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ ├── util.ts
│ │ └── variable.less
│ ├── Selector/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Skeleton/
│ │ ├── Avatar/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.sjs.ts
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── Button/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.sjs.ts
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── Input/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── Paragraph/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── Title/
│ │ │ ├── index.axml
│ │ │ ├── index.json
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── props.ts
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Slider/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Space/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ └── props.ts
│ ├── Stepper/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ ├── utils.ts
│ │ └── variable.less
│ ├── Steps/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Sticky/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── SwipeAction/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ ├── variable.less
│ │ └── wechat.ts
│ ├── Switch/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── TabBar/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Table/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Tabs/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Tag/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Terms/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Toast/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Typography/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.sjs.ts
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── Voucher/
│ │ ├── index.axml
│ │ ├── index.en.md
│ │ ├── index.json
│ │ ├── index.less
│ │ ├── index.md
│ │ ├── index.ts
│ │ ├── props.ts
│ │ └── variable.less
│ ├── _locale/
│ │ ├── ar-SA.ts
│ │ ├── de-DE.ts
│ │ ├── en-US.ts
│ │ ├── es-ES.ts
│ │ ├── fr-FR.ts
│ │ ├── in-ID.ts
│ │ ├── index.ts
│ │ ├── it-IT.ts
│ │ ├── ja-JP.ts
│ │ ├── ko-KR.ts
│ │ ├── ms-MY.ts
│ │ ├── pt-BR.ts
│ │ ├── ru-RU.ts
│ │ ├── th-TH.ts
│ │ ├── tr-TR.ts
│ │ ├── vi-VN.ts
│ │ ├── zh-CN.ts
│ │ ├── zh-HK.ts
│ │ └── zh-TW.ts
│ ├── _util/
│ │ ├── arrow.sjs.ts
│ │ ├── assert-component2.ts
│ │ ├── base.ts
│ │ ├── compareVersion.ts
│ │ ├── console.ts
│ │ ├── dayjs/
│ │ │ └── iso-weekday.ts
│ │ ├── event.sjs.ts
│ │ ├── flattenObject.ts
│ │ ├── fmtEvent.ts
│ │ ├── get.ts
│ │ ├── isPropsEmpty.sjs.ts
│ │ ├── jsapi/
│ │ │ ├── base.ts
│ │ │ ├── choose-image.ts
│ │ │ ├── create-canvas-context.ts
│ │ │ ├── get-instance-bounding-client-rect.ts
│ │ │ ├── get-system-info.ts
│ │ │ └── load-font-face.ts
│ │ ├── platform.ts
│ │ ├── promisify.ts
│ │ ├── set.ts
│ │ ├── simply.ts
│ │ ├── store.ts
│ │ └── support.ts
│ ├── mixins/
│ │ ├── computed.ts
│ │ └── value.ts
│ └── style/
│ ├── mixins/
│ │ └── hairline.less
│ ├── themes/
│ │ ├── color.less
│ │ ├── index.less
│ │ ├── theme-black.less
│ │ └── theme-mode.less
│ └── variables.less
├── tests/
│ ├── alipay/
│ │ ├── ActionSheet/
│ │ │ └── __tests__/
│ │ │ └── index.test.ts
│ │ ├── Badge/
│ │ │ └── __tests__/
│ │ │ ├── index.test.ts
│ │ │ └── snapshot/
│ │ │ └── badge_alipay_config.txt
│ │ ├── Button/
│ │ │ └── __tests__/
│ │ │ └── index.test.ts
│ │ ├── Calendar/
│ │ │ └── __tests__/
│ │ │ ├── calendar.spec.ts
│ │ │ ├── snapshot/
│ │ │ │ └── alipay_config_props.txt
│ │ │ ├── testUtils.ts
│ │ │ └── utils.spec.ts
│ │ ├── Checkbox/
│ │ │ ├── CheckboxGroup/
│ │ │ │ └── index.spec.ts
│ │ │ └── index.spec.ts
│ │ ├── Checklist/
│ │ │ └── __tests__/
│ │ │ └── index.test.ts
│ │ ├── Collapse/
│ │ │ └── index.test.ts
│ │ ├── DatePicker/
│ │ │ ├── RangePicker/
│ │ │ │ ├── index.test.ts
│ │ │ │ └── utils.ts
│ │ │ ├── index.test.ts
│ │ │ └── utils.ts
│ │ ├── Form/
│ │ │ ├── FormCascaderPicker/
│ │ │ │ └── index.test.ts
│ │ │ ├── FormCheckboxGroup/
│ │ │ │ └── index.test.ts
│ │ │ ├── FormDatePicker/
│ │ │ │ └── index.test.ts
│ │ │ ├── FormImageUpload/
│ │ │ │ └── index.test.ts
│ │ │ ├── FormInput/
│ │ │ │ └── index.test.ts
│ │ │ ├── FormPicker/
│ │ │ │ └── index.test.ts
│ │ │ ├── FormRadioGroup/
│ │ │ │ └── index.test.ts
│ │ │ ├── FormRangePicker/
│ │ │ │ └── index.test.ts
│ │ │ ├── FormRate/
│ │ │ │ └── index.test.ts
│ │ │ ├── FormSelector/
│ │ │ │ └── index.test.ts
│ │ │ ├── FormSlider/
│ │ │ │ └── index.test.ts
│ │ │ ├── FormStepper/
│ │ │ │ └── index.test.ts
│ │ │ ├── FormSwitch/
│ │ │ │ └── index.test.ts
│ │ │ ├── FormTextarea/
│ │ │ │ └── index.test.ts
│ │ │ ├── form.test.ts
│ │ │ ├── form.ts
│ │ │ └── utils.ts
│ │ ├── Grid/
│ │ │ └── __tests__/
│ │ │ └── index.test.ts
│ │ ├── GuideTour/
│ │ │ └── index.test.ts
│ │ ├── Icon/
│ │ │ └── __tests__/
│ │ │ └── index.test.ts
│ │ ├── ImageUpload/
│ │ │ ├── helper.ts
│ │ │ └── index.test.ts
│ │ ├── Input/
│ │ │ ├── InputBlur/
│ │ │ │ └── index.test.ts
│ │ │ ├── Textarea/
│ │ │ │ └── index.test.ts
│ │ │ ├── common.ts
│ │ │ └── index.test.ts
│ │ ├── List/
│ │ │ └── __tests__/
│ │ │ ├── List.test.ts
│ │ │ ├── ListItem.test.ts
│ │ │ └── snapshot/
│ │ │ ├── list_alipay_config.txt
│ │ │ └── list_item_alipay_config.txt
│ │ ├── Modal/
│ │ │ └── __tests__/
│ │ │ ├── index.test.ts
│ │ │ └── snapshot/
│ │ │ └── alipay_config_props.txt
│ │ ├── NoticeBar/
│ │ │ └── index.test.ts
│ │ ├── NumberKeyboard/
│ │ │ └── index.spec.ts
│ │ ├── PageContainer/
│ │ │ ├── index.test.ts
│ │ │ └── snapshot/
│ │ │ └── page_alipay_config.txt
│ │ ├── Pagination/
│ │ │ └── index.test.ts
│ │ ├── Picker/
│ │ │ ├── CascaderPicker/
│ │ │ │ └── __tests__/
│ │ │ │ ├── index.test.ts
│ │ │ │ └── utils.ts
│ │ │ └── __tests__/
│ │ │ ├── index.test.ts
│ │ │ └── utils.ts
│ │ ├── Popover/
│ │ │ └── __tests__/
│ │ │ └── index.test.ts
│ │ ├── Popup/
│ │ │ └── index.test.ts
│ │ ├── Progress/
│ │ │ ├── index.spec.ts
│ │ │ ├── snap-speed-0-50-20.json
│ │ │ ├── snap-speed-12.json
│ │ │ ├── snap.json
│ │ │ └── snapshot/
│ │ │ └── alipay_config_props.txt
│ │ ├── Radio/
│ │ │ ├── RadioGroup/
│ │ │ │ ├── index.test.ts
│ │ │ │ └── utils.ts
│ │ │ ├── index.test.ts
│ │ │ └── utils.ts
│ │ ├── RareWordsKeyboard/
│ │ │ └── __tests__/
│ │ │ ├── index.test.ts
│ │ │ └── tu.txt
│ │ ├── Rate/
│ │ │ ├── index.test.ts
│ │ │ └── utils.ts
│ │ ├── Result/
│ │ │ ├── index.test.ts
│ │ │ └── snapshot/
│ │ │ └── result_alipay_config.txt
│ │ ├── Selector/
│ │ │ ├── index.test.ts
│ │ │ └── utils.ts
│ │ ├── Slider/
│ │ │ └── __tests__/
│ │ │ └── index.test.ts
│ │ ├── Stepper/
│ │ │ └── __tests__/
│ │ │ └── index.test.ts
│ │ ├── SwipeAction/
│ │ │ └── index.spec.ts
│ │ ├── Switch/
│ │ │ └── __tests__/
│ │ │ ├── index.test.ts
│ │ │ └── snapshot/
│ │ │ └── alipay_config.txt
│ │ ├── TabBar/
│ │ │ └── __tests__/
│ │ │ └── index.test.ts
│ │ ├── Tabs/
│ │ │ └── index.test.ts
│ │ ├── Toast/
│ │ │ └── index.spec.ts
│ │ ├── Typography/
│ │ │ ├── index.spec.ts
│ │ │ └── snapshot/
│ │ │ └── typography_alipay_config.txt
│ │ └── _util/
│ │ └── __tests__/
│ │ └── compareVersion.spec.ts
│ ├── selector-query.spec.ts
│ ├── selector-query.ts
│ ├── setup.ts
│ └── utils.ts
├── tsconfig.alipay.demo.json
├── tsconfig.json
├── tsconfig.wechat.demo.json
├── tsconfig.wechat.json
├── typings/
│ └── wechat.d.ts
├── typings.d.ts
└── vite.config.ts
================================================
FILE CONTENTS
================================================
================================================
FILE: .dumi/pages/index/index.tsx
================================================
/* .dumi/pages/index.tsx */
import HomeBaseLayout from '../../theme/layouts/HomePageLayout';
const CustomHomePage = () => {
return (
<div>
<HomeBaseLayout />
</div>
);
};
export default CustomHomePage;
================================================
FILE: .dumi/pages/index-en/index.tsx
================================================
import CustomHomePage from '../index';
export default CustomHomePage;
================================================
FILE: .dumi/theme/builtins/.gitkeep
================================================
================================================
FILE: .dumi/theme/builtins/HomeBaseLayout/components/Banner/index.tsx
================================================
import { css } from '@emotion/react';
import Atropos from 'atropos/react';
import useLocaleValue from "../../../../../theme/hooks/useLocaleValue";
import useSiteToken from "../../../../../theme/hooks/useSiteToken";
import 'atropos/css'
const bgLight = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/X8TvQKnc1MQAAAAAAAAAAAAADoEQAQFr/fmt.webp'
const bgDark = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/3o3ASIN3QeEAAAAAAAAAAAAADoEQAQFr/fmt.webp'
const contentLight = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/Q47ITaa7OkIAAAAAAAAAAAAADoEQAQFr/fmt.webp'
const contentDark = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/CtzWRYHofh0AAAAAAAAAAAAADoEQAQFr/fmt.webp'
const icon1Light = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/wF0aRYXHJYQAAAAAAAAAAAAADoEQAQFr/original';
const icon1Dark = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/y0d7RaMUp3MAAAAAAAAAAAAADoEQAQFr/original';
const icon2Light = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/GFR1QKB9oLEAAAAAAAAAAAAADoEQAQFr/original';
const icon2Dark = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/MUY2SKAUDN8AAAAAAAAAAAAADoEQAQFr/original';
const icon3Light = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/ublASKWCoCsAAAAAAAAAAAAADoEQAQFr/original';
const icon3Dark = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/SpnxRLyYUI8AAAAAAAAAAAAADoEQAQFr/original';
const icon4Light = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/2ccdRLZwLdAAAAAAAAAAAAAADoEQAQFr/fmt.webp';
const icon4Dark = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/kMErRLYmniEAAAAAAAAAAAAADoEQAQFr/fmt.webp';
const icon5Light = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/gdJFRppwDWQAAAAAAAAAAAAADoEQAQFr/original';
const icon5Dark = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/Oy5tSKE-DYwAAAAAAAAAAAAADoEQAQFr/original';
const icon6Light = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/v2FXQ5zpGfkAAAAAAAAAAAAADoEQAQFr/original';
const icon6Dark = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/iFYgR7GDoksAAAAAAAAAAAAADoEQAQFr/original';
const useStyle = ({
isDark,
isMobile,
}) => {
const { token } = useSiteToken();
const { fontFamily } = token;
return {
mainContainer: css`
width: 100%;
height: 662px;
background: url(${isDark ? bgDark : bgLight}) no-repeat center center;
background-size: cover;
position: relative;
font-family: PuHuiTi, ${fontFamily}, sans-serif;
display: flex;
justify-content: center;
`,
mainContent: css`
width: 100%;
height: 602px;
position: relative;
padding-top: 60px;
@media (min-width: 1600px) {
max-width: 1600px;
}
`,
featureContainer: css`
width: 100%;
height: 602px;
position: relative;
& .atropos-shadow {
display: none;
}
@media (max-width: 900px) {
display: none;
}
`,
featureWrap: css`
width: 100%;
height: 602px;
position: relative;
`,
featureContentMainImg: css`
height: 602px;
z-index: 90;
position: absolute;
right: 0;
top: 0;
pointer-events: none;
`,
featureIcon1: css`
position: absolute;
z-index: 100;
right: 610px;
bottom: 170px;
width: 84px;
pointer-events: none;
`,
featureIcon2: css`
position: absolute;
z-index: 100;
top: 200px;
right: 0px;
width: 166px;
pointer-events: none;
`,
featureIcon3: css`
position: absolute;
z-index: 100;
right: 700px;
top: 246px;
width: 44px;
pointer-events: none;
`,
featureIcon4: css`
position: absolute;
z-index: 90;
right: 0px;
top: 150px;
width: 715px;
pointer-events: none;
`,
featureIcon4Light: css`
position: absolute;
z-index: 90;
right: 10px;
top: 150px;
width: 690px;
pointer-events: none;
`,
featureIcon5: css`
position: absolute;
z-index: 100;
right: 150px;
top: 0px;
width: 90px;
pointer-events: none;
`,
featureIcon6: css`
position: absolute;
z-index: 80;
right: 520px;
top: -10px;
width: 106px;
pointer-events: none;
`,
actionWrap: css`
position: absolute;
text-align: left;
top: 192px;
left: 100px;
z-index: 80;
@media (max-width: 900px) {
right: 24px;
text-align: center;
left: 24px;
}
`,
actionTitle: css`
font-size: 52px;
font-weight: bold;
`,
actionSubTitle: css`
font-size: 22px;
`,
actionMainBtn: css`
all: initial;
width: 136px;
height: 41px;
font-size: 16px;
font-weight: 500;
line-height: 41px;
background: #fff;
border-radius: 21px;
box-shadow: 1px 1px 7px 0px #012a6526;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
margin-top: 50px;
`,
actionMainBtnImage: css`
width: 9px;
height: 13px;
margin-left: 10px;
`,
actionSubBtn: css`
all: initial;
width: 136px;
height: 41px;
font-size: 16px;
line-height: 41px;
background: #738ba466;
border: 1px solid #ffffff;
border-radius: 21px;
box-shadow: 1px 1px 7px 0px #012a6526;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
margin-top: 50px;
margin-left: 13px;
color: #fff;
`,
};
};
const actionHref = {
'zh-CN': {
quickStart: '/guide/quick-start',
tryComponent: '/components/overview',
},
'en': {
quickStart: '/guide/quick-start-en',
tryComponent: '/components/overview-en',
}
}
export default ({
isDark,
isMobile,
}) => {
const lang = useLocaleValue('bannerLocales');
const style = useStyle({
isDark,
isMobile,
});
return (
<div css={style.mainContainer}>
<div css={style.mainContent}>
<div css={style.featureContainer}>
<Atropos
css={style.featureWrap}
highlight={false}
activeOffset={0}
rotateXMax={0.5}
rotateYMax={0.5}
>
<img
css={style.featureContentMainImg}
src={isDark ? contentDark : contentLight}
data-atropos-offset={0.5}
/>
<img
css={style.featureIcon1}
src={isDark ? icon1Dark : icon1Light}
data-atropos-offset={20}
/>
<img
css={style.featureIcon2}
src={isDark ? icon2Dark : icon2Light}
data-atropos-offset={18}
/>
<img
css={style.featureIcon3}
src={isDark ? icon3Dark : icon3Light}
data-atropos-offset={16}
/>
<img
css={isDark ? style.featureIcon4 : style.featureIcon4Light}
src={isDark ? icon4Dark : icon4Light}
data-atropos-offset={2}
/>
<img
css={style.featureIcon5}
src={isDark ? icon5Dark : icon5Light}
data-atropos-offset={14}
/>
<img
css={style.featureIcon6}
src={isDark ? icon6Dark : icon6Light}
data-atropos-offset={12}
/>
</Atropos>
</div>
<div css={style.actionWrap}>
<h1 css={style.actionTitle}>Ant Design Mini</h1>
<div css={style.actionSubTitle}>
{lang.desc}
</div>
<div>
<a
css={style.actionMainBtn}
href={actionHref[lang.key].quickStart}
>
<span>
{lang.integration}
</span>
<img
css={style.actionMainBtnImage}
src="https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/FU4JTap3m3QAAAAAAAAAAAAADoEQAQFr/original"
/>
</a>
<a
css={style.actionSubBtn}
href={actionHref[lang.key].tryComponent}
>
{lang.try}
</a>
</div>
</div>
</div>
</div>
)
}
================================================
FILE: .dumi/theme/builtins/HomeBaseLayout/components/Frame/index.tsx
================================================
import { css } from '@emotion/react';
import useLocaleValue from "../../../../../theme/hooks/useLocaleValue";
import useSiteToken from "../../../../../theme/hooks/useSiteToken";
import Title from "../Title";
const frameList = {
'zh-CN': [
{
title: 'Ant Design',
subTitle: '企业级产品设计体系',
logo: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/BdagQ4iT8TMAAAAAAAAAAAAADoEQAQFr/original',
href: 'https://ant.design/',
},
{
title: 'AntV',
subTitle: '全新一代数据可视化解决方案',
logo: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/j-PwR5GHEWYAAAAAAAAAAAAADoEQAQFr/original',
href: 'https://antv.antgroup.com/'
},
{
title: 'Ant Design Mobile',
subTitle: 'Ant Design 移动端 UI 组件库',
logo: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/6gdISLFqBBAAAAAAAAAAAAAADoEQAQFr/original',
href: 'https://mobile.ant.design/'
},
{
title: 'Kitchen',
subTitle: '一款为设计者提升效率的工具集',
logo: 'https://gw.alipayobjects.com/zos/bmw-prod/af1ea898-bf02-45d1-9f30-8ca851c70a5b.svg',
href: 'https://kitchen.alipay.com/'
}
],
'en': [
{
title: 'Ant Design',
subTitle: 'Design System',
logo: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/BdagQ4iT8TMAAAAAAAAAAAAADoEQAQFr/original',
href: 'https://ant.design/',
},
{
title: 'AntV',
subTitle: 'Data Visualization Solution',
logo: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/j-PwR5GHEWYAAAAAAAAAAAAADoEQAQFr/original',
href: 'https://antv.antgroup.com/'
},
{
title: 'Ant Design Mobile',
subTitle: 'Mobile UI Component Library',
logo: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/6gdISLFqBBAAAAAAAAAAAAAADoEQAQFr/original',
href: 'https://mobile.ant.design/'
},
{
title: 'Kitchen',
subTitle: 'Enhance Efficiency for Designers',
logo: 'https://gw.alipayobjects.com/zos/bmw-prod/af1ea898-bf02-45d1-9f30-8ca851c70a5b.svg',
href: 'https://kitchen.alipay.com/'
}
]
}
const useStyle = ({
isDark,
isMobile,
}) => {
const { token } = useSiteToken();
const { fontFamily } = token;
return {
container: css`
width: 100%;
min-height: 476px;
font-family: PuHuiTi, ${fontFamily}, sans-serif;
padding-top: 80px;
padding-bottom: 100px;
padding-left: 24px;
padding-right: 24px;
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
`,
contentWrap: css`
width: 100%;
max-width: 1200px;
padding-top: 50px;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
`,
itemWrap: css`
all: initial;
margin-bottom: 24px;
min-width: 271px;
height: 163px;
border-radius: 12px;
box-shadow: ${
isDark ? 'unset' : '0px 10px 28px 0px #718ecc1f'
};
background: ${
isDark ? '#26272e' : '#ffffff'
};
box-sizing: border-box;
padding: 22px;
text-align: left;
margin-right: 24px;
cursor: pointer;
&:last-of-type {
margin-right: 0;
}
@media (max-width: 1220px) {
width: 48%;
margin-right:0;
}
@media (max-width: 600px) {
width: 100%;
margin-right:0;
}
cursor: pointer;
`,
itemImg: css`
height: 50px;
margin-bottom: 15px;
`,
itemTitle: css`
font-size: 20px;
font-weight: medium;
color: ${
isDark ? '#c5cad1' : 'rgba(0, 0, 0, 0.85)'
};
margin-bottom: 6px;
`,
itemSubTitle: css`
font-size: 14px;
color: ${
isDark ? '#808080' : 'rgba(0, 0, 0, 0.65)'
}
`
};
};
export default ({
isDark,
isMobile,
}) => {
const lang = useLocaleValue('frameLocales');
const style = useStyle({
isDark,
isMobile,
});
return (
<div css={style.container}>
<Title
title={lang.title}
subTitle={lang.subTitle}
isDark={isDark}
/>
<div css={style.contentWrap}>
{
(frameList[lang.key] || []).map((item) => {
return (
<a
css={style.itemWrap}
key={item.title}
href={item.href}
>
<img
src={item.logo}
css={style.itemImg}
/>
<div css={style.itemTitle}>
{item.title}
</div>
<div css={style.itemSubTitle}>
{item.subTitle}
</div>
</a>
)
})
}
</div>
</div>
)
}
================================================
FILE: .dumi/theme/builtins/HomeBaseLayout/components/Gallery/ItemBox/index.tsx
================================================
import { css } from '@emotion/react';
import useSiteToken from "../../../../../../theme/hooks/useSiteToken";
import useLocaleValue from "../../../../../../theme/hooks/useLocaleValue";
import { Tag } from 'antd';
const useStyle = ({
isDark,
isMobile,
}) => {
const { token } = useSiteToken();
const { fontFamily } = token;
return {
container: css`
font-family: PuHuiTi, ${fontFamily}, sans-serif;
background: ${
isDark ?
'#26272e' :
'linear-gradient(105deg, #f5f8ffcc 8%, #f2f5fccc 37%, #e7f0fecc 71%, #e6effecc 107%)'
};
border-radius: 8px;
height: 380px;
padding: 24px;
margin-right: 24px;
margin-bottom: 24px;
padding-left: 24px;
padding-right: 24px;
position: relative;
display: flex;
flex-direction: column;
box-sizing: border-box;
flex-wrap: wrap-all;
&:last-of-type {
margin-right: 0;
}
@media (max-width: 1400px) {
width: 46%;
&:nth-of-type(2n) {
margin-right: 0;
}
}
@media (max-width: 600px) {
width: 100%;
margin-right: 24px;
margin-left: 24px;
&:nth-of-type(2n) {
margin-right: 24px;
}
}
`,
titleWrap: css`
display: flex;
align-items: center;
`,
title: css`
font-size: 20px;
font-weight: medium;
margin-right: 8px;
`,
imgWrap: css`
flex: 1;
display: flex;
align-items: center;
justify-content: center;
`,
img: css`
pointer-events: none;
`
};
};
export default ({
children,
data,
isDark,
isMobile,
}) => {
const style = useStyle({
isDark,
isMobile,
});
return (
<div css={style.container}>
<div css={style.titleWrap}>
<span css={style.title}>
{data.title}
</span>
<Tag
color={data.isNew ? 'blue' : 'orange'}
>
{data.tag}
</Tag>
</div>
<div css={style.imgWrap}>
<img
css={style.img}
src={isDark ? data.dark : data.light}
width={data.width}
/>
</div>
</div>
)
}
================================================
FILE: .dumi/theme/builtins/HomeBaseLayout/components/Gallery/index.tsx
================================================
import { css } from '@emotion/react';
import useLocaleValue from "../../../../../theme/hooks/useLocaleValue";
import useSiteToken from "../../../../../theme/hooks/useSiteToken";
import Title from "../Title";
import ItemBox from './ItemBox';
const componentList = {
'zh-CN': [
{
title: '筛选',
tag: '新增',
isNew: true,
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/AsAYR6Ppeh4AAAAAAAAAAAAADoEQAQFr/fmt.webp',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/Up6kR4FSEbEAAAAAAAAAAAAADoEQAQFr/fmt.webp',
width: 300,
},
{
title: '反馈菜单',
tag: '新增',
isNew: true,
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/Ue6ISoWoCSwAAAAAAAAAAAAADoEQAQFr/fmt.webp',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/MWKcSIUJ_yQAAAAAAAAAAAAADoEQAQFr/fmt.webp',
width: 227,
},
{
title: '宫格',
tag: '更新',
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/_vCuQ7g10ykAAAAAAAAAAAAADoEQAQFr/original',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/HyFJRYNQX2YAAAAAAAAAAAAADoEQAQFr/original',
width: 300,
},
{
title: '弹窗',
tag: '更新',
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/ASJORa_fgK0AAAAAAAAAAAAADoEQAQFr/original',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/bjnWQbPPz6sAAAAAAAAAAAAADoEQAQFr/original',
width: 240,
},
],
'en': [
{
title: 'Filter',
tag: 'New',
isNew: true,
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/UH1UT6hvmV4AAAAAAAAAAAAADoEQAQFr/fmt.webp',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/fj-qRIzRNxIAAAAAAAAAAAAADoEQAQFr/original',
width: 300,
},
{
title: 'Feedback',
tag: 'New',
isNew: true,
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/rSKaQrWB2mUAAAAAAAAAAAAADoEQAQFr/fmt.webp',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/RFoKS5D1XhcAAAAAAAAAAAAADoEQAQFr/fmt.webp',
width: 227,
},
{
title: 'Grid',
tag: 'Update',
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/OOtIRLHJSNIAAAAAAAAAAAAADoEQAQFr/original',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/oAG3SI8Eq0MAAAAAAAAAAAAADoEQAQFr/original',
width: 300,
},
{
title: 'Modal',
tag: 'Update',
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/IjTYSalsOJIAAAAAAAAAAAAADoEQAQFr/original',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/KZp7Sq0kceYAAAAAAAAAAAAADoEQAQFr/original',
width: 240,
},
]
}
const useStyle = ({
isDark,
isMobile,
}) => {
const { token } = useSiteToken();
const { fontFamily } = token;
return {
container: css`
width: 100%;
min-height: 693px;
font-family: PuHuiTi, ${fontFamily}, sans-serif;
padding-top: 80px;
padding-bottom: 100px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
box-sizing: border-box;
`,
contentWrap: css`
width: 100%;
padding-top: 50px;
display: flex;
justify-content: center;
flex-wrap: wrap;
@media (min-width: 1600px) {
max-width: 1600px;
}
`
};
};
export default ({
isDark,
isMobile,
}) => {
const lang = useLocaleValue('galleryLocales');
const style = useStyle({
isDark,
isMobile,
});
return (
<div css={style.container}>
<Title
title={lang.title}
subTitle={lang.subTitle}
isDark={isDark}
/>
<div css={style.contentWrap}>
{
(componentList[lang.key] || []).map((item) => {
return (
<ItemBox
key={item.title}
data={item}
isDark={isDark}
isMobile={isMobile}
/>
)
})
}
</div>
</div>
)
}
================================================
FILE: .dumi/theme/builtins/HomeBaseLayout/components/Notice/index.tsx
================================================
import useLocaleValue from "../../../../../theme/hooks/useLocaleValue";
export default ({ config }) => {
const lang = useLocaleValue('frameLocales');
return <div>
Notice - 是否是移动端: {config.isMobile + ''} - 主题模式:{config.theme}
<button>
{lang.button}
</button>
<div>
----------------------------
</div>
</div>
}
================================================
FILE: .dumi/theme/builtins/HomeBaseLayout/components/Theme/index.tsx
================================================
import { css } from '@emotion/react';
import Atropos from 'atropos/react';
import useLocaleValue from "../../../../../theme/hooks/useLocaleValue";
import useSiteToken from "../../../../../theme/hooks/useSiteToken";
import Title from "../Title";
import 'atropos/css'
import { Button } from 'antd';
import { useContext } from 'react';
import { SwapOutlined } from '@ant-design/icons';
import SiteContext from '../../../../../theme/slots/SiteContext';
import { history } from 'dumi';
const lightBg = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/zBllT4iUaJsAAAAAAAAAAAAADoEQAQFr/fmt.webp';
const darkBg = 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/pgE1TJxC04UAAAAAAAAAAAAADoEQAQFr/fmt.webp';
const componentList = {
'zh-CN': [
{
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/QjFTR5kfTYcAAAAAAAAAAAAADoEQAQFr/original',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/b3HpTI5EcCcAAAAAAAAAAAAADoEQAQFr/original',
width: 225,
left: 200,
top: 10,
},
{
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/-IF1RbuTd2gAAAAAAAAAAAAADoEQAQFr/original',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/xOMxRrX_QR4AAAAAAAAAAAAADoEQAQFr/fmt.webp',
width: 84,
left: 550,
top: 50,
},
{
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/8EhnSpjjRU0AAAAAAAAAAAAADoEQAQFr/fmt.webp',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/xQrURLJoIuEAAAAAAAAAAAAADoEQAQFr/fmt.webp',
width: 180,
right: 430,
top: 1,
},
{
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/v7U7RZvZp4gAAAAAAAAAAAAADoEQAQFr/fmt.webp',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/vsHXR72JvIYAAAAAAAAAAAAADoEQAQFr/fmt.webp',
width: 220,
left: 289,
bottom: 1,
},
{
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/Go4iQaJZ2cMAAAAAAAAAAAAADoEQAQFr/fmt.webp',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/aZQgR5ipEcEAAAAAAAAAAAAADoEQAQFr/fmt.webp',
width: 200,
right: 550,
bottom: 180,
},
{
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/zgbaTa7YGg4AAAAAAAAAAAAADoEQAQFr/fmt.webp',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/C4Z0T49uhRIAAAAAAAAAAAAADoEQAQFr/fmt.webp',
width: 225,
right: 220,
bottom: 50,
}
],
'en': [
{
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/8OhhTq-HAZEAAAAAAAAAAAAADoEQAQFr/original',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/p2awRb3Tb4QAAAAAAAAAAAAADoEQAQFr/original',
width: 225,
left: 200,
top: 10,
},
{
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/akgcToUvzGEAAAAAAAAAAAAADoEQAQFr/original',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/HNlmQpepfRgAAAAAAAAAAAAADoEQAQFr/fmt.webp',
width: 84,
left: 550,
top: 50,
},
{
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/ztdYTrOnHRwAAAAAAAAAAAAADoEQAQFr/fmt.webp',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/wyKSSbyBj0sAAAAAAAAAAAAADoEQAQFr/fmt.webp',
width: 180,
right: 430,
top: 1,
},
{
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/maFaSK0Zz8sAAAAAAAAAAAAADoEQAQFr/fmt.webp',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/T2N8R72pevMAAAAAAAAAAAAADoEQAQFr/original',
width: 220,
left: 289,
bottom: 1,
},
{
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/OETGRLpfrpcAAAAAAAAAAAAADoEQAQFr/original',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/zeGhSYYOx1MAAAAAAAAAAAAADoEQAQFr/fmt.webp',
width: 200,
right: 550,
bottom: 180,
},
{
dark: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/cFqQQqDs_oQAAAAAAAAAAAAADoEQAQFr/fmt.webp',
light: 'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/g9_bRZ9xX4EAAAAAAAAAAAAADoEQAQFr/fmt.webp',
width: 225,
right: 220,
bottom: 50,
}
]
}
const useStyle = ({
isDark,
isMobile,
}) => {
const { token } = useSiteToken();
const { fontFamily } = token;
return {
container: css`
width: 100%;
height: 782px;
font-family: PuHuiTi, ${fontFamily}, sans-serif;
padding-top: 80px;
padding-bottom: 100px;
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
position: relative;
background-color: ${
isDark ?
'#0a0a0a' :
'#f1f5ff'
};
background-image: url(${isDark ? darkBg : lightBg});
background-position: center 50px;
background-size: 900px;
background-repeat: no-repeat;
`,
contentWrap: css`
width: 100%;
height: 400px;
max-width: 1600px;
margin-top: 50px;
display: flex;
position: relative;
& .atropos-shadow {
display: none;
}
`,
compImg: css`
@media (max-width: 1200px) {
display: none;
}
`
};
};
export default ({
isDark,
isMobile,
}) => {
const lang = useLocaleValue('themeLocales');
const style = useStyle({
isDark,
isMobile,
});
const { updateSiteConfig } = useContext(SiteContext);
const isEn = lang.key === 'en';
return (
<div css={style.container}>
<Title
title={lang.title}
subTitle={lang.subTitle}
isDark={isDark}
>
<div>
<Button
type='primary'
size='large'
icon={<SwapOutlined />}
iconPosition='end'
style={{
margin: 24
}}
onClick={
() => {
const themeValue = isDark ? 'light' : 'dark';
updateSiteConfig({ theme: [themeValue] });
}
}
>
{isDark ? lang.light : lang.dark}
</Button>
<Button
type='primary'
size='large'
icon={<SwapOutlined />}
iconPosition='end'
onClick={
() => {
history.push({
pathname: isEn ? '/' : '/index-en',
});
}
}
>
{lang.langDesc}
</Button>
</div>
</Title>
<Atropos
css={style.contentWrap}
highlight={false}
activeOffset={0}
rotateXMax={2}
rotateYMax={2}
>
{
(componentList[lang.key] || []).map((item, index) => {
let clientWidth = document.documentElement.clientWidth;
if (clientWidth > 1600) {
clientWidth = 1600;
}
const rate = clientWidth / 1600;
return (
<img
data-atropos-offset={(index + 1) * 1.5}
key={item.dark}
src={isDark ? item.dark : item.light}
css={style.compImg}
style={{
zIndex: 90,
pointerEvents: 'none',
width: item.width,
position: 'absolute',
left: item.left * rate || 'unset',
right: item.right * rate || 'unset',
top: item.top || 'unset',
bottom: item.bottom || 'unset',
}}
/>
)
})
}
</Atropos>
</div>
)
}
================================================
FILE: .dumi/theme/builtins/HomeBaseLayout/components/Title/index.tsx
================================================
import { css } from '@emotion/react';
import useSiteToken from "../../../../../theme/hooks/useSiteToken";
const useStyle = ({ isDark }) => {
const { token } = useSiteToken();
const { fontFamily } = token;
return {
container: css`
text-align: center;
`,
title: css`
font-family: PuHuiTi, ${fontFamily}, sans-serif;
font-size: 34px;
margin-bottom: 4px;
`,
subTitle: css`
font-family: PuHuiTi, ${fontFamily}, sans-serif;
font-size: 16px;
color: ${isDark ? '#808080' : '#697A8C'};
`,
};
};
export default ({ title, subTitle, isDark , children }) => {
const style = useStyle({ isDark });
return (
<div css={style.container}>
<h2 css={style.title}>{title}</h2>
<div css={style.subTitle}>{subTitle}</div>
{ children }
</div>
)
}
================================================
FILE: .dumi/theme/builtins/HomeBaseLayout/components/Users/index.tsx
================================================
import { css } from '@emotion/react';
import useLocaleValue from "../../../../../theme/hooks/useLocaleValue";
import useSiteToken from "../../../../../theme/hooks/useSiteToken";
const lightLogos = [
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/rYmkS4S3-2YAAAAAAAAAAAAADoEQAQFr/original',
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/rlkkR4luEpAAAAAAAAAAAAAADoEQAQFr/fmt.webp',
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/CI-RRYHHGmoAAAAAAAAAAAAADoEQAQFr/fmt.webp',
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/X1KRTbLoQMsAAAAAAAAAAAAADoEQAQFr/original',
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/wSHKRoozEE4AAAAAAAAAAAAADoEQAQFr/fmt.webp',
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/LwlER4SjL_AAAAAAAAAAAAAADoEQAQFr/original',
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/zSMkRp7RNfMAAAAAAAAAAAAADoEQAQFr/original',
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/E2jUT5GhF30AAAAAAAAAAAAADoEQAQFr/fmt.webp'
]
const darkLogos = [
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/W8O-QqPKw0YAAAAAAAAAAAAADoEQAQFr/original',
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/9VzgSIlhDd8AAAAAAAAAAAAADoEQAQFr/original',
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/zB90Q7-Wz0sAAAAAAAAAAAAADoEQAQFr/original',
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/zpgEQJKFV-kAAAAAAAAAAAAADoEQAQFr/original',
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/vHcDSa-L-a8AAAAAAAAAAAAADoEQAQFr/original',
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/mfSjRr_6ti8AAAAAAAAAAAAADoEQAQFr/original',
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/PMj4S4ve5tAAAAAAAAAAAAAADoEQAQFr/original',
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/RUL4SZC87fAAAAAAAAAAAAAADoEQAQFr/original'
]
const useStyle = ({
isDark,
isMobile,
}) => {
const { token } = useSiteToken();
const { fontFamily } = token;
return {
mainContainer: css`
width: 100%;
min-height: 195px;
font-family: PuHuiTi, ${fontFamily}, sans-serif;
display: flex;
background-color: ${isDark ? '#161616' : '#fff'};
flex-direction: column;
justify-content: center;
align-items: center;
`,
title: css`
font-size: 20px;
margin-bottom: 35px;
margin-top: 35px;
color: ${isDark ? '#808080' : '#697A8C'};
`,
logoWrap: css`
padding-left: 100px;
padding-right: 100px;
box-sizing: border-box;
width: 100%;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
@media (min-width: 1600px) {
max-width: 1600px;
}
@media (max-width: 1440px) {
justify-content: center;
}
`,
logoItemWrap: css`
margin-bottom: 24px;
&:last-of-type {
margin-right: 0;
}
@media (max-width: 1500px) {
width: 25%;
text-align: center;
min-width: 184px;
}
@media (max-width: 780px) {
width: 30%;
text-align: center;
min-width: 184px;
}
`,
logo: css`
height: 38px;
pointer-events: none;
`
};
};
export default ({
isDark,
isMobile,
}) => {
const lang = useLocaleValue('userLocales');
const style = useStyle({
isDark,
isMobile,
});
return (
<div css={style.mainContainer}>
<div css={style.title}>{lang.title}</div>
<div css={style.logoWrap}>
{
(isDark ? darkLogos : lightLogos).map((item) => {
return (
<div css={style.logoItemWrap}>
<img
src={item}
key={item}
css={style.logo}
/>
</div>
)
})
}
</div>
</div>
)
}
================================================
FILE: .dumi/theme/builtins/HomeBaseLayout/index.tsx
================================================
import { css } from '@emotion/react';
import { useContext, type FC } from 'react';
import SiteContext from '../../slots/SiteContext';
import type { SiteContextProps } from '../../slots/SiteContext';
import Banner from './components/Banner';
import Users from './components/Users';
import Gallery from './components/Gallery';
import Theme from './components/Theme';
import Frame from './components/Frame';
// import Notice from './components/Notice';
const useStyle = () => {
return {
mainContent: css`
position: relative;
text-align: center;
flex: 1;
padding-top: 64px;
`,
};
};
const HomeBaseLayout: FC = () => {
const style = useStyle();
const siteConfig = useContext<SiteContextProps>(SiteContext);
const isDark = siteConfig.theme.includes('dark');
const isMobile = !!siteConfig.isMobile;
return (
<div css={style.mainContent}>
{/* 公告 */}
{/* <Notice
config={siteConfig}
/> */}
{/* 顶部 Banner */}
<Banner
config={siteConfig}
isDark={isDark}
isMobile={isMobile}
/>
{/* 谁在使用 */}
<Users
config={siteConfig}
isDark={isDark}
isMobile={isMobile}
/>
{/* 组件模块 */}
<Gallery
config={siteConfig}
isDark={isDark}
isMobile={isMobile}
/>
{/* 主题和多语言模块 */}
<Theme
config={siteConfig}
isDark={isDark}
isMobile={isMobile}
/>
{/* 设计语言与研发框架模块 */}
<Frame
config={siteConfig}
isDark={isDark}
isMobile={isMobile}
/>
</div>
);
};
export default HomeBaseLayout;
================================================
FILE: .dumi/theme/builtins/Icon.less
================================================
@font-face {
font-family: antdmini-icon;
src: url("https://gw.alipayobjects.com/os/bmw-prod/578c472b-19a7-44ab-a92d-adc367ee2fe2.ttf?v=20210115") format("truetype");
}
.list-icons {
display: flex;
flex-wrap:wrap;
}
.list-icon {
display: flex;
justify-content: center;
align-items: center;
width: 16.66%;
height: 100px;
margin: 3px 0;
padding: 10px;
text-align: center;
border-radius: 4px;
cursor: pointer;
&:hover {
color: #fff;
background-color: #1677ff;
}
transition: color 0.3s ease-in-out,background-color 0.3s ease-in-out;
}
.icontype {
margin-top: 8px;
font-size: 12px;
}
@iconPrefix: ant-icon;
.@{iconPrefix} {
/* stylelint-disable font-family-no-missing-generic-family-keyword */
font-family: antdmini-icon !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
line-height: 1;
font-size: 40px;
&-MinusOutline:before {
content: "\e66f";
}
&-AlipayCircleFill:before {
content: "\e670";
}
&-CheckCircleFill:before {
content: "\e671";
}
&-FireFill:before {
content: "\e672";
}
&-FaceRecognitionOutline:before {
content: "\e673";
}
&-StarFill:before {
content: "\e674";
}
&-EyeInvisibleFill:before {
content: "\e675";
}
&-SmileFill:before {
content: "\e676";
}
&-FrownFill:before {
content: "\e677";
}
&-BankcardOutline:before {
content: "\e678";
}
&-HeartOutline:before {
content: "\e679";
}
&-EyeFill:before {
content: "\e67a";
}
&-HeartFill:before {
content: "\e67b";
}
&-DownFill:before {
content: "\e67c";
}
&-CloseCircleFill:before {
content: "\e67d";
}
&-VideoOutline:before {
content: "\e67e";
}
&-CouponOutline:before {
content: "\e67f";
}
&-ReceiptOutline:before {
content: "\e680";
}
&-AntOutline:before {
content: "\e681";
}
&-UserCircleOutline:before {
content: "\e682";
}
&-PayCircleOutline:before {
content: "\e683";
}
&-BillOutline:before {
content: "\e684";
}
&-PlayOutline:before {
content: "\e685";
}
&-PayOutline:before {
content: "\e686";
}
&-MoreOutline:before {
content: "\e687";
}
&-ShrinkOutline:before {
content: "\e688";
}
&-ArrowsAltOutline:before {
content: "\e689";
}
&-StarOutline:before {
content: "\e68a";
}
&-CheckOutline:before {
content: "\e68b";
}
&-DeleteOutline:before {
content: "\e68c";
}
&-LinkOutline:before {
content: "\e68d";
}
&-InformationCircleOutline:before {
content: "\e68e";
}
&-GlobalOutline:before {
content: "\e68f";
}
&-InformationCircleFill:before {
content: "\e690";
}
&-ExclamationCircleFill:before {
content: "\e691";
}
&-CheckCircleOutline:before {
content: "\e692";
}
&-CloseCircleOutline:before {
content: "\e693";
}
&-SetOutline:before {
content: "\e694";
}
&-QuestionCircleFill:before {
content: "\e695";
}
&-QuestionCircleOutline:before {
content: "\e696";
}
&-UpCircleOutline:before {
content: "\e697";
}
&-FrownOutline:before {
content: "\e698";
}
&-DownCircleOutline:before {
content: "\e699";
}
&-ExclamationCircleOutline:before {
content: "\e69a";
}
&-MinusCircleOutline:before {
content: "\e69b";
}
&-RedoOutline:before {
content: "\e69c";
}
&-UndoOutline:before {
content: "\e69d";
}
&-EyeInvisibleOutline:before {
content: "\e69e";
}
&-ForbidFill:before {
content: "\e69f";
}
&-PicturesOutline:before {
content: "\e6a0";
}
&-PictureOutline:before {
content: "\e6a1";
}
&-PictureWrongOutline:before {
content: "\e6a2";
}
&-EyeOutline:before {
content: "\e6a3";
}
&-AddCircleOutline:before {
content: "\e6a4";
}
&-ClockCircleFill:before {
content: "\e6a5";
}
&-ClockCircleOutline:before {
content: "\e6a6";
}
&-BellMuteOutline:before {
content: "\e6a7";
}
&-KeyOutline:before {
content: "\e6a8";
}
&-BellOutline:before {
content: "\e6a9";
}
&-SearchOutline:before {
content: "\e6aa";
}
&-CollectMoneyOutline:before {
content: "\e6ab";
}
&-UnorderedListOutline:before {
content: "\e6ac";
}
&-AppstoreOutline:before {
content: "\e6ad";
}
&-ExclamationTriangleOutline:before {
content: "\e6ae";
}
&-AddOutline:before {
content: "\e6af";
}
&-ScanningOutline:before {
content: "\e6b0";
}
&-ScanCodeOutline:before {
content: "\e6b1";
}
&-ExclamationOutline:before {
content: "\e6b2";
}
&-CloseOutline:before {
content: "\e6b3";
}
&-ScanningFaceOutline:before {
content: "\e6b4";
}
&-LeftOutline:before {
content: "\e6b5";
}
&-DownOutline:before {
content: "\e6b6";
}
&-UpOutline:before {
content: "\e6b7";
}
&-RightOutline:before {
content: "\e6b8";
}
&-KoubeiOutline:before {
content: "\e6b9";
}
&-KoubeiFill:before {
content: "\e6ba";
}
&-AAOutline:before {
content: "\e6bb";
}
&-ArrowDownCircleOutline:before {
content: "\e6bc";
}
&-MovieOutline:before {
content: "\e6bd";
}
&-CompassOutline:before {
content: "\e6be";
}
&-LoopOutline:before {
content: "\e6bf";
}
&-TextOutline:before {
content: "\e6c0";
}
&-TagOutline:before {
content: "\e6c1";
}
&-FlagOutline:before {
content: "\e6c2";
}
&-EnvironmentOutline:before {
content: "\e6c3";
}
&-CalendarOutline:before {
content: "\e6c4";
}
&-LocationFill:before {
content: "\e6c5";
}
&-PhoneFill:before {
content: "\e6c6";
}
&-PhonebookOutline:before {
content: "\e6c7";
}
&-SmileOutline:before {
content: "\e6c8";
}
&-UserAddOutline:before {
content: "\e6c9";
}
&-FileWrongOutline:before {
content: "\e6ca";
}
&-SoundMuteFill:before {
content: "\e6cb";
}
&-SoundMuteOutline:before {
content: "\e6cc";
}
&-LockOutline:before {
content: "\e6cd";
}
&-UnlockOutline:before {
content: "\e6ce";
}
&-EditSOutline:before {
content: "\e6cf";
}
&-UploadOutline:before {
content: "\e6d0";
}
&-SoundOutline:before {
content: "\e6d1";
}
&-DownlandOutline:before {
content: "\e6d2";
}
&-SendOutline:before {
content: "\e6d3";
}
&-FillinOutline:before {
content: "\e6d4";
}
&-AudioMutedOutline:before {
content: "\e6d5";
}
&-AudioOutline:before {
content: "\e6d6";
}
&-UserOutline:before {
content: "\e6d7";
}
&-UserContactOutline:before {
content: "\e6d8";
}
&-TeamOutline:before {
content: "\e6d9";
}
&-UserSetOutline:before {
content: "\e6da";
}
&-FileOutline:before {
content: "\e6db";
}
&-MailOutline:before {
content: "\e6dc";
}
&-TruckOutline:before {
content: "\e6dd";
}
&-MailOpenOutline:before {
content: "\e6de";
}
&-ChatCheckOutline:before {
content: "\e6df";
}
&-ChatAddOutline:before {
content: "\e6e0";
}
&-ChatWrongOutline:before {
content: "\e6e1";
}
&-PhonebookFill:before {
content: "\e6e2";
}
&-AddressBookFill:before {
content: "\e6e3";
}
&-CalculatorOutline:before {
content: "\e6e4";
}
&-PieOutline:before {
content: "\e6e5";
}
&-HandPayCircleOutline:before {
content: "\e6e6";
}
&-GiftOutline:before {
content: "\e6e7";
}
&-TransportQRcodeOutline:before {
content: "\e6e8";
}
&-FolderOutline:before {
content: "\e6e9";
}
&-AlipaySquareFill:before {
content: "\e6ea";
}
&-TravelOutline:before {
content: "\e6eb";
}
&-AppOutline:before {
content: "\e6ec";
}
&-HistogramOutline:before {
content: "\e6ed";
}
&-MailFill:before {
content: "\e6ee";
}
&-CameraOutline:before {
content: "\e6ef";
}
&-EditFill:before {
content: "\e6f0";
}
&-SystemQRcodeOutline:before {
content: "\e6f1";
}
&-LockFill:before {
content: "\e6f2";
}
&-AudioFill:before {
content: "\e6f3";
}
&-TeamFill:before {
content: "\e6f4";
}
&-FilterOutline:before {
content: "\e6f5";
}
&-EditSFill:before {
content: "\e6f6";
}
&-LikeOutline:before {
content: "\e6f7";
}
&-TextDeletionOutline:before {
content: "\e6f8";
}
&-StopOutline:before {
content: "\e6f9";
}
&-FingerdownOutline:before {
content: "\e6fa";
}
&-MessageFill:before {
content: "\e6fb";
}
&-LocationOutline:before {
content: "\e6fc";
}
&-ContentOutline:before {
content: "\e6fd";
}
&-ExclamationShieldFill:before {
content: "\e6fe";
}
&-ReceivePaymentOutline:before {
content: "\e6ff";
}
&-ExclamationShieldOutline:before {
content: "\e700";
}
&-AddSquareOutline:before {
content: "\e701";
}
&-CloseShieldOutline:before {
content: "\e702";
}
&-CheckShieldOutline:before {
content: "\e703";
}
&-CheckShieldFill:before {
content: "\e704";
}
&-ShopbagOutline:before {
content: "\e705";
}
&-MessageOutline:before {
content: "\e706";
}
}
================================================
FILE: .dumi/theme/builtins/Icon.tsx
================================================
import React, { useState } from 'react';
import { Input } from 'antd';
import copy from 'copy-to-clipboard';
import { FormattedMessage } from 'dumi';
import './Icon.less';
const { Search } = Input;
const iconTypes = [
'MinusOutline',
'AlipayCircleFill',
'CheckCircleFill',
'FireFill',
'FaceRecognitionOutline',
'StarFill',
'EyeInvisibleFill',
'SmileFill',
'FrownFill',
'BankcardOutline',
'HeartOutline',
'EyeFill',
'HeartFill',
'DownFill',
'CloseCircleFill',
'VideoOutline',
'CouponOutline',
'ReceiptOutline',
'AntOutline',
'UserCircleOutline',
'PayCircleOutline',
'BillOutline',
'PlayOutline',
'PayOutline',
'MoreOutline',
'ShrinkOutline',
'ArrowsAltOutline',
'StarOutline',
'CheckOutline',
'DeleteOutline',
'LinkOutline',
'InformationCircleOutline',
'GlobalOutline',
'InformationCircleFill',
'ExclamationCircleFill',
'CheckCircleOutline',
'CloseCircleOutline',
'SetOutline',
'QuestionCircleFill',
'QuestionCircleOutline',
'UpCircleOutline',
'FrownOutline',
'DownCircleOutline',
'ExclamationCircleOutline',
'MinusCircleOutline',
'RedoOutline',
'UndoOutline',
'EyeInvisibleOutline',
'ForbidFill',
'PicturesOutline',
'PictureOutline',
'PictureWrongOutline',
'EyeOutline',
'AddCircleOutline',
'ClockCircleFill',
'ClockCircleOutline',
'BellMuteOutline',
'KeyOutline',
'BellOutline',
'SearchOutline',
'CollectMoneyOutline',
'UnorderedListOutline',
'AppstoreOutline',
'ExclamationTriangleOutline',
'AddOutline',
'ScanningOutline',
'ScanCodeOutline',
'ExclamationOutline',
'CloseOutline',
'ScanningFaceOutline',
'LeftOutline',
'DownOutline',
'UpOutline',
'RightOutline',
'KoubeiOutline',
'KoubeiFill',
'AAOutline',
'ArrowDownCircleOutline',
'MovieOutline',
'CompassOutline',
'LoopOutline',
'TextOutline',
'TagOutline',
'FlagOutline',
'EnvironmentOutline',
'CalendarOutline',
'LocationFill',
'PhoneFill',
'PhonebookOutline',
'SmileOutline',
'UserAddOutline',
'FileWrongOutline',
'SoundMuteFill',
'SoundMuteOutline',
'LockOutline',
'UnlockOutline',
'EditSOutline',
'UploadOutline',
'SoundOutline',
'DownlandOutline',
'SendOutline',
'FillinOutline',
'AudioMutedOutline',
'AudioOutline',
'UserOutline',
'UserContactOutline',
'TeamOutline',
'UserSetOutline',
'FileOutline',
'MailOutline',
'TruckOutline',
'MailOpenOutline',
'ChatCheckOutline',
'ChatAddOutline',
'ChatWrongOutline',
'PhonebookFill',
'AddressBookFill',
'CalculatorOutline',
'PieOutline',
'HandPayCircleOutline',
'GiftOutline',
'TransportQRcodeOutline',
'FolderOutline',
'AlipaySquareFill',
'TravelOutline',
'AppOutline',
'HistogramOutline',
'MailFill',
'CameraOutline',
'EditFill',
'SystemQRcodeOutline',
'LockFill',
'AudioFill',
'TeamFill',
'FilterOutline',
'EditSFill',
'LikeOutline',
'TextDeletionOutline',
'StopOutline',
'FingerdownOutline',
'MessageFill',
'LocationOutline',
'ContentOutline',
'ExclamationShieldFill',
'ReceivePaymentOutline',
'ExclamationShieldOutline',
'AddSquareOutline',
'CloseShieldOutline',
'CheckShieldOutline',
'CheckShieldFill',
'ShopbagOutline',
'MessageOutline',
];
const iconLowerCaseTypes = iconTypes.map(item => item.toLowerCase());
function Copy(props) {
const type = props.type;
const [copied, setCopied] = useState(false);
return <div className="list-icon" onClick={() => {
copy(type);
setCopied(true);
}} onMouseLeave={() => {
setCopied(false);
}}>
<div>
{
copied ? <div className='copied'>copied</div> : <>
<span className={`ant-icon ant-icon-${type}`} />
<div className="icontype">{type}</div>
</>
}
</div>
</div>
}
function Icon() {
const [list, setList] = useState(iconTypes);
const outlineList = list.filter(item => item.includes('Outline'));
const fillList = list.filter(item => item.includes('Fill'));
const onInput = (e: any) => {
const value = e.target.value.toLowerCase();
setList(iconTypes.filter((_, index) => iconLowerCaseTypes[index].includes(value)));
}
const onSearch = (v) => {
setList(iconTypes.filter((_, index) => iconLowerCaseTypes[index].includes(v.toLowerCase())));
}
return <>
<div style={{ marginTop: 20 }}>
<Search placeholder="search Icons" allowClear onInput={onInput} onSearch={onSearch} />
</div>
<div className="list-icons">
{
outlineList.map(item => <Copy key={item} type={item} />)
}
{
fillList.map(item => <Copy key={item} type={item} />)
}
</div>
</>
};
export default Icon;
================================================
FILE: .dumi/theme/builtins/OverviewCard.tsx
================================================
import { css } from '@emotion/react';
import { Card, ConfigProvider, Tag, theme } from 'antd';
import { history, useLocale } from 'dumi';
import { useContext } from 'react';
import { ComponentSampleImages } from '../common/config/overview';
import useMenu from '../hooks/useMenu';
import useSiteToken from '../hooks/useSiteToken';
import SiteContext from '../slots/SiteContext';
const useStyle = ({ isDark, isMobile }) => {
const { token } = useSiteToken();
const { fontFamily } = token;
return {
mainContainer: css`
font-family: ${fontFamily};
`,
groupContainer: css``,
groupTitle: css`
font-size: 24px;
font-weight: 500;
display: inline-flex;
align-items: center;
`,
cardWrap: css`
padding-top: 24px;
padding-bottom: 24px;
display: flex;
width: 100%;
flex-wrap: wrap;
`,
card: css`
display: block;
width: 25%;
min-width: 300px;
padding-right: 24px;
padding-bottom: 24px;
box-sizing: border-box;
cursor: pointer;
text-align: center;
@media only screen and (max-width: 1600px) {
width: 33.333%;
}
@media only screen and (max-width: 1200px) {
width: 50%;
}
@media only screen and (max-width: 880px) {
width: 100%;
padding-right: 0;
}
a {
all: initial;
cursor: pointer;
color: ${isDark ? '#fff' : '#333'};
}
.ant-card-head-title a {
font-weight: 500;
}
`,
antCardWrap: css``,
image: css`
height: 100px;
`,
};
};
export default ({ lang }) => {
const [menuItems] = useMenu();
const siteConfig = useContext(SiteContext);
const isDark = siteConfig.theme.includes('dark');
const isMobile = !!siteConfig.isMobile;
const style = useStyle({ isDark, isMobile });
const locale = useLocale();
const isEn = locale.id === 'en';
const imageConfig = isDark
? ComponentSampleImages.dark
: ComponentSampleImages.light;
return (
<ConfigProvider
theme={{
algorithm: isDark ? theme.darkAlgorithm : theme.defaultAlgorithm,
}}
>
<div css={style.mainContainer}>
{menuItems?.slice(1)?.map((parent) => {
return (
<div key={parent.key}>
<span css={style.groupTitle}>
{parent.label}
<Tag
style={{
marginLeft: 8,
}}
>
{(parent.children || []).length}
</Tag>
</span>
<div css={style.cardWrap}>
{(parent.children || []).map((item) => {
return (
<a
key={item.key}
css={style.card}
onClick={() => {
history.push({
pathname: isEn ? item.key + '-en' : item.key,
});
}}
>
<Card
hoverable
title={item.label}
css={style.antCardWrap}
>
<img
src={
(
imageConfig[
item.key.replace('/components/', '')
] ||
imageConfig.default ||
{}
).imageUrl
}
css={style.image}
/>
</Card>
</a>
);
})}
</div>
</div>
);
})}
</div>
</ConfigProvider>
);
};
================================================
FILE: .dumi/theme/builtins/Previewer/index.less
================================================
.sourceCode {
position: relative;
height: calc(100vh - 200px);
overflow: hidden;
border-radius: 0 0 8px 8px;
iframe {
height: 100%;
border: none;
width: 100%;
}
&-loading {
width: 100px;
height: 100px;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
background-color: rgba(22, 119, 255, 0.8);
border-radius: 100%;
animation: sk-scaleout 1s infinite ease-in-out;
}
}
.previewer-collapse {
&.light {
border: 1px solid rgba(5, 5, 5, 0.06) !important;
.ant-collapse-content {
border-top: 1px solid rgba(5, 5, 5, 0.06) !important;
}
}
}
@keyframes sk-scaleout {
0% {
transform: scale(0);
opacity: 1;
}
100% {
transform: scale(1);
opacity: 0;
}
}
================================================
FILE: .dumi/theme/builtins/Previewer/index.tsx
================================================
import { Collapse, ConfigProvider } from 'antd';
import { FormattedMessage } from 'dumi';
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
import type { SiteContextProps } from '../../slots/SiteContext';
import SiteContext from '../../slots/SiteContext';
import './index.less';
interface IProps {
herboxUrl: string;
}
function buildUrl(
basic: string,
options: {
platform: string;
theme: string;
}
) {
const urlObj = new URL(basic);
const searchParams = urlObj.searchParams;
const page = searchParams.get('page');
const { platform: supportPlatform, disablePlatformSwitch } =
getSupportPlatform(options.platform);
searchParams.set('platform', supportPlatform);
searchParams.set('theme', options.theme);
return {
url: urlObj.toString(),
page,
supportPlatform,
disablePlatformSwitch,
};
}
const DefaultPlatform = 'alipay';
function getSupportPlatform(platform: string) {
const supportWechat = true;
if (!supportWechat && platform === 'wechat') {
return {
platform: DefaultPlatform,
disablePlatformSwitch: true,
};
}
return {
platform,
disablePlatformSwitch: false,
};
}
const Previewer: React.FC<IProps> = (props) => {
const { theme, platform, updateSiteConfig } =
useContext<SiteContextProps>(SiteContext);
useEffect(() => {
updateSiteConfig({
herboxUrl: props.herboxUrl,
});
}, [props.herboxUrl]);
const [sourceCodeLoaded, setSourceCodeLoaded] = useState(false);
const sourceCodeRef = useRef<any>(null);
const basicUrl =
window.location.protocol + '//' + window.location.host + props.herboxUrl;
const { url, page } = useMemo(() => {
return buildUrl(basicUrl, {
theme: theme?.find((t) => ['dark', 'light'].includes(t)) || 'light',
platform,
});
}, [basicUrl, theme, platform]);
function sendMsgToSourceCode(theme) {
const sourceCodeiframe = sourceCodeRef.current;
if (!sourceCodeiframe) return;
const setThemeColor = function () {
sourceCodeiframe?.contentWindow?.postMessage({
type: 'setIsDarkMode',
data: theme.includes('dark'),
});
};
sourceCodeiframe.onload = () => {
setThemeColor();
setTimeout(setThemeColor, 500);
setTimeout(setThemeColor, 1000);
};
setThemeColor();
}
useEffect(() => {
sendMsgToSourceCode(theme);
}, [theme, page, platform]);
return (
// @ts-ignore
<ConfigProvider
theme={{
components: {
Collapse: {
contentPadding: '0 !important',
headerPadding: '8px !important',
headerBg: theme.includes('dark') ? 'transparent' : '#f7f7f7',
},
},
}}
>
{/* @ts-ignore */}
<Collapse
className={`previewer-collapse ${
theme.includes('dark') ? 'dark' : 'light'
}`}
size="large"
items={[
{
key: '1',
label: <FormattedMessage id="app.previewer.collapse.label" />,
forceRender: true,
children: (
<div className="sourceCode">
{!sourceCodeLoaded && <div className="previewer-loading" />}
<iframe
ref={sourceCodeRef}
src={url.replace('preview.html', 'code.html')}
onLoad={() => setSourceCodeLoaded(true)}
allow="clipboard-read; clipboard-write"
/>
</div>
),
},
]}
onChange={(openList) => {
const setMsgToSim = window.setMsgToSim;
if (openList.length === 0) {
// 关闭
setMsgToSim &&
setMsgToSim(`
my.navigateBack();
`);
return;
}
// 打开
setMsgToSim &&
setMsgToSim(`
const currentPage = getCurrentPages()[0].route
if(currentPage !== '${page}') {
my.navigateTo({
url: '/${page}'
});
}
`);
}}
/>
</ConfigProvider>
);
};
export default Previewer;
================================================
FILE: .dumi/theme/builtins/ResourceCard.less
================================================
.card {
border: solid 1px #d9d9d9;
border-radius: 12px;
display: inline-flex;
width: 360px;
min-height: 108px;
padding: 8px 16px;
justify-content: flex-start;
align-items: center;
text-decoration: none;
margin: 12px 12px 12px 0;
transition: background-color ease 0.5s;
&:hover {
background-color: #f5f5f5;
[data-prefers-color='dark'] & {
background-color: #333;
}
}
img {
flex: none;
display: block;
height: 72px;
width: 72px;
border-radius: 8px;
}
.content {
flex: auto;
margin-left: 16px;
}
.title {
font-size: 20px;
font-weight: 400;
color: rgba(0, 0, 0, 0.85);
margin-bottom: 4px;
[data-prefers-color='dark'] & {
color: rgba(255, 255, 255, 0.65);
}
}
.description {
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
[data-prefers-color='dark'] & {
color: rgba(255, 255, 255, 0.65);
}
}
}
================================================
FILE: .dumi/theme/builtins/ResourceCard.tsx
================================================
import { FC } from 'react';
import './ResourceCard.less'
type Props = {
image?: string;
title: string;
description: string;
link: string;
};
const ResourceCard: FC<Props> = (props) => {
return (
<a className={'card'} href={props.link} target="_blank">
{props.image && <img src={props.image} alt={props.title} />}
<div className={'content'}>
<div className={'title'}>{props.title}</div>
<div className={'description'}>{props.description}</div>
</div>
</a>
);
};
export default ResourceCard;
================================================
FILE: .dumi/theme/builtins/SourceCode/index.less
================================================
@import (reference) '../../styles/variables.less';
// override prism theme for dark mode
@{dark-selector} {
.token.doctype,
.token.punctuation,
.token.entity,
code[class*='language-'],
pre[class*='language-'] {
color: @c-text-secondary-dark;
}
.token.comment,
.token.prolog,
.token.cdata {
color: @c-text-note-dark;
}
}
.@{prefix}-source-code {
@bg-color: tint(@c-site-bg, 50%);
position: relative;
background-color: @bg-color;
border-radius: 8px;
&-scroll-container {
overflow: auto;
width: 100%;
height: 100%;
}
&-scroll-content {
position: relative;
width: max-content;
height: max-content;
min-width: 100%;
min-height: 100%;
> pre.prism-code {
width: max-content;
position: relative;
overflow: visible;
}
}
&.dark > pre.prism-code {
border: 1px solid rgba(253, 253, 253, 0.12);
background: #282c34;
}
&.light > pre.prism-code {
border: 1px solid rgba(5, 5, 5, 0.06);
background: #f7f7f7;
}
> pre.prism-code {
overflow: auto;
&:not(:first-child) {
margin-top: 16px;
}
}
> pre.prism-code,
&-scroll-content > pre.prism-code {
margin: 0;
padding: 18px 24px;
font-size: 14px;
line-height: 1.58;
direction: ltr;
background: transparent;
// remove shadow from coy theme
&::before,
&::after {
content: none;
}
// highlight line
& > .highlighted {
position: relative;
width: calc(100% + 24px);
background-color: shade(@bg-color, 5%);
.line-cell {
position: relative;
&::after {
content: '';
position: absolute;
top: 0;
right: -24px;
bottom: 0;
width: 24px;
background-color: shade(@bg-color, 5%);
}
}
&::after {
content: '';
position: absolute;
top: 0;
left: -24px;
bottom: 0;
width: 24px;
background-color: shade(@bg-color, 5%);
}
}
& > .wrap {
display: table-row;
& > .token-line-num {
display: table-cell;
text-align: right;
padding-right: 1em;
user-select: none;
opacity: 0.5;
}
& > .line-cell {
display: table-cell;
width: 100%;
}
}
}
&-copy {
position: absolute;
z-index: 2;
top: 9px;
right: 12px;
display: inline-block;
padding: 8px 12px;
background-color: fade(@bg-color, 80%);
border: 0;
border-radius: 2px;
cursor: pointer;
transition: all 0.2s;
> svg {
width: 16px;
fill: darken(@c-border, 20%);
transition: fill 0.2s;
@{dark-selector} & {
fill: lighten(@c-border-dark, 20%);
}
}
&:hover > svg {
fill: darken(@c-border, 30%);
@{dark-selector} & {
fill: lighten(@c-border-dark, 30%);
}
}
&[data-copied] > svg {
fill: @c-success;
@{dark-selector} & {
fill: @c-success-dark;
}
}
}
&:not(:hover) &-copy {
opacity: 0;
visibility: hidden;
}
@{dark-selector} & {
@bg-color: shade(@c-site-bg-dark, 50%);
background-color: @bg-color;
&-copy {
background-color: fadeout(@bg-color, 80%);
}
& > pre.prism-code > .highlighted {
background-color: tint(@bg-color, 10%);
&::after {
background-color: tint(@bg-color, 10%);
}
.line-cell {
&::after {
background-color: tint(@bg-color, 10%);
}
}
}
}
}
================================================
FILE: .dumi/theme/builtins/SourceCode/index.tsx
================================================
import { ReactComponent as IconCheck } from '@ant-design/icons-svg/inline-svg/outlined/check.svg';
import { ReactComponent as IconCopy } from '@ant-design/icons-svg/inline-svg/outlined/copy.svg';
import classNames from 'classnames';
import { useSiteData } from 'dumi';
import Highlight, { defaultProps, type Language } from 'prism-react-renderer';
import prismTheme from 'prism-react-renderer/themes/oceanicNext';
import 'prism-themes/themes/prism-one-light.css';
import {
useContext,
useEffect,
useMemo,
useRef,
useState,
type FC,
type ReactNode,
} from 'react';
import { CopyToClipboard } from 'react-copy-to-clipboard';
import type { SiteContextProps } from '../../slots/SiteContext';
import SiteContext from '../../slots/SiteContext';
import './index.less';
const MARKUP_REGEX = {
all: /[\n]*?#if ALIPAY[\n]*?|[\n]*?#if WECHAT[\n]*?|[\n]*?#endif[\n]*?/g, // 支持的所有平台
alipay: /[\n]*?#if WECHAT[\s\S?]*?#endif[\n]*?/g, // 支付宝平台时,需要去掉微信标记的内容
wechat: /[\n]*?#if ALIPAY[\s\S]*?#endif[\n]*?/g, // 微信平台时,需要去掉支付宝标记的内容
};
const COMMENTS_MARKUP_REGEX = {
if: /#comments\s+if/g,
endif: /#comments\s+endif/g,
};
/**
* define DSL which can be highlighted as similar language
*/
const SIMILAR_DSL: Record<string, Language> = {
acss: 'css',
axml: 'markup',
vue: 'markup',
};
export interface ISourceCodeProps {
children: string;
lang: Language;
highlightLines?: number[];
extra?: ReactNode;
textarea?: ReactNode;
title?: string;
}
const SourceCode: FC<ISourceCodeProps> = (props) => {
const { children: pChildren = '', lang, highlightLines = [] } = props;
const { platform, theme } = useContext<SiteContextProps>(SiteContext);
const isDarkTheme = useMemo(() => theme.includes('dark'), [theme]);
const children = useMemo(() => {
// 支付宝平台时: 去掉 #if WECHAT 和 #endif 之间的文本
let result = pChildren.replace(MARKUP_REGEX[platform], '');
// 去掉所有的 #if ALIPAY, #endif 等标记
result = result.replace(MARKUP_REGEX.all, '');
// 如果comments if 或 comments endif 需要处理一下
result = result.replace(COMMENTS_MARKUP_REGEX.if, '#if');
result = result.replace(COMMENTS_MARKUP_REGEX.endif, '#endif');
return result;
}, [pChildren, platform, MARKUP_REGEX, COMMENTS_MARKUP_REGEX]);
const timer = useRef<number>();
const [isCopied, setIsCopied] = useState(false);
const [text, setText] = useState(children);
const { themeConfig } = useSiteData();
useEffect(() => {
const isShell = /shellscript|shell|bash|sh|zsh/.test(lang);
if (isShell) {
const text = children.replace(/^(\$|>)\s/gm, '');
setText(text);
}
}, [lang, children]);
const code = (
<Highlight
{...defaultProps}
code={props.textarea ? children : children.trim()}
language={SIMILAR_DSL[lang] || lang}
theme={isDarkTheme ? prismTheme : undefined}
>
{({ className, style, tokens, getLineProps, getTokenProps }) => (
<pre className={className} style={style}>
{tokens.map((line, i) => (
<div
key={String(i)}
className={classNames({
highlighted: highlightLines.includes(i + 1),
wrap: themeConfig.showLineNum,
})}
>
{themeConfig.showLineNum && (
<span className="token-line-num">{i + 1}</span>
)}
<div
{...getLineProps({
line,
key: i,
})}
className={classNames({
'line-cell': themeConfig.showLineNum,
})}
>
{line.map((token, key) => (
// getTokenProps 返回值包含 key
// eslint-disable-next-line react/jsx-key
<span {...getTokenProps({ token, key })} />
))}
</div>
</div>
))}
</pre>
)}
</Highlight>
);
return (
<div
className={`dumi-theme-antd-source-code ${
isDarkTheme ? 'dark' : 'light'
}`}
>
<CopyToClipboard
text={text}
onCopy={() => {
setIsCopied(true);
clearTimeout(timer.current);
timer.current = window.setTimeout(() => setIsCopied(false), 2000);
}}
>
<button
type="button"
className="dumi-theme-antd-source-code-copy"
data-copied={isCopied || undefined}
>
{isCopied ? <IconCheck /> : <IconCopy />}
</button>
</CopyToClipboard>
{props.textarea ? (
<div className="dumi-theme-antd-source-code-scroll-container">
<div className="dumi-theme-antd-source-code-scroll-content">
{code}
{props.textarea}
</div>
</div>
) : (
code
)}
{props.extra}
</div>
);
};
export default SourceCode;
================================================
FILE: .dumi/theme/builtins/Table/index.less
================================================
@import (reference) '../../styles/variables.less';
.dumi-default-table {
margin: 24px 0 32px;
transform: translate(0, 0);
&-content {
overflow: auto;
&::before,
&::after {
content: '';
display: block;
position: fixed;
z-index: 1;
top: 0;
bottom: 0;
width: 6px;
pointer-events: none;
}
&[data-left-folded]::before {
left: 0;
background-image: linear-gradient(
to right,
rgba(0, 0, 0, 10%),
rgba(0, 0, 0, 0%)
);
@{dark-selector} & {
background-image: linear-gradient(
to right,
rgba(0, 0, 0, 50%),
rgba(0, 0, 0, 0%)
);
}
}
&[data-right-folded]::after {
right: 0;
background-image: linear-gradient(
to left,
rgba(0, 0, 0, 10%),
rgba(0, 0, 0, 0%)
);
@{dark-selector} & {
background-image: linear-gradient(
to left,
rgba(0, 0, 0, 50%),
rgba(0, 0, 0, 0%)
);
}
}
> table > thead > tr > th,
> table > tr > th {
white-space: nowrap;
}
}
}
================================================
FILE: .dumi/theme/builtins/Table/index.tsx
================================================
import throttle from 'lodash.throttle';
import React, {
ReactNode,
useCallback,
useContext,
useEffect,
useRef,
useState,
} from 'react';
import type { SiteContextProps } from '../../slots/SiteContext';
import SiteContext from '../../slots/SiteContext';
import './index.less';
interface IProps {
children: ReactNode;
}
const MARKUP_REGEX = {
all: /#if ALIPAY|#if WECHAT/, // 支持的所有平台
alipay: /#if WECHAT/, // 支付宝平台时,需要去掉微信标记表格项
wechat: /#if ALIPAY/, // 微信平台时,需要去掉支付宝标记表格项
};
const Table: React.FC<IProps> = ({ children, ...props }) => {
const { platform } = useContext<SiteContextProps>(SiteContext);
const container = useRef<HTMLDivElement>(null);
const [leftFolded, setLeftFolded] = useState(false);
const [rightFolded, setRightFolded] = useState(false);
// watch content scroll to render folded shadow
useEffect(() => {
const elm = container.current;
if (elm) {
const handler = throttle(() => {
setLeftFolded(elm.scrollLeft > 0);
setRightFolded(elm.scrollLeft < elm.scrollWidth - elm.offsetWidth);
}, 100);
handler();
elm.addEventListener('scroll', handler);
window.addEventListener('resize', handler);
return () => {
elm.removeEventListener('scroll', handler);
window.removeEventListener('resize', handler);
};
}
}, []);
// 处理表格标签,做条件编译
const processReactNode = useCallback(
(node) => {
if (Array.isArray(node)) {
let containsAlipay = false;
// 遍历节点数组,检测是否包含 #if ALIPAY
node.forEach((child) => {
if (typeof child === 'string' && MARKUP_REGEX[platform].test(child)) {
containsAlipay = true;
} else if (
React.isValidElement(child) &&
typeof child.props.children === 'string' &&
MARKUP_REGEX[platform].test(child.props.children)
) {
containsAlipay = true;
}
});
// 如果包含 #if ALIPAY,返回空数组以舍弃整个节点和其兄弟
return containsAlipay
? []
: node.map(processReactNode).filter((child) => child !== null);
} else if (React.isValidElement(node)) {
const { children } = node.props;
const processedChildren = processReactNode(children);
return React.cloneElement(node, {
children: processedChildren,
});
} else {
node =
typeof node === 'string' ? node.replace(MARKUP_REGEX.all, '') : node;
return node;
}
},
[children, platform, MARKUP_REGEX]
);
return (
<div className="dumi-default-table">
<div
className="dumi-default-table-content"
ref={container}
data-left-folded={leftFolded || undefined}
data-right-folded={rightFolded || undefined}
>
<table {...props}>{processReactNode(children)}</table>
</div>
</div>
);
};
export default Table;
================================================
FILE: .dumi/theme/builtins/code.html
================================================
<!doctype html>
<html>
<head>
<link rel="shortcut icon" href="https://gw.alipayobjects.com/zos/rmsportal/wNkELvnLHXPAlmqutRPI.png" type="image/x-icon">
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
<link rel="stylesheet" type="text/css" href="https://gw.alipayobjects.com/render/p/yuyan_npm/@alipay_antd-mini-code/1.0.0/web/preview.css" />
<link rel="preload" href="/preview.json" as="fetch" crossorigin>
<style>
body {
margin: 0;
}
#root {
width: 100vw;
height: 100vh;
box-sizing: border-box;
--preview-header-dark: rgba(255, 255, 255, 0.04);
}
</style>
</head>
<body>
<script>
// When the iframe is just created, you need to set the background color according to the dark mode.
window.addEventListener('message', (event)=>{
if (event.data.type === 'setIsDarkMode') {
window.LyraIsDefalutDarkMode = event.data.data;
const element = document.getElementsByTagName('body')?.[0];
if (element) {
element.style.setProperty(
'background-color',
window.LyraIsDefalutDarkMode ? '#141414' : '#f9fafb'
);
}
}
})
</script>
<div id="root">
</div>
<script type="text/javascript" src="https://gw.alipayobjects.com/os/lib/react/18.0.0/umd/react.production.min.js"></script>
<script type="text/javascript" src="https://gw.alipayobjects.com/os/lib/react-dom/18.0.0/umd/react-dom.production.min.js"></script>
<script src="https://gw.alipayobjects.com/render/p/yuyan_npm/@alipay_antd-mini-code/1.0.0/web/preview.js"></script>
<script>
const searchParams = new URL(location.href).searchParams;
const theme = searchParams.get('theme');
const page = searchParams.get('page');
const platform = searchParams.get('platform');
const server = searchParams.get('compilerServer');
function getSourceCode() {
return fetch(`/sourceCode/${page}?theme=${theme}&platform=${platform}`).then(res => res.json());
}
function getExtName(name) {
const arr = name.split('.');
return `.${arr[arr.length - 1]}`;
}
function sortMiniPageFile(files) {
const map = {
'.axml': 0,
'.wxml': 0,
'.js': 1,
'.acss': 2,
'.wxss': 2,
'.sjs': 3,
'.wxs': 3,
'.json': 4,
};
files.sort((a, b) => {
const arrA = a.split('/');
const arrB = b.split('/');
const lenA = arrA.length;
const lenB = arrB.length;
if (lenA === lenB) {
const nameA = arrA.slice(0, -1).join('/');
const nameB = arrB.slice(0, -1).join('/');
if (nameA === nameB) {
const result = map[getExtName(a)] - map[getExtName(b)];
if (result === 0) {
if (arrA[arrA.length - 1].startsWith('index')) {
return -1;
}
if (arrB[arrB.length - 1].startsWith('index')) {
return 1;
}
if (arrA[arrA.length - 1] < arrB[arrB.length - 1]) {
return -1;
}
return 1;
}
return result;
}
return nameA < nameB ? -1 : 1;
}
if (lenA < lenB) {
return -1;
}
return 1;
});
return files;
}
async function startWebOpenBoxPreviewApp() {
let sourceCode;
if (server) {
sourceCode = await getSourceCode();
} else {
const obj = await fetch('/preview.json').then(res => res.json());
sourceCode = {};
const str = page.replace('index', '');
Object.keys(obj.sourceCode[platform]).forEach(item => {
if (item.startsWith(str)) {
sourceCode[item] = obj.sourceCode[platform][item];
}
});
}
sourceCode['mini.project.json'] = JSON.stringify({
enableAppxNg: true,
component2: true,
}, null, 2);
sourceCode['app.json'] = JSON.stringify({
"pages": [
`${searchParams.get('folder')}index`
],
"window": {
"enableWK": "YES",
"enableDSL": "YES",
"enableJSC": "YES",
"defaultTitle": "小程序版 antd-mini 库",
"titleBarColor": "#FFFFFF",
"pullRefresh": false,
"allowsBounceVertical": false,
"enableInPageRenderInput": "YES"
},
}, null, 2);
window.OpenBoxPreview.StartWebOpenBoxPreviewApp({
containerStyle: {
width: '100%',
height: '100%',
},
sourceCode,
isShowToolbar: true,
toolbarOptions: {
isShowDownload: true,
},
isShowHeaderLogo: false,
sortMiniPageFile
});
sourceCode['package.json'] = JSON.stringify({
"private": true,
"dependencies": {
"antd-mini": "latest"
},
}, null, 2);
sourceCode['app.js'] = `App({})`;
sourceCode['README.md'] = '需要先npm i';
}
startWebOpenBoxPreviewApp();
</script>
</body>
</html>
================================================
FILE: .dumi/theme/builtins/iframe.html
================================================
<!doctype html>
<html>
<head>
<link rel="shortcut icon" href="https://gw.alipayobjects.com/zos/rmsportal/wNkELvnLHXPAlmqutRPI.png"
type="image/x-icon">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
<link rel="stylesheet" type="text/css"
href="https://gw.alipayobjects.com/render/p/yuyan_npm/@alipay_antd-mini-lyra/1.0.1/web/lyra.css" />
<link rel="preload" href="/preview.json" as="fetch" crossorigin>
</head>
<style>
body {
margin: 0;
background-color: transparent;
}
</style>
<body>
<script>
// When the iframe is just created, you need to set the background color according to the dark mode.
window.addEventListener('message', (event)=>{
if (event.data.type === 'setIsDarkMode') {
window.LyraIsDefalutDarkMode = event.data.data;
const element = document.getElementsByTagName('body')?.[0];
if (element) {
element.style.setProperty(
'background-color',
window.LyraIsDefalutDarkMode ? '#141414' : '#f9fafb'
);
}
}
})
</script>
<div id="root"></div>
<script type="text/javascript"
src="https://gw.alipayobjects.com/os/lib/react/18.0.0/umd/react.production.min.js"></script>
<script type="text/javascript"
src="https://gw.alipayobjects.com/os/lib/react-dom/18.0.0/umd/react-dom.production.min.js"></script>
<script src="https://gw.alipayobjects.com/render/p/yuyan_npm/@alipay_antd-mini-lyra/1.0.1/web/lyra.js"></script>
<script>
const searchParams = new URL(location.href).searchParams;
const page = searchParams.get('page');
const platform = searchParams.get('platform');
const server = searchParams.get('compilerServer');
function getDist() {
const list = ['appConfig.json', 'index.js', 'index.worker.js', 'index.html'];
return Promise.all(list.map(item => fetch(`${server}/${item}`).then(res => res.text()))).then(arr => {
const dist = {};
list.forEach((item, index) => {
dist[item] = arr[index];
});
return dist;
});
}
async function startWebOpenBoxLyraApp() {
let dist;
if (server) {
dist = await getDist()
} else {
const obj = await fetch('/preview.json').then(res => res.json());
dist = obj.dist;
}
window.OpenBoxLyra.StartWebOpenBoxLyraApp(
{
dist,
enableAppxNg: true,
maskThemeColor: {
dark: '#141414',
light: '#f9fafb',
},
defalutDarkMode: window.LyraIsDefalutDarkMode,
lyraKey: 'unique-identifier-key',
simulatorStyle: {
width: 292,
height: 633,
},
lyraConfig: {
zoom: 0.75,
layoutHeight: 'match_parent',
layoutWidth: 'match_parent',
defaultDeviceName: 'iPhone 13',
initWithAutoZoom: false,
transparentBackground: true,
hideTopBar: true,
hideBottomBar: true,
enableDeviceSkin: false,
hideTitleBar: true,
liteMode: false,
launchParams: { page: decodeURIComponent(page) }
},
onPageReady:() => {
console.log('onPageReady,123');
window.parent && window.parent.postMessage({ type:'onPageReady', data: true })
},
onAppReady:() => {
window.parent && window.parent.postMessage({ type:'onAppReady', data: true })
}
},
)
}
startWebOpenBoxLyraApp();
</script>
</body>
</html>
================================================
FILE: .dumi/theme/common/CommonHelmet.tsx
================================================
import { Helmet, useRouteMeta } from 'dumi';
import { useMemo } from 'react';
import useLocaleValue from '../hooks/useLocaleValue';
import { removeTitleCode } from '../utils';
const CommonHelmet = () => {
const meta = useRouteMeta();
const configTitle = useLocaleValue('title');
const [title, description] = useMemo(() => {
const helmetTitle = `${removeTitleCode(meta.frontmatter.subtitle) || ''} ${removeTitleCode(
meta.frontmatter?.title
)} - ${configTitle}`;
const helmetDescription = meta.frontmatter.description;
return [helmetTitle, helmetDescription];
}, [meta, configTitle]);
return (
<Helmet>
<title>{title}</title>
<meta property="og:title" content={title} />
{description && <meta name="description" content={description} />}
</Helmet>
);
};
export default CommonHelmet;
================================================
FILE: .dumi/theme/common/EditLink.tsx
================================================
import { useRouteMeta, useIntl, FormattedMessage } from 'dumi';
import { EditOutlined } from '@ant-design/icons';
import useAdditionalThemeConfig from '../hooks/useAdditionalThemeConfig';
const EditLink = () => {
const { frontmatter } = useRouteMeta();
const { editLink } = useAdditionalThemeConfig();
const intl = useIntl();
const showEditLink = editLink && frontmatter.filename;
return showEditLink ? (
<div>
<a
target="_blank"
href={`${intl.formatMessage(
{ id: '$internal.edit.link' },
{ filename: frontmatter.filename }
)}`}
rel="noreferrer"
>
<EditOutlined />
<FormattedMessage id="app.footer.actions.edit" />
</a>
</div>
) : null;
};
export default EditLink;
================================================
FILE: .dumi/theme/common/GlobalStyles.tsx
================================================
import React from 'react';
import {
Common,
DumiDefaultStyleOverride,
HeadingAnchor,
Highlight,
Markdown,
Reset,
Responsive,
SearchBar,
PreviewImage
} from './styles';
const GlobalStyles = () => (
<React.Fragment>
<Reset />
<Common />
<Markdown />
<Highlight />
<Responsive />
<HeadingAnchor />
<SearchBar />
<PreviewImage />
<DumiDefaultStyleOverride />
</React.Fragment>
);
export default GlobalStyles;
================================================
FILE: .dumi/theme/common/LastUpdated.tsx
================================================
// 最后更新时间
import React, { useEffect, useState } from 'react';
import { css } from '@emotion/react';
import { FormattedMessage } from 'dumi';
import { ClockCircleOutlined } from '@ant-design/icons';
import useSiteToken from '../hooks/useSiteToken';
import useAdditionalThemeConfig from '../hooks/useAdditionalThemeConfig';
const useStyle = () => {
const { token } = useSiteToken();
const { colorTextTertiary, marginXXS } = token;
return {
lastUpdatedWrap: css`
color: ${colorTextTertiary};
display: flex;
`,
lastUpdatedLabel: css`
margin-inline-start: ${marginXXS}px;
margin-inline-end: ${marginXXS}px;
`
};
};
const LastUpdated: React.FC<{ time?: number }> = ({ time }) => {
const styles = useStyle();
const { lastUpdated } = useAdditionalThemeConfig();
const [isoLastUpdated, setIsoLastUpdated] = useState('');
const [lastUpdatedTime, setLastUpdatedTime] = useState('');
const showLastUpdated = lastUpdated && time;
useEffect(() => {
if (showLastUpdated) {
setIsoLastUpdated(new Date(time!).toISOString());
setLastUpdatedTime(
new Intl.DateTimeFormat(undefined, {
dateStyle: 'short',
timeStyle: 'short'
}).format(time)
);
}
}, [showLastUpdated, time]);
return lastUpdated && time ? (
<div css={styles.lastUpdatedWrap}>
<ClockCircleOutlined />
<span css={styles.lastUpdatedLabel}>
<FormattedMessage id="content.footer.last.updated" />
</span>
<time dateTime={isoLastUpdated}>{lastUpdatedTime}</time>
</div>
) : null;
};
export default LastUpdated;
================================================
FILE: .dumi/theme/common/Loading/index.tsx
================================================
import React, { useCallback } from 'react';
import { Skeleton, Space, Spin } from 'antd';
import { useLocation } from 'dumi';
import type { IAllThemeConfig } from '../../types';
import useAdditionalThemeConfig from '../../hooks/useAdditionalThemeConfig';
const defaultLoadingConfig: IAllThemeConfig['loading'] = {
skeleton: []
};
const Loading: React.FC = () => {
const { pathname } = useLocation();
const { loading = defaultLoadingConfig } = useAdditionalThemeConfig();
const skeletonLoadingRenderRule = useCallback(() => {
const pathnameReg = loading.skeleton;
if (pathnameReg) {
return (
pathnameReg.filter((rule) => {
return pathname.startsWith(rule);
}).length > 0
);
}
return false;
}, [loading, pathname]);
if (skeletonLoadingRenderRule()) {
return (
<div style={{ maxWidth: '70vw', width: '100%', margin: '80px auto 0', textAlign: 'center' }}>
<img
src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg"
width={40}
alt="loading"
style={{ marginBottom: 24, filter: 'grayscale(1)', opacity: 0.33 }}
/>
<Skeleton active paragraph={{ rows: 3 }} />
<Skeleton active paragraph={{ rows: 4 }} style={{ marginTop: 32 }} />
</div>
);
}
return (
<Space style={{ width: '100%', margin: '120px 0', justifyContent: 'center' }} align="center">
<Spin size="large" />
</Space>
);
};
export default Loading;
================================================
FILE: .dumi/theme/common/PrevAndNext.tsx
================================================
import { LeftOutlined, RightOutlined } from '@ant-design/icons';
import { ClassNames, css } from '@emotion/react';
import type { MenuProps } from 'antd';
import type { MenuItemType } from 'antd/lib/menu/hooks/useItems';
import type { ReactElement } from 'react';
import React, { useContext, useMemo } from 'react';
import useMenu from '../hooks/useMenu';
import useSiteToken from '../hooks/useSiteToken';
import type { SiteContextProps } from '../slots/SiteContext';
import SiteContext from '../slots/SiteContext';
const useStyle = ({ isShowSim }) => {
const { token } = useSiteToken();
const { colorSplit, iconCls, fontSizeIcon } = token;
return {
prevNextNav: css`
overflow: hidden;
font-size: 14px;
border-top: 1px solid ${colorSplit};
display: flex;
padding: ${isShowSim ? '0 412px 32px 64px' : '0 164px 32px 64px'};
&.rtl {
padding: 0 64px 144px 170px;
}
@media only screen and (max-width: ${token.screenLG}px) {
&,
&.rtl {
padding-right: 24px;
padding-left: 24px;
}
}
`,
pageNav: `
flex: 1;
height: 72px;
line-height: 72px;
text-decoration: none;
${iconCls} {
color: #999;
font-size: ${fontSizeIcon}px;
transition: all 0.3s;
}
.chinese {
margin-inline-start: 4px;
}
`,
prevNav: `
text-align: start;
display: flex;
justify-content: flex-start;
align-item: center;
.footer-nav-icon-after {
display: none;
}
.footer-nav-icon-before {
position: relative;
line-height: 0;
vertical-align: middle;
transition: inset-inline-end 0.3s;
margin-inline-end: 1em;
inset-inline-end: 0;
}
&:hover .footer-nav-icon-before {
inset-inline-end: 0.2em;
}
`,
nextNav: `
text-align: end;
display: flex;
justify-content: flex-end;
align-items: center;
.footer-nav-icon-before {
display: none;
}
.footer-nav-icon-after {
position: relative;
margin-inline-start: 1em;
margin-bottom: 1px;
vertical-align: middle;
line-height: 0;
left: 0;
transition: left 0.3s;
}
&:hover .footer-nav-icon-after {
inset-inline-start: 0.2em;
}
`,
};
};
const flattenMenu = (
menuItems: MenuProps['items']
): MenuProps['items'] | null => {
if (Array.isArray(menuItems)) {
return menuItems.reduce<Exclude<MenuProps['items'], undefined>>(
(acc, item) => {
if (!item) {
return acc;
}
if ('children' in item && item.children) {
return acc.concat(flattenMenu(item.children) ?? []);
}
return acc.concat(item);
},
[]
);
}
return null;
};
const PrevAndNext: React.FC<{ rtl: boolean; isShowSim?: boolean }> = ({
rtl,
isShowSim,
}) => {
const styles = useStyle({ isShowSim });
const beforeProps = { className: 'footer-nav-icon-before' };
const afterProps = { className: 'footer-nav-icon-after' };
const before = rtl ? (
<RightOutlined {...beforeProps} />
) : (
<LeftOutlined {...beforeProps} />
);
const after = rtl ? (
<LeftOutlined {...afterProps} />
) : (
<RightOutlined {...afterProps} />
);
const [menuItems, selectedKey] = useMenu({ before, after });
const { isMobile } = useContext<SiteContextProps>(SiteContext);
const [prev, next] = useMemo(() => {
const flatMenu = flattenMenu(menuItems);
if (!flatMenu) {
return [null, null];
}
let activeMenuItemIndex = -1;
flatMenu.forEach((menuItem, i) => {
if (menuItem && menuItem.key === selectedKey) {
activeMenuItemIndex = i;
}
});
return [
flatMenu[activeMenuItemIndex - 1] as MenuItemType,
flatMenu[activeMenuItemIndex + 1] as MenuItemType,
];
}, [menuItems, selectedKey]);
if (isMobile) {
return null;
}
return (
<section css={styles.prevNextNav}>
<ClassNames>
{({ css: classCss, cx }) => (
<>
{prev &&
React.cloneElement(prev.label as ReactElement, {
className: cx(
classCss(styles.pageNav),
classCss(styles.prevNav)
),
})}
{next &&
React.cloneElement(next.label as ReactElement, {
className: cx(
classCss(styles.pageNav),
classCss(styles.nextNav)
),
})}
</>
)}
</ClassNames>
</section>
);
};
export default PrevAndNext;
================================================
FILE: .dumi/theme/common/Sim/index.less
================================================
.previewer {
position: fixed;
top: calc((100% - 633px + 60px) / 2);
right: 24px;
width: 292px;
height: 633px;
z-index: 1;
margin-right: 20px;
border-radius: 40px;
&.hide {
right: -9999px;
opacity: 0;
}
&::before {
display: block;
content: '';
width: calc(100% + 24px);
height: calc(100% + 10px);
z-index: 1;
position: absolute;
top: -5px;
left: -12px;
pointer-events: none;
}
&::after {
display: block;
content: '';
width: 500px;
height: calc(200vh + 100px);
z-index: -1;
position: absolute;
top: -100vh;
left: -50px;
border-left: 1px solid rgba(5, 5, 5, 0.06);
}
&.theme-light {
&::before {
background: url(https://mdn.alipayobjects.com/huamei_2jrq4g/afts/img/A*vJX0SK7L5g0AAAAAAAAAAAAADtF8AQ/original)
no-repeat;
background-size: 100% 100%;
}
&::after {
background-color: #fff;
}
}
&.theme-dark {
&::before {
background: url(https://mdn.alipayobjects.com/huamei_2jrq4g/afts/img/A*EWiARK8lIdYAAAAAAAAAAAAADtF8AQ/original)
no-repeat;
background-size: 100% 100%;
}
&::after {
background-color: #141414;
}
}
iframe {
height: 100%;
border: none;
width: 100%;
border-radius: 40px;
position: relative;
&::after {
display: block;
content: '';
background-color: #000;
width: 500px;
height: calc(100vh + 100px);
z-index: 1;
position: absolute;
top: -100px;
left: -36px;
border-left: 1px solid rgba(149, 149, 149, 0.2);
}
}
&-loading {
width: 40px;
height: 40px;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
background-color: rgba(22, 119, 255, 0.8);
border-radius: 100%;
animation: sk-scaleout 1s infinite ease-in-out;
}
}
================================================
FILE: .dumi/theme/common/Sim/index.tsx
================================================
import { css } from '@emotion/react';
import { useMatchedRoute } from 'dumi';
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
import useSiteToken from '../../hooks/useSiteToken';
import type { SiteContextProps } from '../../slots/SiteContext';
import SiteContext from '../../slots/SiteContext';
import './index.less';
interface IProps {}
function buildUrl(
basic: string,
options: {
platform: string;
theme: string;
}
) {
const urlObj = new URL(basic);
const searchParams = urlObj.searchParams;
const page = searchParams.get('page');
const { platform: supportPlatform, disablePlatformSwitch } =
getSupportPlatform(options.platform);
searchParams.set('platform', supportPlatform);
searchParams.set('theme', options.theme);
// http://localhost:8000/preview.html
// 为了不让iframe的url变化,导致重新渲染iframe,这里去掉url中的变量参数,通过iframe通信的方式,让小程序实现去跳转页面
const originPathUrl = new URL(urlObj.origin + urlObj.pathname);
originPathUrl.searchParams.set(
'compilerServer',
searchParams.get('compilerServer') || ''
);
originPathUrl.searchParams.set('page', '');
return {
url: urlObj.toString(),
originPath: originPathUrl.toString(),
page,
supportPlatform,
disablePlatformSwitch,
};
}
const DefaultPlatform = 'alipay';
function getSupportPlatform(platform: string) {
const supportWechat = true;
if (!supportWechat && platform === 'wechat') {
return {
platform: DefaultPlatform,
disablePlatformSwitch: true,
};
}
return {
platform,
disablePlatformSwitch: false,
};
}
const useStyle = () => {
const { token } = useSiteToken();
return {
// not show simulator
previewerWrapper: css`
@media only screen and (max-width: ${token.screenLG}px) {
display: none;
}
`,
dark: css`
background-color: #141414;
`,
light: css`
background-color: #f9fafb;
`,
};
};
const Previewer: React.FC<IProps> = () => {
const styles = useStyle();
const { theme, platform, herboxUrl } =
useContext<SiteContextProps>(SiteContext);
const [previewerLoaded, setPreviewerLoaded] = useState(false);
const previewerRef = useRef<any>(null);
const matchedRoute = useMatchedRoute();
const isShowSim = useMemo(() => {
return (
matchedRoute?.meta?.frontmatter?.nav?.path === '/components' ||
matchedRoute?.meta?.frontmatter?.nav?.path === '/copilot'
);
}, [matchedRoute]);
const basicUrl =
window.location.protocol + '//' + window.location.host + herboxUrl;
const { originPath, page } = useMemo(() => {
return buildUrl(basicUrl, {
theme: theme?.find((t) => ['dark', 'light'].includes(t)) || 'light',
platform,
});
}, [basicUrl, theme, platform]);
// 改主题
function sendThemeToPreviewer() {
const previeweriframe = previewerRef.current;
if (!previeweriframe) return;
const setThemeColor = function () {
previeweriframe?.contentWindow?.postMessage({
type: 'setIsDarkMode',
data: theme.includes('dark'),
});
const color = theme.includes('dark') ? '#000' : '#fff';
previeweriframe?.contentWindow?.postMessage({
type: 'evaluateJavaScriptInWorkerCode',
data: `
my.setNavigationBar({
backgroundColor: '${color}',
borderBottomColor: '${color}',
});
`,
});
};
setThemeColor();
}
// 跳转页面
function sendPageToPreviewer() {
const previeweriframe = previewerRef.current;
if (!previeweriframe) return;
const color = theme.includes('dark') ? '#000' : '#fff';
function redirect() {
previeweriframe?.contentWindow?.postMessage({
type: 'evaluateJavaScriptInWorkerCode',
data: `
console.log('跳转页面','/${page}');
my.redirectTo({
url: '/${page}',
success: () => {
setTimeout(()=>{
my.setNavigationBar({
backgroundColor: '${color}',
borderBottomColor: '${color}',
});
}, 500);
},
});
`,
});
}
redirect();
}
function setMsgToPreviewer(miniCode) {
const previeweriframe = previewerRef.current;
if (!previeweriframe || !miniCode) return;
previeweriframe?.contentWindow?.postMessage({
type: 'evaluateJavaScriptInWorkerCode',
data: miniCode,
});
}
useEffect(() => {
if (theme.length > 0) {
sendThemeToPreviewer();
}
}, [theme]);
useEffect(() => {
if (page) {
sendPageToPreviewer();
}
}, [page]);
useEffect(() => {
const previeweriframe = previewerRef.current;
if (!previeweriframe) return;
previeweriframe.onload = () => {
sendThemeToPreviewer();
window.setMsgToSim = setMsgToPreviewer;
};
}, [previewerRef.current]);
function handleIframeMessage(event) {
if (event.data.type === 'onAppReady') {
const value = event.data.data;
if (value) {
sendThemeToPreviewer();
sendPageToPreviewer();
}
}
}
useEffect(() => {
window.addEventListener('message', handleIframeMessage);
return () => {
window.removeEventListener('message', handleIframeMessage);
};
}, [page]);
return (
<div
className={`previewer ${!herboxUrl || !isShowSim ? 'hide' : ''} ${
theme.includes('dark') ? 'theme-dark' : 'theme-light'
}`}
css={css`
${styles.previewerWrapper}
${theme.includes('dark') ? styles.dark : styles.light}
`}
>
{!previewerLoaded && <div className="previewer-loading" />}
<iframe
ref={previewerRef}
src={originPath}
onLoad={() => setPreviewerLoaded(true)}
allow="clipboard-read; clipboard-write"
/>
</div>
);
};
export default Previewer;
================================================
FILE: .dumi/theme/common/ThemeSwitch/ThemeIcon.tsx
================================================
import Icon from '@ant-design/icons';
import React from 'react';
const ThemeIcon: React.FC<{ className?: string }> = (props) => {
const SVGIcon = React.useCallback(
() => (
<svg width={20} height={20} viewBox="0 0 24 24" fill="currentColor" {...props}>
<g fillRule="evenodd">
<g fillRule="nonzero">
<path d="M7.02 3.635l12.518 12.518a1.863 1.863 0 010 2.635l-1.317 1.318a1.863 1.863 0 01-2.635 0L3.068 7.588A2.795 2.795 0 117.02 3.635zm2.09 14.428a.932.932 0 110 1.864.932.932 0 010-1.864zm-.043-9.747L7.75 9.635l9.154 9.153 1.318-1.317-9.154-9.155zM3.52 12.473c.514 0 .931.417.931.931v.932h.932a.932.932 0 110 1.864h-.932v.931a.932.932 0 01-1.863 0l-.001-.931h-.93a.932.932 0 010-1.864h.93v-.932c0-.514.418-.931.933-.931zm15.374-3.727a1.398 1.398 0 110 2.795 1.398 1.398 0 010-2.795zM4.385 4.953a.932.932 0 000 1.317l2.046 2.047L7.75 7 5.703 4.953a.932.932 0 00-1.318 0zM14.701.36a.932.932 0 01.931.932v.931h.932a.932.932 0 010 1.864h-.933l.001.932a.932.932 0 11-1.863 0l-.001-.932h-.93a.932.932 0 110-1.864h.93v-.931a.932.932 0 01.933-.932z" />
</g>
</g>
</svg>
),
[props]
);
return <Icon component={SVGIcon} {...props} />;
};
export default ThemeIcon;
================================================
FILE: .dumi/theme/common/ThemeSwitch/index.tsx
================================================
import { FloatButton } from 'antd';
import { CompactTheme, DarkTheme } from 'antd-token-previewer/lib/icons';
import { FormattedMessage } from 'dumi';
import React from 'react';
import ThemeIcon from './ThemeIcon';
export type ThemeName = 'light' | 'dark' | 'compact';
export type ThemeSwitchProps = {
value?: ThemeName[];
onChange: (value: ThemeName[]) => void;
};
const ThemeSwitch: React.FC<ThemeSwitchProps> = (props: ThemeSwitchProps) => {
const { value = ['light'], onChange } = props;
return (
<FloatButton.Group trigger="click" icon={<ThemeIcon />}>
<FloatButton
icon={<DarkTheme />}
type={value.includes('dark') ? 'primary' : 'default'}
onClick={() => {
const themeValue = value.includes('dark') ? 'light' : 'dark';
onChange([themeValue, ...value.filter((item) => ['dark', 'light'].indexOf(item) < 0)]); // compact 值必须放在靠后位置
}}
tooltip={<FormattedMessage id="app.theme.switch.dark" />}
/>
<FloatButton
icon={<CompactTheme />}
type={value.includes('compact') ? 'primary' : 'default'}
onClick={() => {
if (value.includes('compact')) {
onChange(value.filter((item) => item !== 'compact'));
} else {
onChange([...value, 'compact']);
}
}}
tooltip={<FormattedMessage id="app.theme.switch.compact" />}
/>
</FloatButton.Group>
);
};
export default ThemeSwitch;
================================================
FILE: .dumi/theme/common/config/overview.ts
================================================
export const ComponentSampleImages = {
light: {
'default': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/_JEbR4jx--IAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'button': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/lJZlQ5KnrXsAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'icon': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/PFJ_QKe0XEcAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'tab-bar': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/qc9BS5vcF1QAAAAAAAAAAAAADoEQAQFr/fmt.webp',
},
'tabs': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/bKbGSIOTIu4AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'feedback': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/DsCqSZf_uB4AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'avatar': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/QgLFSq0wiSIAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'calendar': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/n7vNRL-p1r8AAAAAAAAAAAAADoEQAQFr/original',
},
'collapse': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/4TqTQpiO_HcAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'container': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/9kW0ToqdOAEAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'divider': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/4AF2Qp-5Az8AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'empty': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/ehJDSaRlTGIAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'grid': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/nE4tRKcyIKIAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'guide-tour': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/daNHQZxefhUAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'index-bar': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/aLv3SpE2TFIAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'list': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/ybMzT7-RMOIAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'progress': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/arA9QYUD9WgAAAAAAAAAAAAADoEQAQFr/original',
},
'steps': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/GBaPQo2IT3QAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'swipe-action': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/5LGtRpWDqZkAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'tag': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/1IcoSohdmJMAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'checkbox': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/XuK_QZ9_c74AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'checklist': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/Bu6fQJAeiooAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'date-picker': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/yFADSalOg1MAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'form': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/D1N7Rrln1X0AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'image-upload': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/7sEMR5KThsUAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'input': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/xg_qTpEbs-0AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'number-keyboard': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/juu8RYs5f-cAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'number-input': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/v0WTRLe0iB4AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'postscript': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/NqO6Q6TjnzkAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'picker': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/sXfxRJXfhJIAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'radio': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/7qBNRam_UHcAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'rare-words-keyboard': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/juu8RYs5f-cAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'selector': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/qQjmR7LSkWYAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'slider': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/CeucT6NL7TYAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'stepper': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/lhpNQapn8oEAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'switch': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/8iSJR4-TAWUAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'loading': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/grmMQadI2PEAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'modal': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/64mjT4H0q84AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'popover': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/PQnOQaT-jp8AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'popover-list': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/wEStRrgdi4EAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'popup': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/mU4LSZ8_2D8AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'rate': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/9L3ES4kAcS0AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'result': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/ONMiQqVDUcEAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'skeleton': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/t_upQ6ZUOC0AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'toast': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/DK-ySJwhULUAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'badge': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/90lFSJTWqbQAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'notice-bar': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/IWLqTpCF3HEAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'page-container': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/qoFGRYpKfEQAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'voucher': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/ouVBQbV0LxMAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'card': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/qmBSTrwO5PYAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'sticky': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/s0HBSbfB_tUAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'countdown': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/c18aTav7R30AAAAAAAAAAAAADoEQAQFr/original',
},
'table': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/CpkkTr3EAHsAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'safe-area': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/5-A-TrkpTpkAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'select-contact': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/Loa6SoE0YiQAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'terms': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/3vOAT6qo9TYAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
},
dark: {
'default': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/HVGsRoz7uX0AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'button': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/M8PCQ4gzt3YAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'icon': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/7CUgTas_WQ4AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'tab-bar': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/Yh-5Q6yFC5oAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'tabs': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/Jf9VQIDVKpMAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'feedback': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/1eBQR4djuBoAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'avatar': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/1Z6oQZuAlcoAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'calendar': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/E-nHTLq9WwUAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'collapse': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/-G71Rbrx6hMAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'container': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/t5Z5R6owxZcAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'divider': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/J8VASKEEYe0AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'empty': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/pqf7S4fvtbAAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'grid': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/InU-Qoi5md0AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'guide-tour': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/0M3PRYImEBYAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'index-bar': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/oRVuQZCBi4QAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'list': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/Ek2SQ4SQDggAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'progress': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/3TCdRYocZg0AAAAAAAAAAAAADoEQAQFr/original',
},
'steps': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/wDIUQ7tLlmgAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'swipe-action': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/sjT2S6drb1YAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'tag': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/2xiLS7imUccAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'checkbox': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/WoQ-SKnvPxoAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'checklist': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/b88rSJapaicAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'date-picker': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/pmtUQK6IIYwAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'form': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/l5bzSIti2cQAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'image-upload': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/HLFZSrAnzo4AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'input': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/HyVQTLyBv58AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'number-keyboard': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/juu8RYs5f-cAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'number-input': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/v0WTRLe0iB4AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'postscript': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/NqO6Q6TjnzkAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'picker': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/bo9xQYHeDQQAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'radio': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/n7KCRq77-akAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'rare-words-keyboard': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/juu8RYs5f-cAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'keyboard': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/E-nHTLq9WwUAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'selector': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/BirWR7qOHHYAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'slider': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/VJ63SJr06f4AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'stepper': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/YCluTKy-ntAAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'switch': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/Ka3YTIyWtvUAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'loading': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/ckM4TZFDkzkAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'modal': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/Z1DiTbaqZbwAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'popover': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/fIN0SLGi1wIAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'popover-list': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/uJcdQoIVaCgAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'popup': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/qB_pTbp3rFoAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'rate': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/tj3xS5i6PmAAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'result': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/GRb-Rq_QN2IAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'skeleton': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/iQPaRaSv6vIAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'toast': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/8XTMTpEflwcAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'badge': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/GvkPS6VdUm0AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'notice-bar': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/ApHOQqkF3UgAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'page-container': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/V3-KQYdvOS8AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'voucher': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/ouVBQbV0LxMAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'card': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/fXO1TbJSX2QAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'sticky': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/s0HBSbfB_tUAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'countdown': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/0qx3TqMT2B4AAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'table': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/tbNfR7MwQMUAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'safe-area': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/5-A-TrkpTpkAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'select-contact': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/Loa6SoE0YiQAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
'terms': {
imageUrl:
'https://mdn.alipayobjects.com/huamei_bsws4g/afts/img/gikRRYAcJqMAAAAAAAAAAAAADoEQAQFr/fmt.avif',
},
},
};
// 为组件添加 -en 英文文档路径下的图片
Object.keys(ComponentSampleImages).forEach((mode) => {
const overviewConfig = ComponentSampleImages[mode];
Object.keys(overviewConfig).forEach((attr) => {
overviewConfig[attr + '-en'] = {
...overviewConfig[attr],
};
});
});
================================================
FILE: .dumi/theme/common/styles/Common.tsx
================================================
import { css, Global } from '@emotion/react';
import useSiteToken from '../../hooks/useSiteToken';
export default () => {
const {
token: { colorText, fontSize, fontFamily, lineHeight, colorBgContainer, anchorTop }
} = useSiteToken();
return (
<Global
styles={css`
html {
direction: initial;
height: 100%;
&.rtl {
direction: rtl;
}
}
body {
height: 100%;
overflow-x: hidden;
color: ${colorText};
font-size: ${fontSize}px;
font-family: ${fontFamily};
line-height: ${lineHeight};
background: ${colorBgContainer};
transition: background 1s cubic-bezier(0.075, 0.82, 0.165, 1);
}
#root {
min-height: 100%;
}
[id] {
scroll-margin-top: ${anchorTop}px;
}
[data-prefers-color='dark'] {
color-scheme: dark;
}
[data-prefers-color='light'] {
color-scheme: light;
}
`}
/>
);
};
================================================
FILE: .dumi/theme/common/styles/DumiDefaultStyleOverride.tsx
================================================
import { css, Global } from '@emotion/react';
import useSiteToken from '../../hooks/useSiteToken';
const PREFERS_COLOR_ATTR = 'data-prefers-color';
const prefix = 'dumi-default';
export default () => {
const { token } = useSiteToken();
return (
<Global
styles={css`
[${PREFERS_COLOR_ATTR}=dark] {
.markdown {
img {
opacity: 0.8;
}
}
}
.dumi-theme-antd-root {
.${prefix}-badge {
&:not([type]),
&[type='info'] {
color: ${token.colorPrimary};
background: ${token.colorPrimaryBg};
}
&[type='warning'] {
color: ${token.colorWarning};
background: ${token.colorWarningBg};
}
&[type='success'] {
color: ${token.colorSuccess};
background: ${token.colorSuccessBg};
}
&[type='error'] {
color: ${token.colorError};
background: ${token.colorErrorBg};
}
}
.${prefix}-container.markdown {
&[data-type='info'] {
color: ${token.colorPrimary};
background: ${token.colorPrimaryBg};
}
&[data-type='warning'] {
color: ${token.colorWarning};
background: ${token.colorWarningBg};
}
&[data-type='success'] {
color: ${token.colorSuccess};
background: ${token.colorSuccessBg};
}
&[data-type='error'] {
color: ${token.colorError};
background: ${token.colorErrorBg};
}
}
.${prefix}-content-tabs {
margin: 0 0 24px 0;
padding: 0;
}
}
`}
/>
);
};
================================================
FILE: .dumi/theme/common/styles/HeadingAnchor.tsx
================================================
import { css, Global } from '@emotion/react';
export default () => (
<Global
styles={css`
h1,
h2,
h3,
h4,
h5,
h6 {
> a[aria-hidden]:first-of-type {
float: left;
width: 20px;
padding-inline-end: 4px;
font-size: 0;
line-height: inherit;
text-align: right;
padding-inline-end: 4px;
margin-inline-start: -24px;
[data-direction='rtl'] & {
float: right;
}
&:hover {
border: 0;
}
> .icon-link::before {
font-size: 20px;
content: '#';
}
}
&:not(:hover) > a[aria-hidden]:first-of-type > .icon-link {
visibility: hidden;
}
}
`}
/>
);
================================================
FILE: .dumi/theme/common/styles/Highlight.tsx
================================================
import { css, Global } from '@emotion/react';
import useSiteToken from '../../hooks/useSiteToken';
export default () => {
const { token } = useSiteToken();
return (
<Global
styles={css`
pre code {
display: block;
padding: 16px 32px;
color: ${token.colorText};
font-size: ${token.fontSize}px;
font-family: 'Lucida Console', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
line-height: 2;
white-space: pre;
background: white;
border: 1px solid #e9e9e9;
border-radius: ${token.borderRadius}px;
}
code[class*='language-'],
pre[class*='language-'] {
color: ${token.siteTheme.includes('dark') ? 'rgba(255,255,255,0.85)' : 'black'};
font-family: 'Lucida Console', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
line-height: 1.5;
direction: ltr;
white-space: pre;
text-align: left;
word-wrap: normal;
word-break: normal;
word-spacing: normal;
tab-size: 4;
hyphens: none;
background: none;
}
code[class*='css'] {
direction: ltr;
}
pre[class*='language-'] ::selection,
code[class*='language-'] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*='language-'],
pre[class*='language-'] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*='language-'] {
margin: 16px 0;
padding: 12px 20px;
overflow: auto;
}
:not(pre) > code[class*='language-'],
pre[class*='language-'] {
background: #f5f5f5;
}
/* Inline code */
:not(pre) > code[class*='language-'] {
padding: 0.1em;
white-space: normal;
border-radius: 0.3em;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: 0.7;
}
.markdown {
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #f81d22;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #9a6e3a;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #008dff;
}
.token.function {
color: #f81d22;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
.token.comment {
font-style: normal;
}
}
`}
/>
);
};
================================================
FILE: .dumi/theme/common/styles/Markdown.tsx
================================================
import { TinyColor } from '@ctrl/tinycolor';
import { css, Global } from '@emotion/react';
import useSiteToken from '../../hooks/useSiteToken';
export default () => {
const { token } = useSiteToken();
const { antCls } = token;
const demoGridColor = token.colorPrimary;
return (
<Global
styles={css`
.markdown {
color: ${token.colorText};
font-size: 14px;
line-height: 2;
}
.highlight {
line-height: 1.5;
}
.markdown img {
max-width: calc(100% - 32px);
max-height: 100%;
}
.markdown p > img {
margin: 34px 0;
box-shadow: 0 8px 20px rgba(143, 168, 191, 0.35);
}
.markdown p > img.markdown-inline-image {
margin: 0;
box-shadow: none;
}
.markdown h1 {
margin-top: 8px;
margin-bottom: 20px;
color: ${token.colorTextHeading};
font-weight: 500;
font-size: 30px;
font-family: Avenir, ${token.fontFamily}, sans-serif;
line-height: 38px;
.subtitle {
margin-left: 12px;
}
}
.markdown h2 {
font-size: 24px;
line-height: 32px;
}
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
clear: both;
margin: 1.6em 0 0.6em;
color: ${token.colorTextHeading};
font-weight: 500;
font-family: Avenir, ${token.fontFamily}, sans-serif;
}
.markdown h3 {
font-size: 18px;
}
.markdown h4 {
font-size: 16px;
}
.markdown h5 {
font-size: 14px;
}
.markdown h6 {
font-size: 12px;
}
.markdown hr {
clear: both;
height: 1px;
margin: 24px 0;
background: ${token.colorSplit};
border: 0;
}
.markdown p,
.markdown pre {
margin: 1em 0;
${antCls}-row-rtl & {
direction: rtl;
text-align: right;
}
}
.markdown ul > li {
margin-left: 20px;
padding-left: 4px;
.rtl & {
margin-right: 20px;
margin-left: 0;
padding-right: 4px;
padding-left: 0;
}
&:empty {
display: none;
}
}
.markdown ol > li {
margin-left: 20px;
padding-left: 4px;
list-style-type: decimal;
${antCls}-row-rtl & {
margin-right: 20px;
margin-left: 0;
padding-right: 4px;
padding-left: 0;
}
}
.markdown ul > li > p,
.markdown ol > li > p {
margin: 0.2em 0;
}
.markdown code {
margin: 0 1px;
padding: 0.2em 0.4em;
font-size: 0.9em;
background: ${token.siteMarkdownCodeBg};
border-radius: 3px;
color: #d56161;
font-family: ${token.codeFamily};
}
.ant-alert code {
color: #d56161;
font-family: ${token.codeFamily};
}
.markdown pre {
font-family: ${token.codeFamily};
background: ${token.siteMarkdownCodeBg};
border-radius: ${token.borderRadius}px;
}
.markdown pre code {
margin: 0;
padding: 0;
overflow: auto;
color: ${token.colorText};
font-size: ${Math.max(token.fontSize - 1, 12)}px;
direction: ltr;
text-align: left;
background: #f5f5f5;
border: none;
}
.markdown strong,
.markdown b {
font-weight: 500;
}
.markdown .dumi-default-source-code {
margin: 1em 0;
background-color: ${token.siteMarkdownCodeBg};
border-radius: ${token.borderRadius}px;
> pre.prism-code {
padding: 12px 20px;
font-size: 13px;
line-height: 2;
}
}
.pic-plus {
& > * {
display: inline-block !important;
vertical-align: middle;
}
span {
margin: 0 20px;
color: #aaa;
font-size: 30px;
}
}
.antd-site-snippet {
.ant-tabs-tab {
.snippet-label {
display: flex;
align-items: center;
justify-content: center;
svg {
margin-inline-end: 8px;
}
}
}
.dumi-default-source-code {
margin: 0 auto;
background-color: ${token.siteMarkdownCodeBg};
border-radius: ${token.borderRadius}px;
> pre.prism-code {
padding: 12px 20px;
font-size: 13px;
line-height: 2;
}
}
}
.markdown table td > a:not(:last-child) {
margin-right: 0 !important;
&::after {
position: relative !important;
}
}
.markdown blockquote {
margin: 1em 0;
padding-left: 0.8em;
color: ${token.colorTextSecondary};
font-size: 90%;
border-left: 4px solid ${token.colorSplit};
.rtl & {
padding-right: 0.8em;
padding-left: 0;
border-right: 4px solid ${token.colorSplit};
border-left: none;
}
}
.markdown blockquote p {
margin: 0;
}
.markdown .anchor {
margin-left: 8px;
opacity: 0;
transition: opacity 0.3s;
.rtl & {
margin-right: 8px;
margin-left: 0;
}
}
.markdown .waiting {
color: #ccc;
cursor: not-allowed;
}
.markdown a.edit-button {
display: inline-block;
margin-left: 8px;
text-decoration: none;
.rtl & {
margin-right: 8px;
margin-left: 0;
transform: rotateY(180deg);
}
${antCls}icon {
display: block;
color: ${token.colorTextSecondary};
font-size: 16px;
transition: all 0.3s;
&:hover {
color: ${token.colorText};
}
}
}
.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
display: inline-block;
opacity: 1;
}
.markdown > br,
.markdown > p > br {
clear: both;
}
.markdown .dumi-default-table {
table {
margin: 0;
overflow-x: auto;
overflow-y: hidden;
direction: ltr;
empty-cells: show;
border: 1px solid ${token.colorSplit};
border-collapse: collapse;
border-spacing: 0;
th,
td {
padding: 12px 24px;
text-align: left;
border: 1px solid ${token.colorSplit};
&:first-of-type {
border-left: 1px solid ${token.colorSplit};
}
&:last-child {
border-right: 1px solid ${token.colorSplit};
}
img {
max-width: unset;
}
}
th {
color: #5c6b77;
font-weight: 500;
white-space: nowrap;
background: rgba(0, 0, 0, 0.02);
border-width: 1px 1px 2px;
}
tbody tr {
transition: all 0.3s;
&:hover {
background: rgba(60, 90, 100, 0.04);
}
}
}
.dumi-default-table-content {
table {
width: 100%;
margin: 0;
overflow-x: auto;
overflow-y: hidden;
font-size: ${Math.max(token.fontSize - 1, 12)}px;
font-family: ${token.codeFamily};
line-height: ${token.lineHeight};
border: 1px solid ${token.colorSplit};
border-width: 0 1px;
th {
border-width: 1px 0 2px;
}
td {
border-width: 1px 0;
}
}
}
}
.grid-demo,
[id^='components-grid-demo-'] {
${antCls}-row > div,
.code-box-demo ${antCls}-row > div {
min-height: 30px;
margin-top: 8px;
margin-bottom: 8px;
color: #fff;
text-align: center;
border-radius: 0;
}
.code-box-demo ${antCls}-row > div:not(.gutter-row) {
padding: 16px 0;
background: ${demoGridColor};
&:nth-of-type(2n + 1) {
background: ${new TinyColor(demoGridColor).setAlpha(0.75).toHex8String()};
}
}
${antCls}-row .demo-col,
.code-box-demo ${antCls}-row .demo-col {
margin-top: 0;
margin-bottom: 0;
padding: 30px 0;
color: ${token.colorWhite};
font-size: 18px;
text-align: center;
border: none;
}
${antCls}-row .demo-col-1 {
background: ${new TinyColor(demoGridColor).setAlpha(0.75).toHexString()};
}
${antCls}-row .demo-col-2,
.code-box-demo ${antCls}-row .demo-col-2 {
background: ${new TinyColor(demoGridColor).setAlpha(0.75).toHexString()};
}
${antCls}-row .demo-col-3,
.code-box-demo ${antCls}-row .demo-col-3 {
color: #999;
background: rgba(255, 255, 255, 0.2);
}
${antCls}-row .demo-col-4,
.code-box-demo ${antCls}-row .demo-col-4 {
background: ${new TinyColor(demoGridColor).setAlpha(0.6).toHexString()};
}
${antCls}-row .demo-col-5,
.code-box-demo ${antCls}-row .demo-col-5 {
color: #999;
background: rgba(255, 255, 255, 0.2);
}
.code-box-demo .height-100 {
height: 100px;
line-height: 100px;
}
.code-box-demo .height-50 {
height: 50px;
line-height: 50px;
}
.code-box-demo .height-120 {
height: 120px;
line-height: 120px;
}
.code-box-demo .height-80 {
height: 80px;
line-height: 80px;
}
}
[id='components-grid-demo-playground'],
[id='components-grid-demo-gutter'] {
> .code-box-demo ${antCls}-row > div {
margin-top: 0;
margin-bottom: 0;
}
}
`}
/>
);
};
================================================
FILE: .dumi/theme/common/styles/PreviewImage.tsx
================================================
import { css, Global } from '@emotion/react';
import useSiteToken from '../../hooks/useSiteToken';
export default () => {
const { token } = useSiteToken();
return (
<Global
styles={css`
.preview-image-boxes {
display: flex;
&-with-carousel {
width: 420px;
.preview-image-box img {
padding: 0;
}
}
.ant-row-rtl & {
float: left;
margin: 0 64px 70px 0;
}
}
.preview-image-boxes-float {
float: right;
clear: both;
width: 496px;
margin: 0 0 70px 64px;
}
.preview-image-boxes-pure {
.preview-image-box img {
padding: 0;
}
}
.preview-image-boxes + .preview-image-boxes {
margin-top: -35px;
}
.preview-image-box {
float: left;
width: 100%;
}
.preview-image-box + .preview-image-box {
margin-left: 24px;
.ant-row-rtl & {
margin-right: 24px;
margin-left: 0;
}
}
.preview-image-wrapper {
position: relative;
display: inline-block;
width: 100%;
padding: 16px;
text-align: center;
background: #f2f4f5;
box-sizing: border-box;
}
.preview-image-wrapper.video {
display: block;
padding: 0;
background: 0;
}
.preview-image-wrapper video {
display: block;
width: 100%;
+ svg {
position: absolute;
top: 0;
left: 0;
}
}
.preview-image-wrapper.good::after {
position: absolute;
bottom: 0;
left: 0;
display: block;
width: 100%;
height: 3px;
background: ${token.colorPrimary};
content: '';
}
.preview-image-wrapper.bad::after {
position: absolute;
bottom: 0;
left: 0;
display: block;
width: 100%;
height: 3px;
background: ${token.colorError};
content: '';
}
.preview-image-title {
margin-top: 20px;
color: ${token.colorText};
font-size: 12px;
}
.preview-image-description {
margin-top: 2px;
color: ${token.colorTextSecondary};
font-size: 12px;
line-height: 1.5;
}
.preview-image-description hr {
margin: 2px 0;
background: none;
border: 0;
}
.preview-image-box img {
box-sizing: border-box;
max-width: 100%;
padding: 12px;
background: ${token.colorBgContainer};
border-radius: ${token.borderRadius}px;
cursor: pointer;
transition: all 0.3s;
&.no-padding {
padding: 0;
background: none;
}
}
.preview-image-boxes.preview-image-boxes-with-carousel img {
padding: 0;
box-shadow: 0 1px 0 0 #ddd, 0 3px 0 0 ${token.colorBgContainer}, 0 4px 0 0 #ddd,
0 6px 0 0 ${token.colorBgContainer}, 0 7px 0 0 #ddd;
}
.preview-image-box img:hover {
box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.3);
}
.transition-video-player,
.motion-video-min {
float: right;
width: 600px;
padding: 0 0 70px 20px;
.preview-image-wrapper {
padding: 0;
}
.ant-row-rtl & {
float: left;
}
}
.motion-video-min {
width: 390px;
}
.motion-principle-wrapper {
width: 100%;
max-width: 900px;
margin: 48px 0 24px;
}
.principle-wrapper {
width: 100%;
.principle {
display: inline-block;
box-sizing: border-box;
width: 100%;
min-height: 180px;
margin-right: 12.5%;
margin-bottom: 24px;
padding: 24px;
font-size: 24px;
text-align: center;
border: 1px solid #e8e8e8;
border-radius: 4px;
&:last-child {
margin-right: 0;
}
h4 {
margin: 16px 0 8px;
}
p {
font-size: 12px;
line-height: 24px;
}
}
}
`}
/>
);
};
================================================
FILE: .dumi/theme/common/styles/Reset.tsx
================================================
import { css, Global } from '@emotion/react';
export default () => (
<Global
styles={css`
body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
code,
form,
fieldset,
legend,
input,
textarea,
p,
blockquote,
th,
td,
hr,
button,
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
margin: 0;
padding: 0;
}
Í ul,
ol {
list-style: none;
}
img {
vertical-align: middle;
border-style: none;
}
`}
/>
);
================================================
FILE: .dumi/theme/common/styles/Responsive.tsx
================================================
import { css, Global } from '@emotion/react';
import useSiteToken from '../../hooks/useSiteToken';
export default () => {
const { token } = useSiteToken();
return (
<Global
styles={css`
.nav-phone-icon {
position: absolute;
top: 25px;
right: 30px;
z-index: 1;
display: none;
width: 16px;
height: 22px;
cursor: pointer;
}
@media only screen and (max-width: ${token.screenLG}px) {
.code-boxes-col-2-1,
.code-boxes-col-1-1 {
float: none;
width: 100%;
max-width: unset;
}
}
@media only screen and (max-width: 767.99px) {
.preview-image-boxes {
float: none;
width: 100%;
margin: 0 !important;
}
.preview-image-box {
width: 100%;
margin: 10px 0;
padding: 0;
}
.image-wrapper {
display: none;
}
div.version {
display: block;
margin: 29px auto 16px;
}
.toc {
display: none;
}
.nav-phone-icon {
display: block;
}
.main {
height: calc(100% - 86px);
}
.aside-container {
float: none;
width: auto;
padding-bottom: 30px;
border-right: 0;
}
.ant-row-rtl {
margin-right: 0;
margin-left: 0;
padding-right: 16px;
padding-left: 16px;
> .markdown > * {
width: 100% !important;
}
}
.main-wrapper {
width: 100%;
margin: 0;
border-radius: 0;
}
.prev-next-nav {
width: ~'calc(100% - 32px)';
margin-left: 16px;
.ant-row-rtl & {
margin-right: 16px;
margin-left: 64px;
}
}
.drawer {
.ant-menu-inline .ant-menu-item::after,
.ant-menu-vertical .ant-menu-item::after {
right: auto;
left: 0;
}
}
/** home 区块 **/
.home-page-wrapper {
.page {
h2 {
margin: 80px auto 64px;
}
}
.parallax-bg {
display: none;
}
}
.banner {
display: block;
height: 632px;
&-bg-wrapper {
display: none;
}
.img-wrapper,
.text-wrapper {
display: inline-block;
width: 100%;
min-width: unset;
max-width: unset;
margin: auto;
text-align: center;
}
.img-wrapper {
position: initial;
margin-top: 20px;
text-align: center;
svg {
width: 100%;
max-width: 260px;
height: auto;
margin: 0 auto;
}
}
.text-wrapper {
min-height: 200px;
margin-top: 32px;
padding: 0;
h1 {
display: none;
}
p {
color: #314659;
font-size: 14px;
line-height: 28px;
}
.banner-btns {
display: block;
min-width: 100%;
white-space: nowrap;
text-align: center;
.banner-btn {
padding: 0 20px;
font-size: 14px;
}
}
.banner-promote {
min-width: 100%;
margin-top: 32px;
.ant-divider {
display: none;
}
a {
font-size: 14px;
white-space: nowrap;
img {
width: 20px;
}
}
}
}
}
.page1 {
min-height: 1300px;
.ant-row {
margin: 24px auto 64px;
> div {
margin-bottom: 48px;
}
}
}
.page2 {
min-height: 840px;
background: ${token.colorBgContainer};
&-content {
box-shadow: none;
}
&-components {
display: none;
}
&-product {
min-height: auto;
padding: 0 16px;
.product-block {
margin-bottom: 34px;
padding-bottom: 35px;
border-bottom: 1px solid ${token.colorSplit};
&:last-child {
margin-bottom: 32px;
border-bottom: none;
.block-text-wrapper {
height: auto;
}
}
.block-image-wrapper {
height: 88px;
img {
height: 100%;
}
}
.block-text-wrapper {
padding-bottom: 0;
border-bottom: none;
h4 {
margin-bottom: 4px;
font-size: 18px;
line-height: 24px;
}
p {
margin-bottom: 8px;
font-size: 12px;
line-height: 20px;
}
a {
line-height: 20px;
}
.components-button-wrapper {
margin-top: 16px;
font-size: 12px;
a {
display: block;
}
}
a.more-mobile-react,
a.more-mobile-angular {
margin-top: 0;
color: ${token.colorLink};
}
a.more-mobile-react:hover,
a.more-mobile-angular:hover {
color: #40a9ff;
}
}
}
}
}
.page3 {
min-height: 688px;
background: url('https://gw.alipayobjects.com/zos/rmsportal/qICoJIqqQRMeRGhPHBBS.svg')
no-repeat;
background-size: cover;
.ant-row {
margin: 0 8px;
}
.page3-block {
margin-bottom: 32px;
padding: 24px;
background: ${token.colorBgContainer};
border-radius: 4px;
box-shadow: 0 8px 16px rgba(174, 185, 193, 0.3);
&:nth-of-type(2) {
.page3-img-wrapper img {
display: block;
width: 70%;
margin: auto;
}
}
p {
font-size: 12px;
}
.page3-img-wrapper {
width: 20%;
img {
width: 100%;
}
}
.page3-text-wrapper {
width: 80%;
max-width: initial;
margin: 0;
padding-left: 16px;
}
}
}
}
`}
/>
);
};
================================================
FILE: .dumi/theme/common/styles/SearchBar.tsx
================================================
import { css, Global } from '@emotion/react';
import useSiteToken from '../../hooks/useSiteToken';
const THEME_PREFIX = 'dumi-default-';
export default () => {
const { token } = useSiteToken();
return (
<Global
styles={css`
html {
.${THEME_PREFIX}search-bar {
&-input {
color: ${token.colorText};
background: ${token.colorBgContainer};
&:focus {
background: ${token.colorBgContainer};
}
&::placeholder {
color: ${token.colorTextPlaceholder} !important;
}
}
}
.${THEME_PREFIX}search-popover {
background-color: ${token.colorBgElevated} !important;
&::before {
border-bottom-color: ${token.colorBgElevated} !important;
}
}
.${THEME_PREFIX}search-result {
dl {
dt {
background-color: ${token.controlItemBgActive} !important;
}
dd {
a {
&:hover {
background-color: ${token.controlItemBgHover};
h4,
p {
color: ${token.colorText} !important;
}
svg {
fill: ${token.colorText} !important;
}
}
}
}
}
}
}
`}
/>
);
};
================================================
FILE: .dumi/theme/common/styles/index.ts
================================================
export { default as Common } from './Common';
export { default as DumiDefaultStyleOverride } from './DumiDefaultStyleOverride';
export { default as HeadingAnchor } from './HeadingAnchor';
export { default as Highlight } from './Highlight';
export { default as Markdown } from './Markdown';
export { default as Reset } from './Reset';
export { default as Responsive } from './Responsive';
export { default as SearchBar } from './SearchBar';
export { default as PreviewImage } from './PreviewImage';
================================================
FILE: .dumi/theme/defineThemeConfig/index.ts
================================================
import type { IAllThemeConfig } from '../types';
/**
* @description provider declaration of config files
* @param {ThemeConfig} config theme config
* @returns {ThemeConfig}
*/
export function defineThemeConfig(config: Partial<IAllThemeConfig>): Partial<IAllThemeConfig> {
return config;
}
================================================
FILE: .dumi/theme/global.d.ts
================================================
interface Window {
setMsgToSim?: (miniCode: string) => void; // 像模拟器通信
}
================================================
FILE: .dumi/theme/hooks/useAdditionalThemeConfig.ts
================================================
// 获取 dumi-theme-antd 额外的配置
import { useSiteData } from 'dumi';
import type { IAllThemeConfig } from '../types';
interface IuseAdditionalThemeConfig {
(): IAllThemeConfig;
}
const useAdditionalThemeConfig: IuseAdditionalThemeConfig = () => {
const { themeConfig } = useSiteData();
const additionalThemeConfig = themeConfig;
return additionalThemeConfig;
};
export default useAdditionalThemeConfig;
================================================
FILE: .dumi/theme/hooks/useLocaleValue.ts
================================================
import { useLocale, useSiteData } from 'dumi';
import type { IAllThemeConfig } from '../types';
export default function useLocaleValue(key: string) {
const { themeConfig } = useSiteData();
const locale = useLocale();
const additionalThemeConfig: IAllThemeConfig = themeConfig;
const value = additionalThemeConfig[key];
return value?.[locale.id] ?? value;
}
================================================
FILE: .dumi/theme/hooks/useMenu.tsx
================================================
import type { MenuProps } from 'antd';
import { Tag } from 'antd';
import {
Link,
useFullSidebarData,
useLocale,
useLocation,
useSidebarData,
} from 'dumi';
import type { ReactNode } from 'react';
import { useMemo } from 'react';
import pkgJSON from '../../../package.json';
import type {
ISidebarGroupModePathItem,
} from '../types';
import { handleFullSidebarData, removeTitleCode } from '../utils';
import useAdditionalThemeConfig from './useAdditionalThemeConfig';
export type UseMenuOptions = {
before?: ReactNode;
after?: ReactNode;
};
const useMenu = (
options: UseMenuOptions = {},
): [MenuProps['items'], string] => {
const { pathname, search } = useLocation();
const { sidebarGroupModePath } =
useAdditionalThemeConfig();
const { before, after } = options;
const fullSidebarData = useFullSidebarData();
const navSecondSidebarData = handleFullSidebarData(fullSidebarData);
const locale = useLocale();
// 提取一级导航下侧边栏数据
const currentNavKey = `/${pathname.split('/')?.[1]}`;
const sidebarData = navSecondSidebarData[currentNavKey];
const menuItems = useMemo<MenuProps['items']>(() => {
const suffixRegExp = new RegExp(`${(locale as any)?.suffix ?? ''}$`, 'g');
const sidebarItems = [...(sidebarData ?? [])];
const getItemTag = (
tag: string | { color: string; title: string },
show = true,
) =>
tag &&
show && (
<Tag
color={typeof tag === 'string' ? 'processing' : tag.color}
bordered={false}
style={{
marginInlineStart: 'auto',
marginInlineEnd: 0,
marginTop: -2,
}}
>
{(typeof tag === 'string' ? tag : tag.title).replace(
'VERSION',
`v${pkgJSON.version}`,
)}
</Tag>
);
return (
sidebarItems?.reduce<
Exclude<MenuProps['items'] | { order?: number }[], undefined>
>((result, group) => {
if (group?.title) {
// sideBar menu group 模式, 默认以非 group 模式渲染
const isSideBarGroupMode =
sidebarGroupModePath === true
? true
: (sidebarGroupModePath ?? []).filter(
(rule: ISidebarGroupModePathItem) => {
return pathname.startsWith(rule);
},
).length > 0;
if (isSideBarGroupMode) {
result.push({
type: 'group',
label: group?.title,
order: group?.order,
key: group?.title,
children: group.children?.map((item) => ({
label: (
<Link
to={`${item.link}${search}`}
style={{ display: 'flex', alignItems: 'center' }}
>
{before}
<span key="english">{removeTitleCode(item?.title)}</span>
<span className="chinese" key="chinese">
{removeTitleCode(item.frontmatter?.subtitle)}
</span>
{getItemTag(item.frontmatter?.tag, !before && !after)}
{after}
</Link>
),
key: item.link.replace(suffixRegExp, ''),
})),
});
} else {
const childrenResultTypeOrder = {};
const childrenGroup = group.children.reduce<
Record<
string,
ReturnType<typeof useSidebarData>[number]['children']
>
>((childrenResult, child) => {
const nextChildrenResult = childrenResult;
const childType = child?.frontmatter?.type;
// 兼容 type 为字符串 && object,object 支持排序
const type =
typeof childType === 'string'
? childType
: childType?.title ?? 'default';
if (!nextChildrenResult[type]) {
nextChildrenResult[type] = [];
}
if (!childrenResultTypeOrder[type]) {
childrenResultTypeOrder[type] = {
title: type,
order: childType?.order ?? -1,
};
} else if (childType?.order) {
childrenResultTypeOrder[type].order = childType.order;
}
nextChildrenResult[type].push(child);
return nextChildrenResult;
}, {});
const childrenGroupOrdered = Object.keys(childrenGroup)
.sort(
(a, b) =>
childrenResultTypeOrder[a].order -
childrenResultTypeOrder[b].order,
)
.reduce<
Record<
string,
ReturnType<typeof useSidebarData>[number]['children']
>
>((obj, key) => {
const _obj = obj;
_obj[key] = childrenGroup[key];
return _obj;
}, {});
const childItems: any[] = [];
childItems.push(
...(childrenGroupOrdered.default?.map((item) => ({
label: (
<Link
to={`${item.link}${search}`}
style={{ display: 'flex', alignItems: 'center' }}
>
{before}
{removeTitleCode(item?.title)}
{getItemTag(item.frontmatter?.tag, !before && !after)}
{after}
</Link>
),
key: item.link.replace(suffixRegExp, ''),
})) ?? []),
);
Object.entries(childrenGroupOrdered).forEach(([type, children]) => {
if (type !== 'default') {
childItems.push({
type: 'group',
label: type,
key: type,
children: children?.map((item) => ({
label: (
<Link
to={`${item.link}${search}`}
style={{ display: 'flex', alignItems: 'center' }}
>
{before}
{removeTitleCode(item?.title)}
{getItemTag(item.frontmatter?.tag, !before && !after)}
{after}
</Link>
),
key: item.link.replace(suffixRegExp, ''),
})),
});
}
});
result.push({
label: group?.title,
key: group?.title,
order: group?.order,
children: childItems,
});
}
} else {
const list = group.children || [];
// 如果有 date 字段,我们就对其进行排序
if (list.every((info) => info?.frontmatter?.date)) {
list.sort((a, b) =>
a?.frontmatter?.date > b?.frontmatter?.date ? -1 : 1,
);
}
result.push(
...list.map((item) => ({
order: item?.order,
label: (
<Link
to={`${item.link}${search}`}
style={{ display: 'flex', alignItems: 'center' }}
>
{before}
{removeTitleCode(item?.title)}
{getItemTag(item.frontmatter?.tag, !before && !after)}
{after}
</Link>
),
key: item.link.replace(suffixRegExp, ''),
})),
);
}
// group 模式与 single 模式混合排序
result.sort((a, b) => (a?.order < b?.order ? -1 : 1));
return result;
}, []) ?? []
);
}, [
sidebarData,
sidebarGroupModePath,
pathname,
search,
before,
after,
locale,
]);
const selectedKey = pathname.replace(
new RegExp(`${(locale as any)?.suffix ?? ''}$`, 'g'),
'',
);
return [menuItems, selectedKey];
};
export default useMenu;
================================================
FILE: .dumi/theme/hooks/useSiteToken.ts
================================================
import { TinyColor } from '@ctrl/tinycolor';
import { theme } from 'antd';
import type { GlobalToken } from 'antd';
import { ConfigContext } from 'antd/lib/config-provider';
import { useContext } from 'react';
import SiteContext from '../slots/SiteContext';
import type { SiteContextProps } from '../slots/SiteContext';
interface IUseSiteToken {
token: GlobalToken & {
headerHeight: number;
menuItemBorder: number;
mobileMaxWidth: number;
siteMarkdownCodeBg: string;
antCls: string;
iconCls: string;
marginFarXS: number;
marginFarSM: number;
marginFar: number;
codeFamily: string;
contentMarginTop: number;
anchorTop: number;
boxShadowCard: string;
siteTheme: SiteContextProps['theme'];
};
siteCls: string;
}
const { useToken } = theme;
const headerHeight = 64;
const boxShadowCard = `
0 1px 2px -2px ${new TinyColor('rgba(0, 0, 0, 0.16)').toRgbString()},
0 3px 6px 0 ${new TinyColor('rgba(0, 0, 0, 0.12)').toRgbString()},
0 5px 12px 4px ${new TinyColor('rgba(0, 0, 0, 0.09)').toRgbString()}
`;
const useSiteToken = (): IUseSiteToken => {
const result = useToken();
const { getPrefixCls, iconPrefixCls } = useContext(ConfigContext);
const { theme: siteTheme } = useContext(SiteContext);
const rootPrefixCls = getPrefixCls();
const { token } = result;
const siteMarkdownCodeBg = token.colorFillTertiary;
return {
...result,
token: {
...token,
headerHeight,
menuItemBorder: 2,
mobileMaxWidth: 767.99,
siteMarkdownCodeBg,
antCls: `.${rootPrefixCls}`,
iconCls: `.${iconPrefixCls}`,
/** 56 */
marginFarXS: (token.marginXXL / 6) * 7,
/** 80 */
marginFarSM: (token.marginXXL / 3) * 5,
/** 96 */
marginFar: token.marginXXL * 2,
codeFamily: "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",
contentMarginTop: 40,
anchorTop: headerHeight + token.margin,
boxShadowCard,
siteTheme
},
/** dumi-theme-antd 站点 class 前缀 */
siteCls: 'dumi-antd'
};
};
export default useSiteToken;
================================================
FILE: .dumi/theme/hooks/uselocale.ts
================================================
import { useLocale as useDumiLocale } from 'dumi';
export interface LocaleMap<Key extends string> {
cn: Record<Key, string>;
en: Record<Key, string>;
}
export default function useLocale<Key extends string>(
localeMap?: LocaleMap<Key>
): [Record<Key, string>, 'cn' | 'en'] {
const { id } = useDumiLocale();
const localeType = id === 'zh-CN' ? 'cn' : ('en' as const);
return [localeMap?.[localeType]!, localeType];
}
================================================
FILE: .dumi/theme/index.ts
================================================
import Footer from './slots/Footer';
import Loading from './common/Loading';
import HomeBaseLayout from './builtins/HomeBaseLayout';
export { Loading, Footer, HomeBaseLayout };
================================================
FILE: .dumi/theme/layouts/DocLayout/index.tsx
================================================
import { css } from '@emotion/react';
import { Helmet, Outlet, useLocale, useLocation, useOutlet, useRouteMeta, useSiteData } from 'dumi';
import React, { useEffect, useContext, useMemo, type FC } from 'react';
import classNames from 'classnames';
import GlobalStyles from '../../common/GlobalStyles';
import useLocaleValue from '../../hooks/useLocaleValue';
import Footer from '../../slots/Footer';
import Header from '../../slots/Header';
import Homepage from '../HomePageLayout';
import SidebarLayout from '../SidebarLayout';
import SiteContext from '../../slots/SiteContext';
import '../../static/style';
const useStyles = () => {
return {
layoutWrap: css`
display: flex;
flex-direction: column;
min-height: 100vh;
`
};
};
const DocLayout: FC = () => {
const outlet = useOutlet();
const locale = useLocale();
const location = useLocation();
const styles = useStyles();
const routeMeta = useRouteMeta();
const title = useLocaleValue('title');
const description = useLocaleValue('description');
const { pathname, hash } = location;
const { loading } = useSiteData();
const { direction } = useContext(SiteContext);
const content = useMemo(() => {
if (
['', '/'].some((path) => path === pathname) ||
['/index'].some((path) => pathname.startsWith(path))
) {
return (
<React.Fragment>
{outlet || <Homepage />}
<Footer />
</React.Fragment>
);
}
return routeMeta.frontmatter?.sidebar === false ? (
<div>
<Outlet />
</div>
) : (
<SidebarLayout>
<Outlet />
</SidebarLayout>
);
}, [outlet, pathname, routeMeta]);
// handle hash change or visit page hash from Link component, and jump after async chunk loaded
useEffect(() => {
const id = hash.replace('#', '');
if (id) {
document.getElementById(decodeURIComponent(id))?.scrollIntoView();
}
}, [loading, hash]);
return (
<div css={styles.layoutWrap}>
<Helmet encodeSpecialCharacters={false}>
<html
lang={locale.id}
data-direction={direction}
className={classNames(['dumi-theme-antd-root', { rtl: direction === 'rtl' }])}
/>
<title>{`${title || 'dumi-theme-antd'}${description ? `-${description}` : ''}`}</title>
<link
sizes="144x144"
href="https://gw.alipayobjects.com/zos/antfincdn/UmVnt3t4T0/antd.png"
/>
<meta name="description" content={description} />
<meta property="og:title" content={title} />
<meta property="og:type" content="website" />
<meta
property="og:image"
content="https://gw.alipayobjects.com/zos/rmsportal/rlpTLlbMzTNYuZGGCVYM.png"
/>
</Helmet>
<GlobalStyles />
<Header />
{content}
</div>
);
};
export default DocLayout;
================================================
FILE: .dumi/theme/layouts/GlobalLayout.tsx
================================================
import {
createCache,
extractStyle,
legacyNotSelectorLinter,
logicalPropertiesLinter,
parentSelectorLinter,
StyleProvider,
} from '@ant-design/cssinjs';
import { ConfigProvider, theme as antdTheme } from 'antd';
import { Outlet, usePrefersColor, useServerInsertedHTML } from 'dumi';
import type { FC } from 'react';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import Sim from '../common/Sim';
import type { ThemeName } from '../common/ThemeSwitch';
import useAdditionalThemeConfig from '../hooks/useAdditionalThemeConfig';
import type { SiteContextProps } from '../slots/SiteContext';
import SiteContext from '../slots/SiteContext';
type SiteState = Partial<Omit<SiteContextProps, 'updateSiteContext'>>;
const RESPONSIVE_MOBILE = 768;
const SITE_STATE_LOCALSTORAGE_KEY = 'dumi-theme-antd-site-state';
const defaultSiteState: SiteState = {
theme: [],
isMobile: false,
direction: 'ltr',
platform: 'alipay',
herboxUrl: '',
};
const getAlgorithm = (themes: ThemeName[] = []) =>
themes.map((theme) => {
if (theme === 'dark') {
return antdTheme.darkAlgorithm;
}
if (theme === 'compact') {
return antdTheme.compactAlgorithm;
}
return antdTheme.defaultAlgorithm;
});
const isThemeDark = () =>
window.matchMedia('(prefers-color-scheme: dark)').matches;
const getSiteState = (siteState) => {
const localSiteState = siteState;
const isDark = isThemeDark(); // 系统默认主题
const theme = localSiteState?.theme || [];
const isAutoTheme = theme.filter((item) => item === 'auto').length > 0;
if (isAutoTheme) {
const nextTheme = theme.filter((item) => item !== 'auto');
nextTheme.push(isDark ? 'dark' : 'light');
localSiteState.theme = nextTheme;
}
return Object.assign(defaultSiteState, localSiteState);
};
const GlobalLayout: FC = () => {
const [, , setPrefersColor] = usePrefersColor();
const { theme: configTheme, ssr, prefersColor } = useAdditionalThemeConfig();
const [{ theme, isMobile, direction, platform, herboxUrl }, setSiteState] =
useState<SiteState>(defaultSiteState);
// 基于 localStorage 实现
const updateSiteConfig = useCallback((props: SiteState) => {
try {
const localSiteState = JSON.parse(
window.localStorage.getItem(SITE_STATE_LOCALSTORAGE_KEY) || '{}'
);
const nextLocalSiteState = Object.assign(localSiteState, props);
window.localStorage.setItem(
SITE_STATE_LOCALSTORAGE_KEY,
JSON.stringify(nextLocalSiteState)
);
setSiteState((prev) => ({
...prev,
...props,
}));
} catch (error) {
// eslint-disable-next-line no-console
console.error(error);
}
}, []);
const updateMobileMode = useCallback(() => {
updateSiteConfig({
isMobile: window.innerWidth < RESPONSIVE_MOBILE,
});
}, [updateSiteConfig]);
useEffect(() => {
try {
const localSiteState = JSON.parse(
window.localStorage.getItem(SITE_STATE_LOCALSTORAGE_KEY) || '{}'
);
// 首次设置主题样式
if (!localSiteState?.theme) {
localSiteState.theme = [prefersColor.default];
}
const siteConfig = getSiteState(localSiteState);
updateSiteConfig(siteConfig);
} catch (error) {
// eslint-disable-next-line no-console
console.error(error);
}
}, [prefersColor, updateSiteConfig]);
useEffect(() => {
updateMobileMode();
// set data-prefers-color
setPrefersColor((theme ?? []).indexOf('dark') > -1 ? 'dark' : 'light');
window.addEventListener('resize', updateMobileMode);
return () => {
window.removeEventListener('resize', updateMobileMode);
};
}, [theme, updateMobileMode, setPrefersColor]);
const siteContextValue = useMemo(
() => ({
direction,
isMobile: isMobile!,
theme: theme!,
platform: platform!,
herboxUrl: herboxUrl!,
updateSiteConfig,
}),
[isMobile, theme, direction, platform, herboxUrl, updateSiteConfig]
);
const [styleCache] = React.useState(() => createCache());
useServerInsertedHTML(() => {
const styleText = extractStyle(styleCache, {
plain: true,
types: 'style',
});
return (
<style
data-type="antd-cssinjs"
dangerouslySetInnerHTML={{ __html: styleText }}
/>
);
});
useServerInsertedHTML(() => {
const styleText = extractStyle(styleCache, {
plain: true,
types: ['cssVar', 'token'],
});
return (
<style
data-type="antd-css-var"
data-rc-order="prepend"
data-rc-priority="-9999"
dangerouslySetInnerHTML={{ __html: styleText }}
/>
);
});
const BaseGlobalLayoutJSX = (
<SiteContext.Provider value={siteContextValue}>
<ConfigProvider
theme={{
...configTheme,
algorithm: getAlgorithm(theme),
}}
>
<Outlet />
{/* {prefersColor.switch && (
<ThemeSwitch
value={theme}
onChange={(nextTheme) => updateSiteConfig({ theme: nextTheme })}
/>
)} */}
<Sim />
</ConfigProvider>
</SiteContext.Provider>
);
const SSRGlobalLayoutJSX = (
<StyleProvider
cache={styleCache}
linters={[
logicalPropertiesLinter,
legacyNotSelectorLinter,
parentSelectorLinter,
]}
>
{BaseGlobalLayoutJSX}
</StyleProvider>
);
if (ssr) {
(global as any).styleCache = styleCache;
return SSRGlobalLayoutJSX;
}
return BaseGlobalLayoutJSX;
};
export default GlobalLayout;
================================================
FILE: .dumi/theme/layouts/HomePageLayout/index.tsx
================================================
import React from 'react';
import HomeBaseLayout from '../../builtins/HomeBaseLayout';
const HomePageLayout: React.FC = () => {
return <HomeBaseLayout />;
};
export default HomePageLayout;
================================================
FILE: .dumi/theme/layouts/SidebarLayout/index.tsx
================================================
import { css } from '@emotion/react';
import type { FC, PropsWithChildren } from 'react';
import CommonHelmet from '../../common/CommonHelmet';
import Content from '../../slots/Content';
import Sidebar from '../../slots/Sidebar';
const useStyle = () => {
return {
mainWrap: css`
display: flex;
flex: 1;
margin-top: 104px;
`,
};
};
const SidebarLayout: FC<PropsWithChildren<unknown>> = ({ children }) => {
const style = useStyle();
return (
<main css={style.mainWrap}>
<CommonHelmet />
<Sidebar />
<Content>{children}</Content>
</main>
);
};
export default SidebarLayout;
================================================
FILE: .dumi/theme/locales/en.json
================================================
{
"app.not-found.back-home": "Back to home page",
"app.not-found.subTitle": "Sorry, the page you visited does not exist.",
"app.theme.switch.dark": "Dark theme",
"app.theme.switch.compact": "Compact theme",
"app.header.menu.more": "More",
"app.footer.last.updated": "Last updated: ",
"app.footer.actions.edit": "Improve this documentation",
"header.search.placeholder": "Input to search",
"app.theme.sidebar.alipay": "Alipay",
"app.theme.sidebar.wechat": "Wechat",
"app.previewer.collapse.label": "Sample Code",
"app.platform.support.warning": "This component does not support ${platform} platform"
}
================================================
FILE: .dumi/theme/locales/zh-CN.json
================================================
{
"app.not-found.back-home": "返回首页",
"app.not-found.subTitle": "你访问的页面貌似不存在?",
"app.theme.switch": "切换主题",
"app.theme.switch.dark": "暗黑主题",
"app.theme.switch.compact": "紧凑主题",
"app.header.menu.more": "更多",
"app.footer.last.updated": "最后更新时间:",
"app.footer.actions.edit": "帮助改进此文档",
"app.theme.sidebar.alipay": "支付宝",
"app.theme.sidebar.wechat": "微信",
"app.previewer.collapse.label": "示例代码",
"app.platform.support.warning": "该组件不支持${platform}平台"
}
================================================
FILE: .dumi/theme/plugin/index.ts
================================================
import type { IApi } from 'dumi';
export default (api: IApi) => {
api.describe({
// eslint-disable-next-line @typescript-eslint/no-var-requires
key: `dumi-theme:${require('../../../package.json').name}`
});
api.modifyDefaultConfig(
(memo) =>
Object.assign(memo, {
cjs: {
output: 'dist/defineThemeConfig',
input: 'src/defineThemeConfig'
}
})
// eslint-disable-next-line function-paren-newline
);
};
================================================
FILE: .dumi/theme/plugin/techStack.ts
================================================
import type { IApi } from 'dumi';
import { winPath } from 'dumi/plugin-utils';
import type { IDumiTechStack } from 'dumi/tech-stack-utils';
import fs from 'fs';
import path from 'path';
import getSourceCode from '../../../scripts/getSourceCode';
class AntdTechStack implements IDumiTechStack {
name = 'antd';
constructor(opts: {}) {}
/**
* 仅将指向 demo/pages 目录的 code 标签当做 Antd demo
*/
isSupported(...[node]: Parameters<IDumiTechStack['isSupported']>) {
return (
typeof node.properties?.src === 'string' &&
node.properties.src.includes('demo/pages')
);
}
/**
* 将 code 的渲染结果替换为空的占位组件,因为实际的渲染会交给 openbox
*/
transformCode() {
return `import React from 'react';
export default () => React.createElement(React.Fragment, null, 'Antd demo 暂不支持独立预览');
`;
}
/**
* 生成传递给 Previewer 组件的 props
*/
generatePreviewerProps(
// @ts-ignore
...[props, opts]: Parameters<IDumiTechStack['generatePreviewerProps']>
) {
// console.log('generatePreviewerProps', props, opts);
const env = process.env.NODE_ENV;
// 实例文件的绝对路径
props.fileAbsPath = opts.fileAbsPath;
// 环境变量信息
props.env = env;
if (props.filename.includes('demo/pages')) {
// demo/pages/Button/index.ts
const pageElem = props.filename.split('/');
pageElem.shift();
const folder = pageElem.slice(0, -1).join('/') + '/';
const page = pageElem.join('/').replace(/\.(ts|js)$/, '');
props.herboxUrl = `/preview.html?page=${page}&folder=${folder}&theme=light&compilerServer=${
process.env.SERVER || ''
}`;
}
return props;
}
/**
* 生成 Antd demo 的元数据
* @note 由于源码展示也一并交给 openbox 而不是 dumi,所以这份元数据主要作用是生成 assets.json
*/
generateMetadata(
// @ts-ignore
...[asset, opts]: Parameters<IDumiTechStack['generateMetadata']>
) {
const deps: typeof asset.dependencies = {};
// 生成源码元数据
// Object.entries(
// // @ts-ignore
// getBlockDepsFiles(this.pkgName, path.dirname(opts.fileAbsPath))
// ).forEach(([file, args]) => {
// deps[file] = {
// type: 'FILE',
// value: args.content,
// };
// });
return {
...asset,
dependencies: deps,
};
}
}
/**
* 注册 Antd 技术栈到 Kit,用于将文档中的 code 渲染成 Antd 的 demo
*/
export default async (api: IApi) => {
api.describe({ key: 'antd-lib:tech-stack' });
// 注册技术栈
api.registerTechStack(() => new AntdTechStack({}));
// 替换默认的 Previewer 组件
// @ts-ignore
api.modifyTheme((memo) => {
memo.builtins.Previewer.source = winPath(
require.resolve('../builtins/Previewer/index.tsx')
);
return memo;
});
api.addBeforeMiddlewares(() => [
(req, res, next) => {
if (req.path === '/preview.html') {
fs.createReadStream(
path.join(__dirname, '../builtins/iframe.html')
).pipe(res);
return;
}
if (req.path === '/code.html') {
fs.createReadStream(path.join(__dirname, '../builtins/code.html')).pipe(
res
);
return;
}
if (req.path.startsWith('/sourceCode/')) {
const page = req.path.replace('/sourceCode/', '');
getSourceCode({
page,
theme: req.query.theme,
platform: req.query.platform,
}).then((json) => res.json(json));
return;
}
if (req.url === '/mini/packageInfo.json') {
res.json({});
return;
}
next();
},
]);
};
================================================
FILE: .dumi/theme/plugin.ts
================================================
/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable no-param-reassign */
import { cache } from '@emotion/css';
import createEmotionServer from '@emotion/server/create-instance';
import { createHash } from 'crypto';
import type { IApi } from 'dumi';
import fs from 'fs';
import path from 'path';
function extractEmotionStyle(html: string) {
if (html === undefined) {
throw new Error('Did you forget to return html from renderToString?');
}
const { extractCritical } = createEmotionServer(cache);
const { ids, css } = extractCritical(html);
if (!css) return [];
return [
{
key: cache.key,
ids,
css,
tag: `<style data-emotion="${cache.key} ${ids.join(' ')}">${css}</style>`,
},
];
}
export const getHash = (str: string, length = 8) =>
createHash('md5').update(str).digest('hex').slice(0, length);
const dumiThemeUmiPlugin = (api: IApi) => {
const writeCSSFile = (key: string, hashKey: string, cssString: string) => {
const fileName = `style-${key}.${getHash(hashKey)}.css`;
const filePath = path.join(api.paths.absOutputPath, fileName);
if (!fs.existsSync(filePath)) {
fs.writeFileSync(filePath, cssString, 'utf8');
}
return fileName;
};
const addLinkStyle = (html: string, cssFile: string, prepend = false) => {
const prefix = api.userConfig.publicPath || api.config.publicPath;
if (prepend) {
return html.replace(
'<head>',
`<head><link rel="stylesheet" href="${prefix + cssFile}">`
);
}
return html.replace(
'</head>',
`<link rel="stylesheet" href="${prefix + cssFile}"></head>`
);
};
// add ssr css file to html
api.modifyConfig((memo) => {
// 将 .dumrc 中 ssr 配置注入 themeConfig 中,便于页面获取
memo.themeConfig.ssr = memo.ssr;
return memo;
});
api.modifyExportHTMLFiles((files) => {
if (api.config?.ssr) {
const nextFiles = files
// exclude dynamic route path, to avoid deploy failed by `:id` directory
.filter((f) => !f.path.includes(':'))
.map((file) => {
let globalStyles = '';
// Debug for file content: uncomment this if need check raw out
// const tmpFileName = `_${file.path.replace(/\//g, '-')}`;
// const tmpFilePath = path.join(api.paths.absOutputPath, tmpFileName);
// fs.writeFileSync(tmpFilePath, file.content, 'utf8');
// extract all emotion style tags from body
file.content = file.content.replace(
/<style (data-emotion|data-sandpack)[\S\s]+?<\/style>/g,
(s) => {
globalStyles += s;
return '';
}
);
// insert emotion style tags to head
file.content = file.content.replace(
'</head>',
`${globalStyles}</head>`
);
// 1. 提取 emotion 样式
const styles = extractEmotionStyle(file.content);
// 2. 提取每个样式到独立 css 文件
styles.forEach((result) => {
const cssFile = writeCSSFile(
result.key,
result.ids.join(''),
result.css
);
file.content = addLinkStyle(file.content, cssFile);
});
// Insert antd style to head
const matchRegex = /<style data-type="antd-cssinjs">(.*?)<\/style>/;
const matchList = file.content.match(matchRegex) || [];
let antdStyle = '';
matchList.forEach((text) => {
file.content = file.content.replace(text, '');
antdStyle += text.replace(matchRegex, '$1');
});
const cssFile = writeCSSFile('antd', antdStyle, antdStyle);
file.content = addLinkStyle(file.content, cssFile, true);
// Insert antd cssVar to head
const cssVarMatchRegex =
/<style data-type="antd-css-var"[\S\s]+?<\/style>/;
const cssVarMatchList = file.content.match(cssVarMatchRegex) || [];
cssVarMatchList.forEach((text) => {
file.content = file.content.replace(text, '');
file.content = file.content.replace('<head>', `<head>${text}`);
});
return file;
});
return nextFiles;
}
return files;
});
api.registerPlugins([require.resolve('./plugin/techStack.ts')]);
};
export default dumiThemeUmiPlugin;
================================================
FILE: .dumi/theme/slots/Content/DocAnchor.tsx
================================================
import { css } from '@emotion/react';
import { Anchor } from 'antd';
import type { AnchorLinkItemProps } from 'antd/es/anchor/Anchor';
import classNames from 'classnames';
import { useRouteMeta, useTabMeta } from 'dumi';
import React from 'react';
import useSiteToken from '../../hooks/useSiteToken';
const useStyle = () => {
const { token } = useSiteToken();
const { antCls } = token;
return {
toc: css`
${antCls}-anchor {
${antCls}-anchor-link-title {
font-size: ${token.fontSizeSM}px;
}
}
`,
tocWrapper: css`
position: fixed;
top: ${token.headerHeight + token.contentMarginTop - 8}px;
inset-inline-end: 0;
width: 144px;
padding: ${token.paddingXS}px;
border-radius: ${token.borderRadius}px;
box-sizing: border-box;
margin-inline-end: calc(16px - 100vw + 100%);
z-index: 10;
.toc-debug {
color: ${token.purple6};
&:hover {
color: ${token.purple5};
}
}
> div {
box-sizing: border-box;
width: 100%;
max-height: calc(
100vh - ${token.headerHeight + token.contentMarginTop + 24}px
) !important;
margin: auto;
overflow: auto;
padding: ${token.paddingXXS}px;
backdrop-filter: blur(8px);
}
@media only screen and (max-width: ${token.screenLG}px) {
display: none;
}
`,
articleWrapper: css`
padding: 0 170px 32px 64px;
&.rtl {
padding: 0 64px 144px 170px;
}
@media only screen and (max-width: ${token.screenLG}px) {
&,
&.rtl {
padding: 0 ${token.paddingLG * 2}px;
}
}
`,
};
};
interface DocAnchorProps {
showDebug?: boolean;
debugDemos?: string[];
}
interface AnchorItem {
id: string;
title: string;
children?: AnchorItem[];
}
const DocAnchor: React.FC<DocAnchorProps> = ({
showDebug,
debugDemos = [],
}) => {
const styles = useStyle();
const { token } = useSiteToken();
const meta = useRouteMeta();
const tab = useTabMeta();
const renderAnchorItem = (item: AnchorItem): AnchorLinkItemProps => ({
href: `#${item.id}`,
title: item.title,
key: item.id,
children: item.children
?.filter((child) => showDebug || !debugDemos.includes(child.id))
.map<AnchorLinkItemProps>((child) => ({
key: child.id,
href: `#${child.id}`,
title: (
<span
className={classNames({
'toc-debug': debugDemos.includes(child.id),
})}
>
{child?.title}
</span>
),
})),
});
const anchorItems = React.useMemo<AnchorItem[]>(
() =>
(tab?.toc || meta.toc).reduce<AnchorItem[]>((result, item) => {
if (item.depth === 2) {
result.push({ ...item });
} else if (item.depth === 3) {
const parent = result[result.length - 1];
if (parent) {
parent.children = parent.children || [];
parent.children.push({ ...item });
}
}
return result;
}, []),
[tab?.toc, meta.toc]
);
if (!meta.frontmatter.toc) {
return null;
}
return (
<section css={styles.tocWrapper}>
<Anchor
css={styles.toc}
affix={false}
targetOffset={token.anchorTop}
showInkInFixed
items={anchorItems.map<AnchorLinkItemProps>(renderAnchorItem)}
/>
</section>
);
};
export default DocAnchor;
================================================
FILE: .dumi/theme/slots/Content/InViewSuspense.tsx
================================================
import { Skeleton } from 'antd';
import React, { Suspense } from 'react';
import type { IntersectionObserverProps } from 'react-intersection-observer';
import { InView } from 'react-intersection-observer';
type InViewSuspenseProps = Pick<IntersectionObserverProps, 'delay'> & {
fallback?: React.ReactNode;
children?: React.ReactNode;
};
const InViewSuspense: React.FC<InViewSuspenseProps> = ({
children,
fallback = <Skeleton.Input active size="small" />,
delay = 200,
}) => (
<InView triggerOnce delay={delay}>
{({ inView, ref }) => (
<div ref={ref}>
<Suspense fallback={fallback}>{inView ? children : <span />}</Suspense>
</div>
)}
</InView>
);
export default InViewSuspense;
================================================
FILE: .dumi/theme/slots/Content/index.tsx
================================================
import { CalendarOutlined } from '@ant-design/icons';
import { css } from '@emotion/react';
import { Col, message, Space, Typography } from 'antd';
import classNames from 'classnames';
import DayJS from 'dayjs';
import { useIntl, useMatchedRoute, useRouteMeta } from 'dumi';
import React, { useContext, useEffect, useMemo } from 'react';
import EditLink from '../../common/EditLink';
import LastUpdated from '../../common/LastUpdated';
import PrevAndNext from '../../common/PrevAndNext';
import useSiteToken from '../../hooks/useSiteToken';
import SiteContext from '../SiteContext';
import DocAnchor from './DocAnchor';
import InViewSuspense from './InViewSuspense';
const useStyle = ({ isOverview, isShowSim }) => {
const { token } = useSiteToken();
const { antCls } = token;
return {
contributorsList: css`
display: flex;
flex-wrap: wrap;
margin-top: 120px !important;
a,
${antCls}-avatar + ${antCls}-avatar {
margin-bottom: 8px;
margin-inline-end: 8px;
}
`,
toc: css`
${antCls}-anchor {
${antCls}-anchor-link-title {
font-size: 12px;
}
}
`,
tocWrapper: css`
position: absolute;
top: 8px;
right: 0;
width: 160px;
margin: 12px 0;
padding: 8px 8px 8px 4px;
backdrop-filter: blur(8px);
border-radius: ${token.borderRadius}px;
box-sizing: border-box;
.toc-debug {
color: ${token['purple-6']};
&:hover {
color: ${token['purple-5']};
}
}
> div {
box-sizing: border-box;
width: 100%;
max-height: calc(100vh - 40px) !important;
margin: 0 auto;
overflow: auto;
padding-inline: 4px;
}
&.rtl {
right: auto;
left: 20px;
}
@media only screen and (max-width: ${token.screenLG}px) {
display: none;
}
`,
articleWrapper: css`
padding: ${isOverview
? '0 64px 32px 64px'
: isShowSim
? '0 412px 32px 64px'
: '0 164px 32px 64px'};
flex: 1;
&.rtl {
padding: 0 64px 144px 170px;
}
@media only screen and (max-width: ${token.screenLG}px) {
&,
&.rtl {
padding-right: 24px;
padding-left: 24px;
}
}
`,
bottomEditContent: css`
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 12px;
flex: 0;
`,
colContent: css`
display: flex;
flex-direction: column;
`,
};
};
const Content: React.FC<{ children: React.ReactNode }> = ({ children }) => {
const isOverview =
window.location.pathname === '/components/overview' ||
window.location.pathname === '/components/overview-en' ||
window.location.pathname === '/copilots/copilot-overview' ||
window.location.pathname === '/copilots/copilot-overview-en';
const matchedRoute = useMatchedRoute();
const isShowSim = useMemo(() => {
return matchedRoute?.meta?.frontmatter?.nav?.path === '/components' || matchedRoute?.meta?.frontmatter?.nav?.path === '/copilot';
}, [matchedRoute]);
const meta = useRouteMeta();
const styles = useStyle({ isOverview, isShowSim });
const { direction, platform, updateSiteConfig } = useContext(SiteContext);
const debugDemos = useMemo(
() =>
meta.toc?.filter((item) => item._debug_demo).map((item) => item.id) || [],
[meta]
);
const isShowTitle = useMemo(() => {
const title = meta.frontmatter?.title || meta.frontmatter.subtitle;
if (!title) return false;
// 避免 markdown 里有 h1 导致双标题
const firstToc = meta.toc[0];
if (fi
gitextract_uttux0t6/ ├── .dumi/ │ ├── pages/ │ │ ├── index/ │ │ │ └── index.tsx │ │ └── index-en/ │ │ └── index.tsx │ ├── theme/ │ │ ├── builtins/ │ │ │ ├── .gitkeep │ │ │ ├── HomeBaseLayout/ │ │ │ │ ├── components/ │ │ │ │ │ ├── Banner/ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── Frame/ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── Gallery/ │ │ │ │ │ │ ├── ItemBox/ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── Notice/ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── Theme/ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── Title/ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ └── Users/ │ │ │ │ │ └── index.tsx │ │ │ │ └── index.tsx │ │ │ ├── Icon.less │ │ │ ├── Icon.tsx │ │ │ ├── OverviewCard.tsx │ │ │ ├── Previewer/ │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── ResourceCard.less │ │ │ ├── ResourceCard.tsx │ │ │ ├── SourceCode/ │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── Table/ │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── code.html │ │ │ └── iframe.html │ │ ├── common/ │ │ │ ├── CommonHelmet.tsx │ │ │ ├── EditLink.tsx │ │ │ ├── GlobalStyles.tsx │ │ │ ├── LastUpdated.tsx │ │ │ ├── Loading/ │ │ │ │ └── index.tsx │ │ │ ├── PrevAndNext.tsx │ │ │ ├── Sim/ │ │ │ │ ├── index.less │ │ │ │ └── index.tsx │ │ │ ├── ThemeSwitch/ │ │ │ │ ├── ThemeIcon.tsx │ │ │ │ └── index.tsx │ │ │ ├── config/ │ │ │ │ └── overview.ts │ │ │ └── styles/ │ │ │ ├── Common.tsx │ │ │ ├── DumiDefaultStyleOverride.tsx │ │ │ ├── HeadingAnchor.tsx │ │ │ ├── Highlight.tsx │ │ │ ├── Markdown.tsx │ │ │ ├── PreviewImage.tsx │ │ │ ├── Reset.tsx │ │ │ ├── Responsive.tsx │ │ │ ├── SearchBar.tsx │ │ │ └── index.ts │ │ ├── defineThemeConfig/ │ │ │ └── index.ts │ │ ├── global.d.ts │ │ ├── hooks/ │ │ │ ├── useAdditionalThemeConfig.ts │ │ │ ├── useLocaleValue.ts │ │ │ ├── useMenu.tsx │ │ │ ├── useSiteToken.ts │ │ │ └── uselocale.ts │ │ ├── index.ts │ │ ├── layouts/ │ │ │ ├── DocLayout/ │ │ │ │ └── index.tsx │ │ │ ├── GlobalLayout.tsx │ │ │ ├── HomePageLayout/ │ │ │ │ └── index.tsx │ │ │ └── SidebarLayout/ │ │ │ └── index.tsx │ │ ├── locales/ │ │ │ ├── en.json │ │ │ └── zh-CN.json │ │ ├── plugin/ │ │ │ ├── index.ts │ │ │ └── techStack.ts │ │ ├── plugin.ts │ │ ├── slots/ │ │ │ ├── Content/ │ │ │ │ ├── DocAnchor.tsx │ │ │ │ ├── InViewSuspense.tsx │ │ │ │ └── index.tsx │ │ │ ├── Footer/ │ │ │ │ └── index.tsx │ │ │ ├── Header/ │ │ │ │ ├── HeaderExtral.tsx │ │ │ │ ├── Logo.tsx │ │ │ │ ├── More.tsx │ │ │ │ ├── Navigation.tsx │ │ │ │ ├── SwitchBtn.tsx │ │ │ │ └── index.tsx │ │ │ ├── LangSwitch/ │ │ │ │ └── index.tsx │ │ │ ├── NotFound/ │ │ │ │ └── index.tsx │ │ │ ├── Sidebar/ │ │ │ │ └── index.tsx │ │ │ └── SiteContext.ts │ │ ├── static/ │ │ │ └── style.ts │ │ ├── styles/ │ │ │ └── variables.less │ │ ├── types.ts │ │ └── utils.ts │ └── tsconfig.json ├── .dumirc.ts ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ └── feature_request_template.md │ ├── contributing.md │ ├── dependabot.yml │ ├── pull_requeset_template.md │ └── workflows/ │ ├── chatgpt_code_review.yaml │ ├── preview.yml │ ├── pull_request.yml │ ├── real_release.yml │ ├── release.yml │ └── release_candidate.yml ├── .gitignore ├── .prettierignore ├── .prettierrc ├── .stylelintrc ├── CHANGELOG.md ├── LICENSE ├── README.md ├── config/ │ ├── alipay/ │ │ ├── .act.config.json │ │ ├── app.less │ │ ├── app.ts │ │ ├── b2h.config.ts │ │ ├── mini.project.json │ │ ├── package.json │ │ └── tsconfig.json │ └── wechat/ │ ├── app.js │ ├── app.wxss │ └── package.json ├── copilot/ │ ├── Actions/ │ │ ├── check.sjs │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json5 │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Bubble/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json5 │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Conversations/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json5 │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Prompts/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json5 │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Sender/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json5 │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── ThoughtChain/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json5 │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ └── Welcome/ │ ├── index.axml │ ├── index.en.md │ ├── index.json5 │ ├── index.less │ ├── index.md │ ├── index.sjs.ts │ ├── index.ts │ ├── props.ts │ └── variable.less ├── copilot-demo/ │ └── pages/ │ ├── Actions/ │ │ ├── index.axml │ │ ├── index.json5 │ │ ├── index.less │ │ └── index.ts │ ├── Bubble/ │ │ ├── index.axml │ │ ├── index.json5 │ │ ├── index.less │ │ └── index.ts │ ├── Conversations/ │ │ ├── index.axml │ │ ├── index.json5 │ │ ├── index.less │ │ └── index.ts │ ├── Prompts/ │ │ ├── index.axml │ │ ├── index.json5 │ │ ├── index.less │ │ └── index.ts │ ├── Sender/ │ │ ├── index.axml │ │ ├── index.json5 │ │ ├── index.less │ │ └── index.ts │ ├── ThoughtChain/ │ │ ├── index.axml │ │ ├── index.json5 │ │ ├── index.less │ │ └── index.ts │ └── Welcome/ │ ├── index.axml │ ├── index.json5 │ ├── index.less │ └── index.ts ├── demo/ │ ├── components/ │ │ ├── Calendar/ │ │ │ └── collapse-container/ │ │ │ ├── cn-day/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json │ │ │ │ ├── index.less │ │ │ │ ├── index.ts │ │ │ │ └── js-calendar-converter.js │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ └── index.ts │ │ └── Form/ │ │ ├── checklist/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ ├── index.sjs.ts │ │ │ └── index.ts │ │ ├── form-json/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ └── index.ts │ │ └── location/ │ │ ├── index.axml │ │ ├── index.json5 │ │ ├── index.less │ │ ├── index.sjs.ts │ │ └── index.ts │ ├── pages/ │ │ ├── ActionSheet/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── AutoResize/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Avatar/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Badge/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Button/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Calendar/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Card/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Checkbox/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ ├── index.sjs.ts │ │ │ └── index.ts │ │ ├── Checklist/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Collapse/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── ConfigProvider/ │ │ │ ├── ar-SA.ts │ │ │ ├── es-US.ts │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Container/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Countdown/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── DatePicker/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Dialog/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Divider/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Empty/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Feedback/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Footer/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Form/ │ │ │ ├── FormBasic/ │ │ │ │ ├── city.ts │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── FormCustom/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── FormCustomError/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── FormDependency/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── FormDynamic/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── FormImageUploadRules/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── FormInitialValues/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── FormInitialValuesAsync/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── FormJSON/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── FormLayout/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── FormMultiple/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── FormReadonly/ │ │ │ │ ├── city.ts │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── FormRules/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── FormValidate/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── FormValidateMessages/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── FormWatch/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Grid/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── GuideTour/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Icon/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── ImageUpload/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── IndexBar/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Input/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── InputCustom/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── InputSearchBar/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── InputTextarea/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── utils.ts │ │ ├── List/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Loading/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Modal/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── NoticeBar/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── NumberInput/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── NumberKeyboard/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── NumberKeyboardAmount/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── NumberKeyboardCode/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── NumberKeyboardNumber/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── PageContainer/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Picker/ │ │ │ ├── city.ts │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Popover/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── PopoverList/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Popup/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Postscript/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Progress/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Radio/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── RareWordsKeyboard/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Rate/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Result/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── SafeArea/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── SelectContact/ │ │ │ ├── contact.ts │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Selector/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Skeleton/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Slider/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Space/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Stepper/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Steps/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Sticky/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── SwipeAction/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── slice.sjs.ts │ │ ├── SwipeActionAnimation/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── SwipeActionLeft/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── SwipeActionLeftRight/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── SwipeActionMove/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── SwipeActionNumber/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── slice.sjs.ts │ │ ├── SwipeActionSlot/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── SwipeActionSpeed/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── SwipeActionTap/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── SwipeActionWidth/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Switch/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── TabBar/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Table/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Tabs/ │ │ │ ├── TabsElevator/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── TabsVerticalElevator/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Tag/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Terms/ │ │ │ ├── Fixed/ │ │ │ │ ├── index.axml │ │ │ │ ├── index.json5 │ │ │ │ ├── index.less │ │ │ │ └── index.ts │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Toast/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Typography/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ ├── Voucher/ │ │ │ ├── index.axml │ │ │ ├── index.json5 │ │ │ ├── index.less │ │ │ └── index.ts │ │ └── index/ │ │ ├── index.axml │ │ ├── index.json5 │ │ ├── index.less │ │ └── index.ts │ └── utils/ │ └── constants.ts ├── docs/ │ ├── components/ │ │ ├── overview.en.md │ │ ├── overview.md │ │ └── wechat-component.tsx │ ├── guide/ │ │ ├── contribute.en.md │ │ ├── contribute.md │ │ ├── cooperation.en.md │ │ ├── cooperation.md │ │ ├── customize-theme.en.md │ │ ├── customize-theme.md │ │ ├── faq.en.md │ │ ├── faq.md │ │ ├── i18n.en.md │ │ ├── i18n.md │ │ ├── migration.en.md │ │ ├── migration.md │ │ ├── quick-start.en.md │ │ ├── quick-start.md │ │ ├── using-uni-app.en.md │ │ ├── using-uni-app.md │ │ ├── using-wechat.en.md │ │ └── using-wechat.md │ ├── resources.en.md │ └── resources.md ├── mini.project.json ├── package.json ├── project.config.json ├── scripts/ │ ├── axml/ │ │ ├── index.ts │ │ └── mapping.ts │ ├── build.js │ ├── check-compiled.ts │ ├── compile-axml.ts │ ├── compile.js │ ├── copy.ts │ ├── create-config.js │ ├── dev-doc.js │ ├── dev.ts │ ├── generate.ts │ ├── getSourceCode.js │ ├── github/ │ │ ├── cli.js │ │ ├── createIssueCommentPrNextResult.js │ │ ├── createPrNextCheckSuite.js │ │ ├── helpers.js │ │ └── notifyReleaseResult.js │ ├── mini-compiler.ts │ ├── patch-coverage.ts │ ├── publish.js │ ├── publishInCI.js │ ├── publishRC.js │ ├── publishUtils.js │ ├── quick-release.js │ ├── renamePageConfig.ts │ ├── todo.ts │ ├── transform.ts │ ├── tsconfig.json │ ├── tsxjs/ │ │ ├── babel-plugin-export-default-to-module-exports.ts │ │ ├── index.spec.ts │ │ └── index.ts │ ├── tsxml/ │ │ ├── context.ts │ │ ├── fixtures/ │ │ │ ├── command.tsx │ │ │ ├── component.tsx │ │ │ ├── event.tsx │ │ │ ├── if.tsx │ │ │ ├── index.tsx │ │ │ ├── page.tsx │ │ │ ├── sjs.sjs.js │ │ │ ├── sjs.tsx │ │ │ ├── snapshot/ │ │ │ │ ├── command.axml │ │ │ │ ├── command.wxml │ │ │ │ ├── component.axml │ │ │ │ ├── component.wxml │ │ │ │ ├── event.axml │ │ │ │ ├── event.wxml │ │ │ │ ├── if.axml │ │ │ │ ├── if.wxml │ │ │ │ ├── index.axml │ │ │ │ ├── index.wxml │ │ │ │ ├── page.axml │ │ │ │ ├── page.wxml │ │ │ │ ├── sjs.axml │ │ │ │ ├── sjs.wxml │ │ │ │ ├── style.axml │ │ │ │ ├── style.wxml │ │ │ │ ├── template.axml │ │ │ │ └── template.wxml │ │ │ ├── style.tsx │ │ │ └── template.tsx │ │ ├── h.ts │ │ ├── index.spec.ts │ │ ├── index.ts │ │ ├── parser.ts │ │ ├── platform.ts │ │ └── utils.ts │ └── verifyCommitMsg.js ├── src/ │ ├── ActionSheet/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Alphabet/ │ │ ├── index.axml │ │ ├── index.json │ │ ├── index.less │ │ └── index.ts │ ├── AutoResize/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Avatar/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Badge/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Button/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Calendar/ │ │ ├── helper.sjs.ts │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ ├── scroll.sjs.ts │ │ ├── utils.ts │ │ └── variable.less │ ├── Card/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Checkbox/ │ │ ├── CheckboxGroup/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Checklist/ │ │ ├── ChecklistItem/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Collapse/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── ConfigProvider/ │ │ ├── darkTheme.ts │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Container/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Countdown/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── DatePicker/ │ │ ├── RangePicker/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ ├── util.ts │ │ └── variable.less │ ├── Dialog/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Divider/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Empty/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Feedback/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Footer/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Form/ │ │ ├── FormCascaderPicker/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── FormCheckboxGroup/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── FormDatePicker/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── FormImageUpload/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── FormInput/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ ├── props.ts │ │ │ └── variable.less │ │ ├── FormItem/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── FormPicker/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── FormRadioGroup/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── FormRangePicker/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── FormRate/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── FormSelector/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── FormSlider/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ ├── props.ts │ │ │ └── variable.less │ │ ├── FormStepper/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ ├── props.ts │ │ │ └── variable.less │ │ ├── FormSwitch/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ ├── props.ts │ │ │ └── variable.less │ │ ├── FormTextarea/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── form.ts │ │ ├── index.en.md │ │ ├── index.md │ │ └── variable.less │ ├── Grid/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── GuideTour/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Icon/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── ImageIcon/ │ │ ├── index.axml │ │ ├── index.json │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ └── props.ts │ ├── ImageUpload/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── IndexBar/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Input/ │ │ ├── InputBlur/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── Textarea/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ ├── utils.ts │ │ └── variable.less │ ├── List/ │ │ ├── ListItem/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Loading/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Mask/ │ │ ├── index.axml │ │ ├── index.json │ │ ├── index.less │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Modal/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── NoticeBar/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── NumberInput/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── NumberKeyboard/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── PageContainer/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Pagination/ │ │ ├── index.axml │ │ ├── index.json │ │ ├── index.less │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Picker/ │ │ ├── CascaderPicker/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ ├── props.ts │ │ │ └── utils.ts │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ ├── utils.ts │ │ └── variable.less │ ├── Popover/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ ├── utils.ts │ │ └── variable.less │ ├── PopoverList/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ ├── utils.ts │ │ └── variable.less │ ├── Popup/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Postscript/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Progress/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Radio/ │ │ ├── RadioGroup/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── RareWordsKeyboard/ │ │ ├── constants.ts │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ ├── utils.ts │ │ ├── variable.less │ │ └── zdatas.ts │ ├── Rate/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Result/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── SafeArea/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ └── props.ts │ ├── SelectContact/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ ├── util.ts │ │ └── variable.less │ ├── Selector/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Skeleton/ │ │ ├── Avatar/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.sjs.ts │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── Button/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.sjs.ts │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── Input/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── Paragraph/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── Title/ │ │ │ ├── index.axml │ │ │ ├── index.json │ │ │ ├── index.less │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Slider/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Space/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ └── props.ts │ ├── Stepper/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ ├── utils.ts │ │ └── variable.less │ ├── Steps/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Sticky/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── SwipeAction/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ ├── variable.less │ │ └── wechat.ts │ ├── Switch/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── TabBar/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Table/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Tabs/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Tag/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Terms/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Toast/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Typography/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.sjs.ts │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── Voucher/ │ │ ├── index.axml │ │ ├── index.en.md │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ ├── index.ts │ │ ├── props.ts │ │ └── variable.less │ ├── _locale/ │ │ ├── ar-SA.ts │ │ ├── de-DE.ts │ │ ├── en-US.ts │ │ ├── es-ES.ts │ │ ├── fr-FR.ts │ │ ├── in-ID.ts │ │ ├── index.ts │ │ ├── it-IT.ts │ │ ├── ja-JP.ts │ │ ├── ko-KR.ts │ │ ├── ms-MY.ts │ │ ├── pt-BR.ts │ │ ├── ru-RU.ts │ │ ├── th-TH.ts │ │ ├── tr-TR.ts │ │ ├── vi-VN.ts │ │ ├── zh-CN.ts │ │ ├── zh-HK.ts │ │ └── zh-TW.ts │ ├── _util/ │ │ ├── arrow.sjs.ts │ │ ├── assert-component2.ts │ │ ├── base.ts │ │ ├── compareVersion.ts │ │ ├── console.ts │ │ ├── dayjs/ │ │ │ └── iso-weekday.ts │ │ ├── event.sjs.ts │ │ ├── flattenObject.ts │ │ ├── fmtEvent.ts │ │ ├── get.ts │ │ ├── isPropsEmpty.sjs.ts │ │ ├── jsapi/ │ │ │ ├── base.ts │ │ │ ├── choose-image.ts │ │ │ ├── create-canvas-context.ts │ │ │ ├── get-instance-bounding-client-rect.ts │ │ │ ├── get-system-info.ts │ │ │ └── load-font-face.ts │ │ ├── platform.ts │ │ ├── promisify.ts │ │ ├── set.ts │ │ ├── simply.ts │ │ ├── store.ts │ │ └── support.ts │ ├── mixins/ │ │ ├── computed.ts │ │ └── value.ts │ └── style/ │ ├── mixins/ │ │ └── hairline.less │ ├── themes/ │ │ ├── color.less │ │ ├── index.less │ │ ├── theme-black.less │ │ └── theme-mode.less │ └── variables.less ├── tests/ │ ├── alipay/ │ │ ├── ActionSheet/ │ │ │ └── __tests__/ │ │ │ └── index.test.ts │ │ ├── Badge/ │ │ │ └── __tests__/ │ │ │ ├── index.test.ts │ │ │ └── snapshot/ │ │ │ └── badge_alipay_config.txt │ │ ├── Button/ │ │ │ └── __tests__/ │ │ │ └── index.test.ts │ │ ├── Calendar/ │ │ │ └── __tests__/ │ │ │ ├── calendar.spec.ts │ │ │ ├── snapshot/ │ │ │ │ └── alipay_config_props.txt │ │ │ ├── testUtils.ts │ │ │ └── utils.spec.ts │ │ ├── Checkbox/ │ │ │ ├── CheckboxGroup/ │ │ │ │ └── index.spec.ts │ │ │ └── index.spec.ts │ │ ├── Checklist/ │ │ │ └── __tests__/ │ │ │ └── index.test.ts │ │ ├── Collapse/ │ │ │ └── index.test.ts │ │ ├── DatePicker/ │ │ │ ├── RangePicker/ │ │ │ │ ├── index.test.ts │ │ │ │ └── utils.ts │ │ │ ├── index.test.ts │ │ │ └── utils.ts │ │ ├── Form/ │ │ │ ├── FormCascaderPicker/ │ │ │ │ └── index.test.ts │ │ │ ├── FormCheckboxGroup/ │ │ │ │ └── index.test.ts │ │ │ ├── FormDatePicker/ │ │ │ │ └── index.test.ts │ │ │ ├── FormImageUpload/ │ │ │ │ └── index.test.ts │ │ │ ├── FormInput/ │ │ │ │ └── index.test.ts │ │ │ ├── FormPicker/ │ │ │ │ └── index.test.ts │ │ │ ├── FormRadioGroup/ │ │ │ │ └── index.test.ts │ │ │ ├── FormRangePicker/ │ │ │ │ └── index.test.ts │ │ │ ├── FormRate/ │ │ │ │ └── index.test.ts │ │ │ ├── FormSelector/ │ │ │ │ └── index.test.ts │ │ │ ├── FormSlider/ │ │ │ │ └── index.test.ts │ │ │ ├── FormStepper/ │ │ │ │ └── index.test.ts │ │ │ ├── FormSwitch/ │ │ │ │ └── index.test.ts │ │ │ ├── FormTextarea/ │ │ │ │ └── index.test.ts │ │ │ ├── form.test.ts │ │ │ ├── form.ts │ │ │ └── utils.ts │ │ ├── Grid/ │ │ │ └── __tests__/ │ │ │ └── index.test.ts │ │ ├── GuideTour/ │ │ │ └── index.test.ts │ │ ├── Icon/ │ │ │ └── __tests__/ │ │ │ └── index.test.ts │ │ ├── ImageUpload/ │ │ │ ├── helper.ts │ │ │ └── index.test.ts │ │ ├── Input/ │ │ │ ├── InputBlur/ │ │ │ │ └── index.test.ts │ │ │ ├── Textarea/ │ │ │ │ └── index.test.ts │ │ │ ├── common.ts │ │ │ └── index.test.ts │ │ ├── List/ │ │ │ └── __tests__/ │ │ │ ├── List.test.ts │ │ │ ├── ListItem.test.ts │ │ │ └── snapshot/ │ │ │ ├── list_alipay_config.txt │ │ │ └── list_item_alipay_config.txt │ │ ├── Modal/ │ │ │ └── __tests__/ │ │ │ ├── index.test.ts │ │ │ └── snapshot/ │ │ │ └── alipay_config_props.txt │ │ ├── NoticeBar/ │ │ │ └── index.test.ts │ │ ├── NumberKeyboard/ │ │ │ └── index.spec.ts │ │ ├── PageContainer/ │ │ │ ├── index.test.ts │ │ │ └── snapshot/ │ │ │ └── page_alipay_config.txt │ │ ├── Pagination/ │ │ │ └── index.test.ts │ │ ├── Picker/ │ │ │ ├── CascaderPicker/ │ │ │ │ └── __tests__/ │ │ │ │ ├── index.test.ts │ │ │ │ └── utils.ts │ │ │ └── __tests__/ │ │ │ ├── index.test.ts │ │ │ └── utils.ts │ │ ├── Popover/ │ │ │ └── __tests__/ │ │ │ └── index.test.ts │ │ ├── Popup/ │ │ │ └── index.test.ts │ │ ├── Progress/ │ │ │ ├── index.spec.ts │ │ │ ├── snap-speed-0-50-20.json │ │ │ ├── snap-speed-12.json │ │ │ ├── snap.json │ │ │ └── snapshot/ │ │ │ └── alipay_config_props.txt │ │ ├── Radio/ │ │ │ ├── RadioGroup/ │ │ │ │ ├── index.test.ts │ │ │ │ └── utils.ts │ │ │ ├── index.test.ts │ │ │ └── utils.ts │ │ ├── RareWordsKeyboard/ │ │ │ └── __tests__/ │ │ │ ├── index.test.ts │ │ │ └── tu.txt │ │ ├── Rate/ │ │ │ ├── index.test.ts │ │ │ └── utils.ts │ │ ├── Result/ │ │ │ ├── index.test.ts │ │ │ └── snapshot/ │ │ │ └── result_alipay_config.txt │ │ ├── Selector/ │ │ │ ├── index.test.ts │ │ │ └── utils.ts │ │ ├── Slider/ │ │ │ └── __tests__/ │ │ │ └── index.test.ts │ │ ├── Stepper/ │ │ │ └── __tests__/ │ │ │ └── index.test.ts │ │ ├── SwipeAction/ │ │ │ └── index.spec.ts │ │ ├── Switch/ │ │ │ └── __tests__/ │ │ │ ├── index.test.ts │ │ │ └── snapshot/ │ │ │ └── alipay_config.txt │ │ ├── TabBar/ │ │ │ └── __tests__/ │ │ │ └── index.test.ts │ │ ├── Tabs/ │ │ │ └── index.test.ts │ │ ├── Toast/ │ │ │ └── index.spec.ts │ │ ├── Typography/ │ │ │ ├── index.spec.ts │ │ │ └── snapshot/ │ │ │ └── typography_alipay_config.txt │ │ └── _util/ │ │ └── __tests__/ │ │ └── compareVersion.spec.ts │ ├── selector-query.spec.ts │ ├── selector-query.ts │ ├── setup.ts │ └── utils.ts ├── tsconfig.alipay.demo.json ├── tsconfig.json ├── tsconfig.wechat.demo.json ├── tsconfig.wechat.json ├── typings/ │ └── wechat.d.ts ├── typings.d.ts └── vite.config.ts
SYMBOL INDEX (1661 symbols across 461 files)
FILE: .dumi/theme/builtins/Icon.tsx
function Copy (line 166) | function Copy(props) {
function Icon (line 187) | function Icon() {
FILE: .dumi/theme/builtins/Previewer/index.tsx
type IProps (line 8) | interface IProps {
function buildUrl (line 12) | function buildUrl(
function getSupportPlatform (line 38) | function getSupportPlatform(platform: string) {
function sendMsgToSourceCode (line 75) | function sendMsgToSourceCode(theme) {
FILE: .dumi/theme/builtins/ResourceCard.tsx
type Props (line 4) | type Props = {
FILE: .dumi/theme/builtins/SourceCode/index.tsx
constant MARKUP_REGEX (line 22) | const MARKUP_REGEX = {
constant COMMENTS_MARKUP_REGEX (line 28) | const COMMENTS_MARKUP_REGEX = {
constant SIMILAR_DSL (line 36) | const SIMILAR_DSL: Record<string, Language> = {
type ISourceCodeProps (line 42) | interface ISourceCodeProps {
FILE: .dumi/theme/builtins/Table/index.tsx
type IProps (line 14) | interface IProps {
constant MARKUP_REGEX (line 18) | const MARKUP_REGEX = {
FILE: .dumi/theme/common/Sim/index.tsx
type IProps (line 9) | interface IProps {}
function buildUrl (line 11) | function buildUrl(
function getSupportPlatform (line 46) | function getSupportPlatform(platform: string) {
function sendThemeToPreviewer (line 102) | function sendThemeToPreviewer() {
function sendPageToPreviewer (line 126) | function sendPageToPreviewer() {
function setMsgToPreviewer (line 153) | function setMsgToPreviewer(miniCode) {
function handleIframeMessage (line 183) | function handleIframeMessage(event) {
FILE: .dumi/theme/common/ThemeSwitch/index.tsx
type ThemeName (line 7) | type ThemeName = 'light' | 'dark' | 'compact';
type ThemeSwitchProps (line 9) | type ThemeSwitchProps = {
FILE: .dumi/theme/common/styles/DumiDefaultStyleOverride.tsx
constant PREFERS_COLOR_ATTR (line 4) | const PREFERS_COLOR_ATTR = 'data-prefers-color';
FILE: .dumi/theme/common/styles/SearchBar.tsx
constant THEME_PREFIX (line 4) | const THEME_PREFIX = 'dumi-default-';
FILE: .dumi/theme/defineThemeConfig/index.ts
function defineThemeConfig (line 8) | function defineThemeConfig(config: Partial<IAllThemeConfig>): Partial<IA...
FILE: .dumi/theme/global.d.ts
type Window (line 1) | interface Window {
FILE: .dumi/theme/hooks/useAdditionalThemeConfig.ts
type IuseAdditionalThemeConfig (line 6) | interface IuseAdditionalThemeConfig {
FILE: .dumi/theme/hooks/useLocaleValue.ts
function useLocaleValue (line 4) | function useLocaleValue(key: string) {
FILE: .dumi/theme/hooks/useMenu.tsx
type UseMenuOptions (line 19) | type UseMenuOptions = {
FILE: .dumi/theme/hooks/useSiteToken.ts
type IUseSiteToken (line 9) | interface IUseSiteToken {
FILE: .dumi/theme/hooks/uselocale.ts
type LocaleMap (line 3) | interface LocaleMap<Key extends string> {
function useLocale (line 8) | function useLocale<Key extends string>(
FILE: .dumi/theme/layouts/GlobalLayout.tsx
type SiteState (line 19) | type SiteState = Partial<Omit<SiteContextProps, 'updateSiteContext'>>;
constant RESPONSIVE_MOBILE (line 20) | const RESPONSIVE_MOBILE = 768;
constant SITE_STATE_LOCALSTORAGE_KEY (line 21) | const SITE_STATE_LOCALSTORAGE_KEY = 'dumi-theme-antd-site-state';
FILE: .dumi/theme/plugin.ts
function extractEmotionStyle (line 10) | function extractEmotionStyle(html: string) {
FILE: .dumi/theme/plugin/techStack.ts
class AntdTechStack (line 8) | class AntdTechStack implements IDumiTechStack {
method constructor (line 11) | constructor(opts: {}) {}
method isSupported (line 16) | isSupported(...[node]: Parameters<IDumiTechStack['isSupported']>) {
method transformCode (line 26) | transformCode() {
method generatePreviewerProps (line 36) | generatePreviewerProps(
method generateMetadata (line 65) | generateMetadata(
FILE: .dumi/theme/slots/Content/DocAnchor.tsx
type DocAnchorProps (line 71) | interface DocAnchorProps {
type AnchorItem (line 76) | interface AnchorItem {
FILE: .dumi/theme/slots/Content/InViewSuspense.tsx
type InViewSuspenseProps (line 6) | type InViewSuspenseProps = Pick<IntersectionObserverProps, 'delay'> & {
FILE: .dumi/theme/slots/Header/HeaderExtral.tsx
constant BASE_SIZE (line 12) | const BASE_SIZE = '1.2em';
FILE: .dumi/theme/slots/Header/Navigation.tsx
type NavigationProps (line 26) | interface NavigationProps {
function Navigation (line 127) | function Navigation({ isMobile, responsive }: NavigationProps) {
FILE: .dumi/theme/slots/Header/SwitchBtn.tsx
type LangBtnProps (line 6) | interface LangBtnProps {
constant BASE_SIZE (line 16) | const BASE_SIZE = '1.2em';
function SwitchBtn (line 58) | function SwitchBtn({
FILE: .dumi/theme/slots/Header/index.tsx
type HeaderState (line 25) | interface HeaderState {
type IResponsive (line 29) | type IResponsive = null | 'narrow' | 'crowded';
constant RESPONSIVE_XS (line 31) | const RESPONSIVE_XS = 1120;
constant RESPONSIVE_SM (line 32) | const RESPONSIVE_SM = 1200;
FILE: .dumi/theme/slots/NotFound/index.tsx
type NotFoundProps (line 6) | interface NotFoundProps {
FILE: .dumi/theme/slots/Sidebar/index.tsx
type SidebarState (line 20) | interface SidebarState {
constant SWITCH_HEIGHT (line 24) | const SWITCH_HEIGHT = 33;
constant PLATFORM_ICON (line 26) | const PLATFORM_ICON = {
FILE: .dumi/theme/slots/SiteContext.ts
type PlatformName (line 5) | type PlatformName = 'alipay' | 'wechat';
type SiteContextProps (line 7) | interface SiteContextProps {
FILE: .dumi/theme/types.ts
type ISidebarGroupModePathItem (line 6) | type ISidebarGroupModePathItem = string;
type ILocaleEnhance (line 8) | interface ILocaleEnhance {
type IAction (line 15) | interface IAction {
type IMoreLink (line 24) | interface IMoreLink {
type IFeature (line 31) | interface IFeature {
type ILoading (line 40) | interface ILoading {
type SidebarEnhanceItemType (line 45) | type SidebarEnhanceItemType = {
type SidebarEnhanceChildrenType (line 51) | type SidebarEnhanceChildrenType = string | SidebarEnhanceItemType;
type SidebarEnhanceSubType (line 52) | type SidebarEnhanceSubType = {
type SidebarEnhanceGroupChildren (line 58) | type SidebarEnhanceGroupChildren = (SidebarEnhanceSubType | SidebarEnhan...
type SidebarEnhanceGroupType (line 59) | type SidebarEnhanceGroupType = {
type SidebarEnhanceType (line 64) | type SidebarEnhanceType =
type SidebarEnhanceItems (line 68) | type SidebarEnhanceItems = SidebarEnhanceType[];
type IDocVersion (line 70) | interface IDocVersion {
type IBannerConfig (line 74) | interface IBannerConfig {
type IAdditionalThemeConfig (line 83) | interface IAdditionalThemeConfig {
type IAllThemeConfig (line 120) | interface IAllThemeConfig extends IThemeConfig, IAdditionalThemeConfig {}
FILE: .dumi/theme/utils.ts
type ILocaleItem (line 4) | type ILocaleItem = ReturnType<typeof useSiteData>['locales'][0];
function getTargetLocalePath (line 6) | function getTargetLocalePath({
FILE: config/alipay/app.ts
method onLaunch (line 2) | onLaunch(launchParams: any) {
method onRelaunch (line 7) | onRelaunch(launchParams: any) {}
method onShow (line 8) | onShow() {
method onHide (line 11) | onHide() {
method onDestroy (line 14) | onDestroy() {
FILE: copilot-demo/pages/Actions/index.ts
method handleTapAction (line 36) | handleTapAction(item) {
method handleBubbleAction (line 66) | handleBubbleAction(item) {
method onTypingComplete (line 83) | onTypingComplete() {
method toggleBubble (line 88) | toggleBubble() {
FILE: copilot-demo/pages/Bubble/index.ts
method onTypingComplete (line 16) | onTypingComplete() {
method onTypingChange (line 19) | onTypingChange(e) {
method onSwitchChange (line 24) | onSwitchChange() {
method handleTapAction (line 29) | handleTapAction(item) {
FILE: copilot-demo/pages/Conversations/index.ts
method handleItemTap (line 63) | handleItemTap(i) {
method handleMenuItemTap (line 76) | handleMenuItemTap(menuItem, item) {
method handleOpenHistory (line 90) | handleOpenHistory() {
method handlePopupClose (line 95) | handlePopupClose() {
FILE: copilot-demo/pages/Prompts/index.ts
method onItemTap (line 110) | onItemTap(i) {
FILE: copilot-demo/pages/Sender/index.ts
method handleChange (line 48) | handleChange(value: string) {
method handleSend (line 55) | handleSend() {
method handleChange1 (line 59) | handleChange1(value: string) {
method handleSend1 (line 66) | handleSend1() {
method handleCancel (line 72) | handleCancel() {
method handleChange3 (line 77) | handleChange3(value: string) {
method handleSend3 (line 84) | handleSend3() {
method addBubble (line 88) | addBubble(value: string) {
method handleChange4 (line 95) | handleChange4(value: string) {
method onItemTap (line 102) | onItemTap(e) {
method handleSend4 (line 109) | handleSend4(val: string) {
FILE: copilot-demo/pages/ThoughtChain/index.ts
method onContentItemTap (line 53) | onContentItemTap(e) {
FILE: copilot/Actions/index.ts
method handleTapAction (line 8) | handleTapAction(e) {
FILE: copilot/Actions/props.ts
type IActionItem (line 4) | interface IActionItem {
type IActionsProps (line 15) | interface IActionsProps extends IBaseProps {
FILE: copilot/Bubble/index.ts
method startTyping (line 15) | startTyping() {
method didMount (line 71) | didMount() {
method attached (line 76) | attached() {
FILE: copilot/Bubble/props.ts
type IBubbleProps (line 4) | interface IBubbleProps extends IBaseProps {
FILE: copilot/Conversations/index.ts
method onTouchStart (line 14) | onTouchStart(e) {
method onItemTap (line 20) | onItemTap(e) {
method onButtonTap (line 30) | onButtonTap(menu, e) {
FILE: copilot/Conversations/props.ts
type Conversation (line 5) | interface Conversation {
type MenuItem (line 36) | interface MenuItem {
type IConversationsProps (line 61) | interface IConversationsProps extends IBaseProps {
method onItemTap (line 93) | onItemTap() {}
method onMenuItemTap (line 94) | onMenuItemTap() {}
FILE: copilot/Prompts/index.sjs.ts
function isUrl (line 1) | function isUrl(string) {
FILE: copilot/Prompts/index.ts
method onItemTap (line 8) | onItemTap(e) {
FILE: copilot/Prompts/props.ts
type IPromptsItem (line 5) | interface IPromptsItem {
type IPromptsProps (line 38) | interface IPromptsProps extends IBaseProps {
method onItemTap (line 75) | onItemTap() {}
FILE: copilot/Sender/index.ts
method handleMainBtn (line 14) | handleMainBtn() {
method handleConfirm (line 22) | handleConfirm() {
method handleSubmit (line 26) | handleSubmit() {
method handleCancel (line 30) | handleCancel() {
method handleInput (line 33) | handleInput(e) {
method handleFocus (line 36) | handleFocus() {
method handleBlur (line 39) | handleBlur() {
FILE: copilot/Sender/props.ts
type ISenderProps (line 4) | interface ISenderProps extends IBaseProps {
FILE: copilot/ThoughtChain/index.sjs.ts
function isExpand (line 1) | function isExpand(collapsible, key, foldStatusMap) {
function hasExpandArrow (line 11) | function hasExpandArrow(collapsible) {
FILE: copilot/ThoughtChain/index.ts
method onContentTap (line 15) | onContentTap(e) {
method onTitleTap (line 18) | onTitleTap(e) {
FILE: copilot/ThoughtChain/props.ts
type IThoughtChainItemProps (line 5) | interface IThoughtChainItemProps {
type ICollapsibleOptions (line 31) | interface ICollapsibleOptions extends IBaseProps {
type IThoughtChainProps (line 41) | interface IThoughtChainProps extends IBaseProps {
FILE: copilot/Welcome/index.sjs.ts
function isExpand (line 1) | function isExpand(collapsible, key, foldStatusMap) {
function hasExpandArrow (line 11) | function hasExpandArrow(collapsible) {
FILE: copilot/Welcome/index.ts
method onContentTap (line 8) | onContentTap(e) {
FILE: copilot/Welcome/props.ts
type IWelcomeProps (line 5) | interface IWelcomeProps extends IBaseProps {
FILE: demo/components/Calendar/collapse-container/cn-day/index.ts
type Props (line 6) | interface Props {
method updateData (line 20) | updateData() {
method onInit (line 43) | onInit() {
method didUpdate (line 46) | didUpdate(prevProps) {
method attached (line 54) | attached() {
FILE: demo/components/Calendar/collapse-container/index.ts
type Props (line 11) | interface Props {
method handleToggle (line 30) | handleToggle() {
method onInit (line 39) | onInit() {
method attached (line 53) | attached() {
FILE: demo/components/Form/checklist/index.sjs.ts
function getTitle (line 1) | function getTitle(options, value) {
FILE: demo/components/Form/checklist/index.ts
method showPopup (line 9) | showPopup() {
method handlePopupClose (line 14) | handlePopupClose() {
method onChange (line 19) | onChange(value, e) {
FILE: demo/components/Form/form-json/index.ts
method onInit (line 5) | onInit() {
method handleRef (line 12) | handleRef(ref) {
method submit (line 15) | async submit() {
method reset (line 19) | reset() {
FILE: demo/components/Form/location/index.sjs.ts
function getTitle (line 1) | function getTitle(options, value) {
FILE: demo/components/Form/location/index.ts
method showPopup (line 10) | showPopup() {
method handlePopupClose (line 17) | handlePopupClose() {
method onChange (line 22) | onChange(value, e) {
FILE: demo/pages/ActionSheet/index.ts
method handleOpenBasic (line 55) | handleOpenBasic(e) {
method handleCloseBasic (line 62) | handleCloseBasic(e) {
method handleAction (line 69) | handleAction(item, index, e) {
FILE: demo/pages/Button/index.ts
method handleTap (line 2) | handleTap() {
method handleDisabledTap (line 16) | handleDisabledTap() {
FILE: demo/pages/Calendar/index.ts
function demo8Formatter (line 12) | function demo8Formatter(cell) {
function demo8MonthFormatter (line 34) | function demo8MonthFormatter(month) {
function demoFormatter (line 40) | function demoFormatter(cell, value) {
method demo3NextMonth (line 111) | demo3NextMonth() {
method demo3PreviousMonth (line 120) | demo3PreviousMonth() {
method demo9HandleChange (line 132) | demo9HandleChange(value) {
method demo9HandlePreviousDay (line 144) | demo9HandlePreviousDay() {
method demo9HandleNextDay (line 149) | demo9HandleNextDay() {
method demo9HandleScrollIntoView (line 154) | demo9HandleScrollIntoView() {
method onPopupOpen (line 157) | onPopupOpen() {
method onPopupClose (line 162) | onPopupClose() {
method handleRef (line 167) | handleRef(ref) {
FILE: demo/pages/Card/index.ts
method handleLinkClick (line 6) | handleLinkClick() {
method handleTapFoldBtn (line 15) | handleTapFoldBtn() {
method handleTitleSticky (line 19) | handleTitleSticky(status) {
FILE: demo/pages/Checkbox/index.sjs.ts
function indexOf (line 1) | function indexOf(array, value) {
FILE: demo/pages/Checkbox/index.ts
method onChange (line 48) | onChange(value, e) {
method handleCheckedChange (line 52) | handleCheckedChange(checked) {
method handleValueChange (line 65) | handleValueChange(value) {
method toggleChange (line 78) | toggleChange() {
method handleCustomChange (line 84) | handleCustomChange(checked, e) {
FILE: demo/pages/Checklist/index.ts
method onChange (line 72) | onChange(v, items, e) {
method onChangeControlled (line 75) | onChangeControlled(value) {
FILE: demo/pages/Collapse/index.ts
method onChange (line 53) | onChange(current) {
method addItems (line 56) | addItems() {
method onCheckboxChange (line 69) | onCheckboxChange(checked, e) {
FILE: demo/pages/ConfigProvider/index.ts
method handleTap (line 20) | handleTap() {
method handleOk (line 35) | handleOk(value, column, e) {
method handleChange (line 39) | handleChange(value, column, e) {
method handleTriggerPicker (line 42) | handleTriggerPicker(visible, e) {
method handlePickerRangeChange (line 45) | handlePickerRangeChange(type, date, dateStr, e) {
FILE: demo/pages/Countdown/index.ts
method handleCountdownChange (line 10) | handleCountdownChange(e) {
method handleCountdownEnd (line 13) | handleCountdownEnd() {
FILE: demo/pages/DatePicker/index.ts
method handleFormatLabel (line 17) | handleFormatLabel(type, value) {
method handleControlledRangeOk (line 22) | handleControlledRangeOk(value) {
method handlePickerChange (line 38) | handlePickerChange(date, dateStr, e) {
method handleOk (line 41) | handleOk(date, format, e) {
method handlePickerRangeChange (line 44) | handlePickerRangeChange(type, date, dateStr, e) {
method handleRangeOk (line 47) | handleRangeOk(date, format, e) {
method handleChangeDate (line 51) | handleChangeDate() {
method handleTriggerPicker (line 54) | handleTriggerPicker(visible, e) {
method handleDismiss (line 58) | handleDismiss(e) {
method handleFormatLabel (line 61) | handleFormatLabel(type, value) {
method handleTriggerControlledPicker (line 64) | handleTriggerControlledPicker(visible, e) {
method changeDateRange (line 80) | changeDateRange() {
method handleOpenPicker (line 89) | handleOpenPicker() {
method handleTriggerControlledDateRangePicker (line 94) | handleTriggerControlledDateRangePicker(visible, e) {
method handleOpenDateRangePicker (line 110) | handleOpenDateRangePicker() {
FILE: demo/pages/Dialog/index.ts
method onClickActivityModalButton (line 24) | onClickActivityModalButton() {
method onButtonTap (line 28) | onButtonTap(buttonItem) {
method handleOpen (line 33) | handleOpen(e) {
method handleClose (line 37) | handleClose() {
method showToast (line 52) | showToast(content: string) {
FILE: demo/pages/Empty/index.ts
method onClickButton (line 35) | onClickButton(buttonInfo) {
FILE: demo/pages/Feedback/index.ts
method onVisibleChange1 (line 39) | onVisibleChange1(visible) {
method onVisibleChange3 (line 42) | onVisibleChange3(visible) {
method onVisibleChange2 (line 45) | onVisibleChange2(visible) {
method onVisibleChange4 (line 48) | onVisibleChange4(visible) {
method updateVisible (line 51) | updateVisible(field, visible) {
method onShowFeedback (line 63) | onShowFeedback(e) {
method onTapFeedItem2 (line 69) | onTapFeedItem2(feedItem) {
method onTapFeedItem4 (line 84) | onTapFeedItem4(feedItem) {
method onTapFeedItem3 (line 99) | onTapFeedItem3(feedItem) {
method handleTapItem (line 114) | handleTapItem() {
FILE: demo/pages/Footer/index.ts
method handleLinkTap (line 36) | handleLinkTap(item) {
method handleChipTap (line 50) | handleChipTap(item) {
FILE: demo/pages/Form/FormBasic/index.ts
method onUpload (line 7) | onUpload(localFile) {
method onLoad (line 36) | onLoad() {
method handleRef (line 72) | handleRef(ref) {
method reset (line 84) | reset() {
method update (line 87) | update() {
method submit (line 114) | async submit() {
method onUpload (line 125) | onUpload(localFile) {
method showToast (line 136) | showToast() {
method handleCloseToast (line 141) | handleCloseToast() {
FILE: demo/pages/Form/FormCustom/index.ts
method handleRef (line 16) | handleRef(ref) {
method reset (line 19) | reset() {
method submit (line 22) | async submit() {
FILE: demo/pages/Form/FormCustomError/index.ts
method onLoad (line 4) | onLoad() {
method handleRef (line 14) | handleRef(ref) {
method reset (line 26) | reset() {
method submit (line 29) | async submit() {
FILE: demo/pages/Form/FormDependency/index.ts
method onLoad (line 4) | onLoad() {
method handleRef (line 14) | handleRef(ref) {
method onChange (line 32) | onChange(value) {
method reset (line 45) | reset() {
method submit (line 51) | async submit() {
FILE: demo/pages/Form/FormDynamic/index.ts
method onLoad (line 15) | onLoad() {
method handleRef (line 25) | handleRef(ref) {
method reset (line 41) | reset() {
method add (line 44) | add() {
method minus (line 54) | minus(e) {
method submit (line 62) | async submit() {
FILE: demo/pages/Form/FormImageUploadRules/index.ts
method onUpload (line 6) | onUpload(localFile) {
method onLoad (line 18) | onLoad() {
method handleRef (line 47) | handleRef(ref) {
method reset (line 59) | reset() {
method submit (line 62) | async submit() {
method onUpload (line 73) | onUpload(localFile) {
FILE: demo/pages/Form/FormInitialValues/index.ts
method onLoad (line 4) | onLoad() {
method handleRef (line 21) | handleRef(ref) {
method reset (line 34) | reset() {
method submit (line 37) | async submit() {
FILE: demo/pages/Form/FormInitialValuesAsync/index.ts
method onLoad (line 4) | onLoad() {
method handleRef (line 50) | handleRef(ref) {
method reset (line 63) | reset() {
method submit (line 66) | async submit() {
FILE: demo/pages/Form/FormJSON/index.ts
method onLoad (line 5) | onLoad() {
method handleFormJSONRef (line 66) | handleFormJSONRef(ref) {
method handleRef (line 71) | handleRef(ref) {
method onSuccess (line 74) | onSuccess(values) {
FILE: demo/pages/Form/FormLayout/index.ts
method onLoad (line 8) | onLoad() {
method handleRef (line 18) | handleRef(ref) {
method reset (line 30) | reset() {
method toggle (line 33) | toggle() {
method submit (line 38) | async submit() {
FILE: demo/pages/Form/FormMultiple/index.ts
method onLoad (line 4) | onLoad() {
method handleRef (line 21) | handleRef(ref) {
method handleRef2 (line 33) | handleRef2(ref) {
method reset (line 45) | reset() {
method reset2 (line 48) | reset2() {
method submit (line 51) | async submit() {
method submit2 (line 61) | async submit2() {
FILE: demo/pages/Form/FormReadonly/index.ts
method onUpload (line 7) | onUpload(localFile) {
method onLoad (line 36) | onLoad() {
method handleRef (line 115) | handleRef(ref) {
method update (line 128) | update() {
method clear (line 157) | clear() {
method submit (line 178) | async submit() {
method onUpload (line 189) | onUpload(localFile) {
method showToast (line 200) | showToast() {
method handleCloseToast (line 205) | handleCloseToast() {
FILE: demo/pages/Form/FormRules/index.ts
method onLoad (line 4) | onLoad() {
method handleRef (line 37) | handleRef(ref) {
method reset (line 49) | reset() {
method fill (line 52) | fill() {
method submit (line 57) | async submit() {
FILE: demo/pages/Form/FormValidate/index.ts
method onLoad (line 4) | onLoad() {
method handleRef (line 14) | handleRef(ref) {
method reset (line 26) | reset() {
method onReady (line 29) | onReady() {
method submit (line 39) | async submit() {
FILE: demo/pages/Form/FormValidateMessages/index.ts
method onLoad (line 14) | onLoad() {
method handleRef (line 46) | handleRef(ref) {
method reset (line 58) | reset() {
method submit (line 61) | async submit() {
FILE: demo/pages/Form/FormWatch/index.ts
method onLoad (line 4) | onLoad() {
method onReady (line 18) | onReady() {
method handleRef (line 37) | handleRef(ref) {
method reset (line 49) | reset() {
method submit (line 56) | async submit() {
FILE: demo/pages/Form/index.ts
method gotoPage (line 3) | gotoPage(event) {
FILE: demo/pages/Grid/index.ts
method onLoad (line 117) | onLoad() {
method handleTapItem (line 124) | handleTapItem(item) {
FILE: demo/pages/GuideTour/index.ts
method onChange (line 31) | onChange(index) {
method onChangeControlled (line 34) | onChangeControlled(value) {
method openTour (line 42) | openTour(e) {
method closeTour (line 48) | closeTour() {
FILE: demo/pages/Icon/index.ts
method handleTap (line 2) | handleTap(e) {
FILE: demo/pages/ImageUpload/index.ts
function onRemove (line 1) | function onRemove(file) {
method onUpload (line 61) | onUpload(file) {
method onBeforeUpload (line 71) | onBeforeUpload(localFileList) {
method onChange (line 79) | onChange(fileList) {
method onPreview (line 83) | onPreview(file) {
method onUpload (line 88) | onUpload(file) {
method onBeforeUpload (line 98) | onBeforeUpload(localFileList) {
method handleControlledChange (line 106) | handleControlledChange(fileList) {
method handleUploaderRef (line 119) | handleUploaderRef(ref) {
method upload (line 128) | upload() {
FILE: demo/pages/IndexBar/index.ts
method onLoad (line 39) | onLoad() {
method onChange (line 53) | onChange(...args) {
FILE: demo/pages/Input/index.ts
method onChange (line 6) | onChange(value, e) {
method handleChange (line 9) | handleChange(value) {
method handleMoney (line 23) | handleMoney(value) {
method clear (line 44) | clear() {
method handleRefInput (line 49) | handleRefInput(input) {
method handleRefTextArea (line 58) | handleRefTextArea(textArea) {
method clearByInputRef (line 67) | clearByInputRef() {
method clearByTextAreaRef (line 70) | clearByTextAreaRef() {
FILE: demo/pages/InputCustom/index.ts
method onChange (line 6) | onChange(value, e) {
method handleChange (line 9) | handleChange(value) {
method handleMoney (line 14) | handleMoney(value) {
method clear (line 23) | clear() {
method handleRef (line 28) | handleRef(input) {
method clearByInputRef (line 31) | clearByInputRef() {
FILE: demo/pages/InputSearchBar/index.ts
method onChange (line 2) | onChange(value, e) {
method onConfirm (line 5) | onConfirm(value) {
FILE: demo/pages/InputTextarea/index.ts
method onChange (line 8) | onChange(value, e) {
method handleChange (line 11) | handleChange(value) {
method handleMoney (line 16) | handleMoney(value) {
method clear (line 25) | clear() {
method handleRef (line 30) | handleRef(input) {
method clearByInputRef (line 33) | clearByInputRef() {
FILE: demo/pages/InputTextarea/utils.ts
function resolveEventValue (line 1) | function resolveEventValue(event) {
FILE: demo/pages/List/index.ts
method handleTap (line 5) | handleTap(e) {
method catchTap (line 15) | catchTap(e) {
method handleSetRadius (line 25) | handleSetRadius(checked) {
FILE: demo/pages/Modal/index.ts
method handleOpen (line 13) | handleOpen(e) {
method handleClose (line 17) | handleClose() {
method handlePrimaryButtonTap (line 30) | handlePrimaryButtonTap() {
method handleSecondaryButtonTap (line 34) | handleSecondaryButtonTap() {
method handleCancelButtonTap (line 38) | handleCancelButtonTap() {
method showToast (line 43) | showToast(content: string) {
FILE: demo/pages/NoticeBar/index.ts
method handleTapAction (line 5) | handleTapAction() {
method handleTapLink (line 8) | handleTapLink() {
method handleClose (line 11) | handleClose() {
method showToast (line 14) | showToast(content: string) {
FILE: demo/pages/NumberInput/index.ts
method handleChange1 (line 10) | handleChange1(val) {
method handleChange2 (line 20) | handleChange2(val) {
method handleChange3 (line 30) | handleChange3(val) {
method handleLinkTap (line 47) | handleLinkTap() {
method handleAllWithdraw (line 60) | handleAllWithdraw() {
method handleRef (line 63) | handleRef(input) {
FILE: demo/pages/NumberKeyboard/index.ts
method onTap (line 14) | onTap() {
method onTap1 (line 18) | onTap1() {
method onTap2 (line 22) | onTap2() {
method onTap3 (line 26) | onTap3() {
method onTap4 (line 30) | onTap4() {
method onTap5 (line 34) | onTap5() {
method onTap6 (line 38) | onTap6() {
method onTap7 (line 42) | onTap7() {
method onNumberFocus (line 45) | onNumberFocus() {
method onChange8 (line 48) | onChange8(e) {
method onClose8 (line 55) | onClose8() {
method onCodeFocus9 (line 59) | onCodeFocus9() {
method onChange9 (line 62) | onChange9(e) {
method onClose9 (line 69) | onClose9() {
FILE: demo/pages/NumberKeyboardAmount/index.ts
method onAmountFocus (line 6) | onAmountFocus() {
method onChange (line 9) | onChange(e) {
method onClose (line 35) | onClose() {
FILE: demo/pages/NumberKeyboardCode/index.ts
method onCodeFocus (line 6) | onCodeFocus() {
method onChange (line 9) | onChange(e) {
method onClose (line 16) | onClose() {
FILE: demo/pages/NumberKeyboardNumber/index.ts
method onNumberFocus (line 6) | onNumberFocus() {
method onChange (line 9) | onChange(e) {
method onClose (line 15) | onClose() {
FILE: demo/pages/PageContainer/index.ts
method onLoad (line 7) | onLoad() {
method handleRefresh (line 14) | handleRefresh() {
method handleSwitchToDisconnected (line 33) | handleSwitchToDisconnected() {
method handleSwitchToEmpty (line 41) | handleSwitchToEmpty() {
method handleSwitchToBusy (line 49) | handleSwitchToBusy() {
method handleSwitchToCustom (line 57) | handleSwitchToCustom() {
method handleSwitchToNormal (line 66) | handleSwitchToNormal() {
method handleToggleSafeArea (line 74) | handleToggleSafeArea(e) {
FILE: demo/pages/Picker/index.ts
method handleDismiss (line 74) | handleDismiss(e) {
method handleClearControlled (line 82) | handleClearControlled() {
method handleChangeControlled (line 87) | handleChangeControlled() {
method handleControlledOk (line 92) | handleControlledOk(value) {
method handleOk (line 104) | handleOk(value, column, e) {
method handleChange (line 108) | handleChange(value, column, e) {
method formatTime (line 112) | formatTime(value, column) {
method handleOnOk (line 116) | handleOnOk(value, column) {
method handleTriggerPicker (line 119) | handleTriggerPicker(visible, e) {
method handleTriggerControlledPicker (line 122) | handleTriggerControlledPicker(visible, e) {
method handleOpenPicker (line 138) | handleOpenPicker() {
method handleCascaderPickerChange (line 146) | handleCascaderPickerChange(cascaderValue, selectedOption, e) {
method handleCascaderOnOk (line 149) | handleCascaderOnOk(cascaderValue, selectedOption, e) {
method handleCascaderControlledOk (line 152) | handleCascaderControlledOk(cascaderValue, selectedOption, e) {
method handleCascaderChangeControlled (line 162) | handleCascaderChangeControlled() {
method handleCascaderClearControlled (line 165) | handleCascaderClearControlled() {
method handleCascaderTriggerControlledPicker (line 168) | handleCascaderTriggerControlledPicker(visible, e) {
method handleCascaderOpenPicker (line 183) | handleCascaderOpenPicker() {
FILE: demo/pages/Popover/index.ts
method onVisibleChange (line 19) | onVisibleChange(visible, e) {
method onControlledVisibleChange (line 22) | onControlledVisibleChange(visible) {
method handleVisibleChange (line 27) | handleVisibleChange() {
method onTapAction (line 32) | onTapAction() {
FILE: demo/pages/PopoverList/index.ts
method handleVisibleChange (line 33) | handleVisibleChange(visible, e) {
method handleVisibleChange2 (line 42) | handleVisibleChange2(visible, e) {
method handleTapItem (line 51) | handleTapItem(e, item) {
method handleTapItem2 (line 63) | handleTapItem2(e, item) {
FILE: demo/pages/Popup/index.ts
method onClickBack (line 10) | onClickBack() {
method handlePopupClose (line 13) | handlePopupClose() {
method handleShowBasic (line 22) | handleShowBasic(e) {
method handleShowScroll (line 29) | handleShowScroll() {
method handleShowSlot (line 32) | handleShowSlot() {
method handleChangeAnimation (line 35) | handleChangeAnimation(checked) {
method handleShowCustomize (line 44) | handleShowCustomize() {
method handleShowTopImage (line 47) | handleShowTopImage() {
method showToast (line 50) | showToast(content) {
FILE: demo/pages/Postscript/index.ts
method handleChange (line 15) | handleChange(val) {
FILE: demo/pages/Progress/index.ts
method handleIncrease (line 9) | handleIncrease() {
method handleReduce (line 15) | handleReduce() {
FILE: demo/pages/Radio/index.ts
method onChange (line 17) | onChange(value, e) {
method handleChange (line 20) | handleChange(checked) {
method onRadioGroupChange (line 33) | onRadioGroupChange(value, e) {
method handleRadioGroupChange (line 36) | handleRadioGroupChange(value) {
FILE: demo/pages/RareWordsKeyboard/index.ts
method onInputChange (line 8) | onInputChange(value) {
method onTap (line 15) | onTap() {
method onClose (line 19) | onClose() {
method onTap2 (line 23) | onTap2() {
method onClose2 (line 26) | onClose2() {
method onTap3 (line 30) | onTap3() {
method onClose3 (line 33) | onClose3() {
method onChange (line 36) | onChange(value) {
method onKeyBoardError (line 43) | onKeyBoardError(err) {
FILE: demo/pages/Rate/index.ts
method onChange (line 5) | onChange(value) {
method handleChange (line 8) | handleChange(value) {
FILE: demo/pages/Result/index.ts
method handleTabBtn (line 14) | handleTabBtn(e) {
FILE: demo/pages/SelectContact/index.ts
method onError (line 7) | onError() {}
method onLoad (line 9) | onLoad() {
method onSelect (line 20) | onSelect(user) {
method onError (line 34) | onError(error) {
FILE: demo/pages/Selector/index.ts
method handleChangeValue (line 68) | handleChangeValue() {
method handleChange (line 73) | handleChange(value, items, e) {
method onSelectMin (line 86) | onSelectMin(value, item) {
method onSelectMax (line 101) | onSelectMax() {
method handleSelectorFilterChange (line 114) | handleSelectorFilterChange(value, items, e) {
method onTapItem (line 117) | onTapItem(e) {
FILE: demo/pages/Skeleton/index.ts
method handleToggleShowLoading (line 8) | handleToggleShowLoading() {
FILE: demo/pages/Slider/index.ts
method onChange (line 5) | onChange(value, e) {
method onAfterChange (line 8) | onAfterChange(value, e) {
method handleChange (line 24) | handleChange(value, e) {
FILE: demo/pages/Stepper/index.ts
method onChange (line 3) | onChange(value) {
method onFocus (line 6) | onFocus(value) {
method onConfirm (line 9) | onConfirm(value) {
method onBlur (line 12) | onBlur(value) {
method handleChange (line 15) | handleChange(value) {
method add (line 30) | add() {
method minus (line 35) | minus() {
method clear (line 40) | clear() {
method handleAddValue (line 45) | handleAddValue() {
method handleMinusValue (line 48) | handleMinusValue() {
method handleDisabledTap (line 51) | handleDisabledTap(e) {
FILE: demo/pages/Steps/index.ts
method onNextTap (line 38) | onNextTap() {
method onPrevTap (line 53) | onPrevTap() {
FILE: demo/pages/Sticky/index.ts
method handleStickyChange (line 6) | handleStickyChange(status) {
method handleStickyChange1 (line 14) | handleStickyChange1(status) {
FILE: demo/pages/SwipeAction/index.ts
method onSwipeStart (line 81) | onSwipeStart() {
method onSwipeEnd (line 84) | onSwipeEnd(args1, args2) {
method onButtonTap (line 99) | onButtonTap(data, e) {
FILE: demo/pages/SwipeAction/slice.sjs.ts
function sliceButton (line 1) | function sliceButton(rightBtns, index) {
FILE: demo/pages/SwipeActionAnimation/index.ts
method onSwipeStart (line 22) | onSwipeStart() {
method onSwipeEnd (line 25) | onSwipeEnd(args1, args2) {
method onButtonTap (line 40) | onButtonTap(data, e) {
FILE: demo/pages/SwipeActionLeft/index.ts
method onSwipeStart (line 22) | onSwipeStart() {
method onSwipeEnd (line 25) | onSwipeEnd(args1, args2) {
method onButtonTap (line 40) | onButtonTap(data, e) {
FILE: demo/pages/SwipeActionLeftRight/index.ts
method onSwipeStart (line 22) | onSwipeStart() {
method onSwipeEnd (line 25) | onSwipeEnd(args1, args2) {
method onButtonTap (line 40) | onButtonTap(data, e) {
FILE: demo/pages/SwipeActionMove/index.ts
method onSwipeStart (line 24) | onSwipeStart() {
method onSwipeEnd (line 27) | onSwipeEnd(args1, args2) {
method onButtonTap (line 42) | onButtonTap(data, e) {
FILE: demo/pages/SwipeActionNumber/index.ts
method onSwipeStart (line 22) | onSwipeStart() {
method onSwipeEnd (line 25) | onSwipeEnd(args1, args2) {
method onButtonTap (line 40) | onButtonTap(data, e) {
FILE: demo/pages/SwipeActionNumber/slice.sjs.ts
function sliceButton (line 1) | function sliceButton(rightBtns, index) {
FILE: demo/pages/SwipeActionSlot/index.ts
method onSwipeStart (line 44) | onSwipeStart() {
method onSwipeEnd (line 47) | onSwipeEnd(args1, args2) {
method onButtonTap (line 61) | onButtonTap(data, e) {
FILE: demo/pages/SwipeActionSpeed/index.ts
method onSwipeStart (line 22) | onSwipeStart() {
method onSwipeEnd (line 25) | onSwipeEnd(args1, args2) {
method onButtonTap (line 40) | onButtonTap(data, e) {
FILE: demo/pages/SwipeActionTap/index.ts
method onSwipeStart (line 24) | onSwipeStart() {
method onSwipeEnd (line 27) | onSwipeEnd(args1, args2) {
method onButtonTap (line 42) | onButtonTap(data, e) {
FILE: demo/pages/SwipeActionWidth/index.ts
method onSwipeStart (line 24) | onSwipeStart() {
method onSwipeEnd (line 27) | onSwipeEnd(args1, args2) {
method onButtonTap (line 42) | onButtonTap(data, e) {
FILE: demo/pages/Switch/index.ts
method onChange (line 5) | onChange(checked, e) {
method handleChange (line 8) | handleChange(checked, e) {
method handleChangeByButton (line 20) | handleChangeByButton() {
FILE: demo/pages/TabBar/index.ts
method handleChange (line 76) | handleChange(index) {
FILE: demo/pages/Table/index.ts
function getRandomNumber (line 16) | function getRandomNumber(n) {
FILE: demo/pages/Tabs/TabsElevator/index.ts
method updateRect (line 38) | async updateRect() {
method onReady (line 46) | async onReady() {
method onTap (line 49) | onTap() {
method onChange (line 57) | onChange(current) {
method onTouchStart (line 70) | onTouchStart() {
method onScroll (line 73) | onScroll(e) {
method getBoundingClientRect (line 93) | getBoundingClientRect(id) {
method getInstanceBoundingClientRect (line 99) | getInstanceBoundingClientRect(instance, selector) {
FILE: demo/pages/Tabs/TabsVerticalElevator/index.ts
method updateRect (line 13) | async updateRect() {
method onReady (line 21) | async onReady() {
method onChange (line 24) | onChange(current) {
method onTouchStart (line 37) | onTouchStart() {
method onScroll (line 40) | onScroll(e) {
method getBoundingClientRect (line 61) | getBoundingClientRect(id) {
method getInstanceBoundingClientRect (line 67) | getInstanceBoundingClientRect(instance, selector) {
FILE: demo/pages/Tabs/index.ts
method onLoad (line 45) | onLoad() {
method onChange (line 56) | onChange(current) {
method handleChange (line 64) | handleChange(current) {
method onPlus (line 73) | onPlus() {
method alert (line 76) | alert(content) {
method onPrevTap (line 90) | onPrevTap() {
method onNextTap (line 102) | onNextTap() {
method onAddTap (line 114) | onAddTap() {
method onMinusTap (line 125) | onMinusTap() {
method updateRect (line 137) | async updateRect() {
method onReady (line 145) | async onReady() {
method onTouchStart (line 149) | onTouchStart() {
method onScroll (line 152) | onScroll(e) {
FILE: demo/pages/Terms/Fixed/index.ts
method handleButtonTap (line 21) | handleButtonTap(item, index, checked, event) {
method handleTermTap (line 31) | handleTermTap(item, index, event) {
FILE: demo/pages/Terms/index.ts
method handleButtonTap (line 51) | handleButtonTap(item, index, checked, event) {
method handleButton2Tap (line 61) | handleButton2Tap(item, index, checked) {
method handleTermTap (line 69) | handleTermTap(item, index, event) {
method handleCheckChange (line 79) | handleCheckChange(checked) {
method handleTermPrefixTap (line 94) | handleTermPrefixTap(checked) {
method handleCountdownFinish (line 109) | handleCountdownFinish(item, index) {
method handleReadChange (line 119) | handleReadChange(current) {
method onReady (line 132) | async onReady() {
method onImageLoad (line 135) | async onImageLoad() {
method updateRect (line 138) | async updateRect() {
method onTouchStart (line 146) | onTouchStart() {
method onScroll (line 149) | onScroll(e) {
method onScrollToLower (line 170) | onScrollToLower() {
method getBoundingClientRect (line 173) | getBoundingClientRect(id) {
method getInstanceBoundingClientRect (line 179) | getInstanceBoundingClientRect(instance, selector) {
FILE: demo/pages/Toast/index.ts
method handleShowToast (line 15) | handleShowToast(e) {
method handleCloseToast (line 35) | handleCloseToast(e) {
FILE: demo/pages/Typography/index.ts
method handleTap (line 3) | handleTap(e) {
method handleDisabledTap (line 35) | handleDisabledTap(e) {
FILE: demo/pages/Voucher/index.ts
method onTap (line 104) | onTap(item, event) {
method onVoucherTap (line 112) | onVoucherTap(item, event) {
FILE: demo/pages/index/index.ts
method onShow (line 10) | onShow() {
method onClearSearch (line 16) | onClearSearch() {
method onSearch (line 22) | onSearch(e) {
method listPress (line 44) | listPress(e) {
FILE: scripts/build.js
function buildMiniProgram (line 8) | async function buildMiniProgram() {
function buildDocs (line 56) | function buildDocs() {
function getPagesSourceCode (line 80) | async function getPagesSourceCode(pages, theme, platform) {
function buildPreview (line 97) | async function buildPreview(theme = 'default') {
FILE: scripts/compile.js
function series (line 10) | function series(tasks, output) {
FILE: scripts/copy.ts
function copyDirSourceCode (line 7) | function copyDirSourceCode(sourceDir: string) {
function tryRead (line 130) | function tryRead(filePath: string) {
function markdownCode (line 138) | function markdownCode(content: string) {
FILE: scripts/create-config.js
function getFilesWithIdentifiers (line 6) | function getFilesWithIdentifiers(dir) {
function createConfig (line 36) | async function createConfig() {
FILE: scripts/generate.ts
function readFile (line 8) | function readFile(filePath) {
function parseSrc (line 18) | function parseSrc(fileName, sourceRoot, targetRoot) {
FILE: scripts/getSourceCode.js
function getFileContent (line 6) | function getFileContent(file) {
function lessCompile (line 10) | function lessCompile(filename, theme) {
FILE: scripts/mini-compiler.ts
type PlatformType (line 19) | type PlatformType = 'WECHAT' | 'ALIPAY';
constant ALL_PLATFORMS (line 21) | const ALL_PLATFORMS: PlatformType[] = ['WECHAT', 'ALIPAY'];
type MiniProgramSourceCompileOption (line 23) | interface MiniProgramSourceCompileOption {
type FilePrecess (line 46) | type FilePrecess = (old: string) => Promise<string> | string;
type TransFormFactory (line 48) | type TransFormFactory = (handler) => any;
function miniCompiler (line 64) | function miniCompiler(option: MiniProgramSourceCompileOption) {
function buildDefVar (line 338) | function buildDefVar(
function createPlatformBuildOption (line 358) | function createPlatformBuildOption(
function compilePlatformComponents (line 380) | function compilePlatformComponents(
function compileAntdMini (line 511) | async function compileAntdMini(watch: boolean) {
FILE: scripts/publishRC.js
function main (line 5) | async function main() {
FILE: scripts/publishUtils.js
constant PKG_JSON_PATH (line 4) | const PKG_JSON_PATH = `${cwd()}/package.json`;
function generateSematicVersion (line 11) | function generateSematicVersion(tag, versionLevel, currentVersion) {
function getVersion (line 55) | function getVersion(depName = 'antd-mini') {
function genNewVersion (line 82) | function genNewVersion(tag, currentVersion) {
function npmPublish (line 110) | function npmPublish(oldVersion, newVersion, tag) {
function doPublish (line 135) | function doPublish(tag, newVersion) {
function writePkgJson (line 147) | function writePkgJson(str) {
function publish (line 152) | function publish(npmName, tag, version) {
function updatePkgJson (line 163) | function updatePkgJson(npmName, version) {
function gitSync (line 170) | function gitSync(newVersion) {
FILE: scripts/quick-release.js
function log (line 65) | function log(message, type = 'info') {
function execCommand (line 84) | function execCommand(command, description) {
function main (line 111) | async function main() {
FILE: scripts/todo.ts
function check (line 4) | async function check() {
FILE: scripts/transform.ts
function transformExt (line 36) | function transformExt(originalExt: string, newExt: string) {
FILE: scripts/tsxjs/babel-plugin-export-default-to-module-exports.ts
function exportDefaultToModuleExports (line 3) | function exportDefaultToModuleExports() {
FILE: scripts/tsxjs/index.ts
function transformTsxJS (line 4) | async function transformTsxJS(
FILE: scripts/tsxml/context.ts
type ITransformContext (line 8) | interface ITransformContext<T extends types.Node = types.Node> {
class TransformError (line 31) | class TransformError extends Error {
method constructor (line 32) | constructor(public ctx: string, message?: string) {
class TransformContext (line 37) | class TransformContext<T extends types.Node = types.Node>
method toHtml (line 41) | static async toHtml(vnode: any): Promise<string> {
method formatAxml (line 47) | static formatAxml(axml: string) {
method format (line 59) | static format(axml: string) {
method create (line 73) | static create<T extends types.Node = types.Node>(
method node (line 81) | get node(): T {
method platform (line 85) | public get platform(): PlatformConfig {
method constructor (line 89) | private constructor(
method extends (line 96) | extends<T extends types.Node = types.Node>(
method throw (line 103) | throw(child: types.Node, message?: string): TransformError {
method h (line 109) | h(tagName: string, props: any, ...children: any[]): any {
method toAxmlExpression (line 113) | toAxmlExpression(disableFormatWhenMultipleLine: boolean): string {
method toAxmlObject (line 131) | toAxmlObject() {
method getAttrName (line 139) | getAttrName(tagName: string, name: string): string {
method getTagName (line 153) | getTagName(tagName: string): string {
method if (line 157) | if() {
method for (line 160) | for() {
method else (line 163) | else(): string {
method elseif (line 166) | elseif(): string {
method forIndex (line 169) | forIndex(): string {
method forItem (line 172) | forItem(): string {
method forKey (line 175) | forKey(): string {
method getFrame (line 178) | getFrame() {
FILE: scripts/tsxml/fixtures/event.tsx
type Props (line 3) | interface Props {
FILE: scripts/tsxml/fixtures/if.tsx
type Props (line 3) | interface Props {
FILE: scripts/tsxml/fixtures/index.tsx
type Props (line 3) | interface Props {
FILE: scripts/tsxml/fixtures/sjs.sjs.js
function format (line 1) | function format(a) {
FILE: scripts/tsxml/fixtures/sjs.tsx
type Props (line 4) | interface Props {
FILE: scripts/tsxml/h.ts
type Children (line 1) | type Children = Node | string;
type Node (line 2) | interface Node {
function h (line 8) | function h(tagName: string, props: any, ...children: any[]) {
function toHtml (line 16) | function toHtml(vNode: Node | Children | Array<Node | Children>) {
FILE: scripts/tsxml/index.spec.ts
function textTsXml (line 9) | async function textTsXml(fixtureName: string) {
FILE: scripts/tsxml/parser.ts
function getJSXElementName (line 5) | function getJSXElementName(
function getJSXAttributeName (line 19) | function getJSXAttributeName(
function tsxmlToAxml (line 33) | async function tsxmlToAxml(ctx: ITransformContext<types.File>) {
type NodeAttr (line 55) | interface NodeAttr {
function transformJSXElement (line 60) | function transformJSXElement(ctx: ITransformContext) {
function findForKey (line 272) | function findForKey(_arrowFunction: types.Node, ctx) {
function transformAttrExpression (line 297) | function transformAttrExpression(ctx: ITransformContext) {
FILE: scripts/tsxml/platform.ts
type PlatformConfig (line 158) | interface PlatformConfig {
FILE: scripts/tsxml/utils.ts
function getAxmlArrowFunctionExpression (line 5) | function getAxmlArrowFunctionExpression(
function parseCode (line 23) | function parseCode(content: string) {
type XmlScript (line 31) | interface XmlScript {
function parseXmlScript (line 36) | function parseXmlScript(
FILE: scripts/verifyCommitMsg.js
constant REG (line 3) | const REG = /^(revert: )?(feat|fix|docs|style|refactor|perf|workflow|bui...
FILE: src/ActionSheet/index.sjs.ts
function isIconMode (line 1) | function isIconMode(actions) {
FILE: src/ActionSheet/index.ts
method onAction (line 12) | onAction(e: IPlatformEvent) {
method onClose (line 22) | onClose(e: IPlatformEvent) {
FILE: src/ActionSheet/props.ts
type IActionItem (line 3) | interface IActionItem {
type IActionSheetProps (line 13) | interface IActionSheetProps extends IBaseProps {
FILE: src/Alphabet/index.ts
method onTouchStart (line 20) | onTouchStart(e: any) {
method onTouchMove (line 43) | onTouchMove(e: any) {
method onTouchEnd (line 72) | onTouchEnd() {
method onAlphabetClick (line 79) | onAlphabetClick(item: string) {
FILE: src/AutoResize/index.ts
method getInstance (line 12) | getInstance() {
method getBoundingClientRect (line 18) | async getBoundingClientRect(query: string) {
method adjustFontSize (line 21) | adjustFontSize() {
method checkTextOverflow (line 46) | checkTextOverflow() {
method didMount (line 77) | didMount() {
method attached (line 82) | attached() {
FILE: src/AutoResize/props.ts
type IAutoResizeProps (line 8) | interface IAutoResizeProps extends IBaseProps {
FILE: src/Avatar/index.sjs.ts
function getClass (line 1) | function getClass(size) {
FILE: src/Avatar/props.ts
type IAvatarProps (line 6) | interface IAvatarProps extends IBaseProps {
FILE: src/Badge/index.sjs.ts
function setPositionStyle (line 1) | function setPositionStyle(
function setBubbleStyle (line 29) | function setBubbleStyle(type, position) {
function getOverCount (line 45) | function getOverCount(text) {
FILE: src/Badge/props.ts
type IBadgeProps (line 6) | interface IBadgeProps extends IBaseProps {
FILE: src/Button/index.sjs.ts
function getClass (line 1) | function getClass(size) {
function getHoverClass (line 9) | function getHoverClass(loading, type, activeClassName) {
function isAide (line 23) | function isAide(aide, type) {
FILE: src/Button/index.ts
method onTap (line 44) | onTap(e) {
method catchTap (line 55) | catchTap(e) {
method onGetAuthorize (line 66) | onGetAuthorize(e) {
method onFollowLifestyle (line 71) | onFollowLifestyle(e) {
method onError (line 76) | onError(e) {
method onGetUserInfo (line 81) | onGetUserInfo(e) {
method onGetPhoneNumber (line 86) | onGetPhoneNumber(e) {
FILE: src/Button/props.ts
type IButtonProps (line 10) | interface IButtonProps extends IBaseProps {
FILE: src/Calendar/helper.sjs.ts
function keys (line 3) | function keys(obj) {
function getClassName (line 21) | function getClassName(value, index, showSelectableDatesOnly) {
function getSpaceClassName (line 56) | function getSpaceClassName(index, items) {
function getMarkCellClassName (line 74) | function getMarkCellClassName(index, items) {
function isDisplay (line 81) | function isDisplay(index, items) {
FILE: src/Calendar/index.ts
method getInstance (line 40) | getInstance() {
method getBoundingClientRect (line 46) | async getBoundingClientRect(query: string) {
method scrollIntoView (line 49) | scrollIntoView(value) {
method clickCell (line 52) | clickCell(e) {
method setCurrentMonth (line 83) | setCurrentMonth(e) {
method measurement (line 86) | measurement() {
method measurementFn (line 94) | measurementFn() {
method updateScrollIntoViewId (line 125) | updateScrollIntoViewId(id) {
method updateValue (line 133) | updateValue(newValue: CalendarValue) {
method updateData (line 139) | updateData() {
method didMount (line 223) | didMount() {
method didUpdate (line 238) | didUpdate(prevProps, prevData) {
method attached (line 253) | attached() {
FILE: src/Calendar/props.ts
type CalendarDate (line 4) | interface CalendarDate {
type LocaleText (line 10) | interface LocaleText {
type CellState (line 38) | interface CellState {
type CalendarValue (line 88) | type CalendarValue = number | number[];
type SelectionMode (line 89) | type SelectionMode = 'single' | 'range';
type ICalendarProps (line 91) | interface ICalendarProps extends IBaseProps {
method onChange (line 164) | onChange() {}
FILE: src/Calendar/scroll.sjs.ts
function handleScroll (line 2) | function handleScroll(event, ownerComponent) {
FILE: src/Calendar/utils.ts
function getMonthListFromRange (line 5) | function getMonthListFromRange(start: Dayjs, end: Dayjs): Dayjs[] {
function defaultMonthRange (line 17) | function defaultMonthRange(): [number, number] {
function getDate (line 29) | function getDate(month: Dayjs, weekStartsOn: string): Dayjs[] {
function renderCells (line 53) | function renderCells(
function getSelectionModeFromValue (line 164) | function getSelectionModeFromValue(
function getScrollIntoViewId (line 177) | function getScrollIntoViewId(value: CalendarValue) {
FILE: src/Card/index.ts
method handleTapFoldBtn (line 19) | handleTapFoldBtn(e) {
method handleTapCardHeader (line 29) | handleTapCardHeader(e) {
method handleTapLink (line 39) | handleTapLink(e) {
method handleStickyChange (line 43) | handleStickyChange(status) {
method onInit (line 49) | onInit() {
method didUpdate (line 62) | didUpdate(prevProps) {
method attached (line 72) | attached() {
FILE: src/Card/props.ts
type ICardProps (line 1) | interface ICardProps {
type ICardConfig (line 17) | interface ICardConfig {
FILE: src/Checkbox/CheckboxGroup/index.ts
method onChange (line 8) | onChange(args, e) {
method transformValue (line 36) | transformValue(val) {
FILE: src/Checkbox/CheckboxGroup/props.ts
type ICheckboxGroupProps (line 3) | interface ICheckboxGroupProps extends IBaseProps {
FILE: src/Checkbox/index.sjs.ts
function getClassName (line 1) | function getClassName(checked, disabled) {
function getCheckboxChecked (line 16) | function getCheckboxChecked(item, value) {
FILE: src/Checkbox/index.ts
method onInit (line 11) | onInit() {
method onChange (line 17) | onChange(e) {
FILE: src/Checkbox/props.ts
type ICheckboxProps (line 6) | interface ICheckboxProps extends IBaseProps {
FILE: src/Checklist/ChecklistItem/index.ts
method onChecklistItemClick (line 7) | onChecklistItemClick() {
FILE: src/Checklist/ChecklistItem/props.ts
type IChecklistItemProps (line 8) | interface IChecklistItemProps extends IBaseProps {
FILE: src/Checklist/index.sjs.ts
function getChecked (line 1) | function getChecked(value, values, multiple) {
FILE: src/Checklist/index.ts
method onChange (line 12) | onChange(item) {
method transformValue (line 52) | transformValue(val) {
FILE: src/Checklist/props.ts
type ChecklistItem (line 7) | interface ChecklistItem {
type IChecklistProps (line 32) | interface IChecklistProps extends IBaseProps {
FILE: src/Collapse/index.sjs.ts
function isActive (line 1) | function isActive(current, index, disabled) {
function getStyleHeight (line 8) | function getStyleHeight(index, contentHeight, disabled) {
FILE: src/Collapse/index.ts
method getInstance (line 13) | getInstance() {
method getBoundingClientRectWithBuilder (line 19) | async getBoundingClientRectWithBuilder(builder: (id: string) => string) {
method formatCurrent (line 25) | formatCurrent(val: number[], props) {
method onChange (line 39) | onChange(e) {
method updateContentHeight (line 66) | async updateContentHeight(prevCurrent: number[], nextCurrent: number[]) {
method resetContentHeight (line 117) | resetContentHeight(e) {
method transformValue (line 134) | transformValue(current, extra) {
method didUpdate (line 148) | didUpdate(prevProps, prevData) {
method didMount (line 157) | didMount() {
method attached (line 183) | attached() {
FILE: src/Collapse/props.ts
type ICollapseProps (line 6) | interface ICollapseProps extends IBaseProps {
FILE: src/ConfigProvider/index.ts
method update (line 25) | update() {
method convertThemeVarsToCSSVars (line 45) | convertThemeVarsToCSSVars(themeVars: Record<string, string | number>) {
method onInit (line 63) | onInit() {
method attached (line 68) | attached() {
FILE: src/ConfigProvider/props.ts
type IConfigProviderProps (line 9) | interface IConfigProviderProps extends IBaseProps {
FILE: src/Container/props.ts
type IContainerProps (line 7) | interface IContainerProps extends IBaseProps {
FILE: src/Countdown/index.ts
method init (line 23) | init() {
method countdown (line 97) | countdown(
method onInit (line 171) | onInit() {
method didUnmount (line 174) | didUnmount() {
method didUpdate (line 178) | didUpdate(prevProps) {
method attached (line 188) | attached() {
method detached (line 191) | detached() {
FILE: src/Countdown/props.ts
type ICountdownProps (line 1) | interface ICountdownProps {
FILE: src/DatePicker/RangePicker/index.ts
method isVisibleControlled (line 44) | isVisibleControlled() {
method computed (line 52) | computed() {
method getMin (line 66) | getMin(min) {
method getMax (line 70) | getMax(max) {
method setCurrentValue (line 74) | setCurrentValue(currentProps, forceUpdate = false) {
method generateData (line 166) | generateData(currentValue, currentProps) {
method onChange (line 191) | onChange(selectedIdx) {
method onCancel (line 255) | onCancel(e) {
method onOk (line 259) | onOk() {
method onFormatLabel (line 271) | onFormatLabel(type, value) {
method defaultFormatLabel (line 279) | defaultFormatLabel(type, value) {
method defaultFormat (line 290) | defaultFormat(date, valueStrs) {
method onFormat (line 300) | onFormat() {
method onVisibleChange (line 328) | onVisibleChange(visible) {
method onChangeCurrentPickerType (line 336) | onChangeCurrentPickerType(e) {
method transformValue (line 349) | transformValue(value) {
method didMount (line 362) | didMount() {
method didUpdate (line 374) | didUpdate(prevProps, prevData) {
method created (line 401) | created() {
FILE: src/DatePicker/RangePicker/props.ts
type PickerValue (line 3) | type PickerValue = [Date, Date];
type IDateRangePickerProps (line 7) | interface IDateRangePickerProps extends IBaseProps {
FILE: src/DatePicker/index.ts
method isVisibleControlled (line 35) | isVisibleControlled() {
method getCurrentValueWithCValue (line 44) | getCurrentValueWithCValue(currentProps) {
method getMin (line 108) | getMin(min) {
method getMax (line 112) | getMax(max) {
method setCurrentValue (line 118) | setCurrentValue(currentProps) {
method generateData (line 142) | generateData(currentValue, currentProps) {
method onFormatLabel (line 165) | onFormatLabel(type, value) {
method defaultFormatLabel (line 173) | defaultFormatLabel(type, value) {
method onChange (line 184) | onChange(selectedIdx) {
method onCancel (line 233) | onCancel(e) {
method onOk (line 237) | onOk() {
method defaultFormat (line 246) | defaultFormat(value, valueStr) {
method onFormat (line 253) | onFormat() {
method onVisibleChange (line 271) | onVisibleChange(visible) {
method transformValue (line 282) | transformValue(value) {
method onInit (line 292) | onInit() {
method didUpdate (line 303) | didUpdate(prevProps, prevData) {
method created (line 331) | created() {
FILE: src/DatePicker/props.ts
type PickerValue (line 3) | type PickerValue = Date | string | number;
type IDatePickerProps (line 7) | interface IDatePickerProps extends IBaseProps {
FILE: src/DatePicker/util.ts
function getArray (line 3) | function getArray(start, end, format) {
function getYears (line 20) | function getYears(min: Dayjs, max: Dayjs, format) {
function getMonths (line 24) | function getMonths(min: Dayjs, max: Dayjs, currentPicker: Dayjs, format) {
function getDates (line 47) | function getDates(min: Dayjs, max: Dayjs, currentPicker: Dayjs, format) {
function getHours (line 59) | function getHours(min: Dayjs, max: Dayjs, currentPicker: Dayjs, format) {
function getMinutes (line 70) | function getMinutes(min: Dayjs, max: Dayjs, currentPicker: Dayjs, format) {
function getSeconds (line 81) | function getSeconds(min: Dayjs, max: Dayjs, currentPicker: Dayjs, format) {
function getRangeData (line 92) | function getRangeData(
function getDateByValue (line 135) | function getDateByValue(value) {
function getValueByDate (line 145) | function getValueByDate(
function getValidValue (line 172) | function getValidValue(value) {
function isEqualDate (line 188) | function isEqualDate(date1, date2) {
FILE: src/Dialog/index.sjs.ts
function getDirection (line 1) | function getDirection(
FILE: src/Dialog/index.ts
method onClose (line 12) | onClose() {
method onMaskClose (line 15) | onMaskClose() {
method onButtonTap (line 21) | onButtonTap(e) {
method onPrimaryButtonTap (line 32) | onPrimaryButtonTap() {
method onSecondaryButtonTap (line 35) | onSecondaryButtonTap() {
method onCancelButtonTap (line 38) | onCancelButtonTap() {
FILE: src/Dialog/props.ts
type Button (line 7) | interface Button {
type Footer (line 27) | interface Footer {
type IDialogProps (line 37) | interface IDialogProps extends IBaseProps {
FILE: src/Divider/props.ts
type IDividerProps (line 3) | interface IDividerProps extends IBaseProps {
FILE: src/Empty/index.ts
method onClickButton (line 7) | onClickButton(e: IPlatformEvent) {
FILE: src/Empty/props.ts
type Button (line 7) | interface Button {
type IEmptyProps (line 18) | interface IEmptyProps extends IBaseProps {
FILE: src/Feedback/index.ts
method handleVisibleChange (line 11) | handleVisibleChange(visible, e) {
method onTapFeedItem (line 14) | onTapFeedItem(e) {
method maskClick (line 18) | maskClick(e) {
FILE: src/Feedback/props.ts
type FeedItem (line 7) | interface FeedItem {
type IFeedbackProps (line 25) | interface IFeedbackProps extends IBaseProps {
FILE: src/Footer/index.ts
method onTapLink (line 7) | onTapLink(e) {
method onTapChip (line 11) | onTapChip(e) {
FILE: src/Footer/props.ts
type ActionItem (line 3) | type ActionItem = {
type IProps (line 8) | interface IProps extends IBaseProps {
method onLinkTap (line 51) | onLinkTap() {}
method onChipTap (line 52) | onChipTap() {}
FILE: src/Form/FormCascaderPicker/index.ts
method onOk (line 24) | onOk(value, option, e) {
method onPickerChange (line 29) | onPickerChange(value, option, e) {
method onVisibleChange (line 37) | onVisibleChange(visible, e) {
method onDismissPicker (line 40) | onDismissPicker(e) {
method onChange (line 43) | onChange(value, options, e) {
method handleFormat (line 46) | handleFormat(value, option) {
method attached (line 55) | attached() {
FILE: src/Form/FormCascaderPicker/props.ts
type FormCascaderPickerProps (line 7) | interface FormCascaderPickerProps extends ICascaderProps, FormItemProps {
FILE: src/Form/FormCheckboxGroup/index.ts
method onChange (line 9) | onChange(value, e) {
FILE: src/Form/FormCheckboxGroup/props.ts
type FormCheckboxGroupProps (line 7) | interface FormCheckboxGroupProps
FILE: src/Form/FormDatePicker/index.ts
method onOk (line 24) | onOk(date, dateStr, e) {
method onPickerChange (line 34) | onPickerChange(date, dateStr, e) {
method onVisibleChange (line 42) | onVisibleChange(visible, e) {
method onDismissPicker (line 45) | onDismissPicker(e) {
method handleFormat (line 49) | handleFormat(date, dateStr) {
method handleFormatLabel (line 55) | handleFormatLabel(type, value) {
method attached (line 64) | attached() {
FILE: src/Form/FormDatePicker/props.ts
type FormDatePickerProps (line 7) | interface FormDatePickerProps extends IDatePickerProps, FormItemProps {
FILE: src/Form/FormImageUpload/index.ts
method handleRef (line 9) | handleRef(imageUpload) {
method onChange (line 17) | onChange(value) {
method onPreview (line 21) | onPreview(file) {
method onChooseImageError (line 24) | onChooseImageError(err) {
method handleUpload (line 28) | handleUpload(localFile) {
method handleRemove (line 35) | handleRemove(file) {
method handleBeforeUpload (line 41) | handleBeforeUpload(localFileList) {
method setFormData (line 52) | setFormData(this: any, values) {
method attached (line 67) | attached() {
FILE: src/Form/FormImageUpload/props.ts
type FormImageUploadProps (line 7) | interface FormImageUploadProps
FILE: src/Form/FormInput/index.ts
method handleRef (line 9) | handleRef(input) {
method onChange (line 17) | onChange(value, e) {
method onBlur (line 21) | onBlur(value, e) {
method onFocus (line 25) | onFocus(value, e) {
method onConfirm (line 28) | onConfirm(value, e) {
method setFormData (line 35) | setFormData(this: any, values) {
FILE: src/Form/FormInput/props.ts
type FormInputProps (line 4) | interface FormInputProps
FILE: src/Form/FormItem/index.ts
method attached (line 7) | attached() {
FILE: src/Form/FormItem/props.ts
type FormItemProps (line 4) | interface FormItemProps extends IBaseProps {
FILE: src/Form/FormPicker/index.ts
method onOk (line 24) | onOk(value, column, e) {
method onChange (line 29) | onChange(value, column, e) {
method onVisibleChange (line 32) | onVisibleChange(visible, e) {
method onDismissPicker (line 35) | onDismissPicker(e) {
method handleFormat (line 39) | handleFormat(value, column) {
method attached (line 48) | attached() {
FILE: src/Form/FormPicker/props.ts
type FormPickerProps (line 4) | interface FormPickerProps extends IPickerProps, FormItemProps {
FILE: src/Form/FormRadioGroup/index.ts
method onChange (line 9) | onChange(value, e) {
FILE: src/Form/FormRadioGroup/props.ts
type FormRadioGroupProps (line 7) | interface FormRadioGroupProps
FILE: src/Form/FormRangePicker/index.ts
method onOk (line 24) | onOk(date, dateStr, e) {
method onPickerChange (line 34) | onPickerChange(type, date, dateStr, e) {
method onVisibleChange (line 42) | onVisibleChange(visible, e) {
method onDismissPicker (line 45) | onDismissPicker(e) {
method handleFormat (line 49) | handleFormat(date, dateStr) {
method handleFormatLabel (line 55) | handleFormatLabel(type, value) {
method attached (line 64) | attached() {
FILE: src/Form/FormRangePicker/props.ts
type FormRangePickerProps (line 5) | interface FormRangePickerProps
FILE: src/Form/FormRate/index.ts
method onChange (line 9) | onChange(value, e) {
FILE: src/Form/FormRate/props.ts
type FormRateProps (line 4) | interface FormRateProps
FILE: src/Form/FormSelector/index.ts
method onChange (line 9) | onChange(value, item, e) {
method onSelectMax (line 14) | onSelectMax(value, item, e) {
method onSelectMin (line 17) | onSelectMin(value, item, e) {
FILE: src/Form/FormSelector/props.ts
type FormSelectorProps (line 4) | interface FormSelectorProps extends ISelectorProps, FormItemProps {}
FILE: src/Form/FormSlider/index.ts
method onChange (line 9) | onChange(value, e) {
method onAfterChange (line 13) | onAfterChange(value, e) {
FILE: src/Form/FormSlider/props.ts
type FormSliderProps (line 4) | interface FormSliderProps
FILE: src/Form/FormStepper/index.ts
method onChange (line 9) | onChange(value, e) {
method onBlur (line 13) | onBlur(e) {
method onFocus (line 16) | onFocus(e) {
method onConfirm (line 19) | onConfirm(value, e) {
FILE: src/Form/FormStepper/props.ts
type FormStepperProps (line 4) | interface FormStepperProps
FILE: src/Form/FormSwitch/index.ts
method onChange (line 9) | onChange(value, e) {
FILE: src/Form/FormSwitch/props.ts
type FormSwitchProps (line 4) | interface FormSwitchProps
FILE: src/Form/FormTextarea/index.ts
method handleRef (line 18) | handleRef(input) {
method onChange (line 26) | onChange(value, e) {
method onBlur (line 30) | onBlur(value, e) {
method onFocus (line 33) | onFocus(value, e) {
method onConfirm (line 36) | onConfirm(value, e) {
method onClear (line 39) | onClear(value, e) {
method setFormData (line 47) | setFormData(this: any, values) {
FILE: src/Form/FormTextarea/props.ts
type FormTextareaProps (line 8) | interface FormTextareaProps
FILE: src/Form/form.ts
type Validator (line 19) | type Validator = (
type ValidatorRender (line 23) | type ValidatorRender = (form: Form) => {
type FormRuleItem (line 26) | type FormRuleItem = Omit<RuleItem, 'asyncValidator'> | ValidatorRender;
type Rule (line 27) | type Rule = FormRuleItem | FormRuleItem[];
type Rules (line 28) | type Rules = Record<string, Rule>;
type FormConfig (line 29) | type FormConfig = {
type ValidateStatus (line 34) | type ValidateStatus = 'default' | 'success' | 'error' | 'validating';
type ValidatorStatus (line 35) | interface ValidatorStatus {
type FromItemRef (line 39) | interface FromItemRef {
type ValidateTrigger (line 45) | type ValidateTrigger = 'onChange' | 'onBlur' | 'onFocus';
type EventTrigger (line 46) | type EventTrigger =
class EventEmitter (line 51) | class EventEmitter {
method on (line 54) | on(event: string, listener: (...args: any) => void) {
method emit (line 60) | emit(event: string, ...args: any) {
class Field (line 68) | class Field extends EventEmitter {
method constructor (line 106) | constructor(
method create (line 179) | create(
method updateFieldRules (line 214) | updateFieldRules(rules: RawRule, validateMessages: ValidateMessages) {
method transformValidatorRules (line 239) | private transformValidatorRules(
method transformValidateMessages (line 304) | private transformValidateMessages(
method setValue (line 358) | setValue(value: Value) {
method getValue (line 367) | getValue() {
method setValidatorStatus (line 376) | setValidatorStatus(validatorStatue: ValidatorStatus) {
method getValidatorStatus (line 384) | getValidatorStatus(): ValidatorStatus {
method validate (line 395) | async validate() {
method reset (line 458) | reset(initialValue: Value) {
method isTouched (line 471) | isTouched() {
class Form (line 476) | class Form {
method constructor (line 513) | constructor(formConfig: FormConfig = {}) {
method transformRules (line 523) | private transformRules(rules: Rules) {
method eachField (line 546) | private eachField(callback: (field: Field, name: string) => void) {
method updateRules (line 558) | updateRules(rules: Rules) {
method setRules (line 570) | private setRules(rules: Rules) {
method addItem (line 578) | addItem(ref: FromItemRef, customName?: string) {
method setFieldValue (line 654) | setFieldValue(name: string, value: Value) {
method setFieldsValue (line 670) | setFieldsValue(values: Values) {
method setInitialValues (line 686) | setInitialValues(initialValues: Values) {
method getFieldValue (line 695) | getFieldValue(name: string) {
method getFieldsValue (line 708) | getFieldsValue(nameList?: string[]) {
method getFieldValidatorStatus (line 722) | getFieldValidatorStatus(name: string) {
method getFieldsValidatorStatus (line 735) | getFieldsValidatorStatus(nameList?: string[]) {
method setFieldValidatorStatus (line 750) | setFieldValidatorStatus(name: string, validatorStatus: ValidatorStatus) {
method setFieldsValidatorStatus (line 763) | setFieldsValidatorStatus(
method isFieldTouched (line 776) | isFieldTouched(name: string) {
method onValueChange (line 789) | onValueChange(
method onValuesChange (line 805) | onValuesChange(callback: (changedValues: Values, allValues: Values) =>...
method submit (line 814) | async submit() {
method reset (line 861) | reset() {
function createForm (line 869) | function createForm({ methods = {} } = {}) {
FILE: src/Grid/index.sjs.ts
function checkNeedVerticalSpace (line 1) | function checkNeedVerticalSpace(count, index, columns) {
function checkShowSplitLine (line 8) | function checkShowSplitLine(index, count, columns, mode, showDivider) {
FILE: src/Grid/index.ts
method onTap (line 7) | onTap(e: IPlatformEvent) {
method onFirstAppear (line 11) | onFirstAppear(e: IPlatformEvent) {
FILE: src/Grid/props.ts
type IGridItem (line 3) | interface IGridItem {
type IGridProps (line 25) | interface IGridProps extends IBaseProps {
FILE: src/GuideTour/index.sjs.ts
function checkShowNext (line 1) | function checkShowNext(current, items) {
function checkShowPrev (line 4) | function checkShowPrev(current, items) {
function checkShowJump (line 7) | function checkShowJump(current, items) {
function checkShowKnow (line 10) | function checkShowKnow(current, items) {
FILE: src/GuideTour/index.ts
method onNext (line 21) | async onNext() {
method onPrev (line 30) | async onPrev() {
method onCancel (line 39) | onCancel() {
method onSwiperChange (line 43) | async onSwiperChange(e) {
FILE: src/GuideTour/props.ts
type IStep (line 3) | interface IStep {
type IGuideTour (line 30) | interface IGuideTour extends IBaseProps {
FILE: src/Icon/index.ts
method onTap (line 31) | onTap(e) {
method catchTap (line 36) | catchTap(e) {
FILE: src/Icon/props.ts
type IconProps (line 7) | interface IconProps extends IBaseProps {
FILE: src/ImageIcon/props.ts
type ImageIconProps (line 4) | interface ImageIconProps extends IBaseProps {
FILE: src/ImageUpload/index.ts
method chooseImage (line 25) | async chooseImage() {
method uploadFile (line 92) | async uploadFile(localFile: LocalFile) {
method updateFile (line 131) | updateFile(uid: string, file: Partial<File>) {
method onRemove (line 149) | async onRemove(e) {
method onPreview (line 169) | onPreview(e) {
method updateShowUploadButton (line 175) | updateShowUploadButton() {
method getCount (line 183) | getCount() {
method transformValue (line 199) | transformValue(fileList = []) {
method didMount (line 222) | didMount() {
method didUpdate (line 225) | didUpdate(prevProps, prevData) {
method attached (line 232) | attached() {
FILE: src/ImageUpload/props.ts
type Status (line 3) | type Status = 'uploading' | 'done' | 'error';
type File (line 4) | interface File {
type LocalFile (line 21) | interface LocalFile {
type IUploaderProps (line 26) | interface IUploaderProps extends IBaseProps {
FILE: src/IndexBar/index.ts
method getInstance (line 30) | getInstance() {
method init (line 36) | init(nextProps) {
method isControlled (line 60) | isControlled(nextProps, valueKey = 'current') {
method initItemHeight (line 67) | async initItemHeight() {
method onTouchStart (line 76) | onTouchStart(e: any) {
method onAlphabetClick (line 96) | async onAlphabetClick(item, index) {
method onTouchEnd (line 107) | onTouchEnd() {
method onTouchMove (line 118) | onTouchMove(e: any) {
method onScroll (line 141) | onScroll(e) {
method initTopRange (line 158) | async initTopRange() {
method didMount (line 173) | didMount() {
method deriveDataFromProps (line 176) | deriveDataFromProps(nextProps) {
method attached (line 197) | attached() {
FILE: src/IndexBar/props.ts
type ItemObj (line 3) | interface ItemObj {
type IndexBarProps (line 8) | interface IndexBarProps extends IBaseProps {
FILE: src/Input/InputBlur/index.ts
method onChange (line 9) | onChange(e) {
method onFocus (line 16) | onFocus(e) {
method onBlur (line 21) | onBlur(e) {
method onConfirm (line 29) | onConfirm(e) {
method transformValue (line 37) | transformValue(value, extra, updateWithoutFocusCheck) {
FILE: src/Input/InputBlur/props.ts
type InputType (line 3) | type InputType =
type InputBlurProps (line 16) | interface InputBlurProps extends IBaseProps {
FILE: src/Input/Textarea/index.ts
method onChange (line 20) | onChange(e) {
method onFocus (line 27) | onFocus(e) {
method onBlur (line 34) | onBlur(e) {
method onConfirm (line 41) | onConfirm(e) {
method onClear (line 45) | onClear(e) {
method attached (line 54) | attached() {
FILE: src/Input/Textarea/props.ts
type ConfirmType (line 6) | type ConfirmType = 'return' | 'done' | 'go' | 'next' | 'search' | 'send';
type TextareaProps (line 12) | interface TextareaProps extends IBaseProps {
FILE: src/Input/index.ts
method onChange (line 28) | onChange(e) {
method onFocus (line 35) | onFocus(e) {
method onBlur (line 42) | onBlur(e) {
method onConfirm (line 56) | onConfirm(e) {
method onClear (line 60) | onClear(e) {
method checkNumberValue (line 66) | checkNumberValue(value) {
method attached (line 87) | attached() {
FILE: src/Input/props.ts
type InputType (line 3) | type InputType =
type InputProps (line 24) | interface InputProps extends IBaseProps {
FILE: src/Input/utils.ts
function isNumber (line 6) | function isNumber(value: unknown): boolean {
function formatNumberWithLimits (line 27) | function formatNumberWithLimits(
FILE: src/List/ListItem/index.ts
method onTap (line 21) | onTap(e) {
method catchTap (line 27) | catchTap(e) {
FILE: src/List/ListItem/props.ts
type IListItemProps (line 3) | interface IListItemProps extends IBaseProps {
FILE: src/List/props.ts
type IListProps (line 6) | interface IListProps extends IBaseProps {
FILE: src/Loading/index.sjs.ts
function getLoadingColor (line 1) | function getLoadingColor(color) {
function getClass (line 7) | function getClass(size) {
FILE: src/Loading/props.ts
type ILoadingProps (line 6) | interface ILoadingProps extends IBaseProps {
FILE: src/Mask/index.ts
method onMaskTap (line 8) | onMaskTap(e: IPlatformEvent) {
FILE: src/Mask/props.ts
type IMaskProps (line 6) | interface IMaskProps extends IBaseProps {
FILE: src/Modal/index.sjs.ts
function getDirection (line 1) | function getDirection(
FILE: src/Modal/index.ts
method onClose (line 7) | onClose() {
method onMaskClose (line 10) | onMaskClose() {
method onPrimaryButtonTap (line 22) | onPrimaryButtonTap() {
method onSecondaryButtonTap (line 25) | onSecondaryButtonTap() {
method onCancelButtonTap (line 28) | onCancelButtonTap() {
FILE: src/Modal/props.ts
type IModalProps (line 6) | interface IModalProps extends IBaseProps {
FILE: src/NoticeBar/index.ts
method getInstance (line 17) | getInstance() {
method getBoundingClientRectWithId (line 24) | async getBoundingClientRectWithId(prefix: string) {
method onTap (line 30) | onTap() {
method startMarquee (line 47) | startMarquee(state) {
method measureText (line 79) | measureText(callback) {
method resetMarquee (line 109) | resetMarquee(state) {
method onTransitionEnd (line 123) | onTransitionEnd() {
method didMount (line 139) | didMount() {
method didUpdate (line 149) | didUpdate() {
method onShow (line 160) | onShow() {
method attached (line 177) | attached() {
FILE: src/NoticeBar/props.ts
type INoticeBarProps (line 9) | interface INoticeBarProps extends IBaseProps {
FILE: src/NumberInput/index.ts
constant UNIT_LIST (line 12) | const UNIT_LIST = [
method update (line 32) | update(value: string) {
method handleInput (line 36) | handleInput(val) {
method handleQuickInput (line 47) | handleQuickInput(e) {
method formatAmount (line 52) | formatAmount(value: string) {
method checkMaxValue (line 67) | checkMaxValue(value: string) {
method handleLinkTap (line 74) | handleLinkTap() {
method setUnit (line 78) | setUnit(value: string) {
method attached (line 89) | attached() {
FILE: src/NumberInput/props.ts
type NumberInputProps (line 3) | interface NumberInputProps extends IBaseProps {
FILE: src/NumberKeyboard/index.ts
method catchAppearModal (line 23) | catchAppearModal() {
method setRandom (line 26) | setRandom() {
method tapButton (line 40) | tapButton(e) {
method handleHide (line 63) | handleHide() {
method onClickEnter (line 66) | onClickEnter() {
method vibrate (line 73) | vibrate() {
method didMount (line 81) | didMount() {
method attached (line 86) | attached() {
FILE: src/NumberKeyboard/props.ts
type INumberKeyboardProps (line 3) | interface INumberKeyboardProps extends IBaseProps {
FILE: src/PageContainer/index.ts
method handleActionTap (line 21) | handleActionTap(e) {
method handleSecondaryActionTap (line 24) | handleSecondaryActionTap(e) {
method updatePageStatus (line 27) | updatePageStatus(prevProps: any, nextProps: any) {
method didMount (line 57) | didMount() {
method didUpdate (line 61) | didUpdate(prevProps) {
method attached (line 68) | attached() {
FILE: src/PageContainer/props.ts
type IPageProps (line 7) | interface IPageProps extends IBaseProps {
FILE: src/Pagination/index.sjs.ts
function changeScollDistance (line 1) | function changeScollDistance(event, ownerComponent) {
FILE: src/Pagination/index.ts
method clacWidth (line 14) | async clacWidth() {
method onScroll (line 24) | async onScroll(e) {
method onInit (line 34) | onInit() {
FILE: src/Pagination/props.ts
type IPaginationProps (line 3) | interface IPaginationProps extends IBaseProps {
FILE: src/Picker/CascaderPicker/index.ts
method isVisibleControlled (line 23) | isVisibleControlled() {
method initColumns (line 31) | initColumns() {
method getterColumns (line 52) | getterColumns(value, options) {
method getValidValue (line 66) | getValidValue(value, columns) {
method getOptionByValue (line 78) | getOptionByValue(value) {
method onChange (line 95) | onChange(selectedVal) {
method onOk (line 113) | async onOk() {
method onVisibleChange (line 126) | onVisibleChange(visible) {
method defaultFormat (line 144) | defaultFormat(value, options) {
method onFormat (line 150) | onFormat() {
method onCancel (line 161) | onCancel(e) {
method onInit (line 169) | onInit() {
method didUpdate (line 172) | didUpdate(prevProps, prevData) {
method created (line 194) | created() {
FILE: src/Picker/CascaderPicker/props.ts
type ICascaderOption (line 3) | interface ICascaderOption {
type ICascaderProps (line 12) | interface ICascaderProps extends IBaseProps {
FILE: src/Picker/CascaderPicker/utils.ts
function defaultFormat (line 1) | function defaultFormat(value, options) {
function getterColumns (line 8) | function getterColumns(value, options = []) {
function getValidValue (line 22) | function getValidValue(value, columns) {
FILE: src/Picker/index.sjs.ts
function getPickerViewLabel (line 1) | function getPickerViewLabel(item) {
FILE: src/Picker/index.ts
method isVisibleControlled (line 46) | isVisibleControlled() {
method initData (line 54) | initData() {
method getterColumns (line 76) | getterColumns(options) {
method defaultFormat (line 89) | defaultFormat(value, column) {
method getterFormatText (line 103) | getterFormatText() {
method getterSelectedIndex (line 124) | getterSelectedIndex() {
method onOpen (line 149) | onOpen() {
method triggerPicker (line 164) | triggerPicker(visible) {
method onMaskDismiss (line 171) | onMaskDismiss() {
method onCancel (line 180) | onCancel() {
method onChange (line 185) | onChange(e) {
method onOk (line 200) | async onOk() {
method transformValue (line 226) | transformValue(value) {
method onInit (line 236) | onInit() {
method didUpdate (line 239) | didUpdate(prevProps) {
method created (line 285) | created() {
FILE: src/Picker/props.ts
type PickerData (line 2) | interface PickerData {
type PickerValue (line 6) | type PickerValue =
type IPickerProps (line 14) | interface IPickerProps extends IBaseProps {
FILE: src/Picker/utils.ts
function getColumnValue (line 1) | function getColumnValue(columnItem) {
function getStrictMatchedItemByValue (line 6) | function getStrictMatchedItemByValue(columns, value, single) {
function getMatchedItemByValue (line 30) | function getMatchedItemByValue(columns, value, single) {
function getMatchedItemByIndex (line 60) | function getMatchedItemByIndex(columns, selectedIndex, single) {
FILE: src/Popover/index.ts
method getInstance (line 24) | getInstance() {
method updatePopover (line 30) | async updatePopover() {
method onVisibleChange (line 73) | onVisibleChange(e) {
method onAnimationEnd (line 93) | onAnimationEnd() {
method onTapAction (line 98) | onTapAction() {
method transformValue (line 107) | transformValue(value) {
method didUpdate (line 120) | didUpdate(prevProps) {
FILE: src/Popover/props.ts
type IPopoverProps (line 6) | interface IPopoverProps extends IBaseProps {
method onVisibleChange (line 114) | onVisibleChange() {}
method onTapAction (line 115) | onTapAction() {}
FILE: src/Popover/utils.ts
type Rect (line 1) | interface Rect {
type SystemInfo (line 10) | interface SystemInfo {
function getPopoverStyle (line 15) | function getPopoverStyle(
function getStyle (line 181) | function getStyle(obj) {
FILE: src/PopoverList/index.ts
method getInstance (line 19) | getInstance() {
method onTapItem (line 25) | onTapItem(e) {
method updatePopover (line 29) | async updatePopover() {
method onVisibleChange (line 72) | onVisibleChange(e) {
method onAnimationEnd (line 92) | onAnimationEnd() {
method transformValue (line 103) | transformValue(value) {
method didUpdate (line 116) | didUpdate(prevProps) {
FILE: src/PopoverList/props.ts
type PopoverListItem (line 3) | interface PopoverListItem {
type IPopoverListProps (line 33) | interface IPopoverListProps extends IBaseProps {
method onVisibleChange (line 125) | onVisibleChange() {}
method onTapItem (line 126) | onTapItem() {}
FILE: src/PopoverList/utils.ts
type Rect (line 1) | interface Rect {
type SystemInfo (line 10) | interface SystemInfo {
function getPopoverStyle (line 15) | function getPopoverStyle(
function getStyle (line 181) | function getStyle(obj) {
FILE: src/Popup/index.sjs.ts
function getContentStyle (line 1) | function getContentStyle(position, animation, duration, width, height) {
function getCloseStyle (line 23) | function getCloseStyle(animation, duration, maskStyle) {
FILE: src/Popup/index.ts
method onClickCloseIcon (line 18) | onClickCloseIcon() {
method onClickBack (line 25) | onClickBack() {
method onTapMask (line 28) | onTapMask() {
method onAnimationEnd (line 35) | onAnimationEnd() {
method deriveDataFromProps (line 54) | async deriveDataFromProps(nextProps) {
method didUpdate (line 71) | didUpdate(prevProps) {
FILE: src/Popup/props.ts
type IPopupProps (line 5) | interface IPopupProps extends IBaseProps {
FILE: src/Postscript/index.ts
method checkMaxLength (line 13) | checkMaxLength(value) {
method handleInput (line 20) | handleInput(val) {
method handleQuickInput (line 29) | handleQuickInput(e) {
FILE: src/Postscript/props.ts
type PostscriptProps (line 3) | interface PostscriptProps extends IBaseProps {
FILE: src/Progress/index.ts
method requestAnimationFrame (line 19) | requestAnimationFrame(fn, duration = animationFrameDuration) {
method getDrawColor (line 22) | getDrawColor() {
method getCanvasContext (line 33) | async getCanvasContext() {
method clearCanvas (line 49) | clearCanvas() {
method updateCanvasProgress (line 54) | async updateCanvasProgress(prev) {
method drawProgress (line 84) | drawProgress(color, rad) {
method drawOrbit (line 102) | drawOrbit(color) {
method calProgress (line 119) | calProgress() {
method setCanvasId (line 137) | setCanvasId() {
method didMount (line 148) | didMount() {
method didUpdate (line 151) | didUpdate(prevProps) {
method attached (line 158) | attached() {
FILE: src/Progress/props.ts
type IProgressBarProps (line 6) | interface IProgressBarProps extends IBaseProps {
FILE: src/Radio/RadioGroup/index.ts
method onChange (line 8) | onChange(_, e) {
FILE: src/Radio/RadioGroup/props.ts
type IRadioGroupProps (line 3) | interface IRadioGroupProps extends IBaseProps {
FILE: src/Radio/index.sjs.ts
function getClassName (line 1) | function getClassName(checked, disabled) {
function getChecked (line 16) | function getChecked(index, options, value) {
FILE: src/Radio/index.ts
method onInit (line 11) | onInit() {
method onChange (line 18) | onChange(e) {
method handleTap (line 27) | handleTap(e) {
FILE: src/Radio/props.ts
type IRadioProps (line 3) | interface IRadioProps extends IBaseProps {
FILE: src/RareWordsKeyboard/constants.ts
constant PINYIN_MAP (line 6) | const PINYIN_MAP: IPinYinMapItem[][] = [
FILE: src/RareWordsKeyboard/index.ts
method getInstance (line 26) | getInstance() {
method getBoundingClientRect (line 32) | async getBoundingClientRect(query: string) {
method handleHide (line 36) | handleHide() {
method handleKeyClick (line 47) | handleKeyClick(e) {
method handleDelete (line 59) | handleDelete() {
method computeMatchWords (line 70) | computeMatchWords(inputValue) {
method hanleLookMore (line 82) | hanleLookMore() {
method computeMaxDisplayNum (line 93) | async computeMaxDisplayNum() {
method loadFont (line 111) | loadFont() {
method handleRetry (line 126) | handleRetry() {
method handleWordClick (line 130) | handleWordClick(e) {
method didMount (line 138) | didMount() {
method attached (line 144) | attached() {
FILE: src/RareWordsKeyboard/props.ts
type ICommonError (line 3) | interface ICommonError {
type InputTypes (line 10) | enum InputTypes {
type IPinYinMapItem (line 16) | interface IPinYinMapItem {
type IWordsItem (line 22) | interface IWordsItem {
type IFilterType (line 35) | type IFilterType = 'pinyin' | 'split' | 'all';
type IWordsItem (line 37) | interface IWordsItem {
type IWordsData (line 50) | type IWordsData = IWordsItem[];
type IRareWordsKeyboardProps (line 52) | interface IRareWordsKeyboardProps extends IBaseProps {
FILE: src/RareWordsKeyboard/utils.ts
function safeJSONparse (line 10) | function safeJSONparse(data: string): object {
function isWordsDataEmpty (line 23) | function isWordsDataEmpty(arr) {
function clearNumberInStr (line 35) | function clearNumberInStr(str: string) {
function formatZDatas (line 44) | function formatZDatas(datas = []) {
function matchWordsRecommend (line 63) | function matchWordsRecommend(
function wordsFilter (line 82) | function wordsFilter(
function filterByPinyin (line 115) | function filterByPinyin(
function filterBySplitWord (line 137) | function filterBySplitWord(
function mergeMatchWordsArr (line 160) | function mergeMatchWordsArr(
function wordsSorter (line 184) | function wordsSorter(
function sortByPinyin (line 212) | function sortByPinyin(wordsData: IWordsData = [], inputValue = ''): IWor...
function sortBySplitWord (line 253) | function sortBySplitWord(
function loadFontFace (line 286) | async function loadFontFace() {
FILE: src/RareWordsKeyboard/zdatas.ts
constant ZDATAS (line 1) | const ZDATAS = {
FILE: src/Rate/index.ts
method getInstance (line 10) | getInstance() {
method getRate (line 16) | async getRate(clientX: number) {
method handleStarTap (line 44) | async handleStarTap(e) {
method handleStarMove (line 67) | async handleStarMove(e) {
method handleStarMoveEnd (line 92) | handleStarMoveEnd() {
method transformValue (line 113) | transformValue(value) {
FILE: src/Rate/props.ts
type IRateProps (line 3) | interface IRateProps extends IBaseProps {
FILE: src/Result/props.ts
type IResultProps (line 7) | interface IResultProps extends IBaseProps {
FILE: src/SafeArea/props.ts
type ISafeAreaProps (line 1) | interface ISafeAreaProps {
FILE: src/SelectContact/index.ts
method init (line 62) | init() {
method onSearchInput (line 108) | onSearchInput(searchValue: string) {
method onSearchClear (line 159) | onSearchClear() {
method onSearchFocus (line 168) | onSearchFocus() {
method onSearchCancel (line 175) | onSearchCancel() {
method onItemClick (line 185) | onItemClick(e) {
method handleRecommendContacts (line 196) | handleRecommendContacts(recommendUserInfos: IContactInfo[]) {
method handleAllContacts (line 213) | handleAllContacts(contacts: IContactInfo[]) {
method generateAlphabet (line 253) | generateAlphabet(contactsList: IContactUserInfo[]) {
method onScrollIntoView (line 267) | onScrollIntoView(alphabetItem: string) {
method handleSearch (line 273) | handleSearch() {
method handleCancelSearch (line 276) | handleCancelSearch() {
method onInit (line 281) | onInit() {
method attached (line 286) | attached() {
FILE: src/SelectContact/props.ts
type TPersonSource (line 13) | type TPersonSource = 'recommend' | 'all' | 'search';
type IOnSelectParams (line 16) | interface IOnSelectParams {
type IGetRecommendContactsListInfo (line 25) | interface IGetRecommendContactsListInfo {
type IContactInfo (line 53) | interface IContactInfo {
type IContactUserInfo (line 83) | interface IContactUserInfo {
type ISelectContactProps (line 90) | interface ISelectContactProps extends IBaseProps {
FILE: src/SelectContact/util.ts
function getFirstLetterInMap (line 38) | function getFirstLetterInMap(str = '') {
function getId (line 46) | function getId(str: string) {
FILE: src/Selector/index.sjs.ts
function getChecked (line 1) | function getChecked(value, values, multiple) {
FILE: src/Selector/index.ts
method onChange (line 12) | onChange(e) {
FILE: src/Selector/props.ts
type Value (line 3) | type Value = string | number;
type ISelectorItem (line 4) | interface ISelectorItem {
type ISelectorProps (line 29) | interface ISelectorProps extends IBaseProps {
FILE: src/Skeleton/Avatar/index.sjs.ts
function getClass (line 1) | function getClass(size) {
FILE: src/Skeleton/Avatar/props.ts
type SkeletonAvatarProps (line 3) | interface SkeletonAvatarProps extends ISkeletonBaseProps {
FILE: src/Skeleton/Button/index.sjs.ts
function getClass (line 1) | function getClass(size) {
FILE: src/Skeleton/Button/props.ts
type SkeletonButtonProps (line 3) | interface SkeletonButtonProps extends ISkeletonBaseProps {
FILE: src/Skeleton/Input/props.ts
type SkeletonInputProps (line 3) | interface SkeletonInputProps extends ISkeletonBaseProps {}
FILE: src/Skeleton/Paragraph/props.ts
type SkeletonParagraphProps (line 3) | interface SkeletonParagraphProps extends ISkeletonBaseProps {
FILE: src/Skeleton/Title/props.ts
type SkeletonTitleProps (line 3) | interface SkeletonTitleProps extends ISkeletonBaseProps {}
FILE: src/Skeleton/props.ts
type ISkeletonBaseProps (line 4) | interface ISkeletonBaseProps extends IBaseProps {
type ISkeletonProps (line 19) | interface ISkeletonProps extends ISkeletonBaseProps {
FILE: src/Slider/index.ts
method getInstance (line 21) | getInstance() {
method formatValue (line 27) | formatValue(val) {
method getRoundedValue (line 38) | getRoundedValue(value: SliderValue, step = 1) {
method setSliderStyleByValue (line 53) | setSliderStyleByValue(roundedValue: SliderValue) {
method setTickList (line 83) | setTickList() {
method onTouchChanged (line 108) | async onTouchChanged(e, type) {
method getRect (line 161) | async getRect(e: any): Promise<any> {
method cloneSliderValue (line 180) | cloneSliderValue(value?: SliderValue) {
method isSliderValueEqual (line 188) | isSliderValueEqual(value1?: SliderValue, value2?: SliderValue) {
method fitSliderValue (line 208) | fitSliderValue(
method handleTrackTouchStart (line 244) | handleTrackTouchStart(e) {
method handleTrackTouchMove (line 248) | handleTrackTouchMove(e) {
method handleTrackTouchEnd (line 252) | handleTrackTouchEnd(e) {
method transformValue (line 258) | transformValue(val, extra, needUpdate = true, emit) {
method didUpdate (line 280) | didUpdate(prevProps) {
FILE: src/Slider/props.ts
type SliderValue (line 7) | type SliderValue = number | [number, number];
type ISliderProps (line 9) | interface ISliderProps extends IBaseProps {
FILE: src/Space/index.sjs.ts
function getSpaceClass (line 1) | function getSpaceClass(direction, wrap, align, justify) {
function getSpaceStyle (line 25) | function getSpaceStyle(size) {
FILE: src/Space/props.ts
type SpaceProps (line 1) | interface SpaceProps {
FILE: src/Stepper/index.ts
method onFocus (line 12) | onFocus(e) {
method onChange (line 16) | onChange(val, e) {
method onConfirm (line 26) | onConfirm(val, e) {
method onBlur (line 30) | onBlur(e) {
method onDisabledTap (line 38) | onDisabledTap(e) {
method onTap (line 42) | onTap(e) {
method transformValue (line 93) | transformValue(num, extra, precision) {
FILE: src/Stepper/props.ts
type IStepperProps (line 6) | interface IStepperProps extends IBaseProps {
FILE: src/Stepper/utils.ts
function getPrecision (line 1) | function getPrecision(value: number): number {
function getValidNumber (line 13) | function getValidNumber(
FILE: src/Steps/index.sjs.ts
function getClassName (line 1) | function getClassName(current, index, status) {
FILE: src/Steps/props.ts
type IStepsProps (line 6) | interface IStepsProps extends IBaseProps {
FILE: src/Sticky/index.ts
method initTabsObserver (line 14) | initTabsObserver() {
method initHeaderHeight (line 32) | initHeaderHeight(propsHeaderHeight) {
method onInit (line 50) | onInit() {
method deriveDataFromProps (line 65) | deriveDataFromProps(nextProps) {
method didUnmount (line 83) | didUnmount() {
method attached (line 88) | attached() {
method detached (line 103) | detached() {
FILE: src/Sticky/props.ts
type IStickyProps (line 1) | interface IStickyProps {
FILE: src/SwipeAction/index.sjs.ts
function styleObjectToString (line 117) | function styleObjectToString(myStyle) {
function keys (line 232) | function keys(obj) {
FILE: src/SwipeAction/index.ts
function getIsOldVersion (line 76) | function getIsOldVersion() {
function getInitReady (line 84) | function getInitReady() {
method didMount (line 97) | didMount() {
method didUpdate (line 112) | didUpdate(prevProp) {
method setWidth (line 155) | setWidth() {
method setButtonItemWidth (line 171) | setButtonItemWidth() {
method getProps (line 186) | getProps() {
method initWidth (line 203) | initWidth(func?) {
method boundingClientRect (line 226) | boundingClientRect(id) {
method onTouchStart (line 233) | onTouchStart() {
method onTouchEnd (line 246) | onTouchEnd(e) {
method onChange (line 255) | onChange(e: any) {
method onSetCheck (line 319) | onSetCheck(isRight: boolean) {
method onTouchCancel (line 337) | onTouchCancel(e: any) {
method onChangeEnd (line 340) | onChangeEnd(e: any) {
method onSetSwipeRight (line 350) | onSetSwipeRight(x: number, needBack?: boolean) {
method onSetSwipeLeft (line 375) | onSetSwipeLeft(x: number, needBack?: boolean) {
method onSwipeLeft (line 401) | onSwipeLeft(isRight: boolean) {
method onSwipeRight (line 432) | onSwipeRight(isRight: boolean) {
method onItemTap (line 465) | onItemTap(e: any) {
FILE: src/SwipeAction/props.ts
type SwipeButton (line 2) | interface SwipeButton {
type SwipeData (line 11) | interface SwipeData {
type ISwipeActionProps (line 17) | interface ISwipeActionProps extends IBaseProps {
method onSwipeEnd (line 75) | onSwipeEnd() {}
method onSwipeStart (line 76) | onSwipeStart() {}
method onButtonTap (line 77) | onButtonTap() {}
FILE: src/SwipeAction/wechat.ts
function transformOptions (line 3) | function transformOptions(original) {
function transformProperties (line 46) | function transformProperties(props) {
FILE: src/Switch/index.ts
method onChange (line 9) | onChange(e) {
FILE: src/Switch/props.ts
type ISwitchProps (line 6) | interface ISwitchProps extends IBaseProps {
FILE: src/TabBar/index.ts
method onChange (line 8) | onChange(e) {
FILE: src/TabBar/props.ts
type ITabItem (line 4) | interface ITabItem {
type ITabBarProps (line 32) | interface ITabBarProps extends IBaseProps {
FILE: src/Table/index.ts
method init (line 32) | async init() {
method renderColumns (line 52) | renderColumns(columns, windowWidth, renderRule: RenderRuleProps = {}) {
method renderRows (line 66) | renderRows(dataSource, windowWidth, renderRule: RenderRuleProps = {}) {
method handleSort (line 104) | async handleSort(e) {
method handleTouchMove (line 142) | handleTouchMove() {
method handleScrollToUpper (line 147) | handleScrollToUpper() {
method getSysInfo (line 152) | async getSysInfo() {
method onInit (line 159) | onInit() {
method didUpdate (line 162) | didUpdate(prevProps) {
method created (line 175) | created() {
FILE: src/Table/props.ts
type ITableProps (line 1) | interface ITableProps {
type RenderRuleProps (line 8) | interface RenderRuleProps {
FILE: src/Tabs/index.ts
method getInstance (line 20) | getInstance() {
method get$Id (line 26) | get$Id() {
method getBoundingClientRect (line 29) | async getBoundingClientRect(query: string) {
method updateFade (line 32) | async updateFade() {
method updateScroll (line 50) | async updateScroll() {
method onScroll (line 123) | async onScroll(e) {
method onChange (line 132) | onChange(e) {
method didMount (line 157) | didMount() {
method didUpdate (line 160) | didUpdate(prevProps, prevData) {
method attached (line 168) | attached() {
FILE: src/Tabs/props.ts
type ITabsProps (line 3) | interface ITabsProps extends IBaseProps {
FILE: src/Tag/props.ts
type ITagProps (line 6) | interface ITagProps extends IBaseProps {
FILE: src/Terms/index.ts
method dealAllCountdown (line 21) | dealAllCountdown(val) {
method dealCountdown (line 35) | dealCountdown(timeNum, index) {
method onCheckChange (line 67) | onCheckChange(value) {
method onTermPrefixTap (line 81) | onTermPrefixTap() {
method onTermTap (line 89) | onTermTap(event) {
method onButtonTap (line 94) | onButtonTap(event) {
method onReadSwiperTap (line 100) | onReadSwiperTap(event) {
method onReadChange (line 105) | onReadChange(event) {
method onInit (line 118) | onInit() {
method deriveDataFromProps (line 131) | async deriveDataFromProps(nextProps) {
method attached (line 146) | attached() {
FILE: src/Terms/props.ts
type Button (line 4) | interface Button extends IButtonProps {
type Term (line 10) | interface Term {
type Type (line 16) | type Type = '' | 'check' | 'read';
type IProps (line 18) | interface IProps extends IBaseProps {
FILE: src/Toast/index.ts
method closeMask (line 16) | closeMask() {
method handleShowToast (line 28) | handleShowToast() {
method handleClickMask (line 39) | handleClickMask() {
method onAnimationEnd (line 48) | onAnimationEnd() {
method didUpdate (line 57) | didUpdate(prev) {
method didMount (line 65) | didMount() {
method attached (line 89) | attached() {
FILE: src/Toast/props.ts
type EnumToastType (line 6) | type EnumToastType = 'success' | 'warning' | 'error' | 'loading' | 'alip...
type EnumTextType (line 11) | type EnumTextType = 'short' | 'long';
type IToastProps (line 13) | interface IToastProps extends IBaseProps {
FILE: src/Typography/index.sjs.ts
function isUrl (line 1) | function isUrl(string) {
function getFontWeight (line 8) | function getFontWeight(fontWeight, phonemodel) {
function isiOS (line 26) | function isiOS(phonemodel) {
FILE: src/Typography/index.ts
method onTap (line 13) | onTap(e) {
method catchTap (line 21) | catchTap(e) {
method onInit (line 31) | onInit() {
method attached (line 39) | attached() {
FILE: src/Typography/props.ts
type ITypographyProps (line 3) | interface ITypographyProps extends IBaseProps {
FILE: src/Voucher/index.ts
method getCurTapVoucher (line 11) | getCurTapVoucher(event) {
method handleVoucherTap (line 18) | handleVoucherTap(e) {
method handleBtnTap (line 21) | handleBtnTap(e) {
FILE: src/Voucher/props.ts
type ActionAreaInfo (line 1) | interface ActionAreaInfo {
type Item (line 7) | interface Item {
type IVoucherProps (line 17) | interface IVoucherProps {
FILE: src/_locale/index.ts
type Locale (line 1) | interface Locale {
FILE: src/_util/assert-component2.ts
function assertComponent2 (line 1) | function assertComponent2() {
FILE: src/_util/base.ts
type IBaseProps (line 1) | interface IBaseProps {
type IconType (line 13) | type IconType = string;
type IBoundingClientRect (line 15) | interface IBoundingClientRect {
FILE: src/_util/compareVersion.ts
function compareVersion (line 1) | function compareVersion(v1: string, v2: string): number {
FILE: src/_util/console.ts
type EComponents (line 1) | enum EComponents {
type TComponents (line 63) | type TComponents = keyof typeof EComponents;
method warn (line 66) | warn(component: TComponents, message: string): void {
method error (line 71) | error(component: TComponents, message: string): void {
FILE: src/_util/dayjs/iso-weekday.ts
function isoWeekday (line 6) | function isoWeekday(day: Dayjs): number {
FILE: src/_util/event.sjs.ts
function disableScrollEvent (line 1) | function disableScrollEvent(event) {
function enableScrollEvent (line 5) | function enableScrollEvent(event) {
FILE: src/_util/flattenObject.ts
function flattenObject (line 1) | function flattenObject(obj, parentKey = '', result = {}) {
FILE: src/_util/fmtEvent.ts
function fmtEvent (line 2) | function fmtEvent(
FILE: src/_util/get.ts
function get (line 1) | function get(obj, path, defaultValue?) {
FILE: src/_util/isPropsEmpty.sjs.ts
function isPropsEmpty (line 1) | function isPropsEmpty(propsValue) {
FILE: src/_util/jsapi/base.ts
type JSAPIImpl (line 3) | interface JSAPIImpl<T, A> {
function implJsapi (line 8) | function implJsapi<T, A>(impl: JSAPIImpl<T, A>) {
FILE: src/_util/jsapi/choose-image.ts
type Files (line 3) | type Files = {
type ChooseImageResult (line 8) | interface ChooseImageResult {
type ChooseImageOptions (line 15) | interface ChooseImageOptions {
FILE: src/_util/jsapi/get-instance-bounding-client-rect.ts
function getInstanceBoundingClientRect (line 1) | function getInstanceBoundingClientRect(instance: any, selector: string) {
function getAllInstanceBoundingClientRect (line 17) | function getAllInstanceBoundingClientRect(
FILE: src/_util/jsapi/get-system-info.ts
type SystemInfo (line 3) | interface SystemInfo {
FILE: src/_util/jsapi/load-font-face.ts
type LoadFontOptions (line 3) | interface LoadFontOptions {
FILE: src/_util/platform.ts
function supportUndefinedProperty (line 3) | function supportUndefinedProperty(): boolean {
function platform (line 13) | function platform() {
function resolveEventValue (line 27) | function resolveEventValue(value) {
function resolveEventValues (line 38) | function resolveEventValues(args1: any, args2?: any, ...rest) {
function isOldSDKVersion (line 49) | function isOldSDKVersion() {
FILE: src/_util/promisify.ts
function promisifyMy (line 4) | function promisifyMy(name: string) {
type TempFile (line 18) | interface TempFile {
type ChooseImage (line 29) | interface ChooseImage {
type ChooseVideo (line 36) | interface ChooseVideo {
type ChooseFileFromDisk (line 45) | interface ChooseFileFromDisk {
type UploadFile (line 50) | interface UploadFile {
type GetFileInfo (line 56) | interface GetFileInfo {
type DownloadFile (line 61) | interface DownloadFile {
FILE: src/_util/set.ts
function set (line 1) | function set(obj, path, value) {
FILE: src/_util/simply.ts
function removeNullProps (line 3) | function removeNullProps(props) {
function buildProperties (line 13) | function buildProperties(props) {
function mergeDefaultProps (line 36) | function mergeDefaultProps(defaultProps: Record<string, any> = {}) {
type ComponentInstance (line 46) | type ComponentInstance<Props, Methods, Data, Mixins, InstanceMethods> = ...
type IComponentOptions (line 49) | interface IComponentOptions {
type ExtendedInstanceMethods (line 54) | type ExtendedInstanceMethods = Partial<IComponentOptions> & Record<strin...
type TMapState (line 159) | type TMapState<S> = Record<string, (o: { store: S }) => unknown>;
type TStoreOptions (line 162) | type TStoreOptions<S, M extends TMapState<S>> = {
type TStoreInitOptions (line 179) | type TStoreInitOptions<S> = {
class StoreBinder (line 184) | class StoreBinder<S, M extends TMapState<S>> {
method constructor (line 186) | constructor(private storeOptions: TStoreOptions<S, M>) {}
method init (line 191) | init(theThis: TStoreInitOptions<S>) {
method dispose (line 208) | dispose() {
function ComponentImpl (line 215) | function ComponentImpl<
type IPlatformEvent (line 259) | interface IPlatformEvent {
function triggerEvent (line 268) | function triggerEvent(
function triggerEventOnly (line 290) | function triggerEventOnly(instance: any, eventName: string, e?: any) {
function triggerEventValues (line 307) | function triggerEventValues(
function triggerCatchEvent (line 329) | function triggerCatchEvent(instance: any, eventName: string, e?: any) {
function getValueFromProps (line 342) | function getValueFromProps(instance: any, propName?: string | string[]) {
FILE: src/_util/store.ts
class SharedStore (line 5) | class SharedStore {
method switchLocale (line 15) | switchLocale(locale: Locale) {
method switchTheme (line 22) | switchTheme(theme: 'light' | 'dark') {
FILE: src/_util/support.ts
function isAilpayNative (line 1) | function isAilpayNative() {
function isSupport (line 9) | function isSupport(componentName) {
function assertAilpayNativeNotSupport (line 21) | function assertAilpayNativeNotSupport(componentName) {
FILE: src/mixins/computed.ts
function computedData (line 5) | function computedData(this: any) {
method didMount (line 36) | didMount(): void {
method didUpdate (line 39) | didUpdate(): void {
method attached (line 45) | attached(): void {
FILE: src/mixins/value.ts
function equal (line 4) | function equal(a, b) {
method onInit (line 50) | onInit() {
method deriveDataFromProps (line 53) | deriveDataFromProps(nextProps) {
method didUpdate (line 60) | didUpdate(prevProps) {
method didMount (line 70) | didMount() {
method created (line 79) | created() {
method attached (line 90) | attached() {
method init (line 104) | init() {
method getValue (line 125) | getValue(prevData?) {
method isEqualValue (line 128) | isEqualValue(prevData) {
method isControlled (line 134) | isControlled() {
method updateControlled (line 146) | updateControlled() {
method update (line 153) | update(val, extra?, ...args) {
FILE: tests/alipay/Calendar/__tests__/calendar.spec.ts
method onFormatter (line 48) | onFormatter() {
function extendInstance (line 145) | function extendInstance(instance: TestInstance) {
function lastClickDate (line 229) | function lastClickDate(args: [number | [number, number]] | undefined) {
FILE: tests/alipay/Calendar/__tests__/testUtils.ts
function getSelectedDay (line 5) | function getSelectedDay(data: { monthList: { cells: CellState[] }[] }) {
function sleep (line 20) | function sleep(time) {
function findDate (line 26) | function findDate(monthCells: CellState[], date: Dayjs) {
class SelectorQuery (line 32) | class SelectorQuery {
method select (line 33) | select() {
method boundingClientRect (line 36) | boundingClientRect() {
method exec (line 39) | exec(callback: (ret) => void) {
function initCalendar (line 50) | function initCalendar(props: Partial<ICalendarProps>) {
FILE: tests/alipay/Calendar/__tests__/utils.spec.ts
function checkDates (line 49) | function checkDates(month: Dayjs, start: 'Monday' | 'Sunday') {
FILE: tests/alipay/Checkbox/CheckboxGroup/index.spec.ts
function clickIndex (line 4) | async function clickIndex(instance: TestInstance, index: number) {
FILE: tests/alipay/Checklist/__tests__/index.test.ts
method canIUse (line 16) | canIUse() {
method canIUse (line 37) | canIUse() {
method canIUse (line 59) | canIUse() {
FILE: tests/alipay/Collapse/index.test.ts
function createCollapse (line 7) | function createCollapse(props: Partial<ICollapseProps>, mock: MockSelect) {
FILE: tests/alipay/DatePicker/RangePicker/index.test.ts
function getColumnText (line 249) | async function getColumnText(
FILE: tests/alipay/DatePicker/RangePicker/utils.ts
function callVisibleChange (line 21) | async function callVisibleChange(visible) {
method currentDate (line 39) | currentDate() {
FILE: tests/alipay/DatePicker/index.test.ts
function getColumnText (line 216) | async function getColumnText(precision: string) {
FILE: tests/alipay/DatePicker/utils.ts
function callVisibleChange (line 19) | async function callVisibleChange(visible) {
function changeSelect (line 24) | async function changeSelect(value) {
function callOk (line 29) | async function callOk() {
FILE: tests/alipay/Form/FormCascaderPicker/index.test.ts
function createFormCascaderPicker (line 8) | function createFormCascaderPicker(props: Partial<FormCascaderPickerProps...
FILE: tests/alipay/Form/FormCheckboxGroup/index.test.ts
function createFormCheckboxGroup (line 8) | function createFormCheckboxGroup(props: Partial<FormCheckboxGroupProps>) {
FILE: tests/alipay/Form/FormDatePicker/index.test.ts
function createFormDatePicker (line 8) | function createFormDatePicker(props: Partial<FormDatePickerProps>) {
FILE: tests/alipay/Form/FormImageUpload/index.test.ts
function createFormImageUpload (line 7) | function createFormImageUpload(props: Partial<FormImageUploadProps>) {
FILE: tests/alipay/Form/FormInput/index.test.ts
function createFormInput (line 8) | function createFormInput(props: Partial<FormInputProps>) {
FILE: tests/alipay/Form/FormPicker/index.test.ts
function createFormPicker (line 8) | function createFormPicker(props: Partial<FormPickerProps>) {
FILE: tests/alipay/Form/FormRadioGroup/index.test.ts
function createFormRadioGroup (line 8) | function createFormRadioGroup(props: Partial<FormRadioGroupProps>) {
FILE: tests/alipay/Form/FormRangePicker/index.test.ts
function createFormRangePicker (line 8) | function createFormRangePicker(props: Partial<FormRangePickerProps>) {
FILE: tests/alipay/Form/FormRate/index.test.ts
function createFormRate (line 8) | function createFormRate(props: Partial<FormRateProps>) {
FILE: tests/alipay/Form/FormSelector/index.test.ts
function createFormSelector (line 8) | function createFormSelector(props: Partial<FormSelectorProps>) {
FILE: tests/alipay/Form/FormSlider/index.test.ts
function createFormSlider (line 8) | function createFormSlider(props: Partial<FormSliderProps>) {
FILE: tests/alipay/Form/FormStepper/index.test.ts
function createFormStepper (line 8) | function createFormStepper(props: Partial<FormStepperProps>) {
FILE: tests/alipay/Form/FormSwitch/index.test.ts
function createFormSwitch (line 8) | function createFormSwitch(props: Partial<FormSwitchProps>) {
FILE: tests/alipay/Form/FormTextarea/index.test.ts
function createFormTextarea (line 8) | function createFormTextarea(props: Partial<FormTextareaProps>) {
FILE: tests/alipay/Form/utils.ts
function createForm (line 5) | function createForm(formConfig?: FormConfig): Form {
FILE: tests/alipay/GuideTour/index.test.ts
method canIUse (line 8) | canIUse() {
FILE: tests/alipay/ImageUpload/helper.ts
function createImageUpload (line 4) | function createImageUpload(props = {}) {
function callChooseImage (line 52) | async function callChooseImage(instance) {
function removeUid (line 57) | function removeUid(files) {
function removeFileUid (line 61) | function removeFileUid(file) {
function expectData (line 68) | async function expectData(instance, expectData) {
function callOnPreview (line 72) | async function callOnPreview(instance, index: number) {
function callOnRemove (line 85) | async function callOnRemove(instance, index: number) {
FILE: tests/alipay/Input/common.ts
function textInputAndTextArea (line 4) | function textInputAndTextArea(componentName: string, defaultProps) {
FILE: tests/alipay/NoticeBar/index.test.ts
method canIUse (line 11) | canIUse() {
method createSelectorQuery (line 14) | createSelectorQuery() {
FILE: tests/alipay/NumberKeyboard/index.spec.ts
function createNumberKeyboard (line 5) | function createNumberKeyboard(
FILE: tests/alipay/Pagination/index.test.ts
function createPagination (line 5) | function createPagination(props, myOverride?: Record<string, any>) {
FILE: tests/alipay/Picker/CascaderPicker/__tests__/utils.ts
function createCascaderPicker (line 5) | function createCascaderPicker(
FILE: tests/alipay/Picker/__tests__/utils.ts
function createPicker (line 5) | function createPicker(
FILE: tests/alipay/Popover/__tests__/index.test.ts
method canIUse (line 6) | canIUse() {
method getSystemInfo (line 9) | getSystemInfo({ success }) {
method createSelectorQuery (line 15) | createSelectorQuery() {
FILE: tests/alipay/Popup/index.test.ts
function createPopupInstance (line 4) | function createPopupInstance(props: any, SDKVersion?: string) {
FILE: tests/alipay/Progress/index.spec.ts
class MockCanvas (line 6) | class MockCanvas {
method constructor (line 8) | constructor(public id: string) {
method imageSmoothingEnabled (line 17) | set imageSmoothingEnabled(v: boolean) {
method lineWidth (line 20) | set lineWidth(width: number) {
method strokeStyle (line 23) | set strokeStyle(color: string) {
method imageSmoothingQuality (line 26) | set imageSmoothingQuality(color: string) {
method fakeCommand (line 29) | private fakeCommand(funcName) {
function createProgress (line 36) | function createProgress(props: Partial<IProgressBarProps>) {
FILE: tests/alipay/Radio/RadioGroup/utils.ts
function createRadioGroup (line 20) | function createRadioGroup(props: Partial<IRadioGroupProps>) {
FILE: tests/alipay/Radio/utils.ts
function createRadio (line 5) | function createRadio(props: IRadioProps) {
FILE: tests/alipay/RareWordsKeyboard/__tests__/index.test.ts
method loadFontFace (line 57) | loadFontFace() {
FILE: tests/alipay/Rate/index.test.ts
function getValueFromDate (line 4) | function getValueFromDate(instance) {
FILE: tests/alipay/Rate/utils.ts
function testRate (line 6) | function testRate(props: Partial<IRateProps>) {
FILE: tests/alipay/Selector/utils.ts
function createSelector (line 28) | function createSelector(props: Partial<ISelectorProps>) {
FILE: tests/alipay/Slider/__tests__/index.test.ts
function testSlider (line 5) | function testSlider(props, mock?: MockSelect): TestInstance {
function callStep (line 16) | async function callStep(
function touchEvent (line 44) | async function touchEvent(
FILE: tests/alipay/Stepper/__tests__/index.test.ts
method canIUse (line 8) | canIUse() {
function testMixinValue (line 66) | function testMixinValue(props, expectValue) {
method onChange (line 207) | onChange(value: number | null) {
method onChange (line 271) | onChange(value: number | null) {
method onFocus (line 377) | onFocus(value: number | null) {
method onChange (line 380) | onChange(value: number | null) {
method onConfirm (line 383) | onConfirm(value: number | null) {
method onBlur (line 386) | onBlur(value: number | null) {
method onBlur (line 436) | onBlur(value: number | null) {
FILE: tests/alipay/SwipeAction/index.spec.ts
method canIUse (line 15) | canIUse() {
method createSelectorQuery (line 18) | createSelectorQuery() {
FILE: tests/alipay/Switch/__tests__/index.test.ts
function testSwitch (line 4) | function testSwitch(props) {
FILE: tests/alipay/TabBar/__tests__/index.test.ts
method canIUse (line 7) | canIUse() {
FILE: tests/alipay/Tabs/index.test.ts
method canIUse (line 48) | canIUse() {
FILE: tests/alipay/Toast/index.spec.ts
method canIUse (line 7) | canIUse() {
FILE: tests/alipay/Typography/index.spec.ts
method canIUse (line 7) | canIUse() {
FILE: tests/selector-query.ts
type SelectorQueryCommand (line 1) | type SelectorQueryCommand =
type MockSelect (line 10) | type MockSelect = (selector: string, index: number) => any;
class SelectorQuery (line 12) | class SelectorQuery {
method commands (line 13) | get commands(): SelectorQueryCommand[] {
method constructor (line 16) | private constructor(
method select (line 21) | select(selector) {
method boundingClientRect (line 27) | boundingClientRect() {
method exec (line 33) | exec(callback) {
method extends (line 69) | static extends(selector: SelectorQuery, command: SelectorQueryCommand) {
method create (line 73) | static create(data: MockSelect) {
FILE: tests/utils.ts
type Instance (line 11) | interface Instance {
type TestInstance (line 36) | interface TestInstance {
function createInstance (line 46) | function createInstance(
function component2Patch (line 196) | function component2Patch(originalMy?: Record<string, any>) {
function getInstance (line 214) | function getInstance(
function runInMiniprogram (line 249) | function runInMiniprogram<T>(
type CompileResult (line 275) | interface CompileResult {
function compileCode (line 284) | function compileCode(source: string): CompileResult {
function sleep (line 339) | function sleep(_time, ciNotSleepMore?: boolean) {
function callMethod (line 349) | async function callMethod(instance, name, value) {
function wrapValue (line 354) | function wrapValue(value: string) {
Condensed preview — 1560 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,503K chars).
[
{
"path": ".dumi/pages/index/index.tsx",
"chars": 221,
"preview": "/* .dumi/pages/index.tsx */\nimport HomeBaseLayout from '../../theme/layouts/HomePageLayout';\n\nconst CustomHomePage = () "
},
{
"path": ".dumi/pages/index-en/index.tsx",
"chars": 70,
"preview": "import CustomHomePage from '../index';\n\nexport default CustomHomePage;"
},
{
"path": ".dumi/theme/builtins/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": ".dumi/theme/builtins/HomeBaseLayout/components/Banner/index.tsx",
"chars": 8422,
"preview": "import { css } from '@emotion/react';\nimport Atropos from 'atropos/react';\nimport useLocaleValue from \"../../../../../th"
},
{
"path": ".dumi/theme/builtins/HomeBaseLayout/components/Frame/index.tsx",
"chars": 4751,
"preview": "import { css } from '@emotion/react';\nimport useLocaleValue from \"../../../../../theme/hooks/useLocaleValue\";\nimport use"
},
{
"path": ".dumi/theme/builtins/HomeBaseLayout/components/Gallery/ItemBox/index.tsx",
"chars": 2209,
"preview": "import { css } from '@emotion/react';\nimport useSiteToken from \"../../../../../../theme/hooks/useSiteToken\";\nimport useL"
},
{
"path": ".dumi/theme/builtins/HomeBaseLayout/components/Gallery/index.tsx",
"chars": 4053,
"preview": "import { css } from '@emotion/react';\nimport useLocaleValue from \"../../../../../theme/hooks/useLocaleValue\";\nimport use"
},
{
"path": ".dumi/theme/builtins/HomeBaseLayout/components/Notice/index.tsx",
"chars": 349,
"preview": "import useLocaleValue from \"../../../../../theme/hooks/useLocaleValue\";\n\nexport default ({ config }) => {\n const lang ="
},
{
"path": ".dumi/theme/builtins/HomeBaseLayout/components/Theme/index.tsx",
"chars": 7635,
"preview": "import { css } from '@emotion/react';\nimport Atropos from 'atropos/react';\nimport useLocaleValue from \"../../../../../th"
},
{
"path": ".dumi/theme/builtins/HomeBaseLayout/components/Title/index.tsx",
"chars": 830,
"preview": "import { css } from '@emotion/react';\nimport useSiteToken from \"../../../../../theme/hooks/useSiteToken\";\n\nconst useStyl"
},
{
"path": ".dumi/theme/builtins/HomeBaseLayout/components/Users/index.tsx",
"chars": 3822,
"preview": "import { css } from '@emotion/react';\nimport useLocaleValue from \"../../../../../theme/hooks/useLocaleValue\";\nimport use"
},
{
"path": ".dumi/theme/builtins/HomeBaseLayout/index.tsx",
"chars": 1636,
"preview": "import { css } from '@emotion/react';\nimport { useContext, type FC } from 'react';\nimport SiteContext from '../../slots/"
},
{
"path": ".dumi/theme/builtins/Icon.less",
"chars": 10553,
"preview": "@font-face {\n font-family: antdmini-icon;\n src: url(\"https://gw.alipayobjects.com/os/bmw-prod/578c472b-19a7-44ab-a"
},
{
"path": ".dumi/theme/builtins/Icon.tsx",
"chars": 4690,
"preview": "import React, { useState } from 'react';\nimport { Input } from 'antd';\nimport copy from 'copy-to-clipboard';\nimport { Fo"
},
{
"path": ".dumi/theme/builtins/OverviewCard.tsx",
"chars": 3889,
"preview": "import { css } from '@emotion/react';\nimport { Card, ConfigProvider, Tag, theme } from 'antd';\nimport { history, useLoca"
},
{
"path": ".dumi/theme/builtins/Previewer/index.less",
"chars": 785,
"preview": ".sourceCode {\n position: relative;\n height: calc(100vh - 200px);\n overflow: hidden;\n border-radius: 0 0 8px 8px;\n i"
},
{
"path": ".dumi/theme/builtins/Previewer/index.tsx",
"chars": 4179,
"preview": "import { Collapse, ConfigProvider } from 'antd';\nimport { FormattedMessage } from 'dumi';\nimport React, { useContext, us"
},
{
"path": ".dumi/theme/builtins/ResourceCard.less",
"chars": 929,
"preview": ".card {\n border: solid 1px #d9d9d9;\n border-radius: 12px;\n display: inline-flex;\n width: 360px;\n min-height: 108px;"
},
{
"path": ".dumi/theme/builtins/ResourceCard.tsx",
"chars": 547,
"preview": "import { FC } from 'react';\nimport './ResourceCard.less'\n\ntype Props = {\n image?: string;\n title: string;\n descriptio"
},
{
"path": ".dumi/theme/builtins/SourceCode/index.less",
"chars": 3591,
"preview": "@import (reference) '../../styles/variables.less';\n\n// override prism theme for dark mode\n@{dark-selector} {\n .token.do"
},
{
"path": ".dumi/theme/builtins/SourceCode/index.tsx",
"chars": 4877,
"preview": "import { ReactComponent as IconCheck } from '@ant-design/icons-svg/inline-svg/outlined/check.svg';\nimport { ReactCompone"
},
{
"path": ".dumi/theme/builtins/Table/index.less",
"chars": 1144,
"preview": "@import (reference) '../../styles/variables.less';\n\n.dumi-default-table {\n margin: 24px 0 32px;\n transform: translate("
},
{
"path": ".dumi/theme/builtins/Table/index.tsx",
"chars": 2900,
"preview": "import throttle from 'lodash.throttle';\nimport React, {\n ReactNode,\n useCallback,\n useContext,\n useEffect,\n useRef,"
},
{
"path": ".dumi/theme/builtins/code.html",
"chars": 5156,
"preview": "\n<!doctype html>\n<html>\n<head>\n <link rel=\"shortcut icon\" href=\"https://gw.alipayobjects.com/zos/rmsportal/wNkELvnLHXPA"
},
{
"path": ".dumi/theme/builtins/iframe.html",
"chars": 3675,
"preview": "<!doctype html>\n<html>\n\n<head>\n <link rel=\"shortcut icon\" href=\"https://gw.alipayobjects.com/zos/rmsportal/wNkELvnLHXPA"
},
{
"path": ".dumi/theme/common/CommonHelmet.tsx",
"chars": 846,
"preview": "import { Helmet, useRouteMeta } from 'dumi';\nimport { useMemo } from 'react';\nimport useLocaleValue from '../hooks/useLo"
},
{
"path": ".dumi/theme/common/EditLink.tsx",
"chars": 775,
"preview": "import { useRouteMeta, useIntl, FormattedMessage } from 'dumi';\nimport { EditOutlined } from '@ant-design/icons';\nimport"
},
{
"path": ".dumi/theme/common/GlobalStyles.tsx",
"chars": 465,
"preview": "import React from 'react';\nimport {\n Common,\n DumiDefaultStyleOverride,\n HeadingAnchor,\n Highlight,\n Markdown,\n Re"
},
{
"path": ".dumi/theme/common/LastUpdated.tsx",
"chars": 1623,
"preview": "// 最后更新时间\nimport React, { useEffect, useState } from 'react';\nimport { css } from '@emotion/react';\nimport { FormattedMe"
},
{
"path": ".dumi/theme/common/Loading/index.tsx",
"chars": 1501,
"preview": "import React, { useCallback } from 'react';\nimport { Skeleton, Space, Spin } from 'antd';\nimport { useLocation } from 'd"
},
{
"path": ".dumi/theme/common/PrevAndNext.tsx",
"chars": 4726,
"preview": "import { LeftOutlined, RightOutlined } from '@ant-design/icons';\nimport { ClassNames, css } from '@emotion/react';\nimpor"
},
{
"path": ".dumi/theme/common/Sim/index.less",
"chars": 1887,
"preview": ".previewer {\n position: fixed;\n top: calc((100% - 633px + 60px) / 2);\n right: 24px;\n width: 292px;\n height: 633px;\n"
},
{
"path": ".dumi/theme/common/Sim/index.tsx",
"chars": 5838,
"preview": "import { css } from '@emotion/react';\nimport { useMatchedRoute } from 'dumi';\nimport React, { useContext, useEffect, use"
},
{
"path": ".dumi/theme/common/ThemeSwitch/ThemeIcon.tsx",
"chars": 1235,
"preview": "import Icon from '@ant-design/icons';\nimport React from 'react';\n\nconst ThemeIcon: React.FC<{ className?: string }> = (p"
},
{
"path": ".dumi/theme/common/ThemeSwitch/index.tsx",
"chars": 1462,
"preview": "import { FloatButton } from 'antd';\nimport { CompactTheme, DarkTheme } from 'antd-token-previewer/lib/icons';\nimport { F"
},
{
"path": ".dumi/theme/common/config/overview.ts",
"chars": 16905,
"preview": "export const ComponentSampleImages = {\n light: {\n 'default': {\n imageUrl:\n 'https://mdn.alipayobjects.co"
},
{
"path": ".dumi/theme/common/styles/Common.tsx",
"chars": 1071,
"preview": "import { css, Global } from '@emotion/react';\nimport useSiteToken from '../../hooks/useSiteToken';\n\nexport default () =>"
},
{
"path": ".dumi/theme/common/styles/DumiDefaultStyleOverride.tsx",
"chars": 1851,
"preview": "import { css, Global } from '@emotion/react';\nimport useSiteToken from '../../hooks/useSiteToken';\n\nconst PREFERS_COLOR_"
},
{
"path": ".dumi/theme/common/styles/HeadingAnchor.tsx",
"chars": 813,
"preview": "import { css, Global } from '@emotion/react';\n\nexport default () => (\n <Global\n styles={css`\n h1,\n h2,\n "
},
{
"path": ".dumi/theme/common/styles/Highlight.tsx",
"chars": 3533,
"preview": "import { css, Global } from '@emotion/react';\nimport useSiteToken from '../../hooks/useSiteToken';\n\nexport default () =>"
},
{
"path": ".dumi/theme/common/styles/Markdown.tsx",
"chars": 11208,
"preview": "import { TinyColor } from '@ctrl/tinycolor';\nimport { css, Global } from '@emotion/react';\nimport useSiteToken from '../"
},
{
"path": ".dumi/theme/common/styles/PreviewImage.tsx",
"chars": 4625,
"preview": "import { css, Global } from '@emotion/react';\nimport useSiteToken from '../../hooks/useSiteToken';\n\nexport default () =>"
},
{
"path": ".dumi/theme/common/styles/Reset.tsx",
"chars": 761,
"preview": "import { css, Global } from '@emotion/react';\n\nexport default () => (\n <Global\n styles={css`\n body,\n div,\n"
},
{
"path": ".dumi/theme/common/styles/Responsive.tsx",
"chars": 7709,
"preview": "import { css, Global } from '@emotion/react';\nimport useSiteToken from '../../hooks/useSiteToken';\n\nexport default () =>"
},
{
"path": ".dumi/theme/common/styles/SearchBar.tsx",
"chars": 1530,
"preview": "import { css, Global } from '@emotion/react';\nimport useSiteToken from '../../hooks/useSiteToken';\n\nconst THEME_PREFIX ="
},
{
"path": ".dumi/theme/common/styles/index.ts",
"chars": 498,
"preview": "export { default as Common } from './Common';\nexport { default as DumiDefaultStyleOverride } from './DumiDefaultStyleOve"
},
{
"path": ".dumi/theme/defineThemeConfig/index.ts",
"chars": 296,
"preview": "import type { IAllThemeConfig } from '../types';\n\n/**\n * @description provider declaration of config files\n * @param {Th"
},
{
"path": ".dumi/theme/global.d.ts",
"chars": 75,
"preview": "interface Window {\n setMsgToSim?: (miniCode: string) => void; // 像模拟器通信\n}\n"
},
{
"path": ".dumi/theme/hooks/useAdditionalThemeConfig.ts",
"chars": 411,
"preview": "// 获取 dumi-theme-antd 额外的配置\nimport { useSiteData } from 'dumi';\n\nimport type { IAllThemeConfig } from '../types';\n\ninter"
},
{
"path": ".dumi/theme/hooks/useLocaleValue.ts",
"chars": 369,
"preview": "import { useLocale, useSiteData } from 'dumi';\nimport type { IAllThemeConfig } from '../types';\n\nexport default function"
},
{
"path": ".dumi/theme/hooks/useMenu.tsx",
"chars": 8095,
"preview": "import type { MenuProps } from 'antd';\nimport { Tag } from 'antd';\nimport {\n Link,\n useFullSidebarData,\n useLocale,\n "
},
{
"path": ".dumi/theme/hooks/useSiteToken.ts",
"chars": 2101,
"preview": "import { TinyColor } from '@ctrl/tinycolor';\nimport { theme } from 'antd';\nimport type { GlobalToken } from 'antd';\nimpo"
},
{
"path": ".dumi/theme/hooks/uselocale.ts",
"chars": 429,
"preview": "import { useLocale as useDumiLocale } from 'dumi';\n\nexport interface LocaleMap<Key extends string> {\n cn: Record<Key, s"
},
{
"path": ".dumi/theme/index.ts",
"chars": 178,
"preview": "import Footer from './slots/Footer';\nimport Loading from './common/Loading';\nimport HomeBaseLayout from './builtins/Home"
},
{
"path": ".dumi/theme/layouts/DocLayout/index.tsx",
"chars": 2884,
"preview": "import { css } from '@emotion/react';\nimport { Helmet, Outlet, useLocale, useLocation, useOutlet, useRouteMeta, useSiteD"
},
{
"path": ".dumi/theme/layouts/GlobalLayout.tsx",
"chars": 5570,
"preview": "import {\n createCache,\n extractStyle,\n legacyNotSelectorLinter,\n logicalPropertiesLinter,\n parentSelectorLinter,\n "
},
{
"path": ".dumi/theme/layouts/HomePageLayout/index.tsx",
"chars": 193,
"preview": "import React from 'react';\nimport HomeBaseLayout from '../../builtins/HomeBaseLayout';\n\nconst HomePageLayout: React.FC ="
},
{
"path": ".dumi/theme/layouts/SidebarLayout/index.tsx",
"chars": 636,
"preview": "import { css } from '@emotion/react';\nimport type { FC, PropsWithChildren } from 'react';\nimport CommonHelmet from '../."
},
{
"path": ".dumi/theme/locales/en.json",
"chars": 625,
"preview": "{\n \"app.not-found.back-home\": \"Back to home page\",\n \"app.not-found.subTitle\": \"Sorry, the page you visited does not ex"
},
{
"path": ".dumi/theme/locales/zh-CN.json",
"chars": 471,
"preview": "{\n \"app.not-found.back-home\": \"返回首页\",\n \"app.not-found.subTitle\": \"你访问的页面貌似不存在?\",\n \"app.theme.switch\": \"切换主题\",\n \"app."
},
{
"path": ".dumi/theme/plugin/index.ts",
"chars": 471,
"preview": "import type { IApi } from 'dumi';\n\nexport default (api: IApi) => {\n api.describe({\n // eslint-disable-next-line @typ"
},
{
"path": ".dumi/theme/plugin/techStack.ts",
"chars": 3464,
"preview": "import type { IApi } from 'dumi';\nimport { winPath } from 'dumi/plugin-utils';\nimport type { IDumiTechStack } from 'dumi"
},
{
"path": ".dumi/theme/plugin.ts",
"chars": 4381,
"preview": "/* eslint-disable import/no-extraneous-dependencies */\n/* eslint-disable no-param-reassign */\nimport { cache } from '@em"
},
{
"path": ".dumi/theme/slots/Content/DocAnchor.tsx",
"chars": 3524,
"preview": "import { css } from '@emotion/react';\nimport { Anchor } from 'antd';\nimport type { AnchorLinkItemProps } from 'antd/es/a"
},
{
"path": ".dumi/theme/slots/Content/InViewSuspense.tsx",
"chars": 722,
"preview": "import { Skeleton } from 'antd';\nimport React, { Suspense } from 'react';\nimport type { IntersectionObserverProps } from"
},
{
"path": ".dumi/theme/slots/Content/index.tsx",
"chars": 6872,
"preview": "import { CalendarOutlined } from '@ant-design/icons';\nimport { css } from '@emotion/react';\nimport { Col, message, Space"
},
{
"path": ".dumi/theme/slots/Footer/index.tsx",
"chars": 2898,
"preview": "import { TinyColor } from '@ctrl/tinycolor';\nimport { css } from '@emotion/react';\nimport RcFooter from 'rc-footer';\nimp"
},
{
"path": ".dumi/theme/slots/Header/HeaderExtral.tsx",
"chars": 2868,
"preview": "import { GithubOutlined } from '@ant-design/icons';\nimport { css } from '@emotion/react';\nimport { Tooltip } from 'antd'"
},
{
"path": ".dumi/theme/slots/Header/Logo.tsx",
"chars": 2385,
"preview": "/* eslint-disable react/jsx-closing-tag-location */\nimport { css } from '@emotion/react';\nimport { Link, useLocale, useL"
},
{
"path": ".dumi/theme/slots/Header/More.tsx",
"chars": 988,
"preview": "import { DownOutlined } from '@ant-design/icons';\nimport type { MenuProps } from 'antd';\nimport { Button, Dropdown } fro"
},
{
"path": ".dumi/theme/slots/Header/Navigation.tsx",
"chars": 8704,
"preview": "import { MenuFoldOutlined } from '@ant-design/icons';\nimport { css } from '@emotion/react';\nimport { Player } from '@gal"
},
{
"path": ".dumi/theme/slots/Header/SwitchBtn.tsx",
"chars": 3178,
"preview": "import { css } from '@emotion/react';\nimport { Tooltip } from 'antd';\nimport React from 'react';\nimport useSiteToken fro"
},
{
"path": ".dumi/theme/slots/Header/index.tsx",
"chars": 6708,
"preview": "/* eslint-disable import/no-unresolved */\nimport { MenuOutlined } from '@ant-design/icons';\nimport { ClassNames, css } f"
},
{
"path": ".dumi/theme/slots/LangSwitch/index.tsx",
"chars": 2639,
"preview": "// 多语言切换\nimport { Select } from 'antd';\nimport { history, useIntl, useLocale, useLocation, useSearchParams, useSiteData "
},
{
"path": ".dumi/theme/slots/NotFound/index.tsx",
"chars": 859,
"preview": "import { HomeOutlined } from '@ant-design/icons';\nimport { Button, Result } from 'antd';\nimport { FormattedMessage, Link"
},
{
"path": ".dumi/theme/slots/Sidebar/index.tsx",
"chars": 10217,
"preview": "import { UnorderedListOutlined } from '@ant-design/icons';\nimport { css } from '@emotion/react';\nimport { Col, ConfigPro"
},
{
"path": ".dumi/theme/slots/SiteContext.ts",
"chars": 660,
"preview": "import type { DirectionType } from 'antd/lib/config-provider';\nimport { createContext } from 'react';\nimport type { Them"
},
{
"path": ".dumi/theme/static/style.ts",
"chars": 38,
"preview": "import 'rc-footer/assets/index.less';\n"
},
{
"path": ".dumi/theme/styles/variables.less",
"chars": 1312,
"preview": "@prefix: dumi-theme-antd;\n\n@s-content-width: 1392px;\n@s-content-padding: 48px;\n@s-sidebar-width: 184px;\n@s-header-height"
},
{
"path": ".dumi/theme/types.ts",
"chars": 3073,
"preview": "import type { SerializedStyles } from '@emotion/react';\nimport type { IThemeConfig } from 'dumi/dist/client/theme-api/ty"
},
{
"path": ".dumi/theme/utils.ts",
"chars": 3023,
"preview": "import { history, useSiteData } from 'dumi';\nimport type { ISidebarGroup } from 'dumi/dist/client/theme-api/types';\n\ntyp"
},
{
"path": ".dumi/tsconfig.json",
"chars": 698,
"preview": "{\n \"compilerOptions\": {\n \"strictNullChecks\": true,\n \"module\": \"esnext\",\n \"moduleResolution\": \"node\",\n \"decl"
},
{
"path": ".dumirc.ts",
"chars": 17531,
"preview": "import { defineConfig } from 'dumi';\nimport { defineThemeConfig } from './.dumi/theme/defineThemeConfig';\n\nexport defaul"
},
{
"path": ".editorconfig",
"chars": 245,
"preview": "# http://editorconfig.org\nroot = true\n\n[*]\nindent_style = space\nindent_size = 2\nend_of_line = lf\ncharset = utf-8\ntrim_tr"
},
{
"path": ".eslintignore",
"chars": 106,
"preview": "es/**\ndemo/es/**\nplugin/**\nsrc/.umi/**\nsrc/.umi-production/**\ndist/**\ndocs-dist/**\nnode_modules\ncompiled/\n"
},
{
"path": ".eslintrc",
"chars": 611,
"preview": "{\n \"env\": {\n \"node\": true\n },\n \"globals\": {\n \"wx\": true,\n \"my\": true,\n \"App\": true,\n \"Component\": true"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 645,
"preview": "---\nname: Bug Report\nabout: Bug Report\n---\n\n<!--\n在提交 bug 之前,请参考以下问题排查方式,或许对你会有所帮助:\n👉 查看你的 package.json 中是否使用最新版本的 antd-m"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request_template.md",
"chars": 186,
"preview": "---\nname: 功能优化需求\nabout: 期望组件增强的功能需求\nlabels: enhancement\n\n---\n\n## 背景\n<!-- 请描述你所遇到的问题现状 --> \n\n\n## 期望\n<!-- 请描述你所希望添加的功能 -->"
},
{
"path": ".github/contributing.md",
"chars": 683,
"preview": "---\ntoc: false\n---\n\n## 参与 antd-mini 建设\n\nantd-mini 的发展离不开社区的每一位用户,这里有一些信息可以帮助你参与共建。\n\n### 项目运作流程\n\n### issue\n\n如果你有组件库的相关使用问"
},
{
"path": ".github/dependabot.yml",
"chars": 522,
"preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
},
{
"path": ".github/pull_requeset_template.md",
"chars": 387,
"preview": "---\nname: Pull Request\nabout: Pull Request\n---\n\n## 概要\n\n<!-- 告诉 CR 者为什么要改?(如:Issue 地址、需求概述、需求链接) -->\n<!-- 如果改动过于复杂,需要贴出改动"
},
{
"path": ".github/workflows/chatgpt_code_review.yaml",
"chars": 390,
"preview": "name: ChatGPT Code Review\n\npermissions:\n contents: read\n pull-requests: write\n\non:\n pull_request:\n types: [opened,"
},
{
"path": ".github/workflows/preview.yml",
"chars": 515,
"preview": "name: 🔂 Surge PR Preview\n\non: [pull_request]\n\njobs:\n preview:\n runs-on: ubuntu-latest\n steps:\n - uses: actio"
},
{
"path": ".github/workflows/pull_request.yml",
"chars": 511,
"preview": "name: pull_request ci\n\non: [push, pull_request]\n\njobs:\n build:\n runs-on: ubuntu-latest\n steps:\n - uses: acti"
},
{
"path": ".github/workflows/real_release.yml",
"chars": 4593,
"preview": "# 在 PR 的评论中回复 `/release [dist-tag]` 可以进行本次发布,如 `/release beta`\n# 可不填参数直接评论 `/release`,默认发布到 latest\n\nname: Release By PR "
},
{
"path": ".github/workflows/release.yml",
"chars": 3320,
"preview": "name: Release\n\non:\n workflow_dispatch:\n inputs:\n version:\n description: 'The version you want to release"
},
{
"path": ".github/workflows/release_candidate.yml",
"chars": 2837,
"preview": "name: Release Candidate\n\non:\n workflow_dispatch:\n inputs:\n ref:\n description: 'A valid branch or commit "
},
{
"path": ".gitignore",
"chars": 856,
"preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/npm"
},
{
"path": ".prettierignore",
"chars": 41,
"preview": "**/*.svg\n**/*.ejs\n**/*.html\npackage.json\n"
},
{
"path": ".prettierrc",
"chars": 499,
"preview": "{\n \"overrides\": [\n {\n \"files\": \"*.axml\",\n \"options\": {\n \"parser\": \"html\",\n \"printWidth\": 80,"
},
{
"path": ".stylelintrc",
"chars": 969,
"preview": "{\n \"extends\": \"stylelint-config-standard\",\n \"rules\": {\n at-rule-empty-line-before: null,\n at-rule-name-space-aft"
},
{
"path": "CHANGELOG.md",
"chars": 206685,
"preview": "### Changelog\n\nAll notable changes to this project will be documented in this file. Dates are displayed in UTC.\n\nGenerat"
},
{
"path": "LICENSE",
"chars": 1072,
"preview": "MIT License\n\nCopyright (c) 2022 Ant Design Team\n\nPermission is hereby granted, free of charge, to any person obtaining a"
},
{
"path": "README.md",
"chars": 2903,
"preview": "<div align=\"center\">\n <img src=\"https://mdn.alipayobjects.com/huamei_2jrq4g/afts/img/A*xfx9Q4kg62MAAAAAAAAAAAAADtF8AQ/o"
},
{
"path": "config/alipay/.act.config.json",
"chars": 38,
"preview": "{\n \"type\": \"app\",\n \"bundle\": \"2.5\"\n}"
},
{
"path": "config/alipay/app.less",
"chars": 178,
"preview": "@import '../src/style/themes/theme-mode.less';\n\npage {\n background-color: var(--color-background);\n}\n\n.navigation-bar {"
},
{
"path": "config/alipay/app.ts",
"chars": 260,
"preview": "App({\n onLaunch(launchParams: any) {\n ac.call('navigateTo', {\n url: 'pages/index/index',\n });\n },\n onRelau"
},
{
"path": "config/alipay/b2h.config.ts",
"chars": 95,
"preview": "export default {\n compileOptions: {\n typescript: {\n checkTypes: false,\n },\n },\n};\n"
},
{
"path": "config/alipay/mini.project.json",
"chars": 178,
"preview": "{\n \"format\": 2,\n \"compileOptions\": {\n \"component2\": true\n },\n \"uploadExclude\": [\n \"miniapptools_dist/**/*\"\n ]"
},
{
"path": "config/alipay/package.json",
"chars": 386,
"preview": "{\n \"devDependencies\": {\n \"@alipay/bundle2h-types\": \"^1.0.40\",\n \"@alipay/bundle2h-cli\": \"^1.0.77\"\n },\n \"scripts\""
},
{
"path": "config/alipay/tsconfig.json",
"chars": 123,
"preview": "{\n \"compilerOptions\": {\n \"esModuleInterop\": true,\n \"lib\": [\"ES2015\"],\n \"types\": [\"@alipay/bundle2h-types\"]\n }"
},
{
"path": "config/wechat/app.js",
"chars": 7,
"preview": "App({})"
},
{
"path": "config/wechat/app.wxss",
"chars": 101,
"preview": "@import './src/style/themes/theme-mode.wxss';\n\npage {\n background-color: var(--color-background);\n}\n"
},
{
"path": "config/wechat/package.json",
"chars": 471,
"preview": "{\n \"dependencies\": {\n \"@mini-types/alipay\": \"^3.0.5\",\n \"@preact/signals-core\": \"^1.7.0\",\n \"async-validator\": \""
},
{
"path": "copilot/Actions/check.sjs",
"chars": 275,
"preview": "/// #if ALIPAY\nfunction checkIcon(icon = '') {\n return getRegExp('^[a-zA-Z]+$').test(icon);\n}\nexport default { checkIco"
},
{
"path": "copilot/Actions/index.axml",
"chars": 523,
"preview": "<import-sjs from=\"./check.sjs\" name=\"sjs\" />\n\n<view class=\"ant-copilot-actions {{className}}\" style=\"{{style}}\">\n <view"
},
{
"path": "copilot/Actions/index.en.md",
"chars": 1132,
"preview": "---\nnav:\n path: /copilot\ngroup:\n title: Express\n order: 3\ntoc: 'content'\n---\n\n# Actions\n\n## When to use\n\nUse when you"
},
{
"path": "copilot/Actions/index.json5",
"chars": 114,
"preview": "{\n \"component\": true,\n \"styleIsolation\": \"shared\",\n \"usingComponents\": {\n \"ant-icon\": \"../Icon/index\"\n }\n}\n"
},
{
"path": "copilot/Actions/index.less",
"chars": 672,
"preview": "@import (reference) './variable.less';\n@import (reference) '../../src/style/mixins/hairline.less';\n\n@prefixCls: ant-copi"
},
{
"path": "copilot/Actions/index.md",
"chars": 766,
"preview": "---\nnav:\n path: /copilot\ngroup:\n title: 表达\n order: 3\ntoc: 'content'\n---\n\n# Actions 操作列表\n\n## 何时使用\n\n需要展示一组操作选项时使用。\n\n## "
},
{
"path": "copilot/Actions/index.ts",
"chars": 299,
"preview": "// @ts-nocheck\nimport { Component, triggerEvent } from '../_util/simply';\nimport { ActionsProps } from './props';\n\nCompo"
},
{
"path": "copilot/Actions/props.ts",
"chars": 497,
"preview": "// @ts-nocheck\nimport { IBaseProps } from '../_util/base';\n\ninterface IActionItem {\n /**\n * @description 操作文本\n */\n "
},
{
"path": "copilot/Actions/variable.less",
"chars": 280,
"preview": "@import (reference) '../../src/style/variables.less';\n@import (reference) '../../src/style/themes/index.less';\n\n// 背景色\n@"
},
{
"path": "copilot/Bubble/index.axml",
"chars": 658,
"preview": "<view\n class=\"ant-copilot-bubble {{'ant-copilot-bubble-' + placement}} {{className}}\"\n style=\"{{style}}\"\n>\n <image a:"
},
{
"path": "copilot/Bubble/index.en.md",
"chars": 3457,
"preview": "---\nnav:\n path: /copilot\ngroup:\n title: General\n order: 1\ntoc: 'content'\n---\n\n# Bubble Dialogue Bubbles\n\n## When to u"
},
{
"path": "copilot/Bubble/index.json5",
"chars": 114,
"preview": "{\n \"component\": true,\n \"styleIsolation\": \"shared\",\n \"usingComponents\": {\n \"ant-loading\": \"../Loading\"\n }\n}\n"
},
{
"path": "copilot/Bubble/index.less",
"chars": 1463,
"preview": "@import (reference) './variable.less';\n\n@prefixCls: ant-copilot-bubble;\n\n.@{prefixCls} {\n display: flex;\n align-items:"
},
{
"path": "copilot/Bubble/index.md",
"chars": 2666,
"preview": "---\nnav:\n path: /copilot\ngroup:\n title: 通用\n order: 1\ntoc: 'content'\n---\n\n# Bubble 对话气泡\n\n## 何时使用\n\n需要展示对话内容时使用,支持多种气泡样式"
},
{
"path": "copilot/Bubble/index.ts",
"chars": 1807,
"preview": "// @ts-nocheck\nimport {\n Component,\n getValueFromProps,\n triggerEventOnly,\n} from '../_util/simply';\nimport { BubbleP"
},
{
"path": "copilot/Bubble/props.ts",
"chars": 1002,
"preview": "// @ts-nocheck\nimport { IBaseProps } from '../_util/base';\n\ninterface IBubbleProps extends IBaseProps {\n /**\n * @desc"
},
{
"path": "copilot/Bubble/variable.less",
"chars": 510,
"preview": "@import (reference) '../../src/style/variables.less';\n@import (reference) '../../src/style/themes/index.less';\n\n// 背景色\n@"
},
{
"path": "copilot/Conversations/index.axml",
"chars": 1835,
"preview": "<view class=\"ant-copilot-conversations {{className}}\" style=\"{{style}}\">\n <block\n a:for=\"{{items}}\"\n a:for-index="
},
{
"path": "copilot/Conversations/index.en.md",
"chars": 5131,
"preview": "---\nnav:\n path: /copilot\ngroup:\n title: General\n order: 1\ntoc: 'content'\nsupportPlatform: ['alipay', 'wechat']\n---\n\n#"
},
{
"path": "copilot/Conversations/index.json5",
"chars": 129,
"preview": "{\n \"component\": true,\n \"styleIsolation\": \"shared\",\n \"usingComponents\": {\n \"ant-swipe-action\": \"../SwipeAction/inde"
},
{
"path": "copilot/Conversations/index.less",
"chars": 1492,
"preview": "@import (reference) './variable.less';\n\n@buttonPrefix: ant-copilot-conversations;\n\n.@{buttonPrefix} {\n &-hover {\n op"
},
{
"path": "copilot/Conversations/index.md",
"chars": 4580,
"preview": "---\nnav:\n path: /copilot\ngroup:\n title: 通用\n order: 1\ntoc: 'content'\nsupportPlatform: ['alipay', 'wechat']\n---\n\n# Conv"
},
{
"path": "copilot/Conversations/index.ts",
"chars": 1506,
"preview": "// @ts-nocheck\nimport {\n Component,\n getValueFromProps,\n triggerEventValues,\n} from '../_util/simply';\nimport { Conve"
},
{
"path": "copilot/Conversations/props.ts",
"chars": 1519,
"preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\n// @ts-nocheck\nimport { IBaseProps } from '../_util/base';\n\ninte"
},
{
"path": "copilot/Conversations/variable.less",
"chars": 673,
"preview": "@import (reference) '../../src/style/variables.less';\n@import (reference) '../../src/style/themes/index.less';\n\n@convers"
},
{
"path": "copilot/Prompts/index.axml",
"chars": 2293,
"preview": "<import-sjs name=\"util\" from=\"./index.sjs\" />\n\n<view class=\"ant-copilot-prompts {{ className }}\" style=\"{{ style }}\">\n "
},
{
"path": "copilot/Prompts/index.en.md",
"chars": 5568,
"preview": "---\nnav:\n path: /copilot\ngroup:\n title: Wake\n order: 2\ntoc: 'content'\n---\n\n# Prompts\n\nIt is used to allow users who a"
},
{
"path": "copilot/Prompts/index.json5",
"chars": 153,
"preview": "{\n \"component\": true,\n \"styleIsolation\": \"shared\",\n \"usingComponents\": {\n \"ant-icon\": \"../Icon/index\",\n \"ant-ty"
},
{
"path": "copilot/Prompts/index.less",
"chars": 2961,
"preview": "@import (reference) './variable.less';\n\n@buttonPrefix: ant-copilot-prompts;\n\n.@{buttonPrefix} {\n &-title {\n font-wei"
},
{
"path": "copilot/Prompts/index.md",
"chars": 4814,
"preview": "---\nnav:\n path: /copilot\ngroup:\n title: 唤醒\n order: 2\ntoc: 'content'\n---\n\n# Prompts 提示列表\n\n用于让首次接触 AI 产品的用户快速理解 AI 能做什么"
},
{
"path": "copilot/Prompts/index.sjs.ts",
"chars": 170,
"preview": "function isUrl(string) {\n if (!string) return;\n return !!(\n string.indexOf('http://') === 0 || string.indexOf('http"
},
{
"path": "copilot/Prompts/index.ts",
"chars": 320,
"preview": "// @ts-nocheck\nimport { Component, triggerEventValues } from '../_util/simply';\nimport { PromptsProps } from './props';\n"
},
{
"path": "copilot/Prompts/props.ts",
"chars": 1300,
"preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\n// @ts-nocheck\nimport { IBaseProps } from '../_util/base';\n\ninte"
},
{
"path": "copilot/Prompts/variable.less",
"chars": 1167,
"preview": "@import (reference) '../../src/style/variables.less';\n@import (reference) '../../src/style/themes/index.less';\n\n/* size "
},
{
"path": "copilot/Sender/index.axml",
"chars": 1354,
"preview": "<view class=\"ant-copilot-sender {{className}}\" style=\"{{style}}\">\n <slot name=\"header\"></slot>\n <view class=\"ant-copil"
},
{
"path": "copilot/Sender/index.en.md",
"chars": 2659,
"preview": "---\nnav:\n path: /copilot\ngroup:\n title: Express\n order: 3\ntoc: 'content'\nsupportPlatform: ['alipay', 'wechat']\n---\n\n#"
},
{
"path": "copilot/Sender/index.json5",
"chars": 79,
"preview": "{\n \"component\": true,\n \"styleIsolation\": \"shared\",\n \"usingComponents\": {}\n}\n"
},
{
"path": "copilot/Sender/index.less",
"chars": 2246,
"preview": "@import (reference) './variable.less';\n\n@prefixCls: ant-copilot-sender;\n\n.@{prefixCls} {\n width: 100%;\n padding: 0 @si"
},
{
"path": "copilot/Sender/index.md",
"chars": 2774,
"preview": "---\nnav:\n path: /copilot\ngroup:\n title: 表达\n order: 3\ntoc: 'content'\nsupportPlatform: ['alipay', 'wechat']\n---\n\n# Send"
},
{
"path": "copilot/Sender/index.ts",
"chars": 962,
"preview": "// @ts-nocheck\nimport {\n Component,\n getValueFromProps,\n triggerEvent,\n triggerEventOnly,\n} from '../_util/simply';\n"
},
{
"path": "copilot/Sender/props.ts",
"chars": 988,
"preview": "// @ts-nocheck\nimport { IBaseProps } from '../_util/base';\n\ninterface ISenderProps extends IBaseProps {\n /**\n * @desc"
},
{
"path": "copilot/Sender/variable.less",
"chars": 653,
"preview": "@import (reference) '../../src/style/variables.less';\n@import (reference) '../../src/style/themes/index.less';\n\n// 背景色\n@"
},
{
"path": "copilot/ThoughtChain/index.axml",
"chars": 1927,
"preview": "<import-sjs from=\"./index.sjs\" name=\"utils\" />\n<view class=\"ant-copilot-thoughtchain {{ className }}\">\n <view a:for=\"{{"
},
{
"path": "copilot/ThoughtChain/index.en.md",
"chars": 5599,
"preview": "---\nnav:\n path: /copilot\ngroup:\n title: Confirm\n order: 4\ntoc: 'content'\n---\n\n# ThoughtChain\n\nUse to visualize the pr"
},
{
"path": "copilot/ThoughtChain/index.json5",
"chars": 153,
"preview": "{\n \"component\": true,\n \"styleIsolation\": \"shared\",\n \"usingComponents\": {\n \"ant-icon\": \"../Icon/index\",\n \"ant-lo"
},
{
"path": "copilot/ThoughtChain/index.less",
"chars": 898,
"preview": "@import (reference) './variable.less';\n\n@buttonPrefix: ant-copilot-thoughtchain;\n\n.@{buttonPrefix} {\n &-node {\n marg"
},
{
"path": "copilot/ThoughtChain/index.md",
"chars": 4769,
"preview": "---\nnav:\n path: /copilot\ngroup:\n title: 确认\n order: 4\ntoc: 'content'\n---\n\n# ThoughtChain 思维链\n\n用于可视化展示 AI 处理请求、生成内容或执行任"
},
{
"path": "copilot/ThoughtChain/index.sjs.ts",
"chars": 342,
"preview": "function isExpand(collapsible, key, foldStatusMap) {\n if (collapsible) {\n if (collapsible.expandedKeys) {\n retu"
},
{
"path": "copilot/ThoughtChain/index.ts",
"chars": 1279,
"preview": "// @ts-nocheck\nimport {\n Component,\n getValueFromProps,\n triggerEventValues,\n} from '../_util/simply';\nimport { Thoug"
},
{
"path": "copilot/ThoughtChain/props.ts",
"chars": 1262,
"preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\n// @ts-nocheck\nimport { IBaseProps } from '../_util/base';\n\ninte"
},
{
"path": "copilot/ThoughtChain/variable.less",
"chars": 368,
"preview": "@import (reference) '../../src/style/variables.less';\n@import (reference) '../../src/style/themes/index.less';\n\n/* size "
},
{
"path": "copilot/Welcome/index.axml",
"chars": 205,
"preview": "<view class=\"ant-copilot-welcome {{ className }}\">\n <view class=\"ant-copilot-welcome-title\">{{title}}</view>\n <view cl"
},
{
"path": "copilot/Welcome/index.en.md",
"chars": 1258,
"preview": "---\nnav:\n path: /copilot\ngroup:\n title: Wake\n order: 2\ntoc: 'content'\n---\n\n# Welcome\n\nThis is a welcome prompt compon"
},
{
"path": "copilot/Welcome/index.json5",
"chars": 114,
"preview": "{\n \"component\": true,\n \"styleIsolation\": \"shared\",\n \"usingComponents\": {\n \"ant-icon\": \"../Icon/index\"\n }\n}\n"
},
{
"path": "copilot/Welcome/index.less",
"chars": 428,
"preview": "@import (reference) './variable.less';\n\n@buttonPrefix: ant-copilot-welcome;\n\n.@{buttonPrefix} {\n background-image: @wel"
},
{
"path": "copilot/Welcome/index.md",
"chars": 967,
"preview": "---\nnav:\n path: /copilot\ngroup:\n title: 唤醒\n order: 2\ntoc: 'content'\n---\n\n# Welcome 欢迎\n\n这是一个基于 Ant Design 设计系统的欢迎提示组件,"
},
{
"path": "copilot/Welcome/index.sjs.ts",
"chars": 342,
"preview": "function isExpand(collapsible, key, foldStatusMap) {\n if (collapsible) {\n if (collapsible.expandedKeys) {\n retu"
},
{
"path": "copilot/Welcome/index.ts",
"chars": 237,
"preview": "// @ts-nocheck\nimport { Component, triggerEvent } from '../_util/simply';\nimport { WelcomeProps } from './props';\n\nCompo"
},
{
"path": "copilot/Welcome/props.ts",
"chars": 514,
"preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\n// @ts-nocheck\nimport { IBaseProps } from '../_util/base';\n\nexpo"
},
{
"path": "copilot/Welcome/variable.less",
"chars": 281,
"preview": "@import (reference) '../../src/style/variables.less';\n@import (reference) '../../src/style/themes/index.less';\n\n/* size "
},
{
"path": "copilot-demo/pages/Actions/index.axml",
"chars": 674,
"preview": "<view class=\"navigation-bar\" />\n\n<ant-container title=\"基础用法\">\n <ant-actions items=\"{{basicActions}}\" onItemTap=\"handleT"
},
{
"path": "copilot-demo/pages/Actions/index.json5",
"chars": 443,
"preview": "{\n \"styleIsolation\": \"shared\",\n /// #if WECHAT\n \"navigationBarTitleText\": \"Actions\",\n /// #endif\n\n /// #if ALIPAY\n "
},
{
"path": "copilot-demo/pages/Actions/index.less",
"chars": 0,
"preview": ""
},
{
"path": "copilot-demo/pages/Actions/index.ts",
"chars": 1854,
"preview": "Page({\n data: {\n liked: false,\n loaded: false,\n showBubble: true,\n basicActions: [\n {\n label: '"
},
{
"path": "copilot-demo/pages/Bubble/index.axml",
"chars": 3064,
"preview": "<!-- #if ALIPAY || WECHAT -->\n<view class=\"navigation-bar\"/>\n<!-- #endif -->\n\n<ant-container title=\"基础用法\">\n <ant-bubble"
},
{
"path": "copilot-demo/pages/Bubble/index.json5",
"chars": 440,
"preview": "{\n \"styleIsolation\": \"shared\",\n /// #if WECHAT\n \"navigationBarTitleText\": \"Bubble\",\n /// #endif\n\n /// #if ALIPAY\n "
},
{
"path": "copilot-demo/pages/Bubble/index.less",
"chars": 199,
"preview": ".ant-copilot-bubble-name {\n font-weight: 400;\n font-size: 24rpx;\n color: #737373;\n line-height: 40rpx;\n}\n\n.ant-copil"
},
{
"path": "copilot-demo/pages/Bubble/index.ts",
"chars": 817,
"preview": "Page({\n data: {\n loading: true,\n showTyping: true,\n basicActions: [\n {\n label: 'copy',\n ico"
},
{
"path": "copilot-demo/pages/Conversations/index.axml",
"chars": 1169,
"preview": "<!-- #if ALIPAY || WECHAT -->\n<view class=\"navigation-bar\"/>\n<!-- #endif -->\n\n<ant-container title=\"基础用法\">\n <ant-conver"
},
{
"path": "copilot-demo/pages/Conversations/index.json5",
"chars": 465,
"preview": "{\n \"styleIsolation\": \"shared\",\n /// #if WECHAT\n \"navigationBarTitleText\": \"Conversations\",\n /// #endif\n\n /// #if AL"
},
{
"path": "copilot-demo/pages/Conversations/index.less",
"chars": 110,
"preview": ".history-popup {\n .ant-popup-transform-left {\n /// #if ALIPAY\n padding-top: 90px;\n /// #endif\n }\n}\n"
},
{
"path": "copilot-demo/pages/Conversations/index.ts",
"chars": 2105,
"preview": "Page({\n data: {\n visible: false,\n items: [\n {\n key: '1',\n label: '给我推荐一首歌',\n descriptio"
},
{
"path": "copilot-demo/pages/Prompts/index.axml",
"chars": 1612,
"preview": "<!-- #if ALIPAY || WECHAT -->\n<view class=\"navigation-bar\"/>\n<!-- #endif -->\n\n<ant-container title=\"基础用法\">\n <ant-prompt"
},
{
"path": "copilot-demo/pages/Prompts/index.json5",
"chars": 349,
"preview": "{\n \"styleIsolation\": \"shared\",\n /// #if WECHAT\n \"navigationBarTitleText\": \"Prompts\",\n /// #endif\n\n /// #if ALIPAY\n "
},
{
"path": "copilot-demo/pages/Prompts/index.less",
"chars": 434,
"preview": "page {\n padding: 12rpx;\n}\n\n.customizeStyle {\n .ant-copilot-prompts-list-item-content {\n font-family: PingFangSC-Lig"
},
{
"path": "copilot-demo/pages/Prompts/index.ts",
"chars": 3360,
"preview": "Page({\n data: {\n promptsTitle: '我可以帮您:',\n baseList: [\n {\n label: 'Ant Design X 全新升级了什么?',\n key"
},
{
"path": "copilot-demo/pages/Sender/index.axml",
"chars": 1715,
"preview": "<view class=\"navigation-bar\" />\n\n\n<ant-container title=\"基础用法\">\n <ant-sender value=\"{{value}}\" onChange=\"handleChange\" o"
},
{
"path": "copilot-demo/pages/Sender/index.json5",
"chars": 535,
"preview": "{\n \"styleIsolation\": \"shared\",\n /// #if WECHAT\n \"navigationBarTitleText\": \"Sender\",\n /// #endif\n\n /// #if ALIPAY\n "
},
{
"path": "copilot-demo/pages/Sender/index.less",
"chars": 58,
"preview": ".audioIcon {\n font-size: 40rpx;\n margin-right: 16rpx;\n}\n"
},
{
"path": "copilot-demo/pages/Sender/index.ts",
"chars": 2840,
"preview": "const mockResponse = [\n '很高兴见到你!让我们开始愉快的对话吧。',\n '你说得很有意思,能详细说说吗?',\n '这是个很好的问题,我来仔细想想...',\n '我明白你的想法,确实值得深入讨论。',\n '感"
},
{
"path": "copilot-demo/pages/ThoughtChain/index.axml",
"chars": 1634,
"preview": "<view class=\"navigation-bar\" />\n<!-- #if ALIPAY -->\n<ant-container title=\"基础用法\">\n <ant-thought-chain items=\"{{basicList"
},
{
"path": "copilot-demo/pages/ThoughtChain/index.json5",
"chars": 402,
"preview": "{\n \"styleIsolation\": \"shared\",\n /// #if WECHAT\n \"navigationBarTitleText\": \"ThoughtChain\",\n /// #endif\n\n /// #if ALI"
},
{
"path": "copilot-demo/pages/ThoughtChain/index.less",
"chars": 655,
"preview": "page {\n // background: #f5f5f5;\n padding: 12rpx;\n /* 浅色模式的css变量 */\n@media (prefers-color-scheme: light) {\n --backgro"
},
{
"path": "copilot-demo/pages/ThoughtChain/index.ts",
"chars": 1214,
"preview": "//@ts-ignore\n\nPage({\n data: {\n basicList: [\n {\n title: '理解问题',\n content: '3A游戏',\n icon: 'C"
},
{
"path": "copilot-demo/pages/Welcome/index.axml",
"chars": 181,
"preview": "<view class=\"navigation-bar\" />\n\n<ant-container title=\"基础用法\">\n <ant-welcome title=\"👋🏻 你好,我是 Ant Design X\" description=\""
},
{
"path": "copilot-demo/pages/Welcome/index.json5",
"chars": 381,
"preview": "{\n \"styleIsolation\": \"shared\",\n /// #if WECHAT\n \"navigationBarTitleText\": \"Welcome\",\n /// #endif\n\n /// #if ALIPAY\n "
}
]
// ... and 1360 more files (download for full content)
About this extraction
This page contains the full source code of the ant-design/ant-design-mini GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1560 files (3.8 MB), approximately 1.1M tokens, and a symbol index with 1661 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.