@purpurds/drawer 6.12.2 → 6.12.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpurds/drawer",
3
- "version": "6.12.2",
3
+ "version": "6.12.4",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "./dist/drawer.cjs.js",
6
6
  "types": "./dist/drawer.d.ts",
@@ -18,12 +18,12 @@
18
18
  "@radix-ui/react-dialog": "~1.1.6",
19
19
  "@radix-ui/react-scroll-area": "~1.2.3",
20
20
  "classnames": "~2.5.0",
21
- "@purpurds/button": "6.12.2",
22
- "@purpurds/icon": "6.12.2",
23
- "@purpurds/heading": "6.12.2",
24
- "@purpurds/paragraph": "6.12.2",
25
- "@purpurds/visually-hidden": "6.12.2",
26
- "@purpurds/tokens": "6.12.2"
21
+ "@purpurds/heading": "6.12.4",
22
+ "@purpurds/paragraph": "6.12.4",
23
+ "@purpurds/tokens": "6.12.4",
24
+ "@purpurds/visually-hidden": "6.12.4",
25
+ "@purpurds/button": "6.12.4",
26
+ "@purpurds/icon": "6.12.4"
27
27
  },
28
28
  "devDependencies": {
29
29
  "eslint": "9.24.0",
@@ -4,10 +4,9 @@ import c from "classnames/bind";
4
4
  import styles from "./drawer-container.module.scss";
5
5
  const cx = c.bind(styles);
6
6
 
7
- export type DrawerContainerProps = {
7
+ export type DrawerContainerProps = React.HTMLAttributes<HTMLDivElement> & {
8
8
  ["data-testid"]?: string;
9
9
  children: ReactNode;
10
- className?: string;
11
10
  stickyFooter: boolean;
12
11
  variant?: "header" | "body" | "footer";
13
12
  };
@@ -23,11 +23,10 @@ export type WithoutBackButton = {
23
23
  onBackButtonClick?: never;
24
24
  };
25
25
 
26
- export type DrawerContentProps = {
26
+ export type DrawerContentProps = React.HTMLAttributes<HTMLElement> & {
27
27
  ["data-testid"]?: string;
28
28
  bodyText?: string;
29
29
  children: ReactNode;
30
- className?: string;
31
30
  closeButtonText: string;
32
31
  disableCloseOnClickOutside?: boolean;
33
32
  /**
@@ -9,13 +9,12 @@ import { DrawerScrollArea } from "./drawer-scroll-area";
9
9
  import { SwipeEvent } from "./types";
10
10
  const cx = c.bind(styles);
11
11
 
12
- export type DrawerFrameProps = {
12
+ export type DrawerFrameProps = React.HTMLAttributes<HTMLDivElement> & {
13
13
  ["data-testid"]?: string;
14
14
  backButton: boolean;
15
15
  backButtonText?: string;
16
16
  backButtonOnlyIcon: boolean;
17
17
  children: ReactNode;
18
- className?: string;
19
18
  closeButtonText: string;
20
19
  fitToContent?: boolean;
21
20
  footerContent?: ReactNode;
@@ -6,9 +6,8 @@ import { SwipeEvent } from "./types";
6
6
  import { useSwipeTracking } from "./use-swipe-tracking.hook";
7
7
  const cx = c.bind(styles);
8
8
 
9
- export type DrawerHandleProps = {
9
+ export type DrawerHandleProps = React.HTMLAttributes<HTMLDivElement> & {
10
10
  ["data-testid"]?: string;
11
- className?: string;
12
11
  onSwipeStart(): void;
13
12
  onSwipeMove(event: SwipeEvent): void;
14
13
  onSwipeCancel(): void;
@@ -11,12 +11,11 @@ import styles from "./drawer-header.module.scss";
11
11
 
12
12
  const cx = c.bind(styles);
13
13
 
14
- export type DrawerHeaderProps = {
14
+ export type DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement> & {
15
15
  ["data-testid"]?: string;
16
16
  backButton: boolean;
17
17
  backButtonText?: string;
18
18
  backButtonOnlyIcon: boolean;
19
- className?: string;
20
19
  closeButtonText: string;
21
20
  headerContent?: React.ReactNode;
22
21
  onBackButtonClick?: () => void;
@@ -5,10 +5,9 @@ import c from "classnames/bind";
5
5
  import styles from "./drawer-scroll-area.module.scss";
6
6
  const cx = c.bind(styles);
7
7
 
8
- export type DrawerScrollAreaProps = {
8
+ export type DrawerScrollAreaProps = React.HTMLAttributes<HTMLDivElement> & {
9
9
  ["data-testid"]?: string;
10
10
  children: ReactNode;
11
- className?: string;
12
11
  fitToContent?: boolean;
13
12
  };
14
13
 
@@ -1,10 +1,9 @@
1
1
  import React, { ForwardedRef, forwardRef, ReactNode } from "react";
2
2
  import * as RadixDialog from "@radix-ui/react-dialog";
3
3
 
4
- export type DrawerTriggerProps = {
4
+ export type DrawerTriggerProps = React.HTMLAttributes<HTMLElement> & {
5
5
  ["data-testid"]?: string;
6
6
  children: ReactNode;
7
- className?: string;
8
7
  };
9
8
 
10
9
  export const DrawerTrigger = forwardRef(
package/src/drawer.tsx CHANGED
@@ -8,10 +8,9 @@ import { DrawerContent } from "./drawer-content";
8
8
  import { DrawerTrigger } from "./drawer-trigger";
9
9
  const cx = c.bind(styles);
10
10
 
11
- export type DrawerProps = {
11
+ export type DrawerProps = React.HTMLAttributes<HTMLDivElement> & {
12
12
  ["data-testid"]?: string;
13
13
  children: ReactNode;
14
- className?: string;
15
14
  onOpenChange?: (open: boolean) => void;
16
15
  open: boolean;
17
16
  };