@telia/teddy 0.0.27 → 0.0.29
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/accordion/accordion-root.cjs +14 -14
- package/dist/components/accordion/accordion-root.js +14 -14
- package/dist/components/card/card.d.ts +3 -3
- package/dist/components/chip/chip-indicator.d.ts +2 -2
- package/dist/components/chip/index.d.ts +2 -2
- package/dist/components/index.cjs +6 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +6 -0
- package/dist/components/modal/modal.cjs +3 -0
- package/dist/components/modal/modal.js +3 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-desktop.cjs +9 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-desktop.d.ts +4 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-desktop.js +9 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.cjs +21 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.d.ts +4 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.js +21 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.cjs +369 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.d.ts +8 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.js +369 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-root.cjs +12 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-root.d.ts +33 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-root.js +12 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-search-field.cjs +37 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-search-field.d.ts +10 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-search-field.js +37 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-search.cjs +12 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-search.d.ts +8 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-search.js +12 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.cjs +11 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.d.ts +4 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.js +11 -0
- package/dist/components/navigation-menu/global-navigation/index.cjs +4 -0
- package/dist/components/navigation-menu/global-navigation/index.d.ts +6 -0
- package/dist/components/navigation-menu/global-navigation/index.js +4 -0
- package/dist/components/navigation-menu/global-navigation/utils.cjs +318 -0
- package/dist/components/navigation-menu/global-navigation/utils.d.ts +496 -0
- package/dist/components/navigation-menu/global-navigation/utils.js +318 -0
- package/dist/components/navigation-menu/index.cjs +2 -0
- package/dist/components/navigation-menu/index.d.ts +1 -0
- package/dist/components/navigation-menu/index.js +2 -0
- package/dist/components/navigation-menu/navigation-menu.cjs +49 -23
- package/dist/components/navigation-menu/navigation-menu.d.ts +5 -0
- package/dist/components/navigation-menu/navigation-menu.js +50 -24
- package/dist/components/notabene/index.cjs +4 -0
- package/dist/components/notabene/index.d.ts +1 -0
- package/dist/components/notabene/index.js +4 -0
- package/dist/components/notabene/notabene.cjs +35 -0
- package/dist/components/notabene/notabene.d.ts +15 -0
- package/dist/components/notabene/notabene.js +35 -0
- package/dist/components/notification/notification.d.ts +2 -2
- package/dist/components/scroll-area/index.d.ts +2 -2
- package/dist/components/scroll-area/scroll-area-button.d.ts +2 -2
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/tabs/tabs-scroll-button.d.ts +2 -2
- package/dist/components/text-field/index.d.ts +2 -2
- package/dist/components/text-field/text-field-button.d.ts +2 -2
- package/dist/components/toggle/toggle.d.ts +2 -2
- package/dist/components/tooltip/index.cjs +22 -0
- package/dist/components/tooltip/index.d.ts +40 -0
- package/dist/components/tooltip/index.js +22 -0
- package/dist/components/tooltip/tooltip-arrow.cjs +33 -0
- package/dist/components/tooltip/tooltip-arrow.d.ts +6 -0
- package/dist/components/tooltip/tooltip-arrow.js +16 -0
- package/dist/components/tooltip/tooltip-content.cjs +46 -0
- package/dist/components/tooltip/tooltip-content.d.ts +80 -0
- package/dist/components/tooltip/tooltip-content.js +29 -0
- package/dist/components/tooltip/tooltip-portal.cjs +26 -0
- package/dist/components/tooltip/tooltip-portal.d.ts +7 -0
- package/dist/components/tooltip/tooltip-portal.js +9 -0
- package/dist/components/tooltip/tooltip-provider.cjs +30 -0
- package/dist/components/tooltip/tooltip-provider.d.ts +9 -0
- package/dist/components/tooltip/tooltip-provider.js +13 -0
- package/dist/components/tooltip/tooltip-root.cjs +36 -0
- package/dist/components/tooltip/tooltip-root.d.ts +25 -0
- package/dist/components/tooltip/tooltip-root.js +19 -0
- package/dist/components/tooltip/tooltip-trigger.cjs +38 -0
- package/dist/components/tooltip/tooltip-trigger.d.ts +6 -0
- package/dist/components/tooltip/tooltip-trigger.js +21 -0
- package/dist/main.cjs +6 -0
- package/dist/main.js +6 -0
- package/dist/style.css +1202 -1048
- package/dist/tooltip.module-D_3DOZOn.cjs +15 -0
- package/dist/tooltip.module-DnKU2XS4.js +16 -0
- package/dist/utils/generate-styling/grid.d.ts +24 -24
- package/dist/utils/generate-styling/index.d.ts +16 -16
- package/dist/utils/generate-styling/util.d.ts +2 -2
- package/package.json +2 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
import "../../assets/sprite.269ba410-teddy.svg";
|
|
6
|
+
import { Icon } from "../icon/icon.js";
|
|
7
|
+
import { Text } from "../text/text.js";
|
|
8
|
+
import { Heading } from "../heading/heading.js";
|
|
9
|
+
import { Box } from "../box/box.js";
|
|
10
|
+
const styles = {
|
|
11
|
+
"teddy-notabene": "_teddy-notabene_waflr_1",
|
|
12
|
+
"teddy-notabene__icon": "_teddy-notabene__icon_waflr_9",
|
|
13
|
+
"teddy-notabene__heading": "_teddy-notabene__heading_waflr_9"
|
|
14
|
+
};
|
|
15
|
+
const rootClassName = "teddy-notabene";
|
|
16
|
+
const defaultTitle = "Good to know";
|
|
17
|
+
const defaultText = "It could be anything, and also bullet points.";
|
|
18
|
+
const Root = React__default.forwardRef(
|
|
19
|
+
({ asChild, children, className, heading = defaultTitle, headingAs = "h2", text = defaultText, ...props }, forwardRef) => {
|
|
20
|
+
const classes = clsx([styles[`${rootClassName}`]], className);
|
|
21
|
+
const Comp = asChild ? Slot : "div";
|
|
22
|
+
return /* @__PURE__ */ jsxs(Comp, { ...props, ref: forwardRef, className: classes, children: [
|
|
23
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Icon, { name: "bulb", size: "lg", className: styles[`${rootClassName}__icon`] }) }),
|
|
24
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
25
|
+
/* @__PURE__ */ jsx(Heading, { as: headingAs, variant: "title-200", mb: "150", className: styles[`${rootClassName}__heading`], children: heading }),
|
|
26
|
+
/* @__PURE__ */ jsx(Text, { variant: "paragraph-100", mb: "50", children: text }),
|
|
27
|
+
children
|
|
28
|
+
] })
|
|
29
|
+
] });
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
Root.displayName = "Notabene";
|
|
33
|
+
export {
|
|
34
|
+
Root as Notabene
|
|
35
|
+
};
|
|
@@ -86,8 +86,8 @@ declare const Notification: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<
|
|
|
86
86
|
Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
87
87
|
Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
88
88
|
Icon: React.ForwardRefExoticComponent<Partial<Omit<React.SVGProps<SVGSVGElement> & {
|
|
89
|
-
name: "
|
|
90
|
-
size?: ("
|
|
89
|
+
name: "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "copy" | "dislike" | "download" | "edit" | "filter" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "play" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shortcut" | "shuffle" | "sync" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "visible" | "volume" | "zoom-out" | "zoom" | "connected-building" | "home" | "hospital" | "industry" | "premises-datacenter" | "premises-large" | "premises-medium" | "premises-small" | "premises" | "store" | "address-book" | "b2b-customer" | "care" | "chat-robot" | "chat" | "child-1" | "child-2" | "conversation" | "customer-dialogue" | "dsl-hub" | "email" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-sad" | "sms" | "support" | "user-admin" | "vcard" | "voicemail" | "battery" | "bluetooth" | "broadband" | "broken-phone" | "cast" | "cloud-connect" | "connected" | "core-router" | "daas-device" | "data-transfer" | "desktop" | "devices" | "esim-simcard" | "esim" | "face-id" | "fiber" | "fingerprint" | "fiveg" | "fourg" | "home-installation" | "industrial-iot" | "internet" | "it-service" | "laptop" | "mobile-broadband" | "network" | "phone-recycling" | "phone-ringing" | "phone" | "rack" | "refill-card" | "remote-control" | "repair" | "roaming" | "router" | "secure-device" | "sense-car" | "server" | "service-device" | "service-supervision" | "slow-wifi" | "smart-wifi" | "smartphone" | "smartwatch" | "tablet" | "trade-phone" | "tv" | "usb" | "voice-switch" | "wallplug" | "wireless-off" | "wireless-weak" | "wireless" | "world-alert" | "world-off" | "world-question" | "bar-chart" | "doc" | "document-doc" | "document-edit" | "document-pdf" | "document-ppt" | "excel" | "folder-copy" | "folder-new" | "folder" | "gif" | "graph" | "media-content" | "org-chart" | "pie-chart" | "print" | "register" | "report" | "simcard" | "spell-check" | "summary" | "credit-card" | "euro" | "invoice" | "kontantkort" | "kr" | "late-payment" | "money-back-euro" | "money-back-kr" | "money-euro" | "money-kr" | "pay-monthly-euro" | "pay-monthly-kr" | "pay-once-euro" | "pay-once-kr" | "payment-success" | "savings" | "wallet" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "image" | "link" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "video" | "activity-level" | "add" | "ai-robot" | "bag" | "basketball" | "blood-pressure" | "bulb" | "business-continuity" | "business-intelligence" | "calendar" | "cart" | "close-circle" | "cloud" | "coffee" | "compass" | "construction" | "cookie" | "delivery" | "drone" | "education" | "efficiency" | "environment" | "facemask" | "flag" | "focus" | "food" | "fraud" | "getting-started" | "home-care" | "infinite" | "job-search" | "key" | "layers" | "map" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "radio" | "recycle" | "reservation" | "reverse" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "snowflake" | "speedometer" | "spyware" | "split" | "stop" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "time" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "youtube" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "x" | "alert-filled" | "alert" | "check-circle-filled" | "check-circle" | "error-filled" | "error" | "help" | "info-filled" | "info" | "question-filled" | "question" | "warning" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-subdirectory" | "arrow-up" | "card-view" | "checkmark-bold" | "checkmark" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "close" | "grid-view" | "list-view" | "menu" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "search" | "services" | "sorter" | "table-view";
|
|
90
|
+
size?: ("font" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl") | undefined;
|
|
91
91
|
children?: React.ReactNode;
|
|
92
92
|
}, "ref">> & React.RefAttributes<SVGSVGElement>>;
|
|
93
93
|
Dismiss: React.ForwardRefExoticComponent<DismissProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -15,7 +15,7 @@ export declare const ScrollArea: import('react').ForwardRefExoticComponent<Omit<
|
|
|
15
15
|
loading?: boolean | undefined;
|
|
16
16
|
fullWidth?: boolean | undefined;
|
|
17
17
|
size?: "sm" | "md" | "lg" | undefined;
|
|
18
|
-
variant?: "
|
|
18
|
+
variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
19
19
|
} & {
|
|
20
20
|
iconOnly: true;
|
|
21
21
|
"aria-label": string;
|
|
@@ -26,7 +26,7 @@ export declare const ScrollArea: import('react').ForwardRefExoticComponent<Omit<
|
|
|
26
26
|
loading?: boolean | undefined;
|
|
27
27
|
fullWidth?: boolean | undefined;
|
|
28
28
|
size?: "sm" | "md" | "lg" | undefined;
|
|
29
|
-
variant?: "
|
|
29
|
+
variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
30
30
|
} & {
|
|
31
31
|
iconOnly?: false | undefined;
|
|
32
32
|
"aria-label"?: string | undefined;
|
|
@@ -17,7 +17,7 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<Reac
|
|
|
17
17
|
loading?: boolean | undefined;
|
|
18
18
|
fullWidth?: boolean | undefined;
|
|
19
19
|
size?: "sm" | "md" | "lg" | undefined;
|
|
20
|
-
variant?: "
|
|
20
|
+
variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
21
21
|
} & {
|
|
22
22
|
iconOnly: true;
|
|
23
23
|
"aria-label": string;
|
|
@@ -28,7 +28,7 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<Reac
|
|
|
28
28
|
loading?: boolean | undefined;
|
|
29
29
|
fullWidth?: boolean | undefined;
|
|
30
30
|
size?: "sm" | "md" | "lg" | undefined;
|
|
31
|
-
variant?: "
|
|
31
|
+
variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
32
32
|
} & {
|
|
33
33
|
iconOnly?: false | undefined;
|
|
34
34
|
"aria-label"?: string | undefined;
|
|
@@ -33,7 +33,7 @@ export declare const Tabs: import('react').ForwardRefExoticComponent<Omit<Omit<i
|
|
|
33
33
|
loading?: boolean | undefined;
|
|
34
34
|
fullWidth?: boolean | undefined;
|
|
35
35
|
size?: "sm" | "md" | "lg" | undefined;
|
|
36
|
-
variant?: "
|
|
36
|
+
variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
37
37
|
} & {
|
|
38
38
|
iconOnly: true;
|
|
39
39
|
"aria-label": string;
|
|
@@ -44,7 +44,7 @@ export declare const Tabs: import('react').ForwardRefExoticComponent<Omit<Omit<i
|
|
|
44
44
|
loading?: boolean | undefined;
|
|
45
45
|
fullWidth?: boolean | undefined;
|
|
46
46
|
size?: "sm" | "md" | "lg" | undefined;
|
|
47
|
-
variant?: "
|
|
47
|
+
variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
48
48
|
} & {
|
|
49
49
|
iconOnly?: false | undefined;
|
|
50
50
|
"aria-label"?: string | undefined;
|
|
@@ -10,7 +10,7 @@ export declare const ScrollButton: React.ForwardRefExoticComponent<Omit<Omit<Omi
|
|
|
10
10
|
loading?: boolean | undefined;
|
|
11
11
|
fullWidth?: boolean | undefined;
|
|
12
12
|
size?: "sm" | "md" | "lg" | undefined;
|
|
13
|
-
variant?: "
|
|
13
|
+
variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
14
14
|
} & {
|
|
15
15
|
iconOnly: true;
|
|
16
16
|
"aria-label": string;
|
|
@@ -21,7 +21,7 @@ export declare const ScrollButton: React.ForwardRefExoticComponent<Omit<Omit<Omi
|
|
|
21
21
|
loading?: boolean | undefined;
|
|
22
22
|
fullWidth?: boolean | undefined;
|
|
23
23
|
size?: "sm" | "md" | "lg" | undefined;
|
|
24
|
-
variant?: "
|
|
24
|
+
variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
25
25
|
} & {
|
|
26
26
|
iconOnly?: false | undefined;
|
|
27
27
|
"aria-label"?: string | undefined;
|
|
@@ -34,7 +34,7 @@ export declare const TextField: import('react').ForwardRefExoticComponent<Omit<i
|
|
|
34
34
|
loading?: boolean | undefined;
|
|
35
35
|
fullWidth?: boolean | undefined;
|
|
36
36
|
size?: "sm" | "md" | "lg" | undefined;
|
|
37
|
-
variant?: "
|
|
37
|
+
variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
38
38
|
} & {
|
|
39
39
|
iconOnly: true;
|
|
40
40
|
"aria-label": string;
|
|
@@ -45,7 +45,7 @@ export declare const TextField: import('react').ForwardRefExoticComponent<Omit<i
|
|
|
45
45
|
loading?: boolean | undefined;
|
|
46
46
|
fullWidth?: boolean | undefined;
|
|
47
47
|
size?: "sm" | "md" | "lg" | undefined;
|
|
48
|
-
variant?: "
|
|
48
|
+
variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
49
49
|
} & {
|
|
50
50
|
iconOnly?: false | undefined;
|
|
51
51
|
"aria-label"?: string | undefined;
|
|
@@ -11,7 +11,7 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<Reac
|
|
|
11
11
|
loading?: boolean | undefined;
|
|
12
12
|
fullWidth?: boolean | undefined;
|
|
13
13
|
size?: "sm" | "md" | "lg" | undefined;
|
|
14
|
-
variant?: "
|
|
14
|
+
variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
15
15
|
} & {
|
|
16
16
|
iconOnly: true;
|
|
17
17
|
"aria-label": string;
|
|
@@ -22,7 +22,7 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<Reac
|
|
|
22
22
|
loading?: boolean | undefined;
|
|
23
23
|
fullWidth?: boolean | undefined;
|
|
24
24
|
size?: "sm" | "md" | "lg" | undefined;
|
|
25
|
-
variant?: "
|
|
25
|
+
variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
26
26
|
} & {
|
|
27
27
|
iconOnly?: false | undefined;
|
|
28
28
|
"aria-label"?: string | undefined;
|
|
@@ -29,8 +29,8 @@ declare const Toggle: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHT
|
|
|
29
29
|
Input: React.ForwardRefExoticComponent<ToggleInputProps & React.RefAttributes<HTMLButtonElement>>;
|
|
30
30
|
Thumb: React.ForwardRefExoticComponent<Omit<SwitchPrimitive.SwitchThumbProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
31
31
|
Indicator: React.ForwardRefExoticComponent<Partial<Omit<React.SVGProps<SVGSVGElement> & {
|
|
32
|
-
name: "
|
|
33
|
-
size?: ("
|
|
32
|
+
name: "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "copy" | "dislike" | "download" | "edit" | "filter" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "play" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shortcut" | "shuffle" | "sync" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "visible" | "volume" | "zoom-out" | "zoom" | "connected-building" | "home" | "hospital" | "industry" | "premises-datacenter" | "premises-large" | "premises-medium" | "premises-small" | "premises" | "store" | "address-book" | "b2b-customer" | "care" | "chat-robot" | "chat" | "child-1" | "child-2" | "conversation" | "customer-dialogue" | "dsl-hub" | "email" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-sad" | "sms" | "support" | "user-admin" | "vcard" | "voicemail" | "battery" | "bluetooth" | "broadband" | "broken-phone" | "cast" | "cloud-connect" | "connected" | "core-router" | "daas-device" | "data-transfer" | "desktop" | "devices" | "esim-simcard" | "esim" | "face-id" | "fiber" | "fingerprint" | "fiveg" | "fourg" | "home-installation" | "industrial-iot" | "internet" | "it-service" | "laptop" | "mobile-broadband" | "network" | "phone-recycling" | "phone-ringing" | "phone" | "rack" | "refill-card" | "remote-control" | "repair" | "roaming" | "router" | "secure-device" | "sense-car" | "server" | "service-device" | "service-supervision" | "slow-wifi" | "smart-wifi" | "smartphone" | "smartwatch" | "tablet" | "trade-phone" | "tv" | "usb" | "voice-switch" | "wallplug" | "wireless-off" | "wireless-weak" | "wireless" | "world-alert" | "world-off" | "world-question" | "bar-chart" | "doc" | "document-doc" | "document-edit" | "document-pdf" | "document-ppt" | "excel" | "folder-copy" | "folder-new" | "folder" | "gif" | "graph" | "media-content" | "org-chart" | "pie-chart" | "print" | "register" | "report" | "simcard" | "spell-check" | "summary" | "credit-card" | "euro" | "invoice" | "kontantkort" | "kr" | "late-payment" | "money-back-euro" | "money-back-kr" | "money-euro" | "money-kr" | "pay-monthly-euro" | "pay-monthly-kr" | "pay-once-euro" | "pay-once-kr" | "payment-success" | "savings" | "wallet" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "image" | "link" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "video" | "activity-level" | "add" | "ai-robot" | "bag" | "basketball" | "blood-pressure" | "bulb" | "business-continuity" | "business-intelligence" | "calendar" | "cart" | "close-circle" | "cloud" | "coffee" | "compass" | "construction" | "cookie" | "delivery" | "drone" | "education" | "efficiency" | "environment" | "facemask" | "flag" | "focus" | "food" | "fraud" | "getting-started" | "home-care" | "infinite" | "job-search" | "key" | "layers" | "map" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "radio" | "recycle" | "reservation" | "reverse" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "snowflake" | "speedometer" | "spyware" | "split" | "stop" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "time" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "youtube" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "x" | "alert-filled" | "alert" | "check-circle-filled" | "check-circle" | "error-filled" | "error" | "help" | "info-filled" | "info" | "question-filled" | "question" | "warning" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-subdirectory" | "arrow-up" | "card-view" | "checkmark-bold" | "checkmark" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "close" | "grid-view" | "list-view" | "menu" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "search" | "services" | "sorter" | "table-view";
|
|
33
|
+
size?: ("font" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl") | undefined;
|
|
34
34
|
children?: React.ReactNode;
|
|
35
35
|
}, "ref">> & React.RefAttributes<SVGSVGElement>>;
|
|
36
36
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const components_tooltip_tooltipRoot = require("./tooltip-root.cjs");
|
|
4
|
+
const components_tooltip_tooltipTrigger = require("./tooltip-trigger.cjs");
|
|
5
|
+
const components_tooltip_tooltipArrow = require("./tooltip-arrow.cjs");
|
|
6
|
+
const components_tooltip_tooltipContent = require("./tooltip-content.cjs");
|
|
7
|
+
const components_tooltip_tooltipPortal = require("./tooltip-portal.cjs");
|
|
8
|
+
const components_tooltip_tooltipProvider = require("./tooltip-provider.cjs");
|
|
9
|
+
components_tooltip_tooltipRoot.Root.displayName = "Tooltip";
|
|
10
|
+
components_tooltip_tooltipTrigger.Trigger.displayName = "Tooltip.Trigger";
|
|
11
|
+
components_tooltip_tooltipArrow.Arrow.displayName = "Tooltip.Arrow";
|
|
12
|
+
components_tooltip_tooltipContent.Content.displayName = "Tooltip.Content";
|
|
13
|
+
components_tooltip_tooltipPortal.Portal.displayName = "Tooltip.Portal";
|
|
14
|
+
components_tooltip_tooltipProvider.Provider.displayName = "Tooltip.Provider";
|
|
15
|
+
const Tooltip = Object.assign(components_tooltip_tooltipRoot.Root, {
|
|
16
|
+
Trigger: components_tooltip_tooltipTrigger.Trigger,
|
|
17
|
+
Arrow: components_tooltip_tooltipArrow.Arrow,
|
|
18
|
+
Content: components_tooltip_tooltipContent.Content,
|
|
19
|
+
Portal: components_tooltip_tooltipPortal.Portal,
|
|
20
|
+
Provider: components_tooltip_tooltipProvider.Provider
|
|
21
|
+
});
|
|
22
|
+
exports.Tooltip = Tooltip;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Root, RootProps } from './tooltip-root';
|
|
2
|
+
import { TriggerProps } from './tooltip-trigger';
|
|
3
|
+
import { ArrowProps } from './tooltip-arrow';
|
|
4
|
+
import { ContentProps } from './tooltip-content';
|
|
5
|
+
import { Portal, PortalProps } from './tooltip-portal';
|
|
6
|
+
import { Provider, ProviderProps } from './tooltip-provider';
|
|
7
|
+
|
|
8
|
+
export declare const Tooltip: typeof Root & {
|
|
9
|
+
Trigger: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-tooltip').TooltipTriggerProps & import('react').RefAttributes<HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
Arrow: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-tooltip').TooltipArrowProps & import('react').RefAttributes<SVGSVGElement>, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
11
|
+
Content: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-tooltip').TooltipContentProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
|
|
12
|
+
hideArrow?: boolean | undefined;
|
|
13
|
+
'aria-label'?: string | undefined;
|
|
14
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => void) | undefined;
|
|
15
|
+
onPointerDownOutside?: ((event: CustomEvent<{
|
|
16
|
+
originalEvent: PointerEvent;
|
|
17
|
+
}>) => void) | undefined;
|
|
18
|
+
side?: "top" | "bottom" | "left" | "right" | undefined;
|
|
19
|
+
sideOffset?: number | undefined;
|
|
20
|
+
align?: "end" | "start" | "center" | undefined;
|
|
21
|
+
alignOffset?: number | undefined;
|
|
22
|
+
arrowPadding?: number | undefined;
|
|
23
|
+
avoidCollisions?: boolean | undefined;
|
|
24
|
+
collisionBoundary?: (Element | null) | (Element | null)[] | undefined;
|
|
25
|
+
collisionPadding?: number | Partial<Record<"top" | "bottom" | "left" | "right", number>> | undefined;
|
|
26
|
+
sticky?: "always" | "partial" | undefined;
|
|
27
|
+
hideWhenDetached?: boolean | undefined;
|
|
28
|
+
updatePositionStrategy?: "always" | "optimized" | undefined;
|
|
29
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
30
|
+
Portal: typeof Portal;
|
|
31
|
+
Provider: typeof Provider;
|
|
32
|
+
};
|
|
33
|
+
export type TooltipProps = {
|
|
34
|
+
Root: RootProps;
|
|
35
|
+
Trigger: TriggerProps;
|
|
36
|
+
Arrow: ArrowProps;
|
|
37
|
+
Content: ContentProps;
|
|
38
|
+
Portal: PortalProps;
|
|
39
|
+
Provider: ProviderProps;
|
|
40
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Root } from "./tooltip-root.js";
|
|
2
|
+
import { Trigger } from "./tooltip-trigger.js";
|
|
3
|
+
import { Arrow } from "./tooltip-arrow.js";
|
|
4
|
+
import { Content } from "./tooltip-content.js";
|
|
5
|
+
import { Portal } from "./tooltip-portal.js";
|
|
6
|
+
import { Provider } from "./tooltip-provider.js";
|
|
7
|
+
Root.displayName = "Tooltip";
|
|
8
|
+
Trigger.displayName = "Tooltip.Trigger";
|
|
9
|
+
Arrow.displayName = "Tooltip.Arrow";
|
|
10
|
+
Content.displayName = "Tooltip.Content";
|
|
11
|
+
Portal.displayName = "Tooltip.Portal";
|
|
12
|
+
Provider.displayName = "Tooltip.Provider";
|
|
13
|
+
const Tooltip = Object.assign(Root, {
|
|
14
|
+
Trigger,
|
|
15
|
+
Arrow,
|
|
16
|
+
Content,
|
|
17
|
+
Portal,
|
|
18
|
+
Provider
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
Tooltip
|
|
22
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const clsx = require("clsx");
|
|
6
|
+
const tooltip_module = require("../../tooltip.module-D_3DOZOn.cjs");
|
|
7
|
+
const TooltipPrimitive = require("@radix-ui/react-tooltip");
|
|
8
|
+
const components_tooltip_tooltipRoot = require("./tooltip-root.cjs");
|
|
9
|
+
function _interopNamespaceDefault(e) {
|
|
10
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
11
|
+
if (e) {
|
|
12
|
+
for (const k in e) {
|
|
13
|
+
if (k !== "default") {
|
|
14
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: () => e[k]
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
n.default = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
const TooltipPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TooltipPrimitive);
|
|
26
|
+
const Arrow = React.forwardRef(
|
|
27
|
+
({ className, ...props }, forwardRef) => {
|
|
28
|
+
const classes = clsx([tooltip_module.styles[`${components_tooltip_tooltipRoot.rootClassName}__arrow`]], className);
|
|
29
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Arrow, { ...props, ref: forwardRef, className: classes });
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
Arrow.displayName = "Arrow";
|
|
33
|
+
exports.Arrow = Arrow;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
4
|
+
export type ArrowProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>;
|
|
5
|
+
/** An optional arrow element to render alongside the tooltip. This can be used to help visually link the trigger with the Tooltip.Content. Must be rendered inside Tooltip.Content. */
|
|
6
|
+
export declare const Arrow: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipArrowProps & React.RefAttributes<SVGSVGElement>, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { s as styles } from "../../tooltip.module-DnKU2XS4.js";
|
|
5
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
6
|
+
import { rootClassName } from "./tooltip-root.js";
|
|
7
|
+
const Arrow = React__default.forwardRef(
|
|
8
|
+
({ className, ...props }, forwardRef) => {
|
|
9
|
+
const classes = clsx([styles[`${rootClassName}__arrow`]], className);
|
|
10
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { ...props, ref: forwardRef, className: classes });
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
Arrow.displayName = "Arrow";
|
|
14
|
+
export {
|
|
15
|
+
Arrow
|
|
16
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const clsx = require("clsx");
|
|
6
|
+
const tooltip_module = require("../../tooltip.module-D_3DOZOn.cjs");
|
|
7
|
+
const TooltipPrimitive = require("@radix-ui/react-tooltip");
|
|
8
|
+
const components_tooltip_tooltipRoot = require("./tooltip-root.cjs");
|
|
9
|
+
const reactSlot = require("@radix-ui/react-slot");
|
|
10
|
+
const components_tooltip_tooltipArrow = require("./tooltip-arrow.cjs");
|
|
11
|
+
function _interopNamespaceDefault(e) {
|
|
12
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
13
|
+
if (e) {
|
|
14
|
+
for (const k in e) {
|
|
15
|
+
if (k !== "default") {
|
|
16
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: () => e[k]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
const TooltipPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TooltipPrimitive);
|
|
28
|
+
const Content = React.forwardRef(
|
|
29
|
+
({ className, children, hideArrow, ...props }, forwardRef) => {
|
|
30
|
+
var _a;
|
|
31
|
+
const negative = (_a = React.useContext(components_tooltip_tooltipRoot.RootContext)) == null ? void 0 : _a.negative;
|
|
32
|
+
const classes = clsx(
|
|
33
|
+
[tooltip_module.styles[`${components_tooltip_tooltipRoot.rootClassName}__content`]],
|
|
34
|
+
{
|
|
35
|
+
[tooltip_module.styles[`${components_tooltip_tooltipRoot.rootClassName}--negative`]]: negative
|
|
36
|
+
},
|
|
37
|
+
className
|
|
38
|
+
);
|
|
39
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(TooltipPrimitive__namespace.Content, { sideOffset: -5, ...props, ref: forwardRef, className: classes, children: [
|
|
40
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slottable, { children }),
|
|
41
|
+
!hideArrow && /* @__PURE__ */ jsxRuntime.jsx(components_tooltip_tooltipArrow.Arrow, {})
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
Content.displayName = "Content";
|
|
46
|
+
exports.Content = Content;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
4
|
+
export type ContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {
|
|
5
|
+
hideArrow?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* A more descriptive label for accessibility purpose
|
|
8
|
+
*/
|
|
9
|
+
'aria-label'?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Event handler called when the escape key is down.
|
|
12
|
+
* Can be prevented.
|
|
13
|
+
*/
|
|
14
|
+
onEscapeKeyDown?: TooltipPrimitive.TooltipContentProps['onEscapeKeyDown'];
|
|
15
|
+
/**
|
|
16
|
+
* Event handler called when the a `pointerdown` event happens outside of the `Tooltip`.
|
|
17
|
+
* Can be prevented.
|
|
18
|
+
*/
|
|
19
|
+
onPointerDownOutside?: TooltipPrimitive.TooltipContentProps['onPointerDownOutside'];
|
|
20
|
+
/** The preferred side of the trigger to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled. */
|
|
21
|
+
side?: TooltipPrimitive.TooltipContentProps['side'];
|
|
22
|
+
/** The distance in pixels from the trigger. */
|
|
23
|
+
sideOffset?: TooltipPrimitive.TooltipContentProps['sideOffset'];
|
|
24
|
+
/** The preferred alignment against the trigger. May change when collisions occur. */
|
|
25
|
+
align?: TooltipPrimitive.TooltipContentProps['align'];
|
|
26
|
+
/** An offset in pixels from the `"start"` or `"end"` alignment options. */
|
|
27
|
+
alignOffset?: TooltipPrimitive.TooltipContentProps['alignOffset'];
|
|
28
|
+
/** The padding between the arrow and the edges of the content. If your content has border-radius, this will prevent it from overflowing the corners. */
|
|
29
|
+
arrowPadding?: TooltipPrimitive.TooltipContentProps['arrowPadding'];
|
|
30
|
+
/** When `true`, overrides the side andalign preferences to prevent collisions with boundary edges. */
|
|
31
|
+
avoidCollisions?: TooltipPrimitive.TooltipContentProps['avoidCollisions'];
|
|
32
|
+
/** The element used as the collision boundary. By default this is the viewport, though you can provide additional element(s) to be included in this check. */
|
|
33
|
+
collisionBoundary?: TooltipPrimitive.TooltipContentProps['collisionBoundary'];
|
|
34
|
+
/** The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: `{ top: 20, left: 20 }`. */
|
|
35
|
+
collisionPadding?: TooltipPrimitive.TooltipContentProps['collisionPadding'];
|
|
36
|
+
/** The sticky behavior on the align axis. `"partial"` will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst `"always"` will keep the content in the boundary regardless. */
|
|
37
|
+
sticky?: TooltipPrimitive.TooltipContentProps['sticky'];
|
|
38
|
+
/** Whether to hide the content when the trigger becomes fully occluded. */
|
|
39
|
+
hideWhenDetached?: TooltipPrimitive.TooltipContentProps['hideWhenDetached'];
|
|
40
|
+
updatePositionStrategy?: TooltipPrimitive.TooltipContentProps['updatePositionStrategy'];
|
|
41
|
+
};
|
|
42
|
+
/** The component that pops out when the tooltip is open. */
|
|
43
|
+
export declare const Content: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
44
|
+
hideArrow?: boolean | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* A more descriptive label for accessibility purpose
|
|
47
|
+
*/
|
|
48
|
+
'aria-label'?: string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Event handler called when the escape key is down.
|
|
51
|
+
* Can be prevented.
|
|
52
|
+
*/
|
|
53
|
+
onEscapeKeyDown?: TooltipPrimitive.TooltipContentProps['onEscapeKeyDown'];
|
|
54
|
+
/**
|
|
55
|
+
* Event handler called when the a `pointerdown` event happens outside of the `Tooltip`.
|
|
56
|
+
* Can be prevented.
|
|
57
|
+
*/
|
|
58
|
+
onPointerDownOutside?: TooltipPrimitive.TooltipContentProps['onPointerDownOutside'];
|
|
59
|
+
/** The preferred side of the trigger to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled. */
|
|
60
|
+
side?: TooltipPrimitive.TooltipContentProps['side'];
|
|
61
|
+
/** The distance in pixels from the trigger. */
|
|
62
|
+
sideOffset?: TooltipPrimitive.TooltipContentProps['sideOffset'];
|
|
63
|
+
/** The preferred alignment against the trigger. May change when collisions occur. */
|
|
64
|
+
align?: TooltipPrimitive.TooltipContentProps['align'];
|
|
65
|
+
/** An offset in pixels from the `"start"` or `"end"` alignment options. */
|
|
66
|
+
alignOffset?: TooltipPrimitive.TooltipContentProps['alignOffset'];
|
|
67
|
+
/** The padding between the arrow and the edges of the content. If your content has border-radius, this will prevent it from overflowing the corners. */
|
|
68
|
+
arrowPadding?: TooltipPrimitive.TooltipContentProps['arrowPadding'];
|
|
69
|
+
/** When `true`, overrides the side andalign preferences to prevent collisions with boundary edges. */
|
|
70
|
+
avoidCollisions?: TooltipPrimitive.TooltipContentProps['avoidCollisions'];
|
|
71
|
+
/** The element used as the collision boundary. By default this is the viewport, though you can provide additional element(s) to be included in this check. */
|
|
72
|
+
collisionBoundary?: TooltipPrimitive.TooltipContentProps['collisionBoundary'];
|
|
73
|
+
/** The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: `{ top: 20, left: 20 }`. */
|
|
74
|
+
collisionPadding?: TooltipPrimitive.TooltipContentProps['collisionPadding'];
|
|
75
|
+
/** The sticky behavior on the align axis. `"partial"` will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst `"always"` will keep the content in the boundary regardless. */
|
|
76
|
+
sticky?: TooltipPrimitive.TooltipContentProps['sticky'];
|
|
77
|
+
/** Whether to hide the content when the trigger becomes fully occluded. */
|
|
78
|
+
hideWhenDetached?: TooltipPrimitive.TooltipContentProps['hideWhenDetached'];
|
|
79
|
+
updatePositionStrategy?: TooltipPrimitive.TooltipContentProps['updatePositionStrategy'];
|
|
80
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { s as styles } from "../../tooltip.module-DnKU2XS4.js";
|
|
5
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
6
|
+
import { RootContext, rootClassName } from "./tooltip-root.js";
|
|
7
|
+
import { Slottable } from "@radix-ui/react-slot";
|
|
8
|
+
import { Arrow } from "./tooltip-arrow.js";
|
|
9
|
+
const Content = React__default.forwardRef(
|
|
10
|
+
({ className, children, hideArrow, ...props }, forwardRef) => {
|
|
11
|
+
var _a;
|
|
12
|
+
const negative = (_a = React__default.useContext(RootContext)) == null ? void 0 : _a.negative;
|
|
13
|
+
const classes = clsx(
|
|
14
|
+
[styles[`${rootClassName}__content`]],
|
|
15
|
+
{
|
|
16
|
+
[styles[`${rootClassName}--negative`]]: negative
|
|
17
|
+
},
|
|
18
|
+
className
|
|
19
|
+
);
|
|
20
|
+
return /* @__PURE__ */ jsxs(TooltipPrimitive.Content, { sideOffset: -5, ...props, ref: forwardRef, className: classes, children: [
|
|
21
|
+
/* @__PURE__ */ jsx(Slottable, { children }),
|
|
22
|
+
!hideArrow && /* @__PURE__ */ jsx(Arrow, {})
|
|
23
|
+
] });
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
Content.displayName = "Content";
|
|
27
|
+
export {
|
|
28
|
+
Content
|
|
29
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const TooltipPrimitive = require("@radix-ui/react-tooltip");
|
|
5
|
+
function _interopNamespaceDefault(e) {
|
|
6
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
7
|
+
if (e) {
|
|
8
|
+
for (const k in e) {
|
|
9
|
+
if (k !== "default") {
|
|
10
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: () => e[k]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
n.default = e;
|
|
19
|
+
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
const TooltipPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TooltipPrimitive);
|
|
22
|
+
function Portal(props) {
|
|
23
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { ...props });
|
|
24
|
+
}
|
|
25
|
+
Portal.displayName = "Portal";
|
|
26
|
+
exports.Portal = Portal;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
2
|
+
export type PortalProps = TooltipPrimitive.TooltipPortalProps;
|
|
3
|
+
/** When used, portals the content part into the body. */
|
|
4
|
+
export declare function Portal(props: PortalProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare namespace Portal {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|