@elliemae/ds-square-indicator 2.3.1-rc.2 → 3.0.0-alpha.2
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 +175 -0
- package/dist/cjs/DSSquareIndicator.js.map +7 -0
- package/dist/cjs/constants.js +65 -0
- package/dist/cjs/constants.js.map +7 -0
- package/dist/cjs/index.js +36 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/react-desc-prop-types.js +83 -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 +148 -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/react-desc-prop-types.js +56 -0
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/dist/esm/styled.js +95 -0
- package/dist/esm/styled.js.map +7 -0
- package/package.json +33 -34
- package/cjs/DSSquareIndicator.js +0 -169
- package/cjs/constants.js +0 -37
- package/cjs/index.js +0 -10
- package/cjs/react-desc-prop-types.js +0 -39
- package/cjs/styled.js +0 -86
- package/esm/DSSquareIndicator.js +0 -159
- package/esm/constants.js +0 -30
- package/esm/index.js +0 -1
- package/esm/react-desc-prop-types.js +0 -30
- package/esm/styled.js +0 -74
- package/types/DSSquareIndicator.d.ts +0 -4
- package/types/constants.d.ts +0 -28
- package/types/index.d.ts +0 -1
- package/types/react-desc-prop-types.d.ts +0 -14
- package/types/styled.d.ts +0 -10
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
22
|
+
var __export = (target, all) => {
|
|
23
|
+
for (var name in all)
|
|
24
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
25
|
+
};
|
|
26
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
27
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
28
|
+
for (let key of __getOwnPropNames(module2))
|
|
29
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
30
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
};
|
|
34
|
+
var __toESM = (module2, isNodeMode) => {
|
|
35
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
36
|
+
};
|
|
37
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
38
|
+
return (module2, temp) => {
|
|
39
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
40
|
+
};
|
|
41
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
42
|
+
var DSSquareIndicator_exports = {};
|
|
43
|
+
__export(DSSquareIndicator_exports, {
|
|
44
|
+
DSSquareIndicator: () => DSSquareIndicator,
|
|
45
|
+
DSSquareIndicatorWithSchema: () => DSSquareIndicatorWithSchema
|
|
46
|
+
});
|
|
47
|
+
var React = __toESM(require("react"));
|
|
48
|
+
var import_react = __toESM(require("react"));
|
|
49
|
+
var import_ds_grid = require("@elliemae/ds-grid");
|
|
50
|
+
var import_ds_tooltip = require("@elliemae/ds-tooltip");
|
|
51
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
52
|
+
var import_uid = require("uid");
|
|
53
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types");
|
|
54
|
+
var import_styled = require("./styled");
|
|
55
|
+
var import_constants = require("./constants");
|
|
56
|
+
const DSSquareIndicator = (props) => {
|
|
57
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
58
|
+
const globalAttributes = (0, import_ds_props_helpers.useGetGlobalAttributes)(propsWithDefault);
|
|
59
|
+
const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference, __duration } = propsWithDefault;
|
|
60
|
+
const Wrapper = (0, import_react.useMemo)(() => withTooltip ? import_ds_tooltip.DSTooltipV3 : ({ children }) => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, children), [withTooltip]);
|
|
61
|
+
const uniqueId = (0, import_react.useMemo)(() => (0, import_uid.uid)(16), []);
|
|
62
|
+
const paddedCoordinate = (0, import_react.useMemo)(() => `calc(100% - ${import_constants.sizeToWeight[size]})`, [size]);
|
|
63
|
+
const hexColor = (0, import_react.useMemo)(() => import_constants.colorToHex[color], [color]);
|
|
64
|
+
return /* @__PURE__ */ import_react.default.createElement(import_ds_grid.Grid, __spreadValues({
|
|
65
|
+
gutter: "xs",
|
|
66
|
+
justifyContent: "center",
|
|
67
|
+
role: "status"
|
|
68
|
+
}, globalAttributes), /* @__PURE__ */ import_react.default.createElement(Wrapper, {
|
|
69
|
+
text,
|
|
70
|
+
textAlign: "center",
|
|
71
|
+
startPlacementPreference: tooltipStartPlacementPreference
|
|
72
|
+
}, /* @__PURE__ */ import_react.default.createElement("svg", {
|
|
73
|
+
width: import_constants.sizeToPx[size],
|
|
74
|
+
height: import_constants.sizeToPx[size],
|
|
75
|
+
style: {
|
|
76
|
+
display: "block",
|
|
77
|
+
margin: "auto"
|
|
78
|
+
}
|
|
79
|
+
}, /* @__PURE__ */ import_react.default.createElement("defs", null, /* @__PURE__ */ import_react.default.createElement("linearGradient", {
|
|
80
|
+
id: `${uniqueId}-lg1`,
|
|
81
|
+
x1: "0",
|
|
82
|
+
y1: "0",
|
|
83
|
+
x2: "0",
|
|
84
|
+
y2: "100%"
|
|
85
|
+
}, /* @__PURE__ */ import_react.default.createElement("stop", {
|
|
86
|
+
offset: "20%",
|
|
87
|
+
stopColor: `${hexColor}FF`
|
|
88
|
+
}), /* @__PURE__ */ import_react.default.createElement("stop", {
|
|
89
|
+
offset: "80%",
|
|
90
|
+
stopColor: `${hexColor}00`
|
|
91
|
+
})), /* @__PURE__ */ import_react.default.createElement("linearGradient", {
|
|
92
|
+
id: `${uniqueId}-lg2`,
|
|
93
|
+
x1: "0",
|
|
94
|
+
y1: "0",
|
|
95
|
+
x2: "100%",
|
|
96
|
+
y2: "0"
|
|
97
|
+
}, /* @__PURE__ */ import_react.default.createElement("stop", {
|
|
98
|
+
offset: "10%",
|
|
99
|
+
stopColor: `${hexColor}00`
|
|
100
|
+
}), /* @__PURE__ */ import_react.default.createElement("stop", {
|
|
101
|
+
offset: "50%",
|
|
102
|
+
stopColor: `${hexColor}FF`
|
|
103
|
+
})), /* @__PURE__ */ import_react.default.createElement("linearGradient", {
|
|
104
|
+
id: `${uniqueId}-lg3`,
|
|
105
|
+
x1: "0",
|
|
106
|
+
y1: "0",
|
|
107
|
+
x2: "0",
|
|
108
|
+
y2: "100%"
|
|
109
|
+
}, /* @__PURE__ */ import_react.default.createElement("stop", {
|
|
110
|
+
offset: "10%",
|
|
111
|
+
stopColor: `${hexColor}00`
|
|
112
|
+
}), /* @__PURE__ */ import_react.default.createElement("stop", {
|
|
113
|
+
offset: "50%",
|
|
114
|
+
stopColor: `${hexColor}FF`
|
|
115
|
+
})), /* @__PURE__ */ import_react.default.createElement("linearGradient", {
|
|
116
|
+
id: `${uniqueId}-lg4`,
|
|
117
|
+
x1: "0",
|
|
118
|
+
y1: "0",
|
|
119
|
+
x2: "100%",
|
|
120
|
+
y2: "0"
|
|
121
|
+
}, /* @__PURE__ */ import_react.default.createElement("stop", {
|
|
122
|
+
offset: "50%",
|
|
123
|
+
stopColor: `${hexColor}FF`
|
|
124
|
+
}), /* @__PURE__ */ import_react.default.createElement("stop", {
|
|
125
|
+
offset: "90%",
|
|
126
|
+
stopColor: `${hexColor}00`
|
|
127
|
+
})), /* @__PURE__ */ import_react.default.createElement("clipPath", {
|
|
128
|
+
id: `${uniqueId}-lcp1`
|
|
129
|
+
}, /* @__PURE__ */ import_react.default.createElement("rect", {
|
|
130
|
+
x: import_constants.sizeToWeight[size],
|
|
131
|
+
y: 0,
|
|
132
|
+
width: "100%",
|
|
133
|
+
height: import_constants.sizeToWeight[size]
|
|
134
|
+
})), /* @__PURE__ */ import_react.default.createElement("clipPath", {
|
|
135
|
+
id: `${uniqueId}-lcp2`
|
|
136
|
+
}, /* @__PURE__ */ import_react.default.createElement("rect", {
|
|
137
|
+
x: paddedCoordinate,
|
|
138
|
+
y: import_constants.sizeToWeight[size],
|
|
139
|
+
width: import_constants.sizeToWeight[size],
|
|
140
|
+
height: "100%"
|
|
141
|
+
})), /* @__PURE__ */ import_react.default.createElement("clipPath", {
|
|
142
|
+
id: `${uniqueId}-lcp3`
|
|
143
|
+
}, /* @__PURE__ */ import_react.default.createElement("rect", {
|
|
144
|
+
x: 0,
|
|
145
|
+
y: paddedCoordinate,
|
|
146
|
+
width: paddedCoordinate,
|
|
147
|
+
height: import_constants.sizeToWeight[size]
|
|
148
|
+
}))), /* @__PURE__ */ import_react.default.createElement(import_styled.StyledLineLeft, {
|
|
149
|
+
size,
|
|
150
|
+
__duration,
|
|
151
|
+
fill: `url(#${uniqueId}-lg1)`
|
|
152
|
+
}), /* @__PURE__ */ import_react.default.createElement(import_styled.StyledLineTop, {
|
|
153
|
+
size,
|
|
154
|
+
__duration,
|
|
155
|
+
fill: `url(#${uniqueId}-lg2)`,
|
|
156
|
+
clipPath: `url(#${uniqueId}-lcp1)`
|
|
157
|
+
}), /* @__PURE__ */ import_react.default.createElement(import_styled.StyledLineRight, {
|
|
158
|
+
size,
|
|
159
|
+
__duration,
|
|
160
|
+
fill: `url(#${uniqueId}-lg3)`,
|
|
161
|
+
clipPath: `url(#${uniqueId}-lcp2)`
|
|
162
|
+
}), /* @__PURE__ */ import_react.default.createElement(import_styled.StyledLineBottom, {
|
|
163
|
+
size,
|
|
164
|
+
__duration,
|
|
165
|
+
fill: `url(#${uniqueId}-lg4)`,
|
|
166
|
+
clipPath: `url(#${uniqueId}-lcp3)`
|
|
167
|
+
})), text !== "" && showText && /* @__PURE__ */ import_react.default.createElement("span", {
|
|
168
|
+
style: { color: import_constants.colorToHex[color], fontSize: import_constants.sizeToTextSize[size] }
|
|
169
|
+
}, text)));
|
|
170
|
+
};
|
|
171
|
+
DSSquareIndicator.propTypes = import_react_desc_prop_types.SquareIndicatorPropTypes;
|
|
172
|
+
const DSSquareIndicatorWithSchema = (0, import_ds_props_helpers.describe)(DSSquareIndicator);
|
|
173
|
+
DSSquareIndicatorWithSchema.propTypes = import_react_desc_prop_types.SquareIndicatorPropTypes;
|
|
174
|
+
module.exports = __toCommonJS(DSSquareIndicator_exports);
|
|
175
|
+
//# 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, { PropsWithChildren, useMemo } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { describe, useGetGlobalAttributes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { defaultProps, DSSquareIndicatorT, SquareIndicatorPropTypes } from './react-desc-prop-types';\nimport { StyledLineLeft, StyledLineTop, StyledLineRight, StyledLineBottom } from './styled';\nimport { colorToHex, sizeToPx, sizeToTextSize, sizeToWeight } from './constants';\n\nexport const DSSquareIndicator: React.ComponentType<DSSquareIndicatorT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<Required<DSSquareIndicatorT.Props>>(props, defaultProps);\n const globalAttributes = useGetGlobalAttributes(propsWithDefault);\n\n const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference, __duration } = propsWithDefault;\n\n const Wrapper: typeof DSTooltipV3 = useMemo(\n () => (withTooltip ? DSTooltipV3 : ({ children }: PropsWithChildren<unknown>) => <>{children}</>),\n [withTooltip],\n );\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\" {...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} __duration={__duration} fill={`url(#${uniqueId}-lg1)`} />\n <StyledLineTop\n size={size}\n __duration={__duration}\n fill={`url(#${uniqueId}-lg2)`}\n clipPath={`url(#${uniqueId}-lcp1)`}\n />\n <StyledLineRight\n size={size}\n __duration={__duration}\n fill={`url(#${uniqueId}-lg3)`}\n clipPath={`url(#${uniqueId}-lcp2)`}\n />\n <StyledLineBottom\n size={size}\n __duration={__duration}\n fill={`url(#${uniqueId}-lg4)`}\n clipPath={`url(#${uniqueId}-lcp3)`}\n />\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;\n\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,65 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var constants_exports = {};
|
|
29
|
+
__export(constants_exports, {
|
|
30
|
+
colorToHex: () => colorToHex,
|
|
31
|
+
sizeToPx: () => sizeToPx,
|
|
32
|
+
sizeToTextSize: () => sizeToTextSize,
|
|
33
|
+
sizeToWeight: () => sizeToWeight
|
|
34
|
+
});
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
const sizeToPx = {
|
|
37
|
+
xs: "16px",
|
|
38
|
+
s: "24px",
|
|
39
|
+
m: "32px",
|
|
40
|
+
l: "48px",
|
|
41
|
+
xl: "56px",
|
|
42
|
+
xxl: "64px"
|
|
43
|
+
};
|
|
44
|
+
const sizeToWeight = {
|
|
45
|
+
xs: "3px",
|
|
46
|
+
s: "3px",
|
|
47
|
+
m: "3px",
|
|
48
|
+
l: "4px",
|
|
49
|
+
xl: "5px",
|
|
50
|
+
xxl: "6px"
|
|
51
|
+
};
|
|
52
|
+
const colorToHex = {
|
|
53
|
+
light: "#FFFFFF",
|
|
54
|
+
dark: "#0F364A"
|
|
55
|
+
};
|
|
56
|
+
const sizeToTextSize = {
|
|
57
|
+
xs: "12px",
|
|
58
|
+
s: "12px",
|
|
59
|
+
m: "12px",
|
|
60
|
+
l: "13px",
|
|
61
|
+
xl: "14px",
|
|
62
|
+
xxl: "16px"
|
|
63
|
+
};
|
|
64
|
+
module.exports = __toCommonJS(constants_exports);
|
|
65
|
+
//# 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;ACAA,YAAuB;ADAhB,MAAM,WAAW;AAAA,EACtB,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AAAA;AAGA,MAAM,eAAe;AAAA,EAC1B,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AAAA;AAGA,MAAM,aAAa;AAAA,EACxB,OAAO;AAAA,EACP,MAAM;AAAA;AAGD,MAAM,iBAAiB;AAAA,EAC5B,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var src_exports = {};
|
|
29
|
+
__export(src_exports, {
|
|
30
|
+
DSSquareIndicator: () => import_DSSquareIndicator.DSSquareIndicator,
|
|
31
|
+
DSSquareIndicatorWithSchema: () => import_DSSquareIndicator.DSSquareIndicatorWithSchema
|
|
32
|
+
});
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
var import_DSSquareIndicator = require("./DSSquareIndicator");
|
|
35
|
+
module.exports = __toCommonJS(src_exports);
|
|
36
|
+
//# 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';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAA+D;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
|
+
var __export = (target, all) => {
|
|
26
|
+
for (var name in all)
|
|
27
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
|
+
};
|
|
29
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
30
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
31
|
+
for (let key of __getOwnPropNames(module2))
|
|
32
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
33
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __toESM = (module2, isNodeMode) => {
|
|
38
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
39
|
+
};
|
|
40
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
41
|
+
return (module2, temp) => {
|
|
42
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
43
|
+
};
|
|
44
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
45
|
+
var react_desc_prop_types_exports = {};
|
|
46
|
+
__export(react_desc_prop_types_exports, {
|
|
47
|
+
SquareIndicatorPropTypes: () => SquareIndicatorPropTypes,
|
|
48
|
+
defaultProps: () => defaultProps
|
|
49
|
+
});
|
|
50
|
+
var React = __toESM(require("react"));
|
|
51
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
52
|
+
const SquareIndicatorPropTypes = __spreadProps(__spreadValues({}, import_ds_props_helpers.globalAttributesPropTypes), {
|
|
53
|
+
size: import_ds_props_helpers.PropTypes.oneOf(["xs", "s", "m", "l", "xl", "xxl"]).description("Size of the indicator").defaultValue("m"),
|
|
54
|
+
color: import_ds_props_helpers.PropTypes.oneOf(["light", "dark"]).description("Color mode for the indicator").defaultValue("dark"),
|
|
55
|
+
text: import_ds_props_helpers.PropTypes.string.description("Optional text to show under the indicator").defaultValue(""),
|
|
56
|
+
showText: import_ds_props_helpers.PropTypes.bool.description("Whether to show the optional text or not").defaultValue(true),
|
|
57
|
+
withTooltip: import_ds_props_helpers.PropTypes.bool.description("Whether to include a tooltip that shows the optional text on hover").defaultValue(false),
|
|
58
|
+
tooltipStartPlacementPreference: import_ds_props_helpers.PropTypes.oneOf([
|
|
59
|
+
"top-start",
|
|
60
|
+
"top",
|
|
61
|
+
"top-end",
|
|
62
|
+
"right-start",
|
|
63
|
+
"right",
|
|
64
|
+
"right-end",
|
|
65
|
+
"bottom-end",
|
|
66
|
+
"bottom",
|
|
67
|
+
"bottom-start",
|
|
68
|
+
"left-end",
|
|
69
|
+
"left",
|
|
70
|
+
"left-start"
|
|
71
|
+
]).description("start placement preference for the tooltip").defaultValue("center")
|
|
72
|
+
});
|
|
73
|
+
const defaultProps = {
|
|
74
|
+
size: "m",
|
|
75
|
+
color: "dark",
|
|
76
|
+
text: "",
|
|
77
|
+
showText: true,
|
|
78
|
+
withTooltip: false,
|
|
79
|
+
tooltipStartPlacementPreference: "bottom",
|
|
80
|
+
__duration: 2.5
|
|
81
|
+
};
|
|
82
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
83
|
+
//# 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 */\nimport { PropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport { 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 __duration: number;\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 __duration: 2.5,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAAqD;AA2B9C,MAAM,2BAA2B,iCACnC,oDADmC;AAAA,EAEtC,MAAM,kCAAU,MAAM,CAAC,MAAM,KAAK,KAAK,KAAK,MAAM,QAAQ,YAAY,yBAAyB,aAAa;AAAA,EAC5G,OAAO,kCAAU,MAAM,CAAC,SAAS,SAAS,YAAY,gCAAgC,aAAa;AAAA,EACnG,MAAM,kCAAU,OAAO,YAAY,6CAA6C,aAAa;AAAA,EAC7F,UAAU,kCAAU,KAAK,YAAY,4CAA4C,aAAa;AAAA,EAC9F,aAAa,kCAAU,KACpB,YAAY,sEACZ,aAAa;AAAA,EAChB,iCAAiC,kCAAU,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,KAEC,YAAY,8CACZ,aAAa;AAAA;AAGX,MAAM,eAAyC;AAAA,EACpD,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iCAAiC;AAAA,EACjC,YAAY;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var styled_exports = {};
|
|
29
|
+
__export(styled_exports, {
|
|
30
|
+
StyledLineBottom: () => StyledLineBottom,
|
|
31
|
+
StyledLineLeft: () => StyledLineLeft,
|
|
32
|
+
StyledLineRight: () => StyledLineRight,
|
|
33
|
+
StyledLineTop: () => StyledLineTop
|
|
34
|
+
});
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
37
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
38
|
+
var import_constants = require("./constants");
|
|
39
|
+
const lineLeftAnimation = import_ds_system.kfrm`
|
|
40
|
+
0% {
|
|
41
|
+
y: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
}
|
|
44
|
+
12.5%, 50% {
|
|
45
|
+
y: 0;
|
|
46
|
+
height: 100%;
|
|
47
|
+
}
|
|
48
|
+
62.5%, 100% {
|
|
49
|
+
y: -100%;
|
|
50
|
+
height: 100%;
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
const lineTopAnimation = import_ds_system.kfrm`
|
|
54
|
+
0% {
|
|
55
|
+
x: -100%;
|
|
56
|
+
width: 0%;
|
|
57
|
+
}
|
|
58
|
+
25%, 50% {
|
|
59
|
+
x: -100%;
|
|
60
|
+
width: 200%;
|
|
61
|
+
}
|
|
62
|
+
75%, 100% {
|
|
63
|
+
x: 100%;
|
|
64
|
+
width: 200%;
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
const lineRightAnimation = import_ds_system.kfrm`
|
|
68
|
+
0%, 12.5% {
|
|
69
|
+
y: -100%;
|
|
70
|
+
height: 0%;
|
|
71
|
+
}
|
|
72
|
+
37.5%, 62.5% {
|
|
73
|
+
y: -100%;
|
|
74
|
+
height: 200%;
|
|
75
|
+
}
|
|
76
|
+
87.5%, 100% {
|
|
77
|
+
y: 100%;
|
|
78
|
+
height: 200%;
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
81
|
+
const lineBottomAnimation = import_ds_system.kfrm`
|
|
82
|
+
0%, 25% {
|
|
83
|
+
x: 200%;
|
|
84
|
+
width: 200%;
|
|
85
|
+
}
|
|
86
|
+
50%, 75% {
|
|
87
|
+
x: 0%;
|
|
88
|
+
width: 200%;
|
|
89
|
+
}
|
|
90
|
+
100% {
|
|
91
|
+
x: -200%;
|
|
92
|
+
width: 200%;
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
95
|
+
const StyledLineLeft = import_styled_components.default.rect`
|
|
96
|
+
x: 0;
|
|
97
|
+
y: 0%;
|
|
98
|
+
width: ${({ size }) => import_constants.sizeToWeight[size]};
|
|
99
|
+
height: 100%;
|
|
100
|
+
animation: ${lineLeftAnimation} ${({ __duration }) => __duration}s linear 0s infinite;
|
|
101
|
+
`;
|
|
102
|
+
const StyledLineTop = import_styled_components.default.rect`
|
|
103
|
+
x: -100%;
|
|
104
|
+
y: 0;
|
|
105
|
+
width: 200%;
|
|
106
|
+
height: ${({ size }) => import_constants.sizeToWeight[size]};
|
|
107
|
+
animation: ${lineTopAnimation} ${({ __duration }) => __duration}s linear 0s infinite;
|
|
108
|
+
`;
|
|
109
|
+
const StyledLineRight = import_styled_components.default.rect`
|
|
110
|
+
x: calc(100% - ${({ size }) => import_constants.sizeToWeight[size]});
|
|
111
|
+
y: -100%;
|
|
112
|
+
width: ${({ size }) => import_constants.sizeToWeight[size]};
|
|
113
|
+
height: 200%;
|
|
114
|
+
animation: ${lineRightAnimation} ${({ __duration }) => __duration}s linear 0s infinite;
|
|
115
|
+
`;
|
|
116
|
+
const StyledLineBottom = import_styled_components.default.rect`
|
|
117
|
+
x: 0%;
|
|
118
|
+
y: calc(100% - ${({ size }) => import_constants.sizeToWeight[size]});
|
|
119
|
+
width: 200%;
|
|
120
|
+
height: ${({ size }) => import_constants.sizeToWeight[size]};
|
|
121
|
+
animation: ${lineBottomAnimation} ${({ __duration }) => __duration}s linear 0s infinite;
|
|
122
|
+
`;
|
|
123
|
+
module.exports = __toCommonJS(styled_exports);
|
|
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 styled from 'styled-components';\nimport { kfrm } from '@elliemae/ds-system';\nimport { DSSquareIndicatorT } from './react-desc-prop-types';\nimport { sizeToWeight } from './constants';\n\ninterface RectProps {\n size: Required<DSSquareIndicatorT.Props>['size'];\n __duration: number;\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} ${({ __duration }) => __duration}s 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} ${({ __duration }) => __duration}s 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} ${({ __duration }) => __duration}s 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} ${({ __duration }) => __duration}s linear 0s infinite;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AACnB,uBAAqB;AAErB,uBAA6B;AAO7B,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,iCAAO;AAAA;AAAA;AAAA,WAG1B,CAAC,EAAE,WAAW,8BAAa;AAAA;AAAA,eAEvB,qBAAqB,CAAC,EAAE,iBAAiB;AAAA;AAGjD,MAAM,gBAAgB,iCAAO;AAAA;AAAA;AAAA;AAAA,YAIxB,CAAC,EAAE,WAAW,8BAAa;AAAA,eACxB,oBAAoB,CAAC,EAAE,iBAAiB;AAAA;AAGhD,MAAM,kBAAkB,iCAAO;AAAA,mBACnB,CAAC,EAAE,WAAW,8BAAa;AAAA;AAAA,WAEnC,CAAC,EAAE,WAAW,8BAAa;AAAA;AAAA,eAEvB,sBAAsB,CAAC,EAAE,iBAAiB;AAAA;AAGlD,MAAM,mBAAmB,iCAAO;AAAA;AAAA,mBAEpB,CAAC,EAAE,WAAW,8BAAa;AAAA;AAAA,YAElC,CAAC,EAAE,WAAW,8BAAa;AAAA,eACxB,uBAAuB,CAAC,EAAE,iBAAiB;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|