From 112aaed5fb7a5ef5432a4eb3282ac6084872d90d Mon Sep 17 00:00:00 2001 From: Khalifa Lame Date: Tue, 5 Sep 2017 09:48:23 +0100 Subject: [PATCH 1/5] docs: update Layout English doc (#7461) Fixed typos. --- components/layout/index.en-US.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/components/layout/index.en-US.md b/components/layout/index.en-US.md index d5d0c391f5..843c57d367 100644 --- a/components/layout/index.en-US.md +++ b/components/layout/index.en-US.md @@ -11,23 +11,23 @@ Handling the overall layout of a page. ### Size -The first level of the navigation is placed near by a logo inclined left, and the secondary menu is placed inclined right. +The first level navigation is inclined left near a logo, and the secondary menu is inclined right. -- Top Navigation (almost systems): the height of the first level navigation `64px`, the second level of navigation `48px`. -- Top Navigation(contents page): the height of the first level navigation `80px`, the second level of navigation `56px`. +- Top Navigation (almost systems): the height of the first level navigation `64px`, the second level navigation `48px`. +- Top Navigation(contents page): the height of the first level navigation `80px`, the second level navigation `56px`. - Calculation formula of a top navigation: `48+8n`. -- Calculation formula a aside navigation: `200+8n`. +- Calculation formula of an aside navigation: `200+8n`. ### Interaction rules - The first level navigation and the last level navigation should be distincted by visualization; - The current item should have the highest priority of visualization; -- When the current navigation item is collapsed, the stlye of the current navigation item will be applied to the parent level of it; -- The left side navigation bar support for both the according and the expanding style, you can choose the one of it case by case. +- When the current navigation item is collapsed, the stlye of the current navigation item will be applied to its parent level; +- The left side navigation bar has support for both the accordion and expanding styles, you can choose the one that fits your case best. ## Visualization rules - Style of a navigation should conform to the level of it. + Style of a navigation should conform to the its level. - **Emphasis by colorblock** @@ -35,7 +35,7 @@ The first level of the navigation is placed near by a logo inclined left, and th - **The highlight match stick** - When background color is a light color, you can use this pattern for the current page navigation item, we recommed to use it for the last item of the navigation path. + When background color is a light color, you can use this pattern for the current page navigation item, we recommed using it for the last item of the navigation path. - **Hightlighted font** @@ -43,7 +43,7 @@ The first level of the navigation is placed near by a logo inclined left, and th - **Enlarge the size of the font** - `12px`、`14px` is a standard font size of navigations,14 is used for the first and the second level of the navigation. You can choose a approprigate font size in terms of the level of your navigation. + `12px`、`14px` is a standard font size of navigations,`14px` is used for the first and the second level of the navigation. You can choose a approprigate font size in terms of the level of your navigation. ## Component Overview @@ -53,7 +53,7 @@ The first level of the navigation is placed near by a logo inclined left, and th - `Content`: The content layout with default style, in which any element can be nested, and must be placed in `Layout`. - `Footer`: The bottom layout with default style, in which any element can be nested, and must be placed in `Layout`. -> Base on `flex layout`, please pay attention to the [compatibility](http://caniuse.com/#search=flex). +> Based on `flex layout`, please pay attention to the [compatibility](http://caniuse.com/#search=flex). ## API @@ -75,10 +75,10 @@ The wrapper. Property | Description | Type | Default -----|-----|-----|------ -style | to custom the styles | object | - +style | to customize the styles | object | - className | container className | string | - -> API of `Layout.Header` `Layout.Footer` `Layout.Content` is the same with `Layout`. +> APIs of `Layout.Header` `Layout.Footer` `Layout.Content` are the same as that of `Layout`. ### Layout.Sider @@ -90,12 +90,12 @@ collapsible | whether can be collapsed | boolean | false defaultCollapsed | to set the initial status | boolean | false | reverseArrow | reverse direction of arrow, for a sider that expands from the right | boolean | false | collapsed | to set the current status | boolean | - -onCollapse | the callback function, can be executed by clicking the trigger or activating the responsive layout | (collapsed, type) => {} | - +onCollapse | the callback function, executed by clicking the trigger or activating the responsive layout | (collapsed, type) => {} | - trigger | specify the customized trigger, set to null to hide the trigger | string\|ReactNode| - | width | width of the sidebar | number\|string | 200 collapsedWidth | width of the collapsed sidebar, by setting to `0` a special trigger will appear | number | 64 breakpoint | breakpoint of the responsive layout | Enum { 'xs', 'sm', 'md', 'lg', 'xl' } | - | -style | to custom the styles | object | - +style | to customize the styles | object | - className | container className | string | - #### breakpoint width From f48cf1df90be11634c5f1063b124828e104d0ad8 Mon Sep 17 00:00:00 2001 From: Khalifa Lame Date: Tue, 5 Sep 2017 09:50:27 +0100 Subject: [PATCH 2/5] docs: update Steps English doc (#7463) Added code tags to string values. --- components/steps/index.en-US.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/steps/index.en-US.md b/components/steps/index.en-US.md index 72de37df58..bc7efbb850 100644 --- a/components/steps/index.en-US.md +++ b/components/steps/index.en-US.md @@ -30,7 +30,7 @@ Property | Description | Type | Default current | to set the current step, counting from 0. You can overwrite this state by using `status` of `Step` | number | 0 status | to specify the status of current step, can be set to one of the following values: `wait` `process` `finish` `error` | string | `process` size | to specify the size of the step bar, `default` and `small` are currently supported | string | `default` -direction | to specify the direction of the step bar, `horizontal` and `vertical` are currently supported | string | horizontal +direction | to specify the direction of the step bar, `horizontal` and `vertical` are currently supported | string | `horizontal` progressDot | Steps with progress dot style, customize the progress dot by setting it to a function | Boolean or (iconDot, {index, status, title, description}) => ReactNode | false ### Steps.Step @@ -39,7 +39,7 @@ A single step in the step bar. Property | Description | Type | Default -----|-----|-----|------ -status | to specify the status. It will be automatically set by `current` of `Steps` if not configured. Optional values are: `wait` `process` `finish` `error` | string | wait +status | to specify the status. It will be automatically set by `current` of `Steps` if not configured. Optional values are: `wait` `process` `finish` `error` | string | `wait` title | title of the step | string\|ReactNode | - -description | detail of the step, optional property | string\|ReactNode | - +description | description of the step, optional property | string\|ReactNode | - icon | icon of the step, optional property | string\|ReactNode | - From 9667ec17bd5de9a1e659ac3d0bc30ef82786dde9 Mon Sep 17 00:00:00 2001 From: kuang Date: Tue, 5 Sep 2017 19:07:57 +0800 Subject: [PATCH 3/5] Patch 1 (#7471) * default value error https://github.com/react-component/dialog/blob/f10a2abbd82af40e9cc664bcb5e18f4e2ec30810/src/Modal.tsx#L53 * default value error --- components/modal/index.en-US.md | 2 +- components/modal/index.zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/modal/index.en-US.md b/components/modal/index.en-US.md index 9e3226837b..2780bf043e 100644 --- a/components/modal/index.en-US.md +++ b/components/modal/index.en-US.md @@ -65,7 +65,7 @@ The properties of the object are follows: | okText | Text of OK button | string | OK | | okType | type of the confirmation button | string | primary | | cancelText | Text of cancel button | string | Cancel | -| maskClosable | Determine whether to close the modal dialog when clicked mask of it. | Boolean | `false` | +| maskClosable | Determine whether to close the modal dialog when clicked mask of it. | Boolean | `true` | | zIndex | To set the `z-index` of Modal | Number | 1000 | All the `Modal.method`s will return a reference, and then we can close the popup by the reference. diff --git a/components/modal/index.zh-CN.md b/components/modal/index.zh-CN.md index 9abaab5f12..790c8d7910 100644 --- a/components/modal/index.zh-CN.md +++ b/components/modal/index.zh-CN.md @@ -63,7 +63,7 @@ title: Modal | okText | 确认按钮文字 | string | 确定 | | okType | 确认按钮类型 | string | primary | | cancelText | 取消按钮文字 | string | 取消 | -| maskClosable | 点击蒙层是否允许关闭 | Boolean | `false` | +| maskClosable | 点击蒙层是否允许关闭 | Boolean | `true` | | zIndex | 设置 Modal 的 `z-index` | Number | 1000 | 以上函数调用后,会返回一个引用,可以通过该引用关闭弹窗。 From a73d0504ca3ed9923e7e5a115ebf77bc7da99daa Mon Sep 17 00:00:00 2001 From: paranoidjk Date: Wed, 6 Sep 2017 09:19:35 +0800 Subject: [PATCH 4/5] site: dev use uncompressed bundle. close #7383 (#7472) --- package.json | 6 +++--- site/bisheng.config.js | 7 +++++++ site/theme/static/template.html | 5 +++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 02c683a3f6..6b145001af 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "babel-preset-react": "^6.16.0", "babel-preset-stage-0": "^6.16.0", "bezier-easing": "^2.0.3", - "bisheng": "^0.24.0", + "bisheng": "^0.25.0", "bisheng-plugin-antd": "^0.15.0", "bisheng-plugin-description": "^0.1.1", "bisheng-plugin-react": "^0.5.0", @@ -156,8 +156,8 @@ "dist": "antd-tools run dist", "compile": "antd-tools run compile", "tsc": "tsc", - "start": "bisheng start -c ./site/bisheng.config.js --no-livereload", - "site": "bisheng build --ssr -c ./site/bisheng.config.js", + "start": "cross-env NODE_ENV=development bisheng start -c ./site/bisheng.config.js --no-livereload", + "site": "cross-env NODE_ENV=production bisheng build --ssr -c ./site/bisheng.config.js", "deploy": "antd-tools run clean && npm run site && bisheng gh-pages --push-only", "pub": "antd-tools run pub", "prepublish": "antd-tools run guard", diff --git a/site/bisheng.config.js b/site/bisheng.config.js index 2a820dfe46..6cb560cc9c 100644 --- a/site/bisheng.config.js +++ b/site/bisheng.config.js @@ -1,6 +1,8 @@ const path = require('path'); const CSSSplitWebpackPlugin = require('css-split-webpack-plugin').default; +const isDev = process.env.NODE_ENV === 'development'; + module.exports = { port: 8001, source: { @@ -61,6 +63,8 @@ module.exports = { }; config.externals = { + react: 'React', + 'react-dom': 'ReactDOM', 'react-router-dom': 'ReactRouterDOM', }; @@ -76,4 +80,7 @@ module.exports = { return config; }, + htmlTemplateExtraData: { + isDev, + }, }; diff --git a/site/theme/static/template.html b/site/theme/static/template.html index 6664a229ae..92cd4abd30 100644 --- a/site/theme/static/template.html +++ b/site/theme/static/template.html @@ -110,6 +110,11 @@
+ {% if isDev %} + + {% else %} + + {% endif %} {{ content | safe }}
From 59193ef34a2c3e1a87a7a64867bcc2ac785258b2 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Wed, 6 Sep 2017 09:46:58 +0800 Subject: [PATCH 5/5] Revert "Patch 1 (#7471)" This reverts commit 9667ec17bd5de9a1e659ac3d0bc30ef82786dde9. --- components/modal/index.en-US.md | 2 +- components/modal/index.zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/modal/index.en-US.md b/components/modal/index.en-US.md index 2780bf043e..9e3226837b 100644 --- a/components/modal/index.en-US.md +++ b/components/modal/index.en-US.md @@ -65,7 +65,7 @@ The properties of the object are follows: | okText | Text of OK button | string | OK | | okType | type of the confirmation button | string | primary | | cancelText | Text of cancel button | string | Cancel | -| maskClosable | Determine whether to close the modal dialog when clicked mask of it. | Boolean | `true` | +| maskClosable | Determine whether to close the modal dialog when clicked mask of it. | Boolean | `false` | | zIndex | To set the `z-index` of Modal | Number | 1000 | All the `Modal.method`s will return a reference, and then we can close the popup by the reference. diff --git a/components/modal/index.zh-CN.md b/components/modal/index.zh-CN.md index 790c8d7910..9abaab5f12 100644 --- a/components/modal/index.zh-CN.md +++ b/components/modal/index.zh-CN.md @@ -63,7 +63,7 @@ title: Modal | okText | 确认按钮文字 | string | 确定 | | okType | 确认按钮类型 | string | primary | | cancelText | 取消按钮文字 | string | 取消 | -| maskClosable | 点击蒙层是否允许关闭 | Boolean | `true` | +| maskClosable | 点击蒙层是否允许关闭 | Boolean | `false` | | zIndex | 设置 Modal 的 `z-index` | Number | 1000 | 以上函数调用后,会返回一个引用,可以通过该引用关闭弹窗。