From ee2bb8e8e69ab7cc302db13c9a977238b3170f9c Mon Sep 17 00:00:00 2001 From: Oleksandr Fediashov Date: Mon, 25 Mar 2019 20:32:19 +0200 Subject: [PATCH] breaking(Popup): switch to Popper.js (#3532) * breaking(Popup): switch to Popper.js * chore(package): update react-hot-loader * update UTs * fix offset, update docs * rework docs --- docs/src/App.js | 4 +- docs/src/components/Document.js | 16 +- .../modules/Popup/Types/PopupExample.js | 2 +- ...ExampleTitled.js => PopupExampleHeader.js} | 14 +- .../modules/Popup/Types/PopupExampleHtml.js | 26 - .../Popup/Types/PopupExampleTrigger.js | 27 + .../src/examples/modules/Popup/Types/index.js | 12 +- .../Popup/Usage/PopupExampleActions.js | 38 ++ .../modules/Popup/Usage/PopupExampleClick.js | 13 - .../Popup/Usage/PopupExampleContext.js | 4 +- .../Popup/Usage/PopupExampleControlled.js | 9 +- .../Popup/Usage/PopupExampleDefaultOpen.js | 7 +- .../modules/Popup/Usage/PopupExampleFocus.js | 13 - .../PopupExampleHideOnScroll.js | 8 +- .../modules/Popup/Usage/PopupExampleHover.js | 12 - .../PopupExampleOffset.js | 12 +- .../src/examples/modules/Popup/Usage/index.js | 64 ++- .../Popup/Variations/PopupExampleInverted.js | 10 +- .../Popup/Variations/PopupExampleSize.js | 4 +- .../Popup/Variations/PopupExampleWide.js | 19 +- .../modules/Popup/Variations/index.js | 33 +- gulp/plugins/util/parseType.js | 37 +- package.json | 11 +- src/modules/Popup/Popup.d.ts | 16 +- src/modules/Popup/Popup.js | 294 +++------- src/modules/Popup/lib/createReferenceProxy.js | 38 ++ src/modules/Popup/lib/positions.js | 18 + test/specs/modules/Popup/Popup-test.js | 543 +++++------------- yarn.lock | 132 +++-- 29 files changed, 598 insertions(+), 838 deletions(-) rename docs/src/examples/modules/Popup/Types/{PopupExampleTitled.js => PopupExampleHeader.js} (82%) delete mode 100644 docs/src/examples/modules/Popup/Types/PopupExampleHtml.js create mode 100644 docs/src/examples/modules/Popup/Types/PopupExampleTrigger.js create mode 100644 docs/src/examples/modules/Popup/Usage/PopupExampleActions.js delete mode 100644 docs/src/examples/modules/Popup/Usage/PopupExampleClick.js delete mode 100644 docs/src/examples/modules/Popup/Usage/PopupExampleFocus.js rename docs/src/examples/modules/Popup/{Variations => Usage}/PopupExampleHideOnScroll.js (74%) delete mode 100644 docs/src/examples/modules/Popup/Usage/PopupExampleHover.js rename docs/src/examples/modules/Popup/{Variations => Usage}/PopupExampleOffset.js (85%) create mode 100644 src/modules/Popup/lib/createReferenceProxy.js create mode 100644 src/modules/Popup/lib/positions.js diff --git a/docs/src/App.js b/docs/src/App.js index 98e4835cdd..8aeda90e42 100644 --- a/docs/src/App.js +++ b/docs/src/App.js @@ -1,5 +1,5 @@ import React from 'react' -import { hot } from 'react-hot-loader' +import { hot } from 'react-hot-loader/root' import { Router, Switch } from 'react-static' import Routes from 'react-static-routes' @@ -11,4 +11,4 @@ const App = () => ( ) -export default hot(module)(App) +export default hot(App) diff --git a/docs/src/components/Document.js b/docs/src/components/Document.js index 36a9692eba..b60749d83c 100644 --- a/docs/src/components/Document.js +++ b/docs/src/components/Document.js @@ -16,9 +16,7 @@ const Document = ({ Body, children, Head, Html, siteData: { dev, versions } }) = href={`https://cdn.jsdelivr.net/npm/semantic-ui@${versions.sui}/dist/semantic.min.css`} /> -