vanilla-jui 1.7.31 → 1.7.33
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/index.d.ts +24 -4
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/accordion.ts +22 -8
- package/src/components/flow.ts +1 -1
- package/src/components/form.ts +1 -1
- package/src/components/modal.ts +1 -1
- package/src/components/offcanvas.ts +2 -2
- package/src/components/pagination.ts +5 -5
- package/src/components/tabs.ts +132 -16
- package/src/css/animation.css +7 -3
- package/src/css/card.css +10 -10
- package/src/css/font.css +3 -6
- package/src/css/icon.css +3 -20
- package/src/css/layout.css +11 -18
- package/src/css/status.css +39 -3
- package/src/css/themes/default/accordion.css +13 -45
- package/src/css/themes/default/avatar.css +2 -3
- package/src/css/themes/default/badge.css +14 -22
- package/src/css/themes/default/breadcrumb.css +11 -12
- package/src/css/themes/default/button.css +85 -162
- package/src/css/themes/default/editor.css +36 -36
- package/src/css/themes/default/flow.css +4 -4
- package/src/css/themes/default/form.css +110 -217
- package/src/css/themes/default/loading.css +48 -63
- package/src/css/themes/default/menu.css +17 -17
- package/src/css/themes/default/modal.css +9 -9
- package/src/css/themes/default/offcanvas.css +3 -3
- package/src/css/themes/default/swiper.css +18 -18
- package/src/css/themes/default/tabs.css +38 -24
- package/src/css/themes/default/theme-palette.css +22 -18
- package/src/css/themes/default/tip.css +24 -13
- package/src/css/themes/default/toast.css +66 -46
- package/src/css/themes/default/toolbar.css +2 -2
- package/src/css/themes/default/tooltip.css +2 -3
- package/src/css/tokens.css +89 -59
- package/src/css/tokens_/345/211/257/346/234/254.css +4 -4
- package/src/icons/index.ts +9 -7
- package/src/locales/index.ts +3 -1
- package/src/primitives/theme.ts +7 -10
- package/src/primitives/toast.ts +191 -107
- package/src/utilities/browser.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -696,6 +696,7 @@ export interface ToastClassNames {
|
|
|
696
696
|
toast: string;
|
|
697
697
|
icon: string;
|
|
698
698
|
message: string;
|
|
699
|
+
description: string;
|
|
699
700
|
lite: string;
|
|
700
701
|
confirm: string;
|
|
701
702
|
buttons: string;
|
|
@@ -715,34 +716,52 @@ export interface ToastThemeOptions extends ToastClassNameOptions {
|
|
|
715
716
|
theme?: ToastTheme;
|
|
716
717
|
}
|
|
717
718
|
export interface ToastOptions extends ToastThemeOptions {
|
|
719
|
+
description?: string;
|
|
718
720
|
duration?: number;
|
|
719
721
|
once?: boolean;
|
|
722
|
+
onClose?: () => void | Promise<void>;
|
|
723
|
+
}
|
|
724
|
+
export interface LoadingToastOptions extends ToastOptions {
|
|
720
725
|
loading?: MaybeAccessor<boolean>;
|
|
721
726
|
text?: {
|
|
722
727
|
loading?: string;
|
|
723
728
|
};
|
|
724
|
-
onClose?: () => void | Promise<void>;
|
|
725
729
|
onCancel?: () => void | Promise<void>;
|
|
726
730
|
}
|
|
727
|
-
export interface
|
|
728
|
-
once?: boolean;
|
|
731
|
+
export interface ConfirmToastOptions extends ToastOptions {
|
|
729
732
|
text?: {
|
|
730
733
|
close?: string;
|
|
731
734
|
confirm?: string;
|
|
732
735
|
};
|
|
733
736
|
onConfirm?: () => void | Promise<void>;
|
|
737
|
+
}
|
|
738
|
+
export type ToastConfirmProps = ConfirmToastOptions;
|
|
739
|
+
export interface PromiseToastOptions extends ToastClassNameOptions {
|
|
740
|
+
duration?: number;
|
|
741
|
+
text?: {
|
|
742
|
+
loading?: string;
|
|
743
|
+
success?: string;
|
|
744
|
+
error?: string;
|
|
745
|
+
};
|
|
746
|
+
onCancel?: () => void | Promise<void>;
|
|
734
747
|
onClose?: () => void | Promise<void>;
|
|
748
|
+
onSuccess?: () => void | Promise<void>;
|
|
749
|
+
onError?: () => void | Promise<void>;
|
|
735
750
|
}
|
|
736
751
|
declare function hide(toast: HTMLElement | null | undefined): void;
|
|
737
752
|
declare function show(message?: string, options?: ToastOptions): HTMLElement;
|
|
753
|
+
declare function loading(message?: string, options?: LoadingToastOptions): HTMLElement;
|
|
754
|
+
declare function promise<T>(task: Promise<T>, options?: PromiseToastOptions): HTMLElement;
|
|
738
755
|
declare function lite(message?: string, duration?: number, className?: ToastClassNameConfig): HTMLElement;
|
|
739
|
-
declare function confirm(message?: string, props?:
|
|
756
|
+
declare function confirm(message?: string, props?: ConfirmToastOptions): HTMLElement;
|
|
740
757
|
declare function clearAll(): void;
|
|
741
758
|
export declare const Toast: {
|
|
742
759
|
timers: Set<string>;
|
|
743
760
|
disposers: Map<HTMLElement, () => void>;
|
|
744
761
|
configure(options?: ToastClassNameOptions): ToastClassNameOptions;
|
|
745
762
|
show: typeof show;
|
|
763
|
+
loading: typeof loading;
|
|
764
|
+
promise: typeof promise;
|
|
746
765
|
info: (message?: string, options?: ToastOptions) => HTMLElement;
|
|
747
766
|
success: (message?: string, options?: ToastOptions) => HTMLElement;
|
|
748
767
|
warning: (message?: string, options?: ToastOptions) => HTMLElement;
|
|
@@ -1597,6 +1616,7 @@ export interface TabsClassNames {
|
|
|
1597
1616
|
wrap: string;
|
|
1598
1617
|
list: string;
|
|
1599
1618
|
tab: string;
|
|
1619
|
+
indicator: string;
|
|
1600
1620
|
panelWrap: string;
|
|
1601
1621
|
panel: string;
|
|
1602
1622
|
dragging: string;
|