@telia/teddy 0.3.3 → 0.3.5

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.
@@ -28,14 +28,14 @@ const Button = React.forwardRef(
28
28
  },
29
29
  className
30
30
  );
31
- const ref = utils_composeRefs.composeRefs(context == null ? void 0 : context.buttonRef, forwardRef);
31
+ const ref = utils_composeRefs.useComposedRefs(forwardRef, context == null ? void 0 : context.buttonRef);
32
32
  return /* @__PURE__ */ jsxRuntime.jsxs(components_flex_flex.Flex, { className: wrapperClasses, children: [
33
33
  disclaimer && /* @__PURE__ */ jsxRuntime.jsx(components_text_text.Text, { mr: "100", variant: "additional-100", children: disclaimer }),
34
34
  /* @__PURE__ */ jsxRuntime.jsx(
35
35
  components_button_button.Button,
36
36
  {
37
- ...!iconOnly || !props["aria-label"] ? { iconOnly: false, "aria-label": void 0 } : { iconOnly: true, "aria-label": props["aria-label"] },
38
37
  ref,
38
+ ...!iconOnly || !props["aria-label"] ? { iconOnly: false, "aria-label": void 0 } : { iconOnly: true, "aria-label": props["aria-label"] },
39
39
  variant: getButtonVariant(context == null ? void 0 : context.variant),
40
40
  ...props,
41
41
  className: classes
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import React__default from "react";
3
3
  import clsx from "clsx";
4
4
  import { RootContext, s as styles, actionElementIdentifier, rootClassName } from "./card.js";
5
- import { composeRefs } from "../../utils/composeRefs.js";
5
+ import { useComposedRefs } from "../../utils/composeRefs.js";
6
6
  import { Button as Button$1 } from "../button/button.js";
7
7
  import { Flex } from "../flex/flex.js";
8
8
  import { Text } from "../text/text.js";
@@ -26,14 +26,14 @@ const Button = React__default.forwardRef(
26
26
  },
27
27
  className
28
28
  );
29
- const ref = composeRefs(context == null ? void 0 : context.buttonRef, forwardRef);
29
+ const ref = useComposedRefs(forwardRef, context == null ? void 0 : context.buttonRef);
30
30
  return /* @__PURE__ */ jsxs(Flex, { className: wrapperClasses, children: [
31
31
  disclaimer && /* @__PURE__ */ jsx(Text, { mr: "100", variant: "additional-100", children: disclaimer }),
32
32
  /* @__PURE__ */ jsx(
33
33
  Button$1,
34
34
  {
35
- ...!iconOnly || !props["aria-label"] ? { iconOnly: false, "aria-label": void 0 } : { iconOnly: true, "aria-label": props["aria-label"] },
36
35
  ref,
36
+ ...!iconOnly || !props["aria-label"] ? { iconOnly: false, "aria-label": void 0 } : { iconOnly: true, "aria-label": props["aria-label"] },
37
37
  variant: getButtonVariant(context == null ? void 0 : context.variant),
38
38
  ...props,
39
39
  className: classes
@@ -100,13 +100,13 @@ const Root = React.forwardRef(
100
100
  ...props,
101
101
  className: classes,
102
102
  style: customStyle,
103
- onClick: utils_composeEventHandlers.composeEventHandlers(props.onClick, (e) => {
104
- var _a;
103
+ onPointerDown: utils_composeEventHandlers.composeEventHandlers(props.onPointerDown, (e) => {
105
104
  if (e.isDefaultPrevented())
106
105
  return;
107
- if (linkRef.current)
106
+ if (linkRef.current && e.target !== linkRef.current)
108
107
  return linkRef.current.click();
109
- (_a = buttonRef.current) == null ? void 0 : _a.click();
108
+ if (buttonRef.current && e.target !== buttonRef.current)
109
+ return buttonRef.current.click();
110
110
  }),
111
111
  ref: forwardRef,
112
112
  children
@@ -98,13 +98,13 @@ const Root = React__default.forwardRef(
98
98
  ...props,
99
99
  className: classes,
100
100
  style: customStyle,
101
- onClick: composeEventHandlers(props.onClick, (e) => {
102
- var _a;
101
+ onPointerDown: composeEventHandlers(props.onPointerDown, (e) => {
103
102
  if (e.isDefaultPrevented())
104
103
  return;
105
- if (linkRef.current)
104
+ if (linkRef.current && e.target !== linkRef.current)
106
105
  return linkRef.current.click();
107
- (_a = buttonRef.current) == null ? void 0 : _a.click();
106
+ if (buttonRef.current && e.target !== buttonRef.current)
107
+ return buttonRef.current.click();
108
108
  }),
109
109
  ref: forwardRef,
110
110
  children
@@ -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-khivHSFm.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-Bh77Byg_.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-khivHSFm.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-Bh77Byg_.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-khivHSFm.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-Bh77Byg_.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-khivHSFm.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-Bh77Byg_.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-khivHSFm.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-Bh77Byg_.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-khivHSFm.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-Bh77Byg_.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(
@@ -8,21 +8,20 @@ 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";
19
- const Drawer = Object.assign(components_drawer_drawerRoot.Root, {
20
- Title: components_drawer_drawerTitle.Title,
21
- Description: components_drawer_drawerDescription.Description,
22
- Trigger: components_drawer_drawerTrigger.Trigger,
23
- Overlay: components_drawer_drawerOverlay.Overlay,
24
- Content: components_drawer_drawerContent.Content,
25
- Footer: components_drawer_drawerFooter.Footer,
26
- Close: components_drawer_drawerClose.Close
27
- });
11
+ const Drawer = components_drawer_drawerRoot.Root;
12
+ Drawer.displayName = "Drawer";
13
+ Drawer.Trigger = components_drawer_drawerTrigger.Trigger;
14
+ Drawer.Trigger.displayName = "Drawer.Trigger";
15
+ Drawer.Content = components_drawer_drawerContent.Content;
16
+ Drawer.Content.displayName = "Drawer.Content";
17
+ Drawer.Title = components_drawer_drawerTitle.Title;
18
+ Drawer.Title.displayName = "Drawer.Title";
19
+ Drawer.Description = components_drawer_drawerDescription.Description;
20
+ Drawer.Description.displayName = "Drawer.Description";
21
+ Drawer.Overlay = components_drawer_drawerOverlay.Overlay;
22
+ Drawer.Overlay.displayName = "Drawer.Overlay";
23
+ Drawer.Footer = components_drawer_drawerFooter.Footer;
24
+ Drawer.Footer.displayName = "Drawer.Footer";
25
+ Drawer.Close = components_drawer_drawerClose.Close;
26
+ Drawer.Close.displayName = "Drawer.Close";
28
27
  exports.Drawer = Drawer;
@@ -7,16 +7,7 @@ import { Root, RootProps } from './drawer-root';
7
7
  import { Title, TitleProps } from './drawer-title';
8
8
  import { Trigger, TriggerProps } from './drawer-trigger';
9
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 = {
10
+ type DrawerProps = {
20
11
  Root: RootProps;
21
12
  Title: TitleProps;
22
13
  Description: DescriptionProps;
@@ -26,3 +17,124 @@ export type DrawerProps = {
26
17
  Footer: FooterProps;
27
18
  Close: CloseProps;
28
19
  };
20
+ /**
21
+ * Drawer is a sliding panel that appears from the side of the screen.
22
+ * It's commonly used for navigation, settings, or displaying additional content without leaving the current page.
23
+ *
24
+ * @component
25
+ *
26
+ * @example
27
+ * // Basic usage
28
+ * <Drawer>
29
+ * <Drawer.Trigger>
30
+ * <Button variant="primary">Open Drawer</Button>
31
+ * </Drawer.Trigger>
32
+ * <Drawer.Content>
33
+ * <Drawer.Title as="h3">Drawer Title</Drawer.Title>
34
+ * <Drawer.Close slot="floating" aria-label="close" />
35
+ * <Drawer.Description>Drawer content goes here.</Drawer.Description>
36
+ * <Drawer.Footer>
37
+ * <Button variant="primary">Save</Button>
38
+ * </Drawer.Footer>
39
+ * </Drawer.Content>
40
+ * </Drawer>
41
+ */
42
+ declare const Drawer: typeof Root & {
43
+ /**
44
+ * Trigger component that opens the drawer when clicked.
45
+ * Must be passed a single child component that will be used as the trigger.
46
+ *
47
+ * @component
48
+ *
49
+ * @example
50
+ * <Drawer.Trigger>
51
+ * <Button variant="primary">Open Drawer</Button>
52
+ * </Drawer.Trigger>
53
+ */
54
+ Trigger: typeof Trigger;
55
+ /**
56
+ * Content component that contains the drawer's content.
57
+ * Handles the positioning and scrolling behavior of the drawer content.
58
+ *
59
+ * @component
60
+ *
61
+ * @example
62
+ * <Drawer.Content>
63
+ * <Drawer.Title>Title</Drawer.Title>
64
+ * <Drawer.Description>Content</Drawer.Description>
65
+ * </Drawer.Content>
66
+ */
67
+ Content: typeof Content;
68
+ /**
69
+ * An accessible title to be announced when the drawer is opened.
70
+ * It will render the internal Heading component.
71
+ * If you want to hide the title, wrap it inside our Visually Hidden utility like this `<VisuallyHidden asChild>`.
72
+ *
73
+ * @component
74
+ *
75
+ * @example
76
+ * <Drawer.Title as="h3">Drawer Title</Drawer.Title>
77
+ */
78
+ Title: typeof Title;
79
+ /**
80
+ * An optional accessible description to be announced when the drawer is opened.
81
+ * This will render the internal Text component with a default p tag.
82
+ *
83
+ * If you want to hide the description, wrap it inside our Visually Hidden utility like this `<VisuallyHidden asChild>`.
84
+ *
85
+ * @component
86
+ *
87
+ * @example
88
+ * <Drawer.Description>
89
+ * This is the main content of the drawer.
90
+ * It can contain multiple paragraphs and other components.
91
+ * </Drawer.Description>
92
+ */
93
+ Description: typeof Description;
94
+ /**
95
+ * Overlay component provides the backdrop for the drawer.
96
+ * Handles the background dimming and click-outside behavior.
97
+ *
98
+ * @component
99
+ *
100
+ * @example
101
+ * <Drawer.Overlay>
102
+ * <Drawer.Content>
103
+ * {/* Content will slide in from the side *\/}
104
+ * </Drawer.Content>
105
+ * </Drawer.Overlay>
106
+ */
107
+ Overlay: typeof Overlay;
108
+ /**
109
+ * Footer component for organizing action buttons or additional content at the bottom of the drawer.
110
+ * Provides consistent spacing and styling for footer content.
111
+ *
112
+ * @component
113
+ *
114
+ * @example
115
+ * <Drawer.Footer>
116
+ * <Button variant="tertiary-purple">Cancel</Button>
117
+ * <Button variant="primary">Save Changes</Button>
118
+ * </Drawer.Footer>
119
+ */
120
+ Footer: typeof Footer;
121
+ /**
122
+ * Close component provides a button to close the drawer.
123
+ * Can be used either as a floating close button or within content.
124
+ *
125
+ * @component
126
+ *
127
+ * @example
128
+ * // Floating close button
129
+ * <Drawer.Close slot="floating" aria-label="Lukk" />
130
+ *
131
+ * @example
132
+ * // Close button within content
133
+ * <Drawer.Close slot="content">
134
+ * <Button variant="primary">Done</Button>
135
+ * </Drawer.Close>
136
+ */
137
+ Close: typeof Close;
138
+ };
139
+ export { Drawer };
140
+ export type { DrawerProps };
@@ -6,23 +6,22 @@ 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";
17
- const Drawer = Object.assign(Root, {
18
- Title,
19
- Description,
20
- Trigger,
21
- Overlay,
22
- Content,
23
- Footer,
24
- Close
25
- });
9
+ const Drawer = Root;
10
+ Drawer.displayName = "Drawer";
11
+ Drawer.Trigger = Trigger;
12
+ Drawer.Trigger.displayName = "Drawer.Trigger";
13
+ Drawer.Content = Content;
14
+ Drawer.Content.displayName = "Drawer.Content";
15
+ Drawer.Title = Title;
16
+ Drawer.Title.displayName = "Drawer.Title";
17
+ Drawer.Description = Description;
18
+ Drawer.Description.displayName = "Drawer.Description";
19
+ Drawer.Overlay = Overlay;
20
+ Drawer.Overlay.displayName = "Drawer.Overlay";
21
+ Drawer.Footer = Footer;
22
+ Drawer.Footer.displayName = "Drawer.Footer";
23
+ Drawer.Close = Close;
24
+ Drawer.Close.displayName = "Drawer.Close";
26
25
  export {
27
26
  Drawer
28
27
  };
@@ -88,7 +88,7 @@ declare const Modal: import('react').FC<RootProps> & {
88
88
  /**
89
89
  * An accessible title to be announced when the dialog is opened.
90
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>.
91
+ * If you want to hide the title, wrap it inside our Visually Hidden utility like this`<VisuallyHidden asChild>`.
92
92
  *
93
93
  * @component
94
94
  *
@@ -100,7 +100,7 @@ declare const Modal: import('react').FC<RootProps> & {
100
100
  * An optional accessible description to be announced when the dialog is opened.
101
101
  * This will render the internal Text component with an default p tag
102
102
  *
103
- * If you want to hide the description, wrap it inside our Visually Hidden utility like this <VisuallyHidden asChild>
103
+ * If you want to hide the description, wrap it inside our Visually Hidden utility like this `<VisuallyHidden asChild>`
104
104
  *
105
105
  * @component
106
106
  *
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ const styles = {
3
+ "teddy-drawer__overlay": "_teddy-drawer__overlay_16gp4_26",
4
+ "teddy-overlay-no-op": "_teddy-overlay-no-op_16gp4_1",
5
+ "teddy-fade-in": "_teddy-fade-in_16gp4_1",
6
+ "teddy-fade-out": "_teddy-fade-out_16gp4_1",
7
+ "teddy-drawer__overlay--container": "_teddy-drawer__overlay--container_16gp4_60",
8
+ "teddy-drawer__content": "_teddy-drawer__content_16gp4_66",
9
+ "teddy-drawer__title": "_teddy-drawer__title_16gp4_70",
10
+ "drawer-content-show": "_drawer-content-show_16gp4_1",
11
+ "drawer-content-hide": "_drawer-content-hide_16gp4_1",
12
+ "teddy-drawer__content--lg": "_teddy-drawer__content--lg_16gp4_101",
13
+ "teddy-drawer__close--floating": "_teddy-drawer__close--floating_16gp4_106"
14
+ };
15
+ exports.styles = styles;
@@ -0,0 +1,16 @@
1
+ const styles = {
2
+ "teddy-drawer__overlay": "_teddy-drawer__overlay_16gp4_26",
3
+ "teddy-overlay-no-op": "_teddy-overlay-no-op_16gp4_1",
4
+ "teddy-fade-in": "_teddy-fade-in_16gp4_1",
5
+ "teddy-fade-out": "_teddy-fade-out_16gp4_1",
6
+ "teddy-drawer__overlay--container": "_teddy-drawer__overlay--container_16gp4_60",
7
+ "teddy-drawer__content": "_teddy-drawer__content_16gp4_66",
8
+ "teddy-drawer__title": "_teddy-drawer__title_16gp4_70",
9
+ "drawer-content-show": "_drawer-content-show_16gp4_1",
10
+ "drawer-content-hide": "_drawer-content-hide_16gp4_1",
11
+ "teddy-drawer__content--lg": "_teddy-drawer__content--lg_16gp4_101",
12
+ "teddy-drawer__close--floating": "_teddy-drawer__close--floating_16gp4_106"
13
+ };
14
+ export {
15
+ styles as s
16
+ };
package/dist/style.css CHANGED
@@ -2404,7 +2404,7 @@
2404
2404
  right: 100%;
2405
2405
  transform: rotate(180deg);
2406
2406
  }@layer reset, flex, button, link, heading, drawer;
2407
- @keyframes _teddy-fade-in_1hfde_1 {
2407
+ @keyframes _teddy-fade-in_16gp4_1 {
2408
2408
  from {
2409
2409
  opacity: 0;
2410
2410
  }
@@ -2412,7 +2412,7 @@
2412
2412
  opacity: 1;
2413
2413
  }
2414
2414
  }
2415
- @keyframes _teddy-fade-out_1hfde_1 {
2415
+ @keyframes _teddy-fade-out_16gp4_1 {
2416
2416
  from {
2417
2417
  opacity: 1;
2418
2418
  }
@@ -2420,7 +2420,7 @@
2420
2420
  opacity: 0;
2421
2421
  }
2422
2422
  }
2423
- @keyframes _teddy-overlay-no-op_1hfde_1 {
2423
+ @keyframes _teddy-overlay-no-op_16gp4_1 {
2424
2424
  from {
2425
2425
  opacity: 1;
2426
2426
  }
@@ -2428,11 +2428,11 @@
2428
2428
  opacity: 1;
2429
2429
  }
2430
2430
  }
2431
- ._teddy-drawer__overlay_1hfde_26 {
2431
+ ._teddy-drawer__overlay_16gp4_26 {
2432
2432
  box-sizing: border-box;
2433
2433
  }
2434
2434
  @layer drawer {
2435
- ._teddy-drawer__overlay_1hfde_26 {
2435
+ ._teddy-drawer__overlay_16gp4_26 {
2436
2436
  box-sizing: border-box;
2437
2437
  position: fixed;
2438
2438
  inset: 0;
@@ -2441,37 +2441,37 @@
2441
2441
  z-index: 40;
2442
2442
  }
2443
2443
  @media (prefers-reduced-motion: no-preference) {
2444
- ._teddy-drawer__overlay_1hfde_26 {
2444
+ ._teddy-drawer__overlay_16gp4_26 {
2445
2445
  /* Keep the overlay mounted until the children have animated */
2446
2446
  }
2447
- ._teddy-drawer__overlay_1hfde_26:where([data-state=closed]) {
2448
- animation: _teddy-overlay-no-op_1hfde_1 400ms cubic-bezier(0.16, 1, 0.3, 1);
2447
+ ._teddy-drawer__overlay_16gp4_26:where([data-state=closed]) {
2448
+ animation: _teddy-overlay-no-op_16gp4_1 400ms cubic-bezier(0.16, 1, 0.3, 1);
2449
2449
  }
2450
- ._teddy-drawer__overlay_1hfde_26:where([data-state=open])::before {
2451
- animation: _teddy-fade-in_1hfde_1 500ms cubic-bezier(0.16, 1, 0.3, 1);
2450
+ ._teddy-drawer__overlay_16gp4_26:where([data-state=open])::before {
2451
+ animation: _teddy-fade-in_16gp4_1 500ms cubic-bezier(0.16, 1, 0.3, 1);
2452
2452
  }
2453
- ._teddy-drawer__overlay_1hfde_26:where([data-state=closed])::before {
2453
+ ._teddy-drawer__overlay_16gp4_26:where([data-state=closed])::before {
2454
2454
  opacity: 0;
2455
- animation: _teddy-fade-out_1hfde_1 400ms cubic-bezier(0.16, 1, 0.3, 1);
2455
+ animation: _teddy-fade-out_16gp4_1 400ms cubic-bezier(0.16, 1, 0.3, 1);
2456
2456
  }
2457
2457
  }
2458
- ._teddy-drawer__overlay_1hfde_26::before {
2458
+ ._teddy-drawer__overlay_16gp4_26::before {
2459
2459
  position: fixed;
2460
2460
  content: "";
2461
2461
  inset: 0;
2462
2462
  background-color: var(--teddy-color-overlay-default);
2463
2463
  }
2464
- ._teddy-drawer__overlay--container_1hfde_60 {
2464
+ ._teddy-drawer__overlay--container_16gp4_60 {
2465
2465
  position: absolute;
2466
2466
  }
2467
- ._teddy-drawer__overlay--container_1hfde_60::before {
2467
+ ._teddy-drawer__overlay--container_16gp4_60::before {
2468
2468
  position: absolute;
2469
2469
  }
2470
- ._teddy-drawer__overlay--container_1hfde_60 ._teddy-drawer__content_1hfde_66 {
2470
+ ._teddy-drawer__overlay--container_16gp4_60 ._teddy-drawer__content_16gp4_66 {
2471
2471
  position: absolute;
2472
2472
  inset: 0;
2473
2473
  }
2474
- ._teddy-drawer__title_1hfde_70 {
2474
+ ._teddy-drawer__title_16gp4_70 {
2475
2475
  position: sticky;
2476
2476
  padding: var(--teddy-spacing-300) 0 var(--teddy-spacing-200);
2477
2477
  background-color: var(--teddy-color-background-primary);
@@ -2479,7 +2479,7 @@
2479
2479
  margin: calc(-1 * var(--teddy-spacing-300)) 0 calc(-1 * var(--teddy-spacing-200));
2480
2480
  z-index: 2;
2481
2481
  }
2482
- ._teddy-drawer__content_1hfde_66 {
2482
+ ._teddy-drawer__content_16gp4_66 {
2483
2483
  background-color: var(--teddy-color-background-primary);
2484
2484
  box-shadow: var(--teddy-shadow-lg);
2485
2485
  z-index: 40;
@@ -2495,27 +2495,26 @@
2495
2495
  min-width: min(100%, 400px);
2496
2496
  }
2497
2497
  @media (prefers-reduced-motion: no-preference) {
2498
- ._teddy-drawer__content_1hfde_66:where([data-state=open]) {
2499
- animation: _drawer-content-show_1hfde_1 450ms cubic-bezier(0.16, 1, 0.3, 1);
2498
+ ._teddy-drawer__content_16gp4_66:where([data-state=open]) {
2499
+ animation: _drawer-content-show_16gp4_1 450ms cubic-bezier(0.16, 1, 0.3, 1);
2500
2500
  }
2501
- ._teddy-drawer__content_1hfde_66:where([data-state=closed]) {
2502
- opacity: 0;
2503
- animation: _drawer-content-hide_1hfde_1 350ms cubic-bezier(0.16, 1, 0.3, 1);
2501
+ ._teddy-drawer__content_16gp4_66:where([data-state=closed]) {
2502
+ animation: _drawer-content-hide_16gp4_1 350ms cubic-bezier(0.16, 1, 0.3, 1);
2504
2503
  }
2505
2504
  }
2506
- ._teddy-drawer__content--lg_1hfde_102 {
2505
+ ._teddy-drawer__content--lg_16gp4_101 {
2507
2506
  min-width: min(100%, 30rem);
2508
2507
  width: 30vw;
2509
2508
  max-width: initial;
2510
2509
  }
2511
- ._teddy-drawer__close--floating_1hfde_107 {
2510
+ ._teddy-drawer__close--floating_16gp4_106 {
2512
2511
  position: fixed;
2513
2512
  z-index: 3;
2514
2513
  top: var(--teddy-spacing-200);
2515
2514
  right: var(--teddy-spacing-200);
2516
2515
  }
2517
2516
  }
2518
- @keyframes _drawer-content-show_1hfde_1 {
2517
+ @keyframes _drawer-content-show_16gp4_1 {
2519
2518
  from {
2520
2519
  transform: translateX(100%);
2521
2520
  }
@@ -2523,7 +2522,7 @@
2523
2522
  transform: translateX(0px);
2524
2523
  }
2525
2524
  }
2526
- @keyframes _drawer-content-hide_1hfde_1 {
2525
+ @keyframes _drawer-content-hide_16gp4_1 {
2527
2526
  from {
2528
2527
  transform: translateX(0px);
2529
2528
  }
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "pnpm": ">=9"
21
21
  },
22
22
  "private": false,
23
- "version": "0.3.3",
23
+ "version": "0.3.5",
24
24
  "sideEffects": [
25
25
  "**/*.css",
26
26
  "**/*.svg"
@@ -1,16 +0,0 @@
1
- const styles = {
2
- "teddy-drawer__overlay": "_teddy-drawer__overlay_1hfde_26",
3
- "teddy-overlay-no-op": "_teddy-overlay-no-op_1hfde_1",
4
- "teddy-fade-in": "_teddy-fade-in_1hfde_1",
5
- "teddy-fade-out": "_teddy-fade-out_1hfde_1",
6
- "teddy-drawer__overlay--container": "_teddy-drawer__overlay--container_1hfde_60",
7
- "teddy-drawer__content": "_teddy-drawer__content_1hfde_66",
8
- "teddy-drawer__title": "_teddy-drawer__title_1hfde_70",
9
- "drawer-content-show": "_drawer-content-show_1hfde_1",
10
- "drawer-content-hide": "_drawer-content-hide_1hfde_1",
11
- "teddy-drawer__content--lg": "_teddy-drawer__content--lg_1hfde_102",
12
- "teddy-drawer__close--floating": "_teddy-drawer__close--floating_1hfde_107"
13
- };
14
- export {
15
- styles as s
16
- };
@@ -1,15 +0,0 @@
1
- "use strict";
2
- const styles = {
3
- "teddy-drawer__overlay": "_teddy-drawer__overlay_1hfde_26",
4
- "teddy-overlay-no-op": "_teddy-overlay-no-op_1hfde_1",
5
- "teddy-fade-in": "_teddy-fade-in_1hfde_1",
6
- "teddy-fade-out": "_teddy-fade-out_1hfde_1",
7
- "teddy-drawer__overlay--container": "_teddy-drawer__overlay--container_1hfde_60",
8
- "teddy-drawer__content": "_teddy-drawer__content_1hfde_66",
9
- "teddy-drawer__title": "_teddy-drawer__title_1hfde_70",
10
- "drawer-content-show": "_drawer-content-show_1hfde_1",
11
- "drawer-content-hide": "_drawer-content-hide_1hfde_1",
12
- "teddy-drawer__content--lg": "_teddy-drawer__content--lg_1hfde_102",
13
- "teddy-drawer__close--floating": "_teddy-drawer__close--floating_1hfde_107"
14
- };
15
- exports.styles = styles;