@pittorica/sheet-react 0.21.0 → 0.22.3

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/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # @pittorica/sheet-react
2
+
3
+ The `Sheet` component.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @pittorica/sheet-react
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```jsx
14
+ import { Sheet } from '@pittorica/sheet-react';
15
+ // TODO: Add usage example
16
+ ```
17
+
18
+ ## License
19
+
20
+ This project is licensed under the MIT License.
21
+
22
+ **Copyright (c) 2025 Davide Di Criscito**
23
+
24
+ For the full details, see the [LICENSE](LICENSE) file.
package/dist/Sheet.d.ts CHANGED
@@ -1,26 +1,14 @@
1
- import { default as React } from 'react';
2
- import { RecipeVariants } from '@vanilla-extract/recipes';
3
- import { sheetRecipe } from './sheet.css.js';
4
- type SheetVariants = RecipeVariants<typeof sheetRecipe>;
5
- export type SheetProps = {
1
+ import { type ReactNode } from 'react';
2
+ import { type BoxProps } from '@pittorica/box-react';
3
+ export interface SheetProps extends BoxProps {
6
4
  isOpen: boolean;
7
5
  onClose: () => void;
8
- side?: NonNullable<SheetVariants>['side'];
9
- maxWidth?: NonNullable<SheetVariants>['width'];
10
- /**
11
- * Background color of the sheet.
12
- */
13
- color?: string;
14
- /**
15
- * Text color of the sheet content (including title and close button).
16
- * Use this to ensure contrast when using a custom background color.
17
- */
18
- textColor?: string;
19
- title?: React.ReactNode;
20
- showHandle?: boolean;
21
- children: React.ReactNode;
22
- className?: string;
23
- };
24
- export declare const Sheet: React.FC<SheetProps>;
25
- export {};
6
+ children: ReactNode;
7
+ side?: 'side' | 'bottom';
8
+ title?: string;
9
+ }
10
+ /**
11
+ * Sheet component following MD3 guidelines for Side and Bottom sheets.
12
+ */
13
+ export declare const Sheet: ({ isOpen, onClose, children, side, title, className, ...props }: SheetProps) => import("react").ReactPortal | null;
26
14
  //# sourceMappingURL=Sheet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../src/Sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AASzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAML,WAAW,EAEZ,MAAM,gBAAgB,CAAC;AAExB,KAAK,aAAa,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;AAExD,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,IAAI,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;IAE1C,QAAQ,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC;IAE/C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAiBF,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAmGtC,CAAC"}
1
+ {"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../src/Sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAC;AAQlD,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,WAAW,UAAW,SAAQ,QAAQ;IAC1C,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,iEAQnB,UAAU,uCAwDZ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Sheet } from './Sheet';
3
+ declare const meta: Meta<typeof Sheet>;
4
+ export default meta;
5
+ export declare const SideExample: StoryObj;
6
+ export declare const BottomExample: StoryObj;
7
+ //# sourceMappingURL=Sheet.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sheet.stories.d.ts","sourceRoot":"","sources":["../src/Sheet.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAG5B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,WAAW,EAAE,QAmBzB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAmB3B,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @vitest-environment jsdom
3
+ */
4
+ import '@testing-library/jest-dom';
5
+ //# sourceMappingURL=Sheet.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sheet.test.d.ts","sourceRoot":"","sources":["../src/Sheet.test.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,2BAA2B,CAAC"}