@telia/teddy 0.0.60 → 0.0.62

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.
Files changed (102) hide show
  1. package/dist/components/breadcrumbs/breadcrumbs-link.d.ts +1 -1
  2. package/dist/components/breadcrumbs/index.d.ts +1 -1
  3. package/dist/components/card/card-illustration.d.ts +1 -1
  4. package/dist/components/card/card-link.d.ts +1 -1
  5. package/dist/components/card/index.d.ts +2 -2
  6. package/dist/components/chip/chip-indicator.d.ts +1 -1
  7. package/dist/components/chip/index.d.ts +1 -1
  8. package/dist/components/expandable-card/expandable-card-button.d.ts +3 -3
  9. package/dist/components/expandable-card/index.d.ts +4 -4
  10. package/dist/components/index.cjs +11 -4
  11. package/dist/components/index.d.ts +2 -0
  12. package/dist/components/index.js +9 -5
  13. package/dist/components/modal/modal.cjs +3 -2
  14. package/dist/components/modal/modal.js +3 -2
  15. package/dist/components/navigation-menu/global-navigation/global-navigation-desktop-simplified.cjs +2 -3
  16. package/dist/components/navigation-menu/global-navigation/global-navigation-desktop-simplified.js +2 -3
  17. package/dist/components/navigation-menu/global-navigation/global-navigation-desktop.cjs +2 -3
  18. package/dist/components/navigation-menu/global-navigation/global-navigation-desktop.js +1 -2
  19. package/dist/components/navigation-menu/global-navigation/global-navigation-mobile-simplified.cjs +2 -3
  20. package/dist/components/navigation-menu/global-navigation/global-navigation-mobile-simplified.js +2 -3
  21. package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.cjs +2 -3
  22. package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.js +2 -3
  23. package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.cjs +12 -682
  24. package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.js +12 -682
  25. package/dist/components/navigation-menu/global-navigation/global-navigation-root.cjs +4 -5
  26. package/dist/components/navigation-menu/global-navigation/global-navigation-root.js +4 -5
  27. package/dist/components/navigation-menu/global-navigation/global-navigation-search-field.cjs +2 -2
  28. package/dist/components/navigation-menu/global-navigation/global-navigation-search-field.js +2 -2
  29. package/dist/components/navigation-menu/global-navigation/global-navigation-search.cjs +2 -3
  30. package/dist/components/navigation-menu/global-navigation/global-navigation-search.js +2 -3
  31. package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.cjs +2 -3
  32. package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.js +2 -3
  33. package/dist/components/navigation-menu/global-navigation/index.cjs +2 -2
  34. package/dist/components/navigation-menu/global-navigation/index.js +1 -1
  35. package/dist/components/navigation-menu/index.cjs +3 -4
  36. package/dist/components/navigation-menu/index.js +2 -3
  37. package/dist/components/navigation-menu/navigation-menu.cjs +55 -436
  38. package/dist/components/navigation-menu/navigation-menu.d.ts +9 -1
  39. package/dist/components/navigation-menu/navigation-menu.js +55 -419
  40. package/dist/components/notabene/notabene-icon.d.ts +1 -1
  41. package/dist/components/notification/notification.d.ts +1 -1
  42. package/dist/components/radio-card-group/radio-card-group-content.cjs +3 -2
  43. package/dist/components/radio-card-group/radio-card-group-content.js +3 -2
  44. package/dist/components/radio-card-group/radio-card-group-item-body.cjs +3 -2
  45. package/dist/components/radio-card-group/radio-card-group-item-body.js +3 -2
  46. package/dist/components/radio-card-group/radio-card-group-item-title.cjs +1137 -51
  47. package/dist/components/radio-card-group/radio-card-group-item-title.js +1148 -63
  48. package/dist/components/radio-card-group/radio-card-group-item.cjs +3 -2
  49. package/dist/components/radio-card-group/radio-card-group-item.js +3 -2
  50. package/dist/components/scroll-area/index.d.ts +3 -3
  51. package/dist/components/scroll-area/scroll-area-button.d.ts +3 -3
  52. package/dist/components/tabs/index.d.ts +3 -3
  53. package/dist/components/tabs/tabs-scroll-button.d.ts +3 -3
  54. package/dist/components/text-field/index.d.ts +2 -2
  55. package/dist/components/text-field/text-field-button.d.ts +2 -2
  56. package/dist/components/toast/index.cjs +10 -0
  57. package/dist/components/toast/index.d.ts +9 -0
  58. package/dist/components/toast/index.js +7 -0
  59. package/dist/components/toast/toast-root.cjs +121 -0
  60. package/dist/components/toast/toast-root.d.ts +9 -0
  61. package/dist/components/toast/toast-root.js +121 -0
  62. package/dist/components/toggle/toggle.d.ts +1 -1
  63. package/dist/components/toggletip/index.cjs +31 -0
  64. package/dist/components/toggletip/index.d.ts +33 -0
  65. package/dist/components/toggletip/index.js +31 -0
  66. package/dist/components/toggletip/toggletip-anchor.cjs +33 -0
  67. package/dist/components/toggletip/toggletip-anchor.d.ts +6 -0
  68. package/dist/components/toggletip/toggletip-anchor.js +16 -0
  69. package/dist/components/toggletip/toggletip-arrow.cjs +38 -0
  70. package/dist/components/toggletip/toggletip-arrow.d.ts +6 -0
  71. package/dist/components/toggletip/toggletip-arrow.js +21 -0
  72. package/dist/components/toggletip/toggletip-close.cjs +48 -0
  73. package/dist/components/toggletip/toggletip-close.d.ts +10 -0
  74. package/dist/components/toggletip/toggletip-close.js +31 -0
  75. package/dist/components/toggletip/toggletip-content.cjs +80 -0
  76. package/dist/components/toggletip/toggletip-content.d.ts +16 -0
  77. package/dist/components/toggletip/toggletip-content.js +63 -0
  78. package/dist/components/toggletip/toggletip-footer.cjs +10 -0
  79. package/dist/components/toggletip/toggletip-footer.d.ts +6 -0
  80. package/dist/components/toggletip/toggletip-footer.js +10 -0
  81. package/dist/components/toggletip/toggletip-heading.cjs +25 -0
  82. package/dist/components/toggletip/toggletip-heading.d.ts +6 -0
  83. package/dist/components/toggletip/toggletip-heading.js +25 -0
  84. package/dist/components/toggletip/toggletip-portal.cjs +31 -0
  85. package/dist/components/toggletip/toggletip-portal.d.ts +11 -0
  86. package/dist/components/toggletip/toggletip-portal.js +14 -0
  87. package/dist/components/toggletip/toggletip-root.cjs +36 -0
  88. package/dist/components/toggletip/toggletip-root.d.ts +26 -0
  89. package/dist/components/toggletip/toggletip-root.js +19 -0
  90. package/dist/components/toggletip/toggletip-trigger.cjs +33 -0
  91. package/dist/components/toggletip/toggletip-trigger.d.ts +10 -0
  92. package/dist/components/toggletip/toggletip-trigger.js +16 -0
  93. package/dist/components/tooltip/index.d.ts +3 -3
  94. package/dist/main.cjs +11 -4
  95. package/dist/main.js +9 -5
  96. package/dist/style.css +3458 -2751
  97. package/dist/toggletip.module-A6XIfaD_.cjs +10 -0
  98. package/dist/toggletip.module-BUx6_4pv.js +11 -0
  99. package/dist/utils/generate-styling/grid.d.ts +24 -24
  100. package/dist/utils/generate-styling/index.d.ts +16 -16
  101. package/dist/utils/generate-styling/util.d.ts +2 -2
  102. package/package.json +17 -15
@@ -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 toggletip_module = require("../../toggletip.module-A6XIfaD_.cjs");
7
+ const PopoverPrimitive = require("@radix-ui/react-popover");
8
+ const components_toggletip_toggletipRoot = require("./toggletip-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 PopoverPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(PopoverPrimitive);
26
+ const Anchor = React.forwardRef(
27
+ ({ className, ...props }, forwardRef) => {
28
+ const classes = clsx([toggletip_module.styles[`${components_toggletip_toggletipRoot.rootClassName}__anchor`]], className);
29
+ return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Anchor, { ...props, ref: forwardRef, className: classes });
30
+ }
31
+ );
32
+ Anchor.displayName = "Anchor";
33
+ exports.Anchor = Anchor;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
4
+ export type AnchorProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>;
5
+ /** An optional element to position the `Popover.Content` against. If this part is not used, the content will position alongside the `Popover.Trigger.` */
6
+ export declare const Anchor: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -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 "../../toggletip.module-BUx6_4pv.js";
5
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
6
+ import { rootClassName } from "./toggletip-root.js";
7
+ const Anchor = React__default.forwardRef(
8
+ ({ className, ...props }, forwardRef) => {
9
+ const classes = clsx([styles[`${rootClassName}__anchor`]], className);
10
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, { ...props, ref: forwardRef, className: classes });
11
+ }
12
+ );
13
+ Anchor.displayName = "Anchor";
14
+ export {
15
+ Anchor
16
+ };
@@ -0,0 +1,38 @@
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 PopoverPrimitive = require("@radix-ui/react-popover");
7
+ const components_toggletip_toggletipRoot = require("./toggletip-root.cjs");
8
+ const toggletip_module = require("../../toggletip.module-A6XIfaD_.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 PopoverPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(PopoverPrimitive);
26
+ const Arrow = React.forwardRef(
27
+ ({ className, ...props }, forwardRef) => {
28
+ const { negative } = React.useContext(components_toggletip_toggletipRoot.RootContext);
29
+ const classes = clsx(
30
+ [toggletip_module.styles[`${components_toggletip_toggletipRoot.rootClassName}__arrow`]],
31
+ { [toggletip_module.styles[`${components_toggletip_toggletipRoot.rootClassName}__arrow--negative`]]: negative },
32
+ className
33
+ );
34
+ return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Arrow, { ...props, ref: forwardRef, className: classes });
35
+ }
36
+ );
37
+ Arrow.displayName = "Arrow";
38
+ exports.Arrow = Arrow;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
4
+ export type ArrowProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Arrow>;
5
+ /** An optional arrow element to render alongside the popover. This can be used to help visually link the anchor with the `Popover.Content`. Must be rendered inside `Popover.Content.` */
6
+ export declare const Arrow: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverArrowProps & React.RefAttributes<SVGSVGElement>, "ref"> & React.RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,21 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default, { useContext } from "react";
3
+ import clsx from "clsx";
4
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
5
+ import { RootContext, rootClassName } from "./toggletip-root.js";
6
+ import { s as styles } from "../../toggletip.module-BUx6_4pv.js";
7
+ const Arrow = React__default.forwardRef(
8
+ ({ className, ...props }, forwardRef) => {
9
+ const { negative } = useContext(RootContext);
10
+ const classes = clsx(
11
+ [styles[`${rootClassName}__arrow`]],
12
+ { [styles[`${rootClassName}__arrow--negative`]]: negative },
13
+ className
14
+ );
15
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Arrow, { ...props, ref: forwardRef, className: classes });
16
+ }
17
+ );
18
+ Arrow.displayName = "Arrow";
19
+ export {
20
+ Arrow
21
+ };
@@ -0,0 +1,48 @@
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 PopoverPrimitive = require("@radix-ui/react-popover");
7
+ const components_toggletip_toggletipRoot = require("./toggletip-root.cjs");
8
+ const components_button_button = require("../button/button.cjs");
9
+ require("../../assets/sprite.269ba410-teddy.svg");
10
+ const components_icon_icon = require("../icon/icon.cjs");
11
+ const toggletip_module = require("../../toggletip.module-A6XIfaD_.cjs");
12
+ function _interopNamespaceDefault(e) {
13
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
14
+ if (e) {
15
+ for (const k in e) {
16
+ if (k !== "default") {
17
+ const d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: () => e[k]
21
+ });
22
+ }
23
+ }
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+ const PopoverPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(PopoverPrimitive);
29
+ const Close = React.forwardRef(
30
+ ({ className, ...props }, forwardedRef) => {
31
+ const { negative } = React.useContext(components_toggletip_toggletipRoot.RootContext);
32
+ const classes = clsx([toggletip_module.styles[`${components_toggletip_toggletipRoot.rootClassName}__close`]], {
33
+ [toggletip_module.styles[`${components_toggletip_toggletipRoot.rootClassName}__close--floating`]]: !props.children,
34
+ className
35
+ });
36
+ return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Close, { ...props, className: classes, ref: forwardedRef, asChild: true, children: props.children || /* @__PURE__ */ jsxRuntime.jsx(
37
+ components_button_button.Button,
38
+ {
39
+ variant: negative ? "tertiary-purple" : "tertiary-purple-negative",
40
+ iconOnly: true,
41
+ "aria-label": props["aria-label"],
42
+ children: /* @__PURE__ */ jsxRuntime.jsx(components_icon_icon.Icon, { name: "close" })
43
+ }
44
+ ) });
45
+ }
46
+ );
47
+ Close.displayName = "Close";
48
+ exports.Close = Close;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
4
+ export type CloseProps = Omit<React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Close>, 'asChild' | 'children'> & ({
5
+ children: React.ReactElement;
6
+ } | {
7
+ ['aria-label']: string;
8
+ children?: never;
9
+ });
10
+ export declare const Close: React.ForwardRefExoticComponent<CloseProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,31 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default, { useContext } from "react";
3
+ import clsx from "clsx";
4
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
5
+ import { RootContext, rootClassName } from "./toggletip-root.js";
6
+ import { Button } from "../button/button.js";
7
+ import "../../assets/sprite.269ba410-teddy.svg";
8
+ import { Icon } from "../icon/icon.js";
9
+ import { s as styles } from "../../toggletip.module-BUx6_4pv.js";
10
+ const Close = React__default.forwardRef(
11
+ ({ className, ...props }, forwardedRef) => {
12
+ const { negative } = useContext(RootContext);
13
+ const classes = clsx([styles[`${rootClassName}__close`]], {
14
+ [styles[`${rootClassName}__close--floating`]]: !props.children,
15
+ className
16
+ });
17
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Close, { ...props, className: classes, ref: forwardedRef, asChild: true, children: props.children || /* @__PURE__ */ jsx(
18
+ Button,
19
+ {
20
+ variant: negative ? "tertiary-purple" : "tertiary-purple-negative",
21
+ iconOnly: true,
22
+ "aria-label": props["aria-label"],
23
+ children: /* @__PURE__ */ jsx(Icon, { name: "close" })
24
+ }
25
+ ) });
26
+ }
27
+ );
28
+ Close.displayName = "Close";
29
+ export {
30
+ Close
31
+ };
@@ -0,0 +1,80 @@
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 PopoverPrimitive = require("@radix-ui/react-popover");
7
+ const components_toggletip_toggletipRoot = require("./toggletip-root.cjs");
8
+ const toggletip_module = require("../../toggletip.module-A6XIfaD_.cjs");
9
+ const components_toggletip_toggletipPortal = require("./toggletip-portal.cjs");
10
+ const components_flex_flex = require("../flex/flex.cjs");
11
+ const reactSlot = require("@radix-ui/react-slot");
12
+ const components_toggletip_toggletipClose = require("./toggletip-close.cjs");
13
+ const components_toggletip_toggletipArrow = require("./toggletip-arrow.cjs");
14
+ function _interopNamespaceDefault(e) {
15
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
16
+ if (e) {
17
+ for (const k in e) {
18
+ if (k !== "default") {
19
+ const d = Object.getOwnPropertyDescriptor(e, k);
20
+ Object.defineProperty(n, k, d.get ? d : {
21
+ enumerable: true,
22
+ get: () => e[k]
23
+ });
24
+ }
25
+ }
26
+ }
27
+ n.default = e;
28
+ return Object.freeze(n);
29
+ }
30
+ const PopoverPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(PopoverPrimitive);
31
+ const Content = React.forwardRef(
32
+ ({ className, beakPosition, sideOffset, side, beakOffset, children, ...props }, forwardRef) => {
33
+ const { hideClose, hideArrow, negative } = React.useContext(components_toggletip_toggletipRoot.RootContext);
34
+ const classes = clsx(
35
+ [toggletip_module.styles[`${components_toggletip_toggletipRoot.rootClassName}__content`]],
36
+ { [toggletip_module.styles[`${components_toggletip_toggletipRoot.rootClassName}__content--negative`]]: negative },
37
+ className
38
+ );
39
+ const hasPortal = React.useContext(components_toggletip_toggletipPortal.HasPortalContext);
40
+ if (!hasPortal)
41
+ return /* @__PURE__ */ jsxRuntime.jsx(components_toggletip_toggletipPortal.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
42
+ PopoverPrimitive__namespace.Content,
43
+ {
44
+ ...props,
45
+ align: beakPosition,
46
+ alignOffset: beakOffset,
47
+ side,
48
+ sideOffset,
49
+ ref: forwardRef,
50
+ className: classes,
51
+ asChild: true,
52
+ children: /* @__PURE__ */ jsxRuntime.jsxs(components_flex_flex.Flex, { ...props, children: [
53
+ !hideClose && /* @__PURE__ */ jsxRuntime.jsx(components_toggletip_toggletipClose.Close, { "aria-label": "Lukk" }),
54
+ !hideArrow && /* @__PURE__ */ jsxRuntime.jsx(components_toggletip_toggletipArrow.Arrow, {}),
55
+ /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slottable, { children })
56
+ ] })
57
+ }
58
+ ) });
59
+ return /* @__PURE__ */ jsxRuntime.jsx(
60
+ PopoverPrimitive__namespace.Content,
61
+ {
62
+ ...props,
63
+ align: beakPosition,
64
+ alignOffset: beakOffset,
65
+ side,
66
+ sideOffset,
67
+ ref: forwardRef,
68
+ className: classes,
69
+ asChild: true,
70
+ children: /* @__PURE__ */ jsxRuntime.jsxs(components_flex_flex.Flex, { ...props, children: [
71
+ !hideClose && /* @__PURE__ */ jsxRuntime.jsx(components_toggletip_toggletipClose.Close, { "aria-label": "Lukk" }),
72
+ !hideArrow && /* @__PURE__ */ jsxRuntime.jsx(components_toggletip_toggletipArrow.Arrow, {}),
73
+ /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slottable, { children })
74
+ ] })
75
+ }
76
+ );
77
+ }
78
+ );
79
+ Content.displayName = "Content";
80
+ exports.Content = Content;
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { FlexProps } from '../flex';
3
+
4
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
5
+ export type ContentProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & FlexProps & {
6
+ /** Position the content relative to the trigger. */
7
+ side?: PopoverPrimitive.PopoverContentProps['side'];
8
+ /** Offset the content relative to the trigger. */
9
+ sideOffset?: PopoverPrimitive.PopoverContentProps['sideOffset'];
10
+ /** Position the beak relative to the content. */
11
+ beakPosition?: PopoverPrimitive.PopoverContentProps['align'];
12
+ /** Offset the beak relative to the content. */
13
+ beakOffset?: PopoverPrimitive.PopoverContentProps['alignOffset'];
14
+ };
15
+ /** The component that pops out when the popover is open. */
16
+ export declare const Content: React.ForwardRefExoticComponent<ContentProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,63 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import React__default, { useContext } from "react";
3
+ import clsx from "clsx";
4
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
5
+ import { RootContext, rootClassName } from "./toggletip-root.js";
6
+ import { s as styles } from "../../toggletip.module-BUx6_4pv.js";
7
+ import { HasPortalContext, Portal } from "./toggletip-portal.js";
8
+ import { Flex } from "../flex/flex.js";
9
+ import { Slottable } from "@radix-ui/react-slot";
10
+ import { Close } from "./toggletip-close.js";
11
+ import { Arrow } from "./toggletip-arrow.js";
12
+ const Content = React__default.forwardRef(
13
+ ({ className, beakPosition, sideOffset, side, beakOffset, children, ...props }, forwardRef) => {
14
+ const { hideClose, hideArrow, negative } = useContext(RootContext);
15
+ const classes = clsx(
16
+ [styles[`${rootClassName}__content`]],
17
+ { [styles[`${rootClassName}__content--negative`]]: negative },
18
+ className
19
+ );
20
+ const hasPortal = useContext(HasPortalContext);
21
+ if (!hasPortal)
22
+ return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(
23
+ PopoverPrimitive.Content,
24
+ {
25
+ ...props,
26
+ align: beakPosition,
27
+ alignOffset: beakOffset,
28
+ side,
29
+ sideOffset,
30
+ ref: forwardRef,
31
+ className: classes,
32
+ asChild: true,
33
+ children: /* @__PURE__ */ jsxs(Flex, { ...props, children: [
34
+ !hideClose && /* @__PURE__ */ jsx(Close, { "aria-label": "Lukk" }),
35
+ !hideArrow && /* @__PURE__ */ jsx(Arrow, {}),
36
+ /* @__PURE__ */ jsx(Slottable, { children })
37
+ ] })
38
+ }
39
+ ) });
40
+ return /* @__PURE__ */ jsx(
41
+ PopoverPrimitive.Content,
42
+ {
43
+ ...props,
44
+ align: beakPosition,
45
+ alignOffset: beakOffset,
46
+ side,
47
+ sideOffset,
48
+ ref: forwardRef,
49
+ className: classes,
50
+ asChild: true,
51
+ children: /* @__PURE__ */ jsxs(Flex, { ...props, children: [
52
+ !hideClose && /* @__PURE__ */ jsx(Close, { "aria-label": "Lukk" }),
53
+ !hideArrow && /* @__PURE__ */ jsx(Arrow, {}),
54
+ /* @__PURE__ */ jsx(Slottable, { children })
55
+ ] })
56
+ }
57
+ );
58
+ }
59
+ );
60
+ Content.displayName = "Content";
61
+ export {
62
+ Content
63
+ };
@@ -0,0 +1,10 @@
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 components_flex_flex = require("../flex/flex.cjs");
6
+ const Footer = React.forwardRef(({ ...props }, forwardedRef) => {
7
+ return /* @__PURE__ */ jsxRuntime.jsx(components_flex_flex.Flex, { gap: "200", align: "center", justify: "end", ...props, ref: forwardedRef });
8
+ });
9
+ Footer.displayName = "Footer";
10
+ exports.Footer = Footer;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { Flex } from '../flex';
3
+
4
+ export type FooterProps = React.ComponentPropsWithoutRef<typeof Flex>;
5
+ /** Group of actions that are displayed in the toggletip footer. */
6
+ export declare const Footer: React.ForwardRefExoticComponent<FooterProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,10 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import { Flex } from "../flex/flex.js";
4
+ const Footer = React__default.forwardRef(({ ...props }, forwardedRef) => {
5
+ return /* @__PURE__ */ jsx(Flex, { gap: "200", align: "center", justify: "end", ...props, ref: forwardedRef });
6
+ });
7
+ Footer.displayName = "Footer";
8
+ export {
9
+ Footer
10
+ };
@@ -0,0 +1,25 @@
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 components_heading_heading = require("../heading/heading.cjs");
6
+ const clsx = require("clsx");
7
+ const toggletip_module = require("../../toggletip.module-A6XIfaD_.cjs");
8
+ const components_toggletip_toggletipRoot = require("./toggletip-root.cjs");
9
+ const Heading = React.forwardRef(
10
+ ({ className, as = "h2", ...props }, forwardRef) => {
11
+ const classes = clsx([toggletip_module.styles[`${components_toggletip_toggletipRoot.rootClassName}__heading`]], className);
12
+ return /* @__PURE__ */ jsxRuntime.jsx(
13
+ components_heading_heading.Heading,
14
+ {
15
+ variant: "title-100",
16
+ ...props,
17
+ ...props.asChild ? { as: void 0, asChild: true } : { as, asChild: false },
18
+ ref: forwardRef,
19
+ className: classes
20
+ }
21
+ );
22
+ }
23
+ );
24
+ Heading.displayName = "Heading";
25
+ exports.Heading = Heading;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { Heading as PrimitiveHeading } from '../heading';
3
+
4
+ export type HeadingProps = React.ComponentPropsWithoutRef<typeof PrimitiveHeading>;
5
+ /** */
6
+ export declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
@@ -0,0 +1,25 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import { Heading as Heading$1 } from "../heading/heading.js";
4
+ import clsx from "clsx";
5
+ import { s as styles } from "../../toggletip.module-BUx6_4pv.js";
6
+ import { rootClassName } from "./toggletip-root.js";
7
+ const Heading = React__default.forwardRef(
8
+ ({ className, as = "h2", ...props }, forwardRef) => {
9
+ const classes = clsx([styles[`${rootClassName}__heading`]], className);
10
+ return /* @__PURE__ */ jsx(
11
+ Heading$1,
12
+ {
13
+ variant: "title-100",
14
+ ...props,
15
+ ...props.asChild ? { as: void 0, asChild: true } : { as, asChild: false },
16
+ ref: forwardRef,
17
+ className: classes
18
+ }
19
+ );
20
+ }
21
+ );
22
+ Heading.displayName = "Heading";
23
+ export {
24
+ Heading
25
+ };
@@ -0,0 +1,31 @@
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 PopoverPrimitive = require("@radix-ui/react-popover");
6
+ function _interopNamespaceDefault(e) {
7
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
8
+ if (e) {
9
+ for (const k in e) {
10
+ if (k !== "default") {
11
+ const d = Object.getOwnPropertyDescriptor(e, k);
12
+ Object.defineProperty(n, k, d.get ? d : {
13
+ enumerable: true,
14
+ get: () => e[k]
15
+ });
16
+ }
17
+ }
18
+ }
19
+ n.default = e;
20
+ return Object.freeze(n);
21
+ }
22
+ const PopoverPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(PopoverPrimitive);
23
+ const PortalClassName = "teddy-toggletip";
24
+ const HasPortalContext = React.createContext(false);
25
+ function Portal(props) {
26
+ return /* @__PURE__ */ jsxRuntime.jsx(HasPortalContext.Provider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { ...props }) });
27
+ }
28
+ Portal.displayName = "Portal";
29
+ exports.HasPortalContext = HasPortalContext;
30
+ exports.Portal = Portal;
31
+ exports.PortalClassName = PortalClassName;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
4
+ export declare const PortalClassName = "teddy-toggletip";
5
+ export type PortalProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>;
6
+ export declare const HasPortalContext: React.Context<boolean>;
7
+ /** When used, portals the content part into the body.*/
8
+ export declare function Portal(props: PortalProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare namespace Portal {
10
+ var displayName: string;
11
+ }
@@ -0,0 +1,14 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
4
+ const PortalClassName = "teddy-toggletip";
5
+ const HasPortalContext = React__default.createContext(false);
6
+ function Portal(props) {
7
+ return /* @__PURE__ */ jsx(HasPortalContext.Provider, { value: true, children: /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { ...props }) });
8
+ }
9
+ Portal.displayName = "Portal";
10
+ export {
11
+ HasPortalContext,
12
+ Portal,
13
+ PortalClassName
14
+ };
@@ -0,0 +1,36 @@
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 PopoverPrimitive = require("@radix-ui/react-popover");
6
+ function _interopNamespaceDefault(e) {
7
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
8
+ if (e) {
9
+ for (const k in e) {
10
+ if (k !== "default") {
11
+ const d = Object.getOwnPropertyDescriptor(e, k);
12
+ Object.defineProperty(n, k, d.get ? d : {
13
+ enumerable: true,
14
+ get: () => e[k]
15
+ });
16
+ }
17
+ }
18
+ }
19
+ n.default = e;
20
+ return Object.freeze(n);
21
+ }
22
+ const PopoverPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(PopoverPrimitive);
23
+ const rootClassName = "teddy-toggletip";
24
+ const RootContext = React.createContext({
25
+ negative: false,
26
+ hideClose: false,
27
+ hideArrow: false
28
+ });
29
+ function Root(props) {
30
+ const { hideClose, hideArrow, negative, ...rest } = props;
31
+ return /* @__PURE__ */ jsxRuntime.jsx(RootContext.Provider, { value: { hideClose, hideArrow, negative }, children: /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { ...rest }) });
32
+ }
33
+ Root.displayName = "Root";
34
+ exports.Root = Root;
35
+ exports.RootContext = RootContext;
36
+ exports.rootClassName = rootClassName;
@@ -0,0 +1,26 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
4
+ export declare const rootClassName = "teddy-toggletip";
5
+ export declare const RootContext: React.Context<{
6
+ negative?: boolean | undefined;
7
+ hideClose?: boolean | undefined;
8
+ hideArrow?: boolean | undefined;
9
+ }>;
10
+ export type RootProps = Omit<React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>, 'open' | 'onOpenChange' | 'modal' | 'defaultOpen'> & {
11
+ open?: PopoverPrimitive.PopoverProps['open'];
12
+ onOpenChange?: PopoverPrimitive.PopoverProps['onOpenChange'];
13
+ modal?: PopoverPrimitive.PopoverProps['modal'];
14
+ defaultOpen?: PopoverPrimitive.PopoverProps['defaultOpen'];
15
+ /** Hide the close button. You can use the `Close` component to add a custom close button. */
16
+ hideClose?: boolean;
17
+ /** Hide the arrow. You can use the `Arrow` component to add a custom arrow. */
18
+ hideArrow?: boolean;
19
+ /** Set the negative variant on the content. */
20
+ negative?: boolean;
21
+ };
22
+ /** */
23
+ export declare function Root(props: RootProps): import("react/jsx-runtime").JSX.Element;
24
+ export declare namespace Root {
25
+ var displayName: string;
26
+ }
@@ -0,0 +1,19 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
4
+ const rootClassName = "teddy-toggletip";
5
+ const RootContext = React__default.createContext({
6
+ negative: false,
7
+ hideClose: false,
8
+ hideArrow: false
9
+ });
10
+ function Root(props) {
11
+ const { hideClose, hideArrow, negative, ...rest } = props;
12
+ return /* @__PURE__ */ jsx(RootContext.Provider, { value: { hideClose, hideArrow, negative }, children: /* @__PURE__ */ jsx(PopoverPrimitive.Root, { ...rest }) });
13
+ }
14
+ Root.displayName = "Root";
15
+ export {
16
+ Root,
17
+ RootContext,
18
+ rootClassName
19
+ };
@@ -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 toggletip_module = require("../../toggletip.module-A6XIfaD_.cjs");
7
+ const PopoverPrimitive = require("@radix-ui/react-popover");
8
+ const components_toggletip_toggletipRoot = require("./toggletip-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 PopoverPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(PopoverPrimitive);
26
+ const Trigger = React.forwardRef(
27
+ ({ className, ...props }, forwardRef) => {
28
+ const classes = clsx([toggletip_module.styles[`${components_toggletip_toggletipRoot.rootClassName}__trigger`]], className);
29
+ return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { ...props, ref: forwardRef, className: classes });
30
+ }
31
+ );
32
+ Trigger.displayName = "Trigger";
33
+ exports.Trigger = Trigger;