├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .husky
└── pre-commit
├── .npmrc
├── .prettierignore
├── .prettierrc.js
├── .stylelintignore
├── .stylelintrc
├── .vscode
└── settings.json
├── README.md
├── README.zh.md
├── apps
└── example
│ ├── favicon.ico
│ ├── index-webpack.html
│ ├── index.html
│ ├── mx.config.js
│ ├── package.json
│ ├── src
│ ├── components
│ │ ├── APIList
│ │ │ ├── index.ts
│ │ │ ├── interfaceList.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── AnchorList
│ │ │ ├── index.tsx
│ │ │ ├── styles
│ │ │ │ └── index.module.less
│ │ │ └── utils
│ │ │ │ ├── getComponentNameFromUrl.ts
│ │ │ │ └── index.ts
│ │ ├── CodePreview
│ │ │ ├── codePreview.tsx
│ │ │ ├── errorMessage.tsx
│ │ │ ├── hooks
│ │ │ │ ├── index.ts
│ │ │ │ └── useCodePreview.tsx
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ ├── interface.tsx
│ │ │ └── utils
│ │ │ │ ├── compose.ts
│ │ │ │ ├── errorBoundary.tsx
│ │ │ │ ├── evalCode.ts
│ │ │ │ ├── generateElement.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── transform.tsx
│ │ ├── ConfigProvider
│ │ │ ├── configProvider.tsx
│ │ │ ├── constants.tsx
│ │ │ ├── index.ts
│ │ │ └── interface.ts
│ │ ├── DemoBlock
│ │ │ ├── ComponentCodeBlock.tsx
│ │ │ ├── componentBlock.tsx
│ │ │ ├── demoBlock.tsx
│ │ │ ├── index.tsx
│ │ │ └── styles
│ │ │ │ └── index.module.less
│ │ ├── ErrorBoundary
│ │ │ └── index.tsx
│ │ ├── Layout
│ │ │ ├── AppLayout.tsx
│ │ │ ├── ComponentInnerLayout.tsx
│ │ │ ├── ComponentLayout.tsx
│ │ │ ├── constants.ts
│ │ │ └── styles
│ │ │ │ └── index.module.less
│ │ ├── Logo
│ │ │ ├── index.ts
│ │ │ ├── logoIcon.tsx
│ │ │ └── styles
│ │ │ │ └── index.module.less
│ │ ├── Menu
│ │ │ ├── components
│ │ │ │ ├── CollapseBtn.tsx
│ │ │ │ ├── Menu
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── styles
│ │ │ │ │ │ └── menu.component.less
│ │ │ │ │ └── utils
│ │ │ │ │ │ ├── handleNavigate.ts
│ │ │ │ │ │ └── index.ts
│ │ │ │ └── index.ts
│ │ │ ├── constants.ts
│ │ │ ├── index.tsx
│ │ │ ├── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ │ └── styles
│ │ │ │ └── index.module.less
│ │ ├── NavBar
│ │ │ ├── components
│ │ │ │ ├── GithubLink.tsx
│ │ │ │ ├── Logo.tsx
│ │ │ │ ├── SelectLang.tsx
│ │ │ │ ├── SelectTheme.tsx
│ │ │ │ ├── TutorialsDropdown
│ │ │ │ │ ├── Icon
│ │ │ │ │ │ ├── cliIcon.tsx
│ │ │ │ │ │ ├── componentsIcon.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── components
│ │ │ │ │ │ ├── Card.tsx
│ │ │ │ │ │ ├── DropdownButton.tsx
│ │ │ │ │ │ ├── TutorialsButton.tsx
│ │ │ │ │ │ ├── TutorialsDropdown.tsx
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── hooks.ts
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ └── useStore.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── locale
│ │ │ │ │ │ ├── constants.ts
│ │ │ │ │ │ ├── en_us.tsx
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ └── zh_cn.tsx
│ │ │ │ │ └── styles
│ │ │ │ │ │ └── index.module.less
│ │ │ │ └── index.ts
│ │ │ ├── index.tsx
│ │ │ └── styles
│ │ │ │ └── index.module.less
│ │ └── Status
│ │ │ ├── 404
│ │ │ ├── icon404.tsx
│ │ │ └── index.tsx
│ │ │ ├── constants.ts
│ │ │ ├── errorPage.tsx
│ │ │ ├── interface.ts
│ │ │ ├── locale
│ │ │ ├── constants.ts
│ │ │ ├── en_us.tsx
│ │ │ ├── index.ts
│ │ │ └── zh_cn.tsx
│ │ │ └── style
│ │ │ └── index.module.less
│ ├── constants.ts
│ ├── hooks
│ │ ├── index.ts
│ │ ├── setTheme
│ │ │ ├── constants.ts
│ │ │ ├── getTheme.ts
│ │ │ ├── index.ts
│ │ │ ├── interface.ts
│ │ │ └── setTheme.ts
│ │ ├── useLang.tsx
│ │ └── useTheme.tsx
│ ├── index.tsx
│ ├── interfaceDocs
│ │ ├── Affix
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Alert
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Anchor
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Button
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Checkbox
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── ConfigProvider
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Drawer
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Dropdown
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Empty
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Grid
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── GridLayout
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Icon
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Input
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── InputTag
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Message
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Modal
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Notification
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Pagination
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Popup
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Portal
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Radio
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── SelectInput
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Space
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Spin
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Switch
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Table
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ ├── Tag
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ │ └── Tooltip
│ │ │ ├── alias.json
│ │ │ └── interface.json
│ ├── locale
│ │ ├── constants.ts
│ │ ├── index.ts
│ │ ├── lang
│ │ │ ├── en_us.ts
│ │ │ └── zh_cn.ts
│ │ └── useLocal
│ │ │ ├── transformLocale.ts
│ │ │ └── useLocal.ts
│ ├── pages
│ │ ├── affix
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── container.tsx
│ │ │ │ └── index.ts
│ │ │ ├── index.tsx
│ │ │ ├── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ │ └── style
│ │ │ │ └── index.module.less
│ │ ├── alert
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── closable.tsx
│ │ │ │ ├── custom.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── noIcon.tsx
│ │ │ │ ├── operation.tsx
│ │ │ │ ├── title.tsx
│ │ │ │ └── type.tsx
│ │ │ ├── index.tsx
│ │ │ ├── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ │ └── style
│ │ │ │ └── index.module.less
│ │ ├── anchor
│ │ │ ├── examples
│ │ │ │ ├── affix.tsx
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── lineless.tsx
│ │ │ │ └── scrollBoundary.tsx
│ │ │ ├── index.tsx
│ │ │ ├── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ │ └── style
│ │ │ │ └── index.module.less
│ │ ├── button
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── disabled.tsx
│ │ │ │ ├── group.tsx
│ │ │ │ ├── icon.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── loading.tsx
│ │ │ │ ├── long.tsx
│ │ │ │ └── status.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── checkbox
│ │ │ ├── examples
│ │ │ │ ├── all.tsx
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── controlled.tsx
│ │ │ │ ├── customContent.tsx
│ │ │ │ ├── group.tsx
│ │ │ │ └── index.ts
│ │ │ ├── index.tsx
│ │ │ ├── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ │ └── style
│ │ │ │ └── index.module.less
│ │ ├── drawer
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── customizedElement.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── mount.tsx
│ │ │ │ ├── multiLayer.tsx
│ │ │ │ ├── position.tsx
│ │ │ │ └── update.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── dropdown
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── differentTrigger.tsx
│ │ │ │ ├── disabled.tsx
│ │ │ │ ├── getDisabledStatus.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── itemStyle.tsx
│ │ │ │ └── position.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── empty
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── customIcon.tsx
│ │ │ │ ├── customPic.tsx
│ │ │ │ └── index.ts
│ │ │ ├── index.tsx
│ │ │ ├── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ │ └── style
│ │ │ │ └── index.module.less
│ │ ├── grid
│ │ │ ├── examples
│ │ │ │ ├── advancedResponsiveLayout.tsx
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── flex.tsx
│ │ │ │ ├── horizontalLayout.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── intervalOfGrid.tsx
│ │ │ │ ├── offsetOfCol.tsx
│ │ │ │ ├── order.tsx
│ │ │ │ ├── pushPull.tsx
│ │ │ │ ├── responsiveLayout.tsx
│ │ │ │ └── verticalLayout.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── gridLayout
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── column.tsx
│ │ │ │ ├── containerAlign.tsx
│ │ │ │ ├── containerJustify.tsx
│ │ │ │ ├── holyGrail.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── position.tsx
│ │ │ │ └── responsive.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── icon
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── custom.tsx
│ │ │ │ ├── data.tsx
│ │ │ │ ├── directionIndicator.tsx
│ │ │ │ ├── editable.tsx
│ │ │ │ ├── iconFont.tsx
│ │ │ │ ├── iconItem.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── interactiveButton.tsx
│ │ │ │ ├── loading.tsx
│ │ │ │ └── promptSuggestion.tsx
│ │ │ ├── index.tsx
│ │ │ ├── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ │ └── style
│ │ │ │ └── index.module.less
│ │ ├── input
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── label.tsx
│ │ │ │ ├── limit.tsx
│ │ │ │ ├── normalize.tsx
│ │ │ │ ├── password.tsx
│ │ │ │ ├── search.tsx
│ │ │ │ ├── status.tsx
│ │ │ │ └── suffix.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── inputTag
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── label-in-value.tsx
│ │ │ │ ├── prefix-suffix.tsx
│ │ │ │ ├── render-tag.tsx
│ │ │ │ ├── save-on-blur.tsx
│ │ │ │ ├── token-separator.tsx
│ │ │ │ └── validate-format.tsx
│ │ │ ├── index.tsx
│ │ │ ├── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ │ └── style
│ │ │ │ ├── index.less
│ │ │ │ ├── index.ts
│ │ │ │ ├── mixin.less
│ │ │ │ └── token.less
│ │ ├── message
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── close.tsx
│ │ │ │ ├── custom.tsx
│ │ │ │ ├── different.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── position.tsx
│ │ │ │ ├── showClose.tsx
│ │ │ │ └── update.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── modal
│ │ │ ├── examples
│ │ │ │ ├── async.tsx
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── feedback.tsx
│ │ │ │ ├── footer.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── position.tsx
│ │ │ │ └── update.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── notification
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── customBtn.tsx
│ │ │ │ ├── customIcon.tsx
│ │ │ │ ├── customStyle.tsx
│ │ │ │ ├── different.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── position.tsx
│ │ │ │ └── update.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── pagination
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── buffersize.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── pageJumper.tsx
│ │ │ │ ├── simple.tsx
│ │ │ │ ├── size.tsx
│ │ │ │ ├── step.tsx
│ │ │ │ └── total.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── popup
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── controlled.tsx
│ │ │ │ ├── differentTrigger.tsx
│ │ │ │ ├── disabled.tsx
│ │ │ │ ├── dynamic.tsx
│ │ │ │ ├── floatingLayer.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── mount.tsx
│ │ │ │ ├── position.tsx
│ │ │ │ └── triggerMode.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── radio
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── button.tsx
│ │ │ │ ├── controlled.tsx
│ │ │ │ ├── customContent.tsx
│ │ │ │ ├── group.tsx
│ │ │ │ └── index.ts
│ │ │ ├── index.tsx
│ │ │ ├── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ │ └── style
│ │ │ │ └── index.module.less
│ │ ├── selectInput
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── basicMulti.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── prefix-suffix.tsx
│ │ │ │ └── status.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── space
│ │ │ ├── examples
│ │ │ │ ├── align.tsx
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── size.tsx
│ │ │ │ ├── split.tsx
│ │ │ │ └── vertical.tsx
│ │ │ ├── index.tsx
│ │ │ ├── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ │ └── style
│ │ │ │ └── index.module.less
│ │ ├── spin
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── container.tsx
│ │ │ │ ├── custom.tsx
│ │ │ │ ├── delay.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── size.tsx
│ │ │ │ └── tip.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── switch
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── disabled.tsx
│ │ │ │ ├── icon.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── loading.tsx
│ │ │ │ ├── size.tsx
│ │ │ │ └── text.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── table
│ │ │ ├── examples
│ │ │ │ ├── back-end-filter.tsx
│ │ │ │ ├── back-end-multi-sort.tsx
│ │ │ │ ├── back-end-single-sort.tsx
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── cell-merge.tsx
│ │ │ │ ├── custom-cell.tsx
│ │ │ │ ├── expand-row.tsx
│ │ │ │ ├── filter.tsx
│ │ │ │ ├── fixed-column.tsx
│ │ │ │ ├── fixed-header.tsx
│ │ │ │ ├── group-columns.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── multi-sort.tsx
│ │ │ │ ├── nested-table.tsx
│ │ │ │ ├── single-sort.tsx
│ │ │ │ ├── tree-data.tsx
│ │ │ │ └── uncontrolledPagination.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ ├── tag
│ │ │ ├── examples
│ │ │ │ ├── basic.tsx
│ │ │ │ ├── closable.tsx
│ │ │ │ ├── icon.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── maxWidth.tsx
│ │ │ │ └── shape.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ │ ├── constants.ts
│ │ │ │ ├── en_us.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── zh_cn.tsx
│ │ └── tooltip
│ │ │ ├── examples
│ │ │ ├── basic.tsx
│ │ │ ├── differentTrigger.tsx
│ │ │ ├── floatingLayer.tsx
│ │ │ ├── index.ts
│ │ │ └── position.tsx
│ │ │ ├── index.tsx
│ │ │ └── locale
│ │ │ ├── constants.ts
│ │ │ ├── en_us.tsx
│ │ │ ├── index.ts
│ │ │ └── zh_cn.tsx
│ ├── routes
│ │ ├── constants
│ │ │ ├── component.ts
│ │ │ └── index.ts
│ │ ├── router.tsx
│ │ ├── routerConfig.tsx
│ │ └── routes.tsx
│ ├── styles
│ │ ├── common.less
│ │ └── normalize.css
│ ├── typing.d.ts
│ └── utils
│ │ ├── index.css
│ │ ├── index.ts
│ │ ├── layLoad.tsx
│ │ ├── load.tsx
│ │ ├── setCookieLang.ts
│ │ └── setTheme
│ │ ├── constants.ts
│ │ ├── getTheme.ts
│ │ ├── index.ts
│ │ ├── interface.ts
│ │ └── setTheme.ts
│ ├── tsconfig.json
│ └── vite.config.ts
├── assets
├── logo.dark.png
└── logo.png
├── docs
├── favicon.ico
├── index.html
├── js
│ ├── 127.ae939c60.js
│ ├── 127.ae939c60.js.map
│ ├── 15.fb1fbd2b.js
│ ├── 15.fb1fbd2b.js.map
│ ├── 157.2d5fb8ac.js
│ ├── 157.2d5fb8ac.js.map
│ ├── 197.569972bb.js
│ ├── 197.569972bb.js.map
│ ├── 242.b46a0f3b.js
│ ├── 242.b46a0f3b.js.map
│ ├── 246.5009adde.js
│ ├── 246.5009adde.js.map
│ ├── 267.663aa385.js
│ ├── 267.663aa385.js.map
│ ├── 27.244b921d.js
│ ├── 27.244b921d.js.map
│ ├── 374.4fdb1d60.js
│ ├── 374.4fdb1d60.js.map
│ ├── 390.d8db2087.js
│ ├── 390.d8db2087.js.map
│ ├── 396.8d50a71c.js
│ ├── 396.8d50a71c.js.map
│ ├── 4.0bcdf4c8.js
│ ├── 4.0bcdf4c8.js.map
│ ├── 422.0e442d33.js
│ ├── 422.0e442d33.js.map
│ ├── 442.11027ea7.js
│ ├── 442.11027ea7.js.map
│ ├── 459.f7ed87c5.js
│ ├── 459.f7ed87c5.js.map
│ ├── 46.c473225b.js
│ ├── 46.c473225b.js.map
│ ├── 488.52576186.js
│ ├── 488.52576186.js.map
│ ├── 52.131ee691.js
│ ├── 52.131ee691.js.map
│ ├── 568.14f00735.js
│ ├── 568.14f00735.js.map
│ ├── 582.66637a80.js
│ ├── 582.66637a80.js.map
│ ├── 715.1e4885b4.js
│ ├── 715.1e4885b4.js.map
│ ├── 718.89d59bc0.js
│ ├── 718.89d59bc0.js.map
│ ├── 719.c42c2a96.js
│ ├── 719.c42c2a96.js.map
│ ├── 760.9ae23bae.js
│ ├── 760.9ae23bae.js.map
│ ├── 795.6cb6b9d3.js
│ ├── 795.6cb6b9d3.js.map
│ ├── 7f78edd2.index.js
│ ├── 7f78edd2.index.js.map
│ ├── 849.0734114c.js
│ ├── 849.0734114c.js.map
│ ├── 898.20e7007c.js
│ ├── 898.20e7007c.js.map
│ ├── 995.4ff71cb9.js
│ ├── 995.4ff71cb9.js.map
│ ├── async-commons.41675e6d.js
│ ├── async-commons.41675e6d.js.map
│ ├── c30842f4.index.js
│ └── c30842f4.index.js.map
└── stylesheet
│ ├── 127.7d4896ac.css
│ ├── 127.7d4896ac.css.map
│ ├── 15.7d4896ac.css
│ ├── 15.7d4896ac.css.map
│ ├── 157.7d4896ac.css
│ ├── 157.7d4896ac.css.map
│ ├── 197.7d4896ac.css
│ ├── 197.7d4896ac.css.map
│ ├── 242.7d4896ac.css
│ ├── 242.7d4896ac.css.map
│ ├── 246.7d4896ac.css
│ ├── 246.7d4896ac.css.map
│ ├── 267.7d4896ac.css
│ ├── 267.7d4896ac.css.map
│ ├── 27.7d4896ac.css
│ ├── 27.7d4896ac.css.map
│ ├── 374.7d4896ac.css
│ ├── 374.7d4896ac.css.map
│ ├── 390.7d4896ac.css
│ ├── 390.7d4896ac.css.map
│ ├── 4.7d4896ac.css
│ ├── 4.7d4896ac.css.map
│ ├── 422.7d4896ac.css
│ ├── 422.7d4896ac.css.map
│ ├── 442.a4449d4a.css
│ ├── 442.a4449d4a.css.map
│ ├── 459.7d4896ac.css
│ ├── 459.7d4896ac.css.map
│ ├── 46.7d4896ac.css
│ ├── 46.7d4896ac.css.map
│ ├── 488.7d4896ac.css
│ ├── 488.7d4896ac.css.map
│ ├── 52.7d4896ac.css
│ ├── 52.7d4896ac.css.map
│ ├── 568.7d4896ac.css
│ ├── 568.7d4896ac.css.map
│ ├── 582.7d4896ac.css
│ ├── 582.7d4896ac.css.map
│ ├── 715.7d4896ac.css
│ ├── 715.7d4896ac.css.map
│ ├── 719.7d4896ac.css
│ ├── 719.7d4896ac.css.map
│ ├── 760.7d4896ac.css
│ ├── 760.7d4896ac.css.map
│ ├── 795.7d4896ac.css
│ ├── 795.7d4896ac.css.map
│ ├── 849.7d4896ac.css
│ ├── 849.7d4896ac.css.map
│ ├── 898.7d4896ac.css
│ ├── 898.7d4896ac.css.map
│ ├── 995.7d4896ac.css
│ ├── 995.7d4896ac.css.map
│ ├── index.09cb98cb.css
│ └── index.09cb98cb.css.map
├── package.json
├── packages
├── mx-design-hooks
│ ├── .gitignore
│ ├── .npmrc
│ ├── README.md
│ ├── README.zh.md
│ ├── package.json
│ ├── src
│ │ ├── index.ts
│ │ ├── isBrowser.ts
│ │ ├── useClickAway.tsx
│ │ ├── useClipboard.ts
│ │ ├── useConstant.ts
│ │ ├── useCreation.tsx
│ │ ├── useDebounceFn.ts
│ │ ├── useEvent.tsx
│ │ ├── useEventListener.ts
│ │ ├── useForceUpdate.ts
│ │ ├── useHover.tsx
│ │ ├── useIsFirstRender.ts
│ │ ├── useIsomorphicLayoutEffect.ts
│ │ ├── useKeyboardEvent.ts
│ │ ├── useMergeProps.ts
│ │ ├── useMergeRefs.ts
│ │ ├── useMergeValue.ts
│ │ ├── usePrevious.ts
│ │ ├── useRefState.ts
│ │ ├── useStateWithPromise.ts
│ │ └── useUnmountedRef.ts
│ ├── tsconfig.json
│ └── tsconfigCommonJS.json
├── mx-design-node-utils
│ ├── .gitignore
│ ├── .npmrc
│ ├── README.md
│ ├── README.zh.md
│ ├── package.json
│ ├── src
│ │ ├── execQuick.ts
│ │ ├── getProjectPath.ts
│ │ ├── index.ts
│ │ └── spinner.ts
│ ├── tsconfig.json
│ └── tsconfigCommonJS.json
├── mx-design-web-utils
│ ├── .gitignore
│ ├── .npmrc
│ ├── README.md
│ ├── README.zh.md
│ ├── package.json
│ ├── src
│ │ ├── classnames.ts
│ │ ├── compose.ts
│ │ ├── cookie
│ │ │ ├── deleteCookie.ts
│ │ │ ├── getCookie.ts
│ │ │ ├── index.ts
│ │ │ └── setCookie.ts
│ │ ├── debounce.ts
│ │ ├── debounceByRaf.ts
│ │ ├── dom
│ │ │ ├── contains.ts
│ │ │ ├── index.ts
│ │ │ └── isNodeOverflow.ts
│ │ ├── get.ts
│ │ ├── getId.ts
│ │ ├── group.ts
│ │ ├── index.ts
│ │ ├── is.ts
│ │ ├── isServerRendering.ts
│ │ ├── localStorage
│ │ │ ├── getLocalStorage.ts
│ │ │ ├── index.ts
│ │ │ └── setLocalStorage.ts
│ │ ├── log.ts
│ │ ├── merge.ts
│ │ ├── noop.ts
│ │ ├── off.ts
│ │ ├── omit.ts
│ │ ├── on.ts
│ │ ├── partial.ts
│ │ ├── pick.ts
│ │ ├── setCssVariables.ts
│ │ └── throttle
│ │ │ ├── index.ts
│ │ │ ├── leadingThrottle.ts
│ │ │ ├── throttle.ts
│ │ │ └── trailingThrottle.ts
│ ├── tsconfig.json
│ └── tsconfigCommonJS.json
└── mx-design-web
│ ├── .browserslistrc
│ ├── .npmrc
│ ├── README.md
│ ├── mx.config.js
│ ├── package.json
│ ├── script
│ ├── domStr.js
│ ├── generateApiDoc.js
│ └── generateIcons.js
│ ├── src
│ ├── Affix
│ │ ├── components
│ │ │ ├── affix.tsx
│ │ │ └── index.ts
│ │ ├── index.tsx
│ │ ├── interface.tsx
│ │ ├── store.tsx
│ │ ├── style
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ └── utils
│ │ │ ├── addScrollEvent.ts
│ │ │ ├── calcTopAndBottom.ts
│ │ │ ├── fixedDom.ts
│ │ │ ├── fixedPlaceholder.ts
│ │ │ ├── getCalcBottom.ts
│ │ │ ├── getCalcTop.ts
│ │ │ ├── getContainingBlock.ts
│ │ │ ├── getFixedTop.ts
│ │ │ ├── getScrollContainer.ts
│ │ │ ├── handleFixedToggle.ts
│ │ │ ├── index.ts
│ │ │ ├── isNeedListParent.ts
│ │ │ └── removeScrollEvent.ts
│ ├── Alert
│ │ ├── components
│ │ │ ├── alert.tsx
│ │ │ └── index.ts
│ │ ├── constants.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ └── useClassNames.tsx
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ └── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ ├── Anchor
│ │ ├── components
│ │ │ ├── anchor.tsx
│ │ │ ├── index.ts
│ │ │ └── link.tsx
│ │ ├── context.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ ├── useClassNames.tsx
│ │ │ ├── useLinkClassNames.tsx
│ │ │ └── useStyles.ts
│ │ ├── index.tsx
│ │ ├── interface.tsx
│ │ ├── store.tsx
│ │ ├── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ └── utils
│ │ │ ├── addLink.tsx
│ │ │ ├── createNestedLink.tsx
│ │ │ ├── findNode.ts
│ │ │ ├── getContainer.ts
│ │ │ ├── getContainerElement.ts
│ │ │ ├── getEleInViewport.tsx
│ │ │ ├── getOffsetTop.ts
│ │ │ ├── getScrollLeft.ts
│ │ │ ├── getScrollTop.ts
│ │ │ ├── index.ts
│ │ │ ├── isNotNullUndefined.ts
│ │ │ ├── removeLink.tsx
│ │ │ ├── scrollIntoView.ts
│ │ │ └── setActiveLink.tsx
│ ├── Button
│ │ ├── components
│ │ │ ├── btnAnchor.tsx
│ │ │ ├── button.tsx
│ │ │ ├── group.tsx
│ │ │ └── index.ts
│ │ ├── constants.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ └── useClassNames.ts
│ │ ├── index.tsx
│ │ ├── interface.tsx
│ │ └── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── token.less
│ ├── Checkbox
│ │ ├── checkboxGroupContext.ts
│ │ ├── components
│ │ │ ├── checkbox.tsx
│ │ │ ├── group.tsx
│ │ │ ├── icon-check.tsx
│ │ │ └── index.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ ├── useClassNames.ts
│ │ │ └── useGroupClassNames.ts
│ │ ├── index.tsx
│ │ ├── interface.tsx
│ │ ├── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ └── utils
│ │ │ ├── getMergeProps.ts
│ │ │ └── index.ts
│ ├── Common
│ │ ├── Hover.tsx
│ │ ├── getId.ts
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ └── renderIcon.tsx
│ ├── ConfigProvider
│ │ ├── configProvider.tsx
│ │ ├── constants.tsx
│ │ ├── context.tsx
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ └── useGlobalTheme.tsx
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ └── utils
│ │ │ ├── index.ts
│ │ │ └── renderEmpty.tsx
│ ├── Drawer
│ │ ├── components
│ │ │ ├── drawer.tsx
│ │ │ ├── drawerCard.tsx
│ │ │ ├── drawerProvider.tsx
│ │ │ ├── footer.tsx
│ │ │ └── index.ts
│ │ ├── constants.tsx
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ ├── useCardClassNames.tsx
│ │ │ └── useModalClassNames.tsx
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ ├── store
│ │ │ ├── index.ts
│ │ │ ├── useDrawerStore.tsx
│ │ │ └── useProviderStore.tsx
│ │ ├── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ └── utils
│ │ │ ├── findById.ts
│ │ │ ├── findIndexById.ts
│ │ │ ├── getId.ts
│ │ │ └── index.ts
│ ├── Dropdown
│ │ ├── dropdown.tsx
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ ├── store.tsx
│ │ └── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ ├── Empty
│ │ ├── components
│ │ │ ├── empty.tsx
│ │ │ └── index.ts
│ │ ├── constants.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ └── useClassNames.tsx
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ ├── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ └── utils
│ │ │ ├── getDesDefault.ts
│ │ │ ├── getEmptyImage.tsx
│ │ │ └── index.ts
│ ├── Grid
│ │ ├── components
│ │ │ ├── col.tsx
│ │ │ ├── index.ts
│ │ │ └── row.tsx
│ │ ├── context.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ └── useResponsiveState.ts
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ ├── style
│ │ │ ├── col.less
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── row.less
│ │ └── utils
│ │ │ ├── adaptationGrid.ts
│ │ │ ├── getFlexString.ts
│ │ │ ├── getGutter.ts
│ │ │ ├── getMarginStyle.ts
│ │ │ ├── getPaddingStyle.ts
│ │ │ └── index.ts
│ ├── GridLayout
│ │ ├── components
│ │ │ ├── cell.tsx
│ │ │ ├── gridLayout.tsx
│ │ │ └── index.ts
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ └── utils
│ │ │ ├── formatAreas.ts
│ │ │ ├── frGetter.ts
│ │ │ └── index.ts
│ ├── Icon
│ │ ├── IconFont.tsx
│ │ ├── createIcon.tsx
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ └── useClassNames.ts
│ │ ├── icon.tsx
│ │ ├── index.tsx
│ │ ├── interface.tsx
│ │ ├── react-icon
│ │ │ ├── FillDirectionIndicator
│ │ │ │ ├── IconArrowDownFilling.tsx
│ │ │ │ ├── IconArrowLeftFilling.tsx
│ │ │ │ ├── IconArrowRightFilling.tsx
│ │ │ │ ├── IconArrowUpFilling.tsx
│ │ │ │ └── index.ts
│ │ │ ├── FillEditable
│ │ │ │ ├── IconEditFilling.tsx
│ │ │ │ └── index.ts
│ │ │ ├── FillInteractiveButton
│ │ │ │ ├── IconCheckItemFilling.tsx
│ │ │ │ ├── IconFavoriteFilling.tsx
│ │ │ │ ├── IconFilterFilling.tsx
│ │ │ │ ├── IconFolderFilling.tsx
│ │ │ │ ├── IconNotificationFilling.tsx
│ │ │ │ ├── IconSettingFilling.tsx
│ │ │ │ ├── IconSorting.tsx
│ │ │ │ ├── IconTopFilling.tsx
│ │ │ │ └── index.ts
│ │ │ ├── FillPromptSuggestion
│ │ │ │ ├── IconCommentFilling.tsx
│ │ │ │ ├── IconCryFilling.tsx
│ │ │ │ ├── IconDeleteFilling.tsx
│ │ │ │ ├── IconHelpFilling.tsx
│ │ │ │ ├── IconHomeFilling.tsx
│ │ │ │ ├── IconMapFilling.tsx
│ │ │ │ ├── IconMehFilling.tsx
│ │ │ │ ├── IconPromptFilling.tsx
│ │ │ │ ├── IconSmileFilling.tsx
│ │ │ │ ├── IconSuccessFilling.tsx
│ │ │ │ ├── IconWarningFilling.tsx
│ │ │ │ └── index.ts
│ │ │ ├── LineData
│ │ │ │ ├── IconBranch.tsx
│ │ │ │ ├── IconChartBar.tsx
│ │ │ │ ├── IconChartPie.tsx
│ │ │ │ ├── IconDataView.tsx
│ │ │ │ ├── IconDatabase.tsx
│ │ │ │ ├── IconInterface.tsx
│ │ │ │ ├── IconServer.tsx
│ │ │ │ └── index.ts
│ │ │ ├── LineDirectionIndicator
│ │ │ │ ├── IconArrowBottom.tsx
│ │ │ │ ├── IconArrowLeft.tsx
│ │ │ │ ├── IconArrowLeftCircle.tsx
│ │ │ │ ├── IconArrowRight.tsx
│ │ │ │ ├── IconArrowRightCircle.tsx
│ │ │ │ ├── IconArrowTop.tsx
│ │ │ │ ├── IconBack.tsx
│ │ │ │ ├── IconBottom.tsx
│ │ │ │ ├── IconCode.tsx
│ │ │ │ ├── IconDirectionDown.tsx
│ │ │ │ ├── IconDirectionDownCircle.tsx
│ │ │ │ ├── IconDirectionLeft.tsx
│ │ │ │ ├── IconDirectionRight.tsx
│ │ │ │ ├── IconDirectionUp.tsx
│ │ │ │ └── index.ts
│ │ │ ├── LineEditable
│ │ │ │ ├── IconAshbin.tsx
│ │ │ │ ├── IconCopy.tsx
│ │ │ │ ├── IconCut.tsx
│ │ │ │ ├── IconEdit.tsx
│ │ │ │ ├── IconEllipsis.tsx
│ │ │ │ ├── IconExport.tsx
│ │ │ │ ├── IconEyeClose.tsx
│ │ │ │ ├── IconLink.tsx
│ │ │ │ ├── IconMic.tsx
│ │ │ │ ├── IconMove.tsx
│ │ │ │ ├── IconZoomIn.tsx
│ │ │ │ ├── IconZoomOut.tsx
│ │ │ │ └── index.ts
│ │ │ ├── LineInteractiveButton
│ │ │ │ ├── IconBad.tsx
│ │ │ │ ├── IconBrowser.tsx
│ │ │ │ ├── IconCalendar.tsx
│ │ │ │ ├── IconCamera.tsx
│ │ │ │ ├── IconCheckItem.tsx
│ │ │ │ ├── IconClose.tsx
│ │ │ │ ├── IconCry.tsx
│ │ │ │ ├── IconCustomerService.tsx
│ │ │ │ ├── IconDownload.tsx
│ │ │ │ ├── IconDrag.tsx
│ │ │ │ ├── IconFabulous.tsx
│ │ │ │ ├── IconFavorite.tsx
│ │ │ │ ├── IconFileAdd.tsx
│ │ │ │ ├── IconFileOpen.tsx
│ │ │ │ ├── IconFilter.tsx
│ │ │ │ ├── IconFolderClose.tsx
│ │ │ │ ├── IconFullscreenExpand.tsx
│ │ │ │ ├── IconFullscreenShrink.tsx
│ │ │ │ ├── IconMenu.tsx
│ │ │ │ ├── IconNotification.tsx
│ │ │ │ ├── IconRefresh.tsx
│ │ │ │ ├── IconSave.tsx
│ │ │ │ ├── IconScanning.tsx
│ │ │ │ ├── IconSearch.tsx
│ │ │ │ ├── IconSetting.tsx
│ │ │ │ ├── IconToggleLeft.tsx
│ │ │ │ ├── IconToggleRight.tsx
│ │ │ │ ├── IconTop.tsx
│ │ │ │ ├── IconUpload.tsx
│ │ │ │ └── index.ts
│ │ │ ├── LinePromptSuggestion
│ │ │ │ ├── IconAdd.tsx
│ │ │ │ ├── IconAddCircle.tsx
│ │ │ │ ├── IconComment.tsx
│ │ │ │ ├── IconElectronics.tsx
│ │ │ │ ├── IconEmail.tsx
│ │ │ │ ├── IconEmpty.tsx
│ │ │ │ ├── IconError.tsx
│ │ │ │ ├── IconFile.tsx
│ │ │ │ ├── IconGood.tsx
│ │ │ │ ├── IconHelp.tsx
│ │ │ │ ├── IconHide.tsx
│ │ │ │ ├── IconHome.tsx
│ │ │ │ ├── IconLoading.tsx
│ │ │ │ ├── IconLock.tsx
│ │ │ │ ├── IconMap.tsx
│ │ │ │ ├── IconMeh.tsx
│ │ │ │ ├── IconMinus.tsx
│ │ │ │ ├── IconMinusCircle.tsx
│ │ │ │ ├── IconMobilePhone.tsx
│ │ │ │ ├── IconMoon.tsx
│ │ │ │ ├── IconPrompt.tsx
│ │ │ │ ├── IconSelect.tsx
│ │ │ │ ├── IconSmile.tsx
│ │ │ │ ├── IconStop.tsx
│ │ │ │ ├── IconSuccess.tsx
│ │ │ │ ├── IconSun.tsx
│ │ │ │ ├── IconTelephone.tsx
│ │ │ │ ├── IconUnlock.tsx
│ │ │ │ ├── IconView.tsx
│ │ │ │ ├── IconViewOff.tsx
│ │ │ │ ├── IconWarning.tsx
│ │ │ │ └── index.ts
│ │ │ ├── Logo
│ │ │ │ ├── IconDesign.tsx
│ │ │ │ ├── IconM.tsx
│ │ │ │ └── index.ts
│ │ │ └── index.tsx
│ │ ├── style
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ └── utils
│ │ │ ├── getSize.ts
│ │ │ └── index.ts
│ ├── Input
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ ├── input-element.tsx
│ │ │ ├── input.tsx
│ │ │ ├── password.tsx
│ │ │ ├── search.tsx
│ │ │ └── suffixElement.tsx
│ │ ├── constants.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ └── useInputClassNames.tsx
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ ├── store
│ │ │ ├── index.ts
│ │ │ ├── useInputElementStore.tsx
│ │ │ ├── useInputStore.tsx
│ │ │ └── usePasswordStore.tsx
│ │ ├── style
│ │ │ ├── cssVariables-search.less
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ ├── mixin.less
│ │ │ ├── search.less
│ │ │ └── status.less
│ │ └── utils
│ │ │ ├── formatValue.tsx
│ │ │ ├── getStyleFromInput.ts
│ │ │ ├── index.ts
│ │ │ ├── inputAddon.tsx
│ │ │ ├── isLengthExceeds.tsx
│ │ │ └── keepFocus.tsx
│ ├── InputTag
│ │ ├── components
│ │ │ ├── base-Input-tag.tsx
│ │ │ ├── index.ts
│ │ │ └── input-tag.tsx
│ │ ├── constants.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ ├── useClassNames.tsx
│ │ │ └── useComputeAutoWidthDelay.tsx
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ ├── store
│ │ │ ├── index.ts
│ │ │ └── useInputTagStore.tsx
│ │ ├── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ └── utils
│ │ │ ├── formatValue.ts
│ │ │ ├── handleTokenSeparators.ts
│ │ │ ├── index.ts
│ │ │ ├── isEmptyNode.ts
│ │ │ ├── keepFocus.ts
│ │ │ ├── mergedRenderTag.tsx
│ │ │ ├── tagCloseHandler.ts
│ │ │ ├── tryAddInputValueToTag.tsx
│ │ │ └── valueChangeHandler.tsx
│ ├── Loading
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ ├── loading.tsx
│ │ └── style
│ │ │ ├── index.less
│ │ │ └── index.ts
│ ├── Locale
│ │ ├── constants.ts
│ │ ├── index.ts
│ │ ├── lang
│ │ │ ├── en_us.ts
│ │ │ └── zh_ch.ts
│ │ └── useLocal
│ │ │ ├── transformLocale.ts
│ │ │ └── useLocal.ts
│ ├── Menu
│ │ ├── HorizontalMenu
│ │ │ ├── context.ts
│ │ │ ├── horizontalItem.tsx
│ │ │ ├── horizontalMenu.tsx
│ │ │ ├── index.ts
│ │ │ ├── interface.tsx
│ │ │ ├── style
│ │ │ │ ├── cssVariables.less
│ │ │ │ ├── index.less
│ │ │ │ └── index.ts
│ │ │ ├── subMenu.tsx
│ │ │ ├── subMenuCard.tsx
│ │ │ └── utils
│ │ │ │ ├── generateInfoMap.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── isChildrenSelected.ts
│ │ └── index.ts
│ ├── Message
│ │ ├── components
│ │ │ ├── MessageCardContainer.tsx
│ │ │ ├── MessageProvider.tsx
│ │ │ ├── MessageSingleDirection.tsx
│ │ │ └── index.ts
│ │ ├── constants.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ ├── useClassNames.tsx
│ │ │ └── useTimer.tsx
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ ├── store.tsx
│ │ ├── style
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ └── utils
│ │ │ ├── applyNotificationSlide.ts
│ │ │ ├── findById.ts
│ │ │ ├── findToast.ts
│ │ │ ├── getCardStyle.ts
│ │ │ ├── getId.ts
│ │ │ ├── getPosition.ts
│ │ │ └── index.ts
│ ├── Modal
│ │ ├── components
│ │ │ ├── footer.tsx
│ │ │ ├── index.ts
│ │ │ ├── modal.tsx
│ │ │ ├── modalCard.tsx
│ │ │ └── modalProvider.tsx
│ │ ├── constants.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ ├── useCardClassNames.tsx
│ │ │ ├── useGetIcon.tsx
│ │ │ ├── useModalClassNames.tsx
│ │ │ └── useOverflowHidden.tsx
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ ├── store.tsx
│ │ ├── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ └── utils
│ │ │ ├── findById.ts
│ │ │ ├── findIndexById.ts
│ │ │ ├── getId.ts
│ │ │ ├── getScrollBarWidth.tsx
│ │ │ ├── index.ts
│ │ │ ├── resetContainerStyle.ts
│ │ │ └── setContainerStyle.ts
│ ├── Notification
│ │ ├── components
│ │ │ ├── NotificationProvider.tsx
│ │ │ ├── index.ts
│ │ │ ├── notificationCard.tsx
│ │ │ └── notificationWrapper.tsx
│ │ ├── constants.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ ├── useCardClassNames.tsx
│ │ │ ├── useClassNames.tsx
│ │ │ └── useTimer.tsx
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ ├── store.tsx
│ │ ├── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ └── utils
│ │ │ ├── applyNotificationSlide.ts
│ │ │ ├── findById.ts
│ │ │ ├── findToast.ts
│ │ │ ├── getCardStyle.ts
│ │ │ ├── getId.ts
│ │ │ ├── getPosition.ts
│ │ │ └── index.ts
│ ├── Pagination
│ │ ├── components
│ │ │ ├── defaultPagination.tsx
│ │ │ ├── index.ts
│ │ │ ├── jumper.tsx
│ │ │ ├── page-default-jumper.tsx
│ │ │ ├── page-item.tsx
│ │ │ ├── page-simple-jumper.tsx
│ │ │ ├── pager.tsx
│ │ │ ├── pagination.tsx
│ │ │ ├── simplePagination.tsx
│ │ │ ├── stepPager.tsx
│ │ │ └── totalElement.tsx
│ │ ├── constants.ts
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ ├── store
│ │ │ ├── index.ts
│ │ │ ├── useDefaultPaginationStore.tsx
│ │ │ └── useJumperStore.tsx
│ │ ├── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ ├── util.ts
│ │ └── utils
│ │ │ ├── getAdjustPageSize.ts
│ │ │ ├── getAdjustedCurrent.ts
│ │ │ ├── getAllPages.ts
│ │ │ ├── getBufferSize.ts
│ │ │ ├── getIcon.tsx
│ │ │ ├── getPagerStyle.ts
│ │ │ ├── index.ts
│ │ │ └── limitPageRange.ts
│ ├── Popper-js
│ │ ├── constants.ts
│ │ ├── createPopper.ts
│ │ ├── debounce.ts
│ │ ├── interface.tsx
│ │ ├── modifiers
│ │ │ ├── computeStyles.ts
│ │ │ ├── eventListeners.ts
│ │ │ ├── flip.ts
│ │ │ ├── index.ts
│ │ │ ├── offset.ts
│ │ │ └── popperOffsets.ts
│ │ └── utils
│ │ │ ├── areValidElements.ts
│ │ │ ├── cleanupModifierEffects.ts
│ │ │ ├── computeOffsets.ts
│ │ │ ├── contains.ts
│ │ │ ├── detectOverflow.ts
│ │ │ ├── expandToHashMap.ts
│ │ │ ├── getBasePlacement.ts
│ │ │ ├── getBoundingClientRect.ts
│ │ │ ├── getClippingRect.ts
│ │ │ ├── getCompositeRect.ts
│ │ │ ├── getContainingBlock.ts
│ │ │ ├── getDocumentElement.ts
│ │ │ ├── getDocumentRect.ts
│ │ │ ├── getFreshSideObject.ts
│ │ │ ├── getHTMLElementScroll.ts
│ │ │ ├── getLayoutRect.ts
│ │ │ ├── getMainAxisFromPlacement.ts
│ │ │ ├── getNodeName.ts
│ │ │ ├── getNodeScroll.ts
│ │ │ ├── getOffsetParent.ts
│ │ │ ├── getOppositePlacement.ts
│ │ │ ├── getOppositeVariationPlacement.ts
│ │ │ ├── getParentNode.ts
│ │ │ ├── getScrollParent.ts
│ │ │ ├── getTrueOffsetParent.ts
│ │ │ ├── getVariation.ts
│ │ │ ├── getViewportRect.ts
│ │ │ ├── getWindow.ts
│ │ │ ├── getWindowScroll.ts
│ │ │ ├── getWindowScrollBarX.ts
│ │ │ ├── index.ts
│ │ │ ├── isContainingBlock.ts
│ │ │ ├── isElement.ts
│ │ │ ├── isElementScaled.ts
│ │ │ ├── isHTMLElement.ts
│ │ │ ├── isNode.ts
│ │ │ ├── isSafari.ts
│ │ │ ├── isScrollParent.ts
│ │ │ ├── isTableElement.ts
│ │ │ ├── listScrollParents.ts
│ │ │ ├── mergeByName.ts
│ │ │ ├── mergePaddingObject.ts
│ │ │ ├── rectToClientRect.ts
│ │ │ └── runModifierEffects.ts
│ ├── Popper
│ │ ├── constants.ts
│ │ ├── interface.tsx
│ │ ├── use-popper.ts
│ │ └── utils
│ │ │ ├── fromEntries.ts
│ │ │ └── index.ts
│ ├── Popup
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ ├── popup.tsx
│ │ │ └── popupCard.tsx
│ │ ├── constants.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ ├── useClassNames.tsx
│ │ │ └── useTrigger.tsx
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ ├── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ ├── index.ts
│ │ │ └── mixin.less
│ │ └── utils
│ │ │ ├── applyPopupSlide.ts
│ │ │ ├── callFuncWithDelay.ts
│ │ │ ├── getRefDom.tsx
│ │ │ └── index.ts
│ ├── Portal
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ ├── portal.tsx
│ │ └── utils
│ │ │ ├── getAttach.ts
│ │ │ └── index.ts
│ ├── Radio
│ │ ├── components
│ │ │ ├── group.tsx
│ │ │ ├── index.ts
│ │ │ └── radio.tsx
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ ├── useClassNames.ts
│ │ │ └── useGroupClassNames.ts
│ │ ├── index.tsx
│ │ ├── interface.tsx
│ │ ├── radioContext.ts
│ │ ├── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ └── utils
│ │ │ ├── getMergeProps.ts
│ │ │ └── index.ts
│ ├── SelectInput
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ ├── multipleInput.tsx
│ │ │ ├── selectInput.tsx
│ │ │ └── singleInput.tsx
│ │ ├── constants.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ ├── useClassNames.tsx
│ │ │ ├── useMultiple.tsx
│ │ │ ├── useOverlayInnerStyle.ts
│ │ │ └── useSingle.tsx
│ │ ├── index.ts
│ │ └── interface.tsx
│ ├── Space
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ └── space.tsx
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ └── style
│ │ │ ├── index.less
│ │ │ └── index.ts
│ ├── Spin
│ │ ├── components
│ │ │ ├── InnerLoading.tsx
│ │ │ ├── index.ts
│ │ │ └── spin.tsx
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ ├── useClassNames.ts
│ │ │ └── useDebounceLoading.tsx
│ │ ├── index.tsx
│ │ ├── interface.tsx
│ │ ├── loadingIcon.tsx
│ │ └── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ ├── Style
│ │ ├── base.less
│ │ ├── darkTheme.tsx
│ │ ├── entry.less
│ │ ├── entry.ts
│ │ ├── index.ts
│ │ └── lightTheme.tsx
│ ├── Switch
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ └── switch.tsx
│ │ ├── constants.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ ├── useClassNames.ts
│ │ │ └── useStyles.ts
│ │ ├── index.tsx
│ │ ├── interface.tsx
│ │ └── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ ├── Table
│ │ ├── components
│ │ │ ├── colgroup.tsx
│ │ │ ├── index.ts
│ │ │ ├── table.tsx
│ │ │ ├── tbody
│ │ │ │ ├── expandBodyTreeNode.tsx
│ │ │ │ ├── expandNode.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── operationNode.tsx
│ │ │ │ ├── selectionNode.tsx
│ │ │ │ ├── tbody.tsx
│ │ │ │ ├── td.tsx
│ │ │ │ └── tr.tsx
│ │ │ └── thead
│ │ │ │ ├── column.tsx
│ │ │ │ ├── expandNode.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── operationNode.tsx
│ │ │ │ ├── selectionNode.tsx
│ │ │ │ ├── thead.tsx
│ │ │ │ ├── theadFilter.tsx
│ │ │ │ └── theadSorter.tsx
│ │ ├── constants.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ ├── useColumns.ts
│ │ │ ├── useComponent.tsx
│ │ │ ├── useExpand.tsx
│ │ │ ├── useFilter.tsx
│ │ │ ├── useFilterAndSorter.ts
│ │ │ ├── useGetCellChildren.ts
│ │ │ ├── useMergeFiltersValue.ts
│ │ │ ├── useMergeSorterOrder.ts
│ │ │ ├── usePagination.tsx
│ │ │ ├── useResize.ts
│ │ │ ├── useRowSelection.tsx
│ │ │ ├── useScroll.ts
│ │ │ ├── useSorter.ts
│ │ │ ├── useStickyClassNames.ts
│ │ │ ├── useTableClassName.ts
│ │ │ ├── useThClassNames.ts
│ │ │ └── useUpdate.ts
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ ├── store
│ │ │ ├── index.ts
│ │ │ └── useTable.tsx
│ │ ├── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ │ └── utils
│ │ │ ├── deepCloneColumns.ts
│ │ │ ├── deepCloneData.ts
│ │ │ ├── deleteUnExistKeys.ts
│ │ │ ├── getAllSelectedRowKeys.ts
│ │ │ ├── getColumnByDataIndex.ts
│ │ │ ├── getColumnFixedStyle.ts
│ │ │ ├── getDefaultFiltersAndSorters.ts
│ │ │ ├── getFilterData.ts
│ │ │ ├── getFixedColumns.ts
│ │ │ ├── getFlattenColumns.ts
│ │ │ ├── getFlattenData.ts
│ │ │ ├── getGroupColumns.ts
│ │ │ ├── getInternalColumns.ts
│ │ │ ├── getNextActiveSorters.ts
│ │ │ ├── getNoDataTr.tsx
│ │ │ ├── getNodeDepth.ts
│ │ │ ├── getNodeWidthDepth.ts
│ │ │ ├── getOriginData.ts
│ │ │ ├── getPaddingLeft.tsx
│ │ │ ├── getPageData.ts
│ │ │ ├── getPaginationProps.ts
│ │ │ ├── getProcessedData.ts
│ │ │ ├── getRootDomElement.ts
│ │ │ ├── getRowKey.ts
│ │ │ ├── getRowSelectionType.ts
│ │ │ ├── getScrollBarHeight.ts
│ │ │ ├── getScrollBarWidth.ts
│ │ │ ├── getScrollStyle.ts
│ │ │ ├── getSelectedKeys.ts
│ │ │ ├── getSelectedKeysByData.ts
│ │ │ ├── getSet.ts
│ │ │ ├── getSortData.ts
│ │ │ ├── getSorterFn.ts
│ │ │ ├── getSorterPriority.ts
│ │ │ ├── getStyleTd.ts
│ │ │ ├── getThProps.ts
│ │ │ ├── index.ts
│ │ │ ├── isCheckAllType.ts
│ │ │ ├── isCheckboxType.ts
│ │ │ ├── isChildrenNotEmpty.ts
│ │ │ ├── isDataHaveChildren.ts
│ │ │ ├── isInvalidRenderElement.ts
│ │ │ ├── isRadioType.ts
│ │ │ ├── isValidFilterValue.ts
│ │ │ ├── mergeFiltersValueFn.ts
│ │ │ ├── mergeSorterOrderFn.ts
│ │ │ ├── px2Number.ts
│ │ │ ├── renderExpandIcon.tsx
│ │ │ ├── renderFilters.tsx
│ │ │ ├── renderTbody.tsx
│ │ │ ├── renderThead.tsx
│ │ │ ├── renderTreeTrs.tsx
│ │ │ ├── resetTableClassName.ts
│ │ │ ├── scrollToTop.ts
│ │ │ ├── setDivTableClass.ts
│ │ │ ├── setFixedColumnsClassList.ts
│ │ │ ├── setRowStickyOffset.ts
│ │ │ ├── setSelectPopupPosition.ts
│ │ │ ├── setTableFixedClassName.ts
│ │ │ ├── setTableWidth.ts
│ │ │ ├── shouldRowExpand.ts
│ │ │ ├── sortCompare.ts
│ │ │ ├── updateParent.ts
│ │ │ └── updateStateSorters.ts
│ ├── Tag
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ └── tag.tsx
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ └── useClassNames.ts
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ └── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ ├── Tooltip
│ │ ├── components
│ │ │ ├── Tooltip.tsx
│ │ │ └── index.ts
│ │ ├── hooks
│ │ │ ├── index.ts
│ │ │ └── useClassNames.tsx
│ │ ├── index.ts
│ │ ├── interface.tsx
│ │ └── style
│ │ │ ├── cssVariables.less
│ │ │ ├── index.less
│ │ │ └── index.ts
│ ├── hooks
│ │ ├── index.ts
│ │ ├── useComposition.ts
│ │ ├── useFocusTarp.ts
│ │ ├── useResizeObserver.ts
│ │ ├── useStyles.ts
│ │ └── useUpdate.ts
│ ├── index.ts
│ └── utils
│ │ ├── constants.ts
│ │ ├── fillNBSP.ts
│ │ ├── getHotkeyHandler.ts
│ │ ├── index.ts
│ │ ├── interface.ts
│ │ ├── keycode.ts
│ │ ├── pickDataAttributes.ts
│ │ ├── responsiveObserve.ts
│ │ └── test-utils
│ │ ├── index.ts
│ │ └── render.tsx
│ └── tsconfig.json
├── pnpm-workspace.yaml
├── tsconfig.json
└── vitest.config.ts
/.eslintignore:
--------------------------------------------------------------------------------
1 | snapshot*
2 | dist/
3 | esm/
4 | lib/
5 | cjs/
6 | es/
7 | node_modules/
8 | static
9 | react-icon/
10 | docs/
11 |
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | coverage
4 | .idea
5 | es
6 | lib
7 | dist
8 | esm
9 | cjs
10 | types
11 | package-lock.json
12 | pnpm-lock.yaml
13 | temp*
14 |
15 |
16 |
17 | # eslint
18 | .eslintcache
19 |
20 | # stylelint
21 | .stylelintcache
22 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | . "$(dirname -- "$0")/_/husky.sh"
3 |
4 | pnpm exec lint-staged
5 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | # registry=https://registry.npmjs.com
2 | # proxy=http://127.0.0.1:4780
3 | # https-proxy=https://127.0.0.1:4780
4 | registry=http://registry.npmmirror.com
5 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | **/*.md
2 | **/*.svg
3 | **/*.html
4 | node_modules
5 | package.json
6 | package-lock.json
7 | *.lock
8 | docs/
9 |
--------------------------------------------------------------------------------
/.stylelintignore:
--------------------------------------------------------------------------------
1 | **/*.ts
2 | **/*.tsx
3 | **/*.jsx
4 | **/*.js
5 |
6 | *.*
7 | !*.css
8 | !*.less
9 |
--------------------------------------------------------------------------------
/apps/example/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lio-mengxiang/mx-design/f2ba99463de122c827b37113aa15341319bb3ab2/apps/example/favicon.ico
--------------------------------------------------------------------------------
/apps/example/src/components/APIList/index.ts:
--------------------------------------------------------------------------------
1 | export * from './interfaceList';
2 |
--------------------------------------------------------------------------------
/apps/example/src/components/APIList/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const NAME_SPACE_API_LIST = 'api-list';
2 |
--------------------------------------------------------------------------------
/apps/example/src/components/APIList/locale/en_us.tsx:
--------------------------------------------------------------------------------
1 | export const en_us_api_list = {
2 | PROPERTY: 'Property',
3 | DESCRIPTION: 'Description',
4 | TYPE: 'Type',
5 | DEFAULT: 'Default Value',
6 | IS_OPTIONAL: 'Is Optional',
7 | };
8 |
--------------------------------------------------------------------------------
/apps/example/src/components/APIList/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/components/APIList/locale/zh_cn.tsx:
--------------------------------------------------------------------------------
1 | export const zh_cn_api_list = {
2 | PROPERTY: '参数名',
3 | DESCRIPTION: '属性介绍',
4 | TYPE: '类型',
5 | DEFAULT: '默认值',
6 | IS_OPTIONAL: '是否可选',
7 | };
8 |
--------------------------------------------------------------------------------
/apps/example/src/components/AnchorList/styles/index.module.less:
--------------------------------------------------------------------------------
1 | .anchor-list {
2 | position: relative;
3 | width: 170px;
4 | flex-shrink: 0;
5 | min-height: 100vh;
6 | box-sizing: border-box;
7 | background-color: var(--bg-color-container);
8 | margin-right: 20px;
9 |
10 | &_fixed {
11 | position: fixed;
12 | top: 100px;
13 | height: calc(100vh - 120px);
14 | overflow-y: auto;
15 | }
16 |
17 | @media screen and (max-width: 950px) {
18 | display: none;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/apps/example/src/components/AnchorList/utils/getComponentNameFromUrl.ts:
--------------------------------------------------------------------------------
1 | export function getComponentNameFromUrl(location) {
2 | return location.pathname.split('/')[2].toLocaleUpperCase();
3 | }
4 |
--------------------------------------------------------------------------------
/apps/example/src/components/AnchorList/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './getComponentNameFromUrl';
2 |
--------------------------------------------------------------------------------
/apps/example/src/components/CodePreview/errorMessage.tsx:
--------------------------------------------------------------------------------
1 | import React, { useMemo } from 'react';
2 |
3 | interface ErrorMessageProps {
4 | message?: string;
5 | }
6 |
7 | export function ErrorMessage(props: ErrorMessageProps) {
8 | const { message } = props;
9 | return useMemo(() => {
10 | if (!message) return null;
11 | return (
12 |
13 | {message}
14 |
15 | );
16 | }, [message]);
17 | }
18 |
--------------------------------------------------------------------------------
/apps/example/src/components/CodePreview/hooks/index.ts:
--------------------------------------------------------------------------------
1 | export * from './useCodePreview';
2 |
--------------------------------------------------------------------------------
/apps/example/src/components/CodePreview/index.ts:
--------------------------------------------------------------------------------
1 | export { default as CodePreview } from './codePreview';
2 |
--------------------------------------------------------------------------------
/apps/example/src/components/CodePreview/interface.tsx:
--------------------------------------------------------------------------------
1 | import { CSSProperties } from 'react';
2 |
3 | export interface CodePreviewProps {
4 | /**
5 | * `JSX` source code
6 | */
7 | code?: string;
8 | /**
9 | * Dependent component
10 | */
11 | dependencies?: Record;
12 | demoContainerStyle: CSSProperties;
13 | }
14 |
--------------------------------------------------------------------------------
/apps/example/src/components/CodePreview/utils/compose.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Creates a new composite function that invokes the functions from right to left
3 | */
4 |
5 | export function compose(...functions: ((...args: T[]) => T)[]) {
6 | return functions.reduce(
7 | (acc, currentFn) =>
8 | (...args: T[]) =>
9 | acc(currentFn(...args))
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/apps/example/src/components/CodePreview/utils/errorBoundary.tsx:
--------------------------------------------------------------------------------
1 | import React, { ComponentType, Component } from 'react';
2 |
3 | const errorBoundary = (Element: ComponentType, errorCallback: (error: Error) => void) => {
4 | return class ErrorBoundary extends Component {
5 | componentDidCatch(err: Error) {
6 | errorCallback(err);
7 | }
8 |
9 | render() {
10 | return typeof Element === 'function' ? : React.isValidElement(Element) ? Element : null;
11 | }
12 | };
13 | };
14 |
15 | export default errorBoundary;
16 |
--------------------------------------------------------------------------------
/apps/example/src/components/CodePreview/utils/evalCode.ts:
--------------------------------------------------------------------------------
1 | import type { ComponentType } from 'react';
2 |
3 | export const evalCode = (code: string, dependencies: Record): ComponentType => {
4 | const args = [];
5 | const argv = [];
6 | Object.keys(dependencies).map((key) => {
7 | args.push(key);
8 | argv.push(dependencies[key]);
9 | });
10 | args.push(code || '');
11 | return new Function(...args)(...argv);
12 | };
13 |
--------------------------------------------------------------------------------
/apps/example/src/components/CodePreview/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './generateElement';
2 | export * from './transform';
3 |
--------------------------------------------------------------------------------
/apps/example/src/components/CodePreview/utils/transform.tsx:
--------------------------------------------------------------------------------
1 | import { transform } from '@babel/standalone';
2 | import RemoveImports from 'babel-plugin-transform-remove-imports';
3 |
4 | export function babelTransform(input: string) {
5 | const { code } = transform(input, {
6 | presets: ['react'],
7 | plugins: [[RemoveImports, { removeAll: true }]],
8 | });
9 | return code;
10 | }
11 |
--------------------------------------------------------------------------------
/apps/example/src/components/ConfigProvider/constants.tsx:
--------------------------------------------------------------------------------
1 | import { ZH_CN } from '../../locale/constants';
2 |
3 | export const DEFAULT_LOCALE = ZH_CN;
4 |
--------------------------------------------------------------------------------
/apps/example/src/components/ConfigProvider/index.ts:
--------------------------------------------------------------------------------
1 | import type { ConfigProviderProps } from './interface';
2 |
3 | export type { ConfigProviderProps };
4 | export * from './configProvider';
5 |
--------------------------------------------------------------------------------
/apps/example/src/components/ConfigProvider/interface.ts:
--------------------------------------------------------------------------------
1 | import { ITheme } from '@/utils/setTheme/interface';
2 | import { ZH_CN, EN_US } from '../../locale/constants';
3 |
4 | export interface ConfigProviderProps {
5 | lang?: typeof ZH_CN | typeof EN_US;
6 | setLang?: (lang: ConfigProviderProps['lang']) => void;
7 | theme?: ITheme['type'];
8 | setTheme?: (theme: ITheme['type']) => void;
9 | }
10 |
--------------------------------------------------------------------------------
/apps/example/src/components/DemoBlock/ComponentCodeBlock.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import * as MX from '@mx-design/web';
3 | import { DemoBlock } from '@/components/DemoBlock';
4 | import { CodePreview } from '@/components/CodePreview';
5 |
6 | export function ComponentCodeBlock({ title, desc, code, namespace, demoContainerStyle }) {
7 | return (
8 |
9 |
10 |
11 | );
12 | }
13 |
--------------------------------------------------------------------------------
/apps/example/src/components/DemoBlock/componentBlock.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { DemoBlock } from '@/components/DemoBlock';
3 |
4 | export function ComponentBlock({ title, desc, component, namespace }) {
5 | return (
6 |
7 | {component}
8 |
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/apps/example/src/components/DemoBlock/demoBlock.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import styles from './styles/index.module.less';
3 |
4 | export function DemoBlock(props) {
5 | const { title, children, desc, namespace } = props;
6 | return (
7 |
8 |
9 | {title}
10 |
11 |
{desc}
12 |
{children}
13 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/apps/example/src/components/DemoBlock/index.tsx:
--------------------------------------------------------------------------------
1 | export * from './demoBlock';
2 | export * from './componentBlock';
3 | export * from './ComponentCodeBlock';
4 |
--------------------------------------------------------------------------------
/apps/example/src/components/ErrorBoundary/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { useRouteError } from 'react-router-dom';
3 |
4 | type RouteError = Error & { status?: number; statusText?: string };
5 |
6 | function ErrorBoundary() {
7 | const err = useRouteError() as RouteError;
8 |
9 | return (
10 |
11 | Error {err.status || 500}: {err.statusText ?? err.message}
12 |
13 | );
14 | }
15 |
16 | export default ErrorBoundary;
17 |
--------------------------------------------------------------------------------
/apps/example/src/components/Layout/AppLayout.tsx:
--------------------------------------------------------------------------------
1 | import React, { useRef } from 'react';
2 | import { Outlet } from 'react-router-dom';
3 | import NavBar from '../NavBar';
4 |
5 | function AppLayout() {
6 | return (
7 |
8 |
9 |
10 |
11 | );
12 | }
13 | export default AppLayout;
14 |
--------------------------------------------------------------------------------
/apps/example/src/components/Layout/constants.ts:
--------------------------------------------------------------------------------
1 | export const initial = { opacity: 0 };
2 | export const animate = { opacity: 1 };
3 | export const exit = { opacity: 0 };
4 |
--------------------------------------------------------------------------------
/apps/example/src/components/Layout/styles/index.module.less:
--------------------------------------------------------------------------------
1 | .app-container {
2 | padding-top: 60px;
3 | display: flex;
4 | background-color: var(--bg-color-container);
5 | overflow-x: hidden;
6 | }
7 |
8 | .content-container {
9 | position: relative;
10 | width: 100%;
11 | max-width: 1100px;
12 | margin: 0 auto;
13 | padding: 0 56px;
14 | box-sizing: border-box;
15 | overflow: hidden;
16 | }
--------------------------------------------------------------------------------
/apps/example/src/components/Logo/index.ts:
--------------------------------------------------------------------------------
1 | export * from './logoIcon';
2 |
--------------------------------------------------------------------------------
/apps/example/src/components/Logo/logoIcon.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { IconM, IconDesign, Space } from '@mx-design/web';
3 | import styles from './styles/index.module.less';
4 |
5 | export function IconLogo() {
6 | return (
7 |
8 |
9 |
10 |
11 | );
12 | }
13 |
14 | IconLogo.displayName = 'IconLogo';
15 |
--------------------------------------------------------------------------------
/apps/example/src/components/Logo/styles/index.module.less:
--------------------------------------------------------------------------------
1 | .logo-m {
2 | height: 60px;
3 | color: var(--brand-color)
4 | }
5 |
6 | .logo-design {
7 | height: 60px;
8 | margin-top: 3px;
9 | }
10 |
--------------------------------------------------------------------------------
/apps/example/src/components/Menu/components/Menu/utils/handleNavigate.ts:
--------------------------------------------------------------------------------
1 | export function handleNavigate({ navigate, path }) {
2 | return () => navigate(path);
3 | }
4 |
--------------------------------------------------------------------------------
/apps/example/src/components/Menu/components/Menu/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './handleNavigate';
2 |
--------------------------------------------------------------------------------
/apps/example/src/components/Menu/components/index.ts:
--------------------------------------------------------------------------------
1 | export * from './CollapseBtn';
2 | export * from './Menu';
3 |
--------------------------------------------------------------------------------
/apps/example/src/components/Menu/constants.ts:
--------------------------------------------------------------------------------
1 | export const variants = {
2 | open: { width: 260 },
3 | closed: { width: 10, padding: 0 },
4 | };
5 |
6 | export const menu_variants = {
7 | open: { x: 0 },
8 | closed: { x: -250 },
9 | };
10 |
11 | export const btn_variants = {
12 | open: { x: 248 },
13 | closed: { x: 0 },
14 | };
15 |
--------------------------------------------------------------------------------
/apps/example/src/components/Menu/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const NAME_SPACE_SITE_MENU = 'site-menu';
2 |
--------------------------------------------------------------------------------
/apps/example/src/components/Menu/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/components/Menu/styles/index.module.less:
--------------------------------------------------------------------------------
1 | @import (reference) '../../../styles/common.less';
2 |
3 | .menu-container {
4 | position: relative;
5 | width: 260px;
6 | flex-shrink: 0;
7 | min-height: 100vh;
8 | box-sizing: border-box;
9 | background-color: var(--bg-color-container);
10 | box-shadow: var(--shadow-out-right);
11 |
12 | .menu-collapse-btn {
13 | position: fixed;
14 | top: 240px;
15 | z-index: 2;
16 | .btn-circle;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/apps/example/src/components/NavBar/components/Logo.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { IconLogo } from '../../Logo';
3 | import styles from '../styles/index.module.less';
4 |
5 | export function Logo() {
6 | return (
7 |
8 |
9 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/apps/example/src/components/NavBar/components/TutorialsDropdown/Icon/index.ts:
--------------------------------------------------------------------------------
1 | export * from './cliIcon';
2 | export * from './componentsIcon';
3 |
--------------------------------------------------------------------------------
/apps/example/src/components/NavBar/components/TutorialsDropdown/components/TutorialsDropdown.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Card } from './Card';
3 |
4 | export function TutorialsDropdown(props) {
5 | const { lists, onClickMenuItem } = props;
6 |
7 | return (
8 | <>
9 | {lists.map((list, index) => (
10 |
11 | ))}
12 | >
13 | );
14 | }
15 |
--------------------------------------------------------------------------------
/apps/example/src/components/NavBar/components/TutorialsDropdown/components/index.ts:
--------------------------------------------------------------------------------
1 | export * from './TutorialsDropdown';
2 | export * from './DropdownButton';
3 |
--------------------------------------------------------------------------------
/apps/example/src/components/NavBar/components/TutorialsDropdown/hooks.ts/index.ts:
--------------------------------------------------------------------------------
1 | export * from './useStore';
2 |
--------------------------------------------------------------------------------
/apps/example/src/components/NavBar/components/TutorialsDropdown/index.ts:
--------------------------------------------------------------------------------
1 | export * from './components';
2 |
--------------------------------------------------------------------------------
/apps/example/src/components/NavBar/components/TutorialsDropdown/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const NAME_SPACE_NAV_BAR = 'NAV_BAR';
2 | export const Tutorial = 'Tutorial';
3 |
--------------------------------------------------------------------------------
/apps/example/src/components/NavBar/components/TutorialsDropdown/locale/en_us.tsx:
--------------------------------------------------------------------------------
1 | export const en_us_nav_bar = {
2 | TutorialTitle: 'Component UI Library Tutorial',
3 | cliTitle: 'Component Library CLI Tool Tutorial',
4 | cliText: 'How to build a CLI tools about React Component UI Library',
5 | componentTitle: 'React UI Component Fundamentals Analysis',
6 | componentText: 'The idea of realizing each UI component',
7 | };
8 |
--------------------------------------------------------------------------------
/apps/example/src/components/NavBar/components/TutorialsDropdown/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/components/NavBar/components/TutorialsDropdown/locale/zh_cn.tsx:
--------------------------------------------------------------------------------
1 | export const zh_cn_nav_bar = {
2 | TutorialTitle: '组件库教程',
3 | cliTitle: '组件库CLI工具教程',
4 | cliText: '如何沉淀组件库开发环境和打包配置CLI工具教程',
5 | componentTitle: '组件基本原理分析',
6 | componentText: '实现组件库各个组件的思路',
7 | };
8 |
--------------------------------------------------------------------------------
/apps/example/src/components/NavBar/components/index.ts:
--------------------------------------------------------------------------------
1 | export * from './Logo';
2 | export * from './SelectLang';
3 | export * from './SelectTheme';
4 | export * from './GithubLink';
5 | export * from './TutorialsDropdown';
6 |
--------------------------------------------------------------------------------
/apps/example/src/components/Status/constants.ts:
--------------------------------------------------------------------------------
1 | export const homePath = '/components/icon';
2 | export const size = ['480px', '360px'];
3 |
--------------------------------------------------------------------------------
/apps/example/src/components/Status/interface.ts:
--------------------------------------------------------------------------------
1 | import { ReactNode } from "react"
2 |
3 | export interface ErrorPageProps {
4 | title: string
5 | des: string
6 | img: ReactNode
7 | children: ReactNode
8 | }
9 |
--------------------------------------------------------------------------------
/apps/example/src/components/Status/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const NAME_SPACE_STATUS = 'STATUS';
2 | export const DESC_404 = 'DESC_404';
3 | export const TRY_AGAIN = 'TRY_AGAIN';
4 | export const BACK = 'BACK';
5 |
--------------------------------------------------------------------------------
/apps/example/src/components/Status/locale/en_us.tsx:
--------------------------------------------------------------------------------
1 | import { BACK, DESC_404, TRY_AGAIN } from './constants';
2 |
3 | export const en_us_status = {
4 | [DESC_404]: '无法找到页面',
5 | [TRY_AGAIN]: 'Retry',
6 | [BACK]: 'Back to Home',
7 | };
8 |
--------------------------------------------------------------------------------
/apps/example/src/components/Status/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/components/Status/locale/zh_cn.tsx:
--------------------------------------------------------------------------------
1 | import { DESC_404, TRY_AGAIN, BACK } from './constants';
2 |
3 | export const zh_cn_status = {
4 | [DESC_404]: '无法找到页面',
5 | [TRY_AGAIN]: '重试',
6 | [BACK]: '返回主页',
7 | };
8 |
--------------------------------------------------------------------------------
/apps/example/src/hooks/index.ts:
--------------------------------------------------------------------------------
1 | export * from './useLang';
2 | export * from './useTheme';
3 |
--------------------------------------------------------------------------------
/apps/example/src/hooks/setTheme/constants.ts:
--------------------------------------------------------------------------------
1 | export const LIGHT = 'light';
2 | export const DARK = 'dark';
3 | export const THEME = 'theme';
4 |
5 | export const THEME_MODE_TYPE = {
6 | [LIGHT]: LIGHT,
7 | [DARK]: DARK,
8 | };
9 |
--------------------------------------------------------------------------------
/apps/example/src/hooks/setTheme/getTheme.ts:
--------------------------------------------------------------------------------
1 | import { getLocalStorage } from '@mx-design/web-utils';
2 | import { THEME } from './constants';
3 | import { ITheme } from './interface';
4 |
5 | export function getTheme(): ITheme['type'] {
6 | return getLocalStorage(THEME) as ITheme['type'];
7 | }
8 |
--------------------------------------------------------------------------------
/apps/example/src/hooks/setTheme/index.ts:
--------------------------------------------------------------------------------
1 | export * from './setTheme';
2 | export * from './getTheme';
3 |
--------------------------------------------------------------------------------
/apps/example/src/hooks/setTheme/interface.ts:
--------------------------------------------------------------------------------
1 | import { DARK, LIGHT } from './constants';
2 |
3 | export interface ITheme {
4 | type: typeof LIGHT | typeof DARK;
5 | }
6 |
7 | export type IThemeList = { themeName: string; content: Record }[];
8 |
--------------------------------------------------------------------------------
/apps/example/src/hooks/setTheme/setTheme.ts:
--------------------------------------------------------------------------------
1 | import { setLocalStorage } from '@mx-design/web-utils';
2 | import { THEME } from './constants';
3 |
4 | export function setTheme(_setTheme) {
5 | return (theme) => {
6 | setLocalStorage(THEME, theme);
7 | _setTheme(theme);
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Alert/alias.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Anchor/alias.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Checkbox/alias.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/ConfigProvider/alias.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Dropdown/alias.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Empty/alias.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "IEmptyImage",
4 | "isExported": true,
5 | "isDefaultExport": false,
6 | "hasDeclareKeyword": false,
7 | "docs": [],
8 | "type": "({ imgSrc, alt, icon }: { imgSrc: EmptyProps['imgSrc']; alt: string; icon?: EmptyProps['icon'] }) => ReactNode",
9 | "typeParameters": [],
10 | "kind": 38
11 | }
12 | ]
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/GridLayout/alias.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Icon/interface.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Input/alias.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "RefInputType",
4 | "isExported": true,
5 | "isDefaultExport": false,
6 | "hasDeclareKeyword": false,
7 | "docs": [],
8 | "type": "{\n /** 使输入框失去焦点 */\n blur: () => void;\n /** 使输入框获取焦点 */\n focus: () => void;\n /** input dom元素 */\n inputDom: HTMLInputElement;\n}",
9 | "typeParameters": [],
10 | "kind": 38
11 | }
12 | ]
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Message/alias.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Pagination/alias.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "itemRenderType",
4 | "isExported": true,
5 | "isDefaultExport": false,
6 | "hasDeclareKeyword": false,
7 | "docs": [],
8 | "type": "(page: number, type: 'page' | 'more' | 'prev' | 'next', originElement: ReactNode) => ReactNode",
9 | "typeParameters": [],
10 | "kind": 38
11 | }
12 | ]
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Portal/alias.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "AttachNodeReturnValue",
4 | "isExported": true,
5 | "isDefaultExport": false,
6 | "hasDeclareKeyword": false,
7 | "docs": [],
8 | "type": "HTMLElement | Element | Document | string",
9 | "typeParameters": [],
10 | "kind": 38
11 | }
12 | ]
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Radio/alias.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Space/alias.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Spin/alias.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Switch/alias.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Tag/alias.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/example/src/interfaceDocs/Tooltip/alias.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/example/src/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const REGEXP = /\{\s*([\w-]+)\s*\}/g;
2 | export const ZH_CN = 'zh_cn';
3 | export const EN_US = 'en_us';
4 | export const LANG = 'lang';
5 | export const LANG_LIST = [ZH_CN, EN_US];
6 |
--------------------------------------------------------------------------------
/apps/example/src/locale/index.ts:
--------------------------------------------------------------------------------
1 | import { EN_US, ZH_CN } from './constants';
2 | import { en_us } from './lang/en_us';
3 | import { zh_cn } from './lang/zh_cn';
4 |
5 | const local = {
6 | [ZH_CN]: zh_cn,
7 | [EN_US]: en_us,
8 | } as const;
9 |
10 | type Ilocal = typeof local;
11 | export { local };
12 | export type { Ilocal };
13 |
--------------------------------------------------------------------------------
/apps/example/src/locale/useLocal/transformLocale.ts:
--------------------------------------------------------------------------------
1 | import { REGEXP } from '../constants';
2 |
3 | export function transformLocale(pattern: string, placement?: Record): string {
4 | if (typeof pattern === 'string') {
5 | if (!placement || !REGEXP.test(pattern)) return pattern;
6 | return pattern.replace(REGEXP, (_, key) => {
7 | if (placement) return String(placement[key]);
8 | return '';
9 | });
10 | }
11 |
12 | return '';
13 | }
14 |
--------------------------------------------------------------------------------
/apps/example/src/pages/affix/examples/index.ts:
--------------------------------------------------------------------------------
1 | import { basic } from './basic';
2 | import { container } from './container';
3 |
4 | export const exampleList = {
5 | [basic.namespace]: basic,
6 | [container.namespace]: container,
7 | };
8 |
--------------------------------------------------------------------------------
/apps/example/src/pages/affix/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Container = 'Container';
3 |
--------------------------------------------------------------------------------
/apps/example/src/pages/affix/locale/en_us.tsx:
--------------------------------------------------------------------------------
1 | import { Basic, Container } from './constants';
2 | import React from 'react';
3 |
4 | export const en_us_affix = {
5 | [Basic]: {
6 | title: 'Basic Affix',
7 | desc: (
8 | <>
9 | Suitable for scenes with simple page, the default container is body
10 | >
11 | ),
12 | },
13 | [Container]: {
14 | title: 'Specifies the container',
15 | desc: 'Fixed elements relative to a specific container',
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/apps/example/src/pages/affix/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/affix/locale/zh_cn.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Basic, Container } from './constants';
3 |
4 | export const zh_cn_affix = {
5 | [Basic]: {
6 | title: '基础固钉',
7 | desc: (
8 | <>
9 | 适用于页面结构简单的场景,默认容器是 body
10 | >
11 | ),
12 | },
13 | [Container]: {
14 | title: '指定挂载的容器',
15 | desc: '相对于特定的容器来固定元素',
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/apps/example/src/pages/alert/examples/basic.tsx:
--------------------------------------------------------------------------------
1 | import { Basic } from '../locale';
2 |
3 | const code = `
4 | import { Alert } from '@mx-design/web';
5 |
6 | function App() {
7 | return ;
8 | }`;
9 |
10 | export const basic = {
11 | code,
12 | namespace: Basic,
13 | };
14 |
--------------------------------------------------------------------------------
/apps/example/src/pages/alert/examples/noIcon.tsx:
--------------------------------------------------------------------------------
1 | import { NoIcon } from '../locale';
2 |
3 | const code = `
4 | import { Alert, Space } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 |
10 |
11 |
12 | );
13 | }
14 | `;
15 |
16 | export const noIcon = {
17 | code,
18 | namespace: NoIcon,
19 | };
20 |
--------------------------------------------------------------------------------
/apps/example/src/pages/alert/examples/operation.tsx:
--------------------------------------------------------------------------------
1 | import { Operation } from '../locale';
2 |
3 | const code = `
4 | import { Alert } from '@mx-design/web';
5 |
6 | function App() {
7 | return Button} />;
8 | }`;
9 |
10 | export const operation = {
11 | code,
12 | namespace: Operation,
13 | };
14 |
--------------------------------------------------------------------------------
/apps/example/src/pages/alert/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Type = 'Type';
3 | export const Custom = 'Custom';
4 | export const Closable = 'Closable';
5 | export const NoIcon = 'NoIcon';
6 | export const Operation = 'Operation';
7 | export const Title = 'Title';
8 |
--------------------------------------------------------------------------------
/apps/example/src/pages/alert/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/anchor/examples/index.ts:
--------------------------------------------------------------------------------
1 | import { basic } from './basic';
2 | import { affix } from './affix';
3 | import { lineless } from './lineless';
4 | import { scrollBoundary } from './scrollBoundary';
5 |
6 | export const exampleList = {
7 | [basic.namespace]: basic,
8 | [affix.namespace]: affix,
9 | [scrollBoundary.namespace]: scrollBoundary,
10 | [lineless.namespace]: lineless,
11 | };
12 |
--------------------------------------------------------------------------------
/apps/example/src/pages/anchor/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Affix = 'Affix';
3 | export const Lineless = 'Lineless';
4 | export const ScrollBoundary = 'ScrollBoundary';
5 |
--------------------------------------------------------------------------------
/apps/example/src/pages/anchor/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/button/examples/basic.tsx:
--------------------------------------------------------------------------------
1 | import { Basic } from '../locale';
2 |
3 | const code = `
4 | import { Space, Button } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 | );
14 | }`;
15 |
16 | export const basic = {
17 | code,
18 | namespace: Basic,
19 | };
20 |
--------------------------------------------------------------------------------
/apps/example/src/pages/button/examples/icon.tsx:
--------------------------------------------------------------------------------
1 | import { Icon } from '../locale';
2 |
3 | const code = `
4 | import { Space, Button, IconAdd, IconAshbin } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 | } />
10 | }>
11 | Delete
12 |
13 |
14 | )
15 | }`;
16 |
17 | export const icon = {
18 | code,
19 | namespace: Icon,
20 | };
21 |
--------------------------------------------------------------------------------
/apps/example/src/pages/button/examples/index.ts:
--------------------------------------------------------------------------------
1 | import { basic } from './basic';
2 | import { icon } from './icon';
3 | import { status } from './status';
4 | import { disabled } from './disabled';
5 | import { loading } from './loading';
6 | import { group } from './group';
7 | import { long } from './long';
8 |
9 | export const exampleList = {
10 | [basic.namespace]: basic,
11 | [icon.namespace]: icon,
12 | [status.namespace]: status,
13 | [disabled.namespace]: disabled,
14 | [loading.namespace]: loading,
15 | [group.namespace]: group,
16 | [long.namespace]: long,
17 | };
18 |
--------------------------------------------------------------------------------
/apps/example/src/pages/button/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Icon = 'Icon';
3 | export const Status = 'Status';
4 | export const Disabled = 'Disabled';
5 | export const Loading = 'Loading';
6 | export const Group = 'Group';
7 | export const Long = 'Long';
8 | export const Compact = 'Compact';
9 |
--------------------------------------------------------------------------------
/apps/example/src/pages/button/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/checkbox/examples/index.ts:
--------------------------------------------------------------------------------
1 | import { basic } from './basic';
2 | import { controlled } from './controlled';
3 | import { group } from './group';
4 | import { all } from './all';
5 | import { customContent } from './customContent';
6 |
7 | export const exampleList = {
8 | [basic.namespace]: basic,
9 | [controlled.namespace]: controlled,
10 | [group.namespace]: group,
11 | [all.namespace]: all,
12 | [customContent.namespace]: customContent,
13 | };
14 |
--------------------------------------------------------------------------------
/apps/example/src/pages/checkbox/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Controlled = 'Controlled';
3 | export const Group = 'Group';
4 | export const All = 'All';
5 | export const CustomIcon = 'CustomIcon';
6 | export const CustomContent = 'CustomContent';
7 |
--------------------------------------------------------------------------------
/apps/example/src/pages/checkbox/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/drawer/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Position = 'Position';
3 | export const CustomizedElement = 'CustomizedElement';
4 | export const MultiLayer = 'MultiLayer';
5 | export const Mount = 'Mount';
6 | export const Update = 'Update';
7 |
--------------------------------------------------------------------------------
/apps/example/src/pages/drawer/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/dropdown/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Other = 'Other';
3 | export const DifferentTrigger = 'DifferentTrigger';
4 | export const Position = 'Position';
5 | export const FloatingLayer = 'FloatingLayer';
6 | export const Controlled = 'Controlled';
7 | export const Mount = 'Mount';
8 | export const Disabled = 'Disabled';
9 | export const GetDisabledStatus = 'GetDisabledStatus';
10 | export const ItemStyle = 'ItemStyle';
11 |
--------------------------------------------------------------------------------
/apps/example/src/pages/dropdown/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/empty/examples/basic.tsx:
--------------------------------------------------------------------------------
1 | import { Basic } from '../locale';
2 |
3 | const code = `
4 | import { Empty } from '@mx-design/web';
5 |
6 | function App() {
7 | return ;
8 | };`;
9 |
10 | export const basic = {
11 | code,
12 | namespace: Basic,
13 | };
14 |
--------------------------------------------------------------------------------
/apps/example/src/pages/empty/examples/customPic.tsx:
--------------------------------------------------------------------------------
1 | import { CustomPic } from '../locale';
2 |
3 | const code = `
4 | import { Empty, Button } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 | Refresh}
11 | />
12 | );
13 | };`;
14 |
15 | export const customPic = {
16 | code,
17 | namespace: CustomPic,
18 | };
19 |
--------------------------------------------------------------------------------
/apps/example/src/pages/empty/examples/index.ts:
--------------------------------------------------------------------------------
1 | import { basic } from './basic';
2 | import { customIcon } from './customIcon';
3 | import { customPic } from './customPic';
4 |
5 | export const exampleList = {
6 | [basic.namespace]: basic,
7 | [customIcon.namespace]: customIcon,
8 | [customPic.namespace]: customPic,
9 | };
10 |
--------------------------------------------------------------------------------
/apps/example/src/pages/empty/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const CustomIcon = 'CustomIcon';
3 | export const CustomPic = 'CustomPic';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/empty/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/grid/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const OffsetOfCol = 'OffsetOfCol';
3 | export const PushPull = 'PushPull';
4 | export const IntervalOfGrid = 'IntervalOfGrid';
5 | export const HorizontalLayout = 'HorizontalLayout';
6 | export const VerticalLayout = 'VerticalLayout';
7 | export const ResponsiveLayout = 'ResponsiveLayout';
8 | export const Order = 'Order';
9 | export const AdvancedResponsiveLayout = 'AdvancedResponsiveLayout';
10 | export const Flex = 'Flex';
11 |
--------------------------------------------------------------------------------
/apps/example/src/pages/grid/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/gridLayout/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Column = 'Column';
2 | export const Responsive = 'Responsive';
3 | export const HolyGrail = 'HolyGrail';
4 | export const ContainerAlign = 'ContainerAlign';
5 | export const ContainerJustify = 'ContainerJustify';
6 | export const Position = 'Position';
7 | export const Basic = 'Basic';
8 |
--------------------------------------------------------------------------------
/apps/example/src/pages/gridLayout/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/icon/examples/basic.tsx:
--------------------------------------------------------------------------------
1 | import { Basic } from '../locale';
2 |
3 | const code = `
4 | import { IconSmile } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 |
10 |
11 |
12 | )
13 | }`;
14 |
15 | export const basic = {
16 | code,
17 | namespace: Basic,
18 | };
19 |
--------------------------------------------------------------------------------
/apps/example/src/pages/icon/examples/data.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { LineData } from '@mx-design/web';
3 | import styles from '../style/index.module.less';
4 | import IconItem from './iconItem';
5 | import { Data } from '../locale';
6 |
7 | const getLineDataIcon = () =>
8 | Object.keys(LineData).map((Item, index) => {
9 | const I = LineData[Item];
10 | return ;
11 | });
12 | export const data = {
13 | component: {getLineDataIcon()}
,
14 | namespace: Data,
15 | };
16 |
--------------------------------------------------------------------------------
/apps/example/src/pages/icon/examples/iconFont.tsx:
--------------------------------------------------------------------------------
1 | import { IconFont } from '../locale';
2 |
3 | const code = `
4 | import { createFromIconfont } from '@mx-design/web';
5 |
6 | function App() {
7 | // pass url
8 | const IconFont = createFromIconfont('//at.alicdn.com/t/c/font_3337530_4kpk3x87pyc.js')
9 | return ;
10 | }`;
11 |
12 | export const iconFont = {
13 | code,
14 | namespace: IconFont,
15 | };
16 |
--------------------------------------------------------------------------------
/apps/example/src/pages/icon/examples/loading.tsx:
--------------------------------------------------------------------------------
1 | import { Loading } from '../locale';
2 |
3 | const code = `
4 | import { Loading, IconLoading, Space } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 |
10 |
11 |
12 | )
13 | }`;
14 |
15 | export const loading = {
16 | code,
17 | namespace: Loading,
18 | };
19 |
--------------------------------------------------------------------------------
/apps/example/src/pages/icon/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Loading = 'Loading';
3 | export const Custom = 'Custom';
4 | export const IconFont = 'IconFont';
5 | export const PromptSuggestion = 'PromptSuggestion';
6 | export const DirectionIndicator = 'DirectionIndicator';
7 | export const Editable = 'Editable';
8 | export const InteractiveButton = 'InteractiveButton';
9 | export const Data = 'Data';
10 |
--------------------------------------------------------------------------------
/apps/example/src/pages/icon/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/input/examples/basic.tsx:
--------------------------------------------------------------------------------
1 | import { Basic } from '../locale';
2 |
3 | const code = `
4 | import { Input } from '@mx-design/web';
5 |
6 | function App() {
7 | return ;
8 | }`;
9 |
10 | export const basic = {
11 | code,
12 | namespace: Basic,
13 | };
14 |
--------------------------------------------------------------------------------
/apps/example/src/pages/input/examples/password.tsx:
--------------------------------------------------------------------------------
1 | import { Password } from '../locale';
2 |
3 | const code = `
4 | import { Space, Input } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 |
10 |
11 |
12 | );
13 | }`;
14 |
15 | export const password = {
16 | code,
17 | namespace: Password,
18 | };
19 |
--------------------------------------------------------------------------------
/apps/example/src/pages/input/examples/status.tsx:
--------------------------------------------------------------------------------
1 | import { Status } from '../locale';
2 |
3 | const code = `
4 | import { GridLayout, Input } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 | );
14 | }`;
15 |
16 | export const status = {
17 | code,
18 | namespace: Status,
19 | };
20 |
--------------------------------------------------------------------------------
/apps/example/src/pages/input/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Status = 'Status';
3 | export const Label = 'Label';
4 | export const Suffix = 'Suffix';
5 | export const Search = 'Search';
6 | export const Limit = 'Limit';
7 | export const Password = 'Password';
8 | export const Normalize = 'Normalize';
9 |
--------------------------------------------------------------------------------
/apps/example/src/pages/input/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/inputTag/examples/save-on-blur.tsx:
--------------------------------------------------------------------------------
1 | import { SaveOnBlur } from '../locale';
2 |
3 | const code = `
4 | import { InputTag } from '@mx-design/web';
5 |
6 | function App() {
7 | return ;
8 | }`;
9 |
10 | export const saveOnBlur = {
11 | code,
12 | namespace: SaveOnBlur,
13 | };
14 |
--------------------------------------------------------------------------------
/apps/example/src/pages/inputTag/examples/token-separator.tsx:
--------------------------------------------------------------------------------
1 | import { TokenSeparator } from '../locale';
2 |
3 | const code = `
4 | import { GridLayout, InputTag } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 |
China,USA|UK
10 |
11 |
12 | );
13 | }
14 | `;
15 |
16 | export const tokenSeparator = {
17 | code,
18 | namespace: TokenSeparator,
19 | };
20 |
--------------------------------------------------------------------------------
/apps/example/src/pages/inputTag/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const PrefixSuffix = 'PrefixSuffix';
3 | export const LabelInValue = 'LabelInValue';
4 | export const ValidateFormat = 'ValidateFormat';
5 | export const SaveOnBlur = 'SaveOnBlur';
6 | export const RenderTag = 'RenderTag';
7 | export const TokenSeparator = 'TokenSeparator';
8 |
--------------------------------------------------------------------------------
/apps/example/src/pages/inputTag/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/inputTag/style/index.ts:
--------------------------------------------------------------------------------
1 | import '../../style/index.less';
2 | import '../../Tag/style';
3 | import './index.less';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/message/examples/basic.tsx:
--------------------------------------------------------------------------------
1 | import { Basic } from '../locale';
2 |
3 | const code = `
4 | import { MessageStore, Button } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
18 | );
19 | };`;
20 |
21 | export const basic = {
22 | code,
23 | namespace: Basic,
24 | };
25 |
--------------------------------------------------------------------------------
/apps/example/src/pages/message/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Different = 'Different';
3 | export const Position = 'Position';
4 | export const Close = 'Close';
5 | export const Custom = 'Custom';
6 | export const ShowClose = 'ShowClose';
7 | export const Update = 'Update';
8 |
--------------------------------------------------------------------------------
/apps/example/src/pages/message/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/modal/examples/index.ts:
--------------------------------------------------------------------------------
1 | import { basic } from './basic';
2 | import { async } from './async';
3 | import { footer } from './footer';
4 | import { feedback } from './feedback';
5 | import { position } from './position';
6 |
7 | import { update } from './update';
8 |
9 | export const exampleList = {
10 | [basic.namespace]: basic,
11 | [async.namespace]: async,
12 | [footer.namespace]: footer,
13 | [feedback.namespace]: feedback,
14 | [position.namespace]: position,
15 | [update.namespace]: update,
16 | };
17 |
--------------------------------------------------------------------------------
/apps/example/src/pages/modal/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Async = 'Async';
3 | export const Footer = 'Footer';
4 | export const Feedback = 'Feedback';
5 | export const Position = 'Position';
6 | export const Update = 'Update';
7 |
--------------------------------------------------------------------------------
/apps/example/src/pages/modal/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/notification/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Different = 'Different';
3 | export const Position = 'Position';
4 | export const Close = 'Close';
5 | export const CustomBtn = 'CustomBtn';
6 | export const CustomIcon = 'CustomIcon';
7 | export const CustomStyle = 'CustomStyle';
8 | export const ShowClose = 'ShowClose';
9 | export const Update = 'Update';
10 |
--------------------------------------------------------------------------------
/apps/example/src/pages/notification/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/pagination/examples/basic.tsx:
--------------------------------------------------------------------------------
1 | import { Basic } from '../locale';
2 |
3 | const code = `
4 | import { Pagination } from '@mx-design/web';
5 |
6 | function App() {
7 | return ;
8 | };`;
9 |
10 | export const basic = {
11 | code,
12 | namespace: Basic,
13 | };
14 |
--------------------------------------------------------------------------------
/apps/example/src/pages/pagination/examples/pageJumper.tsx:
--------------------------------------------------------------------------------
1 | import { PageJumper } from '../locale';
2 |
3 | const code = `
4 | import { Pagination } from '@mx-design/web';
5 |
6 | function App(){
7 | return ;
8 | }`;
9 |
10 | export const pageJumper = {
11 | code,
12 | namespace: PageJumper,
13 | };
14 |
--------------------------------------------------------------------------------
/apps/example/src/pages/pagination/examples/simple.tsx:
--------------------------------------------------------------------------------
1 | import { Simple } from '../locale';
2 |
3 | const code = `
4 | import { Pagination } from '@mx-design/web';
5 |
6 | function App() {
7 | return ;
8 | };`;
9 |
10 | export const simple = {
11 | code,
12 | namespace: Simple,
13 | };
14 |
--------------------------------------------------------------------------------
/apps/example/src/pages/pagination/examples/total.tsx:
--------------------------------------------------------------------------------
1 | import { Total } from '../locale';
2 |
3 | const code = `
4 | import { Pagination } from '@mx-design/web';
5 |
6 | function App() {
7 | return ;
8 | };`;
9 |
10 | export const total = {
11 | code,
12 | namespace: Total,
13 | };
14 |
--------------------------------------------------------------------------------
/apps/example/src/pages/pagination/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const PageJumper = 'PageJumper';
3 | export const Step = 'Step';
4 | export const Total = 'Total';
5 | export const BufferSize = 'BufferSize';
6 | export const Size = 'Size';
7 | export const Simple = 'Simple';
8 |
--------------------------------------------------------------------------------
/apps/example/src/pages/pagination/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/popup/examples/basic.tsx:
--------------------------------------------------------------------------------
1 | import { Basic } from '../locale';
2 |
3 | const code = `
4 | import { Popup, Button } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 | "This is a popup box"}>
9 |
10 |
11 | )
12 | }`;
13 |
14 | export const basic = {
15 | code,
16 | namespace: Basic,
17 | };
18 |
--------------------------------------------------------------------------------
/apps/example/src/pages/popup/examples/disabled.tsx:
--------------------------------------------------------------------------------
1 | import { Disabled } from '../locale';
2 |
3 | const code = `
4 | import { Popup, Button } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 | "This is the popup content"}>
9 |
10 |
11 | );
12 | }`;
13 |
14 | export const disabled = {
15 | code,
16 | namespace: Disabled,
17 | };
18 |
--------------------------------------------------------------------------------
/apps/example/src/pages/popup/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const TriggerMode = 'TriggerMode';
3 | export const DifferentTrigger = 'DifferentTrigger';
4 | export const Position = 'Position';
5 | export const FloatingLayer = 'FloatingLayer';
6 | export const Controlled = 'Controlled';
7 | export const Mount = 'Mount';
8 | export const Disabled = 'Disabled';
9 | export const Dynamic = 'Dynamic';
10 |
--------------------------------------------------------------------------------
/apps/example/src/pages/popup/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/radio/examples/basic.tsx:
--------------------------------------------------------------------------------
1 | import { Basic } from '../locale';
2 |
3 | const code = `
4 | import { Space, Radio } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 | Radio
10 | Radio
11 |
12 | Disabled Radio
13 |
14 |
15 | Disabled Radio
16 |
17 |
18 | );
19 | };`;
20 |
21 | export const basic = {
22 | code,
23 | namespace: Basic,
24 | };
25 |
--------------------------------------------------------------------------------
/apps/example/src/pages/radio/examples/index.ts:
--------------------------------------------------------------------------------
1 | import { basic } from './basic';
2 | import { controlled } from './controlled';
3 | import { group } from './group';
4 | import { button } from './button';
5 | import { customContent } from './customContent';
6 |
7 | export const exampleList = {
8 | [basic.namespace]: basic,
9 | [controlled.namespace]: controlled,
10 | [group.namespace]: group,
11 | [button.namespace]: button,
12 | [customContent.namespace]: customContent,
13 | };
14 |
--------------------------------------------------------------------------------
/apps/example/src/pages/radio/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Controlled = 'Controlled';
3 | export const Group = 'Group';
4 | export const Button = 'Button';
5 | export const CustomContent = 'CustomContent';
6 |
--------------------------------------------------------------------------------
/apps/example/src/pages/radio/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/selectInput/examples/index.ts:
--------------------------------------------------------------------------------
1 | import { basic } from './basic';
2 | import { prefixSuffix } from './prefix-suffix';
3 | import { status } from './status';
4 |
5 | export const exampleList = {
6 | [basic.namespace]: basic,
7 | [prefixSuffix.namespace]: prefixSuffix,
8 | [status.namespace]: status,
9 | };
10 |
--------------------------------------------------------------------------------
/apps/example/src/pages/selectInput/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const PrefixSuffix = 'PrefixSuffix';
3 | export const Status = 'Status';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/selectInput/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/space/examples/basic.tsx:
--------------------------------------------------------------------------------
1 | import { Basic } from '../locale';
2 |
3 | const code = `
4 | import { Space } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 | );
14 | }`;
15 |
16 | export const basic = {
17 | code,
18 | namespace: Basic,
19 | };
20 |
--------------------------------------------------------------------------------
/apps/example/src/pages/space/examples/index.ts:
--------------------------------------------------------------------------------
1 | import { basic } from './basic';
2 | import { vertical } from './vertical';
3 | import { size } from './size';
4 | import { align } from './align';
5 | import { split } from './split';
6 |
7 | export const exampleList = {
8 | [basic.namespace]: basic,
9 | [vertical.namespace]: vertical,
10 | [size.namespace]: size,
11 | [align.namespace]: align,
12 | [split.namespace]: split,
13 | };
14 |
--------------------------------------------------------------------------------
/apps/example/src/pages/space/examples/size.tsx:
--------------------------------------------------------------------------------
1 | import { Size } from '../locale';
2 |
3 | const code = `
4 | import { Space } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 | );
14 | }`;
15 |
16 | export const size = {
17 | code,
18 | namespace: Size,
19 | };
20 |
--------------------------------------------------------------------------------
/apps/example/src/pages/space/examples/split.tsx:
--------------------------------------------------------------------------------
1 | import { Split } from '../locale';
2 |
3 | const code = `
4 | import { Space } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 | /}>
9 | Link 1
10 | Link 2
11 | Link 3
12 |
13 | );
14 | }`;
15 |
16 | export const split = {
17 | code,
18 | namespace: Split,
19 | };
20 |
--------------------------------------------------------------------------------
/apps/example/src/pages/space/examples/vertical.tsx:
--------------------------------------------------------------------------------
1 | import { Vertical } from '../locale';
2 |
3 | const code = `
4 | import { Space } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 | );
14 | }`;
15 |
16 | export const vertical = {
17 | code,
18 | namespace: Vertical,
19 | };
20 |
--------------------------------------------------------------------------------
/apps/example/src/pages/space/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Vertical = 'Vertical';
3 | export const Size = 'Size';
4 | export const Align = 'Align';
5 | export const Split = 'Split';
6 |
--------------------------------------------------------------------------------
/apps/example/src/pages/space/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/spin/examples/basic.tsx:
--------------------------------------------------------------------------------
1 | import { Basic } from '../locale';
2 |
3 | const code = `
4 | import { Spin } from '@mx-design/web';
5 |
6 | function App() {
7 | return ;
8 | };`;
9 |
10 | export const basic = {
11 | code,
12 | namespace: Basic,
13 | };
14 |
--------------------------------------------------------------------------------
/apps/example/src/pages/spin/examples/index.ts:
--------------------------------------------------------------------------------
1 | import { basic } from './basic';
2 | import { container } from './container';
3 | import { tip } from './tip';
4 | import { delay } from './delay';
5 | import { custom } from './custom';
6 | import { size } from './size';
7 |
8 | export const exampleList = {
9 | [basic.namespace]: basic,
10 | [container.namespace]: container,
11 | [tip.namespace]: tip,
12 | [delay.namespace]: delay,
13 | [custom.namespace]: custom,
14 | [size.namespace]: size,
15 | };
16 |
--------------------------------------------------------------------------------
/apps/example/src/pages/spin/examples/size.tsx:
--------------------------------------------------------------------------------
1 | import { Size } from '../locale';
2 |
3 | const code = `
4 | import { Spin, Space } from '@arco-design/web-react';
5 |
6 | function App() {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 | );
14 | };`;
15 |
16 | export const size = {
17 | code,
18 | namespace: Size,
19 | };
20 |
--------------------------------------------------------------------------------
/apps/example/src/pages/spin/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Container = 'Container';
3 | export const Tip = 'Tip';
4 | export const Delay = 'Delay';
5 | export const Custom = 'Custom';
6 | export const Size = 'Size';
7 |
--------------------------------------------------------------------------------
/apps/example/src/pages/spin/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/switch/examples/basic.tsx:
--------------------------------------------------------------------------------
1 | import { Basic } from '../locale';
2 |
3 | const code = `
4 | import { Space, Switch } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 |
10 |
11 | );
12 | }`;
13 |
14 | export const basic = {
15 | code,
16 | namespace: Basic,
17 | };
18 |
--------------------------------------------------------------------------------
/apps/example/src/pages/switch/examples/disabled.tsx:
--------------------------------------------------------------------------------
1 | import { Disabled } from '../locale';
2 |
3 | const code = `
4 | import { Space, Switch } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 |
10 |
11 |
12 | );
13 | }`;
14 |
15 | export const disabled = {
16 | code,
17 | namespace: Disabled,
18 | };
19 |
--------------------------------------------------------------------------------
/apps/example/src/pages/switch/examples/icon.tsx:
--------------------------------------------------------------------------------
1 | import { Icon } from '../locale';
2 |
3 | const code = `
4 | import { Space, Switch } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 | } uncheckedIcon={} />
10 | } unCheckedElement={} />
11 |
12 | );
13 | }`;
14 |
15 | export const icon = {
16 | code,
17 | namespace: Icon,
18 | };
19 |
--------------------------------------------------------------------------------
/apps/example/src/pages/switch/examples/index.ts:
--------------------------------------------------------------------------------
1 | import { basic } from './basic';
2 | import { icon } from './icon';
3 | import { text } from './text';
4 | import { disabled } from './disabled';
5 | import { loading } from './loading';
6 | import { size } from './size';
7 |
8 | export const exampleList = {
9 | [basic.namespace]: basic,
10 | [disabled.namespace]: disabled,
11 | [icon.namespace]: icon,
12 | [text.namespace]: text,
13 | [loading.namespace]: loading,
14 | [size.namespace]: size,
15 | };
16 |
--------------------------------------------------------------------------------
/apps/example/src/pages/switch/examples/loading.tsx:
--------------------------------------------------------------------------------
1 | import { Loading } from '../locale';
2 |
3 | const code = `
4 | import { Space, Switch } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | );
16 | }`;
17 |
18 | export const loading = {
19 | code,
20 | namespace: Loading,
21 | };
22 |
--------------------------------------------------------------------------------
/apps/example/src/pages/switch/examples/size.tsx:
--------------------------------------------------------------------------------
1 | import { Size } from '../locale';
2 |
3 | const code = `
4 | import { Space, Switch } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 |
10 |
11 |
12 | );
13 | }`;
14 |
15 | export const size = {
16 | code,
17 | namespace: Size,
18 | };
19 |
--------------------------------------------------------------------------------
/apps/example/src/pages/switch/examples/text.tsx:
--------------------------------------------------------------------------------
1 | import { Text } from '../locale';
2 |
3 | const code = `
4 | import { Space, Switch } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 |
9 |
10 |
11 |
12 | );
13 | }`;
14 |
15 | export const text = {
16 | code,
17 | namespace: Text,
18 | };
19 |
--------------------------------------------------------------------------------
/apps/example/src/pages/switch/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Disabled = 'Disabled';
3 | export const Icon = 'Icon';
4 | export const Text = 'Text';
5 | export const Loading = 'Loading';
6 | export const Size = 'Size';
7 |
--------------------------------------------------------------------------------
/apps/example/src/pages/switch/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/table/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/tag/examples/index.ts:
--------------------------------------------------------------------------------
1 | import { basic } from './basic';
2 | import { icon } from './icon';
3 | import { closable } from './closable';
4 | import { maxWidth } from './maxWidth';
5 | import { shape } from './shape';
6 |
7 | export const exampleList = {
8 | [basic.namespace]: basic,
9 | [icon.namespace]: icon,
10 | [closable.namespace]: closable,
11 | [maxWidth.namespace]: maxWidth,
12 | [shape.namespace]: shape,
13 | };
14 |
--------------------------------------------------------------------------------
/apps/example/src/pages/tag/examples/maxWidth.tsx:
--------------------------------------------------------------------------------
1 | import { MaxWidth } from '../locale';
2 |
3 | const code = `
4 | import { Tag, Tooltip } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 | "This is a long long long text label"}>
9 | This is a long long long text label
10 |
11 | );
12 | }`;
13 |
14 | export const maxWidth = {
15 | code,
16 | namespace: MaxWidth,
17 | };
18 |
--------------------------------------------------------------------------------
/apps/example/src/pages/tag/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const Icon = 'Icon';
3 | export const Closable = 'Closable';
4 | export const MaxWidth = 'MaxWidth';
5 | export const Shape = 'Shape';
6 |
--------------------------------------------------------------------------------
/apps/example/src/pages/tag/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/pages/tooltip/examples/basic.tsx:
--------------------------------------------------------------------------------
1 | import { Basic } from '../locale';
2 |
3 | const code = `
4 | import { Tooltip, Button } from '@mx-design/web';
5 |
6 | function App() {
7 | return (
8 | "This is a tooltip box"}>
9 |
10 |
11 | )
12 | }`;
13 |
14 | export const basic = {
15 | code,
16 | namespace: Basic,
17 | };
18 |
--------------------------------------------------------------------------------
/apps/example/src/pages/tooltip/examples/index.ts:
--------------------------------------------------------------------------------
1 | import { basic } from './basic';
2 | import { differentTrigger } from './differentTrigger';
3 | import { position } from './position';
4 | import { floatingLayer } from './floatingLayer';
5 |
6 | export const exampleList = {
7 | [basic.namespace]: basic,
8 | [differentTrigger.namespace]: differentTrigger,
9 | [position.namespace]: position,
10 | [floatingLayer.namespace]: floatingLayer,
11 | };
12 |
--------------------------------------------------------------------------------
/apps/example/src/pages/tooltip/locale/constants.ts:
--------------------------------------------------------------------------------
1 | export const Basic = 'Basic';
2 | export const TriggerMode = 'TriggerMode';
3 | export const DifferentTrigger = 'DifferentTrigger';
4 | export const Position = 'Position';
5 | export const FloatingLayer = 'FloatingLayer';
6 |
--------------------------------------------------------------------------------
/apps/example/src/pages/tooltip/locale/index.ts:
--------------------------------------------------------------------------------
1 | export * from './en_us';
2 | export * from './zh_cn';
3 | export * from './constants';
4 |
--------------------------------------------------------------------------------
/apps/example/src/routes/constants/index.ts:
--------------------------------------------------------------------------------
1 | export * from './component';
2 |
--------------------------------------------------------------------------------
/apps/example/src/routes/router.tsx:
--------------------------------------------------------------------------------
1 | import { createHashRouter } from 'react-router-dom';
2 | import { routerConfig } from './routerConfig';
3 |
4 | export const router = createHashRouter(routerConfig);
5 |
--------------------------------------------------------------------------------
/apps/example/src/typing.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.less';
2 |
--------------------------------------------------------------------------------
/apps/example/src/utils/index.css:
--------------------------------------------------------------------------------
1 | @keyframes fadeOut {
2 | from {
3 | opacity: 1;
4 | }
5 | to {
6 | opacity: 0;
7 | }
8 | }
9 |
10 | .fade-animation {
11 | animation-name: fadeOut;
12 | /* animation-duration: 1s; */
13 | }
14 |
--------------------------------------------------------------------------------
/apps/example/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './layLoad';
2 | export * from './setCookieLang';
3 | export * from './setTheme';
4 | export { default as load } from './load';
5 |
--------------------------------------------------------------------------------
/apps/example/src/utils/setCookieLang.ts:
--------------------------------------------------------------------------------
1 | import { setCookie } from '@mx-design/web-utils';
2 | import { Dispatch, SetStateAction } from 'react';
3 | import { LANG, LANG_LIST } from '../locale/constants';
4 | import { ConfigProviderProps } from '../components/ConfigProvider';
5 |
6 | export const setCookieLang = (_setLang: Dispatch>) => (lang: ConfigProviderProps['lang']) => {
7 | if (!LANG_LIST.includes(lang)) return;
8 |
9 | setCookie(LANG, lang, 365);
10 | _setLang(lang);
11 | };
12 |
--------------------------------------------------------------------------------
/apps/example/src/utils/setTheme/constants.ts:
--------------------------------------------------------------------------------
1 | export const LIGHT = 'light';
2 | export const DARK = 'dark';
3 | export const THEME = 'theme';
4 |
5 | export const THEME_MODE_TYPE = {
6 | [LIGHT]: LIGHT,
7 | [DARK]: DARK,
8 | };
9 |
--------------------------------------------------------------------------------
/apps/example/src/utils/setTheme/getTheme.ts:
--------------------------------------------------------------------------------
1 | import { getLocalStorage } from '@mx-design/web-utils';
2 | import { THEME } from './constants';
3 | import { ITheme } from './interface';
4 |
5 | export function getTheme(): ITheme['type'] {
6 | return getLocalStorage(THEME) as ITheme['type'];
7 | }
8 |
--------------------------------------------------------------------------------
/apps/example/src/utils/setTheme/index.ts:
--------------------------------------------------------------------------------
1 | export * from './setTheme';
2 | export * from './getTheme';
3 |
--------------------------------------------------------------------------------
/apps/example/src/utils/setTheme/interface.ts:
--------------------------------------------------------------------------------
1 | import { DARK, LIGHT } from './constants';
2 |
3 | export interface ITheme {
4 | type: typeof LIGHT | typeof DARK;
5 | }
6 |
7 | export type IThemeList = { themeName: string; content: Record }[];
8 |
--------------------------------------------------------------------------------
/apps/example/src/utils/setTheme/setTheme.ts:
--------------------------------------------------------------------------------
1 | import { setLocalStorage } from '@mx-design/web-utils';
2 | import { THEME } from './constants';
3 |
4 | export function setTheme(_setTheme) {
5 | return (themeName) => {
6 | setLocalStorage(THEME, themeName);
7 | _setTheme(themeName);
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/apps/example/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "paths": {
6 | "@/*": ["src/*"]
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/assets/logo.dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lio-mengxiang/mx-design/f2ba99463de122c827b37113aa15341319bb3ab2/assets/logo.dark.png
--------------------------------------------------------------------------------
/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lio-mengxiang/mx-design/f2ba99463de122c827b37113aa15341319bb3ab2/assets/logo.png
--------------------------------------------------------------------------------
/docs/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lio-mengxiang/mx-design/f2ba99463de122c827b37113aa15341319bb3ab2/docs/favicon.ico
--------------------------------------------------------------------------------
/docs/js/718.89d59bc0.js:
--------------------------------------------------------------------------------
1 | "use strict";(self.webpackChunk_mx_design_example=self.webpackChunk_mx_design_example||[]).push([[718],{9718:(e,t,s)=>{s.r(t),s.d(t,{default:()=>r});var n=s(1855),l=s(1208);const r=function(){var e,t=(0,l.r5)();return n.createElement("div",null,n.createElement("strong",null,"Error ",t.status||500),": ",null!==(e=t.statusText)&&void 0!==e?e:t.message)}}}]);
--------------------------------------------------------------------------------
/packages/mx-design-hooks/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | coverage
4 | .idea
5 | es
6 | lib
7 | dist
8 | esm
9 | cjs
10 | package-lock.json
11 | pnpm-lock.yaml
12 | types
13 | temp*
14 |
15 |
16 |
17 | # eslint
18 | .eslintcache
19 |
20 | # stylelint
21 | .stylelintcache
22 |
--------------------------------------------------------------------------------
/packages/mx-design-hooks/.npmrc:
--------------------------------------------------------------------------------
1 | # https://registry.npmmirror.com/是淘宝镜像
2 | # https://registry.npmjs.org/ npm 官方
3 | registry=https://registry.npmjs.org/
4 |
--------------------------------------------------------------------------------
/packages/mx-design-hooks/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './useMergeValue';
2 | export * from './useConstant';
3 | export * from './useEvent';
4 | export * from './useIsFirstRender';
5 | export * from './useMergeRefs';
6 | export * from './usePrevious';
7 | export * from './useMergeProps';
8 | export * from './useForceUpdate';
9 | export * from './useStateWithPromise';
10 | export * from './useClipboard';
11 | export * from './useHover';
12 | export * from './useKeyboardEvent';
13 | export * from './useUnmountedRef';
14 | export * from './useRefState';
15 |
--------------------------------------------------------------------------------
/packages/mx-design-hooks/src/isBrowser.ts:
--------------------------------------------------------------------------------
1 | export const isBrowser = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
2 |
--------------------------------------------------------------------------------
/packages/mx-design-hooks/src/useConstant.ts:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 |
3 | type ResultBox = { v: T }
4 |
5 | export function useConstant(fn: () => T): T {
6 | const ref = React.useRef>();
7 |
8 | if (!ref.current) {
9 | ref.current = { v: fn() };
10 | }
11 |
12 | return ref.current.v;
13 | }
14 |
--------------------------------------------------------------------------------
/packages/mx-design-hooks/src/useForceUpdate.ts:
--------------------------------------------------------------------------------
1 | import { useReducer } from 'react';
2 |
3 | export function useForceUpdate() {
4 | const [, dispatch] = useReducer((v) => v + 1, 0);
5 | return dispatch;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/mx-design-hooks/src/useIsFirstRender.ts:
--------------------------------------------------------------------------------
1 | import { useRef } from 'react';
2 |
3 | export function useIsFirstRender(): boolean {
4 | const isFirst = useRef(true);
5 |
6 | if (isFirst.current) {
7 | isFirst.current = false;
8 |
9 | return true;
10 | }
11 |
12 | return isFirst.current;
13 | }
14 |
--------------------------------------------------------------------------------
/packages/mx-design-hooks/src/useIsomorphicLayoutEffect.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useLayoutEffect } from 'react';
2 | import { isBrowser } from './isBrowser';
3 |
4 | // Because useLayoutEffect in the ssr environment will report a warning
5 | // So when you need to use useLayoutEffect, use useIsomorphicLayoutEffect instead, it will use useEffect in the ssr environment to avoid this problem
6 | export const useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;
7 |
--------------------------------------------------------------------------------
/packages/mx-design-hooks/src/useMergeProps.ts:
--------------------------------------------------------------------------------
1 | import { useMemo } from 'react';
2 |
3 | export function useMergeProps(
4 | componentProps: PropsType,
5 | defaultProps: Partial,
6 | globalComponentConfig: Partial | undefined
7 | ): PropsType {
8 | const _defaultProps = useMemo(() => ({ ...defaultProps, ...globalComponentConfig }), [defaultProps, globalComponentConfig]);
9 |
10 | return { ..._defaultProps, ...componentProps };
11 | }
12 |
--------------------------------------------------------------------------------
/packages/mx-design-hooks/src/usePrevious.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useRef } from 'react';
2 |
3 | /**
4 | * @zh 缓存上一次的 state 用于前后比较
5 | * @en Caching the last state is used for comparison
6 | */
7 | export function usePrevious(state: T): T | undefined {
8 | const ref = useRef();
9 |
10 | useEffect(() => {
11 | ref.current = state;
12 | });
13 |
14 | return ref.current;
15 | }
16 |
--------------------------------------------------------------------------------
/packages/mx-design-hooks/src/useUnmountedRef.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useRef } from 'react';
2 |
3 | /**
4 | * @zh 获取当前组件是否已经卸载的 Hook
5 | * @en get the status if component had been unmounted
6 | */
7 | export const useUnmountedRef = () => {
8 | const unmountedRef = useRef(false);
9 | useEffect(() => {
10 | unmountedRef.current = false;
11 | return () => {
12 | unmountedRef.current = true;
13 | };
14 | }, []);
15 | return unmountedRef;
16 | };
17 |
--------------------------------------------------------------------------------
/packages/mx-design-hooks/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "esm"
5 | },
6 | "include": ["src"]
7 | }
8 |
--------------------------------------------------------------------------------
/packages/mx-design-hooks/tsconfigCommonJS.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "lib",
5 | "module": "CommonJS"
6 | },
7 | "include": ["src"]
8 | }
9 |
--------------------------------------------------------------------------------
/packages/mx-design-node-utils/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | coverage
4 | .idea
5 | es
6 | lib
7 | dist
8 | esm
9 | cjs
10 | package-lock.json
11 | pnpm-lock.yaml
12 | types
13 | temp*
14 |
15 |
16 |
17 | # eslint
18 | .eslintcache
19 |
20 | # stylelint
21 | .stylelintcache
22 |
--------------------------------------------------------------------------------
/packages/mx-design-node-utils/.npmrc:
--------------------------------------------------------------------------------
1 | # https://registry.npmmirror.com/是淘宝镜像
2 | # https://registry.npmjs.org/ npm 官方
3 | registry=https://registry.npmjs.org/
4 |
--------------------------------------------------------------------------------
/packages/mx-design-node-utils/src/getProjectPath.ts:
--------------------------------------------------------------------------------
1 | import path from 'path';
2 |
3 | /**
4 | * 获取项目文件,以命令输入的目录为根目录
5 | */
6 | export function getProjectPath(dir = './'): string {
7 | return path.join(process.cwd(), dir);
8 | }
9 |
--------------------------------------------------------------------------------
/packages/mx-design-node-utils/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './execQuick';
2 | export * from './getProjectPath';
3 | export * from './spinner';
4 |
--------------------------------------------------------------------------------
/packages/mx-design-node-utils/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "esm",
5 | },
6 | "include": ["src"]
7 | }
8 |
--------------------------------------------------------------------------------
/packages/mx-design-node-utils/tsconfigCommonJS.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "lib",
5 | "module": "CommonJS"
6 | },
7 | "include": ["src"]
8 | }
9 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | coverage
4 | .idea
5 | es
6 | lib
7 | dist
8 | esm
9 | cjs
10 | package-lock.json
11 | pnpm-lock.yaml
12 | types
13 | temp*
14 |
15 |
16 |
17 | # eslint
18 | .eslintcache
19 |
20 | # stylelint
21 | .stylelintcache
22 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/.npmrc:
--------------------------------------------------------------------------------
1 | # https://registry.npmmirror.com/是淘宝镜像
2 | # https://registry.npmjs.org/ npm 官方
3 | registry=https://registry.npmjs.org/
4 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/cookie/deleteCookie.ts:
--------------------------------------------------------------------------------
1 | import { setCookie } from './setCookie';
2 |
3 | export function deleteCookie(name: string) {
4 | setCookie(name, '', -1);
5 | }
6 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/cookie/index.ts:
--------------------------------------------------------------------------------
1 | export * from './deleteCookie';
2 | export * from './getCookie';
3 | export * from './setCookie';
4 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/cookie/setCookie.ts:
--------------------------------------------------------------------------------
1 | export function setCookie(name: string, value: string, days: number) {
2 | const expires = new Date();
3 | expires.setTime(expires.getTime() + days * 24 * 60 * 60 * 1000);
4 | document.cookie = `${name}=${encodeURIComponent(value)};expires=${expires.toUTCString()};path=/`;
5 | }
6 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/debounceByRaf.ts:
--------------------------------------------------------------------------------
1 | export function debounceByRaf(cb: (...args: any[]) => void) {
2 | let timer: null | number = null;
3 |
4 | const debounce = function (...args: any[]) {
5 | timer && window.cancelAnimationFrame(timer);
6 | timer = window.requestAnimationFrame(() => {
7 | cb(...args);
8 | timer = null;
9 | });
10 | };
11 |
12 | debounce.cancel = () => {
13 | window.cancelAnimationFrame(timer);
14 | timer = null;
15 | };
16 |
17 | return debounce;
18 | }
19 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/dom/contains.ts:
--------------------------------------------------------------------------------
1 | export function contains(root: HTMLElement, ele) {
2 | if (!root) {
3 | return false;
4 | }
5 | if (root.contains) {
6 | return root.contains(ele);
7 | }
8 | let node = ele;
9 | while (node) {
10 | if (node === root) {
11 | return true;
12 | }
13 | node = node.parentNode;
14 | }
15 | return false;
16 | }
17 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/dom/index.ts:
--------------------------------------------------------------------------------
1 | export * from './isNodeOverflow';
2 | export * from './contains';
3 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/dom/isNodeOverflow.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @zh 判断节点内容是否溢出
3 | * @en whether the node content is overflowing
4 | */
5 | export const isNodeOverflow = (ele: Element | Element[]): boolean => {
6 | const { clientWidth = 0, scrollWidth = 0 } = ele as Element;
7 |
8 | if (scrollWidth > clientWidth) {
9 | return true;
10 | }
11 | return false;
12 | };
13 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/getId.ts:
--------------------------------------------------------------------------------
1 | const globalInstanceIdMap = {};
2 |
3 | export default function getId(prefix: string) {
4 | globalInstanceIdMap[prefix] = prefix in globalInstanceIdMap ? globalInstanceIdMap[prefix] : 0;
5 | globalInstanceIdMap[prefix] += 1;
6 | return `${prefix}${globalInstanceIdMap[prefix]}`;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/group.ts:
--------------------------------------------------------------------------------
1 | export function group(array: any[], subGroupLength: number) {
2 | let index = 0;
3 | const newArray = [];
4 |
5 | while (index < array.length) {
6 | newArray.push(array.slice(index, (index += subGroupLength)));
7 | }
8 | return newArray;
9 | }
10 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/isServerRendering.ts:
--------------------------------------------------------------------------------
1 | export const isServerRendering = function () {
2 | try {
3 | return !(typeof window !== 'undefined' && document !== undefined);
4 | } catch (e) {
5 | return true;
6 | }
7 | };
8 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/localStorage/getLocalStorage.ts:
--------------------------------------------------------------------------------
1 | export function setLocalStorage(key: string, value: T | null = null): void {
2 | try {
3 | if (value === null) {
4 | localStorage.removeItem(key);
5 | } else {
6 | localStorage.setItem(key, JSON.stringify(value));
7 | }
8 | } catch (error) {
9 | if (typeof window !== 'undefined') {
10 | console.error(error);
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/localStorage/index.ts:
--------------------------------------------------------------------------------
1 | export * from './getLocalStorage';
2 | export * from './setLocalStorage';
3 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/localStorage/setLocalStorage.ts:
--------------------------------------------------------------------------------
1 | export function getLocalStorage(key: string, defaultValue: T | null = null): T | null {
2 | try {
3 | const value = localStorage.getItem(key);
4 | if (value) return JSON.parse(value) as T;
5 | } catch (error) {
6 | if (typeof window !== 'undefined') {
7 | console.error(error);
8 | }
9 | }
10 |
11 | return defaultValue;
12 | }
13 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/noop.ts:
--------------------------------------------------------------------------------
1 | export function noop() {}
2 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/off.ts:
--------------------------------------------------------------------------------
1 | import { isServerRendering } from './isServerRendering';
2 | import { noop } from './noop';
3 |
4 | export const off = function (
5 | element: EventTarget | null,
6 | event: string,
7 | // eslint-disable-next-line no-undef
8 | handler: EventListenerOrEventListenerObject,
9 | // eslint-disable-next-line no-undef
10 | options?: boolean | AddEventListenerOptions
11 | ) {
12 | if (isServerRendering()) {
13 | return noop;
14 | }
15 | return element?.removeEventListener(event, handler, options || false);
16 | };
17 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/omit.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * delete keys from object
3 | */
4 | export function omit, K extends keyof T>(
5 | obj: T,
6 | keys: Array // string 为了某些没有声明的属性被omit
7 | ): Omit {
8 | const clone = {
9 | ...obj,
10 | };
11 | keys.forEach((key) => {
12 | if ((key as K) in clone) {
13 | delete clone[key as K];
14 | }
15 | });
16 | return clone;
17 | }
18 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/on.ts:
--------------------------------------------------------------------------------
1 | import { isServerRendering } from './isServerRendering';
2 | import { noop } from './noop';
3 |
4 | export const on = function (
5 | element: EventTarget | null,
6 | event: string,
7 | // eslint-disable-next-line no-undef
8 | handler: EventListenerOrEventListenerObject,
9 | // eslint-disable-next-line no-undef
10 | options?: boolean | AddEventListenerOptions
11 | ) {
12 | if (isServerRendering()) {
13 | return noop;
14 | }
15 | return element?.addEventListener(event, handler, options || false);
16 | };
17 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/partial.ts:
--------------------------------------------------------------------------------
1 | export function partial(func: Function, ...args: T): Function {
2 | return function partiallyApplied(...moreArgs: T): R {
3 | return func(...args, ...moreArgs);
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/pick.ts:
--------------------------------------------------------------------------------
1 | export function pick(obj: T, keys: Array): Pick {
2 | const clone = {} as Pick;
3 | keys.forEach((key) => {
4 | const k = key as K;
5 | if ((key as K) in obj) {
6 | clone[k] = obj[k];
7 | }
8 | });
9 | return clone;
10 | }
11 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/setCssVariables.ts:
--------------------------------------------------------------------------------
1 | import { isObject } from './is';
2 |
3 | /**
4 | * change css variable
5 | */
6 | export function setCssVariables(variables: Record, root = document.documentElement) {
7 | if (variables && isObject(variables)) {
8 | Object.keys(variables).forEach((themKey) => {
9 | root.style.setProperty(themKey, variables[themKey]);
10 | });
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/throttle/index.ts:
--------------------------------------------------------------------------------
1 | export * from './throttle';
2 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/throttle/leadingThrottle.ts:
--------------------------------------------------------------------------------
1 | export function leadingThrottle any>(func: T, wait: number) {
2 | let previous = 0;
3 |
4 | const throttle = (...args: any[]) => {
5 | const now = Date.now();
6 | if (now - previous > wait) {
7 | func(args);
8 | previous = now;
9 | }
10 | };
11 |
12 | throttle.cancel = function () {
13 | previous = 0;
14 | };
15 |
16 | return throttle;
17 | }
18 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/throttle/throttle.ts:
--------------------------------------------------------------------------------
1 | import { leadingThrottle } from './leadingThrottle';
2 | import { trailingThrottle } from './trailingThrottle';
3 |
4 | interface IOptions {
5 | leading?: boolean;
6 | trailing?: boolean;
7 | }
8 |
9 | export function throttle any>(func: T, wait: number, options: IOptions) {
10 | if (options.trailing) {
11 | return trailingThrottle(func, wait);
12 | }
13 | return leadingThrottle(func, wait);
14 | }
15 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/src/throttle/trailingThrottle.ts:
--------------------------------------------------------------------------------
1 | export function trailingThrottle any>(func: T, wait: number) {
2 | let timeout = null;
3 |
4 | const throttle = (...args: any[]) => {
5 | if (!timeout) {
6 | timeout = setTimeout(() => {
7 | timeout = null;
8 | func(args);
9 | }, wait);
10 | }
11 | };
12 |
13 | throttle.cancel = function () {
14 | clearTimeout(timeout);
15 | timeout = null;
16 | };
17 |
18 | return throttle;
19 | }
20 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "esm"
5 | },
6 | "include": ["src"]
7 | }
8 |
--------------------------------------------------------------------------------
/packages/mx-design-web-utils/tsconfigCommonJS.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "lib",
5 | "module": "CommonJS"
6 | },
7 | "include": ["src"]
8 | }
9 |
--------------------------------------------------------------------------------
/packages/mx-design-web/.browserslistrc:
--------------------------------------------------------------------------------
1 | chrome 80
2 | edge 79
3 | firefox 78
4 | safari 14
5 |
--------------------------------------------------------------------------------
/packages/mx-design-web/.npmrc:
--------------------------------------------------------------------------------
1 | # https://registry.npmmirror.com/是淘宝镜像
2 | # https://registry.npmjs.org/ npm 官方
3 | registry=https://registry.npmjs.com/
4 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Affix/components/index.ts:
--------------------------------------------------------------------------------
1 | export * from './affix';
2 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Affix/index.tsx:
--------------------------------------------------------------------------------
1 | export * from './components';
2 | export * from './interface';
3 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Affix/style/index.less:
--------------------------------------------------------------------------------
1 | @import (reference) '../../Style/base.less';
2 |
3 | @affix-prefix-cls: ~'@{prefix}-affix';
4 |
5 | .@{affix-prefix-cls} {
6 | position: fixed;
7 | z-index: var(--z-index-affix);
8 | }
9 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Affix/style/index.ts:
--------------------------------------------------------------------------------
1 | import './index.less';
2 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Affix/utils/fixedPlaceholder.ts:
--------------------------------------------------------------------------------
1 | interface IFixedPlaceholderStatus {
2 | affixWrapDom: HTMLDivElement;
3 | placeholderDom: HTMLElement;
4 | wrapWidth: number;
5 | wrapHeight: number;
6 | }
7 |
8 | export const fixedPlaceholder = ({ placeholderDom, affixWrapDom, wrapWidth, wrapHeight }: IFixedPlaceholderStatus) => {
9 | placeholderDom.style.width = `${wrapWidth}px`;
10 | placeholderDom.style.height = `${wrapHeight}px`;
11 | affixWrapDom.appendChild(placeholderDom);
12 | };
13 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Affix/utils/getContainingBlock.ts:
--------------------------------------------------------------------------------
1 | import { isContainingBlock } from '../../Popper-js/utils/isContainingBlock';
2 |
3 | export function getContainingBlock(element: Element) {
4 | let currentNode = element.parentElement;
5 | while (currentNode) {
6 | if (isContainingBlock(currentNode)) return currentNode;
7 | currentNode = currentNode.parentElement;
8 | }
9 | return null;
10 | }
11 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Affix/utils/getScrollContainer.ts:
--------------------------------------------------------------------------------
1 | import { isString } from '@mx-design/web-utils';
2 | import type { ScrollContainer, ScrollContainerElement } from '../interface';
3 |
4 | export const getScrollContainer = (container: ScrollContainer = 'body'): ScrollContainerElement => {
5 | if (isString(container)) {
6 | return container ? (document.querySelector(container as string) as HTMLElement) : window;
7 | }
8 | if (typeof container === 'function') {
9 | return container();
10 | }
11 | return container as Window | HTMLElement;
12 | };
13 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Affix/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './calcTopAndBottom';
2 | export * from './fixedDom';
3 | export * from './getScrollContainer';
4 | export * from './getFixedTop';
5 | export * from './fixedPlaceholder';
6 | export * from './isNeedListParent';
7 | export * from './fixedDom';
8 | export * from './addScrollEvent';
9 | export * from './removeScrollEvent';
10 | export * from './handleFixedToggle';
11 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Affix/utils/isNeedListParent.ts:
--------------------------------------------------------------------------------
1 | import { getNodeName } from '../../Popper-js/utils/getNodeName';
2 | import { isHTMLElement } from '../../Popper-js/utils/isHTMLElement';
3 |
4 | export function isNeedListParent({ isInScrollContainer, scrollContainer }) {
5 | return (
6 | isInScrollContainer &&
7 | isHTMLElement(scrollContainer.current) &&
8 | ['html', 'body', '#document'].indexOf(getNodeName(scrollContainer.current)) <= 0
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Affix/utils/removeScrollEvent.ts:
--------------------------------------------------------------------------------
1 | export function removeScrollEvent({ scrollParentsList, needListParent, scrollContainer, handleScroll }) {
2 | if (needListParent) {
3 | scrollParentsList.forEach((element) => {
4 | element.removeEventListener('scroll', handleScroll);
5 | });
6 | } else {
7 | scrollContainer.current!.removeEventListener('scroll', handleScroll);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Alert/components/index.ts:
--------------------------------------------------------------------------------
1 | export * from './alert';
2 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Alert/constants.ts:
--------------------------------------------------------------------------------
1 | import { EN_US, ZH_CN } from '../Locale/constants';
2 |
3 | export const ALERT_NAMESPACE = 'Alert';
4 |
5 | export const ALERT_LOCAL = {
6 | [EN_US]: {
7 | EXPAND_TEXT: 'expand',
8 | COLLAPSE_TEXT: 'collapse',
9 | },
10 | [ZH_CN]: {
11 | EXPAND_TEXT: '展开更多',
12 | COLLAPSE_TEXT: '收起',
13 | },
14 | };
15 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Alert/hooks/index.ts:
--------------------------------------------------------------------------------
1 | export * from './useClassNames';
2 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Alert/index.ts:
--------------------------------------------------------------------------------
1 | export * from './components';
2 | export * from './interface';
3 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Alert/style/index.ts:
--------------------------------------------------------------------------------
1 | import './index.less';
2 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Anchor/components/index.ts:
--------------------------------------------------------------------------------
1 | export * from './anchor';
2 | export * from './link';
3 |
--------------------------------------------------------------------------------
/packages/mx-design-web/src/Anchor/context.ts:
--------------------------------------------------------------------------------
1 | import React, { createContext } from 'react';
2 |
3 | interface AnchorContext {
4 | currentLink: string;
5 | onLinkClick: (e: React.MouseEvent, href: string) => void;
6 | linkMap: React.MutableRefObject