@consumidor-positivo/aurora 0.0.179 → 0.0.181
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/components/Tooltip/index.d.ts +2 -1
- package/dist/components/Tooltip/index.es.js +15 -2
- package/dist/components/Tooltip/index.es.js.map +1 -1
- package/dist/components/Tooltip/styles.css +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.es.js +2 -0
- package/dist/main.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export type TooltipProps = {
|
|
3
3
|
text: string;
|
|
4
4
|
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
+
open?: boolean;
|
|
5
6
|
children: React.ReactNode;
|
|
6
7
|
};
|
|
7
|
-
export declare const Tooltip: ({ text, position, children }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const Tooltip: ({ text, position, open, children, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { c as classNames } from "../../index-CweZ_OcN.js";
|
|
3
|
+
import './styles.css';const Tooltip = ({
|
|
4
|
+
text,
|
|
5
|
+
position = "top",
|
|
6
|
+
open,
|
|
7
|
+
children
|
|
8
|
+
}) => {
|
|
9
|
+
const tooltipClasses = classNames(
|
|
10
|
+
"tooltip-container",
|
|
11
|
+
`tooltip-${position}`,
|
|
12
|
+
{
|
|
13
|
+
"tooltip-open": open
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
return /* @__PURE__ */ jsxs("div", { className: tooltipClasses, children: [
|
|
4
17
|
children,
|
|
5
18
|
/* @__PURE__ */ jsx("div", { className: "tooltip", children: text })
|
|
6
19
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../lib/components/Tooltip/index.tsx"],"sourcesContent":["import './styles.scss'\n\nexport type TooltipProps = {\n text: string\n position?: 'top' | 'bottom' | 'left' | 'right'\n children: React.ReactNode\n}\n\nexport const Tooltip = ({
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../lib/components/Tooltip/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport './styles.scss'\n\nexport type TooltipProps = {\n text: string\n position?: 'top' | 'bottom' | 'left' | 'right'\n open?: boolean\n children: React.ReactNode\n}\n\nexport const Tooltip = ({\n text,\n position = 'top',\n open,\n children,\n}: TooltipProps) => {\n const tooltipClasses = classNames(\n 'tooltip-container',\n `tooltip-${position}`,\n {\n 'tooltip-open': open,\n },\n )\n\n return (\n <div className={tooltipClasses}>\n {children}\n <div className=\"tooltip\">{text}</div>\n </div>\n )\n}\n"],"names":[],"mappings":";;AAUO,MAAM,UAAU,CAAC;AAAA,EACtB;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AACF,MAAoB;AAClB,QAAM,iBAAiB;AAAA,IACrB;AAAA,IACA,WAAW,QAAQ;AAAA,IACnB;AAAA,MACE,gBAAgB;AAAA,IAClB;AAAA,EAAA;AAIA,SAAA,qBAAC,OAAI,EAAA,WAAW,gBACb,UAAA;AAAA,IAAA;AAAA,IACA,oBAAA,OAAA,EAAI,WAAU,WAAW,UAAK,MAAA;AAAA,EACjC,EAAA,CAAA;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tooltip-container{cursor:pointer;position:relative;display:flex;justify-content:center;align-items:center;width:max-content}.tooltip-container .tooltip{visibility:hidden;background-color:#16181d;border-radius:8px;max-width:204px;width:max-content;padding:8px;position:absolute;z-index:1;opacity:0;transition:opacity .3s;color:#fff;font-family:"Source Sans 3",sans-serif;font-size:14px;text-align:center}.tooltip-container .tooltip:after{content:"";position:absolute;border-width:5px;border-style:solid}.tooltip-container:hover .tooltip{visibility:visible;opacity:1}.tooltip-container.tooltip-top .tooltip{bottom:125%}.tooltip-container.tooltip-top .tooltip:after{top:100%;left:50%;margin-left:-5px;border-color:#16181d transparent transparent transparent}.tooltip-container.tooltip-bottom .tooltip{top:125%}.tooltip-container.tooltip-bottom .tooltip:after{bottom:100%;left:50%;margin-left:-5px;border-color:transparent transparent #16181d transparent}.tooltip-container.tooltip-left .tooltip{right:125%}.tooltip-container.tooltip-left .tooltip:after{top:50%;left:100%;margin-top:-5px;border-color:transparent transparent transparent #16181d}.tooltip-container.tooltip-right .tooltip{left:125%}.tooltip-container.tooltip-right .tooltip:after{top:50%;right:100%;margin-top:-5px;border-color:transparent #16181d transparent transparent}
|
|
1
|
+
.tooltip-container{cursor:pointer;position:relative;display:flex;justify-content:center;align-items:center;width:max-content}.tooltip-container .tooltip{visibility:hidden;background-color:#16181d;border-radius:8px;max-width:204px;width:max-content;padding:8px;position:absolute;z-index:1;opacity:0;transition:opacity .3s;color:#fff;font-family:"Source Sans 3",sans-serif;font-size:14px;text-align:center}.tooltip-container .tooltip:after{content:"";position:absolute;border-width:5px;border-style:solid}.tooltip-container:hover .tooltip,.tooltip-container.tooltip-open .tooltip{visibility:visible;opacity:1}.tooltip-container.tooltip-top .tooltip{bottom:125%}.tooltip-container.tooltip-top .tooltip:after{top:100%;left:50%;margin-left:-5px;border-color:#16181d transparent transparent transparent}.tooltip-container.tooltip-bottom .tooltip{top:125%}.tooltip-container.tooltip-bottom .tooltip:after{bottom:100%;left:50%;margin-left:-5px;border-color:transparent transparent #16181d transparent}.tooltip-container.tooltip-left .tooltip{right:125%}.tooltip-container.tooltip-left .tooltip:after{top:50%;left:100%;margin-top:-5px;border-color:transparent transparent transparent #16181d}.tooltip-container.tooltip-right .tooltip{left:125%}.tooltip-container.tooltip-right .tooltip:after{top:50%;right:100%;margin-top:-5px;border-color:transparent #16181d transparent transparent}
|
package/dist/main.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export { Image } from '../../../../../../lib/components/Image';
|
|
|
28
28
|
export { ProgressBar } from './components/ProgressBar';
|
|
29
29
|
export { Tag } from './components/Tag';
|
|
30
30
|
export { Modal } from './components/Modal';
|
|
31
|
+
export { Tooltip } from './components/Tooltip';
|
|
31
32
|
export { useDrawer } from './components/Drawer/hooks';
|
|
32
33
|
export * from './components/Logo';
|
|
33
34
|
export * from './components/icons';
|
package/dist/main.es.js
CHANGED
|
@@ -26,6 +26,7 @@ import { Image } from "./components/Image/index.es.js";
|
|
|
26
26
|
import { ProgressBar } from "./components/ProgressBar/index.es.js";
|
|
27
27
|
import { Tag } from "./components/Tag/index.es.js";
|
|
28
28
|
import { Modal } from "./components/Modal/index.es.js";
|
|
29
|
+
import { Tooltip } from "./components/Tooltip/index.es.js";
|
|
29
30
|
import { useState } from "react";
|
|
30
31
|
import { o, n, L, a, b, c, d, e, f, g, h, i, j, k, l, m } from "./BadgeWhiteStroke-B2qUHQS4.js";
|
|
31
32
|
import { IconActivity } from "./components/icons/IconActivity/index.es.js";
|
|
@@ -825,6 +826,7 @@ export {
|
|
|
825
826
|
Text,
|
|
826
827
|
TextAreaField,
|
|
827
828
|
TokenField,
|
|
829
|
+
Tooltip,
|
|
828
830
|
useDrawer
|
|
829
831
|
};
|
|
830
832
|
//# sourceMappingURL=main.es.js.map
|
package/dist/main.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.es.js","sources":["../lib/components/Drawer/hooks.ts"],"sourcesContent":["import { useState } from 'react'\n\ntype UseDrawerProps = Record<string, boolean>\n\nexport function useDrawer(props: UseDrawerProps) {\n const [drawerOpen, setDrawerOpen] = useState<UseDrawerProps>(props)\n\n function handleOpenDrawer(name: string) {\n setDrawerOpen((prev) => {\n return {\n ...prev,\n [name]: !prev[name],\n }\n })\n }\n\n return {\n handleOpenDrawer,\n drawerOpen,\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.es.js","sources":["../lib/components/Drawer/hooks.ts"],"sourcesContent":["import { useState } from 'react'\n\ntype UseDrawerProps = Record<string, boolean>\n\nexport function useDrawer(props: UseDrawerProps) {\n const [drawerOpen, setDrawerOpen] = useState<UseDrawerProps>(props)\n\n function handleOpenDrawer(name: string) {\n setDrawerOpen((prev) => {\n return {\n ...prev,\n [name]: !prev[name],\n }\n })\n }\n\n return {\n handleOpenDrawer,\n drawerOpen,\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,SAAS,UAAU,OAAuB;AAC/C,QAAM,CAAC,YAAY,aAAa,IAAI,SAAyB,KAAK;AAElE,WAAS,iBAAiB,MAAc;AACtC,kBAAc,CAAC,SAAS;AACf,aAAA;AAAA,QACL,GAAG;AAAA,QACH,CAAC,IAAI,GAAG,CAAC,KAAK,IAAI;AAAA,MAAA;AAAA,IACpB,CACD;AAAA,EACH;AAEO,SAAA;AAAA,IACL;AAAA,IACA;AAAA,EAAA;AAEJ;"}
|