diff --git a/.circleci/config.yml b/.circleci/config.yml index 78236b7d2c..50b0be55df 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,7 +12,7 @@ jobs: # Chrome HeadlessBrowser is missing deps on Debian, see: # https://github.com/GoogleChrome/puppeteer/issues/290 - run: - name: Update Pupeteer Dependencies + name: Update Puppeteer Dependencies command: | sudo apt-get update sudo apt-get install --yes --quiet gconf-service libasound2 libatk1.0-0 libc6 \ diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 24f0abbde6..ae60318020 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -3,7 +3,7 @@ ✖ USAGE QUESTIONS → Use these dedicated resources: Docs - http://react.semantic-ui.com Chat - https://gitter.im/Semantic-Org/Semantic-UI-React - SO - http://stackoverflow.com/search?q=semantic-ui-react + SO - https://stackoverflow.com/questions/tagged/semantic-ui-react?sort=votes ✔ BUGS → This form is required: @@ -18,4 +18,4 @@ x.y.z ### Testcase [Fork, update, and replace this pen to show the bug]: -http://codepen.io/levithomason/pen/ZpBaJX +https://codesandbox.io/s/2l3n74j9y diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d931fa755..95b8111048 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,108 @@ # Change Log +## [v0.75.1](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.75.1) (2017-10-18) +[Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.75.0...v0.75.1) + +**Fixed bugs:** + +- Form.Button's content attribute [\#2211](https://github.com/Semantic-Org/Semantic-UI-React/issues/2211) +- Responsive: "ReferenceError: window is not defined" [\#2206](https://github.com/Semantic-Org/Semantic-UI-React/issues/2206) +- TextArea's autoHeight sometimes makes it taller than an actual text [\#2173](https://github.com/Semantic-Org/Semantic-UI-React/issues/2173) + +**Closed issues:** + +- Field Erro [\#2204](https://github.com/Semantic-Org/Semantic-UI-React/issues/2204) +- fix\(Form\): change "First Name" to "Last Name" [\#2202](https://github.com/Semantic-Org/Semantic-UI-React/issues/2202) +- Weird interaction with Portal.js and React.cloneElement [\#2195](https://github.com/Semantic-Org/Semantic-UI-React/issues/2195) + +**Merged pull requests:** + +- fix\(FormField\): pass content prop through [\#2212](https://github.com/Semantic-Org/Semantic-UI-React/pull/2212) ([levithomason](https://github.com/levithomason)) +- fix\(Responsive\): fix usage of `window` for SSR [\#2209](https://github.com/Semantic-Org/Semantic-UI-React/pull/2209) ([layershifter](https://github.com/layershifter)) +- docs\(Form\): fix typo in label [\#2208](https://github.com/Semantic-Org/Semantic-UI-React/pull/2208) ([layershifter](https://github.com/layershifter)) +- feat\(typings\): export DropdownOnSearchChangeData [\#2205](https://github.com/Semantic-Org/Semantic-UI-React/pull/2205) ([pierre-H](https://github.com/pierre-H)) +- chore\(circleci\): fix typo in a step name [\#2200](https://github.com/Semantic-Org/Semantic-UI-React/pull/2200) ([WiNloSt](https://github.com/WiNloSt)) +- fix\(TextArea\): fix autoHeight calculate wrong value on long text [\#2199](https://github.com/Semantic-Org/Semantic-UI-React/pull/2199) ([WiNloSt](https://github.com/WiNloSt)) + +## [v0.75.0](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.75.0) (2017-10-16) +[Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.74.2...v0.75.0) + +**Implemented enhancements:** + +- feat\(Message\): add `top` to possible values of `attached` [\#2197](https://github.com/Semantic-Org/Semantic-UI-React/pull/2197) ([layershifter](https://github.com/layershifter)) +- breaking\(Step\): refactor Step to use factories, update content props, add missing props [\#2145](https://github.com/Semantic-Org/Semantic-UI-React/pull/2145) ([layershifter](https://github.com/layershifter)) +- feat\(Ref\): add component [\#2142](https://github.com/Semantic-Org/Semantic-UI-React/pull/2142) ([layershifter](https://github.com/layershifter)) + +**Fixed bugs:** + +- Dropdown: Does not display value on enter when using search selection [\#2161](https://github.com/Semantic-Org/Semantic-UI-React/issues/2161) +- Modal: Scrolling doesn't work properly after reopen [\#2150](https://github.com/Semantic-Org/Semantic-UI-React/issues/2150) +- Search: the `id` prop on SearchResult should accept `string` as value [\#2135](https://github.com/Semantic-Org/Semantic-UI-React/issues/2135) +- Transition: Transition.Group doesn't perform transitions correctly [\#2127](https://github.com/Semantic-Org/Semantic-UI-React/issues/2127) +- docs\(Dropdown\): Recent update breaks DropdownExampleRemote [\#2125](https://github.com/Semantic-Org/Semantic-UI-React/issues/2125) + +**Closed issues:** + +- docs\(ButtonExampleLabeledIcon\): buttons aren't labeled [\#2190](https://github.com/Semantic-Org/Semantic-UI-React/issues/2190) +- Transition Group example in docs doesn't reflect removed users [\#2160](https://github.com/Semantic-Org/Semantic-UI-React/issues/2160) +- Several warnings on Attached Layout [\#2154](https://github.com/Semantic-Org/Semantic-UI-React/issues/2154) +- Docs: local docs site is broken with React 15.6.2 [\#2153](https://github.com/Semantic-Org/Semantic-UI-React/issues/2153) +- fix\(Container\): your description [\#2151](https://github.com/Semantic-Org/Semantic-UI-React/issues/2151) +- Allow multiple labels for Input [\#2148](https://github.com/Semantic-Org/Semantic-UI-React/issues/2148) +- Popup closing Modal?? [\#2147](https://github.com/Semantic-Org/Semantic-UI-React/issues/2147) +- Bug on Dropdown.componentWillUnmount\(\) [\#2120](https://github.com/Semantic-Org/Semantic-UI-React/issues/2120) +- Multiple modals scrolling bug [\#1157](https://github.com/Semantic-Org/Semantic-UI-React/issues/1157) + +**Merged pull requests:** + +- docs\(ISSUE\_TEMPLATE\): update link to SO and code template [\#2198](https://github.com/Semantic-Org/Semantic-UI-React/pull/2198) ([layershifter](https://github.com/layershifter)) +- style\(mixed\): fix spelling and grammar issues in comments and tests [\#2196](https://github.com/Semantic-Org/Semantic-UI-React/pull/2196) ([direvus](https://github.com/direvus)) +- docs\(Button\): add missing props to example [\#2191](https://github.com/Semantic-Org/Semantic-UI-React/pull/2191) ([patrikmolsson](https://github.com/patrikmolsson)) +- fix\(typings\): fix definition for Accordion.Accordion [\#2180](https://github.com/Semantic-Org/Semantic-UI-React/pull/2180) ([swASO](https://github.com/swASO)) +- docs\(README\): add aircip.ir and platform.nazarbazaar.ir to `built with` section [\#2179](https://github.com/Semantic-Org/Semantic-UI-React/pull/2179) ([ali-master](https://github.com/ali-master)) +- style\(Form\): fix typo in examples [\#2178](https://github.com/Semantic-Org/Semantic-UI-React/pull/2178) ([abhn](https://github.com/abhn)) +- docs\(examples\): fix webpack.config.js [\#2171](https://github.com/Semantic-Org/Semantic-UI-React/pull/2171) ([armendarabyan](https://github.com/armendarabyan)) +- feat\(typings\): add icon names for Icon [\#2167](https://github.com/Semantic-Org/Semantic-UI-React/pull/2167) ([vincealdrin](https://github.com/vincealdrin)) +- fix\(Form\): don't prevent form submission when action='' [\#2165](https://github.com/Semantic-Org/Semantic-UI-React/pull/2165) ([eug48](https://github.com/eug48)) +- fix\(Dropdown\): update text when item selected with keyboard [\#2162](https://github.com/Semantic-Org/Semantic-UI-React/pull/2162) ([ayastreb](https://github.com/ayastreb)) +- docs\(Portal\): remove useless props in PortalExampleControlled [\#2159](https://github.com/Semantic-Org/Semantic-UI-React/pull/2159) ([layershifter](https://github.com/layershifter)) +- test\(typings\): restore assertion for typings and propTypes order [\#2158](https://github.com/Semantic-Org/Semantic-UI-React/pull/2158) ([layershifter](https://github.com/layershifter)) +- docs\(Portal\): add controlled example [\#2156](https://github.com/Semantic-Org/Semantic-UI-React/pull/2156) ([layershifter](https://github.com/layershifter)) +- fix\(Modal\): set scrolling body class on re-open [\#2152](https://github.com/Semantic-Org/Semantic-UI-React/pull/2152) ([ayastreb](https://github.com/ayastreb)) +- test\(common\): support isConformant for portals [\#2146](https://github.com/Semantic-Org/Semantic-UI-React/pull/2146) ([levithomason](https://github.com/levithomason)) +- test\(mixed\): add test for `content` prop, remove useless tests [\#2144](https://github.com/Semantic-Org/Semantic-UI-React/pull/2144) ([layershifter](https://github.com/layershifter)) +- breaking\(Statistic\): refactor Statistic to use factories, update content props [\#2143](https://github.com/Semantic-Org/Semantic-UI-React/pull/2143) ([layershifter](https://github.com/layershifter)) +- perf\(Breadcrumb\): move computer of ElementType to method on BreadcrumbSection [\#2141](https://github.com/Semantic-Org/Semantic-UI-React/pull/2141) ([layershifter](https://github.com/layershifter)) +- fix\(Search\): simplify propTypes on SearchResult [\#2138](https://github.com/Semantic-Org/Semantic-UI-React/pull/2138) ([layershifter](https://github.com/layershifter)) +- docs\(readme\): url update in built with [\#2134](https://github.com/Semantic-Org/Semantic-UI-React/pull/2134) ([GautierT](https://github.com/GautierT)) +- chore\(package\): update to react 16 [\#2131](https://github.com/Semantic-Org/Semantic-UI-React/pull/2131) ([layershifter](https://github.com/layershifter)) +- fix\(Transition\): fix component wrapping inside Transition.Group [\#2130](https://github.com/Semantic-Org/Semantic-UI-React/pull/2130) ([layershifter](https://github.com/layershifter)) +- docs\(Dropdown\): fix DropdownRemoteExample [\#2126](https://github.com/Semantic-Org/Semantic-UI-React/pull/2126) ([patrikmolsson](https://github.com/patrikmolsson)) +- docs\(readme\): add amazon publishing to built with [\#2122](https://github.com/Semantic-Org/Semantic-UI-React/pull/2122) ([austinfox](https://github.com/austinfox)) +- perf\(lodash\): remove \_.omit and \_.isEqual [\#2111](https://github.com/Semantic-Org/Semantic-UI-React/pull/2111) ([levithomason](https://github.com/levithomason)) +- fix\(Modal\): add/remove dimmer classes in raf [\#2010](https://github.com/Semantic-Org/Semantic-UI-React/pull/2010) ([levithomason](https://github.com/levithomason)) + +## [v0.74.2](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.74.2) (2017-09-25) +[Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.74.1...v0.74.2) + +**Implemented enhancements:** + +- Dropdown: `selectOnKeydown` option from docs is not implemented [\#1993](https://github.com/Semantic-Org/Semantic-UI-React/issues/1993) + +**Fixed bugs:** + +- Dropdown: Error occurred with keyboard action [\#1875](https://github.com/Semantic-Org/Semantic-UI-React/issues/1875) + +**Closed issues:** + +- Request: Search Dropdown onAddItem should optionally prevent onChange call [\#1186](https://github.com/Semantic-Org/Semantic-UI-React/issues/1186) + +**Merged pull requests:** + +- fix\(Dropdown\): omit `moveSelectionBy\(\)` when `options` aren't defined [\#2119](https://github.com/Semantic-Org/Semantic-UI-React/pull/2119) ([layershifter](https://github.com/layershifter)) +- fix\(Sticky\): `scrollContext` is used from actual props, rename doc examples [\#2118](https://github.com/Semantic-Org/Semantic-UI-React/pull/2118) ([layershifter](https://github.com/layershifter)) +- fix\(eventStack\): correct handling of removed targets [\#2117](https://github.com/Semantic-Org/Semantic-UI-React/pull/2117) ([layershifter](https://github.com/layershifter)) + ## [v0.74.1](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.74.1) (2017-09-24) [Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.74.0...v0.74.1) @@ -265,7 +368,6 @@ - Tab: data.activeIndex is overwritten in onTabChange for controlled Tab [\#1888](https://github.com/Semantic-Org/Semantic-UI-React/issues/1888) - Form: action prop is missing in generated markup [\#1882](https://github.com/Semantic-Org/Semantic-UI-React/issues/1882) -- fix\(Form\): Disable Form.Select open dropdown in onfocus event [\#1115](https://github.com/Semantic-Org/Semantic-UI-React/issues/1115) **Closed issues:** @@ -281,7 +383,6 @@ - feat\(FormField\): pass disabled prop to form control [\#1889](https://github.com/Semantic-Org/Semantic-UI-React/pull/1889) ([levithomason](https://github.com/levithomason)) - fix\(Form\): fix handling of `action` prop [\#1887](https://github.com/Semantic-Org/Semantic-UI-React/pull/1887) ([layershifter](https://github.com/layershifter)) - tests\(shorthand\): allow non-strict assert [\#1845](https://github.com/Semantic-Org/Semantic-UI-React/pull/1845) ([layershifter](https://github.com/layershifter)) -- docs\(layouts\): add layout examples [\#1039](https://github.com/Semantic-Org/Semantic-UI-React/pull/1039) ([iamcaleberic](https://github.com/iamcaleberic)) ## [v0.71.1](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.71.1) (2017-07-16) [Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.71.0...v0.71.1) @@ -794,7 +895,6 @@ - feat\(Menu\): Add missing MenuItem `disabled` prop [\#1363](https://github.com/Semantic-Org/Semantic-UI-React/issues/1363) - fix\(Form\): Remove Form `onSubmit` prop and serializer [\#1362](https://github.com/Semantic-Org/Semantic-UI-React/issues/1362) - feat\(Card\): Add `link` prop to Card [\#1350](https://github.com/Semantic-Org/Semantic-UI-React/issues/1350) -- fix\(typings\): unable to set many typical html element props [\#1072](https://github.com/Semantic-Org/Semantic-UI-React/issues/1072) **Fixed bugs:** @@ -864,7 +964,6 @@ - docs\(IconSearch\): fix copy to clipboard [\#1317](https://github.com/Semantic-Org/Semantic-UI-React/pull/1317) ([levithomason](https://github.com/levithomason)) - test\(ACC\): use deterministic test props [\#1309](https://github.com/Semantic-Org/Semantic-UI-React/pull/1309) ([levithomason](https://github.com/levithomason)) - tests\(mixed\): remove usage of `meta.props` [\#1239](https://github.com/Semantic-Org/Semantic-UI-React/pull/1239) ([layershifter](https://github.com/layershifter)) -- fix\(Button\): Disabled Button with Label leaves Label enabled [\#1035](https://github.com/Semantic-Org/Semantic-UI-React/pull/1035) ([luski](https://github.com/luski)) ## [v0.64.8](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.64.8) (2017-02-11) [Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.64.7...v0.64.8) @@ -919,7 +1018,6 @@ - fix\(Portal\): focus is stolen when clicking away to close [\#1271](https://github.com/Semantic-Org/Semantic-UI-React/issues/1271) - bug\(Menu\): incorrect inheritance in MenuItemProps typings [\#1262](https://github.com/Semantic-Org/Semantic-UI-React/issues/1262) - Bug\(Popup\): Clicking on another Popup's trigger doesn't close open Popups. [\#1251](https://github.com/Semantic-Org/Semantic-UI-React/issues/1251) -- Popup doesn't work with modal [\#1076](https://github.com/Semantic-Org/Semantic-UI-React/issues/1076) **Closed issues:** @@ -984,7 +1082,6 @@ **Implemented enhancements:** - feat\(Form\): add `inverted` boolean property [\#1212](https://github.com/Semantic-Org/Semantic-UI-React/issues/1212) -- No way to make search input fluid [\#1104](https://github.com/Semantic-Org/Semantic-UI-React/issues/1104) **Fixed bugs:** @@ -1028,7 +1125,6 @@ - docs\(ComponentProps\): show func signatures [\#1194](https://github.com/Semantic-Org/Semantic-UI-React/pull/1194) ([levithomason](https://github.com/levithomason)) - docs\(Popup\): Changed description of "hideOnScroll" prop [\#1193](https://github.com/Semantic-Org/Semantic-UI-React/pull/1193) ([jos0003](https://github.com/jos0003)) - react-router@3.0.2 untested ⚠️ [\#1178](https://github.com/Semantic-Org/Semantic-UI-React/pull/1178) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) -- feat\(Table\): add `sortable` and `sorted` props [\#1109](https://github.com/Semantic-Org/Semantic-UI-React/pull/1109) ([svrcekmichal](https://github.com/svrcekmichal)) ## [v0.64.2](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.64.2) (2017-01-18) [Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.64.1...v0.64.2) @@ -1068,21 +1164,15 @@ **Fixed bugs:** - Typings: Modal [\#1152](https://github.com/Semantic-Org/Semantic-UI-React/issues/1152) -- fix\(Table\): Cannot convert a Symbol value to a string [\#1057](https://github.com/Semantic-Org/Semantic-UI-React/issues/1057) **Merged pull requests:** - fix\(typings\): fix Modal mountnode -\> mountNode [\#1153](https://github.com/Semantic-Org/Semantic-UI-React/pull/1153) ([levithomason](https://github.com/levithomason)) - feat\(typings\): add closeOnBlur and openOnFocus [\#1151](https://github.com/Semantic-Org/Semantic-UI-React/pull/1151) ([levithomason](https://github.com/levithomason)) -- breaking\(shorthand\): only generate keys from strings and numbers [\#1062](https://github.com/Semantic-Org/Semantic-UI-React/pull/1062) ([levithomason](https://github.com/levithomason)) ## [v0.63.6](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.63.6) (2017-01-11) [Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.63.5...v0.63.6) -**Implemented enhancements:** - -- Typings: allow including only used components in app bundle [\#1080](https://github.com/Semantic-Org/Semantic-UI-React/issues/1080) - **Closed issues:** - fix\(Menu\): blur error [\#1145](https://github.com/Semantic-Org/Semantic-UI-React/issues/1145) @@ -1093,9 +1183,6 @@ - Dropdown: combine allowAdditions\(selection, search\) with Dropdown Content [\#1137](https://github.com/Semantic-Org/Semantic-UI-React/issues/1137) - If a Popup has child popup, modal or other widgets, the parent popup closes [\#1125](https://github.com/Semantic-Org/Semantic-UI-React/issues/1125) - support other labelable controls in Form.Field in addition to Checkbox and Radio [\#1122](https://github.com/Semantic-Org/Semantic-UI-React/issues/1122) -- Add key to options in Dropdown menu [\#1120](https://github.com/Semantic-Org/Semantic-UI-React/issues/1120) -- Modal triggered from menu item issues [\#1106](https://github.com/Semantic-Org/Semantic-UI-React/issues/1106) -- Typings: Missing Typings for Components Portal, Reveal and Embed [\#1096](https://github.com/Semantic-Org/Semantic-UI-React/issues/1096) **Merged pull requests:** @@ -1106,139 +1193,34 @@ - Update react-dom to version 15.4.2 🚀 [\#1129](https://github.com/Semantic-Org/Semantic-UI-React/pull/1129) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) - Update react-addons-test-utils to version 15.4.2 🚀 [\#1128](https://github.com/Semantic-Org/Semantic-UI-React/pull/1128) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) - fix\(Search\): Search input can be made fluid [\#1123](https://github.com/Semantic-Org/Semantic-UI-React/pull/1123) ([Rohanhacker](https://github.com/Rohanhacker)) -- feat\(typings\): support modular imports [\#1121](https://github.com/Semantic-Org/Semantic-UI-React/pull/1121) ([sagax85](https://github.com/sagax85)) -- react-ace@4.1.1 untested ⚠️ [\#1119](https://github.com/Semantic-Org/Semantic-UI-React/pull/1119) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) -- webpack-hot-middleware@2.15.0 untested ⚠️ [\#1116](https://github.com/Semantic-Org/Semantic-UI-React/pull/1116) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) -- feat\(Dropdown\): add `openOnFocus` and `closeOnBlur` [\#1101](https://github.com/Semantic-Org/Semantic-UI-React/pull/1101) ([tarang9211](https://github.com/tarang9211)) ## [v0.63.5](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.63.5) (2017-01-03) [Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.63.4...v0.63.5) -**Closed issues:** - -- Steps overflow container when cummulative step width exceeds container width [\#1114](https://github.com/Semantic-Org/Semantic-UI-React/issues/1114) -- Pagination Support for Table Component [\#1110](https://github.com/Semantic-Org/Semantic-UI-React/issues/1110) -- Typings: dimmer property in ImageProps is not optional. [\#1102](https://github.com/Semantic-Org/Semantic-UI-React/issues/1102) - -**Merged pull requests:** - -- feat\(Dropdown\): remove noResultsMessage when null [\#1113](https://github.com/Semantic-Org/Semantic-UI-React/pull/1113) ([levithomason](https://github.com/levithomason)) -- cross-env@3.1.4 untested ⚠️ [\#1112](https://github.com/Semantic-Org/Semantic-UI-React/pull/1112) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) -- babel-standalone@6.21.1 untested ⚠️ [\#1111](https://github.com/Semantic-Org/Semantic-UI-React/pull/1111) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) -- js-beautify@1.6.8 untested ⚠️ [\#1107](https://github.com/Semantic-Org/Semantic-UI-React/pull/1107) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) -- fix\(typings\): make dimmer in ImageProps optional [\#1103](https://github.com/Semantic-Org/Semantic-UI-React/pull/1103) ([rokoroku](https://github.com/rokoroku)) - ## [v0.63.4](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.63.4) (2016-12-31) [Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.63.3...v0.63.4) -**Implemented enhancements:** - -- Typings: Add Comments from Source Files [\#1075](https://github.com/Semantic-Org/Semantic-UI-React/issues/1075) - -**Merged pull requests:** - -- fix\(tabIndex\): use -1 when disabled, allow override [\#1100](https://github.com/Semantic-Org/Semantic-UI-React/pull/1100) ([levithomason](https://github.com/levithomason)) -- yargs@6.6.0 untested ⚠️ [\#1097](https://github.com/Semantic-Org/Semantic-UI-React/pull/1097) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) - ## [v0.63.3](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.63.3) (2016-12-30) [Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.63.2...v0.63.3) -**Implemented enhancements:** - -- Typescript: Dimmer component doesn't exist. [\#1091](https://github.com/Semantic-Org/Semantic-UI-React/issues/1091) -- feat\(typings\): Add declarations for Dimmer [\#1092](https://github.com/Semantic-Org/Semantic-UI-React/pull/1092) ([wcatron](https://github.com/wcatron)) -- feat\(Grid\): add `container` prop [\#1085](https://github.com/Semantic-Org/Semantic-UI-React/pull/1085) ([tarang9211](https://github.com/tarang9211)) - -**Fixed bugs:** - -- Table.Cell with child {0} doesn't render [\#1069](https://github.com/Semantic-Org/Semantic-UI-React/issues/1069) - -**Merged pull requests:** - -- docs\(Introduction\): Fix augmentation example [\#1094](https://github.com/Semantic-Org/Semantic-UI-React/pull/1094) ([radekmie](https://github.com/radekmie)) -- fix\(Components\): render with children or shorthand of `0` [\#1077](https://github.com/Semantic-Org/Semantic-UI-React/pull/1077) ([lusarz](https://github.com/lusarz)) - ## [v0.63.2](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.63.2) (2016-12-27) [Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.63.1...v0.63.2) -**Closed issues:** - -- Allow including only used LODASH functions in app bundle [\#1082](https://github.com/Semantic-Org/Semantic-UI-React/issues/1082) -- Dropdown onAddItem gets called on value change when text and value aren't equal [\#1064](https://github.com/Semantic-Org/Semantic-UI-React/issues/1064) -- Examples importing `../common` cannot be edited [\#1037](https://github.com/Semantic-Org/Semantic-UI-React/issues/1037) - -**Merged pull requests:** - -- docs\(Dropdown\): added comments for shape of options [\#1086](https://github.com/Semantic-Org/Semantic-UI-React/pull/1086) ([fobbyal](https://github.com/fobbyal)) -- fix\(typings\): Add comments from source and fix minor inconsistencies [\#1084](https://github.com/Semantic-Org/Semantic-UI-React/pull/1084) ([sagax85](https://github.com/sagax85)) -- feat\(TextArea\): add `autoHeight` prop [\#1083](https://github.com/Semantic-Org/Semantic-UI-React/pull/1083) ([luski](https://github.com/luski)) -- fix\(docs\): importing `../common` on doc site can be edited [\#1078](https://github.com/Semantic-Org/Semantic-UI-React/pull/1078) ([lusarz](https://github.com/lusarz)) -- react-docgen@2.13.0 untested ⚠️ [\#1074](https://github.com/Semantic-Org/Semantic-UI-React/pull/1074) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) -- fix\(Dropdown\): prevent overzealous onAddItem calls [\#1071](https://github.com/Semantic-Org/Semantic-UI-React/pull/1071) ([keeslinp](https://github.com/keeslinp)) - ## [v0.63.1](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.63.1) (2016-12-21) [Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.63.0...v0.63.1) -**Closed issues:** - -- \[Question\] Form.Field control={Checkbox} vs Form.Checkbox [\#1070](https://github.com/Semantic-Org/Semantic-UI-React/issues/1070) -- manage the popup appearance and BG click to close [\#1067](https://github.com/Semantic-Org/Semantic-UI-React/issues/1067) - -**Merged pull requests:** - -- fix\(typings\): use boolean `vertical` Segment attribute [\#1073](https://github.com/Semantic-Org/Semantic-UI-React/pull/1073) ([dennari](https://github.com/dennari)) -- feat\(AutoControlledComponent\): Default values [\#1066](https://github.com/Semantic-Org/Semantic-UI-React/pull/1066) ([jeffcarbs](https://github.com/jeffcarbs)) -- node-sass@4.1.1 untested ⚠️ [\#1063](https://github.com/Semantic-Org/Semantic-UI-React/pull/1063) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) -- debug@2.4.5 untested ⚠️ [\#1049](https://github.com/Semantic-Org/Semantic-UI-React/pull/1049) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) - ## [v0.63.0](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.63.0) (2016-12-20) [Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.62.4...v0.63.0) -**Merged pull requests:** - -- docs\(Statistic\): add description [\#1060](https://github.com/Semantic-Org/Semantic-UI-React/pull/1060) ([levithomason](https://github.com/levithomason)) -- docs\(StatisticGroup\): add color, size, and inverted examples [\#1058](https://github.com/Semantic-Org/Semantic-UI-React/pull/1058) ([tarang9211](https://github.com/tarang9211)) - ## [v0.62.4](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.62.4) (2016-12-19) [Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.62.3...v0.62.4) -**Closed issues:** - -- Popup documentation page is broken [\#1055](https://github.com/Semantic-Org/Semantic-UI-React/issues/1055) -- Modal doesn't support animations [\#1054](https://github.com/Semantic-Org/Semantic-UI-React/issues/1054) -- Dropdown selection sets value on blur [\#1052](https://github.com/Semantic-Org/Semantic-UI-React/issues/1052) -- react.semantic-ui.com doesn't work ! [\#1051](https://github.com/Semantic-Org/Semantic-UI-React/issues/1051) -- Sidebar docs's broken [\#1048](https://github.com/Semantic-Org/Semantic-UI-React/issues/1048) - -**Merged pull requests:** - -- fix\(docs\): more permissive exampleContext regex [\#1056](https://github.com/Semantic-Org/Semantic-UI-React/pull/1056) ([levithomason](https://github.com/levithomason)) -- feat\(typings\): Added sidebar, Update to Search and Textarea [\#1053](https://github.com/Semantic-Org/Semantic-UI-React/pull/1053) ([koenvg](https://github.com/koenvg)) - ## [v0.62.3](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.62.3) (2016-12-17) [Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.62.2...v0.62.3) -**Merged pull requests:** - -- Feat\(typings\): Added typings for Radio, Confirm, Select and Textarea [\#1047](https://github.com/Semantic-Org/Semantic-UI-React/pull/1047) ([koenvg](https://github.com/koenvg)) -- fix\(dropdown\): clear value when dropdown is blurred [\#1046](https://github.com/Semantic-Org/Semantic-UI-React/pull/1046) ([vageeshb](https://github.com/vageeshb)) -- babel-core@6.21.0 untested ⚠️ [\#1045](https://github.com/Semantic-Org/Semantic-UI-React/pull/1045) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) -- fix\(typings\): fix typings spelling on `Accordion` [\#1044](https://github.com/Semantic-Org/Semantic-UI-React/pull/1044) ([ericl85](https://github.com/ericl85)) -- feat\(Checkbox\): Indeterminate state [\#1043](https://github.com/Semantic-Org/Semantic-UI-React/pull/1043) ([jeffcarbs](https://github.com/jeffcarbs)) -- fix\(docs\): Fix check icon [\#1042](https://github.com/Semantic-Org/Semantic-UI-React/pull/1042) ([jeffcarbs](https://github.com/jeffcarbs)) - ## [v0.62.2](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.62.2) (2016-12-16) [Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.62.1...v0.62.2) -**Closed issues:** - -- fix\(Table\): Keys warning when using renderBodyRow [\#1030](https://github.com/Semantic-Org/Semantic-UI-React/issues/1030) - -**Merged pull requests:** - -- fix\(Header\): Remove duplicate class [\#1040](https://github.com/Semantic-Org/Semantic-UI-React/pull/1040) ([jeffcarbs](https://github.com/jeffcarbs)) -- feat\(docs\): Active className on Sidebar item [\#1031](https://github.com/Semantic-Org/Semantic-UI-React/pull/1031) ([pradel](https://github.com/pradel)) - ## [v0.62.1](https://github.com/Semantic-Org/Semantic-UI-React/tree/v0.62.1) (2016-12-10) [Full Changelog](https://github.com/Semantic-Org/Semantic-UI-React/compare/v0.62.0...v0.62.1) diff --git a/README.md b/README.md index 9fdd3c3538..b2de86c744 100644 --- a/README.md +++ b/README.md @@ -40,10 +40,43 @@ Hey, we're in development. Prior to reaching [v1.0.0][6]: See the [Documentation][2] for an introduction, usage information, and extensive examples. +## Built With Semantic UI React + + + + + + + +These great products are built on Semantic UI React. Add yours [here][22]. + +- Netflix's Edge Developer Experience team's numerous [internal apps](https://github.com/Semantic-Org/Semantic-UI-React/issues/1604) +- Amazon Publishing — the full-service publisher of Amazon — [APub.com](https://amazonpublishing.amazon.com) +- http://stoplight.io +- https://roadmap.space +- https://edabit.com +- https://blackship.com +- http://www.brewhousesolutions.com +- https://www.seeuletter.com +- https://www.stackforge.co +- https://sublimefund.org +- https://thefaithcircle.com +- https://appfollow.io +- http://according.to.localsourc.es +- http://www.aircip.ir +- http://platform.nazarbazaar.ir +- https://build.games + ## Example Projects This is a listing of example projects and guides that will help you integrate Semantic UI React into your new or existing projects. +### [webpack1][28] +Our example project right [here][28] in this repo. + +### [webpack2][29] +Our example project right [here][29] in this repo. + ### [react-semantic.ui-starter][102] Production-ready, performance-first, optimized, robust, fully-featured boilerplate/example for your new Progressive Web App. @@ -67,24 +100,6 @@ Here are some helpful links: - [Building CSS with Meteor][26] - [Creating a standalone theme][25] -## Built With Semantic UI React - -These great products are built on Semantic UI React. Add yours [here][22]. - -- Netflix's Edge Developer Experience team's numerous [internal apps](https://github.com/Semantic-Org/Semantic-UI-React/issues/1604) -- http://stoplight.io -- https://roadmap.space -- https://edabit.com -- https://blackship.com -- http://www.brewhousesolutions.com -- https://www.lifebot.fr -- https://www.stackforge.co -- https://sublimefund.org -- https://thefaithcircle.com -- https://appfollow.io -- http://according.to.localsourc.es - - ## Voice Your Opinion Help shape this library by weighing in on our [RFC (request for comments)][19] issues. @@ -93,9 +108,9 @@ Help shape this library by weighing in on our [RFC (request for comments)][19] i Our [CONTRIBUTING.md][1] is a step-by-step setup and development guide. It is meant to be read from top to bottom. Once you're up to speed, each issue here includes more information on how you can help: -### [Good First Contribution][21] +### [Good First Issue][21] -Issues labeled [`good first contribution`][21] are a great way to ease into development on this project. +Issues labeled [`good first issue`][21] are a great way to ease into development on this project. ### [Missing Components][17] @@ -105,7 +120,7 @@ We're seeking component parity with Semantic UI, plus some addons. There is an Any other issue labeled [`help wanted`][4] is ready for a PR. -## Support +## 100% Semantic UI Support | Elements | Collections | Views | Modules | Behaviors | |-----------------|-----------------|-----------------|-----------------|--------------------| @@ -125,9 +140,7 @@ Any other issue labeled [`help wanted`][4] is ready for a PR. | ✓ Segment | | | ✓ Tab | | | ✓ Step | | | ✓ Transition | | -## Our Principles - -[TechnologyAdvice][9] has been [dogfooding][10] Semantic UI React in production since fall of 2015. These are the guiding principles that have developed as a result: +## Principles - No jQuery dependency - No animation dependencies @@ -148,20 +161,7 @@ yarn release:minor yarn release:patch ``` -Deploy the docs: - -```sh -yarn deploy:docs -``` - -Update the changelog (requires [github_changelog_generator][15]): - -```sh -github_changelog_generator -git add CHANGELOG.md -git commit -m 'docs(changelog): update changelog [ci skip]' -git push -``` +Releasing will update the changelog which requires [github_changelog_generator][15]. ## Credit @@ -169,8 +169,8 @@ Originally made for [@TechnologyAdvice][9] by [@levithomason][26]. Big thanks to our [contributors][20], especially: -- @layershifter for bringing momentum and continual support -- @jcarbo for thoughtful engineering and continual support +- [@layershifter][27] for essentially taking over during [@levithomason][26]'s unavailability +- @jcarbo for thoughtful engineering - @jamiehill for early engineering and support [1]: https://github.com/Semantic-Org/Semantic-UI-React/blob/master/.github/CONTRIBUTING.md @@ -192,13 +192,16 @@ Big thanks to our [contributors][20], especially: [18]: https://github.com/Semantic-Org/Semantic-UI-React/blob/master/CHANGELOG.md [19]: https://github.com/Semantic-Org/Semantic-UI-React/issues?q=is%3Aopen+RFC+label%3ARFC [20]: https://github.com/Semantic-Org/Semantic-UI-React/graphs/contributors -[21]: https://github.com/Semantic-Org/Semantic-UI-React/labels/good%20first%20contribution +[21]: https://github.com/Semantic-Org/Semantic-UI-React/labels/good%20first%20issue [22]: https://github.com/Semantic-Org/Semantic-UI-React/edit/master/README.md [23]: https://react.semantic-ui.com/usage#css [24]: https://github.com/Semantic-Org/Semantic-UI-React/issues/802#issuecomment-258990274 [25]: http://learnsemantic.com/themes/creating.html [26]: https://github.com/Semantic-Org/Semantic-UI-Meteor [26]: https://github.com/levithomason +[27]: https://github.com/layershifter +[28]: https://github.com/Semantic-Org/Semantic-UI-React/tree/master/examples/webpack1 +[29]: https://github.com/Semantic-Org/Semantic-UI-React/tree/master/examples/webpack2 [100]: https://github.com/wyc/semantic-ui-react-todos diff --git a/config.js b/config.js index 957b329f61..81090e8978 100644 --- a/config.js +++ b/config.js @@ -53,10 +53,8 @@ const config = { // ---------------------------------- compiler_devtool: (__DEV__ || __TEST__) && 'cheap-source-map', compiler_globals: { - process: { - env: { - NODE_ENV: JSON.stringify(env), - }, + 'process.env': { + NODE_ENV: JSON.stringify(env), }, __DEV__, __PATH_SEP__: JSON.stringify(path.sep), diff --git a/docs/app/Components/ComponentDoc/ComponentDoc.js b/docs/app/Components/ComponentDoc/ComponentDoc.js index 578edd5d8a..94df067a45 100644 --- a/docs/app/Components/ComponentDoc/ComponentDoc.js +++ b/docs/app/Components/ComponentDoc/ComponentDoc.js @@ -1,11 +1,9 @@ -import _ from 'lodash' import PropTypes from 'prop-types' -import React, { Component } from 'react' +import React from 'react' import DocumentTitle from 'react-document-title' -import { withRouter } from 'react-router' import { Grid } from 'semantic-ui-react' -import { scrollToAnchor } from 'docs/app/utils' +import { withDocInfo } from 'docs/app/HOC' import ComponentDocHeader from './ComponentDocHeader' import ComponentDocLinks from './ComponentDocLinks' import ComponentDocSee from './ComponentDocSee' @@ -13,78 +11,47 @@ import ComponentExamples from './ComponentExamples' import ComponentProps from './ComponentProps' import ComponentSidebar from './ComponentSidebar' -const topRowStyle = { margin: '1em' } - -class ComponentDoc extends Component { - static childContextTypes = { - onPassed: PropTypes.func, - } - - static propTypes = { - _meta: PropTypes.object, - history: PropTypes.object.isRequired, - } - - state = {} - - getChildContext() { - return { - onPassed: this.handleExamplePassed, - } - } - - componentWillReceiveProps() { - this.setState({ activePath: undefined }) - } - - handleExamplePassed = (e, { examplePath }) => this.setState({ activePath: examplePath }) - - handleExamplesRef = examplesRef => this.setState({ examplesRef }) - - handleSidebarItemClick = (e, { path }) => { - const { history } = this.props - const aPath = _.kebabCase(_.last(path.split('/'))) - - history.replace(`${location.pathname}#${aPath}`) - scrollToAnchor() - } - - render() { - const { _meta } = this.props - const { activePath, examplesRef } = this.state - - return ( - - - - - - - - - - - - - - -
- -
-
- - - -
-
-
- ) - } +const ComponentDoc = ({ componentGroup, componentName, description, ghLink, path, seeItems, suiLink }) => ( + +
+ + + + + + + + + + +
+
+) + +ComponentDoc.propTypes = { + componentGroup: PropTypes.arrayOf( + PropTypes.shape({ + description: PropTypes.string, + props: PropTypes.object, + }), + ), + componentName: PropTypes.string.isRequired, + description: PropTypes.string, + ghLink: PropTypes.string.isRequired, + path: PropTypes.string.isRequired, + seeItems: PropTypes.arrayOf( + PropTypes.shape({ + description: PropTypes.string, + name: PropTypes.string, + type: PropTypes.string, + }), + ).isRequired, + suiLink: PropTypes.string, } -export default withRouter(ComponentDoc) +export default withDocInfo(ComponentDoc) diff --git a/docs/app/Components/ComponentDoc/ComponentDocHeader.js b/docs/app/Components/ComponentDoc/ComponentDocHeader.js index cd542427cd..87c7909570 100644 --- a/docs/app/Components/ComponentDoc/ComponentDocHeader.js +++ b/docs/app/Components/ComponentDoc/ComponentDocHeader.js @@ -3,21 +3,21 @@ import React from 'react' import { Header } from 'semantic-ui-react' import { pure } from 'docs/app/HOC' -import { getDocDescription } from 'docs/app/utils' const headerStyle = { marginBottom: '0.25em' } -const ComponentDocHeader = ({ componentName }) => ( +const ComponentDocHeader = ({ componentName, description }) => (
) ComponentDocHeader.propTypes = { - componentName: PropTypes.string, + componentName: PropTypes.string.isRequired, + description: PropTypes.string, } export default pure(ComponentDocHeader) diff --git a/docs/app/Components/ComponentDoc/ComponentDocLinks.js b/docs/app/Components/ComponentDoc/ComponentDocLinks.js index c3b71d6159..2b003e5d81 100644 --- a/docs/app/Components/ComponentDoc/ComponentDocLinks.js +++ b/docs/app/Components/ComponentDoc/ComponentDocLinks.js @@ -3,7 +3,6 @@ import React from 'react' import { List } from 'semantic-ui-react' import { pure } from 'docs/app/HOC' -import { getDocGithubSourceUrl, getPosixPath, getDocSemanticUiUrl } from 'docs/app/utils' const linkListStyle = { background: '#f7f7f7', @@ -15,33 +14,30 @@ const linkListStyle = { top: '0', } -const ComponentDocLinks = ({ componentName, type }) => { - const ghLink = getDocGithubSourceUrl(componentName) - const suiLink = getDocSemanticUiUrl(componentName, type) - - return ( - +const ComponentDocLinks = ({ componentName, ghLink, path, suiLink }) => ( + + + {path} + + )} + icon='github' + /> + {suiLink && ( - {getPosixPath(componentName)} - - )} - icon='github' + content={Semantic UI {componentName} Docs} + icon='book' /> - {suiLink && ( - Semantic UI {componentName} Docs} - icon='book' - /> - )} - - ) -} + )} + +) ComponentDocLinks.propTypes = { - componentName: PropTypes.string, - type: PropTypes.string, + componentName: PropTypes.string.isRequired, + ghLink: PropTypes.string.isRequired, + path: PropTypes.string.isRequired, + suiLink: PropTypes.string, } export default pure(ComponentDocLinks) diff --git a/docs/app/Components/ComponentDoc/ComponentDocSee.js b/docs/app/Components/ComponentDoc/ComponentDocSee.js index 7ed1690dc2..dcbe08fc4c 100644 --- a/docs/app/Components/ComponentDoc/ComponentDocSee.js +++ b/docs/app/Components/ComponentDoc/ComponentDocSee.js @@ -4,37 +4,37 @@ import React from 'react' import { Link } from 'react-router-dom' import { Header, List } from 'semantic-ui-react' -import { getDocSeeItems } from 'docs/app/utils' - const listStyle = { display: 'block' } -const ComponentDocSee = ({ componentName }) => { - const items = getDocSeeItems(componentName) - - return ( - - {/* Heads up! Still render empty lists to reserve the whitespace */} - -
0 ? 'See:' : ' '} - size='tiny' - /> - - {_.map(items, ({ description, name, type }) => ( - - ))} - - ) -} +const ComponentDocSee = ({ items }) => ( + + {/* Heads up! Still render empty lists to reserve the whitespace */} + +
0 ? 'See:' : ' '} + size='tiny' + /> + + {_.map(items, ({ description, name, type }) => ( + + ))} + +) ComponentDocSee.propTypes = { - componentName: PropTypes.string, + items: PropTypes.arrayOf( + PropTypes.shape({ + description: PropTypes.string, + name: PropTypes.string, + type: PropTypes.string, + }), + ).isRequired, } export default ComponentDocSee diff --git a/docs/app/Components/ComponentDoc/ComponentProps/ComponentProps.js b/docs/app/Components/ComponentDoc/ComponentProps/ComponentProps.js index 11151543e1..e138c7f3b2 100644 --- a/docs/app/Components/ComponentDoc/ComponentProps/ComponentProps.js +++ b/docs/app/Components/ComponentDoc/ComponentProps/ComponentProps.js @@ -1,7 +1,6 @@ import PropTypes from 'prop-types' import React, { Component } from 'react' -import { getDocSubComponents } from 'docs/app/utils' import ComponentTable from '../ComponentTable' import ComponentPropsComponents from './ComponentPropsComponents' import ComponentPropsDescription from './ComponentPropsDescription' @@ -9,7 +8,9 @@ import ComponentPropsHeader from './ComponentPropsHeader' export default class ComponentProps extends Component { static propTypes = { + componentGroup: PropTypes.arrayOf(PropTypes.object), componentName: PropTypes.string, + props: PropTypes.arrayOf(PropTypes.object), } constructor(props) { @@ -29,28 +30,28 @@ export default class ComponentProps extends Component { handleToggle = () => this.setState({ activeName: this.state.activeName ? false : this.props.componentName }) render() { - const { componentName } = this.props + const { componentGroup, componentName } = this.props const { activeName } = this.state - const subComponents = getDocSubComponents(componentName) + const { description, props } = componentGroup[activeName] || {} return (
0} + hasSubComponents={componentGroup.length > 1} showProps={activeName} onClick={this.handleToggle} /> {activeName && (
- - + +
)}
diff --git a/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsComponents.js b/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsComponents.js index 7c68d350ba..bd610db13f 100644 --- a/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsComponents.js +++ b/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsComponents.js @@ -7,9 +7,9 @@ import { updateForKeys } from 'docs/app/HOC' import ComponentPropsSubComponent from './ComponentPropsComponent' const ComponentPropsComponents = ({ activeName, components, onItemClick, parent }) => - components.length > 0 && ( + components.length > 1 && ( - {_.map([parent, ...components], component => ( + {_.map(components, component => ( ( +const ComponentPropsDescription = ({ description }) => (
- {getDocDescription(name)} + {description}
) ComponentPropsDescription.propTypes = { - name: PropTypes.string, + description: PropTypes.string, } export default pure(ComponentPropsDescription) diff --git a/docs/app/Components/ComponentDoc/ComponentTable/ComponentTable.js b/docs/app/Components/ComponentDoc/ComponentTable/ComponentTable.js index 5e1050c992..976c232acc 100644 --- a/docs/app/Components/ComponentDoc/ComponentTable/ComponentTable.js +++ b/docs/app/Components/ComponentDoc/ComponentTable/ComponentTable.js @@ -3,24 +3,23 @@ import PropTypes from 'prop-types' import React from 'react' import { Table } from 'semantic-ui-react' -import { getDocProps } from 'docs/app/utils' import ComponentTableHeader from './ComponentTableHeader' import ComponentTableRow from './ComponentTableRow' /** * Displays a table of a Component's PropTypes. */ -const ComponentTable = ({ name }) => ( +const ComponentTable = ({ props }) => ( - {_.map(getDocProps(name), item => )} + {_.map(props, ({ name, ...rest }) => )}
) ComponentTable.propTypes = { - name: PropTypes.string, + props: PropTypes.arrayOf(PropTypes.object), } export default ComponentTable diff --git a/docs/app/Components/ComponentDoc/index.js b/docs/app/Components/ComponentDoc/index.js new file mode 100644 index 0000000000..4237ce6b1e --- /dev/null +++ b/docs/app/Components/ComponentDoc/index.js @@ -0,0 +1 @@ +export default from './ComponentDoc' diff --git a/docs/app/Components/DocsRoot.js b/docs/app/Components/DocsRoot.js index ee2502945c..0b9cc4c5a1 100644 --- a/docs/app/Components/DocsRoot.js +++ b/docs/app/Components/DocsRoot.js @@ -4,7 +4,7 @@ import React from 'react' import { META } from 'src/lib' import * as semanticUIReact from 'src' -import ComponentDoc from '../Components/ComponentDoc/ComponentDoc' +import ComponentDoc from '../Components/ComponentDoc' const DocsRoot = (props) => { const { name } = props.match.params @@ -12,7 +12,13 @@ const DocsRoot = (props) => { const component = semanticUIReact[componentName] if (!component || !component._meta || !META.isParent(component)) return null - return + return ( + + ) } DocsRoot.propTypes = { diff --git a/docs/app/Components/IconSearch/IconSearch.js b/docs/app/Components/IconSearch/IconSearch.js index 8d39fd2ce3..6324ab1630 100644 --- a/docs/app/Components/IconSearch/IconSearch.js +++ b/docs/app/Components/IconSearch/IconSearch.js @@ -1,7 +1,9 @@ import copyToClipboard from 'copy-to-clipboard' -import React, { Component } from 'react' import _ from 'lodash/fp' -import { SUI, leven } from 'src/lib' +import leven from 'leven' +import React, { Component } from 'react' + +import { SUI } from 'src/lib' import { Form, Grid, diff --git a/docs/app/Components/LayoutsLayout.js b/docs/app/Components/LayoutsLayout.js index 32a98cb17e..27eec3b8c1 100644 --- a/docs/app/Components/LayoutsLayout.js +++ b/docs/app/Components/LayoutsLayout.js @@ -1,5 +1,6 @@ import _ from 'lodash' -import React, { Component, PropTypes } from 'react' +import PropTypes from 'prop-types' +import React, { Component } from 'react' import { NavLink, Route } from 'react-router-dom' import { Button } from 'src' diff --git a/docs/app/Examples/addons/Portal/Types/PortalExampleControlled.js b/docs/app/Examples/addons/Portal/Types/PortalExampleControlled.js new file mode 100644 index 0000000000..dd9426454f --- /dev/null +++ b/docs/app/Examples/addons/Portal/Types/PortalExampleControlled.js @@ -0,0 +1,35 @@ +import React, { Component } from 'react' +import { Button, Grid, Header, Segment, Portal } from 'semantic-ui-react' + +export default class PortalExampleControlled extends Component { + state = { open: false } + + handleClick = () => this.setState({ open: !this.state.open }) + + handleClose = () => this.setState({ open: false }) + + render() { + const { open } = this.state + + return ( + + + + Event Log + + +
{log.map((e, i) => 
{e}
)}
+
+
) diff --git a/docs/app/Examples/addons/Portal/Types/index.js b/docs/app/Examples/addons/Portal/Types/index.js index 9f9809d4e2..7f2ad57bb3 100644 --- a/docs/app/Examples/addons/Portal/Types/index.js +++ b/docs/app/Examples/addons/Portal/Types/index.js @@ -10,6 +10,11 @@ const PortalTypesExamples = () => ( description='A basic portal.' examplePath='addons/Portal/Types/PortalExamplePortal' /> + ) diff --git a/docs/app/Examples/collections/Form/Shorthand/FormExampleSubcomponentId.js b/docs/app/Examples/collections/Form/Shorthand/FormExampleSubcomponentId.js index a400eb85de..0d45401683 100644 --- a/docs/app/Examples/collections/Form/Shorthand/FormExampleSubcomponentId.js +++ b/docs/app/Examples/collections/Form/Shorthand/FormExampleSubcomponentId.js @@ -5,7 +5,7 @@ const FormExampleSubcomponentId = () => (
- +
) diff --git a/docs/app/Examples/collections/Form/Shorthand/index.js b/docs/app/Examples/collections/Form/Shorthand/index.js index 82746567b8..1724a73ded 100644 --- a/docs/app/Examples/collections/Form/Shorthand/index.js +++ b/docs/app/Examples/collections/Form/Shorthand/index.js @@ -58,7 +58,7 @@ const FormTypesExamples = () => ( title='Field with Custom Control' description={[ 'Render a field containing a label and custom form control.', - 'Use any component form any library, or your own.', + 'Use any component from any library, or your own.', ].join(' ')} examplePath='collections/Form/Shorthand/FormExampleFieldControl' > diff --git a/docs/app/Examples/elements/Button/GroupVariations/ButtonExampleGroupLabeledIcon.js b/docs/app/Examples/elements/Button/GroupVariations/ButtonExampleGroupLabeledIcon.js index 3107b7fbf9..17317f77f0 100644 --- a/docs/app/Examples/elements/Button/GroupVariations/ButtonExampleGroupLabeledIcon.js +++ b/docs/app/Examples/elements/Button/GroupVariations/ButtonExampleGroupLabeledIcon.js @@ -2,7 +2,7 @@ import React from 'react' import { Button } from 'semantic-ui-react' const ButtonExampleGroupLabeledIcon = () => ( - +