@adamosuiteservices/ui 1.2.3 → 1.2.5
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 +11 -7
- package/dist/components/layout/toaster/index.d.ts +2 -1
- package/dist/components/layout/toaster/toast-manager.d.ts +6 -0
- package/dist/components/layout/toaster/toast-observable.d.ts +8 -0
- package/dist/components/layout/toaster/toaster.d.ts +12 -18
- package/dist/components/layout/toaster/toaster.stories.d.ts +0 -2
- package/dist/components/ui/alert/alert.d.ts +1 -1
- package/dist/components/ui/badge/badge.d.ts +1 -1
- package/dist/components/ui/button/button.d.ts +1 -1
- package/dist/components/ui/card/card.d.ts +1 -1
- package/dist/components/ui/progress/progress.d.ts +1 -1
- package/dist/custom-layered-styles.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind-animations.css +1 -1
- package/dist/tailwind-theme.css +1 -1
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.js +83 -69
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +16 -16
- package/package.json +1 -1
- package/dist/components/layout/toaster/use-toast.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
# Adamo UI
|
|
2
|
-
|
|
3
|
-
## Installation
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
npm install @adamosuiteservices/ui react-day-picker@^9.11.1 cmdk@^1.1.1 date-fns@^4.1.0
|
|
7
|
-
```
|
|
1
|
+
# Adamo UI
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @adamosuiteservices/ui react-day-picker@^9.11.1 cmdk@^1.1.1 date-fns@^4.1.0
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Storybook docs
|
|
10
|
+
|
|
11
|
+
[Storybook docs](https://marvelous-panda-f6ab35.netlify.app)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Toast } from './toaster';
|
|
2
|
+
declare class _ToastObservable {
|
|
3
|
+
subscribers: ((toast: Toast) => void)[];
|
|
4
|
+
subscribe(callback: (toast: Toast) => void): () => void;
|
|
5
|
+
emit(toast: Toast): void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ToastObservable: _ToastObservable;
|
|
8
|
+
export {};
|
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnimationEventHandler } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
declare const toastVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
3
|
+
export declare const toastVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "success" | "warning" | "destructive" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
-
|
|
6
|
+
export declare const TOAST_AUTO_CLOSE_DEFAULT = 3000;
|
|
7
|
+
export type Toast = {
|
|
7
8
|
id?: string;
|
|
8
|
-
message: string;
|
|
9
|
-
variant?: VariantProps<typeof Toast>["variant"];
|
|
10
|
-
autoClose?: number;
|
|
11
|
-
};
|
|
12
|
-
type ToastContextType = {
|
|
13
|
-
showToast: (options: ToastOptions) => void;
|
|
14
|
-
closeToast: () => void;
|
|
15
|
-
};
|
|
16
|
-
declare const ToasterContext: import('react').Context<ToastContextType | undefined>;
|
|
17
|
-
declare function ToasterProvider({ children }: PropsWithChildren): import('react').FunctionComponentElement<import('react').ProviderProps<ToastContextType | undefined>>;
|
|
18
|
-
type ToastProps = Readonly<{
|
|
19
9
|
message: string;
|
|
20
10
|
variant?: VariantProps<typeof toastVariants>["variant"];
|
|
21
|
-
open?: boolean;
|
|
22
11
|
autoClose?: number;
|
|
23
12
|
onClose?: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare function Toaster(): import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export type ToastProps = Readonly<Toast & {
|
|
16
|
+
closing: boolean;
|
|
17
|
+
onClosing: () => void;
|
|
18
|
+
animationEnded: AnimationEventHandler<HTMLDivElement>;
|
|
24
19
|
}>;
|
|
25
|
-
declare function Toast({
|
|
26
|
-
export { Toast, ToasterProvider, ToasterContext, type ToastOptions, type ToastContextType, };
|
|
20
|
+
export declare function Toast({ variant, message, autoClose, onClose, closing, onClosing, animationEnded, }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,7 +9,5 @@ export declare const Success: Story;
|
|
|
9
9
|
export declare const Warning: Story;
|
|
10
10
|
export declare const Destructive: Story;
|
|
11
11
|
export declare const CustomDuration: Story;
|
|
12
|
-
export declare const QueuedToasts: Story;
|
|
13
12
|
export declare const RealWorldExamples: Story;
|
|
14
13
|
export declare const LongMessages: Story;
|
|
15
|
-
export declare const ManualClose: Story;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const alertVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "success" | "warning" | "destructive" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "success" | "warning" | "destructive" | "default-medium" | "waiting" | "waiting-medium" | "secondary" | "success-medium" | "warning-medium" | "destructive-medium" | "muted" | "outline" | null | undefined;
|
|
5
5
|
size?: "lg" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
declare function Badge({ className, variant, size, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "link" | "default" | "
|
|
4
|
+
variant?: "link" | "default" | "success" | "warning" | "destructive" | "secondary" | "success-medium" | "warning-medium" | "destructive-medium" | "outline" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "icon" | "lg" | "sm" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const cardVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "success" | "warning" | "destructive" | "muted" | "primary" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
declare function Card({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof cardVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
4
4
|
declare const progressRootVariants: (props?: ({
|
|
5
|
-
variant?: "default" | "
|
|
5
|
+
variant?: "default" | "success" | "warning" | "destructive" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
type ProgressProps = React.ComponentProps<typeof ProgressPrimitive.Root> & VariantProps<typeof progressRootVariants>;
|
|
8
8
|
export declare function Progress({ className, value, variant, ...props }: ProgressProps): import("react/jsx-runtime").JSX.Element;
|