@activecollab/components 1.0.125 → 1.0.126
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.
- package/dist/cjs/components/Loaders/Spinner/SpinnerLoader.js +22 -17
- package/dist/cjs/components/Loaders/Spinner/SpinnerLoader.js.map +1 -1
- package/dist/cjs/components/Loaders/Spinner/Styles.js +12 -3
- package/dist/cjs/components/Loaders/Spinner/Styles.js.map +1 -1
- package/dist/esm/components/Loaders/Spinner/SpinnerLoader.d.ts +9 -1
- package/dist/esm/components/Loaders/Spinner/SpinnerLoader.d.ts.map +1 -1
- package/dist/esm/components/Loaders/Spinner/SpinnerLoader.js +22 -14
- package/dist/esm/components/Loaders/Spinner/SpinnerLoader.js.map +1 -1
- package/dist/esm/components/Loaders/Spinner/Styles.d.ts +9 -1
- package/dist/esm/components/Loaders/Spinner/Styles.d.ts.map +1 -1
- package/dist/esm/components/Loaders/Spinner/Styles.js +12 -4
- package/dist/esm/components/Loaders/Spinner/Styles.js.map +1 -1
- package/dist/index.js +32 -16
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,13 +9,9 @@ exports.SpinnerLoader = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
12
|
var _Styles = require("./Styles");
|
|
15
13
|
|
|
16
|
-
var _excluded = ["className"];
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
var _excluded = ["radius", "strokeWidth", "activeStrokeColor", "inactiveStrokeColor", "activeColorPercentage", "rotateDurationInSeconds", "className"];
|
|
19
15
|
|
|
20
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
17
|
|
|
@@ -28,22 +24,31 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
28
24
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
29
25
|
|
|
30
26
|
var SpinnerLoader = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
31
|
-
var
|
|
27
|
+
var _ref$radius = _ref.radius,
|
|
28
|
+
radius = _ref$radius === void 0 ? 20 : _ref$radius,
|
|
29
|
+
_ref$strokeWidth = _ref.strokeWidth,
|
|
30
|
+
strokeWidth = _ref$strokeWidth === void 0 ? 2 : _ref$strokeWidth,
|
|
31
|
+
_ref$activeStrokeColo = _ref.activeStrokeColor,
|
|
32
|
+
activeStrokeColor = _ref$activeStrokeColo === void 0 ? "var(--color-primary)" : _ref$activeStrokeColo,
|
|
33
|
+
_ref$inactiveStrokeCo = _ref.inactiveStrokeColor,
|
|
34
|
+
inactiveStrokeColor = _ref$inactiveStrokeCo === void 0 ? "var(--color-theme-300)" : _ref$inactiveStrokeCo,
|
|
35
|
+
_ref$activeColorPerce = _ref.activeColorPercentage,
|
|
36
|
+
activeColorPercentage = _ref$activeColorPerce === void 0 ? "25%" : _ref$activeColorPerce,
|
|
37
|
+
_ref$rotateDurationIn = _ref.rotateDurationInSeconds,
|
|
38
|
+
rotateDurationInSeconds = _ref$rotateDurationIn === void 0 ? 0.75 : _ref$rotateDurationIn,
|
|
39
|
+
className = _ref.className,
|
|
32
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
41
|
|
|
34
42
|
return /*#__PURE__*/_react.default.createElement(_Styles.StyledSpinnerLoader, _extends({
|
|
35
43
|
ref: ref,
|
|
36
|
-
className:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
strokeWidth: "4",
|
|
45
|
-
strokeMiterlimit: "10"
|
|
46
|
-
})));
|
|
44
|
+
className: className,
|
|
45
|
+
$radius: radius,
|
|
46
|
+
$strokeWidth: strokeWidth,
|
|
47
|
+
$activeStrokeColor: activeStrokeColor,
|
|
48
|
+
$inactiveStrokeColor: inactiveStrokeColor,
|
|
49
|
+
$activeColorPercentage: activeColorPercentage,
|
|
50
|
+
$rotateDurationInSeconds: rotateDurationInSeconds
|
|
51
|
+
}, rest));
|
|
47
52
|
});
|
|
48
53
|
exports.SpinnerLoader = SpinnerLoader;
|
|
49
54
|
SpinnerLoader.displayName = "SpinnerLoader";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Loaders/Spinner/SpinnerLoader.tsx"],"names":["SpinnerLoader","ref","className","rest","displayName"],"mappings":";;;;;;;;;AAAA;;AACA
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Loaders/Spinner/SpinnerLoader.tsx"],"names":["SpinnerLoader","ref","radius","strokeWidth","activeStrokeColor","inactiveStrokeColor","activeColorPercentage","rotateDurationInSeconds","className","rest","displayName"],"mappings":";;;;;;;;;AAAA;;AACA;;;;;;;;;;;;;;AAiBO,IAAMA,aAAa,gBAAG,uBAI3B,gBAWEC,GAXF,EAYK;AAAA,yBAVDC,MAUC;AAAA,MAVDA,MAUC,4BAVQ,EAUR;AAAA,8BATDC,WASC;AAAA,MATDA,WASC,iCATa,CASb;AAAA,mCARDC,iBAQC;AAAA,MARDA,iBAQC,sCARmB,sBAQnB;AAAA,mCAPDC,mBAOC;AAAA,MAPDA,mBAOC,sCAPqB,wBAOrB;AAAA,mCANDC,qBAMC;AAAA,MANDA,qBAMC,sCANuB,KAMvB;AAAA,mCALDC,uBAKC;AAAA,MALDA,uBAKC,sCALyB,IAKzB;AAAA,MAJDC,SAIC,QAJDA,SAIC;AAAA,MAHEC,IAGF;;AACH,sBACE,6BAAC,2BAAD;AACE,IAAA,GAAG,EAAER,GADP;AAEE,IAAA,SAAS,EAAEO,SAFb;AAGE,IAAA,OAAO,EAAEN,MAHX;AAIE,IAAA,YAAY,EAAEC,WAJhB;AAKE,IAAA,kBAAkB,EAAEC,iBALtB;AAME,IAAA,oBAAoB,EAAEC,mBANxB;AAOE,IAAA,sBAAsB,EAAEC,qBAP1B;AAQE,IAAA,wBAAwB,EAAEC;AAR5B,KASME,IATN,EADF;AAaD,CA9B0B,CAAtB;;AAiCPT,aAAa,CAACU,WAAd,GAA4B,eAA5B","sourcesContent":["import React, { forwardRef } from \"react\";\nimport { StyledSpinnerLoader } from \"./Styles\";\n\nexport interface SpinnerLoaderProps {\n /** Loader circumference size */\n radius?: number;\n /** Stroke width of the loader */\n strokeWidth?: number;\n /** Active color of spinning loader */\n activeStrokeColor?: string;\n /** Percentage of the circle which the active color takes */\n activeColorPercentage?: \"25%\" | \"50%\" | \"75%\";\n /** Inactive color of spinning loader */\n inactiveStrokeColor?: string;\n /** Rotate speed of animation in seconds */\n rotateDurationInSeconds?: number;\n}\n\nexport const SpinnerLoader = forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<\"div\"> & SpinnerLoaderProps\n>(\n (\n {\n radius = 20,\n strokeWidth = 2,\n activeStrokeColor = \"var(--color-primary)\",\n inactiveStrokeColor = \"var(--color-theme-300)\",\n activeColorPercentage = \"25%\",\n rotateDurationInSeconds = 0.75,\n className,\n ...rest\n },\n ref\n ) => {\n return (\n <StyledSpinnerLoader\n ref={ref}\n className={className}\n $radius={radius}\n $strokeWidth={strokeWidth}\n $activeStrokeColor={activeStrokeColor}\n $inactiveStrokeColor={inactiveStrokeColor}\n $activeColorPercentage={activeColorPercentage}\n $rotateDurationInSeconds={rotateDurationInSeconds}\n {...rest}\n />\n );\n }\n);\n\nSpinnerLoader.displayName = \"SpinnerLoader\";\n"],"file":"SpinnerLoader.js"}
|
|
@@ -9,17 +9,26 @@ exports.StyledSpinnerLoader = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
11
|
|
|
12
|
+
var _BoxSizingStyle = require("../../BoxSizingStyle");
|
|
13
|
+
|
|
12
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
15
|
|
|
14
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
17
|
|
|
16
|
-
var rotateAnimation = (0, _styledComponents.keyframes)(["
|
|
17
|
-
var dashAnimation = (0, _styledComponents.keyframes)(["0%{stroke-dasharray:1,200;stroke-dashoffset:0;}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px;}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px;}"]);
|
|
18
|
+
var rotateAnimation = (0, _styledComponents.keyframes)(["from{transform:rotate(0deg);}to{transform:rotate(359deg);}"]);
|
|
18
19
|
|
|
19
20
|
var StyledSpinnerLoader = _styledComponents.default.div.withConfig({
|
|
20
21
|
displayName: "Styles__StyledSpinnerLoader",
|
|
21
22
|
componentId: "sc-1ht53g9-0"
|
|
22
|
-
})(["
|
|
23
|
+
})(["", " border-radius:100%;", " ", " ", " ", ""], _BoxSizingStyle.BoxSizingStyle, function (props) {
|
|
24
|
+
return (0, _styledComponents.css)(["width:", "px;height:", "px;animation:", " ", "s infinite linear;"], props.$radius, props.$radius, rotateAnimation, props.$rotateDurationInSeconds);
|
|
25
|
+
}, function (props) {
|
|
26
|
+
return props.$activeColorPercentage === "25%" && (0, _styledComponents.css)(["border-right:", "px solid ", ";border-bottom:", "px solid ", ";border-left:", "px solid ", ";border-top:", "px solid ", ";"], props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$activeStrokeColor);
|
|
27
|
+
}, function (props) {
|
|
28
|
+
return props.$activeColorPercentage === "50%" && (0, _styledComponents.css)(["border-right:", "px solid ", ";border-bottom:", "px solid ", ";border-left:", "px solid ", ";border-top:", "px solid ", ";"], props.$strokeWidth, props.$activeStrokeColor, props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$activeStrokeColor);
|
|
29
|
+
}, function (props) {
|
|
30
|
+
return props.$activeColorPercentage === "75%" && (0, _styledComponents.css)(["border-right:", "px solid ", ";border-bottom:", "px solid ", ";border-left:", "px solid ", ";border-top:", "px solid ", ";"], props.$strokeWidth, props.$activeStrokeColor, props.$strokeWidth, props.$activeStrokeColor, props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$activeStrokeColor);
|
|
31
|
+
});
|
|
23
32
|
|
|
24
33
|
exports.StyledSpinnerLoader = StyledSpinnerLoader;
|
|
25
34
|
//# sourceMappingURL=Styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Loaders/Spinner/Styles.ts"],"names":["rotateAnimation","keyframes","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Loaders/Spinner/Styles.ts"],"names":["rotateAnimation","keyframes","StyledSpinnerLoader","styled","div","BoxSizingStyle","props","css","$radius","$rotateDurationInSeconds","$activeColorPercentage","$strokeWidth","$inactiveStrokeColor","$activeStrokeColor"],"mappings":";;;;;;;;;AAAA;;AACA;;;;;;AAEA,IAAMA,eAAe,OAAGC,2BAAH,iEAArB;;AAcO,IAAMC,mBAAmB,GAAGC,0BAAOC,GAAV;AAAA;AAAA;AAAA,oDAC5BC,8BAD4B,EAG5B,UAACC,KAAD;AAAA,aACAC,qBADA,wEAEWD,KAAK,CAACE,OAFjB,EAGYF,KAAK,CAACE,OAHlB,EAIeR,eAJf,EAIkCM,KAAK,CAACG,wBAJxC;AAAA,CAH4B,EAW5B,UAACH,KAAD;AAAA,SACAA,KAAK,CAACI,sBAAN,KAAiC,KAAjC,QACAH,qBADA,kIAEkBD,KAAK,CAACK,YAFxB,EAEgDL,KAAK,CAACM,oBAFtD,EAGmBN,KAAK,CAACK,YAHzB,EAGiDL,KAAK,CAACM,oBAHvD,EAIiBN,KAAK,CAACK,YAJvB,EAI+CL,KAAK,CAACM,oBAJrD,EAKgBN,KAAK,CAACK,YALtB,EAK8CL,KAAK,CAACO,kBALpD,CADA;AAAA,CAX4B,EAoB5B,UAACP,KAAD;AAAA,SACAA,KAAK,CAACI,sBAAN,KAAiC,KAAjC,QACAH,qBADA,kIAEkBD,KAAK,CAACK,YAFxB,EAEgDL,KAAK,CAACO,kBAFtD,EAGmBP,KAAK,CAACK,YAHzB,EAGiDL,KAAK,CAACM,oBAHvD,EAIiBN,KAAK,CAACK,YAJvB,EAI+CL,KAAK,CAACM,oBAJrD,EAKgBN,KAAK,CAACK,YALtB,EAK8CL,KAAK,CAACO,kBALpD,CADA;AAAA,CApB4B,EA6B1B,UAACP,KAAD;AAAA,SACFA,KAAK,CAACI,sBAAN,KAAiC,KAAjC,QACAH,qBADA,kIAEkBD,KAAK,CAACK,YAFxB,EAEgDL,KAAK,CAACO,kBAFtD,EAGmBP,KAAK,CAACK,YAHzB,EAGiDL,KAAK,CAACO,kBAHvD,EAIiBP,KAAK,CAACK,YAJvB,EAI+CL,KAAK,CAACM,oBAJrD,EAKgBN,KAAK,CAACK,YALtB,EAK8CL,KAAK,CAACO,kBALpD,CADE;AAAA,CA7B0B,CAAzB","sourcesContent":["import styled, { css, keyframes } from \"styled-components\";\nimport { BoxSizingStyle } from \"../../BoxSizingStyle\";\n\nconst rotateAnimation = keyframes`\n from { transform: rotate(0deg); }\n to { transform: rotate(359deg); }\n`;\n\nexport interface StyledSpinnerLoaderProps {\n $radius: number;\n $strokeWidth: number;\n $activeStrokeColor: string;\n $inactiveStrokeColor: string;\n $activeColorPercentage: \"25%\" | \"50%\" | \"75%\";\n $rotateDurationInSeconds: number;\n}\n\nexport const StyledSpinnerLoader = styled.div<StyledSpinnerLoaderProps>`\n ${BoxSizingStyle}\n border-radius: 100%;\n ${(props) =>\n css`\n width: ${props.$radius}px;\n height: ${props.$radius}px;\n animation: ${rotateAnimation} ${props.$rotateDurationInSeconds}s infinite\n linear;\n `}\n\n ${(props) =>\n props.$activeColorPercentage === \"25%\" &&\n css`\n border-right: ${props.$strokeWidth}px solid ${props.$inactiveStrokeColor};\n border-bottom: ${props.$strokeWidth}px solid ${props.$inactiveStrokeColor};\n border-left: ${props.$strokeWidth}px solid ${props.$inactiveStrokeColor};\n border-top: ${props.$strokeWidth}px solid ${props.$activeStrokeColor};\n `}\n\n ${(props) =>\n props.$activeColorPercentage === \"50%\" &&\n css`\n border-right: ${props.$strokeWidth}px solid ${props.$activeStrokeColor};\n border-bottom: ${props.$strokeWidth}px solid ${props.$inactiveStrokeColor};\n border-left: ${props.$strokeWidth}px solid ${props.$inactiveStrokeColor};\n border-top: ${props.$strokeWidth}px solid ${props.$activeStrokeColor};\n `}\n\n ${(props) =>\n props.$activeColorPercentage === \"75%\" &&\n css`\n border-right: ${props.$strokeWidth}px solid ${props.$activeStrokeColor};\n border-bottom: ${props.$strokeWidth}px solid ${props.$activeStrokeColor};\n border-left: ${props.$strokeWidth}px solid ${props.$inactiveStrokeColor};\n border-top: ${props.$strokeWidth}px solid ${props.$activeStrokeColor};\n `}\n`;\n"],"file":"Styles.js"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export
|
|
2
|
+
export interface SpinnerLoaderProps {
|
|
3
|
+
radius?: number;
|
|
4
|
+
strokeWidth?: number;
|
|
5
|
+
activeStrokeColor?: string;
|
|
6
|
+
activeColorPercentage?: "25%" | "50%" | "75%";
|
|
7
|
+
inactiveStrokeColor?: string;
|
|
8
|
+
rotateDurationInSeconds?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const SpinnerLoader: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & SpinnerLoaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
3
11
|
//# sourceMappingURL=SpinnerLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpinnerLoader.d.ts","sourceRoot":"","sources":["../../../../../src/components/Loaders/Spinner/SpinnerLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SpinnerLoader.d.ts","sourceRoot":"","sources":["../../../../../src/components/Loaders/Spinner/SpinnerLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,MAAM,WAAW,kBAAkB;IAEjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,qBAAqB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAE9C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,eAAO,MAAM,aAAa,qOA+BzB,CAAC"}
|
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["className"];
|
|
3
|
+
var _excluded = ["radius", "strokeWidth", "activeStrokeColor", "inactiveStrokeColor", "activeColorPercentage", "rotateDurationInSeconds", "className"];
|
|
4
4
|
import React, { forwardRef } from "react";
|
|
5
|
-
import classNames from "classnames";
|
|
6
5
|
import { StyledSpinnerLoader } from "./Styles";
|
|
7
6
|
export var SpinnerLoader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
8
|
-
var
|
|
7
|
+
var _ref$radius = _ref.radius,
|
|
8
|
+
radius = _ref$radius === void 0 ? 20 : _ref$radius,
|
|
9
|
+
_ref$strokeWidth = _ref.strokeWidth,
|
|
10
|
+
strokeWidth = _ref$strokeWidth === void 0 ? 2 : _ref$strokeWidth,
|
|
11
|
+
_ref$activeStrokeColo = _ref.activeStrokeColor,
|
|
12
|
+
activeStrokeColor = _ref$activeStrokeColo === void 0 ? "var(--color-primary)" : _ref$activeStrokeColo,
|
|
13
|
+
_ref$inactiveStrokeCo = _ref.inactiveStrokeColor,
|
|
14
|
+
inactiveStrokeColor = _ref$inactiveStrokeCo === void 0 ? "var(--color-theme-300)" : _ref$inactiveStrokeCo,
|
|
15
|
+
_ref$activeColorPerce = _ref.activeColorPercentage,
|
|
16
|
+
activeColorPercentage = _ref$activeColorPerce === void 0 ? "25%" : _ref$activeColorPerce,
|
|
17
|
+
_ref$rotateDurationIn = _ref.rotateDurationInSeconds,
|
|
18
|
+
rotateDurationInSeconds = _ref$rotateDurationIn === void 0 ? 0.75 : _ref$rotateDurationIn,
|
|
19
|
+
className = _ref.className,
|
|
9
20
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
10
21
|
|
|
11
22
|
return /*#__PURE__*/React.createElement(StyledSpinnerLoader, _extends({
|
|
12
23
|
ref: ref,
|
|
13
|
-
className:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
strokeWidth: "4",
|
|
22
|
-
strokeMiterlimit: "10"
|
|
23
|
-
})));
|
|
24
|
+
className: className,
|
|
25
|
+
$radius: radius,
|
|
26
|
+
$strokeWidth: strokeWidth,
|
|
27
|
+
$activeStrokeColor: activeStrokeColor,
|
|
28
|
+
$inactiveStrokeColor: inactiveStrokeColor,
|
|
29
|
+
$activeColorPercentage: activeColorPercentage,
|
|
30
|
+
$rotateDurationInSeconds: rotateDurationInSeconds
|
|
31
|
+
}, rest));
|
|
24
32
|
});
|
|
25
33
|
SpinnerLoader.displayName = "SpinnerLoader";
|
|
26
34
|
//# sourceMappingURL=SpinnerLoader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Loaders/Spinner/SpinnerLoader.tsx"],"names":["React","forwardRef","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Loaders/Spinner/SpinnerLoader.tsx"],"names":["React","forwardRef","StyledSpinnerLoader","SpinnerLoader","ref","radius","strokeWidth","activeStrokeColor","inactiveStrokeColor","activeColorPercentage","rotateDurationInSeconds","className","rest","displayName"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,SAASC,mBAAT,QAAoC,UAApC;AAiBA,OAAO,IAAMC,aAAa,gBAAGF,UAAU,CAIrC,gBAWEG,GAXF,EAYK;AAAA,yBAVDC,MAUC;AAAA,MAVDA,MAUC,4BAVQ,EAUR;AAAA,8BATDC,WASC;AAAA,MATDA,WASC,iCATa,CASb;AAAA,mCARDC,iBAQC;AAAA,MARDA,iBAQC,sCARmB,sBAQnB;AAAA,mCAPDC,mBAOC;AAAA,MAPDA,mBAOC,sCAPqB,wBAOrB;AAAA,mCANDC,qBAMC;AAAA,MANDA,qBAMC,sCANuB,KAMvB;AAAA,mCALDC,uBAKC;AAAA,MALDA,uBAKC,sCALyB,IAKzB;AAAA,MAJDC,SAIC,QAJDA,SAIC;AAAA,MAHEC,IAGF;;AACH,sBACE,oBAAC,mBAAD;AACE,IAAA,GAAG,EAAER,GADP;AAEE,IAAA,SAAS,EAAEO,SAFb;AAGE,IAAA,OAAO,EAAEN,MAHX;AAIE,IAAA,YAAY,EAAEC,WAJhB;AAKE,IAAA,kBAAkB,EAAEC,iBALtB;AAME,IAAA,oBAAoB,EAAEC,mBANxB;AAOE,IAAA,sBAAsB,EAAEC,qBAP1B;AAQE,IAAA,wBAAwB,EAAEC;AAR5B,KASME,IATN,EADF;AAaD,CA9BoC,CAAhC;AAiCPT,aAAa,CAACU,WAAd,GAA4B,eAA5B","sourcesContent":["import React, { forwardRef } from \"react\";\nimport { StyledSpinnerLoader } from \"./Styles\";\n\nexport interface SpinnerLoaderProps {\n /** Loader circumference size */\n radius?: number;\n /** Stroke width of the loader */\n strokeWidth?: number;\n /** Active color of spinning loader */\n activeStrokeColor?: string;\n /** Percentage of the circle which the active color takes */\n activeColorPercentage?: \"25%\" | \"50%\" | \"75%\";\n /** Inactive color of spinning loader */\n inactiveStrokeColor?: string;\n /** Rotate speed of animation in seconds */\n rotateDurationInSeconds?: number;\n}\n\nexport const SpinnerLoader = forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<\"div\"> & SpinnerLoaderProps\n>(\n (\n {\n radius = 20,\n strokeWidth = 2,\n activeStrokeColor = \"var(--color-primary)\",\n inactiveStrokeColor = \"var(--color-theme-300)\",\n activeColorPercentage = \"25%\",\n rotateDurationInSeconds = 0.75,\n className,\n ...rest\n },\n ref\n ) => {\n return (\n <StyledSpinnerLoader\n ref={ref}\n className={className}\n $radius={radius}\n $strokeWidth={strokeWidth}\n $activeStrokeColor={activeStrokeColor}\n $inactiveStrokeColor={inactiveStrokeColor}\n $activeColorPercentage={activeColorPercentage}\n $rotateDurationInSeconds={rotateDurationInSeconds}\n {...rest}\n />\n );\n }\n);\n\nSpinnerLoader.displayName = \"SpinnerLoader\";\n"],"file":"SpinnerLoader.js"}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface StyledSpinnerLoaderProps {
|
|
2
|
+
$radius: number;
|
|
3
|
+
$strokeWidth: number;
|
|
4
|
+
$activeStrokeColor: string;
|
|
5
|
+
$inactiveStrokeColor: string;
|
|
6
|
+
$activeColorPercentage: "25%" | "50%" | "75%";
|
|
7
|
+
$rotateDurationInSeconds: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const StyledSpinnerLoader: import("styled-components").StyledComponent<"div", any, StyledSpinnerLoaderProps, never>;
|
|
2
10
|
//# sourceMappingURL=Styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Loaders/Spinner/Styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Loaders/Spinner/Styles.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,sBAAsB,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAC9C,wBAAwB,EAAE,MAAM,CAAC;CAClC;AAED,eAAO,MAAM,mBAAmB,0FAqC/B,CAAC"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import styled, { keyframes } from "styled-components";
|
|
2
|
-
|
|
3
|
-
var
|
|
1
|
+
import styled, { css, keyframes } from "styled-components";
|
|
2
|
+
import { BoxSizingStyle } from "../../BoxSizingStyle";
|
|
3
|
+
var rotateAnimation = keyframes(["from{transform:rotate(0deg);}to{transform:rotate(359deg);}"]);
|
|
4
4
|
export var StyledSpinnerLoader = styled.div.withConfig({
|
|
5
5
|
displayName: "Styles__StyledSpinnerLoader",
|
|
6
6
|
componentId: "sc-1ht53g9-0"
|
|
7
|
-
})(["
|
|
7
|
+
})(["", " border-radius:100%;", " ", " ", " ", ""], BoxSizingStyle, function (props) {
|
|
8
|
+
return css(["width:", "px;height:", "px;animation:", " ", "s infinite linear;"], props.$radius, props.$radius, rotateAnimation, props.$rotateDurationInSeconds);
|
|
9
|
+
}, function (props) {
|
|
10
|
+
return props.$activeColorPercentage === "25%" && css(["border-right:", "px solid ", ";border-bottom:", "px solid ", ";border-left:", "px solid ", ";border-top:", "px solid ", ";"], props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$activeStrokeColor);
|
|
11
|
+
}, function (props) {
|
|
12
|
+
return props.$activeColorPercentage === "50%" && css(["border-right:", "px solid ", ";border-bottom:", "px solid ", ";border-left:", "px solid ", ";border-top:", "px solid ", ";"], props.$strokeWidth, props.$activeStrokeColor, props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$activeStrokeColor);
|
|
13
|
+
}, function (props) {
|
|
14
|
+
return props.$activeColorPercentage === "75%" && css(["border-right:", "px solid ", ";border-bottom:", "px solid ", ";border-left:", "px solid ", ";border-top:", "px solid ", ";"], props.$strokeWidth, props.$activeStrokeColor, props.$strokeWidth, props.$activeStrokeColor, props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$activeStrokeColor);
|
|
15
|
+
});
|
|
8
16
|
//# sourceMappingURL=Styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Loaders/Spinner/Styles.ts"],"names":["styled","keyframes","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Loaders/Spinner/Styles.ts"],"names":["styled","css","keyframes","BoxSizingStyle","rotateAnimation","StyledSpinnerLoader","div","props","$radius","$rotateDurationInSeconds","$activeColorPercentage","$strokeWidth","$inactiveStrokeColor","$activeStrokeColor"],"mappings":"AAAA,OAAOA,MAAP,IAAiBC,GAAjB,EAAsBC,SAAtB,QAAuC,mBAAvC;AACA,SAASC,cAAT,QAA+B,sBAA/B;AAEA,IAAMC,eAAe,GAAGF,SAAH,gEAArB;AAcA,OAAO,IAAMG,mBAAmB,GAAGL,MAAM,CAACM,GAAV;AAAA;AAAA;AAAA,oDAC5BH,cAD4B,EAG5B,UAACI,KAAD;AAAA,SACAN,GADA,uEAEWM,KAAK,CAACC,OAFjB,EAGYD,KAAK,CAACC,OAHlB,EAIeJ,eAJf,EAIkCG,KAAK,CAACE,wBAJxC;AAAA,CAH4B,EAW5B,UAACF,KAAD;AAAA,SACAA,KAAK,CAACG,sBAAN,KAAiC,KAAjC,IACAT,GADA,iIAEkBM,KAAK,CAACI,YAFxB,EAEgDJ,KAAK,CAACK,oBAFtD,EAGmBL,KAAK,CAACI,YAHzB,EAGiDJ,KAAK,CAACK,oBAHvD,EAIiBL,KAAK,CAACI,YAJvB,EAI+CJ,KAAK,CAACK,oBAJrD,EAKgBL,KAAK,CAACI,YALtB,EAK8CJ,KAAK,CAACM,kBALpD,CADA;AAAA,CAX4B,EAoB5B,UAACN,KAAD;AAAA,SACAA,KAAK,CAACG,sBAAN,KAAiC,KAAjC,IACAT,GADA,iIAEkBM,KAAK,CAACI,YAFxB,EAEgDJ,KAAK,CAACM,kBAFtD,EAGmBN,KAAK,CAACI,YAHzB,EAGiDJ,KAAK,CAACK,oBAHvD,EAIiBL,KAAK,CAACI,YAJvB,EAI+CJ,KAAK,CAACK,oBAJrD,EAKgBL,KAAK,CAACI,YALtB,EAK8CJ,KAAK,CAACM,kBALpD,CADA;AAAA,CApB4B,EA6B1B,UAACN,KAAD;AAAA,SACFA,KAAK,CAACG,sBAAN,KAAiC,KAAjC,IACAT,GADA,iIAEkBM,KAAK,CAACI,YAFxB,EAEgDJ,KAAK,CAACM,kBAFtD,EAGmBN,KAAK,CAACI,YAHzB,EAGiDJ,KAAK,CAACM,kBAHvD,EAIiBN,KAAK,CAACI,YAJvB,EAI+CJ,KAAK,CAACK,oBAJrD,EAKgBL,KAAK,CAACI,YALtB,EAK8CJ,KAAK,CAACM,kBALpD,CADE;AAAA,CA7B0B,CAAzB","sourcesContent":["import styled, { css, keyframes } from \"styled-components\";\nimport { BoxSizingStyle } from \"../../BoxSizingStyle\";\n\nconst rotateAnimation = keyframes`\n from { transform: rotate(0deg); }\n to { transform: rotate(359deg); }\n`;\n\nexport interface StyledSpinnerLoaderProps {\n $radius: number;\n $strokeWidth: number;\n $activeStrokeColor: string;\n $inactiveStrokeColor: string;\n $activeColorPercentage: \"25%\" | \"50%\" | \"75%\";\n $rotateDurationInSeconds: number;\n}\n\nexport const StyledSpinnerLoader = styled.div<StyledSpinnerLoaderProps>`\n ${BoxSizingStyle}\n border-radius: 100%;\n ${(props) =>\n css`\n width: ${props.$radius}px;\n height: ${props.$radius}px;\n animation: ${rotateAnimation} ${props.$rotateDurationInSeconds}s infinite\n linear;\n `}\n\n ${(props) =>\n props.$activeColorPercentage === \"25%\" &&\n css`\n border-right: ${props.$strokeWidth}px solid ${props.$inactiveStrokeColor};\n border-bottom: ${props.$strokeWidth}px solid ${props.$inactiveStrokeColor};\n border-left: ${props.$strokeWidth}px solid ${props.$inactiveStrokeColor};\n border-top: ${props.$strokeWidth}px solid ${props.$activeStrokeColor};\n `}\n\n ${(props) =>\n props.$activeColorPercentage === \"50%\" &&\n css`\n border-right: ${props.$strokeWidth}px solid ${props.$activeStrokeColor};\n border-bottom: ${props.$strokeWidth}px solid ${props.$inactiveStrokeColor};\n border-left: ${props.$strokeWidth}px solid ${props.$inactiveStrokeColor};\n border-top: ${props.$strokeWidth}px solid ${props.$activeStrokeColor};\n `}\n\n ${(props) =>\n props.$activeColorPercentage === \"75%\" &&\n css`\n border-right: ${props.$strokeWidth}px solid ${props.$activeStrokeColor};\n border-bottom: ${props.$strokeWidth}px solid ${props.$activeStrokeColor};\n border-left: ${props.$strokeWidth}px solid ${props.$inactiveStrokeColor};\n border-top: ${props.$strokeWidth}px solid ${props.$activeStrokeColor};\n `}\n`;\n"],"file":"Styles.js"}
|
package/dist/index.js
CHANGED
|
@@ -6183,31 +6183,47 @@
|
|
|
6183
6183
|
});
|
|
6184
6184
|
DotsLoader.displayName = "DotsLoader";
|
|
6185
6185
|
|
|
6186
|
-
var rotateAnimation = styled.keyframes(["
|
|
6187
|
-
var dashAnimation = styled.keyframes(["0%{stroke-dasharray:1,200;stroke-dashoffset:0;}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px;}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px;}"]);
|
|
6186
|
+
var rotateAnimation = styled.keyframes(["from{transform:rotate(0deg);}to{transform:rotate(359deg);}"]);
|
|
6188
6187
|
var StyledSpinnerLoader = styled__default["default"].div.withConfig({
|
|
6189
6188
|
displayName: "Styles__StyledSpinnerLoader",
|
|
6190
6189
|
componentId: "sc-1ht53g9-0"
|
|
6191
|
-
})(["
|
|
6190
|
+
})(["", " border-radius:100%;", " ", " ", " ", ""], BoxSizingStyle, function (props) {
|
|
6191
|
+
return styled.css(["width:", "px;height:", "px;animation:", " ", "s infinite linear;"], props.$radius, props.$radius, rotateAnimation, props.$rotateDurationInSeconds);
|
|
6192
|
+
}, function (props) {
|
|
6193
|
+
return props.$activeColorPercentage === "25%" && styled.css(["border-right:", "px solid ", ";border-bottom:", "px solid ", ";border-left:", "px solid ", ";border-top:", "px solid ", ";"], props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$activeStrokeColor);
|
|
6194
|
+
}, function (props) {
|
|
6195
|
+
return props.$activeColorPercentage === "50%" && styled.css(["border-right:", "px solid ", ";border-bottom:", "px solid ", ";border-left:", "px solid ", ";border-top:", "px solid ", ";"], props.$strokeWidth, props.$activeStrokeColor, props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$activeStrokeColor);
|
|
6196
|
+
}, function (props) {
|
|
6197
|
+
return props.$activeColorPercentage === "75%" && styled.css(["border-right:", "px solid ", ";border-bottom:", "px solid ", ";border-left:", "px solid ", ";border-top:", "px solid ", ";"], props.$strokeWidth, props.$activeStrokeColor, props.$strokeWidth, props.$activeStrokeColor, props.$strokeWidth, props.$inactiveStrokeColor, props.$strokeWidth, props.$activeStrokeColor);
|
|
6198
|
+
});
|
|
6192
6199
|
|
|
6193
|
-
var _excluded$y = ["className"];
|
|
6200
|
+
var _excluded$y = ["radius", "strokeWidth", "activeStrokeColor", "inactiveStrokeColor", "activeColorPercentage", "rotateDurationInSeconds", "className"];
|
|
6194
6201
|
var SpinnerLoader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
6195
|
-
var
|
|
6202
|
+
var _ref$radius = _ref.radius,
|
|
6203
|
+
radius = _ref$radius === void 0 ? 20 : _ref$radius,
|
|
6204
|
+
_ref$strokeWidth = _ref.strokeWidth,
|
|
6205
|
+
strokeWidth = _ref$strokeWidth === void 0 ? 2 : _ref$strokeWidth,
|
|
6206
|
+
_ref$activeStrokeColo = _ref.activeStrokeColor,
|
|
6207
|
+
activeStrokeColor = _ref$activeStrokeColo === void 0 ? "var(--color-primary)" : _ref$activeStrokeColo,
|
|
6208
|
+
_ref$inactiveStrokeCo = _ref.inactiveStrokeColor,
|
|
6209
|
+
inactiveStrokeColor = _ref$inactiveStrokeCo === void 0 ? "var(--color-theme-300)" : _ref$inactiveStrokeCo,
|
|
6210
|
+
_ref$activeColorPerce = _ref.activeColorPercentage,
|
|
6211
|
+
activeColorPercentage = _ref$activeColorPerce === void 0 ? "25%" : _ref$activeColorPerce,
|
|
6212
|
+
_ref$rotateDurationIn = _ref.rotateDurationInSeconds,
|
|
6213
|
+
rotateDurationInSeconds = _ref$rotateDurationIn === void 0 ? 0.75 : _ref$rotateDurationIn,
|
|
6214
|
+
className = _ref.className,
|
|
6196
6215
|
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
6197
6216
|
|
|
6198
6217
|
return /*#__PURE__*/React__default["default"].createElement(StyledSpinnerLoader, _extends({
|
|
6199
6218
|
ref: ref,
|
|
6200
|
-
className:
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
strokeWidth: "4",
|
|
6209
|
-
strokeMiterlimit: "10"
|
|
6210
|
-
})));
|
|
6219
|
+
className: className,
|
|
6220
|
+
$radius: radius,
|
|
6221
|
+
$strokeWidth: strokeWidth,
|
|
6222
|
+
$activeStrokeColor: activeStrokeColor,
|
|
6223
|
+
$inactiveStrokeColor: inactiveStrokeColor,
|
|
6224
|
+
$activeColorPercentage: activeColorPercentage,
|
|
6225
|
+
$rotateDurationInSeconds: rotateDurationInSeconds
|
|
6226
|
+
}, rest));
|
|
6211
6227
|
});
|
|
6212
6228
|
SpinnerLoader.displayName = "SpinnerLoader";
|
|
6213
6229
|
|