@elliemae/ds-legacy-square-indicator 1.0.0-rc.1
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/DSSquareIndicator.js +100 -0
- package/dist/cjs/DSSquareIndicator.js.map +7 -0
- package/dist/cjs/constants.js +66 -0
- package/dist/cjs/constants.js.map +7 -0
- package/dist/cjs/index.js +37 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/react-desc-prop-types.js +67 -0
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/styled.js +124 -0
- package/dist/cjs/styled.js.map +7 -0
- package/dist/esm/DSSquareIndicator.js +70 -0
- package/dist/esm/DSSquareIndicator.js.map +7 -0
- package/dist/esm/constants.js +36 -0
- package/dist/esm/constants.js.map +7 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +7 -0
- package/dist/esm/react-desc-prop-types.js +37 -0
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/dist/esm/styled.js +94 -0
- package/dist/esm/styled.js.map +7 -0
- package/dist/types/DSSquareIndicator.d.ts +4 -0
- package/dist/types/constants.d.ts +28 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/react-desc-prop-types.d.ts +13 -0
- package/dist/types/styled.d.ts +9 -0
- package/package.json +77 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var DSSquareIndicator_exports = {};
|
|
30
|
+
__export(DSSquareIndicator_exports, {
|
|
31
|
+
DSSquareIndicator: () => DSSquareIndicator,
|
|
32
|
+
DSSquareIndicatorWithSchema: () => DSSquareIndicatorWithSchema
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(DSSquareIndicator_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_react = require("react");
|
|
38
|
+
var import_ds_legacy_grid = require("@elliemae/ds-legacy-grid");
|
|
39
|
+
var import_ds_legacy_tooltip = require("@elliemae/ds-legacy-tooltip");
|
|
40
|
+
var import_ds_legacy_props_helpers = require("@elliemae/ds-legacy-props-helpers");
|
|
41
|
+
var import_uid = require("uid");
|
|
42
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
43
|
+
var import_styled = require("./styled.js");
|
|
44
|
+
var import_constants = require("./constants.js");
|
|
45
|
+
const EmptyComp = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: props.children });
|
|
46
|
+
const DSSquareIndicator = (props) => {
|
|
47
|
+
const propsWithDefault = (0, import_ds_legacy_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
48
|
+
const { height, width, cols, rows, wrap, ...globalAttributes } = (0, import_ds_legacy_props_helpers.useGetGlobalAttributes)(propsWithDefault);
|
|
49
|
+
const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference } = propsWithDefault;
|
|
50
|
+
const Wrapper = (0, import_react.useMemo)(() => withTooltip ? import_ds_legacy_tooltip.DSTooltipV3 : EmptyComp, [withTooltip]);
|
|
51
|
+
const uniqueId = (0, import_react.useMemo)(() => (0, import_uid.uid)(16), []);
|
|
52
|
+
const paddedCoordinate = (0, import_react.useMemo)(() => `calc(100% - ${import_constants.sizeToWeight[size]})`, [size]);
|
|
53
|
+
const hexColor = (0, import_react.useMemo)(() => import_constants.colorToHex[color], [color]);
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_legacy_grid.Grid, { gutter: "xs", justifyContent: "center", role: "status", "aria-label": text || "Loading...", ...globalAttributes, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Wrapper, { text, textAlign: "center", startPlacementPreference: tooltipStartPlacementPreference, children: [
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
56
|
+
"svg",
|
|
57
|
+
{
|
|
58
|
+
width: import_constants.sizeToPx[size],
|
|
59
|
+
height: import_constants.sizeToPx[size],
|
|
60
|
+
style: {
|
|
61
|
+
display: "block",
|
|
62
|
+
margin: "auto"
|
|
63
|
+
},
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("defs", { children: [
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", { id: `${uniqueId}-lg1`, x1: "0", y1: "0", x2: "0", y2: "100%", children: [
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "20%", stopColor: `${hexColor}FF` }),
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "80%", stopColor: `${hexColor}00` })
|
|
69
|
+
] }),
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", { id: `${uniqueId}-lg2`, x1: "0", y1: "0", x2: "100%", y2: "0", children: [
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "10%", stopColor: `${hexColor}00` }),
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "50%", stopColor: `${hexColor}FF` })
|
|
73
|
+
] }),
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", { id: `${uniqueId}-lg3`, x1: "0", y1: "0", x2: "0", y2: "100%", children: [
|
|
75
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "10%", stopColor: `${hexColor}00` }),
|
|
76
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "50%", stopColor: `${hexColor}FF` })
|
|
77
|
+
] }),
|
|
78
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", { id: `${uniqueId}-lg4`, x1: "0", y1: "0", x2: "100%", y2: "0", children: [
|
|
79
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "50%", stopColor: `${hexColor}FF` }),
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "90%", stopColor: `${hexColor}00` })
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("clipPath", { id: `${uniqueId}-lcp1`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: import_constants.sizeToWeight[size], y: 0, width: "100%", height: import_constants.sizeToWeight[size] }) }),
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("clipPath", { id: `${uniqueId}-lcp2`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: paddedCoordinate, y: import_constants.sizeToWeight[size], width: import_constants.sizeToWeight[size], height: "100%" }) }),
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("clipPath", { id: `${uniqueId}-lcp3`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: 0, y: paddedCoordinate, width: paddedCoordinate, height: import_constants.sizeToWeight[size] }) })
|
|
85
|
+
] }),
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledLineLeft, { size, fill: `url(#${uniqueId}-lg1)` }),
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledLineTop, { size, fill: `url(#${uniqueId}-lg2)`, clipPath: `url(#${uniqueId}-lcp1)` }),
|
|
88
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledLineRight, { size, fill: `url(#${uniqueId}-lg3)`, clipPath: `url(#${uniqueId}-lcp2)` }),
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledLineBottom, { size, fill: `url(#${uniqueId}-lg4)`, clipPath: `url(#${uniqueId}-lcp3)` })
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
text !== "" && showText && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: import_constants.colorToHex[color], fontSize: import_constants.sizeToTextSize[size] }, children: text })
|
|
94
|
+
] }) });
|
|
95
|
+
};
|
|
96
|
+
DSSquareIndicator.propTypes = import_react_desc_prop_types.SquareIndicatorPropTypes;
|
|
97
|
+
DSSquareIndicator.displayName = "DSSquareIndicator";
|
|
98
|
+
const DSSquareIndicatorWithSchema = (0, import_ds_legacy_props_helpers.describe)(DSSquareIndicator);
|
|
99
|
+
DSSquareIndicatorWithSchema.propTypes = import_react_desc_prop_types.SquareIndicatorPropTypes;
|
|
100
|
+
//# sourceMappingURL=DSSquareIndicator.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/DSSquareIndicator.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/naming-convention */\nimport React, { useMemo } from 'react';\nimport { Grid } from '@elliemae/ds-legacy-grid';\nimport { DSTooltipV3 } from '@elliemae/ds-legacy-tooltip';\nimport { describe, useGetGlobalAttributes, useMemoMergePropsWithDefault } from '@elliemae/ds-legacy-props-helpers';\nimport { uid } from 'uid';\nimport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\nimport { defaultProps, SquareIndicatorPropTypes } from './react-desc-prop-types.js';\nimport { StyledLineLeft, StyledLineTop, StyledLineRight, StyledLineBottom } from './styled.js';\nimport { colorToHex, sizeToPx, sizeToTextSize, sizeToWeight } from './constants.js';\n\n// eslint-disable-next-line react/jsx-no-useless-fragment\nconst EmptyComp: typeof DSTooltipV3 = (props) => <>{props.children}</>;\n\nexport const DSSquareIndicator: React.ComponentType<DSSquareIndicatorT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<Required<DSSquareIndicatorT.Props>>(props, defaultProps);\n // eslint-disable-next-line no-unused-vars\n const { height, width, cols, rows, wrap, ...globalAttributes } = useGetGlobalAttributes(propsWithDefault);\n\n const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference } = propsWithDefault;\n\n const Wrapper: typeof DSTooltipV3 = useMemo(() => (withTooltip ? DSTooltipV3 : EmptyComp), [withTooltip]);\n\n const uniqueId = useMemo(() => uid(16), []);\n const paddedCoordinate = useMemo(() => `calc(100% - ${sizeToWeight[size]})`, [size]);\n\n const hexColor = useMemo(() => colorToHex[color], [color]);\n\n return (\n <Grid gutter=\"xs\" justifyContent=\"center\" role=\"status\" aria-label={text || 'Loading...'} {...globalAttributes}>\n <Wrapper text={text} textAlign=\"center\" startPlacementPreference={tooltipStartPlacementPreference}>\n <svg\n width={sizeToPx[size]}\n height={sizeToPx[size]}\n style={{\n display: 'block',\n margin: 'auto',\n }}\n >\n <defs>\n <linearGradient id={`${uniqueId}-lg1`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"100%\">\n <stop offset=\"20%\" stopColor={`${hexColor}FF`} />\n <stop offset=\"80%\" stopColor={`${hexColor}00`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg2`} x1=\"0\" y1=\"0\" x2=\"100%\" y2=\"0\">\n <stop offset=\"10%\" stopColor={`${hexColor}00`} />\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg3`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"100%\">\n <stop offset=\"10%\" stopColor={`${hexColor}00`} />\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg4`} x1=\"0\" y1=\"0\" x2=\"100%\" y2=\"0\">\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n <stop offset=\"90%\" stopColor={`${hexColor}00`} />\n </linearGradient>\n <clipPath id={`${uniqueId}-lcp1`}>\n <rect x={sizeToWeight[size]} y={0} width=\"100%\" height={sizeToWeight[size]} />\n </clipPath>\n <clipPath id={`${uniqueId}-lcp2`}>\n <rect x={paddedCoordinate} y={sizeToWeight[size]} width={sizeToWeight[size]} height=\"100%\" />\n </clipPath>\n <clipPath id={`${uniqueId}-lcp3`}>\n <rect x={0} y={paddedCoordinate} width={paddedCoordinate} height={sizeToWeight[size]} />\n </clipPath>\n </defs>\n <StyledLineLeft size={size} fill={`url(#${uniqueId}-lg1)`} />\n <StyledLineTop size={size} fill={`url(#${uniqueId}-lg2)`} clipPath={`url(#${uniqueId}-lcp1)`} />\n <StyledLineRight size={size} fill={`url(#${uniqueId}-lg3)`} clipPath={`url(#${uniqueId}-lcp2)`} />\n <StyledLineBottom size={size} fill={`url(#${uniqueId}-lg4)`} clipPath={`url(#${uniqueId}-lcp3)`} />\n </svg>\n {text !== '' && showText && (\n <span style={{ color: colorToHex[color], fontSize: sizeToTextSize[size] }}>{text}</span>\n )}\n </Wrapper>\n </Grid>\n );\n};\n\nDSSquareIndicator.propTypes = SquareIndicatorPropTypes;\nDSSquareIndicator.displayName = 'DSSquareIndicator';\nexport const DSSquareIndicatorWithSchema = describe(DSSquareIndicator);\nDSSquareIndicatorWithSchema.propTypes = SquareIndicatorPropTypes;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var constants_exports = {};
|
|
30
|
+
__export(constants_exports, {
|
|
31
|
+
colorToHex: () => colorToHex,
|
|
32
|
+
sizeToPx: () => sizeToPx,
|
|
33
|
+
sizeToTextSize: () => sizeToTextSize,
|
|
34
|
+
sizeToWeight: () => sizeToWeight
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(constants_exports);
|
|
37
|
+
var React = __toESM(require("react"));
|
|
38
|
+
const sizeToPx = {
|
|
39
|
+
xs: "16px",
|
|
40
|
+
s: "24px",
|
|
41
|
+
m: "32px",
|
|
42
|
+
l: "48px",
|
|
43
|
+
xl: "56px",
|
|
44
|
+
xxl: "64px"
|
|
45
|
+
};
|
|
46
|
+
const sizeToWeight = {
|
|
47
|
+
xs: "3px",
|
|
48
|
+
s: "3px",
|
|
49
|
+
m: "3px",
|
|
50
|
+
l: "4px",
|
|
51
|
+
xl: "5px",
|
|
52
|
+
xxl: "6px"
|
|
53
|
+
};
|
|
54
|
+
const colorToHex = {
|
|
55
|
+
light: "#FFFFFF",
|
|
56
|
+
dark: "#0F364A"
|
|
57
|
+
};
|
|
58
|
+
const sizeToTextSize = {
|
|
59
|
+
xs: "12px",
|
|
60
|
+
s: "12px",
|
|
61
|
+
m: "12px",
|
|
62
|
+
l: "13px",
|
|
63
|
+
xl: "14px",
|
|
64
|
+
xxl: "16px"
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/constants.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export const sizeToPx = {\n xs: '16px',\n s: '24px',\n m: '32px',\n l: '48px',\n xl: '56px',\n xxl: '64px',\n};\n\nexport const sizeToWeight = {\n xs: '3px',\n s: '3px',\n m: '3px',\n l: '4px',\n xl: '5px',\n xxl: '6px',\n};\n\nexport const colorToHex = {\n light: '#FFFFFF',\n dark: '#0F364A',\n};\n\nexport const sizeToTextSize = {\n xs: '12px',\n s: '12px',\n m: '12px',\n l: '13px',\n xl: '14px',\n xxl: '16px',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,WAAW;AAAA,EACtB,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;AAEO,MAAM,eAAe;AAAA,EAC1B,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;AAEO,MAAM,aAAa;AAAA,EACxB,OAAO;AAAA,EACP,MAAM;AACR;AAEO,MAAM,iBAAiB;AAAA,EAC5B,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var src_exports = {};
|
|
30
|
+
__export(src_exports, {
|
|
31
|
+
DSSquareIndicator: () => import_DSSquareIndicator.DSSquareIndicator,
|
|
32
|
+
DSSquareIndicatorWithSchema: () => import_DSSquareIndicator.DSSquareIndicatorWithSchema
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(src_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_DSSquareIndicator = require("./DSSquareIndicator.js");
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export { DSSquareIndicator, DSSquareIndicatorWithSchema } from './DSSquareIndicator.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAA+D;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var react_desc_prop_types_exports = {};
|
|
30
|
+
__export(react_desc_prop_types_exports, {
|
|
31
|
+
SquareIndicatorPropTypes: () => SquareIndicatorPropTypes,
|
|
32
|
+
defaultProps: () => defaultProps
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_ds_legacy_props_helpers = require("@elliemae/ds-legacy-props-helpers");
|
|
37
|
+
const SquareIndicatorPropTypes = {
|
|
38
|
+
...import_ds_legacy_props_helpers.globalAttributesPropTypes,
|
|
39
|
+
size: import_ds_legacy_props_helpers.PropTypes.oneOf(["xs", "s", "m", "l", "xl", "xxl"]).description("Size of the indicator").defaultValue("m"),
|
|
40
|
+
color: import_ds_legacy_props_helpers.PropTypes.oneOf(["light", "dark"]).description("Color mode for the indicator").defaultValue("dark"),
|
|
41
|
+
text: import_ds_legacy_props_helpers.PropTypes.string.description("Optional text to show under the indicator").defaultValue(""),
|
|
42
|
+
showText: import_ds_legacy_props_helpers.PropTypes.bool.description("Whether to show the optional text or not").defaultValue(true),
|
|
43
|
+
withTooltip: import_ds_legacy_props_helpers.PropTypes.bool.description("Whether to include a tooltip that shows the optional text on hover").defaultValue(false),
|
|
44
|
+
tooltipStartPlacementPreference: import_ds_legacy_props_helpers.PropTypes.oneOf([
|
|
45
|
+
"top-start",
|
|
46
|
+
"top",
|
|
47
|
+
"top-end",
|
|
48
|
+
"right-start",
|
|
49
|
+
"right",
|
|
50
|
+
"right-end",
|
|
51
|
+
"bottom-end",
|
|
52
|
+
"bottom",
|
|
53
|
+
"bottom-start",
|
|
54
|
+
"left-end",
|
|
55
|
+
"left",
|
|
56
|
+
"left-start"
|
|
57
|
+
]).description("start placement preference for the tooltip").defaultValue("center")
|
|
58
|
+
};
|
|
59
|
+
const defaultProps = {
|
|
60
|
+
size: "m",
|
|
61
|
+
color: "dark",
|
|
62
|
+
text: "",
|
|
63
|
+
showText: true,
|
|
64
|
+
withTooltip: false,
|
|
65
|
+
tooltipStartPlacementPreference: "bottom"
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\n\nimport { PropTypes, globalAttributesPropTypes } from '@elliemae/ds-legacy-props-helpers';\nimport type { WeakValidationMap } from 'react';\n\nexport declare namespace DSSquareIndicatorT {\n interface Props {\n size?: 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n color?: 'light' | 'dark';\n text?: string;\n showText?: boolean;\n withTooltip: boolean;\n tooltipStartPlacementPreference?:\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n }\n}\n\nexport const SquareIndicatorPropTypes = {\n ...globalAttributesPropTypes,\n size: PropTypes.oneOf(['xs', 's', 'm', 'l', 'xl', 'xxl']).description('Size of the indicator').defaultValue('m'),\n color: PropTypes.oneOf(['light', 'dark']).description('Color mode for the indicator').defaultValue('dark'),\n text: PropTypes.string.description('Optional text to show under the indicator').defaultValue(''),\n showText: PropTypes.bool.description('Whether to show the optional text or not').defaultValue(true),\n withTooltip: PropTypes.bool\n .description('Whether to include a tooltip that shows the optional text on hover')\n .defaultValue(false),\n tooltipStartPlacementPreference: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preference for the tooltip')\n .defaultValue('center'),\n} as WeakValidationMap<unknown>;\n\nexport const defaultProps: DSSquareIndicatorT.Props = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,qCAAqD;AA0B9C,MAAM,2BAA2B;AAAA,EACtC,GAAG;AAAA,EACH,MAAM,yCAAU,MAAM,CAAC,MAAM,KAAK,KAAK,KAAK,MAAM,KAAK,CAAC,EAAE,YAAY,uBAAuB,EAAE,aAAa,GAAG;AAAA,EAC/G,OAAO,yCAAU,MAAM,CAAC,SAAS,MAAM,CAAC,EAAE,YAAY,8BAA8B,EAAE,aAAa,MAAM;AAAA,EACzG,MAAM,yCAAU,OAAO,YAAY,2CAA2C,EAAE,aAAa,EAAE;AAAA,EAC/F,UAAU,yCAAU,KAAK,YAAY,0CAA0C,EAAE,aAAa,IAAI;AAAA,EAClG,aAAa,yCAAU,KACpB,YAAY,oEAAoE,EAChF,aAAa,KAAK;AAAA,EACrB,iCAAiC,yCAAU,MAAM;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,4CAA4C,EACxD,aAAa,QAAQ;AAC1B;AAEO,MAAM,eAAyC;AAAA,EACpD,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var styled_exports = {};
|
|
30
|
+
__export(styled_exports, {
|
|
31
|
+
StyledLineBottom: () => StyledLineBottom,
|
|
32
|
+
StyledLineLeft: () => StyledLineLeft,
|
|
33
|
+
StyledLineRight: () => StyledLineRight,
|
|
34
|
+
StyledLineTop: () => StyledLineTop
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(styled_exports);
|
|
37
|
+
var React = __toESM(require("react"));
|
|
38
|
+
var import_ds_legacy_system = require("@elliemae/ds-legacy-system");
|
|
39
|
+
var import_constants = require("./constants.js");
|
|
40
|
+
const lineLeftAnimation = import_ds_legacy_system.kfrm`
|
|
41
|
+
0% {
|
|
42
|
+
y: 100%;
|
|
43
|
+
height: 100%;
|
|
44
|
+
}
|
|
45
|
+
12.5%, 50% {
|
|
46
|
+
y: 0;
|
|
47
|
+
height: 100%;
|
|
48
|
+
}
|
|
49
|
+
62.5%, 100% {
|
|
50
|
+
y: -100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
const lineTopAnimation = import_ds_legacy_system.kfrm`
|
|
55
|
+
0% {
|
|
56
|
+
x: -100%;
|
|
57
|
+
width: 0%;
|
|
58
|
+
}
|
|
59
|
+
25%, 50% {
|
|
60
|
+
x: -100%;
|
|
61
|
+
width: 200%;
|
|
62
|
+
}
|
|
63
|
+
75%, 100% {
|
|
64
|
+
x: 100%;
|
|
65
|
+
width: 200%;
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
const lineRightAnimation = import_ds_legacy_system.kfrm`
|
|
69
|
+
0%, 12.5% {
|
|
70
|
+
y: -100%;
|
|
71
|
+
height: 0%;
|
|
72
|
+
}
|
|
73
|
+
37.5%, 62.5% {
|
|
74
|
+
y: -100%;
|
|
75
|
+
height: 200%;
|
|
76
|
+
}
|
|
77
|
+
87.5%, 100% {
|
|
78
|
+
y: 100%;
|
|
79
|
+
height: 200%;
|
|
80
|
+
}
|
|
81
|
+
`;
|
|
82
|
+
const lineBottomAnimation = import_ds_legacy_system.kfrm`
|
|
83
|
+
0%, 25% {
|
|
84
|
+
x: 200%;
|
|
85
|
+
width: 200%;
|
|
86
|
+
}
|
|
87
|
+
50%, 75% {
|
|
88
|
+
x: 0%;
|
|
89
|
+
width: 200%;
|
|
90
|
+
}
|
|
91
|
+
100% {
|
|
92
|
+
x: -200%;
|
|
93
|
+
width: 200%;
|
|
94
|
+
}
|
|
95
|
+
`;
|
|
96
|
+
const StyledLineLeft = import_ds_legacy_system.styled.rect`
|
|
97
|
+
x: 0;
|
|
98
|
+
y: 0%;
|
|
99
|
+
width: ${({ size }) => import_constants.sizeToWeight[size]};
|
|
100
|
+
height: 100%;
|
|
101
|
+
animation: ${lineLeftAnimation} 2.5s linear 0s infinite;
|
|
102
|
+
`;
|
|
103
|
+
const StyledLineTop = import_ds_legacy_system.styled.rect`
|
|
104
|
+
x: -100%;
|
|
105
|
+
y: 0;
|
|
106
|
+
width: 200%;
|
|
107
|
+
height: ${({ size }) => import_constants.sizeToWeight[size]};
|
|
108
|
+
animation: ${lineTopAnimation} 2.5s linear 0s infinite;
|
|
109
|
+
`;
|
|
110
|
+
const StyledLineRight = import_ds_legacy_system.styled.rect`
|
|
111
|
+
x: calc(100% - ${({ size }) => import_constants.sizeToWeight[size]});
|
|
112
|
+
y: -100%;
|
|
113
|
+
width: ${({ size }) => import_constants.sizeToWeight[size]};
|
|
114
|
+
height: 200%;
|
|
115
|
+
animation: ${lineRightAnimation} 2.5s linear 0s infinite;
|
|
116
|
+
`;
|
|
117
|
+
const StyledLineBottom = import_ds_legacy_system.styled.rect`
|
|
118
|
+
x: 0%;
|
|
119
|
+
y: calc(100% - ${({ size }) => import_constants.sizeToWeight[size]});
|
|
120
|
+
width: 200%;
|
|
121
|
+
height: ${({ size }) => import_constants.sizeToWeight[size]};
|
|
122
|
+
animation: ${lineBottomAnimation} 2.5s linear 0s infinite;
|
|
123
|
+
`;
|
|
124
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { kfrm, styled } from '@elliemae/ds-legacy-system';\nimport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\nimport { sizeToWeight } from './constants.js';\n\ninterface RectProps {\n size: Required<DSSquareIndicatorT.Props>['size'];\n}\n\nconst lineLeftAnimation = kfrm`\n 0% {\n y: 100%;\n height: 100%;\n }\n 12.5%, 50% {\n y: 0;\n height: 100%;\n }\n 62.5%, 100% {\n y: -100%;\n height: 100%;\n }\n`;\n\nconst lineTopAnimation = kfrm`\n 0% {\n x: -100%;\n width: 0%;\n }\n 25%, 50% {\n x: -100%;\n width: 200%;\n }\n 75%, 100% {\n x: 100%;\n width: 200%;\n }\n`;\n\nconst lineRightAnimation = kfrm`\n 0%, 12.5% {\n y: -100%;\n height: 0%;\n }\n 37.5%, 62.5% {\n y: -100%;\n height: 200%;\n }\n 87.5%, 100% {\n y: 100%;\n height: 200%;\n }\n`;\n\nconst lineBottomAnimation = kfrm`\n 0%, 25% {\n x: 200%;\n width: 200%;\n }\n 50%, 75% {\n x: 0%;\n width: 200%;\n }\n 100% {\n x: -200%;\n width: 200%;\n }\n`;\n\nexport const StyledLineLeft = styled.rect<RectProps>`\n x: 0;\n y: 0%;\n width: ${({ size }) => sizeToWeight[size]};\n height: 100%;\n animation: ${lineLeftAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineTop = styled.rect<RectProps>`\n x: -100%;\n y: 0;\n width: 200%;\n height: ${({ size }) => sizeToWeight[size]};\n animation: ${lineTopAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineRight = styled.rect<RectProps>`\n x: calc(100% - ${({ size }) => sizeToWeight[size]});\n y: -100%;\n width: ${({ size }) => sizeToWeight[size]};\n height: 200%;\n animation: ${lineRightAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineBottom = styled.rect<RectProps>`\n x: 0%;\n y: calc(100% - ${({ size }) => sizeToWeight[size]});\n width: 200%;\n height: ${({ size }) => sizeToWeight[size]};\n animation: ${lineBottomAnimation} 2.5s linear 0s infinite;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA6B;AAE7B,uBAA6B;AAM7B,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAe1B,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAezB,MAAM,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAe3B,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAerB,MAAM,iBAAiB,+BAAO;AAAA;AAAA;AAAA,WAG1B,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI;AAAA;AAAA,eAE3B;AAAA;AAGR,MAAM,gBAAgB,+BAAO;AAAA;AAAA;AAAA;AAAA,YAIxB,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI;AAAA,eAC5B;AAAA;AAGR,MAAM,kBAAkB,+BAAO;AAAA,mBACnB,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI;AAAA;AAAA,WAEvC,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI;AAAA;AAAA,eAE3B;AAAA;AAGR,MAAM,mBAAmB,+BAAO;AAAA;AAAA,mBAEpB,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI;AAAA;AAAA,YAEtC,CAAC,EAAE,KAAK,MAAM,8BAAa,IAAI;AAAA,eAC5B;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { Grid } from "@elliemae/ds-legacy-grid";
|
|
5
|
+
import { DSTooltipV3 } from "@elliemae/ds-legacy-tooltip";
|
|
6
|
+
import { describe, useGetGlobalAttributes, useMemoMergePropsWithDefault } from "@elliemae/ds-legacy-props-helpers";
|
|
7
|
+
import { uid } from "uid";
|
|
8
|
+
import { defaultProps, SquareIndicatorPropTypes } from "./react-desc-prop-types.js";
|
|
9
|
+
import { StyledLineLeft, StyledLineTop, StyledLineRight, StyledLineBottom } from "./styled.js";
|
|
10
|
+
import { colorToHex, sizeToPx, sizeToTextSize, sizeToWeight } from "./constants.js";
|
|
11
|
+
const EmptyComp = (props) => /* @__PURE__ */ jsx(Fragment, { children: props.children });
|
|
12
|
+
const DSSquareIndicator = (props) => {
|
|
13
|
+
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
14
|
+
const { height, width, cols, rows, wrap, ...globalAttributes } = useGetGlobalAttributes(propsWithDefault);
|
|
15
|
+
const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference } = propsWithDefault;
|
|
16
|
+
const Wrapper = useMemo(() => withTooltip ? DSTooltipV3 : EmptyComp, [withTooltip]);
|
|
17
|
+
const uniqueId = useMemo(() => uid(16), []);
|
|
18
|
+
const paddedCoordinate = useMemo(() => `calc(100% - ${sizeToWeight[size]})`, [size]);
|
|
19
|
+
const hexColor = useMemo(() => colorToHex[color], [color]);
|
|
20
|
+
return /* @__PURE__ */ jsx(Grid, { gutter: "xs", justifyContent: "center", role: "status", "aria-label": text || "Loading...", ...globalAttributes, children: /* @__PURE__ */ jsxs(Wrapper, { text, textAlign: "center", startPlacementPreference: tooltipStartPlacementPreference, children: [
|
|
21
|
+
/* @__PURE__ */ jsxs(
|
|
22
|
+
"svg",
|
|
23
|
+
{
|
|
24
|
+
width: sizeToPx[size],
|
|
25
|
+
height: sizeToPx[size],
|
|
26
|
+
style: {
|
|
27
|
+
display: "block",
|
|
28
|
+
margin: "auto"
|
|
29
|
+
},
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
32
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: `${uniqueId}-lg1`, x1: "0", y1: "0", x2: "0", y2: "100%", children: [
|
|
33
|
+
/* @__PURE__ */ jsx("stop", { offset: "20%", stopColor: `${hexColor}FF` }),
|
|
34
|
+
/* @__PURE__ */ jsx("stop", { offset: "80%", stopColor: `${hexColor}00` })
|
|
35
|
+
] }),
|
|
36
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: `${uniqueId}-lg2`, x1: "0", y1: "0", x2: "100%", y2: "0", children: [
|
|
37
|
+
/* @__PURE__ */ jsx("stop", { offset: "10%", stopColor: `${hexColor}00` }),
|
|
38
|
+
/* @__PURE__ */ jsx("stop", { offset: "50%", stopColor: `${hexColor}FF` })
|
|
39
|
+
] }),
|
|
40
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: `${uniqueId}-lg3`, x1: "0", y1: "0", x2: "0", y2: "100%", children: [
|
|
41
|
+
/* @__PURE__ */ jsx("stop", { offset: "10%", stopColor: `${hexColor}00` }),
|
|
42
|
+
/* @__PURE__ */ jsx("stop", { offset: "50%", stopColor: `${hexColor}FF` })
|
|
43
|
+
] }),
|
|
44
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: `${uniqueId}-lg4`, x1: "0", y1: "0", x2: "100%", y2: "0", children: [
|
|
45
|
+
/* @__PURE__ */ jsx("stop", { offset: "50%", stopColor: `${hexColor}FF` }),
|
|
46
|
+
/* @__PURE__ */ jsx("stop", { offset: "90%", stopColor: `${hexColor}00` })
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ jsx("clipPath", { id: `${uniqueId}-lcp1`, children: /* @__PURE__ */ jsx("rect", { x: sizeToWeight[size], y: 0, width: "100%", height: sizeToWeight[size] }) }),
|
|
49
|
+
/* @__PURE__ */ jsx("clipPath", { id: `${uniqueId}-lcp2`, children: /* @__PURE__ */ jsx("rect", { x: paddedCoordinate, y: sizeToWeight[size], width: sizeToWeight[size], height: "100%" }) }),
|
|
50
|
+
/* @__PURE__ */ jsx("clipPath", { id: `${uniqueId}-lcp3`, children: /* @__PURE__ */ jsx("rect", { x: 0, y: paddedCoordinate, width: paddedCoordinate, height: sizeToWeight[size] }) })
|
|
51
|
+
] }),
|
|
52
|
+
/* @__PURE__ */ jsx(StyledLineLeft, { size, fill: `url(#${uniqueId}-lg1)` }),
|
|
53
|
+
/* @__PURE__ */ jsx(StyledLineTop, { size, fill: `url(#${uniqueId}-lg2)`, clipPath: `url(#${uniqueId}-lcp1)` }),
|
|
54
|
+
/* @__PURE__ */ jsx(StyledLineRight, { size, fill: `url(#${uniqueId}-lg3)`, clipPath: `url(#${uniqueId}-lcp2)` }),
|
|
55
|
+
/* @__PURE__ */ jsx(StyledLineBottom, { size, fill: `url(#${uniqueId}-lg4)`, clipPath: `url(#${uniqueId}-lcp3)` })
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
text !== "" && showText && /* @__PURE__ */ jsx("span", { style: { color: colorToHex[color], fontSize: sizeToTextSize[size] }, children: text })
|
|
60
|
+
] }) });
|
|
61
|
+
};
|
|
62
|
+
DSSquareIndicator.propTypes = SquareIndicatorPropTypes;
|
|
63
|
+
DSSquareIndicator.displayName = "DSSquareIndicator";
|
|
64
|
+
const DSSquareIndicatorWithSchema = describe(DSSquareIndicator);
|
|
65
|
+
DSSquareIndicatorWithSchema.propTypes = SquareIndicatorPropTypes;
|
|
66
|
+
export {
|
|
67
|
+
DSSquareIndicator,
|
|
68
|
+
DSSquareIndicatorWithSchema
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=DSSquareIndicator.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSSquareIndicator.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/naming-convention */\nimport React, { useMemo } from 'react';\nimport { Grid } from '@elliemae/ds-legacy-grid';\nimport { DSTooltipV3 } from '@elliemae/ds-legacy-tooltip';\nimport { describe, useGetGlobalAttributes, useMemoMergePropsWithDefault } from '@elliemae/ds-legacy-props-helpers';\nimport { uid } from 'uid';\nimport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\nimport { defaultProps, SquareIndicatorPropTypes } from './react-desc-prop-types.js';\nimport { StyledLineLeft, StyledLineTop, StyledLineRight, StyledLineBottom } from './styled.js';\nimport { colorToHex, sizeToPx, sizeToTextSize, sizeToWeight } from './constants.js';\n\n// eslint-disable-next-line react/jsx-no-useless-fragment\nconst EmptyComp: typeof DSTooltipV3 = (props) => <>{props.children}</>;\n\nexport const DSSquareIndicator: React.ComponentType<DSSquareIndicatorT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<Required<DSSquareIndicatorT.Props>>(props, defaultProps);\n // eslint-disable-next-line no-unused-vars\n const { height, width, cols, rows, wrap, ...globalAttributes } = useGetGlobalAttributes(propsWithDefault);\n\n const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference } = propsWithDefault;\n\n const Wrapper: typeof DSTooltipV3 = useMemo(() => (withTooltip ? DSTooltipV3 : EmptyComp), [withTooltip]);\n\n const uniqueId = useMemo(() => uid(16), []);\n const paddedCoordinate = useMemo(() => `calc(100% - ${sizeToWeight[size]})`, [size]);\n\n const hexColor = useMemo(() => colorToHex[color], [color]);\n\n return (\n <Grid gutter=\"xs\" justifyContent=\"center\" role=\"status\" aria-label={text || 'Loading...'} {...globalAttributes}>\n <Wrapper text={text} textAlign=\"center\" startPlacementPreference={tooltipStartPlacementPreference}>\n <svg\n width={sizeToPx[size]}\n height={sizeToPx[size]}\n style={{\n display: 'block',\n margin: 'auto',\n }}\n >\n <defs>\n <linearGradient id={`${uniqueId}-lg1`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"100%\">\n <stop offset=\"20%\" stopColor={`${hexColor}FF`} />\n <stop offset=\"80%\" stopColor={`${hexColor}00`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg2`} x1=\"0\" y1=\"0\" x2=\"100%\" y2=\"0\">\n <stop offset=\"10%\" stopColor={`${hexColor}00`} />\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg3`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"100%\">\n <stop offset=\"10%\" stopColor={`${hexColor}00`} />\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n </linearGradient>\n <linearGradient id={`${uniqueId}-lg4`} x1=\"0\" y1=\"0\" x2=\"100%\" y2=\"0\">\n <stop offset=\"50%\" stopColor={`${hexColor}FF`} />\n <stop offset=\"90%\" stopColor={`${hexColor}00`} />\n </linearGradient>\n <clipPath id={`${uniqueId}-lcp1`}>\n <rect x={sizeToWeight[size]} y={0} width=\"100%\" height={sizeToWeight[size]} />\n </clipPath>\n <clipPath id={`${uniqueId}-lcp2`}>\n <rect x={paddedCoordinate} y={sizeToWeight[size]} width={sizeToWeight[size]} height=\"100%\" />\n </clipPath>\n <clipPath id={`${uniqueId}-lcp3`}>\n <rect x={0} y={paddedCoordinate} width={paddedCoordinate} height={sizeToWeight[size]} />\n </clipPath>\n </defs>\n <StyledLineLeft size={size} fill={`url(#${uniqueId}-lg1)`} />\n <StyledLineTop size={size} fill={`url(#${uniqueId}-lg2)`} clipPath={`url(#${uniqueId}-lcp1)`} />\n <StyledLineRight size={size} fill={`url(#${uniqueId}-lg3)`} clipPath={`url(#${uniqueId}-lcp2)`} />\n <StyledLineBottom size={size} fill={`url(#${uniqueId}-lg4)`} clipPath={`url(#${uniqueId}-lcp3)`} />\n </svg>\n {text !== '' && showText && (\n <span style={{ color: colorToHex[color], fontSize: sizeToTextSize[size] }}>{text}</span>\n )}\n </Wrapper>\n </Grid>\n );\n};\n\nDSSquareIndicator.propTypes = SquareIndicatorPropTypes;\nDSSquareIndicator.displayName = 'DSSquareIndicator';\nexport const DSSquareIndicatorWithSchema = describe(DSSquareIndicator);\nDSSquareIndicatorWithSchema.propTypes = SquareIndicatorPropTypes;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const sizeToPx = {
|
|
3
|
+
xs: "16px",
|
|
4
|
+
s: "24px",
|
|
5
|
+
m: "32px",
|
|
6
|
+
l: "48px",
|
|
7
|
+
xl: "56px",
|
|
8
|
+
xxl: "64px"
|
|
9
|
+
};
|
|
10
|
+
const sizeToWeight = {
|
|
11
|
+
xs: "3px",
|
|
12
|
+
s: "3px",
|
|
13
|
+
m: "3px",
|
|
14
|
+
l: "4px",
|
|
15
|
+
xl: "5px",
|
|
16
|
+
xxl: "6px"
|
|
17
|
+
};
|
|
18
|
+
const colorToHex = {
|
|
19
|
+
light: "#FFFFFF",
|
|
20
|
+
dark: "#0F364A"
|
|
21
|
+
};
|
|
22
|
+
const sizeToTextSize = {
|
|
23
|
+
xs: "12px",
|
|
24
|
+
s: "12px",
|
|
25
|
+
m: "12px",
|
|
26
|
+
l: "13px",
|
|
27
|
+
xl: "14px",
|
|
28
|
+
xxl: "16px"
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
colorToHex,
|
|
32
|
+
sizeToPx,
|
|
33
|
+
sizeToTextSize,
|
|
34
|
+
sizeToWeight
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/constants.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const sizeToPx = {\n xs: '16px',\n s: '24px',\n m: '32px',\n l: '48px',\n xl: '56px',\n xxl: '64px',\n};\n\nexport const sizeToWeight = {\n xs: '3px',\n s: '3px',\n m: '3px',\n l: '4px',\n xl: '5px',\n xxl: '6px',\n};\n\nexport const colorToHex = {\n light: '#FFFFFF',\n dark: '#0F364A',\n};\n\nexport const sizeToTextSize = {\n xs: '12px',\n s: '12px',\n m: '12px',\n l: '13px',\n xl: '14px',\n xxl: '16px',\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,WAAW;AAAA,EACtB,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;AAEO,MAAM,eAAe;AAAA,EAC1B,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;AAEO,MAAM,aAAa;AAAA,EACxB,OAAO;AAAA,EACP,MAAM;AACR;AAEO,MAAM,iBAAiB;AAAA,EAC5B,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AACP;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSSquareIndicator, DSSquareIndicatorWithSchema } from './DSSquareIndicator.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,mBAAmB,mCAAmC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { PropTypes, globalAttributesPropTypes } from "@elliemae/ds-legacy-props-helpers";
|
|
3
|
+
const SquareIndicatorPropTypes = {
|
|
4
|
+
...globalAttributesPropTypes,
|
|
5
|
+
size: PropTypes.oneOf(["xs", "s", "m", "l", "xl", "xxl"]).description("Size of the indicator").defaultValue("m"),
|
|
6
|
+
color: PropTypes.oneOf(["light", "dark"]).description("Color mode for the indicator").defaultValue("dark"),
|
|
7
|
+
text: PropTypes.string.description("Optional text to show under the indicator").defaultValue(""),
|
|
8
|
+
showText: PropTypes.bool.description("Whether to show the optional text or not").defaultValue(true),
|
|
9
|
+
withTooltip: PropTypes.bool.description("Whether to include a tooltip that shows the optional text on hover").defaultValue(false),
|
|
10
|
+
tooltipStartPlacementPreference: PropTypes.oneOf([
|
|
11
|
+
"top-start",
|
|
12
|
+
"top",
|
|
13
|
+
"top-end",
|
|
14
|
+
"right-start",
|
|
15
|
+
"right",
|
|
16
|
+
"right-end",
|
|
17
|
+
"bottom-end",
|
|
18
|
+
"bottom",
|
|
19
|
+
"bottom-start",
|
|
20
|
+
"left-end",
|
|
21
|
+
"left",
|
|
22
|
+
"left-start"
|
|
23
|
+
]).description("start placement preference for the tooltip").defaultValue("center")
|
|
24
|
+
};
|
|
25
|
+
const defaultProps = {
|
|
26
|
+
size: "m",
|
|
27
|
+
color: "dark",
|
|
28
|
+
text: "",
|
|
29
|
+
showText: true,
|
|
30
|
+
withTooltip: false,
|
|
31
|
+
tooltipStartPlacementPreference: "bottom"
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
SquareIndicatorPropTypes,
|
|
35
|
+
defaultProps
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n\nimport { PropTypes, globalAttributesPropTypes } from '@elliemae/ds-legacy-props-helpers';\nimport type { WeakValidationMap } from 'react';\n\nexport declare namespace DSSquareIndicatorT {\n interface Props {\n size?: 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n color?: 'light' | 'dark';\n text?: string;\n showText?: boolean;\n withTooltip: boolean;\n tooltipStartPlacementPreference?:\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n }\n}\n\nexport const SquareIndicatorPropTypes = {\n ...globalAttributesPropTypes,\n size: PropTypes.oneOf(['xs', 's', 'm', 'l', 'xl', 'xxl']).description('Size of the indicator').defaultValue('m'),\n color: PropTypes.oneOf(['light', 'dark']).description('Color mode for the indicator').defaultValue('dark'),\n text: PropTypes.string.description('Optional text to show under the indicator').defaultValue(''),\n showText: PropTypes.bool.description('Whether to show the optional text or not').defaultValue(true),\n withTooltip: PropTypes.bool\n .description('Whether to include a tooltip that shows the optional text on hover')\n .defaultValue(false),\n tooltipStartPlacementPreference: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preference for the tooltip')\n .defaultValue('center'),\n} as WeakValidationMap<unknown>;\n\nexport const defaultProps: DSSquareIndicatorT.Props = {\n size: 'm',\n color: 'dark',\n text: '',\n showText: true,\n withTooltip: false,\n tooltipStartPlacementPreference: 'bottom',\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,WAAW,iCAAiC;AA0B9C,MAAM,2BAA2B;AAAA,EACtC,GAAG;AAAA,EACH,MAAM,UAAU,MAAM,CAAC,MAAM,KAAK,KAAK,KAAK,MAAM,KAAK,CAAC,EAAE,YAAY,uBAAuB,EAAE,aAAa,GAAG;AAAA,EAC/G,OAAO,UAAU,MAAM,CAAC,SAAS,MAAM,CAAC,EAAE,YAAY,8BAA8B,EAAE,aAAa,MAAM;AAAA,EACzG,MAAM,UAAU,OAAO,YAAY,2CAA2C,EAAE,aAAa,EAAE;AAAA,EAC/F,UAAU,UAAU,KAAK,YAAY,0CAA0C,EAAE,aAAa,IAAI;AAAA,EAClG,aAAa,UAAU,KACpB,YAAY,oEAAoE,EAChF,aAAa,KAAK;AAAA,EACrB,iCAAiC,UAAU,MAAM;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,4CAA4C,EACxD,aAAa,QAAQ;AAC1B;AAEO,MAAM,eAAyC;AAAA,EACpD,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AACnC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { kfrm, styled } from "@elliemae/ds-legacy-system";
|
|
3
|
+
import { sizeToWeight } from "./constants.js";
|
|
4
|
+
const lineLeftAnimation = kfrm`
|
|
5
|
+
0% {
|
|
6
|
+
y: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
}
|
|
9
|
+
12.5%, 50% {
|
|
10
|
+
y: 0;
|
|
11
|
+
height: 100%;
|
|
12
|
+
}
|
|
13
|
+
62.5%, 100% {
|
|
14
|
+
y: -100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
const lineTopAnimation = kfrm`
|
|
19
|
+
0% {
|
|
20
|
+
x: -100%;
|
|
21
|
+
width: 0%;
|
|
22
|
+
}
|
|
23
|
+
25%, 50% {
|
|
24
|
+
x: -100%;
|
|
25
|
+
width: 200%;
|
|
26
|
+
}
|
|
27
|
+
75%, 100% {
|
|
28
|
+
x: 100%;
|
|
29
|
+
width: 200%;
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
const lineRightAnimation = kfrm`
|
|
33
|
+
0%, 12.5% {
|
|
34
|
+
y: -100%;
|
|
35
|
+
height: 0%;
|
|
36
|
+
}
|
|
37
|
+
37.5%, 62.5% {
|
|
38
|
+
y: -100%;
|
|
39
|
+
height: 200%;
|
|
40
|
+
}
|
|
41
|
+
87.5%, 100% {
|
|
42
|
+
y: 100%;
|
|
43
|
+
height: 200%;
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
const lineBottomAnimation = kfrm`
|
|
47
|
+
0%, 25% {
|
|
48
|
+
x: 200%;
|
|
49
|
+
width: 200%;
|
|
50
|
+
}
|
|
51
|
+
50%, 75% {
|
|
52
|
+
x: 0%;
|
|
53
|
+
width: 200%;
|
|
54
|
+
}
|
|
55
|
+
100% {
|
|
56
|
+
x: -200%;
|
|
57
|
+
width: 200%;
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
60
|
+
const StyledLineLeft = styled.rect`
|
|
61
|
+
x: 0;
|
|
62
|
+
y: 0%;
|
|
63
|
+
width: ${({ size }) => sizeToWeight[size]};
|
|
64
|
+
height: 100%;
|
|
65
|
+
animation: ${lineLeftAnimation} 2.5s linear 0s infinite;
|
|
66
|
+
`;
|
|
67
|
+
const StyledLineTop = styled.rect`
|
|
68
|
+
x: -100%;
|
|
69
|
+
y: 0;
|
|
70
|
+
width: 200%;
|
|
71
|
+
height: ${({ size }) => sizeToWeight[size]};
|
|
72
|
+
animation: ${lineTopAnimation} 2.5s linear 0s infinite;
|
|
73
|
+
`;
|
|
74
|
+
const StyledLineRight = styled.rect`
|
|
75
|
+
x: calc(100% - ${({ size }) => sizeToWeight[size]});
|
|
76
|
+
y: -100%;
|
|
77
|
+
width: ${({ size }) => sizeToWeight[size]};
|
|
78
|
+
height: 200%;
|
|
79
|
+
animation: ${lineRightAnimation} 2.5s linear 0s infinite;
|
|
80
|
+
`;
|
|
81
|
+
const StyledLineBottom = styled.rect`
|
|
82
|
+
x: 0%;
|
|
83
|
+
y: calc(100% - ${({ size }) => sizeToWeight[size]});
|
|
84
|
+
width: 200%;
|
|
85
|
+
height: ${({ size }) => sizeToWeight[size]};
|
|
86
|
+
animation: ${lineBottomAnimation} 2.5s linear 0s infinite;
|
|
87
|
+
`;
|
|
88
|
+
export {
|
|
89
|
+
StyledLineBottom,
|
|
90
|
+
StyledLineLeft,
|
|
91
|
+
StyledLineRight,
|
|
92
|
+
StyledLineTop
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { kfrm, styled } from '@elliemae/ds-legacy-system';\nimport type { DSSquareIndicatorT } from './react-desc-prop-types.js';\nimport { sizeToWeight } from './constants.js';\n\ninterface RectProps {\n size: Required<DSSquareIndicatorT.Props>['size'];\n}\n\nconst lineLeftAnimation = kfrm`\n 0% {\n y: 100%;\n height: 100%;\n }\n 12.5%, 50% {\n y: 0;\n height: 100%;\n }\n 62.5%, 100% {\n y: -100%;\n height: 100%;\n }\n`;\n\nconst lineTopAnimation = kfrm`\n 0% {\n x: -100%;\n width: 0%;\n }\n 25%, 50% {\n x: -100%;\n width: 200%;\n }\n 75%, 100% {\n x: 100%;\n width: 200%;\n }\n`;\n\nconst lineRightAnimation = kfrm`\n 0%, 12.5% {\n y: -100%;\n height: 0%;\n }\n 37.5%, 62.5% {\n y: -100%;\n height: 200%;\n }\n 87.5%, 100% {\n y: 100%;\n height: 200%;\n }\n`;\n\nconst lineBottomAnimation = kfrm`\n 0%, 25% {\n x: 200%;\n width: 200%;\n }\n 50%, 75% {\n x: 0%;\n width: 200%;\n }\n 100% {\n x: -200%;\n width: 200%;\n }\n`;\n\nexport const StyledLineLeft = styled.rect<RectProps>`\n x: 0;\n y: 0%;\n width: ${({ size }) => sizeToWeight[size]};\n height: 100%;\n animation: ${lineLeftAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineTop = styled.rect<RectProps>`\n x: -100%;\n y: 0;\n width: 200%;\n height: ${({ size }) => sizeToWeight[size]};\n animation: ${lineTopAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineRight = styled.rect<RectProps>`\n x: calc(100% - ${({ size }) => sizeToWeight[size]});\n y: -100%;\n width: ${({ size }) => sizeToWeight[size]};\n height: 200%;\n animation: ${lineRightAnimation} 2.5s linear 0s infinite;\n`;\n\nexport const StyledLineBottom = styled.rect<RectProps>`\n x: 0%;\n y: calc(100% - ${({ size }) => sizeToWeight[size]});\n width: 200%;\n height: ${({ size }) => sizeToWeight[size]};\n animation: ${lineBottomAnimation} 2.5s linear 0s infinite;\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,MAAM,cAAc;AAE7B,SAAS,oBAAoB;AAM7B,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAe1B,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAezB,MAAM,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAe3B,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAerB,MAAM,iBAAiB,OAAO;AAAA;AAAA;AAAA,WAG1B,CAAC,EAAE,KAAK,MAAM,aAAa,IAAI;AAAA;AAAA,eAE3B;AAAA;AAGR,MAAM,gBAAgB,OAAO;AAAA;AAAA;AAAA;AAAA,YAIxB,CAAC,EAAE,KAAK,MAAM,aAAa,IAAI;AAAA,eAC5B;AAAA;AAGR,MAAM,kBAAkB,OAAO;AAAA,mBACnB,CAAC,EAAE,KAAK,MAAM,aAAa,IAAI;AAAA;AAAA,WAEvC,CAAC,EAAE,KAAK,MAAM,aAAa,IAAI;AAAA;AAAA,eAE3B;AAAA;AAGR,MAAM,mBAAmB,OAAO;AAAA;AAAA,mBAEpB,CAAC,EAAE,KAAK,MAAM,aAAa,IAAI;AAAA;AAAA,YAEtC,CAAC,EAAE,KAAK,MAAM,aAAa,IAAI;AAAA,eAC5B;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DSSquareIndicatorT } from './react-desc-prop-types.js';
|
|
3
|
+
export declare const DSSquareIndicator: React.ComponentType<DSSquareIndicatorT.Props>;
|
|
4
|
+
export declare const DSSquareIndicatorWithSchema: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSSquareIndicatorT.Props>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const sizeToPx: {
|
|
2
|
+
xs: string;
|
|
3
|
+
s: string;
|
|
4
|
+
m: string;
|
|
5
|
+
l: string;
|
|
6
|
+
xl: string;
|
|
7
|
+
xxl: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const sizeToWeight: {
|
|
10
|
+
xs: string;
|
|
11
|
+
s: string;
|
|
12
|
+
m: string;
|
|
13
|
+
l: string;
|
|
14
|
+
xl: string;
|
|
15
|
+
xxl: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const colorToHex: {
|
|
18
|
+
light: string;
|
|
19
|
+
dark: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const sizeToTextSize: {
|
|
22
|
+
xs: string;
|
|
23
|
+
s: string;
|
|
24
|
+
m: string;
|
|
25
|
+
l: string;
|
|
26
|
+
xl: string;
|
|
27
|
+
xxl: string;
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DSSquareIndicator, DSSquareIndicatorWithSchema } from './DSSquareIndicator.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { WeakValidationMap } from 'react';
|
|
2
|
+
export declare namespace DSSquareIndicatorT {
|
|
3
|
+
interface Props {
|
|
4
|
+
size?: 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
|
|
5
|
+
color?: 'light' | 'dark';
|
|
6
|
+
text?: string;
|
|
7
|
+
showText?: boolean;
|
|
8
|
+
withTooltip: boolean;
|
|
9
|
+
tooltipStartPlacementPreference?: 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left-end' | 'left' | 'left-start';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export declare const SquareIndicatorPropTypes: WeakValidationMap<unknown>;
|
|
13
|
+
export declare const defaultProps: DSSquareIndicatorT.Props;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DSSquareIndicatorT } from './react-desc-prop-types.js';
|
|
2
|
+
interface RectProps {
|
|
3
|
+
size: Required<DSSquareIndicatorT.Props>['size'];
|
|
4
|
+
}
|
|
5
|
+
export declare const StyledLineLeft: import("styled-components").StyledComponent<"rect", import("@elliemae/ds-legacy-system").Theme, RectProps & import("@elliemae/ds-legacy-system").OwnerInterface, never>;
|
|
6
|
+
export declare const StyledLineTop: import("styled-components").StyledComponent<"rect", import("@elliemae/ds-legacy-system").Theme, RectProps & import("@elliemae/ds-legacy-system").OwnerInterface, never>;
|
|
7
|
+
export declare const StyledLineRight: import("styled-components").StyledComponent<"rect", import("@elliemae/ds-legacy-system").Theme, RectProps & import("@elliemae/ds-legacy-system").OwnerInterface, never>;
|
|
8
|
+
export declare const StyledLineBottom: import("styled-components").StyledComponent<"rect", import("@elliemae/ds-legacy-system").Theme, RectProps & import("@elliemae/ds-legacy-system").OwnerInterface, never>;
|
|
9
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elliemae/ds-legacy-square-indicator",
|
|
3
|
+
"version": "1.0.0-rc.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "ICE MT - Dimsum - Indeterminate Progress Indicator",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"module": "./dist/esm/index.js",
|
|
10
|
+
"main": "./dist/cjs/index.js",
|
|
11
|
+
"types": "./dist/types/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/esm/index.js",
|
|
15
|
+
"require": "./dist/cjs/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./react-desc-prop-types": {
|
|
18
|
+
"import": "./dist/esm/react-desc-prop-types.js",
|
|
19
|
+
"require": "./dist/cjs/react-desc-prop-types.js"
|
|
20
|
+
},
|
|
21
|
+
"./DSSquareIndicator": {
|
|
22
|
+
"import": "./dist/esm/DSSquareIndicator.js",
|
|
23
|
+
"require": "./dist/cjs/DSSquareIndicator.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"sideEffects": [
|
|
27
|
+
"*.css",
|
|
28
|
+
"*.scss"
|
|
29
|
+
],
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://git.elliemae.io/platform-ui/dimsum-legacy.git"
|
|
33
|
+
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"pnpm": ">=6",
|
|
36
|
+
"node": ">=16"
|
|
37
|
+
},
|
|
38
|
+
"author": "ICE MT",
|
|
39
|
+
"jestSonar": {
|
|
40
|
+
"sonar56x": true,
|
|
41
|
+
"reportPath": "reports",
|
|
42
|
+
"reportFile": "tests.xml",
|
|
43
|
+
"indent": 4
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"styled-components": "~5.3.9",
|
|
47
|
+
"uid": "^2.0.1",
|
|
48
|
+
"@elliemae/ds-legacy-grid": "1.0.0-rc.1",
|
|
49
|
+
"@elliemae/ds-legacy-props-helpers": "1.0.0-rc.1",
|
|
50
|
+
"@elliemae/ds-legacy-system": "1.0.0-rc.1",
|
|
51
|
+
"@elliemae/ds-legacy-tooltip": "1.0.0-rc.1"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
55
|
+
"styled-components": "~5.3.9",
|
|
56
|
+
"@elliemae/ds-legacy-monorepo-devops": "1.0.0-rc.1"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"react": "^17.0.2",
|
|
60
|
+
"react-dom": "^17.0.2"
|
|
61
|
+
},
|
|
62
|
+
"publishConfig": {
|
|
63
|
+
"access": "public",
|
|
64
|
+
"typeSafety": false
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
68
|
+
"test": "pui-cli test --passWithNoTests",
|
|
69
|
+
"lint": "node ../../../scripts/lint.mjs",
|
|
70
|
+
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../../.eslintrc.js' src/",
|
|
71
|
+
"dts": "node ../../../scripts/dts.mjs",
|
|
72
|
+
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
73
|
+
"dev:build": "pnpm --filter {.}... build",
|
|
74
|
+
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
75
|
+
"checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
76
|
+
}
|
|
77
|
+
}
|