0.2.0 - Mid migration

This commit is contained in:
Daniel Mason 2022-04-25 14:47:15 +12:00
parent 139e6a915e
commit 7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions

3
web/node_modules/react-spinners/helpers/colors.d.ts generated vendored Normal file
View file

@ -0,0 +1,3 @@
declare type RgbaFunction = (color: string, opacity: number) => string;
export declare const calculateRgba: RgbaFunction;
export {};

44
web/node_modules/react-spinners/helpers/colors.js generated vendored Normal file
View file

@ -0,0 +1,44 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.calculateRgba = void 0;
var BasicColors;
(function (BasicColors) {
BasicColors["maroon"] = "#800000";
BasicColors["red"] = "#FF0000";
BasicColors["orange"] = "#FFA500";
BasicColors["yellow"] = "#FFFF00";
BasicColors["olive"] = "#808000";
BasicColors["green"] = "#008000";
BasicColors["purple"] = "#800080";
BasicColors["fuchsia"] = "#FF00FF";
BasicColors["lime"] = "#00FF00";
BasicColors["teal"] = "#008080";
BasicColors["aqua"] = "#00FFFF";
BasicColors["blue"] = "#0000FF";
BasicColors["navy"] = "#000080";
BasicColors["black"] = "#000000";
BasicColors["gray"] = "#808080";
BasicColors["silver"] = "#C0C0C0";
BasicColors["white"] = "#FFFFFF";
})(BasicColors || (BasicColors = {}));
var calculateRgba = function (color, opacity) {
if (Object.keys(BasicColors).includes(color)) {
color = BasicColors[color];
}
if (color[0] === "#") {
color = color.slice(1);
}
if (color.length === 3) {
var res_1 = "";
color.split("").forEach(function (c) {
res_1 += c;
res_1 += c;
});
color = res_1;
}
var rgbValues = (color.match(/.{2}/g) || [])
.map(function (hex) { return parseInt(hex, 16); })
.join(", ");
return "rgba(" + rgbValues + ", " + opacity + ")";
};
exports.calculateRgba = calculateRgba;

3
web/node_modules/react-spinners/helpers/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,3 @@
export * from "./proptypes";
export * from "./colors";
export * from "./unitConverter";

15
web/node_modules/react-spinners/helpers/index.js generated vendored Normal file
View file

@ -0,0 +1,15 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./proptypes"), exports);
__exportStar(require("./colors"), exports);
__exportStar(require("./unitConverter"), exports);

View file

@ -0,0 +1,5 @@
import { LoaderHeightWidthProps, LoaderSizeProps, LoaderSizeMarginProps, LoaderHeightWidthRadiusProps } from "../interfaces";
export declare function sizeDefaults(sizeValue: number): Required<LoaderSizeProps>;
export declare function sizeMarginDefaults(sizeValue: number): Required<LoaderSizeMarginProps>;
export declare function heightWidthDefaults(height: number, width: number): Required<LoaderHeightWidthProps>;
export declare function heightWidthRadiusDefaults(height: number, width: number, radius?: number): Required<LoaderHeightWidthRadiusProps>;

33
web/node_modules/react-spinners/helpers/proptypes.js generated vendored Normal file
View file

@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.heightWidthRadiusDefaults = exports.heightWidthDefaults = exports.sizeMarginDefaults = exports.sizeDefaults = void 0;
var commonValues = {
loading: true,
color: "#000000",
css: ""
};
function sizeDefaults(sizeValue) {
return Object.assign({}, commonValues, { size: sizeValue });
}
exports.sizeDefaults = sizeDefaults;
function sizeMarginDefaults(sizeValue) {
return Object.assign({}, sizeDefaults(sizeValue), {
margin: 2
});
}
exports.sizeMarginDefaults = sizeMarginDefaults;
function heightWidthDefaults(height, width) {
return Object.assign({}, commonValues, {
height: height,
width: width
});
}
exports.heightWidthDefaults = heightWidthDefaults;
function heightWidthRadiusDefaults(height, width, radius) {
if (radius === void 0) { radius = 2; }
return Object.assign({}, heightWidthDefaults(height, width), {
radius: radius,
margin: 2
});
}
exports.heightWidthRadiusDefaults = heightWidthRadiusDefaults;

View file

@ -0,0 +1,18 @@
import { LengthObject } from "../interfaces";
/**
* If size is a number, append px to the value as default unit.
* If size is a string, validate against list of valid units.
* If unit is valid, return size as is.
* If unit is invalid, console warn issue, replace with px as the unit.
*
* @param {(number | string)} size
* @return {LengthObject} LengthObject
*/
export declare function parseLengthAndUnit(size: number | string): LengthObject;
/**
* Take value as an input and return valid css value
*
* @param {(number | string)} value
* @return {string} valid css value
*/
export declare function cssValue(value: number | string): string;

View file

@ -0,0 +1,69 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cssValue = exports.parseLengthAndUnit = void 0;
var cssUnit = {
cm: true,
mm: true,
in: true,
px: true,
pt: true,
pc: true,
em: true,
ex: true,
ch: true,
rem: true,
vw: true,
vh: true,
vmin: true,
vmax: true,
"%": true
};
/**
* If size is a number, append px to the value as default unit.
* If size is a string, validate against list of valid units.
* If unit is valid, return size as is.
* If unit is invalid, console warn issue, replace with px as the unit.
*
* @param {(number | string)} size
* @return {LengthObject} LengthObject
*/
function parseLengthAndUnit(size) {
if (typeof size === "number") {
return {
value: size,
unit: "px"
};
}
var value;
var valueString = (size.match(/^[0-9.]*/) || "").toString();
if (valueString.includes(".")) {
value = parseFloat(valueString);
}
else {
value = parseInt(valueString, 10);
}
var unit = (size.match(/[^0-9]*$/) || "").toString();
if (cssUnit[unit]) {
return {
value: value,
unit: unit
};
}
console.warn("React Spinners: " + size + " is not a valid css value. Defaulting to " + value + "px.");
return {
value: value,
unit: "px"
};
}
exports.parseLengthAndUnit = parseLengthAndUnit;
/**
* Take value as an input and return valid css value
*
* @param {(number | string)} value
* @return {string} valid css value
*/
function cssValue(value) {
var lengthWithunit = parseLengthAndUnit(value);
return "" + lengthWithunit.value + lengthWithunit.unit;
}
exports.cssValue = cssValue;