@purpurds/drawer 7.4.0 → 7.5.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"use-swipe-to-dismiss.hook.d.ts","sourceRoot":"","sources":["../src/use-swipe-to-dismiss.hook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,KAAK,iBAAiB,GAAG;IACvB,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IAClE,YAAY,IAAI,IAAI,CAAC;IACrB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACrC,aAAa,IAAI,IAAI,CAAC;IACtB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,WAAW,gBACvC,KAAK,CAAC,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAC,oBAC5B,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,KACxC,iBA4CF,CAAC"}
1
+ {"version":3,"file":"use-swipe-to-dismiss.hook.d.ts","sourceRoot":"","sources":["../src/use-swipe-to-dismiss.hook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,KAAK,iBAAiB,GAAG;IACvB,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IAClE,YAAY,IAAI,IAAI,CAAC;IACrB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACrC,aAAa,IAAI,IAAI,CAAC;IACtB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,WAAW,gBACvC,KAAK,CAAC,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAC,oBAC5B,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,KACxC,iBA4CF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-swipe-tracking.hook.d.ts","sourceRoot":"","sources":["../src/use-swipe-tracking.hook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,KAAK,gBAAgB,GAAG;IACtB,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IAC/C,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IAC/C,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,gBAAgB,oBACV,KAAK,CAAC,gBAAgB,CAAC;IAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,iBAC9C,KAAK,CAAC,gBAAgB,CAAC;IAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,gBAC7C,MAAM,IAAI,eACX,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,iBACzB,MAAM,IAAI,cACb,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,KACtC,gBAuDF,CAAC"}
1
+ {"version":3,"file":"use-swipe-tracking.hook.d.ts","sourceRoot":"","sources":["../src/use-swipe-tracking.hook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,KAAK,gBAAgB,GAAG;IACtB,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IAC/C,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IAC/C,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,gBAAgB,oBACV,KAAK,CAAC,gBAAgB,CAAC;IAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,iBAC9C,KAAK,CAAC,gBAAgB,CAAC;IAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,gBAC7C,MAAM,IAAI,eACX,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,iBACzB,MAAM,IAAI,cACb,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,KACtC,gBAuDF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpurds/drawer",
3
- "version": "7.4.0",
3
+ "version": "7.5.1",
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": "7.4.0",
22
- "@purpurds/heading": "7.4.0",
23
- "@purpurds/paragraph": "7.4.0",
24
- "@purpurds/visually-hidden": "7.4.0",
25
- "@purpurds/tokens": "7.4.0",
26
- "@purpurds/icon": "7.4.0"
21
+ "@purpurds/tokens": "7.5.1",
22
+ "@purpurds/button": "7.5.1",
23
+ "@purpurds/visually-hidden": "7.5.1",
24
+ "@purpurds/paragraph": "7.5.1",
25
+ "@purpurds/icon": "7.5.1",
26
+ "@purpurds/heading": "7.5.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "eslint": "9.24.0",
@@ -1,4 +1,4 @@
1
- import React, { ForwardedRef, forwardRef, ReactNode } from "react";
1
+ import React, { type ForwardedRef, forwardRef, type ReactNode } from "react";
2
2
  import c from "classnames/bind";
3
3
 
4
4
  import styles from "./drawer-container.module.scss";
@@ -1,11 +1,11 @@
1
- import React, { ForwardedRef, forwardRef, ReactNode, useContext, useRef } from "react";
1
+ import React, { type ForwardedRef, forwardRef, type ReactNode, useContext, useRef } from "react";
2
2
  import * as RadixDialog from "@radix-ui/react-dialog";
3
3
  import c from "classnames/bind";
4
4
 
5
5
  import { DrawerContext } from "./drawer.context";
6
6
  import styles from "./drawer-content.module.scss";
7
7
  import { DrawerFrame } from "./drawer-frame";
8
- import { OpenHandlerFunction } from "./types";
8
+ import { type OpenHandlerFunction } from "./types";
9
9
  import { useSwipeToDismiss } from "./use-swipe-to-dismiss.hook";
10
10
  const cx = c.bind(styles);
11
11
 
@@ -1,4 +1,4 @@
1
- import React, { ForwardedRef, forwardRef, ReactNode } from "react";
1
+ import React, { type ForwardedRef, forwardRef, type ReactNode } from "react";
2
2
  import c from "classnames/bind";
3
3
 
4
4
  import { DrawerContainer } from "./drawer-container";
@@ -6,7 +6,7 @@ import styles from "./drawer-frame.module.scss";
6
6
  import { DrawerHandle } from "./drawer-handle";
7
7
  import { DrawerHeader } from "./drawer-header";
8
8
  import { DrawerScrollArea } from "./drawer-scroll-area";
9
- import { SwipeEvent } from "./types";
9
+ import { type SwipeEvent } from "./types";
10
10
  const cx = c.bind(styles);
11
11
 
12
12
  export type DrawerFrameProps = React.HTMLAttributes<HTMLDivElement> & {
@@ -1,8 +1,8 @@
1
- import React, { ForwardedRef, forwardRef } from "react";
1
+ import React, { type ForwardedRef, forwardRef } from "react";
2
2
  import c from "classnames/bind";
3
3
 
4
4
  import styles from "./drawer-handle.module.scss";
5
- import { SwipeEvent } from "./types";
5
+ import { type SwipeEvent } from "./types";
6
6
  import { useSwipeTracking } from "./use-swipe-tracking.hook";
7
7
  const cx = c.bind(styles);
8
8
 
@@ -1,4 +1,4 @@
1
- import React, { ForwardedRef, forwardRef } from "react";
1
+ import React, { type ForwardedRef, forwardRef } from "react";
2
2
  import { Button, BUTTON_VARIANT } from "@purpurds/button";
3
3
  import { Heading, TitleVariant } from "@purpurds/heading";
4
4
  import { IconArrowLeft } from "@purpurds/icon/arrow-left";
@@ -1,4 +1,4 @@
1
- import React, { ForwardedRef, forwardRef, ReactNode } from "react";
1
+ import React, { type ForwardedRef, forwardRef, type ReactNode } from "react";
2
2
  import * as RadixScrollArea from "@radix-ui/react-scroll-area";
3
3
  import c from "classnames/bind";
4
4
 
@@ -1,4 +1,4 @@
1
- import React, { ForwardedRef, forwardRef, ReactNode } from "react";
1
+ import React, { type ForwardedRef, forwardRef, type ReactNode } from "react";
2
2
  import * as RadixDialog from "@radix-ui/react-dialog";
3
3
 
4
4
  export type DrawerTriggerProps = React.HTMLAttributes<HTMLElement> & {
@@ -1,5 +1,5 @@
1
1
  import { createContext } from "react";
2
2
 
3
- import { OpenHandlerFunction } from "./types";
3
+ import { type OpenHandlerFunction } from "./types";
4
4
 
5
5
  export const DrawerContext = createContext<OpenHandlerFunction | null>(null);
@@ -10,8 +10,8 @@ import "@purpurds/heading/styles";
10
10
  import "@purpurds/button/styles";
11
11
  import "@purpurds/paragraph/styles";
12
12
  import "@purpurds/icon/styles";
13
- import { Drawer, DrawerProps } from "./drawer";
14
- import { DrawerContent } from "./drawer-content";
13
+ import { Drawer, type DrawerProps } from "./drawer";
14
+ import { type DrawerContent } from "./drawer-content";
15
15
 
16
16
  const StorybookTestBodyContent = () => {
17
17
  return (
@@ -189,7 +189,7 @@ const StorybookTestFooterContent = () => {
189
189
  };
190
190
 
191
191
  const meta = {
192
- title: "Components/Drawer",
192
+ title: "Dialogs and Overlays/Drawer",
193
193
  component: Drawer,
194
194
  parameters: {
195
195
  design: [
package/src/drawer.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import React, { ReactNode, useEffect } from "react";
1
+ import React, { type ReactNode, useEffect } from "react";
2
2
  import * as RadixDialog from "@radix-ui/react-dialog";
3
3
  import c from "classnames/bind";
4
4
 
@@ -1,6 +1,6 @@
1
- import React from "react";
1
+ import type React from "react";
2
2
 
3
- import { SwipeEvent } from "./types";
3
+ import { type SwipeEvent } from "./types";
4
4
 
5
5
  type UseSwipeToDismiss = {
6
6
  onAnimationEnd(event: React.AnimationEvent<HTMLDivElement>): void;
@@ -1,6 +1,6 @@
1
- import React from "react";
1
+ import type React from "react";
2
2
 
3
- import { SwipeEvent } from "./types";
3
+ import { type SwipeEvent } from "./types";
4
4
 
5
5
  type UseSwipeTracking = {
6
6
  onPointerDown(event: React.PointerEvent): void;