@telia/teddy 0.3.1 → 0.3.3

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 (125) hide show
  1. package/dist/components/card/card-illustration.d.ts +1 -1
  2. package/dist/components/card/index.d.ts +1 -1
  3. package/dist/components/channel-button/channel-button-illustration.cjs +33 -0
  4. package/dist/components/channel-button/channel-button-illustration.d.ts +8 -0
  5. package/dist/components/channel-button/channel-button-illustration.js +33 -0
  6. package/dist/components/channel-button/channel-button-image.cjs +19 -0
  7. package/dist/components/channel-button/channel-button-image.d.ts +5 -0
  8. package/dist/components/channel-button/channel-button-image.js +19 -0
  9. package/dist/components/channel-button/channel-button-root.cjs +41 -0
  10. package/dist/components/channel-button/channel-button-root.d.ts +34 -0
  11. package/dist/components/channel-button/channel-button-root.js +41 -0
  12. package/dist/components/channel-button/channel-button-text.cjs +23 -0
  13. package/dist/components/channel-button/channel-button-text.d.ts +5 -0
  14. package/dist/components/channel-button/channel-button-text.js +23 -0
  15. package/dist/components/channel-button/index.cjs +15 -0
  16. package/dist/components/channel-button/index.d.ts +91 -0
  17. package/dist/components/channel-button/index.js +15 -0
  18. package/dist/components/checkbox/checkbox-group-list.d.ts +1 -1
  19. package/dist/components/checkbox/checkbox-group.d.ts +1 -1
  20. package/dist/components/checkbox/index.d.ts +2 -2
  21. package/dist/components/chip/chip-indicator.d.ts +2 -2
  22. package/dist/components/chip/index.d.ts +2 -2
  23. package/dist/components/color-dot/index.d.ts +1 -1
  24. package/dist/components/drawer/drawer-close.cjs +1 -1
  25. package/dist/components/drawer/drawer-close.js +1 -1
  26. package/dist/components/drawer/drawer-content.cjs +1 -1
  27. package/dist/components/drawer/drawer-content.js +1 -1
  28. package/dist/components/drawer/drawer-description.cjs +1 -1
  29. package/dist/components/drawer/drawer-description.js +1 -1
  30. package/dist/components/drawer/drawer-footer.cjs +1 -1
  31. package/dist/components/drawer/drawer-footer.js +1 -1
  32. package/dist/components/drawer/drawer-overlay.cjs +1 -1
  33. package/dist/components/drawer/drawer-overlay.js +1 -1
  34. package/dist/components/drawer/drawer-title.cjs +1 -1
  35. package/dist/components/drawer/drawer-title.js +1 -1
  36. package/dist/components/expandable-card/expandable-card-button.d.ts +2 -2
  37. package/dist/components/expandable-card/index.d.ts +3 -3
  38. package/dist/components/icon/utils.d.ts +1 -1
  39. package/dist/components/index.cjs +2 -0
  40. package/dist/components/index.d.ts +1 -0
  41. package/dist/components/index.js +2 -0
  42. package/dist/components/link/link.cjs +10 -10
  43. package/dist/components/link/link.js +10 -10
  44. package/dist/components/modal/index.cjs +8 -0
  45. package/dist/components/modal/index.d.ts +185 -2
  46. package/dist/components/modal/index.js +8 -0
  47. package/dist/components/modal/{modal.cjs → modal-close.cjs} +4 -3
  48. package/dist/components/modal/modal-close.d.ts +19 -0
  49. package/dist/components/modal/{modal.js → modal-close.js} +5 -4
  50. package/dist/components/modal/modal-content.cjs +65 -0
  51. package/dist/components/modal/modal-content.d.ts +7 -0
  52. package/dist/components/modal/modal-content.js +48 -0
  53. package/dist/components/modal/modal-description.cjs +26 -0
  54. package/dist/components/modal/modal-description.d.ts +8 -0
  55. package/dist/components/modal/modal-description.js +9 -0
  56. package/dist/components/modal/modal-group.cjs +47 -0
  57. package/dist/components/modal/modal-group.d.ts +10 -0
  58. package/dist/components/modal/modal-group.js +47 -0
  59. package/dist/components/modal/modal-image.cjs +17 -0
  60. package/dist/components/modal/modal-image.d.ts +10 -0
  61. package/dist/components/modal/modal-image.js +17 -0
  62. package/dist/components/modal/modal-overlay.cjs +35 -0
  63. package/dist/components/modal/modal-overlay.d.ts +12 -0
  64. package/dist/components/modal/modal-overlay.js +18 -0
  65. package/dist/components/modal/modal-root.cjs +38 -0
  66. package/dist/components/modal/modal-root.d.ts +16 -0
  67. package/dist/components/modal/modal-root.js +21 -0
  68. package/dist/components/modal/modal-title.cjs +45 -0
  69. package/dist/components/modal/modal-title.d.ts +18 -0
  70. package/dist/components/modal/modal-title.js +28 -0
  71. package/dist/components/modal/modal-trigger.cjs +27 -0
  72. package/dist/components/modal/modal-trigger.d.ts +21 -0
  73. package/dist/components/modal/modal-trigger.js +10 -0
  74. package/dist/components/navigation-menu/global-navigation/global-navigation-desktop-simplified.js +2 -2
  75. package/dist/components/navigation-menu/global-navigation/global-navigation-mobile-simplified.js +2 -2
  76. package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.js +2 -2
  77. package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.js +2 -2
  78. package/dist/components/navigation-menu/global-navigation/global-navigation-root.js +4 -4
  79. package/dist/components/navigation-menu/global-navigation/global-navigation-search-field.js +2 -2
  80. package/dist/components/navigation-menu/global-navigation/global-navigation-search.js +2 -2
  81. package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.js +2 -2
  82. package/dist/components/navigation-menu/navigation-menu.cjs +1 -0
  83. package/dist/components/navigation-menu/navigation-menu.js +1 -0
  84. package/dist/components/notabene/index.cjs +6 -2
  85. package/dist/components/notabene/index.d.ts +1 -1
  86. package/dist/components/notabene/index.js +5 -1
  87. package/dist/components/notabene/notabene-icon.d.ts +2 -2
  88. package/dist/components/notification/index.cjs +6 -0
  89. package/dist/components/notification/index.d.ts +1 -1
  90. package/dist/components/notification/index.js +6 -0
  91. package/dist/components/notification/notification-footer.cjs +1 -1
  92. package/dist/components/notification/notification-footer.js +1 -1
  93. package/dist/components/notification/notification-icon.d.ts +2 -2
  94. package/dist/components/notification/notification-root.d.ts +1 -1
  95. package/dist/components/radio-card-group/radio-card-group-content.cjs +1 -0
  96. package/dist/components/radio-card-group/radio-card-group-content.js +1 -0
  97. package/dist/components/radio-card-group/radio-card-group-item-title.cjs +51 -152
  98. package/dist/components/radio-card-group/radio-card-group-item-title.js +69 -170
  99. package/dist/components/radio-card-group/radio-card-group-item.cjs +1 -0
  100. package/dist/components/radio-card-group/radio-card-group-item.js +1 -0
  101. package/dist/components/scroll-area/index.d.ts +2 -2
  102. package/dist/components/scroll-area/scroll-area-button.d.ts +2 -2
  103. package/dist/components/tabs/index.d.ts +2 -2
  104. package/dist/components/tabs/tabs-scroll-button.d.ts +2 -2
  105. package/dist/components/text-field/index.d.ts +2 -2
  106. package/dist/components/text-field/text-field-button.d.ts +2 -2
  107. package/dist/components/toggle/toggle.d.ts +2 -2
  108. package/dist/components/tooltip/index.d.ts +2 -2
  109. package/dist/drawer.module-Bh77Byg_.js +16 -0
  110. package/dist/drawer.module-khivHSFm.cjs +15 -0
  111. package/dist/main.cjs +2 -0
  112. package/dist/main.js +2 -0
  113. package/dist/modal.module-BfeNqXoN.cjs +19 -0
  114. package/dist/modal.module-DuP4in7f.js +20 -0
  115. package/dist/style.css +1210 -1147
  116. package/dist/utils/generate-styling/grid.d.ts +24 -24
  117. package/dist/utils/generate-styling/index.d.ts +16 -16
  118. package/dist/utils/generate-styling/util.d.ts +2 -2
  119. package/package.json +1 -1
  120. package/dist/components/modal/modal.d.ts +0 -76
  121. package/dist/drawer.module-Am9xxZYU.js +0 -16
  122. package/dist/drawer.module-CoqKvqzl.cjs +0 -15
  123. /package/dist/components/notabene/{notabene-content.cjs → notabene.content.cjs} +0 -0
  124. /package/dist/components/notabene/{notabene-content.d.ts → notabene.content.d.ts} +0 -0
  125. /package/dist/components/notabene/{notabene-content.js → notabene.content.js} +0 -0
@@ -0,0 +1,65 @@
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 DrawerPrimitive = require("@radix-ui/react-dialog");
6
+ const components_flex_flex = require("../flex/flex.cjs");
7
+ const clsx = require("clsx");
8
+ const modal_module = require("../../modal.module-BfeNqXoN.cjs");
9
+ const components_modal_modalRoot = require("./modal-root.cjs");
10
+ const components_modal_modalOverlay = require("./modal-overlay.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 DrawerPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DrawerPrimitive);
28
+ const InnerContent = React.forwardRef(
29
+ function InnerContent2({ asChild, children, className, ...props }, forwardedRef) {
30
+ const classes = clsx([modal_module.styles[`${components_modal_modalRoot.rootClassName}__scroll`]], className);
31
+ const context = React.useContext(components_modal_modalRoot.RootContext);
32
+ return /* @__PURE__ */ jsxRuntime.jsx(
33
+ DrawerPrimitive__namespace.Content,
34
+ {
35
+ ...props,
36
+ ref: forwardedRef,
37
+ className: clsx([modal_module.styles[`${components_modal_modalRoot.rootClassName}__content`]]),
38
+ asChild: true,
39
+ children: /* @__PURE__ */ jsxRuntime.jsx(components_flex_flex.Flex, { children: /* @__PURE__ */ jsxRuntime.jsx(
40
+ components_flex_flex.Flex,
41
+ {
42
+ ...asChild ? { as: void 0, asChild } : {},
43
+ direction: "column",
44
+ align: "start",
45
+ maxWidth: { md: "600px" },
46
+ className: classes,
47
+ ref: context.scrollRef,
48
+ children
49
+ }
50
+ ) })
51
+ }
52
+ );
53
+ }
54
+ );
55
+ InnerContent.displayName = "InnerContent";
56
+ const Content = React.forwardRef(
57
+ ({ forceMount, ...contentProps }, forwardedRef) => {
58
+ const hasOverlay = React.useContext(components_modal_modalOverlay.OverlayContext);
59
+ if (!hasOverlay)
60
+ return /* @__PURE__ */ jsxRuntime.jsx(components_modal_modalOverlay.Overlay, { forceMount, children: /* @__PURE__ */ jsxRuntime.jsx(InnerContent, { ref: forwardedRef, ...contentProps }) });
61
+ return /* @__PURE__ */ jsxRuntime.jsx(InnerContent, { ref: forwardedRef, ...contentProps });
62
+ }
63
+ );
64
+ Content.displayName = "Content";
65
+ exports.Content = Content;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+ type ContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;
5
+ declare const Content: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ export { Content };
7
+ export type { ContentProps };
@@ -0,0 +1,48 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import * as DrawerPrimitive from "@radix-ui/react-dialog";
4
+ import { Flex } from "../flex/flex.js";
5
+ import clsx from "clsx";
6
+ import { s as styles } from "../../modal.module-DuP4in7f.js";
7
+ import { rootClassName, RootContext } from "./modal-root.js";
8
+ import { OverlayContext, Overlay } from "./modal-overlay.js";
9
+ const InnerContent = React__default.forwardRef(
10
+ function InnerContent2({ asChild, children, className, ...props }, forwardedRef) {
11
+ const classes = clsx([styles[`${rootClassName}__scroll`]], className);
12
+ const context = React__default.useContext(RootContext);
13
+ return /* @__PURE__ */ jsx(
14
+ DrawerPrimitive.Content,
15
+ {
16
+ ...props,
17
+ ref: forwardedRef,
18
+ className: clsx([styles[`${rootClassName}__content`]]),
19
+ asChild: true,
20
+ children: /* @__PURE__ */ jsx(Flex, { children: /* @__PURE__ */ jsx(
21
+ Flex,
22
+ {
23
+ ...asChild ? { as: void 0, asChild } : {},
24
+ direction: "column",
25
+ align: "start",
26
+ maxWidth: { md: "600px" },
27
+ className: classes,
28
+ ref: context.scrollRef,
29
+ children
30
+ }
31
+ ) })
32
+ }
33
+ );
34
+ }
35
+ );
36
+ InnerContent.displayName = "InnerContent";
37
+ const Content = React__default.forwardRef(
38
+ ({ forceMount, ...contentProps }, forwardedRef) => {
39
+ const hasOverlay = React__default.useContext(OverlayContext);
40
+ if (!hasOverlay)
41
+ return /* @__PURE__ */ jsx(Overlay, { forceMount, children: /* @__PURE__ */ jsx(InnerContent, { ref: forwardedRef, ...contentProps }) });
42
+ return /* @__PURE__ */ jsx(InnerContent, { ref: forwardedRef, ...contentProps });
43
+ }
44
+ );
45
+ Content.displayName = "Content";
46
+ export {
47
+ Content
48
+ };
@@ -0,0 +1,26 @@
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 DrawerPrimitive = require("@radix-ui/react-dialog");
6
+ const components_text_text = require("../text/text.cjs");
7
+ function _interopNamespaceDefault(e) {
8
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
9
+ if (e) {
10
+ for (const k in e) {
11
+ if (k !== "default") {
12
+ const d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: () => e[k]
16
+ });
17
+ }
18
+ }
19
+ }
20
+ n.default = e;
21
+ return Object.freeze(n);
22
+ }
23
+ const DrawerPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DrawerPrimitive);
24
+ const Description = React.forwardRef((props, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(DrawerPrimitive__namespace.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(components_text_text.Text, { as: "p", variant: "paragraph-100", ...props, asChild: false, ref: forwardedRef }) }));
25
+ Description.displayName = "Description";
26
+ exports.Description = Description;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { Text } from '../text';
3
+ import { ComponentPropsAs } from '../../utils/component-props-as';
4
+
5
+ type DescriptionProps = ComponentPropsAs<typeof Text, 'p'>;
6
+ declare const Description: React.ForwardRefExoticComponent<DescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
7
+ export { Description };
8
+ export type { DescriptionProps };
@@ -0,0 +1,9 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import * as DrawerPrimitive from "@radix-ui/react-dialog";
4
+ import { Text } from "../text/text.js";
5
+ const Description = React__default.forwardRef((props, forwardedRef) => /* @__PURE__ */ jsx(DrawerPrimitive.Description, { asChild: true, children: /* @__PURE__ */ jsx(Text, { as: "p", variant: "paragraph-100", ...props, asChild: false, ref: forwardedRef }) }));
6
+ Description.displayName = "Description";
7
+ export {
8
+ Description
9
+ };
@@ -0,0 +1,47 @@
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 clsx = require("clsx");
7
+ const modal_module = require("../../modal.module-BfeNqXoN.cjs");
8
+ const components_modal_modalRoot = require("./modal-root.cjs");
9
+ const GroupContext = React.createContext(false);
10
+ const Group = React.forwardRef(
11
+ ({ className, variant, ...props }, forwardedRef) => {
12
+ const strollerRef = React.useContext(components_modal_modalRoot.RootContext).scrollRef;
13
+ const [isOverflowing, setIsOverflowing] = React.useState(false);
14
+ React.useEffect(() => {
15
+ if (strollerRef == null ? void 0 : strollerRef.current) {
16
+ const hasOverflow = strollerRef.current.scrollHeight > strollerRef.current.clientHeight;
17
+ setIsOverflowing(hasOverflow);
18
+ }
19
+ }, [strollerRef]);
20
+ const classes = clsx(
21
+ [modal_module.styles[`${components_modal_modalRoot.rootClassName}__group`]],
22
+ {
23
+ [modal_module.styles[`${components_modal_modalRoot.rootClassName}__group--action`]]: variant === "action",
24
+ [modal_module.styles[`${components_modal_modalRoot.rootClassName}__group--title`]]: variant === "title",
25
+ [modal_module.styles[`${components_modal_modalRoot.rootClassName}__group--scroll`]]: isOverflowing
26
+ },
27
+ className
28
+ );
29
+ return /* @__PURE__ */ jsxRuntime.jsx(GroupContext.Provider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(
30
+ components_flex_flex.Flex,
31
+ {
32
+ ...variant === "action" ? {
33
+ gap: "200",
34
+ justify: { md: "end" },
35
+ align: { sm: "stretch", md: "end" },
36
+ direction: { sm: "column-reverse", md: "row" }
37
+ } : { direction: "column" },
38
+ ref: forwardedRef,
39
+ ...props,
40
+ className: classes
41
+ }
42
+ ) });
43
+ }
44
+ );
45
+ Group.displayName = "Group";
46
+ exports.Group = Group;
47
+ exports.GroupContext = GroupContext;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { Flex } from '../flex';
3
+
4
+ export declare const GroupContext: React.Context<boolean>;
5
+ type GroupProps = React.ComponentPropsWithoutRef<typeof Flex> & {
6
+ variant?: 'title' | 'action';
7
+ };
8
+ declare const Group: React.ForwardRefExoticComponent<GroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ export { Group };
10
+ export type { GroupProps };
@@ -0,0 +1,47 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default, { useEffect } from "react";
3
+ import { Flex } from "../flex/flex.js";
4
+ import clsx from "clsx";
5
+ import { s as styles } from "../../modal.module-DuP4in7f.js";
6
+ import { RootContext, rootClassName } from "./modal-root.js";
7
+ const GroupContext = React__default.createContext(false);
8
+ const Group = React__default.forwardRef(
9
+ ({ className, variant, ...props }, forwardedRef) => {
10
+ const strollerRef = React__default.useContext(RootContext).scrollRef;
11
+ const [isOverflowing, setIsOverflowing] = React__default.useState(false);
12
+ useEffect(() => {
13
+ if (strollerRef == null ? void 0 : strollerRef.current) {
14
+ const hasOverflow = strollerRef.current.scrollHeight > strollerRef.current.clientHeight;
15
+ setIsOverflowing(hasOverflow);
16
+ }
17
+ }, [strollerRef]);
18
+ const classes = clsx(
19
+ [styles[`${rootClassName}__group`]],
20
+ {
21
+ [styles[`${rootClassName}__group--action`]]: variant === "action",
22
+ [styles[`${rootClassName}__group--title`]]: variant === "title",
23
+ [styles[`${rootClassName}__group--scroll`]]: isOverflowing
24
+ },
25
+ className
26
+ );
27
+ return /* @__PURE__ */ jsx(GroupContext.Provider, { value: true, children: /* @__PURE__ */ jsx(
28
+ Flex,
29
+ {
30
+ ...variant === "action" ? {
31
+ gap: "200",
32
+ justify: { md: "end" },
33
+ align: { sm: "stretch", md: "end" },
34
+ direction: { sm: "column-reverse", md: "row" }
35
+ } : { direction: "column" },
36
+ ref: forwardedRef,
37
+ ...props,
38
+ className: classes
39
+ }
40
+ ) });
41
+ }
42
+ );
43
+ Group.displayName = "Group";
44
+ export {
45
+ Group,
46
+ GroupContext
47
+ };
@@ -0,0 +1,17 @@
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 modal_module = require("../../modal.module-BfeNqXoN.cjs");
7
+ const reactSlot = require("@radix-ui/react-slot");
8
+ const utils_composeRefs = require("../../utils/composeRefs.cjs");
9
+ const components_modal_modalRoot = require("./modal-root.cjs");
10
+ const Image = React.forwardRef(({ asChild, ...props }, forwardedRef) => {
11
+ const classes = clsx([modal_module.styles[`${components_modal_modalRoot.rootClassName}__image`]], props.className);
12
+ const context = React.useContext(components_modal_modalRoot.RootContext);
13
+ const Comp = asChild ? reactSlot.Slot : "img";
14
+ return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...props, className: classes, ref: utils_composeRefs.composeRefs(context.imageRef, forwardedRef) });
15
+ });
16
+ Image.displayName = "Image";
17
+ exports.Image = Image;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ type ImageProps = React.ComponentPropsWithoutRef<'img'> & {
4
+ asChild?: boolean;
5
+ };
6
+ declare const Image: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
7
+ asChild?: boolean | undefined;
8
+ } & React.RefAttributes<HTMLImageElement>>;
9
+ export { Image };
10
+ export type { ImageProps };
@@ -0,0 +1,17 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import clsx from "clsx";
4
+ import { s as styles } from "../../modal.module-DuP4in7f.js";
5
+ import { Slot } from "@radix-ui/react-slot";
6
+ import { composeRefs } from "../../utils/composeRefs.js";
7
+ import { rootClassName, RootContext } from "./modal-root.js";
8
+ const Image = React__default.forwardRef(({ asChild, ...props }, forwardedRef) => {
9
+ const classes = clsx([styles[`${rootClassName}__image`]], props.className);
10
+ const context = React__default.useContext(RootContext);
11
+ const Comp = asChild ? Slot : "img";
12
+ return /* @__PURE__ */ jsx(Comp, { ...props, className: classes, ref: composeRefs(context.imageRef, forwardedRef) });
13
+ });
14
+ Image.displayName = "Image";
15
+ export {
16
+ Image
17
+ };
@@ -0,0 +1,35 @@
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 DrawerPrimitive = require("@radix-ui/react-dialog");
6
+ const clsx = require("clsx");
7
+ const modal_module = require("../../modal.module-BfeNqXoN.cjs");
8
+ const components_modal_modalRoot = require("./modal-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 DrawerPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DrawerPrimitive);
26
+ const OverlayContext = React.createContext(false);
27
+ const Overlay = React.forwardRef(
28
+ ({ className, forceMount, container, ...rest }, forwardedRef) => {
29
+ const classes = clsx([modal_module.styles[`${components_modal_modalRoot.rootClassName}__overlay`]], className);
30
+ return /* @__PURE__ */ jsxRuntime.jsx(OverlayContext.Provider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(DrawerPrimitive__namespace.Portal, { container, forceMount, children: /* @__PURE__ */ jsxRuntime.jsx(DrawerPrimitive__namespace.Overlay, { className: classes, ref: forwardedRef, ...rest }) }) });
31
+ }
32
+ );
33
+ Overlay.displayName = "Overlay";
34
+ exports.Overlay = Overlay;
35
+ exports.OverlayContext = OverlayContext;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+ export declare const OverlayContext: React.Context<boolean>;
5
+ type OverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> & {
6
+ container?: React.ComponentProps<typeof DialogPrimitive.Portal>['container'];
7
+ };
8
+ declare const Overlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
9
+ container?: React.ComponentProps<typeof DialogPrimitive.Portal>['container'];
10
+ } & React.RefAttributes<HTMLDivElement>>;
11
+ export { Overlay };
12
+ export type { OverlayProps };
@@ -0,0 +1,18 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import * as DrawerPrimitive from "@radix-ui/react-dialog";
4
+ import clsx from "clsx";
5
+ import { s as styles } from "../../modal.module-DuP4in7f.js";
6
+ import { rootClassName } from "./modal-root.js";
7
+ const OverlayContext = React__default.createContext(false);
8
+ const Overlay = React__default.forwardRef(
9
+ ({ className, forceMount, container, ...rest }, forwardedRef) => {
10
+ const classes = clsx([styles[`${rootClassName}__overlay`]], className);
11
+ return /* @__PURE__ */ jsx(OverlayContext.Provider, { value: true, children: /* @__PURE__ */ jsx(DrawerPrimitive.Portal, { container, forceMount, children: /* @__PURE__ */ jsx(DrawerPrimitive.Overlay, { className: classes, ref: forwardedRef, ...rest }) }) });
12
+ }
13
+ );
14
+ Overlay.displayName = "Overlay";
15
+ export {
16
+ Overlay,
17
+ OverlayContext
18
+ };
@@ -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 DrawerPrimitive = require("@radix-ui/react-dialog");
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 DrawerPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DrawerPrimitive);
23
+ const rootClassName = "teddy-modal";
24
+ const RootContext = React.createContext({
25
+ imageRef: null,
26
+ actionGroupRef: null,
27
+ scrollRef: null
28
+ });
29
+ const Root = (props) => {
30
+ const imageRef = React.useRef(null);
31
+ const actionGroupRef = React.useRef(null);
32
+ const scrollRef = React.useRef(null);
33
+ return /* @__PURE__ */ jsxRuntime.jsx(RootContext.Provider, { value: { imageRef, actionGroupRef, scrollRef }, children: /* @__PURE__ */ jsxRuntime.jsx(DrawerPrimitive__namespace.Root, { ...props, modal: true }) });
34
+ };
35
+ Root.displayName = "Root";
36
+ exports.Root = Root;
37
+ exports.RootContext = RootContext;
38
+ exports.rootClassName = rootClassName;
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { Image } from './modal-image';
3
+ import { Group } from './modal-group';
4
+ import { Flex } from '../flex';
5
+
6
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
7
+ export declare const rootClassName = "teddy-modal";
8
+ export declare const RootContext: React.Context<{
9
+ imageRef: React.RefObject<React.ElementRef<typeof Image>> | null;
10
+ actionGroupRef: React.RefObject<React.ElementRef<typeof Group>> | null;
11
+ scrollRef: React.RefObject<React.ElementRef<typeof Flex>> | null;
12
+ }>;
13
+ type RootProps = Omit<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>, 'modal'>;
14
+ declare const Root: React.FC<RootProps>;
15
+ export { Root };
16
+ export type { RootProps };
@@ -0,0 +1,21 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import * as DrawerPrimitive from "@radix-ui/react-dialog";
4
+ const rootClassName = "teddy-modal";
5
+ const RootContext = React__default.createContext({
6
+ imageRef: null,
7
+ actionGroupRef: null,
8
+ scrollRef: null
9
+ });
10
+ const Root = (props) => {
11
+ const imageRef = React__default.useRef(null);
12
+ const actionGroupRef = React__default.useRef(null);
13
+ const scrollRef = React__default.useRef(null);
14
+ return /* @__PURE__ */ jsx(RootContext.Provider, { value: { imageRef, actionGroupRef, scrollRef }, children: /* @__PURE__ */ jsx(DrawerPrimitive.Root, { ...props, modal: true }) });
15
+ };
16
+ Root.displayName = "Root";
17
+ export {
18
+ Root,
19
+ RootContext,
20
+ rootClassName
21
+ };
@@ -0,0 +1,45 @@
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 DrawerPrimitive = require("@radix-ui/react-dialog");
6
+ const components_heading_heading = require("../heading/heading.cjs");
7
+ const components_modal_modalGroup = require("./modal-group.cjs");
8
+ function _interopNamespaceDefault(e) {
9
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
10
+ if (e) {
11
+ for (const k in e) {
12
+ if (k !== "default") {
13
+ const d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: () => e[k]
17
+ });
18
+ }
19
+ }
20
+ }
21
+ n.default = e;
22
+ return Object.freeze(n);
23
+ }
24
+ const DrawerPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DrawerPrimitive);
25
+ const TitleInner = React.forwardRef(function TitleInner2({ as = "h2", ...props }, forwardedRef) {
26
+ return /* @__PURE__ */ jsxRuntime.jsx(DrawerPrimitive__namespace.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
27
+ components_heading_heading.Heading,
28
+ {
29
+ variant: "title-200",
30
+ ...props,
31
+ ...!props.asChild ? { as, asChild: false } : { as: void 0, asChild: true },
32
+ ref: forwardedRef
33
+ }
34
+ ) });
35
+ });
36
+ TitleInner.displayName = "TitleInner";
37
+ const Title = React.forwardRef((props, forwardedRef) => {
38
+ const isInsideGroup = React.useContext(components_modal_modalGroup.GroupContext);
39
+ if (!isInsideGroup) {
40
+ return /* @__PURE__ */ jsxRuntime.jsx(components_modal_modalGroup.Group, { variant: "title", children: /* @__PURE__ */ jsxRuntime.jsx(TitleInner, { ...props, ref: forwardedRef }) });
41
+ }
42
+ return /* @__PURE__ */ jsxRuntime.jsx(TitleInner, { ...props, ref: forwardedRef });
43
+ });
44
+ Title.displayName = "Title";
45
+ exports.Title = Title;
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ import { HeadingProps } from '../heading';
3
+
4
+ type TitleProps = HeadingProps['Root'];
5
+ declare const Title: React.ForwardRefExoticComponent<({
6
+ enableHyphenation?: boolean | undefined;
7
+ variant?: "title-100" | "title-200" | "title-300" | "title-400" | "title-500" | "title-600" | "title-700" | "subsection-100" | "display-25" | "display-50" | "display-100" | "display-200" | undefined;
8
+ } & import('../../utils/generate-styling/flex').FlexChildren & (import('../../utils/generate-styling/grid').GridChildren & (import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & (import('../../utils/generate-styling/radius').RadiusProps & (import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & (import('../../utils/generate-styling/width').WidthProps & (import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & ({
9
+ display?: import('../../utils/generate-styling').DisplayChildren | undefined;
10
+ } & (({
11
+ asChild: true;
12
+ as?: undefined;
13
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref">) | ({
14
+ as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
15
+ asChild?: false | undefined;
16
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref">)))))))))) & React.RefAttributes<HTMLHeadingElement>>;
17
+ export { Title };
18
+ export type { TitleProps };
@@ -0,0 +1,28 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import * as DrawerPrimitive from "@radix-ui/react-dialog";
4
+ import { Heading } from "../heading/heading.js";
5
+ import { GroupContext, Group } from "./modal-group.js";
6
+ const TitleInner = React__default.forwardRef(function TitleInner2({ as = "h2", ...props }, forwardedRef) {
7
+ return /* @__PURE__ */ jsx(DrawerPrimitive.Title, { asChild: true, children: /* @__PURE__ */ jsx(
8
+ Heading,
9
+ {
10
+ variant: "title-200",
11
+ ...props,
12
+ ...!props.asChild ? { as, asChild: false } : { as: void 0, asChild: true },
13
+ ref: forwardedRef
14
+ }
15
+ ) });
16
+ });
17
+ TitleInner.displayName = "TitleInner";
18
+ const Title = React__default.forwardRef((props, forwardedRef) => {
19
+ const isInsideGroup = React__default.useContext(GroupContext);
20
+ if (!isInsideGroup) {
21
+ return /* @__PURE__ */ jsx(Group, { variant: "title", children: /* @__PURE__ */ jsx(TitleInner, { ...props, ref: forwardedRef }) });
22
+ }
23
+ return /* @__PURE__ */ jsx(TitleInner, { ...props, ref: forwardedRef });
24
+ });
25
+ Title.displayName = "Title";
26
+ export {
27
+ Title
28
+ };
@@ -0,0 +1,27 @@
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 DrawerPrimitive = require("@radix-ui/react-dialog");
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 DrawerPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DrawerPrimitive);
23
+ const Trigger = React.forwardRef(
24
+ ({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(DrawerPrimitive__namespace.Trigger, { ...props, ref: forwardedRef, asChild: true, children })
25
+ );
26
+ Trigger.displayName = "Trigger";
27
+ exports.Trigger = Trigger;
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+ type TriggerProps = Omit<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>, 'asChild' | 'children'> & {
5
+ /**
6
+ * This component requires a `children` prop which should be a `Button` component.
7
+ * The `asChild` prop is set to `true` for the underlying `DialogPrimitive.Trigger`,
8
+ * so the `children` must be a valid React element, specifically a `Button`.
9
+ */
10
+ children: React.ReactElement;
11
+ };
12
+ declare const Trigger: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref">, "children" | "asChild"> & {
13
+ /**
14
+ * This component requires a `children` prop which should be a `Button` component.
15
+ * The `asChild` prop is set to `true` for the underlying `DialogPrimitive.Trigger`,
16
+ * so the `children` must be a valid React element, specifically a `Button`.
17
+ */
18
+ children: React.ReactElement;
19
+ } & React.RefAttributes<HTMLButtonElement>>;
20
+ export { Trigger };
21
+ export type { TriggerProps };
@@ -0,0 +1,10 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import * as DrawerPrimitive from "@radix-ui/react-dialog";
4
+ const Trigger = React__default.forwardRef(
5
+ ({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsx(DrawerPrimitive.Trigger, { ...props, ref: forwardedRef, asChild: true, children })
6
+ );
7
+ Trigger.displayName = "Trigger";
8
+ export {
9
+ Trigger
10
+ };
@@ -1,8 +1,8 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { g } from "../../radio-card-group/radio-card-group-item-title.js";
3
+ import { h } from "../../radio-card-group/radio-card-group-item-title.js";
4
4
  import "./utils.js";
5
5
  import "../../box/box.js";
6
6
  export {
7
- g as DesktopSimplified
7
+ h as DesktopSimplified
8
8
  };