react-spinners
Advanced tools
Comparing version 0.13.0-alpha.1 to 0.13.0-alpha.3
import { LoaderHeightWidthProps } from "./helpers/props"; | ||
declare function BarLoader({ loading, color, speedMultiplier, css, height, width }: LoaderHeightWidthProps): JSX.Element | null; | ||
declare function BarLoader({ loading, color, speedMultiplier, css, height, width, ...additionalprops }: LoaderHeightWidthProps): JSX.Element | null; | ||
export default BarLoader; |
"use strict"; | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
@@ -21,2 +32,13 @@ if (k2 === undefined) k2 = k; | ||
}; | ||
var __rest = (this && this.__rest) || function (s, e) { | ||
var t = {}; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -29,13 +51,4 @@ var React = __importStar(require("react")); | ||
function BarLoader(_a) { | ||
var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.css, css = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 4 : _f, _g = _a.width, width = _g === void 0 ? 100 : _g; | ||
var wrapper = function () { | ||
return Object.assign({ | ||
position: "relative", | ||
width: (0, helpers_1.cssValue)(width), | ||
height: (0, helpers_1.cssValue)(height), | ||
overflow: "hidden", | ||
backgroundColor: (0, helpers_1.calculateRgba)(color, 0.2), | ||
backgroundClip: "padding-box" | ||
}, css); | ||
}; | ||
var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.css, css = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 4 : _f, _g = _a.width, width = _g === void 0 ? 100 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "css", "height", "width"]); | ||
var wrapper = __assign({ display: "inherit", position: "relative", width: (0, helpers_1.cssValue)(width), height: (0, helpers_1.cssValue)(height), overflow: "hidden", backgroundColor: (0, helpers_1.calculateRgba)(color, 0.2), backgroundClip: "padding-box" }, css); | ||
var style = function (i) { | ||
@@ -58,3 +71,3 @@ return { | ||
} | ||
return (React.createElement("span", { style: wrapper() }, | ||
return (React.createElement("span", __assign({ style: wrapper }, additionalprops), | ||
React.createElement("span", { style: style(1) }), | ||
@@ -61,0 +74,0 @@ React.createElement("span", { style: style(2) }))); |
@@ -5,2 +5,12 @@ # Change Log | ||
## 0.13.0-alpha.3 | ||
- **Feature**: Add support for custom props in BarLoader | ||
## 0.13.0-alpha.2 | ||
- Added react testing library | ||
- added basic tests for BarLoader | ||
- **bugfix**: add `display: inherit` on barloader to fix issue where nothing shows up on page. | ||
## 0.13.0-alpha.1 | ||
@@ -7,0 +17,0 @@ |
import { LoaderHeightWidthProps } from "./helpers/props"; | ||
declare function BarLoader({ loading, color, speedMultiplier, css, height, width }: LoaderHeightWidthProps): JSX.Element | null; | ||
declare function BarLoader({ loading, color, speedMultiplier, css, height, width, ...additionalprops }: LoaderHeightWidthProps): JSX.Element | null; | ||
export default BarLoader; |
"use strict"; | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
@@ -21,2 +32,13 @@ if (k2 === undefined) k2 = k; | ||
}; | ||
var __rest = (this && this.__rest) || function (s, e) { | ||
var t = {}; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -29,13 +51,4 @@ var React = __importStar(require("react")); | ||
function BarLoader(_a) { | ||
var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.css, css = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 4 : _f, _g = _a.width, width = _g === void 0 ? 100 : _g; | ||
var wrapper = function () { | ||
return Object.assign({ | ||
position: "relative", | ||
width: (0, helpers_1.cssValue)(width), | ||
height: (0, helpers_1.cssValue)(height), | ||
overflow: "hidden", | ||
backgroundColor: (0, helpers_1.calculateRgba)(color, 0.2), | ||
backgroundClip: "padding-box" | ||
}, css); | ||
}; | ||
var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.css, css = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 4 : _f, _g = _a.width, width = _g === void 0 ? 100 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "css", "height", "width"]); | ||
var wrapper = __assign({ display: "inherit", position: "relative", width: (0, helpers_1.cssValue)(width), height: (0, helpers_1.cssValue)(height), overflow: "hidden", backgroundColor: (0, helpers_1.calculateRgba)(color, 0.2), backgroundClip: "padding-box" }, css); | ||
var style = function (i) { | ||
@@ -58,3 +71,3 @@ return { | ||
} | ||
return (React.createElement("span", { style: wrapper() }, | ||
return (React.createElement("span", __assign({ style: wrapper }, additionalprops), | ||
React.createElement("span", { style: style(1) }), | ||
@@ -61,0 +74,0 @@ React.createElement("span", { style: style(2) }))); |
@@ -1,4 +0,4 @@ | ||
import { CSSProperties } from "react"; | ||
import { CSSProperties, DetailedHTMLProps, HTMLAttributes } from "react"; | ||
declare type LengthType = number | string; | ||
interface CommonProps { | ||
interface CommonProps extends DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement> { | ||
color?: string; | ||
@@ -5,0 +5,0 @@ loading?: boolean; |
import { LoaderHeightWidthProps } from "./helpers/props"; | ||
declare function BarLoader({ loading, color, speedMultiplier, css, height, width }: LoaderHeightWidthProps): JSX.Element | null; | ||
declare function BarLoader({ loading, color, speedMultiplier, css, height, width, ...additionalprops }: LoaderHeightWidthProps): JSX.Element | null; | ||
export default BarLoader; |
@@ -0,1 +1,23 @@ | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __rest = (this && this.__rest) || function (s, e) { | ||
var t = {}; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
}; | ||
import * as React from "react"; | ||
@@ -7,13 +29,4 @@ import { calculateRgba, cssValue } from "./helpers"; | ||
function BarLoader(_a) { | ||
var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.css, css = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 4 : _f, _g = _a.width, width = _g === void 0 ? 100 : _g; | ||
var wrapper = function () { | ||
return Object.assign({ | ||
position: "relative", | ||
width: cssValue(width), | ||
height: cssValue(height), | ||
overflow: "hidden", | ||
backgroundColor: calculateRgba(color, 0.2), | ||
backgroundClip: "padding-box" | ||
}, css); | ||
}; | ||
var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.css, css = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 4 : _f, _g = _a.width, width = _g === void 0 ? 100 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "css", "height", "width"]); | ||
var wrapper = __assign({ display: "inherit", position: "relative", width: cssValue(width), height: cssValue(height), overflow: "hidden", backgroundColor: calculateRgba(color, 0.2), backgroundClip: "padding-box" }, css); | ||
var style = function (i) { | ||
@@ -36,3 +49,3 @@ return { | ||
} | ||
return (React.createElement("span", { style: wrapper() }, | ||
return (React.createElement("span", __assign({ style: wrapper }, additionalprops), | ||
React.createElement("span", { style: style(1) }), | ||
@@ -39,0 +52,0 @@ React.createElement("span", { style: style(2) }))); |
@@ -1,4 +0,4 @@ | ||
import { CSSProperties } from "react"; | ||
import { CSSProperties, DetailedHTMLProps, HTMLAttributes } from "react"; | ||
declare type LengthType = number | string; | ||
interface CommonProps { | ||
interface CommonProps extends DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement> { | ||
color?: string; | ||
@@ -5,0 +5,0 @@ loading?: boolean; |
@@ -1,4 +0,4 @@ | ||
import { CSSProperties } from "react"; | ||
import { CSSProperties, DetailedHTMLProps, HTMLAttributes } from "react"; | ||
declare type LengthType = number | string; | ||
interface CommonProps { | ||
interface CommonProps extends DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement> { | ||
color?: string; | ||
@@ -5,0 +5,0 @@ loading?: boolean; |
{ | ||
"name": "react-spinners", | ||
"version": "0.13.0-alpha.1", | ||
"version": "0.13.0-alpha.3", | ||
"description": "A collection of react loading spinners", | ||
@@ -66,2 +66,4 @@ "repository": { | ||
"@emotion/jest": "^11.3.0", | ||
"@testing-library/jest-dom": "^5.16.4", | ||
"@testing-library/react": "^13.2.0", | ||
"@types/enzyme": "^3.10.9", | ||
@@ -89,6 +91,6 @@ "@types/enzyme-adapter-react-16": "^1.0.6", | ||
"prettier": "^2.4.1", | ||
"react": "^17.0.2", | ||
"react": "^18.1.0", | ||
"react-click-outside": "^3.0.1", | ||
"react-color": "2.19.3", | ||
"react-dom": "^17.0.2", | ||
"react-dom": "^18.1.0", | ||
"ts-jest": "^27.0.5", | ||
@@ -95,0 +97,0 @@ "ts-loader": "^9.2.6", |
@@ -26,3 +26,3 @@ { | ||
}, | ||
"exclude": ["docs/*", "webpack.config.*", "*.js", "__tests__", "examples"] | ||
"exclude": ["docs/*", "webpack.config.*", "*.js", "__tests__", "examples", "src/*.test.tsx"] | ||
} |
import { LoaderHeightWidthProps } from "./helpers/props"; | ||
declare function BarLoader({ loading, color, speedMultiplier, css, height, width }: LoaderHeightWidthProps): JSX.Element | null; | ||
declare function BarLoader({ loading, color, speedMultiplier, css, height, width, ...additionalprops }: LoaderHeightWidthProps): JSX.Element | null; | ||
export default BarLoader; |
@@ -0,1 +1,12 @@ | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
@@ -20,2 +31,13 @@ if (k2 === undefined) k2 = k; | ||
}; | ||
var __rest = (this && this.__rest) || function (s, e) { | ||
var t = {}; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
}; | ||
(function (factory) { | ||
@@ -38,13 +60,4 @@ if (typeof module === "object" && typeof module.exports === "object") { | ||
function BarLoader(_a) { | ||
var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.css, css = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 4 : _f, _g = _a.width, width = _g === void 0 ? 100 : _g; | ||
var wrapper = function () { | ||
return Object.assign({ | ||
position: "relative", | ||
width: (0, helpers_1.cssValue)(width), | ||
height: (0, helpers_1.cssValue)(height), | ||
overflow: "hidden", | ||
backgroundColor: (0, helpers_1.calculateRgba)(color, 0.2), | ||
backgroundClip: "padding-box" | ||
}, css); | ||
}; | ||
var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.css, css = _e === void 0 ? {} : _e, _f = _a.height, height = _f === void 0 ? 4 : _f, _g = _a.width, width = _g === void 0 ? 100 : _g, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "css", "height", "width"]); | ||
var wrapper = __assign({ display: "inherit", position: "relative", width: (0, helpers_1.cssValue)(width), height: (0, helpers_1.cssValue)(height), overflow: "hidden", backgroundColor: (0, helpers_1.calculateRgba)(color, 0.2), backgroundClip: "padding-box" }, css); | ||
var style = function (i) { | ||
@@ -67,3 +80,3 @@ return { | ||
} | ||
return (React.createElement("span", { style: wrapper() }, | ||
return (React.createElement("span", __assign({ style: wrapper }, additionalprops), | ||
React.createElement("span", { style: style(1) }), | ||
@@ -70,0 +83,0 @@ React.createElement("span", { style: style(2) }))); |
@@ -1,4 +0,4 @@ | ||
import { CSSProperties } from "react"; | ||
import { CSSProperties, DetailedHTMLProps, HTMLAttributes } from "react"; | ||
declare type LengthType = number | string; | ||
interface CommonProps { | ||
interface CommonProps extends DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement> { | ||
color?: string; | ||
@@ -5,0 +5,0 @@ loading?: boolean; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
644483
10184
44