@telia/teddy 0.0.25 → 0.0.26

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 (36) hide show
  1. package/dist/components/accordion/accordion-root.cjs +11 -11
  2. package/dist/components/accordion/accordion-root.js +11 -11
  3. package/dist/components/drawer/drawer-close.cjs +1 -1
  4. package/dist/components/drawer/drawer-close.d.ts +0 -3
  5. package/dist/components/drawer/drawer-close.js +1 -1
  6. package/dist/components/drawer/drawer-content.cjs +1 -1
  7. package/dist/components/drawer/drawer-content.d.ts +0 -3
  8. package/dist/components/drawer/drawer-content.js +1 -1
  9. package/dist/components/drawer/drawer-description.cjs +1 -1
  10. package/dist/components/drawer/drawer-description.d.ts +0 -3
  11. package/dist/components/drawer/drawer-description.js +1 -1
  12. package/dist/components/drawer/drawer-footer.cjs +1 -1
  13. package/dist/components/drawer/drawer-footer.d.ts +0 -3
  14. package/dist/components/drawer/drawer-footer.js +1 -1
  15. package/dist/components/drawer/drawer-overlay.cjs +1 -1
  16. package/dist/components/drawer/drawer-overlay.d.ts +0 -3
  17. package/dist/components/drawer/drawer-overlay.js +1 -1
  18. package/dist/components/drawer/drawer-root.d.ts +1 -1
  19. package/dist/components/drawer/drawer-title.cjs +1 -1
  20. package/dist/components/drawer/drawer-title.d.ts +4 -3
  21. package/dist/components/drawer/drawer-title.js +1 -1
  22. package/dist/components/drawer/drawer-trigger.d.ts +5 -3
  23. package/dist/components/drawer/index.cjs +8 -0
  24. package/dist/components/drawer/index.d.ts +28 -0
  25. package/dist/components/drawer/index.js +8 -0
  26. package/dist/components/modal/modal.cjs +15 -14
  27. package/dist/components/modal/modal.js +15 -14
  28. package/dist/components/navigation-menu/navigation-menu.cjs +24 -22
  29. package/dist/components/navigation-menu/navigation-menu.d.ts +2 -0
  30. package/dist/components/navigation-menu/navigation-menu.js +24 -22
  31. package/dist/drawer.module-BxsrDZFu.js +14 -0
  32. package/dist/drawer.module-CWDhohQm.cjs +13 -0
  33. package/dist/style.css +227 -208
  34. package/package.json +1 -1
  35. package/dist/drawer.module-B3QhrxH1.js +0 -14
  36. package/dist/drawer.module-w9nGK9pO.cjs +0 -13
@@ -21,18 +21,18 @@ function _interopNamespaceDefault(e) {
21
21
  return Object.freeze(n);
22
22
  }
23
23
  const AccordionPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(AccordionPrimitive);
24
- const slideDown = "_slideDown_1seck_1";
25
- const slideUp = "_slideUp_1seck_1";
24
+ const slideDown = "_slideDown_1oe24_1";
25
+ const slideUp = "_slideUp_1oe24_1";
26
26
  const styles = {
27
- "teddy-accordion--indented": "_teddy-accordion--indented_1seck_3",
28
- "teddy-accordion__header": "_teddy-accordion__header_1seck_3",
29
- "teddy-accordion__content": "_teddy-accordion__content_1seck_11",
30
- "teddy-accordion--negative": "_teddy-accordion--negative_1seck_19",
31
- "teddy-accordion__title": "_teddy-accordion__title_1seck_23",
32
- "teddy-accordion__trigger": "_teddy-accordion__trigger_1seck_26",
33
- "teddy-accordion__item": "_teddy-accordion__item_1seck_34",
34
- "teddy-accordion": "_teddy-accordion_1seck_3",
35
- "teddy-accordion__indicator": "_teddy-accordion__indicator_1seck_103",
27
+ "teddy-accordion--indented": "_teddy-accordion--indented_1oe24_3",
28
+ "teddy-accordion__header": "_teddy-accordion__header_1oe24_3",
29
+ "teddy-accordion__content": "_teddy-accordion__content_1oe24_11",
30
+ "teddy-accordion--negative": "_teddy-accordion--negative_1oe24_19",
31
+ "teddy-accordion__title": "_teddy-accordion__title_1oe24_23",
32
+ "teddy-accordion__trigger": "_teddy-accordion__trigger_1oe24_26",
33
+ "teddy-accordion__item": "_teddy-accordion__item_1oe24_34",
34
+ "teddy-accordion": "_teddy-accordion_1oe24_3",
35
+ "teddy-accordion__indicator": "_teddy-accordion__indicator_1oe24_103",
36
36
  slideDown,
37
37
  slideUp
38
38
  };
@@ -2,18 +2,18 @@ import { jsx } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
3
  import React__default from "react";
4
4
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
5
- const slideDown = "_slideDown_1seck_1";
6
- const slideUp = "_slideUp_1seck_1";
5
+ const slideDown = "_slideDown_1oe24_1";
6
+ const slideUp = "_slideUp_1oe24_1";
7
7
  const styles = {
8
- "teddy-accordion--indented": "_teddy-accordion--indented_1seck_3",
9
- "teddy-accordion__header": "_teddy-accordion__header_1seck_3",
10
- "teddy-accordion__content": "_teddy-accordion__content_1seck_11",
11
- "teddy-accordion--negative": "_teddy-accordion--negative_1seck_19",
12
- "teddy-accordion__title": "_teddy-accordion__title_1seck_23",
13
- "teddy-accordion__trigger": "_teddy-accordion__trigger_1seck_26",
14
- "teddy-accordion__item": "_teddy-accordion__item_1seck_34",
15
- "teddy-accordion": "_teddy-accordion_1seck_3",
16
- "teddy-accordion__indicator": "_teddy-accordion__indicator_1seck_103",
8
+ "teddy-accordion--indented": "_teddy-accordion--indented_1oe24_3",
9
+ "teddy-accordion__header": "_teddy-accordion__header_1oe24_3",
10
+ "teddy-accordion__content": "_teddy-accordion__content_1oe24_11",
11
+ "teddy-accordion--negative": "_teddy-accordion--negative_1oe24_19",
12
+ "teddy-accordion__title": "_teddy-accordion__title_1oe24_23",
13
+ "teddy-accordion__trigger": "_teddy-accordion__trigger_1oe24_26",
14
+ "teddy-accordion__item": "_teddy-accordion__item_1oe24_34",
15
+ "teddy-accordion": "_teddy-accordion_1oe24_3",
16
+ "teddy-accordion__indicator": "_teddy-accordion__indicator_1oe24_103",
17
17
  slideDown,
18
18
  slideUp
19
19
  };
@@ -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-w9nGK9pO.cjs");
7
+ const drawer_module = require("../../drawer.module-CWDhohQm.cjs");
8
8
  const components_drawer_drawerRoot = require("./drawer-root.cjs");
9
9
  require("../../assets/sprite.5636ec8e-teddy.svg");
10
10
  const components_icon_icon = require("../icon/icon.cjs");
@@ -1,9 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  import * as DrawerPrimitive from '@radix-ui/react-dialog';
4
- /** -------------------------------------------------------------------------------------------------
5
- * Close
6
- * -----------------------------------------------------------------------------------------------*/
7
4
  export type CloseProps = Omit<React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close>, 'asChild' | 'children'> & ({
8
5
  children: React.ReactElement;
9
6
  slot: 'content';
@@ -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-B3QhrxH1.js";
5
+ import { s as styles } from "../../drawer.module-BxsrDZFu.js";
6
6
  import { rootClassName } from "./drawer-root.js";
7
7
  import "../../assets/sprite.5636ec8e-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-w9nGK9pO.cjs");
7
+ const drawer_module = require("../../drawer.module-CWDhohQm.cjs");
8
8
  const components_drawer_drawerRoot = require("./drawer-root.cjs");
9
9
  const components_drawer_drawerOverlay = require("./drawer-overlay.cjs");
10
10
  function _interopNamespaceDefault(e) {
@@ -1,9 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  import * as DrawerPrimitive from '@radix-ui/react-dialog';
4
- /** -------------------------------------------------------------------------------------------------
5
- * Content
6
- * -----------------------------------------------------------------------------------------------*/
7
4
  export type ContentProps = Omit<React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>, 'forceMount' | 'onOpenAutoFocus' | 'onCloseAutoFocus' | 'onEscapeKeyDown' | 'onPointerDownOutside' | 'onInteractOutside'> & {
8
5
  forceMount?: DrawerPrimitive.DialogContentProps['forceMount'];
9
6
  onOpenAutoFocus?: DrawerPrimitive.DialogContentProps['onOpenAutoFocus'];
@@ -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-B3QhrxH1.js";
5
+ import { s as styles } from "../../drawer.module-BxsrDZFu.js";
6
6
  import { rootClassName } from "./drawer-root.js";
7
7
  import { OverlayContext, Overlay } from "./drawer-overlay.js";
8
8
  const InnerContent = 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-w9nGK9pO.cjs");
7
+ const drawer_module = require("../../drawer.module-CWDhohQm.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) {
@@ -1,9 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  import * as DrawerPrimitive from '@radix-ui/react-dialog';
4
- /** -------------------------------------------------------------------------------------------------
5
- * Description
6
- * -----------------------------------------------------------------------------------------------*/
7
4
  export declare const DescriptionContext: React.Context<boolean>;
8
5
  export type DescriptionProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>;
9
6
  export declare const Description: React.ForwardRefExoticComponent<Omit<DrawerPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
@@ -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-B3QhrxH1.js";
5
+ import { s as styles } from "../../drawer.module-BxsrDZFu.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-w9nGK9pO.cjs");
6
+ const drawer_module = require("../../drawer.module-CWDhohQm.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,8 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { Flex } from '../flex';
3
3
 
4
- /** -------------------------------------------------------------------------------------------------
5
- * Footer
6
- * -----------------------------------------------------------------------------------------------*/
7
4
  export type FooterProps = React.ComponentPropsWithoutRef<typeof Flex>;
8
5
  export declare const Footer: React.ForwardRefExoticComponent<FooterProps & React.RefAttributes<HTMLDivElement>>;
@@ -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-B3QhrxH1.js";
4
+ import { s as styles } from "../../drawer.module-BxsrDZFu.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-w9nGK9pO.cjs");
7
+ const drawer_module = require("../../drawer.module-CWDhohQm.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" } });
@@ -1,9 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  import * as DrawerPrimitive from '@radix-ui/react-dialog';
4
- /** -------------------------------------------------------------------------------------------------
5
- * Overlay
6
- * -----------------------------------------------------------------------------------------------*/
7
4
  export declare const OverlayContext: React.Context<boolean>;
8
5
  export type OverlayProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay> & {
9
6
  container?: React.ComponentProps<typeof DrawerPrimitive.Portal>['container'];
@@ -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-B3QhrxH1.js";
5
+ import { s as styles } from "../../drawer.module-BxsrDZFu.js";
6
6
  import { rootClassName } from "./drawer-root.js";
7
7
  const OverlayContext = React__default.createContext(false);
8
8
  const Overlay = React__default.forwardRef(
@@ -20,7 +20,7 @@ export type RootProps = Omit<React.ComponentPropsWithoutRef<typeof DrawerPrimiti
20
20
  */
21
21
  modal?: DrawerPrimitive.DialogProps['modal'];
22
22
  };
23
- export declare function Root(props: RootProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function Root(props: RootProps): JSX.Element;
24
24
  export declare namespace Root {
25
25
  var displayName: string;
26
26
  }
@@ -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-w9nGK9pO.cjs");
7
+ const drawer_module = require("../../drawer.module-CWDhohQm.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,8 +2,9 @@ import { default as React } from 'react';
2
2
  import { Heading } from '../heading';
3
3
 
4
4
  import * as DrawerPrimitive from '@radix-ui/react-dialog';
5
- /** -------------------------------------------------------------------------------------------------
6
- * Title
7
- * -----------------------------------------------------------------------------------------------*/
8
5
  export type TitleProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title> & React.ComponentPropsWithoutRef<typeof Heading>;
6
+ /**
7
+ * The title of the drawer.
8
+ * The tag is an `h2` by default, but can be changed with the `as` prop.
9
+ */
9
10
  export declare const Title: React.ForwardRefExoticComponent<TitleProps & React.RefAttributes<HTMLHeadingElement>>;
@@ -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-B3QhrxH1.js";
5
+ import { s as styles } from "../../drawer.module-BxsrDZFu.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,12 +1,14 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  import * as DrawerPrimitive from '@radix-ui/react-dialog';
4
- /** -------------------------------------------------------------------------------------------------
5
- * Trigger
6
- * -----------------------------------------------------------------------------------------------*/
7
4
  export type TriggerProps = Omit<React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>, 'asChild' | 'children'> & {
8
5
  children: React.ReactElement;
9
6
  };
7
+ /**
8
+ * The trigger for the drawer.
9
+ * The children of this component will be used as the trigger.
10
+ * Normally a plain `<button>`.
11
+ */
10
12
  export declare const Trigger: React.ForwardRefExoticComponent<Omit<Omit<DrawerPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref">, "children" | "asChild"> & {
11
13
  children: React.ReactElement;
12
14
  } & React.RefAttributes<HTMLButtonElement>>;
@@ -8,6 +8,14 @@ const components_drawer_drawerOverlay = require("./drawer-overlay.cjs");
8
8
  const components_drawer_drawerRoot = require("./drawer-root.cjs");
9
9
  const components_drawer_drawerTitle = require("./drawer-title.cjs");
10
10
  const components_drawer_drawerTrigger = require("./drawer-trigger.cjs");
11
+ components_drawer_drawerClose.Close.displayName = "Drawer.Close";
12
+ components_drawer_drawerContent.Content.displayName = "Drawer.Content";
13
+ components_drawer_drawerDescription.Description.displayName = "Drawer.Description";
14
+ components_drawer_drawerFooter.Footer.displayName = "Drawer.Footer";
15
+ components_drawer_drawerOverlay.Overlay.displayName = "Drawer.Overlay";
16
+ components_drawer_drawerRoot.Root.displayName = "Drawer";
17
+ components_drawer_drawerTitle.Title.displayName = "Drawer.Title";
18
+ components_drawer_drawerTrigger.Trigger.displayName = "Drawer.Trigger";
11
19
  const Drawer = Object.assign(components_drawer_drawerRoot.Root, {
12
20
  Title: components_drawer_drawerTitle.Title,
13
21
  Description: components_drawer_drawerDescription.Description,
@@ -0,0 +1,28 @@
1
+ import { Close, CloseProps } from './drawer-close';
2
+ import { Content, ContentProps } from './drawer-content';
3
+ import { Description, DescriptionProps } from './drawer-description';
4
+ import { Footer, FooterProps } from './drawer-footer';
5
+ import { Overlay, OverlayProps } from './drawer-overlay';
6
+ import { Root, RootProps } from './drawer-root';
7
+ import { Title, TitleProps } from './drawer-title';
8
+ import { Trigger, TriggerProps } from './drawer-trigger';
9
+
10
+ export declare const Drawer: typeof Root & {
11
+ Title: typeof Title;
12
+ Description: typeof Description;
13
+ Trigger: typeof Trigger;
14
+ Overlay: typeof Overlay;
15
+ Content: typeof Content;
16
+ Footer: typeof Footer;
17
+ Close: typeof Close;
18
+ };
19
+ export type DrawerProps = {
20
+ Root: RootProps;
21
+ Title: TitleProps;
22
+ Description: DescriptionProps;
23
+ Trigger: TriggerProps;
24
+ Overlay: OverlayProps;
25
+ Content: ContentProps;
26
+ Footer: FooterProps;
27
+ Close: CloseProps;
28
+ };
@@ -6,6 +6,14 @@ import { Overlay } from "./drawer-overlay.js";
6
6
  import { Root } from "./drawer-root.js";
7
7
  import { Title } from "./drawer-title.js";
8
8
  import { Trigger } from "./drawer-trigger.js";
9
+ Close.displayName = "Drawer.Close";
10
+ Content.displayName = "Drawer.Content";
11
+ Description.displayName = "Drawer.Description";
12
+ Footer.displayName = "Drawer.Footer";
13
+ Overlay.displayName = "Drawer.Overlay";
14
+ Root.displayName = "Drawer";
15
+ Title.displayName = "Drawer.Title";
16
+ Trigger.displayName = "Drawer.Trigger";
9
17
  const Drawer = Object.assign(Root, {
10
18
  Title,
11
19
  Description,
@@ -53,20 +53,21 @@ function _interopNamespaceDefault(e) {
53
53
  }
54
54
  const DrawerPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DrawerPrimitive);
55
55
  const styles = {
56
- "teddy-modal__overlay": "_teddy-modal__overlay_vfo5b_17",
57
- "teddy-modal__content": "_teddy-modal__content_vfo5b_29",
58
- "teddy-modal__scroll": "_teddy-modal__scroll_vfo5b_47",
59
- "teddy-modal__image": "_teddy-modal__image_vfo5b_51",
60
- "teddy-modal__close--floating": "_teddy-modal__close--floating_vfo5b_61",
61
- "teddy-modal__group": "_teddy-modal__group_vfo5b_66",
62
- "teddy-modal__group--title": "_teddy-modal__group--title_vfo5b_70",
63
- "teddy-modal__group--scroll": "_teddy-modal__group--scroll_vfo5b_76",
64
- "teddy-modal__group--action": "_teddy-modal__group--action_vfo5b_85",
65
- "modal-overlay-no-op": "_modal-overlay-no-op_vfo5b_1",
66
- "teddy-fade-in": "_teddy-fade-in_vfo5b_1",
67
- "teddy-fade-out": "_teddy-fade-out_vfo5b_1",
68
- "modal-content-show": "_modal-content-show_vfo5b_1",
69
- "modal-content-hide": "_modal-content-hide_vfo5b_1"
56
+ "teddy-modal__overlay": "_teddy-modal__overlay_3n21u_25",
57
+ "teddy-modal__content": "_teddy-modal__content_3n21u_37",
58
+ "teddy-modal__scroll": "_teddy-modal__scroll_3n21u_55",
59
+ "teddy-modal__image": "_teddy-modal__image_3n21u_59",
60
+ "teddy-modal__close--floating": "_teddy-modal__close--floating_3n21u_69",
61
+ "teddy-modal__group": "_teddy-modal__group_3n21u_74",
62
+ "teddy-modal__group--title": "_teddy-modal__group--title_3n21u_78",
63
+ "teddy-modal__group--scroll": "_teddy-modal__group--scroll_3n21u_84",
64
+ "teddy-modal__group--action": "_teddy-modal__group--action_3n21u_93",
65
+ "modal-overlay-no-op": "_modal-overlay-no-op_3n21u_1",
66
+ "teddy-fade-in": "_teddy-fade-in_3n21u_1",
67
+ "teddy-fade-out": "_teddy-fade-out_3n21u_1",
68
+ "modal-content-show": "_modal-content-show_3n21u_1",
69
+ "modal-content-hide": "_modal-content-hide_3n21u_1",
70
+ "teddy-overlay-no-op": "_teddy-overlay-no-op_3n21u_1"
70
71
  };
71
72
  const rootClassName = "teddy-modal";
72
73
  const RootContext = React.createContext({
@@ -34,20 +34,21 @@ import clsx from "clsx";
34
34
  import { Slot } from "@radix-ui/react-slot";
35
35
  import { composeRefs } from "../../utils/composeRefs.js";
36
36
  const styles = {
37
- "teddy-modal__overlay": "_teddy-modal__overlay_vfo5b_17",
38
- "teddy-modal__content": "_teddy-modal__content_vfo5b_29",
39
- "teddy-modal__scroll": "_teddy-modal__scroll_vfo5b_47",
40
- "teddy-modal__image": "_teddy-modal__image_vfo5b_51",
41
- "teddy-modal__close--floating": "_teddy-modal__close--floating_vfo5b_61",
42
- "teddy-modal__group": "_teddy-modal__group_vfo5b_66",
43
- "teddy-modal__group--title": "_teddy-modal__group--title_vfo5b_70",
44
- "teddy-modal__group--scroll": "_teddy-modal__group--scroll_vfo5b_76",
45
- "teddy-modal__group--action": "_teddy-modal__group--action_vfo5b_85",
46
- "modal-overlay-no-op": "_modal-overlay-no-op_vfo5b_1",
47
- "teddy-fade-in": "_teddy-fade-in_vfo5b_1",
48
- "teddy-fade-out": "_teddy-fade-out_vfo5b_1",
49
- "modal-content-show": "_modal-content-show_vfo5b_1",
50
- "modal-content-hide": "_modal-content-hide_vfo5b_1"
37
+ "teddy-modal__overlay": "_teddy-modal__overlay_3n21u_25",
38
+ "teddy-modal__content": "_teddy-modal__content_3n21u_37",
39
+ "teddy-modal__scroll": "_teddy-modal__scroll_3n21u_55",
40
+ "teddy-modal__image": "_teddy-modal__image_3n21u_59",
41
+ "teddy-modal__close--floating": "_teddy-modal__close--floating_3n21u_69",
42
+ "teddy-modal__group": "_teddy-modal__group_3n21u_74",
43
+ "teddy-modal__group--title": "_teddy-modal__group--title_3n21u_78",
44
+ "teddy-modal__group--scroll": "_teddy-modal__group--scroll_3n21u_84",
45
+ "teddy-modal__group--action": "_teddy-modal__group--action_3n21u_93",
46
+ "modal-overlay-no-op": "_modal-overlay-no-op_3n21u_1",
47
+ "teddy-fade-in": "_teddy-fade-in_3n21u_1",
48
+ "teddy-fade-out": "_teddy-fade-out_3n21u_1",
49
+ "modal-content-show": "_modal-content-show_3n21u_1",
50
+ "modal-content-hide": "_modal-content-hide_3n21u_1",
51
+ "teddy-overlay-no-op": "_teddy-overlay-no-op_3n21u_1"
51
52
  };
52
53
  const rootClassName = "teddy-modal";
53
54
  const RootContext = React__default.createContext({
@@ -7,6 +7,7 @@ const NavigationMenuPrimitive = require("@radix-ui/react-navigation-menu");
7
7
  const utils_composeRefs = require("../../utils/composeRefs.cjs");
8
8
  const components_visuallyHidden_visuallyHidden = require("../visually-hidden/visually-hidden.cjs");
9
9
  const utils_composeEventHandlers = require("../../utils/composeEventHandlers.cjs");
10
+ const reactSlot = require("@radix-ui/react-slot");
10
11
  function _interopNamespaceDefault(e) {
11
12
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
12
13
  if (e) {
@@ -24,31 +25,31 @@ function _interopNamespaceDefault(e) {
24
25
  return Object.freeze(n);
25
26
  }
26
27
  const NavigationMenuPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(NavigationMenuPrimitive);
27
- const enterFromLeft = "_enterFromLeft_139wf_1";
28
- const enterFromRight = "_enterFromRight_139wf_1";
29
- const exitToLeft = "_exitToLeft_139wf_1";
30
- const exitToRight = "_exitToRight_139wf_1";
31
- const scaleIn = "_scaleIn_139wf_1";
32
- const scaleOut = "_scaleOut_139wf_1";
28
+ const enterFromLeft = "_enterFromLeft_959s3_1";
29
+ const enterFromRight = "_enterFromRight_959s3_1";
30
+ const exitToLeft = "_exitToLeft_959s3_1";
31
+ const exitToRight = "_exitToRight_959s3_1";
32
+ const scaleIn = "_scaleIn_959s3_1";
33
+ const scaleOut = "_scaleOut_959s3_1";
33
34
  const styles = {
34
- "teddy-navigation-menu": "_teddy-navigation-menu_139wf_1",
35
- "teddy-navigation-menu__viewport": "_teddy-navigation-menu__viewport_139wf_33",
36
- "teddy-navigation-menu__list": "_teddy-navigation-menu__list_139wf_36",
37
- "teddy-navigation-menu__top-menu-list": "_teddy-navigation-menu__top-menu-list_139wf_55",
38
- "teddy-navigation-menu__top-menu-trigger": "_teddy-navigation-menu__top-menu-trigger_139wf_75",
39
- "teddy-navigation-menu__top-menu-trigger--small": "_teddy-navigation-menu__top-menu-trigger--small_139wf_93",
40
- "teddy-navigation-menu__top-menu-trigger--button": "_teddy-navigation-menu__top-menu-trigger--button_139wf_98",
41
- "teddy-navigation-menu__content": "_teddy-navigation-menu__content_139wf_163",
35
+ "teddy-navigation-menu": "_teddy-navigation-menu_959s3_1",
36
+ "teddy-navigation-menu__viewport": "_teddy-navigation-menu__viewport_959s3_33",
37
+ "teddy-navigation-menu__list": "_teddy-navigation-menu__list_959s3_36",
38
+ "teddy-navigation-menu__top-menu-list": "_teddy-navigation-menu__top-menu-list_959s3_55",
39
+ "teddy-navigation-menu__top-menu-trigger": "_teddy-navigation-menu__top-menu-trigger_959s3_75",
40
+ "teddy-navigation-menu__top-menu-trigger--small": "_teddy-navigation-menu__top-menu-trigger--small_959s3_92",
41
+ "teddy-navigation-menu__top-menu-trigger--button": "_teddy-navigation-menu__top-menu-trigger--button_959s3_97",
42
+ "teddy-navigation-menu__content": "_teddy-navigation-menu__content_959s3_169",
42
43
  enterFromLeft,
43
44
  enterFromRight,
44
45
  exitToLeft,
45
46
  exitToRight,
46
- "teddy-navigation-menu__trigger": "_teddy-navigation-menu__trigger_139wf_208",
47
- "teddy-navigation-menu__trigger--small": "_teddy-navigation-menu__trigger--small_139wf_226",
48
- "teddy-navigation-menu__trigger--button": "_teddy-navigation-menu__trigger--button_139wf_231",
49
- "teddy-navigation-menu__link": "_teddy-navigation-menu__link_139wf_296",
50
- "teddy-navigation-menu__link--small": "_teddy-navigation-menu__link--small_139wf_314",
51
- "teddy-navigation-menu__link--button": "_teddy-navigation-menu__link--button_139wf_319",
47
+ "teddy-navigation-menu__trigger": "_teddy-navigation-menu__trigger_959s3_213",
48
+ "teddy-navigation-menu__trigger--small": "_teddy-navigation-menu__trigger--small_959s3_231",
49
+ "teddy-navigation-menu__trigger--button": "_teddy-navigation-menu__trigger--button_959s3_236",
50
+ "teddy-navigation-menu__link": "_teddy-navigation-menu__link_959s3_301",
51
+ "teddy-navigation-menu__link--small": "_teddy-navigation-menu__link--small_959s3_319",
52
+ "teddy-navigation-menu__link--button": "_teddy-navigation-menu__link--button_959s3_324",
52
53
  scaleIn,
53
54
  scaleOut
54
55
  };
@@ -133,18 +134,19 @@ const TopMenuItem = React.forwardRef(
133
134
  }
134
135
  );
135
136
  const TopMenuTrigger = React.forwardRef(
136
- ({ className, active, ...props }, forwardRef) => {
137
+ ({ className, asChild, active, ...props }, forwardRef) => {
137
138
  const classes = clsx(
138
139
  [styles[`${rootClassName}__top-menu-trigger`], styles[`${rootClassName}__top-menu-trigger--small`]],
139
140
  className
140
141
  );
142
+ const Comp = asChild ? reactSlot.Slot : "button";
141
143
  const context = React.useContext(NavigationMenuContext);
142
144
  const innerRef = React.useRef(null);
143
145
  const ref = utils_composeRefs.useComposedRefs(innerRef, forwardRef);
144
146
  const isOpen = context.selectedTopMenu === props.value;
145
147
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
146
148
  /* @__PURE__ */ jsxRuntime.jsx(
147
- "button",
149
+ Comp,
148
150
  {
149
151
  ...props,
150
152
  ref,
@@ -24,6 +24,7 @@ type TopMenuItemProps = React.ComponentPropsWithoutRef<'li'>;
24
24
  type TopMenuTriggerProps = React.ComponentPropsWithoutRef<'button'> & {
25
25
  value: string;
26
26
  active?: boolean;
27
+ asChild?: boolean;
27
28
  };
28
29
  /** -------------------------------------------------------------------------------------------------
29
30
  * NavigationMenuList
@@ -110,6 +111,7 @@ declare const NavigationMenu: React.ForwardRefExoticComponent<Omit<NavigationMen
110
111
  TopMenuTrigger: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
111
112
  value: string;
112
113
  active?: boolean | undefined;
114
+ asChild?: boolean | undefined;
113
115
  } & React.RefAttributes<HTMLButtonElement>>;
114
116
  };
115
117
  type NavigationMenuProps = {
@@ -5,31 +5,32 @@ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
5
5
  import { useComposedRefs } from "../../utils/composeRefs.js";
6
6
  import { VisuallyHidden } from "../visually-hidden/visually-hidden.js";
7
7
  import { composeEventHandlers } from "../../utils/composeEventHandlers.js";
8
- const enterFromLeft = "_enterFromLeft_139wf_1";
9
- const enterFromRight = "_enterFromRight_139wf_1";
10
- const exitToLeft = "_exitToLeft_139wf_1";
11
- const exitToRight = "_exitToRight_139wf_1";
12
- const scaleIn = "_scaleIn_139wf_1";
13
- const scaleOut = "_scaleOut_139wf_1";
8
+ import { Slot } from "@radix-ui/react-slot";
9
+ const enterFromLeft = "_enterFromLeft_959s3_1";
10
+ const enterFromRight = "_enterFromRight_959s3_1";
11
+ const exitToLeft = "_exitToLeft_959s3_1";
12
+ const exitToRight = "_exitToRight_959s3_1";
13
+ const scaleIn = "_scaleIn_959s3_1";
14
+ const scaleOut = "_scaleOut_959s3_1";
14
15
  const styles = {
15
- "teddy-navigation-menu": "_teddy-navigation-menu_139wf_1",
16
- "teddy-navigation-menu__viewport": "_teddy-navigation-menu__viewport_139wf_33",
17
- "teddy-navigation-menu__list": "_teddy-navigation-menu__list_139wf_36",
18
- "teddy-navigation-menu__top-menu-list": "_teddy-navigation-menu__top-menu-list_139wf_55",
19
- "teddy-navigation-menu__top-menu-trigger": "_teddy-navigation-menu__top-menu-trigger_139wf_75",
20
- "teddy-navigation-menu__top-menu-trigger--small": "_teddy-navigation-menu__top-menu-trigger--small_139wf_93",
21
- "teddy-navigation-menu__top-menu-trigger--button": "_teddy-navigation-menu__top-menu-trigger--button_139wf_98",
22
- "teddy-navigation-menu__content": "_teddy-navigation-menu__content_139wf_163",
16
+ "teddy-navigation-menu": "_teddy-navigation-menu_959s3_1",
17
+ "teddy-navigation-menu__viewport": "_teddy-navigation-menu__viewport_959s3_33",
18
+ "teddy-navigation-menu__list": "_teddy-navigation-menu__list_959s3_36",
19
+ "teddy-navigation-menu__top-menu-list": "_teddy-navigation-menu__top-menu-list_959s3_55",
20
+ "teddy-navigation-menu__top-menu-trigger": "_teddy-navigation-menu__top-menu-trigger_959s3_75",
21
+ "teddy-navigation-menu__top-menu-trigger--small": "_teddy-navigation-menu__top-menu-trigger--small_959s3_92",
22
+ "teddy-navigation-menu__top-menu-trigger--button": "_teddy-navigation-menu__top-menu-trigger--button_959s3_97",
23
+ "teddy-navigation-menu__content": "_teddy-navigation-menu__content_959s3_169",
23
24
  enterFromLeft,
24
25
  enterFromRight,
25
26
  exitToLeft,
26
27
  exitToRight,
27
- "teddy-navigation-menu__trigger": "_teddy-navigation-menu__trigger_139wf_208",
28
- "teddy-navigation-menu__trigger--small": "_teddy-navigation-menu__trigger--small_139wf_226",
29
- "teddy-navigation-menu__trigger--button": "_teddy-navigation-menu__trigger--button_139wf_231",
30
- "teddy-navigation-menu__link": "_teddy-navigation-menu__link_139wf_296",
31
- "teddy-navigation-menu__link--small": "_teddy-navigation-menu__link--small_139wf_314",
32
- "teddy-navigation-menu__link--button": "_teddy-navigation-menu__link--button_139wf_319",
28
+ "teddy-navigation-menu__trigger": "_teddy-navigation-menu__trigger_959s3_213",
29
+ "teddy-navigation-menu__trigger--small": "_teddy-navigation-menu__trigger--small_959s3_231",
30
+ "teddy-navigation-menu__trigger--button": "_teddy-navigation-menu__trigger--button_959s3_236",
31
+ "teddy-navigation-menu__link": "_teddy-navigation-menu__link_959s3_301",
32
+ "teddy-navigation-menu__link--small": "_teddy-navigation-menu__link--small_959s3_319",
33
+ "teddy-navigation-menu__link--button": "_teddy-navigation-menu__link--button_959s3_324",
33
34
  scaleIn,
34
35
  scaleOut
35
36
  };
@@ -114,18 +115,19 @@ const TopMenuItem = React__default.forwardRef(
114
115
  }
115
116
  );
116
117
  const TopMenuTrigger = React__default.forwardRef(
117
- ({ className, active, ...props }, forwardRef) => {
118
+ ({ className, asChild, active, ...props }, forwardRef) => {
118
119
  const classes = clsx(
119
120
  [styles[`${rootClassName}__top-menu-trigger`], styles[`${rootClassName}__top-menu-trigger--small`]],
120
121
  className
121
122
  );
123
+ const Comp = asChild ? Slot : "button";
122
124
  const context = React__default.useContext(NavigationMenuContext);
123
125
  const innerRef = React__default.useRef(null);
124
126
  const ref = useComposedRefs(innerRef, forwardRef);
125
127
  const isOpen = context.selectedTopMenu === props.value;
126
128
  return /* @__PURE__ */ jsxs(Fragment, { children: [
127
129
  /* @__PURE__ */ jsx(
128
- "button",
130
+ Comp,
129
131
  {
130
132
  ...props,
131
133
  ref,
@@ -0,0 +1,14 @@
1
+ const styles = {
2
+ "teddy-drawer__overlay": "_teddy-drawer__overlay_jzq1o_25",
3
+ "teddy-overlay-no-op": "_teddy-overlay-no-op_jzq1o_1",
4
+ "teddy-fade-in": "_teddy-fade-in_jzq1o_1",
5
+ "teddy-fade-out": "_teddy-fade-out_jzq1o_1",
6
+ "teddy-drawer__overlay--container": "_teddy-drawer__overlay--container_jzq1o_49",
7
+ "teddy-drawer__content": "_teddy-drawer__content_jzq1o_55",
8
+ "drawer-content-show": "_drawer-content-show_jzq1o_1",
9
+ "drawer-content-hide": "_drawer-content-hide_jzq1o_1",
10
+ "teddy-drawer__close--floating": "_teddy-drawer__close--floating_jzq1o_80"
11
+ };
12
+ export {
13
+ styles as s
14
+ };