@team-frieeren/components 1.0.0
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/dist/components/Accordian/Accordion.d.ts +6 -0
- package/dist/components/Accordian/Accordion.stories.d.ts +34 -0
- package/dist/components/Accordian/Accordion.type.d.ts +7 -0
- package/dist/components/BottomSheet/BottomSheet.d.ts +2 -0
- package/dist/components/BottomSheet/BottomSheet.stories.d.ts +10 -0
- package/dist/components/BottomSheet/BottomSheet.type.d.ts +26 -0
- package/dist/components/BottomSheet/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +16 -0
- package/dist/components/Button/Button.stories.d.ts +44 -0
- package/dist/components/Button/Button.type.d.ts +17 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +6 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +15 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Dialog/Dialog.d.ts +2 -0
- package/dist/components/Dialog/Dialog.stories.d.ts +10 -0
- package/dist/components/Dialog/Dialog.type.d.ts +22 -0
- package/dist/components/Funnel/Funnel.d.ts +3 -0
- package/dist/components/Funnel/Funnel.stories.d.ts +31 -0
- package/dist/components/Funnel/Funnel.type.d.ts +13 -0
- package/dist/components/Funnel/index.d.ts +1 -0
- package/dist/components/Funnel/useFunnel.d.ts +9 -0
- package/dist/components/Funnel/useQueryParam.d.ts +6 -0
- package/dist/components/Input/Input.d.ts +3 -0
- package/dist/components/Input/Input.stories.d.ts +6 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Input/input.type.d.ts +10 -0
- package/dist/components/Popover/Popover.d.ts +5 -0
- package/dist/components/Popover/Popover.stories.d.ts +36 -0
- package/dist/components/Popover/Popover.type.d.ts +7 -0
- package/dist/components/Popup/Popup.d.ts +4 -0
- package/dist/components/Popup/Popup.stories.d.ts +21 -0
- package/dist/components/Popup/Popup.type.d.ts +21 -0
- package/dist/components/Popup/index.d.ts +2 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +8 -0
- package/dist/components/RadioGroup/RadioGroup.stories.d.ts +16 -0
- package/dist/components/RadioGroup/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +15 -0
- package/dist/components/Select/Select.stories.d.ts +13 -0
- package/dist/components/Select/Select.type.d.ts +4 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Tabs/Tabs.d.ts +3 -0
- package/dist/components/Tabs/Tabs.stories.d.ts +38 -0
- package/dist/components/Tabs/Tabs.type.d.ts +15 -0
- package/dist/components/Tabs/TabsBase.d.ts +7 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Tabs/useTabsIndicator.d.ts +10 -0
- package/dist/components/Text/Text.d.ts +2 -0
- package/dist/components/Text/Text.stories.d.ts +41 -0
- package/dist/components/Text/Text.type.d.ts +22 -0
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/Toast/Toast.d.ts +5 -0
- package/dist/components/Toast/Toast.stories.d.ts +6 -0
- package/dist/components/Toast/Toast.type.d.ts +31 -0
- package/dist/components/Toast/ToastProvider.d.ts +3 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/useToast.d.ts +2 -0
- package/dist/components/Toast/useToastStack.d.ts +12 -0
- package/dist/components/Toggle/Toggle.d.ts +3 -0
- package/dist/components/Toggle/Toggle.stories.d.ts +22 -0
- package/dist/components/Toggle/Toggle.type.d.ts +6 -0
- package/dist/components/Toggle/index.d.ts +1 -0
- package/dist/components/layout/Box/Box.d.ts +2 -0
- package/dist/components/layout/Box/Box.stories.d.ts +13 -0
- package/dist/components/layout/Box/Box.type.d.ts +10 -0
- package/dist/components/layout/Box/index.d.ts +2 -0
- package/dist/components/layout/Container/Container.d.ts +2 -0
- package/dist/components/layout/Container/Container.stories.d.ts +13 -0
- package/dist/components/layout/Container/Container.type.d.ts +4 -0
- package/dist/components/layout/Container/index.d.ts +2 -0
- package/dist/components/layout/Flex/Flex.d.ts +2 -0
- package/dist/components/layout/Flex/Flex.stories.d.ts +13 -0
- package/dist/components/layout/Flex/Flex.type.d.ts +10 -0
- package/dist/components/layout/Flex/index.d.ts +2 -0
- package/dist/components/layout/Grid/Grid.d.ts +2 -0
- package/dist/components/layout/Grid/Grid.stories.d.ts +13 -0
- package/dist/components/layout/Grid/Grid.type.d.ts +10 -0
- package/dist/components/layout/Grid/index.d.ts +2 -0
- package/dist/hooks/useIsMounted.d.ts +1 -0
- package/dist/hooks/useOverlay/OverlayController.d.ts +10 -0
- package/dist/hooks/useOverlay/OverlayProvider.d.ts +6 -0
- package/dist/hooks/useOverlay/index.d.ts +2 -0
- package/dist/hooks/useOverlay/types.d.ts +5 -0
- package/dist/hooks/useOverlay/useOverlay.d.ts +10 -0
- package/dist/hooks/useRouter.d.ts +3 -0
- package/dist/index.css +1896 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +1378 -0
- package/dist/router/router.type.d.ts +26 -0
- package/dist/router/windowRouter.d.ts +12 -0
- package/dist/shared/components/SwitchCase.d.ts +7 -0
- package/dist/shared/icon/index.d.ts +1 -0
- package/dist/shared/icon/isIcon.d.ts +3 -0
- package/dist/shared/storage/LocalStorage.d.ts +14 -0
- package/dist/shared/storage/MemoryStorage.d.ts +11 -0
- package/dist/shared/storage/SessionStorage.d.ts +14 -0
- package/dist/shared/storage/index.d.ts +2 -0
- package/dist/shared/storage/storage.type.d.ts +9 -0
- package/dist/utils/generateRandomKey.d.ts +1 -0
- package/dist/utils/getSpacingStyle.d.ts +6 -0
- package/package.json +91 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import { Text } from ".";
|
|
3
|
+
import { FontWeight, Typography } from "./Text.type";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: typeof Text;
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
tags: string[];
|
|
11
|
+
argTypes: {
|
|
12
|
+
as: {
|
|
13
|
+
control: "select";
|
|
14
|
+
options: string[];
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
typography: {
|
|
18
|
+
control: "select";
|
|
19
|
+
options: Typography[];
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
fontWeight: {
|
|
23
|
+
control: "select";
|
|
24
|
+
options: FontWeight[];
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
display: {
|
|
28
|
+
control: "select";
|
|
29
|
+
options: string[];
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
textAlign: {
|
|
33
|
+
control: "select";
|
|
34
|
+
options: string[];
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export default meta;
|
|
40
|
+
type Story = StoryObj<typeof meta>;
|
|
41
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AllHTMLAttributes, ElementType, CSSProperties } from "react";
|
|
2
|
+
export declare enum Typography {
|
|
3
|
+
Heading = "heading",
|
|
4
|
+
Body = "body",
|
|
5
|
+
Text = "text"
|
|
6
|
+
}
|
|
7
|
+
export declare enum FontWeight {
|
|
8
|
+
Regular = "regular",
|
|
9
|
+
Medium = "medium",
|
|
10
|
+
Bold = "bold"
|
|
11
|
+
}
|
|
12
|
+
export interface TextProps extends Omit<AllHTMLAttributes<Element>, "as"> {
|
|
13
|
+
as?: ElementType;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
typography?: Typography;
|
|
17
|
+
fontWeight?: FontWeight;
|
|
18
|
+
color?: string;
|
|
19
|
+
ellipsisLines?: number;
|
|
20
|
+
display?: CSSProperties["display"];
|
|
21
|
+
textAlign?: CSSProperties["textAlign"];
|
|
22
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ToastProps, ToastType } from "./Toast.type";
|
|
2
|
+
export declare const Toaster: ({ toasts }: {
|
|
3
|
+
toasts: ToastType[];
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const Toast: ({ ...toast }: ToastProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type ToastTypes = "default" | "success" | "error" | "warning";
|
|
2
|
+
export type ToastActionTypes = "defualt" | "icon-link" | "icon-button";
|
|
3
|
+
export type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
4
|
+
export interface ToastOptions {
|
|
5
|
+
type: ToastTypes;
|
|
6
|
+
action: ToastActionTypes;
|
|
7
|
+
offest: number;
|
|
8
|
+
message: string;
|
|
9
|
+
duration: number;
|
|
10
|
+
position: ToastPosition;
|
|
11
|
+
width?: string;
|
|
12
|
+
radius?: number;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
buttonText?: string;
|
|
15
|
+
onAction?: () => void;
|
|
16
|
+
}
|
|
17
|
+
export interface ToastType extends ToastOptions {
|
|
18
|
+
id: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ToastProviderProps {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
options?: Partial<ToastOptions>;
|
|
23
|
+
}
|
|
24
|
+
export interface ToastContextValue {
|
|
25
|
+
toasts: ToastType[];
|
|
26
|
+
add: (toast: Partial<ToastOptions>) => string;
|
|
27
|
+
remove: (id: string) => void;
|
|
28
|
+
}
|
|
29
|
+
export interface ToastProps extends Partial<ToastOptions> {
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ToastContextValue, ToastProviderProps } from "./Toast.type";
|
|
2
|
+
export declare const ToastContext: import("react").Context<ToastContextValue>;
|
|
3
|
+
export declare const ToastProvider: ({ options, children }: ToastProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ToastType, ToastPosition } from "./Toast.type";
|
|
2
|
+
export declare const useToastStack: (toasts: ToastType[]) => {
|
|
3
|
+
getToasterProps: (toast: ToastType, index: number, position: ToastPosition) => {
|
|
4
|
+
ref: (el: HTMLDivElement | null) => void;
|
|
5
|
+
style: {
|
|
6
|
+
transform: string;
|
|
7
|
+
transition: string;
|
|
8
|
+
};
|
|
9
|
+
className: string;
|
|
10
|
+
};
|
|
11
|
+
groupedToasts: Record<ToastPosition, ToastType[]>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("./Toggle.type").ToggleProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
argTypes: {
|
|
10
|
+
states: {
|
|
11
|
+
control: string[];
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
onChange: {
|
|
15
|
+
action: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
22
|
+
export declare const Toggles: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Toggle } from "./Toggle";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import { Box } from ".";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Box;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AllHTMLAttributes, ElementType, CSSProperties } from "react";
|
|
2
|
+
import { SpacingProps } from "../../../utils/getSpacingStyle";
|
|
3
|
+
export interface BoxProps extends Omit<AllHTMLAttributes<HTMLElement>, "as">, SpacingProps {
|
|
4
|
+
as?: ElementType;
|
|
5
|
+
className?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
width?: string | number;
|
|
8
|
+
height?: string | number;
|
|
9
|
+
display?: CSSProperties["display"];
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import { Container } from ".";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Container;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import { Flex } from "./Flex";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Flex;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
import { BoxProps } from "../Box";
|
|
3
|
+
export interface FlexProps extends BoxProps {
|
|
4
|
+
align?: CSSProperties["alignItems"];
|
|
5
|
+
justify?: CSSProperties["justifyContent"];
|
|
6
|
+
flex?: CSSProperties["flex"];
|
|
7
|
+
direction?: CSSProperties["flexDirection"];
|
|
8
|
+
wrap?: CSSProperties["flexWrap"];
|
|
9
|
+
gap?: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import { Grid } from ".";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Grid;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
import { BoxProps } from "../Box";
|
|
3
|
+
export interface GridProps extends BoxProps {
|
|
4
|
+
columns?: number | string;
|
|
5
|
+
gap?: number;
|
|
6
|
+
rowGap?: number;
|
|
7
|
+
columnGap?: number;
|
|
8
|
+
autoFlow?: CSSProperties["gridAutoFlow"];
|
|
9
|
+
areas?: CSSProperties["gridTemplateAreas"];
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useIsMounted(): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CreateOverlayElement } from "./types";
|
|
2
|
+
interface Props {
|
|
3
|
+
overlayElement: CreateOverlayElement;
|
|
4
|
+
onExit: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface OverlayControlRef {
|
|
7
|
+
close: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const OverlayController: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<OverlayControlRef>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { PropsWithChildren, ReactNode } from "react";
|
|
2
|
+
export declare const OverlayContext: React.Context<{
|
|
3
|
+
mount(id: string, element: ReactNode): void;
|
|
4
|
+
unmount(id: string): void;
|
|
5
|
+
} | null>;
|
|
6
|
+
export declare function OverlayProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CreateOverlayElement } from "./types";
|
|
2
|
+
interface Options {
|
|
3
|
+
exitOnUnmount?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function useOverlay({ exitOnUnmount }?: Options): {
|
|
6
|
+
open: (overlayElement: CreateOverlayElement) => void;
|
|
7
|
+
close: () => void;
|
|
8
|
+
exit: () => void;
|
|
9
|
+
};
|
|
10
|
+
export {};
|