├── .env ├── jest.setup.js ├── components ├── style │ ├── index.tsx │ ├── variable.less │ ├── index.less │ ├── themes.less │ ├── antd-extension.less │ └── mixins.less ├── card │ ├── style │ │ └── index.tsx │ ├── index.tsx │ ├── demo │ │ ├── icon.md │ │ ├── basic.md │ │ ├── extra.md │ │ ├── sider.md │ │ ├── percent.md │ │ └── footer.md │ ├── index.md │ ├── __tests__ │ │ └── basic.test.tsx │ └── Card.tsx ├── code │ ├── style │ │ ├── index.tsx │ │ └── index.less │ ├── index.tsx │ ├── index.md │ └── demo │ │ └── basic.md ├── switch │ ├── style │ │ └── index.tsx │ ├── index.tsx │ ├── demo │ │ ├── small.md │ │ ├── text.md │ │ └── disabled.md │ ├── index.md │ ├── __tests__ │ │ └── index.test.tsx │ └── switch.tsx ├── basic-table │ ├── style │ │ └── index.tsx │ ├── index.tsx │ ├── config.tsx │ └── demo │ │ ├── basicHalfHeader.md │ │ ├── basic.md │ │ ├── select.md │ │ ├── query.md │ │ └── basicFetch.md ├── color-select │ ├── style │ │ ├── index.ts │ │ └── index.less │ ├── index.tsx │ ├── demo │ │ ├── basic.md │ │ ├── form.md │ │ ├── disabled.md │ │ └── value.md │ └── index.md ├── data-table │ ├── style │ │ └── index.tsx │ ├── index.tsx │ ├── config.tsx │ └── demo │ │ ├── basic.md │ │ ├── query.md │ │ └── queryCompact.md ├── descriptions │ ├── style │ │ ├── index.tsx │ │ └── index.less │ ├── index.tsx │ ├── __tests__ │ │ └── index.test.tsx │ ├── index.md │ ├── demo │ │ ├── list.md │ │ ├── basic.md │ │ ├── mainTitle.md │ │ └── changeMode.md │ └── Descriptions.tsx ├── empty-line │ ├── style │ │ ├── index.tsx │ │ └── index.less │ ├── index.tsx │ ├── demo │ │ ├── basic.md │ │ └── withHeight.md │ ├── index.md │ ├── empty-line.tsx │ └── __tests__ │ │ └── index.test.tsx ├── query-form │ ├── style │ │ ├── index.tsx │ │ └── index.less │ ├── index.tsx │ ├── use-media.ts │ ├── demo │ │ ├── basic.md │ │ └── customCols.md │ ├── use-media-antd-query.ts │ └── index.md ├── virtual-select │ ├── style │ │ └── index.tsx │ ├── index.tsx │ └── demo │ │ ├── multiple.md │ │ ├── bigdata.md │ │ ├── basic.md │ │ ├── search.md │ │ └── theme.md ├── basic-form-items │ ├── style │ │ ├── index.tsx │ │ └── index.less │ ├── index.tsx │ ├── demo │ │ ├── input.md │ │ ├── select.md │ │ └── custom.md │ ├── index.md │ └── __tests__ │ │ └── input.test.tsx ├── locale │ ├── index.tsx │ ├── zh_CN.tsx │ └── en_US.tsx ├── create-global-state │ ├── useEffectOnce.ts │ ├── useIsomorphicLayoutEffect.ts │ ├── index.ts │ └── index.md ├── locale-provider │ ├── useIntl.tsx │ ├── index.tsx │ ├── context.tsx │ ├── withIntl.tsx │ └── provider.tsx ├── use-debounce │ ├── index.md │ ├── index.tsx │ └── demo │ │ └── useDebounce.md ├── use-timeout │ ├── useUpdate.ts │ ├── index.ts │ ├── index.md │ └── useTimeoutFn.ts ├── use-mounted-state │ ├── index.ts │ └── index.md ├── use-async │ ├── index.ts │ └── index.md ├── use-interval │ ├── index.ts │ └── index.md ├── use-deep-compare-effect │ ├── index.md │ ├── index.ts │ └── useCustomCompareEffect.ts ├── use-async-retry │ ├── index.ts │ └── index.md ├── create-state-context │ ├── index.ts │ └── index.md ├── use-async-fn │ ├── index.md │ └── index.ts ├── create-reducer-context │ ├── index.ts │ └── index.md ├── index.tsx ├── use-dynamic-list │ ├── index.md │ └── demo │ │ └── basic.md └── utils │ └── index.tsx ├── site ├── theme │ ├── static │ │ ├── style.js │ │ ├── theme.less │ │ ├── nprogress.less │ │ ├── docsearch.less │ │ ├── new-version-info-modal.less │ │ ├── index.less │ │ ├── not-found.less │ │ ├── motion.less │ │ ├── toc.less │ │ ├── mock-browser.less │ │ ├── page-nav.less │ │ ├── resource.less │ │ ├── footer.less │ │ ├── icons.less │ │ └── highlight.less │ ├── template │ │ ├── Home │ │ │ ├── qun.jpg │ │ │ ├── landing.png │ │ │ ├── personal.jpg │ │ │ └── index.jsx │ │ ├── Layout │ │ │ ├── github.png │ │ │ ├── Footer.jsx │ │ │ └── index.jsx │ │ ├── Content │ │ │ ├── PrevAndNext.jsx │ │ │ └── index.jsx │ │ ├── NotFound.jsx │ │ └── utils.js │ ├── index.js │ └── zh-CN.js └── bisheng.config.js ├── .travis.yml ├── .eslintignore ├── static ├── logo.png └── landing.png ├── scripts ├── deploy.js ├── copyStatic.js ├── publish.js ├── renameStart.js ├── renameEnd.js ├── changeLess2Css.js ├── sync.js ├── optimizeDist.js ├── moveDeclare.js └── theme │ └── antd-theme-webpack-plugin.js ├── .editorconfig ├── .prettierrc.js ├── .eslintrc ├── docs ├── i18n.md ├── introduce.md ├── theme.md └── develop.md ├── .gitignore ├── tsconfig.json ├── tsconfig.test.json ├── tsconfig.father.json ├── jest.config.js ├── .fatherrc.js └── README.md /.env: -------------------------------------------------------------------------------- 1 | NODE_PATH=./src -------------------------------------------------------------------------------- /jest.setup.js: -------------------------------------------------------------------------------- 1 | jest.setTimeout(100000); 2 | -------------------------------------------------------------------------------- /components/style/index.tsx: -------------------------------------------------------------------------------- 1 | import './index.less'; 2 | -------------------------------------------------------------------------------- /components/card/style/index.tsx: -------------------------------------------------------------------------------- 1 | import './index.less'; 2 | -------------------------------------------------------------------------------- /components/code/style/index.tsx: -------------------------------------------------------------------------------- 1 | import './index.less'; 2 | -------------------------------------------------------------------------------- /components/style/variable.less: -------------------------------------------------------------------------------- 1 | @dantd-prefix: dantd; 2 | -------------------------------------------------------------------------------- /site/theme/static/style.js: -------------------------------------------------------------------------------- 1 | 2 | import './index.less'; 3 | -------------------------------------------------------------------------------- /components/switch/style/index.tsx: -------------------------------------------------------------------------------- 1 | import './index.less'; 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 9 4 | - 8 5 | -------------------------------------------------------------------------------- /components/basic-table/style/index.tsx: -------------------------------------------------------------------------------- 1 | import './index.less'; 2 | -------------------------------------------------------------------------------- /components/color-select/style/index.ts: -------------------------------------------------------------------------------- 1 | import './style.less'; 2 | -------------------------------------------------------------------------------- /components/data-table/style/index.tsx: -------------------------------------------------------------------------------- 1 | import './index.less'; 2 | -------------------------------------------------------------------------------- /components/descriptions/style/index.tsx: -------------------------------------------------------------------------------- 1 | import './index.less'; 2 | -------------------------------------------------------------------------------- /components/empty-line/style/index.tsx: -------------------------------------------------------------------------------- 1 | import './index.less'; 2 | -------------------------------------------------------------------------------- /components/query-form/style/index.tsx: -------------------------------------------------------------------------------- 1 | import './index.less'; 2 | -------------------------------------------------------------------------------- /components/virtual-select/style/index.tsx: -------------------------------------------------------------------------------- 1 | import './index.less'; 2 | -------------------------------------------------------------------------------- /components/basic-form-items/style/index.tsx: -------------------------------------------------------------------------------- 1 | import './index.less'; 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/* 2 | config/* 3 | webpack.* 4 | examples/* 5 | -------------------------------------------------------------------------------- /static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thedicode/dantd/HEAD/static/logo.png -------------------------------------------------------------------------------- /static/landing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thedicode/dantd/HEAD/static/landing.png -------------------------------------------------------------------------------- /scripts/deploy.js: -------------------------------------------------------------------------------- 1 | var ghpages = require('gh-pages'); 2 | 3 | ghpages.publish('_site', function (err) {}); 4 | -------------------------------------------------------------------------------- /site/theme/template/Home/qun.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thedicode/dantd/HEAD/site/theme/template/Home/qun.jpg -------------------------------------------------------------------------------- /components/card/index.tsx: -------------------------------------------------------------------------------- 1 | import './style/index.less'; 2 | import Card from './Card'; 3 | 4 | export default Card; 5 | -------------------------------------------------------------------------------- /components/code/index.tsx: -------------------------------------------------------------------------------- 1 | import './style/index.less'; 2 | import Code from './code'; 3 | 4 | export default Code; 5 | -------------------------------------------------------------------------------- /site/theme/template/Home/landing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thedicode/dantd/HEAD/site/theme/template/Home/landing.png -------------------------------------------------------------------------------- /components/style/index.less: -------------------------------------------------------------------------------- 1 | @import './mixins.less'; 2 | @import './antd-extension.less'; 3 | @import './variable.less'; 4 | -------------------------------------------------------------------------------- /components/switch/index.tsx: -------------------------------------------------------------------------------- 1 | import './style/index.less'; 2 | import Switch from './switch'; 3 | 4 | export default Switch; 5 | -------------------------------------------------------------------------------- /site/theme/template/Home/personal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thedicode/dantd/HEAD/site/theme/template/Home/personal.jpg -------------------------------------------------------------------------------- /site/theme/template/Layout/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thedicode/dantd/HEAD/site/theme/template/Layout/github.png -------------------------------------------------------------------------------- /components/query-form/index.tsx: -------------------------------------------------------------------------------- 1 | import './style/index.less'; 2 | import QueryForm from './QueryForm'; 3 | export default QueryForm; 4 | -------------------------------------------------------------------------------- /components/color-select/index.tsx: -------------------------------------------------------------------------------- 1 | import './style/index.less'; 2 | import ColorSelect from './ColorSelect'; 3 | export default ColorSelect; 4 | -------------------------------------------------------------------------------- /components/data-table/index.tsx: -------------------------------------------------------------------------------- 1 | import './style/index.less'; 2 | import DataTable from './DataTable'; 3 | 4 | export default DataTable; 5 | -------------------------------------------------------------------------------- /components/empty-line/index.tsx: -------------------------------------------------------------------------------- 1 | import './style/index.less'; 2 | import EmptyLine from './empty-line'; 3 | 4 | export default EmptyLine; 5 | -------------------------------------------------------------------------------- /components/basic-table/index.tsx: -------------------------------------------------------------------------------- 1 | import './style/index.less'; 2 | import BasicTable from './BasicTable'; 3 | 4 | export default BasicTable; 5 | -------------------------------------------------------------------------------- /components/descriptions/index.tsx: -------------------------------------------------------------------------------- 1 | import './style/index.less'; 2 | import Descriptions from './Descriptions'; 3 | 4 | export default Descriptions; 5 | -------------------------------------------------------------------------------- /components/virtual-select/index.tsx: -------------------------------------------------------------------------------- 1 | import './style/index.less'; 2 | import VirtualSelect from './VirtualSelect'; 3 | 4 | export default VirtualSelect; 5 | -------------------------------------------------------------------------------- /components/basic-form-items/index.tsx: -------------------------------------------------------------------------------- 1 | import './style/index.less'; 2 | import BasicFormItems from './BasicFormItems'; 3 | 4 | export default BasicFormItems; 5 | -------------------------------------------------------------------------------- /components/locale/index.tsx: -------------------------------------------------------------------------------- 1 | import zh_CN from './zh_CN'; 2 | import en_US from './en_US'; 3 | 4 | export default { 5 | 'zh-CN': zh_CN, 6 | 'en-US': en_US, 7 | }; 8 | -------------------------------------------------------------------------------- /site/theme/static/theme.less: -------------------------------------------------------------------------------- 1 | @site-heading-color: #0d1a26; 2 | @site-text-color: #314659; 3 | @site-text-color-secondary: #697b8c; 4 | @site-border-color-split: #ebedf0; 5 | -------------------------------------------------------------------------------- /components/style/themes.less: -------------------------------------------------------------------------------- 1 | // 引入所有使用 theme 的变量 2 | @import '../switch/style/index.less'; 3 | @import '../data-table/style/index.less'; 4 | @import '../basic-table/style/index.less'; -------------------------------------------------------------------------------- /components/create-global-state/useEffectOnce.ts: -------------------------------------------------------------------------------- 1 | import { EffectCallback, useEffect } from 'react'; 2 | 3 | const useEffectOnce = (effect: EffectCallback) => { 4 | useEffect(effect, []); 5 | }; 6 | 7 | export default useEffectOnce; 8 | -------------------------------------------------------------------------------- /components/empty-line/style/index.less: -------------------------------------------------------------------------------- 1 | @import '../../style/index.less'; 2 | 3 | @dantd-empty-line-prefix-cls: ~'@{dantd-prefix}-empty-line'; 4 | 5 | .@{dantd-empty-line-prefix-cls} { 6 | width: 100%; 7 | height: 20px; 8 | } 9 | -------------------------------------------------------------------------------- /components/locale-provider/useIntl.tsx: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | import IntlContext from './context'; 3 | 4 | function useIntl(): any { 5 | const i18n = useContext(IntlContext); 6 | return i18n; 7 | } 8 | 9 | export default useIntl; 10 | -------------------------------------------------------------------------------- /components/create-global-state/useIsomorphicLayoutEffect.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useLayoutEffect } from 'react'; 2 | 3 | const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect; 4 | 5 | export default useIsomorphicLayoutEffect; 6 | -------------------------------------------------------------------------------- /components/locale-provider/index.tsx: -------------------------------------------------------------------------------- 1 | import IntlProvider from './provider'; 2 | 3 | export { default as IntlProvider } from './provider'; 4 | export { default as useIntl } from './useIntl'; 5 | export { default as withIntl } from './withIntl'; 6 | 7 | export default IntlProvider; 8 | -------------------------------------------------------------------------------- /components/color-select/demo/basic.md: -------------------------------------------------------------------------------- 1 | --- 2 | order: 0 3 | title: 基本 4 | --- 5 | 6 | 拾色选择器的基本使用 7 | 8 | ```jsx 9 | import { ColorSelect } from 'antd-advanced'; 10 | 11 | 12 | ReactDOM.render( 13 |
12 | 你要找的页面不存在 13 | {/* 14 | 返回首页 15 | */} 16 |
17 |useDeepCompareEffect: {count}
29 |
16 |
18 |
25 | Component A:
26 |
27 | setText(ev.target.value)} />
28 |
36 | Component B:
37 |
38 | setText(ev.target.value)} />
39 |
Those two fields share the same value.
47 |{value}
52 |38 | Component A 39 | 42 | {count} 43 | 46 |
47 | ); 48 | }; 49 | 50 | const ComponentB = () => { 51 | const [count, dispatch] = useSharedCounter(); 52 | return ( 53 |54 | Component B 55 | 58 | {count} 59 | 62 |
63 | ); 64 | }; 65 | 66 | const Demo = () => { 67 | return ( 68 |Those two counters share the same value.
70 |