@equal-experts/kuat-vue 0.5.0 → 0.6.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.
@@ -0,0 +1,52 @@
1
+ import { HTMLAttributes } from 'vue';
2
+ import { CarouselApi, CarouselItemBasis, CarouselOrientation } from './context';
3
+
4
+ export type CarouselEventHandler = (api: CarouselApi, eventName: string) => void;
5
+ export type CarouselEventHandlers = Partial<Record<string, CarouselEventHandler>>;
6
+ interface Props {
7
+ class?: HTMLAttributes["class"];
8
+ opts?: Record<string, unknown>;
9
+ basis?: CarouselItemBasis;
10
+ orientation?: CarouselOrientation;
11
+ plugins?: unknown[];
12
+ setApi?: (api: CarouselApi | undefined) => void;
13
+ events?: CarouselEventHandlers;
14
+ }
15
+ declare function __VLS_template(): {
16
+ controls?(_: {}): any;
17
+ content?(_: {}): any;
18
+ };
19
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
20
+ basis: number;
21
+ orientation: string;
22
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
23
+ basis: number;
24
+ orientation: string;
25
+ }>>> & Readonly<{}>, {
26
+ orientation: CarouselOrientation;
27
+ basis: CarouselItemBasis;
28
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
29
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
30
+ export default _default;
31
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
32
+ type __VLS_TypePropsToRuntimeProps<T> = {
33
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
34
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
35
+ } : {
36
+ type: import('vue').PropType<T[K]>;
37
+ required: true;
38
+ };
39
+ };
40
+ type __VLS_WithDefaults<P, D> = {
41
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
42
+ default: D[K];
43
+ }> : P[K];
44
+ };
45
+ type __VLS_Prettify<T> = {
46
+ [K in keyof T]: T[K];
47
+ } & {};
48
+ type __VLS_WithTemplateSlots<T, S> = T & {
49
+ new (): {
50
+ $slots: S;
51
+ };
52
+ };
@@ -0,0 +1,25 @@
1
+ import { HTMLAttributes } from 'vue';
2
+
3
+ interface Props {
4
+ class?: HTMLAttributes["class"];
5
+ }
6
+ declare function __VLS_template(): {
7
+ default?(_: {}): any;
8
+ };
9
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
10
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
11
+ export default _default;
12
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
+ type __VLS_TypePropsToRuntimeProps<T> = {
14
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
15
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
16
+ } : {
17
+ type: import('vue').PropType<T[K]>;
18
+ required: true;
19
+ };
20
+ };
21
+ type __VLS_WithTemplateSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,27 @@
1
+ import { HTMLAttributes } from 'vue';
2
+ import { CarouselItemBasis } from './context';
3
+
4
+ interface Props {
5
+ class?: HTMLAttributes["class"];
6
+ basis?: CarouselItemBasis;
7
+ }
8
+ declare function __VLS_template(): {
9
+ default?(_: {}): any;
10
+ };
11
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
13
+ export default _default;
14
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
15
+ type __VLS_TypePropsToRuntimeProps<T> = {
16
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
17
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
18
+ } : {
19
+ type: import('vue').PropType<T[K]>;
20
+ required: true;
21
+ };
22
+ };
23
+ type __VLS_WithTemplateSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -0,0 +1,16 @@
1
+ import { HTMLAttributes } from 'vue';
2
+
3
+ interface Props {
4
+ class?: HTMLAttributes["class"];
5
+ }
6
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
7
+ export default _default;
8
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
+ type __VLS_TypePropsToRuntimeProps<T> = {
10
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
11
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
+ } : {
13
+ type: import('vue').PropType<T[K]>;
14
+ required: true;
15
+ };
16
+ };
@@ -0,0 +1,16 @@
1
+ import { HTMLAttributes } from 'vue';
2
+
3
+ interface Props {
4
+ class?: HTMLAttributes["class"];
5
+ }
6
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
7
+ export default _default;
8
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
+ type __VLS_TypePropsToRuntimeProps<T> = {
10
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
11
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
+ } : {
13
+ type: import('vue').PropType<T[K]>;
14
+ required: true;
15
+ };
16
+ };
@@ -0,0 +1,18 @@
1
+ import { InjectionKey, Ref } from 'vue';
2
+ import { default as useEmblaCarousel } from 'embla-carousel-vue';
3
+
4
+ export type CarouselOrientation = "horizontal" | "vertical";
5
+ export type CarouselItemBasis = 1 | 2 | 3;
6
+ type EmblaApiRef = ReturnType<typeof useEmblaCarousel>[1];
7
+ export type CarouselApi = NonNullable<EmblaApiRef["value"]>;
8
+ export interface CarouselContextValue {
9
+ api: Ref<CarouselApi | undefined>;
10
+ basis: Ref<CarouselItemBasis>;
11
+ orientation: Ref<CarouselOrientation>;
12
+ scrollPrev: () => void;
13
+ scrollNext: () => void;
14
+ canScrollPrev: Ref<boolean>;
15
+ canScrollNext: Ref<boolean>;
16
+ }
17
+ export declare const carouselContextKey: InjectionKey<CarouselContextValue>;
18
+ export {};
@@ -0,0 +1,7 @@
1
+ export { default as Carousel } from './Carousel.vue';
2
+ export { default as CarouselContent } from './CarouselContent.vue';
3
+ export { default as CarouselItem } from './CarouselItem.vue';
4
+ export { default as CarouselPrevious } from './CarouselPrevious.vue';
5
+ export { default as CarouselNext } from './CarouselNext.vue';
6
+ export type { CarouselItemBasis, CarouselOrientation, CarouselApi } from './context';
7
+ export type { CarouselEventHandler, CarouselEventHandlers } from './Carousel.vue';
@@ -1,15 +1,19 @@
1
1
  import { HTMLAttributes } from 'vue';
2
+ import { CarouselApi, CarouselEventHandlers, CarouselOrientation } from '../carousel';
2
3
 
3
4
  export type KuatCarouselSlidesPerView = 1 | 2 | 3;
4
5
  interface Props {
5
6
  class?: HTMLAttributes["class"];
6
7
  opts?: Record<string, unknown>;
8
+ plugins?: unknown[];
9
+ events?: CarouselEventHandlers;
10
+ setApi?: (api: CarouselApi | undefined) => void;
7
11
  slidesPerView?: KuatCarouselSlidesPerView;
8
- orientation?: "horizontal" | "vertical";
12
+ orientation?: CarouselOrientation;
9
13
  }
10
14
  declare function __VLS_template(): {
11
- content?(_: {}): any;
12
15
  controls?(_: {}): any;
16
+ content?(_: {}): any;
13
17
  };
14
18
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
15
19
  slidesPerView: number;
@@ -18,7 +22,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
18
22
  slidesPerView: number;
19
23
  orientation: string;
20
24
  }>>> & Readonly<{}>, {
21
- orientation: "horizontal" | "vertical";
25
+ orientation: CarouselOrientation;
22
26
  slidesPerView: KuatCarouselSlidesPerView;
23
27
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
24
28
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
@@ -1,7 +1,9 @@
1
1
  import { HTMLAttributes } from 'vue';
2
+ import { CarouselItemBasis } from '../carousel';
2
3
 
3
4
  interface Props {
4
5
  class?: HTMLAttributes["class"];
6
+ basis?: CarouselItemBasis;
5
7
  }
6
8
  declare function __VLS_template(): {
7
9
  default?(_: {}): any;
@@ -0,0 +1,54 @@
1
+ import { SonnerPosition } from './constants';
2
+
3
+ type ClassNamesMap = Record<string, string>;
4
+ type ToastOptions = {
5
+ classNames?: ClassNamesMap;
6
+ } & Record<string, unknown>;
7
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
8
+ class?: string;
9
+ containerAriaLabel?: string;
10
+ expand?: boolean;
11
+ position?: SonnerPosition;
12
+ toastOptions?: ToastOptions;
13
+ visibleToasts?: number;
14
+ }>, {
15
+ containerAriaLabel: string;
16
+ expand: boolean;
17
+ position: string;
18
+ visibleToasts: number;
19
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
20
+ class?: string;
21
+ containerAriaLabel?: string;
22
+ expand?: boolean;
23
+ position?: SonnerPosition;
24
+ toastOptions?: ToastOptions;
25
+ visibleToasts?: number;
26
+ }>, {
27
+ containerAriaLabel: string;
28
+ expand: boolean;
29
+ position: string;
30
+ visibleToasts: number;
31
+ }>>> & Readonly<{}>, {
32
+ position: SonnerPosition;
33
+ containerAriaLabel: string;
34
+ expand: boolean;
35
+ visibleToasts: number;
36
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
37
+ export default _default;
38
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
39
+ type __VLS_TypePropsToRuntimeProps<T> = {
40
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
41
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
42
+ } : {
43
+ type: import('vue').PropType<T[K]>;
44
+ required: true;
45
+ };
46
+ };
47
+ type __VLS_WithDefaults<P, D> = {
48
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
49
+ default: D[K];
50
+ }> : P[K];
51
+ };
52
+ type __VLS_Prettify<T> = {
53
+ [K in keyof T]: T[K];
54
+ } & {};
@@ -0,0 +1,53 @@
1
+ import { Component } from 'vue';
2
+
3
+ export type SonnerContentAction = {
4
+ label: string;
5
+ onClick: () => void;
6
+ ariaLabel?: string;
7
+ };
8
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
9
+ action?: SonnerContentAction;
10
+ description?: string;
11
+ leftIcon?: Component | null;
12
+ showLeftIcon?: boolean;
13
+ title: string;
14
+ }>, {
15
+ action: undefined;
16
+ description: undefined;
17
+ leftIcon: null;
18
+ showLeftIcon: boolean;
19
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
20
+ action?: SonnerContentAction;
21
+ description?: string;
22
+ leftIcon?: Component | null;
23
+ showLeftIcon?: boolean;
24
+ title: string;
25
+ }>, {
26
+ action: undefined;
27
+ description: undefined;
28
+ leftIcon: null;
29
+ showLeftIcon: boolean;
30
+ }>>> & Readonly<{}>, {
31
+ description: string;
32
+ action: SonnerContentAction;
33
+ leftIcon: Component | null;
34
+ showLeftIcon: boolean;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
36
+ export default _default;
37
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
38
+ type __VLS_TypePropsToRuntimeProps<T> = {
39
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
40
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
41
+ } : {
42
+ type: import('vue').PropType<T[K]>;
43
+ required: true;
44
+ };
45
+ };
46
+ type __VLS_WithDefaults<P, D> = {
47
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
48
+ default: D[K];
49
+ }> : P[K];
50
+ };
51
+ type __VLS_Prettify<T> = {
52
+ [K in keyof T]: T[K];
53
+ } & {};
@@ -0,0 +1,2 @@
1
+ export declare const SONNER_POSITIONS: readonly ["top-left", "top-center", "top-right", "bottom-left", "bottom-center", "bottom-right"];
2
+ export type SonnerPosition = (typeof SONNER_POSITIONS)[number];
@@ -0,0 +1,7 @@
1
+ export { default as Sonner } from './KuatSonner.vue';
2
+ export { default as SonnerContent } from './KuatSonnerContent.vue';
3
+ export { SONNER_POSITIONS } from './constants';
4
+ export { toast } from './toast';
5
+ export type { SonnerPosition } from './constants';
6
+ export type { SonnerContentAction } from './KuatSonnerContent.vue';
7
+ export type { SonnerAnnouncement, SonnerToastOptions } from './toast';
@@ -0,0 +1,17 @@
1
+ import { toast as primitiveToast, ExternalToast } from 'vue-sonner';
2
+
3
+ export type SonnerAnnouncement = "polite" | "assertive";
4
+ export type SonnerToastOptions = Omit<ExternalToast, "important"> & {
5
+ announcement?: SonnerAnnouncement;
6
+ };
7
+ type SonnerMessage = Parameters<typeof primitiveToast>[0];
8
+ type ToastHandler = ((message: SonnerMessage, options?: SonnerToastOptions) => string | number) & {
9
+ success: (message: SonnerMessage, options?: SonnerToastOptions) => string | number;
10
+ info: (message: SonnerMessage, options?: SonnerToastOptions) => string | number;
11
+ warning: (message: SonnerMessage, options?: SonnerToastOptions) => string | number;
12
+ error: (message: SonnerMessage, options?: SonnerToastOptions) => string | number;
13
+ loading: (message: SonnerMessage, options?: SonnerToastOptions) => string | number;
14
+ dismiss: typeof primitiveToast.dismiss;
15
+ };
16
+ export declare const toast: ToastHandler;
17
+ export {};
package/dist/index.d.ts CHANGED
@@ -5,6 +5,8 @@ export type { ButtonGroupVariants } from './components/ui/button-group';
5
5
  export { ContentCard } from './components/ui/content-card';
6
6
  export { KuatHeader, kuatHeaderVariants, EELogo } from './components/ui/kuat-header';
7
7
  export type { KuatHeaderVariants } from './components/ui/kuat-header';
8
+ export { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, } from './components/ui/carousel';
9
+ export type { CarouselItemBasis, CarouselOrientation, CarouselApi, CarouselEventHandler, CarouselEventHandlers, } from './components/ui/carousel';
8
10
  export { KuatCarousel, KuatCarouselContent, KuatCarouselItem, KuatCarouselPrevious, KuatCarouselNext, } from './components/ui/kuat-carousel';
9
11
  export type { KuatCarouselSlidesPerView } from './components/ui/kuat-carousel';
10
12
  export { KuatRadialProgress, KUAT_RADIAL_PROGRESS_SIZES, KUAT_RADIAL_PROGRESS_COLORS, } from './components/ui/kuat-radial-progress';
@@ -37,3 +39,5 @@ export { Toggle, TOGGLE_SIZES, TOGGLE_SKINS } from './components/ui/toggle';
37
39
  export type { ToggleSize, ToggleSkin } from './components/ui/toggle';
38
40
  export { ToggleGroup, ToggleGroupItem, TOGGLE_GROUP_ORIENTATIONS, } from './components/ui/toggle-group';
39
41
  export type { ToggleGroupOrientation } from './components/ui/toggle-group';
42
+ export { Sonner, SonnerContent, SONNER_POSITIONS, toast } from './components/ui/sonner';
43
+ export type { SonnerAnnouncement, SonnerContentAction, SonnerPosition, SonnerToastOptions, } from './components/ui/sonner';