vanilla-jui 1.7.31 → 1.7.32

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 (44) hide show
  1. package/dist/index.d.ts +24 -4
  2. package/dist/index.js +1 -1
  3. package/dist/index.umd.js +1 -1
  4. package/dist/style.css +1 -1
  5. package/package.json +1 -1
  6. package/src/components/accordion.ts +22 -8
  7. package/src/components/flow.ts +1 -1
  8. package/src/components/form.ts +1 -1
  9. package/src/components/modal.ts +1 -1
  10. package/src/components/offcanvas.ts +2 -2
  11. package/src/components/pagination.ts +5 -5
  12. package/src/components/tabs.ts +132 -16
  13. package/src/css/animation.css +7 -3
  14. package/src/css/card.css +10 -10
  15. package/src/css/font.css +3 -6
  16. package/src/css/icon.css +3 -20
  17. package/src/css/layout.css +11 -18
  18. package/src/css/status.css +39 -3
  19. package/src/css/themes/default/accordion.css +13 -45
  20. package/src/css/themes/default/avatar.css +2 -3
  21. package/src/css/themes/default/badge.css +14 -22
  22. package/src/css/themes/default/breadcrumb.css +11 -12
  23. package/src/css/themes/default/button.css +101 -159
  24. package/src/css/themes/default/editor.css +36 -36
  25. package/src/css/themes/default/flow.css +4 -4
  26. package/src/css/themes/default/form.css +110 -217
  27. package/src/css/themes/default/loading.css +48 -63
  28. package/src/css/themes/default/menu.css +17 -17
  29. package/src/css/themes/default/modal.css +9 -9
  30. package/src/css/themes/default/offcanvas.css +3 -3
  31. package/src/css/themes/default/swiper.css +18 -18
  32. package/src/css/themes/default/tabs.css +38 -24
  33. package/src/css/themes/default/theme-palette.css +22 -18
  34. package/src/css/themes/default/tip.css +24 -13
  35. package/src/css/themes/default/toast.css +65 -45
  36. package/src/css/themes/default/toolbar.css +2 -2
  37. package/src/css/themes/default/tooltip.css +2 -3
  38. package/src/css/tokens.css +89 -59
  39. package/src/css/tokens_/345/211/257/346/234/254.css +4 -4
  40. package/src/icons/index.ts +9 -7
  41. package/src/locales/index.ts +3 -1
  42. package/src/primitives/theme.ts +7 -10
  43. package/src/primitives/toast.ts +191 -107
  44. 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 ToastConfirmProps extends ToastClassNameOptions {
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?: ToastConfirmProps): HTMLElement;
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;