@elliemae/ds-square-indicator 3.1.0-next.13 → 3.1.0-next.16
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 +1 -5
- package/dist/cjs/DSSquareIndicator.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +1 -2
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/styled.js +8 -9
- package/dist/cjs/styled.js.map +2 -2
- package/dist/esm/DSSquareIndicator.js +1 -5
- package/dist/esm/DSSquareIndicator.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +1 -2
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/styled.js +5 -6
- package/dist/esm/styled.js.map +2 -2
- package/package.json +5 -5
|
@@ -63,7 +63,7 @@ const EmptyComp = (props) => /* @__PURE__ */ import_react.default.createElement(
|
|
|
63
63
|
const DSSquareIndicator = (props) => {
|
|
64
64
|
const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
65
65
|
const _a = (0, import_ds_utilities.useGetGlobalAttributes)(propsWithDefault), { height, width, cols, rows } = _a, globalAttributes = __objRest(_a, ["height", "width", "cols", "rows"]);
|
|
66
|
-
const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference
|
|
66
|
+
const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference } = propsWithDefault;
|
|
67
67
|
const Wrapper = (0, import_react.useMemo)(() => withTooltip ? import_ds_tooltip.DSTooltipV3 : EmptyComp, [withTooltip]);
|
|
68
68
|
const uniqueId = (0, import_react.useMemo)(() => (0, import_uid.uid)(16), []);
|
|
69
69
|
const paddedCoordinate = (0, import_react.useMemo)(() => `calc(100% - ${import_constants.sizeToWeight[size]})`, [size]);
|
|
@@ -155,21 +155,17 @@ const DSSquareIndicator = (props) => {
|
|
|
155
155
|
height: import_constants.sizeToWeight[size]
|
|
156
156
|
}))), /* @__PURE__ */ import_react.default.createElement(import_styled.StyledLineLeft, {
|
|
157
157
|
size,
|
|
158
|
-
__duration,
|
|
159
158
|
fill: `url(#${uniqueId}-lg1)`
|
|
160
159
|
}), /* @__PURE__ */ import_react.default.createElement(import_styled.StyledLineTop, {
|
|
161
160
|
size,
|
|
162
|
-
__duration,
|
|
163
161
|
fill: `url(#${uniqueId}-lg2)`,
|
|
164
162
|
clipPath: `url(#${uniqueId}-lcp1)`
|
|
165
163
|
}), /* @__PURE__ */ import_react.default.createElement(import_styled.StyledLineRight, {
|
|
166
164
|
size,
|
|
167
|
-
__duration,
|
|
168
165
|
fill: `url(#${uniqueId}-lg3)`,
|
|
169
166
|
clipPath: `url(#${uniqueId}-lcp2)`
|
|
170
167
|
}), /* @__PURE__ */ import_react.default.createElement(import_styled.StyledLineBottom, {
|
|
171
168
|
size,
|
|
172
|
-
__duration,
|
|
173
169
|
fill: `url(#${uniqueId}-lg4)`,
|
|
174
170
|
clipPath: `url(#${uniqueId}-lcp3)`
|
|
175
171
|
})), text !== "" && showText && /* @__PURE__ */ import_react.default.createElement("span", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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-grid';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { describe, useGetGlobalAttributes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\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\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 const { height, width, cols, rows, ...globalAttributes } = useGetGlobalAttributes(propsWithDefault);\n\n const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA+B;AAC/B,qBAAqB;AACrB,wBAA4B;AAC5B,0BAA+E;AAC/E,iBAAoB;AACpB,mCAA2E;AAC3E,oBAAiF;AACjF,uBAAmE;AAGnE,MAAM,YAAgC,CAAC,UAAU,wFAAG,MAAM,QAAS;AAE5D,MAAM,oBAAmE,CAAC,UAAU;AACzF,QAAM,mBAAmB,sDAAiE,OAAO,yCAAY;AAC7G,QAA2D,qDAAuB,gBAAgB,GAA1F,UAAQ,OAAO,MAAM,SAA8B,IAArB,6BAAqB,IAArB,CAA9B,UAAQ,SAAO,QAAM;AAE7B,QAAM,EAAE,MAAM,OAAO,MAAM,UAAU,aAAa,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/naming-convention */\nimport React, { useMemo } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { describe, useGetGlobalAttributes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\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\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 const { height, width, cols, rows, ...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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA+B;AAC/B,qBAAqB;AACrB,wBAA4B;AAC5B,0BAA+E;AAC/E,iBAAoB;AACpB,mCAA2E;AAC3E,oBAAiF;AACjF,uBAAmE;AAGnE,MAAM,YAAgC,CAAC,UAAU,wFAAG,MAAM,QAAS;AAE5D,MAAM,oBAAmE,CAAC,UAAU;AACzF,QAAM,mBA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A,GAAkB,GAC9F,mDAAC;AAAA,IAAgB;AAAA,IAAY,MAAM,QAAQ;AAAA,IAAiB,UAAU,QAAQ;AAAA,GAAkB,GAChG,mDAAC;AAAA,IAAiB;AAAA,IAAY,MAAM,QAAQ;AAAA,IAAiB,UAAU,QAAQ;AAAA,GAAkB,CACnG,GACC,SAAS,MAAM,YACd,mDAAC;AAAA,IAAK,OAAO,EAAE,OAAO,4BAAW,QAAQ,UAAU,gCAAe,MAAM;AAAA,KAAI,IAAK,CAErF,CACF;AAEJ;AAEA,kBAAkB,YAAY;AAC9B,kBAAkB,cAAc;AACzB,MAAM,8BAA8B,kCAAS,iBAAiB;AACrE,4BAA4B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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-utilities';\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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAqD;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport { PropTypes, globalAttributesPropTypes } from '@elliemae/ds-utilities';\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 }\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;ADCvB,0BAAqD;AA0B9C,MAAM,2BAA2B,iCACnC,gDADmC;AAAA,EAEtC,MAAM,8BAAU,MAAM,CAAC,MAAM,KAAK,KAAK,KAAK,MAAM,KAAK,CAAC,EAAE,YAAY,uBAAuB,EAAE,aAAa,GAAG;AAAA,EAC/G,OAAO,8BAAU,MAAM,CAAC,SAAS,MAAM,CAAC,EAAE,YAAY,8BAA8B,EAAE,aAAa,MAAM;AAAA,EACzG,MAAM,8BAAU,OAAO,YAAY,2CAA2C,EAAE,aAAa,EAAE;AAAA,EAC/F,UAAU,8BAAU,KAAK,YAAY,0CAA0C,EAAE,aAAa,IAAI;AAAA,EAClG,aAAa,8BAAU,KACpB,YAAY,oEAAoE,EAChF,aAAa,KAAK;AAAA,EACrB,iCAAiC,8BAAU,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
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/styled.js
CHANGED
|
@@ -28,9 +28,8 @@ __export(styled_exports, {
|
|
|
28
28
|
module.exports = __toCommonJS(styled_exports);
|
|
29
29
|
var React = __toESM(require("react"));
|
|
30
30
|
var import_ds_system = require("@elliemae/ds-system");
|
|
31
|
-
var import_ds_system2 = require("@elliemae/ds-system");
|
|
32
31
|
var import_constants = require("./constants");
|
|
33
|
-
const lineLeftAnimation =
|
|
32
|
+
const lineLeftAnimation = import_ds_system.kfrm`
|
|
34
33
|
0% {
|
|
35
34
|
y: 100%;
|
|
36
35
|
height: 100%;
|
|
@@ -44,7 +43,7 @@ const lineLeftAnimation = import_ds_system2.kfrm`
|
|
|
44
43
|
height: 100%;
|
|
45
44
|
}
|
|
46
45
|
`;
|
|
47
|
-
const lineTopAnimation =
|
|
46
|
+
const lineTopAnimation = import_ds_system.kfrm`
|
|
48
47
|
0% {
|
|
49
48
|
x: -100%;
|
|
50
49
|
width: 0%;
|
|
@@ -58,7 +57,7 @@ const lineTopAnimation = import_ds_system2.kfrm`
|
|
|
58
57
|
width: 200%;
|
|
59
58
|
}
|
|
60
59
|
`;
|
|
61
|
-
const lineRightAnimation =
|
|
60
|
+
const lineRightAnimation = import_ds_system.kfrm`
|
|
62
61
|
0%, 12.5% {
|
|
63
62
|
y: -100%;
|
|
64
63
|
height: 0%;
|
|
@@ -72,7 +71,7 @@ const lineRightAnimation = import_ds_system2.kfrm`
|
|
|
72
71
|
height: 200%;
|
|
73
72
|
}
|
|
74
73
|
`;
|
|
75
|
-
const lineBottomAnimation =
|
|
74
|
+
const lineBottomAnimation = import_ds_system.kfrm`
|
|
76
75
|
0%, 25% {
|
|
77
76
|
x: 200%;
|
|
78
77
|
width: 200%;
|
|
@@ -91,27 +90,27 @@ const StyledLineLeft = import_ds_system.styled.rect`
|
|
|
91
90
|
y: 0%;
|
|
92
91
|
width: ${({ size }) => import_constants.sizeToWeight[size]};
|
|
93
92
|
height: 100%;
|
|
94
|
-
animation: ${lineLeftAnimation}
|
|
93
|
+
animation: ${lineLeftAnimation} 2.5s linear 0s infinite;
|
|
95
94
|
`;
|
|
96
95
|
const StyledLineTop = import_ds_system.styled.rect`
|
|
97
96
|
x: -100%;
|
|
98
97
|
y: 0;
|
|
99
98
|
width: 200%;
|
|
100
99
|
height: ${({ size }) => import_constants.sizeToWeight[size]};
|
|
101
|
-
animation: ${lineTopAnimation}
|
|
100
|
+
animation: ${lineTopAnimation} 2.5s linear 0s infinite;
|
|
102
101
|
`;
|
|
103
102
|
const StyledLineRight = import_ds_system.styled.rect`
|
|
104
103
|
x: calc(100% - ${({ size }) => import_constants.sizeToWeight[size]});
|
|
105
104
|
y: -100%;
|
|
106
105
|
width: ${({ size }) => import_constants.sizeToWeight[size]};
|
|
107
106
|
height: 200%;
|
|
108
|
-
animation: ${lineRightAnimation}
|
|
107
|
+
animation: ${lineRightAnimation} 2.5s linear 0s infinite;
|
|
109
108
|
`;
|
|
110
109
|
const StyledLineBottom = import_ds_system.styled.rect`
|
|
111
110
|
x: 0%;
|
|
112
111
|
y: calc(100% - ${({ size }) => import_constants.sizeToWeight[size]});
|
|
113
112
|
width: 200%;
|
|
114
113
|
height: ${({ size }) => import_constants.sizeToWeight[size]};
|
|
115
|
-
animation: ${lineBottomAnimation}
|
|
114
|
+
animation: ${lineBottomAnimation} 2.5s linear 0s infinite;
|
|
116
115
|
`;
|
|
117
116
|
//# sourceMappingURL=styled.js.map
|
package/dist/cjs/styled.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styled.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { kfrm, styled } 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}\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,uBAA6B;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,wBAAO;AAAA;AAAA;AAAA,WAG1B,CAAC,EAAE,WAAW,8BAAa;AAAA;AAAA,eAEvB;AAAA;AAGR,MAAM,gBAAgB,wBAAO;AAAA;AAAA;AAAA;AAAA,YAIxB,CAAC,EAAE,WAAW,8BAAa;AAAA,eACxB;AAAA;AAGR,MAAM,kBAAkB,wBAAO;AAAA,mBACnB,CAAC,EAAE,WAAW,8BAAa;AAAA;AAAA,WAEnC,CAAC,EAAE,WAAW,8BAAa;AAAA;AAAA,eAEvB;AAAA;AAGR,MAAM,mBAAmB,wBAAO;AAAA;AAAA,mBAEpB,CAAC,EAAE,WAAW,8BAAa;AAAA;AAAA,YAElC,CAAC,EAAE,WAAW,8BAAa;AAAA,eACxB;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -39,7 +39,7 @@ const EmptyComp = (props) => /* @__PURE__ */ React2.createElement(React2.Fragmen
|
|
|
39
39
|
const DSSquareIndicator = (props) => {
|
|
40
40
|
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
41
41
|
const _a = useGetGlobalAttributes(propsWithDefault), { height, width, cols, rows } = _a, globalAttributes = __objRest(_a, ["height", "width", "cols", "rows"]);
|
|
42
|
-
const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference
|
|
42
|
+
const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference } = propsWithDefault;
|
|
43
43
|
const Wrapper = useMemo(() => withTooltip ? DSTooltipV3 : EmptyComp, [withTooltip]);
|
|
44
44
|
const uniqueId = useMemo(() => uid(16), []);
|
|
45
45
|
const paddedCoordinate = useMemo(() => `calc(100% - ${sizeToWeight[size]})`, [size]);
|
|
@@ -131,21 +131,17 @@ const DSSquareIndicator = (props) => {
|
|
|
131
131
|
height: sizeToWeight[size]
|
|
132
132
|
}))), /* @__PURE__ */ React2.createElement(StyledLineLeft, {
|
|
133
133
|
size,
|
|
134
|
-
__duration,
|
|
135
134
|
fill: `url(#${uniqueId}-lg1)`
|
|
136
135
|
}), /* @__PURE__ */ React2.createElement(StyledLineTop, {
|
|
137
136
|
size,
|
|
138
|
-
__duration,
|
|
139
137
|
fill: `url(#${uniqueId}-lg2)`,
|
|
140
138
|
clipPath: `url(#${uniqueId}-lcp1)`
|
|
141
139
|
}), /* @__PURE__ */ React2.createElement(StyledLineRight, {
|
|
142
140
|
size,
|
|
143
|
-
__duration,
|
|
144
141
|
fill: `url(#${uniqueId}-lg3)`,
|
|
145
142
|
clipPath: `url(#${uniqueId}-lcp2)`
|
|
146
143
|
}), /* @__PURE__ */ React2.createElement(StyledLineBottom, {
|
|
147
144
|
size,
|
|
148
|
-
__duration,
|
|
149
145
|
fill: `url(#${uniqueId}-lg4)`,
|
|
150
146
|
clipPath: `url(#${uniqueId}-lcp3)`
|
|
151
147
|
})), text !== "" && showText && /* @__PURE__ */ React2.createElement("span", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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-grid';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { describe, useGetGlobalAttributes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\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\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 const { height, width, cols, rows, ...globalAttributes } = useGetGlobalAttributes(propsWithDefault);\n\n const { size, color, text, showText, withTooltip, tooltipStartPlacementPreference
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,MAAM,YAAgC,CAAC,UAAU,4DAAG,MAAM,QAAS;AAE5D,MAAM,oBAAmE,CAAC,UAAU;AACzF,QAAM,mBAAmB,6BAAiE,OAAO,YAAY;AAC7G,QAA2D,4BAAuB,gBAAgB,GAA1F,UAAQ,OAAO,MAAM,SAA8B,IAArB,6BAAqB,IAArB,CAA9B,UAAQ,SAAO,QAAM;AAE7B,QAAM,EAAE,MAAM,OAAO,MAAM,UAAU,aAAa,
|
|
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-grid';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { describe, useGetGlobalAttributes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\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\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 const { height, width, cols, rows, ...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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,MAAM,YAAgC,CAAC,UAAU,4DAAG,MAAM,QAAS;AAE5D,MAAM,oBAAmE,CAAC,UAAU;AACzF,QAAM,mBAAmB,6BAAiE,OAAO,YAAY;AAC7G,QAA2D,4BAAuB,gBAAgB,GAA1F,UAAQ,OAAO,MAAM,SAA8B,IAArB,6BAAqB,IAArB,CAA9B,UAAQ,SAAO,QAAM;AAE7B,QAAM,EAAE,MAAM,OAAO,MAAM,UAAU,aAAa,oCAAoC;AAEtF,QAAM,UAA8B,QAAQ,MAAO,cAAc,cAAc,WAAY,CAAC,WAAW,CAAC;AAExG,QAAM,WAAW,QAAQ,MAAM,IAAI,EAAE,GAAG,CAAC,CAAC;AAC1C,QAAM,mBAAmB,QAAQ,MAAM,eAAe,aAAa,UAAU,CAAC,IAAI,CA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A4B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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 */\nimport { PropTypes, globalAttributesPropTypes } from '@elliemae/ds-utilities';\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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACCA;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { PropTypes, globalAttributesPropTypes } from '@elliemae/ds-utilities';\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 }\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;ACCA;AA0BO,MAAM,2BAA2B,iCACnC,4BADmC;AAAA,EAEtC,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
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/styled.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { styled } from "@elliemae/ds-system";
|
|
3
|
-
import { kfrm } from "@elliemae/ds-system";
|
|
2
|
+
import { kfrm, styled } from "@elliemae/ds-system";
|
|
4
3
|
import { sizeToWeight } from "./constants";
|
|
5
4
|
const lineLeftAnimation = kfrm`
|
|
6
5
|
0% {
|
|
@@ -63,28 +62,28 @@ const StyledLineLeft = styled.rect`
|
|
|
63
62
|
y: 0%;
|
|
64
63
|
width: ${({ size }) => sizeToWeight[size]};
|
|
65
64
|
height: 100%;
|
|
66
|
-
animation: ${lineLeftAnimation}
|
|
65
|
+
animation: ${lineLeftAnimation} 2.5s linear 0s infinite;
|
|
67
66
|
`;
|
|
68
67
|
const StyledLineTop = styled.rect`
|
|
69
68
|
x: -100%;
|
|
70
69
|
y: 0;
|
|
71
70
|
width: 200%;
|
|
72
71
|
height: ${({ size }) => sizeToWeight[size]};
|
|
73
|
-
animation: ${lineTopAnimation}
|
|
72
|
+
animation: ${lineTopAnimation} 2.5s linear 0s infinite;
|
|
74
73
|
`;
|
|
75
74
|
const StyledLineRight = styled.rect`
|
|
76
75
|
x: calc(100% - ${({ size }) => sizeToWeight[size]});
|
|
77
76
|
y: -100%;
|
|
78
77
|
width: ${({ size }) => sizeToWeight[size]};
|
|
79
78
|
height: 200%;
|
|
80
|
-
animation: ${lineRightAnimation}
|
|
79
|
+
animation: ${lineRightAnimation} 2.5s linear 0s infinite;
|
|
81
80
|
`;
|
|
82
81
|
const StyledLineBottom = styled.rect`
|
|
83
82
|
x: 0%;
|
|
84
83
|
y: calc(100% - ${({ size }) => sizeToWeight[size]});
|
|
85
84
|
width: 200%;
|
|
86
85
|
height: ${({ size }) => sizeToWeight[size]};
|
|
87
|
-
animation: ${lineBottomAnimation}
|
|
86
|
+
animation: ${lineBottomAnimation} 2.5s linear 0s infinite;
|
|
88
87
|
`;
|
|
89
88
|
export {
|
|
90
89
|
StyledLineBottom,
|
package/dist/esm/styled.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport {
|
|
5
|
-
"mappings": "AAAA;ACAA;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { kfrm, styled } 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}\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;ACAA;AAEA;AAMA,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,WAAW,aAAa;AAAA;AAAA,eAEvB;AAAA;AAGR,MAAM,gBAAgB,OAAO;AAAA;AAAA;AAAA;AAAA,YAIxB,CAAC,EAAE,WAAW,aAAa;AAAA,eACxB;AAAA;AAGR,MAAM,kBAAkB,OAAO;AAAA,mBACnB,CAAC,EAAE,WAAW,aAAa;AAAA;AAAA,WAEnC,CAAC,EAAE,WAAW,aAAa;AAAA;AAAA,eAEvB;AAAA;AAGR,MAAM,mBAAmB,OAAO;AAAA;AAAA,mBAEpB,CAAC,EAAE,WAAW,aAAa;AAAA;AAAA,YAElC,CAAC,EAAE,WAAW,aAAa;AAAA,eACxB;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-square-indicator",
|
|
3
|
-
"version": "3.1.0-next.
|
|
3
|
+
"version": "3.1.0-next.16",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Indeterminate Progress Indicator",
|
|
6
6
|
"files": [
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"indent": 4
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@elliemae/ds-grid": "3.1.0-next.
|
|
47
|
-
"@elliemae/ds-system": "3.1.0-next.
|
|
48
|
-
"@elliemae/ds-tooltip": "3.1.0-next.
|
|
49
|
-
"@elliemae/ds-utilities": "3.1.0-next.
|
|
46
|
+
"@elliemae/ds-grid": "3.1.0-next.16",
|
|
47
|
+
"@elliemae/ds-system": "3.1.0-next.16",
|
|
48
|
+
"@elliemae/ds-tooltip": "3.1.0-next.16",
|
|
49
|
+
"@elliemae/ds-utilities": "3.1.0-next.16",
|
|
50
50
|
"styled-components": "^5.3.5",
|
|
51
51
|
"uid": "^2.0.0"
|
|
52
52
|
},
|