@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.
Files changed (101) hide show
  1. package/dist/components/Accordian/Accordion.d.ts +6 -0
  2. package/dist/components/Accordian/Accordion.stories.d.ts +34 -0
  3. package/dist/components/Accordian/Accordion.type.d.ts +7 -0
  4. package/dist/components/BottomSheet/BottomSheet.d.ts +2 -0
  5. package/dist/components/BottomSheet/BottomSheet.stories.d.ts +10 -0
  6. package/dist/components/BottomSheet/BottomSheet.type.d.ts +26 -0
  7. package/dist/components/BottomSheet/index.d.ts +2 -0
  8. package/dist/components/Button/Button.d.ts +16 -0
  9. package/dist/components/Button/Button.stories.d.ts +44 -0
  10. package/dist/components/Button/Button.type.d.ts +17 -0
  11. package/dist/components/Button/index.d.ts +2 -0
  12. package/dist/components/Checkbox/Checkbox.d.ts +6 -0
  13. package/dist/components/Checkbox/Checkbox.stories.d.ts +15 -0
  14. package/dist/components/Checkbox/index.d.ts +2 -0
  15. package/dist/components/Dialog/Dialog.d.ts +2 -0
  16. package/dist/components/Dialog/Dialog.stories.d.ts +10 -0
  17. package/dist/components/Dialog/Dialog.type.d.ts +22 -0
  18. package/dist/components/Funnel/Funnel.d.ts +3 -0
  19. package/dist/components/Funnel/Funnel.stories.d.ts +31 -0
  20. package/dist/components/Funnel/Funnel.type.d.ts +13 -0
  21. package/dist/components/Funnel/index.d.ts +1 -0
  22. package/dist/components/Funnel/useFunnel.d.ts +9 -0
  23. package/dist/components/Funnel/useQueryParam.d.ts +6 -0
  24. package/dist/components/Input/Input.d.ts +3 -0
  25. package/dist/components/Input/Input.stories.d.ts +6 -0
  26. package/dist/components/Input/index.d.ts +2 -0
  27. package/dist/components/Input/input.type.d.ts +10 -0
  28. package/dist/components/Popover/Popover.d.ts +5 -0
  29. package/dist/components/Popover/Popover.stories.d.ts +36 -0
  30. package/dist/components/Popover/Popover.type.d.ts +7 -0
  31. package/dist/components/Popup/Popup.d.ts +4 -0
  32. package/dist/components/Popup/Popup.stories.d.ts +21 -0
  33. package/dist/components/Popup/Popup.type.d.ts +21 -0
  34. package/dist/components/Popup/index.d.ts +2 -0
  35. package/dist/components/RadioGroup/RadioGroup.d.ts +8 -0
  36. package/dist/components/RadioGroup/RadioGroup.stories.d.ts +16 -0
  37. package/dist/components/RadioGroup/index.d.ts +2 -0
  38. package/dist/components/Select/Select.d.ts +15 -0
  39. package/dist/components/Select/Select.stories.d.ts +13 -0
  40. package/dist/components/Select/Select.type.d.ts +4 -0
  41. package/dist/components/Select/index.d.ts +2 -0
  42. package/dist/components/Tabs/Tabs.d.ts +3 -0
  43. package/dist/components/Tabs/Tabs.stories.d.ts +38 -0
  44. package/dist/components/Tabs/Tabs.type.d.ts +15 -0
  45. package/dist/components/Tabs/TabsBase.d.ts +7 -0
  46. package/dist/components/Tabs/index.d.ts +1 -0
  47. package/dist/components/Tabs/useTabsIndicator.d.ts +10 -0
  48. package/dist/components/Text/Text.d.ts +2 -0
  49. package/dist/components/Text/Text.stories.d.ts +41 -0
  50. package/dist/components/Text/Text.type.d.ts +22 -0
  51. package/dist/components/Text/index.d.ts +2 -0
  52. package/dist/components/Toast/Toast.d.ts +5 -0
  53. package/dist/components/Toast/Toast.stories.d.ts +6 -0
  54. package/dist/components/Toast/Toast.type.d.ts +31 -0
  55. package/dist/components/Toast/ToastProvider.d.ts +3 -0
  56. package/dist/components/Toast/index.d.ts +2 -0
  57. package/dist/components/Toast/useToast.d.ts +2 -0
  58. package/dist/components/Toast/useToastStack.d.ts +12 -0
  59. package/dist/components/Toggle/Toggle.d.ts +3 -0
  60. package/dist/components/Toggle/Toggle.stories.d.ts +22 -0
  61. package/dist/components/Toggle/Toggle.type.d.ts +6 -0
  62. package/dist/components/Toggle/index.d.ts +1 -0
  63. package/dist/components/layout/Box/Box.d.ts +2 -0
  64. package/dist/components/layout/Box/Box.stories.d.ts +13 -0
  65. package/dist/components/layout/Box/Box.type.d.ts +10 -0
  66. package/dist/components/layout/Box/index.d.ts +2 -0
  67. package/dist/components/layout/Container/Container.d.ts +2 -0
  68. package/dist/components/layout/Container/Container.stories.d.ts +13 -0
  69. package/dist/components/layout/Container/Container.type.d.ts +4 -0
  70. package/dist/components/layout/Container/index.d.ts +2 -0
  71. package/dist/components/layout/Flex/Flex.d.ts +2 -0
  72. package/dist/components/layout/Flex/Flex.stories.d.ts +13 -0
  73. package/dist/components/layout/Flex/Flex.type.d.ts +10 -0
  74. package/dist/components/layout/Flex/index.d.ts +2 -0
  75. package/dist/components/layout/Grid/Grid.d.ts +2 -0
  76. package/dist/components/layout/Grid/Grid.stories.d.ts +13 -0
  77. package/dist/components/layout/Grid/Grid.type.d.ts +10 -0
  78. package/dist/components/layout/Grid/index.d.ts +2 -0
  79. package/dist/hooks/useIsMounted.d.ts +1 -0
  80. package/dist/hooks/useOverlay/OverlayController.d.ts +10 -0
  81. package/dist/hooks/useOverlay/OverlayProvider.d.ts +6 -0
  82. package/dist/hooks/useOverlay/index.d.ts +2 -0
  83. package/dist/hooks/useOverlay/types.d.ts +5 -0
  84. package/dist/hooks/useOverlay/useOverlay.d.ts +10 -0
  85. package/dist/hooks/useRouter.d.ts +3 -0
  86. package/dist/index.css +1896 -0
  87. package/dist/index.d.ts +21 -0
  88. package/dist/index.js +1378 -0
  89. package/dist/router/router.type.d.ts +26 -0
  90. package/dist/router/windowRouter.d.ts +12 -0
  91. package/dist/shared/components/SwitchCase.d.ts +7 -0
  92. package/dist/shared/icon/index.d.ts +1 -0
  93. package/dist/shared/icon/isIcon.d.ts +3 -0
  94. package/dist/shared/storage/LocalStorage.d.ts +14 -0
  95. package/dist/shared/storage/MemoryStorage.d.ts +11 -0
  96. package/dist/shared/storage/SessionStorage.d.ts +14 -0
  97. package/dist/shared/storage/index.d.ts +2 -0
  98. package/dist/shared/storage/storage.type.d.ts +9 -0
  99. package/dist/utils/generateRandomKey.d.ts +1 -0
  100. package/dist/utils/getSpacingStyle.d.ts +6 -0
  101. 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,2 @@
1
+ export { Text } from "./Text";
2
+ export type { TextProps } from "./Text.type";
@@ -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,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Toast } from "./Toast";
3
+ declare const meta: Meta<typeof Toast>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Primary: Story;
@@ -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,2 @@
1
+ export { useToast } from "./useToast";
2
+ export { ToastProvider } from "./ToastProvider";
@@ -0,0 +1,2 @@
1
+ import { ToastContextValue } from "./Toast.type";
2
+ export declare const useToast: () => ToastContextValue;
@@ -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,3 @@
1
+ import { ToggleProps } from "./Toggle.type";
2
+ import "./Toggle.scss";
3
+ export declare const Toggle: import("react").ForwardRefExoticComponent<ToggleProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -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,6 @@
1
+ export type ToggleStates = "active" | "inactive";
2
+ export interface ToggleProps {
3
+ className?: string;
4
+ states?: ToggleStates;
5
+ onChange?: (checked: boolean) => void;
6
+ }
@@ -0,0 +1 @@
1
+ export { Toggle } from "./Toggle";
@@ -0,0 +1,2 @@
1
+ import { BoxProps } from "./Box.type";
2
+ export declare function Box({ as: Component, className, style, width, height, display, children, ...rest }: BoxProps): import("react/jsx-runtime").JSX.Element;
@@ -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,2 @@
1
+ export { Box } from "./Box";
2
+ export type { BoxProps } from "./Box.type";
@@ -0,0 +1,2 @@
1
+ import { ContainerProps } from "./Container.type";
2
+ export declare function Container({ as: Component, maxWidth, className, style, ...rest }: ContainerProps): import("react/jsx-runtime").JSX.Element;
@@ -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,4 @@
1
+ import { BoxProps } from "../Box";
2
+ export interface ContainerProps extends BoxProps {
3
+ maxWidth?: string | number;
4
+ }
@@ -0,0 +1,2 @@
1
+ export { Container } from "./Container";
2
+ export type { ContainerProps } from "./Container.type";
@@ -0,0 +1,2 @@
1
+ import { FlexProps } from "./Flex.type";
2
+ export declare function Flex({ as: Component, align, justify, flex, direction, wrap, gap, className, style, ...rest }: FlexProps): import("react/jsx-runtime").JSX.Element;
@@ -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,2 @@
1
+ export { Flex } from "./Flex";
2
+ export type { FlexProps } from "./Flex.type";
@@ -0,0 +1,2 @@
1
+ import { GridProps } from "./Grid.type";
2
+ export declare function Grid({ as: Component, columns, gap, rowGap, columnGap, autoFlow, areas, className, style, ...rest }: GridProps): import("react/jsx-runtime").JSX.Element;
@@ -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,2 @@
1
+ export { Grid } from "./Grid";
2
+ export type { GridProps } from "./Grid.type";
@@ -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,2 @@
1
+ export { OverlayProvider, OverlayContext } from "./OverlayProvider";
2
+ export { useOverlay } from "./useOverlay";
@@ -0,0 +1,5 @@
1
+ export type CreateOverlayElement = (props: {
2
+ isOpen: boolean;
3
+ close: () => void;
4
+ exit: () => void;
5
+ }) => 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 {};
@@ -0,0 +1,3 @@
1
+ import { SafeRouter } from "../router/router.type";
2
+ export declare const RouterProvider: import("react").Provider<SafeRouter | null>;
3
+ export declare function useRouter(): SafeRouter;