@sproutsocial/seeds-react-drawer 1.2.10 → 2.2.7

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,39 +0,0 @@
1
- import * as React from "react";
2
- import Drawer from "../Drawer";
3
-
4
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
- function DrawerTypes() {
6
- const componentProps = {
7
- id: "drawer-1",
8
- closeButtonLabel: "close",
9
- isOpen: true,
10
- // eslint-disable-next-line @typescript-eslint/no-empty-function
11
- onClose: jest.fn(),
12
- children: "Drawer Content",
13
- };
14
-
15
- return (
16
- <>
17
- <Drawer {...componentProps} />
18
- <Drawer {...componentProps} direction="left">
19
- <Drawer.Header title="test1">
20
- <h1>Drawer Header</h1>
21
- </Drawer.Header>
22
- <Drawer.Content>
23
- <p>Drawer Content</p>
24
- </Drawer.Content>
25
- </Drawer>
26
- {/* @ts-expect-error - test that invalid type is rejected */}
27
- <Drawer />
28
- {/* @ts-expect-error - test that invalid type is rejected */}
29
- <Drawer direction={true}>
30
- <Drawer.Header>
31
- <h1>Drawer Header</h1>
32
- </Drawer.Header>
33
- <Drawer.Content>
34
- <p>Drawer Content</p>
35
- </Drawer.Content>
36
- </Drawer>
37
- </>
38
- );
39
- }
package/src/index.ts DELETED
@@ -1,5 +0,0 @@
1
- import Drawer, { DrawerContext } from "./Drawer";
2
-
3
- export default Drawer;
4
- export { Drawer, DrawerContext };
5
- export * from "./DrawerTypes";
package/src/styles.ts DELETED
@@ -1,35 +0,0 @@
1
- import type { TypeDrawerProps } from "./DrawerTypes";
2
- import styled, { css } from "styled-components";
3
- import { COMMON } from "@sproutsocial/seeds-react-system-props";
4
- import type { TypeSystemCommonProps } from "@sproutsocial/seeds-react-system-props";
5
-
6
- import Box from "@sproutsocial/seeds-react-box";
7
-
8
- export const Content = styled(Box)`
9
- overflow-y: auto;
10
- `;
11
-
12
- interface ContainerType
13
- extends Pick<TypeDrawerProps, "offset" | "direction">,
14
- TypeSystemCommonProps {
15
- width: number;
16
- }
17
-
18
- const Container = styled.div<ContainerType>`
19
- display: flex;
20
- flex-direction: column;
21
- position: fixed;
22
- top: 0;
23
- height: 100%;
24
- width: ${(props) => props.width}px;
25
- background-color: ${(props) => props.theme.colors.container.background.base};
26
- box-shadow: ${(props) => props.theme.shadows.high};
27
- filter: blur(0);
28
-
29
- ${(props) => css`
30
- ${props.direction}: ${props.offset}px;
31
- `}
32
-
33
- ${COMMON}
34
- `;
35
- export default Container;
package/tsconfig.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "extends": "@sproutsocial/seeds-tsconfig/bundler/dom/library-monorepo",
3
- "compilerOptions": {
4
- "jsx": "react-jsx",
5
- "module": "esnext"
6
- },
7
- "include": ["src/**/*"],
8
- "exclude": [
9
- "node_modules",
10
- "dist",
11
- "coverage",
12
- "**/*.stories.tsx",
13
- "**/*.stories.ts"
14
- ]
15
- }
package/tsup.config.ts DELETED
@@ -1,12 +0,0 @@
1
- import { defineConfig } from "tsup";
2
-
3
- export default defineConfig((options) => ({
4
- entry: ["src/index.ts"],
5
- format: ["cjs", "esm"],
6
- clean: true,
7
- legacyOutput: true,
8
- dts: options.dts,
9
- external: ["react"],
10
- sourcemap: true,
11
- metafile: options.metafile,
12
- }));