-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
5,305 additions
and
1,895 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
.DS_Store | ||
node_modules | ||
/dist/src/ | ||
|
||
|
||
# local env files | ||
.env.local | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
import type { Context, Notification } from "./types"; | ||
export interface Props { | ||
maxNotifications?: number; | ||
enter?: string; | ||
enterFrom?: string; | ||
enterTo?: string; | ||
leave?: string; | ||
leaveFrom?: string; | ||
leaveTo?: string; | ||
move?: string; | ||
moveDelay?: string; | ||
} | ||
declare const _sfc_main: import("vue").DefineComponent<{ | ||
maxNotifications: { | ||
type: NumberConstructor; | ||
required: false; | ||
default: number; | ||
}; | ||
enter: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
enterFrom: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
enterTo: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
leave: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
leaveFrom: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
leaveTo: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
move: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
moveDelay: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
}, { | ||
props: any; | ||
emit: (e: "close") => void; | ||
context: Context; | ||
state: { | ||
notifications: { | ||
[x: string]: unknown; | ||
id: number; | ||
group: string; | ||
}[]; | ||
timeouts: Record<string, number>; | ||
}; | ||
notificationsByGroup: import("vue").ComputedRef<{ | ||
[x: string]: unknown; | ||
id: number; | ||
group: string; | ||
}[]>; | ||
sortedNotifications: import("vue").ComputedRef<{ | ||
[x: string]: unknown; | ||
id: number; | ||
group: string; | ||
}[]>; | ||
remove: (id: Notification["id"]) => void; | ||
add: ({ notification, timeout, }: { | ||
notification: Notification; | ||
timeout?: number | undefined; | ||
}) => void; | ||
close: (id: Notification["id"]) => void; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
maxNotifications: { | ||
type: NumberConstructor; | ||
required: false; | ||
default: number; | ||
}; | ||
enter: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
enterFrom: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
enterTo: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
leave: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
leaveFrom: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
leaveTo: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
move: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
moveDelay: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
}>> & { | ||
onClose?: ((...args: any[]) => any) | undefined; | ||
}, { | ||
maxNotifications: number; | ||
enter: string; | ||
enterFrom: string; | ||
enterTo: string; | ||
leave: string; | ||
leaveFrom: string; | ||
leaveTo: string; | ||
move: string; | ||
moveDelay: string; | ||
}>; | ||
export default _sfc_main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
export interface Props { | ||
group?: string; | ||
position?: "top" | "bottom"; | ||
} | ||
declare const _sfc_main: import("vue").DefineComponent<{ | ||
group: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
position: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
}, { | ||
props: any; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
group: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
position: { | ||
type: StringConstructor; | ||
required: false; | ||
default: string; | ||
}; | ||
}>>, { | ||
group: string; | ||
position: string; | ||
}>; | ||
export default _sfc_main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export declare const CONTEXT_KEY = "context"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { Notification, NotificationSchema } from "./types"; | ||
declare type UserNotification<T extends NotificationSchema> = Omit<Notification<T>, "id" | "group"> & Partial<Pick<Notification<T>, "group">>; | ||
declare const createNotifier: <T extends NotificationSchema>() => (notification: UserNotification<T>, timeout?: number) => () => void; | ||
export default createNotifier; |
Oops, something went wrong.