@purpurds/tooltip 6.12.4 → 7.0.0
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/.rush/temp/chunked-rush-logs/tooltip.test_unit.chunks.jsonl +5 -5
- package/.rush/temp/ci_build/@purpurds/tooltip/{2b4144e6abe4251c01df6278ebe92d08575719a9.untar.log → f7cd05a01b9c166112cdce318a349df8b9343ca0.untar.log} +2 -2
- package/.rush/temp/operation/ci_build/all.log +4 -4
- package/.rush/temp/operation/ci_build/log-chunks.jsonl +4 -4
- package/.rush/temp/operation/ci_build/state.json +1 -1
- package/.rush/temp/operation/test_unit/all.log +5 -5
- package/.rush/temp/operation/test_unit/log-chunks.jsonl +5 -5
- package/.rush/temp/operation/test_unit/state.json +1 -1
- package/.rush/temp/shrinkwrap-deps.json +11 -12
- package/dist/LICENSE.txt +4 -4
- package/dist/tooltip.cjs.js +2 -2
- package/dist/tooltip.cjs.js.map +1 -1
- package/dist/tooltip.d.ts +13 -14
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.es.js +1 -2
- package/dist/tooltip.es.js.map +1 -1
- package/package.json +6 -6
- package/src/tooltip.stories.tsx +3 -1
- package/src/tooltip.tsx +21 -4
package/dist/tooltip.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as React, ReactNode } from 'react';
|
|
1
|
+
import { default as React, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { Size } from '@purpurds/action';
|
|
3
3
|
|
|
4
4
|
export declare const TOOLTIP_POSITION: {
|
|
@@ -14,26 +14,25 @@ export declare const TOOLTIP_ALIGN: {
|
|
|
14
14
|
readonly END: "end";
|
|
15
15
|
};
|
|
16
16
|
export type TooltipAlign = (typeof TOOLTIP_ALIGN)[keyof typeof TOOLTIP_ALIGN];
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
children: ReactNode;
|
|
21
|
-
negative?: boolean;
|
|
22
|
-
position?: TooltipPosition;
|
|
23
|
-
["data-testid"]?: string;
|
|
24
|
-
triggerAriaLabel?: string;
|
|
25
|
-
triggerElement?: ReactNode;
|
|
26
|
-
contentClassName?: string;
|
|
17
|
+
type WithTriggerElement = {
|
|
18
|
+
triggerElement: ReactNode;
|
|
19
|
+
triggerAriaLabel?: never;
|
|
27
20
|
};
|
|
28
|
-
|
|
21
|
+
type WithoutTriggeElement = {
|
|
22
|
+
triggerElement?: never;
|
|
23
|
+
triggerAriaLabel: string;
|
|
24
|
+
};
|
|
25
|
+
export type TooltipProps = HTMLAttributes<HTMLDivElement> & {
|
|
29
26
|
align?: TooltipAlign;
|
|
30
27
|
buttonSize?: Size;
|
|
31
28
|
children: ReactNode;
|
|
32
29
|
negative?: boolean;
|
|
33
30
|
position?: TooltipPosition;
|
|
34
|
-
"data-testid"?: string;
|
|
31
|
+
["data-testid"]?: string;
|
|
35
32
|
triggerAriaLabel?: string;
|
|
36
33
|
triggerElement?: ReactNode;
|
|
37
34
|
contentClassName?: string;
|
|
38
|
-
} &
|
|
35
|
+
} & (WithTriggerElement | WithoutTriggeElement);
|
|
36
|
+
export declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLButtonElement>>;
|
|
37
|
+
export {};
|
|
39
38
|
//# sourceMappingURL=tooltip.d.ts.map
|
package/dist/tooltip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../src/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../src/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAIZ,cAAc,EACd,SAAS,EAEV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAYxC,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC;AACX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAEvF,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE9E,KAAK,kBAAkB,GAAG;IACxB,cAAc,EAAE,SAAS,CAAC;IAC1B,gBAAgB,CAAC,EAAE,KAAK,CAAC;CAC1B,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,cAAc,CAAC,EAAE,KAAK,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC1D,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,GAAG,CAAC,kBAAkB,GAAG,oBAAoB,CAAC,CAAC;AAIhD,eAAO,MAAM,OAAO,wFAsFnB,CAAC"}
|
package/dist/tooltip.es.js
CHANGED
|
@@ -282,7 +282,6 @@ const rr = /* @__PURE__ */ er(nr), or = {
|
|
|
282
282
|
return /* @__PURE__ */ x(
|
|
283
283
|
"span",
|
|
284
284
|
{
|
|
285
|
-
"aria-label": n,
|
|
286
285
|
className: a,
|
|
287
286
|
"data-testid": e,
|
|
288
287
|
dangerouslySetInnerHTML: { __html: s },
|
|
@@ -2673,7 +2672,7 @@ const bi = /* @__PURE__ */ yi(xi), _i = "_slideDownAndFade_fkagk_1", Ai = "_slid
|
|
|
2673
2672
|
negative: r = !1,
|
|
2674
2673
|
position: s = Oi.TOP,
|
|
2675
2674
|
align: a = Ri.CENTER,
|
|
2676
|
-
triggerAriaLabel: c
|
|
2675
|
+
triggerAriaLabel: c,
|
|
2677
2676
|
triggerElement: l,
|
|
2678
2677
|
...u
|
|
2679
2678
|
}, d) => {
|