@purpurds/tooltip 3.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/.eslintrc.js +15 -0
- package/.lintstagedrc.js +1 -0
- package/.rush/temp/ci_build/@purpurds/tooltip/0a8cee774fbae4db60999e576bef8a203e89bcfa.untar.log +10 -0
- package/.rush/temp/operation/ci_build/all.log +32 -0
- package/.rush/temp/operation/ci_build/state.json +3 -0
- package/.rush/temp/operation/test_unit/all.log +11 -0
- package/.rush/temp/operation/test_unit/state.json +3 -0
- package/.rush/temp/shrinkwrap-deps.json +1140 -0
- package/config/rush-project.json +24 -0
- package/dist/LICENSE.txt +398 -0
- package/dist/styles.css +1 -0
- package/dist/tooltip.cjs.js +22 -0
- package/dist/tooltip.cjs.js.map +1 -0
- package/dist/tooltip.d.ts +31 -0
- package/dist/tooltip.d.ts.map +1 -0
- package/dist/tooltip.es.js +2825 -0
- package/dist/tooltip.es.js.map +1 -0
- package/dist/tooltip.system.js +22 -0
- package/dist/tooltip.system.js.map +1 -0
- package/package.json +63 -0
- package/readme.mdx +106 -0
- package/src/global.d.ts +4 -0
- package/src/tooltip.module.scss +94 -0
- package/src/tooltip.stories.tsx +95 -0
- package/src/tooltip.test.tsx +126 -0
- package/src/tooltip.tsx +140 -0
- package/tsconfig.json +7 -0
- package/tsconfig.types.json +9 -0
- package/vite.config.mts +5 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
export declare const TOOLTIP_VARIANT: {
|
|
3
|
+
readonly PRIMARY: "primary";
|
|
4
|
+
readonly PRIMARY_NEGATIVE: "primary-negative";
|
|
5
|
+
};
|
|
6
|
+
export type TooltipVariant = (typeof TOOLTIP_VARIANT)[keyof typeof TOOLTIP_VARIANT];
|
|
7
|
+
export declare const TOOLTIP_POSITION: {
|
|
8
|
+
readonly TOP: "top";
|
|
9
|
+
readonly BOTTOM: "bottom";
|
|
10
|
+
readonly LEFT: "left";
|
|
11
|
+
readonly RIGHT: "right";
|
|
12
|
+
};
|
|
13
|
+
export type TooltipPosition = (typeof TOOLTIP_POSITION)[keyof typeof TOOLTIP_POSITION];
|
|
14
|
+
export declare const TOOLTIP_ALIGN: {
|
|
15
|
+
readonly START: "start";
|
|
16
|
+
readonly CENTER: "center";
|
|
17
|
+
readonly END: "end";
|
|
18
|
+
};
|
|
19
|
+
export type TooltipAlign = (typeof TOOLTIP_ALIGN)[keyof typeof TOOLTIP_ALIGN];
|
|
20
|
+
export type TooltipProps = {
|
|
21
|
+
align?: TooltipAlign;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
variant?: TooltipVariant;
|
|
24
|
+
position?: TooltipPosition;
|
|
25
|
+
["data-testid"]?: string;
|
|
26
|
+
triggerAriaLabel?: string;
|
|
27
|
+
triggerElement?: ReactNode;
|
|
28
|
+
className?: string;
|
|
29
|
+
};
|
|
30
|
+
export declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLButtonElement>>;
|
|
31
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../src/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAsC,SAAS,EAAY,MAAM,OAAO,CAAC;AAYvF,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEpF,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,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,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,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AASF,eAAO,MAAM,OAAO,wFAsFnB,CAAC"}
|