├── theme
├── static
│ ├── style.js
│ ├── style
│ │ ├── index.tsx
│ │ ├── style
│ │ │ ├── index.tsx
│ │ │ ├── themes
│ │ │ │ └── index.less
│ │ │ ├── index.less
│ │ │ ├── v2-compatible-reset.tsx
│ │ │ ├── core
│ │ │ │ ├── index.less
│ │ │ │ ├── iconfont.less
│ │ │ │ └── motion.less
│ │ │ ├── mixins
│ │ │ │ ├── size.less
│ │ │ │ ├── index.less
│ │ │ │ ├── clearfix.less
│ │ │ │ ├── reset.less
│ │ │ │ ├── operation-unit.less
│ │ │ │ ├── compatibility.less
│ │ │ │ ├── motion.less
│ │ │ │ └── iconfont.less
│ │ │ └── v2-compatible-reset.less
│ │ ├── themes
│ │ │ └── index.less
│ │ ├── v2-compatible-reset.tsx
│ │ ├── index.less
│ │ ├── core
│ │ │ ├── index.less
│ │ │ ├── iconfont.less
│ │ │ └── motion.less
│ │ ├── mixins
│ │ │ ├── size.less
│ │ │ ├── index.less
│ │ │ ├── clearfix.less
│ │ │ ├── reset.less
│ │ │ ├── operation-unit.less
│ │ │ ├── compatibility.less
│ │ │ ├── motion.less
│ │ │ └── iconfont.less
│ │ └── v2-compatible-reset.less
│ ├── favicon.ico
│ ├── favicon.png
│ ├── img
│ │ ├── 一致性.png
│ │ ├── 信噪比.png
│ │ ├── img1.png
│ │ ├── img2.png
│ │ ├── img3.png
│ │ ├── img4.png
│ │ ├── item.png
│ │ ├── 业务优先.png
│ │ ├── 容错机制.png
│ │ ├── 清晰明了.png
│ │ ├── 灵活易用.png
│ │ ├── 高效操作.png
│ │ └── banner.png
│ ├── iconfont
│ │ ├── iconfont.eot
│ │ ├── iconfont.ttf
│ │ ├── iconfont.woff
│ │ └── iconfont.woff2
│ ├── theme.less
│ ├── nprogress.less
│ ├── docsearch.less
│ ├── new-version-info-modal.less
│ ├── index.less
│ ├── not-found.less
│ └── motion.less
├── dt-theme
│ ├── dark
│ │ ├── tab.less
│ │ ├── drawer.less
│ │ ├── card.less
│ │ ├── comm.less
│ │ ├── list.less
│ │ ├── message.less
│ │ ├── modal.less
│ │ ├── tree.less
│ │ ├── descriptions.less
│ │ ├── notification.less
│ │ ├── collapse.less
│ │ ├── upload.less
│ │ ├── index.less
│ │ └── popover.less
│ ├── index.less
│ └── default
│ │ ├── message.less
│ │ ├── menu.less
│ │ ├── dropdown.less
│ │ ├── radio.less
│ │ ├── comm.less
│ │ ├── breadcrumb.less
│ │ ├── drawer.less
│ │ ├── reset.less
│ │ ├── input-number.less
│ │ ├── list.less
│ │ ├── alert.less
│ │ ├── popover.less
│ │ ├── treeselect.less
│ │ ├── card.less
│ │ └── checkbox.less
├── template
│ ├── NotFound.jsx
│ ├── Content
│ │ ├── PrevAndNext.jsx
│ │ └── index.jsx
│ └── Layout
│ │ └── Footer.jsx
└── utils
│ └── index.js
├── .eslintignore
├── .prettierignore
├── .eslintrc.js
├── .prettierrc.js
├── .gitignore
├── release.md
├── .stylelintignore
├── types
└── moment.ts
├── components
├── index.js
├── rate
│ ├── index.zh-CN.md
│ └── demo
│ │ ├── disabled.md
│ │ └── basic.md
├── step
│ ├── index.zh-CN.md
│ └── demo
│ │ ├── simple.md
│ │ ├── error.md
│ │ ├── small-size.md
│ │ ├── vertical.md
│ │ ├── vertical-small.md
│ │ ├── icon.md
│ │ ├── customized-progress-dot.md
│ │ ├── progress-dot.md
│ │ └── clickable.md
├── tree
│ └── index.zh-CN.md
├── list
│ ├── index.zh-CN.md
│ └── demo
│ │ ├── card.md
│ │ └── basic.md
├── popconfirm
│ ├── index.zh-CN.md
│ └── demo
│ │ └── basic.md
├── calendar
│ └── calend.js
├── empty
│ ├── demo
│ │ └── basic.md
│ └── index.zh-CN.md
├── datepicker
│ ├── dtpicker.js
│ ├── index.zh-CN.md
│ └── demo
│ │ ├── disabled.md
│ │ ├── shadow.md
│ │ ├── basic.md
│ │ └── light.md
├── others
│ └── index.zh-CN.md
├── message
│ ├── index.zh-CN.md
│ └── demo
│ │ └── basic.md
├── dropdown
│ ├── index.zh-CN.md
│ └── demo
│ │ └── basic.md
├── input
│ ├── demo
│ │ ├── textarea.md
│ │ ├── password-input.md
│ │ ├── size.md
│ │ ├── shadow.md
│ │ ├── basic.md
│ │ ├── light.md
│ │ ├── unit-input.md
│ │ └── presuffix.md
│ └── index.zh-CN.md
├── timepicker
│ ├── demo
│ │ ├── disabled.md
│ │ ├── basic.md
│ │ ├── size.md
│ │ ├── shadow.md
│ │ └── light.md
│ ├── tmpicker.jsx
│ └── index.zh-CN.md
├── checkbox
│ ├── index.zh-CN.md
│ └── demo
│ │ ├── disabled.md
│ │ ├── basic.md
│ │ └── layout.md
├── form
│ └── index.zh-CN.md
├── tag
│ ├── index.zh-CN.md
│ └── demo
│ │ ├── basic.md
│ │ ├── disabled.md
│ │ ├── icon.md
│ │ ├── controlled.md
│ │ └── color.md
├── breadcrumb
│ ├── index.zh-CN.md
│ └── demo
│ │ ├── basic.md
│ │ └── tooltip.md
├── radio
│ ├── index.zh-CN.md
│ └── demo
│ │ └── shadow.md
├── pagination
│ ├── demo
│ │ ├── simple.md
│ │ ├── full.md
│ │ ├── size.md
│ │ └── basic.md
│ └── index.zh-CN.md
├── button
│ ├── demo
│ │ ├── size.md
│ │ ├── basic.md
│ │ ├── ghost.md
│ │ ├── disabled.md
│ │ ├── loading.md
│ │ ├── onlyIcon.md
│ │ ├── danger.md
│ │ └── icon.md
│ └── index.zh-CN.md
├── upload
│ ├── index.zh-CN.md
│ └── demo
│ │ └── basic.md
├── alert
│ ├── index.zh-CN.md
│ └── demo
│ │ ├── basic.md
│ │ └── icon.md
├── input-number
│ ├── demo
│ │ ├── basic.md
│ │ └── size.md
│ └── index.zh-CN.md
├── cascader
│ ├── index.zh-CN.md
│ └── demo
│ │ ├── select.md
│ │ └── basic.md
├── treeselect
│ └── index.zh-CN.md
├── descriptions
│ ├── index.zh-CN.md
│ └── demo
│ │ └── basic.md
├── tooltip
│ ├── demo
│ │ └── basic.md
│ └── index.zh-CN.md
├── popover
│ ├── index.zh-CN.md
│ └── demo
│ │ └── basic.md
├── drawer
│ └── index.zh-CN.md
├── collapse
│ ├── index.zh-CN.md
│ └── demo
│ │ ├── card.md
│ │ ├── basic.md
│ │ ├── ghost.md
│ │ └── light.md
├── card
│ ├── demo
│ │ ├── basic.md
│ │ └── grid-card.md
│ └── index.zh-CN.md
├── tab
│ ├── demo
│ │ ├── disabled.md
│ │ ├── card.md
│ │ ├── icon.md
│ │ ├── slide-vertical.md
│ │ └── light.md
│ └── index.zh-CN.md
├── notification
│ ├── index.zh-CN.md
│ └── demo
│ │ ├── closeAll.md
│ │ ├── basic.md
│ │ └── btn.md
├── steps
│ └── index.zh-CN.md
├── transfer
│ └── index.zh-CN.md
├── modal
│ ├── index.zh-CN.md
│ └── demo
│ │ ├── largeTitle.md
│ │ ├── size.md
│ │ └── basic.md
├── select
│ ├── demo
│ │ ├── size.md
│ │ ├── shadow.md
│ │ ├── light.md
│ │ ├── basic.md
│ │ ├── multiply.md
│ │ └── search.md
│ └── index.zh-CN.md
├── icon
│ └── index.zh-CN.md
├── table
│ └── demo
│ │ ├── empty.md
│ │ └── empty-top.md
└── layout
│ └── index.zh-CN.md
├── cup.config.js
├── custom-icons
├── iconfont-svgs
│ ├── MoreOutlined.svg
│ ├── EllipsisOutlined.svg
│ ├── MinusOutlined.svg
│ ├── UpOutlined.svg
│ ├── DownOutlined.svg
│ ├── LeftOutlined.svg
│ ├── RightOutlined.svg
│ ├── CheckOutlined.svg
│ ├── CaretDownFilled.svg
│ ├── CaretRightFilled.svg
│ ├── CaretUpFilled.svg
│ ├── MinusCircleFilled.svg
│ ├── SwapRightOutlined.svg
│ ├── CollapseCaretRightFilled.svg
│ ├── CloseOutlined.svg
│ ├── MinusCircleOutlined.svg
│ ├── PlusOutlined.svg
│ ├── FilterFilled.svg
│ ├── DoubleLeftOutlined.svg
│ ├── DoubleRightOutlined.svg
│ ├── MenuFoldOutlined.svg
│ ├── MenuUnfoldOutlined.svg
│ ├── HomeOutlined.svg
│ ├── BarsOutlined.svg
│ ├── PlusCircleOutlined.svg
│ ├── EditOutlined.svg
│ ├── ReloadOutlined.svg
│ ├── ClockCircleOutlined.svg
│ ├── CheckCircleOutlined.svg
│ ├── ExclamationCircleOutlined.svg
│ ├── UserOutlined.svg
│ ├── SearchOutlined.svg
│ ├── WarningFilled.svg
│ ├── LayoutOutlined.svg
│ ├── PlusCircleFilled.svg
│ ├── CheckCircleFilled.svg
│ ├── ZoomOutOutlined.svg
│ ├── ExclamationCircleFilled.svg
│ ├── MessageOutlined.svg
│ ├── MinusSquareOutlined.svg
│ ├── DeleteOutlined.svg
│ ├── UploadOutlined.svg
│ ├── DownloadOutlined.svg
│ ├── ZoomInOutlined.svg
│ ├── ImportOutlined.svg
│ ├── CloseCircleFilled.svg
│ ├── PaperClipOutlined.svg
│ ├── EyeOutlined.svg
│ ├── StarFilled.svg
│ ├── PlusSquareOutlined.svg
│ ├── QuestionCircleFilled.svg
│ ├── SwapOutlined.svg
│ ├── QuestionCircleOutlined.svg
│ ├── DragOutlined.svg
│ └── ExportOutlined.svg
└── generate
│ ├── rate.js
│ ├── formSpecial.js
│ └── special.js
├── .stylelintrc.js
├── scripts
├── publish.sh
├── changelog.sh
└── release.sh
├── default.conf
├── README.md
└── README_zh.md
/theme/static/style.js:
--------------------------------------------------------------------------------
1 | import './index.less';
2 |
--------------------------------------------------------------------------------
/theme/dt-theme/dark/tab.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
--------------------------------------------------------------------------------
/theme/static/style/index.tsx:
--------------------------------------------------------------------------------
1 | import './index.less';
2 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | dist/
2 | node_modules/
3 | **/iconfont*/*
4 |
--------------------------------------------------------------------------------
/theme/dt-theme/index.less:
--------------------------------------------------------------------------------
1 | @import "./default/index.less";
2 |
--------------------------------------------------------------------------------
/theme/static/style/style/index.tsx:
--------------------------------------------------------------------------------
1 | import './index.less';
2 |
--------------------------------------------------------------------------------
/theme/static/style/themes/index.less:
--------------------------------------------------------------------------------
1 | @import "./default.less";
2 |
--------------------------------------------------------------------------------
/theme/static/style/style/themes/index.less:
--------------------------------------------------------------------------------
1 | @import "./default.less";
2 |
--------------------------------------------------------------------------------
/theme/static/style/v2-compatible-reset.tsx:
--------------------------------------------------------------------------------
1 | import './v2-compatible-reset.less';
2 |
--------------------------------------------------------------------------------
/theme/static/style/index.less:
--------------------------------------------------------------------------------
1 | @import "./themes/index";
2 | @import "./core/index";
3 |
--------------------------------------------------------------------------------
/theme/static/style/style/index.less:
--------------------------------------------------------------------------------
1 | @import "./themes/index";
2 | @import "./core/index";
3 |
--------------------------------------------------------------------------------
/theme/static/style/style/v2-compatible-reset.tsx:
--------------------------------------------------------------------------------
1 | import './v2-compatible-reset.less';
2 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | dist/
2 | node_modules/
3 |
4 | *.md
5 | # custom-icons/
6 | **/iconfont*/*
7 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | extends: [require.resolve('ko-lint-config/.eslintrc')],
3 | };
4 |
--------------------------------------------------------------------------------
/theme/dt-theme/default/message.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-message {
4 | top: 88px;
5 | }
6 |
--------------------------------------------------------------------------------
/theme/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/favicon.ico
--------------------------------------------------------------------------------
/theme/static/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/favicon.png
--------------------------------------------------------------------------------
/theme/static/img/一致性.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/img/一致性.png
--------------------------------------------------------------------------------
/theme/static/img/信噪比.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/img/信噪比.png
--------------------------------------------------------------------------------
/theme/dt-theme/dark/drawer.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-drawer-body {
4 | color: @whiteBF;
5 | }
6 |
--------------------------------------------------------------------------------
/theme/static/img/img1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/img/img1.png
--------------------------------------------------------------------------------
/theme/static/img/img2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/img/img2.png
--------------------------------------------------------------------------------
/theme/static/img/img3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/img/img3.png
--------------------------------------------------------------------------------
/theme/static/img/img4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/img/img4.png
--------------------------------------------------------------------------------
/theme/static/img/item.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/img/item.png
--------------------------------------------------------------------------------
/theme/static/img/业务优先.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/img/业务优先.png
--------------------------------------------------------------------------------
/theme/static/img/容错机制.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/img/容错机制.png
--------------------------------------------------------------------------------
/theme/static/img/清晰明了.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/img/清晰明了.png
--------------------------------------------------------------------------------
/theme/static/img/灵活易用.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/img/灵活易用.png
--------------------------------------------------------------------------------
/theme/static/img/高效操作.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/img/高效操作.png
--------------------------------------------------------------------------------
/theme/static/img/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/img/banner.png
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | const prettier = require('ko-lint-config/.prettierrc');
2 |
3 | module.exports = {
4 | ...prettier,
5 | };
6 |
--------------------------------------------------------------------------------
/theme/static/style/core/index.less:
--------------------------------------------------------------------------------
1 | @import "../mixins/index";
2 | @import "base";
3 | @import "iconfont";
4 | @import "motion";
5 |
--------------------------------------------------------------------------------
/theme/static/iconfont/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/iconfont/iconfont.eot
--------------------------------------------------------------------------------
/theme/static/iconfont/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/iconfont/iconfont.ttf
--------------------------------------------------------------------------------
/theme/static/style/style/core/index.less:
--------------------------------------------------------------------------------
1 | @import "../mixins/index";
2 | @import "base";
3 | @import "iconfont";
4 | @import "motion";
5 |
--------------------------------------------------------------------------------
/theme/static/iconfont/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/iconfont/iconfont.woff
--------------------------------------------------------------------------------
/theme/static/iconfont/iconfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DTStack/ant-design-dtinsight-theme/HEAD/theme/static/iconfont/iconfont.woff2
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | _site
3 | /lib
4 | /es
5 | /dist
6 | .DS_Store
7 | npm-debug.log
8 | .history
9 | yarn-error.log
10 | .idea
--------------------------------------------------------------------------------
/release.md:
--------------------------------------------------------------------------------
1 | # ant-design-dtinsight-theme
2 |
3 | ``` bash
4 | npm run release
5 | npm publish --registry https://registry.npmjs.org/
6 | ```
7 |
--------------------------------------------------------------------------------
/theme/dt-theme/dark/card.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .dt-card-light-bg {
4 | .ant-card, &.ant-card {
5 | background-color: @blue1;
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/theme/static/theme.less:
--------------------------------------------------------------------------------
1 | @site-heading-color: #0d1a26;
2 |
3 | @site-text-color: #314659;
4 |
5 | @site-text-color-secondary: #697b8c;
6 |
7 | @site-border-color-split: #ebedf0;
8 |
--------------------------------------------------------------------------------
/theme/dt-theme/dark/comm.less:
--------------------------------------------------------------------------------
1 | // 除组件外的一些 共有样式
2 |
3 | // 自定义 scrollbar 样式
4 | .dt-scrollbar-base {
5 | &::-webkit-scrollbar-thumb {
6 | background: @whiteBF;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/.stylelintignore:
--------------------------------------------------------------------------------
1 | dist/
2 | node_modules/
3 | bower_components/
4 | .cache-loader/
5 | .DS_Store
6 | .idea/
7 | .env
8 | .vscode
9 | .history
10 | *.log
11 | **/iconfont*/*
12 | tinyColor.less
13 |
--------------------------------------------------------------------------------
/types/moment.ts:
--------------------------------------------------------------------------------
1 | // import moment from 'dayjs';
2 | // import { RcFile } from 'antd/lib/upload';
3 |
4 | // export interface RcFileWithModifyTime extends RcFile {
5 | // modifyTime: moment;
6 | // }
7 |
--------------------------------------------------------------------------------
/components/index.js:
--------------------------------------------------------------------------------
1 | export { default as DatePicker } from './datepicker/dtpicker';
2 | export { default as Calendar } from './calendar/calend';
3 | export { default as TimePicker } from './timepicker/tmpicker';
4 |
--------------------------------------------------------------------------------
/components/rate/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 评分
4 | type: 数据录入
5 | title: Rate
6 | ---
7 |
8 | 评分组件,由实底的星星组成。
9 |
10 | ## 使用场景
11 | - 对评价进行展示
12 | - 对事物进行快速的评级操作
13 |
14 |
15 |
--------------------------------------------------------------------------------
/theme/static/style/mixins/size.less:
--------------------------------------------------------------------------------
1 | // Sizing shortcuts
2 |
3 | .size(@width; @height) {
4 | width: @width;
5 | height: @height;
6 | }
7 |
8 | .square(@size) {
9 | .size(@size; @size);
10 | }
11 |
--------------------------------------------------------------------------------
/theme/static/style/style/mixins/size.less:
--------------------------------------------------------------------------------
1 | // Sizing shortcuts
2 |
3 | .size(@width; @height) {
4 | width: @width;
5 | height: @height;
6 | }
7 |
8 | .square(@size) {
9 | .size(@size; @size);
10 | }
11 |
--------------------------------------------------------------------------------
/components/step/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | type: 导航
4 | title: Step
5 | subtitle: 步骤条
6 | cols: 1
7 | ---
8 |
9 | 引导用户按照流程完成任务的导航条。
10 |
11 |
12 | ## 何时使用
13 |
14 | 当任务复杂或者存在先后关系时,将其分解成一系列步骤,从而简化任务。
--------------------------------------------------------------------------------
/components/tree/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | type: 数据展示
4 | title: Tree
5 | subtitle: 树形控件
6 | ---
7 |
8 | 多层次的结构列表。
9 |
10 | ## 何时使用
11 |
12 | - 文件夹、组织架构、生物分类、国家地区等等,世间万物的大多数结构都是树形结构;
13 | - 使用 `树控件` 可以完整展现其中的层级关系,并具有展开收起选择等交互功能;
14 |
--------------------------------------------------------------------------------
/components/list/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 列表
4 | type: 数据展示
5 | title: List
6 | cols: 1
7 | ---
8 |
9 | 列表是一组文本或图文,其中可以包含图标按钮或文字按钮,用来聚合同类型的内容。
10 |
11 | ## 何时使用
12 |
13 | 聚合同类信息内容,方便快速浏览和查询;
14 | 用于信息的罗列,可承载文字、列表、图片、段落等;
15 |
16 |
--------------------------------------------------------------------------------
/components/popconfirm/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 气泡确认框
4 | type: 反馈
5 | title: Popconfirm
6 | ---
7 |
8 | 点击元素,弹出气泡式的确认框。
9 |
10 | ## 何时使用
11 |
12 | 目标元素的操作需要用户进一步的确认时,在目标元素附近弹出浮层提示,询问用户。
13 |
14 | 和 `confirm` 弹出的全屏居中模态对话框相比,交互形式更轻量。
--------------------------------------------------------------------------------
/theme/dt-theme/dark/list.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-list {
4 | .ant-list-bordered, .ant-list-item .ant-list-split, .ant-list-item {
5 | background: @blue2;
6 | border-bottom: 1px solid @blue4;
7 | }
8 | background: @blue2;
9 | }
10 |
--------------------------------------------------------------------------------
/theme/static/style/mixins/index.less:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------------------------------
3 | @import "size";
4 | @import "compatibility";
5 | @import "clearfix";
6 | @import "iconfont";
7 | @import "motion";
8 | @import "reset";
9 | @import "operation-unit";
10 |
--------------------------------------------------------------------------------
/theme/dt-theme/dark/message.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-message-notice-content {
4 | box-shadow: 0 2px 8px 0 #06070A;
5 | height: 40px;
6 | font-size: 14px;
7 | color: @whiteBF;
8 | .anticon {
9 | font-size: 16px;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/theme/static/style/style/mixins/index.less:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------------------------------
3 | @import "size";
4 | @import "compatibility";
5 | @import "clearfix";
6 | @import "iconfont";
7 | @import "motion";
8 | @import "reset";
9 | @import "operation-unit";
10 |
--------------------------------------------------------------------------------
/components/calendar/calend.js:
--------------------------------------------------------------------------------
1 | import dayjsGenerateConfig from 'rc-picker/lib/generate/dayjs';
2 | import generateCalendar from 'antd/lib/calendar/generateCalendar';
3 | import 'antd/lib/calendar/style';
4 |
5 | const Calendar = generateCalendar(dayjsGenerateConfig);
6 |
7 | export default Calendar;
8 |
--------------------------------------------------------------------------------
/theme/static/style/mixins/clearfix.less:
--------------------------------------------------------------------------------
1 | // mixins for clearfix
2 | // ------------------------
3 | .clearfix() {
4 | zoom: 1;
5 | &::before,
6 | &::after {
7 | display: table;
8 | content: "";
9 | }
10 | &::after {
11 | clear: both;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/components/empty/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本
5 | en-US: Basic
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 简单的展示。
11 |
12 | ## en-US
13 |
14 | Simplest Usage.
15 |
16 | ```jsx
17 | import { Empty } from 'antd';
18 |
19 | ReactDOM.render(, mountNode);
20 | ```
21 |
--------------------------------------------------------------------------------
/theme/static/style/style/mixins/clearfix.less:
--------------------------------------------------------------------------------
1 | // mixins for clearfix
2 | // ------------------------
3 | .clearfix() {
4 | zoom: 1;
5 | &::before,
6 | &::after {
7 | display: table;
8 | content: "";
9 | }
10 | &::after {
11 | clear: both;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/components/datepicker/dtpicker.js:
--------------------------------------------------------------------------------
1 | import dayjsGenerateConfig from 'rc-picker/lib/generate/dayjs';
2 | import generatePicker from 'antd/lib/date-picker/generatePicker';
3 | import 'antd/lib/date-picker/style/index';
4 |
5 | const DatePicker = generatePicker(dayjsGenerateConfig);
6 |
7 | export default DatePicker;
8 |
--------------------------------------------------------------------------------
/components/others/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | cols: 1
4 | type: 其他
5 | title: Others
6 | subtitle: 其他
7 | ---
8 |
9 | 不同产品中可以共用的一些样式。
10 |
11 | ## API
12 |
13 | |类名 |说明 |使用示例 |
14 | |---------|---------|---------|
15 | |.dt-scrollbar-base | 自定义滚动条样式,一般用于美化 Windows 中滚动条样式 | 自定义滚动条样式 |
16 |
--------------------------------------------------------------------------------
/components/message/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | cols: 1
4 | type: 反馈
5 | title: Message
6 | subtitle: 全局提示
7 | ---
8 |
9 | 全局展示操作反馈信息。
10 |
11 | ## 设计规范
12 |
13 | 不同主题,背景色不一致,默认主题背景色为 #FFFFFF,暗黑主题背景色为 #1D1F2E。
14 |
15 | ## 何时使用
16 |
17 | - 可提供成功、警告和错误等反馈信息。
18 | - 顶部居中显示并自动消失,是一种不打断用户操作的轻量级提示方式。
19 |
20 |
--------------------------------------------------------------------------------
/theme/static/nprogress.less:
--------------------------------------------------------------------------------
1 | #nprogress {
2 | .bar {
3 | background: @primary-color;
4 | }
5 | .peg {
6 | box-shadow: 0 0 10px @primary-color, 0 0 5px @primary-color;
7 | }
8 | .spinner-icon {
9 | border-top-color: @primary-color;
10 | border-left-color: @primary-color;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/components/dropdown/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | type: 导航
4 | title: Dropdown
5 | subtitle: 下拉菜单
6 | ---
7 |
8 | 向下弹出的列表。
9 |
10 | ## 设计规范
11 |
12 | - 上下间距8px;
13 |
14 | ## 何时使用
15 |
16 | 当页面上的操作命令过多时,用此组件可以收纳操作元素。点击或移入触点,会出现一个下拉菜单。可在列表中进行选择,并执行相应的命令。
17 |
18 | - 用于收罗一组命令操作。
19 | - Select 用于选择,而 Dropdown 是命令集合。
20 |
21 |
--------------------------------------------------------------------------------
/components/input/demo/textarea.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 5
3 | title:
4 | zh-CN: 文本域
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 文本域,可拖动
10 |
11 | ```jsx
12 | import { Input } from 'antd';
13 | const { TextArea } = Input;
14 |
15 | ReactDOM.render(
16 | ,
17 | mountNode,
18 | );
19 | ```
20 |
--------------------------------------------------------------------------------
/components/timepicker/demo/disabled.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 3
3 | title:
4 | zh-CN: 禁用
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 禁用时间选择。
10 |
11 | ```jsx
12 | import { TimePicker } from '../../index';
13 | import moment from 'dayjs';
14 |
15 | ReactDOM.render(, mountNode);
16 | ```
17 |
--------------------------------------------------------------------------------
/components/input/demo/password-input.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 4
3 | title:
4 | zh-CN: 密码框
5 | en-US: Password box
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 密码框。
11 |
12 | ## en-US
13 |
14 | Input type of password.
15 |
16 | ```jsx
17 | import { Input } from 'antd';
18 |
19 | ReactDOM.render(, mountNode);
20 | ```
21 |
--------------------------------------------------------------------------------
/components/timepicker/tmpicker.jsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import DatePicker from '../datepicker/dtpicker';
3 |
4 | const TimePicker = React.forwardRef((props, ref) => {
5 | return ;
6 | });
7 |
8 | TimePicker.displayName = 'TimePicker';
9 |
10 | export default TimePicker;
11 |
--------------------------------------------------------------------------------
/theme/dt-theme/dark/modal.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-modal-title {
4 | font-weight: 500;
5 | }
6 |
7 | .ant-modal-content {
8 | background-color: @blue2;
9 | border: 1px solid @blue3;
10 | }
11 |
12 | .ant-modal-header {
13 | border-bottom-color: @blue3;
14 | }
15 |
16 | .ant-modal-footer {
17 | border-top: 0;
18 | }
19 |
--------------------------------------------------------------------------------
/components/checkbox/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 复选框
4 | type: 数据录入
5 | title: Checkbox
6 | cols: 1
7 | ---
8 |
9 | 在一组数据中,用户可通过复选框选择一个
10 |
11 | ## 设计规范
12 |
13 | - 复选框占位高度32px,上下间距6px
14 | - 字体12px,行高20px,字体颜色#3D446E;
15 | - 失效状态字体12px,字体颜色B1B4C5;
16 |
17 | ## API
18 |
19 | |类名 |说明 |使用示例 |
20 | |---------|---------|---------|
21 |
22 |
--------------------------------------------------------------------------------
/components/form/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 表单
4 | type: 数据录入
5 | title: Form
6 | cols: 1
7 | ---
8 |
9 | 具有数据收集、校验和提交功能的表单,包含复选框、单选框、输入框、下拉选择框等元素。
10 |
11 | ## 设计规范
12 |
13 | - 纵向相邻表单之间的间隔为 16 px
14 |
15 | ## API
16 |
17 | |类名 |说明 |使用示例 |
18 | |---------|---------|---------|
19 | |.dt-form-light-bg | 浅色背景上,显示深色控件 | 浅色背景(仅暗黑主题下使用) |
20 |
--------------------------------------------------------------------------------
/cup.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * GitHub: https://github.com/wewoor/cup/blob/HEAD/README_zh.md
3 | * 用于本地模拟 NGINX,测试打包的dist文件,亦或者做接口模拟操作
4 | * 使用:
5 | * > npm install -g mini-cup
6 | * > cup config // 按配置文件运行
7 | */
8 |
9 | module.exports = {
10 | name: 'DTinsight build test',
11 | listen: 3001,
12 | root: 'dist',
13 | location: {},
14 | proxyTable: {},
15 | };
16 |
--------------------------------------------------------------------------------
/components/tag/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 标签
4 | type: 数据展示
5 | title: Tag
6 | cols: 1
7 | ---
8 |
9 | ## 普通标签
10 |
11 | 用于标记事物的属性和维度
12 |
13 |
14 | ## 设计规范
15 |
16 | - 边框 #EBECF0,底色 #F9F9FA,字号 12px,字体颜色 #3D446E;
17 |
18 |
19 | ## API
20 |
21 | |类名 |说明 |使用示例 |
22 | |---------|---------|---------|
23 | |.dt-tag-disabled | 设置 Tag 的禁用样式 | 禁用 |
24 |
--------------------------------------------------------------------------------
/components/breadcrumb/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | type: 导航
4 | title: Breadcrumb
5 | subtitle: 面包屑
6 | ---
7 |
8 | 用于展示当前页面在系统层级中的位置,并根据需要向上返回。
9 |
10 | ## 设计规范
11 |
12 | - 面包屑文字大小 12px
13 | - 当前页字体颜色#3D446E Regular,非当前页字体颜色为#8B8FA8 Regular
14 | - 分隔符填充颜色为#B1B4C5,整体面包屑行高(文本行高)20px
15 |
16 | ## 何时使用
17 |
18 | - 当系统拥有超过两级以上的层级结构时;
19 | - 当需要告知用户『你在哪里』时;
20 | - 当需要向上导航的功能时。
21 |
--------------------------------------------------------------------------------
/components/radio/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 单选框
4 | type: 数据录入
5 | title: Radio
6 | cols: 1
7 | ---
8 |
9 | - 在一组相关且互斥数据中,用户仅能选择。
10 |
11 | ## 设计规范
12 | - 单选框占位高度32px,上下间距6px,字体12px,行高20px,字体颜色#3D446E;
13 | - 失效状态字体12px,字体颜色#B1B4C5;
14 | ## API
15 |
16 | |类名 |说明 |使用示例 |
17 | |---------|---------|---------|
18 | |.dt-radio-group | 灰色背景 | 灰色背景(仅默认主题下使用) |
19 |
--------------------------------------------------------------------------------
/components/tag/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | en-US: Basic Usage
5 | zh-CN: 基本
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 最简单的用法。
11 |
12 | ```jsx
13 | import { Tag } from 'antd';
14 |
15 | ReactDOM.render(
16 |
17 | Tag 1
18 |
19 | Tag 2
20 |
21 |
22 | 标签内容
23 |
24 |
,
25 | mountNode,
26 | );
27 | ```
--------------------------------------------------------------------------------
/theme/dt-theme/default/menu.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | // 选择项目 Submenu Dropdown,隐藏小弹框
4 | .ant-menu-submenu {
5 | &.ant-menu-submenu-placement-bottomLeft.ant-menu {
6 | display: none;
7 | }
8 | }
9 |
10 | // 子产品左侧图标大小
11 | .ant-menu-item, .ant-menu-submenu {
12 | .ant-menu-title-content {
13 | svg {
14 | font-size: 20px;
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/theme/static/style/mixins/reset.less:
--------------------------------------------------------------------------------
1 | @import "../themes/index";
2 |
3 | .reset-component() {
4 | box-sizing: border-box;
5 | margin: 0;
6 | padding: 0;
7 | color: @text-color;
8 | font-size: @font-size-base;
9 | font-variant: @font-variant-base;
10 | line-height: @line-height-base;
11 | list-style: none;
12 | font-feature-settings: @font-feature-settings-base;
13 | }
14 |
--------------------------------------------------------------------------------
/components/pagination/demo/simple.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 3
3 | title:
4 | zh-CN: 精简型
5 | en-US: Simple
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 页面宽度过窄时使用。
11 |
12 | ## en-US
13 |
14 | The basic example.
15 |
16 | ```jsx
17 | import React from 'react';
18 | import { Pagination } from 'antd';
19 |
20 | ReactDOM.render(
21 | ,
22 | mountNode,
23 | );
24 | ```
25 |
--------------------------------------------------------------------------------
/theme/static/style/style/mixins/reset.less:
--------------------------------------------------------------------------------
1 | @import "../themes/index";
2 |
3 | .reset-component() {
4 | box-sizing: border-box;
5 | margin: 0;
6 | padding: 0;
7 | color: @text-color;
8 | font-size: @font-size-base;
9 | font-variant: @font-variant-base;
10 | line-height: @line-height-base;
11 | list-style: none;
12 | font-feature-settings: @font-feature-settings-base;
13 | }
14 |
--------------------------------------------------------------------------------
/theme/dt-theme/default/dropdown.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-dropdown-menu {
4 | padding: 8px 0;
5 | }
6 |
7 | .ant-dropdown-button {
8 | .ant-btn-icon-only {
9 | background-color: @primaryColor;
10 | &:hover {
11 | background-color: @hoverColor;
12 | }
13 | &:active {
14 | background-color: @clickColor;
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/theme/static/style/mixins/operation-unit.less:
--------------------------------------------------------------------------------
1 | @import "../../style/themes/default";
2 |
3 | .operation-unit() {
4 | color: @link-color;
5 | text-decoration: none;
6 | outline: none;
7 | cursor: pointer;
8 | transition: color 0.3s;
9 | &:focus,
10 | &:hover {
11 | color: @link-hover-color;
12 | }
13 | &:active {
14 | color: @link-active-color;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/components/button/demo/size.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 按钮大小
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 按钮高度分为 32px (常规尺寸)、 24px (小尺寸)两种。
10 |
11 | ```jsx
12 | import { Button } from 'antd';
13 |
14 | ReactDOM.render(
15 |
16 |
17 |
18 |
,
19 | mountNode,
20 | );
21 | ```
22 |
--------------------------------------------------------------------------------
/components/input/demo/size.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 3
3 | title:
4 | zh-CN: 两种大小
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 我们为输入框定义了两种尺寸(默认、小),高度分别为 32px 和 24px。
10 |
11 | ```jsx
12 | import { Input } from 'antd';
13 |
14 | ReactDOM.render(
15 |
16 |
17 |
18 |
,
19 | mountNode,
20 | );
21 | ```
22 |
--------------------------------------------------------------------------------
/theme/static/style/style/mixins/operation-unit.less:
--------------------------------------------------------------------------------
1 | @import "../../style/themes/default";
2 |
3 | .operation-unit() {
4 | color: @link-color;
5 | text-decoration: none;
6 | outline: none;
7 | cursor: pointer;
8 | transition: color 0.3s;
9 | &:focus,
10 | &:hover {
11 | color: @link-hover-color;
12 | }
13 | &:active {
14 | color: @link-active-color;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/components/upload/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 上传
4 | type: 数据录入
5 | title: Upload
6 | ---
7 |
8 | 传输文件或者提交相应的内容
9 |
10 | ## 何时使用
11 |
12 | 上传组件由上传按钮、上传内容、删除/重新下载按钮和上传状态组成。根据不同场景需求,上传样式分为三种:基础样式、图片上传、拖拽上传。
13 | - 当需要上传一个或一些文件时。
14 | - 当需要展现上传的进度时。
15 | - 当需要使用拖拽交互时。
16 |
17 | ## API
18 |
19 | |类名 |说明 |使用示例 |
20 | |---------|---------|---------|
21 | |.dt-upload-button | 设置上传按钮文字和 icon 的样式 | 基本用法、可选择可操作 |
--------------------------------------------------------------------------------
/components/pagination/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 分页
4 | type: 数据展示
5 | title: Pagination
6 | cols: 1
7 | ---
8 |
9 | ## 设计规范
10 |
11 | - 最多显示 5 页内容,当数量多时默认显示前 5 页以及最后 1 页;
12 | - 若选中的是中间的页数,则除了固定显示第 1 页和最后 1 页之外,显示已选中的页数为中间数,向前和向后各 2 页;
13 |
14 | ## API
15 |
16 | |类名 |说明 |使用示例 |
17 | |---------|---------|---------|
18 | |.dt-pagination-right | 让分页器居右 | 居右 |
19 | |.dt-pagination-totalCount | 高亮总条数 | 基础分页 |
20 |
--------------------------------------------------------------------------------
/components/step/demo/simple.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本用法
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 简单的步骤条。
10 |
11 |
12 | ```jsx
13 | import { Steps } from 'antd';
14 |
15 | const { Step } = Steps;
16 |
17 | ReactDOM.render(
18 |
19 |
20 |
21 |
22 | ,
23 | mountNode,
24 | );
25 | ```
--------------------------------------------------------------------------------
/components/alert/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | cols: 1
4 | type: 反馈
5 | title: Alert
6 | subtitle: 警告提示
7 | ---
8 |
9 | 向用户显示警告的信息时,通过警告提示,展现需要关注的信息。
10 |
11 | ## 何时使用
12 |
13 | - 当某个页面需要向用户显示警告的信息时。
14 | - 非浮层的静态展现形式,始终展现,不会自动消失,用户可以点击关闭。
15 |
16 | ## 设计规范
17 |
18 | #### 默认主题
19 |
20 | 警告提示 不带边框,高度为 44px。不同提示颜色不同。
21 |
22 | - 错误提示 背景色为 #FDE9E7
23 | - 警告提示 背景色为 #FFF4D9
24 | - 成功提示 背景色为 #E7FBF7
25 | - 常规提示 背景色为 #E8F1FF
26 |
27 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/MoreOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/input-number/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本
5 | en-US: Basic
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 数字输入框。
11 |
12 | ## en-US
13 |
14 | Numeric-only input box.
15 |
16 | ```jsx
17 | import { InputNumber } from 'antd';
18 |
19 | function onChange(value) {
20 | console.log('changed', value);
21 | }
22 |
23 | ReactDOM.render(, mountNode);
24 | ```
25 |
--------------------------------------------------------------------------------
/components/cascader/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 级联选择
4 | type: 数据录入
5 | title: Cascader
6 | cols: 2
7 | ---
8 |
9 | - 当一个数据集合有清晰的层级结构时,可通过级联选择器逐级查看并选择,例如省市区,公司层级,事物分类等。
10 |
11 | ## 设计规范
12 | - 字体 12px,默认字体颜色#3D446E;
13 | - 选中颜色#1D78FF;
14 | - hover 状态底色#F5F5F8;
15 | - 每一列固定宽度 212px;
16 |
17 | ## API
18 |
19 | |类名 |说明 |使用示例 |
20 | |---------|---------|---------|
21 | |.dt-ant-select-outside | 设置级联的统一样式 | 基本用法、可选择可操作 |
22 |
--------------------------------------------------------------------------------
/components/input/demo/shadow.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 2
3 | title:
4 | zh-CN: 灰色背景(仅默认主题下使用)
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 灰色背景中的表单需添加投影,去掉外边框
10 |
11 | 仅默认主题下使用,暗黑主题下使用无效
12 |
13 | - 为组件添加类名`dt-form-shadow-bg`
14 |
15 | ```jsx
16 | import { Input } from 'antd';
17 |
18 | ReactDOM.render(
19 |
20 |
21 |
,
22 | mountNode
23 | );
24 | ```
25 |
--------------------------------------------------------------------------------
/components/step/demo/error.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 6
3 | title:
4 | zh-CN: 步骤运行错误
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 使用 Steps 的 `status` 属性来指定当前步骤的状态。
10 |
11 | ```jsx
12 | import { Steps } from 'antd';
13 |
14 | const { Step } = Steps;
15 |
16 | ReactDOM.render(
17 |
18 |
19 |
20 |
21 | ,
22 | mountNode,
23 | );
24 | ```
25 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/EllipsisOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/step/demo/small-size.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 迷你版
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 迷你版的步骤条,通过设置 `` 启用
10 |
11 | ```jsx
12 | import { Steps } from 'antd';
13 |
14 | const { Step } = Steps;
15 |
16 | ReactDOM.render(
17 |
18 |
19 |
20 |
21 | ,
22 | mountNode,
23 | );
24 | ```
25 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/MinusOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/theme/dt-theme/default/radio.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-radio-wrapper {
4 | align-items: center;
5 | line-height: 16px;
6 | padding-top: 0.4em;
7 | margin-right: 14px;
8 | .ant-radio {
9 | top: 0;
10 | }
11 | span.ant-radio + * {
12 | padding: 0 10px;
13 | }
14 | .ant-radio-disabled {
15 | .ant-radio-inner::after {
16 | background-color: @black_border;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/UpOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/treeselect/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 树选择
4 | type: 数据录入
5 | title: TreeSelect
6 | ---
7 |
8 | 树型选择控件。
9 |
10 | ## 设计规范
11 |
12 | - 树型选择控件。常规高度为 32px,小尺寸的高度为 24px,边框颜色 #D8DAE2,4px 圆角,宽度根据具体情况而定;
13 | - 提示字颜色 #B1B4C5,输入颜色 #3D446E;
14 |
15 | ## API
16 |
17 | |类名 |说明 |使用示例 |
18 | |---------|---------|---------|
19 | |.dt-form-shadow-bg | 灰色背景,表单样式设置 | 灰色背景(仅默认主题下使用) |
20 | |.dt-form-light-bg | 浅色背景上,显示深色控件 | 浅色背景(仅暗黑主题下使用) |
21 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/DownOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/LeftOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/RightOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/descriptions/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 描述列表
4 | type: 数据展示
5 | title: Descriptions
6 | cols: 1
7 | ---
8 |
9 | 成组展示多个只读字段。
10 |
11 | ## 如何使用
12 | 展示区域足够大,多用在常规页面、抽屉式浮窗、弹窗等场景中
13 |
14 | ## 设计规范
15 |
16 | - 有边框单行最大高度136px,超出内部滚动
17 |
18 | ## API
19 |
20 | |类名 |说明 |使用示例 |
21 | |---------|---------|---------|
22 | |.dt-descriptions-vertical-display | 实现竖向排列 | 实现竖向排列 |
23 | |.dt-descriptions-custom-display | 实现自定义展示 | 实现自定义展示 |
24 |
25 |
--------------------------------------------------------------------------------
/components/rate/demo/disabled.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 仅展示
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 仅展示,无法进行鼠标交互
10 |
11 | ```jsx
12 | import { Rate } from 'antd';
13 |
14 | const App = () => {
15 | return (
16 |
17 |
18 |
19 |
20 |
21 | );
22 | }
23 |
24 | ReactDOM.render(
25 | ,
26 | mountNode,
27 | );
28 | ```
29 |
--------------------------------------------------------------------------------
/theme/dt-theme/default/comm.less:
--------------------------------------------------------------------------------
1 | // 除组件外的一些 共有样式
2 | @import "../const.less";
3 | // 自定义 scrollbar 样式
4 | .dt-scrollbar-base {
5 | &::-webkit-scrollbar {
6 | width: 15px; // 纵向滚动条宽度
7 | height: 13px; // 横向滚动条高度
8 | }
9 | &::-webkit-scrollbar-thumb {
10 | background: @black_navBg;
11 | border-radius: 10px;
12 | }
13 | &::-webkit-scrollbar-track {
14 | background: transparent;
15 | border-radius: 2px;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/components/timepicker/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本使用
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 点击 TimePicker,然后可以在浮层中选择或者输入某一时间。
10 |
11 | ```jsx
12 | import { TimePicker } from '../../index';
13 | import moment from 'dayjs';
14 |
15 | function onChange(time, timeString) {
16 | console.log(time, timeString);
17 | }
18 |
19 | ReactDOM.render(
20 | ,
21 | mountNode,
22 | );
23 | ```
24 |
--------------------------------------------------------------------------------
/theme/static/style/core/iconfont.less:
--------------------------------------------------------------------------------
1 | @import "../themes/index";
2 | @import "../mixins/iconfont";
3 |
4 | .@{iconfont-css-prefix} {
5 | .iconfont-mixin();
6 | &[tabindex] {
7 | cursor: pointer;
8 | }
9 | }
10 |
11 | .@{iconfont-css-prefix}-spin::before {
12 | display: inline-block;
13 | animation: loadingCircle 1s infinite linear;
14 | }
15 | .@{iconfont-css-prefix}-spin {
16 | display: inline-block;
17 | animation: loadingCircle 1s infinite linear;
18 | }
19 |
--------------------------------------------------------------------------------
/components/checkbox/demo/disabled.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 不可用
5 | en-US: Disabled
6 | ---
7 |
8 | ## zh-CN
9 |
10 | checkbox 不可用。
11 |
12 | ## en-US
13 |
14 | Disabled checkbox.
15 |
16 | ```tsx
17 | import { Checkbox } from 'antd';
18 |
19 | const App: React.FC = () => (
20 | <>
21 |
22 |
23 |
24 | >
25 | );
26 |
27 | ReactDOM.render(, mountNode);
28 | ```
29 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/CheckOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/theme/dt-theme/dark/tree.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-tree {
4 | .ant-tree-checkbox-inner {
5 | background-color: #11121C;
6 | border-color: #363B59;
7 | border-radius: 2px;
8 | }
9 | .ant-tree-checkbox-checked .ant-tree-checkbox-inner {
10 | background-color: @primaryColor;
11 | border-color: @primaryColor;
12 | }
13 | }
14 |
15 | .ant-tree.ant-tree-show-line li span.ant-tree-switcher {
16 | background-color: transparent;
17 | }
18 |
--------------------------------------------------------------------------------
/theme/static/style/style/core/iconfont.less:
--------------------------------------------------------------------------------
1 | @import "../themes/index";
2 | @import "../mixins/iconfont";
3 |
4 | .@{iconfont-css-prefix} {
5 | .iconfont-mixin();
6 | &[tabindex] {
7 | cursor: pointer;
8 | }
9 | }
10 |
11 | .@{iconfont-css-prefix}-spin::before {
12 | display: inline-block;
13 | animation: loadingCircle 1s infinite linear;
14 | }
15 | .@{iconfont-css-prefix}-spin {
16 | display: inline-block;
17 | animation: loadingCircle 1s infinite linear;
18 | }
19 |
--------------------------------------------------------------------------------
/components/input/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本使用
5 | en-US: Basic usage
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 基本使用。
11 |
12 | ## en-US
13 |
14 | Basic usage example.
15 |
16 | ```jsx
17 | import { Input } from 'antd';
18 |
19 | ReactDOM.render(
20 |
21 |
22 |
23 |
24 |
25 |
,
26 | mountNode
27 | );
28 | ```
29 |
--------------------------------------------------------------------------------
/components/rate/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本使用
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 基本用法
10 |
11 | ```jsx
12 | import { Rate } from 'antd';
13 | import { useState } from 'react';
14 |
15 | const App = () => {
16 | const [value, setValue] = useState(2);
17 |
18 | return (
19 |
20 |
21 |
22 | );
23 | }
24 |
25 | ReactDOM.render(
26 | ,
27 | mountNode,
28 | );
29 | ```
30 |
--------------------------------------------------------------------------------
/components/timepicker/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 时间选择框
4 | type: 数据录入
5 | title: TimePicker
6 | ---
7 |
8 | 当用户需要输入一个时间,可以点击标准输入框,弹出时间面板进行选择。
9 |
10 | ## 设计规范
11 |
12 | - 时间选择框常规高度为 32px,小尺寸的高度为 24px,边框颜色 #D8DAE2,4px 圆角,宽度根据具体情况而定;
13 | - 提示字颜色 #B1B4C5,输入颜色 #3D446E;
14 |
15 | ## API
16 |
17 | |类名 |说明 |使用示例 |
18 | |---------|---------|---------|
19 | |.dt-form-shadow-bg | 灰色背景,表单样式设置 | 灰色背景(仅默认主题下使用) |
20 | |.dt-form-light-bg | 浅色背景上,显示深色控件 | 浅色背景(仅暗黑主题下使用) |
21 |
--------------------------------------------------------------------------------
/theme/static/docsearch.less:
--------------------------------------------------------------------------------
1 | .algolia-autocomplete {
2 | .ds-dropdown-menu {
3 | border: none;
4 | box-shadow: @box-shadow-base;
5 | [class^="ds-dataset-"] {
6 | border: none;
7 | }
8 | &::before {
9 | display: none;
10 | }
11 | }
12 | .algolia-docsearch-suggestion--title {
13 | color: @site-text-color;
14 | }
15 | .algolia-docsearch-suggestion--highlight {
16 | color: @primary-color;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/components/tooltip/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本使用
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 最简单的用法。
10 |
11 | ## en-US
12 |
13 | The simplest usage.
14 |
15 | ```jsx
16 | import { Tooltip } from 'antd';
17 |
18 | ReactDOM.render(
19 |
20 |
21 | Tooltip will show on mouse enter.
22 |
23 |
,
24 | mountNode,
25 | );
26 | ```
27 |
--------------------------------------------------------------------------------
/components/popover/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 气泡卡片
4 | type: 数据展示
5 | title: Popover
6 | ---
7 |
8 | -点击/鼠标移入元素,弹出气泡式的卡片浮层。
9 |
10 | ## 设计规范
11 |
12 | - 标题字体大小 14px,Medium,字体颜色 #3D446E;
13 | - 辅助文本 12px,字体颜色 #8B8FA8;
14 | - 气泡框在内容的基础上留有适当的边距,建议左右边距为 16px,上下边距 16px;
15 | - 气泡提示默认 280,最长宽度为 400px。同一业务内建议采用统一的尺寸;
16 | - 背景 #FFFFFF,投影 #3D446E 20%,Y5px,模糊度 22;
17 |
18 |
19 | ## 何时使用
20 |
21 | 目标元素的操作需要用户进一步的确认时,在目标元素附近弹出浮层提示,询问用户。
22 |
23 | 用户可以对卡片上的元素进行操作,因此它可以承载更复杂的内容,比如链接或按钮等。
24 |
25 |
--------------------------------------------------------------------------------
/components/timepicker/demo/size.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 两种大小
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 定义了两种尺寸(默认、小),高度分别为 32px 和 24px。
10 |
11 | ```jsx
12 | import { TimePicker } from '../../index';
13 | import moment from 'dayjs';
14 |
15 | ReactDOM.render(
16 |
17 |
18 |
19 |
,
20 | mountNode,
21 | );
22 | ```
23 |
--------------------------------------------------------------------------------
/theme/dt-theme/dark/descriptions.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-descriptions {
4 | .ant-descriptions-bordered, .ant-descriptions-row {
5 | border-bottom: 1px solid #06070A;
6 | .ant-descriptions-item-content {
7 | border-right: 1px solid #06070A;
8 | }
9 | .ant-descriptions-item-label {
10 | border-right: 1px solid #06070A;
11 | }
12 | }
13 | .ant-descriptions-item-content {
14 | background-color: @blue2;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/components/step/demo/vertical.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 4
3 | title:
4 | zh-CN: 竖直方向的步骤条
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 简单的竖直方向的步骤条。
10 |
11 | ## en-US
12 |
13 | A simple step bar in the vertical direction.
14 |
15 | ```jsx
16 | import { Steps } from 'antd';
17 |
18 | const { Step } = Steps;
19 |
20 | ReactDOM.render(
21 |
22 |
23 |
24 |
25 | ,
26 | mountNode,
27 | );
28 | ```
29 |
--------------------------------------------------------------------------------
/components/input-number/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 数字输入框
4 | type: 数据录入
5 | title: InputNumber
6 | ---
7 |
8 | 通过鼠标或键盘,输入范围内的数值。
9 |
10 | ## 设计规范
11 |
12 | - 默认宽度 100px,边框颜色 #D8DAE2,4px 圆角;
13 | - hover 状态边框颜色 #1D78FF;
14 | - 点击状态边框颜色 #005CE6;
15 | - 前后缀单位背景 #F9F9FA,边框 #D8DAE2,左右边距 16px,字体 12px/#3D446E 居中,默认宽度 208px;
16 |
17 | ## 何时使用
18 |
19 | 当需要获取标准数值时。
20 |
21 | ## API
22 |
23 | |类名 |说明 |使用示例 |
24 | |---------|---------|---------|
25 | |.dt-input-number-disabled | 禁用状态的颜色 | 禁用状态 |
26 |
--------------------------------------------------------------------------------
/components/input/demo/light.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 7
3 | title:
4 | zh-CN: 浅色背景(仅暗黑主题下使用)
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 浅色背景上,显示深色控件
10 |
11 | 仅暗黑主题下使用,默认主题下使用无效
12 |
13 | - 为组件或其父组件添加类名`dt-form-light-bg`
14 |
15 | ```jsx
16 | import { Input } from 'antd';
17 |
18 | ReactDOM.render(
19 |
20 |
21 |
22 |
,
23 | mountNode
24 | );
25 | ```
26 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/CaretDownFilled.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/CaretRightFilled.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/CaretUpFilled.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/MinusCircleFilled.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/SwapRightOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/tag/demo/disabled.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 2
3 | title:
4 | en-US: Disabled
5 | zh-CN: 禁用标签
6 | ---
7 |
8 | ## zh-CN
9 |
10 | - 为 Tag 添加类名 `dt-tag-disabled` ,使得 Tag 呈现禁用样式
11 |
12 | ```jsx
13 | import { Tag } from 'antd';
14 |
15 | const log = (e: React.MouseEvent) => {
16 | console.log(e);
17 | };
18 |
19 | ReactDOM.render(
20 |
21 | Tag 1
22 | 标签内容
23 |
,
24 | mountNode,
25 | );
26 | ```
27 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/CollapseCaretRightFilled.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/drawer/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | type: 反馈
3 | category: Components
4 | subtitle: 抽屉
5 | title: Drawer
6 | ---
7 |
8 | 以 1440 X 900 的 web 设计稿尺寸为例,抽屉式浮窗可以被用户左右拖拽,根据宽度分为三种情况:
9 |
10 | ## 默认宽度
11 |
12 | ### 何时使用
13 |
14 | 用户点击表格对应字段,抽屉式浮窗展开的默认状态
15 |
16 | 浮窗高度从顶部导航底部开始,延伸到页面底部,默认宽度为 1000px
17 |
18 | ## 最大宽度
19 |
20 | ### 何时使用
21 |
22 | 内容展示比较多的时候,或者用户不满足于当前默认宽度
23 |
24 | 浮窗高度从顶部导航底部开始,延伸到页面底部,最大宽度为 1256px
25 |
26 | ## 最小宽度
27 |
28 | ### 何时使用
29 |
30 | 内容展示比较少的时候,或者用户认为默认宽度过于遮挡底部内容
31 |
32 | 浮窗高度从顶部导航底部开始,延伸到页面底部,最小宽度为 720px
33 |
34 |
--------------------------------------------------------------------------------
/theme/static/new-version-info-modal.less:
--------------------------------------------------------------------------------
1 | .new-version-info-modal {
2 | img {
3 | position: absolute;
4 | top: 36px;
5 | left: 34px;
6 | width: 100px;
7 | }
8 | p {
9 | margin-top: 1em;
10 | }
11 | .anticon {
12 | display: none;
13 | }
14 | .ant-confirm-body {
15 | .ant-confirm-title {
16 | font-size: 18px;
17 | }
18 | margin-left: 120px;
19 | .ant-confirm-content {
20 | margin-left: 0;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/components/input/demo/unit-input.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 6
3 | title:
4 | zh-CN: 带单位输入框
5 | en-US: unit input
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 带单位输入框。
11 |
12 | ## en-US
13 |
14 | unit input example.
15 |
16 | ```jsx
17 | import { Input } from 'antd';
18 |
19 | ReactDOM.render(
20 | ,
28 | mountNode
29 | );
30 | ```
31 |
--------------------------------------------------------------------------------
/components/collapse/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 折叠面板
4 | type: 数据展示
5 | title: Collapse
6 | cols: 1
7 | ---
8 |
9 | 用于将复杂的内容区域分组和隐藏,可折叠或展开,默认可以展开多个面板,也可以只展开某几个面板。
10 |
11 | ## 设计规范
12 |
13 | - 单列面板默认高度 40px,一级面板背景色 #FFFFFF,边框颜色 1px/#EBECF0,字体颜色 14px/#3D446E;
14 | - 二级面板距离边缘 40px,背景色 #F9F9FA,边框颜色 1px/#EBECF0,字体颜色 14px/#3D446E;
15 | - 里层内容背景色 #FFFFFF,边框颜色 1px/#EBECF0;
16 | - 边缘线之间重叠;
17 |
18 | ## API
19 |
20 | |类名 |说明 |使用示例 |
21 | |---------|---------|---------|
22 | |.dt-collapse-light-bg | 浅色背景上,显示深色控件 | 浅色背景(仅暗黑主题下使用) |
23 |
--------------------------------------------------------------------------------
/components/step/demo/vertical-small.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 5
3 | title:
4 | zh-CN: 竖直方向的小型步骤条
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 简单的竖直方向的小型步骤条。
10 |
11 | ## en-US
12 |
13 | A simple mini version step bar in the vertical direction.
14 |
15 | ```jsx
16 | import { Steps } from 'antd';
17 |
18 | const { Step } = Steps;
19 |
20 | ReactDOM.render(
21 |
22 |
23 |
24 |
25 | ,
26 | mountNode,
27 | );
28 | ```
29 |
--------------------------------------------------------------------------------
/theme/dt-theme/dark/notification.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-notification-notice-with-icon {
4 | .ant-notification-notice-message {
5 | color: @whiteBF;
6 | }
7 | .ant-notification-notice-description {
8 | color: @white8C;
9 | }
10 | }
11 |
12 | .ant-notification-notice-close {
13 | color: #999;
14 | &:hover {
15 | color: #999;
16 | }
17 | }
18 |
19 | .dt-notification-close-btn {
20 | color: #BFBFBF;
21 | cursor: pointer;
22 | &:hover {
23 | color: #BFBFBF;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/CloseOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/MinusCircleOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/PlusOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/FilterFilled.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/theme/static/style/mixins/compatibility.less:
--------------------------------------------------------------------------------
1 | // Compatibility for browsers.
2 |
3 | // Placeholder text
4 | .placeholder(@color: @input-placeholder-color) {
5 | // Firefox
6 | &::placeholder {
7 | color: @color;
8 | opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
9 | }
10 | // Internet Explorer 10+
11 | &:input-placeholder {
12 | color: @color;
13 | }
14 | // Safari and Chrome
15 | &::-webkit-input-placeholder {
16 | color: @color;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/components/timepicker/demo/shadow.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 2
3 | title:
4 | zh-CN: 灰色背景(仅默认主题下使用)
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 灰色背景中的表单需添加投影,去掉外边框
10 |
11 | 仅默认主题下使用,暗黑主题下使用无效
12 |
13 | - 为组件添加类名`dt-form-shadow-bg`
14 |
15 | ```jsx
16 | import { TimePicker } from '../../index';
17 | import moment from 'dayjs';
18 |
19 | const dateFormat = 'YYYY-MM-DD';
20 | ReactDOM.render(
21 |
22 |
23 |
,
24 | mountNode
25 | );
26 | ```
27 |
--------------------------------------------------------------------------------
/theme/static/style/style/mixins/compatibility.less:
--------------------------------------------------------------------------------
1 | // Compatibility for browsers.
2 |
3 | // Placeholder text
4 | .placeholder(@color: @input-placeholder-color) {
5 | // Firefox
6 | &::placeholder {
7 | color: @color;
8 | opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
9 | }
10 | // Internet Explorer 10+
11 | &:input-placeholder {
12 | color: @color;
13 | }
14 | // Safari and Chrome
15 | &::-webkit-input-placeholder {
16 | color: @color;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/components/card/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 典型卡片
5 | en-US: Basic card
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 包含标题、内容、操作区域。
11 |
12 | - 为组件添加类名`dt-card-shadow`增加典型卡片样式边1px#EAF0FC,投影 0px 2px 30px 0px #EAECF4;
13 |
14 | ```jsx
15 | import { Card } from 'antd';
16 |
17 | ReactDOM.render(
18 | More} style={{ width: 300 }} className="dt-card-shadow" >
19 | Card content
20 | Card content
21 | Card content
22 | ,
23 | mountNode,
24 | );
25 | ```
26 |
27 |
--------------------------------------------------------------------------------
/components/button/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 按钮类型
5 | en-US: Type
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 数栈的按钮分为一级按钮,二级按钮,按钮,文字按钮等。
11 |
12 | ```jsx
13 | import { Button } from 'antd';
14 | import { SearchOutlined } from '@ant-design/icons';
15 |
16 | ReactDOM.render(
17 |
18 |
19 |
20 |
21 | } className="dt-btn-highlight">
22 |
,
23 | mountNode,
24 | );
25 | ```
26 |
--------------------------------------------------------------------------------
/components/checkbox/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本用法
5 | en-US: Basic
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 简单的 checkbox。
11 |
12 | ## en-US
13 |
14 | Basic usage of checkbox.
15 |
16 | ```tsx
17 | import { Checkbox } from 'antd';
18 | import type { CheckboxChangeEvent } from 'antd/es/checkbox';
19 |
20 | const onChange = (e: CheckboxChangeEvent) => {
21 | console.log(`checked = ${e.target.checked}`);
22 | };
23 |
24 | const App: React.FC = () => Checkbox;
25 |
26 | ReactDOM.render(, mountNode);
27 | ```
28 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/DoubleLeftOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/pagination/demo/full.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 2
3 | title:
4 | zh-CN: Full完整型
5 | en-US: full
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 最多显示 5 页内容,当数量多时默认显示前 5 页。
11 |
12 | ## en-US
13 |
14 | The basic example.
15 |
16 | ```jsx
17 | import React from 'react';
18 | import { Pagination } from 'antd';
19 |
20 | ReactDOM.render(
21 |
26 | 共{total}条数据
27 | }
28 | />,
29 | mountNode,
30 | );
31 | ```
32 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/DoubleRightOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/MenuFoldOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/MenuUnfoldOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/button/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | type: 通用
4 | title: Button
5 | subtitle: 按钮
6 | ---
7 |
8 | 按钮用于开始一个即时操作。
9 |
10 | ## 设计规范
11 |
12 | - 按钮圆角半径统一为 4px(常规尺寸)和 2px(小尺寸),文字大小 12px;
13 | - 左右上下居中对齐,左右间距固定 16px(常规尺寸)和 8px(小尺寸);
14 | - 宽度随着文字的长度变化而变化,高度分为 32px(常规尺寸)和 24px(小尺寸)两种;
15 |
16 | ## API
17 |
18 | |类名 |说明 |使用示例 |
19 | |---------|---------|---------|
20 | |.dt-btn-highlight | 图标按钮 | 按钮类型、 不可用状态 |
21 | |.dt-btn-custom-icon | 普通按钮添加图标 | 基本用法 |
22 | |.dt-btn-icon-primary | 仅图标按钮,重要操作 | 仅 Icon 按钮 |
23 | |.dt-btn-icon | 仅图标按钮,次要操作 | 仅 Icon 按钮 |
24 |
--------------------------------------------------------------------------------
/components/pagination/demo/size.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | en-US: Right
5 | zh-CN: 居右
6 | ---
7 |
8 | ## zh-CN
9 |
10 | - 为分页器添加类名 `dt-pagination-right` ,使得分页器居右
11 |
12 |
13 | ```jsx
14 | import React from 'react';
15 | import { Pagination } from 'antd';
16 |
17 | ReactDOM.render(
18 |
24 | 共{total}条数据,每页5条
25 | }
26 | />,
27 | mountNode,
28 | );
29 | ```
30 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/HomeOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/theme/static/style/core/motion.less:
--------------------------------------------------------------------------------
1 | @import "../mixins/motion";
2 | @import "motion/fade";
3 | @import "motion/move";
4 | @import "motion/other";
5 | @import "motion/slide";
6 | @import "motion/swing";
7 | @import "motion/zoom";
8 |
9 | // For common/openAnimation
10 | .ant-motion-collapse-legacy {
11 | overflow: hidden;
12 | &-active {
13 | transition: height 0.15s @ease-in-out, opacity 0.15s @ease-in-out !important;
14 | }
15 | }
16 |
17 | .ant-motion-collapse {
18 | overflow: hidden;
19 | transition: height 0.15s @ease-in-out, opacity 0.15s @ease-in-out !important;
20 | }
21 |
--------------------------------------------------------------------------------
/components/breadcrumb/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本使用
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 点击可进行页面跳转
10 |
11 | ```jsx
12 | import { Breadcrumb } from 'antd';
13 | import { RightOutlined } from '@ant-design/icons'
14 |
15 | ReactDOM.render(
16 | }>
17 |
18 | Home
19 |
20 |
21 | Application Center
22 |
23 | An Application
24 | ,
25 | mountNode,
26 | );
27 | ```
28 |
--------------------------------------------------------------------------------
/components/button/demo/ghost.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 5
3 | title:
4 | zh-CN: 幽灵属性,使按钮背景透明
5 | en-US: ghost
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 置于复杂或较深的背景中,避免按钮突兀地破坏背景的整体性。该场景下可灵活定制样式。`ghost 不与 danger 同时使用`
11 |
12 | ```jsx
13 | import { Button } from 'antd';
14 |
15 | ReactDOM.render(
16 |
17 |
18 |
19 |
20 |
21 |
,
22 | mountNode,
23 | );
24 | ```
25 |
--------------------------------------------------------------------------------
/theme/static/style/style/core/motion.less:
--------------------------------------------------------------------------------
1 | @import "../mixins/motion";
2 | @import "motion/fade";
3 | @import "motion/move";
4 | @import "motion/other";
5 | @import "motion/slide";
6 | @import "motion/swing";
7 | @import "motion/zoom";
8 |
9 | // For common/openAnimation
10 | .ant-motion-collapse-legacy {
11 | overflow: hidden;
12 | &-active {
13 | transition: height 0.15s @ease-in-out, opacity 0.15s @ease-in-out !important;
14 | }
15 | }
16 |
17 | .ant-motion-collapse {
18 | overflow: hidden;
19 | transition: height 0.15s @ease-in-out, opacity 0.15s @ease-in-out !important;
20 | }
21 |
--------------------------------------------------------------------------------
/components/card/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | type: 数据展示
4 | title: Card
5 | subtitle: 卡片
6 | cols: 1
7 | cover: https://gw.alipayobjects.com/zos/antfincdn/NqXt8DJhky/Card.svg
8 | ---
9 |
10 | 通用卡片容器。
11 |
12 | ## 何时使用
13 |
14 | 卡片的数据展示率较低,所以适用于列表内容简洁,没有太多复杂信息,可方便用户快速预览;
15 |
16 | ## 设计规范
17 |
18 | - 卡片式列表的标题字体 16px #3D446E 居左 Medium,副标题文本字体 12px #8B8FA8 居左 Regular;
19 | - 卡片背景填充 #FFFFFF,边 1px#EBECF0,圆角 4px;
20 | - 典型卡片边 1px/#EAF0FC,投影 0px 2px 30px 0px #EAECF4;
21 |
22 | ## API
23 |
24 | |类名 |说明 |使用示例 |
25 | |---------|---------|---------|
26 | |.dt-card-shadow | 设置典型卡片的边框和投影 | 典型卡片 |
27 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/BarsOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.stylelintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | extends: [require.resolve('ko-lint-config/.stylelintrc')],
3 | overrides: [
4 | {
5 | files: ['**/*.less'],
6 | customSyntax: 'postcss-less',
7 | },
8 | ],
9 | rules: {
10 | 'at-rule-name-case': null, // less 中变量名的大小写
11 | 'selector-no-vendor-prefix': null, // 兼容写法
12 | 'property-no-vendor-prefix': null, // 兼容写法
13 | 'selector-pseudo-class-no-unknown': null, // 兼容写法
14 | 'selector-type-no-unknown': null, // 兼容写法
15 | 'number-max-precision': 10, // 数字中允许的小数位数
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/components/tab/demo/disabled.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 禁用
5 | en-US: Disabled
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 禁用某一项。
11 |
12 | ## en-US
13 |
14 | Disabled a tab.
15 |
16 | ```jsx
17 | import { Tabs } from 'antd';
18 |
19 | const { TabPane } = Tabs;
20 |
21 | ReactDOM.render(
22 |
23 |
24 | Tab 1
25 |
26 |
27 | Tab 2
28 |
29 |
30 | Tab 3
31 |
32 | ,
33 | mountNode,
34 | );
35 | ```
36 |
--------------------------------------------------------------------------------
/components/notification/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 通知提醒框
4 | type: 反馈
5 | title: Notification
6 | ---
7 |
8 | 通用于向用户反馈重要的警告提示和通知消息。常出现在页面的右上角
9 |
10 | ## 设计规范
11 |
12 | - 弹窗标题字体 14px/#3D446E/居左 Medium,副文本内容 12/#8B8FA8/居左/Regular;
13 | - 提醒框在内容的基础上留有适当的边距,建议左右边距为 16px,上下边距 16px;
14 | - 背景#FFFFFF,投影#3D446E 20%,Y5px,模糊度 22;
15 | - 注意: 通知弹窗的宽度 360px。默认 4.5 秒后自动关闭
16 |
17 | ## 何时使用
18 |
19 | - 较为复杂的通知内容。
20 | - 带有交互的通知,给出用户下一步的行动点。
21 | - 系统主动推送。
22 |
23 | ## API
24 |
25 | |类名 |说明 |使用示例 |
26 | |---------|---------|---------|
27 | |.dt-notification-close-btn | 通知提醒框中全部关闭按钮样式 | 全部关闭 |
28 |
--------------------------------------------------------------------------------
/components/steps/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | cols: 1
4 | type: 导航
5 | title: Steps
6 | subtitle: 标准导航步骤页
7 | ---
8 |
9 | 结合通用卡片容器协助进行页面标准化导航步骤页
10 |
11 | ## 设计规范
12 |
13 | 标准导航步骤页分为步骤条头部、内容区域、尾部操作栏。其中:
14 |
15 | - 步骤条头部未处理流程底颜色为 `#EEEEEE`
16 | - 正在处理流程底颜色为 `#3F87FF`
17 | - 已处理流程底颜色为 `#FFFFFF`
18 | - 内容区域和尾部操作栏底颜色 `#FAFAFA`
19 | - 尾部操作栏高度为 56 px。
20 |
21 | ## API
22 |
23 | |类名 |说明 |使用示例
24 | |---------|---------|
25 | |.dt-steps-header | UI5.0 步骤页样式 | 基本用法 |
26 | |.dt-steps-card-container | 步骤页卡片容器主要内容模块样式 | 基本用法 |
27 | |.dt-card-shadow-bg | 步骤卡片容器设置阴影 | 基本用法 |
28 |
--------------------------------------------------------------------------------
/components/transfer/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 穿梭框
4 | type: 数据录入
5 | title: Transfer
6 | cols: 1
7 | ---
8 |
9 | 左右两侧布局的多选组件,分为候选区和已选区,用户可以以直观的方式将数据从一侧即时移到另一侧,完成选择或移除数据的交互行为。
10 |
11 | ## 使用场景
12 | - 需要更清晰的展示选择内容时:穿梭框用直观的方式展示出了更多的选项信息,方便用户实时了解选择的内容,增加用户的确定感
13 | - 正式的任务场景中:相对于下拉框选择等形式,穿梭框更加庄重,能够减少因信息隐藏造成的错误,适合用于审批、流程等正式的任务场景中
14 | - 页面位置有限时:比起选择器和树选择,穿梭框所占的页面空间更大,当页面位置有限时,不建议使用
15 | - 需要频繁的选择时:穿梭框的交互形式更为复杂,当需要用户做出频繁选择时,不建议使用
16 |
17 | ## API
18 |
19 | |类名 |说明 |使用示例 |
20 | |---------|---------|---------|
21 | | .dt-transfer-without-header-count | 隐藏 header 中的下拉操作及数量,调整 title 位置 | -
22 |
23 |
--------------------------------------------------------------------------------
/theme/dt-theme/default/breadcrumb.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-breadcrumb {
4 | color: @black_pageMsg;
5 | font-weight: 400;
6 | font-size: 12px;
7 | line-height: 20px;
8 | a {
9 | height: 20px;
10 | line-height: 20px;
11 | color: @black_pageMsg;
12 | &:hover {
13 | color: @primaryColor;
14 | }
15 | &:active {
16 | color: @clickColor;
17 | }
18 | }
19 | }
20 |
21 | .ant-breadcrumb-separator {
22 | color: @black_msg;
23 | margin: 0 4px;
24 | .anticon {
25 | font-size: 12px;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/components/button/demo/disabled.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 3
3 | title:
4 | zh-CN: 不可用状态
5 | en-US: Disabled
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 添加 `disabled` 属性即可让按钮处于不可用状态,同时按钮样式也会改变。
11 |
12 | ```jsx
13 | import { Button } from 'antd';
14 | import { SearchOutlined } from '@ant-design/icons';
15 |
16 | ReactDOM.render(
17 |
18 |
19 |
20 |
21 | } disabled className="dt-btn-highlight">
22 |
,
23 | mountNode,
24 | );
25 | ```
26 |
--------------------------------------------------------------------------------
/components/tag/demo/icon.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 4
3 | title:
4 | en-US: Icon Usage
5 | zh-CN: 带背景图标
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 背景标签,图标只做示例
11 |
12 | 为组件添加类名`dt-ant-tag-icon`
13 |
14 |
15 | ```jsx
16 | import { Tag } from 'antd';
17 | import {
18 | TwitterOutlined
19 | } from '@ant-design/icons';
20 |
21 |
22 | ReactDOM.render(
23 |
24 | } color="geekblue" className="dt-ant-tag-icon">
25 | Twitter
26 |
27 | } color="orange" className="dt-ant-tag-icon">
28 | Twitter
29 |
30 |
,
31 | mountNode,
32 | );
33 | ```
34 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/PlusCircleOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/datepicker/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 日期选择框
4 | type: 数据录入
5 | title: DatePicker
6 | ---
7 |
8 | 输入或选择日期的控件。
9 |
10 | ## 设计规范
11 |
12 | - 日期选择框常规高度为 32px,小尺寸的高度为 24px,边框颜色 #D8DAE2,填充色 #FFFFFF,4px 圆角,提示字 12px,颜色 #B1B4C5,输入颜色 #3D446E;
13 | - hover状态边框颜色 #1D78FF;
14 | - 点击状态边框颜色 #005CE6,下划线 #005CE6,2px;
15 | - 禁用状态底色 #EBECF0,文字 #B1B4C5;
16 |
17 | ## API
18 |
19 | |类名 |说明 |使用示例 |
20 | |---------|---------|---------|
21 | |.dt-ant-datepicker-basic | datePicker样式设置 | 默认样式 |
22 | |.dt-form-shadow-bg | 灰色背景,表单样式设置 | 灰色背景(仅默认主题下使用) |
23 | |.dt-form-light-bg | 浅色背景上,显示深色控件 | 浅色背景(仅暗黑主题下使用) |
24 |
--------------------------------------------------------------------------------
/components/pagination/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基础分页
5 | en-US: Basic
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 最多显示 5 页内容,当数量多时默认显示前 5 页。
11 |
12 | - 为分页器总条数添加类名 `dt-pagination-totalCount`,高亮显示
13 |
14 | ## en-US
15 |
16 | The basic example.
17 |
18 | ```jsx
19 | import React from 'react';
20 | import { Pagination } from 'antd';
21 |
22 | ReactDOM.render(
23 |
25 | 共{total}条数据,每页5条
26 | }
27 | defaultCurrent={1}
28 | pageSize={5}
29 | total={40} />,
30 | mountNode,
31 | );
32 | ```
33 |
--------------------------------------------------------------------------------
/components/timepicker/demo/light.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 4
3 | title:
4 | zh-CN: 浅色背景(仅暗黑主题下使用)
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 浅色背景上,显示深色控件
10 |
11 | 仅暗黑主题下使用,默认主题下使用无效
12 |
13 | - 为组件添加类名`dt-form-light-bg`
14 | - 设置组件属性 `dropdownClassName` 为 `dt-form-light-bg`
15 |
16 | ```jsx
17 | import { TimePicker } from '../../index';
18 | import moment from 'dayjs';
19 |
20 | const dateFormat = 'YYYY-MM-DD';
21 | ReactDOM.render(
22 |
23 |
24 |
,
25 | mountNode
26 | );
27 | ```
28 |
--------------------------------------------------------------------------------
/components/modal/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 对话框
4 | type: 反馈
5 | title: Modal
6 | ---
7 |
8 | 以 1440 X 900 的 web 设计稿尺寸为例。常规弹窗根据场景可分为功能弹窗和信息确认弹窗。
9 |
10 |
11 | ## 设计规范
12 |
13 |
14 | ### 功能弹窗
15 |
16 | - 功能弹窗分三种尺寸:小尺寸400px,中等尺寸640px,最大尺寸900px。
17 | - 由标题、内容和下面的操作部分组成:弹窗标题左对齐与弹窗。
18 | - 弹窗内容横向居中;操作按钮主按钮居右,次级按钮居左。
19 | - 整个弹窗高度随着内容区域变化而变化,弹窗高度最高不超过600px,即最大的弹窗尺寸是900px X 600px。
20 | - 溢出内容的展示 :若正文内容超过对话框的最大高度,内容部分可相应垂直滚动,滚动时标题和下面的操作部分保持固定。对话框内容不可以支持横向滚动。
21 |
22 | ### 信息确认弹窗
23 |
24 | 用于删除操作的二次确认,防止数据丢失不可逆
25 |
26 | - 一级标题➡️字号:14px 字重:Medium 颜色:#3D446E 行高:22px
27 | - 二级标题➡️字号:12px 字重:Regular 颜色:#8B8FA8 行高:20px
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/EditOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/ReloadOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/select/demo/size.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 3
3 | title:
4 | zh-CN: 两种大小
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 我们为下拉框定义了两种尺寸(默认、小),高度分别为 32px 和 24px。
10 |
11 | ```jsx
12 | import { Select } from 'antd';
13 |
14 | const { Option } = Select;
15 |
16 | ReactDOM.render(
17 |
18 |
21 |
24 |
,
25 | mountNode,
26 | );
27 | ```
28 |
--------------------------------------------------------------------------------
/theme/static/index.less:
--------------------------------------------------------------------------------
1 | @import "./style/v2-compatible-reset.less";
2 | @import "./style/themes/default.less";
3 | @import "./common";
4 | @import "./header";
5 | @import "./footer";
6 | @import "./home";
7 | @import "./page-nav";
8 | @import "./markdown";
9 | @import "./resource";
10 | @import "./preview-img";
11 | @import "./toc";
12 | @import "./not-found";
13 | @import "./highlight";
14 | @import "./demo";
15 | @import "./colors";
16 | @import "./icons";
17 | @import "./mock-browser";
18 | @import "./new-version-info-modal";
19 | @import "./motion";
20 | @import "./responsive";
21 | @import "./theme";
22 | @import "./docsearch";
23 | @import "./nprogress";
24 | @import "./santa";
25 |
--------------------------------------------------------------------------------
/components/radio/demo/shadow.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 灰色背景(仅默认主题下使用)
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 灰色背景中的表单需添加投影,去掉外边框
10 |
11 | 仅默认主题下使用,暗黑主题下使用无效
12 |
13 | - 为组件添加类名`dt-radio-group`
14 |
15 | ```jsx
16 | import { Radio } from 'antd';
17 |
18 | ReactDOM.render(
19 |
20 |
21 | 杭州
22 | Shanghai
23 | Beijing
24 | Chengdu
25 |
26 |
,
27 | mountNode
28 | );
29 | ```
30 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/ClockCircleOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/select/demo/shadow.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 2
3 | title:
4 | zh-CN: 灰色背景(仅默认主题下使用)
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 灰色背景中的表单需添加投影,去掉外边框
10 |
11 | 仅默认主题下使用,暗黑主题下使用无效
12 |
13 | - 为组件添加类名`dt-form-shadow-bg`
14 |
15 | ```jsx
16 | import { Select } from 'antd';
17 |
18 | const { Option } = Select;
19 |
20 | ReactDOM.render(
21 |
22 |
27 |
,
28 | mountNode
29 | );
30 | ```
31 |
--------------------------------------------------------------------------------
/components/tag/demo/controlled.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | en-US: Controlled Usage
5 | zh-CN: 可操作标签
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 标签中可以操作对其进行删除。可以通过添加 closable 变为可关闭标签。可关闭标签具有 onClose 事件。
11 |
12 | ```jsx
13 | import { Tag } from 'antd';
14 |
15 | const log = (e: React.MouseEvent) => {
16 | console.log(e);
17 | };
18 |
19 | const preventDefault = (e: React.MouseEvent) => {
20 | e.preventDefault();
21 | console.log('Clicked! But prevent default.');
22 | };
23 |
24 | ReactDOM.render(
25 |
26 | Tag 1
27 |
28 | 标签内容
29 |
30 |
,
31 | mountNode,
32 | );
33 | ```
34 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/CheckCircleOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/tooltip/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 文字提示
4 | type: 数据展示
5 | title: Tooltip
6 | cover: https://gw.alipayobjects.com/zos/alicdn/Vyyeu8jq2/Tooltp.svg
7 | ---
8 |
9 | 鼠标悬停、聚焦或点击在某个组件时,弹出的文字提示。
10 |
11 | ## 设计规范
12 |
13 | - 字体大小 12px,字体颜色 #FFFFFF;
14 | - 提示框在内容的基础上留有适当的边距,建议左右边距为 8px,单行高度默认为 32px,上下边距 6px;
15 | - 底色 #000000,75%;
16 | - 同一业务内建议采用统一的尺寸;
17 |
18 | ## 何时使用
19 |
20 | - 展示简短的帮助性信息:当用户不理解一个 UI 元素,或想要获得更多信息时,文字提示能展示相关联的更多帮助性信息
21 | - 增强交互的确定感:当用户与界面进行交互时,文字提示能够帮助用户增强对所交互元素效果的确定感(如按钮的操作提示);
22 | - 页面位置有限时:当页面位置有限时,一些 UI 元素需要以简化的形式出现(如单独的图标),或者文字省略,使用文字提示能够更好的帮助用户理解信息。
23 |
24 | 注意:
25 | - 不要将完成任务所需的重要信息放在文字气泡内,重要的信息不应隐藏,应当始终直接展示在页面中;
26 | - 文字气泡不应承载可交互的操作信息。当需要展示操作时,可考虑使用气泡卡片。
27 |
--------------------------------------------------------------------------------
/theme/dt-theme/dark/collapse.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-collapse {
4 | .ant-collapse-item {
5 | .ant-collapse-header {
6 | background-color: #242738;
7 | }
8 | .ant-collapse-content {
9 | background-color: @blue1;
10 | border-top: 1px solid #2F334D;
11 | }
12 | }
13 | }
14 |
15 | .dt-collapse-light-bg {
16 | .ant-collapse, &.ant-collapse .ant-collapse-item, &.ant-collapse-item {
17 | .ant-collapse-header {
18 | background-color: #2F334D;
19 | }
20 | .ant-collapse-content {
21 | background-color: @blue2;
22 | border-top: 1px solid #2F334D;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/components/step/demo/icon.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 2
3 | title:
4 | zh-CN: 带图标的步骤条
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 通过设置 `Steps.Step` 的 `icon` 属性,可以启用自定义图标。
10 |
11 | ```jsx
12 | import { Steps } from 'antd';
13 | import { UserOutlined, SolutionOutlined, LoadingOutlined, SmileOutlined } from '@ant-design/icons';
14 |
15 | const { Step } = Steps;
16 |
17 | ReactDOM.render(
18 |
19 | } />
20 | } />
21 | } />
22 | } />
23 | ,
24 | mountNode,
25 | );
26 | ```
27 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/ExclamationCircleOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/input/demo/presuffix.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 8
3 | title:
4 | zh-CN: 前缀和后缀
5 | en-US: prefix and suffix
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 在输入框上添加前缀或后缀图标。
11 |
12 | ## en-US
13 |
14 | Add a prefix or suffix icons inside input.
15 |
16 | ```tsx
17 | import { InfoCircleOutlined, UserOutlined } from '@ant-design/icons';
18 | import { Input, Tooltip } from 'antd';
19 | import React from 'react';
20 |
21 | const App: React.FC = () => (
22 | <>
23 |
27 |
28 |
29 | }
30 | />
31 | >
32 | );
33 |
34 | ReactDOM.render(
35 | ,
36 | mountNode,
37 | );
38 | ```
39 |
--------------------------------------------------------------------------------
/components/step/demo/customized-progress-dot.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 8
3 | title:
4 | zh-CN: 自定义点状步骤条
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 为点状步骤条增加自定义展示。
10 |
11 | ```jsx
12 | import { Steps, Popover } from 'antd';
13 |
14 | const { Step } = Steps;
15 |
16 | const customDot = (dot, { status, index }) => (
17 |
20 | step {index} status: {status}
21 |
22 | }
23 | >
24 | {dot}
25 |
26 | );
27 |
28 | ReactDOM.render(
29 |
30 |
31 |
32 |
33 |
34 | ,
35 | mountNode,
36 | );
37 | ```
38 |
--------------------------------------------------------------------------------
/components/breadcrumb/demo/tooltip.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 文本标签截断
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 使用省略号截断内容 ,鼠标 hover 后使用 tooltip 展示全部内容。
10 |
11 | ```jsx
12 | import { Breadcrumb, Tooltip } from 'antd';
13 | import { RightOutlined } from '@ant-design/icons'
14 |
15 | ReactDOM.render(
16 | }>
17 |
18 | Home
19 |
20 |
21 |
22 | Application Center...
23 |
24 |
25 | An Application
26 | ,
27 | mountNode,
28 | );
29 | ```
30 |
--------------------------------------------------------------------------------
/components/popconfirm/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本
5 | en-US: Basic
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 最简单的用法。
11 |
12 | ## en-US
13 |
14 | The basic example.
15 |
16 | ```jsx
17 | import { Popconfirm, message } from 'antd';
18 |
19 | function confirm(e) {
20 | console.log(e);
21 | message.success('Click on Yes');
22 | }
23 |
24 | function cancel(e) {
25 | console.log(e);
26 | message.error('Click on No');
27 | }1
28 |
29 | ReactDOM.render(
30 |
37 | Delete
38 | ,
39 | mountNode,
40 | );
41 | ```
42 |
--------------------------------------------------------------------------------
/components/alert/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本使用
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 最简单的用法,适用于简短的警告提示。
10 |
11 | 共有四种样式 success、warning、error、info。
12 |
13 | 可关闭。
14 |
15 | ```jsx
16 | import { Alert } from 'antd';
17 |
18 | ReactDOM.render(
19 |
20 |
21 |
Waring Text!} type="warning" action={前去处理} closable />
22 |
23 |
24 | ,
25 | mountNode,
26 | );
27 | ```
28 |
--------------------------------------------------------------------------------
/theme/dt-theme/default/drawer.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-drawer-content-wrapper {
4 | // min-width: 720px;
5 | max-width: 1256px;
6 | .ant-drawer-body {
7 | padding: 16px;
8 | }
9 | }
10 |
11 | .ant-drawer-header {
12 | padding: 16px;
13 | background-color: @black_navBg;
14 | border-bottom: 0;
15 | .ant-drawer-header-title {
16 | flex-direction: row-reverse;
17 | .ant-drawer-close {
18 | margin-right: 0;
19 | line-height: 20px;
20 | width: 20px;
21 | height: 20px;
22 | }
23 | }
24 | }
25 |
26 | .ant-drawer-right.ant-drawer-open .ant-drawer-content-wrapper {
27 | box-shadow: 0 5px 22px 0 rgba(61, 68, 110, 0.2);
28 | }
29 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/UserOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/theme/template/NotFound.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Link } from 'bisheng/router';
3 | import config from '../../bisheng.config';
4 |
5 | export default function NotFound({ location: _location }) {
6 | return (
7 |
8 |
9 | 404
10 |
11 | 啊哦~,您要找的页面不存在。
12 | 返回首页
13 |
14 |
15 |
20 |
21 | );
22 | }
23 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/SearchOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/WarningFilled.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/components/tab/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 标签页
4 | type: 导航
5 | title: Tabs
6 | cols: 1
7 | cover: https://gw.alipayobjects.com/zos/antfincdn/lkI2hNEDr2V/Tabs.svg
8 | ---
9 |
10 | 引领整个页面的内容,用于主功能切换.
11 |
12 |
13 | ## 何时使用
14 |
15 | 提供平级的区域将大块内容进行收纳和展现,保持界面整洁。
16 |
17 | ## 设计规范
18 |
19 | - 每个标签文字最多 6 个字,标签数量最多 7 个,建议出现 4 个以内。
20 |
21 | ## API
22 |
23 | |类名 |说明 |使用示例 |
24 | |---------|---------|---------|
25 | |.dt-tabs-sider-menu | 侧边栏菜单类名,需配合type="line"和tabPosition="right"或者"left"一起使用 | 侧边菜单 |
26 | |.dt-tabs-content-padding | 内容内边距类名,16px | 侧边菜单 |
27 | |.dt-tabs-nav-padding-16 | 增加左右边距16px | 基础样式 |
28 | |.dt-tabs-nav-no-margin | 减少上边距/左边距16px,整体宽度增加32px | 消除间隙 |
29 | |.dt-tabs-hidden-more-icon | 更多标签时,隐藏 ··· 的更多 icon | 侧边菜单 |
30 |
--------------------------------------------------------------------------------
/components/button/demo/loading.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 7
3 | title:
4 | zh-CN: 加载按钮
5 | en-US: Loading Button
6 | ---
7 |
8 | ## zh-CN
9 |
10 | primary 按钮在 loading 时,背景色为 #BBD6FF。
11 |
12 | ```jsx
13 | import { Button } from 'antd';
14 | import { ReloadOutlined } from '@ant-design/icons';
15 |
16 | ReactDOM.render(
17 |
18 |
19 |
20 |
21 |
22 | } loading type="primary">
23 | } loading type="primary" size="small">
24 |
25 |
26 |
,
27 | mountNode,
28 | );
29 | ```
30 |
--------------------------------------------------------------------------------
/theme/static/style/v2-compatible-reset.less:
--------------------------------------------------------------------------------
1 | // For 2.x reset compatibility
2 | // import 'antd/style/v2-compatible-reset';
3 | // or
4 | // @import '~antd/style/v2-compatible-reset.css';
5 | // unify the setting of elements's margin and padding for browsers
6 | body,
7 | div,
8 | dl,
9 | dt,
10 | dd,
11 | ul,
12 | ol,
13 | li,
14 | h1,
15 | h2,
16 | h3,
17 | h4,
18 | h5,
19 | h6,
20 | pre,
21 | code,
22 | form,
23 | fieldset,
24 | legend,
25 | input,
26 | textarea,
27 | p,
28 | blockquote,
29 | th,
30 | td,
31 | hr,
32 | button,
33 | article,
34 | aside,
35 | details,
36 | figcaption,
37 | figure,
38 | footer,
39 | header,
40 | hgroup,
41 | menu,
42 | nav,
43 | section {
44 | margin: 0;
45 | padding: 0;
46 | }
47 |
48 | ul,
49 | ol {
50 | list-style: none;
51 | }
52 |
--------------------------------------------------------------------------------
/theme/template/Content/PrevAndNext.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import utils from '../../utils';
3 |
4 | export default ({ prev, next }) => {
5 | const isDark = Boolean(utils.getCookie('theme') === 'dark');
6 |
7 | return (
8 |
9 | {prev
10 | ? React.cloneElement(prev.props.children || prev.children[0], {
11 | className: 'prev-page',
12 | })
13 | : null}
14 | {next
15 | ? React.cloneElement(next.props.children || next.children[0], {
16 | className: 'next-page',
17 | })
18 | : null}
19 |
20 | );
21 | };
22 |
--------------------------------------------------------------------------------
/theme/utils/index.js:
--------------------------------------------------------------------------------
1 | const utils = {
2 | /**
3 | * 原生 JavaScript 获取 cookie 值
4 | * @param name
5 | */
6 | getCookie(name) {
7 | const arr = document.cookie.match(new RegExp('(^| )' + name + '=([^;]*)(;|$)'));
8 | if (arr != null) {
9 | return unescape(decodeURI(arr[2]));
10 | }
11 | return null;
12 | },
13 |
14 | setCookie(name, value, days) {
15 | let expires = '';
16 | if (days) {
17 | const date = new Date();
18 | date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
19 | expires = '; expires=' + date.toUTCString();
20 | }
21 | document.cookie = name + '=' + value + expires + '; path=/';
22 | },
23 | };
24 |
25 | export default utils;
26 |
--------------------------------------------------------------------------------
/theme/static/style/style/v2-compatible-reset.less:
--------------------------------------------------------------------------------
1 | // For 2.x reset compatibility
2 | // import 'antd/style/v2-compatible-reset';
3 | // or
4 | // @import '~antd/style/v2-compatible-reset.css';
5 | // unify the setting of elements's margin and padding for browsers
6 | body,
7 | div,
8 | dl,
9 | dt,
10 | dd,
11 | ul,
12 | ol,
13 | li,
14 | h1,
15 | h2,
16 | h3,
17 | h4,
18 | h5,
19 | h6,
20 | pre,
21 | code,
22 | form,
23 | fieldset,
24 | legend,
25 | input,
26 | textarea,
27 | p,
28 | blockquote,
29 | th,
30 | td,
31 | hr,
32 | button,
33 | article,
34 | aside,
35 | details,
36 | figcaption,
37 | figure,
38 | footer,
39 | header,
40 | hgroup,
41 | menu,
42 | nav,
43 | section {
44 | margin: 0;
45 | padding: 0;
46 | }
47 |
48 | ul,
49 | ol {
50 | list-style: none;
51 | }
52 |
--------------------------------------------------------------------------------
/components/tab/demo/card.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 5
3 | title:
4 | zh-CN: 卡片式页签
5 | en-US: Card type tab
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 另一种样式的页签,不提供对应的垂直样式。
11 |
12 | ## en-US
13 |
14 | Another type of Tabs, which doesn't support vertical mode.
15 |
16 | ```jsx
17 | import { Tabs } from 'antd';
18 |
19 | const { TabPane } = Tabs;
20 |
21 | function callback(key) {
22 | console.log(key);
23 | }
24 |
25 | ReactDOM.render(
26 |
27 |
28 | Content of Tab Pane 1
29 |
30 |
31 | Content of Tab Pane 2
32 |
33 |
34 | Content of Tab Pane 3
35 |
36 | ,
37 | mountNode,
38 | );
39 | ```
40 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/LayoutOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/button/demo/onlyIcon.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 6
3 | title:
4 | zh-CN: 仅 Icon 按钮
5 | en-US: Only Icon Button
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 重要操作时添加 `dt-btn-icon-primary` 类名展示蓝色 icon;
11 |
12 | 次要操作时添加 `dt-btn-icon` 类名展示灰色 icon;
13 |
14 | ```jsx
15 | import { Button } from 'antd';
16 | import { ReloadOutlined } from '@ant-design/icons';
17 |
18 | ReactDOM.render(
19 |
20 | } className="dt-btn-icon-primary">
21 | } disabled className="dt-btn-icon-primary">
22 | } className="dt-btn-icon">
23 | } disabled className="dt-btn-icon">
24 |
,
25 | mountNode,
26 | );
27 | ```
28 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/PlusCircleFilled.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/CheckCircleFilled.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/components/step/demo/progress-dot.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 7
3 | title:
4 | zh-CN: 点状步骤条
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 包含步骤点的进度条。
10 |
11 | ## en-US
12 |
13 | Steps with progress dot style.
14 |
15 | ```jsx
16 | import { Steps, Divider } from 'antd';
17 |
18 | const { Step } = Steps;
19 |
20 | ReactDOM.render(
21 | <>
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | >,
36 | mountNode,
37 | );
38 | ```
39 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/ZoomOutOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/scripts/publish.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | registry="http://registry.npm.dtstack.com/"
3 | is_add=true
4 | package=""
5 |
6 | while [[ $# > 0 ]];
7 | do
8 | case $1 in
9 | -d|--delete)
10 | package=$2;
11 | is_add="";
12 | shift;;
13 | *)
14 | echo "Unknown parameter passed: $1";
15 | exit 1;;
16 | esac;
17 | shift;
18 | done
19 |
20 | npm set registry $registry
21 |
22 | if [ -z $is_add ] && [ -z $package ];
23 | then
24 | echo "Please enter the correct version. Eg: 1.0.0"
25 |
26 | elif [ -z $is_add ] && [ $package ];
27 | then
28 | version="ant-design-dtinsight-theme@$package"
29 | npm unpublish $version --registry $registry
30 | echo "Unpublish over."
31 |
32 | else [ is_add ];
33 | npm publish --registry $registry
34 | echo "Publish over."
35 | fi
--------------------------------------------------------------------------------
/components/notification/demo/closeAll.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 全部关闭
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 有关闭全部按钮
10 |
11 | - 为全部关闭按钮添加样式 `dt-notification-close-btn`
12 |
13 | ```jsx
14 | import { Button, notification } from 'antd';
15 |
16 | const openNotificationWithIcon = type => {
17 | notification[type]({
18 | message:
19 | 提示信息
20 | 全部关闭
21 | ,
22 | description:
23 | 'This is the content of the notification. This is the content of the notification. This is the content of the notification.',
24 | });
25 | };
26 |
27 | ReactDOM.render(
28 |
29 |
30 |
,
31 | mountNode,
32 | );
33 | ```
34 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/ExclamationCircleFilled.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/theme/static/not-found.less:
--------------------------------------------------------------------------------
1 | #page-404 {
2 | position: fixed;
3 | top: 0;
4 | right: 0;
5 | bottom: 0;
6 | left: 0;
7 | z-index: 100;
8 | width: 100%;
9 | height: 100%;
10 | background-image: url("https://os.alipayobjects.com/rmsportal/NOAjOBbnYCrNzrW.jpg");
11 | background-repeat: no-repeat;
12 | background-position: center;
13 | background-size: 100%;
14 | background-attachment: fixed;
15 | section {
16 | position: absolute;
17 | top: 48%;
18 | left: 55%;
19 | margin: -103px 0 0 -120px;
20 | text-align: center;
21 | }
22 | h1 {
23 | color: @primary-color;
24 | font-weight: 500;
25 | font-size: 120px;
26 | }
27 | p {
28 | color: @site-text-color;
29 | font-size: 18px;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/theme/dt-theme/dark/upload.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-upload-drag {
4 | background: #1D1F2E;
5 | border: 1px solid #2C3047;
6 | &:hover {
7 | border-color: @primaryColor;
8 | }
9 | }
10 |
11 | .ant-upload.ant-upload-select-picture-card {
12 | background-color: transparent;
13 | .ant-upload > .dt-upload-button {
14 | font-size: 14px;
15 | .anticon {
16 | font-size: 20px;
17 | }
18 | }
19 | &:hover {
20 | border-color: @primaryColor;
21 | .ant-upload > div {
22 | color: @primaryColor;
23 | }
24 | }
25 | }
26 |
27 | .ant-upload-list-picture-card .ant-upload-list-item-error {
28 | border-color: @red;
29 | }
30 |
31 | .ant-upload-list-item-card-actions {
32 | .ant-btn:hover {
33 | border: none;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/MessageOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/MinusSquareOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/icon/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | cols: 1
4 | type: 通用
5 | title: Icon
6 | subtitle: 图标
7 | ---
8 |
9 | 使用 antd 的图标时,部分 antd 图标不符合数栈的图标规范,所以在 theme 里进行统一处理。
10 |
11 | ## 设计规范
12 |
13 | - 数栈的图标有一定圆角,比如观察 antd 对比替换图标的 `CloseCircleFilled` 和 `StarOutlined`。
14 |
15 | ## 何时使用
16 |
17 | - 使用设计提供的图标替换 antd 的图标,子产品不需要主动做什么,theme 作了统一处理;
18 | - 大部分实底图标需要添加 theme 的自定义 className 配合使用,具体请查看下方 `自定义类名`。
19 |
20 | ## 自定义类名
21 |
22 | |实底图标名 |自定义类名 |
23 | |---------|---------|
24 | |CheckCircleFilled |`dt-anticon-check-circle-fill` |
25 | |ExclamationCircleFilled |`dt-anticon-exclamation-circle-fill` |
26 | |StarFilled |`dt-anticon-star-fill` |
27 | |MinusCircleFilled |`dt-anticon-minus-circle-fill` |
28 | |PlusCircleFilled |`dt-anticon-plus-circle-fill` |
29 | |QuestionCircleFilled |`dt-anticon-question-circle-fill` |
30 |
--------------------------------------------------------------------------------
/components/tab/demo/icon.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 2
3 | title:
4 | zh-CN: 图标
5 | en-US: Icon
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 有图标的标签。
11 |
12 | ## en-US
13 |
14 | The Tab with Icon.
15 |
16 | ```jsx
17 | import { Tabs } from 'antd';
18 | import { AppleOutlined, AndroidOutlined } from '@ant-design/icons';
19 |
20 | const { TabPane } = Tabs;
21 |
22 | ReactDOM.render(
23 |
24 |
27 |
28 | Tab 1
29 |
30 | }
31 | key="1"
32 | >
33 | Tab 1
34 |
35 |
38 |
39 | Tab 2
40 |
41 | }
42 | key="2"
43 | >
44 | Tab 2
45 |
46 | ,
47 | mountNode,
48 | );
49 | ```
50 |
--------------------------------------------------------------------------------
/components/list/demo/card.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 2
3 | title:
4 | zh-CN: 卡片式列表
5 | en-US: Card list
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 强化主次,信息分级,卡片作为一个独立的容器,可以在内容上进行良好的布局组织,将信息分块,突出重点,从视觉感知上就对内容进行了分隔,分明的层级能够引导用户的浏览视线,有秩序地阅读与点击。
11 |
12 | ## en-US
13 |
14 | Basic list.
15 |
16 | ```jsx
17 | import { List, Card } from 'antd';
18 |
19 | const data = [
20 | {
21 | title: 'Ant Design Title 1',
22 | },
23 | {
24 | title: 'Ant Design Title 2',
25 | },
26 | {
27 | title: 'Ant Design Title 3',
28 | },
29 | {
30 | title: 'Ant Design Title 4',
31 | },
32 | ];
33 |
34 | ReactDOM.render(
35 | (
39 |
40 | Card content
41 |
42 | )}
43 | />,
44 | mountNode,
45 | );
46 | ```
47 |
--------------------------------------------------------------------------------
/components/select/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 选择器
4 | type: 数据录入
5 | title: Select
6 | ---
7 |
8 | 当用户需要从一组同类数据中选择一个或多个时,可以使用下拉选择器,点击后选择对应项。
9 |
10 | ## 设计规范
11 |
12 | #### 默认主题
13 |
14 | - 选择器常规高度为 32px,小尺寸的高度为 24px,边框颜色 #D8DAE2,填充色 #FFFFFF,圆角4px;
15 | - 提示文字 12px,颜色 #B1B4C5,输入颜色 #3D446E;
16 | - hover 状态边框颜色 #1D78FF;
17 | - 点击状态边框颜色 #005CE6;
18 | - 禁用状态底色 #EBECF0,禁用说明文字 #B1B4C5;
19 | - 错误样式边框颜色 #F96C5B;
20 |
21 | #### 暗黑主题
22 |
23 | - 下拉框常规高度为 32px,小尺寸的高度为 24px,边框颜色 #2C3047,4px 圆角,宽度根据具体情况而定;
24 | - 提示字颜色 #666666,输入颜色 #BFBFBF;
25 |
26 | ## API
27 |
28 | |类名 |说明 |使用示例 |
29 | |---------|---------|---------|
30 | |.dt-ant-select-dropdown-default | 默认需设置 dropdownClassName 为 dt-ant-select-dropdown-default | UI5.0 额外样式 |
31 | |.dt-form-shadow-bg | 灰色背景,表单样式设置 | 灰色背景(仅默认主题下使用) |
32 | |.dt-form-light-bg | 浅色背景上,显示深色控件 | 浅色背景(仅暗黑主题下使用) |
33 |
--------------------------------------------------------------------------------
/components/empty/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 空状态
4 | type: 数据展示
5 | title: Empty
6 | cols: 1
7 | cover: https://gw.alipayobjects.com/zos/alicdn/MNbKfLBVb/Empty.svg
8 | ---
9 |
10 | 空状态时的展示占位图。
11 |
12 | ## 何时使用
13 |
14 | - 当目前没有数据时,用于显式的用户提示。
15 | - 初始化场景时的引导创建流程。
16 |
17 |
33 |
--------------------------------------------------------------------------------
/scripts/changelog.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | while [[ "$#" > 0 ]]; do case $1 in
4 | -r|--release) release="$2"; shift;;
5 | -b|--branch) branch="$2"; shift;;
6 | *) echo "Unknown parameter passed: $1"; exit 1;;
7 | esac; shift; done
8 |
9 | # Default as minor, the argument major, minor or patch:
10 | if [ -z "$release" ]; then
11 | release="minor";
12 | fi
13 |
14 | # Default release branch is master
15 | if [ -z "$branch" ] ; then
16 | branch="master";
17 | fi;
18 |
19 |
20 | # echo "Branch is $branch"
21 | # echo "Release as $release"
22 |
23 | # Tag prefix
24 | prefix=""
25 | # git pull origin $branch
26 | # echo "Current pull origin $branch."
27 |
28 | # Auto generate version number and tag
29 | standard-version -r $release --tag-prefix $prefix --infile CHANGELOG.md
30 |
31 | # git push --follow-tags origin $branch
32 |
33 | # echo "Release finished."
34 |
35 |
36 |
--------------------------------------------------------------------------------
/components/datepicker/demo/disabled.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 3
3 | title:
4 | zh-CN: 禁用
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 选择框的不可用状态。
10 |
11 | ```jsx
12 | import { DatePicker } from '../../index';
13 | import moment from 'dayjs';
14 |
15 | const { MonthPicker, RangePicker } = DatePicker;
16 |
17 | const dateFormat = 'YYYY-MM-DD';
18 | ReactDOM.render(
19 |
20 |
21 |
22 |
23 |
24 |
29 |
,
30 | mountNode,
31 | );
32 | ```
33 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/DeleteOutlined.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/UploadOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/card/demo/grid-card.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 网格型内嵌卡片
5 | en-US: Grid card
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 一种常见的卡片内容区隔模式。
11 |
12 | ## en-US
13 |
14 | Grid style card content.
15 |
16 | ```jsx
17 | import { Card } from 'antd';
18 |
19 | const gridStyle = {
20 | width: '25%',
21 | textAlign: 'center',
22 | };
23 |
24 | ReactDOM.render(
25 |
26 | Content
27 |
28 | Content
29 |
30 | Content
31 | Content
32 | Content
33 | Content
34 | Content
35 | ,
36 | mountNode,
37 | );
38 | ```
39 |
--------------------------------------------------------------------------------
/components/alert/demo/icon.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 图标
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 可口的图标让信息类型更加醒目。
10 |
11 | ```jsx
12 | import { Alert } from 'antd';
13 |
14 | ReactDOM.render(
15 |
16 |
17 |
18 |
19 |
20 |
21 |
,
22 | mountNode,
23 | );
24 | ```
25 |
--------------------------------------------------------------------------------
/theme/dt-theme/dark/index.less:
--------------------------------------------------------------------------------
1 | @import "./resetDark.less";
2 | @import "./button.less";
3 | @import "./modal.less";
4 | @import "./notification.less";
5 | @import "./message.less";
6 | @import "./form.less";
7 | @import "./table.less";
8 | @import "./layout.less";
9 | @import "./collapse.less";
10 | @import "./steps.less";
11 | @import "./descriptions.less";
12 | @import "./list.less";
13 | @import "./card.less";
14 | @import "./tab.less";
15 | @import "./popover.less";
16 | @import "./upload.less";
17 | @import "./drawer.less";
18 | @import "./tree.less";
19 | @import "./comm.less";
20 |
21 | * {
22 | margin: 0;
23 | padding: 0;
24 | box-sizing: border-box;
25 | }
26 |
27 | body,html {
28 | margin: 0;
29 | height: 100%;
30 | }
31 |
32 | body {
33 | background-color: @white;
34 | }
35 |
36 | ul,li {
37 | list-style: none;
38 | }
39 |
40 | .root {
41 | height: 100%;
42 | }
43 |
--------------------------------------------------------------------------------
/components/input/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | subtitle: 输入框
4 | type: 数据录入
5 | title: Input
6 | ---
7 |
8 | 基本表单组件,当光标位于输入框时,允许用户输入或编辑文本内容的基本表单组件。可与输入框,搜索框,下拉框,日期选择器等灵活组合使用。
9 |
10 | ## 设计规范
11 |
12 | #### 默认主题
13 |
14 | - 输入框常规高度为 32px,小尺寸的高度为 24px,边框颜色#D8DAE2,填充色#FFFFFF,4px 圆角;
15 | - 提示文字 12px,颜色 #B1B4C5,输入颜色 #3D446E;
16 | - hover 状态边框颜色#1D78FF;
17 | - 点击状态边框颜色 #005CE6;
18 | - 禁用状态底色 #EBECF0,文字 #B1B4C5;
19 | - 错误样式边框颜色 #F96C5B;
20 |
21 | #### 暗黑主题
22 |
23 | - 输入框常规高度为 32px,小尺寸的高度为 28px,边框颜色 #2C3047,4px 圆角,宽度根据具体情况而定;
24 | - 提示字颜色 #666666,输入颜色 #BFBFBF;
25 |
26 | ## API
27 |
28 | |类名 |说明 |使用示例 |
29 | |---------|---------|---------|
30 | |.dt-form-shadow-bg | 灰色背景,表单样式设置 | 灰色背景(仅默认主题下使用) |
31 | |.dt-form-light-bg | 浅色背景上,显示深色控件 | 浅色背景(仅暗黑主题下使用) |
32 | |.dt-input-search-group-shadow | 搜索带投影 | 搜索框 |
33 | |.dt-input-search-external | 按钮外置,用于页面中搜索为主功能时,强调搜索功能 | 搜索框 |
34 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/DownloadOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/ZoomInOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/button/demo/danger.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 2
3 | title:
4 | zh-CN: 危险按钮
5 | en-US: Danger Buttons
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 危险按钮
11 |
12 | ```jsx
13 | import { Button } from 'antd';
14 |
15 | ReactDOM.render(
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
,
32 | mountNode,
33 | );
34 | ```
35 |
--------------------------------------------------------------------------------
/components/notification/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本用法
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 基本使用(带图标)
10 |
11 | ```jsx
12 | import { Button, notification } from 'antd';
13 |
14 | const openNotificationWithIcon = type => {
15 | notification[type]({
16 | message: '提示信息',
17 | description:
18 | 'This is the content of the notification. This is the content of the notification. This is the content of the notification.'
19 | });
20 | };
21 |
22 | ReactDOM.render(
23 |
24 |
25 |
26 |
27 |
28 |
,
29 | mountNode,
30 | );
31 | ```
32 |
--------------------------------------------------------------------------------
/scripts/release.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | while [[ "$#" > 0 ]]; do case $1 in
4 | -r|--release) release="$2"; shift;;
5 | -b|--branch) branch="$2"; shift;;
6 | -e|--env) env="$2"; shift;;
7 | *) echo "Unknown parameter passed: $1"; exit 1;;
8 | esac; shift; done
9 |
10 | # Default as minor, the argument major, minor or patch:
11 | if [ -z "$release" ]; then
12 | release="minor";
13 | fi
14 |
15 | # Default release branch is master
16 | if [ -z "$branch" ] ; then
17 | branch="master";
18 | fi;
19 |
20 |
21 | echo "Branch is $branch"
22 | echo "Release as $release"
23 |
24 | # Tag prefix
25 | prefix=""
26 | git pull origin $branch
27 | echo "Current pull origin $branch."
28 |
29 | standard-version -r $release --tag-prefix $prefix --infile CHANGELOG.md
30 |
31 | git push --follow-tags origin $branch
32 |
33 | if [ $env ] ; then
34 | git push --follow-tags $env $branch
35 | fi;
36 |
37 | echo "Release finished."
--------------------------------------------------------------------------------
/theme/static/motion.less:
--------------------------------------------------------------------------------
1 | .motion-container {
2 | height: 190px;
3 | margin: 40px 0 20px;
4 | line-height: 190px;
5 | text-align: center;
6 | }
7 |
8 | .motion-example {
9 | display: inline-block !important;
10 | width: 180px;
11 | height: 180px;
12 | color: #FFF;
13 | font-weight: bold;
14 | font-size: 18px;
15 | line-height: 180px;
16 | text-align: center;
17 | background: url(https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg) center/180px;
18 | border-radius: 8px;
19 | animation-duration: 0.5s !important;
20 | }
21 |
22 | .motion-select-wrapper {
23 | margin-bottom: 40px;
24 | text-align: center;
25 | }
26 |
27 | .motion-select {
28 | width: 180px;
29 | text-align: left;
30 | }
31 |
32 | .video-player {
33 | position: relative;
34 | max-width: 800px;
35 | &-right {
36 | float: right;
37 | width: 616px;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/theme/template/Layout/Footer.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { injectIntl } from 'react-intl';
3 | import config from '../../../bisheng.config';
4 |
5 | class Footer extends React.Component {
6 | constructor(props) {
7 | super(props);
8 |
9 | this.lessLoaded = false;
10 |
11 | this.state = {
12 | color: '#1890ff',
13 | };
14 | }
15 |
16 | render() {
17 | const year = new Date().getFullYear();
18 |
19 | return (
20 |
28 | );
29 | }
30 | }
31 |
32 | export default injectIntl(Footer);
33 |
--------------------------------------------------------------------------------
/components/table/demo/empty.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 无数据,缺省图距顶部 32px
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 固定高度 300,缺省图标未垂直居中展示,而是默认距顶部 32px
10 |
11 | ```jsx
12 | import { Table } from 'antd';
13 |
14 | class App extends React.Component {
15 | state = {};
16 |
17 | render() {
18 | const columns = [
19 | {
20 | title: 'Name',
21 | dataIndex: 'name',
22 | key: 'name',
23 | },
24 | {
25 | title: 'Age',
26 | dataIndex: 'age',
27 | key: 'age',
28 | },
29 | ];
30 | const data = [];
31 | return (
32 |
41 | )
42 | }
43 | }
44 |
45 | ReactDOM.render(, mountNode);
46 | ```
47 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/ImportOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/CloseCircleFilled.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/theme/dt-theme/default/reset.less:
--------------------------------------------------------------------------------
1 | @import "~antd/dist/antd.less";
2 |
3 | // 覆盖antd变量
4 | @primary-color: #1D78FF;
5 |
6 | @heading-color: #3D446E;
7 |
8 | @font-size-base: 12px;
9 |
10 | @text-color: #3D446E;
11 |
12 | @border-radius-base: 4px;
13 |
14 | @border-color-base: #D8DAE2;
15 |
16 | @success-color: #11D7B2;
17 |
18 | @error-color: #F96C5B;
19 |
20 | @warning-color: #FBB310;
21 |
22 | @disabled-color: #B1B4C5;
23 |
24 | @disabled-bg: #EBECF0;
25 |
26 | @btn-disable-border: #EBECF0;
27 |
28 | @input-placeholder-color: #B1B4C5;
29 |
30 | @input-height-lg: 36px;
31 |
32 | @input-hover-border-color: #1D78FF;
33 |
34 | @modal-footer-padding-horizontal: 20px;
35 |
36 | @form-item-margin-bottom: 20px;
37 |
38 | @label-required-color: #F96C5B;
39 |
40 | @table-header-bg: #F9F9FA;
41 |
42 | @table-padding-vertical: 19px;
43 |
44 | @item-hover-bg: #F9F9FA;
45 |
46 | @select-item-selected-bg: #F9F9FA;
47 |
48 | @select-item-selected-font-weight: normal;
49 |
--------------------------------------------------------------------------------
/theme/dt-theme/dark/popover.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-popover {
4 | .ant-popover-content {
5 | border: 1px solid #282B40;
6 | border-radius: 3px;
7 | .ant-popover-inner-content {
8 | padding: 16px;
9 | }
10 | }
11 | }
12 |
13 | .ant-popover-buttons {
14 | text-align: left;
15 | margin: 0;
16 | button {
17 | margin-right: 10px;
18 | margin-left: 0;
19 | &:last-child {
20 | color: @white;
21 | border-color: @red_dark;
22 | background-color: @red_dark;
23 | &:hover, &:focus {
24 | color: @white;
25 | background-color: #F08E89;
26 | border-color: #F08E89;
27 | }
28 | &:active, &.active {
29 | color: @white;
30 | border-color: @red_dark;
31 | background-color: @red_dark;
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/theme/dt-theme/default/input-number.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-input-number {
4 | width: 100px;
5 | border-radius: 4px;
6 | }
7 |
8 | .ant-input-number:focus, .ant-input-number-focused {
9 | border-color: @clickColor;
10 | }
11 |
12 | // 前置/后置标签样式
13 | .ant-input-number-group-wrapper {
14 | width: 208px;
15 | }
16 |
17 | .dt-input-number-disabled {
18 | .ant-input-number-disabled {
19 | border-color: @grey_border;
20 | &:hover {
21 | border-color: @grey_border;
22 | }
23 | }
24 | .ant-input-number-group-addon {
25 | border-color: @black_border;
26 | background-color: @black_border;
27 | color: @black_pageMsg;
28 | }
29 | }
30 |
31 | .ant-input-number-group-addon {
32 | padding: 0 16px;
33 | background-color: @black_navBg;
34 | font-size: @font12;
35 | color: @black_title;
36 | }
37 |
38 | .ant-input-number-group-addon .ant-select {
39 | margin: -6.6px -16px;
40 | }
41 |
--------------------------------------------------------------------------------
/components/input-number/demo/size.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 三种大小
5 | en-US: Sizes
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 三种大小的数字输入框,当 size 分别为 `large` 和 `small` 时,输入框高度为 `40px` 和 `24px` ,默认高度为 `32px`。
11 |
12 | ## en-US
13 |
14 | There are three sizes available to a numeric input box. By default, the size is `32px`. The two additional sizes are `large` and `small` which means `40px` and `24px`, respectively.
15 |
16 | ```jsx
17 | import { InputNumber } from 'antd';
18 |
19 | function onChange(value) {
20 | console.log('changed', value);
21 | }
22 |
23 | ReactDOM.render(
24 |
25 |
26 |
27 |
28 |
,
29 | mountNode,
30 | );
31 | ```
32 |
33 | ```css
34 | .ant-input-number {
35 | margin-right: 10px;
36 | }
37 | ```
38 |
--------------------------------------------------------------------------------
/components/select/demo/light.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 4
3 | title:
4 | zh-CN: 浅色背景(仅暗黑主题下使用)
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 浅色背景上,显示深色控件
10 |
11 | 仅暗黑主题下使用,默认主题下使用无效
12 |
13 | - 为组件或其父组件添加类名`dt-form-light-bg`
14 |
15 | ```jsx
16 | import { Select } from 'antd';
17 |
18 | const { Option } = Select;
19 |
20 | ReactDOM.render(
21 |
22 |
27 |
30 |
,
31 | mountNode
32 | );
33 | ```
34 |
--------------------------------------------------------------------------------
/components/descriptions/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本
5 | en-US: Basic
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 无边框情况。
11 |
12 | ## 何时使用
13 | 展示区域有限的情况下,使用有边框的样式不能提高内容利用率,采用无边框样式
14 | 内容跟随标题移动,整行左对齐,标题色号#8B8FA8,内容色号#3D446E
15 | - 为组件添加类名`dt-descriptions-vertical-display`
16 | 实现竖向排列
17 |
18 | ## en-US
19 |
20 |
21 | Simplest Usage.
22 |
23 | ```jsx
24 | import { Descriptions } from 'antd';
25 |
26 | ReactDOM.render(
27 |
28 | Zhou Maomao
29 | 1810000000
30 | Hangzhou, Zhejiang
31 | empty
32 |
33 | No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China
34 |
35 | ,
36 | mountNode,
37 | );
38 | ```
39 |
--------------------------------------------------------------------------------
/components/select/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本使用
5 | en-US: Basic usage
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 基本使用。
11 |
12 | ## en-US
13 |
14 | Basic usage example.
15 |
16 | ```jsx
17 | import { Select } from 'antd';
18 |
19 | const { Option } = Select;
20 |
21 | ReactDOM.render(
22 |
23 |
36 |
39 |
,
40 | mountNode
41 | );
42 | ```
43 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/PaperClipOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/datepicker/demo/shadow.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 2
3 | title:
4 | zh-CN: 灰色背景(仅默认主题下使用)
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 灰色背景中的表单需添加投影,去掉外边框
10 |
11 | 仅默认主题下使用,暗黑主题下使用无效
12 |
13 | - 为组件添加类名`dt-form-shadow-bg`
14 |
15 | ```jsx
16 | import { DatePicker } from '../../index';
17 | import moment from 'dayjs';
18 |
19 | const { MonthPicker, RangePicker } = DatePicker;
20 |
21 | const dateFormat = 'YYYY-MM-DD';
22 | ReactDOM.render(
23 |
24 |
25 |
26 |
27 |
28 |
32 |
,
33 | mountNode
34 | );
35 | ```
36 |
--------------------------------------------------------------------------------
/default.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 8989;
3 | underscores_in_headers on;
4 | charset utf-8;
5 | gzip on;
6 | gzip_comp_level 9;
7 | gzip_min_length 1k;
8 | gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/json application/javascript;
9 | gzip_vary on;
10 | gzip_http_version 1.1;
11 | gzip_disable "MSIE [1-6]\.(?!.*SV1)";
12 | proxy_set_header Host $host;
13 | proxy_set_header RealIP $remote_addr;
14 | proxy_set_header REMOTE-HOST $remote_addr;
15 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
16 |
17 | proxy_read_timeout 300;
18 |
19 | location / {
20 | try_files $uri /index.html;
21 | location ~ .*\.(ico|js|css|gif|jpg|jpeg|png|bmp|swf)$ {}
22 | root /home/app/ant-design-dtinsight-theme/dist;
23 | rewrite ^/$ /docs/react/getting-started.html redirect;
24 | }
25 | error_page 500 502 503 504 404 http://172.16.100.225:8989/docs/react/getting-started.html;
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/components/collapse/demo/card.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 2
3 | title:
4 | zh-CN: 面板嵌套
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 嵌套折叠面板。
10 |
11 |
12 | ```jsx
13 | import { Collapse } from 'antd';
14 |
15 |
16 | const { Panel } = Collapse;
17 |
18 | const text = `
19 | A dog is a type of domesticated animal.
20 | Known for its loyalty and faithfulness,
21 | it can be found as a welcome guest in many households across the world.
22 | `;
23 |
24 | ReactDOM.render(
25 |
26 |
27 |
28 |
29 | {text}
30 |
31 |
32 |
33 |
34 | {text}
35 |
36 |
37 | {text}
38 |
39 | ,
40 | mountNode,
41 | );
42 | ```
43 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/EyeOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/collapse/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本使用
5 | en-US: Basic usage
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 基本使用。
11 |
12 | ## en-US
13 |
14 | Basic usage example.
15 |
16 | ```jsx
17 | import { Collapse } from 'antd';
18 |
19 |
20 | const { Panel } = Collapse;
21 |
22 | function callback(key) {
23 | console.log(key);
24 | }
25 |
26 | const text = `
27 | A dog is a type of domesticated animal.
28 | Known for its loyalty and faithfulness,
29 | it can be found as a welcome guest in many households across the world.
30 | `;
31 |
32 | ReactDOM.render(
33 |
36 |
37 | {text}
38 |
39 |
40 | {text}
41 |
42 |
43 | {text}
44 |
45 | ,
46 | mountNode,
47 | );
48 | ```
49 |
--------------------------------------------------------------------------------
/components/table/demo/empty-top.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 2
3 | title:
4 | zh-CN: 无数据 - 缺省图距顶部 20%
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 固定高度 400,缺省图标距顶部 20%
10 | - 添加 `dt-table-empty-top-20-percent` 类名,可以让缺省图距顶部 20%,大部分场景适用,不适用时使用默认的 margin 间距即可。
11 |
12 | ```jsx
13 | import { Table } from 'antd';
14 |
15 | class App extends React.Component {
16 | state = {};
17 |
18 | render() {
19 | const columns = [
20 | {
21 | title: 'Name',
22 | dataIndex: 'name',
23 | key: 'name',
24 | },
25 | {
26 | title: 'Age',
27 | dataIndex: 'age',
28 | key: 'age',
29 | },
30 | ];
31 | const data = [];
32 | return (
33 |
42 | )
43 | }
44 | }
45 |
46 | ReactDOM.render(, mountNode);
47 | ```
48 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/StarFilled.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/layout/index.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | category: Components
3 | cols: 1
4 | type: 布局
5 | title: Layout
6 | subtitle: 布局
7 | ---
8 |
9 | 协助进行页面级整体布局。
10 |
11 | ## 设计规范
12 |
13 | - 点击展开各个子产品入口的浮窗,可以切换至其他子产品,每个子产品以及 UIC 的这个位置常显该图标
14 | - 绘制画布 64px X 64px 应用显示尺寸 40px X 40px
15 | - 各个子产品的名称 字体使用【Poppins-中粗体】字号 20,最后轮廓化并且创建控件,宽度不固定,整体布局根据文字长度固定间距左右自动调整
16 | - 选择项目下拉框宽度固定 208px,项目名称超出宽度“...”显示
17 | - tab 标题每一项固定 112px 的宽度,标题最多 6 个字,tab 项最多 6 个
18 | - 用户名称固定宽度 112px,超出“...”展示
19 | - 点击用户名唤起下拉框 内容需要产品重新规划
20 | - 导航布局是在 1440px 宽度的设计稿上面正常展开,如果遇到左边 tab 项达到最多数量 6 个,并且屏幕比较小的情况,需要根据屏幕宽度折叠 tab 项
21 |
22 |
23 | ## API
24 |
25 | |类名 |说明 |使用示例
26 | |---------|---------|
27 | |.dt-layout-header | 顶部导航样式 | 基本用法、带项目选择、侧边导航 |
28 | |.dt-layout-sider | 侧边导航栏样式设置 | 侧边导航 |
29 | |.dt-container | 主要内容模块样式 | 基本用法、带项目选择 |
30 | |.dt-slider-top-icon | 侧边栏收缩按钮 | 侧边导航 |
31 | |.dt-header-project-select-menu | 顶部导航栏 项目选择菜单 | 带项目选择、侧边导航 |
32 | |.dt-header-log-wrapper | logo 以及标题样式设置 | 基本用法、带项目选择、侧边导航 |
33 |
--------------------------------------------------------------------------------
/components/list/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 基础列表
5 | en-US: Basic list
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 基础列表。
11 |
12 | ## en-US
13 |
14 | Basic list.
15 |
16 | ```jsx
17 | import { List, Avatar } from 'antd';
18 |
19 | const data = [
20 | {
21 | title: 'Ant Design Title 1',
22 | },
23 | {
24 | title: 'Ant Design Title 2',
25 | },
26 | {
27 | title: 'Ant Design Title 3',
28 | },
29 | {
30 | title: 'Ant Design Title 4',
31 | },
32 | ];
33 |
34 | ReactDOM.render(
35 | (
39 |
40 | }
42 | title={{item.title}}
43 | description="Ant Design, a design language for background applications, is refined by Ant UED Team"
44 | />
45 |
46 | )}
47 | />,
48 | mountNode,
49 | );
50 | ```
51 |
--------------------------------------------------------------------------------
/components/notification/demo/btn.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 带操作按钮
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 带操作按钮
10 |
11 | ```jsx
12 | import { Button, notification } from 'antd';
13 |
14 | const openNotificationWithIcon = type => {
15 | const btn = (
16 | <>
17 |
20 |
23 | >
24 | );
25 | notification[type]({
26 | message: '提示信息',
27 | btn,
28 | description:
29 | 'This is the content of the notification. This is the content of the notification. This is the content of the notification.'
30 | });
31 | };
32 |
33 | ReactDOM.render(
34 |
35 |
36 |
,
37 | mountNode,
38 | );
39 | ```
40 |
--------------------------------------------------------------------------------
/components/collapse/demo/ghost.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: ghost
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 使折叠面板透明且无边框,和下方 面板嵌套 的示例代码一致,但多了 ghost。
10 |
11 |
12 | ```jsx
13 | import { Collapse } from 'antd';
14 |
15 |
16 | const { Panel } = Collapse;
17 |
18 | const text = `
19 | A dog is a type of domesticated animal.
20 | Known for its loyalty and faithfulness,
21 | it can be found as a welcome guest in many households across the world.
22 | `;
23 |
24 | ReactDOM.render(
25 |
26 |
27 |
28 |
29 | {text}
30 |
31 |
32 |
33 |
34 | {text}
35 |
36 |
37 | {text}
38 |
39 | ,
40 | mountNode,
41 | );
42 | ```
43 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/PlusSquareOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/theme/dt-theme/default/list.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-list-bordered {
4 | border: 1px solid @black_readonly;
5 | }
6 |
7 | .ant-list {
8 | .ant-list-header {
9 | border-bottom: 1px solid @black_readonly;
10 | padding: 16px;
11 | }
12 | .ant-list-item {
13 | border-bottom: 1px solid @black_readonly;
14 | padding: 16px;
15 | .ant-card-bordered {
16 | border: 1px solid @black_readonly;
17 | }
18 | .ant-card-head {
19 | font-size: 16px;
20 | padding: 0 16px;
21 | border-bottom: none;
22 | .ant-card-head-title {
23 | padding: 16px 0 12px;
24 | }
25 | }
26 | .ant-card-body {
27 | color: @black_pageMsg;
28 | padding: 5px 16px 16px;
29 | font-size: 12px;
30 | }
31 | }
32 | .ant-list-item-meta-avatar {
33 | margin-right: 8px;
34 | }
35 | .ant-list-item-meta-description {
36 | color: @black_Desc;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/custom-icons/generate/rate.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Rate 下的星星为实心,需要单独处理
3 | */
4 | const fileNameToClassName = {
5 | StarFilled: 'anticon-star',
6 | };
7 |
8 | const getName = (value) => {
9 | if (Array.isArray(value)) {
10 | let str = '';
11 | value.forEach(
12 | (item, idx) => (str += `.${item} svg path${idx !== value.length - 1 ? ', ' : ''}`)
13 | );
14 | return str;
15 | } else {
16 | return `.${value} svg path`;
17 | }
18 | };
19 |
20 | module.exports = (pathContentMap) => {
21 | let cssContent = '';
22 | Object.keys(fileNameToClassName).forEach((item) => {
23 | cssContent += `
24 | ${getName(fileNameToClassName[item])} {
25 | &:first-child {
26 | d: path("${pathContentMap[item]}");
27 | }
28 | &:not(:first-child) {
29 | d: path("");
30 | }
31 | }`;
32 | });
33 |
34 | return `.ant-rate-star {
35 | .ant-rate-star-first, .ant-rate-star-second {${cssContent}
36 | }
37 | }
38 | `;
39 | };
40 |
--------------------------------------------------------------------------------
/theme/dt-theme/default/alert.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-alert.ant-alert-no-icon {
4 | padding: 12px 16px;
5 | }
6 |
7 | .ant-alert-icon {
8 | top: 13px;
9 | left: 16px;
10 | font-size: 20px;
11 | }
12 |
13 | .ant-alert-close-icon {
14 | top: 10px;
15 | right: 14px;
16 | }
17 |
18 | .ant-alert-close-icon .anticon-close {
19 | color: @black_pageMsg;
20 | &:hover {
21 | color: @black_Desc;
22 | }
23 | }
24 |
25 | .ant-alert-with-description {
26 | padding: 12px 16px;
27 | .ant-alert-icon {
28 | top: 13px;
29 | left: 20px;
30 | font-size: 20px;
31 | margin-top: 1px;
32 | margin-right: 8px;
33 | }
34 | .ant-alert-close-icon {
35 | top: 12px;
36 | }
37 | }
38 |
39 | .ant-alert-content {
40 | .ant-alert-message {
41 | .operate-btn {
42 | float: right;
43 | }
44 | }
45 | }
46 |
47 | .ant-alert-action {
48 | line-height: 20px;
49 | font-weight: 400;
50 | font-size: 12px;
51 | margin-right: 31px;
52 | }
53 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ant-design-dtinsight-theme
2 |
3 | Engish | [Chinese](./README_zh.md)
4 |
5 | ## Docs
6 | - [v2.x](https://dtstack.github.io/ant-design-dtinsight-theme/docs/react/introduce-cn)
7 | - [v1.x](https://liuxy0551.github.io/ant-design-dtinsight-theme/docs/react/getting-started-cn)
8 |
9 | This project has implemented the compilation of the DTInsight UI5.0 standard style based on the Ant-Design 4.x version and realized the component style preview based on the Bisheng framework.
10 |
11 | In this project you can:
12 |
13 | - Preview the component and view its associated code implementation
14 | - Use and preview custom styles
15 |
16 | ## Installation
17 |
18 | ```javascript
19 | npm install ant-design-dtinsight-theme --save
20 |
21 | OR
22 |
23 | yarn add ant-design-dtinsight-theme
24 | ```
25 |
26 | ## Contribution
27 |
28 | At present, the project is still in the early stage. If you have better comments, please feel free to [Issue](https://github.com/DTStack/ant-design-dtinsight-theme/issues/new) or [Pull Request](https://github.com/DTStack/ant-design-dtinsight-theme/pulls)
29 |
--------------------------------------------------------------------------------
/custom-icons/generate/formSpecial.js:
--------------------------------------------------------------------------------
1 | /**
2 | * ant-form-item-feedback-icon下的图标需要单独处理
3 | */
4 | const fileNameToClassName = {
5 | CheckCircleFilled: 'anticon-check-circle',
6 | ExclamationCircleFilled: ['anticon-exclamation-circle'],
7 | };
8 |
9 | const getName = (value) => {
10 | if (Array.isArray(value)) {
11 | let str = '';
12 | value.forEach(
13 | (item, idx) => (str += `.${item} svg path${idx !== value.length - 1 ? ', ' : ''}`)
14 | );
15 | return str;
16 | } else {
17 | return `.${value} svg path`;
18 | }
19 | };
20 |
21 | module.exports = (pathContentMap) => {
22 | let cssContent = '';
23 | Object.keys(fileNameToClassName).forEach((item) => {
24 | cssContent += `
25 | ${getName(fileNameToClassName[item])} {
26 | &:first-child {
27 | d: path("${pathContentMap[item]}");
28 | }
29 | &:not(:first-child) {
30 | d: path("");
31 | }
32 | }`;
33 | });
34 |
35 | return `.ant-form-item-feedback-icon {${cssContent}
36 | }
37 | `;
38 | };
39 |
--------------------------------------------------------------------------------
/components/message/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本使用
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 最简单的用法,适用于信息提醒反馈。
10 |
11 | 共有四种样式 infor、success、warning、error。
12 |
13 | ```jsx
14 | import { message, Button } from 'antd';
15 |
16 | const success = () => {
17 | message.success('This is a success message');
18 | };
19 |
20 | const error = () => {
21 | message.error('This is an error message');
22 | };
23 |
24 | const warning = () => {
25 | message.warning('This is a warning message');
26 | };
27 |
28 | const info = () => {
29 | message.info('This is a normal message');
30 | };
31 |
32 | const loading = () => {
33 | const hide = message.loading('Action in progress..', 0);
34 | setTimeout(hide, 2500);
35 | };
36 |
37 | ReactDOM.render(
38 |
39 |
40 |
41 |
42 |
43 |
44 |
,
45 | mountNode,
46 | );
47 | ```
48 |
--------------------------------------------------------------------------------
/components/step/demo/clickable.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 9
3 | title:
4 | zh-CN: 可点击
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 设置 `onChange` 后,Steps 变为可点击状态。
10 |
11 | ```jsx
12 | import { Steps, Divider } from 'antd';
13 |
14 | const { Step } = Steps;
15 |
16 | class Demo extends React.Component {
17 | state = {
18 | current: 0,
19 | };
20 |
21 | onChange = current => {
22 | console.log('onChange:', current);
23 | this.setState({ current });
24 | };
25 |
26 | render() {
27 | const { current } = this.state;
28 |
29 | return (
30 | <>
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | >
45 | );
46 | }
47 | }
48 |
49 | ReactDOM.render(, mountNode);
50 | ```
51 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/QuestionCircleFilled.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/theme/dt-theme/default/popover.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-popover {
4 | .ant-popover-inner {
5 | padding: 16px;
6 | box-shadow: 0 5px 22px 0 rgba(61, 68, 110, 0.2);
7 | .ant-popover-buttons {
8 | .ant-btn {
9 | border-radius: 2px;
10 | }
11 | }
12 | }
13 | .ant-popover-title {
14 | padding: 0;
15 | border-bottom: none;
16 | min-height: 22px;
17 | font-size: 14px;
18 | font-weight: 500;
19 | font-family: PingFangSC-Medium, "PingFang SC";
20 | margin-bottom: 4px;
21 | }
22 | .ant-popover-message-title {
23 | color: @black_title;
24 | font-size: 12px;
25 | font-family: PingFangSC-Regular, "PingFang SC";
26 | padding-left: 25px;
27 | }
28 | .ant-popover-message {
29 | & > .anticon {
30 | font-size: 20px;
31 | top: 2px;
32 | }
33 | }
34 | .ant-popover-inner-content {
35 | padding: 0;
36 | }
37 | }
38 |
39 | .ant-popconfirm {
40 | min-width: 200px;
41 | }
42 |
--------------------------------------------------------------------------------
/components/select/demo/multiply.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 5
3 | title:
4 | zh-CN: 多选
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 多选,从已有条目中选择;禁用样式。
10 |
11 | ```jsx
12 | import { Select } from 'antd';
13 |
14 | const { Option } = Select;
15 |
16 | const children = [];
17 | for (let i = 10; i < 36; i++) {
18 | children.push();
19 | }
20 |
21 | function handleChange(value) {
22 | console.log(`selected ${value}`);
23 | }
24 |
25 | ReactDOM.render(
26 |
27 |
37 |
38 |
47 |
,
48 | mountNode,
49 | );
50 | ```
51 |
--------------------------------------------------------------------------------
/components/datepicker/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本使用
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 最简单的用法,在浮层中可以选择或者输入日期。
10 |
11 | ```jsx
12 | import { DatePicker } from '../../index';
13 | import moment from 'moment';
14 | const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
15 |
16 | function onChange(date, dateString) {
17 | console.log(date, dateString);
18 | }
19 |
20 | function disabledDate(current) {
21 | // Can not select days before today and today
22 | return current && current < moment().endOf('day');
23 | }
24 |
25 | ReactDOM.render(
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
,
35 | mountNode,
36 | );
37 | ```
38 |
--------------------------------------------------------------------------------
/components/dropdown/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本使用
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 最简单的下拉菜单。
10 |
11 | ## en-US
12 |
13 | The most basic dropdown menu.
14 |
15 | ```tsx
16 | import { Menu, Dropdown, Space } from 'antd';
17 | import { DownOutlined } from '@ant-design/icons';
18 |
19 | const menu = (
20 |
37 | );
38 |
39 | ReactDOM.render(
40 |
41 | e.preventDefault()}>
42 |
43 | Hover me
44 |
45 |
46 |
47 | ,
48 | mountNode,
49 | );
50 | ```
51 |
--------------------------------------------------------------------------------
/components/popover/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 基本
5 | en-US: Basic
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 最简单的用法,浮层的大小由内容区域决定。
11 |
12 | ## en-US
13 |
14 | The most basic example. The size of the floating layer depends on the contents region.
15 |
16 | ```jsx
17 | import { Popover, Button } from 'antd';
18 |
19 | const content = (
20 |
21 |
Content
22 |
Content
23 |
24 | );
25 |
26 | ReactDOM.render(
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
,
38 | mountNode,
39 | );
40 | ```
41 |
42 |
47 |
--------------------------------------------------------------------------------
/theme/static/style/mixins/motion.less:
--------------------------------------------------------------------------------
1 | @import "../themes/index";
2 |
3 | .motion-common(@duration: @animation-duration-base) {
4 | animation-duration: @duration;
5 | animation-fill-mode: both;
6 | }
7 |
8 | .motion-common-leave(@duration: @animation-duration-base) {
9 | animation-duration: @duration;
10 | animation-fill-mode: both;
11 | }
12 |
13 | .make-motion(@className, @keyframeName, @duration: @animation-duration-base) {
14 | .@{className}-enter,
15 | .@{className}-appear {
16 | .motion-common(@duration);
17 | animation-play-state: paused;
18 | }
19 | .@{className}-leave {
20 | .motion-common-leave(@duration);
21 | animation-play-state: paused;
22 | }
23 | .@{className}-enter.@{className}-enter-active,
24 | .@{className}-appear.@{className}-appear-active {
25 | animation-name: ~"@{keyframeName}In";
26 | animation-play-state: running;
27 | }
28 | .@{className}-leave.@{className}-leave-active {
29 | animation-name: ~"@{keyframeName}Out";
30 | animation-play-state: running;
31 | pointer-events: none;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/theme/dt-theme/default/treeselect.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-tree-select-dropdown {
4 | .ant-select-tree {
5 | .ant-select-tree-treenode {
6 | padding: 0;
7 | }
8 | .ant-select-tree-list-holder {
9 | .ant-select-tree-node-content-wrapper {
10 | min-height: 32px;
11 | line-height: 32px;
12 | &:hover {
13 | background-color: @black_titleBg;
14 | }
15 | }
16 | .ant-select-tree-switcher {
17 | line-height: 32px;
18 | }
19 | .ant-select-tree-node-content-wrapper.ant-select-tree-node-selected {
20 | color: @blue;
21 | background: none;
22 | }
23 | }
24 | }
25 | .ant-select-tree-list {
26 | .ant-select-tree-treenode {
27 | .ant-select-tree-checkbox {
28 | margin: 8px 8px 0 0;
29 | .ant-select-tree-checkbox-inner {
30 | border-radius: 2px;
31 | }
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/theme/static/style/style/mixins/motion.less:
--------------------------------------------------------------------------------
1 | @import "../themes/index";
2 |
3 | .motion-common(@duration: @animation-duration-base) {
4 | animation-duration: @duration;
5 | animation-fill-mode: both;
6 | }
7 |
8 | .motion-common-leave(@duration: @animation-duration-base) {
9 | animation-duration: @duration;
10 | animation-fill-mode: both;
11 | }
12 |
13 | .make-motion(@className, @keyframeName, @duration: @animation-duration-base) {
14 | .@{className}-enter,
15 | .@{className}-appear {
16 | .motion-common(@duration);
17 | animation-play-state: paused;
18 | }
19 | .@{className}-leave {
20 | .motion-common-leave(@duration);
21 | animation-play-state: paused;
22 | }
23 | .@{className}-enter.@{className}-enter-active,
24 | .@{className}-appear.@{className}-appear-active {
25 | animation-name: ~"@{keyframeName}In";
26 | animation-play-state: running;
27 | }
28 | .@{className}-leave.@{className}-leave-active {
29 | animation-name: ~"@{keyframeName}Out";
30 | animation-play-state: running;
31 | pointer-events: none;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/components/select/demo/search.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 带搜索框
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 展开后可对选项进行搜索。
10 |
11 | ```jsx
12 | import { Select } from 'antd';
13 |
14 | const { Option } = Select;
15 |
16 | function onChange(value) {
17 | console.log(`selected ${value}`);
18 | }
19 |
20 | function onBlur() {
21 | console.log('blur');
22 | }
23 |
24 | function onFocus() {
25 | console.log('focus');
26 | }
27 |
28 | function onSearch(val) {
29 | console.log('search:', val);
30 | }
31 |
32 | ReactDOM.render(
33 | ,
50 | mountNode,
51 | );
52 | ```
53 |
--------------------------------------------------------------------------------
/components/collapse/demo/light.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 3
3 | title:
4 | zh-CN: 浅色背景(仅暗黑主题下使用)
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 浅色背景上,显示深色控件
10 |
11 | 仅暗黑主题下使用,默认主题下使用无效
12 |
13 | - 为组件添加类名`dt-collapse-light-bg`
14 | - 为存在浮层的组件相关属性设置类名`dt-collapse-light-bg`
15 |
16 | ```jsx
17 | import { Collapse } from 'antd';
18 |
19 | const { Panel } = Collapse;
20 |
21 | function callback(key) {
22 | console.log(key);
23 | }
24 |
25 | const text = `
26 | A dog is a type of domesticated animal.
27 | Known for its loyalty and faithfulness,
28 | it can be found as a welcome guest in many households across the world.
29 | `;
30 |
31 | ReactDOM.render(
32 |
33 |
34 |
35 | {text}
36 |
37 |
38 | {text}
39 |
40 |
41 | {text}
42 |
43 |
44 |
,
45 | mountNode,
46 | );
47 | ```
48 |
--------------------------------------------------------------------------------
/components/datepicker/demo/light.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 4
3 | title:
4 | zh-CN: 浅色背景(仅暗黑主题下使用)
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 浅色背景上,显示深色控件
10 |
11 | 仅暗黑主题下使用,默认主题下使用无效
12 |
13 | - 为组件添加类名`dt-form-light-bg`
14 | - 设置组件的属性 `dropdownClassName` 为`dt-form-light-bg`
15 |
16 | ```jsx
17 | import { DatePicker } from '../../index';
18 | import moment from 'dayjs';
19 |
20 | const { MonthPicker, RangePicker } = DatePicker;
21 |
22 | const dateFormat = 'YYYY-MM-DD';
23 | ReactDOM.render(
24 |
25 |
26 |
27 |
28 |
29 |
34 |
,
35 | mountNode
36 | );
37 | ```
38 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/SwapOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/tab/demo/slide-vertical.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 4
3 | title:
4 | zh-CN: 隐藏 `···` icon
5 | en-US: HiddenIcon
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 可以使用 `dt-tabs-hidden-more-icon` 隐藏数量较多时左下角或右上角的 `···` icon
11 |
12 | ## en-US
13 |
14 | You can use 'dt-tabs-hidden-more-icon' to hide the more icon in the bottom left or top right corner when there is a large quantity.
15 |
16 | ```jsx
17 | import { Tabs, Radio } from 'antd';
18 | import { AndroidOutlined, AppleOutlined } from '@ant-design/icons';
19 |
20 | const { TabPane } = Tabs;
21 |
22 | class SlidingTabsDemo extends React.Component {
23 | constructor(props) {
24 | super(props);
25 | }
26 |
27 | render() {
28 | return (
29 |
30 |
31 | {[...Array(30).keys()].map(i => (
32 | Tab-{i} : `Tab-${i}`} key={i}>
33 | Content of tab {i}
34 |
35 | ))}
36 |
37 |
38 | );
39 | }
40 | }
41 |
42 | ReactDOM.render(, mountNode);
43 | ```
44 |
--------------------------------------------------------------------------------
/README_zh.md:
--------------------------------------------------------------------------------
1 | # ant-design-dtinsight-theme
2 |
3 | [英文](./README.md) | 中文
4 |
5 | ## 文档
6 | - [v2.x](https://dtstack.github.io/ant-design-dtinsight-theme/docs/react/introduce-cn)
7 | - [v1.x](https://liuxy0551.github.io/ant-design-dtinsight-theme/docs/react/getting-started-cn)
8 |
9 | 本项目 v2.x 基于 antd 4.x 实现数栈 UI5.0 规范样式的编写,基于 bisheng 框架实现组件样式预览。
10 |
11 | 在本项目你可以:
12 |
13 | - 查看组件预览及其相关代码实现
14 | - 自定义样式使用及预览
15 |
16 | ## 安装
17 |
18 | ```javascript
19 | npm install ant-design-dtinsight-theme --save
20 |
21 | 或
22 |
23 | yarn add ant-design-dtinsight-theme
24 | ```
25 |
26 | ## 替换 antd 图标
27 |
28 | 将 iconfont 上设计提供的 svg 文件下载放到 `custom-icons/iconfont-svgs` 文件夹下,antd 图标名与 className 的对应关系配置在 `fileNameToClassName.js`,`/icon/basic.md` 下的 fileNameToClassName 常量应与 `fileNameToClassName.js` 文件保持一致,用于文档中展示数栈定制的 icon;部分特殊的图标需要特殊处理,是由于 Dom 结构的不同,具体可查看 `custom-icons/generate` 文件夹下的 `formSpecial.js`、 `rate.js`、`special.js` 文件。
29 |
30 | 执行 `yarn generate` 命令可生成 `theme/dt-theme/default/custom-icons.less` 文件。
31 |
32 | ## 贡献
33 |
34 | 目前该项目还在初期阶段,如有更好地意见欢迎提 [Issue](https://github.com/DTStack/ant-design-dtinsight-theme/issues/new) 或 [Pull Request](https://github.com/DTStack/ant-design-dtinsight-theme/pulls)
35 |
--------------------------------------------------------------------------------
/components/cascader/demo/select.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 基本
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 多选样式
10 |
11 | ```jsx
12 | import { Cascader } from 'antd';
13 |
14 | const options = [
15 | {
16 | value: 'zhejiang',
17 | label: 'Zhejiang Zhejiang Zhejiang Zhejiang',
18 | children: [
19 | {
20 | value: 'hangzhou',
21 | label: 'Hangzhou',
22 | children: [
23 | {
24 | value: 'xihu',
25 | label: 'West Lake West Lake West Lake West Lake',
26 | },
27 | ],
28 | },
29 | ],
30 | },
31 | {
32 | value: 'jiangsu',
33 | label: 'Jiangsu',
34 | children: [
35 | {
36 | value: 'nanjing',
37 | label: 'Nanjing',
38 | children: [
39 | {
40 | value: 'zhonghuamen',
41 | label: 'Zhong Hua Men',
42 | },
43 | ],
44 | },
45 | ],
46 | },
47 | ];
48 |
49 | function onChange(value) {
50 | console.log(value);
51 | }
52 |
53 | ReactDOM.render(
54 | ,
55 | mountNode,
56 | );
57 | ```
58 |
--------------------------------------------------------------------------------
/components/modal/demo/largeTitle.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 6
3 | title:
4 | zh-CN: 超长 Title
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 弹框中包含表格
10 |
11 | ```jsx
12 | import { Modal, Button, Table } from 'antd';
13 |
14 | class App extends React.Component {
15 | state = { visible: false };
16 |
17 | showModal = () => {
18 | this.setState({
19 | visible: true,
20 | });
21 | };
22 |
23 | handleOk = e => {
24 | console.log(e);
25 | this.setState({
26 | visible: false,
27 | });
28 | };
29 |
30 | handleCancel = e => {
31 | console.log(e);
32 | this.setState({
33 | visible: false,
34 | });
35 | };
36 |
37 | render() {
38 | return (
39 |
40 |
43 |
50 | 内容
51 |
52 |
53 | );
54 | }
55 | }
56 |
57 | ReactDOM.render(, mountNode);
58 | ```
59 |
--------------------------------------------------------------------------------
/theme/static/style/mixins/iconfont.less:
--------------------------------------------------------------------------------
1 | .iconfont-mixin() {
2 | display: inline-block;
3 | color: @icon-color;
4 | font-style: normal;
5 | line-height: 0;
6 | text-align: center;
7 | text-transform: none;
8 | vertical-align: -0.125em; // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
9 | text-rendering: optimizelegibility;
10 | -webkit-font-smoothing: antialiased;
11 | -moz-osx-font-smoothing: grayscale;
12 | > * {
13 | line-height: 1;
14 | }
15 | svg {
16 | display: inline-block;
17 | }
18 | &::before {
19 | display: none; // dont display old icon.
20 | }
21 | & &-icon {
22 | display: block;
23 | }
24 | }
25 |
26 | // for iconfont font size
27 | // fix chrome 12px bug, support ie
28 | .iconfont-size-under-12px(@size, @rotate: 0deg) {
29 | display: inline-block;
30 |
31 | @font-scale: unit(@size / 12px);
32 | font-size: 12px;
33 | // IE9
34 | font-size: ~"@{size} \9";
35 | transform: scale(@font-scale) rotate(@rotate);
36 | :root & {
37 | font-size: @font-size-sm; // reset IE9 and above
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/theme/template/Content/index.jsx:
--------------------------------------------------------------------------------
1 | import collect from 'bisheng/collect';
2 | import MainContent from './MainContent';
3 |
4 | export default collect(async (nextProps) => {
5 | const { pathname } = nextProps.location;
6 |
7 | const pageDataPath =
8 | pathname.indexOf('.html') > 0
9 | ? pathname.replace('.html', '').split('/')
10 | : pathname.replace('-cn', '').split('/');
11 |
12 | const pageData = nextProps.utils.get(nextProps.data, pageDataPath);
13 |
14 | if (!pageData) {
15 | // eslint-disable-next-line no-throw-literal
16 | throw 404;
17 | }
18 |
19 | const locale = 'zh-CN';
20 | const pageDataPromise =
21 | typeof pageData === 'function'
22 | ? pageData()
23 | : (pageData[locale] || pageData.index[locale] || pageData.index)();
24 | const demosFetcher = nextProps.utils.get(nextProps.data, [...pageDataPath, 'demo']);
25 | if (demosFetcher) {
26 | const [localizedPageData, demos] = await Promise.all([pageDataPromise, demosFetcher()]);
27 | return { localizedPageData, demos };
28 | }
29 |
30 | return { localizedPageData: await pageDataPromise };
31 | })(MainContent);
32 |
--------------------------------------------------------------------------------
/theme/static/style/style/mixins/iconfont.less:
--------------------------------------------------------------------------------
1 | .iconfont-mixin() {
2 | display: inline-block;
3 | color: @icon-color;
4 | font-style: normal;
5 | line-height: 0;
6 | text-align: center;
7 | text-transform: none;
8 | vertical-align: -0.125em; // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
9 | text-rendering: optimizelegibility;
10 | -webkit-font-smoothing: antialiased;
11 | -moz-osx-font-smoothing: grayscale;
12 | > * {
13 | line-height: 1;
14 | }
15 | svg {
16 | display: inline-block;
17 | }
18 | &::before {
19 | display: none; // dont display old icon.
20 | }
21 | & &-icon {
22 | display: block;
23 | }
24 | }
25 |
26 | // for iconfont font size
27 | // fix chrome 12px bug, support ie
28 | .iconfont-size-under-12px(@size, @rotate: 0deg) {
29 | display: inline-block;
30 |
31 | @font-scale: unit(@size / 12px);
32 | font-size: 12px;
33 | // IE9
34 | font-size: ~"@{size} \9";
35 | transform: scale(@font-scale) rotate(@rotate);
36 | :root & {
37 | font-size: @font-size-sm; // reset IE9 and above
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/components/cascader/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 基本
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 省市区级联。
10 |
11 | - 添加类名 dt-ant-select-outside 为级联选择框设置统一样式
12 |
13 | ```jsx
14 | import { Cascader } from 'antd';
15 |
16 | const options = [
17 | {
18 | value: 'zhejiang',
19 | label: 'Zhejiang Zhejiang Zhejiang Zhejiang',
20 | children: [
21 | {
22 | value: 'hangzhou',
23 | label: 'Hangzhou',
24 | children: [
25 | {
26 | value: 'xihu',
27 | label: 'West Lake',
28 | },
29 | ],
30 | },
31 | ],
32 | },
33 | {
34 | value: 'jiangsu',
35 | label: 'Jiangsu',
36 | children: [
37 | {
38 | value: 'nanjing',
39 | label: 'Nanjing',
40 | children: [
41 | {
42 | value: 'zhonghuamen',
43 | label: 'Zhong Hua Men',
44 | },
45 | ],
46 | },
47 | ],
48 | },
49 | ];
50 |
51 | function onChange(value) {
52 | console.log(value);
53 | }
54 |
55 | ReactDOM.render(
56 | ,
57 | mountNode,
58 | );
59 | ```
60 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/QuestionCircleOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/DragOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/iconfont-svgs/ExportOutlined.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom-icons/generate/special.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Notification, Modal, Message, Popover, Popconfirm 的 Dom 与 className="root" 同级,所以单独处理,Alert 下的图标需要单独处理
3 | */
4 | const fileNameToClassName = {
5 | CheckCircleFilled: 'anticon-check-circle',
6 | ExclamationCircleFilled: ['anticon-info-circle'],
7 | WarningFilled: 'anticon-exclamation-circle',
8 | };
9 |
10 | const getName = (value) => {
11 | if (Array.isArray(value)) {
12 | let str = '';
13 | value.forEach(
14 | (item, idx) => (str += `.${item} svg path${idx !== value.length - 1 ? ', ' : ''}`)
15 | );
16 | return str;
17 | } else {
18 | return `.${value} svg path`;
19 | }
20 | };
21 |
22 | module.exports = (pathContentMap) => {
23 | let cssContent = '';
24 | Object.keys(fileNameToClassName).forEach((item) => {
25 | cssContent += `
26 | ${getName(fileNameToClassName[item])} {
27 | &:first-child {
28 | d: path("${pathContentMap[item]}");
29 | }
30 | &:not(:first-child) {
31 | d: path("");
32 | }
33 | }`;
34 | });
35 |
36 | return `.ant-notification, .ant-modal-confirm, .ant-message, .ant-popover, .ant-alert {${cssContent}
37 | }
38 | `;
39 | };
40 |
--------------------------------------------------------------------------------
/components/checkbox/demo/layout.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 5
3 | title:
4 | zh-CN: 布局
5 | en-US: Use with Grid
6 | ---
7 |
8 | ## zh-CN
9 |
10 | Checkbox.Group 内嵌 Checkbox 并与 Grid 组件一起使用,可以实现灵活的布局。
11 |
12 | ## en-US
13 |
14 | We can use Checkbox and Grid in Checkbox.Group, to implement complex layout.
15 |
16 | ```tsx
17 | import { Checkbox, Col, Row } from 'antd';
18 | import type { CheckboxValueType } from 'antd/es/checkbox/Group';
19 | import React from 'react';
20 |
21 | const onChange = (checkedValues: CheckboxValueType[]) => {
22 | console.log('checked = ', checkedValues);
23 | };
24 |
25 | const App: React.FC = () => (
26 |
27 |
28 |
29 | A
30 |
31 |
32 | B
33 |
34 |
35 | C
36 |
37 |
38 | D
39 |
40 |
41 | E
42 |
43 |
44 |
45 | );
46 |
47 | ReactDOM.render(, mountNode);
48 | ```
49 |
--------------------------------------------------------------------------------
/components/modal/demo/size.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 1
3 | title:
4 | zh-CN: 大小
5 | ---
6 |
7 | ## zh-CN
8 |
9 | large size 的弹框, 宽度为 900px 。
10 |
11 | ```jsx
12 | import { Modal, Button } from 'antd';
13 |
14 | class App extends React.Component {
15 | state = { visible: false };
16 |
17 | showModal = () => {
18 | this.setState({
19 | visible: true,
20 | });
21 | };
22 |
23 | handleOk = e => {
24 | console.log(e);
25 | this.setState({
26 | visible: false,
27 | });
28 | };
29 |
30 | handleCancel = e => {
31 | console.log(e);
32 | this.setState({
33 | visible: false,
34 | });
35 | };
36 |
37 | render() {
38 | return (
39 |
40 |
43 |
50 | Some contents...
51 | Some contents...
52 | Some contents...
53 |
54 |
55 | );
56 | }
57 | }
58 |
59 | ReactDOM.render(, mountNode);
60 | ```
61 |
--------------------------------------------------------------------------------
/components/modal/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | en-US: Basic Usage
5 | zh-CN: 基本用法
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 简单对话框
11 |
12 | ```jsx
13 | import { Modal, Button } from 'antd';
14 |
15 | class App extends React.Component {
16 | state = { visible: false };
17 |
18 | showModal = () => {
19 | this.setState({
20 | visible: true,
21 | });
22 | };
23 |
24 | handleOk = e => {
25 | console.log(e);
26 | this.setState({
27 | visible: false,
28 | });
29 | };
30 |
31 | handleCancel = e => {
32 | console.log(e);
33 | this.setState({
34 | visible: false,
35 | });
36 | };
37 |
38 | render() {
39 | return (
40 |
41 |
44 |
51 | Some contents...
52 | Some contents...
53 | Some contents...
54 |
55 |
56 | );
57 | }
58 | }
59 |
60 | ReactDOM.render(, mountNode);
61 | ```
62 |
--------------------------------------------------------------------------------
/components/button/demo/icon.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 4
3 | title:
4 | zh-CN: 自定义 Icon 按钮
5 | en-US: Icon Button
6 | ---
7 |
8 | ## zh-CN
9 | 普通类型按钮可添加 `dt-btn-custom-icon` 类名使用自定义 Icon 按钮和添加图标。
10 |
11 | 图标按钮可添加 `dt-btn-highlight` 类名使用自定义 Icon 按钮和添加图标。
12 | ```jsx
13 | import { Button } from 'antd';
14 | import { ReloadOutlined } from '@ant-design/icons';
15 |
16 | ReactDOM.render(
17 |
18 |
24 | } className="dt-btn-custom-icon">一级按钮
25 |
31 |
37 | } className="dt-btn-highlight">
38 |
,
39 | mountNode,
40 | );
41 | ```
42 |
--------------------------------------------------------------------------------
/theme/dt-theme/default/card.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | .ant-card {
4 | .ant-card-head {
5 | padding: 16px;
6 | border-bottom: 1px solid @grey_border;
7 | .ant-card-head-wrapper {
8 | .ant-card-head-title,
9 | .ant-card-extra {
10 | padding: 0;
11 | }
12 | }
13 | }
14 | .ant-card-body {
15 | padding: 16px;
16 | }
17 | }
18 |
19 | .ant-card-bordered {
20 | border: 1px solid @black_readonly;
21 | }
22 |
23 | .dt-card-shadow-bg {
24 | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.12);
25 | border: unset;
26 | }
27 |
28 | .ant-tabs-large > .ant-tabs-nav .ant-tabs-tab {
29 | padding: 16px;
30 | }
31 |
32 | .ant-card-contain-tabs {
33 | .ant-card-head {
34 | padding: 0;
35 | }
36 | .ant-card-head-wrapper {
37 | .ant-card-head-title, .ant-card-extra {
38 | margin: 16px 16px 0;
39 | line-height: 32px;
40 | }
41 | }
42 | .ant-tabs-nav {
43 | padding: 0 16px;
44 | }
45 | .ant-tabs-tab {
46 | color: @black_Desc;
47 | }
48 | }
49 |
50 | /* ————Custom ClassName———— */
51 | .dt-card-shadow {
52 | box-shadow: 0 2px 30px 0 #EAECF4;
53 | border: 1px solid #EAF0FC;
54 | }
55 |
--------------------------------------------------------------------------------
/theme/dt-theme/default/checkbox.less:
--------------------------------------------------------------------------------
1 | @import "../const.less";
2 |
3 | // checkbox
4 | .ant-checkbox-wrapper, .ant-checkbox {
5 | &:hover .ant-checkbox-inner {
6 | border-color: @hoverColor;
7 | }
8 | }
9 |
10 | .ant-checkbox-wrapper {
11 | line-height: @lineHeight;
12 | .ant-checkbox {
13 | top: 0.32em;
14 | .ant-checkbox-inner {
15 | border-radius: 2px;
16 | width: 16px;
17 | height: 16px;
18 | }
19 | & + span {
20 | line-height: 20px;
21 | }
22 | }
23 | }
24 |
25 | .ant-checkbox-wrapper-disabled {
26 | // 禁用已选择的 checkbox
27 | .ant-checkbox-checked {
28 | .ant-checkbox-inner {
29 | background-color: @black_border;
30 | &::after {
31 | border-color: @white;
32 | }
33 | }
34 | }
35 | // 禁用未选择的 checkbox
36 | .ant-checkbox-disabled {
37 | .ant-checkbox-inner {
38 | border-color: @black_border;
39 | }
40 | }
41 | }
42 |
43 | .ant-checkbox-input:focus + .ant-checkbox-inner {
44 | border-color: @primaryColor;
45 | }
46 |
47 | .ant-checkbox-group {
48 | & > .ant-checkbox-wrapper {
49 | margin-left: 0;
50 | margin-right: 16px;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/components/upload/demo/basic.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 0
3 | title:
4 | zh-CN: 点击上传
5 | en-US: Upload by clicking
6 | ---
7 |
8 | ## zh-CN
9 |
10 | 经典款式,用户点击按钮弹出文件选择框。
11 | ## 设计规范
12 | - 提示文本距离上传按钮间距8px,上传按钮样式同次要按钮Button的icon+文字按钮样式
13 | - 上传以后的回显部分,文件名字体12px Regular,色号#64698B,回显部分的矩形背景宽度默认264px,长度可根据场景自行调整,圆角半径4px,填充色#F5F5F8。
14 |
15 | ## en-US
16 |
17 | Classic mode. File selection dialog pops up when upload button is clicked.
18 |
19 | ```jsx
20 | import { Upload, message, Button } from 'antd';
21 | import { UploadOutlined } from '@ant-design/icons';
22 |
23 | const props = {
24 | name: 'file',
25 | action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76',
26 | headers: {
27 | authorization: 'authorization-text',
28 | },
29 | onChange(info) {
30 | if (info.file.status !== 'uploading') {
31 | console.log(info.file, info.fileList);
32 | }
33 | if (info.file.status === 'done') {
34 | message.success(`${info.file.name} file uploaded successfully`);
35 | } else if (info.file.status === 'error') {
36 | message.error(`${info.file.name} file upload failed.`);
37 | }
38 | },
39 | };
40 |
41 | ReactDOM.render(
42 |
43 | }> Click to Upload
44 | ,
45 | mountNode,
46 | );
47 | ```
48 |
--------------------------------------------------------------------------------
/components/tag/demo/color.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 3
3 | title:
4 | en-US: Color
5 | zh-CN: 多彩标签
6 | ---
7 |
8 | ## zh-CN
9 |
10 | - 支持多种预设色彩的标签样式,用作不同场景使用。如果预设值不能满足需求,可以设置为具体的色值。
11 |
12 | ```jsx
13 | import { Tag } from 'antd';
14 |
15 |
16 | ReactDOM.render(
17 |
18 |
预设色彩
19 |
magenta
20 |
red
21 |
volcano
22 |
orange
23 |
gold
24 |
lime
25 |
green
26 |
cyan
27 |
blue
28 |
geekblue
29 |
purple
30 |
31 |
success
32 |
processing
33 |
error
34 |
warning
35 |
default
36 |
37 |
自定义颜色
38 |
#f50
39 |
#2db7f5
40 |
#87d068
41 |
#108ee9
42 |
,
43 | mountNode,
44 | );
45 | ```
46 |
--------------------------------------------------------------------------------
/components/tab/demo/light.md:
--------------------------------------------------------------------------------
1 | ---
2 | order: 6
3 | title:
4 | zh-CN: 浅色背景下使用
5 | ---
6 |
7 | ## zh-CN
8 |
9 | 浅色背景下使用效果
10 |
11 | ## en-US
12 |
13 | Default activate first tab.
14 |
15 | ```jsx
16 | import { Tabs, Radio } from 'antd';
17 |
18 | const { TabPane } = Tabs;
19 |
20 | class SlidingTabsDemo extends React.Component {
21 | constructor(props) {
22 | super(props);
23 | this.state = {
24 | mode: 'top',
25 | };
26 | }
27 |
28 | handleModeChange = e => {
29 | const mode = e.target.value;
30 | this.setState({ mode });
31 | };
32 |
33 | render() {
34 | const { mode } = this.state;
35 | return (
36 |
37 |
38 | Horizontal
39 | Vertical
40 |
41 |
42 | {[...Array(30).keys()].map(i => (
43 |
44 | Content of tab {i}
45 |
46 | ))}
47 |
48 |
49 | );
50 | }
51 | }
52 |
53 | ReactDOM.render(, mountNode);
54 | ```
55 |
--------------------------------------------------------------------------------