@elliemae/ds-indeterminate-progress-indicator 3.70.0-next.2 → 3.70.0-next.4
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/DSIndeterminateProgressIndicator.js +1 -9
- package/dist/cjs/DSIndeterminateProgressIndicator.js.map +2 -2
- package/dist/cjs/TruncatedTooltipText.js +94 -0
- package/dist/cjs/TruncatedTooltipText.js.map +7 -0
- package/dist/cjs/styled.js +2 -6
- package/dist/cjs/styled.js.map +3 -3
- package/dist/esm/DSIndeterminateProgressIndicator.js +1 -9
- package/dist/esm/DSIndeterminateProgressIndicator.js.map +2 -2
- package/dist/esm/TruncatedTooltipText.js +68 -0
- package/dist/esm/TruncatedTooltipText.js.map +7 -0
- package/dist/esm/styled.js +2 -6
- package/dist/esm/styled.js.map +3 -3
- package/dist/types/TruncatedTooltipText.d.ts +8 -0
- package/dist/types/styled.d.ts +1 -43
- package/package.json +5 -5
|
@@ -37,7 +37,6 @@ var React = __toESM(require("react"));
|
|
|
37
37
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
38
|
var import_react = require("react");
|
|
39
39
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
40
|
-
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
41
40
|
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
42
41
|
var import_useIndeterminateProgressIndicator = require("./config/useIndeterminateProgressIndicator.js");
|
|
43
42
|
var import_constants = require("./constants/index.js");
|
|
@@ -73,14 +72,7 @@ const DSIndeterminateProgressIndicator = (props) => {
|
|
|
73
72
|
...xstyledAttributes,
|
|
74
73
|
...containerProps,
|
|
75
74
|
children: [
|
|
76
|
-
!lineOnly ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
77
|
-
import_styled.StyledTruncatedTooltipText,
|
|
78
|
-
{
|
|
79
|
-
value: label,
|
|
80
|
-
getOwnerProps,
|
|
81
|
-
getOwnerPropsArguments
|
|
82
|
-
}
|
|
83
|
-
) }) : null,
|
|
75
|
+
!lineOnly ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledTruncatedTooltipText, { value: label }) : null,
|
|
84
76
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.Bar, { getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
77
|
import_styled.BarIndicator,
|
|
86
78
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSIndeterminateProgressIndicator.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useCallback } from 'react';\nimport { describe, useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-props-helpers';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React, { useCallback } from 'react';\nimport { describe, useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n DSIndeterminateProgressIndicatorPropTypes,\n type DSIndeterminateProgressIndicatorT,\n} from './react-desc-prop-types.js';\nimport { useIndeterminateProgressIndicator } from './config/useIndeterminateProgressIndicator.js';\nimport { DSIndeterminateProgressIndicatorName } from './constants/index.js';\nimport { Bar, BarIndicator, Container, StyledTruncatedTooltipText } from './styled.js';\n\nconst DSIndeterminateProgressIndicator: React.ComponentType<DSIndeterminateProgressIndicatorT.Props> = (props) => {\n const { propsWithDefault, label } = useIndeterminateProgressIndicator(props);\n const {\n containerProps,\n complete,\n failed,\n processing,\n processingComplete,\n processingFail,\n animated,\n percent,\n lineOnly,\n } = propsWithDefault;\n\n const globalAttributes = useGetGlobalAttributes(propsWithDefault);\n const xstyledAttributes = useGetXstyledProps(propsWithDefault);\n const getOwnerProps = useCallback(() => propsWithDefault, [propsWithDefault]);\n const getOwnerPropsArguments = useCallback(() => ({}), []);\n\n return (\n <Container\n aria-busy={processing}\n aria-label={label}\n aria-live=\"polite\"\n role=\"alert\"\n lineOnly={lineOnly}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n {...globalAttributes}\n {...xstyledAttributes}\n {...containerProps}\n >\n {!lineOnly ? <StyledTruncatedTooltipText value={label} /> : null}\n <Bar getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <BarIndicator\n complete={complete}\n failed={failed}\n processing={processing}\n animated={animated}\n processingComplete={processingComplete}\n processingFail={processingFail}\n percent={percent}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n </Bar>\n </Container>\n );\n};\n\nDSIndeterminateProgressIndicator.displayName = DSIndeterminateProgressIndicatorName;\nconst IndeterminateProgressIndicatorWithSchema = describe(DSIndeterminateProgressIndicator);\nIndeterminateProgressIndicatorWithSchema.propTypes = DSIndeterminateProgressIndicatorPropTypes;\n\nexport { DSIndeterminateProgressIndicator, IndeterminateProgressIndicatorWithSchema };\nexport default DSIndeterminateProgressIndicator;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8BnB;AA9BJ,mBAAmC;AACnC,8BAAqE;AACrE,mCAGO;AACP,+CAAkD;AAClD,uBAAqD;AACrD,oBAAyE;AAEzE,MAAM,mCAAiG,CAAC,UAAU;AAChH,QAAM,EAAE,kBAAkB,MAAM,QAAI,4EAAkC,KAAK;AAC3E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,uBAAmB,gDAAuB,gBAAgB;AAChE,QAAM,wBAAoB,4CAAmB,gBAAgB;AAC7D,QAAM,oBAAgB,0BAAY,MAAM,kBAAkB,CAAC,gBAAgB,CAAC;AAC5E,QAAM,6BAAyB,0BAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAEzD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAW;AAAA,MACX,cAAY;AAAA,MACZ,aAAU;AAAA,MACV,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MAEH;AAAA,SAAC,WAAW,4CAAC,4CAA2B,OAAO,OAAO,IAAK;AAAA,QAC5D,4CAAC,qBAAI,eAA8B,wBACjC;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,iCAAiC,cAAc;AAC/C,MAAM,+CAA2C,kCAAS,gCAAgC;AAC1F,yCAAyC,YAAY;AAGrD,IAAO,2CAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,94 @@
|
|
|
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 TruncatedTooltipText_exports = {};
|
|
30
|
+
__export(TruncatedTooltipText_exports, {
|
|
31
|
+
TruncatedTooltipText: () => TruncatedTooltipText,
|
|
32
|
+
default: () => TruncatedTooltipText_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(TruncatedTooltipText_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_system = require("@elliemae/ds-system");
|
|
39
|
+
var import_ds_floating_context = require("@elliemae/ds-floating-context");
|
|
40
|
+
const TruncatedSpan = import_ds_system.styled.span`
|
|
41
|
+
text-overflow: ellipsis;
|
|
42
|
+
white-space: nowrap;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
display: inline-block;
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
`;
|
|
47
|
+
const TooltipContainer = import_ds_system.styled.div`
|
|
48
|
+
text-align: left;
|
|
49
|
+
min-width: ${({ theme }) => theme.space.l};
|
|
50
|
+
max-width: 250px;
|
|
51
|
+
min-height: 30px;
|
|
52
|
+
display: grid;
|
|
53
|
+
align-items: center;
|
|
54
|
+
padding: ${({ theme }) => `${theme.space.xxxs} ${theme.space.xs}`};
|
|
55
|
+
position: relative;
|
|
56
|
+
background-color: white;
|
|
57
|
+
border-radius: 2px;
|
|
58
|
+
font-size: 13px;
|
|
59
|
+
color: ${({ theme }) => theme.colors.neutral[600]};
|
|
60
|
+
pointer-events: none;
|
|
61
|
+
`;
|
|
62
|
+
const TruncatedTooltipText = ({ value = "", placement = "top" }) => {
|
|
63
|
+
const [showTooltip, setShowTooltip] = (0, import_react.useState)(false);
|
|
64
|
+
const { refs, floatingStyles, arrowStyles, context } = (0, import_ds_floating_context.useFloatingContext)({
|
|
65
|
+
placement,
|
|
66
|
+
externallyControlledIsOpen: showTooltip,
|
|
67
|
+
withoutAnimation: true
|
|
68
|
+
});
|
|
69
|
+
const handleMouseEnter = (0, import_react.useCallback)((e) => {
|
|
70
|
+
const el = e.currentTarget;
|
|
71
|
+
setShowTooltip(el.offsetWidth < el.scrollWidth);
|
|
72
|
+
}, []);
|
|
73
|
+
const handleMouseLeave = (0, import_react.useCallback)(() => {
|
|
74
|
+
setShowTooltip(false);
|
|
75
|
+
}, []);
|
|
76
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TruncatedSpan, { innerRef: refs.setReference, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: value }),
|
|
78
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
79
|
+
import_ds_floating_context.FloatingWrapper,
|
|
80
|
+
{
|
|
81
|
+
innerRef: refs.setFloating,
|
|
82
|
+
isOpen: showTooltip,
|
|
83
|
+
floatingStyles,
|
|
84
|
+
context,
|
|
85
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TooltipContainer, { children: [
|
|
86
|
+
value,
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_floating_context.PopoverArrow, { ...arrowStyles })
|
|
88
|
+
] })
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
] });
|
|
92
|
+
};
|
|
93
|
+
var TruncatedTooltipText_default = TruncatedTooltipText;
|
|
94
|
+
//# sourceMappingURL=TruncatedTooltipText.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/TruncatedTooltipText.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React, { useCallback, useState } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport {\n useFloatingContext,\n FloatingWrapper,\n PopoverArrow,\n type DSHookFloatingContextT,\n} from '@elliemae/ds-floating-context';\n\nconst TruncatedSpan = styled.span`\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n display: inline-block;\n max-width: 100%;\n`;\n\n// Matches DSTooltipV3's StyledTooltipContainer styles for visual consistency\nconst TooltipContainer = styled.div`\n text-align: left;\n min-width: ${({ theme }) => theme.space.l};\n max-width: 250px;\n min-height: 30px;\n display: grid;\n align-items: center;\n padding: ${({ theme }) => `${theme.space.xxxs} ${theme.space.xs}`};\n position: relative;\n background-color: white;\n border-radius: 2px;\n font-size: 13px;\n color: ${({ theme }) => theme.colors.neutral[600]};\n pointer-events: none;\n`;\n\ninterface TruncatedTooltipTextProps {\n value?: string;\n placement?: DSHookFloatingContextT.PopperPlacementsT;\n}\n\nconst TruncatedTooltipText = ({ value = '', placement = 'top' }: TruncatedTooltipTextProps) => {\n const [showTooltip, setShowTooltip] = useState(false);\n\n const { refs, floatingStyles, arrowStyles, context } = useFloatingContext({\n placement,\n externallyControlledIsOpen: showTooltip,\n withoutAnimation: true,\n });\n\n const handleMouseEnter = useCallback((e: React.MouseEvent<HTMLSpanElement>) => {\n const el = e.currentTarget;\n setShowTooltip(el.offsetWidth < el.scrollWidth);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setShowTooltip(false);\n }, []);\n\n return (\n <>\n <TruncatedSpan innerRef={refs.setReference} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}>\n {value}\n </TruncatedSpan>\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={showTooltip}\n floatingStyles={floatingStyles}\n context={context}\n >\n <TooltipContainer>\n {value}\n <PopoverArrow {...arrowStyles} />\n </TooltipContainer>\n </FloatingWrapper>\n </>\n );\n};\n\nexport { TruncatedTooltipText };\nexport default TruncatedTooltipText;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0DnB;AA1DJ,mBAA6C;AAC7C,uBAAuB;AACvB,iCAKO;AAEP,MAAM,gBAAgB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS7B,MAAM,mBAAmB,wBAAO;AAAA;AAAA,eAEjB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,aAK9B,CAAC,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,IAAI,IAAI,MAAM,MAAM,EAAE,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA,WAKxD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAAA;AASnD,MAAM,uBAAuB,CAAC,EAAE,QAAQ,IAAI,YAAY,MAAM,MAAiC;AAC7F,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,KAAK;AAEpD,QAAM,EAAE,MAAM,gBAAgB,aAAa,QAAQ,QAAI,+CAAmB;AAAA,IACxE;AAAA,IACA,4BAA4B;AAAA,IAC5B,kBAAkB;AAAA,EACpB,CAAC;AAED,QAAM,uBAAmB,0BAAY,CAAC,MAAyC;AAC7E,UAAM,KAAK,EAAE;AACb,mBAAe,GAAG,cAAc,GAAG,WAAW;AAAA,EAChD,GAAG,CAAC,CAAC;AAEL,QAAM,uBAAmB,0BAAY,MAAM;AACzC,mBAAe,KAAK;AAAA,EACtB,GAAG,CAAC,CAAC;AAEL,SACE,4EACE;AAAA,gDAAC,iBAAc,UAAU,KAAK,cAAc,cAAc,kBAAkB,cAAc,kBACvF,iBACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,UAAU,KAAK;AAAA,QACf,QAAQ;AAAA,QACR;AAAA,QACA;AAAA,QAEA,uDAAC,oBACE;AAAA;AAAA,UACD,4CAAC,2CAAc,GAAG,aAAa;AAAA,WACjC;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAGA,IAAO,+BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/cjs/styled.js
CHANGED
|
@@ -31,13 +31,13 @@ __export(styled_exports, {
|
|
|
31
31
|
Bar: () => Bar,
|
|
32
32
|
BarIndicator: () => BarIndicator,
|
|
33
33
|
Container: () => Container,
|
|
34
|
-
StyledTruncatedTooltipText: () =>
|
|
34
|
+
StyledTruncatedTooltipText: () => import_TruncatedTooltipText2.TruncatedTooltipText
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(styled_exports);
|
|
37
37
|
var React = __toESM(require("react"));
|
|
38
38
|
var import_ds_system = require("@elliemae/ds-system");
|
|
39
|
-
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
40
39
|
var import_constants = require("./constants/index.js");
|
|
40
|
+
var import_TruncatedTooltipText2 = require("./TruncatedTooltipText.js");
|
|
41
41
|
const IndeterminateAnimation = (color) => import_ds_system.kfrm`
|
|
42
42
|
0% {
|
|
43
43
|
transform: scaleX(0.015);
|
|
@@ -101,10 +101,6 @@ const Container = (0, import_ds_system.styled)("div", {
|
|
|
101
101
|
width: 100%;
|
|
102
102
|
padding: ${({ theme, lineOnly }) => lineOnly ? 0 : `${theme.space.xxs} ${theme.space.xs}`};
|
|
103
103
|
`;
|
|
104
|
-
const StyledTruncatedTooltipText = (0, import_ds_system.styled)(import_ds_truncated_tooltip_text.DSTruncatedTooltipText, {
|
|
105
|
-
name: import_constants.DSIndeterminateProgressIndicatorName,
|
|
106
|
-
slot: import_constants.DSIndeterminateProgressIndicatorSlots.LABEL
|
|
107
|
-
})``;
|
|
108
104
|
const Bar = (0, import_ds_system.styled)("div", {
|
|
109
105
|
name: import_constants.DSIndeterminateProgressIndicatorName,
|
|
110
106
|
slot: import_constants.DSIndeterminateProgressIndicatorSlots.BAR
|
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": ["/* eslint-disable complexity */\nimport { css, kfrm, styled } from '@elliemae/ds-system';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAAkC;
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["/* eslint-disable complexity */\nimport { css, kfrm, styled } from '@elliemae/ds-system';\nimport { TruncatedTooltipText } from './TruncatedTooltipText.js';\nimport { type DSIndeterminateProgressIndicatorT } from './react-desc-prop-types.js';\nimport { DSIndeterminateProgressIndicatorName, DSIndeterminateProgressIndicatorSlots } from './constants/index.js';\n\nconst IndeterminateAnimation = (color: string) => kfrm`\n 0% {\n transform: scaleX(0.015);\n transform-origin: 0% 0%;\n background-image: linear-gradient(to right, rgba(255,255,255,0.8) 10%, ${color});\n }\n 25% {\n transform: scaleX(0.4);\n }\n 50% {\n transform: scaleX(0.015);\n transform-origin: 100% 0%;\n background-image: linear-gradient(to right, rgba(255,255,255,0.8) 10%, ${color});\n }\n 50.1% {\n transform: scaleX(0.015);\n transform-origin: 100% 0%;\n background-image: linear-gradient(to left, rgba(255,255,255,0.8) 10%, ${color});\n }\n 75% {\n transform: scaleX(0.4);\n }\n 100% {\n transform: scaleX(0.015);\n transform-origin: 0% 0%;\n background-image: linear-gradient(to left, rgba(255,255,255,0.8) 10%, ${color});\n }\n`;\n\nconst ProcessingSuccess = kfrm`\n 0%, 30% { transform: translateX(-50%); width: 50% }\n 15% { transform: translateX(150%); width: 50% }\n 0%, 60% { transform: translateX(-50%); width: 50% }\n 45% { transform: translateX(150%); width: 50% }\n 0%, 90% { transform: translateX(-50%); width: 50% }\n 75% { transform: translateX(150%); width: 50% }\n 100% { transform: translateX(0%); }\n`;\n\nconst ProcessingSuccessEnd = (color: string) => kfrm`\n 0% { transform: translateX(-50%); width: 50% }\n 45% { transform: translateX(150%); width: 50% }\n 100% { transform: translateX(0%); background-color: ${color}; }\n`;\n\nconst ProcessingFail = kfrm`\n 0%, 30% { transform: translateX(-50%); width: 50% }\n 15% { transform: translateX(150%); width: 50% }\n 0%, 60% { transform: translateX(-50%); width: 50% }\n 45% { transform: translateX(150%); width: 50% }\n 0%, 90% { transform: translateX(-50%); width: 50% }\n 75% { transform: translateX(150%); width: 50%; }\n 100% { transform: translateX(0%); }\n`;\n\nconst ProcessingFailEnd = kfrm`\n 0% { transform: translateX(-50%); width: 50% }\n 45% { transform: translateX(150%); width: 50% }\n 100% { transform: translateX(0%); background-color: #e34256; }\n`;\n\nexport const Container = styled('div', {\n name: DSIndeterminateProgressIndicatorName,\n slot: DSIndeterminateProgressIndicatorSlots.ROOT,\n})<DSIndeterminateProgressIndicatorT.Props>`\n width: 100%;\n padding: ${({ theme, lineOnly }) => (lineOnly ? 0 : `${theme.space.xxs} ${theme.space.xs}`)};\n`;\n\n// Re-exported as alias; the slot template was empty so no CSS overrides are lost\nexport { TruncatedTooltipText as StyledTruncatedTooltipText } from './TruncatedTooltipText.js';\n\nexport const Bar = styled('div', {\n name: DSIndeterminateProgressIndicatorName,\n slot: DSIndeterminateProgressIndicatorSlots.BAR,\n})`\n background-color: ${({ theme }) => theme.colors.neutral[100]};\n overflow: hidden;\n`;\n\nexport const BarIndicator = styled('div', {\n name: DSIndeterminateProgressIndicatorName,\n slot: DSIndeterminateProgressIndicatorSlots.BAR_INDICATOR,\n})<DSIndeterminateProgressIndicatorT.Props>`\n height: ${({ theme }) => theme.space.xxxs};\n width: ${({ complete, failed, animated, processing, percent }) =>\n `${!complete && !failed && !animated && processing ? percent : 100}%`};\n ${({ theme, complete, failed, processing, animated, processingComplete, processingFail }) => {\n // Default\n if (!complete && !failed && !processing && !processingComplete && !processingFail)\n return css`\n background-color: ${theme.colors.neutral[500]};\n `;\n // Completed\n if (complete && processing)\n return css`\n width: 100%;\n background-color: ${theme.colors.brand[500]};\n animation: ${ProcessingSuccessEnd(theme.colors.success[900])} 1s ease-in-out;\n animation-fill-mode: forwards;\n `;\n if (complete && !processingComplete && !processing)\n return css`\n background-color: ${theme.colors.success[900]};\n `;\n // Failed\n if (failed && !processingFail && !processing)\n return css`\n background-color: #e34256;\n `;\n // Processing\n if (processing) {\n if (animated) {\n return css`\n width: 100%;\n animation: ${IndeterminateAnimation(theme.colors.brand[500])} 2s cubic-bezier(0.645, 0.045, 0.355, 1) infinite;\n background-color: ${theme.colors.brand[500]};\n `;\n }\n return css`\n background-color: ${theme.colors.brand[500]};\n `;\n }\n // Processing -> Completed\n if (processingComplete && !complete) {\n return css`\n width: 50%;\n animation: ${ProcessingSuccess} 4s infinite;\n animation-fill-mode: forwards;\n background-color: ${theme.colors.brand[500]};\n `;\n }\n if (processingComplete && complete)\n return css`\n width: 100%;\n background-color: ${theme.colors.brand[500]};\n animation: ${ProcessingSuccessEnd(theme.colors.success[900])} 1s ease-in-out;\n animation-fill-mode: forwards;\n `;\n // Processing -> Failed\n if (processingFail && !failed)\n return css`\n width: 50%;\n animation: ${ProcessingFail} 4s infinite;\n animation-fill-mode: forwards;\n background-color: ${theme.colors.brand[500]};\n `;\n if (processingFail && failed)\n return css`\n width: 100%;\n background-color: ${theme.colors.brand[500]};\n animation: ${ProcessingFailEnd} 1s ease-in-out;\n animation-fill-mode: forwards;\n `;\n return '';\n }};\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAAkC;AAGlC,uBAA4F;AAwE5F,IAAAA,+BAAmE;AAtEnE,MAAM,yBAAyB,CAAC,UAAkB;AAAA;AAAA;AAAA;AAAA,6EAI2B,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6EAQL,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,4EAKN,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4EAQL,KAAK;AAAA;AAAA;AAIjF,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU1B,MAAM,uBAAuB,CAAC,UAAkB;AAAA;AAAA;AAAA,2DAGW,KAAK;AAAA;AAGhE,MAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUvB,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAMnB,MAAM,gBAAY,yBAAO,OAAO;AAAA,EACrC,MAAM;AAAA,EACN,MAAM,uDAAsC;AAC9C,CAAC;AAAA;AAAA,aAEY,CAAC,EAAE,OAAO,SAAS,MAAO,WAAW,IAAI,GAAG,MAAM,MAAM,GAAG,IAAI,MAAM,MAAM,EAAE,EAAG;AAAA;AAMtF,MAAM,UAAM,yBAAO,OAAO;AAAA,EAC/B,MAAM;AAAA,EACN,MAAM,uDAAsC;AAC9C,CAAC;AAAA,sBACqB,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,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sB;AACxB,WAAO;AAAA;AAAA,4BAEe,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA,qBAC9B,qBAAqB,MAAM,OAAO,QAAQ,GAAG,CAAC,CAAC;AAAA;AAAA;AAIhE,MAAI,kBAAkB,CAAC;AACrB,WAAO;AAAA;AAAA,qBAEQ,cAAc;AAAA;AAAA,4BAEP,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAE/C,MAAI,kBAAkB;AACpB,WAAO;AAAA;AAAA,4BAEe,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA,qBAC9B,iBAAiB;AAAA;AAAA;AAGlC,SAAO;AACT,CAAC;AAAA;",
|
|
6
|
+
"names": ["import_TruncatedTooltipText"]
|
|
7
7
|
}
|
|
@@ -2,7 +2,6 @@ import * as React from "react";
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback } from "react";
|
|
4
4
|
import { describe, useGetGlobalAttributes, useGetXstyledProps } from "@elliemae/ds-props-helpers";
|
|
5
|
-
import { TooltipTextProvider } from "@elliemae/ds-truncated-tooltip-text";
|
|
6
5
|
import {
|
|
7
6
|
DSIndeterminateProgressIndicatorPropTypes
|
|
8
7
|
} from "./react-desc-prop-types.js";
|
|
@@ -40,14 +39,7 @@ const DSIndeterminateProgressIndicator = (props) => {
|
|
|
40
39
|
...xstyledAttributes,
|
|
41
40
|
...containerProps,
|
|
42
41
|
children: [
|
|
43
|
-
!lineOnly ? /* @__PURE__ */ jsx(
|
|
44
|
-
StyledTruncatedTooltipText,
|
|
45
|
-
{
|
|
46
|
-
value: label,
|
|
47
|
-
getOwnerProps,
|
|
48
|
-
getOwnerPropsArguments
|
|
49
|
-
}
|
|
50
|
-
) }) : null,
|
|
42
|
+
!lineOnly ? /* @__PURE__ */ jsx(StyledTruncatedTooltipText, { value: label }) : null,
|
|
51
43
|
/* @__PURE__ */ jsx(Bar, { getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ jsx(
|
|
52
44
|
BarIndicator,
|
|
53
45
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSIndeterminateProgressIndicator.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback } from 'react';\nimport { describe, useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-props-helpers';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback } from 'react';\nimport { describe, useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n DSIndeterminateProgressIndicatorPropTypes,\n type DSIndeterminateProgressIndicatorT,\n} from './react-desc-prop-types.js';\nimport { useIndeterminateProgressIndicator } from './config/useIndeterminateProgressIndicator.js';\nimport { DSIndeterminateProgressIndicatorName } from './constants/index.js';\nimport { Bar, BarIndicator, Container, StyledTruncatedTooltipText } from './styled.js';\n\nconst DSIndeterminateProgressIndicator: React.ComponentType<DSIndeterminateProgressIndicatorT.Props> = (props) => {\n const { propsWithDefault, label } = useIndeterminateProgressIndicator(props);\n const {\n containerProps,\n complete,\n failed,\n processing,\n processingComplete,\n processingFail,\n animated,\n percent,\n lineOnly,\n } = propsWithDefault;\n\n const globalAttributes = useGetGlobalAttributes(propsWithDefault);\n const xstyledAttributes = useGetXstyledProps(propsWithDefault);\n const getOwnerProps = useCallback(() => propsWithDefault, [propsWithDefault]);\n const getOwnerPropsArguments = useCallback(() => ({}), []);\n\n return (\n <Container\n aria-busy={processing}\n aria-label={label}\n aria-live=\"polite\"\n role=\"alert\"\n lineOnly={lineOnly}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n {...globalAttributes}\n {...xstyledAttributes}\n {...containerProps}\n >\n {!lineOnly ? <StyledTruncatedTooltipText value={label} /> : null}\n <Bar getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <BarIndicator\n complete={complete}\n failed={failed}\n processing={processing}\n animated={animated}\n processingComplete={processingComplete}\n processingFail={processingFail}\n percent={percent}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n </Bar>\n </Container>\n );\n};\n\nDSIndeterminateProgressIndicator.displayName = DSIndeterminateProgressIndicatorName;\nconst IndeterminateProgressIndicatorWithSchema = describe(DSIndeterminateProgressIndicator);\nIndeterminateProgressIndicatorWithSchema.propTypes = DSIndeterminateProgressIndicatorPropTypes;\n\nexport { DSIndeterminateProgressIndicator, IndeterminateProgressIndicatorWithSchema };\nexport default DSIndeterminateProgressIndicator;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC8BnB,SAYe,KAZf;AA9BJ,SAAgB,mBAAmB;AACnC,SAAS,UAAU,wBAAwB,0BAA0B;AACrE;AAAA,EACE;AAAA,OAEK;AACP,SAAS,yCAAyC;AAClD,SAAS,4CAA4C;AACrD,SAAS,KAAK,cAAc,WAAW,kCAAkC;AAEzE,MAAM,mCAAiG,CAAC,UAAU;AAChH,QAAM,EAAE,kBAAkB,MAAM,IAAI,kCAAkC,KAAK;AAC3E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,mBAAmB,uBAAuB,gBAAgB;AAChE,QAAM,oBAAoB,mBAAmB,gBAAgB;AAC7D,QAAM,gBAAgB,YAAY,MAAM,kBAAkB,CAAC,gBAAgB,CAAC;AAC5E,QAAM,yBAAyB,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAEzD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAW;AAAA,MACX,cAAY;AAAA,MACZ,aAAU;AAAA,MACV,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MAEH;AAAA,SAAC,WAAW,oBAAC,8BAA2B,OAAO,OAAO,IAAK;AAAA,QAC5D,oBAAC,OAAI,eAA8B,wBACjC;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,iCAAiC,cAAc;AAC/C,MAAM,2CAA2C,SAAS,gCAAgC;AAC1F,yCAAyC,YAAY;AAGrD,IAAO,2CAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
4
|
+
import { styled } from "@elliemae/ds-system";
|
|
5
|
+
import {
|
|
6
|
+
useFloatingContext,
|
|
7
|
+
FloatingWrapper,
|
|
8
|
+
PopoverArrow
|
|
9
|
+
} from "@elliemae/ds-floating-context";
|
|
10
|
+
const TruncatedSpan = styled.span`
|
|
11
|
+
text-overflow: ellipsis;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
display: inline-block;
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
`;
|
|
17
|
+
const TooltipContainer = styled.div`
|
|
18
|
+
text-align: left;
|
|
19
|
+
min-width: ${({ theme }) => theme.space.l};
|
|
20
|
+
max-width: 250px;
|
|
21
|
+
min-height: 30px;
|
|
22
|
+
display: grid;
|
|
23
|
+
align-items: center;
|
|
24
|
+
padding: ${({ theme }) => `${theme.space.xxxs} ${theme.space.xs}`};
|
|
25
|
+
position: relative;
|
|
26
|
+
background-color: white;
|
|
27
|
+
border-radius: 2px;
|
|
28
|
+
font-size: 13px;
|
|
29
|
+
color: ${({ theme }) => theme.colors.neutral[600]};
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
`;
|
|
32
|
+
const TruncatedTooltipText = ({ value = "", placement = "top" }) => {
|
|
33
|
+
const [showTooltip, setShowTooltip] = useState(false);
|
|
34
|
+
const { refs, floatingStyles, arrowStyles, context } = useFloatingContext({
|
|
35
|
+
placement,
|
|
36
|
+
externallyControlledIsOpen: showTooltip,
|
|
37
|
+
withoutAnimation: true
|
|
38
|
+
});
|
|
39
|
+
const handleMouseEnter = useCallback((e) => {
|
|
40
|
+
const el = e.currentTarget;
|
|
41
|
+
setShowTooltip(el.offsetWidth < el.scrollWidth);
|
|
42
|
+
}, []);
|
|
43
|
+
const handleMouseLeave = useCallback(() => {
|
|
44
|
+
setShowTooltip(false);
|
|
45
|
+
}, []);
|
|
46
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
47
|
+
/* @__PURE__ */ jsx(TruncatedSpan, { innerRef: refs.setReference, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: value }),
|
|
48
|
+
/* @__PURE__ */ jsx(
|
|
49
|
+
FloatingWrapper,
|
|
50
|
+
{
|
|
51
|
+
innerRef: refs.setFloating,
|
|
52
|
+
isOpen: showTooltip,
|
|
53
|
+
floatingStyles,
|
|
54
|
+
context,
|
|
55
|
+
children: /* @__PURE__ */ jsxs(TooltipContainer, { children: [
|
|
56
|
+
value,
|
|
57
|
+
/* @__PURE__ */ jsx(PopoverArrow, { ...arrowStyles })
|
|
58
|
+
] })
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
] });
|
|
62
|
+
};
|
|
63
|
+
var TruncatedTooltipText_default = TruncatedTooltipText;
|
|
64
|
+
export {
|
|
65
|
+
TruncatedTooltipText,
|
|
66
|
+
TruncatedTooltipText_default as default
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=TruncatedTooltipText.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/TruncatedTooltipText.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useState } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport {\n useFloatingContext,\n FloatingWrapper,\n PopoverArrow,\n type DSHookFloatingContextT,\n} from '@elliemae/ds-floating-context';\n\nconst TruncatedSpan = styled.span`\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n display: inline-block;\n max-width: 100%;\n`;\n\n// Matches DSTooltipV3's StyledTooltipContainer styles for visual consistency\nconst TooltipContainer = styled.div`\n text-align: left;\n min-width: ${({ theme }) => theme.space.l};\n max-width: 250px;\n min-height: 30px;\n display: grid;\n align-items: center;\n padding: ${({ theme }) => `${theme.space.xxxs} ${theme.space.xs}`};\n position: relative;\n background-color: white;\n border-radius: 2px;\n font-size: 13px;\n color: ${({ theme }) => theme.colors.neutral[600]};\n pointer-events: none;\n`;\n\ninterface TruncatedTooltipTextProps {\n value?: string;\n placement?: DSHookFloatingContextT.PopperPlacementsT;\n}\n\nconst TruncatedTooltipText = ({ value = '', placement = 'top' }: TruncatedTooltipTextProps) => {\n const [showTooltip, setShowTooltip] = useState(false);\n\n const { refs, floatingStyles, arrowStyles, context } = useFloatingContext({\n placement,\n externallyControlledIsOpen: showTooltip,\n withoutAnimation: true,\n });\n\n const handleMouseEnter = useCallback((e: React.MouseEvent<HTMLSpanElement>) => {\n const el = e.currentTarget;\n setShowTooltip(el.offsetWidth < el.scrollWidth);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setShowTooltip(false);\n }, []);\n\n return (\n <>\n <TruncatedSpan innerRef={refs.setReference} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}>\n {value}\n </TruncatedSpan>\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={showTooltip}\n floatingStyles={floatingStyles}\n context={context}\n >\n <TooltipContainer>\n {value}\n <PopoverArrow {...arrowStyles} />\n </TooltipContainer>\n </FloatingWrapper>\n </>\n );\n};\n\nexport { TruncatedTooltipText };\nexport default TruncatedTooltipText;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC0DnB,mBACE,KASE,YAVJ;AA1DJ,SAAgB,aAAa,gBAAgB;AAC7C,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAEP,MAAM,gBAAgB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS7B,MAAM,mBAAmB,OAAO;AAAA;AAAA,eAEjB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,aAK9B,CAAC,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,IAAI,IAAI,MAAM,MAAM,EAAE,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA,WAKxD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAAA;AASnD,MAAM,uBAAuB,CAAC,EAAE,QAAQ,IAAI,YAAY,MAAM,MAAiC;AAC7F,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,KAAK;AAEpD,QAAM,EAAE,MAAM,gBAAgB,aAAa,QAAQ,IAAI,mBAAmB;AAAA,IACxE;AAAA,IACA,4BAA4B;AAAA,IAC5B,kBAAkB;AAAA,EACpB,CAAC;AAED,QAAM,mBAAmB,YAAY,CAAC,MAAyC;AAC7E,UAAM,KAAK,EAAE;AACb,mBAAe,GAAG,cAAc,GAAG,WAAW;AAAA,EAChD,GAAG,CAAC,CAAC;AAEL,QAAM,mBAAmB,YAAY,MAAM;AACzC,mBAAe,KAAK;AAAA,EACtB,GAAG,CAAC,CAAC;AAEL,SACE,iCACE;AAAA,wBAAC,iBAAc,UAAU,KAAK,cAAc,cAAc,kBAAkB,cAAc,kBACvF,iBACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,UAAU,KAAK;AAAA,QACf,QAAQ;AAAA,QACR;AAAA,QACA;AAAA,QAEA,+BAAC,oBACE;AAAA;AAAA,UACD,oBAAC,gBAAc,GAAG,aAAa;AAAA,WACjC;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAGA,IAAO,+BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/styled.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { css, kfrm, styled } from "@elliemae/ds-system";
|
|
3
|
-
import { DSTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
4
3
|
import { DSIndeterminateProgressIndicatorName, DSIndeterminateProgressIndicatorSlots } from "./constants/index.js";
|
|
5
4
|
const IndeterminateAnimation = (color) => kfrm`
|
|
6
5
|
0% {
|
|
@@ -65,10 +64,7 @@ const Container = styled("div", {
|
|
|
65
64
|
width: 100%;
|
|
66
65
|
padding: ${({ theme, lineOnly }) => lineOnly ? 0 : `${theme.space.xxs} ${theme.space.xs}`};
|
|
67
66
|
`;
|
|
68
|
-
|
|
69
|
-
name: DSIndeterminateProgressIndicatorName,
|
|
70
|
-
slot: DSIndeterminateProgressIndicatorSlots.LABEL
|
|
71
|
-
})``;
|
|
67
|
+
import { TruncatedTooltipText as TruncatedTooltipText2 } from "./TruncatedTooltipText.js";
|
|
72
68
|
const Bar = styled("div", {
|
|
73
69
|
name: DSIndeterminateProgressIndicatorName,
|
|
74
70
|
slot: DSIndeterminateProgressIndicatorSlots.BAR
|
|
@@ -150,6 +146,6 @@ export {
|
|
|
150
146
|
Bar,
|
|
151
147
|
BarIndicator,
|
|
152
148
|
Container,
|
|
153
|
-
StyledTruncatedTooltipText
|
|
149
|
+
TruncatedTooltipText2 as StyledTruncatedTooltipText
|
|
154
150
|
};
|
|
155
151
|
//# sourceMappingURL=styled.js.map
|
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", "/* eslint-disable complexity */\nimport { css, kfrm, styled } from '@elliemae/ds-system';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,KAAK,MAAM,cAAc;
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport { css, kfrm, styled } from '@elliemae/ds-system';\nimport { TruncatedTooltipText } from './TruncatedTooltipText.js';\nimport { type DSIndeterminateProgressIndicatorT } from './react-desc-prop-types.js';\nimport { DSIndeterminateProgressIndicatorName, DSIndeterminateProgressIndicatorSlots } from './constants/index.js';\n\nconst IndeterminateAnimation = (color: string) => kfrm`\n 0% {\n transform: scaleX(0.015);\n transform-origin: 0% 0%;\n background-image: linear-gradient(to right, rgba(255,255,255,0.8) 10%, ${color});\n }\n 25% {\n transform: scaleX(0.4);\n }\n 50% {\n transform: scaleX(0.015);\n transform-origin: 100% 0%;\n background-image: linear-gradient(to right, rgba(255,255,255,0.8) 10%, ${color});\n }\n 50.1% {\n transform: scaleX(0.015);\n transform-origin: 100% 0%;\n background-image: linear-gradient(to left, rgba(255,255,255,0.8) 10%, ${color});\n }\n 75% {\n transform: scaleX(0.4);\n }\n 100% {\n transform: scaleX(0.015);\n transform-origin: 0% 0%;\n background-image: linear-gradient(to left, rgba(255,255,255,0.8) 10%, ${color});\n }\n`;\n\nconst ProcessingSuccess = kfrm`\n 0%, 30% { transform: translateX(-50%); width: 50% }\n 15% { transform: translateX(150%); width: 50% }\n 0%, 60% { transform: translateX(-50%); width: 50% }\n 45% { transform: translateX(150%); width: 50% }\n 0%, 90% { transform: translateX(-50%); width: 50% }\n 75% { transform: translateX(150%); width: 50% }\n 100% { transform: translateX(0%); }\n`;\n\nconst ProcessingSuccessEnd = (color: string) => kfrm`\n 0% { transform: translateX(-50%); width: 50% }\n 45% { transform: translateX(150%); width: 50% }\n 100% { transform: translateX(0%); background-color: ${color}; }\n`;\n\nconst ProcessingFail = kfrm`\n 0%, 30% { transform: translateX(-50%); width: 50% }\n 15% { transform: translateX(150%); width: 50% }\n 0%, 60% { transform: translateX(-50%); width: 50% }\n 45% { transform: translateX(150%); width: 50% }\n 0%, 90% { transform: translateX(-50%); width: 50% }\n 75% { transform: translateX(150%); width: 50%; }\n 100% { transform: translateX(0%); }\n`;\n\nconst ProcessingFailEnd = kfrm`\n 0% { transform: translateX(-50%); width: 50% }\n 45% { transform: translateX(150%); width: 50% }\n 100% { transform: translateX(0%); background-color: #e34256; }\n`;\n\nexport const Container = styled('div', {\n name: DSIndeterminateProgressIndicatorName,\n slot: DSIndeterminateProgressIndicatorSlots.ROOT,\n})<DSIndeterminateProgressIndicatorT.Props>`\n width: 100%;\n padding: ${({ theme, lineOnly }) => (lineOnly ? 0 : `${theme.space.xxs} ${theme.space.xs}`)};\n`;\n\n// Re-exported as alias; the slot template was empty so no CSS overrides are lost\nexport { TruncatedTooltipText as StyledTruncatedTooltipText } from './TruncatedTooltipText.js';\n\nexport const Bar = styled('div', {\n name: DSIndeterminateProgressIndicatorName,\n slot: DSIndeterminateProgressIndicatorSlots.BAR,\n})`\n background-color: ${({ theme }) => theme.colors.neutral[100]};\n overflow: hidden;\n`;\n\nexport const BarIndicator = styled('div', {\n name: DSIndeterminateProgressIndicatorName,\n slot: DSIndeterminateProgressIndicatorSlots.BAR_INDICATOR,\n})<DSIndeterminateProgressIndicatorT.Props>`\n height: ${({ theme }) => theme.space.xxxs};\n width: ${({ complete, failed, animated, processing, percent }) =>\n `${!complete && !failed && !animated && processing ? percent : 100}%`};\n ${({ theme, complete, failed, processing, animated, processingComplete, processingFail }) => {\n // Default\n if (!complete && !failed && !processing && !processingComplete && !processingFail)\n return css`\n background-color: ${theme.colors.neutral[500]};\n `;\n // Completed\n if (complete && processing)\n return css`\n width: 100%;\n background-color: ${theme.colors.brand[500]};\n animation: ${ProcessingSuccessEnd(theme.colors.success[900])} 1s ease-in-out;\n animation-fill-mode: forwards;\n `;\n if (complete && !processingComplete && !processing)\n return css`\n background-color: ${theme.colors.success[900]};\n `;\n // Failed\n if (failed && !processingFail && !processing)\n return css`\n background-color: #e34256;\n `;\n // Processing\n if (processing) {\n if (animated) {\n return css`\n width: 100%;\n animation: ${IndeterminateAnimation(theme.colors.brand[500])} 2s cubic-bezier(0.645, 0.045, 0.355, 1) infinite;\n background-color: ${theme.colors.brand[500]};\n `;\n }\n return css`\n background-color: ${theme.colors.brand[500]};\n `;\n }\n // Processing -> Completed\n if (processingComplete && !complete) {\n return css`\n width: 50%;\n animation: ${ProcessingSuccess} 4s infinite;\n animation-fill-mode: forwards;\n background-color: ${theme.colors.brand[500]};\n `;\n }\n if (processingComplete && complete)\n return css`\n width: 100%;\n background-color: ${theme.colors.brand[500]};\n animation: ${ProcessingSuccessEnd(theme.colors.success[900])} 1s ease-in-out;\n animation-fill-mode: forwards;\n `;\n // Processing -> Failed\n if (processingFail && !failed)\n return css`\n width: 50%;\n animation: ${ProcessingFail} 4s infinite;\n animation-fill-mode: forwards;\n background-color: ${theme.colors.brand[500]};\n `;\n if (processingFail && failed)\n return css`\n width: 100%;\n background-color: ${theme.colors.brand[500]};\n animation: ${ProcessingFailEnd} 1s ease-in-out;\n animation-fill-mode: forwards;\n `;\n return '';\n }};\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,KAAK,MAAM,cAAc;AAGlC,SAAS,sCAAsC,6CAA6C;AAE5F,MAAM,yBAAyB,CAAC,UAAkB;AAAA;AAAA;AAAA;AAAA,6EAI2B,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6EAQL,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,4EAKN,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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{
|
|
3
|
+
value?: string;
|
|
4
|
+
placement?: DSHookFloatingContextT.PopperPlacementsT;
|
|
5
|
+
}
|
|
6
|
+
declare const TruncatedTooltipText: ({ value, placement }: TruncatedTooltipTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { TruncatedTooltipText };
|
|
8
|
+
export default TruncatedTooltipText;
|
package/dist/types/styled.d.ts
CHANGED
|
@@ -1,47 +1,5 @@
|
|
|
1
1
|
import { type DSIndeterminateProgressIndicatorT } from './react-desc-prop-types.js';
|
|
2
2
|
export declare const Container: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, DSIndeterminateProgressIndicatorT.Props & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
3
|
-
export
|
|
4
|
-
({ containerProps, value, zIndex, ...otherTextProps }: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
containerProps?: {} | undefined;
|
|
7
|
-
value?: string | undefined;
|
|
8
|
-
zIndex?: number | undefined;
|
|
9
|
-
}): string | import("react/jsx-runtime.js").JSX.Element;
|
|
10
|
-
defaultProps: {
|
|
11
|
-
value: string;
|
|
12
|
-
zIndex: number;
|
|
13
|
-
containerProps?: undefined;
|
|
14
|
-
tooltipPlacement?: undefined;
|
|
15
|
-
tooltipDelay?: undefined;
|
|
16
|
-
} | {
|
|
17
|
-
containerProps: {};
|
|
18
|
-
value: string;
|
|
19
|
-
tooltipPlacement: undefined;
|
|
20
|
-
tooltipDelay: undefined;
|
|
21
|
-
zIndex?: undefined;
|
|
22
|
-
};
|
|
23
|
-
displayName: string;
|
|
24
|
-
}, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<{
|
|
25
|
-
({ containerProps, value, zIndex, ...otherTextProps }: {
|
|
26
|
-
[x: string]: any;
|
|
27
|
-
containerProps?: {} | undefined;
|
|
28
|
-
value?: string | undefined;
|
|
29
|
-
zIndex?: number | undefined;
|
|
30
|
-
}): string | import("react/jsx-runtime.js").JSX.Element;
|
|
31
|
-
defaultProps: {
|
|
32
|
-
value: string;
|
|
33
|
-
zIndex: number;
|
|
34
|
-
containerProps?: undefined;
|
|
35
|
-
tooltipPlacement?: undefined;
|
|
36
|
-
tooltipDelay?: undefined;
|
|
37
|
-
} | {
|
|
38
|
-
containerProps: {};
|
|
39
|
-
value: string;
|
|
40
|
-
tooltipPlacement: undefined;
|
|
41
|
-
tooltipDelay: undefined;
|
|
42
|
-
zIndex?: undefined;
|
|
43
|
-
};
|
|
44
|
-
displayName: string;
|
|
45
|
-
}>, never>;
|
|
3
|
+
export { TruncatedTooltipText as StyledTruncatedTooltipText } from './TruncatedTooltipText.js';
|
|
46
4
|
export declare const Bar: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
47
5
|
export declare const BarIndicator: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, DSIndeterminateProgressIndicatorT.Props & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-indeterminate-progress-indicator",
|
|
3
|
-
"version": "3.70.0-next.
|
|
3
|
+
"version": "3.70.0-next.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Indeterminate Progress Indicator",
|
|
6
6
|
"files": [
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@elliemae/ds-props-helpers": "3.70.0-next.
|
|
40
|
-
"@elliemae/ds-
|
|
41
|
-
"@elliemae/ds-system": "3.70.0-next.
|
|
39
|
+
"@elliemae/ds-props-helpers": "3.70.0-next.4",
|
|
40
|
+
"@elliemae/ds-floating-context": "3.70.0-next.4",
|
|
41
|
+
"@elliemae/ds-system": "3.70.0-next.4"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"jest": "^30.0.0",
|
|
45
45
|
"styled-components": "~5.3.9",
|
|
46
|
-
"@elliemae/ds-monorepo-devops": "3.70.0-next.
|
|
46
|
+
"@elliemae/ds-monorepo-devops": "3.70.0-next.4"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": "^18.3.1",
|