react-asc 21.2.2 → 21.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface ILoadingIndicatorContainerProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
|
+
isFixed?: boolean;
|
|
4
5
|
}
|
|
5
|
-
export declare const LoadingIndicatorContainer: ({ children }: ILoadingIndicatorContainerProps) => JSX.Element;
|
|
6
|
+
export declare const LoadingIndicatorContainer: ({ children, isFixed }: ILoadingIndicatorContainerProps) => JSX.Element;
|
package/index.es.js
CHANGED
|
@@ -1645,8 +1645,8 @@ const Link = (props) => {
|
|
|
1645
1645
|
return (React.createElement("a", Object.assign({ className: cssClassName, href: href, target: target, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, rest), children));
|
|
1646
1646
|
};
|
|
1647
1647
|
|
|
1648
|
-
var css_248z$k = ".LoadingIndicator-module_loadingIndicatorContainer__GS9OG {\n
|
|
1649
|
-
var styles$k = {"loadingIndicatorContainer":"LoadingIndicator-module_loadingIndicatorContainer__GS9OG","loadingIndicator":"LoadingIndicator-module_loadingIndicator__EC9sx","spinAnimation":"LoadingIndicator-module_spinAnimation__LeY4Z"};
|
|
1648
|
+
var css_248z$k = ".LoadingIndicator-module_loadingIndicatorContainer__GS9OG {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%; }\n .LoadingIndicator-module_loadingIndicatorContainer__GS9OG.LoadingIndicator-module_isFixed__WCFNG {\n position: fixed;\n top: 0;\n left: 0; }\n\n.LoadingIndicator-module_loadingIndicator__EC9sx {\n animation-name: LoadingIndicator-module_spinAnimation__LeY4Z;\n animation-duration: 5000ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n width: 24px;\n height: 24px; }\n\n@keyframes LoadingIndicator-module_spinAnimation__LeY4Z {\n from {\n transform: rotate(0deg); }\n to {\n transform: rotate(360deg); } }\n";
|
|
1649
|
+
var styles$k = {"loadingIndicatorContainer":"LoadingIndicator-module_loadingIndicatorContainer__GS9OG","isFixed":"LoadingIndicator-module_isFixed__WCFNG","loadingIndicator":"LoadingIndicator-module_loadingIndicator__EC9sx","spinAnimation":"LoadingIndicator-module_spinAnimation__LeY4Z"};
|
|
1650
1650
|
styleInject(css_248z$k);
|
|
1651
1651
|
|
|
1652
1652
|
const LoadingIndicator = (_a) => {
|
|
@@ -1660,10 +1660,11 @@ const LoadingIndicator = (_a) => {
|
|
|
1660
1660
|
React.createElement(SpinnerSolidIcon, null)));
|
|
1661
1661
|
};
|
|
1662
1662
|
|
|
1663
|
-
const LoadingIndicatorContainer = ({ children }) => {
|
|
1663
|
+
const LoadingIndicatorContainer = ({ children, isFixed }) => {
|
|
1664
1664
|
const getCssClasses = () => {
|
|
1665
1665
|
const cssClasses = [];
|
|
1666
1666
|
cssClasses.push(styles$k.loadingIndicatorContainer);
|
|
1667
|
+
isFixed && cssClasses.push(styles$k.isFixed);
|
|
1667
1668
|
return cssClasses.filter(css => css).join(' ');
|
|
1668
1669
|
};
|
|
1669
1670
|
return (React.createElement("div", { className: getCssClasses() }, children));
|
|
@@ -1677,7 +1678,7 @@ class LoadingIndicatorService {
|
|
|
1677
1678
|
this.container = document.createElement('div');
|
|
1678
1679
|
this.container.classList.add('snackbar-container');
|
|
1679
1680
|
document.body.appendChild(this.container);
|
|
1680
|
-
render(React.createElement(LoadingIndicatorContainer,
|
|
1681
|
+
render(React.createElement(LoadingIndicatorContainer, { isFixed: true },
|
|
1681
1682
|
React.createElement(LoadingIndicator, null)), this.container);
|
|
1682
1683
|
}
|
|
1683
1684
|
hide() {
|
package/index.js
CHANGED
|
@@ -1653,8 +1653,8 @@ const Link = (props) => {
|
|
|
1653
1653
|
return (React__default["default"].createElement("a", Object.assign({ className: cssClassName, href: href, target: target, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, rest), children));
|
|
1654
1654
|
};
|
|
1655
1655
|
|
|
1656
|
-
var css_248z$k = ".LoadingIndicator-module_loadingIndicatorContainer__GS9OG {\n
|
|
1657
|
-
var styles$k = {"loadingIndicatorContainer":"LoadingIndicator-module_loadingIndicatorContainer__GS9OG","loadingIndicator":"LoadingIndicator-module_loadingIndicator__EC9sx","spinAnimation":"LoadingIndicator-module_spinAnimation__LeY4Z"};
|
|
1656
|
+
var css_248z$k = ".LoadingIndicator-module_loadingIndicatorContainer__GS9OG {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%; }\n .LoadingIndicator-module_loadingIndicatorContainer__GS9OG.LoadingIndicator-module_isFixed__WCFNG {\n position: fixed;\n top: 0;\n left: 0; }\n\n.LoadingIndicator-module_loadingIndicator__EC9sx {\n animation-name: LoadingIndicator-module_spinAnimation__LeY4Z;\n animation-duration: 5000ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n width: 24px;\n height: 24px; }\n\n@keyframes LoadingIndicator-module_spinAnimation__LeY4Z {\n from {\n transform: rotate(0deg); }\n to {\n transform: rotate(360deg); } }\n";
|
|
1657
|
+
var styles$k = {"loadingIndicatorContainer":"LoadingIndicator-module_loadingIndicatorContainer__GS9OG","isFixed":"LoadingIndicator-module_isFixed__WCFNG","loadingIndicator":"LoadingIndicator-module_loadingIndicator__EC9sx","spinAnimation":"LoadingIndicator-module_spinAnimation__LeY4Z"};
|
|
1658
1658
|
styleInject(css_248z$k);
|
|
1659
1659
|
|
|
1660
1660
|
const LoadingIndicator = (_a) => {
|
|
@@ -1668,10 +1668,11 @@ const LoadingIndicator = (_a) => {
|
|
|
1668
1668
|
React__default["default"].createElement(SpinnerSolidIcon, null)));
|
|
1669
1669
|
};
|
|
1670
1670
|
|
|
1671
|
-
const LoadingIndicatorContainer = ({ children }) => {
|
|
1671
|
+
const LoadingIndicatorContainer = ({ children, isFixed }) => {
|
|
1672
1672
|
const getCssClasses = () => {
|
|
1673
1673
|
const cssClasses = [];
|
|
1674
1674
|
cssClasses.push(styles$k.loadingIndicatorContainer);
|
|
1675
|
+
isFixed && cssClasses.push(styles$k.isFixed);
|
|
1675
1676
|
return cssClasses.filter(css => css).join(' ');
|
|
1676
1677
|
};
|
|
1677
1678
|
return (React__default["default"].createElement("div", { className: getCssClasses() }, children));
|
|
@@ -1685,7 +1686,7 @@ class LoadingIndicatorService {
|
|
|
1685
1686
|
this.container = document.createElement('div');
|
|
1686
1687
|
this.container.classList.add('snackbar-container');
|
|
1687
1688
|
document.body.appendChild(this.container);
|
|
1688
|
-
reactDom.render(React__default["default"].createElement(LoadingIndicatorContainer,
|
|
1689
|
+
reactDom.render(React__default["default"].createElement(LoadingIndicatorContainer, { isFixed: true },
|
|
1689
1690
|
React__default["default"].createElement(LoadingIndicator, null)), this.container);
|
|
1690
1691
|
}
|
|
1691
1692
|
hide() {
|