@telia/teddy 0.3.2 → 0.3.4

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 (67) hide show
  1. package/dist/components/drawer/drawer-close.cjs +1 -1
  2. package/dist/components/drawer/drawer-close.js +1 -1
  3. package/dist/components/drawer/drawer-content.cjs +1 -1
  4. package/dist/components/drawer/drawer-content.js +1 -1
  5. package/dist/components/drawer/drawer-description.cjs +1 -1
  6. package/dist/components/drawer/drawer-description.js +1 -1
  7. package/dist/components/drawer/drawer-footer.cjs +1 -1
  8. package/dist/components/drawer/drawer-footer.js +1 -1
  9. package/dist/components/drawer/drawer-overlay.cjs +1 -1
  10. package/dist/components/drawer/drawer-overlay.js +1 -1
  11. package/dist/components/drawer/drawer-title.cjs +1 -1
  12. package/dist/components/drawer/drawer-title.js +1 -1
  13. package/dist/components/modal/index.cjs +8 -0
  14. package/dist/components/modal/index.d.ts +185 -2
  15. package/dist/components/modal/index.js +8 -0
  16. package/dist/components/modal/{modal.cjs → modal-close.cjs} +3 -3
  17. package/dist/components/modal/modal-close.d.ts +19 -0
  18. package/dist/components/modal/{modal.js → modal-close.js} +4 -4
  19. package/dist/components/modal/modal-content.cjs +65 -0
  20. package/dist/components/modal/modal-content.d.ts +7 -0
  21. package/dist/components/modal/modal-content.js +48 -0
  22. package/dist/components/modal/modal-description.cjs +26 -0
  23. package/dist/components/modal/modal-description.d.ts +8 -0
  24. package/dist/components/modal/modal-description.js +9 -0
  25. package/dist/components/modal/modal-group.cjs +47 -0
  26. package/dist/components/modal/modal-group.d.ts +10 -0
  27. package/dist/components/modal/modal-group.js +47 -0
  28. package/dist/components/modal/modal-image.cjs +17 -0
  29. package/dist/components/modal/modal-image.d.ts +10 -0
  30. package/dist/components/modal/modal-image.js +17 -0
  31. package/dist/components/modal/modal-overlay.cjs +35 -0
  32. package/dist/components/modal/modal-overlay.d.ts +12 -0
  33. package/dist/components/modal/modal-overlay.js +18 -0
  34. package/dist/components/modal/modal-root.cjs +38 -0
  35. package/dist/components/modal/modal-root.d.ts +16 -0
  36. package/dist/components/modal/modal-root.js +21 -0
  37. package/dist/components/modal/modal-title.cjs +45 -0
  38. package/dist/components/modal/modal-title.d.ts +18 -0
  39. package/dist/components/modal/modal-title.js +28 -0
  40. package/dist/components/modal/modal-trigger.cjs +27 -0
  41. package/dist/components/modal/modal-trigger.d.ts +21 -0
  42. package/dist/components/modal/modal-trigger.js +10 -0
  43. package/dist/components/navigation-menu/global-navigation/global-navigation-desktop-simplified.js +2 -2
  44. package/dist/components/navigation-menu/global-navigation/global-navigation-mobile-simplified.js +2 -2
  45. package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.js +2 -2
  46. package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.js +2 -2
  47. package/dist/components/navigation-menu/global-navigation/global-navigation-root.js +4 -4
  48. package/dist/components/navigation-menu/global-navigation/global-navigation-search-field.js +2 -2
  49. package/dist/components/navigation-menu/global-navigation/global-navigation-search.js +2 -2
  50. package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.js +2 -2
  51. package/dist/components/notabene/index.cjs +4 -0
  52. package/dist/components/notabene/index.js +4 -0
  53. package/dist/components/notification/index.cjs +6 -0
  54. package/dist/components/notification/index.js +6 -0
  55. package/dist/components/notification/notification-footer.cjs +1 -1
  56. package/dist/components/notification/notification-footer.js +1 -1
  57. package/dist/components/radio-card-group/radio-card-group-item-title.cjs +49 -151
  58. package/dist/components/radio-card-group/radio-card-group-item-title.js +67 -169
  59. package/dist/drawer.module-C4NZoZUc.cjs +15 -0
  60. package/dist/drawer.module-jxIDBwQn.js +16 -0
  61. package/dist/modal.module-BfeNqXoN.cjs +19 -0
  62. package/dist/modal.module-DuP4in7f.js +20 -0
  63. package/dist/style.css +193 -190
  64. package/package.json +1 -1
  65. package/dist/components/modal/modal.d.ts +0 -76
  66. package/dist/drawer.module-Am9xxZYU.js +0 -16
  67. package/dist/drawer.module-CoqKvqzl.cjs +0 -15
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const clsx = require("clsx");
6
6
  const DrawerPrimitive = require("@radix-ui/react-dialog");
7
- const drawer_module = require("../../drawer.module-CoqKvqzl.cjs");
7
+ const drawer_module = require("../../drawer.module-C4NZoZUc.cjs");
8
8
  const components_drawer_drawerRoot = require("./drawer-root.cjs");
9
9
  require("../../assets/sprite.1321fab0-teddy.svg");
10
10
  const components_icon_icon = require("../icon/icon.cjs");
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import React__default from "react";
3
3
  import clsx from "clsx";
4
4
  import * as DrawerPrimitive from "@radix-ui/react-dialog";
5
- import { s as styles } from "../../drawer.module-Am9xxZYU.js";
5
+ import { s as styles } from "../../drawer.module-jxIDBwQn.js";
6
6
  import { rootClassName } from "./drawer-root.js";
7
7
  import "../../assets/sprite.1321fab0-teddy.svg";
8
8
  import { Icon } from "../icon/icon.js";
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const clsx = require("clsx");
6
6
  const DrawerPrimitive = require("@radix-ui/react-dialog");
7
- const drawer_module = require("../../drawer.module-CoqKvqzl.cjs");
7
+ const drawer_module = require("../../drawer.module-C4NZoZUc.cjs");
8
8
  const components_drawer_drawerRoot = require("./drawer-root.cjs");
9
9
  const components_drawer_drawerOverlay = require("./drawer-overlay.cjs");
10
10
  const components_flex_flex = require("../flex/flex.cjs");
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import React__default from "react";
3
3
  import clsx from "clsx";
4
4
  import * as DrawerPrimitive from "@radix-ui/react-dialog";
5
- import { s as styles } from "../../drawer.module-Am9xxZYU.js";
5
+ import { s as styles } from "../../drawer.module-jxIDBwQn.js";
6
6
  import { rootClassName } from "./drawer-root.js";
7
7
  import { OverlayContext, Overlay } from "./drawer-overlay.js";
8
8
  import { Flex } from "../flex/flex.js";
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const clsx = require("clsx");
6
6
  const DrawerPrimitive = require("@radix-ui/react-dialog");
7
- const drawer_module = require("../../drawer.module-CoqKvqzl.cjs");
7
+ const drawer_module = require("../../drawer.module-C4NZoZUc.cjs");
8
8
  const components_drawer_drawerRoot = require("./drawer-root.cjs");
9
9
  const components_text_text = require("../text/text.cjs");
10
10
  function _interopNamespaceDefault(e) {
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import React__default from "react";
3
3
  import clsx from "clsx";
4
4
  import * as DrawerPrimitive from "@radix-ui/react-dialog";
5
- import { s as styles } from "../../drawer.module-Am9xxZYU.js";
5
+ import { s as styles } from "../../drawer.module-jxIDBwQn.js";
6
6
  import { rootClassName } from "./drawer-root.js";
7
7
  import { Text } from "../text/text.js";
8
8
  const DescriptionContext = React__default.createContext(false);
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const clsx = require("clsx");
6
- const drawer_module = require("../../drawer.module-CoqKvqzl.cjs");
6
+ const drawer_module = require("../../drawer.module-C4NZoZUc.cjs");
7
7
  const components_drawer_drawerRoot = require("./drawer-root.cjs");
8
8
  const components_flex_flex = require("../flex/flex.cjs");
9
9
  const Footer = React.forwardRef(
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import React__default from "react";
3
3
  import clsx from "clsx";
4
- import { s as styles } from "../../drawer.module-Am9xxZYU.js";
4
+ import { s as styles } from "../../drawer.module-jxIDBwQn.js";
5
5
  import { rootClassName } from "./drawer-root.js";
6
6
  import { Flex } from "../flex/flex.js";
7
7
  const Footer = React__default.forwardRef(
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const clsx = require("clsx");
6
6
  const DrawerPrimitive = require("@radix-ui/react-dialog");
7
- const drawer_module = require("../../drawer.module-CoqKvqzl.cjs");
7
+ const drawer_module = require("../../drawer.module-C4NZoZUc.cjs");
8
8
  const components_drawer_drawerRoot = require("./drawer-root.cjs");
9
9
  function _interopNamespaceDefault(e) {
10
10
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import React__default from "react";
3
3
  import clsx from "clsx";
4
4
  import * as DrawerPrimitive from "@radix-ui/react-dialog";
5
- import { s as styles } from "../../drawer.module-Am9xxZYU.js";
5
+ import { s as styles } from "../../drawer.module-jxIDBwQn.js";
6
6
  import { rootClassName } from "./drawer-root.js";
7
7
  const OverlayContext = React__default.createContext(false);
8
8
  const Overlay = React__default.forwardRef(
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const clsx = require("clsx");
6
6
  const DrawerPrimitive = require("@radix-ui/react-dialog");
7
- const drawer_module = require("../../drawer.module-CoqKvqzl.cjs");
7
+ const drawer_module = require("../../drawer.module-C4NZoZUc.cjs");
8
8
  const components_drawer_drawerRoot = require("./drawer-root.cjs");
9
9
  const components_heading_heading = require("../heading/heading.cjs");
10
10
  function _interopNamespaceDefault(e) {
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import React__default from "react";
3
3
  import clsx from "clsx";
4
4
  import * as DrawerPrimitive from "@radix-ui/react-dialog";
5
- import { s as styles } from "../../drawer.module-Am9xxZYU.js";
5
+ import { s as styles } from "../../drawer.module-jxIDBwQn.js";
6
6
  import { rootClassName } from "./drawer-root.js";
7
7
  import { Heading } from "../heading/heading.js";
8
8
  const Title = React__default.forwardRef(
@@ -1,4 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ require("./modal-root.cjs");
4
+ require("./modal-trigger.cjs");
5
+ require("./modal-content.cjs");
6
+ require("./modal-title.cjs");
7
+ require("./modal-description.cjs");
8
+ require("./modal-overlay.cjs");
9
+ require("./modal-group.cjs");
3
10
  const components_radioCardGroup_radioCardGroupItemTitle = require("../radio-card-group/radio-card-group-item-title.cjs");
11
+ require("./modal-image.cjs");
4
12
  exports.Modal = components_radioCardGroup_radioCardGroupItemTitle.Modal;
@@ -1,2 +1,185 @@
1
- export { Modal } from './modal';
2
- export type { ModalProps } from './modal';
1
+ import { RootProps } from './modal-root';
2
+ import { Trigger, TriggerProps } from './modal-trigger';
3
+ import { Content, ContentProps } from './modal-content';
4
+ import { Title, TitleProps } from './modal-title';
5
+ import { Description, DescriptionProps } from './modal-description';
6
+ import { Overlay, OverlayProps } from './modal-overlay';
7
+ import { Group, GroupProps } from './modal-group';
8
+ import { Close, CloseProps } from './modal-close';
9
+ import { Image, ImageProps } from './modal-image';
10
+
11
+ type ModalProps = {
12
+ Root: RootProps;
13
+ Trigger: TriggerProps;
14
+ Content: ContentProps;
15
+ Title: TitleProps;
16
+ Description: DescriptionProps;
17
+ Overlay: OverlayProps;
18
+ Group: GroupProps;
19
+ Close: CloseProps;
20
+ Image: ImageProps;
21
+ };
22
+ /**
23
+ * Modal is a dialog that appears on top of the main content and moves the system into a special mode requiring user interaction.
24
+ * It's commonly used for important information that requires immediate attention, or to gather user input without leaving the current page.
25
+ *
26
+ * @component
27
+ *
28
+ * @example
29
+ * // Basic usage
30
+ * <Modal>
31
+ * <Modal.Trigger>
32
+ * <Button variant="primary">Open Modal</Button>
33
+ * </Modal.Trigger>
34
+ * <Modal.Content>
35
+ * <Modal.Title as="h3">Modal Title</Modal.Title>
36
+ * <Modal.Close slot="floating" aria-label="close" />
37
+ * <Modal.Description>Modal content goes here.</Modal.Description>
38
+ * </Modal.Content>
39
+ * </Modal>
40
+ *
41
+ * @example
42
+ * // Advanced usage with action buttons and groups
43
+ * <Modal>
44
+ * <Modal.Trigger>
45
+ * <Button variant="primary">Open Modal</Button>
46
+ * </Modal.Trigger>
47
+ * <Modal.Content>
48
+ * <Modal.Title as="h3">Confirm Action</Modal.Title>
49
+ * <Modal.Close slot="floating" aria-label="close" />
50
+ * <Modal.Description>
51
+ * Are you sure you want to proceed with this action?
52
+ * </Modal.Description>
53
+ * <Modal.Group variant="action">
54
+ * <Button variant="tertiary-purple">Cancel</Button>
55
+ * <Modal.Close slot="content">
56
+ * <Button variant="primary">Confirm</Button>
57
+ * </Modal.Close>
58
+ * </Modal.Group>
59
+ * </Modal.Content>
60
+ * </Modal>
61
+ */
62
+ declare const Modal: import('react').FC<RootProps> & {
63
+ /**
64
+ * Trigger component that opens the modal when clicked.
65
+ * Must be passed a single child component that will be used as the trigger.
66
+ *
67
+ * @component
68
+ *
69
+ * @example
70
+ * <Modal.Trigger>
71
+ * <Button variant="primary">Open Modal</Button>
72
+ * </Modal.Trigger>
73
+ */
74
+ Trigger: typeof Trigger;
75
+ /**
76
+ * Content component that contains the modal's content.
77
+ * Handles the positioning and scrolling behavior of the modal content.
78
+ *
79
+ * @component
80
+ *
81
+ * @example
82
+ * <Modal.Content>
83
+ * <Modal.Title>Title</Modal.Title>
84
+ * <Modal.Description>Content</Modal.Description>
85
+ * </Modal.Content>
86
+ */
87
+ Content: typeof Content;
88
+ /**
89
+ * An accessible title to be announced when the dialog is opened.
90
+ * It will render the internal Heading component
91
+ * If you want to hide the title, wrap it inside our Visually Hidden utility like this <VisuallyHidden asChild>.
92
+ *
93
+ * @component
94
+ *
95
+ * @example
96
+ * <Modal.Title as="h3">Modal Title</Modal.Title>
97
+ */
98
+ Title: typeof Title;
99
+ /**
100
+ * An optional accessible description to be announced when the dialog is opened.
101
+ * This will render the internal Text component with an default p tag
102
+ *
103
+ * If you want to hide the description, wrap it inside our Visually Hidden utility like this <VisuallyHidden asChild>
104
+ *
105
+ * @component
106
+ *
107
+ * @example
108
+ * <Modal.Description>
109
+ * This is the main content of the modal.
110
+ * It can contain multiple paragraphs and other components.
111
+ * </Modal.Description>
112
+ */
113
+ Description: typeof Description;
114
+ /**
115
+ * Overlay component provides the backdrop for the modal.
116
+ * Handles the background dimming and click-outside behavior.
117
+ *
118
+ * @component
119
+ *
120
+ * @example
121
+ * <Modal.Overlay>
122
+ * <Modal.Content>
123
+ * {/* Content will be centered in the overlay *\/}
124
+ * </Modal.Content>
125
+ * </Modal.Overlay>
126
+ */
127
+ Overlay: typeof Overlay;
128
+ /**
129
+ * Group component for organizing content or actions within the modal.
130
+ * Provides layout and styling for grouped content, especially useful for action buttons.
131
+ *
132
+ * @component
133
+ *
134
+ * @example
135
+ * // Action buttons group
136
+ * <Modal.Group variant="action">
137
+ * <Button variant="tertiary-purple">Cancel</Button>
138
+ * <Button variant="primary">Confirm</Button>
139
+ * </Modal.Group>
140
+ *
141
+ * @example
142
+ * // Content group
143
+ * <Modal.Group>
144
+ * <Modal.Description>First section</Modal.Description>
145
+ * <div>Second section</div>
146
+ * </Modal.Group>
147
+ */
148
+ Group: typeof Group;
149
+ /**
150
+ * Close component provides a button to close the modal.
151
+ * Can be used either as a floating close button or within content.
152
+ *
153
+ * @component
154
+ *
155
+ * @example
156
+ * // Floating close button
157
+ * <Modal.Close slot="floating" aria-label="Lukk" />
158
+ *
159
+ * @example
160
+ * // Close button within content
161
+ * <Modal.Close slot="content">
162
+ * <Button variant="primary">Done</Button>
163
+ * </Modal.Close>
164
+ */
165
+ Close: typeof Close;
166
+ /**
167
+ * Image component displays an image in the modal.
168
+ * Handles proper sizing and positioning of images within the modal.
169
+ *
170
+ * @component
171
+ *
172
+ * @example
173
+ * // Basic image
174
+ * <Modal.Image src="/path/to/image.jpg" alt="Description" />
175
+ *
176
+ * @example
177
+ * // Custom image component
178
+ * <Modal.Image asChild>
179
+ * <img src="/path/to/image.jpg" alt="Description" />
180
+ * </Modal.Image>
181
+ */
182
+ Image: typeof Image;
183
+ };
184
+ export { Modal };
185
+ export type { ModalProps };
@@ -1,4 +1,12 @@
1
+ import "./modal-root.js";
2
+ import "./modal-trigger.js";
3
+ import "./modal-content.js";
4
+ import "./modal-title.js";
5
+ import "./modal-description.js";
6
+ import "./modal-overlay.js";
7
+ import "./modal-group.js";
1
8
  import { M } from "../radio-card-group/radio-card-group-item-title.js";
9
+ import "./modal-image.js";
2
10
  export {
3
11
  M as Modal
4
12
  };
@@ -54,6 +54,6 @@ require("../text-spacing/text-spacing.cjs");
54
54
  require("../container/container.cjs");
55
55
  require("../carousel/carousel-root.cjs");
56
56
  require("../slider/slider.cjs");
57
- require("@radix-ui/react-slot");
58
- require("../../utils/composeRefs.cjs");
59
- exports.Modal = components_radioCardGroup_radioCardGroupItemTitle.Modal;
57
+ require("../../modal.module-BfeNqXoN.cjs");
58
+ require("./modal-root.cjs");
59
+ exports.Close = components_radioCardGroup_radioCardGroupItemTitle.Close;
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+ type CloseProps = Omit<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>, 'asChild' | 'children'> & ({
5
+ children: React.ReactElement;
6
+ slot: 'content';
7
+ } | {
8
+ /**
9
+ * Accessibility purposes, providing a label for screen readers
10
+ *
11
+ * @default 'Lukk'
12
+ */
13
+ ['aria-label']?: string;
14
+ slot: 'floating';
15
+ children?: never;
16
+ });
17
+ declare const Close: React.ForwardRefExoticComponent<CloseProps & React.RefAttributes<HTMLButtonElement>>;
18
+ export { Close };
19
+ export type { CloseProps };
@@ -10,7 +10,7 @@ import "../toast/toast-root.js";
10
10
  import "sonner";
11
11
  import "../toggletip/index.js";
12
12
  import "../breadcrumbs/index.js";
13
- import { M } from "../radio-card-group/radio-card-group-item-title.js";
13
+ import { b } from "../radio-card-group/radio-card-group-item-title.js";
14
14
  import "../ribbon/index.js";
15
15
  import "../expandable-card/index.js";
16
16
  import "../color-dot/color-dot-root.js";
@@ -52,8 +52,8 @@ import "../text-spacing/text-spacing.js";
52
52
  import "../container/container.js";
53
53
  import "../carousel/carousel-root.js";
54
54
  import "../slider/slider.js";
55
- import "@radix-ui/react-slot";
56
- import "../../utils/composeRefs.js";
55
+ import "../../modal.module-DuP4in7f.js";
56
+ import "./modal-root.js";
57
57
  export {
58
- M as Modal
58
+ b as Close
59
59
  };
@@ -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 };