@elliemae/ds-stepper 3.70.0-next.3 → 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/TruncatedTooltipText.js +94 -0
- package/dist/cjs/TruncatedTooltipText.js.map +7 -0
- package/dist/cjs/styled.js +2 -2
- package/dist/cjs/styled.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 -2
- package/dist/esm/styled.js.map +2 -2
- package/dist/types/TruncatedTooltipText.d.ts +8 -0
- package/dist/types/styled.d.ts +1 -21
- package/package.json +8 -8
|
@@ -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\nexport interface 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
|
@@ -37,7 +37,7 @@ module.exports = __toCommonJS(styled_exports);
|
|
|
37
37
|
var React = __toESM(require("react"));
|
|
38
38
|
var import_ds_system = require("@elliemae/ds-system");
|
|
39
39
|
var import_ds_button_v2 = require("@elliemae/ds-button-v2");
|
|
40
|
-
var
|
|
40
|
+
var import_TruncatedTooltipText = require("./TruncatedTooltipText.js");
|
|
41
41
|
const StepperWrapper = import_ds_system.styled.div`
|
|
42
42
|
display: grid;
|
|
43
43
|
align-items: center;
|
|
@@ -50,7 +50,7 @@ const Step = import_ds_system.styled.div`
|
|
|
50
50
|
height: ${(props) => props.active ? "5px" : "3px"};
|
|
51
51
|
background: ${(props) => props.active || props.visited ? props.theme.colors.brand[700] : "#A9B1BE"};
|
|
52
52
|
`;
|
|
53
|
-
const Label = (0, import_ds_system.styled)(
|
|
53
|
+
const Label = (0, import_ds_system.styled)(import_TruncatedTooltipText.TruncatedTooltipText)`
|
|
54
54
|
position: relative;
|
|
55
55
|
top: 1px;
|
|
56
56
|
`;
|
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 { DSButtonV2, type DSButtonV2T } from '@elliemae/ds-button-v2';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,0BAA6C;AAC7C,
|
|
4
|
+
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { DSButtonV2, type DSButtonV2T } from '@elliemae/ds-button-v2';\nimport { TruncatedTooltipText } from './TruncatedTooltipText.js';\nimport type { DSStepperT, ButtonSizesT } from './react-desc-prop-types.js';\n\nexport const StepperWrapper = styled.div`\n display: grid;\n align-items: center;\n grid-template-columns: repeat(${(props: DSStepperT.Props) => props.steps}, 1fr);\n column-gap: ${(props) => (props.steps >= 8 ? props.theme.space.xxxs : props.theme.space.xxs)};\n`;\n\ninterface StepProps {\n active: boolean;\n visited: boolean;\n}\n\nexport const Step = styled.div<StepProps>`\n display: grid;\n border-radius: 1px;\n height: ${(props) => (props.active ? '5px' : '3px')};\n background: ${(props) => (props.active || props.visited ? props.theme.colors.brand[700] : '#A9B1BE')};\n`;\n\nexport const Label = styled(TruncatedTooltipText)`\n position: relative;\n top: 1px;\n`;\n\nexport const StyledButton = styled(DSButtonV2)`\n white-space: nowrap;\n overflow: hidden;\n max-width: 100%;\n padding-left: ${(props) => props.theme.space.xxs};\n padding-right: ${(props) => props.theme.space.xxs};\n color: ${(props) => props.theme.colors.brand[600]};\n & > span:not(.em-ds-icon) {\n position: relative;\n top: ${(props: DSButtonV2T.Props & { fontSize: ButtonSizesT }) => (props.fontSize === 'large' ? '2px' : '1px')};\n font-size: ${(props: DSButtonV2T.Props & { fontSize: ButtonSizesT }) =>\n props.fontSize === 'large' ? '22px' : '18px'};\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,0BAA6C;AAC7C,kCAAqC;AAG9B,MAAM,iBAAiB,wBAAO;AAAA;AAAA;AAAA,kCAGH,CAAC,UAA4B,MAAM,KAAK;AAAA,gBAC1D,CAAC,UAAW,MAAM,SAAS,IAAI,MAAM,MAAM,MAAM,OAAO,MAAM,MAAM,MAAM,GAAI;AAAA;AAQvF,MAAM,OAAO,wBAAO;AAAA;AAAA;AAAA,YAGf,CAAC,UAAW,MAAM,SAAS,QAAQ,KAAM;AAAA,gBACrC,CAAC,UAAW,MAAM,UAAU,MAAM,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG,IAAI,SAAU;AAAA;AAG/F,MAAM,YAAQ,yBAAO,gDAAoB;AAAA;AAAA;AAAA;AAKzC,MAAM,mBAAe,yBAAO,8BAAU;AAAA;AAAA;AAAA;AAAA,kBAI3B,CAAC,UAAU,MAAM,MAAM,MAAM,GAAG;AAAA,mBAC/B,CAAC,UAAU,MAAM,MAAM,MAAM,GAAG;AAAA,WACxC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA,WAGxC,CAAC,UAA2D,MAAM,aAAa,UAAU,QAAQ,KAAM;AAAA,iBACjG,CAAC,UACZ,MAAM,aAAa,UAAU,SAAS,MAAM;AAAA;AAAA;",
|
|
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\nexport interface 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,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { styled } from "@elliemae/ds-system";
|
|
3
3
|
import { DSButtonV2 } from "@elliemae/ds-button-v2";
|
|
4
|
-
import {
|
|
4
|
+
import { TruncatedTooltipText } from "./TruncatedTooltipText.js";
|
|
5
5
|
const StepperWrapper = styled.div`
|
|
6
6
|
display: grid;
|
|
7
7
|
align-items: center;
|
|
@@ -14,7 +14,7 @@ const Step = styled.div`
|
|
|
14
14
|
height: ${(props) => props.active ? "5px" : "3px"};
|
|
15
15
|
background: ${(props) => props.active || props.visited ? props.theme.colors.brand[700] : "#A9B1BE"};
|
|
16
16
|
`;
|
|
17
|
-
const Label = styled(
|
|
17
|
+
const Label = styled(TruncatedTooltipText)`
|
|
18
18
|
position: relative;
|
|
19
19
|
top: 1px;
|
|
20
20
|
`;
|
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 { DSButtonV2, type DSButtonV2T } from '@elliemae/ds-button-v2';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,kBAAoC;AAC7C,SAAS,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { DSButtonV2, type DSButtonV2T } from '@elliemae/ds-button-v2';\nimport { TruncatedTooltipText } from './TruncatedTooltipText.js';\nimport type { DSStepperT, ButtonSizesT } from './react-desc-prop-types.js';\n\nexport const StepperWrapper = styled.div`\n display: grid;\n align-items: center;\n grid-template-columns: repeat(${(props: DSStepperT.Props) => props.steps}, 1fr);\n column-gap: ${(props) => (props.steps >= 8 ? props.theme.space.xxxs : props.theme.space.xxs)};\n`;\n\ninterface StepProps {\n active: boolean;\n visited: boolean;\n}\n\nexport const Step = styled.div<StepProps>`\n display: grid;\n border-radius: 1px;\n height: ${(props) => (props.active ? '5px' : '3px')};\n background: ${(props) => (props.active || props.visited ? props.theme.colors.brand[700] : '#A9B1BE')};\n`;\n\nexport const Label = styled(TruncatedTooltipText)`\n position: relative;\n top: 1px;\n`;\n\nexport const StyledButton = styled(DSButtonV2)`\n white-space: nowrap;\n overflow: hidden;\n max-width: 100%;\n padding-left: ${(props) => props.theme.space.xxs};\n padding-right: ${(props) => props.theme.space.xxs};\n color: ${(props) => props.theme.colors.brand[600]};\n & > span:not(.em-ds-icon) {\n position: relative;\n top: ${(props: DSButtonV2T.Props & { fontSize: ButtonSizesT }) => (props.fontSize === 'large' ? '2px' : '1px')};\n font-size: ${(props: DSButtonV2T.Props & { fontSize: ButtonSizesT }) =>\n props.fontSize === 'large' ? '22px' : '18px'};\n }\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,kBAAoC;AAC7C,SAAS,4BAA4B;AAG9B,MAAM,iBAAiB,OAAO;AAAA;AAAA;AAAA,kCAGH,CAAC,UAA4B,MAAM,KAAK;AAAA,gBAC1D,CAAC,UAAW,MAAM,SAAS,IAAI,MAAM,MAAM,MAAM,OAAO,MAAM,MAAM,MAAM,GAAI;AAAA;AAQvF,MAAM,OAAO,OAAO;AAAA;AAAA;AAAA,YAGf,CAAC,UAAW,MAAM,SAAS,QAAQ,KAAM;AAAA,gBACrC,CAAC,UAAW,MAAM,UAAU,MAAM,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG,IAAI,SAAU;AAAA;AAG/F,MAAM,QAAQ,OAAO,oBAAoB;AAAA;AAAA;AAAA;AAKzC,MAAM,eAAe,OAAO,UAAU;AAAA;AAAA;AAAA;AAAA,kBAI3B,CAAC,UAAU,MAAM,MAAM,MAAM,GAAG;AAAA,mBAC/B,CAAC,UAAU,MAAM,MAAM,MAAM,GAAG;AAAA,WACxC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA,WAGxC,CAAC,UAA2D,MAAM,aAAa,UAAU,QAAQ,KAAM;AAAA,iBACjG,CAAC,UACZ,MAAM,aAAa,UAAU,SAAS,MAAM;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type DSHookFloatingContextT } from '@elliemae/ds-floating-context';
|
|
2
|
+
export interface TruncatedTooltipTextProps {
|
|
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
|
@@ -6,27 +6,7 @@ interface StepProps {
|
|
|
6
6
|
visited: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare const Step: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StepProps & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
9
|
-
export declare const Label: import("styled-components").StyledComponent<{
|
|
10
|
-
(props: import("@elliemae/ds-truncated-tooltip-text").SimpleTruncatedTooltipTextProps): import("react/jsx-runtime.js").JSX.Element;
|
|
11
|
-
defaultProps: {
|
|
12
|
-
containerProps: {};
|
|
13
|
-
tooltipOptions: {};
|
|
14
|
-
textOptions: {};
|
|
15
|
-
value: string;
|
|
16
|
-
placement: string;
|
|
17
|
-
tooltipDelay: number;
|
|
18
|
-
};
|
|
19
|
-
}, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<{
|
|
20
|
-
(props: import("@elliemae/ds-truncated-tooltip-text").SimpleTruncatedTooltipTextProps): import("react/jsx-runtime.js").JSX.Element;
|
|
21
|
-
defaultProps: {
|
|
22
|
-
containerProps: {};
|
|
23
|
-
tooltipOptions: {};
|
|
24
|
-
textOptions: {};
|
|
25
|
-
value: string;
|
|
26
|
-
placement: string;
|
|
27
|
-
tooltipDelay: number;
|
|
28
|
-
};
|
|
29
|
-
}>, never>;
|
|
9
|
+
export declare const Label: import("styled-components").StyledComponent<({ value, placement }: import("./TruncatedTooltipText.js").TruncatedTooltipTextProps) => import("react/jsx-runtime.js").JSX.Element, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<({ value, placement }: import("./TruncatedTooltipText.js").TruncatedTooltipTextProps) => import("react/jsx-runtime.js").JSX.Element>, never>;
|
|
30
10
|
export declare const StyledButton: import("styled-components").StyledComponent<import("react").ComponentType<DSButtonV2T.Props>, import("@elliemae/ds-system").Theme, DSButtonV2T.Props & {
|
|
31
11
|
fontSize: ButtonSizesT;
|
|
32
12
|
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ComponentType<DSButtonV2T.Props>>, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-stepper",
|
|
3
|
-
"version": "3.70.0-next.
|
|
3
|
+
"version": "3.70.0-next.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Stepper",
|
|
6
6
|
"files": [
|
|
@@ -37,17 +37,17 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"uid": "^2.0.2",
|
|
40
|
-
"@elliemae/ds-button-v2": "3.70.0-next.
|
|
41
|
-
"@elliemae/ds-
|
|
42
|
-
"@elliemae/ds-
|
|
43
|
-
"@elliemae/ds-
|
|
44
|
-
"@elliemae/ds-
|
|
40
|
+
"@elliemae/ds-button-v2": "3.70.0-next.4",
|
|
41
|
+
"@elliemae/ds-floating-context": "3.70.0-next.4",
|
|
42
|
+
"@elliemae/ds-icons": "3.70.0-next.4",
|
|
43
|
+
"@elliemae/ds-system": "3.70.0-next.4",
|
|
44
|
+
"@elliemae/ds-props-helpers": "3.70.0-next.4"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"jest": "^30.0.0",
|
|
48
48
|
"styled-components": "~5.3.9",
|
|
49
|
-
"@elliemae/ds-
|
|
50
|
-
"@elliemae/ds-
|
|
49
|
+
"@elliemae/ds-monorepo-devops": "3.70.0-next.4",
|
|
50
|
+
"@elliemae/ds-test-utils": "3.70.0-next.4"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"react": "^18.3.1",
|